summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/usb
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/Kconfig127
-rw-r--r--drivers/usb/Makefile74
-rw-r--r--drivers/usb/README54
-rw-r--r--drivers/usb/atm/Kconfig30
-rw-r--r--drivers/usb/atm/Makefile7
-rw-r--r--drivers/usb/atm/speedtch.c847
-rw-r--r--drivers/usb/atm/usb_atm.c1188
-rw-r--r--drivers/usb/atm/usb_atm.h176
-rw-r--r--drivers/usb/class/Kconfig86
-rw-r--r--drivers/usb/class/Makefile10
-rw-r--r--drivers/usb/class/audio.c3882
-rw-r--r--drivers/usb/class/audio.h110
-rw-r--r--drivers/usb/class/bluetty.c1279
-rw-r--r--drivers/usb/class/cdc-acm.c942
-rw-r--r--drivers/usb/class/cdc-acm.h82
-rw-r--r--drivers/usb/class/usb-midi.c2154
-rw-r--r--drivers/usb/class/usb-midi.h164
-rw-r--r--drivers/usb/class/usblp.c1214
-rw-r--r--drivers/usb/core/Kconfig99
-rw-r--r--drivers/usb/core/Makefile16
-rw-r--r--drivers/usb/core/buffer.c154
-rw-r--r--drivers/usb/core/config.c534
-rw-r--r--drivers/usb/core/devices.c677
-rw-r--r--drivers/usb/core/devio.c1483
-rw-r--r--drivers/usb/core/file.c227
-rw-r--r--drivers/usb/core/hcd-pci.c358
-rw-r--r--drivers/usb/core/hcd.c1840
-rw-r--r--drivers/usb/core/hcd.h476
-rw-r--r--drivers/usb/core/hub.c3057
-rw-r--r--drivers/usb/core/hub.h238
-rw-r--r--drivers/usb/core/inode.c764
-rw-r--r--drivers/usb/core/message.c1480
-rw-r--r--drivers/usb/core/otg_whitelist.h112
-rw-r--r--drivers/usb/core/sysfs.c318
-rw-r--r--drivers/usb/core/urb.c511
-rw-r--r--drivers/usb/core/usb.c1573
-rw-r--r--drivers/usb/core/usb.h46
-rw-r--r--drivers/usb/gadget/Kconfig389
-rw-r--r--drivers/usb/gadget/Makefile30
-rw-r--r--drivers/usb/gadget/config.c117
-rw-r--r--drivers/usb/gadget/dummy_hcd.c1793
-rw-r--r--drivers/usb/gadget/epautoconf.c310
-rw-r--r--drivers/usb/gadget/ether.c2660
-rw-r--r--drivers/usb/gadget/file_storage.c4139
-rw-r--r--drivers/usb/gadget/gadget_chips.h92
-rw-r--r--drivers/usb/gadget/goku_udc.c1984
-rw-r--r--drivers/usb/gadget/goku_udc.h290
-rw-r--r--drivers/usb/gadget/inode.c2110
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.c2167
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.h261
-rw-r--r--drivers/usb/gadget/ndis.h217
-rw-r--r--drivers/usb/gadget/net2280.c2967
-rw-r--r--drivers/usb/gadget/net2280.h728
-rw-r--r--drivers/usb/gadget/omap_udc.c2872
-rw-r--r--drivers/usb/gadget/omap_udc.h208
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.c2648
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.h320
-rw-r--r--drivers/usb/gadget/rndis.c1428
-rw-r--r--drivers/usb/gadget/rndis.h348
-rw-r--r--drivers/usb/gadget/serial.c2436
-rw-r--r--drivers/usb/gadget/usbstring.c136
-rw-r--r--drivers/usb/gadget/zero.c1357
-rw-r--r--drivers/usb/host/Kconfig126
-rw-r--r--drivers/usb/host/Makefile10
-rw-r--r--drivers/usb/host/ehci-dbg.c755
-rw-r--r--drivers/usb/host/ehci-hcd.c1261
-rw-r--r--drivers/usb/host/ehci-hub.c553
-rw-r--r--drivers/usb/host/ehci-mem.c237
-rw-r--r--drivers/usb/host/ehci-q.c1090
-rw-r--r--drivers/usb/host/ehci-sched.c1999
-rw-r--r--drivers/usb/host/ehci.h637
-rw-r--r--drivers/usb/host/hc_crisv10.c4556
-rw-r--r--drivers/usb/host/hc_crisv10.h289
-rw-r--r--drivers/usb/host/ohci-au1xxx.c284
-rw-r--r--drivers/usb/host/ohci-dbg.c707
-rw-r--r--drivers/usb/host/ohci-hcd.c925
-rw-r--r--drivers/usb/host/ohci-hub.c643
-rw-r--r--drivers/usb/host/ohci-lh7a404.c266
-rw-r--r--drivers/usb/host/ohci-mem.c139
-rw-r--r--drivers/usb/host/ohci-omap.c560
-rw-r--r--drivers/usb/host/ohci-pci.c264
-rw-r--r--drivers/usb/host/ohci-ppc-soc.c234
-rw-r--r--drivers/usb/host/ohci-pxa27x.c383
-rw-r--r--drivers/usb/host/ohci-q.c1107
-rw-r--r--drivers/usb/host/ohci-sa1111.c289
-rw-r--r--drivers/usb/host/ohci.h636
-rw-r--r--drivers/usb/host/sl811-hcd.c1851
-rw-r--r--drivers/usb/host/sl811.h266
-rw-r--r--drivers/usb/host/uhci-debug.c587
-rw-r--r--drivers/usb/host/uhci-hcd.c919
-rw-r--r--drivers/usb/host/uhci-hcd.h454
-rw-r--r--drivers/usb/host/uhci-hub.c299
-rw-r--r--drivers/usb/host/uhci-q.c1539
-rw-r--r--drivers/usb/image/Kconfig30
-rw-r--r--drivers/usb/image/Makefile6
-rw-r--r--drivers/usb/image/mdc800.c1063
-rw-r--r--drivers/usb/image/microtek.c862
-rw-r--r--drivers/usb/image/microtek.h55
-rw-r--r--drivers/usb/input/Kconfig237
-rw-r--r--drivers/usb/input/Makefile39
-rw-r--r--drivers/usb/input/aiptek.c2283
-rw-r--r--drivers/usb/input/ati_remote.c850
-rw-r--r--drivers/usb/input/fixp-arith.h90
-rw-r--r--drivers/usb/input/hid-core.c1864
-rw-r--r--drivers/usb/input/hid-debug.h720
-rw-r--r--drivers/usb/input/hid-ff.c94
-rw-r--r--drivers/usb/input/hid-input.c630
-rw-r--r--drivers/usb/input/hid-lgff.c528
-rw-r--r--drivers/usb/input/hid-tmff.c463
-rw-r--r--drivers/usb/input/hid.h510
-rw-r--r--drivers/usb/input/hiddev.c844
-rw-r--r--drivers/usb/input/kbtab.c241
-rw-r--r--drivers/usb/input/mtouchusb.c367
-rw-r--r--drivers/usb/input/pid.c295
-rw-r--r--drivers/usb/input/pid.h62
-rw-r--r--drivers/usb/input/powermate.c464
-rw-r--r--drivers/usb/input/touchkitusb.c310
-rw-r--r--drivers/usb/input/usbkbd.c370
-rw-r--r--drivers/usb/input/usbmouse.c252
-rw-r--r--drivers/usb/input/wacom.c951
-rw-r--r--drivers/usb/input/xpad.c362
-rw-r--r--drivers/usb/media/Kconfig213
-rw-r--r--drivers/usb/media/Makefile17
-rw-r--r--drivers/usb/media/dabfirmware.h1408
-rw-r--r--drivers/usb/media/dabusb.c877
-rw-r--r--drivers/usb/media/dabusb.h85
-rw-r--r--drivers/usb/media/dsbr100.c429
-rw-r--r--drivers/usb/media/ibmcam.c3932
-rw-r--r--drivers/usb/media/konicawc.c947
-rw-r--r--drivers/usb/media/ov511.c6131
-rw-r--r--drivers/usb/media/ov511.h569
-rw-r--r--drivers/usb/media/pwc/ChangeLog143
-rw-r--r--drivers/usb/media/pwc/Makefile20
-rw-r--r--drivers/usb/media/pwc/philips.txt236
-rw-r--r--drivers/usb/media/pwc/pwc-ctrl.c1630
-rw-r--r--drivers/usb/media/pwc/pwc-dec1.c42
-rw-r--r--drivers/usb/media/pwc/pwc-dec1.h36
-rw-r--r--drivers/usb/media/pwc/pwc-dec23.c623
-rw-r--r--drivers/usb/media/pwc/pwc-dec23.h58
-rw-r--r--drivers/usb/media/pwc/pwc-if.c2212
-rw-r--r--drivers/usb/media/pwc/pwc-ioctl.h292
-rw-r--r--drivers/usb/media/pwc/pwc-kiara.c891
-rw-r--r--drivers/usb/media/pwc/pwc-kiara.h45
-rw-r--r--drivers/usb/media/pwc/pwc-misc.c140
-rw-r--r--drivers/usb/media/pwc/pwc-nala.h66
-rw-r--r--drivers/usb/media/pwc/pwc-timon.c1446
-rw-r--r--drivers/usb/media/pwc/pwc-timon.h61
-rw-r--r--drivers/usb/media/pwc/pwc-uncompress.c147
-rw-r--r--drivers/usb/media/pwc/pwc-uncompress.h41
-rw-r--r--drivers/usb/media/pwc/pwc.h278
-rw-r--r--drivers/usb/media/se401.c1436
-rw-r--r--drivers/usb/media/se401.h233
-rw-r--r--drivers/usb/media/sn9c102.h206
-rw-r--r--drivers/usb/media/sn9c102_core.c2744
-rw-r--r--drivers/usb/media/sn9c102_hv7131d.c271
-rw-r--r--drivers/usb/media/sn9c102_mi0343.c363
-rw-r--r--drivers/usb/media/sn9c102_pas106b.c307
-rw-r--r--drivers/usb/media/sn9c102_pas202bcb.c293
-rw-r--r--drivers/usb/media/sn9c102_sensor.h373
-rw-r--r--drivers/usb/media/sn9c102_tas5110c1b.c174
-rw-r--r--drivers/usb/media/sn9c102_tas5130d1b.c188
-rw-r--r--drivers/usb/media/stv680.c1506
-rw-r--r--drivers/usb/media/stv680.h222
-rw-r--r--drivers/usb/media/ultracam.c679
-rw-r--r--drivers/usb/media/usbvideo.c2192
-rw-r--r--drivers/usb/media/usbvideo.h393
-rw-r--r--drivers/usb/media/vicam.c1409
-rw-r--r--drivers/usb/media/w9968cf.c3822
-rw-r--r--drivers/usb/media/w9968cf.h339
-rw-r--r--drivers/usb/media/w9968cf_decoder.h86
-rw-r--r--drivers/usb/media/w9968cf_vpp.h43
-rw-r--r--drivers/usb/misc/Kconfig152
-rw-r--r--drivers/usb/misc/Makefile20
-rw-r--r--drivers/usb/misc/auerswald.c2163
-rw-r--r--drivers/usb/misc/cytherm.c430
-rw-r--r--drivers/usb/misc/emi26.c255
-rw-r--r--drivers/usb/misc/emi26_fw.h5779
-rw-r--r--drivers/usb/misc/emi62.c298
-rw-r--r--drivers/usb/misc/emi62_fw_m.h8853
-rw-r--r--drivers/usb/misc/emi62_fw_s.h8837
-rw-r--r--drivers/usb/misc/idmouse.c443
-rw-r--r--drivers/usb/misc/legousbtower.c1088
-rw-r--r--drivers/usb/misc/phidgetkit.c586
-rw-r--r--drivers/usb/misc/phidgetservo.c342
-rw-r--r--drivers/usb/misc/rio500.c563
-rw-r--r--drivers/usb/misc/rio500_usb.h37
-rw-r--r--drivers/usb/misc/sisusbvga/Kconfig14
-rw-r--r--drivers/usb/misc/sisusbvga/Makefile6
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c3145
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.h278
-rw-r--r--drivers/usb/misc/usblcd.c404
-rw-r--r--drivers/usb/misc/usbled.c181
-rw-r--r--drivers/usb/misc/usbtest.c2140
-rw-r--r--drivers/usb/misc/uss720.c674
-rw-r--r--drivers/usb/mon/Kconfig22
-rw-r--r--drivers/usb/mon/Makefile7
-rw-r--r--drivers/usb/mon/mon_main.c377
-rw-r--r--drivers/usb/mon/mon_stat.c74
-rw-r--r--drivers/usb/mon/mon_text.c405
-rw-r--r--drivers/usb/mon/usb_mon.h51
-rw-r--r--drivers/usb/net/Kconfig307
-rw-r--r--drivers/usb/net/Makefile12
-rw-r--r--drivers/usb/net/catc.c960
-rw-r--r--drivers/usb/net/kaweth.c1271
-rw-r--r--drivers/usb/net/kawethfw.h557
-rw-r--r--drivers/usb/net/pegasus.c1408
-rw-r--r--drivers/usb/net/pegasus.h298
-rw-r--r--drivers/usb/net/rtl8150.c942
-rw-r--r--drivers/usb/net/usbnet.c4106
-rw-r--r--drivers/usb/net/zd1201.c1905
-rw-r--r--drivers/usb/net/zd1201.h147
-rw-r--r--drivers/usb/serial/Kconfig455
-rw-r--r--drivers/usb/serial/Makefile39
-rw-r--r--drivers/usb/serial/Makefile-keyspan_pda_fw16
-rw-r--r--drivers/usb/serial/belkin_sa.c614
-rw-r--r--drivers/usb/serial/belkin_sa.h123
-rw-r--r--drivers/usb/serial/bus.c134
-rw-r--r--drivers/usb/serial/console.c264
-rw-r--r--drivers/usb/serial/cp2101.c591
-rw-r--r--drivers/usb/serial/cyberjack.c514
-rw-r--r--drivers/usb/serial/cypress_m8.c1538
-rw-r--r--drivers/usb/serial/cypress_m8.h55
-rw-r--r--drivers/usb/serial/digi_acceleport.c2049
-rw-r--r--drivers/usb/serial/empeg.c596
-rw-r--r--drivers/usb/serial/ezusb.c60
-rw-r--r--drivers/usb/serial/ezusb_convert.pl50
-rw-r--r--drivers/usb/serial/ftdi_sio.c2496
-rw-r--r--drivers/usb/serial/ftdi_sio.h777
-rw-r--r--drivers/usb/serial/garmin_gps.c1541
-rw-r--r--drivers/usb/serial/generic.c315
-rw-r--r--drivers/usb/serial/io_16654.h195
-rw-r--r--drivers/usb/serial/io_edgeport.c3113
-rw-r--r--drivers/usb/serial/io_edgeport.h141
-rw-r--r--drivers/usb/serial/io_fw_boot.h556
-rw-r--r--drivers/usb/serial/io_fw_boot2.h546
-rw-r--r--drivers/usb/serial/io_fw_down.h1229
-rw-r--r--drivers/usb/serial/io_fw_down2.h1133
-rw-r--r--drivers/usb/serial/io_fw_down3.h835
-rw-r--r--drivers/usb/serial/io_ionsp.h454
-rw-r--r--drivers/usb/serial/io_tables.h163
-rw-r--r--drivers/usb/serial/io_ti.c3091
-rw-r--r--drivers/usb/serial/io_ti.h180
-rw-r--r--drivers/usb/serial/io_usbvend.h687
-rw-r--r--drivers/usb/serial/ipaq.c973
-rw-r--r--drivers/usb/serial/ipaq.h54
-rw-r--r--drivers/usb/serial/ipw.c491
-rw-r--r--drivers/usb/serial/ir-usb.c619
-rw-r--r--drivers/usb/serial/keyspan.c2354
-rw-r--r--drivers/usb/serial/keyspan.h660
-rw-r--r--drivers/usb/serial/keyspan_mpr_fw.h286
-rw-r--r--drivers/usb/serial/keyspan_pda.S1124
-rw-r--r--drivers/usb/serial/keyspan_pda.c894
-rw-r--r--drivers/usb/serial/keyspan_pda_fw.h99
-rw-r--r--drivers/usb/serial/keyspan_usa18x_fw.h447
-rw-r--r--drivers/usb/serial/keyspan_usa19_fw.h285
-rw-r--r--drivers/usb/serial/keyspan_usa19qi_fw.h284
-rw-r--r--drivers/usb/serial/keyspan_usa19qw_fw.h448
-rw-r--r--drivers/usb/serial/keyspan_usa19w_fw.h446
-rw-r--r--drivers/usb/serial/keyspan_usa26msg.h260
-rw-r--r--drivers/usb/serial/keyspan_usa28_fw.h466
-rw-r--r--drivers/usb/serial/keyspan_usa28msg.h201
-rw-r--r--drivers/usb/serial/keyspan_usa28x_fw.h447
-rw-r--r--drivers/usb/serial/keyspan_usa28xa_fw.h449
-rw-r--r--drivers/usb/serial/keyspan_usa28xb_fw.h448
-rw-r--r--drivers/usb/serial/keyspan_usa49msg.h282
-rw-r--r--drivers/usb/serial/keyspan_usa49w_fw.h464
-rw-r--r--drivers/usb/serial/keyspan_usa49wlc_fw.h476
-rw-r--r--drivers/usb/serial/keyspan_usa90msg.h198
-rw-r--r--drivers/usb/serial/kl5kusb105.c1034
-rw-r--r--drivers/usb/serial/kl5kusb105.h69
-rw-r--r--drivers/usb/serial/kobil_sct.c774
-rw-r--r--drivers/usb/serial/kobil_sct.h60
-rw-r--r--drivers/usb/serial/mct_u232.c781
-rw-r--r--drivers/usb/serial/mct_u232.h453
-rw-r--r--drivers/usb/serial/omninet.c362
-rw-r--r--drivers/usb/serial/pl2303.c1200
-rw-r--r--drivers/usb/serial/pl2303.h57
-rw-r--r--drivers/usb/serial/safe_serial.c451
-rw-r--r--drivers/usb/serial/ti_fw_3410.h885
-rw-r--r--drivers/usb/serial/ti_fw_5052.h885
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c1842
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.h224
-rw-r--r--drivers/usb/serial/usb-serial.c1435
-rw-r--r--drivers/usb/serial/usb-serial.h332
-rw-r--r--drivers/usb/serial/visor.c1161
-rw-r--r--drivers/usb/serial/visor.h151
-rw-r--r--drivers/usb/serial/whiteheat.c1512
-rw-r--r--drivers/usb/serial/whiteheat.h282
-rw-r--r--drivers/usb/serial/whiteheat_fw.h1669
-rw-r--r--drivers/usb/serial/xircom_pgs.S1192
-rw-r--r--drivers/usb/serial/xircom_pgs_fw.h103
-rw-r--r--drivers/usb/storage/Kconfig113
-rw-r--r--drivers/usb/storage/Makefile23
-rw-r--r--drivers/usb/storage/datafab.c669
-rw-r--r--drivers/usb/storage/datafab.h40
-rw-r--r--drivers/usb/storage/debug.c177
-rw-r--r--drivers/usb/storage/debug.h65
-rw-r--r--drivers/usb/storage/dpcm.c89
-rw-r--r--drivers/usb/storage/dpcm.h34
-rw-r--r--drivers/usb/storage/freecom.c488
-rw-r--r--drivers/usb/storage/freecom.h36
-rw-r--r--drivers/usb/storage/initializers.c93
-rw-r--r--drivers/usb/storage/initializers.h54
-rw-r--r--drivers/usb/storage/isd200.c1442
-rw-r--r--drivers/usb/storage/isd200.h31
-rw-r--r--drivers/usb/storage/jumpshot.c596
-rw-r--r--drivers/usb/storage/jumpshot.h39
-rw-r--r--drivers/usb/storage/protocol.c254
-rw-r--r--drivers/usb/storage/protocol.h74
-rw-r--r--drivers/usb/storage/scsiglue.c500
-rw-r--r--drivers/usb/storage/scsiglue.h49
-rw-r--r--drivers/usb/storage/sddr09.c1608
-rw-r--r--drivers/usb/storage/sddr09.h48
-rw-r--r--drivers/usb/storage/sddr55.c938
-rw-r--r--drivers/usb/storage/sddr55.h34
-rw-r--r--drivers/usb/storage/shuttle_usbat.c1712
-rw-r--r--drivers/usb/storage/shuttle_usbat.h123
-rw-r--r--drivers/usb/storage/transport.c1215
-rw-r--r--drivers/usb/storage/transport.h174
-rw-r--r--drivers/usb/storage/unusual_devs.h986
-rw-r--r--drivers/usb/storage/usb.c1051
-rw-r--r--drivers/usb/storage/usb.h204
-rw-r--r--drivers/usb/usb-skeleton.c360
323 files changed, 254872 insertions, 0 deletions
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
new file mode 100644
index 000000000000..cd329dd7fb86
--- /dev/null
+++ b/drivers/usb/Kconfig
@@ -0,0 +1,127 @@
+#
+# USB device configuration
+#
+
+menu "USB support"
+
+# Host-side USB depends on having a host controller
+# NOTE: dummy_hcd is always an option, but it's ignored here ...
+# NOTE: SL-811 option should be board-specific ...
+config USB_ARCH_HAS_HCD
+ boolean
+ default y if USB_ARCH_HAS_OHCI
+ default y if ARM # SL-811
+ default PCI
+
+# many non-PCI SOC chips embed OHCI
+config USB_ARCH_HAS_OHCI
+ boolean
+ # ARM:
+ default y if SA1111
+ default y if ARCH_OMAP
+ default y if ARCH_LH7A404
+ default y if PXA27x
+ # PPC:
+ default y if STB03xxx
+ default y if PPC_MPC52xx
+ # MIPS:
+ default y if SOC_AU1X00
+ # more:
+ default PCI
+
+# ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
+config USB
+ tristate "Support for Host-side USB"
+ depends on USB_ARCH_HAS_HCD
+ ---help---
+ Universal Serial Bus (USB) is a specification for a serial bus
+ subsystem which offers higher speeds and more features than the
+ traditional PC serial port. The bus supplies power to peripherals
+ and allows for hot swapping. Up to 127 USB peripherals can be
+ connected to a single USB host in a tree structure.
+
+ The USB host is the root of the tree, the peripherals are the
+ leaves and the inner nodes are special USB devices called hubs.
+ Most PCs now have USB host ports, used to connect peripherals
+ such as scanners, keyboards, mice, modems, cameras, disks,
+ flash memory, network links, and printers to the PC.
+
+ Say Y here if your computer has a host-side USB port and you want
+ to use USB devices. You then need to say Y to at least one of the
+ Host Controller Driver (HCD) options below. Choose a USB 1.1
+ controller, such as "UHCI HCD support" or "OHCI HCD support",
+ and "EHCI HCD (USB 2.0) support" except for older systems that
+ do not have USB 2.0 support. It doesn't normally hurt to select
+ them all if you are not certain.
+
+ If your system has a device-side USB port, used in the peripheral
+ side of the USB protocol, see the "USB Gadget" framework instead.
+
+ After choosing your HCD, then select drivers for the USB peripherals
+ you'll be using. You may want to check out the information provided
+ in <file:Documentation/usb/> and especially the links given in
+ <file:Documentation/usb/usb-help.txt>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usbcore.
+
+source "drivers/usb/core/Kconfig"
+
+source "drivers/usb/host/Kconfig"
+
+source "drivers/usb/class/Kconfig"
+
+source "drivers/usb/storage/Kconfig"
+
+source "drivers/usb/input/Kconfig"
+
+source "drivers/usb/image/Kconfig"
+
+source "drivers/usb/media/Kconfig"
+
+source "drivers/usb/net/Kconfig"
+
+source "drivers/usb/mon/Kconfig"
+
+comment "USB port drivers"
+ depends on USB
+
+config USB_USS720
+ tristate "USS720 parport driver"
+ depends on USB && PARPORT
+ select PARPORT_NOT_PC
+ ---help---
+ This driver is for USB parallel port adapters that use the Lucent
+ Technologies USS-720 chip. These cables are plugged into your USB
+ port and provide USB compatibility to peripherals designed with
+ parallel port interfaces.
+
+ The chip has two modes: automatic mode and manual mode. In automatic
+ mode, it looks to the computer like a standard USB printer. Only
+ printers may be connected to the USS-720 in this mode. The generic
+ USB printer driver ("USB Printer support", above) may be used in
+ that mode, and you can say N here if you want to use the chip only
+ in this mode.
+
+ Manual mode is not limited to printers, any parallel port
+ device should work. This driver utilizes manual mode.
+ Note however that some operations are three orders of magnitude
+ slower than on a PCI/ISA Parallel Port, so timing critical
+ applications might not work.
+
+ Say Y here if you own an USS-720 USB->Parport cable and intend to
+ connect anything other than a printer to it.
+
+ To compile this driver as a module, choose M here: the
+ module will be called uss720.
+
+source "drivers/usb/serial/Kconfig"
+
+source "drivers/usb/misc/Kconfig"
+
+source "drivers/usb/atm/Kconfig"
+
+source "drivers/usb/gadget/Kconfig"
+
+endmenu
+
diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
new file mode 100644
index 000000000000..a61d4433a989
--- /dev/null
+++ b/drivers/usb/Makefile
@@ -0,0 +1,74 @@
+#
+# Makefile for the kernel USB device drivers.
+#
+
+# Object files in subdirectories
+
+obj-$(CONFIG_USB) += core/
+
+obj-$(CONFIG_USB_MON) += mon/
+
+obj-$(CONFIG_USB_EHCI_HCD) += host/
+obj-$(CONFIG_USB_OHCI_HCD) += host/
+obj-$(CONFIG_USB_UHCI_HCD) += host/
+obj-$(CONFIG_USB_SL811_HCD) += host/
+obj-$(CONFIG_ETRAX_USB_HOST) += host/
+
+obj-$(CONFIG_USB_ACM) += class/
+obj-$(CONFIG_USB_AUDIO) += class/
+obj-$(CONFIG_USB_BLUETOOTH_TTY) += class/
+obj-$(CONFIG_USB_MIDI) += class/
+obj-$(CONFIG_USB_PRINTER) += class/
+
+obj-$(CONFIG_USB_STORAGE) += storage/
+
+obj-$(CONFIG_USB_AIPTEK) += input/
+obj-$(CONFIG_USB_ATI_REMOTE) += input/
+obj-$(CONFIG_USB_HID) += input/
+obj-$(CONFIG_USB_KBD) += input/
+obj-$(CONFIG_USB_KBTAB) += input/
+obj-$(CONFIG_USB_MOUSE) += input/
+obj-$(CONFIG_USB_MTOUCH) += input/
+obj-$(CONFIG_USB_POWERMATE) += input/
+obj-$(CONFIG_USB_WACOM) += input/
+obj-$(CONFIG_USB_XPAD) += input/
+
+obj-$(CONFIG_USB_DABUSB) += media/
+obj-$(CONFIG_USB_DSBR) += media/
+obj-$(CONFIG_USB_IBMCAM) += media/
+obj-$(CONFIG_USB_KONICAWC) += media/
+obj-$(CONFIG_USB_OV511) += media/
+obj-$(CONFIG_USB_PWC) += media/
+obj-$(CONFIG_USB_SE401) += media/
+obj-$(CONFIG_USB_SN9C102) += media/
+obj-$(CONFIG_USB_STV680) += media/
+obj-$(CONFIG_USB_VICAM) += media/
+obj-$(CONFIG_USB_W9968CF) += media/
+
+obj-$(CONFIG_USB_CATC) += net/
+obj-$(CONFIG_USB_KAWETH) += net/
+obj-$(CONFIG_USB_PEGASUS) += net/
+obj-$(CONFIG_USB_RTL8150) += net/
+obj-$(CONFIG_USB_USBNET) += net/
+obj-$(CONFIG_USB_ZD1201) += net/
+
+obj-$(CONFIG_USB_MDC800) += image/
+obj-$(CONFIG_USB_MICROTEK) += image/
+
+obj-$(CONFIG_USB_SERIAL) += serial/
+
+obj-$(CONFIG_USB_AUERSWALD) += misc/
+obj-$(CONFIG_USB_CYTHERM) += misc/
+obj-$(CONFIG_USB_EMI26) += misc/
+obj-$(CONFIG_USB_EMI62) += misc/
+obj-$(CONFIG_USB_IDMOUSE) += misc/
+obj-$(CONFIG_USB_LCD) += misc/
+obj-$(CONFIG_USB_LED) += misc/
+obj-$(CONFIG_USB_LEGOTOWER) += misc/
+obj-$(CONFIG_USB_RIO500) += misc/
+obj-$(CONFIG_USB_TEST) += misc/
+obj-$(CONFIG_USB_USS720) += misc/
+obj-$(CONFIG_USB_PHIDGETSERVO) += misc/
+
+obj-$(CONFIG_USB_ATM) += atm/
+obj-$(CONFIG_USB_SPEEDTOUCH) += atm/
diff --git a/drivers/usb/README b/drivers/usb/README
new file mode 100644
index 000000000000..3c8434128554
--- /dev/null
+++ b/drivers/usb/README
@@ -0,0 +1,54 @@
+To understand all the Linux-USB framework, you'll use these resources:
+
+ * This source code. This is necessarily an evolving work, and
+ includes kerneldoc that should help you get a current overview.
+ ("make pdfdocs", and then look at "usb.pdf" for host side and
+ "gadget.pdf" for peripheral side.) Also, Documentation/usb has
+ more information.
+
+ * The USB 2.0 specification (from www.usb.org), with supplements
+ such as those for USB OTG and the various device classes.
+ The USB specification has a good overview chapter, and USB
+ peripherals conform to the widely known "Chapter 9".
+
+ * Chip specifications for USB controllers. Examples include
+ host controllers (on PCs, servers, and more); peripheral
+ controllers (in devices with Linux firmware, like printers or
+ cell phones); and hard-wired peripherals like Ethernet adapters.
+
+ * Specifications for other protocols implemented by USB peripheral
+ functions. Some are vendor-specific; others are vendor-neutral
+ but just standardized outside of the www.usb.org team.
+
+Here is a list of what each subdirectory here is, and what is contained in
+them.
+
+core/ - This is for the core USB host code, including the
+ usbfs files and the hub class driver ("khubd").
+
+host/ - This is for USB host controller drivers. This
+ includes UHCI, OHCI, EHCI, and others that might
+ be used with more specialized "embedded" systems.
+
+gadget/ - This is for USB peripheral controller drivers and
+ the various gadget drivers which talk to them.
+
+
+Individual USB driver directories. A new driver should be added to the
+first subdirectory in the list below that it fits into.
+
+image/ - This is for still image drivers, like scanners or
+ digital cameras.
+input/ - This is for any driver that uses the input subsystem,
+ like keyboard, mice, touchscreens, tablets, etc.
+media/ - This is for multimedia drivers, like video cameras,
+ radios, and any other drivers that talk to the v4l
+ subsystem.
+net/ - This is for network drivers.
+serial/ - This is for USB to serial drivers.
+storage/ - This is for USB mass-storage drivers.
+class/ - This is for all USB device drivers that do not fit
+ into any of the above categories, and work for a range
+ of USB Class specified devices.
+misc/ - This is for all USB device drivers that do not fit
+ into any of the above categories.
diff --git a/drivers/usb/atm/Kconfig b/drivers/usb/atm/Kconfig
new file mode 100644
index 000000000000..0d9f5379b8cf
--- /dev/null
+++ b/drivers/usb/atm/Kconfig
@@ -0,0 +1,30 @@
+#
+# USB ATM driver configuration
+#
+comment "USB ATM/DSL drivers"
+ depends on USB
+
+config USB_ATM
+ tristate "Generic USB ATM/DSL core I/O support"
+ depends on USB && ATM
+ select CRC32
+ default n
+ help
+ This provides a library which is used for packet I/O by USB DSL
+ modems, such as the SpeedTouch driver below.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usb_atm.
+
+config USB_SPEEDTOUCH
+ tristate "Alcatel Speedtouch USB support"
+ depends on USB && ATM
+ select USB_ATM
+ help
+ Say Y here if you have an Alcatel SpeedTouch USB or SpeedTouch 330
+ modem. In order to use your modem you will need to install the
+ two parts of the firmware, extracted by the user space tools; see
+ <http://www.linux-usb.org/SpeedTouch/> for details.
+
+ To compile this driver as a module, choose M here: the
+ module will be called speedtch.
diff --git a/drivers/usb/atm/Makefile b/drivers/usb/atm/Makefile
new file mode 100644
index 000000000000..9213b8b97587
--- /dev/null
+++ b/drivers/usb/atm/Makefile
@@ -0,0 +1,7 @@
+#
+# Makefile for the rest of the USB drivers
+# (the ones that don't fit into any other categories)
+#
+
+obj-$(CONFIG_USB_ATM) += usb_atm.o
+obj-$(CONFIG_USB_SPEEDTOUCH) += speedtch.o
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c
new file mode 100644
index 000000000000..233f9229badb
--- /dev/null
+++ b/drivers/usb/atm/speedtch.c
@@ -0,0 +1,847 @@
+/******************************************************************************
+ * speedtch.c - Alcatel SpeedTouch USB xDSL modem driver
+ *
+ * Copyright (C) 2001, Alcatel
+ * Copyright (C) 2003, Duncan Sands
+ * Copyright (C) 2004, David Woodhouse
+ *
+ * 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 <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/gfp.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/timer.h>
+#include <linux/errno.h>
+#include <linux/proc_fs.h>
+#include <linux/slab.h>
+#include <linux/wait.h>
+#include <linux/list.h>
+#include <asm/processor.h>
+#include <asm/uaccess.h>
+#include <linux/smp_lock.h>
+#include <linux/interrupt.h>
+#include <linux/atm.h>
+#include <linux/atmdev.h>
+#include <linux/crc32.h>
+#include <linux/init.h>
+#include <linux/firmware.h>
+
+#include "usb_atm.h"
+
+#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
+# define USE_FW_LOADER
+#endif
+
+#define DRIVER_AUTHOR "Johan Verrept, Duncan Sands <duncan.sands@free.fr>"
+#define DRIVER_VERSION "1.8"
+#define DRIVER_DESC "Alcatel SpeedTouch USB driver version " DRIVER_VERSION
+
+static const char speedtch_driver_name[] = "speedtch";
+
+#define SPEEDTOUCH_VENDORID 0x06b9
+#define SPEEDTOUCH_PRODUCTID 0x4061
+
+/* Timeout in jiffies */
+#define CTRL_TIMEOUT 2000
+#define DATA_TIMEOUT 2000
+
+#define OFFSET_7 0 /* size 1 */
+#define OFFSET_b 1 /* size 8 */
+#define OFFSET_d 9 /* size 4 */
+#define OFFSET_e 13 /* size 1 */
+#define OFFSET_f 14 /* size 1 */
+#define TOTAL 15
+
+#define SIZE_7 1
+#define SIZE_b 8
+#define SIZE_d 4
+#define SIZE_e 1
+#define SIZE_f 1
+
+static int dl_512_first = 0;
+static int sw_buffering = 0;
+
+module_param(dl_512_first, bool, 0444);
+MODULE_PARM_DESC(dl_512_first, "Read 512 bytes before sending firmware");
+
+module_param(sw_buffering, uint, 0444);
+MODULE_PARM_DESC(sw_buffering, "Enable software buffering");
+
+#define UDSL_IOCTL_LINE_UP 1
+#define UDSL_IOCTL_LINE_DOWN 2
+
+#define SPEEDTCH_ENDPOINT_INT 0x81
+#define SPEEDTCH_ENDPOINT_DATA 0x07
+#define SPEEDTCH_ENDPOINT_FIRMWARE 0x05
+
+#define hex2int(c) ( (c >= '0') && (c <= '9') ? (c - '0') : ((c & 0xf) + 9) )
+
+static struct usb_device_id speedtch_usb_ids[] = {
+ {USB_DEVICE(SPEEDTOUCH_VENDORID, SPEEDTOUCH_PRODUCTID)},
+ {}
+};
+
+MODULE_DEVICE_TABLE(usb, speedtch_usb_ids);
+
+struct speedtch_instance_data {
+ struct udsl_instance_data u;
+
+ /* Status */
+ struct urb *int_urb;
+ unsigned char int_data[16];
+ struct work_struct poll_work;
+ struct timer_list poll_timer;
+};
+/* USB */
+
+static int speedtch_usb_probe(struct usb_interface *intf,
+ const struct usb_device_id *id);
+static void speedtch_usb_disconnect(struct usb_interface *intf);
+static int speedtch_usb_ioctl(struct usb_interface *intf, unsigned int code,
+ void *user_data);
+static void speedtch_handle_int(struct urb *urb, struct pt_regs *regs);
+static void speedtch_poll_status(struct speedtch_instance_data *instance);
+
+static struct usb_driver speedtch_usb_driver = {
+ .owner = THIS_MODULE,
+ .name = speedtch_driver_name,
+ .probe = speedtch_usb_probe,
+ .disconnect = speedtch_usb_disconnect,
+ .ioctl = speedtch_usb_ioctl,
+ .id_table = speedtch_usb_ids,
+};
+
+/***************
+** firmware **
+***************/
+
+static void speedtch_got_firmware(struct speedtch_instance_data *instance,
+ int got_it)
+{
+ int err;
+ struct usb_interface *intf;
+
+ down(&instance->u.serialize); /* vs self, speedtch_firmware_start */
+ if (instance->u.status == UDSL_LOADED_FIRMWARE)
+ goto out;
+ if (!got_it) {
+ instance->u.status = UDSL_NO_FIRMWARE;
+ goto out;
+ }
+ if ((err = usb_set_interface(instance->u.usb_dev, 1, 1)) < 0) {
+ dbg("speedtch_got_firmware: usb_set_interface returned %d!", err);
+ instance->u.status = UDSL_NO_FIRMWARE;
+ goto out;
+ }
+
+ /* Set up interrupt endpoint */
+ intf = usb_ifnum_to_if(instance->u.usb_dev, 0);
+ if (intf && !usb_driver_claim_interface(&speedtch_usb_driver, intf, NULL)) {
+
+ instance->int_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (instance->int_urb) {
+
+ usb_fill_int_urb(instance->int_urb, instance->u.usb_dev,
+ usb_rcvintpipe(instance->u.usb_dev, SPEEDTCH_ENDPOINT_INT),
+ instance->int_data,
+ sizeof(instance->int_data),
+ speedtch_handle_int, instance, 50);
+ err = usb_submit_urb(instance->int_urb, GFP_KERNEL);
+ if (err) {
+ /* Doesn't matter; we'll poll anyway */
+ dbg("speedtch_got_firmware: Submission of interrupt URB failed %d", err);
+ usb_free_urb(instance->int_urb);
+ instance->int_urb = NULL;
+ usb_driver_release_interface(&speedtch_usb_driver, intf);
+ }
+ }
+ }
+ /* Start status polling */
+ mod_timer(&instance->poll_timer, jiffies + (1 * HZ));
+
+ instance->u.status = UDSL_LOADED_FIRMWARE;
+ tasklet_schedule(&instance->u.receive_tasklet);
+ out:
+ up(&instance->u.serialize);
+ wake_up_interruptible(&instance->u.firmware_waiters);
+}
+
+static int speedtch_set_swbuff(struct speedtch_instance_data *instance,
+ int state)
+{
+ struct usb_device *dev = instance->u.usb_dev;
+ int ret;
+
+ ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ 0x32, 0x40, state ? 0x01 : 0x00,
+ 0x00, NULL, 0, 100);
+ if (ret < 0) {
+ printk("Warning: %sabling SW buffering: usb_control_msg returned %d\n",
+ state ? "En" : "Dis", ret);
+ return ret;
+ }
+
+ dbg("speedtch_set_swbuff: %sbled SW buffering", state ? "En" : "Dis");
+ return 0;
+}
+
+static void speedtch_test_sequence(struct speedtch_instance_data *instance)
+{
+ struct usb_device *dev = instance->u.usb_dev;
+ unsigned char buf[10];
+ int ret;
+
+ /* URB 147 */
+ buf[0] = 0x1c;
+ buf[1] = 0x50;
+ ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ 0x01, 0x40, 0x0b, 0x00, buf, 2, 100);
+ if (ret < 0)
+ printk(KERN_WARNING "%s failed on URB147: %d\n", __func__, ret);
+
+ /* URB 148 */
+ buf[0] = 0x32;
+ buf[1] = 0x00;
+ ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ 0x01, 0x40, 0x02, 0x00, buf, 2, 100);
+ if (ret < 0)
+ printk(KERN_WARNING "%s failed on URB148: %d\n", __func__, ret);
+
+ /* URB 149 */
+ buf[0] = 0x01;
+ buf[1] = 0x00;
+ buf[2] = 0x01;
+ ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ 0x01, 0x40, 0x03, 0x00, buf, 3, 100);
+ if (ret < 0)
+ printk(KERN_WARNING "%s failed on URB149: %d\n", __func__, ret);
+
+ /* URB 150 */
+ buf[0] = 0x01;
+ buf[1] = 0x00;
+ buf[2] = 0x01;
+ ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ 0x01, 0x40, 0x04, 0x00, buf, 3, 100);
+ if (ret < 0)
+ printk(KERN_WARNING "%s failed on URB150: %d\n", __func__, ret);
+}
+
+static int speedtch_start_synchro(struct speedtch_instance_data *instance)
+{
+ struct usb_device *dev = instance->u.usb_dev;
+ unsigned char buf[2];
+ int ret;
+
+ ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ 0x12, 0xc0, 0x04, 0x00,
+ buf, sizeof(buf), CTRL_TIMEOUT);
+ if (ret < 0) {
+ printk(KERN_WARNING "SpeedTouch: Failed to start ADSL synchronisation: %d\n", ret);
+ return ret;
+ }
+
+ dbg("speedtch_start_synchro: modem prodded. %d Bytes returned: %02x %02x", ret, buf[0], buf[1]);
+ return 0;
+}
+
+static void speedtch_handle_int(struct urb *urb, struct pt_regs *regs)
+{
+ struct speedtch_instance_data *instance = urb->context;
+ unsigned int count = urb->actual_length;
+ int ret;
+
+ /* The magic interrupt for "up state" */
+ const static unsigned char up_int[6] = { 0xa1, 0x00, 0x01, 0x00, 0x00, 0x00 };
+ /* The magic interrupt for "down state" */
+ const static unsigned char down_int[6] = { 0xa1, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated; clean up */
+ dbg("%s - urb shutting down with status: %d", __func__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __func__, urb->status);
+ goto exit;
+ }
+
+ if (count < 6) {
+ dbg("%s - int packet too short", __func__);
+ goto exit;
+ }
+
+ if (!memcmp(up_int, instance->int_data, 6)) {
+ del_timer(&instance->poll_timer);
+ printk(KERN_NOTICE "DSL line goes up\n");
+ } else if (!memcmp(down_int, instance->int_data, 6)) {
+ printk(KERN_NOTICE "DSL line goes down\n");
+ } else {
+ int i;
+
+ printk(KERN_DEBUG "Unknown interrupt packet of %d bytes:", count);
+ for (i = 0; i < count; i++)
+ printk(" %02x", instance->int_data[i]);
+ printk("\n");
+ }
+ schedule_work(&instance->poll_work);
+
+ exit:
+ rmb();
+ if (!instance->int_urb)
+ return;
+
+ ret = usb_submit_urb(urb, GFP_ATOMIC);
+ if (ret)
+ err("%s - usb_submit_urb failed with result %d", __func__, ret);
+}
+
+static int speedtch_get_status(struct speedtch_instance_data *instance,
+ unsigned char *buf)
+{
+ struct usb_device *dev = instance->u.usb_dev;
+ int ret;
+
+ memset(buf, 0, TOTAL);
+
+ ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ 0x12, 0xc0, 0x07, 0x00, buf + OFFSET_7, SIZE_7,
+ CTRL_TIMEOUT);
+ if (ret < 0) {
+ dbg("MSG 7 failed");
+ return ret;
+ }
+
+ ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ 0x12, 0xc0, 0x0b, 0x00, buf + OFFSET_b, SIZE_b,
+ CTRL_TIMEOUT);
+ if (ret < 0) {
+ dbg("MSG B failed");
+ return ret;
+ }
+
+ ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ 0x12, 0xc0, 0x0d, 0x00, buf + OFFSET_d, SIZE_d,
+ CTRL_TIMEOUT);
+ if (ret < 0) {
+ dbg("MSG D failed");
+ return ret;
+ }
+
+ ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ 0x01, 0xc0, 0x0e, 0x00, buf + OFFSET_e, SIZE_e,
+ CTRL_TIMEOUT);
+ if (ret < 0) {
+ dbg("MSG E failed");
+ return ret;
+ }
+
+ ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ 0x01, 0xc0, 0x0f, 0x00, buf + OFFSET_f, SIZE_f,
+ CTRL_TIMEOUT);
+ if (ret < 0) {
+ dbg("MSG F failed");
+ return ret;
+ }
+
+ return 0;
+}
+
+static void speedtch_poll_status(struct speedtch_instance_data *instance)
+{
+ unsigned char buf[TOTAL];
+ int ret;
+
+ ret = speedtch_get_status(instance, buf);
+ if (ret) {
+ printk(KERN_WARNING
+ "SpeedTouch: Error %d fetching device status\n", ret);
+ return;
+ }
+
+ dbg("Line state %02x", buf[OFFSET_7]);
+
+ switch (buf[OFFSET_7]) {
+ case 0:
+ if (instance->u.atm_dev->signal != ATM_PHY_SIG_LOST) {
+ instance->u.atm_dev->signal = ATM_PHY_SIG_LOST;
+ printk(KERN_NOTICE "ADSL line is down\n");
+ }
+ break;
+
+ case 0x08:
+ if (instance->u.atm_dev->signal != ATM_PHY_SIG_UNKNOWN) {
+ instance->u.atm_dev->signal = ATM_PHY_SIG_UNKNOWN;
+ printk(KERN_NOTICE "ADSL line is blocked?\n");
+ }
+ break;
+
+ case 0x10:
+ if (instance->u.atm_dev->signal != ATM_PHY_SIG_LOST) {
+ instance->u.atm_dev->signal = ATM_PHY_SIG_LOST;
+ printk(KERN_NOTICE "ADSL line is synchronising\n");
+ }
+ break;
+
+ case 0x20:
+ if (instance->u.atm_dev->signal != ATM_PHY_SIG_FOUND) {
+ int down_speed = buf[OFFSET_b] | (buf[OFFSET_b + 1] << 8)
+ | (buf[OFFSET_b + 2] << 16) | (buf[OFFSET_b + 3] << 24);
+ int up_speed = buf[OFFSET_b + 4] | (buf[OFFSET_b + 5] << 8)
+ | (buf[OFFSET_b + 6] << 16) | (buf[OFFSET_b + 7] << 24);
+
+ if (!(down_speed & 0x0000ffff) &&
+ !(up_speed & 0x0000ffff)) {
+ down_speed >>= 16;
+ up_speed >>= 16;
+ }
+ instance->u.atm_dev->link_rate = down_speed * 1000 / 424;
+ instance->u.atm_dev->signal = ATM_PHY_SIG_FOUND;
+
+ printk(KERN_NOTICE
+ "ADSL line is up (%d Kib/s down | %d Kib/s up)\n",
+ down_speed, up_speed);
+ }
+ break;
+
+ default:
+ if (instance->u.atm_dev->signal != ATM_PHY_SIG_UNKNOWN) {
+ instance->u.atm_dev->signal = ATM_PHY_SIG_UNKNOWN;
+ printk(KERN_NOTICE "Unknown line state %02x\n", buf[OFFSET_7]);
+ }
+ break;
+ }
+}
+
+static void speedtch_timer_poll(unsigned long data)
+{
+ struct speedtch_instance_data *instance = (void *)data;
+
+ schedule_work(&instance->poll_work);
+ mod_timer(&instance->poll_timer, jiffies + (5 * HZ));
+}
+
+#ifdef USE_FW_LOADER
+static void speedtch_upload_firmware(struct speedtch_instance_data *instance,
+ const struct firmware *fw1,
+ const struct firmware *fw2)
+{
+ unsigned char *buffer;
+ struct usb_device *usb_dev = instance->u.usb_dev;
+ struct usb_interface *intf;
+ int actual_length, ret;
+ int offset;
+
+ dbg("speedtch_upload_firmware");
+
+ if (!(intf = usb_ifnum_to_if(usb_dev, 2))) {
+ dbg("speedtch_upload_firmware: interface not found!");
+ goto fail;
+ }
+
+ if (!(buffer = (unsigned char *)__get_free_page(GFP_KERNEL))) {
+ dbg("speedtch_upload_firmware: no memory for buffer!");
+ goto fail;
+ }
+
+ /* A user-space firmware loader may already have claimed interface #2 */
+ if ((ret =
+ usb_driver_claim_interface(&speedtch_usb_driver, intf, NULL)) < 0) {
+ dbg("speedtch_upload_firmware: interface in use (%d)!", ret);
+ goto fail_free;
+ }
+
+ /* URB 7 */
+ if (dl_512_first) { /* some modems need a read before writing the firmware */
+ ret = usb_bulk_msg(usb_dev, usb_rcvbulkpipe(usb_dev, SPEEDTCH_ENDPOINT_FIRMWARE),
+ buffer, 0x200, &actual_length, 2000);
+
+ if (ret < 0 && ret != -ETIMEDOUT)
+ dbg("speedtch_upload_firmware: read BLOCK0 from modem failed (%d)!", ret);
+ else
+ dbg("speedtch_upload_firmware: BLOCK0 downloaded (%d bytes)", ret);
+ }
+
+ /* URB 8 : both leds are static green */
+ for (offset = 0; offset < fw1->size; offset += PAGE_SIZE) {
+ int thislen = min_t(int, PAGE_SIZE, fw1->size - offset);
+ memcpy(buffer, fw1->data + offset, thislen);
+
+ ret = usb_bulk_msg(usb_dev, usb_sndbulkpipe(usb_dev, SPEEDTCH_ENDPOINT_FIRMWARE),
+ buffer, thislen, &actual_length, DATA_TIMEOUT);
+
+ if (ret < 0) {
+ dbg("speedtch_upload_firmware: write BLOCK1 to modem failed (%d)!", ret);
+ goto fail_release;
+ }
+ dbg("speedtch_upload_firmware: BLOCK1 uploaded (%zu bytes)", fw1->size);
+ }
+
+ /* USB led blinking green, ADSL led off */
+
+ /* URB 11 */
+ ret = usb_bulk_msg(usb_dev, usb_rcvbulkpipe(usb_dev, SPEEDTCH_ENDPOINT_FIRMWARE),
+ buffer, 0x200, &actual_length, DATA_TIMEOUT);
+
+ if (ret < 0) {
+ dbg("speedtch_upload_firmware: read BLOCK2 from modem failed (%d)!", ret);
+ goto fail_release;
+ }
+ dbg("speedtch_upload_firmware: BLOCK2 downloaded (%d bytes)", actual_length);
+
+ /* URBs 12 to 139 - USB led blinking green, ADSL led off */
+ for (offset = 0; offset < fw2->size; offset += PAGE_SIZE) {
+ int thislen = min_t(int, PAGE_SIZE, fw2->size - offset);
+ memcpy(buffer, fw2->data + offset, thislen);
+
+ ret = usb_bulk_msg(usb_dev, usb_sndbulkpipe(usb_dev, SPEEDTCH_ENDPOINT_FIRMWARE),
+ buffer, thislen, &actual_length, DATA_TIMEOUT);
+
+ if (ret < 0) {
+ dbg("speedtch_upload_firmware: write BLOCK3 to modem failed (%d)!", ret);
+ goto fail_release;
+ }
+ }
+ dbg("speedtch_upload_firmware: BLOCK3 uploaded (%zu bytes)", fw2->size);
+
+ /* USB led static green, ADSL led static red */
+
+ /* URB 142 */
+ ret = usb_bulk_msg(usb_dev, usb_rcvbulkpipe(usb_dev, SPEEDTCH_ENDPOINT_FIRMWARE),
+ buffer, 0x200, &actual_length, DATA_TIMEOUT);
+
+ if (ret < 0) {
+ dbg("speedtch_upload_firmware: read BLOCK4 from modem failed (%d)!", ret);
+ goto fail_release;
+ }
+
+ /* success */
+ dbg("speedtch_upload_firmware: BLOCK4 downloaded (%d bytes)", actual_length);
+
+ /* Delay to allow firmware to start up. We can do this here
+ because we're in our own kernel thread anyway. */
+ msleep(1000);
+
+ /* Enable software buffering, if requested */
+ if (sw_buffering)
+ speedtch_set_swbuff(instance, 1);
+
+ /* Magic spell; don't ask us what this does */
+ speedtch_test_sequence(instance);
+
+ /* Start modem synchronisation */
+ if (speedtch_start_synchro(instance))
+ dbg("speedtch_start_synchro: failed");
+
+ speedtch_got_firmware(instance, 1);
+
+ free_page((unsigned long)buffer);
+ return;
+
+ fail_release:
+ /* Only release interface #2 if uploading failed; we don't release it
+ we succeeded. This prevents the userspace tools from trying to load
+ the firmware themselves */
+ usb_driver_release_interface(&speedtch_usb_driver, intf);
+ fail_free:
+ free_page((unsigned long)buffer);
+ fail:
+ speedtch_got_firmware(instance, 0);
+}
+
+static int speedtch_find_firmware(struct speedtch_instance_data
+ *instance, int phase,
+ const struct firmware **fw_p)
+{
+ char buf[24];
+ const u16 bcdDevice = le16_to_cpu(instance->u.usb_dev->descriptor.bcdDevice);
+ const u8 major_revision = bcdDevice >> 8;
+ const u8 minor_revision = bcdDevice & 0xff;
+
+ sprintf(buf, "speedtch-%d.bin.%x.%02x", phase, major_revision, minor_revision);
+ dbg("speedtch_find_firmware: looking for %s", buf);
+
+ if (request_firmware(fw_p, buf, &instance->u.usb_dev->dev)) {
+ sprintf(buf, "speedtch-%d.bin.%x", phase, major_revision);
+ dbg("speedtch_find_firmware: looking for %s", buf);
+
+ if (request_firmware(fw_p, buf, &instance->u.usb_dev->dev)) {
+ sprintf(buf, "speedtch-%d.bin", phase);
+ dbg("speedtch_find_firmware: looking for %s", buf);
+
+ if (request_firmware(fw_p, buf, &instance->u.usb_dev->dev)) {
+ dev_warn(&instance->u.usb_dev->dev, "no stage %d firmware found!", phase);
+ return -ENOENT;
+ }
+ }
+ }
+
+ dev_info(&instance->u.usb_dev->dev, "found stage %d firmware %s\n", phase, buf);
+
+ return 0;
+}
+
+static int speedtch_load_firmware(void *arg)
+{
+ const struct firmware *fw1, *fw2;
+ struct speedtch_instance_data *instance = arg;
+
+ BUG_ON(!instance);
+
+ daemonize("firmware/speedtch");
+
+ if (!speedtch_find_firmware(instance, 1, &fw1)) {
+ if (!speedtch_find_firmware(instance, 2, &fw2)) {
+ speedtch_upload_firmware(instance, fw1, fw2);
+ release_firmware(fw2);
+ }
+ release_firmware(fw1);
+ }
+
+ /* In case we failed, set state back to NO_FIRMWARE so that
+ another later attempt may work. Otherwise, we never actually
+ manage to recover if, for example, the firmware is on /usr and
+ we look for it too early. */
+ speedtch_got_firmware(instance, 0);
+
+ module_put(THIS_MODULE);
+ udsl_put_instance(&instance->u);
+ return 0;
+}
+#endif /* USE_FW_LOADER */
+
+static void speedtch_firmware_start(struct speedtch_instance_data *instance)
+{
+#ifdef USE_FW_LOADER
+ int ret;
+#endif
+
+ dbg("speedtch_firmware_start");
+
+ down(&instance->u.serialize); /* vs self, speedtch_got_firmware */
+
+ if (instance->u.status >= UDSL_LOADING_FIRMWARE) {
+ up(&instance->u.serialize);
+ return;
+ }
+
+ instance->u.status = UDSL_LOADING_FIRMWARE;
+ up(&instance->u.serialize);
+
+#ifdef USE_FW_LOADER
+ udsl_get_instance(&instance->u);
+ try_module_get(THIS_MODULE);
+
+ ret = kernel_thread(speedtch_load_firmware, instance,
+ CLONE_FS | CLONE_FILES);
+
+ if (ret >= 0)
+ return; /* OK */
+
+ dbg("speedtch_firmware_start: kernel_thread failed (%d)!", ret);
+
+ module_put(THIS_MODULE);
+ udsl_put_instance(&instance->u);
+ /* Just pretend it never happened... hope modem_run happens */
+#endif /* USE_FW_LOADER */
+
+ speedtch_got_firmware(instance, 0);
+}
+
+static int speedtch_firmware_wait(struct udsl_instance_data *instance)
+{
+ speedtch_firmware_start((void *)instance);
+
+ if (wait_event_interruptible(instance->firmware_waiters, instance->status != UDSL_LOADING_FIRMWARE) < 0)
+ return -ERESTARTSYS;
+
+ return (instance->status == UDSL_LOADED_FIRMWARE) ? 0 : -EAGAIN;
+}
+
+/**********
+** USB **
+**********/
+
+static int speedtch_usb_ioctl(struct usb_interface *intf, unsigned int code,
+ void *user_data)
+{
+ struct speedtch_instance_data *instance = usb_get_intfdata(intf);
+
+ dbg("speedtch_usb_ioctl entered");
+
+ if (!instance) {
+ dbg("speedtch_usb_ioctl: NULL instance!");
+ return -ENODEV;
+ }
+
+ switch (code) {
+ case UDSL_IOCTL_LINE_UP:
+ instance->u.atm_dev->signal = ATM_PHY_SIG_FOUND;
+ speedtch_got_firmware(instance, 1);
+ return (instance->u.status == UDSL_LOADED_FIRMWARE) ? 0 : -EIO;
+ case UDSL_IOCTL_LINE_DOWN:
+ instance->u.atm_dev->signal = ATM_PHY_SIG_LOST;
+ return 0;
+ default:
+ return -ENOTTY;
+ }
+}
+
+static int speedtch_usb_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ int ifnum = intf->altsetting->desc.bInterfaceNumber;
+ struct speedtch_instance_data *instance;
+ unsigned char mac_str[13];
+ int ret, i;
+ char buf7[SIZE_7];
+
+ dbg("speedtch_usb_probe: trying device with vendor=0x%x, product=0x%x, ifnum %d",
+ le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(dev->descriptor.idProduct), ifnum);
+
+ if ((dev->descriptor.bDeviceClass != USB_CLASS_VENDOR_SPEC) ||
+ (ifnum != 1))
+ return -ENODEV;
+
+ dbg("speedtch_usb_probe: device accepted");
+
+ /* instance init */
+ instance = kmalloc(sizeof(*instance), GFP_KERNEL);
+ if (!instance) {
+ dbg("speedtch_usb_probe: no memory for instance data!");
+ return -ENOMEM;
+ }
+
+ memset(instance, 0, sizeof(struct speedtch_instance_data));
+
+ if ((ret = usb_set_interface(dev, 0, 0)) < 0)
+ goto fail;
+
+ if ((ret = usb_set_interface(dev, 2, 0)) < 0)
+ goto fail;
+
+ instance->u.data_endpoint = SPEEDTCH_ENDPOINT_DATA;
+ instance->u.firmware_wait = speedtch_firmware_wait;
+ instance->u.driver_name = speedtch_driver_name;
+
+ ret = udsl_instance_setup(dev, &instance->u);
+ if (ret)
+ goto fail;
+
+ init_timer(&instance->poll_timer);
+ instance->poll_timer.function = speedtch_timer_poll;
+ instance->poll_timer.data = (unsigned long)instance;
+
+ INIT_WORK(&instance->poll_work, (void *)speedtch_poll_status, instance);
+
+ /* set MAC address, it is stored in the serial number */
+ memset(instance->u.atm_dev->esi, 0, sizeof(instance->u.atm_dev->esi));
+ if (usb_string(dev, dev->descriptor.iSerialNumber, mac_str, sizeof(mac_str)) == 12) {
+ for (i = 0; i < 6; i++)
+ instance->u.atm_dev->esi[i] =
+ (hex2int(mac_str[i * 2]) * 16) + (hex2int(mac_str[i * 2 + 1]));
+ }
+
+ /* First check whether the modem already seems to be alive */
+ ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ 0x12, 0xc0, 0x07, 0x00, buf7, SIZE_7, 500);
+
+ if (ret == SIZE_7) {
+ dbg("firmware appears to be already loaded");
+ speedtch_got_firmware(instance, 1);
+ speedtch_poll_status(instance);
+ } else {
+ speedtch_firmware_start(instance);
+ }
+
+ usb_set_intfdata(intf, instance);
+
+ return 0;
+
+ fail:
+ kfree(instance);
+
+ return -ENOMEM;
+}
+
+static void speedtch_usb_disconnect(struct usb_interface *intf)
+{
+ struct speedtch_instance_data *instance = usb_get_intfdata(intf);
+
+ dbg("speedtch_usb_disconnect entered");
+
+ if (!instance) {
+ dbg("speedtch_usb_disconnect: NULL instance!");
+ return;
+ }
+
+/*QQ need to handle disconnects on interface #2 while uploading firmware */
+/*QQ and what about interface #1? */
+
+ if (instance->int_urb) {
+ struct urb *int_urb = instance->int_urb;
+ instance->int_urb = NULL;
+ wmb();
+ usb_unlink_urb(int_urb);
+ usb_free_urb(int_urb);
+ }
+
+ instance->int_data[0] = 1;
+ del_timer_sync(&instance->poll_timer);
+ wmb();
+ flush_scheduled_work();
+
+ udsl_instance_disconnect(&instance->u);
+
+ /* clean up */
+ usb_set_intfdata(intf, NULL);
+ udsl_put_instance(&instance->u);
+}
+
+/***********
+** init **
+***********/
+
+static int __init speedtch_usb_init(void)
+{
+ dbg("speedtch_usb_init: driver version " DRIVER_VERSION);
+
+ return usb_register(&speedtch_usb_driver);
+}
+
+static void __exit speedtch_usb_cleanup(void)
+{
+ dbg("speedtch_usb_cleanup entered");
+
+ usb_deregister(&speedtch_usb_driver);
+}
+
+module_init(speedtch_usb_init);
+module_exit(speedtch_usb_cleanup);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRIVER_VERSION);
diff --git a/drivers/usb/atm/usb_atm.c b/drivers/usb/atm/usb_atm.c
new file mode 100644
index 000000000000..a4cd4476d49a
--- /dev/null
+++ b/drivers/usb/atm/usb_atm.c
@@ -0,0 +1,1188 @@
+/******************************************************************************
+ * usb_atm.c - Generic USB xDSL driver core
+ *
+ * Copyright (C) 2001, Alcatel
+ * Copyright (C) 2003, Duncan Sands, SolNegro, Josep Comas
+ * Copyright (C) 2004, David Woodhouse
+ *
+ * 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.
+ *
+ ******************************************************************************/
+
+/*
+ * Written by Johan Verrept, maintained by Duncan Sands (duncan.sands@free.fr)
+ *
+ * 1.7+: - See the check-in logs
+ *
+ * 1.6: - No longer opens a connection if the firmware is not loaded
+ * - Added support for the speedtouch 330
+ * - Removed the limit on the number of devices
+ * - Module now autoloads on device plugin
+ * - Merged relevant parts of sarlib
+ * - Replaced the kernel thread with a tasklet
+ * - New packet transmission code
+ * - Changed proc file contents
+ * - Fixed all known SMP races
+ * - Many fixes and cleanups
+ * - Various fixes by Oliver Neukum (oliver@neukum.name)
+ *
+ * 1.5A: - Version for inclusion in 2.5 series kernel
+ * - Modifications by Richard Purdie (rpurdie@rpsys.net)
+ * - made compatible with kernel 2.5.6 onwards by changing
+ * udsl_usb_send_data_context->urb to a pointer and adding code
+ * to alloc and free it
+ * - remove_wait_queue() added to udsl_atm_processqueue_thread()
+ *
+ * 1.5: - fixed memory leak when atmsar_decode_aal5 returned NULL.
+ * (reported by stephen.robinson@zen.co.uk)
+ *
+ * 1.4: - changed the spin_lock() under interrupt to spin_lock_irqsave()
+ * - unlink all active send urbs of a vcc that is being closed.
+ *
+ * 1.3.1: - added the version number
+ *
+ * 1.3: - Added multiple send urb support
+ * - fixed memory leak and vcc->tx_inuse starvation bug
+ * when not enough memory left in vcc.
+ *
+ * 1.2: - Fixed race condition in udsl_usb_send_data()
+ * 1.1: - Turned off packet debugging
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/timer.h>
+#include <linux/errno.h>
+#include <linux/proc_fs.h>
+#include <linux/slab.h>
+#include <linux/wait.h>
+#include <linux/list.h>
+#include <asm/uaccess.h>
+#include <linux/smp_lock.h>
+#include <linux/interrupt.h>
+#include <linux/atm.h>
+#include <linux/atmdev.h>
+#include <linux/crc32.h>
+#include <linux/init.h>
+#include <linux/firmware.h>
+
+#include "usb_atm.h"
+
+#ifdef VERBOSE_DEBUG
+static int udsl_print_packet(const unsigned char *data, int len);
+#define PACKETDEBUG(arg...) udsl_print_packet (arg)
+#define vdbg(arg...) dbg (arg)
+#else
+#define PACKETDEBUG(arg...)
+#define vdbg(arg...)
+#endif
+
+#define DRIVER_AUTHOR "Johan Verrept, Duncan Sands <duncan.sands@free.fr>"
+#define DRIVER_VERSION "1.8"
+#define DRIVER_DESC "Generic USB ATM/DSL I/O, version " DRIVER_VERSION
+
+static unsigned int num_rcv_urbs = UDSL_DEFAULT_RCV_URBS;
+static unsigned int num_snd_urbs = UDSL_DEFAULT_SND_URBS;
+static unsigned int num_rcv_bufs = UDSL_DEFAULT_RCV_BUFS;
+static unsigned int num_snd_bufs = UDSL_DEFAULT_SND_BUFS;
+static unsigned int rcv_buf_size = UDSL_DEFAULT_RCV_BUF_SIZE;
+static unsigned int snd_buf_size = UDSL_DEFAULT_SND_BUF_SIZE;
+
+module_param(num_rcv_urbs, uint, 0444);
+MODULE_PARM_DESC(num_rcv_urbs,
+ "Number of urbs used for reception (range: 0-"
+ __MODULE_STRING(UDSL_MAX_RCV_URBS) ", default: "
+ __MODULE_STRING(UDSL_DEFAULT_RCV_URBS) ")");
+
+module_param(num_snd_urbs, uint, 0444);
+MODULE_PARM_DESC(num_snd_urbs,
+ "Number of urbs used for transmission (range: 0-"
+ __MODULE_STRING(UDSL_MAX_SND_URBS) ", default: "
+ __MODULE_STRING(UDSL_DEFAULT_SND_URBS) ")");
+
+module_param(num_rcv_bufs, uint, 0444);
+MODULE_PARM_DESC(num_rcv_bufs,
+ "Number of buffers used for reception (range: 0-"
+ __MODULE_STRING(UDSL_MAX_RCV_BUFS) ", default: "
+ __MODULE_STRING(UDSL_DEFAULT_RCV_BUFS) ")");
+
+module_param(num_snd_bufs, uint, 0444);
+MODULE_PARM_DESC(num_snd_bufs,
+ "Number of buffers used for transmission (range: 0-"
+ __MODULE_STRING(UDSL_MAX_SND_BUFS) ", default: "
+ __MODULE_STRING(UDSL_DEFAULT_SND_BUFS) ")");
+
+module_param(rcv_buf_size, uint, 0444);
+MODULE_PARM_DESC(rcv_buf_size,
+ "Size of the buffers used for reception (range: 0-"
+ __MODULE_STRING(UDSL_MAX_RCV_BUF_SIZE) ", default: "
+ __MODULE_STRING(UDSL_DEFAULT_RCV_BUF_SIZE) ")");
+
+module_param(snd_buf_size, uint, 0444);
+MODULE_PARM_DESC(snd_buf_size,
+ "Size of the buffers used for transmission (range: 0-"
+ __MODULE_STRING(UDSL_MAX_SND_BUF_SIZE) ", default: "
+ __MODULE_STRING(UDSL_DEFAULT_SND_BUF_SIZE) ")");
+
+/* ATM */
+
+static void udsl_atm_dev_close(struct atm_dev *dev);
+static int udsl_atm_open(struct atm_vcc *vcc);
+static void udsl_atm_close(struct atm_vcc *vcc);
+static int udsl_atm_ioctl(struct atm_dev *dev, unsigned int cmd, void __user * arg);
+static int udsl_atm_send(struct atm_vcc *vcc, struct sk_buff *skb);
+static int udsl_atm_proc_read(struct atm_dev *atm_dev, loff_t * pos, char *page);
+
+static struct atmdev_ops udsl_atm_devops = {
+ .dev_close = udsl_atm_dev_close,
+ .open = udsl_atm_open,
+ .close = udsl_atm_close,
+ .ioctl = udsl_atm_ioctl,
+ .send = udsl_atm_send,
+ .proc_read = udsl_atm_proc_read,
+ .owner = THIS_MODULE,
+};
+
+/***********
+** misc **
+***********/
+
+static inline void udsl_pop(struct atm_vcc *vcc, struct sk_buff *skb)
+{
+ if (vcc->pop)
+ vcc->pop(vcc, skb);
+ else
+ dev_kfree_skb(skb);
+}
+
+/*************
+** decode **
+*************/
+
+static inline struct udsl_vcc_data *udsl_find_vcc(struct udsl_instance_data *instance,
+ short vpi, int vci)
+{
+ struct udsl_vcc_data *vcc;
+
+ list_for_each_entry(vcc, &instance->vcc_list, list)
+ if ((vcc->vci == vci) && (vcc->vpi == vpi))
+ return vcc;
+ return NULL;
+}
+
+static void udsl_extract_cells(struct udsl_instance_data *instance,
+ unsigned char *source, unsigned int howmany)
+{
+ struct udsl_vcc_data *cached_vcc = NULL;
+ struct atm_vcc *vcc;
+ struct sk_buff *sarb;
+ struct udsl_vcc_data *vcc_data;
+ int cached_vci = 0;
+ unsigned int i;
+ int pti;
+ int vci;
+ short cached_vpi = 0;
+ short vpi;
+
+ for (i = 0; i < howmany;
+ i++, source += ATM_CELL_SIZE + instance->rcv_padding) {
+ vpi = ((source[0] & 0x0f) << 4) | (source[1] >> 4);
+ vci = ((source[1] & 0x0f) << 12) | (source[2] << 4) | (source[3] >> 4);
+ pti = (source[3] & 0x2) != 0;
+
+ vdbg("udsl_extract_cells: vpi %hd, vci %d, pti %d", vpi, vci, pti);
+
+ if (cached_vcc && (vci == cached_vci) && (vpi == cached_vpi))
+ vcc_data = cached_vcc;
+ else if ((vcc_data = udsl_find_vcc(instance, vpi, vci))) {
+ cached_vcc = vcc_data;
+ cached_vpi = vpi;
+ cached_vci = vci;
+ } else {
+ dbg("udsl_extract_cells: unknown vpi/vci (%hd/%d)!", vpi, vci);
+ continue;
+ }
+
+ vcc = vcc_data->vcc;
+ sarb = vcc_data->sarb;
+
+ if (sarb->tail + ATM_CELL_PAYLOAD > sarb->end) {
+ dbg("udsl_extract_cells: buffer overrun (sarb->len %u, vcc: 0x%p)!", sarb->len, vcc);
+ /* discard cells already received */
+ skb_trim(sarb, 0);
+ }
+
+ memcpy(sarb->tail, source + ATM_CELL_HEADER, ATM_CELL_PAYLOAD);
+ __skb_put(sarb, ATM_CELL_PAYLOAD);
+
+ if (pti) {
+ struct sk_buff *skb;
+ unsigned int length;
+ unsigned int pdu_length;
+
+ length = (source[ATM_CELL_SIZE - 6] << 8) + source[ATM_CELL_SIZE - 5];
+
+ /* guard against overflow */
+ if (length > ATM_MAX_AAL5_PDU) {
+ dbg("udsl_extract_cells: bogus length %u (vcc: 0x%p)!", length, vcc);
+ atomic_inc(&vcc->stats->rx_err);
+ goto out;
+ }
+
+ pdu_length = UDSL_NUM_CELLS(length) * ATM_CELL_PAYLOAD;
+
+ if (sarb->len < pdu_length) {
+ dbg("udsl_extract_cells: bogus pdu_length %u (sarb->len: %u, vcc: 0x%p)!", pdu_length, sarb->len, vcc);
+ atomic_inc(&vcc->stats->rx_err);
+ goto out;
+ }
+
+ if (crc32_be(~0, sarb->tail - pdu_length, pdu_length) != 0xc704dd7b) {
+ dbg("udsl_extract_cells: packet failed crc check (vcc: 0x%p)!", vcc);
+ atomic_inc(&vcc->stats->rx_err);
+ goto out;
+ }
+
+ vdbg("udsl_extract_cells: got packet (length: %u, pdu_length: %u, vcc: 0x%p)", length, pdu_length, vcc);
+
+ if (!(skb = dev_alloc_skb(length))) {
+ dbg("udsl_extract_cells: no memory for skb (length: %u)!", length);
+ atomic_inc(&vcc->stats->rx_drop);
+ goto out;
+ }
+
+ vdbg("udsl_extract_cells: allocated new sk_buff (skb: 0x%p, skb->truesize: %u)", skb, skb->truesize);
+
+ if (!atm_charge(vcc, skb->truesize)) {
+ dbg("udsl_extract_cells: failed atm_charge (skb->truesize: %u)!", skb->truesize);
+ dev_kfree_skb(skb);
+ goto out; /* atm_charge increments rx_drop */
+ }
+
+ memcpy(skb->data, sarb->tail - pdu_length, length);
+ __skb_put(skb, length);
+
+ vdbg("udsl_extract_cells: sending skb 0x%p, skb->len %u, skb->truesize %u", skb, skb->len, skb->truesize);
+
+ PACKETDEBUG(skb->data, skb->len);
+
+ vcc->push(vcc, skb);
+
+ atomic_inc(&vcc->stats->rx);
+ out:
+ skb_trim(sarb, 0);
+ }
+ }
+}
+
+/*************
+** encode **
+*************/
+
+static inline void udsl_fill_cell_header(unsigned char *target, struct atm_vcc *vcc)
+{
+ target[0] = vcc->vpi >> 4;
+ target[1] = (vcc->vpi << 4) | (vcc->vci >> 12);
+ target[2] = vcc->vci >> 4;
+ target[3] = vcc->vci << 4;
+ target[4] = 0xec;
+}
+
+static const unsigned char zeros[ATM_CELL_PAYLOAD];
+
+static void udsl_groom_skb(struct atm_vcc *vcc, struct sk_buff *skb)
+{
+ struct udsl_control *ctrl = UDSL_SKB(skb);
+ unsigned int zero_padding;
+ u32 crc;
+
+ ctrl->atm_data.vcc = vcc;
+
+ ctrl->num_cells = UDSL_NUM_CELLS(skb->len);
+ ctrl->num_entire = skb->len / ATM_CELL_PAYLOAD;
+
+ zero_padding = ctrl->num_cells * ATM_CELL_PAYLOAD - skb->len - ATM_AAL5_TRAILER;
+
+ if (ctrl->num_entire + 1 < ctrl->num_cells)
+ ctrl->pdu_padding = zero_padding - (ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER);
+ else
+ ctrl->pdu_padding = zero_padding;
+
+ ctrl->aal5_trailer[0] = 0; /* UU = 0 */
+ ctrl->aal5_trailer[1] = 0; /* CPI = 0 */
+ ctrl->aal5_trailer[2] = skb->len >> 8;
+ ctrl->aal5_trailer[3] = skb->len;
+
+ crc = crc32_be(~0, skb->data, skb->len);
+ crc = crc32_be(crc, zeros, zero_padding);
+ crc = crc32_be(crc, ctrl->aal5_trailer, 4);
+ crc = ~crc;
+
+ ctrl->aal5_trailer[4] = crc >> 24;
+ ctrl->aal5_trailer[5] = crc >> 16;
+ ctrl->aal5_trailer[6] = crc >> 8;
+ ctrl->aal5_trailer[7] = crc;
+}
+
+static unsigned int udsl_write_cells(struct udsl_instance_data *instance,
+ unsigned int howmany, struct sk_buff *skb,
+ unsigned char **target_p)
+{
+ struct udsl_control *ctrl = UDSL_SKB(skb);
+ unsigned char *target = *target_p;
+ unsigned int nc, ne, i;
+
+ vdbg("udsl_write_cells: howmany=%u, skb->len=%d, num_cells=%u, num_entire=%u, pdu_padding=%u", howmany, skb->len, ctrl->num_cells, ctrl->num_entire, ctrl->pdu_padding);
+
+ nc = ctrl->num_cells;
+ ne = min(howmany, ctrl->num_entire);
+
+ for (i = 0; i < ne; i++) {
+ udsl_fill_cell_header(target, ctrl->atm_data.vcc);
+ target += ATM_CELL_HEADER;
+ memcpy(target, skb->data, ATM_CELL_PAYLOAD);
+ target += ATM_CELL_PAYLOAD;
+ if (instance->snd_padding) {
+ memset(target, 0, instance->snd_padding);
+ target += instance->snd_padding;
+ }
+ __skb_pull(skb, ATM_CELL_PAYLOAD);
+ }
+
+ ctrl->num_entire -= ne;
+
+ if (!(ctrl->num_cells -= ne) || !(howmany -= ne))
+ goto out;
+
+ udsl_fill_cell_header(target, ctrl->atm_data.vcc);
+ target += ATM_CELL_HEADER;
+ memcpy(target, skb->data, skb->len);
+ target += skb->len;
+ __skb_pull(skb, skb->len);
+ memset(target, 0, ctrl->pdu_padding);
+ target += ctrl->pdu_padding;
+
+ if (--ctrl->num_cells) {
+ if (!--howmany) {
+ ctrl->pdu_padding = ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER;
+ goto out;
+ }
+
+ if (instance->snd_padding) {
+ memset(target, 0, instance->snd_padding);
+ target += instance->snd_padding;
+ }
+ udsl_fill_cell_header(target, ctrl->atm_data.vcc);
+ target += ATM_CELL_HEADER;
+ memset(target, 0, ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER);
+ target += ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER;
+
+ --ctrl->num_cells;
+ UDSL_ASSERT(!ctrl->num_cells);
+ }
+
+ memcpy(target, ctrl->aal5_trailer, ATM_AAL5_TRAILER);
+ target += ATM_AAL5_TRAILER;
+ /* set pti bit in last cell */
+ *(target + 3 - ATM_CELL_SIZE) |= 0x2;
+ if (instance->snd_padding) {
+ memset(target, 0, instance->snd_padding);
+ target += instance->snd_padding;
+ }
+ out:
+ *target_p = target;
+ return nc - ctrl->num_cells;
+}
+
+/**************
+** receive **
+**************/
+
+static void udsl_complete_receive(struct urb *urb, struct pt_regs *regs)
+{
+ struct udsl_receive_buffer *buf;
+ struct udsl_instance_data *instance;
+ struct udsl_receiver *rcv;
+ unsigned long flags;
+
+ if (!urb || !(rcv = urb->context)) {
+ dbg("udsl_complete_receive: bad urb!");
+ return;
+ }
+
+ instance = rcv->instance;
+ buf = rcv->buffer;
+
+ buf->filled_cells = urb->actual_length / (ATM_CELL_SIZE + instance->rcv_padding);
+
+ vdbg("udsl_complete_receive: urb 0x%p, status %d, actual_length %d, filled_cells %u, rcv 0x%p, buf 0x%p", urb, urb->status, urb->actual_length, buf->filled_cells, rcv, buf);
+
+ UDSL_ASSERT(buf->filled_cells <= rcv_buf_size);
+
+ /* may not be in_interrupt() */
+ spin_lock_irqsave(&instance->receive_lock, flags);
+ list_add(&rcv->list, &instance->spare_receivers);
+ list_add_tail(&buf->list, &instance->filled_receive_buffers);
+ if (likely(!urb->status))
+ tasklet_schedule(&instance->receive_tasklet);
+ spin_unlock_irqrestore(&instance->receive_lock, flags);
+}
+
+static void udsl_process_receive(unsigned long data)
+{
+ struct udsl_receive_buffer *buf;
+ struct udsl_instance_data *instance = (struct udsl_instance_data *)data;
+ struct udsl_receiver *rcv;
+ int err;
+
+ made_progress:
+ while (!list_empty(&instance->spare_receive_buffers)) {
+ spin_lock_irq(&instance->receive_lock);
+ if (list_empty(&instance->spare_receivers)) {
+ spin_unlock_irq(&instance->receive_lock);
+ break;
+ }
+ rcv = list_entry(instance->spare_receivers.next,
+ struct udsl_receiver, list);
+ list_del(&rcv->list);
+ spin_unlock_irq(&instance->receive_lock);
+
+ buf = list_entry(instance->spare_receive_buffers.next,
+ struct udsl_receive_buffer, list);
+ list_del(&buf->list);
+
+ rcv->buffer = buf;
+
+ usb_fill_bulk_urb(rcv->urb, instance->usb_dev,
+ usb_rcvbulkpipe(instance->usb_dev, instance->data_endpoint),
+ buf->base,
+ rcv_buf_size * (ATM_CELL_SIZE + instance->rcv_padding),
+ udsl_complete_receive, rcv);
+
+ vdbg("udsl_process_receive: sending urb 0x%p, rcv 0x%p, buf 0x%p",
+ rcv->urb, rcv, buf);
+
+ if ((err = usb_submit_urb(rcv->urb, GFP_ATOMIC)) < 0) {
+ dbg("udsl_process_receive: urb submission failed (%d)!", err);
+ list_add(&buf->list, &instance->spare_receive_buffers);
+ spin_lock_irq(&instance->receive_lock);
+ list_add(&rcv->list, &instance->spare_receivers);
+ spin_unlock_irq(&instance->receive_lock);
+ break;
+ }
+ }
+
+ spin_lock_irq(&instance->receive_lock);
+ if (list_empty(&instance->filled_receive_buffers)) {
+ spin_unlock_irq(&instance->receive_lock);
+ return; /* done - no more buffers */
+ }
+ buf = list_entry(instance->filled_receive_buffers.next,
+ struct udsl_receive_buffer, list);
+ list_del(&buf->list);
+ spin_unlock_irq(&instance->receive_lock);
+
+ vdbg("udsl_process_receive: processing buf 0x%p", buf);
+ udsl_extract_cells(instance, buf->base, buf->filled_cells);
+ list_add(&buf->list, &instance->spare_receive_buffers);
+ goto made_progress;
+}
+
+/***********
+** send **
+***********/
+
+static void udsl_complete_send(struct urb *urb, struct pt_regs *regs)
+{
+ struct udsl_instance_data *instance;
+ struct udsl_sender *snd;
+ unsigned long flags;
+
+ if (!urb || !(snd = urb->context) || !(instance = snd->instance)) {
+ dbg("udsl_complete_send: bad urb!");
+ return;
+ }
+
+ vdbg("udsl_complete_send: urb 0x%p, status %d, snd 0x%p, buf 0x%p", urb,
+ urb->status, snd, snd->buffer);
+
+ /* may not be in_interrupt() */
+ spin_lock_irqsave(&instance->send_lock, flags);
+ list_add(&snd->list, &instance->spare_senders);
+ list_add(&snd->buffer->list, &instance->spare_send_buffers);
+ tasklet_schedule(&instance->send_tasklet);
+ spin_unlock_irqrestore(&instance->send_lock, flags);
+}
+
+static void udsl_process_send(unsigned long data)
+{
+ struct udsl_send_buffer *buf;
+ struct udsl_instance_data *instance = (struct udsl_instance_data *)data;
+ struct sk_buff *skb;
+ struct udsl_sender *snd;
+ int err;
+ unsigned int num_written;
+
+ made_progress:
+ spin_lock_irq(&instance->send_lock);
+ while (!list_empty(&instance->spare_senders)) {
+ if (!list_empty(&instance->filled_send_buffers)) {
+ buf = list_entry(instance->filled_send_buffers.next,
+ struct udsl_send_buffer, list);
+ list_del(&buf->list);
+ } else if ((buf = instance->current_buffer)) {
+ instance->current_buffer = NULL;
+ } else /* all buffers empty */
+ break;
+
+ snd = list_entry(instance->spare_senders.next,
+ struct udsl_sender, list);
+ list_del(&snd->list);
+ spin_unlock_irq(&instance->send_lock);
+
+ snd->buffer = buf;
+ usb_fill_bulk_urb(snd->urb, instance->usb_dev,
+ usb_sndbulkpipe(instance->usb_dev, instance->data_endpoint),
+ buf->base,
+ (snd_buf_size - buf->free_cells) * (ATM_CELL_SIZE + instance->snd_padding),
+ udsl_complete_send, snd);
+
+ vdbg("udsl_process_send: submitting urb 0x%p (%d cells), snd 0x%p, buf 0x%p",
+ snd->urb, snd_buf_size - buf->free_cells, snd, buf);
+
+ if ((err = usb_submit_urb(snd->urb, GFP_ATOMIC)) < 0) {
+ dbg("udsl_process_send: urb submission failed (%d)!", err);
+ spin_lock_irq(&instance->send_lock);
+ list_add(&snd->list, &instance->spare_senders);
+ spin_unlock_irq(&instance->send_lock);
+ list_add(&buf->list, &instance->filled_send_buffers);
+ return; /* bail out */
+ }
+
+ spin_lock_irq(&instance->send_lock);
+ } /* while */
+ spin_unlock_irq(&instance->send_lock);
+
+ if (!instance->current_skb)
+ instance->current_skb = skb_dequeue(&instance->sndqueue);
+ if (!instance->current_skb)
+ return; /* done - no more skbs */
+
+ skb = instance->current_skb;
+
+ if (!(buf = instance->current_buffer)) {
+ spin_lock_irq(&instance->send_lock);
+ if (list_empty(&instance->spare_send_buffers)) {
+ instance->current_buffer = NULL;
+ spin_unlock_irq(&instance->send_lock);
+ return; /* done - no more buffers */
+ }
+ buf = list_entry(instance->spare_send_buffers.next,
+ struct udsl_send_buffer, list);
+ list_del(&buf->list);
+ spin_unlock_irq(&instance->send_lock);
+
+ buf->free_start = buf->base;
+ buf->free_cells = snd_buf_size;
+
+ instance->current_buffer = buf;
+ }
+
+ num_written = udsl_write_cells(instance, buf->free_cells, skb, &buf->free_start);
+
+ vdbg("udsl_process_send: wrote %u cells from skb 0x%p to buffer 0x%p",
+ num_written, skb, buf);
+
+ if (!(buf->free_cells -= num_written)) {
+ list_add_tail(&buf->list, &instance->filled_send_buffers);
+ instance->current_buffer = NULL;
+ }
+
+ vdbg("udsl_process_send: buffer contains %d cells, %d left",
+ snd_buf_size - buf->free_cells, buf->free_cells);
+
+ if (!UDSL_SKB(skb)->num_cells) {
+ struct atm_vcc *vcc = UDSL_SKB(skb)->atm_data.vcc;
+
+ udsl_pop(vcc, skb);
+ instance->current_skb = NULL;
+
+ atomic_inc(&vcc->stats->tx);
+ }
+
+ goto made_progress;
+}
+
+static void udsl_cancel_send(struct udsl_instance_data *instance,
+ struct atm_vcc *vcc)
+{
+ struct sk_buff *skb, *n;
+
+ dbg("udsl_cancel_send entered");
+ spin_lock_irq(&instance->sndqueue.lock);
+ for (skb = instance->sndqueue.next, n = skb->next;
+ skb != (struct sk_buff *)&instance->sndqueue;
+ skb = n, n = skb->next)
+ if (UDSL_SKB(skb)->atm_data.vcc == vcc) {
+ dbg("udsl_cancel_send: popping skb 0x%p", skb);
+ __skb_unlink(skb, &instance->sndqueue);
+ udsl_pop(vcc, skb);
+ }
+ spin_unlock_irq(&instance->sndqueue.lock);
+
+ tasklet_disable(&instance->send_tasklet);
+ if ((skb = instance->current_skb) && (UDSL_SKB(skb)->atm_data.vcc == vcc)) {
+ dbg("udsl_cancel_send: popping current skb (0x%p)", skb);
+ instance->current_skb = NULL;
+ udsl_pop(vcc, skb);
+ }
+ tasklet_enable(&instance->send_tasklet);
+ dbg("udsl_cancel_send done");
+}
+
+static int udsl_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
+{
+ struct udsl_instance_data *instance = vcc->dev->dev_data;
+ int err;
+
+ vdbg("udsl_atm_send called (skb 0x%p, len %u)", skb, skb->len);
+
+ if (!instance) {
+ dbg("udsl_atm_send: NULL data!");
+ err = -ENODEV;
+ goto fail;
+ }
+
+ if (vcc->qos.aal != ATM_AAL5) {
+ dbg("udsl_atm_send: unsupported ATM type %d!", vcc->qos.aal);
+ err = -EINVAL;
+ goto fail;
+ }
+
+ if (skb->len > ATM_MAX_AAL5_PDU) {
+ dbg("udsl_atm_send: packet too long (%d vs %d)!", skb->len,
+ ATM_MAX_AAL5_PDU);
+ err = -EINVAL;
+ goto fail;
+ }
+
+ PACKETDEBUG(skb->data, skb->len);
+
+ udsl_groom_skb(vcc, skb);
+ skb_queue_tail(&instance->sndqueue, skb);
+ tasklet_schedule(&instance->send_tasklet);
+
+ return 0;
+
+ fail:
+ udsl_pop(vcc, skb);
+ return err;
+}
+
+/********************
+** bean counting **
+********************/
+
+static void udsl_destroy_instance(struct kref *kref)
+{
+ struct udsl_instance_data *instance =
+ container_of(kref, struct udsl_instance_data, refcount);
+
+ tasklet_kill(&instance->receive_tasklet);
+ tasklet_kill(&instance->send_tasklet);
+ usb_put_dev(instance->usb_dev);
+ kfree(instance);
+}
+
+void udsl_get_instance(struct udsl_instance_data *instance)
+{
+ kref_get(&instance->refcount);
+}
+
+void udsl_put_instance(struct udsl_instance_data *instance)
+{
+ kref_put(&instance->refcount, udsl_destroy_instance);
+}
+
+/**********
+** ATM **
+**********/
+
+static void udsl_atm_dev_close(struct atm_dev *dev)
+{
+ struct udsl_instance_data *instance = dev->dev_data;
+
+ dev->dev_data = NULL;
+ udsl_put_instance(instance);
+}
+
+static int udsl_atm_proc_read(struct atm_dev *atm_dev, loff_t * pos, char *page)
+{
+ struct udsl_instance_data *instance = atm_dev->dev_data;
+ int left = *pos;
+
+ if (!instance) {
+ dbg("udsl_atm_proc_read: NULL instance!");
+ return -ENODEV;
+ }
+
+ if (!left--)
+ return sprintf(page, "%s\n", instance->description);
+
+ if (!left--)
+ return sprintf(page, "MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
+ atm_dev->esi[0], atm_dev->esi[1],
+ atm_dev->esi[2], atm_dev->esi[3],
+ atm_dev->esi[4], atm_dev->esi[5]);
+
+ if (!left--)
+ return sprintf(page,
+ "AAL5: tx %d ( %d err ), rx %d ( %d err, %d drop )\n",
+ atomic_read(&atm_dev->stats.aal5.tx),
+ atomic_read(&atm_dev->stats.aal5.tx_err),
+ atomic_read(&atm_dev->stats.aal5.rx),
+ atomic_read(&atm_dev->stats.aal5.rx_err),
+ atomic_read(&atm_dev->stats.aal5.rx_drop));
+
+ if (!left--) {
+ switch (atm_dev->signal) {
+ case ATM_PHY_SIG_FOUND:
+ sprintf(page, "Line up");
+ break;
+ case ATM_PHY_SIG_LOST:
+ sprintf(page, "Line down");
+ break;
+ default:
+ sprintf(page, "Line state unknown");
+ break;
+ }
+
+ if (instance->usb_dev->state == USB_STATE_NOTATTACHED)
+ strcat(page, ", disconnected\n");
+ else {
+ if (instance->status == UDSL_LOADED_FIRMWARE)
+ strcat(page, ", firmware loaded\n");
+ else if (instance->status == UDSL_LOADING_FIRMWARE)
+ strcat(page, ", firmware loading\n");
+ else
+ strcat(page, ", no firmware\n");
+ }
+
+ return strlen(page);
+ }
+
+ return 0;
+}
+
+static int udsl_atm_open(struct atm_vcc *vcc)
+{
+ struct udsl_instance_data *instance = vcc->dev->dev_data;
+ struct udsl_vcc_data *new;
+ unsigned int max_pdu;
+ int vci = vcc->vci;
+ short vpi = vcc->vpi;
+ int err;
+
+ dbg("udsl_atm_open: vpi %hd, vci %d", vpi, vci);
+
+ if (!instance) {
+ dbg("udsl_atm_open: NULL data!");
+ return -ENODEV;
+ }
+
+ /* only support AAL5 */
+ if ((vcc->qos.aal != ATM_AAL5) || (vcc->qos.rxtp.max_sdu < 0)
+ || (vcc->qos.rxtp.max_sdu > ATM_MAX_AAL5_PDU)) {
+ dbg("udsl_atm_open: unsupported ATM type %d!", vcc->qos.aal);
+ return -EINVAL;
+ }
+
+ if (instance->firmware_wait &&
+ (err = instance->firmware_wait(instance)) < 0) {
+ dbg("udsl_atm_open: firmware not loaded (%d)!", err);
+ return err;
+ }
+
+ down(&instance->serialize); /* vs self, udsl_atm_close */
+
+ if (udsl_find_vcc(instance, vpi, vci)) {
+ dbg("udsl_atm_open: %hd/%d already in use!", vpi, vci);
+ up(&instance->serialize);
+ return -EADDRINUSE;
+ }
+
+ if (!(new = kmalloc(sizeof(struct udsl_vcc_data), GFP_KERNEL))) {
+ dbg("udsl_atm_open: no memory for vcc_data!");
+ up(&instance->serialize);
+ return -ENOMEM;
+ }
+
+ memset(new, 0, sizeof(struct udsl_vcc_data));
+ new->vcc = vcc;
+ new->vpi = vpi;
+ new->vci = vci;
+
+ /* udsl_extract_cells requires at least one cell */
+ max_pdu = max(1, UDSL_NUM_CELLS(vcc->qos.rxtp.max_sdu)) * ATM_CELL_PAYLOAD;
+ if (!(new->sarb = alloc_skb(max_pdu, GFP_KERNEL))) {
+ dbg("udsl_atm_open: no memory for SAR buffer!");
+ kfree(new);
+ up(&instance->serialize);
+ return -ENOMEM;
+ }
+
+ vcc->dev_data = new;
+
+ tasklet_disable(&instance->receive_tasklet);
+ list_add(&new->list, &instance->vcc_list);
+ tasklet_enable(&instance->receive_tasklet);
+
+ set_bit(ATM_VF_ADDR, &vcc->flags);
+ set_bit(ATM_VF_PARTIAL, &vcc->flags);
+ set_bit(ATM_VF_READY, &vcc->flags);
+
+ up(&instance->serialize);
+
+ tasklet_schedule(&instance->receive_tasklet);
+
+ dbg("udsl_atm_open: allocated vcc data 0x%p (max_pdu: %u)", new, max_pdu);
+
+ return 0;
+}
+
+static void udsl_atm_close(struct atm_vcc *vcc)
+{
+ struct udsl_instance_data *instance = vcc->dev->dev_data;
+ struct udsl_vcc_data *vcc_data = vcc->dev_data;
+
+ dbg("udsl_atm_close called");
+
+ if (!instance || !vcc_data) {
+ dbg("udsl_atm_close: NULL data!");
+ return;
+ }
+
+ dbg("udsl_atm_close: deallocating vcc 0x%p with vpi %d vci %d",
+ vcc_data, vcc_data->vpi, vcc_data->vci);
+
+ udsl_cancel_send(instance, vcc);
+
+ down(&instance->serialize); /* vs self, udsl_atm_open */
+
+ tasklet_disable(&instance->receive_tasklet);
+ list_del(&vcc_data->list);
+ tasklet_enable(&instance->receive_tasklet);
+
+ kfree_skb(vcc_data->sarb);
+ vcc_data->sarb = NULL;
+
+ kfree(vcc_data);
+ vcc->dev_data = NULL;
+
+ vcc->vpi = ATM_VPI_UNSPEC;
+ vcc->vci = ATM_VCI_UNSPEC;
+ clear_bit(ATM_VF_READY, &vcc->flags);
+ clear_bit(ATM_VF_PARTIAL, &vcc->flags);
+ clear_bit(ATM_VF_ADDR, &vcc->flags);
+
+ up(&instance->serialize);
+
+ dbg("udsl_atm_close successful");
+}
+
+static int udsl_atm_ioctl(struct atm_dev *dev, unsigned int cmd,
+ void __user * arg)
+{
+ switch (cmd) {
+ case ATM_QUERYLOOP:
+ return put_user(ATM_LM_NONE, (int __user *)arg) ? -EFAULT : 0;
+ default:
+ return -ENOIOCTLCMD;
+ }
+}
+
+/**********
+** USB **
+**********/
+
+int udsl_instance_setup(struct usb_device *dev,
+ struct udsl_instance_data *instance)
+{
+ char *buf;
+ int i, length;
+
+ kref_init(&instance->refcount); /* one for USB */
+ udsl_get_instance(instance); /* one for ATM */
+
+ init_MUTEX(&instance->serialize);
+
+ instance->usb_dev = dev;
+
+ INIT_LIST_HEAD(&instance->vcc_list);
+
+ instance->status = UDSL_NO_FIRMWARE;
+ init_waitqueue_head(&instance->firmware_waiters);
+
+ spin_lock_init(&instance->receive_lock);
+ INIT_LIST_HEAD(&instance->spare_receivers);
+ INIT_LIST_HEAD(&instance->filled_receive_buffers);
+
+ tasklet_init(&instance->receive_tasklet, udsl_process_receive, (unsigned long)instance);
+ INIT_LIST_HEAD(&instance->spare_receive_buffers);
+
+ skb_queue_head_init(&instance->sndqueue);
+
+ spin_lock_init(&instance->send_lock);
+ INIT_LIST_HEAD(&instance->spare_senders);
+ INIT_LIST_HEAD(&instance->spare_send_buffers);
+
+ tasklet_init(&instance->send_tasklet, udsl_process_send,
+ (unsigned long)instance);
+ INIT_LIST_HEAD(&instance->filled_send_buffers);
+
+ /* receive init */
+ for (i = 0; i < num_rcv_urbs; i++) {
+ struct udsl_receiver *rcv = &(instance->receivers[i]);
+
+ if (!(rcv->urb = usb_alloc_urb(0, GFP_KERNEL))) {
+ dbg("udsl_usb_probe: no memory for receive urb %d!", i);
+ goto fail;
+ }
+
+ rcv->instance = instance;
+
+ list_add(&rcv->list, &instance->spare_receivers);
+ }
+
+ for (i = 0; i < num_rcv_bufs; i++) {
+ struct udsl_receive_buffer *buf =
+ &(instance->receive_buffers[i]);
+
+ buf->base = kmalloc(rcv_buf_size * (ATM_CELL_SIZE + instance->rcv_padding),
+ GFP_KERNEL);
+ if (!buf->base) {
+ dbg("udsl_usb_probe: no memory for receive buffer %d!", i);
+ goto fail;
+ }
+
+ list_add(&buf->list, &instance->spare_receive_buffers);
+ }
+
+ /* send init */
+ for (i = 0; i < num_snd_urbs; i++) {
+ struct udsl_sender *snd = &(instance->senders[i]);
+
+ if (!(snd->urb = usb_alloc_urb(0, GFP_KERNEL))) {
+ dbg("udsl_usb_probe: no memory for send urb %d!", i);
+ goto fail;
+ }
+
+ snd->instance = instance;
+
+ list_add(&snd->list, &instance->spare_senders);
+ }
+
+ for (i = 0; i < num_snd_bufs; i++) {
+ struct udsl_send_buffer *buf = &(instance->send_buffers[i]);
+
+ buf->base = kmalloc(snd_buf_size * (ATM_CELL_SIZE + instance->snd_padding),
+ GFP_KERNEL);
+ if (!buf->base) {
+ dbg("udsl_usb_probe: no memory for send buffer %d!", i);
+ goto fail;
+ }
+
+ list_add(&buf->list, &instance->spare_send_buffers);
+ }
+
+ /* ATM init */
+ instance->atm_dev = atm_dev_register(instance->driver_name,
+ &udsl_atm_devops, -1, NULL);
+ if (!instance->atm_dev) {
+ dbg("udsl_usb_probe: failed to register ATM device!");
+ goto fail;
+ }
+
+ instance->atm_dev->ci_range.vpi_bits = ATM_CI_MAX;
+ instance->atm_dev->ci_range.vci_bits = ATM_CI_MAX;
+ instance->atm_dev->signal = ATM_PHY_SIG_UNKNOWN;
+
+ /* temp init ATM device, set to 128kbit */
+ instance->atm_dev->link_rate = 128 * 1000 / 424;
+
+ /* device description */
+ buf = instance->description;
+ length = sizeof(instance->description);
+
+ if ((i = usb_string(dev, dev->descriptor.iProduct, buf, length)) < 0)
+ goto finish;
+
+ buf += i;
+ length -= i;
+
+ i = scnprintf(buf, length, " (");
+ buf += i;
+ length -= i;
+
+ if (length <= 0 || (i = usb_make_path(dev, buf, length)) < 0)
+ goto finish;
+
+ buf += i;
+ length -= i;
+
+ snprintf(buf, length, ")");
+
+ finish:
+ /* ready for ATM callbacks */
+ wmb();
+ instance->atm_dev->dev_data = instance;
+
+ usb_get_dev(dev);
+
+ return 0;
+
+ fail:
+ for (i = 0; i < num_snd_bufs; i++)
+ kfree(instance->send_buffers[i].base);
+
+ for (i = 0; i < num_snd_urbs; i++)
+ usb_free_urb(instance->senders[i].urb);
+
+ for (i = 0; i < num_rcv_bufs; i++)
+ kfree(instance->receive_buffers[i].base);
+
+ for (i = 0; i < num_rcv_urbs; i++)
+ usb_free_urb(instance->receivers[i].urb);
+
+ return -ENOMEM;
+}
+
+void udsl_instance_disconnect(struct udsl_instance_data *instance)
+{
+ int i;
+
+ dbg("udsl_instance_disconnect entered");
+
+ if (!instance) {
+ dbg("udsl_instance_disconnect: NULL instance!");
+ return;
+ }
+
+ /* receive finalize */
+ tasklet_disable(&instance->receive_tasklet);
+
+ for (i = 0; i < num_rcv_urbs; i++)
+ usb_kill_urb(instance->receivers[i].urb);
+
+ /* no need to take the spinlock */
+ INIT_LIST_HEAD(&instance->filled_receive_buffers);
+ INIT_LIST_HEAD(&instance->spare_receive_buffers);
+
+ tasklet_enable(&instance->receive_tasklet);
+
+ for (i = 0; i < num_rcv_urbs; i++)
+ usb_free_urb(instance->receivers[i].urb);
+
+ for (i = 0; i < num_rcv_bufs; i++)
+ kfree(instance->receive_buffers[i].base);
+
+ /* send finalize */
+ tasklet_disable(&instance->send_tasklet);
+
+ for (i = 0; i < num_snd_urbs; i++)
+ usb_kill_urb(instance->senders[i].urb);
+
+ /* no need to take the spinlock */
+ INIT_LIST_HEAD(&instance->spare_senders);
+ INIT_LIST_HEAD(&instance->spare_send_buffers);
+ instance->current_buffer = NULL;
+
+ tasklet_enable(&instance->send_tasklet);
+
+ for (i = 0; i < num_snd_urbs; i++)
+ usb_free_urb(instance->senders[i].urb);
+
+ for (i = 0; i < num_snd_bufs; i++)
+ kfree(instance->send_buffers[i].base);
+
+ /* ATM finalize */
+ shutdown_atm_dev(instance->atm_dev);
+}
+
+EXPORT_SYMBOL_GPL(udsl_get_instance);
+EXPORT_SYMBOL_GPL(udsl_put_instance);
+EXPORT_SYMBOL_GPL(udsl_instance_setup);
+EXPORT_SYMBOL_GPL(udsl_instance_disconnect);
+
+/***********
+** init **
+***********/
+
+static int __init udsl_usb_init(void)
+{
+ dbg("udsl_usb_init: driver version " DRIVER_VERSION);
+
+ if (sizeof(struct udsl_control) > sizeof(((struct sk_buff *) 0)->cb)) {
+ printk(KERN_ERR __FILE__ ": unusable with this kernel!\n");
+ return -EIO;
+ }
+
+ if ((num_rcv_urbs > UDSL_MAX_RCV_URBS)
+ || (num_snd_urbs > UDSL_MAX_SND_URBS)
+ || (num_rcv_bufs > UDSL_MAX_RCV_BUFS)
+ || (num_snd_bufs > UDSL_MAX_SND_BUFS)
+ || (rcv_buf_size > UDSL_MAX_RCV_BUF_SIZE)
+ || (snd_buf_size > UDSL_MAX_SND_BUF_SIZE))
+ return -EINVAL;
+
+ return 0;
+}
+
+static void __exit udsl_usb_exit(void)
+{
+}
+
+module_init(udsl_usb_init);
+module_exit(udsl_usb_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRIVER_VERSION);
+
+/************
+** debug **
+************/
+
+#ifdef VERBOSE_DEBUG
+static int udsl_print_packet(const unsigned char *data, int len)
+{
+ unsigned char buffer[256];
+ int i = 0, j = 0;
+
+ for (i = 0; i < len;) {
+ buffer[0] = '\0';
+ sprintf(buffer, "%.3d :", i);
+ for (j = 0; (j < 16) && (i < len); j++, i++) {
+ sprintf(buffer, "%s %2.2x", buffer, data[i]);
+ }
+ dbg("%s", buffer);
+ }
+ return i;
+}
+#endif
diff --git a/drivers/usb/atm/usb_atm.h b/drivers/usb/atm/usb_atm.h
new file mode 100644
index 000000000000..cf8c53283530
--- /dev/null
+++ b/drivers/usb/atm/usb_atm.h
@@ -0,0 +1,176 @@
+/******************************************************************************
+ * usb_atm.h - Generic USB xDSL driver core
+ *
+ * Copyright (C) 2001, Alcatel
+ * Copyright (C) 2003, Duncan Sands, SolNegro, Josep Comas
+ * Copyright (C) 2004, David Woodhouse
+ *
+ * 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 <linux/config.h>
+#include <linux/list.h>
+#include <linux/kref.h>
+#include <linux/atm.h>
+#include <linux/atmdev.h>
+#include <asm/semaphore.h>
+
+/*
+#define DEBUG
+#define VERBOSE_DEBUG
+*/
+
+#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
+# define DEBUG
+#endif
+
+#include <linux/usb.h>
+
+#ifdef DEBUG
+#define UDSL_ASSERT(x) BUG_ON(!(x))
+#else
+#define UDSL_ASSERT(x) do { if (!(x)) warn("failed assertion '" #x "' at line %d", __LINE__); } while(0)
+#endif
+
+#define UDSL_MAX_RCV_URBS 4
+#define UDSL_MAX_SND_URBS 4
+#define UDSL_MAX_RCV_BUFS 8
+#define UDSL_MAX_SND_BUFS 8
+#define UDSL_MAX_RCV_BUF_SIZE 1024 /* ATM cells */
+#define UDSL_MAX_SND_BUF_SIZE 1024 /* ATM cells */
+#define UDSL_DEFAULT_RCV_URBS 2
+#define UDSL_DEFAULT_SND_URBS 2
+#define UDSL_DEFAULT_RCV_BUFS 4
+#define UDSL_DEFAULT_SND_BUFS 4
+#define UDSL_DEFAULT_RCV_BUF_SIZE 64 /* ATM cells */
+#define UDSL_DEFAULT_SND_BUF_SIZE 64 /* ATM cells */
+
+#define ATM_CELL_HEADER (ATM_CELL_SIZE - ATM_CELL_PAYLOAD)
+#define UDSL_NUM_CELLS(x) (((x) + ATM_AAL5_TRAILER + ATM_CELL_PAYLOAD - 1) / ATM_CELL_PAYLOAD)
+
+/* receive */
+
+struct udsl_receive_buffer {
+ struct list_head list;
+ unsigned char *base;
+ unsigned int filled_cells;
+};
+
+struct udsl_receiver {
+ struct list_head list;
+ struct udsl_receive_buffer *buffer;
+ struct urb *urb;
+ struct udsl_instance_data *instance;
+};
+
+struct udsl_vcc_data {
+ /* vpi/vci lookup */
+ struct list_head list;
+ short vpi;
+ int vci;
+ struct atm_vcc *vcc;
+
+ /* raw cell reassembly */
+ struct sk_buff *sarb;
+};
+
+/* send */
+
+struct udsl_send_buffer {
+ struct list_head list;
+ unsigned char *base;
+ unsigned char *free_start;
+ unsigned int free_cells;
+};
+
+struct udsl_sender {
+ struct list_head list;
+ struct udsl_send_buffer *buffer;
+ struct urb *urb;
+ struct udsl_instance_data *instance;
+};
+
+struct udsl_control {
+ struct atm_skb_data atm_data;
+ unsigned int num_cells;
+ unsigned int num_entire;
+ unsigned int pdu_padding;
+ unsigned char aal5_trailer[ATM_AAL5_TRAILER];
+};
+
+#define UDSL_SKB(x) ((struct udsl_control *)(x)->cb)
+
+/* main driver data */
+
+enum udsl_status {
+ UDSL_NO_FIRMWARE,
+ UDSL_LOADING_FIRMWARE,
+ UDSL_LOADED_FIRMWARE
+};
+
+struct udsl_instance_data {
+ struct kref refcount;
+ struct semaphore serialize;
+
+ /* USB device part */
+ struct usb_device *usb_dev;
+ char description[64];
+ int data_endpoint;
+ int snd_padding;
+ int rcv_padding;
+ const char *driver_name;
+
+ /* ATM device part */
+ struct atm_dev *atm_dev;
+ struct list_head vcc_list;
+
+ /* firmware */
+ int (*firmware_wait) (struct udsl_instance_data *);
+ enum udsl_status status;
+ wait_queue_head_t firmware_waiters;
+
+ /* receive */
+ struct udsl_receiver receivers[UDSL_MAX_RCV_URBS];
+ struct udsl_receive_buffer receive_buffers[UDSL_MAX_RCV_BUFS];
+
+ spinlock_t receive_lock;
+ struct list_head spare_receivers;
+ struct list_head filled_receive_buffers;
+
+ struct tasklet_struct receive_tasklet;
+ struct list_head spare_receive_buffers;
+
+ /* send */
+ struct udsl_sender senders[UDSL_MAX_SND_URBS];
+ struct udsl_send_buffer send_buffers[UDSL_MAX_SND_BUFS];
+
+ struct sk_buff_head sndqueue;
+
+ spinlock_t send_lock;
+ struct list_head spare_senders;
+ struct list_head spare_send_buffers;
+
+ struct tasklet_struct send_tasklet;
+ struct sk_buff *current_skb; /* being emptied */
+ struct udsl_send_buffer *current_buffer; /* being filled */
+ struct list_head filled_send_buffers;
+};
+
+extern int udsl_instance_setup(struct usb_device *dev,
+ struct udsl_instance_data *instance);
+extern void udsl_instance_disconnect(struct udsl_instance_data *instance);
+extern void udsl_get_instance(struct udsl_instance_data *instance);
+extern void udsl_put_instance(struct udsl_instance_data *instance);
diff --git a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig
new file mode 100644
index 000000000000..0561d0234f23
--- /dev/null
+++ b/drivers/usb/class/Kconfig
@@ -0,0 +1,86 @@
+#
+# USB Class driver configuration
+#
+comment "USB Device Class drivers"
+ depends on USB
+
+config USB_AUDIO
+ tristate "USB Audio support"
+ depends on USB && SOUND
+ help
+ Say Y here if you want to connect USB audio equipment such as
+ speakers to your computer's USB port. You only need this if you use
+ the OSS sound driver; ALSA has its own option for usb audio support.
+
+ To compile this driver as a module, choose M here: the
+ module will be called audio.
+
+comment "USB Bluetooth TTY can only be used with disabled Bluetooth subsystem"
+ depends on USB && BT
+
+config USB_BLUETOOTH_TTY
+ tristate "USB Bluetooth TTY support"
+ depends on USB && BT=n
+ ---help---
+ This driver implements a nonstandard tty interface to a Bluetooth
+ device that can be used only by specialized Bluetooth HCI software.
+
+ Say Y here if you want to use OpenBT Bluetooth stack (available
+ at <http://developer.axis.com/software>), or other TTY based
+ Bluetooth stacks, and want to connect a USB Bluetooth device
+ to your computer's USB port.
+
+ Do *not* enable this driver if you want to use generic Linux
+ Bluetooth support.
+
+ If in doubt, say N here.
+
+ To compile this driver as a module, choose M here: the
+ module will be called bluetty.
+
+config USB_MIDI
+ tristate "USB MIDI support"
+ depends on USB && SOUND
+ ---help---
+ Say Y here if you want to connect a USB MIDI device to your
+ computer's USB port. This driver is for devices that comply with
+ 'Universal Serial Bus Device Class Definition for MIDI Device'.
+
+ The following devices are known to work:
+ * Steinberg USB2MIDI
+ * Roland MPU64
+ * Roland PC-300
+ * Roland SC8850
+ * Roland UM-1
+ * Roland UM-2
+ * Roland UA-100
+ * Yamaha MU1000
+
+ To compile this driver as a module, choose M here: the
+ module will be called usb-midi.
+
+config USB_ACM
+ tristate "USB Modem (CDC ACM) support"
+ depends on USB
+ ---help---
+ This driver supports USB modems and ISDN adapters which support the
+ Communication Device Class Abstract Control Model interface.
+ Please read <file:Documentation/usb/acm.txt> for details.
+
+ If your modem only reports "Cls=ff(vend.)" in the descriptors in
+ /proc/bus/usb/devices, then your modem will not work with this
+ driver.
+
+ To compile this driver as a module, choose M here: the
+ module will be called cdc-acm.
+
+config USB_PRINTER
+ tristate "USB Printer support"
+ depends on USB
+ help
+ Say Y here if you want to connect a USB printer to your computer's
+ USB port.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usblp.
+
diff --git a/drivers/usb/class/Makefile b/drivers/usb/class/Makefile
new file mode 100644
index 000000000000..971e5497a3fd
--- /dev/null
+++ b/drivers/usb/class/Makefile
@@ -0,0 +1,10 @@
+#
+# Makefile for USB Class drivers
+# (one step up from the misc category)
+#
+
+obj-$(CONFIG_USB_ACM) += cdc-acm.o
+obj-$(CONFIG_USB_AUDIO) += audio.o
+obj-$(CONFIG_USB_BLUETOOTH_TTY) += bluetty.o
+obj-$(CONFIG_USB_MIDI) += usb-midi.o
+obj-$(CONFIG_USB_PRINTER) += usblp.o
diff --git a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c
new file mode 100644
index 000000000000..f432b7d5b235
--- /dev/null
+++ b/drivers/usb/class/audio.c
@@ -0,0 +1,3882 @@
+/*****************************************************************************/
+
+/*
+ * audio.c -- USB Audio Class driver
+ *
+ * Copyright (C) 1999, 2000, 2001, 2003, 2004
+ * Alan Cox (alan@lxorguk.ukuu.org.uk)
+ * Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *
+ * 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.
+ *
+ * Debugging:
+ * Use the 'lsusb' utility to dump the descriptors.
+ *
+ * 1999-09-07: Alan Cox
+ * Parsing Audio descriptor patch
+ * 1999-09-08: Thomas Sailer
+ * Added OSS compatible data io functions; both parts of the
+ * driver remain to be glued together
+ * 1999-09-10: Thomas Sailer
+ * Beautified the driver. Added sample format conversions.
+ * Still not properly glued with the parsing code.
+ * The parsing code seems to have its problems btw,
+ * Since it parses all available configs but doesn't
+ * store which iface/altsetting belongs to which config.
+ * 1999-09-20: Thomas Sailer
+ * Threw out Alan's parsing code and implemented my own one.
+ * You cannot reasonnably linearly parse audio descriptors,
+ * especially the AudioClass descriptors have to be considered
+ * pointer lists. Mixer parsing untested, due to lack of device.
+ * First stab at synch pipe implementation, the Dallas USB DAC
+ * wants to use an Asynch out pipe. usb_audio_state now basically
+ * only contains lists of mixer and wave devices. We can therefore
+ * now have multiple mixer/wave devices per USB device.
+ * 1999-10-28: Thomas Sailer
+ * Converted to URB API. Fixed a taskstate/wakeup semantics mistake
+ * that made the driver consume all available CPU cycles.
+ * Now runs stable on UHCI-Acher/Fliegl/Sailer.
+ * 1999-10-31: Thomas Sailer
+ * Audio can now be unloaded if it is not in use by any mixer
+ * or dsp client (formerly you had to disconnect the audio devices
+ * from the USB port)
+ * Finally, about three months after ordering, my "Maxxtro SPK222"
+ * speakers arrived, isn't disdata a great mail order company 8-)
+ * Parse class specific endpoint descriptor of the audiostreaming
+ * interfaces and take the endpoint attributes from there.
+ * Unbelievably, the Philips USB DAC has a sampling rate range
+ * of over a decade, yet does not support the sampling rate control!
+ * No wonder it sounds so bad, has very audible sampling rate
+ * conversion distortion. Don't try to listen to it using
+ * decent headphones!
+ * "Let's make things better" -> but please Philips start with your
+ * own stuff!!!!
+ * 1999-11-02: Thomas Sailer
+ * It takes the Philips boxes several seconds to acquire synchronisation
+ * that means they won't play short sounds. Should probably maintain
+ * the ISO datastream even if there's nothing to play.
+ * Fix counting the total_bytes counter, RealPlayer G2 depends on it.
+ * 1999-12-20: Thomas Sailer
+ * Fix bad bug in conversion to per interface probing.
+ * disconnect was called multiple times for the audio device,
+ * leading to a premature freeing of the audio structures
+ * 2000-05-13: Thomas Sailer
+ * I don't remember who changed the find_format routine,
+ * but the change was completely broken for the Dallas
+ * chip. Anyway taking sampling rate into account in find_format
+ * is bad and should not be done unless there are devices with
+ * completely broken audio descriptors. Unless someone shows
+ * me such a descriptor, I will not allow find_format to
+ * take the sampling rate into account.
+ * Also, the former find_format made:
+ * - mpg123 play mono instead of stereo
+ * - sox completely fail for wav's with sample rates < 44.1kHz
+ * for the Dallas chip.
+ * Also fix a rather long standing problem with applications that
+ * use "small" writes producing no sound at all.
+ * 2000-05-15: Thomas Sailer
+ * My fears came true, the Philips camera indeed has pretty stupid
+ * audio descriptors.
+ * 2000-05-17: Thomas Sailer
+ * Nemsoft spotted my stupid last minute change, thanks
+ * 2000-05-19: Thomas Sailer
+ * Fixed FEATURE_UNIT thinkos found thanks to the KC Technology
+ * Xtend device. Basically the driver treated FEATURE_UNIT's sourced
+ * by mono terminals as stereo.
+ * 2000-05-20: Thomas Sailer
+ * SELECTOR support (and thus selecting record channels from the mixer).
+ * Somewhat peculiar due to OSS interface limitations. Only works
+ * for channels where a "slider" is already in front of it (i.e.
+ * a MIXER unit or a FEATURE unit with volume capability).
+ * 2000-11-26: Thomas Sailer
+ * Workaround for Dallas DS4201. The DS4201 uses PCM8 as format tag for
+ * its 8 bit modes, but expects signed data (and should therefore have used PCM).
+ * 2001-03-10: Thomas Sailer
+ * provide abs function, prevent picking up a bogus kernel macro
+ * for abs. Bug report by Andrew Morton <andrewm@uow.edu.au>
+ * 2001-06-16: Bryce Nesbitt <bryce@obviously.com>
+ * Fix SNDCTL_DSP_STEREO API violation
+ * 2003-04-08: Oliver Neukum (oliver@neukum.name):
+ * Setting a configuration is done by usbcore and must not be overridden
+ * 2004-02-27: Workaround for broken synch descriptors
+ * 2004-03-07: Alan Stern <stern@rowland.harvard.edu>
+ * Add usb_ifnum_to_if() and usb_altnum_to_altsetting() support.
+ * Use the in-memory descriptors instead of reading them from the device.
+ *
+ */
+
+/*
+ * Strategy:
+ *
+ * Alan Cox and Thomas Sailer are starting to dig at opposite ends and
+ * are hoping to meet in the middle, just like tunnel diggers :)
+ * Alan tackles the descriptor parsing, Thomas the actual data IO and the
+ * OSS compatible interface.
+ *
+ * Data IO implementation issues
+ *
+ * A mmap'able ring buffer per direction is implemented, because
+ * almost every OSS app expects it. It is however impractical to
+ * transmit/receive USB data directly into and out of the ring buffer,
+ * due to alignment and synchronisation issues. Instead, the ring buffer
+ * feeds a constant time delay line that handles the USB issues.
+ *
+ * Now we first try to find an alternate setting that exactly matches
+ * the sample format requested by the user. If we find one, we do not
+ * need to perform any sample rate conversions. If there is no matching
+ * altsetting, we choose the closest one and perform sample format
+ * conversions. We never do sample rate conversion; these are too
+ * expensive to be performed in the kernel.
+ *
+ * Current status: no known HCD-specific issues.
+ *
+ * Generally: Due to the brokenness of the Audio Class spec
+ * it seems generally impossible to write a generic Audio Class driver,
+ * so a reasonable driver should implement the features that are actually
+ * used.
+ *
+ * Parsing implementation issues
+ *
+ * One cannot reasonably parse the AudioClass descriptors linearly.
+ * Therefore the current implementation features routines to look
+ * for a specific descriptor in the descriptor list.
+ *
+ * How does the parsing work? First, all interfaces are searched
+ * for an AudioControl class interface. If found, the config descriptor
+ * that belongs to the current configuration is searched and
+ * the HEADER descriptor is found. It contains a list of
+ * all AudioStreaming and MIDIStreaming devices. This list is then walked,
+ * and all AudioStreaming interfaces are classified into input and output
+ * interfaces (according to the endpoint0 direction in altsetting1) (MIDIStreaming
+ * is currently not supported). The input & output list is then used
+ * to group inputs and outputs together and issued pairwise to the
+ * AudioStreaming class parser. Finally, all OUTPUT_TERMINAL descriptors
+ * are walked and issued to the mixer construction routine.
+ *
+ * The AudioStreaming parser simply enumerates all altsettings belonging
+ * to the specified interface. It looks for AS_GENERAL and FORMAT_TYPE
+ * class specific descriptors to extract the sample format/sample rate
+ * data. Only sample format types PCM and PCM8 are supported right now, and
+ * only FORMAT_TYPE_I is handled. The isochronous data endpoint needs to
+ * be the first endpoint of the interface, and the optional synchronisation
+ * isochronous endpoint the second one.
+ *
+ * Mixer construction works as follows: The various TERMINAL and UNIT
+ * descriptors span a tree from the root (OUTPUT_TERMINAL) through the
+ * intermediate nodes (UNITs) to the leaves (INPUT_TERMINAL). We walk
+ * that tree in a depth first manner. FEATURE_UNITs may contribute volume,
+ * bass and treble sliders to the mixer, MIXER_UNITs volume sliders.
+ * The terminal type encoded in the INPUT_TERMINALs feeds a heuristic
+ * to determine "meaningful" OSS slider numbers, however we will see
+ * how well this works in practice. Other features are not used at the
+ * moment, they seem less often used. Also, it seems difficult at least
+ * to construct recording source switches from SELECTOR_UNITs, but
+ * since there are not many USB ADC's available, we leave that for later.
+ */
+
+/*****************************************************************************/
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/timer.h>
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
+#include <linux/module.h>
+#include <linux/sound.h>
+#include <linux/soundcard.h>
+#include <linux/list.h>
+#include <linux/vmalloc.h>
+#include <linux/init.h>
+#include <linux/poll.h>
+#include <linux/bitops.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+#include <linux/usb.h>
+
+#include "audio.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"
+#define DRIVER_AUTHOR "Alan Cox <alan@lxorguk.ukuu.org.uk>, Thomas Sailer (sailer@ife.ee.ethz.ch)"
+#define DRIVER_DESC "USB Audio Class driver"
+
+#define AUDIO_DEBUG 1
+
+#define SND_DEV_DSP16 5
+
+#define dprintk(x)
+
+/* --------------------------------------------------------------------- */
+
+/*
+ * Linked list of all audio devices...
+ */
+static struct list_head audiodevs = LIST_HEAD_INIT(audiodevs);
+static DECLARE_MUTEX(open_sem);
+
+/*
+ * wait queue for processes wanting to open an USB audio device
+ */
+static DECLARE_WAIT_QUEUE_HEAD(open_wait);
+
+
+#define MAXFORMATS MAX_ALT
+#define DMABUFSHIFT 17 /* 128k worth of DMA buffer */
+#define NRSGBUF (1U<<(DMABUFSHIFT-PAGE_SHIFT))
+
+/*
+ * This influences:
+ * - Latency
+ * - Interrupt rate
+ * - Synchronisation behaviour
+ * Don't touch this if you don't understand all of the above.
+ */
+#define DESCFRAMES 5
+#define SYNCFRAMES DESCFRAMES
+
+#define MIXFLG_STEREOIN 1
+#define MIXFLG_STEREOOUT 2
+
+struct mixerchannel {
+ __u16 value;
+ __u16 osschannel; /* number of the OSS channel */
+ __s16 minval, maxval;
+ __u16 slctunitid;
+ __u8 unitid;
+ __u8 selector;
+ __u8 chnum;
+ __u8 flags;
+};
+
+struct audioformat {
+ unsigned int format;
+ unsigned int sratelo;
+ unsigned int sratehi;
+ unsigned char altsetting;
+ unsigned char attributes;
+};
+
+struct dmabuf {
+ /* buffer data format */
+ unsigned int format;
+ unsigned int srate;
+ /* physical buffer */
+ unsigned char *sgbuf[NRSGBUF];
+ unsigned bufsize;
+ unsigned numfrag;
+ unsigned fragshift;
+ unsigned wrptr, rdptr;
+ unsigned total_bytes;
+ int count;
+ unsigned error; /* over/underrun */
+ wait_queue_head_t wait;
+ /* redundant, but makes calculations easier */
+ unsigned fragsize;
+ unsigned dmasize;
+ /* OSS stuff */
+ unsigned mapped:1;
+ unsigned ready:1;
+ unsigned ossfragshift;
+ int ossmaxfrags;
+ unsigned subdivision;
+};
+
+struct usb_audio_state;
+
+#define FLG_URB0RUNNING 1
+#define FLG_URB1RUNNING 2
+#define FLG_SYNC0RUNNING 4
+#define FLG_SYNC1RUNNING 8
+#define FLG_RUNNING 16
+#define FLG_CONNECTED 32
+
+struct my_data_urb {
+ struct urb *urb;
+};
+
+struct my_sync_urb {
+ struct urb *urb;
+};
+
+
+struct usb_audiodev {
+ struct list_head list;
+ struct usb_audio_state *state;
+
+ /* soundcore stuff */
+ int dev_audio;
+
+ /* wave stuff */
+ mode_t open_mode;
+ spinlock_t lock; /* DMA buffer access spinlock */
+
+ struct usbin {
+ int interface; /* Interface number, -1 means not used */
+ unsigned int format; /* USB data format */
+ unsigned int datapipe; /* the data input pipe */
+ unsigned int syncpipe; /* the synchronisation pipe - 0 for anything but adaptive IN mode */
+ unsigned int syncinterval; /* P for adaptive IN mode, 0 otherwise */
+ unsigned int freqn; /* nominal sampling rate in USB format, i.e. fs/1000 in Q10.14 */
+ unsigned int freqmax; /* maximum sampling rate, used for buffer management */
+ unsigned int phase; /* phase accumulator */
+ unsigned int flags; /* see FLG_ defines */
+
+ struct my_data_urb durb[2]; /* ISO descriptors for the data endpoint */
+ struct my_sync_urb surb[2]; /* ISO sync pipe descriptor if needed */
+
+ struct dmabuf dma;
+ } usbin;
+
+ struct usbout {
+ int interface; /* Interface number, -1 means not used */
+ unsigned int format; /* USB data format */
+ unsigned int datapipe; /* the data input pipe */
+ unsigned int syncpipe; /* the synchronisation pipe - 0 for anything but asynchronous OUT mode */
+ unsigned int syncinterval; /* P for asynchronous OUT mode, 0 otherwise */
+ unsigned int freqn; /* nominal sampling rate in USB format, i.e. fs/1000 in Q10.14 */
+ unsigned int freqm; /* momentary sampling rate in USB format, i.e. fs/1000 in Q10.14 */
+ unsigned int freqmax; /* maximum sampling rate, used for buffer management */
+ unsigned int phase; /* phase accumulator */
+ unsigned int flags; /* see FLG_ defines */
+
+ struct my_data_urb durb[2]; /* ISO descriptors for the data endpoint */
+ struct my_sync_urb surb[2]; /* ISO sync pipe descriptor if needed */
+
+ struct dmabuf dma;
+ } usbout;
+
+
+ unsigned int numfmtin, numfmtout;
+ struct audioformat fmtin[MAXFORMATS];
+ struct audioformat fmtout[MAXFORMATS];
+};
+
+struct usb_mixerdev {
+ struct list_head list;
+ struct usb_audio_state *state;
+
+ /* soundcore stuff */
+ int dev_mixer;
+
+ unsigned char iface; /* interface number of the AudioControl interface */
+
+ /* USB format descriptions */
+ unsigned int numch, modcnt;
+
+ /* mixch is last and gets allocated dynamically */
+ struct mixerchannel ch[0];
+};
+
+struct usb_audio_state {
+ struct list_head audiodev;
+
+ /* USB device */
+ struct usb_device *usbdev;
+
+ struct list_head audiolist;
+ struct list_head mixerlist;
+
+ unsigned count; /* usage counter; NOTE: the usb stack is also considered a user */
+};
+
+/* private audio format extensions */
+#define AFMT_STEREO 0x80000000
+#define AFMT_ISSTEREO(x) ((x) & AFMT_STEREO)
+#define AFMT_IS16BIT(x) ((x) & (AFMT_S16_LE|AFMT_S16_BE|AFMT_U16_LE|AFMT_U16_BE))
+#define AFMT_ISUNSIGNED(x) ((x) & (AFMT_U8|AFMT_U16_LE|AFMT_U16_BE))
+#define AFMT_BYTESSHIFT(x) ((AFMT_ISSTEREO(x) ? 1 : 0) + (AFMT_IS16BIT(x) ? 1 : 0))
+#define AFMT_BYTES(x) (1<<AFMT_BYTESSHFIT(x))
+
+/* --------------------------------------------------------------------- */
+
+static inline unsigned ld2(unsigned int x)
+{
+ unsigned r = 0;
+
+ if (x >= 0x10000) {
+ x >>= 16;
+ r += 16;
+ }
+ if (x >= 0x100) {
+ x >>= 8;
+ r += 8;
+ }
+ if (x >= 0x10) {
+ x >>= 4;
+ r += 4;
+ }
+ if (x >= 4) {
+ x >>= 2;
+ r += 2;
+ }
+ if (x >= 2)
+ r++;
+ return r;
+}
+
+/* --------------------------------------------------------------------- */
+
+/*
+ * OSS compatible ring buffer management. The ring buffer may be mmap'ed into
+ * an application address space.
+ *
+ * I first used the rvmalloc stuff copied from bttv. Alan Cox did not like it, so
+ * we now use an array of pointers to a single page each. This saves us the
+ * kernel page table manipulations, but we have to do a page table alike mechanism
+ * (though only one indirection) in software.
+ */
+
+static void dmabuf_release(struct dmabuf *db)
+{
+ unsigned int nr;
+ void *p;
+
+ for(nr = 0; nr < NRSGBUF; nr++) {
+ if (!(p = db->sgbuf[nr]))
+ continue;
+ ClearPageReserved(virt_to_page(p));
+ free_page((unsigned long)p);
+ db->sgbuf[nr] = NULL;
+ }
+ db->mapped = db->ready = 0;
+}
+
+static int dmabuf_init(struct dmabuf *db)
+{
+ unsigned int nr, bytepersec, bufs;
+ void *p;
+
+ /* initialize some fields */
+ db->rdptr = db->wrptr = db->total_bytes = db->count = db->error = 0;
+ /* calculate required buffer size */
+ bytepersec = db->srate << AFMT_BYTESSHIFT(db->format);
+ bufs = 1U << DMABUFSHIFT;
+ if (db->ossfragshift) {
+ if ((1000 << db->ossfragshift) < bytepersec)
+ db->fragshift = ld2(bytepersec/1000);
+ else
+ db->fragshift = db->ossfragshift;
+ } else {
+ db->fragshift = ld2(bytepersec/100/(db->subdivision ? db->subdivision : 1));
+ if (db->fragshift < 3)
+ db->fragshift = 3;
+ }
+ db->numfrag = bufs >> db->fragshift;
+ while (db->numfrag < 4 && db->fragshift > 3) {
+ db->fragshift--;
+ db->numfrag = bufs >> db->fragshift;
+ }
+ db->fragsize = 1 << db->fragshift;
+ if (db->ossmaxfrags >= 4 && db->ossmaxfrags < db->numfrag)
+ db->numfrag = db->ossmaxfrags;
+ db->dmasize = db->numfrag << db->fragshift;
+ for(nr = 0; nr < NRSGBUF; nr++) {
+ if (!db->sgbuf[nr]) {
+ p = (void *)get_zeroed_page(GFP_KERNEL);
+ if (!p)
+ return -ENOMEM;
+ db->sgbuf[nr] = p;
+ SetPageReserved(virt_to_page(p));
+ }
+ memset(db->sgbuf[nr], AFMT_ISUNSIGNED(db->format) ? 0x80 : 0, PAGE_SIZE);
+ if ((nr << PAGE_SHIFT) >= db->dmasize)
+ break;
+ }
+ db->bufsize = nr << PAGE_SHIFT;
+ db->ready = 1;
+ dprintk((KERN_DEBUG "usbaudio: dmabuf_init bytepersec %d bufs %d ossfragshift %d ossmaxfrags %d "
+ "fragshift %d fragsize %d numfrag %d dmasize %d bufsize %d fmt 0x%x srate %d\n",
+ bytepersec, bufs, db->ossfragshift, db->ossmaxfrags, db->fragshift, db->fragsize,
+ db->numfrag, db->dmasize, db->bufsize, db->format, db->srate));
+ return 0;
+}
+
+static int dmabuf_mmap(struct vm_area_struct *vma, struct dmabuf *db, unsigned long start, unsigned long size, pgprot_t prot)
+{
+ unsigned int nr;
+
+ if (!db->ready || db->mapped || (start | size) & (PAGE_SIZE-1) || size > db->bufsize)
+ return -EINVAL;
+ size >>= PAGE_SHIFT;
+ for(nr = 0; nr < size; nr++)
+ if (!db->sgbuf[nr])
+ return -EINVAL;
+ db->mapped = 1;
+ for(nr = 0; nr < size; nr++) {
+ unsigned long pfn;
+
+ pfn = virt_to_phys(db->sgbuf[nr]) >> PAGE_SHIFT;
+ if (remap_pfn_range(vma, start, pfn, PAGE_SIZE, prot))
+ return -EAGAIN;
+ start += PAGE_SIZE;
+ }
+ return 0;
+}
+
+static void dmabuf_copyin(struct dmabuf *db, const void *buffer, unsigned int size)
+{
+ unsigned int pgrem, rem;
+
+ db->total_bytes += size;
+ for (;;) {
+ if (size <= 0)
+ return;
+ pgrem = ((~db->wrptr) & (PAGE_SIZE-1)) + 1;
+ if (pgrem > size)
+ pgrem = size;
+ rem = db->dmasize - db->wrptr;
+ if (pgrem > rem)
+ pgrem = rem;
+ memcpy((db->sgbuf[db->wrptr >> PAGE_SHIFT]) + (db->wrptr & (PAGE_SIZE-1)), buffer, pgrem);
+ size -= pgrem;
+ buffer += pgrem;
+ db->wrptr += pgrem;
+ if (db->wrptr >= db->dmasize)
+ db->wrptr = 0;
+ }
+}
+
+static void dmabuf_copyout(struct dmabuf *db, void *buffer, unsigned int size)
+{
+ unsigned int pgrem, rem;
+
+ db->total_bytes += size;
+ for (;;) {
+ if (size <= 0)
+ return;
+ pgrem = ((~db->rdptr) & (PAGE_SIZE-1)) + 1;
+ if (pgrem > size)
+ pgrem = size;
+ rem = db->dmasize - db->rdptr;
+ if (pgrem > rem)
+ pgrem = rem;
+ memcpy(buffer, (db->sgbuf[db->rdptr >> PAGE_SHIFT]) + (db->rdptr & (PAGE_SIZE-1)), pgrem);
+ size -= pgrem;
+ buffer += pgrem;
+ db->rdptr += pgrem;
+ if (db->rdptr >= db->dmasize)
+ db->rdptr = 0;
+ }
+}
+
+static int dmabuf_copyin_user(struct dmabuf *db, unsigned int ptr, const void __user *buffer, unsigned int size)
+{
+ unsigned int pgrem, rem;
+
+ if (!db->ready || db->mapped)
+ return -EINVAL;
+ for (;;) {
+ if (size <= 0)
+ return 0;
+ pgrem = ((~ptr) & (PAGE_SIZE-1)) + 1;
+ if (pgrem > size)
+ pgrem = size;
+ rem = db->dmasize - ptr;
+ if (pgrem > rem)
+ pgrem = rem;
+ if (copy_from_user((db->sgbuf[ptr >> PAGE_SHIFT]) + (ptr & (PAGE_SIZE-1)), buffer, pgrem))
+ return -EFAULT;
+ size -= pgrem;
+ buffer += pgrem;
+ ptr += pgrem;
+ if (ptr >= db->dmasize)
+ ptr = 0;
+ }
+}
+
+static int dmabuf_copyout_user(struct dmabuf *db, unsigned int ptr, void __user *buffer, unsigned int size)
+{
+ unsigned int pgrem, rem;
+
+ if (!db->ready || db->mapped)
+ return -EINVAL;
+ for (;;) {
+ if (size <= 0)
+ return 0;
+ pgrem = ((~ptr) & (PAGE_SIZE-1)) + 1;
+ if (pgrem > size)
+ pgrem = size;
+ rem = db->dmasize - ptr;
+ if (pgrem > rem)
+ pgrem = rem;
+ if (copy_to_user(buffer, (db->sgbuf[ptr >> PAGE_SHIFT]) + (ptr & (PAGE_SIZE-1)), pgrem))
+ return -EFAULT;
+ size -= pgrem;
+ buffer += pgrem;
+ ptr += pgrem;
+ if (ptr >= db->dmasize)
+ ptr = 0;
+ }
+}
+
+/* --------------------------------------------------------------------- */
+/*
+ * USB I/O code. We do sample format conversion if necessary
+ */
+
+static void usbin_stop(struct usb_audiodev *as)
+{
+ struct usbin *u = &as->usbin;
+ unsigned long flags;
+ unsigned int i, notkilled = 1;
+
+ spin_lock_irqsave(&as->lock, flags);
+ u->flags &= ~FLG_RUNNING;
+ i = u->flags;
+ spin_unlock_irqrestore(&as->lock, flags);
+ while (i & (FLG_URB0RUNNING|FLG_URB1RUNNING|FLG_SYNC0RUNNING|FLG_SYNC1RUNNING)) {
+ set_current_state(notkilled ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
+ schedule_timeout(1);
+ spin_lock_irqsave(&as->lock, flags);
+ i = u->flags;
+ spin_unlock_irqrestore(&as->lock, flags);
+ if (notkilled && signal_pending(current)) {
+ if (i & FLG_URB0RUNNING)
+ usb_kill_urb(u->durb[0].urb);
+ if (i & FLG_URB1RUNNING)
+ usb_kill_urb(u->durb[1].urb);
+ if (i & FLG_SYNC0RUNNING)
+ usb_kill_urb(u->surb[0].urb);
+ if (i & FLG_SYNC1RUNNING)
+ usb_kill_urb(u->surb[1].urb);
+ notkilled = 0;
+ }
+ }
+ set_current_state(TASK_RUNNING);
+ if (u->durb[0].urb->transfer_buffer)
+ kfree(u->durb[0].urb->transfer_buffer);
+ if (u->durb[1].urb->transfer_buffer)
+ kfree(u->durb[1].urb->transfer_buffer);
+ if (u->surb[0].urb->transfer_buffer)
+ kfree(u->surb[0].urb->transfer_buffer);
+ if (u->surb[1].urb->transfer_buffer)
+ kfree(u->surb[1].urb->transfer_buffer);
+ u->durb[0].urb->transfer_buffer = u->durb[1].urb->transfer_buffer =
+ u->surb[0].urb->transfer_buffer = u->surb[1].urb->transfer_buffer = NULL;
+}
+
+static inline void usbin_release(struct usb_audiodev *as)
+{
+ usbin_stop(as);
+}
+
+static void usbin_disc(struct usb_audiodev *as)
+{
+ struct usbin *u = &as->usbin;
+
+ unsigned long flags;
+
+ spin_lock_irqsave(&as->lock, flags);
+ u->flags &= ~(FLG_RUNNING | FLG_CONNECTED);
+ spin_unlock_irqrestore(&as->lock, flags);
+ usbin_stop(as);
+}
+
+static void conversion(const void *ibuf, unsigned int ifmt, void *obuf, unsigned int ofmt, void *tmp, unsigned int scnt)
+{
+ unsigned int cnt, i;
+ __s16 *sp, *sp2, s;
+ unsigned char *bp;
+
+ cnt = scnt;
+ if (AFMT_ISSTEREO(ifmt))
+ cnt <<= 1;
+ sp = ((__s16 *)tmp) + cnt;
+ switch (ifmt & ~AFMT_STEREO) {
+ case AFMT_U8:
+ for (bp = ((unsigned char *)ibuf)+cnt, i = 0; i < cnt; i++) {
+ bp--;
+ sp--;
+ *sp = (*bp ^ 0x80) << 8;
+ }
+ break;
+
+ case AFMT_S8:
+ for (bp = ((unsigned char *)ibuf)+cnt, i = 0; i < cnt; i++) {
+ bp--;
+ sp--;
+ *sp = *bp << 8;
+ }
+ break;
+
+ case AFMT_U16_LE:
+ for (bp = ((unsigned char *)ibuf)+2*cnt, i = 0; i < cnt; i++) {
+ bp -= 2;
+ sp--;
+ *sp = (bp[0] | (bp[1] << 8)) ^ 0x8000;
+ }
+ break;
+
+ case AFMT_U16_BE:
+ for (bp = ((unsigned char *)ibuf)+2*cnt, i = 0; i < cnt; i++) {
+ bp -= 2;
+ sp--;
+ *sp = (bp[1] | (bp[0] << 8)) ^ 0x8000;
+ }
+ break;
+
+ case AFMT_S16_LE:
+ for (bp = ((unsigned char *)ibuf)+2*cnt, i = 0; i < cnt; i++) {
+ bp -= 2;
+ sp--;
+ *sp = bp[0] | (bp[1] << 8);
+ }
+ break;
+
+ case AFMT_S16_BE:
+ for (bp = ((unsigned char *)ibuf)+2*cnt, i = 0; i < cnt; i++) {
+ bp -= 2;
+ sp--;
+ *sp = bp[1] | (bp[0] << 8);
+ }
+ break;
+ }
+ if (!AFMT_ISSTEREO(ifmt) && AFMT_ISSTEREO(ofmt)) {
+ /* expand from mono to stereo */
+ for (sp = ((__s16 *)tmp)+scnt, sp2 = ((__s16 *)tmp)+2*scnt, i = 0; i < scnt; i++) {
+ sp--;
+ sp2 -= 2;
+ sp2[0] = sp2[1] = sp[0];
+ }
+ }
+ if (AFMT_ISSTEREO(ifmt) && !AFMT_ISSTEREO(ofmt)) {
+ /* contract from stereo to mono */
+ for (sp = sp2 = ((__s16 *)tmp), i = 0; i < scnt; i++, sp++, sp2 += 2)
+ sp[0] = (sp2[0] + sp2[1]) >> 1;
+ }
+ cnt = scnt;
+ if (AFMT_ISSTEREO(ofmt))
+ cnt <<= 1;
+ sp = ((__s16 *)tmp);
+ bp = ((unsigned char *)obuf);
+ switch (ofmt & ~AFMT_STEREO) {
+ case AFMT_U8:
+ for (i = 0; i < cnt; i++, sp++, bp++)
+ *bp = (*sp >> 8) ^ 0x80;
+ break;
+
+ case AFMT_S8:
+ for (i = 0; i < cnt; i++, sp++, bp++)
+ *bp = *sp >> 8;
+ break;
+
+ case AFMT_U16_LE:
+ for (i = 0; i < cnt; i++, sp++, bp += 2) {
+ s = *sp;
+ bp[0] = s;
+ bp[1] = (s >> 8) ^ 0x80;
+ }
+ break;
+
+ case AFMT_U16_BE:
+ for (i = 0; i < cnt; i++, sp++, bp += 2) {
+ s = *sp;
+ bp[1] = s;
+ bp[0] = (s >> 8) ^ 0x80;
+ }
+ break;
+
+ case AFMT_S16_LE:
+ for (i = 0; i < cnt; i++, sp++, bp += 2) {
+ s = *sp;
+ bp[0] = s;
+ bp[1] = s >> 8;
+ }
+ break;
+
+ case AFMT_S16_BE:
+ for (i = 0; i < cnt; i++, sp++, bp += 2) {
+ s = *sp;
+ bp[1] = s;
+ bp[0] = s >> 8;
+ }
+ break;
+ }
+
+}
+
+static void usbin_convert(struct usbin *u, unsigned char *buffer, unsigned int samples)
+{
+ union {
+ __s16 s[64];
+ unsigned char b[0];
+ } tmp;
+ unsigned int scnt, maxs, ufmtsh, dfmtsh;
+
+ ufmtsh = AFMT_BYTESSHIFT(u->format);
+ dfmtsh = AFMT_BYTESSHIFT(u->dma.format);
+ maxs = (AFMT_ISSTEREO(u->dma.format | u->format)) ? 32 : 64;
+ while (samples > 0) {
+ scnt = samples;
+ if (scnt > maxs)
+ scnt = maxs;
+ conversion(buffer, u->format, tmp.b, u->dma.format, tmp.b, scnt);
+ dmabuf_copyin(&u->dma, tmp.b, scnt << dfmtsh);
+ buffer += scnt << ufmtsh;
+ samples -= scnt;
+ }
+}
+
+static int usbin_prepare_desc(struct usbin *u, struct urb *urb)
+{
+ unsigned int i, maxsize, offs;
+
+ maxsize = (u->freqmax + 0x3fff) >> (14 - AFMT_BYTESSHIFT(u->format));
+ //printk(KERN_DEBUG "usbin_prepare_desc: maxsize %d freq 0x%x format 0x%x\n", maxsize, u->freqn, u->format);
+ for (i = offs = 0; i < DESCFRAMES; i++, offs += maxsize) {
+ urb->iso_frame_desc[i].length = maxsize;
+ urb->iso_frame_desc[i].offset = offs;
+ }
+ urb->interval = 1;
+ return 0;
+}
+
+/*
+ * 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;
+
+ ufmtsh = AFMT_BYTESSHIFT(u->format);
+ dfmtsh = AFMT_BYTESSHIFT(u->dma.format);
+ for (i = 0; i < DESCFRAMES; i++) {
+ cp = ((unsigned char *)urb->transfer_buffer) + urb->iso_frame_desc[i].offset;
+ if (urb->iso_frame_desc[i].status) {
+ dprintk((KERN_DEBUG "usbin_retire_desc: frame %u status %d\n", i, urb->iso_frame_desc[i].status));
+ continue;
+ }
+ scnt = urb->iso_frame_desc[i].actual_length >> ufmtsh;
+ if (!scnt)
+ continue;
+ cnt = scnt << dfmtsh;
+ if (!u->dma.mapped) {
+ dmafree = u->dma.dmasize - u->dma.count;
+ if (cnt > dmafree) {
+ scnt = dmafree >> dfmtsh;
+ cnt = scnt << dfmtsh;
+ err++;
+ }
+ }
+ u->dma.count += cnt;
+ if (u->format == u->dma.format) {
+ /* we do not need format conversion */
+ dprintk((KERN_DEBUG "usbaudio: no sample format conversion\n"));
+ dmabuf_copyin(&u->dma, cp, cnt);
+ } else {
+ /* we need sampling format conversion */
+ dprintk((KERN_DEBUG "usbaudio: sample format conversion %x != %x\n", u->format, u->dma.format));
+ usbin_convert(u, cp, scnt);
+ }
+ }
+ if (err)
+ u->dma.error++;
+ if (u->dma.count >= (signed)u->dma.fragsize)
+ wake_up(&u->dma.wait);
+ return err ? -1 : 0;
+}
+
+static void usbin_completed(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)urb->context;
+ struct usbin *u = &as->usbin;
+ unsigned long flags;
+ unsigned int mask;
+ int suret = 0;
+
+#if 0
+ printk(KERN_DEBUG "usbin_completed: status %d errcnt %d flags 0x%x\n", urb->status, urb->error_count, u->flags);
+#endif
+ if (urb == u->durb[0].urb)
+ mask = FLG_URB0RUNNING;
+ else if (urb == u->durb[1].urb)
+ mask = FLG_URB1RUNNING;
+ else {
+ mask = 0;
+ printk(KERN_ERR "usbin_completed: panic: unknown URB\n");
+ }
+ urb->dev = as->state->usbdev;
+ spin_lock_irqsave(&as->lock, flags);
+ if (!usbin_retire_desc(u, urb) &&
+ u->flags & FLG_RUNNING &&
+ !usbin_prepare_desc(u, urb) &&
+ (suret = usb_submit_urb(urb, GFP_ATOMIC)) == 0) {
+ u->flags |= mask;
+ } else {
+ u->flags &= ~(mask | FLG_RUNNING);
+ wake_up(&u->dma.wait);
+ printk(KERN_DEBUG "usbin_completed: descriptor not restarted (usb_submit_urb: %d)\n", suret);
+ }
+ spin_unlock_irqrestore(&as->lock, flags);
+}
+
+/*
+ * 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;
+
+ for (i = offs = 0; i < SYNCFRAMES; i++, offs += 3, cp += 3) {
+ urb->iso_frame_desc[i].length = 3;
+ urb->iso_frame_desc[i].offset = offs;
+ cp[0] = u->freqn;
+ cp[1] = u->freqn >> 8;
+ cp[2] = u->freqn >> 16;
+ }
+ urb->interval = 1;
+ return 0;
+}
+
+/*
+ * 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;
+
+ for (i = 0; i < SYNCFRAMES; i++)
+ if (urb->iso_frame_desc[0].status)
+ dprintk((KERN_DEBUG "usbin_sync_retire_desc: frame %u status %d\n", i, urb->iso_frame_desc[i].status));
+ return 0;
+}
+
+static void usbin_sync_completed(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)urb->context;
+ struct usbin *u = &as->usbin;
+ unsigned long flags;
+ unsigned int mask;
+ int suret = 0;
+
+#if 0
+ printk(KERN_DEBUG "usbin_sync_completed: status %d errcnt %d flags 0x%x\n", urb->status, urb->error_count, u->flags);
+#endif
+ if (urb == u->surb[0].urb)
+ mask = FLG_SYNC0RUNNING;
+ else if (urb == u->surb[1].urb)
+ mask = FLG_SYNC1RUNNING;
+ else {
+ mask = 0;
+ printk(KERN_ERR "usbin_sync_completed: panic: unknown URB\n");
+ }
+ urb->dev = as->state->usbdev;
+ spin_lock_irqsave(&as->lock, flags);
+ if (!usbin_sync_retire_desc(u, urb) &&
+ u->flags & FLG_RUNNING &&
+ !usbin_sync_prepare_desc(u, urb) &&
+ (suret = usb_submit_urb(urb, GFP_ATOMIC)) == 0) {
+ u->flags |= mask;
+ } else {
+ u->flags &= ~(mask | FLG_RUNNING);
+ wake_up(&u->dma.wait);
+ dprintk((KERN_DEBUG "usbin_sync_completed: descriptor not restarted (usb_submit_urb: %d)\n", suret));
+ }
+ spin_unlock_irqrestore(&as->lock, flags);
+}
+
+static int usbin_start(struct usb_audiodev *as)
+{
+ struct usb_device *dev = as->state->usbdev;
+ struct usbin *u = &as->usbin;
+ struct urb *urb;
+ unsigned long flags;
+ unsigned int maxsze, bufsz;
+
+#if 0
+ printk(KERN_DEBUG "usbin_start: device %d ufmt 0x%08x dfmt 0x%08x srate %d\n",
+ dev->devnum, u->format, u->dma.format, u->dma.srate);
+#endif
+ /* allocate USB storage if not already done */
+ spin_lock_irqsave(&as->lock, flags);
+ if (!(u->flags & FLG_CONNECTED)) {
+ spin_unlock_irqrestore(&as->lock, flags);
+ return -EIO;
+ }
+ if (!(u->flags & FLG_RUNNING)) {
+ spin_unlock_irqrestore(&as->lock, flags);
+ u->freqn = ((u->dma.srate << 11) + 62) / 125; /* this will overflow at approx 2MSPS */
+ u->freqmax = u->freqn + (u->freqn >> 2);
+ u->phase = 0;
+ maxsze = (u->freqmax + 0x3fff) >> (14 - AFMT_BYTESSHIFT(u->format));
+ bufsz = DESCFRAMES * maxsze;
+ if (u->durb[0].urb->transfer_buffer)
+ kfree(u->durb[0].urb->transfer_buffer);
+ u->durb[0].urb->transfer_buffer = kmalloc(bufsz, GFP_KERNEL);
+ u->durb[0].urb->transfer_buffer_length = bufsz;
+ if (u->durb[1].urb->transfer_buffer)
+ kfree(u->durb[1].urb->transfer_buffer);
+ u->durb[1].urb->transfer_buffer = kmalloc(bufsz, GFP_KERNEL);
+ u->durb[1].urb->transfer_buffer_length = bufsz;
+ if (u->syncpipe) {
+ if (u->surb[0].urb->transfer_buffer)
+ kfree(u->surb[0].urb->transfer_buffer);
+ u->surb[0].urb->transfer_buffer = kmalloc(3*SYNCFRAMES, GFP_KERNEL);
+ u->surb[0].urb->transfer_buffer_length = 3*SYNCFRAMES;
+ if (u->surb[1].urb->transfer_buffer)
+ kfree(u->surb[1].urb->transfer_buffer);
+ u->surb[1].urb->transfer_buffer = kmalloc(3*SYNCFRAMES, GFP_KERNEL);
+ u->surb[1].urb->transfer_buffer_length = 3*SYNCFRAMES;
+ }
+ if (!u->durb[0].urb->transfer_buffer || !u->durb[1].urb->transfer_buffer ||
+ (u->syncpipe && (!u->surb[0].urb->transfer_buffer || !u->surb[1].urb->transfer_buffer))) {
+ printk(KERN_ERR "usbaudio: cannot start playback device %d\n", dev->devnum);
+ return 0;
+ }
+ spin_lock_irqsave(&as->lock, flags);
+ }
+ if (u->dma.count >= u->dma.dmasize && !u->dma.mapped) {
+ spin_unlock_irqrestore(&as->lock, flags);
+ return 0;
+ }
+ u->flags |= FLG_RUNNING;
+ if (!(u->flags & FLG_URB0RUNNING)) {
+ urb = u->durb[0].urb;
+ urb->dev = dev;
+ urb->pipe = u->datapipe;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = DESCFRAMES;
+ urb->context = as;
+ urb->complete = usbin_completed;
+ if (!usbin_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
+ u->flags |= FLG_URB0RUNNING;
+ else
+ u->flags &= ~FLG_RUNNING;
+ }
+ if (u->flags & FLG_RUNNING && !(u->flags & FLG_URB1RUNNING)) {
+ urb = u->durb[1].urb;
+ urb->dev = dev;
+ urb->pipe = u->datapipe;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = DESCFRAMES;
+ urb->context = as;
+ urb->complete = usbin_completed;
+ if (!usbin_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
+ u->flags |= FLG_URB1RUNNING;
+ else
+ u->flags &= ~FLG_RUNNING;
+ }
+ if (u->syncpipe) {
+ if (u->flags & FLG_RUNNING && !(u->flags & FLG_SYNC0RUNNING)) {
+ urb = u->surb[0].urb;
+ urb->dev = dev;
+ urb->pipe = u->syncpipe;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = SYNCFRAMES;
+ urb->context = as;
+ urb->complete = usbin_sync_completed;
+ /* stride: u->syncinterval */
+ if (!usbin_sync_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
+ u->flags |= FLG_SYNC0RUNNING;
+ else
+ u->flags &= ~FLG_RUNNING;
+ }
+ if (u->flags & FLG_RUNNING && !(u->flags & FLG_SYNC1RUNNING)) {
+ urb = u->surb[1].urb;
+ urb->dev = dev;
+ urb->pipe = u->syncpipe;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = SYNCFRAMES;
+ urb->context = as;
+ urb->complete = usbin_sync_completed;
+ /* stride: u->syncinterval */
+ if (!usbin_sync_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
+ u->flags |= FLG_SYNC1RUNNING;
+ else
+ u->flags &= ~FLG_RUNNING;
+ }
+ }
+ spin_unlock_irqrestore(&as->lock, flags);
+ return 0;
+}
+
+static void usbout_stop(struct usb_audiodev *as)
+{
+ struct usbout *u = &as->usbout;
+ unsigned long flags;
+ unsigned int i, notkilled = 1;
+
+ spin_lock_irqsave(&as->lock, flags);
+ u->flags &= ~FLG_RUNNING;
+ i = u->flags;
+ spin_unlock_irqrestore(&as->lock, flags);
+ while (i & (FLG_URB0RUNNING|FLG_URB1RUNNING|FLG_SYNC0RUNNING|FLG_SYNC1RUNNING)) {
+ set_current_state(notkilled ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
+ schedule_timeout(1);
+ spin_lock_irqsave(&as->lock, flags);
+ i = u->flags;
+ spin_unlock_irqrestore(&as->lock, flags);
+ if (notkilled && signal_pending(current)) {
+ if (i & FLG_URB0RUNNING)
+ usb_kill_urb(u->durb[0].urb);
+ if (i & FLG_URB1RUNNING)
+ usb_kill_urb(u->durb[1].urb);
+ if (i & FLG_SYNC0RUNNING)
+ usb_kill_urb(u->surb[0].urb);
+ if (i & FLG_SYNC1RUNNING)
+ usb_kill_urb(u->surb[1].urb);
+ notkilled = 0;
+ }
+ }
+ set_current_state(TASK_RUNNING);
+ if (u->durb[0].urb->transfer_buffer)
+ kfree(u->durb[0].urb->transfer_buffer);
+ if (u->durb[1].urb->transfer_buffer)
+ kfree(u->durb[1].urb->transfer_buffer);
+ if (u->surb[0].urb->transfer_buffer)
+ kfree(u->surb[0].urb->transfer_buffer);
+ if (u->surb[1].urb->transfer_buffer)
+ kfree(u->surb[1].urb->transfer_buffer);
+ u->durb[0].urb->transfer_buffer = u->durb[1].urb->transfer_buffer =
+ u->surb[0].urb->transfer_buffer = u->surb[1].urb->transfer_buffer = NULL;
+}
+
+static inline void usbout_release(struct usb_audiodev *as)
+{
+ usbout_stop(as);
+}
+
+static void usbout_disc(struct usb_audiodev *as)
+{
+ struct usbout *u = &as->usbout;
+ unsigned long flags;
+
+ spin_lock_irqsave(&as->lock, flags);
+ u->flags &= ~(FLG_RUNNING | FLG_CONNECTED);
+ spin_unlock_irqrestore(&as->lock, flags);
+ usbout_stop(as);
+}
+
+static void usbout_convert(struct usbout *u, unsigned char *buffer, unsigned int samples)
+{
+ union {
+ __s16 s[64];
+ unsigned char b[0];
+ } tmp;
+ unsigned int scnt, maxs, ufmtsh, dfmtsh;
+
+ ufmtsh = AFMT_BYTESSHIFT(u->format);
+ dfmtsh = AFMT_BYTESSHIFT(u->dma.format);
+ maxs = (AFMT_ISSTEREO(u->dma.format | u->format)) ? 32 : 64;
+ while (samples > 0) {
+ scnt = samples;
+ if (scnt > maxs)
+ scnt = maxs;
+ dmabuf_copyout(&u->dma, tmp.b, scnt << dfmtsh);
+ conversion(tmp.b, u->dma.format, buffer, u->format, tmp.b, scnt);
+ buffer += scnt << ufmtsh;
+ samples -= scnt;
+ }
+}
+
+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;
+
+ ufmtsh = AFMT_BYTESSHIFT(u->format);
+ dfmtsh = AFMT_BYTESSHIFT(u->dma.format);
+ for (i = offs = 0; i < DESCFRAMES; i++) {
+ urb->iso_frame_desc[i].offset = offs;
+ u->phase = (u->phase & 0x3fff) + u->freqm;
+ scnt = u->phase >> 14;
+ if (!scnt) {
+ urb->iso_frame_desc[i].length = 0;
+ continue;
+ }
+ cnt = scnt << dfmtsh;
+ if (!u->dma.mapped) {
+ if (cnt > u->dma.count) {
+ scnt = u->dma.count >> dfmtsh;
+ cnt = scnt << dfmtsh;
+ err++;
+ }
+ u->dma.count -= cnt;
+ } else
+ u->dma.count += cnt;
+ if (u->format == u->dma.format) {
+ /* we do not need format conversion */
+ dmabuf_copyout(&u->dma, cp, cnt);
+ } else {
+ /* we need sampling format conversion */
+ usbout_convert(u, cp, scnt);
+ }
+ cnt = scnt << ufmtsh;
+ urb->iso_frame_desc[i].length = cnt;
+ offs += cnt;
+ cp += cnt;
+ }
+ urb->interval = 1;
+ if (err)
+ u->dma.error++;
+ if (u->dma.mapped) {
+ if (u->dma.count >= (signed)u->dma.fragsize)
+ wake_up(&u->dma.wait);
+ } else {
+ if ((signed)u->dma.dmasize >= u->dma.count + (signed)u->dma.fragsize)
+ wake_up(&u->dma.wait);
+ }
+ return err ? -1 : 0;
+}
+
+/*
+ * return value: 0 if descriptor should be restarted, -1 otherwise
+ */
+static int usbout_retire_desc(struct usbout *u, struct urb *urb)
+{
+ unsigned int i;
+
+ for (i = 0; i < DESCFRAMES; i++) {
+ if (urb->iso_frame_desc[i].status) {
+ dprintk((KERN_DEBUG "usbout_retire_desc: frame %u status %d\n", i, urb->iso_frame_desc[i].status));
+ continue;
+ }
+ }
+ return 0;
+}
+
+static void usbout_completed(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)urb->context;
+ struct usbout *u = &as->usbout;
+ unsigned long flags;
+ unsigned int mask;
+ int suret = 0;
+
+#if 0
+ printk(KERN_DEBUG "usbout_completed: status %d errcnt %d flags 0x%x\n", urb->status, urb->error_count, u->flags);
+#endif
+ if (urb == u->durb[0].urb)
+ mask = FLG_URB0RUNNING;
+ else if (urb == u->durb[1].urb)
+ mask = FLG_URB1RUNNING;
+ else {
+ mask = 0;
+ printk(KERN_ERR "usbout_completed: panic: unknown URB\n");
+ }
+ urb->dev = as->state->usbdev;
+ spin_lock_irqsave(&as->lock, flags);
+ if (!usbout_retire_desc(u, urb) &&
+ u->flags & FLG_RUNNING &&
+ !usbout_prepare_desc(u, urb) &&
+ (suret = usb_submit_urb(urb, GFP_ATOMIC)) == 0) {
+ u->flags |= mask;
+ } else {
+ u->flags &= ~(mask | FLG_RUNNING);
+ wake_up(&u->dma.wait);
+ dprintk((KERN_DEBUG "usbout_completed: descriptor not restarted (usb_submit_urb: %d)\n", suret));
+ }
+ spin_unlock_irqrestore(&as->lock, flags);
+}
+
+static int usbout_sync_prepare_desc(struct usbout *u, struct urb *urb)
+{
+ unsigned int i, offs;
+
+ for (i = offs = 0; i < SYNCFRAMES; i++, offs += 3) {
+ urb->iso_frame_desc[i].length = 3;
+ urb->iso_frame_desc[i].offset = offs;
+ }
+ urb->interval = 1;
+ return 0;
+}
+
+/*
+ * 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;
+
+ for (i = 0; i < SYNCFRAMES; i++, cp += 3) {
+ if (urb->iso_frame_desc[i].status) {
+ dprintk((KERN_DEBUG "usbout_sync_retire_desc: frame %u status %d\n", i, urb->iso_frame_desc[i].status));
+ continue;
+ }
+ if (urb->iso_frame_desc[i].actual_length < 3) {
+ dprintk((KERN_DEBUG "usbout_sync_retire_desc: frame %u length %d\n", i, urb->iso_frame_desc[i].actual_length));
+ continue;
+ }
+ f = cp[0] | (cp[1] << 8) | (cp[2] << 16);
+ if (abs(f - u->freqn) > (u->freqn >> 3) || f > u->freqmax) {
+ printk(KERN_WARNING "usbout_sync_retire_desc: requested frequency %u (nominal %u) out of range!\n", f, u->freqn);
+ continue;
+ }
+ u->freqm = f;
+ }
+ return 0;
+}
+
+static void usbout_sync_completed(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)urb->context;
+ struct usbout *u = &as->usbout;
+ unsigned long flags;
+ unsigned int mask;
+ int suret = 0;
+
+#if 0
+ printk(KERN_DEBUG "usbout_sync_completed: status %d errcnt %d flags 0x%x\n", urb->status, urb->error_count, u->flags);
+#endif
+ if (urb == u->surb[0].urb)
+ mask = FLG_SYNC0RUNNING;
+ else if (urb == u->surb[1].urb)
+ mask = FLG_SYNC1RUNNING;
+ else {
+ mask = 0;
+ printk(KERN_ERR "usbout_sync_completed: panic: unknown URB\n");
+ }
+ urb->dev = as->state->usbdev;
+ spin_lock_irqsave(&as->lock, flags);
+ if (!usbout_sync_retire_desc(u, urb) &&
+ u->flags & FLG_RUNNING &&
+ !usbout_sync_prepare_desc(u, urb) &&
+ (suret = usb_submit_urb(urb, GFP_ATOMIC)) == 0) {
+ u->flags |= mask;
+ } else {
+ u->flags &= ~(mask | FLG_RUNNING);
+ wake_up(&u->dma.wait);
+ dprintk((KERN_DEBUG "usbout_sync_completed: descriptor not restarted (usb_submit_urb: %d)\n", suret));
+ }
+ spin_unlock_irqrestore(&as->lock, flags);
+}
+
+static int usbout_start(struct usb_audiodev *as)
+{
+ struct usb_device *dev = as->state->usbdev;
+ struct usbout *u = &as->usbout;
+ struct urb *urb;
+ unsigned long flags;
+ unsigned int maxsze, bufsz;
+
+#if 0
+ printk(KERN_DEBUG "usbout_start: device %d ufmt 0x%08x dfmt 0x%08x srate %d\n",
+ dev->devnum, u->format, u->dma.format, u->dma.srate);
+#endif
+ /* allocate USB storage if not already done */
+ spin_lock_irqsave(&as->lock, flags);
+ if (!(u->flags & FLG_CONNECTED)) {
+ spin_unlock_irqrestore(&as->lock, flags);
+ return -EIO;
+ }
+ if (!(u->flags & FLG_RUNNING)) {
+ spin_unlock_irqrestore(&as->lock, flags);
+ u->freqn = u->freqm = ((u->dma.srate << 11) + 62) / 125; /* this will overflow at approx 2MSPS */
+ u->freqmax = u->freqn + (u->freqn >> 2);
+ u->phase = 0;
+ maxsze = (u->freqmax + 0x3fff) >> (14 - AFMT_BYTESSHIFT(u->format));
+ bufsz = DESCFRAMES * maxsze;
+ if (u->durb[0].urb->transfer_buffer)
+ kfree(u->durb[0].urb->transfer_buffer);
+ u->durb[0].urb->transfer_buffer = kmalloc(bufsz, GFP_KERNEL);
+ u->durb[0].urb->transfer_buffer_length = bufsz;
+ if (u->durb[1].urb->transfer_buffer)
+ kfree(u->durb[1].urb->transfer_buffer);
+ u->durb[1].urb->transfer_buffer = kmalloc(bufsz, GFP_KERNEL);
+ u->durb[1].urb->transfer_buffer_length = bufsz;
+ if (u->syncpipe) {
+ if (u->surb[0].urb->transfer_buffer)
+ kfree(u->surb[0].urb->transfer_buffer);
+ u->surb[0].urb->transfer_buffer = kmalloc(3*SYNCFRAMES, GFP_KERNEL);
+ u->surb[0].urb->transfer_buffer_length = 3*SYNCFRAMES;
+ if (u->surb[1].urb->transfer_buffer)
+ kfree(u->surb[1].urb->transfer_buffer);
+ u->surb[1].urb->transfer_buffer = kmalloc(3*SYNCFRAMES, GFP_KERNEL);
+ u->surb[1].urb->transfer_buffer_length = 3*SYNCFRAMES;
+ }
+ if (!u->durb[0].urb->transfer_buffer || !u->durb[1].urb->transfer_buffer ||
+ (u->syncpipe && (!u->surb[0].urb->transfer_buffer || !u->surb[1].urb->transfer_buffer))) {
+ printk(KERN_ERR "usbaudio: cannot start playback device %d\n", dev->devnum);
+ return 0;
+ }
+ spin_lock_irqsave(&as->lock, flags);
+ }
+ if (u->dma.count <= 0 && !u->dma.mapped) {
+ spin_unlock_irqrestore(&as->lock, flags);
+ return 0;
+ }
+ u->flags |= FLG_RUNNING;
+ if (!(u->flags & FLG_URB0RUNNING)) {
+ urb = u->durb[0].urb;
+ urb->dev = dev;
+ urb->pipe = u->datapipe;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = DESCFRAMES;
+ urb->context = as;
+ urb->complete = usbout_completed;
+ if (!usbout_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_ATOMIC))
+ u->flags |= FLG_URB0RUNNING;
+ else
+ u->flags &= ~FLG_RUNNING;
+ }
+ if (u->flags & FLG_RUNNING && !(u->flags & FLG_URB1RUNNING)) {
+ urb = u->durb[1].urb;
+ urb->dev = dev;
+ urb->pipe = u->datapipe;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = DESCFRAMES;
+ urb->context = as;
+ urb->complete = usbout_completed;
+ if (!usbout_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_ATOMIC))
+ u->flags |= FLG_URB1RUNNING;
+ else
+ u->flags &= ~FLG_RUNNING;
+ }
+ if (u->syncpipe) {
+ if (u->flags & FLG_RUNNING && !(u->flags & FLG_SYNC0RUNNING)) {
+ urb = u->surb[0].urb;
+ urb->dev = dev;
+ urb->pipe = u->syncpipe;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = SYNCFRAMES;
+ urb->context = as;
+ urb->complete = usbout_sync_completed;
+ /* stride: u->syncinterval */
+ if (!usbout_sync_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_ATOMIC))
+ u->flags |= FLG_SYNC0RUNNING;
+ else
+ u->flags &= ~FLG_RUNNING;
+ }
+ if (u->flags & FLG_RUNNING && !(u->flags & FLG_SYNC1RUNNING)) {
+ urb = u->surb[1].urb;
+ urb->dev = dev;
+ urb->pipe = u->syncpipe;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = SYNCFRAMES;
+ urb->context = as;
+ urb->complete = usbout_sync_completed;
+ /* stride: u->syncinterval */
+ if (!usbout_sync_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_ATOMIC))
+ u->flags |= FLG_SYNC1RUNNING;
+ else
+ u->flags &= ~FLG_RUNNING;
+ }
+ }
+ spin_unlock_irqrestore(&as->lock, flags);
+ return 0;
+}
+
+/* --------------------------------------------------------------------- */
+
+static unsigned int format_goodness(struct audioformat *afp, unsigned int fmt, unsigned int srate)
+{
+ unsigned int g = 0;
+
+ if (srate < afp->sratelo)
+ g += afp->sratelo - srate;
+ if (srate > afp->sratehi)
+ g += srate - afp->sratehi;
+ if (AFMT_ISSTEREO(afp->format) && !AFMT_ISSTEREO(fmt))
+ g += 0x100000;
+ if (!AFMT_ISSTEREO(afp->format) && AFMT_ISSTEREO(fmt))
+ g += 0x400000;
+ if (AFMT_IS16BIT(afp->format) && !AFMT_IS16BIT(fmt))
+ g += 0x100000;
+ if (!AFMT_IS16BIT(afp->format) && AFMT_IS16BIT(fmt))
+ g += 0x400000;
+ return g;
+}
+
+static int find_format(struct audioformat *afp, unsigned int nr, unsigned int fmt, unsigned int srate)
+{
+ unsigned int i, g, gb = ~0;
+ int j = -1; /* default to failure */
+
+ /* find "best" format (according to format_goodness) */
+ for (i = 0; i < nr; i++) {
+ g = format_goodness(&afp[i], fmt, srate);
+ if (g >= gb)
+ continue;
+ j = i;
+ gb = g;
+ }
+ return j;
+}
+
+static int set_format_in(struct usb_audiodev *as)
+{
+ struct usb_device *dev = as->state->usbdev;
+ struct usb_host_interface *alts;
+ struct usb_interface *iface;
+ struct usbin *u = &as->usbin;
+ struct dmabuf *d = &u->dma;
+ struct audioformat *fmt;
+ unsigned int ep;
+ unsigned char data[3];
+ int fmtnr, ret;
+
+ iface = usb_ifnum_to_if(dev, u->interface);
+ if (!iface)
+ return 0;
+
+ fmtnr = find_format(as->fmtin, as->numfmtin, d->format, d->srate);
+ if (fmtnr < 0) {
+ printk(KERN_ERR "usbaudio: set_format_in(): failed to find desired format/speed combination.\n");
+ return -1;
+ }
+
+ fmt = as->fmtin + fmtnr;
+ alts = usb_altnum_to_altsetting(iface, fmt->altsetting);
+ u->format = fmt->format;
+ u->datapipe = usb_rcvisocpipe(dev, alts->endpoint[0].desc.bEndpointAddress & 0xf);
+ u->syncpipe = u->syncinterval = 0;
+ if ((alts->endpoint[0].desc.bmAttributes & 0x0c) == 0x08) {
+ if (alts->desc.bNumEndpoints < 2 ||
+ alts->endpoint[1].desc.bmAttributes != 0x01 ||
+ alts->endpoint[1].desc.bSynchAddress != 0 ||
+ alts->endpoint[1].desc.bEndpointAddress != (alts->endpoint[0].desc.bSynchAddress & 0x7f)) {
+ printk(KERN_WARNING "usbaudio: device %d interface %d altsetting %d claims adaptive in "
+ "but has invalid synch pipe; treating as asynchronous in\n",
+ dev->devnum, u->interface, fmt->altsetting);
+ } else {
+ u->syncpipe = usb_sndisocpipe(dev, alts->endpoint[1].desc.bEndpointAddress & 0xf);
+ u->syncinterval = alts->endpoint[1].desc.bRefresh;
+ }
+ }
+ if (d->srate < fmt->sratelo)
+ d->srate = fmt->sratelo;
+ if (d->srate > fmt->sratehi)
+ d->srate = fmt->sratehi;
+ dprintk((KERN_DEBUG "usbaudio: set_format_in: usb_set_interface %u %u\n",
+ u->interface, fmt->altsetting));
+ if (usb_set_interface(dev, alts->desc.bInterfaceNumber, fmt->altsetting) < 0) {
+ printk(KERN_WARNING "usbaudio: usb_set_interface failed, device %d interface %d altsetting %d\n",
+ dev->devnum, u->interface, fmt->altsetting);
+ return -1;
+ }
+ if (fmt->sratelo == fmt->sratehi)
+ return 0;
+ ep = usb_pipeendpoint(u->datapipe) | (u->datapipe & USB_DIR_IN);
+ /* if endpoint has pitch control, enable it */
+ if (fmt->attributes & 0x02) {
+ data[0] = 1;
+ if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
+ PITCH_CONTROL << 8, ep, data, 1, 1000)) < 0) {
+ printk(KERN_ERR "usbaudio: failure (error %d) to set output pitch control device %d interface %u endpoint 0x%x to %u\n",
+ ret, dev->devnum, u->interface, ep, d->srate);
+ return -1;
+ }
+ }
+ /* if endpoint has sampling rate control, set it */
+ if (fmt->attributes & 0x01) {
+ data[0] = d->srate;
+ data[1] = d->srate >> 8;
+ data[2] = d->srate >> 16;
+ if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
+ SAMPLING_FREQ_CONTROL << 8, ep, data, 3, 1000)) < 0) {
+ printk(KERN_ERR "usbaudio: failure (error %d) to set input sampling frequency device %d interface %u endpoint 0x%x to %u\n",
+ ret, dev->devnum, u->interface, ep, d->srate);
+ return -1;
+ }
+ if ((ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_IN,
+ SAMPLING_FREQ_CONTROL << 8, ep, data, 3, 1000)) < 0) {
+ printk(KERN_ERR "usbaudio: failure (error %d) to get input sampling frequency device %d interface %u endpoint 0x%x\n",
+ ret, dev->devnum, u->interface, ep);
+ return -1;
+ }
+ dprintk((KERN_DEBUG "usbaudio: set_format_in: device %d interface %d altsetting %d srate req: %u real %u\n",
+ dev->devnum, u->interface, fmt->altsetting, d->srate, data[0] | (data[1] << 8) | (data[2] << 16)));
+ d->srate = data[0] | (data[1] << 8) | (data[2] << 16);
+ }
+ dprintk((KERN_DEBUG "usbaudio: set_format_in: USB format 0x%x, DMA format 0x%x srate %u\n", u->format, d->format, d->srate));
+ return 0;
+}
+
+static int set_format_out(struct usb_audiodev *as)
+{
+ struct usb_device *dev = as->state->usbdev;
+ struct usb_host_interface *alts;
+ struct usb_interface *iface;
+ struct usbout *u = &as->usbout;
+ struct dmabuf *d = &u->dma;
+ struct audioformat *fmt;
+ unsigned int ep;
+ unsigned char data[3];
+ int fmtnr, ret;
+
+ iface = usb_ifnum_to_if(dev, u->interface);
+ if (!iface)
+ return 0;
+
+ fmtnr = find_format(as->fmtout, as->numfmtout, d->format, d->srate);
+ if (fmtnr < 0) {
+ printk(KERN_ERR "usbaudio: set_format_out(): failed to find desired format/speed combination.\n");
+ return -1;
+ }
+
+ fmt = as->fmtout + fmtnr;
+ u->format = fmt->format;
+ alts = usb_altnum_to_altsetting(iface, fmt->altsetting);
+ u->datapipe = usb_sndisocpipe(dev, alts->endpoint[0].desc.bEndpointAddress & 0xf);
+ u->syncpipe = u->syncinterval = 0;
+ if ((alts->endpoint[0].desc.bmAttributes & 0x0c) == 0x04) {
+#if 0
+ printk(KERN_DEBUG "bNumEndpoints 0x%02x endpoint[1].bmAttributes 0x%02x\n"
+ KERN_DEBUG "endpoint[1].bSynchAddress 0x%02x endpoint[1].bEndpointAddress 0x%02x\n"
+ KERN_DEBUG "endpoint[0].bSynchAddress 0x%02x\n", alts->bNumEndpoints,
+ alts->endpoint[1].bmAttributes, alts->endpoint[1].bSynchAddress,
+ alts->endpoint[1].bEndpointAddress, alts->endpoint[0].bSynchAddress);
+#endif
+ if (alts->desc.bNumEndpoints < 2 ||
+ alts->endpoint[1].desc.bmAttributes != 0x01 ||
+ alts->endpoint[1].desc.bSynchAddress != 0 ||
+ alts->endpoint[1].desc.bEndpointAddress != (alts->endpoint[0].desc.bSynchAddress | 0x80)) {
+ printk(KERN_WARNING "usbaudio: device %d interface %d altsetting %d claims asynch out "
+ "but has invalid synch pipe; treating as adaptive out\n",
+ dev->devnum, u->interface, fmt->altsetting);
+ } else {
+ u->syncpipe = usb_rcvisocpipe(dev, alts->endpoint[1].desc.bEndpointAddress & 0xf);
+ u->syncinterval = alts->endpoint[1].desc.bRefresh;
+ }
+ }
+ if (d->srate < fmt->sratelo)
+ d->srate = fmt->sratelo;
+ if (d->srate > fmt->sratehi)
+ d->srate = fmt->sratehi;
+ dprintk((KERN_DEBUG "usbaudio: set_format_out: usb_set_interface %u %u\n",
+ u->interface, fmt->altsetting));
+ if (usb_set_interface(dev, u->interface, fmt->altsetting) < 0) {
+ printk(KERN_WARNING "usbaudio: usb_set_interface failed, device %d interface %d altsetting %d\n",
+ dev->devnum, u->interface, fmt->altsetting);
+ return -1;
+ }
+ if (fmt->sratelo == fmt->sratehi)
+ return 0;
+ ep = usb_pipeendpoint(u->datapipe) | (u->datapipe & USB_DIR_IN);
+ /* if endpoint has pitch control, enable it */
+ if (fmt->attributes & 0x02) {
+ data[0] = 1;
+ if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
+ PITCH_CONTROL << 8, ep, data, 1, 1000)) < 0) {
+ printk(KERN_ERR "usbaudio: failure (error %d) to set output pitch control device %d interface %u endpoint 0x%x to %u\n",
+ ret, dev->devnum, u->interface, ep, d->srate);
+ return -1;
+ }
+ }
+ /* if endpoint has sampling rate control, set it */
+ if (fmt->attributes & 0x01) {
+ data[0] = d->srate;
+ data[1] = d->srate >> 8;
+ data[2] = d->srate >> 16;
+ if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
+ SAMPLING_FREQ_CONTROL << 8, ep, data, 3, 1000)) < 0) {
+ printk(KERN_ERR "usbaudio: failure (error %d) to set output sampling frequency device %d interface %u endpoint 0x%x to %u\n",
+ ret, dev->devnum, u->interface, ep, d->srate);
+ return -1;
+ }
+ if ((ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_IN,
+ SAMPLING_FREQ_CONTROL << 8, ep, data, 3, 1000)) < 0) {
+ printk(KERN_ERR "usbaudio: failure (error %d) to get output sampling frequency device %d interface %u endpoint 0x%x\n",
+ ret, dev->devnum, u->interface, ep);
+ return -1;
+ }
+ dprintk((KERN_DEBUG "usbaudio: set_format_out: device %d interface %d altsetting %d srate req: %u real %u\n",
+ dev->devnum, u->interface, fmt->altsetting, d->srate, data[0] | (data[1] << 8) | (data[2] << 16)));
+ d->srate = data[0] | (data[1] << 8) | (data[2] << 16);
+ }
+ dprintk((KERN_DEBUG "usbaudio: set_format_out: USB format 0x%x, DMA format 0x%x srate %u\n", u->format, d->format, d->srate));
+ return 0;
+}
+
+static int set_format(struct usb_audiodev *s, unsigned int fmode, unsigned int fmt, unsigned int srate)
+{
+ int ret1 = 0, ret2 = 0;
+
+ if (!(fmode & (FMODE_READ|FMODE_WRITE)))
+ return -EINVAL;
+ if (fmode & FMODE_READ) {
+ usbin_stop(s);
+ s->usbin.dma.ready = 0;
+ if (fmt == AFMT_QUERY)
+ fmt = s->usbin.dma.format;
+ else
+ s->usbin.dma.format = fmt;
+ if (!srate)
+ srate = s->usbin.dma.srate;
+ else
+ s->usbin.dma.srate = srate;
+ }
+ if (fmode & FMODE_WRITE) {
+ usbout_stop(s);
+ s->usbout.dma.ready = 0;
+ if (fmt == AFMT_QUERY)
+ fmt = s->usbout.dma.format;
+ else
+ s->usbout.dma.format = fmt;
+ if (!srate)
+ srate = s->usbout.dma.srate;
+ else
+ s->usbout.dma.srate = srate;
+ }
+ if (fmode & FMODE_READ)
+ ret1 = set_format_in(s);
+ if (fmode & FMODE_WRITE)
+ ret2 = set_format_out(s);
+ return ret1 ? ret1 : ret2;
+}
+
+/* --------------------------------------------------------------------- */
+
+static int wrmixer(struct usb_mixerdev *ms, unsigned mixch, unsigned value)
+{
+ struct usb_device *dev = ms->state->usbdev;
+ unsigned char data[2];
+ struct mixerchannel *ch;
+ int v1, v2, v3;
+
+ if (mixch >= ms->numch)
+ return -1;
+ ch = &ms->ch[mixch];
+ v3 = ch->maxval - ch->minval;
+ v1 = value & 0xff;
+ v2 = (value >> 8) & 0xff;
+ if (v1 > 100)
+ v1 = 100;
+ if (v2 > 100)
+ v2 = 100;
+ if (!(ch->flags & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT)))
+ v2 = v1;
+ ch->value = v1 | (v2 << 8);
+ v1 = (v1 * v3) / 100 + ch->minval;
+ v2 = (v2 * v3) / 100 + ch->minval;
+ switch (ch->selector) {
+ case 0: /* mixer unit request */
+ data[0] = v1;
+ data[1] = v1 >> 8;
+ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
+ (ch->chnum << 8) | 1, ms->iface | (ch->unitid << 8), data, 2, 1000) < 0)
+ goto err;
+ if (!(ch->flags & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT)))
+ return 0;
+ data[0] = v2;
+ data[1] = v2 >> 8;
+ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
+ ((ch->chnum + !!(ch->flags & MIXFLG_STEREOIN)) << 8) | (1 + !!(ch->flags & MIXFLG_STEREOOUT)),
+ ms->iface | (ch->unitid << 8), data, 2, 1000) < 0)
+ goto err;
+ return 0;
+
+ /* various feature unit controls */
+ case VOLUME_CONTROL:
+ data[0] = v1;
+ data[1] = v1 >> 8;
+ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
+ (ch->selector << 8) | ch->chnum, ms->iface | (ch->unitid << 8), data, 2, 1000) < 0)
+ goto err;
+ if (!(ch->flags & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT)))
+ return 0;
+ data[0] = v2;
+ data[1] = v2 >> 8;
+ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
+ (ch->selector << 8) | (ch->chnum + 1), ms->iface | (ch->unitid << 8), data, 2, 1000) < 0)
+ goto err;
+ return 0;
+
+ case BASS_CONTROL:
+ case MID_CONTROL:
+ case TREBLE_CONTROL:
+ data[0] = v1 >> 8;
+ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
+ (ch->selector << 8) | ch->chnum, ms->iface | (ch->unitid << 8), data, 1, 1000) < 0)
+ goto err;
+ if (!(ch->flags & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT)))
+ return 0;
+ data[0] = v2 >> 8;
+ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
+ (ch->selector << 8) | (ch->chnum + 1), ms->iface | (ch->unitid << 8), data, 1, 1000) < 0)
+ goto err;
+ return 0;
+
+ default:
+ return -1;
+ }
+ return 0;
+
+ err:
+ printk(KERN_ERR "usbaudio: mixer request device %u if %u unit %u ch %u selector %u failed\n",
+ dev->devnum, ms->iface, ch->unitid, ch->chnum, ch->selector);
+ return -1;
+}
+
+static int get_rec_src(struct usb_mixerdev *ms)
+{
+ struct usb_device *dev = ms->state->usbdev;
+ unsigned int mask = 0, retmask = 0;
+ unsigned int i, j;
+ unsigned char buf;
+ int err = 0;
+
+ for (i = 0; i < ms->numch; i++) {
+ if (!ms->ch[i].slctunitid || (mask & (1 << i)))
+ continue;
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ 0, ms->iface | (ms->ch[i].slctunitid << 8), &buf, 1, 1000) < 0) {
+ err = -EIO;
+ printk(KERN_ERR "usbaudio: selector read request device %u if %u unit %u failed\n",
+ dev->devnum, ms->iface, ms->ch[i].slctunitid & 0xff);
+ continue;
+ }
+ for (j = i; j < ms->numch; j++) {
+ if ((ms->ch[i].slctunitid ^ ms->ch[j].slctunitid) & 0xff)
+ continue;
+ mask |= 1 << j;
+ if (buf == (ms->ch[j].slctunitid >> 8))
+ retmask |= 1 << ms->ch[j].osschannel;
+ }
+ }
+ if (err)
+ return -EIO;
+ return retmask;
+}
+
+static int set_rec_src(struct usb_mixerdev *ms, int srcmask)
+{
+ struct usb_device *dev = ms->state->usbdev;
+ unsigned int mask = 0, smask, bmask;
+ unsigned int i, j;
+ unsigned char buf;
+ int err = 0;
+
+ for (i = 0; i < ms->numch; i++) {
+ if (!ms->ch[i].slctunitid || (mask & (1 << i)))
+ continue;
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ 0, ms->iface | (ms->ch[i].slctunitid << 8), &buf, 1, 1000) < 0) {
+ err = -EIO;
+ printk(KERN_ERR "usbaudio: selector read request device %u if %u unit %u failed\n",
+ dev->devnum, ms->iface, ms->ch[i].slctunitid & 0xff);
+ continue;
+ }
+ /* first generate smask */
+ smask = bmask = 0;
+ for (j = i; j < ms->numch; j++) {
+ if ((ms->ch[i].slctunitid ^ ms->ch[j].slctunitid) & 0xff)
+ continue;
+ smask |= 1 << ms->ch[j].osschannel;
+ if (buf == (ms->ch[j].slctunitid >> 8))
+ bmask |= 1 << ms->ch[j].osschannel;
+ mask |= 1 << j;
+ }
+ /* check for multiple set sources */
+ j = hweight32(srcmask & smask);
+ if (j == 0)
+ continue;
+ if (j > 1)
+ srcmask &= ~bmask;
+ for (j = i; j < ms->numch; j++) {
+ if ((ms->ch[i].slctunitid ^ ms->ch[j].slctunitid) & 0xff)
+ continue;
+ if (!(srcmask & (1 << ms->ch[j].osschannel)))
+ continue;
+ buf = ms->ch[j].slctunitid >> 8;
+ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
+ 0, ms->iface | (ms->ch[j].slctunitid << 8), &buf, 1, 1000) < 0) {
+ err = -EIO;
+ printk(KERN_ERR "usbaudio: selector write request device %u if %u unit %u failed\n",
+ dev->devnum, ms->iface, ms->ch[j].slctunitid & 0xff);
+ continue;
+ }
+ }
+ }
+ return err ? -EIO : 0;
+}
+
+/* --------------------------------------------------------------------- */
+
+/*
+ * should be called with open_sem hold, so that no new processes
+ * look at the audio device to be destroyed
+ */
+
+static void release(struct usb_audio_state *s)
+{
+ struct usb_audiodev *as;
+ struct usb_mixerdev *ms;
+
+ s->count--;
+ if (s->count) {
+ up(&open_sem);
+ return;
+ }
+ up(&open_sem);
+ wake_up(&open_wait);
+ while (!list_empty(&s->audiolist)) {
+ as = list_entry(s->audiolist.next, struct usb_audiodev, list);
+ list_del(&as->list);
+ usbin_release(as);
+ usbout_release(as);
+ dmabuf_release(&as->usbin.dma);
+ dmabuf_release(&as->usbout.dma);
+ usb_free_urb(as->usbin.durb[0].urb);
+ usb_free_urb(as->usbin.durb[1].urb);
+ usb_free_urb(as->usbin.surb[0].urb);
+ usb_free_urb(as->usbin.surb[1].urb);
+ usb_free_urb(as->usbout.durb[0].urb);
+ usb_free_urb(as->usbout.durb[1].urb);
+ usb_free_urb(as->usbout.surb[0].urb);
+ usb_free_urb(as->usbout.surb[1].urb);
+ kfree(as);
+ }
+ while (!list_empty(&s->mixerlist)) {
+ ms = list_entry(s->mixerlist.next, struct usb_mixerdev, list);
+ list_del(&ms->list);
+ kfree(ms);
+ }
+ 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);
+}
+
+/* --------------------------------------------------------------------- */
+
+static int usb_audio_open_mixdev(struct inode *inode, struct file *file)
+{
+ unsigned int minor = iminor(inode);
+ struct usb_mixerdev *ms;
+ struct usb_audio_state *s;
+
+ down(&open_sem);
+ list_for_each_entry(s, &audiodevs, audiodev) {
+ list_for_each_entry(ms, &s->mixerlist, list) {
+ if (ms->dev_mixer == minor)
+ goto mixer_found;
+ }
+ }
+ up(&open_sem);
+ return -ENODEV;
+
+ mixer_found:
+ if (!s->usbdev) {
+ up(&open_sem);
+ return -EIO;
+ }
+ file->private_data = ms;
+ s->count++;
+
+ up(&open_sem);
+ return nonseekable_open(inode, file);
+}
+
+static int usb_audio_release_mixdev(struct inode *inode, struct file *file)
+{
+ struct usb_mixerdev *ms = (struct usb_mixerdev *)file->private_data;
+ struct usb_audio_state *s;
+
+ lock_kernel();
+ s = ms->state;
+ down(&open_sem);
+ release(s);
+ unlock_kernel();
+ return 0;
+}
+
+static int usb_audio_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct usb_mixerdev *ms = (struct usb_mixerdev *)file->private_data;
+ int i, j, val;
+ int __user *user_arg = (int __user *)arg;
+
+ if (!ms->state->usbdev)
+ return -ENODEV;
+
+ if (cmd == SOUND_MIXER_INFO) {
+ mixer_info info;
+
+ memset(&info, 0, sizeof(info));
+ strncpy(info.id, "USB_AUDIO", sizeof(info.id));
+ strncpy(info.name, "USB Audio Class Driver", sizeof(info.name));
+ info.modify_counter = ms->modcnt;
+ if (copy_to_user((void __user *)arg, &info, sizeof(info)))
+ return -EFAULT;
+ return 0;
+ }
+ if (cmd == SOUND_OLD_MIXER_INFO) {
+ _old_mixer_info info;
+
+ memset(&info, 0, sizeof(info));
+ strncpy(info.id, "USB_AUDIO", sizeof(info.id));
+ strncpy(info.name, "USB Audio Class Driver", sizeof(info.name));
+ if (copy_to_user((void __user *)arg, &info, sizeof(info)))
+ return -EFAULT;
+ return 0;
+ }
+ if (cmd == OSS_GETVERSION)
+ return put_user(SOUND_VERSION, user_arg);
+ if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+ return -EINVAL;
+ if (_IOC_DIR(cmd) == _IOC_READ) {
+ switch (_IOC_NR(cmd)) {
+ case SOUND_MIXER_RECSRC: /* Arg contains a bit for each recording source */
+ val = get_rec_src(ms);
+ if (val < 0)
+ return val;
+ return put_user(val, user_arg);
+
+ case SOUND_MIXER_DEVMASK: /* Arg contains a bit for each supported device */
+ for (val = i = 0; i < ms->numch; i++)
+ val |= 1 << ms->ch[i].osschannel;
+ return put_user(val, user_arg);
+
+ case SOUND_MIXER_RECMASK: /* Arg contains a bit for each supported recording source */
+ for (val = i = 0; i < ms->numch; i++)
+ if (ms->ch[i].slctunitid)
+ val |= 1 << ms->ch[i].osschannel;
+ return put_user(val, user_arg);
+
+ case SOUND_MIXER_STEREODEVS: /* Mixer channels supporting stereo */
+ for (val = i = 0; i < ms->numch; i++)
+ if (ms->ch[i].flags & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT))
+ val |= 1 << ms->ch[i].osschannel;
+ return put_user(val, user_arg);
+
+ case SOUND_MIXER_CAPS:
+ return put_user(SOUND_CAP_EXCL_INPUT, user_arg);
+
+ default:
+ i = _IOC_NR(cmd);
+ if (i >= SOUND_MIXER_NRDEVICES)
+ return -EINVAL;
+ for (j = 0; j < ms->numch; j++) {
+ if (ms->ch[j].osschannel == i) {
+ return put_user(ms->ch[j].value, user_arg);
+ }
+ }
+ return -EINVAL;
+ }
+ }
+ if (_IOC_DIR(cmd) != (_IOC_READ|_IOC_WRITE))
+ return -EINVAL;
+ ms->modcnt++;
+ switch (_IOC_NR(cmd)) {
+ case SOUND_MIXER_RECSRC: /* Arg contains a bit for each recording source */
+ if (get_user(val, user_arg))
+ return -EFAULT;
+ return set_rec_src(ms, val);
+
+ default:
+ i = _IOC_NR(cmd);
+ if (i >= SOUND_MIXER_NRDEVICES)
+ return -EINVAL;
+ for (j = 0; j < ms->numch && ms->ch[j].osschannel != i; j++);
+ if (j >= ms->numch)
+ return -EINVAL;
+ if (get_user(val, user_arg))
+ return -EFAULT;
+ if (wrmixer(ms, j, val))
+ return -EIO;
+ return put_user(ms->ch[j].value, user_arg);
+ }
+}
+
+static /*const*/ struct file_operations usb_mixer_fops = {
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .ioctl = usb_audio_ioctl_mixdev,
+ .open = usb_audio_open_mixdev,
+ .release = usb_audio_release_mixdev,
+};
+
+/* --------------------------------------------------------------------- */
+
+static int drain_out(struct usb_audiodev *as, int nonblock)
+{
+ DECLARE_WAITQUEUE(wait, current);
+ unsigned long flags;
+ int count, tmo;
+
+ if (as->usbout.dma.mapped || !as->usbout.dma.ready)
+ return 0;
+ usbout_start(as);
+ add_wait_queue(&as->usbout.dma.wait, &wait);
+ for (;;) {
+ __set_current_state(TASK_INTERRUPTIBLE);
+ spin_lock_irqsave(&as->lock, flags);
+ count = as->usbout.dma.count;
+ spin_unlock_irqrestore(&as->lock, flags);
+ if (count <= 0)
+ break;
+ if (signal_pending(current))
+ break;
+ if (nonblock) {
+ remove_wait_queue(&as->usbout.dma.wait, &wait);
+ set_current_state(TASK_RUNNING);
+ return -EBUSY;
+ }
+ tmo = 3 * HZ * count / as->usbout.dma.srate;
+ tmo >>= AFMT_BYTESSHIFT(as->usbout.dma.format);
+ if (!schedule_timeout(tmo + 1)) {
+ printk(KERN_DEBUG "usbaudio: dma timed out??\n");
+ break;
+ }
+ }
+ remove_wait_queue(&as->usbout.dma.wait, &wait);
+ set_current_state(TASK_RUNNING);
+ if (signal_pending(current))
+ return -ERESTARTSYS;
+ return 0;
+}
+
+/* --------------------------------------------------------------------- */
+
+static ssize_t usb_audio_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)file->private_data;
+ DECLARE_WAITQUEUE(wait, current);
+ ssize_t ret = 0;
+ unsigned long flags;
+ unsigned int ptr;
+ int cnt, err;
+
+ if (as->usbin.dma.mapped)
+ return -ENXIO;
+ if (!as->usbin.dma.ready && (ret = prog_dmabuf_in(as)))
+ return ret;
+ if (!access_ok(VERIFY_WRITE, buffer, count))
+ return -EFAULT;
+ add_wait_queue(&as->usbin.dma.wait, &wait);
+ while (count > 0) {
+ spin_lock_irqsave(&as->lock, flags);
+ ptr = as->usbin.dma.rdptr;
+ cnt = as->usbin.dma.count;
+ /* set task state early to avoid wakeup races */
+ if (cnt <= 0)
+ __set_current_state(TASK_INTERRUPTIBLE);
+ spin_unlock_irqrestore(&as->lock, flags);
+ if (cnt > count)
+ cnt = count;
+ if (cnt <= 0) {
+ if (usbin_start(as)) {
+ if (!ret)
+ ret = -ENODEV;
+ break;
+ }
+ if (file->f_flags & O_NONBLOCK) {
+ if (!ret)
+ ret = -EAGAIN;
+ break;
+ }
+ schedule();
+ if (signal_pending(current)) {
+ if (!ret)
+ ret = -ERESTARTSYS;
+ break;
+ }
+ continue;
+ }
+ if ((err = dmabuf_copyout_user(&as->usbin.dma, ptr, buffer, cnt))) {
+ if (!ret)
+ ret = err;
+ break;
+ }
+ ptr += cnt;
+ if (ptr >= as->usbin.dma.dmasize)
+ ptr -= as->usbin.dma.dmasize;
+ spin_lock_irqsave(&as->lock, flags);
+ as->usbin.dma.rdptr = ptr;
+ as->usbin.dma.count -= cnt;
+ spin_unlock_irqrestore(&as->lock, flags);
+ count -= cnt;
+ buffer += cnt;
+ ret += cnt;
+ }
+ __set_current_state(TASK_RUNNING);
+ remove_wait_queue(&as->usbin.dma.wait, &wait);
+ return ret;
+}
+
+static ssize_t usb_audio_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)file->private_data;
+ DECLARE_WAITQUEUE(wait, current);
+ ssize_t ret = 0;
+ unsigned long flags;
+ unsigned int ptr;
+ unsigned int start_thr;
+ int cnt, err;
+
+ if (as->usbout.dma.mapped)
+ return -ENXIO;
+ if (!as->usbout.dma.ready && (ret = prog_dmabuf_out(as)))
+ return ret;
+ if (!access_ok(VERIFY_READ, buffer, count))
+ return -EFAULT;
+ start_thr = (as->usbout.dma.srate << AFMT_BYTESSHIFT(as->usbout.dma.format)) / (1000 / (3 * DESCFRAMES));
+ add_wait_queue(&as->usbout.dma.wait, &wait);
+ while (count > 0) {
+#if 0
+ printk(KERN_DEBUG "usb_audio_write: count %u dma: count %u rdptr %u wrptr %u dmasize %u fragsize %u flags 0x%02x taskst 0x%lx\n",
+ count, as->usbout.dma.count, as->usbout.dma.rdptr, as->usbout.dma.wrptr, as->usbout.dma.dmasize, as->usbout.dma.fragsize,
+ as->usbout.flags, current->state);
+#endif
+ spin_lock_irqsave(&as->lock, flags);
+ if (as->usbout.dma.count < 0) {
+ as->usbout.dma.count = 0;
+ as->usbout.dma.rdptr = as->usbout.dma.wrptr;
+ }
+ ptr = as->usbout.dma.wrptr;
+ cnt = as->usbout.dma.dmasize - as->usbout.dma.count;
+ /* set task state early to avoid wakeup races */
+ if (cnt <= 0)
+ __set_current_state(TASK_INTERRUPTIBLE);
+ spin_unlock_irqrestore(&as->lock, flags);
+ if (cnt > count)
+ cnt = count;
+ if (cnt <= 0) {
+ if (usbout_start(as)) {
+ if (!ret)
+ ret = -ENODEV;
+ break;
+ }
+ if (file->f_flags & O_NONBLOCK) {
+ if (!ret)
+ ret = -EAGAIN;
+ break;
+ }
+ schedule();
+ if (signal_pending(current)) {
+ if (!ret)
+ ret = -ERESTARTSYS;
+ break;
+ }
+ continue;
+ }
+ if ((err = dmabuf_copyin_user(&as->usbout.dma, ptr, buffer, cnt))) {
+ if (!ret)
+ ret = err;
+ break;
+ }
+ ptr += cnt;
+ if (ptr >= as->usbout.dma.dmasize)
+ ptr -= as->usbout.dma.dmasize;
+ spin_lock_irqsave(&as->lock, flags);
+ as->usbout.dma.wrptr = ptr;
+ as->usbout.dma.count += cnt;
+ spin_unlock_irqrestore(&as->lock, flags);
+ count -= cnt;
+ buffer += cnt;
+ ret += cnt;
+ if (as->usbout.dma.count >= start_thr && usbout_start(as)) {
+ if (!ret)
+ ret = -ENODEV;
+ break;
+ }
+ }
+ __set_current_state(TASK_RUNNING);
+ remove_wait_queue(&as->usbout.dma.wait, &wait);
+ return ret;
+}
+
+/* Called without the kernel lock - fine */
+static unsigned int usb_audio_poll(struct file *file, struct poll_table_struct *wait)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)file->private_data;
+ unsigned long flags;
+ unsigned int mask = 0;
+
+ if (file->f_mode & FMODE_WRITE) {
+ if (!as->usbout.dma.ready)
+ prog_dmabuf_out(as);
+ poll_wait(file, &as->usbout.dma.wait, wait);
+ }
+ if (file->f_mode & FMODE_READ) {
+ if (!as->usbin.dma.ready)
+ prog_dmabuf_in(as);
+ poll_wait(file, &as->usbin.dma.wait, wait);
+ }
+ spin_lock_irqsave(&as->lock, flags);
+ if (file->f_mode & FMODE_READ) {
+ if (as->usbin.dma.count >= (signed)as->usbin.dma.fragsize)
+ mask |= POLLIN | POLLRDNORM;
+ }
+ if (file->f_mode & FMODE_WRITE) {
+ if (as->usbout.dma.mapped) {
+ if (as->usbout.dma.count >= (signed)as->usbout.dma.fragsize)
+ mask |= POLLOUT | POLLWRNORM;
+ } else {
+ if ((signed)as->usbout.dma.dmasize >= as->usbout.dma.count + (signed)as->usbout.dma.fragsize)
+ mask |= POLLOUT | POLLWRNORM;
+ }
+ }
+ spin_unlock_irqrestore(&as->lock, flags);
+ return mask;
+}
+
+static int usb_audio_mmap(struct file *file, struct vm_area_struct *vma)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)file->private_data;
+ struct dmabuf *db;
+ int ret = -EINVAL;
+
+ lock_kernel();
+ if (vma->vm_flags & VM_WRITE) {
+ if ((ret = prog_dmabuf_out(as)) != 0)
+ goto out;
+ db = &as->usbout.dma;
+ } else if (vma->vm_flags & VM_READ) {
+ if ((ret = prog_dmabuf_in(as)) != 0)
+ goto out;
+ db = &as->usbin.dma;
+ } else
+ goto out;
+
+ ret = -EINVAL;
+ if (vma->vm_pgoff != 0)
+ goto out;
+
+ ret = dmabuf_mmap(vma, db, vma->vm_start, vma->vm_end - vma->vm_start, vma->vm_page_prot);
+out:
+ unlock_kernel();
+ return ret;
+}
+
+static int usb_audio_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)file->private_data;
+ struct usb_audio_state *s = as->state;
+ int __user *user_arg = (int __user *)arg;
+ unsigned long flags;
+ audio_buf_info abinfo;
+ count_info cinfo;
+ int val = 0;
+ int val2, mapped, ret;
+
+ if (!s->usbdev)
+ return -EIO;
+ mapped = ((file->f_mode & FMODE_WRITE) && as->usbout.dma.mapped) ||
+ ((file->f_mode & FMODE_READ) && as->usbin.dma.mapped);
+#if 0
+ if (arg)
+ get_user(val, (int *)arg);
+ printk(KERN_DEBUG "usbaudio: usb_audio_ioctl cmd=%x arg=%lx *arg=%d\n", cmd, arg, val)
+#endif
+ switch (cmd) {
+ case OSS_GETVERSION:
+ return put_user(SOUND_VERSION, user_arg);
+
+ case SNDCTL_DSP_SYNC:
+ if (file->f_mode & FMODE_WRITE)
+ return drain_out(as, 0/*file->f_flags & O_NONBLOCK*/);
+ return 0;
+
+ case SNDCTL_DSP_SETDUPLEX:
+ return 0;
+
+ case SNDCTL_DSP_GETCAPS:
+ return put_user(DSP_CAP_DUPLEX | DSP_CAP_REALTIME | DSP_CAP_TRIGGER |
+ DSP_CAP_MMAP | DSP_CAP_BATCH, user_arg);
+
+ case SNDCTL_DSP_RESET:
+ if (file->f_mode & FMODE_WRITE) {
+ usbout_stop(as);
+ as->usbout.dma.rdptr = as->usbout.dma.wrptr = as->usbout.dma.count = as->usbout.dma.total_bytes = 0;
+ }
+ if (file->f_mode & FMODE_READ) {
+ usbin_stop(as);
+ as->usbin.dma.rdptr = as->usbin.dma.wrptr = as->usbin.dma.count = as->usbin.dma.total_bytes = 0;
+ }
+ return 0;
+
+ case SNDCTL_DSP_SPEED:
+ if (get_user(val, user_arg))
+ return -EFAULT;
+ if (val >= 0) {
+ if (val < 4000)
+ val = 4000;
+ if (val > 100000)
+ val = 100000;
+ if (set_format(as, file->f_mode, AFMT_QUERY, val))
+ return -EIO;
+ }
+ return put_user((file->f_mode & FMODE_READ) ?
+ as->usbin.dma.srate : as->usbout.dma.srate,
+ user_arg);
+
+ case SNDCTL_DSP_STEREO:
+ if (get_user(val, user_arg))
+ return -EFAULT;
+ val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
+ if (val)
+ val2 |= AFMT_STEREO;
+ else
+ val2 &= ~AFMT_STEREO;
+ if (set_format(as, file->f_mode, val2, 0))
+ return -EIO;
+ return 0;
+
+ case SNDCTL_DSP_CHANNELS:
+ if (get_user(val, user_arg))
+ return -EFAULT;
+ if (val != 0) {
+ val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
+ if (val == 1)
+ val2 &= ~AFMT_STEREO;
+ else
+ val2 |= AFMT_STEREO;
+ if (set_format(as, file->f_mode, val2, 0))
+ return -EIO;
+ }
+ val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
+ return put_user(AFMT_ISSTEREO(val2) ? 2 : 1, user_arg);
+
+ case SNDCTL_DSP_GETFMTS: /* Returns a mask */
+ return put_user(AFMT_U8 | AFMT_U16_LE | AFMT_U16_BE |
+ AFMT_S8 | AFMT_S16_LE | AFMT_S16_BE, user_arg);
+
+ case SNDCTL_DSP_SETFMT: /* Selects ONE fmt*/
+ if (get_user(val, user_arg))
+ return -EFAULT;
+ if (val != AFMT_QUERY) {
+ if (hweight32(val) != 1)
+ return -EINVAL;
+ if (!(val & (AFMT_U8 | AFMT_U16_LE | AFMT_U16_BE |
+ AFMT_S8 | AFMT_S16_LE | AFMT_S16_BE)))
+ return -EINVAL;
+ val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
+ val |= val2 & AFMT_STEREO;
+ if (set_format(as, file->f_mode, val, 0))
+ return -EIO;
+ }
+ val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
+ return put_user(val2 & ~AFMT_STEREO, user_arg);
+
+ case SNDCTL_DSP_POST:
+ return 0;
+
+ case SNDCTL_DSP_GETTRIGGER:
+ val = 0;
+ if (file->f_mode & FMODE_READ && as->usbin.flags & FLG_RUNNING)
+ val |= PCM_ENABLE_INPUT;
+ if (file->f_mode & FMODE_WRITE && as->usbout.flags & FLG_RUNNING)
+ val |= PCM_ENABLE_OUTPUT;
+ return put_user(val, user_arg);
+
+ case SNDCTL_DSP_SETTRIGGER:
+ if (get_user(val, user_arg))
+ return -EFAULT;
+ if (file->f_mode & FMODE_READ) {
+ if (val & PCM_ENABLE_INPUT) {
+ if (!as->usbin.dma.ready && (ret = prog_dmabuf_in(as)))
+ return ret;
+ if (usbin_start(as))
+ return -ENODEV;
+ } else
+ usbin_stop(as);
+ }
+ if (file->f_mode & FMODE_WRITE) {
+ if (val & PCM_ENABLE_OUTPUT) {
+ if (!as->usbout.dma.ready && (ret = prog_dmabuf_out(as)))
+ return ret;
+ if (usbout_start(as))
+ return -ENODEV;
+ } else
+ usbout_stop(as);
+ }
+ return 0;
+
+ case SNDCTL_DSP_GETOSPACE:
+ if (!(file->f_mode & FMODE_WRITE))
+ return -EINVAL;
+ if (!(as->usbout.flags & FLG_RUNNING) && (val = prog_dmabuf_out(as)) != 0)
+ return val;
+ spin_lock_irqsave(&as->lock, flags);
+ abinfo.fragsize = as->usbout.dma.fragsize;
+ abinfo.bytes = as->usbout.dma.dmasize - as->usbout.dma.count;
+ abinfo.fragstotal = as->usbout.dma.numfrag;
+ abinfo.fragments = abinfo.bytes >> as->usbout.dma.fragshift;
+ spin_unlock_irqrestore(&as->lock, flags);
+ return copy_to_user((void __user *)arg, &abinfo, sizeof(abinfo)) ? -EFAULT : 0;
+
+ case SNDCTL_DSP_GETISPACE:
+ if (!(file->f_mode & FMODE_READ))
+ return -EINVAL;
+ if (!(as->usbin.flags & FLG_RUNNING) && (val = prog_dmabuf_in(as)) != 0)
+ return val;
+ spin_lock_irqsave(&as->lock, flags);
+ abinfo.fragsize = as->usbin.dma.fragsize;
+ abinfo.bytes = as->usbin.dma.count;
+ abinfo.fragstotal = as->usbin.dma.numfrag;
+ abinfo.fragments = abinfo.bytes >> as->usbin.dma.fragshift;
+ spin_unlock_irqrestore(&as->lock, flags);
+ return copy_to_user((void __user *)arg, &abinfo, sizeof(abinfo)) ? -EFAULT : 0;
+
+ case SNDCTL_DSP_NONBLOCK:
+ file->f_flags |= O_NONBLOCK;
+ return 0;
+
+ case SNDCTL_DSP_GETODELAY:
+ if (!(file->f_mode & FMODE_WRITE))
+ return -EINVAL;
+ spin_lock_irqsave(&as->lock, flags);
+ val = as->usbout.dma.count;
+ spin_unlock_irqrestore(&as->lock, flags);
+ return put_user(val, user_arg);
+
+ case SNDCTL_DSP_GETIPTR:
+ if (!(file->f_mode & FMODE_READ))
+ return -EINVAL;
+ spin_lock_irqsave(&as->lock, flags);
+ cinfo.bytes = as->usbin.dma.total_bytes;
+ cinfo.blocks = as->usbin.dma.count >> as->usbin.dma.fragshift;
+ cinfo.ptr = as->usbin.dma.wrptr;
+ if (as->usbin.dma.mapped)
+ as->usbin.dma.count &= as->usbin.dma.fragsize-1;
+ spin_unlock_irqrestore(&as->lock, flags);
+ if (copy_to_user((void __user *)arg, &cinfo, sizeof(cinfo)))
+ return -EFAULT;
+ return 0;
+
+ case SNDCTL_DSP_GETOPTR:
+ if (!(file->f_mode & FMODE_WRITE))
+ return -EINVAL;
+ spin_lock_irqsave(&as->lock, flags);
+ cinfo.bytes = as->usbout.dma.total_bytes;
+ cinfo.blocks = as->usbout.dma.count >> as->usbout.dma.fragshift;
+ cinfo.ptr = as->usbout.dma.rdptr;
+ if (as->usbout.dma.mapped)
+ as->usbout.dma.count &= as->usbout.dma.fragsize-1;
+ spin_unlock_irqrestore(&as->lock, flags);
+ if (copy_to_user((void __user *)arg, &cinfo, sizeof(cinfo)))
+ return -EFAULT;
+ return 0;
+
+ case SNDCTL_DSP_GETBLKSIZE:
+ if (file->f_mode & FMODE_WRITE) {
+ if ((val = prog_dmabuf_out(as)))
+ return val;
+ return put_user(as->usbout.dma.fragsize, user_arg);
+ }
+ if ((val = prog_dmabuf_in(as)))
+ return val;
+ return put_user(as->usbin.dma.fragsize, user_arg);
+
+ case SNDCTL_DSP_SETFRAGMENT:
+ if (get_user(val, user_arg))
+ return -EFAULT;
+ if (file->f_mode & FMODE_READ) {
+ as->usbin.dma.ossfragshift = val & 0xffff;
+ as->usbin.dma.ossmaxfrags = (val >> 16) & 0xffff;
+ if (as->usbin.dma.ossfragshift < 4)
+ as->usbin.dma.ossfragshift = 4;
+ if (as->usbin.dma.ossfragshift > 15)
+ as->usbin.dma.ossfragshift = 15;
+ if (as->usbin.dma.ossmaxfrags < 4)
+ as->usbin.dma.ossmaxfrags = 4;
+ }
+ if (file->f_mode & FMODE_WRITE) {
+ as->usbout.dma.ossfragshift = val & 0xffff;
+ as->usbout.dma.ossmaxfrags = (val >> 16) & 0xffff;
+ if (as->usbout.dma.ossfragshift < 4)
+ as->usbout.dma.ossfragshift = 4;
+ if (as->usbout.dma.ossfragshift > 15)
+ as->usbout.dma.ossfragshift = 15;
+ if (as->usbout.dma.ossmaxfrags < 4)
+ as->usbout.dma.ossmaxfrags = 4;
+ }
+ return 0;
+
+ case SNDCTL_DSP_SUBDIVIDE:
+ if ((file->f_mode & FMODE_READ && as->usbin.dma.subdivision) ||
+ (file->f_mode & FMODE_WRITE && as->usbout.dma.subdivision))
+ return -EINVAL;
+ if (get_user(val, user_arg))
+ return -EFAULT;
+ if (val != 1 && val != 2 && val != 4)
+ return -EINVAL;
+ if (file->f_mode & FMODE_READ)
+ as->usbin.dma.subdivision = val;
+ if (file->f_mode & FMODE_WRITE)
+ as->usbout.dma.subdivision = val;
+ return 0;
+
+ case SOUND_PCM_READ_RATE:
+ return put_user((file->f_mode & FMODE_READ) ?
+ as->usbin.dma.srate : as->usbout.dma.srate,
+ user_arg);
+
+ case SOUND_PCM_READ_CHANNELS:
+ val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
+ return put_user(AFMT_ISSTEREO(val2) ? 2 : 1, user_arg);
+
+ case SOUND_PCM_READ_BITS:
+ val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
+ return put_user(AFMT_IS16BIT(val2) ? 16 : 8, user_arg);
+
+ case SOUND_PCM_WRITE_FILTER:
+ case SNDCTL_DSP_SETSYNCRO:
+ case SOUND_PCM_READ_FILTER:
+ return -EINVAL;
+ }
+ dprintk((KERN_DEBUG "usbaudio: usb_audio_ioctl - no command found\n"));
+ return -ENOIOCTLCMD;
+}
+
+static int usb_audio_open(struct inode *inode, struct file *file)
+{
+ unsigned int minor = iminor(inode);
+ DECLARE_WAITQUEUE(wait, current);
+ struct usb_audiodev *as;
+ struct usb_audio_state *s;
+
+ for (;;) {
+ down(&open_sem);
+ list_for_each_entry(s, &audiodevs, audiodev) {
+ list_for_each_entry(as, &s->audiolist, list) {
+ if (!((as->dev_audio ^ minor) & ~0xf))
+ goto device_found;
+ }
+ }
+ up(&open_sem);
+ return -ENODEV;
+
+ device_found:
+ if (!s->usbdev) {
+ up(&open_sem);
+ return -EIO;
+ }
+ /* wait for device to become free */
+ if (!(as->open_mode & file->f_mode))
+ break;
+ if (file->f_flags & O_NONBLOCK) {
+ up(&open_sem);
+ return -EBUSY;
+ }
+ __set_current_state(TASK_INTERRUPTIBLE);
+ add_wait_queue(&open_wait, &wait);
+ up(&open_sem);
+ schedule();
+ __set_current_state(TASK_RUNNING);
+ remove_wait_queue(&open_wait, &wait);
+ if (signal_pending(current))
+ return -ERESTARTSYS;
+ }
+ if (file->f_mode & FMODE_READ)
+ as->usbin.dma.ossfragshift = as->usbin.dma.ossmaxfrags = as->usbin.dma.subdivision = 0;
+ if (file->f_mode & FMODE_WRITE)
+ as->usbout.dma.ossfragshift = as->usbout.dma.ossmaxfrags = as->usbout.dma.subdivision = 0;
+ if (set_format(as, file->f_mode, ((minor & 0xf) == SND_DEV_DSP16) ? AFMT_S16_LE : AFMT_U8 /* AFMT_ULAW */, 8000)) {
+ up(&open_sem);
+ return -EIO;
+ }
+ file->private_data = as;
+ as->open_mode |= file->f_mode & (FMODE_READ | FMODE_WRITE);
+ s->count++;
+ up(&open_sem);
+ return nonseekable_open(inode, file);
+}
+
+static int usb_audio_release(struct inode *inode, struct file *file)
+{
+ struct usb_audiodev *as = (struct usb_audiodev *)file->private_data;
+ struct usb_audio_state *s;
+ struct usb_device *dev;
+
+ lock_kernel();
+ s = as->state;
+ dev = s->usbdev;
+ if (file->f_mode & FMODE_WRITE)
+ drain_out(as, file->f_flags & O_NONBLOCK);
+ down(&open_sem);
+ if (file->f_mode & FMODE_WRITE) {
+ usbout_stop(as);
+ if (dev && as->usbout.interface >= 0)
+ usb_set_interface(dev, as->usbout.interface, 0);
+ dmabuf_release(&as->usbout.dma);
+ usbout_release(as);
+ }
+ if (file->f_mode & FMODE_READ) {
+ usbin_stop(as);
+ if (dev && as->usbin.interface >= 0)
+ usb_set_interface(dev, as->usbin.interface, 0);
+ dmabuf_release(&as->usbin.dma);
+ usbin_release(as);
+ }
+ as->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE);
+ release(s);
+ wake_up(&open_wait);
+ unlock_kernel();
+ return 0;
+}
+
+static /*const*/ struct file_operations usb_audio_fops = {
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .read = usb_audio_read,
+ .write = usb_audio_write,
+ .poll = usb_audio_poll,
+ .ioctl = usb_audio_ioctl,
+ .mmap = usb_audio_mmap,
+ .open = usb_audio_open,
+ .release = usb_audio_release,
+};
+
+/* --------------------------------------------------------------------- */
+
+static int usb_audio_probe(struct usb_interface *iface,
+ const struct usb_device_id *id);
+static void usb_audio_disconnect(struct usb_interface *iface);
+
+static struct usb_device_id usb_audio_ids [] = {
+ { .match_flags = (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS),
+ .bInterfaceClass = USB_CLASS_AUDIO, .bInterfaceSubClass = 1},
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, usb_audio_ids);
+
+static struct usb_driver usb_audio_driver = {
+ .owner = THIS_MODULE,
+ .name = "audio",
+ .probe = usb_audio_probe,
+ .disconnect = usb_audio_disconnect,
+ .id_table = usb_audio_ids,
+};
+
+static void *find_descriptor(void *descstart, unsigned int desclen, void *after,
+ u8 dtype, int iface, int altsetting)
+{
+ u8 *p, *end, *next;
+ int ifc = -1, as = -1;
+
+ p = descstart;
+ end = p + desclen;
+ for (; p < end;) {
+ if (p[0] < 2)
+ return NULL;
+ next = p + p[0];
+ if (next > end)
+ return NULL;
+ if (p[1] == USB_DT_INTERFACE) {
+ /* minimum length of interface descriptor */
+ if (p[0] < 9)
+ return NULL;
+ ifc = p[2];
+ as = p[3];
+ }
+ if (p[1] == dtype && (!after || (void *)p > after) &&
+ (iface == -1 || iface == ifc) && (altsetting == -1 || altsetting == as)) {
+ return p;
+ }
+ p = next;
+ }
+ return NULL;
+}
+
+static void *find_csinterface_descriptor(void *descstart, unsigned int desclen, void *after, u8 dsubtype, int iface, int altsetting)
+{
+ unsigned char *p;
+
+ p = find_descriptor(descstart, desclen, after, USB_DT_CS_INTERFACE, iface, altsetting);
+ while (p) {
+ if (p[0] >= 3 && p[2] == dsubtype)
+ return p;
+ p = find_descriptor(descstart, desclen, p, USB_DT_CS_INTERFACE, iface, altsetting);
+ }
+ return NULL;
+}
+
+static void *find_audiocontrol_unit(void *descstart, unsigned int desclen, void *after, u8 unit, int iface)
+{
+ unsigned char *p;
+
+ p = find_descriptor(descstart, desclen, after, USB_DT_CS_INTERFACE, iface, -1);
+ while (p) {
+ if (p[0] >= 4 && p[2] >= INPUT_TERMINAL && p[2] <= EXTENSION_UNIT && p[3] == unit)
+ return p;
+ p = find_descriptor(descstart, desclen, p, USB_DT_CS_INTERFACE, iface, -1);
+ }
+ return NULL;
+}
+
+static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *buffer, unsigned int buflen, int asifin, int asifout)
+{
+ struct usb_device *dev = s->usbdev;
+ struct usb_audiodev *as;
+ struct usb_host_interface *alts;
+ struct usb_interface *iface;
+ struct audioformat *fp;
+ unsigned char *fmt, *csep;
+ unsigned int i, j, k, format, idx;
+
+ if (!(as = kmalloc(sizeof(struct usb_audiodev), GFP_KERNEL)))
+ return;
+ memset(as, 0, sizeof(struct usb_audiodev));
+ init_waitqueue_head(&as->usbin.dma.wait);
+ init_waitqueue_head(&as->usbout.dma.wait);
+ spin_lock_init(&as->lock);
+ as->usbin.durb[0].urb = usb_alloc_urb (DESCFRAMES, GFP_KERNEL);
+ as->usbin.durb[1].urb = usb_alloc_urb (DESCFRAMES, GFP_KERNEL);
+ as->usbin.surb[0].urb = usb_alloc_urb (SYNCFRAMES, GFP_KERNEL);
+ as->usbin.surb[1].urb = usb_alloc_urb (SYNCFRAMES, GFP_KERNEL);
+ as->usbout.durb[0].urb = usb_alloc_urb (DESCFRAMES, GFP_KERNEL);
+ as->usbout.durb[1].urb = usb_alloc_urb (DESCFRAMES, GFP_KERNEL);
+ as->usbout.surb[0].urb = usb_alloc_urb (SYNCFRAMES, GFP_KERNEL);
+ as->usbout.surb[1].urb = usb_alloc_urb (SYNCFRAMES, GFP_KERNEL);
+ if ((!as->usbin.durb[0].urb) ||
+ (!as->usbin.durb[1].urb) ||
+ (!as->usbin.surb[0].urb) ||
+ (!as->usbin.surb[1].urb) ||
+ (!as->usbout.durb[0].urb) ||
+ (!as->usbout.durb[1].urb) ||
+ (!as->usbout.surb[0].urb) ||
+ (!as->usbout.surb[1].urb)) {
+ usb_free_urb(as->usbin.durb[0].urb);
+ usb_free_urb(as->usbin.durb[1].urb);
+ usb_free_urb(as->usbin.surb[0].urb);
+ usb_free_urb(as->usbin.surb[1].urb);
+ usb_free_urb(as->usbout.durb[0].urb);
+ usb_free_urb(as->usbout.durb[1].urb);
+ usb_free_urb(as->usbout.surb[0].urb);
+ usb_free_urb(as->usbout.surb[1].urb);
+ kfree(as);
+ return;
+ }
+ as->state = s;
+ as->usbin.interface = asifin;
+ as->usbout.interface = asifout;
+ /* search for input formats */
+ if (asifin >= 0) {
+ as->usbin.flags = FLG_CONNECTED;
+ iface = usb_ifnum_to_if(dev, asifin);
+ for (idx = 0; idx < iface->num_altsetting; idx++) {
+ alts = &iface->altsetting[idx];
+ i = alts->desc.bAlternateSetting;
+ if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || alts->desc.bInterfaceSubClass != 2)
+ continue;
+ if (alts->desc.bNumEndpoints < 1) {
+ if (i != 0) { /* altsetting 0 has no endpoints (Section B.3.4.1) */
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u does not have an endpoint\n",
+ dev->devnum, asifin, i);
+ }
+ continue;
+ }
+ if ((alts->endpoint[0].desc.bmAttributes & 0x03) != 0x01 ||
+ !(alts->endpoint[0].desc.bEndpointAddress & 0x80)) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u first endpoint not isochronous in\n",
+ dev->devnum, asifin, i);
+ continue;
+ }
+ fmt = find_csinterface_descriptor(buffer, buflen, NULL, AS_GENERAL, asifin, i);
+ if (!fmt) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found\n",
+ dev->devnum, asifin, i);
+ continue;
+ }
+ if (fmt[0] < 7 || fmt[6] != 0 || (fmt[5] != 1 && fmt[5] != 2)) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u format not supported\n",
+ dev->devnum, asifin, i);
+ continue;
+ }
+ format = (fmt[5] == 2) ? (AFMT_U16_LE | AFMT_U8) : (AFMT_S16_LE | AFMT_S8);
+ fmt = find_csinterface_descriptor(buffer, buflen, NULL, FORMAT_TYPE, asifin, i);
+ if (!fmt) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found\n",
+ dev->devnum, asifin, i);
+ continue;
+ }
+ if (fmt[0] < 8+3*(fmt[7] ? fmt[7] : 2) || fmt[3] != 1) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not supported\n",
+ dev->devnum, asifin, i);
+ continue;
+ }
+ if (fmt[4] < 1 || fmt[4] > 2 || fmt[5] < 1 || fmt[5] > 2) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u unsupported channels %u framesize %u\n",
+ dev->devnum, asifin, i, fmt[4], fmt[5]);
+ continue;
+ }
+ csep = find_descriptor(buffer, buflen, NULL, USB_DT_CS_ENDPOINT, asifin, i);
+ if (!csep || csep[0] < 7 || csep[2] != EP_GENERAL) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u no or invalid class specific endpoint descriptor\n",
+ dev->devnum, asifin, i);
+ continue;
+ }
+ if (as->numfmtin >= MAXFORMATS)
+ continue;
+ fp = &as->fmtin[as->numfmtin++];
+ if (fmt[5] == 2)
+ format &= (AFMT_U16_LE | AFMT_S16_LE);
+ else
+ format &= (AFMT_U8 | AFMT_S8);
+ if (fmt[4] == 2)
+ format |= AFMT_STEREO;
+ fp->format = format;
+ fp->altsetting = i;
+ fp->sratelo = fp->sratehi = fmt[8] | (fmt[9] << 8) | (fmt[10] << 16);
+ printk(KERN_INFO "usbaudio: valid input sample rate %u\n", fp->sratelo);
+ for (j = fmt[7] ? (fmt[7]-1) : 1; j > 0; j--) {
+ k = fmt[8+3*j] | (fmt[9+3*j] << 8) | (fmt[10+3*j] << 16);
+ printk(KERN_INFO "usbaudio: valid input sample rate %u\n", k);
+ if (k > fp->sratehi)
+ fp->sratehi = k;
+ if (k < fp->sratelo)
+ fp->sratelo = k;
+ }
+ fp->attributes = csep[3];
+ printk(KERN_INFO "usbaudio: device %u interface %u altsetting %u: format 0x%08x sratelo %u sratehi %u attributes 0x%02x\n",
+ dev->devnum, asifin, i, fp->format, fp->sratelo, fp->sratehi, fp->attributes);
+ }
+ }
+ /* search for output formats */
+ if (asifout >= 0) {
+ as->usbout.flags = FLG_CONNECTED;
+ iface = usb_ifnum_to_if(dev, asifout);
+ for (idx = 0; idx < iface->num_altsetting; idx++) {
+ alts = &iface->altsetting[idx];
+ i = alts->desc.bAlternateSetting;
+ if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || alts->desc.bInterfaceSubClass != 2)
+ continue;
+ if (alts->desc.bNumEndpoints < 1) {
+ /* altsetting 0 should never have iso EPs */
+ if (i != 0)
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u does not have an endpoint\n",
+ dev->devnum, asifout, i);
+ continue;
+ }
+ if ((alts->endpoint[0].desc.bmAttributes & 0x03) != 0x01 ||
+ (alts->endpoint[0].desc.bEndpointAddress & 0x80)) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u first endpoint not isochronous out\n",
+ dev->devnum, asifout, i);
+ continue;
+ }
+ /* See USB audio formats manual, section 2 */
+ fmt = find_csinterface_descriptor(buffer, buflen, NULL, AS_GENERAL, asifout, i);
+ if (!fmt) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found\n",
+ dev->devnum, asifout, i);
+ continue;
+ }
+ if (fmt[0] < 7 || fmt[6] != 0 || (fmt[5] != 1 && fmt[5] != 2)) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u format not supported\n",
+ dev->devnum, asifout, i);
+ continue;
+ }
+ format = (fmt[5] == 2) ? (AFMT_U16_LE | AFMT_U8) : (AFMT_S16_LE | AFMT_S8);
+ /* Dallas DS4201 workaround */
+ if (le16_to_cpu(dev->descriptor.idVendor) == 0x04fa &&
+ le16_to_cpu(dev->descriptor.idProduct) == 0x4201)
+ format = (AFMT_S16_LE | AFMT_S8);
+ fmt = find_csinterface_descriptor(buffer, buflen, NULL, FORMAT_TYPE, asifout, i);
+ if (!fmt) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found\n",
+ dev->devnum, asifout, i);
+ continue;
+ }
+ if (fmt[0] < 8+3*(fmt[7] ? fmt[7] : 2) || fmt[3] != 1) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not supported\n",
+ dev->devnum, asifout, i);
+ continue;
+ }
+ if (fmt[4] < 1 || fmt[4] > 2 || fmt[5] < 1 || fmt[5] > 2) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u unsupported channels %u framesize %u\n",
+ dev->devnum, asifout, i, fmt[4], fmt[5]);
+ continue;
+ }
+ csep = find_descriptor(buffer, buflen, NULL, USB_DT_CS_ENDPOINT, asifout, i);
+ if (!csep || csep[0] < 7 || csep[2] != EP_GENERAL) {
+ printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u no or invalid class specific endpoint descriptor\n",
+ dev->devnum, asifout, i);
+ continue;
+ }
+ if (as->numfmtout >= MAXFORMATS)
+ continue;
+ fp = &as->fmtout[as->numfmtout++];
+ if (fmt[5] == 2)
+ format &= (AFMT_U16_LE | AFMT_S16_LE);
+ else
+ format &= (AFMT_U8 | AFMT_S8);
+ if (fmt[4] == 2)
+ format |= AFMT_STEREO;
+ fp->format = format;
+ fp->altsetting = i;
+ fp->sratelo = fp->sratehi = fmt[8] | (fmt[9] << 8) | (fmt[10] << 16);
+ printk(KERN_INFO "usbaudio: valid output sample rate %u\n", fp->sratelo);
+ for (j = fmt[7] ? (fmt[7]-1) : 1; j > 0; j--) {
+ k = fmt[8+3*j] | (fmt[9+3*j] << 8) | (fmt[10+3*j] << 16);
+ printk(KERN_INFO "usbaudio: valid output sample rate %u\n", k);
+ if (k > fp->sratehi)
+ fp->sratehi = k;
+ if (k < fp->sratelo)
+ fp->sratelo = k;
+ }
+ fp->attributes = csep[3];
+ printk(KERN_INFO "usbaudio: device %u interface %u altsetting %u: format 0x%08x sratelo %u sratehi %u attributes 0x%02x\n",
+ dev->devnum, asifout, i, fp->format, fp->sratelo, fp->sratehi, fp->attributes);
+ }
+ }
+ if (as->numfmtin == 0 && as->numfmtout == 0) {
+ usb_free_urb(as->usbin.durb[0].urb);
+ usb_free_urb(as->usbin.durb[1].urb);
+ usb_free_urb(as->usbin.surb[0].urb);
+ usb_free_urb(as->usbin.surb[1].urb);
+ usb_free_urb(as->usbout.durb[0].urb);
+ usb_free_urb(as->usbout.durb[1].urb);
+ usb_free_urb(as->usbout.surb[0].urb);
+ usb_free_urb(as->usbout.surb[1].urb);
+ kfree(as);
+ return;
+ }
+ if ((as->dev_audio = register_sound_dsp(&usb_audio_fops, -1)) < 0) {
+ printk(KERN_ERR "usbaudio: cannot register dsp\n");
+ usb_free_urb(as->usbin.durb[0].urb);
+ usb_free_urb(as->usbin.durb[1].urb);
+ usb_free_urb(as->usbin.surb[0].urb);
+ usb_free_urb(as->usbin.surb[1].urb);
+ usb_free_urb(as->usbout.durb[0].urb);
+ usb_free_urb(as->usbout.durb[1].urb);
+ usb_free_urb(as->usbout.surb[0].urb);
+ usb_free_urb(as->usbout.surb[1].urb);
+ kfree(as);
+ return;
+ }
+ printk(KERN_INFO "usbaudio: registered dsp 14,%d\n", as->dev_audio);
+ /* everything successful */
+ list_add_tail(&as->list, &s->audiolist);
+}
+
+struct consmixstate {
+ struct usb_audio_state *s;
+ unsigned char *buffer;
+ unsigned int buflen;
+ unsigned int ctrlif;
+ struct mixerchannel mixch[SOUND_MIXER_NRDEVICES];
+ unsigned int nrmixch;
+ unsigned int mixchmask;
+ unsigned long unitbitmap[32/sizeof(unsigned long)];
+ /* return values */
+ unsigned int nrchannels;
+ unsigned int termtype;
+ unsigned int chconfig;
+};
+
+static struct mixerchannel *getmixchannel(struct consmixstate *state, unsigned int nr)
+{
+ struct mixerchannel *c;
+
+ if (nr >= SOUND_MIXER_NRDEVICES) {
+ printk(KERN_ERR "usbaudio: invalid OSS mixer channel %u\n", nr);
+ return NULL;
+ }
+ if (!(state->mixchmask & (1 << nr))) {
+ printk(KERN_WARNING "usbaudio: OSS mixer channel %u already in use\n", nr);
+ return NULL;
+ }
+ c = &state->mixch[state->nrmixch++];
+ c->osschannel = nr;
+ state->mixchmask &= ~(1 << nr);
+ return c;
+}
+
+static unsigned int getvolchannel(struct consmixstate *state)
+{
+ unsigned int u;
+
+ if ((state->termtype & 0xff00) == 0x0000 && (state->mixchmask & SOUND_MASK_VOLUME))
+ return SOUND_MIXER_VOLUME;
+ if ((state->termtype & 0xff00) == 0x0100) {
+ if (state->mixchmask & SOUND_MASK_PCM)
+ return SOUND_MIXER_PCM;
+ if (state->mixchmask & SOUND_MASK_ALTPCM)
+ return SOUND_MIXER_ALTPCM;
+ }
+ if ((state->termtype & 0xff00) == 0x0200 && (state->mixchmask & SOUND_MASK_MIC))
+ return SOUND_MIXER_MIC;
+ if ((state->termtype & 0xff00) == 0x0300 && (state->mixchmask & SOUND_MASK_SPEAKER))
+ return SOUND_MIXER_SPEAKER;
+ if ((state->termtype & 0xff00) == 0x0500) {
+ if (state->mixchmask & SOUND_MASK_PHONEIN)
+ return SOUND_MIXER_PHONEIN;
+ if (state->mixchmask & SOUND_MASK_PHONEOUT)
+ return SOUND_MIXER_PHONEOUT;
+ }
+ if (state->termtype >= 0x710 && state->termtype <= 0x711 && (state->mixchmask & SOUND_MASK_RADIO))
+ return SOUND_MIXER_RADIO;
+ if (state->termtype >= 0x709 && state->termtype <= 0x70f && (state->mixchmask & SOUND_MASK_VIDEO))
+ return SOUND_MIXER_VIDEO;
+ u = ffs(state->mixchmask & (SOUND_MASK_LINE | SOUND_MASK_CD | SOUND_MASK_LINE1 | SOUND_MASK_LINE2 | SOUND_MASK_LINE3 |
+ SOUND_MASK_DIGITAL1 | SOUND_MASK_DIGITAL2 | SOUND_MASK_DIGITAL3));
+ return u-1;
+}
+
+static void prepmixch(struct consmixstate *state)
+{
+ struct usb_device *dev = state->s->usbdev;
+ struct mixerchannel *ch;
+ unsigned char *buf;
+ __s16 v1;
+ unsigned int v2, v3;
+
+ if (!state->nrmixch || state->nrmixch > SOUND_MIXER_NRDEVICES)
+ return;
+ buf = kmalloc(sizeof(*buf) * 2, GFP_KERNEL);
+ if (!buf) {
+ printk(KERN_ERR "prepmixch: out of memory\n") ;
+ return;
+ }
+
+ ch = &state->mixch[state->nrmixch-1];
+ switch (ch->selector) {
+ case 0: /* mixer unit request */
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_MIN, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->chnum << 8) | 1, state->ctrlif | (ch->unitid << 8), buf, 2, 1000) < 0)
+ goto err;
+ ch->minval = buf[0] | (buf[1] << 8);
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_MAX, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->chnum << 8) | 1, state->ctrlif | (ch->unitid << 8), buf, 2, 1000) < 0)
+ goto err;
+ ch->maxval = buf[0] | (buf[1] << 8);
+ v2 = ch->maxval - ch->minval;
+ if (!v2)
+ v2 = 1;
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->chnum << 8) | 1, state->ctrlif | (ch->unitid << 8), buf, 2, 1000) < 0)
+ goto err;
+ v1 = buf[0] | (buf[1] << 8);
+ v3 = v1 - ch->minval;
+ v3 = 100 * v3 / v2;
+ if (v3 > 100)
+ v3 = 100;
+ ch->value = v3;
+ if (ch->flags & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT)) {
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ ((ch->chnum + !!(ch->flags & MIXFLG_STEREOIN)) << 8) | (1 + !!(ch->flags & MIXFLG_STEREOOUT)),
+ state->ctrlif | (ch->unitid << 8), buf, 2, 1000) < 0)
+ goto err;
+ v1 = buf[0] | (buf[1] << 8);
+ v3 = v1 - ch->minval;
+ v3 = 100 * v3 / v2;
+ if (v3 > 100)
+ v3 = 100;
+ }
+ ch->value |= v3 << 8;
+ break;
+
+ /* various feature unit controls */
+ case VOLUME_CONTROL:
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_MIN, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->selector << 8) | ch->chnum, state->ctrlif | (ch->unitid << 8), buf, 2, 1000) < 0)
+ goto err;
+ ch->minval = buf[0] | (buf[1] << 8);
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_MAX, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->selector << 8) | ch->chnum, state->ctrlif | (ch->unitid << 8), buf, 2, 1000) < 0)
+ goto err;
+ ch->maxval = buf[0] | (buf[1] << 8);
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->selector << 8) | ch->chnum, state->ctrlif | (ch->unitid << 8), buf, 2, 1000) < 0)
+ goto err;
+ v1 = buf[0] | (buf[1] << 8);
+ v2 = ch->maxval - ch->minval;
+ v3 = v1 - ch->minval;
+ if (!v2)
+ v2 = 1;
+ v3 = 100 * v3 / v2;
+ if (v3 > 100)
+ v3 = 100;
+ ch->value = v3;
+ if (ch->flags & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT)) {
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->selector << 8) | (ch->chnum + 1), state->ctrlif | (ch->unitid << 8), buf, 2, 1000) < 0)
+ goto err;
+ v1 = buf[0] | (buf[1] << 8);
+ v3 = v1 - ch->minval;
+ v3 = 100 * v3 / v2;
+ if (v3 > 100)
+ v3 = 100;
+ }
+ ch->value |= v3 << 8;
+ break;
+
+ case BASS_CONTROL:
+ case MID_CONTROL:
+ case TREBLE_CONTROL:
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_MIN, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->selector << 8) | ch->chnum, state->ctrlif | (ch->unitid << 8), buf, 1, 1000) < 0)
+ goto err;
+ ch->minval = buf[0] << 8;
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_MAX, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->selector << 8) | ch->chnum, state->ctrlif | (ch->unitid << 8), buf, 1, 1000) < 0)
+ goto err;
+ ch->maxval = buf[0] << 8;
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->selector << 8) | ch->chnum, state->ctrlif | (ch->unitid << 8), buf, 1, 1000) < 0)
+ goto err;
+ v1 = buf[0] << 8;
+ v2 = ch->maxval - ch->minval;
+ v3 = v1 - ch->minval;
+ if (!v2)
+ v2 = 1;
+ v3 = 100 * v3 / v2;
+ if (v3 > 100)
+ v3 = 100;
+ ch->value = v3;
+ if (ch->flags & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT)) {
+ if (usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
+ (ch->selector << 8) | (ch->chnum + 1), state->ctrlif | (ch->unitid << 8), buf, 1, 1000) < 0)
+ goto err;
+ v1 = buf[0] << 8;
+ v3 = v1 - ch->minval;
+ v3 = 100 * v3 / v2;
+ if (v3 > 100)
+ v3 = 100;
+ }
+ ch->value |= v3 << 8;
+ break;
+
+ default:
+ goto err;
+ }
+
+ freebuf:
+ kfree(buf);
+ return;
+ err:
+ printk(KERN_ERR "usbaudio: mixer request device %u if %u unit %u ch %u selector %u failed\n",
+ dev->devnum, state->ctrlif, ch->unitid, ch->chnum, ch->selector);
+ if (state->nrmixch)
+ state->nrmixch--;
+ goto freebuf;
+}
+
+
+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;
+
+ idx = inidx*numoch;
+ if (!(bmap[-(idx >> 3)] & (0x80 >> (idx & 7))))
+ return 0;
+ if (!(flg & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT)))
+ return 1;
+ idx = (inidx+!!(flg & MIXFLG_STEREOIN))*numoch+!!(flg & MIXFLG_STEREOOUT);
+ if (!(bmap[-(idx >> 3)] & (0x80 >> (idx & 7))))
+ return 0;
+ return 1;
+}
+
+static void usb_audio_mixerunit(struct consmixstate *state, unsigned char *mixer)
+{
+ unsigned int nroutch = mixer[5+mixer[4]];
+ unsigned int chidx[SOUND_MIXER_NRDEVICES+1];
+ unsigned int termt[SOUND_MIXER_NRDEVICES];
+ unsigned char flg = (nroutch >= 2) ? MIXFLG_STEREOOUT : 0;
+ unsigned char *bmap = &mixer[9+mixer[4]];
+ unsigned int bmapsize;
+ struct mixerchannel *ch;
+ unsigned int i;
+
+ if (!mixer[4]) {
+ printk(KERN_ERR "usbaudio: unit %u invalid MIXER_UNIT descriptor\n", mixer[3]);
+ return;
+ }
+ if (mixer[4] > SOUND_MIXER_NRDEVICES) {
+ printk(KERN_ERR "usbaudio: mixer unit %u: too many input pins\n", mixer[3]);
+ return;
+ }
+ chidx[0] = 0;
+ for (i = 0; i < mixer[4]; i++) {
+ usb_audio_recurseunit(state, mixer[5+i]);
+ chidx[i+1] = chidx[i] + state->nrchannels;
+ termt[i] = state->termtype;
+ }
+ state->termtype = 0;
+ state->chconfig = mixer[6+mixer[4]] | (mixer[7+mixer[4]] << 8);
+ bmapsize = (nroutch * chidx[mixer[4]] + 7) >> 3;
+ bmap += bmapsize - 1;
+ if (mixer[0] < 10+mixer[4]+bmapsize) {
+ printk(KERN_ERR "usbaudio: unit %u invalid MIXER_UNIT descriptor (bitmap too small)\n", mixer[3]);
+ return;
+ }
+ for (i = 0; i < mixer[4]; i++) {
+ state->termtype = termt[i];
+ if (chidx[i+1]-chidx[i] >= 2) {
+ flg |= MIXFLG_STEREOIN;
+ if (checkmixbmap(bmap, flg, chidx[i], nroutch)) {
+ ch = getmixchannel(state, getvolchannel(state));
+ if (ch) {
+ ch->unitid = mixer[3];
+ ch->selector = 0;
+ ch->chnum = chidx[i]+1;
+ ch->flags = flg;
+ prepmixch(state);
+ }
+ continue;
+ }
+ }
+ flg &= ~MIXFLG_STEREOIN;
+ if (checkmixbmap(bmap, flg, chidx[i], nroutch)) {
+ ch = getmixchannel(state, getvolchannel(state));
+ if (ch) {
+ ch->unitid = mixer[3];
+ ch->selector = 0;
+ ch->chnum = chidx[i]+1;
+ ch->flags = flg;
+ prepmixch(state);
+ }
+ }
+ }
+ state->termtype = 0;
+}
+
+static struct mixerchannel *slctsrc_findunit(struct consmixstate *state, __u8 unitid)
+{
+ unsigned int i;
+
+ for (i = 0; i < state->nrmixch; i++)
+ if (state->mixch[i].unitid == unitid)
+ return &state->mixch[i];
+ return NULL;
+}
+
+static void usb_audio_selectorunit(struct consmixstate *state, unsigned char *selector)
+{
+ unsigned int chnum, i, mixch;
+ struct mixerchannel *mch;
+
+ if (!selector[4]) {
+ printk(KERN_ERR "usbaudio: unit %u invalid SELECTOR_UNIT descriptor\n", selector[3]);
+ return;
+ }
+ mixch = state->nrmixch;
+ usb_audio_recurseunit(state, selector[5]);
+ if (state->nrmixch != mixch) {
+ mch = &state->mixch[state->nrmixch-1];
+ mch->slctunitid = selector[3] | (1 << 8);
+ } else if ((mch = slctsrc_findunit(state, selector[5]))) {
+ mch->slctunitid = selector[3] | (1 << 8);
+ } else {
+ printk(KERN_INFO "usbaudio: selector unit %u: ignoring channel 1\n", selector[3]);
+ }
+ chnum = state->nrchannels;
+ for (i = 1; i < selector[4]; i++) {
+ mixch = state->nrmixch;
+ usb_audio_recurseunit(state, selector[5+i]);
+ if (chnum != state->nrchannels) {
+ printk(KERN_ERR "usbaudio: selector unit %u: input pins with varying channel numbers\n", selector[3]);
+ state->termtype = 0;
+ state->chconfig = 0;
+ state->nrchannels = 0;
+ return;
+ }
+ if (state->nrmixch != mixch) {
+ mch = &state->mixch[state->nrmixch-1];
+ mch->slctunitid = selector[3] | ((i + 1) << 8);
+ } else if ((mch = slctsrc_findunit(state, selector[5+i]))) {
+ mch->slctunitid = selector[3] | ((i + 1) << 8);
+ } else {
+ printk(KERN_INFO "usbaudio: selector unit %u: ignoring channel %u\n", selector[3], i+1);
+ }
+ }
+ state->termtype = 0;
+ state->chconfig = 0;
+}
+
+/* in the future we might try to handle 3D etc. effect units */
+
+static void usb_audio_processingunit(struct consmixstate *state, unsigned char *proc)
+{
+ unsigned int i;
+
+ for (i = 0; i < proc[6]; i++)
+ usb_audio_recurseunit(state, proc[7+i]);
+ state->nrchannels = proc[7+proc[6]];
+ state->termtype = 0;
+ state->chconfig = proc[8+proc[6]] | (proc[9+proc[6]] << 8);
+}
+
+
+/* See Audio Class Spec, section 4.3.2.5 */
+static void usb_audio_featureunit(struct consmixstate *state, unsigned char *ftr)
+{
+ struct mixerchannel *ch;
+ unsigned short chftr, mchftr;
+#if 0
+ struct usb_device *dev = state->s->usbdev;
+ unsigned char data[1];
+#endif
+ unsigned char nr_logical_channels, i;
+
+ usb_audio_recurseunit(state, ftr[4]);
+
+ if (ftr[5] == 0 ) {
+ printk(KERN_ERR "usbaudio: wrong controls size in feature unit %u\n",ftr[3]);
+ return;
+ }
+
+ if (state->nrchannels == 0) {
+ printk(KERN_ERR "usbaudio: feature unit %u source has no channels\n", ftr[3]);
+ return;
+ }
+ 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");
+ } else if (state->nrchannels == 1 && nr_logical_channels==2) {
+ printk(KERN_INFO "usbaudio: assuming that a stereo channel connected directly to a mixer is missing in search (got Labtec headset?). Should be fine.\n");
+ state->nrchannels=nr_logical_channels;
+ } else {
+ printk(KERN_WARNING "usbaudio: no idea what's going on..., contact linux-usb-devel@lists.sourceforge.net\n");
+ }
+ }
+
+ /* There is always a master channel */
+ mchftr = ftr[6];
+ /* Binary AND over logical channels if they exist */
+ if (nr_logical_channels) {
+ chftr = ftr[6+ftr[5]];
+ for (i = 2; i <= nr_logical_channels; i++)
+ chftr &= ftr[6+i*ftr[5]];
+ } else {
+ chftr = 0;
+ }
+
+ /* volume control */
+ if (chftr & 2) {
+ ch = getmixchannel(state, getvolchannel(state));
+ if (ch) {
+ ch->unitid = ftr[3];
+ ch->selector = VOLUME_CONTROL;
+ ch->chnum = 1;
+ ch->flags = (state->nrchannels > 1) ? (MIXFLG_STEREOIN | MIXFLG_STEREOOUT) : 0;
+ prepmixch(state);
+ }
+ } else if (mchftr & 2) {
+ ch = getmixchannel(state, getvolchannel(state));
+ if (ch) {
+ ch->unitid = ftr[3];
+ ch->selector = VOLUME_CONTROL;
+ ch->chnum = 0;
+ ch->flags = 0;
+ prepmixch(state);
+ }
+ }
+ /* bass control */
+ if (chftr & 4) {
+ ch = getmixchannel(state, SOUND_MIXER_BASS);
+ if (ch) {
+ ch->unitid = ftr[3];
+ ch->selector = BASS_CONTROL;
+ ch->chnum = 1;
+ ch->flags = (state->nrchannels > 1) ? (MIXFLG_STEREOIN | MIXFLG_STEREOOUT) : 0;
+ prepmixch(state);
+ }
+ } else if (mchftr & 4) {
+ ch = getmixchannel(state, SOUND_MIXER_BASS);
+ if (ch) {
+ ch->unitid = ftr[3];
+ ch->selector = BASS_CONTROL;
+ ch->chnum = 0;
+ ch->flags = 0;
+ prepmixch(state);
+ }
+ }
+ /* treble control */
+ if (chftr & 16) {
+ ch = getmixchannel(state, SOUND_MIXER_TREBLE);
+ if (ch) {
+ ch->unitid = ftr[3];
+ ch->selector = TREBLE_CONTROL;
+ ch->chnum = 1;
+ ch->flags = (state->nrchannels > 1) ? (MIXFLG_STEREOIN | MIXFLG_STEREOOUT) : 0;
+ prepmixch(state);
+ }
+ } else if (mchftr & 16) {
+ ch = getmixchannel(state, SOUND_MIXER_TREBLE);
+ if (ch) {
+ ch->unitid = ftr[3];
+ ch->selector = TREBLE_CONTROL;
+ ch->chnum = 0;
+ ch->flags = 0;
+ prepmixch(state);
+ }
+ }
+#if 0
+ /* if there are mute controls, unmute them */
+ /* does not seem to be necessary, and the Dallas chip does not seem to support the "all" channel (255) */
+ if ((chftr & 1) || (mchftr & 1)) {
+ printk(KERN_DEBUG "usbaudio: unmuting feature unit %u interface %u\n", ftr[3], state->ctrlif);
+ data[0] = 0;
+ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
+ (MUTE_CONTROL << 8) | 0xff, state->ctrlif | (ftr[3] << 8), data, 1, 1000) < 0)
+ printk(KERN_WARNING "usbaudio: failure to unmute feature unit %u interface %u\n", ftr[3], state->ctrlif);
+ }
+#endif
+}
+
+static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unitid)
+{
+ unsigned char *p1;
+ unsigned int i, j;
+
+ if (test_and_set_bit(unitid, state->unitbitmap)) {
+ printk(KERN_INFO "usbaudio: mixer path revisits unit %d\n", unitid);
+ return;
+ }
+ p1 = find_audiocontrol_unit(state->buffer, state->buflen, NULL, unitid, state->ctrlif);
+ if (!p1) {
+ printk(KERN_ERR "usbaudio: unit %d not found!\n", unitid);
+ return;
+ }
+ state->nrchannels = 0;
+ state->termtype = 0;
+ state->chconfig = 0;
+ switch (p1[2]) {
+ case INPUT_TERMINAL:
+ if (p1[0] < 12) {
+ printk(KERN_ERR "usbaudio: unit %u: invalid INPUT_TERMINAL descriptor\n", unitid);
+ return;
+ }
+ state->nrchannels = p1[7];
+ state->termtype = p1[4] | (p1[5] << 8);
+ state->chconfig = p1[8] | (p1[9] << 8);
+ return;
+
+ case MIXER_UNIT:
+ if (p1[0] < 10 || p1[0] < 10+p1[4]) {
+ printk(KERN_ERR "usbaudio: unit %u: invalid MIXER_UNIT descriptor\n", unitid);
+ return;
+ }
+ usb_audio_mixerunit(state, p1);
+ return;
+
+ case SELECTOR_UNIT:
+ if (p1[0] < 6 || p1[0] < 6+p1[4]) {
+ printk(KERN_ERR "usbaudio: unit %u: invalid SELECTOR_UNIT descriptor\n", unitid);
+ return;
+ }
+ usb_audio_selectorunit(state, p1);
+ return;
+
+ case FEATURE_UNIT: /* See USB Audio Class Spec 4.3.2.5 */
+ if (p1[0] < 7 || p1[0] < 7+p1[5]) {
+ printk(KERN_ERR "usbaudio: unit %u: invalid FEATURE_UNIT descriptor\n", unitid);
+ return;
+ }
+ usb_audio_featureunit(state, p1);
+ return;
+
+ case PROCESSING_UNIT:
+ if (p1[0] < 13 || p1[0] < 13+p1[6] || p1[0] < 13+p1[6]+p1[11+p1[6]]) {
+ printk(KERN_ERR "usbaudio: unit %u: invalid PROCESSING_UNIT descriptor\n", unitid);
+ return;
+ }
+ usb_audio_processingunit(state, p1);
+ return;
+
+ case EXTENSION_UNIT:
+ if (p1[0] < 13 || p1[0] < 13+p1[6] || p1[0] < 13+p1[6]+p1[11+p1[6]]) {
+ printk(KERN_ERR "usbaudio: unit %u: invalid EXTENSION_UNIT descriptor\n", unitid);
+ return;
+ }
+ for (j = i = 0; i < p1[6]; i++) {
+ usb_audio_recurseunit(state, p1[7+i]);
+ if (!i)
+ j = state->termtype;
+ else if (j != state->termtype)
+ j = 0;
+ }
+ state->nrchannels = p1[7+p1[6]];
+ state->chconfig = p1[8+p1[6]] | (p1[9+p1[6]] << 8);
+ state->termtype = j;
+ return;
+
+ default:
+ printk(KERN_ERR "usbaudio: unit %u: unexpected type 0x%02x\n", unitid, p1[2]);
+ return;
+ }
+}
+
+static void usb_audio_constructmixer(struct usb_audio_state *s, unsigned char *buffer, unsigned int buflen, unsigned int ctrlif, unsigned char *oterm)
+{
+ struct usb_mixerdev *ms;
+ struct consmixstate state;
+
+ memset(&state, 0, sizeof(state));
+ state.s = s;
+ state.nrmixch = 0;
+ state.mixchmask = ~0;
+ state.buffer = buffer;
+ state.buflen = buflen;
+ state.ctrlif = ctrlif;
+ set_bit(oterm[3], state.unitbitmap); /* mark terminal ID as visited */
+ printk(KERN_DEBUG "usbaudio: constructing mixer for Terminal %u type 0x%04x\n",
+ oterm[3], oterm[4] | (oterm[5] << 8));
+ usb_audio_recurseunit(&state, oterm[7]);
+ if (!state.nrmixch) {
+ printk(KERN_INFO "usbaudio: no mixer controls found for Terminal %u\n", oterm[3]);
+ return;
+ }
+ if (!(ms = kmalloc(sizeof(struct usb_mixerdev)+state.nrmixch*sizeof(struct mixerchannel), GFP_KERNEL)))
+ return;
+ memset(ms, 0, sizeof(struct usb_mixerdev));
+ memcpy(&ms->ch, &state.mixch, state.nrmixch*sizeof(struct mixerchannel));
+ ms->state = s;
+ ms->iface = ctrlif;
+ ms->numch = state.nrmixch;
+ if ((ms->dev_mixer = register_sound_mixer(&usb_mixer_fops, -1)) < 0) {
+ printk(KERN_ERR "usbaudio: cannot register mixer\n");
+ kfree(ms);
+ return;
+ }
+ printk(KERN_INFO "usbaudio: registered mixer 14,%d\n", ms->dev_mixer);
+ list_add_tail(&ms->list, &s->mixerlist);
+}
+
+/* arbitrary limit, we won't check more interfaces than this */
+#define USB_MAXINTERFACES 32
+
+static struct usb_audio_state *usb_audio_parsecontrol(struct usb_device *dev, unsigned char *buffer, unsigned int buflen, unsigned int ctrlif)
+{
+ struct usb_audio_state *s;
+ struct usb_interface *iface;
+ struct usb_host_interface *alt;
+ unsigned char ifin[USB_MAXINTERFACES], ifout[USB_MAXINTERFACES];
+ unsigned char *p1;
+ unsigned int i, j, k, numifin = 0, numifout = 0;
+
+ if (!(s = kmalloc(sizeof(struct usb_audio_state), GFP_KERNEL)))
+ return NULL;
+ memset(s, 0, sizeof(struct usb_audio_state));
+ INIT_LIST_HEAD(&s->audiolist);
+ INIT_LIST_HEAD(&s->mixerlist);
+ s->usbdev = dev;
+ s->count = 1;
+
+ /* find audiocontrol interface */
+ if (!(p1 = find_csinterface_descriptor(buffer, buflen, NULL, HEADER, ctrlif, -1))) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u no HEADER found\n",
+ dev->devnum, ctrlif);
+ goto ret;
+ }
+ if (p1[0] < 8 + p1[7]) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u HEADER error\n",
+ dev->devnum, ctrlif);
+ goto ret;
+ }
+ if (!p1[7])
+ printk(KERN_INFO "usbaudio: device %d audiocontrol interface %u has no AudioStreaming and MidiStreaming interfaces\n",
+ dev->devnum, ctrlif);
+ for (i = 0; i < p1[7]; i++) {
+ j = p1[8+i];
+ iface = usb_ifnum_to_if(dev, j);
+ if (!iface) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u does not exist\n",
+ dev->devnum, ctrlif, j);
+ continue;
+ }
+ if (iface->num_altsetting == 1) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u has only 1 altsetting.\n", dev->devnum, ctrlif);
+ continue;
+ }
+ alt = usb_altnum_to_altsetting(iface, 0);
+ if (!alt) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u has no altsetting 0\n",
+ dev->devnum, ctrlif, j);
+ continue;
+ }
+ if (alt->desc.bInterfaceClass != USB_CLASS_AUDIO) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u is not an AudioClass interface\n",
+ dev->devnum, ctrlif, j);
+ continue;
+ }
+ if (alt->desc.bInterfaceSubClass == 3) {
+ printk(KERN_INFO "usbaudio: device %d audiocontrol interface %u interface %u MIDIStreaming not supported\n",
+ dev->devnum, ctrlif, j);
+ continue;
+ }
+ if (alt->desc.bInterfaceSubClass != 2) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u invalid AudioClass subtype\n",
+ dev->devnum, ctrlif, j);
+ continue;
+ }
+ if (alt->desc.bNumEndpoints > 0) {
+ /* Check all endpoints; should they all have a bandwidth of 0 ? */
+ for (k = 0; k < alt->desc.bNumEndpoints; k++) {
+ if (le16_to_cpu(alt->endpoint[k].desc.wMaxPacketSize) > 0) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u endpoint %d does not have 0 bandwidth at alt[0]\n", dev->devnum, ctrlif, k);
+ break;
+ }
+ }
+ if (k < alt->desc.bNumEndpoints)
+ continue;
+ }
+
+ alt = usb_altnum_to_altsetting(iface, 1);
+ if (!alt) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u has no altsetting 1\n",
+ dev->devnum, ctrlif, j);
+ continue;
+ }
+ if (alt->desc.bNumEndpoints < 1) {
+ printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u has no endpoint\n",
+ dev->devnum, ctrlif, j);
+ continue;
+ }
+ /* note: this requires the data endpoint to be ep0 and the optional sync
+ ep to be ep1, which seems to be the case */
+ if (alt->endpoint[0].desc.bEndpointAddress & USB_DIR_IN) {
+ if (numifin < USB_MAXINTERFACES) {
+ ifin[numifin++] = j;
+ usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1);
+ }
+ } else {
+ if (numifout < USB_MAXINTERFACES) {
+ ifout[numifout++] = j;
+ usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1);
+ }
+ }
+ }
+ printk(KERN_INFO "usbaudio: device %d audiocontrol interface %u has %u input and %u output AudioStreaming interfaces\n",
+ dev->devnum, ctrlif, numifin, numifout);
+ for (i = 0; i < numifin && i < numifout; i++)
+ usb_audio_parsestreaming(s, buffer, buflen, ifin[i], ifout[i]);
+ for (j = i; j < numifin; j++)
+ usb_audio_parsestreaming(s, buffer, buflen, ifin[i], -1);
+ for (j = i; j < numifout; j++)
+ usb_audio_parsestreaming(s, buffer, buflen, -1, ifout[i]);
+ /* now walk through all OUTPUT_TERMINAL descriptors to search for mixers */
+ p1 = find_csinterface_descriptor(buffer, buflen, NULL, OUTPUT_TERMINAL, ctrlif, -1);
+ while (p1) {
+ if (p1[0] >= 9)
+ usb_audio_constructmixer(s, buffer, buflen, ctrlif, p1);
+ p1 = find_csinterface_descriptor(buffer, buflen, p1, OUTPUT_TERMINAL, ctrlif, -1);
+ }
+
+ret:
+ if (list_empty(&s->audiolist) && list_empty(&s->mixerlist)) {
+ kfree(s);
+ return NULL;
+ }
+ /* everything successful */
+ down(&open_sem);
+ list_add_tail(&s->audiodev, &audiodevs);
+ up(&open_sem);
+ printk(KERN_DEBUG "usb_audio_parsecontrol: usb_audio_state at %p\n", s);
+ return s;
+}
+
+/* we only care for the currently active configuration */
+
+static int usb_audio_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev (intf);
+ struct usb_audio_state *s;
+ unsigned char *buffer;
+ unsigned int buflen;
+
+#if 0
+ printk(KERN_DEBUG "usbaudio: Probing if %i: IC %x, ISC %x\n", ifnum,
+ config->interface[ifnum].altsetting[0].desc.bInterfaceClass,
+ config->interface[ifnum].altsetting[0].desc.bInterfaceSubClass);
+#endif
+
+ /*
+ * audiocontrol interface found
+ * find which configuration number is active
+ */
+ buffer = dev->rawdescriptors[dev->actconfig - dev->config];
+ buflen = le16_to_cpu(dev->actconfig->desc.wTotalLength);
+ s = usb_audio_parsecontrol(dev, buffer, buflen, intf->altsetting->desc.bInterfaceNumber);
+ if (s) {
+ usb_set_intfdata (intf, s);
+ return 0;
+ }
+ return -ENODEV;
+}
+
+
+/* a revoke facility would make things simpler */
+
+static void usb_audio_disconnect(struct usb_interface *intf)
+{
+ struct usb_audio_state *s = usb_get_intfdata (intf);
+ struct usb_audiodev *as;
+ struct usb_mixerdev *ms;
+
+ if (!s)
+ return;
+
+ /* we get called with -1 for every audiostreaming interface registered */
+ if (s == (struct usb_audio_state *)-1) {
+ dprintk((KERN_DEBUG "usbaudio: note, usb_audio_disconnect called with -1\n"));
+ return;
+ }
+ if (!s->usbdev) {
+ dprintk((KERN_DEBUG "usbaudio: error, usb_audio_disconnect already called for %p!\n", s));
+ return;
+ }
+ down(&open_sem);
+ list_del_init(&s->audiodev);
+ s->usbdev = NULL;
+ usb_set_intfdata (intf, NULL);
+
+ /* deregister all audio and mixer devices, so no new processes can open this device */
+ list_for_each_entry(as, &s->audiolist, list) {
+ usbin_disc(as);
+ usbout_disc(as);
+ wake_up(&as->usbin.dma.wait);
+ wake_up(&as->usbout.dma.wait);
+ if (as->dev_audio >= 0) {
+ unregister_sound_dsp(as->dev_audio);
+ printk(KERN_INFO "usbaudio: unregister dsp 14,%d\n", as->dev_audio);
+ }
+ as->dev_audio = -1;
+ }
+ list_for_each_entry(ms, &s->mixerlist, list) {
+ if (ms->dev_mixer >= 0) {
+ unregister_sound_mixer(ms->dev_mixer);
+ printk(KERN_INFO "usbaudio: unregister mixer 14,%d\n", ms->dev_mixer);
+ }
+ ms->dev_mixer = -1;
+ }
+ release(s);
+ wake_up(&open_wait);
+}
+
+static int __init usb_audio_init(void)
+{
+ int result = usb_register(&usb_audio_driver);
+ if (result == 0)
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+ return result;
+}
+
+
+static void __exit usb_audio_cleanup(void)
+{
+ usb_deregister(&usb_audio_driver);
+}
+
+module_init(usb_audio_init);
+module_exit(usb_audio_cleanup);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/usb/class/audio.h b/drivers/usb/class/audio.h
new file mode 100644
index 000000000000..45916eb12103
--- /dev/null
+++ b/drivers/usb/class/audio.h
@@ -0,0 +1,110 @@
+#define CS_AUDIO_UNDEFINED 0x20
+#define CS_AUDIO_DEVICE 0x21
+#define CS_AUDIO_CONFIGURATION 0x22
+#define CS_AUDIO_STRING 0x23
+#define CS_AUDIO_INTERFACE 0x24
+#define CS_AUDIO_ENDPOINT 0x25
+
+#define HEADER 0x01
+#define INPUT_TERMINAL 0x02
+#define OUTPUT_TERMINAL 0x03
+#define MIXER_UNIT 0x04
+#define SELECTOR_UNIT 0x05
+#define FEATURE_UNIT 0x06
+#define PROCESSING_UNIT 0x07
+#define EXTENSION_UNIT 0x08
+
+#define AS_GENERAL 0x01
+#define FORMAT_TYPE 0x02
+#define FORMAT_SPECIFIC 0x03
+
+#define EP_GENERAL 0x01
+
+#define MAX_CHAN 9
+#define MAX_FREQ 16
+#define MAX_IFACE 8
+#define MAX_FORMAT 8
+#define MAX_ALT 32 /* Sorry, we need quite a few for the Philips webcams */
+
+struct usb_audio_terminal
+{
+ u8 flags;
+ u8 assoc;
+ u16 type; /* Mic etc */
+ u8 channels;
+ u8 source;
+ u16 chancfg;
+};
+
+struct usb_audio_format
+{
+ u8 type;
+ u8 channels;
+ u8 num_freq;
+ u8 sfz;
+ u8 bits;
+ u16 freq[MAX_FREQ];
+};
+
+struct usb_audio_interface
+{
+ u8 terminal;
+ u8 delay;
+ u16 num_formats;
+ u16 format_type;
+ u8 flags;
+ u8 idleconf; /* Idle config */
+#define AU_IFACE_FOUND 1
+ struct usb_audio_format format[MAX_FORMAT];
+};
+
+struct usb_audio_device
+{
+ struct list_head list;
+ u8 mixer;
+ u8 selector;
+ void *irq_handle;
+ u8 num_channels;
+ u8 num_dsp_iface;
+ u8 channel_map[MAX_CHAN];
+ struct usb_audio_terminal terminal[MAX_CHAN];
+ struct usb_audio_interface interface[MAX_IFACE][MAX_ALT];
+};
+
+
+
+/* Audio Class specific Request Codes */
+
+#define SET_CUR 0x01
+#define GET_CUR 0x81
+#define SET_MIN 0x02
+#define GET_MIN 0x82
+#define SET_MAX 0x03
+#define GET_MAX 0x83
+#define SET_RES 0x04
+#define GET_RES 0x84
+#define SET_MEM 0x05
+#define GET_MEM 0x85
+#define GET_STAT 0xff
+
+/* Terminal Control Selectors */
+
+#define COPY_PROTECT_CONTROL 0x01
+
+/* Feature Unit Control Selectors */
+
+#define MUTE_CONTROL 0x01
+#define VOLUME_CONTROL 0x02
+#define BASS_CONTROL 0x03
+#define MID_CONTROL 0x04
+#define TREBLE_CONTROL 0x05
+#define GRAPHIC_EQUALIZER_CONTROL 0x06
+#define AUTOMATIC_GAIN_CONTROL 0x07
+#define DELAY_CONTROL 0x08
+#define BASS_BOOST_CONTROL 0x09
+#define LOUDNESS_CONTROL 0x0a
+
+/* Endpoint Control Selectors */
+
+#define SAMPLING_FREQ_CONTROL 0x01
+#define PITCH_CONTROL 0x02
diff --git a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c
new file mode 100644
index 000000000000..6bac65e0ade7
--- /dev/null
+++ b/drivers/usb/class/bluetty.c
@@ -0,0 +1,1279 @@
+/*
+ * bluetty.c Version 0.13
+ *
+ * Copyright (C) 2000, 2001 Greg Kroah-Hartman <greg@kroah.com>
+ * Copyright (C) 2000 Mark Douglas Corner <mcorner@umich.edu>
+ *
+ * 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 <rmasoodu@in.ibm.com>
+ * - 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.
+ *
+ * (2001/06/05) Version 0.11 gkh
+ * - Fixed problem with read urb status saying that we have shutdown,
+ * and that we shouldn't resubmit the urb. Patch from unknown.
+ *
+ * (2001/05/28) Version 0.10 gkh
+ * - Fixed problem with using data from userspace in the bluetooth_write
+ * function as found by the CHECKER project.
+ * - Added a buffer to the write_urb_pool which reduces the number of
+ * buffers being created and destroyed for ever write. Also cleans
+ * up the logic a bit.
+ * - Added a buffer to the control_urb_pool which fixes a memory leak
+ * when the device is removed from the system.
+ *
+ * (2001/05/28) Version 0.9 gkh
+ * Fixed problem with bluetooth==NULL for bluetooth_read_bulk_callback
+ * which was found by both the CHECKER project and Mikko Rahkonen.
+ *
+ * (08/04/2001) gb
+ * Identify version on module load.
+ *
+ * (2001/03/10) Version 0.8 gkh
+ * Fixed problem with not unlinking interrupt urb on device close
+ * and resubmitting the read urb on error with bluetooth struct.
+ * Thanks to Narayan Mohanram <narayan@RovingNetworks.com> for the
+ * fixes.
+ *
+ * (11/29/2000) Version 0.7 gkh
+ * Fixed problem with overrunning the tty flip buffer.
+ * Removed unneeded NULL pointer initialization.
+ *
+ * (10/05/2000) Version 0.6 gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.
+ * Got a real major id number and name.
+ *
+ * (08/06/2000) Version 0.5 gkh
+ * Fixed problem of not resubmitting the bulk read urb if there is
+ * an error in the callback. Ericsson devices seem to need this.
+ *
+ * (07/11/2000) Version 0.4 gkh
+ * Fixed bug in disconnect for when we call tty_hangup
+ * Fixed bug in bluetooth_ctrl_msg where the bluetooth struct was not
+ * getting attached to the control urb properly.
+ * Fixed bug in bluetooth_write where we pay attention to the result
+ * of bluetooth_ctrl_msg.
+ *
+ * (08/03/2000) Version 0.3 gkh mdc
+ * Merged in Mark's changes to make the driver play nice with the Axis
+ * stack.
+ * Made the write bulk use an urb pool to enable larger transfers with
+ * fewer calls to the driver.
+ * Fixed off by one bug in acl pkt receive
+ * Made packet counters specific to each bluetooth device
+ * Added checks for zero length callbacks
+ * Added buffers for int and bulk packets. Had to do this otherwise
+ * packet types could intermingle.
+ * Made a control urb pool for the control messages.
+ *
+ * (07/11/2000) Version 0.2 gkh
+ * Fixed a small bug found by Nils Faerber in the usb_bluetooth_probe
+ * function.
+ *
+ * (07/09/2000) Version 0.1 gkh
+ * Initial release. Has support for sending ACL data (which is really just
+ * a HCI frame.) Raw HCI commands and HCI events are not supported.
+ * A ioctl will probably be needed for the HCI commands and events in the
+ * future. All isoch endpoints are ignored at this time also.
+ * This driver should work for all currently shipping USB Bluetooth
+ * devices at this time :)
+ *
+ */
+
+/*
+ * 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 <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <asm/uaccess.h>
+
+#define DEBUG
+#include <linux/usb.h>
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.13"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman, Mark Douglas Corner"
+#define DRIVER_DESC "USB Bluetooth tty driver"
+
+/* define this if you have hardware that is not good */
+/*#define BTBUGGYHARDWARE */
+
+/* Class, SubClass, and Protocol codes that describe a Bluetooth device */
+#define WIRELESS_CLASS_CODE 0xe0
+#define RF_SUBCLASS_CODE 0x01
+#define BLUETOOTH_PROGRAMMING_PROTOCOL_CODE 0x01
+
+
+#define BLUETOOTH_TTY_MAJOR 216 /* real device node major id */
+#define BLUETOOTH_TTY_MINORS 256 /* whole lotta bluetooth devices */
+
+#define USB_BLUETOOTH_MAGIC 0x6d02 /* magic number for bluetooth struct */
+
+#define BLUETOOTH_CONTROL_REQUEST_TYPE 0x20
+
+/* Bluetooth packet types */
+#define CMD_PKT 0x01
+#define ACL_PKT 0x02
+#define SCO_PKT 0x03
+#define EVENT_PKT 0x04
+#define ERROR_PKT 0x05
+#define NEG_PKT 0x06
+
+/* Message sizes */
+#define MAX_EVENT_SIZE 0xFF
+#define EVENT_HDR_SIZE 3 /* 2 for the header + 1 for the type indicator */
+#define EVENT_BUFFER_SIZE (MAX_EVENT_SIZE + EVENT_HDR_SIZE)
+
+#define MAX_ACL_SIZE 0xFFFF
+#define ACL_HDR_SIZE 5 /* 4 for the header + 1 for the type indicator */
+#define ACL_BUFFER_SIZE (MAX_ACL_SIZE + ACL_HDR_SIZE)
+
+/* parity check flag */
+#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
+
+#define CHAR2INT16(c1,c0) (((u32)((c1) & 0xff) << 8) + (u32)((c0) & 0xff))
+
+#define NUM_BULK_URBS 24
+#define NUM_CONTROL_URBS 16
+
+struct usb_bluetooth {
+ int magic;
+ struct usb_device * dev;
+ struct tty_driver * tty_driver; /* the tty_driver for this device */
+ struct tty_struct * tty; /* the corresponding 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;
+ __u8 interrupt_in_endpointAddress;
+ __u8 interrupt_in_interval;
+ int interrupt_in_buffer_size;
+
+ unsigned char * bulk_in_buffer;
+ struct urb * read_urb;
+ __u8 bulk_in_endpointAddress;
+ int bulk_in_buffer_size;
+
+ int bulk_out_buffer_size;
+ __u8 bulk_out_endpointAddress;
+
+ wait_queue_head_t write_wait;
+
+ struct work_struct work; /* work queue entry for line discipline waking up */
+
+ unsigned int int_packet_pos;
+ 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;
+};
+
+
+/* local function prototypes */
+static int bluetooth_open (struct tty_struct *tty, struct file *filp);
+static void bluetooth_close (struct tty_struct *tty, struct file *filp);
+static int bluetooth_write (struct tty_struct *tty, const unsigned char *buf, int count);
+static int bluetooth_write_room (struct tty_struct *tty);
+static int bluetooth_chars_in_buffer (struct tty_struct *tty);
+static void bluetooth_throttle (struct tty_struct *tty);
+static void bluetooth_unthrottle (struct tty_struct *tty);
+static int bluetooth_ioctl (struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg);
+static void bluetooth_set_termios (struct tty_struct *tty, struct termios *old);
+
+static void bluetooth_int_callback (struct urb *urb, struct pt_regs *regs);
+static void bluetooth_ctrl_callback (struct urb *urb, struct pt_regs *regs);
+static void bluetooth_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void bluetooth_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+
+static int usb_bluetooth_probe (struct usb_interface *intf,
+ const struct usb_device_id *id);
+static void usb_bluetooth_disconnect (struct usb_interface *intf);
+
+
+static struct usb_device_id usb_bluetooth_ids [] = {
+ { USB_DEVICE_INFO(WIRELESS_CLASS_CODE, RF_SUBCLASS_CODE, BLUETOOTH_PROGRAMMING_PROTOCOL_CODE) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, usb_bluetooth_ids);
+
+static struct usb_driver usb_bluetooth_driver = {
+ .owner = THIS_MODULE,
+ .name = "bluetty",
+ .probe = usb_bluetooth_probe,
+ .disconnect = usb_bluetooth_disconnect,
+ .id_table = usb_bluetooth_ids,
+};
+
+static struct tty_driver *bluetooth_tty_driver;
+static struct usb_bluetooth *bluetooth_table[BLUETOOTH_TTY_MINORS];
+
+
+static inline int bluetooth_paranoia_check (struct usb_bluetooth *bluetooth, const char *function)
+{
+ if (!bluetooth) {
+ dbg("%s - bluetooth == NULL", function);
+ return -1;
+ }
+ if (bluetooth->magic != USB_BLUETOOTH_MAGIC) {
+ dbg("%s - bad magic number for bluetooth", function);
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static inline struct usb_bluetooth* get_usb_bluetooth (struct usb_bluetooth *bluetooth, const char *function)
+{
+ if (!bluetooth ||
+ bluetooth_paranoia_check (bluetooth, function)) {
+ /* then say that we don't have a valid usb_bluetooth thing, which will
+ * end up generating -ENODEV return values */
+ return NULL;
+ }
+
+ return bluetooth;
+}
+
+
+static inline struct usb_bluetooth *get_bluetooth_by_index (int index)
+{
+ return bluetooth_table[index];
+}
+
+
+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) {
+ if (bluetooth->control_urb_pool[i]->status != -EINPROGRESS) {
+ urb = bluetooth->control_urb_pool[i];
+ dr = &bluetooth->dr[i];
+ break;
+ }
+ }
+ if (urb == NULL) {
+ dbg ("%s - no free urbs", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ /* keep increasing the urb transfer buffer to fit the size of the message */
+ 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;
+ }
+ }
+ if (urb->transfer_buffer_length < len) {
+ 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);
+
+ usb_fill_control_urb (urb, bluetooth->dev, usb_sndctrlpipe(bluetooth->dev, 0),
+ (unsigned char*)dr, urb->transfer_buffer, len, bluetooth_ctrl_callback, bluetooth);
+
+ /* send it down the pipe */
+ status = usb_submit_urb(urb, GFP_KERNEL);
+ if (status)
+ dbg("%s - usb_submit_urb(control) failed with status = %d", __FUNCTION__, status);
+
+ return status;
+}
+
+
+
+
+
+/*****************************************************************************
+ * Driver tty interface functions
+ *****************************************************************************/
+static int bluetooth_open (struct tty_struct *tty, struct file * filp)
+{
+ struct usb_bluetooth *bluetooth;
+ int result;
+
+ dbg("%s", __FUNCTION__);
+
+ /* initialize the pointer incase something fails */
+ tty->driver_data = NULL;
+
+ /* get the bluetooth object associated with this tty pointer */
+ bluetooth = get_bluetooth_by_index (tty->index);
+
+ if (bluetooth_paranoia_check (bluetooth, __FUNCTION__)) {
+ 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 */
+ usb_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, GFP_KERNEL);
+ if (result)
+ dbg("%s - usb_submit_urb(read bulk) failed with status %d", __FUNCTION__, result);
+#endif
+ usb_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, GFP_KERNEL);
+ if (result)
+ dbg("%s - usb_submit_urb(interrupt in) failed with status %d", __FUNCTION__, result);
+ }
+
+ up(&bluetooth->lock);
+
+ return 0;
+}
+
+
+static void bluetooth_close (struct tty_struct *tty, struct file * filp)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)tty->driver_data, __FUNCTION__);
+
+ if (!bluetooth) {
+ 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 in-flight urbs that we know about */
+ usb_kill_urb (bluetooth->read_urb);
+ usb_kill_urb (bluetooth->interrupt_in_urb);
+ }
+ up(&bluetooth->lock);
+}
+
+
+static int bluetooth_write (struct tty_struct * tty, const unsigned char *buf, int count)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)tty->driver_data, __FUNCTION__);
+ struct urb *urb = NULL;
+ unsigned char *temp_buffer = NULL;
+ const unsigned char *current_buffer;
+ unsigned char *urb_buffer;
+ int i;
+ int retval = 0;
+
+ if (!bluetooth) {
+ 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]);
+ }
+ printk ("\n");
+#endif
+
+ current_buffer = buf;
+
+ 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, &current_buffer[1], count-1);
+ if (retval) {
+ goto exit;
+ }
+ retval = count;
+ break;
+
+ case ACL_PKT:
+ ++current_buffer;
+ --count;
+
+ urb_buffer = kmalloc (count, GFP_ATOMIC);
+ if (!urb_buffer) {
+ dev_err(&bluetooth->dev->dev, "out of memory\n");
+ retval = -ENOMEM;
+ goto exit;
+ }
+
+ urb = usb_alloc_urb(0, GFP_ATOMIC);
+ if (!urb) {
+ dev_err(&bluetooth->dev->dev, "no more free urbs\n");
+ kfree(urb_buffer);
+ retval = -ENOMEM;
+ goto exit;
+ }
+ memcpy (urb_buffer, current_buffer, count);
+
+ /* build up our urb */
+ usb_fill_bulk_urb(urb, bluetooth->dev,
+ usb_sndbulkpipe(bluetooth->dev,
+ bluetooth->bulk_out_endpointAddress),
+ urb_buffer,
+ count,
+ bluetooth_write_bulk_callback,
+ bluetooth);
+
+
+ /* send it down the pipe */
+ retval = usb_submit_urb(urb, GFP_KERNEL);
+ if (retval) {
+ dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __FUNCTION__, retval);
+ goto exit;
+ }
+
+ /* we are done with this urb, so let the host driver
+ * really free it when it is finished with it */
+ usb_free_urb (urb);
+ retval = count + 1;
+ break;
+
+ default :
+ dbg("%s - unsupported (at this time) write type", __FUNCTION__);
+ retval = -EINVAL;
+ break;
+ }
+
+exit:
+ kfree (temp_buffer);
+
+ return retval;
+}
+
+
+static int bluetooth_write_room (struct tty_struct *tty)
+{
+ dbg("%s", __FUNCTION__);
+
+ /*
+ * We really can take anything the user throws at us
+ * but let's pick a nice big number to tell the tty
+ * layer that we have lots of free space
+ */
+ return 2048;
+}
+
+
+static int bluetooth_chars_in_buffer (struct tty_struct *tty)
+{
+ dbg("%s", __FUNCTION__);
+
+ /*
+ * We can't really account for how much data we
+ * have sent out, but hasn't made it through to the
+ * device, so just tell the tty layer that everything
+ * is flushed.
+ */
+ return 0;
+}
+
+
+static void bluetooth_throttle (struct tty_struct * tty)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)tty->driver_data, __FUNCTION__);
+
+ if (!bluetooth) {
+ return;
+ }
+
+ dbg("%s", __FUNCTION__);
+
+ if (!bluetooth->open_count) {
+ dbg ("%s - device not open", __FUNCTION__);
+ return;
+ }
+
+ dbg("%s unsupported (at this time)", __FUNCTION__);
+
+ return;
+}
+
+
+static void bluetooth_unthrottle (struct tty_struct * tty)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)tty->driver_data, __FUNCTION__);
+
+ if (!bluetooth) {
+ return;
+ }
+
+ dbg("%s", __FUNCTION__);
+
+ if (!bluetooth->open_count) {
+ dbg ("%s - device not open", __FUNCTION__);
+ return;
+ }
+
+ dbg("%s unsupported (at this time)", __FUNCTION__);
+}
+
+
+static int bluetooth_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)tty->driver_data, __FUNCTION__);
+
+ if (!bluetooth) {
+ return -ENODEV;
+ }
+
+ dbg("%s - cmd 0x%.4x", __FUNCTION__, cmd);
+
+ if (!bluetooth->open_count) {
+ dbg ("%s - device not open", __FUNCTION__);
+ return -ENODEV;
+ }
+
+ /* FIXME!!! */
+ return -ENOIOCTLCMD;
+}
+
+
+static void bluetooth_set_termios (struct tty_struct *tty, struct termios * old)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)tty->driver_data, __FUNCTION__);
+
+ if (!bluetooth) {
+ return;
+ }
+
+ dbg("%s", __FUNCTION__);
+
+ if (!bluetooth->open_count) {
+ dbg ("%s - device not open", __FUNCTION__);
+ return;
+ }
+
+ /* FIXME!!! */
+
+ return;
+}
+
+
+#ifdef BTBUGGYHARDWARE
+void btusb_enable_bulk_read(struct tty_struct *tty){
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)tty->driver_data, __FUNCTION__);
+ int result;
+
+ if (!bluetooth) {
+ return;
+ }
+
+ dbg("%s", __FUNCTION__);
+
+ if (!bluetooth->open_count) {
+ dbg ("%s - device not open", __FUNCTION__);
+ return;
+ }
+
+ if (bluetooth->read_urb) {
+ usb_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, GFP_KERNEL);
+ if (result)
+ err ("%s - failed submitting read urb, error %d", __FUNCTION__, result);
+ }
+}
+
+void btusb_disable_bulk_read(struct tty_struct *tty){
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)tty->driver_data, __FUNCTION__);
+
+ if (!bluetooth) {
+ return;
+ }
+
+ dbg("%s", __FUNCTION__);
+
+ if (!bluetooth->open_count) {
+ dbg ("%s - device not open", __FUNCTION__);
+ return;
+ }
+
+ if ((bluetooth->read_urb) && (bluetooth->read_urb->actual_length))
+ usb_kill_urb(bluetooth->read_urb);
+}
+#endif
+
+
+/*****************************************************************************
+ * urb callback functions
+ *****************************************************************************/
+
+
+static void bluetooth_int_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
+ unsigned char *data = urb->transfer_buffer;
+ unsigned int i;
+ unsigned int count = urb->actual_length;
+ unsigned int packet_size;
+ int status;
+
+ dbg("%s", __FUNCTION__);
+
+ if (!bluetooth) {
+ dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
+ return;
+ }
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (!count) {
+ dbg("%s - zero length int", __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]);
+ }
+ printk ("\n");
+ }
+#endif
+
+#ifdef BTBUGGYHARDWARE
+ if ((count >= 2) && (data[0] == 0xFF) && (data[1] == 0x00)) {
+ data += 2;
+ count -= 2;
+ }
+ if (count == 0) {
+ urb->actual_length = 0;
+ goto exit;
+ }
+#endif
+ /* We add a packet type identifier to the beginning of each
+ HCI frame. This makes the data in the tty look like a
+ serial USB devices. Each HCI frame can be broken across
+ multiple URBs so we buffer them until we have a full hci
+ packet */
+
+ if (!bluetooth->int_packet_pos) {
+ bluetooth->int_buffer[0] = EVENT_PKT;
+ bluetooth->int_packet_pos++;
+ }
+
+ if (bluetooth->int_packet_pos + count > EVENT_BUFFER_SIZE) {
+ err("%s - exceeded EVENT_BUFFER_SIZE", __FUNCTION__);
+ bluetooth->int_packet_pos = 0;
+ goto exit;
+ }
+
+ memcpy (&bluetooth->int_buffer[bluetooth->int_packet_pos],
+ urb->transfer_buffer, count);
+ bluetooth->int_packet_pos += count;
+ urb->actual_length = 0;
+
+ if (bluetooth->int_packet_pos >= EVENT_HDR_SIZE)
+ packet_size = bluetooth->int_buffer[2];
+ else
+ goto exit;
+
+ if (packet_size + EVENT_HDR_SIZE < bluetooth->int_packet_pos) {
+ err("%s - packet was too long", __FUNCTION__);
+ bluetooth->int_packet_pos = 0;
+ goto exit;
+ }
+
+ if (packet_size + EVENT_HDR_SIZE == bluetooth->int_packet_pos) {
+ for (i = 0; i < bluetooth->int_packet_pos; ++i) {
+ /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them */
+ if (bluetooth->tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(bluetooth->tty);
+ }
+ tty_insert_flip_char(bluetooth->tty, bluetooth->int_buffer[i], 0);
+ }
+ tty_flip_buffer_push(bluetooth->tty);
+
+ bluetooth->int_packet_pos = 0;
+ }
+
+exit:
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, status);
+}
+
+
+static void bluetooth_ctrl_callback (struct urb *urb, struct pt_regs *regs)
+{
+ 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;
+ }
+}
+
+
+static void bluetooth_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
+ unsigned char *data = urb->transfer_buffer;
+ unsigned int count = urb->actual_length;
+ unsigned int i;
+ unsigned int packet_size;
+ 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]);
+ }
+ printk ("\n");
+ }
+#endif
+#ifdef BTBUGGYHARDWARE
+ if ((count == 4) && (data[0] == 0x00) && (data[1] == 0x00)
+ && (data[2] == 0x00) && (data[3] == 0x00)) {
+ urb->actual_length = 0;
+ usb_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, GFP_KERNEL);
+ if (result)
+ err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+
+ return;
+ }
+#endif
+ /* We add a packet type identifier to the beginning of each
+ HCI frame. This makes the data in the tty look like a
+ serial USB devices. Each HCI frame can be broken across
+ multiple URBs so we buffer them until we have a full hci
+ packet */
+
+ if (!bluetooth->bulk_packet_pos) {
+ bluetooth->bulk_buffer[0] = ACL_PKT;
+ bluetooth->bulk_packet_pos++;
+ }
+
+ if (bluetooth->bulk_packet_pos + count > ACL_BUFFER_SIZE) {
+ err("%s - exceeded ACL_BUFFER_SIZE", __FUNCTION__);
+ bluetooth->bulk_packet_pos = 0;
+ goto exit;
+ }
+
+ memcpy (&bluetooth->bulk_buffer[bluetooth->bulk_packet_pos],
+ urb->transfer_buffer, count);
+ bluetooth->bulk_packet_pos += count;
+ urb->actual_length = 0;
+
+ if (bluetooth->bulk_packet_pos >= ACL_HDR_SIZE) {
+ packet_size = CHAR2INT16(bluetooth->bulk_buffer[4],bluetooth->bulk_buffer[3]);
+ } else {
+ goto exit;
+ }
+
+ if (packet_size + ACL_HDR_SIZE < bluetooth->bulk_packet_pos) {
+ err("%s - packet was too long", __FUNCTION__);
+ bluetooth->bulk_packet_pos = 0;
+ goto exit;
+ }
+
+ if (packet_size + ACL_HDR_SIZE == bluetooth->bulk_packet_pos) {
+ for (i = 0; i < bluetooth->bulk_packet_pos; ++i) {
+ /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
+ if (bluetooth->tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(bluetooth->tty);
+ }
+ tty_insert_flip_char(bluetooth->tty, bluetooth->bulk_buffer[i], 0);
+ }
+ tty_flip_buffer_push(bluetooth->tty);
+ bluetooth->bulk_packet_pos = 0;
+ }
+
+exit:
+ if (!bluetooth || !bluetooth->open_count)
+ return;
+
+ usb_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, GFP_KERNEL);
+ if (result)
+ err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+
+ return;
+}
+
+
+static void bluetooth_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
+
+ dbg("%s", __FUNCTION__);
+
+ /* free up the transfer buffer, as usb_free_urb() does not do this */
+ kfree(urb->transfer_buffer);
+
+ 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;
+ }
+
+ /* wake up our little function to let the tty layer know that something happened */
+ schedule_work(&bluetooth->work);
+}
+
+
+static void bluetooth_softint(void *private)
+{
+ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)private, __FUNCTION__);
+
+ dbg("%s", __FUNCTION__);
+
+ if (!bluetooth)
+ return;
+
+ tty_wakeup(bluetooth->tty);
+}
+
+
+static int usb_bluetooth_probe (struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev (intf);
+ struct usb_bluetooth *bluetooth = NULL;
+ struct usb_host_interface *interface;
+ struct usb_endpoint_descriptor *endpoint;
+ struct usb_endpoint_descriptor *interrupt_in_endpoint[8];
+ struct usb_endpoint_descriptor *bulk_in_endpoint[8];
+ struct usb_endpoint_descriptor *bulk_out_endpoint[8];
+ int control_out_endpoint;
+
+ int minor;
+ int buffer_size;
+ int i;
+ int num_interrupt_in = 0;
+ int num_bulk_in = 0;
+ int num_bulk_out = 0;
+
+ interface = intf->cur_altsetting;
+ control_out_endpoint = interface->desc.bInterfaceNumber;
+
+ /* find the endpoints that we need */
+ for (i = 0; i < interface->desc.bNumEndpoints; ++i) {
+ endpoint = &interface->endpoint[i].desc;
+
+ if ((endpoint->bEndpointAddress & 0x80) &&
+ ((endpoint->bmAttributes & 3) == 0x02)) {
+ /* we found a bulk in endpoint */
+ dbg("found bulk in");
+ bulk_in_endpoint[num_bulk_in] = endpoint;
+ ++num_bulk_in;
+ }
+
+ if (((endpoint->bEndpointAddress & 0x80) == 0x00) &&
+ ((endpoint->bmAttributes & 3) == 0x02)) {
+ /* we found a bulk out endpoint */
+ dbg("found bulk out");
+ bulk_out_endpoint[num_bulk_out] = endpoint;
+ ++num_bulk_out;
+ }
+
+ if ((endpoint->bEndpointAddress & 0x80) &&
+ ((endpoint->bmAttributes & 3) == 0x03)) {
+ /* we found a interrupt in endpoint */
+ dbg("found interrupt in");
+ interrupt_in_endpoint[num_interrupt_in] = endpoint;
+ ++num_interrupt_in;
+ }
+ }
+
+ /* according to the spec, we can only have 1 bulk_in, 1 bulk_out, and 1 interrupt_in endpoints */
+ 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 -EIO;
+ }
+
+ info("USB Bluetooth converter detected");
+
+ for (minor = 0; minor < BLUETOOTH_TTY_MINORS && bluetooth_table[minor]; ++minor)
+ ;
+ if (bluetooth_table[minor]) {
+ err("No more free Bluetooth devices");
+ return -ENODEV;
+ }
+
+ if (!(bluetooth = kmalloc(sizeof(struct usb_bluetooth), GFP_KERNEL))) {
+ err("Out of memory");
+ return -ENOMEM;
+ }
+
+ memset(bluetooth, 0, sizeof(struct usb_bluetooth));
+
+ bluetooth->magic = USB_BLUETOOTH_MAGIC;
+ bluetooth->dev = dev;
+ bluetooth->minor = minor;
+ INIT_WORK(&bluetooth->work, bluetooth_softint, bluetooth);
+ init_MUTEX(&bluetooth->lock);
+
+ /* record the interface number for the control out */
+ bluetooth->control_out_bInterfaceNum = control_out_endpoint;
+
+ /* create our control out urb pool */
+ for (i = 0; i < NUM_CONTROL_URBS; ++i) {
+ struct urb *urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (urb == NULL) {
+ err("No free urbs available");
+ goto probe_error;
+ }
+ urb->transfer_buffer = NULL;
+ bluetooth->control_urb_pool[i] = urb;
+ }
+
+ /* set up the endpoint information */
+ endpoint = bulk_in_endpoint[0];
+ bluetooth->read_urb = usb_alloc_urb (0, GFP_KERNEL);
+ if (!bluetooth->read_urb) {
+ err("No free urbs available");
+ goto probe_error;
+ }
+ bluetooth->bulk_in_buffer_size = buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ bluetooth->bulk_in_endpointAddress = endpoint->bEndpointAddress;
+ bluetooth->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
+ if (!bluetooth->bulk_in_buffer) {
+ err("Couldn't allocate bulk_in_buffer");
+ goto probe_error;
+ }
+ usb_fill_bulk_urb(bluetooth->read_urb, dev, usb_rcvbulkpipe(dev, endpoint->bEndpointAddress),
+ bluetooth->bulk_in_buffer, buffer_size, bluetooth_read_bulk_callback, bluetooth);
+
+ endpoint = bulk_out_endpoint[0];
+ bluetooth->bulk_out_endpointAddress = endpoint->bEndpointAddress;
+ bluetooth->bulk_out_buffer_size = le16_to_cpu(endpoint->wMaxPacketSize) * 2;
+
+ endpoint = interrupt_in_endpoint[0];
+ bluetooth->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!bluetooth->interrupt_in_urb) {
+ err("No free urbs available");
+ goto probe_error;
+ }
+ bluetooth->interrupt_in_buffer_size = buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ bluetooth->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
+ bluetooth->interrupt_in_interval = endpoint->bInterval;
+ bluetooth->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
+ if (!bluetooth->interrupt_in_buffer) {
+ err("Couldn't allocate interrupt_in_buffer");
+ goto probe_error;
+ }
+ usb_fill_int_urb(bluetooth->interrupt_in_urb, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+ bluetooth->interrupt_in_buffer, buffer_size, bluetooth_int_callback,
+ bluetooth, endpoint->bInterval);
+
+ /* initialize the devfs nodes for this device and let the user know what bluetooths we are bound to */
+ tty_register_device (bluetooth_tty_driver, minor, &intf->dev);
+ info("Bluetooth converter now attached to ttyUB%d (or usb/ttub/%d for devfs)", minor, minor);
+
+ bluetooth_table[minor] = bluetooth;
+
+ /* success */
+ usb_set_intfdata (intf, bluetooth);
+ return 0;
+
+probe_error:
+ if (bluetooth->read_urb)
+ usb_free_urb (bluetooth->read_urb);
+ if (bluetooth->bulk_in_buffer)
+ kfree (bluetooth->bulk_in_buffer);
+ if (bluetooth->interrupt_in_urb)
+ usb_free_urb (bluetooth->interrupt_in_urb);
+ if (bluetooth->interrupt_in_buffer)
+ kfree (bluetooth->interrupt_in_buffer);
+ for (i = 0; i < NUM_CONTROL_URBS; ++i)
+ if (bluetooth->control_urb_pool[i]) {
+ if (bluetooth->control_urb_pool[i]->transfer_buffer)
+ kfree (bluetooth->control_urb_pool[i]->transfer_buffer);
+ usb_free_urb (bluetooth->control_urb_pool[i]);
+ }
+
+ bluetooth_table[minor] = NULL;
+
+ /* free up any memory that we allocated */
+ kfree (bluetooth);
+ return -EIO;
+}
+
+
+static void usb_bluetooth_disconnect(struct usb_interface *intf)
+{
+ struct usb_bluetooth *bluetooth = usb_get_intfdata (intf);
+ int i;
+
+ usb_set_intfdata (intf, NULL);
+ if (bluetooth) {
+ if ((bluetooth->open_count) && (bluetooth->tty))
+ tty_hangup(bluetooth->tty);
+
+ bluetooth->open_count = 0;
+
+ if (bluetooth->read_urb) {
+ usb_kill_urb (bluetooth->read_urb);
+ usb_free_urb (bluetooth->read_urb);
+ }
+ if (bluetooth->bulk_in_buffer)
+ kfree (bluetooth->bulk_in_buffer);
+
+ if (bluetooth->interrupt_in_urb) {
+ usb_kill_urb (bluetooth->interrupt_in_urb);
+ usb_free_urb (bluetooth->interrupt_in_urb);
+ }
+ if (bluetooth->interrupt_in_buffer)
+ kfree (bluetooth->interrupt_in_buffer);
+
+ tty_unregister_device (bluetooth_tty_driver, bluetooth->minor);
+
+ for (i = 0; i < NUM_CONTROL_URBS; ++i) {
+ if (bluetooth->control_urb_pool[i]) {
+ usb_kill_urb (bluetooth->control_urb_pool[i]);
+ if (bluetooth->control_urb_pool[i]->transfer_buffer)
+ kfree (bluetooth->control_urb_pool[i]->transfer_buffer);
+ usb_free_urb (bluetooth->control_urb_pool[i]);
+ }
+ }
+
+ info("Bluetooth converter now disconnected from ttyUB%d", bluetooth->minor);
+
+ bluetooth_table[bluetooth->minor] = NULL;
+
+ /* free up any memory that we allocated */
+ kfree (bluetooth);
+ } else {
+ info("device disconnected");
+ }
+}
+
+static struct tty_operations bluetooth_ops = {
+ .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,
+};
+
+static int usb_bluetooth_init(void)
+{
+ int i;
+ int result;
+
+ /* Initialize our global data */
+ for (i = 0; i < BLUETOOTH_TTY_MINORS; ++i) {
+ bluetooth_table[i] = NULL;
+ }
+
+ info ("USB Bluetooth support registered");
+
+ bluetooth_tty_driver = alloc_tty_driver(BLUETOOTH_TTY_MINORS);
+ if (!bluetooth_tty_driver)
+ return -ENOMEM;
+
+ bluetooth_tty_driver->owner = THIS_MODULE;
+ bluetooth_tty_driver->driver_name = "usb-bluetooth";
+ bluetooth_tty_driver->name = "ttyUB";
+ bluetooth_tty_driver->devfs_name = "usb/ttub/";
+ bluetooth_tty_driver->major = BLUETOOTH_TTY_MAJOR;
+ bluetooth_tty_driver->minor_start = 0;
+ bluetooth_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
+ bluetooth_tty_driver->subtype = SERIAL_TYPE_NORMAL;
+ bluetooth_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+ bluetooth_tty_driver->init_termios = tty_std_termios;
+ bluetooth_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+ tty_set_operations(bluetooth_tty_driver, &bluetooth_ops);
+ if (tty_register_driver (bluetooth_tty_driver)) {
+ err("%s - failed to register tty driver", __FUNCTION__);
+ put_tty_driver(bluetooth_tty_driver);
+ return -1;
+ }
+
+ /* register the USB driver */
+ result = usb_register(&usb_bluetooth_driver);
+ if (result < 0) {
+ tty_unregister_driver(bluetooth_tty_driver);
+ put_tty_driver(bluetooth_tty_driver);
+ err("usb_register failed for the USB bluetooth driver. Error number %d", result);
+ return -1;
+ }
+
+ info(DRIVER_DESC " " DRIVER_VERSION);
+
+ return 0;
+}
+
+
+static void usb_bluetooth_exit(void)
+{
+ usb_deregister(&usb_bluetooth_driver);
+ tty_unregister_driver(bluetooth_tty_driver);
+ put_tty_driver(bluetooth_tty_driver);
+}
+
+
+module_init(usb_bluetooth_init);
+module_exit(usb_bluetooth_exit);
+
+/* Module information */
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
new file mode 100644
index 000000000000..6d1f9b6aecff
--- /dev/null
+++ b/drivers/usb/class/cdc-acm.c
@@ -0,0 +1,942 @@
+/*
+ * cdc-acm.c
+ *
+ * Copyright (c) 1999 Armin Fuerst <fuerst@in.tum.de>
+ * Copyright (c) 1999 Pavel Machek <pavel@suse.cz>
+ * Copyright (c) 1999 Johannes Erdfelt <johannes@erdfelt.com>
+ * Copyright (c) 2000 Vojtech Pavlik <vojtech@suse.cz>
+ * Copyright (c) 2004 Oliver Neukum <oliver@neukum.name>
+ *
+ * USB Abstract Control Model driver for USB modems and ISDN adapters
+ *
+ * Sponsored by SuSE
+ *
+ * ChangeLog:
+ * v0.9 - thorough cleaning, URBification, almost a rewrite
+ * v0.10 - some more cleanups
+ * v0.11 - fixed flow control, read error doesn't stop reads
+ * v0.12 - added TIOCM ioctls, added break handling, made struct acm kmalloced
+ * v0.13 - added termios, added hangup
+ * v0.14 - sized down struct acm
+ * v0.15 - fixed flow control again - characters could be lost
+ * v0.16 - added code for modems with swapped data and control interfaces
+ * v0.17 - added new style probing
+ * v0.18 - fixed new style probing for devices with more configurations
+ * v0.19 - fixed CLOCAL handling (thanks to Richard Shih-Ping Chan)
+ * v0.20 - switched to probing on interface (rather than device) class
+ * v0.21 - revert to probing on device for devices with multiple configs
+ * v0.22 - probe only the control interface. if usbcore doesn't choose the
+ * config we want, sysadmin changes bConfigurationValue in sysfs.
+ * v0.23 - use softirq for rx processing, as needed by tty layer
+ * v0.24 - change probe method to evaluate CDC union descriptor
+ */
+
+/*
+ * 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
+ */
+
+#undef DEBUG
+
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/smp_lock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include <linux/usb_cdc.h>
+#include <asm/byteorder.h>
+#include <asm/unaligned.h>
+
+#include "cdc-acm.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.23"
+#define DRIVER_AUTHOR "Armin Fuerst, Pavel Machek, Johannes Erdfelt, Vojtech Pavlik"
+#define DRIVER_DESC "USB Abstract Control Model driver for USB modems and ISDN adapters"
+
+static struct usb_driver acm_driver;
+static struct tty_driver *acm_tty_driver;
+static struct acm *acm_table[ACM_TTY_MINORS];
+
+static DECLARE_MUTEX(open_sem);
+
+#define ACM_READY(acm) (acm && acm->dev && acm->used)
+
+/*
+ * Functions for ACM control messages.
+ */
+
+static int acm_ctrl_msg(struct acm *acm, int request, int value, void *buf, int len)
+{
+ int retval = usb_control_msg(acm->dev, usb_sndctrlpipe(acm->dev, 0),
+ request, USB_RT_ACM, value,
+ acm->control->altsetting[0].desc.bInterfaceNumber,
+ buf, len, 5000);
+ dbg("acm_control_msg: rq: 0x%02x val: %#x len: %#x result: %d", request, value, len, retval);
+ return retval < 0 ? retval : 0;
+}
+
+/* devices aren't required to support these requests.
+ * the cdc acm descriptor tells whether they do...
+ */
+#define acm_set_control(acm, control) \
+ acm_ctrl_msg(acm, USB_CDC_REQ_SET_CONTROL_LINE_STATE, control, NULL, 0)
+#define acm_set_line(acm, line) \
+ acm_ctrl_msg(acm, USB_CDC_REQ_SET_LINE_CODING, 0, line, sizeof *(line))
+#define acm_send_break(acm, ms) \
+ acm_ctrl_msg(acm, USB_CDC_REQ_SEND_BREAK, ms, NULL, 0)
+
+/*
+ * Interrupt handlers for various ACM device responses
+ */
+
+/* control interface reports status changes with "interrupt" transfers */
+static void acm_ctrl_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct acm *acm = urb->context;
+ struct usb_cdc_notification *dr = urb->transfer_buffer;
+ unsigned char *data;
+ int newctrl;
+ int status;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (!ACM_READY(acm))
+ goto exit;
+
+ data = (unsigned char *)(dr + 1);
+ switch (dr->bNotificationType) {
+
+ case USB_CDC_NOTIFY_NETWORK_CONNECTION:
+
+ dbg("%s network", dr->wValue ? "connected to" : "disconnected from");
+ break;
+
+ case USB_CDC_NOTIFY_SERIAL_STATE:
+
+ newctrl = le16_to_cpu(get_unaligned((__le16 *) data));
+
+ if (acm->tty && !acm->clocal && (acm->ctrlin & ~newctrl & ACM_CTRL_DCD)) {
+ dbg("calling hangup");
+ tty_hangup(acm->tty);
+ }
+
+ acm->ctrlin = newctrl;
+
+ dbg("input control lines: dcd%c dsr%c break%c ring%c framing%c parity%c overrun%c",
+ acm->ctrlin & ACM_CTRL_DCD ? '+' : '-', acm->ctrlin & ACM_CTRL_DSR ? '+' : '-',
+ acm->ctrlin & ACM_CTRL_BRK ? '+' : '-', acm->ctrlin & ACM_CTRL_RI ? '+' : '-',
+ acm->ctrlin & ACM_CTRL_FRAMING ? '+' : '-', acm->ctrlin & ACM_CTRL_PARITY ? '+' : '-',
+ acm->ctrlin & ACM_CTRL_OVERRUN ? '+' : '-');
+
+ break;
+
+ default:
+ dbg("unknown notification %d received: index %d len %d data0 %d data1 %d",
+ dr->bNotificationType, dr->wIndex,
+ dr->wLength, data[0], data[1]);
+ break;
+ }
+exit:
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, status);
+}
+
+/* data interface returns incoming bytes, or we got unthrottled */
+static void acm_read_bulk(struct urb *urb, struct pt_regs *regs)
+{
+ struct acm *acm = urb->context;
+ dbg("Entering acm_read_bulk with status %d\n", urb->status);
+
+ if (!ACM_READY(acm))
+ return;
+
+ if (urb->status)
+ dev_dbg(&acm->data->dev, "bulk rx status %d\n", urb->status);
+
+ /* calling tty_flip_buffer_push() in_irq() isn't allowed */
+ tasklet_schedule(&acm->bh);
+}
+
+static void acm_rx_tasklet(unsigned long _acm)
+{
+ struct acm *acm = (void *)_acm;
+ struct urb *urb = acm->readurb;
+ struct tty_struct *tty = acm->tty;
+ unsigned char *data = urb->transfer_buffer;
+ int i = 0;
+ dbg("Entering acm_rx_tasklet");
+
+ if (urb->actual_length > 0 && !acm->throttle) {
+ for (i = 0; i < urb->actual_length && !acm->throttle; i++) {
+ /* if we insert more than TTY_FLIPBUF_SIZE characters,
+ * we drop them. */
+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ dbg("Handed %d bytes to tty layer", i+1);
+ tty_flip_buffer_push(tty);
+ }
+
+ spin_lock(&acm->throttle_lock);
+ if (acm->throttle) {
+ dbg("Throtteling noticed");
+ memmove(data, data + i, urb->actual_length - i);
+ urb->actual_length -= i;
+ acm->resubmit_to_unthrottle = 1;
+ spin_unlock(&acm->throttle_lock);
+ return;
+ }
+ spin_unlock(&acm->throttle_lock);
+
+ urb->actual_length = 0;
+ urb->dev = acm->dev;
+
+ i = usb_submit_urb(urb, GFP_ATOMIC);
+ if (i)
+ dev_dbg(&acm->data->dev, "bulk rx resubmit %d\n", i);
+}
+
+/* data interface wrote those outgoing bytes */
+static void acm_write_bulk(struct urb *urb, struct pt_regs *regs)
+{
+ struct acm *acm = (struct acm *)urb->context;
+ dbg("Entering acm_write_bulk with status %d\n", urb->status);
+
+ if (!ACM_READY(acm))
+ goto out;
+
+ if (urb->status)
+ dbg("nonzero write bulk status received: %d", urb->status);
+
+ schedule_work(&acm->work);
+out:
+ acm->ready_for_write = 1;
+}
+
+static void acm_softint(void *private)
+{
+ struct acm *acm = private;
+ dbg("Entering acm_softint.\n");
+
+ if (!ACM_READY(acm))
+ return;
+ tty_wakeup(acm->tty);
+}
+
+/*
+ * TTY handlers
+ */
+
+static int acm_tty_open(struct tty_struct *tty, struct file *filp)
+{
+ struct acm *acm;
+ int rv = -EINVAL;
+ dbg("Entering acm_tty_open.\n");
+
+ down(&open_sem);
+
+ acm = acm_table[tty->index];
+ if (!acm || !acm->dev)
+ goto err_out;
+ else
+ rv = 0;
+
+ tty->driver_data = acm;
+ acm->tty = tty;
+
+
+
+ if (acm->used++) {
+ goto done;
+ }
+
+ acm->ctrlurb->dev = acm->dev;
+ if (usb_submit_urb(acm->ctrlurb, GFP_KERNEL)) {
+ dbg("usb_submit_urb(ctrl irq) failed");
+ goto bail_out;
+ }
+
+ acm->readurb->dev = acm->dev;
+ if (usb_submit_urb(acm->readurb, GFP_KERNEL)) {
+ dbg("usb_submit_urb(read bulk) failed");
+ goto bail_out_and_unlink;
+ }
+
+ if (0 > acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS))
+ goto full_bailout;
+
+ /* force low_latency on so that our tty_push actually forces the data through,
+ otherwise it is scheduled, and with high data rates data can get lost. */
+ tty->low_latency = 1;
+
+done:
+err_out:
+ up(&open_sem);
+ return rv;
+
+full_bailout:
+ usb_kill_urb(acm->readurb);
+bail_out_and_unlink:
+ usb_kill_urb(acm->ctrlurb);
+bail_out:
+ acm->used--;
+ up(&open_sem);
+ return -EIO;
+}
+
+static void acm_tty_close(struct tty_struct *tty, struct file *filp)
+{
+ struct acm *acm = tty->driver_data;
+
+ if (!acm || !acm->used)
+ return;
+
+ down(&open_sem);
+ if (!--acm->used) {
+ if (acm->dev) {
+ acm_set_control(acm, acm->ctrlout = 0);
+ usb_kill_urb(acm->ctrlurb);
+ usb_kill_urb(acm->writeurb);
+ usb_kill_urb(acm->readurb);
+ } else {
+ tty_unregister_device(acm_tty_driver, acm->minor);
+ acm_table[acm->minor] = NULL;
+ usb_free_urb(acm->ctrlurb);
+ usb_free_urb(acm->readurb);
+ usb_free_urb(acm->writeurb);
+ kfree(acm);
+ }
+ }
+ up(&open_sem);
+}
+
+static int acm_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
+{
+ struct acm *acm = tty->driver_data;
+ int stat;
+ dbg("Entering acm_tty_write to write %d bytes,\n", count);
+
+ if (!ACM_READY(acm))
+ return -EINVAL;
+ if (!acm->ready_for_write)
+ return 0;
+ if (!count)
+ return 0;
+
+ count = (count > acm->writesize) ? acm->writesize : count;
+
+ dbg("Get %d bytes...", count);
+ memcpy(acm->write_buffer, buf, count);
+ dbg(" Successfully copied.\n");
+
+ acm->writeurb->transfer_buffer_length = count;
+ acm->writeurb->dev = acm->dev;
+
+ acm->ready_for_write = 0;
+ stat = usb_submit_urb(acm->writeurb, GFP_ATOMIC);
+ if (stat < 0) {
+ dbg("usb_submit_urb(write bulk) failed");
+ acm->ready_for_write = 1;
+ return stat;
+ }
+
+ return count;
+}
+
+static int acm_tty_write_room(struct tty_struct *tty)
+{
+ struct acm *acm = tty->driver_data;
+ if (!ACM_READY(acm))
+ return -EINVAL;
+ return !acm->ready_for_write ? 0 : acm->writesize;
+}
+
+static int acm_tty_chars_in_buffer(struct tty_struct *tty)
+{
+ struct acm *acm = tty->driver_data;
+ if (!ACM_READY(acm))
+ return -EINVAL;
+ return !acm->ready_for_write ? acm->writeurb->transfer_buffer_length : 0;
+}
+
+static void acm_tty_throttle(struct tty_struct *tty)
+{
+ struct acm *acm = tty->driver_data;
+ if (!ACM_READY(acm))
+ return;
+ spin_lock_bh(&acm->throttle_lock);
+ acm->throttle = 1;
+ spin_unlock_bh(&acm->throttle_lock);
+}
+
+static void acm_tty_unthrottle(struct tty_struct *tty)
+{
+ struct acm *acm = tty->driver_data;
+ if (!ACM_READY(acm))
+ return;
+ spin_lock_bh(&acm->throttle_lock);
+ acm->throttle = 0;
+ spin_unlock_bh(&acm->throttle_lock);
+ if (acm->resubmit_to_unthrottle) {
+ acm->resubmit_to_unthrottle = 0;
+ acm_read_bulk(acm->readurb, NULL);
+ }
+}
+
+static void acm_tty_break_ctl(struct tty_struct *tty, int state)
+{
+ struct acm *acm = tty->driver_data;
+ if (!ACM_READY(acm))
+ return;
+ if (acm_send_break(acm, state ? 0xffff : 0))
+ dbg("send break failed");
+}
+
+static int acm_tty_tiocmget(struct tty_struct *tty, struct file *file)
+{
+ struct acm *acm = tty->driver_data;
+
+ if (!ACM_READY(acm))
+ return -EINVAL;
+
+ return (acm->ctrlout & ACM_CTRL_DTR ? TIOCM_DTR : 0) |
+ (acm->ctrlout & ACM_CTRL_RTS ? TIOCM_RTS : 0) |
+ (acm->ctrlin & ACM_CTRL_DSR ? TIOCM_DSR : 0) |
+ (acm->ctrlin & ACM_CTRL_RI ? TIOCM_RI : 0) |
+ (acm->ctrlin & ACM_CTRL_DCD ? TIOCM_CD : 0) |
+ TIOCM_CTS;
+}
+
+static int acm_tty_tiocmset(struct tty_struct *tty, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct acm *acm = tty->driver_data;
+ unsigned int newctrl;
+
+ if (!ACM_READY(acm))
+ return -EINVAL;
+
+ newctrl = acm->ctrlout;
+ set = (set & TIOCM_DTR ? ACM_CTRL_DTR : 0) | (set & TIOCM_RTS ? ACM_CTRL_RTS : 0);
+ clear = (clear & TIOCM_DTR ? ACM_CTRL_DTR : 0) | (clear & TIOCM_RTS ? ACM_CTRL_RTS : 0);
+
+ newctrl = (newctrl & ~clear) | set;
+
+ if (acm->ctrlout == newctrl)
+ return 0;
+ return acm_set_control(acm, acm->ctrlout = newctrl);
+}
+
+static int acm_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct acm *acm = tty->driver_data;
+
+ if (!ACM_READY(acm))
+ return -EINVAL;
+
+ return -ENOIOCTLCMD;
+}
+
+static __u32 acm_tty_speed[] = {
+ 0, 50, 75, 110, 134, 150, 200, 300, 600,
+ 1200, 1800, 2400, 4800, 9600, 19200, 38400,
+ 57600, 115200, 230400, 460800, 500000, 576000,
+ 921600, 1000000, 1152000, 1500000, 2000000,
+ 2500000, 3000000, 3500000, 4000000
+};
+
+static __u8 acm_tty_size[] = {
+ 5, 6, 7, 8
+};
+
+static void acm_tty_set_termios(struct tty_struct *tty, struct termios *termios_old)
+{
+ struct acm *acm = tty->driver_data;
+ struct termios *termios = tty->termios;
+ struct usb_cdc_line_coding newline;
+ int newctrl = acm->ctrlout;
+
+ if (!ACM_READY(acm))
+ return;
+
+ newline.dwDTERate = cpu_to_le32p(acm_tty_speed +
+ (termios->c_cflag & CBAUD & ~CBAUDEX) + (termios->c_cflag & CBAUDEX ? 15 : 0));
+ newline.bCharFormat = termios->c_cflag & CSTOPB ? 2 : 0;
+ newline.bParityType = termios->c_cflag & PARENB ?
+ (termios->c_cflag & PARODD ? 1 : 2) + (termios->c_cflag & CMSPAR ? 2 : 0) : 0;
+ newline.bDataBits = acm_tty_size[(termios->c_cflag & CSIZE) >> 4];
+
+ acm->clocal = ((termios->c_cflag & CLOCAL) != 0);
+
+ if (!newline.dwDTERate) {
+ newline.dwDTERate = acm->line.dwDTERate;
+ newctrl &= ~ACM_CTRL_DTR;
+ } else newctrl |= ACM_CTRL_DTR;
+
+ if (newctrl != acm->ctrlout)
+ acm_set_control(acm, acm->ctrlout = newctrl);
+
+ if (memcmp(&acm->line, &newline, sizeof newline)) {
+ memcpy(&acm->line, &newline, sizeof newline);
+ dbg("set line: %d %d %d %d", le32_to_cpu(newline.dwDTERate),
+ newline.bCharFormat, newline.bParityType,
+ newline.bDataBits);
+ acm_set_line(acm, &acm->line);
+ }
+}
+
+/*
+ * USB probe and disconnect routines.
+ */
+
+static int acm_probe (struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_cdc_union_desc *union_header = NULL;
+ char *buffer = intf->altsetting->extra;
+ int buflen = intf->altsetting->extralen;
+ struct usb_interface *control_interface;
+ struct usb_interface *data_interface;
+ struct usb_endpoint_descriptor *epctrl;
+ struct usb_endpoint_descriptor *epread;
+ struct usb_endpoint_descriptor *epwrite;
+ struct usb_device *usb_dev = interface_to_usbdev(intf);
+ struct acm *acm;
+ int minor;
+ int ctrlsize,readsize;
+ u8 *buf;
+ u8 ac_management_function = 0;
+ u8 call_management_function = 0;
+ int call_interface_num = -1;
+ int data_interface_num;
+ unsigned long quirks;
+
+ /* handle quirks deadly to normal probing*/
+ quirks = (unsigned long)id->driver_info;
+ if (quirks == NO_UNION_NORMAL) {
+ data_interface = usb_ifnum_to_if(usb_dev, 1);
+ control_interface = usb_ifnum_to_if(usb_dev, 0);
+ goto skip_normal_probe;
+ }
+
+ /* normal probing*/
+ if (!buffer) {
+ err("Wierd descriptor references\n");
+ return -EINVAL;
+ }
+
+ if (!buflen) {
+ if (intf->cur_altsetting->endpoint->extralen && intf->cur_altsetting->endpoint->extra) {
+ dev_dbg(&intf->dev,"Seeking extra descriptors on endpoint\n");
+ buflen = intf->cur_altsetting->endpoint->extralen;
+ buffer = intf->cur_altsetting->endpoint->extra;
+ } else {
+ err("Zero length descriptor references\n");
+ return -EINVAL;
+ }
+ }
+
+ while (buflen > 0) {
+ if (buffer [1] != USB_DT_CS_INTERFACE) {
+ err("skipping garbage\n");
+ goto next_desc;
+ }
+
+ switch (buffer [2]) {
+ case USB_CDC_UNION_TYPE: /* we've found it */
+ if (union_header) {
+ err("More than one union descriptor, skipping ...");
+ goto next_desc;
+ }
+ union_header = (struct usb_cdc_union_desc *)
+ buffer;
+ break;
+ case USB_CDC_COUNTRY_TYPE: /* maybe somehow export */
+ break; /* for now we ignore it */
+ case USB_CDC_HEADER_TYPE: /* maybe check version */
+ break; /* for now we ignore it */
+ case USB_CDC_ACM_TYPE:
+ ac_management_function = buffer[3];
+ break;
+ case USB_CDC_CALL_MANAGEMENT_TYPE:
+ call_management_function = buffer[3];
+ call_interface_num = buffer[4];
+ if ((call_management_function & 3) != 3)
+ err("This device cannot do calls on its own. It is no modem.");
+ break;
+
+ default:
+ err("Ignoring extra header, type %d, length %d", buffer[2], buffer[0]);
+ break;
+ }
+next_desc:
+ buflen -= buffer[0];
+ buffer += buffer[0];
+ }
+
+ if (!union_header) {
+ if (call_interface_num > 0) {
+ dev_dbg(&intf->dev,"No union descriptor, using call management descriptor\n");
+ data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = call_interface_num));
+ control_interface = intf;
+ } else {
+ dev_dbg(&intf->dev,"No union descriptor, giving up\n");
+ return -ENODEV;
+ }
+ } else {
+ control_interface = usb_ifnum_to_if(usb_dev, union_header->bMasterInterface0);
+ data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = union_header->bSlaveInterface0));
+ if (!control_interface || !data_interface) {
+ dev_dbg(&intf->dev,"no interfaces\n");
+ return -ENODEV;
+ }
+ }
+
+ if (data_interface_num != call_interface_num)
+ dev_dbg(&intf->dev,"Seperate call control interface. That is not fully supported.\n");
+
+skip_normal_probe:
+
+ /*workaround for switched interfaces */
+ if (data_interface->cur_altsetting->desc.bInterfaceClass != CDC_DATA_INTERFACE_TYPE) {
+ if (control_interface->cur_altsetting->desc.bInterfaceClass == CDC_DATA_INTERFACE_TYPE) {
+ struct usb_interface *t;
+ dev_dbg(&intf->dev,"Your device has switched interfaces.\n");
+
+ t = control_interface;
+ control_interface = data_interface;
+ data_interface = t;
+ } else {
+ return -EINVAL;
+ }
+ }
+
+ if (usb_interface_claimed(data_interface)) { /* valid in this context */
+ dev_dbg(&intf->dev,"The data interface isn't available\n");
+ return -EBUSY;
+ }
+
+
+ if (data_interface->cur_altsetting->desc.bNumEndpoints < 2)
+ return -EINVAL;
+
+ epctrl = &control_interface->cur_altsetting->endpoint[0].desc;
+ epread = &data_interface->cur_altsetting->endpoint[0].desc;
+ epwrite = &data_interface->cur_altsetting->endpoint[1].desc;
+
+
+ /* workaround for switched endpoints */
+ if ((epread->bEndpointAddress & USB_DIR_IN) != USB_DIR_IN) {
+ /* descriptors are swapped */
+ struct usb_endpoint_descriptor *t;
+ dev_dbg(&intf->dev,"The data interface has switched endpoints\n");
+
+ t = epread;
+ epread = epwrite;
+ epwrite = t;
+ }
+ dbg("interfaces are valid");
+ for (minor = 0; minor < ACM_TTY_MINORS && acm_table[minor]; minor++);
+
+ if (minor == ACM_TTY_MINORS) {
+ err("no more free acm devices");
+ return -ENODEV;
+ }
+
+ if (!(acm = kmalloc(sizeof(struct acm), GFP_KERNEL))) {
+ dev_dbg(&intf->dev, "out of memory (acm kmalloc)\n");
+ goto alloc_fail;
+ }
+ memset(acm, 0, sizeof(struct acm));
+
+ ctrlsize = le16_to_cpu(epctrl->wMaxPacketSize);
+ readsize = le16_to_cpu(epread->wMaxPacketSize);
+ acm->writesize = le16_to_cpu(epwrite->wMaxPacketSize);
+ acm->control = control_interface;
+ acm->data = data_interface;
+ acm->minor = minor;
+ acm->dev = usb_dev;
+ acm->ctrl_caps = ac_management_function;
+ acm->ctrlsize = ctrlsize;
+ acm->readsize = readsize;
+ acm->bh.func = acm_rx_tasklet;
+ acm->bh.data = (unsigned long) acm;
+ INIT_WORK(&acm->work, acm_softint, acm);
+ spin_lock_init(&acm->throttle_lock);
+ acm->ready_for_write = 1;
+
+ buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
+ if (!buf) {
+ dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)\n");
+ goto alloc_fail2;
+ }
+ acm->ctrl_buffer = buf;
+
+ buf = usb_buffer_alloc(usb_dev, readsize, GFP_KERNEL, &acm->read_dma);
+ if (!buf) {
+ dev_dbg(&intf->dev, "out of memory (read buffer alloc)\n");
+ goto alloc_fail3;
+ }
+ acm->read_buffer = buf;
+
+ buf = usb_buffer_alloc(usb_dev, acm->writesize, GFP_KERNEL, &acm->write_dma);
+ if (!buf) {
+ dev_dbg(&intf->dev, "out of memory (write buffer alloc)\n");
+ goto alloc_fail4;
+ }
+ acm->write_buffer = buf;
+
+ acm->ctrlurb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!acm->ctrlurb) {
+ dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)\n");
+ goto alloc_fail5;
+ }
+ acm->readurb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!acm->readurb) {
+ dev_dbg(&intf->dev, "out of memory (readurb kmalloc)\n");
+ goto alloc_fail6;
+ }
+ acm->writeurb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!acm->writeurb) {
+ dev_dbg(&intf->dev, "out of memory (writeurb kmalloc)\n");
+ goto alloc_fail7;
+ }
+
+ usb_fill_int_urb(acm->ctrlurb, usb_dev, usb_rcvintpipe(usb_dev, epctrl->bEndpointAddress),
+ acm->ctrl_buffer, ctrlsize, acm_ctrl_irq, acm, epctrl->bInterval);
+ acm->ctrlurb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+ acm->ctrlurb->transfer_dma = acm->ctrl_dma;
+
+ usb_fill_bulk_urb(acm->readurb, usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress),
+ acm->read_buffer, readsize, acm_read_bulk, acm);
+ acm->readurb->transfer_flags |= URB_NO_FSBR | URB_NO_TRANSFER_DMA_MAP;
+ acm->readurb->transfer_dma = acm->read_dma;
+
+ usb_fill_bulk_urb(acm->writeurb, usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress),
+ acm->write_buffer, acm->writesize, acm_write_bulk, acm);
+ acm->writeurb->transfer_flags |= URB_NO_FSBR | URB_NO_TRANSFER_DMA_MAP;
+ acm->writeurb->transfer_dma = acm->write_dma;
+
+ dev_info(&intf->dev, "ttyACM%d: USB ACM device\n", minor);
+
+ acm_set_control(acm, acm->ctrlout);
+
+ acm->line.dwDTERate = cpu_to_le32(9600);
+ acm->line.bDataBits = 8;
+ acm_set_line(acm, &acm->line);
+
+ usb_driver_claim_interface(&acm_driver, data_interface, acm);
+
+ tty_register_device(acm_tty_driver, minor, &intf->dev);
+
+ acm_table[minor] = acm;
+ usb_set_intfdata (intf, acm);
+ return 0;
+
+alloc_fail7:
+ usb_free_urb(acm->readurb);
+alloc_fail6:
+ usb_free_urb(acm->ctrlurb);
+alloc_fail5:
+ usb_buffer_free(usb_dev, acm->writesize, acm->write_buffer, acm->write_dma);
+alloc_fail4:
+ usb_buffer_free(usb_dev, readsize, acm->read_buffer, acm->read_dma);
+alloc_fail3:
+ usb_buffer_free(usb_dev, ctrlsize, acm->ctrl_buffer, acm->ctrl_dma);
+alloc_fail2:
+ kfree(acm);
+alloc_fail:
+ return -ENOMEM;
+}
+
+static void acm_disconnect(struct usb_interface *intf)
+{
+ struct acm *acm = usb_get_intfdata (intf);
+ struct usb_device *usb_dev = interface_to_usbdev(intf);
+
+ if (!acm || !acm->dev) {
+ dbg("disconnect on nonexisting interface");
+ return;
+ }
+
+ down(&open_sem);
+ acm->dev = NULL;
+ usb_set_intfdata (intf, NULL);
+
+ usb_kill_urb(acm->ctrlurb);
+ usb_kill_urb(acm->readurb);
+ usb_kill_urb(acm->writeurb);
+
+ flush_scheduled_work(); /* wait for acm_softint */
+
+ usb_buffer_free(usb_dev, acm->writesize, acm->write_buffer, acm->write_dma);
+ usb_buffer_free(usb_dev, acm->readsize, acm->read_buffer, acm->read_dma);
+ usb_buffer_free(usb_dev, acm->ctrlsize, acm->ctrl_buffer, acm->ctrl_dma);
+
+ usb_driver_release_interface(&acm_driver, acm->data);
+
+ if (!acm->used) {
+ tty_unregister_device(acm_tty_driver, acm->minor);
+ acm_table[acm->minor] = NULL;
+ usb_free_urb(acm->ctrlurb);
+ usb_free_urb(acm->readurb);
+ usb_free_urb(acm->writeurb);
+ kfree(acm);
+ up(&open_sem);
+ return;
+ }
+
+ up(&open_sem);
+
+ if (acm->tty)
+ tty_hangup(acm->tty);
+}
+
+/*
+ * USB driver structure.
+ */
+
+static struct usb_device_id acm_ids[] = {
+ /* quirky and broken devices */
+ { USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */
+ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
+ },
+ /* control interfaces with various AT-command sets */
+ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
+ USB_CDC_ACM_PROTO_AT_V25TER) },
+ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
+ USB_CDC_ACM_PROTO_AT_PCCA101) },
+ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
+ USB_CDC_ACM_PROTO_AT_PCCA101_WAKE) },
+ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
+ USB_CDC_ACM_PROTO_AT_GSM) },
+ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
+ USB_CDC_ACM_PROTO_AT_3G ) },
+ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
+ USB_CDC_ACM_PROTO_AT_CDMA) },
+
+ /* NOTE: COMM/ACM/0xff is likely MSFT RNDIS ... NOT a modem!! */
+ { }
+};
+
+MODULE_DEVICE_TABLE (usb, acm_ids);
+
+static struct usb_driver acm_driver = {
+ .owner = THIS_MODULE,
+ .name = "cdc_acm",
+ .probe = acm_probe,
+ .disconnect = acm_disconnect,
+ .id_table = acm_ids,
+};
+
+/*
+ * TTY driver structures.
+ */
+
+static struct tty_operations acm_ops = {
+ .open = acm_tty_open,
+ .close = acm_tty_close,
+ .write = acm_tty_write,
+ .write_room = acm_tty_write_room,
+ .ioctl = acm_tty_ioctl,
+ .throttle = acm_tty_throttle,
+ .unthrottle = acm_tty_unthrottle,
+ .chars_in_buffer = acm_tty_chars_in_buffer,
+ .break_ctl = acm_tty_break_ctl,
+ .set_termios = acm_tty_set_termios,
+ .tiocmget = acm_tty_tiocmget,
+ .tiocmset = acm_tty_tiocmset,
+};
+
+/*
+ * Init / exit.
+ */
+
+static int __init acm_init(void)
+{
+ int retval;
+ acm_tty_driver = alloc_tty_driver(ACM_TTY_MINORS);
+ if (!acm_tty_driver)
+ return -ENOMEM;
+ acm_tty_driver->owner = THIS_MODULE,
+ acm_tty_driver->driver_name = "acm",
+ acm_tty_driver->name = "ttyACM",
+ acm_tty_driver->devfs_name = "usb/acm/",
+ acm_tty_driver->major = ACM_TTY_MAJOR,
+ acm_tty_driver->minor_start = 0,
+ acm_tty_driver->type = TTY_DRIVER_TYPE_SERIAL,
+ acm_tty_driver->subtype = SERIAL_TYPE_NORMAL,
+ acm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
+ acm_tty_driver->init_termios = tty_std_termios;
+ acm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+ tty_set_operations(acm_tty_driver, &acm_ops);
+
+ retval = tty_register_driver(acm_tty_driver);
+ if (retval) {
+ put_tty_driver(acm_tty_driver);
+ return retval;
+ }
+
+ retval = usb_register(&acm_driver);
+ if (retval) {
+ tty_unregister_driver(acm_tty_driver);
+ put_tty_driver(acm_tty_driver);
+ return retval;
+ }
+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+
+ return 0;
+}
+
+static void __exit acm_exit(void)
+{
+ usb_deregister(&acm_driver);
+ tty_unregister_driver(acm_tty_driver);
+ put_tty_driver(acm_tty_driver);
+}
+
+module_init(acm_init);
+module_exit(acm_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
new file mode 100644
index 000000000000..9009114e311b
--- /dev/null
+++ b/drivers/usb/class/cdc-acm.h
@@ -0,0 +1,82 @@
+/*
+ *
+ * Includes for cdc-acm.c
+ *
+ * Mainly take from usbnet's cdc-ether part
+ *
+ */
+
+/*
+ * CMSPAR, some architectures can't have space and mark parity.
+ */
+
+#ifndef CMSPAR
+#define CMSPAR 0
+#endif
+
+/*
+ * Major and minor numbers.
+ */
+
+#define ACM_TTY_MAJOR 166
+#define ACM_TTY_MINORS 32
+
+/*
+ * Requests.
+ */
+
+#define USB_RT_ACM (USB_TYPE_CLASS | USB_RECIP_INTERFACE)
+
+/*
+ * Output control lines.
+ */
+
+#define ACM_CTRL_DTR 0x01
+#define ACM_CTRL_RTS 0x02
+
+/*
+ * Input control lines and line errors.
+ */
+
+#define ACM_CTRL_DCD 0x01
+#define ACM_CTRL_DSR 0x02
+#define ACM_CTRL_BRK 0x04
+#define ACM_CTRL_RI 0x08
+
+#define ACM_CTRL_FRAMING 0x10
+#define ACM_CTRL_PARITY 0x20
+#define ACM_CTRL_OVERRUN 0x40
+
+/*
+ * Internal driver structures.
+ */
+
+struct acm {
+ struct usb_device *dev; /* the corresponding usb device */
+ struct usb_interface *control; /* control interface */
+ struct usb_interface *data; /* data interface */
+ struct tty_struct *tty; /* the corresponding tty */
+ struct urb *ctrlurb, *readurb, *writeurb; /* urbs */
+ u8 *ctrl_buffer, *read_buffer, *write_buffer; /* buffers of urbs */
+ dma_addr_t ctrl_dma, read_dma, write_dma; /* dma handles of buffers */
+ struct usb_cdc_line_coding line; /* bits, stop, parity */
+ struct work_struct work; /* work queue entry for line discipline waking up */
+ struct tasklet_struct bh; /* rx processing */
+ spinlock_t throttle_lock; /* synchronize throtteling and read callback */
+ unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */
+ unsigned int ctrlout; /* output control lines (DTR, RTS) */
+ unsigned int writesize; /* max packet size for the output bulk endpoint */
+ unsigned int readsize,ctrlsize; /* buffer sizes for freeing */
+ unsigned int used; /* someone has this acm's device open */
+ unsigned int minor; /* acm minor number */
+ unsigned char throttle; /* throttled by tty layer */
+ unsigned char clocal; /* termios CLOCAL */
+ unsigned char ready_for_write; /* write urb can be used */
+ unsigned char resubmit_to_unthrottle; /* throtteling has disabled the read urb */
+ unsigned int ctrl_caps; /* control capabilities from the class specific header */
+};
+
+#define CDC_DATA_INTERFACE_TYPE 0x0a
+
+/* constants describing various quirks and errors */
+#define NO_UNION_NORMAL 1
diff --git a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c
new file mode 100644
index 000000000000..5f8af35e7633
--- /dev/null
+++ b/drivers/usb/class/usb-midi.c
@@ -0,0 +1,2154 @@
+/*
+ usb-midi.c -- USB-MIDI driver
+
+ Copyright (C) 2001
+ NAGANO Daisuke <breeze.nagano@nifty.ne.jp>
+
+ 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,
+ 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.
+
+ This driver is based on:
+ - 'Universal Serial Bus Device Class Definition for MIDI Device'
+ - linux/drivers/sound/es1371.c, linux/drivers/usb/audio.c
+ - alsa/lowlevel/pci/cs64xx.c
+ - umidi.c for NetBSD
+ */
+
+/* ------------------------------------------------------------------------- */
+
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/list.h>
+#include <linux/slab.h>
+#include <linux/usb.h>
+#include <linux/poll.h>
+#include <linux/sound.h>
+#include <linux/init.h>
+#include <asm/semaphore.h>
+
+#include "usb-midi.h"
+
+/* ------------------------------------------------------------------------- */
+
+/* More verbose on syslog */
+#undef MIDI_DEBUG
+
+#define MIDI_IN_BUFSIZ 1024
+
+#define HAVE_SUPPORT_USB_MIDI_CLASS
+
+#undef HAVE_SUPPORT_ALSA
+
+/* ------------------------------------------------------------------------- */
+
+static int singlebyte = 0;
+module_param(singlebyte, int, 0);
+MODULE_PARM_DESC(singlebyte,"Enable sending MIDI messages with single message packet");
+
+static int maxdevices = 4;
+module_param(maxdevices, int, 0);
+MODULE_PARM_DESC(maxdevices,"Max number of allocatable MIDI device");
+
+static int uvendor = -1;
+module_param(uvendor, int, 0);
+MODULE_PARM_DESC(uvendor, "The USB Vendor ID of a semi-compliant interface");
+
+static int uproduct = -1;
+module_param(uproduct, int, 0);
+MODULE_PARM_DESC(uproduct, "The USB Product ID of a semi-compliant interface");
+
+static int uinterface = -1;
+module_param(uinterface, int, 0);
+MODULE_PARM_DESC(uinterface, "The Interface number of a semi-compliant interface");
+
+static int ualt = -1;
+module_param(ualt, int, 0);
+MODULE_PARM_DESC(ualt, "The optional alternative setting of a semi-compliant interface");
+
+static int umin = -1;
+module_param(umin, int, 0);
+MODULE_PARM_DESC(umin, "The input endpoint of a semi-compliant interface");
+
+static int umout = -1;
+module_param(umout, int, 0);
+MODULE_PARM_DESC(umout, "The output endpoint of a semi-compliant interface");
+
+static int ucable = -1;
+module_param(ucable, int, 0);
+MODULE_PARM_DESC(ucable, "The cable number used for a semi-compliant interface");
+
+/** Note -- the usb_string() returns only Latin-1 characters.
+ * (unicode chars <= 255). To support Japanese, a unicode16LE-to-EUC or
+ * unicode16LE-to-JIS routine is needed to wrap around usb_get_string().
+ **/
+static unsigned short ulangid = 0x0409; /** 0x0411 for Japanese **/
+module_param(ulangid, ushort, 0);
+MODULE_PARM_DESC(ulangid, "The optional preferred USB Language ID for all devices");
+
+MODULE_AUTHOR("NAGANO Daisuke <breeze.nagano@nifty.ne.jp>");
+MODULE_DESCRIPTION("USB-MIDI driver");
+MODULE_LICENSE("GPL");
+
+/* ------------------------------------------------------------------------- */
+
+/** MIDIStreaming Class-Specific Interface Descriptor Subtypes **/
+
+#define MS_DESCRIPTOR_UNDEFINED 0
+#define MS_HEADER 1
+#define MIDI_IN_JACK 2
+#define MIDI_OUT_JACK 3
+/* Spec reads: ELEMENT */
+#define ELEMENT_DESCRIPTOR 4
+
+#define MS_HEADER_LENGTH 7
+
+/** MIDIStreaming Class-Specific Endpoint Descriptor Subtypes **/
+
+#define DESCRIPTOR_UNDEFINED 0
+/* Spec reads: MS_GENERAL */
+#define MS_GENERAL_ENDPOINT 1
+
+/** MIDIStreaming MIDI IN and OUT Jack Types **/
+
+#define JACK_TYPE_UNDEFINED 0
+/* Spec reads: EMBEDDED */
+#define EMBEDDED_JACK 1
+/* Spec reads: EXTERNAL */
+#define EXTERNAL_JACK 2
+
+
+/* structure summary
+
+ usb_midi_state usb_device
+ | |
+ *| *| per ep
+ in_ep out_ep
+ | |
+ *| *| per cable
+ min mout
+ | | (cable to device pairing magic)
+ | |
+ usb_midi_dev dev_id (major,minor) == file->private_data
+
+*/
+
+/* usb_midi_state: corresponds to a USB-MIDI module */
+struct usb_midi_state {
+ struct list_head mididev;
+
+ struct usb_device *usbdev;
+
+ struct list_head midiDevList;
+ struct list_head inEndpointList;
+ struct list_head outEndpointList;
+
+ spinlock_t lock;
+
+ unsigned int count; /* usage counter */
+};
+
+/* midi_out_endpoint: corresponds to an output endpoint */
+struct midi_out_endpoint {
+ struct list_head list;
+
+ struct usb_device *usbdev;
+ int endpoint;
+ spinlock_t lock;
+ wait_queue_head_t wait;
+
+ unsigned char *buf;
+ int bufWrPtr;
+ int bufSize;
+
+ struct urb *urb;
+};
+
+/* midi_in_endpoint: corresponds to an input endpoint */
+struct midi_in_endpoint {
+ struct list_head list;
+
+ struct usb_device *usbdev;
+ int endpoint;
+ spinlock_t lock;
+ wait_queue_head_t wait;
+
+ struct usb_mididev *cables[16]; // cables open for read
+ int readers; // number of cables open for read
+
+ struct urb *urb;
+ unsigned char *recvBuf;
+ int recvBufSize;
+ int urbSubmitted; //FIXME: == readers > 0
+};
+
+/* usb_mididev: corresponds to a logical device */
+struct usb_mididev {
+ struct list_head list;
+
+ struct usb_midi_state *midi;
+ int dev_midi;
+ mode_t open_mode;
+
+ struct {
+ struct midi_in_endpoint *ep;
+ int cableId;
+
+// as we are pushing data from usb_bulk_read to usb_midi_read,
+// we need a larger, cyclic buffer here.
+ unsigned char buf[MIDI_IN_BUFSIZ];
+ int bufRdPtr;
+ int bufWrPtr;
+ int bufRemains;
+ } min;
+
+ struct {
+ struct midi_out_endpoint *ep;
+ int cableId;
+
+ unsigned char buf[3];
+ int bufPtr;
+ int bufRemains;
+
+ int isInExclusive;
+ unsigned char lastEvent;
+ } mout;
+
+ int singlebyte;
+};
+
+/** Map the high nybble of MIDI voice messages to number of Message bytes.
+ * High nyble ranges from 0x8 to 0xe
+ */
+
+static int remains_80e0[] = {
+ 3, /** 0x8X Note Off **/
+ 3, /** 0x9X Note On **/
+ 3, /** 0xAX Poly-key pressure **/
+ 3, /** 0xBX Control Change **/
+ 2, /** 0xCX Program Change **/
+ 2, /** 0xDX Channel pressure **/
+ 3 /** 0xEX PitchBend Change **/
+};
+
+/** Map the messages to a number of Message bytes.
+ *
+ **/
+static int remains_f0f6[] = {
+ 0, /** 0xF0 **/
+ 2, /** 0XF1 **/
+ 3, /** 0XF2 **/
+ 2, /** 0XF3 **/
+ 2, /** 0XF4 (Undefined by MIDI Spec, and subject to change) **/
+ 2, /** 0XF5 (Undefined by MIDI Spec, and subject to change) **/
+ 1 /** 0XF6 **/
+};
+
+/** Map the messages to a CIN (Code Index Number).
+ *
+ **/
+static int cin_f0ff[] = {
+ 4, /** 0xF0 System Exclusive Message Start (special cases may be 6 or 7) */
+ 2, /** 0xF1 **/
+ 3, /** 0xF2 **/
+ 2, /** 0xF3 **/
+ 2, /** 0xF4 **/
+ 2, /** 0xF5 **/
+ 5, /** 0xF6 **/
+ 5, /** 0xF7 End of System Exclusive Message (May be 6 or 7) **/
+ 5, /** 0xF8 **/
+ 5, /** 0xF9 **/
+ 5, /** 0xFA **/
+ 5, /** 0xFB **/
+ 5, /** 0xFC **/
+ 5, /** 0xFD **/
+ 5, /** 0xFE **/
+ 5 /** 0xFF **/
+};
+
+/** Map MIDIStreaming Event packet Code Index Number (low nybble of byte 0)
+ * to the number of bytes of valid MIDI data.
+ *
+ * CIN of 0 and 1 are NOT USED in MIDIStreaming 1.0.
+ *
+ **/
+static int cin_to_len[] = {
+ 0, 0, 2, 3,
+ 3, 1, 2, 3,
+ 3, 3, 3, 3,
+ 2, 2, 3, 1
+};
+
+
+/* ------------------------------------------------------------------------- */
+
+static struct list_head mididevs = LIST_HEAD_INIT(mididevs);
+
+static DECLARE_MUTEX(open_sem);
+static DECLARE_WAIT_QUEUE_HEAD(open_wait);
+
+
+/* ------------------------------------------------------------------------- */
+
+static void usb_write_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct midi_out_endpoint *ep = (struct midi_out_endpoint *)urb->context;
+
+ if ( waitqueue_active( &ep->wait ) )
+ wake_up_interruptible( &ep->wait );
+}
+
+
+static int usb_write( struct midi_out_endpoint *ep, unsigned char *buf, int len )
+{
+ struct usb_device *d;
+ int pipe;
+ int ret = 0;
+ int status;
+ int maxretry = 50;
+
+ DECLARE_WAITQUEUE(wait,current);
+ init_waitqueue_head(&ep->wait);
+
+ d = ep->usbdev;
+ pipe = usb_sndbulkpipe(d, ep->endpoint);
+ usb_fill_bulk_urb( ep->urb, d, pipe, (unsigned char*)buf, len,
+ usb_write_callback, ep );
+
+ status = usb_submit_urb(ep->urb, GFP_KERNEL);
+
+ if (status) {
+ printk(KERN_ERR "usbmidi: Cannot submit urb (%d)\n",status);
+ ret = -EIO;
+ goto error;
+ }
+
+ add_wait_queue( &ep->wait, &wait );
+ set_current_state( TASK_INTERRUPTIBLE );
+
+ while( ep->urb->status == -EINPROGRESS ) {
+ if ( maxretry-- < 0 ) {
+ printk(KERN_ERR "usbmidi: usb_bulk_msg timed out\n");
+ ret = -ETIME;
+ break;
+ }
+ interruptible_sleep_on_timeout( &ep->wait, 10 );
+ }
+ set_current_state( TASK_RUNNING );
+ remove_wait_queue( &ep->wait, &wait );
+
+error:
+ return ret;
+}
+
+
+/** Copy data from URB to In endpoint buf.
+ * Discard if CIN == 0 or CIN = 1.
+ *
+ *
+ **/
+
+static void usb_bulk_read(struct urb *urb, struct pt_regs *regs)
+{
+ struct midi_in_endpoint *ep = (struct midi_in_endpoint *)(urb->context);
+ unsigned char *data = urb->transfer_buffer;
+ int i, j, wake;
+
+ if ( !ep->urbSubmitted ) {
+ return;
+ }
+
+ if ( (urb->status == 0) && (urb->actual_length > 0) ) {
+ wake = 0;
+ spin_lock( &ep->lock );
+
+ for(j = 0; j < urb->actual_length; j += 4) {
+ int cin = (data[j]>>0)&0xf;
+ int cab = (data[j]>>4)&0xf;
+ struct usb_mididev *cable = ep->cables[cab];
+ if ( cable ) {
+ int len = cin_to_len[cin]; /** length of MIDI data **/
+ for (i = 0; i < len; i++) {
+ cable->min.buf[cable->min.bufWrPtr] = data[1+i+j];
+ cable->min.bufWrPtr = (cable->min.bufWrPtr+1)%MIDI_IN_BUFSIZ;
+ if (cable->min.bufRemains < MIDI_IN_BUFSIZ)
+ cable->min.bufRemains += 1;
+ else /** need to drop data **/
+ cable->min.bufRdPtr += (cable->min.bufRdPtr+1)%MIDI_IN_BUFSIZ;
+ wake = 1;
+ }
+ }
+ }
+
+ spin_unlock ( &ep->lock );
+ if ( wake ) {
+ wake_up( &ep->wait );
+ }
+ }
+
+ /* urb->dev must be reinitialized on 2.4.x kernels */
+ urb->dev = ep->usbdev;
+
+ urb->actual_length = 0;
+ usb_submit_urb(urb, GFP_ATOMIC);
+}
+
+
+
+/* ------------------------------------------------------------------------- */
+
+/* This routine must be called with spin_lock */
+
+/** Wrapper around usb_write().
+ * This routine must be called with spin_lock held on ep.
+ * Called by midiWrite(), putOneMidiEvent(), and usb_midi_write();
+ **/
+static int flush_midi_buffer( struct midi_out_endpoint *ep )
+{
+ int ret=0;
+
+ if ( ep->bufWrPtr > 0 ) {
+ ret = usb_write( ep, ep->buf, ep->bufWrPtr );
+ ep->bufWrPtr = 0;
+ }
+
+ return ret;
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+
+/** Given a MIDI Event, determine size of data to be attached to
+ * USB-MIDI packet.
+ * Returns 1, 2 or 3.
+ * Called by midiWrite();
+ * Uses remains_80e0 and remains_f0f6;
+ **/
+static int get_remains(int event)
+{
+ int ret;
+
+ if ( event < 0x80 ) {
+ ret = 1;
+ } else if ( event < 0xf0 ) {
+ ret = remains_80e0[((event-0x80)>>4)&0x0f];
+ } else if ( event < 0xf7 ) {
+ ret = remains_f0f6[event-0xf0];
+ } else {
+ ret = 1;
+ }
+
+ return ret;
+}
+
+/** Given the output MIDI data in the output buffer, computes a reasonable
+ * CIN.
+ * Called by putOneMidiEvent().
+ **/
+static int get_CIN( struct usb_mididev *m )
+{
+ int cin;
+
+ if ( m->mout.buf[0] == 0xf7 ) {
+ cin = 5;
+ }
+ else if ( m->mout.buf[1] == 0xf7 ) {
+ cin = 6;
+ }
+ else if ( m->mout.buf[2] == 0xf7 ) {
+ cin = 7;
+ }
+ else {
+ if ( m->mout.isInExclusive == 1 ) {
+ cin = 4;
+ } else if ( m->mout.buf[0] < 0x80 ) {
+ /** One byte that we know nothing about. **/
+ cin = 0xF;
+ } else if ( m->mout.buf[0] < 0xf0 ) {
+ /** MIDI Voice messages 0x8X to 0xEX map to cin 0x8 to 0xE. **/
+ cin = (m->mout.buf[0]>>4)&0x0f;
+ }
+ else {
+ /** Special lookup table exists for real-time events. **/
+ cin = cin_f0ff[m->mout.buf[0]-0xf0];
+ }
+ }
+
+ return cin;
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+
+
+/** Move data to USB endpoint buffer.
+ *
+ **/
+static int put_one_midi_event(struct usb_mididev *m)
+{
+ int cin;
+ unsigned long flags;
+ struct midi_out_endpoint *ep = m->mout.ep;
+ int ret=0;
+
+ cin = get_CIN( m );
+ if ( cin > 0x0f || cin < 0 ) {
+ return -EINVAL;
+ }
+
+ spin_lock_irqsave( &ep->lock, flags );
+ ep->buf[ep->bufWrPtr++] = (m->mout.cableId<<4) | cin;
+ ep->buf[ep->bufWrPtr++] = m->mout.buf[0];
+ ep->buf[ep->bufWrPtr++] = m->mout.buf[1];
+ ep->buf[ep->bufWrPtr++] = m->mout.buf[2];
+ if ( ep->bufWrPtr >= ep->bufSize ) {
+ ret = flush_midi_buffer( ep );
+ }
+ spin_unlock_irqrestore( &ep->lock, flags);
+
+ m->mout.buf[0] = m->mout.buf[1] = m->mout.buf[2] = 0;
+ m->mout.bufPtr = 0;
+
+ return ret;
+}
+
+/** Write the MIDI message v on the midi device.
+ * Called by usb_midi_write();
+ * Responsible for packaging a MIDI data stream into USB-MIDI packets.
+ **/
+
+static int midi_write( struct usb_mididev *m, int v )
+{
+ unsigned long flags;
+ struct midi_out_endpoint *ep = m->mout.ep;
+ int ret=0;
+ unsigned char c = (unsigned char)v;
+ unsigned char sysrt_buf[4];
+
+ if ( m->singlebyte != 0 ) {
+ /** Simple code to handle the single-byte USB-MIDI protocol. */
+ spin_lock_irqsave( &ep->lock, flags );
+ if ( ep->bufWrPtr+4 > ep->bufSize ) {
+ ret = flush_midi_buffer( ep );
+ if ( !ret ) {
+ spin_unlock_irqrestore( &ep->lock, flags );
+ return ret;
+ }
+ }
+ ep->buf[ep->bufWrPtr++] = (m->mout.cableId<<4) | 0x0f; /* single byte */
+ ep->buf[ep->bufWrPtr++] = c;
+ ep->buf[ep->bufWrPtr++] = 0;
+ ep->buf[ep->bufWrPtr++] = 0;
+ if ( ep->bufWrPtr >= ep->bufSize ) {
+ ret = flush_midi_buffer( ep );
+ }
+ spin_unlock_irqrestore( &ep->lock, flags );
+
+ return ret;
+ }
+ /** Normal USB-MIDI protocol begins here. */
+
+ if ( c > 0xf7 ) { /* system: Realtime messages */
+ /** Realtime messages are written IMMEDIATELY. */
+ sysrt_buf[0] = (m->mout.cableId<<4) | 0x0f;
+ sysrt_buf[1] = c;
+ sysrt_buf[2] = 0;
+ sysrt_buf[3] = 0;
+ spin_lock_irqsave( &ep->lock, flags );
+ ret = usb_write( ep, sysrt_buf, 4 );
+ spin_unlock_irqrestore( &ep->lock, flags );
+ /* m->mout.lastEvent = 0; */
+
+ return ret;
+ }
+
+ if ( c >= 0x80 ) {
+ if ( c < 0xf0 ) {
+ m->mout.lastEvent = c;
+ m->mout.isInExclusive = 0;
+ m->mout.bufRemains = get_remains(c);
+ } else if ( c == 0xf0 ) {
+ /* m->mout.lastEvent = 0; */
+ m->mout.isInExclusive = 1;
+ m->mout.bufRemains = get_remains(c);
+ } else if ( c == 0xf7 && m->mout.isInExclusive == 1 ) {
+ /* m->mout.lastEvent = 0; */
+ m->mout.isInExclusive = 0;
+ m->mout.bufRemains = 1;
+ } else if ( c > 0xf0 ) {
+ /* m->mout.lastEvent = 0; */
+ m->mout.isInExclusive = 0;
+ m->mout.bufRemains = get_remains(c);
+ }
+
+ } else if ( m->mout.bufRemains == 0 && m->mout.isInExclusive == 0 ) {
+ if ( m->mout.lastEvent == 0 ) {
+ return 0; /* discard, waiting for the first event */
+ }
+ /** track status **/
+ m->mout.buf[0] = m->mout.lastEvent;
+ m->mout.bufPtr = 1;
+ m->mout.bufRemains = get_remains(m->mout.lastEvent)-1;
+ }
+
+ m->mout.buf[m->mout.bufPtr++] = c;
+ m->mout.bufRemains--;
+ if ( m->mout.bufRemains == 0 || m->mout.bufPtr >= 3) {
+ ret = put_one_midi_event(m);
+ }
+
+ return ret;
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+/** Basic operation on /dev/midiXX as registered through struct file_operations.
+ *
+ * Basic contract: Used to change the current read/write position in a file.
+ * On success, the non-negative position is reported.
+ * On failure, the negative of an error code is reported.
+ *
+ * Because a MIDIStream is not a file, all seek operations are doomed to fail.
+ *
+ **/
+static loff_t usb_midi_llseek(struct file *file, loff_t offset, int origin)
+{
+ /** Tell user you cannot seek on a PIPE-like device. **/
+ return -ESPIPE;
+}
+
+
+/** Basic operation on /dev/midiXX as registered through struct file_operations.
+ *
+ * Basic contract: Block until count bytes have been read or an error occurs.
+ *
+ **/
+
+static ssize_t usb_midi_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
+{
+ struct usb_mididev *m = (struct usb_mididev *)file->private_data;
+ struct midi_in_endpoint *ep = m->min.ep;
+ ssize_t ret;
+ DECLARE_WAITQUEUE(wait, current);
+
+ if ( !access_ok(VERIFY_READ, buffer, count) ) {
+ return -EFAULT;
+ }
+ if ( count == 0 ) {
+ return 0;
+ }
+
+ add_wait_queue( &ep->wait, &wait );
+ ret = 0;
+ while( count > 0 ) {
+ int cnt;
+ int d = (int)count;
+
+ cnt = m->min.bufRemains;
+ if ( cnt > d ) {
+ cnt = d;
+ }
+
+ if ( cnt <= 0 ) {
+ if ( file->f_flags & O_NONBLOCK ) {
+ if (!ret)
+ ret = -EAGAIN;
+ break;
+ }
+ __set_current_state(TASK_INTERRUPTIBLE);
+ schedule();
+ if (signal_pending(current)) {
+ if(!ret)
+ ret=-ERESTARTSYS;
+ break;
+ }
+ continue;
+ }
+
+ {
+ int i;
+ unsigned long flags; /* used to synchronize access to the endpoint */
+ spin_lock_irqsave( &ep->lock, flags );
+ for (i = 0; i < cnt; i++) {
+ if ( copy_to_user( buffer+i, m->min.buf+m->min.bufRdPtr, 1 ) ) {
+ if ( !ret )
+ ret = -EFAULT;
+ break;
+ }
+ m->min.bufRdPtr = (m->min.bufRdPtr+1)%MIDI_IN_BUFSIZ;
+ m->min.bufRemains -= 1;
+ }
+ spin_unlock_irqrestore( &ep->lock, flags );
+ }
+
+ count-=cnt;
+ buffer+=cnt;
+ ret+=cnt;
+
+ break;
+ }
+
+ remove_wait_queue( &ep->wait, &wait );
+ set_current_state(TASK_RUNNING);
+
+ return ret;
+}
+
+
+/** Basic operation on /dev/midiXX as registered through struct file_operations.
+ *
+ * Basic Contract: Take MIDI data byte-by-byte and pass it to
+ * writeMidi() which packages MIDI data into USB-MIDI stream.
+ * Then flushMidiData() is called to ensure all bytes have been written
+ * in a timely fashion.
+ *
+ **/
+
+static ssize_t usb_midi_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
+{
+ struct usb_mididev *m = (struct usb_mididev *)file->private_data;
+ ssize_t ret;
+ unsigned long int flags;
+
+ if ( !access_ok(VERIFY_READ, buffer, count) ) {
+ return -EFAULT;
+ }
+ if ( count == 0 ) {
+ return 0;
+ }
+
+ ret = 0;
+ while( count > 0 ) {
+ unsigned char c;
+
+ if (copy_from_user((unsigned char *)&c, buffer, 1)) {
+ if ( ret == 0 )
+ ret = -EFAULT;
+ break;
+ }
+ if( midi_write(m, (int)c) ) {
+ if ( ret == 0 )
+ ret = -EFAULT;
+ break;
+ }
+ count--;
+ buffer++;
+ ret++;
+ }
+
+ spin_lock_irqsave( &m->mout.ep->lock, flags );
+ if ( flush_midi_buffer(m->mout.ep) < 0 ) {
+ ret = -EFAULT;
+ }
+ spin_unlock_irqrestore( &m->mout.ep->lock, flags );
+
+ return ret;
+}
+
+/** Basic operation on /dev/midiXX as registered through struct file_operations.
+ *
+ * Basic contract: Wait (spin) until ready to read or write on the file.
+ *
+ **/
+static unsigned int usb_midi_poll(struct file *file, struct poll_table_struct *wait)
+{
+ struct usb_mididev *m = (struct usb_mididev *)file->private_data;
+ struct midi_in_endpoint *iep = m->min.ep;
+ struct midi_out_endpoint *oep = m->mout.ep;
+ unsigned long flags;
+ unsigned int mask = 0;
+
+ if ( file->f_mode & FMODE_READ ) {
+ poll_wait( file, &iep->wait, wait );
+ spin_lock_irqsave( &iep->lock, flags );
+ if ( m->min.bufRemains > 0 )
+ mask |= POLLIN | POLLRDNORM;
+ spin_unlock_irqrestore( &iep->lock, flags );
+ }
+
+ if ( file->f_mode & FMODE_WRITE ) {
+ poll_wait( file, &oep->wait, wait );
+ spin_lock_irqsave( &oep->lock, flags );
+ if ( oep->bufWrPtr < oep->bufSize )
+ mask |= POLLOUT | POLLWRNORM;
+ spin_unlock_irqrestore( &oep->lock, flags );
+ }
+
+ return mask;
+}
+
+
+/** Basic operation on /dev/midiXX as registered through struct file_operations.
+ *
+ * Basic contract: This is always the first operation performed on the
+ * device node. If no method is defined, the open succeeds without any
+ * notification given to the module.
+ *
+ **/
+
+static int usb_midi_open(struct inode *inode, struct file *file)
+{
+ int minor = iminor(inode);
+ DECLARE_WAITQUEUE(wait, current);
+ struct usb_midi_state *s;
+ struct usb_mididev *m;
+ unsigned long flags;
+ int succeed = 0;
+
+#if 0
+ printk(KERN_INFO "usb-midi: Open minor= %d.\n", minor);
+#endif
+
+ for(;;) {
+ down(&open_sem);
+ list_for_each_entry(s, &mididevs, mididev) {
+ list_for_each_entry(m, &s->midiDevList, list) {
+ if ( !((m->dev_midi ^ minor) & ~0xf) )
+ goto device_found;
+ }
+ }
+ up(&open_sem);
+ return -ENODEV;
+
+ device_found:
+ if ( !s->usbdev ) {
+ up(&open_sem);
+ return -EIO;
+ }
+ if ( !(m->open_mode & file->f_mode) ) {
+ break;
+ }
+ if ( file->f_flags & O_NONBLOCK ) {
+ up(&open_sem);
+ return -EBUSY;
+ }
+ __set_current_state(TASK_INTERRUPTIBLE);
+ add_wait_queue( &open_wait, &wait );
+ up(&open_sem);
+ schedule();
+ remove_wait_queue( &open_wait, &wait );
+ if ( signal_pending(current) ) {
+ return -ERESTARTSYS;
+ }
+ }
+
+ file->private_data = m;
+ spin_lock_irqsave( &s->lock, flags );
+
+ if ( !(m->open_mode & (FMODE_READ | FMODE_WRITE)) ) {
+ //FIXME: intented semantics unclear here
+ m->min.bufRdPtr = 0;
+ m->min.bufWrPtr = 0;
+ m->min.bufRemains = 0;
+ spin_lock_init(&m->min.ep->lock);
+
+ m->mout.bufPtr = 0;
+ m->mout.bufRemains = 0;
+ m->mout.isInExclusive = 0;
+ m->mout.lastEvent = 0;
+ spin_lock_init(&m->mout.ep->lock);
+ }
+
+ if ( (file->f_mode & FMODE_READ) && m->min.ep != NULL ) {
+ unsigned long int flagsep;
+ spin_lock_irqsave( &m->min.ep->lock, flagsep );
+ m->min.ep->cables[m->min.cableId] = m;
+ m->min.ep->readers += 1;
+ m->min.bufRdPtr = 0;
+ m->min.bufWrPtr = 0;
+ m->min.bufRemains = 0;
+ spin_unlock_irqrestore( &m->min.ep->lock, flagsep );
+
+ if ( !(m->min.ep->urbSubmitted)) {
+
+ /* urb->dev must be reinitialized on 2.4.x kernels */
+ m->min.ep->urb->dev = m->min.ep->usbdev;
+
+ if ( usb_submit_urb(m->min.ep->urb, GFP_ATOMIC) ) {
+ printk(KERN_ERR "usbmidi: Cannot submit urb for MIDI-IN\n");
+ }
+ m->min.ep->urbSubmitted = 1;
+ }
+ m->open_mode |= FMODE_READ;
+ succeed = 1;
+ }
+
+ if ( (file->f_mode & FMODE_WRITE) && m->mout.ep != NULL ) {
+ m->mout.bufPtr = 0;
+ m->mout.bufRemains = 0;
+ m->mout.isInExclusive = 0;
+ m->mout.lastEvent = 0;
+ m->open_mode |= FMODE_WRITE;
+ succeed = 1;
+ }
+
+ spin_unlock_irqrestore( &s->lock, flags );
+
+ s->count++;
+ up(&open_sem);
+
+ /** Changed to prevent extra increments to USE_COUNT. **/
+ if (!succeed) {
+ return -EBUSY;
+ }
+
+#if 0
+ printk(KERN_INFO "usb-midi: Open Succeeded. minor= %d.\n", minor);
+#endif
+
+ return nonseekable_open(inode, file); /** Success. **/
+}
+
+
+/** Basic operation on /dev/midiXX as registered through struct file_operations.
+ *
+ * Basic contract: Close an opened file and deallocate anything we allocated.
+ * Like open(), this can be missing. If open set file->private_data,
+ * release() must clear it.
+ *
+ **/
+
+static int usb_midi_release(struct inode *inode, struct file *file)
+{
+ struct usb_mididev *m = (struct usb_mididev *)file->private_data;
+ struct usb_midi_state *s = (struct usb_midi_state *)m->midi;
+
+#if 0
+ printk(KERN_INFO "usb-midi: Close.\n");
+#endif
+
+ down(&open_sem);
+
+ if ( m->open_mode & FMODE_WRITE ) {
+ m->open_mode &= ~FMODE_WRITE;
+ usb_kill_urb( m->mout.ep->urb );
+ }
+
+ if ( m->open_mode & FMODE_READ ) {
+ unsigned long int flagsep;
+ spin_lock_irqsave( &m->min.ep->lock, flagsep );
+ m->min.ep->cables[m->min.cableId] = NULL; // discard cable
+ m->min.ep->readers -= 1;
+ m->open_mode &= ~FMODE_READ;
+ if ( m->min.ep->readers == 0 &&
+ m->min.ep->urbSubmitted ) {
+ m->min.ep->urbSubmitted = 0;
+ usb_kill_urb(m->min.ep->urb);
+ }
+ spin_unlock_irqrestore( &m->min.ep->lock, flagsep );
+ }
+
+ s->count--;
+
+ up(&open_sem);
+ wake_up(&open_wait);
+
+ file->private_data = NULL;
+ return 0;
+}
+
+static struct file_operations usb_midi_fops = {
+ .owner = THIS_MODULE,
+ .llseek = usb_midi_llseek,
+ .read = usb_midi_read,
+ .write = usb_midi_write,
+ .poll = usb_midi_poll,
+ .open = usb_midi_open,
+ .release = usb_midi_release,
+};
+
+/* ------------------------------------------------------------------------- */
+
+/** Returns filled midi_in_endpoint structure or null on failure.
+ *
+ * Parameters:
+ * d - a usb_device
+ * endPoint - An usb endpoint in the range 0 to 15.
+ * Called by allocUsbMidiDev();
+ *
+ **/
+
+static struct midi_in_endpoint *alloc_midi_in_endpoint( struct usb_device *d, int endPoint )
+{
+ struct midi_in_endpoint *ep;
+ int bufSize;
+ int pipe;
+
+ endPoint &= 0x0f; /* Silently force endPoint to lie in range 0 to 15. */
+
+ pipe = usb_rcvbulkpipe( d, endPoint );
+ bufSize = usb_maxpacket( d, pipe, 0 );
+ /* usb_pipein() = ! usb_pipeout() = true for an in Endpoint */
+
+ ep = (struct midi_in_endpoint *)kmalloc(sizeof(struct midi_in_endpoint), GFP_KERNEL);
+ if ( !ep ) {
+ printk(KERN_ERR "usbmidi: no memory for midi in-endpoint\n");
+ return NULL;
+ }
+ memset( ep, 0, sizeof(struct midi_in_endpoint) );
+// this sets cables[] and readers to 0, too.
+// for (i=0; i<16; i++) ep->cables[i] = 0; // discard cable
+// ep->readers = 0;
+
+ ep->endpoint = endPoint;
+
+ ep->recvBuf = (unsigned char *)kmalloc(sizeof(unsigned char)*(bufSize), GFP_KERNEL);
+ if ( !ep->recvBuf ) {
+ printk(KERN_ERR "usbmidi: no memory for midi in-endpoint buffer\n");
+ kfree(ep);
+ return NULL;
+ }
+
+ ep->urb = usb_alloc_urb(0, GFP_KERNEL); /* no ISO */
+ if ( !ep->urb ) {
+ printk(KERN_ERR "usbmidi: no memory for midi in-endpoint urb\n");
+ kfree(ep->recvBuf);
+ kfree(ep);
+ return NULL;
+ }
+ usb_fill_bulk_urb( ep->urb, d,
+ usb_rcvbulkpipe(d, endPoint),
+ (unsigned char *)ep->recvBuf, bufSize,
+ usb_bulk_read, ep );
+
+ /* ep->bufRdPtr = 0; */
+ /* ep->bufWrPtr = 0; */
+ /* ep->bufRemains = 0; */
+ /* ep->urbSubmitted = 0; */
+ ep->recvBufSize = bufSize;
+
+ init_waitqueue_head(&ep->wait);
+
+ return ep;
+}
+
+static int remove_midi_in_endpoint( struct midi_in_endpoint *min )
+{
+ usb_kill_urb( min->urb );
+ usb_free_urb( min->urb );
+ kfree( min->recvBuf );
+ kfree( min );
+
+ return 0;
+}
+
+/** Returns filled midi_out_endpoint structure or null on failure.
+ *
+ * Parameters:
+ * d - a usb_device
+ * endPoint - An usb endpoint in the range 0 to 15.
+ * Called by allocUsbMidiDev();
+ *
+ **/
+static struct midi_out_endpoint *alloc_midi_out_endpoint( struct usb_device *d, int endPoint )
+{
+ struct midi_out_endpoint *ep = NULL;
+ int pipe;
+ int bufSize;
+
+ endPoint &= 0x0f;
+ pipe = usb_sndbulkpipe( d, endPoint );
+ bufSize = usb_maxpacket( d, pipe, 1 );
+
+ ep = (struct midi_out_endpoint *)kmalloc(sizeof(struct midi_out_endpoint), GFP_KERNEL);
+ if ( !ep ) {
+ printk(KERN_ERR "usbmidi: no memory for midi out-endpoint\n");
+ return NULL;
+ }
+ memset( ep, 0, sizeof(struct midi_out_endpoint) );
+
+ ep->endpoint = endPoint;
+ ep->buf = (unsigned char *)kmalloc(sizeof(unsigned char)*bufSize, GFP_KERNEL);
+ if ( !ep->buf ) {
+ printk(KERN_ERR "usbmidi: no memory for midi out-endpoint buffer\n");
+ kfree(ep);
+ return NULL;
+ }
+
+ ep->urb = usb_alloc_urb(0, GFP_KERNEL); /* no ISO */
+ if ( !ep->urb ) {
+ printk(KERN_ERR "usbmidi: no memory for midi out-endpoint urb\n");
+ kfree(ep->buf);
+ kfree(ep);
+ return NULL;
+ }
+
+ ep->bufSize = bufSize;
+ /* ep->bufWrPtr = 0; */
+
+ init_waitqueue_head(&ep->wait);
+
+ return ep;
+}
+
+
+static int remove_midi_out_endpoint( struct midi_out_endpoint *mout )
+{
+ usb_kill_urb( mout->urb );
+ usb_free_urb( mout->urb );
+ kfree( mout->buf );
+ kfree( mout );
+
+ return 0;
+}
+
+
+/** Returns a filled usb_mididev structure, registered as a Linux MIDI device.
+ *
+ * Returns null if memory is not available or the device cannot be registered.
+ * Called by allocUsbMidiDev();
+ *
+ **/
+static struct usb_mididev *allocMidiDev(
+ struct usb_midi_state *s,
+ struct midi_in_endpoint *min,
+ struct midi_out_endpoint *mout,
+ int inCableId,
+ int outCableId )
+{
+ struct usb_mididev *m;
+
+ m = (struct usb_mididev *)kmalloc(sizeof(struct usb_mididev), GFP_KERNEL);
+ if (!m) {
+ printk(KERN_ERR "usbmidi: no memory for midi device\n");
+ return NULL;
+ }
+
+ memset(m, 0, sizeof(struct usb_mididev));
+
+ if ((m->dev_midi = register_sound_midi(&usb_midi_fops, -1)) < 0) {
+ printk(KERN_ERR "usbmidi: cannot register midi device\n");
+ kfree(m);
+ return NULL;
+ }
+
+ m->midi = s;
+ /* m->open_mode = 0; */
+
+ if ( min ) {
+ m->min.ep = min;
+ m->min.ep->usbdev = s->usbdev;
+ m->min.cableId = inCableId;
+ }
+ /* m->min.bufPtr = 0; */
+ /* m->min.bufRemains = 0; */
+
+ if ( mout ) {
+ m->mout.ep = mout;
+ m->mout.ep->usbdev = s->usbdev;
+ m->mout.cableId = outCableId;
+ }
+ /* m->mout.bufPtr = 0; */
+ /* m->mout.bufRemains = 0; */
+ /* m->mout.isInExclusive = 0; */
+ /* m->mout.lastEvent = 0; */
+
+ m->singlebyte = singlebyte;
+
+ return m;
+}
+
+
+static void release_midi_device( struct usb_midi_state *s )
+{
+ struct usb_mididev *m;
+ struct midi_in_endpoint *min;
+ struct midi_out_endpoint *mout;
+
+ if ( s->count > 0 ) {
+ up(&open_sem);
+ return;
+ }
+ up( &open_sem );
+ wake_up( &open_wait );
+
+ while(!list_empty(&s->inEndpointList)) {
+ min = list_entry(s->inEndpointList.next, struct midi_in_endpoint, list);
+ list_del(&min->list);
+ remove_midi_in_endpoint(min);
+ }
+
+ while(!list_empty(&s->outEndpointList)) {
+ mout = list_entry(s->outEndpointList.next, struct midi_out_endpoint, list);
+ list_del(&mout->list);
+ remove_midi_out_endpoint(mout);
+ }
+
+ while(!list_empty(&s->midiDevList)) {
+ m = list_entry(s->midiDevList.next, struct usb_mididev, list);
+ list_del(&m->list);
+ kfree(m);
+ }
+
+ kfree(s);
+
+ return;
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+/** Utility routine to find a descriptor in a dump of many descriptors.
+ * Returns start of descriptor or NULL if not found.
+ * descStart pointer to list of interfaces.
+ * descLength length (in bytes) of dump
+ * after (ignored if NULL) this routine returns only descriptors after "after"
+ * dtype (mandatory) The descriptor type.
+ * iface (ignored if -1) returns descriptor at/following given interface
+ * altSetting (ignored if -1) returns descriptor at/following given altSetting
+ *
+ *
+ * Called by parseDescriptor(), find_csinterface_descriptor();
+ *
+ */
+static void *find_descriptor( void *descStart, unsigned int descLength, void *after, unsigned char dtype, int iface, int altSetting )
+{
+ unsigned char *p, *end, *next;
+ int interfaceNumber = -1, altSet = -1;
+
+ p = descStart;
+ end = p + descLength;
+ for( ; p < end; ) {
+ if ( p[0] < 2 )
+ return NULL;
+ next = p + p[0];
+ if ( next > end )
+ return NULL;
+ if ( p[1] == USB_DT_INTERFACE ) {
+ if ( p[0] < USB_DT_INTERFACE_SIZE )
+ return NULL;
+ interfaceNumber = p[2];
+ altSet = p[3];
+ }
+ if ( p[1] == dtype &&
+ ( !after || ( p > (unsigned char *)after) ) &&
+ ( ( iface == -1) || (iface == interfaceNumber) ) &&
+ ( (altSetting == -1) || (altSetting == altSet) )) {
+ return p;
+ }
+ p = next;
+ }
+ return NULL;
+}
+
+/** Utility to find a class-specific interface descriptor.
+ * dsubtype is a descriptor subtype
+ * Called by parseDescriptor();
+ **/
+static void *find_csinterface_descriptor(void *descStart, unsigned int descLength, void *after, u8 dsubtype, int iface, int altSetting)
+{
+ unsigned char *p;
+
+ p = find_descriptor( descStart, descLength, after, USB_DT_CS_INTERFACE, iface, altSetting );
+ while ( p ) {
+ if ( p[0] >= 3 && p[2] == dsubtype )
+ return p;
+ p = find_descriptor( descStart, descLength, p, USB_DT_CS_INTERFACE,
+ iface, altSetting );
+ }
+ return NULL;
+}
+
+
+/** The magic of making a new usb_midi_device from config happens here.
+ *
+ * The caller is responsible for free-ing this return value (if not NULL).
+ *
+ **/
+static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned char *buffer, int bufSize, unsigned int ifnum , unsigned int altSetting, int quirks)
+{
+ struct usb_midi_device *u;
+ unsigned char *p1;
+ unsigned char *p2;
+ unsigned char *next;
+ int iep, oep;
+ int length;
+ unsigned long longBits;
+ int pins, nbytes, offset, shift, jack;
+#ifdef HAVE_JACK_STRINGS
+ /** Jacks can have associated names. **/
+ unsigned char jack2string[256];
+#endif
+
+ u = NULL;
+ /* find audiocontrol interface */
+ p1 = find_csinterface_descriptor( buffer, bufSize, NULL,
+ MS_HEADER, ifnum, altSetting);
+
+ if ( !p1 ) {
+ goto error_end;
+ }
+
+ if ( p1[0] < MS_HEADER_LENGTH ) {
+ goto error_end;
+ }
+
+ /* Assume success. Since the device corresponds to USB-MIDI spec, we assume
+ that the rest of the USB 2.0 spec is obeyed. */
+
+ u = (struct usb_midi_device *)kmalloc( sizeof(struct usb_midi_device), GFP_KERNEL );
+ if ( !u ) {
+ return NULL;
+ }
+ u->deviceName = NULL;
+ u->idVendor = le16_to_cpu(d->descriptor.idVendor);
+ u->idProduct = le16_to_cpu(d->descriptor.idProduct);
+ u->interface = ifnum;
+ u->altSetting = altSetting;
+ u->in[0].endpoint = -1;
+ u->in[0].cableId = -1;
+ u->out[0].endpoint = -1;
+ u->out[0].cableId = -1;
+
+
+ printk(KERN_INFO "usb-midi: Found MIDIStreaming device corresponding to Release %d.%02d of spec.\n",
+ (p1[4] >> 4) * 10 + (p1[4] & 0x0f ),
+ (p1[3] >> 4) * 10 + (p1[3] & 0x0f )
+ );
+
+ length = p1[5] | (p1[6] << 8);
+
+#ifdef HAVE_JACK_STRINGS
+ memset(jack2string, 0, sizeof(unsigned char) * 256);
+#endif
+
+ length -= p1[0];
+ for (p2 = p1 + p1[0]; length > 0; p2 = next) {
+ next = p2 + p2[0];
+ length -= p2[0];
+
+ if (p2[0] < 2 )
+ break;
+ if (p2[1] != USB_DT_CS_INTERFACE)
+ break;
+ if (p2[2] == MIDI_IN_JACK && p2[0] >= 6 ) {
+ jack = p2[4];
+#ifdef HAVE_JACK_STRINGS
+ jack2string[jack] = p2[5];
+#endif
+ printk(KERN_INFO "usb-midi: Found IN Jack 0x%02x %s\n",
+ jack, (p2[3] == EMBEDDED_JACK)?"EMBEDDED":"EXTERNAL" );
+ } else if ( p2[2] == MIDI_OUT_JACK && p2[0] >= 6) {
+ pins = p2[5];
+ if ( p2[0] < (6 + 2 * pins) )
+ continue;
+ jack = p2[4];
+#ifdef HAVE_JACK_STRINGS
+ jack2string[jack] = p2[5 + 2 * pins];
+#endif
+ printk(KERN_INFO "usb-midi: Found OUT Jack 0x%02x %s, %d pins\n",
+ jack, (p2[3] == EMBEDDED_JACK)?"EMBEDDED":"EXTERNAL", pins );
+ } else if ( p2[2] == ELEMENT_DESCRIPTOR && p2[0] >= 10) {
+ pins = p2[4];
+ if ( p2[0] < (9 + 2 * pins ) )
+ continue;
+ nbytes = p2[8 + 2 * pins ];
+ if ( p2[0] < (10 + 2 * pins + nbytes) )
+ continue;
+ longBits = 0L;
+ for ( offset = 0, shift = 0; offset < nbytes && offset < 8; offset ++, shift += 8) {
+ longBits |= ((long)(p2[9 + 2 * pins + offset])) << shift;
+ }
+ jack = p2[3];
+#ifdef HAVE_JACK_STRINGS
+ jack2string[jack] = p2[9 + 2 * pins + nbytes];
+#endif
+ printk(KERN_INFO "usb-midi: Found ELEMENT 0x%02x, %d/%d pins in/out, bits: 0x%016lx\n",
+ jack, pins, (int)(p2[5 + 2 * pins]), (long)longBits );
+ } else {
+ }
+ }
+
+ iep=0;
+ oep=0;
+
+ if (quirks==0) {
+ /* MIDISTREAM */
+ p2 = NULL;
+ for (p1 = find_descriptor(buffer, bufSize, NULL, USB_DT_ENDPOINT,
+ ifnum, altSetting ); p1; p1 = next ) {
+ next = find_descriptor(buffer, bufSize, p1, USB_DT_ENDPOINT,
+ ifnum, altSetting );
+ p2 = find_descriptor(buffer, bufSize, p1, USB_DT_CS_ENDPOINT,
+ ifnum, altSetting );
+
+ if ( p2 && next && ( p2 > next ) )
+ p2 = NULL;
+
+ if ( p1[0] < 9 || !p2 || p2[0] < 4 )
+ continue;
+
+ if ( (p1[2] & 0x80) == 0x80 ) {
+ if ( iep < 15 ) {
+ pins = p2[3]; /* not pins -- actually "cables" */
+ if ( pins > 16 )
+ pins = 16;
+ u->in[iep].endpoint = p1[2];
+ u->in[iep].cableId = ( 1 << pins ) - 1;
+ if ( u->in[iep].cableId )
+ iep ++;
+ if ( iep < 15 ) {
+ u->in[iep].endpoint = -1;
+ u->in[iep].cableId = -1;
+ }
+ }
+ } else {
+ if ( oep < 15 ) {
+ pins = p2[3]; /* not pins -- actually "cables" */
+ if ( pins > 16 )
+ pins = 16;
+ u->out[oep].endpoint = p1[2];
+ u->out[oep].cableId = ( 1 << pins ) - 1;
+ if ( u->out[oep].cableId )
+ oep ++;
+ if ( oep < 15 ) {
+ u->out[oep].endpoint = -1;
+ u->out[oep].cableId = -1;
+ }
+ }
+ }
+
+ }
+ } else if (quirks==1) {
+ /* YAMAHA quirks */
+ for (p1 = find_descriptor(buffer, bufSize, NULL, USB_DT_ENDPOINT,
+ ifnum, altSetting ); p1; p1 = next ) {
+ next = find_descriptor(buffer, bufSize, p1, USB_DT_ENDPOINT,
+ ifnum, altSetting );
+
+ if ( p1[0] < 7 )
+ continue;
+
+ if ( (p1[2] & 0x80) == 0x80 ) {
+ if ( iep < 15 ) {
+ pins = iep+1;
+ if ( pins > 16 )
+ pins = 16;
+ u->in[iep].endpoint = p1[2];
+ u->in[iep].cableId = ( 1 << pins ) - 1;
+ if ( u->in[iep].cableId )
+ iep ++;
+ if ( iep < 15 ) {
+ u->in[iep].endpoint = -1;
+ u->in[iep].cableId = -1;
+ }
+ }
+ } else {
+ if ( oep < 15 ) {
+ pins = oep+1;
+ u->out[oep].endpoint = p1[2];
+ u->out[oep].cableId = ( 1 << pins ) - 1;
+ if ( u->out[oep].cableId )
+ oep ++;
+ if ( oep < 15 ) {
+ u->out[oep].endpoint = -1;
+ u->out[oep].cableId = -1;
+ }
+ }
+ }
+
+ }
+ }
+
+ if ( !iep && ! oep ) {
+ goto error_end;
+ }
+
+ return u;
+
+error_end:
+ kfree(u);
+ return NULL;
+}
+
+/* ------------------------------------------------------------------------- */
+
+/** Returns number between 0 and 16.
+ *
+ **/
+static int on_bits( unsigned short v )
+{
+ int i;
+ int ret=0;
+
+ for ( i=0 ; i<16 ; i++ ) {
+ if ( v & (1<<i) )
+ ret++;
+ }
+
+ return ret;
+}
+
+
+/** USB-device will be interrogated for altSetting.
+ *
+ * Returns negative on error.
+ * Called by allocUsbMidiDev();
+ *
+ **/
+
+static int get_alt_setting( struct usb_device *d, int ifnum )
+{
+ int alts, alt=0;
+ struct usb_interface *iface;
+ struct usb_host_interface *interface;
+ struct usb_endpoint_descriptor *ep;
+ int epin, epout;
+ int i;
+
+ iface = usb_ifnum_to_if( d, ifnum );
+ alts = iface->num_altsetting;
+
+ for ( alt=0 ; alt<alts ; alt++ ) {
+ interface = &iface->altsetting[alt];
+ epin = -1;
+ epout = -1;
+
+ for ( i=0 ; i<interface->desc.bNumEndpoints ; i++ ) {
+ ep = &interface->endpoint[i].desc;
+ if ( (ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK ) {
+ continue;
+ }
+ if ( (ep->bEndpointAddress & USB_DIR_IN) && epin < 0 ) {
+ epin = i;
+ } else if ( epout < 0 ) {
+ epout = i;
+ }
+ if ( epin >= 0 && epout >= 0 ) {
+ return interface->desc.bAlternateSetting;
+ }
+ }
+ }
+
+ return -ENODEV;
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+
+/** Returns 0 if successful in allocating and registering internal structures.
+ * Returns negative on failure.
+ * Calls allocMidiDev which additionally registers /dev/midiXX devices.
+ * Writes messages on success to indicate which /dev/midiXX is which physical
+ * endpoint.
+ *
+ **/
+static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s, struct usb_midi_device *u )
+{
+ struct usb_mididev **mdevs=NULL;
+ struct midi_in_endpoint *mins[15], *min;
+ struct midi_out_endpoint *mouts[15], *mout;
+ int inDevs=0, outDevs=0;
+ int inEndpoints=0, outEndpoints=0;
+ int inEndpoint, outEndpoint;
+ int inCableId, outCableId;
+ int i;
+ int devices = 0;
+ int alt = 0;
+
+ /* Obtain altSetting or die.. */
+ alt = u->altSetting;
+ if ( alt < 0 ) {
+ alt = get_alt_setting( d, u->interface );
+ }
+ if ( alt < 0 )
+ return -ENXIO;
+
+ /* Configure interface */
+ if ( usb_set_interface( d, u->interface, alt ) < 0 ) {
+ return -ENXIO;
+ }
+
+ for ( i = 0 ; i < 15 ; i++ ) {
+ mins[i] = NULL;
+ mouts[i] = NULL;
+ }
+
+ /* Begin Allocation */
+ while( inEndpoints < 15
+ && inDevs < maxdevices
+ && u->in[inEndpoints].cableId >= 0 ) {
+ inDevs += on_bits((unsigned short)u->in[inEndpoints].cableId);
+ mins[inEndpoints] = alloc_midi_in_endpoint( d, u->in[inEndpoints].endpoint );
+ if ( mins[inEndpoints] == NULL )
+ goto error_end;
+ inEndpoints++;
+ }
+
+ while( outEndpoints < 15
+ && outDevs < maxdevices
+ && u->out[outEndpoints].cableId >= 0 ) {
+ outDevs += on_bits((unsigned short)u->out[outEndpoints].cableId);
+ mouts[outEndpoints] = alloc_midi_out_endpoint( d, u->out[outEndpoints].endpoint );
+ if ( mouts[outEndpoints] == NULL )
+ goto error_end;
+ outEndpoints++;
+ }
+
+ devices = inDevs > outDevs ? inDevs : outDevs;
+ devices = maxdevices > devices ? devices : maxdevices;
+
+ /* obtain space for device name (iProduct) if not known. */
+ if ( ! u->deviceName ) {
+ mdevs = (struct usb_mididev **)
+ kmalloc(sizeof(struct usb_mididevs *)*devices
+ + sizeof(char) * 256, GFP_KERNEL);
+ } else {
+ mdevs = (struct usb_mididev **)
+ kmalloc(sizeof(struct usb_mididevs *)*devices, GFP_KERNEL);
+ }
+
+ if ( !mdevs ) {
+ /* devices = 0; */
+ /* mdevs = NULL; */
+ goto error_end;
+ }
+ for ( i=0 ; i<devices ; i++ ) {
+ mdevs[i] = NULL;
+ }
+
+ /* obtain device name (iProduct) if not known. */
+ if ( ! u->deviceName ) {
+ u->deviceName = (char *) (mdevs + devices);
+ if ( ! d->have_langid && d->descriptor.iProduct) {
+ alt = usb_get_string(d, 0, 0, u->deviceName, 250);
+ if (alt < 0) {
+ printk(KERN_INFO "error getting string descriptor 0 (error=%d)\n", alt);
+ } else if (u->deviceName[0] < 4) {
+ printk(KERN_INFO "string descriptor 0 too short (length = %d)\n", alt);
+ } else {
+ printk(KERN_INFO "string descriptor 0 found (length = %d)\n", alt);
+ for(; alt >= 4; alt -= 2) {
+ i = u->deviceName[alt-2] | (u->deviceName[alt-1]<< 8);
+ printk(KERN_INFO "usb-midi: langid(%d) 0x%04x\n",
+ (alt-4) >> 1, i);
+ if ( ( ( i ^ ulangid ) & 0xff ) == 0 ) {
+ d->have_langid = 1;
+ d->string_langid = i;
+ printk(KERN_INFO "usb-midi: langid(match) 0x%04x\n", i);
+ if ( i == ulangid )
+ break;
+ }
+ }
+ }
+ }
+ u->deviceName[0] = (char) 0;
+ if (d->descriptor.iProduct) {
+ printk(KERN_INFO "usb-midi: fetchString(%d)\n", d->descriptor.iProduct);
+ alt = usb_string(d, d->descriptor.iProduct, u->deviceName, 255);
+ if( alt < 0 ) {
+ u->deviceName[0] = (char) 0;
+ }
+ printk(KERN_INFO "usb-midi: fetchString = %d\n", alt);
+ }
+ /* Failsafe */
+ if ( !u->deviceName[0] ) {
+ if (le16_to_cpu(d->descriptor.idVendor) == USB_VENDOR_ID_ROLAND ) {
+ strcpy(u->deviceName, "Unknown Roland");
+ } else if (le16_to_cpu(d->descriptor.idVendor) == USB_VENDOR_ID_STEINBERG ) {
+ strcpy(u->deviceName, "Unknown Steinberg");
+ } else if (le16_to_cpu(d->descriptor.idVendor) == USB_VENDOR_ID_YAMAHA ) {
+ strcpy(u->deviceName, "Unknown Yamaha");
+ } else {
+ strcpy(u->deviceName, "Unknown");
+ }
+ }
+ }
+
+ inEndpoint = 0; inCableId = -1;
+ outEndpoint = 0; outCableId = -1;
+
+ for ( i=0 ; i<devices ; i++ ) {
+ for ( inCableId ++ ;
+ inEndpoint <15
+ && mins[inEndpoint]
+ && !(u->in[inEndpoint].cableId & (1<<inCableId)) ;
+ inCableId++ ) {
+ if ( inCableId >= 16 ) {
+ inEndpoint ++;
+ inCableId = 0;
+ }
+ }
+ min = mins[inEndpoint];
+ for ( outCableId ++ ;
+ outEndpoint <15
+ && mouts[outEndpoint]
+ && !(u->out[outEndpoint].cableId & (1<<outCableId)) ;
+ outCableId++ ) {
+ if ( outCableId >= 16 ) {
+ outEndpoint ++;
+ outCableId = 0;
+ }
+ }
+ mout = mouts[outEndpoint];
+
+ mdevs[i] = allocMidiDev( s, min, mout, inCableId, outCableId );
+ if ( mdevs[i] == NULL )
+ goto error_end;
+
+ }
+
+ /* Success! */
+ for ( i=0 ; i<devices ; i++ ) {
+ list_add_tail( &mdevs[i]->list, &s->midiDevList );
+ }
+ for ( i=0 ; i<inEndpoints ; i++ ) {
+ list_add_tail( &mins[i]->list, &s->inEndpointList );
+ }
+ for ( i=0 ; i<outEndpoints ; i++ ) {
+ list_add_tail( &mouts[i]->list, &s->outEndpointList );
+ }
+
+ printk(KERN_INFO "usbmidi: found [ %s ] (0x%04x:0x%04x), attached:\n", u->deviceName, u->idVendor, u->idProduct );
+ for ( i=0 ; i<devices ; i++ ) {
+ int dm = (mdevs[i]->dev_midi-2)>>4;
+ if ( mdevs[i]->mout.ep != NULL && mdevs[i]->min.ep != NULL ) {
+ printk(KERN_INFO "usbmidi: /dev/midi%02d: in (ep:%02x cid:%2d bufsiz:%2d) out (ep:%02x cid:%2d bufsiz:%2d)\n",
+ dm,
+ mdevs[i]->min.ep->endpoint|USB_DIR_IN, mdevs[i]->min.cableId, mdevs[i]->min.ep->recvBufSize,
+ mdevs[i]->mout.ep->endpoint, mdevs[i]->mout.cableId, mdevs[i]->mout.ep->bufSize);
+ } else if ( mdevs[i]->min.ep != NULL ) {
+ printk(KERN_INFO "usbmidi: /dev/midi%02d: in (ep:%02x cid:%2d bufsiz:%02d)\n",
+ dm,
+ mdevs[i]->min.ep->endpoint|USB_DIR_IN, mdevs[i]->min.cableId, mdevs[i]->min.ep->recvBufSize);
+ } else if ( mdevs[i]->mout.ep != NULL ) {
+ printk(KERN_INFO "usbmidi: /dev/midi%02d: out (ep:%02x cid:%2d bufsiz:%02d)\n",
+ dm,
+ mdevs[i]->mout.ep->endpoint, mdevs[i]->mout.cableId, mdevs[i]->mout.ep->bufSize);
+ }
+ }
+
+ kfree(mdevs);
+ return 0;
+
+ error_end:
+ if ( mdevs != NULL ) {
+ for ( i=0 ; i<devices ; i++ ) {
+ if ( mdevs[i] != NULL ) {
+ unregister_sound_midi( mdevs[i]->dev_midi );
+ kfree(mdevs[i]);
+ }
+ }
+ kfree(mdevs);
+ }
+
+ for ( i=0 ; i<15 ; i++ ) {
+ if ( mins[i] != NULL ) {
+ remove_midi_in_endpoint( mins[i] );
+ }
+ if ( mouts[i] != NULL ) {
+ remove_midi_out_endpoint( mouts[i] );
+ }
+ }
+
+ return -ENOMEM;
+}
+
+/* ------------------------------------------------------------------------- */
+
+/** Attempt to scan YAMAHA's device descriptor and detect correct values of
+ * them.
+ * Return 0 on succes, negative on failure.
+ * Called by usb_midi_probe();
+ **/
+
+static int detect_yamaha_device( struct usb_device *d,
+ struct usb_interface *iface, unsigned int ifnum,
+ struct usb_midi_state *s)
+{
+ struct usb_host_interface *interface;
+ struct usb_midi_device *u;
+ unsigned char *buffer;
+ int bufSize;
+ int i;
+ int alts=-1;
+ int ret;
+
+ if (le16_to_cpu(d->descriptor.idVendor) != USB_VENDOR_ID_YAMAHA) {
+ return -EINVAL;
+ }
+
+ for ( i=0 ; i < iface->num_altsetting; i++ ) {
+ interface = iface->altsetting + i;
+
+ if ( interface->desc.bInterfaceClass != 255 ||
+ interface->desc.bInterfaceSubClass != 0 )
+ continue;
+ alts = interface->desc.bAlternateSetting;
+ }
+ if ( alts == -1 ) {
+ return -EINVAL;
+ }
+
+ printk(KERN_INFO "usb-midi: Found YAMAHA USB-MIDI device on dev %04x:%04x, iface %d\n",
+ le16_to_cpu(d->descriptor.idVendor),
+ le16_to_cpu(d->descriptor.idProduct), ifnum);
+
+ i = d->actconfig - d->config;
+ buffer = d->rawdescriptors[i];
+ bufSize = le16_to_cpu(d->actconfig->desc.wTotalLength);
+
+ u = parse_descriptor( d, buffer, bufSize, ifnum, alts, 1);
+ if ( u == NULL ) {
+ return -EINVAL;
+ }
+
+ ret = alloc_usb_midi_device( d, s, u );
+
+ kfree(u);
+
+ return ret;
+}
+
+
+/** Scan table of known devices which are only partially compliant with
+ * the MIDIStreaming specification.
+ * Called by usb_midi_probe();
+ *
+ **/
+
+static int detect_vendor_specific_device( struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s )
+{
+ struct usb_midi_device *u;
+ int i;
+ int ret = -ENXIO;
+
+ for ( i=0; i<VENDOR_SPECIFIC_USB_MIDI_DEVICES ; i++ ) {
+ u=&(usb_midi_devices[i]);
+
+ if ( le16_to_cpu(d->descriptor.idVendor) != u->idVendor ||
+ le16_to_cpu(d->descriptor.idProduct) != u->idProduct ||
+ ifnum != u->interface )
+ continue;
+
+ ret = alloc_usb_midi_device( d, s, u );
+ break;
+ }
+
+ return ret;
+}
+
+
+/** Attempt to match any config of an interface to a MIDISTREAMING interface.
+ * Returns 0 on success, negative on failure.
+ * Called by usb_midi_probe();
+ **/
+static int detect_midi_subclass(struct usb_device *d,
+ struct usb_interface *iface, unsigned int ifnum,
+ struct usb_midi_state *s)
+{
+ struct usb_host_interface *interface;
+ struct usb_midi_device *u;
+ unsigned char *buffer;
+ int bufSize;
+ int i;
+ int alts=-1;
+ int ret;
+
+ for ( i=0 ; i < iface->num_altsetting; i++ ) {
+ interface = iface->altsetting + i;
+
+ if ( interface->desc.bInterfaceClass != USB_CLASS_AUDIO ||
+ interface->desc.bInterfaceSubClass != USB_SUBCLASS_MIDISTREAMING )
+ continue;
+ alts = interface->desc.bAlternateSetting;
+ }
+ if ( alts == -1 ) {
+ return -EINVAL;
+ }
+
+ printk(KERN_INFO "usb-midi: Found MIDISTREAMING on dev %04x:%04x, iface %d\n",
+ le16_to_cpu(d->descriptor.idVendor),
+ le16_to_cpu(d->descriptor.idProduct), ifnum);
+
+
+ /* From USB Spec v2.0, Section 9.5.
+ If the class or vendor specific descriptors use the same format
+ as standard descriptors (e.g., start with a length byte and
+ followed by a type byte), they must be returned interleaved with
+ standard descriptors in the configuration information returned by
+ a GetDescriptor(Configuration) request. In this case, the class
+ or vendor-specific descriptors must follow a related standard
+ descriptor they modify or extend.
+ */
+
+ i = d->actconfig - d->config;
+ buffer = d->rawdescriptors[i];
+ bufSize = le16_to_cpu(d->actconfig->desc.wTotalLength);
+
+ u = parse_descriptor( d, buffer, bufSize, ifnum, alts, 0);
+ if ( u == NULL ) {
+ return -EINVAL;
+ }
+
+ ret = alloc_usb_midi_device( d, s, u );
+
+ kfree(u);
+
+ return ret;
+}
+
+
+/** When user has requested a specific device, match it exactly.
+ *
+ * Uses uvendor, uproduct, uinterface, ualt, umin, umout and ucable.
+ * Called by usb_midi_probe();
+ *
+ **/
+static int detect_by_hand(struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s)
+{
+ struct usb_midi_device u;
+
+ if ( le16_to_cpu(d->descriptor.idVendor) != uvendor ||
+ le16_to_cpu(d->descriptor.idProduct) != uproduct ||
+ ifnum != uinterface ) {
+ return -EINVAL;
+ }
+
+ if ( ualt < 0 )
+ ualt = -1;
+
+ if ( umin < 0 || umin > 15 )
+ umin = 0x01 | USB_DIR_IN;
+ if ( umout < 0 || umout > 15 )
+ umout = 0x01;
+ if ( ucable < 0 || ucable > 15 )
+ ucable = 0;
+
+ u.deviceName = NULL; /* A flag for alloc_usb_midi_device to get device
+ name from device. */
+ u.idVendor = uvendor;
+ u.idProduct = uproduct;
+ u.interface = uinterface;
+ u.altSetting = ualt;
+
+ u.in[0].endpoint = umin;
+ u.in[0].cableId = (1<<ucable);
+
+ u.out[0].endpoint = umout;
+ u.out[0].cableId = (1<<ucable);
+
+ return alloc_usb_midi_device( d, s, &u );
+}
+
+
+
+/* ------------------------------------------------------------------------- */
+
+static int usb_midi_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_midi_state *s;
+ struct usb_device *dev = interface_to_usbdev(intf);
+ int ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
+
+ s = (struct usb_midi_state *)kmalloc(sizeof(struct usb_midi_state), GFP_KERNEL);
+ if ( !s )
+ return -ENOMEM;
+
+ memset( s, 0, sizeof(struct usb_midi_state) );
+ INIT_LIST_HEAD(&s->midiDevList);
+ INIT_LIST_HEAD(&s->inEndpointList);
+ INIT_LIST_HEAD(&s->outEndpointList);
+ s->usbdev = dev;
+ s->count = 0;
+ spin_lock_init(&s->lock);
+
+ if (
+ detect_by_hand( dev, ifnum, s ) &&
+ detect_midi_subclass( dev, intf, ifnum, s ) &&
+ detect_vendor_specific_device( dev, ifnum, s ) &&
+ detect_yamaha_device( dev, intf, ifnum, s) ) {
+ kfree(s);
+ return -EIO;
+ }
+
+ down(&open_sem);
+ list_add_tail(&s->mididev, &mididevs);
+ up(&open_sem);
+
+ usb_set_intfdata (intf, s);
+ return 0;
+}
+
+
+static void usb_midi_disconnect(struct usb_interface *intf)
+{
+ struct usb_midi_state *s = usb_get_intfdata (intf);
+ struct usb_mididev *m;
+
+ if ( !s )
+ return;
+
+ if ( s == (struct usb_midi_state *)-1 ) {
+ return;
+ }
+ if ( !s->usbdev ) {
+ return;
+ }
+ down(&open_sem);
+ list_del(&s->mididev);
+ INIT_LIST_HEAD(&s->mididev);
+ s->usbdev = NULL;
+ usb_set_intfdata (intf, NULL);
+
+ list_for_each_entry(m, &s->midiDevList, list) {
+ wake_up(&(m->min.ep->wait));
+ wake_up(&(m->mout.ep->wait));
+ if ( m->dev_midi >= 0 ) {
+ unregister_sound_midi(m->dev_midi);
+ }
+ m->dev_midi = -1;
+ }
+ release_midi_device(s);
+ wake_up(&open_wait);
+}
+
+/* we want to look at all devices by hand */
+static struct usb_device_id id_table[] = {
+ {.driver_info = 42},
+ {}
+};
+
+static struct usb_driver usb_midi_driver = {
+ .owner = THIS_MODULE,
+ .name = "midi",
+ .probe = usb_midi_probe,
+ .disconnect = usb_midi_disconnect,
+ .id_table = id_table,
+};
+
+/* ------------------------------------------------------------------------- */
+
+static int __init usb_midi_init(void)
+{
+ return usb_register(&usb_midi_driver);
+}
+
+static void __exit usb_midi_exit(void)
+{
+ usb_deregister(&usb_midi_driver);
+}
+
+module_init(usb_midi_init) ;
+module_exit(usb_midi_exit) ;
+
+#ifdef HAVE_ALSA_SUPPORT
+#define SNDRV_MAIN_OBJECT_FILE
+#include "../../include/driver.h"
+#include "../../include/control.h"
+#include "../../include/info.h"
+#include "../../include/cs46xx.h"
+
+/* ------------------------------------------------------------------------- */
+
+static int snd_usbmidi_input_close(snd_rawmidi_substream_t * substream)
+{
+ return 0;
+}
+
+static int snd_usbmidi_input_open(snd_rawmidi_substream_t * substream )
+{
+ return 0;
+}
+
+static void snd_usbmidi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+{
+ return 0;
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+static int snd_usbmidi_output_close(snd_rawmidi_substream_t * substream)
+{
+ return 0;
+}
+
+static int snd_usbmidi_output_open(snd_rawmidi_substream_t * substream)
+{
+ return 0;
+}
+
+static void snd_usb_midi_output_trigger(snd_rawmidi_substream_t * substream,
+ int up)
+{
+ return 0;
+}
+
+/* ------------------------------------------------------------------------- */
+
+static snd_rawmidi_ops_t snd_usbmidi_output =
+{
+ .open = snd_usbmidi_output_open,
+ .close = snd_usbmidi_output_close,
+ .trigger = snd_usbmidi_output_trigger,
+};
+static snd_rawmidi_ops_t snd_usbmidi_input =
+{
+ .open = snd_usbmidi_input_open,
+ .close = snd_usbmidi_input_close,
+ .trigger = snd_usbmidi_input_trigger,
+};
+
+int snd_usbmidi_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmidi)
+{
+ snd_rawmidi_t *rmidi;
+ int err;
+
+ if (rrawmidi)
+ *rrawmidi = NULL;
+ if ((err = snd_rawmidi_new(chip->card, "USB-MIDI", device, 1, 1, &rmidi)) < 0)
+ return err;
+ strcpy(rmidi->name, "USB-MIDI");
+
+ snd_rawmidi_set_ops( rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_usbmidi_output );
+ snd_rawmidi_set_ops( rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_usbmidi_input );
+
+ rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | SNDRV_RAWMIDI_INFO_INPUT | SNDRV_RAWMIDI_INFO_DUPLEX;
+
+ rmidi->private_data = chip;
+ chip->rmidi = rmidi;
+ if (rrawmidi)
+ *rrawmidi = NULL;
+
+ return 0;
+}
+
+int snd_usbmidi_create( snd_card_t * card,
+ struct pci_dev * pci,
+ usbmidi_t ** rchip )
+{
+ usbmidi_t *chip;
+ int err, idx;
+ snd_region_t *region;
+ static snd_device_opt_t ops = {
+ .dev_free = snd_usbmidi_dev_free,
+ };
+
+ *rchip = NULL;
+ chip = snd_magic_kcalloc( usbmidi_t, 0, GFP_KERNEL );
+ if ( chip == NULL )
+ return -ENOMEM;
+}
+
+EXPORT_SYMBOL(snd_usbmidi_create);
+EXPORT_SYMBOL(snd_usbmidi_midi);
+#endif /* HAVE_ALSA_SUPPORT */
+
diff --git a/drivers/usb/class/usb-midi.h b/drivers/usb/class/usb-midi.h
new file mode 100644
index 000000000000..358cdef8492e
--- /dev/null
+++ b/drivers/usb/class/usb-midi.h
@@ -0,0 +1,164 @@
+/*
+ usb-midi.h -- USB-MIDI driver
+
+ Copyright (C) 2001
+ NAGANO Daisuke <breeze.nagano@nifty.ne.jp>
+
+ 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,
+ 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.
+ */
+
+/* ------------------------------------------------------------------------- */
+
+#ifndef _USB_MIDI_H_
+#define _USB_MIDI_H_
+
+#ifndef USB_SUBCLASS_MIDISTREAMING
+#define USB_SUBCLASS_MIDISTREAMING 3
+#endif
+
+/* ------------------------------------------------------------------------- */
+/* Roland MIDI Devices */
+
+#define USB_VENDOR_ID_ROLAND 0x0582
+#define USBMIDI_ROLAND_UA100G 0x0000
+#define USBMIDI_ROLAND_MPU64 0x0002
+#define USBMIDI_ROLAND_SC8850 0x0003
+#define USBMIDI_ROLAND_SC8820 0x0007
+#define USBMIDI_ROLAND_UM2 0x0005
+#define USBMIDI_ROLAND_UM1 0x0009
+#define USBMIDI_ROLAND_PC300 0x0008
+
+/* YAMAHA MIDI Devices */
+#define USB_VENDOR_ID_YAMAHA 0x0499
+#define USBMIDI_YAMAHA_MU1000 0x1001
+
+/* Steinberg MIDI Devices */
+#define USB_VENDOR_ID_STEINBERG 0x0763
+#define USBMIDI_STEINBERG_USB2MIDI 0x1001
+
+/* Mark of the Unicorn MIDI Devices */
+#define USB_VENDOR_ID_MOTU 0x07fd
+#define USBMIDI_MOTU_FASTLANE 0x0001
+
+/* ------------------------------------------------------------------------- */
+/* Supported devices */
+
+struct usb_midi_endpoint {
+ int endpoint;
+ int cableId; /* if bit-n == 1 then cableId-n is enabled (n: 0 - 15) */
+};
+
+struct usb_midi_device {
+ char *deviceName;
+
+ u16 idVendor;
+ u16 idProduct;
+ int interface;
+ int altSetting; /* -1: auto detect */
+
+ struct usb_midi_endpoint in[15];
+ struct usb_midi_endpoint out[15];
+};
+
+static struct usb_midi_device usb_midi_devices[] = {
+ { /* Roland UM-1 */
+ "Roland UM-1",
+ USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1, 2, -1,
+ { { 0x81, 1 }, {-1, -1} },
+ { { 0x01, 1,}, {-1, -1} },
+ },
+
+ { /* Roland UM-2 */
+ "Roland UM-2" ,
+ USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2, 2, -1,
+ { { 0x81, 3 }, {-1, -1} },
+ { { 0x01, 3,}, {-1, -1} },
+ },
+
+/** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
+ { /* Roland UA-100 */
+ "Roland UA-100",
+ USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G, 2, -1,
+ { { 0x82, 7 }, {-1, -1} }, /** cables 0,1 and 2 for SYSEX **/
+ { { 0x02, 7 }, {-1, -1} },
+ },
+
+/** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
+ { /* Roland SC8850 */
+ "Roland SC8850",
+ USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850, 2, -1,
+ { { 0x81, 0x3f }, {-1, -1} },
+ { { 0x01, 0x3f }, {-1, -1} },
+ },
+
+ { /* Roland SC8820 */
+ "Roland SC8820",
+ USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820, 2, -1,
+ { { 0x81, 0x13 }, {-1, -1} },
+ { { 0x01, 0x13 }, {-1, -1} },
+ },
+
+ { /* Roland SC8820 */
+ "Roland SC8820",
+ USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820, 2, -1,
+ { { 0x81, 17 }, {-1, -1} },
+ { { 0x01, 17 }, {-1, -1} },
+ },
+
+ { /* YAMAHA MU1000 */
+ "YAMAHA MU1000",
+ USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000, 0, -1,
+ { { 0x81, 1 }, {-1, -1} },
+ { { 0x01, 15 }, {-1, -1} },
+ },
+ { /* Roland PC-300 */
+ "Roland PC-300",
+ USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300, 2, -1,
+ { { 0x81, 1 }, {-1, -1} },
+ { { 0x01, 1 }, {-1, -1} },
+ },
+ { /* MOTU Fastlane USB */
+ "MOTU Fastlane USB",
+ USB_VENDOR_ID_MOTU, USBMIDI_MOTU_FASTLANE, 1, 0,
+ { { 0x82, 3 }, {-1, -1} },
+ { { 0x02, 3 }, {-1, -1} },
+ }
+};
+
+#define VENDOR_SPECIFIC_USB_MIDI_DEVICES (sizeof(usb_midi_devices)/sizeof(struct usb_midi_device))
+
+/* for Hot-Plugging */
+
+static struct usb_device_id usb_midi_ids [] = {
+ { .match_flags = (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS),
+ .bInterfaceClass = USB_CLASS_AUDIO, .bInterfaceSubClass = USB_SUBCLASS_MIDISTREAMING},
+ { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1 ) },
+ { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2 ) },
+ { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G ) },
+ { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300 ) },
+ { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850 ) },
+ { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820 ) },
+ { USB_DEVICE( USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000 ) },
+ { USB_DEVICE( USB_VENDOR_ID_MOTU, USBMIDI_MOTU_FASTLANE ) },
+/* { USB_DEVICE( USB_VENDOR_ID_STEINBERG, USBMIDI_STEINBERG_USB2MIDI ) },*/
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, usb_midi_ids);
+
+/* ------------------------------------------------------------------------- */
+#endif /* _USB_MIDI_H_ */
+
+
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
new file mode 100644
index 000000000000..bba22e97ea0f
--- /dev/null
+++ b/drivers/usb/class/usblp.c
@@ -0,0 +1,1214 @@
+/*
+ * usblp.c Version 0.13
+ *
+ * Copyright (c) 1999 Michael Gee <michael@linuxspecific.com>
+ * Copyright (c) 1999 Pavel Machek <pavel@suse.cz>
+ * Copyright (c) 2000 Randy Dunlap <rddunlap@osdl.org>
+ * Copyright (c) 2000 Vojtech Pavlik <vojtech@suse.cz>
+ # Copyright (c) 2001 Pete Zaitcev <zaitcev@redhat.com>
+ # Copyright (c) 2001 David Paschal <paschal@rcsis.com>
+ *
+ * USB Printer Device Class driver for USB printers and printer cables
+ *
+ * Sponsored by SuSE
+ *
+ * ChangeLog:
+ * v0.1 - thorough cleaning, URBification, almost a rewrite
+ * v0.2 - some more cleanups
+ * v0.3 - cleaner again, waitqueue fixes
+ * 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- remove sleep_on, fix error on oom (oliver@neukum.org)
+ * v0.11 - add proto_bias option (Pete Zaitcev)
+ * v0.12 - add hpoj.sourceforge.net ioctls (David Paschal)
+ * v0.13 - alloc space for statusbuf (<status> not on stack);
+ * use usb_buffer_alloc() for read buf & write buf;
+ */
+
+/*
+ * 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 <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
+#include <linux/signal.h>
+#include <linux/poll.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/lp.h>
+#undef DEBUG
+#include <linux/usb.h>
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.13"
+#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 USBLP_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
+#define IOCNR_SOFT_RESET 7
+/* 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<<n)!=0 means 7/1/n supported): */
+#define LPIOC_GET_PROTOCOLS(len) _IOC(_IOC_READ, 'P', IOCNR_GET_PROTOCOLS, len)
+/* Set protocol (arg: 1=7/1/1, 2=7/1/2, 3=7/1/3): */
+#define LPIOC_SET_PROTOCOL _IOC(_IOC_WRITE, 'P', IOCNR_SET_PROTOCOL, 0)
+/* Set channel number (HP Vendor-specific command): */
+#define LPIOC_HP_SET_CHANNEL _IOC(_IOC_WRITE, 'P', IOCNR_HP_SET_CHANNEL, 0)
+/* Get two-int array: [0]=bus number, [1]=device address: */
+#define LPIOC_GET_BUS_ADDRESS(len) _IOC(_IOC_READ, 'P', IOCNR_GET_BUS_ADDRESS, len)
+/* Get two-int array: [0]=vendor ID, [1]=product ID: */
+#define LPIOC_GET_VID_PID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_VID_PID, len)
+/* Perform class specific soft reset */
+#define LPIOC_SOFT_RESET _IOC(_IOC_NONE, 'P', IOCNR_SOFT_RESET, 0);
+
+/*
+ * A DEVICE_ID string may include the printer's serial number.
+ * It should end with a semi-colon (';').
+ * An example from an HP 970C DeskJet printer is (this is one long string,
+ * with the serial number changed):
+MFG:HEWLETT-PACKARD;MDL:DESKJET 970C;CMD:MLC,PCL,PML;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard DeskJet 970C;SERN:US970CSEPROF;VSTATUS:$HB0$NC0,ff,DN,IDLE,CUT,K1,C0,DP,NR,KP000,CP027;VP:0800,FL,B0;VJ: ;
+ */
+
+/*
+ * USB Printer Requests
+ */
+
+#define USBLP_REQ_GET_ID 0x00
+#define USBLP_REQ_GET_STATUS 0x01
+#define USBLP_REQ_RESET 0x02
+#define USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST 0x00 /* HP Vendor-specific */
+
+#define USBLP_MINORS 16
+#define USBLP_MINOR_BASE 0
+
+#define USBLP_WRITE_TIMEOUT (5000) /* 5 seconds */
+
+#define USBLP_FIRST_PROTOCOL 1
+#define USBLP_LAST_PROTOCOL 3
+#define USBLP_MAX_PROTOCOLS (USBLP_LAST_PROTOCOL+1)
+
+/*
+ * some arbitrary status buffer size;
+ * need a status buffer that is allocated via kmalloc(), not on stack
+ */
+#define STATUS_BUF_SIZE 8
+
+struct usblp {
+ struct usb_device *dev; /* USB device */
+ struct semaphore sem; /* locks this struct, especially "dev" */
+ char *writebuf; /* write transfer_buffer */
+ char *readbuf; /* read transfer_buffer */
+ char *statusbuf; /* status transfer_buffer */
+ struct urb *readurb, *writeurb; /* The urbs */
+ wait_queue_head_t wait; /* Zzzzz ... */
+ int readcount; /* Counter for reads */
+ int ifnum; /* Interface number */
+ struct usb_interface *intf; /* The interface */
+ /* Alternate-setting numbers and endpoints for each protocol
+ * (7/1/{index=1,2,3}) that the device supports: */
+ struct {
+ int alt_setting;
+ struct usb_endpoint_descriptor *epwrite;
+ struct usb_endpoint_descriptor *epread;
+ } protocol[USBLP_MAX_PROTOCOLS];
+ int current_protocol;
+ int minor; /* minor number of device */
+ int wcomplete; /* writing is completed */
+ int rcomplete; /* reading is completed */
+ unsigned int quirks; /* quirks flags */
+ unsigned char used; /* True if open */
+ unsigned char present; /* True if not disconnected */
+ unsigned char bidir; /* interface is bidirectional */
+ unsigned char *device_id_string; /* IEEE 1284 DEVICE ID string (ptr) */
+ /* first 2 bytes are (big-endian) length */
+};
+
+#ifdef DEBUG
+static void usblp_dump(struct usblp *usblp) {
+ int p;
+
+ dbg("usblp=0x%p", usblp);
+ dbg("dev=0x%p", usblp->dev);
+ dbg("present=%d", usblp->present);
+ dbg("readbuf=0x%p", usblp->readbuf);
+ dbg("writebuf=0x%p", usblp->writebuf);
+ dbg("readurb=0x%p", usblp->readurb);
+ dbg("writeurb=0x%p", usblp->writeurb);
+ 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("wcomplete=%d", usblp->wcomplete);
+ dbg("rcomplete=%d", usblp->rcomplete);
+ 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
+
+/* Quirks: various printer quirks are handled by this table & its flags. */
+
+struct quirk_printer_struct {
+ __u16 vendorId;
+ __u16 productId;
+ unsigned int quirks;
+};
+
+#define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */
+#define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
+
+static struct quirk_printer_struct quirk_printers[] = {
+ { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
+ { 0x03f0, 0x0104, USBLP_QUIRK_BIDIR }, /* HP DeskJet 880C */
+ { 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);
+
+/* forward reference to make our lives easier */
+static struct usb_driver usblp_driver;
+static DECLARE_MUTEX(usblp_sem); /* locks the existence of usblp's */
+
+/*
+ * 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;
+ int index = usblp->ifnum;
+
+ /* High byte has the interface index.
+ Low byte has the alternate setting.
+ */
+ if ((request == USBLP_REQ_GET_ID) && (type == USB_TYPE_CLASS)) {
+ index = (usblp->ifnum<<8)|usblp->protocol[usblp->current_protocol].alt_setting;
+ }
+
+ retval = usb_control_msg(usblp->dev,
+ dir ? usb_rcvctrlpipe(usblp->dev, 0) : usb_sndctrlpipe(usblp->dev, 0),
+ request, type | dir | recip, value, index, buf, len, USBLP_WRITE_TIMEOUT);
+ dbg("usblp_control_msg: rq: 0x%02x dir: %d recip: %d value: %d idx: %d len: %#x result: %d",
+ request, !!dir, recip, value, index, 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.
+ */
+
+static void usblp_bulk_read(struct urb *urb, struct pt_regs *regs)
+{
+ struct usblp *usblp = urb->context;
+
+ if (!usblp || !usblp->dev || !usblp->used || !usblp->present)
+ return;
+
+ if (unlikely(urb->status))
+ warn("usblp%d: nonzero read/write bulk status received: %d",
+ usblp->minor, urb->status);
+ usblp->rcomplete = 1;
+ wake_up_interruptible(&usblp->wait);
+}
+
+static void usblp_bulk_write(struct urb *urb, struct pt_regs *regs)
+{
+ struct usblp *usblp = urb->context;
+
+ if (!usblp || !usblp->dev || !usblp->used || !usblp->present)
+ return;
+
+ if (unlikely(urb->status))
+ warn("usblp%d: nonzero read/write bulk status received: %d",
+ usblp->minor, urb->status);
+ usblp->wcomplete = 1;
+ wake_up_interruptible(&usblp->wait);
+}
+
+/*
+ * 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)
+{
+ unsigned char status, newerr = 0;
+ int error;
+
+ error = usblp_read_status (usblp, usblp->statusbuf);
+ if (error < 0) {
+ err("usblp%d: error %d reading printer status",
+ usblp->minor, error);
+ return 0;
+ }
+
+ status = *usblp->statusbuf;
+
+ if (~status & LP_PERRORP)
+ newerr = 3;
+ if (status & LP_POUTPA)
+ newerr = 1;
+ if (~status & LP_PSELECD)
+ newerr = 2;
+
+ if (newerr != err)
+ info("usblp%d: %s", usblp->minor, usblp_messages[newerr]);
+
+ return newerr;
+}
+
+/*
+ * File op functions.
+ */
+
+static int usblp_open(struct inode *inode, struct file *file)
+{
+ int minor = iminor(inode);
+ struct usblp *usblp;
+ struct usb_interface *intf;
+ int retval;
+
+ if (minor < 0)
+ return -ENODEV;
+
+ down (&usblp_sem);
+
+ retval = -ENODEV;
+ intf = usb_find_interface(&usblp_driver, minor);
+ if (!intf) {
+ goto out;
+ }
+ usblp = usb_get_intfdata (intf);
+ if (!usblp || !usblp->dev || !usblp->present)
+ goto out;
+
+ retval = -EBUSY;
+ if (usblp->used)
+ goto out;
+
+ /*
+ * TODO: need to implement LP_ABORTOPEN + O_NONBLOCK as in drivers/char/lp.c ???
+ * This is #if 0-ed because we *don't* want to fail an open
+ * just because the printer is off-line.
+ */
+#if 0
+ if ((retval = usblp_check_status(usblp, 0))) {
+ retval = retval > 1 ? -EIO : -ENOSPC;
+ goto out;
+ }
+#else
+ retval = 0;
+#endif
+
+ usblp->used = 1;
+ file->private_data = usblp;
+
+ usblp->writeurb->transfer_buffer_length = 0;
+ usblp->wcomplete = 1; /* we begin writeable */
+ usblp->rcomplete = 0;
+
+ if (usblp->bidir) {
+ usblp->readcount = 0;
+ usblp->readurb->dev = usblp->dev;
+ if (usb_submit_urb(usblp->readurb, GFP_KERNEL) < 0) {
+ retval = -EIO;
+ usblp->used = 0;
+ file->private_data = NULL;
+ }
+ }
+out:
+ up (&usblp_sem);
+ return retval;
+}
+
+static void usblp_cleanup (struct usblp *usblp)
+{
+ info("usblp%d: removed", usblp->minor);
+
+ kfree (usblp->device_id_string);
+ kfree (usblp->statusbuf);
+ usb_free_urb(usblp->writeurb);
+ usb_free_urb(usblp->readurb);
+ kfree (usblp);
+}
+
+static void usblp_unlink_urbs(struct usblp *usblp)
+{
+ usb_kill_urb(usblp->writeurb);
+ if (usblp->bidir)
+ usb_kill_urb(usblp->readurb);
+}
+
+static int usblp_release(struct inode *inode, struct file *file)
+{
+ struct usblp *usblp = file->private_data;
+
+ down (&usblp_sem);
+ usblp->used = 0;
+ if (usblp->present) {
+ usblp_unlink_urbs(usblp);
+ } else /* finish cleanup from disconnect */
+ usblp_cleanup (usblp);
+ up (&usblp_sem);
+ return 0;
+}
+
+/* No kernel lock - fine */
+static unsigned int usblp_poll(struct file *file, struct poll_table_struct *wait)
+{
+ struct usblp *usblp = file->private_data;
+ poll_wait(file, &usblp->wait, wait);
+ return ((!usblp->bidir || !usblp->rcomplete) ? 0 : POLLIN | POLLRDNORM)
+ | (!usblp->wcomplete ? 0 : POLLOUT | POLLWRNORM);
+}
+
+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 newChannel;
+ int status;
+ int twoints[2];
+ int retval = 0;
+
+ down (&usblp->sem);
+ if (!usblp->present) {
+ retval = -ENODEV;
+ goto done;
+ }
+
+ dbg("usblp_ioctl: cmd=0x%x (%c nr=%d len=%d dir=%d)", cmd, _IOC_TYPE(cmd),
+ _IOC_NR(cmd), _IOC_SIZE(cmd), _IOC_DIR(cmd) );
+
+ if (_IOC_TYPE(cmd) == 'P') /* new-style ioctl number */
+
+ switch (_IOC_NR(cmd)) {
+
+ case IOCNR_GET_DEVICE_ID: /* get the DEVICE_ID string */
+ if (_IOC_DIR(cmd) != _IOC_READ) {
+ retval = -EINVAL;
+ 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((void __user *) 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<<i);
+ }
+
+ if (copy_to_user((void __user *)arg,
+ (unsigned char *)twoints,
+ sizeof(twoints))) {
+ retval = -EFAULT;
+ goto done;
+ }
+
+ break;
+
+ case IOCNR_SET_PROTOCOL:
+ if (_IOC_DIR(cmd) != _IOC_WRITE) {
+ retval = -EINVAL;
+ goto done;
+ }
+
+#ifdef DEBUG
+ if (arg == -10) {
+ usblp_dump(usblp);
+ break;
+ }
+#endif
+
+ usblp_unlink_urbs(usblp);
+ retval = usblp_set_protocol(usblp, arg);
+ if (retval < 0) {
+ usblp_set_protocol(usblp,
+ usblp->current_protocol);
+ }
+ break;
+
+ case IOCNR_HP_SET_CHANNEL:
+ if (_IOC_DIR(cmd) != _IOC_WRITE ||
+ le16_to_cpu(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((void __user *)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] = le16_to_cpu(usblp->dev->descriptor.idVendor);
+ twoints[1] = le16_to_cpu(usblp->dev->descriptor.idProduct);
+ if (copy_to_user((void __user *)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;
+
+ case IOCNR_SOFT_RESET:
+ if (_IOC_DIR(cmd) != _IOC_NONE) {
+ retval = -EINVAL;
+ goto done;
+ }
+ retval = usblp_reset(usblp);
+ break;
+ default:
+ retval = -ENOTTY;
+ }
+ else /* old-style ioctl value */
+ switch (cmd) {
+
+ case LPGETSTATUS:
+ if (usblp_read_status(usblp, usblp->statusbuf)) {
+ err("usblp%d: failed reading printer status", usblp->minor);
+ retval = -EIO;
+ goto done;
+ }
+ status = *usblp->statusbuf;
+ if (copy_to_user ((void __user *)arg, &status, sizeof(int)))
+ retval = -EFAULT;
+ break;
+
+ default:
+ retval = -ENOTTY;
+ }
+
+done:
+ up (&usblp->sem);
+ return retval;
+}
+
+static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
+{
+ DECLARE_WAITQUEUE(wait, current);
+ struct usblp *usblp = file->private_data;
+ int timeout, err = 0, transfer_length = 0;
+ size_t writecount = 0;
+
+ while (writecount < count) {
+ if (!usblp->wcomplete) {
+ barrier();
+ if (file->f_flags & O_NONBLOCK) {
+ writecount += transfer_length;
+ return writecount ? writecount : -EAGAIN;
+ }
+
+ timeout = USBLP_WRITE_TIMEOUT;
+ add_wait_queue(&usblp->wait, &wait);
+ while ( 1==1 ) {
+
+ if (signal_pending(current)) {
+ remove_wait_queue(&usblp->wait, &wait);
+ return writecount ? writecount : -EINTR;
+ }
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (timeout && !usblp->wcomplete) {
+ timeout = schedule_timeout(timeout);
+ } else {
+ set_current_state(TASK_RUNNING);
+ break;
+ }
+ }
+ remove_wait_queue(&usblp->wait, &wait);
+ }
+
+ down (&usblp->sem);
+ if (!usblp->present) {
+ up (&usblp->sem);
+ return -ENODEV;
+ }
+
+ if (usblp->writeurb->status != 0) {
+ if (usblp->quirks & USBLP_QUIRK_BIDIR) {
+ if (!usblp->wcomplete)
+ err("usblp%d: error %d writing to printer",
+ usblp->minor, usblp->writeurb->status);
+ err = usblp->writeurb->status;
+ } else
+ err = usblp_check_status(usblp, err);
+ up (&usblp->sem);
+
+ /* if the fault was due to disconnect, let khubd's
+ * call to usblp_disconnect() grab usblp->sem ...
+ */
+ schedule ();
+ continue;
+ }
+
+ /* We must increment writecount here, and not at the
+ * end of the loop. Otherwise, the final loop iteration may
+ * be skipped, leading to incomplete printer output.
+ */
+ writecount += transfer_length;
+ if (writecount == count) {
+ up(&usblp->sem);
+ break;
+ }
+
+ transfer_length=(count - writecount);
+ if (transfer_length > USBLP_BUF_SIZE)
+ transfer_length = USBLP_BUF_SIZE;
+
+ usblp->writeurb->transfer_buffer_length = transfer_length;
+
+ if (copy_from_user(usblp->writeurb->transfer_buffer,
+ buffer + writecount, transfer_length)) {
+ up(&usblp->sem);
+ return writecount ? writecount : -EFAULT;
+ }
+
+ usblp->writeurb->dev = usblp->dev;
+ usblp->wcomplete = 0;
+ err = usb_submit_urb(usblp->writeurb, GFP_KERNEL);
+ if (err) {
+ if (err != -ENOMEM)
+ count = -EIO;
+ else
+ count = writecount ? writecount : -ENOMEM;
+ up (&usblp->sem);
+ break;
+ }
+ up (&usblp->sem);
+ }
+
+ return count;
+}
+
+static ssize_t usblp_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
+{
+ struct usblp *usblp = file->private_data;
+ DECLARE_WAITQUEUE(wait, current);
+
+ if (!usblp->bidir)
+ return -EINVAL;
+
+ down (&usblp->sem);
+ if (!usblp->present) {
+ count = -ENODEV;
+ goto done;
+ }
+
+ if (!usblp->rcomplete) {
+ barrier();
+
+ if (file->f_flags & O_NONBLOCK) {
+ count = -EAGAIN;
+ goto done;
+ }
+
+ add_wait_queue(&usblp->wait, &wait);
+ while (1==1) {
+ if (signal_pending(current)) {
+ count = -EINTR;
+ remove_wait_queue(&usblp->wait, &wait);
+ goto done;
+ }
+ up (&usblp->sem);
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (!usblp->rcomplete) {
+ schedule();
+ } else {
+ set_current_state(TASK_RUNNING);
+ break;
+ }
+ down (&usblp->sem);
+ }
+ remove_wait_queue(&usblp->wait, &wait);
+ }
+
+ if (!usblp->present) {
+ count = -ENODEV;
+ goto done;
+ }
+
+ if (usblp->readurb->status) {
+ err("usblp%d: error %d reading from printer",
+ usblp->minor, usblp->readurb->status);
+ usblp->readurb->dev = usblp->dev;
+ usblp->readcount = 0;
+ usblp->rcomplete = 0;
+ if (usb_submit_urb(usblp->readurb, GFP_KERNEL) < 0)
+ dbg("error submitting urb");
+ count = -EIO;
+ goto done;
+ }
+
+ count = count < usblp->readurb->actual_length - usblp->readcount ?
+ count : usblp->readurb->actual_length - usblp->readcount;
+
+ if (copy_to_user(buffer, usblp->readurb->transfer_buffer + usblp->readcount, count)) {
+ count = -EFAULT;
+ goto done;
+ }
+
+ if ((usblp->readcount += count) == usblp->readurb->actual_length) {
+ usblp->readcount = 0;
+ usblp->readurb->dev = usblp->dev;
+ usblp->rcomplete = 0;
+ if (usb_submit_urb(usblp->readurb, GFP_KERNEL)) {
+ count = -EIO;
+ goto done;
+ }
+ }
+
+done:
+ up (&usblp->sem);
+ return count;
+}
+
+/*
+ * Checks for printers that have quirks, such as requiring unidirectional
+ * communication but reporting bidirectional; currently some HP printers
+ * have this flaw (HP 810, 880, 895, etc.), or needing an init string
+ * sent at each open (like some Epsons).
+ * Returns 1 if found, 0 if not found.
+ *
+ * HP recommended that we use the bidirectional interface but
+ * don't attempt any bulk IN transfers from the IN endpoint.
+ * Here's some more detail on the problem:
+ * The problem is not that it isn't bidirectional though. The problem
+ * is that if you request a device ID, or status information, while
+ * the buffers are full, the return data will end up in the print data
+ * buffer. For example if you make sure you never request the device ID
+ * while you are sending print data, and you don't try to query the
+ * printer status every couple of milliseconds, you will probably be OK.
+ */
+static unsigned int usblp_quirks (__u16 vendor, __u16 product)
+{
+ int i;
+
+ for (i = 0; quirk_printers[i].vendorId; i++) {
+ if (vendor == quirk_printers[i].vendorId &&
+ product == quirk_printers[i].productId)
+ return quirk_printers[i].quirks;
+ }
+ return 0;
+}
+
+static struct file_operations usblp_fops = {
+ .owner = THIS_MODULE,
+ .read = usblp_read,
+ .write = usblp_write,
+ .poll = usblp_poll,
+ .ioctl = usblp_ioctl,
+ .open = usblp_open,
+ .release = usblp_release,
+};
+
+static struct usb_class_driver usblp_class = {
+ .name = "usb/lp%d",
+ .fops = &usblp_fops,
+ .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP,
+ .minor_base = USBLP_MINOR_BASE,
+};
+
+static int usblp_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev (intf);
+ struct usblp *usblp = NULL;
+ int protocol;
+ int retval;
+
+ /* 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 = intf->cur_altsetting->desc.bInterfaceNumber;
+ usblp->intf = intf;
+
+ usblp->writeurb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!usblp->writeurb) {
+ err("out of memory");
+ goto abort;
+ }
+ usblp->readurb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!usblp->readurb) {
+ err("out of memory");
+ 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(USBLP_DEVICE_ID_SIZE, GFP_KERNEL))) {
+ err("out of memory for device_id_string");
+ goto abort;
+ }
+
+ usblp->writebuf = usblp->readbuf = NULL;
+ usblp->writeurb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
+ usblp->readurb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
+ /* Malloc write & read buffers. We somewhat wastefully
+ * malloc both regardless of bidirectionality, because the
+ * alternate setting can be changed later via an ioctl. */
+ if (!(usblp->writebuf = usb_buffer_alloc(dev, USBLP_BUF_SIZE,
+ GFP_KERNEL, &usblp->writeurb->transfer_dma))) {
+ err("out of memory for write buf");
+ goto abort;
+ }
+ if (!(usblp->readbuf = usb_buffer_alloc(dev, USBLP_BUF_SIZE,
+ GFP_KERNEL, &usblp->readurb->transfer_dma))) {
+ err("out of memory for read buf");
+ goto abort;
+ }
+
+ /* Allocate buffer for printer status */
+ usblp->statusbuf = kmalloc(STATUS_BUF_SIZE, GFP_KERNEL);
+ if (!usblp->statusbuf) {
+ err("out of memory for statusbuf");
+ goto abort;
+ }
+
+ /* Lookup quirks for this printer. */
+ usblp->quirks = usblp_quirks(
+ le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(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",
+ le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(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
+
+ 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,
+ usblp->ifnum,
+ usblp->protocol[usblp->current_protocol].alt_setting,
+ usblp->current_protocol,
+ le16_to_cpu(usblp->dev->descriptor.idVendor),
+ le16_to_cpu(usblp->dev->descriptor.idProduct));
+
+ usb_set_intfdata (intf, usblp);
+
+ usblp->present = 1;
+
+ retval = usb_register_dev(intf, &usblp_class);
+ if (retval) {
+ err("Not able to get a minor for this device.");
+ goto abort_intfdata;
+ }
+ usblp->minor = intf->minor;
+
+ return 0;
+
+abort_intfdata:
+ usb_set_intfdata (intf, NULL);
+abort:
+ if (usblp) {
+ if (usblp->writebuf)
+ usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
+ usblp->writebuf, usblp->writeurb->transfer_dma);
+ if (usblp->readbuf)
+ usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
+ usblp->readbuf, usblp->writeurb->transfer_dma);
+ kfree(usblp->statusbuf);
+ kfree(usblp->device_id_string);
+ usb_free_urb(usblp->writeurb);
+ usb_free_urb(usblp->readurb);
+ kfree(usblp);
+ }
+ return -EIO;
+}
+
+/*
+ * 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_host_interface *ifd;
+ struct usb_endpoint_descriptor *epd, *epwrite, *epread;
+ int p, i, e;
+
+ if_alt = usblp->intf;
+
+ 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->desc.bInterfaceClass != 7 || ifd->desc.bInterfaceSubClass != 1)
+ continue;
+
+ if (ifd->desc.bInterfaceProtocol < USBLP_FIRST_PROTOCOL ||
+ ifd->desc.bInterfaceProtocol > USBLP_LAST_PROTOCOL)
+ continue;
+
+ /* Look for bulk OUT and IN endpoints. */
+ epwrite = epread = NULL;
+ for (e = 0; e < ifd->desc.bNumEndpoints; e++) {
+ epd = &ifd->endpoint[e].desc;
+
+ 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->desc.bInterfaceProtocol > 1 && !epread))
+ continue;
+
+ /* Turn off reads for 7/1/1 (unidirectional) interfaces
+ * and buggy bidirectional printers. */
+ if (ifd->desc.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->desc.bInterfaceProtocol].alt_setting =
+ ifd->desc.bAlternateSetting;
+ usblp->protocol[ifd->desc.bInterfaceProtocol].epwrite = epwrite;
+ usblp->protocol[ifd->desc.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;
+ }
+
+ usb_fill_bulk_urb(usblp->writeurb, usblp->dev,
+ usb_sndbulkpipe(usblp->dev,
+ usblp->protocol[protocol].epwrite->bEndpointAddress),
+ usblp->writebuf, 0,
+ usblp_bulk_write, usblp);
+
+ usblp->bidir = (usblp->protocol[protocol].epread != NULL);
+ if (usblp->bidir)
+ usb_fill_bulk_urb(usblp->readurb, usblp->dev,
+ usb_rcvbulkpipe(usblp->dev,
+ usblp->protocol[protocol].epread->bEndpointAddress),
+ usblp->readbuf, USBLP_BUF_SIZE,
+ usblp_bulk_read, 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, USBLP_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 = be16_to_cpu(*((__be16 *)usblp->device_id_string));
+ if (length < 2)
+ length = 2;
+ else if (length >= USBLP_DEVICE_ID_SIZE)
+ length = USBLP_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_interface *intf)
+{
+ struct usblp *usblp = usb_get_intfdata (intf);
+
+ usb_deregister_dev(intf, &usblp_class);
+
+ if (!usblp || !usblp->dev) {
+ err("bogus disconnect");
+ BUG ();
+ }
+
+ down (&usblp_sem);
+ down (&usblp->sem);
+ usblp->present = 0;
+ usb_set_intfdata (intf, NULL);
+
+ usblp_unlink_urbs(usblp);
+ usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
+ usblp->writebuf, usblp->writeurb->transfer_dma);
+ usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
+ usblp->readbuf, usblp->readurb->transfer_dma);
+ up (&usblp->sem);
+
+ if (!usblp->used)
+ usblp_cleanup (usblp);
+ up (&usblp_sem);
+}
+
+static struct usb_device_id usblp_ids [] = {
+ { USB_DEVICE_INFO(7, 1, 1) },
+ { USB_DEVICE_INFO(7, 1, 2) },
+ { USB_DEVICE_INFO(7, 1, 3) },
+ { USB_INTERFACE_INFO(7, 1, 1) },
+ { USB_INTERFACE_INFO(7, 1, 2) },
+ { USB_INTERFACE_INFO(7, 1, 3) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, usblp_ids);
+
+static struct usb_driver usblp_driver = {
+ .owner = THIS_MODULE,
+ .name = "usblp",
+ .probe = usblp_probe,
+ .disconnect = usblp_disconnect,
+ .id_table = usblp_ids,
+};
+
+static int __init usblp_init(void)
+{
+ int retval;
+ retval = usb_register(&usblp_driver);
+ if (retval)
+ goto out;
+ info(DRIVER_VERSION ": " DRIVER_DESC);
+out:
+ return retval;
+}
+
+static void __exit usblp_exit(void)
+{
+ usb_deregister(&usblp_driver);
+}
+
+module_init(usblp_init);
+module_exit(usblp_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+module_param(proto_bias, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(proto_bias, "Favourite protocol number");
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig
new file mode 100644
index 000000000000..1a9ff6184943
--- /dev/null
+++ b/drivers/usb/core/Kconfig
@@ -0,0 +1,99 @@
+#
+# USB Core configuration
+#
+config USB_DEBUG
+ bool "USB verbose debug messages"
+ depends on USB
+ help
+ Say Y here if you want the USB core & hub drivers to produce a bunch
+ of debug messages to the system log. Select this if you are having a
+ problem with USB support and want to see more of what is going on.
+
+comment "Miscellaneous USB options"
+ depends on USB
+
+config USB_DEVICEFS
+ bool "USB device filesystem"
+ depends on USB
+ ---help---
+ If you say Y here (and to "/proc file system support" in the "File
+ systems" section, above), you will get a file /proc/bus/usb/devices
+ which lists the devices currently connected to your USB bus or
+ busses, and for every connected device a file named
+ "/proc/bus/usb/xxx/yyy", where xxx is the bus number and yyy the
+ device number; the latter files can be used by user space programs
+ to talk directly to the device. These files are "virtual", meaning
+ they are generated on the fly and not stored on the hard drive.
+
+ You may need to mount the usbfs file system to see the files, use
+ mount -t usbfs none /proc/bus/usb
+
+ For the format of the various /proc/bus/usb/ files, please read
+ <file:Documentation/usb/proc_usb_info.txt>.
+
+ Please note that this code is completely unrelated to devfs, the
+ "/dev file system support".
+
+ Most users want to say Y here.
+
+config USB_BANDWIDTH
+ bool "Enforce USB bandwidth allocation (EXPERIMENTAL)"
+ depends on USB && EXPERIMENTAL
+ help
+ If you say Y here, the USB subsystem enforces USB bandwidth
+ allocation and will prevent some device opens from succeeding
+ if they would cause USB bandwidth usage to go above 90% of
+ the bus bandwidth.
+
+ If you say N here, these conditions will cause warning messages
+ about USB bandwidth usage to be logged and some devices or
+ drivers may not work correctly.
+
+config USB_DYNAMIC_MINORS
+ bool "Dynamic USB minor allocation (EXPERIMENTAL)"
+ depends on USB && EXPERIMENTAL
+ help
+ If you say Y here, the USB subsystem will use dynamic minor
+ allocation for any device that uses the USB major number.
+ This means that you can have more than 16 of a single type
+ of device (like USB printers).
+
+ If you are unsure about this, say N here.
+
+config USB_SUSPEND
+ bool "USB suspend/resume (EXPERIMENTAL)"
+ depends on USB && PM && EXPERIMENTAL
+ help
+ If you say Y here, you can use driver calls or the sysfs
+ "power/state" file to suspend or resume individual USB
+ peripherals. There are many related features, such as
+ remote wakeup and driver-specific suspend processing, that
+ may not yet work as expected.
+
+ If you are unsure about this, say N here.
+
+
+config USB_OTG
+ bool
+ depends on USB && EXPERIMENTAL
+ select USB_SUSPEND
+ default n
+
+
+config USB_OTG_WHITELIST
+ bool "Rely on OTG Targeted Peripherals List"
+ depends on USB_OTG
+ default y
+ help
+ If you say Y here, the "otg_whitelist.h" file will be used as a
+ product whitelist, so USB peripherals not listed there will be
+ rejected during enumeration. This behavior is required by the
+ USB OTG specification for all devices not on your product's
+ "Targeted Peripherals List".
+
+ Otherwise, peripherals not listed there will only generate a
+ warning and enumeration will continue. That's more like what
+ normal Linux-USB hosts do (other than the warning), and is
+ convenient for many stages of product development.
+
+
diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile
new file mode 100644
index 000000000000..9e8c377b8161
--- /dev/null
+++ b/drivers/usb/core/Makefile
@@ -0,0 +1,16 @@
+#
+# Makefile for USB Core files and filesystem
+#
+
+usbcore-objs := usb.o hub.o hcd.o urb.o message.o \
+ config.o file.o buffer.o sysfs.o
+
+ifeq ($(CONFIG_PCI),y)
+ usbcore-objs += hcd-pci.o
+endif
+
+ifeq ($(CONFIG_USB_DEVICEFS),y)
+ usbcore-objs += devio.o inode.o devices.o
+endif
+
+obj-$(CONFIG_USB) += usbcore.o
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
new file mode 100644
index 000000000000..b7827df21f48
--- /dev/null
+++ b/drivers/usb/core/buffer.c
@@ -0,0 +1,154 @@
+/*
+ * DMA memory management for framework level HCD code (hc_driver)
+ *
+ * This implementation plugs in through generic "usb_bus" level methods,
+ * and should work with all USB controllers, regardles of bus type.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/device.h>
+#include <linux/mm.h>
+#include <asm/io.h>
+#include <asm/scatterlist.h>
+#include <linux/dma-mapping.h>
+#include <linux/dmapool.h>
+
+
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+
+#include <linux/usb.h>
+#include "hcd.h"
+
+
+/*
+ * DMA-Coherent Buffers
+ */
+
+/* FIXME tune these based on pool statistics ... */
+static const size_t pool_max [HCD_BUFFER_POOLS] = {
+ /* platforms without dma-friendly caches might need to
+ * prevent cacheline sharing...
+ */
+ 32,
+ 128,
+ 512,
+ PAGE_SIZE / 2
+ /* bigger --> allocate pages */
+};
+
+
+/* SETUP primitives */
+
+/**
+ * hcd_buffer_create - initialize buffer pools
+ * @hcd: the bus whose buffer pools are to be initialized
+ * Context: !in_interrupt()
+ *
+ * Call this as part of initializing a host controller that uses the dma
+ * memory allocators. It initializes some pools of dma-coherent memory that
+ * will be shared by all drivers using that controller, or returns a negative
+ * errno value on error.
+ *
+ * Call hcd_buffer_destroy() to clean up after using those pools.
+ */
+int hcd_buffer_create (struct usb_hcd *hcd)
+{
+ char name [16];
+ int i, size;
+
+ for (i = 0; i < HCD_BUFFER_POOLS; i++) {
+ if (!(size = pool_max [i]))
+ continue;
+ snprintf (name, sizeof name, "buffer-%d", size);
+ hcd->pool [i] = dma_pool_create (name, hcd->self.controller,
+ size, size, 0);
+ if (!hcd->pool [i]) {
+ hcd_buffer_destroy (hcd);
+ return -ENOMEM;
+ }
+ }
+ return 0;
+}
+
+
+/**
+ * hcd_buffer_destroy - deallocate buffer pools
+ * @hcd: the bus whose buffer pools are to be destroyed
+ * Context: !in_interrupt()
+ *
+ * This frees the buffer pools created by hcd_buffer_create().
+ */
+void hcd_buffer_destroy (struct usb_hcd *hcd)
+{
+ int i;
+
+ for (i = 0; i < HCD_BUFFER_POOLS; i++) {
+ struct dma_pool *pool = hcd->pool [i];
+ if (pool) {
+ dma_pool_destroy (pool);
+ hcd->pool[i] = NULL;
+ }
+ }
+}
+
+
+/* sometimes alloc/free could use kmalloc with SLAB_DMA, for
+ * better sharing and to leverage mm/slab.c intelligence.
+ */
+
+void *hcd_buffer_alloc (
+ struct usb_bus *bus,
+ size_t size,
+ int mem_flags,
+ dma_addr_t *dma
+)
+{
+ struct usb_hcd *hcd = bus->hcpriv;
+ int i;
+
+ /* some USB hosts just use PIO */
+ if (!bus->controller->dma_mask) {
+ *dma = ~(dma_addr_t) 0;
+ return kmalloc (size, mem_flags);
+ }
+
+ for (i = 0; i < HCD_BUFFER_POOLS; i++) {
+ if (size <= pool_max [i])
+ return dma_pool_alloc (hcd->pool [i], mem_flags, dma);
+ }
+ return dma_alloc_coherent (hcd->self.controller, size, dma, 0);
+}
+
+void hcd_buffer_free (
+ struct usb_bus *bus,
+ size_t size,
+ void *addr,
+ dma_addr_t dma
+)
+{
+ struct usb_hcd *hcd = bus->hcpriv;
+ int i;
+
+ if (!addr)
+ return;
+
+ if (!bus->controller->dma_mask) {
+ kfree (addr);
+ return;
+ }
+
+ for (i = 0; i < HCD_BUFFER_POOLS; i++) {
+ if (size <= pool_max [i]) {
+ dma_pool_free (hcd->pool [i], addr, dma);
+ return;
+ }
+ }
+ dma_free_coherent (hcd->self.controller, size, addr, dma);
+}
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
new file mode 100644
index 000000000000..0b092bdf98f3
--- /dev/null
+++ b/drivers/usb/core/config.c
@@ -0,0 +1,534 @@
+#include <linux/config.h>
+
+#ifdef CONFIG_USB_DEBUG
+#define DEBUG
+#endif
+
+#include <linux/usb.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/device.h>
+#include <asm/byteorder.h>
+
+
+#define USB_MAXALTSETTING 128 /* Hard limit */
+#define USB_MAXENDPOINTS 30 /* Hard limit */
+
+#define USB_MAXCONFIG 8 /* Arbitrary limit */
+
+
+static inline const char *plural(int n)
+{
+ return (n == 1 ? "" : "s");
+}
+
+static int find_next_descriptor(unsigned char *buffer, int size,
+ int dt1, int dt2, int *num_skipped)
+{
+ struct usb_descriptor_header *h;
+ int n = 0;
+ unsigned char *buffer0 = buffer;
+
+ /* Find the next descriptor of type dt1 or dt2 */
+ while (size > 0) {
+ h = (struct usb_descriptor_header *) buffer;
+ if (h->bDescriptorType == dt1 || h->bDescriptorType == dt2)
+ break;
+ buffer += h->bLength;
+ size -= h->bLength;
+ ++n;
+ }
+
+ /* Store the number of descriptors skipped and return the
+ * number of bytes skipped */
+ if (num_skipped)
+ *num_skipped = n;
+ return buffer - buffer0;
+}
+
+static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
+ int asnum, struct usb_host_interface *ifp, int num_ep,
+ unsigned char *buffer, int size)
+{
+ unsigned char *buffer0 = buffer;
+ struct usb_endpoint_descriptor *d;
+ struct usb_host_endpoint *endpoint;
+ int n, i;
+
+ d = (struct usb_endpoint_descriptor *) buffer;
+ buffer += d->bLength;
+ size -= d->bLength;
+
+ if (d->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE)
+ n = USB_DT_ENDPOINT_AUDIO_SIZE;
+ else if (d->bLength >= USB_DT_ENDPOINT_SIZE)
+ n = USB_DT_ENDPOINT_SIZE;
+ else {
+ dev_warn(ddev, "config %d interface %d altsetting %d has an "
+ "invalid endpoint descriptor of length %d, skipping\n",
+ cfgno, inum, asnum, d->bLength);
+ goto skip_to_next_endpoint_or_interface_descriptor;
+ }
+
+ i = d->bEndpointAddress & ~USB_ENDPOINT_DIR_MASK;
+ if (i >= 16 || i == 0) {
+ dev_warn(ddev, "config %d interface %d altsetting %d has an "
+ "invalid endpoint with address 0x%X, skipping\n",
+ cfgno, inum, asnum, d->bEndpointAddress);
+ goto skip_to_next_endpoint_or_interface_descriptor;
+ }
+
+ /* Only store as many endpoints as we have room for */
+ if (ifp->desc.bNumEndpoints >= num_ep)
+ goto skip_to_next_endpoint_or_interface_descriptor;
+
+ endpoint = &ifp->endpoint[ifp->desc.bNumEndpoints];
+ ++ifp->desc.bNumEndpoints;
+
+ memcpy(&endpoint->desc, d, n);
+ INIT_LIST_HEAD(&endpoint->urb_list);
+
+ /* Skip over any Class Specific or Vendor Specific descriptors;
+ * find the next endpoint or interface descriptor */
+ endpoint->extra = buffer;
+ i = find_next_descriptor(buffer, size, USB_DT_ENDPOINT,
+ USB_DT_INTERFACE, &n);
+ endpoint->extralen = i;
+ if (n > 0)
+ dev_dbg(ddev, "skipped %d descriptor%s after %s\n",
+ n, plural(n), "endpoint");
+ return buffer - buffer0 + i;
+
+skip_to_next_endpoint_or_interface_descriptor:
+ i = find_next_descriptor(buffer, size, USB_DT_ENDPOINT,
+ USB_DT_INTERFACE, NULL);
+ return buffer - buffer0 + i;
+}
+
+void usb_release_interface_cache(struct kref *ref)
+{
+ struct usb_interface_cache *intfc = ref_to_usb_interface_cache(ref);
+ int j;
+
+ for (j = 0; j < intfc->num_altsetting; j++)
+ kfree(intfc->altsetting[j].endpoint);
+ kfree(intfc);
+}
+
+static int usb_parse_interface(struct device *ddev, int cfgno,
+ struct usb_host_config *config, unsigned char *buffer, int size,
+ u8 inums[], u8 nalts[])
+{
+ unsigned char *buffer0 = buffer;
+ struct usb_interface_descriptor *d;
+ int inum, asnum;
+ struct usb_interface_cache *intfc;
+ struct usb_host_interface *alt;
+ int i, n;
+ int len, retval;
+ int num_ep, num_ep_orig;
+
+ d = (struct usb_interface_descriptor *) buffer;
+ buffer += d->bLength;
+ size -= d->bLength;
+
+ if (d->bLength < USB_DT_INTERFACE_SIZE)
+ goto skip_to_next_interface_descriptor;
+
+ /* Which interface entry is this? */
+ intfc = NULL;
+ inum = d->bInterfaceNumber;
+ for (i = 0; i < config->desc.bNumInterfaces; ++i) {
+ if (inums[i] == inum) {
+ intfc = config->intf_cache[i];
+ break;
+ }
+ }
+ if (!intfc || intfc->num_altsetting >= nalts[i])
+ goto skip_to_next_interface_descriptor;
+
+ /* Check for duplicate altsetting entries */
+ asnum = d->bAlternateSetting;
+ for ((i = 0, alt = &intfc->altsetting[0]);
+ i < intfc->num_altsetting;
+ (++i, ++alt)) {
+ if (alt->desc.bAlternateSetting == asnum) {
+ dev_warn(ddev, "Duplicate descriptor for config %d "
+ "interface %d altsetting %d, skipping\n",
+ cfgno, inum, asnum);
+ goto skip_to_next_interface_descriptor;
+ }
+ }
+
+ ++intfc->num_altsetting;
+ memcpy(&alt->desc, d, USB_DT_INTERFACE_SIZE);
+
+ /* Skip over any Class Specific or Vendor Specific descriptors;
+ * find the first endpoint or interface descriptor */
+ alt->extra = buffer;
+ i = find_next_descriptor(buffer, size, USB_DT_ENDPOINT,
+ USB_DT_INTERFACE, &n);
+ alt->extralen = i;
+ if (n > 0)
+ dev_dbg(ddev, "skipped %d descriptor%s after %s\n",
+ n, plural(n), "interface");
+ buffer += i;
+ size -= i;
+
+ /* Allocate space for the right(?) number of endpoints */
+ num_ep = num_ep_orig = alt->desc.bNumEndpoints;
+ alt->desc.bNumEndpoints = 0; // Use as a counter
+ if (num_ep > USB_MAXENDPOINTS) {
+ dev_warn(ddev, "too many endpoints for config %d interface %d "
+ "altsetting %d: %d, using maximum allowed: %d\n",
+ cfgno, inum, asnum, num_ep, USB_MAXENDPOINTS);
+ num_ep = USB_MAXENDPOINTS;
+ }
+
+ len = sizeof(struct usb_host_endpoint) * num_ep;
+ alt->endpoint = kmalloc(len, GFP_KERNEL);
+ if (!alt->endpoint)
+ return -ENOMEM;
+ memset(alt->endpoint, 0, len);
+
+ /* Parse all the endpoint descriptors */
+ n = 0;
+ while (size > 0) {
+ if (((struct usb_descriptor_header *) buffer)->bDescriptorType
+ == USB_DT_INTERFACE)
+ break;
+ retval = usb_parse_endpoint(ddev, cfgno, inum, asnum, alt,
+ num_ep, buffer, size);
+ if (retval < 0)
+ return retval;
+ ++n;
+
+ buffer += retval;
+ size -= retval;
+ }
+
+ if (n != num_ep_orig)
+ dev_warn(ddev, "config %d interface %d altsetting %d has %d "
+ "endpoint descriptor%s, different from the interface "
+ "descriptor's value: %d\n",
+ cfgno, inum, asnum, n, plural(n), num_ep_orig);
+ return buffer - buffer0;
+
+skip_to_next_interface_descriptor:
+ i = find_next_descriptor(buffer, size, USB_DT_INTERFACE,
+ USB_DT_INTERFACE, NULL);
+ return buffer - buffer0 + i;
+}
+
+static int usb_parse_configuration(struct device *ddev, int cfgidx,
+ struct usb_host_config *config, unsigned char *buffer, int size)
+{
+ unsigned char *buffer0 = buffer;
+ int cfgno;
+ int nintf, nintf_orig;
+ int i, j, n;
+ struct usb_interface_cache *intfc;
+ unsigned char *buffer2;
+ int size2;
+ struct usb_descriptor_header *header;
+ int len, retval;
+ u8 inums[USB_MAXINTERFACES], nalts[USB_MAXINTERFACES];
+
+ memcpy(&config->desc, buffer, USB_DT_CONFIG_SIZE);
+ if (config->desc.bDescriptorType != USB_DT_CONFIG ||
+ config->desc.bLength < USB_DT_CONFIG_SIZE) {
+ dev_err(ddev, "invalid descriptor for config index %d: "
+ "type = 0x%X, length = %d\n", cfgidx,
+ config->desc.bDescriptorType, config->desc.bLength);
+ return -EINVAL;
+ }
+ cfgno = config->desc.bConfigurationValue;
+
+ buffer += config->desc.bLength;
+ size -= config->desc.bLength;
+
+ nintf = nintf_orig = config->desc.bNumInterfaces;
+ if (nintf > USB_MAXINTERFACES) {
+ dev_warn(ddev, "config %d has too many interfaces: %d, "
+ "using maximum allowed: %d\n",
+ cfgno, nintf, USB_MAXINTERFACES);
+ nintf = USB_MAXINTERFACES;
+ }
+
+ /* Go through the descriptors, checking their length and counting the
+ * number of altsettings for each interface */
+ n = 0;
+ for ((buffer2 = buffer, size2 = size);
+ size2 > 0;
+ (buffer2 += header->bLength, size2 -= header->bLength)) {
+
+ if (size2 < sizeof(struct usb_descriptor_header)) {
+ dev_warn(ddev, "config %d descriptor has %d excess "
+ "byte%s, ignoring\n",
+ cfgno, size2, plural(size2));
+ break;
+ }
+
+ header = (struct usb_descriptor_header *) buffer2;
+ if ((header->bLength > size2) || (header->bLength < 2)) {
+ dev_warn(ddev, "config %d has an invalid descriptor "
+ "of length %d, skipping remainder of the config\n",
+ cfgno, header->bLength);
+ break;
+ }
+
+ if (header->bDescriptorType == USB_DT_INTERFACE) {
+ struct usb_interface_descriptor *d;
+ int inum;
+
+ d = (struct usb_interface_descriptor *) header;
+ if (d->bLength < USB_DT_INTERFACE_SIZE) {
+ dev_warn(ddev, "config %d has an invalid "
+ "interface descriptor of length %d, "
+ "skipping\n", cfgno, d->bLength);
+ continue;
+ }
+
+ inum = d->bInterfaceNumber;
+ if (inum >= nintf_orig)
+ dev_warn(ddev, "config %d has an invalid "
+ "interface number: %d but max is %d\n",
+ cfgno, inum, nintf_orig - 1);
+
+ /* Have we already encountered this interface?
+ * Count its altsettings */
+ for (i = 0; i < n; ++i) {
+ if (inums[i] == inum)
+ break;
+ }
+ if (i < n) {
+ if (nalts[i] < 255)
+ ++nalts[i];
+ } else if (n < USB_MAXINTERFACES) {
+ inums[n] = inum;
+ nalts[n] = 1;
+ ++n;
+ }
+
+ } else if (header->bDescriptorType == USB_DT_DEVICE ||
+ header->bDescriptorType == USB_DT_CONFIG)
+ dev_warn(ddev, "config %d contains an unexpected "
+ "descriptor of type 0x%X, skipping\n",
+ cfgno, header->bDescriptorType);
+
+ } /* for ((buffer2 = buffer, size2 = size); ...) */
+ size = buffer2 - buffer;
+ config->desc.wTotalLength = cpu_to_le16(buffer2 - buffer0);
+
+ if (n != nintf)
+ dev_warn(ddev, "config %d has %d interface%s, different from "
+ "the descriptor's value: %d\n",
+ cfgno, n, plural(n), nintf_orig);
+ else if (n == 0)
+ dev_warn(ddev, "config %d has no interfaces?\n", cfgno);
+ config->desc.bNumInterfaces = nintf = n;
+
+ /* Check for missing interface numbers */
+ for (i = 0; i < nintf; ++i) {
+ for (j = 0; j < nintf; ++j) {
+ if (inums[j] == i)
+ break;
+ }
+ if (j >= nintf)
+ dev_warn(ddev, "config %d has no interface number "
+ "%d\n", cfgno, i);
+ }
+
+ /* Allocate the usb_interface_caches and altsetting arrays */
+ for (i = 0; i < nintf; ++i) {
+ j = nalts[i];
+ if (j > USB_MAXALTSETTING) {
+ dev_warn(ddev, "too many alternate settings for "
+ "config %d interface %d: %d, "
+ "using maximum allowed: %d\n",
+ cfgno, inums[i], j, USB_MAXALTSETTING);
+ nalts[i] = j = USB_MAXALTSETTING;
+ }
+
+ len = sizeof(*intfc) + sizeof(struct usb_host_interface) * j;
+ config->intf_cache[i] = intfc = kmalloc(len, GFP_KERNEL);
+ if (!intfc)
+ return -ENOMEM;
+ memset(intfc, 0, len);
+ kref_init(&intfc->ref);
+ }
+
+ /* Skip over any Class Specific or Vendor Specific descriptors;
+ * find the first interface descriptor */
+ config->extra = buffer;
+ i = find_next_descriptor(buffer, size, USB_DT_INTERFACE,
+ USB_DT_INTERFACE, &n);
+ config->extralen = i;
+ if (n > 0)
+ dev_dbg(ddev, "skipped %d descriptor%s after %s\n",
+ n, plural(n), "configuration");
+ buffer += i;
+ size -= i;
+
+ /* Parse all the interface/altsetting descriptors */
+ while (size > 0) {
+ retval = usb_parse_interface(ddev, cfgno, config,
+ buffer, size, inums, nalts);
+ if (retval < 0)
+ return retval;
+
+ buffer += retval;
+ size -= retval;
+ }
+
+ /* Check for missing altsettings */
+ for (i = 0; i < nintf; ++i) {
+ intfc = config->intf_cache[i];
+ for (j = 0; j < intfc->num_altsetting; ++j) {
+ for (n = 0; n < intfc->num_altsetting; ++n) {
+ if (intfc->altsetting[n].desc.
+ bAlternateSetting == j)
+ break;
+ }
+ if (n >= intfc->num_altsetting)
+ dev_warn(ddev, "config %d interface %d has no "
+ "altsetting %d\n", cfgno, inums[i], j);
+ }
+ }
+
+ return 0;
+}
+
+// hub-only!! ... and only exported for reset/reinit path.
+// otherwise used internally on disconnect/destroy path
+void usb_destroy_configuration(struct usb_device *dev)
+{
+ int c, i;
+
+ if (!dev->config)
+ return;
+
+ if (dev->rawdescriptors) {
+ for (i = 0; i < dev->descriptor.bNumConfigurations; i++)
+ kfree(dev->rawdescriptors[i]);
+
+ kfree(dev->rawdescriptors);
+ dev->rawdescriptors = NULL;
+ }
+
+ for (c = 0; c < dev->descriptor.bNumConfigurations; c++) {
+ struct usb_host_config *cf = &dev->config[c];
+
+ kfree(cf->string);
+ cf->string = NULL;
+
+ for (i = 0; i < cf->desc.bNumInterfaces; i++) {
+ if (cf->intf_cache[i])
+ kref_put(&cf->intf_cache[i]->ref,
+ usb_release_interface_cache);
+ }
+ }
+ kfree(dev->config);
+ dev->config = NULL;
+}
+
+
+// hub-only!! ... and only in reset path, or usb_new_device()
+// (used by real hubs and virtual root hubs)
+int usb_get_configuration(struct usb_device *dev)
+{
+ struct device *ddev = &dev->dev;
+ int ncfg = dev->descriptor.bNumConfigurations;
+ int result = -ENOMEM;
+ unsigned int cfgno, length;
+ unsigned char *buffer;
+ unsigned char *bigbuffer;
+ struct usb_config_descriptor *desc;
+
+ if (ncfg > USB_MAXCONFIG) {
+ dev_warn(ddev, "too many configurations: %d, "
+ "using maximum allowed: %d\n", ncfg, USB_MAXCONFIG);
+ dev->descriptor.bNumConfigurations = ncfg = USB_MAXCONFIG;
+ }
+
+ if (ncfg < 1) {
+ dev_err(ddev, "no configurations\n");
+ return -EINVAL;
+ }
+
+ length = ncfg * sizeof(struct usb_host_config);
+ dev->config = kmalloc(length, GFP_KERNEL);
+ if (!dev->config)
+ goto err2;
+ memset(dev->config, 0, length);
+
+ length = ncfg * sizeof(char *);
+ dev->rawdescriptors = kmalloc(length, GFP_KERNEL);
+ if (!dev->rawdescriptors)
+ goto err2;
+ memset(dev->rawdescriptors, 0, length);
+
+ buffer = kmalloc(USB_DT_CONFIG_SIZE, GFP_KERNEL);
+ if (!buffer)
+ goto err2;
+ desc = (struct usb_config_descriptor *)buffer;
+
+ for (cfgno = 0; cfgno < ncfg; cfgno++) {
+ /* We grab just the first descriptor so we know how long
+ * the whole configuration is */
+ result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno,
+ buffer, USB_DT_CONFIG_SIZE);
+ if (result < 0) {
+ dev_err(ddev, "unable to read config index %d "
+ "descriptor/%s\n", cfgno, "start");
+ goto err;
+ } else if (result < 4) {
+ dev_err(ddev, "config index %d descriptor too short "
+ "(expected %i, got %i)\n", cfgno,
+ USB_DT_CONFIG_SIZE, result);
+ result = -EINVAL;
+ goto err;
+ }
+ length = max((int) le16_to_cpu(desc->wTotalLength),
+ USB_DT_CONFIG_SIZE);
+
+ /* Now that we know the length, get the whole thing */
+ bigbuffer = kmalloc(length, GFP_KERNEL);
+ if (!bigbuffer) {
+ result = -ENOMEM;
+ goto err;
+ }
+ result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno,
+ bigbuffer, length);
+ if (result < 0) {
+ dev_err(ddev, "unable to read config index %d "
+ "descriptor/%s\n", cfgno, "all");
+ kfree(bigbuffer);
+ goto err;
+ }
+ if (result < length) {
+ dev_warn(ddev, "config index %d descriptor too short "
+ "(expected %i, got %i)\n", cfgno, length, result);
+ length = result;
+ }
+
+ dev->rawdescriptors[cfgno] = bigbuffer;
+
+ result = usb_parse_configuration(&dev->dev, cfgno,
+ &dev->config[cfgno], bigbuffer, length);
+ if (result < 0) {
+ ++cfgno;
+ goto err;
+ }
+ }
+ result = 0;
+
+err:
+ kfree(buffer);
+ dev->descriptor.bNumConfigurations = cfgno;
+err2:
+ if (result == -ENOMEM)
+ dev_err(ddev, "out of memory\n");
+ return result;
+}
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
new file mode 100644
index 000000000000..8b61bcd742ca
--- /dev/null
+++ b/drivers/usb/core/devices.c
@@ -0,0 +1,677 @@
+/*
+ * devices.c
+ * (C) Copyright 1999 Randy Dunlap.
+ * (C) Copyright 1999,2000 Thomas Sailer <sailer@ife.ee.ethz.ch>. (proc file per device)
+ * (C) Copyright 1999 Deti Fliegl (new USB architecture)
+ *
+ * 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
+ *
+ *************************************************************
+ *
+ * <mountpoint>/devices contains USB topology, device, config, class,
+ * interface, & endpoint data.
+ *
+ * I considered using /proc/bus/usb/devices/device# for each device
+ * as it is attached or detached, but I didn't like this for some
+ * reason -- maybe it's just too deep of a directory structure.
+ * I also don't like looking in multiple places to gather and view
+ * the data. Having only one file for ./devices also prevents race
+ * conditions that could arise if a program was reading device info
+ * for devices that are being removed (unplugged). (That is, the
+ * program may find a directory for devnum_12 then try to open it,
+ * but it was just unplugged, so the directory is now deleted.
+ * But programs would just have to be prepared for situations like
+ * this in any plug-and-play environment.)
+ *
+ * 1999-12-16: Thomas Sailer <sailer@ife.ee.ethz.ch>
+ * Converted the whole proc stuff to real
+ * read methods. Now not the whole device list needs to fit
+ * into one page, only the device list for one bus.
+ * Added a poll method to /proc/bus/usb/devices, to wake
+ * up an eventual usbd
+ * 2000-01-04: Thomas Sailer <sailer@ife.ee.ethz.ch>
+ * Turned into its own filesystem
+ * 2000-07-05: Ashley Montanaro <ashley@compsoc.man.ac.uk>
+ * Converted file reading routine to dump to buffer once
+ * per device, not per bus
+ *
+ * $Id: devices.c,v 1.5 2000/01/11 13:58:21 tom Exp $
+ */
+
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/poll.h>
+#include <linux/usb.h>
+#include <linux/smp_lock.h>
+#include <linux/usbdevice_fs.h>
+#include <asm/uaccess.h>
+
+#include "hcd.h"
+
+#define MAX_TOPO_LEVEL 6
+
+/* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */
+#define ALLOW_SERIAL_NUMBER
+
+static char *format_topo =
+/* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd */
+"\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%3s MxCh=%2d\n";
+
+static char *format_string_manufacturer =
+/* S: Manufacturer=xxxx */
+ "S: Manufacturer=%.100s\n";
+
+static char *format_string_product =
+/* S: Product=xxxx */
+ "S: Product=%.100s\n";
+
+#ifdef ALLOW_SERIAL_NUMBER
+static char *format_string_serialnumber =
+/* S: SerialNumber=xxxx */
+ "S: SerialNumber=%.100s\n";
+#endif
+
+static char *format_bandwidth =
+/* B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd */
+ "B: Alloc=%3d/%3d us (%2d%%), #Int=%3d, #Iso=%3d\n";
+
+static char *format_device1 =
+/* D: Ver=xx.xx Cls=xx(sssss) Sub=xx Prot=xx MxPS=dd #Cfgs=dd */
+ "D: Ver=%2x.%02x Cls=%02x(%-5s) Sub=%02x Prot=%02x MxPS=%2d #Cfgs=%3d\n";
+
+static char *format_device2 =
+/* P: Vendor=xxxx ProdID=xxxx Rev=xx.xx */
+ "P: Vendor=%04x ProdID=%04x Rev=%2x.%02x\n";
+
+static char *format_config =
+/* C: #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA */
+ "C:%c #Ifs=%2d Cfg#=%2d Atr=%02x MxPwr=%3dmA\n";
+
+static char *format_iface =
+/* I: If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=xxxx*/
+ "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";
+
+
+/*
+ * Need access to the driver and USB bus lists.
+ * extern struct list_head usb_bus_list;
+ * However, these will come from functions that return ptrs to each of them.
+ */
+
+static DECLARE_WAIT_QUEUE_HEAD(deviceconndiscwq);
+static unsigned int conndiscevcnt = 0;
+
+/* this struct stores the poll state for <mountpoint>/devices pollers */
+struct usb_device_status {
+ unsigned int lastev;
+};
+
+struct class_info {
+ int class;
+ char *class_name;
+};
+
+static const struct class_info clas_info[] =
+{ /* max. 5 chars. per name string */
+ {USB_CLASS_PER_INTERFACE, ">ifc"},
+ {USB_CLASS_AUDIO, "audio"},
+ {USB_CLASS_COMM, "comm."},
+ {USB_CLASS_HID, "HID"},
+ {USB_CLASS_HUB, "hub"},
+ {USB_CLASS_PHYSICAL, "PID"},
+ {USB_CLASS_PRINTER, "print"},
+ {USB_CLASS_MASS_STORAGE, "stor."},
+ {USB_CLASS_CDC_DATA, "data"},
+ {USB_CLASS_APP_SPEC, "app."},
+ {USB_CLASS_VENDOR_SPEC, "vend."},
+ {USB_CLASS_STILL_IMAGE, "still"},
+ {USB_CLASS_CSCID, "scard"},
+ {USB_CLASS_CONTENT_SEC, "c-sec"},
+ {-1, "unk."} /* leave as last */
+};
+
+/*****************************************************************/
+
+void usbfs_conn_disc_event(void)
+{
+ conndiscevcnt++;
+ wake_up(&deviceconndiscwq);
+}
+
+static const char *class_decode(const int class)
+{
+ int ix;
+
+ for (ix = 0; clas_info[ix].class != -1; ix++)
+ if (clas_info[ix].class == class)
+ break;
+ 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 (le16_to_cpu(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,
+ (le16_to_cpu(desc->wMaxPacketSize) & 0x07ff) * bandwidth,
+ interval, unit);
+ return start;
+}
+
+static char *usb_dump_interface_descriptor(char *start, char *end,
+ const struct usb_interface_cache *intfc,
+ const struct usb_interface *iface,
+ int setno)
+{
+ const struct usb_interface_descriptor *desc = &intfc->altsetting[setno].desc;
+ char *driver_name = "";
+
+ if (start > end)
+ return start;
+ down_read(&usb_bus_type.subsys.rwsem);
+ if (iface)
+ driver_name = (iface->dev.driver
+ ? iface->dev.driver->name
+ : "(none)");
+ start += sprintf(start, format_iface,
+ desc->bInterfaceNumber,
+ desc->bAlternateSetting,
+ desc->bNumEndpoints,
+ desc->bInterfaceClass,
+ class_decode(desc->bInterfaceClass),
+ desc->bInterfaceSubClass,
+ desc->bInterfaceProtocol,
+ driver_name);
+ up_read(&usb_bus_type.subsys.rwsem);
+ return start;
+}
+
+static char *usb_dump_interface(
+ int speed,
+ char *start,
+ char *end,
+ const struct usb_interface_cache *intfc,
+ const struct usb_interface *iface,
+ int setno
+) {
+ const struct usb_host_interface *desc = &intfc->altsetting[setno];
+ int i;
+
+ start = usb_dump_interface_descriptor(start, end, intfc, iface, setno);
+ for (i = 0; i < desc->desc.bNumEndpoints; i++) {
+ if (start > end)
+ return start;
+ start = usb_dump_endpoint_descriptor(speed,
+ start, end, &desc->endpoint[i].desc);
+ }
+ return start;
+}
+
+/* TBD:
+ * 0. TBDs
+ * 1. marking active interface altsettings (code lists all, but should mark
+ * which ones are active, if any)
+ */
+
+static char *usb_dump_config_descriptor(char *start, char *end, const struct usb_config_descriptor *desc, int active)
+{
+ if (start > end)
+ return start;
+ start += sprintf(start, format_config,
+ active ? '*' : ' ', /* mark active/actual/current cfg. */
+ desc->bNumInterfaces,
+ desc->bConfigurationValue,
+ desc->bmAttributes,
+ desc->bMaxPower * 2);
+ return start;
+}
+
+static char *usb_dump_config (
+ int speed,
+ char *start,
+ char *end,
+ const struct usb_host_config *config,
+ int active
+)
+{
+ int i, j;
+ struct usb_interface_cache *intfc;
+ struct usb_interface *interface;
+
+ if (start > end)
+ return start;
+ if (!config) /* getting these some in 2.3.7; none in 2.3.6 */
+ return start + sprintf(start, "(null Cfg. desc.)\n");
+ start = usb_dump_config_descriptor(start, end, &config->desc, active);
+ for (i = 0; i < config->desc.bNumInterfaces; i++) {
+ intfc = config->intf_cache[i];
+ interface = config->interface[i];
+ for (j = 0; j < intfc->num_altsetting; j++) {
+ if (start > end)
+ return start;
+ start = usb_dump_interface(speed,
+ start, end, intfc, interface, j);
+ }
+ }
+ return start;
+}
+
+/*
+ * Dump the different USB descriptors.
+ */
+static char *usb_dump_device_descriptor(char *start, char *end, const struct usb_device_descriptor *desc)
+{
+ u16 bcdUSB = le16_to_cpu(desc->bcdUSB);
+ u16 bcdDevice = le16_to_cpu(desc->bcdDevice);
+
+ if (start > end)
+ return start;
+ start += sprintf (start, format_device1,
+ bcdUSB >> 8, bcdUSB & 0xff,
+ desc->bDeviceClass,
+ class_decode (desc->bDeviceClass),
+ desc->bDeviceSubClass,
+ desc->bDeviceProtocol,
+ desc->bMaxPacketSize0,
+ desc->bNumConfigurations);
+ if (start > end)
+ return start;
+ start += sprintf(start, format_device2,
+ le16_to_cpu(desc->idVendor),
+ le16_to_cpu(desc->idProduct),
+ bcdDevice >> 8, bcdDevice & 0xff);
+ return start;
+}
+
+/*
+ * Dump the different strings that this device holds.
+ */
+static char *usb_dump_device_strings (char *start, char *end, struct usb_device *dev)
+{
+ if (start > end)
+ return start;
+ if (dev->manufacturer)
+ start += sprintf(start, format_string_manufacturer, dev->manufacturer);
+ if (start > end)
+ goto out;
+ if (dev->product)
+ start += sprintf(start, format_string_product, dev->product);
+ if (start > end)
+ goto out;
+#ifdef ALLOW_SERIAL_NUMBER
+ if (dev->serial)
+ start += sprintf(start, format_string_serialnumber, dev->serial);
+#endif
+ out:
+ return start;
+}
+
+static char *usb_dump_desc(char *start, char *end, struct usb_device *dev)
+{
+ int i;
+
+ if (start > end)
+ return start;
+
+ start = usb_dump_device_descriptor(start, end, &dev->descriptor);
+
+ if (start > end)
+ return start;
+
+ start = usb_dump_device_strings (start, end, dev);
+
+ 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;
+}
+
+
+#ifdef PROC_EXTRA /* TBD: may want to add this code later */
+
+static char *usb_dump_hub_descriptor(char *start, char *end, const struct usb_hub_descriptor * desc)
+{
+ int leng = USB_DT_HUB_NONVAR_SIZE;
+ unsigned char *ptr = (unsigned char *)desc;
+
+ if (start > end)
+ return start;
+ start += sprintf(start, "Interface:");
+ while (leng && start <= end) {
+ start += sprintf(start, " %02x", *ptr);
+ ptr++; leng--;
+ }
+ *start++ = '\n';
+ return start;
+}
+
+static char *usb_dump_string(char *start, char *end, const struct usb_device *dev, char *id, int index)
+{
+ if (start > end)
+ return start;
+ start += sprintf(start, "Interface:");
+ if (index <= dev->maxstring && dev->stringindex && dev->stringindex[index])
+ start += sprintf(start, "%s: %.100s ", id, dev->stringindex[index]);
+ return start;
+}
+
+#endif /* PROC_EXTRA */
+
+/*****************************************************************/
+
+/* This is a recursive function. Parameters:
+ * buffer - the user-space buffer to write data into
+ * nbytes - the maximum number of bytes to write
+ * skip_bytes - the number of bytes to skip before writing anything
+ * file_offset - the offset into the devices file on completion
+ * The caller must own the device lock.
+ */
+static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes, loff_t *skip_bytes, loff_t *file_offset,
+ struct usb_device *usbdev, struct usb_bus *bus, int level, int index, int count)
+{
+ int chix;
+ int ret, cnt = 0;
+ int parent_devnum = 0;
+ char *pages_start, *data_end, *speed;
+ unsigned int length;
+ ssize_t total_written = 0;
+
+ /* don't bother with anything else if we're not writing any data */
+ if (*nbytes <= 0)
+ return 0;
+
+ if (level > MAX_TOPO_LEVEL)
+ return 0;
+ /* allocate 2^1 pages = 8K (on i386); should be more than enough for one device */
+ if (!(pages_start = (char*) __get_free_pages(GFP_KERNEL,1)))
+ return -ENOMEM;
+
+ if (usbdev->parent && usbdev->parent->devnum != -1)
+ parent_devnum = usbdev->parent->devnum;
+ /*
+ * So the root hub's parent is 0 and any device that is
+ * plugged into the root hub has a parent of 0.
+ */
+ switch (usbdev->speed) {
+ case USB_SPEED_LOW:
+ speed = "1.5"; break;
+ case USB_SPEED_UNKNOWN: /* usb 1.1 root hub code */
+ case USB_SPEED_FULL:
+ speed = "12 "; break;
+ case USB_SPEED_HIGH:
+ speed = "480"; break;
+ default:
+ speed = "?? ";
+ }
+ data_end = pages_start + sprintf(pages_start, format_topo,
+ bus->busnum, level, parent_devnum,
+ index, count, usbdev->devnum,
+ speed, usbdev->maxchild);
+ /*
+ * level = topology-tier level;
+ * parent_devnum = parent device number;
+ * index = parent's connector number;
+ * 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))
+ data_end += sprintf(data_end, "(truncated)\n");
+
+ length = data_end - pages_start;
+ /* if we can start copying some data to the user */
+ if (length > *skip_bytes) {
+ length -= *skip_bytes;
+ if (length > *nbytes)
+ length = *nbytes;
+ if (copy_to_user(*buffer, pages_start + *skip_bytes, length)) {
+ free_pages((unsigned long)pages_start, 1);
+ return -EFAULT;
+ }
+ *nbytes -= length;
+ *file_offset += length;
+ total_written += length;
+ *buffer += length;
+ *skip_bytes = 0;
+ } else
+ *skip_bytes -= length;
+
+ free_pages((unsigned long)pages_start, 1);
+
+ /* Now look at all of this device's children. */
+ for (chix = 0; chix < usbdev->maxchild; chix++) {
+ struct usb_device *childdev = usbdev->children[chix];
+
+ if (childdev) {
+ down(&childdev->serialize);
+ ret = usb_device_dump(buffer, nbytes, skip_bytes, file_offset, childdev,
+ bus, level + 1, chix, ++cnt);
+ up(&childdev->serialize);
+ if (ret == -EFAULT)
+ return total_written;
+ total_written += ret;
+ }
+ }
+ return total_written;
+}
+
+static ssize_t usb_device_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
+{
+ struct usb_bus *bus;
+ ssize_t ret, total_written = 0;
+ loff_t skip_bytes = *ppos;
+
+ if (*ppos < 0)
+ return -EINVAL;
+ if (nbytes <= 0)
+ return 0;
+ if (!access_ok(VERIFY_WRITE, buf, nbytes))
+ return -EFAULT;
+
+ down (&usb_bus_list_lock);
+ /* print devices for all busses */
+ list_for_each_entry(bus, &usb_bus_list, bus_list) {
+ /* recurse through all children of the root hub */
+ if (!bus->root_hub)
+ continue;
+ usb_lock_device(bus->root_hub);
+ ret = usb_device_dump(&buf, &nbytes, &skip_bytes, ppos, bus->root_hub, bus, 0, 0, 0);
+ usb_unlock_device(bus->root_hub);
+ if (ret < 0) {
+ up(&usb_bus_list_lock);
+ return ret;
+ }
+ total_written += ret;
+ }
+ up (&usb_bus_list_lock);
+ return total_written;
+}
+
+/* Kernel lock for "lastev" protection */
+static unsigned int usb_device_poll(struct file *file, struct poll_table_struct *wait)
+{
+ struct usb_device_status *st = (struct usb_device_status *)file->private_data;
+ unsigned int mask = 0;
+
+ lock_kernel();
+ if (!st) {
+ st = kmalloc(sizeof(struct usb_device_status), GFP_KERNEL);
+ if (!st) {
+ unlock_kernel();
+ return POLLIN;
+ }
+
+ /* we may have dropped BKL - need to check for having lost the race */
+ if (file->private_data) {
+ kfree(st);
+ st = file->private_data;
+ goto lost_race;
+ }
+
+ /*
+ * need to prevent the module from being unloaded, since
+ * proc_unregister does not call the release method and
+ * we would have a memory leak
+ */
+ st->lastev = conndiscevcnt;
+ file->private_data = st;
+ mask = POLLIN;
+ }
+lost_race:
+ if (file->f_mode & FMODE_READ)
+ poll_wait(file, &deviceconndiscwq, wait);
+ if (st->lastev != conndiscevcnt)
+ mask |= POLLIN;
+ st->lastev = conndiscevcnt;
+ unlock_kernel();
+ return mask;
+}
+
+static int usb_device_open(struct inode *inode, struct file *file)
+{
+ file->private_data = NULL;
+ return 0;
+}
+
+static int usb_device_release(struct inode *inode, struct file *file)
+{
+ if (file->private_data) {
+ kfree(file->private_data);
+ file->private_data = NULL;
+ }
+
+ return 0;
+}
+
+static loff_t usb_device_lseek(struct file * file, loff_t offset, int orig)
+{
+ loff_t ret;
+
+ lock_kernel();
+
+ switch (orig) {
+ case 0:
+ file->f_pos = offset;
+ ret = file->f_pos;
+ break;
+ case 1:
+ file->f_pos += offset;
+ ret = file->f_pos;
+ break;
+ case 2:
+ default:
+ ret = -EINVAL;
+ }
+
+ unlock_kernel();
+ return ret;
+}
+
+struct file_operations usbfs_devices_fops = {
+ .llseek = usb_device_lseek,
+ .read = usb_device_read,
+ .poll = usb_device_poll,
+ .open = usb_device_open,
+ .release = usb_device_release,
+};
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
new file mode 100644
index 000000000000..a047bc392983
--- /dev/null
+++ b/drivers/usb/core/devio.c
@@ -0,0 +1,1483 @@
+/*****************************************************************************/
+
+/*
+ * devio.c -- User space communication with USB devices.
+ *
+ * Copyright (C) 1999-2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *
+ * 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.
+ *
+ * $Id: devio.c,v 1.7 2000/02/01 17:28:48 fliegl Exp $
+ *
+ * This file implements the usbfs/x/y files, where
+ * x is the bus number and y the device number.
+ *
+ * It allows user space programs/"drivers" to communicate directly
+ * with USB devices without intervening kernel driver.
+ *
+ * Revision history
+ * 22.12.1999 0.1 Initial release (split from proc_usb.c)
+ * 04.01.2000 0.2 Turned into its own filesystem
+ */
+
+/*****************************************************************************/
+
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/signal.h>
+#include <linux/poll.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include <linux/usbdevice_fs.h>
+#include <asm/uaccess.h>
+#include <asm/byteorder.h>
+#include <linux/moduleparam.h>
+
+#include "hcd.h" /* for usbcore internals */
+#include "usb.h"
+
+struct async {
+ struct list_head asynclist;
+ struct dev_state *ps;
+ struct task_struct *task;
+ unsigned int signr;
+ unsigned int ifnum;
+ void __user *userbuffer;
+ void __user *userurb;
+ struct urb *urb;
+};
+
+static int usbfs_snoop = 0;
+module_param (usbfs_snoop, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC (usbfs_snoop, "true to log all usbfs traffic");
+
+#define snoop(dev, format, arg...) \
+ do { \
+ if (usbfs_snoop) \
+ dev_info( dev , format , ## arg); \
+ } while (0)
+
+
+#define MAX_USBFS_BUFFER_SIZE 16384
+
+static inline int connected (struct usb_device *dev)
+{
+ return dev->state != USB_STATE_NOTATTACHED;
+}
+
+static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
+{
+ loff_t ret;
+
+ lock_kernel();
+
+ switch (orig) {
+ case 0:
+ file->f_pos = offset;
+ ret = file->f_pos;
+ break;
+ case 1:
+ file->f_pos += offset;
+ ret = file->f_pos;
+ break;
+ case 2:
+ default:
+ ret = -EINVAL;
+ }
+
+ unlock_kernel();
+ return ret;
+}
+
+static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
+{
+ struct dev_state *ps = (struct dev_state *)file->private_data;
+ struct usb_device *dev = ps->dev;
+ ssize_t ret = 0;
+ unsigned len;
+ loff_t pos;
+ int i;
+
+ pos = *ppos;
+ usb_lock_device(dev);
+ if (!connected(dev)) {
+ ret = -ENODEV;
+ goto err;
+ } else if (pos < 0) {
+ ret = -EINVAL;
+ goto err;
+ }
+
+ if (pos < sizeof(struct usb_device_descriptor)) {
+ struct usb_device_descriptor *desc = kmalloc(sizeof(*desc), GFP_KERNEL);
+ if (!desc) {
+ ret = -ENOMEM;
+ goto err;
+ }
+ memcpy(desc, &dev->descriptor, sizeof(dev->descriptor));
+ le16_to_cpus(&desc->bcdUSB);
+ le16_to_cpus(&desc->idVendor);
+ le16_to_cpus(&desc->idProduct);
+ le16_to_cpus(&desc->bcdDevice);
+
+ len = sizeof(struct usb_device_descriptor) - pos;
+ if (len > nbytes)
+ len = nbytes;
+ if (copy_to_user(buf, ((char *)desc) + pos, len)) {
+ kfree(desc);
+ ret = -EFAULT;
+ goto err;
+ }
+ kfree(desc);
+
+ *ppos += len;
+ buf += len;
+ nbytes -= len;
+ ret += len;
+ }
+
+ pos = sizeof(struct usb_device_descriptor);
+ for (i = 0; nbytes && i < dev->descriptor.bNumConfigurations; i++) {
+ struct usb_config_descriptor *config =
+ (struct usb_config_descriptor *)dev->rawdescriptors[i];
+ unsigned int length = le16_to_cpu(config->wTotalLength);
+
+ if (*ppos < pos + length) {
+
+ /* The descriptor may claim to be longer than it
+ * really is. Here is the actual allocated length. */
+ unsigned alloclen =
+ le16_to_cpu(dev->config[i].desc.wTotalLength);
+
+ len = length - (*ppos - pos);
+ if (len > nbytes)
+ len = nbytes;
+
+ /* Simply don't write (skip over) unallocated parts */
+ if (alloclen > (*ppos - pos)) {
+ alloclen -= (*ppos - pos);
+ if (copy_to_user(buf,
+ dev->rawdescriptors[i] + (*ppos - pos),
+ min(len, alloclen))) {
+ ret = -EFAULT;
+ goto err;
+ }
+ }
+
+ *ppos += len;
+ buf += len;
+ nbytes -= len;
+ ret += len;
+ }
+
+ pos += length;
+ }
+
+err:
+ usb_unlock_device(dev);
+ return ret;
+}
+
+/*
+ * async list handling
+ */
+
+static struct async *alloc_async(unsigned int numisoframes)
+{
+ unsigned int assize = sizeof(struct async) + numisoframes * sizeof(struct usb_iso_packet_descriptor);
+ struct async *as = kmalloc(assize, GFP_KERNEL);
+ if (!as)
+ return NULL;
+ memset(as, 0, assize);
+ as->urb = usb_alloc_urb(numisoframes, GFP_KERNEL);
+ if (!as->urb) {
+ kfree(as);
+ return NULL;
+ }
+ return as;
+}
+
+static void free_async(struct async *as)
+{
+ if (as->urb->transfer_buffer)
+ kfree(as->urb->transfer_buffer);
+ if (as->urb->setup_packet)
+ kfree(as->urb->setup_packet);
+ usb_free_urb(as->urb);
+ kfree(as);
+}
+
+static inline void async_newpending(struct async *as)
+{
+ struct dev_state *ps = as->ps;
+ unsigned long flags;
+
+ spin_lock_irqsave(&ps->lock, flags);
+ list_add_tail(&as->asynclist, &ps->async_pending);
+ spin_unlock_irqrestore(&ps->lock, flags);
+}
+
+static inline void async_removepending(struct async *as)
+{
+ struct dev_state *ps = as->ps;
+ unsigned long flags;
+
+ spin_lock_irqsave(&ps->lock, flags);
+ list_del_init(&as->asynclist);
+ spin_unlock_irqrestore(&ps->lock, flags);
+}
+
+static inline struct async *async_getcompleted(struct dev_state *ps)
+{
+ unsigned long flags;
+ struct async *as = NULL;
+
+ spin_lock_irqsave(&ps->lock, flags);
+ if (!list_empty(&ps->async_completed)) {
+ as = list_entry(ps->async_completed.next, struct async, asynclist);
+ list_del_init(&as->asynclist);
+ }
+ spin_unlock_irqrestore(&ps->lock, flags);
+ return as;
+}
+
+static inline struct async *async_getpending(struct dev_state *ps, void __user *userurb)
+{
+ unsigned long flags;
+ struct async *as;
+
+ spin_lock_irqsave(&ps->lock, flags);
+ list_for_each_entry(as, &ps->async_pending, asynclist)
+ if (as->userurb == userurb) {
+ list_del_init(&as->asynclist);
+ spin_unlock_irqrestore(&ps->lock, flags);
+ return as;
+ }
+ spin_unlock_irqrestore(&ps->lock, flags);
+ return NULL;
+}
+
+static void async_completed(struct urb *urb, struct pt_regs *regs)
+{
+ struct async *as = (struct async *)urb->context;
+ struct dev_state *ps = as->ps;
+ struct siginfo sinfo;
+
+ spin_lock(&ps->lock);
+ list_move_tail(&as->asynclist, &ps->async_completed);
+ spin_unlock(&ps->lock);
+ if (as->signr) {
+ sinfo.si_signo = as->signr;
+ sinfo.si_errno = as->urb->status;
+ sinfo.si_code = SI_ASYNCIO;
+ sinfo.si_addr = as->userurb;
+ send_sig_info(as->signr, &sinfo, as->task);
+ }
+ wake_up(&ps->wait);
+}
+
+static void destroy_async (struct dev_state *ps, struct list_head *list)
+{
+ struct async *as;
+ unsigned long flags;
+
+ spin_lock_irqsave(&ps->lock, flags);
+ while (!list_empty(list)) {
+ as = list_entry(list->next, struct async, asynclist);
+ list_del_init(&as->asynclist);
+
+ /* drop the spinlock so the completion handler can run */
+ spin_unlock_irqrestore(&ps->lock, flags);
+ usb_kill_urb(as->urb);
+ spin_lock_irqsave(&ps->lock, flags);
+ }
+ spin_unlock_irqrestore(&ps->lock, flags);
+ as = async_getcompleted(ps);
+ while (as) {
+ free_async(as);
+ as = async_getcompleted(ps);
+ }
+}
+
+static void destroy_async_on_interface (struct dev_state *ps, unsigned int ifnum)
+{
+ struct list_head *p, *q, hitlist;
+ unsigned long flags;
+
+ INIT_LIST_HEAD(&hitlist);
+ spin_lock_irqsave(&ps->lock, flags);
+ list_for_each_safe(p, q, &ps->async_pending)
+ if (ifnum == list_entry(p, struct async, asynclist)->ifnum)
+ list_move_tail(p, &hitlist);
+ spin_unlock_irqrestore(&ps->lock, flags);
+ destroy_async(ps, &hitlist);
+}
+
+static inline void destroy_all_async(struct dev_state *ps)
+{
+ destroy_async(ps, &ps->async_pending);
+}
+
+/*
+ * 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 int driver_probe (struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ return -ENODEV;
+}
+
+static void driver_disconnect(struct usb_interface *intf)
+{
+ struct dev_state *ps = usb_get_intfdata (intf);
+ unsigned int ifnum = intf->altsetting->desc.bInterfaceNumber;
+
+ if (!ps)
+ return;
+
+ /* NOTE: this relies on usbcore having canceled and completed
+ * all pending I/O requests; 2.6 does that.
+ */
+
+ if (likely(ifnum < 8*sizeof(ps->ifclaimed)))
+ clear_bit(ifnum, &ps->ifclaimed);
+ else
+ warn("interface number %u out of range", ifnum);
+
+ usb_set_intfdata (intf, NULL);
+
+ /* force async requests to complete */
+ destroy_async_on_interface(ps, ifnum);
+}
+
+struct usb_driver usbfs_driver = {
+ .owner = THIS_MODULE,
+ .name = "usbfs",
+ .probe = driver_probe,
+ .disconnect = driver_disconnect,
+};
+
+static int claimintf(struct dev_state *ps, unsigned int ifnum)
+{
+ struct usb_device *dev = ps->dev;
+ struct usb_interface *intf;
+ int err;
+
+ if (ifnum >= 8*sizeof(ps->ifclaimed))
+ return -EINVAL;
+ /* already claimed */
+ if (test_bit(ifnum, &ps->ifclaimed))
+ return 0;
+
+ /* lock against other changes to driver bindings */
+ down_write(&usb_bus_type.subsys.rwsem);
+ intf = usb_ifnum_to_if(dev, ifnum);
+ if (!intf)
+ err = -ENOENT;
+ else
+ err = usb_driver_claim_interface(&usbfs_driver, intf, ps);
+ up_write(&usb_bus_type.subsys.rwsem);
+ if (err == 0)
+ set_bit(ifnum, &ps->ifclaimed);
+ return err;
+}
+
+static int releaseintf(struct dev_state *ps, unsigned int ifnum)
+{
+ struct usb_device *dev;
+ struct usb_interface *intf;
+ int err;
+
+ err = -EINVAL;
+ if (ifnum >= 8*sizeof(ps->ifclaimed))
+ return err;
+ dev = ps->dev;
+ /* lock against other changes to driver bindings */
+ down_write(&usb_bus_type.subsys.rwsem);
+ intf = usb_ifnum_to_if(dev, ifnum);
+ if (!intf)
+ err = -ENOENT;
+ else if (test_and_clear_bit(ifnum, &ps->ifclaimed)) {
+ usb_driver_release_interface(&usbfs_driver, intf);
+ err = 0;
+ }
+ up_write(&usb_bus_type.subsys.rwsem);
+ return err;
+}
+
+static int checkintf(struct dev_state *ps, unsigned int ifnum)
+{
+ if (ps->dev->state != USB_STATE_CONFIGURED)
+ return -EHOSTUNREACH;
+ if (ifnum >= 8*sizeof(ps->ifclaimed))
+ return -EINVAL;
+ if (test_bit(ifnum, &ps->ifclaimed))
+ return 0;
+ /* if not yet claimed, claim it for the driver */
+ dev_warn(&ps->dev->dev, "usbfs: process %d (%s) did not claim interface %u before use\n",
+ current->pid, current->comm, ifnum);
+ return claimintf(ps, ifnum);
+}
+
+static int findintfep(struct usb_device *dev, unsigned int ep)
+{
+ unsigned int i, j, e;
+ struct usb_interface *intf;
+ struct usb_host_interface *alts;
+ struct usb_endpoint_descriptor *endpt;
+
+ if (ep & ~(USB_DIR_IN|0xf))
+ return -EINVAL;
+ if (!dev->actconfig)
+ return -ESRCH;
+ for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
+ intf = dev->actconfig->interface[i];
+ for (j = 0; j < intf->num_altsetting; j++) {
+ alts = &intf->altsetting[j];
+ for (e = 0; e < alts->desc.bNumEndpoints; e++) {
+ endpt = &alts->endpoint[e].desc;
+ if (endpt->bEndpointAddress == ep)
+ return alts->desc.bInterfaceNumber;
+ }
+ }
+ }
+ return -ENOENT;
+}
+
+static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype, unsigned int index)
+{
+ int ret = 0;
+
+ if (ps->dev->state != USB_STATE_CONFIGURED)
+ return -EHOSTUNREACH;
+ if (USB_TYPE_VENDOR == (USB_TYPE_MASK & requesttype))
+ return 0;
+
+ index &= 0xff;
+ switch (requesttype & USB_RECIP_MASK) {
+ case USB_RECIP_ENDPOINT:
+ if ((ret = findintfep(ps->dev, index)) >= 0)
+ ret = checkintf(ps, ret);
+ break;
+
+ case USB_RECIP_INTERFACE:
+ ret = checkintf(ps, index);
+ break;
+ }
+ return ret;
+}
+
+/*
+ * file operations
+ */
+static int usbdev_open(struct inode *inode, struct file *file)
+{
+ struct usb_device *dev;
+ struct dev_state *ps;
+ int ret;
+
+ /*
+ * no locking necessary here, as chrdev_open has the kernel lock
+ * (still acquire the kernel lock for safety)
+ */
+ ret = -ENOMEM;
+ if (!(ps = kmalloc(sizeof(struct dev_state), GFP_KERNEL)))
+ goto out_nolock;
+
+ lock_kernel();
+ ret = -ENOENT;
+ dev = usb_get_dev(inode->u.generic_ip);
+ if (!dev) {
+ kfree(ps);
+ goto out;
+ }
+ ret = 0;
+ ps->dev = dev;
+ ps->file = file;
+ spin_lock_init(&ps->lock);
+ INIT_LIST_HEAD(&ps->async_pending);
+ INIT_LIST_HEAD(&ps->async_completed);
+ init_waitqueue_head(&ps->wait);
+ ps->discsignr = 0;
+ ps->disctask = current;
+ ps->disccontext = NULL;
+ ps->ifclaimed = 0;
+ wmb();
+ list_add_tail(&ps->list, &dev->filelist);
+ file->private_data = ps;
+ out:
+ unlock_kernel();
+ out_nolock:
+ return ret;
+}
+
+static int usbdev_release(struct inode *inode, struct file *file)
+{
+ struct dev_state *ps = (struct dev_state *)file->private_data;
+ struct usb_device *dev = ps->dev;
+ unsigned int ifnum;
+
+ usb_lock_device(dev);
+ list_del_init(&ps->list);
+ for (ifnum = 0; ps->ifclaimed && ifnum < 8*sizeof(ps->ifclaimed);
+ ifnum++) {
+ if (test_bit(ifnum, &ps->ifclaimed))
+ releaseintf(ps, ifnum);
+ }
+ destroy_all_async(ps);
+ usb_unlock_device(dev);
+ usb_put_dev(dev);
+ ps->dev = NULL;
+ kfree(ps);
+ return 0;
+}
+
+static int proc_control(struct dev_state *ps, void __user *arg)
+{
+ struct usb_device *dev = ps->dev;
+ struct usbdevfs_ctrltransfer ctrl;
+ unsigned int tmo;
+ unsigned char *tbuf;
+ int i, j, ret;
+
+ if (copy_from_user(&ctrl, arg, sizeof(ctrl)))
+ return -EFAULT;
+ if ((ret = check_ctrlrecip(ps, ctrl.bRequestType, ctrl.wIndex)))
+ return ret;
+ if (ctrl.wLength > PAGE_SIZE)
+ return -EINVAL;
+ if (!(tbuf = (unsigned char *)__get_free_page(GFP_KERNEL)))
+ return -ENOMEM;
+ tmo = ctrl.timeout;
+ if (ctrl.bRequestType & 0x80) {
+ if (ctrl.wLength && !access_ok(VERIFY_WRITE, ctrl.data, ctrl.wLength)) {
+ free_page((unsigned long)tbuf);
+ return -EINVAL;
+ }
+ snoop(&dev->dev, "control read: bRequest=%02x bRrequestType=%02x wValue=%04x wIndex=%04x\n",
+ ctrl.bRequest, ctrl.bRequestType, ctrl.wValue, ctrl.wIndex);
+
+ usb_unlock_device(dev);
+ i = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), ctrl.bRequest, ctrl.bRequestType,
+ ctrl.wValue, ctrl.wIndex, tbuf, ctrl.wLength, tmo);
+ usb_lock_device(dev);
+ if ((i > 0) && ctrl.wLength) {
+ if (usbfs_snoop) {
+ dev_info(&dev->dev, "control read: data ");
+ for (j = 0; j < ctrl.wLength; ++j)
+ printk ("%02x ", (unsigned char)(tbuf)[j]);
+ printk("\n");
+ }
+ if (copy_to_user(ctrl.data, tbuf, ctrl.wLength)) {
+ free_page((unsigned long)tbuf);
+ return -EFAULT;
+ }
+ }
+ } else {
+ if (ctrl.wLength) {
+ if (copy_from_user(tbuf, ctrl.data, ctrl.wLength)) {
+ free_page((unsigned long)tbuf);
+ return -EFAULT;
+ }
+ }
+ snoop(&dev->dev, "control write: bRequest=%02x bRrequestType=%02x wValue=%04x wIndex=%04x\n",
+ ctrl.bRequest, ctrl.bRequestType, ctrl.wValue, ctrl.wIndex);
+ if (usbfs_snoop) {
+ dev_info(&dev->dev, "control write: data: ");
+ for (j = 0; j < ctrl.wLength; ++j)
+ printk ("%02x ", (unsigned char)(tbuf)[j]);
+ printk("\n");
+ }
+ usb_unlock_device(dev);
+ i = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ctrl.bRequest, ctrl.bRequestType,
+ ctrl.wValue, ctrl.wIndex, tbuf, ctrl.wLength, tmo);
+ usb_lock_device(dev);
+ }
+ free_page((unsigned long)tbuf);
+ if (i<0 && i != -EPIPE) {
+ dev_printk(KERN_DEBUG, &dev->dev, "usbfs: USBDEVFS_CONTROL "
+ "failed cmd %s rqt %u rq %u len %u ret %d\n",
+ current->comm, ctrl.bRequestType, ctrl.bRequest,
+ ctrl.wLength, i);
+ }
+ return i;
+}
+
+static int proc_bulk(struct dev_state *ps, void __user *arg)
+{
+ struct usb_device *dev = ps->dev;
+ struct usbdevfs_bulktransfer bulk;
+ unsigned int tmo, len1, pipe;
+ int len2;
+ unsigned char *tbuf;
+ int i, ret;
+
+ if (copy_from_user(&bulk, arg, sizeof(bulk)))
+ return -EFAULT;
+ if ((ret = findintfep(ps->dev, bulk.ep)) < 0)
+ return ret;
+ if ((ret = checkintf(ps, ret)))
+ return ret;
+ if (bulk.ep & USB_DIR_IN)
+ pipe = usb_rcvbulkpipe(dev, bulk.ep & 0x7f);
+ else
+ pipe = usb_sndbulkpipe(dev, bulk.ep & 0x7f);
+ if (!usb_maxpacket(dev, pipe, !(bulk.ep & USB_DIR_IN)))
+ return -EINVAL;
+ len1 = bulk.len;
+ if (len1 > MAX_USBFS_BUFFER_SIZE)
+ return -EINVAL;
+ if (!(tbuf = kmalloc(len1, GFP_KERNEL)))
+ return -ENOMEM;
+ tmo = bulk.timeout;
+ if (bulk.ep & 0x80) {
+ if (len1 && !access_ok(VERIFY_WRITE, bulk.data, len1)) {
+ kfree(tbuf);
+ return -EINVAL;
+ }
+ usb_unlock_device(dev);
+ i = usb_bulk_msg(dev, pipe, tbuf, len1, &len2, tmo);
+ usb_lock_device(dev);
+ if (!i && len2) {
+ if (copy_to_user(bulk.data, tbuf, len2)) {
+ kfree(tbuf);
+ return -EFAULT;
+ }
+ }
+ } else {
+ if (len1) {
+ if (copy_from_user(tbuf, bulk.data, len1)) {
+ kfree(tbuf);
+ return -EFAULT;
+ }
+ }
+ usb_unlock_device(dev);
+ i = usb_bulk_msg(dev, pipe, tbuf, len1, &len2, tmo);
+ usb_lock_device(dev);
+ }
+ kfree(tbuf);
+ if (i < 0)
+ return i;
+ return len2;
+}
+
+static int proc_resetep(struct dev_state *ps, void __user *arg)
+{
+ unsigned int ep;
+ int ret;
+
+ if (get_user(ep, (unsigned int __user *)arg))
+ return -EFAULT;
+ if ((ret = findintfep(ps->dev, ep)) < 0)
+ return ret;
+ if ((ret = checkintf(ps, ret)))
+ return ret;
+ usb_settoggle(ps->dev, ep & 0xf, !(ep & USB_DIR_IN), 0);
+ return 0;
+}
+
+static int proc_clearhalt(struct dev_state *ps, void __user *arg)
+{
+ unsigned int ep;
+ int pipe;
+ int ret;
+
+ if (get_user(ep, (unsigned int __user *)arg))
+ return -EFAULT;
+ if ((ret = findintfep(ps->dev, ep)) < 0)
+ return ret;
+ if ((ret = checkintf(ps, ret)))
+ return ret;
+ if (ep & USB_DIR_IN)
+ pipe = usb_rcvbulkpipe(ps->dev, ep & 0x7f);
+ else
+ pipe = usb_sndbulkpipe(ps->dev, ep & 0x7f);
+
+ return usb_clear_halt(ps->dev, pipe);
+}
+
+
+static int proc_getdriver(struct dev_state *ps, void __user *arg)
+{
+ struct usbdevfs_getdriver gd;
+ struct usb_interface *intf;
+ int ret;
+
+ if (copy_from_user(&gd, arg, sizeof(gd)))
+ return -EFAULT;
+ down_read(&usb_bus_type.subsys.rwsem);
+ intf = usb_ifnum_to_if(ps->dev, gd.interface);
+ if (!intf || !intf->dev.driver)
+ ret = -ENODATA;
+ else {
+ strncpy(gd.driver, intf->dev.driver->name,
+ sizeof(gd.driver));
+ ret = (copy_to_user(arg, &gd, sizeof(gd)) ? -EFAULT : 0);
+ }
+ up_read(&usb_bus_type.subsys.rwsem);
+ return ret;
+}
+
+static int proc_connectinfo(struct dev_state *ps, void __user *arg)
+{
+ struct usbdevfs_connectinfo ci;
+
+ ci.devnum = ps->dev->devnum;
+ ci.slow = ps->dev->speed == USB_SPEED_LOW;
+ if (copy_to_user(arg, &ci, sizeof(ci)))
+ return -EFAULT;
+ return 0;
+}
+
+static int proc_resetdevice(struct dev_state *ps)
+{
+ return usb_reset_device(ps->dev);
+
+}
+
+static int proc_setintf(struct dev_state *ps, void __user *arg)
+{
+ struct usbdevfs_setinterface setintf;
+ int ret;
+
+ if (copy_from_user(&setintf, arg, sizeof(setintf)))
+ return -EFAULT;
+ if ((ret = checkintf(ps, setintf.interface)))
+ return ret;
+ return usb_set_interface(ps->dev, setintf.interface,
+ setintf.altsetting);
+}
+
+static int proc_setconfig(struct dev_state *ps, void __user *arg)
+{
+ unsigned int u;
+ int status = 0;
+ struct usb_host_config *actconfig;
+
+ if (get_user(u, (unsigned int __user *)arg))
+ return -EFAULT;
+
+ actconfig = ps->dev->actconfig;
+
+ /* Don't touch the device if any interfaces are claimed.
+ * It could interfere with other drivers' operations, and if
+ * an interface is claimed by usbfs it could easily deadlock.
+ */
+ if (actconfig) {
+ int i;
+
+ for (i = 0; i < actconfig->desc.bNumInterfaces; ++i) {
+ if (usb_interface_claimed(actconfig->interface[i])) {
+ dev_warn (&ps->dev->dev,
+ "usbfs: interface %d claimed "
+ "while '%s' sets config #%d\n",
+ actconfig->interface[i]
+ ->cur_altsetting
+ ->desc.bInterfaceNumber,
+ current->comm, u);
+#if 0 /* FIXME: enable in 2.6.10 or so */
+ status = -EBUSY;
+ break;
+#endif
+ }
+ }
+ }
+
+ /* SET_CONFIGURATION is often abused as a "cheap" driver reset,
+ * so avoid usb_set_configuration()'s kick to sysfs
+ */
+ if (status == 0) {
+ if (actconfig && actconfig->desc.bConfigurationValue == u)
+ status = usb_reset_configuration(ps->dev);
+ else
+ status = usb_set_configuration(ps->dev, u);
+ }
+
+ return status;
+}
+
+
+static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb,
+ struct usbdevfs_iso_packet_desc __user *iso_frame_desc,
+ void __user *arg)
+{
+ struct usbdevfs_iso_packet_desc *isopkt = NULL;
+ struct usb_host_endpoint *ep;
+ struct async *as;
+ struct usb_ctrlrequest *dr = NULL;
+ unsigned int u, totlen, isofrmlen;
+ int ret, interval = 0, ifnum = -1;
+
+ if (uurb->flags & ~(USBDEVFS_URB_ISO_ASAP|USBDEVFS_URB_SHORT_NOT_OK|
+ URB_NO_FSBR|URB_ZERO_PACKET))
+ return -EINVAL;
+ if (!uurb->buffer)
+ return -EINVAL;
+ if (uurb->signr != 0 && (uurb->signr < SIGRTMIN || uurb->signr > SIGRTMAX))
+ return -EINVAL;
+ if (!(uurb->type == USBDEVFS_URB_TYPE_CONTROL && (uurb->endpoint & ~USB_ENDPOINT_DIR_MASK) == 0)) {
+ if ((ifnum = findintfep(ps->dev, uurb->endpoint)) < 0)
+ return ifnum;
+ if ((ret = checkintf(ps, ifnum)))
+ return ret;
+ }
+ if ((uurb->endpoint & USB_ENDPOINT_DIR_MASK) != 0)
+ ep = ps->dev->ep_in [uurb->endpoint & USB_ENDPOINT_NUMBER_MASK];
+ else
+ ep = ps->dev->ep_out [uurb->endpoint & USB_ENDPOINT_NUMBER_MASK];
+ if (!ep)
+ return -ENOENT;
+ switch(uurb->type) {
+ case USBDEVFS_URB_TYPE_CONTROL:
+ if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ != USB_ENDPOINT_XFER_CONTROL)
+ return -EINVAL;
+ /* 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, 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);
+ return -EFAULT;
+ }
+ break;
+
+ case USBDEVFS_URB_TYPE_BULK:
+ switch (ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
+ case USB_ENDPOINT_XFER_CONTROL:
+ case USB_ENDPOINT_XFER_ISOC:
+ return -EINVAL;
+ /* allow single-shot interrupt transfers, at bogus rates */
+ }
+ uurb->number_of_packets = 0;
+ if (uurb->buffer_length > MAX_USBFS_BUFFER_SIZE)
+ return -EINVAL;
+ if (!access_ok((uurb->endpoint & USB_DIR_IN) ? VERIFY_WRITE : VERIFY_READ, uurb->buffer, uurb->buffer_length))
+ return -EFAULT;
+ break;
+
+ case USBDEVFS_URB_TYPE_ISO:
+ /* arbitrary limit */
+ if (uurb->number_of_packets < 1 || uurb->number_of_packets > 128)
+ return -EINVAL;
+ if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ != USB_ENDPOINT_XFER_ISOC)
+ return -EINVAL;
+ interval = 1 << min (15, ep->desc.bInterval - 1);
+ isofrmlen = sizeof(struct usbdevfs_iso_packet_desc) * uurb->number_of_packets;
+ if (!(isopkt = kmalloc(isofrmlen, GFP_KERNEL)))
+ return -ENOMEM;
+ if (copy_from_user(isopkt, iso_frame_desc, isofrmlen)) {
+ kfree(isopkt);
+ return -EFAULT;
+ }
+ for (totlen = u = 0; u < uurb->number_of_packets; u++) {
+ if (isopkt[u].length > 1023) {
+ kfree(isopkt);
+ return -EINVAL;
+ }
+ totlen += isopkt[u].length;
+ }
+ if (totlen > 32768) {
+ kfree(isopkt);
+ return -EINVAL;
+ }
+ uurb->buffer_length = totlen;
+ break;
+
+ case USBDEVFS_URB_TYPE_INTERRUPT:
+ uurb->number_of_packets = 0;
+ if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ != USB_ENDPOINT_XFER_INT)
+ return -EINVAL;
+ if (ps->dev->speed == USB_SPEED_HIGH)
+ interval = 1 << min (15, ep->desc.bInterval - 1);
+ else
+ interval = ep->desc.bInterval;
+ if (uurb->buffer_length > MAX_USBFS_BUFFER_SIZE)
+ return -EINVAL;
+ if (!access_ok((uurb->endpoint & USB_DIR_IN) ? VERIFY_WRITE : VERIFY_READ, uurb->buffer, uurb->buffer_length))
+ return -EFAULT;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+ if (!(as = alloc_async(uurb->number_of_packets))) {
+ if (isopkt)
+ kfree(isopkt);
+ if (dr)
+ kfree(dr);
+ return -ENOMEM;
+ }
+ if (!(as->urb->transfer_buffer = kmalloc(uurb->buffer_length, GFP_KERNEL))) {
+ if (isopkt)
+ kfree(isopkt);
+ if (dr)
+ kfree(dr);
+ free_async(as);
+ return -ENOMEM;
+ }
+ as->urb->dev = ps->dev;
+ as->urb->pipe = (uurb->type << 30) | __create_pipe(ps->dev, uurb->endpoint & 0xf) | (uurb->endpoint & USB_DIR_IN);
+ as->urb->transfer_flags = uurb->flags;
+ as->urb->transfer_buffer_length = uurb->buffer_length;
+ as->urb->setup_packet = (unsigned char*)dr;
+ as->urb->start_frame = uurb->start_frame;
+ as->urb->number_of_packets = uurb->number_of_packets;
+ as->urb->interval = interval;
+ as->urb->context = as;
+ as->urb->complete = async_completed;
+ for (totlen = u = 0; u < uurb->number_of_packets; u++) {
+ as->urb->iso_frame_desc[u].offset = totlen;
+ as->urb->iso_frame_desc[u].length = isopkt[u].length;
+ totlen += isopkt[u].length;
+ }
+ if (isopkt)
+ kfree(isopkt);
+ as->ps = ps;
+ as->userurb = arg;
+ if (uurb->endpoint & USB_DIR_IN)
+ as->userbuffer = uurb->buffer;
+ else
+ as->userbuffer = NULL;
+ as->signr = uurb->signr;
+ as->ifnum = ifnum;
+ as->task = current;
+ if (!(uurb->endpoint & USB_DIR_IN)) {
+ if (copy_from_user(as->urb->transfer_buffer, uurb->buffer, as->urb->transfer_buffer_length)) {
+ free_async(as);
+ return -EFAULT;
+ }
+ }
+ async_newpending(as);
+ if ((ret = usb_submit_urb(as->urb, GFP_KERNEL))) {
+ dev_printk(KERN_DEBUG, &ps->dev->dev, "usbfs: usb_submit_urb returned %d\n", ret);
+ async_removepending(as);
+ free_async(as);
+ return ret;
+ }
+ return 0;
+}
+
+static int proc_submiturb(struct dev_state *ps, void __user *arg)
+{
+ struct usbdevfs_urb uurb;
+
+ if (copy_from_user(&uurb, arg, sizeof(uurb)))
+ return -EFAULT;
+
+ return proc_do_submiturb(ps, &uurb, (((struct usbdevfs_urb __user *)arg)->iso_frame_desc), arg);
+}
+
+static int proc_unlinkurb(struct dev_state *ps, void __user *arg)
+{
+ struct async *as;
+
+ as = async_getpending(ps, arg);
+ if (!as)
+ return -EINVAL;
+ usb_kill_urb(as->urb);
+ return 0;
+}
+
+static int processcompl(struct async *as, void __user * __user *arg)
+{
+ struct urb *urb = as->urb;
+ struct usbdevfs_urb __user *userurb = as->userurb;
+ void __user *addr = as->userurb;
+ unsigned int i;
+
+ if (as->userbuffer)
+ if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length))
+ return -EFAULT;
+ if (put_user(urb->status, &userurb->status))
+ return -EFAULT;
+ if (put_user(urb->actual_length, &userurb->actual_length))
+ return -EFAULT;
+ if (put_user(urb->error_count, &userurb->error_count))
+ return -EFAULT;
+
+ if (!(usb_pipeisoc(urb->pipe)))
+ return 0;
+ for (i = 0; i < urb->number_of_packets; i++) {
+ if (put_user(urb->iso_frame_desc[i].actual_length,
+ &userurb->iso_frame_desc[i].actual_length))
+ return -EFAULT;
+ if (put_user(urb->iso_frame_desc[i].status,
+ &userurb->iso_frame_desc[i].status))
+ return -EFAULT;
+ }
+
+ free_async(as);
+
+ if (put_user(addr, (void __user * __user *)arg))
+ return -EFAULT;
+ return 0;
+}
+
+static struct async* reap_as(struct dev_state *ps)
+{
+ DECLARE_WAITQUEUE(wait, current);
+ struct async *as = NULL;
+ struct usb_device *dev = ps->dev;
+
+ add_wait_queue(&ps->wait, &wait);
+ for (;;) {
+ __set_current_state(TASK_INTERRUPTIBLE);
+ if ((as = async_getcompleted(ps)))
+ break;
+ if (signal_pending(current))
+ break;
+ usb_unlock_device(dev);
+ schedule();
+ usb_lock_device(dev);
+ }
+ remove_wait_queue(&ps->wait, &wait);
+ set_current_state(TASK_RUNNING);
+ return as;
+}
+
+static int proc_reapurb(struct dev_state *ps, void __user *arg)
+{
+ struct async *as = reap_as(ps);
+ if (as)
+ return processcompl(as, (void __user * __user *)arg);
+ if (signal_pending(current))
+ return -EINTR;
+ return -EIO;
+}
+
+static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg)
+{
+ struct async *as;
+
+ if (!(as = async_getcompleted(ps)))
+ return -EAGAIN;
+ return processcompl(as, (void __user * __user *)arg);
+}
+
+#ifdef CONFIG_COMPAT
+
+static int get_urb32(struct usbdevfs_urb *kurb,
+ struct usbdevfs_urb32 __user *uurb)
+{
+ __u32 uptr;
+ if (get_user(kurb->type, &uurb->type) ||
+ __get_user(kurb->endpoint, &uurb->endpoint) ||
+ __get_user(kurb->status, &uurb->status) ||
+ __get_user(kurb->flags, &uurb->flags) ||
+ __get_user(kurb->buffer_length, &uurb->buffer_length) ||
+ __get_user(kurb->actual_length, &uurb->actual_length) ||
+ __get_user(kurb->start_frame, &uurb->start_frame) ||
+ __get_user(kurb->number_of_packets, &uurb->number_of_packets) ||
+ __get_user(kurb->error_count, &uurb->error_count) ||
+ __get_user(kurb->signr, &uurb->signr))
+ return -EFAULT;
+
+ if (__get_user(uptr, &uurb->buffer))
+ return -EFAULT;
+ kurb->buffer = compat_ptr(uptr);
+ if (__get_user(uptr, &uurb->buffer))
+ return -EFAULT;
+ kurb->usercontext = compat_ptr(uptr);
+
+ return 0;
+}
+
+static int proc_submiturb_compat(struct dev_state *ps, void __user *arg)
+{
+ struct usbdevfs_urb uurb;
+
+ if (get_urb32(&uurb,(struct usbdevfs_urb32 *)arg))
+ return -EFAULT;
+
+ return proc_do_submiturb(ps, &uurb, ((struct usbdevfs_urb __user *)arg)->iso_frame_desc, arg);
+}
+
+static int processcompl_compat(struct async *as, void __user * __user *arg)
+{
+ struct urb *urb = as->urb;
+ struct usbdevfs_urb32 __user *userurb = as->userurb;
+ void __user *addr = as->userurb;
+ unsigned int i;
+
+ if (as->userbuffer)
+ if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length))
+ return -EFAULT;
+ if (put_user(urb->status, &userurb->status))
+ return -EFAULT;
+ if (put_user(urb->actual_length, &userurb->actual_length))
+ return -EFAULT;
+ if (put_user(urb->error_count, &userurb->error_count))
+ return -EFAULT;
+
+ if (!(usb_pipeisoc(urb->pipe)))
+ return 0;
+ for (i = 0; i < urb->number_of_packets; i++) {
+ if (put_user(urb->iso_frame_desc[i].actual_length,
+ &userurb->iso_frame_desc[i].actual_length))
+ return -EFAULT;
+ if (put_user(urb->iso_frame_desc[i].status,
+ &userurb->iso_frame_desc[i].status))
+ return -EFAULT;
+ }
+
+ free_async(as);
+ if (put_user((u32)(u64)addr, (u32 __user *)arg))
+ return -EFAULT;
+ return 0;
+}
+
+static int proc_reapurb_compat(struct dev_state *ps, void __user *arg)
+{
+ struct async *as = reap_as(ps);
+ if (as)
+ return processcompl_compat(as, (void __user * __user *)arg);
+ if (signal_pending(current))
+ return -EINTR;
+ return -EIO;
+}
+
+static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg)
+{
+ struct async *as;
+
+ printk("reapurbnblock\n");
+ if (!(as = async_getcompleted(ps)))
+ return -EAGAIN;
+ printk("reap got as %p\n", as);
+ return processcompl_compat(as, (void __user * __user *)arg);
+}
+
+#endif
+
+static int proc_disconnectsignal(struct dev_state *ps, void __user *arg)
+{
+ struct usbdevfs_disconnectsignal ds;
+
+ if (copy_from_user(&ds, arg, sizeof(ds)))
+ return -EFAULT;
+ if (ds.signr != 0 && (ds.signr < SIGRTMIN || ds.signr > SIGRTMAX))
+ return -EINVAL;
+ ps->discsignr = ds.signr;
+ ps->disccontext = ds.context;
+ return 0;
+}
+
+static int proc_claiminterface(struct dev_state *ps, void __user *arg)
+{
+ unsigned int ifnum;
+
+ if (get_user(ifnum, (unsigned int __user *)arg))
+ return -EFAULT;
+ return claimintf(ps, ifnum);
+}
+
+static int proc_releaseinterface(struct dev_state *ps, void __user *arg)
+{
+ unsigned int ifnum;
+ int ret;
+
+ if (get_user(ifnum, (unsigned int __user *)arg))
+ return -EFAULT;
+ if ((ret = releaseintf(ps, ifnum)) < 0)
+ return ret;
+ destroy_async_on_interface (ps, ifnum);
+ return 0;
+}
+
+static int proc_ioctl (struct dev_state *ps, void __user *arg)
+{
+ struct usbdevfs_ioctl ctrl;
+ int size;
+ void *buf = NULL;
+ int retval = 0;
+ struct usb_interface *intf = NULL;
+ struct usb_driver *driver = NULL;
+ int i;
+
+ /* get input parameters and alloc buffer */
+ if (copy_from_user(&ctrl, arg, sizeof (ctrl)))
+ return -EFAULT;
+ if ((size = _IOC_SIZE (ctrl.ioctl_code)) > 0) {
+ if ((buf = kmalloc (size, GFP_KERNEL)) == NULL)
+ return -ENOMEM;
+ if ((_IOC_DIR(ctrl.ioctl_code) & _IOC_WRITE)) {
+ if (copy_from_user (buf, ctrl.data, size)) {
+ kfree (buf);
+ return -EFAULT;
+ }
+ } else {
+ memset (buf, 0, size);
+ }
+ }
+
+ if (!connected(ps->dev)) {
+ if (buf)
+ kfree(buf);
+ return -ENODEV;
+ }
+
+ if (ps->dev->state != USB_STATE_CONFIGURED)
+ retval = -EHOSTUNREACH;
+ else if (!(intf = usb_ifnum_to_if (ps->dev, ctrl.ifno)))
+ retval = -EINVAL;
+ else switch (ctrl.ioctl_code) {
+
+ /* disconnect kernel driver from interface */
+ case USBDEVFS_DISCONNECT:
+
+ /* don't allow the user to unbind the hub driver from
+ * a hub with children to manage */
+ for (i = 0; i < ps->dev->maxchild; ++i) {
+ if (ps->dev->children[i])
+ retval = -EBUSY;
+ }
+ if (retval)
+ break;
+
+ down_write(&usb_bus_type.subsys.rwsem);
+ if (intf->dev.driver) {
+ driver = to_usb_driver(intf->dev.driver);
+ dev_dbg (&intf->dev, "disconnect by usbfs\n");
+ usb_driver_release_interface(driver, intf);
+ } else
+ retval = -ENODATA;
+ up_write(&usb_bus_type.subsys.rwsem);
+ break;
+
+ /* let kernel drivers try to (re)bind to the interface */
+ case USBDEVFS_CONNECT:
+ usb_unlock_device(ps->dev);
+ usb_lock_all_devices();
+ bus_rescan_devices(intf->dev.bus);
+ usb_unlock_all_devices();
+ usb_lock_device(ps->dev);
+ break;
+
+ /* talk directly to the interface's driver */
+ default:
+ down_read(&usb_bus_type.subsys.rwsem);
+ if (intf->dev.driver)
+ driver = to_usb_driver(intf->dev.driver);
+ if (driver == NULL || driver->ioctl == NULL) {
+ retval = -ENOTTY;
+ } else {
+ retval = driver->ioctl (intf, ctrl.ioctl_code, buf);
+ if (retval == -ENOIOCTLCMD)
+ retval = -ENOTTY;
+ }
+ up_read(&usb_bus_type.subsys.rwsem);
+ }
+
+ /* cleanup and return */
+ if (retval >= 0
+ && (_IOC_DIR (ctrl.ioctl_code) & _IOC_READ) != 0
+ && size > 0
+ && copy_to_user (ctrl.data, buf, size) != 0)
+ retval = -EFAULT;
+ if (buf != NULL)
+ kfree (buf);
+ return retval;
+}
+
+/*
+ * NOTE: All requests here that have interface numbers as parameters
+ * are assuming that somehow the configuration has been prevented from
+ * changing. But there's no mechanism to ensure that...
+ */
+static int usbdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct dev_state *ps = (struct dev_state *)file->private_data;
+ struct usb_device *dev = ps->dev;
+ void __user *p = (void __user *)arg;
+ int ret = -ENOTTY;
+
+ if (!(file->f_mode & FMODE_WRITE))
+ return -EPERM;
+ usb_lock_device(dev);
+ if (!connected(dev)) {
+ usb_unlock_device(dev);
+ return -ENODEV;
+ }
+
+ switch (cmd) {
+ case USBDEVFS_CONTROL:
+ snoop(&dev->dev, "%s: CONTROL\n", __FUNCTION__);
+ ret = proc_control(ps, p);
+ if (ret >= 0)
+ inode->i_mtime = CURRENT_TIME;
+ break;
+
+ case USBDEVFS_BULK:
+ snoop(&dev->dev, "%s: BULK\n", __FUNCTION__);
+ ret = proc_bulk(ps, p);
+ if (ret >= 0)
+ inode->i_mtime = CURRENT_TIME;
+ break;
+
+ case USBDEVFS_RESETEP:
+ snoop(&dev->dev, "%s: RESETEP\n", __FUNCTION__);
+ ret = proc_resetep(ps, p);
+ if (ret >= 0)
+ inode->i_mtime = CURRENT_TIME;
+ break;
+
+ case USBDEVFS_RESET:
+ snoop(&dev->dev, "%s: RESET\n", __FUNCTION__);
+ ret = proc_resetdevice(ps);
+ break;
+
+ case USBDEVFS_CLEAR_HALT:
+ snoop(&dev->dev, "%s: CLEAR_HALT\n", __FUNCTION__);
+ ret = proc_clearhalt(ps, p);
+ if (ret >= 0)
+ inode->i_mtime = CURRENT_TIME;
+ break;
+
+ case USBDEVFS_GETDRIVER:
+ snoop(&dev->dev, "%s: GETDRIVER\n", __FUNCTION__);
+ ret = proc_getdriver(ps, p);
+ break;
+
+ case USBDEVFS_CONNECTINFO:
+ snoop(&dev->dev, "%s: CONNECTINFO\n", __FUNCTION__);
+ ret = proc_connectinfo(ps, p);
+ break;
+
+ case USBDEVFS_SETINTERFACE:
+ snoop(&dev->dev, "%s: SETINTERFACE\n", __FUNCTION__);
+ ret = proc_setintf(ps, p);
+ break;
+
+ case USBDEVFS_SETCONFIGURATION:
+ snoop(&dev->dev, "%s: SETCONFIGURATION\n", __FUNCTION__);
+ ret = proc_setconfig(ps, p);
+ break;
+
+ case USBDEVFS_SUBMITURB:
+ snoop(&dev->dev, "%s: SUBMITURB\n", __FUNCTION__);
+ ret = proc_submiturb(ps, p);
+ if (ret >= 0)
+ inode->i_mtime = CURRENT_TIME;
+ break;
+
+#ifdef CONFIG_COMPAT
+
+ case USBDEVFS_SUBMITURB32:
+ snoop(&dev->dev, "%s: SUBMITURB32\n", __FUNCTION__);
+ ret = proc_submiturb_compat(ps, p);
+ if (ret >= 0)
+ inode->i_mtime = CURRENT_TIME;
+ break;
+
+ case USBDEVFS_REAPURB32:
+ snoop(&dev->dev, "%s: REAPURB32\n", __FUNCTION__);
+ ret = proc_reapurb_compat(ps, p);
+ break;
+
+ case USBDEVFS_REAPURBNDELAY32:
+ snoop(&dev->dev, "%s: REAPURBDELAY32\n", __FUNCTION__);
+ ret = proc_reapurbnonblock_compat(ps, p);
+ break;
+
+#endif
+
+ case USBDEVFS_DISCARDURB:
+ snoop(&dev->dev, "%s: DISCARDURB\n", __FUNCTION__);
+ ret = proc_unlinkurb(ps, p);
+ break;
+
+ case USBDEVFS_REAPURB:
+ snoop(&dev->dev, "%s: REAPURB\n", __FUNCTION__);
+ ret = proc_reapurb(ps, p);
+ break;
+
+ case USBDEVFS_REAPURBNDELAY:
+ snoop(&dev->dev, "%s: REAPURBDELAY\n", __FUNCTION__);
+ ret = proc_reapurbnonblock(ps, p);
+ break;
+
+ case USBDEVFS_DISCSIGNAL:
+ snoop(&dev->dev, "%s: DISCSIGNAL\n", __FUNCTION__);
+ ret = proc_disconnectsignal(ps, p);
+ break;
+
+ case USBDEVFS_CLAIMINTERFACE:
+ snoop(&dev->dev, "%s: CLAIMINTERFACE\n", __FUNCTION__);
+ ret = proc_claiminterface(ps, p);
+ break;
+
+ case USBDEVFS_RELEASEINTERFACE:
+ snoop(&dev->dev, "%s: RELEASEINTERFACE\n", __FUNCTION__);
+ ret = proc_releaseinterface(ps, p);
+ break;
+
+ case USBDEVFS_IOCTL:
+ snoop(&dev->dev, "%s: IOCTL\n", __FUNCTION__);
+ ret = proc_ioctl(ps, p);
+ break;
+ }
+ usb_unlock_device(dev);
+ if (ret >= 0)
+ inode->i_atime = CURRENT_TIME;
+ return ret;
+}
+
+/* No kernel lock - fine */
+static unsigned int usbdev_poll(struct file *file, struct poll_table_struct *wait)
+{
+ struct dev_state *ps = (struct dev_state *)file->private_data;
+ unsigned int mask = 0;
+
+ poll_wait(file, &ps->wait, wait);
+ if (file->f_mode & FMODE_WRITE && !list_empty(&ps->async_completed))
+ mask |= POLLOUT | POLLWRNORM;
+ if (!connected(ps->dev))
+ mask |= POLLERR | POLLHUP;
+ return mask;
+}
+
+struct file_operations usbfs_device_file_operations = {
+ .llseek = usbdev_lseek,
+ .read = usbdev_read,
+ .poll = usbdev_poll,
+ .ioctl = usbdev_ioctl,
+ .open = usbdev_open,
+ .release = usbdev_release,
+};
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
new file mode 100644
index 000000000000..80ce9644d0ee
--- /dev/null
+++ b/drivers/usb/core/file.c
@@ -0,0 +1,227 @@
+/*
+ * drivers/usb/file.c
+ *
+ * (C) Copyright Linus Torvalds 1999
+ * (C) Copyright Johannes Erdfelt 1999-2001
+ * (C) Copyright Andreas Gal 1999
+ * (C) Copyright Gregory P. Smith 1999
+ * (C) Copyright Deti Fliegl 1999 (new USB architecture)
+ * (C) Copyright Randy Dunlap 2000
+ * (C) Copyright David Brownell 2000-2001 (kernel hotplug, usb_device_id,
+ more docs, etc)
+ * (C) Copyright Yggdrasil Computing, Inc. 2000
+ * (usb_device_id matching changes by Adam J. Richter)
+ * (C) Copyright Greg Kroah-Hartman 2002-2003
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/devfs_fs_kernel.h>
+#include <linux/spinlock.h>
+#include <linux/errno.h>
+
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+#include <linux/usb.h>
+
+#define MAX_USB_MINORS 256
+static struct file_operations *usb_minors[MAX_USB_MINORS];
+static DEFINE_SPINLOCK(minor_lock);
+
+static int usb_open(struct inode * inode, struct file * file)
+{
+ int minor = iminor(inode);
+ struct file_operations *c;
+ int err = -ENODEV;
+ struct file_operations *old_fops, *new_fops = NULL;
+
+ spin_lock (&minor_lock);
+ c = usb_minors[minor];
+
+ if (!c || !(new_fops = fops_get(c))) {
+ spin_unlock(&minor_lock);
+ return err;
+ }
+ spin_unlock(&minor_lock);
+
+ old_fops = file->f_op;
+ file->f_op = new_fops;
+ /* Curiouser and curiouser... NULL ->open() as "no device" ? */
+ if (file->f_op->open)
+ err = file->f_op->open(inode,file);
+ if (err) {
+ fops_put(file->f_op);
+ file->f_op = fops_get(old_fops);
+ }
+ fops_put(old_fops);
+ return err;
+}
+
+static struct file_operations usb_fops = {
+ .owner = THIS_MODULE,
+ .open = usb_open,
+};
+
+static struct class_simple *usb_class;
+
+int usb_major_init(void)
+{
+ int error;
+
+ error = register_chrdev(USB_MAJOR, "usb", &usb_fops);
+ if (error) {
+ err("unable to get major %d for usb devices", USB_MAJOR);
+ goto out;
+ }
+
+ usb_class = class_simple_create(THIS_MODULE, "usb");
+ if (IS_ERR(usb_class)) {
+ err("class_simple_create failed for usb devices");
+ unregister_chrdev(USB_MAJOR, "usb");
+ goto out;
+ }
+
+ devfs_mk_dir("usb");
+
+out:
+ return error;
+}
+
+void usb_major_cleanup(void)
+{
+ class_simple_destroy(usb_class);
+ devfs_remove("usb");
+ unregister_chrdev(USB_MAJOR, "usb");
+}
+
+/**
+ * usb_register_dev - register a USB device, and ask for a minor number
+ * @intf: pointer to the usb_interface that is being registered
+ * @class_driver: pointer to the usb_class_driver for this device
+ *
+ * This should be called by all USB drivers that use the USB major number.
+ * If CONFIG_USB_DYNAMIC_MINORS is enabled, the minor number will be
+ * dynamically allocated out of the list of available ones. If it is not
+ * enabled, the minor number will be based on the next available free minor,
+ * starting at the class_driver->minor_base.
+ *
+ * This function also creates the devfs file for the usb device, if devfs
+ * is enabled, and creates a usb class device in the sysfs tree.
+ *
+ * usb_deregister_dev() must be called when the driver is done with
+ * the minor numbers given out by this function.
+ *
+ * Returns -EINVAL if something bad happens with trying to register a
+ * device, and 0 on success.
+ */
+int usb_register_dev(struct usb_interface *intf,
+ struct usb_class_driver *class_driver)
+{
+ int retval = -EINVAL;
+ int minor_base = class_driver->minor_base;
+ int minor = 0;
+ char name[BUS_ID_SIZE];
+ char *temp;
+
+#ifdef CONFIG_USB_DYNAMIC_MINORS
+ /*
+ * We don't care what the device tries to start at, we want to start
+ * at zero to pack the devices into the smallest available space with
+ * no holes in the minor range.
+ */
+ minor_base = 0;
+#endif
+ intf->minor = -1;
+
+ dbg ("looking for a minor, starting at %d", minor_base);
+
+ if (class_driver->fops == NULL)
+ goto exit;
+
+ spin_lock (&minor_lock);
+ for (minor = minor_base; minor < MAX_USB_MINORS; ++minor) {
+ if (usb_minors[minor])
+ continue;
+
+ usb_minors[minor] = class_driver->fops;
+
+ retval = 0;
+ break;
+ }
+ spin_unlock (&minor_lock);
+
+ if (retval)
+ goto exit;
+
+ intf->minor = minor;
+
+ /* handle the devfs registration */
+ snprintf(name, BUS_ID_SIZE, class_driver->name, minor - minor_base);
+ devfs_mk_cdev(MKDEV(USB_MAJOR, minor), class_driver->mode, name);
+
+ /* create a usb class device for this usb interface */
+ temp = strrchr(name, '/');
+ if (temp && (temp[1] != 0x00))
+ ++temp;
+ else
+ temp = name;
+ intf->class_dev = class_simple_device_add(usb_class, MKDEV(USB_MAJOR, minor), &intf->dev, "%s", temp);
+ if (IS_ERR(intf->class_dev)) {
+ spin_lock (&minor_lock);
+ usb_minors[intf->minor] = NULL;
+ spin_unlock (&minor_lock);
+ devfs_remove (name);
+ retval = PTR_ERR(intf->class_dev);
+ }
+exit:
+ return retval;
+}
+EXPORT_SYMBOL(usb_register_dev);
+
+/**
+ * usb_deregister_dev - deregister a USB device's dynamic minor.
+ * @intf: pointer to the usb_interface that is being deregistered
+ * @class_driver: pointer to the usb_class_driver for this device
+ *
+ * Used in conjunction with usb_register_dev(). This function is called
+ * when the USB driver is finished with the minor numbers gotten from a
+ * call to usb_register_dev() (usually when the device is disconnected
+ * from the system.)
+ *
+ * This function also cleans up the devfs file for the usb device, if devfs
+ * is enabled, and removes the usb class device from the sysfs tree.
+ *
+ * This should be called by all drivers that use the USB major number.
+ */
+void usb_deregister_dev(struct usb_interface *intf,
+ struct usb_class_driver *class_driver)
+{
+ int minor_base = class_driver->minor_base;
+ char name[BUS_ID_SIZE];
+
+#ifdef CONFIG_USB_DYNAMIC_MINORS
+ minor_base = 0;
+#endif
+
+ if (intf->minor == -1)
+ return;
+
+ dbg ("removing %d minor", intf->minor);
+
+ spin_lock (&minor_lock);
+ usb_minors[intf->minor] = NULL;
+ spin_unlock (&minor_lock);
+
+ snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base);
+ devfs_remove (name);
+ class_simple_device_remove(MKDEV(USB_MAJOR, intf->minor));
+ intf->class_dev = NULL;
+ intf->minor = -1;
+}
+EXPORT_SYMBOL(usb_deregister_dev);
+
+
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
new file mode 100644
index 000000000000..b9a3dae07036
--- /dev/null
+++ b/drivers/usb/core/hcd-pci.c
@@ -0,0 +1,358 @@
+/*
+ * (C) Copyright David Brownell 2000-2002
+ *
+ * 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.
+ */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <linux/usb.h>
+#include "hcd.h"
+
+
+/* PCI-based HCs are normal, but custom bus glue should be ok */
+
+
+/*-------------------------------------------------------------------------*/
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+/**
+ * usb_hcd_pci_probe - initialize PCI-based HCDs
+ * @dev: USB Host Controller being probed
+ * @id: pci hotplug id connecting controller to HCD framework
+ * Context: !in_interrupt()
+ *
+ * Allocates basic PCI resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ * Store this function in the HCD's struct pci_driver as probe().
+ */
+int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
+{
+ struct hc_driver *driver;
+ struct usb_hcd *hcd;
+ int retval;
+
+ if (usb_disabled())
+ return -ENODEV;
+
+ if (!id || !(driver = (struct hc_driver *) id->driver_data))
+ return -EINVAL;
+
+ if (pci_enable_device (dev) < 0)
+ return -ENODEV;
+ dev->current_state = 0;
+ dev->dev.power.power_state = 0;
+
+ if (!dev->irq) {
+ dev_err (&dev->dev,
+ "Found HC with no IRQ. Check BIOS/PCI %s setup!\n",
+ pci_name(dev));
+ retval = -ENODEV;
+ goto err1;
+ }
+
+ hcd = usb_create_hcd (driver, &dev->dev, pci_name(dev));
+ if (!hcd) {
+ retval = -ENOMEM;
+ goto err1;
+ }
+
+ if (driver->flags & HCD_MEMORY) { // EHCI, OHCI
+ hcd->rsrc_start = pci_resource_start (dev, 0);
+ hcd->rsrc_len = pci_resource_len (dev, 0);
+ if (!request_mem_region (hcd->rsrc_start, hcd->rsrc_len,
+ driver->description)) {
+ dev_dbg (&dev->dev, "controller already in use\n");
+ retval = -EBUSY;
+ goto err2;
+ }
+ hcd->regs = ioremap_nocache (hcd->rsrc_start, hcd->rsrc_len);
+ if (hcd->regs == NULL) {
+ dev_dbg (&dev->dev, "error mapping memory\n");
+ retval = -EFAULT;
+ goto err3;
+ }
+
+ } else { // UHCI
+ int region;
+
+ for (region = 0; region < PCI_ROM_RESOURCE; region++) {
+ if (!(pci_resource_flags (dev, region) &
+ IORESOURCE_IO))
+ continue;
+
+ hcd->rsrc_start = pci_resource_start (dev, region);
+ hcd->rsrc_len = pci_resource_len (dev, region);
+ if (request_region (hcd->rsrc_start, hcd->rsrc_len,
+ driver->description))
+ break;
+ }
+ if (region == PCI_ROM_RESOURCE) {
+ dev_dbg (&dev->dev, "no i/o regions available\n");
+ retval = -EBUSY;
+ goto err1;
+ }
+ }
+
+#ifdef CONFIG_PCI_NAMES
+ hcd->product_desc = dev->pretty_name;
+#endif
+
+ pci_set_master (dev);
+
+ retval = usb_add_hcd (hcd, dev->irq, SA_SHIRQ);
+ if (retval != 0)
+ goto err4;
+ return retval;
+
+ err4:
+ if (driver->flags & HCD_MEMORY) {
+ iounmap (hcd->regs);
+ err3:
+ release_mem_region (hcd->rsrc_start, hcd->rsrc_len);
+ } else
+ release_region (hcd->rsrc_start, hcd->rsrc_len);
+ err2:
+ usb_put_hcd (hcd);
+ err1:
+ pci_disable_device (dev);
+ dev_err (&dev->dev, "init %s fail, %d\n", pci_name(dev), retval);
+ return retval;
+}
+EXPORT_SYMBOL (usb_hcd_pci_probe);
+
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_pci_remove - shutdown processing for PCI-based HCDs
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_pci_probe(), first invoking
+ * the HCD's stop() method. It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ * Store this function in the HCD's struct pci_driver as remove().
+ */
+void usb_hcd_pci_remove (struct pci_dev *dev)
+{
+ struct usb_hcd *hcd;
+
+ hcd = pci_get_drvdata(dev);
+ if (!hcd)
+ return;
+
+ usb_remove_hcd (hcd);
+ if (hcd->driver->flags & HCD_MEMORY) {
+ iounmap (hcd->regs);
+ release_mem_region (hcd->rsrc_start, hcd->rsrc_len);
+ } else {
+ release_region (hcd->rsrc_start, hcd->rsrc_len);
+ }
+ usb_put_hcd (hcd);
+ pci_disable_device(dev);
+}
+EXPORT_SYMBOL (usb_hcd_pci_remove);
+
+
+#ifdef CONFIG_PM
+
+static char __attribute_used__ *pci_state(u32 state)
+{
+ switch (state) {
+ case 0: return "D0";
+ case 1: return "D1";
+ case 2: return "D2";
+ case 3: return "D3hot";
+ case 4: return "D3cold";
+ }
+ return NULL;
+}
+
+/**
+ * usb_hcd_pci_suspend - power management suspend of a PCI-based HCD
+ * @dev: USB Host Controller being suspended
+ * @state: state that the controller is going into
+ *
+ * Store this function in the HCD's struct pci_driver as suspend().
+ */
+int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state)
+{
+ struct usb_hcd *hcd;
+ int retval = 0;
+ int has_pci_pm;
+
+ hcd = pci_get_drvdata(dev);
+
+ /* even when the PCI layer rejects some of the PCI calls
+ * below, HCs can try global suspend and reduce DMA traffic.
+ * PM-sensitive HCDs may already have done this.
+ */
+ has_pci_pm = pci_find_capability(dev, PCI_CAP_ID_PM);
+ if (state > 4)
+ state = 4;
+
+ switch (hcd->state) {
+
+ /* entry if root hub wasn't yet suspended ... from sysfs,
+ * without autosuspend, or if USB_SUSPEND isn't configured.
+ */
+ case HC_STATE_RUNNING:
+ hcd->state = HC_STATE_QUIESCING;
+ retval = hcd->driver->suspend (hcd, state);
+ if (retval) {
+ dev_dbg (hcd->self.controller,
+ "suspend fail, retval %d\n",
+ retval);
+ break;
+ }
+ hcd->state = HC_STATE_SUSPENDED;
+ /* FALLTHROUGH */
+
+ /* entry with CONFIG_USB_SUSPEND, or hcds that autosuspend: the
+ * controller and/or root hub will already have been suspended,
+ * but it won't be ready for a PCI resume call.
+ *
+ * FIXME only CONFIG_USB_SUSPEND guarantees hub_suspend() will
+ * have been called, otherwise root hub timers still run ...
+ */
+ case HC_STATE_SUSPENDED:
+ if (state <= dev->current_state)
+ break;
+
+ /* no DMA or IRQs except in D0 */
+ if (!dev->current_state) {
+ pci_save_state (dev);
+ pci_disable_device (dev);
+ free_irq (hcd->irq, hcd);
+ }
+
+ if (!has_pci_pm) {
+ dev_dbg (hcd->self.controller, "--> PCI D0/legacy\n");
+ break;
+ }
+
+ /* POLICY: ignore D1/D2/D3hot differences;
+ * we know D3hot will always work.
+ */
+ retval = pci_set_power_state (dev, state);
+ if (retval < 0 && state < 3) {
+ retval = pci_set_power_state (dev, 3);
+ if (retval == 0)
+ state = 3;
+ }
+ if (retval == 0) {
+ dev_dbg (hcd->self.controller, "--> PCI %s\n",
+ pci_state(dev->current_state));
+#ifdef CONFIG_USB_SUSPEND
+ pci_enable_wake (dev, state, hcd->remote_wakeup);
+ pci_enable_wake (dev, 4, hcd->remote_wakeup);
+#endif
+ } else if (retval < 0) {
+ dev_dbg (&dev->dev, "PCI %s suspend fail, %d\n",
+ pci_state(state), retval);
+ (void) usb_hcd_pci_resume (dev);
+ break;
+ }
+ break;
+ default:
+ dev_dbg (hcd->self.controller, "hcd state %d; not suspended\n",
+ hcd->state);
+ retval = -EINVAL;
+ break;
+ }
+
+ /* update power_state **ONLY** to make sysfs happier */
+ if (retval == 0)
+ dev->dev.power.power_state = state;
+ return retval;
+}
+EXPORT_SYMBOL (usb_hcd_pci_suspend);
+
+/**
+ * usb_hcd_pci_resume - power management resume of a PCI-based HCD
+ * @dev: USB Host Controller being resumed
+ *
+ * Store this function in the HCD's struct pci_driver as resume().
+ */
+int usb_hcd_pci_resume (struct pci_dev *dev)
+{
+ struct usb_hcd *hcd;
+ int retval;
+ int has_pci_pm;
+
+ hcd = pci_get_drvdata(dev);
+ if (hcd->state != HC_STATE_SUSPENDED) {
+ dev_dbg (hcd->self.controller,
+ "can't resume, not suspended!\n");
+ return 0;
+ }
+ has_pci_pm = pci_find_capability(dev, PCI_CAP_ID_PM);
+
+ /* D3cold resume isn't usually reported this way... */
+ dev_dbg(hcd->self.controller, "resume from PCI %s%s\n",
+ pci_state(dev->current_state),
+ has_pci_pm ? "" : " (legacy)");
+
+ hcd->state = HC_STATE_RESUMING;
+
+ if (has_pci_pm)
+ pci_set_power_state (dev, 0);
+ dev->dev.power.power_state = 0;
+ retval = request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ,
+ hcd->driver->description, hcd);
+ if (retval < 0) {
+ dev_err (hcd->self.controller,
+ "can't restore IRQ after resume!\n");
+ return retval;
+ }
+ hcd->saw_irq = 0;
+ pci_restore_state (dev);
+#ifdef CONFIG_USB_SUSPEND
+ pci_enable_wake (dev, dev->current_state, 0);
+ pci_enable_wake (dev, 4, 0);
+#endif
+
+ retval = hcd->driver->resume (hcd);
+ if (!HC_IS_RUNNING (hcd->state)) {
+ dev_dbg (hcd->self.controller,
+ "resume fail, retval %d\n", retval);
+ usb_hc_died (hcd);
+ }
+
+ return retval;
+}
+EXPORT_SYMBOL (usb_hcd_pci_resume);
+
+#endif /* CONFIG_PM */
+
+
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
new file mode 100644
index 000000000000..266e9e06a9f5
--- /dev/null
+++ b/drivers/usb/core/hcd.c
@@ -0,0 +1,1840 @@
+/*
+ * (C) Copyright Linus Torvalds 1999
+ * (C) Copyright Johannes Erdfelt 1999-2001
+ * (C) Copyright Andreas Gal 1999
+ * (C) Copyright Gregory P. Smith 1999
+ * (C) Copyright Deti Fliegl 1999
+ * (C) Copyright Randy Dunlap 2000
+ * (C) Copyright David Brownell 2000-2002
+ *
+ * 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.
+ */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_USB_DEBUG
+#define DEBUG
+#endif
+
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/completion.h>
+#include <linux/utsname.h>
+#include <linux/mm.h>
+#include <asm/io.h>
+#include <asm/scatterlist.h>
+#include <linux/device.h>
+#include <linux/dma-mapping.h>
+#include <asm/irq.h>
+#include <asm/byteorder.h>
+
+#include <linux/usb.h>
+
+#include "usb.h"
+#include "hcd.h"
+#include "hub.h"
+
+
+// #define USB_BANDWIDTH_MESSAGES
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * USB Host Controller Driver framework
+ *
+ * Plugs into usbcore (usb_bus) and lets HCDs share code, minimizing
+ * HCD-specific behaviors/bugs.
+ *
+ * This does error checks, tracks devices and urbs, and delegates to a
+ * "hc_driver" only for code (and data) that really needs to know about
+ * hardware differences. That includes root hub registers, i/o queues,
+ * and so on ... but as little else as possible.
+ *
+ * Shared code includes most of the "root hub" code (these are emulated,
+ * though each HC's hardware works differently) and PCI glue, plus request
+ * tracking overhead. The HCD code should only block on spinlocks or on
+ * hardware handshaking; blocking on software events (such as other kernel
+ * threads releasing resources, or completing actions) is all generic.
+ *
+ * Happens the USB 2.0 spec says this would be invisible inside the "USBD",
+ * and includes mostly a "HCDI" (HCD Interface) along with some APIs used
+ * only by the hub driver ... and that neither should be seen or used by
+ * usb client device drivers.
+ *
+ * Contributors of ideas or unattributed patches include: David Brownell,
+ * Roman Weissgaerber, Rory Bolt, Greg Kroah-Hartman, ...
+ *
+ * HISTORY:
+ * 2002-02-21 Pull in most of the usb_bus support from usb.c; some
+ * associated cleanup. "usb_hcd" still != "usb_bus".
+ * 2001-12-12 Initial patch version for Linux 2.5.1 kernel.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+/* host controllers we manage */
+LIST_HEAD (usb_bus_list);
+EXPORT_SYMBOL_GPL (usb_bus_list);
+
+/* used when allocating bus numbers */
+#define USB_MAXBUS 64
+struct usb_busmap {
+ unsigned long busmap [USB_MAXBUS / (8*sizeof (unsigned long))];
+};
+static struct usb_busmap busmap;
+
+/* used when updating list of hcds */
+DECLARE_MUTEX (usb_bus_list_lock); /* exported only for usbfs */
+EXPORT_SYMBOL_GPL (usb_bus_list_lock);
+
+/* used for controlling access to virtual root hubs */
+static DEFINE_SPINLOCK(hcd_root_hub_lock);
+
+/* used when updating hcd data */
+static DEFINE_SPINLOCK(hcd_data_lock);
+
+/* wait queue for synchronous unlinks */
+DECLARE_WAIT_QUEUE_HEAD(usb_kill_urb_queue);
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Sharable chunks of root hub code.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+#define KERNEL_REL ((LINUX_VERSION_CODE >> 16) & 0x0ff)
+#define KERNEL_VER ((LINUX_VERSION_CODE >> 8) & 0x0ff)
+
+/* usb 2.0 root hub device descriptor */
+static const u8 usb2_rh_dev_descriptor [18] = {
+ 0x12, /* __u8 bLength; */
+ 0x01, /* __u8 bDescriptorType; Device */
+ 0x00, 0x02, /* __le16 bcdUSB; v2.0 */
+
+ 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */
+ 0x00, /* __u8 bDeviceSubClass; */
+ 0x01, /* __u8 bDeviceProtocol; [ usb 2.0 single TT ]*/
+ 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */
+
+ 0x00, 0x00, /* __le16 idVendor; */
+ 0x00, 0x00, /* __le16 idProduct; */
+ KERNEL_VER, KERNEL_REL, /* __le16 bcdDevice */
+
+ 0x03, /* __u8 iManufacturer; */
+ 0x02, /* __u8 iProduct; */
+ 0x01, /* __u8 iSerialNumber; */
+ 0x01 /* __u8 bNumConfigurations; */
+};
+
+/* no usb 2.0 root hub "device qualifier" descriptor: one speed only */
+
+/* usb 1.1 root hub device descriptor */
+static const u8 usb11_rh_dev_descriptor [18] = {
+ 0x12, /* __u8 bLength; */
+ 0x01, /* __u8 bDescriptorType; Device */
+ 0x10, 0x01, /* __le16 bcdUSB; v1.1 */
+
+ 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */
+ 0x00, /* __u8 bDeviceSubClass; */
+ 0x00, /* __u8 bDeviceProtocol; [ low/full speeds only ] */
+ 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */
+
+ 0x00, 0x00, /* __le16 idVendor; */
+ 0x00, 0x00, /* __le16 idProduct; */
+ KERNEL_VER, KERNEL_REL, /* __le16 bcdDevice */
+
+ 0x03, /* __u8 iManufacturer; */
+ 0x02, /* __u8 iProduct; */
+ 0x01, /* __u8 iSerialNumber; */
+ 0x01 /* __u8 bNumConfigurations; */
+};
+
+
+/*-------------------------------------------------------------------------*/
+
+/* Configuration descriptors for our root hubs */
+
+static const u8 fs_rh_config_descriptor [] = {
+
+ /* one configuration */
+ 0x09, /* __u8 bLength; */
+ 0x02, /* __u8 bDescriptorType; Configuration */
+ 0x19, 0x00, /* __le16 wTotalLength; */
+ 0x01, /* __u8 bNumInterfaces; (1) */
+ 0x01, /* __u8 bConfigurationValue; */
+ 0x00, /* __u8 iConfiguration; */
+ 0xc0, /* __u8 bmAttributes;
+ Bit 7: must be set,
+ 6: Self-powered,
+ 5: Remote wakeup,
+ 4..0: resvd */
+ 0x00, /* __u8 MaxPower; */
+
+ /* USB 1.1:
+ * USB 2.0, single TT organization (mandatory):
+ * one interface, protocol 0
+ *
+ * USB 2.0, multiple TT organization (optional):
+ * two interfaces, protocols 1 (like single TT)
+ * and 2 (multiple TT mode) ... config is
+ * sometimes settable
+ * NOT IMPLEMENTED
+ */
+
+ /* one interface */
+ 0x09, /* __u8 if_bLength; */
+ 0x04, /* __u8 if_bDescriptorType; Interface */
+ 0x00, /* __u8 if_bInterfaceNumber; */
+ 0x00, /* __u8 if_bAlternateSetting; */
+ 0x01, /* __u8 if_bNumEndpoints; */
+ 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */
+ 0x00, /* __u8 if_bInterfaceSubClass; */
+ 0x00, /* __u8 if_bInterfaceProtocol; [usb1.1 or single tt] */
+ 0x00, /* __u8 if_iInterface; */
+
+ /* one endpoint (status change endpoint) */
+ 0x07, /* __u8 ep_bLength; */
+ 0x05, /* __u8 ep_bDescriptorType; Endpoint */
+ 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */
+ 0x03, /* __u8 ep_bmAttributes; Interrupt */
+ 0x02, 0x00, /* __le16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */
+ 0xff /* __u8 ep_bInterval; (255ms -- usb 2.0 spec) */
+};
+
+static const u8 hs_rh_config_descriptor [] = {
+
+ /* one configuration */
+ 0x09, /* __u8 bLength; */
+ 0x02, /* __u8 bDescriptorType; Configuration */
+ 0x19, 0x00, /* __le16 wTotalLength; */
+ 0x01, /* __u8 bNumInterfaces; (1) */
+ 0x01, /* __u8 bConfigurationValue; */
+ 0x00, /* __u8 iConfiguration; */
+ 0xc0, /* __u8 bmAttributes;
+ Bit 7: must be set,
+ 6: Self-powered,
+ 5: Remote wakeup,
+ 4..0: resvd */
+ 0x00, /* __u8 MaxPower; */
+
+ /* USB 1.1:
+ * USB 2.0, single TT organization (mandatory):
+ * one interface, protocol 0
+ *
+ * USB 2.0, multiple TT organization (optional):
+ * two interfaces, protocols 1 (like single TT)
+ * and 2 (multiple TT mode) ... config is
+ * sometimes settable
+ * NOT IMPLEMENTED
+ */
+
+ /* one interface */
+ 0x09, /* __u8 if_bLength; */
+ 0x04, /* __u8 if_bDescriptorType; Interface */
+ 0x00, /* __u8 if_bInterfaceNumber; */
+ 0x00, /* __u8 if_bAlternateSetting; */
+ 0x01, /* __u8 if_bNumEndpoints; */
+ 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */
+ 0x00, /* __u8 if_bInterfaceSubClass; */
+ 0x00, /* __u8 if_bInterfaceProtocol; [usb1.1 or single tt] */
+ 0x00, /* __u8 if_iInterface; */
+
+ /* one endpoint (status change endpoint) */
+ 0x07, /* __u8 ep_bLength; */
+ 0x05, /* __u8 ep_bDescriptorType; Endpoint */
+ 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */
+ 0x03, /* __u8 ep_bmAttributes; Interrupt */
+ 0x02, 0x00, /* __le16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */
+ 0x0c /* __u8 ep_bInterval; (256ms -- usb 2.0 spec) */
+};
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * helper routine for returning string descriptors in UTF-16LE
+ * input can actually be ISO-8859-1; ASCII is its 7-bit subset
+ */
+static int ascii2utf (char *s, u8 *utf, int utfmax)
+{
+ int retval;
+
+ for (retval = 0; *s && utfmax > 1; utfmax -= 2, retval += 2) {
+ *utf++ = *s++;
+ *utf++ = 0;
+ }
+ if (utfmax > 0) {
+ *utf = *s;
+ ++retval;
+ }
+ return retval;
+}
+
+/*
+ * rh_string - provides manufacturer, product and serial strings for root hub
+ * @id: the string ID number (1: serial number, 2: product, 3: vendor)
+ * @hcd: the host controller for this root hub
+ * @type: string describing our driver
+ * @data: return packet in UTF-16 LE
+ * @len: length of the return packet
+ *
+ * Produces either a manufacturer, product or serial number string for the
+ * virtual root hub device.
+ */
+static int rh_string (
+ int id,
+ struct usb_hcd *hcd,
+ u8 *data,
+ int len
+) {
+ char buf [100];
+
+ // language ids
+ if (id == 0) {
+ buf[0] = 4; buf[1] = 3; /* 4 bytes string data */
+ buf[2] = 0x09; buf[3] = 0x04; /* MSFT-speak for "en-us" */
+ len = min (len, 4);
+ memcpy (data, buf, len);
+ return len;
+
+ // serial number
+ } else if (id == 1) {
+ strlcpy (buf, hcd->self.bus_name, sizeof buf);
+
+ // product description
+ } else if (id == 2) {
+ strlcpy (buf, hcd->product_desc, sizeof buf);
+
+ // id 3 == vendor description
+ } else if (id == 3) {
+ snprintf (buf, sizeof buf, "%s %s %s", system_utsname.sysname,
+ system_utsname.release, hcd->driver->description);
+
+ // unsupported IDs --> "protocol stall"
+ } else
+ return -EPIPE;
+
+ switch (len) { /* All cases fall through */
+ default:
+ len = 2 + ascii2utf (buf, data + 2, len - 2);
+ case 2:
+ data [1] = 3; /* type == string */
+ case 1:
+ data [0] = 2 * (strlen (buf) + 1);
+ case 0:
+ ; /* Compiler wants a statement here */
+ }
+ return len;
+}
+
+
+/* Root hub control transfers execute synchronously */
+static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
+{
+ struct usb_ctrlrequest *cmd;
+ u16 typeReq, wValue, wIndex, wLength;
+ u8 *ubuf = urb->transfer_buffer;
+ u8 tbuf [sizeof (struct usb_hub_descriptor)];
+ const u8 *bufp = tbuf;
+ int len = 0;
+ int patch_wakeup = 0;
+ unsigned long flags;
+ int status = 0;
+ int n;
+
+ cmd = (struct usb_ctrlrequest *) urb->setup_packet;
+ typeReq = (cmd->bRequestType << 8) | cmd->bRequest;
+ wValue = le16_to_cpu (cmd->wValue);
+ wIndex = le16_to_cpu (cmd->wIndex);
+ wLength = le16_to_cpu (cmd->wLength);
+
+ if (wLength > urb->transfer_buffer_length)
+ goto error;
+
+ urb->actual_length = 0;
+ switch (typeReq) {
+
+ /* DEVICE REQUESTS */
+
+ case DeviceRequest | USB_REQ_GET_STATUS:
+ tbuf [0] = (hcd->remote_wakeup << USB_DEVICE_REMOTE_WAKEUP)
+ | (1 << USB_DEVICE_SELF_POWERED);
+ tbuf [1] = 0;
+ len = 2;
+ break;
+ case DeviceOutRequest | USB_REQ_CLEAR_FEATURE:
+ if (wValue == USB_DEVICE_REMOTE_WAKEUP)
+ hcd->remote_wakeup = 0;
+ else
+ goto error;
+ break;
+ case DeviceOutRequest | USB_REQ_SET_FEATURE:
+ if (hcd->can_wakeup && wValue == USB_DEVICE_REMOTE_WAKEUP)
+ hcd->remote_wakeup = 1;
+ else
+ goto error;
+ break;
+ case DeviceRequest | USB_REQ_GET_CONFIGURATION:
+ tbuf [0] = 1;
+ len = 1;
+ /* FALLTHROUGH */
+ case DeviceOutRequest | USB_REQ_SET_CONFIGURATION:
+ break;
+ case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
+ switch (wValue & 0xff00) {
+ case USB_DT_DEVICE << 8:
+ if (hcd->driver->flags & HCD_USB2)
+ bufp = usb2_rh_dev_descriptor;
+ else if (hcd->driver->flags & HCD_USB11)
+ bufp = usb11_rh_dev_descriptor;
+ else
+ goto error;
+ len = 18;
+ break;
+ case USB_DT_CONFIG << 8:
+ if (hcd->driver->flags & HCD_USB2) {
+ bufp = hs_rh_config_descriptor;
+ len = sizeof hs_rh_config_descriptor;
+ } else {
+ bufp = fs_rh_config_descriptor;
+ len = sizeof fs_rh_config_descriptor;
+ }
+ if (hcd->can_wakeup)
+ patch_wakeup = 1;
+ break;
+ case USB_DT_STRING << 8:
+ n = rh_string (wValue & 0xff, hcd, ubuf, wLength);
+ if (n < 0)
+ goto error;
+ urb->actual_length = n;
+ break;
+ default:
+ goto error;
+ }
+ break;
+ case DeviceRequest | USB_REQ_GET_INTERFACE:
+ tbuf [0] = 0;
+ len = 1;
+ /* FALLTHROUGH */
+ case DeviceOutRequest | USB_REQ_SET_INTERFACE:
+ break;
+ case DeviceOutRequest | USB_REQ_SET_ADDRESS:
+ // wValue == urb->dev->devaddr
+ dev_dbg (hcd->self.controller, "root hub device address %d\n",
+ wValue);
+ break;
+
+ /* INTERFACE REQUESTS (no defined feature/status flags) */
+
+ /* ENDPOINT REQUESTS */
+
+ case EndpointRequest | USB_REQ_GET_STATUS:
+ // ENDPOINT_HALT flag
+ tbuf [0] = 0;
+ tbuf [1] = 0;
+ len = 2;
+ /* FALLTHROUGH */
+ case EndpointOutRequest | USB_REQ_CLEAR_FEATURE:
+ case EndpointOutRequest | USB_REQ_SET_FEATURE:
+ dev_dbg (hcd->self.controller, "no endpoint features yet\n");
+ break;
+
+ /* CLASS REQUESTS (and errors) */
+
+ default:
+ /* non-generic request */
+ if (HC_IS_SUSPENDED (hcd->state))
+ status = -EAGAIN;
+ else {
+ switch (typeReq) {
+ case GetHubStatus:
+ case GetPortStatus:
+ len = 4;
+ break;
+ case GetHubDescriptor:
+ len = sizeof (struct usb_hub_descriptor);
+ break;
+ }
+ status = hcd->driver->hub_control (hcd,
+ typeReq, wValue, wIndex,
+ tbuf, wLength);
+ }
+ break;
+error:
+ /* "protocol stall" on error */
+ status = -EPIPE;
+ }
+
+ if (status) {
+ len = 0;
+ if (status != -EPIPE) {
+ dev_dbg (hcd->self.controller,
+ "CTRL: TypeReq=0x%x val=0x%x "
+ "idx=0x%x len=%d ==> %d\n",
+ typeReq, wValue, wIndex,
+ wLength, urb->status);
+ }
+ }
+ if (len) {
+ if (urb->transfer_buffer_length < len)
+ len = urb->transfer_buffer_length;
+ urb->actual_length = len;
+ // always USB_DIR_IN, toward host
+ memcpy (ubuf, bufp, len);
+
+ /* report whether RH hardware supports remote wakeup */
+ if (patch_wakeup &&
+ len > offsetof (struct usb_config_descriptor,
+ bmAttributes))
+ ((struct usb_config_descriptor *)ubuf)->bmAttributes
+ |= USB_CONFIG_ATT_WAKEUP;
+ }
+
+ /* any errors get returned through the urb completion */
+ local_irq_save (flags);
+ spin_lock (&urb->lock);
+ if (urb->status == -EINPROGRESS)
+ urb->status = status;
+ spin_unlock (&urb->lock);
+ usb_hcd_giveback_urb (hcd, urb, NULL);
+ local_irq_restore (flags);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Root Hub interrupt transfers are synthesized with a timer.
+ * Completions are called in_interrupt() but not in_irq().
+ *
+ * Note: some root hubs (including common UHCI based designs) can't
+ * correctly issue port change IRQs. They're the ones that _need_ a
+ * timer; most other root hubs don't. Some systems could save a
+ * lot of battery power by eliminating these root hub timer IRQs.
+ */
+
+static void rh_report_status (unsigned long ptr);
+
+static int rh_status_urb (struct usb_hcd *hcd, struct urb *urb)
+{
+ int len = 1 + (urb->dev->maxchild / 8);
+
+ /* rh_timer protected by hcd_data_lock */
+ if (hcd->rh_timer.data || urb->transfer_buffer_length < len) {
+ dev_dbg (hcd->self.controller,
+ "not queuing rh status urb, stat %d\n",
+ urb->status);
+ return -EINVAL;
+ }
+
+ init_timer (&hcd->rh_timer);
+ hcd->rh_timer.function = rh_report_status;
+ hcd->rh_timer.data = (unsigned long) urb;
+ /* USB 2.0 spec says 256msec; this is close enough */
+ hcd->rh_timer.expires = jiffies + HZ/4;
+ add_timer (&hcd->rh_timer);
+ urb->hcpriv = hcd; /* nonzero to indicate it's queued */
+ return 0;
+}
+
+/* timer callback */
+
+static void rh_report_status (unsigned long ptr)
+{
+ struct urb *urb;
+ struct usb_hcd *hcd;
+ int length = 0;
+ unsigned long flags;
+
+ urb = (struct urb *) ptr;
+ local_irq_save (flags);
+ spin_lock (&urb->lock);
+
+ /* do nothing if the urb's been unlinked */
+ if (!urb->dev
+ || urb->status != -EINPROGRESS
+ || (hcd = urb->dev->bus->hcpriv) == NULL) {
+ spin_unlock (&urb->lock);
+ local_irq_restore (flags);
+ return;
+ }
+
+ /* complete the status urb, or retrigger the timer */
+ spin_lock (&hcd_data_lock);
+ if (urb->dev->state == USB_STATE_CONFIGURED) {
+ length = hcd->driver->hub_status_data (
+ hcd, urb->transfer_buffer);
+ if (length > 0) {
+ hcd->rh_timer.data = 0;
+ urb->actual_length = length;
+ urb->status = 0;
+ urb->hcpriv = NULL;
+ } else
+ mod_timer (&hcd->rh_timer, jiffies + HZ/4);
+ }
+ spin_unlock (&hcd_data_lock);
+ spin_unlock (&urb->lock);
+
+ /* local irqs are always blocked in completions */
+ if (length > 0)
+ usb_hcd_giveback_urb (hcd, urb, NULL);
+ local_irq_restore (flags);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int rh_urb_enqueue (struct usb_hcd *hcd, struct urb *urb)
+{
+ if (usb_pipeint (urb->pipe)) {
+ int retval;
+ unsigned long flags;
+
+ spin_lock_irqsave (&hcd_data_lock, flags);
+ retval = rh_status_urb (hcd, urb);
+ spin_unlock_irqrestore (&hcd_data_lock, flags);
+ return retval;
+ }
+ if (usb_pipecontrol (urb->pipe))
+ return rh_call_control (hcd, urb);
+ else
+ return -EINVAL;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int usb_rh_urb_dequeue (struct usb_hcd *hcd, struct urb *urb)
+{
+ unsigned long flags;
+
+ /* note: always a synchronous unlink */
+ if ((unsigned long) urb == hcd->rh_timer.data) {
+ del_timer_sync (&hcd->rh_timer);
+ hcd->rh_timer.data = 0;
+
+ local_irq_save (flags);
+ urb->hcpriv = NULL;
+ usb_hcd_giveback_urb (hcd, urb, NULL);
+ local_irq_restore (flags);
+
+ } else if (usb_pipeendpoint(urb->pipe) == 0) {
+ spin_lock_irq(&urb->lock); /* from usb_kill_urb */
+ ++urb->reject;
+ spin_unlock_irq(&urb->lock);
+
+ wait_event(usb_kill_urb_queue,
+ atomic_read(&urb->use_count) == 0);
+
+ spin_lock_irq(&urb->lock);
+ --urb->reject;
+ spin_unlock_irq(&urb->lock);
+ } else
+ return -EINVAL;
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* exported only within usbcore */
+struct usb_bus *usb_bus_get (struct usb_bus *bus)
+{
+ struct class_device *tmp;
+
+ if (!bus)
+ return NULL;
+
+ tmp = class_device_get(&bus->class_dev);
+ if (tmp)
+ return to_usb_bus(tmp);
+ else
+ return NULL;
+}
+
+/* exported only within usbcore */
+void usb_bus_put (struct usb_bus *bus)
+{
+ if (bus)
+ class_device_put(&bus->class_dev);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void usb_host_release(struct class_device *class_dev)
+{
+ struct usb_bus *bus = to_usb_bus(class_dev);
+
+ if (bus->release)
+ bus->release(bus);
+}
+
+static struct class usb_host_class = {
+ .name = "usb_host",
+ .release = &usb_host_release,
+};
+
+int usb_host_init(void)
+{
+ return class_register(&usb_host_class);
+}
+
+void usb_host_cleanup(void)
+{
+ class_unregister(&usb_host_class);
+}
+
+/**
+ * usb_bus_init - shared initialization code
+ * @bus: the bus structure being initialized
+ *
+ * This code is used to initialize a usb_bus structure, memory for which is
+ * separately managed.
+ */
+static void usb_bus_init (struct usb_bus *bus)
+{
+ memset (&bus->devmap, 0, sizeof(struct usb_devmap));
+
+ bus->devnum_next = 1;
+
+ bus->root_hub = NULL;
+ bus->hcpriv = NULL;
+ bus->busnum = -1;
+ bus->bandwidth_allocated = 0;
+ bus->bandwidth_int_reqs = 0;
+ bus->bandwidth_isoc_reqs = 0;
+
+ INIT_LIST_HEAD (&bus->bus_list);
+
+ class_device_initialize(&bus->class_dev);
+ bus->class_dev.class = &usb_host_class;
+}
+
+/**
+ * usb_alloc_bus - creates a new USB host controller structure
+ * @op: pointer to a struct usb_operations that this bus structure should use
+ * Context: !in_interrupt()
+ *
+ * Creates a USB host controller bus structure with the specified
+ * usb_operations and initializes all the necessary internal objects.
+ *
+ * If no memory is available, NULL is returned.
+ *
+ * The caller should call usb_put_bus() when it is finished with the structure.
+ */
+struct usb_bus *usb_alloc_bus (struct usb_operations *op)
+{
+ struct usb_bus *bus;
+
+ bus = kmalloc (sizeof *bus, GFP_KERNEL);
+ if (!bus)
+ return NULL;
+ memset(bus, 0, sizeof(struct usb_bus));
+ usb_bus_init (bus);
+ bus->op = op;
+ return bus;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/**
+ * usb_register_bus - registers the USB host controller with the usb core
+ * @bus: pointer to the bus to register
+ * Context: !in_interrupt()
+ *
+ * Assigns a bus number, and links the controller into usbcore data
+ * structures so that it can be seen by scanning the bus list.
+ */
+static int usb_register_bus(struct usb_bus *bus)
+{
+ int busnum;
+ int retval;
+
+ down (&usb_bus_list_lock);
+ busnum = find_next_zero_bit (busmap.busmap, USB_MAXBUS, 1);
+ if (busnum < USB_MAXBUS) {
+ set_bit (busnum, busmap.busmap);
+ bus->busnum = busnum;
+ } else {
+ printk (KERN_ERR "%s: too many buses\n", usbcore_name);
+ up(&usb_bus_list_lock);
+ return -E2BIG;
+ }
+
+ snprintf(bus->class_dev.class_id, BUS_ID_SIZE, "usb%d", busnum);
+ bus->class_dev.dev = bus->controller;
+ retval = class_device_add(&bus->class_dev);
+ if (retval) {
+ clear_bit(busnum, busmap.busmap);
+ up(&usb_bus_list_lock);
+ return retval;
+ }
+
+ /* Add it to the local list of buses */
+ list_add (&bus->bus_list, &usb_bus_list);
+ up (&usb_bus_list_lock);
+
+ usbfs_add_bus (bus);
+ usbmon_notify_bus_add (bus);
+
+ dev_info (bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum);
+ return 0;
+}
+
+/**
+ * usb_deregister_bus - deregisters the USB host controller
+ * @bus: pointer to the bus to deregister
+ * Context: !in_interrupt()
+ *
+ * Recycles the bus number, and unlinks the controller from usbcore data
+ * structures so that it won't be seen by scanning the bus list.
+ */
+static void usb_deregister_bus (struct usb_bus *bus)
+{
+ dev_info (bus->controller, "USB bus %d deregistered\n", bus->busnum);
+
+ /*
+ * NOTE: make sure that all the devices are removed by the
+ * controller code, as well as having it call this when cleaning
+ * itself up
+ */
+ down (&usb_bus_list_lock);
+ list_del (&bus->bus_list);
+ up (&usb_bus_list_lock);
+
+ usbmon_notify_bus_remove (bus);
+ usbfs_remove_bus (bus);
+
+ clear_bit (bus->busnum, busmap.busmap);
+
+ class_device_del(&bus->class_dev);
+}
+
+/**
+ * usb_hcd_register_root_hub - called by HCD to register its root hub
+ * @usb_dev: the usb root hub device to be registered.
+ * @hcd: host controller for this root hub
+ *
+ * The USB host controller calls this function to register the root hub
+ * properly with the USB subsystem. It sets up the device properly in
+ * the device tree and stores the root_hub pointer in the bus structure,
+ * then calls usb_new_device() to register the usb device. It also
+ * assigns the root hub's USB address (always 1).
+ */
+int usb_hcd_register_root_hub (struct usb_device *usb_dev, struct usb_hcd *hcd)
+{
+ struct device *parent_dev = hcd->self.controller;
+ const int devnum = 1;
+ int retval;
+
+ /* hcd->driver->start() reported can_wakeup, probably with
+ * assistance from board's boot firmware.
+ * NOTE: normal devices won't enable wakeup by default.
+ */
+ if (hcd->can_wakeup)
+ dev_dbg (parent_dev, "supports USB remote wakeup\n");
+ hcd->remote_wakeup = hcd->can_wakeup;
+
+ usb_dev->devnum = devnum;
+ usb_dev->bus->devnum_next = devnum + 1;
+ memset (&usb_dev->bus->devmap.devicemap, 0,
+ sizeof usb_dev->bus->devmap.devicemap);
+ set_bit (devnum, usb_dev->bus->devmap.devicemap);
+ usb_set_device_state(usb_dev, USB_STATE_ADDRESS);
+
+ down (&usb_bus_list_lock);
+ usb_dev->bus->root_hub = usb_dev;
+
+ usb_dev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(64);
+ retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE);
+ if (retval != sizeof usb_dev->descriptor) {
+ usb_dev->bus->root_hub = NULL;
+ up (&usb_bus_list_lock);
+ dev_dbg (parent_dev, "can't read %s device descriptor %d\n",
+ usb_dev->dev.bus_id, retval);
+ return (retval < 0) ? retval : -EMSGSIZE;
+ }
+
+ usb_lock_device (usb_dev);
+ retval = usb_new_device (usb_dev);
+ usb_unlock_device (usb_dev);
+ if (retval) {
+ usb_dev->bus->root_hub = NULL;
+ dev_err (parent_dev, "can't register root hub for %s, %d\n",
+ usb_dev->dev.bus_id, retval);
+ }
+ up (&usb_bus_list_lock);
+
+ if (retval == 0) {
+ spin_lock_irq (&hcd_root_hub_lock);
+ hcd->rh_registered = 1;
+ spin_unlock_irq (&hcd_root_hub_lock);
+
+ /* Did the HC die before the root hub was registered? */
+ if (hcd->state == HC_STATE_HALT)
+ usb_hc_died (hcd); /* This time clean up */
+ }
+
+ return retval;
+}
+EXPORT_SYMBOL_GPL(usb_hcd_register_root_hub);
+
+
+/*-------------------------------------------------------------------------*/
+
+/**
+ * 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:
+ pr_debug ("%s: bogus device speed!\n", usbcore_name);
+ return -1;
+ }
+}
+EXPORT_SYMBOL (usb_calc_bus_time);
+
+/*
+ * usb_check_bandwidth():
+ *
+ * old_alloc is from host_controller->bandwidth_allocated in microseconds;
+ * bustime is from calc_bus_time(), but converted to microseconds.
+ *
+ * returns <bustime in us> if successful,
+ * or -ENOSPC if bandwidth request fails.
+ *
+ * FIXME:
+ * This initial implementation does not use Endpoint.bInterval
+ * in managing bandwidth allocation.
+ * It probably needs to be expanded to use Endpoint.bInterval.
+ * This can be done as a later enhancement (correction).
+ *
+ * This will also probably require some kind of
+ * frame allocation tracking...meaning, for example,
+ * that if multiple drivers request interrupts every 10 USB frames,
+ * they don't all have to be allocated at
+ * frame numbers N, N+10, N+20, etc. Some of them could be at
+ * N+11, N+21, N+31, etc., and others at
+ * N+12, N+22, N+32, etc.
+ *
+ * Similarly for isochronous transfers...
+ *
+ * Individual HCDs can schedule more directly ... this logic
+ * is not correct for high speed transfers.
+ */
+int usb_check_bandwidth (struct usb_device *dev, struct urb *urb)
+{
+ unsigned int pipe = urb->pipe;
+ long bustime;
+ int is_in = usb_pipein (pipe);
+ int is_iso = usb_pipeisoc (pipe);
+ int old_alloc = dev->bus->bandwidth_allocated;
+ int new_alloc;
+
+
+ bustime = NS_TO_US (usb_calc_bus_time (dev->speed, is_in, is_iso,
+ usb_maxpacket (dev, pipe, !is_in)));
+ if (is_iso)
+ bustime /= urb->number_of_packets;
+
+ new_alloc = old_alloc + (int) bustime;
+ if (new_alloc > FRAME_TIME_MAX_USECS_ALLOC) {
+#ifdef DEBUG
+ char *mode =
+#ifdef CONFIG_USB_BANDWIDTH
+ "";
+#else
+ "would have ";
+#endif
+ dev_dbg (&dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n",
+ mode, old_alloc, bustime, new_alloc);
+#endif
+#ifdef CONFIG_USB_BANDWIDTH
+ bustime = -ENOSPC; /* report error */
+#endif
+ }
+
+ return bustime;
+}
+EXPORT_SYMBOL (usb_check_bandwidth);
+
+
+/**
+ * usb_claim_bandwidth - records bandwidth for a periodic transfer
+ * @dev: source/target of request
+ * @urb: request (urb->dev == dev)
+ * @bustime: bandwidth consumed, in (average) microseconds per frame
+ * @isoc: true iff the request is isochronous
+ *
+ * Bus bandwidth reservations are recorded purely for diagnostic purposes.
+ * HCDs are expected not to overcommit periodic bandwidth, and to record such
+ * reservations whenever endpoints are added to the periodic schedule.
+ *
+ * FIXME averaging per-frame is suboptimal. Better to sum over the HCD's
+ * entire periodic schedule ... 32 frames for OHCI, 1024 for UHCI, settable
+ * for EHCI (256/512/1024 frames, default 1024) and have the bus expose how
+ * large its periodic schedule is.
+ */
+void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, int bustime, int isoc)
+{
+ dev->bus->bandwidth_allocated += bustime;
+ if (isoc)
+ dev->bus->bandwidth_isoc_reqs++;
+ else
+ dev->bus->bandwidth_int_reqs++;
+ urb->bandwidth = bustime;
+
+#ifdef USB_BANDWIDTH_MESSAGES
+ dev_dbg (&dev->dev, "bandwidth alloc increased by %d (%s) to %d for %d requesters\n",
+ bustime,
+ isoc ? "ISOC" : "INTR",
+ dev->bus->bandwidth_allocated,
+ dev->bus->bandwidth_int_reqs + dev->bus->bandwidth_isoc_reqs);
+#endif
+}
+EXPORT_SYMBOL (usb_claim_bandwidth);
+
+
+/**
+ * usb_release_bandwidth - reverses effect of usb_claim_bandwidth()
+ * @dev: source/target of request
+ * @urb: request (urb->dev == dev)
+ * @isoc: true iff the request is isochronous
+ *
+ * This records that previously allocated bandwidth has been released.
+ * Bandwidth is released when endpoints are removed from the host controller's
+ * periodic schedule.
+ */
+void usb_release_bandwidth (struct usb_device *dev, struct urb *urb, int isoc)
+{
+ dev->bus->bandwidth_allocated -= urb->bandwidth;
+ if (isoc)
+ dev->bus->bandwidth_isoc_reqs--;
+ else
+ dev->bus->bandwidth_int_reqs--;
+
+#ifdef USB_BANDWIDTH_MESSAGES
+ dev_dbg (&dev->dev, "bandwidth alloc reduced by %d (%s) to %d for %d requesters\n",
+ urb->bandwidth,
+ isoc ? "ISOC" : "INTR",
+ dev->bus->bandwidth_allocated,
+ dev->bus->bandwidth_int_reqs + dev->bus->bandwidth_isoc_reqs);
+#endif
+ urb->bandwidth = 0;
+}
+EXPORT_SYMBOL (usb_release_bandwidth);
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Generic HC operations.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+static void urb_unlink (struct urb *urb)
+{
+ unsigned long flags;
+
+ /* Release any periodic transfer bandwidth */
+ if (urb->bandwidth)
+ usb_release_bandwidth (urb->dev, urb,
+ usb_pipeisoc (urb->pipe));
+
+ /* clear all state linking urb to this dev (and hcd) */
+
+ spin_lock_irqsave (&hcd_data_lock, flags);
+ list_del_init (&urb->urb_list);
+ spin_unlock_irqrestore (&hcd_data_lock, flags);
+ usb_put_dev (urb->dev);
+}
+
+
+/* may be called in any context with a valid urb->dev usecount
+ * caller surrenders "ownership" of urb
+ * expects usb_submit_urb() to have sanity checked and conditioned all
+ * inputs in the urb
+ */
+static int hcd_submit_urb (struct urb *urb, int mem_flags)
+{
+ int status;
+ struct usb_hcd *hcd = urb->dev->bus->hcpriv;
+ struct usb_host_endpoint *ep;
+ unsigned long flags;
+
+ if (!hcd)
+ return -ENODEV;
+
+ usbmon_urb_submit(&hcd->self, urb);
+
+ /*
+ * Atomically queue the urb, first to our records, then to the HCD.
+ * Access to urb->status is controlled by urb->lock ... changes on
+ * i/o completion (normal or fault) or unlinking.
+ */
+
+ // FIXME: verify that quiescing hc works right (RH cleans up)
+
+ spin_lock_irqsave (&hcd_data_lock, flags);
+ ep = (usb_pipein(urb->pipe) ? urb->dev->ep_in : urb->dev->ep_out)
+ [usb_pipeendpoint(urb->pipe)];
+ if (unlikely (!ep))
+ status = -ENOENT;
+ else if (unlikely (urb->reject))
+ status = -EPERM;
+ else switch (hcd->state) {
+ case HC_STATE_RUNNING:
+ case HC_STATE_RESUMING:
+ usb_get_dev (urb->dev);
+ list_add_tail (&urb->urb_list, &ep->urb_list);
+ status = 0;
+ break;
+ default:
+ status = -ESHUTDOWN;
+ break;
+ }
+ spin_unlock_irqrestore (&hcd_data_lock, flags);
+ if (status) {
+ INIT_LIST_HEAD (&urb->urb_list);
+ usbmon_urb_submit_error(&hcd->self, urb, status);
+ return status;
+ }
+
+ /* increment urb's reference count as part of giving it to the HCD
+ * (which now controls it). HCD guarantees that it either returns
+ * an error or calls giveback(), but not both.
+ */
+ urb = usb_get_urb (urb);
+ atomic_inc (&urb->use_count);
+
+ if (urb->dev == hcd->self.root_hub) {
+ /* NOTE: requirement on hub callers (usbfs and the hub
+ * driver, for now) that URBs' urb->transfer_buffer be
+ * valid and usb_buffer_{sync,unmap}() not be needed, since
+ * they could clobber root hub response data.
+ */
+ status = rh_urb_enqueue (hcd, urb);
+ goto done;
+ }
+
+ /* lower level hcd code should use *_dma exclusively,
+ * unless it uses pio or talks to another transport.
+ */
+ if (hcd->self.controller->dma_mask) {
+ if (usb_pipecontrol (urb->pipe)
+ && !(urb->transfer_flags & URB_NO_SETUP_DMA_MAP))
+ urb->setup_dma = dma_map_single (
+ hcd->self.controller,
+ urb->setup_packet,
+ sizeof (struct usb_ctrlrequest),
+ DMA_TO_DEVICE);
+ if (urb->transfer_buffer_length != 0
+ && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP))
+ urb->transfer_dma = dma_map_single (
+ hcd->self.controller,
+ urb->transfer_buffer,
+ urb->transfer_buffer_length,
+ usb_pipein (urb->pipe)
+ ? DMA_FROM_DEVICE
+ : DMA_TO_DEVICE);
+ }
+
+ status = hcd->driver->urb_enqueue (hcd, ep, urb, mem_flags);
+done:
+ if (unlikely (status)) {
+ urb_unlink (urb);
+ atomic_dec (&urb->use_count);
+ if (urb->reject)
+ wake_up (&usb_kill_urb_queue);
+ usb_put_urb (urb);
+ usbmon_urb_submit_error(&hcd->self, urb, status);
+ }
+ return status;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* called in any context */
+static int hcd_get_frame_number (struct usb_device *udev)
+{
+ struct usb_hcd *hcd = (struct usb_hcd *)udev->bus->hcpriv;
+ if (!HC_IS_RUNNING (hcd->state))
+ return -ESHUTDOWN;
+ return hcd->driver->get_frame_number (hcd);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* this makes the hcd giveback() the urb more quickly, by kicking it
+ * off hardware queues (which may take a while) and returning it as
+ * soon as practical. we've already set up the urb's return status,
+ * but we can't know if the callback completed already.
+ */
+static int
+unlink1 (struct usb_hcd *hcd, struct urb *urb)
+{
+ int value;
+
+ if (urb->dev == hcd->self.root_hub)
+ value = usb_rh_urb_dequeue (hcd, urb);
+ else {
+
+ /* The only reason an HCD might fail this call is if
+ * it has not yet fully queued the urb to begin with.
+ * Such failures should be harmless. */
+ value = hcd->driver->urb_dequeue (hcd, urb);
+ }
+
+ if (value != 0)
+ dev_dbg (hcd->self.controller, "dequeue %p --> %d\n",
+ urb, value);
+ return value;
+}
+
+/*
+ * called in any context
+ *
+ * caller guarantees urb won't be recycled till both unlink()
+ * and the urb's completion function return
+ */
+static int hcd_unlink_urb (struct urb *urb, int status)
+{
+ struct usb_host_endpoint *ep;
+ struct usb_hcd *hcd = NULL;
+ struct device *sys = NULL;
+ unsigned long flags;
+ struct list_head *tmp;
+ int retval;
+
+ if (!urb)
+ return -EINVAL;
+ if (!urb->dev || !urb->dev->bus)
+ return -ENODEV;
+ ep = (usb_pipein(urb->pipe) ? urb->dev->ep_in : urb->dev->ep_out)
+ [usb_pipeendpoint(urb->pipe)];
+ if (!ep)
+ return -ENODEV;
+
+ /*
+ * we contend for urb->status with the hcd core,
+ * which changes it while returning the urb.
+ *
+ * Caller guaranteed that the urb pointer hasn't been freed, and
+ * that it was submitted. But as a rule it can't know whether or
+ * not it's already been unlinked ... so we respect the reversed
+ * lock sequence needed for the usb_hcd_giveback_urb() code paths
+ * (urb lock, then hcd_data_lock) in case some other CPU is now
+ * unlinking it.
+ */
+ spin_lock_irqsave (&urb->lock, flags);
+ spin_lock (&hcd_data_lock);
+
+ sys = &urb->dev->dev;
+ hcd = urb->dev->bus->hcpriv;
+ if (hcd == NULL) {
+ retval = -ENODEV;
+ goto done;
+ }
+
+ /* running ~= hc unlink handshake works (irq, timer, etc)
+ * halted ~= no unlink handshake is needed
+ * suspended, resuming == should never happen
+ */
+ WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT);
+
+ /* insist the urb is still queued */
+ list_for_each(tmp, &ep->urb_list) {
+ if (tmp == &urb->urb_list)
+ break;
+ }
+ if (tmp != &urb->urb_list) {
+ retval = -EIDRM;
+ goto done;
+ }
+
+ /* Any status except -EINPROGRESS means something already started to
+ * unlink this URB from the hardware. So there's no more work to do.
+ */
+ if (urb->status != -EINPROGRESS) {
+ retval = -EBUSY;
+ goto done;
+ }
+
+ /* IRQ setup can easily be broken so that USB controllers
+ * never get completion IRQs ... maybe even the ones we need to
+ * finish unlinking the initial failed usb_set_address()
+ * or device descriptor fetch.
+ */
+ if (!hcd->saw_irq && hcd->self.root_hub != urb->dev) {
+ dev_warn (hcd->self.controller, "Unlink after no-IRQ? "
+ "Controller is probably using the wrong IRQ."
+ "\n");
+ hcd->saw_irq = 1;
+ }
+
+ urb->status = status;
+
+ spin_unlock (&hcd_data_lock);
+ spin_unlock_irqrestore (&urb->lock, flags);
+
+ retval = unlink1 (hcd, urb);
+ if (retval == 0)
+ retval = -EINPROGRESS;
+ return retval;
+
+done:
+ spin_unlock (&hcd_data_lock);
+ spin_unlock_irqrestore (&urb->lock, flags);
+ if (retval != -EIDRM && sys && sys->driver)
+ dev_dbg (sys, "hcd_unlink_urb %p fail %d\n", urb, retval);
+ return retval;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* disables the endpoint: cancels any pending urbs, then synchronizes with
+ * the hcd to make sure all endpoint state is gone from hardware. use for
+ * set_configuration, set_interface, driver removal, physical disconnect.
+ *
+ * example: a qh stored in ep->hcpriv, holding state related to endpoint
+ * type, maxpacket size, toggle, halt status, and scheduling.
+ */
+static void
+hcd_endpoint_disable (struct usb_device *udev, struct usb_host_endpoint *ep)
+{
+ struct usb_hcd *hcd;
+ struct urb *urb;
+
+ hcd = udev->bus->hcpriv;
+
+ WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT);
+
+ local_irq_disable ();
+
+ /* FIXME move most of this into message.c as part of its
+ * endpoint disable logic
+ */
+
+ /* ep is already gone from udev->ep_{in,out}[]; no more submits */
+rescan:
+ spin_lock (&hcd_data_lock);
+ list_for_each_entry (urb, &ep->urb_list, urb_list) {
+ int tmp;
+
+ /* another cpu may be in hcd, spinning on hcd_data_lock
+ * to giveback() this urb. the races here should be
+ * small, but a full fix needs a new "can't submit"
+ * urb state.
+ * FIXME urb->reject should allow that...
+ */
+ if (urb->status != -EINPROGRESS)
+ continue;
+ usb_get_urb (urb);
+ spin_unlock (&hcd_data_lock);
+
+ spin_lock (&urb->lock);
+ tmp = urb->status;
+ if (tmp == -EINPROGRESS)
+ urb->status = -ESHUTDOWN;
+ spin_unlock (&urb->lock);
+
+ /* kick hcd unless it's already returning this */
+ if (tmp == -EINPROGRESS) {
+ tmp = urb->pipe;
+ unlink1 (hcd, urb);
+ dev_dbg (hcd->self.controller,
+ "shutdown urb %p pipe %08x ep%d%s%s\n",
+ urb, tmp, usb_pipeendpoint (tmp),
+ (tmp & USB_DIR_IN) ? "in" : "out",
+ ({ char *s; \
+ switch (usb_pipetype (tmp)) { \
+ case PIPE_CONTROL: s = ""; break; \
+ case PIPE_BULK: s = "-bulk"; break; \
+ case PIPE_INTERRUPT: s = "-intr"; break; \
+ default: s = "-iso"; break; \
+ }; s;}));
+ }
+ usb_put_urb (urb);
+
+ /* list contents may have changed */
+ goto rescan;
+ }
+ spin_unlock (&hcd_data_lock);
+ local_irq_enable ();
+
+ /* synchronize with the hardware, so old configuration state
+ * clears out immediately (and will be freed).
+ */
+ might_sleep ();
+ if (hcd->driver->endpoint_disable)
+ hcd->driver->endpoint_disable (hcd, ep);
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_USB_SUSPEND
+
+static int hcd_hub_suspend (struct usb_bus *bus)
+{
+ struct usb_hcd *hcd;
+
+ hcd = container_of (bus, struct usb_hcd, self);
+ if (hcd->driver->hub_suspend)
+ return hcd->driver->hub_suspend (hcd);
+ return 0;
+}
+
+static int hcd_hub_resume (struct usb_bus *bus)
+{
+ struct usb_hcd *hcd;
+
+ hcd = container_of (bus, struct usb_hcd, self);
+ if (hcd->driver->hub_resume)
+ return hcd->driver->hub_resume (hcd);
+ return 0;
+}
+
+/**
+ * usb_hcd_resume_root_hub - called by HCD to resume its root hub
+ * @hcd: host controller for this root hub
+ *
+ * The USB host controller calls this function when its root hub is
+ * suspended (with the remote wakeup feature enabled) and a remote
+ * wakeup request is received. It queues a request for khubd to
+ * resume the root hub.
+ */
+void usb_hcd_resume_root_hub (struct usb_hcd *hcd)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave (&hcd_root_hub_lock, flags);
+ if (hcd->rh_registered)
+ usb_resume_root_hub (hcd->self.root_hub);
+ spin_unlock_irqrestore (&hcd_root_hub_lock, flags);
+}
+
+#else
+void usb_hcd_resume_root_hub (struct usb_hcd *hcd)
+{
+}
+#endif
+EXPORT_SYMBOL_GPL(usb_hcd_resume_root_hub);
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_USB_OTG
+
+/**
+ * usb_bus_start_enum - start immediate enumeration (for OTG)
+ * @bus: the bus (must use hcd framework)
+ * @port_num: 1-based number of port; usually bus->otg_port
+ * Context: in_interrupt()
+ *
+ * Starts enumeration, with an immediate reset followed later by
+ * khubd identifying and possibly configuring the device.
+ * This is needed by OTG controller drivers, where it helps meet
+ * HNP protocol timing requirements for starting a port reset.
+ */
+int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num)
+{
+ struct usb_hcd *hcd;
+ int status = -EOPNOTSUPP;
+
+ /* NOTE: since HNP can't start by grabbing the bus's address0_sem,
+ * boards with root hubs hooked up to internal devices (instead of
+ * just the OTG port) may need more attention to resetting...
+ */
+ hcd = container_of (bus, struct usb_hcd, self);
+ if (port_num && hcd->driver->start_port_reset)
+ status = hcd->driver->start_port_reset(hcd, port_num);
+
+ /* run khubd shortly after (first) root port reset finishes;
+ * it may issue others, until at least 50 msecs have passed.
+ */
+ if (status == 0)
+ mod_timer(&hcd->rh_timer, jiffies + msecs_to_jiffies(10));
+ return status;
+}
+EXPORT_SYMBOL (usb_bus_start_enum);
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * usb_hcd_operations - adapts usb_bus framework to HCD framework (bus glue)
+ */
+static struct usb_operations usb_hcd_operations = {
+ .get_frame_number = hcd_get_frame_number,
+ .submit_urb = hcd_submit_urb,
+ .unlink_urb = hcd_unlink_urb,
+ .buffer_alloc = hcd_buffer_alloc,
+ .buffer_free = hcd_buffer_free,
+ .disable = hcd_endpoint_disable,
+#ifdef CONFIG_USB_SUSPEND
+ .hub_suspend = hcd_hub_suspend,
+ .hub_resume = hcd_hub_resume,
+#endif
+};
+
+/*-------------------------------------------------------------------------*/
+
+/**
+ * usb_hcd_giveback_urb - return URB from HCD to device driver
+ * @hcd: host controller returning the URB
+ * @urb: urb being returned to the USB device driver.
+ * @regs: pt_regs, passed down to the URB completion handler
+ * Context: in_interrupt()
+ *
+ * This hands the URB from HCD to its USB device driver, using its
+ * completion function. The HCD has freed all per-urb resources
+ * (and is done using urb->hcpriv). It also released all HCD locks;
+ * the device driver won't cause problems if it frees, modifies,
+ * or resubmits this URB.
+ */
+void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs)
+{
+ int at_root_hub;
+
+ at_root_hub = (urb->dev == hcd->self.root_hub);
+ urb_unlink (urb);
+
+ /* lower level hcd code should use *_dma exclusively */
+ if (hcd->self.controller->dma_mask && !at_root_hub) {
+ if (usb_pipecontrol (urb->pipe)
+ && !(urb->transfer_flags & URB_NO_SETUP_DMA_MAP))
+ dma_unmap_single (hcd->self.controller, urb->setup_dma,
+ sizeof (struct usb_ctrlrequest),
+ DMA_TO_DEVICE);
+ if (urb->transfer_buffer_length != 0
+ && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP))
+ dma_unmap_single (hcd->self.controller,
+ urb->transfer_dma,
+ urb->transfer_buffer_length,
+ usb_pipein (urb->pipe)
+ ? DMA_FROM_DEVICE
+ : DMA_TO_DEVICE);
+ }
+
+ usbmon_urb_complete (&hcd->self, urb);
+ /* pass ownership to the completion handler */
+ urb->complete (urb, regs);
+ atomic_dec (&urb->use_count);
+ if (unlikely (urb->reject))
+ wake_up (&usb_kill_urb_queue);
+ usb_put_urb (urb);
+}
+EXPORT_SYMBOL (usb_hcd_giveback_urb);
+
+/*-------------------------------------------------------------------------*/
+
+/**
+ * usb_hcd_irq - hook IRQs to HCD framework (bus glue)
+ * @irq: the IRQ being raised
+ * @__hcd: pointer to the HCD whose IRQ is being signaled
+ * @r: saved hardware registers
+ *
+ * If the controller isn't HALTed, calls the driver's irq handler.
+ * Checks whether the controller is now dead.
+ */
+irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs * r)
+{
+ struct usb_hcd *hcd = __hcd;
+ int start = hcd->state;
+
+ if (start == HC_STATE_HALT)
+ return IRQ_NONE;
+ if (hcd->driver->irq (hcd, r) == IRQ_NONE)
+ return IRQ_NONE;
+
+ hcd->saw_irq = 1;
+ if (hcd->state != start && hcd->state == HC_STATE_HALT)
+ usb_hc_died (hcd);
+ return IRQ_HANDLED;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/**
+ * usb_hc_died - report abnormal shutdown of a host controller (bus glue)
+ * @hcd: pointer to the HCD representing the controller
+ *
+ * This is called by bus glue to report a USB host controller that died
+ * while operations may still have been pending. It's called automatically
+ * by the PCI glue, so only glue for non-PCI busses should need to call it.
+ */
+void usb_hc_died (struct usb_hcd *hcd)
+{
+ unsigned long flags;
+
+ dev_err (hcd->self.controller, "HC died; cleaning up\n");
+
+ spin_lock_irqsave (&hcd_root_hub_lock, flags);
+ if (hcd->rh_registered) {
+
+ /* make khubd clean up old urbs and devices */
+ usb_set_device_state (hcd->self.root_hub,
+ USB_STATE_NOTATTACHED);
+ usb_kick_khubd (hcd->self.root_hub);
+ }
+ spin_unlock_irqrestore (&hcd_root_hub_lock, flags);
+}
+EXPORT_SYMBOL_GPL (usb_hc_died);
+
+/*-------------------------------------------------------------------------*/
+
+static void hcd_release (struct usb_bus *bus)
+{
+ struct usb_hcd *hcd;
+
+ hcd = container_of(bus, struct usb_hcd, self);
+ kfree(hcd);
+}
+
+/**
+ * usb_create_hcd - create and initialize an HCD structure
+ * @driver: HC driver that will use this hcd
+ * @dev: device for this HC, stored in hcd->self.controller
+ * @bus_name: value to store in hcd->self.bus_name
+ * Context: !in_interrupt()
+ *
+ * Allocate a struct usb_hcd, with extra space at the end for the
+ * HC driver's private data. Initialize the generic members of the
+ * hcd structure.
+ *
+ * If memory is unavailable, returns NULL.
+ */
+struct usb_hcd *usb_create_hcd (const struct hc_driver *driver,
+ struct device *dev, char *bus_name)
+{
+ struct usb_hcd *hcd;
+
+ hcd = kcalloc(1, sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL);
+ if (!hcd) {
+ dev_dbg (dev, "hcd alloc failed\n");
+ return NULL;
+ }
+ dev_set_drvdata(dev, hcd);
+
+ usb_bus_init(&hcd->self);
+ hcd->self.op = &usb_hcd_operations;
+ hcd->self.hcpriv = hcd;
+ hcd->self.release = &hcd_release;
+ hcd->self.controller = dev;
+ hcd->self.bus_name = bus_name;
+
+ init_timer(&hcd->rh_timer);
+
+ hcd->driver = driver;
+ hcd->product_desc = (driver->product_desc) ? driver->product_desc :
+ "USB Host Controller";
+
+ return hcd;
+}
+EXPORT_SYMBOL (usb_create_hcd);
+
+void usb_put_hcd (struct usb_hcd *hcd)
+{
+ dev_set_drvdata(hcd->self.controller, NULL);
+ usb_bus_put(&hcd->self);
+}
+EXPORT_SYMBOL (usb_put_hcd);
+
+/**
+ * usb_add_hcd - finish generic HCD structure initialization and register
+ * @hcd: the usb_hcd structure to initialize
+ * @irqnum: Interrupt line to allocate
+ * @irqflags: Interrupt type flags
+ *
+ * Finish the remaining parts of generic HCD initialization: allocate the
+ * buffers of consistent memory, register the bus, request the IRQ line,
+ * and call the driver's reset() and start() routines.
+ */
+int usb_add_hcd(struct usb_hcd *hcd,
+ unsigned int irqnum, unsigned long irqflags)
+{
+ int retval;
+
+ dev_info(hcd->self.controller, "%s\n", hcd->product_desc);
+
+ /* till now HC has been in an indeterminate state ... */
+ if (hcd->driver->reset && (retval = hcd->driver->reset(hcd)) < 0) {
+ dev_err(hcd->self.controller, "can't reset\n");
+ return retval;
+ }
+
+ if ((retval = hcd_buffer_create(hcd)) != 0) {
+ dev_dbg(hcd->self.controller, "pool alloc failed\n");
+ return retval;
+ }
+
+ if ((retval = usb_register_bus(&hcd->self)) < 0)
+ goto err1;
+
+ if (hcd->driver->irq) {
+ char buf[8], *bufp = buf;
+
+#ifdef __sparc__
+ bufp = __irq_itoa(irqnum);
+#else
+ sprintf(buf, "%d", irqnum);
+#endif
+
+ snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
+ hcd->driver->description, hcd->self.busnum);
+ if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
+ hcd->irq_descr, hcd)) != 0) {
+ dev_err(hcd->self.controller,
+ "request interrupt %s failed\n", bufp);
+ goto err2;
+ }
+ hcd->irq = irqnum;
+ dev_info(hcd->self.controller, "irq %s, %s 0x%08llx\n", bufp,
+ (hcd->driver->flags & HCD_MEMORY) ?
+ "io mem" : "io base",
+ (unsigned long long)hcd->rsrc_start);
+ } else {
+ hcd->irq = -1;
+ if (hcd->rsrc_start)
+ dev_info(hcd->self.controller, "%s 0x%08llx\n",
+ (hcd->driver->flags & HCD_MEMORY) ?
+ "io mem" : "io base",
+ (unsigned long long)hcd->rsrc_start);
+ }
+
+ if ((retval = hcd->driver->start(hcd)) < 0) {
+ dev_err(hcd->self.controller, "startup error %d\n", retval);
+ goto err3;
+ }
+
+ return retval;
+
+ err3:
+ if (hcd->irq >= 0)
+ free_irq(irqnum, hcd);
+ err2:
+ usb_deregister_bus(&hcd->self);
+ err1:
+ hcd_buffer_destroy(hcd);
+ return retval;
+}
+EXPORT_SYMBOL (usb_add_hcd);
+
+/**
+ * usb_remove_hcd - shutdown processing for generic HCDs
+ * @hcd: the usb_hcd structure to remove
+ * Context: !in_interrupt()
+ *
+ * Disconnects the root hub, then reverses the effects of usb_add_hcd(),
+ * invoking the HCD's stop() method.
+ */
+void usb_remove_hcd(struct usb_hcd *hcd)
+{
+ dev_info(hcd->self.controller, "remove, state %x\n", hcd->state);
+
+ if (HC_IS_RUNNING (hcd->state))
+ hcd->state = HC_STATE_QUIESCING;
+
+ dev_dbg(hcd->self.controller, "roothub graceful disconnect\n");
+ spin_lock_irq (&hcd_root_hub_lock);
+ hcd->rh_registered = 0;
+ spin_unlock_irq (&hcd_root_hub_lock);
+ usb_disconnect(&hcd->self.root_hub);
+
+ hcd->driver->stop(hcd);
+ hcd->state = HC_STATE_HALT;
+
+ if (hcd->irq >= 0)
+ free_irq(hcd->irq, hcd);
+ usb_deregister_bus(&hcd->self);
+ hcd_buffer_destroy(hcd);
+}
+EXPORT_SYMBOL (usb_remove_hcd);
+
+/*-------------------------------------------------------------------------*/
+
+#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
+
+struct usb_mon_operations *mon_ops;
+
+/*
+ * The registration is unlocked.
+ * We do it this way because we do not want to lock in hot paths.
+ *
+ * Notice that the code is minimally error-proof. Because usbmon needs
+ * symbols from usbcore, usbcore gets referenced and cannot be unloaded first.
+ */
+
+int usb_mon_register (struct usb_mon_operations *ops)
+{
+
+ if (mon_ops)
+ return -EBUSY;
+
+ mon_ops = ops;
+ mb();
+ return 0;
+}
+EXPORT_SYMBOL_GPL (usb_mon_register);
+
+void usb_mon_deregister (void)
+{
+
+ if (mon_ops == NULL) {
+ printk(KERN_ERR "USB: monitor was not registered\n");
+ return;
+ }
+ mon_ops = NULL;
+ mb();
+}
+EXPORT_SYMBOL_GPL (usb_mon_deregister);
+
+#endif /* CONFIG_USB_MON */
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
new file mode 100644
index 000000000000..6c625b35fa0c
--- /dev/null
+++ b/drivers/usb/core/hcd.h
@@ -0,0 +1,476 @@
+/*
+ * Copyright (c) 2001-2002 by David Brownell
+ *
+ * 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.
+ */
+
+
+#ifdef __KERNEL__
+
+/* This file contains declarations of usbcore internals that are mostly
+ * used or exposed by Host Controller Drivers.
+ */
+
+/*
+ * 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 */
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * USB Host Controller Driver (usb_hcd) framework
+ *
+ * Since "struct usb_bus" is so thin, you can't share much code in it.
+ * This framework is a layer over that, and should be more sharable.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+struct usb_hcd { /* usb_bus.hcpriv points to this */
+
+ /*
+ * housekeeping
+ */
+ struct usb_bus self; /* hcd is-a bus */
+
+ const char *product_desc; /* product/vendor string */
+ char irq_descr[24]; /* driver + bus # */
+
+ struct timer_list rh_timer; /* drives root hub */
+
+ /*
+ * hardware info/state
+ */
+ const struct hc_driver *driver; /* hw-specific hooks */
+ unsigned saw_irq : 1;
+ unsigned can_wakeup:1; /* hw supports wakeup? */
+ unsigned remote_wakeup:1;/* sw should use wakeup? */
+ unsigned rh_registered:1;/* is root hub registered? */
+
+ int irq; /* irq allocated */
+ void __iomem *regs; /* device memory/io */
+ u64 rsrc_start; /* memory/io resource start */
+ u64 rsrc_len; /* memory/io resource length */
+
+#define HCD_BUFFER_POOLS 4
+ struct dma_pool *pool [HCD_BUFFER_POOLS];
+
+ int state;
+# define __ACTIVE 0x01
+# define __SUSPEND 0x04
+# define __TRANSIENT 0x80
+
+# define HC_STATE_HALT 0
+# define HC_STATE_RUNNING (__ACTIVE)
+# define HC_STATE_QUIESCING (__SUSPEND|__TRANSIENT|__ACTIVE)
+# define HC_STATE_RESUMING (__SUSPEND|__TRANSIENT)
+# define HC_STATE_SUSPENDED (__SUSPEND)
+
+#define HC_IS_RUNNING(state) ((state) & __ACTIVE)
+#define HC_IS_SUSPENDED(state) ((state) & __SUSPEND)
+
+ /* more shared queuing code would be good; it should support
+ * smarter scheduling, handle transaction translators, etc;
+ * input size of periodic table to an interrupt scheduler.
+ * (ohci 32, uhci 1024, ehci 256/512/1024).
+ */
+
+ /* The HC driver's private data is stored at the end of
+ * this structure.
+ */
+ unsigned long hcd_priv[0]
+ __attribute__ ((aligned (sizeof(unsigned long))));
+};
+
+/* 2.4 does this a bit differently ... */
+static inline struct usb_bus *hcd_to_bus (struct usb_hcd *hcd)
+{
+ return &hcd->self;
+}
+
+
+// urb.hcpriv is really hardware-specific
+
+struct hcd_timeout { /* timeouts we allocate */
+ struct list_head timeout_list;
+ struct timer_list timer;
+};
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * FIXME usb_operations should vanish or become hc_driver,
+ * when usb_bus and usb_hcd become the same thing.
+ */
+
+struct usb_operations {
+ int (*get_frame_number) (struct usb_device *usb_dev);
+ int (*submit_urb) (struct urb *urb, int mem_flags);
+ int (*unlink_urb) (struct urb *urb, int status);
+
+ /* allocate dma-consistent buffer for URB_DMA_NOMAPPING */
+ void *(*buffer_alloc)(struct usb_bus *bus, size_t size,
+ int mem_flags,
+ dma_addr_t *dma);
+ void (*buffer_free)(struct usb_bus *bus, size_t size,
+ void *addr, dma_addr_t dma);
+
+ void (*disable)(struct usb_device *udev,
+ struct usb_host_endpoint *ep);
+
+ /* global suspend/resume of bus */
+ int (*hub_suspend)(struct usb_bus *);
+ int (*hub_resume)(struct usb_bus *);
+};
+
+/* each driver provides one of these, and hardware init support */
+
+struct pt_regs;
+
+struct hc_driver {
+ const char *description; /* "ehci-hcd" etc */
+ const char *product_desc; /* product/vendor string */
+ size_t hcd_priv_size; /* size of private data */
+
+ /* irq handler */
+ irqreturn_t (*irq) (struct usb_hcd *hcd, struct pt_regs *regs);
+
+ int flags;
+#define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */
+#define HCD_USB11 0x0010 /* USB 1.1 */
+#define HCD_USB2 0x0020 /* USB 2.0 */
+
+ /* called to init HCD and root hub */
+ int (*reset) (struct usb_hcd *hcd);
+ int (*start) (struct usb_hcd *hcd);
+
+ /* NOTE: these suspend/resume calls relate to the HC as
+ * a whole, not just the root hub; they're for bus glue.
+ */
+ /* called after all devices were suspended */
+ int (*suspend) (struct usb_hcd *hcd, u32 state);
+
+ /* called before any devices get resumed */
+ int (*resume) (struct usb_hcd *hcd);
+
+ /* cleanly make HCD stop writing memory and doing I/O */
+ void (*stop) (struct usb_hcd *hcd);
+
+ /* return current frame number */
+ int (*get_frame_number) (struct usb_hcd *hcd);
+
+ /* manage i/o requests, device state */
+ int (*urb_enqueue) (struct usb_hcd *hcd,
+ struct usb_host_endpoint *ep,
+ struct urb *urb,
+ int mem_flags);
+ int (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb);
+
+ /* hw synch, freeing endpoint resources that urb_dequeue can't */
+ void (*endpoint_disable)(struct usb_hcd *hcd,
+ struct usb_host_endpoint *ep);
+
+ /* root hub support */
+ int (*hub_status_data) (struct usb_hcd *hcd, char *buf);
+ int (*hub_control) (struct usb_hcd *hcd,
+ u16 typeReq, u16 wValue, u16 wIndex,
+ char *buf, u16 wLength);
+ int (*hub_suspend)(struct usb_hcd *);
+ int (*hub_resume)(struct usb_hcd *);
+ int (*start_port_reset)(struct usb_hcd *, unsigned port_num);
+};
+
+extern void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs);
+
+extern struct usb_hcd *usb_create_hcd (const struct hc_driver *driver,
+ struct device *dev, char *bus_name);
+extern void usb_put_hcd (struct usb_hcd *hcd);
+extern int usb_add_hcd(struct usb_hcd *hcd,
+ unsigned int irqnum, unsigned long irqflags);
+extern void usb_remove_hcd(struct usb_hcd *hcd);
+
+#ifdef CONFIG_PCI
+struct pci_dev;
+struct pci_device_id;
+extern int usb_hcd_pci_probe (struct pci_dev *dev,
+ const struct pci_device_id *id);
+extern void usb_hcd_pci_remove (struct pci_dev *dev);
+
+#ifdef CONFIG_PM
+extern int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state);
+extern int usb_hcd_pci_resume (struct pci_dev *dev);
+#endif /* CONFIG_PM */
+
+#endif /* CONFIG_PCI */
+
+/* pci-ish (pdev null is ok) buffer alloc/mapping support */
+int hcd_buffer_create (struct usb_hcd *hcd);
+void hcd_buffer_destroy (struct usb_hcd *hcd);
+
+void *hcd_buffer_alloc (struct usb_bus *bus, size_t size,
+ int mem_flags, dma_addr_t *dma);
+void hcd_buffer_free (struct usb_bus *bus, size_t size,
+ void *addr, dma_addr_t dma);
+
+/* generic bus glue, needed for host controllers that don't use PCI */
+extern irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs *r);
+extern void usb_hc_died (struct usb_hcd *hcd);
+
+/* -------------------------------------------------------------------------- */
+
+/* Enumeration is only for the hub driver, or HCD virtual root hubs */
+extern struct usb_device *usb_alloc_dev(struct usb_device *parent,
+ struct usb_bus *, unsigned port);
+extern int usb_new_device(struct usb_device *dev);
+extern void usb_disconnect(struct usb_device **);
+
+extern int usb_get_configuration(struct usb_device *dev);
+extern void usb_destroy_configuration(struct usb_device *dev);
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * HCD Root Hub support
+ */
+
+#include "hub.h"
+
+/* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */
+#define DeviceRequest \
+ ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8)
+#define DeviceOutRequest \
+ ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8)
+
+#define InterfaceRequest \
+ ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8)
+
+#define EndpointRequest \
+ ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8)
+#define EndpointOutRequest \
+ ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8)
+
+/* class requests from the USB 2.0 hub spec, table 11-15 */
+/* GetBusState and SetHubDescriptor are optional, omitted */
+#define ClearHubFeature (0x2000 | USB_REQ_CLEAR_FEATURE)
+#define ClearPortFeature (0x2300 | USB_REQ_CLEAR_FEATURE)
+#define GetHubDescriptor (0xa000 | USB_REQ_GET_DESCRIPTOR)
+#define GetHubStatus (0xa000 | USB_REQ_GET_STATUS)
+#define GetPortStatus (0xa300 | USB_REQ_GET_STATUS)
+#define SetHubFeature (0x2000 | USB_REQ_SET_FEATURE)
+#define SetPortFeature (0x2300 | USB_REQ_SET_FEATURE)
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Generic bandwidth allocation constants/support
+ */
+#define FRAME_TIME_USECS 1000L
+#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 */
+
+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);
+
+/*
+ * Full/low speed bandwidth allocation constants/support.
+ */
+#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_MAX_USECS_ALLOC (90L * FRAME_TIME_USECS / 100L)
+
+extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
+
+/*
+ * Ceiling microseconds (typical) for that many bytes at high speed
+ * ISO is a bit less, no ACK ... from USB 2.0 spec, 5.11.3 (and needed
+ * to preallocate bandwidth)
+ */
+#define USB2_HOST_DELAY 5 /* nsec, guess */
+#define HS_USECS(bytes) NS_TO_US ( ((55 * 8 * 2083)/1000) \
+ + ((2083UL * (3167 + BitTime (bytes)))/1000) \
+ + USB2_HOST_DELAY)
+#define HS_USECS_ISO(bytes) NS_TO_US ( ((38 * 8 * 2083)/1000) \
+ + ((2083UL * (3167 + BitTime (bytes)))/1000) \
+ + USB2_HOST_DELAY)
+
+extern long usb_calc_bus_time (int speed, int is_input,
+ int isoc, int bytecount);
+
+/*-------------------------------------------------------------------------*/
+
+extern struct usb_bus *usb_alloc_bus (struct usb_operations *);
+
+extern int usb_hcd_register_root_hub (struct usb_device *usb_dev,
+ struct usb_hcd *hcd);
+
+extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd);
+
+extern void usb_set_device_state(struct usb_device *udev,
+ enum usb_device_state new_state);
+
+/*-------------------------------------------------------------------------*/
+
+/* exported only within usbcore */
+
+extern struct list_head usb_bus_list;
+extern struct semaphore usb_bus_list_lock;
+extern wait_queue_head_t usb_kill_urb_queue;
+
+extern struct usb_bus *usb_bus_get (struct usb_bus *bus);
+extern void usb_bus_put (struct usb_bus *bus);
+
+extern int usb_find_interface_driver (struct usb_device *dev,
+ struct usb_interface *interface);
+
+#define usb_endpoint_out(ep_dir) (!((ep_dir) & USB_DIR_IN))
+
+/*
+ * USB device fs stuff
+ */
+
+#ifdef CONFIG_USB_DEVICEFS
+
+/*
+ * these are expected to be called from the USB core/hub thread
+ * with the kernel lock held
+ */
+extern void usbfs_add_bus(struct usb_bus *bus);
+extern void usbfs_remove_bus(struct usb_bus *bus);
+extern void usbfs_add_device(struct usb_device *dev);
+extern void usbfs_remove_device(struct usb_device *dev);
+extern void usbfs_update_special (void);
+
+extern int usbfs_init(void);
+extern void usbfs_cleanup(void);
+
+#else /* CONFIG_USB_DEVICEFS */
+
+static inline void usbfs_add_bus(struct usb_bus *bus) {}
+static inline void usbfs_remove_bus(struct usb_bus *bus) {}
+static inline void usbfs_add_device(struct usb_device *dev) {}
+static inline void usbfs_remove_device(struct usb_device *dev) {}
+static inline void usbfs_update_special (void) {}
+
+static inline int usbfs_init(void) { return 0; }
+static inline void usbfs_cleanup(void) { }
+
+#endif /* CONFIG_USB_DEVICEFS */
+
+/*-------------------------------------------------------------------------*/
+
+#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
+
+struct usb_mon_operations {
+ void (*urb_submit)(struct usb_bus *bus, struct urb *urb);
+ void (*urb_submit_error)(struct usb_bus *bus, struct urb *urb, int err);
+ void (*urb_complete)(struct usb_bus *bus, struct urb *urb);
+ /* void (*urb_unlink)(struct usb_bus *bus, struct urb *urb); */
+ void (*bus_add)(struct usb_bus *bus);
+ void (*bus_remove)(struct usb_bus *bus);
+};
+
+extern struct usb_mon_operations *mon_ops;
+
+static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb)
+{
+ if (bus->monitored)
+ (*mon_ops->urb_submit)(bus, urb);
+}
+
+static inline void usbmon_urb_submit_error(struct usb_bus *bus, struct urb *urb,
+ int error)
+{
+ if (bus->monitored)
+ (*mon_ops->urb_submit_error)(bus, urb, error);
+}
+
+static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb)
+{
+ if (bus->monitored)
+ (*mon_ops->urb_complete)(bus, urb);
+}
+
+static inline void usbmon_notify_bus_add(struct usb_bus *bus)
+{
+ if (mon_ops)
+ (*mon_ops->bus_add)(bus);
+}
+
+static inline void usbmon_notify_bus_remove(struct usb_bus *bus)
+{
+ if (mon_ops)
+ (*mon_ops->bus_remove)(bus);
+}
+
+int usb_mon_register(struct usb_mon_operations *ops);
+void usb_mon_deregister(void);
+
+#else
+
+static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb) {}
+static inline void usbmon_urb_submit_error(struct usb_bus *bus, struct urb *urb,
+ int error) {}
+static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb) {}
+static inline void usbmon_notify_bus_add(struct usb_bus *bus) {}
+static inline void usbmon_notify_bus_remove(struct usb_bus *bus) {}
+
+#endif /* CONFIG_USB_MON */
+
+/*-------------------------------------------------------------------------*/
+
+/* hub.h ... DeviceRemovable in 2.4.2-ac11, gone in 2.4.10 */
+// bleech -- resurfaced in 2.4.11 or 2.4.12
+#define bitmap DeviceRemovable
+
+
+/*-------------------------------------------------------------------------*/
+
+/* random stuff */
+
+#define RUN_CONTEXT (in_irq () ? "in_irq" \
+ : (in_interrupt () ? "in_interrupt" : "can sleep"))
+
+
+#endif /* __KERNEL__ */
+
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
new file mode 100644
index 000000000000..fa0dc4f6de47
--- /dev/null
+++ b/drivers/usb/core/hub.c
@@ -0,0 +1,3057 @@
+/*
+ * USB hub driver.
+ *
+ * (C) Copyright 1999 Linus Torvalds
+ * (C) Copyright 1999 Johannes Erdfelt
+ * (C) Copyright 1999 Gregory P. Smith
+ * (C) Copyright 2001 Brad Hards (bhards@bigpond.net.au)
+ *
+ */
+
+#include <linux/config.h>
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/completion.h>
+#include <linux/sched.h>
+#include <linux/list.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/ioctl.h>
+#include <linux/usb.h>
+#include <linux/usbdevice_fs.h>
+
+#include <asm/semaphore.h>
+#include <asm/uaccess.h>
+#include <asm/byteorder.h>
+
+#include "usb.h"
+#include "hcd.h"
+#include "hub.h"
+
+/* Protect struct usb_device->state and ->children members
+ * Note: Both are also protected by ->serialize, except that ->state can
+ * change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */
+static DEFINE_SPINLOCK(device_state_lock);
+
+/* khubd's worklist and its lock */
+static DEFINE_SPINLOCK(hub_event_lock);
+static LIST_HEAD(hub_event_list); /* List of hubs needing servicing */
+
+/* Wakes up khubd */
+static DECLARE_WAIT_QUEUE_HEAD(khubd_wait);
+
+static pid_t khubd_pid = 0; /* PID of khubd */
+static DECLARE_COMPLETION(khubd_exited);
+
+/* cycle leds on hubs that aren't blinking for attention */
+static int blinkenlights = 0;
+module_param (blinkenlights, bool, S_IRUGO);
+MODULE_PARM_DESC (blinkenlights, "true to cycle leds on hubs");
+
+/*
+ * As of 2.6.10 we introduce a new USB device initialization scheme which
+ * closely resembles the way Windows works. Hopefully it will be compatible
+ * with a wider range of devices than the old scheme. However some previously
+ * working devices may start giving rise to "device not accepting address"
+ * errors; if that happens the user can try the old scheme by adjusting the
+ * following module parameters.
+ *
+ * For maximum flexibility there are two boolean parameters to control the
+ * hub driver's behavior. On the first initialization attempt, if the
+ * "old_scheme_first" parameter is set then the old scheme will be used,
+ * otherwise the new scheme is used. If that fails and "use_both_schemes"
+ * is set, then the driver will make another attempt, using the other scheme.
+ */
+static int old_scheme_first = 0;
+module_param(old_scheme_first, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(old_scheme_first,
+ "start with the old device initialization scheme");
+
+static int use_both_schemes = 1;
+module_param(use_both_schemes, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(use_both_schemes,
+ "try the other device initialization scheme if the "
+ "first one fails");
+
+
+#ifdef DEBUG
+static inline char *portspeed (int portstatus)
+{
+ if (portstatus & (1 << USB_PORT_FEAT_HIGHSPEED))
+ return "480 Mb/s";
+ else if (portstatus & (1 << USB_PORT_FEAT_LOWSPEED))
+ return "1.5 Mb/s";
+ else
+ return "12 Mb/s";
+}
+#endif
+
+/* Note that hdev or one of its children must be locked! */
+static inline struct usb_hub *hdev_to_hub(struct usb_device *hdev)
+{
+ return usb_get_intfdata(hdev->actconfig->interface[0]);
+}
+
+/* USB 2.0 spec Section 11.24.4.5 */
+static int get_hub_descriptor(struct usb_device *hdev, void *data, int size)
+{
+ int i, ret;
+
+ for (i = 0; i < 3; i++) {
+ ret = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
+ USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB,
+ USB_DT_HUB << 8, 0, data, size,
+ USB_CTRL_GET_TIMEOUT);
+ if (ret >= (USB_DT_HUB_NONVAR_SIZE + 2))
+ return ret;
+ }
+ return -EINVAL;
+}
+
+/*
+ * USB 2.0 spec Section 11.24.2.1
+ */
+static int clear_hub_feature(struct usb_device *hdev, int feature)
+{
+ return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
+ USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, 0, NULL, 0, 1000);
+}
+
+/*
+ * USB 2.0 spec Section 11.24.2.2
+ */
+static int clear_port_feature(struct usb_device *hdev, int port1, int feature)
+{
+ return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
+ USB_REQ_CLEAR_FEATURE, USB_RT_PORT, feature, port1,
+ NULL, 0, 1000);
+}
+
+/*
+ * USB 2.0 spec Section 11.24.2.13
+ */
+static int set_port_feature(struct usb_device *hdev, int port1, int feature)
+{
+ return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
+ USB_REQ_SET_FEATURE, USB_RT_PORT, feature, port1,
+ NULL, 0, 1000);
+}
+
+/*
+ * USB 2.0 spec Section 11.24.2.7.1.10 and table 11-7
+ * for info about using port indicators
+ */
+static void set_port_led(
+ struct usb_hub *hub,
+ int port1,
+ int selector
+)
+{
+ int status = set_port_feature(hub->hdev, (selector << 8) | port1,
+ USB_PORT_FEAT_INDICATOR);
+ if (status < 0)
+ dev_dbg (hub->intfdev,
+ "port %d indicator %s status %d\n",
+ port1,
+ ({ char *s; switch (selector) {
+ case HUB_LED_AMBER: s = "amber"; break;
+ case HUB_LED_GREEN: s = "green"; break;
+ case HUB_LED_OFF: s = "off"; break;
+ case HUB_LED_AUTO: s = "auto"; break;
+ default: s = "??"; break;
+ }; s; }),
+ status);
+}
+
+#define LED_CYCLE_PERIOD ((2*HZ)/3)
+
+static void led_work (void *__hub)
+{
+ struct usb_hub *hub = __hub;
+ struct usb_device *hdev = hub->hdev;
+ unsigned i;
+ unsigned changed = 0;
+ int cursor = -1;
+
+ if (hdev->state != USB_STATE_CONFIGURED || hub->quiescing)
+ return;
+
+ for (i = 0; i < hub->descriptor->bNbrPorts; i++) {
+ unsigned selector, mode;
+
+ /* 30%-50% duty cycle */
+
+ switch (hub->indicator[i]) {
+ /* cycle marker */
+ case INDICATOR_CYCLE:
+ cursor = i;
+ selector = HUB_LED_AUTO;
+ mode = INDICATOR_AUTO;
+ break;
+ /* blinking green = sw attention */
+ case INDICATOR_GREEN_BLINK:
+ selector = HUB_LED_GREEN;
+ mode = INDICATOR_GREEN_BLINK_OFF;
+ break;
+ case INDICATOR_GREEN_BLINK_OFF:
+ selector = HUB_LED_OFF;
+ mode = INDICATOR_GREEN_BLINK;
+ break;
+ /* blinking amber = hw attention */
+ case INDICATOR_AMBER_BLINK:
+ selector = HUB_LED_AMBER;
+ mode = INDICATOR_AMBER_BLINK_OFF;
+ break;
+ case INDICATOR_AMBER_BLINK_OFF:
+ selector = HUB_LED_OFF;
+ mode = INDICATOR_AMBER_BLINK;
+ break;
+ /* blink green/amber = reserved */
+ case INDICATOR_ALT_BLINK:
+ selector = HUB_LED_GREEN;
+ mode = INDICATOR_ALT_BLINK_OFF;
+ break;
+ case INDICATOR_ALT_BLINK_OFF:
+ selector = HUB_LED_AMBER;
+ mode = INDICATOR_ALT_BLINK;
+ break;
+ default:
+ continue;
+ }
+ if (selector != HUB_LED_AUTO)
+ changed = 1;
+ set_port_led(hub, i + 1, selector);
+ hub->indicator[i] = mode;
+ }
+ if (!changed && blinkenlights) {
+ cursor++;
+ cursor %= hub->descriptor->bNbrPorts;
+ set_port_led(hub, cursor + 1, HUB_LED_GREEN);
+ hub->indicator[cursor] = INDICATOR_CYCLE;
+ changed++;
+ }
+ if (changed)
+ schedule_delayed_work(&hub->leds, LED_CYCLE_PERIOD);
+}
+
+/* use a short timeout for hub/port status fetches */
+#define USB_STS_TIMEOUT 1000
+#define USB_STS_RETRIES 5
+
+/*
+ * USB 2.0 spec Section 11.24.2.6
+ */
+static int get_hub_status(struct usb_device *hdev,
+ struct usb_hub_status *data)
+{
+ int i, status = -ETIMEDOUT;
+
+ for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) {
+ status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
+ USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0,
+ data, sizeof(*data), USB_STS_TIMEOUT);
+ }
+ return status;
+}
+
+/*
+ * USB 2.0 spec Section 11.24.2.7
+ */
+static int get_port_status(struct usb_device *hdev, int port1,
+ struct usb_port_status *data)
+{
+ int i, status = -ETIMEDOUT;
+
+ for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) {
+ status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
+ USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port1,
+ data, sizeof(*data), USB_STS_TIMEOUT);
+ }
+ return status;
+}
+
+static void kick_khubd(struct usb_hub *hub)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&hub_event_lock, flags);
+ if (list_empty(&hub->event_list)) {
+ list_add_tail(&hub->event_list, &hub_event_list);
+ wake_up(&khubd_wait);
+ }
+ spin_unlock_irqrestore(&hub_event_lock, flags);
+}
+
+void usb_kick_khubd(struct usb_device *hdev)
+{
+ kick_khubd(hdev_to_hub(hdev));
+}
+
+
+/* completion function, fires on port status changes and various faults */
+static void hub_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_hub *hub = (struct usb_hub *)urb->context;
+ int status;
+ int i;
+ unsigned long bits;
+
+ switch (urb->status) {
+ case -ENOENT: /* synchronous unlink */
+ case -ECONNRESET: /* async unlink */
+ case -ESHUTDOWN: /* hardware going away */
+ return;
+
+ default: /* presumably an error */
+ /* Cause a hub reset after 10 consecutive errors */
+ dev_dbg (hub->intfdev, "transfer --> %d\n", urb->status);
+ if ((++hub->nerrors < 10) || hub->error)
+ goto resubmit;
+ hub->error = urb->status;
+ /* FALL THROUGH */
+
+ /* let khubd handle things */
+ case 0: /* we got data: port status changed */
+ bits = 0;
+ for (i = 0; i < urb->actual_length; ++i)
+ bits |= ((unsigned long) ((*hub->buffer)[i]))
+ << (i*8);
+ hub->event_bits[0] = bits;
+ break;
+ }
+
+ hub->nerrors = 0;
+
+ /* Something happened, let khubd figure it out */
+ kick_khubd(hub);
+
+resubmit:
+ if (hub->quiescing)
+ return;
+
+ if ((status = usb_submit_urb (hub->urb, GFP_ATOMIC)) != 0
+ && status != -ENODEV && status != -EPERM)
+ dev_err (hub->intfdev, "resubmit --> %d\n", status);
+}
+
+/* USB 2.0 spec Section 11.24.2.3 */
+static inline int
+hub_clear_tt_buffer (struct usb_device *hdev, u16 devinfo, u16 tt)
+{
+ return usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
+ HUB_CLEAR_TT_BUFFER, USB_RT_PORT, devinfo,
+ tt, NULL, 0, 1000);
+}
+
+/*
+ * enumeration blocks khubd for a long time. we use keventd instead, since
+ * long blocking there is the exception, not the rule. accordingly, HCDs
+ * talking to TTs must queue control transfers (not just bulk and iso), so
+ * both can talk to the same hub concurrently.
+ */
+static void hub_tt_kevent (void *arg)
+{
+ struct usb_hub *hub = arg;
+ unsigned long flags;
+
+ spin_lock_irqsave (&hub->tt.lock, flags);
+ while (!list_empty (&hub->tt.clear_list)) {
+ struct list_head *temp;
+ struct usb_tt_clear *clear;
+ struct usb_device *hdev = hub->hdev;
+ int status;
+
+ temp = hub->tt.clear_list.next;
+ clear = list_entry (temp, struct usb_tt_clear, clear_list);
+ list_del (&clear->clear_list);
+
+ /* drop lock so HCD can concurrently report other TT errors */
+ spin_unlock_irqrestore (&hub->tt.lock, flags);
+ status = hub_clear_tt_buffer (hdev, clear->devinfo, clear->tt);
+ spin_lock_irqsave (&hub->tt.lock, flags);
+
+ if (status)
+ dev_err (&hdev->dev,
+ "clear tt %d (%04x) error %d\n",
+ clear->tt, clear->devinfo, status);
+ kfree (clear);
+ }
+ spin_unlock_irqrestore (&hub->tt.lock, flags);
+}
+
+/**
+ * usb_hub_tt_clear_buffer - clear control/bulk TT state in high speed hub
+ * @udev: the device whose split transaction failed
+ * @pipe: identifies the endpoint of the failed transaction
+ *
+ * High speed HCDs use this to tell the hub driver that some split control or
+ * bulk transaction failed in a way that requires clearing internal state of
+ * a transaction translator. This is normally detected (and reported) from
+ * interrupt context.
+ *
+ * It may not be possible for that hub to handle additional full (or low)
+ * speed transactions until that state is fully cleared out.
+ */
+void usb_hub_tt_clear_buffer (struct usb_device *udev, int pipe)
+{
+ struct usb_tt *tt = udev->tt;
+ unsigned long flags;
+ struct usb_tt_clear *clear;
+
+ /* we've got to cope with an arbitrary number of pending TT clears,
+ * since each TT has "at least two" buffers that can need it (and
+ * there can be many TTs per hub). even if they're uncommon.
+ */
+ if ((clear = kmalloc (sizeof *clear, SLAB_ATOMIC)) == NULL) {
+ dev_err (&udev->dev, "can't save CLEAR_TT_BUFFER state\n");
+ /* FIXME recover somehow ... RESET_TT? */
+ return;
+ }
+
+ /* info that CLEAR_TT_BUFFER needs */
+ clear->tt = tt->multi ? udev->ttport : 1;
+ clear->devinfo = usb_pipeendpoint (pipe);
+ clear->devinfo |= udev->devnum << 4;
+ clear->devinfo |= usb_pipecontrol (pipe)
+ ? (USB_ENDPOINT_XFER_CONTROL << 11)
+ : (USB_ENDPOINT_XFER_BULK << 11);
+ if (usb_pipein (pipe))
+ clear->devinfo |= 1 << 15;
+
+ /* tell keventd to clear state for this TT */
+ spin_lock_irqsave (&tt->lock, flags);
+ list_add_tail (&clear->clear_list, &tt->clear_list);
+ schedule_work (&tt->kevent);
+ spin_unlock_irqrestore (&tt->lock, flags);
+}
+
+static void hub_power_on(struct usb_hub *hub)
+{
+ int port1;
+
+ /* if hub supports power switching, enable power on each port */
+ if ((hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) < 2) {
+ dev_dbg(hub->intfdev, "enabling power on all ports\n");
+ for (port1 = 1; port1 <= hub->descriptor->bNbrPorts; port1++)
+ set_port_feature(hub->hdev, port1,
+ USB_PORT_FEAT_POWER);
+ }
+
+ /* Wait for power to be enabled */
+ msleep(hub->descriptor->bPwrOn2PwrGood * 2);
+}
+
+static void hub_quiesce(struct usb_hub *hub)
+{
+ /* stop khubd and related activity */
+ hub->quiescing = 1;
+ usb_kill_urb(hub->urb);
+ if (hub->has_indicators)
+ cancel_delayed_work(&hub->leds);
+ if (hub->has_indicators || hub->tt.hub)
+ flush_scheduled_work();
+}
+
+static void hub_activate(struct usb_hub *hub)
+{
+ int status;
+
+ hub->quiescing = 0;
+ hub->activating = 1;
+ status = usb_submit_urb(hub->urb, GFP_NOIO);
+ if (status < 0)
+ dev_err(hub->intfdev, "activate --> %d\n", status);
+ if (hub->has_indicators && blinkenlights)
+ schedule_delayed_work(&hub->leds, LED_CYCLE_PERIOD);
+
+ /* scan all ports ASAP */
+ kick_khubd(hub);
+}
+
+static int hub_hub_status(struct usb_hub *hub,
+ u16 *status, u16 *change)
+{
+ int ret;
+
+ ret = get_hub_status(hub->hdev, &hub->status->hub);
+ if (ret < 0)
+ dev_err (hub->intfdev,
+ "%s failed (err = %d)\n", __FUNCTION__, ret);
+ else {
+ *status = le16_to_cpu(hub->status->hub.wHubStatus);
+ *change = le16_to_cpu(hub->status->hub.wHubChange);
+ ret = 0;
+ }
+ return ret;
+}
+
+static int hub_configure(struct usb_hub *hub,
+ struct usb_endpoint_descriptor *endpoint)
+{
+ struct usb_device *hdev = hub->hdev;
+ struct device *hub_dev = hub->intfdev;
+ u16 hubstatus, hubchange;
+ unsigned int pipe;
+ int maxp, ret;
+ char *message;
+
+ hub->buffer = usb_buffer_alloc(hdev, sizeof(*hub->buffer), GFP_KERNEL,
+ &hub->buffer_dma);
+ if (!hub->buffer) {
+ message = "can't allocate hub irq buffer";
+ ret = -ENOMEM;
+ goto fail;
+ }
+
+ hub->status = kmalloc(sizeof(*hub->status), GFP_KERNEL);
+ if (!hub->status) {
+ message = "can't kmalloc hub status buffer";
+ ret = -ENOMEM;
+ goto fail;
+ }
+
+ hub->descriptor = kmalloc(sizeof(*hub->descriptor), GFP_KERNEL);
+ if (!hub->descriptor) {
+ message = "can't kmalloc hub descriptor";
+ ret = -ENOMEM;
+ goto fail;
+ }
+
+ /* Request the entire hub descriptor.
+ * hub->descriptor can handle USB_MAXCHILDREN ports,
+ * but the hub can/will return fewer bytes here.
+ */
+ ret = get_hub_descriptor(hdev, hub->descriptor,
+ sizeof(*hub->descriptor));
+ if (ret < 0) {
+ message = "can't read hub descriptor";
+ goto fail;
+ } else if (hub->descriptor->bNbrPorts > USB_MAXCHILDREN) {
+ message = "hub has too many ports!";
+ ret = -ENODEV;
+ goto fail;
+ }
+
+ hdev->maxchild = hub->descriptor->bNbrPorts;
+ dev_info (hub_dev, "%d port%s detected\n", hdev->maxchild,
+ (hdev->maxchild == 1) ? "" : "s");
+
+ le16_to_cpus(&hub->descriptor->wHubCharacteristics);
+
+ if (hub->descriptor->wHubCharacteristics & HUB_CHAR_COMPOUND) {
+ int i;
+ char portstr [USB_MAXCHILDREN + 1];
+
+ for (i = 0; i < hdev->maxchild; i++)
+ portstr[i] = hub->descriptor->DeviceRemovable
+ [((i + 1) / 8)] & (1 << ((i + 1) % 8))
+ ? 'F' : 'R';
+ portstr[hdev->maxchild] = 0;
+ dev_dbg(hub_dev, "compound device; port removable status: %s\n", portstr);
+ } else
+ dev_dbg(hub_dev, "standalone hub\n");
+
+ switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) {
+ case 0x00:
+ dev_dbg(hub_dev, "ganged power switching\n");
+ break;
+ case 0x01:
+ dev_dbg(hub_dev, "individual port power switching\n");
+ break;
+ case 0x02:
+ case 0x03:
+ dev_dbg(hub_dev, "no power switching (usb 1.0)\n");
+ break;
+ }
+
+ switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_OCPM) {
+ case 0x00:
+ dev_dbg(hub_dev, "global over-current protection\n");
+ break;
+ case 0x08:
+ dev_dbg(hub_dev, "individual port over-current protection\n");
+ break;
+ case 0x10:
+ case 0x18:
+ dev_dbg(hub_dev, "no over-current protection\n");
+ break;
+ }
+
+ spin_lock_init (&hub->tt.lock);
+ INIT_LIST_HEAD (&hub->tt.clear_list);
+ INIT_WORK (&hub->tt.kevent, hub_tt_kevent, hub);
+ switch (hdev->descriptor.bDeviceProtocol) {
+ case 0:
+ break;
+ case 1:
+ dev_dbg(hub_dev, "Single TT\n");
+ hub->tt.hub = hdev;
+ break;
+ case 2:
+ ret = usb_set_interface(hdev, 0, 1);
+ if (ret == 0) {
+ dev_dbg(hub_dev, "TT per port\n");
+ hub->tt.multi = 1;
+ } else
+ dev_err(hub_dev, "Using single TT (err %d)\n",
+ ret);
+ hub->tt.hub = hdev;
+ break;
+ default:
+ dev_dbg(hub_dev, "Unrecognized hub protocol %d\n",
+ hdev->descriptor.bDeviceProtocol);
+ break;
+ }
+
+ switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_TTTT) {
+ case 0x00:
+ if (hdev->descriptor.bDeviceProtocol != 0)
+ dev_dbg(hub_dev, "TT requires at most 8 FS bit times\n");
+ break;
+ case 0x20:
+ dev_dbg(hub_dev, "TT requires at most 16 FS bit times\n");
+ break;
+ case 0x40:
+ dev_dbg(hub_dev, "TT requires at most 24 FS bit times\n");
+ break;
+ case 0x60:
+ dev_dbg(hub_dev, "TT requires at most 32 FS bit times\n");
+ break;
+ }
+
+ /* probe() zeroes hub->indicator[] */
+ if (hub->descriptor->wHubCharacteristics & HUB_CHAR_PORTIND) {
+ hub->has_indicators = 1;
+ dev_dbg(hub_dev, "Port indicators are supported\n");
+ }
+
+ dev_dbg(hub_dev, "power on to power good time: %dms\n",
+ hub->descriptor->bPwrOn2PwrGood * 2);
+
+ /* power budgeting mostly matters with bus-powered hubs,
+ * and battery-powered root hubs (may provide just 8 mA).
+ */
+ ret = usb_get_status(hdev, USB_RECIP_DEVICE, 0, &hubstatus);
+ if (ret < 0) {
+ message = "can't get hub status";
+ goto fail;
+ }
+ cpu_to_le16s(&hubstatus);
+ if ((hubstatus & (1 << USB_DEVICE_SELF_POWERED)) == 0) {
+ dev_dbg(hub_dev, "hub controller current requirement: %dmA\n",
+ hub->descriptor->bHubContrCurrent);
+ hub->power_budget = (501 - hub->descriptor->bHubContrCurrent)
+ / 2;
+ dev_dbg(hub_dev, "%dmA bus power budget for children\n",
+ hub->power_budget * 2);
+ }
+
+
+ ret = hub_hub_status(hub, &hubstatus, &hubchange);
+ if (ret < 0) {
+ message = "can't get hub status";
+ goto fail;
+ }
+
+ /* local power status reports aren't always correct */
+ if (hdev->actconfig->desc.bmAttributes & USB_CONFIG_ATT_SELFPOWER)
+ dev_dbg(hub_dev, "local power source is %s\n",
+ (hubstatus & HUB_STATUS_LOCAL_POWER)
+ ? "lost (inactive)" : "good");
+
+ if ((hub->descriptor->wHubCharacteristics & HUB_CHAR_OCPM) == 0)
+ dev_dbg(hub_dev, "%sover-current condition exists\n",
+ (hubstatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
+
+ /* set up the interrupt endpoint */
+ pipe = usb_rcvintpipe(hdev, endpoint->bEndpointAddress);
+ maxp = usb_maxpacket(hdev, pipe, usb_pipeout(pipe));
+
+ if (maxp > sizeof(*hub->buffer))
+ maxp = sizeof(*hub->buffer);
+
+ hub->urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!hub->urb) {
+ message = "couldn't allocate interrupt urb";
+ ret = -ENOMEM;
+ goto fail;
+ }
+
+ usb_fill_int_urb(hub->urb, hdev, pipe, *hub->buffer, maxp, hub_irq,
+ hub, endpoint->bInterval);
+ hub->urb->transfer_dma = hub->buffer_dma;
+ hub->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ /* maybe cycle the hub leds */
+ if (hub->has_indicators && blinkenlights)
+ hub->indicator [0] = INDICATOR_CYCLE;
+
+ hub_power_on(hub);
+ hub_activate(hub);
+ return 0;
+
+fail:
+ dev_err (hub_dev, "config failed, %s (err %d)\n",
+ message, ret);
+ /* hub_disconnect() frees urb and descriptor */
+ return ret;
+}
+
+static unsigned highspeed_hubs;
+
+static void hub_disconnect(struct usb_interface *intf)
+{
+ struct usb_hub *hub = usb_get_intfdata (intf);
+ struct usb_device *hdev;
+
+ if (!hub)
+ return;
+ hdev = hub->hdev;
+
+ if (hdev->speed == USB_SPEED_HIGH)
+ highspeed_hubs--;
+
+ usb_set_intfdata (intf, NULL);
+
+ hub_quiesce(hub);
+ usb_free_urb(hub->urb);
+ hub->urb = NULL;
+
+ spin_lock_irq(&hub_event_lock);
+ list_del_init(&hub->event_list);
+ spin_unlock_irq(&hub_event_lock);
+
+ if (hub->descriptor) {
+ kfree(hub->descriptor);
+ hub->descriptor = NULL;
+ }
+
+ if (hub->status) {
+ kfree(hub->status);
+ hub->status = NULL;
+ }
+
+ if (hub->buffer) {
+ usb_buffer_free(hdev, sizeof(*hub->buffer), hub->buffer,
+ hub->buffer_dma);
+ hub->buffer = NULL;
+ }
+
+ /* Free the memory */
+ kfree(hub);
+}
+
+static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_host_interface *desc;
+ struct usb_endpoint_descriptor *endpoint;
+ struct usb_device *hdev;
+ struct usb_hub *hub;
+
+ desc = intf->cur_altsetting;
+ hdev = interface_to_usbdev(intf);
+
+ /* Some hubs have a subclass of 1, which AFAICT according to the */
+ /* specs is not defined, but it works */
+ if ((desc->desc.bInterfaceSubClass != 0) &&
+ (desc->desc.bInterfaceSubClass != 1)) {
+descriptor_error:
+ dev_err (&intf->dev, "bad descriptor, ignoring hub\n");
+ return -EIO;
+ }
+
+ /* Multiple endpoints? What kind of mutant ninja-hub is this? */
+ if (desc->desc.bNumEndpoints != 1)
+ goto descriptor_error;
+
+ endpoint = &desc->endpoint[0].desc;
+
+ /* Output endpoint? Curiouser and curiouser.. */
+ if (!(endpoint->bEndpointAddress & USB_DIR_IN))
+ goto descriptor_error;
+
+ /* If it's not an interrupt endpoint, we'd better punt! */
+ if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ != USB_ENDPOINT_XFER_INT)
+ goto descriptor_error;
+
+ /* We found a hub */
+ dev_info (&intf->dev, "USB hub found\n");
+
+ hub = kmalloc(sizeof(*hub), GFP_KERNEL);
+ if (!hub) {
+ dev_dbg (&intf->dev, "couldn't kmalloc hub struct\n");
+ return -ENOMEM;
+ }
+
+ memset(hub, 0, sizeof(*hub));
+
+ INIT_LIST_HEAD(&hub->event_list);
+ hub->intfdev = &intf->dev;
+ hub->hdev = hdev;
+ INIT_WORK(&hub->leds, led_work, hub);
+
+ usb_set_intfdata (intf, hub);
+
+ if (hdev->speed == USB_SPEED_HIGH)
+ highspeed_hubs++;
+
+ if (hub_configure(hub, endpoint) >= 0)
+ return 0;
+
+ hub_disconnect (intf);
+ return -ENODEV;
+}
+
+static int
+hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data)
+{
+ struct usb_device *hdev = interface_to_usbdev (intf);
+
+ /* assert ifno == 0 (part of hub spec) */
+ switch (code) {
+ case USBDEVFS_HUB_PORTINFO: {
+ struct usbdevfs_hub_portinfo *info = user_data;
+ int i;
+
+ spin_lock_irq(&device_state_lock);
+ if (hdev->devnum <= 0)
+ info->nports = 0;
+ else {
+ info->nports = hdev->maxchild;
+ for (i = 0; i < info->nports; i++) {
+ if (hdev->children[i] == NULL)
+ info->port[i] = 0;
+ else
+ info->port[i] =
+ hdev->children[i]->devnum;
+ }
+ }
+ spin_unlock_irq(&device_state_lock);
+
+ return info->nports + 1;
+ }
+
+ default:
+ return -ENOSYS;
+ }
+}
+
+/* caller has locked the hub device */
+static void hub_pre_reset(struct usb_hub *hub)
+{
+ struct usb_device *hdev = hub->hdev;
+ int i;
+
+ for (i = 0; i < hdev->maxchild; ++i) {
+ if (hdev->children[i])
+ usb_disconnect(&hdev->children[i]);
+ }
+ hub_quiesce(hub);
+}
+
+/* caller has locked the hub device */
+static void hub_post_reset(struct usb_hub *hub)
+{
+ hub_activate(hub);
+ hub_power_on(hub);
+}
+
+
+/* grab device/port lock, returning index of that port (zero based).
+ * protects the upstream link used by this device from concurrent
+ * tree operations like suspend, resume, reset, and disconnect, which
+ * apply to everything downstream of a given port.
+ */
+static int locktree(struct usb_device *udev)
+{
+ int t;
+ struct usb_device *hdev;
+
+ if (!udev)
+ return -ENODEV;
+
+ /* root hub is always the first lock in the series */
+ hdev = udev->parent;
+ if (!hdev) {
+ usb_lock_device(udev);
+ return 0;
+ }
+
+ /* on the path from root to us, lock everything from
+ * top down, dropping parent locks when not needed
+ */
+ t = locktree(hdev);
+ if (t < 0)
+ return t;
+ for (t = 0; t < hdev->maxchild; t++) {
+ if (hdev->children[t] == udev) {
+ /* everything is fail-fast once disconnect
+ * processing starts
+ */
+ if (udev->state == USB_STATE_NOTATTACHED)
+ break;
+
+ /* when everyone grabs locks top->bottom,
+ * non-overlapping work may be concurrent
+ */
+ down(&udev->serialize);
+ up(&hdev->serialize);
+ return t + 1;
+ }
+ }
+ usb_unlock_device(hdev);
+ return -ENODEV;
+}
+
+static void recursively_mark_NOTATTACHED(struct usb_device *udev)
+{
+ int i;
+
+ for (i = 0; i < udev->maxchild; ++i) {
+ if (udev->children[i])
+ recursively_mark_NOTATTACHED(udev->children[i]);
+ }
+ udev->state = USB_STATE_NOTATTACHED;
+}
+
+/**
+ * usb_set_device_state - change a device's current state (usbcore, hcds)
+ * @udev: pointer to device whose state should be changed
+ * @new_state: new state value to be stored
+ *
+ * udev->state is _not_ fully protected by the device lock. Although
+ * most transitions are made only while holding the lock, the state can
+ * can change to USB_STATE_NOTATTACHED at almost any time. This
+ * is so that devices can be marked as disconnected as soon as possible,
+ * without having to wait for any semaphores to be released. As a result,
+ * all changes to any device's state must be protected by the
+ * device_state_lock spinlock.
+ *
+ * Once a device has been added to the device tree, all changes to its state
+ * should be made using this routine. The state should _not_ be set directly.
+ *
+ * If udev->state is already USB_STATE_NOTATTACHED then no change is made.
+ * Otherwise udev->state is set to new_state, and if new_state is
+ * USB_STATE_NOTATTACHED then all of udev's descendants' states are also set
+ * to USB_STATE_NOTATTACHED.
+ */
+void usb_set_device_state(struct usb_device *udev,
+ enum usb_device_state new_state)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&device_state_lock, flags);
+ if (udev->state == USB_STATE_NOTATTACHED)
+ ; /* do nothing */
+ else if (new_state != USB_STATE_NOTATTACHED)
+ udev->state = new_state;
+ else
+ recursively_mark_NOTATTACHED(udev);
+ spin_unlock_irqrestore(&device_state_lock, flags);
+}
+EXPORT_SYMBOL(usb_set_device_state);
+
+
+static void choose_address(struct usb_device *udev)
+{
+ int devnum;
+ struct usb_bus *bus = udev->bus;
+
+ /* If khubd ever becomes multithreaded, this will need a lock */
+
+ /* Try to allocate the next devnum beginning at bus->devnum_next. */
+ devnum = find_next_zero_bit(bus->devmap.devicemap, 128,
+ bus->devnum_next);
+ if (devnum >= 128)
+ devnum = find_next_zero_bit(bus->devmap.devicemap, 128, 1);
+
+ bus->devnum_next = ( devnum >= 127 ? 1 : devnum + 1);
+
+ if (devnum < 128) {
+ set_bit(devnum, bus->devmap.devicemap);
+ udev->devnum = devnum;
+ }
+}
+
+static void release_address(struct usb_device *udev)
+{
+ if (udev->devnum > 0) {
+ clear_bit(udev->devnum, udev->bus->devmap.devicemap);
+ udev->devnum = -1;
+ }
+}
+
+/**
+ * usb_disconnect - disconnect a device (usbcore-internal)
+ * @pdev: pointer to device being disconnected
+ * Context: !in_interrupt ()
+ *
+ * Something got disconnected. Get rid of it and all of its children.
+ *
+ * If *pdev is a normal device then the parent hub must already be locked.
+ * If *pdev is a root hub then this routine will acquire the
+ * usb_bus_list_lock on behalf of the caller.
+ *
+ * Only hub drivers (including virtual root hub drivers for host
+ * controllers) should ever call this.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ */
+void usb_disconnect(struct usb_device **pdev)
+{
+ struct usb_device *udev = *pdev;
+ int i;
+
+ if (!udev) {
+ pr_debug ("%s nodev\n", __FUNCTION__);
+ return;
+ }
+
+ /* mark the device as inactive, so any further urb submissions for
+ * this device (and any of its children) will fail immediately.
+ * this quiesces everyting except pending urbs.
+ */
+ usb_set_device_state(udev, USB_STATE_NOTATTACHED);
+
+ /* lock the bus list on behalf of HCDs unregistering their root hubs */
+ if (!udev->parent) {
+ down(&usb_bus_list_lock);
+ usb_lock_device(udev);
+ } else
+ down(&udev->serialize);
+
+ dev_info (&udev->dev, "USB disconnect, address %d\n", udev->devnum);
+
+ /* Free up all the children before we remove this device */
+ for (i = 0; i < USB_MAXCHILDREN; i++) {
+ if (udev->children[i])
+ usb_disconnect(&udev->children[i]);
+ }
+
+ /* deallocate hcd/hardware state ... nuking all pending urbs and
+ * cleaning up all state associated with the current configuration
+ * so that the hardware is now fully quiesced.
+ */
+ usb_disable_device(udev, 0);
+
+ /* Free the device number, remove the /proc/bus/usb entry and
+ * the sysfs attributes, and delete the parent's children[]
+ * (or root_hub) pointer.
+ */
+ dev_dbg (&udev->dev, "unregistering device\n");
+ release_address(udev);
+ usbfs_remove_device(udev);
+ usb_remove_sysfs_dev_files(udev);
+
+ /* Avoid races with recursively_mark_NOTATTACHED() */
+ spin_lock_irq(&device_state_lock);
+ *pdev = NULL;
+ spin_unlock_irq(&device_state_lock);
+
+ if (!udev->parent) {
+ usb_unlock_device(udev);
+ up(&usb_bus_list_lock);
+ } else
+ up(&udev->serialize);
+
+ device_unregister(&udev->dev);
+}
+
+static int choose_configuration(struct usb_device *udev)
+{
+ int c, i;
+
+ /* NOTE: this should interact with hub power budgeting */
+
+ c = udev->config[0].desc.bConfigurationValue;
+ if (udev->descriptor.bNumConfigurations != 1) {
+ for (i = 0; i < udev->descriptor.bNumConfigurations; i++) {
+ struct usb_interface_descriptor *desc;
+
+ /* heuristic: Linux is more likely to have class
+ * drivers, so avoid vendor-specific interfaces.
+ */
+ desc = &udev->config[i].intf_cache[0]
+ ->altsetting->desc;
+ if (desc->bInterfaceClass == USB_CLASS_VENDOR_SPEC)
+ continue;
+ /* COMM/2/all is CDC ACM, except 0xff is MSFT RNDIS.
+ * MSFT needs this to be the first config; never use
+ * it as the default unless Linux has host-side RNDIS.
+ * A second config would ideally be CDC-Ethernet, but
+ * may instead be the "vendor specific" CDC subset
+ * long used by ARM Linux for sa1100 or pxa255.
+ */
+ if (desc->bInterfaceClass == USB_CLASS_COMM
+ && desc->bInterfaceSubClass == 2
+ && desc->bInterfaceProtocol == 0xff) {
+ c = udev->config[1].desc.bConfigurationValue;
+ continue;
+ }
+ c = udev->config[i].desc.bConfigurationValue;
+ break;
+ }
+ dev_info(&udev->dev,
+ "configuration #%d chosen from %d choices\n",
+ c, udev->descriptor.bNumConfigurations);
+ }
+ return c;
+}
+
+#ifdef DEBUG
+static void show_string(struct usb_device *udev, char *id, char *string)
+{
+ if (!string)
+ return;
+ dev_printk(KERN_INFO, &udev->dev, "%s: %s\n", id, string);
+}
+
+#else
+static inline void show_string(struct usb_device *udev, char *id, char *string)
+{}
+#endif
+
+static void get_string(struct usb_device *udev, char **string, int index)
+{
+ char *buf;
+
+ if (!index)
+ return;
+ buf = kmalloc(256, GFP_KERNEL);
+ if (!buf)
+ return;
+ if (usb_string(udev, index, buf, 256) > 0)
+ *string = buf;
+ else
+ kfree(buf);
+}
+
+
+#ifdef CONFIG_USB_OTG
+#include "otg_whitelist.h"
+#endif
+
+/**
+ * usb_new_device - perform initial device setup (usbcore-internal)
+ * @udev: newly addressed device (in ADDRESS state)
+ *
+ * This is called with devices which have been enumerated, but not yet
+ * configured. The device descriptor is available, but not descriptors
+ * for any device configuration. The caller must have locked udev and
+ * either the parent hub (if udev is a normal device) or else the
+ * usb_bus_list_lock (if udev is a root hub). The parent's pointer to
+ * udev has already been installed, but udev is not yet visible through
+ * sysfs or other filesystem code.
+ *
+ * Returns 0 for success (device is configured and listed, with its
+ * interfaces, in sysfs); else a negative errno value.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ *
+ * Only the hub driver should ever call this; root hub registration
+ * uses it indirectly.
+ */
+int usb_new_device(struct usb_device *udev)
+{
+ int err;
+ int c;
+
+ err = usb_get_configuration(udev);
+ if (err < 0) {
+ dev_err(&udev->dev, "can't read configurations, error %d\n",
+ err);
+ goto fail;
+ }
+
+ /* read the standard strings and cache them if present */
+ get_string(udev, &udev->product, udev->descriptor.iProduct);
+ get_string(udev, &udev->manufacturer, udev->descriptor.iManufacturer);
+ get_string(udev, &udev->serial, udev->descriptor.iSerialNumber);
+
+ /* Tell the world! */
+ dev_dbg(&udev->dev, "new device strings: Mfr=%d, Product=%d, "
+ "SerialNumber=%d\n",
+ udev->descriptor.iManufacturer,
+ udev->descriptor.iProduct,
+ udev->descriptor.iSerialNumber);
+ show_string(udev, "Product", udev->product);
+ show_string(udev, "Manufacturer", udev->manufacturer);
+ show_string(udev, "SerialNumber", udev->serial);
+
+#ifdef CONFIG_USB_OTG
+ /*
+ * OTG-aware devices on OTG-capable root hubs may be able to use SRP,
+ * to wake us after we've powered off VBUS; and HNP, switching roles
+ * "host" to "peripheral". The OTG descriptor helps figure this out.
+ */
+ if (!udev->bus->is_b_host
+ && udev->config
+ && udev->parent == udev->bus->root_hub) {
+ struct usb_otg_descriptor *desc = 0;
+ struct usb_bus *bus = udev->bus;
+
+ /* descriptor may appear anywhere in config */
+ if (__usb_get_extra_descriptor (udev->rawdescriptors[0],
+ le16_to_cpu(udev->config[0].desc.wTotalLength),
+ USB_DT_OTG, (void **) &desc) == 0) {
+ if (desc->bmAttributes & USB_OTG_HNP) {
+ unsigned port1;
+ struct usb_device *root = udev->parent;
+
+ for (port1 = 1; port1 <= root->maxchild;
+ port1++) {
+ if (root->children[port1-1] == udev)
+ break;
+ }
+
+ dev_info(&udev->dev,
+ "Dual-Role OTG device on %sHNP port\n",
+ (port1 == bus->otg_port)
+ ? "" : "non-");
+
+ /* enable HNP before suspend, it's simpler */
+ if (port1 == bus->otg_port)
+ bus->b_hnp_enable = 1;
+ err = usb_control_msg(udev,
+ usb_sndctrlpipe(udev, 0),
+ USB_REQ_SET_FEATURE, 0,
+ bus->b_hnp_enable
+ ? USB_DEVICE_B_HNP_ENABLE
+ : USB_DEVICE_A_ALT_HNP_SUPPORT,
+ 0, NULL, 0, USB_CTRL_SET_TIMEOUT);
+ if (err < 0) {
+ /* OTG MESSAGE: report errors here,
+ * customize to match your product.
+ */
+ dev_info(&udev->dev,
+ "can't set HNP mode; %d\n",
+ err);
+ bus->b_hnp_enable = 0;
+ }
+ }
+ }
+ }
+
+ if (!is_targeted(udev)) {
+
+ /* Maybe it can talk to us, though we can't talk to it.
+ * (Includes HNP test device.)
+ */
+ if (udev->bus->b_hnp_enable || udev->bus->is_b_host) {
+ static int __usb_suspend_device (struct usb_device *,
+ int port1, pm_message_t state);
+ err = __usb_suspend_device(udev,
+ udev->bus->otg_port,
+ PMSG_SUSPEND);
+ if (err < 0)
+ dev_dbg(&udev->dev, "HNP fail, %d\n", err);
+ }
+ err = -ENODEV;
+ goto fail;
+ }
+#endif
+
+ /* put device-specific files into sysfs */
+ err = device_add (&udev->dev);
+ if (err) {
+ dev_err(&udev->dev, "can't device_add, error %d\n", err);
+ goto fail;
+ }
+ usb_create_sysfs_dev_files (udev);
+
+ /* choose and set the configuration. that registers the interfaces
+ * with the driver core, and lets usb device drivers bind to them.
+ */
+ c = choose_configuration(udev);
+ if (c < 0)
+ dev_warn(&udev->dev,
+ "can't choose an initial configuration\n");
+ else {
+ err = usb_set_configuration(udev, c);
+ if (err) {
+ dev_err(&udev->dev, "can't set config #%d, error %d\n",
+ c, err);
+ usb_remove_sysfs_dev_files(udev);
+ device_del(&udev->dev);
+ goto fail;
+ }
+ }
+
+ /* USB device state == configured ... usable */
+
+ /* add a /proc/bus/usb entry */
+ usbfs_add_device(udev);
+ return 0;
+
+fail:
+ usb_set_device_state(udev, USB_STATE_NOTATTACHED);
+ return err;
+}
+
+
+static int hub_port_status(struct usb_hub *hub, int port1,
+ u16 *status, u16 *change)
+{
+ int ret;
+
+ ret = get_port_status(hub->hdev, port1, &hub->status->port);
+ if (ret < 0)
+ dev_err (hub->intfdev,
+ "%s failed (err = %d)\n", __FUNCTION__, ret);
+ else {
+ *status = le16_to_cpu(hub->status->port.wPortStatus);
+ *change = le16_to_cpu(hub->status->port.wPortChange);
+ ret = 0;
+ }
+ return ret;
+}
+
+#define PORT_RESET_TRIES 5
+#define SET_ADDRESS_TRIES 2
+#define GET_DESCRIPTOR_TRIES 2
+#define SET_CONFIG_TRIES (2 * (use_both_schemes + 1))
+#define USE_NEW_SCHEME(i) ((i) / 2 == old_scheme_first)
+
+#define HUB_ROOT_RESET_TIME 50 /* times are in msec */
+#define HUB_SHORT_RESET_TIME 10
+#define HUB_LONG_RESET_TIME 200
+#define HUB_RESET_TIMEOUT 500
+
+static int hub_port_wait_reset(struct usb_hub *hub, int port1,
+ struct usb_device *udev, 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 */
+ msleep(delay);
+
+ /* read and decode port status */
+ ret = hub_port_status(hub, port1, &portstatus, &portchange);
+ if (ret < 0)
+ return ret;
+
+ /* Device went away? */
+ if (!(portstatus & USB_PORT_STAT_CONNECTION))
+ return -ENOTCONN;
+
+ /* bomb out completely if something weird happened */
+ if ((portchange & USB_PORT_STAT_C_CONNECTION))
+ return -EINVAL;
+
+ /* if we`ve finished resetting, then break out of the loop */
+ if (!(portstatus & USB_PORT_STAT_RESET) &&
+ (portstatus & USB_PORT_STAT_ENABLE)) {
+ if (portstatus & USB_PORT_STAT_HIGH_SPEED)
+ udev->speed = USB_SPEED_HIGH;
+ else if (portstatus & USB_PORT_STAT_LOW_SPEED)
+ udev->speed = USB_SPEED_LOW;
+ else
+ udev->speed = USB_SPEED_FULL;
+ return 0;
+ }
+
+ /* switch to the long delay after two short delay failures */
+ if (delay_time >= 2 * HUB_SHORT_RESET_TIME)
+ delay = HUB_LONG_RESET_TIME;
+
+ dev_dbg (hub->intfdev,
+ "port %d not reset yet, waiting %dms\n",
+ port1, delay);
+ }
+
+ return -EBUSY;
+}
+
+static int hub_port_reset(struct usb_hub *hub, int port1,
+ struct usb_device *udev, unsigned int delay)
+{
+ int i, status;
+
+ /* Reset the port */
+ for (i = 0; i < PORT_RESET_TRIES; i++) {
+ status = set_port_feature(hub->hdev,
+ port1, USB_PORT_FEAT_RESET);
+ if (status)
+ dev_err(hub->intfdev,
+ "cannot reset port %d (err = %d)\n",
+ port1, status);
+ else {
+ status = hub_port_wait_reset(hub, port1, udev, delay);
+ if (status)
+ dev_dbg(hub->intfdev,
+ "port_wait_reset: err = %d\n",
+ status);
+ }
+
+ /* return on disconnect or reset */
+ switch (status) {
+ case 0:
+ /* TRSTRCY = 10 ms */
+ msleep(10);
+ /* FALL THROUGH */
+ case -ENOTCONN:
+ case -ENODEV:
+ clear_port_feature(hub->hdev,
+ port1, USB_PORT_FEAT_C_RESET);
+ /* FIXME need disconnect() for NOTATTACHED device */
+ usb_set_device_state(udev, status
+ ? USB_STATE_NOTATTACHED
+ : USB_STATE_DEFAULT);
+ return status;
+ }
+
+ dev_dbg (hub->intfdev,
+ "port %d not enabled, trying reset again...\n",
+ port1);
+ delay = HUB_LONG_RESET_TIME;
+ }
+
+ dev_err (hub->intfdev,
+ "Cannot enable port %i. Maybe the USB cable is bad?\n",
+ port1);
+
+ return status;
+}
+
+static int hub_port_disable(struct usb_hub *hub, int port1, int set_state)
+{
+ struct usb_device *hdev = hub->hdev;
+ int ret;
+
+ if (hdev->children[port1-1] && set_state) {
+ usb_set_device_state(hdev->children[port1-1],
+ USB_STATE_NOTATTACHED);
+ }
+ ret = clear_port_feature(hdev, port1, USB_PORT_FEAT_ENABLE);
+ if (ret)
+ dev_err(hub->intfdev, "cannot disable port %d (err = %d)\n",
+ port1, ret);
+
+ return ret;
+}
+
+/*
+ * Disable a port and mark a logical connnect-change event, so that some
+ * time later khubd will disconnect() any existing usb_device on the port
+ * and will re-enumerate if there actually is a device attached.
+ */
+static void hub_port_logical_disconnect(struct usb_hub *hub, int port1)
+{
+ dev_dbg(hub->intfdev, "logical disconnect on port %d\n", port1);
+ hub_port_disable(hub, port1, 1);
+
+ /* FIXME let caller ask to power down the port:
+ * - some devices won't enumerate without a VBUS power cycle
+ * - SRP saves power that way
+ * - usb_suspend_device(dev,PM_SUSPEND_DISK)
+ * That's easy if this hub can switch power per-port, and
+ * khubd reactivates the port later (timer, SRP, etc).
+ * Powerdown must be optional, because of reset/DFU.
+ */
+
+ set_bit(port1, hub->change_bits);
+ kick_khubd(hub);
+}
+
+
+#ifdef CONFIG_USB_SUSPEND
+
+/*
+ * Selective port suspend reduces power; most suspended devices draw
+ * less than 500 uA. It's also used in OTG, along with remote wakeup.
+ * All devices below the suspended port are also suspended.
+ *
+ * Devices leave suspend state when the host wakes them up. Some devices
+ * also support "remote wakeup", where the device can activate the USB
+ * tree above them to deliver data, such as a keypress or packet. In
+ * some cases, this wakes the USB host.
+ */
+static int hub_port_suspend(struct usb_hub *hub, int port1,
+ struct usb_device *udev)
+{
+ int status;
+
+ // dev_dbg(hub->intfdev, "suspend port %d\n", port1);
+
+ /* enable remote wakeup when appropriate; this lets the device
+ * wake up the upstream hub (including maybe the root hub).
+ *
+ * NOTE: OTG devices may issue remote wakeup (or SRP) even when
+ * we don't explicitly enable it here.
+ */
+ if (udev->actconfig
+ // && FIXME (remote wakeup enabled on this bus)
+ // ... currently assuming it's always appropriate
+ && (udev->actconfig->desc.bmAttributes
+ & USB_CONFIG_ATT_WAKEUP) != 0) {
+ status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+ USB_REQ_SET_FEATURE, USB_RECIP_DEVICE,
+ USB_DEVICE_REMOTE_WAKEUP, 0,
+ NULL, 0,
+ USB_CTRL_SET_TIMEOUT);
+ if (status)
+ dev_dbg(&udev->dev,
+ "won't remote wakeup, status %d\n",
+ status);
+ }
+
+ /* see 7.1.7.6 */
+ status = set_port_feature(hub->hdev, port1, USB_PORT_FEAT_SUSPEND);
+ if (status) {
+ dev_dbg(hub->intfdev,
+ "can't suspend port %d, status %d\n",
+ port1, status);
+ /* paranoia: "should not happen" */
+ (void) usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+ USB_REQ_CLEAR_FEATURE, USB_RECIP_DEVICE,
+ USB_DEVICE_REMOTE_WAKEUP, 0,
+ NULL, 0,
+ USB_CTRL_SET_TIMEOUT);
+ } else {
+ /* device has up to 10 msec to fully suspend */
+ dev_dbg(&udev->dev, "usb suspend\n");
+ usb_set_device_state(udev, USB_STATE_SUSPENDED);
+ msleep(10);
+ }
+ return status;
+}
+
+/*
+ * Devices on USB hub ports have only one "suspend" state, corresponding
+ * to ACPI D2 (PM_SUSPEND_MEM), "may cause the device to lose some context".
+ * State transitions include:
+ *
+ * - suspend, resume ... when the VBUS power link stays live
+ * - suspend, disconnect ... VBUS lost
+ *
+ * Once VBUS drop breaks the circuit, the port it's using has to go through
+ * normal re-enumeration procedures, starting with enabling VBUS power.
+ * Other than re-initializing the hub (plug/unplug, except for root hubs),
+ * Linux (2.6) currently has NO mechanisms to initiate that: no khubd
+ * timer, no SRP, no requests through sysfs.
+ */
+static int __usb_suspend_device (struct usb_device *udev, int port1,
+ pm_message_t state)
+{
+ int status;
+
+ /* caller owns the udev device lock */
+ if (port1 < 0)
+ return port1;
+
+ if (udev->state == USB_STATE_SUSPENDED
+ || udev->state == USB_STATE_NOTATTACHED) {
+ return 0;
+ }
+
+ /* suspend interface drivers; if this is a hub, it
+ * suspends the child devices
+ */
+ if (udev->actconfig) {
+ int i;
+
+ for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
+ struct usb_interface *intf;
+ struct usb_driver *driver;
+
+ intf = udev->actconfig->interface[i];
+ if (state <= intf->dev.power.power_state)
+ continue;
+ if (!intf->dev.driver)
+ continue;
+ driver = to_usb_driver(intf->dev.driver);
+
+ if (driver->suspend) {
+ status = driver->suspend(intf, state);
+ if (intf->dev.power.power_state != state
+ || status)
+ dev_err(&intf->dev,
+ "suspend %d fail, code %d\n",
+ state, status);
+ }
+
+ /* only drivers with suspend() can ever resume();
+ * and after power loss, even they won't.
+ * bus_rescan_devices() can rebind drivers later.
+ *
+ * FIXME the PM core self-deadlocks when unbinding
+ * drivers during suspend/resume ... everything grabs
+ * dpm_sem (not a spinlock, ugh). we want to unbind,
+ * since we know every driver's probe/disconnect works
+ * even for drivers that can't suspend.
+ */
+ if (!driver->suspend || state > PM_SUSPEND_MEM) {
+#if 1
+ dev_warn(&intf->dev, "resume is unsafe!\n");
+#else
+ down_write(&usb_bus_type.rwsem);
+ device_release_driver(&intf->dev);
+ up_write(&usb_bus_type.rwsem);
+#endif
+ }
+ }
+ }
+
+ /*
+ * FIXME this needs port power off call paths too, to help force
+ * USB into the "generic" PM model. At least for devices on
+ * ports that aren't using ganged switching (usually root hubs).
+ *
+ * NOTE: SRP-capable links should adopt more aggressive poweroff
+ * policies (when HNP doesn't apply) once we have mechanisms to
+ * turn power back on! (Likely not before 2.7...)
+ */
+ if (state > PM_SUSPEND_MEM) {
+ dev_warn(&udev->dev, "no poweroff yet, suspending instead\n");
+ }
+
+ /* "global suspend" of the HC-to-USB interface (root hub), or
+ * "selective suspend" of just one hub-device link.
+ */
+ if (!udev->parent) {
+ struct usb_bus *bus = udev->bus;
+ if (bus && bus->op->hub_suspend) {
+ status = bus->op->hub_suspend (bus);
+ if (status == 0) {
+ dev_dbg(&udev->dev, "usb suspend\n");
+ usb_set_device_state(udev,
+ USB_STATE_SUSPENDED);
+ }
+ } else
+ status = -EOPNOTSUPP;
+ } else
+ status = hub_port_suspend(hdev_to_hub(udev->parent), port1,
+ udev);
+
+ if (status == 0)
+ udev->dev.power.power_state = state;
+ return status;
+}
+
+/**
+ * usb_suspend_device - suspend a usb device
+ * @udev: device that's no longer in active use
+ * @state: PMSG_SUSPEND to suspend
+ * Context: must be able to sleep; device not locked
+ *
+ * Suspends a USB device that isn't in active use, conserving power.
+ * Devices may wake out of a suspend, if anything important happens,
+ * using the remote wakeup mechanism. They may also be taken out of
+ * suspend by the host, using usb_resume_device(). It's also routine
+ * to disconnect devices while they are suspended.
+ *
+ * Suspending OTG devices may trigger HNP, if that's been enabled
+ * between a pair of dual-role devices. That will change roles, such
+ * as from A-Host to A-Peripheral or from B-Host back to B-Peripheral.
+ *
+ * Returns 0 on success, else negative errno.
+ */
+int usb_suspend_device(struct usb_device *udev, pm_message_t state)
+{
+ int port1, status;
+
+ port1 = locktree(udev);
+ if (port1 < 0)
+ return port1;
+
+ status = __usb_suspend_device(udev, port1, state);
+ usb_unlock_device(udev);
+ return status;
+}
+
+/*
+ * hardware resume signaling is finished, either because of selective
+ * resume (by host) or remote wakeup (by device) ... now see what changed
+ * in the tree that's rooted at this device.
+ */
+static int finish_port_resume(struct usb_device *udev)
+{
+ int status;
+ u16 devstatus;
+
+ /* caller owns the udev device lock */
+ dev_dbg(&udev->dev, "usb resume\n");
+
+ /* usb ch9 identifies four variants of SUSPENDED, based on what
+ * state the device resumes to. Linux currently won't see the
+ * first two on the host side; they'd be inside hub_port_init()
+ * during many timeouts, but khubd can't suspend until later.
+ */
+ usb_set_device_state(udev, udev->actconfig
+ ? USB_STATE_CONFIGURED
+ : USB_STATE_ADDRESS);
+ udev->dev.power.power_state = PMSG_ON;
+
+ /* 10.5.4.5 says be sure devices in the tree are still there.
+ * For now let's assume the device didn't go crazy on resume,
+ * and device drivers will know about any resume quirks.
+ */
+ status = usb_get_status(udev, USB_RECIP_DEVICE, 0, &devstatus);
+ if (status < 0)
+ dev_dbg(&udev->dev,
+ "gone after usb resume? status %d\n",
+ status);
+ else if (udev->actconfig) {
+ unsigned i;
+
+ le16_to_cpus(&devstatus);
+ if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) {
+ status = usb_control_msg(udev,
+ usb_sndctrlpipe(udev, 0),
+ USB_REQ_CLEAR_FEATURE,
+ USB_RECIP_DEVICE,
+ USB_DEVICE_REMOTE_WAKEUP, 0,
+ NULL, 0,
+ USB_CTRL_SET_TIMEOUT);
+ if (status) {
+ dev_dbg(&udev->dev, "disable remote "
+ "wakeup, status %d\n", status);
+ status = 0;
+ }
+ }
+
+ /* resume interface drivers; if this is a hub, it
+ * resumes the child devices
+ */
+ for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
+ struct usb_interface *intf;
+ struct usb_driver *driver;
+
+ intf = udev->actconfig->interface[i];
+ if (intf->dev.power.power_state == PM_SUSPEND_ON)
+ continue;
+ if (!intf->dev.driver) {
+ /* FIXME maybe force to alt 0 */
+ continue;
+ }
+ driver = to_usb_driver(intf->dev.driver);
+
+ /* bus_rescan_devices() may rebind drivers */
+ if (!driver->resume)
+ continue;
+
+ /* can we do better than just logging errors? */
+ status = driver->resume(intf);
+ if (intf->dev.power.power_state != PM_SUSPEND_ON
+ || status)
+ dev_dbg(&intf->dev,
+ "resume fail, state %d code %d\n",
+ intf->dev.power.power_state, status);
+ }
+ status = 0;
+
+ } else if (udev->devnum <= 0) {
+ dev_dbg(&udev->dev, "bogus resume!\n");
+ status = -EINVAL;
+ }
+ return status;
+}
+
+static int
+hub_port_resume(struct usb_hub *hub, int port1, struct usb_device *udev)
+{
+ int status;
+
+ // dev_dbg(hub->intfdev, "resume port %d\n", port1);
+
+ /* see 7.1.7.7; affects power usage, but not budgeting */
+ status = clear_port_feature(hub->hdev,
+ port1, USB_PORT_FEAT_SUSPEND);
+ if (status) {
+ dev_dbg(hub->intfdev,
+ "can't resume port %d, status %d\n",
+ port1, status);
+ } else {
+ u16 devstatus;
+ u16 portchange;
+
+ /* drive resume for at least 20 msec */
+ if (udev)
+ dev_dbg(&udev->dev, "RESUME\n");
+ msleep(25);
+
+#define LIVE_FLAGS ( USB_PORT_STAT_POWER \
+ | USB_PORT_STAT_ENABLE \
+ | USB_PORT_STAT_CONNECTION)
+
+ /* Virtual root hubs can trigger on GET_PORT_STATUS to
+ * stop resume signaling. Then finish the resume
+ * sequence.
+ */
+ devstatus = portchange = 0;
+ status = hub_port_status(hub, port1,
+ &devstatus, &portchange);
+ if (status < 0
+ || (devstatus & LIVE_FLAGS) != LIVE_FLAGS
+ || (devstatus & USB_PORT_STAT_SUSPEND) != 0
+ ) {
+ dev_dbg(hub->intfdev,
+ "port %d status %04x.%04x after resume, %d\n",
+ port1, portchange, devstatus, status);
+ } else {
+ /* TRSMRCY = 10 msec */
+ msleep(10);
+ if (udev)
+ status = finish_port_resume(udev);
+ }
+ }
+ if (status < 0)
+ hub_port_logical_disconnect(hub, port1);
+
+ return status;
+}
+
+static int hub_resume (struct usb_interface *intf);
+
+/**
+ * usb_resume_device - re-activate a suspended usb device
+ * @udev: device to re-activate
+ * Context: must be able to sleep; device not locked
+ *
+ * This will re-activate the suspended device, increasing power usage
+ * while letting drivers communicate again with its endpoints.
+ * USB resume explicitly guarantees that the power session between
+ * the host and the device is the same as it was when the device
+ * suspended.
+ *
+ * Returns 0 on success, else negative errno.
+ */
+int usb_resume_device(struct usb_device *udev)
+{
+ int port1, status;
+
+ port1 = locktree(udev);
+ if (port1 < 0)
+ return port1;
+
+ /* "global resume" of the HC-to-USB interface (root hub), or
+ * selective resume of one hub-to-device port
+ */
+ if (!udev->parent) {
+ struct usb_bus *bus = udev->bus;
+ if (bus && bus->op->hub_resume) {
+ status = bus->op->hub_resume (bus);
+ } else
+ status = -EOPNOTSUPP;
+ if (status == 0) {
+ dev_dbg(&udev->dev, "usb resume\n");
+ /* TRSMRCY = 10 msec */
+ msleep(10);
+ usb_set_device_state (udev, USB_STATE_CONFIGURED);
+ udev->dev.power.power_state = PMSG_ON;
+ status = hub_resume (udev
+ ->actconfig->interface[0]);
+ }
+ } else if (udev->state == USB_STATE_SUSPENDED) {
+ // NOTE this fails if parent is also suspended...
+ status = hub_port_resume(hdev_to_hub(udev->parent),
+ port1, udev);
+ } else {
+ status = 0;
+ }
+ if (status < 0) {
+ dev_dbg(&udev->dev, "can't resume, status %d\n",
+ status);
+ }
+
+ usb_unlock_device(udev);
+
+ /* rebind drivers that had no suspend() */
+ if (status == 0) {
+ usb_lock_all_devices();
+ bus_rescan_devices(&usb_bus_type);
+ usb_unlock_all_devices();
+ }
+ return status;
+}
+
+static int remote_wakeup(struct usb_device *udev)
+{
+ int status = 0;
+
+ /* don't repeat RESUME sequence if this device
+ * was already woken up by some other task
+ */
+ down(&udev->serialize);
+ if (udev->state == USB_STATE_SUSPENDED) {
+ dev_dbg(&udev->dev, "RESUME (wakeup)\n");
+ /* TRSMRCY = 10 msec */
+ msleep(10);
+ status = finish_port_resume(udev);
+ }
+ up(&udev->serialize);
+ return status;
+}
+
+static int hub_suspend(struct usb_interface *intf, pm_message_t state)
+{
+ struct usb_hub *hub = usb_get_intfdata (intf);
+ struct usb_device *hdev = hub->hdev;
+ unsigned port1;
+ int status;
+
+ /* stop khubd and related activity */
+ hub_quiesce(hub);
+
+ /* then suspend every port */
+ for (port1 = 1; port1 <= hdev->maxchild; port1++) {
+ struct usb_device *udev;
+
+ udev = hdev->children [port1-1];
+ if (!udev)
+ continue;
+ down(&udev->serialize);
+ status = __usb_suspend_device(udev, port1, state);
+ up(&udev->serialize);
+ if (status < 0)
+ dev_dbg(&intf->dev, "suspend port %d --> %d\n",
+ port1, status);
+ }
+
+ intf->dev.power.power_state = state;
+ return 0;
+}
+
+static int hub_resume(struct usb_interface *intf)
+{
+ struct usb_device *hdev = interface_to_usbdev(intf);
+ struct usb_hub *hub = usb_get_intfdata (intf);
+ unsigned port1;
+ int status;
+
+ if (intf->dev.power.power_state == PM_SUSPEND_ON)
+ return 0;
+
+ for (port1 = 1; port1 <= hdev->maxchild; port1++) {
+ struct usb_device *udev;
+ u16 portstat, portchange;
+
+ udev = hdev->children [port1-1];
+ status = hub_port_status(hub, port1, &portstat, &portchange);
+ if (status == 0) {
+ if (portchange & USB_PORT_STAT_C_SUSPEND) {
+ clear_port_feature(hdev, port1,
+ USB_PORT_FEAT_C_SUSPEND);
+ portchange &= ~USB_PORT_STAT_C_SUSPEND;
+ }
+
+ /* let khubd handle disconnects etc */
+ if (portchange)
+ continue;
+ }
+
+ if (!udev || status < 0)
+ continue;
+ down (&udev->serialize);
+ if (portstat & USB_PORT_STAT_SUSPEND)
+ status = hub_port_resume(hub, port1, udev);
+ else {
+ status = finish_port_resume(udev);
+ if (status < 0) {
+ dev_dbg(&intf->dev, "resume port %d --> %d\n",
+ port1, status);
+ hub_port_logical_disconnect(hub, port1);
+ }
+ }
+ up(&udev->serialize);
+ }
+ intf->dev.power.power_state = PMSG_ON;
+
+ hub->resume_root_hub = 0;
+ hub_activate(hub);
+ return 0;
+}
+
+void usb_resume_root_hub(struct usb_device *hdev)
+{
+ struct usb_hub *hub = hdev_to_hub(hdev);
+
+ hub->resume_root_hub = 1;
+ kick_khubd(hub);
+}
+
+#else /* !CONFIG_USB_SUSPEND */
+
+int usb_suspend_device(struct usb_device *udev, pm_message_t state)
+{
+ return 0;
+}
+
+int usb_resume_device(struct usb_device *udev)
+{
+ return 0;
+}
+
+#define hub_suspend NULL
+#define hub_resume NULL
+#define remote_wakeup(x) 0
+
+#endif /* CONFIG_USB_SUSPEND */
+
+EXPORT_SYMBOL(usb_suspend_device);
+EXPORT_SYMBOL(usb_resume_device);
+
+
+
+/* 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 for which this debounce period may last over a second.
+ * Not covered by the spec - but easy to deal with.
+ *
+ * This implementation uses a 1500ms total debounce timeout; if the
+ * connection isn't stable by then it returns -ETIMEDOUT. It checks
+ * every 25ms for transient disconnects. When the port status has been
+ * unchanged for 100ms it returns the port status.
+ */
+
+#define HUB_DEBOUNCE_TIMEOUT 1500
+#define HUB_DEBOUNCE_STEP 25
+#define HUB_DEBOUNCE_STABLE 100
+
+static int hub_port_debounce(struct usb_hub *hub, int port1)
+{
+ int ret;
+ int total_time, stable_time = 0;
+ u16 portchange, portstatus;
+ unsigned connection = 0xffff;
+
+ for (total_time = 0; ; total_time += HUB_DEBOUNCE_STEP) {
+ ret = hub_port_status(hub, port1, &portstatus, &portchange);
+ if (ret < 0)
+ return ret;
+
+ if (!(portchange & USB_PORT_STAT_C_CONNECTION) &&
+ (portstatus & USB_PORT_STAT_CONNECTION) == connection) {
+ stable_time += HUB_DEBOUNCE_STEP;
+ if (stable_time >= HUB_DEBOUNCE_STABLE)
+ break;
+ } else {
+ stable_time = 0;
+ connection = portstatus & USB_PORT_STAT_CONNECTION;
+ }
+
+ if (portchange & USB_PORT_STAT_C_CONNECTION) {
+ clear_port_feature(hub->hdev, port1,
+ USB_PORT_FEAT_C_CONNECTION);
+ }
+
+ if (total_time >= HUB_DEBOUNCE_TIMEOUT)
+ break;
+ msleep(HUB_DEBOUNCE_STEP);
+ }
+
+ dev_dbg (hub->intfdev,
+ "debounce: port %d: total %dms stable %dms status 0x%x\n",
+ port1, total_time, stable_time, portstatus);
+
+ if (stable_time < HUB_DEBOUNCE_STABLE)
+ return -ETIMEDOUT;
+ return portstatus;
+}
+
+static void ep0_reinit(struct usb_device *udev)
+{
+ usb_disable_endpoint(udev, 0 + USB_DIR_IN);
+ usb_disable_endpoint(udev, 0 + USB_DIR_OUT);
+ udev->ep_in[0] = udev->ep_out[0] = &udev->ep0;
+}
+
+#define usb_sndaddr0pipe() (PIPE_CONTROL << 30)
+#define usb_rcvaddr0pipe() ((PIPE_CONTROL << 30) | USB_DIR_IN)
+
+static int hub_set_address(struct usb_device *udev)
+{
+ int retval;
+
+ if (udev->devnum == 0)
+ return -EINVAL;
+ if (udev->state == USB_STATE_ADDRESS)
+ return 0;
+ if (udev->state != USB_STATE_DEFAULT)
+ return -EINVAL;
+ retval = usb_control_msg(udev, usb_sndaddr0pipe(),
+ USB_REQ_SET_ADDRESS, 0, udev->devnum, 0,
+ NULL, 0, USB_CTRL_SET_TIMEOUT);
+ if (retval == 0) {
+ usb_set_device_state(udev, USB_STATE_ADDRESS);
+ ep0_reinit(udev);
+ }
+ return retval;
+}
+
+/* Reset device, (re)assign address, get device descriptor.
+ * Device connection must be stable, no more debouncing needed.
+ * Returns device in USB_STATE_ADDRESS, except on error.
+ *
+ * If this is called for an already-existing device (as part of
+ * usb_reset_device), the caller must own the device lock. For a
+ * newly detected device that is not accessible through any global
+ * pointers, it's not necessary to lock the device.
+ */
+static int
+hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
+ int retry_counter)
+{
+ static DECLARE_MUTEX(usb_address0_sem);
+
+ struct usb_device *hdev = hub->hdev;
+ int i, j, retval;
+ unsigned delay = HUB_SHORT_RESET_TIME;
+ enum usb_device_speed oldspeed = udev->speed;
+
+ /* root hub ports have a slightly longer reset period
+ * (from USB 2.0 spec, section 7.1.7.5)
+ */
+ if (!hdev->parent) {
+ delay = HUB_ROOT_RESET_TIME;
+ if (port1 == hdev->bus->otg_port)
+ hdev->bus->b_hnp_enable = 0;
+ }
+
+ /* Some low speed devices have problems with the quick delay, so */
+ /* be a bit pessimistic with those devices. RHbug #23670 */
+ if (oldspeed == USB_SPEED_LOW)
+ delay = HUB_LONG_RESET_TIME;
+
+ down(&usb_address0_sem);
+
+ /* Reset the device; full speed may morph to high speed */
+ retval = hub_port_reset(hub, port1, udev, delay);
+ if (retval < 0) /* error or disconnect */
+ goto fail;
+ /* success, speed is known */
+ retval = -ENODEV;
+
+ if (oldspeed != USB_SPEED_UNKNOWN && oldspeed != udev->speed) {
+ dev_dbg(&udev->dev, "device reset changed speed!\n");
+ goto fail;
+ }
+ oldspeed = udev->speed;
+
+ /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ...
+ * it's fixed size except for full speed devices.
+ */
+ switch (udev->speed) {
+ case USB_SPEED_HIGH: /* fixed at 64 */
+ udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(64);
+ break;
+ case USB_SPEED_FULL: /* 8, 16, 32, or 64 */
+ /* to determine the ep0 maxpacket size, try to read
+ * the device descriptor to get bMaxPacketSize0 and
+ * then correct our initial guess.
+ */
+ udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(64);
+ break;
+ case USB_SPEED_LOW: /* fixed at 8 */
+ udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(8);
+ break;
+ default:
+ goto fail;
+ }
+
+ dev_info (&udev->dev,
+ "%s %s speed USB device using %s and address %d\n",
+ (udev->config) ? "reset" : "new",
+ ({ char *speed; switch (udev->speed) {
+ case USB_SPEED_LOW: speed = "low"; break;
+ case USB_SPEED_FULL: speed = "full"; break;
+ case USB_SPEED_HIGH: speed = "high"; break;
+ default: speed = "?"; break;
+ }; speed;}),
+ udev->bus->controller->driver->name,
+ udev->devnum);
+
+ /* Set up TT records, if needed */
+ if (hdev->tt) {
+ udev->tt = hdev->tt;
+ udev->ttport = hdev->ttport;
+ } else if (udev->speed != USB_SPEED_HIGH
+ && hdev->speed == USB_SPEED_HIGH) {
+ udev->tt = &hub->tt;
+ udev->ttport = port1;
+ }
+
+ /* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way?
+ * Because device hardware and firmware is sometimes buggy in
+ * this area, and this is how Linux has done it for ages.
+ * Change it cautiously.
+ *
+ * NOTE: If USE_NEW_SCHEME() is true we will start by issuing
+ * a 64-byte GET_DESCRIPTOR request. This is what Windows does,
+ * so it may help with some non-standards-compliant devices.
+ * Otherwise we start with SET_ADDRESS and then try to read the
+ * first 8 bytes of the device descriptor to get the ep0 maxpacket
+ * value.
+ */
+ for (i = 0; i < GET_DESCRIPTOR_TRIES; (++i, msleep(100))) {
+ if (USE_NEW_SCHEME(retry_counter)) {
+ struct usb_device_descriptor *buf;
+ int r = 0;
+
+#define GET_DESCRIPTOR_BUFSIZE 64
+ buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO);
+ if (!buf) {
+ retval = -ENOMEM;
+ continue;
+ }
+
+ /* Use a short timeout the first time through,
+ * so that recalcitrant full-speed devices with
+ * 8- or 16-byte ep0-maxpackets won't slow things
+ * down tremendously by NAKing the unexpectedly
+ * early status stage. Also, retry on all errors;
+ * some devices are flakey.
+ */
+ for (j = 0; j < 3; ++j) {
+ buf->bMaxPacketSize0 = 0;
+ r = usb_control_msg(udev, usb_rcvaddr0pipe(),
+ USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
+ USB_DT_DEVICE << 8, 0,
+ buf, GET_DESCRIPTOR_BUFSIZE,
+ (i ? USB_CTRL_GET_TIMEOUT : 1000));
+ switch (buf->bMaxPacketSize0) {
+ case 8: case 16: case 32: case 64:
+ if (buf->bDescriptorType ==
+ USB_DT_DEVICE) {
+ r = 0;
+ break;
+ }
+ /* FALL THROUGH */
+ default:
+ if (r == 0)
+ r = -EPROTO;
+ break;
+ }
+ if (r == 0)
+ break;
+ }
+ udev->descriptor.bMaxPacketSize0 =
+ buf->bMaxPacketSize0;
+ kfree(buf);
+
+ retval = hub_port_reset(hub, port1, udev, delay);
+ if (retval < 0) /* error or disconnect */
+ goto fail;
+ if (oldspeed != udev->speed) {
+ dev_dbg(&udev->dev,
+ "device reset changed speed!\n");
+ retval = -ENODEV;
+ goto fail;
+ }
+ if (r) {
+ dev_err(&udev->dev, "device descriptor "
+ "read/%s, error %d\n",
+ "64", r);
+ retval = -EMSGSIZE;
+ continue;
+ }
+#undef GET_DESCRIPTOR_BUFSIZE
+ }
+
+ for (j = 0; j < SET_ADDRESS_TRIES; ++j) {
+ retval = hub_set_address(udev);
+ if (retval >= 0)
+ break;
+ msleep(200);
+ }
+ if (retval < 0) {
+ dev_err(&udev->dev,
+ "device not accepting address %d, error %d\n",
+ udev->devnum, retval);
+ goto fail;
+ }
+
+ /* cope with hardware quirkiness:
+ * - let SET_ADDRESS settle, some device hardware wants it
+ * - read ep0 maxpacket even for high and low speed,
+ */
+ msleep(10);
+ if (USE_NEW_SCHEME(retry_counter))
+ break;
+
+ retval = usb_get_device_descriptor(udev, 8);
+ if (retval < 8) {
+ dev_err(&udev->dev, "device descriptor "
+ "read/%s, error %d\n",
+ "8", retval);
+ if (retval >= 0)
+ retval = -EMSGSIZE;
+ } else {
+ retval = 0;
+ break;
+ }
+ }
+ if (retval)
+ goto fail;
+
+ i = udev->descriptor.bMaxPacketSize0;
+ if (le16_to_cpu(udev->ep0.desc.wMaxPacketSize) != i) {
+ if (udev->speed != USB_SPEED_FULL ||
+ !(i == 8 || i == 16 || i == 32 || i == 64)) {
+ dev_err(&udev->dev, "ep0 maxpacket = %d\n", i);
+ retval = -EMSGSIZE;
+ goto fail;
+ }
+ dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i);
+ udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i);
+ ep0_reinit(udev);
+ }
+
+ retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE);
+ if (retval < (signed)sizeof(udev->descriptor)) {
+ dev_err(&udev->dev, "device descriptor read/%s, error %d\n",
+ "all", retval);
+ if (retval >= 0)
+ retval = -ENOMSG;
+ goto fail;
+ }
+
+ retval = 0;
+
+fail:
+ if (retval)
+ hub_port_disable(hub, port1, 0);
+ up(&usb_address0_sem);
+ return retval;
+}
+
+static void
+check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
+{
+ struct usb_qualifier_descriptor *qual;
+ int status;
+
+ qual = kmalloc (sizeof *qual, SLAB_KERNEL);
+ if (qual == NULL)
+ return;
+
+ status = usb_get_descriptor (udev, USB_DT_DEVICE_QUALIFIER, 0,
+ qual, sizeof *qual);
+ if (status == sizeof *qual) {
+ dev_info(&udev->dev, "not running at top speed; "
+ "connect to a high speed hub\n");
+ /* hub LEDs are probably harder to miss than syslog */
+ if (hub->has_indicators) {
+ hub->indicator[port1-1] = INDICATOR_GREEN_BLINK;
+ schedule_work (&hub->leds);
+ }
+ }
+ kfree (qual);
+}
+
+static unsigned
+hub_power_remaining (struct usb_hub *hub)
+{
+ struct usb_device *hdev = hub->hdev;
+ int remaining;
+ unsigned i;
+
+ remaining = hub->power_budget;
+ if (!remaining) /* self-powered */
+ return 0;
+
+ for (i = 0; i < hdev->maxchild; i++) {
+ struct usb_device *udev = hdev->children[i];
+ int delta, ceiling;
+
+ if (!udev)
+ continue;
+
+ /* 100mA per-port ceiling, or 8mA for OTG ports */
+ if (i != (udev->bus->otg_port - 1) || hdev->parent)
+ ceiling = 50;
+ else
+ ceiling = 4;
+
+ if (udev->actconfig)
+ delta = udev->actconfig->desc.bMaxPower;
+ else
+ delta = ceiling;
+ // dev_dbg(&udev->dev, "budgeted %dmA\n", 2 * delta);
+ if (delta > ceiling)
+ dev_warn(&udev->dev, "%dmA over %dmA budget!\n",
+ 2 * (delta - ceiling), 2 * ceiling);
+ remaining -= delta;
+ }
+ if (remaining < 0) {
+ dev_warn(hub->intfdev,
+ "%dmA over power budget!\n",
+ -2 * remaining);
+ remaining = 0;
+ }
+ return remaining;
+}
+
+/* Handle physical or logical connection change events.
+ * This routine is called when:
+ * a port connection-change occurs;
+ * a port enable-change occurs (often caused by EMI);
+ * usb_reset_device() encounters changed descriptors (as from
+ * a firmware download)
+ * caller already locked the hub
+ */
+static void hub_port_connect_change(struct usb_hub *hub, int port1,
+ u16 portstatus, u16 portchange)
+{
+ struct usb_device *hdev = hub->hdev;
+ struct device *hub_dev = hub->intfdev;
+ int status, i;
+
+ dev_dbg (hub_dev,
+ "port %d, status %04x, change %04x, %s\n",
+ port1, portstatus, portchange, portspeed (portstatus));
+
+ if (hub->has_indicators) {
+ set_port_led(hub, port1, HUB_LED_AUTO);
+ hub->indicator[port1-1] = INDICATOR_AUTO;
+ }
+
+ /* Disconnect any existing devices under this port */
+ if (hdev->children[port1-1])
+ usb_disconnect(&hdev->children[port1-1]);
+ clear_bit(port1, hub->change_bits);
+
+#ifdef CONFIG_USB_OTG
+ /* during HNP, don't repeat the debounce */
+ if (hdev->bus->is_b_host)
+ portchange &= ~USB_PORT_STAT_C_CONNECTION;
+#endif
+
+ if (portchange & USB_PORT_STAT_C_CONNECTION) {
+ status = hub_port_debounce(hub, port1);
+ if (status < 0) {
+ dev_err (hub_dev,
+ "connect-debounce failed, port %d disabled\n",
+ port1);
+ goto done;
+ }
+ portstatus = status;
+ }
+
+ /* Return now if nothing is connected */
+ if (!(portstatus & USB_PORT_STAT_CONNECTION)) {
+
+ /* maybe switch power back on (e.g. root hub was reset) */
+ if ((hub->descriptor->wHubCharacteristics
+ & HUB_CHAR_LPSM) < 2
+ && !(portstatus & (1 << USB_PORT_FEAT_POWER)))
+ set_port_feature(hdev, port1, USB_PORT_FEAT_POWER);
+
+ if (portstatus & USB_PORT_STAT_ENABLE)
+ goto done;
+ return;
+ }
+
+#ifdef CONFIG_USB_SUSPEND
+ /* If something is connected, but the port is suspended, wake it up. */
+ if (portstatus & USB_PORT_STAT_SUSPEND) {
+ status = hub_port_resume(hub, port1, NULL);
+ if (status < 0) {
+ dev_dbg(hub_dev,
+ "can't clear suspend on port %d; %d\n",
+ port1, status);
+ goto done;
+ }
+ }
+#endif
+
+ for (i = 0; i < SET_CONFIG_TRIES; i++) {
+ struct usb_device *udev;
+
+ /* reallocate for each attempt, since references
+ * to the previous one can escape in various ways
+ */
+ udev = usb_alloc_dev(hdev, hdev->bus, port1);
+ if (!udev) {
+ dev_err (hub_dev,
+ "couldn't allocate port %d usb_device\n",
+ port1);
+ goto done;
+ }
+
+ usb_set_device_state(udev, USB_STATE_POWERED);
+ udev->speed = USB_SPEED_UNKNOWN;
+
+ /* set the address */
+ choose_address(udev);
+ if (udev->devnum <= 0) {
+ status = -ENOTCONN; /* Don't retry */
+ goto loop;
+ }
+
+ /* reset and get descriptor */
+ status = hub_port_init(hub, udev, port1, i);
+ if (status < 0)
+ goto loop;
+
+ /* consecutive bus-powered hubs aren't reliable; they can
+ * violate the voltage drop budget. if the new child has
+ * a "powered" LED, users should notice we didn't enable it
+ * (without reading syslog), even without per-port LEDs
+ * on the parent.
+ */
+ if (udev->descriptor.bDeviceClass == USB_CLASS_HUB
+ && hub->power_budget) {
+ u16 devstat;
+
+ status = usb_get_status(udev, USB_RECIP_DEVICE, 0,
+ &devstat);
+ if (status < 0) {
+ dev_dbg(&udev->dev, "get status %d ?\n", status);
+ goto loop_disable;
+ }
+ cpu_to_le16s(&devstat);
+ if ((devstat & (1 << USB_DEVICE_SELF_POWERED)) == 0) {
+ dev_err(&udev->dev,
+ "can't connect bus-powered hub "
+ "to this port\n");
+ if (hub->has_indicators) {
+ hub->indicator[port1-1] =
+ INDICATOR_AMBER_BLINK;
+ schedule_work (&hub->leds);
+ }
+ status = -ENOTCONN; /* Don't retry */
+ goto loop_disable;
+ }
+ }
+
+ /* check for devices running slower than they could */
+ if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0200
+ && udev->speed == USB_SPEED_FULL
+ && highspeed_hubs != 0)
+ check_highspeed (hub, udev, port1);
+
+ /* Store the parent's children[] pointer. At this point
+ * udev becomes globally accessible, although presumably
+ * no one will look at it until hdev is unlocked.
+ */
+ down (&udev->serialize);
+ status = 0;
+
+ /* We mustn't add new devices if the parent hub has
+ * been disconnected; we would race with the
+ * recursively_mark_NOTATTACHED() routine.
+ */
+ spin_lock_irq(&device_state_lock);
+ if (hdev->state == USB_STATE_NOTATTACHED)
+ status = -ENOTCONN;
+ else
+ hdev->children[port1-1] = udev;
+ spin_unlock_irq(&device_state_lock);
+
+ /* Run it through the hoops (find a driver, etc) */
+ if (!status) {
+ status = usb_new_device(udev);
+ if (status) {
+ spin_lock_irq(&device_state_lock);
+ hdev->children[port1-1] = NULL;
+ spin_unlock_irq(&device_state_lock);
+ }
+ }
+
+ up (&udev->serialize);
+ if (status)
+ goto loop_disable;
+
+ status = hub_power_remaining(hub);
+ if (status)
+ dev_dbg(hub_dev,
+ "%dmA power budget left\n",
+ 2 * status);
+
+ return;
+
+loop_disable:
+ hub_port_disable(hub, port1, 1);
+loop:
+ ep0_reinit(udev);
+ release_address(udev);
+ usb_put_dev(udev);
+ if (status == -ENOTCONN)
+ break;
+ }
+
+done:
+ hub_port_disable(hub, port1, 1);
+}
+
+static void hub_events(void)
+{
+ struct list_head *tmp;
+ struct usb_device *hdev;
+ struct usb_interface *intf;
+ struct usb_hub *hub;
+ struct device *hub_dev;
+ u16 hubstatus;
+ u16 hubchange;
+ u16 portstatus;
+ u16 portchange;
+ int i, ret;
+ int connect_change;
+
+ /*
+ * We restart the list every time to avoid a deadlock with
+ * deleting hubs downstream from this one. This should be
+ * safe since we delete the hub from the event list.
+ * Not the most efficient, but avoids deadlocks.
+ */
+ while (1) {
+
+ /* Grab the first entry at the beginning of the list */
+ spin_lock_irq(&hub_event_lock);
+ if (list_empty(&hub_event_list)) {
+ spin_unlock_irq(&hub_event_lock);
+ break;
+ }
+
+ tmp = hub_event_list.next;
+ list_del_init(tmp);
+
+ hub = list_entry(tmp, struct usb_hub, event_list);
+ hdev = hub->hdev;
+ intf = to_usb_interface(hub->intfdev);
+ hub_dev = &intf->dev;
+
+ dev_dbg(hub_dev, "state %d ports %d chg %04x evt %04x\n",
+ hdev->state, hub->descriptor
+ ? hub->descriptor->bNbrPorts
+ : 0,
+ /* NOTE: expects max 15 ports... */
+ (u16) hub->change_bits[0],
+ (u16) hub->event_bits[0]);
+
+ usb_get_intf(intf);
+ i = hub->resume_root_hub;
+ spin_unlock_irq(&hub_event_lock);
+
+ /* Is this is a root hub wanting to be resumed? */
+ if (i)
+ usb_resume_device(hdev);
+
+ /* Lock the device, then check to see if we were
+ * disconnected while waiting for the lock to succeed. */
+ if (locktree(hdev) < 0) {
+ usb_put_intf(intf);
+ continue;
+ }
+ if (hub != usb_get_intfdata(intf))
+ goto loop;
+
+ /* If the hub has died, clean up after it */
+ if (hdev->state == USB_STATE_NOTATTACHED) {
+ hub_pre_reset(hub);
+ goto loop;
+ }
+
+ /* If this is an inactive or suspended hub, do nothing */
+ if (hub->quiescing)
+ goto loop;
+
+ if (hub->error) {
+ dev_dbg (hub_dev, "resetting for error %d\n",
+ hub->error);
+
+ ret = usb_reset_device(hdev);
+ if (ret) {
+ dev_dbg (hub_dev,
+ "error resetting hub: %d\n", ret);
+ goto loop;
+ }
+
+ hub->nerrors = 0;
+ hub->error = 0;
+ }
+
+ /* deal with port status changes */
+ for (i = 1; i <= hub->descriptor->bNbrPorts; i++) {
+ if (test_bit(i, hub->busy_bits))
+ continue;
+ connect_change = test_bit(i, hub->change_bits);
+ if (!test_and_clear_bit(i, hub->event_bits) &&
+ !connect_change && !hub->activating)
+ continue;
+
+ ret = hub_port_status(hub, i,
+ &portstatus, &portchange);
+ if (ret < 0)
+ continue;
+
+ if (hub->activating && !hdev->children[i-1] &&
+ (portstatus &
+ USB_PORT_STAT_CONNECTION))
+ connect_change = 1;
+
+ if (portchange & USB_PORT_STAT_C_CONNECTION) {
+ clear_port_feature(hdev, i,
+ USB_PORT_FEAT_C_CONNECTION);
+ connect_change = 1;
+ }
+
+ if (portchange & USB_PORT_STAT_C_ENABLE) {
+ if (!connect_change)
+ dev_dbg (hub_dev,
+ "port %d enable change, "
+ "status %08x\n",
+ i, portstatus);
+ clear_port_feature(hdev, i,
+ USB_PORT_FEAT_C_ENABLE);
+
+ /*
+ * EM interference sometimes causes badly
+ * shielded USB devices to be shutdown by
+ * the hub, this hack enables them again.
+ * Works at least with mouse driver.
+ */
+ if (!(portstatus & USB_PORT_STAT_ENABLE)
+ && !connect_change
+ && hdev->children[i-1]) {
+ dev_err (hub_dev,
+ "port %i "
+ "disabled by hub (EMI?), "
+ "re-enabling...\n",
+ i);
+ connect_change = 1;
+ }
+ }
+
+ if (portchange & USB_PORT_STAT_C_SUSPEND) {
+ clear_port_feature(hdev, i,
+ USB_PORT_FEAT_C_SUSPEND);
+ if (hdev->children[i-1]) {
+ ret = remote_wakeup(hdev->
+ children[i-1]);
+ if (ret < 0)
+ connect_change = 1;
+ } else {
+ ret = -ENODEV;
+ hub_port_disable(hub, i, 1);
+ }
+ dev_dbg (hub_dev,
+ "resume on port %d, status %d\n",
+ i, ret);
+ }
+
+ if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
+ dev_err (hub_dev,
+ "over-current change on port %d\n",
+ i);
+ clear_port_feature(hdev, i,
+ USB_PORT_FEAT_C_OVER_CURRENT);
+ hub_power_on(hub);
+ }
+
+ if (portchange & USB_PORT_STAT_C_RESET) {
+ dev_dbg (hub_dev,
+ "reset change on port %d\n",
+ i);
+ clear_port_feature(hdev, i,
+ USB_PORT_FEAT_C_RESET);
+ }
+
+ if (connect_change)
+ hub_port_connect_change(hub, i,
+ portstatus, portchange);
+ } /* end for i */
+
+ /* deal with hub status changes */
+ if (test_and_clear_bit(0, hub->event_bits) == 0)
+ ; /* do nothing */
+ else if (hub_hub_status(hub, &hubstatus, &hubchange) < 0)
+ dev_err (hub_dev, "get_hub_status failed\n");
+ else {
+ if (hubchange & HUB_CHANGE_LOCAL_POWER) {
+ dev_dbg (hub_dev, "power change\n");
+ clear_hub_feature(hdev, C_HUB_LOCAL_POWER);
+ }
+ if (hubchange & HUB_CHANGE_OVERCURRENT) {
+ dev_dbg (hub_dev, "overcurrent change\n");
+ msleep(500); /* Cool down */
+ clear_hub_feature(hdev, C_HUB_OVER_CURRENT);
+ hub_power_on(hub);
+ }
+ }
+
+ hub->activating = 0;
+
+loop:
+ usb_unlock_device(hdev);
+ usb_put_intf(intf);
+
+ } /* end while (1) */
+}
+
+static int hub_thread(void *__unused)
+{
+ /*
+ * This thread doesn't need any user-level access,
+ * so get rid of all our resources
+ */
+
+ daemonize("khubd");
+ allow_signal(SIGKILL);
+
+ /* Send me a signal to get me die (for debugging) */
+ do {
+ hub_events();
+ wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list));
+ try_to_freeze(PF_FREEZE);
+ } while (!signal_pending(current));
+
+ pr_debug ("%s: khubd exiting\n", usbcore_name);
+ complete_and_exit(&khubd_exited, 0);
+}
+
+static struct usb_device_id hub_id_table [] = {
+ { .match_flags = USB_DEVICE_ID_MATCH_DEV_CLASS,
+ .bDeviceClass = USB_CLASS_HUB},
+ { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,
+ .bInterfaceClass = USB_CLASS_HUB},
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, hub_id_table);
+
+static struct usb_driver hub_driver = {
+ .owner = THIS_MODULE,
+ .name = "hub",
+ .probe = hub_probe,
+ .disconnect = hub_disconnect,
+ .suspend = hub_suspend,
+ .resume = hub_resume,
+ .ioctl = hub_ioctl,
+ .id_table = hub_id_table,
+};
+
+int usb_hub_init(void)
+{
+ pid_t pid;
+
+ if (usb_register(&hub_driver) < 0) {
+ printk(KERN_ERR "%s: can't register hub driver\n",
+ usbcore_name);
+ return -1;
+ }
+
+ pid = kernel_thread(hub_thread, NULL, CLONE_KERNEL);
+ if (pid >= 0) {
+ khubd_pid = pid;
+
+ return 0;
+ }
+
+ /* Fall through if kernel_thread failed */
+ usb_deregister(&hub_driver);
+ printk(KERN_ERR "%s: can't start khubd\n", usbcore_name);
+
+ return -1;
+}
+
+void usb_hub_cleanup(void)
+{
+ int ret;
+
+ /* Kill the thread */
+ ret = kill_proc(khubd_pid, SIGKILL, 1);
+
+ wait_for_completion(&khubd_exited);
+
+ /*
+ * Hub resources are freed for us by usb_deregister. It calls
+ * usb_driver_purge on every device which in turn calls that
+ * devices disconnect function if it is using this driver.
+ * The hub_disconnect function takes care of releasing the
+ * individual hub resources. -greg
+ */
+ usb_deregister(&hub_driver);
+} /* usb_hub_cleanup() */
+
+
+static int config_descriptors_changed(struct usb_device *udev)
+{
+ unsigned index;
+ unsigned len = 0;
+ struct usb_config_descriptor *buf;
+
+ for (index = 0; index < udev->descriptor.bNumConfigurations; index++) {
+ if (len < le16_to_cpu(udev->config[index].desc.wTotalLength))
+ len = le16_to_cpu(udev->config[index].desc.wTotalLength);
+ }
+ buf = kmalloc (len, SLAB_KERNEL);
+ if (buf == NULL) {
+ dev_err(&udev->dev, "no mem to re-read configs after reset\n");
+ /* assume the worst */
+ return 1;
+ }
+ for (index = 0; index < udev->descriptor.bNumConfigurations; index++) {
+ int length;
+ int old_length = le16_to_cpu(udev->config[index].desc.wTotalLength);
+
+ length = usb_get_descriptor(udev, USB_DT_CONFIG, index, buf,
+ old_length);
+ if (length < old_length) {
+ dev_dbg(&udev->dev, "config index %d, error %d\n",
+ index, length);
+ break;
+ }
+ if (memcmp (buf, udev->rawdescriptors[index], old_length)
+ != 0) {
+ dev_dbg(&udev->dev, "config index %d changed (#%d)\n",
+ index, buf->bConfigurationValue);
+ break;
+ }
+ }
+ kfree(buf);
+ return index != udev->descriptor.bNumConfigurations;
+}
+
+/**
+ * usb_reset_device - perform a USB port reset to reinitialize a device
+ * @udev: device to reset (not in SUSPENDED or NOTATTACHED state)
+ *
+ * WARNING - don't reset any device unless drivers for all of its
+ * interfaces are expecting that reset! Maybe some driver->reset()
+ * method should eventually help ensure sufficient cooperation.
+ *
+ * Do a port reset, reassign the device's address, and establish its
+ * former operating configuration. If the reset fails, or the device's
+ * descriptors change from their values before the reset, or the original
+ * configuration and altsettings cannot be restored, a flag will be set
+ * telling khubd to pretend the device has been disconnected and then
+ * re-connected. All drivers will be unbound, and the device will be
+ * re-enumerated and probed all over again.
+ *
+ * Returns 0 if the reset succeeded, -ENODEV if the device has been
+ * flagged for logical disconnection, or some other negative error code
+ * if the reset wasn't even attempted.
+ *
+ * The caller must own the device lock. For example, it's safe to use
+ * this from a driver probe() routine after downloading new firmware.
+ * For calls that might not occur during probe(), drivers should lock
+ * the device using usb_lock_device_for_reset().
+ */
+int usb_reset_device(struct usb_device *udev)
+{
+ struct usb_device *parent_hdev = udev->parent;
+ struct usb_hub *parent_hub;
+ struct usb_device_descriptor descriptor = udev->descriptor;
+ struct usb_hub *hub = NULL;
+ int i, ret = 0, port1 = -1;
+
+ if (udev->state == USB_STATE_NOTATTACHED ||
+ udev->state == USB_STATE_SUSPENDED) {
+ dev_dbg(&udev->dev, "device reset not allowed in state %d\n",
+ udev->state);
+ return -EINVAL;
+ }
+
+ if (!parent_hdev) {
+ /* this requires hcd-specific logic; see OHCI hc_restart() */
+ dev_dbg(&udev->dev, "%s for root hub!\n", __FUNCTION__);
+ return -EISDIR;
+ }
+
+ for (i = 0; i < parent_hdev->maxchild; i++)
+ if (parent_hdev->children[i] == udev) {
+ port1 = i + 1;
+ break;
+ }
+
+ if (port1 < 0) {
+ /* If this ever happens, it's very bad */
+ dev_err(&udev->dev, "Can't locate device's port!\n");
+ return -ENOENT;
+ }
+ parent_hub = hdev_to_hub(parent_hdev);
+
+ /* If we're resetting an active hub, take some special actions */
+ if (udev->actconfig &&
+ udev->actconfig->interface[0]->dev.driver ==
+ &hub_driver.driver &&
+ (hub = hdev_to_hub(udev)) != NULL) {
+ hub_pre_reset(hub);
+ }
+
+ set_bit(port1, parent_hub->busy_bits);
+ for (i = 0; i < SET_CONFIG_TRIES; ++i) {
+
+ /* ep0 maxpacket size may change; let the HCD know about it.
+ * Other endpoints will be handled by re-enumeration. */
+ ep0_reinit(udev);
+ ret = hub_port_init(parent_hub, udev, port1, i);
+ if (ret >= 0)
+ break;
+ }
+ clear_bit(port1, parent_hub->busy_bits);
+ if (ret < 0)
+ goto re_enumerate;
+
+ /* Device might have changed firmware (DFU or similar) */
+ if (memcmp(&udev->descriptor, &descriptor, sizeof descriptor)
+ || config_descriptors_changed (udev)) {
+ dev_info(&udev->dev, "device firmware changed\n");
+ udev->descriptor = descriptor; /* for disconnect() calls */
+ goto re_enumerate;
+ }
+
+ if (!udev->actconfig)
+ goto done;
+
+ ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+ USB_REQ_SET_CONFIGURATION, 0,
+ udev->actconfig->desc.bConfigurationValue, 0,
+ NULL, 0, USB_CTRL_SET_TIMEOUT);
+ if (ret < 0) {
+ dev_err(&udev->dev,
+ "can't restore configuration #%d (error=%d)\n",
+ udev->actconfig->desc.bConfigurationValue, ret);
+ goto re_enumerate;
+ }
+ usb_set_device_state(udev, USB_STATE_CONFIGURED);
+
+ for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
+ struct usb_interface *intf = udev->actconfig->interface[i];
+ struct usb_interface_descriptor *desc;
+
+ /* set_interface resets host side toggle even
+ * for altsetting zero. the interface may have no driver.
+ */
+ desc = &intf->cur_altsetting->desc;
+ ret = usb_set_interface(udev, desc->bInterfaceNumber,
+ desc->bAlternateSetting);
+ if (ret < 0) {
+ dev_err(&udev->dev, "failed to restore interface %d "
+ "altsetting %d (error=%d)\n",
+ desc->bInterfaceNumber,
+ desc->bAlternateSetting,
+ ret);
+ goto re_enumerate;
+ }
+ }
+
+done:
+ if (hub)
+ hub_post_reset(hub);
+ return 0;
+
+re_enumerate:
+ hub_port_logical_disconnect(parent_hub, port1);
+ return -ENODEV;
+}
diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
new file mode 100644
index 000000000000..d114b847d56f
--- /dev/null
+++ b/drivers/usb/core/hub.h
@@ -0,0 +1,238 @@
+#ifndef __LINUX_HUB_H
+#define __LINUX_HUB_H
+
+/*
+ * Hub protocol and driver data structures.
+ *
+ * Some of these are known to the "virtual root hub" code
+ * in host controller drivers.
+ */
+
+#include <linux/list.h>
+#include <linux/workqueue.h>
+#include <linux/compiler.h> /* likely()/unlikely() */
+
+/*
+ * Hub request types
+ */
+
+#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE)
+#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)
+
+/*
+ * Hub class requests
+ * See USB 2.0 spec Table 11-16
+ */
+#define HUB_CLEAR_TT_BUFFER 8
+#define HUB_RESET_TT 9
+#define HUB_GET_TT_STATE 10
+#define HUB_STOP_TT 11
+
+/*
+ * Hub Class feature numbers
+ * See USB 2.0 spec Table 11-17
+ */
+#define C_HUB_LOCAL_POWER 0
+#define C_HUB_OVER_CURRENT 1
+
+/*
+ * Port feature numbers
+ * See USB 2.0 spec Table 11-17
+ */
+#define USB_PORT_FEAT_CONNECTION 0
+#define USB_PORT_FEAT_ENABLE 1
+#define USB_PORT_FEAT_SUSPEND 2
+#define USB_PORT_FEAT_OVER_CURRENT 3
+#define USB_PORT_FEAT_RESET 4
+#define USB_PORT_FEAT_POWER 8
+#define USB_PORT_FEAT_LOWSPEED 9
+#define USB_PORT_FEAT_HIGHSPEED 10
+#define USB_PORT_FEAT_C_CONNECTION 16
+#define USB_PORT_FEAT_C_ENABLE 17
+#define USB_PORT_FEAT_C_SUSPEND 18
+#define USB_PORT_FEAT_C_OVER_CURRENT 19
+#define USB_PORT_FEAT_C_RESET 20
+#define USB_PORT_FEAT_TEST 21
+#define USB_PORT_FEAT_INDICATOR 22
+
+/*
+ * Hub Status and Hub Change results
+ * See USB 2.0 spec Table 11-19 and Table 11-20
+ */
+struct usb_port_status {
+ __le16 wPortStatus;
+ __le16 wPortChange;
+} __attribute__ ((packed));
+
+/*
+ * wPortStatus bit field
+ * See USB 2.0 spec Table 11-21
+ */
+#define USB_PORT_STAT_CONNECTION 0x0001
+#define USB_PORT_STAT_ENABLE 0x0002
+#define USB_PORT_STAT_SUSPEND 0x0004
+#define USB_PORT_STAT_OVERCURRENT 0x0008
+#define USB_PORT_STAT_RESET 0x0010
+/* bits 5 to 7 are reserved */
+#define USB_PORT_STAT_POWER 0x0100
+#define USB_PORT_STAT_LOW_SPEED 0x0200
+#define USB_PORT_STAT_HIGH_SPEED 0x0400
+#define USB_PORT_STAT_TEST 0x0800
+#define USB_PORT_STAT_INDICATOR 0x1000
+/* bits 13 to 15 are reserved */
+
+/*
+ * wPortChange bit field
+ * See USB 2.0 spec Table 11-22
+ * Bits 0 to 4 shown, bits 5 to 15 are reserved
+ */
+#define USB_PORT_STAT_C_CONNECTION 0x0001
+#define USB_PORT_STAT_C_ENABLE 0x0002
+#define USB_PORT_STAT_C_SUSPEND 0x0004
+#define USB_PORT_STAT_C_OVERCURRENT 0x0008
+#define USB_PORT_STAT_C_RESET 0x0010
+
+/*
+ * wHubCharacteristics (masks)
+ * See USB 2.0 spec Table 11-13, offset 3
+ */
+#define HUB_CHAR_LPSM 0x0003 /* D1 .. D0 */
+#define HUB_CHAR_COMPOUND 0x0004 /* D2 */
+#define HUB_CHAR_OCPM 0x0018 /* D4 .. D3 */
+#define HUB_CHAR_TTTT 0x0060 /* D6 .. D5 */
+#define HUB_CHAR_PORTIND 0x0080 /* D7 */
+
+struct usb_hub_status {
+ __le16 wHubStatus;
+ __le16 wHubChange;
+} __attribute__ ((packed));
+
+/*
+ * Hub Status & Hub Change bit masks
+ * See USB 2.0 spec Table 11-19 and Table 11-20
+ * Bits 0 and 1 for wHubStatus and wHubChange
+ * Bits 2 to 15 are reserved for both
+ */
+#define HUB_STATUS_LOCAL_POWER 0x0001
+#define HUB_STATUS_OVERCURRENT 0x0002
+#define HUB_CHANGE_LOCAL_POWER 0x0001
+#define HUB_CHANGE_OVERCURRENT 0x0002
+
+
+/*
+ * Hub descriptor
+ * See USB 2.0 spec Table 11-13
+ */
+
+#define USB_DT_HUB (USB_TYPE_CLASS | 0x09)
+#define USB_DT_HUB_NONVAR_SIZE 7
+
+struct usb_hub_descriptor {
+ __u8 bDescLength;
+ __u8 bDescriptorType;
+ __u8 bNbrPorts;
+ __u16 wHubCharacteristics;
+ __u8 bPwrOn2PwrGood;
+ __u8 bHubContrCurrent;
+ /* add 1 bit for hub status change; round to bytes */
+ __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8];
+ __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8];
+} __attribute__ ((packed));
+
+
+/* port indicator status selectors, tables 11-7 and 11-25 */
+#define HUB_LED_AUTO 0
+#define HUB_LED_AMBER 1
+#define HUB_LED_GREEN 2
+#define HUB_LED_OFF 3
+
+enum hub_led_mode {
+ INDICATOR_AUTO = 0,
+ INDICATOR_CYCLE,
+ /* software blinks for attention: software, hardware, reserved */
+ INDICATOR_GREEN_BLINK, INDICATOR_GREEN_BLINK_OFF,
+ INDICATOR_AMBER_BLINK, INDICATOR_AMBER_BLINK_OFF,
+ INDICATOR_ALT_BLINK, INDICATOR_ALT_BLINK_OFF
+} __attribute__ ((packed));
+
+struct usb_device;
+
+/*
+ * 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 */
+
+ /* for control/bulk error recovery (CLEAR_TT_BUFFER) */
+ spinlock_t lock;
+ struct list_head clear_list; /* of usb_tt_clear */
+ struct work_struct kevent;
+};
+
+struct usb_tt_clear {
+ struct list_head clear_list;
+ unsigned tt;
+ u16 devinfo;
+};
+
+extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe);
+
+struct usb_hub {
+ struct device *intfdev; /* the "interface" device */
+ struct usb_device *hdev;
+ struct urb *urb; /* for interrupt polling pipe */
+
+ /* buffer for urb ... with extra space in case of babble */
+ char (*buffer)[8];
+ dma_addr_t buffer_dma; /* DMA address for buffer */
+ union {
+ struct usb_hub_status hub;
+ struct usb_port_status port;
+ } *status; /* buffer for status reports */
+
+ int error; /* last reported error */
+ int nerrors; /* track consecutive errors */
+
+ struct list_head event_list; /* hubs w/data or errs ready */
+ unsigned long event_bits[1]; /* status change bitmask */
+ unsigned long change_bits[1]; /* ports with logical connect
+ status change */
+ unsigned long busy_bits[1]; /* ports being reset */
+#if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */
+#error event_bits[] is too short!
+#endif
+
+ struct usb_hub_descriptor *descriptor; /* class descriptor */
+ struct usb_tt tt; /* Transaction Translator */
+
+ u8 power_budget; /* in 2mA units; or zero */
+
+ unsigned quiescing:1;
+ unsigned activating:1;
+ unsigned resume_root_hub:1;
+
+ unsigned has_indicators:1;
+ enum hub_led_mode indicator[USB_MAXCHILDREN];
+ struct work_struct leds;
+};
+
+/* use this for low-powered root hubs */
+static inline void
+hub_set_power_budget (struct usb_device *hubdev, unsigned mA)
+{
+ struct usb_hub *hub;
+
+ hub = (struct usb_hub *)
+ usb_get_intfdata (hubdev->actconfig->interface[0]);
+ hub->power_budget = min(mA,(unsigned)500)/2;
+}
+
+#endif /* __LINUX_HUB_H */
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
new file mode 100644
index 000000000000..d913407bcdc1
--- /dev/null
+++ b/drivers/usb/core/inode.c
@@ -0,0 +1,764 @@
+/*****************************************************************************/
+
+/*
+ * inode.c -- Inode/Dentry functions for the USB device file system.
+ *
+ * Copyright (C) 2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ * Copyright (C) 2001,2002,2004 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
+ * 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.
+ *
+ * History:
+ * 0.1 04.01.2000 Created
+ * 0.2 10.12.2001 converted to use the vfs layer better
+ */
+
+/*****************************************************************************/
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/mount.h>
+#include <linux/pagemap.h>
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+#include <linux/usb.h>
+#include <linux/namei.h>
+#include <linux/usbdevice_fs.h>
+#include <linux/smp_lock.h>
+#include <linux/parser.h>
+#include <asm/byteorder.h>
+#include "usb.h"
+
+static struct super_operations usbfs_ops;
+static struct file_operations default_file_operations;
+static struct inode_operations usbfs_dir_inode_operations;
+static struct vfsmount *usbfs_mount;
+static int usbfs_mount_count; /* = 0 */
+static int ignore_mount = 0;
+
+static struct dentry *devices_usbfs_dentry;
+static int num_buses; /* = 0 */
+
+static uid_t devuid; /* = 0 */
+static uid_t busuid; /* = 0 */
+static uid_t listuid; /* = 0 */
+static gid_t devgid; /* = 0 */
+static gid_t busgid; /* = 0 */
+static gid_t listgid; /* = 0 */
+static umode_t devmode = S_IWUSR | S_IRUGO;
+static umode_t busmode = S_IXUGO | S_IRUGO;
+static umode_t listmode = S_IRUGO;
+
+enum {
+ Opt_devuid, Opt_devgid, Opt_devmode,
+ Opt_busuid, Opt_busgid, Opt_busmode,
+ Opt_listuid, Opt_listgid, Opt_listmode,
+ Opt_err,
+};
+
+static match_table_t tokens = {
+ {Opt_devuid, "devuid=%u"},
+ {Opt_devgid, "devgid=%u"},
+ {Opt_devmode, "devmode=%o"},
+ {Opt_busuid, "busuid=%u"},
+ {Opt_busgid, "busgid=%u"},
+ {Opt_busmode, "busmode=%o"},
+ {Opt_listuid, "listuid=%u"},
+ {Opt_listgid, "listgid=%u"},
+ {Opt_listmode, "listmode=%o"},
+ {Opt_err, NULL}
+};
+
+static int parse_options(struct super_block *s, char *data)
+{
+ char *p;
+ int option;
+
+ /* (re)set to defaults. */
+ devuid = 0;
+ busuid = 0;
+ listuid = 0;
+ devgid = 0;
+ busgid = 0;
+ listgid = 0;
+ devmode = S_IWUSR | S_IRUGO;
+ busmode = S_IXUGO | S_IRUGO;
+ listmode = S_IRUGO;
+
+ while ((p = strsep(&data, ",")) != NULL) {
+ substring_t args[MAX_OPT_ARGS];
+ int token;
+ if (!*p)
+ continue;
+
+ token = match_token(p, tokens, args);
+ switch (token) {
+ case Opt_devuid:
+ if (match_int(&args[0], &option))
+ return -EINVAL;
+ devuid = option;
+ break;
+ case Opt_devgid:
+ if (match_int(&args[0], &option))
+ return -EINVAL;
+ devgid = option;
+ break;
+ case Opt_devmode:
+ if (match_octal(&args[0], &option))
+ return -EINVAL;
+ devmode = option & S_IRWXUGO;
+ break;
+ case Opt_busuid:
+ if (match_int(&args[0], &option))
+ return -EINVAL;
+ busuid = option;
+ break;
+ case Opt_busgid:
+ if (match_int(&args[0], &option))
+ return -EINVAL;
+ busgid = option;
+ break;
+ case Opt_busmode:
+ if (match_octal(&args[0], &option))
+ return -EINVAL;
+ busmode = option & S_IRWXUGO;
+ break;
+ case Opt_listuid:
+ if (match_int(&args[0], &option))
+ return -EINVAL;
+ listuid = option;
+ break;
+ case Opt_listgid:
+ if (match_int(&args[0], &option))
+ return -EINVAL;
+ listgid = option;
+ break;
+ case Opt_listmode:
+ if (match_octal(&args[0], &option))
+ return -EINVAL;
+ listmode = option & S_IRWXUGO;
+ break;
+ default:
+ err("usbfs: unrecognised mount option \"%s\" "
+ "or missing value\n", p);
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
+static void update_special(struct dentry *special)
+{
+ special->d_inode->i_uid = listuid;
+ special->d_inode->i_gid = listgid;
+ special->d_inode->i_mode = S_IFREG | listmode;
+}
+
+static void update_dev(struct dentry *dev)
+{
+ dev->d_inode->i_uid = devuid;
+ dev->d_inode->i_gid = devgid;
+ dev->d_inode->i_mode = S_IFREG | devmode;
+}
+
+static void update_bus(struct dentry *bus)
+{
+ struct dentry *dev = NULL;
+
+ bus->d_inode->i_uid = busuid;
+ bus->d_inode->i_gid = busgid;
+ bus->d_inode->i_mode = S_IFDIR | busmode;
+
+ down(&bus->d_inode->i_sem);
+
+ list_for_each_entry(dev, &bus->d_subdirs, d_child)
+ if (dev->d_inode)
+ update_dev(dev);
+
+ up(&bus->d_inode->i_sem);
+}
+
+static void update_sb(struct super_block *sb)
+{
+ struct dentry *root = sb->s_root;
+ struct dentry *bus = NULL;
+
+ if (!root)
+ return;
+
+ down(&root->d_inode->i_sem);
+
+ list_for_each_entry(bus, &root->d_subdirs, d_child) {
+ if (bus->d_inode) {
+ switch (S_IFMT & bus->d_inode->i_mode) {
+ case S_IFDIR:
+ update_bus(bus);
+ break;
+ case S_IFREG:
+ update_special(bus);
+ break;
+ default:
+ warn("Unknown node %s mode %x found on remount!\n",bus->d_name.name,bus->d_inode->i_mode);
+ break;
+ }
+ }
+ }
+
+ up(&root->d_inode->i_sem);
+}
+
+static int remount(struct super_block *sb, int *flags, char *data)
+{
+ /* If this is not a real mount,
+ * i.e. it's a simple_pin_fs from create_special_files,
+ * then ignore it.
+ */
+ if (ignore_mount)
+ return 0;
+
+ if (parse_options(sb, data)) {
+ warn("usbfs: mount parameter error:");
+ return -EINVAL;
+ }
+
+ if (usbfs_mount && usbfs_mount->mnt_sb)
+ update_sb(usbfs_mount->mnt_sb);
+
+ return 0;
+}
+
+static struct inode *usbfs_get_inode (struct super_block *sb, int mode, dev_t dev)
+{
+ struct inode *inode = new_inode(sb);
+
+ if (inode) {
+ inode->i_mode = mode;
+ inode->i_uid = current->fsuid;
+ inode->i_gid = current->fsgid;
+ inode->i_blksize = PAGE_CACHE_SIZE;
+ inode->i_blocks = 0;
+ inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+ switch (mode & S_IFMT) {
+ default:
+ init_special_inode(inode, mode, dev);
+ break;
+ case S_IFREG:
+ inode->i_fop = &default_file_operations;
+ break;
+ case S_IFDIR:
+ inode->i_op = &usbfs_dir_inode_operations;
+ inode->i_fop = &simple_dir_operations;
+
+ /* directory inodes start off with i_nlink == 2 (for "." entry) */
+ inode->i_nlink++;
+ break;
+ }
+ }
+ return inode;
+}
+
+/* SMP-safe */
+static int usbfs_mknod (struct inode *dir, struct dentry *dentry, int mode,
+ dev_t dev)
+{
+ struct inode *inode = usbfs_get_inode(dir->i_sb, mode, dev);
+ int error = -EPERM;
+
+ if (dentry->d_inode)
+ return -EEXIST;
+
+ if (inode) {
+ d_instantiate(dentry, inode);
+ dget(dentry);
+ error = 0;
+ }
+ return error;
+}
+
+static int usbfs_mkdir (struct inode *dir, struct dentry *dentry, int mode)
+{
+ int res;
+
+ mode = (mode & (S_IRWXUGO | S_ISVTX)) | S_IFDIR;
+ res = usbfs_mknod (dir, dentry, mode, 0);
+ if (!res)
+ dir->i_nlink++;
+ return res;
+}
+
+static int usbfs_create (struct inode *dir, struct dentry *dentry, int mode)
+{
+ mode = (mode & S_IALLUGO) | S_IFREG;
+ return usbfs_mknod (dir, dentry, mode, 0);
+}
+
+static inline int usbfs_positive (struct dentry *dentry)
+{
+ return dentry->d_inode && !d_unhashed(dentry);
+}
+
+static int usbfs_empty (struct dentry *dentry)
+{
+ struct list_head *list;
+
+ spin_lock(&dcache_lock);
+
+ list_for_each(list, &dentry->d_subdirs) {
+ struct dentry *de = list_entry(list, struct dentry, d_child);
+ if (usbfs_positive(de)) {
+ spin_unlock(&dcache_lock);
+ return 0;
+ }
+ }
+
+ spin_unlock(&dcache_lock);
+ return 1;
+}
+
+static int usbfs_unlink (struct inode *dir, struct dentry *dentry)
+{
+ struct inode *inode = dentry->d_inode;
+ down(&inode->i_sem);
+ dentry->d_inode->i_nlink--;
+ dput(dentry);
+ up(&inode->i_sem);
+ d_delete(dentry);
+ return 0;
+}
+
+static int usbfs_rmdir(struct inode *dir, struct dentry *dentry)
+{
+ int error = -ENOTEMPTY;
+ struct inode * inode = dentry->d_inode;
+
+ down(&inode->i_sem);
+ dentry_unhash(dentry);
+ if (usbfs_empty(dentry)) {
+ dentry->d_inode->i_nlink -= 2;
+ dput(dentry);
+ inode->i_flags |= S_DEAD;
+ dir->i_nlink--;
+ error = 0;
+ }
+ up(&inode->i_sem);
+ if (!error)
+ d_delete(dentry);
+ dput(dentry);
+ return error;
+}
+
+
+/* default file operations */
+static ssize_t default_read_file (struct file *file, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ return 0;
+}
+
+static ssize_t default_write_file (struct file *file, const char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ return count;
+}
+
+static loff_t default_file_lseek (struct file *file, loff_t offset, int orig)
+{
+ loff_t retval = -EINVAL;
+
+ down(&file->f_dentry->d_inode->i_sem);
+ switch(orig) {
+ case 0:
+ if (offset > 0) {
+ file->f_pos = offset;
+ retval = file->f_pos;
+ }
+ break;
+ case 1:
+ if ((offset + file->f_pos) > 0) {
+ file->f_pos += offset;
+ retval = file->f_pos;
+ }
+ break;
+ default:
+ break;
+ }
+ up(&file->f_dentry->d_inode->i_sem);
+ return retval;
+}
+
+static int default_open (struct inode *inode, struct file *file)
+{
+ if (inode->u.generic_ip)
+ file->private_data = inode->u.generic_ip;
+
+ return 0;
+}
+
+static struct file_operations default_file_operations = {
+ .read = default_read_file,
+ .write = default_write_file,
+ .open = default_open,
+ .llseek = default_file_lseek,
+};
+
+static struct inode_operations usbfs_dir_inode_operations = {
+ .lookup = simple_lookup,
+};
+
+static struct super_operations usbfs_ops = {
+ .statfs = simple_statfs,
+ .drop_inode = generic_delete_inode,
+ .remount_fs = remount,
+};
+
+static int usbfs_fill_super(struct super_block *sb, void *data, int silent)
+{
+ struct inode *inode;
+ struct dentry *root;
+
+ sb->s_blocksize = PAGE_CACHE_SIZE;
+ sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
+ sb->s_magic = USBDEVICE_SUPER_MAGIC;
+ sb->s_op = &usbfs_ops;
+ sb->s_time_gran = 1;
+ inode = usbfs_get_inode(sb, S_IFDIR | 0755, 0);
+
+ if (!inode) {
+ dbg("%s: could not get inode!",__FUNCTION__);
+ return -ENOMEM;
+ }
+
+ root = d_alloc_root(inode);
+ if (!root) {
+ dbg("%s: could not get root dentry!",__FUNCTION__);
+ iput(inode);
+ return -ENOMEM;
+ }
+ sb->s_root = root;
+ return 0;
+}
+
+static struct dentry * get_dentry(struct dentry *parent, const char *name)
+{
+ struct qstr qstr;
+
+ qstr.name = name;
+ qstr.len = strlen(name);
+ qstr.hash = full_name_hash(name,qstr.len);
+ return lookup_hash(&qstr,parent);
+}
+
+
+/*
+ * fs_create_by_name - create a file, given a name
+ * @name: name of file
+ * @mode: type of file
+ * @parent: dentry of directory to create it in
+ * @dentry: resulting dentry of file
+ *
+ * This function handles both regular files and directories.
+ */
+static int fs_create_by_name (const char *name, mode_t mode,
+ struct dentry *parent, struct dentry **dentry)
+{
+ int error = 0;
+
+ /* If the parent is not specified, we create it in the root.
+ * We need the root dentry to do this, which is in the super
+ * block. A pointer to that is in the struct vfsmount that we
+ * have around.
+ */
+ if (!parent ) {
+ if (usbfs_mount && usbfs_mount->mnt_sb) {
+ parent = usbfs_mount->mnt_sb->s_root;
+ }
+ }
+
+ if (!parent) {
+ dbg("Ah! can not find a parent!");
+ return -EFAULT;
+ }
+
+ *dentry = NULL;
+ down(&parent->d_inode->i_sem);
+ *dentry = get_dentry (parent, name);
+ if (!IS_ERR(dentry)) {
+ if ((mode & S_IFMT) == S_IFDIR)
+ error = usbfs_mkdir (parent->d_inode, *dentry, mode);
+ else
+ error = usbfs_create (parent->d_inode, *dentry, mode);
+ } else
+ error = PTR_ERR(dentry);
+ up(&parent->d_inode->i_sem);
+
+ return error;
+}
+
+static struct dentry *fs_create_file (const char *name, mode_t mode,
+ struct dentry *parent, void *data,
+ struct file_operations *fops,
+ uid_t uid, gid_t gid)
+{
+ struct dentry *dentry;
+ int error;
+
+ dbg("creating file '%s'",name);
+
+ error = fs_create_by_name (name, mode, parent, &dentry);
+ if (error) {
+ dentry = NULL;
+ } else {
+ if (dentry->d_inode) {
+ if (data)
+ dentry->d_inode->u.generic_ip = data;
+ if (fops)
+ dentry->d_inode->i_fop = fops;
+ dentry->d_inode->i_uid = uid;
+ dentry->d_inode->i_gid = gid;
+ }
+ }
+
+ return dentry;
+}
+
+static void fs_remove_file (struct dentry *dentry)
+{
+ struct dentry *parent = dentry->d_parent;
+
+ if (!parent || !parent->d_inode)
+ return;
+
+ down(&parent->d_inode->i_sem);
+ if (usbfs_positive(dentry)) {
+ if (dentry->d_inode) {
+ if (S_ISDIR(dentry->d_inode->i_mode))
+ usbfs_rmdir(parent->d_inode, dentry);
+ else
+ usbfs_unlink(parent->d_inode, dentry);
+ dput(dentry);
+ }
+ }
+ up(&parent->d_inode->i_sem);
+}
+
+/* --------------------------------------------------------------------- */
+
+static struct super_block *usb_get_sb(struct file_system_type *fs_type,
+ int flags, const char *dev_name, void *data)
+{
+ return get_sb_single(fs_type, flags, data, usbfs_fill_super);
+}
+
+static struct file_system_type usb_fs_type = {
+ .owner = THIS_MODULE,
+ .name = "usbfs",
+ .get_sb = usb_get_sb,
+ .kill_sb = kill_litter_super,
+};
+
+/* --------------------------------------------------------------------- */
+
+static int create_special_files (void)
+{
+ struct dentry *parent;
+ int retval;
+
+ /* the simple_pin_fs calls will call remount with no options
+ * without this flag that would overwrite the real mount options (if any)
+ */
+ ignore_mount = 1;
+
+ /* create the devices special file */
+ retval = simple_pin_fs("usbfs", &usbfs_mount, &usbfs_mount_count);
+ if (retval) {
+ err ("Unable to get usbfs mount");
+ goto exit;
+ }
+
+ ignore_mount = 0;
+
+ parent = usbfs_mount->mnt_sb->s_root;
+ devices_usbfs_dentry = fs_create_file ("devices",
+ listmode | S_IFREG, parent,
+ NULL, &usbfs_devices_fops,
+ listuid, listgid);
+ if (devices_usbfs_dentry == NULL) {
+ err ("Unable to create devices usbfs file");
+ retval = -ENODEV;
+ goto error_clean_mounts;
+ }
+
+ goto exit;
+
+error_clean_mounts:
+ simple_release_fs(&usbfs_mount, &usbfs_mount_count);
+exit:
+ return retval;
+}
+
+static void remove_special_files (void)
+{
+ if (devices_usbfs_dentry)
+ fs_remove_file (devices_usbfs_dentry);
+ devices_usbfs_dentry = NULL;
+ simple_release_fs(&usbfs_mount, &usbfs_mount_count);
+}
+
+void usbfs_update_special (void)
+{
+ struct inode *inode;
+
+ if (devices_usbfs_dentry) {
+ inode = devices_usbfs_dentry->d_inode;
+ if (inode)
+ inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+ }
+}
+
+void usbfs_add_bus(struct usb_bus *bus)
+{
+ struct dentry *parent;
+ char name[8];
+ int retval;
+
+ /* create the special files if this is the first bus added */
+ if (num_buses == 0) {
+ retval = create_special_files();
+ if (retval)
+ return;
+ }
+ ++num_buses;
+
+ sprintf (name, "%03d", bus->busnum);
+
+ parent = usbfs_mount->mnt_sb->s_root;
+ bus->usbfs_dentry = fs_create_file (name, busmode | S_IFDIR, parent,
+ bus, NULL, busuid, busgid);
+ if (bus->usbfs_dentry == NULL) {
+ err ("error creating usbfs bus entry");
+ return;
+ }
+
+ usbfs_update_special();
+ usbfs_conn_disc_event();
+}
+
+void usbfs_remove_bus(struct usb_bus *bus)
+{
+ if (bus->usbfs_dentry) {
+ fs_remove_file (bus->usbfs_dentry);
+ bus->usbfs_dentry = NULL;
+ }
+
+ --num_buses;
+ if (num_buses <= 0) {
+ remove_special_files();
+ num_buses = 0;
+ }
+
+ usbfs_update_special();
+ usbfs_conn_disc_event();
+}
+
+void usbfs_add_device(struct usb_device *dev)
+{
+ char name[8];
+ int i;
+ int i_size;
+
+ sprintf (name, "%03d", dev->devnum);
+ dev->usbfs_dentry = fs_create_file (name, devmode | S_IFREG,
+ dev->bus->usbfs_dentry, dev,
+ &usbfs_device_file_operations,
+ devuid, devgid);
+ if (dev->usbfs_dentry == NULL) {
+ err ("error creating usbfs device entry");
+ return;
+ }
+
+ /* Set the size of the device's file to be
+ * equal to the size of the device descriptors. */
+ i_size = sizeof (struct usb_device_descriptor);
+ for (i = 0; i < dev->descriptor.bNumConfigurations; ++i) {
+ struct usb_config_descriptor *config =
+ (struct usb_config_descriptor *)dev->rawdescriptors[i];
+ i_size += le16_to_cpu(config->wTotalLength);
+ }
+ if (dev->usbfs_dentry->d_inode)
+ dev->usbfs_dentry->d_inode->i_size = i_size;
+
+ usbfs_update_special();
+ usbfs_conn_disc_event();
+}
+
+void usbfs_remove_device(struct usb_device *dev)
+{
+ struct dev_state *ds;
+ struct siginfo sinfo;
+
+ if (dev->usbfs_dentry) {
+ fs_remove_file (dev->usbfs_dentry);
+ dev->usbfs_dentry = NULL;
+ }
+ while (!list_empty(&dev->filelist)) {
+ ds = list_entry(dev->filelist.next, struct dev_state, list);
+ wake_up_all(&ds->wait);
+ list_del_init(&ds->list);
+ if (ds->discsignr) {
+ sinfo.si_signo = SIGPIPE;
+ sinfo.si_errno = EPIPE;
+ sinfo.si_code = SI_ASYNCIO;
+ sinfo.si_addr = ds->disccontext;
+ send_sig_info(ds->discsignr, &sinfo, ds->disctask);
+ }
+ }
+ usbfs_update_special();
+ usbfs_conn_disc_event();
+}
+
+/* --------------------------------------------------------------------- */
+
+static struct proc_dir_entry *usbdir = NULL;
+
+int __init usbfs_init(void)
+{
+ int retval;
+
+ retval = usb_register(&usbfs_driver);
+ if (retval)
+ return retval;
+
+ retval = register_filesystem(&usb_fs_type);
+ if (retval) {
+ usb_deregister(&usbfs_driver);
+ return retval;
+ }
+
+ /* create mount point for usbfs */
+ usbdir = proc_mkdir("usb", proc_bus);
+
+ return 0;
+}
+
+void usbfs_cleanup(void)
+{
+ usb_deregister(&usbfs_driver);
+ unregister_filesystem(&usb_fs_type);
+ if (usbdir)
+ remove_proc_entry("usb", proc_bus);
+}
+
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
new file mode 100644
index 000000000000..40bdb38e7bcb
--- /dev/null
+++ b/drivers/usb/core/message.c
@@ -0,0 +1,1480 @@
+/*
+ * message.c - synchronous message handling
+ */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+
+#include <linux/pci.h> /* for scatterlist macros */
+#include <linux/usb.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/mm.h>
+#include <linux/timer.h>
+#include <linux/ctype.h>
+#include <linux/device.h>
+#include <asm/byteorder.h>
+
+#include "hcd.h" /* for usbcore internals */
+#include "usb.h"
+
+static void usb_api_blocking_completion(struct urb *urb, struct pt_regs *regs)
+{
+ complete((struct completion *)urb->context);
+}
+
+
+static void timeout_kill(unsigned long data)
+{
+ struct urb *urb = (struct urb *) data;
+
+ usb_unlink_urb(urb);
+}
+
+// Starts urb and waits for completion or timeout
+// note that this call is NOT interruptible, while
+// many device driver i/o requests should be interruptible
+static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
+{
+ struct completion done;
+ struct timer_list timer;
+ int status;
+
+ init_completion(&done);
+ urb->context = &done;
+ urb->transfer_flags |= URB_ASYNC_UNLINK;
+ urb->actual_length = 0;
+ status = usb_submit_urb(urb, GFP_NOIO);
+
+ if (status == 0) {
+ if (timeout > 0) {
+ init_timer(&timer);
+ timer.expires = jiffies + msecs_to_jiffies(timeout);
+ timer.data = (unsigned long)urb;
+ timer.function = timeout_kill;
+ /* grr. timeout _should_ include submit delays. */
+ add_timer(&timer);
+ }
+ wait_for_completion(&done);
+ status = urb->status;
+ /* note: HCDs return ETIMEDOUT for other reasons too */
+ if (status == -ECONNRESET) {
+ dev_dbg(&urb->dev->dev,
+ "%s timed out on ep%d%s len=%d/%d\n",
+ current->comm,
+ usb_pipeendpoint(urb->pipe),
+ usb_pipein(urb->pipe) ? "in" : "out",
+ urb->actual_length,
+ urb->transfer_buffer_length
+ );
+ if (urb->actual_length > 0)
+ status = 0;
+ else
+ status = -ETIMEDOUT;
+ }
+ if (timeout > 0)
+ del_timer_sync(&timer);
+ }
+
+ if (actual_length)
+ *actual_length = urb->actual_length;
+ usb_free_urb(urb);
+ return status;
+}
+
+/*-------------------------------------------------------------------*/
+// returns status (negative) or length (positive)
+static 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;
+
+ urb = usb_alloc_urb(0, GFP_NOIO);
+ if (!urb)
+ return -ENOMEM;
+
+ usb_fill_control_urb(urb, usb_dev, pipe, (unsigned char *)cmd, data,
+ len, usb_api_blocking_completion, NULL);
+
+ retv = usb_start_wait_urb(urb, timeout, &length);
+ if (retv < 0)
+ return retv;
+ else
+ return length;
+}
+
+/**
+ * usb_control_msg - Builds a control urb, sends it off and waits for completion
+ * @dev: pointer to the usb device to send the message to
+ * @pipe: endpoint "pipe" to send the message to
+ * @request: USB message request value
+ * @requesttype: USB message request type value
+ * @value: USB message value
+ * @index: USB message index value
+ * @data: pointer to the data to send
+ * @size: length in bytes of the data to send
+ * @timeout: time in msecs to wait for the message to complete before
+ * timing out (if 0 the wait is forever)
+ * Context: !in_interrupt ()
+ *
+ * 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 a negative error number.
+ *
+ * Don't use this function from within an interrupt context, like a
+ * bottom half handler. If you need an asynchronous message, or need to send
+ * a message from within interrupt context, use usb_submit_urb()
+ * If a thread in your driver uses this call, make sure your disconnect()
+ * method can wait for it to complete. Since you don't have a handle on
+ * the URB used, you can't cancel the request.
+ */
+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_NOIO);
+ 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");
+
+ ret = usb_internal_control_msg(dev, pipe, dr, data, size, timeout);
+
+ kfree(dr);
+
+ return ret;
+}
+
+
+/**
+ * usb_bulk_msg - Builds a bulk urb, sends it off and waits for completion
+ * @usb_dev: pointer to the usb device to send the message to
+ * @pipe: endpoint "pipe" to send the message to
+ * @data: pointer to the data to send
+ * @len: length in bytes of the data to send
+ * @actual_length: pointer to a location to put the actual length transferred in bytes
+ * @timeout: time in msecs to wait for the message to complete before
+ * timing out (if 0 the wait is forever)
+ * Context: !in_interrupt ()
+ *
+ * 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 an asynchronous message, or need to
+ * send a message from within interrupt context, use usb_submit_urb()
+ * If a thread in your driver uses this call, make sure your disconnect()
+ * method can wait for it to complete. Since you don't have a handle on
+ * the URB used, you can't cancel the request.
+ */
+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;
+
+ urb=usb_alloc_urb(0, GFP_KERNEL);
+ if (!urb)
+ return -ENOMEM;
+
+ usb_fill_bulk_urb(urb, usb_dev, pipe, data, len,
+ usb_api_blocking_completion, NULL);
+
+ return usb_start_wait_urb(urb, timeout, actual_length);
+}
+
+/*-------------------------------------------------------------------*/
+
+static void sg_clean (struct usb_sg_request *io)
+{
+ if (io->urbs) {
+ while (io->entries--)
+ usb_free_urb (io->urbs [io->entries]);
+ kfree (io->urbs);
+ io->urbs = NULL;
+ }
+ if (io->dev->dev.dma_mask != NULL)
+ usb_buffer_unmap_sg (io->dev, io->pipe, io->sg, io->nents);
+ io->dev = NULL;
+}
+
+static void sg_complete (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_sg_request *io = (struct usb_sg_request *) urb->context;
+
+ spin_lock (&io->lock);
+
+ /* In 2.5 we require hcds' endpoint queues not to progress after fault
+ * reports, until the completion callback (this!) returns. That lets
+ * device driver code (like this routine) unlink queued urbs first,
+ * if it needs to, since the HC won't work on them at all. So it's
+ * not possible for page N+1 to overwrite page N, and so on.
+ *
+ * That's only for "hard" faults; "soft" faults (unlinks) sometimes
+ * complete before the HCD can get requests away from hardware,
+ * though never during cleanup after a hard fault.
+ */
+ if (io->status
+ && (io->status != -ECONNRESET
+ || urb->status != -ECONNRESET)
+ && urb->actual_length) {
+ dev_err (io->dev->bus->controller,
+ "dev %s ep%d%s scatterlist error %d/%d\n",
+ io->dev->devpath,
+ usb_pipeendpoint (urb->pipe),
+ usb_pipein (urb->pipe) ? "in" : "out",
+ urb->status, io->status);
+ // BUG ();
+ }
+
+ if (io->status == 0 && urb->status && urb->status != -ECONNRESET) {
+ int i, found, status;
+
+ io->status = urb->status;
+
+ /* the previous urbs, and this one, completed already.
+ * unlink pending urbs so they won't rx/tx bad data.
+ * careful: unlink can sometimes be synchronous...
+ */
+ spin_unlock (&io->lock);
+ for (i = 0, found = 0; i < io->entries; i++) {
+ if (!io->urbs [i] || !io->urbs [i]->dev)
+ continue;
+ if (found) {
+ status = usb_unlink_urb (io->urbs [i]);
+ if (status != -EINPROGRESS && status != -EBUSY)
+ dev_err (&io->dev->dev,
+ "%s, unlink --> %d\n",
+ __FUNCTION__, status);
+ } else if (urb == io->urbs [i])
+ found = 1;
+ }
+ spin_lock (&io->lock);
+ }
+ urb->dev = NULL;
+
+ /* on the last completion, signal usb_sg_wait() */
+ io->bytes += urb->actual_length;
+ io->count--;
+ if (!io->count)
+ complete (&io->complete);
+
+ spin_unlock (&io->lock);
+}
+
+
+/**
+ * usb_sg_init - initializes scatterlist-based bulk/interrupt I/O request
+ * @io: request block being initialized. until usb_sg_wait() returns,
+ * treat this as a pointer to an opaque block of memory,
+ * @dev: the usb device that will send or receive the data
+ * @pipe: endpoint "pipe" used to transfer the data
+ * @period: polling rate for interrupt endpoints, in frames or
+ * (for high speed endpoints) microframes; ignored for bulk
+ * @sg: scatterlist entries
+ * @nents: how many entries in the scatterlist
+ * @length: how many bytes to send from the scatterlist, or zero to
+ * send every byte identified in the list.
+ * @mem_flags: SLAB_* flags affecting memory allocations in this call
+ *
+ * Returns zero for success, else a negative errno value. This initializes a
+ * scatter/gather request, allocating resources such as I/O mappings and urb
+ * memory (except maybe memory used by USB controller drivers).
+ *
+ * The request must be issued using usb_sg_wait(), which waits for the I/O to
+ * complete (or to be canceled) and then cleans up all resources allocated by
+ * usb_sg_init().
+ *
+ * The request may be canceled with usb_sg_cancel(), either before or after
+ * usb_sg_wait() is called.
+ */
+int usb_sg_init (
+ struct usb_sg_request *io,
+ struct usb_device *dev,
+ unsigned pipe,
+ unsigned period,
+ struct scatterlist *sg,
+ int nents,
+ size_t length,
+ int mem_flags
+)
+{
+ int i;
+ int urb_flags;
+ int dma;
+
+ if (!io || !dev || !sg
+ || usb_pipecontrol (pipe)
+ || usb_pipeisoc (pipe)
+ || nents <= 0)
+ return -EINVAL;
+
+ spin_lock_init (&io->lock);
+ io->dev = dev;
+ io->pipe = pipe;
+ io->sg = sg;
+ io->nents = nents;
+
+ /* not all host controllers use DMA (like the mainstream pci ones);
+ * they can use PIO (sl811) or be software over another transport.
+ */
+ dma = (dev->dev.dma_mask != NULL);
+ if (dma)
+ io->entries = usb_buffer_map_sg (dev, pipe, sg, nents);
+ else
+ io->entries = nents;
+
+ /* initialize all the urbs we'll use */
+ if (io->entries <= 0)
+ return io->entries;
+
+ io->count = io->entries;
+ io->urbs = kmalloc (io->entries * sizeof *io->urbs, mem_flags);
+ if (!io->urbs)
+ goto nomem;
+
+ urb_flags = URB_ASYNC_UNLINK | URB_NO_TRANSFER_DMA_MAP
+ | URB_NO_INTERRUPT;
+ if (usb_pipein (pipe))
+ urb_flags |= URB_SHORT_NOT_OK;
+
+ for (i = 0; i < io->entries; i++) {
+ unsigned len;
+
+ io->urbs [i] = usb_alloc_urb (0, mem_flags);
+ if (!io->urbs [i]) {
+ io->entries = i;
+ goto nomem;
+ }
+
+ io->urbs [i]->dev = NULL;
+ io->urbs [i]->pipe = pipe;
+ io->urbs [i]->interval = period;
+ io->urbs [i]->transfer_flags = urb_flags;
+
+ io->urbs [i]->complete = sg_complete;
+ io->urbs [i]->context = io;
+ io->urbs [i]->status = -EINPROGRESS;
+ io->urbs [i]->actual_length = 0;
+
+ if (dma) {
+ /* hc may use _only_ transfer_dma */
+ io->urbs [i]->transfer_dma = sg_dma_address (sg + i);
+ len = sg_dma_len (sg + i);
+ } else {
+ /* hc may use _only_ transfer_buffer */
+ io->urbs [i]->transfer_buffer =
+ page_address (sg [i].page) + sg [i].offset;
+ len = sg [i].length;
+ }
+
+ if (length) {
+ len = min_t (unsigned, len, length);
+ length -= len;
+ if (length == 0)
+ io->entries = i + 1;
+ }
+ io->urbs [i]->transfer_buffer_length = len;
+ }
+ io->urbs [--i]->transfer_flags &= ~URB_NO_INTERRUPT;
+
+ /* transaction state */
+ io->status = 0;
+ io->bytes = 0;
+ init_completion (&io->complete);
+ return 0;
+
+nomem:
+ sg_clean (io);
+ return -ENOMEM;
+}
+
+
+/**
+ * usb_sg_wait - synchronously execute scatter/gather request
+ * @io: request block handle, as initialized with usb_sg_init().
+ * some fields become accessible when this call returns.
+ * Context: !in_interrupt ()
+ *
+ * This function blocks until the specified I/O operation completes. It
+ * leverages the grouping of the related I/O requests to get good transfer
+ * rates, by queueing the requests. At higher speeds, such queuing can
+ * significantly improve USB throughput.
+ *
+ * There are three kinds of completion for this function.
+ * (1) success, where io->status is zero. The number of io->bytes
+ * transferred is as requested.
+ * (2) error, where io->status is a negative errno value. The number
+ * of io->bytes transferred before the error is usually less
+ * than requested, and can be nonzero.
+ * (3) cancelation, a type of error with status -ECONNRESET that
+ * is initiated by usb_sg_cancel().
+ *
+ * When this function returns, all memory allocated through usb_sg_init() or
+ * this call will have been freed. The request block parameter may still be
+ * passed to usb_sg_cancel(), or it may be freed. It could also be
+ * reinitialized and then reused.
+ *
+ * Data Transfer Rates:
+ *
+ * Bulk transfers are valid for full or high speed endpoints.
+ * The best full speed data rate is 19 packets of 64 bytes each
+ * per frame, or 1216 bytes per millisecond.
+ * The best high speed data rate is 13 packets of 512 bytes each
+ * per microframe, or 52 KBytes per millisecond.
+ *
+ * The reason to use interrupt transfers through this API would most likely
+ * be to reserve high speed bandwidth, where up to 24 KBytes per millisecond
+ * could be transferred. That capability is less useful for low or full
+ * speed interrupt endpoints, which allow at most one packet per millisecond,
+ * of at most 8 or 64 bytes (respectively).
+ */
+void usb_sg_wait (struct usb_sg_request *io)
+{
+ int i, entries = io->entries;
+
+ /* queue the urbs. */
+ spin_lock_irq (&io->lock);
+ for (i = 0; i < entries && !io->status; i++) {
+ int retval;
+
+ io->urbs [i]->dev = io->dev;
+ retval = usb_submit_urb (io->urbs [i], SLAB_ATOMIC);
+
+ /* after we submit, let completions or cancelations fire;
+ * we handshake using io->status.
+ */
+ spin_unlock_irq (&io->lock);
+ switch (retval) {
+ /* maybe we retrying will recover */
+ case -ENXIO: // hc didn't queue this one
+ case -EAGAIN:
+ case -ENOMEM:
+ io->urbs[i]->dev = NULL;
+ retval = 0;
+ i--;
+ yield ();
+ break;
+
+ /* no error? continue immediately.
+ *
+ * NOTE: to work better with UHCI (4K I/O buffer may
+ * need 3K of TDs) it may be good to limit how many
+ * URBs are queued at once; N milliseconds?
+ */
+ case 0:
+ cpu_relax ();
+ break;
+
+ /* fail any uncompleted urbs */
+ default:
+ io->urbs [i]->dev = NULL;
+ io->urbs [i]->status = retval;
+ dev_dbg (&io->dev->dev, "%s, submit --> %d\n",
+ __FUNCTION__, retval);
+ usb_sg_cancel (io);
+ }
+ spin_lock_irq (&io->lock);
+ if (retval && (io->status == 0 || io->status == -ECONNRESET))
+ io->status = retval;
+ }
+ io->count -= entries - i;
+ if (io->count == 0)
+ complete (&io->complete);
+ spin_unlock_irq (&io->lock);
+
+ /* OK, yes, this could be packaged as non-blocking.
+ * So could the submit loop above ... but it's easier to
+ * solve neither problem than to solve both!
+ */
+ wait_for_completion (&io->complete);
+
+ sg_clean (io);
+}
+
+/**
+ * usb_sg_cancel - stop scatter/gather i/o issued by usb_sg_wait()
+ * @io: request block, initialized with usb_sg_init()
+ *
+ * This stops a request after it has been started by usb_sg_wait().
+ * It can also prevents one initialized by usb_sg_init() from starting,
+ * so that call just frees resources allocated to the request.
+ */
+void usb_sg_cancel (struct usb_sg_request *io)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave (&io->lock, flags);
+
+ /* shut everything down, if it didn't already */
+ if (!io->status) {
+ int i;
+
+ io->status = -ECONNRESET;
+ spin_unlock (&io->lock);
+ for (i = 0; i < io->entries; i++) {
+ int retval;
+
+ if (!io->urbs [i]->dev)
+ continue;
+ retval = usb_unlink_urb (io->urbs [i]);
+ if (retval != -EINPROGRESS && retval != -EBUSY)
+ dev_warn (&io->dev->dev, "%s, unlink --> %d\n",
+ __FUNCTION__, retval);
+ }
+ spin_lock (&io->lock);
+ }
+ spin_unlock_irqrestore (&io->lock, flags);
+}
+
+/*-------------------------------------------------------------------*/
+
+/**
+ * usb_get_descriptor - issues a generic GET_DESCRIPTOR request
+ * @dev: the device whose descriptor is being retrieved
+ * @type: the descriptor type (USB_DT_*)
+ * @index: the number of the descriptor
+ * @buf: where to put the descriptor
+ * @size: how big is "buf"?
+ * Context: !in_interrupt ()
+ *
+ * Gets a USB descriptor. Convenience functions exist to simplify
+ * getting some types of descriptors. Use
+ * usb_get_string() or usb_string() for USB_DT_STRING.
+ * Device (USB_DT_DEVICE) and configuration descriptors (USB_DT_CONFIG)
+ * are part of the device structure.
+ * In addition to a number of USB-standard descriptors, some
+ * devices also use class-specific or vendor-specific descriptors.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ *
+ * Returns the number of bytes received on success, or else the status code
+ * returned by the underlying usb_control_msg() call.
+ */
+int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char index, void *buf, int size)
+{
+ int i;
+ int result;
+
+ memset(buf,0,size); // Make sure we parse really received data
+
+ for (i = 0; i < 3; ++i) {
+ /* retry on length 0 or stall; some devices are flakey */
+ result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
+ (type << 8) + index, 0, buf, size,
+ USB_CTRL_GET_TIMEOUT);
+ if (result == 0 || result == -EPIPE)
+ continue;
+ if (result > 1 && ((u8 *)buf)[1] != type) {
+ result = -EPROTO;
+ continue;
+ }
+ break;
+ }
+ return result;
+}
+
+/**
+ * usb_get_string - gets a string descriptor
+ * @dev: the device whose string descriptor is being retrieved
+ * @langid: code for language chosen (from string descriptor zero)
+ * @index: the number of the descriptor
+ * @buf: where to put the string
+ * @size: how big is "buf"?
+ * Context: !in_interrupt ()
+ *
+ * Retrieves a string, encoded using UTF-16LE (Unicode, 16 bits per character,
+ * in little-endian byte order).
+ * The usb_string() function will often be a convenient way to turn
+ * these strings into kernel-printable form.
+ *
+ * Strings may be referenced in device, configuration, interface, or other
+ * descriptors, and could also be used in vendor-specific ways.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ *
+ * Returns the number of bytes received on success, or else the status code
+ * returned by the underlying usb_control_msg() call.
+ */
+int usb_get_string(struct usb_device *dev, unsigned short langid,
+ unsigned char index, void *buf, int size)
+{
+ int i;
+ int result;
+
+ for (i = 0; i < 3; ++i) {
+ /* retry on length 0 or stall; some devices are flakey */
+ result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
+ (USB_DT_STRING << 8) + index, langid, buf, size,
+ USB_CTRL_GET_TIMEOUT);
+ if (!(result == 0 || result == -EPIPE))
+ break;
+ }
+ return result;
+}
+
+static void usb_try_string_workarounds(unsigned char *buf, int *length)
+{
+ int newlength, oldlength = *length;
+
+ for (newlength = 2; newlength + 1 < oldlength; newlength += 2)
+ if (!isprint(buf[newlength]) || buf[newlength + 1])
+ break;
+
+ if (newlength > 2) {
+ buf[0] = newlength;
+ *length = newlength;
+ }
+}
+
+static int usb_string_sub(struct usb_device *dev, unsigned int langid,
+ unsigned int index, unsigned char *buf)
+{
+ int rc;
+
+ /* Try to read the string descriptor by asking for the maximum
+ * possible number of bytes */
+ rc = usb_get_string(dev, langid, index, buf, 255);
+
+ /* If that failed try to read the descriptor length, then
+ * ask for just that many bytes */
+ if (rc < 2) {
+ rc = usb_get_string(dev, langid, index, buf, 2);
+ if (rc == 2)
+ rc = usb_get_string(dev, langid, index, buf, buf[0]);
+ }
+
+ if (rc >= 2) {
+ if (!buf[0] && !buf[1])
+ usb_try_string_workarounds(buf, &rc);
+
+ /* There might be extra junk at the end of the descriptor */
+ if (buf[0] < rc)
+ rc = buf[0];
+
+ rc = rc - (rc & 1); /* force a multiple of two */
+ }
+
+ if (rc < 2)
+ rc = (rc < 0 ? rc : -EINVAL);
+
+ return rc;
+}
+
+/**
+ * usb_string - returns ISO 8859-1 version of a string descriptor
+ * @dev: the device whose string descriptor is being retrieved
+ * @index: the number of the descriptor
+ * @buf: where to put the string
+ * @size: how big is "buf"?
+ * Context: !in_interrupt ()
+ *
+ * This converts the UTF-16LE encoded strings returned by devices, from
+ * usb_get_string_descriptor(), to null-terminated ISO-8859-1 encoded ones
+ * that are more usable in most kernel contexts. Note that all characters
+ * in the chosen descriptor that can't be encoded using ISO-8859-1
+ * are converted to the question mark ("?") character, and this function
+ * chooses strings in the first language supported by the device.
+ *
+ * The ASCII (or, redundantly, "US-ASCII") character set is the seven-bit
+ * subset of ISO 8859-1. ISO-8859-1 is the eight-bit subset of Unicode,
+ * and is appropriate for use many uses of English and several other
+ * Western European languages. (But it doesn't include the "Euro" symbol.)
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ *
+ * Returns length of the string (>= 0) or usb_control_msg status (< 0).
+ */
+int usb_string(struct usb_device *dev, int index, char *buf, size_t size)
+{
+ unsigned char *tbuf;
+ int err;
+ unsigned int u, idx;
+
+ if (dev->state == USB_STATE_SUSPENDED)
+ return -EHOSTUNREACH;
+ if (size <= 0 || !buf || !index)
+ return -EINVAL;
+ buf[0] = 0;
+ tbuf = kmalloc(256, GFP_KERNEL);
+ if (!tbuf)
+ return -ENOMEM;
+
+ /* get langid for strings if it's not yet known */
+ if (!dev->have_langid) {
+ err = usb_string_sub(dev, 0, 0, tbuf);
+ if (err < 0) {
+ dev_err (&dev->dev,
+ "string descriptor 0 read error: %d\n",
+ err);
+ goto errout;
+ } else if (err < 4) {
+ dev_err (&dev->dev, "string descriptor 0 too short\n");
+ err = -EINVAL;
+ goto errout;
+ } else {
+ dev->have_langid = -1;
+ dev->string_langid = tbuf[2] | (tbuf[3]<< 8);
+ /* always use the first langid listed */
+ dev_dbg (&dev->dev, "default language 0x%04x\n",
+ dev->string_langid);
+ }
+ }
+
+ err = usb_string_sub(dev, dev->string_langid, index, tbuf);
+ if (err < 0)
+ goto errout;
+
+ size--; /* leave room for trailing NULL char in output buffer */
+ for (idx = 0, u = 2; u < err; u += 2) {
+ if (idx >= size)
+ break;
+ if (tbuf[u+1]) /* high byte */
+ buf[idx++] = '?'; /* non ISO-8859-1 character */
+ else
+ buf[idx++] = tbuf[u];
+ }
+ buf[idx] = 0;
+ err = idx;
+
+ if (tbuf[1] != USB_DT_STRING)
+ dev_dbg(&dev->dev, "wrong descriptor type %02x for string %d (\"%s\")\n", tbuf[1], index, buf);
+
+ errout:
+ kfree(tbuf);
+ return err;
+}
+
+/*
+ * usb_get_device_descriptor - (re)reads the device descriptor (usbcore)
+ * @dev: the device whose device descriptor is being updated
+ * @size: how much of the descriptor to read
+ * Context: !in_interrupt ()
+ *
+ * Updates the copy of the device descriptor stored in the device structure,
+ * which dedicates space for this purpose. Note that several fields are
+ * converted to the host CPU's byte order: the USB version (bcdUSB), and
+ * vendors product and version fields (idVendor, idProduct, and bcdDevice).
+ * That lets device drivers compare against non-byteswapped constants.
+ *
+ * Not exported, only for use by the core. If drivers really want to read
+ * the device descriptor directly, they can call usb_get_descriptor() with
+ * type = USB_DT_DEVICE and index = 0.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ *
+ * Returns the number of bytes received on success, or else the status code
+ * returned by the underlying usb_control_msg() call.
+ */
+int usb_get_device_descriptor(struct usb_device *dev, unsigned int size)
+{
+ struct usb_device_descriptor *desc;
+ int ret;
+
+ if (size > sizeof(*desc))
+ return -EINVAL;
+ desc = kmalloc(sizeof(*desc), GFP_NOIO);
+ if (!desc)
+ return -ENOMEM;
+
+ ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, desc, size);
+ if (ret >= 0)
+ memcpy(&dev->descriptor, desc, size);
+ kfree(desc);
+ return ret;
+}
+
+/**
+ * usb_get_status - issues a GET_STATUS call
+ * @dev: the device whose status is being checked
+ * @type: USB_RECIP_*; for device, interface, or endpoint
+ * @target: zero (for device), else interface or endpoint number
+ * @data: pointer to two bytes of bitmap data
+ * Context: !in_interrupt ()
+ *
+ * Returns device, interface, or endpoint status. Normally only of
+ * interest to see if the device is self powered, or has enabled the
+ * remote wakeup facility; or whether a bulk or interrupt endpoint
+ * is halted ("stalled").
+ *
+ * Bits in these status bitmaps are set using the SET_FEATURE request,
+ * and cleared using the CLEAR_FEATURE request. The usb_clear_halt()
+ * function should be used to clear halt ("stall") status.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ *
+ * Returns the number of bytes received on success, or else the status code
+ * returned by the underlying usb_control_msg() call.
+ */
+int usb_get_status(struct usb_device *dev, int type, int target, void *data)
+{
+ int ret;
+ u16 *status = kmalloc(sizeof(*status), GFP_KERNEL);
+
+ if (!status)
+ return -ENOMEM;
+
+ ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, status,
+ sizeof(*status), USB_CTRL_GET_TIMEOUT);
+
+ *(u16 *)data = *status;
+ kfree(status);
+ return ret;
+}
+
+/**
+ * usb_clear_halt - tells device to clear endpoint halt/stall condition
+ * @dev: device whose endpoint is halted
+ * @pipe: endpoint "pipe" being cleared
+ * Context: !in_interrupt ()
+ *
+ * This is used to clear halt conditions for bulk and interrupt endpoints,
+ * as reported by URB completion status. Endpoints that are halted are
+ * sometimes referred to as being "stalled". Such endpoints are unable
+ * to transmit or receive data until the halt status is cleared. Any URBs
+ * queued for such an endpoint should normally be unlinked by the driver
+ * before clearing the halt condition, as described in sections 5.7.5
+ * and 5.8.5 of the USB 2.0 spec.
+ *
+ * Note that control and isochronous endpoints don't halt, although control
+ * endpoints report "protocol stall" (for unsupported requests) using the
+ * same status code used to report a true stall.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ *
+ * Returns zero on success, or else the status code returned by the
+ * underlying usb_control_msg() call.
+ */
+int usb_clear_halt(struct usb_device *dev, int pipe)
+{
+ int result;
+ int endp = usb_pipeendpoint(pipe);
+
+ if (usb_pipein (pipe))
+ endp |= USB_DIR_IN;
+
+ /* we don't care if it wasn't halted first. in fact some devices
+ * (like some ibmcam model 1 units) seem to expect hosts to make
+ * this request for iso endpoints, which can't halt!
+ */
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT,
+ USB_ENDPOINT_HALT, endp, NULL, 0,
+ USB_CTRL_SET_TIMEOUT);
+
+ /* don't un-halt or force to DATA0 except on success */
+ if (result < 0)
+ return result;
+
+ /* NOTE: seems like Microsoft and Apple don't bother verifying
+ * the clear "took", so some devices could lock up if you check...
+ * such as the Hagiwara FlashGate DUAL. So we won't bother.
+ *
+ * NOTE: make sure the logic here doesn't diverge much from
+ * the copy in usb-storage, for as long as we need two copies.
+ */
+
+ /* toggle was reset by the clear */
+ usb_settoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe), 0);
+
+ return 0;
+}
+
+/**
+ * usb_disable_endpoint -- Disable an endpoint by address
+ * @dev: the device whose endpoint is being disabled
+ * @epaddr: the endpoint's address. Endpoint number for output,
+ * endpoint number + USB_DIR_IN for input
+ *
+ * Deallocates hcd/hardware state for this endpoint ... and nukes all
+ * pending urbs.
+ *
+ * If the HCD hasn't registered a disable() function, this sets the
+ * endpoint's maxpacket size to 0 to prevent further submissions.
+ */
+void usb_disable_endpoint(struct usb_device *dev, unsigned int epaddr)
+{
+ unsigned int epnum = epaddr & USB_ENDPOINT_NUMBER_MASK;
+ struct usb_host_endpoint *ep;
+
+ if (!dev)
+ return;
+
+ if (usb_endpoint_out(epaddr)) {
+ ep = dev->ep_out[epnum];
+ dev->ep_out[epnum] = NULL;
+ } else {
+ ep = dev->ep_in[epnum];
+ dev->ep_in[epnum] = NULL;
+ }
+ if (ep && dev->bus && dev->bus->op && dev->bus->op->disable)
+ dev->bus->op->disable(dev, ep);
+}
+
+/**
+ * usb_disable_interface -- Disable all endpoints for an interface
+ * @dev: the device whose interface is being disabled
+ * @intf: pointer to the interface descriptor
+ *
+ * Disables all the endpoints for the interface's current altsetting.
+ */
+void usb_disable_interface(struct usb_device *dev, struct usb_interface *intf)
+{
+ struct usb_host_interface *alt = intf->cur_altsetting;
+ int i;
+
+ for (i = 0; i < alt->desc.bNumEndpoints; ++i) {
+ usb_disable_endpoint(dev,
+ alt->endpoint[i].desc.bEndpointAddress);
+ }
+}
+
+/*
+ * usb_disable_device - Disable all the endpoints for a USB device
+ * @dev: the device whose endpoints are being disabled
+ * @skip_ep0: 0 to disable endpoint 0, 1 to skip it.
+ *
+ * Disables all the device's endpoints, potentially including endpoint 0.
+ * Deallocates hcd/hardware state for the endpoints (nuking all or most
+ * pending urbs) and usbcore state for the interfaces, so that usbcore
+ * must usb_set_configuration() before any interfaces could be used.
+ */
+void usb_disable_device(struct usb_device *dev, int skip_ep0)
+{
+ int i;
+
+ dev_dbg(&dev->dev, "%s nuking %s URBs\n", __FUNCTION__,
+ skip_ep0 ? "non-ep0" : "all");
+ for (i = skip_ep0; i < 16; ++i) {
+ usb_disable_endpoint(dev, i);
+ usb_disable_endpoint(dev, i + USB_DIR_IN);
+ }
+ dev->toggle[0] = dev->toggle[1] = 0;
+
+ /* getting rid of interfaces will disconnect
+ * any drivers bound to them (a key side effect)
+ */
+ if (dev->actconfig) {
+ for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
+ struct usb_interface *interface;
+
+ /* remove this interface */
+ interface = dev->actconfig->interface[i];
+ dev_dbg (&dev->dev, "unregistering interface %s\n",
+ interface->dev.bus_id);
+ usb_remove_sysfs_intf_files(interface);
+ kfree(interface->cur_altsetting->string);
+ interface->cur_altsetting->string = NULL;
+ device_del (&interface->dev);
+ }
+
+ /* Now that the interfaces are unbound, nobody should
+ * try to access them.
+ */
+ for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
+ put_device (&dev->actconfig->interface[i]->dev);
+ dev->actconfig->interface[i] = NULL;
+ }
+ dev->actconfig = NULL;
+ if (dev->state == USB_STATE_CONFIGURED)
+ usb_set_device_state(dev, USB_STATE_ADDRESS);
+ }
+}
+
+
+/*
+ * usb_enable_endpoint - Enable an endpoint for USB communications
+ * @dev: the device whose interface is being enabled
+ * @ep: the endpoint
+ *
+ * Resets the endpoint toggle, and sets dev->ep_{in,out} pointers.
+ * For control endpoints, both the input and output sides are handled.
+ */
+static void
+usb_enable_endpoint(struct usb_device *dev, struct usb_host_endpoint *ep)
+{
+ unsigned int epaddr = ep->desc.bEndpointAddress;
+ unsigned int epnum = epaddr & USB_ENDPOINT_NUMBER_MASK;
+ int is_control;
+
+ is_control = ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ == USB_ENDPOINT_XFER_CONTROL);
+ if (usb_endpoint_out(epaddr) || is_control) {
+ usb_settoggle(dev, epnum, 1, 0);
+ dev->ep_out[epnum] = ep;
+ }
+ if (!usb_endpoint_out(epaddr) || is_control) {
+ usb_settoggle(dev, epnum, 0, 0);
+ dev->ep_in[epnum] = ep;
+ }
+}
+
+/*
+ * usb_enable_interface - Enable all the endpoints for an interface
+ * @dev: the device whose interface is being enabled
+ * @intf: pointer to the interface descriptor
+ *
+ * Enables all the endpoints for the interface's current altsetting.
+ */
+static void usb_enable_interface(struct usb_device *dev,
+ struct usb_interface *intf)
+{
+ struct usb_host_interface *alt = intf->cur_altsetting;
+ int i;
+
+ for (i = 0; i < alt->desc.bNumEndpoints; ++i)
+ usb_enable_endpoint(dev, &alt->endpoint[i]);
+}
+
+/**
+ * usb_set_interface - Makes a particular alternate setting be current
+ * @dev: the device whose interface is being updated
+ * @interface: the interface being updated
+ * @alternate: the setting being chosen.
+ * Context: !in_interrupt ()
+ *
+ * This is used to enable data transfers on interfaces that may not
+ * be enabled by default. Not all devices support such configurability.
+ * Only the driver bound to an interface may change its setting.
+ *
+ * Within any given configuration, each interface may have several
+ * alternative settings. These are often used to control levels of
+ * bandwidth consumption. For example, the default setting for a high
+ * speed interrupt endpoint may not send more than 64 bytes per microframe,
+ * while interrupt transfers of up to 3KBytes per microframe are legal.
+ * Also, isochronous endpoints may never be part of an
+ * interface's default setting. To access such bandwidth, alternate
+ * interface settings must be made current.
+ *
+ * Note that in the Linux USB subsystem, bandwidth associated with
+ * an endpoint in a given alternate setting is not reserved until an URB
+ * is submitted that needs that bandwidth. Some other operating systems
+ * allocate bandwidth early, when a configuration is chosen.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ * Also, drivers must not change altsettings while urbs are scheduled for
+ * endpoints in that interface; all such urbs must first be completed
+ * (perhaps forced by unlinking).
+ *
+ * Returns zero on success, or else the status code returned by the
+ * underlying usb_control_msg() call.
+ */
+int usb_set_interface(struct usb_device *dev, int interface, int alternate)
+{
+ struct usb_interface *iface;
+ struct usb_host_interface *alt;
+ int ret;
+ int manual = 0;
+
+ if (dev->state == USB_STATE_SUSPENDED)
+ return -EHOSTUNREACH;
+
+ iface = usb_ifnum_to_if(dev, interface);
+ if (!iface) {
+ dev_dbg(&dev->dev, "selecting invalid interface %d\n",
+ interface);
+ return -EINVAL;
+ }
+
+ alt = usb_altnum_to_altsetting(iface, alternate);
+ if (!alt) {
+ warn("selecting invalid altsetting %d", alternate);
+ return -EINVAL;
+ }
+
+ ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE,
+ alternate, interface, NULL, 0, 5000);
+
+ /* 9.4.10 says devices don't need this and are free to STALL the
+ * request if the interface only has one alternate setting.
+ */
+ if (ret == -EPIPE && iface->num_altsetting == 1) {
+ dev_dbg(&dev->dev,
+ "manual set_interface for iface %d, alt %d\n",
+ interface, alternate);
+ manual = 1;
+ } else if (ret < 0)
+ return ret;
+
+ /* FIXME drivers shouldn't need to replicate/bugfix the logic here
+ * when they implement async or easily-killable versions of this or
+ * other "should-be-internal" functions (like clear_halt).
+ * should hcd+usbcore postprocess control requests?
+ */
+
+ /* prevent submissions using previous endpoint settings */
+ usb_disable_interface(dev, iface);
+
+ /* 9.1.1.5 says:
+ *
+ * Configuring a device or changing an alternate setting
+ * causes all of the status and configuration values
+ * associated with endpoints in the affected interfaces to
+ * be set to their default values. This includes setting
+ * the data toggle of any endpoint using data toggles to
+ * the value DATA0.
+ *
+ * Some devices take this too literally and don't reset the data
+ * toggles if the new altsetting is the same as the old one (the
+ * command isn't "changing" an alternate setting). We will manually
+ * reset the toggles when the new and old altsettings are the same.
+ * Most devices won't need this, but fortunately it doesn't happen
+ * often.
+ */
+ if (iface->cur_altsetting == alt)
+ manual = 1;
+ iface->cur_altsetting = alt;
+
+ /* If the interface only has one altsetting and the device didn't
+ * accept the request (or whenever the old altsetting is the same
+ * as the new one), we attempt to carry out the equivalent action
+ * by manually clearing the HALT feature for each endpoint in the
+ * new altsetting.
+ */
+ if (manual) {
+ int i;
+
+ for (i = 0; i < alt->desc.bNumEndpoints; i++) {
+ unsigned int epaddr =
+ alt->endpoint[i].desc.bEndpointAddress;
+ unsigned int pipe =
+ __create_pipe(dev, USB_ENDPOINT_NUMBER_MASK & epaddr)
+ | (usb_endpoint_out(epaddr) ? USB_DIR_OUT : USB_DIR_IN);
+
+ usb_clear_halt(dev, pipe);
+ }
+ }
+
+ /* 9.1.1.5: reset toggles for all endpoints in the new altsetting
+ *
+ * Note:
+ * Despite EP0 is always present in all interfaces/AS, the list of
+ * endpoints from the descriptor does not contain EP0. Due to its
+ * omnipresence one might expect EP0 being considered "affected" by
+ * any SetInterface request and hence assume toggles need to be reset.
+ * However, EP0 toggles are re-synced for every individual transfer
+ * during the SETUP stage - hence EP0 toggles are "don't care" here.
+ * (Likewise, EP0 never "halts" on well designed devices.)
+ */
+ usb_enable_interface(dev, iface);
+
+ return 0;
+}
+
+/**
+ * usb_reset_configuration - lightweight device reset
+ * @dev: the device whose configuration is being reset
+ *
+ * This issues a standard SET_CONFIGURATION request to the device using
+ * the current configuration. The effect is to reset most USB-related
+ * state in the device, including interface altsettings (reset to zero),
+ * endpoint halts (cleared), and data toggle (only for bulk and interrupt
+ * endpoints). Other usbcore state is unchanged, including bindings of
+ * usb device drivers to interfaces.
+ *
+ * Because this affects multiple interfaces, avoid using this with composite
+ * (multi-interface) devices. Instead, the driver for each interface may
+ * use usb_set_interface() on the interfaces it claims. Resetting the whole
+ * configuration would affect other drivers' interfaces.
+ *
+ * The caller must own the device lock.
+ *
+ * Returns zero on success, else a negative error code.
+ */
+int usb_reset_configuration(struct usb_device *dev)
+{
+ int i, retval;
+ struct usb_host_config *config;
+
+ if (dev->state == USB_STATE_SUSPENDED)
+ return -EHOSTUNREACH;
+
+ /* caller must have locked the device and must own
+ * the usb bus readlock (so driver bindings are stable);
+ * calls during probe() are fine
+ */
+
+ for (i = 1; i < 16; ++i) {
+ usb_disable_endpoint(dev, i);
+ usb_disable_endpoint(dev, i + USB_DIR_IN);
+ }
+
+ config = dev->actconfig;
+ retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ USB_REQ_SET_CONFIGURATION, 0,
+ config->desc.bConfigurationValue, 0,
+ NULL, 0, USB_CTRL_SET_TIMEOUT);
+ if (retval < 0) {
+ usb_set_device_state(dev, USB_STATE_ADDRESS);
+ return retval;
+ }
+
+ dev->toggle[0] = dev->toggle[1] = 0;
+
+ /* re-init hc/hcd interface/endpoint state */
+ for (i = 0; i < config->desc.bNumInterfaces; i++) {
+ struct usb_interface *intf = config->interface[i];
+ struct usb_host_interface *alt;
+
+ alt = usb_altnum_to_altsetting(intf, 0);
+
+ /* No altsetting 0? We'll assume the first altsetting.
+ * We could use a GetInterface call, but if a device is
+ * so non-compliant that it doesn't have altsetting 0
+ * then I wouldn't trust its reply anyway.
+ */
+ if (!alt)
+ alt = &intf->altsetting[0];
+
+ intf->cur_altsetting = alt;
+ usb_enable_interface(dev, intf);
+ }
+ return 0;
+}
+
+static void release_interface(struct device *dev)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_interface_cache *intfc =
+ altsetting_to_usb_interface_cache(intf->altsetting);
+
+ kref_put(&intfc->ref, usb_release_interface_cache);
+ kfree(intf);
+}
+
+/*
+ * usb_set_configuration - Makes a particular device setting be current
+ * @dev: the device whose configuration is being updated
+ * @configuration: the configuration being chosen.
+ * Context: !in_interrupt(), caller owns the device lock
+ *
+ * This is used to enable non-default device modes. Not all devices
+ * use this kind of configurability; many devices only have one
+ * configuration.
+ *
+ * USB device configurations may affect Linux interoperability,
+ * power consumption and the functionality available. For example,
+ * the default configuration is limited to using 100mA of bus power,
+ * so that when certain device functionality requires more power,
+ * and the device is bus powered, that functionality should be in some
+ * non-default device configuration. Other device modes may also be
+ * reflected as configuration options, such as whether two ISDN
+ * channels are available independently; and choosing between open
+ * standard device protocols (like CDC) or proprietary ones.
+ *
+ * Note that USB has an additional level of device configurability,
+ * associated with interfaces. That configurability is accessed using
+ * usb_set_interface().
+ *
+ * This call is synchronous. The calling context must be able to sleep,
+ * must own the device lock, and must not hold the driver model's USB
+ * bus rwsem; usb device driver probe() methods cannot use this routine.
+ *
+ * Returns zero on success, or else the status code returned by the
+ * underlying call that failed. On succesful completion, each interface
+ * in the original device configuration has been destroyed, and each one
+ * in the new configuration has been probed by all relevant usb device
+ * drivers currently known to the kernel.
+ */
+int usb_set_configuration(struct usb_device *dev, int configuration)
+{
+ int i, ret;
+ struct usb_host_config *cp = NULL;
+ struct usb_interface **new_interfaces = NULL;
+ int n, nintf;
+
+ for (i = 0; i < dev->descriptor.bNumConfigurations; i++) {
+ if (dev->config[i].desc.bConfigurationValue == configuration) {
+ cp = &dev->config[i];
+ break;
+ }
+ }
+ if ((!cp && configuration != 0))
+ return -EINVAL;
+
+ /* The USB spec says configuration 0 means unconfigured.
+ * But if a device includes a configuration numbered 0,
+ * we will accept it as a correctly configured state.
+ */
+ if (cp && configuration == 0)
+ dev_warn(&dev->dev, "config 0 descriptor??\n");
+
+ if (dev->state == USB_STATE_SUSPENDED)
+ return -EHOSTUNREACH;
+
+ /* Allocate memory for new interfaces before doing anything else,
+ * so that if we run out then nothing will have changed. */
+ n = nintf = 0;
+ if (cp) {
+ nintf = cp->desc.bNumInterfaces;
+ new_interfaces = kmalloc(nintf * sizeof(*new_interfaces),
+ GFP_KERNEL);
+ if (!new_interfaces) {
+ dev_err(&dev->dev, "Out of memory");
+ return -ENOMEM;
+ }
+
+ for (; n < nintf; ++n) {
+ new_interfaces[n] = kmalloc(
+ sizeof(struct usb_interface),
+ GFP_KERNEL);
+ if (!new_interfaces[n]) {
+ dev_err(&dev->dev, "Out of memory");
+ ret = -ENOMEM;
+free_interfaces:
+ while (--n >= 0)
+ kfree(new_interfaces[n]);
+ kfree(new_interfaces);
+ return ret;
+ }
+ }
+ }
+
+ /* if it's already configured, clear out old state first.
+ * getting rid of old interfaces means unbinding their drivers.
+ */
+ if (dev->state != USB_STATE_ADDRESS)
+ usb_disable_device (dev, 1); // Skip ep0
+
+ if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ USB_REQ_SET_CONFIGURATION, 0, configuration, 0,
+ NULL, 0, USB_CTRL_SET_TIMEOUT)) < 0)
+ goto free_interfaces;
+
+ dev->actconfig = cp;
+ if (!cp)
+ usb_set_device_state(dev, USB_STATE_ADDRESS);
+ else {
+ usb_set_device_state(dev, USB_STATE_CONFIGURED);
+
+ /* Initialize the new interface structures and the
+ * hc/hcd/usbcore interface/endpoint state.
+ */
+ for (i = 0; i < nintf; ++i) {
+ struct usb_interface_cache *intfc;
+ struct usb_interface *intf;
+ struct usb_host_interface *alt;
+
+ cp->interface[i] = intf = new_interfaces[i];
+ memset(intf, 0, sizeof(*intf));
+ intfc = cp->intf_cache[i];
+ intf->altsetting = intfc->altsetting;
+ intf->num_altsetting = intfc->num_altsetting;
+ kref_get(&intfc->ref);
+
+ alt = usb_altnum_to_altsetting(intf, 0);
+
+ /* No altsetting 0? We'll assume the first altsetting.
+ * We could use a GetInterface call, but if a device is
+ * so non-compliant that it doesn't have altsetting 0
+ * then I wouldn't trust its reply anyway.
+ */
+ if (!alt)
+ alt = &intf->altsetting[0];
+
+ intf->cur_altsetting = alt;
+ usb_enable_interface(dev, intf);
+ intf->dev.parent = &dev->dev;
+ intf->dev.driver = NULL;
+ intf->dev.bus = &usb_bus_type;
+ intf->dev.dma_mask = dev->dev.dma_mask;
+ intf->dev.release = release_interface;
+ device_initialize (&intf->dev);
+ sprintf (&intf->dev.bus_id[0], "%d-%s:%d.%d",
+ dev->bus->busnum, dev->devpath,
+ configuration,
+ alt->desc.bInterfaceNumber);
+ }
+ kfree(new_interfaces);
+
+ if ((cp->desc.iConfiguration) &&
+ (cp->string == NULL)) {
+ cp->string = kmalloc(256, GFP_KERNEL);
+ if (cp->string)
+ usb_string(dev, cp->desc.iConfiguration, cp->string, 256);
+ }
+
+ /* Now that all the interfaces are set up, register them
+ * to trigger binding of drivers to interfaces. probe()
+ * routines may install different altsettings and may
+ * claim() any interfaces not yet bound. Many class drivers
+ * need that: CDC, audio, video, etc.
+ */
+ for (i = 0; i < nintf; ++i) {
+ struct usb_interface *intf = cp->interface[i];
+ struct usb_interface_descriptor *desc;
+
+ desc = &intf->altsetting [0].desc;
+ dev_dbg (&dev->dev,
+ "adding %s (config #%d, interface %d)\n",
+ intf->dev.bus_id, configuration,
+ desc->bInterfaceNumber);
+ ret = device_add (&intf->dev);
+ if (ret != 0) {
+ dev_err(&dev->dev,
+ "device_add(%s) --> %d\n",
+ intf->dev.bus_id,
+ ret);
+ continue;
+ }
+ if ((intf->cur_altsetting->desc.iInterface) &&
+ (intf->cur_altsetting->string == NULL)) {
+ intf->cur_altsetting->string = kmalloc(256, GFP_KERNEL);
+ if (intf->cur_altsetting->string)
+ usb_string(dev, intf->cur_altsetting->desc.iInterface,
+ intf->cur_altsetting->string, 256);
+ }
+ usb_create_sysfs_intf_files (intf);
+ }
+ }
+
+ return ret;
+}
+
+// synchronous request completion model
+EXPORT_SYMBOL(usb_control_msg);
+EXPORT_SYMBOL(usb_bulk_msg);
+
+EXPORT_SYMBOL(usb_sg_init);
+EXPORT_SYMBOL(usb_sg_cancel);
+EXPORT_SYMBOL(usb_sg_wait);
+
+// synchronous control message convenience routines
+EXPORT_SYMBOL(usb_get_descriptor);
+EXPORT_SYMBOL(usb_get_status);
+EXPORT_SYMBOL(usb_get_string);
+EXPORT_SYMBOL(usb_string);
+
+// synchronous calls that also maintain usbcore state
+EXPORT_SYMBOL(usb_clear_halt);
+EXPORT_SYMBOL(usb_reset_configuration);
+EXPORT_SYMBOL(usb_set_interface);
+
diff --git a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h
new file mode 100644
index 000000000000..627a5a2fc9cf
--- /dev/null
+++ b/drivers/usb/core/otg_whitelist.h
@@ -0,0 +1,112 @@
+/*
+ * drivers/usb/core/otg_whitelist.h
+ *
+ * Copyright (C) 2004 Texas Instruments
+ *
+ * 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 OTG Whitelist is the OTG "Targeted Peripheral List". It should
+ * mostly use of USB_DEVICE() or USB_DEVICE_VER() entries..
+ *
+ * YOU _SHOULD_ CHANGE THIS LIST TO MATCH YOUR PRODUCT AND ITS TESTING!
+ */
+
+static struct usb_device_id whitelist_table [] = {
+
+/* hubs are optional in OTG, but very handy ... */
+{ USB_DEVICE_INFO(USB_CLASS_HUB, 0, 0), },
+{ USB_DEVICE_INFO(USB_CLASS_HUB, 0, 1), },
+
+#ifdef CONFIG_USB_PRINTER /* ignoring nonstatic linkage! */
+/* FIXME actually, printers are NOT supposed to use device classes;
+ * they're supposed to use interface classes...
+ */
+{ USB_DEVICE_INFO(7, 1, 1) },
+{ USB_DEVICE_INFO(7, 1, 2) },
+{ USB_DEVICE_INFO(7, 1, 3) },
+#endif
+
+#ifdef CONFIG_USB_CDCETHER
+/* Linux-USB CDC Ethernet gadget */
+{ USB_DEVICE(0x0525, 0xa4a1), },
+/* Linux-USB CDC Ethernet + RNDIS gadget */
+{ USB_DEVICE(0x0525, 0xa4a2), },
+#endif
+
+#if defined(CONFIG_USB_TEST) || defined(CONFIG_USB_TEST_MODULE)
+/* gadget zero, for testing */
+{ USB_DEVICE(0x0525, 0xa4a0), },
+#endif
+
+{ } /* Terminating entry */
+};
+
+static int is_targeted(struct usb_device *dev)
+{
+ struct usb_device_id *id = whitelist_table;
+
+ /* possible in developer configs only! */
+ if (!dev->bus->otg_port)
+ return 1;
+
+ /* HNP test device is _never_ targeted (see OTG spec 6.6.6) */
+ if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a &&
+ le16_to_cpu(dev->descriptor.idProduct) == 0xbadd))
+ return 0;
+
+ /* NOTE: can't use usb_match_id() since interface caches
+ * aren't set up yet. this is cut/paste from that code.
+ */
+ for (id = whitelist_table; id->match_flags; id++) {
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) &&
+ id->idVendor != le16_to_cpu(dev->descriptor.idVendor))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) &&
+ id->idProduct != le16_to_cpu(dev->descriptor.idProduct))
+ continue;
+
+ /* No need to test id->bcdDevice_lo != 0, since 0 is never
+ greater than any unsigned number. */
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) &&
+ (id->bcdDevice_lo > le16_to_cpu(dev->descriptor.bcdDevice)))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) &&
+ (id->bcdDevice_hi < le16_to_cpu(dev->descriptor.bcdDevice)))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) &&
+ (id->bDeviceClass != dev->descriptor.bDeviceClass))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) &&
+ (id->bDeviceSubClass!= dev->descriptor.bDeviceSubClass))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) &&
+ (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol))
+ continue;
+
+ return 1;
+ }
+
+ /* add other match criteria here ... */
+
+
+ /* OTG MESSAGE: report errors here, customize to match your product */
+ dev_err(&dev->dev, "device v%04x p%04x is not supported\n",
+ le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(dev->descriptor.idProduct));
+#ifdef CONFIG_USB_OTG_WHITELIST
+ return 0;
+#else
+ return 1;
+#endif
+}
+
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
new file mode 100644
index 000000000000..ec9b3bde8ae5
--- /dev/null
+++ b/drivers/usb/core/sysfs.c
@@ -0,0 +1,318 @@
+/*
+ * drivers/usb/core/sysfs.c
+ *
+ * (C) Copyright 2002 David Brownell
+ * (C) Copyright 2002,2004 Greg Kroah-Hartman
+ * (C) Copyright 2002,2004 IBM Corp.
+ *
+ * All of the sysfs file attributes for usb devices and interfaces.
+ *
+ */
+
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+#include <linux/usb.h>
+
+#include "usb.h"
+
+/* Active configuration fields */
+#define usb_actconfig_show(field, multiplier, format_string) \
+static ssize_t show_##field (struct device *dev, char *buf) \
+{ \
+ struct usb_device *udev; \
+ struct usb_host_config *actconfig; \
+ \
+ udev = to_usb_device (dev); \
+ actconfig = udev->actconfig; \
+ if (actconfig) \
+ return sprintf (buf, format_string, \
+ actconfig->desc.field * multiplier); \
+ else \
+ return 0; \
+} \
+
+#define usb_actconfig_attr(field, multiplier, format_string) \
+usb_actconfig_show(field, multiplier, format_string) \
+static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
+
+usb_actconfig_attr (bNumInterfaces, 1, "%2d\n")
+usb_actconfig_attr (bmAttributes, 1, "%2x\n")
+usb_actconfig_attr (bMaxPower, 2, "%3dmA\n")
+
+static ssize_t show_configuration_string(struct device *dev, char *buf)
+{
+ struct usb_device *udev;
+ struct usb_host_config *actconfig;
+ int len;
+
+ udev = to_usb_device (dev);
+ actconfig = udev->actconfig;
+ if ((!actconfig) || (!actconfig->string))
+ return 0;
+ len = sprintf(buf, actconfig->string, PAGE_SIZE);
+ if (len < 0)
+ return 0;
+ buf[len] = '\n';
+ buf[len+1] = 0;
+ return len+1;
+}
+static DEVICE_ATTR(configuration, S_IRUGO, show_configuration_string, NULL);
+
+/* configuration value is always present, and r/w */
+usb_actconfig_show(bConfigurationValue, 1, "%u\n");
+
+static ssize_t
+set_bConfigurationValue (struct device *dev, const char *buf, size_t count)
+{
+ struct usb_device *udev = udev = to_usb_device (dev);
+ int config, value;
+
+ if (sscanf (buf, "%u", &config) != 1 || config > 255)
+ return -EINVAL;
+ usb_lock_device(udev);
+ value = usb_set_configuration (udev, config);
+ usb_unlock_device(udev);
+ return (value < 0) ? value : count;
+}
+
+static DEVICE_ATTR(bConfigurationValue, S_IRUGO | S_IWUSR,
+ show_bConfigurationValue, set_bConfigurationValue);
+
+/* String fields */
+#define usb_string_attr(name) \
+static ssize_t show_##name(struct device *dev, char *buf) \
+{ \
+ struct usb_device *udev; \
+ int len; \
+ \
+ udev = to_usb_device (dev); \
+ len = snprintf(buf, 256, "%s", udev->name); \
+ if (len < 0) \
+ return 0; \
+ buf[len] = '\n'; \
+ buf[len+1] = 0; \
+ return len+1; \
+} \
+static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL);
+
+usb_string_attr(product);
+usb_string_attr(manufacturer);
+usb_string_attr(serial);
+
+static ssize_t
+show_speed (struct device *dev, char *buf)
+{
+ struct usb_device *udev;
+ char *speed;
+
+ udev = to_usb_device (dev);
+
+ switch (udev->speed) {
+ case USB_SPEED_LOW:
+ speed = "1.5";
+ break;
+ case USB_SPEED_UNKNOWN:
+ case USB_SPEED_FULL:
+ speed = "12";
+ break;
+ case USB_SPEED_HIGH:
+ speed = "480";
+ break;
+ default:
+ speed = "unknown";
+ }
+ return sprintf (buf, "%s\n", speed);
+}
+static DEVICE_ATTR(speed, S_IRUGO, show_speed, NULL);
+
+static ssize_t
+show_devnum (struct device *dev, char *buf)
+{
+ struct usb_device *udev;
+
+ udev = to_usb_device (dev);
+ return sprintf (buf, "%d\n", udev->devnum);
+}
+static DEVICE_ATTR(devnum, S_IRUGO, show_devnum, NULL);
+
+static ssize_t
+show_version (struct device *dev, char *buf)
+{
+ struct usb_device *udev;
+ u16 bcdUSB;
+
+ udev = to_usb_device(dev);
+ bcdUSB = le16_to_cpu(udev->descriptor.bcdUSB);
+ return sprintf(buf, "%2x.%02x\n", bcdUSB >> 8, bcdUSB & 0xff);
+}
+static DEVICE_ATTR(version, S_IRUGO, show_version, NULL);
+
+static ssize_t
+show_maxchild (struct device *dev, char *buf)
+{
+ struct usb_device *udev;
+
+ udev = to_usb_device (dev);
+ return sprintf (buf, "%d\n", udev->maxchild);
+}
+static DEVICE_ATTR(maxchild, S_IRUGO, show_maxchild, NULL);
+
+/* Descriptor fields */
+#define usb_descriptor_attr_le16(field, format_string) \
+static ssize_t \
+show_##field (struct device *dev, char *buf) \
+{ \
+ struct usb_device *udev; \
+ \
+ udev = to_usb_device (dev); \
+ return sprintf (buf, format_string, \
+ le16_to_cpu(udev->descriptor.field)); \
+} \
+static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
+
+usb_descriptor_attr_le16(idVendor, "%04x\n")
+usb_descriptor_attr_le16(idProduct, "%04x\n")
+usb_descriptor_attr_le16(bcdDevice, "%04x\n")
+
+#define usb_descriptor_attr(field, format_string) \
+static ssize_t \
+show_##field (struct device *dev, char *buf) \
+{ \
+ struct usb_device *udev; \
+ \
+ udev = to_usb_device (dev); \
+ return sprintf (buf, format_string, udev->descriptor.field); \
+} \
+static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
+
+usb_descriptor_attr (bDeviceClass, "%02x\n")
+usb_descriptor_attr (bDeviceSubClass, "%02x\n")
+usb_descriptor_attr (bDeviceProtocol, "%02x\n")
+usb_descriptor_attr (bNumConfigurations, "%d\n")
+
+static struct attribute *dev_attrs[] = {
+ /* current configuration's attributes */
+ &dev_attr_bNumInterfaces.attr,
+ &dev_attr_bConfigurationValue.attr,
+ &dev_attr_bmAttributes.attr,
+ &dev_attr_bMaxPower.attr,
+ /* device attributes */
+ &dev_attr_idVendor.attr,
+ &dev_attr_idProduct.attr,
+ &dev_attr_bcdDevice.attr,
+ &dev_attr_bDeviceClass.attr,
+ &dev_attr_bDeviceSubClass.attr,
+ &dev_attr_bDeviceProtocol.attr,
+ &dev_attr_bNumConfigurations.attr,
+ &dev_attr_speed.attr,
+ &dev_attr_devnum.attr,
+ &dev_attr_version.attr,
+ &dev_attr_maxchild.attr,
+ NULL,
+};
+static struct attribute_group dev_attr_grp = {
+ .attrs = dev_attrs,
+};
+
+void usb_create_sysfs_dev_files (struct usb_device *udev)
+{
+ struct device *dev = &udev->dev;
+
+ sysfs_create_group(&dev->kobj, &dev_attr_grp);
+
+ if (udev->manufacturer)
+ device_create_file (dev, &dev_attr_manufacturer);
+ if (udev->product)
+ device_create_file (dev, &dev_attr_product);
+ if (udev->serial)
+ device_create_file (dev, &dev_attr_serial);
+ device_create_file (dev, &dev_attr_configuration);
+}
+
+void usb_remove_sysfs_dev_files (struct usb_device *udev)
+{
+ struct device *dev = &udev->dev;
+
+ sysfs_remove_group(&dev->kobj, &dev_attr_grp);
+
+ if (udev->descriptor.iManufacturer)
+ device_remove_file(dev, &dev_attr_manufacturer);
+ if (udev->descriptor.iProduct)
+ device_remove_file(dev, &dev_attr_product);
+ if (udev->descriptor.iSerialNumber)
+ device_remove_file(dev, &dev_attr_serial);
+ device_remove_file (dev, &dev_attr_configuration);
+}
+
+/* Interface fields */
+#define usb_intf_attr(field, format_string) \
+static ssize_t \
+show_##field (struct device *dev, char *buf) \
+{ \
+ struct usb_interface *intf = to_usb_interface (dev); \
+ \
+ return sprintf (buf, format_string, intf->cur_altsetting->desc.field); \
+} \
+static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
+
+usb_intf_attr (bInterfaceNumber, "%02x\n")
+usb_intf_attr (bAlternateSetting, "%2d\n")
+usb_intf_attr (bNumEndpoints, "%02x\n")
+usb_intf_attr (bInterfaceClass, "%02x\n")
+usb_intf_attr (bInterfaceSubClass, "%02x\n")
+usb_intf_attr (bInterfaceProtocol, "%02x\n")
+
+static ssize_t show_interface_string(struct device *dev, char *buf)
+{
+ struct usb_interface *intf;
+ struct usb_device *udev;
+ int len;
+
+ intf = to_usb_interface (dev);
+ udev = interface_to_usbdev (intf);
+ len = snprintf(buf, 256, "%s", intf->cur_altsetting->string);
+ if (len < 0)
+ return 0;
+ buf[len] = '\n';
+ buf[len+1] = 0;
+ return len+1;
+}
+static DEVICE_ATTR(interface, S_IRUGO, show_interface_string, NULL);
+
+static struct attribute *intf_attrs[] = {
+ &dev_attr_bInterfaceNumber.attr,
+ &dev_attr_bAlternateSetting.attr,
+ &dev_attr_bNumEndpoints.attr,
+ &dev_attr_bInterfaceClass.attr,
+ &dev_attr_bInterfaceSubClass.attr,
+ &dev_attr_bInterfaceProtocol.attr,
+ NULL,
+};
+static struct attribute_group intf_attr_grp = {
+ .attrs = intf_attrs,
+};
+
+void usb_create_sysfs_intf_files (struct usb_interface *intf)
+{
+ sysfs_create_group(&intf->dev.kobj, &intf_attr_grp);
+
+ if (intf->cur_altsetting->string)
+ device_create_file(&intf->dev, &dev_attr_interface);
+
+}
+
+void usb_remove_sysfs_intf_files (struct usb_interface *intf)
+{
+ sysfs_remove_group(&intf->dev.kobj, &intf_attr_grp);
+
+ if (intf->cur_altsetting->string)
+ device_remove_file(&intf->dev, &dev_attr_interface);
+
+}
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
new file mode 100644
index 000000000000..dc838f81742c
--- /dev/null
+++ b/drivers/usb/core/urb.c
@@ -0,0 +1,511 @@
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/bitops.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+#include <linux/usb.h>
+#include "hcd.h"
+
+#define to_urb(d) container_of(d, struct urb, kref)
+
+static void urb_destroy(struct kref *kref)
+{
+ struct urb *urb = to_urb(kref);
+ kfree(urb);
+}
+
+/**
+ * usb_init_urb - initializes a urb so that it can be used by a USB driver
+ * @urb: pointer to the urb to initialize
+ *
+ * Initializes a urb so that the USB subsystem can use it properly.
+ *
+ * If a urb is created with a call to usb_alloc_urb() it is not
+ * necessary to call this function. Only use this if you allocate the
+ * space for a struct urb on your own. If you call this function, be
+ * careful when freeing the memory for your urb that it is no longer in
+ * use by the USB core.
+ *
+ * Only use this function if you _really_ understand what you are doing.
+ */
+void usb_init_urb(struct urb *urb)
+{
+ if (urb) {
+ memset(urb, 0, sizeof(*urb));
+ kref_init(&urb->kref);
+ spin_lock_init(&urb->lock);
+ }
+}
+
+/**
+ * usb_alloc_urb - creates a new urb for a USB driver to use
+ * @iso_packets: number of iso packets for this urb
+ * @mem_flags: the type of memory to allocate, see kmalloc() for a list of
+ * valid options for this.
+ *
+ * Creates an urb for the USB driver to use, initializes a few internal
+ * structures, incrementes the usage counter, and returns a pointer to it.
+ *
+ * If no memory is available, NULL is returned.
+ *
+ * If the driver want to use this urb for interrupt, control, or bulk
+ * endpoints, pass '0' as the number of iso packets.
+ *
+ * The driver must call usb_free_urb() when it is finished with the urb.
+ */
+struct urb *usb_alloc_urb(int iso_packets, int mem_flags)
+{
+ struct urb *urb;
+
+ urb = (struct urb *)kmalloc(sizeof(struct urb) +
+ iso_packets * sizeof(struct usb_iso_packet_descriptor),
+ mem_flags);
+ if (!urb) {
+ err("alloc_urb: kmalloc failed");
+ return NULL;
+ }
+ usb_init_urb(urb);
+ return urb;
+}
+
+/**
+ * usb_free_urb - frees the memory used by a urb when all users of it are finished
+ * @urb: pointer to the urb to free, may be NULL
+ *
+ * Must be called when a user of a urb is finished with it. When the last user
+ * of the urb calls this function, the memory of the urb is freed.
+ *
+ * Note: The transfer buffer associated with the urb is not freed, that must be
+ * done elsewhere.
+ */
+void usb_free_urb(struct urb *urb)
+{
+ if (urb)
+ kref_put(&urb->kref, urb_destroy);
+}
+
+/**
+ * usb_get_urb - increments the reference count of the urb
+ * @urb: pointer to the urb to modify, may be NULL
+ *
+ * This must be called whenever a urb is transferred from a device driver to a
+ * host controller driver. This allows proper reference counting to happen
+ * for urbs.
+ *
+ * A pointer to the urb with the incremented reference counter is returned.
+ */
+struct urb * usb_get_urb(struct urb *urb)
+{
+ if (urb)
+ kref_get(&urb->kref);
+ return urb;
+}
+
+
+/*-------------------------------------------------------------------*/
+
+/**
+ * usb_submit_urb - issue an asynchronous transfer request for an endpoint
+ * @urb: pointer to the urb describing the request
+ * @mem_flags: the type of memory to allocate, see kmalloc() for a list
+ * of valid options for this.
+ *
+ * This submits a transfer request, and transfers control of the URB
+ * describing that request to the USB subsystem. Request completion will
+ * be indicated later, asynchronously, by calling the completion handler.
+ * The three types of completion are success, error, and unlink
+ * (a software-induced fault, also called "request cancelation").
+ *
+ * URBs may be submitted in interrupt context.
+ *
+ * The caller must have correctly initialized the URB before submitting
+ * it. Functions such as usb_fill_bulk_urb() and usb_fill_control_urb() are
+ * available to ensure that most fields are correctly initialized, for
+ * the particular kind of transfer, although they will not initialize
+ * any transfer flags.
+ *
+ * Successful submissions return 0; otherwise this routine returns a
+ * negative error number. If the submission is successful, the complete()
+ * callback from the URB will be called exactly once, when the USB core and
+ * Host Controller Driver (HCD) are finished with the URB. When the completion
+ * function is called, control of the URB is returned to the device
+ * driver which issued the request. The completion handler may then
+ * immediately free or reuse that URB.
+ *
+ * With few exceptions, USB device drivers should never access URB fields
+ * provided by usbcore or the HCD until its complete() is called.
+ * The exceptions relate to periodic transfer scheduling. For both
+ * interrupt and isochronous urbs, as part of successful URB submission
+ * urb->interval is modified to reflect the actual transfer period used
+ * (normally some power of two units). And for isochronous urbs,
+ * urb->start_frame is modified to reflect when the URB's transfers were
+ * scheduled to start. Not all isochronous transfer scheduling policies
+ * will work, but most host controller drivers should easily handle ISO
+ * queues going from now until 10-200 msec into the future.
+ *
+ * For control endpoints, the synchronous usb_control_msg() call is
+ * often used (in non-interrupt context) instead of this call.
+ * That is often used through convenience wrappers, for the requests
+ * that are standardized in the USB 2.0 specification. For bulk
+ * endpoints, a synchronous usb_bulk_msg() call is available.
+ *
+ * Request Queuing:
+ *
+ * URBs may be submitted to endpoints before previous ones complete, to
+ * minimize the impact of interrupt latencies and system overhead on data
+ * throughput. With that queuing policy, an endpoint's queue would never
+ * be empty. This is required for continuous isochronous data streams,
+ * and may also be required for some kinds of interrupt transfers. Such
+ * queuing also maximizes bandwidth utilization by letting USB controllers
+ * start work on later requests before driver software has finished the
+ * completion processing for earlier (successful) requests.
+ *
+ * As of Linux 2.6, all USB endpoint transfer queues support depths greater
+ * than one. This was previously a HCD-specific behavior, except for ISO
+ * transfers. Non-isochronous endpoint queues are inactive during cleanup
+ * after faults (transfer errors or cancelation).
+ *
+ * Reserved Bandwidth Transfers:
+ *
+ * Periodic transfers (interrupt or isochronous) are performed repeatedly,
+ * using the interval specified in the urb. Submitting the first urb to
+ * the endpoint reserves the bandwidth necessary to make those transfers.
+ * If the USB subsystem can't allocate sufficient bandwidth to perform
+ * the periodic request, submitting such a periodic request should fail.
+ *
+ * Device drivers must explicitly request that repetition, by ensuring that
+ * some URB is always on the endpoint's queue (except possibly for short
+ * periods during completion callacks). When there is no longer an urb
+ * queued, the endpoint's bandwidth reservation is canceled. This means
+ * drivers can use their completion handlers to ensure they keep bandwidth
+ * they need, by reinitializing and resubmitting the just-completed urb
+ * until the driver longer needs that periodic bandwidth.
+ *
+ * Memory Flags:
+ *
+ * The general rules for how to decide which mem_flags to use
+ * are the same as for kmalloc. There are four
+ * different possible values; GFP_KERNEL, GFP_NOFS, GFP_NOIO and
+ * GFP_ATOMIC.
+ *
+ * GFP_NOFS is not ever used, as it has not been implemented yet.
+ *
+ * GFP_ATOMIC is used when
+ * (a) you are inside a completion handler, an interrupt, bottom half,
+ * tasklet or timer, or
+ * (b) you are holding a spinlock or rwlock (does not apply to
+ * semaphores), or
+ * (c) current->state != TASK_RUNNING, this is the case only after
+ * you've changed it.
+ *
+ * GFP_NOIO is used in the block io path and error handling of storage
+ * devices.
+ *
+ * All other situations use GFP_KERNEL.
+ *
+ * Some more specific rules for mem_flags can be inferred, such as
+ * (1) start_xmit, timeout, and receive methods of network drivers must
+ * use GFP_ATOMIC (they are called with a spinlock held);
+ * (2) queuecommand methods of scsi drivers must use GFP_ATOMIC (also
+ * called with a spinlock held);
+ * (3) If you use a kernel thread with a network driver you must use
+ * GFP_NOIO, unless (b) or (c) apply;
+ * (4) after you have done a down() you can use GFP_KERNEL, unless (b) or (c)
+ * apply or your are in a storage driver's block io path;
+ * (5) USB probe and disconnect can use GFP_KERNEL unless (b) or (c) apply; and
+ * (6) changing firmware on a running storage or net device uses
+ * GFP_NOIO, unless b) or c) apply
+ *
+ */
+int usb_submit_urb(struct urb *urb, int mem_flags)
+{
+ int pipe, temp, max;
+ struct usb_device *dev;
+ struct usb_operations *op;
+ int is_out;
+
+ if (!urb || urb->hcpriv || !urb->complete)
+ return -EINVAL;
+ if (!(dev = urb->dev) ||
+ (dev->state < USB_STATE_DEFAULT) ||
+ (!dev->bus) || (dev->devnum <= 0))
+ return -ENODEV;
+ if (dev->state == USB_STATE_SUSPENDED)
+ return -EHOSTUNREACH;
+ if (!(op = dev->bus->op) || !op->submit_urb)
+ return -ENODEV;
+
+ urb->status = -EINPROGRESS;
+ urb->actual_length = 0;
+ urb->bandwidth = 0;
+
+ /* Lots of sanity checks, so HCDs can rely on clean data
+ * and don't need to duplicate tests
+ */
+ pipe = urb->pipe;
+ temp = usb_pipetype (pipe);
+ is_out = usb_pipeout (pipe);
+
+ if (!usb_pipecontrol (pipe) && dev->state < USB_STATE_CONFIGURED)
+ return -ENODEV;
+
+ /* FIXME there should be a sharable lock protecting us against
+ * config/altsetting changes and disconnects, kicking in here.
+ * (here == before maxpacket, and eventually endpoint type,
+ * checks get made.)
+ */
+
+ max = usb_maxpacket (dev, pipe, is_out);
+ if (max <= 0) {
+ dev_dbg(&dev->dev,
+ "bogus endpoint ep%d%s in %s (bad maxpacket %d)\n",
+ usb_pipeendpoint (pipe), is_out ? "out" : "in",
+ __FUNCTION__, max);
+ return -EMSGSIZE;
+ }
+
+ /* periodic transfers limit size per frame/uframe,
+ * but drivers only control those sizes for ISO.
+ * while we're checking, initialize return status.
+ */
+ if (temp == PIPE_ISOCHRONOUS) {
+ int n, len;
+
+ /* "high bandwidth" mode, 1-3 packets/uframe? */
+ if (dev->speed == USB_SPEED_HIGH) {
+ int mult = 1 + ((max >> 11) & 0x03);
+ max &= 0x07ff;
+ max *= mult;
+ }
+
+ if (urb->number_of_packets <= 0)
+ return -EINVAL;
+ for (n = 0; n < urb->number_of_packets; n++) {
+ len = urb->iso_frame_desc [n].length;
+ if (len < 0 || len > max)
+ return -EMSGSIZE;
+ urb->iso_frame_desc [n].status = -EXDEV;
+ urb->iso_frame_desc [n].actual_length = 0;
+ }
+ }
+
+ /* the I/O buffer must be mapped/unmapped, except when length=0 */
+ if (urb->transfer_buffer_length < 0)
+ return -EMSGSIZE;
+
+#ifdef DEBUG
+ /* stuff that drivers shouldn't do, but which shouldn't
+ * cause problems in HCDs if they get it wrong.
+ */
+ {
+ unsigned int orig_flags = urb->transfer_flags;
+ unsigned int allowed;
+
+ /* enforce simple/standard policy */
+ allowed = URB_ASYNC_UNLINK; // affects later unlinks
+ allowed |= (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP);
+ allowed |= URB_NO_INTERRUPT;
+ switch (temp) {
+ case PIPE_BULK:
+ if (is_out)
+ allowed |= URB_ZERO_PACKET;
+ /* FALLTHROUGH */
+ case PIPE_CONTROL:
+ allowed |= URB_NO_FSBR; /* only affects UHCI */
+ /* FALLTHROUGH */
+ default: /* all non-iso endpoints */
+ if (!is_out)
+ allowed |= URB_SHORT_NOT_OK;
+ break;
+ case PIPE_ISOCHRONOUS:
+ allowed |= URB_ISO_ASAP;
+ break;
+ }
+ urb->transfer_flags &= allowed;
+
+ /* fail if submitter gave bogus flags */
+ if (urb->transfer_flags != orig_flags) {
+ err ("BOGUS urb flags, %x --> %x",
+ orig_flags, urb->transfer_flags);
+ return -EINVAL;
+ }
+ }
+#endif
+ /*
+ * Force periodic transfer intervals to be legal values that are
+ * a power of two (so HCDs don't need to).
+ *
+ * FIXME want bus->{intr,iso}_sched_horizon values here. Each HC
+ * supports different values... this uses EHCI/UHCI defaults (and
+ * EHCI can use smaller non-default values).
+ */
+ switch (temp) {
+ case PIPE_ISOCHRONOUS:
+ case PIPE_INTERRUPT:
+ /* too small? */
+ if (urb->interval <= 0)
+ return -EINVAL;
+ /* too big? */
+ switch (dev->speed) {
+ case USB_SPEED_HIGH: /* units are microframes */
+ // NOTE usb handles 2^15
+ if (urb->interval > (1024 * 8))
+ urb->interval = 1024 * 8;
+ temp = 1024 * 8;
+ break;
+ case USB_SPEED_FULL: /* units are frames/msec */
+ case USB_SPEED_LOW:
+ if (temp == PIPE_INTERRUPT) {
+ if (urb->interval > 255)
+ return -EINVAL;
+ // NOTE ohci only handles up to 32
+ temp = 128;
+ } else {
+ if (urb->interval > 1024)
+ urb->interval = 1024;
+ // NOTE usb and ohci handle up to 2^15
+ temp = 1024;
+ }
+ break;
+ default:
+ return -EINVAL;
+ }
+ /* power of two? */
+ while (temp > urb->interval)
+ temp >>= 1;
+ urb->interval = temp;
+ }
+
+ return op->submit_urb (urb, mem_flags);
+}
+
+/*-------------------------------------------------------------------*/
+
+/**
+ * usb_unlink_urb - abort/cancel a transfer request for an endpoint
+ * @urb: pointer to urb describing a previously submitted request,
+ * may be NULL
+ *
+ * This routine cancels an in-progress request. URBs complete only
+ * once per submission, and may be canceled only once per submission.
+ * Successful cancelation means the requests's completion handler will
+ * be called with a status code indicating that the request has been
+ * canceled (rather than any other code) and will quickly be removed
+ * from host controller data structures.
+ *
+ * In the past, clearing the URB_ASYNC_UNLINK transfer flag for the
+ * URB indicated that the request was synchronous. This usage is now
+ * deprecated; if the flag is clear the call will be forwarded to
+ * usb_kill_urb() and the return value will be 0. In the future, drivers
+ * should call usb_kill_urb() directly for synchronous unlinking.
+ *
+ * When the URB_ASYNC_UNLINK transfer flag for the URB is set, this
+ * request is asynchronous. Success is indicated by returning -EINPROGRESS,
+ * at which time the URB will normally have been unlinked but not yet
+ * given back to the device driver. When it is called, the completion
+ * function will see urb->status == -ECONNRESET. Failure is indicated
+ * by any other return value. Unlinking will fail when the URB is not
+ * currently "linked" (i.e., it was never submitted, or it was unlinked
+ * before, or the hardware is already finished with it), even if the
+ * completion handler has not yet run.
+ *
+ * Unlinking and Endpoint Queues:
+ *
+ * Host Controller Drivers (HCDs) place all the URBs for a particular
+ * endpoint in a queue. Normally the queue advances as the controller
+ * hardware processes each request. But when an URB terminates with any
+ * fault (such as an error, or being unlinked) its queue stops, at least
+ * until that URB's completion routine returns. It is guaranteed that
+ * the queue will not restart until all its unlinked URBs have been fully
+ * retired, with their completion routines run, even if that's not until
+ * some time after the original completion handler returns.
+ *
+ * This means that USB device drivers can safely build deep queues for
+ * large or complex transfers, and clean them up reliably after any sort
+ * of aborted transfer by unlinking all pending URBs at the first fault.
+ *
+ * Note that an URB terminating early because a short packet was received
+ * will count as an error if and only if the URB_SHORT_NOT_OK flag is set.
+ * Also, that all unlinks performed in any URB completion handler must
+ * be asynchronous.
+ *
+ * Queues for isochronous endpoints are treated differently, because they
+ * advance at fixed rates. Such queues do not stop when an URB is unlinked.
+ * An unlinked URB may leave a gap in the stream of packets. It is undefined
+ * whether such gaps can be filled in.
+ *
+ * When a control URB terminates with an error, it is likely that the
+ * status stage of the transfer will not take place, even if it is merely
+ * a soft error resulting from a short-packet with URB_SHORT_NOT_OK set.
+ */
+int usb_unlink_urb(struct urb *urb)
+{
+ if (!urb)
+ return -EINVAL;
+ if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) {
+#ifdef CONFIG_DEBUG_KERNEL
+ if (printk_ratelimit()) {
+ printk(KERN_NOTICE "usb_unlink_urb() is deprecated for "
+ "synchronous unlinks. Use usb_kill_urb() instead.\n");
+ WARN_ON(1);
+ }
+#endif
+ usb_kill_urb(urb);
+ return 0;
+ }
+ if (!(urb->dev && urb->dev->bus && urb->dev->bus->op))
+ return -ENODEV;
+ return urb->dev->bus->op->unlink_urb(urb, -ECONNRESET);
+}
+
+/**
+ * usb_kill_urb - cancel a transfer request and wait for it to finish
+ * @urb: pointer to URB describing a previously submitted request,
+ * may be NULL
+ *
+ * This routine cancels an in-progress request. It is guaranteed that
+ * upon return all completion handlers will have finished and the URB
+ * will be totally idle and available for reuse. These features make
+ * this an ideal way to stop I/O in a disconnect() callback or close()
+ * function. If the request has not already finished or been unlinked
+ * the completion handler will see urb->status == -ENOENT.
+ *
+ * While the routine is running, attempts to resubmit the URB will fail
+ * with error -EPERM. Thus even if the URB's completion handler always
+ * tries to resubmit, it will not succeed and the URB will become idle.
+ *
+ * This routine may not be used in an interrupt context (such as a bottom
+ * half or a completion handler), or when holding a spinlock, or in other
+ * situations where the caller can't schedule().
+ */
+void usb_kill_urb(struct urb *urb)
+{
+ if (!(urb && urb->dev && urb->dev->bus && urb->dev->bus->op))
+ return;
+ spin_lock_irq(&urb->lock);
+ ++urb->reject;
+ spin_unlock_irq(&urb->lock);
+
+ urb->dev->bus->op->unlink_urb(urb, -ENOENT);
+ wait_event(usb_kill_urb_queue, atomic_read(&urb->use_count) == 0);
+
+ spin_lock_irq(&urb->lock);
+ --urb->reject;
+ spin_unlock_irq(&urb->lock);
+}
+
+EXPORT_SYMBOL(usb_init_urb);
+EXPORT_SYMBOL(usb_alloc_urb);
+EXPORT_SYMBOL(usb_free_urb);
+EXPORT_SYMBOL(usb_get_urb);
+EXPORT_SYMBOL(usb_submit_urb);
+EXPORT_SYMBOL(usb_unlink_urb);
+EXPORT_SYMBOL(usb_kill_urb);
+
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
new file mode 100644
index 000000000000..f0534ee06490
--- /dev/null
+++ b/drivers/usb/core/usb.c
@@ -0,0 +1,1573 @@
+/*
+ * drivers/usb/usb.c
+ *
+ * (C) Copyright Linus Torvalds 1999
+ * (C) Copyright Johannes Erdfelt 1999-2001
+ * (C) Copyright Andreas Gal 1999
+ * (C) Copyright Gregory P. Smith 1999
+ * (C) Copyright Deti Fliegl 1999 (new USB architecture)
+ * (C) Copyright Randy Dunlap 2000
+ * (C) Copyright David Brownell 2000-2004
+ * (C) Copyright Yggdrasil Computing, Inc. 2000
+ * (usb_device_id matching changes by Adam J. Richter)
+ * (C) Copyright Greg Kroah-Hartman 2002-2003
+ *
+ * NOTE! This is not actually a driver at all, rather this is
+ * just a collection of helper routines that implement the
+ * generic USB things that the real drivers can use..
+ *
+ * Think of this as a "USB library" rather than anything else.
+ * It should be considered a slave, with no callbacks. Callbacks
+ * are evil.
+ */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/bitops.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h> /* for in_interrupt() */
+#include <linux/kmod.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <linux/errno.h>
+#include <linux/smp_lock.h>
+#include <linux/rwsem.h>
+#include <linux/usb.h>
+
+#include <asm/io.h>
+#include <asm/scatterlist.h>
+#include <linux/mm.h>
+#include <linux/dma-mapping.h>
+
+#include "hcd.h"
+#include "usb.h"
+
+extern int usb_hub_init(void);
+extern void usb_hub_cleanup(void);
+extern int usb_major_init(void);
+extern void usb_major_cleanup(void);
+extern int usb_host_init(void);
+extern void usb_host_cleanup(void);
+
+
+const char *usbcore_name = "usbcore";
+
+static int nousb; /* Disable USB when built into kernel image */
+ /* Not honored on modular build */
+
+static DECLARE_RWSEM(usb_all_devices_rwsem);
+
+
+static int generic_probe (struct device *dev)
+{
+ return 0;
+}
+static int generic_remove (struct device *dev)
+{
+ return 0;
+}
+
+static struct device_driver usb_generic_driver = {
+ .owner = THIS_MODULE,
+ .name = "usb",
+ .bus = &usb_bus_type,
+ .probe = generic_probe,
+ .remove = generic_remove,
+};
+
+static int usb_generic_driver_data;
+
+/* called from driver core with usb_bus_type.subsys writelock */
+static int usb_probe_interface(struct device *dev)
+{
+ struct usb_interface * intf = to_usb_interface(dev);
+ struct usb_driver * driver = to_usb_driver(dev->driver);
+ const struct usb_device_id *id;
+ int error = -ENODEV;
+
+ dev_dbg(dev, "%s\n", __FUNCTION__);
+
+ if (!driver->probe)
+ return error;
+ /* FIXME we'd much prefer to just resume it ... */
+ if (interface_to_usbdev(intf)->state == USB_STATE_SUSPENDED)
+ return -EHOSTUNREACH;
+
+ id = usb_match_id (intf, driver->id_table);
+ if (id) {
+ dev_dbg (dev, "%s - got id\n", __FUNCTION__);
+ intf->condition = USB_INTERFACE_BINDING;
+ error = driver->probe (intf, id);
+ intf->condition = error ? USB_INTERFACE_UNBOUND :
+ USB_INTERFACE_BOUND;
+ }
+
+ return error;
+}
+
+/* called from driver core with usb_bus_type.subsys writelock */
+static int usb_unbind_interface(struct device *dev)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_driver *driver = to_usb_driver(intf->dev.driver);
+
+ intf->condition = USB_INTERFACE_UNBINDING;
+
+ /* release all urbs for this interface */
+ usb_disable_interface(interface_to_usbdev(intf), intf);
+
+ if (driver && driver->disconnect)
+ driver->disconnect(intf);
+
+ /* reset other interface state */
+ usb_set_interface(interface_to_usbdev(intf),
+ intf->altsetting[0].desc.bInterfaceNumber,
+ 0);
+ usb_set_intfdata(intf, NULL);
+ intf->condition = USB_INTERFACE_UNBOUND;
+
+ return 0;
+}
+
+/**
+ * usb_register - register a USB driver
+ * @new_driver: USB operations for the driver
+ *
+ * Registers a USB driver with the USB core. The list of unattached
+ * interfaces will be rescanned whenever a new driver is added, allowing
+ * the new driver to attach to any recognized devices.
+ * Returns a negative error code on failure and 0 on success.
+ *
+ * NOTE: if you want your driver to use the USB major number, you must call
+ * usb_register_dev() to enable that functionality. This function no longer
+ * takes care of that.
+ */
+int usb_register(struct usb_driver *new_driver)
+{
+ int retval = 0;
+
+ if (nousb)
+ return -ENODEV;
+
+ new_driver->driver.name = (char *)new_driver->name;
+ new_driver->driver.bus = &usb_bus_type;
+ new_driver->driver.probe = usb_probe_interface;
+ new_driver->driver.remove = usb_unbind_interface;
+ new_driver->driver.owner = new_driver->owner;
+
+ usb_lock_all_devices();
+ retval = driver_register(&new_driver->driver);
+ usb_unlock_all_devices();
+
+ if (!retval) {
+ pr_info("%s: registered new driver %s\n",
+ usbcore_name, new_driver->name);
+ usbfs_update_special();
+ } else {
+ printk(KERN_ERR "%s: error %d registering driver %s\n",
+ usbcore_name, retval, new_driver->name);
+ }
+
+ return retval;
+}
+
+/**
+ * usb_deregister - unregister a USB driver
+ * @driver: USB operations of the driver to unregister
+ * Context: must be able to sleep
+ *
+ * Unlinks the specified driver from the internal USB driver list.
+ *
+ * NOTE: If you called usb_register_dev(), you still need to call
+ * usb_deregister_dev() to clean up your driver's allocated minor numbers,
+ * this * call will no longer do it for you.
+ */
+void usb_deregister(struct usb_driver *driver)
+{
+ pr_info("%s: deregistering driver %s\n", usbcore_name, driver->name);
+
+ usb_lock_all_devices();
+ driver_unregister (&driver->driver);
+ usb_unlock_all_devices();
+
+ usbfs_update_special();
+}
+
+/**
+ * usb_ifnum_to_if - get the interface object with a given interface number
+ * @dev: the device whose current configuration is considered
+ * @ifnum: the desired interface
+ *
+ * This walks the device descriptor for the currently active configuration
+ * and returns a pointer to the interface with that particular interface
+ * number, or null.
+ *
+ * Note that configuration descriptors are not required to assign interface
+ * numbers sequentially, so that it would be incorrect to assume that
+ * the first interface in that descriptor corresponds to interface zero.
+ * This routine helps device drivers avoid such mistakes.
+ * However, you should make sure that you do the right thing with any
+ * alternate settings available for this interfaces.
+ *
+ * Don't call this function unless you are bound to one of the interfaces
+ * on this device or you have locked the device!
+ */
+struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, unsigned ifnum)
+{
+ struct usb_host_config *config = dev->actconfig;
+ int i;
+
+ if (!config)
+ return NULL;
+ for (i = 0; i < config->desc.bNumInterfaces; i++)
+ if (config->interface[i]->altsetting[0]
+ .desc.bInterfaceNumber == ifnum)
+ return config->interface[i];
+
+ return NULL;
+}
+
+/**
+ * usb_altnum_to_altsetting - get the altsetting structure with a given
+ * alternate setting number.
+ * @intf: the interface containing the altsetting in question
+ * @altnum: the desired alternate setting number
+ *
+ * This searches the altsetting array of the specified interface for
+ * an entry with the correct bAlternateSetting value and returns a pointer
+ * to that entry, or null.
+ *
+ * Note that altsettings need not be stored sequentially by number, so
+ * it would be incorrect to assume that the first altsetting entry in
+ * the array corresponds to altsetting zero. This routine helps device
+ * drivers avoid such mistakes.
+ *
+ * Don't call this function unless you are bound to the intf interface
+ * or you have locked the device!
+ */
+struct usb_host_interface *usb_altnum_to_altsetting(struct usb_interface *intf,
+ unsigned int altnum)
+{
+ int i;
+
+ for (i = 0; i < intf->num_altsetting; i++) {
+ if (intf->altsetting[i].desc.bAlternateSetting == altnum)
+ return &intf->altsetting[i];
+ }
+ return NULL;
+}
+
+/**
+ * usb_driver_claim_interface - bind a driver to an interface
+ * @driver: the driver to be bound
+ * @iface: the interface to which it will be bound; must be in the
+ * usb device's active configuration
+ * @priv: driver data associated with that interface
+ *
+ * This is used by usb device drivers that need to claim more than one
+ * interface on a device when probing (audio and acm are current examples).
+ * No device driver should directly modify internal usb_interface or
+ * usb_device structure members.
+ *
+ * Few drivers should need to use this routine, since the most natural
+ * way to bind to an interface is to return the private data from
+ * the driver's probe() method.
+ *
+ * Callers must own the device lock and the driver model's usb_bus_type.subsys
+ * writelock. So driver probe() entries don't need extra locking,
+ * but other call contexts may need to explicitly claim those locks.
+ */
+int usb_driver_claim_interface(struct usb_driver *driver,
+ struct usb_interface *iface, void* priv)
+{
+ struct device *dev = &iface->dev;
+
+ if (dev->driver)
+ return -EBUSY;
+
+ dev->driver = &driver->driver;
+ usb_set_intfdata(iface, priv);
+ iface->condition = USB_INTERFACE_BOUND;
+
+ /* if interface was already added, bind now; else let
+ * the future device_add() bind it, bypassing probe()
+ */
+ if (!list_empty (&dev->bus_list))
+ device_bind_driver(dev);
+
+ return 0;
+}
+
+/**
+ * usb_driver_release_interface - unbind a driver from an interface
+ * @driver: the driver to be unbound
+ * @iface: the interface from which it will be unbound
+ *
+ * This can be used by drivers to release an interface without waiting
+ * for their disconnect() methods to be called. In typical cases this
+ * also causes the driver disconnect() method to be called.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ * Callers must own the device lock and the driver model's usb_bus_type.subsys
+ * writelock. So driver disconnect() entries don't need extra locking,
+ * but other call contexts may need to explicitly claim those locks.
+ */
+void usb_driver_release_interface(struct usb_driver *driver,
+ struct usb_interface *iface)
+{
+ struct device *dev = &iface->dev;
+
+ /* this should never happen, don't release something that's not ours */
+ if (!dev->driver || dev->driver != &driver->driver)
+ return;
+
+ /* don't disconnect from disconnect(), or before dev_add() */
+ if (!list_empty (&dev->driver_list) && !list_empty (&dev->bus_list))
+ device_release_driver(dev);
+
+ dev->driver = NULL;
+ usb_set_intfdata(iface, NULL);
+ iface->condition = USB_INTERFACE_UNBOUND;
+}
+
+/**
+ * usb_match_id - find first usb_device_id matching device or interface
+ * @interface: the interface of interest
+ * @id: array of usb_device_id structures, terminated by zero entry
+ *
+ * usb_match_id searches an array of usb_device_id's and returns
+ * the first one matching the device or interface, or null.
+ * This is used when binding (or rebinding) a driver to an interface.
+ * Most USB device drivers will use this indirectly, through the usb core,
+ * but some layered driver frameworks use it directly.
+ * These device tables are exported with MODULE_DEVICE_TABLE, through
+ * modutils and "modules.usbmap", to support the driver loading
+ * functionality of USB hotplugging.
+ *
+ * What Matches:
+ *
+ * The "match_flags" element in a usb_device_id controls which
+ * members are used. If the corresponding bit is set, the
+ * value in the device_id must match its corresponding member
+ * in the device or interface descriptor, or else the device_id
+ * does not match.
+ *
+ * "driver_info" is normally used only by device drivers,
+ * but you can create a wildcard "matches anything" usb_device_id
+ * as a driver's "modules.usbmap" entry if you provide an id with
+ * only a nonzero "driver_info" field. If you do this, the USB device
+ * driver's probe() routine should use additional intelligence to
+ * decide whether to bind to the specified interface.
+ *
+ * What Makes Good usb_device_id Tables:
+ *
+ * The match algorithm is very simple, so that intelligence in
+ * driver selection must come from smart driver id records.
+ * Unless you have good reasons to use another selection policy,
+ * provide match elements only in related groups, and order match
+ * specifiers from specific to general. Use the macros provided
+ * for that purpose if you can.
+ *
+ * The most specific match specifiers use device descriptor
+ * data. These are commonly used with product-specific matches;
+ * the USB_DEVICE macro lets you provide vendor and product IDs,
+ * and you can also match against ranges of product revisions.
+ * These are widely used for devices with application or vendor
+ * specific bDeviceClass values.
+ *
+ * Matches based on device class/subclass/protocol specifications
+ * are slightly more general; use the USB_DEVICE_INFO macro, or
+ * its siblings. These are used with single-function devices
+ * where bDeviceClass doesn't specify that each interface has
+ * its own class.
+ *
+ * Matches based on interface class/subclass/protocol are the
+ * most general; they let drivers bind to any interface on a
+ * multiple-function device. Use the USB_INTERFACE_INFO
+ * macro, or its siblings, to match class-per-interface style
+ * devices (as recorded in bDeviceClass).
+ *
+ * Within those groups, remember that not all combinations are
+ * meaningful. For example, don't give a product version range
+ * without vendor and product IDs; or specify a protocol without
+ * its associated class and subclass.
+ */
+const struct usb_device_id *
+usb_match_id(struct usb_interface *interface, const struct usb_device_id *id)
+{
+ struct usb_host_interface *intf;
+ struct usb_device *dev;
+
+ /* proc_connectinfo in devio.c may call us with id == NULL. */
+ if (id == NULL)
+ return NULL;
+
+ intf = interface->cur_altsetting;
+ dev = interface_to_usbdev(interface);
+
+ /* It is important to check that id->driver_info is nonzero,
+ since an entry that is all zeroes except for a nonzero
+ id->driver_info is the way to create an entry that
+ indicates that the driver want to examine every
+ device and interface. */
+ for (; id->idVendor || id->bDeviceClass || id->bInterfaceClass ||
+ id->driver_info; id++) {
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) &&
+ id->idVendor != le16_to_cpu(dev->descriptor.idVendor))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) &&
+ id->idProduct != le16_to_cpu(dev->descriptor.idProduct))
+ continue;
+
+ /* No need to test id->bcdDevice_lo != 0, since 0 is never
+ greater than any unsigned number. */
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) &&
+ (id->bcdDevice_lo > le16_to_cpu(dev->descriptor.bcdDevice)))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) &&
+ (id->bcdDevice_hi < le16_to_cpu(dev->descriptor.bcdDevice)))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) &&
+ (id->bDeviceClass != dev->descriptor.bDeviceClass))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) &&
+ (id->bDeviceSubClass!= dev->descriptor.bDeviceSubClass))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) &&
+ (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_CLASS) &&
+ (id->bInterfaceClass != intf->desc.bInterfaceClass))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_SUBCLASS) &&
+ (id->bInterfaceSubClass != intf->desc.bInterfaceSubClass))
+ continue;
+
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL) &&
+ (id->bInterfaceProtocol != intf->desc.bInterfaceProtocol))
+ continue;
+
+ return id;
+ }
+
+ return NULL;
+}
+
+/**
+ * usb_find_interface - find usb_interface pointer for driver and device
+ * @drv: the driver whose current configuration is considered
+ * @minor: the minor number of the desired device
+ *
+ * This walks the driver device list and returns a pointer to the interface
+ * with the matching minor. Note, this only works for devices that share the
+ * USB major number.
+ */
+struct usb_interface *usb_find_interface(struct usb_driver *drv, int minor)
+{
+ struct list_head *entry;
+ struct device *dev;
+ struct usb_interface *intf;
+
+ list_for_each(entry, &drv->driver.devices) {
+ dev = container_of(entry, struct device, driver_list);
+
+ /* can't look at usb devices, only interfaces */
+ if (dev->driver == &usb_generic_driver)
+ continue;
+
+ intf = to_usb_interface(dev);
+ if (intf->minor == -1)
+ continue;
+ if (intf->minor == minor)
+ return intf;
+ }
+
+ /* no device found that matches */
+ return NULL;
+}
+
+static int usb_device_match (struct device *dev, struct device_driver *drv)
+{
+ struct usb_interface *intf;
+ struct usb_driver *usb_drv;
+ const struct usb_device_id *id;
+
+ /* check for generic driver, which we don't match any device with */
+ if (drv == &usb_generic_driver)
+ return 0;
+
+ intf = to_usb_interface(dev);
+ usb_drv = to_usb_driver(drv);
+
+ id = usb_match_id (intf, usb_drv->id_table);
+ if (id)
+ return 1;
+
+ return 0;
+}
+
+
+#ifdef CONFIG_HOTPLUG
+
+/*
+ * USB hotplugging invokes what /proc/sys/kernel/hotplug says
+ * (normally /sbin/hotplug) when USB devices get added or removed.
+ *
+ * This invokes a user mode policy agent, typically helping to load driver
+ * or other modules, configure the device, and more. Drivers can provide
+ * a MODULE_DEVICE_TABLE to help with module loading subtasks.
+ *
+ * We're called either from khubd (the typical case) or from root hub
+ * (init, kapmd, modprobe, rmmod, etc), but the agents need to handle
+ * delays in event delivery. Use sysfs (and DEVPATH) to make sure the
+ * device (and this configuration!) are still present.
+ */
+static int usb_hotplug (struct device *dev, char **envp, int num_envp,
+ char *buffer, int buffer_size)
+{
+ struct usb_interface *intf;
+ struct usb_device *usb_dev;
+ int i = 0;
+ int length = 0;
+
+ if (!dev)
+ return -ENODEV;
+
+ /* driver is often null here; dev_dbg() would oops */
+ pr_debug ("usb %s: hotplug\n", dev->bus_id);
+
+ /* Must check driver_data here, as on remove driver is always NULL */
+ if ((dev->driver == &usb_generic_driver) ||
+ (dev->driver_data == &usb_generic_driver_data))
+ return 0;
+
+ intf = to_usb_interface(dev);
+ usb_dev = interface_to_usbdev (intf);
+
+ if (usb_dev->devnum < 0) {
+ pr_debug ("usb %s: already deleted?\n", dev->bus_id);
+ return -ENODEV;
+ }
+ if (!usb_dev->bus) {
+ pr_debug ("usb %s: bus removed?\n", dev->bus_id);
+ return -ENODEV;
+ }
+
+#ifdef CONFIG_USB_DEVICEFS
+ /* If this is available, userspace programs can directly read
+ * all the device descriptors we don't tell them about. Or
+ * even act as usermode drivers.
+ *
+ * FIXME reduce hardwired intelligence here
+ */
+ if (add_hotplug_env_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "DEVICE=/proc/bus/usb/%03d/%03d",
+ usb_dev->bus->busnum, usb_dev->devnum))
+ return -ENOMEM;
+#endif
+
+ /* per-device configurations are common */
+ if (add_hotplug_env_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "PRODUCT=%x/%x/%x",
+ le16_to_cpu(usb_dev->descriptor.idVendor),
+ le16_to_cpu(usb_dev->descriptor.idProduct),
+ le16_to_cpu(usb_dev->descriptor.bcdDevice)))
+ return -ENOMEM;
+
+ /* class-based driver binding models */
+ if (add_hotplug_env_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "TYPE=%d/%d/%d",
+ usb_dev->descriptor.bDeviceClass,
+ usb_dev->descriptor.bDeviceSubClass,
+ usb_dev->descriptor.bDeviceProtocol))
+ return -ENOMEM;
+
+ if (usb_dev->descriptor.bDeviceClass == 0) {
+ struct usb_host_interface *alt = intf->cur_altsetting;
+
+ /* 2.4 only exposed interface zero. in 2.5, hotplug
+ * agents are called for all interfaces, and can use
+ * $DEVPATH/bInterfaceNumber if necessary.
+ */
+ if (add_hotplug_env_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "INTERFACE=%d/%d/%d",
+ alt->desc.bInterfaceClass,
+ alt->desc.bInterfaceSubClass,
+ alt->desc.bInterfaceProtocol))
+ return -ENOMEM;
+
+ if (add_hotplug_env_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "MODALIAS=usb:v%04Xp%04Xdl%04Xdh%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X",
+ le16_to_cpu(usb_dev->descriptor.idVendor),
+ le16_to_cpu(usb_dev->descriptor.idProduct),
+ le16_to_cpu(usb_dev->descriptor.bcdDevice),
+ le16_to_cpu(usb_dev->descriptor.bcdDevice),
+ usb_dev->descriptor.bDeviceClass,
+ usb_dev->descriptor.bDeviceSubClass,
+ usb_dev->descriptor.bDeviceProtocol,
+ alt->desc.bInterfaceClass,
+ alt->desc.bInterfaceSubClass,
+ alt->desc.bInterfaceProtocol))
+ return -ENOMEM;
+ } else {
+ if (add_hotplug_env_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "MODALIAS=usb:v%04Xp%04Xdl%04Xdh%04Xdc%02Xdsc%02Xdp%02Xic*isc*ip*",
+ le16_to_cpu(usb_dev->descriptor.idVendor),
+ le16_to_cpu(usb_dev->descriptor.idProduct),
+ le16_to_cpu(usb_dev->descriptor.bcdDevice),
+ le16_to_cpu(usb_dev->descriptor.bcdDevice),
+ usb_dev->descriptor.bDeviceClass,
+ usb_dev->descriptor.bDeviceSubClass,
+ usb_dev->descriptor.bDeviceProtocol))
+ return -ENOMEM;
+ }
+
+ envp[i] = NULL;
+
+ return 0;
+}
+
+#else
+
+static int usb_hotplug (struct device *dev, char **envp,
+ int num_envp, char *buffer, int buffer_size)
+{
+ return -ENODEV;
+}
+
+#endif /* CONFIG_HOTPLUG */
+
+/**
+ * usb_release_dev - free a usb device structure when all users of it are finished.
+ * @dev: device that's been disconnected
+ *
+ * Will be called only by the device core when all users of this usb device are
+ * done.
+ */
+static void usb_release_dev(struct device *dev)
+{
+ struct usb_device *udev;
+
+ udev = to_usb_device(dev);
+
+ usb_destroy_configuration(udev);
+ usb_bus_put(udev->bus);
+ kfree(udev->product);
+ kfree(udev->manufacturer);
+ kfree(udev->serial);
+ kfree(udev);
+}
+
+/**
+ * usb_alloc_dev - usb device constructor (usbcore-internal)
+ * @parent: hub to which device is connected; null to allocate a root hub
+ * @bus: bus used to access the device
+ * @port1: one-based index of port; ignored for root hubs
+ * Context: !in_interrupt ()
+ *
+ * Only hub drivers (including virtual root hub drivers for host
+ * controllers) should ever call this.
+ *
+ * This call may not be used in a non-sleeping context.
+ */
+struct usb_device *
+usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port1)
+{
+ struct usb_device *dev;
+
+ dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+ if (!dev)
+ return NULL;
+
+ memset(dev, 0, sizeof(*dev));
+
+ bus = usb_bus_get(bus);
+ if (!bus) {
+ kfree(dev);
+ return NULL;
+ }
+
+ device_initialize(&dev->dev);
+ dev->dev.bus = &usb_bus_type;
+ dev->dev.dma_mask = bus->controller->dma_mask;
+ dev->dev.driver_data = &usb_generic_driver_data;
+ dev->dev.driver = &usb_generic_driver;
+ dev->dev.release = usb_release_dev;
+ dev->state = USB_STATE_ATTACHED;
+
+ INIT_LIST_HEAD(&dev->ep0.urb_list);
+ dev->ep0.desc.bLength = USB_DT_ENDPOINT_SIZE;
+ dev->ep0.desc.bDescriptorType = USB_DT_ENDPOINT;
+ /* ep0 maxpacket comes later, from device descriptor */
+ dev->ep_in[0] = dev->ep_out[0] = &dev->ep0;
+
+ /* Save readable and stable topology id, distinguishing devices
+ * by location for diagnostics, tools, driver model, etc. The
+ * string is a path along hub ports, from the root. Each device's
+ * dev->devpath will be stable until USB is re-cabled, and hubs
+ * are often labeled with these port numbers. The bus_id isn't
+ * as stable: bus->busnum changes easily from modprobe order,
+ * cardbus or pci hotplugging, and so on.
+ */
+ if (unlikely (!parent)) {
+ dev->devpath [0] = '0';
+
+ dev->dev.parent = bus->controller;
+ sprintf (&dev->dev.bus_id[0], "usb%d", bus->busnum);
+ } else {
+ /* match any labeling on the hubs; it's one-based */
+ if (parent->devpath [0] == '0')
+ snprintf (dev->devpath, sizeof dev->devpath,
+ "%d", port1);
+ else
+ snprintf (dev->devpath, sizeof dev->devpath,
+ "%s.%d", parent->devpath, port1);
+
+ dev->dev.parent = &parent->dev;
+ sprintf (&dev->dev.bus_id[0], "%d-%s",
+ bus->busnum, dev->devpath);
+
+ /* hub driver sets up TT records */
+ }
+
+ dev->bus = bus;
+ dev->parent = parent;
+ INIT_LIST_HEAD(&dev->filelist);
+
+ init_MUTEX(&dev->serialize);
+
+ return dev;
+}
+
+/**
+ * usb_get_dev - increments the reference count of the usb device structure
+ * @dev: the device being referenced
+ *
+ * Each live reference to a device should be refcounted.
+ *
+ * Drivers for USB interfaces should normally record such references in
+ * their probe() methods, when they bind to an interface, and release
+ * them by calling usb_put_dev(), in their disconnect() methods.
+ *
+ * A pointer to the device with the incremented reference counter is returned.
+ */
+struct usb_device *usb_get_dev(struct usb_device *dev)
+{
+ if (dev)
+ get_device(&dev->dev);
+ return dev;
+}
+
+/**
+ * usb_put_dev - release a use of the usb device structure
+ * @dev: device that's been disconnected
+ *
+ * Must be called when a user of a device is finished with it. When the last
+ * user of the device calls this function, the memory of the device is freed.
+ */
+void usb_put_dev(struct usb_device *dev)
+{
+ if (dev)
+ put_device(&dev->dev);
+}
+
+/**
+ * usb_get_intf - increments the reference count of the usb interface structure
+ * @intf: the interface being referenced
+ *
+ * Each live reference to a interface must be refcounted.
+ *
+ * Drivers for USB interfaces should normally record such references in
+ * their probe() methods, when they bind to an interface, and release
+ * them by calling usb_put_intf(), in their disconnect() methods.
+ *
+ * A pointer to the interface with the incremented reference counter is
+ * returned.
+ */
+struct usb_interface *usb_get_intf(struct usb_interface *intf)
+{
+ if (intf)
+ get_device(&intf->dev);
+ return intf;
+}
+
+/**
+ * usb_put_intf - release a use of the usb interface structure
+ * @intf: interface that's been decremented
+ *
+ * Must be called when a user of an interface is finished with it. When the
+ * last user of the interface calls this function, the memory of the interface
+ * is freed.
+ */
+void usb_put_intf(struct usb_interface *intf)
+{
+ if (intf)
+ put_device(&intf->dev);
+}
+
+
+/* USB device locking
+ *
+ * Although locking USB devices should be straightforward, it is
+ * complicated by the way the driver-model core works. When a new USB
+ * driver is registered or unregistered, the core will automatically
+ * probe or disconnect all matching interfaces on all USB devices while
+ * holding the USB subsystem writelock. There's no good way for us to
+ * tell which devices will be used or to lock them beforehand; our only
+ * option is to effectively lock all the USB devices.
+ *
+ * We do that by using a private rw-semaphore, usb_all_devices_rwsem.
+ * When locking an individual device you must first acquire the rwsem's
+ * readlock. When a driver is registered or unregistered the writelock
+ * must be held. These actions are encapsulated in the subroutines
+ * below, so all a driver needs to do is call usb_lock_device() and
+ * usb_unlock_device().
+ *
+ * Complications arise when several devices are to be locked at the same
+ * time. Only hub-aware drivers that are part of usbcore ever have to
+ * do this; nobody else needs to worry about it. The problem is that
+ * usb_lock_device() must not be called to lock a second device since it
+ * would acquire the rwsem's readlock reentrantly, leading to deadlock if
+ * another thread was waiting for the writelock. The solution is simple:
+ *
+ * When locking more than one device, call usb_lock_device()
+ * to lock the first one. Lock the others by calling
+ * down(&udev->serialize) directly.
+ *
+ * When unlocking multiple devices, use up(&udev->serialize)
+ * to unlock all but the last one. Unlock the last one by
+ * calling usb_unlock_device().
+ *
+ * When locking both a device and its parent, always lock the
+ * the parent first.
+ */
+
+/**
+ * usb_lock_device - acquire the lock for a usb device structure
+ * @udev: device that's being locked
+ *
+ * Use this routine when you don't hold any other device locks;
+ * to acquire nested inner locks call down(&udev->serialize) directly.
+ * This is necessary for proper interaction with usb_lock_all_devices().
+ */
+void usb_lock_device(struct usb_device *udev)
+{
+ down_read(&usb_all_devices_rwsem);
+ down(&udev->serialize);
+}
+
+/**
+ * usb_trylock_device - attempt to acquire the lock for a usb device structure
+ * @udev: device that's being locked
+ *
+ * Don't use this routine if you already hold a device lock;
+ * use down_trylock(&udev->serialize) instead.
+ * This is necessary for proper interaction with usb_lock_all_devices().
+ *
+ * Returns 1 if successful, 0 if contention.
+ */
+int usb_trylock_device(struct usb_device *udev)
+{
+ if (!down_read_trylock(&usb_all_devices_rwsem))
+ return 0;
+ if (down_trylock(&udev->serialize)) {
+ up_read(&usb_all_devices_rwsem);
+ return 0;
+ }
+ return 1;
+}
+
+/**
+ * usb_lock_device_for_reset - cautiously acquire the lock for a
+ * usb device structure
+ * @udev: device that's being locked
+ * @iface: interface bound to the driver making the request (optional)
+ *
+ * Attempts to acquire the device lock, but fails if the device is
+ * NOTATTACHED or SUSPENDED, or if iface is specified and the interface
+ * is neither BINDING nor BOUND. Rather than sleeping to wait for the
+ * lock, the routine polls repeatedly. This is to prevent deadlock with
+ * disconnect; in some drivers (such as usb-storage) the disconnect()
+ * callback will block waiting for a device reset to complete.
+ *
+ * Returns a negative error code for failure, otherwise 1 or 0 to indicate
+ * that the device will or will not have to be unlocked. (0 can be
+ * returned when an interface is given and is BINDING, because in that
+ * case the driver already owns the device lock.)
+ */
+int usb_lock_device_for_reset(struct usb_device *udev,
+ struct usb_interface *iface)
+{
+ if (udev->state == USB_STATE_NOTATTACHED)
+ return -ENODEV;
+ if (udev->state == USB_STATE_SUSPENDED)
+ return -EHOSTUNREACH;
+ if (iface) {
+ switch (iface->condition) {
+ case USB_INTERFACE_BINDING:
+ return 0;
+ case USB_INTERFACE_BOUND:
+ break;
+ default:
+ return -EINTR;
+ }
+ }
+
+ while (!usb_trylock_device(udev)) {
+ msleep(15);
+ if (udev->state == USB_STATE_NOTATTACHED)
+ return -ENODEV;
+ if (udev->state == USB_STATE_SUSPENDED)
+ return -EHOSTUNREACH;
+ if (iface && iface->condition != USB_INTERFACE_BOUND)
+ return -EINTR;
+ }
+ return 1;
+}
+
+/**
+ * usb_unlock_device - release the lock for a usb device structure
+ * @udev: device that's being unlocked
+ *
+ * Use this routine when releasing the only device lock you hold;
+ * to release inner nested locks call up(&udev->serialize) directly.
+ * This is necessary for proper interaction with usb_lock_all_devices().
+ */
+void usb_unlock_device(struct usb_device *udev)
+{
+ up(&udev->serialize);
+ up_read(&usb_all_devices_rwsem);
+}
+
+/**
+ * usb_lock_all_devices - acquire the lock for all usb device structures
+ *
+ * This is necessary when registering a new driver or probing a bus,
+ * since the driver-model core may try to use any usb_device.
+ */
+void usb_lock_all_devices(void)
+{
+ down_write(&usb_all_devices_rwsem);
+}
+
+/**
+ * usb_unlock_all_devices - release the lock for all usb device structures
+ */
+void usb_unlock_all_devices(void)
+{
+ up_write(&usb_all_devices_rwsem);
+}
+
+
+static struct usb_device *match_device(struct usb_device *dev,
+ u16 vendor_id, u16 product_id)
+{
+ struct usb_device *ret_dev = NULL;
+ int child;
+
+ dev_dbg(&dev->dev, "check for vendor %04x, product %04x ...\n",
+ le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(dev->descriptor.idProduct));
+
+ /* see if this device matches */
+ if ((vendor_id == le16_to_cpu(dev->descriptor.idVendor)) &&
+ (product_id == le16_to_cpu(dev->descriptor.idProduct))) {
+ dev_dbg (&dev->dev, "matched this device!\n");
+ ret_dev = usb_get_dev(dev);
+ goto exit;
+ }
+
+ /* look through all of the children of this device */
+ for (child = 0; child < dev->maxchild; ++child) {
+ if (dev->children[child]) {
+ down(&dev->children[child]->serialize);
+ ret_dev = match_device(dev->children[child],
+ vendor_id, product_id);
+ up(&dev->children[child]->serialize);
+ if (ret_dev)
+ goto exit;
+ }
+ }
+exit:
+ return ret_dev;
+}
+
+/**
+ * usb_find_device - find a specific usb device in the system
+ * @vendor_id: the vendor id of the device to find
+ * @product_id: the product id of the device to find
+ *
+ * Returns a pointer to a struct usb_device if such a specified usb
+ * device is present in the system currently. The usage count of the
+ * device will be incremented if a device is found. Make sure to call
+ * usb_put_dev() when the caller is finished with the device.
+ *
+ * If a device with the specified vendor and product id is not found,
+ * NULL is returned.
+ */
+struct usb_device *usb_find_device(u16 vendor_id, u16 product_id)
+{
+ struct list_head *buslist;
+ struct usb_bus *bus;
+ struct usb_device *dev = NULL;
+
+ down(&usb_bus_list_lock);
+ for (buslist = usb_bus_list.next;
+ buslist != &usb_bus_list;
+ buslist = buslist->next) {
+ bus = container_of(buslist, struct usb_bus, bus_list);
+ if (!bus->root_hub)
+ continue;
+ usb_lock_device(bus->root_hub);
+ dev = match_device(bus->root_hub, vendor_id, product_id);
+ usb_unlock_device(bus->root_hub);
+ if (dev)
+ goto exit;
+ }
+exit:
+ up(&usb_bus_list_lock);
+ return dev;
+}
+
+/**
+ * usb_get_current_frame_number - return current bus frame number
+ * @dev: the device whose bus is being queried
+ *
+ * Returns the current frame number for the USB host controller
+ * used with the given USB device. This can be used when scheduling
+ * isochronous requests.
+ *
+ * Note that different kinds of host controller have different
+ * "scheduling horizons". While one type might support scheduling only
+ * 32 frames into the future, others could support scheduling up to
+ * 1024 frames into the future.
+ */
+int usb_get_current_frame_number(struct usb_device *dev)
+{
+ return dev->bus->op->get_frame_number (dev);
+}
+
+/*-------------------------------------------------------------------*/
+/*
+ * __usb_get_extra_descriptor() finds a descriptor of specific type in the
+ * extra field of the interface and endpoint descriptor structs.
+ */
+
+int __usb_get_extra_descriptor(char *buffer, unsigned size,
+ unsigned char type, void **ptr)
+{
+ struct usb_descriptor_header *header;
+
+ while (size >= sizeof(struct usb_descriptor_header)) {
+ header = (struct usb_descriptor_header *)buffer;
+
+ if (header->bLength < 2) {
+ printk(KERN_ERR
+ "%s: bogus descriptor, type %d length %d\n",
+ usbcore_name,
+ header->bDescriptorType,
+ header->bLength);
+ return -1;
+ }
+
+ if (header->bDescriptorType == type) {
+ *ptr = header;
+ return 0;
+ }
+
+ buffer += header->bLength;
+ size -= header->bLength;
+ }
+ return -1;
+}
+
+/**
+ * usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP
+ * @dev: device the buffer will be used with
+ * @size: requested buffer size
+ * @mem_flags: affect whether allocation may block
+ * @dma: used to return DMA address of buffer
+ *
+ * Return value is either null (indicating no buffer could be allocated), or
+ * the cpu-space pointer to a buffer that may be used to perform DMA to the
+ * specified device. Such cpu-space buffers are returned along with the DMA
+ * address (through the pointer provided).
+ *
+ * These buffers are used with URB_NO_xxx_DMA_MAP set in urb->transfer_flags
+ * to avoid behaviors like using "DMA bounce buffers", or tying down I/O
+ * mapping hardware for long idle periods. The implementation varies between
+ * platforms, depending on details of how DMA will work to this device.
+ * Using these buffers also helps prevent cacheline sharing problems on
+ * architectures where CPU caches are not DMA-coherent.
+ *
+ * When the buffer is no longer used, free it with usb_buffer_free().
+ */
+void *usb_buffer_alloc (
+ struct usb_device *dev,
+ size_t size,
+ int mem_flags,
+ dma_addr_t *dma
+)
+{
+ if (!dev || !dev->bus || !dev->bus->op || !dev->bus->op->buffer_alloc)
+ return NULL;
+ return dev->bus->op->buffer_alloc (dev->bus, size, mem_flags, dma);
+}
+
+/**
+ * usb_buffer_free - free memory allocated with usb_buffer_alloc()
+ * @dev: device the buffer was used with
+ * @size: requested buffer size
+ * @addr: CPU address of buffer
+ * @dma: DMA address of buffer
+ *
+ * This reclaims an I/O buffer, letting it be reused. The memory must have
+ * been allocated using usb_buffer_alloc(), and the parameters must match
+ * those provided in that allocation request.
+ */
+void usb_buffer_free (
+ struct usb_device *dev,
+ size_t size,
+ void *addr,
+ dma_addr_t dma
+)
+{
+ if (!dev || !dev->bus || !dev->bus->op || !dev->bus->op->buffer_free)
+ return;
+ dev->bus->op->buffer_free (dev->bus, size, addr, dma);
+}
+
+/**
+ * usb_buffer_map - create DMA mapping(s) for an urb
+ * @urb: urb whose transfer_buffer/setup_packet will be mapped
+ *
+ * Return value is either null (indicating no buffer could be mapped), or
+ * the parameter. URB_NO_TRANSFER_DMA_MAP and URB_NO_SETUP_DMA_MAP are
+ * added to urb->transfer_flags if the operation succeeds. If the device
+ * is connected to this system through a non-DMA controller, this operation
+ * always succeeds.
+ *
+ * This call would normally be used for an urb which is reused, perhaps
+ * as the target of a large periodic transfer, with usb_buffer_dmasync()
+ * calls to synchronize memory and dma state.
+ *
+ * Reverse the effect of this call with usb_buffer_unmap().
+ */
+#if 0
+struct urb *usb_buffer_map (struct urb *urb)
+{
+ struct usb_bus *bus;
+ struct device *controller;
+
+ if (!urb
+ || !urb->dev
+ || !(bus = urb->dev->bus)
+ || !(controller = bus->controller))
+ return NULL;
+
+ if (controller->dma_mask) {
+ urb->transfer_dma = dma_map_single (controller,
+ urb->transfer_buffer, urb->transfer_buffer_length,
+ usb_pipein (urb->pipe)
+ ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
+ if (usb_pipecontrol (urb->pipe))
+ urb->setup_dma = dma_map_single (controller,
+ urb->setup_packet,
+ sizeof (struct usb_ctrlrequest),
+ DMA_TO_DEVICE);
+ // FIXME generic api broken like pci, can't report errors
+ // if (urb->transfer_dma == DMA_ADDR_INVALID) return 0;
+ } else
+ urb->transfer_dma = ~0;
+ urb->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP
+ | URB_NO_SETUP_DMA_MAP);
+ return urb;
+}
+#endif /* 0 */
+
+/* XXX DISABLED, no users currently. If you wish to re-enable this
+ * XXX please determine whether the sync is to transfer ownership of
+ * XXX the buffer from device to cpu or vice verse, and thusly use the
+ * XXX appropriate _for_{cpu,device}() method. -DaveM
+ */
+#if 0
+
+/**
+ * usb_buffer_dmasync - synchronize DMA and CPU view of buffer(s)
+ * @urb: urb whose transfer_buffer/setup_packet will be synchronized
+ */
+void usb_buffer_dmasync (struct urb *urb)
+{
+ struct usb_bus *bus;
+ struct device *controller;
+
+ if (!urb
+ || !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)
+ || !urb->dev
+ || !(bus = urb->dev->bus)
+ || !(controller = bus->controller))
+ return;
+
+ if (controller->dma_mask) {
+ dma_sync_single (controller,
+ urb->transfer_dma, urb->transfer_buffer_length,
+ usb_pipein (urb->pipe)
+ ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
+ if (usb_pipecontrol (urb->pipe))
+ dma_sync_single (controller,
+ urb->setup_dma,
+ sizeof (struct usb_ctrlrequest),
+ DMA_TO_DEVICE);
+ }
+}
+#endif
+
+/**
+ * usb_buffer_unmap - free DMA mapping(s) for an urb
+ * @urb: urb whose transfer_buffer will be unmapped
+ *
+ * Reverses the effect of usb_buffer_map().
+ */
+#if 0
+void usb_buffer_unmap (struct urb *urb)
+{
+ struct usb_bus *bus;
+ struct device *controller;
+
+ if (!urb
+ || !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)
+ || !urb->dev
+ || !(bus = urb->dev->bus)
+ || !(controller = bus->controller))
+ return;
+
+ if (controller->dma_mask) {
+ dma_unmap_single (controller,
+ urb->transfer_dma, urb->transfer_buffer_length,
+ usb_pipein (urb->pipe)
+ ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
+ if (usb_pipecontrol (urb->pipe))
+ dma_unmap_single (controller,
+ urb->setup_dma,
+ sizeof (struct usb_ctrlrequest),
+ DMA_TO_DEVICE);
+ }
+ urb->transfer_flags &= ~(URB_NO_TRANSFER_DMA_MAP
+ | URB_NO_SETUP_DMA_MAP);
+}
+#endif /* 0 */
+
+/**
+ * usb_buffer_map_sg - create scatterlist DMA mapping(s) for an endpoint
+ * @dev: device to which the scatterlist will be mapped
+ * @pipe: endpoint defining the mapping direction
+ * @sg: the scatterlist to map
+ * @nents: the number of entries in the scatterlist
+ *
+ * Return value is either < 0 (indicating no buffers could be mapped), or
+ * the number of DMA mapping array entries in the scatterlist.
+ *
+ * The caller is responsible for placing the resulting DMA addresses from
+ * the scatterlist into URB transfer buffer pointers, and for setting the
+ * URB_NO_TRANSFER_DMA_MAP transfer flag in each of those URBs.
+ *
+ * Top I/O rates come from queuing URBs, instead of waiting for each one
+ * to complete before starting the next I/O. This is particularly easy
+ * to do with scatterlists. Just allocate and submit one URB for each DMA
+ * mapping entry returned, stopping on the first error or when all succeed.
+ * Better yet, use the usb_sg_*() calls, which do that (and more) for you.
+ *
+ * This call would normally be used when translating scatterlist requests,
+ * rather than usb_buffer_map(), since on some hardware (with IOMMUs) it
+ * may be able to coalesce mappings for improved I/O efficiency.
+ *
+ * Reverse the effect of this call with usb_buffer_unmap_sg().
+ */
+int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe,
+ struct scatterlist *sg, int nents)
+{
+ struct usb_bus *bus;
+ struct device *controller;
+
+ if (!dev
+ || usb_pipecontrol (pipe)
+ || !(bus = dev->bus)
+ || !(controller = bus->controller)
+ || !controller->dma_mask)
+ return -1;
+
+ // FIXME generic api broken like pci, can't report errors
+ return dma_map_sg (controller, sg, nents,
+ usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
+}
+
+/* XXX DISABLED, no users currently. If you wish to re-enable this
+ * XXX please determine whether the sync is to transfer ownership of
+ * XXX the buffer from device to cpu or vice verse, and thusly use the
+ * XXX appropriate _for_{cpu,device}() method. -DaveM
+ */
+#if 0
+
+/**
+ * usb_buffer_dmasync_sg - synchronize DMA and CPU view of scatterlist buffer(s)
+ * @dev: device to which the scatterlist will be mapped
+ * @pipe: endpoint defining the mapping direction
+ * @sg: the scatterlist to synchronize
+ * @n_hw_ents: the positive return value from usb_buffer_map_sg
+ *
+ * Use this when you are re-using a scatterlist's data buffers for
+ * another USB request.
+ */
+void usb_buffer_dmasync_sg (struct usb_device *dev, unsigned pipe,
+ struct scatterlist *sg, int n_hw_ents)
+{
+ struct usb_bus *bus;
+ struct device *controller;
+
+ if (!dev
+ || !(bus = dev->bus)
+ || !(controller = bus->controller)
+ || !controller->dma_mask)
+ return;
+
+ dma_sync_sg (controller, sg, n_hw_ents,
+ usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
+}
+#endif
+
+/**
+ * usb_buffer_unmap_sg - free DMA mapping(s) for a scatterlist
+ * @dev: device to which the scatterlist will be mapped
+ * @pipe: endpoint defining the mapping direction
+ * @sg: the scatterlist to unmap
+ * @n_hw_ents: the positive return value from usb_buffer_map_sg
+ *
+ * Reverses the effect of usb_buffer_map_sg().
+ */
+void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe,
+ struct scatterlist *sg, int n_hw_ents)
+{
+ struct usb_bus *bus;
+ struct device *controller;
+
+ if (!dev
+ || !(bus = dev->bus)
+ || !(controller = bus->controller)
+ || !controller->dma_mask)
+ return;
+
+ dma_unmap_sg (controller, sg, n_hw_ents,
+ usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
+}
+
+static int usb_generic_suspend(struct device *dev, u32 state)
+{
+ struct usb_interface *intf;
+ struct usb_driver *driver;
+
+ if (dev->driver == &usb_generic_driver)
+ return usb_suspend_device (to_usb_device(dev), state);
+
+ if ((dev->driver == NULL) ||
+ (dev->driver_data == &usb_generic_driver_data))
+ return 0;
+
+ intf = to_usb_interface(dev);
+ driver = to_usb_driver(dev->driver);
+
+ /* there's only one USB suspend state */
+ if (intf->dev.power.power_state)
+ return 0;
+
+ if (driver->suspend)
+ return driver->suspend(intf, state);
+ return 0;
+}
+
+static int usb_generic_resume(struct device *dev)
+{
+ struct usb_interface *intf;
+ struct usb_driver *driver;
+
+ /* devices resume through their hub */
+ if (dev->driver == &usb_generic_driver)
+ return usb_resume_device (to_usb_device(dev));
+
+ if ((dev->driver == NULL) ||
+ (dev->driver_data == &usb_generic_driver_data))
+ return 0;
+
+ intf = to_usb_interface(dev);
+ driver = to_usb_driver(dev->driver);
+
+ if (driver->resume)
+ return driver->resume(intf);
+ return 0;
+}
+
+struct bus_type usb_bus_type = {
+ .name = "usb",
+ .match = usb_device_match,
+ .hotplug = usb_hotplug,
+ .suspend = usb_generic_suspend,
+ .resume = usb_generic_resume,
+};
+
+#ifndef MODULE
+
+static int __init usb_setup_disable(char *str)
+{
+ nousb = 1;
+ return 1;
+}
+
+/* format to disable USB on kernel command line is: nousb */
+__setup("nousb", usb_setup_disable);
+
+#endif
+
+/*
+ * for external read access to <nousb>
+ */
+int usb_disabled(void)
+{
+ return nousb;
+}
+
+/*
+ * Init
+ */
+static int __init usb_init(void)
+{
+ int retval;
+ if (nousb) {
+ pr_info ("%s: USB support disabled\n", usbcore_name);
+ return 0;
+ }
+
+ retval = bus_register(&usb_bus_type);
+ if (retval)
+ goto out;
+ retval = usb_host_init();
+ if (retval)
+ goto host_init_failed;
+ retval = usb_major_init();
+ if (retval)
+ goto major_init_failed;
+ retval = usbfs_init();
+ if (retval)
+ goto fs_init_failed;
+ retval = usb_hub_init();
+ if (retval)
+ goto hub_init_failed;
+
+ retval = driver_register(&usb_generic_driver);
+ if (!retval)
+ goto out;
+
+ usb_hub_cleanup();
+hub_init_failed:
+ usbfs_cleanup();
+fs_init_failed:
+ usb_major_cleanup();
+major_init_failed:
+ usb_host_cleanup();
+host_init_failed:
+ bus_unregister(&usb_bus_type);
+out:
+ return retval;
+}
+
+/*
+ * Cleanup
+ */
+static void __exit usb_exit(void)
+{
+ /* This will matter if shutdown/reboot does exitcalls. */
+ if (nousb)
+ return;
+
+ driver_unregister(&usb_generic_driver);
+ usb_major_cleanup();
+ usbfs_cleanup();
+ usb_hub_cleanup();
+ usb_host_cleanup();
+ bus_unregister(&usb_bus_type);
+}
+
+subsys_initcall(usb_init);
+module_exit(usb_exit);
+
+/*
+ * USB may be built into the kernel or be built as modules.
+ * These symbols are exported for device (or host controller)
+ * driver modules to use.
+ */
+
+EXPORT_SYMBOL(usb_register);
+EXPORT_SYMBOL(usb_deregister);
+EXPORT_SYMBOL(usb_disabled);
+
+EXPORT_SYMBOL(usb_alloc_dev);
+EXPORT_SYMBOL(usb_put_dev);
+EXPORT_SYMBOL(usb_get_dev);
+EXPORT_SYMBOL(usb_hub_tt_clear_buffer);
+
+EXPORT_SYMBOL(usb_lock_device);
+EXPORT_SYMBOL(usb_trylock_device);
+EXPORT_SYMBOL(usb_lock_device_for_reset);
+EXPORT_SYMBOL(usb_unlock_device);
+
+EXPORT_SYMBOL(usb_driver_claim_interface);
+EXPORT_SYMBOL(usb_driver_release_interface);
+EXPORT_SYMBOL(usb_match_id);
+EXPORT_SYMBOL(usb_find_interface);
+EXPORT_SYMBOL(usb_ifnum_to_if);
+EXPORT_SYMBOL(usb_altnum_to_altsetting);
+
+EXPORT_SYMBOL(usb_reset_device);
+EXPORT_SYMBOL(usb_disconnect);
+
+EXPORT_SYMBOL(__usb_get_extra_descriptor);
+
+EXPORT_SYMBOL(usb_find_device);
+EXPORT_SYMBOL(usb_get_current_frame_number);
+
+EXPORT_SYMBOL (usb_buffer_alloc);
+EXPORT_SYMBOL (usb_buffer_free);
+
+#if 0
+EXPORT_SYMBOL (usb_buffer_map);
+EXPORT_SYMBOL (usb_buffer_dmasync);
+EXPORT_SYMBOL (usb_buffer_unmap);
+#endif
+
+EXPORT_SYMBOL (usb_buffer_map_sg);
+#if 0
+EXPORT_SYMBOL (usb_buffer_dmasync_sg);
+#endif
+EXPORT_SYMBOL (usb_buffer_unmap_sg);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
new file mode 100644
index 000000000000..4c33eee52001
--- /dev/null
+++ b/drivers/usb/core/usb.h
@@ -0,0 +1,46 @@
+/* Functions local to drivers/usb/core/ */
+
+extern void usb_create_sysfs_dev_files (struct usb_device *dev);
+extern void usb_remove_sysfs_dev_files (struct usb_device *dev);
+extern void usb_create_sysfs_intf_files (struct usb_interface *intf);
+extern void usb_remove_sysfs_intf_files (struct usb_interface *intf);
+
+extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr);
+extern void usb_disable_interface (struct usb_device *dev,
+ struct usb_interface *intf);
+extern void usb_release_interface_cache(struct kref *ref);
+extern void usb_disable_device (struct usb_device *dev, int skip_ep0);
+
+extern int usb_get_device_descriptor(struct usb_device *dev,
+ unsigned int size);
+extern int usb_set_configuration(struct usb_device *dev, int configuration);
+
+extern void usb_lock_all_devices(void);
+extern void usb_unlock_all_devices(void);
+
+extern void usb_kick_khubd(struct usb_device *dev);
+extern void usb_resume_root_hub(struct usb_device *dev);
+
+/* for labeling diagnostics */
+extern const char *usbcore_name;
+
+/* usbfs stuff */
+extern struct usb_driver usbfs_driver;
+extern struct file_operations usbfs_devices_fops;
+extern struct file_operations usbfs_device_file_operations;
+extern void usbfs_conn_disc_event(void);
+
+struct dev_state {
+ struct list_head list; /* state list */
+ struct usb_device *dev;
+ struct file *file;
+ spinlock_t lock; /* protects the async urb lists */
+ struct list_head async_pending;
+ struct list_head async_completed;
+ wait_queue_head_t wait; /* wake up if a request completed */
+ unsigned int discsignr;
+ struct task_struct *disctask;
+ void __user *disccontext;
+ unsigned long ifclaimed;
+};
+
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
new file mode 100644
index 000000000000..3b24f9f2c234
--- /dev/null
+++ b/drivers/usb/gadget/Kconfig
@@ -0,0 +1,389 @@
+#
+# USB Gadget support on a system involves
+# (a) a peripheral controller, and
+# (b) the gadget driver using it.
+#
+# NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
+#
+# - Host systems (like PCs) need CONFIG_USB (with "A" jacks).
+# - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks).
+# - Some systems have both kinds of of controller.
+#
+# With help from a special transceiver and a "Mini-AB" jack, systems with
+# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
+#
+menu "USB Gadget Support"
+
+config USB_GADGET
+ tristate "Support for USB Gadgets"
+ help
+ USB is a master/slave protocol, organized with one master
+ host (such as a PC) controlling up to 127 peripheral devices.
+ The USB hardware is asymmetric, which makes it easier to set up:
+ you can't connect a "to-the-host" connector to a peripheral.
+
+ Linux can run in the host, or in the peripheral. In both cases
+ you need a low level bus controller driver, and some software
+ talking to it. Peripheral controllers are often discrete silicon,
+ or are integrated with the CPU in a microcontroller. The more
+ familiar host side controllers have names like like "EHCI", "OHCI",
+ or "UHCI", and are usually integrated into southbridges on PC
+ motherboards.
+
+ Enable this configuration option if you want to run Linux inside
+ a USB peripheral device. Configure one hardware driver for your
+ peripheral/device side bus controller, and a "gadget driver" for
+ your peripheral protocol. (If you use modular gadget drivers,
+ you may configure more than one.)
+
+ If in doubt, say "N" and don't enable these drivers; most people
+ don't have this kind of hardware (except maybe inside Linux PDAs).
+
+ For more information, see <http://www.linux-usb.org/gadget> and
+ the kernel DocBook documentation for this API.
+
+config USB_GADGET_DEBUG_FILES
+ boolean "Debugging information files"
+ depends on USB_GADGET && PROC_FS
+ help
+ Some of the drivers in the "gadget" framework can expose
+ debugging information in files such as /proc/driver/udc
+ (for a peripheral controller). The information in these
+ files may help when you're troubleshooting or bringing up a
+ driver on a new board. Enable these files by choosing "Y"
+ here. If in doubt, or to conserve kernel memory, say "N".
+
+#
+# USB Peripheral Controller Support
+#
+choice
+ prompt "USB Peripheral Controller"
+ depends on USB_GADGET
+ help
+ A USB device uses a controller to talk to its host.
+ Systems should have only one such upstream link.
+ Many controller drivers are platform-specific; these
+ often need board-specific hooks.
+
+config USB_GADGET_NET2280
+ boolean "NetChip 2280"
+ depends on PCI
+ select USB_GADGET_DUALSPEED
+ help
+ NetChip 2280 is a PCI based USB peripheral controller which
+ supports both full and high speed USB 2.0 data transfers.
+
+ It has six configurable endpoints, as well as endpoint zero
+ (for control transfers) and several endpoints with dedicated
+ functions.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "net2280" and force all
+ gadget drivers to also be dynamically linked.
+
+config USB_NET2280
+ tristate
+ depends on USB_GADGET_NET2280
+ default USB_GADGET
+
+config USB_GADGET_PXA2XX
+ boolean "PXA 25x or IXP 4xx"
+ depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX
+ help
+ Intel's PXA 25x series XScale ARM-5TE processors include
+ an integrated full speed USB 1.1 device controller. The
+ controller in the IXP 4xx series is register-compatible.
+
+ It has fifteen fixed-function endpoints, as well as endpoint
+ zero (for control transfers).
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "pxa2xx_udc" and force all
+ gadget drivers to also be dynamically linked.
+
+config USB_PXA2XX
+ tristate
+ depends on USB_GADGET_PXA2XX
+ default USB_GADGET
+
+# if there's only one gadget driver, using only two bulk endpoints,
+# don't waste memory for the other endpoints
+config USB_PXA2XX_SMALL
+ depends on USB_GADGET_PXA2XX
+ bool
+ default n if USB_ETH_RNDIS
+ default y if USB_ZERO
+ default y if USB_ETH
+ default y if USB_G_SERIAL
+
+config USB_GADGET_GOKU
+ boolean "Toshiba TC86C001 'Goku-S'"
+ depends on PCI
+ help
+ The Toshiba TC86C001 is a PCI device which includes controllers
+ for full speed USB devices, IDE, I2C, SIO, plus a USB host (OHCI).
+
+ The device controller has three configurable (bulk or interrupt)
+ endpoints, plus endpoint zero (for control transfers).
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "goku_udc" and to force all
+ gadget drivers to also be dynamically linked.
+
+config USB_GOKU
+ tristate
+ depends on USB_GADGET_GOKU
+ default USB_GADGET
+
+
+config USB_GADGET_LH7A40X
+ boolean "LH7A40X"
+ depends on ARCH_LH7A40X
+ help
+ This driver provides USB Device Controller driver for LH7A40x
+
+config USB_LH7A40X
+ tristate
+ depends on USB_GADGET_LH7A40X
+ default USB_GADGET
+
+
+config USB_GADGET_OMAP
+ boolean "OMAP USB Device Controller"
+ depends on ARCH_OMAP
+ select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
+ help
+ Many Texas Instruments OMAP processors have flexible full
+ speed USB device controllers, with support for up to 30
+ endpoints (plus endpoint zero). This driver supports the
+ controller in the OMAP 1611, and should work with controllers
+ in other OMAP processors too, given minor tweaks.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "omap_udc" and force all
+ gadget drivers to also be dynamically linked.
+
+config USB_OMAP
+ tristate
+ depends on USB_GADGET_OMAP
+ default USB_GADGET
+
+config USB_OTG
+ boolean "OTG Support"
+ depends on USB_GADGET_OMAP && ARCH_OMAP_OTG && USB_OHCI_HCD
+ help
+ The most notable feature of USB OTG is support for a
+ "Dual-Role" device, which can act as either a device
+ or a host. The initial role choice can be changed
+ later, when two dual-role devices talk to each other.
+
+ Select this only if your OMAP board has a Mini-AB connector.
+
+
+config USB_GADGET_DUMMY_HCD
+ boolean "Dummy HCD (DEVELOPMENT)"
+ depends on USB && EXPERIMENTAL
+ select USB_GADGET_DUALSPEED
+ help
+ This host controller driver emulates USB, looping all data transfer
+ requests back to a USB "gadget driver" in the same host. The host
+ side is the master; the gadget side is the slave. Gadget drivers
+ can be high, full, or low speed; and they have access to endpoints
+ like those from NET2280, PXA2xx, or SA1100 hardware.
+
+ This may help in some stages of creating a driver to embed in a
+ Linux device, since it lets you debug several parts of the gadget
+ driver without its hardware or drivers being involved.
+
+ Since such a gadget side driver needs to interoperate with a host
+ side Linux-USB device driver, this may help to debug both sides
+ of a USB protocol stack.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "dummy_hcd" and force all
+ gadget drivers to also be dynamically linked.
+
+config USB_DUMMY_HCD
+ tristate
+ depends on USB_GADGET_DUMMY_HCD
+ default USB_GADGET
+
+# NOTE: Please keep dummy_hcd LAST so that "real hardware" appears
+# first and will be selected by default.
+
+endchoice
+
+config USB_GADGET_DUALSPEED
+ bool
+ depends on USB_GADGET
+ default n
+ help
+ Means that gadget drivers should include extra descriptors
+ and code to handle dual-speed controllers.
+
+#
+# USB Gadget Drivers
+#
+choice
+ tristate "USB Gadget Drivers"
+ depends on USB_GADGET
+ default USB_ETH
+ help
+ A Linux "Gadget Driver" talks to the USB Peripheral Controller
+ driver through the abstract "gadget" API. Some other operating
+ systems call these "client" drivers, of which "class drivers"
+ are a subset (implementing a USB device class specification).
+ A gadget driver implements one or more USB functions using
+ the peripheral hardware.
+
+ Gadget drivers are hardware-neutral, or "platform independent",
+ except that they sometimes must understand quirks or limitations
+ of the particular controllers they work with. For example, when
+ a controller doesn't support alternate configurations or provide
+ enough of the right types of endpoints, the gadget driver might
+ not be able work with that controller, or might need to implement
+ a less common variant of a device class protocol.
+
+# this first set of drivers all depend on bulk-capable hardware.
+
+config USB_ZERO
+ tristate "Gadget Zero (DEVELOPMENT)"
+ depends on EXPERIMENTAL
+ help
+ Gadget Zero is a two-configuration device. It either sinks and
+ sources bulk data; or it loops back a configurable number of
+ transfers. It also implements control requests, for "chapter 9"
+ conformance. The driver needs only two bulk-capable endpoints, so
+ it can work on top of most device-side usb controllers. It's
+ useful for testing, and is also a working example showing how
+ USB "gadget drivers" can be written.
+
+ Make this be the first driver you try using on top of any new
+ USB peripheral controller driver. Then you can use host-side
+ test software, like the "usbtest" driver, to put your hardware
+ and its driver through a basic set of functional tests.
+
+ Gadget Zero also works with the host-side "usb-skeleton" driver,
+ and with many kinds of host-side test software. You may need
+ to tweak product and vendor IDs before host software knows about
+ this device, and arrange to select an appropriate configuration.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "g_zero".
+
+config USB_ZERO_HNPTEST
+ boolean "HNP Test Device"
+ depends on USB_ZERO && USB_OTG
+ help
+ You can configure this device to enumerate using the device
+ identifiers of the USB-OTG test device. That means that when
+ this gadget connects to another OTG device, with this one using
+ the "B-Peripheral" role, that device will use HNP to let this
+ one serve as the USB host instead (in the "B-Host" role).
+
+config USB_ETH
+ tristate "Ethernet Gadget (with CDC Ethernet support)"
+ depends on NET
+ help
+ This driver implements Ethernet style communication, in either
+ of two ways:
+
+ - The "Communication Device Class" (CDC) Ethernet Control Model.
+ That protocol is often avoided with pure Ethernet adapters, in
+ favor of simpler vendor-specific hardware, but is widely
+ supported by firmware for smart network devices.
+
+ - On hardware can't implement that protocol, a simple CDC subset
+ is used, placing fewer demands on USB.
+
+ RNDIS support is a third option, more demanding than that subset.
+
+ Within the USB device, this gadget driver exposes a network device
+ "usbX", where X depends on what other networking devices you have.
+ Treat it like a two-node Ethernet link: host, and gadget.
+
+ The Linux-USB host-side "usbnet" driver interoperates with this
+ driver, so that deep I/O queues can be supported. On 2.4 kernels,
+ use "CDCEther" instead, if you're using the CDC option. That CDC
+ mode should also interoperate with standard CDC Ethernet class
+ drivers on other host operating systems.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "g_ether".
+
+config USB_ETH_RNDIS
+ bool "RNDIS support (EXPERIMENTAL)"
+ depends on USB_ETH && EXPERIMENTAL
+ default y
+ help
+ Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
+ and Microsoft provides redistributable binary RNDIS drivers for
+ older versions of Windows.
+
+ If you say "y" here, the Ethernet gadget driver will try to provide
+ a second device configuration, supporting RNDIS to talk to such
+ Microsoft USB hosts.
+
+ To make MS-Windows work with this, use Documentation/usb/linux.inf
+ as the "driver info file". For versions of MS-Windows older than
+ XP, you'll need to download drivers from Microsoft's website; a URL
+ is given in comments found in that info file.
+
+config USB_GADGETFS
+ tristate "Gadget Filesystem (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ This driver provides a filesystem based API that lets user mode
+ programs implement a single-configuration USB device, including
+ endpoint I/O and control requests that don't relate to enumeration.
+ All endpoints, transfer speeds, and transfer types supported by
+ the hardware are available, through read() and write() calls.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "gadgetfs".
+
+config USB_FILE_STORAGE
+ tristate "File-backed Storage Gadget"
+ help
+ The File-backed Storage Gadget acts as a USB Mass Storage
+ disk drive. As its storage repository it can use a regular
+ file or a block device (in much the same way as the "loop"
+ device driver), specified as a module parameter.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "g_file_storage".
+
+config USB_FILE_STORAGE_TEST
+ bool "File-backed Storage Gadget testing version"
+ depends on USB_FILE_STORAGE
+ default n
+ help
+ Say "y" to generate the larger testing version of the
+ File-backed Storage Gadget, useful for probing the
+ behavior of USB Mass Storage hosts. Not needed for
+ normal operation.
+
+config USB_G_SERIAL
+ tristate "Serial Gadget (with CDC ACM support)"
+ help
+ The Serial Gadget talks to the Linux-USB generic serial driver.
+ This driver supports a CDC-ACM module option, which can be used
+ to interoperate with MS-Windows hosts or with the Linux-USB
+ "cdc-acm" driver.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "g_serial".
+
+ For more information, see Documentation/usb/gadget_serial.txt
+ which includes instructions and a "driver info file" needed to
+ make MS-Windows work with this driver.
+
+
+# put drivers that need isochronous transfer support (for audio
+# or video class gadget drivers), or specific hardware, here.
+
+# - none yet
+
+endchoice
+
+endmenu
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
new file mode 100644
index 000000000000..d5fd04d886e6
--- /dev/null
+++ b/drivers/usb/gadget/Makefile
@@ -0,0 +1,30 @@
+#
+# USB peripheral controller drivers
+#
+obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o
+obj-$(CONFIG_USB_NET2280) += net2280.o
+obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o
+obj-$(CONFIG_USB_GOKU) += goku_udc.o
+obj-$(CONFIG_USB_OMAP) += omap_udc.o
+obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o
+
+#
+# USB gadget drivers
+#
+g_zero-objs := zero.o usbstring.o config.o epautoconf.o
+g_ether-objs := ether.o usbstring.o config.o epautoconf.o
+g_serial-objs := serial.o usbstring.o config.o epautoconf.o
+gadgetfs-objs := inode.o
+g_file_storage-objs := file_storage.o usbstring.o config.o \
+ epautoconf.o
+
+ifeq ($(CONFIG_USB_ETH_RNDIS),y)
+ g_ether-objs += rndis.o
+endif
+
+obj-$(CONFIG_USB_ZERO) += g_zero.o
+obj-$(CONFIG_USB_ETH) += g_ether.o
+obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o
+obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o
+obj-$(CONFIG_USB_G_SERIAL) += g_serial.o
+
diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
new file mode 100644
index 000000000000..83b4866df9af
--- /dev/null
+++ b/drivers/usb/gadget/config.c
@@ -0,0 +1,117 @@
+/*
+ * usb/gadget/config.c -- simplify building config descriptors
+ *
+ * Copyright (C) 2003 David Brownell
+ *
+ * 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 <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/string.h>
+#include <linux/device.h>
+
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+
+
+/**
+ * usb_descriptor_fillbuf - fill buffer with descriptors
+ * @buf: Buffer to be filled
+ * @buflen: Size of buf
+ * @src: Array of descriptor pointers, terminated by null pointer.
+ *
+ * Copies descriptors into the buffer, returning the length or a
+ * negative error code if they can't all be copied. Useful when
+ * assembling descriptors for an associated set of interfaces used
+ * as part of configuring a composite device; or in other cases where
+ * sets of descriptors need to be marshaled.
+ */
+int
+usb_descriptor_fillbuf(void *buf, unsigned buflen,
+ const struct usb_descriptor_header **src)
+{
+ u8 *dest = buf;
+
+ if (!src)
+ return -EINVAL;
+
+ /* fill buffer from src[] until null descriptor ptr */
+ for (; 0 != *src; src++) {
+ unsigned len = (*src)->bLength;
+
+ if (len > buflen)
+ return -EINVAL;
+ memcpy(dest, *src, len);
+ buflen -= len;
+ dest += len;
+ }
+ return dest - (u8 *)buf;
+}
+
+
+/**
+ * usb_gadget_config_buf - builts a complete configuration descriptor
+ * @config: Header for the descriptor, including characteristics such
+ * as power requirements and number of interfaces.
+ * @desc: Null-terminated vector of pointers to the descriptors (interface,
+ * endpoint, etc) defining all functions in this device configuration.
+ * @buf: Buffer for the resulting configuration descriptor.
+ * @length: Length of buffer. If this is not big enough to hold the
+ * entire configuration descriptor, an error code will be returned.
+ *
+ * This copies descriptors into the response buffer, building a descriptor
+ * for that configuration. It returns the buffer length or a negative
+ * status code. The config.wTotalLength field is set to match the length
+ * of the result, but other descriptor fields (including power usage and
+ * interface count) must be set by the caller.
+ *
+ * Gadget drivers could use this when constructing a config descriptor
+ * in response to USB_REQ_GET_DESCRIPTOR. They will need to patch the
+ * resulting bDescriptorType value if USB_DT_OTHER_SPEED_CONFIG is needed.
+ */
+int usb_gadget_config_buf(
+ const struct usb_config_descriptor *config,
+ void *buf,
+ unsigned length,
+ const struct usb_descriptor_header **desc
+)
+{
+ struct usb_config_descriptor *cp = buf;
+ int len;
+
+ /* config descriptor first */
+ if (length < USB_DT_CONFIG_SIZE || !desc)
+ return -EINVAL;
+ *cp = *config;
+
+ /* then interface/endpoint/class/vendor/... */
+ len = usb_descriptor_fillbuf(USB_DT_CONFIG_SIZE + (u8*)buf,
+ length - USB_DT_CONFIG_SIZE, desc);
+ if (len < 0)
+ return len;
+ len += USB_DT_CONFIG_SIZE;
+ if (len > 0xffff)
+ return -EINVAL;
+
+ /* patch up the config descriptor */
+ cp->bLength = USB_DT_CONFIG_SIZE;
+ cp->bDescriptorType = USB_DT_CONFIG;
+ cp->wTotalLength = cpu_to_le16(len);
+ cp->bmAttributes |= USB_CONFIG_ATT_ONE;
+ return len;
+}
+
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
new file mode 100644
index 000000000000..8ef8a9cd9ac4
--- /dev/null
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -0,0 +1,1793 @@
+/*
+ * dummy_hcd.c -- Dummy/Loopback USB host and device emulator driver.
+ *
+ * Maintainer: Alan Stern <stern@rowland.harvard.edu>
+ *
+ * Copyright (C) 2003 David Brownell
+ * Copyright (C) 2003-2005 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 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
+ */
+
+
+/*
+ * This exposes a device side "USB gadget" API, driven by requests to a
+ * Linux-USB host controller driver. USB traffic is simulated; there's
+ * no need for USB hardware. Use this with two other drivers:
+ *
+ * - Gadget driver, responding to requests (slave);
+ * - Host-side device driver, as already familiar in Linux.
+ *
+ * Having this all in one kernel can help some stages of development,
+ * bypassing some hardware (and driver) issues. UML could help too.
+ */
+
+#define DEBUG
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/version.h>
+
+#include <linux/usb.h>
+#include <linux/usb_gadget.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+
+
+#include "../core/hcd.h"
+
+
+#define DRIVER_DESC "USB Host+Gadget Emulator"
+#define DRIVER_VERSION "17 Dec 2004"
+
+static const char driver_name [] = "dummy_hcd";
+static const char driver_desc [] = "USB Host+Gadget Emulator";
+
+static const char gadget_name [] = "dummy_udc";
+
+MODULE_DESCRIPTION (DRIVER_DESC);
+MODULE_AUTHOR ("David Brownell");
+MODULE_LICENSE ("GPL");
+
+/*-------------------------------------------------------------------------*/
+
+/* gadget side driver data structres */
+struct dummy_ep {
+ struct list_head queue;
+ unsigned long last_io; /* jiffies timestamp */
+ struct usb_gadget *gadget;
+ const struct usb_endpoint_descriptor *desc;
+ struct usb_ep ep;
+ unsigned halted : 1;
+ unsigned already_seen : 1;
+ unsigned setup_stage : 1;
+};
+
+struct dummy_request {
+ struct list_head queue; /* ep's requests */
+ struct usb_request req;
+};
+
+static inline struct dummy_ep *usb_ep_to_dummy_ep (struct usb_ep *_ep)
+{
+ return container_of (_ep, struct dummy_ep, ep);
+}
+
+static inline struct dummy_request *usb_request_to_dummy_request
+ (struct usb_request *_req)
+{
+ return container_of (_req, struct dummy_request, req);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Every device has ep0 for control requests, plus up to 30 more endpoints,
+ * in one of two types:
+ *
+ * - Configurable: direction (in/out), type (bulk, iso, etc), and endpoint
+ * number can be changed. Names like "ep-a" are used for this type.
+ *
+ * - Fixed Function: in other cases. some characteristics may be mutable;
+ * that'd be hardware-specific. Names like "ep12out-bulk" are used.
+ *
+ * Gadget drivers are responsible for not setting up conflicting endpoint
+ * configurations, illegal or unsupported packet lengths, and so on.
+ */
+
+static const char ep0name [] = "ep0";
+
+static const char *const ep_name [] = {
+ ep0name, /* everyone has ep0 */
+
+ /* act like a net2280: high speed, six configurable endpoints */
+ "ep-a", "ep-b", "ep-c", "ep-d", "ep-e", "ep-f",
+
+ /* or like pxa250: fifteen fixed function endpoints */
+ "ep1in-bulk", "ep2out-bulk", "ep3in-iso", "ep4out-iso", "ep5in-int",
+ "ep6in-bulk", "ep7out-bulk", "ep8in-iso", "ep9out-iso", "ep10in-int",
+ "ep11in-bulk", "ep12out-bulk", "ep13in-iso", "ep14out-iso",
+ "ep15in-int",
+
+ /* or like sa1100: two fixed function endpoints */
+ "ep1out-bulk", "ep2in-bulk",
+};
+#define DUMMY_ENDPOINTS (sizeof(ep_name)/sizeof(char *))
+
+#define FIFO_SIZE 64
+
+struct urbp {
+ struct urb *urb;
+ struct list_head urbp_list;
+};
+
+struct dummy {
+ spinlock_t lock;
+
+ /*
+ * SLAVE/GADGET side support
+ */
+ struct dummy_ep ep [DUMMY_ENDPOINTS];
+ int address;
+ struct usb_gadget gadget;
+ struct usb_gadget_driver *driver;
+ struct dummy_request fifo_req;
+ u8 fifo_buf [FIFO_SIZE];
+ u16 devstatus;
+
+ /*
+ * MASTER/HOST side support
+ */
+ struct timer_list timer;
+ u32 port_status;
+ unsigned resuming:1;
+ unsigned long re_timeout;
+
+ struct usb_device *udev;
+ struct list_head urbp_list;
+};
+
+static inline struct dummy *hcd_to_dummy (struct usb_hcd *hcd)
+{
+ return (struct dummy *) (hcd->hcd_priv);
+}
+
+static inline struct usb_hcd *dummy_to_hcd (struct dummy *dum)
+{
+ return container_of((void *) dum, struct usb_hcd, hcd_priv);
+}
+
+static inline struct device *dummy_dev (struct dummy *dum)
+{
+ return dummy_to_hcd(dum)->self.controller;
+}
+
+static inline struct dummy *ep_to_dummy (struct dummy_ep *ep)
+{
+ return container_of (ep->gadget, struct dummy, gadget);
+}
+
+static inline struct dummy *gadget_to_dummy (struct usb_gadget *gadget)
+{
+ return container_of (gadget, struct dummy, gadget);
+}
+
+static inline struct dummy *gadget_dev_to_dummy (struct device *dev)
+{
+ return container_of (dev, struct dummy, gadget.dev);
+}
+
+static struct dummy *the_controller;
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * This "hardware" may look a bit odd in diagnostics since it's got both
+ * host and device sides; and it binds different drivers to each side.
+ */
+static struct platform_device the_pdev;
+
+static struct device_driver dummy_driver = {
+ .name = (char *) driver_name,
+ .bus = &platform_bus_type,
+};
+
+/*-------------------------------------------------------------------------*/
+
+/* SLAVE/GADGET SIDE DRIVER
+ *
+ * This only tracks gadget state. All the work is done when the host
+ * side tries some (emulated) i/o operation. Real device controller
+ * drivers would do real i/o using dma, fifos, irqs, timers, etc.
+ */
+
+#define is_enabled(dum) \
+ (dum->port_status & USB_PORT_STAT_ENABLE)
+
+static int
+dummy_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
+{
+ struct dummy *dum;
+ struct dummy_ep *ep;
+ unsigned max;
+ int retval;
+
+ ep = usb_ep_to_dummy_ep (_ep);
+ if (!_ep || !desc || ep->desc || _ep->name == ep0name
+ || desc->bDescriptorType != USB_DT_ENDPOINT)
+ return -EINVAL;
+ dum = ep_to_dummy (ep);
+ if (!dum->driver || !is_enabled (dum))
+ return -ESHUTDOWN;
+ max = le16_to_cpu(desc->wMaxPacketSize) & 0x3ff;
+
+ /* drivers must not request bad settings, since lower levels
+ * (hardware or its drivers) may not check. some endpoints
+ * can't do iso, many have maxpacket limitations, etc.
+ *
+ * since this "hardware" driver is here to help debugging, we
+ * have some extra sanity checks. (there could be more though,
+ * especially for "ep9out" style fixed function ones.)
+ */
+ retval = -EINVAL;
+ switch (desc->bmAttributes & 0x03) {
+ case USB_ENDPOINT_XFER_BULK:
+ if (strstr (ep->ep.name, "-iso")
+ || strstr (ep->ep.name, "-int")) {
+ goto done;
+ }
+ switch (dum->gadget.speed) {
+ case USB_SPEED_HIGH:
+ if (max == 512)
+ break;
+ /* conserve return statements */
+ default:
+ switch (max) {
+ case 8: case 16: case 32: case 64:
+ /* we'll fake any legal size */
+ break;
+ default:
+ case USB_SPEED_LOW:
+ goto done;
+ }
+ }
+ break;
+ case USB_ENDPOINT_XFER_INT:
+ if (strstr (ep->ep.name, "-iso")) /* bulk is ok */
+ goto done;
+ /* real hardware might not handle all packet sizes */
+ switch (dum->gadget.speed) {
+ case USB_SPEED_HIGH:
+ if (max <= 1024)
+ break;
+ /* save a return statement */
+ case USB_SPEED_FULL:
+ if (max <= 64)
+ break;
+ /* save a return statement */
+ default:
+ if (max <= 8)
+ break;
+ goto done;
+ }
+ break;
+ case USB_ENDPOINT_XFER_ISOC:
+ if (strstr (ep->ep.name, "-bulk")
+ || strstr (ep->ep.name, "-int"))
+ goto done;
+ /* real hardware might not handle all packet sizes */
+ switch (dum->gadget.speed) {
+ case USB_SPEED_HIGH:
+ if (max <= 1024)
+ break;
+ /* save a return statement */
+ case USB_SPEED_FULL:
+ if (max <= 1023)
+ break;
+ /* save a return statement */
+ default:
+ goto done;
+ }
+ break;
+ default:
+ /* few chips support control except on ep0 */
+ goto done;
+ }
+
+ _ep->maxpacket = max;
+ ep->desc = desc;
+
+ dev_dbg (dummy_dev(dum), "enabled %s (ep%d%s-%s) maxpacket %d\n",
+ _ep->name,
+ desc->bEndpointAddress & 0x0f,
+ (desc->bEndpointAddress & USB_DIR_IN) ? "in" : "out",
+ ({ char *val;
+ switch (desc->bmAttributes & 0x03) {
+ case USB_ENDPOINT_XFER_BULK: val = "bulk"; break;
+ case USB_ENDPOINT_XFER_ISOC: val = "iso"; break;
+ case USB_ENDPOINT_XFER_INT: val = "intr"; break;
+ default: val = "ctrl"; break;
+ }; val; }),
+ max);
+
+ /* at this point real hardware should be NAKing transfers
+ * to that endpoint, until a buffer is queued to it.
+ */
+ retval = 0;
+done:
+ return retval;
+}
+
+/* called with spinlock held */
+static void nuke (struct dummy *dum, struct dummy_ep *ep)
+{
+ while (!list_empty (&ep->queue)) {
+ struct dummy_request *req;
+
+ req = list_entry (ep->queue.next, struct dummy_request, queue);
+ list_del_init (&req->queue);
+ req->req.status = -ESHUTDOWN;
+
+ spin_unlock (&dum->lock);
+ req->req.complete (&ep->ep, &req->req);
+ spin_lock (&dum->lock);
+ }
+}
+
+static int dummy_disable (struct usb_ep *_ep)
+{
+ struct dummy_ep *ep;
+ struct dummy *dum;
+ unsigned long flags;
+ int retval;
+
+ ep = usb_ep_to_dummy_ep (_ep);
+ if (!_ep || !ep->desc || _ep->name == ep0name)
+ return -EINVAL;
+ dum = ep_to_dummy (ep);
+
+ spin_lock_irqsave (&dum->lock, flags);
+ ep->desc = NULL;
+ retval = 0;
+ nuke (dum, ep);
+ spin_unlock_irqrestore (&dum->lock, flags);
+
+ dev_dbg (dummy_dev(dum), "disabled %s\n", _ep->name);
+ return retval;
+}
+
+static struct usb_request *
+dummy_alloc_request (struct usb_ep *_ep, int mem_flags)
+{
+ struct dummy_ep *ep;
+ struct dummy_request *req;
+
+ if (!_ep)
+ return NULL;
+ ep = usb_ep_to_dummy_ep (_ep);
+
+ req = kmalloc (sizeof *req, mem_flags);
+ if (!req)
+ return NULL;
+ memset (req, 0, sizeof *req);
+ INIT_LIST_HEAD (&req->queue);
+ return &req->req;
+}
+
+static void
+dummy_free_request (struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct dummy_ep *ep;
+ struct dummy_request *req;
+
+ ep = usb_ep_to_dummy_ep (_ep);
+ if (!ep || !_req || (!ep->desc && _ep->name != ep0name))
+ return;
+
+ req = usb_request_to_dummy_request (_req);
+ WARN_ON (!list_empty (&req->queue));
+ kfree (req);
+}
+
+static void *
+dummy_alloc_buffer (
+ struct usb_ep *_ep,
+ unsigned bytes,
+ dma_addr_t *dma,
+ int mem_flags
+) {
+ char *retval;
+ struct dummy_ep *ep;
+ struct dummy *dum;
+
+ ep = usb_ep_to_dummy_ep (_ep);
+ dum = ep_to_dummy (ep);
+
+ if (!dum->driver)
+ return NULL;
+ retval = kmalloc (bytes, mem_flags);
+ *dma = (dma_addr_t) retval;
+ return retval;
+}
+
+static void
+dummy_free_buffer (
+ struct usb_ep *_ep,
+ void *buf,
+ dma_addr_t dma,
+ unsigned bytes
+) {
+ if (bytes)
+ kfree (buf);
+}
+
+static void
+fifo_complete (struct usb_ep *ep, struct usb_request *req)
+{
+}
+
+static int
+dummy_queue (struct usb_ep *_ep, struct usb_request *_req, int mem_flags)
+{
+ struct dummy_ep *ep;
+ struct dummy_request *req;
+ struct dummy *dum;
+ unsigned long flags;
+
+ req = usb_request_to_dummy_request (_req);
+ if (!_req || !list_empty (&req->queue) || !_req->complete)
+ return -EINVAL;
+
+ ep = usb_ep_to_dummy_ep (_ep);
+ if (!_ep || (!ep->desc && _ep->name != ep0name))
+ return -EINVAL;
+
+ dum = ep_to_dummy (ep);
+ if (!dum->driver || !is_enabled (dum))
+ return -ESHUTDOWN;
+
+#if 0
+ dev_dbg (dummy_dev(dum), "ep %p queue req %p to %s, len %d buf %p\n",
+ ep, _req, _ep->name, _req->length, _req->buf);
+#endif
+
+ _req->status = -EINPROGRESS;
+ _req->actual = 0;
+ spin_lock_irqsave (&dum->lock, flags);
+
+ /* implement an emulated single-request FIFO */
+ if (ep->desc && (ep->desc->bEndpointAddress & USB_DIR_IN) &&
+ list_empty (&dum->fifo_req.queue) &&
+ list_empty (&ep->queue) &&
+ _req->length <= FIFO_SIZE) {
+ req = &dum->fifo_req;
+ req->req = *_req;
+ req->req.buf = dum->fifo_buf;
+ memcpy (dum->fifo_buf, _req->buf, _req->length);
+ req->req.context = dum;
+ req->req.complete = fifo_complete;
+
+ spin_unlock (&dum->lock);
+ _req->actual = _req->length;
+ _req->status = 0;
+ _req->complete (_ep, _req);
+ spin_lock (&dum->lock);
+ }
+ list_add_tail (&req->queue, &ep->queue);
+ spin_unlock_irqrestore (&dum->lock, flags);
+
+ /* real hardware would likely enable transfers here, in case
+ * it'd been left NAKing.
+ */
+ return 0;
+}
+
+static int dummy_dequeue (struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct dummy_ep *ep;
+ struct dummy *dum;
+ int retval = -EINVAL;
+ unsigned long flags;
+ struct dummy_request *req = NULL;
+
+ if (!_ep || !_req)
+ return retval;
+ ep = usb_ep_to_dummy_ep (_ep);
+ dum = ep_to_dummy (ep);
+
+ if (!dum->driver)
+ return -ESHUTDOWN;
+
+ spin_lock_irqsave (&dum->lock, flags);
+ list_for_each_entry (req, &ep->queue, queue) {
+ if (&req->req == _req) {
+ list_del_init (&req->queue);
+ _req->status = -ECONNRESET;
+ retval = 0;
+ break;
+ }
+ }
+ spin_unlock_irqrestore (&dum->lock, flags);
+
+ if (retval == 0) {
+ dev_dbg (dummy_dev(dum),
+ "dequeued req %p from %s, len %d buf %p\n",
+ req, _ep->name, _req->length, _req->buf);
+ _req->complete (_ep, _req);
+ }
+ return retval;
+}
+
+static int
+dummy_set_halt (struct usb_ep *_ep, int value)
+{
+ struct dummy_ep *ep;
+ struct dummy *dum;
+
+ if (!_ep)
+ return -EINVAL;
+ ep = usb_ep_to_dummy_ep (_ep);
+ dum = ep_to_dummy (ep);
+ if (!dum->driver)
+ return -ESHUTDOWN;
+ if (!value)
+ ep->halted = 0;
+ else if (ep->desc && (ep->desc->bEndpointAddress & USB_DIR_IN) &&
+ !list_empty (&ep->queue))
+ return -EAGAIN;
+ else
+ ep->halted = 1;
+ /* FIXME clear emulated data toggle too */
+ return 0;
+}
+
+static const struct usb_ep_ops dummy_ep_ops = {
+ .enable = dummy_enable,
+ .disable = dummy_disable,
+
+ .alloc_request = dummy_alloc_request,
+ .free_request = dummy_free_request,
+
+ .alloc_buffer = dummy_alloc_buffer,
+ .free_buffer = dummy_free_buffer,
+ /* map, unmap, ... eventually hook the "generic" dma calls */
+
+ .queue = dummy_queue,
+ .dequeue = dummy_dequeue,
+
+ .set_halt = dummy_set_halt,
+};
+
+/*-------------------------------------------------------------------------*/
+
+/* there are both host and device side versions of this call ... */
+static int dummy_g_get_frame (struct usb_gadget *_gadget)
+{
+ struct timeval tv;
+
+ do_gettimeofday (&tv);
+ return tv.tv_usec / 1000;
+}
+
+static int dummy_wakeup (struct usb_gadget *_gadget)
+{
+ struct dummy *dum;
+
+ dum = gadget_to_dummy (_gadget);
+ if ((dum->devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) == 0
+ || !(dum->port_status & (1 << USB_PORT_FEAT_SUSPEND)))
+ return -EINVAL;
+
+ /* hub notices our request, issues downstream resume, etc */
+ dum->resuming = 1;
+ dum->port_status |= (1 << USB_PORT_FEAT_C_SUSPEND);
+ return 0;
+}
+
+static int dummy_set_selfpowered (struct usb_gadget *_gadget, int value)
+{
+ struct dummy *dum;
+
+ dum = gadget_to_dummy (_gadget);
+ if (value)
+ dum->devstatus |= (1 << USB_DEVICE_SELF_POWERED);
+ else
+ dum->devstatus &= ~(1 << USB_DEVICE_SELF_POWERED);
+ return 0;
+}
+
+static const struct usb_gadget_ops dummy_ops = {
+ .get_frame = dummy_g_get_frame,
+ .wakeup = dummy_wakeup,
+ .set_selfpowered = dummy_set_selfpowered,
+};
+
+/*-------------------------------------------------------------------------*/
+
+/* "function" sysfs attribute */
+static ssize_t
+show_function (struct device *dev, char *buf)
+{
+ struct dummy *dum = gadget_dev_to_dummy (dev);
+
+ if (!dum->driver || !dum->driver->function)
+ return 0;
+ return scnprintf (buf, PAGE_SIZE, "%s\n", dum->driver->function);
+}
+DEVICE_ATTR (function, S_IRUGO, show_function, NULL);
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Driver registration/unregistration.
+ *
+ * This is basically hardware-specific; there's usually only one real USB
+ * device (not host) controller since that's how USB devices are intended
+ * to work. So most implementations of these api calls will rely on the
+ * fact that only one driver will ever bind to the hardware. But curious
+ * hardware can be built with discrete components, so the gadget API doesn't
+ * require that assumption.
+ *
+ * For this emulator, it might be convenient to create a usb slave device
+ * for each driver that registers: just add to a big root hub.
+ */
+
+static void
+dummy_udc_release (struct device *dev)
+{
+}
+
+static void
+dummy_pdev_release (struct device *dev)
+{
+}
+
+static int
+dummy_register_udc (struct dummy *dum)
+{
+ int rc;
+
+ strcpy (dum->gadget.dev.bus_id, "udc");
+ dum->gadget.dev.parent = dummy_dev(dum);
+ dum->gadget.dev.release = dummy_udc_release;
+
+ rc = device_register (&dum->gadget.dev);
+ if (rc == 0)
+ device_create_file (&dum->gadget.dev, &dev_attr_function);
+ return rc;
+}
+
+static void
+dummy_unregister_udc (struct dummy *dum)
+{
+ device_remove_file (&dum->gadget.dev, &dev_attr_function);
+ device_unregister (&dum->gadget.dev);
+}
+
+int
+usb_gadget_register_driver (struct usb_gadget_driver *driver)
+{
+ struct dummy *dum = the_controller;
+ int retval, i;
+
+ if (!dum)
+ return -EINVAL;
+ if (dum->driver)
+ return -EBUSY;
+ if (!driver->bind || !driver->unbind || !driver->setup
+ || driver->speed == USB_SPEED_UNKNOWN)
+ return -EINVAL;
+
+ /*
+ * SLAVE side init ... the layer above hardware, which
+ * can't enumerate without help from the driver we're binding.
+ */
+ dum->gadget.name = gadget_name;
+ dum->gadget.ops = &dummy_ops;
+ dum->gadget.is_dualspeed = 1;
+
+ dum->devstatus = 0;
+ dum->resuming = 0;
+
+ INIT_LIST_HEAD (&dum->gadget.ep_list);
+ for (i = 0; i < DUMMY_ENDPOINTS; i++) {
+ struct dummy_ep *ep = &dum->ep [i];
+
+ if (!ep_name [i])
+ break;
+ ep->ep.name = ep_name [i];
+ ep->ep.ops = &dummy_ep_ops;
+ list_add_tail (&ep->ep.ep_list, &dum->gadget.ep_list);
+ ep->halted = ep->already_seen = ep->setup_stage = 0;
+ ep->ep.maxpacket = ~0;
+ ep->last_io = jiffies;
+ ep->gadget = &dum->gadget;
+ ep->desc = NULL;
+ INIT_LIST_HEAD (&ep->queue);
+ }
+
+ dum->gadget.ep0 = &dum->ep [0].ep;
+ dum->ep [0].ep.maxpacket = 64;
+ list_del_init (&dum->ep [0].ep.ep_list);
+ INIT_LIST_HEAD(&dum->fifo_req.queue);
+
+ dum->driver = driver;
+ dum->gadget.dev.driver = &driver->driver;
+ dev_dbg (dummy_dev(dum), "binding gadget driver '%s'\n",
+ driver->driver.name);
+ if ((retval = driver->bind (&dum->gadget)) != 0) {
+ dum->driver = NULL;
+ dum->gadget.dev.driver = NULL;
+ return retval;
+ }
+
+ // FIXME: Check these calls for errors and re-order
+ driver->driver.bus = dum->gadget.dev.parent->bus;
+ driver_register (&driver->driver);
+
+ device_bind_driver (&dum->gadget.dev);
+
+ /* khubd will enumerate this in a while */
+ dum->port_status |= USB_PORT_STAT_CONNECTION
+ | (1 << USB_PORT_FEAT_C_CONNECTION);
+ return 0;
+}
+EXPORT_SYMBOL (usb_gadget_register_driver);
+
+/* caller must hold lock */
+static void
+stop_activity (struct dummy *dum, struct usb_gadget_driver *driver)
+{
+ struct dummy_ep *ep;
+
+ /* prevent any more requests */
+ dum->address = 0;
+
+ /* The timer is left running so that outstanding URBs can fail */
+
+ /* nuke any pending requests first, so driver i/o is quiesced */
+ list_for_each_entry (ep, &dum->gadget.ep_list, ep.ep_list)
+ nuke (dum, ep);
+
+ /* driver now does any non-usb quiescing necessary */
+ if (driver) {
+ spin_unlock (&dum->lock);
+ driver->disconnect (&dum->gadget);
+ spin_lock (&dum->lock);
+ }
+}
+
+int
+usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
+{
+ struct dummy *dum = the_controller;
+ unsigned long flags;
+
+ if (!dum)
+ return -ENODEV;
+ if (!driver || driver != dum->driver)
+ return -EINVAL;
+
+ dev_dbg (dummy_dev(dum), "unregister gadget driver '%s'\n",
+ driver->driver.name);
+
+ spin_lock_irqsave (&dum->lock, flags);
+ stop_activity (dum, driver);
+ dum->port_status &= ~(USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE |
+ USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED);
+ dum->port_status |= (1 << USB_PORT_FEAT_C_CONNECTION);
+ spin_unlock_irqrestore (&dum->lock, flags);
+
+ driver->unbind (&dum->gadget);
+ dum->driver = NULL;
+
+ device_release_driver (&dum->gadget.dev);
+
+ driver_unregister (&driver->driver);
+
+ return 0;
+}
+EXPORT_SYMBOL (usb_gadget_unregister_driver);
+
+#undef is_enabled
+
+int net2280_set_fifo_mode (struct usb_gadget *gadget, int mode)
+{
+ return -ENOSYS;
+}
+EXPORT_SYMBOL (net2280_set_fifo_mode);
+
+/*-------------------------------------------------------------------------*/
+
+/* MASTER/HOST SIDE DRIVER
+ *
+ * this uses the hcd framework to hook up to host side drivers.
+ * its root hub will only have one device, otherwise it acts like
+ * a normal host controller.
+ *
+ * when urbs are queued, they're just stuck on a list that we
+ * scan in a timer callback. that callback connects writes from
+ * the host with reads from the device, and so on, based on the
+ * usb 2.0 rules.
+ */
+
+static int dummy_urb_enqueue (
+ struct usb_hcd *hcd,
+ struct usb_host_endpoint *ep,
+ struct urb *urb,
+ int mem_flags
+) {
+ struct dummy *dum;
+ struct urbp *urbp;
+ unsigned long flags;
+
+ if (!urb->transfer_buffer && urb->transfer_buffer_length)
+ return -EINVAL;
+
+ urbp = kmalloc (sizeof *urbp, mem_flags);
+ if (!urbp)
+ return -ENOMEM;
+ urbp->urb = urb;
+
+ dum = hcd_to_dummy (hcd);
+ spin_lock_irqsave (&dum->lock, flags);
+
+ if (!dum->udev) {
+ dum->udev = urb->dev;
+ usb_get_dev (dum->udev);
+ } else if (unlikely (dum->udev != urb->dev))
+ dev_err (dummy_dev(dum), "usb_device address has changed!\n");
+
+ list_add_tail (&urbp->urbp_list, &dum->urbp_list);
+ urb->hcpriv = urbp;
+ if (usb_pipetype (urb->pipe) == PIPE_CONTROL)
+ urb->error_count = 1; /* mark as a new urb */
+
+ /* kick the scheduler, it'll do the rest */
+ if (!timer_pending (&dum->timer))
+ mod_timer (&dum->timer, jiffies + 1);
+
+ spin_unlock_irqrestore (&dum->lock, flags);
+ return 0;
+}
+
+static int dummy_urb_dequeue (struct usb_hcd *hcd, struct urb *urb)
+{
+ /* giveback happens automatically in timer callback */
+ return 0;
+}
+
+static void maybe_set_status (struct urb *urb, int status)
+{
+ spin_lock (&urb->lock);
+ if (urb->status == -EINPROGRESS)
+ urb->status = status;
+ spin_unlock (&urb->lock);
+}
+
+/* transfer up to a frame's worth; caller must own lock */
+static int
+transfer (struct dummy *dum, struct urb *urb, struct dummy_ep *ep, int limit)
+{
+ struct dummy_request *req;
+
+top:
+ /* if there's no request queued, the device is NAKing; return */
+ list_for_each_entry (req, &ep->queue, queue) {
+ unsigned host_len, dev_len, len;
+ int is_short, to_host;
+ int rescan = 0;
+
+ /* 1..N packets of ep->ep.maxpacket each ... the last one
+ * may be short (including zero length).
+ *
+ * writer can send a zlp explicitly (length 0) or implicitly
+ * (length mod maxpacket zero, and 'zero' flag); they always
+ * terminate reads.
+ */
+ host_len = urb->transfer_buffer_length - urb->actual_length;
+ dev_len = req->req.length - req->req.actual;
+ len = min (host_len, dev_len);
+
+ /* FIXME update emulated data toggle too */
+
+ to_host = usb_pipein (urb->pipe);
+ if (unlikely (len == 0))
+ is_short = 1;
+ else {
+ char *ubuf, *rbuf;
+
+ /* not enough bandwidth left? */
+ if (limit < ep->ep.maxpacket && limit < len)
+ break;
+ len = min (len, (unsigned) limit);
+ if (len == 0)
+ break;
+
+ /* use an extra pass for the final short packet */
+ if (len > ep->ep.maxpacket) {
+ rescan = 1;
+ len -= (len % ep->ep.maxpacket);
+ }
+ is_short = (len % ep->ep.maxpacket) != 0;
+
+ /* else transfer packet(s) */
+ ubuf = urb->transfer_buffer + urb->actual_length;
+ rbuf = req->req.buf + req->req.actual;
+ if (to_host)
+ memcpy (ubuf, rbuf, len);
+ else
+ memcpy (rbuf, ubuf, len);
+ ep->last_io = jiffies;
+
+ limit -= len;
+ urb->actual_length += len;
+ req->req.actual += len;
+ }
+
+ /* short packets terminate, maybe with overflow/underflow.
+ * it's only really an error to write too much.
+ *
+ * partially filling a buffer optionally blocks queue advances
+ * (so completion handlers can clean up the queue) but we don't
+ * need to emulate such data-in-flight. so we only show part
+ * of the URB_SHORT_NOT_OK effect: completion status.
+ */
+ if (is_short) {
+ if (host_len == dev_len) {
+ req->req.status = 0;
+ maybe_set_status (urb, 0);
+ } else if (to_host) {
+ req->req.status = 0;
+ if (dev_len > host_len)
+ maybe_set_status (urb, -EOVERFLOW);
+ else
+ maybe_set_status (urb,
+ (urb->transfer_flags
+ & URB_SHORT_NOT_OK)
+ ? -EREMOTEIO : 0);
+ } else if (!to_host) {
+ maybe_set_status (urb, 0);
+ if (host_len > dev_len)
+ req->req.status = -EOVERFLOW;
+ else
+ req->req.status = 0;
+ }
+
+ /* many requests terminate without a short packet */
+ } else {
+ if (req->req.length == req->req.actual
+ && !req->req.zero)
+ req->req.status = 0;
+ if (urb->transfer_buffer_length == urb->actual_length
+ && !(urb->transfer_flags
+ & URB_ZERO_PACKET)) {
+ maybe_set_status (urb, 0);
+ }
+ }
+
+ /* device side completion --> continuable */
+ if (req->req.status != -EINPROGRESS) {
+ list_del_init (&req->queue);
+
+ spin_unlock (&dum->lock);
+ req->req.complete (&ep->ep, &req->req);
+ spin_lock (&dum->lock);
+
+ /* requests might have been unlinked... */
+ rescan = 1;
+ }
+
+ /* host side completion --> terminate */
+ if (urb->status != -EINPROGRESS)
+ break;
+
+ /* rescan to continue with any other queued i/o */
+ if (rescan)
+ goto top;
+ }
+ return limit;
+}
+
+static int periodic_bytes (struct dummy *dum, struct dummy_ep *ep)
+{
+ int limit = ep->ep.maxpacket;
+
+ if (dum->gadget.speed == USB_SPEED_HIGH) {
+ int tmp;
+
+ /* high bandwidth mode */
+ tmp = le16_to_cpu(ep->desc->wMaxPacketSize);
+ tmp = le16_to_cpu (tmp);
+ tmp = (tmp >> 11) & 0x03;
+ tmp *= 8 /* applies to entire frame */;
+ limit += limit * tmp;
+ }
+ return limit;
+}
+
+#define is_active(dum) ((dum->port_status & \
+ (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE | \
+ USB_PORT_STAT_SUSPEND)) \
+ == (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE))
+
+static struct dummy_ep *find_endpoint (struct dummy *dum, u8 address)
+{
+ int i;
+
+ if (!is_active (dum))
+ return NULL;
+ if ((address & ~USB_DIR_IN) == 0)
+ return &dum->ep [0];
+ for (i = 1; i < DUMMY_ENDPOINTS; i++) {
+ struct dummy_ep *ep = &dum->ep [i];
+
+ if (!ep->desc)
+ continue;
+ if (ep->desc->bEndpointAddress == address)
+ return ep;
+ }
+ return NULL;
+}
+
+#undef is_active
+
+#define Dev_Request (USB_TYPE_STANDARD | USB_RECIP_DEVICE)
+#define Dev_InRequest (Dev_Request | USB_DIR_IN)
+#define Intf_Request (USB_TYPE_STANDARD | USB_RECIP_INTERFACE)
+#define Intf_InRequest (Intf_Request | USB_DIR_IN)
+#define Ep_Request (USB_TYPE_STANDARD | USB_RECIP_ENDPOINT)
+#define Ep_InRequest (Ep_Request | USB_DIR_IN)
+
+/* drive both sides of the transfers; looks like irq handlers to
+ * both drivers except the callbacks aren't in_irq().
+ */
+static void dummy_timer (unsigned long _dum)
+{
+ struct dummy *dum = (struct dummy *) _dum;
+ struct urbp *urbp, *tmp;
+ unsigned long flags;
+ int limit, total;
+ int i;
+
+ /* simplistic model for one frame's bandwidth */
+ switch (dum->gadget.speed) {
+ case USB_SPEED_LOW:
+ total = 8/*bytes*/ * 12/*packets*/;
+ break;
+ case USB_SPEED_FULL:
+ total = 64/*bytes*/ * 19/*packets*/;
+ break;
+ case USB_SPEED_HIGH:
+ total = 512/*bytes*/ * 13/*packets*/ * 8/*uframes*/;
+ break;
+ default:
+ dev_err (dummy_dev(dum), "bogus device speed\n");
+ return;
+ }
+
+ /* FIXME if HZ != 1000 this will probably misbehave ... */
+
+ /* look at each urb queued by the host side driver */
+ spin_lock_irqsave (&dum->lock, flags);
+
+ if (!dum->udev) {
+ dev_err (dummy_dev(dum),
+ "timer fired with no URBs pending?\n");
+ spin_unlock_irqrestore (&dum->lock, flags);
+ return;
+ }
+
+ for (i = 0; i < DUMMY_ENDPOINTS; i++) {
+ if (!ep_name [i])
+ break;
+ dum->ep [i].already_seen = 0;
+ }
+
+restart:
+ list_for_each_entry_safe (urbp, tmp, &dum->urbp_list, urbp_list) {
+ struct urb *urb;
+ struct dummy_request *req;
+ u8 address;
+ struct dummy_ep *ep = NULL;
+ int type;
+
+ urb = urbp->urb;
+ if (urb->status != -EINPROGRESS) {
+ /* likely it was just unlinked */
+ goto return_urb;
+ }
+ type = usb_pipetype (urb->pipe);
+
+ /* used up this frame's non-periodic bandwidth?
+ * FIXME there's infinite bandwidth for control and
+ * periodic transfers ... unrealistic.
+ */
+ if (total <= 0 && type == PIPE_BULK)
+ continue;
+
+ /* find the gadget's ep for this request (if configured) */
+ address = usb_pipeendpoint (urb->pipe);
+ if (usb_pipein (urb->pipe))
+ address |= USB_DIR_IN;
+ ep = find_endpoint(dum, address);
+ if (!ep) {
+ /* set_configuration() disagreement */
+ dev_dbg (dummy_dev(dum),
+ "no ep configured for urb %p\n",
+ urb);
+ maybe_set_status (urb, -EPROTO);
+ goto return_urb;
+ }
+
+ if (ep->already_seen)
+ continue;
+ ep->already_seen = 1;
+ if (ep == &dum->ep [0] && urb->error_count) {
+ ep->setup_stage = 1; /* a new urb */
+ urb->error_count = 0;
+ }
+ if (ep->halted && !ep->setup_stage) {
+ /* NOTE: must not be iso! */
+ dev_dbg (dummy_dev(dum), "ep %s halted, urb %p\n",
+ ep->ep.name, urb);
+ maybe_set_status (urb, -EPIPE);
+ goto return_urb;
+ }
+ /* FIXME make sure both ends agree on maxpacket */
+
+ /* handle control requests */
+ if (ep == &dum->ep [0] && ep->setup_stage) {
+ struct usb_ctrlrequest setup;
+ int value = 1;
+ struct dummy_ep *ep2;
+
+ setup = *(struct usb_ctrlrequest*) urb->setup_packet;
+ le16_to_cpus (&setup.wIndex);
+ le16_to_cpus (&setup.wValue);
+ le16_to_cpus (&setup.wLength);
+ if (setup.wLength != urb->transfer_buffer_length) {
+ maybe_set_status (urb, -EOVERFLOW);
+ goto return_urb;
+ }
+
+ /* paranoia, in case of stale queued data */
+ list_for_each_entry (req, &ep->queue, queue) {
+ list_del_init (&req->queue);
+ req->req.status = -EOVERFLOW;
+ dev_dbg (dummy_dev(dum), "stale req = %p\n",
+ req);
+
+ spin_unlock (&dum->lock);
+ req->req.complete (&ep->ep, &req->req);
+ spin_lock (&dum->lock);
+ ep->already_seen = 0;
+ goto restart;
+ }
+
+ /* gadget driver never sees set_address or operations
+ * on standard feature flags. some hardware doesn't
+ * even expose them.
+ */
+ ep->last_io = jiffies;
+ ep->setup_stage = 0;
+ ep->halted = 0;
+ switch (setup.bRequest) {
+ case USB_REQ_SET_ADDRESS:
+ if (setup.bRequestType != Dev_Request)
+ break;
+ dum->address = setup.wValue;
+ maybe_set_status (urb, 0);
+ dev_dbg (dummy_dev(dum), "set_address = %d\n",
+ setup.wValue);
+ value = 0;
+ break;
+ case USB_REQ_SET_FEATURE:
+ if (setup.bRequestType == Dev_Request) {
+ value = 0;
+ switch (setup.wValue) {
+ case USB_DEVICE_REMOTE_WAKEUP:
+ break;
+ default:
+ value = -EOPNOTSUPP;
+ }
+ if (value == 0) {
+ dum->devstatus |=
+ (1 << setup.wValue);
+ maybe_set_status (urb, 0);
+ }
+
+ } else if (setup.bRequestType == Ep_Request) {
+ // endpoint halt
+ ep2 = find_endpoint (dum,
+ setup.wIndex);
+ if (!ep2) {
+ value = -EOPNOTSUPP;
+ break;
+ }
+ ep2->halted = 1;
+ value = 0;
+ maybe_set_status (urb, 0);
+ }
+ break;
+ case USB_REQ_CLEAR_FEATURE:
+ if (setup.bRequestType == Dev_Request) {
+ switch (setup.wValue) {
+ case USB_DEVICE_REMOTE_WAKEUP:
+ dum->devstatus &= ~(1 <<
+ USB_DEVICE_REMOTE_WAKEUP);
+ value = 0;
+ maybe_set_status (urb, 0);
+ break;
+ default:
+ value = -EOPNOTSUPP;
+ break;
+ }
+ } else if (setup.bRequestType == Ep_Request) {
+ // endpoint halt
+ ep2 = find_endpoint (dum,
+ setup.wIndex);
+ if (!ep2) {
+ value = -EOPNOTSUPP;
+ break;
+ }
+ ep2->halted = 0;
+ value = 0;
+ maybe_set_status (urb, 0);
+ }
+ break;
+ case USB_REQ_GET_STATUS:
+ if (setup.bRequestType == Dev_InRequest
+ || setup.bRequestType
+ == Intf_InRequest
+ || setup.bRequestType
+ == Ep_InRequest
+ ) {
+ char *buf;
+
+ // device: remote wakeup, selfpowered
+ // interface: nothing
+ // endpoint: halt
+ buf = (char *)urb->transfer_buffer;
+ if (urb->transfer_buffer_length > 0) {
+ if (setup.bRequestType ==
+ Ep_InRequest) {
+ ep2 = find_endpoint (dum, setup.wIndex);
+ if (!ep2) {
+ value = -EOPNOTSUPP;
+ break;
+ }
+ buf [0] = ep2->halted;
+ } else if (setup.bRequestType ==
+ Dev_InRequest) {
+ buf [0] = (u8)
+ dum->devstatus;
+ } else
+ buf [0] = 0;
+ }
+ if (urb->transfer_buffer_length > 1)
+ buf [1] = 0;
+ urb->actual_length = min (2,
+ urb->transfer_buffer_length);
+ value = 0;
+ maybe_set_status (urb, 0);
+ }
+ break;
+ }
+
+ /* gadget driver handles all other requests. block
+ * until setup() returns; no reentrancy issues etc.
+ */
+ if (value > 0) {
+ spin_unlock (&dum->lock);
+ value = dum->driver->setup (&dum->gadget,
+ &setup);
+ spin_lock (&dum->lock);
+
+ if (value >= 0) {
+ /* no delays (max 64KB data stage) */
+ limit = 64*1024;
+ goto treat_control_like_bulk;
+ }
+ /* error, see below */
+ }
+
+ if (value < 0) {
+ if (value != -EOPNOTSUPP)
+ dev_dbg (dummy_dev(dum),
+ "setup --> %d\n",
+ value);
+ maybe_set_status (urb, -EPIPE);
+ urb->actual_length = 0;
+ }
+
+ goto return_urb;
+ }
+
+ /* non-control requests */
+ limit = total;
+ switch (usb_pipetype (urb->pipe)) {
+ case PIPE_ISOCHRONOUS:
+ /* FIXME is it urb->interval since the last xfer?
+ * use urb->iso_frame_desc[i].
+ * complete whether or not ep has requests queued.
+ * report random errors, to debug drivers.
+ */
+ limit = max (limit, periodic_bytes (dum, ep));
+ maybe_set_status (urb, -ENOSYS);
+ break;
+
+ case PIPE_INTERRUPT:
+ /* FIXME is it urb->interval since the last xfer?
+ * this almost certainly polls too fast.
+ */
+ limit = max (limit, periodic_bytes (dum, ep));
+ /* FALLTHROUGH */
+
+ // case PIPE_BULK: case PIPE_CONTROL:
+ default:
+ treat_control_like_bulk:
+ ep->last_io = jiffies;
+ total = transfer (dum, urb, ep, limit);
+ break;
+ }
+
+ /* incomplete transfer? */
+ if (urb->status == -EINPROGRESS)
+ continue;
+
+return_urb:
+ urb->hcpriv = NULL;
+ list_del (&urbp->urbp_list);
+ kfree (urbp);
+ if (ep)
+ ep->already_seen = ep->setup_stage = 0;
+
+ spin_unlock (&dum->lock);
+ usb_hcd_giveback_urb (dummy_to_hcd(dum), urb, NULL);
+ spin_lock (&dum->lock);
+
+ goto restart;
+ }
+
+ /* want a 1 msec delay here */
+ if (!list_empty (&dum->urbp_list))
+ mod_timer (&dum->timer, jiffies + msecs_to_jiffies(1));
+ else {
+ usb_put_dev (dum->udev);
+ dum->udev = NULL;
+ }
+
+ spin_unlock_irqrestore (&dum->lock, flags);
+}
+
+/*-------------------------------------------------------------------------*/
+
+#define PORT_C_MASK \
+ ((1 << USB_PORT_FEAT_C_CONNECTION) \
+ | (1 << USB_PORT_FEAT_C_ENABLE) \
+ | (1 << USB_PORT_FEAT_C_SUSPEND) \
+ | (1 << USB_PORT_FEAT_C_OVER_CURRENT) \
+ | (1 << USB_PORT_FEAT_C_RESET))
+
+static int dummy_hub_status (struct usb_hcd *hcd, char *buf)
+{
+ struct dummy *dum;
+ unsigned long flags;
+ int retval;
+
+ dum = hcd_to_dummy (hcd);
+
+ spin_lock_irqsave (&dum->lock, flags);
+ if (!(dum->port_status & PORT_C_MASK))
+ retval = 0;
+ else {
+ *buf = (1 << 1);
+ dev_dbg (dummy_dev(dum), "port status 0x%08x has changes\n",
+ dum->port_status);
+ retval = 1;
+ }
+ spin_unlock_irqrestore (&dum->lock, flags);
+ return retval;
+}
+
+static inline void
+hub_descriptor (struct usb_hub_descriptor *desc)
+{
+ memset (desc, 0, sizeof *desc);
+ desc->bDescriptorType = 0x29;
+ desc->bDescLength = 9;
+ desc->wHubCharacteristics = __constant_cpu_to_le16 (0x0001);
+ desc->bNbrPorts = 1;
+ desc->bitmap [0] = 0xff;
+ desc->bitmap [1] = 0xff;
+}
+
+static int dummy_hub_control (
+ struct usb_hcd *hcd,
+ u16 typeReq,
+ u16 wValue,
+ u16 wIndex,
+ char *buf,
+ u16 wLength
+) {
+ struct dummy *dum;
+ int retval = 0;
+ unsigned long flags;
+
+ dum = hcd_to_dummy (hcd);
+ spin_lock_irqsave (&dum->lock, flags);
+ switch (typeReq) {
+ case ClearHubFeature:
+ break;
+ case ClearPortFeature:
+ switch (wValue) {
+ case USB_PORT_FEAT_SUSPEND:
+ if (dum->port_status & (1 << USB_PORT_FEAT_SUSPEND)) {
+ /* 20msec resume signaling */
+ dum->resuming = 1;
+ dum->re_timeout = jiffies +
+ msecs_to_jiffies(20);
+ }
+ break;
+ case USB_PORT_FEAT_POWER:
+ dum->port_status = 0;
+ dum->resuming = 0;
+ stop_activity(dum, dum->driver);
+ break;
+ default:
+ dum->port_status &= ~(1 << wValue);
+ }
+ break;
+ case GetHubDescriptor:
+ hub_descriptor ((struct usb_hub_descriptor *) buf);
+ break;
+ case GetHubStatus:
+ *(u32 *) buf = __constant_cpu_to_le32 (0);
+ break;
+ case GetPortStatus:
+ if (wIndex != 1)
+ retval = -EPIPE;
+
+ /* whoever resets or resumes must GetPortStatus to
+ * complete it!!
+ */
+ if (dum->resuming && time_after (jiffies, dum->re_timeout)) {
+ dum->port_status |= (1 << USB_PORT_FEAT_C_SUSPEND);
+ dum->port_status &= ~(1 << USB_PORT_FEAT_SUSPEND);
+ dum->resuming = 0;
+ dum->re_timeout = 0;
+ if (dum->driver && dum->driver->resume) {
+ spin_unlock (&dum->lock);
+ dum->driver->resume (&dum->gadget);
+ spin_lock (&dum->lock);
+ }
+ }
+ if ((dum->port_status & (1 << USB_PORT_FEAT_RESET)) != 0
+ && time_after (jiffies, dum->re_timeout)) {
+ dum->port_status |= (1 << USB_PORT_FEAT_C_RESET);
+ dum->port_status &= ~(1 << USB_PORT_FEAT_RESET);
+ dum->re_timeout = 0;
+ if (dum->driver) {
+ dum->port_status |= USB_PORT_STAT_ENABLE;
+ /* give it the best speed we agree on */
+ dum->gadget.speed = dum->driver->speed;
+ dum->gadget.ep0->maxpacket = 64;
+ switch (dum->gadget.speed) {
+ case USB_SPEED_HIGH:
+ dum->port_status |=
+ USB_PORT_STAT_HIGH_SPEED;
+ break;
+ case USB_SPEED_LOW:
+ dum->gadget.ep0->maxpacket = 8;
+ dum->port_status |=
+ USB_PORT_STAT_LOW_SPEED;
+ break;
+ default:
+ dum->gadget.speed = USB_SPEED_FULL;
+ break;
+ }
+ }
+ }
+ ((u16 *) buf)[0] = cpu_to_le16 (dum->port_status);
+ ((u16 *) buf)[1] = cpu_to_le16 (dum->port_status >> 16);
+ break;
+ case SetHubFeature:
+ retval = -EPIPE;
+ break;
+ case SetPortFeature:
+ switch (wValue) {
+ case USB_PORT_FEAT_SUSPEND:
+ if ((dum->port_status & (1 << USB_PORT_FEAT_SUSPEND))
+ == 0) {
+ dum->port_status |=
+ (1 << USB_PORT_FEAT_SUSPEND);
+ if (dum->driver && dum->driver->suspend) {
+ spin_unlock (&dum->lock);
+ dum->driver->suspend (&dum->gadget);
+ spin_lock (&dum->lock);
+ }
+ }
+ break;
+ case USB_PORT_FEAT_RESET:
+ /* if it's already running, disconnect first */
+ if (dum->port_status & USB_PORT_STAT_ENABLE) {
+ dum->port_status &= ~(USB_PORT_STAT_ENABLE
+ | USB_PORT_STAT_LOW_SPEED
+ | USB_PORT_STAT_HIGH_SPEED);
+ if (dum->driver) {
+ dev_dbg (dummy_dev(dum),
+ "disconnect\n");
+ stop_activity (dum, dum->driver);
+ }
+
+ /* FIXME test that code path! */
+ }
+ /* 50msec reset signaling */
+ dum->re_timeout = jiffies + msecs_to_jiffies(50);
+ /* FALLTHROUGH */
+ default:
+ dum->port_status |= (1 << wValue);
+ }
+ break;
+
+ default:
+ dev_dbg (dummy_dev(dum),
+ "hub control req%04x v%04x i%04x l%d\n",
+ typeReq, wValue, wIndex, wLength);
+
+ /* "protocol stall" on error */
+ retval = -EPIPE;
+ }
+ spin_unlock_irqrestore (&dum->lock, flags);
+ return retval;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static inline ssize_t
+show_urb (char *buf, size_t size, struct urb *urb)
+{
+ int ep = usb_pipeendpoint (urb->pipe);
+
+ return snprintf (buf, size,
+ "urb/%p %s ep%d%s%s len %d/%d\n",
+ urb,
+ ({ char *s;
+ switch (urb->dev->speed) {
+ case USB_SPEED_LOW: s = "ls"; break;
+ case USB_SPEED_FULL: s = "fs"; break;
+ case USB_SPEED_HIGH: s = "hs"; break;
+ default: s = "?"; break;
+ }; s; }),
+ ep, ep ? (usb_pipein (urb->pipe) ? "in" : "out") : "",
+ ({ char *s; \
+ switch (usb_pipetype (urb->pipe)) { \
+ case PIPE_CONTROL: s = ""; break; \
+ case PIPE_BULK: s = "-bulk"; break; \
+ case PIPE_INTERRUPT: s = "-int"; break; \
+ default: s = "-iso"; break; \
+ }; s;}),
+ urb->actual_length, urb->transfer_buffer_length);
+}
+
+static ssize_t
+show_urbs (struct device *dev, char *buf)
+{
+ struct usb_hcd *hcd = dev_get_drvdata (dev);
+ struct dummy *dum = hcd_to_dummy (hcd);
+ struct urbp *urbp;
+ size_t size = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave (&dum->lock, flags);
+ list_for_each_entry (urbp, &dum->urbp_list, urbp_list) {
+ size_t temp;
+
+ temp = show_urb (buf, PAGE_SIZE - size, urbp->urb);
+ buf += temp;
+ size += temp;
+ }
+ spin_unlock_irqrestore (&dum->lock, flags);
+
+ return size;
+}
+static DEVICE_ATTR (urbs, S_IRUGO, show_urbs, NULL);
+
+static int dummy_start (struct usb_hcd *hcd)
+{
+ struct dummy *dum;
+ struct usb_device *root;
+ int retval;
+
+ dum = hcd_to_dummy (hcd);
+
+ /*
+ * MASTER side init ... we emulate a root hub that'll only ever
+ * talk to one device (the slave side). Also appears in sysfs,
+ * just like more familiar pci-based HCDs.
+ */
+ spin_lock_init (&dum->lock);
+ init_timer (&dum->timer);
+ dum->timer.function = dummy_timer;
+ dum->timer.data = (unsigned long) dum;
+
+ INIT_LIST_HEAD (&dum->urbp_list);
+
+ root = usb_alloc_dev (NULL, &hcd->self, 0);
+ if (!root)
+ return -ENOMEM;
+
+ /* root hub enters addressed state... */
+ hcd->state = HC_STATE_RUNNING;
+ root->speed = USB_SPEED_HIGH;
+
+ /* ...then configured, so khubd sees us. */
+ if ((retval = usb_hcd_register_root_hub (root, hcd)) != 0) {
+ goto err1;
+ }
+
+ /* only show a low-power port: just 8mA */
+ hub_set_power_budget (root, 8);
+
+ if ((retval = dummy_register_udc (dum)) != 0)
+ goto err2;
+
+ /* FIXME 'urbs' should be a per-device thing, maybe in usbcore */
+ device_create_file (dummy_dev(dum), &dev_attr_urbs);
+ return 0;
+
+ err2:
+ usb_disconnect (&hcd->self.root_hub);
+ err1:
+ usb_put_dev (root);
+ hcd->state = HC_STATE_QUIESCING;
+ return retval;
+}
+
+static void dummy_stop (struct usb_hcd *hcd)
+{
+ struct dummy *dum;
+
+ dum = hcd_to_dummy (hcd);
+
+ device_remove_file (dummy_dev(dum), &dev_attr_urbs);
+
+ usb_gadget_unregister_driver (dum->driver);
+ dummy_unregister_udc (dum);
+
+ dev_info (dummy_dev(dum), "stopped\n");
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int dummy_h_get_frame (struct usb_hcd *hcd)
+{
+ return dummy_g_get_frame (NULL);
+}
+
+static const struct hc_driver dummy_hcd = {
+ .description = (char *) driver_name,
+ .product_desc = "Dummy host controller",
+ .hcd_priv_size = sizeof(struct dummy),
+
+ .flags = HCD_USB2,
+
+ .start = dummy_start,
+ .stop = dummy_stop,
+
+ .urb_enqueue = dummy_urb_enqueue,
+ .urb_dequeue = dummy_urb_dequeue,
+
+ .get_frame_number = dummy_h_get_frame,
+
+ .hub_status_data = dummy_hub_status,
+ .hub_control = dummy_hub_control,
+};
+
+static int dummy_probe (struct device *dev)
+{
+ struct usb_hcd *hcd;
+ int retval;
+
+ dev_info (dev, "%s, driver " DRIVER_VERSION "\n", driver_desc);
+
+ hcd = usb_create_hcd (&dummy_hcd, dev, dev->bus_id);
+ if (!hcd)
+ return -ENOMEM;
+ the_controller = hcd_to_dummy (hcd);
+
+ retval = usb_add_hcd(hcd, 0, 0);
+ if (retval != 0) {
+ usb_put_hcd (hcd);
+ the_controller = NULL;
+ }
+ return retval;
+}
+
+static void dummy_remove (struct device *dev)
+{
+ struct usb_hcd *hcd;
+
+ hcd = dev_get_drvdata (dev);
+ usb_remove_hcd (hcd);
+ usb_put_hcd (hcd);
+ the_controller = NULL;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int dummy_pdev_detect (void)
+{
+ int retval;
+
+ retval = driver_register (&dummy_driver);
+ if (retval < 0)
+ return retval;
+
+ the_pdev.name = "hc";
+ the_pdev.dev.driver = &dummy_driver;
+ the_pdev.dev.release = dummy_pdev_release;
+
+ retval = platform_device_register (&the_pdev);
+ if (retval < 0)
+ driver_unregister (&dummy_driver);
+ return retval;
+}
+
+static void dummy_pdev_remove (void)
+{
+ platform_device_unregister (&the_pdev);
+ driver_unregister (&dummy_driver);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int __init init (void)
+{
+ int retval;
+
+ if (usb_disabled ())
+ return -ENODEV;
+ if ((retval = dummy_pdev_detect ()) != 0)
+ return retval;
+ if ((retval = dummy_probe (&the_pdev.dev)) != 0)
+ dummy_pdev_remove ();
+ return retval;
+}
+module_init (init);
+
+static void __exit cleanup (void)
+{
+ dummy_remove (&the_pdev.dev);
+ dummy_pdev_remove ();
+}
+module_exit (cleanup);
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
new file mode 100644
index 000000000000..f7c6d758e1b0
--- /dev/null
+++ b/drivers/usb/gadget/epautoconf.c
@@ -0,0 +1,310 @@
+/*
+ * epautoconf.c -- endpoint autoconfiguration for usb gadget drivers
+ *
+ * Copyright (C) 2004 David Brownell
+ *
+ * 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 <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/device.h>
+
+#include <linux/ctype.h>
+#include <linux/string.h>
+
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+
+#include "gadget_chips.h"
+
+
+/* we must assign addresses for configurable endpoints (like net2280) */
+static __initdata unsigned epnum;
+
+// #define MANY_ENDPOINTS
+#ifdef MANY_ENDPOINTS
+/* more than 15 configurable endpoints */
+static __initdata unsigned in_epnum;
+#endif
+
+
+/*
+ * This should work with endpoints from controller drivers sharing the
+ * same endpoint naming convention. By example:
+ *
+ * - ep1, ep2, ... address is fixed, not direction or type
+ * - ep1in, ep2out, ... address and direction are fixed, not type
+ * - ep1-bulk, ep2-bulk, ... address and type are fixed, not direction
+ * - ep1in-bulk, ep2out-iso, ... all three are fixed
+ * - ep-* ... no functionality restrictions
+ *
+ * Type suffixes are "-bulk", "-iso", or "-int". Numbers are decimal.
+ * Less common restrictions are implied by gadget_is_*().
+ *
+ * NOTE: each endpoint is unidirectional, as specified by its USB
+ * descriptor; and isn't specific to a configuration or altsetting.
+ */
+static int __init
+ep_matches (
+ struct usb_gadget *gadget,
+ struct usb_ep *ep,
+ struct usb_endpoint_descriptor *desc
+)
+{
+ u8 type;
+ const char *tmp;
+ u16 max;
+
+ /* endpoint already claimed? */
+ if (0 != ep->driver_data)
+ return 0;
+
+ /* only support ep0 for portable CONTROL traffic */
+ type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
+ if (USB_ENDPOINT_XFER_CONTROL == type)
+ return 0;
+
+ /* some other naming convention */
+ if ('e' != ep->name[0])
+ return 0;
+
+ /* type-restriction: "-iso", "-bulk", or "-int".
+ * direction-restriction: "in", "out".
+ */
+ if ('-' != ep->name[2]) {
+ tmp = strrchr (ep->name, '-');
+ if (tmp) {
+ switch (type) {
+ case USB_ENDPOINT_XFER_INT:
+ /* bulk endpoints handle interrupt transfers,
+ * except the toggle-quirky iso-synch kind
+ */
+ if ('s' == tmp[2]) // == "-iso"
+ return 0;
+ /* for now, avoid PXA "interrupt-in";
+ * it's documented as never using DATA1.
+ */
+ if (gadget_is_pxa (gadget)
+ && 'i' == tmp [1])
+ return 0;
+ break;
+ case USB_ENDPOINT_XFER_BULK:
+ if ('b' != tmp[1]) // != "-bulk"
+ return 0;
+ break;
+ case USB_ENDPOINT_XFER_ISOC:
+ if ('s' != tmp[2]) // != "-iso"
+ return 0;
+ }
+ } else {
+ tmp = ep->name + strlen (ep->name);
+ }
+
+ /* direction-restriction: "..in-..", "out-.." */
+ tmp--;
+ if (!isdigit (*tmp)) {
+ if (desc->bEndpointAddress & USB_DIR_IN) {
+ if ('n' != *tmp)
+ return 0;
+ } else {
+ if ('t' != *tmp)
+ return 0;
+ }
+ }
+ }
+
+ /* endpoint maxpacket size is an input parameter, except for bulk
+ * where it's an output parameter representing the full speed limit.
+ * the usb spec fixes high speed bulk maxpacket at 512 bytes.
+ */
+ max = 0x7ff & le16_to_cpup (&desc->wMaxPacketSize);
+ switch (type) {
+ case USB_ENDPOINT_XFER_INT:
+ /* INT: limit 64 bytes full speed, 1024 high speed */
+ if (!gadget->is_dualspeed && max > 64)
+ return 0;
+ /* FALLTHROUGH */
+
+ case USB_ENDPOINT_XFER_ISOC:
+ /* ISO: limit 1023 bytes full speed, 1024 high speed */
+ if (ep->maxpacket < max)
+ return 0;
+ if (!gadget->is_dualspeed && max > 1023)
+ return 0;
+
+ /* BOTH: "high bandwidth" works only at high speed */
+ if ((desc->wMaxPacketSize & __constant_cpu_to_le16(3<<11))) {
+ if (!gadget->is_dualspeed)
+ return 0;
+ /* configure your hardware with enough buffering!! */
+ }
+ break;
+ }
+
+ /* MATCH!! */
+
+ /* report address */
+ if (isdigit (ep->name [2])) {
+ u8 num = simple_strtol (&ep->name [2], NULL, 10);
+ desc->bEndpointAddress |= num;
+#ifdef MANY_ENDPOINTS
+ } else if (desc->bEndpointAddress & USB_DIR_IN) {
+ if (++in_epnum > 15)
+ return 0;
+ desc->bEndpointAddress = USB_DIR_IN | in_epnum;
+#endif
+ } else {
+ if (++epnum > 15)
+ return 0;
+ desc->bEndpointAddress |= epnum;
+ }
+
+ /* report (variable) full speed bulk maxpacket */
+ if (USB_ENDPOINT_XFER_BULK == type) {
+ int size = ep->maxpacket;
+
+ /* min() doesn't work on bitfields with gcc-3.5 */
+ if (size > 64)
+ size = 64;
+ desc->wMaxPacketSize = cpu_to_le16(size);
+ }
+ return 1;
+}
+
+static struct usb_ep * __init
+find_ep (struct usb_gadget *gadget, const char *name)
+{
+ struct usb_ep *ep;
+
+ list_for_each_entry (ep, &gadget->ep_list, ep_list) {
+ if (0 == strcmp (ep->name, name))
+ return ep;
+ }
+ return NULL;
+}
+
+/**
+ * usb_ep_autoconfig - choose an endpoint matching the descriptor
+ * @gadget: The device to which the endpoint must belong.
+ * @desc: Endpoint descriptor, with endpoint direction and transfer mode
+ * initialized. For periodic transfers, the maximum packet
+ * size must also be initialized. This is modified on success.
+ *
+ * By choosing an endpoint to use with the specified descriptor, this
+ * routine simplifies writing gadget drivers that work with multiple
+ * USB device controllers. The endpoint would be passed later to
+ * usb_ep_enable(), along with some descriptor.
+ *
+ * That second descriptor won't always be the same as the first one.
+ * For example, isochronous endpoints can be autoconfigured for high
+ * bandwidth, and then used in several lower bandwidth altsettings.
+ * Also, high and full speed descriptors will be different.
+ *
+ * Be sure to examine and test the results of autoconfiguration on your
+ * hardware. This code may not make the best choices about how to use the
+ * USB controller, and it can't know all the restrictions that may apply.
+ * Some combinations of driver and hardware won't be able to autoconfigure.
+ *
+ * On success, this returns an un-claimed usb_ep, and modifies the endpoint
+ * descriptor bEndpointAddress. For bulk endpoints, the wMaxPacket value
+ * is initialized as if the endpoint were used at full speed. To prevent
+ * the endpoint from being returned by a later autoconfig call, claim it
+ * by assigning ep->driver_data to some non-null value.
+ *
+ * On failure, this returns a null endpoint descriptor.
+ */
+struct usb_ep * __init usb_ep_autoconfig (
+ struct usb_gadget *gadget,
+ struct usb_endpoint_descriptor *desc
+)
+{
+ struct usb_ep *ep;
+ u8 type;
+
+ type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
+
+ /* First, apply chip-specific "best usage" knowledge.
+ * This might make a good usb_gadget_ops hook ...
+ */
+ if (gadget_is_net2280 (gadget) && type == USB_ENDPOINT_XFER_INT) {
+ /* ep-e, ep-f are PIO with only 64 byte fifos */
+ ep = find_ep (gadget, "ep-e");
+ if (ep && ep_matches (gadget, ep, desc))
+ return ep;
+ ep = find_ep (gadget, "ep-f");
+ if (ep && ep_matches (gadget, ep, desc))
+ return ep;
+
+ } else if (gadget_is_goku (gadget)) {
+ if (USB_ENDPOINT_XFER_INT == type) {
+ /* single buffering is enough */
+ ep = find_ep (gadget, "ep3-bulk");
+ if (ep && ep_matches (gadget, ep, desc))
+ return ep;
+ } else if (USB_ENDPOINT_XFER_BULK == type
+ && (USB_DIR_IN & desc->bEndpointAddress)) {
+ /* DMA may be available */
+ ep = find_ep (gadget, "ep2-bulk");
+ if (ep && ep_matches (gadget, ep, desc))
+ return ep;
+ }
+
+ } else if (gadget_is_sh (gadget) && USB_ENDPOINT_XFER_INT == type) {
+ /* single buffering is enough; maybe 8 byte fifo is too */
+ ep = find_ep (gadget, "ep3in-bulk");
+ if (ep && ep_matches (gadget, ep, desc))
+ return ep;
+
+ } else if (gadget_is_mq11xx (gadget) && USB_ENDPOINT_XFER_INT == type) {
+ ep = find_ep (gadget, "ep1-bulk");
+ if (ep && ep_matches (gadget, ep, desc))
+ return ep;
+ }
+
+ /* Second, look at endpoints until an unclaimed one looks usable */
+ list_for_each_entry (ep, &gadget->ep_list, ep_list) {
+ if (ep_matches (gadget, ep, desc))
+ return ep;
+ }
+
+ /* Fail */
+ return NULL;
+}
+
+/**
+ * usb_ep_autoconfig_reset - reset endpoint autoconfig state
+ * @gadget: device for which autoconfig state will be reset
+ *
+ * Use this for devices where one configuration may need to assign
+ * endpoint resources very differently from the next one. It clears
+ * state such as ep->driver_data and the record of assigned endpoints
+ * used by usb_ep_autoconfig().
+ */
+void __init usb_ep_autoconfig_reset (struct usb_gadget *gadget)
+{
+ struct usb_ep *ep;
+
+ list_for_each_entry (ep, &gadget->ep_list, ep_list) {
+ ep->driver_data = NULL;
+ }
+#ifdef MANY_ENDPOINTS
+ in_epnum = 0;
+#endif
+ epnum = 0;
+}
+
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
new file mode 100644
index 000000000000..cff9fb0b73cc
--- /dev/null
+++ b/drivers/usb/gadget/ether.c
@@ -0,0 +1,2660 @@
+/*
+ * ether.c -- Ethernet gadget driver, with CDC and non-CDC options
+ *
+ * Copyright (C) 2003-2005 David Brownell
+ * Copyright (C) 2003-2004 Robert Schwebel, Benedikt Spranger
+ *
+ * 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
+ */
+
+
+// #define DEBUG 1
+// #define VERBOSE
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/utsname.h>
+#include <linux/device.h>
+#include <linux/moduleparam.h>
+#include <linux/ctype.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/uaccess.h>
+#include <asm/unaligned.h>
+
+#include <linux/usb_ch9.h>
+#include <linux/usb_cdc.h>
+#include <linux/usb_gadget.h>
+
+#include <linux/random.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/ethtool.h>
+
+#include "gadget_chips.h"
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Ethernet gadget driver -- with CDC and non-CDC options
+ * Builds on hardware support for a full duplex link.
+ *
+ * CDC Ethernet is the standard USB solution for sending Ethernet frames
+ * using USB. Real hardware tends to use the same framing protocol but look
+ * different for control features. This driver strongly prefers to use
+ * this USB-IF standard as its open-systems interoperability solution;
+ * most host side USB stacks (except from Microsoft) support it.
+ *
+ * There's some hardware that can't talk CDC. We make that hardware
+ * implement a "minimalist" vendor-agnostic CDC core: same framing, but
+ * link-level setup only requires activating the configuration.
+ * Linux supports it, but other host operating systems may not.
+ * (This is a subset of CDC Ethernet.)
+ *
+ * A third option is also in use. Rather than CDC Ethernet, or something
+ * simpler, Microsoft pushes their own approach: RNDIS. The published
+ * RNDIS specs are ambiguous and appear to be incomplete, and are also
+ * needlessly complex.
+ */
+
+#define DRIVER_DESC "Ethernet Gadget"
+#define DRIVER_VERSION "Equinox 2004"
+
+static const char shortname [] = "ether";
+static const char driver_desc [] = DRIVER_DESC;
+
+#define RX_EXTRA 20 /* guard against rx overflows */
+
+#ifdef CONFIG_USB_ETH_RNDIS
+#include "rndis.h"
+#else
+#define rndis_init() 0
+#define rndis_exit() do{}while(0)
+#endif
+
+/* CDC and RNDIS support the same host-chosen outgoing packet filters. */
+#define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \
+ |USB_CDC_PACKET_TYPE_DIRECTED)
+
+
+/*-------------------------------------------------------------------------*/
+
+struct eth_dev {
+ spinlock_t lock;
+ struct usb_gadget *gadget;
+ struct usb_request *req; /* for control responses */
+ struct usb_request *stat_req; /* for cdc & rndis status */
+
+ u8 config;
+ struct usb_ep *in_ep, *out_ep, *status_ep;
+ const struct usb_endpoint_descriptor
+ *in, *out, *status;
+ struct list_head tx_reqs, rx_reqs;
+
+ struct net_device *net;
+ struct net_device_stats stats;
+ atomic_t tx_qlen;
+
+ struct work_struct work;
+ unsigned zlp:1;
+ unsigned cdc:1;
+ unsigned rndis:1;
+ unsigned suspended:1;
+ u16 cdc_filter;
+ unsigned long todo;
+#define WORK_RX_MEMORY 0
+ int rndis_config;
+ u8 host_mac [ETH_ALEN];
+};
+
+/* This version autoconfigures as much as possible at run-time.
+ *
+ * It also ASSUMES a self-powered device, without remote wakeup,
+ * although remote wakeup support would make sense.
+ */
+static const char *EP_IN_NAME;
+static const char *EP_OUT_NAME;
+static const char *EP_STATUS_NAME;
+
+/*-------------------------------------------------------------------------*/
+
+/* DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!!
+ * Instead: allocate your own, using normal USB-IF procedures.
+ */
+
+/* Thanks to NetChip Technologies for donating this product ID.
+ * It's for devices with only CDC Ethernet configurations.
+ */
+#define CDC_VENDOR_NUM 0x0525 /* NetChip */
+#define CDC_PRODUCT_NUM 0xa4a1 /* Linux-USB Ethernet Gadget */
+
+/* For hardware that can't talk CDC, we use the same vendor ID that
+ * ARM Linux has used for ethernet-over-usb, both with sa1100 and
+ * with pxa250. We're protocol-compatible, if the host-side drivers
+ * use the endpoint descriptors. bcdDevice (version) is nonzero, so
+ * drivers that need to hard-wire endpoint numbers have a hook.
+ *
+ * The protocol is a minimal subset of CDC Ether, which works on any bulk
+ * hardware that's not deeply broken ... even on hardware that can't talk
+ * RNDIS (like SA-1100, with no interrupt endpoint, or anything that
+ * doesn't handle control-OUT).
+ */
+#define SIMPLE_VENDOR_NUM 0x049f
+#define SIMPLE_PRODUCT_NUM 0x505a
+
+/* For hardware that can talk RNDIS and either of the above protocols,
+ * use this ID ... the windows INF files will know it. Unless it's
+ * used with CDC Ethernet, Linux 2.4 hosts will need updates to choose
+ * the non-RNDIS configuration.
+ */
+#define RNDIS_VENDOR_NUM 0x0525 /* NetChip */
+#define RNDIS_PRODUCT_NUM 0xa4a2 /* Ethernet/RNDIS Gadget */
+
+
+/* Some systems will want different product identifers published in the
+ * device descriptor, either numbers or strings or both. These string
+ * parameters are in UTF-8 (superset of ASCII's 7 bit characters).
+ */
+
+static ushort __initdata idVendor;
+module_param(idVendor, ushort, S_IRUGO);
+MODULE_PARM_DESC(idVendor, "USB Vendor ID");
+
+static ushort __initdata idProduct;
+module_param(idProduct, ushort, S_IRUGO);
+MODULE_PARM_DESC(idProduct, "USB Product ID");
+
+static ushort __initdata bcdDevice;
+module_param(bcdDevice, ushort, S_IRUGO);
+MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)");
+
+static char *__initdata iManufacturer;
+module_param(iManufacturer, charp, S_IRUGO);
+MODULE_PARM_DESC(iManufacturer, "USB Manufacturer string");
+
+static char *__initdata iProduct;
+module_param(iProduct, charp, S_IRUGO);
+MODULE_PARM_DESC(iProduct, "USB Product string");
+
+/* initial value, changed by "ifconfig usb0 hw ether xx:xx:xx:xx:xx:xx" */
+static char *__initdata dev_addr;
+module_param(dev_addr, charp, S_IRUGO);
+MODULE_PARM_DESC(dev_addr, "Device Ethernet Address");
+
+/* this address is invisible to ifconfig */
+static char *__initdata host_addr;
+module_param(host_addr, charp, S_IRUGO);
+MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
+
+
+/*-------------------------------------------------------------------------*/
+
+/* Include CDC support if we could run on CDC-capable hardware. */
+
+#ifdef CONFIG_USB_GADGET_NET2280
+#define DEV_CONFIG_CDC
+#endif
+
+#ifdef CONFIG_USB_GADGET_DUMMY_HCD
+#define DEV_CONFIG_CDC
+#endif
+
+#ifdef CONFIG_USB_GADGET_GOKU
+#define DEV_CONFIG_CDC
+#endif
+
+#ifdef CONFIG_USB_GADGET_LH7A40X
+#define DEV_CONFIG_CDC
+#endif
+
+#ifdef CONFIG_USB_GADGET_MQ11XX
+#define DEV_CONFIG_CDC
+#endif
+
+#ifdef CONFIG_USB_GADGET_OMAP
+#define DEV_CONFIG_CDC
+#endif
+
+#ifdef CONFIG_USB_GADGET_N9604
+#define DEV_CONFIG_CDC
+#endif
+
+#ifdef CONFIG_USB_GADGET_PXA27X
+#define DEV_CONFIG_CDC
+#endif
+
+#ifdef CONFIG_USB_GADGET_AT91
+#define DEV_CONFIG_CDC
+#endif
+
+
+/* For CDC-incapable hardware, choose the simple cdc subset.
+ * Anything that talks bulk (without notable bugs) can do this.
+ */
+#ifdef CONFIG_USB_GADGET_PXA2XX
+#define DEV_CONFIG_SUBSET
+#endif
+
+#ifdef CONFIG_USB_GADGET_SH
+#define DEV_CONFIG_SUBSET
+#endif
+
+#ifdef CONFIG_USB_GADGET_SA1100
+/* use non-CDC for backwards compatibility */
+#define DEV_CONFIG_SUBSET
+#endif
+
+#ifdef CONFIG_USB_GADGET_S3C2410
+#define DEV_CONFIG_CDC
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/* "main" config is either CDC, or its simple subset */
+static inline int is_cdc(struct eth_dev *dev)
+{
+#if !defined(DEV_CONFIG_SUBSET)
+ return 1; /* only cdc possible */
+#elif !defined (DEV_CONFIG_CDC)
+ return 0; /* only subset possible */
+#else
+ return dev->cdc; /* depends on what hardware we found */
+#endif
+}
+
+/* "secondary" RNDIS config may sometimes be activated */
+static inline int rndis_active(struct eth_dev *dev)
+{
+#ifdef CONFIG_USB_ETH_RNDIS
+ return dev->rndis;
+#else
+ return 0;
+#endif
+}
+
+#define subset_active(dev) (!is_cdc(dev) && !rndis_active(dev))
+#define cdc_active(dev) ( is_cdc(dev) && !rndis_active(dev))
+
+
+
+#define DEFAULT_QLEN 2 /* double buffering by default */
+
+/* peak bulk transfer bits-per-second */
+#define HS_BPS (13 * 512 * 8 * 1000 * 8)
+#define FS_BPS (19 * 64 * 1 * 1000 * 8)
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+
+static unsigned qmult = 5;
+module_param (qmult, uint, S_IRUGO|S_IWUSR);
+
+
+/* for dual-speed hardware, use deeper queues at highspeed */
+#define qlen(gadget) \
+ (DEFAULT_QLEN*((gadget->speed == USB_SPEED_HIGH) ? qmult : 1))
+
+/* also defer IRQs on highspeed TX */
+#define TX_DELAY qmult
+
+#define BITRATE(g) (((g)->speed == USB_SPEED_HIGH) ? HS_BPS : FS_BPS)
+
+#else /* full speed (low speed doesn't do bulk) */
+#define qlen(gadget) DEFAULT_QLEN
+
+#define BITRATE(g) FS_BPS
+#endif
+
+
+/*-------------------------------------------------------------------------*/
+
+#define xprintk(d,level,fmt,args...) \
+ printk(level "%s: " fmt , (d)->net->name , ## args)
+
+#ifdef DEBUG
+#undef DEBUG
+#define DEBUG(dev,fmt,args...) \
+ xprintk(dev , KERN_DEBUG , fmt , ## args)
+#else
+#define DEBUG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* DEBUG */
+
+#ifdef VERBOSE
+#define VDEBUG DEBUG
+#else
+#define VDEBUG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* DEBUG */
+
+#define ERROR(dev,fmt,args...) \
+ xprintk(dev , KERN_ERR , fmt , ## args)
+#define WARN(dev,fmt,args...) \
+ xprintk(dev , KERN_WARNING , fmt , ## args)
+#define INFO(dev,fmt,args...) \
+ xprintk(dev , KERN_INFO , fmt , ## args)
+
+/*-------------------------------------------------------------------------*/
+
+/* USB DRIVER HOOKUP (to the hardware driver, below us), mostly
+ * ep0 implementation: descriptors, config management, setup().
+ * also optional class-specific notification interrupt transfer.
+ */
+
+/*
+ * DESCRIPTORS ... most are static, but strings and (full) configuration
+ * descriptors are built on demand. For now we do either full CDC, or
+ * our simple subset, with RNDIS as an optional second configuration.
+ *
+ * RNDIS includes some CDC ACM descriptors ... like CDC Ethernet. But
+ * the class descriptors match a modem (they're ignored; it's really just
+ * Ethernet functionality), they don't need the NOP altsetting, and the
+ * status transfer endpoint isn't optional.
+ */
+
+#define STRING_MANUFACTURER 1
+#define STRING_PRODUCT 2
+#define STRING_ETHADDR 3
+#define STRING_DATA 4
+#define STRING_CONTROL 5
+#define STRING_RNDIS_CONTROL 6
+#define STRING_CDC 7
+#define STRING_SUBSET 8
+#define STRING_RNDIS 9
+
+#define USB_BUFSIZ 256 /* holds our biggest descriptor */
+
+/*
+ * This device advertises one configuration, eth_config, unless RNDIS
+ * is enabled (rndis_config) on hardware supporting at least two configs.
+ *
+ * NOTE: Controllers like superh_udc should probably be able to use
+ * an RNDIS-only configuration.
+ *
+ * FIXME define some higher-powered configurations to make it easier
+ * to recharge batteries ...
+ */
+
+#define DEV_CONFIG_VALUE 1 /* cdc or subset */
+#define DEV_RNDIS_CONFIG_VALUE 2 /* rndis; optional */
+
+static struct usb_device_descriptor
+device_desc = {
+ .bLength = sizeof device_desc,
+ .bDescriptorType = USB_DT_DEVICE,
+
+ .bcdUSB = __constant_cpu_to_le16 (0x0200),
+
+ .bDeviceClass = USB_CLASS_COMM,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+
+ .idVendor = __constant_cpu_to_le16 (CDC_VENDOR_NUM),
+ .idProduct = __constant_cpu_to_le16 (CDC_PRODUCT_NUM),
+ .iManufacturer = STRING_MANUFACTURER,
+ .iProduct = STRING_PRODUCT,
+ .bNumConfigurations = 1,
+};
+
+static struct usb_otg_descriptor
+otg_descriptor = {
+ .bLength = sizeof otg_descriptor,
+ .bDescriptorType = USB_DT_OTG,
+
+ .bmAttributes = USB_OTG_SRP,
+};
+
+static struct usb_config_descriptor
+eth_config = {
+ .bLength = sizeof eth_config,
+ .bDescriptorType = USB_DT_CONFIG,
+
+ /* compute wTotalLength on the fly */
+ .bNumInterfaces = 2,
+ .bConfigurationValue = DEV_CONFIG_VALUE,
+ .iConfiguration = STRING_CDC,
+ .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER,
+ .bMaxPower = 50,
+};
+
+#ifdef CONFIG_USB_ETH_RNDIS
+static struct usb_config_descriptor
+rndis_config = {
+ .bLength = sizeof rndis_config,
+ .bDescriptorType = USB_DT_CONFIG,
+
+ /* compute wTotalLength on the fly */
+ .bNumInterfaces = 2,
+ .bConfigurationValue = DEV_RNDIS_CONFIG_VALUE,
+ .iConfiguration = STRING_RNDIS,
+ .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER,
+ .bMaxPower = 50,
+};
+#endif
+
+/*
+ * Compared to the simple CDC subset, the full CDC Ethernet model adds
+ * three class descriptors, two interface descriptors, optional status
+ * endpoint. Both have a "data" interface and two bulk endpoints.
+ * There are also differences in how control requests are handled.
+ *
+ * RNDIS shares a lot with CDC-Ethernet, since it's a variant of
+ * the CDC-ACM (modem) spec.
+ */
+
+#ifdef DEV_CONFIG_CDC
+static struct usb_interface_descriptor
+control_intf = {
+ .bLength = sizeof control_intf,
+ .bDescriptorType = USB_DT_INTERFACE,
+
+ .bInterfaceNumber = 0,
+ /* status endpoint is optional; this may be patched later */
+ .bNumEndpoints = 1,
+ .bInterfaceClass = USB_CLASS_COMM,
+ .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET,
+ .bInterfaceProtocol = USB_CDC_PROTO_NONE,
+ .iInterface = STRING_CONTROL,
+};
+#endif
+
+#ifdef CONFIG_USB_ETH_RNDIS
+static const struct usb_interface_descriptor
+rndis_control_intf = {
+ .bLength = sizeof rndis_control_intf,
+ .bDescriptorType = USB_DT_INTERFACE,
+
+ .bInterfaceNumber = 0,
+ .bNumEndpoints = 1,
+ .bInterfaceClass = USB_CLASS_COMM,
+ .bInterfaceSubClass = USB_CDC_SUBCLASS_ACM,
+ .bInterfaceProtocol = USB_CDC_ACM_PROTO_VENDOR,
+ .iInterface = STRING_RNDIS_CONTROL,
+};
+#endif
+
+#if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS)
+
+static const struct usb_cdc_header_desc header_desc = {
+ .bLength = sizeof header_desc,
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_HEADER_TYPE,
+
+ .bcdCDC = __constant_cpu_to_le16 (0x0110),
+};
+
+static const struct usb_cdc_union_desc union_desc = {
+ .bLength = sizeof union_desc,
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_UNION_TYPE,
+
+ .bMasterInterface0 = 0, /* index of control interface */
+ .bSlaveInterface0 = 1, /* index of DATA interface */
+};
+
+#endif /* CDC || RNDIS */
+
+#ifdef CONFIG_USB_ETH_RNDIS
+
+static const struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor = {
+ .bLength = sizeof call_mgmt_descriptor,
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE,
+
+ .bmCapabilities = 0x00,
+ .bDataInterface = 0x01,
+};
+
+static struct usb_cdc_acm_descriptor acm_descriptor = {
+ .bLength = sizeof acm_descriptor,
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_ACM_TYPE,
+
+ .bmCapabilities = 0x00,
+};
+
+#endif
+
+#ifdef DEV_CONFIG_CDC
+
+static const struct usb_cdc_ether_desc ether_desc = {
+ .bLength = sizeof ether_desc,
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_ETHERNET_TYPE,
+
+ /* this descriptor actually adds value, surprise! */
+ .iMACAddress = STRING_ETHADDR,
+ .bmEthernetStatistics = __constant_cpu_to_le32 (0), /* no statistics */
+ .wMaxSegmentSize = __constant_cpu_to_le16 (ETH_FRAME_LEN),
+ .wNumberMCFilters = __constant_cpu_to_le16 (0),
+ .bNumberPowerFilters = 0,
+};
+
+#endif
+
+#if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS)
+
+/* include the status endpoint if we can, even where it's optional.
+ * use wMaxPacketSize big enough to fit CDC_NOTIFY_SPEED_CHANGE in one
+ * packet, to simplify cancelation; and a big transfer interval, to
+ * waste less bandwidth.
+ *
+ * some drivers (like Linux 2.4 cdc-ether!) "need" it to exist even
+ * if they ignore the connect/disconnect notifications that real aether
+ * can provide. more advanced cdc configurations might want to support
+ * encapsulated commands (vendor-specific, using control-OUT).
+ *
+ * RNDIS requires the status endpoint, since it uses that encapsulation
+ * mechanism for its funky RPC scheme.
+ */
+
+#define LOG2_STATUS_INTERVAL_MSEC 5 /* 1 << 5 == 32 msec */
+#define STATUS_BYTECOUNT 16 /* 8 byte header + data */
+
+static struct usb_endpoint_descriptor
+fs_status_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .wMaxPacketSize = __constant_cpu_to_le16 (STATUS_BYTECOUNT),
+ .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC,
+};
+#endif
+
+#ifdef DEV_CONFIG_CDC
+
+/* the default data interface has no endpoints ... */
+
+static const struct usb_interface_descriptor
+data_nop_intf = {
+ .bLength = sizeof data_nop_intf,
+ .bDescriptorType = USB_DT_INTERFACE,
+
+ .bInterfaceNumber = 1,
+ .bAlternateSetting = 0,
+ .bNumEndpoints = 0,
+ .bInterfaceClass = USB_CLASS_CDC_DATA,
+ .bInterfaceSubClass = 0,
+ .bInterfaceProtocol = 0,
+};
+
+/* ... but the "real" data interface has two bulk endpoints */
+
+static const struct usb_interface_descriptor
+data_intf = {
+ .bLength = sizeof data_intf,
+ .bDescriptorType = USB_DT_INTERFACE,
+
+ .bInterfaceNumber = 1,
+ .bAlternateSetting = 1,
+ .bNumEndpoints = 2,
+ .bInterfaceClass = USB_CLASS_CDC_DATA,
+ .bInterfaceSubClass = 0,
+ .bInterfaceProtocol = 0,
+ .iInterface = STRING_DATA,
+};
+
+#endif
+
+#ifdef CONFIG_USB_ETH_RNDIS
+
+/* RNDIS doesn't activate by changing to the "real" altsetting */
+
+static const struct usb_interface_descriptor
+rndis_data_intf = {
+ .bLength = sizeof rndis_data_intf,
+ .bDescriptorType = USB_DT_INTERFACE,
+
+ .bInterfaceNumber = 1,
+ .bAlternateSetting = 0,
+ .bNumEndpoints = 2,
+ .bInterfaceClass = USB_CLASS_CDC_DATA,
+ .bInterfaceSubClass = 0,
+ .bInterfaceProtocol = 0,
+ .iInterface = STRING_DATA,
+};
+
+#endif
+
+#ifdef DEV_CONFIG_SUBSET
+
+/*
+ * "Simple" CDC-subset option is a simple vendor-neutral model that most
+ * full speed controllers can handle: one interface, two bulk endpoints.
+ */
+
+static const struct usb_interface_descriptor
+subset_data_intf = {
+ .bLength = sizeof subset_data_intf,
+ .bDescriptorType = USB_DT_INTERFACE,
+
+ .bInterfaceNumber = 0,
+ .bAlternateSetting = 0,
+ .bNumEndpoints = 2,
+ .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
+ .bInterfaceSubClass = 0,
+ .bInterfaceProtocol = 0,
+ .iInterface = STRING_DATA,
+};
+
+#endif /* SUBSET */
+
+
+static struct usb_endpoint_descriptor
+fs_source_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+};
+
+static struct usb_endpoint_descriptor
+fs_sink_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bEndpointAddress = USB_DIR_OUT,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+};
+
+static const struct usb_descriptor_header *fs_eth_function [11] = {
+ (struct usb_descriptor_header *) &otg_descriptor,
+#ifdef DEV_CONFIG_CDC
+ /* "cdc" mode descriptors */
+ (struct usb_descriptor_header *) &control_intf,
+ (struct usb_descriptor_header *) &header_desc,
+ (struct usb_descriptor_header *) &union_desc,
+ (struct usb_descriptor_header *) &ether_desc,
+ /* NOTE: status endpoint may need to be removed */
+ (struct usb_descriptor_header *) &fs_status_desc,
+ /* data interface, with altsetting */
+ (struct usb_descriptor_header *) &data_nop_intf,
+ (struct usb_descriptor_header *) &data_intf,
+ (struct usb_descriptor_header *) &fs_source_desc,
+ (struct usb_descriptor_header *) &fs_sink_desc,
+ NULL,
+#endif /* DEV_CONFIG_CDC */
+};
+
+static inline void __init fs_subset_descriptors(void)
+{
+#ifdef DEV_CONFIG_SUBSET
+ fs_eth_function[1] = (struct usb_descriptor_header *) &subset_data_intf;
+ fs_eth_function[2] = (struct usb_descriptor_header *) &fs_source_desc;
+ fs_eth_function[3] = (struct usb_descriptor_header *) &fs_sink_desc;
+ fs_eth_function[4] = NULL;
+#else
+ fs_eth_function[1] = NULL;
+#endif
+}
+
+#ifdef CONFIG_USB_ETH_RNDIS
+static const struct usb_descriptor_header *fs_rndis_function [] = {
+ (struct usb_descriptor_header *) &otg_descriptor,
+ /* control interface matches ACM, not Ethernet */
+ (struct usb_descriptor_header *) &rndis_control_intf,
+ (struct usb_descriptor_header *) &header_desc,
+ (struct usb_descriptor_header *) &call_mgmt_descriptor,
+ (struct usb_descriptor_header *) &acm_descriptor,
+ (struct usb_descriptor_header *) &union_desc,
+ (struct usb_descriptor_header *) &fs_status_desc,
+ /* data interface has no altsetting */
+ (struct usb_descriptor_header *) &rndis_data_intf,
+ (struct usb_descriptor_header *) &fs_source_desc,
+ (struct usb_descriptor_header *) &fs_sink_desc,
+ NULL,
+};
+#endif
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+
+/*
+ * usb 2.0 devices need to expose both high speed and full speed
+ * descriptors, unless they only run at full speed.
+ */
+
+#if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS)
+static struct usb_endpoint_descriptor
+hs_status_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .wMaxPacketSize = __constant_cpu_to_le16 (STATUS_BYTECOUNT),
+ .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4,
+};
+#endif /* DEV_CONFIG_CDC */
+
+static struct usb_endpoint_descriptor
+hs_source_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16 (512),
+};
+
+static struct usb_endpoint_descriptor
+hs_sink_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16 (512),
+};
+
+static struct usb_qualifier_descriptor
+dev_qualifier = {
+ .bLength = sizeof dev_qualifier,
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+
+ .bcdUSB = __constant_cpu_to_le16 (0x0200),
+ .bDeviceClass = USB_CLASS_COMM,
+
+ .bNumConfigurations = 1,
+};
+
+static const struct usb_descriptor_header *hs_eth_function [11] = {
+ (struct usb_descriptor_header *) &otg_descriptor,
+#ifdef DEV_CONFIG_CDC
+ /* "cdc" mode descriptors */
+ (struct usb_descriptor_header *) &control_intf,
+ (struct usb_descriptor_header *) &header_desc,
+ (struct usb_descriptor_header *) &union_desc,
+ (struct usb_descriptor_header *) &ether_desc,
+ /* NOTE: status endpoint may need to be removed */
+ (struct usb_descriptor_header *) &hs_status_desc,
+ /* data interface, with altsetting */
+ (struct usb_descriptor_header *) &data_nop_intf,
+ (struct usb_descriptor_header *) &data_intf,
+ (struct usb_descriptor_header *) &hs_source_desc,
+ (struct usb_descriptor_header *) &hs_sink_desc,
+ NULL,
+#endif /* DEV_CONFIG_CDC */
+};
+
+static inline void __init hs_subset_descriptors(void)
+{
+#ifdef DEV_CONFIG_SUBSET
+ hs_eth_function[1] = (struct usb_descriptor_header *) &subset_data_intf;
+ hs_eth_function[2] = (struct usb_descriptor_header *) &fs_source_desc;
+ hs_eth_function[3] = (struct usb_descriptor_header *) &fs_sink_desc;
+ hs_eth_function[4] = NULL;
+#else
+ hs_eth_function[1] = NULL;
+#endif
+}
+
+#ifdef CONFIG_USB_ETH_RNDIS
+static const struct usb_descriptor_header *hs_rndis_function [] = {
+ (struct usb_descriptor_header *) &otg_descriptor,
+ /* control interface matches ACM, not Ethernet */
+ (struct usb_descriptor_header *) &rndis_control_intf,
+ (struct usb_descriptor_header *) &header_desc,
+ (struct usb_descriptor_header *) &call_mgmt_descriptor,
+ (struct usb_descriptor_header *) &acm_descriptor,
+ (struct usb_descriptor_header *) &union_desc,
+ (struct usb_descriptor_header *) &hs_status_desc,
+ /* data interface has no altsetting */
+ (struct usb_descriptor_header *) &rndis_data_intf,
+ (struct usb_descriptor_header *) &hs_source_desc,
+ (struct usb_descriptor_header *) &hs_sink_desc,
+ NULL,
+};
+#endif
+
+
+/* maxpacket and other transfer characteristics vary by speed. */
+#define ep_desc(g,hs,fs) (((g)->speed==USB_SPEED_HIGH)?(hs):(fs))
+
+#else
+
+/* if there's no high speed support, maxpacket doesn't change. */
+#define ep_desc(g,hs,fs) fs
+
+static inline void __init hs_subset_descriptors(void)
+{
+}
+
+#endif /* !CONFIG_USB_GADGET_DUALSPEED */
+
+/*-------------------------------------------------------------------------*/
+
+/* descriptors that are built on-demand */
+
+static char manufacturer [50];
+static char product_desc [40] = DRIVER_DESC;
+
+#ifdef DEV_CONFIG_CDC
+/* address that the host will use ... usually assigned at random */
+static char ethaddr [2 * ETH_ALEN + 1];
+#endif
+
+/* static strings, in UTF-8 */
+static struct usb_string strings [] = {
+ { STRING_MANUFACTURER, manufacturer, },
+ { STRING_PRODUCT, product_desc, },
+ { STRING_DATA, "Ethernet Data", },
+#ifdef DEV_CONFIG_CDC
+ { STRING_CDC, "CDC Ethernet", },
+ { STRING_ETHADDR, ethaddr, },
+ { STRING_CONTROL, "CDC Communications Control", },
+#endif
+#ifdef DEV_CONFIG_SUBSET
+ { STRING_SUBSET, "CDC Ethernet Subset", },
+#endif
+#ifdef CONFIG_USB_ETH_RNDIS
+ { STRING_RNDIS, "RNDIS", },
+ { STRING_RNDIS_CONTROL, "RNDIS Communications Control", },
+#endif
+ { } /* end of list */
+};
+
+static struct usb_gadget_strings stringtab = {
+ .language = 0x0409, /* en-us */
+ .strings = strings,
+};
+
+/*
+ * one config, two interfaces: control, data.
+ * complications: class descriptors, and an altsetting.
+ */
+static int
+config_buf (enum usb_device_speed speed,
+ u8 *buf, u8 type,
+ unsigned index, int is_otg)
+{
+ int len;
+ const struct usb_config_descriptor *config;
+ const struct usb_descriptor_header **function;
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ int hs = (speed == USB_SPEED_HIGH);
+
+ if (type == USB_DT_OTHER_SPEED_CONFIG)
+ hs = !hs;
+#define which_fn(t) (hs ? hs_ ## t ## _function : fs_ ## t ## _function)
+#else
+#define which_fn(t) (fs_ ## t ## _function)
+#endif
+
+ if (index >= device_desc.bNumConfigurations)
+ return -EINVAL;
+
+#ifdef CONFIG_USB_ETH_RNDIS
+ /* list the RNDIS config first, to make Microsoft's drivers
+ * happy. DOCSIS 1.0 needs this too.
+ */
+ if (device_desc.bNumConfigurations == 2 && index == 0) {
+ config = &rndis_config;
+ function = which_fn (rndis);
+ } else
+#endif
+ {
+ config = &eth_config;
+ function = which_fn (eth);
+ }
+
+ /* for now, don't advertise srp-only devices */
+ if (!is_otg)
+ function++;
+
+ len = usb_gadget_config_buf (config, buf, USB_BUFSIZ, function);
+ if (len < 0)
+ return len;
+ ((struct usb_config_descriptor *) buf)->bDescriptorType = type;
+ return len;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void eth_start (struct eth_dev *dev, int gfp_flags);
+static int alloc_requests (struct eth_dev *dev, unsigned n, int gfp_flags);
+
+#ifdef DEV_CONFIG_CDC
+static inline int ether_alt_ep_setup (struct eth_dev *dev, struct usb_ep *ep)
+{
+ const struct usb_endpoint_descriptor *d;
+
+ /* With CDC, the host isn't allowed to use these two data
+ * endpoints in the default altsetting for the interface.
+ * so we don't activate them yet. Reset from SET_INTERFACE.
+ *
+ * Strictly speaking RNDIS should work the same: activation is
+ * a side effect of setting a packet filter. Deactivation is
+ * from REMOTE_NDIS_HALT_MSG, reset from REMOTE_NDIS_RESET_MSG.
+ */
+
+ /* one endpoint writes data back IN to the host */
+ if (strcmp (ep->name, EP_IN_NAME) == 0) {
+ d = ep_desc (dev->gadget, &hs_source_desc, &fs_source_desc);
+ ep->driver_data = dev;
+ dev->in = d;
+
+ /* one endpoint just reads OUT packets */
+ } else if (strcmp (ep->name, EP_OUT_NAME) == 0) {
+ d = ep_desc (dev->gadget, &hs_sink_desc, &fs_sink_desc);
+ ep->driver_data = dev;
+ dev->out = d;
+
+ /* optional status/notification endpoint */
+ } else if (EP_STATUS_NAME &&
+ strcmp (ep->name, EP_STATUS_NAME) == 0) {
+ int result;
+
+ d = ep_desc (dev->gadget, &hs_status_desc, &fs_status_desc);
+ result = usb_ep_enable (ep, d);
+ if (result < 0)
+ return result;
+
+ ep->driver_data = dev;
+ dev->status = d;
+ }
+ return 0;
+}
+#endif
+
+#if defined(DEV_CONFIG_SUBSET) || defined(CONFIG_USB_ETH_RNDIS)
+static inline int ether_ep_setup (struct eth_dev *dev, struct usb_ep *ep)
+{
+ int result;
+ const struct usb_endpoint_descriptor *d;
+
+ /* CDC subset is simpler: if the device is there,
+ * it's live with rx and tx endpoints.
+ *
+ * Do this as a shortcut for RNDIS too.
+ */
+
+ /* one endpoint writes data back IN to the host */
+ if (strcmp (ep->name, EP_IN_NAME) == 0) {
+ d = ep_desc (dev->gadget, &hs_source_desc, &fs_source_desc);
+ result = usb_ep_enable (ep, d);
+ if (result < 0)
+ return result;
+
+ ep->driver_data = dev;
+ dev->in = d;
+
+ /* one endpoint just reads OUT packets */
+ } else if (strcmp (ep->name, EP_OUT_NAME) == 0) {
+ d = ep_desc (dev->gadget, &hs_sink_desc, &fs_sink_desc);
+ result = usb_ep_enable (ep, d);
+ if (result < 0)
+ return result;
+
+ ep->driver_data = dev;
+ dev->out = d;
+ }
+
+ return 0;
+}
+#endif
+
+static int
+set_ether_config (struct eth_dev *dev, int gfp_flags)
+{
+ int result = 0;
+ struct usb_ep *ep;
+ struct usb_gadget *gadget = dev->gadget;
+
+ gadget_for_each_ep (ep, gadget) {
+#ifdef DEV_CONFIG_CDC
+ if (!dev->rndis && dev->cdc) {
+ result = ether_alt_ep_setup (dev, ep);
+ if (result == 0)
+ continue;
+ }
+#endif
+
+#ifdef CONFIG_USB_ETH_RNDIS
+ if (dev->rndis && strcmp (ep->name, EP_STATUS_NAME) == 0) {
+ const struct usb_endpoint_descriptor *d;
+ d = ep_desc (gadget, &hs_status_desc, &fs_status_desc);
+ result = usb_ep_enable (ep, d);
+ if (result == 0) {
+ ep->driver_data = dev;
+ dev->status = d;
+ continue;
+ }
+ } else
+#endif
+
+ {
+#if defined(DEV_CONFIG_SUBSET) || defined(CONFIG_USB_ETH_RNDIS)
+ result = ether_ep_setup (dev, ep);
+ if (result == 0)
+ continue;
+#endif
+ }
+
+ /* stop on error */
+ ERROR (dev, "can't enable %s, result %d\n", ep->name, result);
+ break;
+ }
+ if (!result && (!dev->in_ep || !dev->out_ep))
+ result = -ENODEV;
+
+ if (result == 0)
+ result = alloc_requests (dev, qlen (gadget), gfp_flags);
+
+ /* on error, disable any endpoints */
+ if (result < 0) {
+#if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS)
+ if (dev->status)
+ (void) usb_ep_disable (dev->status_ep);
+#endif
+ dev->status = NULL;
+#if defined(DEV_CONFIG_SUBSET) || defined(CONFIG_USB_ETH_RNDIS)
+ if (dev->rndis || !dev->cdc) {
+ if (dev->in)
+ (void) usb_ep_disable (dev->in_ep);
+ if (dev->out)
+ (void) usb_ep_disable (dev->out_ep);
+ }
+#endif
+ dev->in = NULL;
+ dev->out = NULL;
+ } else
+
+ /* activate non-CDC configs right away
+ * this isn't strictly according to the RNDIS spec
+ */
+#if defined(DEV_CONFIG_SUBSET) || defined(CONFIG_USB_ETH_RNDIS)
+ if (dev->rndis || !dev->cdc) {
+ netif_carrier_on (dev->net);
+ if (netif_running (dev->net)) {
+ spin_unlock (&dev->lock);
+ eth_start (dev, GFP_ATOMIC);
+ spin_lock (&dev->lock);
+ }
+ }
+#endif
+
+ if (result == 0)
+ DEBUG (dev, "qlen %d\n", qlen (gadget));
+
+ /* caller is responsible for cleanup on error */
+ return result;
+}
+
+static void eth_reset_config (struct eth_dev *dev)
+{
+ struct usb_request *req;
+
+ if (dev->config == 0)
+ return;
+
+ DEBUG (dev, "%s\n", __FUNCTION__);
+
+ netif_stop_queue (dev->net);
+ netif_carrier_off (dev->net);
+
+ /* disable endpoints, forcing (synchronous) completion of
+ * pending i/o. then free the requests.
+ */
+ if (dev->in) {
+ usb_ep_disable (dev->in_ep);
+ while (likely (!list_empty (&dev->tx_reqs))) {
+ req = container_of (dev->tx_reqs.next,
+ struct usb_request, list);
+ list_del (&req->list);
+ usb_ep_free_request (dev->in_ep, req);
+ }
+ }
+ if (dev->out) {
+ usb_ep_disable (dev->out_ep);
+ while (likely (!list_empty (&dev->rx_reqs))) {
+ req = container_of (dev->rx_reqs.next,
+ struct usb_request, list);
+ list_del (&req->list);
+ usb_ep_free_request (dev->out_ep, req);
+ }
+ }
+
+ if (dev->status) {
+ usb_ep_disable (dev->status_ep);
+ }
+ dev->config = 0;
+}
+
+/* change our operational config. must agree with the code
+ * that returns config descriptors, and altsetting code.
+ */
+static int
+eth_set_config (struct eth_dev *dev, unsigned number, int gfp_flags)
+{
+ int result = 0;
+ struct usb_gadget *gadget = dev->gadget;
+
+ if (number == dev->config)
+ return 0;
+
+ if (gadget_is_sa1100 (gadget)
+ && dev->config
+ && atomic_read (&dev->tx_qlen) != 0) {
+ /* tx fifo is full, but we can't clear it...*/
+ INFO (dev, "can't change configurations\n");
+ return -ESPIPE;
+ }
+ eth_reset_config (dev);
+
+ /* default: pass all packets, no multicast filtering */
+ dev->cdc_filter = 0x000f;
+
+ switch (number) {
+ case DEV_CONFIG_VALUE:
+ dev->rndis = 0;
+ result = set_ether_config (dev, gfp_flags);
+ break;
+#ifdef CONFIG_USB_ETH_RNDIS
+ case DEV_RNDIS_CONFIG_VALUE:
+ dev->rndis = 1;
+ result = set_ether_config (dev, gfp_flags);
+ break;
+#endif
+ default:
+ result = -EINVAL;
+ /* FALL THROUGH */
+ case 0:
+ break;
+ }
+
+ if (result) {
+ if (number)
+ eth_reset_config (dev);
+ usb_gadget_vbus_draw(dev->gadget,
+ dev->gadget->is_otg ? 8 : 100);
+ } else {
+ char *speed;
+ unsigned power;
+
+ power = 2 * eth_config.bMaxPower;
+ usb_gadget_vbus_draw(dev->gadget, power);
+
+ switch (gadget->speed) {
+ case USB_SPEED_FULL: speed = "full"; break;
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ case USB_SPEED_HIGH: speed = "high"; break;
+#endif
+ default: speed = "?"; break;
+ }
+
+ dev->config = number;
+ INFO (dev, "%s speed config #%d: %d mA, %s, using %s\n",
+ speed, number, power, driver_desc,
+ dev->rndis
+ ? "RNDIS"
+ : (dev->cdc
+ ? "CDC Ethernet"
+ : "CDC Ethernet Subset"));
+ }
+ return result;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef DEV_CONFIG_CDC
+
+static void eth_status_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ struct usb_cdc_notification *event = req->buf;
+ int value = req->status;
+ struct eth_dev *dev = ep->driver_data;
+
+ /* issue the second notification if host reads the first */
+ if (event->bNotificationType == USB_CDC_NOTIFY_NETWORK_CONNECTION
+ && value == 0) {
+ __le32 *data = req->buf + sizeof *event;
+
+ event->bmRequestType = 0xA1;
+ event->bNotificationType = USB_CDC_NOTIFY_SPEED_CHANGE;
+ event->wValue = __constant_cpu_to_le16 (0);
+ event->wIndex = __constant_cpu_to_le16 (1);
+ event->wLength = __constant_cpu_to_le16 (8);
+
+ /* SPEED_CHANGE data is up/down speeds in bits/sec */
+ data [0] = data [1] = cpu_to_le32 (BITRATE (dev->gadget));
+
+ req->length = STATUS_BYTECOUNT;
+ value = usb_ep_queue (ep, req, GFP_ATOMIC);
+ DEBUG (dev, "send SPEED_CHANGE --> %d\n", value);
+ if (value == 0)
+ return;
+ } else if (value != -ECONNRESET)
+ DEBUG (dev, "event %02x --> %d\n",
+ event->bNotificationType, value);
+ event->bmRequestType = 0xff;
+}
+
+static void issue_start_status (struct eth_dev *dev)
+{
+ struct usb_request *req = dev->stat_req;
+ struct usb_cdc_notification *event;
+ int value;
+
+ DEBUG (dev, "%s, flush old status first\n", __FUNCTION__);
+
+ /* flush old status
+ *
+ * FIXME ugly idiom, maybe we'd be better with just
+ * a "cancel the whole queue" primitive since any
+ * unlink-one primitive has way too many error modes.
+ * here, we "know" toggle is already clear...
+ */
+ usb_ep_disable (dev->status_ep);
+ usb_ep_enable (dev->status_ep, dev->status);
+
+ /* 3.8.1 says to issue first NETWORK_CONNECTION, then
+ * a SPEED_CHANGE. could be useful in some configs.
+ */
+ event = req->buf;
+ event->bmRequestType = 0xA1;
+ event->bNotificationType = USB_CDC_NOTIFY_NETWORK_CONNECTION;
+ event->wValue = __constant_cpu_to_le16 (1); /* connected */
+ event->wIndex = __constant_cpu_to_le16 (1);
+ event->wLength = 0;
+
+ req->length = sizeof *event;
+ req->complete = eth_status_complete;
+ value = usb_ep_queue (dev->status_ep, req, GFP_ATOMIC);
+ if (value < 0)
+ DEBUG (dev, "status buf queue --> %d\n", value);
+}
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static void eth_setup_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ if (req->status || req->actual != req->length)
+ DEBUG ((struct eth_dev *) ep->driver_data,
+ "setup complete --> %d, %d/%d\n",
+ req->status, req->actual, req->length);
+}
+
+#ifdef CONFIG_USB_ETH_RNDIS
+
+static void rndis_response_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ if (req->status || req->actual != req->length)
+ DEBUG ((struct eth_dev *) ep->driver_data,
+ "rndis response complete --> %d, %d/%d\n",
+ req->status, req->actual, req->length);
+
+ /* done sending after USB_CDC_GET_ENCAPSULATED_RESPONSE */
+}
+
+static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ struct eth_dev *dev = ep->driver_data;
+ int status;
+
+ /* received RNDIS command from USB_CDC_SEND_ENCAPSULATED_COMMAND */
+ spin_lock(&dev->lock);
+ status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf);
+ if (status < 0)
+ ERROR(dev, "%s: rndis parse error %d\n", __FUNCTION__, status);
+ spin_unlock(&dev->lock);
+}
+
+#endif /* RNDIS */
+
+/*
+ * The setup() callback implements all the ep0 functionality that's not
+ * handled lower down. CDC has a number of less-common features:
+ *
+ * - two interfaces: control, and ethernet data
+ * - Ethernet data interface has two altsettings: default, and active
+ * - class-specific descriptors for the control interface
+ * - class-specific control requests
+ */
+static int
+eth_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
+{
+ struct eth_dev *dev = get_gadget_data (gadget);
+ struct usb_request *req = dev->req;
+ int value = -EOPNOTSUPP;
+ u16 wIndex = ctrl->wIndex;
+ u16 wValue = ctrl->wValue;
+ u16 wLength = ctrl->wLength;
+
+ /* descriptors just go into the pre-allocated ep0 buffer,
+ * while config change events may enable network traffic.
+ */
+ req->complete = eth_setup_complete;
+ switch (ctrl->bRequest) {
+
+ case USB_REQ_GET_DESCRIPTOR:
+ if (ctrl->bRequestType != USB_DIR_IN)
+ break;
+ switch (wValue >> 8) {
+
+ case USB_DT_DEVICE:
+ value = min (wLength, (u16) sizeof device_desc);
+ memcpy (req->buf, &device_desc, value);
+ break;
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ case USB_DT_DEVICE_QUALIFIER:
+ if (!gadget->is_dualspeed)
+ break;
+ value = min (wLength, (u16) sizeof dev_qualifier);
+ memcpy (req->buf, &dev_qualifier, value);
+ break;
+
+ case USB_DT_OTHER_SPEED_CONFIG:
+ if (!gadget->is_dualspeed)
+ break;
+ // FALLTHROUGH
+#endif /* CONFIG_USB_GADGET_DUALSPEED */
+ case USB_DT_CONFIG:
+ value = config_buf (gadget->speed, req->buf,
+ wValue >> 8,
+ wValue & 0xff,
+ gadget->is_otg);
+ if (value >= 0)
+ value = min (wLength, (u16) value);
+ break;
+
+ case USB_DT_STRING:
+ value = usb_gadget_get_string (&stringtab,
+ wValue & 0xff, req->buf);
+ if (value >= 0)
+ value = min (wLength, (u16) value);
+ break;
+ }
+ break;
+
+ case USB_REQ_SET_CONFIGURATION:
+ if (ctrl->bRequestType != 0)
+ break;
+ if (gadget->a_hnp_support)
+ DEBUG (dev, "HNP available\n");
+ else if (gadget->a_alt_hnp_support)
+ DEBUG (dev, "HNP needs a different root port\n");
+ spin_lock (&dev->lock);
+ value = eth_set_config (dev, wValue, GFP_ATOMIC);
+ spin_unlock (&dev->lock);
+ break;
+ case USB_REQ_GET_CONFIGURATION:
+ if (ctrl->bRequestType != USB_DIR_IN)
+ break;
+ *(u8 *)req->buf = dev->config;
+ value = min (wLength, (u16) 1);
+ break;
+
+ case USB_REQ_SET_INTERFACE:
+ if (ctrl->bRequestType != USB_RECIP_INTERFACE
+ || !dev->config
+ || wIndex > 1)
+ break;
+ if (!dev->cdc && wIndex != 0)
+ break;
+ spin_lock (&dev->lock);
+
+ /* PXA hardware partially handles SET_INTERFACE;
+ * we need to kluge around that interference.
+ */
+ if (gadget_is_pxa (gadget)) {
+ value = eth_set_config (dev, DEV_CONFIG_VALUE,
+ GFP_ATOMIC);
+ goto done_set_intf;
+ }
+
+#ifdef DEV_CONFIG_CDC
+ switch (wIndex) {
+ case 0: /* control/master intf */
+ if (wValue != 0)
+ break;
+ if (dev->status) {
+ usb_ep_disable (dev->status_ep);
+ usb_ep_enable (dev->status_ep, dev->status);
+ }
+ value = 0;
+ break;
+ case 1: /* data intf */
+ if (wValue > 1)
+ break;
+ usb_ep_disable (dev->in_ep);
+ usb_ep_disable (dev->out_ep);
+
+ /* CDC requires the data transfers not be done from
+ * the default interface setting ... also, setting
+ * the non-default interface clears filters etc.
+ */
+ if (wValue == 1) {
+ usb_ep_enable (dev->in_ep, dev->in);
+ usb_ep_enable (dev->out_ep, dev->out);
+ dev->cdc_filter = DEFAULT_FILTER;
+ netif_carrier_on (dev->net);
+ if (dev->status)
+ issue_start_status (dev);
+ if (netif_running (dev->net)) {
+ spin_unlock (&dev->lock);
+ eth_start (dev, GFP_ATOMIC);
+ spin_lock (&dev->lock);
+ }
+ } else {
+ netif_stop_queue (dev->net);
+ netif_carrier_off (dev->net);
+ }
+ value = 0;
+ break;
+ }
+#else
+ /* FIXME this is wrong, as is the assumption that
+ * all non-PXA hardware talks real CDC ...
+ */
+ dev_warn (&gadget->dev, "set_interface ignored!\n");
+#endif /* DEV_CONFIG_CDC */
+
+done_set_intf:
+ spin_unlock (&dev->lock);
+ break;
+ case USB_REQ_GET_INTERFACE:
+ if (ctrl->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE)
+ || !dev->config
+ || wIndex > 1)
+ break;
+ if (!(dev->cdc || dev->rndis) && wIndex != 0)
+ break;
+
+ /* for CDC, iff carrier is on, data interface is active. */
+ if (dev->rndis || wIndex != 1)
+ *(u8 *)req->buf = 0;
+ else
+ *(u8 *)req->buf = netif_carrier_ok (dev->net) ? 1 : 0;
+ value = min (wLength, (u16) 1);
+ break;
+
+#ifdef DEV_CONFIG_CDC
+ case USB_CDC_SET_ETHERNET_PACKET_FILTER:
+ /* see 6.2.30: no data, wIndex = interface,
+ * wValue = packet filter bitmap
+ */
+ if (ctrl->bRequestType != (USB_TYPE_CLASS|USB_RECIP_INTERFACE)
+ || !dev->cdc
+ || dev->rndis
+ || wLength != 0
+ || wIndex > 1)
+ break;
+ DEBUG (dev, "packet filter %02x\n", wValue);
+ dev->cdc_filter = wValue;
+ value = 0;
+ break;
+
+ /* and potentially:
+ * case USB_CDC_SET_ETHERNET_MULTICAST_FILTERS:
+ * case USB_CDC_SET_ETHERNET_PM_PATTERN_FILTER:
+ * case USB_CDC_GET_ETHERNET_PM_PATTERN_FILTER:
+ * case USB_CDC_GET_ETHERNET_STATISTIC:
+ */
+
+#endif /* DEV_CONFIG_CDC */
+
+#ifdef CONFIG_USB_ETH_RNDIS
+ /* RNDIS uses the CDC command encapsulation mechanism to implement
+ * an RPC scheme, with much getting/setting of attributes by OID.
+ */
+ case USB_CDC_SEND_ENCAPSULATED_COMMAND:
+ if (ctrl->bRequestType != (USB_TYPE_CLASS|USB_RECIP_INTERFACE)
+ || !dev->rndis
+ || wLength > USB_BUFSIZ
+ || wValue
+ || rndis_control_intf.bInterfaceNumber
+ != wIndex)
+ break;
+ /* read the request, then process it */
+ value = wLength;
+ req->complete = rndis_command_complete;
+ /* later, rndis_control_ack () sends a notification */
+ break;
+
+ case USB_CDC_GET_ENCAPSULATED_RESPONSE:
+ if ((USB_DIR_IN|USB_TYPE_CLASS|USB_RECIP_INTERFACE)
+ == ctrl->bRequestType
+ && dev->rndis
+ // && wLength >= 0x0400
+ && !wValue
+ && rndis_control_intf.bInterfaceNumber
+ == wIndex) {
+ u8 *buf;
+
+ /* return the result */
+ buf = rndis_get_next_response (dev->rndis_config,
+ &value);
+ if (buf) {
+ memcpy (req->buf, buf, value);
+ req->complete = rndis_response_complete;
+ rndis_free_response(dev->rndis_config, buf);
+ }
+ /* else stalls ... spec says to avoid that */
+ }
+ break;
+#endif /* RNDIS */
+
+ default:
+ VDEBUG (dev,
+ "unknown control req%02x.%02x v%04x i%04x l%d\n",
+ ctrl->bRequestType, ctrl->bRequest,
+ wValue, wIndex, wLength);
+ }
+
+ /* respond with data transfer before status phase? */
+ if (value >= 0) {
+ req->length = value;
+ req->zero = value < wLength
+ && (value % gadget->ep0->maxpacket) == 0;
+ value = usb_ep_queue (gadget->ep0, req, GFP_ATOMIC);
+ if (value < 0) {
+ DEBUG (dev, "ep_queue --> %d\n", value);
+ req->status = 0;
+ eth_setup_complete (gadget->ep0, req);
+ }
+ }
+
+ /* host either stalls (value < 0) or reports success */
+ return value;
+}
+
+static void
+eth_disconnect (struct usb_gadget *gadget)
+{
+ struct eth_dev *dev = get_gadget_data (gadget);
+ unsigned long flags;
+
+ spin_lock_irqsave (&dev->lock, flags);
+ netif_stop_queue (dev->net);
+ netif_carrier_off (dev->net);
+ eth_reset_config (dev);
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ /* FIXME RNDIS should enter RNDIS_UNINITIALIZED */
+
+ /* next we may get setup() calls to enumerate new connections;
+ * or an unbind() during shutdown (including removing module).
+ */
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* NETWORK DRIVER HOOKUP (to the layer above this driver) */
+
+static int eth_change_mtu (struct net_device *net, int new_mtu)
+{
+ struct eth_dev *dev = netdev_priv(net);
+
+ // FIXME if rndis, don't change while link's live
+
+ if (new_mtu <= ETH_HLEN || new_mtu > ETH_FRAME_LEN)
+ return -ERANGE;
+ /* no zero-length packet read wanted after mtu-sized packets */
+ if (((new_mtu + sizeof (struct ethhdr)) % dev->in_ep->maxpacket) == 0)
+ return -EDOM;
+ net->mtu = new_mtu;
+ return 0;
+}
+
+static struct net_device_stats *eth_get_stats (struct net_device *net)
+{
+ return &((struct eth_dev *)netdev_priv(net))->stats;
+}
+
+static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *p)
+{
+ struct eth_dev *dev = netdev_priv(net);
+ strlcpy(p->driver, shortname, sizeof p->driver);
+ strlcpy(p->version, DRIVER_VERSION, sizeof p->version);
+ strlcpy(p->fw_version, dev->gadget->name, sizeof p->fw_version);
+ strlcpy (p->bus_info, dev->gadget->dev.bus_id, sizeof p->bus_info);
+}
+
+static u32 eth_get_link(struct net_device *net)
+{
+ struct eth_dev *dev = netdev_priv(net);
+ return dev->gadget->speed != USB_SPEED_UNKNOWN;
+}
+
+static struct ethtool_ops ops = {
+ .get_drvinfo = eth_get_drvinfo,
+ .get_link = eth_get_link
+};
+
+static void defer_kevent (struct eth_dev *dev, int flag)
+{
+ if (test_and_set_bit (flag, &dev->todo))
+ return;
+ if (!schedule_work (&dev->work))
+ ERROR (dev, "kevent %d may have been dropped\n", flag);
+ else
+ DEBUG (dev, "kevent %d scheduled\n", flag);
+}
+
+static void rx_complete (struct usb_ep *ep, struct usb_request *req);
+
+static int
+rx_submit (struct eth_dev *dev, struct usb_request *req, int gfp_flags)
+{
+ struct sk_buff *skb;
+ int retval = -ENOMEM;
+ size_t size;
+
+ /* Padding up to RX_EXTRA handles minor disagreements with host.
+ * Normally we use the USB "terminate on short read" convention;
+ * so allow up to (N*maxpacket), since that memory is normally
+ * already allocated. Some hardware doesn't deal well with short
+ * reads (e.g. DMA must be N*maxpacket), so for now don't trim a
+ * byte off the end (to force hardware errors on overflow).
+ *
+ * RNDIS uses internal framing, and explicitly allows senders to
+ * pad to end-of-packet. That's potentially nice for speed,
+ * but means receivers can't recover synch on their own.
+ */
+ size = (sizeof (struct ethhdr) + dev->net->mtu + RX_EXTRA);
+ size += dev->out_ep->maxpacket - 1;
+#ifdef CONFIG_USB_ETH_RNDIS
+ if (dev->rndis)
+ size += sizeof (struct rndis_packet_msg_type);
+#endif
+ size -= size % dev->out_ep->maxpacket;
+
+ if ((skb = alloc_skb (size + NET_IP_ALIGN, gfp_flags)) == 0) {
+ DEBUG (dev, "no rx skb\n");
+ goto enomem;
+ }
+
+ /* Some platforms perform better when IP packets are aligned,
+ * but on at least one, checksumming fails otherwise. Note:
+ * this doesn't account for variable-sized RNDIS headers.
+ */
+ skb_reserve(skb, NET_IP_ALIGN);
+
+ req->buf = skb->data;
+ req->length = size;
+ req->complete = rx_complete;
+ req->context = skb;
+
+ retval = usb_ep_queue (dev->out_ep, req, gfp_flags);
+ if (retval == -ENOMEM)
+enomem:
+ defer_kevent (dev, WORK_RX_MEMORY);
+ if (retval) {
+ DEBUG (dev, "rx submit --> %d\n", retval);
+ dev_kfree_skb_any (skb);
+ spin_lock (&dev->lock);
+ list_add (&req->list, &dev->rx_reqs);
+ spin_unlock (&dev->lock);
+ }
+ return retval;
+}
+
+static void rx_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ struct sk_buff *skb = req->context;
+ struct eth_dev *dev = ep->driver_data;
+ int status = req->status;
+
+ switch (status) {
+
+ /* normal completion */
+ case 0:
+ skb_put (skb, req->actual);
+#ifdef CONFIG_USB_ETH_RNDIS
+ /* we know MaxPacketsPerTransfer == 1 here */
+ if (dev->rndis)
+ rndis_rm_hdr (req->buf, &(skb->len));
+#endif
+ if (ETH_HLEN > skb->len || skb->len > ETH_FRAME_LEN) {
+ dev->stats.rx_errors++;
+ dev->stats.rx_length_errors++;
+ DEBUG (dev, "rx length %d\n", skb->len);
+ break;
+ }
+
+ skb->dev = dev->net;
+ skb->protocol = eth_type_trans (skb, dev->net);
+ dev->stats.rx_packets++;
+ dev->stats.rx_bytes += skb->len;
+
+ /* no buffer copies needed, unless hardware can't
+ * use skb buffers.
+ */
+ status = netif_rx (skb);
+ skb = NULL;
+ break;
+
+ /* software-driven interface shutdown */
+ case -ECONNRESET: // unlink
+ case -ESHUTDOWN: // disconnect etc
+ VDEBUG (dev, "rx shutdown, code %d\n", status);
+ goto quiesce;
+
+ /* for hardware automagic (such as pxa) */
+ case -ECONNABORTED: // endpoint reset
+ DEBUG (dev, "rx %s reset\n", ep->name);
+ defer_kevent (dev, WORK_RX_MEMORY);
+quiesce:
+ dev_kfree_skb_any (skb);
+ goto clean;
+
+ /* data overrun */
+ case -EOVERFLOW:
+ dev->stats.rx_over_errors++;
+ // FALLTHROUGH
+
+ default:
+ dev->stats.rx_errors++;
+ DEBUG (dev, "rx status %d\n", status);
+ break;
+ }
+
+ if (skb)
+ dev_kfree_skb_any (skb);
+ if (!netif_running (dev->net)) {
+clean:
+ /* nobody reading rx_reqs, so no dev->lock */
+ list_add (&req->list, &dev->rx_reqs);
+ req = NULL;
+ }
+ if (req)
+ rx_submit (dev, req, GFP_ATOMIC);
+}
+
+static int prealloc (struct list_head *list, struct usb_ep *ep,
+ unsigned n, int gfp_flags)
+{
+ unsigned i;
+ struct usb_request *req;
+
+ if (!n)
+ return -ENOMEM;
+
+ /* queue/recycle up to N requests */
+ i = n;
+ list_for_each_entry (req, list, list) {
+ if (i-- == 0)
+ goto extra;
+ }
+ while (i--) {
+ req = usb_ep_alloc_request (ep, gfp_flags);
+ if (!req)
+ return list_empty (list) ? -ENOMEM : 0;
+ list_add (&req->list, list);
+ }
+ return 0;
+
+extra:
+ /* free extras */
+ for (;;) {
+ struct list_head *next;
+
+ next = req->list.next;
+ list_del (&req->list);
+ usb_ep_free_request (ep, req);
+
+ if (next == list)
+ break;
+
+ req = container_of (next, struct usb_request, list);
+ }
+ return 0;
+}
+
+static int alloc_requests (struct eth_dev *dev, unsigned n, int gfp_flags)
+{
+ int status;
+
+ status = prealloc (&dev->tx_reqs, dev->in_ep, n, gfp_flags);
+ if (status < 0)
+ goto fail;
+ status = prealloc (&dev->rx_reqs, dev->out_ep, n, gfp_flags);
+ if (status < 0)
+ goto fail;
+ return 0;
+fail:
+ DEBUG (dev, "can't alloc requests\n");
+ return status;
+}
+
+static void rx_fill (struct eth_dev *dev, int gfp_flags)
+{
+ struct usb_request *req;
+ unsigned long flags;
+
+ clear_bit (WORK_RX_MEMORY, &dev->todo);
+
+ /* fill unused rxq slots with some skb */
+ spin_lock_irqsave (&dev->lock, flags);
+ while (!list_empty (&dev->rx_reqs)) {
+ req = container_of (dev->rx_reqs.next,
+ struct usb_request, list);
+ list_del_init (&req->list);
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ if (rx_submit (dev, req, gfp_flags) < 0) {
+ defer_kevent (dev, WORK_RX_MEMORY);
+ return;
+ }
+
+ spin_lock_irqsave (&dev->lock, flags);
+ }
+ spin_unlock_irqrestore (&dev->lock, flags);
+}
+
+static void eth_work (void *_dev)
+{
+ struct eth_dev *dev = _dev;
+
+ if (test_bit (WORK_RX_MEMORY, &dev->todo)) {
+ if (netif_running (dev->net))
+ rx_fill (dev, GFP_KERNEL);
+ else
+ clear_bit (WORK_RX_MEMORY, &dev->todo);
+ }
+
+ if (dev->todo)
+ DEBUG (dev, "work done, flags = 0x%lx\n", dev->todo);
+}
+
+static void tx_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ struct sk_buff *skb = req->context;
+ struct eth_dev *dev = ep->driver_data;
+
+ switch (req->status) {
+ default:
+ dev->stats.tx_errors++;
+ VDEBUG (dev, "tx err %d\n", req->status);
+ /* FALLTHROUGH */
+ case -ECONNRESET: // unlink
+ case -ESHUTDOWN: // disconnect etc
+ break;
+ case 0:
+ dev->stats.tx_bytes += skb->len;
+ }
+ dev->stats.tx_packets++;
+
+ spin_lock (&dev->lock);
+ list_add (&req->list, &dev->tx_reqs);
+ spin_unlock (&dev->lock);
+ dev_kfree_skb_any (skb);
+
+ atomic_dec (&dev->tx_qlen);
+ if (netif_carrier_ok (dev->net))
+ netif_wake_queue (dev->net);
+}
+
+static inline int eth_is_promisc (struct eth_dev *dev)
+{
+ /* no filters for the CDC subset; always promisc */
+ if (subset_active (dev))
+ return 1;
+ return dev->cdc_filter & USB_CDC_PACKET_TYPE_PROMISCUOUS;
+}
+
+static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
+{
+ struct eth_dev *dev = netdev_priv(net);
+ int length = skb->len;
+ int retval;
+ struct usb_request *req = NULL;
+ unsigned long flags;
+
+ /* apply outgoing CDC or RNDIS filters */
+ if (!eth_is_promisc (dev)) {
+ u8 *dest = skb->data;
+
+ if (dest [0] & 0x01) {
+ u16 type;
+
+ /* ignores USB_CDC_PACKET_TYPE_MULTICAST and host
+ * SET_ETHERNET_MULTICAST_FILTERS requests
+ */
+ if (memcmp (dest, net->broadcast, ETH_ALEN) == 0)
+ type = USB_CDC_PACKET_TYPE_BROADCAST;
+ else
+ type = USB_CDC_PACKET_TYPE_ALL_MULTICAST;
+ if (!(dev->cdc_filter & type)) {
+ dev_kfree_skb_any (skb);
+ return 0;
+ }
+ }
+ /* ignores USB_CDC_PACKET_TYPE_DIRECTED */
+ }
+
+ spin_lock_irqsave (&dev->lock, flags);
+ req = container_of (dev->tx_reqs.next, struct usb_request, list);
+ list_del (&req->list);
+ if (list_empty (&dev->tx_reqs))
+ netif_stop_queue (net);
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ /* no buffer copies needed, unless the network stack did it
+ * or the hardware can't use skb buffers.
+ * or there's not enough space for any RNDIS headers we need
+ */
+#ifdef CONFIG_USB_ETH_RNDIS
+ if (dev->rndis) {
+ struct sk_buff *skb_rndis;
+
+ skb_rndis = skb_realloc_headroom (skb,
+ sizeof (struct rndis_packet_msg_type));
+ if (!skb_rndis)
+ goto drop;
+
+ dev_kfree_skb_any (skb);
+ skb = skb_rndis;
+ rndis_add_hdr (skb);
+ length = skb->len;
+ }
+#endif
+ req->buf = skb->data;
+ req->context = skb;
+ req->complete = tx_complete;
+
+ /* use zlp framing on tx for strict CDC-Ether conformance,
+ * though any robust network rx path ignores extra padding.
+ * and some hardware doesn't like to write zlps.
+ */
+ req->zero = 1;
+ if (!dev->zlp && (length % dev->in_ep->maxpacket) == 0)
+ length++;
+
+ req->length = length;
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ /* throttle highspeed IRQ rate back slightly */
+ req->no_interrupt = (dev->gadget->speed == USB_SPEED_HIGH)
+ ? ((atomic_read (&dev->tx_qlen) % TX_DELAY) != 0)
+ : 0;
+#endif
+
+ retval = usb_ep_queue (dev->in_ep, req, GFP_ATOMIC);
+ switch (retval) {
+ default:
+ DEBUG (dev, "tx queue err %d\n", retval);
+ break;
+ case 0:
+ net->trans_start = jiffies;
+ atomic_inc (&dev->tx_qlen);
+ }
+
+ if (retval) {
+#ifdef CONFIG_USB_ETH_RNDIS
+drop:
+#endif
+ dev->stats.tx_dropped++;
+ dev_kfree_skb_any (skb);
+ spin_lock_irqsave (&dev->lock, flags);
+ if (list_empty (&dev->tx_reqs))
+ netif_start_queue (net);
+ list_add (&req->list, &dev->tx_reqs);
+ spin_unlock_irqrestore (&dev->lock, flags);
+ }
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_USB_ETH_RNDIS
+
+static void rndis_send_media_state (struct eth_dev *dev, int connect)
+{
+ if (!dev)
+ return;
+
+ if (connect) {
+ if (rndis_signal_connect (dev->rndis_config))
+ return;
+ } else {
+ if (rndis_signal_disconnect (dev->rndis_config))
+ return;
+ }
+}
+
+static void
+rndis_control_ack_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ if (req->status || req->actual != req->length)
+ DEBUG ((struct eth_dev *) ep->driver_data,
+ "rndis control ack complete --> %d, %d/%d\n",
+ req->status, req->actual, req->length);
+
+ usb_ep_free_buffer(ep, req->buf, req->dma, 8);
+ usb_ep_free_request(ep, req);
+}
+
+static int rndis_control_ack (struct net_device *net)
+{
+ struct eth_dev *dev = netdev_priv(net);
+ u32 length;
+ struct usb_request *resp;
+
+ /* in case RNDIS calls this after disconnect */
+ if (!dev->status_ep) {
+ DEBUG (dev, "status ENODEV\n");
+ return -ENODEV;
+ }
+
+ /* Allocate memory for notification ie. ACK */
+ resp = usb_ep_alloc_request (dev->status_ep, GFP_ATOMIC);
+ if (!resp) {
+ DEBUG (dev, "status ENOMEM\n");
+ return -ENOMEM;
+ }
+
+ resp->buf = usb_ep_alloc_buffer (dev->status_ep, 8,
+ &resp->dma, GFP_ATOMIC);
+ if (!resp->buf) {
+ DEBUG (dev, "status buf ENOMEM\n");
+ usb_ep_free_request (dev->status_ep, resp);
+ return -ENOMEM;
+ }
+
+ /* Send RNDIS RESPONSE_AVAILABLE notification;
+ * USB_CDC_NOTIFY_RESPONSE_AVAILABLE should work too
+ */
+ resp->length = 8;
+ resp->complete = rndis_control_ack_complete;
+
+ *((__le32 *) resp->buf) = __constant_cpu_to_le32 (1);
+ *((__le32 *) resp->buf + 1) = __constant_cpu_to_le32 (0);
+
+ length = usb_ep_queue (dev->status_ep, resp, GFP_ATOMIC);
+ if (length < 0) {
+ resp->status = 0;
+ rndis_control_ack_complete (dev->status_ep, resp);
+ }
+
+ return 0;
+}
+
+#endif /* RNDIS */
+
+static void eth_start (struct eth_dev *dev, int gfp_flags)
+{
+ DEBUG (dev, "%s\n", __FUNCTION__);
+
+ /* fill the rx queue */
+ rx_fill (dev, gfp_flags);
+
+ /* and open the tx floodgates */
+ atomic_set (&dev->tx_qlen, 0);
+ netif_wake_queue (dev->net);
+#ifdef CONFIG_USB_ETH_RNDIS
+ if (dev->rndis) {
+ rndis_set_param_medium (dev->rndis_config,
+ NDIS_MEDIUM_802_3,
+ BITRATE(dev->gadget));
+ rndis_send_media_state (dev, 1);
+ }
+#endif
+}
+
+static int eth_open (struct net_device *net)
+{
+ struct eth_dev *dev = netdev_priv(net);
+
+ DEBUG (dev, "%s\n", __FUNCTION__);
+ if (netif_carrier_ok (dev->net))
+ eth_start (dev, GFP_KERNEL);
+ return 0;
+}
+
+static int eth_stop (struct net_device *net)
+{
+ struct eth_dev *dev = netdev_priv(net);
+
+ VDEBUG (dev, "%s\n", __FUNCTION__);
+ netif_stop_queue (net);
+
+ DEBUG (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n",
+ dev->stats.rx_packets, dev->stats.tx_packets,
+ dev->stats.rx_errors, dev->stats.tx_errors
+ );
+
+ /* ensure there are no more active requests */
+ if (dev->config) {
+ usb_ep_disable (dev->in_ep);
+ usb_ep_disable (dev->out_ep);
+ if (netif_carrier_ok (dev->net)) {
+ DEBUG (dev, "host still using in/out endpoints\n");
+ // FIXME idiom may leave toggle wrong here
+ usb_ep_enable (dev->in_ep, dev->in);
+ usb_ep_enable (dev->out_ep, dev->out);
+ }
+ if (dev->status_ep) {
+ usb_ep_disable (dev->status_ep);
+ usb_ep_enable (dev->status_ep, dev->status);
+ }
+ }
+
+#ifdef CONFIG_USB_ETH_RNDIS
+ if (dev->rndis) {
+ rndis_set_param_medium (dev->rndis_config,
+ NDIS_MEDIUM_802_3, 0);
+ rndis_send_media_state (dev, 0);
+ }
+#endif
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct usb_request *eth_req_alloc (struct usb_ep *ep, unsigned size)
+{
+ struct usb_request *req;
+
+ req = usb_ep_alloc_request (ep, GFP_KERNEL);
+ if (!req)
+ return NULL;
+
+ req->buf = kmalloc (size, GFP_KERNEL);
+ if (!req->buf) {
+ usb_ep_free_request (ep, req);
+ req = NULL;
+ }
+ return req;
+}
+
+static void
+eth_req_free (struct usb_ep *ep, struct usb_request *req)
+{
+ kfree (req->buf);
+ usb_ep_free_request (ep, req);
+}
+
+
+static void
+eth_unbind (struct usb_gadget *gadget)
+{
+ struct eth_dev *dev = get_gadget_data (gadget);
+
+ DEBUG (dev, "unbind\n");
+#ifdef CONFIG_USB_ETH_RNDIS
+ rndis_deregister (dev->rndis_config);
+ rndis_exit ();
+#endif
+
+ /* we've already been disconnected ... no i/o is active */
+ if (dev->req) {
+ eth_req_free (gadget->ep0, dev->req);
+ dev->req = NULL;
+ }
+ if (dev->stat_req) {
+ eth_req_free (dev->status_ep, dev->stat_req);
+ dev->stat_req = NULL;
+ }
+
+ unregister_netdev (dev->net);
+ free_netdev(dev->net);
+
+ /* assuming we used keventd, it must quiesce too */
+ flush_scheduled_work ();
+ set_gadget_data (gadget, NULL);
+}
+
+static u8 __init nibble (unsigned char c)
+{
+ if (likely (isdigit (c)))
+ return c - '0';
+ c = toupper (c);
+ if (likely (isxdigit (c)))
+ return 10 + c - 'A';
+ return 0;
+}
+
+static void __init get_ether_addr (const char *str, u8 *dev_addr)
+{
+ if (str) {
+ unsigned i;
+
+ for (i = 0; i < 6; i++) {
+ unsigned char num;
+
+ if((*str == '.') || (*str == ':'))
+ str++;
+ num = nibble(*str++) << 4;
+ num |= (nibble(*str++));
+ dev_addr [i] = num;
+ }
+ if (is_valid_ether_addr (dev_addr))
+ return;
+ }
+ random_ether_addr(dev_addr);
+}
+
+static int __init
+eth_bind (struct usb_gadget *gadget)
+{
+ struct eth_dev *dev;
+ struct net_device *net;
+ u8 cdc = 1, zlp = 1, rndis = 1;
+ struct usb_ep *in_ep, *out_ep, *status_ep = NULL;
+ int status = -ENOMEM;
+
+ /* these flags are only ever cleared; compiler take note */
+#ifndef DEV_CONFIG_CDC
+ cdc = 0;
+#endif
+#ifndef CONFIG_USB_ETH_RNDIS
+ rndis = 0;
+#endif
+
+ /* Because most host side USB stacks handle CDC Ethernet, that
+ * standard protocol is _strongly_ preferred for interop purposes.
+ * (By everyone except Microsoft.)
+ */
+ if (gadget_is_net2280 (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0201);
+ } else if (gadget_is_dummy (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0202);
+ } else if (gadget_is_pxa (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0203);
+ /* pxa doesn't support altsettings */
+ cdc = 0;
+ } else if (gadget_is_sh(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0204);
+ /* sh doesn't support multiple interfaces or configs */
+ cdc = 0;
+ rndis = 0;
+ } else if (gadget_is_sa1100 (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0205);
+ /* hardware can't write zlps */
+ zlp = 0;
+ /* sa1100 CAN do CDC, without status endpoint ... we use
+ * non-CDC to be compatible with ARM Linux-2.4 "usb-eth".
+ */
+ cdc = 0;
+ } else if (gadget_is_goku (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0206);
+ } else if (gadget_is_mq11xx (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0207);
+ } else if (gadget_is_omap (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0208);
+ } else if (gadget_is_lh7a40x(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209);
+ } else if (gadget_is_n9604(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0210);
+ } else if (gadget_is_pxa27x(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0211);
+ } else if (gadget_is_s3c2410(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212);
+ } else if (gadget_is_at91(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0213);
+ } else {
+ /* can't assume CDC works. don't want to default to
+ * anything less functional on CDC-capable hardware,
+ * so we fail in this case.
+ */
+ dev_err (&gadget->dev,
+ "controller '%s' not recognized\n",
+ gadget->name);
+ return -ENODEV;
+ }
+ snprintf (manufacturer, sizeof manufacturer, "%s %s/%s",
+ system_utsname.sysname, system_utsname.release,
+ gadget->name);
+
+ /* If there's an RNDIS configuration, that's what Windows wants to
+ * be using ... so use these product IDs here and in the "linux.inf"
+ * needed to install MSFT drivers. Current Linux kernels will use
+ * the second configuration if it's CDC Ethernet, and need some help
+ * to choose the right configuration otherwise.
+ */
+ if (rndis) {
+ device_desc.idVendor =
+ __constant_cpu_to_le16(RNDIS_VENDOR_NUM);
+ device_desc.idProduct =
+ __constant_cpu_to_le16(RNDIS_PRODUCT_NUM);
+ snprintf (product_desc, sizeof product_desc,
+ "RNDIS/%s", driver_desc);
+
+ /* CDC subset ... recognized by Linux since 2.4.10, but Windows
+ * drivers aren't widely available.
+ */
+ } else if (!cdc) {
+ device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
+ device_desc.idVendor =
+ __constant_cpu_to_le16(SIMPLE_VENDOR_NUM);
+ device_desc.idProduct =
+ __constant_cpu_to_le16(SIMPLE_PRODUCT_NUM);
+ }
+
+ /* support optional vendor/distro customization */
+ if (idVendor) {
+ if (!idProduct) {
+ dev_err (&gadget->dev, "idVendor needs idProduct!\n");
+ return -ENODEV;
+ }
+ device_desc.idVendor = cpu_to_le16(idVendor);
+ device_desc.idProduct = cpu_to_le16(idProduct);
+ if (bcdDevice)
+ device_desc.bcdDevice = cpu_to_le16(bcdDevice);
+ }
+ if (iManufacturer)
+ strlcpy (manufacturer, iManufacturer, sizeof manufacturer);
+ if (iProduct)
+ strlcpy (product_desc, iProduct, sizeof product_desc);
+
+ /* all we really need is bulk IN/OUT */
+ usb_ep_autoconfig_reset (gadget);
+ in_ep = usb_ep_autoconfig (gadget, &fs_source_desc);
+ if (!in_ep) {
+autoconf_fail:
+ dev_err (&gadget->dev,
+ "can't autoconfigure on %s\n",
+ gadget->name);
+ return -ENODEV;
+ }
+ EP_IN_NAME = in_ep->name;
+ in_ep->driver_data = in_ep; /* claim */
+
+ out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc);
+ if (!out_ep)
+ goto autoconf_fail;
+ EP_OUT_NAME = out_ep->name;
+ out_ep->driver_data = out_ep; /* claim */
+
+#if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS)
+ /* CDC Ethernet control interface doesn't require a status endpoint.
+ * Since some hosts expect one, try to allocate one anyway.
+ */
+ if (cdc || rndis) {
+ status_ep = usb_ep_autoconfig (gadget, &fs_status_desc);
+ if (status_ep) {
+ EP_STATUS_NAME = status_ep->name;
+ status_ep->driver_data = status_ep; /* claim */
+ } else if (rndis) {
+ dev_err (&gadget->dev,
+ "can't run RNDIS on %s\n",
+ gadget->name);
+ return -ENODEV;
+#ifdef DEV_CONFIG_CDC
+ /* pxa25x only does CDC subset; often used with RNDIS */
+ } else if (cdc) {
+ control_intf.bNumEndpoints = 0;
+ /* FIXME remove endpoint from descriptor list */
+#endif
+ }
+ }
+#endif
+
+ /* one config: cdc, else minimal subset */
+ if (!cdc) {
+ eth_config.bNumInterfaces = 1;
+ eth_config.iConfiguration = STRING_SUBSET;
+ fs_subset_descriptors();
+ hs_subset_descriptors();
+ }
+
+ /* For now RNDIS is always a second config */
+ if (rndis)
+ device_desc.bNumConfigurations = 2;
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ if (rndis)
+ dev_qualifier.bNumConfigurations = 2;
+ else if (!cdc)
+ dev_qualifier.bDeviceClass = USB_CLASS_VENDOR_SPEC;
+
+ /* assumes ep0 uses the same value for both speeds ... */
+ dev_qualifier.bMaxPacketSize0 = device_desc.bMaxPacketSize0;
+
+ /* and that all endpoints are dual-speed */
+ hs_source_desc.bEndpointAddress = fs_source_desc.bEndpointAddress;
+ hs_sink_desc.bEndpointAddress = fs_sink_desc.bEndpointAddress;
+#if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS)
+ if (EP_STATUS_NAME)
+ hs_status_desc.bEndpointAddress =
+ fs_status_desc.bEndpointAddress;
+#endif
+#endif /* DUALSPEED */
+
+ device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
+ usb_gadget_set_selfpowered (gadget);
+
+ if (gadget->is_otg) {
+ otg_descriptor.bmAttributes |= USB_OTG_HNP,
+ eth_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ eth_config.bMaxPower = 4;
+#ifdef CONFIG_USB_ETH_RNDIS
+ rndis_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ rndis_config.bMaxPower = 4;
+#endif
+ }
+
+ net = alloc_etherdev (sizeof *dev);
+ if (!net)
+ return status;
+ dev = netdev_priv(net);
+ spin_lock_init (&dev->lock);
+ INIT_WORK (&dev->work, eth_work, dev);
+ INIT_LIST_HEAD (&dev->tx_reqs);
+ INIT_LIST_HEAD (&dev->rx_reqs);
+
+ /* network device setup */
+ dev->net = net;
+ SET_MODULE_OWNER (net);
+ strcpy (net->name, "usb%d");
+ dev->cdc = cdc;
+ dev->zlp = zlp;
+
+ dev->in_ep = in_ep;
+ dev->out_ep = out_ep;
+ dev->status_ep = status_ep;
+
+ /* Module params for these addresses should come from ID proms.
+ * The host side address is used with CDC and RNDIS, and commonly
+ * ends up in a persistent config database.
+ */
+ get_ether_addr(dev_addr, net->dev_addr);
+ if (cdc || rndis) {
+ get_ether_addr(host_addr, dev->host_mac);
+#ifdef DEV_CONFIG_CDC
+ snprintf (ethaddr, sizeof ethaddr, "%02X%02X%02X%02X%02X%02X",
+ dev->host_mac [0], dev->host_mac [1],
+ dev->host_mac [2], dev->host_mac [3],
+ dev->host_mac [4], dev->host_mac [5]);
+#endif
+ }
+
+ if (rndis) {
+ status = rndis_init();
+ if (status < 0) {
+ dev_err (&gadget->dev, "can't init RNDIS, %d\n",
+ status);
+ goto fail;
+ }
+ }
+
+ net->change_mtu = eth_change_mtu;
+ net->get_stats = eth_get_stats;
+ net->hard_start_xmit = eth_start_xmit;
+ net->open = eth_open;
+ net->stop = eth_stop;
+ // watchdog_timeo, tx_timeout ...
+ // set_multicast_list
+ SET_ETHTOOL_OPS(net, &ops);
+
+ /* preallocate control message data and buffer */
+ dev->req = eth_req_alloc (gadget->ep0, USB_BUFSIZ);
+ if (!dev->req)
+ goto fail;
+ dev->req->complete = eth_setup_complete;
+
+ /* ... and maybe likewise for status transfer */
+ if (dev->status_ep) {
+ dev->stat_req = eth_req_alloc (dev->status_ep,
+ STATUS_BYTECOUNT);
+ if (!dev->stat_req) {
+ eth_req_free (gadget->ep0, dev->req);
+ goto fail;
+ }
+ }
+
+ /* finish hookup to lower layer ... */
+ dev->gadget = gadget;
+ set_gadget_data (gadget, dev);
+ gadget->ep0->driver_data = dev;
+
+ /* two kinds of host-initiated state changes:
+ * - iff DATA transfer is active, carrier is "on"
+ * - tx queueing enabled if open *and* carrier is "on"
+ */
+ netif_stop_queue (dev->net);
+ netif_carrier_off (dev->net);
+
+ // SET_NETDEV_DEV (dev->net, &gadget->dev);
+ status = register_netdev (dev->net);
+ if (status < 0)
+ goto fail1;
+
+ INFO (dev, "%s, version: " DRIVER_VERSION "\n", driver_desc);
+ INFO (dev, "using %s, OUT %s IN %s%s%s\n", gadget->name,
+ EP_OUT_NAME, EP_IN_NAME,
+ EP_STATUS_NAME ? " STATUS " : "",
+ EP_STATUS_NAME ? EP_STATUS_NAME : ""
+ );
+ INFO (dev, "MAC %02x:%02x:%02x:%02x:%02x:%02x\n",
+ net->dev_addr [0], net->dev_addr [1],
+ net->dev_addr [2], net->dev_addr [3],
+ net->dev_addr [4], net->dev_addr [5]);
+
+ if (cdc || rndis)
+ INFO (dev, "HOST MAC %02x:%02x:%02x:%02x:%02x:%02x\n",
+ dev->host_mac [0], dev->host_mac [1],
+ dev->host_mac [2], dev->host_mac [3],
+ dev->host_mac [4], dev->host_mac [5]);
+
+#ifdef CONFIG_USB_ETH_RNDIS
+ if (rndis) {
+ u32 vendorID = 0;
+
+ /* FIXME RNDIS vendor id == "vendor NIC code" == ? */
+
+ dev->rndis_config = rndis_register (rndis_control_ack);
+ if (dev->rndis_config < 0) {
+fail0:
+ unregister_netdev (dev->net);
+ status = -ENODEV;
+ goto fail;
+ }
+
+ /* these set up a lot of the OIDs that RNDIS needs */
+ rndis_set_host_mac (dev->rndis_config, dev->host_mac);
+ if (rndis_set_param_dev (dev->rndis_config, dev->net,
+ &dev->stats))
+ goto fail0;
+ if (rndis_set_param_vendor (dev->rndis_config, vendorID,
+ manufacturer))
+ goto fail0;
+ if (rndis_set_param_medium (dev->rndis_config,
+ NDIS_MEDIUM_802_3,
+ 0))
+ goto fail0;
+ INFO (dev, "RNDIS ready\n");
+ }
+#endif
+
+ return status;
+
+fail1:
+ dev_dbg(&gadget->dev, "register_netdev failed, %d\n", status);
+fail:
+ eth_unbind (gadget);
+ return status;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void
+eth_suspend (struct usb_gadget *gadget)
+{
+ struct eth_dev *dev = get_gadget_data (gadget);
+
+ DEBUG (dev, "suspend\n");
+ dev->suspended = 1;
+}
+
+static void
+eth_resume (struct usb_gadget *gadget)
+{
+ struct eth_dev *dev = get_gadget_data (gadget);
+
+ DEBUG (dev, "resume\n");
+ dev->suspended = 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct usb_gadget_driver eth_driver = {
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ .speed = USB_SPEED_HIGH,
+#else
+ .speed = USB_SPEED_FULL,
+#endif
+ .function = (char *) driver_desc,
+ .bind = eth_bind,
+ .unbind = eth_unbind,
+
+ .setup = eth_setup,
+ .disconnect = eth_disconnect,
+
+ .suspend = eth_suspend,
+ .resume = eth_resume,
+
+ .driver = {
+ .name = (char *) shortname,
+ // .shutdown = ...
+ // .suspend = ...
+ // .resume = ...
+ },
+};
+
+MODULE_DESCRIPTION (DRIVER_DESC);
+MODULE_AUTHOR ("David Brownell, Benedikt Spanger");
+MODULE_LICENSE ("GPL");
+
+
+static int __init init (void)
+{
+ return usb_gadget_register_driver (&eth_driver);
+}
+module_init (init);
+
+static void __exit cleanup (void)
+{
+ usb_gadget_unregister_driver (&eth_driver);
+}
+module_exit (cleanup);
+
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
new file mode 100644
index 000000000000..4857f0e4ef44
--- /dev/null
+++ b/drivers/usb/gadget/file_storage.c
@@ -0,0 +1,4139 @@
+/*
+ * file_storage.c -- File-backed USB Storage Gadget, for USB development
+ *
+ * Copyright (C) 2003-2005 Alan Stern
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the above-listed copyright holders may not be used
+ * to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+/*
+ * The File-backed Storage Gadget acts as a USB Mass Storage device,
+ * appearing to the host as a disk drive. In addition to providing an
+ * example of a genuinely useful gadget driver for a USB device, it also
+ * illustrates a technique of double-buffering for increased throughput.
+ * Last but not least, it gives an easy way to probe the behavior of the
+ * Mass Storage drivers in a USB host.
+ *
+ * Backing storage is provided by a regular file or a block device, specified
+ * by the "file" module parameter. Access can be limited to read-only by
+ * setting the optional "ro" module parameter. The gadget will indicate that
+ * it has removable media if the optional "removable" module parameter is set.
+ *
+ * The gadget supports the Control-Bulk (CB), Control-Bulk-Interrupt (CBI),
+ * and Bulk-Only (also known as Bulk-Bulk-Bulk or BBB) transports, selected
+ * by the optional "transport" module parameter. It also supports the
+ * following protocols: RBC (0x01), ATAPI or SFF-8020i (0x02), QIC-157 (0c03),
+ * UFI (0x04), SFF-8070i (0x05), and transparent SCSI (0x06), selected by
+ * the optional "protocol" module parameter. In addition, the default
+ * Vendor ID, Product ID, and release number can be overridden.
+ *
+ * There is support for multiple logical units (LUNs), each of which has
+ * its own backing file. The number of LUNs can be set using the optional
+ * "luns" module parameter (anywhere from 1 to 8), and the corresponding
+ * files are specified using comma-separated lists for "file" and "ro".
+ * The default number of LUNs is taken from the number of "file" elements;
+ * it is 1 if "file" is not given. If "removable" is not set then a backing
+ * file must be specified for each LUN. If it is set, then an unspecified
+ * or empty backing filename means the LUN's medium is not loaded.
+ *
+ * Requirements are modest; only a bulk-in and a bulk-out endpoint are
+ * needed (an interrupt-out endpoint is also needed for CBI). The memory
+ * requirement amounts to two 16K buffers, size configurable by a parameter.
+ * Support is included for both full-speed and high-speed operation.
+ *
+ * Module options:
+ *
+ * file=filename[,filename...]
+ * Required if "removable" is not set, names of
+ * the files or block devices used for
+ * backing storage
+ * ro=b[,b...] Default false, booleans for read-only access
+ * removable Default false, boolean for removable media
+ * luns=N Default N = number of filenames, number of
+ * LUNs to support
+ * transport=XXX Default BBB, transport name (CB, CBI, or BBB)
+ * protocol=YYY Default SCSI, protocol name (RBC, 8020 or
+ * ATAPI, QIC, UFI, 8070, or SCSI;
+ * also 1 - 6)
+ * vendor=0xVVVV Default 0x0525 (NetChip), USB Vendor ID
+ * product=0xPPPP Default 0xa4a5 (FSG), USB Product ID
+ * release=0xRRRR Override the USB release number (bcdDevice)
+ * buflen=N Default N=16384, buffer size used (will be
+ * rounded down to a multiple of
+ * PAGE_CACHE_SIZE)
+ * stall Default determined according to the type of
+ * USB device controller (usually true),
+ * boolean to permit the driver to halt
+ * bulk endpoints
+ *
+ * If CONFIG_USB_FILE_STORAGE_TEST is not set, only the "file", "ro",
+ * "removable", and "luns" options are available; default values are used
+ * for everything else.
+ *
+ * The pathnames of the backing files and the ro settings are available in
+ * the attribute files "file" and "ro" in the lun<n> subdirectory of the
+ * gadget's sysfs directory. If the "removable" option is set, writing to
+ * these files will simulate ejecting/loading the medium (writing an empty
+ * line means eject) and adjusting a write-enable tab. Changes to the ro
+ * setting are not allowed when the medium is loaded.
+ *
+ * This gadget driver is heavily based on "Gadget Zero" by David Brownell.
+ */
+
+
+/*
+ * Driver Design
+ *
+ * The FSG driver is fairly straightforward. There is a main kernel
+ * thread that handles most of the work. Interrupt routines field
+ * callbacks from the controller driver: bulk- and interrupt-request
+ * completion notifications, endpoint-0 events, and disconnect events.
+ * Completion events are passed to the main thread by wakeup calls. Many
+ * ep0 requests are handled at interrupt time, but SetInterface,
+ * SetConfiguration, and device reset requests are forwarded to the
+ * thread in the form of "exceptions" using SIGUSR1 signals (since they
+ * should interrupt any ongoing file I/O operations).
+ *
+ * The thread's main routine implements the standard command/data/status
+ * parts of a SCSI interaction. It and its subroutines are full of tests
+ * for pending signals/exceptions -- all this polling is necessary since
+ * the kernel has no setjmp/longjmp equivalents. (Maybe this is an
+ * indication that the driver really wants to be running in userspace.)
+ * An important point is that so long as the thread is alive it keeps an
+ * open reference to the backing file. This will prevent unmounting
+ * the backing file's underlying filesystem and could cause problems
+ * during system shutdown, for example. To prevent such problems, the
+ * thread catches INT, TERM, and KILL signals and converts them into
+ * an EXIT exception.
+ *
+ * In normal operation the main thread is started during the gadget's
+ * fsg_bind() callback and stopped during fsg_unbind(). But it can also
+ * exit when it receives a signal, and there's no point leaving the
+ * gadget running when the thread is dead. So just before the thread
+ * exits, it deregisters the gadget driver. This makes things a little
+ * tricky: The driver is deregistered at two places, and the exiting
+ * thread can indirectly call fsg_unbind() which in turn can tell the
+ * thread to exit. The first problem is resolved through the use of the
+ * REGISTERED atomic bitflag; the driver will only be deregistered once.
+ * The second problem is resolved by having fsg_unbind() check
+ * fsg->state; it won't try to stop the thread if the state is already
+ * FSG_STATE_TERMINATED.
+ *
+ * To provide maximum throughput, the driver uses a circular pipeline of
+ * buffer heads (struct fsg_buffhd). In principle the pipeline can be
+ * arbitrarily long; in practice the benefits don't justify having more
+ * than 2 stages (i.e., double buffering). But it helps to think of the
+ * pipeline as being a long one. Each buffer head contains a bulk-in and
+ * a bulk-out request pointer (since the buffer can be used for both
+ * output and input -- directions always are given from the host's
+ * point of view) as well as a pointer to the buffer and various state
+ * variables.
+ *
+ * Use of the pipeline follows a simple protocol. There is a variable
+ * (fsg->next_buffhd_to_fill) that points to the next buffer head to use.
+ * At any time that buffer head may still be in use from an earlier
+ * request, so each buffer head has a state variable indicating whether
+ * it is EMPTY, FULL, or BUSY. Typical use involves waiting for the
+ * buffer head to be EMPTY, filling the buffer either by file I/O or by
+ * USB I/O (during which the buffer head is BUSY), and marking the buffer
+ * head FULL when the I/O is complete. Then the buffer will be emptied
+ * (again possibly by USB I/O, during which it is marked BUSY) and
+ * finally marked EMPTY again (possibly by a completion routine).
+ *
+ * A module parameter tells the driver to avoid stalling the bulk
+ * endpoints wherever the transport specification allows. This is
+ * necessary for some UDCs like the SuperH, which cannot reliably clear a
+ * halt on a bulk endpoint. However, under certain circumstances the
+ * Bulk-only specification requires a stall. In such cases the driver
+ * will halt the endpoint and set a flag indicating that it should clear
+ * the halt in software during the next device reset. Hopefully this
+ * will permit everything to work correctly. Furthermore, although the
+ * specification allows the bulk-out endpoint to halt when the host sends
+ * too much data, implementing this would cause an unavoidable race.
+ * The driver will always use the "no-stall" approach for OUT transfers.
+ *
+ * One subtle point concerns sending status-stage responses for ep0
+ * requests. Some of these requests, such as device reset, can involve
+ * interrupting an ongoing file I/O operation, which might take an
+ * arbitrarily long time. During that delay the host might give up on
+ * the original ep0 request and issue a new one. When that happens the
+ * driver should not notify the host about completion of the original
+ * request, as the host will no longer be waiting for it. So the driver
+ * assigns to each ep0 request a unique tag, and it keeps track of the
+ * tag value of the request associated with a long-running exception
+ * (device-reset, interface-change, or configuration-change). When the
+ * exception handler is finished, the status-stage response is submitted
+ * only if the current ep0 request tag is equal to the exception request
+ * tag. Thus only the most recently received ep0 request will get a
+ * status-stage response.
+ *
+ * Warning: This driver source file is too long. It ought to be split up
+ * into a header file plus about 3 separate .c files, to handle the details
+ * of the Gadget, USB Mass Storage, and SCSI protocols.
+ */
+
+
+#undef DEBUG
+#undef VERBOSE
+#undef DUMP_MSGS
+
+#include <linux/config.h>
+
+#include <asm/system.h>
+#include <asm/uaccess.h>
+
+#include <linux/bitops.h>
+#include <linux/blkdev.h>
+#include <linux/compiler.h>
+#include <linux/completion.h>
+#include <linux/dcache.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/fcntl.h>
+#include <linux/file.h>
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/limits.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/pagemap.h>
+#include <linux/rwsem.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/string.h>
+#include <linux/suspend.h>
+#include <linux/utsname.h>
+#include <linux/wait.h>
+
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+
+#include "gadget_chips.h"
+
+
+/*-------------------------------------------------------------------------*/
+
+#define DRIVER_DESC "File-backed Storage Gadget"
+#define DRIVER_NAME "g_file_storage"
+#define DRIVER_VERSION "20 October 2004"
+
+static const char longname[] = DRIVER_DESC;
+static const char shortname[] = DRIVER_NAME;
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_AUTHOR("Alan Stern");
+MODULE_LICENSE("Dual BSD/GPL");
+
+/* Thanks to NetChip Technologies for donating this product ID.
+ *
+ * DO NOT REUSE THESE IDs with any other driver!! Ever!!
+ * Instead: allocate your own, using normal USB-IF procedures. */
+#define DRIVER_VENDOR_ID 0x0525 // NetChip
+#define DRIVER_PRODUCT_ID 0xa4a5 // Linux-USB File-backed Storage Gadget
+
+
+/*
+ * This driver assumes self-powered hardware and has no way for users to
+ * trigger remote wakeup. It uses autoconfiguration to select endpoints
+ * and endpoint addresses.
+ */
+
+
+/*-------------------------------------------------------------------------*/
+
+#define xprintk(f,level,fmt,args...) \
+ dev_printk(level , &(f)->gadget->dev , fmt , ## args)
+#define yprintk(l,level,fmt,args...) \
+ dev_printk(level , &(l)->dev , fmt , ## args)
+
+#ifdef DEBUG
+#define DBG(fsg,fmt,args...) \
+ xprintk(fsg , KERN_DEBUG , fmt , ## args)
+#define LDBG(lun,fmt,args...) \
+ yprintk(lun , KERN_DEBUG , fmt , ## args)
+#define MDBG(fmt,args...) \
+ printk(KERN_DEBUG DRIVER_NAME ": " fmt , ## args)
+#else
+#define DBG(fsg,fmt,args...) \
+ do { } while (0)
+#define LDBG(lun,fmt,args...) \
+ do { } while (0)
+#define MDBG(fmt,args...) \
+ do { } while (0)
+#undef VERBOSE
+#undef DUMP_MSGS
+#endif /* DEBUG */
+
+#ifdef VERBOSE
+#define VDBG DBG
+#define VLDBG LDBG
+#else
+#define VDBG(fsg,fmt,args...) \
+ do { } while (0)
+#define VLDBG(lun,fmt,args...) \
+ do { } while (0)
+#endif /* VERBOSE */
+
+#define ERROR(fsg,fmt,args...) \
+ xprintk(fsg , KERN_ERR , fmt , ## args)
+#define LERROR(lun,fmt,args...) \
+ yprintk(lun , KERN_ERR , fmt , ## args)
+
+#define WARN(fsg,fmt,args...) \
+ xprintk(fsg , KERN_WARNING , fmt , ## args)
+#define LWARN(lun,fmt,args...) \
+ yprintk(lun , KERN_WARNING , fmt , ## args)
+
+#define INFO(fsg,fmt,args...) \
+ xprintk(fsg , KERN_INFO , fmt , ## args)
+#define LINFO(lun,fmt,args...) \
+ yprintk(lun , KERN_INFO , fmt , ## args)
+
+#define MINFO(fmt,args...) \
+ printk(KERN_INFO DRIVER_NAME ": " fmt , ## args)
+
+
+/*-------------------------------------------------------------------------*/
+
+/* Encapsulate the module parameter settings */
+
+#define MAX_LUNS 8
+
+ /* Arggh! There should be a module_param_array_named macro! */
+static char *file[MAX_LUNS] = {NULL, };
+static int ro[MAX_LUNS] = {0, };
+
+static struct {
+ int num_filenames;
+ int num_ros;
+ unsigned int nluns;
+
+ char *transport_parm;
+ char *protocol_parm;
+ int removable;
+ unsigned short vendor;
+ unsigned short product;
+ unsigned short release;
+ unsigned int buflen;
+ int can_stall;
+
+ int transport_type;
+ char *transport_name;
+ int protocol_type;
+ char *protocol_name;
+
+} mod_data = { // Default values
+ .transport_parm = "BBB",
+ .protocol_parm = "SCSI",
+ .removable = 0,
+ .vendor = DRIVER_VENDOR_ID,
+ .product = DRIVER_PRODUCT_ID,
+ .release = 0xffff, // Use controller chip type
+ .buflen = 16384,
+ .can_stall = 1,
+ };
+
+
+module_param_array(file, charp, &mod_data.num_filenames, S_IRUGO);
+MODULE_PARM_DESC(file, "names of backing files or devices");
+
+module_param_array(ro, bool, &mod_data.num_ros, S_IRUGO);
+MODULE_PARM_DESC(ro, "true to force read-only");
+
+module_param_named(luns, mod_data.nluns, uint, S_IRUGO);
+MODULE_PARM_DESC(luns, "number of LUNs");
+
+module_param_named(removable, mod_data.removable, bool, S_IRUGO);
+MODULE_PARM_DESC(removable, "true to simulate removable media");
+
+
+/* In the non-TEST version, only the module parameters listed above
+ * are available. */
+#ifdef CONFIG_USB_FILE_STORAGE_TEST
+
+module_param_named(transport, mod_data.transport_parm, charp, S_IRUGO);
+MODULE_PARM_DESC(transport, "type of transport (BBB, CBI, or CB)");
+
+module_param_named(protocol, mod_data.protocol_parm, charp, S_IRUGO);
+MODULE_PARM_DESC(protocol, "type of protocol (RBC, 8020, QIC, UFI, "
+ "8070, or SCSI)");
+
+module_param_named(vendor, mod_data.vendor, ushort, S_IRUGO);
+MODULE_PARM_DESC(vendor, "USB Vendor ID");
+
+module_param_named(product, mod_data.product, ushort, S_IRUGO);
+MODULE_PARM_DESC(product, "USB Product ID");
+
+module_param_named(release, mod_data.release, ushort, S_IRUGO);
+MODULE_PARM_DESC(release, "USB release number");
+
+module_param_named(buflen, mod_data.buflen, uint, S_IRUGO);
+MODULE_PARM_DESC(buflen, "I/O buffer size");
+
+module_param_named(stall, mod_data.can_stall, bool, S_IRUGO);
+MODULE_PARM_DESC(stall, "false to prevent bulk stalls");
+
+#endif /* CONFIG_USB_FILE_STORAGE_TEST */
+
+
+/*-------------------------------------------------------------------------*/
+
+/* USB protocol value = the transport method */
+#define USB_PR_CBI 0x00 // Control/Bulk/Interrupt
+#define USB_PR_CB 0x01 // Control/Bulk w/o interrupt
+#define USB_PR_BULK 0x50 // Bulk-only
+
+/* USB subclass value = the protocol encapsulation */
+#define USB_SC_RBC 0x01 // Reduced Block Commands (flash)
+#define USB_SC_8020 0x02 // SFF-8020i, MMC-2, ATAPI (CD-ROM)
+#define USB_SC_QIC 0x03 // QIC-157 (tape)
+#define USB_SC_UFI 0x04 // UFI (floppy)
+#define USB_SC_8070 0x05 // SFF-8070i (removable)
+#define USB_SC_SCSI 0x06 // Transparent SCSI
+
+/* Bulk-only data structures */
+
+/* Command Block Wrapper */
+struct bulk_cb_wrap {
+ __le32 Signature; // Contains 'USBC'
+ u32 Tag; // Unique per command id
+ __le32 DataTransferLength; // Size of the data
+ u8 Flags; // Direction in bit 7
+ u8 Lun; // LUN (normally 0)
+ u8 Length; // Of the CDB, <= MAX_COMMAND_SIZE
+ u8 CDB[16]; // Command Data Block
+};
+
+#define USB_BULK_CB_WRAP_LEN 31
+#define USB_BULK_CB_SIG 0x43425355 // Spells out USBC
+#define USB_BULK_IN_FLAG 0x80
+
+/* Command Status Wrapper */
+struct bulk_cs_wrap {
+ __le32 Signature; // Should = 'USBS'
+ u32 Tag; // Same as original command
+ __le32 Residue; // Amount not transferred
+ u8 Status; // See below
+};
+
+#define USB_BULK_CS_WRAP_LEN 13
+#define USB_BULK_CS_SIG 0x53425355 // Spells out 'USBS'
+#define USB_STATUS_PASS 0
+#define USB_STATUS_FAIL 1
+#define USB_STATUS_PHASE_ERROR 2
+
+/* Bulk-only class specific requests */
+#define USB_BULK_RESET_REQUEST 0xff
+#define USB_BULK_GET_MAX_LUN_REQUEST 0xfe
+
+
+/* CBI Interrupt data structure */
+struct interrupt_data {
+ u8 bType;
+ u8 bValue;
+};
+
+#define CBI_INTERRUPT_DATA_LEN 2
+
+/* CBI Accept Device-Specific Command request */
+#define USB_CBI_ADSC_REQUEST 0x00
+
+
+#define MAX_COMMAND_SIZE 16 // Length of a SCSI Command Data Block
+
+/* SCSI commands that we recognize */
+#define SC_FORMAT_UNIT 0x04
+#define SC_INQUIRY 0x12
+#define SC_MODE_SELECT_6 0x15
+#define SC_MODE_SELECT_10 0x55
+#define SC_MODE_SENSE_6 0x1a
+#define SC_MODE_SENSE_10 0x5a
+#define SC_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
+#define SC_READ_6 0x08
+#define SC_READ_10 0x28
+#define SC_READ_12 0xa8
+#define SC_READ_CAPACITY 0x25
+#define SC_READ_FORMAT_CAPACITIES 0x23
+#define SC_RELEASE 0x17
+#define SC_REQUEST_SENSE 0x03
+#define SC_RESERVE 0x16
+#define SC_SEND_DIAGNOSTIC 0x1d
+#define SC_START_STOP_UNIT 0x1b
+#define SC_SYNCHRONIZE_CACHE 0x35
+#define SC_TEST_UNIT_READY 0x00
+#define SC_VERIFY 0x2f
+#define SC_WRITE_6 0x0a
+#define SC_WRITE_10 0x2a
+#define SC_WRITE_12 0xaa
+
+/* SCSI Sense Key/Additional Sense Code/ASC Qualifier values */
+#define SS_NO_SENSE 0
+#define SS_COMMUNICATION_FAILURE 0x040800
+#define SS_INVALID_COMMAND 0x052000
+#define SS_INVALID_FIELD_IN_CDB 0x052400
+#define SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE 0x052100
+#define SS_LOGICAL_UNIT_NOT_SUPPORTED 0x052500
+#define SS_MEDIUM_NOT_PRESENT 0x023a00
+#define SS_MEDIUM_REMOVAL_PREVENTED 0x055302
+#define SS_NOT_READY_TO_READY_TRANSITION 0x062800
+#define SS_RESET_OCCURRED 0x062900
+#define SS_SAVING_PARAMETERS_NOT_SUPPORTED 0x053900
+#define SS_UNRECOVERED_READ_ERROR 0x031100
+#define SS_WRITE_ERROR 0x030c02
+#define SS_WRITE_PROTECTED 0x072700
+
+#define SK(x) ((u8) ((x) >> 16)) // Sense Key byte, etc.
+#define ASC(x) ((u8) ((x) >> 8))
+#define ASCQ(x) ((u8) (x))
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * These definitions will permit the compiler to avoid generating code for
+ * parts of the driver that aren't used in the non-TEST version. Even gcc
+ * can recognize when a test of a constant expression yields a dead code
+ * path.
+ */
+
+#ifdef CONFIG_USB_FILE_STORAGE_TEST
+
+#define transport_is_bbb() (mod_data.transport_type == USB_PR_BULK)
+#define transport_is_cbi() (mod_data.transport_type == USB_PR_CBI)
+#define protocol_is_scsi() (mod_data.protocol_type == USB_SC_SCSI)
+
+#else
+
+#define transport_is_bbb() 1
+#define transport_is_cbi() 0
+#define protocol_is_scsi() 1
+
+#endif /* CONFIG_USB_FILE_STORAGE_TEST */
+
+
+struct lun {
+ struct file *filp;
+ loff_t file_length;
+ loff_t num_sectors;
+
+ unsigned int ro : 1;
+ unsigned int prevent_medium_removal : 1;
+ unsigned int registered : 1;
+
+ u32 sense_data;
+ u32 sense_data_info;
+ u32 unit_attention_data;
+
+ struct device dev;
+};
+
+#define backing_file_is_open(curlun) ((curlun)->filp != NULL)
+
+static inline struct lun *dev_to_lun(struct device *dev)
+{
+ return container_of(dev, struct lun, dev);
+}
+
+
+/* Big enough to hold our biggest descriptor */
+#define EP0_BUFSIZE 256
+#define DELAYED_STATUS (EP0_BUFSIZE + 999) // An impossibly large value
+
+/* Number of buffers we will use. 2 is enough for double-buffering */
+#define NUM_BUFFERS 2
+
+enum fsg_buffer_state {
+ BUF_STATE_EMPTY = 0,
+ BUF_STATE_FULL,
+ BUF_STATE_BUSY
+};
+
+struct fsg_buffhd {
+ void *buf;
+ dma_addr_t dma;
+ volatile enum fsg_buffer_state state;
+ struct fsg_buffhd *next;
+
+ /* The NetChip 2280 is faster, and handles some protocol faults
+ * better, if we don't submit any short bulk-out read requests.
+ * So we will record the intended request length here. */
+ unsigned int bulk_out_intended_length;
+
+ struct usb_request *inreq;
+ volatile int inreq_busy;
+ struct usb_request *outreq;
+ volatile int outreq_busy;
+};
+
+enum fsg_state {
+ FSG_STATE_COMMAND_PHASE = -10, // This one isn't used anywhere
+ FSG_STATE_DATA_PHASE,
+ FSG_STATE_STATUS_PHASE,
+
+ FSG_STATE_IDLE = 0,
+ FSG_STATE_ABORT_BULK_OUT,
+ FSG_STATE_RESET,
+ FSG_STATE_INTERFACE_CHANGE,
+ FSG_STATE_CONFIG_CHANGE,
+ FSG_STATE_DISCONNECT,
+ FSG_STATE_EXIT,
+ FSG_STATE_TERMINATED
+};
+
+enum data_direction {
+ DATA_DIR_UNKNOWN = 0,
+ DATA_DIR_FROM_HOST,
+ DATA_DIR_TO_HOST,
+ DATA_DIR_NONE
+};
+
+struct fsg_dev {
+ /* lock protects: state, all the req_busy's, and cbbuf_cmnd */
+ spinlock_t lock;
+ struct usb_gadget *gadget;
+
+ /* filesem protects: backing files in use */
+ struct rw_semaphore filesem;
+
+ struct usb_ep *ep0; // Handy copy of gadget->ep0
+ struct usb_request *ep0req; // For control responses
+ volatile unsigned int ep0_req_tag;
+ const char *ep0req_name;
+
+ struct usb_request *intreq; // For interrupt responses
+ volatile int intreq_busy;
+ struct fsg_buffhd *intr_buffhd;
+
+ unsigned int bulk_out_maxpacket;
+ enum fsg_state state; // For exception handling
+ unsigned int exception_req_tag;
+
+ u8 config, new_config;
+
+ unsigned int running : 1;
+ unsigned int bulk_in_enabled : 1;
+ unsigned int bulk_out_enabled : 1;
+ unsigned int intr_in_enabled : 1;
+ unsigned int phase_error : 1;
+ unsigned int short_packet_received : 1;
+ unsigned int bad_lun_okay : 1;
+
+ unsigned long atomic_bitflags;
+#define REGISTERED 0
+#define CLEAR_BULK_HALTS 1
+#define SUSPENDED 2
+
+ struct usb_ep *bulk_in;
+ struct usb_ep *bulk_out;
+ struct usb_ep *intr_in;
+
+ struct fsg_buffhd *next_buffhd_to_fill;
+ struct fsg_buffhd *next_buffhd_to_drain;
+ struct fsg_buffhd buffhds[NUM_BUFFERS];
+
+ wait_queue_head_t thread_wqh;
+ int thread_wakeup_needed;
+ struct completion thread_notifier;
+ int thread_pid;
+ struct task_struct *thread_task;
+ sigset_t thread_signal_mask;
+
+ int cmnd_size;
+ u8 cmnd[MAX_COMMAND_SIZE];
+ enum data_direction data_dir;
+ u32 data_size;
+ u32 data_size_from_cmnd;
+ u32 tag;
+ unsigned int lun;
+ u32 residue;
+ u32 usb_amount_left;
+
+ /* The CB protocol offers no way for a host to know when a command
+ * has completed. As a result the next command may arrive early,
+ * and we will still have to handle it. For that reason we need
+ * a buffer to store new commands when using CB (or CBI, which
+ * does not oblige a host to wait for command completion either). */
+ int cbbuf_cmnd_size;
+ u8 cbbuf_cmnd[MAX_COMMAND_SIZE];
+
+ unsigned int nluns;
+ struct lun *luns;
+ struct lun *curlun;
+ struct completion lun_released;
+};
+
+typedef void (*fsg_routine_t)(struct fsg_dev *);
+
+static int inline exception_in_progress(struct fsg_dev *fsg)
+{
+ return (fsg->state > FSG_STATE_IDLE);
+}
+
+/* Make bulk-out requests be divisible by the maxpacket size */
+static void inline set_bulk_out_req_length(struct fsg_dev *fsg,
+ struct fsg_buffhd *bh, unsigned int length)
+{
+ unsigned int rem;
+
+ bh->bulk_out_intended_length = length;
+ rem = length % fsg->bulk_out_maxpacket;
+ if (rem > 0)
+ length += fsg->bulk_out_maxpacket - rem;
+ bh->outreq->length = length;
+}
+
+static struct fsg_dev *the_fsg;
+static struct usb_gadget_driver fsg_driver;
+
+static void close_backing_file(struct lun *curlun);
+static void close_all_backing_files(struct fsg_dev *fsg);
+
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef DUMP_MSGS
+
+static void dump_msg(struct fsg_dev *fsg, const char *label,
+ const u8 *buf, unsigned int length)
+{
+ unsigned int start, num, i;
+ char line[52], *p;
+
+ if (length >= 512)
+ return;
+ DBG(fsg, "%s, length %u:\n", label, length);
+
+ start = 0;
+ while (length > 0) {
+ num = min(length, 16u);
+ p = line;
+ for (i = 0; i < num; ++i) {
+ if (i == 8)
+ *p++ = ' ';
+ sprintf(p, " %02x", buf[i]);
+ p += 3;
+ }
+ *p = 0;
+ printk(KERN_DEBUG "%6x: %s\n", start, line);
+ buf += num;
+ start += num;
+ length -= num;
+ }
+}
+
+static void inline dump_cdb(struct fsg_dev *fsg)
+{}
+
+#else
+
+static void inline dump_msg(struct fsg_dev *fsg, const char *label,
+ const u8 *buf, unsigned int length)
+{}
+
+static void inline dump_cdb(struct fsg_dev *fsg)
+{
+ int i;
+ char cmdbuf[3*MAX_COMMAND_SIZE + 1];
+
+ for (i = 0; i < fsg->cmnd_size; ++i)
+ sprintf(cmdbuf + i*3, " %02x", fsg->cmnd[i]);
+ VDBG(fsg, "SCSI CDB: %s\n", cmdbuf);
+}
+
+#endif /* DUMP_MSGS */
+
+
+static int fsg_set_halt(struct fsg_dev *fsg, struct usb_ep *ep)
+{
+ const char *name;
+
+ if (ep == fsg->bulk_in)
+ name = "bulk-in";
+ else if (ep == fsg->bulk_out)
+ name = "bulk-out";
+ else
+ name = ep->name;
+ DBG(fsg, "%s set halt\n", name);
+ return usb_ep_set_halt(ep);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* Routines for unaligned data access */
+
+static u16 inline get_be16(u8 *buf)
+{
+ return ((u16) buf[0] << 8) | ((u16) buf[1]);
+}
+
+static u32 inline get_be32(u8 *buf)
+{
+ return ((u32) buf[0] << 24) | ((u32) buf[1] << 16) |
+ ((u32) buf[2] << 8) | ((u32) buf[3]);
+}
+
+static void inline put_be16(u8 *buf, u16 val)
+{
+ buf[0] = val >> 8;
+ buf[1] = val;
+}
+
+static void inline put_be32(u8 *buf, u32 val)
+{
+ buf[0] = val >> 24;
+ buf[1] = val >> 16;
+ buf[2] = val >> 8;
+ buf[3] = val;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * DESCRIPTORS ... most are static, but strings and (full) configuration
+ * descriptors are built on demand. Also the (static) config and interface
+ * descriptors are adjusted during fsg_bind().
+ */
+#define STRING_MANUFACTURER 1
+#define STRING_PRODUCT 2
+#define STRING_SERIAL 3
+#define STRING_CONFIG 4
+#define STRING_INTERFACE 5
+
+/* There is only one configuration. */
+#define CONFIG_VALUE 1
+
+static struct usb_device_descriptor
+device_desc = {
+ .bLength = sizeof device_desc,
+ .bDescriptorType = USB_DT_DEVICE,
+
+ .bcdUSB = __constant_cpu_to_le16(0x0200),
+ .bDeviceClass = USB_CLASS_PER_INTERFACE,
+
+ /* The next three values can be overridden by module parameters */
+ .idVendor = __constant_cpu_to_le16(DRIVER_VENDOR_ID),
+ .idProduct = __constant_cpu_to_le16(DRIVER_PRODUCT_ID),
+ .bcdDevice = __constant_cpu_to_le16(0xffff),
+
+ .iManufacturer = STRING_MANUFACTURER,
+ .iProduct = STRING_PRODUCT,
+ .iSerialNumber = STRING_SERIAL,
+ .bNumConfigurations = 1,
+};
+
+static struct usb_config_descriptor
+config_desc = {
+ .bLength = sizeof config_desc,
+ .bDescriptorType = USB_DT_CONFIG,
+
+ /* wTotalLength computed by usb_gadget_config_buf() */
+ .bNumInterfaces = 1,
+ .bConfigurationValue = CONFIG_VALUE,
+ .iConfiguration = STRING_CONFIG,
+ .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER,
+ .bMaxPower = 1, // self-powered
+};
+
+static struct usb_otg_descriptor
+otg_desc = {
+ .bLength = sizeof(otg_desc),
+ .bDescriptorType = USB_DT_OTG,
+
+ .bmAttributes = USB_OTG_SRP,
+};
+
+/* There is only one interface. */
+
+static struct usb_interface_descriptor
+intf_desc = {
+ .bLength = sizeof intf_desc,
+ .bDescriptorType = USB_DT_INTERFACE,
+
+ .bNumEndpoints = 2, // Adjusted during fsg_bind()
+ .bInterfaceClass = USB_CLASS_MASS_STORAGE,
+ .bInterfaceSubClass = USB_SC_SCSI, // Adjusted during fsg_bind()
+ .bInterfaceProtocol = USB_PR_BULK, // Adjusted during fsg_bind()
+ .iInterface = STRING_INTERFACE,
+};
+
+/* Three full-speed endpoint descriptors: bulk-in, bulk-out,
+ * and interrupt-in. */
+
+static struct usb_endpoint_descriptor
+fs_bulk_in_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ /* wMaxPacketSize set by autoconfiguration */
+};
+
+static struct usb_endpoint_descriptor
+fs_bulk_out_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bEndpointAddress = USB_DIR_OUT,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ /* wMaxPacketSize set by autoconfiguration */
+};
+
+static struct usb_endpoint_descriptor
+fs_intr_in_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .wMaxPacketSize = __constant_cpu_to_le16(2),
+ .bInterval = 32, // frames -> 32 ms
+};
+
+static const struct usb_descriptor_header *fs_function[] = {
+ (struct usb_descriptor_header *) &otg_desc,
+ (struct usb_descriptor_header *) &intf_desc,
+ (struct usb_descriptor_header *) &fs_bulk_in_desc,
+ (struct usb_descriptor_header *) &fs_bulk_out_desc,
+ (struct usb_descriptor_header *) &fs_intr_in_desc,
+ NULL,
+};
+#define FS_FUNCTION_PRE_EP_ENTRIES 2
+
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+
+/*
+ * USB 2.0 devices need to expose both high speed and full speed
+ * descriptors, unless they only run at full speed.
+ *
+ * That means alternate endpoint descriptors (bigger packets)
+ * and a "device qualifier" ... plus more construction options
+ * for the config descriptor.
+ */
+static struct usb_qualifier_descriptor
+dev_qualifier = {
+ .bLength = sizeof dev_qualifier,
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+
+ .bcdUSB = __constant_cpu_to_le16(0x0200),
+ .bDeviceClass = USB_CLASS_PER_INTERFACE,
+
+ .bNumConfigurations = 1,
+};
+
+static struct usb_endpoint_descriptor
+hs_bulk_in_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ /* bEndpointAddress copied from fs_bulk_in_desc during fsg_bind() */
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16(512),
+};
+
+static struct usb_endpoint_descriptor
+hs_bulk_out_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ /* bEndpointAddress copied from fs_bulk_out_desc during fsg_bind() */
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16(512),
+ .bInterval = 1, // NAK every 1 uframe
+};
+
+static struct usb_endpoint_descriptor
+hs_intr_in_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ /* bEndpointAddress copied from fs_intr_in_desc during fsg_bind() */
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .wMaxPacketSize = __constant_cpu_to_le16(2),
+ .bInterval = 9, // 2**(9-1) = 256 uframes -> 32 ms
+};
+
+static const struct usb_descriptor_header *hs_function[] = {
+ (struct usb_descriptor_header *) &otg_desc,
+ (struct usb_descriptor_header *) &intf_desc,
+ (struct usb_descriptor_header *) &hs_bulk_in_desc,
+ (struct usb_descriptor_header *) &hs_bulk_out_desc,
+ (struct usb_descriptor_header *) &hs_intr_in_desc,
+ NULL,
+};
+#define HS_FUNCTION_PRE_EP_ENTRIES 2
+
+/* Maxpacket and other transfer characteristics vary by speed. */
+#define ep_desc(g,fs,hs) (((g)->speed==USB_SPEED_HIGH) ? (hs) : (fs))
+
+#else
+
+/* If there's no high speed support, always use the full-speed descriptor. */
+#define ep_desc(g,fs,hs) fs
+
+#endif /* !CONFIG_USB_GADGET_DUALSPEED */
+
+
+/* The CBI specification limits the serial string to 12 uppercase hexadecimal
+ * characters. */
+static char manufacturer[64];
+static char serial[13];
+
+/* Static strings, in UTF-8 (for simplicity we use only ASCII characters) */
+static struct usb_string strings[] = {
+ {STRING_MANUFACTURER, manufacturer},
+ {STRING_PRODUCT, longname},
+ {STRING_SERIAL, serial},
+ {STRING_CONFIG, "Self-powered"},
+ {STRING_INTERFACE, "Mass Storage"},
+ {}
+};
+
+static struct usb_gadget_strings stringtab = {
+ .language = 0x0409, // en-us
+ .strings = strings,
+};
+
+
+/*
+ * Config descriptors must agree with the code that sets configurations
+ * and with code managing interfaces and their altsettings. They must
+ * also handle different speeds and other-speed requests.
+ */
+static int populate_config_buf(struct usb_gadget *gadget,
+ u8 *buf, u8 type, unsigned index)
+{
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ enum usb_device_speed speed = gadget->speed;
+#endif
+ int len;
+ const struct usb_descriptor_header **function;
+
+ if (index > 0)
+ return -EINVAL;
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ if (type == USB_DT_OTHER_SPEED_CONFIG)
+ speed = (USB_SPEED_FULL + USB_SPEED_HIGH) - speed;
+ if (speed == USB_SPEED_HIGH)
+ function = hs_function;
+ else
+#endif
+ function = fs_function;
+
+ /* for now, don't advertise srp-only devices */
+ if (!gadget->is_otg)
+ function++;
+
+ len = usb_gadget_config_buf(&config_desc, buf, EP0_BUFSIZE, function);
+ ((struct usb_config_descriptor *) buf)->bDescriptorType = type;
+ return len;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* These routines may be called in process context or in_irq */
+
+static void wakeup_thread(struct fsg_dev *fsg)
+{
+ /* Tell the main thread that something has happened */
+ fsg->thread_wakeup_needed = 1;
+ wake_up_all(&fsg->thread_wqh);
+}
+
+
+static void raise_exception(struct fsg_dev *fsg, enum fsg_state new_state)
+{
+ unsigned long flags;
+ struct task_struct *thread_task;
+
+ /* Do nothing if a higher-priority exception is already in progress.
+ * If a lower-or-equal priority exception is in progress, preempt it
+ * and notify the main thread by sending it a signal. */
+ spin_lock_irqsave(&fsg->lock, flags);
+ if (fsg->state <= new_state) {
+ fsg->exception_req_tag = fsg->ep0_req_tag;
+ fsg->state = new_state;
+ thread_task = fsg->thread_task;
+ if (thread_task)
+ send_sig_info(SIGUSR1, SEND_SIG_FORCED, thread_task);
+ }
+ spin_unlock_irqrestore(&fsg->lock, flags);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* The disconnect callback and ep0 routines. These always run in_irq,
+ * except that ep0_queue() is called in the main thread to acknowledge
+ * completion of various requests: set config, set interface, and
+ * Bulk-only device reset. */
+
+static void fsg_disconnect(struct usb_gadget *gadget)
+{
+ struct fsg_dev *fsg = get_gadget_data(gadget);
+
+ DBG(fsg, "disconnect or port reset\n");
+ raise_exception(fsg, FSG_STATE_DISCONNECT);
+}
+
+
+static int ep0_queue(struct fsg_dev *fsg)
+{
+ int rc;
+
+ rc = usb_ep_queue(fsg->ep0, fsg->ep0req, GFP_ATOMIC);
+ if (rc != 0 && rc != -ESHUTDOWN) {
+
+ /* We can't do much more than wait for a reset */
+ WARN(fsg, "error in submission: %s --> %d\n",
+ fsg->ep0->name, rc);
+ }
+ return rc;
+}
+
+static void ep0_complete(struct usb_ep *ep, struct usb_request *req)
+{
+ struct fsg_dev *fsg = (struct fsg_dev *) ep->driver_data;
+
+ if (req->actual > 0)
+ dump_msg(fsg, fsg->ep0req_name, req->buf, req->actual);
+ if (req->status || req->actual != req->length)
+ DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__,
+ req->status, req->actual, req->length);
+ if (req->status == -ECONNRESET) // Request was cancelled
+ usb_ep_fifo_flush(ep);
+
+ if (req->status == 0 && req->context)
+ ((fsg_routine_t) (req->context))(fsg);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* Bulk and interrupt endpoint completion handlers.
+ * These always run in_irq. */
+
+static void bulk_in_complete(struct usb_ep *ep, struct usb_request *req)
+{
+ struct fsg_dev *fsg = (struct fsg_dev *) ep->driver_data;
+ struct fsg_buffhd *bh = (struct fsg_buffhd *) req->context;
+
+ if (req->status || req->actual != req->length)
+ DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__,
+ req->status, req->actual, req->length);
+ if (req->status == -ECONNRESET) // Request was cancelled
+ usb_ep_fifo_flush(ep);
+
+ /* Hold the lock while we update the request and buffer states */
+ spin_lock(&fsg->lock);
+ bh->inreq_busy = 0;
+ bh->state = BUF_STATE_EMPTY;
+ spin_unlock(&fsg->lock);
+ wakeup_thread(fsg);
+}
+
+static void bulk_out_complete(struct usb_ep *ep, struct usb_request *req)
+{
+ struct fsg_dev *fsg = (struct fsg_dev *) ep->driver_data;
+ struct fsg_buffhd *bh = (struct fsg_buffhd *) req->context;
+
+ dump_msg(fsg, "bulk-out", req->buf, req->actual);
+ if (req->status || req->actual != bh->bulk_out_intended_length)
+ DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__,
+ req->status, req->actual,
+ bh->bulk_out_intended_length);
+ if (req->status == -ECONNRESET) // Request was cancelled
+ usb_ep_fifo_flush(ep);
+
+ /* Hold the lock while we update the request and buffer states */
+ spin_lock(&fsg->lock);
+ bh->outreq_busy = 0;
+ bh->state = BUF_STATE_FULL;
+ spin_unlock(&fsg->lock);
+ wakeup_thread(fsg);
+}
+
+
+#ifdef CONFIG_USB_FILE_STORAGE_TEST
+static void intr_in_complete(struct usb_ep *ep, struct usb_request *req)
+{
+ struct fsg_dev *fsg = (struct fsg_dev *) ep->driver_data;
+ struct fsg_buffhd *bh = (struct fsg_buffhd *) req->context;
+
+ if (req->status || req->actual != req->length)
+ DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__,
+ req->status, req->actual, req->length);
+ if (req->status == -ECONNRESET) // Request was cancelled
+ usb_ep_fifo_flush(ep);
+
+ /* Hold the lock while we update the request and buffer states */
+ spin_lock(&fsg->lock);
+ fsg->intreq_busy = 0;
+ bh->state = BUF_STATE_EMPTY;
+ spin_unlock(&fsg->lock);
+ wakeup_thread(fsg);
+}
+
+#else
+static void intr_in_complete(struct usb_ep *ep, struct usb_request *req)
+{}
+#endif /* CONFIG_USB_FILE_STORAGE_TEST */
+
+
+/*-------------------------------------------------------------------------*/
+
+/* Ep0 class-specific handlers. These always run in_irq. */
+
+#ifdef CONFIG_USB_FILE_STORAGE_TEST
+static void received_cbi_adsc(struct fsg_dev *fsg, struct fsg_buffhd *bh)
+{
+ struct usb_request *req = fsg->ep0req;
+ static u8 cbi_reset_cmnd[6] = {
+ SC_SEND_DIAGNOSTIC, 4, 0xff, 0xff, 0xff, 0xff};
+
+ /* Error in command transfer? */
+ if (req->status || req->length != req->actual ||
+ req->actual < 6 || req->actual > MAX_COMMAND_SIZE) {
+
+ /* Not all controllers allow a protocol stall after
+ * receiving control-out data, but we'll try anyway. */
+ fsg_set_halt(fsg, fsg->ep0);
+ return; // Wait for reset
+ }
+
+ /* Is it the special reset command? */
+ if (req->actual >= sizeof cbi_reset_cmnd &&
+ memcmp(req->buf, cbi_reset_cmnd,
+ sizeof cbi_reset_cmnd) == 0) {
+
+ /* Raise an exception to stop the current operation
+ * and reinitialize our state. */
+ DBG(fsg, "cbi reset request\n");
+ raise_exception(fsg, FSG_STATE_RESET);
+ return;
+ }
+
+ VDBG(fsg, "CB[I] accept device-specific command\n");
+ spin_lock(&fsg->lock);
+
+ /* Save the command for later */
+ if (fsg->cbbuf_cmnd_size)
+ WARN(fsg, "CB[I] overwriting previous command\n");
+ fsg->cbbuf_cmnd_size = req->actual;
+ memcpy(fsg->cbbuf_cmnd, req->buf, fsg->cbbuf_cmnd_size);
+
+ spin_unlock(&fsg->lock);
+ wakeup_thread(fsg);
+}
+
+#else
+static void received_cbi_adsc(struct fsg_dev *fsg, struct fsg_buffhd *bh)
+{}
+#endif /* CONFIG_USB_FILE_STORAGE_TEST */
+
+
+static int class_setup_req(struct fsg_dev *fsg,
+ const struct usb_ctrlrequest *ctrl)
+{
+ struct usb_request *req = fsg->ep0req;
+ int value = -EOPNOTSUPP;
+ u16 w_index = ctrl->wIndex;
+ u16 w_length = ctrl->wLength;
+
+ if (!fsg->config)
+ return value;
+
+ /* Handle Bulk-only class-specific requests */
+ if (transport_is_bbb()) {
+ switch (ctrl->bRequest) {
+
+ case USB_BULK_RESET_REQUEST:
+ if (ctrl->bRequestType != (USB_DIR_OUT |
+ USB_TYPE_CLASS | USB_RECIP_INTERFACE))
+ break;
+ if (w_index != 0) {
+ value = -EDOM;
+ break;
+ }
+
+ /* Raise an exception to stop the current operation
+ * and reinitialize our state. */
+ DBG(fsg, "bulk reset request\n");
+ raise_exception(fsg, FSG_STATE_RESET);
+ value = DELAYED_STATUS;
+ break;
+
+ case USB_BULK_GET_MAX_LUN_REQUEST:
+ if (ctrl->bRequestType != (USB_DIR_IN |
+ USB_TYPE_CLASS | USB_RECIP_INTERFACE))
+ break;
+ if (w_index != 0) {
+ value = -EDOM;
+ break;
+ }
+ VDBG(fsg, "get max LUN\n");
+ *(u8 *) req->buf = fsg->nluns - 1;
+ value = min(w_length, (u16) 1);
+ break;
+ }
+ }
+
+ /* Handle CBI class-specific requests */
+ else {
+ switch (ctrl->bRequest) {
+
+ case USB_CBI_ADSC_REQUEST:
+ if (ctrl->bRequestType != (USB_DIR_OUT |
+ USB_TYPE_CLASS | USB_RECIP_INTERFACE))
+ break;
+ if (w_index != 0) {
+ value = -EDOM;
+ break;
+ }
+ if (w_length > MAX_COMMAND_SIZE) {
+ value = -EOVERFLOW;
+ break;
+ }
+ value = w_length;
+ fsg->ep0req->context = received_cbi_adsc;
+ break;
+ }
+ }
+
+ if (value == -EOPNOTSUPP)
+ VDBG(fsg,
+ "unknown class-specific control req "
+ "%02x.%02x v%04x i%04x l%u\n",
+ ctrl->bRequestType, ctrl->bRequest,
+ ctrl->wValue, w_index, w_length);
+ return value;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* Ep0 standard request handlers. These always run in_irq. */
+
+static int standard_setup_req(struct fsg_dev *fsg,
+ const struct usb_ctrlrequest *ctrl)
+{
+ struct usb_request *req = fsg->ep0req;
+ int value = -EOPNOTSUPP;
+ u16 w_index = ctrl->wIndex;
+ u16 w_value = ctrl->wValue;
+ u16 w_length = ctrl->wLength;
+
+ /* Usually this just stores reply data in the pre-allocated ep0 buffer,
+ * but config change events will also reconfigure hardware. */
+ switch (ctrl->bRequest) {
+
+ case USB_REQ_GET_DESCRIPTOR:
+ if (ctrl->bRequestType != (USB_DIR_IN | USB_TYPE_STANDARD |
+ USB_RECIP_DEVICE))
+ break;
+ switch (w_value >> 8) {
+
+ case USB_DT_DEVICE:
+ VDBG(fsg, "get device descriptor\n");
+ value = min(w_length, (u16) sizeof device_desc);
+ memcpy(req->buf, &device_desc, value);
+ break;
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ case USB_DT_DEVICE_QUALIFIER:
+ VDBG(fsg, "get device qualifier\n");
+ if (!fsg->gadget->is_dualspeed)
+ break;
+ value = min(w_length, (u16) sizeof dev_qualifier);
+ memcpy(req->buf, &dev_qualifier, value);
+ break;
+
+ case USB_DT_OTHER_SPEED_CONFIG:
+ VDBG(fsg, "get other-speed config descriptor\n");
+ if (!fsg->gadget->is_dualspeed)
+ break;
+ goto get_config;
+#endif
+ case USB_DT_CONFIG:
+ VDBG(fsg, "get configuration descriptor\n");
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ get_config:
+#endif
+ value = populate_config_buf(fsg->gadget,
+ req->buf,
+ w_value >> 8,
+ w_value & 0xff);
+ if (value >= 0)
+ value = min(w_length, (u16) value);
+ break;
+
+ case USB_DT_STRING:
+ VDBG(fsg, "get string descriptor\n");
+
+ /* wIndex == language code */
+ value = usb_gadget_get_string(&stringtab,
+ w_value & 0xff, req->buf);
+ if (value >= 0)
+ value = min(w_length, (u16) value);
+ break;
+ }
+ break;
+
+ /* One config, two speeds */
+ case USB_REQ_SET_CONFIGURATION:
+ if (ctrl->bRequestType != (USB_DIR_OUT | USB_TYPE_STANDARD |
+ USB_RECIP_DEVICE))
+ break;
+ VDBG(fsg, "set configuration\n");
+ if (w_value == CONFIG_VALUE || w_value == 0) {
+ fsg->new_config = w_value;
+
+ /* Raise an exception to wipe out previous transaction
+ * state (queued bufs, etc) and set the new config. */
+ raise_exception(fsg, FSG_STATE_CONFIG_CHANGE);
+ value = DELAYED_STATUS;
+ }
+ break;
+ case USB_REQ_GET_CONFIGURATION:
+ if (ctrl->bRequestType != (USB_DIR_IN | USB_TYPE_STANDARD |
+ USB_RECIP_DEVICE))
+ break;
+ VDBG(fsg, "get configuration\n");
+ *(u8 *) req->buf = fsg->config;
+ value = min(w_length, (u16) 1);
+ break;
+
+ case USB_REQ_SET_INTERFACE:
+ if (ctrl->bRequestType != (USB_DIR_OUT| USB_TYPE_STANDARD |
+ USB_RECIP_INTERFACE))
+ break;
+ if (fsg->config && w_index == 0) {
+
+ /* Raise an exception to wipe out previous transaction
+ * state (queued bufs, etc) and install the new
+ * interface altsetting. */
+ raise_exception(fsg, FSG_STATE_INTERFACE_CHANGE);
+ value = DELAYED_STATUS;
+ }
+ break;
+ case USB_REQ_GET_INTERFACE:
+ if (ctrl->bRequestType != (USB_DIR_IN | USB_TYPE_STANDARD |
+ USB_RECIP_INTERFACE))
+ break;
+ if (!fsg->config)
+ break;
+ if (w_index != 0) {
+ value = -EDOM;
+ break;
+ }
+ VDBG(fsg, "get interface\n");
+ *(u8 *) req->buf = 0;
+ value = min(w_length, (u16) 1);
+ break;
+
+ default:
+ VDBG(fsg,
+ "unknown control req %02x.%02x v%04x i%04x l%u\n",
+ ctrl->bRequestType, ctrl->bRequest,
+ w_value, w_index, w_length);
+ }
+
+ return value;
+}
+
+
+static int fsg_setup(struct usb_gadget *gadget,
+ const struct usb_ctrlrequest *ctrl)
+{
+ struct fsg_dev *fsg = get_gadget_data(gadget);
+ int rc;
+
+ ++fsg->ep0_req_tag; // Record arrival of a new request
+ fsg->ep0req->context = NULL;
+ fsg->ep0req->length = 0;
+ dump_msg(fsg, "ep0-setup", (u8 *) ctrl, sizeof(*ctrl));
+
+ if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_CLASS)
+ rc = class_setup_req(fsg, ctrl);
+ else
+ rc = standard_setup_req(fsg, ctrl);
+
+ /* Respond with data/status or defer until later? */
+ if (rc >= 0 && rc != DELAYED_STATUS) {
+ fsg->ep0req->length = rc;
+ fsg->ep0req->zero = (rc < ctrl->wLength &&
+ (rc % gadget->ep0->maxpacket) == 0);
+ fsg->ep0req_name = (ctrl->bRequestType & USB_DIR_IN ?
+ "ep0-in" : "ep0-out");
+ rc = ep0_queue(fsg);
+ }
+
+ /* Device either stalls (rc < 0) or reports success */
+ return rc;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* All the following routines run in process context */
+
+
+/* Use this for bulk or interrupt transfers, not ep0 */
+static void start_transfer(struct fsg_dev *fsg, struct usb_ep *ep,
+ struct usb_request *req, volatile int *pbusy,
+ volatile enum fsg_buffer_state *state)
+{
+ int rc;
+
+ if (ep == fsg->bulk_in)
+ dump_msg(fsg, "bulk-in", req->buf, req->length);
+ else if (ep == fsg->intr_in)
+ dump_msg(fsg, "intr-in", req->buf, req->length);
+ *pbusy = 1;
+ *state = BUF_STATE_BUSY;
+ rc = usb_ep_queue(ep, req, GFP_KERNEL);
+ if (rc != 0) {
+ *pbusy = 0;
+ *state = BUF_STATE_EMPTY;
+
+ /* We can't do much more than wait for a reset */
+
+ /* Note: currently the net2280 driver fails zero-length
+ * submissions if DMA is enabled. */
+ if (rc != -ESHUTDOWN && !(rc == -EOPNOTSUPP &&
+ req->length == 0))
+ WARN(fsg, "error in submission: %s --> %d\n",
+ ep->name, rc);
+ }
+}
+
+
+static int sleep_thread(struct fsg_dev *fsg)
+{
+ int rc;
+
+ /* Wait until a signal arrives or we are woken up */
+ rc = wait_event_interruptible(fsg->thread_wqh,
+ fsg->thread_wakeup_needed);
+ fsg->thread_wakeup_needed = 0;
+ if (current->flags & PF_FREEZE)
+ refrigerator(PF_FREEZE);
+ return (rc ? -EINTR : 0);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static int do_read(struct fsg_dev *fsg)
+{
+ struct lun *curlun = fsg->curlun;
+ u32 lba;
+ struct fsg_buffhd *bh;
+ int rc;
+ u32 amount_left;
+ loff_t file_offset, file_offset_tmp;
+ unsigned int amount;
+ unsigned int partial_page;
+ ssize_t nread;
+
+ /* Get the starting Logical Block Address and check that it's
+ * not too big */
+ if (fsg->cmnd[0] == SC_READ_6)
+ lba = (fsg->cmnd[1] << 16) | get_be16(&fsg->cmnd[2]);
+ else {
+ lba = get_be32(&fsg->cmnd[2]);
+
+ /* We allow DPO (Disable Page Out = don't save data in the
+ * cache) and FUA (Force Unit Access = don't read from the
+ * cache), but we don't implement them. */
+ if ((fsg->cmnd[1] & ~0x18) != 0) {
+ curlun->sense_data = SS_INVALID_FIELD_IN_CDB;
+ return -EINVAL;
+ }
+ }
+ if (lba >= curlun->num_sectors) {
+ curlun->sense_data = SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE;
+ return -EINVAL;
+ }
+ file_offset = ((loff_t) lba) << 9;
+
+ /* Carry out the file reads */
+ amount_left = fsg->data_size_from_cmnd;
+ if (unlikely(amount_left == 0))
+ return -EIO; // No default reply
+
+ for (;;) {
+
+ /* Figure out how much we need to read:
+ * Try to read the remaining amount.
+ * But don't read more than the buffer size.
+ * And don't try to read past the end of the file.
+ * Finally, if we're not at a page boundary, don't read past
+ * the next page.
+ * If this means reading 0 then we were asked to read past
+ * the end of file. */
+ amount = min((unsigned int) amount_left, mod_data.buflen);
+ amount = min((loff_t) amount,
+ curlun->file_length - file_offset);
+ partial_page = file_offset & (PAGE_CACHE_SIZE - 1);
+ if (partial_page > 0)
+ amount = min(amount, (unsigned int) PAGE_CACHE_SIZE -
+ partial_page);
+
+ /* Wait for the next buffer to become available */
+ bh = fsg->next_buffhd_to_fill;
+ while (bh->state != BUF_STATE_EMPTY) {
+ if ((rc = sleep_thread(fsg)) != 0)
+ return rc;
+ }
+
+ /* If we were asked to read past the end of file,
+ * end with an empty buffer. */
+ if (amount == 0) {
+ curlun->sense_data =
+ SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE;
+ curlun->sense_data_info = file_offset >> 9;
+ bh->inreq->length = 0;
+ bh->state = BUF_STATE_FULL;
+ break;
+ }
+
+ /* Perform the read */
+ file_offset_tmp = file_offset;
+ nread = vfs_read(curlun->filp,
+ (char __user *) bh->buf,
+ amount, &file_offset_tmp);
+ VLDBG(curlun, "file read %u @ %llu -> %d\n", amount,
+ (unsigned long long) file_offset,
+ (int) nread);
+ if (signal_pending(current))
+ return -EINTR;
+
+ if (nread < 0) {
+ LDBG(curlun, "error in file read: %d\n",
+ (int) nread);
+ nread = 0;
+ } else if (nread < amount) {
+ LDBG(curlun, "partial file read: %d/%u\n",
+ (int) nread, amount);
+ nread -= (nread & 511); // Round down to a block
+ }
+ file_offset += nread;
+ amount_left -= nread;
+ fsg->residue -= nread;
+ bh->inreq->length = nread;
+ bh->state = BUF_STATE_FULL;
+
+ /* If an error occurred, report it and its position */
+ if (nread < amount) {
+ curlun->sense_data = SS_UNRECOVERED_READ_ERROR;
+ curlun->sense_data_info = file_offset >> 9;
+ break;
+ }
+
+ if (amount_left == 0)
+ break; // No more left to read
+
+ /* Send this buffer and go read some more */
+ bh->inreq->zero = 0;
+ start_transfer(fsg, fsg->bulk_in, bh->inreq,
+ &bh->inreq_busy, &bh->state);
+ fsg->next_buffhd_to_fill = bh->next;
+ }
+
+ return -EIO; // No default reply
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static int do_write(struct fsg_dev *fsg)
+{
+ struct lun *curlun = fsg->curlun;
+ u32 lba;
+ struct fsg_buffhd *bh;
+ int get_some_more;
+ u32 amount_left_to_req, amount_left_to_write;
+ loff_t usb_offset, file_offset, file_offset_tmp;
+ unsigned int amount;
+ unsigned int partial_page;
+ ssize_t nwritten;
+ int rc;
+
+ if (curlun->ro) {
+ curlun->sense_data = SS_WRITE_PROTECTED;
+ return -EINVAL;
+ }
+ curlun->filp->f_flags &= ~O_SYNC; // Default is not to wait
+
+ /* Get the starting Logical Block Address and check that it's
+ * not too big */
+ if (fsg->cmnd[0] == SC_WRITE_6)
+ lba = (fsg->cmnd[1] << 16) | get_be16(&fsg->cmnd[2]);
+ else {
+ lba = get_be32(&fsg->cmnd[2]);
+
+ /* We allow DPO (Disable Page Out = don't save data in the
+ * cache) and FUA (Force Unit Access = write directly to the
+ * medium). We don't implement DPO; we implement FUA by
+ * performing synchronous output. */
+ if ((fsg->cmnd[1] & ~0x18) != 0) {
+ curlun->sense_data = SS_INVALID_FIELD_IN_CDB;
+ return -EINVAL;
+ }
+ if (fsg->cmnd[1] & 0x08) // FUA
+ curlun->filp->f_flags |= O_SYNC;
+ }
+ if (lba >= curlun->num_sectors) {
+ curlun->sense_data = SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE;
+ return -EINVAL;
+ }
+
+ /* Carry out the file writes */
+ get_some_more = 1;
+ file_offset = usb_offset = ((loff_t) lba) << 9;
+ amount_left_to_req = amount_left_to_write = fsg->data_size_from_cmnd;
+
+ while (amount_left_to_write > 0) {
+
+ /* Queue a request for more data from the host */
+ bh = fsg->next_buffhd_to_fill;
+ if (bh->state == BUF_STATE_EMPTY && get_some_more) {
+
+ /* Figure out how much we want to get:
+ * Try to get the remaining amount.
+ * But don't get more than the buffer size.
+ * And don't try to go past the end of the file.
+ * If we're not at a page boundary,
+ * don't go past the next page.
+ * If this means getting 0, then we were asked
+ * to write past the end of file.
+ * Finally, round down to a block boundary. */
+ amount = min(amount_left_to_req, mod_data.buflen);
+ amount = min((loff_t) amount, curlun->file_length -
+ usb_offset);
+ partial_page = usb_offset & (PAGE_CACHE_SIZE - 1);
+ if (partial_page > 0)
+ amount = min(amount,
+ (unsigned int) PAGE_CACHE_SIZE - partial_page);
+
+ if (amount == 0) {
+ get_some_more = 0;
+ curlun->sense_data =
+ SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE;
+ curlun->sense_data_info = usb_offset >> 9;
+ continue;
+ }
+ amount -= (amount & 511);
+ if (amount == 0) {
+
+ /* Why were we were asked to transfer a
+ * partial block? */
+ get_some_more = 0;
+ continue;
+ }
+
+ /* Get the next buffer */
+ usb_offset += amount;
+ fsg->usb_amount_left -= amount;
+ amount_left_to_req -= amount;
+ if (amount_left_to_req == 0)
+ get_some_more = 0;
+
+ /* amount is always divisible by 512, hence by
+ * the bulk-out maxpacket size */
+ bh->outreq->length = bh->bulk_out_intended_length =
+ amount;
+ start_transfer(fsg, fsg->bulk_out, bh->outreq,
+ &bh->outreq_busy, &bh->state);
+ fsg->next_buffhd_to_fill = bh->next;
+ continue;
+ }
+
+ /* Write the received data to the backing file */
+ bh = fsg->next_buffhd_to_drain;
+ if (bh->state == BUF_STATE_EMPTY && !get_some_more)
+ break; // We stopped early
+ if (bh->state == BUF_STATE_FULL) {
+ fsg->next_buffhd_to_drain = bh->next;
+ bh->state = BUF_STATE_EMPTY;
+
+ /* Did something go wrong with the transfer? */
+ if (bh->outreq->status != 0) {
+ curlun->sense_data = SS_COMMUNICATION_FAILURE;
+ curlun->sense_data_info = file_offset >> 9;
+ break;
+ }
+
+ amount = bh->outreq->actual;
+ if (curlun->file_length - file_offset < amount) {
+ LERROR(curlun,
+ "write %u @ %llu beyond end %llu\n",
+ amount, (unsigned long long) file_offset,
+ (unsigned long long) curlun->file_length);
+ amount = curlun->file_length - file_offset;
+ }
+
+ /* Perform the write */
+ file_offset_tmp = file_offset;
+ nwritten = vfs_write(curlun->filp,
+ (char __user *) bh->buf,
+ amount, &file_offset_tmp);
+ VLDBG(curlun, "file write %u @ %llu -> %d\n", amount,
+ (unsigned long long) file_offset,
+ (int) nwritten);
+ if (signal_pending(current))
+ return -EINTR; // Interrupted!
+
+ if (nwritten < 0) {
+ LDBG(curlun, "error in file write: %d\n",
+ (int) nwritten);
+ nwritten = 0;
+ } else if (nwritten < amount) {
+ LDBG(curlun, "partial file write: %d/%u\n",
+ (int) nwritten, amount);
+ nwritten -= (nwritten & 511);
+ // Round down to a block
+ }
+ file_offset += nwritten;
+ amount_left_to_write -= nwritten;
+ fsg->residue -= nwritten;
+
+ /* If an error occurred, report it and its position */
+ if (nwritten < amount) {
+ curlun->sense_data = SS_WRITE_ERROR;
+ curlun->sense_data_info = file_offset >> 9;
+ break;
+ }
+
+ /* Did the host decide to stop early? */
+ if (bh->outreq->actual != bh->outreq->length) {
+ fsg->short_packet_received = 1;
+ break;
+ }
+ continue;
+ }
+
+ /* Wait for something to happen */
+ if ((rc = sleep_thread(fsg)) != 0)
+ return rc;
+ }
+
+ return -EIO; // No default reply
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* Sync the file data, don't bother with the metadata.
+ * This code was copied from fs/buffer.c:sys_fdatasync(). */
+static int fsync_sub(struct lun *curlun)
+{
+ struct file *filp = curlun->filp;
+ struct inode *inode;
+ int rc, err;
+
+ if (curlun->ro || !filp)
+ return 0;
+ if (!filp->f_op->fsync)
+ return -EINVAL;
+
+ inode = filp->f_dentry->d_inode;
+ down(&inode->i_sem);
+ current->flags |= PF_SYNCWRITE;
+ rc = filemap_fdatawrite(inode->i_mapping);
+ err = filp->f_op->fsync(filp, filp->f_dentry, 1);
+ if (!rc)
+ rc = err;
+ err = filemap_fdatawait(inode->i_mapping);
+ if (!rc)
+ rc = err;
+ current->flags &= ~PF_SYNCWRITE;
+ up(&inode->i_sem);
+ VLDBG(curlun, "fdatasync -> %d\n", rc);
+ return rc;
+}
+
+static void fsync_all(struct fsg_dev *fsg)
+{
+ int i;
+
+ for (i = 0; i < fsg->nluns; ++i)
+ fsync_sub(&fsg->luns[i]);
+}
+
+static int do_synchronize_cache(struct fsg_dev *fsg)
+{
+ struct lun *curlun = fsg->curlun;
+ int rc;
+
+ /* We ignore the requested LBA and write out all file's
+ * dirty data buffers. */
+ rc = fsync_sub(curlun);
+ if (rc)
+ curlun->sense_data = SS_WRITE_ERROR;
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static void invalidate_sub(struct lun *curlun)
+{
+ struct file *filp = curlun->filp;
+ struct inode *inode = filp->f_dentry->d_inode;
+ unsigned long rc;
+
+ rc = invalidate_inode_pages(inode->i_mapping);
+ VLDBG(curlun, "invalidate_inode_pages -> %ld\n", rc);
+}
+
+static int do_verify(struct fsg_dev *fsg)
+{
+ struct lun *curlun = fsg->curlun;
+ u32 lba;
+ u32 verification_length;
+ struct fsg_buffhd *bh = fsg->next_buffhd_to_fill;
+ loff_t file_offset, file_offset_tmp;
+ u32 amount_left;
+ unsigned int amount;
+ ssize_t nread;
+
+ /* Get the starting Logical Block Address and check that it's
+ * not too big */
+ lba = get_be32(&fsg->cmnd[2]);
+ if (lba >= curlun->num_sectors) {
+ curlun->sense_data = SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE;
+ return -EINVAL;
+ }
+
+ /* We allow DPO (Disable Page Out = don't save data in the
+ * cache) but we don't implement it. */
+ if ((fsg->cmnd[1] & ~0x10) != 0) {
+ curlun->sense_data = SS_INVALID_FIELD_IN_CDB;
+ return -EINVAL;
+ }
+
+ verification_length = get_be16(&fsg->cmnd[7]);
+ if (unlikely(verification_length == 0))
+ return -EIO; // No default reply
+
+ /* Prepare to carry out the file verify */
+ amount_left = verification_length << 9;
+ file_offset = ((loff_t) lba) << 9;
+
+ /* Write out all the dirty buffers before invalidating them */
+ fsync_sub(curlun);
+ if (signal_pending(current))
+ return -EINTR;
+
+ invalidate_sub(curlun);
+ if (signal_pending(current))
+ return -EINTR;
+
+ /* Just try to read the requested blocks */
+ while (amount_left > 0) {
+
+ /* Figure out how much we need to read:
+ * Try to read the remaining amount, but not more than
+ * the buffer size.
+ * And don't try to read past the end of the file.
+ * If this means reading 0 then we were asked to read
+ * past the end of file. */
+ amount = min((unsigned int) amount_left, mod_data.buflen);
+ amount = min((loff_t) amount,
+ curlun->file_length - file_offset);
+ if (amount == 0) {
+ curlun->sense_data =
+ SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE;
+ curlun->sense_data_info = file_offset >> 9;
+ break;
+ }
+
+ /* Perform the read */
+ file_offset_tmp = file_offset;
+ nread = vfs_read(curlun->filp,
+ (char __user *) bh->buf,
+ amount, &file_offset_tmp);
+ VLDBG(curlun, "file read %u @ %llu -> %d\n", amount,
+ (unsigned long long) file_offset,
+ (int) nread);
+ if (signal_pending(current))
+ return -EINTR;
+
+ if (nread < 0) {
+ LDBG(curlun, "error in file verify: %d\n",
+ (int) nread);
+ nread = 0;
+ } else if (nread < amount) {
+ LDBG(curlun, "partial file verify: %d/%u\n",
+ (int) nread, amount);
+ nread -= (nread & 511); // Round down to a sector
+ }
+ if (nread == 0) {
+ curlun->sense_data = SS_UNRECOVERED_READ_ERROR;
+ curlun->sense_data_info = file_offset >> 9;
+ break;
+ }
+ file_offset += nread;
+ amount_left -= nread;
+ }
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static int do_inquiry(struct fsg_dev *fsg, struct fsg_buffhd *bh)
+{
+ u8 *buf = (u8 *) bh->buf;
+
+ static char vendor_id[] = "Linux ";
+ static char product_id[] = "File-Stor Gadget";
+
+ if (!fsg->curlun) { // Unsupported LUNs are okay
+ fsg->bad_lun_okay = 1;
+ memset(buf, 0, 36);
+ buf[0] = 0x7f; // Unsupported, no device-type
+ return 36;
+ }
+
+ memset(buf, 0, 8); // Non-removable, direct-access device
+ if (mod_data.removable)
+ buf[1] = 0x80;
+ buf[2] = 2; // ANSI SCSI level 2
+ buf[3] = 2; // SCSI-2 INQUIRY data format
+ buf[4] = 31; // Additional length
+ // No special options
+ sprintf(buf + 8, "%-8s%-16s%04x", vendor_id, product_id,
+ mod_data.release);
+ return 36;
+}
+
+
+static int do_request_sense(struct fsg_dev *fsg, struct fsg_buffhd *bh)
+{
+ struct lun *curlun = fsg->curlun;
+ u8 *buf = (u8 *) bh->buf;
+ u32 sd, sdinfo;
+
+ /*
+ * From the SCSI-2 spec., section 7.9 (Unit attention condition):
+ *
+ * If a REQUEST SENSE command is received from an initiator
+ * with a pending unit attention condition (before the target
+ * generates the contingent allegiance condition), then the
+ * target shall either:
+ * a) report any pending sense data and preserve the unit
+ * attention condition on the logical unit, or,
+ * b) report the unit attention condition, may discard any
+ * pending sense data, and clear the unit attention
+ * condition on the logical unit for that initiator.
+ *
+ * FSG normally uses option a); enable this code to use option b).
+ */
+#if 0
+ if (curlun && curlun->unit_attention_data != SS_NO_SENSE) {
+ curlun->sense_data = curlun->unit_attention_data;
+ curlun->unit_attention_data = SS_NO_SENSE;
+ }
+#endif
+
+ if (!curlun) { // Unsupported LUNs are okay
+ fsg->bad_lun_okay = 1;
+ sd = SS_LOGICAL_UNIT_NOT_SUPPORTED;
+ sdinfo = 0;
+ } else {
+ sd = curlun->sense_data;
+ sdinfo = curlun->sense_data_info;
+ curlun->sense_data = SS_NO_SENSE;
+ curlun->sense_data_info = 0;
+ }
+
+ memset(buf, 0, 18);
+ buf[0] = 0x80 | 0x70; // Valid, current error
+ buf[2] = SK(sd);
+ put_be32(&buf[3], sdinfo); // Sense information
+ buf[7] = 18 - 8; // Additional sense length
+ buf[12] = ASC(sd);
+ buf[13] = ASCQ(sd);
+ return 18;
+}
+
+
+static int do_read_capacity(struct fsg_dev *fsg, struct fsg_buffhd *bh)
+{
+ struct lun *curlun = fsg->curlun;
+ u32 lba = get_be32(&fsg->cmnd[2]);
+ int pmi = fsg->cmnd[8];
+ u8 *buf = (u8 *) bh->buf;
+
+ /* Check the PMI and LBA fields */
+ if (pmi > 1 || (pmi == 0 && lba != 0)) {
+ curlun->sense_data = SS_INVALID_FIELD_IN_CDB;
+ return -EINVAL;
+ }
+
+ put_be32(&buf[0], curlun->num_sectors - 1); // Max logical block
+ put_be32(&buf[4], 512); // Block length
+ return 8;
+}
+
+
+static int do_mode_sense(struct fsg_dev *fsg, struct fsg_buffhd *bh)
+{
+ struct lun *curlun = fsg->curlun;
+ int mscmnd = fsg->cmnd[0];
+ u8 *buf = (u8 *) bh->buf;
+ u8 *buf0 = buf;
+ int pc, page_code;
+ int changeable_values, all_pages;
+ int valid_page = 0;
+ int len, limit;
+
+ if ((fsg->cmnd[1] & ~0x08) != 0) { // Mask away DBD
+ curlun->sense_data = SS_INVALID_FIELD_IN_CDB;
+ return -EINVAL;
+ }
+ pc = fsg->cmnd[2] >> 6;
+ page_code = fsg->cmnd[2] & 0x3f;
+ if (pc == 3) {
+ curlun->sense_data = SS_SAVING_PARAMETERS_NOT_SUPPORTED;
+ return -EINVAL;
+ }
+ changeable_values = (pc == 1);
+ all_pages = (page_code == 0x3f);
+
+ /* Write the mode parameter header. Fixed values are: default
+ * medium type, no cache control (DPOFUA), and no block descriptors.
+ * The only variable value is the WriteProtect bit. We will fill in
+ * the mode data length later. */
+ memset(buf, 0, 8);
+ if (mscmnd == SC_MODE_SENSE_6) {
+ buf[2] = (curlun->ro ? 0x80 : 0x00); // WP, DPOFUA
+ buf += 4;
+ limit = 255;
+ } else { // SC_MODE_SENSE_10
+ buf[3] = (curlun->ro ? 0x80 : 0x00); // WP, DPOFUA
+ buf += 8;
+ limit = 65535; // Should really be mod_data.buflen
+ }
+
+ /* No block descriptors */
+
+ /* The mode pages, in numerical order. The only page we support
+ * is the Caching page. */
+ if (page_code == 0x08 || all_pages) {
+ valid_page = 1;
+ buf[0] = 0x08; // Page code
+ buf[1] = 10; // Page length
+ memset(buf+2, 0, 10); // None of the fields are changeable
+
+ if (!changeable_values) {
+ buf[2] = 0x04; // Write cache enable,
+ // Read cache not disabled
+ // No cache retention priorities
+ put_be16(&buf[4], 0xffff); // Don't disable prefetch
+ // Minimum prefetch = 0
+ put_be16(&buf[8], 0xffff); // Maximum prefetch
+ put_be16(&buf[10], 0xffff); // Maximum prefetch ceiling
+ }
+ buf += 12;
+ }
+
+ /* Check that a valid page was requested and the mode data length
+ * isn't too long. */
+ len = buf - buf0;
+ if (!valid_page || len > limit) {
+ curlun->sense_data = SS_INVALID_FIELD_IN_CDB;
+ return -EINVAL;
+ }
+
+ /* Store the mode data length */
+ if (mscmnd == SC_MODE_SENSE_6)
+ buf0[0] = len - 1;
+ else
+ put_be16(buf0, len - 2);
+ return len;
+}
+
+
+static int do_start_stop(struct fsg_dev *fsg)
+{
+ struct lun *curlun = fsg->curlun;
+ int loej, start;
+
+ if (!mod_data.removable) {
+ curlun->sense_data = SS_INVALID_COMMAND;
+ return -EINVAL;
+ }
+
+ // int immed = fsg->cmnd[1] & 0x01;
+ loej = fsg->cmnd[4] & 0x02;
+ start = fsg->cmnd[4] & 0x01;
+
+#ifdef CONFIG_USB_FILE_STORAGE_TEST
+ if ((fsg->cmnd[1] & ~0x01) != 0 || // Mask away Immed
+ (fsg->cmnd[4] & ~0x03) != 0) { // Mask LoEj, Start
+ curlun->sense_data = SS_INVALID_FIELD_IN_CDB;
+ return -EINVAL;
+ }
+
+ if (!start) {
+
+ /* Are we allowed to unload the media? */
+ if (curlun->prevent_medium_removal) {
+ LDBG(curlun, "unload attempt prevented\n");
+ curlun->sense_data = SS_MEDIUM_REMOVAL_PREVENTED;
+ return -EINVAL;
+ }
+ if (loej) { // Simulate an unload/eject
+ up_read(&fsg->filesem);
+ down_write(&fsg->filesem);
+ close_backing_file(curlun);
+ up_write(&fsg->filesem);
+ down_read(&fsg->filesem);
+ }
+ } else {
+
+ /* Our emulation doesn't support mounting; the medium is
+ * available for use as soon as it is loaded. */
+ if (!backing_file_is_open(curlun)) {
+ curlun->sense_data = SS_MEDIUM_NOT_PRESENT;
+ return -EINVAL;
+ }
+ }
+#endif
+ return 0;
+}
+
+
+static int do_prevent_allow(struct fsg_dev *fsg)
+{
+ struct lun *curlun = fsg->curlun;
+ int prevent;
+
+ if (!mod_data.removable) {
+ curlun->sense_data = SS_INVALID_COMMAND;
+ return -EINVAL;
+ }
+
+ prevent = fsg->cmnd[4] & 0x01;
+ if ((fsg->cmnd[4] & ~0x01) != 0) { // Mask away Prevent
+ curlun->sense_data = SS_INVALID_FIELD_IN_CDB;
+ return -EINVAL;
+ }
+
+ if (curlun->prevent_medium_removal && !prevent)
+ fsync_sub(curlun);
+ curlun->prevent_medium_removal = prevent;
+ return 0;
+}
+
+
+static int do_read_format_capacities(struct fsg_dev *fsg,
+ struct fsg_buffhd *bh)
+{
+ struct lun *curlun = fsg->curlun;
+ u8 *buf = (u8 *) bh->buf;
+
+ buf[0] = buf[1] = buf[2] = 0;
+ buf[3] = 8; // Only the Current/Maximum Capacity Descriptor
+ buf += 4;
+
+ put_be32(&buf[0], curlun->num_sectors); // Number of blocks
+ put_be32(&buf[4], 512); // Block length
+ buf[4] = 0x02; // Current capacity
+ return 12;
+}
+
+
+static int do_mode_select(struct fsg_dev *fsg, struct fsg_buffhd *bh)
+{
+ struct lun *curlun = fsg->curlun;
+
+ /* We don't support MODE SELECT */
+ curlun->sense_data = SS_INVALID_COMMAND;
+ return -EINVAL;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static int halt_bulk_in_endpoint(struct fsg_dev *fsg)
+{
+ int rc;
+
+ rc = fsg_set_halt(fsg, fsg->bulk_in);
+ if (rc == -EAGAIN)
+ VDBG(fsg, "delayed bulk-in endpoint halt\n");
+ while (rc != 0) {
+ if (rc != -EAGAIN) {
+ WARN(fsg, "usb_ep_set_halt -> %d\n", rc);
+ rc = 0;
+ break;
+ }
+
+ /* Wait for a short time and then try again */
+ if (msleep_interruptible(100) != 0)
+ return -EINTR;
+ rc = usb_ep_set_halt(fsg->bulk_in);
+ }
+ return rc;
+}
+
+static int pad_with_zeros(struct fsg_dev *fsg)
+{
+ struct fsg_buffhd *bh = fsg->next_buffhd_to_fill;
+ u32 nkeep = bh->inreq->length;
+ u32 nsend;
+ int rc;
+
+ bh->state = BUF_STATE_EMPTY; // For the first iteration
+ fsg->usb_amount_left = nkeep + fsg->residue;
+ while (fsg->usb_amount_left > 0) {
+
+ /* Wait for the next buffer to be free */
+ while (bh->state != BUF_STATE_EMPTY) {
+ if ((rc = sleep_thread(fsg)) != 0)
+ return rc;
+ }
+
+ nsend = min(fsg->usb_amount_left, (u32) mod_data.buflen);
+ memset(bh->buf + nkeep, 0, nsend - nkeep);
+ bh->inreq->length = nsend;
+ bh->inreq->zero = 0;
+ start_transfer(fsg, fsg->bulk_in, bh->inreq,
+ &bh->inreq_busy, &bh->state);
+ bh = fsg->next_buffhd_to_fill = bh->next;
+ fsg->usb_amount_left -= nsend;
+ nkeep = 0;
+ }
+ return 0;
+}
+
+static int throw_away_data(struct fsg_dev *fsg)
+{
+ struct fsg_buffhd *bh;
+ u32 amount;
+ int rc;
+
+ while ((bh = fsg->next_buffhd_to_drain)->state != BUF_STATE_EMPTY ||
+ fsg->usb_amount_left > 0) {
+
+ /* Throw away the data in a filled buffer */
+ if (bh->state == BUF_STATE_FULL) {
+ bh->state = BUF_STATE_EMPTY;
+ fsg->next_buffhd_to_drain = bh->next;
+
+ /* A short packet or an error ends everything */
+ if (bh->outreq->actual != bh->outreq->length ||
+ bh->outreq->status != 0) {
+ raise_exception(fsg, FSG_STATE_ABORT_BULK_OUT);
+ return -EINTR;
+ }
+ continue;
+ }
+
+ /* Try to submit another request if we need one */
+ bh = fsg->next_buffhd_to_fill;
+ if (bh->state == BUF_STATE_EMPTY && fsg->usb_amount_left > 0) {
+ amount = min(fsg->usb_amount_left,
+ (u32) mod_data.buflen);
+
+ /* amount is always divisible by 512, hence by
+ * the bulk-out maxpacket size */
+ bh->outreq->length = bh->bulk_out_intended_length =
+ amount;
+ start_transfer(fsg, fsg->bulk_out, bh->outreq,
+ &bh->outreq_busy, &bh->state);
+ fsg->next_buffhd_to_fill = bh->next;
+ fsg->usb_amount_left -= amount;
+ continue;
+ }
+
+ /* Otherwise wait for something to happen */
+ if ((rc = sleep_thread(fsg)) != 0)
+ return rc;
+ }
+ return 0;
+}
+
+
+static int finish_reply(struct fsg_dev *fsg)
+{
+ struct fsg_buffhd *bh = fsg->next_buffhd_to_fill;
+ int rc = 0;
+
+ switch (fsg->data_dir) {
+ case DATA_DIR_NONE:
+ break; // Nothing to send
+
+ /* If we don't know whether the host wants to read or write,
+ * this must be CB or CBI with an unknown command. We mustn't
+ * try to send or receive any data. So stall both bulk pipes
+ * if we can and wait for a reset. */
+ case DATA_DIR_UNKNOWN:
+ if (mod_data.can_stall) {
+ fsg_set_halt(fsg, fsg->bulk_out);
+ rc = halt_bulk_in_endpoint(fsg);
+ }
+ break;
+
+ /* All but the last buffer of data must have already been sent */
+ case DATA_DIR_TO_HOST:
+ if (fsg->data_size == 0)
+ ; // Nothing to send
+
+ /* If there's no residue, simply send the last buffer */
+ else if (fsg->residue == 0) {
+ bh->inreq->zero = 0;
+ start_transfer(fsg, fsg->bulk_in, bh->inreq,
+ &bh->inreq_busy, &bh->state);
+ fsg->next_buffhd_to_fill = bh->next;
+ }
+
+ /* There is a residue. For CB and CBI, simply mark the end
+ * of the data with a short packet. However, if we are
+ * allowed to stall, there was no data at all (residue ==
+ * data_size), and the command failed (invalid LUN or
+ * sense data is set), then halt the bulk-in endpoint
+ * instead. */
+ else if (!transport_is_bbb()) {
+ if (mod_data.can_stall &&
+ fsg->residue == fsg->data_size &&
+ (!fsg->curlun || fsg->curlun->sense_data != SS_NO_SENSE)) {
+ bh->state = BUF_STATE_EMPTY;
+ rc = halt_bulk_in_endpoint(fsg);
+ } else {
+ bh->inreq->zero = 1;
+ start_transfer(fsg, fsg->bulk_in, bh->inreq,
+ &bh->inreq_busy, &bh->state);
+ fsg->next_buffhd_to_fill = bh->next;
+ }
+ }
+
+ /* For Bulk-only, if we're allowed to stall then send the
+ * short packet and halt the bulk-in endpoint. If we can't
+ * stall, pad out the remaining data with 0's. */
+ else {
+ if (mod_data.can_stall) {
+ bh->inreq->zero = 1;
+ start_transfer(fsg, fsg->bulk_in, bh->inreq,
+ &bh->inreq_busy, &bh->state);
+ fsg->next_buffhd_to_fill = bh->next;
+ rc = halt_bulk_in_endpoint(fsg);
+ } else
+ rc = pad_with_zeros(fsg);
+ }
+ break;
+
+ /* We have processed all we want from the data the host has sent.
+ * There may still be outstanding bulk-out requests. */
+ case DATA_DIR_FROM_HOST:
+ if (fsg->residue == 0)
+ ; // Nothing to receive
+
+ /* Did the host stop sending unexpectedly early? */
+ else if (fsg->short_packet_received) {
+ raise_exception(fsg, FSG_STATE_ABORT_BULK_OUT);
+ rc = -EINTR;
+ }
+
+ /* We haven't processed all the incoming data. Even though
+ * we may be allowed to stall, doing so would cause a race.
+ * The controller may already have ACK'ed all the remaining
+ * bulk-out packets, in which case the host wouldn't see a
+ * STALL. Not realizing the endpoint was halted, it wouldn't
+ * clear the halt -- leading to problems later on. */
+#if 0
+ else if (mod_data.can_stall) {
+ fsg_set_halt(fsg, fsg->bulk_out);
+ raise_exception(fsg, FSG_STATE_ABORT_BULK_OUT);
+ rc = -EINTR;
+ }
+#endif
+
+ /* We can't stall. Read in the excess data and throw it
+ * all away. */
+ else
+ rc = throw_away_data(fsg);
+ break;
+ }
+ return rc;
+}
+
+
+static int send_status(struct fsg_dev *fsg)
+{
+ struct lun *curlun = fsg->curlun;
+ struct fsg_buffhd *bh;
+ int rc;
+ u8 status = USB_STATUS_PASS;
+ u32 sd, sdinfo = 0;
+
+ /* Wait for the next buffer to become available */
+ bh = fsg->next_buffhd_to_fill;
+ while (bh->state != BUF_STATE_EMPTY) {
+ if ((rc = sleep_thread(fsg)) != 0)
+ return rc;
+ }
+
+ if (curlun) {
+ sd = curlun->sense_data;
+ sdinfo = curlun->sense_data_info;
+ } else if (fsg->bad_lun_okay)
+ sd = SS_NO_SENSE;
+ else
+ sd = SS_LOGICAL_UNIT_NOT_SUPPORTED;
+
+ if (fsg->phase_error) {
+ DBG(fsg, "sending phase-error status\n");
+ status = USB_STATUS_PHASE_ERROR;
+ sd = SS_INVALID_COMMAND;
+ } else if (sd != SS_NO_SENSE) {
+ DBG(fsg, "sending command-failure status\n");
+ status = USB_STATUS_FAIL;
+ VDBG(fsg, " sense data: SK x%02x, ASC x%02x, ASCQ x%02x;"
+ " info x%x\n",
+ SK(sd), ASC(sd), ASCQ(sd), sdinfo);
+ }
+
+ if (transport_is_bbb()) {
+ struct bulk_cs_wrap *csw = (struct bulk_cs_wrap *) bh->buf;
+
+ /* Store and send the Bulk-only CSW */
+ csw->Signature = __constant_cpu_to_le32(USB_BULK_CS_SIG);
+ csw->Tag = fsg->tag;
+ csw->Residue = cpu_to_le32(fsg->residue);
+ csw->Status = status;
+
+ bh->inreq->length = USB_BULK_CS_WRAP_LEN;
+ bh->inreq->zero = 0;
+ start_transfer(fsg, fsg->bulk_in, bh->inreq,
+ &bh->inreq_busy, &bh->state);
+
+ } else if (mod_data.transport_type == USB_PR_CB) {
+
+ /* Control-Bulk transport has no status phase! */
+ return 0;
+
+ } else { // USB_PR_CBI
+ struct interrupt_data *buf = (struct interrupt_data *)
+ bh->buf;
+
+ /* Store and send the Interrupt data. UFI sends the ASC
+ * and ASCQ bytes. Everything else sends a Type (which
+ * is always 0) and the status Value. */
+ if (mod_data.protocol_type == USB_SC_UFI) {
+ buf->bType = ASC(sd);
+ buf->bValue = ASCQ(sd);
+ } else {
+ buf->bType = 0;
+ buf->bValue = status;
+ }
+ fsg->intreq->length = CBI_INTERRUPT_DATA_LEN;
+
+ fsg->intr_buffhd = bh; // Point to the right buffhd
+ fsg->intreq->buf = bh->inreq->buf;
+ fsg->intreq->dma = bh->inreq->dma;
+ fsg->intreq->context = bh;
+ start_transfer(fsg, fsg->intr_in, fsg->intreq,
+ &fsg->intreq_busy, &bh->state);
+ }
+
+ fsg->next_buffhd_to_fill = bh->next;
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* Check whether the command is properly formed and whether its data size
+ * and direction agree with the values we already have. */
+static int check_command(struct fsg_dev *fsg, int cmnd_size,
+ enum data_direction data_dir, unsigned int mask,
+ int needs_medium, const char *name)
+{
+ int i;
+ int lun = fsg->cmnd[1] >> 5;
+ static const char dirletter[4] = {'u', 'o', 'i', 'n'};
+ char hdlen[20];
+ struct lun *curlun;
+
+ /* Adjust the expected cmnd_size for protocol encapsulation padding.
+ * Transparent SCSI doesn't pad. */
+ if (protocol_is_scsi())
+ ;
+
+ /* There's some disagreement as to whether RBC pads commands or not.
+ * We'll play it safe and accept either form. */
+ else if (mod_data.protocol_type == USB_SC_RBC) {
+ if (fsg->cmnd_size == 12)
+ cmnd_size = 12;
+
+ /* All the other protocols pad to 12 bytes */
+ } else
+ cmnd_size = 12;
+
+ hdlen[0] = 0;
+ if (fsg->data_dir != DATA_DIR_UNKNOWN)
+ sprintf(hdlen, ", H%c=%u", dirletter[(int) fsg->data_dir],
+ fsg->data_size);
+ VDBG(fsg, "SCSI command: %s; Dc=%d, D%c=%u; Hc=%d%s\n",
+ name, cmnd_size, dirletter[(int) data_dir],
+ fsg->data_size_from_cmnd, fsg->cmnd_size, hdlen);
+
+ /* We can't reply at all until we know the correct data direction
+ * and size. */
+ if (fsg->data_size_from_cmnd == 0)
+ data_dir = DATA_DIR_NONE;
+ if (fsg->data_dir == DATA_DIR_UNKNOWN) { // CB or CBI
+ fsg->data_dir = data_dir;
+ fsg->data_size = fsg->data_size_from_cmnd;
+
+ } else { // Bulk-only
+ if (fsg->data_size < fsg->data_size_from_cmnd) {
+
+ /* Host data size < Device data size is a phase error.
+ * Carry out the command, but only transfer as much
+ * as we are allowed. */
+ fsg->data_size_from_cmnd = fsg->data_size;
+ fsg->phase_error = 1;
+ }
+ }
+ fsg->residue = fsg->usb_amount_left = fsg->data_size;
+
+ /* Conflicting data directions is a phase error */
+ if (fsg->data_dir != data_dir && fsg->data_size_from_cmnd > 0) {
+ fsg->phase_error = 1;
+ return -EINVAL;
+ }
+
+ /* Verify the length of the command itself */
+ if (cmnd_size != fsg->cmnd_size) {
+
+ /* Special case workaround: MS-Windows issues REQUEST SENSE
+ * with cbw->Length == 12 (it should be 6). */
+ if (fsg->cmnd[0] == SC_REQUEST_SENSE && fsg->cmnd_size == 12)
+ cmnd_size = fsg->cmnd_size;
+ else {
+ fsg->phase_error = 1;
+ return -EINVAL;
+ }
+ }
+
+ /* Check that the LUN values are oonsistent */
+ if (transport_is_bbb()) {
+ if (fsg->lun != lun)
+ DBG(fsg, "using LUN %d from CBW, "
+ "not LUN %d from CDB\n",
+ fsg->lun, lun);
+ } else
+ fsg->lun = lun; // Use LUN from the command
+
+ /* Check the LUN */
+ if (fsg->lun >= 0 && fsg->lun < fsg->nluns) {
+ fsg->curlun = curlun = &fsg->luns[fsg->lun];
+ if (fsg->cmnd[0] != SC_REQUEST_SENSE) {
+ curlun->sense_data = SS_NO_SENSE;
+ curlun->sense_data_info = 0;
+ }
+ } else {
+ fsg->curlun = curlun = NULL;
+ fsg->bad_lun_okay = 0;
+
+ /* INQUIRY and REQUEST SENSE commands are explicitly allowed
+ * to use unsupported LUNs; all others may not. */
+ if (fsg->cmnd[0] != SC_INQUIRY &&
+ fsg->cmnd[0] != SC_REQUEST_SENSE) {
+ DBG(fsg, "unsupported LUN %d\n", fsg->lun);
+ return -EINVAL;
+ }
+ }
+
+ /* If a unit attention condition exists, only INQUIRY and
+ * REQUEST SENSE commands are allowed; anything else must fail. */
+ if (curlun && curlun->unit_attention_data != SS_NO_SENSE &&
+ fsg->cmnd[0] != SC_INQUIRY &&
+ fsg->cmnd[0] != SC_REQUEST_SENSE) {
+ curlun->sense_data = curlun->unit_attention_data;
+ curlun->unit_attention_data = SS_NO_SENSE;
+ return -EINVAL;
+ }
+
+ /* Check that only command bytes listed in the mask are non-zero */
+ fsg->cmnd[1] &= 0x1f; // Mask away the LUN
+ for (i = 1; i < cmnd_size; ++i) {
+ if (fsg->cmnd[i] && !(mask & (1 << i))) {
+ if (curlun)
+ curlun->sense_data = SS_INVALID_FIELD_IN_CDB;
+ return -EINVAL;
+ }
+ }
+
+ /* If the medium isn't mounted and the command needs to access
+ * it, return an error. */
+ if (curlun && !backing_file_is_open(curlun) && needs_medium) {
+ curlun->sense_data = SS_MEDIUM_NOT_PRESENT;
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+
+static int do_scsi_command(struct fsg_dev *fsg)
+{
+ struct fsg_buffhd *bh;
+ int rc;
+ int reply = -EINVAL;
+ int i;
+ static char unknown[16];
+
+ dump_cdb(fsg);
+
+ /* Wait for the next buffer to become available for data or status */
+ bh = fsg->next_buffhd_to_drain = fsg->next_buffhd_to_fill;
+ while (bh->state != BUF_STATE_EMPTY) {
+ if ((rc = sleep_thread(fsg)) != 0)
+ return rc;
+ }
+ fsg->phase_error = 0;
+ fsg->short_packet_received = 0;
+
+ down_read(&fsg->filesem); // We're using the backing file
+ switch (fsg->cmnd[0]) {
+
+ case SC_INQUIRY:
+ fsg->data_size_from_cmnd = fsg->cmnd[4];
+ if ((reply = check_command(fsg, 6, DATA_DIR_TO_HOST,
+ (1<<4), 0,
+ "INQUIRY")) == 0)
+ reply = do_inquiry(fsg, bh);
+ break;
+
+ case SC_MODE_SELECT_6:
+ fsg->data_size_from_cmnd = fsg->cmnd[4];
+ if ((reply = check_command(fsg, 6, DATA_DIR_FROM_HOST,
+ (1<<1) | (1<<4), 0,
+ "MODE SELECT(6)")) == 0)
+ reply = do_mode_select(fsg, bh);
+ break;
+
+ case SC_MODE_SELECT_10:
+ fsg->data_size_from_cmnd = get_be16(&fsg->cmnd[7]);
+ if ((reply = check_command(fsg, 10, DATA_DIR_FROM_HOST,
+ (1<<1) | (3<<7), 0,
+ "MODE SELECT(10)")) == 0)
+ reply = do_mode_select(fsg, bh);
+ break;
+
+ case SC_MODE_SENSE_6:
+ fsg->data_size_from_cmnd = fsg->cmnd[4];
+ if ((reply = check_command(fsg, 6, DATA_DIR_TO_HOST,
+ (1<<1) | (1<<2) | (1<<4), 0,
+ "MODE SENSE(6)")) == 0)
+ reply = do_mode_sense(fsg, bh);
+ break;
+
+ case SC_MODE_SENSE_10:
+ fsg->data_size_from_cmnd = get_be16(&fsg->cmnd[7]);
+ if ((reply = check_command(fsg, 10, DATA_DIR_TO_HOST,
+ (1<<1) | (1<<2) | (3<<7), 0,
+ "MODE SENSE(10)")) == 0)
+ reply = do_mode_sense(fsg, bh);
+ break;
+
+ case SC_PREVENT_ALLOW_MEDIUM_REMOVAL:
+ fsg->data_size_from_cmnd = 0;
+ if ((reply = check_command(fsg, 6, DATA_DIR_NONE,
+ (1<<4), 0,
+ "PREVENT-ALLOW MEDIUM REMOVAL")) == 0)
+ reply = do_prevent_allow(fsg);
+ break;
+
+ case SC_READ_6:
+ i = fsg->cmnd[4];
+ fsg->data_size_from_cmnd = (i == 0 ? 256 : i) << 9;
+ if ((reply = check_command(fsg, 6, DATA_DIR_TO_HOST,
+ (7<<1) | (1<<4), 1,
+ "READ(6)")) == 0)
+ reply = do_read(fsg);
+ break;
+
+ case SC_READ_10:
+ fsg->data_size_from_cmnd = get_be16(&fsg->cmnd[7]) << 9;
+ if ((reply = check_command(fsg, 10, DATA_DIR_TO_HOST,
+ (1<<1) | (0xf<<2) | (3<<7), 1,
+ "READ(10)")) == 0)
+ reply = do_read(fsg);
+ break;
+
+ case SC_READ_12:
+ fsg->data_size_from_cmnd = get_be32(&fsg->cmnd[6]) << 9;
+ if ((reply = check_command(fsg, 12, DATA_DIR_TO_HOST,
+ (1<<1) | (0xf<<2) | (0xf<<6), 1,
+ "READ(12)")) == 0)
+ reply = do_read(fsg);
+ break;
+
+ case SC_READ_CAPACITY:
+ fsg->data_size_from_cmnd = 8;
+ if ((reply = check_command(fsg, 10, DATA_DIR_TO_HOST,
+ (0xf<<2) | (1<<8), 1,
+ "READ CAPACITY")) == 0)
+ reply = do_read_capacity(fsg, bh);
+ break;
+
+ case SC_READ_FORMAT_CAPACITIES:
+ fsg->data_size_from_cmnd = get_be16(&fsg->cmnd[7]);
+ if ((reply = check_command(fsg, 10, DATA_DIR_TO_HOST,
+ (3<<7), 1,
+ "READ FORMAT CAPACITIES")) == 0)
+ reply = do_read_format_capacities(fsg, bh);
+ break;
+
+ case SC_REQUEST_SENSE:
+ fsg->data_size_from_cmnd = fsg->cmnd[4];
+ if ((reply = check_command(fsg, 6, DATA_DIR_TO_HOST,
+ (1<<4), 0,
+ "REQUEST SENSE")) == 0)
+ reply = do_request_sense(fsg, bh);
+ break;
+
+ case SC_START_STOP_UNIT:
+ fsg->data_size_from_cmnd = 0;
+ if ((reply = check_command(fsg, 6, DATA_DIR_NONE,
+ (1<<1) | (1<<4), 0,
+ "START-STOP UNIT")) == 0)
+ reply = do_start_stop(fsg);
+ break;
+
+ case SC_SYNCHRONIZE_CACHE:
+ fsg->data_size_from_cmnd = 0;
+ if ((reply = check_command(fsg, 10, DATA_DIR_NONE,
+ (0xf<<2) | (3<<7), 1,
+ "SYNCHRONIZE CACHE")) == 0)
+ reply = do_synchronize_cache(fsg);
+ break;
+
+ case SC_TEST_UNIT_READY:
+ fsg->data_size_from_cmnd = 0;
+ reply = check_command(fsg, 6, DATA_DIR_NONE,
+ 0, 1,
+ "TEST UNIT READY");
+ break;
+
+ /* Although optional, this command is used by MS-Windows. We
+ * support a minimal version: BytChk must be 0. */
+ case SC_VERIFY:
+ fsg->data_size_from_cmnd = 0;
+ if ((reply = check_command(fsg, 10, DATA_DIR_NONE,
+ (1<<1) | (0xf<<2) | (3<<7), 1,
+ "VERIFY")) == 0)
+ reply = do_verify(fsg);
+ break;
+
+ case SC_WRITE_6:
+ i = fsg->cmnd[4];
+ fsg->data_size_from_cmnd = (i == 0 ? 256 : i) << 9;
+ if ((reply = check_command(fsg, 6, DATA_DIR_FROM_HOST,
+ (7<<1) | (1<<4), 1,
+ "WRITE(6)")) == 0)
+ reply = do_write(fsg);
+ break;
+
+ case SC_WRITE_10:
+ fsg->data_size_from_cmnd = get_be16(&fsg->cmnd[7]) << 9;
+ if ((reply = check_command(fsg, 10, DATA_DIR_FROM_HOST,
+ (1<<1) | (0xf<<2) | (3<<7), 1,
+ "WRITE(10)")) == 0)
+ reply = do_write(fsg);
+ break;
+
+ case SC_WRITE_12:
+ fsg->data_size_from_cmnd = get_be32(&fsg->cmnd[6]) << 9;
+ if ((reply = check_command(fsg, 12, DATA_DIR_FROM_HOST,
+ (1<<1) | (0xf<<2) | (0xf<<6), 1,
+ "WRITE(12)")) == 0)
+ reply = do_write(fsg);
+ break;
+
+ /* Some mandatory commands that we recognize but don't implement.
+ * They don't mean much in this setting. It's left as an exercise
+ * for anyone interested to implement RESERVE and RELEASE in terms
+ * of Posix locks. */
+ case SC_FORMAT_UNIT:
+ case SC_RELEASE:
+ case SC_RESERVE:
+ case SC_SEND_DIAGNOSTIC:
+ // Fall through
+
+ default:
+ fsg->data_size_from_cmnd = 0;
+ sprintf(unknown, "Unknown x%02x", fsg->cmnd[0]);
+ if ((reply = check_command(fsg, fsg->cmnd_size,
+ DATA_DIR_UNKNOWN, 0xff, 0, unknown)) == 0) {
+ fsg->curlun->sense_data = SS_INVALID_COMMAND;
+ reply = -EINVAL;
+ }
+ break;
+ }
+ up_read(&fsg->filesem);
+
+ if (reply == -EINTR || signal_pending(current))
+ return -EINTR;
+
+ /* Set up the single reply buffer for finish_reply() */
+ if (reply == -EINVAL)
+ reply = 0; // Error reply length
+ if (reply >= 0 && fsg->data_dir == DATA_DIR_TO_HOST) {
+ reply = min((u32) reply, fsg->data_size_from_cmnd);
+ bh->inreq->length = reply;
+ bh->state = BUF_STATE_FULL;
+ fsg->residue -= reply;
+ } // Otherwise it's already set
+
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static int received_cbw(struct fsg_dev *fsg, struct fsg_buffhd *bh)
+{
+ struct usb_request *req = bh->outreq;
+ struct bulk_cb_wrap *cbw = (struct bulk_cb_wrap *) req->buf;
+
+ /* Was this a real packet? */
+ if (req->status)
+ return -EINVAL;
+
+ /* Is the CBW valid? */
+ if (req->actual != USB_BULK_CB_WRAP_LEN ||
+ cbw->Signature != __constant_cpu_to_le32(
+ USB_BULK_CB_SIG)) {
+ DBG(fsg, "invalid CBW: len %u sig 0x%x\n",
+ req->actual,
+ le32_to_cpu(cbw->Signature));
+
+ /* The Bulk-only spec says we MUST stall the bulk pipes!
+ * If we want to avoid stalls, set a flag so that we will
+ * clear the endpoint halts at the next reset. */
+ if (!mod_data.can_stall)
+ set_bit(CLEAR_BULK_HALTS, &fsg->atomic_bitflags);
+ fsg_set_halt(fsg, fsg->bulk_out);
+ halt_bulk_in_endpoint(fsg);
+ return -EINVAL;
+ }
+
+ /* Is the CBW meaningful? */
+ if (cbw->Lun >= MAX_LUNS || cbw->Flags & ~USB_BULK_IN_FLAG ||
+ cbw->Length < 6 || cbw->Length > MAX_COMMAND_SIZE) {
+ DBG(fsg, "non-meaningful CBW: lun = %u, flags = 0x%x, "
+ "cmdlen %u\n",
+ cbw->Lun, cbw->Flags, cbw->Length);
+
+ /* We can do anything we want here, so let's stall the
+ * bulk pipes if we are allowed to. */
+ if (mod_data.can_stall) {
+ fsg_set_halt(fsg, fsg->bulk_out);
+ halt_bulk_in_endpoint(fsg);
+ }
+ return -EINVAL;
+ }
+
+ /* Save the command for later */
+ fsg->cmnd_size = cbw->Length;
+ memcpy(fsg->cmnd, cbw->CDB, fsg->cmnd_size);
+ if (cbw->Flags & USB_BULK_IN_FLAG)
+ fsg->data_dir = DATA_DIR_TO_HOST;
+ else
+ fsg->data_dir = DATA_DIR_FROM_HOST;
+ fsg->data_size = le32_to_cpu(cbw->DataTransferLength);
+ if (fsg->data_size == 0)
+ fsg->data_dir = DATA_DIR_NONE;
+ fsg->lun = cbw->Lun;
+ fsg->tag = cbw->Tag;
+ return 0;
+}
+
+
+static int get_next_command(struct fsg_dev *fsg)
+{
+ struct fsg_buffhd *bh;
+ int rc = 0;
+
+ if (transport_is_bbb()) {
+
+ /* Wait for the next buffer to become available */
+ bh = fsg->next_buffhd_to_fill;
+ while (bh->state != BUF_STATE_EMPTY) {
+ if ((rc = sleep_thread(fsg)) != 0)
+ return rc;
+ }
+
+ /* Queue a request to read a Bulk-only CBW */
+ set_bulk_out_req_length(fsg, bh, USB_BULK_CB_WRAP_LEN);
+ start_transfer(fsg, fsg->bulk_out, bh->outreq,
+ &bh->outreq_busy, &bh->state);
+
+ /* We will drain the buffer in software, which means we
+ * can reuse it for the next filling. No need to advance
+ * next_buffhd_to_fill. */
+
+ /* Wait for the CBW to arrive */
+ while (bh->state != BUF_STATE_FULL) {
+ if ((rc = sleep_thread(fsg)) != 0)
+ return rc;
+ }
+ rc = received_cbw(fsg, bh);
+ bh->state = BUF_STATE_EMPTY;
+
+ } else { // USB_PR_CB or USB_PR_CBI
+
+ /* Wait for the next command to arrive */
+ while (fsg->cbbuf_cmnd_size == 0) {
+ if ((rc = sleep_thread(fsg)) != 0)
+ return rc;
+ }
+
+ /* Is the previous status interrupt request still busy?
+ * The host is allowed to skip reading the status,
+ * so we must cancel it. */
+ if (fsg->intreq_busy)
+ usb_ep_dequeue(fsg->intr_in, fsg->intreq);
+
+ /* Copy the command and mark the buffer empty */
+ fsg->data_dir = DATA_DIR_UNKNOWN;
+ spin_lock_irq(&fsg->lock);
+ fsg->cmnd_size = fsg->cbbuf_cmnd_size;
+ memcpy(fsg->cmnd, fsg->cbbuf_cmnd, fsg->cmnd_size);
+ fsg->cbbuf_cmnd_size = 0;
+ spin_unlock_irq(&fsg->lock);
+ }
+ return rc;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static int enable_endpoint(struct fsg_dev *fsg, struct usb_ep *ep,
+ const struct usb_endpoint_descriptor *d)
+{
+ int rc;
+
+ ep->driver_data = fsg;
+ rc = usb_ep_enable(ep, d);
+ if (rc)
+ ERROR(fsg, "can't enable %s, result %d\n", ep->name, rc);
+ return rc;
+}
+
+static int alloc_request(struct fsg_dev *fsg, struct usb_ep *ep,
+ struct usb_request **preq)
+{
+ *preq = usb_ep_alloc_request(ep, GFP_ATOMIC);
+ if (*preq)
+ return 0;
+ ERROR(fsg, "can't allocate request for %s\n", ep->name);
+ return -ENOMEM;
+}
+
+/*
+ * Reset interface setting and re-init endpoint state (toggle etc).
+ * Call with altsetting < 0 to disable the interface. The only other
+ * available altsetting is 0, which enables the interface.
+ */
+static int do_set_interface(struct fsg_dev *fsg, int altsetting)
+{
+ int rc = 0;
+ int i;
+ const struct usb_endpoint_descriptor *d;
+
+ if (fsg->running)
+ DBG(fsg, "reset interface\n");
+
+reset:
+ /* Deallocate the requests */
+ for (i = 0; i < NUM_BUFFERS; ++i) {
+ struct fsg_buffhd *bh = &fsg->buffhds[i];
+
+ if (bh->inreq) {
+ usb_ep_free_request(fsg->bulk_in, bh->inreq);
+ bh->inreq = NULL;
+ }
+ if (bh->outreq) {
+ usb_ep_free_request(fsg->bulk_out, bh->outreq);
+ bh->outreq = NULL;
+ }
+ }
+ if (fsg->intreq) {
+ usb_ep_free_request(fsg->intr_in, fsg->intreq);
+ fsg->intreq = NULL;
+ }
+
+ /* Disable the endpoints */
+ if (fsg->bulk_in_enabled) {
+ usb_ep_disable(fsg->bulk_in);
+ fsg->bulk_in_enabled = 0;
+ }
+ if (fsg->bulk_out_enabled) {
+ usb_ep_disable(fsg->bulk_out);
+ fsg->bulk_out_enabled = 0;
+ }
+ if (fsg->intr_in_enabled) {
+ usb_ep_disable(fsg->intr_in);
+ fsg->intr_in_enabled = 0;
+ }
+
+ fsg->running = 0;
+ if (altsetting < 0 || rc != 0)
+ return rc;
+
+ DBG(fsg, "set interface %d\n", altsetting);
+
+ /* Enable the endpoints */
+ d = ep_desc(fsg->gadget, &fs_bulk_in_desc, &hs_bulk_in_desc);
+ if ((rc = enable_endpoint(fsg, fsg->bulk_in, d)) != 0)
+ goto reset;
+ fsg->bulk_in_enabled = 1;
+
+ d = ep_desc(fsg->gadget, &fs_bulk_out_desc, &hs_bulk_out_desc);
+ if ((rc = enable_endpoint(fsg, fsg->bulk_out, d)) != 0)
+ goto reset;
+ fsg->bulk_out_enabled = 1;
+ fsg->bulk_out_maxpacket = le16_to_cpu(d->wMaxPacketSize);
+
+ if (transport_is_cbi()) {
+ d = ep_desc(fsg->gadget, &fs_intr_in_desc, &hs_intr_in_desc);
+ if ((rc = enable_endpoint(fsg, fsg->intr_in, d)) != 0)
+ goto reset;
+ fsg->intr_in_enabled = 1;
+ }
+
+ /* Allocate the requests */
+ for (i = 0; i < NUM_BUFFERS; ++i) {
+ struct fsg_buffhd *bh = &fsg->buffhds[i];
+
+ if ((rc = alloc_request(fsg, fsg->bulk_in, &bh->inreq)) != 0)
+ goto reset;
+ if ((rc = alloc_request(fsg, fsg->bulk_out, &bh->outreq)) != 0)
+ goto reset;
+ bh->inreq->buf = bh->outreq->buf = bh->buf;
+ bh->inreq->dma = bh->outreq->dma = bh->dma;
+ bh->inreq->context = bh->outreq->context = bh;
+ bh->inreq->complete = bulk_in_complete;
+ bh->outreq->complete = bulk_out_complete;
+ }
+ if (transport_is_cbi()) {
+ if ((rc = alloc_request(fsg, fsg->intr_in, &fsg->intreq)) != 0)
+ goto reset;
+ fsg->intreq->complete = intr_in_complete;
+ }
+
+ fsg->running = 1;
+ for (i = 0; i < fsg->nluns; ++i)
+ fsg->luns[i].unit_attention_data = SS_RESET_OCCURRED;
+ return rc;
+}
+
+
+/*
+ * Change our operational configuration. This code must agree with the code
+ * that returns config descriptors, and with interface altsetting code.
+ *
+ * It's also responsible for power management interactions. Some
+ * configurations might not work with our current power sources.
+ * For now we just assume the gadget is always self-powered.
+ */
+static int do_set_config(struct fsg_dev *fsg, u8 new_config)
+{
+ int rc = 0;
+
+ /* Disable the single interface */
+ if (fsg->config != 0) {
+ DBG(fsg, "reset config\n");
+ fsg->config = 0;
+ rc = do_set_interface(fsg, -1);
+ }
+
+ /* Enable the interface */
+ if (new_config != 0) {
+ fsg->config = new_config;
+ if ((rc = do_set_interface(fsg, 0)) != 0)
+ fsg->config = 0; // Reset on errors
+ else {
+ char *speed;
+
+ switch (fsg->gadget->speed) {
+ case USB_SPEED_LOW: speed = "low"; break;
+ case USB_SPEED_FULL: speed = "full"; break;
+ case USB_SPEED_HIGH: speed = "high"; break;
+ default: speed = "?"; break;
+ }
+ INFO(fsg, "%s speed config #%d\n", speed, fsg->config);
+ }
+ }
+ return rc;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static void handle_exception(struct fsg_dev *fsg)
+{
+ siginfo_t info;
+ int sig;
+ int i;
+ int num_active;
+ struct fsg_buffhd *bh;
+ enum fsg_state old_state;
+ u8 new_config;
+ struct lun *curlun;
+ unsigned int exception_req_tag;
+ int rc;
+
+ /* Clear the existing signals. Anything but SIGUSR1 is converted
+ * into a high-priority EXIT exception. */
+ for (;;) {
+ sig = dequeue_signal_lock(current, &fsg->thread_signal_mask,
+ &info);
+ if (!sig)
+ break;
+ if (sig != SIGUSR1) {
+ if (fsg->state < FSG_STATE_EXIT)
+ DBG(fsg, "Main thread exiting on signal\n");
+ raise_exception(fsg, FSG_STATE_EXIT);
+ }
+ }
+
+ /* Cancel all the pending transfers */
+ if (fsg->intreq_busy)
+ usb_ep_dequeue(fsg->intr_in, fsg->intreq);
+ for (i = 0; i < NUM_BUFFERS; ++i) {
+ bh = &fsg->buffhds[i];
+ if (bh->inreq_busy)
+ usb_ep_dequeue(fsg->bulk_in, bh->inreq);
+ if (bh->outreq_busy)
+ usb_ep_dequeue(fsg->bulk_out, bh->outreq);
+ }
+
+ /* Wait until everything is idle */
+ for (;;) {
+ num_active = fsg->intreq_busy;
+ for (i = 0; i < NUM_BUFFERS; ++i) {
+ bh = &fsg->buffhds[i];
+ num_active += bh->inreq_busy + bh->outreq_busy;
+ }
+ if (num_active == 0)
+ break;
+ if (sleep_thread(fsg))
+ return;
+ }
+
+ /* Clear out the controller's fifos */
+ if (fsg->bulk_in_enabled)
+ usb_ep_fifo_flush(fsg->bulk_in);
+ if (fsg->bulk_out_enabled)
+ usb_ep_fifo_flush(fsg->bulk_out);
+ if (fsg->intr_in_enabled)
+ usb_ep_fifo_flush(fsg->intr_in);
+
+ /* Reset the I/O buffer states and pointers, the SCSI
+ * state, and the exception. Then invoke the handler. */
+ spin_lock_irq(&fsg->lock);
+
+ for (i = 0; i < NUM_BUFFERS; ++i) {
+ bh = &fsg->buffhds[i];
+ bh->state = BUF_STATE_EMPTY;
+ }
+ fsg->next_buffhd_to_fill = fsg->next_buffhd_to_drain =
+ &fsg->buffhds[0];
+
+ exception_req_tag = fsg->exception_req_tag;
+ new_config = fsg->new_config;
+ old_state = fsg->state;
+
+ if (old_state == FSG_STATE_ABORT_BULK_OUT)
+ fsg->state = FSG_STATE_STATUS_PHASE;
+ else {
+ for (i = 0; i < fsg->nluns; ++i) {
+ curlun = &fsg->luns[i];
+ curlun->prevent_medium_removal = 0;
+ curlun->sense_data = curlun->unit_attention_data =
+ SS_NO_SENSE;
+ curlun->sense_data_info = 0;
+ }
+ fsg->state = FSG_STATE_IDLE;
+ }
+ spin_unlock_irq(&fsg->lock);
+
+ /* Carry out any extra actions required for the exception */
+ switch (old_state) {
+ default:
+ break;
+
+ case FSG_STATE_ABORT_BULK_OUT:
+ send_status(fsg);
+ spin_lock_irq(&fsg->lock);
+ if (fsg->state == FSG_STATE_STATUS_PHASE)
+ fsg->state = FSG_STATE_IDLE;
+ spin_unlock_irq(&fsg->lock);
+ break;
+
+ case FSG_STATE_RESET:
+ /* In case we were forced against our will to halt a
+ * bulk endpoint, clear the halt now. (The SuperH UDC
+ * requires this.) */
+ if (test_and_clear_bit(CLEAR_BULK_HALTS,
+ &fsg->atomic_bitflags)) {
+ usb_ep_clear_halt(fsg->bulk_in);
+ usb_ep_clear_halt(fsg->bulk_out);
+ }
+
+ if (transport_is_bbb()) {
+ if (fsg->ep0_req_tag == exception_req_tag)
+ ep0_queue(fsg); // Complete the status stage
+
+ } else if (transport_is_cbi())
+ send_status(fsg); // Status by interrupt pipe
+
+ /* Technically this should go here, but it would only be
+ * a waste of time. Ditto for the INTERFACE_CHANGE and
+ * CONFIG_CHANGE cases. */
+ // for (i = 0; i < fsg->nluns; ++i)
+ // fsg->luns[i].unit_attention_data = SS_RESET_OCCURRED;
+ break;
+
+ case FSG_STATE_INTERFACE_CHANGE:
+ rc = do_set_interface(fsg, 0);
+ if (fsg->ep0_req_tag != exception_req_tag)
+ break;
+ if (rc != 0) // STALL on errors
+ fsg_set_halt(fsg, fsg->ep0);
+ else // Complete the status stage
+ ep0_queue(fsg);
+ break;
+
+ case FSG_STATE_CONFIG_CHANGE:
+ rc = do_set_config(fsg, new_config);
+ if (fsg->ep0_req_tag != exception_req_tag)
+ break;
+ if (rc != 0) // STALL on errors
+ fsg_set_halt(fsg, fsg->ep0);
+ else // Complete the status stage
+ ep0_queue(fsg);
+ break;
+
+ case FSG_STATE_DISCONNECT:
+ fsync_all(fsg);
+ do_set_config(fsg, 0); // Unconfigured state
+ break;
+
+ case FSG_STATE_EXIT:
+ case FSG_STATE_TERMINATED:
+ do_set_config(fsg, 0); // Free resources
+ spin_lock_irq(&fsg->lock);
+ fsg->state = FSG_STATE_TERMINATED; // Stop the thread
+ spin_unlock_irq(&fsg->lock);
+ break;
+ }
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static int fsg_main_thread(void *fsg_)
+{
+ struct fsg_dev *fsg = (struct fsg_dev *) fsg_;
+
+ fsg->thread_task = current;
+
+ /* Release all our userspace resources */
+ daemonize("file-storage-gadget");
+
+ /* Allow the thread to be killed by a signal, but set the signal mask
+ * to block everything but INT, TERM, KILL, and USR1. */
+ siginitsetinv(&fsg->thread_signal_mask, sigmask(SIGINT) |
+ sigmask(SIGTERM) | sigmask(SIGKILL) |
+ sigmask(SIGUSR1));
+ sigprocmask(SIG_SETMASK, &fsg->thread_signal_mask, NULL);
+
+ /* Arrange for userspace references to be interpreted as kernel
+ * pointers. That way we can pass a kernel pointer to a routine
+ * that expects a __user pointer and it will work okay. */
+ set_fs(get_ds());
+
+ /* Wait for the gadget registration to finish up */
+ wait_for_completion(&fsg->thread_notifier);
+
+ /* The main loop */
+ while (fsg->state != FSG_STATE_TERMINATED) {
+ if (exception_in_progress(fsg) || signal_pending(current)) {
+ handle_exception(fsg);
+ continue;
+ }
+
+ if (!fsg->running) {
+ sleep_thread(fsg);
+ continue;
+ }
+
+ if (get_next_command(fsg))
+ continue;
+
+ spin_lock_irq(&fsg->lock);
+ if (!exception_in_progress(fsg))
+ fsg->state = FSG_STATE_DATA_PHASE;
+ spin_unlock_irq(&fsg->lock);
+
+ if (do_scsi_command(fsg) || finish_reply(fsg))
+ continue;
+
+ spin_lock_irq(&fsg->lock);
+ if (!exception_in_progress(fsg))
+ fsg->state = FSG_STATE_STATUS_PHASE;
+ spin_unlock_irq(&fsg->lock);
+
+ if (send_status(fsg))
+ continue;
+
+ spin_lock_irq(&fsg->lock);
+ if (!exception_in_progress(fsg))
+ fsg->state = FSG_STATE_IDLE;
+ spin_unlock_irq(&fsg->lock);
+ }
+
+ fsg->thread_task = NULL;
+ flush_signals(current);
+
+ /* In case we are exiting because of a signal, unregister the
+ * gadget driver and close the backing file. */
+ if (test_and_clear_bit(REGISTERED, &fsg->atomic_bitflags)) {
+ usb_gadget_unregister_driver(&fsg_driver);
+ close_all_backing_files(fsg);
+ }
+
+ /* Let the unbind and cleanup routines know the thread has exited */
+ complete_and_exit(&fsg->thread_notifier, 0);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* If the next two routines are called while the gadget is registered,
+ * the caller must own fsg->filesem for writing. */
+
+static int open_backing_file(struct lun *curlun, const char *filename)
+{
+ int ro;
+ struct file *filp = NULL;
+ int rc = -EINVAL;
+ struct inode *inode = NULL;
+ loff_t size;
+ loff_t num_sectors;
+
+ /* R/W if we can, R/O if we must */
+ ro = curlun->ro;
+ if (!ro) {
+ filp = filp_open(filename, O_RDWR | O_LARGEFILE, 0);
+ if (-EROFS == PTR_ERR(filp))
+ ro = 1;
+ }
+ if (ro)
+ filp = filp_open(filename, O_RDONLY | O_LARGEFILE, 0);
+ if (IS_ERR(filp)) {
+ LINFO(curlun, "unable to open backing file: %s\n", filename);
+ return PTR_ERR(filp);
+ }
+
+ if (!(filp->f_mode & FMODE_WRITE))
+ ro = 1;
+
+ if (filp->f_dentry)
+ inode = filp->f_dentry->d_inode;
+ if (inode && S_ISBLK(inode->i_mode)) {
+ if (bdev_read_only(inode->i_bdev))
+ ro = 1;
+ } else if (!inode || !S_ISREG(inode->i_mode)) {
+ LINFO(curlun, "invalid file type: %s\n", filename);
+ goto out;
+ }
+
+ /* If we can't read the file, it's no good.
+ * If we can't write the file, use it read-only. */
+ if (!filp->f_op || !(filp->f_op->read || filp->f_op->aio_read)) {
+ LINFO(curlun, "file not readable: %s\n", filename);
+ goto out;
+ }
+ if (!(filp->f_op->write || filp->f_op->aio_write))
+ ro = 1;
+
+ size = i_size_read(inode->i_mapping->host);
+ if (size < 0) {
+ LINFO(curlun, "unable to find file size: %s\n", filename);
+ rc = (int) size;
+ goto out;
+ }
+ num_sectors = size >> 9; // File size in 512-byte sectors
+ if (num_sectors == 0) {
+ LINFO(curlun, "file too small: %s\n", filename);
+ rc = -ETOOSMALL;
+ goto out;
+ }
+
+ get_file(filp);
+ curlun->ro = ro;
+ curlun->filp = filp;
+ curlun->file_length = size;
+ curlun->num_sectors = num_sectors;
+ LDBG(curlun, "open backing file: %s\n", filename);
+ rc = 0;
+
+out:
+ filp_close(filp, current->files);
+ return rc;
+}
+
+
+static void close_backing_file(struct lun *curlun)
+{
+ if (curlun->filp) {
+ LDBG(curlun, "close backing file\n");
+ fput(curlun->filp);
+ curlun->filp = NULL;
+ }
+}
+
+static void close_all_backing_files(struct fsg_dev *fsg)
+{
+ int i;
+
+ for (i = 0; i < fsg->nluns; ++i)
+ close_backing_file(&fsg->luns[i]);
+}
+
+
+static ssize_t show_ro(struct device *dev, char *buf)
+{
+ struct lun *curlun = dev_to_lun(dev);
+
+ return sprintf(buf, "%d\n", curlun->ro);
+}
+
+static ssize_t show_file(struct device *dev, char *buf)
+{
+ struct lun *curlun = dev_to_lun(dev);
+ struct fsg_dev *fsg = (struct fsg_dev *) dev_get_drvdata(dev);
+ char *p;
+ ssize_t rc;
+
+ down_read(&fsg->filesem);
+ if (backing_file_is_open(curlun)) { // Get the complete pathname
+ p = d_path(curlun->filp->f_dentry, curlun->filp->f_vfsmnt,
+ buf, PAGE_SIZE - 1);
+ if (IS_ERR(p))
+ rc = PTR_ERR(p);
+ else {
+ rc = strlen(p);
+ memmove(buf, p, rc);
+ buf[rc] = '\n'; // Add a newline
+ buf[++rc] = 0;
+ }
+ } else { // No file, return 0 bytes
+ *buf = 0;
+ rc = 0;
+ }
+ up_read(&fsg->filesem);
+ return rc;
+}
+
+
+static ssize_t store_ro(struct device *dev, const char *buf, size_t count)
+{
+ ssize_t rc = count;
+ struct lun *curlun = dev_to_lun(dev);
+ struct fsg_dev *fsg = (struct fsg_dev *) dev_get_drvdata(dev);
+ int i;
+
+ if (sscanf(buf, "%d", &i) != 1)
+ return -EINVAL;
+
+ /* Allow the write-enable status to change only while the backing file
+ * is closed. */
+ down_read(&fsg->filesem);
+ if (backing_file_is_open(curlun)) {
+ LDBG(curlun, "read-only status change prevented\n");
+ rc = -EBUSY;
+ } else {
+ curlun->ro = !!i;
+ LDBG(curlun, "read-only status set to %d\n", curlun->ro);
+ }
+ up_read(&fsg->filesem);
+ return rc;
+}
+
+static ssize_t store_file(struct device *dev, const char *buf, size_t count)
+{
+ struct lun *curlun = dev_to_lun(dev);
+ struct fsg_dev *fsg = (struct fsg_dev *) dev_get_drvdata(dev);
+ int rc = 0;
+
+ if (curlun->prevent_medium_removal && backing_file_is_open(curlun)) {
+ LDBG(curlun, "eject attempt prevented\n");
+ return -EBUSY; // "Door is locked"
+ }
+
+ /* Remove a trailing newline */
+ if (count > 0 && buf[count-1] == '\n')
+ ((char *) buf)[count-1] = 0; // Ugh!
+
+ /* Eject current medium */
+ down_write(&fsg->filesem);
+ if (backing_file_is_open(curlun)) {
+ close_backing_file(curlun);
+ curlun->unit_attention_data = SS_MEDIUM_NOT_PRESENT;
+ }
+
+ /* Load new medium */
+ if (count > 0 && buf[0]) {
+ rc = open_backing_file(curlun, buf);
+ if (rc == 0)
+ curlun->unit_attention_data =
+ SS_NOT_READY_TO_READY_TRANSITION;
+ }
+ up_write(&fsg->filesem);
+ return (rc < 0 ? rc : count);
+}
+
+
+/* The write permissions and store_xxx pointers are set in fsg_bind() */
+static DEVICE_ATTR(ro, 0444, show_ro, NULL);
+static DEVICE_ATTR(file, 0444, show_file, NULL);
+
+
+/*-------------------------------------------------------------------------*/
+
+static void lun_release(struct device *dev)
+{
+ struct fsg_dev *fsg = (struct fsg_dev *) dev_get_drvdata(dev);
+
+ complete(&fsg->lun_released);
+}
+
+static void fsg_unbind(struct usb_gadget *gadget)
+{
+ struct fsg_dev *fsg = get_gadget_data(gadget);
+ int i;
+ struct lun *curlun;
+ struct usb_request *req = fsg->ep0req;
+
+ DBG(fsg, "unbind\n");
+ clear_bit(REGISTERED, &fsg->atomic_bitflags);
+
+ /* Unregister the sysfs attribute files and the LUNs */
+ init_completion(&fsg->lun_released);
+ for (i = 0; i < fsg->nluns; ++i) {
+ curlun = &fsg->luns[i];
+ if (curlun->registered) {
+ device_remove_file(&curlun->dev, &dev_attr_ro);
+ device_remove_file(&curlun->dev, &dev_attr_file);
+ device_unregister(&curlun->dev);
+ wait_for_completion(&fsg->lun_released);
+ curlun->registered = 0;
+ }
+ }
+
+ /* If the thread isn't already dead, tell it to exit now */
+ if (fsg->state != FSG_STATE_TERMINATED) {
+ raise_exception(fsg, FSG_STATE_EXIT);
+ wait_for_completion(&fsg->thread_notifier);
+
+ /* The cleanup routine waits for this completion also */
+ complete(&fsg->thread_notifier);
+ }
+
+ /* Free the data buffers */
+ for (i = 0; i < NUM_BUFFERS; ++i) {
+ struct fsg_buffhd *bh = &fsg->buffhds[i];
+
+ if (bh->buf)
+ usb_ep_free_buffer(fsg->bulk_in, bh->buf, bh->dma,
+ mod_data.buflen);
+ }
+
+ /* Free the request and buffer for endpoint 0 */
+ if (req) {
+ if (req->buf)
+ usb_ep_free_buffer(fsg->ep0, req->buf,
+ req->dma, EP0_BUFSIZE);
+ usb_ep_free_request(fsg->ep0, req);
+ }
+
+ set_gadget_data(gadget, NULL);
+}
+
+
+static int __init check_parameters(struct fsg_dev *fsg)
+{
+ int prot;
+
+ /* Store the default values */
+ mod_data.transport_type = USB_PR_BULK;
+ mod_data.transport_name = "Bulk-only";
+ mod_data.protocol_type = USB_SC_SCSI;
+ mod_data.protocol_name = "Transparent SCSI";
+
+ if (gadget_is_sh(fsg->gadget))
+ mod_data.can_stall = 0;
+
+ if (mod_data.release == 0xffff) { // Parameter wasn't set
+ if (gadget_is_net2280(fsg->gadget))
+ mod_data.release = 0x0301;
+ else if (gadget_is_dummy(fsg->gadget))
+ mod_data.release = 0x0302;
+ else if (gadget_is_pxa(fsg->gadget))
+ mod_data.release = 0x0303;
+ else if (gadget_is_sh(fsg->gadget))
+ mod_data.release = 0x0304;
+
+ /* The sa1100 controller is not supported */
+
+ else if (gadget_is_goku(fsg->gadget))
+ mod_data.release = 0x0306;
+ else if (gadget_is_mq11xx(fsg->gadget))
+ mod_data.release = 0x0307;
+ else if (gadget_is_omap(fsg->gadget))
+ mod_data.release = 0x0308;
+ else if (gadget_is_lh7a40x(fsg->gadget))
+ mod_data.release = 0x0309;
+ else if (gadget_is_n9604(fsg->gadget))
+ mod_data.release = 0x0310;
+ else if (gadget_is_pxa27x(fsg->gadget))
+ mod_data.release = 0x0311;
+ else if (gadget_is_s3c2410(gadget))
+ mod_data.release = 0x0312;
+ else if (gadget_is_at91(fsg->gadget))
+ mod_data.release = 0x0313;
+ else {
+ WARN(fsg, "controller '%s' not recognized\n",
+ fsg->gadget->name);
+ mod_data.release = 0x0399;
+ }
+ }
+
+ prot = simple_strtol(mod_data.protocol_parm, NULL, 0);
+
+#ifdef CONFIG_USB_FILE_STORAGE_TEST
+ if (strnicmp(mod_data.transport_parm, "BBB", 10) == 0) {
+ ; // Use default setting
+ } else if (strnicmp(mod_data.transport_parm, "CB", 10) == 0) {
+ mod_data.transport_type = USB_PR_CB;
+ mod_data.transport_name = "Control-Bulk";
+ } else if (strnicmp(mod_data.transport_parm, "CBI", 10) == 0) {
+ mod_data.transport_type = USB_PR_CBI;
+ mod_data.transport_name = "Control-Bulk-Interrupt";
+ } else {
+ ERROR(fsg, "invalid transport: %s\n", mod_data.transport_parm);
+ return -EINVAL;
+ }
+
+ if (strnicmp(mod_data.protocol_parm, "SCSI", 10) == 0 ||
+ prot == USB_SC_SCSI) {
+ ; // Use default setting
+ } else if (strnicmp(mod_data.protocol_parm, "RBC", 10) == 0 ||
+ prot == USB_SC_RBC) {
+ mod_data.protocol_type = USB_SC_RBC;
+ mod_data.protocol_name = "RBC";
+ } else if (strnicmp(mod_data.protocol_parm, "8020", 4) == 0 ||
+ strnicmp(mod_data.protocol_parm, "ATAPI", 10) == 0 ||
+ prot == USB_SC_8020) {
+ mod_data.protocol_type = USB_SC_8020;
+ mod_data.protocol_name = "8020i (ATAPI)";
+ } else if (strnicmp(mod_data.protocol_parm, "QIC", 3) == 0 ||
+ prot == USB_SC_QIC) {
+ mod_data.protocol_type = USB_SC_QIC;
+ mod_data.protocol_name = "QIC-157";
+ } else if (strnicmp(mod_data.protocol_parm, "UFI", 10) == 0 ||
+ prot == USB_SC_UFI) {
+ mod_data.protocol_type = USB_SC_UFI;
+ mod_data.protocol_name = "UFI";
+ } else if (strnicmp(mod_data.protocol_parm, "8070", 4) == 0 ||
+ prot == USB_SC_8070) {
+ mod_data.protocol_type = USB_SC_8070;
+ mod_data.protocol_name = "8070i";
+ } else {
+ ERROR(fsg, "invalid protocol: %s\n", mod_data.protocol_parm);
+ return -EINVAL;
+ }
+
+ mod_data.buflen &= PAGE_CACHE_MASK;
+ if (mod_data.buflen <= 0) {
+ ERROR(fsg, "invalid buflen\n");
+ return -ETOOSMALL;
+ }
+#endif /* CONFIG_USB_FILE_STORAGE_TEST */
+
+ return 0;
+}
+
+
+static int __init fsg_bind(struct usb_gadget *gadget)
+{
+ struct fsg_dev *fsg = the_fsg;
+ int rc;
+ int i;
+ struct lun *curlun;
+ struct usb_ep *ep;
+ struct usb_request *req;
+ char *pathbuf, *p;
+
+ fsg->gadget = gadget;
+ set_gadget_data(gadget, fsg);
+ fsg->ep0 = gadget->ep0;
+ fsg->ep0->driver_data = fsg;
+
+ if ((rc = check_parameters(fsg)) != 0)
+ goto out;
+
+ if (mod_data.removable) { // Enable the store_xxx attributes
+ dev_attr_ro.attr.mode = dev_attr_file.attr.mode = 0644;
+ dev_attr_ro.store = store_ro;
+ dev_attr_file.store = store_file;
+ }
+
+ /* Find out how many LUNs there should be */
+ i = mod_data.nluns;
+ if (i == 0)
+ i = max(mod_data.num_filenames, 1);
+ if (i > MAX_LUNS) {
+ ERROR(fsg, "invalid number of LUNs: %d\n", i);
+ rc = -EINVAL;
+ goto out;
+ }
+
+ /* Create the LUNs, open their backing files, and register the
+ * LUN devices in sysfs. */
+ fsg->luns = kmalloc(i * sizeof(struct lun), GFP_KERNEL);
+ if (!fsg->luns) {
+ rc = -ENOMEM;
+ goto out;
+ }
+ memset(fsg->luns, 0, i * sizeof(struct lun));
+ fsg->nluns = i;
+
+ for (i = 0; i < fsg->nluns; ++i) {
+ curlun = &fsg->luns[i];
+ curlun->ro = ro[i];
+ curlun->dev.parent = &gadget->dev;
+ curlun->dev.driver = &fsg_driver.driver;
+ dev_set_drvdata(&curlun->dev, fsg);
+ snprintf(curlun->dev.bus_id, BUS_ID_SIZE,
+ "%s-lun%d", gadget->dev.bus_id, i);
+
+ if ((rc = device_register(&curlun->dev)) != 0)
+ INFO(fsg, "failed to register LUN%d: %d\n", i, rc);
+ else {
+ curlun->registered = 1;
+ curlun->dev.release = lun_release;
+ device_create_file(&curlun->dev, &dev_attr_ro);
+ device_create_file(&curlun->dev, &dev_attr_file);
+ }
+
+ if (file[i] && *file[i]) {
+ if ((rc = open_backing_file(curlun, file[i])) != 0)
+ goto out;
+ } else if (!mod_data.removable) {
+ ERROR(fsg, "no file given for LUN%d\n", i);
+ rc = -EINVAL;
+ goto out;
+ }
+ }
+
+ /* Find all the endpoints we will use */
+ usb_ep_autoconfig_reset(gadget);
+ ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc);
+ if (!ep)
+ goto autoconf_fail;
+ ep->driver_data = fsg; // claim the endpoint
+ fsg->bulk_in = ep;
+
+ ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc);
+ if (!ep)
+ goto autoconf_fail;
+ ep->driver_data = fsg; // claim the endpoint
+ fsg->bulk_out = ep;
+
+ if (transport_is_cbi()) {
+ ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc);
+ if (!ep)
+ goto autoconf_fail;
+ ep->driver_data = fsg; // claim the endpoint
+ fsg->intr_in = ep;
+ }
+
+ /* Fix up the descriptors */
+ device_desc.bMaxPacketSize0 = fsg->ep0->maxpacket;
+ device_desc.idVendor = cpu_to_le16(mod_data.vendor);
+ device_desc.idProduct = cpu_to_le16(mod_data.product);
+ device_desc.bcdDevice = cpu_to_le16(mod_data.release);
+
+ i = (transport_is_cbi() ? 3 : 2); // Number of endpoints
+ intf_desc.bNumEndpoints = i;
+ intf_desc.bInterfaceSubClass = mod_data.protocol_type;
+ intf_desc.bInterfaceProtocol = mod_data.transport_type;
+ fs_function[i + FS_FUNCTION_PRE_EP_ENTRIES] = NULL;
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ hs_function[i + HS_FUNCTION_PRE_EP_ENTRIES] = NULL;
+
+ /* Assume ep0 uses the same maxpacket value for both speeds */
+ dev_qualifier.bMaxPacketSize0 = fsg->ep0->maxpacket;
+
+ /* Assume that all endpoint addresses are the same for both speeds */
+ hs_bulk_in_desc.bEndpointAddress = fs_bulk_in_desc.bEndpointAddress;
+ hs_bulk_out_desc.bEndpointAddress = fs_bulk_out_desc.bEndpointAddress;
+ hs_intr_in_desc.bEndpointAddress = fs_intr_in_desc.bEndpointAddress;
+#endif
+
+ if (gadget->is_otg) {
+ otg_desc.bmAttributes |= USB_OTG_HNP,
+ config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ }
+
+ rc = -ENOMEM;
+
+ /* Allocate the request and buffer for endpoint 0 */
+ fsg->ep0req = req = usb_ep_alloc_request(fsg->ep0, GFP_KERNEL);
+ if (!req)
+ goto out;
+ req->buf = usb_ep_alloc_buffer(fsg->ep0, EP0_BUFSIZE,
+ &req->dma, GFP_KERNEL);
+ if (!req->buf)
+ goto out;
+ req->complete = ep0_complete;
+
+ /* Allocate the data buffers */
+ for (i = 0; i < NUM_BUFFERS; ++i) {
+ struct fsg_buffhd *bh = &fsg->buffhds[i];
+
+ bh->buf = usb_ep_alloc_buffer(fsg->bulk_in, mod_data.buflen,
+ &bh->dma, GFP_KERNEL);
+ if (!bh->buf)
+ goto out;
+ bh->next = bh + 1;
+ }
+ fsg->buffhds[NUM_BUFFERS - 1].next = &fsg->buffhds[0];
+
+ /* This should reflect the actual gadget power source */
+ usb_gadget_set_selfpowered(gadget);
+
+ snprintf(manufacturer, sizeof manufacturer, "%s %s with %s",
+ system_utsname.sysname, system_utsname.release,
+ gadget->name);
+
+ /* On a real device, serial[] would be loaded from permanent
+ * storage. We just encode it from the driver version string. */
+ for (i = 0; i < sizeof(serial) - 2; i += 2) {
+ unsigned char c = DRIVER_VERSION[i / 2];
+
+ if (!c)
+ break;
+ sprintf(&serial[i], "%02X", c);
+ }
+
+ if ((rc = kernel_thread(fsg_main_thread, fsg, (CLONE_VM | CLONE_FS |
+ CLONE_FILES))) < 0)
+ goto out;
+ fsg->thread_pid = rc;
+
+ INFO(fsg, DRIVER_DESC ", version: " DRIVER_VERSION "\n");
+ INFO(fsg, "Number of LUNs=%d\n", fsg->nluns);
+
+ pathbuf = kmalloc(PATH_MAX, GFP_KERNEL);
+ for (i = 0; i < fsg->nluns; ++i) {
+ curlun = &fsg->luns[i];
+ if (backing_file_is_open(curlun)) {
+ p = NULL;
+ if (pathbuf) {
+ p = d_path(curlun->filp->f_dentry,
+ curlun->filp->f_vfsmnt,
+ pathbuf, PATH_MAX);
+ if (IS_ERR(p))
+ p = NULL;
+ }
+ LINFO(curlun, "ro=%d, file: %s\n",
+ curlun->ro, (p ? p : "(error)"));
+ }
+ }
+ kfree(pathbuf);
+
+ DBG(fsg, "transport=%s (x%02x)\n",
+ mod_data.transport_name, mod_data.transport_type);
+ DBG(fsg, "protocol=%s (x%02x)\n",
+ mod_data.protocol_name, mod_data.protocol_type);
+ DBG(fsg, "VendorID=x%04x, ProductID=x%04x, Release=x%04x\n",
+ mod_data.vendor, mod_data.product, mod_data.release);
+ DBG(fsg, "removable=%d, stall=%d, buflen=%u\n",
+ mod_data.removable, mod_data.can_stall,
+ mod_data.buflen);
+ DBG(fsg, "I/O thread pid: %d\n", fsg->thread_pid);
+ return 0;
+
+autoconf_fail:
+ ERROR(fsg, "unable to autoconfigure all endpoints\n");
+ rc = -ENOTSUPP;
+
+out:
+ fsg->state = FSG_STATE_TERMINATED; // The thread is dead
+ fsg_unbind(gadget);
+ close_all_backing_files(fsg);
+ return rc;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static void fsg_suspend(struct usb_gadget *gadget)
+{
+ struct fsg_dev *fsg = get_gadget_data(gadget);
+
+ DBG(fsg, "suspend\n");
+ set_bit(SUSPENDED, &fsg->atomic_bitflags);
+}
+
+static void fsg_resume(struct usb_gadget *gadget)
+{
+ struct fsg_dev *fsg = get_gadget_data(gadget);
+
+ DBG(fsg, "resume\n");
+ clear_bit(SUSPENDED, &fsg->atomic_bitflags);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static struct usb_gadget_driver fsg_driver = {
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ .speed = USB_SPEED_HIGH,
+#else
+ .speed = USB_SPEED_FULL,
+#endif
+ .function = (char *) longname,
+ .bind = fsg_bind,
+ .unbind = fsg_unbind,
+ .disconnect = fsg_disconnect,
+ .setup = fsg_setup,
+ .suspend = fsg_suspend,
+ .resume = fsg_resume,
+
+ .driver = {
+ .name = (char *) shortname,
+ // .release = ...
+ // .suspend = ...
+ // .resume = ...
+ },
+};
+
+
+static int __init fsg_alloc(void)
+{
+ struct fsg_dev *fsg;
+
+ fsg = kmalloc(sizeof *fsg, GFP_KERNEL);
+ if (!fsg)
+ return -ENOMEM;
+ memset(fsg, 0, sizeof *fsg);
+ spin_lock_init(&fsg->lock);
+ init_rwsem(&fsg->filesem);
+ init_waitqueue_head(&fsg->thread_wqh);
+ init_completion(&fsg->thread_notifier);
+
+ the_fsg = fsg;
+ return 0;
+}
+
+
+static void fsg_free(struct fsg_dev *fsg)
+{
+ kfree(fsg->luns);
+ kfree(fsg);
+}
+
+
+static int __init fsg_init(void)
+{
+ int rc;
+ struct fsg_dev *fsg;
+
+ if ((rc = fsg_alloc()) != 0)
+ return rc;
+ fsg = the_fsg;
+ if ((rc = usb_gadget_register_driver(&fsg_driver)) != 0) {
+ fsg_free(fsg);
+ return rc;
+ }
+ set_bit(REGISTERED, &fsg->atomic_bitflags);
+
+ /* Tell the thread to start working */
+ complete(&fsg->thread_notifier);
+ return 0;
+}
+module_init(fsg_init);
+
+
+static void __exit fsg_cleanup(void)
+{
+ struct fsg_dev *fsg = the_fsg;
+
+ /* Unregister the driver iff the thread hasn't already done so */
+ if (test_and_clear_bit(REGISTERED, &fsg->atomic_bitflags))
+ usb_gadget_unregister_driver(&fsg_driver);
+
+ /* Wait for the thread to finish up */
+ wait_for_completion(&fsg->thread_notifier);
+
+ close_all_backing_files(fsg);
+ fsg_free(fsg);
+}
+module_exit(fsg_cleanup);
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
new file mode 100644
index 000000000000..ea2eb52c766d
--- /dev/null
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -0,0 +1,92 @@
+/*
+ * USB device controllers have lots of quirks. Use these macros in
+ * gadget drivers or other code that needs to deal with them, and which
+ * autoconfigures instead of using early binding to the hardware.
+ *
+ * This could eventually work like the ARM mach_is_*() stuff, driven by
+ * some config file that gets updated as new hardware is supported.
+ *
+ * NOTE: some of these controller drivers may not be available yet.
+ */
+#ifdef CONFIG_USB_GADGET_NET2280
+#define gadget_is_net2280(g) !strcmp("net2280", (g)->name)
+#else
+#define gadget_is_net2280(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_DUMMY_HCD
+#define gadget_is_dummy(g) !strcmp("dummy_udc", (g)->name)
+#else
+#define gadget_is_dummy(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_PXA2XX
+#define gadget_is_pxa(g) !strcmp("pxa2xx_udc", (g)->name)
+#else
+#define gadget_is_pxa(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_GOKU
+#define gadget_is_goku(g) !strcmp("goku_udc", (g)->name)
+#else
+#define gadget_is_goku(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_SUPERH
+#define gadget_is_sh(g) !strcmp("sh_udc", (g)->name)
+#else
+#define gadget_is_sh(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_SA1100
+#define gadget_is_sa1100(g) !strcmp("sa1100_udc", (g)->name)
+#else
+#define gadget_is_sa1100(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_LH7A40X
+#define gadget_is_lh7a40x(g) !strcmp("lh7a40x_udc", (g)->name)
+#else
+#define gadget_is_lh7a40x(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_MQ11XX
+#define gadget_is_mq11xx(g) !strcmp("mq11xx_udc", (g)->name)
+#else
+#define gadget_is_mq11xx(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_OMAP
+#define gadget_is_omap(g) !strcmp("omap_udc", (g)->name)
+#else
+#define gadget_is_omap(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_N9604
+#define gadget_is_n9604(g) !strcmp("n9604_udc", (g)->name)
+#else
+#define gadget_is_n9604(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_PXA27X
+#define gadget_is_pxa27x(g) !strcmp("pxa27x_udc", (g)->name)
+#else
+#define gadget_is_pxa27x(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_S3C2410
+#define gadget_is_s3c2410(g) !strcmp("s3c2410_udc", (g)->name)
+#else
+#define gadget_is_s3c2410(g) 0
+#endif
+
+#ifdef CONFIG_USB_GADGET_AT91
+#define gadget_is_at91(g) !strcmp("at91_udc", (g)->name)
+#else
+#define gadget_is_at91(g) 0
+#endif
+
+// CONFIG_USB_GADGET_SX2
+// CONFIG_USB_GADGET_AU1X00
+// ...
+
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
new file mode 100644
index 000000000000..005db7cca292
--- /dev/null
+++ b/drivers/usb/gadget/goku_udc.c
@@ -0,0 +1,1984 @@
+/*
+ * Toshiba TC86C001 ("Goku-S") USB Device Controller driver
+ *
+ * Copyright (C) 2000-2002 Lineo
+ * by Stuart Lynne, Tom Rushworth, and Bruce Balden
+ * Copyright (C) 2002 Toshiba Corporation
+ * Copyright (C) 2003 MontaVista Software (source@mvista.com)
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+/*
+ * This device has ep0 and three semi-configurable bulk/interrupt endpoints.
+ *
+ * - Endpoint numbering is fixed: ep{1,2,3}-bulk
+ * - Gadget drivers can choose ep maxpacket (8/16/32/64)
+ * - Gadget drivers can choose direction (IN, OUT)
+ * - DMA works with ep1 (OUT transfers) and ep2 (IN transfers).
+ */
+
+#undef DEBUG
+// #define VERBOSE /* extra debug messages (success too) */
+// #define USB_TRACE /* packet-level success messages */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/proc_fs.h>
+#include <linux/device.h>
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+
+
+#include "goku_udc.h"
+
+#define DRIVER_DESC "TC86C001 USB Device Controller"
+#define DRIVER_VERSION "30-Oct 2003"
+
+#define DMA_ADDR_INVALID (~(dma_addr_t)0)
+
+static const char driver_name [] = "goku_udc";
+static const char driver_desc [] = DRIVER_DESC;
+
+MODULE_AUTHOR("source@mvista.com");
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
+
+/*
+ * IN dma behaves ok under testing, though the IN-dma abort paths don't
+ * seem to behave quite as expected. Used by default.
+ *
+ * OUT dma documents design problems handling the common "short packet"
+ * transfer termination policy; it couldn't enabled by default, even
+ * if the OUT-dma abort problems had a resolution.
+ */
+static unsigned use_dma = 1;
+
+#if 0
+//#include <linux/moduleparam.h>
+/* "modprobe goku_udc use_dma=1" etc
+ * 0 to disable dma
+ * 1 to use IN dma only (normal operation)
+ * 2 to use IN and OUT dma
+ */
+module_param(use_dma, uint, S_IRUGO);
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static void nuke(struct goku_ep *, int status);
+
+static inline void
+command(struct goku_udc_regs __iomem *regs, int command, unsigned epnum)
+{
+ writel(COMMAND_EP(epnum) | command, &regs->Command);
+ udelay(300);
+}
+
+static int
+goku_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
+{
+ struct goku_udc *dev;
+ struct goku_ep *ep;
+ u32 mode;
+ u16 max;
+ unsigned long flags;
+
+ ep = container_of(_ep, struct goku_ep, ep);
+ if (!_ep || !desc || ep->desc
+ || desc->bDescriptorType != USB_DT_ENDPOINT)
+ return -EINVAL;
+ dev = ep->dev;
+ if (ep == &dev->ep[0])
+ return -EINVAL;
+ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
+ return -ESHUTDOWN;
+ if (ep->num != (desc->bEndpointAddress & 0x0f))
+ return -EINVAL;
+
+ switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
+ case USB_ENDPOINT_XFER_BULK:
+ case USB_ENDPOINT_XFER_INT:
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ if ((readl(ep->reg_status) & EPxSTATUS_EP_MASK)
+ != EPxSTATUS_EP_INVALID)
+ return -EBUSY;
+
+ /* enabling the no-toggle interrupt mode would need an api hook */
+ mode = 0;
+ max = le16_to_cpu(get_unaligned(&desc->wMaxPacketSize));
+ switch (max) {
+ case 64: mode++;
+ case 32: mode++;
+ case 16: mode++;
+ case 8: mode <<= 3;
+ break;
+ default:
+ return -EINVAL;
+ }
+ mode |= 2 << 1; /* bulk, or intr-with-toggle */
+
+ /* ep1/ep2 dma direction is chosen early; it works in the other
+ * direction, with pio. be cautious with out-dma.
+ */
+ ep->is_in = (USB_DIR_IN & desc->bEndpointAddress) != 0;
+ if (ep->is_in) {
+ mode |= 1;
+ ep->dma = (use_dma != 0) && (ep->num == UDC_MSTRD_ENDPOINT);
+ } else {
+ ep->dma = (use_dma == 2) && (ep->num == UDC_MSTWR_ENDPOINT);
+ if (ep->dma)
+ DBG(dev, "%s out-dma hides short packets\n",
+ ep->ep.name);
+ }
+
+ spin_lock_irqsave(&ep->dev->lock, flags);
+
+ /* ep1 and ep2 can do double buffering and/or dma */
+ if (ep->num < 3) {
+ struct goku_udc_regs __iomem *regs = ep->dev->regs;
+ u32 tmp;
+
+ /* double buffer except (for now) with pio in */
+ tmp = ((ep->dma || !ep->is_in)
+ ? 0x10 /* double buffered */
+ : 0x11 /* single buffer */
+ ) << ep->num;
+ tmp |= readl(&regs->EPxSingle);
+ writel(tmp, &regs->EPxSingle);
+
+ tmp = (ep->dma ? 0x10/*dma*/ : 0x11/*pio*/) << ep->num;
+ tmp |= readl(&regs->EPxBCS);
+ writel(tmp, &regs->EPxBCS);
+ }
+ writel(mode, ep->reg_mode);
+ command(ep->dev->regs, COMMAND_RESET, ep->num);
+ ep->ep.maxpacket = max;
+ ep->stopped = 0;
+ ep->desc = desc;
+ spin_unlock_irqrestore(&ep->dev->lock, flags);
+
+ DBG(dev, "enable %s %s %s maxpacket %u\n", ep->ep.name,
+ ep->is_in ? "IN" : "OUT",
+ ep->dma ? "dma" : "pio",
+ max);
+
+ return 0;
+}
+
+static void ep_reset(struct goku_udc_regs __iomem *regs, struct goku_ep *ep)
+{
+ struct goku_udc *dev = ep->dev;
+
+ if (regs) {
+ command(regs, COMMAND_INVALID, ep->num);
+ if (ep->num) {
+ if (ep->num == UDC_MSTWR_ENDPOINT)
+ dev->int_enable &= ~(INT_MSTWREND
+ |INT_MSTWRTMOUT);
+ else if (ep->num == UDC_MSTRD_ENDPOINT)
+ dev->int_enable &= ~INT_MSTRDEND;
+ dev->int_enable &= ~INT_EPxDATASET (ep->num);
+ } else
+ dev->int_enable &= ~INT_EP0;
+ writel(dev->int_enable, &regs->int_enable);
+ readl(&regs->int_enable);
+ if (ep->num < 3) {
+ struct goku_udc_regs __iomem *r = ep->dev->regs;
+ u32 tmp;
+
+ tmp = readl(&r->EPxSingle);
+ tmp &= ~(0x11 << ep->num);
+ writel(tmp, &r->EPxSingle);
+
+ tmp = readl(&r->EPxBCS);
+ tmp &= ~(0x11 << ep->num);
+ writel(tmp, &r->EPxBCS);
+ }
+ /* reset dma in case we're still using it */
+ if (ep->dma) {
+ u32 master;
+
+ master = readl(&regs->dma_master) & MST_RW_BITS;
+ if (ep->num == UDC_MSTWR_ENDPOINT) {
+ master &= ~MST_W_BITS;
+ master |= MST_WR_RESET;
+ } else {
+ master &= ~MST_R_BITS;
+ master |= MST_RD_RESET;
+ }
+ writel(master, &regs->dma_master);
+ }
+ }
+
+ ep->ep.maxpacket = MAX_FIFO_SIZE;
+ ep->desc = NULL;
+ ep->stopped = 1;
+ ep->irqs = 0;
+ ep->dma = 0;
+}
+
+static int goku_ep_disable(struct usb_ep *_ep)
+{
+ struct goku_ep *ep;
+ struct goku_udc *dev;
+ unsigned long flags;
+
+ ep = container_of(_ep, struct goku_ep, ep);
+ if (!_ep || !ep->desc)
+ return -ENODEV;
+ dev = ep->dev;
+ if (dev->ep0state == EP0_SUSPEND)
+ return -EBUSY;
+
+ VDBG(dev, "disable %s\n", _ep->name);
+
+ spin_lock_irqsave(&dev->lock, flags);
+ nuke(ep, -ESHUTDOWN);
+ ep_reset(dev->regs, ep);
+ spin_unlock_irqrestore(&dev->lock, flags);
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct usb_request *
+goku_alloc_request(struct usb_ep *_ep, int gfp_flags)
+{
+ struct goku_request *req;
+
+ if (!_ep)
+ return NULL;
+ req = kmalloc(sizeof *req, gfp_flags);
+ if (!req)
+ return NULL;
+
+ memset(req, 0, sizeof *req);
+ req->req.dma = DMA_ADDR_INVALID;
+ INIT_LIST_HEAD(&req->queue);
+ return &req->req;
+}
+
+static void
+goku_free_request(struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct goku_request *req;
+
+ if (!_ep || !_req)
+ return;
+
+ req = container_of(_req, struct goku_request, req);
+ WARN_ON(!list_empty(&req->queue));
+ kfree(req);
+}
+
+/*-------------------------------------------------------------------------*/
+
+#undef USE_KMALLOC
+
+/* many common platforms have dma-coherent caches, which means that it's
+ * safe to use kmalloc() memory for all i/o buffers without using any
+ * cache flushing calls. (unless you're trying to share cache lines
+ * between dma and non-dma activities, which is a slow idea in any case.)
+ *
+ * other platforms need more care, with 2.6 having a moderately general
+ * solution except for the common "buffer is smaller than a page" case.
+ */
+#if defined(CONFIG_X86)
+#define USE_KMALLOC
+
+#elif defined(CONFIG_MIPS) && !defined(CONFIG_NONCOHERENT_IO)
+#define USE_KMALLOC
+
+#elif defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
+#define USE_KMALLOC
+
+#endif
+
+/* allocating buffers this way eliminates dma mapping overhead, which
+ * on some platforms will mean eliminating a per-io buffer copy. with
+ * some kinds of system caches, further tweaks may still be needed.
+ */
+static void *
+goku_alloc_buffer(struct usb_ep *_ep, unsigned bytes,
+ dma_addr_t *dma, int gfp_flags)
+{
+ void *retval;
+ struct goku_ep *ep;
+
+ ep = container_of(_ep, struct goku_ep, ep);
+ if (!_ep)
+ return NULL;
+ *dma = DMA_ADDR_INVALID;
+
+#if defined(USE_KMALLOC)
+ retval = kmalloc(bytes, gfp_flags);
+ if (retval)
+ *dma = virt_to_phys(retval);
+#else
+ if (ep->dma) {
+ /* the main problem with this call is that it wastes memory
+ * on typical 1/N page allocations: it allocates 1-N pages.
+ */
+#warning Using dma_alloc_coherent even with buffers smaller than a page.
+ retval = dma_alloc_coherent(&ep->dev->pdev->dev,
+ bytes, dma, gfp_flags);
+ } else
+ retval = kmalloc(bytes, gfp_flags);
+#endif
+ return retval;
+}
+
+static void
+goku_free_buffer(struct usb_ep *_ep, void *buf, dma_addr_t dma, unsigned bytes)
+{
+ /* free memory into the right allocator */
+#ifndef USE_KMALLOC
+ if (dma != DMA_ADDR_INVALID) {
+ struct goku_ep *ep;
+
+ ep = container_of(_ep, struct goku_ep, ep);
+ if (!_ep)
+ return;
+ dma_free_coherent(&ep->dev->pdev->dev, bytes, buf, dma);
+ } else
+#endif
+ kfree (buf);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void
+done(struct goku_ep *ep, struct goku_request *req, int status)
+{
+ struct goku_udc *dev;
+ unsigned stopped = ep->stopped;
+
+ list_del_init(&req->queue);
+
+ if (likely(req->req.status == -EINPROGRESS))
+ req->req.status = status;
+ else
+ status = req->req.status;
+
+ dev = ep->dev;
+ if (req->mapped) {
+ pci_unmap_single(dev->pdev, req->req.dma, req->req.length,
+ ep->is_in ? PCI_DMA_TODEVICE : PCI_DMA_FROMDEVICE);
+ req->req.dma = DMA_ADDR_INVALID;
+ req->mapped = 0;
+ }
+
+#ifndef USB_TRACE
+ if (status && status != -ESHUTDOWN)
+#endif
+ VDBG(dev, "complete %s req %p stat %d len %u/%u\n",
+ ep->ep.name, &req->req, status,
+ req->req.actual, req->req.length);
+
+ /* don't modify queue heads during completion callback */
+ ep->stopped = 1;
+ spin_unlock(&dev->lock);
+ req->req.complete(&ep->ep, &req->req);
+ spin_lock(&dev->lock);
+ ep->stopped = stopped;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static inline int
+write_packet(u32 __iomem *fifo, u8 *buf, struct goku_request *req, unsigned max)
+{
+ unsigned length, count;
+
+ length = min(req->req.length - req->req.actual, max);
+ req->req.actual += length;
+
+ count = length;
+ while (likely(count--))
+ writel(*buf++, fifo);
+ return length;
+}
+
+// return: 0 = still running, 1 = completed, negative = errno
+static int write_fifo(struct goku_ep *ep, struct goku_request *req)
+{
+ struct goku_udc *dev = ep->dev;
+ u32 tmp;
+ u8 *buf;
+ unsigned count;
+ int is_last;
+
+ tmp = readl(&dev->regs->DataSet);
+ buf = req->req.buf + req->req.actual;
+ prefetch(buf);
+
+ dev = ep->dev;
+ if (unlikely(ep->num == 0 && dev->ep0state != EP0_IN))
+ return -EL2HLT;
+
+ /* NOTE: just single-buffered PIO-IN for now. */
+ if (unlikely((tmp & DATASET_A(ep->num)) != 0))
+ return 0;
+
+ /* clear our "packet available" irq */
+ if (ep->num != 0)
+ writel(~INT_EPxDATASET(ep->num), &dev->regs->int_status);
+
+ count = write_packet(ep->reg_fifo, buf, req, ep->ep.maxpacket);
+
+ /* last packet often short (sometimes a zlp, especially on ep0) */
+ if (unlikely(count != ep->ep.maxpacket)) {
+ writel(~(1<<ep->num), &dev->regs->EOP);
+ if (ep->num == 0) {
+ dev->ep[0].stopped = 1;
+ dev->ep0state = EP0_STATUS;
+ }
+ is_last = 1;
+ } else {
+ if (likely(req->req.length != req->req.actual)
+ || req->req.zero)
+ is_last = 0;
+ else
+ is_last = 1;
+ }
+#if 0 /* printk seemed to trash is_last...*/
+//#ifdef USB_TRACE
+ VDBG(dev, "wrote %s %u bytes%s IN %u left %p\n",
+ ep->ep.name, count, is_last ? "/last" : "",
+ req->req.length - req->req.actual, req);
+#endif
+
+ /* requests complete when all IN data is in the FIFO,
+ * or sometimes later, if a zlp was needed.
+ */
+ if (is_last) {
+ done(ep, req, 0);
+ return 1;
+ }
+
+ return 0;
+}
+
+static int read_fifo(struct goku_ep *ep, struct goku_request *req)
+{
+ struct goku_udc_regs __iomem *regs;
+ u32 size, set;
+ u8 *buf;
+ unsigned bufferspace, is_short, dbuff;
+
+ regs = ep->dev->regs;
+top:
+ buf = req->req.buf + req->req.actual;
+ prefetchw(buf);
+
+ if (unlikely(ep->num == 0 && ep->dev->ep0state != EP0_OUT))
+ return -EL2HLT;
+
+ dbuff = (ep->num == 1 || ep->num == 2);
+ do {
+ /* ack dataset irq matching the status we'll handle */
+ if (ep->num != 0)
+ writel(~INT_EPxDATASET(ep->num), &regs->int_status);
+
+ set = readl(&regs->DataSet) & DATASET_AB(ep->num);
+ size = readl(&regs->EPxSizeLA[ep->num]);
+ bufferspace = req->req.length - req->req.actual;
+
+ /* usually do nothing without an OUT packet */
+ if (likely(ep->num != 0 || bufferspace != 0)) {
+ if (unlikely(set == 0))
+ break;
+ /* use ep1/ep2 double-buffering for OUT */
+ if (!(size & PACKET_ACTIVE))
+ size = readl(&regs->EPxSizeLB[ep->num]);
+ if (!(size & PACKET_ACTIVE)) // "can't happen"
+ break;
+ size &= DATASIZE; /* EPxSizeH == 0 */
+
+ /* ep0out no-out-data case for set_config, etc */
+ } else
+ size = 0;
+
+ /* read all bytes from this packet */
+ req->req.actual += size;
+ is_short = (size < ep->ep.maxpacket);
+#ifdef USB_TRACE
+ VDBG(ep->dev, "read %s %u bytes%s OUT req %p %u/%u\n",
+ ep->ep.name, size, is_short ? "/S" : "",
+ req, req->req.actual, req->req.length);
+#endif
+ while (likely(size-- != 0)) {
+ u8 byte = (u8) readl(ep->reg_fifo);
+
+ if (unlikely(bufferspace == 0)) {
+ /* this happens when the driver's buffer
+ * is smaller than what the host sent.
+ * discard the extra data in this packet.
+ */
+ if (req->req.status != -EOVERFLOW)
+ DBG(ep->dev, "%s overflow %u\n",
+ ep->ep.name, size);
+ req->req.status = -EOVERFLOW;
+ } else {
+ *buf++ = byte;
+ bufferspace--;
+ }
+ }
+
+ /* completion */
+ if (unlikely(is_short || req->req.actual == req->req.length)) {
+ if (unlikely(ep->num == 0)) {
+ /* non-control endpoints now usable? */
+ if (ep->dev->req_config)
+ writel(ep->dev->configured
+ ? USBSTATE_CONFIGURED
+ : 0,
+ &regs->UsbState);
+ /* ep0out status stage */
+ writel(~(1<<0), &regs->EOP);
+ ep->stopped = 1;
+ ep->dev->ep0state = EP0_STATUS;
+ }
+ done(ep, req, 0);
+
+ /* empty the second buffer asap */
+ if (dbuff && !list_empty(&ep->queue)) {
+ req = list_entry(ep->queue.next,
+ struct goku_request, queue);
+ goto top;
+ }
+ return 1;
+ }
+ } while (dbuff);
+ return 0;
+}
+
+static inline void
+pio_irq_enable(struct goku_udc *dev,
+ struct goku_udc_regs __iomem *regs, int epnum)
+{
+ dev->int_enable |= INT_EPxDATASET (epnum);
+ writel(dev->int_enable, &regs->int_enable);
+ /* write may still be posted */
+}
+
+static inline void
+pio_irq_disable(struct goku_udc *dev,
+ struct goku_udc_regs __iomem *regs, int epnum)
+{
+ dev->int_enable &= ~INT_EPxDATASET (epnum);
+ writel(dev->int_enable, &regs->int_enable);
+ /* write may still be posted */
+}
+
+static inline void
+pio_advance(struct goku_ep *ep)
+{
+ struct goku_request *req;
+
+ if (unlikely(list_empty (&ep->queue)))
+ return;
+ req = list_entry(ep->queue.next, struct goku_request, queue);
+ (ep->is_in ? write_fifo : read_fifo)(ep, req);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+// return: 0 = q running, 1 = q stopped, negative = errno
+static int start_dma(struct goku_ep *ep, struct goku_request *req)
+{
+ struct goku_udc_regs __iomem *regs = ep->dev->regs;
+ u32 master;
+ u32 start = req->req.dma;
+ u32 end = start + req->req.length - 1;
+
+ master = readl(&regs->dma_master) & MST_RW_BITS;
+
+ /* re-init the bits affecting IN dma; careful with zlps */
+ if (likely(ep->is_in)) {
+ if (unlikely(master & MST_RD_ENA)) {
+ DBG (ep->dev, "start, IN active dma %03x!!\n",
+ master);
+// return -EL2HLT;
+ }
+ writel(end, &regs->in_dma_end);
+ writel(start, &regs->in_dma_start);
+
+ master &= ~MST_R_BITS;
+ if (unlikely(req->req.length == 0))
+ master = MST_RD_ENA | MST_RD_EOPB;
+ else if ((req->req.length % ep->ep.maxpacket) != 0
+ || req->req.zero)
+ master = MST_RD_ENA | MST_EOPB_ENA;
+ else
+ master = MST_RD_ENA | MST_EOPB_DIS;
+
+ ep->dev->int_enable |= INT_MSTRDEND;
+
+ /* Goku DMA-OUT merges short packets, which plays poorly with
+ * protocols where short packets mark the transfer boundaries.
+ * The chip supports a nonstandard policy with INT_MSTWRTMOUT,
+ * ending transfers after 3 SOFs; we don't turn it on.
+ */
+ } else {
+ if (unlikely(master & MST_WR_ENA)) {
+ DBG (ep->dev, "start, OUT active dma %03x!!\n",
+ master);
+// return -EL2HLT;
+ }
+ writel(end, &regs->out_dma_end);
+ writel(start, &regs->out_dma_start);
+
+ master &= ~MST_W_BITS;
+ master |= MST_WR_ENA | MST_TIMEOUT_DIS;
+
+ ep->dev->int_enable |= INT_MSTWREND|INT_MSTWRTMOUT;
+ }
+
+ writel(master, &regs->dma_master);
+ writel(ep->dev->int_enable, &regs->int_enable);
+ return 0;
+}
+
+static void dma_advance(struct goku_udc *dev, struct goku_ep *ep)
+{
+ struct goku_request *req;
+ struct goku_udc_regs __iomem *regs = ep->dev->regs;
+ u32 master;
+
+ master = readl(&regs->dma_master);
+
+ if (unlikely(list_empty(&ep->queue))) {
+stop:
+ if (ep->is_in)
+ dev->int_enable &= ~INT_MSTRDEND;
+ else
+ dev->int_enable &= ~(INT_MSTWREND|INT_MSTWRTMOUT);
+ writel(dev->int_enable, &regs->int_enable);
+ return;
+ }
+ req = list_entry(ep->queue.next, struct goku_request, queue);
+
+ /* normal hw dma completion (not abort) */
+ if (likely(ep->is_in)) {
+ if (unlikely(master & MST_RD_ENA))
+ return;
+ req->req.actual = readl(&regs->in_dma_current);
+ } else {
+ if (unlikely(master & MST_WR_ENA))
+ return;
+
+ /* hardware merges short packets, and also hides packet
+ * overruns. a partial packet MAY be in the fifo here.
+ */
+ req->req.actual = readl(&regs->out_dma_current);
+ }
+ req->req.actual -= req->req.dma;
+ req->req.actual++;
+
+#ifdef USB_TRACE
+ VDBG(dev, "done %s %s dma, %u/%u bytes, req %p\n",
+ ep->ep.name, ep->is_in ? "IN" : "OUT",
+ req->req.actual, req->req.length, req);
+#endif
+ done(ep, req, 0);
+ if (list_empty(&ep->queue))
+ goto stop;
+ req = list_entry(ep->queue.next, struct goku_request, queue);
+ (void) start_dma(ep, req);
+}
+
+static void abort_dma(struct goku_ep *ep, int status)
+{
+ struct goku_udc_regs __iomem *regs = ep->dev->regs;
+ struct goku_request *req;
+ u32 curr, master;
+
+ /* NAK future host requests, hoping the implicit delay lets the
+ * dma engine finish reading (or writing) its latest packet and
+ * empty the dma buffer (up to 16 bytes).
+ *
+ * This avoids needing to clean up a partial packet in the fifo;
+ * we can't do that for IN without side effects to HALT and TOGGLE.
+ */
+ command(regs, COMMAND_FIFO_DISABLE, ep->num);
+ req = list_entry(ep->queue.next, struct goku_request, queue);
+ master = readl(&regs->dma_master) & MST_RW_BITS;
+
+ /* FIXME using these resets isn't usably documented. this may
+ * not work unless it's followed by disabling the endpoint.
+ *
+ * FIXME the OUT reset path doesn't even behave consistently.
+ */
+ if (ep->is_in) {
+ if (unlikely((readl(&regs->dma_master) & MST_RD_ENA) == 0))
+ goto finished;
+ curr = readl(&regs->in_dma_current);
+
+ writel(curr, &regs->in_dma_end);
+ writel(curr, &regs->in_dma_start);
+
+ master &= ~MST_R_BITS;
+ master |= MST_RD_RESET;
+ writel(master, &regs->dma_master);
+
+ if (readl(&regs->dma_master) & MST_RD_ENA)
+ DBG(ep->dev, "IN dma active after reset!\n");
+
+ } else {
+ if (unlikely((readl(&regs->dma_master) & MST_WR_ENA) == 0))
+ goto finished;
+ curr = readl(&regs->out_dma_current);
+
+ writel(curr, &regs->out_dma_end);
+ writel(curr, &regs->out_dma_start);
+
+ master &= ~MST_W_BITS;
+ master |= MST_WR_RESET;
+ writel(master, &regs->dma_master);
+
+ if (readl(&regs->dma_master) & MST_WR_ENA)
+ DBG(ep->dev, "OUT dma active after reset!\n");
+ }
+ req->req.actual = (curr - req->req.dma) + 1;
+ req->req.status = status;
+
+ VDBG(ep->dev, "%s %s %s %d/%d\n", __FUNCTION__, ep->ep.name,
+ ep->is_in ? "IN" : "OUT",
+ req->req.actual, req->req.length);
+
+ command(regs, COMMAND_FIFO_ENABLE, ep->num);
+
+ return;
+
+finished:
+ /* dma already completed; no abort needed */
+ command(regs, COMMAND_FIFO_ENABLE, ep->num);
+ req->req.actual = req->req.length;
+ req->req.status = 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int
+goku_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags)
+{
+ struct goku_request *req;
+ struct goku_ep *ep;
+ struct goku_udc *dev;
+ unsigned long flags;
+ int status;
+
+ /* always require a cpu-view buffer so pio works */
+ req = container_of(_req, struct goku_request, req);
+ if (unlikely(!_req || !_req->complete
+ || !_req->buf || !list_empty(&req->queue)))
+ return -EINVAL;
+ ep = container_of(_ep, struct goku_ep, ep);
+ if (unlikely(!_ep || (!ep->desc && ep->num != 0)))
+ return -EINVAL;
+ dev = ep->dev;
+ if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN))
+ return -ESHUTDOWN;
+
+ /* can't touch registers when suspended */
+ if (dev->ep0state == EP0_SUSPEND)
+ return -EBUSY;
+
+ /* set up dma mapping in case the caller didn't */
+ if (ep->dma && _req->dma == DMA_ADDR_INVALID) {
+ _req->dma = pci_map_single(dev->pdev, _req->buf, _req->length,
+ ep->is_in ? PCI_DMA_TODEVICE : PCI_DMA_FROMDEVICE);
+ req->mapped = 1;
+ }
+
+#ifdef USB_TRACE
+ VDBG(dev, "%s queue req %p, len %u buf %p\n",
+ _ep->name, _req, _req->length, _req->buf);
+#endif
+
+ spin_lock_irqsave(&dev->lock, flags);
+
+ _req->status = -EINPROGRESS;
+ _req->actual = 0;
+
+ /* for ep0 IN without premature status, zlp is required and
+ * writing EOP starts the status stage (OUT).
+ */
+ if (unlikely(ep->num == 0 && ep->is_in))
+ _req->zero = 1;
+
+ /* kickstart this i/o queue? */
+ status = 0;
+ if (list_empty(&ep->queue) && likely(!ep->stopped)) {
+ /* dma: done after dma completion IRQ (or error)
+ * pio: done after last fifo operation
+ */
+ if (ep->dma)
+ status = start_dma(ep, req);
+ else
+ status = (ep->is_in ? write_fifo : read_fifo)(ep, req);
+
+ if (unlikely(status != 0)) {
+ if (status > 0)
+ status = 0;
+ req = NULL;
+ }
+
+ } /* else pio or dma irq handler advances the queue. */
+
+ if (likely(req != 0))
+ list_add_tail(&req->queue, &ep->queue);
+
+ if (likely(!list_empty(&ep->queue))
+ && likely(ep->num != 0)
+ && !ep->dma
+ && !(dev->int_enable & INT_EPxDATASET (ep->num)))
+ pio_irq_enable(dev, dev->regs, ep->num);
+
+ spin_unlock_irqrestore(&dev->lock, flags);
+
+ /* pci writes may still be posted */
+ return status;
+}
+
+/* dequeue ALL requests */
+static void nuke(struct goku_ep *ep, int status)
+{
+ struct goku_request *req;
+
+ ep->stopped = 1;
+ if (list_empty(&ep->queue))
+ return;
+ if (ep->dma)
+ abort_dma(ep, status);
+ while (!list_empty(&ep->queue)) {
+ req = list_entry(ep->queue.next, struct goku_request, queue);
+ done(ep, req, status);
+ }
+}
+
+/* dequeue JUST ONE request */
+static int goku_dequeue(struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct goku_request *req;
+ struct goku_ep *ep;
+ struct goku_udc *dev;
+ unsigned long flags;
+
+ ep = container_of(_ep, struct goku_ep, ep);
+ if (!_ep || !_req || (!ep->desc && ep->num != 0))
+ return -EINVAL;
+ dev = ep->dev;
+ if (!dev->driver)
+ return -ESHUTDOWN;
+
+ /* we can't touch (dma) registers when suspended */
+ if (dev->ep0state == EP0_SUSPEND)
+ return -EBUSY;
+
+ VDBG(dev, "%s %s %s %s %p\n", __FUNCTION__, _ep->name,
+ ep->is_in ? "IN" : "OUT",
+ ep->dma ? "dma" : "pio",
+ _req);
+
+ spin_lock_irqsave(&dev->lock, flags);
+
+ /* make sure it's actually queued on this endpoint */
+ list_for_each_entry (req, &ep->queue, queue) {
+ if (&req->req == _req)
+ break;
+ }
+ if (&req->req != _req) {
+ spin_unlock_irqrestore (&dev->lock, flags);
+ return -EINVAL;
+ }
+
+ if (ep->dma && ep->queue.next == &req->queue && !ep->stopped) {
+ abort_dma(ep, -ECONNRESET);
+ done(ep, req, -ECONNRESET);
+ dma_advance(dev, ep);
+ } else if (!list_empty(&req->queue))
+ done(ep, req, -ECONNRESET);
+ else
+ req = NULL;
+ spin_unlock_irqrestore(&dev->lock, flags);
+
+ return req ? 0 : -EOPNOTSUPP;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void goku_clear_halt(struct goku_ep *ep)
+{
+ // assert (ep->num !=0)
+ VDBG(ep->dev, "%s clear halt\n", ep->ep.name);
+ command(ep->dev->regs, COMMAND_SETDATA0, ep->num);
+ command(ep->dev->regs, COMMAND_STALL_CLEAR, ep->num);
+ if (ep->stopped) {
+ ep->stopped = 0;
+ if (ep->dma) {
+ struct goku_request *req;
+
+ if (list_empty(&ep->queue))
+ return;
+ req = list_entry(ep->queue.next, struct goku_request,
+ queue);
+ (void) start_dma(ep, req);
+ } else
+ pio_advance(ep);
+ }
+}
+
+static int goku_set_halt(struct usb_ep *_ep, int value)
+{
+ struct goku_ep *ep;
+ unsigned long flags;
+ int retval = 0;
+
+ if (!_ep)
+ return -ENODEV;
+ ep = container_of (_ep, struct goku_ep, ep);
+
+ if (ep->num == 0) {
+ if (value) {
+ ep->dev->ep0state = EP0_STALL;
+ ep->dev->ep[0].stopped = 1;
+ } else
+ return -EINVAL;
+
+ /* don't change EPxSTATUS_EP_INVALID to READY */
+ } else if (!ep->desc) {
+ DBG(ep->dev, "%s %s inactive?\n", __FUNCTION__, ep->ep.name);
+ return -EINVAL;
+ }
+
+ spin_lock_irqsave(&ep->dev->lock, flags);
+ if (!list_empty(&ep->queue))
+ retval = -EAGAIN;
+ else if (ep->is_in && value
+ /* data in (either) packet buffer? */
+ && (readl(&ep->dev->regs->DataSet)
+ & DATASET_AB(ep->num)))
+ retval = -EAGAIN;
+ else if (!value)
+ goku_clear_halt(ep);
+ else {
+ ep->stopped = 1;
+ VDBG(ep->dev, "%s set halt\n", ep->ep.name);
+ command(ep->dev->regs, COMMAND_STALL, ep->num);
+ readl(ep->reg_status);
+ }
+ spin_unlock_irqrestore(&ep->dev->lock, flags);
+ return retval;
+}
+
+static int goku_fifo_status(struct usb_ep *_ep)
+{
+ struct goku_ep *ep;
+ struct goku_udc_regs __iomem *regs;
+ u32 size;
+
+ if (!_ep)
+ return -ENODEV;
+ ep = container_of(_ep, struct goku_ep, ep);
+
+ /* size is only reported sanely for OUT */
+ if (ep->is_in)
+ return -EOPNOTSUPP;
+
+ /* ignores 16-byte dma buffer; SizeH == 0 */
+ regs = ep->dev->regs;
+ size = readl(&regs->EPxSizeLA[ep->num]) & DATASIZE;
+ size += readl(&regs->EPxSizeLB[ep->num]) & DATASIZE;
+ VDBG(ep->dev, "%s %s %u\n", __FUNCTION__, ep->ep.name, size);
+ return size;
+}
+
+static void goku_fifo_flush(struct usb_ep *_ep)
+{
+ struct goku_ep *ep;
+ struct goku_udc_regs __iomem *regs;
+ u32 size;
+
+ if (!_ep)
+ return;
+ ep = container_of(_ep, struct goku_ep, ep);
+ VDBG(ep->dev, "%s %s\n", __FUNCTION__, ep->ep.name);
+
+ /* don't change EPxSTATUS_EP_INVALID to READY */
+ if (!ep->desc && ep->num != 0) {
+ DBG(ep->dev, "%s %s inactive?\n", __FUNCTION__, ep->ep.name);
+ return;
+ }
+
+ regs = ep->dev->regs;
+ size = readl(&regs->EPxSizeLA[ep->num]);
+ size &= DATASIZE;
+
+ /* Non-desirable behavior: FIFO_CLEAR also clears the
+ * endpoint halt feature. For OUT, we _could_ just read
+ * the bytes out (PIO, if !ep->dma); for in, no choice.
+ */
+ if (size)
+ command(regs, COMMAND_FIFO_CLEAR, ep->num);
+}
+
+static struct usb_ep_ops goku_ep_ops = {
+ .enable = goku_ep_enable,
+ .disable = goku_ep_disable,
+
+ .alloc_request = goku_alloc_request,
+ .free_request = goku_free_request,
+
+ .alloc_buffer = goku_alloc_buffer,
+ .free_buffer = goku_free_buffer,
+
+ .queue = goku_queue,
+ .dequeue = goku_dequeue,
+
+ .set_halt = goku_set_halt,
+ .fifo_status = goku_fifo_status,
+ .fifo_flush = goku_fifo_flush,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int goku_get_frame(struct usb_gadget *_gadget)
+{
+ return -EOPNOTSUPP;
+}
+
+static const struct usb_gadget_ops goku_ops = {
+ .get_frame = goku_get_frame,
+ // no remote wakeup
+ // not selfpowered
+};
+
+/*-------------------------------------------------------------------------*/
+
+static inline char *dmastr(void)
+{
+ if (use_dma == 0)
+ return "(dma disabled)";
+ else if (use_dma == 2)
+ return "(dma IN and OUT)";
+ else
+ return "(dma IN)";
+}
+
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+
+static const char proc_node_name [] = "driver/udc";
+
+#define FOURBITS "%s%s%s%s"
+#define EIGHTBITS FOURBITS FOURBITS
+
+static void
+dump_intmask(const char *label, u32 mask, char **next, unsigned *size)
+{
+ int t;
+
+ /* int_status is the same format ... */
+ t = scnprintf(*next, *size,
+ "%s %05X =" FOURBITS EIGHTBITS EIGHTBITS "\n",
+ label, mask,
+ (mask & INT_PWRDETECT) ? " power" : "",
+ (mask & INT_SYSERROR) ? " sys" : "",
+ (mask & INT_MSTRDEND) ? " in-dma" : "",
+ (mask & INT_MSTWRTMOUT) ? " wrtmo" : "",
+
+ (mask & INT_MSTWREND) ? " out-dma" : "",
+ (mask & INT_MSTWRSET) ? " wrset" : "",
+ (mask & INT_ERR) ? " err" : "",
+ (mask & INT_SOF) ? " sof" : "",
+
+ (mask & INT_EP3NAK) ? " ep3nak" : "",
+ (mask & INT_EP2NAK) ? " ep2nak" : "",
+ (mask & INT_EP1NAK) ? " ep1nak" : "",
+ (mask & INT_EP3DATASET) ? " ep3" : "",
+
+ (mask & INT_EP2DATASET) ? " ep2" : "",
+ (mask & INT_EP1DATASET) ? " ep1" : "",
+ (mask & INT_STATUSNAK) ? " ep0snak" : "",
+ (mask & INT_STATUS) ? " ep0status" : "",
+
+ (mask & INT_SETUP) ? " setup" : "",
+ (mask & INT_ENDPOINT0) ? " ep0" : "",
+ (mask & INT_USBRESET) ? " reset" : "",
+ (mask & INT_SUSPEND) ? " suspend" : "");
+ *size -= t;
+ *next += t;
+}
+
+
+static int
+udc_proc_read(char *buffer, char **start, off_t off, int count,
+ int *eof, void *_dev)
+{
+ char *buf = buffer;
+ struct goku_udc *dev = _dev;
+ struct goku_udc_regs __iomem *regs = dev->regs;
+ char *next = buf;
+ unsigned size = count;
+ unsigned long flags;
+ int i, t, is_usb_connected;
+ u32 tmp;
+
+ if (off != 0)
+ return 0;
+
+ local_irq_save(flags);
+
+ /* basic device status */
+ tmp = readl(&regs->power_detect);
+ is_usb_connected = tmp & PW_DETECT;
+ t = scnprintf(next, size,
+ "%s - %s\n"
+ "%s version: %s %s\n"
+ "Gadget driver: %s\n"
+ "Host %s, %s\n"
+ "\n",
+ pci_name(dev->pdev), driver_desc,
+ driver_name, DRIVER_VERSION, dmastr(),
+ dev->driver ? dev->driver->driver.name : "(none)",
+ is_usb_connected
+ ? ((tmp & PW_PULLUP) ? "full speed" : "powered")
+ : "disconnected",
+ ({char *tmp;
+ switch(dev->ep0state){
+ case EP0_DISCONNECT: tmp = "ep0_disconnect"; break;
+ case EP0_IDLE: tmp = "ep0_idle"; break;
+ case EP0_IN: tmp = "ep0_in"; break;
+ case EP0_OUT: tmp = "ep0_out"; break;
+ case EP0_STATUS: tmp = "ep0_status"; break;
+ case EP0_STALL: tmp = "ep0_stall"; break;
+ case EP0_SUSPEND: tmp = "ep0_suspend"; break;
+ default: tmp = "ep0_?"; break;
+ } tmp; })
+ );
+ size -= t;
+ next += t;
+
+ dump_intmask("int_status", readl(&regs->int_status), &next, &size);
+ dump_intmask("int_enable", readl(&regs->int_enable), &next, &size);
+
+ if (!is_usb_connected || !dev->driver || (tmp & PW_PULLUP) == 0)
+ goto done;
+
+ /* registers for (active) device and ep0 */
+ t = scnprintf(next, size, "\nirqs %lu\ndataset %02x "
+ "single.bcs %02x.%02x state %x addr %u\n",
+ dev->irqs, readl(&regs->DataSet),
+ readl(&regs->EPxSingle), readl(&regs->EPxBCS),
+ readl(&regs->UsbState),
+ readl(&regs->address));
+ size -= t;
+ next += t;
+
+ tmp = readl(&regs->dma_master);
+ t = scnprintf(next, size,
+ "dma %03X =" EIGHTBITS "%s %s\n", tmp,
+ (tmp & MST_EOPB_DIS) ? " eopb-" : "",
+ (tmp & MST_EOPB_ENA) ? " eopb+" : "",
+ (tmp & MST_TIMEOUT_DIS) ? " tmo-" : "",
+ (tmp & MST_TIMEOUT_ENA) ? " tmo+" : "",
+
+ (tmp & MST_RD_EOPB) ? " eopb" : "",
+ (tmp & MST_RD_RESET) ? " in_reset" : "",
+ (tmp & MST_WR_RESET) ? " out_reset" : "",
+ (tmp & MST_RD_ENA) ? " IN" : "",
+
+ (tmp & MST_WR_ENA) ? " OUT" : "",
+ (tmp & MST_CONNECTION)
+ ? "ep1in/ep2out"
+ : "ep1out/ep2in");
+ size -= t;
+ next += t;
+
+ /* dump endpoint queues */
+ for (i = 0; i < 4; i++) {
+ struct goku_ep *ep = &dev->ep [i];
+ struct goku_request *req;
+ int t;
+
+ if (i && !ep->desc)
+ continue;
+
+ tmp = readl(ep->reg_status);
+ t = scnprintf(next, size,
+ "%s %s max %u %s, irqs %lu, "
+ "status %02x (%s) " FOURBITS "\n",
+ ep->ep.name,
+ ep->is_in ? "in" : "out",
+ ep->ep.maxpacket,
+ ep->dma ? "dma" : "pio",
+ ep->irqs,
+ tmp, ({ char *s;
+ switch (tmp & EPxSTATUS_EP_MASK) {
+ case EPxSTATUS_EP_READY:
+ s = "ready"; break;
+ case EPxSTATUS_EP_DATAIN:
+ s = "packet"; break;
+ case EPxSTATUS_EP_FULL:
+ s = "full"; break;
+ case EPxSTATUS_EP_TX_ERR: // host will retry
+ s = "tx_err"; break;
+ case EPxSTATUS_EP_RX_ERR:
+ s = "rx_err"; break;
+ case EPxSTATUS_EP_BUSY: /* ep0 only */
+ s = "busy"; break;
+ case EPxSTATUS_EP_STALL:
+ s = "stall"; break;
+ case EPxSTATUS_EP_INVALID: // these "can't happen"
+ s = "invalid"; break;
+ default:
+ s = "?"; break;
+ }; s; }),
+ (tmp & EPxSTATUS_TOGGLE) ? "data1" : "data0",
+ (tmp & EPxSTATUS_SUSPEND) ? " suspend" : "",
+ (tmp & EPxSTATUS_FIFO_DISABLE) ? " disable" : "",
+ (tmp & EPxSTATUS_STAGE_ERROR) ? " ep0stat" : ""
+ );
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+
+ if (list_empty(&ep->queue)) {
+ t = scnprintf(next, size, "\t(nothing queued)\n");
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+ continue;
+ }
+ list_for_each_entry(req, &ep->queue, queue) {
+ if (ep->dma && req->queue.prev == &ep->queue) {
+ if (i == UDC_MSTRD_ENDPOINT)
+ tmp = readl(&regs->in_dma_current);
+ else
+ tmp = readl(&regs->out_dma_current);
+ tmp -= req->req.dma;
+ tmp++;
+ } else
+ tmp = req->req.actual;
+
+ t = scnprintf(next, size,
+ "\treq %p len %u/%u buf %p\n",
+ &req->req, tmp, req->req.length,
+ req->req.buf);
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+ }
+ }
+
+done:
+ local_irq_restore(flags);
+ *eof = 1;
+ return count - size;
+}
+
+#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+/*-------------------------------------------------------------------------*/
+
+static void udc_reinit (struct goku_udc *dev)
+{
+ static char *names [] = { "ep0", "ep1-bulk", "ep2-bulk", "ep3-bulk" };
+
+ unsigned i;
+
+ INIT_LIST_HEAD (&dev->gadget.ep_list);
+ dev->gadget.ep0 = &dev->ep [0].ep;
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+ dev->ep0state = EP0_DISCONNECT;
+ dev->irqs = 0;
+
+ for (i = 0; i < 4; i++) {
+ struct goku_ep *ep = &dev->ep[i];
+
+ ep->num = i;
+ ep->ep.name = names[i];
+ ep->reg_fifo = &dev->regs->ep_fifo [i];
+ ep->reg_status = &dev->regs->ep_status [i];
+ ep->reg_mode = &dev->regs->ep_mode[i];
+
+ ep->ep.ops = &goku_ep_ops;
+ list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list);
+ ep->dev = dev;
+ INIT_LIST_HEAD (&ep->queue);
+
+ ep_reset(NULL, ep);
+ }
+
+ dev->ep[0].reg_mode = NULL;
+ dev->ep[0].ep.maxpacket = MAX_EP0_SIZE;
+ list_del_init (&dev->ep[0].ep.ep_list);
+}
+
+static void udc_reset(struct goku_udc *dev)
+{
+ struct goku_udc_regs __iomem *regs = dev->regs;
+
+ writel(0, &regs->power_detect);
+ writel(0, &regs->int_enable);
+ readl(&regs->int_enable);
+ dev->int_enable = 0;
+
+ /* deassert reset, leave USB D+ at hi-Z (no pullup)
+ * don't let INT_PWRDETECT sequence begin
+ */
+ udelay(250);
+ writel(PW_RESETB, &regs->power_detect);
+ readl(&regs->int_enable);
+}
+
+static void ep0_start(struct goku_udc *dev)
+{
+ struct goku_udc_regs __iomem *regs = dev->regs;
+ unsigned i;
+
+ VDBG(dev, "%s\n", __FUNCTION__);
+
+ udc_reset(dev);
+ udc_reinit (dev);
+ //writel(MST_EOPB_ENA | MST_TIMEOUT_ENA, &regs->dma_master);
+
+ /* hw handles set_address, set_feature, get_status; maybe more */
+ writel( G_REQMODE_SET_INTF | G_REQMODE_GET_INTF
+ | G_REQMODE_SET_CONF | G_REQMODE_GET_CONF
+ | G_REQMODE_GET_DESC
+ | G_REQMODE_CLEAR_FEAT
+ , &regs->reqmode);
+
+ for (i = 0; i < 4; i++)
+ dev->ep[i].irqs = 0;
+
+ /* can't modify descriptors after writing UsbReady */
+ for (i = 0; i < DESC_LEN; i++)
+ writel(0, &regs->descriptors[i]);
+ writel(0, &regs->UsbReady);
+
+ /* expect ep0 requests when the host drops reset */
+ writel(PW_RESETB | PW_PULLUP, &regs->power_detect);
+ dev->int_enable = INT_DEVWIDE | INT_EP0;
+ writel(dev->int_enable, &dev->regs->int_enable);
+ readl(&regs->int_enable);
+ dev->gadget.speed = USB_SPEED_FULL;
+ dev->ep0state = EP0_IDLE;
+}
+
+static void udc_enable(struct goku_udc *dev)
+{
+ /* start enumeration now, or after power detect irq */
+ if (readl(&dev->regs->power_detect) & PW_DETECT)
+ ep0_start(dev);
+ else {
+ DBG(dev, "%s\n", __FUNCTION__);
+ dev->int_enable = INT_PWRDETECT;
+ writel(dev->int_enable, &dev->regs->int_enable);
+ }
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* keeping it simple:
+ * - one bus driver, initted first;
+ * - one function driver, initted second
+ */
+
+static struct goku_udc *the_controller;
+
+/* when a driver is successfully registered, it will receive
+ * control requests including set_configuration(), which enables
+ * non-control requests. then usb traffic follows until a
+ * disconnect is reported. then a host may connect again, or
+ * the driver might get unbound.
+ */
+int usb_gadget_register_driver(struct usb_gadget_driver *driver)
+{
+ struct goku_udc *dev = the_controller;
+ int retval;
+
+ if (!driver
+ || driver->speed != USB_SPEED_FULL
+ || !driver->bind
+ || !driver->unbind
+ || !driver->disconnect
+ || !driver->setup)
+ return -EINVAL;
+ if (!dev)
+ return -ENODEV;
+ if (dev->driver)
+ return -EBUSY;
+
+ /* hook up the driver */
+ driver->driver.bus = NULL;
+ dev->driver = driver;
+ dev->gadget.dev.driver = &driver->driver;
+ retval = driver->bind(&dev->gadget);
+ if (retval) {
+ DBG(dev, "bind to driver %s --> error %d\n",
+ driver->driver.name, retval);
+ dev->driver = NULL;
+ dev->gadget.dev.driver = NULL;
+ return retval;
+ }
+
+ /* then enable host detection and ep0; and we're ready
+ * for set_configuration as well as eventual disconnect.
+ */
+ udc_enable(dev);
+
+ DBG(dev, "registered gadget driver '%s'\n", driver->driver.name);
+ return 0;
+}
+EXPORT_SYMBOL(usb_gadget_register_driver);
+
+static void
+stop_activity(struct goku_udc *dev, struct usb_gadget_driver *driver)
+{
+ unsigned i;
+
+ DBG (dev, "%s\n", __FUNCTION__);
+
+ if (dev->gadget.speed == USB_SPEED_UNKNOWN)
+ driver = NULL;
+
+ /* disconnect gadget driver after quiesceing hw and the driver */
+ udc_reset (dev);
+ for (i = 0; i < 4; i++)
+ nuke(&dev->ep [i], -ESHUTDOWN);
+ if (driver) {
+ spin_unlock(&dev->lock);
+ driver->disconnect(&dev->gadget);
+ spin_lock(&dev->lock);
+ }
+
+ if (dev->driver)
+ udc_enable(dev);
+}
+
+int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
+{
+ struct goku_udc *dev = the_controller;
+ unsigned long flags;
+
+ if (!dev)
+ return -ENODEV;
+ if (!driver || driver != dev->driver)
+ return -EINVAL;
+
+ spin_lock_irqsave(&dev->lock, flags);
+ dev->driver = NULL;
+ stop_activity(dev, driver);
+ spin_unlock_irqrestore(&dev->lock, flags);
+
+ driver->unbind(&dev->gadget);
+
+ DBG(dev, "unregistered driver '%s'\n", driver->driver.name);
+ return 0;
+}
+EXPORT_SYMBOL(usb_gadget_unregister_driver);
+
+
+/*-------------------------------------------------------------------------*/
+
+static void ep0_setup(struct goku_udc *dev)
+{
+ struct goku_udc_regs __iomem *regs = dev->regs;
+ struct usb_ctrlrequest ctrl;
+ int tmp;
+
+ /* read SETUP packet and enter DATA stage */
+ ctrl.bRequestType = readl(&regs->bRequestType);
+ ctrl.bRequest = readl(&regs->bRequest);
+ ctrl.wValue = (readl(&regs->wValueH) << 8) | readl(&regs->wValueL);
+ ctrl.wIndex = (readl(&regs->wIndexH) << 8) | readl(&regs->wIndexL);
+ ctrl.wLength = (readl(&regs->wLengthH) << 8) | readl(&regs->wLengthL);
+ writel(0, &regs->SetupRecv);
+
+ nuke(&dev->ep[0], 0);
+ dev->ep[0].stopped = 0;
+ if (likely(ctrl.bRequestType & USB_DIR_IN)) {
+ dev->ep[0].is_in = 1;
+ dev->ep0state = EP0_IN;
+ /* detect early status stages */
+ writel(ICONTROL_STATUSNAK, &dev->regs->IntControl);
+ } else {
+ dev->ep[0].is_in = 0;
+ dev->ep0state = EP0_OUT;
+
+ /* NOTE: CLEAR_FEATURE is done in software so that we can
+ * synchronize transfer restarts after bulk IN stalls. data
+ * won't even enter the fifo until the halt is cleared.
+ */
+ switch (ctrl.bRequest) {
+ case USB_REQ_CLEAR_FEATURE:
+ switch (ctrl.bRequestType) {
+ case USB_RECIP_ENDPOINT:
+ tmp = ctrl.wIndex & 0x0f;
+ /* active endpoint */
+ if (tmp > 3 || (!dev->ep[tmp].desc && tmp != 0))
+ goto stall;
+ if (ctrl.wIndex & USB_DIR_IN) {
+ if (!dev->ep[tmp].is_in)
+ goto stall;
+ } else {
+ if (dev->ep[tmp].is_in)
+ goto stall;
+ }
+ if (ctrl.wValue != USB_ENDPOINT_HALT)
+ goto stall;
+ if (tmp)
+ goku_clear_halt(&dev->ep[tmp]);
+succeed:
+ /* start ep0out status stage */
+ writel(~(1<<0), &regs->EOP);
+ dev->ep[0].stopped = 1;
+ dev->ep0state = EP0_STATUS;
+ return;
+ case USB_RECIP_DEVICE:
+ /* device remote wakeup: always clear */
+ if (ctrl.wValue != 1)
+ goto stall;
+ VDBG(dev, "clear dev remote wakeup\n");
+ goto succeed;
+ case USB_RECIP_INTERFACE:
+ goto stall;
+ default: /* pass to gadget driver */
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+#ifdef USB_TRACE
+ VDBG(dev, "SETUP %02x.%02x v%04x i%04x l%04x\n",
+ ctrl.bRequestType, ctrl.bRequest,
+ ctrl.wValue, ctrl.wIndex, ctrl.wLength);
+#endif
+
+ /* hw wants to know when we're configured (or not) */
+ dev->req_config = (ctrl.bRequest == USB_REQ_SET_CONFIGURATION
+ && ctrl.bRequestType == USB_RECIP_DEVICE);
+ if (unlikely(dev->req_config))
+ dev->configured = (ctrl.wValue != 0);
+
+ /* delegate everything to the gadget driver.
+ * it may respond after this irq handler returns.
+ */
+ spin_unlock (&dev->lock);
+ tmp = dev->driver->setup(&dev->gadget, &ctrl);
+ spin_lock (&dev->lock);
+ if (unlikely(tmp < 0)) {
+stall:
+#ifdef USB_TRACE
+ VDBG(dev, "req %02x.%02x protocol STALL; err %d\n",
+ ctrl.bRequestType, ctrl.bRequest, tmp);
+#endif
+ command(regs, COMMAND_STALL, 0);
+ dev->ep[0].stopped = 1;
+ dev->ep0state = EP0_STALL;
+ }
+
+ /* expect at least one data or status stage irq */
+}
+
+#define ACK(irqbit) { \
+ stat &= ~irqbit; \
+ writel(~irqbit, &regs->int_status); \
+ handled = 1; \
+ }
+
+static irqreturn_t goku_irq(int irq, void *_dev, struct pt_regs *r)
+{
+ struct goku_udc *dev = _dev;
+ struct goku_udc_regs __iomem *regs = dev->regs;
+ struct goku_ep *ep;
+ u32 stat, handled = 0;
+ unsigned i, rescans = 5;
+
+ spin_lock(&dev->lock);
+
+rescan:
+ stat = readl(&regs->int_status) & dev->int_enable;
+ if (!stat)
+ goto done;
+ dev->irqs++;
+
+ /* device-wide irqs */
+ if (unlikely(stat & INT_DEVWIDE)) {
+ if (stat & INT_SYSERROR) {
+ ERROR(dev, "system error\n");
+ stop_activity(dev, dev->driver);
+ stat = 0;
+ handled = 1;
+ // FIXME have a neater way to prevent re-enumeration
+ dev->driver = NULL;
+ goto done;
+ }
+ if (stat & INT_PWRDETECT) {
+ writel(~stat, &regs->int_status);
+ if (readl(&dev->regs->power_detect) & PW_DETECT) {
+ VDBG(dev, "connect\n");
+ ep0_start(dev);
+ } else {
+ DBG(dev, "disconnect\n");
+ if (dev->gadget.speed == USB_SPEED_FULL)
+ stop_activity(dev, dev->driver);
+ dev->ep0state = EP0_DISCONNECT;
+ dev->int_enable = INT_DEVWIDE;
+ writel(dev->int_enable, &dev->regs->int_enable);
+ }
+ stat = 0;
+ handled = 1;
+ goto done;
+ }
+ if (stat & INT_SUSPEND) {
+ ACK(INT_SUSPEND);
+ if (readl(&regs->ep_status[0]) & EPxSTATUS_SUSPEND) {
+ switch (dev->ep0state) {
+ case EP0_DISCONNECT:
+ case EP0_SUSPEND:
+ goto pm_next;
+ default:
+ break;
+ }
+ DBG(dev, "USB suspend\n");
+ dev->ep0state = EP0_SUSPEND;
+ if (dev->gadget.speed != USB_SPEED_UNKNOWN
+ && dev->driver
+ && dev->driver->suspend) {
+ spin_unlock(&dev->lock);
+ dev->driver->suspend(&dev->gadget);
+ spin_lock(&dev->lock);
+ }
+ } else {
+ if (dev->ep0state != EP0_SUSPEND) {
+ DBG(dev, "bogus USB resume %d\n",
+ dev->ep0state);
+ goto pm_next;
+ }
+ DBG(dev, "USB resume\n");
+ dev->ep0state = EP0_IDLE;
+ if (dev->gadget.speed != USB_SPEED_UNKNOWN
+ && dev->driver
+ && dev->driver->resume) {
+ spin_unlock(&dev->lock);
+ dev->driver->resume(&dev->gadget);
+ spin_lock(&dev->lock);
+ }
+ }
+ }
+pm_next:
+ if (stat & INT_USBRESET) { /* hub reset done */
+ ACK(INT_USBRESET);
+ INFO(dev, "USB reset done, gadget %s\n",
+ dev->driver->driver.name);
+ }
+ // and INT_ERR on some endpoint's crc/bitstuff/... problem
+ }
+
+ /* progress ep0 setup, data, or status stages.
+ * no transition {EP0_STATUS, EP0_STALL} --> EP0_IDLE; saves irqs
+ */
+ if (stat & INT_SETUP) {
+ ACK(INT_SETUP);
+ dev->ep[0].irqs++;
+ ep0_setup(dev);
+ }
+ if (stat & INT_STATUSNAK) {
+ ACK(INT_STATUSNAK|INT_ENDPOINT0);
+ if (dev->ep0state == EP0_IN) {
+ ep = &dev->ep[0];
+ ep->irqs++;
+ nuke(ep, 0);
+ writel(~(1<<0), &regs->EOP);
+ dev->ep0state = EP0_STATUS;
+ }
+ }
+ if (stat & INT_ENDPOINT0) {
+ ACK(INT_ENDPOINT0);
+ ep = &dev->ep[0];
+ ep->irqs++;
+ pio_advance(ep);
+ }
+
+ /* dma completion */
+ if (stat & INT_MSTRDEND) { /* IN */
+ ACK(INT_MSTRDEND);
+ ep = &dev->ep[UDC_MSTRD_ENDPOINT];
+ ep->irqs++;
+ dma_advance(dev, ep);
+ }
+ if (stat & INT_MSTWREND) { /* OUT */
+ ACK(INT_MSTWREND);
+ ep = &dev->ep[UDC_MSTWR_ENDPOINT];
+ ep->irqs++;
+ dma_advance(dev, ep);
+ }
+ if (stat & INT_MSTWRTMOUT) { /* OUT */
+ ACK(INT_MSTWRTMOUT);
+ ep = &dev->ep[UDC_MSTWR_ENDPOINT];
+ ep->irqs++;
+ ERROR(dev, "%s write timeout ?\n", ep->ep.name);
+ // reset dma? then dma_advance()
+ }
+
+ /* pio */
+ for (i = 1; i < 4; i++) {
+ u32 tmp = INT_EPxDATASET(i);
+
+ if (!(stat & tmp))
+ continue;
+ ep = &dev->ep[i];
+ pio_advance(ep);
+ if (list_empty (&ep->queue))
+ pio_irq_disable(dev, regs, i);
+ stat &= ~tmp;
+ handled = 1;
+ ep->irqs++;
+ }
+
+ if (rescans--)
+ goto rescan;
+
+done:
+ (void)readl(&regs->int_enable);
+ spin_unlock(&dev->lock);
+ if (stat)
+ DBG(dev, "unhandled irq status: %05x (%05x, %05x)\n", stat,
+ readl(&regs->int_status), dev->int_enable);
+ return IRQ_RETVAL(handled);
+}
+
+#undef ACK
+
+/*-------------------------------------------------------------------------*/
+
+static void gadget_release(struct device *_dev)
+{
+ struct goku_udc *dev = dev_get_drvdata(_dev);
+
+ kfree(dev);
+}
+
+/* tear down the binding between this driver and the pci device */
+
+static void goku_remove(struct pci_dev *pdev)
+{
+ struct goku_udc *dev = pci_get_drvdata(pdev);
+
+ DBG(dev, "%s\n", __FUNCTION__);
+ /* start with the driver above us */
+ if (dev->driver) {
+ /* should have been done already by driver model core */
+ WARN(dev, "pci remove, driver '%s' is still registered\n",
+ dev->driver->driver.name);
+ usb_gadget_unregister_driver(dev->driver);
+ }
+
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+ remove_proc_entry(proc_node_name, NULL);
+#endif
+ if (dev->regs)
+ udc_reset(dev);
+ if (dev->got_irq)
+ free_irq(pdev->irq, dev);
+ if (dev->regs)
+ iounmap(dev->regs);
+ if (dev->got_region)
+ release_mem_region(pci_resource_start (pdev, 0),
+ pci_resource_len (pdev, 0));
+ if (dev->enabled)
+ pci_disable_device(pdev);
+ device_unregister(&dev->gadget.dev);
+
+ pci_set_drvdata(pdev, NULL);
+ dev->regs = NULL;
+ the_controller = NULL;
+
+ INFO(dev, "unbind\n");
+}
+
+/* wrap this driver around the specified pci device, but
+ * don't respond over USB until a gadget driver binds to us.
+ */
+
+static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+{
+ struct goku_udc *dev = NULL;
+ unsigned long resource, len;
+ void __iomem *base = NULL;
+ int retval;
+ char buf [8], *bufp;
+
+ /* if you want to support more than one controller in a system,
+ * usb_gadget_driver_{register,unregister}() must change.
+ */
+ if (the_controller) {
+ WARN(dev, "ignoring %s\n", pci_name(pdev));
+ return -EBUSY;
+ }
+ if (!pdev->irq) {
+ printk(KERN_ERR "Check PCI %s IRQ setup!\n", pci_name(pdev));
+ retval = -ENODEV;
+ goto done;
+ }
+
+ /* alloc, and start init */
+ dev = kmalloc (sizeof *dev, SLAB_KERNEL);
+ if (dev == NULL){
+ pr_debug("enomem %s\n", pci_name(pdev));
+ retval = -ENOMEM;
+ goto done;
+ }
+
+ memset(dev, 0, sizeof *dev);
+ spin_lock_init(&dev->lock);
+ dev->pdev = pdev;
+ dev->gadget.ops = &goku_ops;
+
+ /* the "gadget" abstracts/virtualizes the controller */
+ strcpy(dev->gadget.dev.bus_id, "gadget");
+ dev->gadget.dev.parent = &pdev->dev;
+ dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
+ dev->gadget.dev.release = gadget_release;
+ dev->gadget.name = driver_name;
+
+ /* now all the pci goodies ... */
+ retval = pci_enable_device(pdev);
+ if (retval < 0) {
+ DBG(dev, "can't enable, %d\n", retval);
+ goto done;
+ }
+ dev->enabled = 1;
+
+ resource = pci_resource_start(pdev, 0);
+ len = pci_resource_len(pdev, 0);
+ if (!request_mem_region(resource, len, driver_name)) {
+ DBG(dev, "controller already in use\n");
+ retval = -EBUSY;
+ goto done;
+ }
+ dev->got_region = 1;
+
+ base = ioremap_nocache(resource, len);
+ if (base == NULL) {
+ DBG(dev, "can't map memory\n");
+ retval = -EFAULT;
+ goto done;
+ }
+ dev->regs = (struct goku_udc_regs __iomem *) base;
+
+ pci_set_drvdata(pdev, dev);
+ INFO(dev, "%s\n", driver_desc);
+ INFO(dev, "version: " DRIVER_VERSION " %s\n", dmastr());
+#ifndef __sparc__
+ scnprintf(buf, sizeof buf, "%d", pdev->irq);
+ bufp = buf;
+#else
+ bufp = __irq_itoa(pdev->irq);
+#endif
+ INFO(dev, "irq %s, pci mem %p\n", bufp, base);
+
+ /* init to known state, then setup irqs */
+ udc_reset(dev);
+ udc_reinit (dev);
+ if (request_irq(pdev->irq, goku_irq, SA_SHIRQ/*|SA_SAMPLE_RANDOM*/,
+ driver_name, dev) != 0) {
+ DBG(dev, "request interrupt %s failed\n", bufp);
+ retval = -EBUSY;
+ goto done;
+ }
+ dev->got_irq = 1;
+ if (use_dma)
+ pci_set_master(pdev);
+
+
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+ create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev);
+#endif
+
+ /* done */
+ the_controller = dev;
+ device_register(&dev->gadget.dev);
+
+ return 0;
+
+done:
+ if (dev)
+ goku_remove (pdev);
+ return retval;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static struct pci_device_id pci_ids [] = { {
+ .class = ((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
+ .class_mask = ~0,
+ .vendor = 0x102f, /* Toshiba */
+ .device = 0x0107, /* this UDC */
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+
+}, { /* end: all zeroes */ }
+};
+MODULE_DEVICE_TABLE (pci, pci_ids);
+
+static struct pci_driver goku_pci_driver = {
+ .name = (char *) driver_name,
+ .id_table = pci_ids,
+
+ .probe = goku_probe,
+ .remove = goku_remove,
+
+ /* FIXME add power management support */
+};
+
+static int __init init (void)
+{
+ return pci_register_driver (&goku_pci_driver);
+}
+module_init (init);
+
+static void __exit cleanup (void)
+{
+ pci_unregister_driver (&goku_pci_driver);
+}
+module_exit (cleanup);
diff --git a/drivers/usb/gadget/goku_udc.h b/drivers/usb/gadget/goku_udc.h
new file mode 100644
index 000000000000..ea8c8e58cabf
--- /dev/null
+++ b/drivers/usb/gadget/goku_udc.h
@@ -0,0 +1,290 @@
+/*
+ * Toshiba TC86C001 ("Goku-S") USB Device Controller driver
+ *
+ * Copyright (C) 2000-2002 Lineo
+ * by Stuart Lynne, Tom Rushworth, and Bruce Balden
+ * Copyright (C) 2002 Toshiba Corporation
+ * Copyright (C) 2003 MontaVista Software (source@mvista.com)
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+/*
+ * PCI BAR 0 points to these registers.
+ */
+struct goku_udc_regs {
+ /* irq management */
+ u32 int_status; /* 0x000 */
+ u32 int_enable;
+#define INT_SUSPEND 0x00001 /* or resume */
+#define INT_USBRESET 0x00002
+#define INT_ENDPOINT0 0x00004
+#define INT_SETUP 0x00008
+#define INT_STATUS 0x00010
+#define INT_STATUSNAK 0x00020
+#define INT_EPxDATASET(n) (0x00020 << (n)) /* 0 < n < 4 */
+# define INT_EP1DATASET 0x00040
+# define INT_EP2DATASET 0x00080
+# define INT_EP3DATASET 0x00100
+#define INT_EPnNAK(n) (0x00100 < (n)) /* 0 < n < 4 */
+# define INT_EP1NAK 0x00200
+# define INT_EP2NAK 0x00400
+# define INT_EP3NAK 0x00800
+#define INT_SOF 0x01000
+#define INT_ERR 0x02000
+#define INT_MSTWRSET 0x04000
+#define INT_MSTWREND 0x08000
+#define INT_MSTWRTMOUT 0x10000
+#define INT_MSTRDEND 0x20000
+#define INT_SYSERROR 0x40000
+#define INT_PWRDETECT 0x80000
+
+#define INT_DEVWIDE (INT_PWRDETECT|INT_SYSERROR/*|INT_ERR*/|INT_USBRESET|INT_SUSPEND)
+#define INT_EP0 (INT_SETUP|INT_ENDPOINT0/*|INT_STATUS*/|INT_STATUSNAK)
+
+ u32 dma_master;
+#define MST_EOPB_DIS 0x0800
+#define MST_EOPB_ENA 0x0400
+#define MST_TIMEOUT_DIS 0x0200
+#define MST_TIMEOUT_ENA 0x0100
+#define MST_RD_EOPB 0x0080 /* write-only */
+#define MST_RD_RESET 0x0040
+#define MST_WR_RESET 0x0020
+#define MST_RD_ENA 0x0004 /* 1:start, 0:ignore */
+#define MST_WR_ENA 0x0002 /* 1:start, 0:ignore */
+#define MST_CONNECTION 0x0001 /* 0 for ep1out/ep2in */
+
+#define MST_R_BITS (MST_EOPB_DIS|MST_EOPB_ENA \
+ |MST_RD_ENA|MST_RD_RESET)
+#define MST_W_BITS (MST_TIMEOUT_DIS|MST_TIMEOUT_ENA \
+ |MST_WR_ENA|MST_WR_RESET)
+#define MST_RW_BITS (MST_R_BITS|MST_W_BITS \
+ |MST_CONNECTION)
+
+/* these values assume (dma_master & MST_CONNECTION) == 0 */
+#define UDC_MSTWR_ENDPOINT 1
+#define UDC_MSTRD_ENDPOINT 2
+
+ /* dma master write */
+ u32 out_dma_start;
+ u32 out_dma_end;
+ u32 out_dma_current;
+
+ /* dma master read */
+ u32 in_dma_start;
+ u32 in_dma_end;
+ u32 in_dma_current;
+
+ u32 power_detect;
+#define PW_DETECT 0x04
+#define PW_RESETB 0x02
+#define PW_PULLUP 0x01
+
+ u8 _reserved0 [0x1d8];
+
+ /* endpoint registers */
+ u32 ep_fifo [4]; /* 0x200 */
+ u8 _reserved1 [0x10];
+ u32 ep_mode [4]; /* only 1-3 valid */
+ u8 _reserved2 [0x10];
+
+ u32 ep_status [4];
+#define EPxSTATUS_TOGGLE 0x40
+#define EPxSTATUS_SUSPEND 0x20
+#define EPxSTATUS_EP_MASK (0x07<<2)
+# define EPxSTATUS_EP_READY (0<<2)
+# define EPxSTATUS_EP_DATAIN (1<<2)
+# define EPxSTATUS_EP_FULL (2<<2)
+# define EPxSTATUS_EP_TX_ERR (3<<2)
+# define EPxSTATUS_EP_RX_ERR (4<<2)
+# define EPxSTATUS_EP_BUSY (5<<2)
+# define EPxSTATUS_EP_STALL (6<<2)
+# define EPxSTATUS_EP_INVALID (7<<2)
+#define EPxSTATUS_FIFO_DISABLE 0x02
+#define EPxSTATUS_STAGE_ERROR 0x01
+
+ u8 _reserved3 [0x10];
+ u32 EPxSizeLA[4];
+#define PACKET_ACTIVE (1<<7)
+#define DATASIZE 0x7f
+ u8 _reserved3a [0x10];
+ u32 EPxSizeLB[4]; /* only 1,2 valid */
+ u8 _reserved3b [0x10];
+ u32 EPxSizeHA[4]; /* only 1-3 valid */
+ u8 _reserved3c [0x10];
+ u32 EPxSizeHB[4]; /* only 1,2 valid */
+ u8 _reserved4[0x30];
+
+ /* SETUP packet contents */
+ u32 bRequestType; /* 0x300 */
+ u32 bRequest;
+ u32 wValueL;
+ u32 wValueH;
+ u32 wIndexL;
+ u32 wIndexH;
+ u32 wLengthL;
+ u32 wLengthH;
+
+ /* command interaction/handshaking */
+ u32 SetupRecv; /* 0x320 */
+ u32 CurrConfig;
+ u32 StdRequest;
+ u32 Request;
+ u32 DataSet;
+#define DATASET_A(epnum) (1<<(2*(epnum)))
+#define DATASET_B(epnum) (2<<(2*(epnum)))
+#define DATASET_AB(epnum) (3<<(2*(epnum)))
+ u8 _reserved5[4];
+
+ u32 UsbState;
+#define USBSTATE_CONFIGURED 0x04
+#define USBSTATE_ADDRESSED 0x02
+#define USBSTATE_DEFAULT 0x01
+
+ u32 EOP;
+
+ u32 Command; /* 0x340 */
+#define COMMAND_SETDATA0 2
+#define COMMAND_RESET 3
+#define COMMAND_STALL 4
+#define COMMAND_INVALID 5
+#define COMMAND_FIFO_DISABLE 7
+#define COMMAND_FIFO_ENABLE 8
+#define COMMAND_INIT_DESCRIPTOR 9
+#define COMMAND_FIFO_CLEAR 10 /* also stall */
+#define COMMAND_STALL_CLEAR 11
+#define COMMAND_EP(n) ((n) << 4)
+
+ u32 EPxSingle;
+ u8 _reserved6[4];
+ u32 EPxBCS;
+ u8 _reserved7[8];
+ u32 IntControl;
+#define ICONTROL_STATUSNAK 1
+ u8 _reserved8[4];
+
+ u32 reqmode; // 0x360 standard request mode, low 8 bits
+#define G_REQMODE_SET_INTF (1<<7)
+#define G_REQMODE_GET_INTF (1<<6)
+#define G_REQMODE_SET_CONF (1<<5)
+#define G_REQMODE_GET_CONF (1<<4)
+#define G_REQMODE_GET_DESC (1<<3)
+#define G_REQMODE_SET_FEAT (1<<2)
+#define G_REQMODE_CLEAR_FEAT (1<<1)
+#define G_REQMODE_GET_STATUS (1<<0)
+
+ u32 ReqMode;
+ u8 _reserved9[0x18];
+ u32 PortStatus; /* 0x380 */
+ u8 _reserved10[8];
+ u32 address;
+ u32 buff_test;
+ u8 _reserved11[4];
+ u32 UsbReady;
+ u8 _reserved12[4];
+ u32 SetDescStall; /* 0x3a0 */
+ u8 _reserved13[0x45c];
+
+ /* hardware could handle limited GET_DESCRIPTOR duties */
+#define DESC_LEN 0x80
+ u32 descriptors[DESC_LEN]; /* 0x800 */
+ u8 _reserved14[0x600];
+
+} __attribute__ ((packed));
+
+#define MAX_FIFO_SIZE 64
+#define MAX_EP0_SIZE 8 /* ep0 fifo is bigger, though */
+
+
+/*-------------------------------------------------------------------------*/
+
+/* DRIVER DATA STRUCTURES and UTILITIES */
+
+struct goku_ep {
+ struct usb_ep ep;
+ struct goku_udc *dev;
+ unsigned long irqs;
+
+ unsigned num:8,
+ dma:1,
+ is_in:1,
+ stopped:1;
+
+ /* analogous to a host-side qh */
+ struct list_head queue;
+ const struct usb_endpoint_descriptor *desc;
+
+ u32 __iomem *reg_fifo;
+ u32 __iomem *reg_mode;
+ u32 __iomem *reg_status;
+};
+
+struct goku_request {
+ struct usb_request req;
+ struct list_head queue;
+
+ unsigned mapped:1;
+};
+
+enum ep0state {
+ EP0_DISCONNECT, /* no host */
+ EP0_IDLE, /* between STATUS ack and SETUP report */
+ EP0_IN, EP0_OUT, /* data stage */
+ EP0_STATUS, /* status stage */
+ EP0_STALL, /* data or status stages */
+ EP0_SUSPEND, /* usb suspend */
+};
+
+struct goku_udc {
+ /* each pci device provides one gadget, several endpoints */
+ struct usb_gadget gadget;
+ spinlock_t lock;
+ struct goku_ep ep[4];
+ struct usb_gadget_driver *driver;
+
+ enum ep0state ep0state;
+ unsigned got_irq:1,
+ got_region:1,
+ req_config:1,
+ configured:1,
+ enabled:1;
+
+ /* pci state used to access those endpoints */
+ struct pci_dev *pdev;
+ struct goku_udc_regs __iomem *regs;
+ u32 int_enable;
+
+ /* statistics... */
+ unsigned long irqs;
+};
+
+/*-------------------------------------------------------------------------*/
+
+#define xprintk(dev,level,fmt,args...) \
+ printk(level "%s %s: " fmt , driver_name , \
+ pci_name(dev->pdev) , ## args)
+
+#ifdef DEBUG
+#define DBG(dev,fmt,args...) \
+ xprintk(dev , KERN_DEBUG , fmt , ## args)
+#else
+#define DBG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* DEBUG */
+
+#ifdef VERBOSE
+#define VDBG DBG
+#else
+#define VDBG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* VERBOSE */
+
+#define ERROR(dev,fmt,args...) \
+ xprintk(dev , KERN_ERR , fmt , ## args)
+#define WARN(dev,fmt,args...) \
+ xprintk(dev , KERN_WARNING , fmt , ## args)
+#define INFO(dev,fmt,args...) \
+ xprintk(dev , KERN_INFO , fmt , ## args)
+
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
new file mode 100644
index 000000000000..2cff67ccce45
--- /dev/null
+++ b/drivers/usb/gadget/inode.c
@@ -0,0 +1,2110 @@
+/*
+ * inode.c -- user mode filesystem api for usb gadget controllers
+ *
+ * Copyright (C) 2003-2004 David Brownell
+ * Copyright (C) 2003 Agilent Technologies
+ *
+ * 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
+ */
+
+
+// #define DEBUG /* data to help fault diagnosis */
+// #define VERBOSE /* extra debug messages (success too) */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/pagemap.h>
+#include <linux/uts.h>
+#include <linux/wait.h>
+#include <linux/compiler.h>
+#include <asm/uaccess.h>
+#include <linux/slab.h>
+
+#include <linux/device.h>
+#include <linux/moduleparam.h>
+
+#include <linux/usb_gadgetfs.h>
+#include <linux/usb_gadget.h>
+
+
+/*
+ * The gadgetfs API maps each endpoint to a file descriptor so that you
+ * can use standard synchronous read/write calls for I/O. There's some
+ * O_NONBLOCK and O_ASYNC/FASYNC style i/o support. Example usermode
+ * drivers show how this works in practice. You can also use AIO to
+ * eliminate I/O gaps between requests, to help when streaming data.
+ *
+ * Key parts that must be USB-specific are protocols defining how the
+ * read/write operations relate to the hardware state machines. There
+ * are two types of files. One type is for the device, implementing ep0.
+ * The other type is for each IN or OUT endpoint. In both cases, the
+ * user mode driver must configure the hardware before using it.
+ *
+ * - First, dev_config() is called when /dev/gadget/$CHIP is configured
+ * (by writing configuration and device descriptors). Afterwards it
+ * may serve as a source of device events, used to handle all control
+ * requests other than basic enumeration.
+ *
+ * - Then either immediately, or after a SET_CONFIGURATION control request,
+ * ep_config() is called when each /dev/gadget/ep* file is configured
+ * (by writing endpoint descriptors). Afterwards these files are used
+ * to write() IN data or to read() OUT data. To halt the endpoint, a
+ * "wrong direction" request is issued (like reading an IN endpoint).
+ *
+ * Unlike "usbfs" the only ioctl()s are for things that are rare, and maybe
+ * not possible on all hardware. For example, precise fault handling with
+ * respect to data left in endpoint fifos after aborted operations; or
+ * selective clearing of endpoint halts, to implement SET_INTERFACE.
+ */
+
+#define DRIVER_DESC "USB Gadget filesystem"
+#define DRIVER_VERSION "24 Aug 2004"
+
+static const char driver_desc [] = DRIVER_DESC;
+static const char shortname [] = "gadgetfs";
+
+MODULE_DESCRIPTION (DRIVER_DESC);
+MODULE_AUTHOR ("David Brownell");
+MODULE_LICENSE ("GPL");
+
+
+/*----------------------------------------------------------------------*/
+
+#define GADGETFS_MAGIC 0xaee71ee7
+#define DMA_ADDR_INVALID (~(dma_addr_t)0)
+
+/* /dev/gadget/$CHIP represents ep0 and the whole device */
+enum ep0_state {
+ /* DISBLED is the initial state.
+ */
+ STATE_DEV_DISABLED = 0,
+
+ /* Only one open() of /dev/gadget/$CHIP; only one file tracks
+ * ep0/device i/o modes and binding to the controller. Driver
+ * must always write descriptors to initialize the device, then
+ * the device becomes UNCONNECTED until enumeration.
+ */
+ STATE_OPENED,
+
+ /* From then on, ep0 fd is in either of two basic modes:
+ * - (UN)CONNECTED: read usb_gadgetfs_event(s) from it
+ * - SETUP: read/write will transfer control data and succeed;
+ * or if "wrong direction", performs protocol stall
+ */
+ STATE_UNCONNECTED,
+ STATE_CONNECTED,
+ STATE_SETUP,
+
+ /* UNBOUND means the driver closed ep0, so the device won't be
+ * accessible again (DEV_DISABLED) until all fds are closed.
+ */
+ STATE_DEV_UNBOUND,
+};
+
+/* enough for the whole queue: most events invalidate others */
+#define N_EVENT 5
+
+struct dev_data {
+ spinlock_t lock;
+ atomic_t count;
+ enum ep0_state state;
+ struct usb_gadgetfs_event event [N_EVENT];
+ unsigned ev_next;
+ struct fasync_struct *fasync;
+ u8 current_config;
+
+ /* drivers reading ep0 MUST handle control requests (SETUP)
+ * reported that way; else the host will time out.
+ */
+ unsigned usermode_setup : 1,
+ setup_in : 1,
+ setup_can_stall : 1,
+ setup_out_ready : 1,
+ setup_out_error : 1,
+ setup_abort : 1;
+
+ /* the rest is basically write-once */
+ struct usb_config_descriptor *config, *hs_config;
+ struct usb_device_descriptor *dev;
+ struct usb_request *req;
+ struct usb_gadget *gadget;
+ struct list_head epfiles;
+ void *buf;
+ wait_queue_head_t wait;
+ struct super_block *sb;
+ struct dentry *dentry;
+
+ /* except this scratch i/o buffer for ep0 */
+ u8 rbuf [256];
+};
+
+static inline void get_dev (struct dev_data *data)
+{
+ atomic_inc (&data->count);
+}
+
+static void put_dev (struct dev_data *data)
+{
+ if (likely (!atomic_dec_and_test (&data->count)))
+ return;
+ /* needs no more cleanup */
+ BUG_ON (waitqueue_active (&data->wait));
+ kfree (data);
+}
+
+static struct dev_data *dev_new (void)
+{
+ struct dev_data *dev;
+
+ dev = kmalloc (sizeof *dev, GFP_KERNEL);
+ if (!dev)
+ return NULL;
+ memset (dev, 0, sizeof *dev);
+ dev->state = STATE_DEV_DISABLED;
+ atomic_set (&dev->count, 1);
+ spin_lock_init (&dev->lock);
+ INIT_LIST_HEAD (&dev->epfiles);
+ init_waitqueue_head (&dev->wait);
+ return dev;
+}
+
+/*----------------------------------------------------------------------*/
+
+/* other /dev/gadget/$ENDPOINT files represent endpoints */
+enum ep_state {
+ STATE_EP_DISABLED = 0,
+ STATE_EP_READY,
+ STATE_EP_DEFER_ENABLE,
+ STATE_EP_ENABLED,
+ STATE_EP_UNBOUND,
+};
+
+struct ep_data {
+ struct semaphore lock;
+ enum ep_state state;
+ atomic_t count;
+ struct dev_data *dev;
+ /* must hold dev->lock before accessing ep or req */
+ struct usb_ep *ep;
+ struct usb_request *req;
+ ssize_t status;
+ char name [16];
+ struct usb_endpoint_descriptor desc, hs_desc;
+ struct list_head epfiles;
+ wait_queue_head_t wait;
+ struct dentry *dentry;
+ struct inode *inode;
+};
+
+static inline void get_ep (struct ep_data *data)
+{
+ atomic_inc (&data->count);
+}
+
+static void put_ep (struct ep_data *data)
+{
+ if (likely (!atomic_dec_and_test (&data->count)))
+ return;
+ put_dev (data->dev);
+ /* needs no more cleanup */
+ BUG_ON (!list_empty (&data->epfiles));
+ BUG_ON (waitqueue_active (&data->wait));
+ BUG_ON (down_trylock (&data->lock) != 0);
+ kfree (data);
+}
+
+/*----------------------------------------------------------------------*/
+
+/* most "how to use the hardware" policy choices are in userspace:
+ * mapping endpoint roles (which the driver needs) to the capabilities
+ * which the usb controller has. most of those capabilities are exposed
+ * implicitly, starting with the driver name and then endpoint names.
+ */
+
+static const char *CHIP;
+
+/*----------------------------------------------------------------------*/
+
+/* NOTE: don't use dev_printk calls before binding to the gadget
+ * at the end of ep0 configuration, or after unbind.
+ */
+
+/* too wordy: dev_printk(level , &(d)->gadget->dev , fmt , ## args) */
+#define xprintk(d,level,fmt,args...) \
+ printk(level "%s: " fmt , shortname , ## args)
+
+#ifdef DEBUG
+#define DBG(dev,fmt,args...) \
+ xprintk(dev , KERN_DEBUG , fmt , ## args)
+#else
+#define DBG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* DEBUG */
+
+#ifdef VERBOSE
+#define VDEBUG DBG
+#else
+#define VDEBUG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* DEBUG */
+
+#define ERROR(dev,fmt,args...) \
+ xprintk(dev , KERN_ERR , fmt , ## args)
+#define WARN(dev,fmt,args...) \
+ xprintk(dev , KERN_WARNING , fmt , ## args)
+#define INFO(dev,fmt,args...) \
+ xprintk(dev , KERN_INFO , fmt , ## args)
+
+
+/*----------------------------------------------------------------------*/
+
+/* SYNCHRONOUS ENDPOINT OPERATIONS (bulk/intr/iso)
+ *
+ * After opening, configure non-control endpoints. Then use normal
+ * stream read() and write() requests; and maybe ioctl() to get more
+ * precise FIFO status when recovering from cancelation.
+ */
+
+static void epio_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ struct ep_data *epdata = ep->driver_data;
+
+ if (!req->context)
+ return;
+ if (req->status)
+ epdata->status = req->status;
+ else
+ epdata->status = req->actual;
+ complete ((struct completion *)req->context);
+}
+
+/* tasklock endpoint, returning when it's connected.
+ * still need dev->lock to use epdata->ep.
+ */
+static int
+get_ready_ep (unsigned f_flags, struct ep_data *epdata)
+{
+ int val;
+
+ if (f_flags & O_NONBLOCK) {
+ if (down_trylock (&epdata->lock) != 0)
+ goto nonblock;
+ if (epdata->state != STATE_EP_ENABLED) {
+ up (&epdata->lock);
+nonblock:
+ val = -EAGAIN;
+ } else
+ val = 0;
+ return val;
+ }
+
+ if ((val = down_interruptible (&epdata->lock)) < 0)
+ return val;
+newstate:
+ switch (epdata->state) {
+ case STATE_EP_ENABLED:
+ break;
+ case STATE_EP_DEFER_ENABLE:
+ DBG (epdata->dev, "%s wait for host\n", epdata->name);
+ if ((val = wait_event_interruptible (epdata->wait,
+ epdata->state != STATE_EP_DEFER_ENABLE
+ || epdata->dev->state == STATE_DEV_UNBOUND
+ )) < 0)
+ goto fail;
+ goto newstate;
+ // case STATE_EP_DISABLED: /* "can't happen" */
+ // case STATE_EP_READY: /* "can't happen" */
+ default: /* error! */
+ pr_debug ("%s: ep %p not available, state %d\n",
+ shortname, epdata, epdata->state);
+ // FALLTHROUGH
+ case STATE_EP_UNBOUND: /* clean disconnect */
+ val = -ENODEV;
+fail:
+ up (&epdata->lock);
+ }
+ return val;
+}
+
+static ssize_t
+ep_io (struct ep_data *epdata, void *buf, unsigned len)
+{
+ DECLARE_COMPLETION (done);
+ int value;
+
+ spin_lock_irq (&epdata->dev->lock);
+ if (likely (epdata->ep != NULL)) {
+ struct usb_request *req = epdata->req;
+
+ req->context = &done;
+ req->complete = epio_complete;
+ req->buf = buf;
+ req->length = len;
+ value = usb_ep_queue (epdata->ep, req, GFP_ATOMIC);
+ } else
+ value = -ENODEV;
+ spin_unlock_irq (&epdata->dev->lock);
+
+ if (likely (value == 0)) {
+ value = wait_event_interruptible (done.wait, done.done);
+ if (value != 0) {
+ spin_lock_irq (&epdata->dev->lock);
+ if (likely (epdata->ep != NULL)) {
+ DBG (epdata->dev, "%s i/o interrupted\n",
+ epdata->name);
+ usb_ep_dequeue (epdata->ep, epdata->req);
+ spin_unlock_irq (&epdata->dev->lock);
+
+ wait_event (done.wait, done.done);
+ if (epdata->status == -ECONNRESET)
+ epdata->status = -EINTR;
+ } else {
+ spin_unlock_irq (&epdata->dev->lock);
+
+ DBG (epdata->dev, "endpoint gone\n");
+ epdata->status = -ENODEV;
+ }
+ }
+ return epdata->status;
+ }
+ return value;
+}
+
+
+/* handle a synchronous OUT bulk/intr/iso transfer */
+static ssize_t
+ep_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
+{
+ struct ep_data *data = fd->private_data;
+ void *kbuf;
+ ssize_t value;
+
+ if ((value = get_ready_ep (fd->f_flags, data)) < 0)
+ return value;
+
+ /* halt any endpoint by doing a "wrong direction" i/o call */
+ if (data->desc.bEndpointAddress & USB_DIR_IN) {
+ if ((data->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ == USB_ENDPOINT_XFER_ISOC)
+ return -EINVAL;
+ DBG (data->dev, "%s halt\n", data->name);
+ spin_lock_irq (&data->dev->lock);
+ if (likely (data->ep != NULL))
+ usb_ep_set_halt (data->ep);
+ spin_unlock_irq (&data->dev->lock);
+ up (&data->lock);
+ return -EBADMSG;
+ }
+
+ /* FIXME readahead for O_NONBLOCK and poll(); careful with ZLPs */
+
+ value = -ENOMEM;
+ kbuf = kmalloc (len, SLAB_KERNEL);
+ if (unlikely (!kbuf))
+ goto free1;
+
+ value = ep_io (data, kbuf, len);
+ VDEBUG (data->dev, "%s read %d OUT, status %d\n",
+ data->name, len, value);
+ if (value >= 0 && copy_to_user (buf, kbuf, value))
+ value = -EFAULT;
+
+free1:
+ up (&data->lock);
+ kfree (kbuf);
+ return value;
+}
+
+/* handle a synchronous IN bulk/intr/iso transfer */
+static ssize_t
+ep_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
+{
+ struct ep_data *data = fd->private_data;
+ void *kbuf;
+ ssize_t value;
+
+ if ((value = get_ready_ep (fd->f_flags, data)) < 0)
+ return value;
+
+ /* halt any endpoint by doing a "wrong direction" i/o call */
+ if (!(data->desc.bEndpointAddress & USB_DIR_IN)) {
+ if ((data->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ == USB_ENDPOINT_XFER_ISOC)
+ return -EINVAL;
+ DBG (data->dev, "%s halt\n", data->name);
+ spin_lock_irq (&data->dev->lock);
+ if (likely (data->ep != NULL))
+ usb_ep_set_halt (data->ep);
+ spin_unlock_irq (&data->dev->lock);
+ up (&data->lock);
+ return -EBADMSG;
+ }
+
+ /* FIXME writebehind for O_NONBLOCK and poll(), qlen = 1 */
+
+ value = -ENOMEM;
+ kbuf = kmalloc (len, SLAB_KERNEL);
+ if (!kbuf)
+ goto free1;
+ if (copy_from_user (kbuf, buf, len)) {
+ value = -EFAULT;
+ goto free1;
+ }
+
+ value = ep_io (data, kbuf, len);
+ VDEBUG (data->dev, "%s write %d IN, status %d\n",
+ data->name, len, value);
+free1:
+ up (&data->lock);
+ kfree (kbuf);
+ return value;
+}
+
+static int
+ep_release (struct inode *inode, struct file *fd)
+{
+ struct ep_data *data = fd->private_data;
+
+ /* clean up if this can be reopened */
+ if (data->state != STATE_EP_UNBOUND) {
+ data->state = STATE_EP_DISABLED;
+ data->desc.bDescriptorType = 0;
+ data->hs_desc.bDescriptorType = 0;
+ }
+ put_ep (data);
+ return 0;
+}
+
+static int ep_ioctl (struct inode *inode, struct file *fd,
+ unsigned code, unsigned long value)
+{
+ struct ep_data *data = fd->private_data;
+ int status;
+
+ if ((status = get_ready_ep (fd->f_flags, data)) < 0)
+ return status;
+
+ spin_lock_irq (&data->dev->lock);
+ if (likely (data->ep != NULL)) {
+ switch (code) {
+ case GADGETFS_FIFO_STATUS:
+ status = usb_ep_fifo_status (data->ep);
+ break;
+ case GADGETFS_FIFO_FLUSH:
+ usb_ep_fifo_flush (data->ep);
+ break;
+ case GADGETFS_CLEAR_HALT:
+ status = usb_ep_clear_halt (data->ep);
+ break;
+ default:
+ status = -ENOTTY;
+ }
+ } else
+ status = -ENODEV;
+ spin_unlock_irq (&data->dev->lock);
+ up (&data->lock);
+ return status;
+}
+
+/*----------------------------------------------------------------------*/
+
+/* ASYNCHRONOUS ENDPOINT I/O OPERATIONS (bulk/intr/iso) */
+
+struct kiocb_priv {
+ struct usb_request *req;
+ struct ep_data *epdata;
+ void *buf;
+ char __user *ubuf;
+ unsigned actual;
+};
+
+static int ep_aio_cancel(struct kiocb *iocb, struct io_event *e)
+{
+ struct kiocb_priv *priv = iocb->private;
+ struct ep_data *epdata;
+ int value;
+
+ local_irq_disable();
+ epdata = priv->epdata;
+ // spin_lock(&epdata->dev->lock);
+ kiocbSetCancelled(iocb);
+ if (likely(epdata && epdata->ep && priv->req))
+ value = usb_ep_dequeue (epdata->ep, priv->req);
+ else
+ value = -EINVAL;
+ // spin_unlock(&epdata->dev->lock);
+ local_irq_enable();
+
+ aio_put_req(iocb);
+ return value;
+}
+
+static ssize_t ep_aio_read_retry(struct kiocb *iocb)
+{
+ struct kiocb_priv *priv = iocb->private;
+ ssize_t status = priv->actual;
+
+ /* we "retry" to get the right mm context for this: */
+ status = copy_to_user(priv->ubuf, priv->buf, priv->actual);
+ if (unlikely(0 != status))
+ status = -EFAULT;
+ else
+ status = priv->actual;
+ kfree(priv->buf);
+ kfree(priv);
+ aio_put_req(iocb);
+ return status;
+}
+
+static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req)
+{
+ struct kiocb *iocb = req->context;
+ struct kiocb_priv *priv = iocb->private;
+ struct ep_data *epdata = priv->epdata;
+
+ /* lock against disconnect (and ideally, cancel) */
+ spin_lock(&epdata->dev->lock);
+ priv->req = NULL;
+ priv->epdata = NULL;
+ if (NULL == iocb->ki_retry
+ || unlikely(0 == req->actual)
+ || unlikely(kiocbIsCancelled(iocb))) {
+ kfree(req->buf);
+ kfree(priv);
+ iocb->private = NULL;
+ /* aio_complete() reports bytes-transferred _and_ faults */
+ if (unlikely(kiocbIsCancelled(iocb)))
+ aio_put_req(iocb);
+ else
+ aio_complete(iocb,
+ req->actual ? req->actual : req->status,
+ req->status);
+ } else {
+ /* retry() won't report both; so we hide some faults */
+ if (unlikely(0 != req->status))
+ DBG(epdata->dev, "%s fault %d len %d\n",
+ ep->name, req->status, req->actual);
+
+ priv->buf = req->buf;
+ priv->actual = req->actual;
+ kick_iocb(iocb);
+ }
+ spin_unlock(&epdata->dev->lock);
+
+ usb_ep_free_request(ep, req);
+ put_ep(epdata);
+}
+
+static ssize_t
+ep_aio_rwtail(
+ struct kiocb *iocb,
+ char *buf,
+ size_t len,
+ struct ep_data *epdata,
+ char __user *ubuf
+)
+{
+ struct kiocb_priv *priv = (void *) &iocb->private;
+ struct usb_request *req;
+ ssize_t value;
+
+ priv = kmalloc(sizeof *priv, GFP_KERNEL);
+ if (!priv) {
+ value = -ENOMEM;
+fail:
+ kfree(buf);
+ return value;
+ }
+ iocb->private = priv;
+ priv->ubuf = ubuf;
+
+ value = get_ready_ep(iocb->ki_filp->f_flags, epdata);
+ if (unlikely(value < 0)) {
+ kfree(priv);
+ goto fail;
+ }
+
+ iocb->ki_cancel = ep_aio_cancel;
+ get_ep(epdata);
+ priv->epdata = epdata;
+ priv->actual = 0;
+
+ /* each kiocb is coupled to one usb_request, but we can't
+ * allocate or submit those if the host disconnected.
+ */
+ spin_lock_irq(&epdata->dev->lock);
+ if (likely(epdata->ep)) {
+ req = usb_ep_alloc_request(epdata->ep, GFP_ATOMIC);
+ if (likely(req)) {
+ priv->req = req;
+ req->buf = buf;
+ req->length = len;
+ req->complete = ep_aio_complete;
+ req->context = iocb;
+ value = usb_ep_queue(epdata->ep, req, GFP_ATOMIC);
+ if (unlikely(0 != value))
+ usb_ep_free_request(epdata->ep, req);
+ } else
+ value = -EAGAIN;
+ } else
+ value = -ENODEV;
+ spin_unlock_irq(&epdata->dev->lock);
+
+ up(&epdata->lock);
+
+ if (unlikely(value)) {
+ kfree(priv);
+ put_ep(epdata);
+ } else
+ value = -EIOCBQUEUED;
+ return value;
+}
+
+static ssize_t
+ep_aio_read(struct kiocb *iocb, char __user *ubuf, size_t len, loff_t o)
+{
+ struct ep_data *epdata = iocb->ki_filp->private_data;
+ char *buf;
+
+ if (unlikely(epdata->desc.bEndpointAddress & USB_DIR_IN))
+ return -EINVAL;
+ buf = kmalloc(len, GFP_KERNEL);
+ if (unlikely(!buf))
+ return -ENOMEM;
+ iocb->ki_retry = ep_aio_read_retry;
+ return ep_aio_rwtail(iocb, buf, len, epdata, ubuf);
+}
+
+static ssize_t
+ep_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t len, loff_t o)
+{
+ struct ep_data *epdata = iocb->ki_filp->private_data;
+ char *buf;
+
+ if (unlikely(!(epdata->desc.bEndpointAddress & USB_DIR_IN)))
+ return -EINVAL;
+ buf = kmalloc(len, GFP_KERNEL);
+ if (unlikely(!buf))
+ return -ENOMEM;
+ if (unlikely(copy_from_user(buf, ubuf, len) != 0)) {
+ kfree(buf);
+ return -EFAULT;
+ }
+ return ep_aio_rwtail(iocb, buf, len, epdata, NULL);
+}
+
+/*----------------------------------------------------------------------*/
+
+/* used after endpoint configuration */
+static struct file_operations ep_io_operations = {
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+
+ .read = ep_read,
+ .write = ep_write,
+ .ioctl = ep_ioctl,
+ .release = ep_release,
+
+ .aio_read = ep_aio_read,
+ .aio_write = ep_aio_write,
+};
+
+/* ENDPOINT INITIALIZATION
+ *
+ * fd = open ("/dev/gadget/$ENDPOINT", O_RDWR)
+ * status = write (fd, descriptors, sizeof descriptors)
+ *
+ * That write establishes the endpoint configuration, configuring
+ * the controller to process bulk, interrupt, or isochronous transfers
+ * at the right maxpacket size, and so on.
+ *
+ * The descriptors are message type 1, identified by a host order u32
+ * at the beginning of what's written. Descriptor order is: full/low
+ * speed descriptor, then optional high speed descriptor.
+ */
+static ssize_t
+ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
+{
+ struct ep_data *data = fd->private_data;
+ struct usb_ep *ep;
+ u32 tag;
+ int value;
+
+ if ((value = down_interruptible (&data->lock)) < 0)
+ return value;
+
+ if (data->state != STATE_EP_READY) {
+ value = -EL2HLT;
+ goto fail;
+ }
+
+ value = len;
+ if (len < USB_DT_ENDPOINT_SIZE + 4)
+ goto fail0;
+
+ /* we might need to change message format someday */
+ if (copy_from_user (&tag, buf, 4)) {
+ goto fail1;
+ }
+ if (tag != 1) {
+ DBG(data->dev, "config %s, bad tag %d\n", data->name, tag);
+ goto fail0;
+ }
+ buf += 4;
+ len -= 4;
+
+ /* NOTE: audio endpoint extensions not accepted here;
+ * just don't include the extra bytes.
+ */
+
+ /* full/low speed descriptor, then high speed */
+ if (copy_from_user (&data->desc, buf, USB_DT_ENDPOINT_SIZE)) {
+ goto fail1;
+ }
+ if (data->desc.bLength != USB_DT_ENDPOINT_SIZE
+ || data->desc.bDescriptorType != USB_DT_ENDPOINT)
+ goto fail0;
+ if (len != USB_DT_ENDPOINT_SIZE) {
+ if (len != 2 * USB_DT_ENDPOINT_SIZE)
+ goto fail0;
+ if (copy_from_user (&data->hs_desc, buf + USB_DT_ENDPOINT_SIZE,
+ USB_DT_ENDPOINT_SIZE)) {
+ goto fail1;
+ }
+ if (data->hs_desc.bLength != USB_DT_ENDPOINT_SIZE
+ || data->hs_desc.bDescriptorType
+ != USB_DT_ENDPOINT) {
+ DBG(data->dev, "config %s, bad hs length or type\n",
+ data->name);
+ goto fail0;
+ }
+ }
+ value = len;
+
+ spin_lock_irq (&data->dev->lock);
+ if (data->dev->state == STATE_DEV_UNBOUND) {
+ value = -ENOENT;
+ goto gone;
+ } else if ((ep = data->ep) == NULL) {
+ value = -ENODEV;
+ goto gone;
+ }
+ switch (data->dev->gadget->speed) {
+ case USB_SPEED_LOW:
+ case USB_SPEED_FULL:
+ value = usb_ep_enable (ep, &data->desc);
+ if (value == 0)
+ data->state = STATE_EP_ENABLED;
+ break;
+#ifdef HIGHSPEED
+ case USB_SPEED_HIGH:
+ /* fails if caller didn't provide that descriptor... */
+ value = usb_ep_enable (ep, &data->hs_desc);
+ if (value == 0)
+ data->state = STATE_EP_ENABLED;
+ break;
+#endif
+ default:
+ DBG (data->dev, "unconnected, %s init deferred\n",
+ data->name);
+ data->state = STATE_EP_DEFER_ENABLE;
+ }
+ if (value == 0)
+ fd->f_op = &ep_io_operations;
+gone:
+ spin_unlock_irq (&data->dev->lock);
+ if (value < 0) {
+fail:
+ data->desc.bDescriptorType = 0;
+ data->hs_desc.bDescriptorType = 0;
+ }
+ up (&data->lock);
+ return value;
+fail0:
+ value = -EINVAL;
+ goto fail;
+fail1:
+ value = -EFAULT;
+ goto fail;
+}
+
+static int
+ep_open (struct inode *inode, struct file *fd)
+{
+ struct ep_data *data = inode->u.generic_ip;
+ int value = -EBUSY;
+
+ if (down_interruptible (&data->lock) != 0)
+ return -EINTR;
+ spin_lock_irq (&data->dev->lock);
+ if (data->dev->state == STATE_DEV_UNBOUND)
+ value = -ENOENT;
+ else if (data->state == STATE_EP_DISABLED) {
+ value = 0;
+ data->state = STATE_EP_READY;
+ get_ep (data);
+ fd->private_data = data;
+ VDEBUG (data->dev, "%s ready\n", data->name);
+ } else
+ DBG (data->dev, "%s state %d\n",
+ data->name, data->state);
+ spin_unlock_irq (&data->dev->lock);
+ up (&data->lock);
+ return value;
+}
+
+/* used before endpoint configuration */
+static struct file_operations ep_config_operations = {
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+
+ .open = ep_open,
+ .write = ep_config,
+ .release = ep_release,
+};
+
+/*----------------------------------------------------------------------*/
+
+/* EP0 IMPLEMENTATION can be partly in userspace.
+ *
+ * Drivers that use this facility receive various events, including
+ * control requests the kernel doesn't handle. Drivers that don't
+ * use this facility may be too simple-minded for real applications.
+ */
+
+static inline void ep0_readable (struct dev_data *dev)
+{
+ wake_up (&dev->wait);
+ kill_fasync (&dev->fasync, SIGIO, POLL_IN);
+}
+
+static void clean_req (struct usb_ep *ep, struct usb_request *req)
+{
+ struct dev_data *dev = ep->driver_data;
+
+ if (req->buf != dev->rbuf) {
+ usb_ep_free_buffer (ep, req->buf, req->dma, req->length);
+ req->buf = dev->rbuf;
+ req->dma = DMA_ADDR_INVALID;
+ }
+ req->complete = epio_complete;
+ dev->setup_out_ready = 0;
+}
+
+static void ep0_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ struct dev_data *dev = ep->driver_data;
+ int free = 1;
+
+ /* for control OUT, data must still get to userspace */
+ if (!dev->setup_in) {
+ dev->setup_out_error = (req->status != 0);
+ if (!dev->setup_out_error)
+ free = 0;
+ dev->setup_out_ready = 1;
+ ep0_readable (dev);
+ } else if (dev->state == STATE_SETUP)
+ dev->state = STATE_CONNECTED;
+
+ /* clean up as appropriate */
+ if (free && req->buf != &dev->rbuf)
+ clean_req (ep, req);
+ req->complete = epio_complete;
+}
+
+static int setup_req (struct usb_ep *ep, struct usb_request *req, u16 len)
+{
+ struct dev_data *dev = ep->driver_data;
+
+ if (dev->setup_out_ready) {
+ DBG (dev, "ep0 request busy!\n");
+ return -EBUSY;
+ }
+ if (len > sizeof (dev->rbuf))
+ req->buf = usb_ep_alloc_buffer (ep, len, &req->dma, GFP_ATOMIC);
+ if (req->buf == 0) {
+ req->buf = dev->rbuf;
+ return -ENOMEM;
+ }
+ req->complete = ep0_complete;
+ req->length = len;
+ return 0;
+}
+
+static ssize_t
+ep0_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
+{
+ struct dev_data *dev = fd->private_data;
+ ssize_t retval;
+ enum ep0_state state;
+
+ spin_lock_irq (&dev->lock);
+
+ /* report fd mode change before acting on it */
+ if (dev->setup_abort) {
+ dev->setup_abort = 0;
+ retval = -EIDRM;
+ goto done;
+ }
+
+ /* control DATA stage */
+ if ((state = dev->state) == STATE_SETUP) {
+
+ if (dev->setup_in) { /* stall IN */
+ VDEBUG(dev, "ep0in stall\n");
+ (void) usb_ep_set_halt (dev->gadget->ep0);
+ retval = -EL2HLT;
+ dev->state = STATE_CONNECTED;
+
+ } else if (len == 0) { /* ack SET_CONFIGURATION etc */
+ struct usb_ep *ep = dev->gadget->ep0;
+ struct usb_request *req = dev->req;
+
+ if ((retval = setup_req (ep, req, 0)) == 0)
+ retval = usb_ep_queue (ep, req, GFP_ATOMIC);
+ dev->state = STATE_CONNECTED;
+
+ /* assume that was SET_CONFIGURATION */
+ if (dev->current_config) {
+ unsigned power;
+#ifdef HIGHSPEED
+ if (dev->gadget->speed == USB_SPEED_HIGH)
+ power = dev->hs_config->bMaxPower;
+ else
+#endif
+ power = dev->config->bMaxPower;
+ usb_gadget_vbus_draw(dev->gadget, 2 * power);
+ }
+
+ } else { /* collect OUT data */
+ if ((fd->f_flags & O_NONBLOCK) != 0
+ && !dev->setup_out_ready) {
+ retval = -EAGAIN;
+ goto done;
+ }
+ spin_unlock_irq (&dev->lock);
+ retval = wait_event_interruptible (dev->wait,
+ dev->setup_out_ready != 0);
+
+ /* FIXME state could change from under us */
+ spin_lock_irq (&dev->lock);
+ if (retval)
+ goto done;
+ if (dev->setup_out_error)
+ retval = -EIO;
+ else {
+ len = min (len, (size_t)dev->req->actual);
+// FIXME don't call this with the spinlock held ...
+ if (copy_to_user (buf, &dev->req->buf, len))
+ retval = -EFAULT;
+ clean_req (dev->gadget->ep0, dev->req);
+ /* NOTE userspace can't yet choose to stall */
+ }
+ }
+ goto done;
+ }
+
+ /* else normal: return event data */
+ if (len < sizeof dev->event [0]) {
+ retval = -EINVAL;
+ goto done;
+ }
+ len -= len % sizeof (struct usb_gadgetfs_event);
+ dev->usermode_setup = 1;
+
+scan:
+ /* return queued events right away */
+ if (dev->ev_next != 0) {
+ unsigned i, n;
+ int tmp = dev->ev_next;
+
+ len = min (len, tmp * sizeof (struct usb_gadgetfs_event));
+ n = len / sizeof (struct usb_gadgetfs_event);
+
+ /* ep0 can't deliver events when STATE_SETUP */
+ for (i = 0; i < n; i++) {
+ if (dev->event [i].type == GADGETFS_SETUP) {
+ len = n = i + 1;
+ len *= sizeof (struct usb_gadgetfs_event);
+ n = 0;
+ break;
+ }
+ }
+ spin_unlock_irq (&dev->lock);
+ if (copy_to_user (buf, &dev->event, len))
+ retval = -EFAULT;
+ else
+ retval = len;
+ if (len > 0) {
+ len /= sizeof (struct usb_gadgetfs_event);
+
+ /* NOTE this doesn't guard against broken drivers;
+ * concurrent ep0 readers may lose events.
+ */
+ spin_lock_irq (&dev->lock);
+ dev->ev_next -= len;
+ if (dev->ev_next != 0)
+ memmove (&dev->event, &dev->event [len],
+ sizeof (struct usb_gadgetfs_event)
+ * (tmp - len));
+ if (n == 0)
+ dev->state = STATE_SETUP;
+ spin_unlock_irq (&dev->lock);
+ }
+ return retval;
+ }
+ if (fd->f_flags & O_NONBLOCK) {
+ retval = -EAGAIN;
+ goto done;
+ }
+
+ switch (state) {
+ default:
+ DBG (dev, "fail %s, state %d\n", __FUNCTION__, state);
+ retval = -ESRCH;
+ break;
+ case STATE_UNCONNECTED:
+ case STATE_CONNECTED:
+ spin_unlock_irq (&dev->lock);
+ DBG (dev, "%s wait\n", __FUNCTION__);
+
+ /* wait for events */
+ retval = wait_event_interruptible (dev->wait,
+ dev->ev_next != 0);
+ if (retval < 0)
+ return retval;
+ spin_lock_irq (&dev->lock);
+ goto scan;
+ }
+
+done:
+ spin_unlock_irq (&dev->lock);
+ return retval;
+}
+
+static struct usb_gadgetfs_event *
+next_event (struct dev_data *dev, enum usb_gadgetfs_event_type type)
+{
+ struct usb_gadgetfs_event *event;
+ unsigned i;
+
+ switch (type) {
+ /* these events purge the queue */
+ case GADGETFS_DISCONNECT:
+ if (dev->state == STATE_SETUP)
+ dev->setup_abort = 1;
+ // FALL THROUGH
+ case GADGETFS_CONNECT:
+ dev->ev_next = 0;
+ break;
+ case GADGETFS_SETUP: /* previous request timed out */
+ case GADGETFS_SUSPEND: /* same effect */
+ /* these events can't be repeated */
+ for (i = 0; i != dev->ev_next; i++) {
+ if (dev->event [i].type != type)
+ continue;
+ DBG (dev, "discard old event %d\n", type);
+ dev->ev_next--;
+ if (i == dev->ev_next)
+ break;
+ /* indices start at zero, for simplicity */
+ memmove (&dev->event [i], &dev->event [i + 1],
+ sizeof (struct usb_gadgetfs_event)
+ * (dev->ev_next - i));
+ }
+ break;
+ default:
+ BUG ();
+ }
+ event = &dev->event [dev->ev_next++];
+ BUG_ON (dev->ev_next > N_EVENT);
+ VDEBUG (dev, "ev %d, next %d\n", type, dev->ev_next);
+ memset (event, 0, sizeof *event);
+ event->type = type;
+ return event;
+}
+
+static ssize_t
+ep0_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
+{
+ struct dev_data *dev = fd->private_data;
+ ssize_t retval = -ESRCH;
+
+ spin_lock_irq (&dev->lock);
+
+ /* report fd mode change before acting on it */
+ if (dev->setup_abort) {
+ dev->setup_abort = 0;
+ retval = -EIDRM;
+
+ /* data and/or status stage for control request */
+ } else if (dev->state == STATE_SETUP) {
+
+ /* IN DATA+STATUS caller makes len <= wLength */
+ if (dev->setup_in) {
+ retval = setup_req (dev->gadget->ep0, dev->req, len);
+ if (retval == 0) {
+ spin_unlock_irq (&dev->lock);
+ if (copy_from_user (dev->req->buf, buf, len))
+ retval = -EFAULT;
+ else
+ retval = usb_ep_queue (
+ dev->gadget->ep0, dev->req,
+ GFP_KERNEL);
+ if (retval < 0) {
+ spin_lock_irq (&dev->lock);
+ clean_req (dev->gadget->ep0, dev->req);
+ spin_unlock_irq (&dev->lock);
+ } else
+ retval = len;
+
+ return retval;
+ }
+
+ /* can stall some OUT transfers */
+ } else if (dev->setup_can_stall) {
+ VDEBUG(dev, "ep0out stall\n");
+ (void) usb_ep_set_halt (dev->gadget->ep0);
+ retval = -EL2HLT;
+ dev->state = STATE_CONNECTED;
+ } else {
+ DBG(dev, "bogus ep0out stall!\n");
+ }
+ } else
+ DBG (dev, "fail %s, state %d\n", __FUNCTION__, dev->state);
+
+ spin_unlock_irq (&dev->lock);
+ return retval;
+}
+
+static int
+ep0_fasync (int f, struct file *fd, int on)
+{
+ struct dev_data *dev = fd->private_data;
+ // caller must F_SETOWN before signal delivery happens
+ VDEBUG (dev, "%s %s\n", __FUNCTION__, on ? "on" : "off");
+ return fasync_helper (f, fd, on, &dev->fasync);
+}
+
+static struct usb_gadget_driver gadgetfs_driver;
+
+static int
+dev_release (struct inode *inode, struct file *fd)
+{
+ struct dev_data *dev = fd->private_data;
+
+ /* closing ep0 === shutdown all */
+
+ usb_gadget_unregister_driver (&gadgetfs_driver);
+
+ /* at this point "good" hardware has disconnected the
+ * device from USB; the host won't see it any more.
+ * alternatively, all host requests will time out.
+ */
+
+ fasync_helper (-1, fd, 0, &dev->fasync);
+ kfree (dev->buf);
+ dev->buf = NULL;
+ put_dev (dev);
+
+ /* other endpoints were all decoupled from this device */
+ dev->state = STATE_DEV_DISABLED;
+ return 0;
+}
+
+static int dev_ioctl (struct inode *inode, struct file *fd,
+ unsigned code, unsigned long value)
+{
+ struct dev_data *dev = fd->private_data;
+ struct usb_gadget *gadget = dev->gadget;
+
+ if (gadget->ops->ioctl)
+ return gadget->ops->ioctl (gadget, code, value);
+ return -ENOTTY;
+}
+
+/* used after device configuration */
+static struct file_operations ep0_io_operations = {
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+
+ .read = ep0_read,
+ .write = ep0_write,
+ .fasync = ep0_fasync,
+ // .poll = ep0_poll,
+ .ioctl = dev_ioctl,
+ .release = dev_release,
+};
+
+/*----------------------------------------------------------------------*/
+
+/* The in-kernel gadget driver handles most ep0 issues, in particular
+ * enumerating the single configuration (as provided from user space).
+ *
+ * Unrecognized ep0 requests may be handled in user space.
+ */
+
+#ifdef HIGHSPEED
+static void make_qualifier (struct dev_data *dev)
+{
+ struct usb_qualifier_descriptor qual;
+ struct usb_device_descriptor *desc;
+
+ qual.bLength = sizeof qual;
+ qual.bDescriptorType = USB_DT_DEVICE_QUALIFIER;
+ qual.bcdUSB = __constant_cpu_to_le16 (0x0200);
+
+ desc = dev->dev;
+ qual.bDeviceClass = desc->bDeviceClass;
+ qual.bDeviceSubClass = desc->bDeviceSubClass;
+ qual.bDeviceProtocol = desc->bDeviceProtocol;
+
+ /* assumes ep0 uses the same value for both speeds ... */
+ qual.bMaxPacketSize0 = desc->bMaxPacketSize0;
+
+ qual.bNumConfigurations = 1;
+ qual.bRESERVED = 0;
+
+ memcpy (dev->rbuf, &qual, sizeof qual);
+}
+#endif
+
+static int
+config_buf (struct dev_data *dev, u8 type, unsigned index)
+{
+ int len;
+#ifdef HIGHSPEED
+ int hs;
+#endif
+
+ /* only one configuration */
+ if (index > 0)
+ return -EINVAL;
+
+#ifdef HIGHSPEED
+ hs = (dev->gadget->speed == USB_SPEED_HIGH);
+ if (type == USB_DT_OTHER_SPEED_CONFIG)
+ hs = !hs;
+ if (hs) {
+ dev->req->buf = dev->hs_config;
+ len = le16_to_cpup (&dev->hs_config->wTotalLength);
+ } else
+#endif
+ {
+ dev->req->buf = dev->config;
+ len = le16_to_cpup (&dev->config->wTotalLength);
+ }
+ ((u8 *)dev->req->buf) [1] = type;
+ return len;
+}
+
+static int
+gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
+{
+ struct dev_data *dev = get_gadget_data (gadget);
+ struct usb_request *req = dev->req;
+ int value = -EOPNOTSUPP;
+ struct usb_gadgetfs_event *event;
+ u16 w_value = ctrl->wValue;
+ u16 w_length = ctrl->wLength;
+
+ spin_lock (&dev->lock);
+ dev->setup_abort = 0;
+ if (dev->state == STATE_UNCONNECTED) {
+ struct usb_ep *ep;
+ struct ep_data *data;
+
+ dev->state = STATE_CONNECTED;
+ dev->dev->bMaxPacketSize0 = gadget->ep0->maxpacket;
+
+#ifdef HIGHSPEED
+ if (gadget->speed == USB_SPEED_HIGH && dev->hs_config == 0) {
+ ERROR (dev, "no high speed config??\n");
+ return -EINVAL;
+ }
+#endif /* HIGHSPEED */
+
+ INFO (dev, "connected\n");
+ event = next_event (dev, GADGETFS_CONNECT);
+ event->u.speed = gadget->speed;
+ ep0_readable (dev);
+
+ list_for_each_entry (ep, &gadget->ep_list, ep_list) {
+ data = ep->driver_data;
+ /* ... down_trylock (&data->lock) ... */
+ if (data->state != STATE_EP_DEFER_ENABLE)
+ continue;
+#ifdef HIGHSPEED
+ if (gadget->speed == USB_SPEED_HIGH)
+ value = usb_ep_enable (ep, &data->hs_desc);
+ else
+#endif /* HIGHSPEED */
+ value = usb_ep_enable (ep, &data->desc);
+ if (value) {
+ ERROR (dev, "deferred %s enable --> %d\n",
+ data->name, value);
+ continue;
+ }
+ data->state = STATE_EP_ENABLED;
+ wake_up (&data->wait);
+ DBG (dev, "woke up %s waiters\n", data->name);
+ }
+
+ /* host may have given up waiting for response. we can miss control
+ * requests handled lower down (device/endpoint status and features);
+ * then ep0_{read,write} will report the wrong status. controller
+ * driver will have aborted pending i/o.
+ */
+ } else if (dev->state == STATE_SETUP)
+ dev->setup_abort = 1;
+
+ req->buf = dev->rbuf;
+ req->dma = DMA_ADDR_INVALID;
+ req->context = NULL;
+ value = -EOPNOTSUPP;
+ switch (ctrl->bRequest) {
+
+ case USB_REQ_GET_DESCRIPTOR:
+ if (ctrl->bRequestType != USB_DIR_IN)
+ goto unrecognized;
+ switch (w_value >> 8) {
+
+ case USB_DT_DEVICE:
+ value = min (w_length, (u16) sizeof *dev->dev);
+ req->buf = dev->dev;
+ break;
+#ifdef HIGHSPEED
+ case USB_DT_DEVICE_QUALIFIER:
+ if (!dev->hs_config)
+ break;
+ value = min (w_length, (u16)
+ sizeof (struct usb_qualifier_descriptor));
+ make_qualifier (dev);
+ break;
+ case USB_DT_OTHER_SPEED_CONFIG:
+ // FALLTHROUGH
+#endif
+ case USB_DT_CONFIG:
+ value = config_buf (dev,
+ w_value >> 8,
+ w_value & 0xff);
+ if (value >= 0)
+ value = min (w_length, (u16) value);
+ break;
+ case USB_DT_STRING:
+ goto unrecognized;
+
+ default: // all others are errors
+ break;
+ }
+ break;
+
+ /* currently one config, two speeds */
+ case USB_REQ_SET_CONFIGURATION:
+ if (ctrl->bRequestType != 0)
+ break;
+ if (0 == (u8) w_value) {
+ value = 0;
+ dev->current_config = 0;
+ usb_gadget_vbus_draw(gadget, 8 /* mA */ );
+ // user mode expected to disable endpoints
+ } else {
+ u8 config, power;
+#ifdef HIGHSPEED
+ if (gadget->speed == USB_SPEED_HIGH) {
+ config = dev->hs_config->bConfigurationValue;
+ power = dev->hs_config->bMaxPower;
+ } else
+#endif
+ {
+ config = dev->config->bConfigurationValue;
+ power = dev->config->bMaxPower;
+ }
+
+ if (config == (u8) w_value) {
+ value = 0;
+ dev->current_config = config;
+ usb_gadget_vbus_draw(gadget, 2 * power);
+ }
+ }
+
+ /* report SET_CONFIGURATION like any other control request,
+ * except that usermode may not stall this. the next
+ * request mustn't be allowed start until this finishes:
+ * endpoints and threads set up, etc.
+ *
+ * NOTE: older PXA hardware (before PXA 255: without UDCCFR)
+ * has bad/racey automagic that prevents synchronizing here.
+ * even kernel mode drivers often miss them.
+ */
+ if (value == 0) {
+ INFO (dev, "configuration #%d\n", dev->current_config);
+ if (dev->usermode_setup) {
+ dev->setup_can_stall = 0;
+ goto delegate;
+ }
+ }
+ break;
+
+#ifndef CONFIG_USB_GADGETFS_PXA2XX
+ /* PXA automagically handles this request too */
+ case USB_REQ_GET_CONFIGURATION:
+ if (ctrl->bRequestType != 0x80)
+ break;
+ *(u8 *)req->buf = dev->current_config;
+ value = min (w_length, (u16) 1);
+ break;
+#endif
+
+ default:
+unrecognized:
+ VDEBUG (dev, "%s req%02x.%02x v%04x i%04x l%d\n",
+ dev->usermode_setup ? "delegate" : "fail",
+ ctrl->bRequestType, ctrl->bRequest,
+ w_value, le16_to_cpu(ctrl->wIndex), w_length);
+
+ /* if there's an ep0 reader, don't stall */
+ if (dev->usermode_setup) {
+ dev->setup_can_stall = 1;
+delegate:
+ dev->setup_in = (ctrl->bRequestType & USB_DIR_IN)
+ ? 1 : 0;
+ dev->setup_out_ready = 0;
+ dev->setup_out_error = 0;
+ value = 0;
+
+ /* read DATA stage for OUT right away */
+ if (unlikely (!dev->setup_in && w_length)) {
+ value = setup_req (gadget->ep0, dev->req,
+ w_length);
+ if (value < 0)
+ break;
+ value = usb_ep_queue (gadget->ep0, dev->req,
+ GFP_ATOMIC);
+ if (value < 0) {
+ clean_req (gadget->ep0, dev->req);
+ break;
+ }
+
+ /* we can't currently stall these */
+ dev->setup_can_stall = 0;
+ }
+
+ /* state changes when reader collects event */
+ event = next_event (dev, GADGETFS_SETUP);
+ event->u.setup = *ctrl;
+ ep0_readable (dev);
+ spin_unlock (&dev->lock);
+ return 0;
+ }
+ }
+
+ /* proceed with data transfer and status phases? */
+ if (value >= 0 && dev->state != STATE_SETUP) {
+ req->length = value;
+ req->zero = value < w_length;
+ value = usb_ep_queue (gadget->ep0, req, GFP_ATOMIC);
+ if (value < 0) {
+ DBG (dev, "ep_queue --> %d\n", value);
+ req->status = 0;
+ }
+ }
+
+ /* device stalls when value < 0 */
+ spin_unlock (&dev->lock);
+ return value;
+}
+
+static void destroy_ep_files (struct dev_data *dev)
+{
+ struct list_head *entry, *tmp;
+
+ DBG (dev, "%s %d\n", __FUNCTION__, dev->state);
+
+ /* dev->state must prevent interference */
+restart:
+ spin_lock_irq (&dev->lock);
+ list_for_each_safe (entry, tmp, &dev->epfiles) {
+ struct ep_data *ep;
+ struct inode *parent;
+ struct dentry *dentry;
+
+ /* break link to FS */
+ ep = list_entry (entry, struct ep_data, epfiles);
+ list_del_init (&ep->epfiles);
+ dentry = ep->dentry;
+ ep->dentry = NULL;
+ parent = dentry->d_parent->d_inode;
+
+ /* break link to controller */
+ if (ep->state == STATE_EP_ENABLED)
+ (void) usb_ep_disable (ep->ep);
+ ep->state = STATE_EP_UNBOUND;
+ usb_ep_free_request (ep->ep, ep->req);
+ ep->ep = NULL;
+ wake_up (&ep->wait);
+ put_ep (ep);
+
+ spin_unlock_irq (&dev->lock);
+
+ /* break link to dcache */
+ down (&parent->i_sem);
+ d_delete (dentry);
+ dput (dentry);
+ up (&parent->i_sem);
+
+ /* fds may still be open */
+ goto restart;
+ }
+ spin_unlock_irq (&dev->lock);
+}
+
+
+static struct inode *
+gadgetfs_create_file (struct super_block *sb, char const *name,
+ void *data, struct file_operations *fops,
+ struct dentry **dentry_p);
+
+static int activate_ep_files (struct dev_data *dev)
+{
+ struct usb_ep *ep;
+
+ gadget_for_each_ep (ep, dev->gadget) {
+ struct ep_data *data;
+
+ data = kmalloc (sizeof *data, GFP_KERNEL);
+ if (!data)
+ goto enomem;
+ memset (data, 0, sizeof data);
+ data->state = STATE_EP_DISABLED;
+ init_MUTEX (&data->lock);
+ init_waitqueue_head (&data->wait);
+
+ strncpy (data->name, ep->name, sizeof (data->name) - 1);
+ atomic_set (&data->count, 1);
+ data->dev = dev;
+ get_dev (dev);
+
+ data->ep = ep;
+ ep->driver_data = data;
+
+ data->req = usb_ep_alloc_request (ep, GFP_KERNEL);
+ if (!data->req)
+ goto enomem;
+
+ data->inode = gadgetfs_create_file (dev->sb, data->name,
+ data, &ep_config_operations,
+ &data->dentry);
+ if (!data->inode) {
+ kfree (data);
+ goto enomem;
+ }
+ list_add_tail (&data->epfiles, &dev->epfiles);
+ }
+ return 0;
+
+enomem:
+ DBG (dev, "%s enomem\n", __FUNCTION__);
+ destroy_ep_files (dev);
+ return -ENOMEM;
+}
+
+static void
+gadgetfs_unbind (struct usb_gadget *gadget)
+{
+ struct dev_data *dev = get_gadget_data (gadget);
+
+ DBG (dev, "%s\n", __FUNCTION__);
+
+ spin_lock_irq (&dev->lock);
+ dev->state = STATE_DEV_UNBOUND;
+ spin_unlock_irq (&dev->lock);
+
+ destroy_ep_files (dev);
+ gadget->ep0->driver_data = NULL;
+ set_gadget_data (gadget, NULL);
+
+ /* we've already been disconnected ... no i/o is active */
+ if (dev->req)
+ usb_ep_free_request (gadget->ep0, dev->req);
+ DBG (dev, "%s done\n", __FUNCTION__);
+ put_dev (dev);
+}
+
+static struct dev_data *the_device;
+
+static int
+gadgetfs_bind (struct usb_gadget *gadget)
+{
+ struct dev_data *dev = the_device;
+
+ if (!dev)
+ return -ESRCH;
+ if (0 != strcmp (CHIP, gadget->name)) {
+ printk (KERN_ERR "%s expected %s controller not %s\n",
+ shortname, CHIP, gadget->name);
+ return -ENODEV;
+ }
+
+ set_gadget_data (gadget, dev);
+ dev->gadget = gadget;
+ gadget->ep0->driver_data = dev;
+ dev->dev->bMaxPacketSize0 = gadget->ep0->maxpacket;
+
+ /* preallocate control response and buffer */
+ dev->req = usb_ep_alloc_request (gadget->ep0, GFP_KERNEL);
+ if (!dev->req)
+ goto enomem;
+ dev->req->context = NULL;
+ dev->req->complete = epio_complete;
+
+ if (activate_ep_files (dev) < 0)
+ goto enomem;
+
+ INFO (dev, "bound to %s driver\n", gadget->name);
+ dev->state = STATE_UNCONNECTED;
+ get_dev (dev);
+ return 0;
+
+enomem:
+ gadgetfs_unbind (gadget);
+ return -ENOMEM;
+}
+
+static void
+gadgetfs_disconnect (struct usb_gadget *gadget)
+{
+ struct dev_data *dev = get_gadget_data (gadget);
+
+ if (dev->state == STATE_UNCONNECTED) {
+ DBG (dev, "already unconnected\n");
+ return;
+ }
+ dev->state = STATE_UNCONNECTED;
+
+ INFO (dev, "disconnected\n");
+ spin_lock (&dev->lock);
+ next_event (dev, GADGETFS_DISCONNECT);
+ ep0_readable (dev);
+ spin_unlock (&dev->lock);
+}
+
+static void
+gadgetfs_suspend (struct usb_gadget *gadget)
+{
+ struct dev_data *dev = get_gadget_data (gadget);
+
+ INFO (dev, "suspended from state %d\n", dev->state);
+ spin_lock (&dev->lock);
+ switch (dev->state) {
+ case STATE_SETUP: // VERY odd... host died??
+ case STATE_CONNECTED:
+ case STATE_UNCONNECTED:
+ next_event (dev, GADGETFS_SUSPEND);
+ ep0_readable (dev);
+ /* FALLTHROUGH */
+ default:
+ break;
+ }
+ spin_unlock (&dev->lock);
+}
+
+static struct usb_gadget_driver gadgetfs_driver = {
+#ifdef HIGHSPEED
+ .speed = USB_SPEED_HIGH,
+#else
+ .speed = USB_SPEED_FULL,
+#endif
+ .function = (char *) driver_desc,
+ .bind = gadgetfs_bind,
+ .unbind = gadgetfs_unbind,
+ .setup = gadgetfs_setup,
+ .disconnect = gadgetfs_disconnect,
+ .suspend = gadgetfs_suspend,
+
+ .driver = {
+ .name = (char *) shortname,
+ // .shutdown = ...
+ // .suspend = ...
+ // .resume = ...
+ },
+};
+
+/*----------------------------------------------------------------------*/
+
+static void gadgetfs_nop(struct usb_gadget *arg) { }
+
+static int gadgetfs_probe (struct usb_gadget *gadget)
+{
+ CHIP = gadget->name;
+ return -EISNAM;
+}
+
+static struct usb_gadget_driver probe_driver = {
+ .speed = USB_SPEED_HIGH,
+ .bind = gadgetfs_probe,
+ .unbind = gadgetfs_nop,
+ .setup = (void *)gadgetfs_nop,
+ .disconnect = gadgetfs_nop,
+ .driver = {
+ .name = "nop",
+ },
+};
+
+
+/* DEVICE INITIALIZATION
+ *
+ * fd = open ("/dev/gadget/$CHIP", O_RDWR)
+ * status = write (fd, descriptors, sizeof descriptors)
+ *
+ * That write establishes the device configuration, so the kernel can
+ * bind to the controller ... guaranteeing it can handle enumeration
+ * at all necessary speeds. Descriptor order is:
+ *
+ * . message tag (u32, host order) ... for now, must be zero; it
+ * would change to support features like multi-config devices
+ * . full/low speed config ... all wTotalLength bytes (with interface,
+ * class, altsetting, endpoint, and other descriptors)
+ * . high speed config ... all descriptors, for high speed operation;
+ * this one's optional except for high-speed hardware
+ * . device descriptor
+ *
+ * Endpoints are not yet enabled. Drivers may want to immediately
+ * initialize them, using the /dev/gadget/ep* files that are available
+ * as soon as the kernel sees the configuration, or they can wait
+ * until device configuration and interface altsetting changes create
+ * the need to configure (or unconfigure) them.
+ *
+ * After initialization, the device stays active for as long as that
+ * $CHIP file is open. Events may then be read from that descriptor,
+ * such configuration notifications. More complex drivers will handle
+ * some control requests in user space.
+ */
+
+static int is_valid_config (struct usb_config_descriptor *config)
+{
+ return config->bDescriptorType == USB_DT_CONFIG
+ && config->bLength == USB_DT_CONFIG_SIZE
+ && config->bConfigurationValue != 0
+ && (config->bmAttributes & USB_CONFIG_ATT_ONE) != 0
+ && (config->bmAttributes & USB_CONFIG_ATT_WAKEUP) == 0;
+ /* FIXME if gadget->is_otg, _must_ include an otg descriptor */
+ /* FIXME check lengths: walk to end */
+}
+
+static ssize_t
+dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
+{
+ struct dev_data *dev = fd->private_data;
+ ssize_t value = len, length = len;
+ unsigned total;
+ u32 tag;
+ char *kbuf;
+
+ if (dev->state != STATE_OPENED)
+ return -EEXIST;
+
+ if (len < (USB_DT_CONFIG_SIZE + USB_DT_DEVICE_SIZE + 4))
+ return -EINVAL;
+
+ /* we might need to change message format someday */
+ if (copy_from_user (&tag, buf, 4))
+ return -EFAULT;
+ if (tag != 0)
+ return -EINVAL;
+ buf += 4;
+ length -= 4;
+
+ kbuf = kmalloc (length, SLAB_KERNEL);
+ if (!kbuf)
+ return -ENOMEM;
+ if (copy_from_user (kbuf, buf, length)) {
+ kfree (kbuf);
+ return -EFAULT;
+ }
+
+ spin_lock_irq (&dev->lock);
+ value = -EINVAL;
+ if (dev->buf)
+ goto fail;
+ dev->buf = kbuf;
+
+ /* full or low speed config */
+ dev->config = (void *) kbuf;
+ total = le16_to_cpup (&dev->config->wTotalLength);
+ if (!is_valid_config (dev->config) || total >= length)
+ goto fail;
+ kbuf += total;
+ length -= total;
+
+ /* optional high speed config */
+ if (kbuf [1] == USB_DT_CONFIG) {
+ dev->hs_config = (void *) kbuf;
+ total = le16_to_cpup (&dev->hs_config->wTotalLength);
+ if (!is_valid_config (dev->hs_config) || total >= length)
+ goto fail;
+ kbuf += total;
+ length -= total;
+ }
+
+ /* could support multiple configs, using another encoding! */
+
+ /* device descriptor (tweaked for paranoia) */
+ if (length != USB_DT_DEVICE_SIZE)
+ goto fail;
+ dev->dev = (void *)kbuf;
+ if (dev->dev->bLength != USB_DT_DEVICE_SIZE
+ || dev->dev->bDescriptorType != USB_DT_DEVICE
+ || dev->dev->bNumConfigurations != 1)
+ goto fail;
+ dev->dev->bNumConfigurations = 1;
+ dev->dev->bcdUSB = __constant_cpu_to_le16 (0x0200);
+
+ /* triggers gadgetfs_bind(); then we can enumerate. */
+ spin_unlock_irq (&dev->lock);
+ value = usb_gadget_register_driver (&gadgetfs_driver);
+ if (value != 0) {
+ kfree (dev->buf);
+ dev->buf = NULL;
+ } else {
+ /* at this point "good" hardware has for the first time
+ * let the USB the host see us. alternatively, if users
+ * unplug/replug that will clear all the error state.
+ *
+ * note: everything running before here was guaranteed
+ * to choke driver model style diagnostics. from here
+ * on, they can work ... except in cleanup paths that
+ * kick in after the ep0 descriptor is closed.
+ */
+ fd->f_op = &ep0_io_operations;
+ value = len;
+ }
+ return value;
+
+fail:
+ spin_unlock_irq (&dev->lock);
+ pr_debug ("%s: %s fail %Zd, %p\n", shortname, __FUNCTION__, value, dev);
+ kfree (dev->buf);
+ dev->buf = NULL;
+ return value;
+}
+
+static int
+dev_open (struct inode *inode, struct file *fd)
+{
+ struct dev_data *dev = inode->u.generic_ip;
+ int value = -EBUSY;
+
+ if (dev->state == STATE_DEV_DISABLED) {
+ dev->ev_next = 0;
+ dev->state = STATE_OPENED;
+ fd->private_data = dev;
+ get_dev (dev);
+ value = 0;
+ }
+ return value;
+}
+
+static struct file_operations dev_init_operations = {
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+
+ .open = dev_open,
+ .write = dev_config,
+ .fasync = ep0_fasync,
+ .ioctl = dev_ioctl,
+ .release = dev_release,
+};
+
+/*----------------------------------------------------------------------*/
+
+/* FILESYSTEM AND SUPERBLOCK OPERATIONS
+ *
+ * Mounting the filesystem creates a controller file, used first for
+ * device configuration then later for event monitoring.
+ */
+
+
+/* FIXME PAM etc could set this security policy without mount options
+ * if epfiles inherited ownership and permissons from ep0 ...
+ */
+
+static unsigned default_uid;
+static unsigned default_gid;
+static unsigned default_perm = S_IRUSR | S_IWUSR;
+
+module_param (default_uid, uint, 0644);
+module_param (default_gid, uint, 0644);
+module_param (default_perm, uint, 0644);
+
+
+static struct inode *
+gadgetfs_make_inode (struct super_block *sb,
+ void *data, struct file_operations *fops,
+ int mode)
+{
+ struct inode *inode = new_inode (sb);
+
+ if (inode) {
+ inode->i_mode = mode;
+ inode->i_uid = default_uid;
+ inode->i_gid = default_gid;
+ inode->i_blksize = PAGE_CACHE_SIZE;
+ inode->i_blocks = 0;
+ inode->i_atime = inode->i_mtime = inode->i_ctime
+ = CURRENT_TIME;
+ inode->u.generic_ip = data;
+ inode->i_fop = fops;
+ }
+ return inode;
+}
+
+/* creates in fs root directory, so non-renamable and non-linkable.
+ * so inode and dentry are paired, until device reconfig.
+ */
+static struct inode *
+gadgetfs_create_file (struct super_block *sb, char const *name,
+ void *data, struct file_operations *fops,
+ struct dentry **dentry_p)
+{
+ struct dentry *dentry;
+ struct inode *inode;
+
+ dentry = d_alloc_name(sb->s_root, name);
+ if (!dentry)
+ return NULL;
+
+ inode = gadgetfs_make_inode (sb, data, fops,
+ S_IFREG | (default_perm & S_IRWXUGO));
+ if (!inode) {
+ dput(dentry);
+ return NULL;
+ }
+ d_add (dentry, inode);
+ *dentry_p = dentry;
+ return inode;
+}
+
+static struct super_operations gadget_fs_operations = {
+ .statfs = simple_statfs,
+ .drop_inode = generic_delete_inode,
+};
+
+static int
+gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
+{
+ struct inode *inode;
+ struct dentry *d;
+ struct dev_data *dev;
+
+ if (the_device)
+ return -ESRCH;
+
+ /* fake probe to determine $CHIP */
+ (void) usb_gadget_register_driver (&probe_driver);
+ if (!CHIP)
+ return -ENODEV;
+
+ /* superblock */
+ sb->s_blocksize = PAGE_CACHE_SIZE;
+ sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
+ sb->s_magic = GADGETFS_MAGIC;
+ sb->s_op = &gadget_fs_operations;
+ sb->s_time_gran = 1;
+
+ /* root inode */
+ inode = gadgetfs_make_inode (sb,
+ NULL, &simple_dir_operations,
+ S_IFDIR | S_IRUGO | S_IXUGO);
+ if (!inode)
+ return -ENOMEM;
+ inode->i_op = &simple_dir_inode_operations;
+ if (!(d = d_alloc_root (inode))) {
+ iput (inode);
+ return -ENOMEM;
+ }
+ sb->s_root = d;
+
+ /* the ep0 file is named after the controller we expect;
+ * user mode code can use it for sanity checks, like we do.
+ */
+ dev = dev_new ();
+ if (!dev)
+ return -ENOMEM;
+
+ dev->sb = sb;
+ if (!(inode = gadgetfs_create_file (sb, CHIP,
+ dev, &dev_init_operations,
+ &dev->dentry))) {
+ put_dev(dev);
+ return -ENOMEM;
+ }
+
+ /* other endpoint files are available after hardware setup,
+ * from binding to a controller.
+ */
+ the_device = dev;
+ return 0;
+}
+
+/* "mount -t gadgetfs path /dev/gadget" ends up here */
+static struct super_block *
+gadgetfs_get_sb (struct file_system_type *t, int flags,
+ const char *path, void *opts)
+{
+ return get_sb_single (t, flags, opts, gadgetfs_fill_super);
+}
+
+static void
+gadgetfs_kill_sb (struct super_block *sb)
+{
+ kill_litter_super (sb);
+ if (the_device) {
+ put_dev (the_device);
+ the_device = NULL;
+ }
+}
+
+/*----------------------------------------------------------------------*/
+
+static struct file_system_type gadgetfs_type = {
+ .owner = THIS_MODULE,
+ .name = shortname,
+ .get_sb = gadgetfs_get_sb,
+ .kill_sb = gadgetfs_kill_sb,
+};
+
+/*----------------------------------------------------------------------*/
+
+static int __init init (void)
+{
+ int status;
+
+ status = register_filesystem (&gadgetfs_type);
+ if (status == 0)
+ pr_info ("%s: %s, version " DRIVER_VERSION "\n",
+ shortname, driver_desc);
+ return status;
+}
+module_init (init);
+
+static void __exit cleanup (void)
+{
+ pr_debug ("unregister %s\n", shortname);
+ unregister_filesystem (&gadgetfs_type);
+}
+module_exit (cleanup);
+
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c
new file mode 100644
index 000000000000..0def9f70e889
--- /dev/null
+++ b/drivers/usb/gadget/lh7a40x_udc.c
@@ -0,0 +1,2167 @@
+/*
+ * linux/drivers/usb/gadget/lh7a40x_udc.c
+ * Sharp LH7A40x on-chip full speed USB device controllers
+ *
+ * Copyright (C) 2004 Mikko Lahteenmaki, Nordic ID
+ * Copyright (C) 2004 Bo Henriksen, Nordic ID
+ *
+ * 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 "lh7a40x_udc.h"
+
+//#define DEBUG printk
+//#define DEBUG_EP0 printk
+//#define DEBUG_SETUP printk
+
+#ifndef DEBUG_EP0
+# define DEBUG_EP0(fmt,args...)
+#endif
+#ifndef DEBUG_SETUP
+# define DEBUG_SETUP(fmt,args...)
+#endif
+#ifndef DEBUG
+# define NO_STATES
+# define DEBUG(fmt,args...)
+#endif
+
+#define DRIVER_DESC "LH7A40x USB Device Controller"
+#define DRIVER_VERSION __DATE__
+
+#ifndef _BIT /* FIXME - what happended to _BIT in 2.6.7bk18? */
+#define _BIT(x) (1<<(x))
+#endif
+
+struct lh7a40x_udc *the_controller;
+
+static const char driver_name[] = "lh7a40x_udc";
+static const char driver_desc[] = DRIVER_DESC;
+static const char ep0name[] = "ep0-control";
+
+/*
+ Local definintions.
+*/
+
+#ifndef NO_STATES
+static char *state_names[] = {
+ "WAIT_FOR_SETUP",
+ "DATA_STATE_XMIT",
+ "DATA_STATE_NEED_ZLP",
+ "WAIT_FOR_OUT_STATUS",
+ "DATA_STATE_RECV"
+};
+#endif
+
+/*
+ Local declarations.
+*/
+static int lh7a40x_ep_enable(struct usb_ep *ep,
+ const struct usb_endpoint_descriptor *);
+static int lh7a40x_ep_disable(struct usb_ep *ep);
+static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, int);
+static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *);
+static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned, dma_addr_t *,
+ int);
+static void lh7a40x_free_buffer(struct usb_ep *ep, void *, dma_addr_t,
+ unsigned);
+static int lh7a40x_queue(struct usb_ep *ep, struct usb_request *, int);
+static int lh7a40x_dequeue(struct usb_ep *ep, struct usb_request *);
+static int lh7a40x_set_halt(struct usb_ep *ep, int);
+static int lh7a40x_fifo_status(struct usb_ep *ep);
+static int lh7a40x_fifo_status(struct usb_ep *ep);
+static void lh7a40x_fifo_flush(struct usb_ep *ep);
+static void lh7a40x_ep0_kick(struct lh7a40x_udc *dev, struct lh7a40x_ep *ep);
+static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr);
+
+static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req,
+ int status);
+static void pio_irq_enable(int bEndpointAddress);
+static void pio_irq_disable(int bEndpointAddress);
+static void stop_activity(struct lh7a40x_udc *dev,
+ struct usb_gadget_driver *driver);
+static void flush(struct lh7a40x_ep *ep);
+static void udc_enable(struct lh7a40x_udc *dev);
+static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address);
+
+static struct usb_ep_ops lh7a40x_ep_ops = {
+ .enable = lh7a40x_ep_enable,
+ .disable = lh7a40x_ep_disable,
+
+ .alloc_request = lh7a40x_alloc_request,
+ .free_request = lh7a40x_free_request,
+
+ .alloc_buffer = lh7a40x_alloc_buffer,
+ .free_buffer = lh7a40x_free_buffer,
+
+ .queue = lh7a40x_queue,
+ .dequeue = lh7a40x_dequeue,
+
+ .set_halt = lh7a40x_set_halt,
+ .fifo_status = lh7a40x_fifo_status,
+ .fifo_flush = lh7a40x_fifo_flush,
+};
+
+/* Inline code */
+
+static __inline__ int write_packet(struct lh7a40x_ep *ep,
+ struct lh7a40x_request *req, int max)
+{
+ u8 *buf;
+ int length, count;
+ volatile u32 *fifo = (volatile u32 *)ep->fifo;
+
+ buf = req->req.buf + req->req.actual;
+ prefetch(buf);
+
+ length = req->req.length - req->req.actual;
+ length = min(length, max);
+ req->req.actual += length;
+
+ DEBUG("Write %d (max %d), fifo %p\n", length, max, fifo);
+
+ count = length;
+ while (count--) {
+ *fifo = *buf++;
+ }
+
+ return length;
+}
+
+static __inline__ void usb_set_index(u32 ep)
+{
+ *(volatile u32 *)io_p2v(USB_INDEX) = ep;
+}
+
+static __inline__ u32 usb_read(u32 port)
+{
+ return *(volatile u32 *)io_p2v(port);
+}
+
+static __inline__ void usb_write(u32 val, u32 port)
+{
+ *(volatile u32 *)io_p2v(port) = val;
+}
+
+static __inline__ void usb_set(u32 val, u32 port)
+{
+ volatile u32 *ioport = (volatile u32 *)io_p2v(port);
+ u32 after = (*ioport) | val;
+ *ioport = after;
+}
+
+static __inline__ void usb_clear(u32 val, u32 port)
+{
+ volatile u32 *ioport = (volatile u32 *)io_p2v(port);
+ u32 after = (*ioport) & ~val;
+ *ioport = after;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#define GPIO_PORTC_DR (0x80000E08)
+#define GPIO_PORTC_DDR (0x80000E18)
+#define GPIO_PORTC_PDR (0x80000E70)
+
+/* get port C pin data register */
+#define get_portc_pdr(bit) ((usb_read(GPIO_PORTC_PDR) & _BIT(bit)) != 0)
+/* get port C data direction register */
+#define get_portc_ddr(bit) ((usb_read(GPIO_PORTC_DDR) & _BIT(bit)) != 0)
+/* set port C data register */
+#define set_portc_dr(bit, val) (val ? usb_set(_BIT(bit), GPIO_PORTC_DR) : usb_clear(_BIT(bit), GPIO_PORTC_DR))
+/* set port C data direction register */
+#define set_portc_ddr(bit, val) (val ? usb_set(_BIT(bit), GPIO_PORTC_DDR) : usb_clear(_BIT(bit), GPIO_PORTC_DDR))
+
+/*
+ * LPD7A404 GPIO's:
+ * Port C bit 1 = USB Port 1 Power Enable
+ * Port C bit 2 = USB Port 1 Data Carrier Detect
+ */
+#define is_usb_connected() get_portc_pdr(2)
+
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+
+static const char proc_node_name[] = "driver/udc";
+
+static int
+udc_proc_read(char *page, char **start, off_t off, int count,
+ int *eof, void *_dev)
+{
+ char *buf = page;
+ struct lh7a40x_udc *dev = _dev;
+ char *next = buf;
+ unsigned size = count;
+ unsigned long flags;
+ int t;
+
+ if (off != 0)
+ return 0;
+
+ local_irq_save(flags);
+
+ /* basic device status */
+ t = scnprintf(next, size,
+ DRIVER_DESC "\n"
+ "%s version: %s\n"
+ "Gadget driver: %s\n"
+ "Host: %s\n\n",
+ driver_name, DRIVER_VERSION,
+ dev->driver ? dev->driver->driver.name : "(none)",
+ is_usb_connected()? "full speed" : "disconnected");
+ size -= t;
+ next += t;
+
+ t = scnprintf(next, size,
+ "GPIO:\n"
+ " Port C bit 1: %d, dir %d\n"
+ " Port C bit 2: %d, dir %d\n\n",
+ get_portc_pdr(1), get_portc_ddr(1),
+ get_portc_pdr(2), get_portc_ddr(2)
+ );
+ size -= t;
+ next += t;
+
+ t = scnprintf(next, size,
+ "DCP pullup: %d\n\n",
+ (usb_read(USB_PM) & PM_USB_DCP) != 0);
+ size -= t;
+ next += t;
+
+ local_irq_restore(flags);
+ *eof = 1;
+ return count - size;
+}
+
+#define create_proc_files() create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev)
+#define remove_proc_files() remove_proc_entry(proc_node_name, NULL)
+
+#else /* !CONFIG_USB_GADGET_DEBUG_FILES */
+
+#define create_proc_files() do {} while (0)
+#define remove_proc_files() do {} while (0)
+
+#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+/*
+ * udc_disable - disable USB device controller
+ */
+static void udc_disable(struct lh7a40x_udc *dev)
+{
+ DEBUG("%s, %p\n", __FUNCTION__, dev);
+
+ udc_set_address(dev, 0);
+
+ /* Disable interrupts */
+ usb_write(0, USB_IN_INT_EN);
+ usb_write(0, USB_OUT_INT_EN);
+ usb_write(0, USB_INT_EN);
+
+ /* Disable the USB */
+ usb_write(0, USB_PM);
+
+#ifdef CONFIG_ARCH_LH7A404
+ /* Disable USB power */
+ set_portc_dr(1, 0);
+#endif
+
+ /* if hardware supports it, disconnect from usb */
+ /* make_usb_disappear(); */
+
+ dev->ep0state = WAIT_FOR_SETUP;
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+ dev->usb_address = 0;
+}
+
+/*
+ * udc_reinit - initialize software state
+ */
+static void udc_reinit(struct lh7a40x_udc *dev)
+{
+ u32 i;
+
+ DEBUG("%s, %p\n", __FUNCTION__, dev);
+
+ /* device/ep0 records init */
+ INIT_LIST_HEAD(&dev->gadget.ep_list);
+ INIT_LIST_HEAD(&dev->gadget.ep0->ep_list);
+ dev->ep0state = WAIT_FOR_SETUP;
+
+ /* basic endpoint records init */
+ for (i = 0; i < UDC_MAX_ENDPOINTS; i++) {
+ struct lh7a40x_ep *ep = &dev->ep[i];
+
+ if (i != 0)
+ list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list);
+
+ ep->desc = 0;
+ ep->stopped = 0;
+ INIT_LIST_HEAD(&ep->queue);
+ ep->pio_irqs = 0;
+ }
+
+ /* the rest was statically initialized, and is read-only */
+}
+
+#define BYTES2MAXP(x) (x / 8)
+#define MAXP2BYTES(x) (x * 8)
+
+/* until it's enabled, this UDC should be completely invisible
+ * to any USB host.
+ */
+static void udc_enable(struct lh7a40x_udc *dev)
+{
+ int ep;
+
+ DEBUG("%s, %p\n", __FUNCTION__, dev);
+
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+
+#ifdef CONFIG_ARCH_LH7A404
+ /* Set Port C bit 1 & 2 as output */
+ set_portc_ddr(1, 1);
+ set_portc_ddr(2, 1);
+
+ /* Enable USB power */
+ set_portc_dr(1, 0);
+#endif
+
+ /*
+ * C.f Chapter 18.1.3.1 Initializing the USB
+ */
+
+ /* Disable the USB */
+ usb_clear(PM_USB_ENABLE, USB_PM);
+
+ /* Reset APB & I/O sides of the USB */
+ usb_set(USB_RESET_APB | USB_RESET_IO, USB_RESET);
+ mdelay(5);
+ usb_clear(USB_RESET_APB | USB_RESET_IO, USB_RESET);
+
+ /* Set MAXP values for each */
+ for (ep = 0; ep < UDC_MAX_ENDPOINTS; ep++) {
+ struct lh7a40x_ep *ep_reg = &dev->ep[ep];
+ u32 csr;
+
+ usb_set_index(ep);
+
+ switch (ep_reg->ep_type) {
+ case ep_bulk_in:
+ case ep_interrupt:
+ usb_clear(USB_IN_CSR2_USB_DMA_EN | USB_IN_CSR2_AUTO_SET,
+ ep_reg->csr2);
+ /* Fall through */
+ case ep_control:
+ usb_write(BYTES2MAXP(ep_maxpacket(ep_reg)),
+ USB_IN_MAXP);
+ break;
+ case ep_bulk_out:
+ usb_clear(USB_OUT_CSR2_USB_DMA_EN |
+ USB_OUT_CSR2_AUTO_CLR, ep_reg->csr2);
+ usb_write(BYTES2MAXP(ep_maxpacket(ep_reg)),
+ USB_OUT_MAXP);
+ break;
+ }
+
+ /* Read & Write CSR1, just in case */
+ csr = usb_read(ep_reg->csr1);
+ usb_write(csr, ep_reg->csr1);
+
+ flush(ep_reg);
+ }
+
+ /* Disable interrupts */
+ usb_write(0, USB_IN_INT_EN);
+ usb_write(0, USB_OUT_INT_EN);
+ usb_write(0, USB_INT_EN);
+
+ /* Enable interrupts */
+ usb_set(USB_IN_INT_EP0, USB_IN_INT_EN);
+ usb_set(USB_INT_RESET_INT | USB_INT_RESUME_INT, USB_INT_EN);
+ /* Dont enable rest of the interrupts */
+ /* usb_set(USB_IN_INT_EP3 | USB_IN_INT_EP1 | USB_IN_INT_EP0, USB_IN_INT_EN);
+ usb_set(USB_OUT_INT_EP2, USB_OUT_INT_EN); */
+
+ /* Enable SUSPEND */
+ usb_set(PM_ENABLE_SUSPEND, USB_PM);
+
+ /* Enable the USB */
+ usb_set(PM_USB_ENABLE, USB_PM);
+
+#ifdef CONFIG_ARCH_LH7A404
+ /* NOTE: DOES NOT WORK! */
+ /* Let host detect UDC:
+ * Software must write a 0 to the PMR:DCP_CTRL bit to turn this
+ * transistor on and pull the USBDP pin HIGH.
+ */
+ /* usb_clear(PM_USB_DCP, USB_PM);
+ usb_set(PM_USB_DCP, USB_PM); */
+#endif
+}
+
+/*
+ Register entry point for the peripheral controller driver.
+*/
+int usb_gadget_register_driver(struct usb_gadget_driver *driver)
+{
+ struct lh7a40x_udc *dev = the_controller;
+ int retval;
+
+ DEBUG("%s: %s\n", __FUNCTION__, driver->driver.name);
+
+ if (!driver
+ || driver->speed != USB_SPEED_FULL
+ || !driver->bind
+ || !driver->unbind || !driver->disconnect || !driver->setup)
+ return -EINVAL;
+ if (!dev)
+ return -ENODEV;
+ if (dev->driver)
+ return -EBUSY;
+
+ /* first hook up the driver ... */
+ dev->driver = driver;
+ dev->gadget.dev.driver = &driver->driver;
+
+ device_add(&dev->gadget.dev);
+ retval = driver->bind(&dev->gadget);
+ if (retval) {
+ printk("%s: bind to driver %s --> error %d\n", dev->gadget.name,
+ driver->driver.name, retval);
+ device_del(&dev->gadget.dev);
+
+ dev->driver = 0;
+ dev->gadget.dev.driver = 0;
+ return retval;
+ }
+
+ /* ... then enable host detection and ep0; and we're ready
+ * for set_configuration as well as eventual disconnect.
+ * NOTE: this shouldn't power up until later.
+ */
+ printk("%s: registered gadget driver '%s'\n", dev->gadget.name,
+ driver->driver.name);
+
+ udc_enable(dev);
+
+ return 0;
+}
+
+EXPORT_SYMBOL(usb_gadget_register_driver);
+
+/*
+ Unregister entry point for the peripheral controller driver.
+*/
+int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
+{
+ struct lh7a40x_udc *dev = the_controller;
+ unsigned long flags;
+
+ if (!dev)
+ return -ENODEV;
+ if (!driver || driver != dev->driver)
+ return -EINVAL;
+
+ spin_lock_irqsave(&dev->lock, flags);
+ dev->driver = 0;
+ stop_activity(dev, driver);
+ spin_unlock_irqrestore(&dev->lock, flags);
+
+ driver->unbind(&dev->gadget);
+ device_del(&dev->gadget.dev);
+
+ udc_disable(dev);
+
+ DEBUG("unregistered gadget driver '%s'\n", driver->driver.name);
+ return 0;
+}
+
+EXPORT_SYMBOL(usb_gadget_unregister_driver);
+
+/*-------------------------------------------------------------------------*/
+
+/** Write request to FIFO (max write == maxp size)
+ * Return: 0 = still running, 1 = completed, negative = errno
+ * NOTE: INDEX register must be set for EP
+ */
+static int write_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
+{
+ u32 max;
+ u32 csr;
+
+ max = le16_to_cpu(ep->desc->wMaxPacketSize);
+
+ csr = usb_read(ep->csr1);
+ DEBUG("CSR: %x %d\n", csr, csr & USB_IN_CSR1_FIFO_NOT_EMPTY);
+
+ if (!(csr & USB_IN_CSR1_FIFO_NOT_EMPTY)) {
+ unsigned count;
+ int is_last, is_short;
+
+ count = write_packet(ep, req, max);
+ usb_set(USB_IN_CSR1_IN_PKT_RDY, ep->csr1);
+
+ /* last packet is usually short (or a zlp) */
+ if (unlikely(count != max))
+ is_last = is_short = 1;
+ else {
+ if (likely(req->req.length != req->req.actual)
+ || req->req.zero)
+ is_last = 0;
+ else
+ is_last = 1;
+ /* interrupt/iso maxpacket may not fill the fifo */
+ is_short = unlikely(max < ep_maxpacket(ep));
+ }
+
+ DEBUG("%s: wrote %s %d bytes%s%s %d left %p\n", __FUNCTION__,
+ ep->ep.name, count,
+ is_last ? "/L" : "", is_short ? "/S" : "",
+ req->req.length - req->req.actual, req);
+
+ /* requests complete when all IN data is in the FIFO */
+ if (is_last) {
+ done(ep, req, 0);
+ if (list_empty(&ep->queue)) {
+ pio_irq_disable(ep_index(ep));
+ }
+ return 1;
+ }
+ } else {
+ DEBUG("Hmm.. %d ep FIFO is not empty!\n", ep_index(ep));
+ }
+
+ return 0;
+}
+
+/** Read to request from FIFO (max read == bytes in fifo)
+ * Return: 0 = still running, 1 = completed, negative = errno
+ * NOTE: INDEX register must be set for EP
+ */
+static int read_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
+{
+ u32 csr;
+ u8 *buf;
+ unsigned bufferspace, count, is_short;
+ volatile u32 *fifo = (volatile u32 *)ep->fifo;
+
+ /* make sure there's a packet in the FIFO. */
+ csr = usb_read(ep->csr1);
+ if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) {
+ DEBUG("%s: Packet NOT ready!\n", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ buf = req->req.buf + req->req.actual;
+ prefetchw(buf);
+ bufferspace = req->req.length - req->req.actual;
+
+ /* read all bytes from this packet */
+ count = usb_read(USB_OUT_FIFO_WC1);
+ req->req.actual += min(count, bufferspace);
+
+ is_short = (count < ep->ep.maxpacket);
+ DEBUG("read %s %02x, %d bytes%s req %p %d/%d\n",
+ ep->ep.name, csr, count,
+ is_short ? "/S" : "", req, req->req.actual, req->req.length);
+
+ while (likely(count-- != 0)) {
+ u8 byte = (u8) (*fifo & 0xff);
+
+ if (unlikely(bufferspace == 0)) {
+ /* this happens when the driver's buffer
+ * is smaller than what the host sent.
+ * discard the extra data.
+ */
+ if (req->req.status != -EOVERFLOW)
+ printk("%s overflow %d\n", ep->ep.name, count);
+ req->req.status = -EOVERFLOW;
+ } else {
+ *buf++ = byte;
+ bufferspace--;
+ }
+ }
+
+ usb_clear(USB_OUT_CSR1_OUT_PKT_RDY, ep->csr1);
+
+ /* completion */
+ if (is_short || req->req.actual == req->req.length) {
+ done(ep, req, 0);
+ usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1);
+
+ if (list_empty(&ep->queue))
+ pio_irq_disable(ep_index(ep));
+ return 1;
+ }
+
+ /* finished that packet. the next one may be waiting... */
+ return 0;
+}
+
+/*
+ * done - retire a request; caller blocked irqs
+ * INDEX register is preserved to keep same
+ */
+static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req, int status)
+{
+ unsigned int stopped = ep->stopped;
+ u32 index;
+
+ DEBUG("%s, %p\n", __FUNCTION__, ep);
+ list_del_init(&req->queue);
+
+ if (likely(req->req.status == -EINPROGRESS))
+ req->req.status = status;
+ else
+ status = req->req.status;
+
+ if (status && status != -ESHUTDOWN)
+ DEBUG("complete %s req %p stat %d len %u/%u\n",
+ ep->ep.name, &req->req, status,
+ req->req.actual, req->req.length);
+
+ /* don't modify queue heads during completion callback */
+ ep->stopped = 1;
+ /* Read current index (completion may modify it) */
+ index = usb_read(USB_INDEX);
+
+ spin_unlock(&ep->dev->lock);
+ req->req.complete(&ep->ep, &req->req);
+ spin_lock(&ep->dev->lock);
+
+ /* Restore index */
+ usb_set_index(index);
+ ep->stopped = stopped;
+}
+
+/** Enable EP interrupt */
+static void pio_irq_enable(int ep)
+{
+ DEBUG("%s: %d\n", __FUNCTION__, ep);
+
+ switch (ep) {
+ case 1:
+ usb_set(USB_IN_INT_EP1, USB_IN_INT_EN);
+ break;
+ case 2:
+ usb_set(USB_OUT_INT_EP2, USB_OUT_INT_EN);
+ break;
+ case 3:
+ usb_set(USB_IN_INT_EP3, USB_IN_INT_EN);
+ break;
+ default:
+ DEBUG("Unknown endpoint: %d\n", ep);
+ break;
+ }
+}
+
+/** Disable EP interrupt */
+static void pio_irq_disable(int ep)
+{
+ DEBUG("%s: %d\n", __FUNCTION__, ep);
+
+ switch (ep) {
+ case 1:
+ usb_clear(USB_IN_INT_EP1, USB_IN_INT_EN);
+ break;
+ case 2:
+ usb_clear(USB_OUT_INT_EP2, USB_OUT_INT_EN);
+ break;
+ case 3:
+ usb_clear(USB_IN_INT_EP3, USB_IN_INT_EN);
+ break;
+ default:
+ DEBUG("Unknown endpoint: %d\n", ep);
+ break;
+ }
+}
+
+/*
+ * nuke - dequeue ALL requests
+ */
+void nuke(struct lh7a40x_ep *ep, int status)
+{
+ struct lh7a40x_request *req;
+
+ DEBUG("%s, %p\n", __FUNCTION__, ep);
+
+ /* Flush FIFO */
+ flush(ep);
+
+ /* called with irqs blocked */
+ while (!list_empty(&ep->queue)) {
+ req = list_entry(ep->queue.next, struct lh7a40x_request, queue);
+ done(ep, req, status);
+ }
+
+ /* Disable IRQ if EP is enabled (has decriptor) */
+ if (ep->desc)
+ pio_irq_disable(ep_index(ep));
+}
+
+/*
+void nuke_all(struct lh7a40x_udc *dev)
+{
+ int n;
+ for(n=0; n<UDC_MAX_ENDPOINTS; n++) {
+ struct lh7a40x_ep *ep = &dev->ep[n];
+ usb_set_index(n);
+ nuke(ep, 0);
+ }
+}*/
+
+/*
+static void flush_all(struct lh7a40x_udc *dev)
+{
+ int n;
+ for (n = 0; n < UDC_MAX_ENDPOINTS; n++)
+ {
+ struct lh7a40x_ep *ep = &dev->ep[n];
+ flush(ep);
+ }
+}
+*/
+
+/** Flush EP
+ * NOTE: INDEX register must be set before this call
+ */
+static void flush(struct lh7a40x_ep *ep)
+{
+ DEBUG("%s, %p\n", __FUNCTION__, ep);
+
+ switch (ep->ep_type) {
+ case ep_control:
+ /* check, by implication c.f. 15.1.2.11 */
+ break;
+
+ case ep_bulk_in:
+ case ep_interrupt:
+ /* if(csr & USB_IN_CSR1_IN_PKT_RDY) */
+ usb_set(USB_IN_CSR1_FIFO_FLUSH, ep->csr1);
+ break;
+
+ case ep_bulk_out:
+ /* if(csr & USB_OUT_CSR1_OUT_PKT_RDY) */
+ usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1);
+ break;
+ }
+}
+
+/**
+ * lh7a40x_in_epn - handle IN interrupt
+ */
+static void lh7a40x_in_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
+{
+ u32 csr;
+ struct lh7a40x_ep *ep = &dev->ep[ep_idx];
+ struct lh7a40x_request *req;
+
+ usb_set_index(ep_idx);
+
+ csr = usb_read(ep->csr1);
+ DEBUG("%s: %d, csr %x\n", __FUNCTION__, ep_idx, csr);
+
+ if (csr & USB_IN_CSR1_SENT_STALL) {
+ DEBUG("USB_IN_CSR1_SENT_STALL\n");
+ usb_set(USB_IN_CSR1_SENT_STALL /*|USB_IN_CSR1_SEND_STALL */ ,
+ ep->csr1);
+ return;
+ }
+
+ if (!ep->desc) {
+ DEBUG("%s: NO EP DESC\n", __FUNCTION__);
+ return;
+ }
+
+ if (list_empty(&ep->queue))
+ req = 0;
+ else
+ req = list_entry(ep->queue.next, struct lh7a40x_request, queue);
+
+ DEBUG("req: %p\n", req);
+
+ if (!req)
+ return;
+
+ write_fifo(ep, req);
+}
+
+/* ********************************************************************************************* */
+/* Bulk OUT (recv)
+ */
+
+static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
+{
+ struct lh7a40x_ep *ep = &dev->ep[ep_idx];
+ struct lh7a40x_request *req;
+
+ DEBUG("%s: %d\n", __FUNCTION__, ep_idx);
+
+ usb_set_index(ep_idx);
+
+ if (ep->desc) {
+ u32 csr;
+ csr = usb_read(ep->csr1);
+
+ while ((csr =
+ usb_read(ep->
+ csr1)) & (USB_OUT_CSR1_OUT_PKT_RDY |
+ USB_OUT_CSR1_SENT_STALL)) {
+ DEBUG("%s: %x\n", __FUNCTION__, csr);
+
+ if (csr & USB_OUT_CSR1_SENT_STALL) {
+ DEBUG("%s: stall sent, flush fifo\n",
+ __FUNCTION__);
+ /* usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); */
+ flush(ep);
+ } else if (csr & USB_OUT_CSR1_OUT_PKT_RDY) {
+ if (list_empty(&ep->queue))
+ req = 0;
+ else
+ req =
+ list_entry(ep->queue.next,
+ struct lh7a40x_request,
+ queue);
+
+ if (!req) {
+ printk("%s: NULL REQ %d\n",
+ __FUNCTION__, ep_idx);
+ flush(ep);
+ break;
+ } else {
+ read_fifo(ep, req);
+ }
+ }
+
+ }
+
+ } else {
+ /* Throw packet away.. */
+ printk("%s: No descriptor?!?\n", __FUNCTION__);
+ flush(ep);
+ }
+}
+
+static void stop_activity(struct lh7a40x_udc *dev,
+ struct usb_gadget_driver *driver)
+{
+ int i;
+
+ /* don't disconnect drivers more than once */
+ if (dev->gadget.speed == USB_SPEED_UNKNOWN)
+ driver = 0;
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+
+ /* prevent new request submissions, kill any outstanding requests */
+ for (i = 0; i < UDC_MAX_ENDPOINTS; i++) {
+ struct lh7a40x_ep *ep = &dev->ep[i];
+ ep->stopped = 1;
+
+ usb_set_index(i);
+ nuke(ep, -ESHUTDOWN);
+ }
+
+ /* report disconnect; the driver is already quiesced */
+ if (driver) {
+ spin_unlock(&dev->lock);
+ driver->disconnect(&dev->gadget);
+ spin_lock(&dev->lock);
+ }
+
+ /* re-init driver-visible data structures */
+ udc_reinit(dev);
+}
+
+/** Handle USB RESET interrupt
+ */
+static void lh7a40x_reset_intr(struct lh7a40x_udc *dev)
+{
+#if 0 /* def CONFIG_ARCH_LH7A404 */
+ /* Does not work always... */
+
+ DEBUG("%s: %d\n", __FUNCTION__, dev->usb_address);
+
+ if (!dev->usb_address) {
+ /*usb_set(USB_RESET_IO, USB_RESET);
+ mdelay(5);
+ usb_clear(USB_RESET_IO, USB_RESET); */
+ return;
+ }
+ /* Put the USB controller into reset. */
+ usb_set(USB_RESET_IO, USB_RESET);
+
+ /* Set Device ID to 0 */
+ udc_set_address(dev, 0);
+
+ /* Let PLL2 settle down */
+ mdelay(5);
+
+ /* Release the USB controller from reset */
+ usb_clear(USB_RESET_IO, USB_RESET);
+
+ /* Re-enable UDC */
+ udc_enable(dev);
+
+#endif
+ dev->gadget.speed = USB_SPEED_FULL;
+}
+
+/*
+ * lh7a40x usb client interrupt handler.
+ */
+static irqreturn_t lh7a40x_udc_irq(int irq, void *_dev, struct pt_regs *r)
+{
+ struct lh7a40x_udc *dev = _dev;
+
+ DEBUG("\n\n");
+
+ spin_lock(&dev->lock);
+
+ for (;;) {
+ u32 intr_in = usb_read(USB_IN_INT);
+ u32 intr_out = usb_read(USB_OUT_INT);
+ u32 intr_int = usb_read(USB_INT);
+
+ /* Test also against enable bits.. (lh7a40x errata).. Sigh.. */
+ u32 in_en = usb_read(USB_IN_INT_EN);
+ u32 out_en = usb_read(USB_OUT_INT_EN);
+
+ if (!intr_out && !intr_in && !intr_int)
+ break;
+
+ DEBUG("%s (on state %s)\n", __FUNCTION__,
+ state_names[dev->ep0state]);
+ DEBUG("intr_out = %x\n", intr_out);
+ DEBUG("intr_in = %x\n", intr_in);
+ DEBUG("intr_int = %x\n", intr_int);
+
+ if (intr_in) {
+ usb_write(intr_in, USB_IN_INT);
+
+ if ((intr_in & USB_IN_INT_EP1)
+ && (in_en & USB_IN_INT_EP1)) {
+ DEBUG("USB_IN_INT_EP1\n");
+ lh7a40x_in_epn(dev, 1, intr_in);
+ }
+ if ((intr_in & USB_IN_INT_EP3)
+ && (in_en & USB_IN_INT_EP3)) {
+ DEBUG("USB_IN_INT_EP3\n");
+ lh7a40x_in_epn(dev, 3, intr_in);
+ }
+ if (intr_in & USB_IN_INT_EP0) {
+ DEBUG("USB_IN_INT_EP0 (control)\n");
+ lh7a40x_handle_ep0(dev, intr_in);
+ }
+ }
+
+ if (intr_out) {
+ usb_write(intr_out, USB_OUT_INT);
+
+ if ((intr_out & USB_OUT_INT_EP2)
+ && (out_en & USB_OUT_INT_EP2)) {
+ DEBUG("USB_OUT_INT_EP2\n");
+ lh7a40x_out_epn(dev, 2, intr_out);
+ }
+ }
+
+ if (intr_int) {
+ usb_write(intr_int, USB_INT);
+
+ if (intr_int & USB_INT_RESET_INT) {
+ lh7a40x_reset_intr(dev);
+ }
+
+ if (intr_int & USB_INT_RESUME_INT) {
+ DEBUG("USB resume\n");
+
+ if (dev->gadget.speed != USB_SPEED_UNKNOWN
+ && dev->driver
+ && dev->driver->resume
+ && is_usb_connected()) {
+ dev->driver->resume(&dev->gadget);
+ }
+ }
+
+ if (intr_int & USB_INT_SUSPEND_INT) {
+ DEBUG("USB suspend%s\n",
+ is_usb_connected()? "" : "+disconnect");
+ if (!is_usb_connected()) {
+ stop_activity(dev, dev->driver);
+ } else if (dev->gadget.speed !=
+ USB_SPEED_UNKNOWN && dev->driver
+ && dev->driver->suspend) {
+ dev->driver->suspend(&dev->gadget);
+ }
+ }
+
+ }
+ }
+
+ spin_unlock(&dev->lock);
+
+ return IRQ_HANDLED;
+}
+
+static int lh7a40x_ep_enable(struct usb_ep *_ep,
+ const struct usb_endpoint_descriptor *desc)
+{
+ struct lh7a40x_ep *ep;
+ struct lh7a40x_udc *dev;
+ unsigned long flags;
+
+ DEBUG("%s, %p\n", __FUNCTION__, _ep);
+
+ ep = container_of(_ep, struct lh7a40x_ep, ep);
+ if (!_ep || !desc || ep->desc || _ep->name == ep0name
+ || desc->bDescriptorType != USB_DT_ENDPOINT
+ || ep->bEndpointAddress != desc->bEndpointAddress
+ || ep_maxpacket(ep) < le16_to_cpu(desc->wMaxPacketSize)) {
+ DEBUG("%s, bad ep or descriptor\n", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ /* xfer types must match, except that interrupt ~= bulk */
+ if (ep->bmAttributes != desc->bmAttributes
+ && ep->bmAttributes != USB_ENDPOINT_XFER_BULK
+ && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
+ DEBUG("%s, %s type mismatch\n", __FUNCTION__, _ep->name);
+ return -EINVAL;
+ }
+
+ /* hardware _could_ do smaller, but driver doesn't */
+ if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
+ && le16_to_cpu(desc->wMaxPacketSize) != ep_maxpacket(ep))
+ || !desc->wMaxPacketSize) {
+ DEBUG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name);
+ return -ERANGE;
+ }
+
+ dev = ep->dev;
+ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
+ DEBUG("%s, bogus device state\n", __FUNCTION__);
+ return -ESHUTDOWN;
+ }
+
+ spin_lock_irqsave(&ep->dev->lock, flags);
+
+ ep->stopped = 0;
+ ep->desc = desc;
+ ep->pio_irqs = 0;
+ ep->ep.maxpacket = le16_to_cpu(desc->wMaxPacketSize);
+
+ /* Reset halt state (does flush) */
+ lh7a40x_set_halt(_ep, 0);
+
+ spin_unlock_irqrestore(&ep->dev->lock, flags);
+
+ DEBUG("%s: enabled %s\n", __FUNCTION__, _ep->name);
+ return 0;
+}
+
+/** Disable EP
+ * NOTE: Sets INDEX register
+ */
+static int lh7a40x_ep_disable(struct usb_ep *_ep)
+{
+ struct lh7a40x_ep *ep;
+ unsigned long flags;
+
+ DEBUG("%s, %p\n", __FUNCTION__, _ep);
+
+ ep = container_of(_ep, struct lh7a40x_ep, ep);
+ if (!_ep || !ep->desc) {
+ DEBUG("%s, %s not enabled\n", __FUNCTION__,
+ _ep ? ep->ep.name : NULL);
+ return -EINVAL;
+ }
+
+ spin_lock_irqsave(&ep->dev->lock, flags);
+
+ usb_set_index(ep_index(ep));
+
+ /* Nuke all pending requests (does flush) */
+ nuke(ep, -ESHUTDOWN);
+
+ /* Disable ep IRQ */
+ pio_irq_disable(ep_index(ep));
+
+ ep->desc = 0;
+ ep->stopped = 1;
+
+ spin_unlock_irqrestore(&ep->dev->lock, flags);
+
+ DEBUG("%s: disabled %s\n", __FUNCTION__, _ep->name);
+ return 0;
+}
+
+static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep,
+ int gfp_flags)
+{
+ struct lh7a40x_request *req;
+
+ DEBUG("%s, %p\n", __FUNCTION__, ep);
+
+ req = kmalloc(sizeof *req, gfp_flags);
+ if (!req)
+ return 0;
+
+ memset(req, 0, sizeof *req);
+ INIT_LIST_HEAD(&req->queue);
+
+ return &req->req;
+}
+
+static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *_req)
+{
+ struct lh7a40x_request *req;
+
+ DEBUG("%s, %p\n", __FUNCTION__, ep);
+
+ req = container_of(_req, struct lh7a40x_request, req);
+ WARN_ON(!list_empty(&req->queue));
+ kfree(req);
+}
+
+static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned bytes,
+ dma_addr_t * dma, int gfp_flags)
+{
+ char *retval;
+
+ DEBUG("%s (%p, %d, %d)\n", __FUNCTION__, ep, bytes, gfp_flags);
+
+ retval = kmalloc(bytes, gfp_flags & ~(__GFP_DMA | __GFP_HIGHMEM));
+ if (retval)
+ *dma = virt_to_bus(retval);
+ return retval;
+}
+
+static void lh7a40x_free_buffer(struct usb_ep *ep, void *buf, dma_addr_t dma,
+ unsigned bytes)
+{
+ DEBUG("%s, %p\n", __FUNCTION__, ep);
+ kfree(buf);
+}
+
+/** Queue one request
+ * Kickstart transfer if needed
+ * NOTE: Sets INDEX register
+ */
+static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req,
+ int gfp_flags)
+{
+ struct lh7a40x_request *req;
+ struct lh7a40x_ep *ep;
+ struct lh7a40x_udc *dev;
+ unsigned long flags;
+
+ DEBUG("\n\n\n%s, %p\n", __FUNCTION__, _ep);
+
+ req = container_of(_req, struct lh7a40x_request, req);
+ if (unlikely
+ (!_req || !_req->complete || !_req->buf
+ || !list_empty(&req->queue))) {
+ DEBUG("%s, bad params\n", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ ep = container_of(_ep, struct lh7a40x_ep, ep);
+ if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
+ DEBUG("%s, bad ep\n", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ dev = ep->dev;
+ if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
+ DEBUG("%s, bogus device state %p\n", __FUNCTION__, dev->driver);
+ return -ESHUTDOWN;
+ }
+
+ DEBUG("%s queue req %p, len %d buf %p\n", _ep->name, _req, _req->length,
+ _req->buf);
+
+ spin_lock_irqsave(&dev->lock, flags);
+
+ _req->status = -EINPROGRESS;
+ _req->actual = 0;
+
+ /* kickstart this i/o queue? */
+ DEBUG("Add to %d Q %d %d\n", ep_index(ep), list_empty(&ep->queue),
+ ep->stopped);
+ if (list_empty(&ep->queue) && likely(!ep->stopped)) {
+ u32 csr;
+
+ if (unlikely(ep_index(ep) == 0)) {
+ /* EP0 */
+ list_add_tail(&req->queue, &ep->queue);
+ lh7a40x_ep0_kick(dev, ep);
+ req = 0;
+ } else if (ep_is_in(ep)) {
+ /* EP1 & EP3 */
+ usb_set_index(ep_index(ep));
+ csr = usb_read(ep->csr1);
+ pio_irq_enable(ep_index(ep));
+ if ((csr & USB_IN_CSR1_FIFO_NOT_EMPTY) == 0) {
+ if (write_fifo(ep, req) == 1)
+ req = 0;
+ }
+ } else {
+ /* EP2 */
+ usb_set_index(ep_index(ep));
+ csr = usb_read(ep->csr1);
+ pio_irq_enable(ep_index(ep));
+ if (!(csr & USB_OUT_CSR1_FIFO_FULL)) {
+ if (read_fifo(ep, req) == 1)
+ req = 0;
+ }
+ }
+ }
+
+ /* pio or dma irq handler advances the queue. */
+ if (likely(req != 0))
+ list_add_tail(&req->queue, &ep->queue);
+
+ spin_unlock_irqrestore(&dev->lock, flags);
+
+ return 0;
+}
+
+/* dequeue JUST ONE request */
+static int lh7a40x_dequeue(struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct lh7a40x_ep *ep;
+ struct lh7a40x_request *req;
+ unsigned long flags;
+
+ DEBUG("%s, %p\n", __FUNCTION__, _ep);
+
+ ep = container_of(_ep, struct lh7a40x_ep, ep);
+ if (!_ep || ep->ep.name == ep0name)
+ return -EINVAL;
+
+ spin_lock_irqsave(&ep->dev->lock, flags);
+
+ /* make sure it's actually queued on this endpoint */
+ list_for_each_entry(req, &ep->queue, queue) {
+ if (&req->req == _req)
+ break;
+ }
+ if (&req->req != _req) {
+ spin_unlock_irqrestore(&ep->dev->lock, flags);
+ return -EINVAL;
+ }
+
+ done(ep, req, -ECONNRESET);
+
+ spin_unlock_irqrestore(&ep->dev->lock, flags);
+ return 0;
+}
+
+/** Halt specific EP
+ * Return 0 if success
+ * NOTE: Sets INDEX register to EP !
+ */
+static int lh7a40x_set_halt(struct usb_ep *_ep, int value)
+{
+ struct lh7a40x_ep *ep;
+ unsigned long flags;
+
+ ep = container_of(_ep, struct lh7a40x_ep, ep);
+ if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
+ DEBUG("%s, bad ep\n", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ usb_set_index(ep_index(ep));
+
+ DEBUG("%s, ep %d, val %d\n", __FUNCTION__, ep_index(ep), value);
+
+ spin_lock_irqsave(&ep->dev->lock, flags);
+
+ if (ep_index(ep) == 0) {
+ /* EP0 */
+ usb_set(EP0_SEND_STALL, ep->csr1);
+ } else if (ep_is_in(ep)) {
+ u32 csr = usb_read(ep->csr1);
+ if (value && ((csr & USB_IN_CSR1_FIFO_NOT_EMPTY)
+ || !list_empty(&ep->queue))) {
+ /*
+ * Attempts to halt IN endpoints will fail (returning -EAGAIN)
+ * if any transfer requests are still queued, or if the controller
+ * FIFO still holds bytes that the host hasn’t collected.
+ */
+ spin_unlock_irqrestore(&ep->dev->lock, flags);
+ DEBUG
+ ("Attempt to halt IN endpoint failed (returning -EAGAIN) %d %d\n",
+ (csr & USB_IN_CSR1_FIFO_NOT_EMPTY),
+ !list_empty(&ep->queue));
+ return -EAGAIN;
+ }
+ flush(ep);
+ if (value)
+ usb_set(USB_IN_CSR1_SEND_STALL, ep->csr1);
+ else {
+ usb_clear(USB_IN_CSR1_SEND_STALL, ep->csr1);
+ usb_set(USB_IN_CSR1_CLR_DATA_TOGGLE, ep->csr1);
+ }
+
+ } else {
+
+ flush(ep);
+ if (value)
+ usb_set(USB_OUT_CSR1_SEND_STALL, ep->csr1);
+ else {
+ usb_clear(USB_OUT_CSR1_SEND_STALL, ep->csr1);
+ usb_set(USB_OUT_CSR1_CLR_DATA_REG, ep->csr1);
+ }
+ }
+
+ if (value) {
+ ep->stopped = 1;
+ } else {
+ ep->stopped = 0;
+ }
+
+ spin_unlock_irqrestore(&ep->dev->lock, flags);
+
+ DEBUG("%s %s halted\n", _ep->name, value == 0 ? "NOT" : "IS");
+
+ return 0;
+}
+
+/** Return bytes in EP FIFO
+ * NOTE: Sets INDEX register to EP
+ */
+static int lh7a40x_fifo_status(struct usb_ep *_ep)
+{
+ u32 csr;
+ int count = 0;
+ struct lh7a40x_ep *ep;
+
+ ep = container_of(_ep, struct lh7a40x_ep, ep);
+ if (!_ep) {
+ DEBUG("%s, bad ep\n", __FUNCTION__);
+ return -ENODEV;
+ }
+
+ DEBUG("%s, %d\n", __FUNCTION__, ep_index(ep));
+
+ /* LPD can't report unclaimed bytes from IN fifos */
+ if (ep_is_in(ep))
+ return -EOPNOTSUPP;
+
+ usb_set_index(ep_index(ep));
+
+ csr = usb_read(ep->csr1);
+ if (ep->dev->gadget.speed != USB_SPEED_UNKNOWN ||
+ csr & USB_OUT_CSR1_OUT_PKT_RDY) {
+ count = usb_read(USB_OUT_FIFO_WC1);
+ }
+
+ return count;
+}
+
+/** Flush EP FIFO
+ * NOTE: Sets INDEX register to EP
+ */
+static void lh7a40x_fifo_flush(struct usb_ep *_ep)
+{
+ struct lh7a40x_ep *ep;
+
+ ep = container_of(_ep, struct lh7a40x_ep, ep);
+ if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
+ DEBUG("%s, bad ep\n", __FUNCTION__);
+ return;
+ }
+
+ usb_set_index(ep_index(ep));
+ flush(ep);
+}
+
+/****************************************************************/
+/* End Point 0 related functions */
+/****************************************************************/
+
+/* return: 0 = still running, 1 = completed, negative = errno */
+static int write_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
+{
+ u32 max;
+ unsigned count;
+ int is_last;
+
+ max = ep_maxpacket(ep);
+
+ DEBUG_EP0("%s\n", __FUNCTION__);
+
+ count = write_packet(ep, req, max);
+
+ /* last packet is usually short (or a zlp) */
+ if (unlikely(count != max))
+ is_last = 1;
+ else {
+ if (likely(req->req.length != req->req.actual) || req->req.zero)
+ is_last = 0;
+ else
+ is_last = 1;
+ }
+
+ DEBUG_EP0("%s: wrote %s %d bytes%s %d left %p\n", __FUNCTION__,
+ ep->ep.name, count,
+ is_last ? "/L" : "", req->req.length - req->req.actual, req);
+
+ /* requests complete when all IN data is in the FIFO */
+ if (is_last) {
+ done(ep, req, 0);
+ return 1;
+ }
+
+ return 0;
+}
+
+static __inline__ int lh7a40x_fifo_read(struct lh7a40x_ep *ep,
+ unsigned char *cp, int max)
+{
+ int bytes;
+ int count = usb_read(USB_OUT_FIFO_WC1);
+ volatile u32 *fifo = (volatile u32 *)ep->fifo;
+
+ if (count > max)
+ count = max;
+ bytes = count;
+ while (count--)
+ *cp++ = *fifo & 0xFF;
+ return bytes;
+}
+
+static __inline__ void lh7a40x_fifo_write(struct lh7a40x_ep *ep,
+ unsigned char *cp, int count)
+{
+ volatile u32 *fifo = (volatile u32 *)ep->fifo;
+ DEBUG_EP0("fifo_write: %d %d\n", ep_index(ep), count);
+ while (count--)
+ *fifo = *cp++;
+}
+
+static int read_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
+{
+ u32 csr;
+ u8 *buf;
+ unsigned bufferspace, count, is_short;
+ volatile u32 *fifo = (volatile u32 *)ep->fifo;
+
+ DEBUG_EP0("%s\n", __FUNCTION__);
+
+ csr = usb_read(USB_EP0_CSR);
+ if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY))
+ return 0;
+
+ buf = req->req.buf + req->req.actual;
+ prefetchw(buf);
+ bufferspace = req->req.length - req->req.actual;
+
+ /* read all bytes from this packet */
+ if (likely(csr & EP0_OUT_PKT_RDY)) {
+ count = usb_read(USB_OUT_FIFO_WC1);
+ req->req.actual += min(count, bufferspace);
+ } else /* zlp */
+ count = 0;
+
+ is_short = (count < ep->ep.maxpacket);
+ DEBUG_EP0("read %s %02x, %d bytes%s req %p %d/%d\n",
+ ep->ep.name, csr, count,
+ is_short ? "/S" : "", req, req->req.actual, req->req.length);
+
+ while (likely(count-- != 0)) {
+ u8 byte = (u8) (*fifo & 0xff);
+
+ if (unlikely(bufferspace == 0)) {
+ /* this happens when the driver's buffer
+ * is smaller than what the host sent.
+ * discard the extra data.
+ */
+ if (req->req.status != -EOVERFLOW)
+ DEBUG_EP0("%s overflow %d\n", ep->ep.name,
+ count);
+ req->req.status = -EOVERFLOW;
+ } else {
+ *buf++ = byte;
+ bufferspace--;
+ }
+ }
+
+ /* completion */
+ if (is_short || req->req.actual == req->req.length) {
+ done(ep, req, 0);
+ return 1;
+ }
+
+ /* finished that packet. the next one may be waiting... */
+ return 0;
+}
+
+/**
+ * udc_set_address - set the USB address for this device
+ * @address:
+ *
+ * Called from control endpoint function after it decodes a set address setup packet.
+ */
+static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address)
+{
+ DEBUG_EP0("%s: %d\n", __FUNCTION__, address);
+ /* c.f. 15.1.2.2 Table 15-4 address will be used after DATA_END is set */
+ dev->usb_address = address;
+ usb_set((address & USB_FA_FUNCTION_ADDR), USB_FA);
+ usb_set(USB_FA_ADDR_UPDATE | (address & USB_FA_FUNCTION_ADDR), USB_FA);
+ /* usb_read(USB_FA); */
+}
+
+/*
+ * DATA_STATE_RECV (OUT_PKT_RDY)
+ * - if error
+ * set EP0_CLR_OUT | EP0_DATA_END | EP0_SEND_STALL bits
+ * - else
+ * set EP0_CLR_OUT bit
+ if last set EP0_DATA_END bit
+ */
+static void lh7a40x_ep0_out(struct lh7a40x_udc *dev, u32 csr)
+{
+ struct lh7a40x_request *req;
+ struct lh7a40x_ep *ep = &dev->ep[0];
+ int ret;
+
+ DEBUG_EP0("%s: %x\n", __FUNCTION__, csr);
+
+ if (list_empty(&ep->queue))
+ req = 0;
+ else
+ req = list_entry(ep->queue.next, struct lh7a40x_request, queue);
+
+ if (req) {
+
+ if (req->req.length == 0) {
+ DEBUG_EP0("ZERO LENGTH OUT!\n");
+ usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR);
+ dev->ep0state = WAIT_FOR_SETUP;
+ return;
+ }
+ ret = read_fifo_ep0(ep, req);
+ if (ret) {
+ /* Done! */
+ DEBUG_EP0("%s: finished, waiting for status\n",
+ __FUNCTION__);
+
+ usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR);
+ dev->ep0state = WAIT_FOR_SETUP;
+ } else {
+ /* Not done yet.. */
+ DEBUG_EP0("%s: not finished\n", __FUNCTION__);
+ usb_set(EP0_CLR_OUT, USB_EP0_CSR);
+ }
+ } else {
+ DEBUG_EP0("NO REQ??!\n");
+ }
+}
+
+/*
+ * DATA_STATE_XMIT
+ */
+static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr)
+{
+ struct lh7a40x_request *req;
+ struct lh7a40x_ep *ep = &dev->ep[0];
+ int ret, need_zlp = 0;
+
+ DEBUG_EP0("%s: %x\n", __FUNCTION__, csr);
+
+ if (list_empty(&ep->queue))
+ req = 0;
+ else
+ req = list_entry(ep->queue.next, struct lh7a40x_request, queue);
+
+ if (!req) {
+ DEBUG_EP0("%s: NULL REQ\n", __FUNCTION__);
+ return 0;
+ }
+
+ if (req->req.length == 0) {
+
+ usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR);
+ dev->ep0state = WAIT_FOR_SETUP;
+ return 1;
+ }
+
+ if (req->req.length - req->req.actual == EP0_PACKETSIZE) {
+ /* Next write will end with the packet size, */
+ /* so we need Zero-length-packet */
+ need_zlp = 1;
+ }
+
+ ret = write_fifo_ep0(ep, req);
+
+ if (ret == 1 && !need_zlp) {
+ /* Last packet */
+ DEBUG_EP0("%s: finished, waiting for status\n", __FUNCTION__);
+
+ usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR);
+ dev->ep0state = WAIT_FOR_SETUP;
+ } else {
+ DEBUG_EP0("%s: not finished\n", __FUNCTION__);
+ usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR);
+ }
+
+ if (need_zlp) {
+ DEBUG_EP0("%s: Need ZLP!\n", __FUNCTION__);
+ usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR);
+ dev->ep0state = DATA_STATE_NEED_ZLP;
+ }
+
+ return 1;
+}
+
+static int lh7a40x_handle_get_status(struct lh7a40x_udc *dev,
+ struct usb_ctrlrequest *ctrl)
+{
+ struct lh7a40x_ep *ep0 = &dev->ep[0];
+ struct lh7a40x_ep *qep;
+ int reqtype = (ctrl->bRequestType & USB_RECIP_MASK);
+ u16 val = 0;
+
+ if (reqtype == USB_RECIP_INTERFACE) {
+ /* This is not supported.
+ * And according to the USB spec, this one does nothing..
+ * Just return 0
+ */
+ DEBUG_SETUP("GET_STATUS: USB_RECIP_INTERFACE\n");
+ } else if (reqtype == USB_RECIP_DEVICE) {
+ DEBUG_SETUP("GET_STATUS: USB_RECIP_DEVICE\n");
+ val |= (1 << 0); /* Self powered */
+ /*val |= (1<<1); *//* Remote wakeup */
+ } else if (reqtype == USB_RECIP_ENDPOINT) {
+ int ep_num = (ctrl->wIndex & ~USB_DIR_IN);
+
+ DEBUG_SETUP
+ ("GET_STATUS: USB_RECIP_ENDPOINT (%d), ctrl->wLength = %d\n",
+ ep_num, ctrl->wLength);
+
+ if (ctrl->wLength > 2 || ep_num > 3)
+ return -EOPNOTSUPP;
+
+ qep = &dev->ep[ep_num];
+ if (ep_is_in(qep) != ((ctrl->wIndex & USB_DIR_IN) ? 1 : 0)
+ && ep_index(qep) != 0) {
+ return -EOPNOTSUPP;
+ }
+
+ usb_set_index(ep_index(qep));
+
+ /* Return status on next IN token */
+ switch (qep->ep_type) {
+ case ep_control:
+ val =
+ (usb_read(qep->csr1) & EP0_SEND_STALL) ==
+ EP0_SEND_STALL;
+ break;
+ case ep_bulk_in:
+ case ep_interrupt:
+ val =
+ (usb_read(qep->csr1) & USB_IN_CSR1_SEND_STALL) ==
+ USB_IN_CSR1_SEND_STALL;
+ break;
+ case ep_bulk_out:
+ val =
+ (usb_read(qep->csr1) & USB_OUT_CSR1_SEND_STALL) ==
+ USB_OUT_CSR1_SEND_STALL;
+ break;
+ }
+
+ /* Back to EP0 index */
+ usb_set_index(0);
+
+ DEBUG_SETUP("GET_STATUS, ep: %d (%x), val = %d\n", ep_num,
+ ctrl->wIndex, val);
+ } else {
+ DEBUG_SETUP("Unknown REQ TYPE: %d\n", reqtype);
+ return -EOPNOTSUPP;
+ }
+
+ /* Clear "out packet ready" */
+ usb_set((EP0_CLR_OUT), USB_EP0_CSR);
+ /* Put status to FIFO */
+ lh7a40x_fifo_write(ep0, (u8 *) & val, sizeof(val));
+ /* Issue "In packet ready" */
+ usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR);
+
+ return 0;
+}
+
+/*
+ * WAIT_FOR_SETUP (OUT_PKT_RDY)
+ * - read data packet from EP0 FIFO
+ * - decode command
+ * - if error
+ * set EP0_CLR_OUT | EP0_DATA_END | EP0_SEND_STALL bits
+ * - else
+ * set EP0_CLR_OUT | EP0_DATA_END bits
+ */
+static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr)
+{
+ struct lh7a40x_ep *ep = &dev->ep[0];
+ struct usb_ctrlrequest ctrl;
+ int i, bytes, is_in;
+
+ DEBUG_SETUP("%s: %x\n", __FUNCTION__, csr);
+
+ /* Nuke all previous transfers */
+ nuke(ep, -EPROTO);
+
+ /* read control req from fifo (8 bytes) */
+ bytes = lh7a40x_fifo_read(ep, (unsigned char *)&ctrl, 8);
+
+ DEBUG_SETUP("Read CTRL REQ %d bytes\n", bytes);
+ DEBUG_SETUP("CTRL.bRequestType = %d (is_in %d)\n", ctrl.bRequestType,
+ ctrl.bRequestType == USB_DIR_IN);
+ DEBUG_SETUP("CTRL.bRequest = %d\n", ctrl.bRequest);
+ DEBUG_SETUP("CTRL.wLength = %d\n", ctrl.wLength);
+ DEBUG_SETUP("CTRL.wValue = %d (%d)\n", ctrl.wValue, ctrl.wValue >> 8);
+ DEBUG_SETUP("CTRL.wIndex = %d\n", ctrl.wIndex);
+
+ /* Set direction of EP0 */
+ if (likely(ctrl.bRequestType & USB_DIR_IN)) {
+ ep->bEndpointAddress |= USB_DIR_IN;
+ is_in = 1;
+ } else {
+ ep->bEndpointAddress &= ~USB_DIR_IN;
+ is_in = 0;
+ }
+
+ dev->req_pending = 1;
+
+ /* Handle some SETUP packets ourselves */
+ switch (ctrl.bRequest) {
+ case USB_REQ_SET_ADDRESS:
+ if (ctrl.bRequestType != (USB_TYPE_STANDARD | USB_RECIP_DEVICE))
+ break;
+
+ DEBUG_SETUP("USB_REQ_SET_ADDRESS (%d)\n", ctrl.wValue);
+ udc_set_address(dev, ctrl.wValue);
+ usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR);
+ return;
+
+ case USB_REQ_GET_STATUS:{
+ if (lh7a40x_handle_get_status(dev, &ctrl) == 0)
+ return;
+
+ case USB_REQ_CLEAR_FEATURE:
+ case USB_REQ_SET_FEATURE:
+ if (ctrl.bRequestType == USB_RECIP_ENDPOINT) {
+ struct lh7a40x_ep *qep;
+ int ep_num = (ctrl.wIndex & 0x0f);
+
+ /* Support only HALT feature */
+ if (ctrl.wValue != 0 || ctrl.wLength != 0
+ || ep_num > 3 || ep_num < 1)
+ break;
+
+ qep = &dev->ep[ep_num];
+ if (ctrl.bRequest == USB_REQ_SET_FEATURE) {
+ DEBUG_SETUP("SET_FEATURE (%d)\n",
+ ep_num);
+ lh7a40x_set_halt(&qep->ep, 1);
+ } else {
+ DEBUG_SETUP("CLR_FEATURE (%d)\n",
+ ep_num);
+ lh7a40x_set_halt(&qep->ep, 0);
+ }
+ usb_set_index(0);
+
+ /* Reply with a ZLP on next IN token */
+ usb_set((EP0_CLR_OUT | EP0_DATA_END),
+ USB_EP0_CSR);
+ return;
+ }
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ if (likely(dev->driver)) {
+ /* device-2-host (IN) or no data setup command, process immediately */
+ spin_unlock(&dev->lock);
+ i = dev->driver->setup(&dev->gadget, &ctrl);
+ spin_lock(&dev->lock);
+
+ if (i < 0) {
+ /* setup processing failed, force stall */
+ DEBUG_SETUP
+ (" --> ERROR: gadget setup FAILED (stalling), setup returned %d\n",
+ i);
+ usb_set_index(0);
+ usb_set((EP0_CLR_OUT | EP0_DATA_END | EP0_SEND_STALL),
+ USB_EP0_CSR);
+
+ /* ep->stopped = 1; */
+ dev->ep0state = WAIT_FOR_SETUP;
+ }
+ }
+}
+
+/*
+ * DATA_STATE_NEED_ZLP
+ */
+static void lh7a40x_ep0_in_zlp(struct lh7a40x_udc *dev, u32 csr)
+{
+ DEBUG_EP0("%s: %x\n", __FUNCTION__, csr);
+
+ /* c.f. Table 15-14 */
+ usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR);
+ dev->ep0state = WAIT_FOR_SETUP;
+}
+
+/*
+ * handle ep0 interrupt
+ */
+static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr)
+{
+ struct lh7a40x_ep *ep = &dev->ep[0];
+ u32 csr;
+
+ /* Set index 0 */
+ usb_set_index(0);
+ csr = usb_read(USB_EP0_CSR);
+
+ DEBUG_EP0("%s: csr = %x\n", __FUNCTION__, csr);
+
+ /*
+ * For overview of what we should be doing see c.f. Chapter 18.1.2.4
+ * We will follow that outline here modified by our own global state
+ * indication which provides hints as to what we think should be
+ * happening..
+ */
+
+ /*
+ * if SENT_STALL is set
+ * - clear the SENT_STALL bit
+ */
+ if (csr & EP0_SENT_STALL) {
+ DEBUG_EP0("%s: EP0_SENT_STALL is set: %x\n", __FUNCTION__, csr);
+ usb_clear((EP0_SENT_STALL | EP0_SEND_STALL), USB_EP0_CSR);
+ nuke(ep, -ECONNABORTED);
+ dev->ep0state = WAIT_FOR_SETUP;
+ return;
+ }
+
+ /*
+ * if a transfer is in progress && IN_PKT_RDY and OUT_PKT_RDY are clear
+ * - fill EP0 FIFO
+ * - if last packet
+ * - set IN_PKT_RDY | DATA_END
+ * - else
+ * set IN_PKT_RDY
+ */
+ if (!(csr & (EP0_IN_PKT_RDY | EP0_OUT_PKT_RDY))) {
+ DEBUG_EP0("%s: IN_PKT_RDY and OUT_PKT_RDY are clear\n",
+ __FUNCTION__);
+
+ switch (dev->ep0state) {
+ case DATA_STATE_XMIT:
+ DEBUG_EP0("continue with DATA_STATE_XMIT\n");
+ lh7a40x_ep0_in(dev, csr);
+ return;
+ case DATA_STATE_NEED_ZLP:
+ DEBUG_EP0("continue with DATA_STATE_NEED_ZLP\n");
+ lh7a40x_ep0_in_zlp(dev, csr);
+ return;
+ default:
+ /* Stall? */
+ DEBUG_EP0("Odd state!! state = %s\n",
+ state_names[dev->ep0state]);
+ dev->ep0state = WAIT_FOR_SETUP;
+ /* nuke(ep, 0); */
+ /* usb_set(EP0_SEND_STALL, ep->csr1); */
+ break;
+ }
+ }
+
+ /*
+ * if SETUP_END is set
+ * - abort the last transfer
+ * - set SERVICED_SETUP_END_BIT
+ */
+ if (csr & EP0_SETUP_END) {
+ DEBUG_EP0("%s: EP0_SETUP_END is set: %x\n", __FUNCTION__, csr);
+
+ usb_set(EP0_CLR_SETUP_END, USB_EP0_CSR);
+
+ nuke(ep, 0);
+ dev->ep0state = WAIT_FOR_SETUP;
+ }
+
+ /*
+ * if EP0_OUT_PKT_RDY is set
+ * - read data packet from EP0 FIFO
+ * - decode command
+ * - if error
+ * set SERVICED_OUT_PKT_RDY | DATA_END bits | SEND_STALL
+ * - else
+ * set SERVICED_OUT_PKT_RDY | DATA_END bits
+ */
+ if (csr & EP0_OUT_PKT_RDY) {
+
+ DEBUG_EP0("%s: EP0_OUT_PKT_RDY is set: %x\n", __FUNCTION__,
+ csr);
+
+ switch (dev->ep0state) {
+ case WAIT_FOR_SETUP:
+ DEBUG_EP0("WAIT_FOR_SETUP\n");
+ lh7a40x_ep0_setup(dev, csr);
+ break;
+
+ case DATA_STATE_RECV:
+ DEBUG_EP0("DATA_STATE_RECV\n");
+ lh7a40x_ep0_out(dev, csr);
+ break;
+
+ default:
+ /* send stall? */
+ DEBUG_EP0("strange state!! 2. send stall? state = %d\n",
+ dev->ep0state);
+ break;
+ }
+ }
+}
+
+static void lh7a40x_ep0_kick(struct lh7a40x_udc *dev, struct lh7a40x_ep *ep)
+{
+ u32 csr;
+
+ usb_set_index(0);
+ csr = usb_read(USB_EP0_CSR);
+
+ DEBUG_EP0("%s: %x\n", __FUNCTION__, csr);
+
+ /* Clear "out packet ready" */
+ usb_set(EP0_CLR_OUT, USB_EP0_CSR);
+
+ if (ep_is_in(ep)) {
+ dev->ep0state = DATA_STATE_XMIT;
+ lh7a40x_ep0_in(dev, csr);
+ } else {
+ dev->ep0state = DATA_STATE_RECV;
+ lh7a40x_ep0_out(dev, csr);
+ }
+}
+
+/* ---------------------------------------------------------------------------
+ * device-scoped parts of the api to the usb controller hardware
+ * ---------------------------------------------------------------------------
+ */
+
+static int lh7a40x_udc_get_frame(struct usb_gadget *_gadget)
+{
+ u32 frame1 = usb_read(USB_FRM_NUM1); /* Least significant 8 bits */
+ u32 frame2 = usb_read(USB_FRM_NUM2); /* Most significant 3 bits */
+ DEBUG("%s, %p\n", __FUNCTION__, _gadget);
+ return ((frame2 & 0x07) << 8) | (frame1 & 0xff);
+}
+
+static int lh7a40x_udc_wakeup(struct usb_gadget *_gadget)
+{
+ /* host may not have enabled remote wakeup */
+ /*if ((UDCCS0 & UDCCS0_DRWF) == 0)
+ return -EHOSTUNREACH;
+ udc_set_mask_UDCCR(UDCCR_RSM); */
+ return -ENOTSUPP;
+}
+
+static const struct usb_gadget_ops lh7a40x_udc_ops = {
+ .get_frame = lh7a40x_udc_get_frame,
+ .wakeup = lh7a40x_udc_wakeup,
+ /* current versions must always be self-powered */
+};
+
+static void nop_release(struct device *dev)
+{
+ DEBUG("%s %s\n", __FUNCTION__, dev->bus_id);
+}
+
+static struct lh7a40x_udc memory = {
+ .usb_address = 0,
+
+ .gadget = {
+ .ops = &lh7a40x_udc_ops,
+ .ep0 = &memory.ep[0].ep,
+ .name = driver_name,
+ .dev = {
+ .bus_id = "gadget",
+ .release = nop_release,
+ },
+ },
+
+ /* control endpoint */
+ .ep[0] = {
+ .ep = {
+ .name = ep0name,
+ .ops = &lh7a40x_ep_ops,
+ .maxpacket = EP0_PACKETSIZE,
+ },
+ .dev = &memory,
+
+ .bEndpointAddress = 0,
+ .bmAttributes = 0,
+
+ .ep_type = ep_control,
+ .fifo = io_p2v(USB_EP0_FIFO),
+ .csr1 = USB_EP0_CSR,
+ .csr2 = USB_EP0_CSR,
+ },
+
+ /* first group of endpoints */
+ .ep[1] = {
+ .ep = {
+ .name = "ep1in-bulk",
+ .ops = &lh7a40x_ep_ops,
+ .maxpacket = 64,
+ },
+ .dev = &memory,
+
+ .bEndpointAddress = USB_DIR_IN | 1,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+
+ .ep_type = ep_bulk_in,
+ .fifo = io_p2v(USB_EP1_FIFO),
+ .csr1 = USB_IN_CSR1,
+ .csr2 = USB_IN_CSR2,
+ },
+
+ .ep[2] = {
+ .ep = {
+ .name = "ep2out-bulk",
+ .ops = &lh7a40x_ep_ops,
+ .maxpacket = 64,
+ },
+ .dev = &memory,
+
+ .bEndpointAddress = 2,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+
+ .ep_type = ep_bulk_out,
+ .fifo = io_p2v(USB_EP2_FIFO),
+ .csr1 = USB_OUT_CSR1,
+ .csr2 = USB_OUT_CSR2,
+ },
+
+ .ep[3] = {
+ .ep = {
+ .name = "ep3in-int",
+ .ops = &lh7a40x_ep_ops,
+ .maxpacket = 64,
+ },
+ .dev = &memory,
+
+ .bEndpointAddress = USB_DIR_IN | 3,
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+
+ .ep_type = ep_interrupt,
+ .fifo = io_p2v(USB_EP3_FIFO),
+ .csr1 = USB_IN_CSR1,
+ .csr2 = USB_IN_CSR2,
+ },
+};
+
+/*
+ * probe - binds to the platform device
+ */
+static int lh7a40x_udc_probe(struct device *_dev)
+{
+ struct lh7a40x_udc *dev = &memory;
+ int retval;
+
+ DEBUG("%s: %p\n", __FUNCTION__, _dev);
+
+ spin_lock_init(&dev->lock);
+ dev->dev = _dev;
+
+ device_initialize(&dev->gadget.dev);
+ dev->gadget.dev.parent = _dev;
+
+ the_controller = dev;
+ dev_set_drvdata(_dev, dev);
+
+ udc_disable(dev);
+ udc_reinit(dev);
+
+ /* irq setup after old hardware state is cleaned up */
+ retval =
+ request_irq(IRQ_USBINTR, lh7a40x_udc_irq, SA_INTERRUPT, driver_name,
+ dev);
+ if (retval != 0) {
+ DEBUG(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name,
+ IRQ_USBINTR, retval);
+ return -EBUSY;
+ }
+
+ create_proc_files();
+
+ return retval;
+}
+
+static int lh7a40x_udc_remove(struct device *_dev)
+{
+ struct lh7a40x_udc *dev = _dev->driver_data;
+
+ DEBUG("%s: %p\n", __FUNCTION__, dev);
+
+ udc_disable(dev);
+ remove_proc_files();
+ usb_gadget_unregister_driver(dev->driver);
+
+ free_irq(IRQ_USBINTR, dev);
+
+ dev_set_drvdata(_dev, 0);
+
+ the_controller = 0;
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct device_driver udc_driver = {
+ .name = (char *)driver_name,
+ .bus = &platform_bus_type,
+ .probe = lh7a40x_udc_probe,
+ .remove = lh7a40x_udc_remove
+ /* FIXME power management support */
+ /* .suspend = ... disable UDC */
+ /* .resume = ... re-enable UDC */
+};
+
+static int __init udc_init(void)
+{
+ DEBUG("%s: %s version %s\n", __FUNCTION__, driver_name, DRIVER_VERSION);
+ return driver_register(&udc_driver);
+}
+
+static void __exit udc_exit(void)
+{
+ driver_unregister(&udc_driver);
+}
+
+module_init(udc_init);
+module_exit(udc_exit);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_AUTHOR("Mikko Lahteenmaki, Bo Henriksen");
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/gadget/lh7a40x_udc.h b/drivers/usb/gadget/lh7a40x_udc.h
new file mode 100644
index 000000000000..1bb455c045a9
--- /dev/null
+++ b/drivers/usb/gadget/lh7a40x_udc.h
@@ -0,0 +1,261 @@
+/*
+ * linux/drivers/usb/gadget/lh7a40x_udc.h
+ * Sharp LH7A40x on-chip full speed USB device controllers
+ *
+ * Copyright (C) 2004 Mikko Lahteenmaki, Nordic ID
+ * Copyright (C) 2004 Bo Henriksen, Nordic ID
+ *
+ * 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
+ *
+ */
+
+#ifndef __LH7A40X_H_
+#define __LH7A40X_H_
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/ioport.h>
+#include <linux/types.h>
+#include <linux/version.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/proc_fs.h>
+#include <linux/mm.h>
+#include <linux/device.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/byteorder.h>
+#include <asm/dma.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+#include <asm/hardware.h>
+
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+
+/*
+ * Memory map
+ */
+
+#define USB_FA 0x80000200 // function address register
+#define USB_PM 0x80000204 // power management register
+
+#define USB_IN_INT 0x80000208 // IN interrupt register bank (EP0-EP3)
+#define USB_OUT_INT 0x80000210 // OUT interrupt register bank (EP2)
+#define USB_INT 0x80000218 // interrupt register bank
+
+#define USB_IN_INT_EN 0x8000021C // IN interrupt enable register bank
+#define USB_OUT_INT_EN 0x80000224 // OUT interrupt enable register bank
+#define USB_INT_EN 0x8000022C // USB interrupt enable register bank
+
+#define USB_FRM_NUM1 0x80000230 // Frame number1 register
+#define USB_FRM_NUM2 0x80000234 // Frame number2 register
+#define USB_INDEX 0x80000238 // index register
+
+#define USB_IN_MAXP 0x80000240 // IN MAXP register
+#define USB_IN_CSR1 0x80000244 // IN CSR1 register/EP0 CSR register
+#define USB_EP0_CSR 0x80000244 // IN CSR1 register/EP0 CSR register
+#define USB_IN_CSR2 0x80000248 // IN CSR2 register
+#define USB_OUT_MAXP 0x8000024C // OUT MAXP register
+
+#define USB_OUT_CSR1 0x80000250 // OUT CSR1 register
+#define USB_OUT_CSR2 0x80000254 // OUT CSR2 register
+#define USB_OUT_FIFO_WC1 0x80000258 // OUT FIFO write count1 register
+#define USB_OUT_FIFO_WC2 0x8000025C // OUT FIFO write count2 register
+
+#define USB_RESET 0x8000044C // USB reset register
+
+#define USB_EP0_FIFO 0x80000280
+#define USB_EP1_FIFO 0x80000284
+#define USB_EP2_FIFO 0x80000288
+#define USB_EP3_FIFO 0x8000028c
+
+/*
+ * USB reset register
+ */
+#define USB_RESET_APB (1<<1) //resets USB APB control side WRITE
+#define USB_RESET_IO (1<<0) //resets USB IO side WRITE
+
+/*
+ * USB function address register
+ */
+#define USB_FA_ADDR_UPDATE (1<<7)
+#define USB_FA_FUNCTION_ADDR (0x7F)
+
+/*
+ * Power Management register
+ */
+#define PM_USB_DCP (1<<5)
+#define PM_USB_ENABLE (1<<4)
+#define PM_USB_RESET (1<<3)
+#define PM_UC_RESUME (1<<2)
+#define PM_SUSPEND_MODE (1<<1)
+#define PM_ENABLE_SUSPEND (1<<0)
+
+/*
+ * IN interrupt register
+ */
+#define USB_IN_INT_EP3 (1<<3)
+#define USB_IN_INT_EP1 (1<<1)
+#define USB_IN_INT_EP0 (1<<0)
+
+/*
+ * OUT interrupt register
+ */
+#define USB_OUT_INT_EP2 (1<<2)
+
+/*
+ * USB interrupt register
+ */
+#define USB_INT_RESET_INT (1<<2)
+#define USB_INT_RESUME_INT (1<<1)
+#define USB_INT_SUSPEND_INT (1<<0)
+
+/*
+ * USB interrupt enable register
+ */
+#define USB_INT_EN_USB_RESET_INTER (1<<2)
+#define USB_INT_EN_RESUME_INTER (1<<1)
+#define USB_INT_EN_SUSPEND_INTER (1<<0)
+
+/*
+ * INCSR1 register
+ */
+#define USB_IN_CSR1_CLR_DATA_TOGGLE (1<<6)
+#define USB_IN_CSR1_SENT_STALL (1<<5)
+#define USB_IN_CSR1_SEND_STALL (1<<4)
+#define USB_IN_CSR1_FIFO_FLUSH (1<<3)
+#define USB_IN_CSR1_FIFO_NOT_EMPTY (1<<1)
+#define USB_IN_CSR1_IN_PKT_RDY (1<<0)
+
+/*
+ * INCSR2 register
+ */
+#define USB_IN_CSR2_AUTO_SET (1<<7)
+#define USB_IN_CSR2_USB_DMA_EN (1<<4)
+
+/*
+ * OUT CSR1 register
+ */
+#define USB_OUT_CSR1_CLR_DATA_REG (1<<7)
+#define USB_OUT_CSR1_SENT_STALL (1<<6)
+#define USB_OUT_CSR1_SEND_STALL (1<<5)
+#define USB_OUT_CSR1_FIFO_FLUSH (1<<4)
+#define USB_OUT_CSR1_FIFO_FULL (1<<1)
+#define USB_OUT_CSR1_OUT_PKT_RDY (1<<0)
+
+/*
+ * OUT CSR2 register
+ */
+#define USB_OUT_CSR2_AUTO_CLR (1<<7)
+#define USB_OUT_CSR2_USB_DMA_EN (1<<4)
+
+/*
+ * EP0 CSR
+ */
+#define EP0_CLR_SETUP_END (1<<7) /* Clear "Setup Ends" Bit (w) */
+#define EP0_CLR_OUT (1<<6) /* Clear "Out packet ready" Bit (w) */
+#define EP0_SEND_STALL (1<<5) /* Send STALL Handshake (rw) */
+#define EP0_SETUP_END (1<<4) /* Setup Ends (r) */
+
+#define EP0_DATA_END (1<<3) /* Data end (rw) */
+#define EP0_SENT_STALL (1<<2) /* Sent Stall Handshake (r) */
+#define EP0_IN_PKT_RDY (1<<1) /* In packet ready (rw) */
+#define EP0_OUT_PKT_RDY (1<<0) /* Out packet ready (r) */
+
+/* general CSR */
+#define OUT_PKT_RDY (1<<0)
+#define IN_PKT_RDY (1<<0)
+
+/*
+ * IN/OUT MAXP register
+ */
+#define USB_OUT_MAXP_MAXP (0xF)
+#define USB_IN_MAXP_MAXP (0xF)
+
+// Max packet size
+//#define EP0_PACKETSIZE 0x10
+#define EP0_PACKETSIZE 0x8
+#define EP0_MAXPACKETSIZE 0x10
+
+#define UDC_MAX_ENDPOINTS 4
+
+#define WAIT_FOR_SETUP 0
+#define DATA_STATE_XMIT 1
+#define DATA_STATE_NEED_ZLP 2
+#define WAIT_FOR_OUT_STATUS 3
+#define DATA_STATE_RECV 4
+
+/* ********************************************************************************************* */
+/* IO
+ */
+
+typedef enum ep_type {
+ ep_control, ep_bulk_in, ep_bulk_out, ep_interrupt
+} ep_type_t;
+
+struct lh7a40x_ep {
+ struct usb_ep ep;
+ struct lh7a40x_udc *dev;
+
+ const struct usb_endpoint_descriptor *desc;
+ struct list_head queue;
+ unsigned long pio_irqs;
+
+ u8 stopped;
+ u8 bEndpointAddress;
+ u8 bmAttributes;
+
+ ep_type_t ep_type;
+ u32 fifo;
+ u32 csr1;
+ u32 csr2;
+};
+
+struct lh7a40x_request {
+ struct usb_request req;
+ struct list_head queue;
+};
+
+struct lh7a40x_udc {
+ struct usb_gadget gadget;
+ struct usb_gadget_driver *driver;
+ struct device *dev;
+ spinlock_t lock;
+
+ int ep0state;
+ struct lh7a40x_ep ep[UDC_MAX_ENDPOINTS];
+
+ unsigned char usb_address;
+
+ unsigned req_pending:1, req_std:1, req_config:1;
+};
+
+extern struct lh7a40x_udc *the_controller;
+
+#define ep_is_in(EP) (((EP)->bEndpointAddress&USB_DIR_IN)==USB_DIR_IN)
+#define ep_index(EP) ((EP)->bEndpointAddress&0xF)
+#define ep_maxpacket(EP) ((EP)->ep.maxpacket)
+
+#endif
diff --git a/drivers/usb/gadget/ndis.h b/drivers/usb/gadget/ndis.h
new file mode 100644
index 000000000000..c553bbf68cab
--- /dev/null
+++ b/drivers/usb/gadget/ndis.h
@@ -0,0 +1,217 @@
+/*
+ * ndis.h
+ *
+ * ntddndis.h modified by Benedikt Spranger <b.spranger@pengutronix.de>
+ *
+ * Thanks to the cygwin development team,
+ * espacially to Casper S. Hornstrup <chorns@users.sourceforge.net>
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#ifndef _LINUX_NDIS_H
+#define _LINUX_NDIS_H
+
+
+#define NDIS_STATUS_MULTICAST_FULL 0xC0010009
+#define NDIS_STATUS_MULTICAST_EXISTS 0xC001000A
+#define NDIS_STATUS_MULTICAST_NOT_FOUND 0xC001000B
+
+enum NDIS_DEVICE_POWER_STATE {
+ NdisDeviceStateUnspecified = 0,
+ NdisDeviceStateD0,
+ NdisDeviceStateD1,
+ NdisDeviceStateD2,
+ NdisDeviceStateD3,
+ NdisDeviceStateMaximum
+};
+
+struct NDIS_PM_WAKE_UP_CAPABILITIES {
+ enum NDIS_DEVICE_POWER_STATE MinMagicPacketWakeUp;
+ enum NDIS_DEVICE_POWER_STATE MinPatternWakeUp;
+ enum NDIS_DEVICE_POWER_STATE MinLinkChangeWakeUp;
+};
+
+/* NDIS_PNP_CAPABILITIES.Flags constants */
+#define NDIS_DEVICE_WAKE_UP_ENABLE 0x00000001
+#define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002
+#define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004
+
+struct NDIS_PNP_CAPABILITIES {
+ u32 Flags;
+ struct NDIS_PM_WAKE_UP_CAPABILITIES WakeUpCapabilities;
+};
+
+struct NDIS_PM_PACKET_PATTERN {
+ u32 Priority;
+ u32 Reserved;
+ u32 MaskSize;
+ u32 PatternOffset;
+ u32 PatternSize;
+ u32 PatternFlags;
+};
+
+
+/* Required Object IDs (OIDs) */
+#define OID_GEN_SUPPORTED_LIST 0x00010101
+#define OID_GEN_HARDWARE_STATUS 0x00010102
+#define OID_GEN_MEDIA_SUPPORTED 0x00010103
+#define OID_GEN_MEDIA_IN_USE 0x00010104
+#define OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105
+#define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106
+#define OID_GEN_LINK_SPEED 0x00010107
+#define OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108
+#define OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109
+#define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A
+#define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B
+#define OID_GEN_VENDOR_ID 0x0001010C
+#define OID_GEN_VENDOR_DESCRIPTION 0x0001010D
+#define OID_GEN_CURRENT_PACKET_FILTER 0x0001010E
+#define OID_GEN_CURRENT_LOOKAHEAD 0x0001010F
+#define OID_GEN_DRIVER_VERSION 0x00010110
+#define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111
+#define OID_GEN_PROTOCOL_OPTIONS 0x00010112
+#define OID_GEN_MAC_OPTIONS 0x00010113
+#define OID_GEN_MEDIA_CONNECT_STATUS 0x00010114
+#define OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115
+#define OID_GEN_VENDOR_DRIVER_VERSION 0x00010116
+#define OID_GEN_SUPPORTED_GUIDS 0x00010117
+#define OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118
+#define OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119
+#define OID_GEN_MACHINE_NAME 0x0001021A
+#define OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B
+#define OID_GEN_VLAN_ID 0x0001021C
+
+/* Optional OIDs */
+#define OID_GEN_MEDIA_CAPABILITIES 0x00010201
+#define OID_GEN_PHYSICAL_MEDIUM 0x00010202
+
+/* Required statistics OIDs */
+#define OID_GEN_XMIT_OK 0x00020101
+#define OID_GEN_RCV_OK 0x00020102
+#define OID_GEN_XMIT_ERROR 0x00020103
+#define OID_GEN_RCV_ERROR 0x00020104
+#define OID_GEN_RCV_NO_BUFFER 0x00020105
+
+/* Optional statistics OIDs */
+#define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201
+#define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202
+#define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203
+#define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204
+#define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205
+#define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206
+#define OID_GEN_DIRECTED_BYTES_RCV 0x00020207
+#define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208
+#define OID_GEN_MULTICAST_BYTES_RCV 0x00020209
+#define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A
+#define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B
+#define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C
+#define OID_GEN_RCV_CRC_ERROR 0x0002020D
+#define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E
+#define OID_GEN_GET_TIME_CAPS 0x0002020F
+#define OID_GEN_GET_NETCARD_TIME 0x00020210
+#define OID_GEN_NETCARD_LOAD 0x00020211
+#define OID_GEN_DEVICE_PROFILE 0x00020212
+#define OID_GEN_INIT_TIME_MS 0x00020213
+#define OID_GEN_RESET_COUNTS 0x00020214
+#define OID_GEN_MEDIA_SENSE_COUNTS 0x00020215
+#define OID_GEN_FRIENDLY_NAME 0x00020216
+#define OID_GEN_MINIPORT_INFO 0x00020217
+#define OID_GEN_RESET_VERIFY_PARAMETERS 0x00020218
+
+/* IEEE 802.3 (Ethernet) OIDs */
+#define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001
+
+#define OID_802_3_PERMANENT_ADDRESS 0x01010101
+#define OID_802_3_CURRENT_ADDRESS 0x01010102
+#define OID_802_3_MULTICAST_LIST 0x01010103
+#define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104
+#define OID_802_3_MAC_OPTIONS 0x01010105
+#define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101
+#define OID_802_3_XMIT_ONE_COLLISION 0x01020102
+#define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103
+#define OID_802_3_XMIT_DEFERRED 0x01020201
+#define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202
+#define OID_802_3_RCV_OVERRUN 0x01020203
+#define OID_802_3_XMIT_UNDERRUN 0x01020204
+#define OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205
+#define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206
+#define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207
+
+/* OID_GEN_MINIPORT_INFO constants */
+#define NDIS_MINIPORT_BUS_MASTER 0x00000001
+#define NDIS_MINIPORT_WDM_DRIVER 0x00000002
+#define NDIS_MINIPORT_SG_LIST 0x00000004
+#define NDIS_MINIPORT_SUPPORTS_MEDIA_QUERY 0x00000008
+#define NDIS_MINIPORT_INDICATES_PACKETS 0x00000010
+#define NDIS_MINIPORT_IGNORE_PACKET_QUEUE 0x00000020
+#define NDIS_MINIPORT_IGNORE_REQUEST_QUEUE 0x00000040
+#define NDIS_MINIPORT_IGNORE_TOKEN_RING_ERRORS 0x00000080
+#define NDIS_MINIPORT_INTERMEDIATE_DRIVER 0x00000100
+#define NDIS_MINIPORT_IS_NDIS_5 0x00000200
+#define NDIS_MINIPORT_IS_CO 0x00000400
+#define NDIS_MINIPORT_DESERIALIZE 0x00000800
+#define NDIS_MINIPORT_REQUIRES_MEDIA_POLLING 0x00001000
+#define NDIS_MINIPORT_SUPPORTS_MEDIA_SENSE 0x00002000
+#define NDIS_MINIPORT_NETBOOT_CARD 0x00004000
+#define NDIS_MINIPORT_PM_SUPPORTED 0x00008000
+#define NDIS_MINIPORT_SUPPORTS_MAC_ADDRESS_OVERWRITE 0x00010000
+#define NDIS_MINIPORT_USES_SAFE_BUFFER_APIS 0x00020000
+#define NDIS_MINIPORT_HIDDEN 0x00040000
+#define NDIS_MINIPORT_SWENUM 0x00080000
+#define NDIS_MINIPORT_SURPRISE_REMOVE_OK 0x00100000
+#define NDIS_MINIPORT_NO_HALT_ON_SUSPEND 0x00200000
+#define NDIS_MINIPORT_HARDWARE_DEVICE 0x00400000
+#define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000
+#define NDIS_MINIPORT_64BITS_DMA 0x01000000
+
+#define NDIS_MEDIUM_802_3 0x00000000
+#define NDIS_MEDIUM_802_5 0x00000001
+#define NDIS_MEDIUM_FDDI 0x00000002
+#define NDIS_MEDIUM_WAN 0x00000003
+#define NDIS_MEDIUM_LOCAL_TALK 0x00000004
+#define NDIS_MEDIUM_DIX 0x00000005
+#define NDIS_MEDIUM_ARCENT_RAW 0x00000006
+#define NDIS_MEDIUM_ARCENT_878_2 0x00000007
+#define NDIS_MEDIUM_ATM 0x00000008
+#define NDIS_MEDIUM_WIRELESS_LAN 0x00000009
+#define NDIS_MEDIUM_IRDA 0x0000000A
+#define NDIS_MEDIUM_BPC 0x0000000B
+#define NDIS_MEDIUM_CO_WAN 0x0000000C
+#define NDIS_MEDIUM_1394 0x0000000D
+
+#define NDIS_PACKET_TYPE_DIRECTED 0x00000001
+#define NDIS_PACKET_TYPE_MULTICAST 0x00000002
+#define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004
+#define NDIS_PACKET_TYPE_BROADCAST 0x00000008
+#define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010
+#define NDIS_PACKET_TYPE_PROMISCUOUS 0x00000020
+#define NDIS_PACKET_TYPE_SMT 0x00000040
+#define NDIS_PACKET_TYPE_ALL_LOCAL 0x00000080
+#define NDIS_PACKET_TYPE_GROUP 0x00000100
+#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00000200
+#define NDIS_PACKET_TYPE_FUNCTIONAL 0x00000400
+#define NDIS_PACKET_TYPE_MAC_FRAME 0x00000800
+
+#define NDIS_MEDIA_STATE_CONNECTED 0x00000000
+#define NDIS_MEDIA_STATE_DISCONNECTED 0x00000001
+
+#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001
+#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002
+#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004
+#define NDIS_MAC_OPTION_NO_LOOPBACK 0x00000008
+#define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010
+#define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020
+#define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040
+#define NDIS_MAC_OPTION_RESERVED 0x80000000
+
+#endif /* _LINUX_NDIS_H */
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
new file mode 100644
index 000000000000..e5457f2026cc
--- /dev/null
+++ b/drivers/usb/gadget/net2280.c
@@ -0,0 +1,2967 @@
+/*
+ * Driver for the PLX NET2280 USB device controller.
+ * Specs and errata are available from <http://www.plxtech.com>.
+ *
+ * PLX Technology Inc. (formerly NetChip Technology) supported the
+ * development of this driver.
+ *
+ *
+ * CODE STATUS HIGHLIGHTS
+ *
+ * This driver should work well with most "gadget" drivers, including
+ * the File Storage, Serial, and Ethernet/RNDIS gadget drivers
+ * as well as Gadget Zero and Gadgetfs.
+ *
+ * DMA is enabled by default. Drivers using transfer queues might use
+ * DMA chaining to remove IRQ latencies between transfers. (Except when
+ * short OUT transfers happen.) Drivers can use the req->no_interrupt
+ * hint to completely eliminate some IRQs, if a later IRQ is guaranteed
+ * and DMA chaining is enabled.
+ *
+ * Note that almost all the errata workarounds here are only needed for
+ * rev1 chips. Rev1a silicon (0110) fixes almost all of them.
+ */
+
+/*
+ * Copyright (C) 2003 David Brownell
+ * Copyright (C) 2003-2005 PLX Technology, Inc.
+ *
+ * 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
+ */
+
+#undef DEBUG /* messages on error and most fault paths */
+#undef VERBOSE /* extra debug messages (success too) */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/moduleparam.h>
+#include <linux/device.h>
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+
+
+#define DRIVER_DESC "PLX NET2280 USB Peripheral Controller"
+#define DRIVER_VERSION "2005 Feb 03"
+
+#define DMA_ADDR_INVALID (~(dma_addr_t)0)
+#define EP_DONTUSE 13 /* nonzero */
+
+#define USE_RDK_LEDS /* GPIO pins control three LEDs */
+
+
+static const char driver_name [] = "net2280";
+static const char driver_desc [] = DRIVER_DESC;
+
+static const char ep0name [] = "ep0";
+static const char *ep_name [] = {
+ ep0name,
+ "ep-a", "ep-b", "ep-c", "ep-d",
+ "ep-e", "ep-f",
+};
+
+/* use_dma -- general goodness, fewer interrupts, less cpu load (vs PIO)
+ * use_dma_chaining -- dma descriptor queueing gives even more irq reduction
+ *
+ * The net2280 DMA engines are not tightly integrated with their FIFOs;
+ * not all cases are (yet) handled well in this driver or the silicon.
+ * Some gadget drivers work better with the dma support here than others.
+ * These two parameters let you use PIO or more aggressive DMA.
+ */
+static int use_dma = 1;
+static int use_dma_chaining = 0;
+
+/* "modprobe net2280 use_dma=n" etc */
+module_param (use_dma, bool, S_IRUGO);
+module_param (use_dma_chaining, bool, S_IRUGO);
+
+
+/* mode 0 == ep-{a,b,c,d} 1K fifo each
+ * mode 1 == ep-{a,b} 2K fifo each, ep-{c,d} unavailable
+ * mode 2 == ep-a 2K fifo, ep-{b,c} 1K each, ep-d unavailable
+ */
+static ushort fifo_mode = 0;
+
+/* "modprobe net2280 fifo_mode=1" etc */
+module_param (fifo_mode, ushort, 0644);
+
+/* enable_suspend -- When enabled, the driver will respond to
+ * USB suspend requests by powering down the NET2280. Otherwise,
+ * USB suspend requests will be ignored. This is acceptible for
+ * self-powered devices, and helps avoid some quirks.
+ */
+static int enable_suspend = 0;
+
+/* "modprobe net2280 enable_suspend=1" etc */
+module_param (enable_suspend, bool, S_IRUGO);
+
+
+#define DIR_STRING(bAddress) (((bAddress) & USB_DIR_IN) ? "in" : "out")
+
+#if defined(CONFIG_USB_GADGET_DEBUG_FILES) || defined (DEBUG)
+static char *type_string (u8 bmAttributes)
+{
+ switch ((bmAttributes) & USB_ENDPOINT_XFERTYPE_MASK) {
+ case USB_ENDPOINT_XFER_BULK: return "bulk";
+ case USB_ENDPOINT_XFER_ISOC: return "iso";
+ case USB_ENDPOINT_XFER_INT: return "intr";
+ };
+ return "control";
+}
+#endif
+
+#include "net2280.h"
+
+#define valid_bit __constant_cpu_to_le32 (1 << VALID_BIT)
+#define dma_done_ie __constant_cpu_to_le32 (1 << DMA_DONE_INTERRUPT_ENABLE)
+
+/*-------------------------------------------------------------------------*/
+
+static int
+net2280_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
+{
+ struct net2280 *dev;
+ struct net2280_ep *ep;
+ u32 max, tmp;
+ unsigned long flags;
+
+ ep = container_of (_ep, struct net2280_ep, ep);
+ if (!_ep || !desc || ep->desc || _ep->name == ep0name
+ || desc->bDescriptorType != USB_DT_ENDPOINT)
+ return -EINVAL;
+ dev = ep->dev;
+ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
+ return -ESHUTDOWN;
+
+ /* erratum 0119 workaround ties up an endpoint number */
+ if ((desc->bEndpointAddress & 0x0f) == EP_DONTUSE)
+ return -EDOM;
+
+ /* sanity check ep-e/ep-f since their fifos are small */
+ max = le16_to_cpu (desc->wMaxPacketSize) & 0x1fff;
+ if (ep->num > 4 && max > 64)
+ return -ERANGE;
+
+ spin_lock_irqsave (&dev->lock, flags);
+ _ep->maxpacket = max & 0x7ff;
+ ep->desc = desc;
+
+ /* ep_reset() has already been called */
+ ep->stopped = 0;
+ ep->out_overflow = 0;
+
+ /* set speed-dependent max packet; may kick in high bandwidth */
+ set_idx_reg (dev->regs, REG_EP_MAXPKT (dev, ep->num), max);
+
+ /* FIFO lines can't go to different packets. PIO is ok, so
+ * use it instead of troublesome (non-bulk) multi-packet DMA.
+ */
+ if (ep->dma && (max % 4) != 0 && use_dma_chaining) {
+ DEBUG (ep->dev, "%s, no dma for maxpacket %d\n",
+ ep->ep.name, ep->ep.maxpacket);
+ ep->dma = NULL;
+ }
+
+ /* set type, direction, address; reset fifo counters */
+ writel ((1 << FIFO_FLUSH), &ep->regs->ep_stat);
+ tmp = (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK);
+ if (tmp == USB_ENDPOINT_XFER_INT) {
+ /* erratum 0105 workaround prevents hs NYET */
+ if (dev->chiprev == 0100
+ && dev->gadget.speed == USB_SPEED_HIGH
+ && !(desc->bEndpointAddress & USB_DIR_IN))
+ writel ((1 << CLEAR_NAK_OUT_PACKETS_MODE),
+ &ep->regs->ep_rsp);
+ } else if (tmp == USB_ENDPOINT_XFER_BULK) {
+ /* catch some particularly blatant driver bugs */
+ if ((dev->gadget.speed == USB_SPEED_HIGH
+ && max != 512)
+ || (dev->gadget.speed == USB_SPEED_FULL
+ && max > 64)) {
+ spin_unlock_irqrestore (&dev->lock, flags);
+ return -ERANGE;
+ }
+ }
+ ep->is_iso = (tmp == USB_ENDPOINT_XFER_ISOC) ? 1 : 0;
+ tmp <<= ENDPOINT_TYPE;
+ tmp |= desc->bEndpointAddress;
+ tmp |= (4 << ENDPOINT_BYTE_COUNT); /* default full fifo lines */
+ tmp |= 1 << ENDPOINT_ENABLE;
+ wmb ();
+
+ /* for OUT transfers, block the rx fifo until a read is posted */
+ ep->is_in = (tmp & USB_DIR_IN) != 0;
+ if (!ep->is_in)
+ writel ((1 << SET_NAK_OUT_PACKETS), &ep->regs->ep_rsp);
+
+ writel (tmp, &ep->regs->ep_cfg);
+
+ /* enable irqs */
+ if (!ep->dma) { /* pio, per-packet */
+ tmp = (1 << ep->num) | readl (&dev->regs->pciirqenb0);
+ writel (tmp, &dev->regs->pciirqenb0);
+
+ tmp = (1 << DATA_PACKET_RECEIVED_INTERRUPT_ENABLE)
+ | (1 << DATA_PACKET_TRANSMITTED_INTERRUPT_ENABLE)
+ | readl (&ep->regs->ep_irqenb);
+ writel (tmp, &ep->regs->ep_irqenb);
+ } else { /* dma, per-request */
+ tmp = (1 << (8 + ep->num)); /* completion */
+ tmp |= readl (&dev->regs->pciirqenb1);
+ writel (tmp, &dev->regs->pciirqenb1);
+
+ /* for short OUT transfers, dma completions can't
+ * advance the queue; do it pio-style, by hand.
+ * NOTE erratum 0112 workaround #2
+ */
+ if ((desc->bEndpointAddress & USB_DIR_IN) == 0) {
+ tmp = (1 << SHORT_PACKET_TRANSFERRED_INTERRUPT_ENABLE);
+ writel (tmp, &ep->regs->ep_irqenb);
+
+ tmp = (1 << ep->num) | readl (&dev->regs->pciirqenb0);
+ writel (tmp, &dev->regs->pciirqenb0);
+ }
+ }
+
+ tmp = desc->bEndpointAddress;
+ DEBUG (dev, "enabled %s (ep%d%s-%s) %s max %04x\n",
+ _ep->name, tmp & 0x0f, DIR_STRING (tmp),
+ type_string (desc->bmAttributes),
+ ep->dma ? "dma" : "pio", max);
+
+ /* pci writes may still be posted */
+ spin_unlock_irqrestore (&dev->lock, flags);
+ return 0;
+}
+
+static int handshake (u32 __iomem *ptr, u32 mask, u32 done, int usec)
+{
+ u32 result;
+
+ do {
+ result = readl (ptr);
+ if (result == ~(u32)0) /* "device unplugged" */
+ return -ENODEV;
+ result &= mask;
+ if (result == done)
+ return 0;
+ udelay (1);
+ usec--;
+ } while (usec > 0);
+ return -ETIMEDOUT;
+}
+
+static struct usb_ep_ops net2280_ep_ops;
+
+static void ep_reset (struct net2280_regs __iomem *regs, struct net2280_ep *ep)
+{
+ u32 tmp;
+
+ ep->desc = NULL;
+ INIT_LIST_HEAD (&ep->queue);
+
+ ep->ep.maxpacket = ~0;
+ ep->ep.ops = &net2280_ep_ops;
+
+ /* disable the dma, irqs, endpoint... */
+ if (ep->dma) {
+ writel (0, &ep->dma->dmactl);
+ writel ( (1 << DMA_SCATTER_GATHER_DONE_INTERRUPT)
+ | (1 << DMA_TRANSACTION_DONE_INTERRUPT)
+ | (1 << DMA_ABORT)
+ , &ep->dma->dmastat);
+
+ tmp = readl (&regs->pciirqenb0);
+ tmp &= ~(1 << ep->num);
+ writel (tmp, &regs->pciirqenb0);
+ } else {
+ tmp = readl (&regs->pciirqenb1);
+ tmp &= ~(1 << (8 + ep->num)); /* completion */
+ writel (tmp, &regs->pciirqenb1);
+ }
+ writel (0, &ep->regs->ep_irqenb);
+
+ /* init to our chosen defaults, notably so that we NAK OUT
+ * packets until the driver queues a read (+note erratum 0112)
+ */
+ tmp = (1 << SET_NAK_OUT_PACKETS_MODE)
+ | (1 << SET_NAK_OUT_PACKETS)
+ | (1 << CLEAR_EP_HIDE_STATUS_PHASE)
+ | (1 << CLEAR_INTERRUPT_MODE);
+
+ if (ep->num != 0) {
+ tmp |= (1 << CLEAR_ENDPOINT_TOGGLE)
+ | (1 << CLEAR_ENDPOINT_HALT);
+ }
+ writel (tmp, &ep->regs->ep_rsp);
+
+ /* scrub most status bits, and flush any fifo state */
+ writel ( (1 << TIMEOUT)
+ | (1 << USB_STALL_SENT)
+ | (1 << USB_IN_NAK_SENT)
+ | (1 << USB_IN_ACK_RCVD)
+ | (1 << USB_OUT_PING_NAK_SENT)
+ | (1 << USB_OUT_ACK_SENT)
+ | (1 << FIFO_OVERFLOW)
+ | (1 << FIFO_UNDERFLOW)
+ | (1 << FIFO_FLUSH)
+ | (1 << SHORT_PACKET_OUT_DONE_INTERRUPT)
+ | (1 << SHORT_PACKET_TRANSFERRED_INTERRUPT)
+ | (1 << DATA_PACKET_RECEIVED_INTERRUPT)
+ | (1 << DATA_PACKET_TRANSMITTED_INTERRUPT)
+ | (1 << DATA_OUT_PING_TOKEN_INTERRUPT)
+ | (1 << DATA_IN_TOKEN_INTERRUPT)
+ , &ep->regs->ep_stat);
+
+ /* fifo size is handled separately */
+}
+
+static void nuke (struct net2280_ep *);
+
+static int net2280_disable (struct usb_ep *_ep)
+{
+ struct net2280_ep *ep;
+ unsigned long flags;
+
+ ep = container_of (_ep, struct net2280_ep, ep);
+ if (!_ep || !ep->desc || _ep->name == ep0name)
+ return -EINVAL;
+
+ spin_lock_irqsave (&ep->dev->lock, flags);
+ nuke (ep);
+ ep_reset (ep->dev->regs, ep);
+
+ VDEBUG (ep->dev, "disabled %s %s\n",
+ ep->dma ? "dma" : "pio", _ep->name);
+
+ /* synch memory views with the device */
+ (void) readl (&ep->regs->ep_cfg);
+
+ if (use_dma && !ep->dma && ep->num >= 1 && ep->num <= 4)
+ ep->dma = &ep->dev->dma [ep->num - 1];
+
+ spin_unlock_irqrestore (&ep->dev->lock, flags);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct usb_request *
+net2280_alloc_request (struct usb_ep *_ep, int gfp_flags)
+{
+ struct net2280_ep *ep;
+ struct net2280_request *req;
+
+ if (!_ep)
+ return NULL;
+ ep = container_of (_ep, struct net2280_ep, ep);
+
+ req = kmalloc (sizeof *req, gfp_flags);
+ if (!req)
+ return NULL;
+
+ memset (req, 0, sizeof *req);
+ req->req.dma = DMA_ADDR_INVALID;
+ INIT_LIST_HEAD (&req->queue);
+
+ /* this dma descriptor may be swapped with the previous dummy */
+ if (ep->dma) {
+ struct net2280_dma *td;
+
+ td = pci_pool_alloc (ep->dev->requests, gfp_flags,
+ &req->td_dma);
+ if (!td) {
+ kfree (req);
+ return NULL;
+ }
+ td->dmacount = 0; /* not VALID */
+ td->dmaaddr = __constant_cpu_to_le32 (DMA_ADDR_INVALID);
+ td->dmadesc = td->dmaaddr;
+ req->td = td;
+ }
+ return &req->req;
+}
+
+static void
+net2280_free_request (struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct net2280_ep *ep;
+ struct net2280_request *req;
+
+ ep = container_of (_ep, struct net2280_ep, ep);
+ if (!_ep || !_req)
+ return;
+
+ req = container_of (_req, struct net2280_request, req);
+ WARN_ON (!list_empty (&req->queue));
+ if (req->td)
+ pci_pool_free (ep->dev->requests, req->td, req->td_dma);
+ kfree (req);
+}
+
+/*-------------------------------------------------------------------------*/
+
+#undef USE_KMALLOC
+
+/* many common platforms have dma-coherent caches, which means that it's
+ * safe to use kmalloc() memory for all i/o buffers without using any
+ * cache flushing calls. (unless you're trying to share cache lines
+ * between dma and non-dma activities, which is a slow idea in any case.)
+ *
+ * other platforms need more care, with 2.5 having a moderately general
+ * solution (which falls down for allocations smaller than one page)
+ * that improves significantly on the 2.4 PCI allocators by removing
+ * the restriction that memory never be freed in_interrupt().
+ */
+#if defined(CONFIG_X86)
+#define USE_KMALLOC
+
+#elif defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
+#define USE_KMALLOC
+
+#elif defined(CONFIG_MIPS) && !defined(CONFIG_NONCOHERENT_IO)
+#define USE_KMALLOC
+
+/* FIXME there are other cases, including an x86-64 one ... */
+#endif
+
+/* allocating buffers this way eliminates dma mapping overhead, which
+ * on some platforms will mean eliminating a per-io buffer copy. with
+ * some kinds of system caches, further tweaks may still be needed.
+ */
+static void *
+net2280_alloc_buffer (
+ struct usb_ep *_ep,
+ unsigned bytes,
+ dma_addr_t *dma,
+ int gfp_flags
+)
+{
+ void *retval;
+ struct net2280_ep *ep;
+
+ ep = container_of (_ep, struct net2280_ep, ep);
+ if (!_ep)
+ return NULL;
+ *dma = DMA_ADDR_INVALID;
+
+#if defined(USE_KMALLOC)
+ retval = kmalloc(bytes, gfp_flags);
+ if (retval)
+ *dma = virt_to_phys(retval);
+#else
+ if (ep->dma) {
+ /* the main problem with this call is that it wastes memory
+ * on typical 1/N page allocations: it allocates 1-N pages.
+ */
+#warning Using dma_alloc_coherent even with buffers smaller than a page.
+ retval = dma_alloc_coherent(&ep->dev->pdev->dev,
+ bytes, dma, gfp_flags);
+ } else
+ retval = kmalloc(bytes, gfp_flags);
+#endif
+ return retval;
+}
+
+static void
+net2280_free_buffer (
+ struct usb_ep *_ep,
+ void *buf,
+ dma_addr_t dma,
+ unsigned bytes
+) {
+ /* free memory into the right allocator */
+#ifndef USE_KMALLOC
+ if (dma != DMA_ADDR_INVALID) {
+ struct net2280_ep *ep;
+
+ ep = container_of(_ep, struct net2280_ep, ep);
+ if (!_ep)
+ return;
+ dma_free_coherent(&ep->dev->pdev->dev, bytes, buf, dma);
+ } else
+#endif
+ kfree (buf);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* load a packet into the fifo we use for usb IN transfers.
+ * works for all endpoints.
+ *
+ * NOTE: pio with ep-a..ep-d could stuff multiple packets into the fifo
+ * at a time, but this code is simpler because it knows it only writes
+ * one packet. ep-a..ep-d should use dma instead.
+ */
+static void
+write_fifo (struct net2280_ep *ep, struct usb_request *req)
+{
+ struct net2280_ep_regs __iomem *regs = ep->regs;
+ u8 *buf;
+ u32 tmp;
+ unsigned count, total;
+
+ /* INVARIANT: fifo is currently empty. (testable) */
+
+ if (req) {
+ buf = req->buf + req->actual;
+ prefetch (buf);
+ total = req->length - req->actual;
+ } else {
+ total = 0;
+ buf = NULL;
+ }
+
+ /* write just one packet at a time */
+ count = ep->ep.maxpacket;
+ if (count > total) /* min() cannot be used on a bitfield */
+ count = total;
+
+ VDEBUG (ep->dev, "write %s fifo (IN) %d bytes%s req %p\n",
+ ep->ep.name, count,
+ (count != ep->ep.maxpacket) ? " (short)" : "",
+ req);
+ while (count >= 4) {
+ /* NOTE be careful if you try to align these. fifo lines
+ * should normally be full (4 bytes) and successive partial
+ * lines are ok only in certain cases.
+ */
+ tmp = get_unaligned ((u32 *)buf);
+ cpu_to_le32s (&tmp);
+ writel (tmp, &regs->ep_data);
+ buf += 4;
+ count -= 4;
+ }
+
+ /* last fifo entry is "short" unless we wrote a full packet.
+ * also explicitly validate last word in (periodic) transfers
+ * when maxpacket is not a multiple of 4 bytes.
+ */
+ if (count || total < ep->ep.maxpacket) {
+ tmp = count ? get_unaligned ((u32 *)buf) : count;
+ cpu_to_le32s (&tmp);
+ set_fifo_bytecount (ep, count & 0x03);
+ writel (tmp, &regs->ep_data);
+ }
+
+ /* pci writes may still be posted */
+}
+
+/* work around erratum 0106: PCI and USB race over the OUT fifo.
+ * caller guarantees chiprev 0100, out endpoint is NAKing, and
+ * there's no real data in the fifo.
+ *
+ * NOTE: also used in cases where that erratum doesn't apply:
+ * where the host wrote "too much" data to us.
+ */
+static void out_flush (struct net2280_ep *ep)
+{
+ u32 __iomem *statp;
+ u32 tmp;
+
+ ASSERT_OUT_NAKING (ep);
+
+ statp = &ep->regs->ep_stat;
+ writel ( (1 << DATA_OUT_PING_TOKEN_INTERRUPT)
+ | (1 << DATA_PACKET_RECEIVED_INTERRUPT)
+ , statp);
+ writel ((1 << FIFO_FLUSH), statp);
+ mb ();
+ tmp = readl (statp);
+ if (tmp & (1 << DATA_OUT_PING_TOKEN_INTERRUPT)
+ /* high speed did bulk NYET; fifo isn't filling */
+ && ep->dev->gadget.speed == USB_SPEED_FULL) {
+ unsigned usec;
+
+ usec = 50; /* 64 byte bulk/interrupt */
+ handshake (statp, (1 << USB_OUT_PING_NAK_SENT),
+ (1 << USB_OUT_PING_NAK_SENT), usec);
+ /* NAK done; now CLEAR_NAK_OUT_PACKETS is safe */
+ }
+}
+
+/* unload packet(s) from the fifo we use for usb OUT transfers.
+ * returns true iff the request completed, because of short packet
+ * or the request buffer having filled with full packets.
+ *
+ * for ep-a..ep-d this will read multiple packets out when they
+ * have been accepted.
+ */
+static int
+read_fifo (struct net2280_ep *ep, struct net2280_request *req)
+{
+ struct net2280_ep_regs __iomem *regs = ep->regs;
+ u8 *buf = req->req.buf + req->req.actual;
+ unsigned count, tmp, is_short;
+ unsigned cleanup = 0, prevent = 0;
+
+ /* erratum 0106 ... packets coming in during fifo reads might
+ * be incompletely rejected. not all cases have workarounds.
+ */
+ if (ep->dev->chiprev == 0x0100
+ && ep->dev->gadget.speed == USB_SPEED_FULL) {
+ udelay (1);
+ tmp = readl (&ep->regs->ep_stat);
+ if ((tmp & (1 << NAK_OUT_PACKETS)))
+ cleanup = 1;
+ else if ((tmp & (1 << FIFO_FULL))) {
+ start_out_naking (ep);
+ prevent = 1;
+ }
+ /* else: hope we don't see the problem */
+ }
+
+ /* never overflow the rx buffer. the fifo reads packets until
+ * it sees a short one; we might not be ready for them all.
+ */
+ prefetchw (buf);
+ count = readl (&regs->ep_avail);
+ if (unlikely (count == 0)) {
+ udelay (1);
+ tmp = readl (&ep->regs->ep_stat);
+ count = readl (&regs->ep_avail);
+ /* handled that data already? */
+ if (count == 0 && (tmp & (1 << NAK_OUT_PACKETS)) == 0)
+ return 0;
+ }
+
+ tmp = req->req.length - req->req.actual;
+ if (count > tmp) {
+ /* as with DMA, data overflow gets flushed */
+ if ((tmp % ep->ep.maxpacket) != 0) {
+ ERROR (ep->dev,
+ "%s out fifo %d bytes, expected %d\n",
+ ep->ep.name, count, tmp);
+ req->req.status = -EOVERFLOW;
+ cleanup = 1;
+ /* NAK_OUT_PACKETS will be set, so flushing is safe;
+ * the next read will start with the next packet
+ */
+ } /* else it's a ZLP, no worries */
+ count = tmp;
+ }
+ req->req.actual += count;
+
+ is_short = (count == 0) || ((count % ep->ep.maxpacket) != 0);
+
+ VDEBUG (ep->dev, "read %s fifo (OUT) %d bytes%s%s%s req %p %d/%d\n",
+ ep->ep.name, count, is_short ? " (short)" : "",
+ cleanup ? " flush" : "", prevent ? " nak" : "",
+ req, req->req.actual, req->req.length);
+
+ while (count >= 4) {
+ tmp = readl (&regs->ep_data);
+ cpu_to_le32s (&tmp);
+ put_unaligned (tmp, (u32 *)buf);
+ buf += 4;
+ count -= 4;
+ }
+ if (count) {
+ tmp = readl (&regs->ep_data);
+ /* LE conversion is implicit here: */
+ do {
+ *buf++ = (u8) tmp;
+ tmp >>= 8;
+ } while (--count);
+ }
+ if (cleanup)
+ out_flush (ep);
+ if (prevent) {
+ writel ((1 << CLEAR_NAK_OUT_PACKETS), &ep->regs->ep_rsp);
+ (void) readl (&ep->regs->ep_rsp);
+ }
+
+ return is_short || ((req->req.actual == req->req.length)
+ && !req->req.zero);
+}
+
+/* fill out dma descriptor to match a given request */
+static void
+fill_dma_desc (struct net2280_ep *ep, struct net2280_request *req, int valid)
+{
+ struct net2280_dma *td = req->td;
+ u32 dmacount = req->req.length;
+
+ /* don't let DMA continue after a short OUT packet,
+ * so overruns can't affect the next transfer.
+ * in case of overruns on max-size packets, we can't
+ * stop the fifo from filling but we can flush it.
+ */
+ if (ep->is_in)
+ dmacount |= (1 << DMA_DIRECTION);
+ else if ((dmacount % ep->ep.maxpacket) != 0)
+ dmacount |= (1 << END_OF_CHAIN);
+
+ req->valid = valid;
+ if (valid)
+ dmacount |= (1 << VALID_BIT);
+ if (likely(!req->req.no_interrupt || !use_dma_chaining))
+ dmacount |= (1 << DMA_DONE_INTERRUPT_ENABLE);
+
+ /* td->dmadesc = previously set by caller */
+ td->dmaaddr = cpu_to_le32 (req->req.dma);
+
+ /* 2280 may be polling VALID_BIT through ep->dma->dmadesc */
+ wmb ();
+ td->dmacount = cpu_to_le32p (&dmacount);
+}
+
+static const u32 dmactl_default =
+ (1 << DMA_SCATTER_GATHER_DONE_INTERRUPT)
+ | (1 << DMA_CLEAR_COUNT_ENABLE)
+ /* erratum 0116 workaround part 1 (use POLLING) */
+ | (POLL_100_USEC << DESCRIPTOR_POLLING_RATE)
+ | (1 << DMA_VALID_BIT_POLLING_ENABLE)
+ | (1 << DMA_VALID_BIT_ENABLE)
+ | (1 << DMA_SCATTER_GATHER_ENABLE)
+ /* erratum 0116 workaround part 2 (no AUTOSTART) */
+ | (1 << DMA_ENABLE);
+
+static inline void spin_stop_dma (struct net2280_dma_regs __iomem *dma)
+{
+ handshake (&dma->dmactl, (1 << DMA_ENABLE), 0, 50);
+}
+
+static inline void stop_dma (struct net2280_dma_regs __iomem *dma)
+{
+ writel (readl (&dma->dmactl) & ~(1 << DMA_ENABLE), &dma->dmactl);
+ spin_stop_dma (dma);
+}
+
+static void start_queue (struct net2280_ep *ep, u32 dmactl, u32 td_dma)
+{
+ struct net2280_dma_regs __iomem *dma = ep->dma;
+
+ writel ((1 << VALID_BIT) | (ep->is_in << DMA_DIRECTION),
+ &dma->dmacount);
+ writel (readl (&dma->dmastat), &dma->dmastat);
+
+ writel (td_dma, &dma->dmadesc);
+ writel (dmactl, &dma->dmactl);
+
+ /* erratum 0116 workaround part 3: pci arbiter away from net2280 */
+ (void) readl (&ep->dev->pci->pcimstctl);
+
+ writel ((1 << DMA_START), &dma->dmastat);
+
+ if (!ep->is_in)
+ stop_out_naking (ep);
+}
+
+static void start_dma (struct net2280_ep *ep, struct net2280_request *req)
+{
+ u32 tmp;
+ struct net2280_dma_regs __iomem *dma = ep->dma;
+
+ /* FIXME can't use DMA for ZLPs */
+
+ /* on this path we "know" there's no dma active (yet) */
+ WARN_ON (readl (&dma->dmactl) & (1 << DMA_ENABLE));
+ writel (0, &ep->dma->dmactl);
+
+ /* previous OUT packet might have been short */
+ if (!ep->is_in && ((tmp = readl (&ep->regs->ep_stat))
+ & (1 << NAK_OUT_PACKETS)) != 0) {
+ writel ((1 << SHORT_PACKET_TRANSFERRED_INTERRUPT),
+ &ep->regs->ep_stat);
+
+ tmp = readl (&ep->regs->ep_avail);
+ if (tmp) {
+ writel (readl (&dma->dmastat), &dma->dmastat);
+
+ /* transfer all/some fifo data */
+ writel (req->req.dma, &dma->dmaaddr);
+ tmp = min (tmp, req->req.length);
+
+ /* dma irq, faking scatterlist status */
+ req->td->dmacount = cpu_to_le32 (req->req.length - tmp);
+ writel ((1 << DMA_DONE_INTERRUPT_ENABLE)
+ | tmp, &dma->dmacount);
+ req->td->dmadesc = 0;
+ req->valid = 1;
+
+ writel ((1 << DMA_ENABLE), &dma->dmactl);
+ writel ((1 << DMA_START), &dma->dmastat);
+ return;
+ }
+ }
+
+ tmp = dmactl_default;
+
+ /* force packet boundaries between dma requests, but prevent the
+ * controller from automagically writing a last "short" packet
+ * (zero length) unless the driver explicitly said to do that.
+ */
+ if (ep->is_in) {
+ if (likely ((req->req.length % ep->ep.maxpacket) != 0
+ || req->req.zero)) {
+ tmp |= (1 << DMA_FIFO_VALIDATE);
+ ep->in_fifo_validate = 1;
+ } else
+ ep->in_fifo_validate = 0;
+ }
+
+ /* init req->td, pointing to the current dummy */
+ req->td->dmadesc = cpu_to_le32 (ep->td_dma);
+ fill_dma_desc (ep, req, 1);
+
+ if (!use_dma_chaining)
+ req->td->dmacount |= __constant_cpu_to_le32 (1 << END_OF_CHAIN);
+
+ start_queue (ep, tmp, req->td_dma);
+}
+
+static inline void
+queue_dma (struct net2280_ep *ep, struct net2280_request *req, int valid)
+{
+ struct net2280_dma *end;
+ dma_addr_t tmp;
+
+ /* swap new dummy for old, link; fill and maybe activate */
+ end = ep->dummy;
+ ep->dummy = req->td;
+ req->td = end;
+
+ tmp = ep->td_dma;
+ ep->td_dma = req->td_dma;
+ req->td_dma = tmp;
+
+ end->dmadesc = cpu_to_le32 (ep->td_dma);
+
+ fill_dma_desc (ep, req, valid);
+}
+
+static void
+done (struct net2280_ep *ep, struct net2280_request *req, int status)
+{
+ struct net2280 *dev;
+ unsigned stopped = ep->stopped;
+
+ list_del_init (&req->queue);
+
+ if (req->req.status == -EINPROGRESS)
+ req->req.status = status;
+ else
+ status = req->req.status;
+
+ dev = ep->dev;
+ if (req->mapped) {
+ pci_unmap_single (dev->pdev, req->req.dma, req->req.length,
+ ep->is_in ? PCI_DMA_TODEVICE : PCI_DMA_FROMDEVICE);
+ req->req.dma = DMA_ADDR_INVALID;
+ req->mapped = 0;
+ }
+
+ if (status && status != -ESHUTDOWN)
+ VDEBUG (dev, "complete %s req %p stat %d len %u/%u\n",
+ ep->ep.name, &req->req, status,
+ req->req.actual, req->req.length);
+
+ /* don't modify queue heads during completion callback */
+ ep->stopped = 1;
+ spin_unlock (&dev->lock);
+ req->req.complete (&ep->ep, &req->req);
+ spin_lock (&dev->lock);
+ ep->stopped = stopped;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int
+net2280_queue (struct usb_ep *_ep, struct usb_request *_req, int gfp_flags)
+{
+ struct net2280_request *req;
+ struct net2280_ep *ep;
+ struct net2280 *dev;
+ unsigned long flags;
+
+ /* we always require a cpu-view buffer, so that we can
+ * always use pio (as fallback or whatever).
+ */
+ req = container_of (_req, struct net2280_request, req);
+ if (!_req || !_req->complete || !_req->buf
+ || !list_empty (&req->queue))
+ return -EINVAL;
+ if (_req->length > (~0 & DMA_BYTE_COUNT_MASK))
+ return -EDOM;
+ ep = container_of (_ep, struct net2280_ep, ep);
+ if (!_ep || (!ep->desc && ep->num != 0))
+ return -EINVAL;
+ dev = ep->dev;
+ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
+ return -ESHUTDOWN;
+
+ /* FIXME implement PIO fallback for ZLPs with DMA */
+ if (ep->dma && _req->length == 0)
+ return -EOPNOTSUPP;
+
+ /* set up dma mapping in case the caller didn't */
+ if (ep->dma && _req->dma == DMA_ADDR_INVALID) {
+ _req->dma = pci_map_single (dev->pdev, _req->buf, _req->length,
+ ep->is_in ? PCI_DMA_TODEVICE : PCI_DMA_FROMDEVICE);
+ req->mapped = 1;
+ }
+
+#if 0
+ VDEBUG (dev, "%s queue req %p, len %d buf %p\n",
+ _ep->name, _req, _req->length, _req->buf);
+#endif
+
+ spin_lock_irqsave (&dev->lock, flags);
+
+ _req->status = -EINPROGRESS;
+ _req->actual = 0;
+
+ /* kickstart this i/o queue? */
+ if (list_empty (&ep->queue) && !ep->stopped) {
+ /* use DMA if the endpoint supports it, else pio */
+ if (ep->dma)
+ start_dma (ep, req);
+ else {
+ /* maybe there's no control data, just status ack */
+ if (ep->num == 0 && _req->length == 0) {
+ allow_status (ep);
+ done (ep, req, 0);
+ VDEBUG (dev, "%s status ack\n", ep->ep.name);
+ goto done;
+ }
+
+ /* PIO ... stuff the fifo, or unblock it. */
+ if (ep->is_in)
+ write_fifo (ep, _req);
+ else if (list_empty (&ep->queue)) {
+ u32 s;
+
+ /* OUT FIFO might have packet(s) buffered */
+ s = readl (&ep->regs->ep_stat);
+ if ((s & (1 << FIFO_EMPTY)) == 0) {
+ /* note: _req->short_not_ok is
+ * ignored here since PIO _always_
+ * stops queue advance here, and
+ * _req->status doesn't change for
+ * short reads (only _req->actual)
+ */
+ if (read_fifo (ep, req)) {
+ done (ep, req, 0);
+ if (ep->num == 0)
+ allow_status (ep);
+ /* don't queue it */
+ req = NULL;
+ } else
+ s = readl (&ep->regs->ep_stat);
+ }
+
+ /* don't NAK, let the fifo fill */
+ if (req && (s & (1 << NAK_OUT_PACKETS)))
+ writel ((1 << CLEAR_NAK_OUT_PACKETS),
+ &ep->regs->ep_rsp);
+ }
+ }
+
+ } else if (ep->dma) {
+ int valid = 1;
+
+ if (ep->is_in) {
+ int expect;
+
+ /* preventing magic zlps is per-engine state, not
+ * per-transfer; irq logic must recover hiccups.
+ */
+ expect = likely (req->req.zero
+ || (req->req.length % ep->ep.maxpacket) != 0);
+ if (expect != ep->in_fifo_validate)
+ valid = 0;
+ }
+ queue_dma (ep, req, valid);
+
+ } /* else the irq handler advances the queue. */
+
+ if (req)
+ list_add_tail (&req->queue, &ep->queue);
+done:
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ /* pci writes may still be posted */
+ return 0;
+}
+
+static inline void
+dma_done (
+ struct net2280_ep *ep,
+ struct net2280_request *req,
+ u32 dmacount,
+ int status
+)
+{
+ req->req.actual = req->req.length - (DMA_BYTE_COUNT_MASK & dmacount);
+ done (ep, req, status);
+}
+
+static void restart_dma (struct net2280_ep *ep);
+
+static void scan_dma_completions (struct net2280_ep *ep)
+{
+ /* only look at descriptors that were "naturally" retired,
+ * so fifo and list head state won't matter
+ */
+ while (!list_empty (&ep->queue)) {
+ struct net2280_request *req;
+ u32 tmp;
+
+ req = list_entry (ep->queue.next,
+ struct net2280_request, queue);
+ if (!req->valid)
+ break;
+ rmb ();
+ tmp = le32_to_cpup (&req->td->dmacount);
+ if ((tmp & (1 << VALID_BIT)) != 0)
+ break;
+
+ /* SHORT_PACKET_TRANSFERRED_INTERRUPT handles "usb-short"
+ * cases where DMA must be aborted; this code handles
+ * all non-abort DMA completions.
+ */
+ if (unlikely (req->td->dmadesc == 0)) {
+ /* paranoia */
+ tmp = readl (&ep->dma->dmacount);
+ if (tmp & DMA_BYTE_COUNT_MASK)
+ break;
+ /* single transfer mode */
+ dma_done (ep, req, tmp, 0);
+ break;
+ } else if (!ep->is_in
+ && (req->req.length % ep->ep.maxpacket) != 0) {
+ tmp = readl (&ep->regs->ep_stat);
+
+ /* AVOID TROUBLE HERE by not issuing short reads from
+ * your gadget driver. That helps avoids errata 0121,
+ * 0122, and 0124; not all cases trigger the warning.
+ */
+ if ((tmp & (1 << NAK_OUT_PACKETS)) == 0) {
+ WARN (ep->dev, "%s lost packet sync!\n",
+ ep->ep.name);
+ req->req.status = -EOVERFLOW;
+ } else if ((tmp = readl (&ep->regs->ep_avail)) != 0) {
+ /* fifo gets flushed later */
+ ep->out_overflow = 1;
+ DEBUG (ep->dev, "%s dma, discard %d len %d\n",
+ ep->ep.name, tmp,
+ req->req.length);
+ req->req.status = -EOVERFLOW;
+ }
+ }
+ dma_done (ep, req, tmp, 0);
+ }
+}
+
+static void restart_dma (struct net2280_ep *ep)
+{
+ struct net2280_request *req;
+ u32 dmactl = dmactl_default;
+
+ if (ep->stopped)
+ return;
+ req = list_entry (ep->queue.next, struct net2280_request, queue);
+
+ if (!use_dma_chaining) {
+ start_dma (ep, req);
+ return;
+ }
+
+ /* the 2280 will be processing the queue unless queue hiccups after
+ * the previous transfer:
+ * IN: wanted automagic zlp, head doesn't (or vice versa)
+ * DMA_FIFO_VALIDATE doesn't init from dma descriptors.
+ * OUT: was "usb-short", we must restart.
+ */
+ if (ep->is_in && !req->valid) {
+ struct net2280_request *entry, *prev = NULL;
+ int reqmode, done = 0;
+
+ DEBUG (ep->dev, "%s dma hiccup td %p\n", ep->ep.name, req->td);
+ ep->in_fifo_validate = likely (req->req.zero
+ || (req->req.length % ep->ep.maxpacket) != 0);
+ if (ep->in_fifo_validate)
+ dmactl |= (1 << DMA_FIFO_VALIDATE);
+ list_for_each_entry (entry, &ep->queue, queue) {
+ u32 dmacount;
+
+ if (entry == req)
+ continue;
+ dmacount = entry->td->dmacount;
+ if (!done) {
+ reqmode = likely (entry->req.zero
+ || (entry->req.length
+ % ep->ep.maxpacket) != 0);
+ if (reqmode == ep->in_fifo_validate) {
+ entry->valid = 1;
+ dmacount |= valid_bit;
+ entry->td->dmacount = dmacount;
+ prev = entry;
+ continue;
+ } else {
+ /* force a hiccup */
+ prev->td->dmacount |= dma_done_ie;
+ done = 1;
+ }
+ }
+
+ /* walk the rest of the queue so unlinks behave */
+ entry->valid = 0;
+ dmacount &= ~valid_bit;
+ entry->td->dmacount = dmacount;
+ prev = entry;
+ }
+ }
+
+ writel (0, &ep->dma->dmactl);
+ start_queue (ep, dmactl, req->td_dma);
+}
+
+static void abort_dma (struct net2280_ep *ep)
+{
+ /* abort the current transfer */
+ if (likely (!list_empty (&ep->queue))) {
+ /* FIXME work around errata 0121, 0122, 0124 */
+ writel ((1 << DMA_ABORT), &ep->dma->dmastat);
+ spin_stop_dma (ep->dma);
+ } else
+ stop_dma (ep->dma);
+ scan_dma_completions (ep);
+}
+
+/* dequeue ALL requests */
+static void nuke (struct net2280_ep *ep)
+{
+ struct net2280_request *req;
+
+ /* called with spinlock held */
+ ep->stopped = 1;
+ if (ep->dma)
+ abort_dma (ep);
+ while (!list_empty (&ep->queue)) {
+ req = list_entry (ep->queue.next,
+ struct net2280_request,
+ queue);
+ done (ep, req, -ESHUTDOWN);
+ }
+}
+
+/* dequeue JUST ONE request */
+static int net2280_dequeue (struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct net2280_ep *ep;
+ struct net2280_request *req;
+ unsigned long flags;
+ u32 dmactl;
+ int stopped;
+
+ ep = container_of (_ep, struct net2280_ep, ep);
+ if (!_ep || (!ep->desc && ep->num != 0) || !_req)
+ return -EINVAL;
+
+ spin_lock_irqsave (&ep->dev->lock, flags);
+ stopped = ep->stopped;
+
+ /* quiesce dma while we patch the queue */
+ dmactl = 0;
+ ep->stopped = 1;
+ if (ep->dma) {
+ dmactl = readl (&ep->dma->dmactl);
+ /* WARNING erratum 0127 may kick in ... */
+ stop_dma (ep->dma);
+ scan_dma_completions (ep);
+ }
+
+ /* make sure it's still queued on this endpoint */
+ list_for_each_entry (req, &ep->queue, queue) {
+ if (&req->req == _req)
+ break;
+ }
+ if (&req->req != _req) {
+ spin_unlock_irqrestore (&ep->dev->lock, flags);
+ return -EINVAL;
+ }
+
+ /* queue head may be partially complete. */
+ if (ep->queue.next == &req->queue) {
+ if (ep->dma) {
+ DEBUG (ep->dev, "unlink (%s) dma\n", _ep->name);
+ _req->status = -ECONNRESET;
+ abort_dma (ep);
+ if (likely (ep->queue.next == &req->queue)) {
+ // NOTE: misreports single-transfer mode
+ req->td->dmacount = 0; /* invalidate */
+ dma_done (ep, req,
+ readl (&ep->dma->dmacount),
+ -ECONNRESET);
+ }
+ } else {
+ DEBUG (ep->dev, "unlink (%s) pio\n", _ep->name);
+ done (ep, req, -ECONNRESET);
+ }
+ req = NULL;
+
+ /* patch up hardware chaining data */
+ } else if (ep->dma && use_dma_chaining) {
+ if (req->queue.prev == ep->queue.next) {
+ writel (le32_to_cpu (req->td->dmadesc),
+ &ep->dma->dmadesc);
+ if (req->td->dmacount & dma_done_ie)
+ writel (readl (&ep->dma->dmacount)
+ | dma_done_ie,
+ &ep->dma->dmacount);
+ } else {
+ struct net2280_request *prev;
+
+ prev = list_entry (req->queue.prev,
+ struct net2280_request, queue);
+ prev->td->dmadesc = req->td->dmadesc;
+ if (req->td->dmacount & dma_done_ie)
+ prev->td->dmacount |= dma_done_ie;
+ }
+ }
+
+ if (req)
+ done (ep, req, -ECONNRESET);
+ ep->stopped = stopped;
+
+ if (ep->dma) {
+ /* turn off dma on inactive queues */
+ if (list_empty (&ep->queue))
+ stop_dma (ep->dma);
+ else if (!ep->stopped) {
+ /* resume current request, or start new one */
+ if (req)
+ writel (dmactl, &ep->dma->dmactl);
+ else
+ start_dma (ep, list_entry (ep->queue.next,
+ struct net2280_request, queue));
+ }
+ }
+
+ spin_unlock_irqrestore (&ep->dev->lock, flags);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int net2280_fifo_status (struct usb_ep *_ep);
+
+static int
+net2280_set_halt (struct usb_ep *_ep, int value)
+{
+ struct net2280_ep *ep;
+ unsigned long flags;
+ int retval = 0;
+
+ ep = container_of (_ep, struct net2280_ep, ep);
+ if (!_ep || (!ep->desc && ep->num != 0))
+ return -EINVAL;
+ if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN)
+ return -ESHUTDOWN;
+ if (ep->desc /* not ep0 */ && (ep->desc->bmAttributes & 0x03)
+ == USB_ENDPOINT_XFER_ISOC)
+ return -EINVAL;
+
+ spin_lock_irqsave (&ep->dev->lock, flags);
+ if (!list_empty (&ep->queue))
+ retval = -EAGAIN;
+ else if (ep->is_in && value && net2280_fifo_status (_ep) != 0)
+ retval = -EAGAIN;
+ else {
+ VDEBUG (ep->dev, "%s %s halt\n", _ep->name,
+ value ? "set" : "clear");
+ /* set/clear, then synch memory views with the device */
+ if (value) {
+ if (ep->num == 0)
+ ep->dev->protocol_stall = 1;
+ else
+ set_halt (ep);
+ } else
+ clear_halt (ep);
+ (void) readl (&ep->regs->ep_rsp);
+ }
+ spin_unlock_irqrestore (&ep->dev->lock, flags);
+
+ return retval;
+}
+
+static int
+net2280_fifo_status (struct usb_ep *_ep)
+{
+ struct net2280_ep *ep;
+ u32 avail;
+
+ ep = container_of (_ep, struct net2280_ep, ep);
+ if (!_ep || (!ep->desc && ep->num != 0))
+ return -ENODEV;
+ if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN)
+ return -ESHUTDOWN;
+
+ avail = readl (&ep->regs->ep_avail) & ((1 << 12) - 1);
+ if (avail > ep->fifo_size)
+ return -EOVERFLOW;
+ if (ep->is_in)
+ avail = ep->fifo_size - avail;
+ return avail;
+}
+
+static void
+net2280_fifo_flush (struct usb_ep *_ep)
+{
+ struct net2280_ep *ep;
+
+ ep = container_of (_ep, struct net2280_ep, ep);
+ if (!_ep || (!ep->desc && ep->num != 0))
+ return;
+ if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN)
+ return;
+
+ writel ((1 << FIFO_FLUSH), &ep->regs->ep_stat);
+ (void) readl (&ep->regs->ep_rsp);
+}
+
+static struct usb_ep_ops net2280_ep_ops = {
+ .enable = net2280_enable,
+ .disable = net2280_disable,
+
+ .alloc_request = net2280_alloc_request,
+ .free_request = net2280_free_request,
+
+ .alloc_buffer = net2280_alloc_buffer,
+ .free_buffer = net2280_free_buffer,
+
+ .queue = net2280_queue,
+ .dequeue = net2280_dequeue,
+
+ .set_halt = net2280_set_halt,
+ .fifo_status = net2280_fifo_status,
+ .fifo_flush = net2280_fifo_flush,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int net2280_get_frame (struct usb_gadget *_gadget)
+{
+ struct net2280 *dev;
+ unsigned long flags;
+ u16 retval;
+
+ if (!_gadget)
+ return -ENODEV;
+ dev = container_of (_gadget, struct net2280, gadget);
+ spin_lock_irqsave (&dev->lock, flags);
+ retval = get_idx_reg (dev->regs, REG_FRAME) & 0x03ff;
+ spin_unlock_irqrestore (&dev->lock, flags);
+ return retval;
+}
+
+static int net2280_wakeup (struct usb_gadget *_gadget)
+{
+ struct net2280 *dev;
+ u32 tmp;
+ unsigned long flags;
+
+ if (!_gadget)
+ return 0;
+ dev = container_of (_gadget, struct net2280, gadget);
+
+ spin_lock_irqsave (&dev->lock, flags);
+ tmp = readl (&dev->usb->usbctl);
+ if (tmp & (1 << DEVICE_REMOTE_WAKEUP_ENABLE))
+ writel (1 << GENERATE_RESUME, &dev->usb->usbstat);
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ /* pci writes may still be posted */
+ return 0;
+}
+
+static int net2280_set_selfpowered (struct usb_gadget *_gadget, int value)
+{
+ struct net2280 *dev;
+ u32 tmp;
+ unsigned long flags;
+
+ if (!_gadget)
+ return 0;
+ dev = container_of (_gadget, struct net2280, gadget);
+
+ spin_lock_irqsave (&dev->lock, flags);
+ tmp = readl (&dev->usb->usbctl);
+ if (value)
+ tmp |= (1 << SELF_POWERED_STATUS);
+ else
+ tmp &= ~(1 << SELF_POWERED_STATUS);
+ writel (tmp, &dev->usb->usbctl);
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ return 0;
+}
+
+static int net2280_pullup(struct usb_gadget *_gadget, int is_on)
+{
+ struct net2280 *dev;
+ u32 tmp;
+ unsigned long flags;
+
+ if (!_gadget)
+ return -ENODEV;
+ dev = container_of (_gadget, struct net2280, gadget);
+
+ spin_lock_irqsave (&dev->lock, flags);
+ tmp = readl (&dev->usb->usbctl);
+ dev->softconnect = (is_on != 0);
+ if (is_on)
+ tmp |= (1 << USB_DETECT_ENABLE);
+ else
+ tmp &= ~(1 << USB_DETECT_ENABLE);
+ writel (tmp, &dev->usb->usbctl);
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ return 0;
+}
+
+static const struct usb_gadget_ops net2280_ops = {
+ .get_frame = net2280_get_frame,
+ .wakeup = net2280_wakeup,
+ .set_selfpowered = net2280_set_selfpowered,
+ .pullup = net2280_pullup,
+};
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+
+/* FIXME move these into procfs, and use seq_file.
+ * Sysfs _still_ doesn't behave for arbitrarily sized files,
+ * and also doesn't help products using this with 2.4 kernels.
+ */
+
+/* "function" sysfs attribute */
+static ssize_t
+show_function (struct device *_dev, char *buf)
+{
+ struct net2280 *dev = dev_get_drvdata (_dev);
+
+ if (!dev->driver
+ || !dev->driver->function
+ || strlen (dev->driver->function) > PAGE_SIZE)
+ return 0;
+ return scnprintf (buf, PAGE_SIZE, "%s\n", dev->driver->function);
+}
+static DEVICE_ATTR (function, S_IRUGO, show_function, NULL);
+
+static ssize_t
+show_registers (struct device *_dev, char *buf)
+{
+ struct net2280 *dev;
+ char *next;
+ unsigned size, t;
+ unsigned long flags;
+ int i;
+ u32 t1, t2;
+ char *s;
+
+ dev = dev_get_drvdata (_dev);
+ next = buf;
+ size = PAGE_SIZE;
+ spin_lock_irqsave (&dev->lock, flags);
+
+ if (dev->driver)
+ s = dev->driver->driver.name;
+ else
+ s = "(none)";
+
+ /* Main Control Registers */
+ t = scnprintf (next, size, "%s version " DRIVER_VERSION
+ ", chiprev %04x, dma %s\n\n"
+ "devinit %03x fifoctl %08x gadget '%s'\n"
+ "pci irqenb0 %02x irqenb1 %08x "
+ "irqstat0 %04x irqstat1 %08x\n",
+ driver_name, dev->chiprev,
+ use_dma
+ ? (use_dma_chaining ? "chaining" : "enabled")
+ : "disabled",
+ readl (&dev->regs->devinit),
+ readl (&dev->regs->fifoctl),
+ s,
+ readl (&dev->regs->pciirqenb0),
+ readl (&dev->regs->pciirqenb1),
+ readl (&dev->regs->irqstat0),
+ readl (&dev->regs->irqstat1));
+ size -= t;
+ next += t;
+
+ /* USB Control Registers */
+ t1 = readl (&dev->usb->usbctl);
+ t2 = readl (&dev->usb->usbstat);
+ if (t1 & (1 << VBUS_PIN)) {
+ if (t2 & (1 << HIGH_SPEED))
+ s = "high speed";
+ else if (dev->gadget.speed == USB_SPEED_UNKNOWN)
+ s = "powered";
+ else
+ s = "full speed";
+ /* full speed bit (6) not working?? */
+ } else
+ s = "not attached";
+ t = scnprintf (next, size,
+ "stdrsp %08x usbctl %08x usbstat %08x "
+ "addr 0x%02x (%s)\n",
+ readl (&dev->usb->stdrsp), t1, t2,
+ readl (&dev->usb->ouraddr), s);
+ size -= t;
+ next += t;
+
+ /* PCI Master Control Registers */
+
+ /* DMA Control Registers */
+
+ /* Configurable EP Control Registers */
+ for (i = 0; i < 7; i++) {
+ struct net2280_ep *ep;
+
+ ep = &dev->ep [i];
+ if (i && !ep->desc)
+ continue;
+
+ t1 = readl (&ep->regs->ep_cfg);
+ t2 = readl (&ep->regs->ep_rsp) & 0xff;
+ t = scnprintf (next, size,
+ "\n%s\tcfg %05x rsp (%02x) %s%s%s%s%s%s%s%s"
+ "irqenb %02x\n",
+ ep->ep.name, t1, t2,
+ (t2 & (1 << CLEAR_NAK_OUT_PACKETS))
+ ? "NAK " : "",
+ (t2 & (1 << CLEAR_EP_HIDE_STATUS_PHASE))
+ ? "hide " : "",
+ (t2 & (1 << CLEAR_EP_FORCE_CRC_ERROR))
+ ? "CRC " : "",
+ (t2 & (1 << CLEAR_INTERRUPT_MODE))
+ ? "interrupt " : "",
+ (t2 & (1<<CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE))
+ ? "status " : "",
+ (t2 & (1 << CLEAR_NAK_OUT_PACKETS_MODE))
+ ? "NAKmode " : "",
+ (t2 & (1 << CLEAR_ENDPOINT_TOGGLE))
+ ? "DATA1 " : "DATA0 ",
+ (t2 & (1 << CLEAR_ENDPOINT_HALT))
+ ? "HALT " : "",
+ readl (&ep->regs->ep_irqenb));
+ size -= t;
+ next += t;
+
+ t = scnprintf (next, size,
+ "\tstat %08x avail %04x "
+ "(ep%d%s-%s)%s\n",
+ readl (&ep->regs->ep_stat),
+ readl (&ep->regs->ep_avail),
+ t1 & 0x0f, DIR_STRING (t1),
+ type_string (t1 >> 8),
+ ep->stopped ? "*" : "");
+ size -= t;
+ next += t;
+
+ if (!ep->dma)
+ continue;
+
+ t = scnprintf (next, size,
+ " dma\tctl %08x stat %08x count %08x\n"
+ "\taddr %08x desc %08x\n",
+ readl (&ep->dma->dmactl),
+ readl (&ep->dma->dmastat),
+ readl (&ep->dma->dmacount),
+ readl (&ep->dma->dmaaddr),
+ readl (&ep->dma->dmadesc));
+ size -= t;
+ next += t;
+
+ }
+
+ /* Indexed Registers */
+ // none yet
+
+ /* Statistics */
+ t = scnprintf (next, size, "\nirqs: ");
+ size -= t;
+ next += t;
+ for (i = 0; i < 7; i++) {
+ struct net2280_ep *ep;
+
+ ep = &dev->ep [i];
+ if (i && !ep->irqs)
+ continue;
+ t = scnprintf (next, size, " %s/%lu", ep->ep.name, ep->irqs);
+ size -= t;
+ next += t;
+
+ }
+ t = scnprintf (next, size, "\n");
+ size -= t;
+ next += t;
+
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ return PAGE_SIZE - size;
+}
+static DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL);
+
+static ssize_t
+show_queues (struct device *_dev, char *buf)
+{
+ struct net2280 *dev;
+ char *next;
+ unsigned size;
+ unsigned long flags;
+ int i;
+
+ dev = dev_get_drvdata (_dev);
+ next = buf;
+ size = PAGE_SIZE;
+ spin_lock_irqsave (&dev->lock, flags);
+
+ for (i = 0; i < 7; i++) {
+ struct net2280_ep *ep = &dev->ep [i];
+ struct net2280_request *req;
+ int t;
+
+ if (i != 0) {
+ const struct usb_endpoint_descriptor *d;
+
+ d = ep->desc;
+ if (!d)
+ continue;
+ t = d->bEndpointAddress;
+ t = scnprintf (next, size,
+ "\n%s (ep%d%s-%s) max %04x %s fifo %d\n",
+ ep->ep.name, t & USB_ENDPOINT_NUMBER_MASK,
+ (t & USB_DIR_IN) ? "in" : "out",
+ ({ char *val;
+ switch (d->bmAttributes & 0x03) {
+ case USB_ENDPOINT_XFER_BULK:
+ val = "bulk"; break;
+ case USB_ENDPOINT_XFER_INT:
+ val = "intr"; break;
+ default:
+ val = "iso"; break;
+ }; val; }),
+ le16_to_cpu (d->wMaxPacketSize) & 0x1fff,
+ ep->dma ? "dma" : "pio", ep->fifo_size
+ );
+ } else /* ep0 should only have one transfer queued */
+ t = scnprintf (next, size, "ep0 max 64 pio %s\n",
+ ep->is_in ? "in" : "out");
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+
+ if (list_empty (&ep->queue)) {
+ t = scnprintf (next, size, "\t(nothing queued)\n");
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+ continue;
+ }
+ list_for_each_entry (req, &ep->queue, queue) {
+ if (ep->dma && req->td_dma == readl (&ep->dma->dmadesc))
+ t = scnprintf (next, size,
+ "\treq %p len %d/%d "
+ "buf %p (dmacount %08x)\n",
+ &req->req, req->req.actual,
+ req->req.length, req->req.buf,
+ readl (&ep->dma->dmacount));
+ else
+ t = scnprintf (next, size,
+ "\treq %p len %d/%d buf %p\n",
+ &req->req, req->req.actual,
+ req->req.length, req->req.buf);
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+
+ if (ep->dma) {
+ struct net2280_dma *td;
+
+ td = req->td;
+ t = scnprintf (next, size, "\t td %08x "
+ " count %08x buf %08x desc %08x\n",
+ (u32) req->td_dma,
+ le32_to_cpu (td->dmacount),
+ le32_to_cpu (td->dmaaddr),
+ le32_to_cpu (td->dmadesc));
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+ }
+ }
+ }
+
+done:
+ spin_unlock_irqrestore (&dev->lock, flags);
+ return PAGE_SIZE - size;
+}
+static DEVICE_ATTR (queues, S_IRUGO, show_queues, NULL);
+
+
+#else
+
+#define device_create_file(a,b) do {} while (0)
+#define device_remove_file device_create_file
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/* another driver-specific mode might be a request type doing dma
+ * to/from another device fifo instead of to/from memory.
+ */
+
+static void set_fifo_mode (struct net2280 *dev, int mode)
+{
+ /* keeping high bits preserves BAR2 */
+ writel ((0xffff << PCI_BASE2_RANGE) | mode, &dev->regs->fifoctl);
+
+ /* always ep-{a,b,e,f} ... maybe not ep-c or ep-d */
+ INIT_LIST_HEAD (&dev->gadget.ep_list);
+ list_add_tail (&dev->ep [1].ep.ep_list, &dev->gadget.ep_list);
+ list_add_tail (&dev->ep [2].ep.ep_list, &dev->gadget.ep_list);
+ switch (mode) {
+ case 0:
+ list_add_tail (&dev->ep [3].ep.ep_list, &dev->gadget.ep_list);
+ list_add_tail (&dev->ep [4].ep.ep_list, &dev->gadget.ep_list);
+ dev->ep [1].fifo_size = dev->ep [2].fifo_size = 1024;
+ break;
+ case 1:
+ dev->ep [1].fifo_size = dev->ep [2].fifo_size = 2048;
+ break;
+ case 2:
+ list_add_tail (&dev->ep [3].ep.ep_list, &dev->gadget.ep_list);
+ dev->ep [1].fifo_size = 2048;
+ dev->ep [2].fifo_size = 1024;
+ break;
+ }
+ /* fifo sizes for ep0, ep-c, ep-d, ep-e, and ep-f never change */
+ list_add_tail (&dev->ep [5].ep.ep_list, &dev->gadget.ep_list);
+ list_add_tail (&dev->ep [6].ep.ep_list, &dev->gadget.ep_list);
+}
+
+/**
+ * net2280_set_fifo_mode - change allocation of fifo buffers
+ * @gadget: access to the net2280 device that will be updated
+ * @mode: 0 for default, four 1kB buffers (ep-a through ep-d);
+ * 1 for two 2kB buffers (ep-a and ep-b only);
+ * 2 for one 2kB buffer (ep-a) and two 1kB ones (ep-b, ep-c).
+ *
+ * returns zero on success, else negative errno. when this succeeds,
+ * the contents of gadget->ep_list may have changed.
+ *
+ * you may only call this function when endpoints a-d are all disabled.
+ * use it whenever extra hardware buffering can help performance, such
+ * as before enabling "high bandwidth" interrupt endpoints that use
+ * maxpacket bigger than 512 (when double buffering would otherwise
+ * be unavailable).
+ */
+int net2280_set_fifo_mode (struct usb_gadget *gadget, int mode)
+{
+ int i;
+ struct net2280 *dev;
+ int status = 0;
+ unsigned long flags;
+
+ if (!gadget)
+ return -ENODEV;
+ dev = container_of (gadget, struct net2280, gadget);
+
+ spin_lock_irqsave (&dev->lock, flags);
+
+ for (i = 1; i <= 4; i++)
+ if (dev->ep [i].desc) {
+ status = -EINVAL;
+ break;
+ }
+ if (mode < 0 || mode > 2)
+ status = -EINVAL;
+ if (status == 0)
+ set_fifo_mode (dev, mode);
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ if (status == 0) {
+ if (mode == 1)
+ DEBUG (dev, "fifo: ep-a 2K, ep-b 2K\n");
+ else if (mode == 2)
+ DEBUG (dev, "fifo: ep-a 2K, ep-b 1K, ep-c 1K\n");
+ /* else all are 1K */
+ }
+ return status;
+}
+EXPORT_SYMBOL (net2280_set_fifo_mode);
+
+/*-------------------------------------------------------------------------*/
+
+/* keeping it simple:
+ * - one bus driver, initted first;
+ * - one function driver, initted second
+ *
+ * most of the work to support multiple net2280 controllers would
+ * be to associate this gadget driver (yes?) with all of them, or
+ * perhaps to bind specific drivers to specific devices.
+ */
+
+static struct net2280 *the_controller;
+
+static void usb_reset (struct net2280 *dev)
+{
+ u32 tmp;
+
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+ (void) readl (&dev->usb->usbctl);
+
+ net2280_led_init (dev);
+
+ /* disable automatic responses, and irqs */
+ writel (0, &dev->usb->stdrsp);
+ writel (0, &dev->regs->pciirqenb0);
+ writel (0, &dev->regs->pciirqenb1);
+
+ /* clear old dma and irq state */
+ for (tmp = 0; tmp < 4; tmp++) {
+ struct net2280_ep *ep = &dev->ep [tmp + 1];
+
+ if (ep->dma)
+ abort_dma (ep);
+ }
+ writel (~0, &dev->regs->irqstat0),
+ writel (~(1 << SUSPEND_REQUEST_INTERRUPT), &dev->regs->irqstat1),
+
+ /* reset, and enable pci */
+ tmp = readl (&dev->regs->devinit)
+ | (1 << PCI_ENABLE)
+ | (1 << FIFO_SOFT_RESET)
+ | (1 << USB_SOFT_RESET)
+ | (1 << M8051_RESET);
+ writel (tmp, &dev->regs->devinit);
+
+ /* standard fifo and endpoint allocations */
+ set_fifo_mode (dev, (fifo_mode <= 2) ? fifo_mode : 0);
+}
+
+static void usb_reinit (struct net2280 *dev)
+{
+ u32 tmp;
+ int init_dma;
+
+ /* use_dma changes are ignored till next device re-init */
+ init_dma = use_dma;
+
+ /* basic endpoint init */
+ for (tmp = 0; tmp < 7; tmp++) {
+ struct net2280_ep *ep = &dev->ep [tmp];
+
+ ep->ep.name = ep_name [tmp];
+ ep->dev = dev;
+ ep->num = tmp;
+
+ if (tmp > 0 && tmp <= 4) {
+ ep->fifo_size = 1024;
+ if (init_dma)
+ ep->dma = &dev->dma [tmp - 1];
+ } else
+ ep->fifo_size = 64;
+ ep->regs = &dev->epregs [tmp];
+ ep_reset (dev->regs, ep);
+ }
+ dev->ep [0].ep.maxpacket = 64;
+ dev->ep [5].ep.maxpacket = 64;
+ dev->ep [6].ep.maxpacket = 64;
+
+ dev->gadget.ep0 = &dev->ep [0].ep;
+ dev->ep [0].stopped = 0;
+ INIT_LIST_HEAD (&dev->gadget.ep0->ep_list);
+
+ /* we want to prevent lowlevel/insecure access from the USB host,
+ * but erratum 0119 means this enable bit is ignored
+ */
+ for (tmp = 0; tmp < 5; tmp++)
+ writel (EP_DONTUSE, &dev->dep [tmp].dep_cfg);
+}
+
+static void ep0_start (struct net2280 *dev)
+{
+ writel ( (1 << CLEAR_EP_HIDE_STATUS_PHASE)
+ | (1 << CLEAR_NAK_OUT_PACKETS)
+ | (1 << CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE)
+ , &dev->epregs [0].ep_rsp);
+
+ /*
+ * hardware optionally handles a bunch of standard requests
+ * that the API hides from drivers anyway. have it do so.
+ * endpoint status/features are handled in software, to
+ * help pass tests for some dubious behavior.
+ */
+ writel ( (1 << SET_TEST_MODE)
+ | (1 << SET_ADDRESS)
+ | (1 << DEVICE_SET_CLEAR_DEVICE_REMOTE_WAKEUP)
+ | (1 << GET_DEVICE_STATUS)
+ | (1 << GET_INTERFACE_STATUS)
+ , &dev->usb->stdrsp);
+ writel ( (1 << USB_ROOT_PORT_WAKEUP_ENABLE)
+ | (1 << SELF_POWERED_USB_DEVICE)
+ | (1 << REMOTE_WAKEUP_SUPPORT)
+ | (dev->softconnect << USB_DETECT_ENABLE)
+ | (1 << SELF_POWERED_STATUS)
+ , &dev->usb->usbctl);
+
+ /* enable irqs so we can see ep0 and general operation */
+ writel ( (1 << SETUP_PACKET_INTERRUPT_ENABLE)
+ | (1 << ENDPOINT_0_INTERRUPT_ENABLE)
+ , &dev->regs->pciirqenb0);
+ writel ( (1 << PCI_INTERRUPT_ENABLE)
+ | (1 << PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE)
+ | (1 << PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE)
+ | (1 << PCI_RETRY_ABORT_INTERRUPT_ENABLE)
+ | (1 << VBUS_INTERRUPT_ENABLE)
+ | (1 << ROOT_PORT_RESET_INTERRUPT_ENABLE)
+ | (1 << SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE)
+ , &dev->regs->pciirqenb1);
+
+ /* don't leave any writes posted */
+ (void) readl (&dev->usb->usbctl);
+}
+
+/* when a driver is successfully registered, it will receive
+ * control requests including set_configuration(), which enables
+ * non-control requests. then usb traffic follows until a
+ * disconnect is reported. then a host may connect again, or
+ * the driver might get unbound.
+ */
+int usb_gadget_register_driver (struct usb_gadget_driver *driver)
+{
+ struct net2280 *dev = the_controller;
+ int retval;
+ unsigned i;
+
+ /* insist on high speed support from the driver, since
+ * (dev->usb->xcvrdiag & FORCE_FULL_SPEED_MODE)
+ * "must not be used in normal operation"
+ */
+ if (!driver
+ || driver->speed != USB_SPEED_HIGH
+ || !driver->bind
+ || !driver->unbind
+ || !driver->setup)
+ return -EINVAL;
+ if (!dev)
+ return -ENODEV;
+ if (dev->driver)
+ return -EBUSY;
+
+ for (i = 0; i < 7; i++)
+ dev->ep [i].irqs = 0;
+
+ /* hook up the driver ... */
+ dev->softconnect = 1;
+ driver->driver.bus = NULL;
+ dev->driver = driver;
+ dev->gadget.dev.driver = &driver->driver;
+ retval = driver->bind (&dev->gadget);
+ if (retval) {
+ DEBUG (dev, "bind to driver %s --> %d\n",
+ driver->driver.name, retval);
+ dev->driver = NULL;
+ dev->gadget.dev.driver = NULL;
+ return retval;
+ }
+
+ device_create_file (&dev->pdev->dev, &dev_attr_function);
+ device_create_file (&dev->pdev->dev, &dev_attr_queues);
+
+ /* ... then enable host detection and ep0; and we're ready
+ * for set_configuration as well as eventual disconnect.
+ */
+ net2280_led_active (dev, 1);
+ ep0_start (dev);
+
+ DEBUG (dev, "%s ready, usbctl %08x stdrsp %08x\n",
+ driver->driver.name,
+ readl (&dev->usb->usbctl),
+ readl (&dev->usb->stdrsp));
+
+ /* pci writes may still be posted */
+ return 0;
+}
+EXPORT_SYMBOL (usb_gadget_register_driver);
+
+static void
+stop_activity (struct net2280 *dev, struct usb_gadget_driver *driver)
+{
+ int i;
+
+ /* don't disconnect if it's not connected */
+ if (dev->gadget.speed == USB_SPEED_UNKNOWN)
+ driver = NULL;
+
+ /* stop hardware; prevent new request submissions;
+ * and kill any outstanding requests.
+ */
+ usb_reset (dev);
+ for (i = 0; i < 7; i++)
+ nuke (&dev->ep [i]);
+
+ /* report disconnect; the driver is already quiesced */
+ if (driver) {
+ spin_unlock (&dev->lock);
+ driver->disconnect (&dev->gadget);
+ spin_lock (&dev->lock);
+ }
+
+ usb_reinit (dev);
+}
+
+int usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
+{
+ struct net2280 *dev = the_controller;
+ unsigned long flags;
+
+ if (!dev)
+ return -ENODEV;
+ if (!driver || driver != dev->driver)
+ return -EINVAL;
+
+ spin_lock_irqsave (&dev->lock, flags);
+ stop_activity (dev, driver);
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ net2280_pullup (&dev->gadget, 0);
+
+ driver->unbind (&dev->gadget);
+ dev->gadget.dev.driver = NULL;
+ dev->driver = NULL;
+
+ net2280_led_active (dev, 0);
+ device_remove_file (&dev->pdev->dev, &dev_attr_function);
+ device_remove_file (&dev->pdev->dev, &dev_attr_queues);
+
+ DEBUG (dev, "unregistered driver '%s'\n", driver->driver.name);
+ return 0;
+}
+EXPORT_SYMBOL (usb_gadget_unregister_driver);
+
+
+/*-------------------------------------------------------------------------*/
+
+/* handle ep0, ep-e, ep-f with 64 byte packets: packet per irq.
+ * also works for dma-capable endpoints, in pio mode or just
+ * to manually advance the queue after short OUT transfers.
+ */
+static void handle_ep_small (struct net2280_ep *ep)
+{
+ struct net2280_request *req;
+ u32 t;
+ /* 0 error, 1 mid-data, 2 done */
+ int mode = 1;
+
+ if (!list_empty (&ep->queue))
+ req = list_entry (ep->queue.next,
+ struct net2280_request, queue);
+ else
+ req = NULL;
+
+ /* ack all, and handle what we care about */
+ t = readl (&ep->regs->ep_stat);
+ ep->irqs++;
+#if 0
+ VDEBUG (ep->dev, "%s ack ep_stat %08x, req %p\n",
+ ep->ep.name, t, req ? &req->req : 0);
+#endif
+ writel (t & ~(1 << NAK_OUT_PACKETS), &ep->regs->ep_stat);
+
+ /* for ep0, monitor token irqs to catch data stage length errors
+ * and to synchronize on status.
+ *
+ * also, to defer reporting of protocol stalls ... here's where
+ * data or status first appears, handling stalls here should never
+ * cause trouble on the host side..
+ *
+ * control requests could be slightly faster without token synch for
+ * status, but status can jam up that way.
+ */
+ if (unlikely (ep->num == 0)) {
+ if (ep->is_in) {
+ /* status; stop NAKing */
+ if (t & (1 << DATA_OUT_PING_TOKEN_INTERRUPT)) {
+ if (ep->dev->protocol_stall) {
+ ep->stopped = 1;
+ set_halt (ep);
+ }
+ if (!req)
+ allow_status (ep);
+ mode = 2;
+ /* reply to extra IN data tokens with a zlp */
+ } else if (t & (1 << DATA_IN_TOKEN_INTERRUPT)) {
+ if (ep->dev->protocol_stall) {
+ ep->stopped = 1;
+ set_halt (ep);
+ mode = 2;
+ } else if (!req && ep->stopped)
+ write_fifo (ep, NULL);
+ }
+ } else {
+ /* status; stop NAKing */
+ if (t & (1 << DATA_IN_TOKEN_INTERRUPT)) {
+ if (ep->dev->protocol_stall) {
+ ep->stopped = 1;
+ set_halt (ep);
+ }
+ mode = 2;
+ /* an extra OUT token is an error */
+ } else if (((t & (1 << DATA_OUT_PING_TOKEN_INTERRUPT))
+ && req
+ && req->req.actual == req->req.length)
+ || !req) {
+ ep->dev->protocol_stall = 1;
+ set_halt (ep);
+ ep->stopped = 1;
+ if (req)
+ done (ep, req, -EOVERFLOW);
+ req = NULL;
+ }
+ }
+ }
+
+ if (unlikely (!req))
+ return;
+
+ /* manual DMA queue advance after short OUT */
+ if (likely (ep->dma != 0)) {
+ if (t & (1 << SHORT_PACKET_TRANSFERRED_INTERRUPT)) {
+ u32 count;
+ int stopped = ep->stopped;
+
+ /* TRANSFERRED works around OUT_DONE erratum 0112.
+ * we expect (N <= maxpacket) bytes; host wrote M.
+ * iff (M < N) we won't ever see a DMA interrupt.
+ */
+ ep->stopped = 1;
+ for (count = 0; ; t = readl (&ep->regs->ep_stat)) {
+
+ /* any preceding dma transfers must finish.
+ * dma handles (M >= N), may empty the queue
+ */
+ scan_dma_completions (ep);
+ if (unlikely (list_empty (&ep->queue)
+ || ep->out_overflow)) {
+ req = NULL;
+ break;
+ }
+ req = list_entry (ep->queue.next,
+ struct net2280_request, queue);
+
+ /* here either (M < N), a "real" short rx;
+ * or (M == N) and the queue didn't empty
+ */
+ if (likely (t & (1 << FIFO_EMPTY))) {
+ count = readl (&ep->dma->dmacount);
+ count &= DMA_BYTE_COUNT_MASK;
+ if (readl (&ep->dma->dmadesc)
+ != req->td_dma)
+ req = NULL;
+ break;
+ }
+ udelay(1);
+ }
+
+ /* stop DMA, leave ep NAKing */
+ writel ((1 << DMA_ABORT), &ep->dma->dmastat);
+ spin_stop_dma (ep->dma);
+
+ if (likely (req)) {
+ req->td->dmacount = 0;
+ t = readl (&ep->regs->ep_avail);
+ dma_done (ep, req, count, t);
+ }
+
+ /* also flush to prevent erratum 0106 trouble */
+ if (unlikely (ep->out_overflow
+ || (ep->dev->chiprev == 0x0100
+ && ep->dev->gadget.speed
+ == USB_SPEED_FULL))) {
+ out_flush (ep);
+ ep->out_overflow = 0;
+ }
+
+ /* (re)start dma if needed, stop NAKing */
+ ep->stopped = stopped;
+ if (!list_empty (&ep->queue))
+ restart_dma (ep);
+ } else
+ DEBUG (ep->dev, "%s dma ep_stat %08x ??\n",
+ ep->ep.name, t);
+ return;
+
+ /* data packet(s) received (in the fifo, OUT) */
+ } else if (t & (1 << DATA_PACKET_RECEIVED_INTERRUPT)) {
+ if (read_fifo (ep, req) && ep->num != 0)
+ mode = 2;
+
+ /* data packet(s) transmitted (IN) */
+ } else if (t & (1 << DATA_PACKET_TRANSMITTED_INTERRUPT)) {
+ unsigned len;
+
+ len = req->req.length - req->req.actual;
+ if (len > ep->ep.maxpacket)
+ len = ep->ep.maxpacket;
+ req->req.actual += len;
+
+ /* if we wrote it all, we're usually done */
+ if (req->req.actual == req->req.length) {
+ if (ep->num == 0) {
+ /* wait for control status */
+ if (mode != 2)
+ req = NULL;
+ } else if (!req->req.zero || len != ep->ep.maxpacket)
+ mode = 2;
+ }
+
+ /* there was nothing to do ... */
+ } else if (mode == 1)
+ return;
+
+ /* done */
+ if (mode == 2) {
+ /* stream endpoints often resubmit/unlink in completion */
+ done (ep, req, 0);
+
+ /* maybe advance queue to next request */
+ if (ep->num == 0) {
+ /* NOTE: net2280 could let gadget driver start the
+ * status stage later. since not all controllers let
+ * them control that, the api doesn't (yet) allow it.
+ */
+ if (!ep->stopped)
+ allow_status (ep);
+ req = NULL;
+ } else {
+ if (!list_empty (&ep->queue) && !ep->stopped)
+ req = list_entry (ep->queue.next,
+ struct net2280_request, queue);
+ else
+ req = NULL;
+ if (req && !ep->is_in)
+ stop_out_naking (ep);
+ }
+ }
+
+ /* is there a buffer for the next packet?
+ * for best streaming performance, make sure there is one.
+ */
+ if (req && !ep->stopped) {
+
+ /* load IN fifo with next packet (may be zlp) */
+ if (t & (1 << DATA_PACKET_TRANSMITTED_INTERRUPT))
+ write_fifo (ep, &req->req);
+ }
+}
+
+static struct net2280_ep *
+get_ep_by_addr (struct net2280 *dev, u16 wIndex)
+{
+ struct net2280_ep *ep;
+
+ if ((wIndex & USB_ENDPOINT_NUMBER_MASK) == 0)
+ return &dev->ep [0];
+ list_for_each_entry (ep, &dev->gadget.ep_list, ep.ep_list) {
+ u8 bEndpointAddress;
+
+ if (!ep->desc)
+ continue;
+ bEndpointAddress = ep->desc->bEndpointAddress;
+ if ((wIndex ^ bEndpointAddress) & USB_DIR_IN)
+ continue;
+ if ((wIndex & 0x0f) == (bEndpointAddress & 0x0f))
+ return ep;
+ }
+ return NULL;
+}
+
+static void handle_stat0_irqs (struct net2280 *dev, u32 stat)
+{
+ struct net2280_ep *ep;
+ u32 num, scratch;
+
+ /* most of these don't need individual acks */
+ stat &= ~(1 << INTA_ASSERTED);
+ if (!stat)
+ return;
+ // DEBUG (dev, "irqstat0 %04x\n", stat);
+
+ /* starting a control request? */
+ if (unlikely (stat & (1 << SETUP_PACKET_INTERRUPT))) {
+ union {
+ u32 raw [2];
+ struct usb_ctrlrequest r;
+ } u;
+ int tmp = 0;
+ struct net2280_request *req;
+
+ if (dev->gadget.speed == USB_SPEED_UNKNOWN) {
+ if (readl (&dev->usb->usbstat) & (1 << HIGH_SPEED))
+ dev->gadget.speed = USB_SPEED_HIGH;
+ else
+ dev->gadget.speed = USB_SPEED_FULL;
+ net2280_led_speed (dev, dev->gadget.speed);
+ DEBUG (dev, "%s speed\n",
+ (dev->gadget.speed == USB_SPEED_HIGH)
+ ? "high" : "full");
+ }
+
+ ep = &dev->ep [0];
+ ep->irqs++;
+
+ /* make sure any leftover request state is cleared */
+ stat &= ~(1 << ENDPOINT_0_INTERRUPT);
+ while (!list_empty (&ep->queue)) {
+ req = list_entry (ep->queue.next,
+ struct net2280_request, queue);
+ done (ep, req, (req->req.actual == req->req.length)
+ ? 0 : -EPROTO);
+ }
+ ep->stopped = 0;
+ dev->protocol_stall = 0;
+ writel ( (1 << TIMEOUT)
+ | (1 << USB_STALL_SENT)
+ | (1 << USB_IN_NAK_SENT)
+ | (1 << USB_IN_ACK_RCVD)
+ | (1 << USB_OUT_PING_NAK_SENT)
+ | (1 << USB_OUT_ACK_SENT)
+ | (1 << FIFO_OVERFLOW)
+ | (1 << FIFO_UNDERFLOW)
+ | (1 << SHORT_PACKET_OUT_DONE_INTERRUPT)
+ | (1 << SHORT_PACKET_TRANSFERRED_INTERRUPT)
+ | (1 << DATA_PACKET_RECEIVED_INTERRUPT)
+ | (1 << DATA_PACKET_TRANSMITTED_INTERRUPT)
+ | (1 << DATA_OUT_PING_TOKEN_INTERRUPT)
+ | (1 << DATA_IN_TOKEN_INTERRUPT)
+ , &ep->regs->ep_stat);
+ u.raw [0] = readl (&dev->usb->setup0123);
+ u.raw [1] = readl (&dev->usb->setup4567);
+
+ cpu_to_le32s (&u.raw [0]);
+ cpu_to_le32s (&u.raw [1]);
+
+ le16_to_cpus (&u.r.wValue);
+ le16_to_cpus (&u.r.wIndex);
+ le16_to_cpus (&u.r.wLength);
+
+ /* ack the irq */
+ writel (1 << SETUP_PACKET_INTERRUPT, &dev->regs->irqstat0);
+ stat ^= (1 << SETUP_PACKET_INTERRUPT);
+
+ /* watch control traffic at the token level, and force
+ * synchronization before letting the status stage happen.
+ * FIXME ignore tokens we'll NAK, until driver responds.
+ * that'll mean a lot less irqs for some drivers.
+ */
+ ep->is_in = (u.r.bRequestType & USB_DIR_IN) != 0;
+ if (ep->is_in) {
+ scratch = (1 << DATA_PACKET_TRANSMITTED_INTERRUPT)
+ | (1 << DATA_OUT_PING_TOKEN_INTERRUPT)
+ | (1 << DATA_IN_TOKEN_INTERRUPT);
+ stop_out_naking (ep);
+ } else
+ scratch = (1 << DATA_PACKET_RECEIVED_INTERRUPT)
+ | (1 << DATA_OUT_PING_TOKEN_INTERRUPT)
+ | (1 << DATA_IN_TOKEN_INTERRUPT);
+ writel (scratch, &dev->epregs [0].ep_irqenb);
+
+ /* we made the hardware handle most lowlevel requests;
+ * everything else goes uplevel to the gadget code.
+ */
+ switch (u.r.bRequest) {
+ case USB_REQ_GET_STATUS: {
+ struct net2280_ep *e;
+ u16 status;
+
+ /* hw handles device and interface status */
+ if (u.r.bRequestType != (USB_DIR_IN|USB_RECIP_ENDPOINT))
+ goto delegate;
+ if ((e = get_ep_by_addr (dev, u.r.wIndex)) == 0
+ || u.r.wLength > 2)
+ goto do_stall;
+
+ if (readl (&e->regs->ep_rsp)
+ & (1 << SET_ENDPOINT_HALT))
+ status = __constant_cpu_to_le16 (1);
+ else
+ status = __constant_cpu_to_le16 (0);
+
+ /* don't bother with a request object! */
+ writel (0, &dev->epregs [0].ep_irqenb);
+ set_fifo_bytecount (ep, u.r.wLength);
+ writel (status, &dev->epregs [0].ep_data);
+ allow_status (ep);
+ VDEBUG (dev, "%s stat %02x\n", ep->ep.name, status);
+ goto next_endpoints;
+ }
+ break;
+ case USB_REQ_CLEAR_FEATURE: {
+ struct net2280_ep *e;
+
+ /* hw handles device features */
+ if (u.r.bRequestType != USB_RECIP_ENDPOINT)
+ goto delegate;
+ if (u.r.wValue != USB_ENDPOINT_HALT
+ || u.r.wLength != 0)
+ goto do_stall;
+ if ((e = get_ep_by_addr (dev, u.r.wIndex)) == 0)
+ goto do_stall;
+ clear_halt (e);
+ allow_status (ep);
+ VDEBUG (dev, "%s clear halt\n", ep->ep.name);
+ goto next_endpoints;
+ }
+ break;
+ case USB_REQ_SET_FEATURE: {
+ struct net2280_ep *e;
+
+ /* hw handles device features */
+ if (u.r.bRequestType != USB_RECIP_ENDPOINT)
+ goto delegate;
+ if (u.r.wValue != USB_ENDPOINT_HALT
+ || u.r.wLength != 0)
+ goto do_stall;
+ if ((e = get_ep_by_addr (dev, u.r.wIndex)) == 0)
+ goto do_stall;
+ set_halt (e);
+ allow_status (ep);
+ VDEBUG (dev, "%s set halt\n", ep->ep.name);
+ goto next_endpoints;
+ }
+ break;
+ default:
+delegate:
+ VDEBUG (dev, "setup %02x.%02x v%04x i%04x "
+ "ep_cfg %08x\n",
+ u.r.bRequestType, u.r.bRequest,
+ u.r.wValue, u.r.wIndex,
+ readl (&ep->regs->ep_cfg));
+ spin_unlock (&dev->lock);
+ tmp = dev->driver->setup (&dev->gadget, &u.r);
+ spin_lock (&dev->lock);
+ }
+
+ /* stall ep0 on error */
+ if (tmp < 0) {
+do_stall:
+ VDEBUG (dev, "req %02x.%02x protocol STALL; stat %d\n",
+ u.r.bRequestType, u.r.bRequest, tmp);
+ dev->protocol_stall = 1;
+ }
+
+ /* some in/out token irq should follow; maybe stall then.
+ * driver must queue a request (even zlp) or halt ep0
+ * before the host times out.
+ */
+ }
+
+next_endpoints:
+ /* endpoint data irq ? */
+ scratch = stat & 0x7f;
+ stat &= ~0x7f;
+ for (num = 0; scratch; num++) {
+ u32 t;
+
+ /* do this endpoint's FIFO and queue need tending? */
+ t = 1 << num;
+ if ((scratch & t) == 0)
+ continue;
+ scratch ^= t;
+
+ ep = &dev->ep [num];
+ handle_ep_small (ep);
+ }
+
+ if (stat)
+ DEBUG (dev, "unhandled irqstat0 %08x\n", stat);
+}
+
+#define DMA_INTERRUPTS ( \
+ (1 << DMA_D_INTERRUPT) \
+ | (1 << DMA_C_INTERRUPT) \
+ | (1 << DMA_B_INTERRUPT) \
+ | (1 << DMA_A_INTERRUPT))
+#define PCI_ERROR_INTERRUPTS ( \
+ (1 << PCI_MASTER_ABORT_RECEIVED_INTERRUPT) \
+ | (1 << PCI_TARGET_ABORT_RECEIVED_INTERRUPT) \
+ | (1 << PCI_RETRY_ABORT_INTERRUPT))
+
+static void handle_stat1_irqs (struct net2280 *dev, u32 stat)
+{
+ struct net2280_ep *ep;
+ u32 tmp, num, mask, scratch;
+
+ /* after disconnect there's nothing else to do! */
+ tmp = (1 << VBUS_INTERRUPT) | (1 << ROOT_PORT_RESET_INTERRUPT);
+ mask = (1 << HIGH_SPEED) | (1 << FULL_SPEED);
+
+ /* VBUS disconnect is indicated by VBUS_PIN and VBUS_INTERRUPT set.
+ * Root Port Reset is indicated by ROOT_PORT_RESET_INTERRRUPT set and
+ * both HIGH_SPEED and FULL_SPEED clear (as ROOT_PORT_RESET_INTERRUPT
+ * only indicates a change in the reset state).
+ */
+ if (stat & tmp) {
+ writel (tmp, &dev->regs->irqstat1);
+ if ((((stat & (1 << ROOT_PORT_RESET_INTERRUPT)) &&
+ ((readl (&dev->usb->usbstat) & mask) == 0))
+ || ((readl (&dev->usb->usbctl) & (1 << VBUS_PIN)) == 0)
+ ) && ( dev->gadget.speed != USB_SPEED_UNKNOWN)) {
+ DEBUG (dev, "disconnect %s\n",
+ dev->driver->driver.name);
+ stop_activity (dev, dev->driver);
+ ep0_start (dev);
+ return;
+ }
+ stat &= ~tmp;
+
+ /* vBUS can bounce ... one of many reasons to ignore the
+ * notion of hotplug events on bus connect/disconnect!
+ */
+ if (!stat)
+ return;
+ }
+
+ /* NOTE: chip stays in PCI D0 state for now, but it could
+ * enter D1 to save more power
+ */
+ tmp = (1 << SUSPEND_REQUEST_CHANGE_INTERRUPT);
+ if (stat & tmp) {
+ writel (tmp, &dev->regs->irqstat1);
+ if (stat & (1 << SUSPEND_REQUEST_INTERRUPT)) {
+ if (dev->driver->suspend)
+ dev->driver->suspend (&dev->gadget);
+ if (!enable_suspend)
+ stat &= ~(1 << SUSPEND_REQUEST_INTERRUPT);
+ } else {
+ if (dev->driver->resume)
+ dev->driver->resume (&dev->gadget);
+ /* at high speed, note erratum 0133 */
+ }
+ stat &= ~tmp;
+ }
+
+ /* clear any other status/irqs */
+ if (stat)
+ writel (stat, &dev->regs->irqstat1);
+
+ /* some status we can just ignore */
+ stat &= ~((1 << CONTROL_STATUS_INTERRUPT)
+ | (1 << SUSPEND_REQUEST_INTERRUPT)
+ | (1 << RESUME_INTERRUPT)
+ | (1 << SOF_INTERRUPT));
+ if (!stat)
+ return;
+ // DEBUG (dev, "irqstat1 %08x\n", stat);
+
+ /* DMA status, for ep-{a,b,c,d} */
+ scratch = stat & DMA_INTERRUPTS;
+ stat &= ~DMA_INTERRUPTS;
+ scratch >>= 9;
+ for (num = 0; scratch; num++) {
+ struct net2280_dma_regs __iomem *dma;
+
+ tmp = 1 << num;
+ if ((tmp & scratch) == 0)
+ continue;
+ scratch ^= tmp;
+
+ ep = &dev->ep [num + 1];
+ dma = ep->dma;
+
+ if (!dma)
+ continue;
+
+ /* clear ep's dma status */
+ tmp = readl (&dma->dmastat);
+ writel (tmp, &dma->dmastat);
+
+ /* chaining should stop on abort, short OUT from fifo,
+ * or (stat0 codepath) short OUT transfer.
+ */
+ if (!use_dma_chaining) {
+ if ((tmp & (1 << DMA_TRANSACTION_DONE_INTERRUPT))
+ == 0) {
+ DEBUG (ep->dev, "%s no xact done? %08x\n",
+ ep->ep.name, tmp);
+ continue;
+ }
+ stop_dma (ep->dma);
+ }
+
+ /* OUT transfers terminate when the data from the
+ * host is in our memory. Process whatever's done.
+ * On this path, we know transfer's last packet wasn't
+ * less than req->length. NAK_OUT_PACKETS may be set,
+ * or the FIFO may already be holding new packets.
+ *
+ * IN transfers can linger in the FIFO for a very
+ * long time ... we ignore that for now, accounting
+ * precisely (like PIO does) needs per-packet irqs
+ */
+ scan_dma_completions (ep);
+
+ /* disable dma on inactive queues; else maybe restart */
+ if (list_empty (&ep->queue)) {
+ if (use_dma_chaining)
+ stop_dma (ep->dma);
+ } else {
+ tmp = readl (&dma->dmactl);
+ if (!use_dma_chaining
+ || (tmp & (1 << DMA_ENABLE)) == 0)
+ restart_dma (ep);
+ else if (ep->is_in && use_dma_chaining) {
+ struct net2280_request *req;
+ u32 dmacount;
+
+ /* the descriptor at the head of the chain
+ * may still have VALID_BIT clear; that's
+ * used to trigger changing DMA_FIFO_VALIDATE
+ * (affects automagic zlp writes).
+ */
+ req = list_entry (ep->queue.next,
+ struct net2280_request, queue);
+ dmacount = req->td->dmacount;
+ dmacount &= __constant_cpu_to_le32 (
+ (1 << VALID_BIT)
+ | DMA_BYTE_COUNT_MASK);
+ if (dmacount && (dmacount & valid_bit) == 0)
+ restart_dma (ep);
+ }
+ }
+ ep->irqs++;
+ }
+
+ /* NOTE: there are other PCI errors we might usefully notice.
+ * if they appear very often, here's where to try recovering.
+ */
+ if (stat & PCI_ERROR_INTERRUPTS) {
+ ERROR (dev, "pci dma error; stat %08x\n", stat);
+ stat &= ~PCI_ERROR_INTERRUPTS;
+ /* these are fatal errors, but "maybe" they won't
+ * happen again ...
+ */
+ stop_activity (dev, dev->driver);
+ ep0_start (dev);
+ stat = 0;
+ }
+
+ if (stat)
+ DEBUG (dev, "unhandled irqstat1 %08x\n", stat);
+}
+
+static irqreturn_t net2280_irq (int irq, void *_dev, struct pt_regs * r)
+{
+ struct net2280 *dev = _dev;
+
+ spin_lock (&dev->lock);
+
+ /* handle disconnect, dma, and more */
+ handle_stat1_irqs (dev, readl (&dev->regs->irqstat1));
+
+ /* control requests and PIO */
+ handle_stat0_irqs (dev, readl (&dev->regs->irqstat0));
+
+ spin_unlock (&dev->lock);
+
+ return IRQ_HANDLED;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void gadget_release (struct device *_dev)
+{
+ struct net2280 *dev = dev_get_drvdata (_dev);
+
+ kfree (dev);
+}
+
+/* tear down the binding between this driver and the pci device */
+
+static void net2280_remove (struct pci_dev *pdev)
+{
+ struct net2280 *dev = pci_get_drvdata (pdev);
+
+ /* start with the driver above us */
+ if (dev->driver) {
+ /* should have been done already by driver model core */
+ WARN (dev, "pci remove, driver '%s' is still registered\n",
+ dev->driver->driver.name);
+ usb_gadget_unregister_driver (dev->driver);
+ }
+
+ /* then clean up the resources we allocated during probe() */
+ net2280_led_shutdown (dev);
+ if (dev->requests) {
+ int i;
+ for (i = 1; i < 5; i++) {
+ if (!dev->ep [i].dummy)
+ continue;
+ pci_pool_free (dev->requests, dev->ep [i].dummy,
+ dev->ep [i].td_dma);
+ }
+ pci_pool_destroy (dev->requests);
+ }
+ if (dev->got_irq)
+ free_irq (pdev->irq, dev);
+ if (dev->regs)
+ iounmap (dev->regs);
+ if (dev->region)
+ release_mem_region (pci_resource_start (pdev, 0),
+ pci_resource_len (pdev, 0));
+ if (dev->enabled)
+ pci_disable_device (pdev);
+ device_unregister (&dev->gadget.dev);
+ device_remove_file (&pdev->dev, &dev_attr_registers);
+ pci_set_drvdata (pdev, NULL);
+
+ INFO (dev, "unbind\n");
+
+ the_controller = NULL;
+}
+
+/* wrap this driver around the specified device, but
+ * don't respond over USB until a gadget driver binds to us.
+ */
+
+static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
+{
+ struct net2280 *dev;
+ unsigned long resource, len;
+ void __iomem *base = NULL;
+ int retval, i;
+ char buf [8], *bufp;
+
+ /* if you want to support more than one controller in a system,
+ * usb_gadget_driver_{register,unregister}() must change.
+ */
+ if (the_controller) {
+ dev_warn (&pdev->dev, "ignoring\n");
+ return -EBUSY;
+ }
+
+ /* alloc, and start init */
+ dev = kmalloc (sizeof *dev, SLAB_KERNEL);
+ if (dev == NULL){
+ retval = -ENOMEM;
+ goto done;
+ }
+
+ memset (dev, 0, sizeof *dev);
+ spin_lock_init (&dev->lock);
+ dev->pdev = pdev;
+ dev->gadget.ops = &net2280_ops;
+ dev->gadget.is_dualspeed = 1;
+
+ /* the "gadget" abstracts/virtualizes the controller */
+ strcpy (dev->gadget.dev.bus_id, "gadget");
+ dev->gadget.dev.parent = &pdev->dev;
+ dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
+ dev->gadget.dev.release = gadget_release;
+ dev->gadget.name = driver_name;
+
+ /* now all the pci goodies ... */
+ if (pci_enable_device (pdev) < 0) {
+ retval = -ENODEV;
+ goto done;
+ }
+ dev->enabled = 1;
+
+ /* BAR 0 holds all the registers
+ * BAR 1 is 8051 memory; unused here (note erratum 0103)
+ * BAR 2 is fifo memory; unused here
+ */
+ resource = pci_resource_start (pdev, 0);
+ len = pci_resource_len (pdev, 0);
+ if (!request_mem_region (resource, len, driver_name)) {
+ DEBUG (dev, "controller already in use\n");
+ retval = -EBUSY;
+ goto done;
+ }
+ dev->region = 1;
+
+ base = ioremap_nocache (resource, len);
+ if (base == NULL) {
+ DEBUG (dev, "can't map memory\n");
+ retval = -EFAULT;
+ goto done;
+ }
+ dev->regs = (struct net2280_regs __iomem *) base;
+ dev->usb = (struct net2280_usb_regs __iomem *) (base + 0x0080);
+ dev->pci = (struct net2280_pci_regs __iomem *) (base + 0x0100);
+ dev->dma = (struct net2280_dma_regs __iomem *) (base + 0x0180);
+ dev->dep = (struct net2280_dep_regs __iomem *) (base + 0x0200);
+ dev->epregs = (struct net2280_ep_regs __iomem *) (base + 0x0300);
+
+ /* put into initial config, link up all endpoints */
+ writel (0, &dev->usb->usbctl);
+ usb_reset (dev);
+ usb_reinit (dev);
+
+ /* irq setup after old hardware is cleaned up */
+ if (!pdev->irq) {
+ ERROR (dev, "No IRQ. Check PCI setup!\n");
+ retval = -ENODEV;
+ goto done;
+ }
+#ifndef __sparc__
+ scnprintf (buf, sizeof buf, "%d", pdev->irq);
+ bufp = buf;
+#else
+ bufp = __irq_itoa(pdev->irq);
+#endif
+ if (request_irq (pdev->irq, net2280_irq, SA_SHIRQ, driver_name, dev)
+ != 0) {
+ ERROR (dev, "request interrupt %s failed\n", bufp);
+ retval = -EBUSY;
+ goto done;
+ }
+ dev->got_irq = 1;
+
+ /* DMA setup */
+ /* NOTE: we know only the 32 LSBs of dma addresses may be nonzero */
+ dev->requests = pci_pool_create ("requests", pdev,
+ sizeof (struct net2280_dma),
+ 0 /* no alignment requirements */,
+ 0 /* or page-crossing issues */);
+ if (!dev->requests) {
+ DEBUG (dev, "can't get request pool\n");
+ retval = -ENOMEM;
+ goto done;
+ }
+ for (i = 1; i < 5; i++) {
+ struct net2280_dma *td;
+
+ td = pci_pool_alloc (dev->requests, GFP_KERNEL,
+ &dev->ep [i].td_dma);
+ if (!td) {
+ DEBUG (dev, "can't get dummy %d\n", i);
+ retval = -ENOMEM;
+ goto done;
+ }
+ td->dmacount = 0; /* not VALID */
+ td->dmaaddr = __constant_cpu_to_le32 (DMA_ADDR_INVALID);
+ td->dmadesc = td->dmaaddr;
+ dev->ep [i].dummy = td;
+ }
+
+ /* enable lower-overhead pci memory bursts during DMA */
+ writel ( (1 << DMA_MEMORY_WRITE_AND_INVALIDATE_ENABLE)
+ // 256 write retries may not be enough...
+ // | (1 << PCI_RETRY_ABORT_ENABLE)
+ | (1 << DMA_READ_MULTIPLE_ENABLE)
+ | (1 << DMA_READ_LINE_ENABLE)
+ , &dev->pci->pcimstctl);
+ /* erratum 0115 shouldn't appear: Linux inits PCI_LATENCY_TIMER */
+ pci_set_master (pdev);
+ pci_set_mwi (pdev);
+
+ /* ... also flushes any posted pci writes */
+ dev->chiprev = get_idx_reg (dev->regs, REG_CHIPREV) & 0xffff;
+
+ /* done */
+ pci_set_drvdata (pdev, dev);
+ INFO (dev, "%s\n", driver_desc);
+ INFO (dev, "irq %s, pci mem %p, chip rev %04x\n",
+ bufp, base, dev->chiprev);
+ INFO (dev, "version: " DRIVER_VERSION "; dma %s\n",
+ use_dma
+ ? (use_dma_chaining ? "chaining" : "enabled")
+ : "disabled");
+ the_controller = dev;
+
+ device_register (&dev->gadget.dev);
+ device_create_file (&pdev->dev, &dev_attr_registers);
+
+ return 0;
+
+done:
+ if (dev)
+ net2280_remove (pdev);
+ return retval;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static struct pci_device_id pci_ids [] = { {
+ .class = ((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
+ .class_mask = ~0,
+ .vendor = 0x17cc,
+ .device = 0x2280,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+
+}, { /* end: all zeroes */ }
+};
+MODULE_DEVICE_TABLE (pci, pci_ids);
+
+/* pci driver glue; this is a "new style" PCI driver module */
+static struct pci_driver net2280_pci_driver = {
+ .name = (char *) driver_name,
+ .id_table = pci_ids,
+
+ .probe = net2280_probe,
+ .remove = net2280_remove,
+
+ /* FIXME add power management support */
+};
+
+MODULE_DESCRIPTION (DRIVER_DESC);
+MODULE_AUTHOR ("David Brownell");
+MODULE_LICENSE ("GPL");
+
+static int __init init (void)
+{
+ if (!use_dma)
+ use_dma_chaining = 0;
+ return pci_register_driver (&net2280_pci_driver);
+}
+module_init (init);
+
+static void __exit cleanup (void)
+{
+ pci_unregister_driver (&net2280_pci_driver);
+}
+module_exit (cleanup);
diff --git a/drivers/usb/gadget/net2280.h b/drivers/usb/gadget/net2280.h
new file mode 100644
index 000000000000..fff4509cf340
--- /dev/null
+++ b/drivers/usb/gadget/net2280.h
@@ -0,0 +1,728 @@
+/*
+ * NetChip 2280 high/full speed USB device controller.
+ * Unlike many such controllers, this one talks PCI.
+ */
+
+/*
+ * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com)
+ * Copyright (C) 2003 David Brownell
+ *
+ * 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
+ */
+
+/*-------------------------------------------------------------------------*/
+
+/* NET2280 MEMORY MAPPED REGISTERS
+ *
+ * The register layout came from the chip documentation, and the bit
+ * number definitions were extracted from chip specification.
+ *
+ * Use the shift operator ('<<') to build bit masks, with readl/writel
+ * to access the registers through PCI.
+ */
+
+/* main registers, BAR0 + 0x0000 */
+struct net2280_regs {
+ // offset 0x0000
+ u32 devinit;
+#define LOCAL_CLOCK_FREQUENCY 8
+#define FORCE_PCI_RESET 7
+#define PCI_ID 6
+#define PCI_ENABLE 5
+#define FIFO_SOFT_RESET 4
+#define CFG_SOFT_RESET 3
+#define PCI_SOFT_RESET 2
+#define USB_SOFT_RESET 1
+#define M8051_RESET 0
+ u32 eectl;
+#define EEPROM_ADDRESS_WIDTH 23
+#define EEPROM_CHIP_SELECT_ACTIVE 22
+#define EEPROM_PRESENT 21
+#define EEPROM_VALID 20
+#define EEPROM_BUSY 19
+#define EEPROM_CHIP_SELECT_ENABLE 18
+#define EEPROM_BYTE_READ_START 17
+#define EEPROM_BYTE_WRITE_START 16
+#define EEPROM_READ_DATA 8
+#define EEPROM_WRITE_DATA 0
+ u32 eeclkfreq;
+ u32 _unused0;
+ // offset 0x0010
+
+ u32 pciirqenb0; /* interrupt PCI master ... */
+#define SETUP_PACKET_INTERRUPT_ENABLE 7
+#define ENDPOINT_F_INTERRUPT_ENABLE 6
+#define ENDPOINT_E_INTERRUPT_ENABLE 5
+#define ENDPOINT_D_INTERRUPT_ENABLE 4
+#define ENDPOINT_C_INTERRUPT_ENABLE 3
+#define ENDPOINT_B_INTERRUPT_ENABLE 2
+#define ENDPOINT_A_INTERRUPT_ENABLE 1
+#define ENDPOINT_0_INTERRUPT_ENABLE 0
+ u32 pciirqenb1;
+#define PCI_INTERRUPT_ENABLE 31
+#define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27
+#define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26
+#define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25
+#define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20
+#define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19
+#define PCI_TARGET_ABORT_ASSERTED_INTERRUPT_ENABLE 18
+#define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17
+#define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16
+#define GPIO_INTERRUPT_ENABLE 13
+#define DMA_D_INTERRUPT_ENABLE 12
+#define DMA_C_INTERRUPT_ENABLE 11
+#define DMA_B_INTERRUPT_ENABLE 10
+#define DMA_A_INTERRUPT_ENABLE 9
+#define EEPROM_DONE_INTERRUPT_ENABLE 8
+#define VBUS_INTERRUPT_ENABLE 7
+#define CONTROL_STATUS_INTERRUPT_ENABLE 6
+#define ROOT_PORT_RESET_INTERRUPT_ENABLE 4
+#define SUSPEND_REQUEST_INTERRUPT_ENABLE 3
+#define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2
+#define RESUME_INTERRUPT_ENABLE 1
+#define SOF_INTERRUPT_ENABLE 0
+ u32 cpu_irqenb0; /* ... or onboard 8051 */
+#define SETUP_PACKET_INTERRUPT_ENABLE 7
+#define ENDPOINT_F_INTERRUPT_ENABLE 6
+#define ENDPOINT_E_INTERRUPT_ENABLE 5
+#define ENDPOINT_D_INTERRUPT_ENABLE 4
+#define ENDPOINT_C_INTERRUPT_ENABLE 3
+#define ENDPOINT_B_INTERRUPT_ENABLE 2
+#define ENDPOINT_A_INTERRUPT_ENABLE 1
+#define ENDPOINT_0_INTERRUPT_ENABLE 0
+ u32 cpu_irqenb1;
+#define CPU_INTERRUPT_ENABLE 31
+#define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27
+#define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26
+#define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25
+#define PCI_INTA_INTERRUPT_ENABLE 24
+#define PCI_PME_INTERRUPT_ENABLE 23
+#define PCI_SERR_INTERRUPT_ENABLE 22
+#define PCI_PERR_INTERRUPT_ENABLE 21
+#define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20
+#define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19
+#define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17
+#define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16
+#define GPIO_INTERRUPT_ENABLE 13
+#define DMA_D_INTERRUPT_ENABLE 12
+#define DMA_C_INTERRUPT_ENABLE 11
+#define DMA_B_INTERRUPT_ENABLE 10
+#define DMA_A_INTERRUPT_ENABLE 9
+#define EEPROM_DONE_INTERRUPT_ENABLE 8
+#define VBUS_INTERRUPT_ENABLE 7
+#define CONTROL_STATUS_INTERRUPT_ENABLE 6
+#define ROOT_PORT_RESET_INTERRUPT_ENABLE 4
+#define SUSPEND_REQUEST_INTERRUPT_ENABLE 3
+#define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2
+#define RESUME_INTERRUPT_ENABLE 1
+#define SOF_INTERRUPT_ENABLE 0
+
+ // offset 0x0020
+ u32 _unused1;
+ u32 usbirqenb1;
+#define USB_INTERRUPT_ENABLE 31
+#define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27
+#define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26
+#define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25
+#define PCI_INTA_INTERRUPT_ENABLE 24
+#define PCI_PME_INTERRUPT_ENABLE 23
+#define PCI_SERR_INTERRUPT_ENABLE 22
+#define PCI_PERR_INTERRUPT_ENABLE 21
+#define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20
+#define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19
+#define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17
+#define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16
+#define GPIO_INTERRUPT_ENABLE 13
+#define DMA_D_INTERRUPT_ENABLE 12
+#define DMA_C_INTERRUPT_ENABLE 11
+#define DMA_B_INTERRUPT_ENABLE 10
+#define DMA_A_INTERRUPT_ENABLE 9
+#define EEPROM_DONE_INTERRUPT_ENABLE 8
+#define VBUS_INTERRUPT_ENABLE 7
+#define CONTROL_STATUS_INTERRUPT_ENABLE 6
+#define ROOT_PORT_RESET_INTERRUPT_ENABLE 4
+#define SUSPEND_REQUEST_INTERRUPT_ENABLE 3
+#define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2
+#define RESUME_INTERRUPT_ENABLE 1
+#define SOF_INTERRUPT_ENABLE 0
+ u32 irqstat0;
+#define INTA_ASSERTED 12
+#define SETUP_PACKET_INTERRUPT 7
+#define ENDPOINT_F_INTERRUPT 6
+#define ENDPOINT_E_INTERRUPT 5
+#define ENDPOINT_D_INTERRUPT 4
+#define ENDPOINT_C_INTERRUPT 3
+#define ENDPOINT_B_INTERRUPT 2
+#define ENDPOINT_A_INTERRUPT 1
+#define ENDPOINT_0_INTERRUPT 0
+ u32 irqstat1;
+#define POWER_STATE_CHANGE_INTERRUPT 27
+#define PCI_ARBITER_TIMEOUT_INTERRUPT 26
+#define PCI_PARITY_ERROR_INTERRUPT 25
+#define PCI_INTA_INTERRUPT 24
+#define PCI_PME_INTERRUPT 23
+#define PCI_SERR_INTERRUPT 22
+#define PCI_PERR_INTERRUPT 21
+#define PCI_MASTER_ABORT_RECEIVED_INTERRUPT 20
+#define PCI_TARGET_ABORT_RECEIVED_INTERRUPT 19
+#define PCI_RETRY_ABORT_INTERRUPT 17
+#define PCI_MASTER_CYCLE_DONE_INTERRUPT 16
+#define GPIO_INTERRUPT 13
+#define DMA_D_INTERRUPT 12
+#define DMA_C_INTERRUPT 11
+#define DMA_B_INTERRUPT 10
+#define DMA_A_INTERRUPT 9
+#define EEPROM_DONE_INTERRUPT 8
+#define VBUS_INTERRUPT 7
+#define CONTROL_STATUS_INTERRUPT 6
+#define ROOT_PORT_RESET_INTERRUPT 4
+#define SUSPEND_REQUEST_INTERRUPT 3
+#define SUSPEND_REQUEST_CHANGE_INTERRUPT 2
+#define RESUME_INTERRUPT 1
+#define SOF_INTERRUPT 0
+ // offset 0x0030
+ u32 idxaddr;
+ u32 idxdata;
+ u32 fifoctl;
+#define PCI_BASE2_RANGE 16
+#define IGNORE_FIFO_AVAILABILITY 3
+#define PCI_BASE2_SELECT 2
+#define FIFO_CONFIGURATION_SELECT 0
+ u32 _unused2;
+ // offset 0x0040
+ u32 memaddr;
+#define START 28
+#define DIRECTION 27
+#define FIFO_DIAGNOSTIC_SELECT 24
+#define MEMORY_ADDRESS 0
+ u32 memdata0;
+ u32 memdata1;
+ u32 _unused3;
+ // offset 0x0050
+ u32 gpioctl;
+#define GPIO3_LED_SELECT 12
+#define GPIO3_INTERRUPT_ENABLE 11
+#define GPIO2_INTERRUPT_ENABLE 10
+#define GPIO1_INTERRUPT_ENABLE 9
+#define GPIO0_INTERRUPT_ENABLE 8
+#define GPIO3_OUTPUT_ENABLE 7
+#define GPIO2_OUTPUT_ENABLE 6
+#define GPIO1_OUTPUT_ENABLE 5
+#define GPIO0_OUTPUT_ENABLE 4
+#define GPIO3_DATA 3
+#define GPIO2_DATA 2
+#define GPIO1_DATA 1
+#define GPIO0_DATA 0
+ u32 gpiostat;
+#define GPIO3_INTERRUPT 3
+#define GPIO2_INTERRUPT 2
+#define GPIO1_INTERRUPT 1
+#define GPIO0_INTERRUPT 0
+} __attribute__ ((packed));
+
+/* usb control, BAR0 + 0x0080 */
+struct net2280_usb_regs {
+ // offset 0x0080
+ u32 stdrsp;
+#define STALL_UNSUPPORTED_REQUESTS 31
+#define SET_TEST_MODE 16
+#define GET_OTHER_SPEED_CONFIGURATION 15
+#define GET_DEVICE_QUALIFIER 14
+#define SET_ADDRESS 13
+#define ENDPOINT_SET_CLEAR_HALT 12
+#define DEVICE_SET_CLEAR_DEVICE_REMOTE_WAKEUP 11
+#define GET_STRING_DESCRIPTOR_2 10
+#define GET_STRING_DESCRIPTOR_1 9
+#define GET_STRING_DESCRIPTOR_0 8
+#define GET_SET_INTERFACE 6
+#define GET_SET_CONFIGURATION 5
+#define GET_CONFIGURATION_DESCRIPTOR 4
+#define GET_DEVICE_DESCRIPTOR 3
+#define GET_ENDPOINT_STATUS 2
+#define GET_INTERFACE_STATUS 1
+#define GET_DEVICE_STATUS 0
+ u32 prodvendid;
+#define PRODUCT_ID 16
+#define VENDOR_ID 0
+ u32 relnum;
+ u32 usbctl;
+#define SERIAL_NUMBER_INDEX 16
+#define PRODUCT_ID_STRING_ENABLE 13
+#define VENDOR_ID_STRING_ENABLE 12
+#define USB_ROOT_PORT_WAKEUP_ENABLE 11
+#define VBUS_PIN 10
+#define TIMED_DISCONNECT 9
+#define SUSPEND_IMMEDIATELY 7
+#define SELF_POWERED_USB_DEVICE 6
+#define REMOTE_WAKEUP_SUPPORT 5
+#define PME_POLARITY 4
+#define USB_DETECT_ENABLE 3
+#define PME_WAKEUP_ENABLE 2
+#define DEVICE_REMOTE_WAKEUP_ENABLE 1
+#define SELF_POWERED_STATUS 0
+ // offset 0x0090
+ u32 usbstat;
+#define HIGH_SPEED 7
+#define FULL_SPEED 6
+#define GENERATE_RESUME 5
+#define GENERATE_DEVICE_REMOTE_WAKEUP 4
+ u32 xcvrdiag;
+#define FORCE_HIGH_SPEED_MODE 31
+#define FORCE_FULL_SPEED_MODE 30
+#define USB_TEST_MODE 24
+#define LINE_STATE 16
+#define TRANSCEIVER_OPERATION_MODE 2
+#define TRANSCEIVER_SELECT 1
+#define TERMINATION_SELECT 0
+ u32 setup0123;
+ u32 setup4567;
+ // offset 0x0090
+ u32 _unused0;
+ u32 ouraddr;
+#define FORCE_IMMEDIATE 7
+#define OUR_USB_ADDRESS 0
+ u32 ourconfig;
+} __attribute__ ((packed));
+
+/* pci control, BAR0 + 0x0100 */
+struct net2280_pci_regs {
+ // offset 0x0100
+ u32 pcimstctl;
+#define PCI_ARBITER_PARK_SELECT 13
+#define PCI_MULTI LEVEL_ARBITER 12
+#define PCI_RETRY_ABORT_ENABLE 11
+#define DMA_MEMORY_WRITE_AND_INVALIDATE_ENABLE 10
+#define DMA_READ_MULTIPLE_ENABLE 9
+#define DMA_READ_LINE_ENABLE 8
+#define PCI_MASTER_COMMAND_SELECT 6
+#define MEM_READ_OR_WRITE 0
+#define IO_READ_OR_WRITE 1
+#define CFG_READ_OR_WRITE 2
+#define PCI_MASTER_START 5
+#define PCI_MASTER_READ_WRITE 4
+#define PCI_MASTER_WRITE 0
+#define PCI_MASTER_READ 1
+#define PCI_MASTER_BYTE_WRITE_ENABLES 0
+ u32 pcimstaddr;
+ u32 pcimstdata;
+ u32 pcimststat;
+#define PCI_ARBITER_CLEAR 2
+#define PCI_EXTERNAL_ARBITER 1
+#define PCI_HOST_MODE 0
+} __attribute__ ((packed));
+
+/* dma control, BAR0 + 0x0180 ... array of four structs like this,
+ * for channels 0..3. see also struct net2280_dma: descriptor
+ * that can be loaded into some of these registers.
+ */
+struct net2280_dma_regs { /* [11.7] */
+ // offset 0x0180, 0x01a0, 0x01c0, 0x01e0,
+ u32 dmactl;
+#define DMA_SCATTER_GATHER_DONE_INTERRUPT_ENABLE 25
+#define DMA_CLEAR_COUNT_ENABLE 21
+#define DESCRIPTOR_POLLING_RATE 19
+#define POLL_CONTINUOUS 0
+#define POLL_1_USEC 1
+#define POLL_100_USEC 2
+#define POLL_1_MSEC 3
+#define DMA_VALID_BIT_POLLING_ENABLE 18
+#define DMA_VALID_BIT_ENABLE 17
+#define DMA_SCATTER_GATHER_ENABLE 16
+#define DMA_OUT_AUTO_START_ENABLE 4
+#define DMA_PREEMPT_ENABLE 3
+#define DMA_FIFO_VALIDATE 2
+#define DMA_ENABLE 1
+#define DMA_ADDRESS_HOLD 0
+ u32 dmastat;
+#define DMA_SCATTER_GATHER_DONE_INTERRUPT 25
+#define DMA_TRANSACTION_DONE_INTERRUPT 24
+#define DMA_ABORT 1
+#define DMA_START 0
+ u32 _unused0 [2];
+ // offset 0x0190, 0x01b0, 0x01d0, 0x01f0,
+ u32 dmacount;
+#define VALID_BIT 31
+#define DMA_DIRECTION 30
+#define DMA_DONE_INTERRUPT_ENABLE 29
+#define END_OF_CHAIN 28
+#define DMA_BYTE_COUNT_MASK ((1<<24)-1)
+#define DMA_BYTE_COUNT 0
+ u32 dmaaddr;
+ u32 dmadesc;
+ u32 _unused1;
+} __attribute__ ((packed));
+
+/* dedicated endpoint registers, BAR0 + 0x0200 */
+
+struct net2280_dep_regs { /* [11.8] */
+ // offset 0x0200, 0x0210, 0x220, 0x230, 0x240
+ u32 dep_cfg;
+ // offset 0x0204, 0x0214, 0x224, 0x234, 0x244
+ u32 dep_rsp;
+ u32 _unused [2];
+} __attribute__ ((packed));
+
+/* configurable endpoint registers, BAR0 + 0x0300 ... array of seven structs
+ * like this, for ep0 then the configurable endpoints A..F
+ * ep0 reserved for control; E and F have only 64 bytes of fifo
+ */
+struct net2280_ep_regs { /* [11.9] */
+ // offset 0x0300, 0x0320, 0x0340, 0x0360, 0x0380, 0x03a0, 0x03c0
+ u32 ep_cfg;
+#define ENDPOINT_BYTE_COUNT 16
+#define ENDPOINT_ENABLE 10
+#define ENDPOINT_TYPE 8
+#define ENDPOINT_DIRECTION 7
+#define ENDPOINT_NUMBER 0
+ u32 ep_rsp;
+#define SET_NAK_OUT_PACKETS 15
+#define SET_EP_HIDE_STATUS_PHASE 14
+#define SET_EP_FORCE_CRC_ERROR 13
+#define SET_INTERRUPT_MODE 12
+#define SET_CONTROL_STATUS_PHASE_HANDSHAKE 11
+#define SET_NAK_OUT_PACKETS_MODE 10
+#define SET_ENDPOINT_TOGGLE 9
+#define SET_ENDPOINT_HALT 8
+#define CLEAR_NAK_OUT_PACKETS 7
+#define CLEAR_EP_HIDE_STATUS_PHASE 6
+#define CLEAR_EP_FORCE_CRC_ERROR 5
+#define CLEAR_INTERRUPT_MODE 4
+#define CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE 3
+#define CLEAR_NAK_OUT_PACKETS_MODE 2
+#define CLEAR_ENDPOINT_TOGGLE 1
+#define CLEAR_ENDPOINT_HALT 0
+ u32 ep_irqenb;
+#define SHORT_PACKET_OUT_DONE_INTERRUPT_ENABLE 6
+#define SHORT_PACKET_TRANSFERRED_INTERRUPT_ENABLE 5
+#define DATA_PACKET_RECEIVED_INTERRUPT_ENABLE 3
+#define DATA_PACKET_TRANSMITTED_INTERRUPT_ENABLE 2
+#define DATA_OUT_PING_TOKEN_INTERRUPT_ENABLE 1
+#define DATA_IN_TOKEN_INTERRUPT_ENABLE 0
+ u32 ep_stat;
+#define FIFO_VALID_COUNT 24
+#define HIGH_BANDWIDTH_OUT_TRANSACTION_PID 22
+#define TIMEOUT 21
+#define USB_STALL_SENT 20
+#define USB_IN_NAK_SENT 19
+#define USB_IN_ACK_RCVD 18
+#define USB_OUT_PING_NAK_SENT 17
+#define USB_OUT_ACK_SENT 16
+#define FIFO_OVERFLOW 13
+#define FIFO_UNDERFLOW 12
+#define FIFO_FULL 11
+#define FIFO_EMPTY 10
+#define FIFO_FLUSH 9
+#define SHORT_PACKET_OUT_DONE_INTERRUPT 6
+#define SHORT_PACKET_TRANSFERRED_INTERRUPT 5
+#define NAK_OUT_PACKETS 4
+#define DATA_PACKET_RECEIVED_INTERRUPT 3
+#define DATA_PACKET_TRANSMITTED_INTERRUPT 2
+#define DATA_OUT_PING_TOKEN_INTERRUPT 1
+#define DATA_IN_TOKEN_INTERRUPT 0
+ // offset 0x0310, 0x0330, 0x0350, 0x0370, 0x0390, 0x03b0, 0x03d0
+ u32 ep_avail;
+ u32 ep_data;
+ u32 _unused0 [2];
+} __attribute__ ((packed));
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef __KERNEL__
+
+/* indexed registers [11.10] are accessed indirectly
+ * caller must own the device lock.
+ */
+
+static inline u32
+get_idx_reg (struct net2280_regs __iomem *regs, u32 index)
+{
+ writel (index, &regs->idxaddr);
+ /* NOTE: synchs device/cpu memory views */
+ return readl (&regs->idxdata);
+}
+
+static inline void
+set_idx_reg (struct net2280_regs __iomem *regs, u32 index, u32 value)
+{
+ writel (index, &regs->idxaddr);
+ writel (value, &regs->idxdata);
+ /* posted, may not be visible yet */
+}
+
+#endif /* __KERNEL__ */
+
+
+#define REG_DIAG 0x0
+#define RETRY_COUNTER 16
+#define FORCE_PCI_SERR 11
+#define FORCE_PCI_INTERRUPT 10
+#define FORCE_USB_INTERRUPT 9
+#define FORCE_CPU_INTERRUPT 8
+#define ILLEGAL_BYTE_ENABLES 5
+#define FAST_TIMES 4
+#define FORCE_RECEIVE_ERROR 2
+#define FORCE_TRANSMIT_CRC_ERROR 0
+#define REG_FRAME 0x02 /* from last sof */
+#define REG_CHIPREV 0x03 /* in bcd */
+#define REG_HS_NAK_RATE 0x0a /* NAK per N uframes */
+
+#define CHIPREV_1 0x0100
+#define CHIPREV_1A 0x0110
+
+#ifdef __KERNEL__
+
+/* ep a-f highspeed and fullspeed maxpacket, addresses
+ * computed from ep->num
+ */
+#define REG_EP_MAXPKT(dev,num) (((num) + 1) * 0x10 + \
+ (((dev)->gadget.speed == USB_SPEED_HIGH) ? 0 : 1))
+
+/*-------------------------------------------------------------------------*/
+
+/* [8.3] for scatter/gather i/o
+ * use struct net2280_dma_regs bitfields
+ */
+struct net2280_dma {
+ __le32 dmacount;
+ __le32 dmaaddr; /* the buffer */
+ __le32 dmadesc; /* next dma descriptor */
+ __le32 _reserved;
+} __attribute__ ((aligned (16)));
+
+/*-------------------------------------------------------------------------*/
+
+/* DRIVER DATA STRUCTURES and UTILITIES */
+
+struct net2280_ep {
+ struct usb_ep ep;
+ struct net2280_ep_regs __iomem *regs;
+ struct net2280_dma_regs __iomem *dma;
+ struct net2280_dma *dummy;
+ dma_addr_t td_dma; /* of dummy */
+ struct net2280 *dev;
+ unsigned long irqs;
+
+ /* analogous to a host-side qh */
+ struct list_head queue;
+ const struct usb_endpoint_descriptor *desc;
+ unsigned num : 8,
+ fifo_size : 12,
+ in_fifo_validate : 1,
+ out_overflow : 1,
+ stopped : 1,
+ is_in : 1,
+ is_iso : 1;
+};
+
+static inline void allow_status (struct net2280_ep *ep)
+{
+ /* ep0 only */
+ writel ( (1 << CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE)
+ | (1 << CLEAR_NAK_OUT_PACKETS)
+ | (1 << CLEAR_NAK_OUT_PACKETS_MODE)
+ , &ep->regs->ep_rsp);
+ ep->stopped = 1;
+}
+
+/* count (<= 4) bytes in the next fifo write will be valid */
+static inline void set_fifo_bytecount (struct net2280_ep *ep, unsigned count)
+{
+ writeb (count, 2 + (u8 __iomem *) &ep->regs->ep_cfg);
+}
+
+struct net2280_request {
+ struct usb_request req;
+ struct net2280_dma *td;
+ dma_addr_t td_dma;
+ struct list_head queue;
+ unsigned mapped : 1,
+ valid : 1;
+};
+
+struct net2280 {
+ /* each pci device provides one gadget, several endpoints */
+ struct usb_gadget gadget;
+ spinlock_t lock;
+ struct net2280_ep ep [7];
+ struct usb_gadget_driver *driver;
+ unsigned enabled : 1,
+ protocol_stall : 1,
+ softconnect : 1,
+ got_irq : 1,
+ region : 1;
+ u16 chiprev;
+
+ /* pci state used to access those endpoints */
+ struct pci_dev *pdev;
+ struct net2280_regs __iomem *regs;
+ struct net2280_usb_regs __iomem *usb;
+ struct net2280_pci_regs __iomem *pci;
+ struct net2280_dma_regs __iomem *dma;
+ struct net2280_dep_regs __iomem *dep;
+ struct net2280_ep_regs __iomem *epregs;
+
+ struct pci_pool *requests;
+ // statistics...
+};
+
+static inline void set_halt (struct net2280_ep *ep)
+{
+ /* ep0 and bulk/intr endpoints */
+ writel ( (1 << CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE)
+ /* set NAK_OUT for erratum 0114 */
+ | ((ep->dev->chiprev == CHIPREV_1) << SET_NAK_OUT_PACKETS)
+ | (1 << SET_ENDPOINT_HALT)
+ , &ep->regs->ep_rsp);
+}
+
+static inline void clear_halt (struct net2280_ep *ep)
+{
+ /* ep0 and bulk/intr endpoints */
+ writel ( (1 << CLEAR_ENDPOINT_HALT)
+ | (1 << CLEAR_ENDPOINT_TOGGLE)
+ /* unless the gadget driver left a short packet in the
+ * fifo, this reverses the erratum 0114 workaround.
+ */
+ | ((ep->dev->chiprev == CHIPREV_1) << CLEAR_NAK_OUT_PACKETS)
+ , &ep->regs->ep_rsp);
+}
+
+#ifdef USE_RDK_LEDS
+
+static inline void net2280_led_init (struct net2280 *dev)
+{
+ /* LED3 (green) is on during USB activity. note erratum 0113. */
+ writel ((1 << GPIO3_LED_SELECT)
+ | (1 << GPIO3_OUTPUT_ENABLE)
+ | (1 << GPIO2_OUTPUT_ENABLE)
+ | (1 << GPIO1_OUTPUT_ENABLE)
+ | (1 << GPIO0_OUTPUT_ENABLE)
+ , &dev->regs->gpioctl);
+}
+
+/* indicate speed with bi-color LED 0/1 */
+static inline
+void net2280_led_speed (struct net2280 *dev, enum usb_device_speed speed)
+{
+ u32 val = readl (&dev->regs->gpioctl);
+ switch (speed) {
+ case USB_SPEED_HIGH: /* green */
+ val &= ~(1 << GPIO0_DATA);
+ val |= (1 << GPIO1_DATA);
+ break;
+ case USB_SPEED_FULL: /* red */
+ val &= ~(1 << GPIO1_DATA);
+ val |= (1 << GPIO0_DATA);
+ break;
+ default: /* (off/black) */
+ val &= ~((1 << GPIO1_DATA) | (1 << GPIO0_DATA));
+ break;
+ }
+ writel (val, &dev->regs->gpioctl);
+}
+
+/* indicate power with LED 2 */
+static inline void net2280_led_active (struct net2280 *dev, int is_active)
+{
+ u32 val = readl (&dev->regs->gpioctl);
+
+ // FIXME this LED never seems to turn on.
+ if (is_active)
+ val |= GPIO2_DATA;
+ else
+ val &= ~GPIO2_DATA;
+ writel (val, &dev->regs->gpioctl);
+}
+static inline void net2280_led_shutdown (struct net2280 *dev)
+{
+ /* turn off all four GPIO*_DATA bits */
+ writel (readl (&dev->regs->gpioctl) & ~0x0f,
+ &dev->regs->gpioctl);
+}
+
+#else
+
+#define net2280_led_init(dev) do { } while (0)
+#define net2280_led_speed(dev, speed) do { } while (0)
+#define net2280_led_shutdown(dev) do { } while (0)
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+#define xprintk(dev,level,fmt,args...) \
+ printk(level "%s %s: " fmt , driver_name , \
+ pci_name(dev->pdev) , ## args)
+
+#ifdef DEBUG
+#undef DEBUG
+#define DEBUG(dev,fmt,args...) \
+ xprintk(dev , KERN_DEBUG , fmt , ## args)
+#else
+#define DEBUG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* DEBUG */
+
+#ifdef VERBOSE
+#define VDEBUG DEBUG
+#else
+#define VDEBUG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* VERBOSE */
+
+#define ERROR(dev,fmt,args...) \
+ xprintk(dev , KERN_ERR , fmt , ## args)
+#define WARN(dev,fmt,args...) \
+ xprintk(dev , KERN_WARNING , fmt , ## args)
+#define INFO(dev,fmt,args...) \
+ xprintk(dev , KERN_INFO , fmt , ## args)
+
+/*-------------------------------------------------------------------------*/
+
+static inline void start_out_naking (struct net2280_ep *ep)
+{
+ /* NOTE: hardware races lurk here, and PING protocol issues */
+ writel ((1 << SET_NAK_OUT_PACKETS), &ep->regs->ep_rsp);
+ /* synch with device */
+ readl (&ep->regs->ep_rsp);
+}
+
+#ifdef DEBUG
+static inline void assert_out_naking (struct net2280_ep *ep, const char *where)
+{
+ u32 tmp = readl (&ep->regs->ep_stat);
+
+ if ((tmp & (1 << NAK_OUT_PACKETS)) == 0) {
+ DEBUG (ep->dev, "%s %s %08x !NAK\n",
+ ep->ep.name, where, tmp);
+ writel ((1 << SET_NAK_OUT_PACKETS),
+ &ep->regs->ep_rsp);
+ }
+}
+#define ASSERT_OUT_NAKING(ep) assert_out_naking(ep,__FUNCTION__)
+#else
+#define ASSERT_OUT_NAKING(ep) do {} while (0)
+#endif
+
+static inline void stop_out_naking (struct net2280_ep *ep)
+{
+ u32 tmp;
+
+ tmp = readl (&ep->regs->ep_stat);
+ if ((tmp & (1 << NAK_OUT_PACKETS)) != 0)
+ writel ((1 << CLEAR_NAK_OUT_PACKETS), &ep->regs->ep_rsp);
+}
+
+#endif /* __KERNEL__ */
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
new file mode 100644
index 000000000000..b66ea5a6ed79
--- /dev/null
+++ b/drivers/usb/gadget/omap_udc.c
@@ -0,0 +1,2872 @@
+/*
+ * omap_udc.c -- for OMAP full speed udc; most chips support OTG.
+ *
+ * Copyright (C) 2004 Texas Instruments, Inc.
+ * Copyright (C) 2004-2005 David Brownell
+ *
+ * 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
+ */
+
+#undef DEBUG
+#undef VERBOSE
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/ioport.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/proc_fs.h>
+#include <linux/mm.h>
+#include <linux/moduleparam.h>
+#include <linux/device.h>
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+#include <linux/usb_otg.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+#include <asm/mach-types.h>
+
+#include <asm/arch/dma.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/usb.h>
+
+#include "omap_udc.h"
+
+#undef USB_TRACE
+
+/* bulk DMA seems to be behaving for both IN and OUT */
+#define USE_DMA
+
+/* ISO too */
+#define USE_ISO
+
+#define DRIVER_DESC "OMAP UDC driver"
+#define DRIVER_VERSION "4 October 2004"
+
+#define DMA_ADDR_INVALID (~(dma_addr_t)0)
+
+
+/*
+ * The OMAP UDC needs _very_ early endpoint setup: before enabling the
+ * D+ pullup to allow enumeration. That's too early for the gadget
+ * framework to use from usb_endpoint_enable(), which happens after
+ * enumeration as part of activating an interface. (But if we add an
+ * optional new "UDC not yet running" state to the gadget driver model,
+ * even just during driver binding, the endpoint autoconfig logic is the
+ * natural spot to manufacture new endpoints.)
+ *
+ * So instead of using endpoint enable calls to control the hardware setup,
+ * this driver defines a "fifo mode" parameter. It's used during driver
+ * initialization to choose among a set of pre-defined endpoint configs.
+ * See omap_udc_setup() for available modes, or to add others. That code
+ * lives in an init section, so use this driver as a module if you need
+ * to change the fifo mode after the kernel boots.
+ *
+ * Gadget drivers normally ignore endpoints they don't care about, and
+ * won't include them in configuration descriptors. That means only
+ * misbehaving hosts would even notice they exist.
+ */
+#ifdef USE_ISO
+static unsigned fifo_mode = 3;
+#else
+static unsigned fifo_mode = 0;
+#endif
+
+/* "modprobe omap_udc fifo_mode=42", or else as a kernel
+ * boot parameter "omap_udc:fifo_mode=42"
+ */
+module_param (fifo_mode, uint, 0);
+MODULE_PARM_DESC (fifo_mode, "endpoint setup (0 == default)");
+
+#ifdef USE_DMA
+static unsigned use_dma = 1;
+
+/* "modprobe omap_udc use_dma=y", or else as a kernel
+ * boot parameter "omap_udc:use_dma=y"
+ */
+module_param (use_dma, bool, 0);
+MODULE_PARM_DESC (use_dma, "enable/disable DMA");
+#else /* !USE_DMA */
+
+/* save a bit of code */
+#define use_dma 0
+#endif /* !USE_DMA */
+
+
+static const char driver_name [] = "omap_udc";
+static const char driver_desc [] = DRIVER_DESC;
+
+/*-------------------------------------------------------------------------*/
+
+/* there's a notion of "current endpoint" for modifying endpoint
+ * state, and PIO access to its FIFO.
+ */
+
+static void use_ep(struct omap_ep *ep, u16 select)
+{
+ u16 num = ep->bEndpointAddress & 0x0f;
+
+ if (ep->bEndpointAddress & USB_DIR_IN)
+ num |= UDC_EP_DIR;
+ UDC_EP_NUM_REG = num | select;
+ /* when select, MUST deselect later !! */
+}
+
+static inline void deselect_ep(void)
+{
+ UDC_EP_NUM_REG &= ~UDC_EP_SEL;
+ /* 6 wait states before TX will happen */
+}
+
+static void dma_channel_claim(struct omap_ep *ep, unsigned preferred);
+
+/*-------------------------------------------------------------------------*/
+
+static int omap_ep_enable(struct usb_ep *_ep,
+ const struct usb_endpoint_descriptor *desc)
+{
+ struct omap_ep *ep = container_of(_ep, struct omap_ep, ep);
+ struct omap_udc *udc;
+ unsigned long flags;
+ u16 maxp;
+
+ /* catch various bogus parameters */
+ if (!_ep || !desc || ep->desc
+ || desc->bDescriptorType != USB_DT_ENDPOINT
+ || ep->bEndpointAddress != desc->bEndpointAddress
+ || ep->maxpacket < le16_to_cpu
+ (desc->wMaxPacketSize)) {
+ DBG("%s, bad ep or descriptor\n", __FUNCTION__);
+ return -EINVAL;
+ }
+ maxp = le16_to_cpu (desc->wMaxPacketSize);
+ if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
+ && maxp != ep->maxpacket)
+ || desc->wMaxPacketSize > ep->maxpacket
+ || !desc->wMaxPacketSize) {
+ DBG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name);
+ return -ERANGE;
+ }
+
+#ifdef USE_ISO
+ if ((desc->bmAttributes == USB_ENDPOINT_XFER_ISOC
+ && desc->bInterval != 1)) {
+ /* hardware wants period = 1; USB allows 2^(Interval-1) */
+ DBG("%s, unsupported ISO period %dms\n", _ep->name,
+ 1 << (desc->bInterval - 1));
+ return -EDOM;
+ }
+#else
+ if (desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
+ DBG("%s, ISO nyet\n", _ep->name);
+ return -EDOM;
+ }
+#endif
+
+ /* xfer types must match, except that interrupt ~= bulk */
+ if (ep->bmAttributes != desc->bmAttributes
+ && ep->bmAttributes != USB_ENDPOINT_XFER_BULK
+ && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
+ DBG("%s, %s type mismatch\n", __FUNCTION__, _ep->name);
+ return -EINVAL;
+ }
+
+ udc = ep->udc;
+ if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
+ DBG("%s, bogus device state\n", __FUNCTION__);
+ return -ESHUTDOWN;
+ }
+
+ spin_lock_irqsave(&udc->lock, flags);
+
+ ep->desc = desc;
+ ep->irqs = 0;
+ ep->stopped = 0;
+ ep->ep.maxpacket = maxp;
+
+ /* set endpoint to initial state */
+ ep->dma_channel = 0;
+ ep->has_dma = 0;
+ ep->lch = -1;
+ use_ep(ep, UDC_EP_SEL);
+ UDC_CTRL_REG = UDC_RESET_EP;
+ ep->ackwait = 0;
+ deselect_ep();
+
+ if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC)
+ list_add(&ep->iso, &udc->iso);
+
+ /* maybe assign a DMA channel to this endpoint */
+ if (use_dma && desc->bmAttributes == USB_ENDPOINT_XFER_BULK)
+ /* FIXME ISO can dma, but prefers first channel */
+ dma_channel_claim(ep, 0);
+
+ /* PIO OUT may RX packets */
+ if (desc->bmAttributes != USB_ENDPOINT_XFER_ISOC
+ && !ep->has_dma
+ && !(ep->bEndpointAddress & USB_DIR_IN)) {
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ ep->ackwait = 1 + ep->double_buf;
+ }
+
+ spin_unlock_irqrestore(&udc->lock, flags);
+ VDBG("%s enabled\n", _ep->name);
+ return 0;
+}
+
+static void nuke(struct omap_ep *, int status);
+
+static int omap_ep_disable(struct usb_ep *_ep)
+{
+ struct omap_ep *ep = container_of(_ep, struct omap_ep, ep);
+ unsigned long flags;
+
+ if (!_ep || !ep->desc) {
+ DBG("%s, %s not enabled\n", __FUNCTION__,
+ _ep ? ep->ep.name : NULL);
+ return -EINVAL;
+ }
+
+ spin_lock_irqsave(&ep->udc->lock, flags);
+ ep->desc = 0;
+ nuke (ep, -ESHUTDOWN);
+ ep->ep.maxpacket = ep->maxpacket;
+ ep->has_dma = 0;
+ UDC_CTRL_REG = UDC_SET_HALT;
+ list_del_init(&ep->iso);
+ del_timer(&ep->timer);
+
+ spin_unlock_irqrestore(&ep->udc->lock, flags);
+
+ VDBG("%s disabled\n", _ep->name);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct usb_request *
+omap_alloc_request(struct usb_ep *ep, int gfp_flags)
+{
+ struct omap_req *req;
+
+ req = kmalloc(sizeof *req, gfp_flags);
+ if (req) {
+ memset (req, 0, sizeof *req);
+ req->req.dma = DMA_ADDR_INVALID;
+ INIT_LIST_HEAD (&req->queue);
+ }
+ return &req->req;
+}
+
+static void
+omap_free_request(struct usb_ep *ep, struct usb_request *_req)
+{
+ struct omap_req *req = container_of(_req, struct omap_req, req);
+
+ if (_req)
+ kfree (req);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void *
+omap_alloc_buffer(
+ struct usb_ep *_ep,
+ unsigned bytes,
+ dma_addr_t *dma,
+ int gfp_flags
+)
+{
+ void *retval;
+ struct omap_ep *ep;
+
+ ep = container_of(_ep, struct omap_ep, ep);
+ if (use_dma && ep->has_dma) {
+ static int warned;
+ if (!warned && bytes < PAGE_SIZE) {
+ dev_warn(ep->udc->gadget.dev.parent,
+ "using dma_alloc_coherent for "
+ "small allocations wastes memory\n");
+ warned++;
+ }
+ return dma_alloc_coherent(ep->udc->gadget.dev.parent,
+ bytes, dma, gfp_flags);
+ }
+
+ retval = kmalloc(bytes, gfp_flags);
+ if (retval)
+ *dma = virt_to_phys(retval);
+ return retval;
+}
+
+static void omap_free_buffer(
+ struct usb_ep *_ep,
+ void *buf,
+ dma_addr_t dma,
+ unsigned bytes
+)
+{
+ struct omap_ep *ep;
+
+ ep = container_of(_ep, struct omap_ep, ep);
+ if (use_dma && _ep && ep->has_dma)
+ dma_free_coherent(ep->udc->gadget.dev.parent, bytes, buf, dma);
+ else
+ kfree (buf);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void
+done(struct omap_ep *ep, struct omap_req *req, int status)
+{
+ unsigned stopped = ep->stopped;
+
+ list_del_init(&req->queue);
+
+ if (req->req.status == -EINPROGRESS)
+ req->req.status = status;
+ else
+ status = req->req.status;
+
+ if (use_dma && ep->has_dma) {
+ if (req->mapped) {
+ dma_unmap_single(ep->udc->gadget.dev.parent,
+ req->req.dma, req->req.length,
+ (ep->bEndpointAddress & USB_DIR_IN)
+ ? DMA_TO_DEVICE
+ : DMA_FROM_DEVICE);
+ req->req.dma = DMA_ADDR_INVALID;
+ req->mapped = 0;
+ } else
+ dma_sync_single_for_cpu(ep->udc->gadget.dev.parent,
+ req->req.dma, req->req.length,
+ (ep->bEndpointAddress & USB_DIR_IN)
+ ? DMA_TO_DEVICE
+ : DMA_FROM_DEVICE);
+ }
+
+#ifndef USB_TRACE
+ if (status && status != -ESHUTDOWN)
+#endif
+ VDBG("complete %s req %p stat %d len %u/%u\n",
+ ep->ep.name, &req->req, status,
+ req->req.actual, req->req.length);
+
+ /* don't modify queue heads during completion callback */
+ ep->stopped = 1;
+ spin_unlock(&ep->udc->lock);
+ req->req.complete(&ep->ep, &req->req);
+ spin_lock(&ep->udc->lock);
+ ep->stopped = stopped;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#define FIFO_FULL (UDC_NON_ISO_FIFO_FULL | UDC_ISO_FIFO_FULL)
+#define FIFO_UNWRITABLE (UDC_EP_HALTED | FIFO_FULL)
+
+#define FIFO_EMPTY (UDC_NON_ISO_FIFO_EMPTY | UDC_ISO_FIFO_EMPTY)
+#define FIFO_UNREADABLE (UDC_EP_HALTED | FIFO_EMPTY)
+
+static inline int
+write_packet(u8 *buf, struct omap_req *req, unsigned max)
+{
+ unsigned len;
+ u16 *wp;
+
+ len = min(req->req.length - req->req.actual, max);
+ req->req.actual += len;
+
+ max = len;
+ if (likely((((int)buf) & 1) == 0)) {
+ wp = (u16 *)buf;
+ while (max >= 2) {
+ UDC_DATA_REG = *wp++;
+ max -= 2;
+ }
+ buf = (u8 *)wp;
+ }
+ while (max--)
+ *(volatile u8 *)&UDC_DATA_REG = *buf++;
+ return len;
+}
+
+// FIXME change r/w fifo calling convention
+
+
+// return: 0 = still running, 1 = completed, negative = errno
+static int write_fifo(struct omap_ep *ep, struct omap_req *req)
+{
+ u8 *buf;
+ unsigned count;
+ int is_last;
+ u16 ep_stat;
+
+ buf = req->req.buf + req->req.actual;
+ prefetch(buf);
+
+ /* PIO-IN isn't double buffered except for iso */
+ ep_stat = UDC_STAT_FLG_REG;
+ if (ep_stat & FIFO_UNWRITABLE)
+ return 0;
+
+ count = ep->ep.maxpacket;
+ count = write_packet(buf, req, count);
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ ep->ackwait = 1;
+
+ /* last packet is often short (sometimes a zlp) */
+ if (count != ep->ep.maxpacket)
+ is_last = 1;
+ else if (req->req.length == req->req.actual
+ && !req->req.zero)
+ is_last = 1;
+ else
+ is_last = 0;
+
+ /* NOTE: requests complete when all IN data is in a
+ * FIFO (or sometimes later, if a zlp was needed).
+ * Use usb_ep_fifo_status() where needed.
+ */
+ if (is_last)
+ done(ep, req, 0);
+ return is_last;
+}
+
+static inline int
+read_packet(u8 *buf, struct omap_req *req, unsigned avail)
+{
+ unsigned len;
+ u16 *wp;
+
+ len = min(req->req.length - req->req.actual, avail);
+ req->req.actual += len;
+ avail = len;
+
+ if (likely((((int)buf) & 1) == 0)) {
+ wp = (u16 *)buf;
+ while (avail >= 2) {
+ *wp++ = UDC_DATA_REG;
+ avail -= 2;
+ }
+ buf = (u8 *)wp;
+ }
+ while (avail--)
+ *buf++ = *(volatile u8 *)&UDC_DATA_REG;
+ return len;
+}
+
+// return: 0 = still running, 1 = queue empty, negative = errno
+static int read_fifo(struct omap_ep *ep, struct omap_req *req)
+{
+ u8 *buf;
+ unsigned count, avail;
+ int is_last;
+
+ buf = req->req.buf + req->req.actual;
+ prefetchw(buf);
+
+ for (;;) {
+ u16 ep_stat = UDC_STAT_FLG_REG;
+
+ is_last = 0;
+ if (ep_stat & FIFO_EMPTY) {
+ if (!ep->double_buf)
+ break;
+ ep->fnf = 1;
+ }
+ if (ep_stat & UDC_EP_HALTED)
+ break;
+
+ if (ep_stat & FIFO_FULL)
+ avail = ep->ep.maxpacket;
+ else {
+ avail = UDC_RXFSTAT_REG;
+ ep->fnf = ep->double_buf;
+ }
+ count = read_packet(buf, req, avail);
+
+ /* partial packet reads may not be errors */
+ if (count < ep->ep.maxpacket) {
+ is_last = 1;
+ /* overflowed this request? flush extra data */
+ if (count != avail) {
+ req->req.status = -EOVERFLOW;
+ avail -= count;
+ while (avail--)
+ (void) *(volatile u8 *)&UDC_DATA_REG;
+ }
+ } else if (req->req.length == req->req.actual)
+ is_last = 1;
+ else
+ is_last = 0;
+
+ if (!ep->bEndpointAddress)
+ break;
+ if (is_last)
+ done(ep, req, 0);
+ break;
+ }
+ return is_last;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static u16 dma_src_len(struct omap_ep *ep, dma_addr_t start)
+{
+ dma_addr_t end;
+
+ /* IN-DMA needs this on fault/cancel paths, so 15xx misreports
+ * the last transfer's bytecount by more than a FIFO's worth.
+ */
+ if (cpu_is_omap15xx())
+ return 0;
+
+ end = omap_readw(OMAP_DMA_CSAC(ep->lch));
+ if (end == ep->dma_counter)
+ return 0;
+
+ end |= start & (0xffff << 16);
+ if (end < start)
+ end += 0x10000;
+ return end - start;
+}
+
+#define DMA_DEST_LAST(x) (cpu_is_omap15xx() \
+ ? OMAP_DMA_CSAC(x) /* really: CPC */ \
+ : OMAP_DMA_CDAC(x))
+
+static u16 dma_dest_len(struct omap_ep *ep, dma_addr_t start)
+{
+ dma_addr_t end;
+
+ end = omap_readw(DMA_DEST_LAST(ep->lch));
+ if (end == ep->dma_counter)
+ return 0;
+
+ end |= start & (0xffff << 16);
+ if (cpu_is_omap15xx())
+ end++;
+ if (end < start)
+ end += 0x10000;
+ return end - start;
+}
+
+
+/* Each USB transfer request using DMA maps to one or more DMA transfers.
+ * When DMA completion isn't request completion, the UDC continues with
+ * the next DMA transfer for that USB transfer.
+ */
+
+static void next_in_dma(struct omap_ep *ep, struct omap_req *req)
+{
+ u16 txdma_ctrl;
+ unsigned length = req->req.length - req->req.actual;
+ const int sync_mode = cpu_is_omap15xx()
+ ? OMAP_DMA_SYNC_FRAME
+ : OMAP_DMA_SYNC_ELEMENT;
+
+ /* measure length in either bytes or packets */
+ if ((cpu_is_omap16xx() && length <= (UDC_TXN_TSC + 1))
+ || (cpu_is_omap15xx() && length < ep->maxpacket)) {
+ txdma_ctrl = UDC_TXN_EOT | length;
+ omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8,
+ length, 1, sync_mode);
+ } else {
+ length = min(length / ep->maxpacket,
+ (unsigned) UDC_TXN_TSC + 1);
+ txdma_ctrl = length;
+ omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8,
+ ep->ep.maxpacket, length, sync_mode);
+ length *= ep->maxpacket;
+ }
+ omap_set_dma_src_params(ep->lch, OMAP_DMA_PORT_EMIFF,
+ OMAP_DMA_AMODE_POST_INC, req->req.dma + req->req.actual);
+
+ omap_start_dma(ep->lch);
+ ep->dma_counter = omap_readw(OMAP_DMA_CSAC(ep->lch));
+ UDC_DMA_IRQ_EN_REG |= UDC_TX_DONE_IE(ep->dma_channel);
+ UDC_TXDMA_REG(ep->dma_channel) = UDC_TXN_START | txdma_ctrl;
+ req->dma_bytes = length;
+}
+
+static void finish_in_dma(struct omap_ep *ep, struct omap_req *req, int status)
+{
+ if (status == 0) {
+ req->req.actual += req->dma_bytes;
+
+ /* return if this request needs to send data or zlp */
+ if (req->req.actual < req->req.length)
+ return;
+ if (req->req.zero
+ && req->dma_bytes != 0
+ && (req->req.actual % ep->maxpacket) == 0)
+ return;
+ } else
+ req->req.actual += dma_src_len(ep, req->req.dma
+ + req->req.actual);
+
+ /* tx completion */
+ omap_stop_dma(ep->lch);
+ UDC_DMA_IRQ_EN_REG &= ~UDC_TX_DONE_IE(ep->dma_channel);
+ done(ep, req, status);
+}
+
+static void next_out_dma(struct omap_ep *ep, struct omap_req *req)
+{
+ unsigned packets;
+
+ /* NOTE: we filtered out "short reads" before, so we know
+ * the buffer has only whole numbers of packets.
+ */
+
+ /* set up this DMA transfer, enable the fifo, start */
+ packets = (req->req.length - req->req.actual) / ep->ep.maxpacket;
+ packets = min(packets, (unsigned)UDC_RXN_TC + 1);
+ req->dma_bytes = packets * ep->ep.maxpacket;
+ omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8,
+ ep->ep.maxpacket, packets,
+ OMAP_DMA_SYNC_ELEMENT);
+ omap_set_dma_dest_params(ep->lch, OMAP_DMA_PORT_EMIFF,
+ OMAP_DMA_AMODE_POST_INC, req->req.dma + req->req.actual);
+ ep->dma_counter = omap_readw(DMA_DEST_LAST(ep->lch));
+
+ UDC_RXDMA_REG(ep->dma_channel) = UDC_RXN_STOP | (packets - 1);
+ UDC_DMA_IRQ_EN_REG |= UDC_RX_EOT_IE(ep->dma_channel);
+ UDC_EP_NUM_REG = (ep->bEndpointAddress & 0xf);
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+
+ omap_start_dma(ep->lch);
+}
+
+static void
+finish_out_dma(struct omap_ep *ep, struct omap_req *req, int status)
+{
+ u16 count;
+
+ if (status == 0)
+ ep->dma_counter = (u16) (req->req.dma + req->req.actual);
+ count = dma_dest_len(ep, req->req.dma + req->req.actual);
+ count += req->req.actual;
+ if (count <= req->req.length)
+ req->req.actual = count;
+
+ if (count != req->dma_bytes || status)
+ omap_stop_dma(ep->lch);
+
+ /* if this wasn't short, request may need another transfer */
+ else if (req->req.actual < req->req.length)
+ return;
+
+ /* rx completion */
+ UDC_DMA_IRQ_EN_REG &= ~UDC_RX_EOT_IE(ep->dma_channel);
+ done(ep, req, status);
+}
+
+static void dma_irq(struct omap_udc *udc, u16 irq_src)
+{
+ u16 dman_stat = UDC_DMAN_STAT_REG;
+ struct omap_ep *ep;
+ struct omap_req *req;
+
+ /* IN dma: tx to host */
+ if (irq_src & UDC_TXN_DONE) {
+ ep = &udc->ep[16 + UDC_DMA_TX_SRC(dman_stat)];
+ ep->irqs++;
+ /* can see TXN_DONE after dma abort */
+ if (!list_empty(&ep->queue)) {
+ req = container_of(ep->queue.next,
+ struct omap_req, queue);
+ finish_in_dma(ep, req, 0);
+ }
+ UDC_IRQ_SRC_REG = UDC_TXN_DONE;
+
+ if (!list_empty (&ep->queue)) {
+ req = container_of(ep->queue.next,
+ struct omap_req, queue);
+ next_in_dma(ep, req);
+ }
+ }
+
+ /* OUT dma: rx from host */
+ if (irq_src & UDC_RXN_EOT) {
+ ep = &udc->ep[UDC_DMA_RX_SRC(dman_stat)];
+ ep->irqs++;
+ /* can see RXN_EOT after dma abort */
+ if (!list_empty(&ep->queue)) {
+ req = container_of(ep->queue.next,
+ struct omap_req, queue);
+ finish_out_dma(ep, req, 0);
+ }
+ UDC_IRQ_SRC_REG = UDC_RXN_EOT;
+
+ if (!list_empty (&ep->queue)) {
+ req = container_of(ep->queue.next,
+ struct omap_req, queue);
+ next_out_dma(ep, req);
+ }
+ }
+
+ if (irq_src & UDC_RXN_CNT) {
+ ep = &udc->ep[UDC_DMA_RX_SRC(dman_stat)];
+ ep->irqs++;
+ /* omap15xx does this unasked... */
+ VDBG("%s, RX_CNT irq?\n", ep->ep.name);
+ UDC_IRQ_SRC_REG = UDC_RXN_CNT;
+ }
+}
+
+static void dma_error(int lch, u16 ch_status, void *data)
+{
+ struct omap_ep *ep = data;
+
+ /* if ch_status & OMAP_DMA_DROP_IRQ ... */
+ /* if ch_status & OMAP_DMA_TOUT_IRQ ... */
+ ERR("%s dma error, lch %d status %02x\n", ep->ep.name, lch, ch_status);
+
+ /* complete current transfer ... */
+}
+
+static void dma_channel_claim(struct omap_ep *ep, unsigned channel)
+{
+ u16 reg;
+ int status, restart, is_in;
+
+ is_in = ep->bEndpointAddress & USB_DIR_IN;
+ if (is_in)
+ reg = UDC_TXDMA_CFG_REG;
+ else
+ reg = UDC_RXDMA_CFG_REG;
+ reg |= 1 << 12; /* "pulse" activated */
+
+ ep->dma_channel = 0;
+ ep->lch = -1;
+ if (channel == 0 || channel > 3) {
+ if ((reg & 0x0f00) == 0)
+ channel = 3;
+ else if ((reg & 0x00f0) == 0)
+ channel = 2;
+ else if ((reg & 0x000f) == 0) /* preferred for ISO */
+ channel = 1;
+ else {
+ status = -EMLINK;
+ goto just_restart;
+ }
+ }
+ reg |= (0x0f & ep->bEndpointAddress) << (4 * (channel - 1));
+ ep->dma_channel = channel;
+
+ if (is_in) {
+ status = omap_request_dma(OMAP_DMA_USB_W2FC_TX0 - 1 + channel,
+ ep->ep.name, dma_error, ep, &ep->lch);
+ if (status == 0) {
+ UDC_TXDMA_CFG_REG = reg;
+ omap_set_dma_dest_params(ep->lch,
+ OMAP_DMA_PORT_TIPB,
+ OMAP_DMA_AMODE_CONSTANT,
+ (unsigned long) io_v2p((u32)&UDC_DATA_DMA_REG));
+ }
+ } else {
+ status = omap_request_dma(OMAP_DMA_USB_W2FC_RX0 - 1 + channel,
+ ep->ep.name, dma_error, ep, &ep->lch);
+ if (status == 0) {
+ UDC_RXDMA_CFG_REG = reg;
+ omap_set_dma_src_params(ep->lch,
+ OMAP_DMA_PORT_TIPB,
+ OMAP_DMA_AMODE_CONSTANT,
+ (unsigned long) io_v2p((u32)&UDC_DATA_DMA_REG));
+ }
+ }
+ if (status)
+ ep->dma_channel = 0;
+ else {
+ ep->has_dma = 1;
+ omap_disable_dma_irq(ep->lch, OMAP_DMA_BLOCK_IRQ);
+
+ /* channel type P: hw synch (fifo) */
+ if (!cpu_is_omap15xx())
+ omap_writew(2, OMAP_DMA_LCH_CTRL(ep->lch));
+ }
+
+just_restart:
+ /* restart any queue, even if the claim failed */
+ restart = !ep->stopped && !list_empty(&ep->queue);
+
+ if (status)
+ DBG("%s no dma channel: %d%s\n", ep->ep.name, status,
+ restart ? " (restart)" : "");
+ else
+ DBG("%s claimed %cxdma%d lch %d%s\n", ep->ep.name,
+ is_in ? 't' : 'r',
+ ep->dma_channel - 1, ep->lch,
+ restart ? " (restart)" : "");
+
+ if (restart) {
+ struct omap_req *req;
+ req = container_of(ep->queue.next, struct omap_req, queue);
+ if (ep->has_dma)
+ (is_in ? next_in_dma : next_out_dma)(ep, req);
+ else {
+ use_ep(ep, UDC_EP_SEL);
+ (is_in ? write_fifo : read_fifo)(ep, req);
+ deselect_ep();
+ if (!is_in) {
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ ep->ackwait = 1 + ep->double_buf;
+ }
+ /* IN: 6 wait states before it'll tx */
+ }
+ }
+}
+
+static void dma_channel_release(struct omap_ep *ep)
+{
+ int shift = 4 * (ep->dma_channel - 1);
+ u16 mask = 0x0f << shift;
+ struct omap_req *req;
+ int active;
+
+ /* abort any active usb transfer request */
+ if (!list_empty(&ep->queue))
+ req = container_of(ep->queue.next, struct omap_req, queue);
+ else
+ req = 0;
+
+ active = ((1 << 7) & omap_readl(OMAP_DMA_CCR(ep->lch))) != 0;
+
+ DBG("%s release %s %cxdma%d %p\n", ep->ep.name,
+ active ? "active" : "idle",
+ (ep->bEndpointAddress & USB_DIR_IN) ? 't' : 'r',
+ ep->dma_channel - 1, req);
+
+ /* wait till current packet DMA finishes, and fifo empties */
+ if (ep->bEndpointAddress & USB_DIR_IN) {
+ UDC_TXDMA_CFG_REG &= ~mask;
+
+ if (req) {
+ finish_in_dma(ep, req, -ECONNRESET);
+
+ /* clear FIFO; hosts probably won't empty it */
+ use_ep(ep, UDC_EP_SEL);
+ UDC_CTRL_REG = UDC_CLR_EP;
+ deselect_ep();
+ }
+ while (UDC_TXDMA_CFG_REG & mask)
+ udelay(10);
+ } else {
+ UDC_RXDMA_CFG_REG &= ~mask;
+
+ /* dma empties the fifo */
+ while (UDC_RXDMA_CFG_REG & mask)
+ udelay(10);
+ if (req)
+ finish_out_dma(ep, req, -ECONNRESET);
+ }
+ omap_free_dma(ep->lch);
+ ep->dma_channel = 0;
+ ep->lch = -1;
+ /* has_dma still set, till endpoint is fully quiesced */
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static int
+omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags)
+{
+ struct omap_ep *ep = container_of(_ep, struct omap_ep, ep);
+ struct omap_req *req = container_of(_req, struct omap_req, req);
+ struct omap_udc *udc;
+ unsigned long flags;
+ int is_iso = 0;
+
+ /* catch various bogus parameters */
+ if (!_req || !req->req.complete || !req->req.buf
+ || !list_empty(&req->queue)) {
+ DBG("%s, bad params\n", __FUNCTION__);
+ return -EINVAL;
+ }
+ if (!_ep || (!ep->desc && ep->bEndpointAddress)) {
+ DBG("%s, bad ep\n", __FUNCTION__);
+ return -EINVAL;
+ }
+ if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
+ if (req->req.length > ep->ep.maxpacket)
+ return -EMSGSIZE;
+ is_iso = 1;
+ }
+
+ /* this isn't bogus, but OMAP DMA isn't the only hardware to
+ * have a hard time with partial packet reads... reject it.
+ */
+ if (use_dma
+ && ep->has_dma
+ && ep->bEndpointAddress != 0
+ && (ep->bEndpointAddress & USB_DIR_IN) == 0
+ && (req->req.length % ep->ep.maxpacket) != 0) {
+ DBG("%s, no partial packet OUT reads\n", __FUNCTION__);
+ return -EMSGSIZE;
+ }
+
+ udc = ep->udc;
+ if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN)
+ return -ESHUTDOWN;
+
+ if (use_dma && ep->has_dma) {
+ if (req->req.dma == DMA_ADDR_INVALID) {
+ req->req.dma = dma_map_single(
+ ep->udc->gadget.dev.parent,
+ req->req.buf,
+ req->req.length,
+ (ep->bEndpointAddress & USB_DIR_IN)
+ ? DMA_TO_DEVICE
+ : DMA_FROM_DEVICE);
+ req->mapped = 1;
+ } else {
+ dma_sync_single_for_device(
+ ep->udc->gadget.dev.parent,
+ req->req.dma, req->req.length,
+ (ep->bEndpointAddress & USB_DIR_IN)
+ ? DMA_TO_DEVICE
+ : DMA_FROM_DEVICE);
+ req->mapped = 0;
+ }
+ }
+
+ VDBG("%s queue req %p, len %d buf %p\n",
+ ep->ep.name, _req, _req->length, _req->buf);
+
+ spin_lock_irqsave(&udc->lock, flags);
+
+ req->req.status = -EINPROGRESS;
+ req->req.actual = 0;
+
+ /* maybe kickstart non-iso i/o queues */
+ if (is_iso)
+ UDC_IRQ_EN_REG |= UDC_SOF_IE;
+ else if (list_empty(&ep->queue) && !ep->stopped && !ep->ackwait) {
+ int is_in;
+
+ if (ep->bEndpointAddress == 0) {
+ if (!udc->ep0_pending || !list_empty (&ep->queue)) {
+ spin_unlock_irqrestore(&udc->lock, flags);
+ return -EL2HLT;
+ }
+
+ /* empty DATA stage? */
+ is_in = udc->ep0_in;
+ if (!req->req.length) {
+
+ /* chip became CONFIGURED or ADDRESSED
+ * earlier; drivers may already have queued
+ * requests to non-control endpoints
+ */
+ if (udc->ep0_set_config) {
+ u16 irq_en = UDC_IRQ_EN_REG;
+
+ irq_en |= UDC_DS_CHG_IE | UDC_EP0_IE;
+ if (!udc->ep0_reset_config)
+ irq_en |= UDC_EPN_RX_IE
+ | UDC_EPN_TX_IE;
+ UDC_IRQ_EN_REG = irq_en;
+ }
+
+ /* STATUS is reverse direction */
+ UDC_EP_NUM_REG = is_in
+ ? UDC_EP_SEL
+ : (UDC_EP_SEL|UDC_EP_DIR);
+ UDC_CTRL_REG = UDC_CLR_EP;
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ UDC_EP_NUM_REG = udc->ep0_in ? 0 : UDC_EP_DIR;
+
+ /* cleanup */
+ udc->ep0_pending = 0;
+ done(ep, req, 0);
+ req = 0;
+
+ /* non-empty DATA stage */
+ } else if (is_in) {
+ UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR;
+ } else {
+ if (udc->ep0_setup)
+ goto irq_wait;
+ UDC_EP_NUM_REG = UDC_EP_SEL;
+ }
+ } else {
+ is_in = ep->bEndpointAddress & USB_DIR_IN;
+ if (!ep->has_dma)
+ use_ep(ep, UDC_EP_SEL);
+ /* if ISO: SOF IRQs must be enabled/disabled! */
+ }
+
+ if (ep->has_dma)
+ (is_in ? next_in_dma : next_out_dma)(ep, req);
+ else if (req) {
+ if ((is_in ? write_fifo : read_fifo)(ep, req) == 1)
+ req = 0;
+ deselect_ep();
+ if (!is_in) {
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ ep->ackwait = 1 + ep->double_buf;
+ }
+ /* IN: 6 wait states before it'll tx */
+ }
+ }
+
+irq_wait:
+ /* irq handler advances the queue */
+ if (req != 0)
+ list_add_tail(&req->queue, &ep->queue);
+ spin_unlock_irqrestore(&udc->lock, flags);
+
+ return 0;
+}
+
+static int omap_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct omap_ep *ep = container_of(_ep, struct omap_ep, ep);
+ struct omap_req *req;
+ unsigned long flags;
+
+ if (!_ep || !_req)
+ return -EINVAL;
+
+ spin_lock_irqsave(&ep->udc->lock, flags);
+
+ /* make sure it's actually queued on this endpoint */
+ list_for_each_entry (req, &ep->queue, queue) {
+ if (&req->req == _req)
+ break;
+ }
+ if (&req->req != _req) {
+ spin_unlock_irqrestore(&ep->udc->lock, flags);
+ return -EINVAL;
+ }
+
+ if (use_dma && ep->dma_channel && ep->queue.next == &req->queue) {
+ int channel = ep->dma_channel;
+
+ /* releasing the channel cancels the request,
+ * reclaiming the channel restarts the queue
+ */
+ dma_channel_release(ep);
+ dma_channel_claim(ep, channel);
+ } else
+ done(ep, req, -ECONNRESET);
+ spin_unlock_irqrestore(&ep->udc->lock, flags);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int omap_ep_set_halt(struct usb_ep *_ep, int value)
+{
+ struct omap_ep *ep = container_of(_ep, struct omap_ep, ep);
+ unsigned long flags;
+ int status = -EOPNOTSUPP;
+
+ spin_lock_irqsave(&ep->udc->lock, flags);
+
+ /* just use protocol stalls for ep0; real halts are annoying */
+ if (ep->bEndpointAddress == 0) {
+ if (!ep->udc->ep0_pending)
+ status = -EINVAL;
+ else if (value) {
+ if (ep->udc->ep0_set_config) {
+ WARN("error changing config?\n");
+ UDC_SYSCON2_REG = UDC_CLR_CFG;
+ }
+ UDC_SYSCON2_REG = UDC_STALL_CMD;
+ ep->udc->ep0_pending = 0;
+ status = 0;
+ } else /* NOP */
+ status = 0;
+
+ /* otherwise, all active non-ISO endpoints can halt */
+ } else if (ep->bmAttributes != USB_ENDPOINT_XFER_ISOC && ep->desc) {
+
+ /* IN endpoints must already be idle */
+ if ((ep->bEndpointAddress & USB_DIR_IN)
+ && !list_empty(&ep->queue)) {
+ status = -EAGAIN;
+ goto done;
+ }
+
+ if (value) {
+ int channel;
+
+ if (use_dma && ep->dma_channel
+ && !list_empty(&ep->queue)) {
+ channel = ep->dma_channel;
+ dma_channel_release(ep);
+ } else
+ channel = 0;
+
+ use_ep(ep, UDC_EP_SEL);
+ if (UDC_STAT_FLG_REG & UDC_NON_ISO_FIFO_EMPTY) {
+ UDC_CTRL_REG = UDC_SET_HALT;
+ status = 0;
+ } else
+ status = -EAGAIN;
+ deselect_ep();
+
+ if (channel)
+ dma_channel_claim(ep, channel);
+ } else {
+ use_ep(ep, 0);
+ UDC_CTRL_REG = UDC_RESET_EP;
+ ep->ackwait = 0;
+ if (!(ep->bEndpointAddress & USB_DIR_IN)) {
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ ep->ackwait = 1 + ep->double_buf;
+ }
+ }
+ }
+done:
+ VDBG("%s %s halt stat %d\n", ep->ep.name,
+ value ? "set" : "clear", status);
+
+ spin_unlock_irqrestore(&ep->udc->lock, flags);
+ return status;
+}
+
+static struct usb_ep_ops omap_ep_ops = {
+ .enable = omap_ep_enable,
+ .disable = omap_ep_disable,
+
+ .alloc_request = omap_alloc_request,
+ .free_request = omap_free_request,
+
+ .alloc_buffer = omap_alloc_buffer,
+ .free_buffer = omap_free_buffer,
+
+ .queue = omap_ep_queue,
+ .dequeue = omap_ep_dequeue,
+
+ .set_halt = omap_ep_set_halt,
+ // fifo_status ... report bytes in fifo
+ // fifo_flush ... flush fifo
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int omap_get_frame(struct usb_gadget *gadget)
+{
+ u16 sof = UDC_SOF_REG;
+ return (sof & UDC_TS_OK) ? (sof & UDC_TS) : -EL2NSYNC;
+}
+
+static int omap_wakeup(struct usb_gadget *gadget)
+{
+ struct omap_udc *udc;
+ unsigned long flags;
+ int retval = -EHOSTUNREACH;
+
+ udc = container_of(gadget, struct omap_udc, gadget);
+
+ spin_lock_irqsave(&udc->lock, flags);
+ if (udc->devstat & UDC_SUS) {
+ /* NOTE: OTG spec erratum says that OTG devices may
+ * issue wakeups without host enable.
+ */
+ if (udc->devstat & (UDC_B_HNP_ENABLE|UDC_R_WK_OK)) {
+ DBG("remote wakeup...\n");
+ UDC_SYSCON2_REG = UDC_RMT_WKP;
+ retval = 0;
+ }
+
+ /* NOTE: non-OTG systems may use SRP TOO... */
+ } else if (!(udc->devstat & UDC_ATT)) {
+ if (udc->transceiver)
+ retval = otg_start_srp(udc->transceiver);
+ }
+ spin_unlock_irqrestore(&udc->lock, flags);
+
+ return retval;
+}
+
+static int
+omap_set_selfpowered(struct usb_gadget *gadget, int is_selfpowered)
+{
+ struct omap_udc *udc;
+ unsigned long flags;
+ u16 syscon1;
+
+ udc = container_of(gadget, struct omap_udc, gadget);
+ spin_lock_irqsave(&udc->lock, flags);
+ syscon1 = UDC_SYSCON1_REG;
+ if (is_selfpowered)
+ syscon1 |= UDC_SELF_PWR;
+ else
+ syscon1 &= ~UDC_SELF_PWR;
+ UDC_SYSCON1_REG = syscon1;
+ spin_unlock_irqrestore(&udc->lock, flags);
+
+ return 0;
+}
+
+static int can_pullup(struct omap_udc *udc)
+{
+ return udc->driver && udc->softconnect && udc->vbus_active;
+}
+
+static void pullup_enable(struct omap_udc *udc)
+{
+ UDC_SYSCON1_REG |= UDC_PULLUP_EN;
+#ifndef CONFIG_USB_OTG
+ if (!cpu_is_omap15xx())
+ OTG_CTRL_REG |= OTG_BSESSVLD;
+#endif
+ UDC_IRQ_EN_REG = UDC_DS_CHG_IE;
+}
+
+static void pullup_disable(struct omap_udc *udc)
+{
+#ifndef CONFIG_USB_OTG
+ if (!cpu_is_omap15xx())
+ OTG_CTRL_REG &= ~OTG_BSESSVLD;
+#endif
+ UDC_IRQ_EN_REG = UDC_DS_CHG_IE;
+ UDC_SYSCON1_REG &= ~UDC_PULLUP_EN;
+}
+
+/*
+ * Called by whatever detects VBUS sessions: external transceiver
+ * driver, or maybe GPIO0 VBUS IRQ. May request 48 MHz clock.
+ */
+static int omap_vbus_session(struct usb_gadget *gadget, int is_active)
+{
+ struct omap_udc *udc;
+ unsigned long flags;
+
+ udc = container_of(gadget, struct omap_udc, gadget);
+ spin_lock_irqsave(&udc->lock, flags);
+ VDBG("VBUS %s\n", is_active ? "on" : "off");
+ udc->vbus_active = (is_active != 0);
+ if (cpu_is_omap15xx()) {
+ /* "software" detect, ignored if !VBUS_MODE_1510 */
+ if (is_active)
+ FUNC_MUX_CTRL_0_REG |= VBUS_CTRL_1510;
+ else
+ FUNC_MUX_CTRL_0_REG &= ~VBUS_CTRL_1510;
+ }
+ if (can_pullup(udc))
+ pullup_enable(udc);
+ else
+ pullup_disable(udc);
+ spin_unlock_irqrestore(&udc->lock, flags);
+ return 0;
+}
+
+static int omap_vbus_draw(struct usb_gadget *gadget, unsigned mA)
+{
+ struct omap_udc *udc;
+
+ udc = container_of(gadget, struct omap_udc, gadget);
+ if (udc->transceiver)
+ return otg_set_power(udc->transceiver, mA);
+ return -EOPNOTSUPP;
+}
+
+static int omap_pullup(struct usb_gadget *gadget, int is_on)
+{
+ struct omap_udc *udc;
+ unsigned long flags;
+
+ udc = container_of(gadget, struct omap_udc, gadget);
+ spin_lock_irqsave(&udc->lock, flags);
+ udc->softconnect = (is_on != 0);
+ if (can_pullup(udc))
+ pullup_enable(udc);
+ else
+ pullup_disable(udc);
+ spin_unlock_irqrestore(&udc->lock, flags);
+ return 0;
+}
+
+static struct usb_gadget_ops omap_gadget_ops = {
+ .get_frame = omap_get_frame,
+ .wakeup = omap_wakeup,
+ .set_selfpowered = omap_set_selfpowered,
+ .vbus_session = omap_vbus_session,
+ .vbus_draw = omap_vbus_draw,
+ .pullup = omap_pullup,
+};
+
+/*-------------------------------------------------------------------------*/
+
+/* dequeue ALL requests; caller holds udc->lock */
+static void nuke(struct omap_ep *ep, int status)
+{
+ struct omap_req *req;
+
+ ep->stopped = 1;
+
+ if (use_dma && ep->dma_channel)
+ dma_channel_release(ep);
+
+ use_ep(ep, 0);
+ UDC_CTRL_REG = UDC_CLR_EP;
+ if (ep->bEndpointAddress && ep->bmAttributes != USB_ENDPOINT_XFER_ISOC)
+ UDC_CTRL_REG = UDC_SET_HALT;
+
+ while (!list_empty(&ep->queue)) {
+ req = list_entry(ep->queue.next, struct omap_req, queue);
+ done(ep, req, status);
+ }
+}
+
+/* caller holds udc->lock */
+static void udc_quiesce(struct omap_udc *udc)
+{
+ struct omap_ep *ep;
+
+ udc->gadget.speed = USB_SPEED_UNKNOWN;
+ nuke(&udc->ep[0], -ESHUTDOWN);
+ list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list)
+ nuke(ep, -ESHUTDOWN);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void update_otg(struct omap_udc *udc)
+{
+ u16 devstat;
+
+ if (!udc->gadget.is_otg)
+ return;
+
+ if (OTG_CTRL_REG & OTG_ID)
+ devstat = UDC_DEVSTAT_REG;
+ else
+ devstat = 0;
+
+ udc->gadget.b_hnp_enable = !!(devstat & UDC_B_HNP_ENABLE);
+ udc->gadget.a_hnp_support = !!(devstat & UDC_A_HNP_SUPPORT);
+ udc->gadget.a_alt_hnp_support = !!(devstat & UDC_A_ALT_HNP_SUPPORT);
+
+ /* Enable HNP early, avoiding races on suspend irq path.
+ * ASSUMES OTG state machine B_BUS_REQ input is true.
+ */
+ if (udc->gadget.b_hnp_enable)
+ OTG_CTRL_REG = (OTG_CTRL_REG | OTG_B_HNPEN | OTG_B_BUSREQ)
+ & ~OTG_PULLUP;
+}
+
+static void ep0_irq(struct omap_udc *udc, u16 irq_src)
+{
+ struct omap_ep *ep0 = &udc->ep[0];
+ struct omap_req *req = 0;
+
+ ep0->irqs++;
+
+ /* Clear any pending requests and then scrub any rx/tx state
+ * before starting to handle the SETUP request.
+ */
+ if (irq_src & UDC_SETUP) {
+ u16 ack = irq_src & (UDC_EP0_TX|UDC_EP0_RX);
+
+ nuke(ep0, 0);
+ if (ack) {
+ UDC_IRQ_SRC_REG = ack;
+ irq_src = UDC_SETUP;
+ }
+ }
+
+ /* IN/OUT packets mean we're in the DATA or STATUS stage.
+ * This driver uses only uses protocol stalls (ep0 never halts),
+ * and if we got this far the gadget driver already had a
+ * chance to stall. Tries to be forgiving of host oddities.
+ *
+ * NOTE: the last chance gadget drivers have to stall control
+ * requests is during their request completion callback.
+ */
+ if (!list_empty(&ep0->queue))
+ req = container_of(ep0->queue.next, struct omap_req, queue);
+
+ /* IN == TX to host */
+ if (irq_src & UDC_EP0_TX) {
+ int stat;
+
+ UDC_IRQ_SRC_REG = UDC_EP0_TX;
+ UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR;
+ stat = UDC_STAT_FLG_REG;
+ if (stat & UDC_ACK) {
+ if (udc->ep0_in) {
+ /* write next IN packet from response,
+ * or set up the status stage.
+ */
+ if (req)
+ stat = write_fifo(ep0, req);
+ UDC_EP_NUM_REG = UDC_EP_DIR;
+ if (!req && udc->ep0_pending) {
+ UDC_EP_NUM_REG = UDC_EP_SEL;
+ UDC_CTRL_REG = UDC_CLR_EP;
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ UDC_EP_NUM_REG = 0;
+ udc->ep0_pending = 0;
+ } /* else: 6 wait states before it'll tx */
+ } else {
+ /* ack status stage of OUT transfer */
+ UDC_EP_NUM_REG = UDC_EP_DIR;
+ if (req)
+ done(ep0, req, 0);
+ }
+ req = 0;
+ } else if (stat & UDC_STALL) {
+ UDC_CTRL_REG = UDC_CLR_HALT;
+ UDC_EP_NUM_REG = UDC_EP_DIR;
+ } else {
+ UDC_EP_NUM_REG = UDC_EP_DIR;
+ }
+ }
+
+ /* OUT == RX from host */
+ if (irq_src & UDC_EP0_RX) {
+ int stat;
+
+ UDC_IRQ_SRC_REG = UDC_EP0_RX;
+ UDC_EP_NUM_REG = UDC_EP_SEL;
+ stat = UDC_STAT_FLG_REG;
+ if (stat & UDC_ACK) {
+ if (!udc->ep0_in) {
+ stat = 0;
+ /* read next OUT packet of request, maybe
+ * reactiviting the fifo; stall on errors.
+ */
+ if (!req || (stat = read_fifo(ep0, req)) < 0) {
+ UDC_SYSCON2_REG = UDC_STALL_CMD;
+ udc->ep0_pending = 0;
+ stat = 0;
+ } else if (stat == 0)
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ UDC_EP_NUM_REG = 0;
+
+ /* activate status stage */
+ if (stat == 1) {
+ done(ep0, req, 0);
+ /* that may have STALLed ep0... */
+ UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR;
+ UDC_CTRL_REG = UDC_CLR_EP;
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ UDC_EP_NUM_REG = UDC_EP_DIR;
+ udc->ep0_pending = 0;
+ }
+ } else {
+ /* ack status stage of IN transfer */
+ UDC_EP_NUM_REG = 0;
+ if (req)
+ done(ep0, req, 0);
+ }
+ } else if (stat & UDC_STALL) {
+ UDC_CTRL_REG = UDC_CLR_HALT;
+ UDC_EP_NUM_REG = 0;
+ } else {
+ UDC_EP_NUM_REG = 0;
+ }
+ }
+
+ /* SETUP starts all control transfers */
+ if (irq_src & UDC_SETUP) {
+ union u {
+ u16 word[4];
+ struct usb_ctrlrequest r;
+ } u;
+ int status = -EINVAL;
+ struct omap_ep *ep;
+
+ /* read the (latest) SETUP message */
+ do {
+ UDC_EP_NUM_REG = UDC_SETUP_SEL;
+ /* two bytes at a time */
+ u.word[0] = UDC_DATA_REG;
+ u.word[1] = UDC_DATA_REG;
+ u.word[2] = UDC_DATA_REG;
+ u.word[3] = UDC_DATA_REG;
+ UDC_EP_NUM_REG = 0;
+ } while (UDC_IRQ_SRC_REG & UDC_SETUP);
+ le16_to_cpus (&u.r.wValue);
+ le16_to_cpus (&u.r.wIndex);
+ le16_to_cpus (&u.r.wLength);
+
+ /* Delegate almost all control requests to the gadget driver,
+ * except for a handful of ch9 status/feature requests that
+ * hardware doesn't autodecode _and_ the gadget API hides.
+ */
+ udc->ep0_in = (u.r.bRequestType & USB_DIR_IN) != 0;
+ udc->ep0_set_config = 0;
+ udc->ep0_pending = 1;
+ ep0->stopped = 0;
+ ep0->ackwait = 0;
+ switch (u.r.bRequest) {
+ case USB_REQ_SET_CONFIGURATION:
+ /* udc needs to know when ep != 0 is valid */
+ if (u.r.bRequestType != USB_RECIP_DEVICE)
+ goto delegate;
+ if (u.r.wLength != 0)
+ goto do_stall;
+ udc->ep0_set_config = 1;
+ udc->ep0_reset_config = (u.r.wValue == 0);
+ VDBG("set config %d\n", u.r.wValue);
+
+ /* update udc NOW since gadget driver may start
+ * queueing requests immediately; clear config
+ * later if it fails the request.
+ */
+ if (udc->ep0_reset_config)
+ UDC_SYSCON2_REG = UDC_CLR_CFG;
+ else
+ UDC_SYSCON2_REG = UDC_DEV_CFG;
+ update_otg(udc);
+ goto delegate;
+ case USB_REQ_CLEAR_FEATURE:
+ /* clear endpoint halt */
+ if (u.r.bRequestType != USB_RECIP_ENDPOINT)
+ goto delegate;
+ if (u.r.wValue != USB_ENDPOINT_HALT
+ || u.r.wLength != 0)
+ goto do_stall;
+ ep = &udc->ep[u.r.wIndex & 0xf];
+ if (ep != ep0) {
+ if (u.r.wIndex & USB_DIR_IN)
+ ep += 16;
+ if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC
+ || !ep->desc)
+ goto do_stall;
+ use_ep(ep, 0);
+ UDC_CTRL_REG = UDC_RESET_EP;
+ ep->ackwait = 0;
+ if (!(ep->bEndpointAddress & USB_DIR_IN)) {
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ ep->ackwait = 1 + ep->double_buf;
+ }
+ }
+ VDBG("%s halt cleared by host\n", ep->name);
+ goto ep0out_status_stage;
+ case USB_REQ_SET_FEATURE:
+ /* set endpoint halt */
+ if (u.r.bRequestType != USB_RECIP_ENDPOINT)
+ goto delegate;
+ if (u.r.wValue != USB_ENDPOINT_HALT
+ || u.r.wLength != 0)
+ goto do_stall;
+ ep = &udc->ep[u.r.wIndex & 0xf];
+ if (u.r.wIndex & USB_DIR_IN)
+ ep += 16;
+ if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC
+ || ep == ep0 || !ep->desc)
+ goto do_stall;
+ if (use_dma && ep->has_dma) {
+ /* this has rude side-effects (aborts) and
+ * can't really work if DMA-IN is active
+ */
+ DBG("%s host set_halt, NYET \n", ep->name);
+ goto do_stall;
+ }
+ use_ep(ep, 0);
+ /* can't halt if fifo isn't empty... */
+ UDC_CTRL_REG = UDC_CLR_EP;
+ UDC_CTRL_REG = UDC_SET_HALT;
+ VDBG("%s halted by host\n", ep->name);
+ep0out_status_stage:
+ status = 0;
+ UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR;
+ UDC_CTRL_REG = UDC_CLR_EP;
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ UDC_EP_NUM_REG = UDC_EP_DIR;
+ udc->ep0_pending = 0;
+ break;
+ case USB_REQ_GET_STATUS:
+ /* return interface status. if we were pedantic,
+ * we'd detect non-existent interfaces, and stall.
+ */
+ if (u.r.bRequestType
+ != (USB_DIR_IN|USB_RECIP_INTERFACE))
+ goto delegate;
+ /* return two zero bytes */
+ UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR;
+ UDC_DATA_REG = 0;
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ UDC_EP_NUM_REG = UDC_EP_DIR;
+ status = 0;
+ VDBG("GET_STATUS, interface %d\n", u.r.wIndex);
+ /* next, status stage */
+ break;
+ default:
+delegate:
+ /* activate the ep0out fifo right away */
+ if (!udc->ep0_in && u.r.wLength) {
+ UDC_EP_NUM_REG = 0;
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ }
+
+ /* gadget drivers see class/vendor specific requests,
+ * {SET,GET}_{INTERFACE,DESCRIPTOR,CONFIGURATION},
+ * and more
+ */
+ VDBG("SETUP %02x.%02x v%04x i%04x l%04x\n",
+ u.r.bRequestType, u.r.bRequest,
+ u.r.wValue, u.r.wIndex, u.r.wLength);
+
+ /* The gadget driver may return an error here,
+ * causing an immediate protocol stall.
+ *
+ * Else it must issue a response, either queueing a
+ * response buffer for the DATA stage, or halting ep0
+ * (causing a protocol stall, not a real halt). A
+ * zero length buffer means no DATA stage.
+ *
+ * It's fine to issue that response after the setup()
+ * call returns, and this IRQ was handled.
+ */
+ udc->ep0_setup = 1;
+ spin_unlock(&udc->lock);
+ status = udc->driver->setup (&udc->gadget, &u.r);
+ spin_lock(&udc->lock);
+ udc->ep0_setup = 0;
+ }
+
+ if (status < 0) {
+do_stall:
+ VDBG("req %02x.%02x protocol STALL; stat %d\n",
+ u.r.bRequestType, u.r.bRequest, status);
+ if (udc->ep0_set_config) {
+ if (udc->ep0_reset_config)
+ WARN("error resetting config?\n");
+ else
+ UDC_SYSCON2_REG = UDC_CLR_CFG;
+ }
+ UDC_SYSCON2_REG = UDC_STALL_CMD;
+ udc->ep0_pending = 0;
+ }
+ }
+}
+
+/*-------------------------------------------------------------------------*/
+
+#define OTG_FLAGS (UDC_B_HNP_ENABLE|UDC_A_HNP_SUPPORT|UDC_A_ALT_HNP_SUPPORT)
+
+static void devstate_irq(struct omap_udc *udc, u16 irq_src)
+{
+ u16 devstat, change;
+
+ devstat = UDC_DEVSTAT_REG;
+ change = devstat ^ udc->devstat;
+ udc->devstat = devstat;
+
+ if (change & (UDC_USB_RESET|UDC_ATT)) {
+ udc_quiesce(udc);
+
+ if (change & UDC_ATT) {
+ /* driver for any external transceiver will
+ * have called omap_vbus_session() already
+ */
+ if (devstat & UDC_ATT) {
+ udc->gadget.speed = USB_SPEED_FULL;
+ VDBG("connect\n");
+ if (!udc->transceiver)
+ pullup_enable(udc);
+ // if (driver->connect) call it
+ } else if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
+ udc->gadget.speed = USB_SPEED_UNKNOWN;
+ if (!udc->transceiver)
+ pullup_disable(udc);
+ DBG("disconnect, gadget %s\n",
+ udc->driver->driver.name);
+ if (udc->driver->disconnect) {
+ spin_unlock(&udc->lock);
+ udc->driver->disconnect(&udc->gadget);
+ spin_lock(&udc->lock);
+ }
+ }
+ change &= ~UDC_ATT;
+ }
+
+ if (change & UDC_USB_RESET) {
+ if (devstat & UDC_USB_RESET) {
+ VDBG("RESET=1\n");
+ } else {
+ udc->gadget.speed = USB_SPEED_FULL;
+ INFO("USB reset done, gadget %s\n",
+ udc->driver->driver.name);
+ /* ep0 traffic is legal from now on */
+ UDC_IRQ_EN_REG = UDC_DS_CHG_IE | UDC_EP0_IE;
+ }
+ change &= ~UDC_USB_RESET;
+ }
+ }
+ if (change & UDC_SUS) {
+ if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
+ // FIXME tell isp1301 to suspend/resume (?)
+ if (devstat & UDC_SUS) {
+ VDBG("suspend\n");
+ update_otg(udc);
+ /* HNP could be under way already */
+ if (udc->gadget.speed == USB_SPEED_FULL
+ && udc->driver->suspend) {
+ spin_unlock(&udc->lock);
+ udc->driver->suspend(&udc->gadget);
+ spin_lock(&udc->lock);
+ }
+ } else {
+ VDBG("resume\n");
+ if (udc->gadget.speed == USB_SPEED_FULL
+ && udc->driver->resume) {
+ spin_unlock(&udc->lock);
+ udc->driver->resume(&udc->gadget);
+ spin_lock(&udc->lock);
+ }
+ }
+ }
+ change &= ~UDC_SUS;
+ }
+ if (!cpu_is_omap15xx() && (change & OTG_FLAGS)) {
+ update_otg(udc);
+ change &= ~OTG_FLAGS;
+ }
+
+ change &= ~(UDC_CFG|UDC_DEF|UDC_ADD);
+ if (change)
+ VDBG("devstat %03x, ignore change %03x\n",
+ devstat, change);
+
+ UDC_IRQ_SRC_REG = UDC_DS_CHG;
+}
+
+static irqreturn_t
+omap_udc_irq(int irq, void *_udc, struct pt_regs *r)
+{
+ struct omap_udc *udc = _udc;
+ u16 irq_src;
+ irqreturn_t status = IRQ_NONE;
+ unsigned long flags;
+
+ spin_lock_irqsave(&udc->lock, flags);
+ irq_src = UDC_IRQ_SRC_REG;
+
+ /* Device state change (usb ch9 stuff) */
+ if (irq_src & UDC_DS_CHG) {
+ devstate_irq(_udc, irq_src);
+ status = IRQ_HANDLED;
+ irq_src &= ~UDC_DS_CHG;
+ }
+
+ /* EP0 control transfers */
+ if (irq_src & (UDC_EP0_RX|UDC_SETUP|UDC_EP0_TX)) {
+ ep0_irq(_udc, irq_src);
+ status = IRQ_HANDLED;
+ irq_src &= ~(UDC_EP0_RX|UDC_SETUP|UDC_EP0_TX);
+ }
+
+ /* DMA transfer completion */
+ if (use_dma && (irq_src & (UDC_TXN_DONE|UDC_RXN_CNT|UDC_RXN_EOT))) {
+ dma_irq(_udc, irq_src);
+ status = IRQ_HANDLED;
+ irq_src &= ~(UDC_TXN_DONE|UDC_RXN_CNT|UDC_RXN_EOT);
+ }
+
+ irq_src &= ~(UDC_SOF|UDC_EPN_TX|UDC_EPN_RX);
+ if (irq_src)
+ DBG("udc_irq, unhandled %03x\n", irq_src);
+ spin_unlock_irqrestore(&udc->lock, flags);
+
+ return status;
+}
+
+/* workaround for seemingly-lost IRQs for RX ACKs... */
+#define PIO_OUT_TIMEOUT (jiffies + HZ/3)
+#define HALF_FULL(f) (!((f)&(UDC_NON_ISO_FIFO_FULL|UDC_NON_ISO_FIFO_EMPTY)))
+
+static void pio_out_timer(unsigned long _ep)
+{
+ struct omap_ep *ep = (void *) _ep;
+ unsigned long flags;
+ u16 stat_flg;
+
+ spin_lock_irqsave(&ep->udc->lock, flags);
+ if (!list_empty(&ep->queue) && ep->ackwait) {
+ use_ep(ep, 0);
+ stat_flg = UDC_STAT_FLG_REG;
+
+ if ((stat_flg & UDC_ACK) && (!(stat_flg & UDC_FIFO_EN)
+ || (ep->double_buf && HALF_FULL(stat_flg)))) {
+ struct omap_req *req;
+
+ VDBG("%s: lose, %04x\n", ep->ep.name, stat_flg);
+ req = container_of(ep->queue.next,
+ struct omap_req, queue);
+ UDC_EP_NUM_REG = ep->bEndpointAddress | UDC_EP_SEL;
+ (void) read_fifo(ep, req);
+ UDC_EP_NUM_REG = ep->bEndpointAddress;
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ ep->ackwait = 1 + ep->double_buf;
+ }
+ }
+ mod_timer(&ep->timer, PIO_OUT_TIMEOUT);
+ spin_unlock_irqrestore(&ep->udc->lock, flags);
+}
+
+static irqreturn_t
+omap_udc_pio_irq(int irq, void *_dev, struct pt_regs *r)
+{
+ u16 epn_stat, irq_src;
+ irqreturn_t status = IRQ_NONE;
+ struct omap_ep *ep;
+ int epnum;
+ struct omap_udc *udc = _dev;
+ struct omap_req *req;
+ unsigned long flags;
+
+ spin_lock_irqsave(&udc->lock, flags);
+ epn_stat = UDC_EPN_STAT_REG;
+ irq_src = UDC_IRQ_SRC_REG;
+
+ /* handle OUT first, to avoid some wasteful NAKs */
+ if (irq_src & UDC_EPN_RX) {
+ epnum = (epn_stat >> 8) & 0x0f;
+ UDC_IRQ_SRC_REG = UDC_EPN_RX;
+ status = IRQ_HANDLED;
+ ep = &udc->ep[epnum];
+ ep->irqs++;
+
+ UDC_EP_NUM_REG = epnum | UDC_EP_SEL;
+ ep->fnf = 0;
+ if ((UDC_STAT_FLG_REG & UDC_ACK)) {
+ ep->ackwait--;
+ if (!list_empty(&ep->queue)) {
+ int stat;
+ req = container_of(ep->queue.next,
+ struct omap_req, queue);
+ stat = read_fifo(ep, req);
+ if (!ep->double_buf)
+ ep->fnf = 1;
+ }
+ }
+ /* min 6 clock delay before clearing EP_SEL ... */
+ epn_stat = UDC_EPN_STAT_REG;
+ epn_stat = UDC_EPN_STAT_REG;
+ UDC_EP_NUM_REG = epnum;
+
+ /* enabling fifo _after_ clearing ACK, contrary to docs,
+ * reduces lossage; timer still needed though (sigh).
+ */
+ if (ep->fnf) {
+ UDC_CTRL_REG = UDC_SET_FIFO_EN;
+ ep->ackwait = 1 + ep->double_buf;
+ }
+ mod_timer(&ep->timer, PIO_OUT_TIMEOUT);
+ }
+
+ /* then IN transfers */
+ else if (irq_src & UDC_EPN_TX) {
+ epnum = epn_stat & 0x0f;
+ UDC_IRQ_SRC_REG = UDC_EPN_TX;
+ status = IRQ_HANDLED;
+ ep = &udc->ep[16 + epnum];
+ ep->irqs++;
+
+ UDC_EP_NUM_REG = epnum | UDC_EP_DIR | UDC_EP_SEL;
+ if ((UDC_STAT_FLG_REG & UDC_ACK)) {
+ ep->ackwait = 0;
+ if (!list_empty(&ep->queue)) {
+ req = container_of(ep->queue.next,
+ struct omap_req, queue);
+ (void) write_fifo(ep, req);
+ }
+ }
+ /* min 6 clock delay before clearing EP_SEL ... */
+ epn_stat = UDC_EPN_STAT_REG;
+ epn_stat = UDC_EPN_STAT_REG;
+ UDC_EP_NUM_REG = epnum | UDC_EP_DIR;
+ /* then 6 clocks before it'd tx */
+ }
+
+ spin_unlock_irqrestore(&udc->lock, flags);
+ return status;
+}
+
+#ifdef USE_ISO
+static irqreturn_t
+omap_udc_iso_irq(int irq, void *_dev, struct pt_regs *r)
+{
+ struct omap_udc *udc = _dev;
+ struct omap_ep *ep;
+ int pending = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave(&udc->lock, flags);
+
+ /* handle all non-DMA ISO transfers */
+ list_for_each_entry (ep, &udc->iso, iso) {
+ u16 stat;
+ struct omap_req *req;
+
+ if (ep->has_dma || list_empty(&ep->queue))
+ continue;
+ req = list_entry(ep->queue.next, struct omap_req, queue);
+
+ use_ep(ep, UDC_EP_SEL);
+ stat = UDC_STAT_FLG_REG;
+
+ /* NOTE: like the other controller drivers, this isn't
+ * currently reporting lost or damaged frames.
+ */
+ if (ep->bEndpointAddress & USB_DIR_IN) {
+ if (stat & UDC_MISS_IN)
+ /* done(ep, req, -EPROTO) */;
+ else
+ write_fifo(ep, req);
+ } else {
+ int status = 0;
+
+ if (stat & UDC_NO_RXPACKET)
+ status = -EREMOTEIO;
+ else if (stat & UDC_ISO_ERR)
+ status = -EILSEQ;
+ else if (stat & UDC_DATA_FLUSH)
+ status = -ENOSR;
+
+ if (status)
+ /* done(ep, req, status) */;
+ else
+ read_fifo(ep, req);
+ }
+ deselect_ep();
+ /* 6 wait states before next EP */
+
+ ep->irqs++;
+ if (!list_empty(&ep->queue))
+ pending = 1;
+ }
+ if (!pending)
+ UDC_IRQ_EN_REG &= ~UDC_SOF_IE;
+ UDC_IRQ_SRC_REG = UDC_SOF;
+
+ spin_unlock_irqrestore(&udc->lock, flags);
+ return IRQ_HANDLED;
+}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static struct omap_udc *udc;
+
+int usb_gadget_register_driver (struct usb_gadget_driver *driver)
+{
+ int status = -ENODEV;
+ struct omap_ep *ep;
+ unsigned long flags;
+
+ /* basic sanity tests */
+ if (!udc)
+ return -ENODEV;
+ if (!driver
+ // FIXME if otg, check: driver->is_otg
+ || driver->speed < USB_SPEED_FULL
+ || !driver->bind
+ || !driver->unbind
+ || !driver->setup)
+ return -EINVAL;
+
+ spin_lock_irqsave(&udc->lock, flags);
+ if (udc->driver) {
+ spin_unlock_irqrestore(&udc->lock, flags);
+ return -EBUSY;
+ }
+
+ /* reset state */
+ list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list) {
+ ep->irqs = 0;
+ if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC)
+ continue;
+ use_ep(ep, 0);
+ UDC_CTRL_REG = UDC_SET_HALT;
+ }
+ udc->ep0_pending = 0;
+ udc->ep[0].irqs = 0;
+ udc->softconnect = 1;
+
+ /* hook up the driver */
+ driver->driver.bus = 0;
+ udc->driver = driver;
+ udc->gadget.dev.driver = &driver->driver;
+ spin_unlock_irqrestore(&udc->lock, flags);
+
+ status = driver->bind (&udc->gadget);
+ if (status) {
+ DBG("bind to %s --> %d\n", driver->driver.name, status);
+ udc->gadget.dev.driver = 0;
+ udc->driver = 0;
+ goto done;
+ }
+ DBG("bound to driver %s\n", driver->driver.name);
+
+ UDC_IRQ_SRC_REG = UDC_IRQ_SRC_MASK;
+
+ /* connect to bus through transceiver */
+ if (udc->transceiver) {
+ status = otg_set_peripheral(udc->transceiver, &udc->gadget);
+ if (status < 0) {
+ ERR("can't bind to transceiver\n");
+ driver->unbind (&udc->gadget);
+ udc->gadget.dev.driver = 0;
+ udc->driver = 0;
+ goto done;
+ }
+ } else {
+ if (can_pullup(udc))
+ pullup_enable (udc);
+ else
+ pullup_disable (udc);
+ }
+
+ /* boards that don't have VBUS sensing can't autogate 48MHz;
+ * can't enter deep sleep while a gadget driver is active.
+ */
+ if (machine_is_omap_innovator() || machine_is_omap_osk())
+ omap_vbus_session(&udc->gadget, 1);
+
+done:
+ return status;
+}
+EXPORT_SYMBOL(usb_gadget_register_driver);
+
+int usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
+{
+ unsigned long flags;
+ int status = -ENODEV;
+
+ if (!udc)
+ return -ENODEV;
+ if (!driver || driver != udc->driver)
+ return -EINVAL;
+
+ if (machine_is_omap_innovator() || machine_is_omap_osk())
+ omap_vbus_session(&udc->gadget, 0);
+
+ if (udc->transceiver)
+ (void) otg_set_peripheral(udc->transceiver, 0);
+ else
+ pullup_disable(udc);
+
+ spin_lock_irqsave(&udc->lock, flags);
+ udc_quiesce(udc);
+ spin_unlock_irqrestore(&udc->lock, flags);
+
+ driver->unbind(&udc->gadget);
+ udc->gadget.dev.driver = 0;
+ udc->driver = 0;
+
+
+ DBG("unregistered driver '%s'\n", driver->driver.name);
+ return status;
+}
+EXPORT_SYMBOL(usb_gadget_unregister_driver);
+
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+
+#include <linux/seq_file.h>
+
+static const char proc_filename[] = "driver/udc";
+
+#define FOURBITS "%s%s%s%s"
+#define EIGHTBITS FOURBITS FOURBITS
+
+static void proc_ep_show(struct seq_file *s, struct omap_ep *ep)
+{
+ u16 stat_flg;
+ struct omap_req *req;
+ char buf[20];
+
+ use_ep(ep, 0);
+
+ if (use_dma && ep->has_dma)
+ snprintf(buf, sizeof buf, "(%cxdma%d lch%d) ",
+ (ep->bEndpointAddress & USB_DIR_IN) ? 't' : 'r',
+ ep->dma_channel - 1, ep->lch);
+ else
+ buf[0] = 0;
+
+ stat_flg = UDC_STAT_FLG_REG;
+ seq_printf(s,
+ "\n%s %s%s%sirqs %ld stat %04x " EIGHTBITS FOURBITS "%s\n",
+ ep->name, buf,
+ ep->double_buf ? "dbuf " : "",
+ ({char *s; switch(ep->ackwait){
+ case 0: s = ""; break;
+ case 1: s = "(ackw) "; break;
+ case 2: s = "(ackw2) "; break;
+ default: s = "(?) "; break;
+ } s;}),
+ ep->irqs, stat_flg,
+ (stat_flg & UDC_NO_RXPACKET) ? "no_rxpacket " : "",
+ (stat_flg & UDC_MISS_IN) ? "miss_in " : "",
+ (stat_flg & UDC_DATA_FLUSH) ? "data_flush " : "",
+ (stat_flg & UDC_ISO_ERR) ? "iso_err " : "",
+ (stat_flg & UDC_ISO_FIFO_EMPTY) ? "iso_fifo_empty " : "",
+ (stat_flg & UDC_ISO_FIFO_FULL) ? "iso_fifo_full " : "",
+ (stat_flg & UDC_EP_HALTED) ? "HALT " : "",
+ (stat_flg & UDC_STALL) ? "STALL " : "",
+ (stat_flg & UDC_NAK) ? "NAK " : "",
+ (stat_flg & UDC_ACK) ? "ACK " : "",
+ (stat_flg & UDC_FIFO_EN) ? "fifo_en " : "",
+ (stat_flg & UDC_NON_ISO_FIFO_EMPTY) ? "fifo_empty " : "",
+ (stat_flg & UDC_NON_ISO_FIFO_FULL) ? "fifo_full " : "");
+
+ if (list_empty (&ep->queue))
+ seq_printf(s, "\t(queue empty)\n");
+ else
+ list_for_each_entry (req, &ep->queue, queue) {
+ unsigned length = req->req.actual;
+
+ if (use_dma && buf[0]) {
+ length += ((ep->bEndpointAddress & USB_DIR_IN)
+ ? dma_src_len : dma_dest_len)
+ (ep, req->req.dma + length);
+ buf[0] = 0;
+ }
+ seq_printf(s, "\treq %p len %d/%d buf %p\n",
+ &req->req, length,
+ req->req.length, req->req.buf);
+ }
+}
+
+static char *trx_mode(unsigned m, int enabled)
+{
+ switch (m) {
+ case 0: return enabled ? "*6wire" : "unused";
+ case 1: return "4wire";
+ case 2: return "3wire";
+ case 3: return "6wire";
+ default: return "unknown";
+ }
+}
+
+static int proc_otg_show(struct seq_file *s)
+{
+ u32 tmp;
+ u32 trans;
+
+ tmp = OTG_REV_REG;
+ trans = USB_TRANSCEIVER_CTRL_REG;
+ seq_printf(s, "OTG rev %d.%d, transceiver_ctrl %03x\n",
+ tmp >> 4, tmp & 0xf, trans);
+ tmp = OTG_SYSCON_1_REG;
+ seq_printf(s, "otg_syscon1 %08x usb2 %s, usb1 %s, usb0 %s,"
+ FOURBITS "\n", tmp,
+ trx_mode(USB2_TRX_MODE(tmp), trans & CONF_USB2_UNI_R),
+ trx_mode(USB1_TRX_MODE(tmp), trans & CONF_USB1_UNI_R),
+ (USB0_TRX_MODE(tmp) == 0)
+ ? "internal"
+ : trx_mode(USB0_TRX_MODE(tmp), 1),
+ (tmp & OTG_IDLE_EN) ? " !otg" : "",
+ (tmp & HST_IDLE_EN) ? " !host" : "",
+ (tmp & DEV_IDLE_EN) ? " !dev" : "",
+ (tmp & OTG_RESET_DONE) ? " reset_done" : " reset_active");
+ tmp = OTG_SYSCON_2_REG;
+ seq_printf(s, "otg_syscon2 %08x%s" EIGHTBITS
+ " b_ase_brst=%d hmc=%d\n", tmp,
+ (tmp & OTG_EN) ? " otg_en" : "",
+ (tmp & USBX_SYNCHRO) ? " synchro" : "",
+ // much more SRP stuff
+ (tmp & SRP_DATA) ? " srp_data" : "",
+ (tmp & SRP_VBUS) ? " srp_vbus" : "",
+ (tmp & OTG_PADEN) ? " otg_paden" : "",
+ (tmp & HMC_PADEN) ? " hmc_paden" : "",
+ (tmp & UHOST_EN) ? " uhost_en" : "",
+ (tmp & HMC_TLLSPEED) ? " tllspeed" : "",
+ (tmp & HMC_TLLATTACH) ? " tllattach" : "",
+ B_ASE_BRST(tmp),
+ OTG_HMC(tmp));
+ tmp = OTG_CTRL_REG;
+ seq_printf(s, "otg_ctrl %06x" EIGHTBITS EIGHTBITS "%s\n", tmp,
+ (tmp & OTG_ASESSVLD) ? " asess" : "",
+ (tmp & OTG_BSESSEND) ? " bsess_end" : "",
+ (tmp & OTG_BSESSVLD) ? " bsess" : "",
+ (tmp & OTG_VBUSVLD) ? " vbus" : "",
+ (tmp & OTG_ID) ? " id" : "",
+ (tmp & OTG_DRIVER_SEL) ? " DEVICE" : " HOST",
+ (tmp & OTG_A_SETB_HNPEN) ? " a_setb_hnpen" : "",
+ (tmp & OTG_A_BUSREQ) ? " a_bus" : "",
+ (tmp & OTG_B_HNPEN) ? " b_hnpen" : "",
+ (tmp & OTG_B_BUSREQ) ? " b_bus" : "",
+ (tmp & OTG_BUSDROP) ? " busdrop" : "",
+ (tmp & OTG_PULLDOWN) ? " down" : "",
+ (tmp & OTG_PULLUP) ? " up" : "",
+ (tmp & OTG_DRV_VBUS) ? " drv" : "",
+ (tmp & OTG_PD_VBUS) ? " pd_vb" : "",
+ (tmp & OTG_PU_VBUS) ? " pu_vb" : "",
+ (tmp & OTG_PU_ID) ? " pu_id" : ""
+ );
+ tmp = OTG_IRQ_EN_REG;
+ seq_printf(s, "otg_irq_en %04x" "\n", tmp);
+ tmp = OTG_IRQ_SRC_REG;
+ seq_printf(s, "otg_irq_src %04x" "\n", tmp);
+ tmp = OTG_OUTCTRL_REG;
+ seq_printf(s, "otg_outctrl %04x" "\n", tmp);
+ tmp = OTG_TEST_REG;
+ seq_printf(s, "otg_test %04x" "\n", tmp);
+}
+
+static int proc_udc_show(struct seq_file *s, void *_)
+{
+ u32 tmp;
+ struct omap_ep *ep;
+ unsigned long flags;
+
+ spin_lock_irqsave(&udc->lock, flags);
+
+ seq_printf(s, "%s, version: " DRIVER_VERSION
+#ifdef USE_ISO
+ " (iso)"
+#endif
+ "%s\n",
+ driver_desc,
+ use_dma ? " (dma)" : "");
+
+ tmp = UDC_REV_REG & 0xff;
+ seq_printf(s,
+ "UDC rev %d.%d, fifo mode %d, gadget %s\n"
+ "hmc %d, transceiver %s\n",
+ tmp >> 4, tmp & 0xf,
+ fifo_mode,
+ udc->driver ? udc->driver->driver.name : "(none)",
+ HMC,
+ udc->transceiver ? udc->transceiver->label : "(none)");
+ seq_printf(s, "ULPD control %04x req %04x status %04x\n",
+ __REG16(ULPD_CLOCK_CTRL),
+ __REG16(ULPD_SOFT_REQ),
+ __REG16(ULPD_STATUS_REQ));
+
+ /* OTG controller registers */
+ if (!cpu_is_omap15xx())
+ proc_otg_show(s);
+
+ tmp = UDC_SYSCON1_REG;
+ seq_printf(s, "\nsyscon1 %04x" EIGHTBITS "\n", tmp,
+ (tmp & UDC_CFG_LOCK) ? " cfg_lock" : "",
+ (tmp & UDC_DATA_ENDIAN) ? " data_endian" : "",
+ (tmp & UDC_DMA_ENDIAN) ? " dma_endian" : "",
+ (tmp & UDC_NAK_EN) ? " nak" : "",
+ (tmp & UDC_AUTODECODE_DIS) ? " autodecode_dis" : "",
+ (tmp & UDC_SELF_PWR) ? " self_pwr" : "",
+ (tmp & UDC_SOFF_DIS) ? " soff_dis" : "",
+ (tmp & UDC_PULLUP_EN) ? " PULLUP" : "");
+ // syscon2 is write-only
+
+ /* UDC controller registers */
+ if (!(tmp & UDC_PULLUP_EN)) {
+ seq_printf(s, "(suspended)\n");
+ spin_unlock_irqrestore(&udc->lock, flags);
+ return 0;
+ }
+
+ tmp = UDC_DEVSTAT_REG;
+ seq_printf(s, "devstat %04x" EIGHTBITS "%s%s\n", tmp,
+ (tmp & UDC_B_HNP_ENABLE) ? " b_hnp" : "",
+ (tmp & UDC_A_HNP_SUPPORT) ? " a_hnp" : "",
+ (tmp & UDC_A_ALT_HNP_SUPPORT) ? " a_alt_hnp" : "",
+ (tmp & UDC_R_WK_OK) ? " r_wk_ok" : "",
+ (tmp & UDC_USB_RESET) ? " usb_reset" : "",
+ (tmp & UDC_SUS) ? " SUS" : "",
+ (tmp & UDC_CFG) ? " CFG" : "",
+ (tmp & UDC_ADD) ? " ADD" : "",
+ (tmp & UDC_DEF) ? " DEF" : "",
+ (tmp & UDC_ATT) ? " ATT" : "");
+ seq_printf(s, "sof %04x\n", UDC_SOF_REG);
+ tmp = UDC_IRQ_EN_REG;
+ seq_printf(s, "irq_en %04x" FOURBITS "%s\n", tmp,
+ (tmp & UDC_SOF_IE) ? " sof" : "",
+ (tmp & UDC_EPN_RX_IE) ? " epn_rx" : "",
+ (tmp & UDC_EPN_TX_IE) ? " epn_tx" : "",
+ (tmp & UDC_DS_CHG_IE) ? " ds_chg" : "",
+ (tmp & UDC_EP0_IE) ? " ep0" : "");
+ tmp = UDC_IRQ_SRC_REG;
+ seq_printf(s, "irq_src %04x" EIGHTBITS "%s%s\n", tmp,
+ (tmp & UDC_TXN_DONE) ? " txn_done" : "",
+ (tmp & UDC_RXN_CNT) ? " rxn_cnt" : "",
+ (tmp & UDC_RXN_EOT) ? " rxn_eot" : "",
+ (tmp & UDC_SOF) ? " sof" : "",
+ (tmp & UDC_EPN_RX) ? " epn_rx" : "",
+ (tmp & UDC_EPN_TX) ? " epn_tx" : "",
+ (tmp & UDC_DS_CHG) ? " ds_chg" : "",
+ (tmp & UDC_SETUP) ? " setup" : "",
+ (tmp & UDC_EP0_RX) ? " ep0out" : "",
+ (tmp & UDC_EP0_TX) ? " ep0in" : "");
+ if (use_dma) {
+ unsigned i;
+
+ tmp = UDC_DMA_IRQ_EN_REG;
+ seq_printf(s, "dma_irq_en %04x%s" EIGHTBITS "\n", tmp,
+ (tmp & UDC_TX_DONE_IE(3)) ? " tx2_done" : "",
+ (tmp & UDC_RX_CNT_IE(3)) ? " rx2_cnt" : "",
+ (tmp & UDC_RX_EOT_IE(3)) ? " rx2_eot" : "",
+
+ (tmp & UDC_TX_DONE_IE(2)) ? " tx1_done" : "",
+ (tmp & UDC_RX_CNT_IE(2)) ? " rx1_cnt" : "",
+ (tmp & UDC_RX_EOT_IE(2)) ? " rx1_eot" : "",
+
+ (tmp & UDC_TX_DONE_IE(1)) ? " tx0_done" : "",
+ (tmp & UDC_RX_CNT_IE(1)) ? " rx0_cnt" : "",
+ (tmp & UDC_RX_EOT_IE(1)) ? " rx0_eot" : "");
+
+ tmp = UDC_RXDMA_CFG_REG;
+ seq_printf(s, "rxdma_cfg %04x\n", tmp);
+ if (tmp) {
+ for (i = 0; i < 3; i++) {
+ if ((tmp & (0x0f << (i * 4))) == 0)
+ continue;
+ seq_printf(s, "rxdma[%d] %04x\n", i,
+ UDC_RXDMA_REG(i + 1));
+ }
+ }
+ tmp = UDC_TXDMA_CFG_REG;
+ seq_printf(s, "txdma_cfg %04x\n", tmp);
+ if (tmp) {
+ for (i = 0; i < 3; i++) {
+ if (!(tmp & (0x0f << (i * 4))))
+ continue;
+ seq_printf(s, "txdma[%d] %04x\n", i,
+ UDC_TXDMA_REG(i + 1));
+ }
+ }
+ }
+
+ tmp = UDC_DEVSTAT_REG;
+ if (tmp & UDC_ATT) {
+ proc_ep_show(s, &udc->ep[0]);
+ if (tmp & UDC_ADD) {
+ list_for_each_entry (ep, &udc->gadget.ep_list,
+ ep.ep_list) {
+ if (ep->desc)
+ proc_ep_show(s, ep);
+ }
+ }
+ }
+ spin_unlock_irqrestore(&udc->lock, flags);
+ return 0;
+}
+
+static int proc_udc_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, proc_udc_show, 0);
+}
+
+static struct file_operations proc_ops = {
+ .open = proc_udc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+static void create_proc_file(void)
+{
+ struct proc_dir_entry *pde;
+
+ pde = create_proc_entry (proc_filename, 0, NULL);
+ if (pde)
+ pde->proc_fops = &proc_ops;
+}
+
+static void remove_proc_file(void)
+{
+ remove_proc_entry(proc_filename, 0);
+}
+
+#else
+
+static inline void create_proc_file(void) {}
+static inline void remove_proc_file(void) {}
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/* Before this controller can enumerate, we need to pick an endpoint
+ * configuration, or "fifo_mode" That involves allocating 2KB of packet
+ * buffer space among the endpoints we'll be operating.
+ */
+static unsigned __init
+omap_ep_setup(char *name, u8 addr, u8 type,
+ unsigned buf, unsigned maxp, int dbuf)
+{
+ struct omap_ep *ep;
+ u16 epn_rxtx = 0;
+
+ /* OUT endpoints first, then IN */
+ ep = &udc->ep[addr & 0xf];
+ if (addr & USB_DIR_IN)
+ ep += 16;
+
+ /* in case of ep init table bugs */
+ BUG_ON(ep->name[0]);
+
+ /* chip setup ... bit values are same for IN, OUT */
+ if (type == USB_ENDPOINT_XFER_ISOC) {
+ switch (maxp) {
+ case 8: epn_rxtx = 0 << 12; break;
+ case 16: epn_rxtx = 1 << 12; break;
+ case 32: epn_rxtx = 2 << 12; break;
+ case 64: epn_rxtx = 3 << 12; break;
+ case 128: epn_rxtx = 4 << 12; break;
+ case 256: epn_rxtx = 5 << 12; break;
+ case 512: epn_rxtx = 6 << 12; break;
+ default: BUG();
+ }
+ epn_rxtx |= UDC_EPN_RX_ISO;
+ dbuf = 1;
+ } else {
+ /* double-buffering "not supported" on 15xx,
+ * and ignored for PIO-IN on 16xx
+ */
+ if (!use_dma || cpu_is_omap15xx())
+ dbuf = 0;
+
+ switch (maxp) {
+ case 8: epn_rxtx = 0 << 12; break;
+ case 16: epn_rxtx = 1 << 12; break;
+ case 32: epn_rxtx = 2 << 12; break;
+ case 64: epn_rxtx = 3 << 12; break;
+ default: BUG();
+ }
+ if (dbuf && addr)
+ epn_rxtx |= UDC_EPN_RX_DB;
+ init_timer(&ep->timer);
+ ep->timer.function = pio_out_timer;
+ ep->timer.data = (unsigned long) ep;
+ }
+ if (addr)
+ epn_rxtx |= UDC_EPN_RX_VALID;
+ BUG_ON(buf & 0x07);
+ epn_rxtx |= buf >> 3;
+
+ DBG("%s addr %02x rxtx %04x maxp %d%s buf %d\n",
+ name, addr, epn_rxtx, maxp, dbuf ? "x2" : "", buf);
+
+ if (addr & USB_DIR_IN)
+ UDC_EP_TX_REG(addr & 0xf) = epn_rxtx;
+ else
+ UDC_EP_RX_REG(addr) = epn_rxtx;
+
+ /* next endpoint's buffer starts after this one's */
+ buf += maxp;
+ if (dbuf)
+ buf += maxp;
+ BUG_ON(buf > 2048);
+
+ /* set up driver data structures */
+ BUG_ON(strlen(name) >= sizeof ep->name);
+ strlcpy(ep->name, name, sizeof ep->name);
+ INIT_LIST_HEAD(&ep->queue);
+ INIT_LIST_HEAD(&ep->iso);
+ ep->bEndpointAddress = addr;
+ ep->bmAttributes = type;
+ ep->double_buf = dbuf;
+ ep->udc = udc;
+
+ ep->ep.name = ep->name;
+ ep->ep.ops = &omap_ep_ops;
+ ep->ep.maxpacket = ep->maxpacket = maxp;
+ list_add_tail (&ep->ep.ep_list, &udc->gadget.ep_list);
+
+ return buf;
+}
+
+static void omap_udc_release(struct device *dev)
+{
+ complete(udc->done);
+ kfree (udc);
+ udc = 0;
+}
+
+static int __init
+omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv)
+{
+ unsigned tmp, buf;
+
+ /* abolish any previous hardware state */
+ UDC_SYSCON1_REG = 0;
+ UDC_IRQ_EN_REG = 0;
+ UDC_IRQ_SRC_REG = UDC_IRQ_SRC_MASK;
+ UDC_DMA_IRQ_EN_REG = 0;
+ UDC_RXDMA_CFG_REG = 0;
+ UDC_TXDMA_CFG_REG = 0;
+
+ /* UDC_PULLUP_EN gates the chip clock */
+ // OTG_SYSCON_1_REG |= DEV_IDLE_EN;
+
+ udc = kmalloc (sizeof *udc, SLAB_KERNEL);
+ if (!udc)
+ return -ENOMEM;
+
+ memset(udc, 0, sizeof *udc);
+ spin_lock_init (&udc->lock);
+
+ udc->gadget.ops = &omap_gadget_ops;
+ udc->gadget.ep0 = &udc->ep[0].ep;
+ INIT_LIST_HEAD(&udc->gadget.ep_list);
+ INIT_LIST_HEAD(&udc->iso);
+ udc->gadget.speed = USB_SPEED_UNKNOWN;
+ udc->gadget.name = driver_name;
+
+ device_initialize(&udc->gadget.dev);
+ strcpy (udc->gadget.dev.bus_id, "gadget");
+ udc->gadget.dev.release = omap_udc_release;
+ udc->gadget.dev.parent = &odev->dev;
+ if (use_dma)
+ udc->gadget.dev.dma_mask = odev->dev.dma_mask;
+
+ udc->transceiver = xceiv;
+
+ /* ep0 is special; put it right after the SETUP buffer */
+ buf = omap_ep_setup("ep0", 0, USB_ENDPOINT_XFER_CONTROL,
+ 8 /* after SETUP */, 64 /* maxpacket */, 0);
+ list_del_init(&udc->ep[0].ep.ep_list);
+
+ /* initially disable all non-ep0 endpoints */
+ for (tmp = 1; tmp < 15; tmp++) {
+ UDC_EP_RX_REG(tmp) = 0;
+ UDC_EP_TX_REG(tmp) = 0;
+ }
+
+#define OMAP_BULK_EP(name,addr) \
+ buf = omap_ep_setup(name "-bulk", addr, \
+ USB_ENDPOINT_XFER_BULK, buf, 64, 1);
+#define OMAP_INT_EP(name,addr, maxp) \
+ buf = omap_ep_setup(name "-int", addr, \
+ USB_ENDPOINT_XFER_INT, buf, maxp, 0);
+#define OMAP_ISO_EP(name,addr, maxp) \
+ buf = omap_ep_setup(name "-iso", addr, \
+ USB_ENDPOINT_XFER_ISOC, buf, maxp, 1);
+
+ switch (fifo_mode) {
+ case 0:
+ OMAP_BULK_EP("ep1in", USB_DIR_IN | 1);
+ OMAP_BULK_EP("ep2out", USB_DIR_OUT | 2);
+ OMAP_INT_EP("ep3in", USB_DIR_IN | 3, 16);
+ break;
+ case 1:
+ OMAP_BULK_EP("ep1in", USB_DIR_IN | 1);
+ OMAP_BULK_EP("ep2out", USB_DIR_OUT | 2);
+ OMAP_BULK_EP("ep3in", USB_DIR_IN | 3);
+ OMAP_BULK_EP("ep4out", USB_DIR_OUT | 4);
+
+ OMAP_BULK_EP("ep5in", USB_DIR_IN | 5);
+ OMAP_BULK_EP("ep5out", USB_DIR_OUT | 5);
+ OMAP_BULK_EP("ep6in", USB_DIR_IN | 6);
+ OMAP_BULK_EP("ep6out", USB_DIR_OUT | 6);
+
+ OMAP_BULK_EP("ep7in", USB_DIR_IN | 7);
+ OMAP_BULK_EP("ep7out", USB_DIR_OUT | 7);
+ OMAP_BULK_EP("ep8in", USB_DIR_IN | 8);
+ OMAP_BULK_EP("ep8out", USB_DIR_OUT | 8);
+
+ OMAP_INT_EP("ep9in", USB_DIR_IN | 9, 16);
+ OMAP_INT_EP("ep10out", USB_DIR_IN | 10, 16);
+ OMAP_INT_EP("ep11in", USB_DIR_IN | 9, 16);
+ OMAP_INT_EP("ep12out", USB_DIR_IN | 10, 16);
+ break;
+
+#ifdef USE_ISO
+ case 2: /* mixed iso/bulk */
+ OMAP_ISO_EP("ep1in", USB_DIR_IN | 1, 256);
+ OMAP_ISO_EP("ep2out", USB_DIR_OUT | 2, 256);
+ OMAP_ISO_EP("ep3in", USB_DIR_IN | 3, 128);
+ OMAP_ISO_EP("ep4out", USB_DIR_OUT | 4, 128);
+
+ OMAP_INT_EP("ep5in", USB_DIR_IN | 5, 16);
+
+ OMAP_BULK_EP("ep6in", USB_DIR_IN | 6);
+ OMAP_BULK_EP("ep7out", USB_DIR_OUT | 7);
+ OMAP_INT_EP("ep8in", USB_DIR_IN | 8, 16);
+ break;
+ case 3: /* mixed bulk/iso */
+ OMAP_BULK_EP("ep1in", USB_DIR_IN | 1);
+ OMAP_BULK_EP("ep2out", USB_DIR_OUT | 2);
+ OMAP_INT_EP("ep3in", USB_DIR_IN | 3, 16);
+
+ OMAP_BULK_EP("ep4in", USB_DIR_IN | 4);
+ OMAP_BULK_EP("ep5out", USB_DIR_OUT | 5);
+ OMAP_INT_EP("ep6in", USB_DIR_IN | 6, 16);
+
+ OMAP_ISO_EP("ep7in", USB_DIR_IN | 7, 256);
+ OMAP_ISO_EP("ep8out", USB_DIR_OUT | 8, 256);
+ OMAP_INT_EP("ep9in", USB_DIR_IN | 9, 16);
+ break;
+#endif
+
+ /* add more modes as needed */
+
+ default:
+ ERR("unsupported fifo_mode #%d\n", fifo_mode);
+ return -ENODEV;
+ }
+ UDC_SYSCON1_REG = UDC_CFG_LOCK|UDC_SELF_PWR;
+ INFO("fifo mode %d, %d bytes not used\n", fifo_mode, 2048 - buf);
+ return 0;
+}
+
+static int __init omap_udc_probe(struct device *dev)
+{
+ struct platform_device *odev = to_platform_device(dev);
+ int status = -ENODEV;
+ int hmc;
+ struct otg_transceiver *xceiv = 0;
+ const char *type = 0;
+ struct omap_usb_config *config = dev->platform_data;
+
+ /* NOTE: "knows" the order of the resources! */
+ if (!request_mem_region(odev->resource[0].start,
+ odev->resource[0].end - odev->resource[0].start + 1,
+ driver_name)) {
+ DBG("request_mem_region failed\n");
+ return -EBUSY;
+ }
+
+ INFO("OMAP UDC rev %d.%d%s\n",
+ UDC_REV_REG >> 4, UDC_REV_REG & 0xf,
+ config->otg ? ", Mini-AB" : "");
+
+ /* use the mode given to us by board init code */
+ if (cpu_is_omap15xx()) {
+ hmc = HMC_1510;
+ type = "(unknown)";
+
+ if (machine_is_omap_innovator()) {
+ /* just set up software VBUS detect, and then
+ * later rig it so we always report VBUS.
+ * FIXME without really sensing VBUS, we can't
+ * know when to turn PULLUP_EN on/off; and that
+ * means we always "need" the 48MHz clock.
+ */
+ u32 tmp = FUNC_MUX_CTRL_0_REG;
+
+ FUNC_MUX_CTRL_0_REG &= ~VBUS_CTRL_1510;
+ tmp |= VBUS_MODE_1510;
+ tmp &= ~VBUS_CTRL_1510;
+ FUNC_MUX_CTRL_0_REG = tmp;
+ }
+ } else {
+ hmc = HMC_1610;
+ switch (hmc) {
+ case 3:
+ case 11:
+ case 16:
+ case 19:
+ case 25:
+ xceiv = otg_get_transceiver();
+ if (!xceiv) {
+ DBG("external transceiver not registered!\n");
+ if (config->otg)
+ goto cleanup0;
+ type = "(unknown external)";
+ } else
+ type = xceiv->label;
+ break;
+ case 0: /* POWERUP DEFAULT == 0 */
+ case 4:
+ case 12:
+ case 20:
+ type = "INTEGRATED";
+ break;
+ case 21: /* internal loopback */
+ type = "(loopback)";
+ break;
+ case 14: /* transceiverless */
+ type = "(none)";
+ break;
+
+ default:
+ ERR("unrecognized UDC HMC mode %d\n", hmc);
+ return -ENODEV;
+ }
+ }
+ INFO("hmc mode %d, transceiver %s\n", hmc, type);
+
+ /* a "gadget" abstracts/virtualizes the controller */
+ status = omap_udc_setup(odev, xceiv);
+ if (status) {
+ goto cleanup0;
+ }
+ xceiv = 0;
+ // "udc" is now valid
+ pullup_disable(udc);
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+ udc->gadget.is_otg = (config->otg != 0);
+#endif
+
+ /* USB general purpose IRQ: ep0, state changes, dma, etc */
+ status = request_irq(odev->resource[1].start, omap_udc_irq,
+ SA_SAMPLE_RANDOM, driver_name, udc);
+ if (status != 0) {
+ ERR( "can't get irq %ld, err %d\n",
+ odev->resource[1].start, status);
+ goto cleanup1;
+ }
+
+ /* USB "non-iso" IRQ (PIO for all but ep0) */
+ status = request_irq(odev->resource[2].start, omap_udc_pio_irq,
+ SA_SAMPLE_RANDOM, "omap_udc pio", udc);
+ if (status != 0) {
+ ERR( "can't get irq %ld, err %d\n",
+ odev->resource[2].start, status);
+ goto cleanup2;
+ }
+#ifdef USE_ISO
+ status = request_irq(odev->resource[3].start, omap_udc_iso_irq,
+ SA_INTERRUPT, "omap_udc iso", udc);
+ if (status != 0) {
+ ERR("can't get irq %ld, err %d\n",
+ odev->resource[3].start, status);
+ goto cleanup3;
+ }
+#endif
+
+ create_proc_file();
+ device_add(&udc->gadget.dev);
+ return 0;
+
+#ifdef USE_ISO
+cleanup3:
+ free_irq(odev->resource[2].start, udc);
+#endif
+
+cleanup2:
+ free_irq(odev->resource[1].start, udc);
+
+cleanup1:
+ kfree (udc);
+ udc = 0;
+
+cleanup0:
+ if (xceiv)
+ put_device(xceiv->dev);
+ release_mem_region(odev->resource[0].start,
+ odev->resource[0].end - odev->resource[0].start + 1);
+ return status;
+}
+
+static int __exit omap_udc_remove(struct device *dev)
+{
+ struct platform_device *odev = to_platform_device(dev);
+ DECLARE_COMPLETION(done);
+
+ if (!udc)
+ return -ENODEV;
+
+ udc->done = &done;
+
+ pullup_disable(udc);
+ if (udc->transceiver) {
+ put_device(udc->transceiver->dev);
+ udc->transceiver = 0;
+ }
+ UDC_SYSCON1_REG = 0;
+
+ remove_proc_file();
+
+#ifdef USE_ISO
+ free_irq(odev->resource[3].start, udc);
+#endif
+ free_irq(odev->resource[2].start, udc);
+ free_irq(odev->resource[1].start, udc);
+
+ release_mem_region(odev->resource[0].start,
+ odev->resource[0].end - odev->resource[0].start + 1);
+
+ device_unregister(&udc->gadget.dev);
+ wait_for_completion(&done);
+
+ return 0;
+}
+
+/* suspend/resume/wakeup from sysfs (echo > power/state) */
+
+static int omap_udc_suspend(struct device *dev, u32 state, u32 level)
+{
+ if (level != 0)
+ return 0;
+
+ DBG("suspend, state %d\n", state);
+ omap_pullup(&udc->gadget, 0);
+ udc->gadget.dev.power.power_state = 3;
+ udc->gadget.dev.parent->power.power_state = 3;
+ return 0;
+}
+
+static int omap_udc_resume(struct device *dev, u32 level)
+{
+ if (level != 0)
+ return 0;
+
+ DBG("resume + wakeup/SRP\n");
+ udc->gadget.dev.parent->power.power_state = 0;
+ udc->gadget.dev.power.power_state = 0;
+ omap_pullup(&udc->gadget, 1);
+
+ /* maybe the host would enumerate us if we nudged it */
+ msleep(100);
+ return omap_wakeup(&udc->gadget);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct device_driver udc_driver = {
+ .name = (char *) driver_name,
+ .bus = &platform_bus_type,
+ .probe = omap_udc_probe,
+ .remove = __exit_p(omap_udc_remove),
+ .suspend = omap_udc_suspend,
+ .resume = omap_udc_resume,
+};
+
+static int __init udc_init(void)
+{
+ INFO("%s, version: " DRIVER_VERSION
+#ifdef USE_ISO
+ " (iso)"
+#endif
+ "%s\n", driver_desc,
+ use_dma ? " (dma)" : "");
+ return driver_register(&udc_driver);
+}
+module_init(udc_init);
+
+static void __exit udc_exit(void)
+{
+ driver_unregister(&udc_driver);
+}
+module_exit(udc_exit);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/usb/gadget/omap_udc.h b/drivers/usb/gadget/omap_udc.h
new file mode 100644
index 000000000000..c9e68541622c
--- /dev/null
+++ b/drivers/usb/gadget/omap_udc.h
@@ -0,0 +1,208 @@
+/*
+ * omap_udc.h -- for omap 3.2 udc, with OTG support
+ *
+ * 2004 (C) Texas Instruments, Inc.
+ * 2004 (C) David Brownell
+ */
+
+/*
+ * USB device/endpoint management registers
+ */
+#define UDC_REG(offset) __REG16(UDC_BASE + (offset))
+
+#define UDC_REV_REG UDC_REG(0x0) /* Revision */
+#define UDC_EP_NUM_REG UDC_REG(0x4) /* Which endpoint */
+# define UDC_SETUP_SEL (1 << 6)
+# define UDC_EP_SEL (1 << 5)
+# define UDC_EP_DIR (1 << 4)
+ /* low 4 bits for endpoint number */
+#define UDC_DATA_REG UDC_REG(0x08) /* Endpoint FIFO */
+#define UDC_CTRL_REG UDC_REG(0x0C) /* Endpoint control */
+# define UDC_CLR_HALT (1 << 7)
+# define UDC_SET_HALT (1 << 6)
+# define UDC_SET_FIFO_EN (1 << 2)
+# define UDC_CLR_EP (1 << 1)
+# define UDC_RESET_EP (1 << 0)
+#define UDC_STAT_FLG_REG UDC_REG(0x10) /* Endpoint status */
+# define UDC_NO_RXPACKET (1 << 15)
+# define UDC_MISS_IN (1 << 14)
+# define UDC_DATA_FLUSH (1 << 13)
+# define UDC_ISO_ERR (1 << 12)
+# define UDC_ISO_FIFO_EMPTY (1 << 9)
+# define UDC_ISO_FIFO_FULL (1 << 8)
+# define UDC_EP_HALTED (1 << 6)
+# define UDC_STALL (1 << 5)
+# define UDC_NAK (1 << 4)
+# define UDC_ACK (1 << 3)
+# define UDC_FIFO_EN (1 << 2)
+# define UDC_NON_ISO_FIFO_EMPTY (1 << 1)
+# define UDC_NON_ISO_FIFO_FULL (1 << 0)
+#define UDC_RXFSTAT_REG UDC_REG(0x14) /* OUT bytecount */
+#define UDC_SYSCON1_REG UDC_REG(0x18) /* System config 1 */
+# define UDC_CFG_LOCK (1 << 8)
+# define UDC_DATA_ENDIAN (1 << 7)
+# define UDC_DMA_ENDIAN (1 << 6)
+# define UDC_NAK_EN (1 << 4)
+# define UDC_AUTODECODE_DIS (1 << 3)
+# define UDC_SELF_PWR (1 << 2)
+# define UDC_SOFF_DIS (1 << 1)
+# define UDC_PULLUP_EN (1 << 0)
+#define UDC_SYSCON2_REG UDC_REG(0x1C) /* System config 2 */
+# define UDC_RMT_WKP (1 << 6)
+# define UDC_STALL_CMD (1 << 5)
+# define UDC_DEV_CFG (1 << 3)
+# define UDC_CLR_CFG (1 << 2)
+#define UDC_DEVSTAT_REG UDC_REG(0x20) /* Device status */
+# define UDC_B_HNP_ENABLE (1 << 9)
+# define UDC_A_HNP_SUPPORT (1 << 8)
+# define UDC_A_ALT_HNP_SUPPORT (1 << 7)
+# define UDC_R_WK_OK (1 << 6)
+# define UDC_USB_RESET (1 << 5)
+# define UDC_SUS (1 << 4)
+# define UDC_CFG (1 << 3)
+# define UDC_ADD (1 << 2)
+# define UDC_DEF (1 << 1)
+# define UDC_ATT (1 << 0)
+#define UDC_SOF_REG UDC_REG(0x24) /* Start of frame */
+# define UDC_FT_LOCK (1 << 12)
+# define UDC_TS_OK (1 << 11)
+# define UDC_TS 0x03ff
+#define UDC_IRQ_EN_REG UDC_REG(0x28) /* Interrupt enable */
+# define UDC_SOF_IE (1 << 7)
+# define UDC_EPN_RX_IE (1 << 5)
+# define UDC_EPN_TX_IE (1 << 4)
+# define UDC_DS_CHG_IE (1 << 3)
+# define UDC_EP0_IE (1 << 0)
+#define UDC_DMA_IRQ_EN_REG UDC_REG(0x2C) /* DMA irq enable */
+ /* rx/tx dma channels numbered 1-3 not 0-2 */
+# define UDC_TX_DONE_IE(n) (1 << (4 * (n) - 2))
+# define UDC_RX_CNT_IE(n) (1 << (4 * (n) - 3))
+# define UDC_RX_EOT_IE(n) (1 << (4 * (n) - 4))
+#define UDC_IRQ_SRC_REG UDC_REG(0x30) /* Interrupt source */
+# define UDC_TXN_DONE (1 << 10)
+# define UDC_RXN_CNT (1 << 9)
+# define UDC_RXN_EOT (1 << 8)
+# define UDC_SOF (1 << 7)
+# define UDC_EPN_RX (1 << 5)
+# define UDC_EPN_TX (1 << 4)
+# define UDC_DS_CHG (1 << 3)
+# define UDC_SETUP (1 << 2)
+# define UDC_EP0_RX (1 << 1)
+# define UDC_EP0_TX (1 << 0)
+# define UDC_IRQ_SRC_MASK 0x7bf
+#define UDC_EPN_STAT_REG UDC_REG(0x34) /* EP irq status */
+#define UDC_DMAN_STAT_REG UDC_REG(0x38) /* DMA irq status */
+# define UDC_DMA_RX_SB (1 << 12)
+# define UDC_DMA_RX_SRC(x) (((x)>>8) & 0xf)
+# define UDC_DMA_TX_SRC(x) (((x)>>0) & 0xf)
+
+
+/* DMA configuration registers: up to three channels in each direction. */
+#define UDC_RXDMA_CFG_REG UDC_REG(0x40) /* 3 eps for RX DMA */
+#define UDC_TXDMA_CFG_REG UDC_REG(0x44) /* 3 eps for TX DMA */
+#define UDC_DATA_DMA_REG UDC_REG(0x48) /* rx/tx fifo addr */
+
+/* rx/tx dma control, numbering channels 1-3 not 0-2 */
+#define UDC_TXDMA_REG(chan) UDC_REG(0x50 - 4 + 4 * (chan))
+# define UDC_TXN_EOT (1 << 15) /* bytes vs packets */
+# define UDC_TXN_START (1 << 14) /* start transfer */
+# define UDC_TXN_TSC 0x03ff /* units in xfer */
+#define UDC_RXDMA_REG(chan) UDC_REG(0x60 - 4 + 4 * (chan))
+# define UDC_RXN_STOP (1 << 15) /* enable EOT irq */
+# define UDC_RXN_TC 0x00ff /* packets in xfer */
+
+
+/*
+ * Endpoint configuration registers (used before CFG_LOCK is set)
+ * UDC_EP_TX_REG(0) is unused
+ */
+#define UDC_EP_RX_REG(endpoint) UDC_REG(0x80 + (endpoint)*4)
+# define UDC_EPN_RX_VALID (1 << 15)
+# define UDC_EPN_RX_DB (1 << 14)
+ /* buffer size in bits 13, 12 */
+# define UDC_EPN_RX_ISO (1 << 11)
+ /* buffer pointer in low 11 bits */
+#define UDC_EP_TX_REG(endpoint) UDC_REG(0xc0 + (endpoint)*4)
+ /* same bitfields as in RX_REG */
+
+/*-------------------------------------------------------------------------*/
+
+struct omap_req {
+ struct usb_request req;
+ struct list_head queue;
+ unsigned dma_bytes;
+ unsigned mapped:1;
+};
+
+struct omap_ep {
+ struct usb_ep ep;
+ struct list_head queue;
+ unsigned long irqs;
+ struct list_head iso;
+ const struct usb_endpoint_descriptor *desc;
+ char name[14];
+ u16 maxpacket;
+ u8 bEndpointAddress;
+ u8 bmAttributes;
+ unsigned double_buf:1;
+ unsigned stopped:1;
+ unsigned fnf:1;
+ unsigned has_dma:1;
+ u8 ackwait;
+ u8 dma_channel;
+ u16 dma_counter;
+ int lch;
+ struct omap_udc *udc;
+ struct timer_list timer;
+};
+
+struct omap_udc {
+ struct usb_gadget gadget;
+ struct usb_gadget_driver *driver;
+ spinlock_t lock;
+ struct omap_ep ep[32];
+ u16 devstat;
+ struct otg_transceiver *transceiver;
+ struct list_head iso;
+ unsigned softconnect:1;
+ unsigned vbus_active:1;
+ unsigned ep0_pending:1;
+ unsigned ep0_in:1;
+ unsigned ep0_set_config:1;
+ unsigned ep0_reset_config:1;
+ unsigned ep0_setup:1;
+
+ struct completion *done;
+};
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef DEBUG
+#define DBG(stuff...) printk(KERN_DEBUG "udc: " stuff)
+#else
+#define DBG(stuff...) do{}while(0)
+#endif
+
+#ifdef VERBOSE
+# define VDBG DBG
+#else
+# define VDBG(stuff...) do{}while(0)
+#endif
+
+#define ERR(stuff...) printk(KERN_ERR "udc: " stuff)
+#define WARN(stuff...) printk(KERN_WARNING "udc: " stuff)
+#define INFO(stuff...) printk(KERN_INFO "udc: " stuff)
+
+/*-------------------------------------------------------------------------*/
+
+#define MOD_CONF_CTRL_0_REG __REG32(MOD_CONF_CTRL_0)
+#define VBUS_W2FC_1510 (1 << 17) /* 0 gpio0, 1 dvdd2 pin */
+
+#define FUNC_MUX_CTRL_0_REG __REG32(FUNC_MUX_CTRL_0)
+#define VBUS_CTRL_1510 (1 << 19) /* 1 connected (software) */
+#define VBUS_MODE_1510 (1 << 18) /* 0 hardware, 1 software */
+
+#define HMC_1510 ((MOD_CONF_CTRL_0_REG >> 1) & 0x3f)
+#define HMC_1610 (OTG_SYSCON_2_REG & 0x3f)
+#define HMC (cpu_is_omap15xx() ? HMC_1510 : HMC_1610)
+
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
new file mode 100644
index 000000000000..6390c5726d81
--- /dev/null
+++ b/drivers/usb/gadget/pxa2xx_udc.c
@@ -0,0 +1,2648 @@
+/*
+ * linux/drivers/usb/gadget/pxa2xx_udc.c
+ * Intel PXA2xx and IXP4xx on-chip full speed USB device controllers
+ *
+ * Copyright (C) 2002 Intrinsyc, Inc. (Frank Becker)
+ * Copyright (C) 2003 Robert Schwebel, Pengutronix
+ * Copyright (C) 2003 Benedikt Spranger, Pengutronix
+ * Copyright (C) 2003 David Brownell
+ * Copyright (C) 2003 Joshua Wise
+ *
+ * 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
+ *
+ */
+
+#undef DEBUG
+// #define VERBOSE DBG_VERBOSE
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/ioport.h>
+#include <linux/types.h>
+#include <linux/version.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/proc_fs.h>
+#include <linux/mm.h>
+#include <linux/device.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/byteorder.h>
+#include <asm/dma.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/mach-types.h>
+#include <asm/unaligned.h>
+#include <asm/hardware.h>
+#include <asm/arch/pxa-regs.h>
+
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+
+#include <asm/arch/udc.h>
+
+
+/*
+ * This driver handles the USB Device Controller (UDC) in Intel's PXA 2xx
+ * series processors. The UDC for the IXP 4xx series is very similar.
+ * There are fifteen endpoints, in addition to ep0.
+ *
+ * Such controller drivers work with a gadget driver. The gadget driver
+ * returns descriptors, implements configuration and data protocols used
+ * by the host to interact with this device, and allocates endpoints to
+ * the different protocol interfaces. The controller driver virtualizes
+ * usb hardware so that the gadget drivers will be more portable.
+ *
+ * This UDC hardware wants to implement a bit too much USB protocol, so
+ * it constrains the sorts of USB configuration change events that work.
+ * The errata for these chips are misleading; some "fixed" bugs from
+ * pxa250 a0/a1 b0/b1/b2 sure act like they're still there.
+ */
+
+#define DRIVER_VERSION "14-Dec-2003"
+#define DRIVER_DESC "PXA 2xx USB Device Controller driver"
+
+
+static const char driver_name [] = "pxa2xx_udc";
+
+static const char ep0name [] = "ep0";
+
+
+// #define USE_DMA
+// #define USE_OUT_DMA
+// #define DISABLE_TEST_MODE
+
+#ifdef CONFIG_ARCH_IXP4XX
+#undef USE_DMA
+
+/* cpu-specific register addresses are compiled in to this code */
+#ifdef CONFIG_ARCH_PXA
+#error "Can't configure both IXP and PXA"
+#endif
+
+#endif
+
+#include "pxa2xx_udc.h"
+
+
+#ifdef USE_DMA
+static int use_dma = 1;
+module_param(use_dma, bool, 0);
+MODULE_PARM_DESC (use_dma, "true to use dma");
+
+static void dma_nodesc_handler (int dmach, void *_ep, struct pt_regs *r);
+static void kick_dma(struct pxa2xx_ep *ep, struct pxa2xx_request *req);
+
+#ifdef USE_OUT_DMA
+#define DMASTR " (dma support)"
+#else
+#define DMASTR " (dma in)"
+#endif
+
+#else /* !USE_DMA */
+#define DMASTR " (pio only)"
+#undef USE_OUT_DMA
+#endif
+
+#ifdef CONFIG_USB_PXA2XX_SMALL
+#define SIZE_STR " (small)"
+#else
+#define SIZE_STR ""
+#endif
+
+#ifdef DISABLE_TEST_MODE
+/* (mode == 0) == no undocumented chip tweaks
+ * (mode & 1) == double buffer bulk IN
+ * (mode & 2) == double buffer bulk OUT
+ * ... so mode = 3 (or 7, 15, etc) does it for both
+ */
+static ushort fifo_mode = 0;
+module_param(fifo_mode, ushort, 0);
+MODULE_PARM_DESC (fifo_mode, "pxa2xx udc fifo mode");
+#endif
+
+/* ---------------------------------------------------------------------------
+ * endpoint related parts of the api to the usb controller hardware,
+ * used by gadget driver; and the inner talker-to-hardware core.
+ * ---------------------------------------------------------------------------
+ */
+
+static void pxa2xx_ep_fifo_flush (struct usb_ep *ep);
+static void nuke (struct pxa2xx_ep *, int status);
+
+static void pio_irq_enable(int bEndpointAddress)
+{
+ bEndpointAddress &= 0xf;
+ if (bEndpointAddress < 8)
+ UICR0 &= ~(1 << bEndpointAddress);
+ else {
+ bEndpointAddress -= 8;
+ UICR1 &= ~(1 << bEndpointAddress);
+ }
+}
+
+static void pio_irq_disable(int bEndpointAddress)
+{
+ bEndpointAddress &= 0xf;
+ if (bEndpointAddress < 8)
+ UICR0 |= 1 << bEndpointAddress;
+ else {
+ bEndpointAddress -= 8;
+ UICR1 |= 1 << bEndpointAddress;
+ }
+}
+
+/* The UDCCR reg contains mask and interrupt status bits,
+ * so using '|=' isn't safe as it may ack an interrupt.
+ */
+#define UDCCR_MASK_BITS (UDCCR_REM | UDCCR_SRM | UDCCR_UDE)
+
+static inline void udc_set_mask_UDCCR(int mask)
+{
+ UDCCR = (UDCCR & UDCCR_MASK_BITS) | (mask & UDCCR_MASK_BITS);
+}
+
+static inline void udc_clear_mask_UDCCR(int mask)
+{
+ UDCCR = (UDCCR & UDCCR_MASK_BITS) & ~(mask & UDCCR_MASK_BITS);
+}
+
+static inline void udc_ack_int_UDCCR(int mask)
+{
+ /* udccr contains the bits we dont want to change */
+ __u32 udccr = UDCCR & UDCCR_MASK_BITS;
+
+ UDCCR = udccr | (mask & ~UDCCR_MASK_BITS);
+}
+
+/*
+ * endpoint enable/disable
+ *
+ * we need to verify the descriptors used to enable endpoints. since pxa2xx
+ * endpoint configurations are fixed, and are pretty much always enabled,
+ * there's not a lot to manage here.
+ *
+ * because pxa2xx can't selectively initialize bulk (or interrupt) endpoints,
+ * (resetting endpoint halt and toggle), SET_INTERFACE is unusable except
+ * for a single interface (with only the default altsetting) and for gadget
+ * drivers that don't halt endpoints (not reset by set_interface). that also
+ * means that if you use ISO, you must violate the USB spec rule that all
+ * iso endpoints must be in non-default altsettings.
+ */
+static int pxa2xx_ep_enable (struct usb_ep *_ep,
+ const struct usb_endpoint_descriptor *desc)
+{
+ struct pxa2xx_ep *ep;
+ struct pxa2xx_udc *dev;
+
+ ep = container_of (_ep, struct pxa2xx_ep, ep);
+ if (!_ep || !desc || ep->desc || _ep->name == ep0name
+ || desc->bDescriptorType != USB_DT_ENDPOINT
+ || ep->bEndpointAddress != desc->bEndpointAddress
+ || ep->fifo_size < le16_to_cpu
+ (desc->wMaxPacketSize)) {
+ DMSG("%s, bad ep or descriptor\n", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ /* xfer types must match, except that interrupt ~= bulk */
+ if (ep->bmAttributes != desc->bmAttributes
+ && ep->bmAttributes != USB_ENDPOINT_XFER_BULK
+ && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
+ DMSG("%s, %s type mismatch\n", __FUNCTION__, _ep->name);
+ return -EINVAL;
+ }
+
+ /* hardware _could_ do smaller, but driver doesn't */
+ if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
+ && le16_to_cpu (desc->wMaxPacketSize)
+ != BULK_FIFO_SIZE)
+ || !desc->wMaxPacketSize) {
+ DMSG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name);
+ return -ERANGE;
+ }
+
+ dev = ep->dev;
+ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
+ DMSG("%s, bogus device state\n", __FUNCTION__);
+ return -ESHUTDOWN;
+ }
+
+ ep->desc = desc;
+ ep->dma = -1;
+ ep->stopped = 0;
+ ep->pio_irqs = ep->dma_irqs = 0;
+ ep->ep.maxpacket = le16_to_cpu (desc->wMaxPacketSize);
+
+ /* flush fifo (mostly for OUT buffers) */
+ pxa2xx_ep_fifo_flush (_ep);
+
+ /* ... reset halt state too, if we could ... */
+
+#ifdef USE_DMA
+ /* for (some) bulk and ISO endpoints, try to get a DMA channel and
+ * bind it to the endpoint. otherwise use PIO.
+ */
+ switch (ep->bmAttributes) {
+ case USB_ENDPOINT_XFER_ISOC:
+ if (le16_to_cpu(desc->wMaxPacketSize) % 32)
+ break;
+ // fall through
+ case USB_ENDPOINT_XFER_BULK:
+ if (!use_dma || !ep->reg_drcmr)
+ break;
+ ep->dma = pxa_request_dma ((char *)_ep->name,
+ (le16_to_cpu (desc->wMaxPacketSize) > 64)
+ ? DMA_PRIO_MEDIUM /* some iso */
+ : DMA_PRIO_LOW,
+ dma_nodesc_handler, ep);
+ if (ep->dma >= 0) {
+ *ep->reg_drcmr = DRCMR_MAPVLD | ep->dma;
+ DMSG("%s using dma%d\n", _ep->name, ep->dma);
+ }
+ }
+#endif
+
+ DBG(DBG_VERBOSE, "enabled %s\n", _ep->name);
+ return 0;
+}
+
+static int pxa2xx_ep_disable (struct usb_ep *_ep)
+{
+ struct pxa2xx_ep *ep;
+
+ ep = container_of (_ep, struct pxa2xx_ep, ep);
+ if (!_ep || !ep->desc) {
+ DMSG("%s, %s not enabled\n", __FUNCTION__,
+ _ep ? ep->ep.name : NULL);
+ return -EINVAL;
+ }
+ nuke (ep, -ESHUTDOWN);
+
+#ifdef USE_DMA
+ if (ep->dma >= 0) {
+ *ep->reg_drcmr = 0;
+ pxa_free_dma (ep->dma);
+ ep->dma = -1;
+ }
+#endif
+
+ /* flush fifo (mostly for IN buffers) */
+ pxa2xx_ep_fifo_flush (_ep);
+
+ ep->desc = NULL;
+ ep->stopped = 1;
+
+ DBG(DBG_VERBOSE, "%s disabled\n", _ep->name);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* for the pxa2xx, these can just wrap kmalloc/kfree. gadget drivers
+ * must still pass correctly initialized endpoints, since other controller
+ * drivers may care about how it's currently set up (dma issues etc).
+ */
+
+/*
+ * pxa2xx_ep_alloc_request - allocate a request data structure
+ */
+static struct usb_request *
+pxa2xx_ep_alloc_request (struct usb_ep *_ep, int gfp_flags)
+{
+ struct pxa2xx_request *req;
+
+ req = kmalloc (sizeof *req, gfp_flags);
+ if (!req)
+ return NULL;
+
+ memset (req, 0, sizeof *req);
+ INIT_LIST_HEAD (&req->queue);
+ return &req->req;
+}
+
+
+/*
+ * pxa2xx_ep_free_request - deallocate a request data structure
+ */
+static void
+pxa2xx_ep_free_request (struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct pxa2xx_request *req;
+
+ req = container_of (_req, struct pxa2xx_request, req);
+ WARN_ON (!list_empty (&req->queue));
+ kfree(req);
+}
+
+
+/* PXA cache needs flushing with DMA I/O (it's dma-incoherent), but there's
+ * no device-affinity and the heap works perfectly well for i/o buffers.
+ * It wastes much less memory than dma_alloc_coherent() would, and even
+ * prevents cacheline (32 bytes wide) sharing problems.
+ */
+static void *
+pxa2xx_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes,
+ dma_addr_t *dma, int gfp_flags)
+{
+ char *retval;
+
+ retval = kmalloc (bytes, gfp_flags & ~(__GFP_DMA|__GFP_HIGHMEM));
+ if (retval)
+#ifdef USE_DMA
+ *dma = virt_to_bus (retval);
+#else
+ *dma = (dma_addr_t)~0;
+#endif
+ return retval;
+}
+
+static void
+pxa2xx_ep_free_buffer(struct usb_ep *_ep, void *buf, dma_addr_t dma,
+ unsigned bytes)
+{
+ kfree (buf);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * done - retire a request; caller blocked irqs
+ */
+static void done(struct pxa2xx_ep *ep, struct pxa2xx_request *req, int status)
+{
+ unsigned stopped = ep->stopped;
+
+ list_del_init(&req->queue);
+
+ if (likely (req->req.status == -EINPROGRESS))
+ req->req.status = status;
+ else
+ status = req->req.status;
+
+ if (status && status != -ESHUTDOWN)
+ DBG(DBG_VERBOSE, "complete %s req %p stat %d len %u/%u\n",
+ ep->ep.name, &req->req, status,
+ req->req.actual, req->req.length);
+
+ /* don't modify queue heads during completion callback */
+ ep->stopped = 1;
+ req->req.complete(&ep->ep, &req->req);
+ ep->stopped = stopped;
+}
+
+
+static inline void ep0_idle (struct pxa2xx_udc *dev)
+{
+ dev->ep0state = EP0_IDLE;
+}
+
+static int
+write_packet(volatile u32 *uddr, struct pxa2xx_request *req, unsigned max)
+{
+ u8 *buf;
+ unsigned length, count;
+
+ buf = req->req.buf + req->req.actual;
+ prefetch(buf);
+
+ /* how big will this packet be? */
+ length = min(req->req.length - req->req.actual, max);
+ req->req.actual += length;
+
+ count = length;
+ while (likely(count--))
+ *uddr = *buf++;
+
+ return length;
+}
+
+/*
+ * write to an IN endpoint fifo, as many packets as possible.
+ * irqs will use this to write the rest later.
+ * caller guarantees at least one packet buffer is ready (or a zlp).
+ */
+static int
+write_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
+{
+ unsigned max;
+
+ max = le16_to_cpu(ep->desc->wMaxPacketSize);
+ do {
+ unsigned count;
+ int is_last, is_short;
+
+ count = write_packet(ep->reg_uddr, req, max);
+
+ /* last packet is usually short (or a zlp) */
+ if (unlikely (count != max))
+ is_last = is_short = 1;
+ else {
+ if (likely(req->req.length != req->req.actual)
+ || req->req.zero)
+ is_last = 0;
+ else
+ is_last = 1;
+ /* interrupt/iso maxpacket may not fill the fifo */
+ is_short = unlikely (max < ep->fifo_size);
+ }
+
+ DBG(DBG_VERY_NOISY, "wrote %s %d bytes%s%s %d left %p\n",
+ ep->ep.name, count,
+ is_last ? "/L" : "", is_short ? "/S" : "",
+ req->req.length - req->req.actual, req);
+
+ /* let loose that packet. maybe try writing another one,
+ * double buffering might work. TSP, TPC, and TFS
+ * bit values are the same for all normal IN endpoints.
+ */
+ *ep->reg_udccs = UDCCS_BI_TPC;
+ if (is_short)
+ *ep->reg_udccs = UDCCS_BI_TSP;
+
+ /* requests complete when all IN data is in the FIFO */
+ if (is_last) {
+ done (ep, req, 0);
+ if (list_empty(&ep->queue) || unlikely(ep->dma >= 0)) {
+ pio_irq_disable (ep->bEndpointAddress);
+#ifdef USE_DMA
+ /* unaligned data and zlps couldn't use dma */
+ if (unlikely(!list_empty(&ep->queue))) {
+ req = list_entry(ep->queue.next,
+ struct pxa2xx_request, queue);
+ kick_dma(ep,req);
+ return 0;
+ }
+#endif
+ }
+ return 1;
+ }
+
+ // TODO experiment: how robust can fifo mode tweaking be?
+ // double buffering is off in the default fifo mode, which
+ // prevents TFS from being set here.
+
+ } while (*ep->reg_udccs & UDCCS_BI_TFS);
+ return 0;
+}
+
+/* caller asserts req->pending (ep0 irq status nyet cleared); starts
+ * ep0 data stage. these chips want very simple state transitions.
+ */
+static inline
+void ep0start(struct pxa2xx_udc *dev, u32 flags, const char *tag)
+{
+ UDCCS0 = flags|UDCCS0_SA|UDCCS0_OPR;
+ USIR0 = USIR0_IR0;
+ dev->req_pending = 0;
+ DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n",
+ __FUNCTION__, tag, UDCCS0, flags);
+}
+
+static int
+write_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
+{
+ unsigned count;
+ int is_short;
+
+ count = write_packet(&UDDR0, req, EP0_FIFO_SIZE);
+ ep->dev->stats.write.bytes += count;
+
+ /* last packet "must be" short (or a zlp) */
+ is_short = (count != EP0_FIFO_SIZE);
+
+ DBG(DBG_VERY_NOISY, "ep0in %d bytes %d left %p\n", count,
+ req->req.length - req->req.actual, req);
+
+ if (unlikely (is_short)) {
+ if (ep->dev->req_pending)
+ ep0start(ep->dev, UDCCS0_IPR, "short IN");
+ else
+ UDCCS0 = UDCCS0_IPR;
+
+ count = req->req.length;
+ done (ep, req, 0);
+ ep0_idle(ep->dev);
+#if 1
+ /* This seems to get rid of lost status irqs in some cases:
+ * host responds quickly, or next request involves config
+ * change automagic, or should have been hidden, or ...
+ *
+ * FIXME get rid of all udelays possible...
+ */
+ if (count >= EP0_FIFO_SIZE) {
+ count = 100;
+ do {
+ if ((UDCCS0 & UDCCS0_OPR) != 0) {
+ /* clear OPR, generate ack */
+ UDCCS0 = UDCCS0_OPR;
+ break;
+ }
+ count--;
+ udelay(1);
+ } while (count);
+ }
+#endif
+ } else if (ep->dev->req_pending)
+ ep0start(ep->dev, 0, "IN");
+ return is_short;
+}
+
+
+/*
+ * read_fifo - unload packet(s) from the fifo we use for usb OUT
+ * transfers and put them into the request. caller should have made
+ * sure there's at least one packet ready.
+ *
+ * returns true if the request completed because of short packet or the
+ * request buffer having filled (and maybe overran till end-of-packet).
+ */
+static int
+read_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
+{
+ for (;;) {
+ u32 udccs;
+ u8 *buf;
+ unsigned bufferspace, count, is_short;
+
+ /* make sure there's a packet in the FIFO.
+ * UDCCS_{BO,IO}_RPC are all the same bit value.
+ * UDCCS_{BO,IO}_RNE are all the same bit value.
+ */
+ udccs = *ep->reg_udccs;
+ if (unlikely ((udccs & UDCCS_BO_RPC) == 0))
+ break;
+ buf = req->req.buf + req->req.actual;
+ prefetchw(buf);
+ bufferspace = req->req.length - req->req.actual;
+
+ /* read all bytes from this packet */
+ if (likely (udccs & UDCCS_BO_RNE)) {
+ count = 1 + (0x0ff & *ep->reg_ubcr);
+ req->req.actual += min (count, bufferspace);
+ } else /* zlp */
+ count = 0;
+ is_short = (count < ep->ep.maxpacket);
+ DBG(DBG_VERY_NOISY, "read %s %02x, %d bytes%s req %p %d/%d\n",
+ ep->ep.name, udccs, count,
+ is_short ? "/S" : "",
+ req, req->req.actual, req->req.length);
+ while (likely (count-- != 0)) {
+ u8 byte = (u8) *ep->reg_uddr;
+
+ if (unlikely (bufferspace == 0)) {
+ /* this happens when the driver's buffer
+ * is smaller than what the host sent.
+ * discard the extra data.
+ */
+ if (req->req.status != -EOVERFLOW)
+ DMSG("%s overflow %d\n",
+ ep->ep.name, count);
+ req->req.status = -EOVERFLOW;
+ } else {
+ *buf++ = byte;
+ bufferspace--;
+ }
+ }
+ *ep->reg_udccs = UDCCS_BO_RPC;
+ /* RPC/RSP/RNE could now reflect the other packet buffer */
+
+ /* iso is one request per packet */
+ if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
+ if (udccs & UDCCS_IO_ROF)
+ req->req.status = -EHOSTUNREACH;
+ /* more like "is_done" */
+ is_short = 1;
+ }
+
+ /* completion */
+ if (is_short || req->req.actual == req->req.length) {
+ done (ep, req, 0);
+ if (list_empty(&ep->queue))
+ pio_irq_disable (ep->bEndpointAddress);
+ return 1;
+ }
+
+ /* finished that packet. the next one may be waiting... */
+ }
+ return 0;
+}
+
+/*
+ * special ep0 version of the above. no UBCR0 or double buffering; status
+ * handshaking is magic. most device protocols don't need control-OUT.
+ * CDC vendor commands (and RNDIS), mass storage CB/CBI, and some other
+ * protocols do use them.
+ */
+static int
+read_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
+{
+ u8 *buf, byte;
+ unsigned bufferspace;
+
+ buf = req->req.buf + req->req.actual;
+ bufferspace = req->req.length - req->req.actual;
+
+ while (UDCCS0 & UDCCS0_RNE) {
+ byte = (u8) UDDR0;
+
+ if (unlikely (bufferspace == 0)) {
+ /* this happens when the driver's buffer
+ * is smaller than what the host sent.
+ * discard the extra data.
+ */
+ if (req->req.status != -EOVERFLOW)
+ DMSG("%s overflow\n", ep->ep.name);
+ req->req.status = -EOVERFLOW;
+ } else {
+ *buf++ = byte;
+ req->req.actual++;
+ bufferspace--;
+ }
+ }
+
+ UDCCS0 = UDCCS0_OPR | UDCCS0_IPR;
+
+ /* completion */
+ if (req->req.actual >= req->req.length)
+ return 1;
+
+ /* finished that packet. the next one may be waiting... */
+ return 0;
+}
+
+#ifdef USE_DMA
+
+#define MAX_IN_DMA ((DCMD_LENGTH + 1) - BULK_FIFO_SIZE)
+
+static void
+start_dma_nodesc(struct pxa2xx_ep *ep, struct pxa2xx_request *req, int is_in)
+{
+ u32 dcmd = req->req.length;
+ u32 buf = req->req.dma;
+ u32 fifo = io_v2p ((u32)ep->reg_uddr);
+
+ /* caller guarantees there's a packet or more remaining
+ * - IN may end with a short packet (TSP set separately),
+ * - OUT is always full length
+ */
+ buf += req->req.actual;
+ dcmd -= req->req.actual;
+ ep->dma_fixup = 0;
+
+ /* no-descriptor mode can be simple for bulk-in, iso-in, iso-out */
+ DCSR(ep->dma) = DCSR_NODESC;
+ if (is_in) {
+ DSADR(ep->dma) = buf;
+ DTADR(ep->dma) = fifo;
+ if (dcmd > MAX_IN_DMA)
+ dcmd = MAX_IN_DMA;
+ else
+ ep->dma_fixup = (dcmd % ep->ep.maxpacket) != 0;
+ dcmd |= DCMD_BURST32 | DCMD_WIDTH1
+ | DCMD_FLOWTRG | DCMD_INCSRCADDR;
+ } else {
+#ifdef USE_OUT_DMA
+ DSADR(ep->dma) = fifo;
+ DTADR(ep->dma) = buf;
+ if (ep->bmAttributes != USB_ENDPOINT_XFER_ISOC)
+ dcmd = ep->ep.maxpacket;
+ dcmd |= DCMD_BURST32 | DCMD_WIDTH1
+ | DCMD_FLOWSRC | DCMD_INCTRGADDR;
+#endif
+ }
+ DCMD(ep->dma) = dcmd;
+ DCSR(ep->dma) = DCSR_RUN | DCSR_NODESC
+ | (unlikely(is_in)
+ ? DCSR_STOPIRQEN /* use dma_nodesc_handler() */
+ : 0); /* use handle_ep() */
+}
+
+static void kick_dma(struct pxa2xx_ep *ep, struct pxa2xx_request *req)
+{
+ int is_in = ep->bEndpointAddress & USB_DIR_IN;
+
+ if (is_in) {
+ /* unaligned tx buffers and zlps only work with PIO */
+ if ((req->req.dma & 0x0f) != 0
+ || unlikely((req->req.length - req->req.actual)
+ == 0)) {
+ pio_irq_enable(ep->bEndpointAddress);
+ if ((*ep->reg_udccs & UDCCS_BI_TFS) != 0)
+ (void) write_fifo(ep, req);
+ } else {
+ start_dma_nodesc(ep, req, USB_DIR_IN);
+ }
+ } else {
+ if ((req->req.length - req->req.actual) < ep->ep.maxpacket) {
+ DMSG("%s short dma read...\n", ep->ep.name);
+ /* we're always set up for pio out */
+ read_fifo (ep, req);
+ } else {
+ *ep->reg_udccs = UDCCS_BO_DME
+ | (*ep->reg_udccs & UDCCS_BO_FST);
+ start_dma_nodesc(ep, req, USB_DIR_OUT);
+ }
+ }
+}
+
+static void cancel_dma(struct pxa2xx_ep *ep)
+{
+ struct pxa2xx_request *req;
+ u32 tmp;
+
+ if (DCSR(ep->dma) == 0 || list_empty(&ep->queue))
+ return;
+
+ DCSR(ep->dma) = 0;
+ while ((DCSR(ep->dma) & DCSR_STOPSTATE) == 0)
+ cpu_relax();
+
+ req = list_entry(ep->queue.next, struct pxa2xx_request, queue);
+ tmp = DCMD(ep->dma) & DCMD_LENGTH;
+ req->req.actual = req->req.length - (tmp & DCMD_LENGTH);
+
+ /* the last tx packet may be incomplete, so flush the fifo.
+ * FIXME correct req.actual if we can
+ */
+ if (ep->bEndpointAddress & USB_DIR_IN)
+ *ep->reg_udccs = UDCCS_BI_FTF;
+}
+
+/* dma channel stopped ... normal tx end (IN), or on error (IN/OUT) */
+static void dma_nodesc_handler(int dmach, void *_ep, struct pt_regs *r)
+{
+ struct pxa2xx_ep *ep = _ep;
+ struct pxa2xx_request *req;
+ u32 tmp, completed;
+
+ local_irq_disable();
+
+ req = list_entry(ep->queue.next, struct pxa2xx_request, queue);
+
+ ep->dma_irqs++;
+ ep->dev->stats.irqs++;
+ HEX_DISPLAY(ep->dev->stats.irqs);
+
+ /* ack/clear */
+ tmp = DCSR(ep->dma);
+ DCSR(ep->dma) = tmp;
+ if ((tmp & DCSR_STOPSTATE) == 0
+ || (DDADR(ep->dma) & DDADR_STOP) != 0) {
+ DBG(DBG_VERBOSE, "%s, dcsr %08x ddadr %08x\n",
+ ep->ep.name, DCSR(ep->dma), DDADR(ep->dma));
+ goto done;
+ }
+ DCSR(ep->dma) = 0; /* clear DCSR_STOPSTATE */
+
+ /* update transfer status */
+ completed = tmp & DCSR_BUSERR;
+ if (ep->bEndpointAddress & USB_DIR_IN)
+ tmp = DSADR(ep->dma);
+ else
+ tmp = DTADR(ep->dma);
+ req->req.actual = tmp - req->req.dma;
+
+ /* FIXME seems we sometimes see partial transfers... */
+
+ if (unlikely(completed != 0))
+ req->req.status = -EIO;
+ else if (req->req.actual) {
+ /* these registers have zeroes in low bits; they miscount
+ * some (end-of-transfer) short packets: tx 14 as tx 12
+ */
+ if (ep->dma_fixup)
+ req->req.actual = min(req->req.actual + 3,
+ req->req.length);
+
+ tmp = (req->req.length - req->req.actual);
+ completed = (tmp == 0);
+ if (completed && (ep->bEndpointAddress & USB_DIR_IN)) {
+
+ /* maybe validate final short packet ... */
+ if ((req->req.actual % ep->ep.maxpacket) != 0)
+ *ep->reg_udccs = UDCCS_BI_TSP/*|UDCCS_BI_TPC*/;
+
+ /* ... or zlp, using pio fallback */
+ else if (ep->bmAttributes == USB_ENDPOINT_XFER_BULK
+ && req->req.zero) {
+ DMSG("%s zlp terminate ...\n", ep->ep.name);
+ completed = 0;
+ }
+ }
+ }
+
+ if (likely(completed)) {
+ done(ep, req, 0);
+
+ /* maybe re-activate after completion */
+ if (ep->stopped || list_empty(&ep->queue))
+ goto done;
+ req = list_entry(ep->queue.next, struct pxa2xx_request, queue);
+ }
+ kick_dma(ep, req);
+done:
+ local_irq_enable();
+}
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static int
+pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags)
+{
+ struct pxa2xx_request *req;
+ struct pxa2xx_ep *ep;
+ struct pxa2xx_udc *dev;
+ unsigned long flags;
+
+ req = container_of(_req, struct pxa2xx_request, req);
+ if (unlikely (!_req || !_req->complete || !_req->buf
+ || !list_empty(&req->queue))) {
+ DMSG("%s, bad params\n", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ ep = container_of(_ep, struct pxa2xx_ep, ep);
+ if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) {
+ DMSG("%s, bad ep\n", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ dev = ep->dev;
+ if (unlikely (!dev->driver
+ || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
+ DMSG("%s, bogus device state\n", __FUNCTION__);
+ return -ESHUTDOWN;
+ }
+
+ /* iso is always one packet per request, that's the only way
+ * we can report per-packet status. that also helps with dma.
+ */
+ if (unlikely (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC
+ && req->req.length > le16_to_cpu
+ (ep->desc->wMaxPacketSize)))
+ return -EMSGSIZE;
+
+#ifdef USE_DMA
+ // FIXME caller may already have done the dma mapping
+ if (ep->dma >= 0) {
+ _req->dma = dma_map_single(dev->dev,
+ _req->buf, _req->length,
+ ((ep->bEndpointAddress & USB_DIR_IN) != 0)
+ ? DMA_TO_DEVICE
+ : DMA_FROM_DEVICE);
+ }
+#endif
+
+ DBG(DBG_NOISY, "%s queue req %p, len %d buf %p\n",
+ _ep->name, _req, _req->length, _req->buf);
+
+ local_irq_save(flags);
+
+ _req->status = -EINPROGRESS;
+ _req->actual = 0;
+
+ /* kickstart this i/o queue? */
+ if (list_empty(&ep->queue) && !ep->stopped) {
+ if (ep->desc == 0 /* ep0 */) {
+ unsigned length = _req->length;
+
+ switch (dev->ep0state) {
+ case EP0_IN_DATA_PHASE:
+ dev->stats.write.ops++;
+ if (write_ep0_fifo(ep, req))
+ req = NULL;
+ break;
+
+ case EP0_OUT_DATA_PHASE:
+ dev->stats.read.ops++;
+ /* messy ... */
+ if (dev->req_config) {
+ DBG(DBG_VERBOSE, "ep0 config ack%s\n",
+ dev->has_cfr ? "" : " raced");
+ if (dev->has_cfr)
+ UDCCFR = UDCCFR_AREN|UDCCFR_ACM
+ |UDCCFR_MB1;
+ done(ep, req, 0);
+ dev->ep0state = EP0_END_XFER;
+ local_irq_restore (flags);
+ return 0;
+ }
+ if (dev->req_pending)
+ ep0start(dev, UDCCS0_IPR, "OUT");
+ if (length == 0 || ((UDCCS0 & UDCCS0_RNE) != 0
+ && read_ep0_fifo(ep, req))) {
+ ep0_idle(dev);
+ done(ep, req, 0);
+ req = NULL;
+ }
+ break;
+
+ default:
+ DMSG("ep0 i/o, odd state %d\n", dev->ep0state);
+ local_irq_restore (flags);
+ return -EL2HLT;
+ }
+#ifdef USE_DMA
+ /* either start dma or prime pio pump */
+ } else if (ep->dma >= 0) {
+ kick_dma(ep, req);
+#endif
+ /* can the FIFO can satisfy the request immediately? */
+ } else if ((ep->bEndpointAddress & USB_DIR_IN) != 0
+ && (*ep->reg_udccs & UDCCS_BI_TFS) != 0
+ && write_fifo(ep, req)) {
+ req = NULL;
+ } else if ((*ep->reg_udccs & UDCCS_BO_RFS) != 0
+ && read_fifo(ep, req)) {
+ req = NULL;
+ }
+
+ if (likely (req && ep->desc) && ep->dma < 0)
+ pio_irq_enable(ep->bEndpointAddress);
+ }
+
+ /* pio or dma irq handler advances the queue. */
+ if (likely (req != 0))
+ list_add_tail(&req->queue, &ep->queue);
+ local_irq_restore(flags);
+
+ return 0;
+}
+
+
+/*
+ * nuke - dequeue ALL requests
+ */
+static void nuke(struct pxa2xx_ep *ep, int status)
+{
+ struct pxa2xx_request *req;
+
+ /* called with irqs blocked */
+#ifdef USE_DMA
+ if (ep->dma >= 0 && !ep->stopped)
+ cancel_dma(ep);
+#endif
+ while (!list_empty(&ep->queue)) {
+ req = list_entry(ep->queue.next,
+ struct pxa2xx_request,
+ queue);
+ done(ep, req, status);
+ }
+ if (ep->desc)
+ pio_irq_disable (ep->bEndpointAddress);
+}
+
+
+/* dequeue JUST ONE request */
+static int pxa2xx_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
+{
+ struct pxa2xx_ep *ep;
+ struct pxa2xx_request *req;
+ unsigned long flags;
+
+ ep = container_of(_ep, struct pxa2xx_ep, ep);
+ if (!_ep || ep->ep.name == ep0name)
+ return -EINVAL;
+
+ local_irq_save(flags);
+
+ /* make sure it's actually queued on this endpoint */
+ list_for_each_entry (req, &ep->queue, queue) {
+ if (&req->req == _req)
+ break;
+ }
+ if (&req->req != _req) {
+ local_irq_restore(flags);
+ return -EINVAL;
+ }
+
+#ifdef USE_DMA
+ if (ep->dma >= 0 && ep->queue.next == &req->queue && !ep->stopped) {
+ cancel_dma(ep);
+ done(ep, req, -ECONNRESET);
+ /* restart i/o */
+ if (!list_empty(&ep->queue)) {
+ req = list_entry(ep->queue.next,
+ struct pxa2xx_request, queue);
+ kick_dma(ep, req);
+ }
+ } else
+#endif
+ done(ep, req, -ECONNRESET);
+
+ local_irq_restore(flags);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int pxa2xx_ep_set_halt(struct usb_ep *_ep, int value)
+{
+ struct pxa2xx_ep *ep;
+ unsigned long flags;
+
+ ep = container_of(_ep, struct pxa2xx_ep, ep);
+ if (unlikely (!_ep
+ || (!ep->desc && ep->ep.name != ep0name))
+ || ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
+ DMSG("%s, bad ep\n", __FUNCTION__);
+ return -EINVAL;
+ }
+ if (value == 0) {
+ /* this path (reset toggle+halt) is needed to implement
+ * SET_INTERFACE on normal hardware. but it can't be
+ * done from software on the PXA UDC, and the hardware
+ * forgets to do it as part of SET_INTERFACE automagic.
+ */
+ DMSG("only host can clear %s halt\n", _ep->name);
+ return -EROFS;
+ }
+
+ local_irq_save(flags);
+
+ if ((ep->bEndpointAddress & USB_DIR_IN) != 0
+ && ((*ep->reg_udccs & UDCCS_BI_TFS) == 0
+ || !list_empty(&ep->queue))) {
+ local_irq_restore(flags);
+ return -EAGAIN;
+ }
+
+ /* FST bit is the same for control, bulk in, bulk out, interrupt in */
+ *ep->reg_udccs = UDCCS_BI_FST|UDCCS_BI_FTF;
+
+ /* ep0 needs special care */
+ if (!ep->desc) {
+ start_watchdog(ep->dev);
+ ep->dev->req_pending = 0;
+ ep->dev->ep0state = EP0_STALL;
+
+ /* and bulk/intr endpoints like dropping stalls too */
+ } else {
+ unsigned i;
+ for (i = 0; i < 1000; i += 20) {
+ if (*ep->reg_udccs & UDCCS_BI_SST)
+ break;
+ udelay(20);
+ }
+ }
+ local_irq_restore(flags);
+
+ DBG(DBG_VERBOSE, "%s halt\n", _ep->name);
+ return 0;
+}
+
+static int pxa2xx_ep_fifo_status(struct usb_ep *_ep)
+{
+ struct pxa2xx_ep *ep;
+
+ ep = container_of(_ep, struct pxa2xx_ep, ep);
+ if (!_ep) {
+ DMSG("%s, bad ep\n", __FUNCTION__);
+ return -ENODEV;
+ }
+ /* pxa can't report unclaimed bytes from IN fifos */
+ if ((ep->bEndpointAddress & USB_DIR_IN) != 0)
+ return -EOPNOTSUPP;
+ if (ep->dev->gadget.speed == USB_SPEED_UNKNOWN
+ || (*ep->reg_udccs & UDCCS_BO_RFS) == 0)
+ return 0;
+ else
+ return (*ep->reg_ubcr & 0xfff) + 1;
+}
+
+static void pxa2xx_ep_fifo_flush(struct usb_ep *_ep)
+{
+ struct pxa2xx_ep *ep;
+
+ ep = container_of(_ep, struct pxa2xx_ep, ep);
+ if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) {
+ DMSG("%s, bad ep\n", __FUNCTION__);
+ return;
+ }
+
+ /* toggle and halt bits stay unchanged */
+
+ /* for OUT, just read and discard the FIFO contents. */
+ if ((ep->bEndpointAddress & USB_DIR_IN) == 0) {
+ while (((*ep->reg_udccs) & UDCCS_BO_RNE) != 0)
+ (void) *ep->reg_uddr;
+ return;
+ }
+
+ /* most IN status is the same, but ISO can't stall */
+ *ep->reg_udccs = UDCCS_BI_TPC|UDCCS_BI_FTF|UDCCS_BI_TUR
+ | (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC)
+ ? 0 : UDCCS_BI_SST;
+}
+
+
+static struct usb_ep_ops pxa2xx_ep_ops = {
+ .enable = pxa2xx_ep_enable,
+ .disable = pxa2xx_ep_disable,
+
+ .alloc_request = pxa2xx_ep_alloc_request,
+ .free_request = pxa2xx_ep_free_request,
+
+ .alloc_buffer = pxa2xx_ep_alloc_buffer,
+ .free_buffer = pxa2xx_ep_free_buffer,
+
+ .queue = pxa2xx_ep_queue,
+ .dequeue = pxa2xx_ep_dequeue,
+
+ .set_halt = pxa2xx_ep_set_halt,
+ .fifo_status = pxa2xx_ep_fifo_status,
+ .fifo_flush = pxa2xx_ep_fifo_flush,
+};
+
+
+/* ---------------------------------------------------------------------------
+ * device-scoped parts of the api to the usb controller hardware
+ * ---------------------------------------------------------------------------
+ */
+
+static int pxa2xx_udc_get_frame(struct usb_gadget *_gadget)
+{
+ return ((UFNRH & 0x07) << 8) | (UFNRL & 0xff);
+}
+
+static int pxa2xx_udc_wakeup(struct usb_gadget *_gadget)
+{
+ /* host may not have enabled remote wakeup */
+ if ((UDCCS0 & UDCCS0_DRWF) == 0)
+ return -EHOSTUNREACH;
+ udc_set_mask_UDCCR(UDCCR_RSM);
+ return 0;
+}
+
+static void stop_activity(struct pxa2xx_udc *, struct usb_gadget_driver *);
+static void udc_enable (struct pxa2xx_udc *);
+static void udc_disable(struct pxa2xx_udc *);
+
+/* We disable the UDC -- and its 48 MHz clock -- whenever it's not
+ * in active use.
+ */
+static int pullup(struct pxa2xx_udc *udc, int is_active)
+{
+ is_active = is_active && udc->vbus && udc->pullup;
+ DMSG("%s\n", is_active ? "active" : "inactive");
+ if (is_active)
+ udc_enable(udc);
+ else {
+ if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
+ DMSG("disconnect %s\n", udc->driver
+ ? udc->driver->driver.name
+ : "(no driver)");
+ stop_activity(udc, udc->driver);
+ }
+ udc_disable(udc);
+ }
+ return 0;
+}
+
+/* VBUS reporting logically comes from a transceiver */
+static int pxa2xx_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
+{
+ struct pxa2xx_udc *udc;
+
+ udc = container_of(_gadget, struct pxa2xx_udc, gadget);
+ udc->vbus = is_active = (is_active != 0);
+ DMSG("vbus %s\n", is_active ? "supplied" : "inactive");
+ pullup(udc, is_active);
+ return 0;
+}
+
+/* drivers may have software control over D+ pullup */
+static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active)
+{
+ struct pxa2xx_udc *udc;
+
+ udc = container_of(_gadget, struct pxa2xx_udc, gadget);
+
+ /* not all boards support pullup control */
+ if (!udc->mach->udc_command)
+ return -EOPNOTSUPP;
+
+ is_active = (is_active != 0);
+ udc->pullup = is_active;
+ pullup(udc, is_active);
+ return 0;
+}
+
+static const struct usb_gadget_ops pxa2xx_udc_ops = {
+ .get_frame = pxa2xx_udc_get_frame,
+ .wakeup = pxa2xx_udc_wakeup,
+ .vbus_session = pxa2xx_udc_vbus_session,
+ .pullup = pxa2xx_udc_pullup,
+
+ // .vbus_draw ... boards may consume current from VBUS, up to
+ // 100-500mA based on config. the 500uA suspend ceiling means
+ // that exclusively vbus-powered PXA designs violate USB specs.
+};
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+
+static const char proc_node_name [] = "driver/udc";
+
+static int
+udc_proc_read(char *page, char **start, off_t off, int count,
+ int *eof, void *_dev)
+{
+ char *buf = page;
+ struct pxa2xx_udc *dev = _dev;
+ char *next = buf;
+ unsigned size = count;
+ unsigned long flags;
+ int i, t;
+ u32 tmp;
+
+ if (off != 0)
+ return 0;
+
+ local_irq_save(flags);
+
+ /* basic device status */
+ t = scnprintf(next, size, DRIVER_DESC "\n"
+ "%s version: %s\nGadget driver: %s\nHost %s\n\n",
+ driver_name, DRIVER_VERSION SIZE_STR DMASTR,
+ dev->driver ? dev->driver->driver.name : "(none)",
+ is_usb_connected() ? "full speed" : "disconnected");
+ size -= t;
+ next += t;
+
+ /* registers for device and ep0 */
+ t = scnprintf(next, size,
+ "uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n",
+ UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL);
+ size -= t;
+ next += t;
+
+ tmp = UDCCR;
+ t = scnprintf(next, size,
+ "udccr %02X =%s%s%s%s%s%s%s%s\n", tmp,
+ (tmp & UDCCR_REM) ? " rem" : "",
+ (tmp & UDCCR_RSTIR) ? " rstir" : "",
+ (tmp & UDCCR_SRM) ? " srm" : "",
+ (tmp & UDCCR_SUSIR) ? " susir" : "",
+ (tmp & UDCCR_RESIR) ? " resir" : "",
+ (tmp & UDCCR_RSM) ? " rsm" : "",
+ (tmp & UDCCR_UDA) ? " uda" : "",
+ (tmp & UDCCR_UDE) ? " ude" : "");
+ size -= t;
+ next += t;
+
+ tmp = UDCCS0;
+ t = scnprintf(next, size,
+ "udccs0 %02X =%s%s%s%s%s%s%s%s\n", tmp,
+ (tmp & UDCCS0_SA) ? " sa" : "",
+ (tmp & UDCCS0_RNE) ? " rne" : "",
+ (tmp & UDCCS0_FST) ? " fst" : "",
+ (tmp & UDCCS0_SST) ? " sst" : "",
+ (tmp & UDCCS0_DRWF) ? " dwrf" : "",
+ (tmp & UDCCS0_FTF) ? " ftf" : "",
+ (tmp & UDCCS0_IPR) ? " ipr" : "",
+ (tmp & UDCCS0_OPR) ? " opr" : "");
+ size -= t;
+ next += t;
+
+ if (dev->has_cfr) {
+ tmp = UDCCFR;
+ t = scnprintf(next, size,
+ "udccfr %02X =%s%s\n", tmp,
+ (tmp & UDCCFR_AREN) ? " aren" : "",
+ (tmp & UDCCFR_ACM) ? " acm" : "");
+ size -= t;
+ next += t;
+ }
+
+ if (!is_usb_connected() || !dev->driver)
+ goto done;
+
+ t = scnprintf(next, size, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n",
+ dev->stats.write.bytes, dev->stats.write.ops,
+ dev->stats.read.bytes, dev->stats.read.ops,
+ dev->stats.irqs);
+ size -= t;
+ next += t;
+
+ /* dump endpoint queues */
+ for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) {
+ struct pxa2xx_ep *ep = &dev->ep [i];
+ struct pxa2xx_request *req;
+ int t;
+
+ if (i != 0) {
+ const struct usb_endpoint_descriptor *d;
+
+ d = ep->desc;
+ if (!d)
+ continue;
+ tmp = *dev->ep [i].reg_udccs;
+ t = scnprintf(next, size,
+ "%s max %d %s udccs %02x irqs %lu/%lu\n",
+ ep->ep.name, le16_to_cpu (d->wMaxPacketSize),
+ (ep->dma >= 0) ? "dma" : "pio", tmp,
+ ep->pio_irqs, ep->dma_irqs);
+ /* TODO translate all five groups of udccs bits! */
+
+ } else /* ep0 should only have one transfer queued */
+ t = scnprintf(next, size, "ep0 max 16 pio irqs %lu\n",
+ ep->pio_irqs);
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+
+ if (list_empty(&ep->queue)) {
+ t = scnprintf(next, size, "\t(nothing queued)\n");
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+ continue;
+ }
+ list_for_each_entry(req, &ep->queue, queue) {
+#ifdef USE_DMA
+ if (ep->dma >= 0 && req->queue.prev == &ep->queue)
+ t = scnprintf(next, size,
+ "\treq %p len %d/%d "
+ "buf %p (dma%d dcmd %08x)\n",
+ &req->req, req->req.actual,
+ req->req.length, req->req.buf,
+ ep->dma, DCMD(ep->dma)
+ // low 13 bits == bytes-to-go
+ );
+ else
+#endif
+ t = scnprintf(next, size,
+ "\treq %p len %d/%d buf %p\n",
+ &req->req, req->req.actual,
+ req->req.length, req->req.buf);
+ if (t <= 0 || t > size)
+ goto done;
+ size -= t;
+ next += t;
+ }
+ }
+
+done:
+ local_irq_restore(flags);
+ *eof = 1;
+ return count - size;
+}
+
+#define create_proc_files() \
+ create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev)
+#define remove_proc_files() \
+ remove_proc_entry(proc_node_name, NULL)
+
+#else /* !CONFIG_USB_GADGET_DEBUG_FILES */
+
+#define create_proc_files() do {} while (0)
+#define remove_proc_files() do {} while (0)
+
+#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+/* "function" sysfs attribute */
+static ssize_t
+show_function (struct device *_dev, char *buf)
+{
+ struct pxa2xx_udc *dev = dev_get_drvdata (_dev);
+
+ if (!dev->driver
+ || !dev->driver->function
+ || strlen (dev->driver->function) > PAGE_SIZE)
+ return 0;
+ return scnprintf (buf, PAGE_SIZE, "%s\n", dev->driver->function);
+}
+static DEVICE_ATTR (function, S_IRUGO, show_function, NULL);
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * udc_disable - disable USB device controller
+ */
+static void udc_disable(struct pxa2xx_udc *dev)
+{
+ /* block all irqs */
+ udc_set_mask_UDCCR(UDCCR_SRM|UDCCR_REM);
+ UICR0 = UICR1 = 0xff;
+ UFNRH = UFNRH_SIM;
+
+ /* if hardware supports it, disconnect from usb */
+ make_usb_disappear();
+
+ udc_clear_mask_UDCCR(UDCCR_UDE);
+
+#ifdef CONFIG_ARCH_PXA
+ /* Disable clock for USB device */
+ pxa_set_cken(CKEN11_USB, 0);
+#endif
+
+ ep0_idle (dev);
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+ LED_CONNECTED_OFF;
+}
+
+
+/*
+ * udc_reinit - initialize software state
+ */
+static void udc_reinit(struct pxa2xx_udc *dev)
+{
+ u32 i;
+
+ /* device/ep0 records init */
+ INIT_LIST_HEAD (&dev->gadget.ep_list);
+ INIT_LIST_HEAD (&dev->gadget.ep0->ep_list);
+ dev->ep0state = EP0_IDLE;
+
+ /* basic endpoint records init */
+ for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) {
+ struct pxa2xx_ep *ep = &dev->ep[i];
+
+ if (i != 0)
+ list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list);
+
+ ep->desc = NULL;
+ ep->stopped = 0;
+ INIT_LIST_HEAD (&ep->queue);
+ ep->pio_irqs = ep->dma_irqs = 0;
+ }
+
+ /* the rest was statically initialized, and is read-only */
+}
+
+/* until it's enabled, this UDC should be completely invisible
+ * to any USB host.
+ */
+static void udc_enable (struct pxa2xx_udc *dev)
+{
+ udc_clear_mask_UDCCR(UDCCR_UDE);
+
+#ifdef CONFIG_ARCH_PXA
+ /* Enable clock for USB device */
+ pxa_set_cken(CKEN11_USB, 1);
+ udelay(5);
+#endif
+
+ /* try to clear these bits before we enable the udc */
+ udc_ack_int_UDCCR(UDCCR_SUSIR|/*UDCCR_RSTIR|*/UDCCR_RESIR);
+
+ ep0_idle(dev);
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+ dev->stats.irqs = 0;
+
+ /*
+ * sequence taken from chapter 12.5.10, PXA250 AppProcDevManual:
+ * - enable UDC
+ * - if RESET is already in progress, ack interrupt
+ * - unmask reset interrupt
+ */
+ udc_set_mask_UDCCR(UDCCR_UDE);
+ if (!(UDCCR & UDCCR_UDA))
+ udc_ack_int_UDCCR(UDCCR_RSTIR);
+
+ if (dev->has_cfr /* UDC_RES2 is defined */) {
+ /* pxa255 (a0+) can avoid a set_config race that could
+ * prevent gadget drivers from configuring correctly
+ */
+ UDCCFR = UDCCFR_ACM | UDCCFR_MB1;
+ } else {
+ /* "USB test mode" for pxa250 errata 40-42 (stepping a0, a1)
+ * which could result in missing packets and interrupts.
+ * supposedly one bit per endpoint, controlling whether it
+ * double buffers or not; ACM/AREN bits fit into the holes.
+ * zero bits (like USIR0_IRx) disable double buffering.
+ */
+ UDC_RES1 = 0x00;
+ UDC_RES2 = 0x00;
+ }
+
+#ifdef DISABLE_TEST_MODE
+ /* "test mode" seems to have become the default in later chip
+ * revs, preventing double buffering (and invalidating docs).
+ * this EXPERIMENT enables it for bulk endpoints by tweaking
+ * undefined/reserved register bits (that other drivers clear).
+ * Belcarra code comments noted this usage.
+ */
+ if (fifo_mode & 1) { /* IN endpoints */
+ UDC_RES1 |= USIR0_IR1|USIR0_IR6;
+ UDC_RES2 |= USIR1_IR11;
+ }
+ if (fifo_mode & 2) { /* OUT endpoints */
+ UDC_RES1 |= USIR0_IR2|USIR0_IR7;
+ UDC_RES2 |= USIR1_IR12;
+ }
+#endif
+
+ /* enable suspend/resume and reset irqs */
+ udc_clear_mask_UDCCR(UDCCR_SRM | UDCCR_REM);
+
+ /* enable ep0 irqs */
+ UICR0 &= ~UICR0_IM0;
+
+ /* if hardware supports it, pullup D+ and wait for reset */
+ let_usb_appear();
+}
+
+
+/* when a driver is successfully registered, it will receive
+ * control requests including set_configuration(), which enables
+ * non-control requests. then usb traffic follows until a
+ * disconnect is reported. then a host may connect again, or
+ * the driver might get unbound.
+ */
+int usb_gadget_register_driver(struct usb_gadget_driver *driver)
+{
+ struct pxa2xx_udc *dev = the_controller;
+ int retval;
+
+ if (!driver
+ || driver->speed != USB_SPEED_FULL
+ || !driver->bind
+ || !driver->unbind
+ || !driver->disconnect
+ || !driver->setup)
+ return -EINVAL;
+ if (!dev)
+ return -ENODEV;
+ if (dev->driver)
+ return -EBUSY;
+
+ /* first hook up the driver ... */
+ dev->driver = driver;
+ dev->gadget.dev.driver = &driver->driver;
+ dev->pullup = 1;
+
+ device_add (&dev->gadget.dev);
+ retval = driver->bind(&dev->gadget);
+ if (retval) {
+ DMSG("bind to driver %s --> error %d\n",
+ driver->driver.name, retval);
+ device_del (&dev->gadget.dev);
+
+ dev->driver = NULL;
+ dev->gadget.dev.driver = NULL;
+ return retval;
+ }
+ device_create_file(dev->dev, &dev_attr_function);
+
+ /* ... then enable host detection and ep0; and we're ready
+ * for set_configuration as well as eventual disconnect.
+ */
+ DMSG("registered gadget driver '%s'\n", driver->driver.name);
+ pullup(dev, 1);
+ dump_state(dev);
+ return 0;
+}
+EXPORT_SYMBOL(usb_gadget_register_driver);
+
+static void
+stop_activity(struct pxa2xx_udc *dev, struct usb_gadget_driver *driver)
+{
+ int i;
+
+ /* don't disconnect drivers more than once */
+ if (dev->gadget.speed == USB_SPEED_UNKNOWN)
+ driver = NULL;
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+
+ /* prevent new request submissions, kill any outstanding requests */
+ for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) {
+ struct pxa2xx_ep *ep = &dev->ep[i];
+
+ ep->stopped = 1;
+ nuke(ep, -ESHUTDOWN);
+ }
+ del_timer_sync(&dev->timer);
+
+ /* report disconnect; the driver is already quiesced */
+ LED_CONNECTED_OFF;
+ if (driver)
+ driver->disconnect(&dev->gadget);
+
+ /* re-init driver-visible data structures */
+ udc_reinit(dev);
+}
+
+int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
+{
+ struct pxa2xx_udc *dev = the_controller;
+
+ if (!dev)
+ return -ENODEV;
+ if (!driver || driver != dev->driver)
+ return -EINVAL;
+
+ local_irq_disable();
+ pullup(dev, 0);
+ stop_activity(dev, driver);
+ local_irq_enable();
+
+ driver->unbind(&dev->gadget);
+ dev->driver = NULL;
+
+ device_del (&dev->gadget.dev);
+ device_remove_file(dev->dev, &dev_attr_function);
+
+ DMSG("unregistered gadget driver '%s'\n", driver->driver.name);
+ dump_state(dev);
+ return 0;
+}
+EXPORT_SYMBOL(usb_gadget_unregister_driver);
+
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_ARCH_LUBBOCK
+
+/* Lubbock has separate connect and disconnect irqs. More typical designs
+ * use one GPIO as the VBUS IRQ, and another to control the D+ pullup.
+ */
+
+static irqreturn_t
+lubbock_vbus_irq(int irq, void *_dev, struct pt_regs *r)
+{
+ struct pxa2xx_udc *dev = _dev;
+ int vbus;
+
+ dev->stats.irqs++;
+ HEX_DISPLAY(dev->stats.irqs);
+ switch (irq) {
+ case LUBBOCK_USB_IRQ:
+ LED_CONNECTED_ON;
+ vbus = 1;
+ disable_irq(LUBBOCK_USB_IRQ);
+ enable_irq(LUBBOCK_USB_DISC_IRQ);
+ break;
+ case LUBBOCK_USB_DISC_IRQ:
+ LED_CONNECTED_OFF;
+ vbus = 0;
+ disable_irq(LUBBOCK_USB_DISC_IRQ);
+ enable_irq(LUBBOCK_USB_IRQ);
+ break;
+ default:
+ return IRQ_NONE;
+ }
+
+ pxa2xx_udc_vbus_session(&dev->gadget, vbus);
+ return IRQ_HANDLED;
+}
+
+#endif
+
+
+/*-------------------------------------------------------------------------*/
+
+static inline void clear_ep_state (struct pxa2xx_udc *dev)
+{
+ unsigned i;
+
+ /* hardware SET_{CONFIGURATION,INTERFACE} automagic resets endpoint
+ * fifos, and pending transactions mustn't be continued in any case.
+ */
+ for (i = 1; i < PXA_UDC_NUM_ENDPOINTS; i++)
+ nuke(&dev->ep[i], -ECONNABORTED);
+}
+
+static void udc_watchdog(unsigned long _dev)
+{
+ struct pxa2xx_udc *dev = (void *)_dev;
+
+ local_irq_disable();
+ if (dev->ep0state == EP0_STALL
+ && (UDCCS0 & UDCCS0_FST) == 0
+ && (UDCCS0 & UDCCS0_SST) == 0) {
+ UDCCS0 = UDCCS0_FST|UDCCS0_FTF;
+ DBG(DBG_VERBOSE, "ep0 re-stall\n");
+ start_watchdog(dev);
+ }
+ local_irq_enable();
+}
+
+static void handle_ep0 (struct pxa2xx_udc *dev)
+{
+ u32 udccs0 = UDCCS0;
+ struct pxa2xx_ep *ep = &dev->ep [0];
+ struct pxa2xx_request *req;
+ union {
+ struct usb_ctrlrequest r;
+ u8 raw [8];
+ u32 word [2];
+ } u;
+
+ if (list_empty(&ep->queue))
+ req = NULL;
+ else
+ req = list_entry(ep->queue.next, struct pxa2xx_request, queue);
+
+ /* clear stall status */
+ if (udccs0 & UDCCS0_SST) {
+ nuke(ep, -EPIPE);
+ UDCCS0 = UDCCS0_SST;
+ del_timer(&dev->timer);
+ ep0_idle(dev);
+ }
+
+ /* previous request unfinished? non-error iff back-to-back ... */
+ if ((udccs0 & UDCCS0_SA) != 0 && dev->ep0state != EP0_IDLE) {
+ nuke(ep, 0);
+ del_timer(&dev->timer);
+ ep0_idle(dev);
+ }
+
+ switch (dev->ep0state) {
+ case EP0_IDLE:
+ /* late-breaking status? */
+ udccs0 = UDCCS0;
+
+ /* start control request? */
+ if (likely((udccs0 & (UDCCS0_OPR|UDCCS0_SA|UDCCS0_RNE))
+ == (UDCCS0_OPR|UDCCS0_SA|UDCCS0_RNE))) {
+ int i;
+
+ nuke (ep, -EPROTO);
+
+ /* read SETUP packet */
+ for (i = 0; i < 8; i++) {
+ if (unlikely(!(UDCCS0 & UDCCS0_RNE))) {
+bad_setup:
+ DMSG("SETUP %d!\n", i);
+ goto stall;
+ }
+ u.raw [i] = (u8) UDDR0;
+ }
+ if (unlikely((UDCCS0 & UDCCS0_RNE) != 0))
+ goto bad_setup;
+
+got_setup:
+ DBG(DBG_VERBOSE, "SETUP %02x.%02x v%04x i%04x l%04x\n",
+ u.r.bRequestType, u.r.bRequest,
+ le16_to_cpu(u.r.wValue),
+ le16_to_cpu(u.r.wIndex),
+ le16_to_cpu(u.r.wLength));
+
+ /* cope with automagic for some standard requests. */
+ dev->req_std = (u.r.bRequestType & USB_TYPE_MASK)
+ == USB_TYPE_STANDARD;
+ dev->req_config = 0;
+ dev->req_pending = 1;
+ switch (u.r.bRequest) {
+ /* hardware restricts gadget drivers here! */
+ case USB_REQ_SET_CONFIGURATION:
+ if (u.r.bRequestType == USB_RECIP_DEVICE) {
+ /* reflect hardware's automagic
+ * up to the gadget driver.
+ */
+config_change:
+ dev->req_config = 1;
+ clear_ep_state(dev);
+ /* if !has_cfr, there's no synch
+ * else use AREN (later) not SA|OPR
+ * USIR0_IR0 acts edge sensitive
+ */
+ }
+ break;
+ /* ... and here, even more ... */
+ case USB_REQ_SET_INTERFACE:
+ if (u.r.bRequestType == USB_RECIP_INTERFACE) {
+ /* udc hardware is broken by design:
+ * - altsetting may only be zero;
+ * - hw resets all interfaces' eps;
+ * - ep reset doesn't include halt(?).
+ */
+ DMSG("broken set_interface (%d/%d)\n",
+ le16_to_cpu(u.r.wIndex),
+ le16_to_cpu(u.r.wValue));
+ goto config_change;
+ }
+ break;
+ /* hardware was supposed to hide this */
+ case USB_REQ_SET_ADDRESS:
+ if (u.r.bRequestType == USB_RECIP_DEVICE) {
+ ep0start(dev, 0, "address");
+ return;
+ }
+ break;
+ }
+
+ if (u.r.bRequestType & USB_DIR_IN)
+ dev->ep0state = EP0_IN_DATA_PHASE;
+ else
+ dev->ep0state = EP0_OUT_DATA_PHASE;
+
+ i = dev->driver->setup(&dev->gadget, &u.r);
+ if (i < 0) {
+ /* hardware automagic preventing STALL... */
+ if (dev->req_config) {
+ /* hardware sometimes neglects to tell
+ * tell us about config change events,
+ * so later ones may fail...
+ */
+ WARN("config change %02x fail %d?\n",
+ u.r.bRequest, i);
+ return;
+ /* TODO experiment: if has_cfr,
+ * hardware didn't ACK; maybe we
+ * could actually STALL!
+ */
+ }
+ DBG(DBG_VERBOSE, "protocol STALL, "
+ "%02x err %d\n", UDCCS0, i);
+stall:
+ /* the watchdog timer helps deal with cases
+ * where udc seems to clear FST wrongly, and
+ * then NAKs instead of STALLing.
+ */
+ ep0start(dev, UDCCS0_FST|UDCCS0_FTF, "stall");
+ start_watchdog(dev);
+ dev->ep0state = EP0_STALL;
+
+ /* deferred i/o == no response yet */
+ } else if (dev->req_pending) {
+ if (likely(dev->ep0state == EP0_IN_DATA_PHASE
+ || dev->req_std || u.r.wLength))
+ ep0start(dev, 0, "defer");
+ else
+ ep0start(dev, UDCCS0_IPR, "defer/IPR");
+ }
+
+ /* expect at least one data or status stage irq */
+ return;
+
+ } else if (likely((udccs0 & (UDCCS0_OPR|UDCCS0_SA))
+ == (UDCCS0_OPR|UDCCS0_SA))) {
+ unsigned i;
+
+ /* pxa210/250 erratum 131 for B0/B1 says RNE lies.
+ * still observed on a pxa255 a0.
+ */
+ DBG(DBG_VERBOSE, "e131\n");
+ nuke(ep, -EPROTO);
+
+ /* read SETUP data, but don't trust it too much */
+ for (i = 0; i < 8; i++)
+ u.raw [i] = (u8) UDDR0;
+ if ((u.r.bRequestType & USB_RECIP_MASK)
+ > USB_RECIP_OTHER)
+ goto stall;
+ if (u.word [0] == 0 && u.word [1] == 0)
+ goto stall;
+ goto got_setup;
+ } else {
+ /* some random early IRQ:
+ * - we acked FST
+ * - IPR cleared
+ * - OPR got set, without SA (likely status stage)
+ */
+ UDCCS0 = udccs0 & (UDCCS0_SA|UDCCS0_OPR);
+ }
+ break;
+ case EP0_IN_DATA_PHASE: /* GET_DESCRIPTOR etc */
+ if (udccs0 & UDCCS0_OPR) {
+ UDCCS0 = UDCCS0_OPR|UDCCS0_FTF;
+ DBG(DBG_VERBOSE, "ep0in premature status\n");
+ if (req)
+ done(ep, req, 0);
+ ep0_idle(dev);
+ } else /* irq was IPR clearing */ {
+ if (req) {
+ /* this IN packet might finish the request */
+ (void) write_ep0_fifo(ep, req);
+ } /* else IN token before response was written */
+ }
+ break;
+ case EP0_OUT_DATA_PHASE: /* SET_DESCRIPTOR etc */
+ if (udccs0 & UDCCS0_OPR) {
+ if (req) {
+ /* this OUT packet might finish the request */
+ if (read_ep0_fifo(ep, req))
+ done(ep, req, 0);
+ /* else more OUT packets expected */
+ } /* else OUT token before read was issued */
+ } else /* irq was IPR clearing */ {
+ DBG(DBG_VERBOSE, "ep0out premature status\n");
+ if (req)
+ done(ep, req, 0);
+ ep0_idle(dev);
+ }
+ break;
+ case EP0_END_XFER:
+ if (req)
+ done(ep, req, 0);
+ /* ack control-IN status (maybe in-zlp was skipped)
+ * also appears after some config change events.
+ */
+ if (udccs0 & UDCCS0_OPR)
+ UDCCS0 = UDCCS0_OPR;
+ ep0_idle(dev);
+ break;
+ case EP0_STALL:
+ UDCCS0 = UDCCS0_FST;
+ break;
+ }
+ USIR0 = USIR0_IR0;
+}
+
+static void handle_ep(struct pxa2xx_ep *ep)
+{
+ struct pxa2xx_request *req;
+ int is_in = ep->bEndpointAddress & USB_DIR_IN;
+ int completed;
+ u32 udccs, tmp;
+
+ do {
+ completed = 0;
+ if (likely (!list_empty(&ep->queue)))
+ req = list_entry(ep->queue.next,
+ struct pxa2xx_request, queue);
+ else
+ req = NULL;
+
+ // TODO check FST handling
+
+ udccs = *ep->reg_udccs;
+ if (unlikely(is_in)) { /* irq from TPC, SST, or (ISO) TUR */
+ tmp = UDCCS_BI_TUR;
+ if (likely(ep->bmAttributes == USB_ENDPOINT_XFER_BULK))
+ tmp |= UDCCS_BI_SST;
+ tmp &= udccs;
+ if (likely (tmp))
+ *ep->reg_udccs = tmp;
+ if (req && likely ((udccs & UDCCS_BI_TFS) != 0))
+ completed = write_fifo(ep, req);
+
+ } else { /* irq from RPC (or for ISO, ROF) */
+ if (likely(ep->bmAttributes == USB_ENDPOINT_XFER_BULK))
+ tmp = UDCCS_BO_SST | UDCCS_BO_DME;
+ else
+ tmp = UDCCS_IO_ROF | UDCCS_IO_DME;
+ tmp &= udccs;
+ if (likely(tmp))
+ *ep->reg_udccs = tmp;
+
+ /* fifos can hold packets, ready for reading... */
+ if (likely(req)) {
+#ifdef USE_OUT_DMA
+// TODO didn't yet debug out-dma. this approach assumes
+// the worst about short packets and RPC; it might be better.
+
+ if (likely(ep->dma >= 0)) {
+ if (!(udccs & UDCCS_BO_RSP)) {
+ *ep->reg_udccs = UDCCS_BO_RPC;
+ ep->dma_irqs++;
+ return;
+ }
+ }
+#endif
+ completed = read_fifo(ep, req);
+ } else
+ pio_irq_disable (ep->bEndpointAddress);
+ }
+ ep->pio_irqs++;
+ } while (completed);
+}
+
+/*
+ * pxa2xx_udc_irq - interrupt handler
+ *
+ * avoid delays in ep0 processing. the control handshaking isn't always
+ * under software control (pxa250c0 and the pxa255 are better), and delays
+ * could cause usb protocol errors.
+ */
+static irqreturn_t
+pxa2xx_udc_irq(int irq, void *_dev, struct pt_regs *r)
+{
+ struct pxa2xx_udc *dev = _dev;
+ int handled;
+
+ dev->stats.irqs++;
+ HEX_DISPLAY(dev->stats.irqs);
+ do {
+ u32 udccr = UDCCR;
+
+ handled = 0;
+
+ /* SUSpend Interrupt Request */
+ if (unlikely(udccr & UDCCR_SUSIR)) {
+ udc_ack_int_UDCCR(UDCCR_SUSIR);
+ handled = 1;
+ DBG(DBG_VERBOSE, "USB suspend%s\n", is_usb_connected()
+ ? "" : "+disconnect");
+
+ if (!is_usb_connected())
+ stop_activity(dev, dev->driver);
+ else if (dev->gadget.speed != USB_SPEED_UNKNOWN
+ && dev->driver
+ && dev->driver->suspend)
+ dev->driver->suspend(&dev->gadget);
+ ep0_idle (dev);
+ }
+
+ /* RESume Interrupt Request */
+ if (unlikely(udccr & UDCCR_RESIR)) {
+ udc_ack_int_UDCCR(UDCCR_RESIR);
+ handled = 1;
+ DBG(DBG_VERBOSE, "USB resume\n");
+
+ if (dev->gadget.speed != USB_SPEED_UNKNOWN
+ && dev->driver
+ && dev->driver->resume
+ && is_usb_connected())
+ dev->driver->resume(&dev->gadget);
+ }
+
+ /* ReSeT Interrupt Request - USB reset */
+ if (unlikely(udccr & UDCCR_RSTIR)) {
+ udc_ack_int_UDCCR(UDCCR_RSTIR);
+ handled = 1;
+
+ if ((UDCCR & UDCCR_UDA) == 0) {
+ DBG(DBG_VERBOSE, "USB reset start\n");
+
+ /* reset driver and endpoints,
+ * in case that's not yet done
+ */
+ stop_activity (dev, dev->driver);
+
+ } else {
+ DBG(DBG_VERBOSE, "USB reset end\n");
+ dev->gadget.speed = USB_SPEED_FULL;
+ LED_CONNECTED_ON;
+ memset(&dev->stats, 0, sizeof dev->stats);
+ /* driver and endpoints are still reset */
+ }
+
+ } else {
+ u32 usir0 = USIR0 & ~UICR0;
+ u32 usir1 = USIR1 & ~UICR1;
+ int i;
+
+ if (unlikely (!usir0 && !usir1))
+ continue;
+
+ DBG(DBG_VERY_NOISY, "irq %02x.%02x\n", usir1, usir0);
+
+ /* control traffic */
+ if (usir0 & USIR0_IR0) {
+ dev->ep[0].pio_irqs++;
+ handle_ep0(dev);
+ handled = 1;
+ }
+
+ /* endpoint data transfers */
+ for (i = 0; i < 8; i++) {
+ u32 tmp = 1 << i;
+
+ if (i && (usir0 & tmp)) {
+ handle_ep(&dev->ep[i]);
+ USIR0 |= tmp;
+ handled = 1;
+ }
+ if (usir1 & tmp) {
+ handle_ep(&dev->ep[i+8]);
+ USIR1 |= tmp;
+ handled = 1;
+ }
+ }
+ }
+
+ /* we could also ask for 1 msec SOF (SIR) interrupts */
+
+ } while (handled);
+ return IRQ_HANDLED;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void nop_release (struct device *dev)
+{
+ DMSG("%s %s\n", __FUNCTION__, dev->bus_id);
+}
+
+/* this uses load-time allocation and initialization (instead of
+ * doing it at run-time) to save code, eliminate fault paths, and
+ * be more obviously correct.
+ */
+static struct pxa2xx_udc memory = {
+ .gadget = {
+ .ops = &pxa2xx_udc_ops,
+ .ep0 = &memory.ep[0].ep,
+ .name = driver_name,
+ .dev = {
+ .bus_id = "gadget",
+ .release = nop_release,
+ },
+ },
+
+ /* control endpoint */
+ .ep[0] = {
+ .ep = {
+ .name = ep0name,
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = EP0_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .reg_udccs = &UDCCS0,
+ .reg_uddr = &UDDR0,
+ },
+
+ /* first group of endpoints */
+ .ep[1] = {
+ .ep = {
+ .name = "ep1in-bulk",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = BULK_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = BULK_FIFO_SIZE,
+ .bEndpointAddress = USB_DIR_IN | 1,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .reg_udccs = &UDCCS1,
+ .reg_uddr = &UDDR1,
+ drcmr (25)
+ },
+ .ep[2] = {
+ .ep = {
+ .name = "ep2out-bulk",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = BULK_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = BULK_FIFO_SIZE,
+ .bEndpointAddress = 2,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .reg_udccs = &UDCCS2,
+ .reg_ubcr = &UBCR2,
+ .reg_uddr = &UDDR2,
+ drcmr (26)
+ },
+#ifndef CONFIG_USB_PXA2XX_SMALL
+ .ep[3] = {
+ .ep = {
+ .name = "ep3in-iso",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = ISO_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = ISO_FIFO_SIZE,
+ .bEndpointAddress = USB_DIR_IN | 3,
+ .bmAttributes = USB_ENDPOINT_XFER_ISOC,
+ .reg_udccs = &UDCCS3,
+ .reg_uddr = &UDDR3,
+ drcmr (27)
+ },
+ .ep[4] = {
+ .ep = {
+ .name = "ep4out-iso",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = ISO_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = ISO_FIFO_SIZE,
+ .bEndpointAddress = 4,
+ .bmAttributes = USB_ENDPOINT_XFER_ISOC,
+ .reg_udccs = &UDCCS4,
+ .reg_ubcr = &UBCR4,
+ .reg_uddr = &UDDR4,
+ drcmr (28)
+ },
+ .ep[5] = {
+ .ep = {
+ .name = "ep5in-int",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = INT_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = INT_FIFO_SIZE,
+ .bEndpointAddress = USB_DIR_IN | 5,
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .reg_udccs = &UDCCS5,
+ .reg_uddr = &UDDR5,
+ },
+
+ /* second group of endpoints */
+ .ep[6] = {
+ .ep = {
+ .name = "ep6in-bulk",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = BULK_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = BULK_FIFO_SIZE,
+ .bEndpointAddress = USB_DIR_IN | 6,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .reg_udccs = &UDCCS6,
+ .reg_uddr = &UDDR6,
+ drcmr (30)
+ },
+ .ep[7] = {
+ .ep = {
+ .name = "ep7out-bulk",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = BULK_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = BULK_FIFO_SIZE,
+ .bEndpointAddress = 7,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .reg_udccs = &UDCCS7,
+ .reg_ubcr = &UBCR7,
+ .reg_uddr = &UDDR7,
+ drcmr (31)
+ },
+ .ep[8] = {
+ .ep = {
+ .name = "ep8in-iso",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = ISO_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = ISO_FIFO_SIZE,
+ .bEndpointAddress = USB_DIR_IN | 8,
+ .bmAttributes = USB_ENDPOINT_XFER_ISOC,
+ .reg_udccs = &UDCCS8,
+ .reg_uddr = &UDDR8,
+ drcmr (32)
+ },
+ .ep[9] = {
+ .ep = {
+ .name = "ep9out-iso",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = ISO_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = ISO_FIFO_SIZE,
+ .bEndpointAddress = 9,
+ .bmAttributes = USB_ENDPOINT_XFER_ISOC,
+ .reg_udccs = &UDCCS9,
+ .reg_ubcr = &UBCR9,
+ .reg_uddr = &UDDR9,
+ drcmr (33)
+ },
+ .ep[10] = {
+ .ep = {
+ .name = "ep10in-int",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = INT_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = INT_FIFO_SIZE,
+ .bEndpointAddress = USB_DIR_IN | 10,
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .reg_udccs = &UDCCS10,
+ .reg_uddr = &UDDR10,
+ },
+
+ /* third group of endpoints */
+ .ep[11] = {
+ .ep = {
+ .name = "ep11in-bulk",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = BULK_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = BULK_FIFO_SIZE,
+ .bEndpointAddress = USB_DIR_IN | 11,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .reg_udccs = &UDCCS11,
+ .reg_uddr = &UDDR11,
+ drcmr (35)
+ },
+ .ep[12] = {
+ .ep = {
+ .name = "ep12out-bulk",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = BULK_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = BULK_FIFO_SIZE,
+ .bEndpointAddress = 12,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .reg_udccs = &UDCCS12,
+ .reg_ubcr = &UBCR12,
+ .reg_uddr = &UDDR12,
+ drcmr (36)
+ },
+ .ep[13] = {
+ .ep = {
+ .name = "ep13in-iso",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = ISO_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = ISO_FIFO_SIZE,
+ .bEndpointAddress = USB_DIR_IN | 13,
+ .bmAttributes = USB_ENDPOINT_XFER_ISOC,
+ .reg_udccs = &UDCCS13,
+ .reg_uddr = &UDDR13,
+ drcmr (37)
+ },
+ .ep[14] = {
+ .ep = {
+ .name = "ep14out-iso",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = ISO_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = ISO_FIFO_SIZE,
+ .bEndpointAddress = 14,
+ .bmAttributes = USB_ENDPOINT_XFER_ISOC,
+ .reg_udccs = &UDCCS14,
+ .reg_ubcr = &UBCR14,
+ .reg_uddr = &UDDR14,
+ drcmr (38)
+ },
+ .ep[15] = {
+ .ep = {
+ .name = "ep15in-int",
+ .ops = &pxa2xx_ep_ops,
+ .maxpacket = INT_FIFO_SIZE,
+ },
+ .dev = &memory,
+ .fifo_size = INT_FIFO_SIZE,
+ .bEndpointAddress = USB_DIR_IN | 15,
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .reg_udccs = &UDCCS15,
+ .reg_uddr = &UDDR15,
+ },
+#endif /* !CONFIG_USB_PXA2XX_SMALL */
+};
+
+#define CP15R0_VENDOR_MASK 0xffffe000
+
+#if defined(CONFIG_ARCH_PXA)
+#define CP15R0_XSCALE_VALUE 0x69052000 /* intel/arm/xscale */
+
+#elif defined(CONFIG_ARCH_IXP4XX)
+#define CP15R0_XSCALE_VALUE 0x69054000 /* intel/arm/ixp4xx */
+
+#endif
+
+#define CP15R0_PROD_MASK 0x000003f0
+#define PXA25x 0x00000100 /* and PXA26x */
+#define PXA210 0x00000120
+
+#define CP15R0_REV_MASK 0x0000000f
+
+#define CP15R0_PRODREV_MASK (CP15R0_PROD_MASK | CP15R0_REV_MASK)
+
+#define PXA255_A0 0x00000106 /* or PXA260_B1 */
+#define PXA250_C0 0x00000105 /* or PXA26x_B0 */
+#define PXA250_B2 0x00000104
+#define PXA250_B1 0x00000103 /* or PXA260_A0 */
+#define PXA250_B0 0x00000102
+#define PXA250_A1 0x00000101
+#define PXA250_A0 0x00000100
+
+#define PXA210_C0 0x00000125
+#define PXA210_B2 0x00000124
+#define PXA210_B1 0x00000123
+#define PXA210_B0 0x00000122
+#define IXP425_A0 0x000001c1
+
+/*
+ * probe - binds to the platform device
+ */
+static int __init pxa2xx_udc_probe(struct device *_dev)
+{
+ struct pxa2xx_udc *dev = &memory;
+ int retval, out_dma = 1;
+ u32 chiprev;
+
+ /* insist on Intel/ARM/XScale */
+ asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev));
+ if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) {
+ printk(KERN_ERR "%s: not XScale!\n", driver_name);
+ return -ENODEV;
+ }
+
+ /* trigger chiprev-specific logic */
+ switch (chiprev & CP15R0_PRODREV_MASK) {
+#if defined(CONFIG_ARCH_PXA)
+ case PXA255_A0:
+ dev->has_cfr = 1;
+ break;
+ case PXA250_A0:
+ case PXA250_A1:
+ /* A0/A1 "not released"; ep 13, 15 unusable */
+ /* fall through */
+ case PXA250_B2: case PXA210_B2:
+ case PXA250_B1: case PXA210_B1:
+ case PXA250_B0: case PXA210_B0:
+ out_dma = 0;
+ /* fall through */
+ case PXA250_C0: case PXA210_C0:
+ break;
+#elif defined(CONFIG_ARCH_IXP4XX)
+ case IXP425_A0:
+ out_dma = 0;
+ break;
+#endif
+ default:
+ out_dma = 0;
+ printk(KERN_ERR "%s: unrecognized processor: %08x\n",
+ driver_name, chiprev);
+ /* iop3xx, ixp4xx, ... */
+ return -ENODEV;
+ }
+
+ pr_debug("%s: IRQ %d%s%s%s\n", driver_name, IRQ_USB,
+ dev->has_cfr ? "" : " (!cfr)",
+ out_dma ? "" : " (broken dma-out)",
+ SIZE_STR DMASTR
+ );
+
+#ifdef USE_DMA
+#ifndef USE_OUT_DMA
+ out_dma = 0;
+#endif
+ /* pxa 250 erratum 130 prevents using OUT dma (fixed C0) */
+ if (!out_dma) {
+ DMSG("disabled OUT dma\n");
+ dev->ep[ 2].reg_drcmr = dev->ep[ 4].reg_drcmr = 0;
+ dev->ep[ 7].reg_drcmr = dev->ep[ 9].reg_drcmr = 0;
+ dev->ep[12].reg_drcmr = dev->ep[14].reg_drcmr = 0;
+ }
+#endif
+
+ /* other non-static parts of init */
+ dev->dev = _dev;
+ dev->mach = _dev->platform_data;
+
+ init_timer(&dev->timer);
+ dev->timer.function = udc_watchdog;
+ dev->timer.data = (unsigned long) dev;
+
+ device_initialize(&dev->gadget.dev);
+ dev->gadget.dev.parent = _dev;
+ dev->gadget.dev.dma_mask = _dev->dma_mask;
+
+ the_controller = dev;
+ dev_set_drvdata(_dev, dev);
+
+ udc_disable(dev);
+ udc_reinit(dev);
+
+ dev->vbus = is_usb_connected();
+
+ /* irq setup after old hardware state is cleaned up */
+ retval = request_irq(IRQ_USB, pxa2xx_udc_irq,
+ SA_INTERRUPT, driver_name, dev);
+ if (retval != 0) {
+ printk(KERN_ERR "%s: can't get irq %i, err %d\n",
+ driver_name, IRQ_USB, retval);
+ return -EBUSY;
+ }
+ dev->got_irq = 1;
+
+#ifdef CONFIG_ARCH_LUBBOCK
+ if (machine_is_lubbock()) {
+ retval = request_irq(LUBBOCK_USB_DISC_IRQ,
+ lubbock_vbus_irq,
+ SA_INTERRUPT | SA_SAMPLE_RANDOM,
+ driver_name, dev);
+ if (retval != 0) {
+ printk(KERN_ERR "%s: can't get irq %i, err %d\n",
+ driver_name, LUBBOCK_USB_DISC_IRQ, retval);
+lubbock_fail0:
+ free_irq(IRQ_USB, dev);
+ return -EBUSY;
+ }
+ retval = request_irq(LUBBOCK_USB_IRQ,
+ lubbock_vbus_irq,
+ SA_INTERRUPT | SA_SAMPLE_RANDOM,
+ driver_name, dev);
+ if (retval != 0) {
+ printk(KERN_ERR "%s: can't get irq %i, err %d\n",
+ driver_name, LUBBOCK_USB_IRQ, retval);
+ free_irq(LUBBOCK_USB_DISC_IRQ, dev);
+ goto lubbock_fail0;
+ }
+#ifdef DEBUG
+ /* with U-Boot (but not BLOB), hex is off by default */
+ HEX_DISPLAY(dev->stats.irqs);
+ LUB_DISC_BLNK_LED &= 0xff;
+#endif
+ }
+#endif
+ create_proc_files();
+
+ return 0;
+}
+static int __exit pxa2xx_udc_remove(struct device *_dev)
+{
+ struct pxa2xx_udc *dev = dev_get_drvdata(_dev);
+
+ udc_disable(dev);
+ remove_proc_files();
+ usb_gadget_unregister_driver(dev->driver);
+
+ if (dev->got_irq) {
+ free_irq(IRQ_USB, dev);
+ dev->got_irq = 0;
+ }
+ if (machine_is_lubbock()) {
+ free_irq(LUBBOCK_USB_DISC_IRQ, dev);
+ free_irq(LUBBOCK_USB_IRQ, dev);
+ }
+ dev_set_drvdata(_dev, NULL);
+ the_controller = NULL;
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_PM
+
+/* USB suspend (controlled by the host) and system suspend (controlled
+ * by the PXA) don't necessarily work well together. If USB is active,
+ * the 48 MHz clock is required; so the system can't enter 33 MHz idle
+ * mode, or any deeper PM saving state.
+ *
+ * For now, we punt and forcibly disconnect from the USB host when PXA
+ * enters any suspend state. While we're disconnected, we always disable
+ * the 48MHz USB clock ... allowing PXA sleep and/or 33 MHz idle states.
+ * Boards without software pullup control shouldn't use those states.
+ * VBUS IRQs should probably be ignored so that the PXA device just acts
+ * "dead" to USB hosts until system resume.
+ */
+static int pxa2xx_udc_suspend(struct device *dev, u32 state, u32 level)
+{
+ struct pxa2xx_udc *udc = dev_get_drvdata(dev);
+
+ if (level == SUSPEND_POWER_DOWN) {
+ if (!udc->mach->udc_command)
+ WARN("USB host won't detect disconnect!\n");
+ pullup(udc, 0);
+ }
+ return 0;
+}
+
+static int pxa2xx_udc_resume(struct device *dev, u32 level)
+{
+ struct pxa2xx_udc *udc = dev_get_drvdata(dev);
+
+ if (level == RESUME_POWER_ON)
+ pullup(udc, 1);
+ return 0;
+}
+
+#else
+#define pxa2xx_udc_suspend NULL
+#define pxa2xx_udc_resume NULL
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static struct device_driver udc_driver = {
+ .name = "pxa2xx-udc",
+ .bus = &platform_bus_type,
+ .probe = pxa2xx_udc_probe,
+ .remove = __exit_p(pxa2xx_udc_remove),
+ .suspend = pxa2xx_udc_suspend,
+ .resume = pxa2xx_udc_resume,
+};
+
+static int __init udc_init(void)
+{
+ printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION);
+ return driver_register(&udc_driver);
+}
+module_init(udc_init);
+
+static void __exit udc_exit(void)
+{
+ driver_unregister(&udc_driver);
+}
+module_exit(udc_exit);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell");
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h
new file mode 100644
index 000000000000..1f3a7d999da7
--- /dev/null
+++ b/drivers/usb/gadget/pxa2xx_udc.h
@@ -0,0 +1,320 @@
+/*
+ * linux/drivers/usb/gadget/pxa2xx_udc.h
+ * Intel PXA2xx on-chip full speed USB device controller
+ *
+ * Copyright (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix
+ * Copyright (C) 2003 David Brownell
+ *
+ *
+ * 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
+ */
+
+#ifndef __LINUX_USB_GADGET_PXA2XX_H
+#define __LINUX_USB_GADGET_PXA2XX_H
+
+#include <linux/types.h>
+
+/*-------------------------------------------------------------------------*/
+
+/* pxa2xx has this (move to include/asm-arm/arch-pxa/pxa-regs.h) */
+#define UFNRH_SIR (1 << 7) /* SOF interrupt request */
+#define UFNRH_SIM (1 << 6) /* SOF interrupt mask */
+#define UFNRH_IPE14 (1 << 5) /* ISO packet error, ep14 */
+#define UFNRH_IPE9 (1 << 4) /* ISO packet error, ep9 */
+#define UFNRH_IPE4 (1 << 3) /* ISO packet error, ep4 */
+
+/* pxa255 has this (move to include/asm-arm/arch-pxa/pxa-regs.h) */
+#define UDCCFR UDC_RES2 /* UDC Control Function Register */
+#define UDCCFR_AREN (1 << 7) /* ACK response enable (now) */
+#define UDCCFR_ACM (1 << 2) /* ACK control mode (wait for AREN) */
+
+/* latest pxa255 errata define new "must be one" bits in UDCCFR */
+#define UDCCFR_MB1 (0xff & ~(UDCCFR_AREN|UDCCFR_ACM))
+
+/*-------------------------------------------------------------------------*/
+
+struct pxa2xx_udc;
+
+struct pxa2xx_ep {
+ struct usb_ep ep;
+ struct pxa2xx_udc *dev;
+
+ const struct usb_endpoint_descriptor *desc;
+ struct list_head queue;
+ unsigned long pio_irqs;
+ unsigned long dma_irqs;
+ short dma;
+
+ unsigned short fifo_size;
+ u8 bEndpointAddress;
+ u8 bmAttributes;
+
+ unsigned stopped : 1;
+ unsigned dma_fixup : 1;
+
+ /* UDCCS = UDC Control/Status for this EP
+ * UBCR = UDC Byte Count Remaining (contents of OUT fifo)
+ * UDDR = UDC Endpoint Data Register (the fifo)
+ * DRCM = DMA Request Channel Map
+ */
+ volatile u32 *reg_udccs;
+ volatile u32 *reg_ubcr;
+ volatile u32 *reg_uddr;
+#ifdef USE_DMA
+ volatile u32 *reg_drcmr;
+#define drcmr(n) .reg_drcmr = & DRCMR ## n ,
+#else
+#define drcmr(n)
+#endif
+};
+
+struct pxa2xx_request {
+ struct usb_request req;
+ struct list_head queue;
+};
+
+enum ep0_state {
+ EP0_IDLE,
+ EP0_IN_DATA_PHASE,
+ EP0_OUT_DATA_PHASE,
+ EP0_END_XFER,
+ EP0_STALL,
+};
+
+#define EP0_FIFO_SIZE ((unsigned)16)
+#define BULK_FIFO_SIZE ((unsigned)64)
+#define ISO_FIFO_SIZE ((unsigned)256)
+#define INT_FIFO_SIZE ((unsigned)8)
+
+struct udc_stats {
+ struct ep0stats {
+ unsigned long ops;
+ unsigned long bytes;
+ } read, write;
+ unsigned long irqs;
+};
+
+#ifdef CONFIG_USB_PXA2XX_SMALL
+/* when memory's tight, SMALL config saves code+data. */
+#undef USE_DMA
+#define PXA_UDC_NUM_ENDPOINTS 3
+#endif
+
+#ifndef PXA_UDC_NUM_ENDPOINTS
+#define PXA_UDC_NUM_ENDPOINTS 16
+#endif
+
+struct pxa2xx_udc {
+ struct usb_gadget gadget;
+ struct usb_gadget_driver *driver;
+
+ enum ep0_state ep0state;
+ struct udc_stats stats;
+ unsigned got_irq : 1,
+ vbus : 1,
+ pullup : 1,
+ has_cfr : 1,
+ req_pending : 1,
+ req_std : 1,
+ req_config : 1;
+
+#define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200))
+ struct timer_list timer;
+
+ struct device *dev;
+ struct pxa2xx_udc_mach_info *mach;
+ u64 dma_mask;
+ struct pxa2xx_ep ep [PXA_UDC_NUM_ENDPOINTS];
+};
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_ARCH_LUBBOCK
+#include <asm/arch/lubbock.h>
+/* lubbock can also report usb connect/disconnect irqs */
+
+#ifdef DEBUG
+#define HEX_DISPLAY(n) if (machine_is_lubbock()) { LUB_HEXLED = (n); }
+#endif
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/* LEDs are only for debug */
+#ifndef HEX_DISPLAY
+#define HEX_DISPLAY(n) do {} while(0)
+#endif
+
+#ifdef DEBUG
+#include <asm/leds.h>
+
+#define LED_CONNECTED_ON leds_event(led_green_on)
+#define LED_CONNECTED_OFF do { \
+ leds_event(led_green_off); \
+ HEX_DISPLAY(0); \
+ } while(0)
+#endif
+
+#ifndef LED_CONNECTED_ON
+#define LED_CONNECTED_ON do {} while(0)
+#define LED_CONNECTED_OFF do {} while(0)
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static struct pxa2xx_udc *the_controller;
+
+/* one GPIO should be used to detect host disconnect */
+static inline int is_usb_connected(void)
+{
+ if (!the_controller->mach->udc_is_connected)
+ return 1;
+ return the_controller->mach->udc_is_connected();
+}
+
+/* one GPIO should force the host to see this device (or not) */
+static inline void make_usb_disappear(void)
+{
+ if (!the_controller->mach->udc_command)
+ return;
+ the_controller->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
+}
+
+static inline void let_usb_appear(void)
+{
+ if (!the_controller->mach->udc_command)
+ return;
+ the_controller->mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Debugging support vanishes in non-debug builds. DBG_NORMAL should be
+ * mostly silent during normal use/testing, with no timing side-effects.
+ */
+#define DBG_NORMAL 1 /* error paths, device state transitions */
+#define DBG_VERBOSE 2 /* add some success path trace info */
+#define DBG_NOISY 3 /* ... even more: request level */
+#define DBG_VERY_NOISY 4 /* ... even more: packet level */
+
+#ifdef DEBUG
+
+static const char *state_name[] = {
+ "EP0_IDLE",
+ "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE",
+ "EP0_END_XFER", "EP0_STALL"
+};
+
+#define DMSG(stuff...) printk(KERN_DEBUG "udc: " stuff)
+
+#ifdef VERBOSE
+# define UDC_DEBUG DBG_VERBOSE
+#else
+# define UDC_DEBUG DBG_NORMAL
+#endif
+
+static void __attribute__ ((__unused__))
+dump_udccr(const char *label)
+{
+ u32 udccr = UDCCR;
+ DMSG("%s %02X =%s%s%s%s%s%s%s%s\n",
+ label, udccr,
+ (udccr & UDCCR_REM) ? " rem" : "",
+ (udccr & UDCCR_RSTIR) ? " rstir" : "",
+ (udccr & UDCCR_SRM) ? " srm" : "",
+ (udccr & UDCCR_SUSIR) ? " susir" : "",
+ (udccr & UDCCR_RESIR) ? " resir" : "",
+ (udccr & UDCCR_RSM) ? " rsm" : "",
+ (udccr & UDCCR_UDA) ? " uda" : "",
+ (udccr & UDCCR_UDE) ? " ude" : "");
+}
+
+static void __attribute__ ((__unused__))
+dump_udccs0(const char *label)
+{
+ u32 udccs0 = UDCCS0;
+
+ DMSG("%s %s %02X =%s%s%s%s%s%s%s%s\n",
+ label, state_name[the_controller->ep0state], udccs0,
+ (udccs0 & UDCCS0_SA) ? " sa" : "",
+ (udccs0 & UDCCS0_RNE) ? " rne" : "",
+ (udccs0 & UDCCS0_FST) ? " fst" : "",
+ (udccs0 & UDCCS0_SST) ? " sst" : "",
+ (udccs0 & UDCCS0_DRWF) ? " dwrf" : "",
+ (udccs0 & UDCCS0_FTF) ? " ftf" : "",
+ (udccs0 & UDCCS0_IPR) ? " ipr" : "",
+ (udccs0 & UDCCS0_OPR) ? " opr" : "");
+}
+
+static void __attribute__ ((__unused__))
+dump_state(struct pxa2xx_udc *dev)
+{
+ u32 tmp;
+ unsigned i;
+
+ DMSG("%s %s, uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n",
+ is_usb_connected() ? "host " : "disconnected",
+ state_name[dev->ep0state],
+ UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL);
+ dump_udccr("udccr");
+ if (dev->has_cfr) {
+ tmp = UDCCFR;
+ DMSG("udccfr %02X =%s%s\n", tmp,
+ (tmp & UDCCFR_AREN) ? " aren" : "",
+ (tmp & UDCCFR_ACM) ? " acm" : "");
+ }
+
+ if (!dev->driver) {
+ DMSG("no gadget driver bound\n");
+ return;
+ } else
+ DMSG("ep0 driver '%s'\n", dev->driver->driver.name);
+
+ if (!is_usb_connected())
+ return;
+
+ dump_udccs0 ("udccs0");
+ DMSG("ep0 IN %lu/%lu, OUT %lu/%lu\n",
+ dev->stats.write.bytes, dev->stats.write.ops,
+ dev->stats.read.bytes, dev->stats.read.ops);
+
+ for (i = 1; i < PXA_UDC_NUM_ENDPOINTS; i++) {
+ if (dev->ep [i].desc == 0)
+ continue;
+ DMSG ("udccs%d = %02x\n", i, *dev->ep->reg_udccs);
+ }
+}
+
+#else
+
+#define DMSG(stuff...) do{}while(0)
+
+#define dump_udccr(x) do{}while(0)
+#define dump_udccs0(x) do{}while(0)
+#define dump_state(x) do{}while(0)
+
+#define UDC_DEBUG ((unsigned)0)
+
+#endif
+
+#define DBG(lvl, stuff...) do{if ((lvl) <= UDC_DEBUG) DMSG(stuff);}while(0)
+
+#define WARN(stuff...) printk(KERN_WARNING "udc: " stuff)
+#define INFO(stuff...) printk(KERN_INFO "udc: " stuff)
+
+
+#endif /* __LINUX_USB_GADGET_PXA2XX_H */
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
new file mode 100644
index 000000000000..6c5197850edc
--- /dev/null
+++ b/drivers/usb/gadget/rndis.c
@@ -0,0 +1,1428 @@
+/*
+ * RNDIS MSG parser
+ *
+ * Version: $Id: rndis.c,v 1.19 2004/03/25 21:33:46 robert Exp $
+ *
+ * Authors: Benedikt Spranger, Pengutronix
+ * Robert Schwebel, Pengutronix
+ *
+ * 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 software was originally developed in conformance with
+ * Microsoft's Remote NDIS Specification License Agreement.
+ *
+ * 03/12/2004 Kai-Uwe Bloem <linux-development@auerswald.de>
+ * Fixed message length bug in init_response
+ *
+ * 03/25/2004 Kai-Uwe Bloem <linux-development@auerswald.de>
+ * Fixed rndis_rm_hdr length bug.
+ *
+ * Copyright (C) 2004 by David Brownell
+ * updates to merge with Linux 2.6, better match RNDIS spec
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/proc_fs.h>
+#include <linux/netdevice.h>
+
+#include <asm/io.h>
+#include <asm/byteorder.h>
+#include <asm/system.h>
+
+
+#undef RNDIS_PM
+#undef VERBOSE
+
+#include "rndis.h"
+
+
+/* The driver for your USB chip needs to support ep0 OUT to work with
+ * RNDIS, plus all three CDC Ethernet endpoints (interrupt not optional).
+ *
+ * Windows hosts need an INF file like Documentation/usb/linux.inf
+ * and will be happier if you provide the host_addr module parameter.
+ */
+
+#if 0
+#define DEBUG(str,args...) do { \
+ if (rndis_debug) \
+ printk(KERN_DEBUG str , ## args ); \
+ } while (0)
+static int rndis_debug = 0;
+
+module_param (rndis_debug, bool, 0);
+MODULE_PARM_DESC (rndis_debug, "enable debugging");
+
+#else
+
+#define rndis_debug 0
+#define DEBUG(str,args...) do{}while(0)
+#endif
+
+#define RNDIS_MAX_CONFIGS 1
+
+
+static rndis_params rndis_per_dev_params [RNDIS_MAX_CONFIGS];
+
+/* Driver Version */
+static const __le32 rndis_driver_version = __constant_cpu_to_le32 (1);
+
+/* Function Prototypes */
+static int rndis_init_response (int configNr, rndis_init_msg_type *buf);
+static int rndis_query_response (int configNr, rndis_query_msg_type *buf);
+static int rndis_set_response (int configNr, rndis_set_msg_type *buf);
+static int rndis_reset_response (int configNr, rndis_reset_msg_type *buf);
+static int rndis_keepalive_response (int configNr,
+ rndis_keepalive_msg_type *buf);
+
+static rndis_resp_t *rndis_add_response (int configNr, u32 length);
+
+
+/* NDIS Functions */
+static int gen_ndis_query_resp (int configNr, u32 OID, rndis_resp_t *r)
+{
+ int retval = -ENOTSUPP;
+ u32 length = 0;
+ __le32 *tmp;
+ int i, count;
+ rndis_query_cmplt_type *resp;
+
+ if (!r) return -ENOMEM;
+ resp = (rndis_query_cmplt_type *) r->buf;
+
+ if (!resp) return -ENOMEM;
+
+ switch (OID) {
+
+ /* general oids (table 4-1) */
+
+ /* mandatory */
+ case OID_GEN_SUPPORTED_LIST:
+ DEBUG ("%s: OID_GEN_SUPPORTED_LIST\n", __FUNCTION__);
+ length = sizeof (oid_supported_list);
+ count = length / sizeof (u32);
+ tmp = (__le32 *) ((u8 *)resp + 24);
+ for (i = 0; i < count; i++)
+ tmp[i] = cpu_to_le32 (oid_supported_list[i]);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_GEN_HARDWARE_STATUS:
+ DEBUG("%s: OID_GEN_HARDWARE_STATUS\n", __FUNCTION__);
+ length = 4;
+ /* Bogus question!
+ * Hardware must be ready to receive high level protocols.
+ * BTW:
+ * reddite ergo quae sunt Caesaris Caesari
+ * et quae sunt Dei Deo!
+ */
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_GEN_MEDIA_SUPPORTED:
+ DEBUG("%s: OID_GEN_MEDIA_SUPPORTED\n", __FUNCTION__);
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr].medium);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_GEN_MEDIA_IN_USE:
+ DEBUG("%s: OID_GEN_MEDIA_IN_USE\n", __FUNCTION__);
+ length = 4;
+ /* one medium, one transport... (maybe you do it better) */
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr].medium);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_GEN_MAXIMUM_FRAME_SIZE:
+ DEBUG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].dev) {
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr].dev->mtu);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_GEN_LINK_SPEED:
+ DEBUG("%s: OID_GEN_LINK_SPEED\n", __FUNCTION__);
+ length = 4;
+ if (rndis_per_dev_params [configNr].media_state
+ == NDIS_MEDIA_STATE_DISCONNECTED)
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ else
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr].speed);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_GEN_TRANSMIT_BLOCK_SIZE:
+ DEBUG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].dev) {
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr].dev->mtu);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_GEN_RECEIVE_BLOCK_SIZE:
+ DEBUG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].dev) {
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr].dev->mtu);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_GEN_VENDOR_ID:
+ DEBUG("%s: OID_GEN_VENDOR_ID\n", __FUNCTION__);
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr].vendorID);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_GEN_VENDOR_DESCRIPTION:
+ DEBUG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __FUNCTION__);
+ length = strlen (rndis_per_dev_params [configNr].vendorDescr);
+ memcpy ((u8 *) resp + 24,
+ rndis_per_dev_params [configNr].vendorDescr, length);
+ retval = 0;
+ break;
+
+ case OID_GEN_VENDOR_DRIVER_VERSION:
+ DEBUG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __FUNCTION__);
+ length = 4;
+ /* Created as LE */
+ *((__le32 *) resp + 6) = rndis_driver_version;
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_GEN_CURRENT_PACKET_FILTER:
+ DEBUG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __FUNCTION__);
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params[configNr].filter);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_GEN_MAXIMUM_TOTAL_SIZE:
+ DEBUG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __FUNCTION__);
+ length = 4;
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32(
+ RNDIS_MAX_TOTAL_SIZE);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_GEN_MEDIA_CONNECT_STATUS:
+ DEBUG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __FUNCTION__);
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .media_state);
+ retval = 0;
+ break;
+
+ case OID_GEN_PHYSICAL_MEDIUM:
+ DEBUG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __FUNCTION__);
+ length = 4;
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ break;
+
+ /* The RNDIS specification is incomplete/wrong. Some versions
+ * of MS-Windows expect OIDs that aren't specified there. Other
+ * versions emit undefined RNDIS messages. DOCUMENT ALL THESE!
+ */
+ case OID_GEN_MAC_OPTIONS: /* from WinME */
+ DEBUG("%s: OID_GEN_MAC_OPTIONS\n", __FUNCTION__);
+ length = 4;
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32(
+ NDIS_MAC_OPTION_RECEIVE_SERIALIZED
+ | NDIS_MAC_OPTION_FULL_DUPLEX);
+ retval = 0;
+ break;
+
+ /* statistics OIDs (table 4-2) */
+
+ /* mandatory */
+ case OID_GEN_XMIT_OK:
+ DEBUG("%s: OID_GEN_XMIT_OK\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr].stats->tx_packets -
+ rndis_per_dev_params [configNr].stats->tx_errors -
+ rndis_per_dev_params [configNr].stats->tx_dropped);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_GEN_RCV_OK:
+ DEBUG("%s: OID_GEN_RCV_OK\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr].stats->rx_packets -
+ rndis_per_dev_params [configNr].stats->rx_errors -
+ rndis_per_dev_params [configNr].stats->rx_dropped);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_GEN_XMIT_ERROR:
+ DEBUG("%s: OID_GEN_XMIT_ERROR\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->tx_errors);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_GEN_RCV_ERROR:
+ DEBUG("%s: OID_GEN_RCV_ERROR\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->rx_errors);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_GEN_RCV_NO_BUFFER:
+ DEBUG("%s: OID_GEN_RCV_NO_BUFFER\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->rx_dropped);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+#ifdef RNDIS_OPTIONAL_STATS
+ case OID_GEN_DIRECTED_BYTES_XMIT:
+ DEBUG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __FUNCTION__);
+ /*
+ * Aunt Tilly's size of shoes
+ * minus antarctica count of penguins
+ * divided by weight of Alpha Centauri
+ */
+ if (rndis_per_dev_params [configNr].stats) {
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ (rndis_per_dev_params [configNr]
+ .stats->tx_packets -
+ rndis_per_dev_params [configNr]
+ .stats->tx_errors -
+ rndis_per_dev_params [configNr]
+ .stats->tx_dropped)
+ * 123);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_DIRECTED_FRAMES_XMIT:
+ DEBUG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __FUNCTION__);
+ /* dito */
+ if (rndis_per_dev_params [configNr].stats) {
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ (rndis_per_dev_params [configNr]
+ .stats->tx_packets -
+ rndis_per_dev_params [configNr]
+ .stats->tx_errors -
+ rndis_per_dev_params [configNr]
+ .stats->tx_dropped)
+ / 123);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_MULTICAST_BYTES_XMIT:
+ DEBUG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->multicast*1234);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_MULTICAST_FRAMES_XMIT:
+ DEBUG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->multicast);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_BROADCAST_BYTES_XMIT:
+ DEBUG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->tx_packets/42*255);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_BROADCAST_FRAMES_XMIT:
+ DEBUG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->tx_packets/42);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_DIRECTED_BYTES_RCV:
+ DEBUG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __FUNCTION__);
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ break;
+
+ case OID_GEN_DIRECTED_FRAMES_RCV:
+ DEBUG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __FUNCTION__);
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ break;
+
+ case OID_GEN_MULTICAST_BYTES_RCV:
+ DEBUG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->multicast * 1111);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_MULTICAST_FRAMES_RCV:
+ DEBUG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->multicast);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_BROADCAST_BYTES_RCV:
+ DEBUG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->rx_packets/42*255);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_BROADCAST_FRAMES_RCV:
+ DEBUG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->rx_packets/42);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_RCV_CRC_ERROR:
+ DEBUG("%s: OID_GEN_RCV_CRC_ERROR\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats) {
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->rx_crc_errors);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ case OID_GEN_TRANSMIT_QUEUE_LENGTH:
+ DEBUG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __FUNCTION__);
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ break;
+#endif /* RNDIS_OPTIONAL_STATS */
+
+ /* ieee802.3 OIDs (table 4-3) */
+
+ /* mandatory */
+ case OID_802_3_PERMANENT_ADDRESS:
+ DEBUG("%s: OID_802_3_PERMANENT_ADDRESS\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].dev) {
+ length = ETH_ALEN;
+ memcpy ((u8 *) resp + 24,
+ rndis_per_dev_params [configNr].host_mac,
+ length);
+ retval = 0;
+ } else {
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_802_3_CURRENT_ADDRESS:
+ DEBUG("%s: OID_802_3_CURRENT_ADDRESS\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].dev) {
+ length = ETH_ALEN;
+ memcpy ((u8 *) resp + 24,
+ rndis_per_dev_params [configNr].host_mac,
+ length);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_802_3_MULTICAST_LIST:
+ DEBUG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__);
+ length = 4;
+ /* Multicast base address only */
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0xE0000000);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_802_3_MAXIMUM_LIST_SIZE:
+ DEBUG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __FUNCTION__);
+ length = 4;
+ /* Multicast base address only */
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (1);
+ retval = 0;
+ break;
+
+ case OID_802_3_MAC_OPTIONS:
+ DEBUG("%s: OID_802_3_MAC_OPTIONS\n", __FUNCTION__);
+ break;
+
+ /* ieee802.3 statistics OIDs (table 4-4) */
+
+ /* mandatory */
+ case OID_802_3_RCV_ERROR_ALIGNMENT:
+ DEBUG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __FUNCTION__);
+ if (rndis_per_dev_params [configNr].stats)
+ {
+ length = 4;
+ *((__le32 *) resp + 6) = cpu_to_le32 (
+ rndis_per_dev_params [configNr]
+ .stats->rx_frame_errors);
+ retval = 0;
+ }
+ break;
+
+ /* mandatory */
+ case OID_802_3_XMIT_ONE_COLLISION:
+ DEBUG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __FUNCTION__);
+ length = 4;
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ break;
+
+ /* mandatory */
+ case OID_802_3_XMIT_MORE_COLLISIONS:
+ DEBUG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __FUNCTION__);
+ length = 4;
+ *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0);
+ retval = 0;
+ break;
+
+#ifdef RNDIS_OPTIONAL_STATS
+ case OID_802_3_XMIT_DEFERRED:
+ DEBUG("%s: OID_802_3_XMIT_DEFERRED\n", __FUNCTION__);
+ /* TODO */
+ break;
+
+ case OID_802_3_XMIT_MAX_COLLISIONS:
+ DEBUG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __FUNCTION__);
+ /* TODO */
+ break;
+
+ case OID_802_3_RCV_OVERRUN:
+ DEBUG("%s: OID_802_3_RCV_OVERRUN\n", __FUNCTION__);
+ /* TODO */
+ break;
+
+ case OID_802_3_XMIT_UNDERRUN:
+ DEBUG("%s: OID_802_3_XMIT_UNDERRUN\n", __FUNCTION__);
+ /* TODO */
+ break;
+
+ case OID_802_3_XMIT_HEARTBEAT_FAILURE:
+ DEBUG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __FUNCTION__);
+ /* TODO */
+ break;
+
+ case OID_802_3_XMIT_TIMES_CRS_LOST:
+ DEBUG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __FUNCTION__);
+ /* TODO */
+ break;
+
+ case OID_802_3_XMIT_LATE_COLLISIONS:
+ DEBUG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __FUNCTION__);
+ /* TODO */
+ break;
+#endif /* RNDIS_OPTIONAL_STATS */
+
+#ifdef RNDIS_PM
+ /* power management OIDs (table 4-5) */
+ case OID_PNP_CAPABILITIES:
+ DEBUG("%s: OID_PNP_CAPABILITIES\n", __FUNCTION__);
+
+ /* just PM, and remote wakeup on link status change
+ * (not magic packet or pattern match)
+ */
+ length = sizeof (struct NDIS_PNP_CAPABILITIES);
+ memset (resp, 0, length);
+ {
+ struct NDIS_PNP_CAPABILITIES *caps = (void *) resp;
+
+ caps->Flags = NDIS_DEVICE_WAKE_UP_ENABLE;
+ caps->WakeUpCapabilities.MinLinkChangeWakeUp
+ = NdisDeviceStateD3;
+
+ /* FIXME then use usb_gadget_wakeup(), and
+ * set USB_CONFIG_ATT_WAKEUP in config desc
+ */
+ }
+ retval = 0;
+ break;
+ case OID_PNP_QUERY_POWER:
+ DEBUG("%s: OID_PNP_QUERY_POWER\n", __FUNCTION__);
+ /* sure, handle any power state that maps to USB suspend */
+ retval = 0;
+ break;
+#endif
+
+ default:
+ printk (KERN_WARNING "%s: query unknown OID 0x%08X\n",
+ __FUNCTION__, OID);
+ }
+
+ resp->InformationBufferOffset = __constant_cpu_to_le32 (16);
+ resp->InformationBufferLength = cpu_to_le32 (length);
+ resp->MessageLength = cpu_to_le32 (24 + length);
+ r->length = 24 + length;
+ return retval;
+}
+
+static int gen_ndis_set_resp (u8 configNr, u32 OID, u8 *buf, u32 buf_len,
+ rndis_resp_t *r)
+{
+ rndis_set_cmplt_type *resp;
+ int i, retval = -ENOTSUPP;
+ struct rndis_params *params;
+
+ if (!r)
+ return -ENOMEM;
+ resp = (rndis_set_cmplt_type *) r->buf;
+ if (!resp)
+ return -ENOMEM;
+
+ DEBUG("set OID %08x value, len %d:\n", OID, buf_len);
+ for (i = 0; i < buf_len; i += 16) {
+ DEBUG ("%03d: "
+ " %02x %02x %02x %02x"
+ " %02x %02x %02x %02x"
+ " %02x %02x %02x %02x"
+ " %02x %02x %02x %02x"
+ "\n",
+ i,
+ buf[i], buf [i+1],
+ buf[i+2], buf[i+3],
+ buf[i+4], buf [i+5],
+ buf[i+6], buf[i+7],
+ buf[i+8], buf [i+9],
+ buf[i+10], buf[i+11],
+ buf[i+12], buf [i+13],
+ buf[i+14], buf[i+15]);
+ }
+
+ switch (OID) {
+ case OID_GEN_CURRENT_PACKET_FILTER:
+ params = &rndis_per_dev_params [configNr];
+ retval = 0;
+
+ /* FIXME use these NDIS_PACKET_TYPE_* bitflags to
+ * filter packets in hard_start_xmit()
+ * NDIS_PACKET_TYPE_x == USB_CDC_PACKET_TYPE_x for x in:
+ * PROMISCUOUS, DIRECTED,
+ * MULTICAST, ALL_MULTICAST, BROADCAST
+ */
+ params->filter = le32_to_cpup((__le32 *)buf);
+ DEBUG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n",
+ __FUNCTION__, params->filter);
+
+ /* this call has a significant side effect: it's
+ * what makes the packet flow start and stop, like
+ * activating the CDC Ethernet altsetting.
+ */
+ if (params->filter) {
+ params->state = RNDIS_DATA_INITIALIZED;
+ netif_carrier_on(params->dev);
+ if (netif_running(params->dev))
+ netif_wake_queue (params->dev);
+ } else {
+ params->state = RNDIS_INITIALIZED;
+ netif_carrier_off (params->dev);
+ netif_stop_queue (params->dev);
+ }
+ break;
+
+ case OID_802_3_MULTICAST_LIST:
+ /* I think we can ignore this */
+ DEBUG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__);
+ retval = 0;
+ break;
+#if 0
+ case OID_GEN_RNDIS_CONFIG_PARAMETER:
+ {
+ struct rndis_config_parameter *param;
+ param = (struct rndis_config_parameter *) buf;
+ DEBUG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n",
+ __FUNCTION__,
+ min(cpu_to_le32(param->ParameterNameLength),80),
+ buf + param->ParameterNameOffset);
+ retval = 0;
+ }
+ break;
+#endif
+
+#ifdef RNDIS_PM
+ case OID_PNP_SET_POWER:
+ DEBUG ("OID_PNP_SET_POWER\n");
+ /* sure, handle any power state that maps to USB suspend */
+ retval = 0;
+ break;
+
+ case OID_PNP_ENABLE_WAKE_UP:
+ /* always-connected ... */
+ DEBUG ("OID_PNP_ENABLE_WAKE_UP\n");
+ retval = 0;
+ break;
+
+ // no PM resume patterns supported (specified where?)
+ // so OID_PNP_{ADD,REMOVE}_WAKE_UP_PATTERN always fails
+#endif
+
+ default:
+ printk (KERN_WARNING "%s: set unknown OID 0x%08X, size %d\n",
+ __FUNCTION__, OID, buf_len);
+ }
+
+ return retval;
+}
+
+/*
+ * Response Functions
+ */
+
+static int rndis_init_response (int configNr, rndis_init_msg_type *buf)
+{
+ rndis_init_cmplt_type *resp;
+ rndis_resp_t *r;
+
+ if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP;
+
+ r = rndis_add_response (configNr, sizeof (rndis_init_cmplt_type));
+
+ if (!r) return -ENOMEM;
+
+ resp = (rndis_init_cmplt_type *) r->buf;
+
+ if (!resp) return -ENOMEM;
+
+ resp->MessageType = __constant_cpu_to_le32 (
+ REMOTE_NDIS_INITIALIZE_CMPLT);
+ resp->MessageLength = __constant_cpu_to_le32 (52);
+ resp->RequestID = buf->RequestID; /* Still LE in msg buffer */
+ resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
+ resp->MajorVersion = __constant_cpu_to_le32 (RNDIS_MAJOR_VERSION);
+ resp->MinorVersion = __constant_cpu_to_le32 (RNDIS_MINOR_VERSION);
+ resp->DeviceFlags = __constant_cpu_to_le32 (RNDIS_DF_CONNECTIONLESS);
+ resp->Medium = __constant_cpu_to_le32 (RNDIS_MEDIUM_802_3);
+ resp->MaxPacketsPerTransfer = __constant_cpu_to_le32 (1);
+ resp->MaxTransferSize = cpu_to_le32 (
+ rndis_per_dev_params [configNr].dev->mtu
+ + sizeof (struct ethhdr)
+ + sizeof (struct rndis_packet_msg_type)
+ + 22);
+ resp->PacketAlignmentFactor = __constant_cpu_to_le32 (0);
+ resp->AFListOffset = __constant_cpu_to_le32 (0);
+ resp->AFListSize = __constant_cpu_to_le32 (0);
+
+ if (rndis_per_dev_params [configNr].ack)
+ rndis_per_dev_params [configNr].ack (
+ rndis_per_dev_params [configNr].dev);
+
+ return 0;
+}
+
+static int rndis_query_response (int configNr, rndis_query_msg_type *buf)
+{
+ rndis_query_cmplt_type *resp;
+ rndis_resp_t *r;
+
+ // DEBUG("%s: OID = %08X\n", __FUNCTION__, cpu_to_le32(buf->OID));
+ if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP;
+
+ /*
+ * we need more memory:
+ * oid_supported_list is the largest answer
+ */
+ r = rndis_add_response (configNr, sizeof (oid_supported_list));
+
+ if (!r) return -ENOMEM;
+ resp = (rndis_query_cmplt_type *) r->buf;
+
+ if (!resp) return -ENOMEM;
+
+ resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_QUERY_CMPLT);
+ resp->MessageLength = __constant_cpu_to_le32 (24);
+ resp->RequestID = buf->RequestID; /* Still LE in msg buffer */
+
+ if (gen_ndis_query_resp (configNr, le32_to_cpu (buf->OID), r)) {
+ /* OID not supported */
+ resp->Status = __constant_cpu_to_le32 (
+ RNDIS_STATUS_NOT_SUPPORTED);
+ resp->InformationBufferLength = __constant_cpu_to_le32 (0);
+ resp->InformationBufferOffset = __constant_cpu_to_le32 (0);
+ } else
+ resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
+
+ if (rndis_per_dev_params [configNr].ack)
+ rndis_per_dev_params [configNr].ack (
+ rndis_per_dev_params [configNr].dev);
+ return 0;
+}
+
+static int rndis_set_response (int configNr, rndis_set_msg_type *buf)
+{
+ u32 BufLength, BufOffset;
+ rndis_set_cmplt_type *resp;
+ rndis_resp_t *r;
+
+ r = rndis_add_response (configNr, sizeof (rndis_set_cmplt_type));
+
+ if (!r) return -ENOMEM;
+ resp = (rndis_set_cmplt_type *) r->buf;
+ if (!resp) return -ENOMEM;
+
+ BufLength = le32_to_cpu (buf->InformationBufferLength);
+ BufOffset = le32_to_cpu (buf->InformationBufferOffset);
+
+#ifdef VERBOSE
+ DEBUG("%s: Length: %d\n", __FUNCTION__, BufLength);
+ DEBUG("%s: Offset: %d\n", __FUNCTION__, BufOffset);
+ DEBUG("%s: InfoBuffer: ", __FUNCTION__);
+
+ for (i = 0; i < BufLength; i++) {
+ DEBUG ("%02x ", *(((u8 *) buf) + i + 8 + BufOffset));
+ }
+
+ DEBUG ("\n");
+#endif
+
+ resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_SET_CMPLT);
+ resp->MessageLength = __constant_cpu_to_le32 (16);
+ resp->RequestID = buf->RequestID; /* Still LE in msg buffer */
+ if (gen_ndis_set_resp (configNr, le32_to_cpu (buf->OID),
+ ((u8 *) buf) + 8 + BufOffset, BufLength, r))
+ resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_NOT_SUPPORTED);
+ else resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
+
+ if (rndis_per_dev_params [configNr].ack)
+ rndis_per_dev_params [configNr].ack (
+ rndis_per_dev_params [configNr].dev);
+
+ return 0;
+}
+
+static int rndis_reset_response (int configNr, rndis_reset_msg_type *buf)
+{
+ rndis_reset_cmplt_type *resp;
+ rndis_resp_t *r;
+
+ r = rndis_add_response (configNr, sizeof (rndis_reset_cmplt_type));
+
+ if (!r) return -ENOMEM;
+ resp = (rndis_reset_cmplt_type *) r->buf;
+ if (!resp) return -ENOMEM;
+
+ resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_RESET_CMPLT);
+ resp->MessageLength = __constant_cpu_to_le32 (16);
+ resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
+ /* resent information */
+ resp->AddressingReset = __constant_cpu_to_le32 (1);
+
+ if (rndis_per_dev_params [configNr].ack)
+ rndis_per_dev_params [configNr].ack (
+ rndis_per_dev_params [configNr].dev);
+
+ return 0;
+}
+
+static int rndis_keepalive_response (int configNr,
+ rndis_keepalive_msg_type *buf)
+{
+ rndis_keepalive_cmplt_type *resp;
+ rndis_resp_t *r;
+
+ /* host "should" check only in RNDIS_DATA_INITIALIZED state */
+
+ r = rndis_add_response (configNr, sizeof (rndis_keepalive_cmplt_type));
+ resp = (rndis_keepalive_cmplt_type *) r->buf;
+ if (!resp) return -ENOMEM;
+
+ resp->MessageType = __constant_cpu_to_le32 (
+ REMOTE_NDIS_KEEPALIVE_CMPLT);
+ resp->MessageLength = __constant_cpu_to_le32 (16);
+ resp->RequestID = buf->RequestID; /* Still LE in msg buffer */
+ resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
+
+ if (rndis_per_dev_params [configNr].ack)
+ rndis_per_dev_params [configNr].ack (
+ rndis_per_dev_params [configNr].dev);
+
+ return 0;
+}
+
+
+/*
+ * Device to Host Comunication
+ */
+static int rndis_indicate_status_msg (int configNr, u32 status)
+{
+ rndis_indicate_status_msg_type *resp;
+ rndis_resp_t *r;
+
+ if (rndis_per_dev_params [configNr].state == RNDIS_UNINITIALIZED)
+ return -ENOTSUPP;
+
+ r = rndis_add_response (configNr,
+ sizeof (rndis_indicate_status_msg_type));
+ if (!r) return -ENOMEM;
+
+ resp = (rndis_indicate_status_msg_type *) r->buf;
+ if (!resp) return -ENOMEM;
+
+ resp->MessageType = __constant_cpu_to_le32 (
+ REMOTE_NDIS_INDICATE_STATUS_MSG);
+ resp->MessageLength = __constant_cpu_to_le32 (20);
+ resp->Status = cpu_to_le32 (status);
+ resp->StatusBufferLength = __constant_cpu_to_le32 (0);
+ resp->StatusBufferOffset = __constant_cpu_to_le32 (0);
+
+ if (rndis_per_dev_params [configNr].ack)
+ rndis_per_dev_params [configNr].ack (
+ rndis_per_dev_params [configNr].dev);
+ return 0;
+}
+
+int rndis_signal_connect (int configNr)
+{
+ rndis_per_dev_params [configNr].media_state
+ = NDIS_MEDIA_STATE_CONNECTED;
+ return rndis_indicate_status_msg (configNr,
+ RNDIS_STATUS_MEDIA_CONNECT);
+}
+
+int rndis_signal_disconnect (int configNr)
+{
+ rndis_per_dev_params [configNr].media_state
+ = NDIS_MEDIA_STATE_DISCONNECTED;
+ return rndis_indicate_status_msg (configNr,
+ RNDIS_STATUS_MEDIA_DISCONNECT);
+}
+
+void rndis_set_host_mac (int configNr, const u8 *addr)
+{
+ rndis_per_dev_params [configNr].host_mac = addr;
+}
+
+/*
+ * Message Parser
+ */
+int rndis_msg_parser (u8 configNr, u8 *buf)
+{
+ u32 MsgType, MsgLength;
+ __le32 *tmp;
+ struct rndis_params *params;
+
+ if (!buf)
+ return -ENOMEM;
+
+ tmp = (__le32 *) buf;
+ MsgType = le32_to_cpup(tmp++);
+ MsgLength = le32_to_cpup(tmp++);
+
+ if (configNr >= RNDIS_MAX_CONFIGS)
+ return -ENOTSUPP;
+ params = &rndis_per_dev_params [configNr];
+
+ /* For USB: responses may take up to 10 seconds */
+ switch (MsgType)
+ {
+ case REMOTE_NDIS_INITIALIZE_MSG:
+ DEBUG("%s: REMOTE_NDIS_INITIALIZE_MSG\n",
+ __FUNCTION__ );
+ params->state = RNDIS_INITIALIZED;
+ return rndis_init_response (configNr,
+ (rndis_init_msg_type *) buf);
+
+ case REMOTE_NDIS_HALT_MSG:
+ DEBUG("%s: REMOTE_NDIS_HALT_MSG\n",
+ __FUNCTION__ );
+ params->state = RNDIS_UNINITIALIZED;
+ if (params->dev) {
+ netif_carrier_off (params->dev);
+ netif_stop_queue (params->dev);
+ }
+ return 0;
+
+ case REMOTE_NDIS_QUERY_MSG:
+ return rndis_query_response (configNr,
+ (rndis_query_msg_type *) buf);
+
+ case REMOTE_NDIS_SET_MSG:
+ return rndis_set_response (configNr,
+ (rndis_set_msg_type *) buf);
+
+ case REMOTE_NDIS_RESET_MSG:
+ DEBUG("%s: REMOTE_NDIS_RESET_MSG\n",
+ __FUNCTION__ );
+ return rndis_reset_response (configNr,
+ (rndis_reset_msg_type *) buf);
+
+ case REMOTE_NDIS_KEEPALIVE_MSG:
+ /* For USB: host does this every 5 seconds */
+#ifdef VERBOSE
+ DEBUG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n",
+ __FUNCTION__ );
+#endif
+ return rndis_keepalive_response (configNr,
+ (rndis_keepalive_msg_type *)
+ buf);
+
+ default:
+ /* At least Windows XP emits some undefined RNDIS messages.
+ * In one case those messages seemed to relate to the host
+ * suspending itself.
+ */
+ printk (KERN_WARNING
+ "%s: unknown RNDIS message 0x%08X len %d\n",
+ __FUNCTION__ , MsgType, MsgLength);
+ {
+ unsigned i;
+ for (i = 0; i < MsgLength; i += 16) {
+ DEBUG ("%03d: "
+ " %02x %02x %02x %02x"
+ " %02x %02x %02x %02x"
+ " %02x %02x %02x %02x"
+ " %02x %02x %02x %02x"
+ "\n",
+ i,
+ buf[i], buf [i+1],
+ buf[i+2], buf[i+3],
+ buf[i+4], buf [i+5],
+ buf[i+6], buf[i+7],
+ buf[i+8], buf [i+9],
+ buf[i+10], buf[i+11],
+ buf[i+12], buf [i+13],
+ buf[i+14], buf[i+15]);
+ }
+ }
+ break;
+ }
+
+ return -ENOTSUPP;
+}
+
+int rndis_register (int (* rndis_control_ack) (struct net_device *))
+{
+ u8 i;
+
+ for (i = 0; i < RNDIS_MAX_CONFIGS; i++) {
+ if (!rndis_per_dev_params [i].used) {
+ rndis_per_dev_params [i].used = 1;
+ rndis_per_dev_params [i].ack = rndis_control_ack;
+ DEBUG("%s: configNr = %d\n", __FUNCTION__, i);
+ return i;
+ }
+ }
+ DEBUG("failed\n");
+
+ return -1;
+}
+
+void rndis_deregister (int configNr)
+{
+ DEBUG("%s: \n", __FUNCTION__ );
+
+ if (configNr >= RNDIS_MAX_CONFIGS) return;
+ rndis_per_dev_params [configNr].used = 0;
+
+ return;
+}
+
+int rndis_set_param_dev (u8 configNr, struct net_device *dev,
+ struct net_device_stats *stats)
+{
+ DEBUG("%s:\n", __FUNCTION__ );
+ if (!dev || !stats) return -1;
+ if (configNr >= RNDIS_MAX_CONFIGS) return -1;
+
+ rndis_per_dev_params [configNr].dev = dev;
+ rndis_per_dev_params [configNr].stats = stats;
+
+ return 0;
+}
+
+int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr)
+{
+ DEBUG("%s:\n", __FUNCTION__ );
+ if (!vendorDescr) return -1;
+ if (configNr >= RNDIS_MAX_CONFIGS) return -1;
+
+ rndis_per_dev_params [configNr].vendorID = vendorID;
+ rndis_per_dev_params [configNr].vendorDescr = vendorDescr;
+
+ return 0;
+}
+
+int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed)
+{
+ DEBUG("%s:\n", __FUNCTION__ );
+ if (configNr >= RNDIS_MAX_CONFIGS) return -1;
+
+ rndis_per_dev_params [configNr].medium = medium;
+ rndis_per_dev_params [configNr].speed = speed;
+
+ return 0;
+}
+
+void rndis_add_hdr (struct sk_buff *skb)
+{
+ struct rndis_packet_msg_type *header;
+
+ if (!skb)
+ return;
+ header = (void *) skb_push (skb, sizeof *header);
+ memset (header, 0, sizeof *header);
+ header->MessageType = __constant_cpu_to_le32 (1);
+ header->MessageLength = cpu_to_le32(skb->len);
+ header->DataOffset = __constant_cpu_to_le32 (36);
+ header->OOBDataOffset = cpu_to_le32(skb->len - 44);
+}
+
+void rndis_free_response (int configNr, u8 *buf)
+{
+ rndis_resp_t *r;
+ struct list_head *act, *tmp;
+
+ list_for_each_safe (act, tmp,
+ &(rndis_per_dev_params [configNr].resp_queue))
+ {
+ r = list_entry (act, rndis_resp_t, list);
+ if (r && r->buf == buf) {
+ list_del (&r->list);
+ kfree (r);
+ }
+ }
+}
+
+u8 *rndis_get_next_response (int configNr, u32 *length)
+{
+ rndis_resp_t *r;
+ struct list_head *act, *tmp;
+
+ if (!length) return NULL;
+
+ list_for_each_safe (act, tmp,
+ &(rndis_per_dev_params [configNr].resp_queue))
+ {
+ r = list_entry (act, rndis_resp_t, list);
+ if (!r->send) {
+ r->send = 1;
+ *length = r->length;
+ return r->buf;
+ }
+ }
+
+ return NULL;
+}
+
+static rndis_resp_t *rndis_add_response (int configNr, u32 length)
+{
+ rndis_resp_t *r;
+
+ r = kmalloc (sizeof (rndis_resp_t) + length, GFP_ATOMIC);
+ if (!r) return NULL;
+
+ r->buf = (u8 *) (r + 1);
+ r->length = length;
+ r->send = 0;
+
+ list_add_tail (&r->list,
+ &(rndis_per_dev_params [configNr].resp_queue));
+ return r;
+}
+
+int rndis_rm_hdr (u8 *buf, u32 *length)
+{
+ u32 i, messageLen, dataOffset;
+ __le32 *tmp;
+
+ tmp = (__le32 *) buf;
+
+ if (!buf || !length) return -1;
+ if (le32_to_cpup(tmp++) != 1) return -1;
+
+ messageLen = le32_to_cpup(tmp++);
+ dataOffset = le32_to_cpup(tmp++) + 8;
+
+ if (messageLen < dataOffset || messageLen > *length) return -1;
+
+ for (i = dataOffset; i < messageLen; i++)
+ buf [i - dataOffset] = buf [i];
+
+ *length = messageLen - dataOffset;
+
+ return 0;
+}
+
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+
+static int rndis_proc_read (char *page, char **start, off_t off, int count, int *eof,
+ void *data)
+{
+ char *out = page;
+ int len;
+ rndis_params *param = (rndis_params *) data;
+
+ out += snprintf (out, count,
+ "Config Nr. %d\n"
+ "used : %s\n"
+ "state : %s\n"
+ "medium : 0x%08X\n"
+ "speed : %d\n"
+ "cable : %s\n"
+ "vendor ID : 0x%08X\n"
+ "vendor : %s\n",
+ param->confignr, (param->used) ? "y" : "n",
+ ({ char *s = "?";
+ switch (param->state) {
+ case RNDIS_UNINITIALIZED:
+ s = "RNDIS_UNINITIALIZED"; break;
+ case RNDIS_INITIALIZED:
+ s = "RNDIS_INITIALIZED"; break;
+ case RNDIS_DATA_INITIALIZED:
+ s = "RNDIS_DATA_INITIALIZED"; break;
+ }; s; }),
+ param->medium,
+ (param->media_state) ? 0 : param->speed*100,
+ (param->media_state) ? "disconnected" : "connected",
+ param->vendorID, param->vendorDescr);
+
+ len = out - page;
+ len -= off;
+
+ if (len < count) {
+ *eof = 1;
+ if (len <= 0)
+ return 0;
+ } else
+ len = count;
+
+ *start = page + off;
+ return len;
+}
+
+static int rndis_proc_write (struct file *file, const char __user *buffer,
+ unsigned long count, void *data)
+{
+ rndis_params *p = data;
+ u32 speed = 0;
+ int i, fl_speed = 0;
+
+ for (i = 0; i < count; i++) {
+ char c;
+ if (get_user(c, buffer))
+ return -EFAULT;
+ switch (c) {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ fl_speed = 1;
+ speed = speed*10 + c - '0';
+ break;
+ case 'C':
+ case 'c':
+ rndis_signal_connect (p->confignr);
+ break;
+ case 'D':
+ case 'd':
+ rndis_signal_disconnect(p->confignr);
+ break;
+ default:
+ if (fl_speed) p->speed = speed;
+ else DEBUG ("%c is not valid\n", c);
+ break;
+ }
+
+ buffer++;
+ }
+
+ return count;
+}
+
+#define NAME_TEMPLATE "driver/rndis-%03d"
+
+static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS];
+
+#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+
+int __init rndis_init (void)
+{
+ u8 i;
+
+ for (i = 0; i < RNDIS_MAX_CONFIGS; i++) {
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+ char name [20];
+
+ sprintf (name, NAME_TEMPLATE, i);
+ if (!(rndis_connect_state [i]
+ = create_proc_entry (name, 0660, NULL)))
+ {
+ DEBUG ("%s :remove entries", __FUNCTION__);
+ while (i) {
+ sprintf (name, NAME_TEMPLATE, --i);
+ remove_proc_entry (name, NULL);
+ }
+ DEBUG ("\n");
+ return -EIO;
+ }
+
+ rndis_connect_state [i]->nlink = 1;
+ rndis_connect_state [i]->write_proc = rndis_proc_write;
+ rndis_connect_state [i]->read_proc = rndis_proc_read;
+ rndis_connect_state [i]->data = (void *)
+ (rndis_per_dev_params + i);
+#endif
+ rndis_per_dev_params [i].confignr = i;
+ rndis_per_dev_params [i].used = 0;
+ rndis_per_dev_params [i].state = RNDIS_UNINITIALIZED;
+ rndis_per_dev_params [i].media_state
+ = NDIS_MEDIA_STATE_DISCONNECTED;
+ INIT_LIST_HEAD (&(rndis_per_dev_params [i].resp_queue));
+ }
+
+ return 0;
+}
+
+void rndis_exit (void)
+{
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+ u8 i;
+ char name [20];
+
+ for (i = 0; i < RNDIS_MAX_CONFIGS; i++) {
+ sprintf (name, NAME_TEMPLATE, i);
+ remove_proc_entry (name, NULL);
+ }
+#endif
+}
+
diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h
new file mode 100644
index 000000000000..822501852c50
--- /dev/null
+++ b/drivers/usb/gadget/rndis.h
@@ -0,0 +1,348 @@
+/*
+ * RNDIS Definitions for Remote NDIS
+ *
+ * Version: $Id: rndis.h,v 1.15 2004/03/25 21:33:46 robert Exp $
+ *
+ * Authors: Benedikt Spranger, Pengutronix
+ * Robert Schwebel, Pengutronix
+ *
+ * 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 software was originally developed in conformance with
+ * Microsoft's Remote NDIS Specification License Agreement.
+ */
+
+#ifndef _LINUX_RNDIS_H
+#define _LINUX_RNDIS_H
+
+#include "ndis.h"
+
+#define RNDIS_MAXIMUM_FRAME_SIZE 1518
+#define RNDIS_MAX_TOTAL_SIZE 1558
+
+/* Remote NDIS Versions */
+#define RNDIS_MAJOR_VERSION 1
+#define RNDIS_MINOR_VERSION 0
+
+/* Status Values */
+#define RNDIS_STATUS_SUCCESS 0x00000000U /* Success */
+#define RNDIS_STATUS_FAILURE 0xC0000001U /* Unspecified error */
+#define RNDIS_STATUS_INVALID_DATA 0xC0010015U /* Invalid data */
+#define RNDIS_STATUS_NOT_SUPPORTED 0xC00000BBU /* Unsupported request */
+#define RNDIS_STATUS_MEDIA_CONNECT 0x4001000BU /* Device connected */
+#define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000CU /* Device disconnected */
+/* For all not specified status messages:
+ * RNDIS_STATUS_Xxx -> NDIS_STATUS_Xxx
+ */
+
+/* Message Set for Connectionless (802.3) Devices */
+#define REMOTE_NDIS_INITIALIZE_MSG 0x00000002U /* Initialize device */
+#define REMOTE_NDIS_HALT_MSG 0x00000003U
+#define REMOTE_NDIS_QUERY_MSG 0x00000004U
+#define REMOTE_NDIS_SET_MSG 0x00000005U
+#define REMOTE_NDIS_RESET_MSG 0x00000006U
+#define REMOTE_NDIS_INDICATE_STATUS_MSG 0x00000007U
+#define REMOTE_NDIS_KEEPALIVE_MSG 0x00000008U
+
+/* Message completion */
+#define REMOTE_NDIS_INITIALIZE_CMPLT 0x80000002U
+#define REMOTE_NDIS_QUERY_CMPLT 0x80000004U
+#define REMOTE_NDIS_SET_CMPLT 0x80000005U
+#define REMOTE_NDIS_RESET_CMPLT 0x80000006U
+#define REMOTE_NDIS_KEEPALIVE_CMPLT 0x80000008U
+
+/* Device Flags */
+#define RNDIS_DF_CONNECTIONLESS 0x00000001U
+#define RNDIS_DF_CONNECTION_ORIENTED 0x00000002U
+
+#define RNDIS_MEDIUM_802_3 0x00000000U
+
+/* from drivers/net/sk98lin/h/skgepnmi.h */
+#define OID_PNP_CAPABILITIES 0xFD010100
+#define OID_PNP_SET_POWER 0xFD010101
+#define OID_PNP_QUERY_POWER 0xFD010102
+#define OID_PNP_ADD_WAKE_UP_PATTERN 0xFD010103
+#define OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104
+#define OID_PNP_ENABLE_WAKE_UP 0xFD010106
+
+
+/* supported OIDs */
+static const u32 oid_supported_list [] =
+{
+ /* the general stuff */
+ OID_GEN_SUPPORTED_LIST,
+ OID_GEN_HARDWARE_STATUS,
+ OID_GEN_MEDIA_SUPPORTED,
+ OID_GEN_MEDIA_IN_USE,
+ OID_GEN_MAXIMUM_FRAME_SIZE,
+ OID_GEN_LINK_SPEED,
+ OID_GEN_TRANSMIT_BLOCK_SIZE,
+ OID_GEN_RECEIVE_BLOCK_SIZE,
+ OID_GEN_VENDOR_ID,
+ OID_GEN_VENDOR_DESCRIPTION,
+ OID_GEN_VENDOR_DRIVER_VERSION,
+ OID_GEN_CURRENT_PACKET_FILTER,
+ OID_GEN_MAXIMUM_TOTAL_SIZE,
+ OID_GEN_MEDIA_CONNECT_STATUS,
+ OID_GEN_PHYSICAL_MEDIUM,
+#if 0
+ OID_GEN_RNDIS_CONFIG_PARAMETER,
+#endif
+
+ /* the statistical stuff */
+ OID_GEN_XMIT_OK,
+ OID_GEN_RCV_OK,
+ OID_GEN_XMIT_ERROR,
+ OID_GEN_RCV_ERROR,
+ OID_GEN_RCV_NO_BUFFER,
+#ifdef RNDIS_OPTIONAL_STATS
+ OID_GEN_DIRECTED_BYTES_XMIT,
+ OID_GEN_DIRECTED_FRAMES_XMIT,
+ OID_GEN_MULTICAST_BYTES_XMIT,
+ OID_GEN_MULTICAST_FRAMES_XMIT,
+ OID_GEN_BROADCAST_BYTES_XMIT,
+ OID_GEN_BROADCAST_FRAMES_XMIT,
+ OID_GEN_DIRECTED_BYTES_RCV,
+ OID_GEN_DIRECTED_FRAMES_RCV,
+ OID_GEN_MULTICAST_BYTES_RCV,
+ OID_GEN_MULTICAST_FRAMES_RCV,
+ OID_GEN_BROADCAST_BYTES_RCV,
+ OID_GEN_BROADCAST_FRAMES_RCV,
+ OID_GEN_RCV_CRC_ERROR,
+ OID_GEN_TRANSMIT_QUEUE_LENGTH,
+#endif /* RNDIS_OPTIONAL_STATS */
+
+ /* mandatory 802.3 */
+ /* the general stuff */
+ OID_802_3_PERMANENT_ADDRESS,
+ OID_802_3_CURRENT_ADDRESS,
+ OID_802_3_MULTICAST_LIST,
+ OID_802_3_MAC_OPTIONS,
+ OID_802_3_MAXIMUM_LIST_SIZE,
+
+ /* the statistical stuff */
+ OID_802_3_RCV_ERROR_ALIGNMENT,
+ OID_802_3_XMIT_ONE_COLLISION,
+ OID_802_3_XMIT_MORE_COLLISIONS,
+#ifdef RNDIS_OPTIONAL_STATS
+ OID_802_3_XMIT_DEFERRED,
+ OID_802_3_XMIT_MAX_COLLISIONS,
+ OID_802_3_RCV_OVERRUN,
+ OID_802_3_XMIT_UNDERRUN,
+ OID_802_3_XMIT_HEARTBEAT_FAILURE,
+ OID_802_3_XMIT_TIMES_CRS_LOST,
+ OID_802_3_XMIT_LATE_COLLISIONS,
+#endif /* RNDIS_OPTIONAL_STATS */
+
+#ifdef RNDIS_PM
+ /* PM and wakeup are mandatory for USB: */
+
+ /* power management */
+ OID_PNP_CAPABILITIES,
+ OID_PNP_QUERY_POWER,
+ OID_PNP_SET_POWER,
+
+ /* wake up host */
+ OID_PNP_ENABLE_WAKE_UP,
+ OID_PNP_ADD_WAKE_UP_PATTERN,
+ OID_PNP_REMOVE_WAKE_UP_PATTERN,
+#endif
+};
+
+
+typedef struct rndis_init_msg_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 RequestID;
+ __le32 MajorVersion;
+ __le32 MinorVersion;
+ __le32 MaxTransferSize;
+} rndis_init_msg_type;
+
+typedef struct rndis_init_cmplt_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 RequestID;
+ __le32 Status;
+ __le32 MajorVersion;
+ __le32 MinorVersion;
+ __le32 DeviceFlags;
+ __le32 Medium;
+ __le32 MaxPacketsPerTransfer;
+ __le32 MaxTransferSize;
+ __le32 PacketAlignmentFactor;
+ __le32 AFListOffset;
+ __le32 AFListSize;
+} rndis_init_cmplt_type;
+
+typedef struct rndis_halt_msg_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 RequestID;
+} rndis_halt_msg_type;
+
+typedef struct rndis_query_msg_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 RequestID;
+ __le32 OID;
+ __le32 InformationBufferLength;
+ __le32 InformationBufferOffset;
+ __le32 DeviceVcHandle;
+} rndis_query_msg_type;
+
+typedef struct rndis_query_cmplt_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 RequestID;
+ __le32 Status;
+ __le32 InformationBufferLength;
+ __le32 InformationBufferOffset;
+} rndis_query_cmplt_type;
+
+typedef struct rndis_set_msg_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 RequestID;
+ __le32 OID;
+ __le32 InformationBufferLength;
+ __le32 InformationBufferOffset;
+ __le32 DeviceVcHandle;
+} rndis_set_msg_type;
+
+typedef struct rndis_set_cmplt_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 RequestID;
+ __le32 Status;
+} rndis_set_cmplt_type;
+
+typedef struct rndis_reset_msg_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 Reserved;
+} rndis_reset_msg_type;
+
+typedef struct rndis_reset_cmplt_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 Status;
+ __le32 AddressingReset;
+} rndis_reset_cmplt_type;
+
+typedef struct rndis_indicate_status_msg_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 Status;
+ __le32 StatusBufferLength;
+ __le32 StatusBufferOffset;
+} rndis_indicate_status_msg_type;
+
+typedef struct rndis_keepalive_msg_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 RequestID;
+} rndis_keepalive_msg_type;
+
+typedef struct rndis_keepalive_cmplt_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 RequestID;
+ __le32 Status;
+} rndis_keepalive_cmplt_type;
+
+struct rndis_packet_msg_type
+{
+ __le32 MessageType;
+ __le32 MessageLength;
+ __le32 DataOffset;
+ __le32 DataLength;
+ __le32 OOBDataOffset;
+ __le32 OOBDataLength;
+ __le32 NumOOBDataElements;
+ __le32 PerPacketInfoOffset;
+ __le32 PerPacketInfoLength;
+ __le32 VcHandle;
+ __le32 Reserved;
+};
+
+struct rndis_config_parameter
+{
+ __le32 ParameterNameOffset;
+ __le32 ParameterNameLength;
+ __le32 ParameterType;
+ __le32 ParameterValueOffset;
+ __le32 ParameterValueLength;
+};
+
+/* implementation specific */
+enum rndis_state
+{
+ RNDIS_UNINITIALIZED,
+ RNDIS_INITIALIZED,
+ RNDIS_DATA_INITIALIZED,
+};
+
+typedef struct rndis_resp_t
+{
+ struct list_head list;
+ u8 *buf;
+ u32 length;
+ int send;
+} rndis_resp_t;
+
+typedef struct rndis_params
+{
+ u8 confignr;
+ int used;
+ enum rndis_state state;
+ u32 filter;
+ u32 medium;
+ u32 speed;
+ u32 media_state;
+ const u8 *host_mac;
+ struct net_device *dev;
+ struct net_device_stats *stats;
+ u32 vendorID;
+ const char *vendorDescr;
+ int (*ack) (struct net_device *);
+ struct list_head resp_queue;
+} rndis_params;
+
+/* RNDIS Message parser and other useless functions */
+int rndis_msg_parser (u8 configNr, u8 *buf);
+int rndis_register (int (*rndis_control_ack) (struct net_device *));
+void rndis_deregister (int configNr);
+int rndis_set_param_dev (u8 configNr, struct net_device *dev,
+ struct net_device_stats *stats);
+int rndis_set_param_vendor (u8 configNr, u32 vendorID,
+ const char *vendorDescr);
+int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed);
+void rndis_add_hdr (struct sk_buff *skb);
+int rndis_rm_hdr (u8 *buf, u32 *length);
+u8 *rndis_get_next_response (int configNr, u32 *length);
+void rndis_free_response (int configNr, u8 *buf);
+
+int rndis_signal_connect (int configNr);
+int rndis_signal_disconnect (int configNr);
+int rndis_state (int configNr);
+extern void rndis_set_host_mac (int configNr, const u8 *addr);
+
+int __init rndis_init (void);
+void rndis_exit (void);
+
+#endif /* _LINUX_RNDIS_H */
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
new file mode 100644
index 000000000000..2af3f785d5a1
--- /dev/null
+++ b/drivers/usb/gadget/serial.c
@@ -0,0 +1,2436 @@
+/*
+ * g_serial.c -- USB gadget serial driver
+ *
+ * Copyright 2003 (C) Al Borchers (alborchers@steinerpoint.com)
+ *
+ * This code is based in part on the Gadget Zero driver, which
+ * is Copyright (C) 2003 by David Brownell, all rights reserved.
+ *
+ * This code also borrows from usbserial.c, which is
+ * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
+ * Copyright (C) 2000 Peter Berger (pberger@brimson.com)
+ * Copyright (C) 2000 Al Borchers (alborchers@steinerpoint.com)
+ *
+ * This software is distributed under the terms of the GNU General
+ * Public License ("GPL") as published by the Free Software Foundation,
+ * either version 2 of that License or (at your option) any later version.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/utsname.h>
+#include <linux/wait.h>
+#include <linux/proc_fs.h>
+#include <linux/device.h>
+#include <linux/tty.h>
+#include <linux/tty_flip.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+#include <asm/uaccess.h>
+
+#include <linux/usb_ch9.h>
+#include <linux/usb_cdc.h>
+#include <linux/usb_gadget.h>
+
+#include "gadget_chips.h"
+
+
+/* Wait Cond */
+
+#define __wait_cond_interruptible(wq, condition, lock, flags, ret) \
+do { \
+ wait_queue_t __wait; \
+ init_waitqueue_entry(&__wait, current); \
+ \
+ add_wait_queue(&wq, &__wait); \
+ for (;;) { \
+ set_current_state(TASK_INTERRUPTIBLE); \
+ if (condition) \
+ break; \
+ if (!signal_pending(current)) { \
+ spin_unlock_irqrestore(lock, flags); \
+ schedule(); \
+ spin_lock_irqsave(lock, flags); \
+ continue; \
+ } \
+ ret = -ERESTARTSYS; \
+ break; \
+ } \
+ current->state = TASK_RUNNING; \
+ remove_wait_queue(&wq, &__wait); \
+} while (0)
+
+#define wait_cond_interruptible(wq, condition, lock, flags) \
+({ \
+ int __ret = 0; \
+ if (!(condition)) \
+ __wait_cond_interruptible(wq, condition, lock, flags, \
+ __ret); \
+ __ret; \
+})
+
+#define __wait_cond_interruptible_timeout(wq, condition, lock, flags, \
+ timeout, ret) \
+do { \
+ signed long __timeout = timeout; \
+ wait_queue_t __wait; \
+ init_waitqueue_entry(&__wait, current); \
+ \
+ add_wait_queue(&wq, &__wait); \
+ for (;;) { \
+ set_current_state(TASK_INTERRUPTIBLE); \
+ if (__timeout == 0) \
+ break; \
+ if (condition) \
+ break; \
+ if (!signal_pending(current)) { \
+ spin_unlock_irqrestore(lock, flags); \
+ __timeout = schedule_timeout(__timeout); \
+ spin_lock_irqsave(lock, flags); \
+ continue; \
+ } \
+ ret = -ERESTARTSYS; \
+ break; \
+ } \
+ current->state = TASK_RUNNING; \
+ remove_wait_queue(&wq, &__wait); \
+} while (0)
+
+#define wait_cond_interruptible_timeout(wq, condition, lock, flags, \
+ timeout) \
+({ \
+ int __ret = 0; \
+ if (!(condition)) \
+ __wait_cond_interruptible_timeout(wq, condition, lock, \
+ flags, timeout, __ret); \
+ __ret; \
+})
+
+
+/* Defines */
+
+#define GS_VERSION_STR "v2.0"
+#define GS_VERSION_NUM 0x0200
+
+#define GS_LONG_NAME "Gadget Serial"
+#define GS_SHORT_NAME "g_serial"
+
+#define GS_MAJOR 127
+#define GS_MINOR_START 0
+
+#define GS_NUM_PORTS 16
+
+#define GS_NUM_CONFIGS 1
+#define GS_NO_CONFIG_ID 0
+#define GS_BULK_CONFIG_ID 1
+#define GS_ACM_CONFIG_ID 2
+
+#define GS_MAX_NUM_INTERFACES 2
+#define GS_BULK_INTERFACE_ID 0
+#define GS_CONTROL_INTERFACE_ID 0
+#define GS_DATA_INTERFACE_ID 1
+
+#define GS_MAX_DESC_LEN 256
+
+#define GS_DEFAULT_READ_Q_SIZE 32
+#define GS_DEFAULT_WRITE_Q_SIZE 32
+
+#define GS_DEFAULT_WRITE_BUF_SIZE 8192
+#define GS_TMP_BUF_SIZE 8192
+
+#define GS_CLOSE_TIMEOUT 15
+
+#define GS_DEFAULT_USE_ACM 0
+
+#define GS_DEFAULT_DTE_RATE 9600
+#define GS_DEFAULT_DATA_BITS 8
+#define GS_DEFAULT_PARITY USB_CDC_NO_PARITY
+#define GS_DEFAULT_CHAR_FORMAT USB_CDC_1_STOP_BITS
+
+/* select highspeed/fullspeed, hiding highspeed if not configured */
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+#define GS_SPEED_SELECT(is_hs,hs,fs) ((is_hs) ? (hs) : (fs))
+#else
+#define GS_SPEED_SELECT(is_hs,hs,fs) (fs)
+#endif /* CONFIG_USB_GADGET_DUALSPEED */
+
+/* debug settings */
+#ifdef GS_DEBUG
+static int debug = 1;
+
+#define gs_debug(format, arg...) \
+ do { if (debug) printk(KERN_DEBUG format, ## arg); } while(0)
+#define gs_debug_level(level, format, arg...) \
+ do { if (debug>=level) printk(KERN_DEBUG format, ## arg); } while(0)
+
+#else
+
+#define gs_debug(format, arg...) \
+ do { } while(0)
+#define gs_debug_level(level, format, arg...) \
+ do { } while(0)
+
+#endif /* GS_DEBUG */
+
+/* Thanks to NetChip Technologies for donating this product ID.
+ *
+ * DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!!
+ * Instead: allocate your own, using normal USB-IF procedures.
+ */
+#define GS_VENDOR_ID 0x0525 /* NetChip */
+#define GS_PRODUCT_ID 0xa4a6 /* Linux-USB Serial Gadget */
+#define GS_CDC_PRODUCT_ID 0xa4a7 /* ... as CDC-ACM */
+
+#define GS_LOG2_NOTIFY_INTERVAL 5 /* 1 << 5 == 32 msec */
+#define GS_NOTIFY_MAXPACKET 8
+
+
+/* Structures */
+
+struct gs_dev;
+
+/* circular buffer */
+struct gs_buf {
+ unsigned int buf_size;
+ char *buf_buf;
+ char *buf_get;
+ char *buf_put;
+};
+
+/* list of requests */
+struct gs_req_entry {
+ struct list_head re_entry;
+ struct usb_request *re_req;
+};
+
+/* the port structure holds info for each port, one for each minor number */
+struct gs_port {
+ struct gs_dev *port_dev; /* pointer to device struct */
+ struct tty_struct *port_tty; /* pointer to tty struct */
+ spinlock_t port_lock;
+ int port_num;
+ int port_open_count;
+ int port_in_use; /* open/close in progress */
+ wait_queue_head_t port_write_wait;/* waiting to write */
+ struct gs_buf *port_write_buf;
+ struct usb_cdc_line_coding port_line_coding;
+};
+
+/* the device structure holds info for the USB device */
+struct gs_dev {
+ struct usb_gadget *dev_gadget; /* gadget device pointer */
+ spinlock_t dev_lock; /* lock for set/reset config */
+ int dev_config; /* configuration number */
+ struct usb_ep *dev_notify_ep; /* address of notify endpoint */
+ struct usb_ep *dev_in_ep; /* address of in endpoint */
+ struct usb_ep *dev_out_ep; /* address of out endpoint */
+ struct usb_endpoint_descriptor /* desciptor of notify ep */
+ *dev_notify_ep_desc;
+ struct usb_endpoint_descriptor /* descriptor of in endpoint */
+ *dev_in_ep_desc;
+ struct usb_endpoint_descriptor /* descriptor of out endpoint */
+ *dev_out_ep_desc;
+ struct usb_request *dev_ctrl_req; /* control request */
+ struct list_head dev_req_list; /* list of write requests */
+ int dev_sched_port; /* round robin port scheduled */
+ struct gs_port *dev_port[GS_NUM_PORTS]; /* the ports */
+};
+
+
+/* Functions */
+
+/* module */
+static int __init gs_module_init(void);
+static void __exit gs_module_exit(void);
+
+/* tty driver */
+static int gs_open(struct tty_struct *tty, struct file *file);
+static void gs_close(struct tty_struct *tty, struct file *file);
+static int gs_write(struct tty_struct *tty,
+ const unsigned char *buf, int count);
+static void gs_put_char(struct tty_struct *tty, unsigned char ch);
+static void gs_flush_chars(struct tty_struct *tty);
+static int gs_write_room(struct tty_struct *tty);
+static int gs_chars_in_buffer(struct tty_struct *tty);
+static void gs_throttle(struct tty_struct * tty);
+static void gs_unthrottle(struct tty_struct * tty);
+static void gs_break(struct tty_struct *tty, int break_state);
+static int gs_ioctl(struct tty_struct *tty, struct file *file,
+ unsigned int cmd, unsigned long arg);
+static void gs_set_termios(struct tty_struct *tty, struct termios *old);
+
+static int gs_send(struct gs_dev *dev);
+static int gs_send_packet(struct gs_dev *dev, char *packet,
+ unsigned int size);
+static int gs_recv_packet(struct gs_dev *dev, char *packet,
+ unsigned int size);
+static void gs_read_complete(struct usb_ep *ep, struct usb_request *req);
+static void gs_write_complete(struct usb_ep *ep, struct usb_request *req);
+
+/* gadget driver */
+static int gs_bind(struct usb_gadget *gadget);
+static void gs_unbind(struct usb_gadget *gadget);
+static int gs_setup(struct usb_gadget *gadget,
+ const struct usb_ctrlrequest *ctrl);
+static int gs_setup_standard(struct usb_gadget *gadget,
+ const struct usb_ctrlrequest *ctrl);
+static int gs_setup_class(struct usb_gadget *gadget,
+ const struct usb_ctrlrequest *ctrl);
+static void gs_setup_complete(struct usb_ep *ep, struct usb_request *req);
+static void gs_disconnect(struct usb_gadget *gadget);
+static int gs_set_config(struct gs_dev *dev, unsigned config);
+static void gs_reset_config(struct gs_dev *dev);
+static int gs_build_config_buf(u8 *buf, enum usb_device_speed speed,
+ u8 type, unsigned int index, int is_otg);
+
+static struct usb_request *gs_alloc_req(struct usb_ep *ep, unsigned int len,
+ int kmalloc_flags);
+static void gs_free_req(struct usb_ep *ep, struct usb_request *req);
+
+static struct gs_req_entry *gs_alloc_req_entry(struct usb_ep *ep, unsigned len,
+ int kmalloc_flags);
+static void gs_free_req_entry(struct usb_ep *ep, struct gs_req_entry *req);
+
+static int gs_alloc_ports(struct gs_dev *dev, int kmalloc_flags);
+static void gs_free_ports(struct gs_dev *dev);
+
+/* circular buffer */
+static struct gs_buf *gs_buf_alloc(unsigned int size, int kmalloc_flags);
+static void gs_buf_free(struct gs_buf *gb);
+static void gs_buf_clear(struct gs_buf *gb);
+static unsigned int gs_buf_data_avail(struct gs_buf *gb);
+static unsigned int gs_buf_space_avail(struct gs_buf *gb);
+static unsigned int gs_buf_put(struct gs_buf *gb, const char *buf,
+ unsigned int count);
+static unsigned int gs_buf_get(struct gs_buf *gb, char *buf,
+ unsigned int count);
+
+/* external functions */
+extern int net2280_set_fifo_mode(struct usb_gadget *gadget, int mode);
+
+
+/* Globals */
+
+static struct gs_dev *gs_device;
+
+static const char *EP_IN_NAME;
+static const char *EP_OUT_NAME;
+static const char *EP_NOTIFY_NAME;
+
+static struct semaphore gs_open_close_sem[GS_NUM_PORTS];
+
+static unsigned int read_q_size = GS_DEFAULT_READ_Q_SIZE;
+static unsigned int write_q_size = GS_DEFAULT_WRITE_Q_SIZE;
+
+static unsigned int write_buf_size = GS_DEFAULT_WRITE_BUF_SIZE;
+
+static unsigned int use_acm = GS_DEFAULT_USE_ACM;
+
+
+/* tty driver struct */
+static struct tty_operations gs_tty_ops = {
+ .open = gs_open,
+ .close = gs_close,
+ .write = gs_write,
+ .put_char = gs_put_char,
+ .flush_chars = gs_flush_chars,
+ .write_room = gs_write_room,
+ .ioctl = gs_ioctl,
+ .set_termios = gs_set_termios,
+ .throttle = gs_throttle,
+ .unthrottle = gs_unthrottle,
+ .break_ctl = gs_break,
+ .chars_in_buffer = gs_chars_in_buffer,
+};
+static struct tty_driver *gs_tty_driver;
+
+/* gadget driver struct */
+static struct usb_gadget_driver gs_gadget_driver = {
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ .speed = USB_SPEED_HIGH,
+#else
+ .speed = USB_SPEED_FULL,
+#endif /* CONFIG_USB_GADGET_DUALSPEED */
+ .function = GS_LONG_NAME,
+ .bind = gs_bind,
+ .unbind = gs_unbind,
+ .setup = gs_setup,
+ .disconnect = gs_disconnect,
+ .driver = {
+ .name = GS_SHORT_NAME,
+ /* .shutdown = ... */
+ /* .suspend = ... */
+ /* .resume = ... */
+ },
+};
+
+
+/* USB descriptors */
+
+#define GS_MANUFACTURER_STR_ID 1
+#define GS_PRODUCT_STR_ID 2
+#define GS_SERIAL_STR_ID 3
+#define GS_BULK_CONFIG_STR_ID 4
+#define GS_ACM_CONFIG_STR_ID 5
+#define GS_CONTROL_STR_ID 6
+#define GS_DATA_STR_ID 7
+
+/* static strings, in UTF-8 */
+static char manufacturer[50];
+static struct usb_string gs_strings[] = {
+ { GS_MANUFACTURER_STR_ID, manufacturer },
+ { GS_PRODUCT_STR_ID, GS_LONG_NAME },
+ { GS_SERIAL_STR_ID, "0" },
+ { GS_BULK_CONFIG_STR_ID, "Gadget Serial Bulk" },
+ { GS_ACM_CONFIG_STR_ID, "Gadget Serial CDC ACM" },
+ { GS_CONTROL_STR_ID, "Gadget Serial Control" },
+ { GS_DATA_STR_ID, "Gadget Serial Data" },
+ { } /* end of list */
+};
+
+static struct usb_gadget_strings gs_string_table = {
+ .language = 0x0409, /* en-us */
+ .strings = gs_strings,
+};
+
+static struct usb_device_descriptor gs_device_desc = {
+ .bLength = USB_DT_DEVICE_SIZE,
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = __constant_cpu_to_le16(0x0200),
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .idVendor = __constant_cpu_to_le16(GS_VENDOR_ID),
+ .idProduct = __constant_cpu_to_le16(GS_PRODUCT_ID),
+ .iManufacturer = GS_MANUFACTURER_STR_ID,
+ .iProduct = GS_PRODUCT_STR_ID,
+ .iSerialNumber = GS_SERIAL_STR_ID,
+ .bNumConfigurations = GS_NUM_CONFIGS,
+};
+
+static struct usb_otg_descriptor gs_otg_descriptor = {
+ .bLength = sizeof(gs_otg_descriptor),
+ .bDescriptorType = USB_DT_OTG,
+ .bmAttributes = USB_OTG_SRP,
+};
+
+static struct usb_config_descriptor gs_bulk_config_desc = {
+ .bLength = USB_DT_CONFIG_SIZE,
+ .bDescriptorType = USB_DT_CONFIG,
+ /* .wTotalLength computed dynamically */
+ .bNumInterfaces = 1,
+ .bConfigurationValue = GS_BULK_CONFIG_ID,
+ .iConfiguration = GS_BULK_CONFIG_STR_ID,
+ .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER,
+ .bMaxPower = 1,
+};
+
+static struct usb_config_descriptor gs_acm_config_desc = {
+ .bLength = USB_DT_CONFIG_SIZE,
+ .bDescriptorType = USB_DT_CONFIG,
+ /* .wTotalLength computed dynamically */
+ .bNumInterfaces = 2,
+ .bConfigurationValue = GS_ACM_CONFIG_ID,
+ .iConfiguration = GS_ACM_CONFIG_STR_ID,
+ .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER,
+ .bMaxPower = 1,
+};
+
+static const struct usb_interface_descriptor gs_bulk_interface_desc = {
+ .bLength = USB_DT_INTERFACE_SIZE,
+ .bDescriptorType = USB_DT_INTERFACE,
+ .bInterfaceNumber = GS_BULK_INTERFACE_ID,
+ .bNumEndpoints = 2,
+ .bInterfaceClass = USB_CLASS_CDC_DATA,
+ .bInterfaceSubClass = 0,
+ .bInterfaceProtocol = 0,
+ .iInterface = GS_DATA_STR_ID,
+};
+
+static const struct usb_interface_descriptor gs_control_interface_desc = {
+ .bLength = USB_DT_INTERFACE_SIZE,
+ .bDescriptorType = USB_DT_INTERFACE,
+ .bInterfaceNumber = GS_CONTROL_INTERFACE_ID,
+ .bNumEndpoints = 1,
+ .bInterfaceClass = USB_CLASS_COMM,
+ .bInterfaceSubClass = USB_CDC_SUBCLASS_ACM,
+ .bInterfaceProtocol = USB_CDC_ACM_PROTO_AT_V25TER,
+ .iInterface = GS_CONTROL_STR_ID,
+};
+
+static const struct usb_interface_descriptor gs_data_interface_desc = {
+ .bLength = USB_DT_INTERFACE_SIZE,
+ .bDescriptorType = USB_DT_INTERFACE,
+ .bInterfaceNumber = GS_DATA_INTERFACE_ID,
+ .bNumEndpoints = 2,
+ .bInterfaceClass = USB_CLASS_CDC_DATA,
+ .bInterfaceSubClass = 0,
+ .bInterfaceProtocol = 0,
+ .iInterface = GS_DATA_STR_ID,
+};
+
+static const struct usb_cdc_header_desc gs_header_desc = {
+ .bLength = sizeof(gs_header_desc),
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_HEADER_TYPE,
+ .bcdCDC = __constant_cpu_to_le16(0x0110),
+};
+
+static const struct usb_cdc_call_mgmt_descriptor gs_call_mgmt_descriptor = {
+ .bLength = sizeof(gs_call_mgmt_descriptor),
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE,
+ .bmCapabilities = 0,
+ .bDataInterface = 1, /* index of data interface */
+};
+
+static struct usb_cdc_acm_descriptor gs_acm_descriptor = {
+ .bLength = sizeof(gs_acm_descriptor),
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_ACM_TYPE,
+ .bmCapabilities = 0,
+};
+
+static const struct usb_cdc_union_desc gs_union_desc = {
+ .bLength = sizeof(gs_union_desc),
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_UNION_TYPE,
+ .bMasterInterface0 = 0, /* index of control interface */
+ .bSlaveInterface0 = 1, /* index of data interface */
+};
+
+static struct usb_endpoint_descriptor gs_fullspeed_notify_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .wMaxPacketSize = __constant_cpu_to_le16(GS_NOTIFY_MAXPACKET),
+ .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL,
+};
+
+static struct usb_endpoint_descriptor gs_fullspeed_in_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+};
+
+static struct usb_endpoint_descriptor gs_fullspeed_out_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = USB_DIR_OUT,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+};
+
+static const struct usb_descriptor_header *gs_bulk_fullspeed_function[] = {
+ (struct usb_descriptor_header *) &gs_otg_descriptor,
+ (struct usb_descriptor_header *) &gs_bulk_interface_desc,
+ (struct usb_descriptor_header *) &gs_fullspeed_in_desc,
+ (struct usb_descriptor_header *) &gs_fullspeed_out_desc,
+ NULL,
+};
+
+static const struct usb_descriptor_header *gs_acm_fullspeed_function[] = {
+ (struct usb_descriptor_header *) &gs_otg_descriptor,
+ (struct usb_descriptor_header *) &gs_control_interface_desc,
+ (struct usb_descriptor_header *) &gs_header_desc,
+ (struct usb_descriptor_header *) &gs_call_mgmt_descriptor,
+ (struct usb_descriptor_header *) &gs_acm_descriptor,
+ (struct usb_descriptor_header *) &gs_union_desc,
+ (struct usb_descriptor_header *) &gs_fullspeed_notify_desc,
+ (struct usb_descriptor_header *) &gs_data_interface_desc,
+ (struct usb_descriptor_header *) &gs_fullspeed_in_desc,
+ (struct usb_descriptor_header *) &gs_fullspeed_out_desc,
+ NULL,
+};
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+static struct usb_endpoint_descriptor gs_highspeed_notify_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .wMaxPacketSize = __constant_cpu_to_le16(GS_NOTIFY_MAXPACKET),
+ .bInterval = GS_LOG2_NOTIFY_INTERVAL+4,
+};
+
+static struct usb_endpoint_descriptor gs_highspeed_in_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16(512),
+};
+
+static struct usb_endpoint_descriptor gs_highspeed_out_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16(512),
+};
+
+static struct usb_qualifier_descriptor gs_qualifier_desc = {
+ .bLength = sizeof(struct usb_qualifier_descriptor),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = __constant_cpu_to_le16 (0x0200),
+ /* assumes ep0 uses the same value for both speeds ... */
+ .bNumConfigurations = GS_NUM_CONFIGS,
+};
+
+static const struct usb_descriptor_header *gs_bulk_highspeed_function[] = {
+ (struct usb_descriptor_header *) &gs_otg_descriptor,
+ (struct usb_descriptor_header *) &gs_bulk_interface_desc,
+ (struct usb_descriptor_header *) &gs_highspeed_in_desc,
+ (struct usb_descriptor_header *) &gs_highspeed_out_desc,
+ NULL,
+};
+
+static const struct usb_descriptor_header *gs_acm_highspeed_function[] = {
+ (struct usb_descriptor_header *) &gs_otg_descriptor,
+ (struct usb_descriptor_header *) &gs_control_interface_desc,
+ (struct usb_descriptor_header *) &gs_header_desc,
+ (struct usb_descriptor_header *) &gs_call_mgmt_descriptor,
+ (struct usb_descriptor_header *) &gs_acm_descriptor,
+ (struct usb_descriptor_header *) &gs_union_desc,
+ (struct usb_descriptor_header *) &gs_highspeed_notify_desc,
+ (struct usb_descriptor_header *) &gs_data_interface_desc,
+ (struct usb_descriptor_header *) &gs_highspeed_in_desc,
+ (struct usb_descriptor_header *) &gs_highspeed_out_desc,
+ NULL,
+};
+
+#endif /* CONFIG_USB_GADGET_DUALSPEED */
+
+
+/* Module */
+MODULE_DESCRIPTION(GS_LONG_NAME);
+MODULE_AUTHOR("Al Borchers");
+MODULE_LICENSE("GPL");
+
+#ifdef GS_DEBUG
+module_param(debug, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(debug, "Enable debugging, 0=off, 1=on");
+#endif
+
+module_param(read_q_size, uint, S_IRUGO);
+MODULE_PARM_DESC(read_q_size, "Read request queue size, default=32");
+
+module_param(write_q_size, uint, S_IRUGO);
+MODULE_PARM_DESC(write_q_size, "Write request queue size, default=32");
+
+module_param(write_buf_size, uint, S_IRUGO);
+MODULE_PARM_DESC(write_buf_size, "Write buffer size, default=8192");
+
+module_param(use_acm, uint, S_IRUGO);
+MODULE_PARM_DESC(use_acm, "Use CDC ACM, 0=no, 1=yes, default=no");
+
+module_init(gs_module_init);
+module_exit(gs_module_exit);
+
+/*
+* gs_module_init
+*
+* Register as a USB gadget driver and a tty driver.
+*/
+static int __init gs_module_init(void)
+{
+ int i;
+ int retval;
+
+ retval = usb_gadget_register_driver(&gs_gadget_driver);
+ if (retval) {
+ printk(KERN_ERR "gs_module_init: cannot register gadget driver, ret=%d\n", retval);
+ return retval;
+ }
+
+ gs_tty_driver = alloc_tty_driver(GS_NUM_PORTS);
+ if (!gs_tty_driver)
+ return -ENOMEM;
+ gs_tty_driver->owner = THIS_MODULE;
+ gs_tty_driver->driver_name = GS_SHORT_NAME;
+ gs_tty_driver->name = "ttygs";
+ gs_tty_driver->devfs_name = "usb/ttygs/";
+ gs_tty_driver->major = GS_MAJOR;
+ gs_tty_driver->minor_start = GS_MINOR_START;
+ gs_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
+ gs_tty_driver->subtype = SERIAL_TYPE_NORMAL;
+ gs_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+ gs_tty_driver->init_termios = tty_std_termios;
+ gs_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+ tty_set_operations(gs_tty_driver, &gs_tty_ops);
+
+ for (i=0; i < GS_NUM_PORTS; i++)
+ sema_init(&gs_open_close_sem[i], 1);
+
+ retval = tty_register_driver(gs_tty_driver);
+ if (retval) {
+ usb_gadget_unregister_driver(&gs_gadget_driver);
+ put_tty_driver(gs_tty_driver);
+ printk(KERN_ERR "gs_module_init: cannot register tty driver, ret=%d\n", retval);
+ return retval;
+ }
+
+ printk(KERN_INFO "gs_module_init: %s %s loaded\n", GS_LONG_NAME, GS_VERSION_STR);
+ return 0;
+}
+
+/*
+* gs_module_exit
+*
+* Unregister as a tty driver and a USB gadget driver.
+*/
+static void __exit gs_module_exit(void)
+{
+ tty_unregister_driver(gs_tty_driver);
+ put_tty_driver(gs_tty_driver);
+ usb_gadget_unregister_driver(&gs_gadget_driver);
+
+ printk(KERN_INFO "gs_module_exit: %s %s unloaded\n", GS_LONG_NAME, GS_VERSION_STR);
+}
+
+/* TTY Driver */
+
+/*
+ * gs_open
+ */
+static int gs_open(struct tty_struct *tty, struct file *file)
+{
+ int port_num;
+ unsigned long flags;
+ struct gs_port *port;
+ struct gs_dev *dev;
+ struct gs_buf *buf;
+ struct semaphore *sem;
+ int ret;
+
+ port_num = tty->index;
+
+ gs_debug("gs_open: (%d,%p,%p)\n", port_num, tty, file);
+
+ if (port_num < 0 || port_num >= GS_NUM_PORTS) {
+ printk(KERN_ERR "gs_open: (%d,%p,%p) invalid port number\n",
+ port_num, tty, file);
+ return -ENODEV;
+ }
+
+ dev = gs_device;
+
+ if (dev == NULL) {
+ printk(KERN_ERR "gs_open: (%d,%p,%p) NULL device pointer\n",
+ port_num, tty, file);
+ return -ENODEV;
+ }
+
+ sem = &gs_open_close_sem[port_num];
+ if (down_interruptible(sem)) {
+ printk(KERN_ERR
+ "gs_open: (%d,%p,%p) interrupted waiting for semaphore\n",
+ port_num, tty, file);
+ return -ERESTARTSYS;
+ }
+
+ spin_lock_irqsave(&dev->dev_lock, flags);
+
+ if (dev->dev_config == GS_NO_CONFIG_ID) {
+ printk(KERN_ERR
+ "gs_open: (%d,%p,%p) device is not connected\n",
+ port_num, tty, file);
+ ret = -ENODEV;
+ goto exit_unlock_dev;
+ }
+
+ port = dev->dev_port[port_num];
+
+ if (port == NULL) {
+ printk(KERN_ERR "gs_open: (%d,%p,%p) NULL port pointer\n",
+ port_num, tty, file);
+ ret = -ENODEV;
+ goto exit_unlock_dev;
+ }
+
+ spin_lock(&port->port_lock);
+ spin_unlock(&dev->dev_lock);
+
+ if (port->port_dev == NULL) {
+ printk(KERN_ERR "gs_open: (%d,%p,%p) port disconnected (1)\n",
+ port_num, tty, file);
+ ret = -EIO;
+ goto exit_unlock_port;
+ }
+
+ if (port->port_open_count > 0) {
+ ++port->port_open_count;
+ gs_debug("gs_open: (%d,%p,%p) already open\n",
+ port_num, tty, file);
+ ret = 0;
+ goto exit_unlock_port;
+ }
+
+ tty->driver_data = NULL;
+
+ /* mark port as in use, we can drop port lock and sleep if necessary */
+ port->port_in_use = 1;
+
+ /* allocate write buffer on first open */
+ if (port->port_write_buf == NULL) {
+ spin_unlock_irqrestore(&port->port_lock, flags);
+ buf = gs_buf_alloc(write_buf_size, GFP_KERNEL);
+ spin_lock_irqsave(&port->port_lock, flags);
+
+ /* might have been disconnected while asleep, check */
+ if (port->port_dev == NULL) {
+ printk(KERN_ERR
+ "gs_open: (%d,%p,%p) port disconnected (2)\n",
+ port_num, tty, file);
+ port->port_in_use = 0;
+ ret = -EIO;
+ goto exit_unlock_port;
+ }
+
+ if ((port->port_write_buf=buf) == NULL) {
+ printk(KERN_ERR "gs_open: (%d,%p,%p) cannot allocate port write buffer\n",
+ port_num, tty, file);
+ port->port_in_use = 0;
+ ret = -ENOMEM;
+ goto exit_unlock_port;
+ }
+
+ }
+
+ /* wait for carrier detect (not implemented) */
+
+ /* might have been disconnected while asleep, check */
+ if (port->port_dev == NULL) {
+ printk(KERN_ERR "gs_open: (%d,%p,%p) port disconnected (3)\n",
+ port_num, tty, file);
+ port->port_in_use = 0;
+ ret = -EIO;
+ goto exit_unlock_port;
+ }
+
+ tty->driver_data = port;
+ port->port_tty = tty;
+ port->port_open_count = 1;
+ port->port_in_use = 0;
+
+ gs_debug("gs_open: (%d,%p,%p) completed\n", port_num, tty, file);
+
+ ret = 0;
+
+exit_unlock_port:
+ spin_unlock_irqrestore(&port->port_lock, flags);
+ up(sem);
+ return ret;
+
+exit_unlock_dev:
+ spin_unlock_irqrestore(&dev->dev_lock, flags);
+ up(sem);
+ return ret;
+
+}
+
+/*
+ * gs_close
+ */
+static void gs_close(struct tty_struct *tty, struct file *file)
+{
+ unsigned long flags;
+ struct gs_port *port = tty->driver_data;
+ struct semaphore *sem;
+
+ if (port == NULL) {
+ printk(KERN_ERR "gs_close: NULL port pointer\n");
+ return;
+ }
+
+ gs_debug("gs_close: (%d,%p,%p)\n", port->port_num, tty, file);
+
+ sem = &gs_open_close_sem[port->port_num];
+ down(sem);
+
+ spin_lock_irqsave(&port->port_lock, flags);
+
+ if (port->port_open_count == 0) {
+ printk(KERN_ERR
+ "gs_close: (%d,%p,%p) port is already closed\n",
+ port->port_num, tty, file);
+ goto exit;
+ }
+
+ if (port->port_open_count > 1) {
+ --port->port_open_count;
+ goto exit;
+ }
+
+ /* free disconnected port on final close */
+ if (port->port_dev == NULL) {
+ kfree(port);
+ goto exit;
+ }
+
+ /* mark port as closed but in use, we can drop port lock */
+ /* and sleep if necessary */
+ port->port_in_use = 1;
+ port->port_open_count = 0;
+
+ /* wait for write buffer to drain, or */
+ /* at most GS_CLOSE_TIMEOUT seconds */
+ if (gs_buf_data_avail(port->port_write_buf) > 0) {
+ wait_cond_interruptible_timeout(port->port_write_wait,
+ port->port_dev == NULL
+ || gs_buf_data_avail(port->port_write_buf) == 0,
+ &port->port_lock, flags, GS_CLOSE_TIMEOUT * HZ);
+ }
+
+ /* free disconnected port on final close */
+ /* (might have happened during the above sleep) */
+ if (port->port_dev == NULL) {
+ kfree(port);
+ goto exit;
+ }
+
+ gs_buf_clear(port->port_write_buf);
+
+ tty->driver_data = NULL;
+ port->port_tty = NULL;
+ port->port_in_use = 0;
+
+ gs_debug("gs_close: (%d,%p,%p) completed\n",
+ port->port_num, tty, file);
+
+exit:
+ spin_unlock_irqrestore(&port->port_lock, flags);
+ up(sem);
+}
+
+/*
+ * gs_write
+ */
+static int gs_write(struct tty_struct *tty, const unsigned char *buf, int count)
+{
+ unsigned long flags;
+ struct gs_port *port = tty->driver_data;
+ int ret;
+
+ if (port == NULL) {
+ printk(KERN_ERR "gs_write: NULL port pointer\n");
+ return -EIO;
+ }
+
+ gs_debug("gs_write: (%d,%p) writing %d bytes\n", port->port_num, tty,
+ count);
+
+ if (count == 0)
+ return 0;
+
+ spin_lock_irqsave(&port->port_lock, flags);
+
+ if (port->port_dev == NULL) {
+ printk(KERN_ERR "gs_write: (%d,%p) port is not connected\n",
+ port->port_num, tty);
+ ret = -EIO;
+ goto exit;
+ }
+
+ if (port->port_open_count == 0) {
+ printk(KERN_ERR "gs_write: (%d,%p) port is closed\n",
+ port->port_num, tty);
+ ret = -EBADF;
+ goto exit;
+ }
+
+ count = gs_buf_put(port->port_write_buf, buf, count);
+
+ spin_unlock_irqrestore(&port->port_lock, flags);
+
+ gs_send(gs_device);
+
+ gs_debug("gs_write: (%d,%p) wrote %d bytes\n", port->port_num, tty,
+ count);
+
+ return count;
+
+exit:
+ spin_unlock_irqrestore(&port->port_lock, flags);
+ return ret;
+}
+
+/*
+ * gs_put_char
+ */
+static void gs_put_char(struct tty_struct *tty, unsigned char ch)
+{
+ unsigned long flags;
+ struct gs_port *port = tty->driver_data;
+
+ if (port == NULL) {
+ printk(KERN_ERR "gs_put_char: NULL port pointer\n");
+ return;
+ }
+
+ gs_debug("gs_put_char: (%d,%p) char=0x%x, called from %p, %p, %p\n", port->port_num, tty, ch, __builtin_return_address(0), __builtin_return_address(1), __builtin_return_address(2));
+
+ spin_lock_irqsave(&port->port_lock, flags);
+
+ if (port->port_dev == NULL) {
+ printk(KERN_ERR "gs_put_char: (%d,%p) port is not connected\n",
+ port->port_num, tty);
+ goto exit;
+ }
+
+ if (port->port_open_count == 0) {
+ printk(KERN_ERR "gs_put_char: (%d,%p) port is closed\n",
+ port->port_num, tty);
+ goto exit;
+ }
+
+ gs_buf_put(port->port_write_buf, &ch, 1);
+
+exit:
+ spin_unlock_irqrestore(&port->port_lock, flags);
+}
+
+/*
+ * gs_flush_chars
+ */
+static void gs_flush_chars(struct tty_struct *tty)
+{
+ unsigned long flags;
+ struct gs_port *port = tty->driver_data;
+
+ if (port == NULL) {
+ printk(KERN_ERR "gs_flush_chars: NULL port pointer\n");
+ return;
+ }
+
+ gs_debug("gs_flush_chars: (%d,%p)\n", port->port_num, tty);
+
+ spin_lock_irqsave(&port->port_lock, flags);
+
+ if (port->port_dev == NULL) {
+ printk(KERN_ERR
+ "gs_flush_chars: (%d,%p) port is not connected\n",
+ port->port_num, tty);
+ goto exit;
+ }
+
+ if (port->port_open_count == 0) {
+ printk(KERN_ERR "gs_flush_chars: (%d,%p) port is closed\n",
+ port->port_num, tty);
+ goto exit;
+ }
+
+ spin_unlock_irqrestore(&port->port_lock, flags);
+
+ gs_send(gs_device);
+
+ return;
+
+exit:
+ spin_unlock_irqrestore(&port->port_lock, flags);
+}
+
+/*
+ * gs_write_room
+ */
+static int gs_write_room(struct tty_struct *tty)
+{
+
+ int room = 0;
+ unsigned long flags;
+ struct gs_port *port = tty->driver_data;
+
+
+ if (port == NULL)
+ return 0;
+
+ spin_lock_irqsave(&port->port_lock, flags);
+
+ if (port->port_dev != NULL && port->port_open_count > 0
+ && port->port_write_buf != NULL)
+ room = gs_buf_space_avail(port->port_write_buf);
+
+ spin_unlock_irqrestore(&port->port_lock, flags);
+
+ gs_debug("gs_write_room: (%d,%p) room=%d\n",
+ port->port_num, tty, room);
+
+ return room;
+}
+
+/*
+ * gs_chars_in_buffer
+ */
+static int gs_chars_in_buffer(struct tty_struct *tty)
+{
+ int chars = 0;
+ unsigned long flags;
+ struct gs_port *port = tty->driver_data;
+
+ if (port == NULL)
+ return 0;
+
+ spin_lock_irqsave(&port->port_lock, flags);
+
+ if (port->port_dev != NULL && port->port_open_count > 0
+ && port->port_write_buf != NULL)
+ chars = gs_buf_data_avail(port->port_write_buf);
+
+ spin_unlock_irqrestore(&port->port_lock, flags);
+
+ gs_debug("gs_chars_in_buffer: (%d,%p) chars=%d\n",
+ port->port_num, tty, chars);
+
+ return chars;
+}
+
+/*
+ * gs_throttle
+ */
+static void gs_throttle(struct tty_struct *tty)
+{
+}
+
+/*
+ * gs_unthrottle
+ */
+static void gs_unthrottle(struct tty_struct *tty)
+{
+}
+
+/*
+ * gs_break
+ */
+static void gs_break(struct tty_struct *tty, int break_state)
+{
+}
+
+/*
+ * gs_ioctl
+ */
+static int gs_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct gs_port *port = tty->driver_data;
+
+ if (port == NULL) {
+ printk(KERN_ERR "gs_ioctl: NULL port pointer\n");
+ return -EIO;
+ }
+
+ gs_debug("gs_ioctl: (%d,%p,%p) cmd=0x%4.4x, arg=%lu\n",
+ port->port_num, tty, file, cmd, arg);
+
+ /* handle ioctls */
+
+ /* could not handle ioctl */
+ return -ENOIOCTLCMD;
+}
+
+/*
+ * gs_set_termios
+ */
+static void gs_set_termios(struct tty_struct *tty, struct termios *old)
+{
+}
+
+/*
+* gs_send
+*
+* This function finds available write requests, calls
+* gs_send_packet to fill these packets with data, and
+* continues until either there are no more write requests
+* available or no more data to send. This function is
+* run whenever data arrives or write requests are available.
+*/
+static int gs_send(struct gs_dev *dev)
+{
+ int ret,len;
+ unsigned long flags;
+ struct usb_ep *ep;
+ struct usb_request *req;
+ struct gs_req_entry *req_entry;
+
+ if (dev == NULL) {
+ printk(KERN_ERR "gs_send: NULL device pointer\n");
+ return -ENODEV;
+ }
+
+ spin_lock_irqsave(&dev->dev_lock, flags);
+
+ ep = dev->dev_in_ep;
+
+ while(!list_empty(&dev->dev_req_list)) {
+
+ req_entry = list_entry(dev->dev_req_list.next,
+ struct gs_req_entry, re_entry);
+
+ req = req_entry->re_req;
+
+ len = gs_send_packet(dev, req->buf, ep->maxpacket);
+
+ if (len > 0) {
+gs_debug_level(3, "gs_send: len=%d, 0x%2.2x 0x%2.2x 0x%2.2x ...\n", len, *((unsigned char *)req->buf), *((unsigned char *)req->buf+1), *((unsigned char *)req->buf+2));
+ list_del(&req_entry->re_entry);
+ req->length = len;
+ if ((ret=usb_ep_queue(ep, req, GFP_ATOMIC))) {
+ printk(KERN_ERR
+ "gs_send: cannot queue read request, ret=%d\n",
+ ret);
+ break;
+ }
+ } else {
+ break;
+ }
+
+ }
+
+ spin_unlock_irqrestore(&dev->dev_lock, flags);
+
+ return 0;
+}
+
+/*
+ * gs_send_packet
+ *
+ * If there is data to send, a packet is built in the given
+ * buffer and the size is returned. If there is no data to
+ * send, 0 is returned. If there is any error a negative
+ * error number is returned.
+ *
+ * Called during USB completion routine, on interrupt time.
+ *
+ * We assume that disconnect will not happen until all completion
+ * routines have completed, so we can assume that the dev_port
+ * array does not change during the lifetime of this function.
+ */
+static int gs_send_packet(struct gs_dev *dev, char *packet, unsigned int size)
+{
+ unsigned int len;
+ struct gs_port *port;
+
+ /* TEMPORARY -- only port 0 is supported right now */
+ port = dev->dev_port[0];
+
+ if (port == NULL) {
+ printk(KERN_ERR
+ "gs_send_packet: port=%d, NULL port pointer\n",
+ 0);
+ return -EIO;
+ }
+
+ spin_lock(&port->port_lock);
+
+ len = gs_buf_data_avail(port->port_write_buf);
+ if (len < size)
+ size = len;
+
+ if (size == 0)
+ goto exit;
+
+ size = gs_buf_get(port->port_write_buf, packet, size);
+
+ if (port->port_tty)
+ wake_up_interruptible(&port->port_tty->write_wait);
+
+exit:
+ spin_unlock(&port->port_lock);
+ return size;
+}
+
+/*
+ * gs_recv_packet
+ *
+ * Called for each USB packet received. Reads the packet
+ * header and stuffs the data in the appropriate tty buffer.
+ * Returns 0 if successful, or a negative error number.
+ *
+ * Called during USB completion routine, on interrupt time.
+ *
+ * We assume that disconnect will not happen until all completion
+ * routines have completed, so we can assume that the dev_port
+ * array does not change during the lifetime of this function.
+ */
+static int gs_recv_packet(struct gs_dev *dev, char *packet, unsigned int size)
+{
+ unsigned int len;
+ struct gs_port *port;
+ int ret;
+
+ /* TEMPORARY -- only port 0 is supported right now */
+ port = dev->dev_port[0];
+
+ if (port == NULL) {
+ printk(KERN_ERR "gs_recv_packet: port=%d, NULL port pointer\n",
+ port->port_num);
+ return -EIO;
+ }
+
+ spin_lock(&port->port_lock);
+
+ if (port->port_open_count == 0) {
+ printk(KERN_ERR "gs_recv_packet: port=%d, port is closed\n",
+ port->port_num);
+ ret = -EIO;
+ goto exit;
+ }
+
+ if (port->port_tty == NULL) {
+ printk(KERN_ERR "gs_recv_packet: port=%d, NULL tty pointer\n",
+ port->port_num);
+ ret = -EIO;
+ goto exit;
+ }
+
+ if (port->port_tty->magic != TTY_MAGIC) {
+ printk(KERN_ERR "gs_recv_packet: port=%d, bad tty magic\n",
+ port->port_num);
+ ret = -EIO;
+ goto exit;
+ }
+
+ len = (unsigned int)(TTY_FLIPBUF_SIZE - port->port_tty->flip.count);
+ if (len < size)
+ size = len;
+
+ if (size > 0) {
+ memcpy(port->port_tty->flip.char_buf_ptr, packet, size);
+ port->port_tty->flip.char_buf_ptr += size;
+ port->port_tty->flip.count += size;
+ tty_flip_buffer_push(port->port_tty);
+ wake_up_interruptible(&port->port_tty->read_wait);
+ }
+
+ ret = 0;
+
+exit:
+ spin_unlock(&port->port_lock);
+ return ret;
+}
+
+/*
+* gs_read_complete
+*/
+static void gs_read_complete(struct usb_ep *ep, struct usb_request *req)
+{
+ int ret;
+ struct gs_dev *dev = ep->driver_data;
+
+ if (dev == NULL) {
+ printk(KERN_ERR "gs_read_complete: NULL device pointer\n");
+ return;
+ }
+
+ switch(req->status) {
+ case 0:
+ /* normal completion */
+ gs_recv_packet(dev, req->buf, req->actual);
+requeue:
+ req->length = ep->maxpacket;
+ if ((ret=usb_ep_queue(ep, req, GFP_ATOMIC))) {
+ printk(KERN_ERR
+ "gs_read_complete: cannot queue read request, ret=%d\n",
+ ret);
+ }
+ break;
+
+ case -ESHUTDOWN:
+ /* disconnect */
+ gs_debug("gs_read_complete: shutdown\n");
+ gs_free_req(ep, req);
+ break;
+
+ default:
+ /* unexpected */
+ printk(KERN_ERR
+ "gs_read_complete: unexpected status error, status=%d\n",
+ req->status);
+ goto requeue;
+ break;
+ }
+}
+
+/*
+* gs_write_complete
+*/
+static void gs_write_complete(struct usb_ep *ep, struct usb_request *req)
+{
+ struct gs_dev *dev = ep->driver_data;
+ struct gs_req_entry *gs_req = req->context;
+
+ if (dev == NULL) {
+ printk(KERN_ERR "gs_write_complete: NULL device pointer\n");
+ return;
+ }
+
+ switch(req->status) {
+ case 0:
+ /* normal completion */
+requeue:
+ if (gs_req == NULL) {
+ printk(KERN_ERR
+ "gs_write_complete: NULL request pointer\n");
+ return;
+ }
+
+ spin_lock(&dev->dev_lock);
+ list_add(&gs_req->re_entry, &dev->dev_req_list);
+ spin_unlock(&dev->dev_lock);
+
+ gs_send(dev);
+
+ break;
+
+ case -ESHUTDOWN:
+ /* disconnect */
+ gs_debug("gs_write_complete: shutdown\n");
+ gs_free_req(ep, req);
+ break;
+
+ default:
+ printk(KERN_ERR
+ "gs_write_complete: unexpected status error, status=%d\n",
+ req->status);
+ goto requeue;
+ break;
+ }
+}
+
+/* Gadget Driver */
+
+/*
+ * gs_bind
+ *
+ * Called on module load. Allocates and initializes the device
+ * structure and a control request.
+ */
+static int gs_bind(struct usb_gadget *gadget)
+{
+ int ret;
+ struct usb_ep *ep;
+ struct gs_dev *dev;
+
+ /* device specific */
+ if (gadget_is_net2280(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0001);
+ } else if (gadget_is_pxa(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0002);
+ } else if (gadget_is_sh(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0003);
+ /* sh doesn't support multiple interfaces or configs */
+ use_acm = 0;
+ } else if (gadget_is_sa1100(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0004);
+ /* sa1100 doesn't support necessary endpoints */
+ use_acm = 0;
+ } else if (gadget_is_goku(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0005);
+ } else if (gadget_is_mq11xx(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0006);
+ } else if (gadget_is_omap(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0007);
+ } else if (gadget_is_lh7a40x(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0008);
+ } else if (gadget_is_n9604(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0009);
+ } else if (gadget_is_pxa27x(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0011);
+ } else if (gadget_is_s3c2410(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0012);
+ } else if (gadget_is_at91(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0013);
+ } else {
+ printk(KERN_WARNING "gs_bind: controller '%s' not recognized\n",
+ gadget->name);
+ /* unrecognized, but safe unless bulk is REALLY quirky */
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0099);
+ }
+
+ usb_ep_autoconfig_reset(gadget);
+
+ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc);
+ if (!ep)
+ goto autoconf_fail;
+ EP_IN_NAME = ep->name;
+ ep->driver_data = ep; /* claim the endpoint */
+
+ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc);
+ if (!ep)
+ goto autoconf_fail;
+ EP_OUT_NAME = ep->name;
+ ep->driver_data = ep; /* claim the endpoint */
+
+ if (use_acm) {
+ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc);
+ if (!ep) {
+ printk(KERN_ERR "gs_bind: cannot run ACM on %s\n", gadget->name);
+ goto autoconf_fail;
+ }
+ gs_device_desc.idProduct = __constant_cpu_to_le16(
+ GS_CDC_PRODUCT_ID),
+ EP_NOTIFY_NAME = ep->name;
+ ep->driver_data = ep; /* claim the endpoint */
+ }
+
+ gs_device_desc.bDeviceClass = use_acm
+ ? USB_CLASS_COMM : USB_CLASS_VENDOR_SPEC;
+ gs_device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ gs_qualifier_desc.bDeviceClass = use_acm
+ ? USB_CLASS_COMM : USB_CLASS_VENDOR_SPEC;
+ /* assume ep0 uses the same packet size for both speeds */
+ gs_qualifier_desc.bMaxPacketSize0 = gs_device_desc.bMaxPacketSize0;
+ /* assume endpoints are dual-speed */
+ gs_highspeed_notify_desc.bEndpointAddress =
+ gs_fullspeed_notify_desc.bEndpointAddress;
+ gs_highspeed_in_desc.bEndpointAddress =
+ gs_fullspeed_in_desc.bEndpointAddress;
+ gs_highspeed_out_desc.bEndpointAddress =
+ gs_fullspeed_out_desc.bEndpointAddress;
+#endif /* CONFIG_USB_GADGET_DUALSPEED */
+
+ usb_gadget_set_selfpowered(gadget);
+
+ if (gadget->is_otg) {
+ gs_otg_descriptor.bmAttributes |= USB_OTG_HNP,
+ gs_bulk_config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ gs_acm_config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ }
+
+ gs_device = dev = kmalloc(sizeof(struct gs_dev), GFP_KERNEL);
+ if (dev == NULL)
+ return -ENOMEM;
+
+ snprintf(manufacturer, sizeof(manufacturer), "%s %s with %s",
+ system_utsname.sysname, system_utsname.release,
+ gadget->name);
+
+ memset(dev, 0, sizeof(struct gs_dev));
+ dev->dev_gadget = gadget;
+ spin_lock_init(&dev->dev_lock);
+ INIT_LIST_HEAD(&dev->dev_req_list);
+ set_gadget_data(gadget, dev);
+
+ if ((ret=gs_alloc_ports(dev, GFP_KERNEL)) != 0) {
+ printk(KERN_ERR "gs_bind: cannot allocate ports\n");
+ gs_unbind(gadget);
+ return ret;
+ }
+
+ /* preallocate control response and buffer */
+ dev->dev_ctrl_req = gs_alloc_req(gadget->ep0, GS_MAX_DESC_LEN,
+ GFP_KERNEL);
+ if (dev->dev_ctrl_req == NULL) {
+ gs_unbind(gadget);
+ return -ENOMEM;
+ }
+ dev->dev_ctrl_req->complete = gs_setup_complete;
+
+ gadget->ep0->driver_data = dev;
+
+ printk(KERN_INFO "gs_bind: %s %s bound\n",
+ GS_LONG_NAME, GS_VERSION_STR);
+
+ return 0;
+
+autoconf_fail:
+ printk(KERN_ERR "gs_bind: cannot autoconfigure on %s\n", gadget->name);
+ return -ENODEV;
+}
+
+/*
+ * gs_unbind
+ *
+ * Called on module unload. Frees the control request and device
+ * structure.
+ */
+static void gs_unbind(struct usb_gadget *gadget)
+{
+ struct gs_dev *dev = get_gadget_data(gadget);
+
+ gs_device = NULL;
+
+ /* read/write requests already freed, only control request remains */
+ if (dev != NULL) {
+ if (dev->dev_ctrl_req != NULL) {
+ gs_free_req(gadget->ep0, dev->dev_ctrl_req);
+ dev->dev_ctrl_req = NULL;
+ }
+ gs_free_ports(dev);
+ kfree(dev);
+ set_gadget_data(gadget, NULL);
+ }
+
+ printk(KERN_INFO "gs_unbind: %s %s unbound\n", GS_LONG_NAME,
+ GS_VERSION_STR);
+}
+
+/*
+ * gs_setup
+ *
+ * Implements all the control endpoint functionality that's not
+ * handled in hardware or the hardware driver.
+ *
+ * Returns the size of the data sent to the host, or a negative
+ * error number.
+ */
+static int gs_setup(struct usb_gadget *gadget,
+ const struct usb_ctrlrequest *ctrl)
+{
+ int ret = -EOPNOTSUPP;
+ struct gs_dev *dev = get_gadget_data(gadget);
+ struct usb_request *req = dev->dev_ctrl_req;
+ u16 wIndex = ctrl->wIndex;
+ u16 wValue = ctrl->wValue;
+ u16 wLength = ctrl->wLength;
+
+ switch (ctrl->bRequestType & USB_TYPE_MASK) {
+ case USB_TYPE_STANDARD:
+ ret = gs_setup_standard(gadget,ctrl);
+ break;
+
+ case USB_TYPE_CLASS:
+ ret = gs_setup_class(gadget,ctrl);
+ break;
+
+ default:
+ printk(KERN_ERR "gs_setup: unknown request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n",
+ ctrl->bRequestType, ctrl->bRequest,
+ wValue, wIndex, wLength);
+ break;
+ }
+
+ /* respond with data transfer before status phase? */
+ if (ret >= 0) {
+ req->length = ret;
+ req->zero = ret < wLength
+ && (ret % gadget->ep0->maxpacket) == 0;
+ ret = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
+ if (ret < 0) {
+ printk(KERN_ERR "gs_setup: cannot queue response, ret=%d\n",
+ ret);
+ req->status = 0;
+ gs_setup_complete(gadget->ep0, req);
+ }
+ }
+
+ /* device either stalls (ret < 0) or reports success */
+ return ret;
+}
+
+static int gs_setup_standard(struct usb_gadget *gadget,
+ const struct usb_ctrlrequest *ctrl)
+{
+ int ret = -EOPNOTSUPP;
+ struct gs_dev *dev = get_gadget_data(gadget);
+ struct usb_request *req = dev->dev_ctrl_req;
+ u16 wIndex = ctrl->wIndex;
+ u16 wValue = ctrl->wValue;
+ u16 wLength = ctrl->wLength;
+
+ switch (ctrl->bRequest) {
+ case USB_REQ_GET_DESCRIPTOR:
+ if (ctrl->bRequestType != USB_DIR_IN)
+ break;
+
+ switch (wValue >> 8) {
+ case USB_DT_DEVICE:
+ ret = min(wLength,
+ (u16)sizeof(struct usb_device_descriptor));
+ memcpy(req->buf, &gs_device_desc, ret);
+ break;
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ case USB_DT_DEVICE_QUALIFIER:
+ if (!gadget->is_dualspeed)
+ break;
+ ret = min(wLength,
+ (u16)sizeof(struct usb_qualifier_descriptor));
+ memcpy(req->buf, &gs_qualifier_desc, ret);
+ break;
+
+ case USB_DT_OTHER_SPEED_CONFIG:
+ if (!gadget->is_dualspeed)
+ break;
+ /* fall through */
+#endif /* CONFIG_USB_GADGET_DUALSPEED */
+ case USB_DT_CONFIG:
+ ret = gs_build_config_buf(req->buf, gadget->speed,
+ wValue >> 8, wValue & 0xff,
+ gadget->is_otg);
+ if (ret >= 0)
+ ret = min(wLength, (u16)ret);
+ break;
+
+ case USB_DT_STRING:
+ /* wIndex == language code. */
+ ret = usb_gadget_get_string(&gs_string_table,
+ wValue & 0xff, req->buf);
+ if (ret >= 0)
+ ret = min(wLength, (u16)ret);
+ break;
+ }
+ break;
+
+ case USB_REQ_SET_CONFIGURATION:
+ if (ctrl->bRequestType != 0)
+ break;
+ spin_lock(&dev->dev_lock);
+ ret = gs_set_config(dev, wValue);
+ spin_unlock(&dev->dev_lock);
+ break;
+
+ case USB_REQ_GET_CONFIGURATION:
+ if (ctrl->bRequestType != USB_DIR_IN)
+ break;
+ *(u8 *)req->buf = dev->dev_config;
+ ret = min(wLength, (u16)1);
+ break;
+
+ case USB_REQ_SET_INTERFACE:
+ if (ctrl->bRequestType != USB_RECIP_INTERFACE
+ || !dev->dev_config
+ || wIndex >= GS_MAX_NUM_INTERFACES)
+ break;
+ if (dev->dev_config == GS_BULK_CONFIG_ID
+ && wIndex != GS_BULK_INTERFACE_ID)
+ break;
+ /* no alternate interface settings */
+ if (wValue != 0)
+ break;
+ spin_lock(&dev->dev_lock);
+ /* PXA hardware partially handles SET_INTERFACE;
+ * we need to kluge around that interference. */
+ if (gadget_is_pxa(gadget)) {
+ ret = gs_set_config(dev, use_acm ?
+ GS_ACM_CONFIG_ID : GS_BULK_CONFIG_ID);
+ goto set_interface_done;
+ }
+ if (dev->dev_config != GS_BULK_CONFIG_ID
+ && wIndex == GS_CONTROL_INTERFACE_ID) {
+ if (dev->dev_notify_ep) {
+ usb_ep_disable(dev->dev_notify_ep);
+ usb_ep_enable(dev->dev_notify_ep, dev->dev_notify_ep_desc);
+ }
+ } else {
+ usb_ep_disable(dev->dev_in_ep);
+ usb_ep_disable(dev->dev_out_ep);
+ usb_ep_enable(dev->dev_in_ep, dev->dev_in_ep_desc);
+ usb_ep_enable(dev->dev_out_ep, dev->dev_out_ep_desc);
+ }
+ ret = 0;
+set_interface_done:
+ spin_unlock(&dev->dev_lock);
+ break;
+
+ case USB_REQ_GET_INTERFACE:
+ if (ctrl->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE)
+ || dev->dev_config == GS_NO_CONFIG_ID)
+ break;
+ if (wIndex >= GS_MAX_NUM_INTERFACES
+ || (dev->dev_config == GS_BULK_CONFIG_ID
+ && wIndex != GS_BULK_INTERFACE_ID)) {
+ ret = -EDOM;
+ break;
+ }
+ /* no alternate interface settings */
+ *(u8 *)req->buf = 0;
+ ret = min(wLength, (u16)1);
+ break;
+
+ default:
+ printk(KERN_ERR "gs_setup: unknown standard request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n",
+ ctrl->bRequestType, ctrl->bRequest,
+ wValue, wIndex, wLength);
+ break;
+ }
+
+ return ret;
+}
+
+static int gs_setup_class(struct usb_gadget *gadget,
+ const struct usb_ctrlrequest *ctrl)
+{
+ int ret = -EOPNOTSUPP;
+ struct gs_dev *dev = get_gadget_data(gadget);
+ struct gs_port *port = dev->dev_port[0]; /* ACM only has one port */
+ struct usb_request *req = dev->dev_ctrl_req;
+ u16 wIndex = ctrl->wIndex;
+ u16 wValue = ctrl->wValue;
+ u16 wLength = ctrl->wLength;
+
+ switch (ctrl->bRequest) {
+ case USB_CDC_REQ_SET_LINE_CODING:
+ ret = min(wLength,
+ (u16)sizeof(struct usb_cdc_line_coding));
+ if (port) {
+ spin_lock(&port->port_lock);
+ memcpy(&port->port_line_coding, req->buf, ret);
+ spin_unlock(&port->port_lock);
+ }
+ break;
+
+ case USB_CDC_REQ_GET_LINE_CODING:
+ port = dev->dev_port[0]; /* ACM only has one port */
+ ret = min(wLength,
+ (u16)sizeof(struct usb_cdc_line_coding));
+ if (port) {
+ spin_lock(&port->port_lock);
+ memcpy(req->buf, &port->port_line_coding, ret);
+ spin_unlock(&port->port_lock);
+ }
+ break;
+
+ case USB_CDC_REQ_SET_CONTROL_LINE_STATE:
+ ret = 0;
+ break;
+
+ default:
+ printk(KERN_ERR "gs_setup: unknown class request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n",
+ ctrl->bRequestType, ctrl->bRequest,
+ wValue, wIndex, wLength);
+ break;
+ }
+
+ return ret;
+}
+
+/*
+ * gs_setup_complete
+ */
+static void gs_setup_complete(struct usb_ep *ep, struct usb_request *req)
+{
+ if (req->status || req->actual != req->length) {
+ printk(KERN_ERR "gs_setup_complete: status error, status=%d, actual=%d, length=%d\n",
+ req->status, req->actual, req->length);
+ }
+}
+
+/*
+ * gs_disconnect
+ *
+ * Called when the device is disconnected. Frees the closed
+ * ports and disconnects open ports. Open ports will be freed
+ * on close. Then reallocates the ports for the next connection.
+ */
+static void gs_disconnect(struct usb_gadget *gadget)
+{
+ unsigned long flags;
+ struct gs_dev *dev = get_gadget_data(gadget);
+
+ spin_lock_irqsave(&dev->dev_lock, flags);
+
+ gs_reset_config(dev);
+
+ /* free closed ports and disconnect open ports */
+ /* (open ports will be freed when closed) */
+ gs_free_ports(dev);
+
+ /* re-allocate ports for the next connection */
+ if (gs_alloc_ports(dev, GFP_ATOMIC) != 0)
+ printk(KERN_ERR "gs_disconnect: cannot re-allocate ports\n");
+
+ spin_unlock_irqrestore(&dev->dev_lock, flags);
+
+ printk(KERN_INFO "gs_disconnect: %s disconnected\n", GS_LONG_NAME);
+}
+
+/*
+ * gs_set_config
+ *
+ * Configures the device by enabling device specific
+ * optimizations, setting up the endpoints, allocating
+ * read and write requests and queuing read requests.
+ *
+ * The device lock must be held when calling this function.
+ */
+static int gs_set_config(struct gs_dev *dev, unsigned config)
+{
+ int i;
+ int ret = 0;
+ struct usb_gadget *gadget = dev->dev_gadget;
+ struct usb_ep *ep;
+ struct usb_endpoint_descriptor *ep_desc;
+ struct usb_request *req;
+ struct gs_req_entry *req_entry;
+
+ if (dev == NULL) {
+ printk(KERN_ERR "gs_set_config: NULL device pointer\n");
+ return 0;
+ }
+
+ if (config == dev->dev_config)
+ return 0;
+
+ gs_reset_config(dev);
+
+ switch (config) {
+ case GS_NO_CONFIG_ID:
+ return 0;
+ case GS_BULK_CONFIG_ID:
+ if (use_acm)
+ return -EINVAL;
+ /* device specific optimizations */
+ if (gadget_is_net2280(gadget))
+ net2280_set_fifo_mode(gadget, 1);
+ break;
+ case GS_ACM_CONFIG_ID:
+ if (!use_acm)
+ return -EINVAL;
+ /* device specific optimizations */
+ if (gadget_is_net2280(gadget))
+ net2280_set_fifo_mode(gadget, 1);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ dev->dev_config = config;
+
+ gadget_for_each_ep(ep, gadget) {
+
+ if (EP_NOTIFY_NAME
+ && strcmp(ep->name, EP_NOTIFY_NAME) == 0) {
+ ep_desc = GS_SPEED_SELECT(
+ gadget->speed == USB_SPEED_HIGH,
+ &gs_highspeed_notify_desc,
+ &gs_fullspeed_notify_desc);
+ ret = usb_ep_enable(ep,ep_desc);
+ if (ret == 0) {
+ ep->driver_data = dev;
+ dev->dev_notify_ep = ep;
+ dev->dev_notify_ep_desc = ep_desc;
+ } else {
+ printk(KERN_ERR "gs_set_config: cannot enable notify endpoint %s, ret=%d\n",
+ ep->name, ret);
+ goto exit_reset_config;
+ }
+ }
+
+ else if (strcmp(ep->name, EP_IN_NAME) == 0) {
+ ep_desc = GS_SPEED_SELECT(
+ gadget->speed == USB_SPEED_HIGH,
+ &gs_highspeed_in_desc,
+ &gs_fullspeed_in_desc);
+ ret = usb_ep_enable(ep,ep_desc);
+ if (ret == 0) {
+ ep->driver_data = dev;
+ dev->dev_in_ep = ep;
+ dev->dev_in_ep_desc = ep_desc;
+ } else {
+ printk(KERN_ERR "gs_set_config: cannot enable in endpoint %s, ret=%d\n",
+ ep->name, ret);
+ goto exit_reset_config;
+ }
+ }
+
+ else if (strcmp(ep->name, EP_OUT_NAME) == 0) {
+ ep_desc = GS_SPEED_SELECT(
+ gadget->speed == USB_SPEED_HIGH,
+ &gs_highspeed_out_desc,
+ &gs_fullspeed_out_desc);
+ ret = usb_ep_enable(ep,ep_desc);
+ if (ret == 0) {
+ ep->driver_data = dev;
+ dev->dev_out_ep = ep;
+ dev->dev_out_ep_desc = ep_desc;
+ } else {
+ printk(KERN_ERR "gs_set_config: cannot enable out endpoint %s, ret=%d\n",
+ ep->name, ret);
+ goto exit_reset_config;
+ }
+ }
+
+ }
+
+ if (dev->dev_in_ep == NULL || dev->dev_out_ep == NULL
+ || (config != GS_BULK_CONFIG_ID && dev->dev_notify_ep == NULL)) {
+ printk(KERN_ERR "gs_set_config: cannot find endpoints\n");
+ ret = -ENODEV;
+ goto exit_reset_config;
+ }
+
+ /* allocate and queue read requests */
+ ep = dev->dev_out_ep;
+ for (i=0; i<read_q_size && ret == 0; i++) {
+ if ((req=gs_alloc_req(ep, ep->maxpacket, GFP_ATOMIC))) {
+ req->complete = gs_read_complete;
+ if ((ret=usb_ep_queue(ep, req, GFP_ATOMIC))) {
+ printk(KERN_ERR "gs_set_config: cannot queue read request, ret=%d\n",
+ ret);
+ }
+ } else {
+ printk(KERN_ERR "gs_set_config: cannot allocate read requests\n");
+ ret = -ENOMEM;
+ goto exit_reset_config;
+ }
+ }
+
+ /* allocate write requests, and put on free list */
+ ep = dev->dev_in_ep;
+ for (i=0; i<write_q_size; i++) {
+ if ((req_entry=gs_alloc_req_entry(ep, ep->maxpacket, GFP_ATOMIC))) {
+ req_entry->re_req->complete = gs_write_complete;
+ list_add(&req_entry->re_entry, &dev->dev_req_list);
+ } else {
+ printk(KERN_ERR "gs_set_config: cannot allocate write requests\n");
+ ret = -ENOMEM;
+ goto exit_reset_config;
+ }
+ }
+
+ printk(KERN_INFO "gs_set_config: %s configured, %s speed %s config\n",
+ GS_LONG_NAME,
+ gadget->speed == USB_SPEED_HIGH ? "high" : "full",
+ config == GS_BULK_CONFIG_ID ? "BULK" : "CDC-ACM");
+
+ return 0;
+
+exit_reset_config:
+ gs_reset_config(dev);
+ return ret;
+}
+
+/*
+ * gs_reset_config
+ *
+ * Mark the device as not configured, disable all endpoints,
+ * which forces completion of pending I/O and frees queued
+ * requests, and free the remaining write requests on the
+ * free list.
+ *
+ * The device lock must be held when calling this function.
+ */
+static void gs_reset_config(struct gs_dev *dev)
+{
+ struct gs_req_entry *req_entry;
+
+ if (dev == NULL) {
+ printk(KERN_ERR "gs_reset_config: NULL device pointer\n");
+ return;
+ }
+
+ if (dev->dev_config == GS_NO_CONFIG_ID)
+ return;
+
+ dev->dev_config = GS_NO_CONFIG_ID;
+
+ /* free write requests on the free list */
+ while(!list_empty(&dev->dev_req_list)) {
+ req_entry = list_entry(dev->dev_req_list.next,
+ struct gs_req_entry, re_entry);
+ list_del(&req_entry->re_entry);
+ gs_free_req_entry(dev->dev_in_ep, req_entry);
+ }
+
+ /* disable endpoints, forcing completion of pending i/o; */
+ /* completion handlers free their requests in this case */
+ if (dev->dev_notify_ep) {
+ usb_ep_disable(dev->dev_notify_ep);
+ dev->dev_notify_ep = NULL;
+ }
+ if (dev->dev_in_ep) {
+ usb_ep_disable(dev->dev_in_ep);
+ dev->dev_in_ep = NULL;
+ }
+ if (dev->dev_out_ep) {
+ usb_ep_disable(dev->dev_out_ep);
+ dev->dev_out_ep = NULL;
+ }
+}
+
+/*
+ * gs_build_config_buf
+ *
+ * Builds the config descriptors in the given buffer and returns the
+ * length, or a negative error number.
+ */
+static int gs_build_config_buf(u8 *buf, enum usb_device_speed speed,
+ u8 type, unsigned int index, int is_otg)
+{
+ int len;
+ int high_speed;
+ const struct usb_config_descriptor *config_desc;
+ const struct usb_descriptor_header **function;
+
+ if (index >= gs_device_desc.bNumConfigurations)
+ return -EINVAL;
+
+ /* other speed switches high and full speed */
+ high_speed = (speed == USB_SPEED_HIGH);
+ if (type == USB_DT_OTHER_SPEED_CONFIG)
+ high_speed = !high_speed;
+
+ if (use_acm) {
+ config_desc = &gs_acm_config_desc;
+ function = GS_SPEED_SELECT(high_speed,
+ gs_acm_highspeed_function,
+ gs_acm_fullspeed_function);
+ } else {
+ config_desc = &gs_bulk_config_desc;
+ function = GS_SPEED_SELECT(high_speed,
+ gs_bulk_highspeed_function,
+ gs_bulk_fullspeed_function);
+ }
+
+ /* for now, don't advertise srp-only devices */
+ if (!is_otg)
+ function++;
+
+ len = usb_gadget_config_buf(config_desc, buf, GS_MAX_DESC_LEN, function);
+ if (len < 0)
+ return len;
+
+ ((struct usb_config_descriptor *)buf)->bDescriptorType = type;
+
+ return len;
+}
+
+/*
+ * gs_alloc_req
+ *
+ * Allocate a usb_request and its buffer. Returns a pointer to the
+ * usb_request or NULL if there is an error.
+ */
+static struct usb_request *gs_alloc_req(struct usb_ep *ep, unsigned int len, int kmalloc_flags)
+{
+ struct usb_request *req;
+
+ if (ep == NULL)
+ return NULL;
+
+ req = usb_ep_alloc_request(ep, kmalloc_flags);
+
+ if (req != NULL) {
+ req->length = len;
+ req->buf = kmalloc(len, kmalloc_flags);
+ if (req->buf == NULL) {
+ usb_ep_free_request(ep, req);
+ return NULL;
+ }
+ }
+
+ return req;
+}
+
+/*
+ * gs_free_req
+ *
+ * Free a usb_request and its buffer.
+ */
+static void gs_free_req(struct usb_ep *ep, struct usb_request *req)
+{
+ if (ep != NULL && req != NULL) {
+ kfree(req->buf);
+ usb_ep_free_request(ep, req);
+ }
+}
+
+/*
+ * gs_alloc_req_entry
+ *
+ * Allocates a request and its buffer, using the given
+ * endpoint, buffer len, and kmalloc flags.
+ */
+static struct gs_req_entry *gs_alloc_req_entry(struct usb_ep *ep, unsigned len, int kmalloc_flags)
+{
+ struct gs_req_entry *req;
+
+ req = kmalloc(sizeof(struct gs_req_entry), kmalloc_flags);
+ if (req == NULL)
+ return NULL;
+
+ req->re_req = gs_alloc_req(ep, len, kmalloc_flags);
+ if (req->re_req == NULL) {
+ kfree(req);
+ return NULL;
+ }
+
+ req->re_req->context = req;
+
+ return req;
+}
+
+/*
+ * gs_free_req_entry
+ *
+ * Frees a request and its buffer.
+ */
+static void gs_free_req_entry(struct usb_ep *ep, struct gs_req_entry *req)
+{
+ if (ep != NULL && req != NULL) {
+ if (req->re_req != NULL)
+ gs_free_req(ep, req->re_req);
+ kfree(req);
+ }
+}
+
+/*
+ * gs_alloc_ports
+ *
+ * Allocate all ports and set the gs_dev struct to point to them.
+ * Return 0 if successful, or a negative error number.
+ *
+ * The device lock is normally held when calling this function.
+ */
+static int gs_alloc_ports(struct gs_dev *dev, int kmalloc_flags)
+{
+ int i;
+ struct gs_port *port;
+
+ if (dev == NULL)
+ return -EIO;
+
+ for (i=0; i<GS_NUM_PORTS; i++) {
+ if ((port=(struct gs_port *)kmalloc(sizeof(struct gs_port), kmalloc_flags)) == NULL)
+ return -ENOMEM;
+
+ memset(port, 0, sizeof(struct gs_port));
+ port->port_dev = dev;
+ port->port_num = i;
+ port->port_line_coding.dwDTERate = cpu_to_le32(GS_DEFAULT_DTE_RATE);
+ port->port_line_coding.bCharFormat = GS_DEFAULT_CHAR_FORMAT;
+ port->port_line_coding.bParityType = GS_DEFAULT_PARITY;
+ port->port_line_coding.bDataBits = GS_DEFAULT_DATA_BITS;
+ spin_lock_init(&port->port_lock);
+ init_waitqueue_head(&port->port_write_wait);
+
+ dev->dev_port[i] = port;
+ }
+
+ return 0;
+}
+
+/*
+ * gs_free_ports
+ *
+ * Free all closed ports. Open ports are disconnected by
+ * freeing their write buffers, setting their device pointers
+ * and the pointers to them in the device to NULL. These
+ * ports will be freed when closed.
+ *
+ * The device lock is normally held when calling this function.
+ */
+static void gs_free_ports(struct gs_dev *dev)
+{
+ int i;
+ unsigned long flags;
+ struct gs_port *port;
+
+ if (dev == NULL)
+ return;
+
+ for (i=0; i<GS_NUM_PORTS; i++) {
+ if ((port=dev->dev_port[i]) != NULL) {
+ dev->dev_port[i] = NULL;
+
+ spin_lock_irqsave(&port->port_lock, flags);
+
+ if (port->port_write_buf != NULL) {
+ gs_buf_free(port->port_write_buf);
+ port->port_write_buf = NULL;
+ }
+
+ if (port->port_open_count > 0 || port->port_in_use) {
+ port->port_dev = NULL;
+ wake_up_interruptible(&port->port_write_wait);
+ if (port->port_tty) {
+ wake_up_interruptible(&port->port_tty->read_wait);
+ wake_up_interruptible(&port->port_tty->write_wait);
+ }
+ spin_unlock_irqrestore(&port->port_lock, flags);
+ } else {
+ spin_unlock_irqrestore(&port->port_lock, flags);
+ kfree(port);
+ }
+
+ }
+ }
+}
+
+/* Circular Buffer */
+
+/*
+ * gs_buf_alloc
+ *
+ * Allocate a circular buffer and all associated memory.
+ */
+static struct gs_buf *gs_buf_alloc(unsigned int size, int kmalloc_flags)
+{
+ struct gs_buf *gb;
+
+ if (size == 0)
+ return NULL;
+
+ gb = (struct gs_buf *)kmalloc(sizeof(struct gs_buf), kmalloc_flags);
+ if (gb == NULL)
+ return NULL;
+
+ gb->buf_buf = kmalloc(size, kmalloc_flags);
+ if (gb->buf_buf == NULL) {
+ kfree(gb);
+ return NULL;
+ }
+
+ gb->buf_size = size;
+ gb->buf_get = gb->buf_put = gb->buf_buf;
+
+ return gb;
+}
+
+/*
+ * gs_buf_free
+ *
+ * Free the buffer and all associated memory.
+ */
+void gs_buf_free(struct gs_buf *gb)
+{
+ if (gb != NULL) {
+ if (gb->buf_buf != NULL)
+ kfree(gb->buf_buf);
+ kfree(gb);
+ }
+}
+
+/*
+ * gs_buf_clear
+ *
+ * Clear out all data in the circular buffer.
+ */
+void gs_buf_clear(struct gs_buf *gb)
+{
+ if (gb != NULL)
+ gb->buf_get = gb->buf_put;
+ /* equivalent to a get of all data available */
+}
+
+/*
+ * gs_buf_data_avail
+ *
+ * Return the number of bytes of data available in the circular
+ * buffer.
+ */
+unsigned int gs_buf_data_avail(struct gs_buf *gb)
+{
+ if (gb != NULL)
+ return (gb->buf_size + gb->buf_put - gb->buf_get) % gb->buf_size;
+ else
+ return 0;
+}
+
+/*
+ * gs_buf_space_avail
+ *
+ * Return the number of bytes of space available in the circular
+ * buffer.
+ */
+unsigned int gs_buf_space_avail(struct gs_buf *gb)
+{
+ if (gb != NULL)
+ return (gb->buf_size + gb->buf_get - gb->buf_put - 1) % gb->buf_size;
+ else
+ return 0;
+}
+
+/*
+ * gs_buf_put
+ *
+ * Copy data data from a user buffer and put it into the circular buffer.
+ * Restrict to the amount of space available.
+ *
+ * Return the number of bytes copied.
+ */
+unsigned int gs_buf_put(struct gs_buf *gb, const char *buf, unsigned int count)
+{
+ unsigned int len;
+
+ if (gb == NULL)
+ return 0;
+
+ len = gs_buf_space_avail(gb);
+ if (count > len)
+ count = len;
+
+ if (count == 0)
+ return 0;
+
+ len = gb->buf_buf + gb->buf_size - gb->buf_put;
+ if (count > len) {
+ memcpy(gb->buf_put, buf, len);
+ memcpy(gb->buf_buf, buf+len, count - len);
+ gb->buf_put = gb->buf_buf + count - len;
+ } else {
+ memcpy(gb->buf_put, buf, count);
+ if (count < len)
+ gb->buf_put += count;
+ else /* count == len */
+ gb->buf_put = gb->buf_buf;
+ }
+
+ return count;
+}
+
+/*
+ * gs_buf_get
+ *
+ * Get data from the circular buffer and copy to the given buffer.
+ * Restrict to the amount of data available.
+ *
+ * Return the number of bytes copied.
+ */
+unsigned int gs_buf_get(struct gs_buf *gb, char *buf, unsigned int count)
+{
+ unsigned int len;
+
+ if (gb == NULL)
+ return 0;
+
+ len = gs_buf_data_avail(gb);
+ if (count > len)
+ count = len;
+
+ if (count == 0)
+ return 0;
+
+ len = gb->buf_buf + gb->buf_size - gb->buf_get;
+ if (count > len) {
+ memcpy(buf, gb->buf_get, len);
+ memcpy(buf+len, gb->buf_buf, count - len);
+ gb->buf_get = gb->buf_buf + count - len;
+ } else {
+ memcpy(buf, gb->buf_get, count);
+ if (count < len)
+ gb->buf_get += count;
+ else /* count == len */
+ gb->buf_get = gb->buf_buf;
+ }
+
+ return count;
+}
diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c
new file mode 100644
index 000000000000..b1735767660b
--- /dev/null
+++ b/drivers/usb/gadget/usbstring.c
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2003 David Brownell
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/string.h>
+#include <linux/device.h>
+#include <linux/init.h>
+
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+
+#include <asm/unaligned.h>
+
+
+static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len)
+{
+ int count = 0;
+ u8 c;
+ u16 uchar;
+
+ /* this insists on correct encodings, though not minimal ones.
+ * BUT it currently rejects legit 4-byte UTF-8 code points,
+ * which need surrogate pairs. (Unicode 3.1 can use them.)
+ */
+ while (len != 0 && (c = (u8) *s++) != 0) {
+ if (unlikely(c & 0x80)) {
+ // 2-byte sequence:
+ // 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx
+ if ((c & 0xe0) == 0xc0) {
+ uchar = (c & 0x1f) << 6;
+
+ c = (u8) *s++;
+ if ((c & 0xc0) != 0xc0)
+ goto fail;
+ c &= 0x3f;
+ uchar |= c;
+
+ // 3-byte sequence (most CJKV characters):
+ // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx
+ } else if ((c & 0xf0) == 0xe0) {
+ uchar = (c & 0x0f) << 12;
+
+ c = (u8) *s++;
+ if ((c & 0xc0) != 0xc0)
+ goto fail;
+ c &= 0x3f;
+ uchar |= c << 6;
+
+ c = (u8) *s++;
+ if ((c & 0xc0) != 0xc0)
+ goto fail;
+ c &= 0x3f;
+ uchar |= c;
+
+ /* no bogus surrogates */
+ if (0xd800 <= uchar && uchar <= 0xdfff)
+ goto fail;
+
+ // 4-byte sequence (surrogate pairs, currently rare):
+ // 11101110wwwwzzzzyy + 110111yyyyxxxxxx
+ // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx
+ // (uuuuu = wwww + 1)
+ // FIXME accept the surrogate code points (only)
+
+ } else
+ goto fail;
+ } else
+ uchar = c;
+ put_unaligned (cpu_to_le16 (uchar), cp++);
+ count++;
+ len--;
+ }
+ return count;
+fail:
+ return -1;
+}
+
+
+/**
+ * usb_gadget_get_string - fill out a string descriptor
+ * @table: of c strings encoded using UTF-8
+ * @id: string id, from low byte of wValue in get string descriptor
+ * @buf: at least 256 bytes
+ *
+ * Finds the UTF-8 string matching the ID, and converts it into a
+ * string descriptor in utf16-le.
+ * Returns length of descriptor (always even) or negative errno
+ *
+ * If your driver needs stings in multiple languages, you'll probably
+ * "switch (wIndex) { ... }" in your ep0 string descriptor logic,
+ * using this routine after choosing which set of UTF-8 strings to use.
+ * Note that US-ASCII is a strict subset of UTF-8; any string bytes with
+ * the eighth bit set will be multibyte UTF-8 characters, not ISO-8859/1
+ * characters (which are also widely used in C strings).
+ */
+int
+usb_gadget_get_string (struct usb_gadget_strings *table, int id, u8 *buf)
+{
+ struct usb_string *s;
+ int len;
+
+ /* descriptor 0 has the language id */
+ if (id == 0) {
+ buf [0] = 4;
+ buf [1] = USB_DT_STRING;
+ buf [2] = (u8) table->language;
+ buf [3] = (u8) (table->language >> 8);
+ return 4;
+ }
+ for (s = table->strings; s && s->s; s++)
+ if (s->id == id)
+ break;
+
+ /* unrecognized: stall. */
+ if (!s || !s->s)
+ return -EINVAL;
+
+ /* string descriptors have length, tag, then UTF16-LE text */
+ len = min ((size_t) 126, strlen (s->s));
+ memset (buf + 2, 0, 2 * len); /* zero all the bytes */
+ len = utf8_to_utf16le(s->s, (__le16 *)&buf[2], len);
+ if (len < 0)
+ return -EINVAL;
+ buf [0] = (len + 1) * 2;
+ buf [1] = USB_DT_STRING;
+ return buf [0];
+}
+
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
new file mode 100644
index 000000000000..6e49432071a1
--- /dev/null
+++ b/drivers/usb/gadget/zero.c
@@ -0,0 +1,1357 @@
+/*
+ * zero.c -- Gadget Zero, for USB development
+ *
+ * Copyright (C) 2003-2004 David Brownell
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the above-listed copyright holders may not be used
+ * to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+/*
+ * Gadget Zero only needs two bulk endpoints, and is an example of how you
+ * can write a hardware-agnostic gadget driver running inside a USB device.
+ *
+ * Hardware details are visible (see CONFIG_USB_ZERO_* below) but don't
+ * affect most of the driver.
+ *
+ * Use it with the Linux host/master side "usbtest" driver to get a basic
+ * functional test of your device-side usb stack, or with "usb-skeleton".
+ *
+ * It supports two similar configurations. One sinks whatever the usb host
+ * writes, and in return sources zeroes. The other loops whatever the host
+ * writes back, so the host can read it. Module options include:
+ *
+ * buflen=N default N=4096, buffer size used
+ * qlen=N default N=32, how many buffers in the loopback queue
+ * loopdefault default false, list loopback config first
+ *
+ * Many drivers will only have one configuration, letting them be much
+ * simpler if they also don't support high speed operation (like this
+ * driver does).
+ */
+
+#define DEBUG 1
+// #define VERBOSE
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/utsname.h>
+#include <linux/device.h>
+#include <linux/moduleparam.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+
+#include <linux/usb_ch9.h>
+#include <linux/usb_gadget.h>
+
+#include "gadget_chips.h"
+
+
+/*-------------------------------------------------------------------------*/
+
+#define DRIVER_VERSION "St Patrick's Day 2004"
+
+static const char shortname [] = "zero";
+static const char longname [] = "Gadget Zero";
+
+static const char source_sink [] = "source and sink data";
+static const char loopback [] = "loop input to output";
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * driver assumes self-powered hardware, and
+ * has no way for users to trigger remote wakeup.
+ *
+ * this version autoconfigures as much as possible,
+ * which is reasonable for most "bulk-only" drivers.
+ */
+static const char *EP_IN_NAME; /* source */
+static const char *EP_OUT_NAME; /* sink */
+
+/*-------------------------------------------------------------------------*/
+
+/* big enough to hold our biggest descriptor */
+#define USB_BUFSIZ 256
+
+struct zero_dev {
+ spinlock_t lock;
+ struct usb_gadget *gadget;
+ struct usb_request *req; /* for control responses */
+
+ /* when configured, we have one of two configs:
+ * - source data (in to host) and sink it (out from host)
+ * - or loop it back (out from host back in to host)
+ */
+ u8 config;
+ struct usb_ep *in_ep, *out_ep;
+
+ /* autoresume timer */
+ struct timer_list resume;
+};
+
+#define xprintk(d,level,fmt,args...) \
+ dev_printk(level , &(d)->gadget->dev , fmt , ## args)
+
+#ifdef DEBUG
+#define DBG(dev,fmt,args...) \
+ xprintk(dev , KERN_DEBUG , fmt , ## args)
+#else
+#define DBG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* DEBUG */
+
+#ifdef VERBOSE
+#define VDBG DBG
+#else
+#define VDBG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* VERBOSE */
+
+#define ERROR(dev,fmt,args...) \
+ xprintk(dev , KERN_ERR , fmt , ## args)
+#define WARN(dev,fmt,args...) \
+ xprintk(dev , KERN_WARNING , fmt , ## args)
+#define INFO(dev,fmt,args...) \
+ xprintk(dev , KERN_INFO , fmt , ## args)
+
+/*-------------------------------------------------------------------------*/
+
+static unsigned buflen = 4096;
+static unsigned qlen = 32;
+static unsigned pattern = 0;
+
+module_param (buflen, uint, S_IRUGO|S_IWUSR);
+module_param (qlen, uint, S_IRUGO|S_IWUSR);
+module_param (pattern, uint, S_IRUGO|S_IWUSR);
+
+/*
+ * if it's nonzero, autoresume says how many seconds to wait
+ * before trying to wake up the host after suspend.
+ */
+static unsigned autoresume = 0;
+module_param (autoresume, uint, 0);
+
+/*
+ * Normally the "loopback" configuration is second (index 1) so
+ * it's not the default. Here's where to change that order, to
+ * work better with hosts where config changes are problematic.
+ * Or controllers (like superh) that only support one config.
+ */
+static int loopdefault = 0;
+
+module_param (loopdefault, bool, S_IRUGO|S_IWUSR);
+
+/*-------------------------------------------------------------------------*/
+
+/* Thanks to NetChip Technologies for donating this product ID.
+ *
+ * DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!!
+ * Instead: allocate your own, using normal USB-IF procedures.
+ */
+#ifndef CONFIG_USB_ZERO_HNPTEST
+#define DRIVER_VENDOR_NUM 0x0525 /* NetChip */
+#define DRIVER_PRODUCT_NUM 0xa4a0 /* Linux-USB "Gadget Zero" */
+#else
+#define DRIVER_VENDOR_NUM 0x1a0a /* OTG test device IDs */
+#define DRIVER_PRODUCT_NUM 0xbadd
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * DESCRIPTORS ... most are static, but strings and (full)
+ * configuration descriptors are built on demand.
+ */
+
+#define STRING_MANUFACTURER 25
+#define STRING_PRODUCT 42
+#define STRING_SERIAL 101
+#define STRING_SOURCE_SINK 250
+#define STRING_LOOPBACK 251
+
+/*
+ * This device advertises two configurations; these numbers work
+ * on a pxa250 as well as more flexible hardware.
+ */
+#define CONFIG_SOURCE_SINK 3
+#define CONFIG_LOOPBACK 2
+
+static struct usb_device_descriptor
+device_desc = {
+ .bLength = sizeof device_desc,
+ .bDescriptorType = USB_DT_DEVICE,
+
+ .bcdUSB = __constant_cpu_to_le16 (0x0200),
+ .bDeviceClass = USB_CLASS_VENDOR_SPEC,
+
+ .idVendor = __constant_cpu_to_le16 (DRIVER_VENDOR_NUM),
+ .idProduct = __constant_cpu_to_le16 (DRIVER_PRODUCT_NUM),
+ .iManufacturer = STRING_MANUFACTURER,
+ .iProduct = STRING_PRODUCT,
+ .iSerialNumber = STRING_SERIAL,
+ .bNumConfigurations = 2,
+};
+
+static struct usb_config_descriptor
+source_sink_config = {
+ .bLength = sizeof source_sink_config,
+ .bDescriptorType = USB_DT_CONFIG,
+
+ /* compute wTotalLength on the fly */
+ .bNumInterfaces = 1,
+ .bConfigurationValue = CONFIG_SOURCE_SINK,
+ .iConfiguration = STRING_SOURCE_SINK,
+ .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER,
+ .bMaxPower = 1, /* self-powered */
+};
+
+static struct usb_config_descriptor
+loopback_config = {
+ .bLength = sizeof loopback_config,
+ .bDescriptorType = USB_DT_CONFIG,
+
+ /* compute wTotalLength on the fly */
+ .bNumInterfaces = 1,
+ .bConfigurationValue = CONFIG_LOOPBACK,
+ .iConfiguration = STRING_LOOPBACK,
+ .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER,
+ .bMaxPower = 1, /* self-powered */
+};
+
+static struct usb_otg_descriptor
+otg_descriptor = {
+ .bLength = sizeof otg_descriptor,
+ .bDescriptorType = USB_DT_OTG,
+
+ .bmAttributes = USB_OTG_SRP,
+};
+
+/* one interface in each configuration */
+
+static const struct usb_interface_descriptor
+source_sink_intf = {
+ .bLength = sizeof source_sink_intf,
+ .bDescriptorType = USB_DT_INTERFACE,
+
+ .bNumEndpoints = 2,
+ .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
+ .iInterface = STRING_SOURCE_SINK,
+};
+
+static const struct usb_interface_descriptor
+loopback_intf = {
+ .bLength = sizeof loopback_intf,
+ .bDescriptorType = USB_DT_INTERFACE,
+
+ .bNumEndpoints = 2,
+ .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
+ .iInterface = STRING_LOOPBACK,
+};
+
+/* two full speed bulk endpoints; their use is config-dependent */
+
+static struct usb_endpoint_descriptor
+fs_source_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+};
+
+static struct usb_endpoint_descriptor
+fs_sink_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bEndpointAddress = USB_DIR_OUT,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+};
+
+static const struct usb_descriptor_header *fs_source_sink_function [] = {
+ (struct usb_descriptor_header *) &otg_descriptor,
+ (struct usb_descriptor_header *) &source_sink_intf,
+ (struct usb_descriptor_header *) &fs_sink_desc,
+ (struct usb_descriptor_header *) &fs_source_desc,
+ NULL,
+};
+
+static const struct usb_descriptor_header *fs_loopback_function [] = {
+ (struct usb_descriptor_header *) &otg_descriptor,
+ (struct usb_descriptor_header *) &loopback_intf,
+ (struct usb_descriptor_header *) &fs_sink_desc,
+ (struct usb_descriptor_header *) &fs_source_desc,
+ NULL,
+};
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+
+/*
+ * usb 2.0 devices need to expose both high speed and full speed
+ * descriptors, unless they only run at full speed.
+ *
+ * that means alternate endpoint descriptors (bigger packets)
+ * and a "device qualifier" ... plus more construction options
+ * for the config descriptor.
+ */
+
+static struct usb_endpoint_descriptor
+hs_source_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16 (512),
+};
+
+static struct usb_endpoint_descriptor
+hs_sink_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16 (512),
+};
+
+static struct usb_qualifier_descriptor
+dev_qualifier = {
+ .bLength = sizeof dev_qualifier,
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+
+ .bcdUSB = __constant_cpu_to_le16 (0x0200),
+ .bDeviceClass = USB_CLASS_VENDOR_SPEC,
+
+ .bNumConfigurations = 2,
+};
+
+static const struct usb_descriptor_header *hs_source_sink_function [] = {
+ (struct usb_descriptor_header *) &otg_descriptor,
+ (struct usb_descriptor_header *) &source_sink_intf,
+ (struct usb_descriptor_header *) &hs_source_desc,
+ (struct usb_descriptor_header *) &hs_sink_desc,
+ NULL,
+};
+
+static const struct usb_descriptor_header *hs_loopback_function [] = {
+ (struct usb_descriptor_header *) &otg_descriptor,
+ (struct usb_descriptor_header *) &loopback_intf,
+ (struct usb_descriptor_header *) &hs_source_desc,
+ (struct usb_descriptor_header *) &hs_sink_desc,
+ NULL,
+};
+
+/* maxpacket and other transfer characteristics vary by speed. */
+#define ep_desc(g,hs,fs) (((g)->speed==USB_SPEED_HIGH)?(hs):(fs))
+
+#else
+
+/* if there's no high speed support, maxpacket doesn't change. */
+#define ep_desc(g,hs,fs) fs
+
+#endif /* !CONFIG_USB_GADGET_DUALSPEED */
+
+static char manufacturer [50];
+static char serial [40];
+
+/* static strings, in UTF-8 */
+static struct usb_string strings [] = {
+ { STRING_MANUFACTURER, manufacturer, },
+ { STRING_PRODUCT, longname, },
+ { STRING_SERIAL, serial, },
+ { STRING_LOOPBACK, loopback, },
+ { STRING_SOURCE_SINK, source_sink, },
+ { } /* end of list */
+};
+
+static struct usb_gadget_strings stringtab = {
+ .language = 0x0409, /* en-us */
+ .strings = strings,
+};
+
+/*
+ * config descriptors are also handcrafted. these must agree with code
+ * that sets configurations, and with code managing interfaces and their
+ * altsettings. other complexity may come from:
+ *
+ * - high speed support, including "other speed config" rules
+ * - multiple configurations
+ * - interfaces with alternate settings
+ * - embedded class or vendor-specific descriptors
+ *
+ * this handles high speed, and has a second config that could as easily
+ * have been an alternate interface setting (on most hardware).
+ *
+ * NOTE: to demonstrate (and test) more USB capabilities, this driver
+ * should include an altsetting to test interrupt transfers, including
+ * high bandwidth modes at high speed. (Maybe work like Intel's test
+ * device?)
+ */
+static int
+config_buf (struct usb_gadget *gadget,
+ u8 *buf, u8 type, unsigned index)
+{
+ int is_source_sink;
+ int len;
+ const struct usb_descriptor_header **function;
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ int hs = (gadget->speed == USB_SPEED_HIGH);
+#endif
+
+ /* two configurations will always be index 0 and index 1 */
+ if (index > 1)
+ return -EINVAL;
+ is_source_sink = loopdefault ? (index == 1) : (index == 0);
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ if (type == USB_DT_OTHER_SPEED_CONFIG)
+ hs = !hs;
+ if (hs)
+ function = is_source_sink
+ ? hs_source_sink_function
+ : hs_loopback_function;
+ else
+#endif
+ function = is_source_sink
+ ? fs_source_sink_function
+ : fs_loopback_function;
+
+ /* for now, don't advertise srp-only devices */
+ if (!gadget->is_otg)
+ function++;
+
+ len = usb_gadget_config_buf (is_source_sink
+ ? &source_sink_config
+ : &loopback_config,
+ buf, USB_BUFSIZ, function);
+ if (len < 0)
+ return len;
+ ((struct usb_config_descriptor *) buf)->bDescriptorType = type;
+ return len;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct usb_request *
+alloc_ep_req (struct usb_ep *ep, unsigned length)
+{
+ struct usb_request *req;
+
+ req = usb_ep_alloc_request (ep, GFP_ATOMIC);
+ if (req) {
+ req->length = length;
+ req->buf = usb_ep_alloc_buffer (ep, length,
+ &req->dma, GFP_ATOMIC);
+ if (!req->buf) {
+ usb_ep_free_request (ep, req);
+ req = NULL;
+ }
+ }
+ return req;
+}
+
+static void free_ep_req (struct usb_ep *ep, struct usb_request *req)
+{
+ if (req->buf)
+ usb_ep_free_buffer (ep, req->buf, req->dma, req->length);
+ usb_ep_free_request (ep, req);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* optionally require specific source/sink data patterns */
+
+static int
+check_read_data (
+ struct zero_dev *dev,
+ struct usb_ep *ep,
+ struct usb_request *req
+)
+{
+ unsigned i;
+ u8 *buf = req->buf;
+
+ for (i = 0; i < req->actual; i++, buf++) {
+ switch (pattern) {
+ /* all-zeroes has no synchronization issues */
+ case 0:
+ if (*buf == 0)
+ continue;
+ break;
+ /* mod63 stays in sync with short-terminated transfers,
+ * or otherwise when host and gadget agree on how large
+ * each usb transfer request should be. resync is done
+ * with set_interface or set_config.
+ */
+ case 1:
+ if (*buf == (u8)(i % 63))
+ continue;
+ break;
+ }
+ ERROR (dev, "bad OUT byte, buf [%d] = %d\n", i, *buf);
+ usb_ep_set_halt (ep);
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static void
+reinit_write_data (
+ struct zero_dev *dev,
+ struct usb_ep *ep,
+ struct usb_request *req
+)
+{
+ unsigned i;
+ u8 *buf = req->buf;
+
+ switch (pattern) {
+ case 0:
+ memset (req->buf, 0, req->length);
+ break;
+ case 1:
+ for (i = 0; i < req->length; i++)
+ *buf++ = (u8) (i % 63);
+ break;
+ }
+}
+
+/* if there is only one request in the queue, there'll always be an
+ * irq delay between end of one request and start of the next.
+ * that prevents using hardware dma queues.
+ */
+static void source_sink_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ struct zero_dev *dev = ep->driver_data;
+ int status = req->status;
+
+ switch (status) {
+
+ case 0: /* normal completion? */
+ if (ep == dev->out_ep)
+ check_read_data (dev, ep, req);
+ else
+ reinit_write_data (dev, ep, req);
+ break;
+
+ /* this endpoint is normally active while we're configured */
+ case -ECONNABORTED: /* hardware forced ep reset */
+ case -ECONNRESET: /* request dequeued */
+ case -ESHUTDOWN: /* disconnect from host */
+ VDBG (dev, "%s gone (%d), %d/%d\n", ep->name, status,
+ req->actual, req->length);
+ if (ep == dev->out_ep)
+ check_read_data (dev, ep, req);
+ free_ep_req (ep, req);
+ return;
+
+ case -EOVERFLOW: /* buffer overrun on read means that
+ * we didn't provide a big enough
+ * buffer.
+ */
+ default:
+#if 1
+ DBG (dev, "%s complete --> %d, %d/%d\n", ep->name,
+ status, req->actual, req->length);
+#endif
+ case -EREMOTEIO: /* short read */
+ break;
+ }
+
+ status = usb_ep_queue (ep, req, GFP_ATOMIC);
+ if (status) {
+ ERROR (dev, "kill %s: resubmit %d bytes --> %d\n",
+ ep->name, req->length, status);
+ usb_ep_set_halt (ep);
+ /* FIXME recover later ... somehow */
+ }
+}
+
+static struct usb_request *
+source_sink_start_ep (struct usb_ep *ep, int gfp_flags)
+{
+ struct usb_request *req;
+ int status;
+
+ req = alloc_ep_req (ep, buflen);
+ if (!req)
+ return NULL;
+
+ memset (req->buf, 0, req->length);
+ req->complete = source_sink_complete;
+
+ if (strcmp (ep->name, EP_IN_NAME) == 0)
+ reinit_write_data (ep->driver_data, ep, req);
+
+ status = usb_ep_queue (ep, req, gfp_flags);
+ if (status) {
+ struct zero_dev *dev = ep->driver_data;
+
+ ERROR (dev, "start %s --> %d\n", ep->name, status);
+ free_ep_req (ep, req);
+ req = NULL;
+ }
+
+ return req;
+}
+
+static int
+set_source_sink_config (struct zero_dev *dev, int gfp_flags)
+{
+ int result = 0;
+ struct usb_ep *ep;
+ struct usb_gadget *gadget = dev->gadget;
+
+ gadget_for_each_ep (ep, gadget) {
+ const struct usb_endpoint_descriptor *d;
+
+ /* one endpoint writes (sources) zeroes in (to the host) */
+ if (strcmp (ep->name, EP_IN_NAME) == 0) {
+ d = ep_desc (gadget, &hs_source_desc, &fs_source_desc);
+ result = usb_ep_enable (ep, d);
+ if (result == 0) {
+ ep->driver_data = dev;
+ if (source_sink_start_ep (ep, gfp_flags) != 0) {
+ dev->in_ep = ep;
+ continue;
+ }
+ usb_ep_disable (ep);
+ result = -EIO;
+ }
+
+ /* one endpoint reads (sinks) anything out (from the host) */
+ } else if (strcmp (ep->name, EP_OUT_NAME) == 0) {
+ d = ep_desc (gadget, &hs_sink_desc, &fs_sink_desc);
+ result = usb_ep_enable (ep, d);
+ if (result == 0) {
+ ep->driver_data = dev;
+ if (source_sink_start_ep (ep, gfp_flags) != 0) {
+ dev->out_ep = ep;
+ continue;
+ }
+ usb_ep_disable (ep);
+ result = -EIO;
+ }
+
+ /* ignore any other endpoints */
+ } else
+ continue;
+
+ /* stop on error */
+ ERROR (dev, "can't start %s, result %d\n", ep->name, result);
+ break;
+ }
+ if (result == 0)
+ DBG (dev, "buflen %d\n", buflen);
+
+ /* caller is responsible for cleanup on error */
+ return result;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void loopback_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ struct zero_dev *dev = ep->driver_data;
+ int status = req->status;
+
+ switch (status) {
+
+ case 0: /* normal completion? */
+ if (ep == dev->out_ep) {
+ /* loop this OUT packet back IN to the host */
+ req->zero = (req->actual < req->length);
+ req->length = req->actual;
+ status = usb_ep_queue (dev->in_ep, req, GFP_ATOMIC);
+ if (status == 0)
+ return;
+
+ /* "should never get here" */
+ ERROR (dev, "can't loop %s to %s: %d\n",
+ ep->name, dev->in_ep->name,
+ status);
+ }
+
+ /* queue the buffer for some later OUT packet */
+ req->length = buflen;
+ status = usb_ep_queue (dev->out_ep, req, GFP_ATOMIC);
+ if (status == 0)
+ return;
+
+ /* "should never get here" */
+ /* FALLTHROUGH */
+
+ default:
+ ERROR (dev, "%s loop complete --> %d, %d/%d\n", ep->name,
+ status, req->actual, req->length);
+ /* FALLTHROUGH */
+
+ /* NOTE: since this driver doesn't maintain an explicit record
+ * of requests it submitted (just maintains qlen count), we
+ * rely on the hardware driver to clean up on disconnect or
+ * endpoint disable.
+ */
+ case -ECONNABORTED: /* hardware forced ep reset */
+ case -ECONNRESET: /* request dequeued */
+ case -ESHUTDOWN: /* disconnect from host */
+ free_ep_req (ep, req);
+ return;
+ }
+}
+
+static int
+set_loopback_config (struct zero_dev *dev, int gfp_flags)
+{
+ int result = 0;
+ struct usb_ep *ep;
+ struct usb_gadget *gadget = dev->gadget;
+
+ gadget_for_each_ep (ep, gadget) {
+ const struct usb_endpoint_descriptor *d;
+
+ /* one endpoint writes data back IN to the host */
+ if (strcmp (ep->name, EP_IN_NAME) == 0) {
+ d = ep_desc (gadget, &hs_source_desc, &fs_source_desc);
+ result = usb_ep_enable (ep, d);
+ if (result == 0) {
+ ep->driver_data = dev;
+ dev->in_ep = ep;
+ continue;
+ }
+
+ /* one endpoint just reads OUT packets */
+ } else if (strcmp (ep->name, EP_OUT_NAME) == 0) {
+ d = ep_desc (gadget, &hs_sink_desc, &fs_sink_desc);
+ result = usb_ep_enable (ep, d);
+ if (result == 0) {
+ ep->driver_data = dev;
+ dev->out_ep = ep;
+ continue;
+ }
+
+ /* ignore any other endpoints */
+ } else
+ continue;
+
+ /* stop on error */
+ ERROR (dev, "can't enable %s, result %d\n", ep->name, result);
+ break;
+ }
+
+ /* allocate a bunch of read buffers and queue them all at once.
+ * we buffer at most 'qlen' transfers; fewer if any need more
+ * than 'buflen' bytes each.
+ */
+ if (result == 0) {
+ struct usb_request *req;
+ unsigned i;
+
+ ep = dev->out_ep;
+ for (i = 0; i < qlen && result == 0; i++) {
+ req = alloc_ep_req (ep, buflen);
+ if (req) {
+ req->complete = loopback_complete;
+ result = usb_ep_queue (ep, req, GFP_ATOMIC);
+ if (result)
+ DBG (dev, "%s queue req --> %d\n",
+ ep->name, result);
+ } else
+ result = -ENOMEM;
+ }
+ }
+ if (result == 0)
+ DBG (dev, "qlen %d, buflen %d\n", qlen, buflen);
+
+ /* caller is responsible for cleanup on error */
+ return result;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void zero_reset_config (struct zero_dev *dev)
+{
+ if (dev->config == 0)
+ return;
+
+ DBG (dev, "reset config\n");
+
+ /* just disable endpoints, forcing completion of pending i/o.
+ * all our completion handlers free their requests in this case.
+ */
+ if (dev->in_ep) {
+ usb_ep_disable (dev->in_ep);
+ dev->in_ep = NULL;
+ }
+ if (dev->out_ep) {
+ usb_ep_disable (dev->out_ep);
+ dev->out_ep = NULL;
+ }
+ dev->config = 0;
+ del_timer (&dev->resume);
+}
+
+/* change our operational config. this code must agree with the code
+ * that returns config descriptors, and altsetting code.
+ *
+ * it's also responsible for power management interactions. some
+ * configurations might not work with our current power sources.
+ *
+ * note that some device controller hardware will constrain what this
+ * code can do, perhaps by disallowing more than one configuration or
+ * by limiting configuration choices (like the pxa2xx).
+ */
+static int
+zero_set_config (struct zero_dev *dev, unsigned number, int gfp_flags)
+{
+ int result = 0;
+ struct usb_gadget *gadget = dev->gadget;
+
+ if (number == dev->config)
+ return 0;
+
+ if (gadget_is_sa1100 (gadget) && dev->config) {
+ /* tx fifo is full, but we can't clear it...*/
+ INFO (dev, "can't change configurations\n");
+ return -ESPIPE;
+ }
+ zero_reset_config (dev);
+
+ switch (number) {
+ case CONFIG_SOURCE_SINK:
+ result = set_source_sink_config (dev, gfp_flags);
+ break;
+ case CONFIG_LOOPBACK:
+ result = set_loopback_config (dev, gfp_flags);
+ break;
+ default:
+ result = -EINVAL;
+ /* FALL THROUGH */
+ case 0:
+ return result;
+ }
+
+ if (!result && (!dev->in_ep || !dev->out_ep))
+ result = -ENODEV;
+ if (result)
+ zero_reset_config (dev);
+ else {
+ char *speed;
+
+ switch (gadget->speed) {
+ case USB_SPEED_LOW: speed = "low"; break;
+ case USB_SPEED_FULL: speed = "full"; break;
+ case USB_SPEED_HIGH: speed = "high"; break;
+ default: speed = "?"; break;
+ }
+
+ dev->config = number;
+ INFO (dev, "%s speed config #%d: %s\n", speed, number,
+ (number == CONFIG_SOURCE_SINK)
+ ? source_sink : loopback);
+ }
+ return result;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void zero_setup_complete (struct usb_ep *ep, struct usb_request *req)
+{
+ if (req->status || req->actual != req->length)
+ DBG ((struct zero_dev *) ep->driver_data,
+ "setup complete --> %d, %d/%d\n",
+ req->status, req->actual, req->length);
+}
+
+/*
+ * The setup() callback implements all the ep0 functionality that's
+ * not handled lower down, in hardware or the hardware driver (like
+ * device and endpoint feature flags, and their status). It's all
+ * housekeeping for the gadget function we're implementing. Most of
+ * the work is in config-specific setup.
+ */
+static int
+zero_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
+{
+ struct zero_dev *dev = get_gadget_data (gadget);
+ struct usb_request *req = dev->req;
+ int value = -EOPNOTSUPP;
+ u16 w_index = ctrl->wIndex;
+ u16 w_value = ctrl->wValue;
+ u16 w_length = ctrl->wLength;
+
+ /* usually this stores reply data in the pre-allocated ep0 buffer,
+ * but config change events will reconfigure hardware.
+ */
+ req->zero = 0;
+ switch (ctrl->bRequest) {
+
+ case USB_REQ_GET_DESCRIPTOR:
+ if (ctrl->bRequestType != USB_DIR_IN)
+ goto unknown;
+ switch (w_value >> 8) {
+
+ case USB_DT_DEVICE:
+ value = min (w_length, (u16) sizeof device_desc);
+ memcpy (req->buf, &device_desc, value);
+ break;
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ case USB_DT_DEVICE_QUALIFIER:
+ if (!gadget->is_dualspeed)
+ break;
+ value = min (w_length, (u16) sizeof dev_qualifier);
+ memcpy (req->buf, &dev_qualifier, value);
+ break;
+
+ case USB_DT_OTHER_SPEED_CONFIG:
+ if (!gadget->is_dualspeed)
+ break;
+ // FALLTHROUGH
+#endif /* CONFIG_USB_GADGET_DUALSPEED */
+ case USB_DT_CONFIG:
+ value = config_buf (gadget, req->buf,
+ w_value >> 8,
+ w_value & 0xff);
+ if (value >= 0)
+ value = min (w_length, (u16) value);
+ break;
+
+ case USB_DT_STRING:
+ /* wIndex == language code.
+ * this driver only handles one language, you can
+ * add string tables for other languages, using
+ * any UTF-8 characters
+ */
+ value = usb_gadget_get_string (&stringtab,
+ w_value & 0xff, req->buf);
+ if (value >= 0)
+ value = min (w_length, (u16) value);
+ break;
+ }
+ break;
+
+ /* currently two configs, two speeds */
+ case USB_REQ_SET_CONFIGURATION:
+ if (ctrl->bRequestType != 0)
+ goto unknown;
+ if (gadget->a_hnp_support)
+ DBG (dev, "HNP available\n");
+ else if (gadget->a_alt_hnp_support)
+ DBG (dev, "HNP needs a different root port\n");
+ else
+ VDBG (dev, "HNP inactive\n");
+ spin_lock (&dev->lock);
+ value = zero_set_config (dev, w_value, GFP_ATOMIC);
+ spin_unlock (&dev->lock);
+ break;
+ case USB_REQ_GET_CONFIGURATION:
+ if (ctrl->bRequestType != USB_DIR_IN)
+ goto unknown;
+ *(u8 *)req->buf = dev->config;
+ value = min (w_length, (u16) 1);
+ break;
+
+ /* until we add altsetting support, or other interfaces,
+ * only 0/0 are possible. pxa2xx only supports 0/0 (poorly)
+ * and already killed pending endpoint I/O.
+ */
+ case USB_REQ_SET_INTERFACE:
+ if (ctrl->bRequestType != USB_RECIP_INTERFACE)
+ goto unknown;
+ spin_lock (&dev->lock);
+ if (dev->config && w_index == 0 && w_value == 0) {
+ u8 config = dev->config;
+
+ /* resets interface configuration, forgets about
+ * previous transaction state (queued bufs, etc)
+ * and re-inits endpoint state (toggle etc)
+ * no response queued, just zero status == success.
+ * if we had more than one interface we couldn't
+ * use this "reset the config" shortcut.
+ */
+ zero_reset_config (dev);
+ zero_set_config (dev, config, GFP_ATOMIC);
+ value = 0;
+ }
+ spin_unlock (&dev->lock);
+ break;
+ case USB_REQ_GET_INTERFACE:
+ if (ctrl->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE))
+ goto unknown;
+ if (!dev->config)
+ break;
+ if (w_index != 0) {
+ value = -EDOM;
+ break;
+ }
+ *(u8 *)req->buf = 0;
+ value = min (w_length, (u16) 1);
+ break;
+
+ /*
+ * These are the same vendor-specific requests supported by
+ * Intel's USB 2.0 compliance test devices. We exceed that
+ * device spec by allowing multiple-packet requests.
+ */
+ case 0x5b: /* control WRITE test -- fill the buffer */
+ if (ctrl->bRequestType != (USB_DIR_OUT|USB_TYPE_VENDOR))
+ goto unknown;
+ if (w_value || w_index)
+ break;
+ /* just read that many bytes into the buffer */
+ if (w_length > USB_BUFSIZ)
+ break;
+ value = w_length;
+ break;
+ case 0x5c: /* control READ test -- return the buffer */
+ if (ctrl->bRequestType != (USB_DIR_IN|USB_TYPE_VENDOR))
+ goto unknown;
+ if (w_value || w_index)
+ break;
+ /* expect those bytes are still in the buffer; send back */
+ if (w_length > USB_BUFSIZ
+ || w_length != req->length)
+ break;
+ value = w_length;
+ break;
+
+ default:
+unknown:
+ VDBG (dev,
+ "unknown control req%02x.%02x v%04x i%04x l%d\n",
+ ctrl->bRequestType, ctrl->bRequest,
+ w_value, w_index, w_length);
+ }
+
+ /* respond with data transfer before status phase? */
+ if (value >= 0) {
+ req->length = value;
+ req->zero = value < w_length;
+ value = usb_ep_queue (gadget->ep0, req, GFP_ATOMIC);
+ if (value < 0) {
+ DBG (dev, "ep_queue --> %d\n", value);
+ req->status = 0;
+ zero_setup_complete (gadget->ep0, req);
+ }
+ }
+
+ /* device either stalls (value < 0) or reports success */
+ return value;
+}
+
+static void
+zero_disconnect (struct usb_gadget *gadget)
+{
+ struct zero_dev *dev = get_gadget_data (gadget);
+ unsigned long flags;
+
+ spin_lock_irqsave (&dev->lock, flags);
+ zero_reset_config (dev);
+
+ /* a more significant application might have some non-usb
+ * activities to quiesce here, saving resources like power
+ * or pushing the notification up a network stack.
+ */
+ spin_unlock_irqrestore (&dev->lock, flags);
+
+ /* next we may get setup() calls to enumerate new connections;
+ * or an unbind() during shutdown (including removing module).
+ */
+}
+
+static void
+zero_autoresume (unsigned long _dev)
+{
+ struct zero_dev *dev = (struct zero_dev *) _dev;
+ int status;
+
+ /* normally the host would be woken up for something
+ * more significant than just a timer firing...
+ */
+ if (dev->gadget->speed != USB_SPEED_UNKNOWN) {
+ status = usb_gadget_wakeup (dev->gadget);
+ DBG (dev, "wakeup --> %d\n", status);
+ }
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void
+zero_unbind (struct usb_gadget *gadget)
+{
+ struct zero_dev *dev = get_gadget_data (gadget);
+
+ DBG (dev, "unbind\n");
+
+ /* we've already been disconnected ... no i/o is active */
+ if (dev->req)
+ free_ep_req (gadget->ep0, dev->req);
+ del_timer_sync (&dev->resume);
+ kfree (dev);
+ set_gadget_data (gadget, NULL);
+}
+
+static int
+zero_bind (struct usb_gadget *gadget)
+{
+ struct zero_dev *dev;
+ struct usb_ep *ep;
+
+ /* Bulk-only drivers like this one SHOULD be able to
+ * autoconfigure on any sane usb controller driver,
+ * but there may also be important quirks to address.
+ */
+ usb_ep_autoconfig_reset (gadget);
+ ep = usb_ep_autoconfig (gadget, &fs_source_desc);
+ if (!ep) {
+autoconf_fail:
+ printk (KERN_ERR "%s: can't autoconfigure on %s\n",
+ shortname, gadget->name);
+ return -ENODEV;
+ }
+ EP_IN_NAME = ep->name;
+ ep->driver_data = ep; /* claim */
+
+ ep = usb_ep_autoconfig (gadget, &fs_sink_desc);
+ if (!ep)
+ goto autoconf_fail;
+ EP_OUT_NAME = ep->name;
+ ep->driver_data = ep; /* claim */
+
+
+ /*
+ * DRIVER POLICY CHOICE: you may want to do this differently.
+ * One thing to avoid is reusing a bcdDevice revision code
+ * with different host-visible configurations or behavior
+ * restrictions -- using ep1in/ep2out vs ep1out/ep3in, etc
+ */
+ if (gadget_is_net2280 (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0201);
+ } else if (gadget_is_pxa (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0203);
+#if 0
+ } else if (gadget_is_sh(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0204);
+ /* SH has only one configuration; see "loopdefault" */
+ device_desc.bNumConfigurations = 1;
+ /* FIXME make 1 == default.bConfigurationValue */
+#endif
+ } else if (gadget_is_sa1100 (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0205);
+ } else if (gadget_is_goku (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0206);
+ } else if (gadget_is_mq11xx (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0207);
+ } else if (gadget_is_omap (gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0208);
+ } else if (gadget_is_lh7a40x(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209);
+ } else if (gadget_is_n9604(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0210);
+ } else if (gadget_is_pxa27x(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0211);
+ } else if (gadget_is_s3c2410(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212);
+ } else if (gadget_is_at91(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0213);
+ } else {
+ /* gadget zero is so simple (for now, no altsettings) that
+ * it SHOULD NOT have problems with bulk-capable hardware.
+ * so warn about unrcognized controllers, don't panic.
+ *
+ * things like configuration and altsetting numbering
+ * can need hardware-specific attention though.
+ */
+ printk (KERN_WARNING "%s: controller '%s' not recognized\n",
+ shortname, gadget->name);
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x9999);
+ }
+
+
+ /* ok, we made sense of the hardware ... */
+ dev = kmalloc (sizeof *dev, SLAB_KERNEL);
+ if (!dev)
+ return -ENOMEM;
+ memset (dev, 0, sizeof *dev);
+ spin_lock_init (&dev->lock);
+ dev->gadget = gadget;
+ set_gadget_data (gadget, dev);
+
+ /* preallocate control response and buffer */
+ dev->req = usb_ep_alloc_request (gadget->ep0, GFP_KERNEL);
+ if (!dev->req)
+ goto enomem;
+ dev->req->buf = usb_ep_alloc_buffer (gadget->ep0, USB_BUFSIZ,
+ &dev->req->dma, GFP_KERNEL);
+ if (!dev->req->buf)
+ goto enomem;
+
+ dev->req->complete = zero_setup_complete;
+
+ device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
+
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ /* assume ep0 uses the same value for both speeds ... */
+ dev_qualifier.bMaxPacketSize0 = device_desc.bMaxPacketSize0;
+
+ /* and that all endpoints are dual-speed */
+ hs_source_desc.bEndpointAddress = fs_source_desc.bEndpointAddress;
+ hs_sink_desc.bEndpointAddress = fs_sink_desc.bEndpointAddress;
+#endif
+
+ if (gadget->is_otg) {
+ otg_descriptor.bmAttributes |= USB_OTG_HNP,
+ source_sink_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ loopback_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ }
+
+ if (gadget->is_otg) {
+ otg_descriptor.bmAttributes |= USB_OTG_HNP,
+ source_sink_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ loopback_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ }
+
+ usb_gadget_set_selfpowered (gadget);
+
+ init_timer (&dev->resume);
+ dev->resume.function = zero_autoresume;
+ dev->resume.data = (unsigned long) dev;
+ if (autoresume) {
+ source_sink_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ loopback_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+ }
+
+ gadget->ep0->driver_data = dev;
+
+ INFO (dev, "%s, version: " DRIVER_VERSION "\n", longname);
+ INFO (dev, "using %s, OUT %s IN %s\n", gadget->name,
+ EP_OUT_NAME, EP_IN_NAME);
+
+ snprintf (manufacturer, sizeof manufacturer, "%s %s with %s",
+ system_utsname.sysname, system_utsname.release,
+ gadget->name);
+
+ return 0;
+
+enomem:
+ zero_unbind (gadget);
+ return -ENOMEM;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void
+zero_suspend (struct usb_gadget *gadget)
+{
+ struct zero_dev *dev = get_gadget_data (gadget);
+
+ if (gadget->speed == USB_SPEED_UNKNOWN)
+ return;
+
+ if (autoresume) {
+ mod_timer (&dev->resume, jiffies + (HZ * autoresume));
+ DBG (dev, "suspend, wakeup in %d seconds\n", autoresume);
+ } else
+ DBG (dev, "suspend\n");
+}
+
+static void
+zero_resume (struct usb_gadget *gadget)
+{
+ struct zero_dev *dev = get_gadget_data (gadget);
+
+ DBG (dev, "resume\n");
+ del_timer (&dev->resume);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static struct usb_gadget_driver zero_driver = {
+#ifdef CONFIG_USB_GADGET_DUALSPEED
+ .speed = USB_SPEED_HIGH,
+#else
+ .speed = USB_SPEED_FULL,
+#endif
+ .function = (char *) longname,
+ .bind = zero_bind,
+ .unbind = zero_unbind,
+
+ .setup = zero_setup,
+ .disconnect = zero_disconnect,
+
+ .suspend = zero_suspend,
+ .resume = zero_resume,
+
+ .driver = {
+ .name = (char *) shortname,
+ // .shutdown = ...
+ // .suspend = ...
+ // .resume = ...
+ },
+};
+
+MODULE_AUTHOR ("David Brownell");
+MODULE_LICENSE ("Dual BSD/GPL");
+
+
+static int __init init (void)
+{
+ /* a real value would likely come through some id prom
+ * or module option. this one takes at least two packets.
+ */
+ strlcpy (serial, "0123456789.0123456789.0123456789", sizeof serial);
+
+ return usb_gadget_register_driver (&zero_driver);
+}
+module_init (init);
+
+static void __exit cleanup (void)
+{
+ usb_gadget_unregister_driver (&zero_driver);
+}
+module_exit (cleanup);
+
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
new file mode 100644
index 000000000000..3196c3265ff5
--- /dev/null
+++ b/drivers/usb/host/Kconfig
@@ -0,0 +1,126 @@
+#
+# USB Host Controller Drivers
+#
+comment "USB Host Controller Drivers"
+ depends on USB
+
+config USB_EHCI_HCD
+ tristate "EHCI HCD (USB 2.0) support"
+ depends on USB && PCI
+ ---help---
+ The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
+ "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
+ If your USB host controller supports USB 2.0, you will likely want to
+ configure this Host Controller Driver. At this writing, the primary
+ implementation of EHCI is a chip from NEC, widely available in add-on
+ PCI cards, but implementations are in the works from other vendors
+ including Intel and Philips. Motherboard support is appearing.
+
+ EHCI controllers are packaged with "companion" host controllers (OHCI
+ or UHCI) to handle USB 1.1 devices connected to root hub ports. Ports
+ will connect to EHCI if it the device is high speed, otherwise they
+ connect to a companion controller. If you configure EHCI, you should
+ probably configure the OHCI (for NEC and some other vendors) USB Host
+ Controller Driver or UHCI (for Via motherboards) Host Controller
+ Driver too.
+
+ You may want to read <file:Documentation/usb/ehci.txt>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ehci-hcd.
+
+config USB_EHCI_SPLIT_ISO
+ bool "Full speed ISO transactions (EXPERIMENTAL)"
+ depends on USB_EHCI_HCD && EXPERIMENTAL
+ default n
+ ---help---
+ This code is new and hasn't been used with many different
+ EHCI or USB 2.0 transaction translator implementations.
+ It should work for ISO-OUT transfers, like audio.
+
+config USB_EHCI_ROOT_HUB_TT
+ bool "Root Hub Transaction Translators (EXPERIMENTAL)"
+ depends on USB_EHCI_HCD && EXPERIMENTAL
+ ---help---
+ Some EHCI chips have vendor-specific extensions to integrate
+ transaction translators, so that no OHCI or UHCI companion
+ controller is needed. It's safe to say "y" even if your
+ controller doesn't support this feature.
+
+ This supports the EHCI implementation from TransDimension Inc.
+
+config USB_OHCI_HCD
+ tristate "OHCI HCD support"
+ depends on USB && USB_ARCH_HAS_OHCI
+ select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
+ ---help---
+ The Open Host Controller Interface (OHCI) is a standard for accessing
+ USB 1.1 host controller hardware. It does more in hardware than Intel's
+ UHCI specification. If your USB host controller follows the OHCI spec,
+ say Y. On most non-x86 systems, and on x86 hardware that's not using a
+ USB controller from Intel or VIA, this is appropriate. If your host
+ controller doesn't use PCI, this is probably appropriate. For a PCI
+ based system where you're not sure, the "lspci -v" entry will list the
+ right "prog-if" for your USB controller(s): EHCI, OHCI, or UHCI.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ohci-hcd.
+
+config USB_OHCI_HCD_PPC_SOC
+ bool "OHCI support for on-chip PPC USB controller"
+ depends on USB_OHCI_HCD && (STB03xxx || PPC_MPC52xx)
+ default y
+ select USB_OHCI_BIG_ENDIAN
+ ---help---
+ Enables support for the USB controller on the MPC52xx or
+ STB03xxx processor chip. If unsure, say Y.
+
+config USB_OHCI_HCD_PCI
+ bool "OHCI support for PCI-bus USB controllers"
+ depends on USB_OHCI_HCD && PCI && (STB03xxx || PPC_MPC52xx)
+ default y
+ select USB_OHCI_LITTLE_ENDIAN
+ ---help---
+ Enables support for PCI-bus plug-in USB controller cards.
+ If unsure, say Y.
+
+config USB_OHCI_BIG_ENDIAN
+ bool
+ depends on USB_OHCI_HCD
+ default n
+
+config USB_OHCI_LITTLE_ENDIAN
+ bool
+ depends on USB_OHCI_HCD
+ default n if STB03xxx || PPC_MPC52xx
+ default y
+
+config USB_UHCI_HCD
+ tristate "UHCI HCD (most Intel and VIA) support"
+ depends on USB && PCI
+ ---help---
+ The Universal Host Controller Interface is a standard by Intel for
+ accessing the USB hardware in the PC (which is also called the USB
+ host controller). If your USB host controller conforms to this
+ standard, you may want to say Y, but see below. All recent boards
+ with Intel PCI chipsets (like intel 430TX, 440FX, 440LX, 440BX,
+ i810, i820) conform to this standard. Also all VIA PCI chipsets
+ (like VIA VP2, VP3, MVP3, Apollo Pro, Apollo Pro II or Apollo Pro
+ 133). If unsure, say Y.
+
+ To compile this driver as a module, choose M here: the
+ module will be called uhci-hcd.
+
+config USB_SL811_HCD
+ tristate "SL811HS HCD support"
+ depends on USB
+ default N
+ help
+ The SL811HS is a single-port USB controller that supports either
+ host side or peripheral side roles. Enable this option if your
+ board has this chip, and you want to use it as a host controller.
+ If unsure, say N.
+
+ To compile this driver as a module, choose M here: the
+ module will be called sl811-hcd.
+
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
new file mode 100644
index 000000000000..a574ca06cf6b
--- /dev/null
+++ b/drivers/usb/host/Makefile
@@ -0,0 +1,10 @@
+#
+# Makefile for USB Host Controller Driver
+# framework and drivers
+#
+
+obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
+obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
+obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o
+obj-$(CONFIG_USB_SL811_HCD) += sl811-hcd.o
+obj-$(CONFIG_ETRAX_ARCH_V10) += hc_crisv10.o
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
new file mode 100644
index 000000000000..495e2a3ef6f1
--- /dev/null
+++ b/drivers/usb/host/ehci-dbg.c
@@ -0,0 +1,755 @@
+/*
+ * Copyright (c) 2001-2002 by David Brownell
+ *
+ * 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.
+ */
+
+/* this file is part of ehci-hcd.c */
+
+#define ehci_dbg(ehci, fmt, args...) \
+ dev_dbg (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
+#define ehci_err(ehci, fmt, args...) \
+ dev_err (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
+#define ehci_info(ehci, fmt, args...) \
+ dev_info (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
+#define ehci_warn(ehci, fmt, args...) \
+ dev_warn (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
+
+#ifdef EHCI_VERBOSE_DEBUG
+# define vdbg dbg
+# define ehci_vdbg ehci_dbg
+#else
+# define vdbg(fmt,args...) do { } while (0)
+# define ehci_vdbg(ehci, fmt, args...) do { } while (0)
+#endif
+
+#ifdef DEBUG
+
+/* check the values in the HCSPARAMS register
+ * (host controller _Structural_ parameters)
+ * see EHCI spec, Table 2-4 for each value
+ */
+static void dbg_hcs_params (struct ehci_hcd *ehci, char *label)
+{
+ u32 params = readl (&ehci->caps->hcs_params);
+
+ ehci_dbg (ehci,
+ "%s hcs_params 0x%x dbg=%d%s cc=%d pcc=%d%s%s ports=%d\n",
+ label, params,
+ HCS_DEBUG_PORT (params),
+ HCS_INDICATOR (params) ? " ind" : "",
+ HCS_N_CC (params),
+ HCS_N_PCC (params),
+ HCS_PORTROUTED (params) ? "" : " ordered",
+ HCS_PPC (params) ? "" : " !ppc",
+ HCS_N_PORTS (params)
+ );
+ /* Port routing, per EHCI 0.95 Spec, Section 2.2.5 */
+ if (HCS_PORTROUTED (params)) {
+ int i;
+ char buf [46], tmp [7], byte;
+
+ buf[0] = 0;
+ for (i = 0; i < HCS_N_PORTS (params); i++) {
+ // FIXME MIPS won't readb() ...
+ byte = readb (&ehci->caps->portroute[(i>>1)]);
+ sprintf(tmp, "%d ",
+ ((i & 0x1) ? ((byte)&0xf) : ((byte>>4)&0xf)));
+ strcat(buf, tmp);
+ }
+ ehci_dbg (ehci, "%s portroute %s\n",
+ label, buf);
+ }
+}
+#else
+
+static inline void dbg_hcs_params (struct ehci_hcd *ehci, char *label) {}
+
+#endif
+
+#ifdef DEBUG
+
+/* check the values in the HCCPARAMS register
+ * (host controller _Capability_ parameters)
+ * see EHCI Spec, Table 2-5 for each value
+ * */
+static void dbg_hcc_params (struct ehci_hcd *ehci, char *label)
+{
+ u32 params = readl (&ehci->caps->hcc_params);
+
+ if (HCC_ISOC_CACHE (params)) {
+ ehci_dbg (ehci,
+ "%s hcc_params %04x caching frame %s%s%s\n",
+ label, params,
+ HCC_PGM_FRAMELISTLEN (params) ? "256/512/1024" : "1024",
+ HCC_CANPARK (params) ? " park" : "",
+ HCC_64BIT_ADDR (params) ? " 64 bit addr" : "");
+ } else {
+ ehci_dbg (ehci,
+ "%s hcc_params %04x thresh %d uframes %s%s%s\n",
+ label,
+ params,
+ HCC_ISOC_THRES (params),
+ HCC_PGM_FRAMELISTLEN (params) ? "256/512/1024" : "1024",
+ HCC_CANPARK (params) ? " park" : "",
+ HCC_64BIT_ADDR (params) ? " 64 bit addr" : "");
+ }
+}
+#else
+
+static inline void dbg_hcc_params (struct ehci_hcd *ehci, char *label) {}
+
+#endif
+
+#ifdef DEBUG
+
+static void __attribute__((__unused__))
+dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd)
+{
+ ehci_dbg (ehci, "%s td %p n%08x %08x t%08x p0=%08x\n", label, qtd,
+ le32_to_cpup (&qtd->hw_next),
+ le32_to_cpup (&qtd->hw_alt_next),
+ le32_to_cpup (&qtd->hw_token),
+ le32_to_cpup (&qtd->hw_buf [0]));
+ if (qtd->hw_buf [1])
+ ehci_dbg (ehci, " p1=%08x p2=%08x p3=%08x p4=%08x\n",
+ le32_to_cpup (&qtd->hw_buf [1]),
+ le32_to_cpup (&qtd->hw_buf [2]),
+ le32_to_cpup (&qtd->hw_buf [3]),
+ le32_to_cpup (&qtd->hw_buf [4]));
+}
+
+static void __attribute__((__unused__))
+dbg_qh (const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+ ehci_dbg (ehci, "%s qh %p n%08x info %x %x qtd %x\n", label,
+ qh, qh->hw_next, qh->hw_info1, qh->hw_info2,
+ qh->hw_current);
+ dbg_qtd ("overlay", ehci, (struct ehci_qtd *) &qh->hw_qtd_next);
+}
+
+static void __attribute__((__unused__))
+dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd)
+{
+ ehci_dbg (ehci, "%s [%d] itd %p, next %08x, urb %p\n",
+ label, itd->frame, itd, le32_to_cpu(itd->hw_next), itd->urb);
+ ehci_dbg (ehci,
+ " trans: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ le32_to_cpu(itd->hw_transaction[0]),
+ le32_to_cpu(itd->hw_transaction[1]),
+ le32_to_cpu(itd->hw_transaction[2]),
+ le32_to_cpu(itd->hw_transaction[3]),
+ le32_to_cpu(itd->hw_transaction[4]),
+ le32_to_cpu(itd->hw_transaction[5]),
+ le32_to_cpu(itd->hw_transaction[6]),
+ le32_to_cpu(itd->hw_transaction[7]));
+ ehci_dbg (ehci,
+ " buf: %08x %08x %08x %08x %08x %08x %08x\n",
+ le32_to_cpu(itd->hw_bufp[0]),
+ le32_to_cpu(itd->hw_bufp[1]),
+ le32_to_cpu(itd->hw_bufp[2]),
+ le32_to_cpu(itd->hw_bufp[3]),
+ le32_to_cpu(itd->hw_bufp[4]),
+ le32_to_cpu(itd->hw_bufp[5]),
+ le32_to_cpu(itd->hw_bufp[6]));
+ ehci_dbg (ehci, " index: %d %d %d %d %d %d %d %d\n",
+ itd->index[0], itd->index[1], itd->index[2],
+ itd->index[3], itd->index[4], itd->index[5],
+ itd->index[6], itd->index[7]);
+}
+
+static void __attribute__((__unused__))
+dbg_sitd (const char *label, struct ehci_hcd *ehci, struct ehci_sitd *sitd)
+{
+ ehci_dbg (ehci, "%s [%d] sitd %p, next %08x, urb %p\n",
+ label, sitd->frame, sitd, le32_to_cpu(sitd->hw_next), sitd->urb);
+ ehci_dbg (ehci,
+ " addr %08x sched %04x result %08x buf %08x %08x\n",
+ le32_to_cpu(sitd->hw_fullspeed_ep),
+ le32_to_cpu(sitd->hw_uframe),
+ le32_to_cpu(sitd->hw_results),
+ le32_to_cpu(sitd->hw_buf [0]),
+ le32_to_cpu(sitd->hw_buf [1]));
+}
+
+static int __attribute__((__unused__))
+dbg_status_buf (char *buf, unsigned len, const char *label, u32 status)
+{
+ return scnprintf (buf, len,
+ "%s%sstatus %04x%s%s%s%s%s%s%s%s%s%s",
+ label, label [0] ? " " : "", status,
+ (status & STS_ASS) ? " Async" : "",
+ (status & STS_PSS) ? " Periodic" : "",
+ (status & STS_RECL) ? " Recl" : "",
+ (status & STS_HALT) ? " Halt" : "",
+ (status & STS_IAA) ? " IAA" : "",
+ (status & STS_FATAL) ? " FATAL" : "",
+ (status & STS_FLR) ? " FLR" : "",
+ (status & STS_PCD) ? " PCD" : "",
+ (status & STS_ERR) ? " ERR" : "",
+ (status & STS_INT) ? " INT" : ""
+ );
+}
+
+static int __attribute__((__unused__))
+dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable)
+{
+ return scnprintf (buf, len,
+ "%s%sintrenable %02x%s%s%s%s%s%s",
+ label, label [0] ? " " : "", enable,
+ (enable & STS_IAA) ? " IAA" : "",
+ (enable & STS_FATAL) ? " FATAL" : "",
+ (enable & STS_FLR) ? " FLR" : "",
+ (enable & STS_PCD) ? " PCD" : "",
+ (enable & STS_ERR) ? " ERR" : "",
+ (enable & STS_INT) ? " INT" : ""
+ );
+}
+
+static const char *const fls_strings [] =
+ { "1024", "512", "256", "??" };
+
+static int
+dbg_command_buf (char *buf, unsigned len, const char *label, u32 command)
+{
+ return scnprintf (buf, len,
+ "%s%scommand %06x %s=%d ithresh=%d%s%s%s%s period=%s%s %s",
+ label, label [0] ? " " : "", command,
+ (command & CMD_PARK) ? "park" : "(park)",
+ CMD_PARK_CNT (command),
+ (command >> 16) & 0x3f,
+ (command & CMD_LRESET) ? " LReset" : "",
+ (command & CMD_IAAD) ? " IAAD" : "",
+ (command & CMD_ASE) ? " Async" : "",
+ (command & CMD_PSE) ? " Periodic" : "",
+ fls_strings [(command >> 2) & 0x3],
+ (command & CMD_RESET) ? " Reset" : "",
+ (command & CMD_RUN) ? "RUN" : "HALT"
+ );
+}
+
+static int
+dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
+{
+ char *sig;
+
+ /* signaling state */
+ switch (status & (3 << 10)) {
+ case 0 << 10: sig = "se0"; break;
+ case 1 << 10: sig = "k"; break; /* low speed */
+ case 2 << 10: sig = "j"; break;
+ default: sig = "?"; break;
+ }
+
+ return scnprintf (buf, len,
+ "%s%sport %d status %06x%s%s sig=%s %s%s%s%s%s%s%s%s%s",
+ label, label [0] ? " " : "", port, status,
+ (status & PORT_POWER) ? " POWER" : "",
+ (status & PORT_OWNER) ? " OWNER" : "",
+ sig,
+ (status & PORT_RESET) ? " RESET" : "",
+ (status & PORT_SUSPEND) ? " SUSPEND" : "",
+ (status & PORT_RESUME) ? " RESUME" : "",
+ (status & PORT_OCC) ? " OCC" : "",
+ (status & PORT_OC) ? " OC" : "",
+ (status & PORT_PEC) ? " PEC" : "",
+ (status & PORT_PE) ? " PE" : "",
+ (status & PORT_CSC) ? " CSC" : "",
+ (status & PORT_CONNECT) ? " CONNECT" : ""
+ );
+}
+
+#else
+static inline void __attribute__((__unused__))
+dbg_qh (char *label, struct ehci_hcd *ehci, struct ehci_qh *qh)
+{}
+
+static inline int __attribute__((__unused__))
+dbg_status_buf (char *buf, unsigned len, const char *label, u32 status)
+{ return 0; }
+
+static inline int __attribute__((__unused__))
+dbg_command_buf (char *buf, unsigned len, const char *label, u32 command)
+{ return 0; }
+
+static inline int __attribute__((__unused__))
+dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable)
+{ return 0; }
+
+static inline int __attribute__((__unused__))
+dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
+{ return 0; }
+
+#endif /* DEBUG */
+
+/* functions have the "wrong" filename when they're output... */
+#define dbg_status(ehci, label, status) { \
+ char _buf [80]; \
+ dbg_status_buf (_buf, sizeof _buf, label, status); \
+ ehci_dbg (ehci, "%s\n", _buf); \
+}
+
+#define dbg_cmd(ehci, label, command) { \
+ char _buf [80]; \
+ dbg_command_buf (_buf, sizeof _buf, label, command); \
+ ehci_dbg (ehci, "%s\n", _buf); \
+}
+
+#define dbg_port(ehci, label, port, status) { \
+ char _buf [80]; \
+ dbg_port_buf (_buf, sizeof _buf, label, port, status); \
+ ehci_dbg (ehci, "%s\n", _buf); \
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef STUB_DEBUG_FILES
+
+static inline void create_debug_files (struct ehci_hcd *bus) { }
+static inline void remove_debug_files (struct ehci_hcd *bus) { }
+
+#else
+
+/* troubleshooting help: expose state in driverfs */
+
+#define speed_char(info1) ({ char tmp; \
+ switch (info1 & (3 << 12)) { \
+ case 0 << 12: tmp = 'f'; break; \
+ case 1 << 12: tmp = 'l'; break; \
+ case 2 << 12: tmp = 'h'; break; \
+ default: tmp = '?'; break; \
+ }; tmp; })
+
+static inline char token_mark (__le32 token)
+{
+ __u32 v = le32_to_cpu (token);
+ if (v & QTD_STS_ACTIVE)
+ return '*';
+ if (v & QTD_STS_HALT)
+ return '-';
+ if (!IS_SHORT_READ (v))
+ return ' ';
+ /* tries to advance through hw_alt_next */
+ return '/';
+}
+
+static void qh_lines (
+ struct ehci_hcd *ehci,
+ struct ehci_qh *qh,
+ char **nextp,
+ unsigned *sizep
+)
+{
+ u32 scratch;
+ u32 hw_curr;
+ struct list_head *entry;
+ struct ehci_qtd *td;
+ unsigned temp;
+ unsigned size = *sizep;
+ char *next = *nextp;
+ char mark;
+
+ if (qh->hw_qtd_next == EHCI_LIST_END) /* NEC does this */
+ mark = '@';
+ else
+ mark = token_mark (qh->hw_token);
+ if (mark == '/') { /* qh_alt_next controls qh advance? */
+ if ((qh->hw_alt_next & QTD_MASK) == ehci->async->hw_alt_next)
+ mark = '#'; /* blocked */
+ else if (qh->hw_alt_next == EHCI_LIST_END)
+ mark = '.'; /* use hw_qtd_next */
+ /* else alt_next points to some other qtd */
+ }
+ scratch = le32_to_cpup (&qh->hw_info1);
+ hw_curr = (mark == '*') ? le32_to_cpup (&qh->hw_current) : 0;
+ temp = scnprintf (next, size,
+ "qh/%p dev%d %cs ep%d %08x %08x (%08x%c %s nak%d)",
+ qh, scratch & 0x007f,
+ speed_char (scratch),
+ (scratch >> 8) & 0x000f,
+ scratch, le32_to_cpup (&qh->hw_info2),
+ le32_to_cpup (&qh->hw_token), mark,
+ (__constant_cpu_to_le32 (QTD_TOGGLE) & qh->hw_token)
+ ? "data1" : "data0",
+ (le32_to_cpup (&qh->hw_alt_next) >> 1) & 0x0f);
+ size -= temp;
+ next += temp;
+
+ /* hc may be modifying the list as we read it ... */
+ list_for_each (entry, &qh->qtd_list) {
+ td = list_entry (entry, struct ehci_qtd, qtd_list);
+ scratch = le32_to_cpup (&td->hw_token);
+ mark = ' ';
+ if (hw_curr == td->qtd_dma)
+ mark = '*';
+ else if (qh->hw_qtd_next == td->qtd_dma)
+ mark = '+';
+ else if (QTD_LENGTH (scratch)) {
+ if (td->hw_alt_next == ehci->async->hw_alt_next)
+ mark = '#';
+ else if (td->hw_alt_next != EHCI_LIST_END)
+ mark = '/';
+ }
+ temp = snprintf (next, size,
+ "\n\t%p%c%s len=%d %08x urb %p",
+ td, mark, ({ char *tmp;
+ switch ((scratch>>8)&0x03) {
+ case 0: tmp = "out"; break;
+ case 1: tmp = "in"; break;
+ case 2: tmp = "setup"; break;
+ default: tmp = "?"; break;
+ } tmp;}),
+ (scratch >> 16) & 0x7fff,
+ scratch,
+ td->urb);
+ if (temp < 0)
+ temp = 0;
+ else if (size < temp)
+ temp = size;
+ size -= temp;
+ next += temp;
+ if (temp == size)
+ goto done;
+ }
+
+ temp = snprintf (next, size, "\n");
+ if (temp < 0)
+ temp = 0;
+ else if (size < temp)
+ temp = size;
+ size -= temp;
+ next += temp;
+
+done:
+ *sizep = size;
+ *nextp = next;
+}
+
+static ssize_t
+show_async (struct class_device *class_dev, char *buf)
+{
+ struct usb_bus *bus;
+ struct usb_hcd *hcd;
+ struct ehci_hcd *ehci;
+ unsigned long flags;
+ unsigned temp, size;
+ char *next;
+ struct ehci_qh *qh;
+
+ *buf = 0;
+
+ bus = to_usb_bus(class_dev);
+ hcd = bus->hcpriv;
+ ehci = hcd_to_ehci (hcd);
+ next = buf;
+ size = PAGE_SIZE;
+
+ /* dumps a snapshot of the async schedule.
+ * usually empty except for long-term bulk reads, or head.
+ * one QH per line, and TDs we know about
+ */
+ spin_lock_irqsave (&ehci->lock, flags);
+ for (qh = ehci->async->qh_next.qh; size > 0 && qh; qh = qh->qh_next.qh)
+ qh_lines (ehci, qh, &next, &size);
+ if (ehci->reclaim && size > 0) {
+ temp = scnprintf (next, size, "\nreclaim =\n");
+ size -= temp;
+ next += temp;
+
+ for (qh = ehci->reclaim; size > 0 && qh; qh = qh->reclaim)
+ qh_lines (ehci, qh, &next, &size);
+ }
+ spin_unlock_irqrestore (&ehci->lock, flags);
+
+ return strlen (buf);
+}
+static CLASS_DEVICE_ATTR (async, S_IRUGO, show_async, NULL);
+
+#define DBG_SCHED_LIMIT 64
+
+static ssize_t
+show_periodic (struct class_device *class_dev, char *buf)
+{
+ struct usb_bus *bus;
+ struct usb_hcd *hcd;
+ struct ehci_hcd *ehci;
+ unsigned long flags;
+ union ehci_shadow p, *seen;
+ unsigned temp, size, seen_count;
+ char *next;
+ unsigned i;
+ __le32 tag;
+
+ if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, SLAB_ATOMIC)))
+ return 0;
+ seen_count = 0;
+
+ bus = to_usb_bus(class_dev);
+ hcd = bus->hcpriv;
+ ehci = hcd_to_ehci (hcd);
+ next = buf;
+ size = PAGE_SIZE;
+
+ temp = scnprintf (next, size, "size = %d\n", ehci->periodic_size);
+ size -= temp;
+ next += temp;
+
+ /* dump a snapshot of the periodic schedule.
+ * iso changes, interrupt usually doesn't.
+ */
+ spin_lock_irqsave (&ehci->lock, flags);
+ for (i = 0; i < ehci->periodic_size; i++) {
+ p = ehci->pshadow [i];
+ if (likely (!p.ptr))
+ continue;
+ tag = Q_NEXT_TYPE (ehci->periodic [i]);
+
+ temp = scnprintf (next, size, "%4d: ", i);
+ size -= temp;
+ next += temp;
+
+ do {
+ switch (tag) {
+ case Q_TYPE_QH:
+ temp = scnprintf (next, size, " qh%d-%04x/%p",
+ p.qh->period,
+ le32_to_cpup (&p.qh->hw_info2)
+ /* uframe masks */
+ & 0xffff,
+ p.qh);
+ size -= temp;
+ next += temp;
+ /* don't repeat what follows this qh */
+ for (temp = 0; temp < seen_count; temp++) {
+ if (seen [temp].ptr != p.ptr)
+ continue;
+ if (p.qh->qh_next.ptr)
+ temp = scnprintf (next, size,
+ " ...");
+ p.ptr = NULL;
+ break;
+ }
+ /* show more info the first time around */
+ if (temp == seen_count && p.ptr) {
+ u32 scratch = le32_to_cpup (
+ &p.qh->hw_info1);
+ struct ehci_qtd *qtd;
+ char *type = "";
+
+ /* count tds, get ep direction */
+ temp = 0;
+ list_for_each_entry (qtd,
+ &p.qh->qtd_list,
+ qtd_list) {
+ temp++;
+ switch (0x03 & (le32_to_cpu (
+ qtd->hw_token) >> 8)) {
+ case 0: type = "out"; continue;
+ case 1: type = "in"; continue;
+ }
+ }
+
+ temp = scnprintf (next, size,
+ " (%c%d ep%d%s "
+ "[%d/%d] q%d p%d)",
+ speed_char (scratch),
+ scratch & 0x007f,
+ (scratch >> 8) & 0x000f, type,
+ p.qh->usecs, p.qh->c_usecs,
+ temp,
+ 0x7ff & (scratch >> 16));
+
+ if (seen_count < DBG_SCHED_LIMIT)
+ seen [seen_count++].qh = p.qh;
+ } else
+ temp = 0;
+ if (p.qh) {
+ tag = Q_NEXT_TYPE (p.qh->hw_next);
+ p = p.qh->qh_next;
+ }
+ break;
+ case Q_TYPE_FSTN:
+ temp = scnprintf (next, size,
+ " fstn-%8x/%p", p.fstn->hw_prev,
+ p.fstn);
+ tag = Q_NEXT_TYPE (p.fstn->hw_next);
+ p = p.fstn->fstn_next;
+ break;
+ case Q_TYPE_ITD:
+ temp = scnprintf (next, size,
+ " itd/%p", p.itd);
+ tag = Q_NEXT_TYPE (p.itd->hw_next);
+ p = p.itd->itd_next;
+ break;
+ case Q_TYPE_SITD:
+ temp = scnprintf (next, size,
+ " sitd%d-%04x/%p",
+ p.sitd->stream->interval,
+ le32_to_cpup (&p.sitd->hw_uframe)
+ & 0x0000ffff,
+ p.sitd);
+ tag = Q_NEXT_TYPE (p.sitd->hw_next);
+ p = p.sitd->sitd_next;
+ break;
+ }
+ size -= temp;
+ next += temp;
+ } while (p.ptr);
+
+ temp = scnprintf (next, size, "\n");
+ size -= temp;
+ next += temp;
+ }
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ kfree (seen);
+
+ return PAGE_SIZE - size;
+}
+static CLASS_DEVICE_ATTR (periodic, S_IRUGO, show_periodic, NULL);
+
+#undef DBG_SCHED_LIMIT
+
+static ssize_t
+show_registers (struct class_device *class_dev, char *buf)
+{
+ struct usb_bus *bus;
+ struct usb_hcd *hcd;
+ struct ehci_hcd *ehci;
+ unsigned long flags;
+ unsigned temp, size, i;
+ char *next, scratch [80];
+ static char fmt [] = "%*s\n";
+ static char label [] = "";
+
+ bus = to_usb_bus(class_dev);
+ hcd = bus->hcpriv;
+ ehci = hcd_to_ehci (hcd);
+ next = buf;
+ size = PAGE_SIZE;
+
+ spin_lock_irqsave (&ehci->lock, flags);
+
+ if (bus->controller->power.power_state) {
+ size = scnprintf (next, size,
+ "bus %s, device %s (driver " DRIVER_VERSION ")\n"
+ "SUSPENDED (no register access)\n",
+ hcd->self.controller->bus->name,
+ hcd->self.controller->bus_id);
+ goto done;
+ }
+
+ /* Capability Registers */
+ i = HC_VERSION(readl (&ehci->caps->hc_capbase));
+ temp = scnprintf (next, size,
+ "bus %s, device %s (driver " DRIVER_VERSION ")\n"
+ "EHCI %x.%02x, hcd state %d\n",
+ hcd->self.controller->bus->name,
+ hcd->self.controller->bus_id,
+ i >> 8, i & 0x0ff, hcd->state);
+ size -= temp;
+ next += temp;
+
+ // FIXME interpret both types of params
+ i = readl (&ehci->caps->hcs_params);
+ temp = scnprintf (next, size, "structural params 0x%08x\n", i);
+ size -= temp;
+ next += temp;
+
+ i = readl (&ehci->caps->hcc_params);
+ temp = scnprintf (next, size, "capability params 0x%08x\n", i);
+ size -= temp;
+ next += temp;
+
+ /* Operational Registers */
+ temp = dbg_status_buf (scratch, sizeof scratch, label,
+ readl (&ehci->regs->status));
+ temp = scnprintf (next, size, fmt, temp, scratch);
+ size -= temp;
+ next += temp;
+
+ temp = dbg_command_buf (scratch, sizeof scratch, label,
+ readl (&ehci->regs->command));
+ temp = scnprintf (next, size, fmt, temp, scratch);
+ size -= temp;
+ next += temp;
+
+ temp = dbg_intr_buf (scratch, sizeof scratch, label,
+ readl (&ehci->regs->intr_enable));
+ temp = scnprintf (next, size, fmt, temp, scratch);
+ size -= temp;
+ next += temp;
+
+ temp = scnprintf (next, size, "uframe %04x\n",
+ readl (&ehci->regs->frame_index));
+ size -= temp;
+ next += temp;
+
+ for (i = 0; i < HCS_N_PORTS (ehci->hcs_params); i++) {
+ temp = dbg_port_buf (scratch, sizeof scratch, label, i + 1,
+ readl (&ehci->regs->port_status [i]));
+ temp = scnprintf (next, size, fmt, temp, scratch);
+ size -= temp;
+ next += temp;
+ }
+
+ if (ehci->reclaim) {
+ temp = scnprintf (next, size, "reclaim qh %p%s\n",
+ ehci->reclaim,
+ ehci->reclaim_ready ? " ready" : "");
+ size -= temp;
+ next += temp;
+ }
+
+#ifdef EHCI_STATS
+ temp = scnprintf (next, size,
+ "irq normal %ld err %ld reclaim %ld (lost %ld)\n",
+ ehci->stats.normal, ehci->stats.error, ehci->stats.reclaim,
+ ehci->stats.lost_iaa);
+ size -= temp;
+ next += temp;
+
+ temp = scnprintf (next, size, "complete %ld unlink %ld\n",
+ ehci->stats.complete, ehci->stats.unlink);
+ size -= temp;
+ next += temp;
+#endif
+
+done:
+ spin_unlock_irqrestore (&ehci->lock, flags);
+
+ return PAGE_SIZE - size;
+}
+static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL);
+
+static inline void create_debug_files (struct ehci_hcd *ehci)
+{
+ struct class_device *cldev = &ehci_to_hcd(ehci)->self.class_dev;
+
+ class_device_create_file(cldev, &class_device_attr_async);
+ class_device_create_file(cldev, &class_device_attr_periodic);
+ class_device_create_file(cldev, &class_device_attr_registers);
+}
+
+static inline void remove_debug_files (struct ehci_hcd *ehci)
+{
+ struct class_device *cldev = &ehci_to_hcd(ehci)->self.class_dev;
+
+ class_device_remove_file(cldev, &class_device_attr_async);
+ class_device_remove_file(cldev, &class_device_attr_periodic);
+ class_device_remove_file(cldev, &class_device_attr_registers);
+}
+
+#endif /* STUB_DEBUG_FILES */
+
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
new file mode 100644
index 000000000000..a63bb792e2c7
--- /dev/null
+++ b/drivers/usb/host/ehci-hcd.c
@@ -0,0 +1,1261 @@
+/*
+ * Copyright (c) 2000-2004 by David Brownell
+ *
+ * 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.
+ */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/dmapool.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/reboot.h>
+#include <linux/usb.h>
+#include <linux/moduleparam.h>
+#include <linux/dma-mapping.h>
+
+#include "../core/hcd.h"
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * EHCI hc_driver implementation ... experimental, incomplete.
+ * Based on the final 1.0 register interface specification.
+ *
+ * USB 2.0 shows up in upcoming www.pcmcia.org technology.
+ * First was PCMCIA, like ISA; then CardBus, which is PCI.
+ * Next comes "CardBay", using USB 2.0 signals.
+ *
+ * Contains additional contributions by Brad Hards, Rory Bolt, and others.
+ * Special thanks to Intel and VIA for providing host controllers to
+ * test this driver on, and Cypress (including In-System Design) for
+ * providing early devices for those host controllers to talk to!
+ *
+ * HISTORY:
+ *
+ * 2004-05-10 Root hub and PCI suspend/resume support; remote wakeup. (db)
+ * 2004-02-24 Replace pci_* with generic dma_* API calls (dsaxena@plexity.net)
+ * 2003-12-29 Rewritten high speed iso transfer support (by Michal Sojka,
+ * <sojkam@centrum.cz>, updates by DB).
+ *
+ * 2002-11-29 Correct handling for hw async_next register.
+ * 2002-08-06 Handling for bulk and interrupt transfers is mostly shared;
+ * only scheduling is different, no arbitrary limitations.
+ * 2002-07-25 Sanity check PCI reads, mostly for better cardbus support,
+ * clean up HC run state handshaking.
+ * 2002-05-24 Preliminary FS/LS interrupts, using scheduling shortcuts
+ * 2002-05-11 Clear TT errors for FS/LS ctrl/bulk. Fill in some other
+ * missing pieces: enabling 64bit dma, handoff from BIOS/SMM.
+ * 2002-05-07 Some error path cleanups to report better errors; wmb();
+ * use non-CVS version id; better iso bandwidth claim.
+ * 2002-04-19 Control/bulk/interrupt submit no longer uses giveback() on
+ * errors in submit path. Bugfixes to interrupt scheduling/processing.
+ * 2002-03-05 Initial high-speed ISO support; reduce ITD memory; shift
+ * more checking to generic hcd framework (db). Make it work with
+ * Philips EHCI; reduce PCI traffic; shorten IRQ path (Rory Bolt).
+ * 2002-01-14 Minor cleanup; version synch.
+ * 2002-01-08 Fix roothub handoff of FS/LS to companion controllers.
+ * 2002-01-04 Control/Bulk queuing behaves.
+ *
+ * 2001-12-12 Initial patch version for Linux 2.5.1 kernel.
+ * 2001-June Works with usb-storage and NEC EHCI on 2.4
+ */
+
+#define DRIVER_VERSION "10 Dec 2004"
+#define DRIVER_AUTHOR "David Brownell"
+#define DRIVER_DESC "USB 2.0 'Enhanced' Host Controller (EHCI) Driver"
+
+static const char hcd_name [] = "ehci_hcd";
+
+
+#undef EHCI_VERBOSE_DEBUG
+#undef EHCI_URB_TRACE
+
+#ifdef DEBUG
+#define EHCI_STATS
+#endif
+
+/* magic numbers that can affect system performance */
+#define EHCI_TUNE_CERR 3 /* 0-3 qtd retries; 0 == don't stop */
+#define EHCI_TUNE_RL_HS 4 /* nak throttle; see 4.9 */
+#define EHCI_TUNE_RL_TT 0
+#define EHCI_TUNE_MULT_HS 1 /* 1-3 transactions/uframe; 4.10.3 */
+#define EHCI_TUNE_MULT_TT 1
+#define EHCI_TUNE_FLS 2 /* (small) 256 frame schedule */
+
+#define EHCI_IAA_JIFFIES (HZ/100) /* arbitrary; ~10 msec */
+#define EHCI_IO_JIFFIES (HZ/10) /* io watchdog > irq_thresh */
+#define EHCI_ASYNC_JIFFIES (HZ/20) /* async idle timeout */
+#define EHCI_SHRINK_JIFFIES (HZ/200) /* async qh unlink delay */
+
+/* Initial IRQ latency: faster than hw default */
+static int log2_irq_thresh = 0; // 0 to 6
+module_param (log2_irq_thresh, int, S_IRUGO);
+MODULE_PARM_DESC (log2_irq_thresh, "log2 IRQ latency, 1-64 microframes");
+
+/* initial park setting: slower than hw default */
+static unsigned park = 0;
+module_param (park, uint, S_IRUGO);
+MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets");
+
+#define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT)
+
+/*-------------------------------------------------------------------------*/
+
+#include "ehci.h"
+#include "ehci-dbg.c"
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * handshake - spin reading hc until handshake completes or fails
+ * @ptr: address of hc register to be read
+ * @mask: bits to look at in result of read
+ * @done: value of those bits when handshake succeeds
+ * @usec: timeout in microseconds
+ *
+ * Returns negative errno, or zero on success
+ *
+ * Success happens when the "mask" bits have the specified value (hardware
+ * handshake done). There are two failure modes: "usec" have passed (major
+ * hardware flakeout), or the register reads as all-ones (hardware removed).
+ *
+ * That last failure should_only happen in cases like physical cardbus eject
+ * before driver shutdown. But it also seems to be caused by bugs in cardbus
+ * bridge shutdown: shutting down the bridge before the devices using it.
+ */
+static int handshake (void __iomem *ptr, u32 mask, u32 done, int usec)
+{
+ u32 result;
+
+ do {
+ result = readl (ptr);
+ if (result == ~(u32)0) /* card removed */
+ return -ENODEV;
+ result &= mask;
+ if (result == done)
+ return 0;
+ udelay (1);
+ usec--;
+ } while (usec > 0);
+ return -ETIMEDOUT;
+}
+
+/* force HC to halt state from unknown (EHCI spec section 2.3) */
+static int ehci_halt (struct ehci_hcd *ehci)
+{
+ u32 temp = readl (&ehci->regs->status);
+
+ if ((temp & STS_HALT) != 0)
+ return 0;
+
+ temp = readl (&ehci->regs->command);
+ temp &= ~CMD_RUN;
+ writel (temp, &ehci->regs->command);
+ return handshake (&ehci->regs->status, STS_HALT, STS_HALT, 16 * 125);
+}
+
+/* put TDI/ARC silicon into EHCI mode */
+static void tdi_reset (struct ehci_hcd *ehci)
+{
+ u32 __iomem *reg_ptr;
+ u32 tmp;
+
+ reg_ptr = (u32 __iomem *)(((u8 __iomem *)ehci->regs) + 0x68);
+ tmp = readl (reg_ptr);
+ tmp |= 0x3;
+ writel (tmp, reg_ptr);
+}
+
+/* reset a non-running (STS_HALT == 1) controller */
+static int ehci_reset (struct ehci_hcd *ehci)
+{
+ int retval;
+ u32 command = readl (&ehci->regs->command);
+
+ command |= CMD_RESET;
+ dbg_cmd (ehci, "reset", command);
+ writel (command, &ehci->regs->command);
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
+ ehci->next_statechange = jiffies;
+ retval = handshake (&ehci->regs->command, CMD_RESET, 0, 250 * 1000);
+
+ if (retval)
+ return retval;
+
+ if (ehci_is_TDI(ehci))
+ tdi_reset (ehci);
+
+ return retval;
+}
+
+/* idle the controller (from running) */
+static void ehci_quiesce (struct ehci_hcd *ehci)
+{
+ u32 temp;
+
+#ifdef DEBUG
+ if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
+ BUG ();
+#endif
+
+ /* wait for any schedule enables/disables to take effect */
+ temp = readl (&ehci->regs->command) << 10;
+ temp &= STS_ASS | STS_PSS;
+ if (handshake (&ehci->regs->status, STS_ASS | STS_PSS,
+ temp, 16 * 125) != 0) {
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
+ return;
+ }
+
+ /* then disable anything that's still active */
+ temp = readl (&ehci->regs->command);
+ temp &= ~(CMD_ASE | CMD_IAAD | CMD_PSE);
+ writel (temp, &ehci->regs->command);
+
+ /* hardware can take 16 microframes to turn off ... */
+ if (handshake (&ehci->regs->status, STS_ASS | STS_PSS,
+ 0, 16 * 125) != 0) {
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
+ return;
+ }
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void ehci_work(struct ehci_hcd *ehci, struct pt_regs *regs);
+
+#include "ehci-hub.c"
+#include "ehci-mem.c"
+#include "ehci-q.c"
+#include "ehci-sched.c"
+
+/*-------------------------------------------------------------------------*/
+
+static void ehci_watchdog (unsigned long param)
+{
+ struct ehci_hcd *ehci = (struct ehci_hcd *) param;
+ unsigned long flags;
+
+ spin_lock_irqsave (&ehci->lock, flags);
+
+ /* lost IAA irqs wedge things badly; seen with a vt8235 */
+ if (ehci->reclaim) {
+ u32 status = readl (&ehci->regs->status);
+
+ if (status & STS_IAA) {
+ ehci_vdbg (ehci, "lost IAA\n");
+ COUNT (ehci->stats.lost_iaa);
+ writel (STS_IAA, &ehci->regs->status);
+ ehci->reclaim_ready = 1;
+ }
+ }
+
+ /* stop async processing after it's idled a bit */
+ if (test_bit (TIMER_ASYNC_OFF, &ehci->actions))
+ start_unlink_async (ehci, ehci->async);
+
+ /* ehci could run by timer, without IRQs ... */
+ ehci_work (ehci, NULL);
+
+ spin_unlock_irqrestore (&ehci->lock, flags);
+}
+
+#ifdef CONFIG_PCI
+
+/* EHCI 0.96 (and later) section 5.1 says how to kick BIOS/SMM/...
+ * off the controller (maybe it can boot from highspeed USB disks).
+ */
+static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)
+{
+ if (cap & (1 << 16)) {
+ int msec = 5000;
+ struct pci_dev *pdev =
+ to_pci_dev(ehci_to_hcd(ehci)->self.controller);
+
+ /* request handoff to OS */
+ cap |= 1 << 24;
+ pci_write_config_dword(pdev, where, cap);
+
+ /* and wait a while for it to happen */
+ do {
+ msleep(10);
+ msec -= 10;
+ pci_read_config_dword(pdev, where, &cap);
+ } while ((cap & (1 << 16)) && msec);
+ if (cap & (1 << 16)) {
+ ehci_err (ehci, "BIOS handoff failed (%d, %04x)\n",
+ where, cap);
+ // some BIOS versions seem buggy...
+ // return 1;
+ ehci_warn (ehci, "continuing after BIOS bug...\n");
+ return 0;
+ }
+ ehci_dbg (ehci, "BIOS handoff succeeded\n");
+ }
+ return 0;
+}
+
+#endif
+
+static int
+ehci_reboot (struct notifier_block *self, unsigned long code, void *null)
+{
+ struct ehci_hcd *ehci;
+
+ ehci = container_of (self, struct ehci_hcd, reboot_notifier);
+
+ /* make BIOS/etc use companion controller during reboot */
+ writel (0, &ehci->regs->configured_flag);
+ return 0;
+}
+
+
+/* called by khubd or root hub init threads */
+
+static int ehci_hc_reset (struct usb_hcd *hcd)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ u32 temp;
+ unsigned count = 256/4;
+
+ spin_lock_init (&ehci->lock);
+
+ ehci->caps = hcd->regs;
+ ehci->regs = hcd->regs + HC_LENGTH (readl (&ehci->caps->hc_capbase));
+ dbg_hcs_params (ehci, "reset");
+ dbg_hcc_params (ehci, "reset");
+
+#ifdef CONFIG_PCI
+ /* EHCI 0.96 and later may have "extended capabilities" */
+ if (hcd->self.controller->bus == &pci_bus_type) {
+ struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+
+ switch (pdev->vendor) {
+ case PCI_VENDOR_ID_TDI:
+ if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
+ ehci->is_tdi_rh_tt = 1;
+ tdi_reset (ehci);
+ }
+ break;
+ case PCI_VENDOR_ID_AMD:
+ /* AMD8111 EHCI doesn't work, according to AMD errata */
+ if (pdev->device == 0x7463) {
+ ehci_info (ehci, "ignoring AMD8111 (errata)\n");
+ return -EIO;
+ }
+ break;
+ }
+
+ temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params));
+ } else
+ temp = 0;
+ while (temp && count--) {
+ u32 cap;
+
+ pci_read_config_dword (to_pci_dev(hcd->self.controller),
+ temp, &cap);
+ ehci_dbg (ehci, "capability %04x at %02x\n", cap, temp);
+ switch (cap & 0xff) {
+ case 1: /* BIOS/SMM/... handoff */
+ if (bios_handoff (ehci, temp, cap) != 0)
+ return -EOPNOTSUPP;
+ break;
+ case 0: /* illegal reserved capability */
+ ehci_warn (ehci, "illegal capability!\n");
+ cap = 0;
+ /* FALLTHROUGH */
+ default: /* unknown */
+ break;
+ }
+ temp = (cap >> 8) & 0xff;
+ }
+ if (!count) {
+ ehci_err (ehci, "bogus capabilities ... PCI problems!\n");
+ return -EIO;
+ }
+ if (ehci_is_TDI(ehci))
+ ehci_reset (ehci);
+#endif
+
+ /* cache this readonly data; minimize PCI reads */
+ ehci->hcs_params = readl (&ehci->caps->hcs_params);
+
+ /* at least the Genesys GL880S needs fixup here */
+ temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
+ temp &= 0x0f;
+ if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) {
+ ehci_dbg (ehci, "bogus port configuration: "
+ "cc=%d x pcc=%d < ports=%d\n",
+ HCS_N_CC(ehci->hcs_params),
+ HCS_N_PCC(ehci->hcs_params),
+ HCS_N_PORTS(ehci->hcs_params));
+
+#ifdef CONFIG_PCI
+ if (hcd->self.controller->bus == &pci_bus_type) {
+ struct pci_dev *pdev;
+
+ pdev = to_pci_dev(hcd->self.controller);
+ switch (pdev->vendor) {
+ case 0x17a0: /* GENESYS */
+ /* GL880S: should be PORTS=2 */
+ temp |= (ehci->hcs_params & ~0xf);
+ ehci->hcs_params = temp;
+ break;
+ case PCI_VENDOR_ID_NVIDIA:
+ /* NF4: should be PCC=10 */
+ break;
+ }
+ }
+#endif
+ }
+
+ /* force HC to halt state */
+ return ehci_halt (ehci);
+}
+
+static int ehci_start (struct usb_hcd *hcd)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ u32 temp;
+ struct usb_device *udev;
+ struct usb_bus *bus;
+ int retval;
+ u32 hcc_params;
+ u8 sbrn = 0;
+ int first;
+
+ /* skip some things on restart paths */
+ first = (ehci->watchdog.data == 0);
+ if (first) {
+ init_timer (&ehci->watchdog);
+ ehci->watchdog.function = ehci_watchdog;
+ ehci->watchdog.data = (unsigned long) ehci;
+ }
+
+ /*
+ * hw default: 1K periodic list heads, one per frame.
+ * periodic_size can shrink by USBCMD update if hcc_params allows.
+ */
+ ehci->periodic_size = DEFAULT_I_TDPS;
+ if (first && (retval = ehci_mem_init (ehci, GFP_KERNEL)) < 0)
+ return retval;
+
+ /* controllers may cache some of the periodic schedule ... */
+ hcc_params = readl (&ehci->caps->hcc_params);
+ if (HCC_ISOC_CACHE (hcc_params)) // full frame cache
+ ehci->i_thresh = 8;
+ else // N microframes cached
+ ehci->i_thresh = 2 + HCC_ISOC_THRES (hcc_params);
+
+ ehci->reclaim = NULL;
+ ehci->reclaim_ready = 0;
+ ehci->next_uframe = -1;
+
+ /* controller state: unknown --> reset */
+
+ /* EHCI spec section 4.1 */
+ if ((retval = ehci_reset (ehci)) != 0) {
+ ehci_mem_cleanup (ehci);
+ return retval;
+ }
+ writel (ehci->periodic_dma, &ehci->regs->frame_list);
+
+#ifdef CONFIG_PCI
+ if (hcd->self.controller->bus == &pci_bus_type) {
+ struct pci_dev *pdev;
+ u16 port_wake;
+
+ pdev = to_pci_dev(hcd->self.controller);
+
+ /* Serial Bus Release Number is at PCI 0x60 offset */
+ pci_read_config_byte(pdev, 0x60, &sbrn);
+
+ /* port wake capability, reported by boot firmware */
+ pci_read_config_word(pdev, 0x62, &port_wake);
+ hcd->can_wakeup = (port_wake & 1) != 0;
+
+ /* help hc dma work well with cachelines */
+ pci_set_mwi (pdev);
+ }
+#endif
+
+ /*
+ * dedicate a qh for the async ring head, since we couldn't unlink
+ * a 'real' qh without stopping the async schedule [4.8]. use it
+ * as the 'reclamation list head' too.
+ * its dummy is used in hw_alt_next of many tds, to prevent the qh
+ * from automatically advancing to the next td after short reads.
+ */
+ if (first) {
+ ehci->async->qh_next.qh = NULL;
+ ehci->async->hw_next = QH_NEXT (ehci->async->qh_dma);
+ ehci->async->hw_info1 = cpu_to_le32 (QH_HEAD);
+ ehci->async->hw_token = cpu_to_le32 (QTD_STS_HALT);
+ ehci->async->hw_qtd_next = EHCI_LIST_END;
+ ehci->async->qh_state = QH_STATE_LINKED;
+ ehci->async->hw_alt_next = QTD_NEXT (ehci->async->dummy->qtd_dma);
+ }
+ writel ((u32)ehci->async->qh_dma, &ehci->regs->async_next);
+
+ /*
+ * hcc_params controls whether ehci->regs->segment must (!!!)
+ * be used; it constrains QH/ITD/SITD and QTD locations.
+ * pci_pool consistent memory always uses segment zero.
+ * streaming mappings for I/O buffers, like pci_map_single(),
+ * can return segments above 4GB, if the device allows.
+ *
+ * NOTE: the dma mask is visible through dma_supported(), so
+ * drivers can pass this info along ... like NETIF_F_HIGHDMA,
+ * Scsi_Host.highmem_io, and so forth. It's readonly to all
+ * host side drivers though.
+ */
+ if (HCC_64BIT_ADDR (hcc_params)) {
+ writel (0, &ehci->regs->segment);
+#if 0
+// this is deeply broken on almost all architectures
+ if (!pci_set_dma_mask (to_pci_dev(hcd->self.controller), 0xffffffffffffffffULL))
+ ehci_info (ehci, "enabled 64bit PCI DMA\n");
+#endif
+ }
+
+ /* clear interrupt enables, set irq latency */
+ if (log2_irq_thresh < 0 || log2_irq_thresh > 6)
+ log2_irq_thresh = 0;
+ temp = 1 << (16 + log2_irq_thresh);
+ if (HCC_CANPARK(hcc_params)) {
+ /* HW default park == 3, on hardware that supports it (like
+ * NVidia and ALI silicon), maximizes throughput on the async
+ * schedule by avoiding QH fetches between transfers.
+ *
+ * With fast usb storage devices and NForce2, "park" seems to
+ * make problems: throughput reduction (!), data errors...
+ */
+ if (park) {
+ park = min (park, (unsigned) 3);
+ temp |= CMD_PARK;
+ temp |= park << 8;
+ }
+ ehci_info (ehci, "park %d\n", park);
+ }
+ if (HCC_PGM_FRAMELISTLEN (hcc_params)) {
+ /* periodic schedule size can be smaller than default */
+ temp &= ~(3 << 2);
+ temp |= (EHCI_TUNE_FLS << 2);
+ switch (EHCI_TUNE_FLS) {
+ case 0: ehci->periodic_size = 1024; break;
+ case 1: ehci->periodic_size = 512; break;
+ case 2: ehci->periodic_size = 256; break;
+ default: BUG ();
+ }
+ }
+ // Philips, Intel, and maybe others need CMD_RUN before the
+ // root hub will detect new devices (why?); NEC doesn't
+ temp |= CMD_RUN;
+ writel (temp, &ehci->regs->command);
+ dbg_cmd (ehci, "init", temp);
+
+ /* set async sleep time = 10 us ... ? */
+
+ /* wire up the root hub */
+ bus = hcd_to_bus (hcd);
+ udev = first ? usb_alloc_dev (NULL, bus, 0) : bus->root_hub;
+ if (!udev) {
+done2:
+ ehci_mem_cleanup (ehci);
+ return -ENOMEM;
+ }
+ udev->speed = USB_SPEED_HIGH;
+ udev->state = first ? USB_STATE_ATTACHED : USB_STATE_CONFIGURED;
+
+ /*
+ * Start, enabling full USB 2.0 functionality ... usb 1.1 devices
+ * are explicitly handed to companion controller(s), so no TT is
+ * involved with the root hub. (Except where one is integrated,
+ * and there's no companion controller unless maybe for USB OTG.)
+ */
+ if (first) {
+ ehci->reboot_notifier.notifier_call = ehci_reboot;
+ register_reboot_notifier (&ehci->reboot_notifier);
+ }
+
+ hcd->state = HC_STATE_RUNNING;
+ writel (FLAG_CF, &ehci->regs->configured_flag);
+ readl (&ehci->regs->command); /* unblock posted write */
+
+ temp = HC_VERSION(readl (&ehci->caps->hc_capbase));
+ ehci_info (ehci,
+ "USB %x.%x %s, EHCI %x.%02x, driver %s\n",
+ ((sbrn & 0xf0)>>4), (sbrn & 0x0f),
+ first ? "initialized" : "restarted",
+ temp >> 8, temp & 0xff, DRIVER_VERSION);
+
+ /*
+ * From here on, khubd concurrently accesses the root
+ * hub; drivers will be talking to enumerated devices.
+ * (On restart paths, khubd already knows about the root
+ * hub and could find work as soon as we wrote FLAG_CF.)
+ *
+ * Before this point the HC was idle/ready. After, khubd
+ * and device drivers may start it running.
+ */
+ if (first && usb_hcd_register_root_hub (udev, hcd) != 0) {
+ if (hcd->state == HC_STATE_RUNNING)
+ ehci_quiesce (ehci);
+ ehci_reset (ehci);
+ usb_put_dev (udev);
+ retval = -ENODEV;
+ goto done2;
+ }
+
+ writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */
+
+ if (first)
+ create_debug_files (ehci);
+
+ return 0;
+}
+
+/* always called by thread; normally rmmod */
+
+static void ehci_stop (struct usb_hcd *hcd)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ u8 rh_ports, port;
+
+ ehci_dbg (ehci, "stop\n");
+
+ /* Turn off port power on all root hub ports. */
+ rh_ports = HCS_N_PORTS (ehci->hcs_params);
+ for (port = 1; port <= rh_ports; port++)
+ (void) ehci_hub_control(hcd,
+ ClearPortFeature, USB_PORT_FEAT_POWER,
+ port, NULL, 0);
+
+ /* no more interrupts ... */
+ del_timer_sync (&ehci->watchdog);
+
+ spin_lock_irq(&ehci->lock);
+ if (HC_IS_RUNNING (hcd->state))
+ ehci_quiesce (ehci);
+
+ ehci_reset (ehci);
+ writel (0, &ehci->regs->intr_enable);
+ spin_unlock_irq(&ehci->lock);
+
+ /* let companion controllers work when we aren't */
+ writel (0, &ehci->regs->configured_flag);
+ unregister_reboot_notifier (&ehci->reboot_notifier);
+
+ remove_debug_files (ehci);
+
+ /* root hub is shut down separately (first, when possible) */
+ spin_lock_irq (&ehci->lock);
+ if (ehci->async)
+ ehci_work (ehci, NULL);
+ spin_unlock_irq (&ehci->lock);
+ ehci_mem_cleanup (ehci);
+
+#ifdef EHCI_STATS
+ ehci_dbg (ehci, "irq normal %ld err %ld reclaim %ld (lost %ld)\n",
+ ehci->stats.normal, ehci->stats.error, ehci->stats.reclaim,
+ ehci->stats.lost_iaa);
+ ehci_dbg (ehci, "complete %ld unlink %ld\n",
+ ehci->stats.complete, ehci->stats.unlink);
+#endif
+
+ dbg_status (ehci, "ehci_stop completed", readl (&ehci->regs->status));
+}
+
+static int ehci_get_frame (struct usb_hcd *hcd)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ return (readl (&ehci->regs->frame_index) >> 3) % ehci->periodic_size;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_PM
+
+/* suspend/resume, section 4.3 */
+
+/* These routines rely on the bus (pci, platform, etc)
+ * to handle powerdown and wakeup, and currently also on
+ * transceivers that don't need any software attention to set up
+ * the right sort of wakeup.
+ */
+
+static int ehci_suspend (struct usb_hcd *hcd, u32 state)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+
+ if (time_before (jiffies, ehci->next_statechange))
+ msleep (100);
+
+#ifdef CONFIG_USB_SUSPEND
+ (void) usb_suspend_device (hcd->self.root_hub, state);
+#else
+ usb_lock_device (hcd->self.root_hub);
+ (void) ehci_hub_suspend (hcd);
+ usb_unlock_device (hcd->self.root_hub);
+#endif
+
+ // save (PCI) FLADJ in case of Vaux power loss
+ // ... we'd only use it to handle clock skew
+
+ return 0;
+}
+
+static int ehci_resume (struct usb_hcd *hcd)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ unsigned port;
+ struct usb_device *root = hcd->self.root_hub;
+ int retval = -EINVAL;
+ int powerup = 0;
+
+ // maybe restore (PCI) FLADJ
+
+ if (time_before (jiffies, ehci->next_statechange))
+ msleep (100);
+
+ /* If any port is suspended, we know we can/must resume the HC. */
+ for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; ) {
+ u32 status;
+ port--;
+ status = readl (&ehci->regs->port_status [port]);
+ if (status & PORT_SUSPEND) {
+ down (&hcd->self.root_hub->serialize);
+ retval = ehci_hub_resume (hcd);
+ up (&hcd->self.root_hub->serialize);
+ break;
+ }
+ if ((status & PORT_POWER) == 0)
+ powerup = 1;
+ if (!root->children [port])
+ continue;
+ dbg_port (ehci, __FUNCTION__, port + 1, status);
+ usb_set_device_state (root->children[port],
+ USB_STATE_NOTATTACHED);
+ }
+
+ /* Else reset, to cope with power loss or flush-to-storage
+ * style "resume" having activated BIOS during reboot.
+ */
+ if (port == 0) {
+ (void) ehci_halt (ehci);
+ (void) ehci_reset (ehci);
+ (void) ehci_hc_reset (hcd);
+
+ /* emptying the schedule aborts any urbs */
+ spin_lock_irq (&ehci->lock);
+ if (ehci->reclaim)
+ ehci->reclaim_ready = 1;
+ ehci_work (ehci, NULL);
+ spin_unlock_irq (&ehci->lock);
+
+ /* restart; khubd will disconnect devices */
+ retval = ehci_start (hcd);
+
+ /* here we "know" root ports should always stay powered;
+ * but some controllers may lost all power.
+ */
+ if (powerup) {
+ ehci_dbg (ehci, "...powerup ports...\n");
+ for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; )
+ (void) ehci_hub_control(hcd,
+ SetPortFeature, USB_PORT_FEAT_POWER,
+ port--, NULL, 0);
+ msleep(20);
+ }
+ }
+
+ return retval;
+}
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * ehci_work is called from some interrupts, timers, and so on.
+ * it calls driver completion functions, after dropping ehci->lock.
+ */
+static void ehci_work (struct ehci_hcd *ehci, struct pt_regs *regs)
+{
+ timer_action_done (ehci, TIMER_IO_WATCHDOG);
+ if (ehci->reclaim_ready)
+ end_unlink_async (ehci, regs);
+
+ /* another CPU may drop ehci->lock during a schedule scan while
+ * it reports urb completions. this flag guards against bogus
+ * attempts at re-entrant schedule scanning.
+ */
+ if (ehci->scanning)
+ return;
+ ehci->scanning = 1;
+ scan_async (ehci, regs);
+ if (ehci->next_uframe != -1)
+ scan_periodic (ehci, regs);
+ ehci->scanning = 0;
+
+ /* the IO watchdog guards against hardware or driver bugs that
+ * misplace IRQs, and should let us run completely without IRQs.
+ * such lossage has been observed on both VT6202 and VT8235.
+ */
+ if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state) &&
+ (ehci->async->qh_next.ptr != NULL ||
+ ehci->periodic_sched != 0))
+ timer_action (ehci, TIMER_IO_WATCHDOG);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static irqreturn_t ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ u32 status;
+ int bh;
+
+ spin_lock (&ehci->lock);
+
+ status = readl (&ehci->regs->status);
+
+ /* e.g. cardbus physical eject */
+ if (status == ~(u32) 0) {
+ ehci_dbg (ehci, "device removed\n");
+ goto dead;
+ }
+
+ status &= INTR_MASK;
+ if (!status) { /* irq sharing? */
+ spin_unlock(&ehci->lock);
+ return IRQ_NONE;
+ }
+
+ /* clear (just) interrupts */
+ writel (status, &ehci->regs->status);
+ readl (&ehci->regs->command); /* unblock posted write */
+ bh = 0;
+
+#ifdef EHCI_VERBOSE_DEBUG
+ /* unrequested/ignored: Frame List Rollover */
+ dbg_status (ehci, "irq", status);
+#endif
+
+ /* INT, ERR, and IAA interrupt rates can be throttled */
+
+ /* normal [4.15.1.2] or error [4.15.1.1] completion */
+ if (likely ((status & (STS_INT|STS_ERR)) != 0)) {
+ if (likely ((status & STS_ERR) == 0))
+ COUNT (ehci->stats.normal);
+ else
+ COUNT (ehci->stats.error);
+ bh = 1;
+ }
+
+ /* complete the unlinking of some qh [4.15.2.3] */
+ if (status & STS_IAA) {
+ COUNT (ehci->stats.reclaim);
+ ehci->reclaim_ready = 1;
+ bh = 1;
+ }
+
+ /* remote wakeup [4.3.1] */
+ if ((status & STS_PCD) && hcd->remote_wakeup) {
+ unsigned i = HCS_N_PORTS (ehci->hcs_params);
+
+ /* resume root hub? */
+ status = readl (&ehci->regs->command);
+ if (!(status & CMD_RUN))
+ writel (status | CMD_RUN, &ehci->regs->command);
+
+ while (i--) {
+ status = readl (&ehci->regs->port_status [i]);
+ if (status & PORT_OWNER)
+ continue;
+ if (!(status & PORT_RESUME)
+ || ehci->reset_done [i] != 0)
+ continue;
+
+ /* start 20 msec resume signaling from this port,
+ * and make khubd collect PORT_STAT_C_SUSPEND to
+ * stop that signaling.
+ */
+ ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
+ mod_timer (&hcd->rh_timer,
+ ehci->reset_done [i] + 1);
+ ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
+ }
+ }
+
+ /* PCI errors [4.15.2.4] */
+ if (unlikely ((status & STS_FATAL) != 0)) {
+ /* bogus "fatal" IRQs appear on some chips... why? */
+ status = readl (&ehci->regs->status);
+ dbg_cmd (ehci, "fatal", readl (&ehci->regs->command));
+ dbg_status (ehci, "fatal", status);
+ if (status & STS_HALT) {
+ ehci_err (ehci, "fatal error\n");
+dead:
+ ehci_reset (ehci);
+ writel (0, &ehci->regs->configured_flag);
+ /* generic layer kills/unlinks all urbs, then
+ * uses ehci_stop to clean up the rest
+ */
+ bh = 1;
+ }
+ }
+
+ if (bh)
+ ehci_work (ehci, regs);
+ spin_unlock (&ehci->lock);
+ return IRQ_HANDLED;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * non-error returns are a promise to giveback() the urb later
+ * we drop ownership so next owner (or urb unlink) can get it
+ *
+ * urb + dev is in hcd.self.controller.urb_list
+ * we're queueing TDs onto software and hardware lists
+ *
+ * hcd-specific init for hcpriv hasn't been done yet
+ *
+ * NOTE: control, bulk, and interrupt share the same code to append TDs
+ * to a (possibly active) QH, and the same QH scanning code.
+ */
+static int ehci_urb_enqueue (
+ struct usb_hcd *hcd,
+ struct usb_host_endpoint *ep,
+ struct urb *urb,
+ int mem_flags
+) {
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ struct list_head qtd_list;
+
+ INIT_LIST_HEAD (&qtd_list);
+
+ switch (usb_pipetype (urb->pipe)) {
+ // case PIPE_CONTROL:
+ // case PIPE_BULK:
+ default:
+ if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
+ return -ENOMEM;
+ return submit_async (ehci, ep, urb, &qtd_list, mem_flags);
+
+ case PIPE_INTERRUPT:
+ if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
+ return -ENOMEM;
+ return intr_submit (ehci, ep, urb, &qtd_list, mem_flags);
+
+ case PIPE_ISOCHRONOUS:
+ if (urb->dev->speed == USB_SPEED_HIGH)
+ return itd_submit (ehci, urb, mem_flags);
+ else
+ return sitd_submit (ehci, urb, mem_flags);
+ }
+}
+
+static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+ /* if we need to use IAA and it's busy, defer */
+ if (qh->qh_state == QH_STATE_LINKED
+ && ehci->reclaim
+ && HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) {
+ struct ehci_qh *last;
+
+ for (last = ehci->reclaim;
+ last->reclaim;
+ last = last->reclaim)
+ continue;
+ qh->qh_state = QH_STATE_UNLINK_WAIT;
+ last->reclaim = qh;
+
+ /* bypass IAA if the hc can't care */
+ } else if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state) && ehci->reclaim)
+ end_unlink_async (ehci, NULL);
+
+ /* something else might have unlinked the qh by now */
+ if (qh->qh_state == QH_STATE_LINKED)
+ start_unlink_async (ehci, qh);
+}
+
+/* remove from hardware lists
+ * completions normally happen asynchronously
+ */
+
+static int ehci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ struct ehci_qh *qh;
+ unsigned long flags;
+
+ spin_lock_irqsave (&ehci->lock, flags);
+ switch (usb_pipetype (urb->pipe)) {
+ // case PIPE_CONTROL:
+ // case PIPE_BULK:
+ default:
+ qh = (struct ehci_qh *) urb->hcpriv;
+ if (!qh)
+ break;
+ unlink_async (ehci, qh);
+ break;
+
+ case PIPE_INTERRUPT:
+ qh = (struct ehci_qh *) urb->hcpriv;
+ if (!qh)
+ break;
+ switch (qh->qh_state) {
+ case QH_STATE_LINKED:
+ intr_deschedule (ehci, qh);
+ /* FALL THROUGH */
+ case QH_STATE_IDLE:
+ qh_completions (ehci, qh, NULL);
+ break;
+ default:
+ ehci_dbg (ehci, "bogus qh %p state %d\n",
+ qh, qh->qh_state);
+ goto done;
+ }
+
+ /* reschedule QH iff another request is queued */
+ if (!list_empty (&qh->qtd_list)
+ && HC_IS_RUNNING (hcd->state)) {
+ int status;
+
+ status = qh_schedule (ehci, qh);
+ spin_unlock_irqrestore (&ehci->lock, flags);
+
+ if (status != 0) {
+ // shouldn't happen often, but ...
+ // FIXME kill those tds' urbs
+ err ("can't reschedule qh %p, err %d",
+ qh, status);
+ }
+ return status;
+ }
+ break;
+
+ case PIPE_ISOCHRONOUS:
+ // itd or sitd ...
+
+ // wait till next completion, do it then.
+ // completion irqs can wait up to 1024 msec,
+ break;
+ }
+done:
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+// bulk qh holds the data toggle
+
+static void
+ehci_endpoint_disable (struct usb_hcd *hcd, struct usb_host_endpoint *ep)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ unsigned long flags;
+ struct ehci_qh *qh, *tmp;
+
+ /* ASSERT: any requests/urbs are being unlinked */
+ /* ASSERT: nobody can be submitting urbs for this any more */
+
+rescan:
+ spin_lock_irqsave (&ehci->lock, flags);
+ qh = ep->hcpriv;
+ if (!qh)
+ goto done;
+
+ /* endpoints can be iso streams. for now, we don't
+ * accelerate iso completions ... so spin a while.
+ */
+ if (qh->hw_info1 == 0) {
+ ehci_vdbg (ehci, "iso delay\n");
+ goto idle_timeout;
+ }
+
+ if (!HC_IS_RUNNING (hcd->state))
+ qh->qh_state = QH_STATE_IDLE;
+ switch (qh->qh_state) {
+ case QH_STATE_LINKED:
+ for (tmp = ehci->async->qh_next.qh;
+ tmp && tmp != qh;
+ tmp = tmp->qh_next.qh)
+ continue;
+ /* periodic qh self-unlinks on empty */
+ if (!tmp)
+ goto nogood;
+ unlink_async (ehci, qh);
+ /* FALL THROUGH */
+ case QH_STATE_UNLINK: /* wait for hw to finish? */
+idle_timeout:
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ set_current_state (TASK_UNINTERRUPTIBLE);
+ schedule_timeout (1);
+ goto rescan;
+ case QH_STATE_IDLE: /* fully unlinked */
+ if (list_empty (&qh->qtd_list)) {
+ qh_put (qh);
+ break;
+ }
+ /* else FALL THROUGH */
+ default:
+nogood:
+ /* caller was supposed to have unlinked any requests;
+ * that's not our job. just leak this memory.
+ */
+ ehci_err (ehci, "qh %p (#%02x) state %d%s\n",
+ qh, ep->desc.bEndpointAddress, qh->qh_state,
+ list_empty (&qh->qtd_list) ? "" : "(has tds)");
+ break;
+ }
+ ep->hcpriv = NULL;
+done:
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static const struct hc_driver ehci_driver = {
+ .description = hcd_name,
+ .product_desc = "EHCI Host Controller",
+ .hcd_priv_size = sizeof(struct ehci_hcd),
+
+ /*
+ * generic hardware linkage
+ */
+ .irq = ehci_irq,
+ .flags = HCD_MEMORY | HCD_USB2,
+
+ /*
+ * basic lifecycle operations
+ */
+ .reset = ehci_hc_reset,
+ .start = ehci_start,
+#ifdef CONFIG_PM
+ .suspend = ehci_suspend,
+ .resume = ehci_resume,
+#endif
+ .stop = ehci_stop,
+
+ /*
+ * managing i/o requests and associated device resources
+ */
+ .urb_enqueue = ehci_urb_enqueue,
+ .urb_dequeue = ehci_urb_dequeue,
+ .endpoint_disable = ehci_endpoint_disable,
+
+ /*
+ * scheduling support
+ */
+ .get_frame_number = ehci_get_frame,
+
+ /*
+ * root hub support
+ */
+ .hub_status_data = ehci_hub_status_data,
+ .hub_control = ehci_hub_control,
+ .hub_suspend = ehci_hub_suspend,
+ .hub_resume = ehci_hub_resume,
+};
+
+/*-------------------------------------------------------------------------*/
+
+/* EHCI 1.0 doesn't require PCI */
+
+#ifdef CONFIG_PCI
+
+/* PCI driver selection metadata; PCI hotplugging uses this */
+static const struct pci_device_id pci_ids [] = { {
+ /* handle any USB 2.0 EHCI controller */
+ PCI_DEVICE_CLASS(((PCI_CLASS_SERIAL_USB << 8) | 0x20), ~0),
+ .driver_data = (unsigned long) &ehci_driver,
+ },
+ { /* end: all zeroes */ }
+};
+MODULE_DEVICE_TABLE (pci, pci_ids);
+
+/* pci driver glue; this is a "new style" PCI driver module */
+static struct pci_driver ehci_pci_driver = {
+ .name = (char *) hcd_name,
+ .id_table = pci_ids,
+
+ .probe = usb_hcd_pci_probe,
+ .remove = usb_hcd_pci_remove,
+
+#ifdef CONFIG_PM
+ .suspend = usb_hcd_pci_suspend,
+ .resume = usb_hcd_pci_resume,
+#endif
+};
+
+#endif /* PCI */
+
+
+#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC
+
+MODULE_DESCRIPTION (DRIVER_INFO);
+MODULE_AUTHOR (DRIVER_AUTHOR);
+MODULE_LICENSE ("GPL");
+
+static int __init init (void)
+{
+ if (usb_disabled())
+ return -ENODEV;
+
+ pr_debug ("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
+ hcd_name,
+ sizeof (struct ehci_qh), sizeof (struct ehci_qtd),
+ sizeof (struct ehci_itd), sizeof (struct ehci_sitd));
+
+ return pci_register_driver (&ehci_pci_driver);
+}
+module_init (init);
+
+static void __exit cleanup (void)
+{
+ pci_unregister_driver (&ehci_pci_driver);
+}
+module_exit (cleanup);
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
new file mode 100644
index 000000000000..2373537fabed
--- /dev/null
+++ b/drivers/usb/host/ehci-hub.c
@@ -0,0 +1,553 @@
+/*
+ * Copyright (c) 2001-2002 by David Brownell
+ *
+ * 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.
+ */
+
+/* this file is part of ehci-hcd.c */
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * EHCI Root Hub ... the nonsharable stuff
+ *
+ * Registers don't need cpu_to_le32, that happens transparently
+ */
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_PM
+
+static int ehci_hub_suspend (struct usb_hcd *hcd)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ int port;
+
+ if (time_before (jiffies, ehci->next_statechange))
+ msleep(5);
+
+ port = HCS_N_PORTS (ehci->hcs_params);
+ spin_lock_irq (&ehci->lock);
+
+ /* stop schedules, clean any completed work */
+ if (HC_IS_RUNNING(hcd->state)) {
+ ehci_quiesce (ehci);
+ hcd->state = HC_STATE_QUIESCING;
+ }
+ ehci->command = readl (&ehci->regs->command);
+ if (ehci->reclaim)
+ ehci->reclaim_ready = 1;
+ ehci_work(ehci, NULL);
+
+ /* suspend any active/unsuspended ports, maybe allow wakeup */
+ while (port--) {
+ u32 __iomem *reg = &ehci->regs->port_status [port];
+ u32 t1 = readl (reg);
+ u32 t2 = t1;
+
+ if ((t1 & PORT_PE) && !(t1 & PORT_OWNER))
+ t2 |= PORT_SUSPEND;
+ if (hcd->remote_wakeup)
+ t2 |= PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E;
+ else
+ t2 &= ~(PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E);
+
+ if (t1 != t2) {
+ ehci_vdbg (ehci, "port %d, %08x -> %08x\n",
+ port + 1, t1, t2);
+ writel (t2, reg);
+ }
+ }
+
+ /* turn off now-idle HC */
+ ehci_halt (ehci);
+ hcd->state = HC_STATE_SUSPENDED;
+
+ ehci->next_statechange = jiffies + msecs_to_jiffies(10);
+ spin_unlock_irq (&ehci->lock);
+ return 0;
+}
+
+
+/* caller has locked the root hub, and should reset/reinit on error */
+static int ehci_hub_resume (struct usb_hcd *hcd)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ u32 temp;
+ int i;
+ int intr_enable;
+
+ if (time_before (jiffies, ehci->next_statechange))
+ msleep(5);
+ spin_lock_irq (&ehci->lock);
+
+ /* re-init operational registers in case we lost power */
+ if (readl (&ehci->regs->intr_enable) == 0) {
+ /* at least some APM implementations will try to deliver
+ * IRQs right away, so delay them until we're ready.
+ */
+ intr_enable = 1;
+ writel (0, &ehci->regs->segment);
+ writel (ehci->periodic_dma, &ehci->regs->frame_list);
+ writel ((u32)ehci->async->qh_dma, &ehci->regs->async_next);
+ } else
+ intr_enable = 0;
+ ehci_dbg(ehci, "resume root hub%s\n",
+ intr_enable ? " after power loss" : "");
+
+ /* restore CMD_RUN, framelist size, and irq threshold */
+ writel (ehci->command, &ehci->regs->command);
+
+ /* take ports out of suspend */
+ i = HCS_N_PORTS (ehci->hcs_params);
+ while (i--) {
+ temp = readl (&ehci->regs->port_status [i]);
+ temp &= ~(PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E);
+ if (temp & PORT_SUSPEND) {
+ ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
+ temp |= PORT_RESUME;
+ }
+ writel (temp, &ehci->regs->port_status [i]);
+ }
+ i = HCS_N_PORTS (ehci->hcs_params);
+ mdelay (20);
+ while (i--) {
+ temp = readl (&ehci->regs->port_status [i]);
+ if ((temp & PORT_SUSPEND) == 0)
+ continue;
+ temp &= ~PORT_RESUME;
+ writel (temp, &ehci->regs->port_status [i]);
+ ehci_vdbg (ehci, "resumed port %d\n", i + 1);
+ }
+ (void) readl (&ehci->regs->command);
+
+ /* maybe re-activate the schedule(s) */
+ temp = 0;
+ if (ehci->async->qh_next.qh)
+ temp |= CMD_ASE;
+ if (ehci->periodic_sched)
+ temp |= CMD_PSE;
+ if (temp) {
+ ehci->command |= temp;
+ writel (ehci->command, &ehci->regs->command);
+ }
+
+ ehci->next_statechange = jiffies + msecs_to_jiffies(5);
+ hcd->state = HC_STATE_RUNNING;
+
+ /* Now we can safely re-enable irqs */
+ if (intr_enable)
+ writel (INTR_MASK, &ehci->regs->intr_enable);
+
+ spin_unlock_irq (&ehci->lock);
+ return 0;
+}
+
+#else
+
+#define ehci_hub_suspend NULL
+#define ehci_hub_resume NULL
+
+#endif /* CONFIG_PM */
+
+/*-------------------------------------------------------------------------*/
+
+static int check_reset_complete (
+ struct ehci_hcd *ehci,
+ int index,
+ int port_status
+) {
+ if (!(port_status & PORT_CONNECT)) {
+ ehci->reset_done [index] = 0;
+ return port_status;
+ }
+
+ /* if reset finished and it's still not enabled -- handoff */
+ if (!(port_status & PORT_PE)) {
+
+ /* with integrated TT, there's nobody to hand it to! */
+ if (ehci_is_TDI(ehci)) {
+ ehci_dbg (ehci,
+ "Failed to enable port %d on root hub TT\n",
+ index+1);
+ return port_status;
+ }
+
+ ehci_dbg (ehci, "port %d full speed --> companion\n",
+ index + 1);
+
+ // what happens if HCS_N_CC(params) == 0 ?
+ port_status |= PORT_OWNER;
+ writel (port_status, &ehci->regs->port_status [index]);
+
+ } else
+ ehci_dbg (ehci, "port %d high speed\n", index + 1);
+
+ return port_status;
+}
+
+/*-------------------------------------------------------------------------*/
+
+
+/* build "status change" packet (one or two bytes) from HC registers */
+
+static int
+ehci_hub_status_data (struct usb_hcd *hcd, char *buf)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ u32 temp, status = 0;
+ int ports, i, retval = 1;
+ unsigned long flags;
+
+ /* if !USB_SUSPEND, root hub timers won't get shut down ... */
+ if (!HC_IS_RUNNING(hcd->state))
+ return 0;
+
+ /* init status to no-changes */
+ buf [0] = 0;
+ ports = HCS_N_PORTS (ehci->hcs_params);
+ if (ports > 7) {
+ buf [1] = 0;
+ retval++;
+ }
+
+ /* no hub change reports (bit 0) for now (power, ...) */
+
+ /* port N changes (bit N)? */
+ spin_lock_irqsave (&ehci->lock, flags);
+ for (i = 0; i < ports; i++) {
+ temp = readl (&ehci->regs->port_status [i]);
+ if (temp & PORT_OWNER) {
+ /* don't report this in GetPortStatus */
+ if (temp & PORT_CSC) {
+ temp &= ~PORT_CSC;
+ writel (temp, &ehci->regs->port_status [i]);
+ }
+ continue;
+ }
+ if (!(temp & PORT_CONNECT))
+ ehci->reset_done [i] = 0;
+ if ((temp & (PORT_CSC | PORT_PEC | PORT_OCC)) != 0
+ // PORT_STAT_C_SUSPEND?
+ || ((temp & PORT_RESUME) != 0
+ && time_after (jiffies,
+ ehci->reset_done [i]))) {
+ if (i < 7)
+ buf [0] |= 1 << (i + 1);
+ else
+ buf [1] |= 1 << (i - 7);
+ status = STS_PCD;
+ }
+ }
+ /* FIXME autosuspend idle root hubs */
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return status ? retval : 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void
+ehci_hub_descriptor (
+ struct ehci_hcd *ehci,
+ struct usb_hub_descriptor *desc
+) {
+ int ports = HCS_N_PORTS (ehci->hcs_params);
+ u16 temp;
+
+ desc->bDescriptorType = 0x29;
+ desc->bPwrOn2PwrGood = 10; /* ehci 1.0, 2.3.9 says 20ms max */
+ desc->bHubContrCurrent = 0;
+
+ desc->bNbrPorts = ports;
+ temp = 1 + (ports / 8);
+ desc->bDescLength = 7 + 2 * temp;
+
+ /* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */
+ memset (&desc->bitmap [0], 0, temp);
+ memset (&desc->bitmap [temp], 0xff, temp);
+
+ temp = 0x0008; /* per-port overcurrent reporting */
+ if (HCS_PPC (ehci->hcs_params))
+ temp |= 0x0001; /* per-port power control */
+#if 0
+// re-enable when we support USB_PORT_FEAT_INDICATOR below.
+ if (HCS_INDICATOR (ehci->hcs_params))
+ temp |= 0x0080; /* per-port indicators (LEDs) */
+#endif
+ desc->wHubCharacteristics = (__force __u16)cpu_to_le16 (temp);
+}
+
+/*-------------------------------------------------------------------------*/
+
+#define PORT_WAKE_BITS (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
+
+static int ehci_hub_control (
+ struct usb_hcd *hcd,
+ u16 typeReq,
+ u16 wValue,
+ u16 wIndex,
+ char *buf,
+ u16 wLength
+) {
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+ int ports = HCS_N_PORTS (ehci->hcs_params);
+ u32 temp, status;
+ unsigned long flags;
+ int retval = 0;
+
+ /*
+ * FIXME: support SetPortFeatures USB_PORT_FEAT_INDICATOR.
+ * HCS_INDICATOR may say we can change LEDs to off/amber/green.
+ * (track current state ourselves) ... blink for diagnostics,
+ * power, "this is the one", etc. EHCI spec supports this.
+ */
+
+ spin_lock_irqsave (&ehci->lock, flags);
+ switch (typeReq) {
+ case ClearHubFeature:
+ switch (wValue) {
+ case C_HUB_LOCAL_POWER:
+ case C_HUB_OVER_CURRENT:
+ /* no hub-wide feature/status flags */
+ break;
+ default:
+ goto error;
+ }
+ break;
+ case ClearPortFeature:
+ if (!wIndex || wIndex > ports)
+ goto error;
+ wIndex--;
+ temp = readl (&ehci->regs->port_status [wIndex]);
+ if (temp & PORT_OWNER)
+ break;
+
+ switch (wValue) {
+ case USB_PORT_FEAT_ENABLE:
+ writel (temp & ~PORT_PE,
+ &ehci->regs->port_status [wIndex]);
+ break;
+ case USB_PORT_FEAT_C_ENABLE:
+ writel (temp | PORT_PEC,
+ &ehci->regs->port_status [wIndex]);
+ break;
+ case USB_PORT_FEAT_SUSPEND:
+ if (temp & PORT_RESET)
+ goto error;
+ if (temp & PORT_SUSPEND) {
+ if ((temp & PORT_PE) == 0)
+ goto error;
+ /* resume signaling for 20 msec */
+ writel ((temp & ~PORT_WAKE_BITS) | PORT_RESUME,
+ &ehci->regs->port_status [wIndex]);
+ ehci->reset_done [wIndex] = jiffies
+ + msecs_to_jiffies (20);
+ }
+ break;
+ case USB_PORT_FEAT_C_SUSPEND:
+ /* we auto-clear this feature */
+ break;
+ case USB_PORT_FEAT_POWER:
+ if (HCS_PPC (ehci->hcs_params))
+ writel (temp & ~PORT_POWER,
+ &ehci->regs->port_status [wIndex]);
+ break;
+ case USB_PORT_FEAT_C_CONNECTION:
+ writel (temp | PORT_CSC,
+ &ehci->regs->port_status [wIndex]);
+ break;
+ case USB_PORT_FEAT_C_OVER_CURRENT:
+ writel (temp | PORT_OCC,
+ &ehci->regs->port_status [wIndex]);
+ break;
+ case USB_PORT_FEAT_C_RESET:
+ /* GetPortStatus clears reset */
+ break;
+ default:
+ goto error;
+ }
+ readl (&ehci->regs->command); /* unblock posted write */
+ break;
+ case GetHubDescriptor:
+ ehci_hub_descriptor (ehci, (struct usb_hub_descriptor *)
+ buf);
+ break;
+ case GetHubStatus:
+ /* no hub-wide feature/status flags */
+ memset (buf, 0, 4);
+ //cpu_to_le32s ((u32 *) buf);
+ break;
+ case GetPortStatus:
+ if (!wIndex || wIndex > ports)
+ goto error;
+ wIndex--;
+ status = 0;
+ temp = readl (&ehci->regs->port_status [wIndex]);
+
+ // wPortChange bits
+ if (temp & PORT_CSC)
+ status |= 1 << USB_PORT_FEAT_C_CONNECTION;
+ if (temp & PORT_PEC)
+ status |= 1 << USB_PORT_FEAT_C_ENABLE;
+ if (temp & PORT_OCC)
+ status |= 1 << USB_PORT_FEAT_C_OVER_CURRENT;
+
+ /* whoever resumes must GetPortStatus to complete it!! */
+ if ((temp & PORT_RESUME)
+ && time_after (jiffies,
+ ehci->reset_done [wIndex])) {
+ status |= 1 << USB_PORT_FEAT_C_SUSPEND;
+ ehci->reset_done [wIndex] = 0;
+
+ /* stop resume signaling */
+ temp = readl (&ehci->regs->port_status [wIndex]);
+ writel (temp & ~PORT_RESUME,
+ &ehci->regs->port_status [wIndex]);
+ retval = handshake (
+ &ehci->regs->port_status [wIndex],
+ PORT_RESUME, 0, 2000 /* 2msec */);
+ if (retval != 0) {
+ ehci_err (ehci, "port %d resume error %d\n",
+ wIndex + 1, retval);
+ goto error;
+ }
+ temp &= ~(PORT_SUSPEND|PORT_RESUME|(3<<10));
+ }
+
+ /* whoever resets must GetPortStatus to complete it!! */
+ if ((temp & PORT_RESET)
+ && time_after (jiffies,
+ ehci->reset_done [wIndex])) {
+ status |= 1 << USB_PORT_FEAT_C_RESET;
+ ehci->reset_done [wIndex] = 0;
+
+ /* force reset to complete */
+ writel (temp & ~PORT_RESET,
+ &ehci->regs->port_status [wIndex]);
+ retval = handshake (
+ &ehci->regs->port_status [wIndex],
+ PORT_RESET, 0, 500);
+ if (retval != 0) {
+ ehci_err (ehci, "port %d reset error %d\n",
+ wIndex + 1, retval);
+ goto error;
+ }
+
+ /* see what we found out */
+ temp = check_reset_complete (ehci, wIndex,
+ readl (&ehci->regs->port_status [wIndex]));
+ }
+
+ // don't show wPortStatus if it's owned by a companion hc
+ if (!(temp & PORT_OWNER)) {
+ if (temp & PORT_CONNECT) {
+ status |= 1 << USB_PORT_FEAT_CONNECTION;
+ // status may be from integrated TT
+ status |= ehci_port_speed(ehci, temp);
+ }
+ if (temp & PORT_PE)
+ status |= 1 << USB_PORT_FEAT_ENABLE;
+ if (temp & (PORT_SUSPEND|PORT_RESUME))
+ status |= 1 << USB_PORT_FEAT_SUSPEND;
+ if (temp & PORT_OC)
+ status |= 1 << USB_PORT_FEAT_OVER_CURRENT;
+ if (temp & PORT_RESET)
+ status |= 1 << USB_PORT_FEAT_RESET;
+ if (temp & PORT_POWER)
+ status |= 1 << USB_PORT_FEAT_POWER;
+ }
+
+#ifndef EHCI_VERBOSE_DEBUG
+ if (status & ~0xffff) /* only if wPortChange is interesting */
+#endif
+ dbg_port (ehci, "GetStatus", wIndex + 1, temp);
+ // we "know" this alignment is good, caller used kmalloc()...
+ *((__le32 *) buf) = cpu_to_le32 (status);
+ break;
+ case SetHubFeature:
+ switch (wValue) {
+ case C_HUB_LOCAL_POWER:
+ case C_HUB_OVER_CURRENT:
+ /* no hub-wide feature/status flags */
+ break;
+ default:
+ goto error;
+ }
+ break;
+ case SetPortFeature:
+ if (!wIndex || wIndex > ports)
+ goto error;
+ wIndex--;
+ temp = readl (&ehci->regs->port_status [wIndex]);
+ if (temp & PORT_OWNER)
+ break;
+
+ switch (wValue) {
+ case USB_PORT_FEAT_SUSPEND:
+ if ((temp & PORT_PE) == 0
+ || (temp & PORT_RESET) != 0)
+ goto error;
+ if (hcd->remote_wakeup)
+ temp |= PORT_WAKE_BITS;
+ writel (temp | PORT_SUSPEND,
+ &ehci->regs->port_status [wIndex]);
+ break;
+ case USB_PORT_FEAT_POWER:
+ if (HCS_PPC (ehci->hcs_params))
+ writel (temp | PORT_POWER,
+ &ehci->regs->port_status [wIndex]);
+ break;
+ case USB_PORT_FEAT_RESET:
+ if (temp & PORT_RESUME)
+ goto error;
+ /* line status bits may report this as low speed,
+ * which can be fine if this root hub has a
+ * transaction translator built in.
+ */
+ if ((temp & (PORT_PE|PORT_CONNECT)) == PORT_CONNECT
+ && !ehci_is_TDI(ehci)
+ && PORT_USB11 (temp)) {
+ ehci_dbg (ehci,
+ "port %d low speed --> companion\n",
+ wIndex + 1);
+ temp |= PORT_OWNER;
+ } else {
+ ehci_vdbg (ehci, "port %d reset\n", wIndex + 1);
+ temp |= PORT_RESET;
+ temp &= ~PORT_PE;
+
+ /*
+ * caller must wait, then call GetPortStatus
+ * usb 2.0 spec says 50 ms resets on root
+ */
+ ehci->reset_done [wIndex] = jiffies
+ + msecs_to_jiffies (50);
+ }
+ writel (temp, &ehci->regs->port_status [wIndex]);
+ break;
+ default:
+ goto error;
+ }
+ readl (&ehci->regs->command); /* unblock posted writes */
+ break;
+
+ default:
+error:
+ /* "stall" on error */
+ retval = -EPIPE;
+ }
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return retval;
+}
diff --git a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c
new file mode 100644
index 000000000000..9938697ff361
--- /dev/null
+++ b/drivers/usb/host/ehci-mem.c
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 2001 by David Brownell
+ *
+ * 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.
+ */
+
+/* this file is part of ehci-hcd.c */
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * There's basically three types of memory:
+ * - data used only by the HCD ... kmalloc is fine
+ * - async and periodic schedules, shared by HC and HCD ... these
+ * need to use dma_pool or dma_alloc_coherent
+ * - driver buffers, read/written by HC ... single shot DMA mapped
+ *
+ * There's also PCI "register" data, which is memory mapped.
+ * No memory seen by this driver is pageable.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+/* Allocate the key transfer structures from the previously allocated pool */
+
+static inline void ehci_qtd_init (struct ehci_qtd *qtd, dma_addr_t dma)
+{
+ memset (qtd, 0, sizeof *qtd);
+ qtd->qtd_dma = dma;
+ qtd->hw_token = cpu_to_le32 (QTD_STS_HALT);
+ qtd->hw_next = EHCI_LIST_END;
+ qtd->hw_alt_next = EHCI_LIST_END;
+ INIT_LIST_HEAD (&qtd->qtd_list);
+}
+
+static struct ehci_qtd *ehci_qtd_alloc (struct ehci_hcd *ehci, int flags)
+{
+ struct ehci_qtd *qtd;
+ dma_addr_t dma;
+
+ qtd = dma_pool_alloc (ehci->qtd_pool, flags, &dma);
+ if (qtd != NULL) {
+ ehci_qtd_init (qtd, dma);
+ }
+ return qtd;
+}
+
+static inline void ehci_qtd_free (struct ehci_hcd *ehci, struct ehci_qtd *qtd)
+{
+ dma_pool_free (ehci->qtd_pool, qtd, qtd->qtd_dma);
+}
+
+
+static void qh_destroy (struct kref *kref)
+{
+ struct ehci_qh *qh = container_of(kref, struct ehci_qh, kref);
+ struct ehci_hcd *ehci = qh->ehci;
+
+ /* clean qtds first, and know this is not linked */
+ if (!list_empty (&qh->qtd_list) || qh->qh_next.ptr) {
+ ehci_dbg (ehci, "unused qh not empty!\n");
+ BUG ();
+ }
+ if (qh->dummy)
+ ehci_qtd_free (ehci, qh->dummy);
+ usb_put_dev (qh->dev);
+ dma_pool_free (ehci->qh_pool, qh, qh->qh_dma);
+}
+
+static struct ehci_qh *ehci_qh_alloc (struct ehci_hcd *ehci, int flags)
+{
+ struct ehci_qh *qh;
+ dma_addr_t dma;
+
+ qh = (struct ehci_qh *)
+ dma_pool_alloc (ehci->qh_pool, flags, &dma);
+ if (!qh)
+ return qh;
+
+ memset (qh, 0, sizeof *qh);
+ kref_init(&qh->kref);
+ qh->ehci = ehci;
+ qh->qh_dma = dma;
+ // INIT_LIST_HEAD (&qh->qh_list);
+ INIT_LIST_HEAD (&qh->qtd_list);
+
+ /* dummy td enables safe urb queuing */
+ qh->dummy = ehci_qtd_alloc (ehci, flags);
+ if (qh->dummy == NULL) {
+ ehci_dbg (ehci, "no dummy td\n");
+ dma_pool_free (ehci->qh_pool, qh, qh->qh_dma);
+ qh = NULL;
+ }
+ return qh;
+}
+
+/* to share a qh (cpu threads, or hc) */
+static inline struct ehci_qh *qh_get (struct ehci_qh *qh)
+{
+ kref_get(&qh->kref);
+ return qh;
+}
+
+static inline void qh_put (struct ehci_qh *qh)
+{
+ kref_put(&qh->kref, qh_destroy);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* The queue heads and transfer descriptors are managed from pools tied
+ * to each of the "per device" structures.
+ * This is the initialisation and cleanup code.
+ */
+
+static void ehci_mem_cleanup (struct ehci_hcd *ehci)
+{
+ if (ehci->async)
+ qh_put (ehci->async);
+ ehci->async = NULL;
+
+ /* DMA consistent memory and pools */
+ if (ehci->qtd_pool)
+ dma_pool_destroy (ehci->qtd_pool);
+ ehci->qtd_pool = NULL;
+
+ if (ehci->qh_pool) {
+ dma_pool_destroy (ehci->qh_pool);
+ ehci->qh_pool = NULL;
+ }
+
+ if (ehci->itd_pool)
+ dma_pool_destroy (ehci->itd_pool);
+ ehci->itd_pool = NULL;
+
+ if (ehci->sitd_pool)
+ dma_pool_destroy (ehci->sitd_pool);
+ ehci->sitd_pool = NULL;
+
+ if (ehci->periodic)
+ dma_free_coherent (ehci_to_hcd(ehci)->self.controller,
+ ehci->periodic_size * sizeof (u32),
+ ehci->periodic, ehci->periodic_dma);
+ ehci->periodic = NULL;
+
+ /* shadow periodic table */
+ if (ehci->pshadow)
+ kfree (ehci->pshadow);
+ ehci->pshadow = NULL;
+}
+
+/* remember to add cleanup code (above) if you add anything here */
+static int ehci_mem_init (struct ehci_hcd *ehci, int flags)
+{
+ int i;
+
+ /* QTDs for control/bulk/intr transfers */
+ ehci->qtd_pool = dma_pool_create ("ehci_qtd",
+ ehci_to_hcd(ehci)->self.controller,
+ sizeof (struct ehci_qtd),
+ 32 /* byte alignment (for hw parts) */,
+ 4096 /* can't cross 4K */);
+ if (!ehci->qtd_pool) {
+ goto fail;
+ }
+
+ /* QHs for control/bulk/intr transfers */
+ ehci->qh_pool = dma_pool_create ("ehci_qh",
+ ehci_to_hcd(ehci)->self.controller,
+ sizeof (struct ehci_qh),
+ 32 /* byte alignment (for hw parts) */,
+ 4096 /* can't cross 4K */);
+ if (!ehci->qh_pool) {
+ goto fail;
+ }
+ ehci->async = ehci_qh_alloc (ehci, flags);
+ if (!ehci->async) {
+ goto fail;
+ }
+
+ /* ITD for high speed ISO transfers */
+ ehci->itd_pool = dma_pool_create ("ehci_itd",
+ ehci_to_hcd(ehci)->self.controller,
+ sizeof (struct ehci_itd),
+ 32 /* byte alignment (for hw parts) */,
+ 4096 /* can't cross 4K */);
+ if (!ehci->itd_pool) {
+ goto fail;
+ }
+
+ /* SITD for full/low speed split ISO transfers */
+ ehci->sitd_pool = dma_pool_create ("ehci_sitd",
+ ehci_to_hcd(ehci)->self.controller,
+ sizeof (struct ehci_sitd),
+ 32 /* byte alignment (for hw parts) */,
+ 4096 /* can't cross 4K */);
+ if (!ehci->sitd_pool) {
+ goto fail;
+ }
+
+ /* Hardware periodic table */
+ ehci->periodic = (__le32 *)
+ dma_alloc_coherent (ehci_to_hcd(ehci)->self.controller,
+ ehci->periodic_size * sizeof(__le32),
+ &ehci->periodic_dma, 0);
+ if (ehci->periodic == NULL) {
+ goto fail;
+ }
+ for (i = 0; i < ehci->periodic_size; i++)
+ ehci->periodic [i] = EHCI_LIST_END;
+
+ /* software shadow of hardware table */
+ ehci->pshadow = kmalloc (ehci->periodic_size * sizeof (void *), flags);
+ if (ehci->pshadow == NULL) {
+ goto fail;
+ }
+ memset (ehci->pshadow, 0, ehci->periodic_size * sizeof (void *));
+
+ return 0;
+
+fail:
+ ehci_dbg (ehci, "couldn't init memory\n");
+ ehci_mem_cleanup (ehci);
+ return -ENOMEM;
+}
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
new file mode 100644
index 000000000000..7df9b9af54f6
--- /dev/null
+++ b/drivers/usb/host/ehci-q.c
@@ -0,0 +1,1090 @@
+/*
+ * Copyright (c) 2001-2002 by David Brownell
+ *
+ * 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.
+ */
+
+/* this file is part of ehci-hcd.c */
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * EHCI hardware queue manipulation ... the core. QH/QTD manipulation.
+ *
+ * Control, bulk, and interrupt traffic all use "qh" lists. They list "qtd"
+ * entries describing USB transactions, max 16-20kB/entry (with 4kB-aligned
+ * buffers needed for the larger number). We use one QH per endpoint, queue
+ * multiple urbs (all three types) per endpoint. URBs may need several qtds.
+ *
+ * ISO traffic uses "ISO TD" (itd, and sitd) records, and (along with
+ * interrupts) needs careful scheduling. Performance improvements can be
+ * an ongoing challenge. That's in "ehci-sched.c".
+ *
+ * USB 1.1 devices are handled (a) by "companion" OHCI or UHCI root hubs,
+ * or otherwise through transaction translators (TTs) in USB 2.0 hubs using
+ * (b) special fields in qh entries or (c) split iso entries. TTs will
+ * buffer low/full speed data so the host collects it at high speed.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+/* fill a qtd, returning how much of the buffer we were able to queue up */
+
+static int
+qtd_fill (struct ehci_qtd *qtd, dma_addr_t buf, size_t len,
+ int token, int maxpacket)
+{
+ int i, count;
+ u64 addr = buf;
+
+ /* one buffer entry per 4K ... first might be short or unaligned */
+ qtd->hw_buf [0] = cpu_to_le32 ((u32)addr);
+ qtd->hw_buf_hi [0] = cpu_to_le32 ((u32)(addr >> 32));
+ count = 0x1000 - (buf & 0x0fff); /* rest of that page */
+ if (likely (len < count)) /* ... iff needed */
+ count = len;
+ else {
+ buf += 0x1000;
+ buf &= ~0x0fff;
+
+ /* per-qtd limit: from 16K to 20K (best alignment) */
+ for (i = 1; count < len && i < 5; i++) {
+ addr = buf;
+ qtd->hw_buf [i] = cpu_to_le32 ((u32)addr);
+ qtd->hw_buf_hi [i] = cpu_to_le32 ((u32)(addr >> 32));
+ buf += 0x1000;
+ if ((count + 0x1000) < len)
+ count += 0x1000;
+ else
+ count = len;
+ }
+
+ /* short packets may only terminate transfers */
+ if (count != len)
+ count -= (count % maxpacket);
+ }
+ qtd->hw_token = cpu_to_le32 ((count << 16) | token);
+ qtd->length = count;
+
+ return count;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static inline void
+qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd)
+{
+ /* writes to an active overlay are unsafe */
+ BUG_ON(qh->qh_state != QH_STATE_IDLE);
+
+ qh->hw_qtd_next = QTD_NEXT (qtd->qtd_dma);
+ qh->hw_alt_next = EHCI_LIST_END;
+
+ /* Except for control endpoints, we make hardware maintain data
+ * toggle (like OHCI) ... here (re)initialize the toggle in the QH,
+ * and set the pseudo-toggle in udev. Only usb_clear_halt() will
+ * ever clear it.
+ */
+ if (!(qh->hw_info1 & cpu_to_le32(1 << 14))) {
+ unsigned is_out, epnum;
+
+ is_out = !(qtd->hw_token & cpu_to_le32(1 << 8));
+ epnum = (le32_to_cpup(&qh->hw_info1) >> 8) & 0x0f;
+ if (unlikely (!usb_gettoggle (qh->dev, epnum, is_out))) {
+ qh->hw_token &= ~__constant_cpu_to_le32 (QTD_TOGGLE);
+ usb_settoggle (qh->dev, epnum, is_out, 1);
+ }
+ }
+
+ /* HC must see latest qtd and qh data before we clear ACTIVE+HALT */
+ wmb ();
+ qh->hw_token &= __constant_cpu_to_le32 (QTD_TOGGLE | QTD_STS_PING);
+}
+
+/* if it weren't for a common silicon quirk (writing the dummy into the qh
+ * overlay, so qh->hw_token wrongly becomes inactive/halted), only fault
+ * recovery (including urb dequeue) would need software changes to a QH...
+ */
+static void
+qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+ struct ehci_qtd *qtd;
+
+ if (list_empty (&qh->qtd_list))
+ qtd = qh->dummy;
+ else {
+ qtd = list_entry (qh->qtd_list.next,
+ struct ehci_qtd, qtd_list);
+ /* first qtd may already be partially processed */
+ if (cpu_to_le32 (qtd->qtd_dma) == qh->hw_current)
+ qtd = NULL;
+ }
+
+ if (qtd)
+ qh_update (ehci, qh, qtd);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void qtd_copy_status (
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ size_t length,
+ u32 token
+)
+{
+ /* count IN/OUT bytes, not SETUP (even short packets) */
+ if (likely (QTD_PID (token) != 2))
+ urb->actual_length += length - QTD_LENGTH (token);
+
+ /* don't modify error codes */
+ if (unlikely (urb->status != -EINPROGRESS))
+ return;
+
+ /* force cleanup after short read; not always an error */
+ if (unlikely (IS_SHORT_READ (token)))
+ urb->status = -EREMOTEIO;
+
+ /* serious "can't proceed" faults reported by the hardware */
+ if (token & QTD_STS_HALT) {
+ if (token & QTD_STS_BABBLE) {
+ /* FIXME "must" disable babbling device's port too */
+ urb->status = -EOVERFLOW;
+ } else if (token & QTD_STS_MMF) {
+ /* fs/ls interrupt xfer missed the complete-split */
+ urb->status = -EPROTO;
+ } else if (token & QTD_STS_DBE) {
+ urb->status = (QTD_PID (token) == 1) /* IN ? */
+ ? -ENOSR /* hc couldn't read data */
+ : -ECOMM; /* hc couldn't write data */
+ } else if (token & QTD_STS_XACT) {
+ /* timeout, bad crc, wrong PID, etc; retried */
+ if (QTD_CERR (token))
+ urb->status = -EPIPE;
+ else {
+ ehci_dbg (ehci, "devpath %s ep%d%s 3strikes\n",
+ urb->dev->devpath,
+ usb_pipeendpoint (urb->pipe),
+ usb_pipein (urb->pipe) ? "in" : "out");
+ urb->status = -EPROTO;
+ }
+ /* CERR nonzero + no errors + halt --> stall */
+ } else if (QTD_CERR (token))
+ urb->status = -EPIPE;
+ else /* unknown */
+ urb->status = -EPROTO;
+
+ ehci_vdbg (ehci,
+ "dev%d ep%d%s qtd token %08x --> status %d\n",
+ usb_pipedevice (urb->pipe),
+ usb_pipeendpoint (urb->pipe),
+ usb_pipein (urb->pipe) ? "in" : "out",
+ token, urb->status);
+
+ /* if async CSPLIT failed, try cleaning out the TT buffer */
+ if (urb->status != -EPIPE
+ && urb->dev->tt && !usb_pipeint (urb->pipe)
+ && ((token & QTD_STS_MMF) != 0
+ || QTD_CERR(token) == 0)
+ && (!ehci_is_TDI(ehci)
+ || urb->dev->tt->hub !=
+ ehci_to_hcd(ehci)->self.root_hub)) {
+#ifdef DEBUG
+ struct usb_device *tt = urb->dev->tt->hub;
+ dev_dbg (&tt->dev,
+ "clear tt buffer port %d, a%d ep%d t%08x\n",
+ urb->dev->ttport, urb->dev->devnum,
+ usb_pipeendpoint (urb->pipe), token);
+#endif /* DEBUG */
+ usb_hub_tt_clear_buffer (urb->dev, urb->pipe);
+ }
+ }
+}
+
+static void
+ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb, struct pt_regs *regs)
+__releases(ehci->lock)
+__acquires(ehci->lock)
+{
+ if (likely (urb->hcpriv != NULL)) {
+ struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv;
+
+ /* S-mask in a QH means it's an interrupt urb */
+ if ((qh->hw_info2 & __constant_cpu_to_le32 (0x00ff)) != 0) {
+
+ /* ... update hc-wide periodic stats (for usbfs) */
+ ehci_to_hcd(ehci)->self.bandwidth_int_reqs--;
+ }
+ qh_put (qh);
+ }
+
+ spin_lock (&urb->lock);
+ urb->hcpriv = NULL;
+ switch (urb->status) {
+ case -EINPROGRESS: /* success */
+ urb->status = 0;
+ default: /* fault */
+ COUNT (ehci->stats.complete);
+ break;
+ case -EREMOTEIO: /* fault or normal */
+ if (!(urb->transfer_flags & URB_SHORT_NOT_OK))
+ urb->status = 0;
+ COUNT (ehci->stats.complete);
+ break;
+ case -ECONNRESET: /* canceled */
+ case -ENOENT:
+ COUNT (ehci->stats.unlink);
+ break;
+ }
+ spin_unlock (&urb->lock);
+
+#ifdef EHCI_URB_TRACE
+ ehci_dbg (ehci,
+ "%s %s urb %p ep%d%s status %d len %d/%d\n",
+ __FUNCTION__, urb->dev->devpath, urb,
+ usb_pipeendpoint (urb->pipe),
+ usb_pipein (urb->pipe) ? "in" : "out",
+ urb->status,
+ urb->actual_length, urb->transfer_buffer_length);
+#endif
+
+ /* complete() can reenter this HCD */
+ spin_unlock (&ehci->lock);
+ usb_hcd_giveback_urb (ehci_to_hcd(ehci), urb, regs);
+ spin_lock (&ehci->lock);
+}
+
+static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
+static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
+
+static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
+static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
+
+/*
+ * Process and free completed qtds for a qh, returning URBs to drivers.
+ * Chases up to qh->hw_current. Returns number of completions called,
+ * indicating how much "real" work we did.
+ */
+#define HALT_BIT __constant_cpu_to_le32(QTD_STS_HALT)
+static unsigned
+qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
+{
+ struct ehci_qtd *last = NULL, *end = qh->dummy;
+ struct list_head *entry, *tmp;
+ int stopped;
+ unsigned count = 0;
+ int do_status = 0;
+ u8 state;
+
+ if (unlikely (list_empty (&qh->qtd_list)))
+ return count;
+
+ /* completions (or tasks on other cpus) must never clobber HALT
+ * till we've gone through and cleaned everything up, even when
+ * they add urbs to this qh's queue or mark them for unlinking.
+ *
+ * NOTE: unlinking expects to be done in queue order.
+ */
+ state = qh->qh_state;
+ qh->qh_state = QH_STATE_COMPLETING;
+ stopped = (state == QH_STATE_IDLE);
+
+ /* remove de-activated QTDs from front of queue.
+ * after faults (including short reads), cleanup this urb
+ * then let the queue advance.
+ * if queue is stopped, handles unlinks.
+ */
+ list_for_each_safe (entry, tmp, &qh->qtd_list) {
+ struct ehci_qtd *qtd;
+ struct urb *urb;
+ u32 token = 0;
+
+ qtd = list_entry (entry, struct ehci_qtd, qtd_list);
+ urb = qtd->urb;
+
+ /* clean up any state from previous QTD ...*/
+ if (last) {
+ if (likely (last->urb != urb)) {
+ ehci_urb_done (ehci, last->urb, regs);
+ count++;
+ }
+ ehci_qtd_free (ehci, last);
+ last = NULL;
+ }
+
+ /* ignore urbs submitted during completions we reported */
+ if (qtd == end)
+ break;
+
+ /* hardware copies qtd out of qh overlay */
+ rmb ();
+ token = le32_to_cpu (qtd->hw_token);
+
+ /* always clean up qtds the hc de-activated */
+ if ((token & QTD_STS_ACTIVE) == 0) {
+
+ if ((token & QTD_STS_HALT) != 0) {
+ stopped = 1;
+
+ /* magic dummy for some short reads; qh won't advance.
+ * that silicon quirk can kick in with this dummy too.
+ */
+ } else if (IS_SHORT_READ (token)
+ && !(qtd->hw_alt_next & EHCI_LIST_END)) {
+ stopped = 1;
+ goto halt;
+ }
+
+ /* stop scanning when we reach qtds the hc is using */
+ } else if (likely (!stopped
+ && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))) {
+ break;
+
+ } else {
+ stopped = 1;
+
+ if (unlikely (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state)))
+ urb->status = -ESHUTDOWN;
+
+ /* ignore active urbs unless some previous qtd
+ * for the urb faulted (including short read) or
+ * its urb was canceled. we may patch qh or qtds.
+ */
+ if (likely (urb->status == -EINPROGRESS))
+ continue;
+
+ /* issue status after short control reads */
+ if (unlikely (do_status != 0)
+ && QTD_PID (token) == 0 /* OUT */) {
+ do_status = 0;
+ continue;
+ }
+
+ /* token in overlay may be most current */
+ if (state == QH_STATE_IDLE
+ && cpu_to_le32 (qtd->qtd_dma)
+ == qh->hw_current)
+ token = le32_to_cpu (qh->hw_token);
+
+ /* force halt for unlinked or blocked qh, so we'll
+ * patch the qh later and so that completions can't
+ * activate it while we "know" it's stopped.
+ */
+ if ((HALT_BIT & qh->hw_token) == 0) {
+halt:
+ qh->hw_token |= HALT_BIT;
+ wmb ();
+ }
+ }
+
+ /* remove it from the queue */
+ spin_lock (&urb->lock);
+ qtd_copy_status (ehci, urb, qtd->length, token);
+ do_status = (urb->status == -EREMOTEIO)
+ && usb_pipecontrol (urb->pipe);
+ spin_unlock (&urb->lock);
+
+ if (stopped && qtd->qtd_list.prev != &qh->qtd_list) {
+ last = list_entry (qtd->qtd_list.prev,
+ struct ehci_qtd, qtd_list);
+ last->hw_next = qtd->hw_next;
+ }
+ list_del (&qtd->qtd_list);
+ last = qtd;
+ }
+
+ /* last urb's completion might still need calling */
+ if (likely (last != NULL)) {
+ ehci_urb_done (ehci, last->urb, regs);
+ count++;
+ ehci_qtd_free (ehci, last);
+ }
+
+ /* restore original state; caller must unlink or relink */
+ qh->qh_state = state;
+
+ /* be sure the hardware's done with the qh before refreshing
+ * it after fault cleanup, or recovering from silicon wrongly
+ * overlaying the dummy qtd (which reduces DMA chatter).
+ */
+ if (stopped != 0 || qh->hw_qtd_next == EHCI_LIST_END) {
+ switch (state) {
+ case QH_STATE_IDLE:
+ qh_refresh(ehci, qh);
+ break;
+ case QH_STATE_LINKED:
+ /* should be rare for periodic transfers,
+ * except maybe high bandwidth ...
+ */
+ if (qh->period) {
+ intr_deschedule (ehci, qh);
+ (void) qh_schedule (ehci, qh);
+ } else
+ unlink_async (ehci, qh);
+ break;
+ /* otherwise, unlink already started */
+ }
+ }
+
+ return count;
+}
+
+/*-------------------------------------------------------------------------*/
+
+// high bandwidth multiplier, as encoded in highspeed endpoint descriptors
+#define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03))
+// ... and packet size, for any kind of endpoint descriptor
+#define max_packet(wMaxPacketSize) ((wMaxPacketSize) & 0x07ff)
+
+/*
+ * reverse of qh_urb_transaction: free a list of TDs.
+ * used for cleanup after errors, before HC sees an URB's TDs.
+ */
+static void qtd_list_free (
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ struct list_head *qtd_list
+) {
+ struct list_head *entry, *temp;
+
+ list_for_each_safe (entry, temp, qtd_list) {
+ struct ehci_qtd *qtd;
+
+ qtd = list_entry (entry, struct ehci_qtd, qtd_list);
+ list_del (&qtd->qtd_list);
+ ehci_qtd_free (ehci, qtd);
+ }
+}
+
+/*
+ * create a list of filled qtds for this URB; won't link into qh.
+ */
+static struct list_head *
+qh_urb_transaction (
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ struct list_head *head,
+ int flags
+) {
+ struct ehci_qtd *qtd, *qtd_prev;
+ dma_addr_t buf;
+ int len, maxpacket;
+ int is_input;
+ u32 token;
+
+ /*
+ * URBs map to sequences of QTDs: one logical transaction
+ */
+ qtd = ehci_qtd_alloc (ehci, flags);
+ if (unlikely (!qtd))
+ return NULL;
+ list_add_tail (&qtd->qtd_list, head);
+ qtd->urb = urb;
+
+ token = QTD_STS_ACTIVE;
+ token |= (EHCI_TUNE_CERR << 10);
+ /* for split transactions, SplitXState initialized to zero */
+
+ len = urb->transfer_buffer_length;
+ is_input = usb_pipein (urb->pipe);
+ if (usb_pipecontrol (urb->pipe)) {
+ /* SETUP pid */
+ qtd_fill (qtd, urb->setup_dma, sizeof (struct usb_ctrlrequest),
+ token | (2 /* "setup" */ << 8), 8);
+
+ /* ... and always at least one more pid */
+ token ^= QTD_TOGGLE;
+ qtd_prev = qtd;
+ qtd = ehci_qtd_alloc (ehci, flags);
+ if (unlikely (!qtd))
+ goto cleanup;
+ qtd->urb = urb;
+ qtd_prev->hw_next = QTD_NEXT (qtd->qtd_dma);
+ list_add_tail (&qtd->qtd_list, head);
+ }
+
+ /*
+ * data transfer stage: buffer setup
+ */
+ if (likely (len > 0))
+ buf = urb->transfer_dma;
+ else
+ buf = 0;
+
+ /* for zero length DATA stages, STATUS is always IN */
+ if (!buf || is_input)
+ token |= (1 /* "in" */ << 8);
+ /* else it's already initted to "out" pid (0 << 8) */
+
+ maxpacket = max_packet(usb_maxpacket(urb->dev, urb->pipe, !is_input));
+
+ /*
+ * buffer gets wrapped in one or more qtds;
+ * last one may be "short" (including zero len)
+ * and may serve as a control status ack
+ */
+ for (;;) {
+ int this_qtd_len;
+
+ this_qtd_len = qtd_fill (qtd, buf, len, token, maxpacket);
+ len -= this_qtd_len;
+ buf += this_qtd_len;
+ if (is_input)
+ qtd->hw_alt_next = ehci->async->hw_alt_next;
+
+ /* qh makes control packets use qtd toggle; maybe switch it */
+ if ((maxpacket & (this_qtd_len + (maxpacket - 1))) == 0)
+ token ^= QTD_TOGGLE;
+
+ if (likely (len <= 0))
+ break;
+
+ qtd_prev = qtd;
+ qtd = ehci_qtd_alloc (ehci, flags);
+ if (unlikely (!qtd))
+ goto cleanup;
+ qtd->urb = urb;
+ qtd_prev->hw_next = QTD_NEXT (qtd->qtd_dma);
+ list_add_tail (&qtd->qtd_list, head);
+ }
+
+ /* unless the bulk/interrupt caller wants a chance to clean
+ * up after short reads, hc should advance qh past this urb
+ */
+ if (likely ((urb->transfer_flags & URB_SHORT_NOT_OK) == 0
+ || usb_pipecontrol (urb->pipe)))
+ qtd->hw_alt_next = EHCI_LIST_END;
+
+ /*
+ * control requests may need a terminating data "status" ack;
+ * bulk ones may need a terminating short packet (zero length).
+ */
+ if (likely (buf != 0)) {
+ int one_more = 0;
+
+ if (usb_pipecontrol (urb->pipe)) {
+ one_more = 1;
+ token ^= 0x0100; /* "in" <--> "out" */
+ token |= QTD_TOGGLE; /* force DATA1 */
+ } else if (usb_pipebulk (urb->pipe)
+ && (urb->transfer_flags & URB_ZERO_PACKET)
+ && !(urb->transfer_buffer_length % maxpacket)) {
+ one_more = 1;
+ }
+ if (one_more) {
+ qtd_prev = qtd;
+ qtd = ehci_qtd_alloc (ehci, flags);
+ if (unlikely (!qtd))
+ goto cleanup;
+ qtd->urb = urb;
+ qtd_prev->hw_next = QTD_NEXT (qtd->qtd_dma);
+ list_add_tail (&qtd->qtd_list, head);
+
+ /* never any data in such packets */
+ qtd_fill (qtd, 0, 0, token, 0);
+ }
+ }
+
+ /* by default, enable interrupt on urb completion */
+ if (likely (!(urb->transfer_flags & URB_NO_INTERRUPT)))
+ qtd->hw_token |= __constant_cpu_to_le32 (QTD_IOC);
+ return head;
+
+cleanup:
+ qtd_list_free (ehci, urb, head);
+ return NULL;
+}
+
+/*-------------------------------------------------------------------------*/
+
+// Would be best to create all qh's from config descriptors,
+// when each interface/altsetting is established. Unlink
+// any previous qh and cancel its urbs first; endpoints are
+// implicitly reset then (data toggle too).
+// That'd mean updating how usbcore talks to HCDs. (2.7?)
+
+
+/*
+ * Each QH holds a qtd list; a QH is used for everything except iso.
+ *
+ * For interrupt urbs, the scheduler must set the microframe scheduling
+ * mask(s) each time the QH gets scheduled. For highspeed, that's
+ * just one microframe in the s-mask. For split interrupt transactions
+ * there are additional complications: c-mask, maybe FSTNs.
+ */
+static struct ehci_qh *
+qh_make (
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ int flags
+) {
+ struct ehci_qh *qh = ehci_qh_alloc (ehci, flags);
+ u32 info1 = 0, info2 = 0;
+ int is_input, type;
+ int maxp = 0;
+
+ if (!qh)
+ return qh;
+
+ /*
+ * init endpoint/device data for this QH
+ */
+ info1 |= usb_pipeendpoint (urb->pipe) << 8;
+ info1 |= usb_pipedevice (urb->pipe) << 0;
+
+ is_input = usb_pipein (urb->pipe);
+ type = usb_pipetype (urb->pipe);
+ maxp = usb_maxpacket (urb->dev, urb->pipe, !is_input);
+
+ /* Compute interrupt scheduling parameters just once, and save.
+ * - allowing for high bandwidth, how many nsec/uframe are used?
+ * - split transactions need a second CSPLIT uframe; same question
+ * - splits also need a schedule gap (for full/low speed I/O)
+ * - qh has a polling interval
+ *
+ * For control/bulk requests, the HC or TT handles these.
+ */
+ if (type == PIPE_INTERRUPT) {
+ qh->usecs = usb_calc_bus_time (USB_SPEED_HIGH, is_input, 0,
+ hb_mult (maxp) * max_packet (maxp));
+ qh->start = NO_FRAME;
+
+ if (urb->dev->speed == USB_SPEED_HIGH) {
+ qh->c_usecs = 0;
+ qh->gap_uf = 0;
+
+ qh->period = urb->interval >> 3;
+ if (qh->period == 0 && urb->interval != 1) {
+ /* NOTE interval 2 or 4 uframes could work.
+ * But interval 1 scheduling is simpler, and
+ * includes high bandwidth.
+ */
+ dbg ("intr period %d uframes, NYET!",
+ urb->interval);
+ goto done;
+ }
+ } else {
+ /* gap is f(FS/LS transfer times) */
+ qh->gap_uf = 1 + usb_calc_bus_time (urb->dev->speed,
+ is_input, 0, maxp) / (125 * 1000);
+
+ /* FIXME this just approximates SPLIT/CSPLIT times */
+ if (is_input) { // SPLIT, gap, CSPLIT+DATA
+ qh->c_usecs = qh->usecs + HS_USECS (0);
+ qh->usecs = HS_USECS (1);
+ } else { // SPLIT+DATA, gap, CSPLIT
+ qh->usecs += HS_USECS (1);
+ qh->c_usecs = HS_USECS (0);
+ }
+
+ qh->period = urb->interval;
+ }
+ }
+
+ /* support for tt scheduling, and access to toggles */
+ qh->dev = usb_get_dev (urb->dev);
+
+ /* using TT? */
+ switch (urb->dev->speed) {
+ case USB_SPEED_LOW:
+ info1 |= (1 << 12); /* EPS "low" */
+ /* FALL THROUGH */
+
+ case USB_SPEED_FULL:
+ /* EPS 0 means "full" */
+ if (type != PIPE_INTERRUPT)
+ info1 |= (EHCI_TUNE_RL_TT << 28);
+ if (type == PIPE_CONTROL) {
+ info1 |= (1 << 27); /* for TT */
+ info1 |= 1 << 14; /* toggle from qtd */
+ }
+ info1 |= maxp << 16;
+
+ info2 |= (EHCI_TUNE_MULT_TT << 30);
+ info2 |= urb->dev->ttport << 23;
+
+ /* set the address of the TT; for TDI's integrated
+ * root hub tt, leave it zeroed.
+ */
+ if (!ehci_is_TDI(ehci)
+ || urb->dev->tt->hub !=
+ ehci_to_hcd(ehci)->self.root_hub)
+ info2 |= urb->dev->tt->hub->devnum << 16;
+
+ /* NOTE: if (PIPE_INTERRUPT) { scheduler sets c-mask } */
+
+ break;
+
+ case USB_SPEED_HIGH: /* no TT involved */
+ info1 |= (2 << 12); /* EPS "high" */
+ if (type == PIPE_CONTROL) {
+ info1 |= (EHCI_TUNE_RL_HS << 28);
+ info1 |= 64 << 16; /* usb2 fixed maxpacket */
+ info1 |= 1 << 14; /* toggle from qtd */
+ info2 |= (EHCI_TUNE_MULT_HS << 30);
+ } else if (type == PIPE_BULK) {
+ info1 |= (EHCI_TUNE_RL_HS << 28);
+ info1 |= 512 << 16; /* usb2 fixed maxpacket */
+ info2 |= (EHCI_TUNE_MULT_HS << 30);
+ } else { /* PIPE_INTERRUPT */
+ info1 |= max_packet (maxp) << 16;
+ info2 |= hb_mult (maxp) << 30;
+ }
+ break;
+ default:
+ dbg ("bogus dev %p speed %d", urb->dev, urb->dev->speed);
+done:
+ qh_put (qh);
+ return NULL;
+ }
+
+ /* NOTE: if (PIPE_INTERRUPT) { scheduler sets s-mask } */
+
+ /* init as live, toggle clear, advance to dummy */
+ qh->qh_state = QH_STATE_IDLE;
+ qh->hw_info1 = cpu_to_le32 (info1);
+ qh->hw_info2 = cpu_to_le32 (info2);
+ usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
+ qh_refresh (ehci, qh);
+ return qh;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* move qh (and its qtds) onto async queue; maybe enable queue. */
+
+static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+ __le32 dma = QH_NEXT (qh->qh_dma);
+ struct ehci_qh *head;
+
+ /* (re)start the async schedule? */
+ head = ehci->async;
+ timer_action_done (ehci, TIMER_ASYNC_OFF);
+ if (!head->qh_next.qh) {
+ u32 cmd = readl (&ehci->regs->command);
+
+ if (!(cmd & CMD_ASE)) {
+ /* in case a clear of CMD_ASE didn't take yet */
+ (void) handshake (&ehci->regs->status, STS_ASS, 0, 150);
+ cmd |= CMD_ASE | CMD_RUN;
+ writel (cmd, &ehci->regs->command);
+ ehci_to_hcd(ehci)->state = HC_STATE_RUNNING;
+ /* posted write need not be known to HC yet ... */
+ }
+ }
+
+ /* clear halt and/or toggle; and maybe recover from silicon quirk */
+ if (qh->qh_state == QH_STATE_IDLE)
+ qh_refresh (ehci, qh);
+
+ /* splice right after start */
+ qh->qh_next = head->qh_next;
+ qh->hw_next = head->hw_next;
+ wmb ();
+
+ head->qh_next.qh = qh;
+ head->hw_next = dma;
+
+ qh->qh_state = QH_STATE_LINKED;
+ /* qtd completions reported later by interrupt */
+}
+
+/*-------------------------------------------------------------------------*/
+
+#define QH_ADDR_MASK __constant_cpu_to_le32(0x7f)
+
+/*
+ * For control/bulk/interrupt, return QH with these TDs appended.
+ * Allocates and initializes the QH if necessary.
+ * Returns null if it can't allocate a QH it needs to.
+ * If the QH has TDs (urbs) already, that's great.
+ */
+static struct ehci_qh *qh_append_tds (
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ struct list_head *qtd_list,
+ int epnum,
+ void **ptr
+)
+{
+ struct ehci_qh *qh = NULL;
+
+ qh = (struct ehci_qh *) *ptr;
+ if (unlikely (qh == NULL)) {
+ /* can't sleep here, we have ehci->lock... */
+ qh = qh_make (ehci, urb, GFP_ATOMIC);
+ *ptr = qh;
+ }
+ if (likely (qh != NULL)) {
+ struct ehci_qtd *qtd;
+
+ if (unlikely (list_empty (qtd_list)))
+ qtd = NULL;
+ else
+ qtd = list_entry (qtd_list->next, struct ehci_qtd,
+ qtd_list);
+
+ /* control qh may need patching ... */
+ if (unlikely (epnum == 0)) {
+
+ /* usb_reset_device() briefly reverts to address 0 */
+ if (usb_pipedevice (urb->pipe) == 0)
+ qh->hw_info1 &= ~QH_ADDR_MASK;
+ }
+
+ /* just one way to queue requests: swap with the dummy qtd.
+ * only hc or qh_refresh() ever modify the overlay.
+ */
+ if (likely (qtd != NULL)) {
+ struct ehci_qtd *dummy;
+ dma_addr_t dma;
+ __le32 token;
+
+ /* to avoid racing the HC, use the dummy td instead of
+ * the first td of our list (becomes new dummy). both
+ * tds stay deactivated until we're done, when the
+ * HC is allowed to fetch the old dummy (4.10.2).
+ */
+ token = qtd->hw_token;
+ qtd->hw_token = HALT_BIT;
+ wmb ();
+ dummy = qh->dummy;
+
+ dma = dummy->qtd_dma;
+ *dummy = *qtd;
+ dummy->qtd_dma = dma;
+
+ list_del (&qtd->qtd_list);
+ list_add (&dummy->qtd_list, qtd_list);
+ __list_splice (qtd_list, qh->qtd_list.prev);
+
+ ehci_qtd_init (qtd, qtd->qtd_dma);
+ qh->dummy = qtd;
+
+ /* hc must see the new dummy at list end */
+ dma = qtd->qtd_dma;
+ qtd = list_entry (qh->qtd_list.prev,
+ struct ehci_qtd, qtd_list);
+ qtd->hw_next = QTD_NEXT (dma);
+
+ /* let the hc process these next qtds */
+ wmb ();
+ dummy->hw_token = token;
+
+ urb->hcpriv = qh_get (qh);
+ }
+ }
+ return qh;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int
+submit_async (
+ struct ehci_hcd *ehci,
+ struct usb_host_endpoint *ep,
+ struct urb *urb,
+ struct list_head *qtd_list,
+ int mem_flags
+) {
+ struct ehci_qtd *qtd;
+ int epnum;
+ unsigned long flags;
+ struct ehci_qh *qh = NULL;
+
+ qtd = list_entry (qtd_list->next, struct ehci_qtd, qtd_list);
+ epnum = ep->desc.bEndpointAddress;
+
+#ifdef EHCI_URB_TRACE
+ ehci_dbg (ehci,
+ "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
+ __FUNCTION__, urb->dev->devpath, urb,
+ epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out",
+ urb->transfer_buffer_length,
+ qtd, ep->hcpriv);
+#endif
+
+ spin_lock_irqsave (&ehci->lock, flags);
+ qh = qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv);
+
+ /* Control/bulk operations through TTs don't need scheduling,
+ * the HC and TT handle it when the TT has a buffer ready.
+ */
+ if (likely (qh != NULL)) {
+ if (likely (qh->qh_state == QH_STATE_IDLE))
+ qh_link_async (ehci, qh_get (qh));
+ }
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ if (unlikely (qh == NULL)) {
+ qtd_list_free (ehci, urb, qtd_list);
+ return -ENOMEM;
+ }
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* the async qh for the qtds being reclaimed are now unlinked from the HC */
+
+static void end_unlink_async (struct ehci_hcd *ehci, struct pt_regs *regs)
+{
+ struct ehci_qh *qh = ehci->reclaim;
+ struct ehci_qh *next;
+
+ timer_action_done (ehci, TIMER_IAA_WATCHDOG);
+
+ // qh->hw_next = cpu_to_le32 (qh->qh_dma);
+ qh->qh_state = QH_STATE_IDLE;
+ qh->qh_next.qh = NULL;
+ qh_put (qh); // refcount from reclaim
+
+ /* other unlink(s) may be pending (in QH_STATE_UNLINK_WAIT) */
+ next = qh->reclaim;
+ ehci->reclaim = next;
+ ehci->reclaim_ready = 0;
+ qh->reclaim = NULL;
+
+ qh_completions (ehci, qh, regs);
+
+ if (!list_empty (&qh->qtd_list)
+ && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
+ qh_link_async (ehci, qh);
+ else {
+ qh_put (qh); // refcount from async list
+
+ /* it's not free to turn the async schedule on/off; leave it
+ * active but idle for a while once it empties.
+ */
+ if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state)
+ && ehci->async->qh_next.qh == NULL)
+ timer_action (ehci, TIMER_ASYNC_OFF);
+ }
+
+ if (next) {
+ ehci->reclaim = NULL;
+ start_unlink_async (ehci, next);
+ }
+}
+
+/* makes sure the async qh will become idle */
+/* caller must own ehci->lock */
+
+static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+ int cmd = readl (&ehci->regs->command);
+ struct ehci_qh *prev;
+
+#ifdef DEBUG
+ assert_spin_locked(&ehci->lock);
+ if (ehci->reclaim
+ || (qh->qh_state != QH_STATE_LINKED
+ && qh->qh_state != QH_STATE_UNLINK_WAIT)
+ )
+ BUG ();
+#endif
+
+ /* stop async schedule right now? */
+ if (unlikely (qh == ehci->async)) {
+ /* can't get here without STS_ASS set */
+ if (ehci_to_hcd(ehci)->state != HC_STATE_HALT) {
+ writel (cmd & ~CMD_ASE, &ehci->regs->command);
+ wmb ();
+ // handshake later, if we need to
+ }
+ timer_action_done (ehci, TIMER_ASYNC_OFF);
+ return;
+ }
+
+ qh->qh_state = QH_STATE_UNLINK;
+ ehci->reclaim = qh = qh_get (qh);
+
+ prev = ehci->async;
+ while (prev->qh_next.qh != qh)
+ prev = prev->qh_next.qh;
+
+ prev->hw_next = qh->hw_next;
+ prev->qh_next = qh->qh_next;
+ wmb ();
+
+ if (unlikely (ehci_to_hcd(ehci)->state == HC_STATE_HALT)) {
+ /* if (unlikely (qh->reclaim != 0))
+ * this will recurse, probably not much
+ */
+ end_unlink_async (ehci, NULL);
+ return;
+ }
+
+ ehci->reclaim_ready = 0;
+ cmd |= CMD_IAAD;
+ writel (cmd, &ehci->regs->command);
+ (void) readl (&ehci->regs->command);
+ timer_action (ehci, TIMER_IAA_WATCHDOG);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void
+scan_async (struct ehci_hcd *ehci, struct pt_regs *regs)
+{
+ struct ehci_qh *qh;
+ enum ehci_timer_action action = TIMER_IO_WATCHDOG;
+
+ if (!++(ehci->stamp))
+ ehci->stamp++;
+ timer_action_done (ehci, TIMER_ASYNC_SHRINK);
+rescan:
+ qh = ehci->async->qh_next.qh;
+ if (likely (qh != NULL)) {
+ do {
+ /* clean any finished work for this qh */
+ if (!list_empty (&qh->qtd_list)
+ && qh->stamp != ehci->stamp) {
+ int temp;
+
+ /* unlinks could happen here; completion
+ * reporting drops the lock. rescan using
+ * the latest schedule, but don't rescan
+ * qhs we already finished (no looping).
+ */
+ qh = qh_get (qh);
+ qh->stamp = ehci->stamp;
+ temp = qh_completions (ehci, qh, regs);
+ qh_put (qh);
+ if (temp != 0) {
+ goto rescan;
+ }
+ }
+
+ /* unlink idle entries, reducing HC PCI usage as well
+ * as HCD schedule-scanning costs. delay for any qh
+ * we just scanned, there's a not-unusual case that it
+ * doesn't stay idle for long.
+ * (plus, avoids some kind of re-activation race.)
+ */
+ if (list_empty (&qh->qtd_list)) {
+ if (qh->stamp == ehci->stamp)
+ action = TIMER_ASYNC_SHRINK;
+ else if (!ehci->reclaim
+ && qh->qh_state == QH_STATE_LINKED)
+ start_unlink_async (ehci, qh);
+ }
+
+ qh = qh->qh_next.qh;
+ } while (qh);
+ }
+ if (action == TIMER_ASYNC_SHRINK)
+ timer_action (ehci, TIMER_ASYNC_SHRINK);
+}
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
new file mode 100644
index 000000000000..f6c86354e304
--- /dev/null
+++ b/drivers/usb/host/ehci-sched.c
@@ -0,0 +1,1999 @@
+/*
+ * Copyright (c) 2001-2004 by David Brownell
+ * Copyright (c) 2003 Michal Sojka, for high-speed iso transfers
+ *
+ * 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.
+ */
+
+/* this file is part of ehci-hcd.c */
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * EHCI scheduled transaction support: interrupt, iso, split iso
+ * These are called "periodic" transactions in the EHCI spec.
+ *
+ * Note that for interrupt transfers, the QH/QTD manipulation is shared
+ * with the "asynchronous" transaction support (control/bulk transfers).
+ * The only real difference is in how interrupt transfers are scheduled.
+ *
+ * For ISO, we make an "iso_stream" head to serve the same role as a QH.
+ * It keeps track of every ITD (or SITD) that's linked, and holds enough
+ * pre-calculated schedule data to make appending to the queue be quick.
+ */
+
+static int ehci_get_frame (struct usb_hcd *hcd);
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * periodic_next_shadow - return "next" pointer on shadow list
+ * @periodic: host pointer to qh/itd/sitd
+ * @tag: hardware tag for type of this record
+ */
+static union ehci_shadow *
+periodic_next_shadow (union ehci_shadow *periodic, __le32 tag)
+{
+ switch (tag) {
+ case Q_TYPE_QH:
+ return &periodic->qh->qh_next;
+ case Q_TYPE_FSTN:
+ return &periodic->fstn->fstn_next;
+ case Q_TYPE_ITD:
+ return &periodic->itd->itd_next;
+ // case Q_TYPE_SITD:
+ default:
+ return &periodic->sitd->sitd_next;
+ }
+}
+
+/* caller must hold ehci->lock */
+static void periodic_unlink (struct ehci_hcd *ehci, unsigned frame, void *ptr)
+{
+ union ehci_shadow *prev_p = &ehci->pshadow [frame];
+ __le32 *hw_p = &ehci->periodic [frame];
+ union ehci_shadow here = *prev_p;
+
+ /* find predecessor of "ptr"; hw and shadow lists are in sync */
+ while (here.ptr && here.ptr != ptr) {
+ prev_p = periodic_next_shadow (prev_p, Q_NEXT_TYPE (*hw_p));
+ hw_p = here.hw_next;
+ here = *prev_p;
+ }
+ /* an interrupt entry (at list end) could have been shared */
+ if (!here.ptr)
+ return;
+
+ /* update shadow and hardware lists ... the old "next" pointers
+ * from ptr may still be in use, the caller updates them.
+ */
+ *prev_p = *periodic_next_shadow (&here, Q_NEXT_TYPE (*hw_p));
+ *hw_p = *here.hw_next;
+}
+
+/* how many of the uframe's 125 usecs are allocated? */
+static unsigned short
+periodic_usecs (struct ehci_hcd *ehci, unsigned frame, unsigned uframe)
+{
+ __le32 *hw_p = &ehci->periodic [frame];
+ union ehci_shadow *q = &ehci->pshadow [frame];
+ unsigned usecs = 0;
+
+ while (q->ptr) {
+ switch (Q_NEXT_TYPE (*hw_p)) {
+ case Q_TYPE_QH:
+ /* is it in the S-mask? */
+ if (q->qh->hw_info2 & cpu_to_le32 (1 << uframe))
+ usecs += q->qh->usecs;
+ /* ... or C-mask? */
+ if (q->qh->hw_info2 & cpu_to_le32 (1 << (8 + uframe)))
+ usecs += q->qh->c_usecs;
+ hw_p = &q->qh->hw_next;
+ q = &q->qh->qh_next;
+ break;
+ // case Q_TYPE_FSTN:
+ default:
+ /* for "save place" FSTNs, count the relevant INTR
+ * bandwidth from the previous frame
+ */
+ if (q->fstn->hw_prev != EHCI_LIST_END) {
+ ehci_dbg (ehci, "ignoring FSTN cost ...\n");
+ }
+ hw_p = &q->fstn->hw_next;
+ q = &q->fstn->fstn_next;
+ break;
+ case Q_TYPE_ITD:
+ usecs += q->itd->usecs [uframe];
+ hw_p = &q->itd->hw_next;
+ q = &q->itd->itd_next;
+ break;
+ case Q_TYPE_SITD:
+ /* is it in the S-mask? (count SPLIT, DATA) */
+ if (q->sitd->hw_uframe & cpu_to_le32 (1 << uframe)) {
+ if (q->sitd->hw_fullspeed_ep &
+ __constant_cpu_to_le32 (1<<31))
+ usecs += q->sitd->stream->usecs;
+ else /* worst case for OUT start-split */
+ usecs += HS_USECS_ISO (188);
+ }
+
+ /* ... C-mask? (count CSPLIT, DATA) */
+ if (q->sitd->hw_uframe &
+ cpu_to_le32 (1 << (8 + uframe))) {
+ /* worst case for IN complete-split */
+ usecs += q->sitd->stream->c_usecs;
+ }
+
+ hw_p = &q->sitd->hw_next;
+ q = &q->sitd->sitd_next;
+ break;
+ }
+ }
+#ifdef DEBUG
+ if (usecs > 100)
+ ehci_err (ehci, "uframe %d sched overrun: %d usecs\n",
+ frame * 8 + uframe, usecs);
+#endif
+ return usecs;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int same_tt (struct usb_device *dev1, struct usb_device *dev2)
+{
+ if (!dev1->tt || !dev2->tt)
+ return 0;
+ if (dev1->tt != dev2->tt)
+ return 0;
+ if (dev1->tt->multi)
+ return dev1->ttport == dev2->ttport;
+ else
+ return 1;
+}
+
+/* return true iff the device's transaction translator is available
+ * for a periodic transfer starting at the specified frame, using
+ * all the uframes in the mask.
+ */
+static int tt_no_collision (
+ struct ehci_hcd *ehci,
+ unsigned period,
+ struct usb_device *dev,
+ unsigned frame,
+ u32 uf_mask
+)
+{
+ if (period == 0) /* error */
+ return 0;
+
+ /* note bandwidth wastage: split never follows csplit
+ * (different dev or endpoint) until the next uframe.
+ * calling convention doesn't make that distinction.
+ */
+ for (; frame < ehci->periodic_size; frame += period) {
+ union ehci_shadow here;
+ __le32 type;
+
+ here = ehci->pshadow [frame];
+ type = Q_NEXT_TYPE (ehci->periodic [frame]);
+ while (here.ptr) {
+ switch (type) {
+ case Q_TYPE_ITD:
+ type = Q_NEXT_TYPE (here.itd->hw_next);
+ here = here.itd->itd_next;
+ continue;
+ case Q_TYPE_QH:
+ if (same_tt (dev, here.qh->dev)) {
+ u32 mask;
+
+ mask = le32_to_cpu (here.qh->hw_info2);
+ /* "knows" no gap is needed */
+ mask |= mask >> 8;
+ if (mask & uf_mask)
+ break;
+ }
+ type = Q_NEXT_TYPE (here.qh->hw_next);
+ here = here.qh->qh_next;
+ continue;
+ case Q_TYPE_SITD:
+ if (same_tt (dev, here.sitd->urb->dev)) {
+ u16 mask;
+
+ mask = le32_to_cpu (here.sitd
+ ->hw_uframe);
+ /* FIXME assumes no gap for IN! */
+ mask |= mask >> 8;
+ if (mask & uf_mask)
+ break;
+ }
+ type = Q_NEXT_TYPE (here.sitd->hw_next);
+ here = here.sitd->sitd_next;
+ continue;
+ // case Q_TYPE_FSTN:
+ default:
+ ehci_dbg (ehci,
+ "periodic frame %d bogus type %d\n",
+ frame, type);
+ }
+
+ /* collision or error */
+ return 0;
+ }
+ }
+
+ /* no collision */
+ return 1;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int enable_periodic (struct ehci_hcd *ehci)
+{
+ u32 cmd;
+ int status;
+
+ /* did clearing PSE did take effect yet?
+ * takes effect only at frame boundaries...
+ */
+ status = handshake (&ehci->regs->status, STS_PSS, 0, 9 * 125);
+ if (status != 0) {
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
+ return status;
+ }
+
+ cmd = readl (&ehci->regs->command) | CMD_PSE;
+ writel (cmd, &ehci->regs->command);
+ /* posted write ... PSS happens later */
+ ehci_to_hcd(ehci)->state = HC_STATE_RUNNING;
+
+ /* make sure ehci_work scans these */
+ ehci->next_uframe = readl (&ehci->regs->frame_index)
+ % (ehci->periodic_size << 3);
+ return 0;
+}
+
+static int disable_periodic (struct ehci_hcd *ehci)
+{
+ u32 cmd;
+ int status;
+
+ /* did setting PSE not take effect yet?
+ * takes effect only at frame boundaries...
+ */
+ status = handshake (&ehci->regs->status, STS_PSS, STS_PSS, 9 * 125);
+ if (status != 0) {
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
+ return status;
+ }
+
+ cmd = readl (&ehci->regs->command) & ~CMD_PSE;
+ writel (cmd, &ehci->regs->command);
+ /* posted write ... */
+
+ ehci->next_uframe = -1;
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* periodic schedule slots have iso tds (normal or split) first, then a
+ * sparse tree for active interrupt transfers.
+ *
+ * this just links in a qh; caller guarantees uframe masks are set right.
+ * no FSTN support (yet; ehci 0.96+)
+ */
+static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+ unsigned i;
+ unsigned period = qh->period;
+
+ dev_dbg (&qh->dev->dev,
+ "link qh%d-%04x/%p start %d [%d/%d us]\n",
+ period, le32_to_cpup (&qh->hw_info2) & 0xffff,
+ qh, qh->start, qh->usecs, qh->c_usecs);
+
+ /* high bandwidth, or otherwise every microframe */
+ if (period == 0)
+ period = 1;
+
+ for (i = qh->start; i < ehci->periodic_size; i += period) {
+ union ehci_shadow *prev = &ehci->pshadow [i];
+ u32 *hw_p = &ehci->periodic [i];
+ union ehci_shadow here = *prev;
+ u32 type = 0;
+
+ /* skip the iso nodes at list head */
+ while (here.ptr) {
+ type = Q_NEXT_TYPE (*hw_p);
+ if (type == Q_TYPE_QH)
+ break;
+ prev = periodic_next_shadow (prev, type);
+ hw_p = &here.qh->hw_next;
+ here = *prev;
+ }
+
+ /* sorting each branch by period (slow-->fast)
+ * enables sharing interior tree nodes
+ */
+ while (here.ptr && qh != here.qh) {
+ if (qh->period > here.qh->period)
+ break;
+ prev = &here.qh->qh_next;
+ hw_p = &here.qh->hw_next;
+ here = *prev;
+ }
+ /* link in this qh, unless some earlier pass did that */
+ if (qh != here.qh) {
+ qh->qh_next = here;
+ if (here.qh)
+ qh->hw_next = *hw_p;
+ wmb ();
+ prev->qh = qh;
+ *hw_p = QH_NEXT (qh->qh_dma);
+ }
+ }
+ qh->qh_state = QH_STATE_LINKED;
+ qh_get (qh);
+
+ /* update per-qh bandwidth for usbfs */
+ ehci_to_hcd(ehci)->self.bandwidth_allocated += qh->period
+ ? ((qh->usecs + qh->c_usecs) / qh->period)
+ : (qh->usecs * 8);
+
+ /* maybe enable periodic schedule processing */
+ if (!ehci->periodic_sched++)
+ return enable_periodic (ehci);
+
+ return 0;
+}
+
+static void qh_unlink_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+ unsigned i;
+ unsigned period;
+
+ // FIXME:
+ // IF this isn't high speed
+ // and this qh is active in the current uframe
+ // (and overlay token SplitXstate is false?)
+ // THEN
+ // qh->hw_info1 |= __constant_cpu_to_le32 (1 << 7 /* "ignore" */);
+
+ /* high bandwidth, or otherwise part of every microframe */
+ if ((period = qh->period) == 0)
+ period = 1;
+
+ for (i = qh->start; i < ehci->periodic_size; i += period)
+ periodic_unlink (ehci, i, qh);
+
+ /* update per-qh bandwidth for usbfs */
+ ehci_to_hcd(ehci)->self.bandwidth_allocated -= qh->period
+ ? ((qh->usecs + qh->c_usecs) / qh->period)
+ : (qh->usecs * 8);
+
+ dev_dbg (&qh->dev->dev,
+ "unlink qh%d-%04x/%p start %d [%d/%d us]\n",
+ qh->period, le32_to_cpup (&qh->hw_info2) & 0xffff,
+ qh, qh->start, qh->usecs, qh->c_usecs);
+
+ /* qh->qh_next still "live" to HC */
+ qh->qh_state = QH_STATE_UNLINK;
+ qh->qh_next.ptr = NULL;
+ qh_put (qh);
+
+ /* maybe turn off periodic schedule */
+ ehci->periodic_sched--;
+ if (!ehci->periodic_sched)
+ (void) disable_periodic (ehci);
+}
+
+static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+ unsigned wait;
+
+ qh_unlink_periodic (ehci, qh);
+
+ /* simple/paranoid: always delay, expecting the HC needs to read
+ * qh->hw_next or finish a writeback after SPLIT/CSPLIT ... and
+ * expect khubd to clean up after any CSPLITs we won't issue.
+ * active high speed queues may need bigger delays...
+ */
+ if (list_empty (&qh->qtd_list)
+ || (__constant_cpu_to_le32 (0x0ff << 8)
+ & qh->hw_info2) != 0)
+ wait = 2;
+ else
+ wait = 55; /* worst case: 3 * 1024 */
+
+ udelay (wait);
+ qh->qh_state = QH_STATE_IDLE;
+ qh->hw_next = EHCI_LIST_END;
+ wmb ();
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int check_period (
+ struct ehci_hcd *ehci,
+ unsigned frame,
+ unsigned uframe,
+ unsigned period,
+ unsigned usecs
+) {
+ int claimed;
+
+ /* complete split running into next frame?
+ * given FSTN support, we could sometimes check...
+ */
+ if (uframe >= 8)
+ return 0;
+
+ /*
+ * 80% periodic == 100 usec/uframe available
+ * convert "usecs we need" to "max already claimed"
+ */
+ usecs = 100 - usecs;
+
+ /* we "know" 2 and 4 uframe intervals were rejected; so
+ * for period 0, check _every_ microframe in the schedule.
+ */
+ if (unlikely (period == 0)) {
+ do {
+ for (uframe = 0; uframe < 7; uframe++) {
+ claimed = periodic_usecs (ehci, frame, uframe);
+ if (claimed > usecs)
+ return 0;
+ }
+ } while ((frame += 1) < ehci->periodic_size);
+
+ /* just check the specified uframe, at that period */
+ } else {
+ do {
+ claimed = periodic_usecs (ehci, frame, uframe);
+ if (claimed > usecs)
+ return 0;
+ } while ((frame += period) < ehci->periodic_size);
+ }
+
+ // success!
+ return 1;
+}
+
+static int check_intr_schedule (
+ struct ehci_hcd *ehci,
+ unsigned frame,
+ unsigned uframe,
+ const struct ehci_qh *qh,
+ __le32 *c_maskp
+)
+{
+ int retval = -ENOSPC;
+ u8 mask;
+
+ if (qh->c_usecs && uframe >= 6) /* FSTN territory? */
+ goto done;
+
+ if (!check_period (ehci, frame, uframe, qh->period, qh->usecs))
+ goto done;
+ if (!qh->c_usecs) {
+ retval = 0;
+ *c_maskp = 0;
+ goto done;
+ }
+
+ /* Make sure this tt's buffer is also available for CSPLITs.
+ * We pessimize a bit; probably the typical full speed case
+ * doesn't need the second CSPLIT.
+ *
+ * NOTE: both SPLIT and CSPLIT could be checked in just
+ * one smart pass...
+ */
+ mask = 0x03 << (uframe + qh->gap_uf);
+ *c_maskp = cpu_to_le32 (mask << 8);
+
+ mask |= 1 << uframe;
+ if (tt_no_collision (ehci, qh->period, qh->dev, frame, mask)) {
+ if (!check_period (ehci, frame, uframe + qh->gap_uf + 1,
+ qh->period, qh->c_usecs))
+ goto done;
+ if (!check_period (ehci, frame, uframe + qh->gap_uf,
+ qh->period, qh->c_usecs))
+ goto done;
+ retval = 0;
+ }
+done:
+ return retval;
+}
+
+/* "first fit" scheduling policy used the first time through,
+ * or when the previous schedule slot can't be re-used.
+ */
+static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+ int status;
+ unsigned uframe;
+ __le32 c_mask;
+ unsigned frame; /* 0..(qh->period - 1), or NO_FRAME */
+
+ qh_refresh(ehci, qh);
+ qh->hw_next = EHCI_LIST_END;
+ frame = qh->start;
+
+ /* reuse the previous schedule slots, if we can */
+ if (frame < qh->period) {
+ uframe = ffs (le32_to_cpup (&qh->hw_info2) & 0x00ff);
+ status = check_intr_schedule (ehci, frame, --uframe,
+ qh, &c_mask);
+ } else {
+ uframe = 0;
+ c_mask = 0;
+ status = -ENOSPC;
+ }
+
+ /* else scan the schedule to find a group of slots such that all
+ * uframes have enough periodic bandwidth available.
+ */
+ if (status) {
+ /* "normal" case, uframing flexible except with splits */
+ if (qh->period) {
+ frame = qh->period - 1;
+ do {
+ for (uframe = 0; uframe < 8; uframe++) {
+ status = check_intr_schedule (ehci,
+ frame, uframe, qh,
+ &c_mask);
+ if (status == 0)
+ break;
+ }
+ } while (status && frame--);
+
+ /* qh->period == 0 means every uframe */
+ } else {
+ frame = 0;
+ status = check_intr_schedule (ehci, 0, 0, qh, &c_mask);
+ }
+ if (status)
+ goto done;
+ qh->start = frame;
+
+ /* reset S-frame and (maybe) C-frame masks */
+ qh->hw_info2 &= __constant_cpu_to_le32 (~0xffff);
+ qh->hw_info2 |= qh->period
+ ? cpu_to_le32 (1 << uframe)
+ : __constant_cpu_to_le32 (0xff);
+ qh->hw_info2 |= c_mask;
+ } else
+ ehci_dbg (ehci, "reused qh %p schedule\n", qh);
+
+ /* stuff into the periodic schedule */
+ status = qh_link_periodic (ehci, qh);
+done:
+ return status;
+}
+
+static int intr_submit (
+ struct ehci_hcd *ehci,
+ struct usb_host_endpoint *ep,
+ struct urb *urb,
+ struct list_head *qtd_list,
+ int mem_flags
+) {
+ unsigned epnum;
+ unsigned long flags;
+ struct ehci_qh *qh;
+ int status = 0;
+ struct list_head empty;
+
+ /* get endpoint and transfer/schedule data */
+ epnum = ep->desc.bEndpointAddress;
+
+ spin_lock_irqsave (&ehci->lock, flags);
+
+ /* get qh and force any scheduling errors */
+ INIT_LIST_HEAD (&empty);
+ qh = qh_append_tds (ehci, urb, &empty, epnum, &ep->hcpriv);
+ if (qh == NULL) {
+ status = -ENOMEM;
+ goto done;
+ }
+ if (qh->qh_state == QH_STATE_IDLE) {
+ if ((status = qh_schedule (ehci, qh)) != 0)
+ goto done;
+ }
+
+ /* then queue the urb's tds to the qh */
+ qh = qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv);
+ BUG_ON (qh == NULL);
+
+ /* ... update usbfs periodic stats */
+ ehci_to_hcd(ehci)->self.bandwidth_int_reqs++;
+
+done:
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ if (status)
+ qtd_list_free (ehci, urb, qtd_list);
+
+ return status;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* ehci_iso_stream ops work with both ITD and SITD */
+
+static struct ehci_iso_stream *
+iso_stream_alloc (int mem_flags)
+{
+ struct ehci_iso_stream *stream;
+
+ stream = kmalloc(sizeof *stream, mem_flags);
+ if (likely (stream != NULL)) {
+ memset (stream, 0, sizeof(*stream));
+ INIT_LIST_HEAD(&stream->td_list);
+ INIT_LIST_HEAD(&stream->free_list);
+ stream->next_uframe = -1;
+ stream->refcount = 1;
+ }
+ return stream;
+}
+
+static void
+iso_stream_init (
+ struct ehci_hcd *ehci,
+ struct ehci_iso_stream *stream,
+ struct usb_device *dev,
+ int pipe,
+ unsigned interval
+)
+{
+ static const u8 smask_out [] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f };
+
+ u32 buf1;
+ unsigned epnum, maxp;
+ int is_input;
+ long bandwidth;
+
+ /*
+ * this might be a "high bandwidth" highspeed endpoint,
+ * as encoded in the ep descriptor's wMaxPacket field
+ */
+ epnum = usb_pipeendpoint (pipe);
+ is_input = usb_pipein (pipe) ? USB_DIR_IN : 0;
+ maxp = usb_maxpacket(dev, pipe, !is_input);
+ if (is_input) {
+ buf1 = (1 << 11);
+ } else {
+ buf1 = 0;
+ }
+
+ /* knows about ITD vs SITD */
+ if (dev->speed == USB_SPEED_HIGH) {
+ unsigned multi = hb_mult(maxp);
+
+ stream->highspeed = 1;
+
+ maxp = max_packet(maxp);
+ buf1 |= maxp;
+ maxp *= multi;
+
+ stream->buf0 = cpu_to_le32 ((epnum << 8) | dev->devnum);
+ stream->buf1 = cpu_to_le32 (buf1);
+ stream->buf2 = cpu_to_le32 (multi);
+
+ /* usbfs wants to report the average usecs per frame tied up
+ * when transfers on this endpoint are scheduled ...
+ */
+ stream->usecs = HS_USECS_ISO (maxp);
+ bandwidth = stream->usecs * 8;
+ bandwidth /= 1 << (interval - 1);
+
+ } else {
+ u32 addr;
+
+ addr = dev->ttport << 24;
+ if (!ehci_is_TDI(ehci)
+ || (dev->tt->hub !=
+ ehci_to_hcd(ehci)->self.root_hub))
+ addr |= dev->tt->hub->devnum << 16;
+ addr |= epnum << 8;
+ addr |= dev->devnum;
+ stream->usecs = HS_USECS_ISO (maxp);
+ if (is_input) {
+ u32 tmp;
+
+ addr |= 1 << 31;
+ stream->c_usecs = stream->usecs;
+ stream->usecs = HS_USECS_ISO (1);
+ stream->raw_mask = 1;
+
+ /* pessimistic c-mask */
+ tmp = usb_calc_bus_time (USB_SPEED_FULL, 1, 0, maxp)
+ / (125 * 1000);
+ stream->raw_mask |= 3 << (tmp + 9);
+ } else
+ stream->raw_mask = smask_out [maxp / 188];
+ bandwidth = stream->usecs + stream->c_usecs;
+ bandwidth /= 1 << (interval + 2);
+
+ /* stream->splits gets created from raw_mask later */
+ stream->address = cpu_to_le32 (addr);
+ }
+ stream->bandwidth = bandwidth;
+
+ stream->udev = dev;
+
+ stream->bEndpointAddress = is_input | epnum;
+ stream->interval = interval;
+ stream->maxp = maxp;
+}
+
+static void
+iso_stream_put(struct ehci_hcd *ehci, struct ehci_iso_stream *stream)
+{
+ stream->refcount--;
+
+ /* free whenever just a dev->ep reference remains.
+ * not like a QH -- no persistent state (toggle, halt)
+ */
+ if (stream->refcount == 1) {
+ int is_in;
+
+ // BUG_ON (!list_empty(&stream->td_list));
+
+ while (!list_empty (&stream->free_list)) {
+ struct list_head *entry;
+
+ entry = stream->free_list.next;
+ list_del (entry);
+
+ /* knows about ITD vs SITD */
+ if (stream->highspeed) {
+ struct ehci_itd *itd;
+
+ itd = list_entry (entry, struct ehci_itd,
+ itd_list);
+ dma_pool_free (ehci->itd_pool, itd,
+ itd->itd_dma);
+ } else {
+ struct ehci_sitd *sitd;
+
+ sitd = list_entry (entry, struct ehci_sitd,
+ sitd_list);
+ dma_pool_free (ehci->sitd_pool, sitd,
+ sitd->sitd_dma);
+ }
+ }
+
+ is_in = (stream->bEndpointAddress & USB_DIR_IN) ? 0x10 : 0;
+ stream->bEndpointAddress &= 0x0f;
+ stream->ep->hcpriv = NULL;
+
+ if (stream->rescheduled) {
+ ehci_info (ehci, "ep%d%s-iso rescheduled "
+ "%lu times in %lu seconds\n",
+ stream->bEndpointAddress, is_in ? "in" : "out",
+ stream->rescheduled,
+ ((jiffies - stream->start)/HZ)
+ );
+ }
+
+ kfree(stream);
+ }
+}
+
+static inline struct ehci_iso_stream *
+iso_stream_get (struct ehci_iso_stream *stream)
+{
+ if (likely (stream != NULL))
+ stream->refcount++;
+ return stream;
+}
+
+static struct ehci_iso_stream *
+iso_stream_find (struct ehci_hcd *ehci, struct urb *urb)
+{
+ unsigned epnum;
+ struct ehci_iso_stream *stream;
+ struct usb_host_endpoint *ep;
+ unsigned long flags;
+
+ epnum = usb_pipeendpoint (urb->pipe);
+ if (usb_pipein(urb->pipe))
+ ep = urb->dev->ep_in[epnum];
+ else
+ ep = urb->dev->ep_out[epnum];
+
+ spin_lock_irqsave (&ehci->lock, flags);
+ stream = ep->hcpriv;
+
+ if (unlikely (stream == NULL)) {
+ stream = iso_stream_alloc(GFP_ATOMIC);
+ if (likely (stream != NULL)) {
+ /* dev->ep owns the initial refcount */
+ ep->hcpriv = stream;
+ stream->ep = ep;
+ iso_stream_init(ehci, stream, urb->dev, urb->pipe,
+ urb->interval);
+ }
+
+ /* if dev->ep [epnum] is a QH, info1.maxpacket is nonzero */
+ } else if (unlikely (stream->hw_info1 != 0)) {
+ ehci_dbg (ehci, "dev %s ep%d%s, not iso??\n",
+ urb->dev->devpath, epnum,
+ usb_pipein(urb->pipe) ? "in" : "out");
+ stream = NULL;
+ }
+
+ /* caller guarantees an eventual matching iso_stream_put */
+ stream = iso_stream_get (stream);
+
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return stream;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* ehci_iso_sched ops can be ITD-only or SITD-only */
+
+static struct ehci_iso_sched *
+iso_sched_alloc (unsigned packets, int mem_flags)
+{
+ struct ehci_iso_sched *iso_sched;
+ int size = sizeof *iso_sched;
+
+ size += packets * sizeof (struct ehci_iso_packet);
+ iso_sched = kmalloc (size, mem_flags);
+ if (likely (iso_sched != NULL)) {
+ memset(iso_sched, 0, size);
+ INIT_LIST_HEAD (&iso_sched->td_list);
+ }
+ return iso_sched;
+}
+
+static inline void
+itd_sched_init (
+ struct ehci_iso_sched *iso_sched,
+ struct ehci_iso_stream *stream,
+ struct urb *urb
+)
+{
+ unsigned i;
+ dma_addr_t dma = urb->transfer_dma;
+
+ /* how many uframes are needed for these transfers */
+ iso_sched->span = urb->number_of_packets * stream->interval;
+
+ /* figure out per-uframe itd fields that we'll need later
+ * when we fit new itds into the schedule.
+ */
+ for (i = 0; i < urb->number_of_packets; i++) {
+ struct ehci_iso_packet *uframe = &iso_sched->packet [i];
+ unsigned length;
+ dma_addr_t buf;
+ u32 trans;
+
+ length = urb->iso_frame_desc [i].length;
+ buf = dma + urb->iso_frame_desc [i].offset;
+
+ trans = EHCI_ISOC_ACTIVE;
+ trans |= buf & 0x0fff;
+ if (unlikely (((i + 1) == urb->number_of_packets))
+ && !(urb->transfer_flags & URB_NO_INTERRUPT))
+ trans |= EHCI_ITD_IOC;
+ trans |= length << 16;
+ uframe->transaction = cpu_to_le32 (trans);
+
+ /* might need to cross a buffer page within a td */
+ uframe->bufp = (buf & ~(u64)0x0fff);
+ buf += length;
+ if (unlikely ((uframe->bufp != (buf & ~(u64)0x0fff))))
+ uframe->cross = 1;
+ }
+}
+
+static void
+iso_sched_free (
+ struct ehci_iso_stream *stream,
+ struct ehci_iso_sched *iso_sched
+)
+{
+ if (!iso_sched)
+ return;
+ // caller must hold ehci->lock!
+ list_splice (&iso_sched->td_list, &stream->free_list);
+ kfree (iso_sched);
+}
+
+static int
+itd_urb_transaction (
+ struct ehci_iso_stream *stream,
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ int mem_flags
+)
+{
+ struct ehci_itd *itd;
+ dma_addr_t itd_dma;
+ int i;
+ unsigned num_itds;
+ struct ehci_iso_sched *sched;
+ unsigned long flags;
+
+ sched = iso_sched_alloc (urb->number_of_packets, mem_flags);
+ if (unlikely (sched == NULL))
+ return -ENOMEM;
+
+ itd_sched_init (sched, stream, urb);
+
+ if (urb->interval < 8)
+ num_itds = 1 + (sched->span + 7) / 8;
+ else
+ num_itds = urb->number_of_packets;
+
+ /* allocate/init ITDs */
+ spin_lock_irqsave (&ehci->lock, flags);
+ for (i = 0; i < num_itds; i++) {
+
+ /* free_list.next might be cache-hot ... but maybe
+ * the HC caches it too. avoid that issue for now.
+ */
+
+ /* prefer previously-allocated itds */
+ if (likely (!list_empty(&stream->free_list))) {
+ itd = list_entry (stream->free_list.prev,
+ struct ehci_itd, itd_list);
+ list_del (&itd->itd_list);
+ itd_dma = itd->itd_dma;
+ } else
+ itd = NULL;
+
+ if (!itd) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ itd = dma_pool_alloc (ehci->itd_pool, mem_flags,
+ &itd_dma);
+ spin_lock_irqsave (&ehci->lock, flags);
+ }
+
+ if (unlikely (NULL == itd)) {
+ iso_sched_free (stream, sched);
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return -ENOMEM;
+ }
+ memset (itd, 0, sizeof *itd);
+ itd->itd_dma = itd_dma;
+ list_add (&itd->itd_list, &sched->td_list);
+ }
+ spin_unlock_irqrestore (&ehci->lock, flags);
+
+ /* temporarily store schedule info in hcpriv */
+ urb->hcpriv = sched;
+ urb->error_count = 0;
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static inline int
+itd_slot_ok (
+ struct ehci_hcd *ehci,
+ u32 mod,
+ u32 uframe,
+ u8 usecs,
+ u32 period
+)
+{
+ uframe %= period;
+ do {
+ /* can't commit more than 80% periodic == 100 usec */
+ if (periodic_usecs (ehci, uframe >> 3, uframe & 0x7)
+ > (100 - usecs))
+ return 0;
+
+ /* we know urb->interval is 2^N uframes */
+ uframe += period;
+ } while (uframe < mod);
+ return 1;
+}
+
+static inline int
+sitd_slot_ok (
+ struct ehci_hcd *ehci,
+ u32 mod,
+ struct ehci_iso_stream *stream,
+ u32 uframe,
+ struct ehci_iso_sched *sched,
+ u32 period_uframes
+)
+{
+ u32 mask, tmp;
+ u32 frame, uf;
+
+ mask = stream->raw_mask << (uframe & 7);
+
+ /* for IN, don't wrap CSPLIT into the next frame */
+ if (mask & ~0xffff)
+ return 0;
+
+ /* this multi-pass logic is simple, but performance may
+ * suffer when the schedule data isn't cached.
+ */
+
+ /* check bandwidth */
+ uframe %= period_uframes;
+ do {
+ u32 max_used;
+
+ frame = uframe >> 3;
+ uf = uframe & 7;
+
+ /* tt must be idle for start(s), any gap, and csplit.
+ * assume scheduling slop leaves 10+% for control/bulk.
+ */
+ if (!tt_no_collision (ehci, period_uframes << 3,
+ stream->udev, frame, mask))
+ return 0;
+
+ /* check starts (OUT uses more than one) */
+ max_used = 100 - stream->usecs;
+ for (tmp = stream->raw_mask & 0xff; tmp; tmp >>= 1, uf++) {
+ if (periodic_usecs (ehci, frame, uf) > max_used)
+ return 0;
+ }
+
+ /* for IN, check CSPLIT */
+ if (stream->c_usecs) {
+ max_used = 100 - stream->c_usecs;
+ do {
+ tmp = 1 << uf;
+ tmp <<= 8;
+ if ((stream->raw_mask & tmp) == 0)
+ continue;
+ if (periodic_usecs (ehci, frame, uf)
+ > max_used)
+ return 0;
+ } while (++uf < 8);
+ }
+
+ /* we know urb->interval is 2^N uframes */
+ uframe += period_uframes;
+ } while (uframe < mod);
+
+ stream->splits = cpu_to_le32(stream->raw_mask << (uframe & 7));
+ return 1;
+}
+
+/*
+ * This scheduler plans almost as far into the future as it has actual
+ * periodic schedule slots. (Affected by TUNE_FLS, which defaults to
+ * "as small as possible" to be cache-friendlier.) That limits the size
+ * transfers you can stream reliably; avoid more than 64 msec per urb.
+ * Also avoid queue depths of less than ehci's worst irq latency (affected
+ * by the per-urb URB_NO_INTERRUPT hint, the log2_irq_thresh module parameter,
+ * and other factors); or more than about 230 msec total (for portability,
+ * given EHCI_TUNE_FLS and the slop). Or, write a smarter scheduler!
+ */
+
+#define SCHEDULE_SLOP 10 /* frames */
+
+static int
+iso_stream_schedule (
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ struct ehci_iso_stream *stream
+)
+{
+ u32 now, start, max, period;
+ int status;
+ unsigned mod = ehci->periodic_size << 3;
+ struct ehci_iso_sched *sched = urb->hcpriv;
+
+ if (sched->span > (mod - 8 * SCHEDULE_SLOP)) {
+ ehci_dbg (ehci, "iso request %p too long\n", urb);
+ status = -EFBIG;
+ goto fail;
+ }
+
+ if ((stream->depth + sched->span) > mod) {
+ ehci_dbg (ehci, "request %p would overflow (%d+%d>%d)\n",
+ urb, stream->depth, sched->span, mod);
+ status = -EFBIG;
+ goto fail;
+ }
+
+ now = readl (&ehci->regs->frame_index) % mod;
+
+ /* when's the last uframe this urb could start? */
+ max = now + mod;
+
+ /* typical case: reuse current schedule. stream is still active,
+ * and no gaps from host falling behind (irq delays etc)
+ */
+ if (likely (!list_empty (&stream->td_list))) {
+ start = stream->next_uframe;
+ if (start < now)
+ start += mod;
+ if (likely ((start + sched->span) < max))
+ goto ready;
+ /* else fell behind; someday, try to reschedule */
+ status = -EL2NSYNC;
+ goto fail;
+ }
+
+ /* need to schedule; when's the next (u)frame we could start?
+ * this is bigger than ehci->i_thresh allows; scheduling itself
+ * isn't free, the slop should handle reasonably slow cpus. it
+ * can also help high bandwidth if the dma and irq loads don't
+ * jump until after the queue is primed.
+ */
+ start = SCHEDULE_SLOP * 8 + (now & ~0x07);
+ start %= mod;
+ stream->next_uframe = start;
+
+ /* NOTE: assumes URB_ISO_ASAP, to limit complexity/bugs */
+
+ period = urb->interval;
+ if (!stream->highspeed)
+ period <<= 3;
+
+ /* find a uframe slot with enough bandwidth */
+ for (; start < (stream->next_uframe + period); start++) {
+ int enough_space;
+
+ /* check schedule: enough space? */
+ if (stream->highspeed)
+ enough_space = itd_slot_ok (ehci, mod, start,
+ stream->usecs, period);
+ else {
+ if ((start % 8) >= 6)
+ continue;
+ enough_space = sitd_slot_ok (ehci, mod, stream,
+ start, sched, period);
+ }
+
+ /* schedule it here if there's enough bandwidth */
+ if (enough_space) {
+ stream->next_uframe = start % mod;
+ goto ready;
+ }
+ }
+
+ /* no room in the schedule */
+ ehci_dbg (ehci, "iso %ssched full %p (now %d max %d)\n",
+ list_empty (&stream->td_list) ? "" : "re",
+ urb, now, max);
+ status = -ENOSPC;
+
+fail:
+ iso_sched_free (stream, sched);
+ urb->hcpriv = NULL;
+ return status;
+
+ready:
+ /* report high speed start in uframes; full speed, in frames */
+ urb->start_frame = stream->next_uframe;
+ if (!stream->highspeed)
+ urb->start_frame >>= 3;
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static inline void
+itd_init (struct ehci_iso_stream *stream, struct ehci_itd *itd)
+{
+ int i;
+
+ itd->hw_next = EHCI_LIST_END;
+ itd->hw_bufp [0] = stream->buf0;
+ itd->hw_bufp [1] = stream->buf1;
+ itd->hw_bufp [2] = stream->buf2;
+
+ for (i = 0; i < 8; i++)
+ itd->index[i] = -1;
+
+ /* All other fields are filled when scheduling */
+}
+
+static inline void
+itd_patch (
+ struct ehci_itd *itd,
+ struct ehci_iso_sched *iso_sched,
+ unsigned index,
+ u16 uframe,
+ int first
+)
+{
+ struct ehci_iso_packet *uf = &iso_sched->packet [index];
+ unsigned pg = itd->pg;
+
+ // BUG_ON (pg == 6 && uf->cross);
+
+ uframe &= 0x07;
+ itd->index [uframe] = index;
+
+ itd->hw_transaction [uframe] = uf->transaction;
+ itd->hw_transaction [uframe] |= cpu_to_le32 (pg << 12);
+ itd->hw_bufp [pg] |= cpu_to_le32 (uf->bufp & ~(u32)0);
+ itd->hw_bufp_hi [pg] |= cpu_to_le32 ((u32)(uf->bufp >> 32));
+
+ /* iso_frame_desc[].offset must be strictly increasing */
+ if (unlikely (!first && uf->cross)) {
+ u64 bufp = uf->bufp + 4096;
+ itd->pg = ++pg;
+ itd->hw_bufp [pg] |= cpu_to_le32 (bufp & ~(u32)0);
+ itd->hw_bufp_hi [pg] |= cpu_to_le32 ((u32)(bufp >> 32));
+ }
+}
+
+static inline void
+itd_link (struct ehci_hcd *ehci, unsigned frame, struct ehci_itd *itd)
+{
+ /* always prepend ITD/SITD ... only QH tree is order-sensitive */
+ itd->itd_next = ehci->pshadow [frame];
+ itd->hw_next = ehci->periodic [frame];
+ ehci->pshadow [frame].itd = itd;
+ itd->frame = frame;
+ wmb ();
+ ehci->periodic [frame] = cpu_to_le32 (itd->itd_dma) | Q_TYPE_ITD;
+}
+
+/* fit urb's itds into the selected schedule slot; activate as needed */
+static int
+itd_link_urb (
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ unsigned mod,
+ struct ehci_iso_stream *stream
+)
+{
+ int packet, first = 1;
+ unsigned next_uframe, uframe, frame;
+ struct ehci_iso_sched *iso_sched = urb->hcpriv;
+ struct ehci_itd *itd;
+
+ next_uframe = stream->next_uframe % mod;
+
+ if (unlikely (list_empty(&stream->td_list))) {
+ ehci_to_hcd(ehci)->self.bandwidth_allocated
+ += stream->bandwidth;
+ ehci_vdbg (ehci,
+ "schedule devp %s ep%d%s-iso period %d start %d.%d\n",
+ urb->dev->devpath, stream->bEndpointAddress & 0x0f,
+ (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out",
+ urb->interval,
+ next_uframe >> 3, next_uframe & 0x7);
+ stream->start = jiffies;
+ }
+ ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++;
+
+ /* fill iTDs uframe by uframe */
+ for (packet = 0, itd = NULL; packet < urb->number_of_packets; ) {
+ if (itd == NULL) {
+ /* ASSERT: we have all necessary itds */
+ // BUG_ON (list_empty (&iso_sched->td_list));
+
+ /* ASSERT: no itds for this endpoint in this uframe */
+
+ itd = list_entry (iso_sched->td_list.next,
+ struct ehci_itd, itd_list);
+ list_move_tail (&itd->itd_list, &stream->td_list);
+ itd->stream = iso_stream_get (stream);
+ itd->urb = usb_get_urb (urb);
+ first = 1;
+ itd_init (stream, itd);
+ }
+
+ uframe = next_uframe & 0x07;
+ frame = next_uframe >> 3;
+
+ itd->usecs [uframe] = stream->usecs;
+ itd_patch (itd, iso_sched, packet, uframe, first);
+ first = 0;
+
+ next_uframe += stream->interval;
+ stream->depth += stream->interval;
+ next_uframe %= mod;
+ packet++;
+
+ /* link completed itds into the schedule */
+ if (((next_uframe >> 3) != frame)
+ || packet == urb->number_of_packets) {
+ itd_link (ehci, frame % ehci->periodic_size, itd);
+ itd = NULL;
+ }
+ }
+ stream->next_uframe = next_uframe;
+
+ /* don't need that schedule data any more */
+ iso_sched_free (stream, iso_sched);
+ urb->hcpriv = NULL;
+
+ timer_action (ehci, TIMER_IO_WATCHDOG);
+ if (unlikely (!ehci->periodic_sched++))
+ return enable_periodic (ehci);
+ return 0;
+}
+
+#define ISO_ERRS (EHCI_ISOC_BUF_ERR | EHCI_ISOC_BABBLE | EHCI_ISOC_XACTERR)
+
+static unsigned
+itd_complete (
+ struct ehci_hcd *ehci,
+ struct ehci_itd *itd,
+ struct pt_regs *regs
+) {
+ struct urb *urb = itd->urb;
+ struct usb_iso_packet_descriptor *desc;
+ u32 t;
+ unsigned uframe;
+ int urb_index = -1;
+ struct ehci_iso_stream *stream = itd->stream;
+ struct usb_device *dev;
+
+ /* for each uframe with a packet */
+ for (uframe = 0; uframe < 8; uframe++) {
+ if (likely (itd->index[uframe] == -1))
+ continue;
+ urb_index = itd->index[uframe];
+ desc = &urb->iso_frame_desc [urb_index];
+
+ t = le32_to_cpup (&itd->hw_transaction [uframe]);
+ itd->hw_transaction [uframe] = 0;
+ stream->depth -= stream->interval;
+
+ /* report transfer status */
+ if (unlikely (t & ISO_ERRS)) {
+ urb->error_count++;
+ if (t & EHCI_ISOC_BUF_ERR)
+ desc->status = usb_pipein (urb->pipe)
+ ? -ENOSR /* hc couldn't read */
+ : -ECOMM; /* hc couldn't write */
+ else if (t & EHCI_ISOC_BABBLE)
+ desc->status = -EOVERFLOW;
+ else /* (t & EHCI_ISOC_XACTERR) */
+ desc->status = -EPROTO;
+
+ /* HC need not update length with this error */
+ if (!(t & EHCI_ISOC_BABBLE))
+ desc->actual_length = EHCI_ITD_LENGTH (t);
+ } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) {
+ desc->status = 0;
+ desc->actual_length = EHCI_ITD_LENGTH (t);
+ }
+ }
+
+ usb_put_urb (urb);
+ itd->urb = NULL;
+ itd->stream = NULL;
+ list_move (&itd->itd_list, &stream->free_list);
+ iso_stream_put (ehci, stream);
+
+ /* handle completion now? */
+ if (likely ((urb_index + 1) != urb->number_of_packets))
+ return 0;
+
+ /* ASSERT: it's really the last itd for this urb
+ list_for_each_entry (itd, &stream->td_list, itd_list)
+ BUG_ON (itd->urb == urb);
+ */
+
+ /* give urb back to the driver ... can be out-of-order */
+ dev = usb_get_dev (urb->dev);
+ ehci_urb_done (ehci, urb, regs);
+ urb = NULL;
+
+ /* defer stopping schedule; completion can submit */
+ ehci->periodic_sched--;
+ if (unlikely (!ehci->periodic_sched))
+ (void) disable_periodic (ehci);
+ ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;
+
+ if (unlikely (list_empty (&stream->td_list))) {
+ ehci_to_hcd(ehci)->self.bandwidth_allocated
+ -= stream->bandwidth;
+ ehci_vdbg (ehci,
+ "deschedule devp %s ep%d%s-iso\n",
+ dev->devpath, stream->bEndpointAddress & 0x0f,
+ (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out");
+ }
+ iso_stream_put (ehci, stream);
+ usb_put_dev (dev);
+
+ return 1;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int itd_submit (struct ehci_hcd *ehci, struct urb *urb, int mem_flags)
+{
+ int status = -EINVAL;
+ unsigned long flags;
+ struct ehci_iso_stream *stream;
+
+ /* Get iso_stream head */
+ stream = iso_stream_find (ehci, urb);
+ if (unlikely (stream == NULL)) {
+ ehci_dbg (ehci, "can't get iso stream\n");
+ return -ENOMEM;
+ }
+ if (unlikely (urb->interval != stream->interval)) {
+ ehci_dbg (ehci, "can't change iso interval %d --> %d\n",
+ stream->interval, urb->interval);
+ goto done;
+ }
+
+#ifdef EHCI_URB_TRACE
+ ehci_dbg (ehci,
+ "%s %s urb %p ep%d%s len %d, %d pkts %d uframes [%p]\n",
+ __FUNCTION__, urb->dev->devpath, urb,
+ usb_pipeendpoint (urb->pipe),
+ usb_pipein (urb->pipe) ? "in" : "out",
+ urb->transfer_buffer_length,
+ urb->number_of_packets, urb->interval,
+ stream);
+#endif
+
+ /* allocate ITDs w/o locking anything */
+ status = itd_urb_transaction (stream, ehci, urb, mem_flags);
+ if (unlikely (status < 0)) {
+ ehci_dbg (ehci, "can't init itds\n");
+ goto done;
+ }
+
+ /* schedule ... need to lock */
+ spin_lock_irqsave (&ehci->lock, flags);
+ status = iso_stream_schedule (ehci, urb, stream);
+ if (likely (status == 0))
+ itd_link_urb (ehci, urb, ehci->periodic_size << 3, stream);
+ spin_unlock_irqrestore (&ehci->lock, flags);
+
+done:
+ if (unlikely (status < 0))
+ iso_stream_put (ehci, stream);
+ return status;
+}
+
+#ifdef CONFIG_USB_EHCI_SPLIT_ISO
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * "Split ISO TDs" ... used for USB 1.1 devices going through the
+ * TTs in USB 2.0 hubs. These need microframe scheduling.
+ */
+
+static inline void
+sitd_sched_init (
+ struct ehci_iso_sched *iso_sched,
+ struct ehci_iso_stream *stream,
+ struct urb *urb
+)
+{
+ unsigned i;
+ dma_addr_t dma = urb->transfer_dma;
+
+ /* how many frames are needed for these transfers */
+ iso_sched->span = urb->number_of_packets * stream->interval;
+
+ /* figure out per-frame sitd fields that we'll need later
+ * when we fit new sitds into the schedule.
+ */
+ for (i = 0; i < urb->number_of_packets; i++) {
+ struct ehci_iso_packet *packet = &iso_sched->packet [i];
+ unsigned length;
+ dma_addr_t buf;
+ u32 trans;
+
+ length = urb->iso_frame_desc [i].length & 0x03ff;
+ buf = dma + urb->iso_frame_desc [i].offset;
+
+ trans = SITD_STS_ACTIVE;
+ if (((i + 1) == urb->number_of_packets)
+ && !(urb->transfer_flags & URB_NO_INTERRUPT))
+ trans |= SITD_IOC;
+ trans |= length << 16;
+ packet->transaction = cpu_to_le32 (trans);
+
+ /* might need to cross a buffer page within a td */
+ packet->bufp = buf;
+ packet->buf1 = (buf + length) & ~0x0fff;
+ if (packet->buf1 != (buf & ~(u64)0x0fff))
+ packet->cross = 1;
+
+ /* OUT uses multiple start-splits */
+ if (stream->bEndpointAddress & USB_DIR_IN)
+ continue;
+ length = (length + 187) / 188;
+ if (length > 1) /* BEGIN vs ALL */
+ length |= 1 << 3;
+ packet->buf1 |= length;
+ }
+}
+
+static int
+sitd_urb_transaction (
+ struct ehci_iso_stream *stream,
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ int mem_flags
+)
+{
+ struct ehci_sitd *sitd;
+ dma_addr_t sitd_dma;
+ int i;
+ struct ehci_iso_sched *iso_sched;
+ unsigned long flags;
+
+ iso_sched = iso_sched_alloc (urb->number_of_packets, mem_flags);
+ if (iso_sched == NULL)
+ return -ENOMEM;
+
+ sitd_sched_init (iso_sched, stream, urb);
+
+ /* allocate/init sITDs */
+ spin_lock_irqsave (&ehci->lock, flags);
+ for (i = 0; i < urb->number_of_packets; i++) {
+
+ /* NOTE: for now, we don't try to handle wraparound cases
+ * for IN (using sitd->hw_backpointer, like a FSTN), which
+ * means we never need two sitds for full speed packets.
+ */
+
+ /* free_list.next might be cache-hot ... but maybe
+ * the HC caches it too. avoid that issue for now.
+ */
+
+ /* prefer previously-allocated sitds */
+ if (!list_empty(&stream->free_list)) {
+ sitd = list_entry (stream->free_list.prev,
+ struct ehci_sitd, sitd_list);
+ list_del (&sitd->sitd_list);
+ sitd_dma = sitd->sitd_dma;
+ } else
+ sitd = NULL;
+
+ if (!sitd) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ sitd = dma_pool_alloc (ehci->sitd_pool, mem_flags,
+ &sitd_dma);
+ spin_lock_irqsave (&ehci->lock, flags);
+ }
+
+ if (!sitd) {
+ iso_sched_free (stream, iso_sched);
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return -ENOMEM;
+ }
+ memset (sitd, 0, sizeof *sitd);
+ sitd->sitd_dma = sitd_dma;
+ list_add (&sitd->sitd_list, &iso_sched->td_list);
+ }
+
+ /* temporarily store schedule info in hcpriv */
+ urb->hcpriv = iso_sched;
+ urb->error_count = 0;
+
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static inline void
+sitd_patch (
+ struct ehci_iso_stream *stream,
+ struct ehci_sitd *sitd,
+ struct ehci_iso_sched *iso_sched,
+ unsigned index
+)
+{
+ struct ehci_iso_packet *uf = &iso_sched->packet [index];
+ u64 bufp = uf->bufp;
+
+ sitd->hw_next = EHCI_LIST_END;
+ sitd->hw_fullspeed_ep = stream->address;
+ sitd->hw_uframe = stream->splits;
+ sitd->hw_results = uf->transaction;
+ sitd->hw_backpointer = EHCI_LIST_END;
+
+ bufp = uf->bufp;
+ sitd->hw_buf [0] = cpu_to_le32 (bufp);
+ sitd->hw_buf_hi [0] = cpu_to_le32 (bufp >> 32);
+
+ sitd->hw_buf [1] = cpu_to_le32 (uf->buf1);
+ if (uf->cross)
+ bufp += 4096;
+ sitd->hw_buf_hi [1] = cpu_to_le32 (bufp >> 32);
+ sitd->index = index;
+}
+
+static inline void
+sitd_link (struct ehci_hcd *ehci, unsigned frame, struct ehci_sitd *sitd)
+{
+ /* note: sitd ordering could matter (CSPLIT then SSPLIT) */
+ sitd->sitd_next = ehci->pshadow [frame];
+ sitd->hw_next = ehci->periodic [frame];
+ ehci->pshadow [frame].sitd = sitd;
+ sitd->frame = frame;
+ wmb ();
+ ehci->periodic [frame] = cpu_to_le32 (sitd->sitd_dma) | Q_TYPE_SITD;
+}
+
+/* fit urb's sitds into the selected schedule slot; activate as needed */
+static int
+sitd_link_urb (
+ struct ehci_hcd *ehci,
+ struct urb *urb,
+ unsigned mod,
+ struct ehci_iso_stream *stream
+)
+{
+ int packet;
+ unsigned next_uframe;
+ struct ehci_iso_sched *sched = urb->hcpriv;
+ struct ehci_sitd *sitd;
+
+ next_uframe = stream->next_uframe;
+
+ if (list_empty(&stream->td_list)) {
+ /* usbfs ignores TT bandwidth */
+ ehci_to_hcd(ehci)->self.bandwidth_allocated
+ += stream->bandwidth;
+ ehci_vdbg (ehci,
+ "sched devp %s ep%d%s-iso [%d] %dms/%04x\n",
+ urb->dev->devpath, stream->bEndpointAddress & 0x0f,
+ (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out",
+ (next_uframe >> 3) % ehci->periodic_size,
+ stream->interval, le32_to_cpu (stream->splits));
+ stream->start = jiffies;
+ }
+ ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++;
+
+ /* fill sITDs frame by frame */
+ for (packet = 0, sitd = NULL;
+ packet < urb->number_of_packets;
+ packet++) {
+
+ /* ASSERT: we have all necessary sitds */
+ BUG_ON (list_empty (&sched->td_list));
+
+ /* ASSERT: no itds for this endpoint in this frame */
+
+ sitd = list_entry (sched->td_list.next,
+ struct ehci_sitd, sitd_list);
+ list_move_tail (&sitd->sitd_list, &stream->td_list);
+ sitd->stream = iso_stream_get (stream);
+ sitd->urb = usb_get_urb (urb);
+
+ sitd_patch (stream, sitd, sched, packet);
+ sitd_link (ehci, (next_uframe >> 3) % ehci->periodic_size,
+ sitd);
+
+ next_uframe += stream->interval << 3;
+ stream->depth += stream->interval << 3;
+ }
+ stream->next_uframe = next_uframe % mod;
+
+ /* don't need that schedule data any more */
+ iso_sched_free (stream, sched);
+ urb->hcpriv = NULL;
+
+ timer_action (ehci, TIMER_IO_WATCHDOG);
+ if (!ehci->periodic_sched++)
+ return enable_periodic (ehci);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#define SITD_ERRS (SITD_STS_ERR | SITD_STS_DBE | SITD_STS_BABBLE \
+ | SITD_STS_XACT | SITD_STS_MMF)
+
+static unsigned
+sitd_complete (
+ struct ehci_hcd *ehci,
+ struct ehci_sitd *sitd,
+ struct pt_regs *regs
+) {
+ struct urb *urb = sitd->urb;
+ struct usb_iso_packet_descriptor *desc;
+ u32 t;
+ int urb_index = -1;
+ struct ehci_iso_stream *stream = sitd->stream;
+ struct usb_device *dev;
+
+ urb_index = sitd->index;
+ desc = &urb->iso_frame_desc [urb_index];
+ t = le32_to_cpup (&sitd->hw_results);
+
+ /* report transfer status */
+ if (t & SITD_ERRS) {
+ urb->error_count++;
+ if (t & SITD_STS_DBE)
+ desc->status = usb_pipein (urb->pipe)
+ ? -ENOSR /* hc couldn't read */
+ : -ECOMM; /* hc couldn't write */
+ else if (t & SITD_STS_BABBLE)
+ desc->status = -EOVERFLOW;
+ else /* XACT, MMF, etc */
+ desc->status = -EPROTO;
+ } else {
+ desc->status = 0;
+ desc->actual_length = desc->length - SITD_LENGTH (t);
+ }
+
+ usb_put_urb (urb);
+ sitd->urb = NULL;
+ sitd->stream = NULL;
+ list_move (&sitd->sitd_list, &stream->free_list);
+ stream->depth -= stream->interval << 3;
+ iso_stream_put (ehci, stream);
+
+ /* handle completion now? */
+ if ((urb_index + 1) != urb->number_of_packets)
+ return 0;
+
+ /* ASSERT: it's really the last sitd for this urb
+ list_for_each_entry (sitd, &stream->td_list, sitd_list)
+ BUG_ON (sitd->urb == urb);
+ */
+
+ /* give urb back to the driver */
+ dev = usb_get_dev (urb->dev);
+ ehci_urb_done (ehci, urb, regs);
+ urb = NULL;
+
+ /* defer stopping schedule; completion can submit */
+ ehci->periodic_sched--;
+ if (!ehci->periodic_sched)
+ (void) disable_periodic (ehci);
+ ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;
+
+ if (list_empty (&stream->td_list)) {
+ ehci_to_hcd(ehci)->self.bandwidth_allocated
+ -= stream->bandwidth;
+ ehci_vdbg (ehci,
+ "deschedule devp %s ep%d%s-iso\n",
+ dev->devpath, stream->bEndpointAddress & 0x0f,
+ (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out");
+ }
+ iso_stream_put (ehci, stream);
+ usb_put_dev (dev);
+
+ return 1;
+}
+
+
+static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb, int mem_flags)
+{
+ int status = -EINVAL;
+ unsigned long flags;
+ struct ehci_iso_stream *stream;
+
+ /* Get iso_stream head */
+ stream = iso_stream_find (ehci, urb);
+ if (stream == NULL) {
+ ehci_dbg (ehci, "can't get iso stream\n");
+ return -ENOMEM;
+ }
+ if (urb->interval != stream->interval) {
+ ehci_dbg (ehci, "can't change iso interval %d --> %d\n",
+ stream->interval, urb->interval);
+ goto done;
+ }
+
+#ifdef EHCI_URB_TRACE
+ ehci_dbg (ehci,
+ "submit %p dev%s ep%d%s-iso len %d\n",
+ urb, urb->dev->devpath,
+ usb_pipeendpoint (urb->pipe),
+ usb_pipein (urb->pipe) ? "in" : "out",
+ urb->transfer_buffer_length);
+#endif
+
+ /* allocate SITDs */
+ status = sitd_urb_transaction (stream, ehci, urb, mem_flags);
+ if (status < 0) {
+ ehci_dbg (ehci, "can't init sitds\n");
+ goto done;
+ }
+
+ /* schedule ... need to lock */
+ spin_lock_irqsave (&ehci->lock, flags);
+ status = iso_stream_schedule (ehci, urb, stream);
+ if (status == 0)
+ sitd_link_urb (ehci, urb, ehci->periodic_size << 3, stream);
+ spin_unlock_irqrestore (&ehci->lock, flags);
+
+done:
+ if (status < 0)
+ iso_stream_put (ehci, stream);
+ return status;
+}
+
+#else
+
+static inline int
+sitd_submit (struct ehci_hcd *ehci, struct urb *urb, int mem_flags)
+{
+ ehci_dbg (ehci, "split iso support is disabled\n");
+ return -ENOSYS;
+}
+
+static inline unsigned
+sitd_complete (
+ struct ehci_hcd *ehci,
+ struct ehci_sitd *sitd,
+ struct pt_regs *regs
+) {
+ ehci_err (ehci, "sitd_complete %p?\n", sitd);
+ return 0;
+}
+
+#endif /* USB_EHCI_SPLIT_ISO */
+
+/*-------------------------------------------------------------------------*/
+
+static void
+scan_periodic (struct ehci_hcd *ehci, struct pt_regs *regs)
+{
+ unsigned frame, clock, now_uframe, mod;
+ unsigned modified;
+
+ mod = ehci->periodic_size << 3;
+
+ /*
+ * When running, scan from last scan point up to "now"
+ * else clean up by scanning everything that's left.
+ * Touches as few pages as possible: cache-friendly.
+ */
+ now_uframe = ehci->next_uframe;
+ if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
+ clock = readl (&ehci->regs->frame_index);
+ else
+ clock = now_uframe + mod - 1;
+ clock %= mod;
+
+ for (;;) {
+ union ehci_shadow q, *q_p;
+ __le32 type, *hw_p;
+ unsigned uframes;
+
+ /* don't scan past the live uframe */
+ frame = now_uframe >> 3;
+ if (frame == (clock >> 3))
+ uframes = now_uframe & 0x07;
+ else {
+ /* safe to scan the whole frame at once */
+ now_uframe |= 0x07;
+ uframes = 8;
+ }
+
+restart:
+ /* scan each element in frame's queue for completions */
+ q_p = &ehci->pshadow [frame];
+ hw_p = &ehci->periodic [frame];
+ q.ptr = q_p->ptr;
+ type = Q_NEXT_TYPE (*hw_p);
+ modified = 0;
+
+ while (q.ptr != NULL) {
+ unsigned uf;
+ union ehci_shadow temp;
+ int live;
+
+ live = HC_IS_RUNNING (ehci_to_hcd(ehci)->state);
+ switch (type) {
+ case Q_TYPE_QH:
+ /* handle any completions */
+ temp.qh = qh_get (q.qh);
+ type = Q_NEXT_TYPE (q.qh->hw_next);
+ q = q.qh->qh_next;
+ modified = qh_completions (ehci, temp.qh, regs);
+ if (unlikely (list_empty (&temp.qh->qtd_list)))
+ intr_deschedule (ehci, temp.qh);
+ qh_put (temp.qh);
+ break;
+ case Q_TYPE_FSTN:
+ /* for "save place" FSTNs, look at QH entries
+ * in the previous frame for completions.
+ */
+ if (q.fstn->hw_prev != EHCI_LIST_END) {
+ dbg ("ignoring completions from FSTNs");
+ }
+ type = Q_NEXT_TYPE (q.fstn->hw_next);
+ q = q.fstn->fstn_next;
+ break;
+ case Q_TYPE_ITD:
+ /* skip itds for later in the frame */
+ rmb ();
+ for (uf = live ? uframes : 8; uf < 8; uf++) {
+ if (0 == (q.itd->hw_transaction [uf]
+ & ITD_ACTIVE))
+ continue;
+ q_p = &q.itd->itd_next;
+ hw_p = &q.itd->hw_next;
+ type = Q_NEXT_TYPE (q.itd->hw_next);
+ q = *q_p;
+ break;
+ }
+ if (uf != 8)
+ break;
+
+ /* this one's ready ... HC won't cache the
+ * pointer for much longer, if at all.
+ */
+ *q_p = q.itd->itd_next;
+ *hw_p = q.itd->hw_next;
+ type = Q_NEXT_TYPE (q.itd->hw_next);
+ wmb();
+ modified = itd_complete (ehci, q.itd, regs);
+ q = *q_p;
+ break;
+ case Q_TYPE_SITD:
+ if ((q.sitd->hw_results & SITD_ACTIVE)
+ && live) {
+ q_p = &q.sitd->sitd_next;
+ hw_p = &q.sitd->hw_next;
+ type = Q_NEXT_TYPE (q.sitd->hw_next);
+ q = *q_p;
+ break;
+ }
+ *q_p = q.sitd->sitd_next;
+ *hw_p = q.sitd->hw_next;
+ type = Q_NEXT_TYPE (q.sitd->hw_next);
+ wmb();
+ modified = sitd_complete (ehci, q.sitd, regs);
+ q = *q_p;
+ break;
+ default:
+ dbg ("corrupt type %d frame %d shadow %p",
+ type, frame, q.ptr);
+ // BUG ();
+ q.ptr = NULL;
+ }
+
+ /* assume completion callbacks modify the queue */
+ if (unlikely (modified))
+ goto restart;
+ }
+
+ /* stop when we catch up to the HC */
+
+ // FIXME: this assumes we won't get lapped when
+ // latencies climb; that should be rare, but...
+ // detect it, and just go all the way around.
+ // FLR might help detect this case, so long as latencies
+ // don't exceed periodic_size msec (default 1.024 sec).
+
+ // FIXME: likewise assumes HC doesn't halt mid-scan
+
+ if (now_uframe == clock) {
+ unsigned now;
+
+ if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
+ break;
+ ehci->next_uframe = now_uframe;
+ now = readl (&ehci->regs->frame_index) % mod;
+ if (now_uframe == now)
+ break;
+
+ /* rescan the rest of this frame, then ... */
+ clock = now;
+ } else {
+ now_uframe++;
+ now_uframe %= mod;
+ }
+ }
+}
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
new file mode 100644
index 000000000000..67988dba9eb7
--- /dev/null
+++ b/drivers/usb/host/ehci.h
@@ -0,0 +1,637 @@
+/*
+ * Copyright (c) 2001-2002 by David Brownell
+ *
+ * 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.
+ */
+
+#ifndef __LINUX_EHCI_HCD_H
+#define __LINUX_EHCI_HCD_H
+
+/* definitions used for the EHCI driver */
+
+/* statistics can be kept for for tuning/monitoring */
+struct ehci_stats {
+ /* irq usage */
+ unsigned long normal;
+ unsigned long error;
+ unsigned long reclaim;
+ unsigned long lost_iaa;
+
+ /* termination of urbs from core */
+ unsigned long complete;
+ unsigned long unlink;
+};
+
+/* ehci_hcd->lock guards shared data against other CPUs:
+ * ehci_hcd: async, reclaim, periodic (and shadow), ...
+ * usb_host_endpoint: hcpriv
+ * ehci_qh: qh_next, qtd_list
+ * ehci_qtd: qtd_list
+ *
+ * Also, hold this lock when talking to HC registers or
+ * when updating hw_* fields in shared qh/qtd/... structures.
+ */
+
+#define EHCI_MAX_ROOT_PORTS 15 /* see HCS_N_PORTS */
+
+struct ehci_hcd { /* one per controller */
+ spinlock_t lock;
+
+ /* async schedule support */
+ struct ehci_qh *async;
+ struct ehci_qh *reclaim;
+ unsigned reclaim_ready : 1;
+ unsigned scanning : 1;
+
+ /* periodic schedule support */
+#define DEFAULT_I_TDPS 1024 /* some HCs can do less */
+ unsigned periodic_size;
+ __le32 *periodic; /* hw periodic table */
+ dma_addr_t periodic_dma;
+ unsigned i_thresh; /* uframes HC might cache */
+
+ union ehci_shadow *pshadow; /* mirror hw periodic table */
+ int next_uframe; /* scan periodic, start here */
+ unsigned periodic_sched; /* periodic activity count */
+
+ /* per root hub port */
+ unsigned long reset_done [EHCI_MAX_ROOT_PORTS];
+
+ /* per-HC memory pools (could be per-bus, but ...) */
+ struct dma_pool *qh_pool; /* qh per active urb */
+ struct dma_pool *qtd_pool; /* one or more per qh */
+ struct dma_pool *itd_pool; /* itd per iso urb */
+ struct dma_pool *sitd_pool; /* sitd per split iso urb */
+
+ struct timer_list watchdog;
+ struct notifier_block reboot_notifier;
+ unsigned long actions;
+ unsigned stamp;
+ unsigned long next_statechange;
+ u32 command;
+
+ unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */
+
+ /* glue to PCI and HCD framework */
+ struct ehci_caps __iomem *caps;
+ struct ehci_regs __iomem *regs;
+ __u32 hcs_params; /* cached register copy */
+
+ /* irq statistics */
+#ifdef EHCI_STATS
+ struct ehci_stats stats;
+# define COUNT(x) do { (x)++; } while (0)
+#else
+# define COUNT(x) do {} while (0)
+#endif
+};
+
+/* convert between an HCD pointer and the corresponding EHCI_HCD */
+static inline struct ehci_hcd *hcd_to_ehci (struct usb_hcd *hcd)
+{
+ return (struct ehci_hcd *) (hcd->hcd_priv);
+}
+static inline struct usb_hcd *ehci_to_hcd (struct ehci_hcd *ehci)
+{
+ return container_of ((void *) ehci, struct usb_hcd, hcd_priv);
+}
+
+
+enum ehci_timer_action {
+ TIMER_IO_WATCHDOG,
+ TIMER_IAA_WATCHDOG,
+ TIMER_ASYNC_SHRINK,
+ TIMER_ASYNC_OFF,
+};
+
+static inline void
+timer_action_done (struct ehci_hcd *ehci, enum ehci_timer_action action)
+{
+ clear_bit (action, &ehci->actions);
+}
+
+static inline void
+timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
+{
+ if (!test_and_set_bit (action, &ehci->actions)) {
+ unsigned long t;
+
+ switch (action) {
+ case TIMER_IAA_WATCHDOG:
+ t = EHCI_IAA_JIFFIES;
+ break;
+ case TIMER_IO_WATCHDOG:
+ t = EHCI_IO_JIFFIES;
+ break;
+ case TIMER_ASYNC_OFF:
+ t = EHCI_ASYNC_JIFFIES;
+ break;
+ // case TIMER_ASYNC_SHRINK:
+ default:
+ t = EHCI_SHRINK_JIFFIES;
+ break;
+ }
+ t += jiffies;
+ // all timings except IAA watchdog can be overridden.
+ // async queue SHRINK often precedes IAA. while it's ready
+ // to go OFF neither can matter, and afterwards the IO
+ // watchdog stops unless there's still periodic traffic.
+ if (action != TIMER_IAA_WATCHDOG
+ && t > ehci->watchdog.expires
+ && timer_pending (&ehci->watchdog))
+ return;
+ mod_timer (&ehci->watchdog, t);
+ }
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* EHCI register interface, corresponds to EHCI Revision 0.95 specification */
+
+/* Section 2.2 Host Controller Capability Registers */
+struct ehci_caps {
+ /* these fields are specified as 8 and 16 bit registers,
+ * but some hosts can't perform 8 or 16 bit PCI accesses.
+ */
+ u32 hc_capbase;
+#define HC_LENGTH(p) (((p)>>00)&0x00ff) /* bits 7:0 */
+#define HC_VERSION(p) (((p)>>16)&0xffff) /* bits 31:16 */
+ u32 hcs_params; /* HCSPARAMS - offset 0x4 */
+#define HCS_DEBUG_PORT(p) (((p)>>20)&0xf) /* bits 23:20, debug port? */
+#define HCS_INDICATOR(p) ((p)&(1 << 16)) /* true: has port indicators */
+#define HCS_N_CC(p) (((p)>>12)&0xf) /* bits 15:12, #companion HCs */
+#define HCS_N_PCC(p) (((p)>>8)&0xf) /* bits 11:8, ports per CC */
+#define HCS_PORTROUTED(p) ((p)&(1 << 7)) /* true: port routing */
+#define HCS_PPC(p) ((p)&(1 << 4)) /* true: port power control */
+#define HCS_N_PORTS(p) (((p)>>0)&0xf) /* bits 3:0, ports on HC */
+
+ u32 hcc_params; /* HCCPARAMS - offset 0x8 */
+#define HCC_EXT_CAPS(p) (((p)>>8)&0xff) /* for pci extended caps */
+#define HCC_ISOC_CACHE(p) ((p)&(1 << 7)) /* true: can cache isoc frame */
+#define HCC_ISOC_THRES(p) (((p)>>4)&0x7) /* bits 6:4, uframes cached */
+#define HCC_CANPARK(p) ((p)&(1 << 2)) /* true: can park on async qh */
+#define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/
+#define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */
+ u8 portroute [8]; /* nibbles for routing - offset 0xC */
+} __attribute__ ((packed));
+
+
+/* Section 2.3 Host Controller Operational Registers */
+struct ehci_regs {
+
+ /* USBCMD: offset 0x00 */
+ u32 command;
+/* 23:16 is r/w intr rate, in microframes; default "8" == 1/msec */
+#define CMD_PARK (1<<11) /* enable "park" on async qh */
+#define CMD_PARK_CNT(c) (((c)>>8)&3) /* how many transfers to park for */
+#define CMD_LRESET (1<<7) /* partial reset (no ports, etc) */
+#define CMD_IAAD (1<<6) /* "doorbell" interrupt async advance */
+#define CMD_ASE (1<<5) /* async schedule enable */
+#define CMD_PSE (1<<4) /* periodic schedule enable */
+/* 3:2 is periodic frame list size */
+#define CMD_RESET (1<<1) /* reset HC not bus */
+#define CMD_RUN (1<<0) /* start/stop HC */
+
+ /* USBSTS: offset 0x04 */
+ u32 status;
+#define STS_ASS (1<<15) /* Async Schedule Status */
+#define STS_PSS (1<<14) /* Periodic Schedule Status */
+#define STS_RECL (1<<13) /* Reclamation */
+#define STS_HALT (1<<12) /* Not running (any reason) */
+/* some bits reserved */
+ /* these STS_* flags are also intr_enable bits (USBINTR) */
+#define STS_IAA (1<<5) /* Interrupted on async advance */
+#define STS_FATAL (1<<4) /* such as some PCI access errors */
+#define STS_FLR (1<<3) /* frame list rolled over */
+#define STS_PCD (1<<2) /* port change detect */
+#define STS_ERR (1<<1) /* "error" completion (overflow, ...) */
+#define STS_INT (1<<0) /* "normal" completion (short, ...) */
+
+ /* USBINTR: offset 0x08 */
+ u32 intr_enable;
+
+ /* FRINDEX: offset 0x0C */
+ u32 frame_index; /* current microframe number */
+ /* CTRLDSSEGMENT: offset 0x10 */
+ u32 segment; /* address bits 63:32 if needed */
+ /* PERIODICLISTBASE: offset 0x14 */
+ u32 frame_list; /* points to periodic list */
+ /* ASYNCLISTADDR: offset 0x18 */
+ u32 async_next; /* address of next async queue head */
+
+ u32 reserved [9];
+
+ /* CONFIGFLAG: offset 0x40 */
+ u32 configured_flag;
+#define FLAG_CF (1<<0) /* true: we'll support "high speed" */
+
+ /* PORTSC: offset 0x44 */
+ u32 port_status [0]; /* up to N_PORTS */
+/* 31:23 reserved */
+#define PORT_WKOC_E (1<<22) /* wake on overcurrent (enable) */
+#define PORT_WKDISC_E (1<<21) /* wake on disconnect (enable) */
+#define PORT_WKCONN_E (1<<20) /* wake on connect (enable) */
+/* 19:16 for port testing */
+#define PORT_LED_OFF (0<<14)
+#define PORT_LED_AMBER (1<<14)
+#define PORT_LED_GREEN (2<<14)
+#define PORT_LED_MASK (3<<14)
+#define PORT_OWNER (1<<13) /* true: companion hc owns this port */
+#define PORT_POWER (1<<12) /* true: has power (see PPC) */
+#define PORT_USB11(x) (((x)&(3<<10))==(1<<10)) /* USB 1.1 device */
+/* 11:10 for detecting lowspeed devices (reset vs release ownership) */
+/* 9 reserved */
+#define PORT_RESET (1<<8) /* reset port */
+#define PORT_SUSPEND (1<<7) /* suspend port */
+#define PORT_RESUME (1<<6) /* resume it */
+#define PORT_OCC (1<<5) /* over current change */
+#define PORT_OC (1<<4) /* over current active */
+#define PORT_PEC (1<<3) /* port enable change */
+#define PORT_PE (1<<2) /* port enable */
+#define PORT_CSC (1<<1) /* connect status change */
+#define PORT_CONNECT (1<<0) /* device connected */
+} __attribute__ ((packed));
+
+/* Appendix C, Debug port ... intended for use with special "debug devices"
+ * that can help if there's no serial console. (nonstandard enumeration.)
+ */
+struct ehci_dbg_port {
+ u32 control;
+#define DBGP_OWNER (1<<30)
+#define DBGP_ENABLED (1<<28)
+#define DBGP_DONE (1<<16)
+#define DBGP_INUSE (1<<10)
+#define DBGP_ERRCODE(x) (((x)>>7)&0x0f)
+# define DBGP_ERR_BAD 1
+# define DBGP_ERR_SIGNAL 2
+#define DBGP_ERROR (1<<6)
+#define DBGP_GO (1<<5)
+#define DBGP_OUT (1<<4)
+#define DBGP_LEN(x) (((x)>>0)&0x0f)
+ u32 pids;
+#define DBGP_PID_GET(x) (((x)>>16)&0xff)
+#define DBGP_PID_SET(data,tok) (((data)<<8)|(tok));
+ u32 data03;
+ u32 data47;
+ u32 address;
+#define DBGP_EPADDR(dev,ep) (((dev)<<8)|(ep));
+} __attribute__ ((packed));
+
+/*-------------------------------------------------------------------------*/
+
+#define QTD_NEXT(dma) cpu_to_le32((u32)dma)
+
+/*
+ * EHCI Specification 0.95 Section 3.5
+ * QTD: describe data transfer components (buffer, direction, ...)
+ * See Fig 3-6 "Queue Element Transfer Descriptor Block Diagram".
+ *
+ * These are associated only with "QH" (Queue Head) structures,
+ * used with control, bulk, and interrupt transfers.
+ */
+struct ehci_qtd {
+ /* first part defined by EHCI spec */
+ __le32 hw_next; /* see EHCI 3.5.1 */
+ __le32 hw_alt_next; /* see EHCI 3.5.2 */
+ __le32 hw_token; /* see EHCI 3.5.3 */
+#define QTD_TOGGLE (1 << 31) /* data toggle */
+#define QTD_LENGTH(tok) (((tok)>>16) & 0x7fff)
+#define QTD_IOC (1 << 15) /* interrupt on complete */
+#define QTD_CERR(tok) (((tok)>>10) & 0x3)
+#define QTD_PID(tok) (((tok)>>8) & 0x3)
+#define QTD_STS_ACTIVE (1 << 7) /* HC may execute this */
+#define QTD_STS_HALT (1 << 6) /* halted on error */
+#define QTD_STS_DBE (1 << 5) /* data buffer error (in HC) */
+#define QTD_STS_BABBLE (1 << 4) /* device was babbling (qtd halted) */
+#define QTD_STS_XACT (1 << 3) /* device gave illegal response */
+#define QTD_STS_MMF (1 << 2) /* incomplete split transaction */
+#define QTD_STS_STS (1 << 1) /* split transaction state */
+#define QTD_STS_PING (1 << 0) /* issue PING? */
+ __le32 hw_buf [5]; /* see EHCI 3.5.4 */
+ __le32 hw_buf_hi [5]; /* Appendix B */
+
+ /* the rest is HCD-private */
+ dma_addr_t qtd_dma; /* qtd address */
+ struct list_head qtd_list; /* sw qtd list */
+ struct urb *urb; /* qtd's urb */
+ size_t length; /* length of buffer */
+} __attribute__ ((aligned (32)));
+
+/* mask NakCnt+T in qh->hw_alt_next */
+#define QTD_MASK __constant_cpu_to_le32 (~0x1f)
+
+#define IS_SHORT_READ(token) (QTD_LENGTH (token) != 0 && QTD_PID (token) == 1)
+
+/*-------------------------------------------------------------------------*/
+
+/* type tag from {qh,itd,sitd,fstn}->hw_next */
+#define Q_NEXT_TYPE(dma) ((dma) & __constant_cpu_to_le32 (3 << 1))
+
+/* values for that type tag */
+#define Q_TYPE_ITD __constant_cpu_to_le32 (0 << 1)
+#define Q_TYPE_QH __constant_cpu_to_le32 (1 << 1)
+#define Q_TYPE_SITD __constant_cpu_to_le32 (2 << 1)
+#define Q_TYPE_FSTN __constant_cpu_to_le32 (3 << 1)
+
+/* next async queue entry, or pointer to interrupt/periodic QH */
+#define QH_NEXT(dma) (cpu_to_le32(((u32)dma)&~0x01f)|Q_TYPE_QH)
+
+/* for periodic/async schedules and qtd lists, mark end of list */
+#define EHCI_LIST_END __constant_cpu_to_le32(1) /* "null pointer" to hw */
+
+/*
+ * Entries in periodic shadow table are pointers to one of four kinds
+ * of data structure. That's dictated by the hardware; a type tag is
+ * encoded in the low bits of the hardware's periodic schedule. Use
+ * Q_NEXT_TYPE to get the tag.
+ *
+ * For entries in the async schedule, the type tag always says "qh".
+ */
+union ehci_shadow {
+ struct ehci_qh *qh; /* Q_TYPE_QH */
+ struct ehci_itd *itd; /* Q_TYPE_ITD */
+ struct ehci_sitd *sitd; /* Q_TYPE_SITD */
+ struct ehci_fstn *fstn; /* Q_TYPE_FSTN */
+ u32 *hw_next; /* (all types) */
+ void *ptr;
+};
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * EHCI Specification 0.95 Section 3.6
+ * QH: describes control/bulk/interrupt endpoints
+ * See Fig 3-7 "Queue Head Structure Layout".
+ *
+ * These appear in both the async and (for interrupt) periodic schedules.
+ */
+
+struct ehci_qh {
+ /* first part defined by EHCI spec */
+ __le32 hw_next; /* see EHCI 3.6.1 */
+ __le32 hw_info1; /* see EHCI 3.6.2 */
+#define QH_HEAD 0x00008000
+ __le32 hw_info2; /* see EHCI 3.6.2 */
+ __le32 hw_current; /* qtd list - see EHCI 3.6.4 */
+
+ /* qtd overlay (hardware parts of a struct ehci_qtd) */
+ __le32 hw_qtd_next;
+ __le32 hw_alt_next;
+ __le32 hw_token;
+ __le32 hw_buf [5];
+ __le32 hw_buf_hi [5];
+
+ /* the rest is HCD-private */
+ dma_addr_t qh_dma; /* address of qh */
+ union ehci_shadow qh_next; /* ptr to qh; or periodic */
+ struct list_head qtd_list; /* sw qtd list */
+ struct ehci_qtd *dummy;
+ struct ehci_qh *reclaim; /* next to reclaim */
+
+ struct ehci_hcd *ehci;
+ struct kref kref;
+ unsigned stamp;
+
+ u8 qh_state;
+#define QH_STATE_LINKED 1 /* HC sees this */
+#define QH_STATE_UNLINK 2 /* HC may still see this */
+#define QH_STATE_IDLE 3 /* HC doesn't see this */
+#define QH_STATE_UNLINK_WAIT 4 /* LINKED and on reclaim q */
+#define QH_STATE_COMPLETING 5 /* don't touch token.HALT */
+
+ /* periodic schedule info */
+ u8 usecs; /* intr bandwidth */
+ u8 gap_uf; /* uframes split/csplit gap */
+ u8 c_usecs; /* ... split completion bw */
+ unsigned short period; /* polling interval */
+ unsigned short start; /* where polling starts */
+#define NO_FRAME ((unsigned short)~0) /* pick new start */
+ struct usb_device *dev; /* access to TT */
+} __attribute__ ((aligned (32)));
+
+/*-------------------------------------------------------------------------*/
+
+/* description of one iso transaction (up to 3 KB data if highspeed) */
+struct ehci_iso_packet {
+ /* These will be copied to iTD when scheduling */
+ u64 bufp; /* itd->hw_bufp{,_hi}[pg] |= */
+ __le32 transaction; /* itd->hw_transaction[i] |= */
+ u8 cross; /* buf crosses pages */
+ /* for full speed OUT splits */
+ u32 buf1;
+};
+
+/* temporary schedule data for packets from iso urbs (both speeds)
+ * each packet is one logical usb transaction to the device (not TT),
+ * beginning at stream->next_uframe
+ */
+struct ehci_iso_sched {
+ struct list_head td_list;
+ unsigned span;
+ struct ehci_iso_packet packet [0];
+};
+
+/*
+ * ehci_iso_stream - groups all (s)itds for this endpoint.
+ * acts like a qh would, if EHCI had them for ISO.
+ */
+struct ehci_iso_stream {
+ /* first two fields match QH, but info1 == 0 */
+ __le32 hw_next;
+ __le32 hw_info1;
+
+ u32 refcount;
+ u8 bEndpointAddress;
+ u8 highspeed;
+ u16 depth; /* depth in uframes */
+ struct list_head td_list; /* queued itds/sitds */
+ struct list_head free_list; /* list of unused itds/sitds */
+ struct usb_device *udev;
+ struct usb_host_endpoint *ep;
+
+ /* output of (re)scheduling */
+ unsigned long start; /* jiffies */
+ unsigned long rescheduled;
+ int next_uframe;
+ __le32 splits;
+
+ /* the rest is derived from the endpoint descriptor,
+ * trusting urb->interval == f(epdesc->bInterval) and
+ * including the extra info for hw_bufp[0..2]
+ */
+ u8 interval;
+ u8 usecs, c_usecs;
+ u16 maxp;
+ u16 raw_mask;
+ unsigned bandwidth;
+
+ /* This is used to initialize iTD's hw_bufp fields */
+ __le32 buf0;
+ __le32 buf1;
+ __le32 buf2;
+
+ /* this is used to initialize sITD's tt info */
+ __le32 address;
+};
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * EHCI Specification 0.95 Section 3.3
+ * Fig 3-4 "Isochronous Transaction Descriptor (iTD)"
+ *
+ * Schedule records for high speed iso xfers
+ */
+struct ehci_itd {
+ /* first part defined by EHCI spec */
+ __le32 hw_next; /* see EHCI 3.3.1 */
+ __le32 hw_transaction [8]; /* see EHCI 3.3.2 */
+#define EHCI_ISOC_ACTIVE (1<<31) /* activate transfer this slot */
+#define EHCI_ISOC_BUF_ERR (1<<30) /* Data buffer error */
+#define EHCI_ISOC_BABBLE (1<<29) /* babble detected */
+#define EHCI_ISOC_XACTERR (1<<28) /* XactErr - transaction error */
+#define EHCI_ITD_LENGTH(tok) (((tok)>>16) & 0x0fff)
+#define EHCI_ITD_IOC (1 << 15) /* interrupt on complete */
+
+#define ITD_ACTIVE __constant_cpu_to_le32(EHCI_ISOC_ACTIVE)
+
+ __le32 hw_bufp [7]; /* see EHCI 3.3.3 */
+ __le32 hw_bufp_hi [7]; /* Appendix B */
+
+ /* the rest is HCD-private */
+ dma_addr_t itd_dma; /* for this itd */
+ union ehci_shadow itd_next; /* ptr to periodic q entry */
+
+ struct urb *urb;
+ struct ehci_iso_stream *stream; /* endpoint's queue */
+ struct list_head itd_list; /* list of stream's itds */
+
+ /* any/all hw_transactions here may be used by that urb */
+ unsigned frame; /* where scheduled */
+ unsigned pg;
+ unsigned index[8]; /* in urb->iso_frame_desc */
+ u8 usecs[8];
+} __attribute__ ((aligned (32)));
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * EHCI Specification 0.95 Section 3.4
+ * siTD, aka split-transaction isochronous Transfer Descriptor
+ * ... describe full speed iso xfers through TT in hubs
+ * see Figure 3-5 "Split-transaction Isochronous Transaction Descriptor (siTD)
+ */
+struct ehci_sitd {
+ /* first part defined by EHCI spec */
+ __le32 hw_next;
+/* uses bit field macros above - see EHCI 0.95 Table 3-8 */
+ __le32 hw_fullspeed_ep; /* EHCI table 3-9 */
+ __le32 hw_uframe; /* EHCI table 3-10 */
+ __le32 hw_results; /* EHCI table 3-11 */
+#define SITD_IOC (1 << 31) /* interrupt on completion */
+#define SITD_PAGE (1 << 30) /* buffer 0/1 */
+#define SITD_LENGTH(x) (0x3ff & ((x)>>16))
+#define SITD_STS_ACTIVE (1 << 7) /* HC may execute this */
+#define SITD_STS_ERR (1 << 6) /* error from TT */
+#define SITD_STS_DBE (1 << 5) /* data buffer error (in HC) */
+#define SITD_STS_BABBLE (1 << 4) /* device was babbling */
+#define SITD_STS_XACT (1 << 3) /* illegal IN response */
+#define SITD_STS_MMF (1 << 2) /* incomplete split transaction */
+#define SITD_STS_STS (1 << 1) /* split transaction state */
+
+#define SITD_ACTIVE __constant_cpu_to_le32(SITD_STS_ACTIVE)
+
+ __le32 hw_buf [2]; /* EHCI table 3-12 */
+ __le32 hw_backpointer; /* EHCI table 3-13 */
+ __le32 hw_buf_hi [2]; /* Appendix B */
+
+ /* the rest is HCD-private */
+ dma_addr_t sitd_dma;
+ union ehci_shadow sitd_next; /* ptr to periodic q entry */
+
+ struct urb *urb;
+ struct ehci_iso_stream *stream; /* endpoint's queue */
+ struct list_head sitd_list; /* list of stream's sitds */
+ unsigned frame;
+ unsigned index;
+} __attribute__ ((aligned (32)));
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * EHCI Specification 0.96 Section 3.7
+ * Periodic Frame Span Traversal Node (FSTN)
+ *
+ * Manages split interrupt transactions (using TT) that span frame boundaries
+ * into uframes 0/1; see 4.12.2.2. In those uframes, a "save place" FSTN
+ * makes the HC jump (back) to a QH to scan for fs/ls QH completions until
+ * it hits a "restore" FSTN; then it returns to finish other uframe 0/1 work.
+ */
+struct ehci_fstn {
+ __le32 hw_next; /* any periodic q entry */
+ __le32 hw_prev; /* qh or EHCI_LIST_END */
+
+ /* the rest is HCD-private */
+ dma_addr_t fstn_dma;
+ union ehci_shadow fstn_next; /* ptr to periodic q entry */
+} __attribute__ ((aligned (32)));
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_USB_EHCI_ROOT_HUB_TT
+
+/*
+ * Some EHCI controllers have a Transaction Translator built into the
+ * root hub. This is a non-standard feature. Each controller will need
+ * to add code to the following inline functions, and call them as
+ * needed (mostly in root hub code).
+ */
+
+#define ehci_is_TDI(e) ((e)->is_tdi_rh_tt)
+
+/* Returns the speed of a device attached to a port on the root hub. */
+static inline unsigned int
+ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc)
+{
+ if (ehci_is_TDI(ehci)) {
+ switch ((portsc>>26)&3) {
+ case 0:
+ return 0;
+ case 1:
+ return (1<<USB_PORT_FEAT_LOWSPEED);
+ case 2:
+ default:
+ return (1<<USB_PORT_FEAT_HIGHSPEED);
+ }
+ }
+ return (1<<USB_PORT_FEAT_HIGHSPEED);
+}
+
+#else
+
+#define ehci_is_TDI(e) (0)
+
+#define ehci_port_speed(ehci, portsc) (1<<USB_PORT_FEAT_HIGHSPEED)
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+#ifndef DEBUG
+#define STUB_DEBUG_FILES
+#endif /* DEBUG */
+
+/*-------------------------------------------------------------------------*/
+
+#endif /* __LINUX_EHCI_HCD_H */
diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c
new file mode 100644
index 000000000000..4b12be822bd4
--- /dev/null
+++ b/drivers/usb/host/hc_crisv10.c
@@ -0,0 +1,4556 @@
+/*
+ * usb-host.c: ETRAX 100LX USB Host Controller Driver (HCD)
+ *
+ * Copyright (c) 2002, 2003 Axis Communications AB.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/errno.h>
+#include <linux/unistd.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/version.h>
+#include <linux/list.h>
+#include <linux/spinlock.h>
+
+#include <asm/uaccess.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/dma.h>
+#include <asm/system.h>
+#include <asm/arch/svinto.h>
+
+#include <linux/usb.h>
+/* Ugly include because we don't live with the other host drivers. */
+#include <../drivers/usb/core/hcd.h>
+#include <../drivers/usb/core/usb.h>
+
+#include "hc_crisv10.h"
+
+#define ETRAX_USB_HC_IRQ USB_HC_IRQ_NBR
+#define ETRAX_USB_RX_IRQ USB_DMA_RX_IRQ_NBR
+#define ETRAX_USB_TX_IRQ USB_DMA_TX_IRQ_NBR
+
+static const char *usb_hcd_version = "$Revision: 1.2 $";
+
+#undef KERN_DEBUG
+#define KERN_DEBUG ""
+
+
+#undef USB_DEBUG_RH
+#undef USB_DEBUG_EPID
+#undef USB_DEBUG_SB
+#undef USB_DEBUG_DESC
+#undef USB_DEBUG_URB
+#undef USB_DEBUG_TRACE
+#undef USB_DEBUG_BULK
+#undef USB_DEBUG_CTRL
+#undef USB_DEBUG_INTR
+#undef USB_DEBUG_ISOC
+
+#ifdef USB_DEBUG_RH
+#define dbg_rh(format, arg...) printk(KERN_DEBUG __FILE__ ": (RH) " format "\n" , ## arg)
+#else
+#define dbg_rh(format, arg...) do {} while (0)
+#endif
+
+#ifdef USB_DEBUG_EPID
+#define dbg_epid(format, arg...) printk(KERN_DEBUG __FILE__ ": (EPID) " format "\n" , ## arg)
+#else
+#define dbg_epid(format, arg...) do {} while (0)
+#endif
+
+#ifdef USB_DEBUG_SB
+#define dbg_sb(format, arg...) printk(KERN_DEBUG __FILE__ ": (SB) " format "\n" , ## arg)
+#else
+#define dbg_sb(format, arg...) do {} while (0)
+#endif
+
+#ifdef USB_DEBUG_CTRL
+#define dbg_ctrl(format, arg...) printk(KERN_DEBUG __FILE__ ": (CTRL) " format "\n" , ## arg)
+#else
+#define dbg_ctrl(format, arg...) do {} while (0)
+#endif
+
+#ifdef USB_DEBUG_BULK
+#define dbg_bulk(format, arg...) printk(KERN_DEBUG __FILE__ ": (BULK) " format "\n" , ## arg)
+#else
+#define dbg_bulk(format, arg...) do {} while (0)
+#endif
+
+#ifdef USB_DEBUG_INTR
+#define dbg_intr(format, arg...) printk(KERN_DEBUG __FILE__ ": (INTR) " format "\n" , ## arg)
+#else
+#define dbg_intr(format, arg...) do {} while (0)
+#endif
+
+#ifdef USB_DEBUG_ISOC
+#define dbg_isoc(format, arg...) printk(KERN_DEBUG __FILE__ ": (ISOC) " format "\n" , ## arg)
+#else
+#define dbg_isoc(format, arg...) do {} while (0)
+#endif
+
+#ifdef USB_DEBUG_TRACE
+#define DBFENTER (printk(": Entering: %s\n", __FUNCTION__))
+#define DBFEXIT (printk(": Exiting: %s\n", __FUNCTION__))
+#else
+#define DBFENTER do {} while (0)
+#define DBFEXIT do {} while (0)
+#endif
+
+#define usb_pipeslow(pipe) (((pipe) >> 26) & 1)
+
+/*-------------------------------------------------------------------
+ Virtual Root Hub
+ -------------------------------------------------------------------*/
+
+static __u8 root_hub_dev_des[] =
+{
+ 0x12, /* __u8 bLength; */
+ 0x01, /* __u8 bDescriptorType; Device */
+ 0x00, /* __le16 bcdUSB; v1.0 */
+ 0x01,
+ 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */
+ 0x00, /* __u8 bDeviceSubClass; */
+ 0x00, /* __u8 bDeviceProtocol; */
+ 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */
+ 0x00, /* __le16 idVendor; */
+ 0x00,
+ 0x00, /* __le16 idProduct; */
+ 0x00,
+ 0x00, /* __le16 bcdDevice; */
+ 0x00,
+ 0x00, /* __u8 iManufacturer; */
+ 0x02, /* __u8 iProduct; */
+ 0x01, /* __u8 iSerialNumber; */
+ 0x01 /* __u8 bNumConfigurations; */
+};
+
+/* Configuration descriptor */
+static __u8 root_hub_config_des[] =
+{
+ 0x09, /* __u8 bLength; */
+ 0x02, /* __u8 bDescriptorType; Configuration */
+ 0x19, /* __le16 wTotalLength; */
+ 0x00,
+ 0x01, /* __u8 bNumInterfaces; */
+ 0x01, /* __u8 bConfigurationValue; */
+ 0x00, /* __u8 iConfiguration; */
+ 0x40, /* __u8 bmAttributes; Bit 7: Bus-powered */
+ 0x00, /* __u8 MaxPower; */
+
+ /* interface */
+ 0x09, /* __u8 if_bLength; */
+ 0x04, /* __u8 if_bDescriptorType; Interface */
+ 0x00, /* __u8 if_bInterfaceNumber; */
+ 0x00, /* __u8 if_bAlternateSetting; */
+ 0x01, /* __u8 if_bNumEndpoints; */
+ 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */
+ 0x00, /* __u8 if_bInterfaceSubClass; */
+ 0x00, /* __u8 if_bInterfaceProtocol; */
+ 0x00, /* __u8 if_iInterface; */
+
+ /* endpoint */
+ 0x07, /* __u8 ep_bLength; */
+ 0x05, /* __u8 ep_bDescriptorType; Endpoint */
+ 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */
+ 0x03, /* __u8 ep_bmAttributes; Interrupt */
+ 0x08, /* __le16 ep_wMaxPacketSize; 8 Bytes */
+ 0x00,
+ 0xff /* __u8 ep_bInterval; 255 ms */
+};
+
+static __u8 root_hub_hub_des[] =
+{
+ 0x09, /* __u8 bLength; */
+ 0x29, /* __u8 bDescriptorType; Hub-descriptor */
+ 0x02, /* __u8 bNbrPorts; */
+ 0x00, /* __u16 wHubCharacteristics; */
+ 0x00,
+ 0x01, /* __u8 bPwrOn2pwrGood; 2ms */
+ 0x00, /* __u8 bHubContrCurrent; 0 mA */
+ 0x00, /* __u8 DeviceRemovable; *** 7 Ports max *** */
+ 0xff /* __u8 PortPwrCtrlMask; *** 7 ports max *** */
+};
+
+static struct timer_list bulk_start_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static struct timer_list bulk_eot_timer = TIMER_INITIALIZER(NULL, 0, 0);
+
+/* We want the start timer to expire before the eot timer, because the former might start
+ traffic, thus making it unnecessary for the latter to time out. */
+#define BULK_START_TIMER_INTERVAL (HZ/10) /* 100 ms */
+#define BULK_EOT_TIMER_INTERVAL (HZ/10+2) /* 120 ms */
+
+#define OK(x) len = (x); dbg_rh("OK(%d): line: %d", x, __LINE__); break
+#define CHECK_ALIGN(x) if (((__u32)(x)) & 0x00000003) \
+{panic("Alignment check (DWORD) failed at %s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__);}
+
+#define SLAB_FLAG (in_interrupt() ? SLAB_ATOMIC : SLAB_KERNEL)
+#define KMALLOC_FLAG (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL)
+
+/* Most helpful debugging aid */
+#define assert(expr) ((void) ((expr) ? 0 : (err("assert failed at line %d",__LINE__))))
+
+/* Alternative assert define which stops after a failed assert. */
+/*
+#define assert(expr) \
+{ \
+ if (!(expr)) { \
+ err("assert failed at line %d",__LINE__); \
+ while (1); \
+ } \
+}
+*/
+
+
+/* FIXME: Should RX_BUF_SIZE be a config option, or maybe we should adjust it dynamically?
+ To adjust it dynamically we would have to get an interrupt when we reach the end
+ of the rx descriptor list, or when we get close to the end, and then allocate more
+ descriptors. */
+
+#define NBR_OF_RX_DESC 512
+#define RX_DESC_BUF_SIZE 1024
+#define RX_BUF_SIZE (NBR_OF_RX_DESC * RX_DESC_BUF_SIZE)
+
+/* The number of epids is, among other things, used for pre-allocating
+ ctrl, bulk and isoc EP descriptors (one for each epid).
+ Assumed to be > 1 when initiating the DMA lists. */
+#define NBR_OF_EPIDS 32
+
+/* Support interrupt traffic intervals up to 128 ms. */
+#define MAX_INTR_INTERVAL 128
+
+/* If periodic traffic (intr or isoc) is to be used, then one entry in the EP table
+ must be "invalid". By this we mean that we shouldn't care about epid attentions
+ for this epid, or at least handle them differently from epid attentions for "valid"
+ epids. This define determines which one to use (don't change it). */
+#define INVALID_EPID 31
+/* A special epid for the bulk dummys. */
+#define DUMMY_EPID 30
+
+/* This is just a software cache for the valid entries in R_USB_EPT_DATA. */
+static __u32 epid_usage_bitmask;
+
+/* A bitfield to keep information on in/out traffic is needed to uniquely identify
+ an endpoint on a device, since the most significant bit which indicates traffic
+ direction is lacking in the ep_id field (ETRAX epids can handle both in and
+ out traffic on endpoints that are otherwise identical). The USB framework, however,
+ relies on them to be handled separately. For example, bulk IN and OUT urbs cannot
+ be queued in the same list, since they would block each other. */
+static __u32 epid_out_traffic;
+
+/* DMA IN cache bug. Align the DMA IN buffers to 32 bytes, i.e. a cache line.
+ Since RX_DESC_BUF_SIZE is 1024 is a multiple of 32, all rx buffers will be cache aligned. */
+static volatile unsigned char RxBuf[RX_BUF_SIZE] __attribute__ ((aligned (32)));
+static volatile USB_IN_Desc_t RxDescList[NBR_OF_RX_DESC] __attribute__ ((aligned (4)));
+
+/* Pointers into RxDescList. */
+static volatile USB_IN_Desc_t *myNextRxDesc;
+static volatile USB_IN_Desc_t *myLastRxDesc;
+static volatile USB_IN_Desc_t *myPrevRxDesc;
+
+/* EP descriptors must be 32-bit aligned. */
+static volatile USB_EP_Desc_t TxCtrlEPList[NBR_OF_EPIDS] __attribute__ ((aligned (4)));
+static volatile USB_EP_Desc_t TxBulkEPList[NBR_OF_EPIDS] __attribute__ ((aligned (4)));
+/* After each enabled bulk EP (IN or OUT) we put two disabled EP descriptors with the eol flag set,
+ causing the DMA to stop the DMA channel. The first of these two has the intr flag set, which
+ gives us a dma8_sub0_descr interrupt. When we receive this, we advance the DMA one step in the
+ EP list and then restart the bulk channel, thus forcing a switch between bulk EP descriptors
+ in each frame. */
+static volatile USB_EP_Desc_t TxBulkDummyEPList[NBR_OF_EPIDS][2] __attribute__ ((aligned (4)));
+
+static volatile USB_EP_Desc_t TxIsocEPList[NBR_OF_EPIDS] __attribute__ ((aligned (4)));
+static volatile USB_SB_Desc_t TxIsocSB_zout __attribute__ ((aligned (4)));
+
+static volatile USB_EP_Desc_t TxIntrEPList[MAX_INTR_INTERVAL] __attribute__ ((aligned (4)));
+static volatile USB_SB_Desc_t TxIntrSB_zout __attribute__ ((aligned (4)));
+
+/* A zout transfer makes a memory access at the address of its buf pointer, which means that setting
+ this buf pointer to 0 will cause an access to the flash. In addition to this, setting sw_len to 0
+ results in a 16/32 bytes (depending on DMA burst size) transfer. Instead, we set it to 1, and point
+ it to this buffer. */
+static int zout_buffer[4] __attribute__ ((aligned (4)));
+
+/* Cache for allocating new EP and SB descriptors. */
+static kmem_cache_t *usb_desc_cache;
+
+/* Cache for the registers allocated in the top half. */
+static kmem_cache_t *top_half_reg_cache;
+
+/* Cache for the data allocated in the isoc descr top half. */
+static kmem_cache_t *isoc_compl_cache;
+
+static struct usb_bus *etrax_usb_bus;
+
+/* This is a circular (double-linked) list of the active urbs for each epid.
+ The head is never removed, and new urbs are linked onto the list as
+ urb_entry_t elements. Don't reference urb_list directly; use the wrapper
+ functions instead. Note that working with these lists might require spinlock
+ protection. */
+static struct list_head urb_list[NBR_OF_EPIDS];
+
+/* Read about the need and usage of this lock in submit_ctrl_urb. */
+static spinlock_t urb_list_lock;
+
+/* Used when unlinking asynchronously. */
+static struct list_head urb_unlink_list;
+
+/* for returning string descriptors in UTF-16LE */
+static int ascii2utf (char *ascii, __u8 *utf, int utfmax)
+{
+ int retval;
+
+ for (retval = 0; *ascii && utfmax > 1; utfmax -= 2, retval += 2) {
+ *utf++ = *ascii++ & 0x7f;
+ *utf++ = 0;
+ }
+ return retval;
+}
+
+static int usb_root_hub_string (int id, int serial, char *type, __u8 *data, int len)
+{
+ char buf [30];
+
+ // assert (len > (2 * (sizeof (buf) + 1)));
+ // assert (strlen (type) <= 8);
+
+ // language ids
+ if (id == 0) {
+ *data++ = 4; *data++ = 3; /* 4 bytes data */
+ *data++ = 0; *data++ = 0; /* some language id */
+ return 4;
+
+ // serial number
+ } else if (id == 1) {
+ sprintf (buf, "%x", serial);
+
+ // product description
+ } else if (id == 2) {
+ sprintf (buf, "USB %s Root Hub", type);
+
+ // id 3 == vendor description
+
+ // unsupported IDs --> "stall"
+ } else
+ return 0;
+
+ data [0] = 2 + ascii2utf (buf, data + 2, len - 2);
+ data [1] = 3;
+ return data [0];
+}
+
+/* Wrappers around the list functions (include/linux/list.h). */
+
+static inline int urb_list_empty(int epid)
+{
+ return list_empty(&urb_list[epid]);
+}
+
+/* Returns first urb for this epid, or NULL if list is empty. */
+static inline struct urb *urb_list_first(int epid)
+{
+ struct urb *first_urb = 0;
+
+ if (!urb_list_empty(epid)) {
+ /* Get the first urb (i.e. head->next). */
+ urb_entry_t *urb_entry = list_entry((&urb_list[epid])->next, urb_entry_t, list);
+ first_urb = urb_entry->urb;
+ }
+ return first_urb;
+}
+
+/* Adds an urb_entry last in the list for this epid. */
+static inline void urb_list_add(struct urb *urb, int epid)
+{
+ urb_entry_t *urb_entry = (urb_entry_t *)kmalloc(sizeof(urb_entry_t), KMALLOC_FLAG);
+ assert(urb_entry);
+
+ urb_entry->urb = urb;
+ list_add_tail(&urb_entry->list, &urb_list[epid]);
+}
+
+/* Search through the list for an element that contains this urb. (The list
+ is expected to be short and the one we are about to delete will often be
+ the first in the list.) */
+static inline urb_entry_t *__urb_list_entry(struct urb *urb, int epid)
+{
+ struct list_head *entry;
+ struct list_head *tmp;
+ urb_entry_t *urb_entry;
+
+ list_for_each_safe(entry, tmp, &urb_list[epid]) {
+ urb_entry = list_entry(entry, urb_entry_t, list);
+ assert(urb_entry);
+ assert(urb_entry->urb);
+
+ if (urb_entry->urb == urb) {
+ return urb_entry;
+ }
+ }
+ return 0;
+}
+
+/* Delete an urb from the list. */
+static inline void urb_list_del(struct urb *urb, int epid)
+{
+ urb_entry_t *urb_entry = __urb_list_entry(urb, epid);
+ assert(urb_entry);
+
+ /* Delete entry and free. */
+ list_del(&urb_entry->list);
+ kfree(urb_entry);
+}
+
+/* Move an urb to the end of the list. */
+static inline void urb_list_move_last(struct urb *urb, int epid)
+{
+ urb_entry_t *urb_entry = __urb_list_entry(urb, epid);
+ assert(urb_entry);
+
+ list_del(&urb_entry->list);
+ list_add_tail(&urb_entry->list, &urb_list[epid]);
+}
+
+/* Get the next urb in the list. */
+static inline struct urb *urb_list_next(struct urb *urb, int epid)
+{
+ urb_entry_t *urb_entry = __urb_list_entry(urb, epid);
+
+ assert(urb_entry);
+
+ if (urb_entry->list.next != &urb_list[epid]) {
+ struct list_head *elem = urb_entry->list.next;
+ urb_entry = list_entry(elem, urb_entry_t, list);
+ return urb_entry->urb;
+ } else {
+ return NULL;
+ }
+}
+
+
+
+/* For debug purposes only. */
+static inline void urb_list_dump(int epid)
+{
+ struct list_head *entry;
+ struct list_head *tmp;
+ urb_entry_t *urb_entry;
+ int i = 0;
+
+ info("Dumping urb list for epid %d", epid);
+
+ list_for_each_safe(entry, tmp, &urb_list[epid]) {
+ urb_entry = list_entry(entry, urb_entry_t, list);
+ info(" entry %d, urb = 0x%lx", i, (unsigned long)urb_entry->urb);
+ }
+}
+
+static void init_rx_buffers(void);
+static int etrax_rh_unlink_urb(struct urb *urb);
+static void etrax_rh_send_irq(struct urb *urb);
+static void etrax_rh_init_int_timer(struct urb *urb);
+static void etrax_rh_int_timer_do(unsigned long ptr);
+
+static int etrax_usb_setup_epid(struct urb *urb);
+static int etrax_usb_lookup_epid(struct urb *urb);
+static int etrax_usb_allocate_epid(void);
+static void etrax_usb_free_epid(int epid);
+
+static int etrax_remove_from_sb_list(struct urb *urb);
+
+static void* etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, int mem_flags, dma_addr_t *dma);
+static void etrax_usb_buffer_free(struct usb_bus *bus, size_t size, void *addr, dma_addr_t dma);
+
+static void etrax_usb_add_to_bulk_sb_list(struct urb *urb, int epid);
+static void etrax_usb_add_to_ctrl_sb_list(struct urb *urb, int epid);
+static void etrax_usb_add_to_intr_sb_list(struct urb *urb, int epid);
+static void etrax_usb_add_to_isoc_sb_list(struct urb *urb, int epid);
+
+static int etrax_usb_submit_bulk_urb(struct urb *urb);
+static int etrax_usb_submit_ctrl_urb(struct urb *urb);
+static int etrax_usb_submit_intr_urb(struct urb *urb);
+static int etrax_usb_submit_isoc_urb(struct urb *urb);
+
+static int etrax_usb_submit_urb(struct urb *urb, int mem_flags);
+static int etrax_usb_unlink_urb(struct urb *urb, int status);
+static int etrax_usb_get_frame_number(struct usb_device *usb_dev);
+
+static irqreturn_t etrax_usb_tx_interrupt(int irq, void *vhc, struct pt_regs *regs);
+static irqreturn_t etrax_usb_rx_interrupt(int irq, void *vhc, struct pt_regs *regs);
+static irqreturn_t etrax_usb_hc_interrupt_top_half(int irq, void *vhc, struct pt_regs *regs);
+static void etrax_usb_hc_interrupt_bottom_half(void *data);
+
+static void etrax_usb_isoc_descr_interrupt_bottom_half(void *data);
+
+
+/* The following is a list of interrupt handlers for the host controller interrupts we use.
+ They are called from etrax_usb_hc_interrupt_bottom_half. */
+static void etrax_usb_hc_isoc_eof_interrupt(void);
+static void etrax_usb_hc_bulk_eot_interrupt(int timer_induced);
+static void etrax_usb_hc_epid_attn_interrupt(usb_interrupt_registers_t *reg);
+static void etrax_usb_hc_port_status_interrupt(usb_interrupt_registers_t *reg);
+static void etrax_usb_hc_ctl_status_interrupt(usb_interrupt_registers_t *reg);
+
+static int etrax_rh_submit_urb (struct urb *urb);
+
+/* Forward declaration needed because they are used in the rx interrupt routine. */
+static void etrax_usb_complete_urb(struct urb *urb, int status);
+static void etrax_usb_complete_bulk_urb(struct urb *urb, int status);
+static void etrax_usb_complete_ctrl_urb(struct urb *urb, int status);
+static void etrax_usb_complete_intr_urb(struct urb *urb, int status);
+static void etrax_usb_complete_isoc_urb(struct urb *urb, int status);
+
+static int etrax_usb_hc_init(void);
+static void etrax_usb_hc_cleanup(void);
+
+static struct usb_operations etrax_usb_device_operations =
+{
+ .get_frame_number = etrax_usb_get_frame_number,
+ .submit_urb = etrax_usb_submit_urb,
+ .unlink_urb = etrax_usb_unlink_urb,
+ .buffer_alloc = etrax_usb_buffer_alloc,
+ .buffer_free = etrax_usb_buffer_free
+};
+
+/* Note that these functions are always available in their "__" variants, for use in
+ error situations. The "__" missing variants are controlled by the USB_DEBUG_DESC/
+ USB_DEBUG_URB macros. */
+static void __dump_urb(struct urb* purb)
+{
+ printk("\nurb :0x%08lx\n", (unsigned long)purb);
+ printk("dev :0x%08lx\n", (unsigned long)purb->dev);
+ printk("pipe :0x%08x\n", purb->pipe);
+ printk("status :%d\n", purb->status);
+ printk("transfer_flags :0x%08x\n", purb->transfer_flags);
+ printk("transfer_buffer :0x%08lx\n", (unsigned long)purb->transfer_buffer);
+ printk("transfer_buffer_length:%d\n", purb->transfer_buffer_length);
+ printk("actual_length :%d\n", purb->actual_length);
+ printk("setup_packet :0x%08lx\n", (unsigned long)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 :0x%08lx\n", (unsigned long)purb->context);
+ printk("complete :0x%08lx\n\n", (unsigned long)purb->complete);
+}
+
+static void __dump_in_desc(volatile USB_IN_Desc_t *in)
+{
+ printk("\nUSB_IN_Desc at 0x%08lx\n", (unsigned long)in);
+ printk(" sw_len : 0x%04x (%d)\n", in->sw_len, in->sw_len);
+ printk(" command : 0x%04x\n", in->command);
+ printk(" next : 0x%08lx\n", in->next);
+ printk(" buf : 0x%08lx\n", in->buf);
+ printk(" hw_len : 0x%04x (%d)\n", in->hw_len, in->hw_len);
+ printk(" status : 0x%04x\n\n", in->status);
+}
+
+static void __dump_sb_desc(volatile USB_SB_Desc_t *sb)
+{
+ char tt = (sb->command & 0x30) >> 4;
+ char *tt_string;
+
+ switch (tt) {
+ case 0:
+ tt_string = "zout";
+ break;
+ case 1:
+ tt_string = "in";
+ break;
+ case 2:
+ tt_string = "out";
+ break;
+ case 3:
+ tt_string = "setup";
+ break;
+ default:
+ tt_string = "unknown (weird)";
+ }
+
+ printk("\n USB_SB_Desc at 0x%08lx\n", (unsigned long)sb);
+ printk(" command : 0x%04x\n", sb->command);
+ printk(" rem : %d\n", (sb->command & 0x3f00) >> 8);
+ printk(" full : %d\n", (sb->command & 0x40) >> 6);
+ printk(" tt : %d (%s)\n", tt, tt_string);
+ printk(" intr : %d\n", (sb->command & 0x8) >> 3);
+ printk(" eot : %d\n", (sb->command & 0x2) >> 1);
+ printk(" eol : %d\n", sb->command & 0x1);
+ printk(" sw_len : 0x%04x (%d)\n", sb->sw_len, sb->sw_len);
+ printk(" next : 0x%08lx\n", sb->next);
+ printk(" buf : 0x%08lx\n\n", sb->buf);
+}
+
+
+static void __dump_ep_desc(volatile USB_EP_Desc_t *ep)
+{
+ printk("\nUSB_EP_Desc at 0x%08lx\n", (unsigned long)ep);
+ printk(" command : 0x%04x\n", ep->command);
+ printk(" ep_id : %d\n", (ep->command & 0x1f00) >> 8);
+ printk(" enable : %d\n", (ep->command & 0x10) >> 4);
+ printk(" intr : %d\n", (ep->command & 0x8) >> 3);
+ printk(" eof : %d\n", (ep->command & 0x2) >> 1);
+ printk(" eol : %d\n", ep->command & 0x1);
+ printk(" hw_len : 0x%04x (%d)\n", ep->hw_len, ep->hw_len);
+ printk(" next : 0x%08lx\n", ep->next);
+ printk(" sub : 0x%08lx\n\n", ep->sub);
+}
+
+static inline void __dump_ep_list(int pipe_type)
+{
+ volatile USB_EP_Desc_t *ep;
+ volatile USB_EP_Desc_t *first_ep;
+ volatile USB_SB_Desc_t *sb;
+
+ switch (pipe_type)
+ {
+ case PIPE_BULK:
+ first_ep = &TxBulkEPList[0];
+ break;
+ case PIPE_CONTROL:
+ first_ep = &TxCtrlEPList[0];
+ break;
+ case PIPE_INTERRUPT:
+ first_ep = &TxIntrEPList[0];
+ break;
+ case PIPE_ISOCHRONOUS:
+ first_ep = &TxIsocEPList[0];
+ break;
+ default:
+ warn("Cannot dump unknown traffic type");
+ return;
+ }
+ ep = first_ep;
+
+ printk("\n\nDumping EP list...\n\n");
+
+ do {
+ __dump_ep_desc(ep);
+ /* Cannot phys_to_virt on 0 as it turns into 80000000, which is != 0. */
+ sb = ep->sub ? phys_to_virt(ep->sub) : 0;
+ while (sb) {
+ __dump_sb_desc(sb);
+ sb = sb->next ? phys_to_virt(sb->next) : 0;
+ }
+ ep = (volatile USB_EP_Desc_t *)(phys_to_virt(ep->next));
+
+ } while (ep != first_ep);
+}
+
+static inline void __dump_ept_data(int epid)
+{
+ unsigned long flags;
+ __u32 r_usb_ept_data;
+
+ if (epid < 0 || epid > 31) {
+ printk("Cannot dump ept data for invalid epid %d\n", epid);
+ return;
+ }
+
+ save_flags(flags);
+ cli();
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+ r_usb_ept_data = *R_USB_EPT_DATA;
+ restore_flags(flags);
+
+ printk("\nR_USB_EPT_DATA = 0x%x for epid %d :\n", r_usb_ept_data, epid);
+ if (r_usb_ept_data == 0) {
+ /* No need for more detailed printing. */
+ return;
+ }
+ printk(" valid : %d\n", (r_usb_ept_data & 0x80000000) >> 31);
+ printk(" hold : %d\n", (r_usb_ept_data & 0x40000000) >> 30);
+ printk(" error_count_in : %d\n", (r_usb_ept_data & 0x30000000) >> 28);
+ printk(" t_in : %d\n", (r_usb_ept_data & 0x08000000) >> 27);
+ printk(" low_speed : %d\n", (r_usb_ept_data & 0x04000000) >> 26);
+ printk(" port : %d\n", (r_usb_ept_data & 0x03000000) >> 24);
+ printk(" error_code : %d\n", (r_usb_ept_data & 0x00c00000) >> 22);
+ printk(" t_out : %d\n", (r_usb_ept_data & 0x00200000) >> 21);
+ printk(" error_count_out : %d\n", (r_usb_ept_data & 0x00180000) >> 19);
+ printk(" max_len : %d\n", (r_usb_ept_data & 0x0003f800) >> 11);
+ printk(" ep : %d\n", (r_usb_ept_data & 0x00000780) >> 7);
+ printk(" dev : %d\n", (r_usb_ept_data & 0x0000003f));
+}
+
+static inline void __dump_ept_data_list(void)
+{
+ int i;
+
+ printk("Dumping the whole R_USB_EPT_DATA list\n");
+
+ for (i = 0; i < 32; i++) {
+ __dump_ept_data(i);
+ }
+}
+#ifdef USB_DEBUG_DESC
+#define dump_in_desc(...) __dump_in_desc(...)
+#define dump_sb_desc(...) __dump_sb_desc(...)
+#define dump_ep_desc(...) __dump_ep_desc(...)
+#else
+#define dump_in_desc(...) do {} while (0)
+#define dump_sb_desc(...) do {} while (0)
+#define dump_ep_desc(...) do {} while (0)
+#endif
+
+#ifdef USB_DEBUG_URB
+#define dump_urb(x) __dump_urb(x)
+#else
+#define dump_urb(x) do {} while (0)
+#endif
+
+static void init_rx_buffers(void)
+{
+ int i;
+
+ DBFENTER;
+
+ for (i = 0; i < (NBR_OF_RX_DESC - 1); i++) {
+ RxDescList[i].sw_len = RX_DESC_BUF_SIZE;
+ RxDescList[i].command = 0;
+ RxDescList[i].next = virt_to_phys(&RxDescList[i + 1]);
+ RxDescList[i].buf = virt_to_phys(RxBuf + (i * RX_DESC_BUF_SIZE));
+ RxDescList[i].hw_len = 0;
+ RxDescList[i].status = 0;
+
+ /* DMA IN cache bug. (struct etrax_dma_descr has the same layout as USB_IN_Desc
+ for the relevant fields.) */
+ prepare_rx_descriptor((struct etrax_dma_descr*)&RxDescList[i]);
+
+ }
+
+ RxDescList[i].sw_len = RX_DESC_BUF_SIZE;
+ RxDescList[i].command = IO_STATE(USB_IN_command, eol, yes);
+ RxDescList[i].next = virt_to_phys(&RxDescList[0]);
+ RxDescList[i].buf = virt_to_phys(RxBuf + (i * RX_DESC_BUF_SIZE));
+ RxDescList[i].hw_len = 0;
+ RxDescList[i].status = 0;
+
+ myNextRxDesc = &RxDescList[0];
+ myLastRxDesc = &RxDescList[NBR_OF_RX_DESC - 1];
+ myPrevRxDesc = &RxDescList[NBR_OF_RX_DESC - 1];
+
+ *R_DMA_CH9_FIRST = virt_to_phys(myNextRxDesc);
+ *R_DMA_CH9_CMD = IO_STATE(R_DMA_CH9_CMD, cmd, start);
+
+ DBFEXIT;
+}
+
+static void init_tx_bulk_ep(void)
+{
+ int i;
+
+ DBFENTER;
+
+ for (i = 0; i < (NBR_OF_EPIDS - 1); i++) {
+ CHECK_ALIGN(&TxBulkEPList[i]);
+ TxBulkEPList[i].hw_len = 0;
+ TxBulkEPList[i].command = IO_FIELD(USB_EP_command, epid, i);
+ TxBulkEPList[i].sub = 0;
+ TxBulkEPList[i].next = virt_to_phys(&TxBulkEPList[i + 1]);
+
+ /* Initiate two EPs, disabled and with the eol flag set. No need for any
+ preserved epid. */
+
+ /* The first one has the intr flag set so we get an interrupt when the DMA
+ channel is about to become disabled. */
+ CHECK_ALIGN(&TxBulkDummyEPList[i][0]);
+ TxBulkDummyEPList[i][0].hw_len = 0;
+ TxBulkDummyEPList[i][0].command = (IO_FIELD(USB_EP_command, epid, DUMMY_EPID) |
+ IO_STATE(USB_EP_command, eol, yes) |
+ IO_STATE(USB_EP_command, intr, yes));
+ TxBulkDummyEPList[i][0].sub = 0;
+ TxBulkDummyEPList[i][0].next = virt_to_phys(&TxBulkDummyEPList[i][1]);
+
+ /* The second one. */
+ CHECK_ALIGN(&TxBulkDummyEPList[i][1]);
+ TxBulkDummyEPList[i][1].hw_len = 0;
+ TxBulkDummyEPList[i][1].command = (IO_FIELD(USB_EP_command, epid, DUMMY_EPID) |
+ IO_STATE(USB_EP_command, eol, yes));
+ TxBulkDummyEPList[i][1].sub = 0;
+ /* The last dummy's next pointer is the same as the current EP's next pointer. */
+ TxBulkDummyEPList[i][1].next = virt_to_phys(&TxBulkEPList[i + 1]);
+ }
+
+ /* Configure the last one. */
+ CHECK_ALIGN(&TxBulkEPList[i]);
+ TxBulkEPList[i].hw_len = 0;
+ TxBulkEPList[i].command = (IO_STATE(USB_EP_command, eol, yes) |
+ IO_FIELD(USB_EP_command, epid, i));
+ TxBulkEPList[i].sub = 0;
+ TxBulkEPList[i].next = virt_to_phys(&TxBulkEPList[0]);
+
+ /* No need configuring dummy EPs for the last one as it will never be used for
+ bulk traffic (i == INVALD_EPID at this point). */
+
+ /* Set up to start on the last EP so we will enable it when inserting traffic
+ for the first time (imitating the situation where the DMA has stopped
+ because there was no more traffic). */
+ *R_DMA_CH8_SUB0_EP = virt_to_phys(&TxBulkEPList[i]);
+ /* No point in starting the bulk channel yet.
+ *R_DMA_CH8_SUB0_CMD = IO_STATE(R_DMA_CH8_SUB0_CMD, cmd, start); */
+ DBFEXIT;
+}
+
+static void init_tx_ctrl_ep(void)
+{
+ int i;
+
+ DBFENTER;
+
+ for (i = 0; i < (NBR_OF_EPIDS - 1); i++) {
+ CHECK_ALIGN(&TxCtrlEPList[i]);
+ TxCtrlEPList[i].hw_len = 0;
+ TxCtrlEPList[i].command = IO_FIELD(USB_EP_command, epid, i);
+ TxCtrlEPList[i].sub = 0;
+ TxCtrlEPList[i].next = virt_to_phys(&TxCtrlEPList[i + 1]);
+ }
+
+ CHECK_ALIGN(&TxCtrlEPList[i]);
+ TxCtrlEPList[i].hw_len = 0;
+ TxCtrlEPList[i].command = (IO_STATE(USB_EP_command, eol, yes) |
+ IO_FIELD(USB_EP_command, epid, i));
+
+ TxCtrlEPList[i].sub = 0;
+ TxCtrlEPList[i].next = virt_to_phys(&TxCtrlEPList[0]);
+
+ *R_DMA_CH8_SUB1_EP = virt_to_phys(&TxCtrlEPList[0]);
+ *R_DMA_CH8_SUB1_CMD = IO_STATE(R_DMA_CH8_SUB1_CMD, cmd, start);
+
+ DBFEXIT;
+}
+
+
+static void init_tx_intr_ep(void)
+{
+ int i;
+
+ DBFENTER;
+
+ /* Read comment at zout_buffer declaration for an explanation to this. */
+ TxIntrSB_zout.sw_len = 1;
+ TxIntrSB_zout.next = 0;
+ TxIntrSB_zout.buf = virt_to_phys(&zout_buffer[0]);
+ TxIntrSB_zout.command = (IO_FIELD(USB_SB_command, rem, 0) |
+ IO_STATE(USB_SB_command, tt, zout) |
+ IO_STATE(USB_SB_command, full, yes) |
+ IO_STATE(USB_SB_command, eot, yes) |
+ IO_STATE(USB_SB_command, eol, yes));
+
+ for (i = 0; i < (MAX_INTR_INTERVAL - 1); i++) {
+ CHECK_ALIGN(&TxIntrEPList[i]);
+ TxIntrEPList[i].hw_len = 0;
+ TxIntrEPList[i].command =
+ (IO_STATE(USB_EP_command, eof, yes) |
+ IO_STATE(USB_EP_command, enable, yes) |
+ IO_FIELD(USB_EP_command, epid, INVALID_EPID));
+ TxIntrEPList[i].sub = virt_to_phys(&TxIntrSB_zout);
+ TxIntrEPList[i].next = virt_to_phys(&TxIntrEPList[i + 1]);
+ }
+
+ CHECK_ALIGN(&TxIntrEPList[i]);
+ TxIntrEPList[i].hw_len = 0;
+ TxIntrEPList[i].command =
+ (IO_STATE(USB_EP_command, eof, yes) |
+ IO_STATE(USB_EP_command, eol, yes) |
+ IO_STATE(USB_EP_command, enable, yes) |
+ IO_FIELD(USB_EP_command, epid, INVALID_EPID));
+ TxIntrEPList[i].sub = virt_to_phys(&TxIntrSB_zout);
+ TxIntrEPList[i].next = virt_to_phys(&TxIntrEPList[0]);
+
+ *R_DMA_CH8_SUB2_EP = virt_to_phys(&TxIntrEPList[0]);
+ *R_DMA_CH8_SUB2_CMD = IO_STATE(R_DMA_CH8_SUB2_CMD, cmd, start);
+ DBFEXIT;
+}
+
+static void init_tx_isoc_ep(void)
+{
+ int i;
+
+ DBFENTER;
+
+ /* Read comment at zout_buffer declaration for an explanation to this. */
+ TxIsocSB_zout.sw_len = 1;
+ TxIsocSB_zout.next = 0;
+ TxIsocSB_zout.buf = virt_to_phys(&zout_buffer[0]);
+ TxIsocSB_zout.command = (IO_FIELD(USB_SB_command, rem, 0) |
+ IO_STATE(USB_SB_command, tt, zout) |
+ IO_STATE(USB_SB_command, full, yes) |
+ IO_STATE(USB_SB_command, eot, yes) |
+ IO_STATE(USB_SB_command, eol, yes));
+
+ /* The last isochronous EP descriptor is a dummy. */
+
+ for (i = 0; i < (NBR_OF_EPIDS - 1); i++) {
+ CHECK_ALIGN(&TxIsocEPList[i]);
+ TxIsocEPList[i].hw_len = 0;
+ TxIsocEPList[i].command = IO_FIELD(USB_EP_command, epid, i);
+ TxIsocEPList[i].sub = 0;
+ TxIsocEPList[i].next = virt_to_phys(&TxIsocEPList[i + 1]);
+ }
+
+ CHECK_ALIGN(&TxIsocEPList[i]);
+ TxIsocEPList[i].hw_len = 0;
+
+ /* Must enable the last EP descr to get eof interrupt. */
+ TxIsocEPList[i].command = (IO_STATE(USB_EP_command, enable, yes) |
+ IO_STATE(USB_EP_command, eof, yes) |
+ IO_STATE(USB_EP_command, eol, yes) |
+ IO_FIELD(USB_EP_command, epid, INVALID_EPID));
+ TxIsocEPList[i].sub = virt_to_phys(&TxIsocSB_zout);
+ TxIsocEPList[i].next = virt_to_phys(&TxIsocEPList[0]);
+
+ *R_DMA_CH8_SUB3_EP = virt_to_phys(&TxIsocEPList[0]);
+ *R_DMA_CH8_SUB3_CMD = IO_STATE(R_DMA_CH8_SUB3_CMD, cmd, start);
+
+ DBFEXIT;
+}
+
+static void etrax_usb_unlink_intr_urb(struct urb *urb)
+{
+ volatile USB_EP_Desc_t *first_ep; /* First EP in the list. */
+ volatile USB_EP_Desc_t *curr_ep; /* Current EP, the iterator. */
+ volatile USB_EP_Desc_t *next_ep; /* The EP after current. */
+ volatile USB_EP_Desc_t *unlink_ep; /* The one we should remove from the list. */
+
+ int epid;
+
+ /* Read 8.8.4 in Designer's Reference, "Removing an EP Descriptor from the List". */
+
+ DBFENTER;
+
+ epid = ((etrax_urb_priv_t *)urb->hcpriv)->epid;
+
+ first_ep = &TxIntrEPList[0];
+ curr_ep = first_ep;
+
+
+ /* Note that this loop removes all EP descriptors with this epid. This assumes
+ that all EP descriptors belong to the one and only urb for this epid. */
+
+ do {
+ next_ep = (USB_EP_Desc_t *)phys_to_virt(curr_ep->next);
+
+ if (IO_EXTRACT(USB_EP_command, epid, next_ep->command) == epid) {
+
+ dbg_intr("Found EP to unlink for epid %d", epid);
+
+ /* This is the one we should unlink. */
+ unlink_ep = next_ep;
+
+ /* Actually unlink the EP from the DMA list. */
+ curr_ep->next = unlink_ep->next;
+
+ /* Wait until the DMA is no longer at this descriptor. */
+ while (*R_DMA_CH8_SUB2_EP == virt_to_phys(unlink_ep));
+
+ /* Now we are free to remove it and its SB descriptor.
+ Note that it is assumed here that there is only one sb in the
+ sb list for this ep. */
+ kmem_cache_free(usb_desc_cache, phys_to_virt(unlink_ep->sub));
+ kmem_cache_free(usb_desc_cache, (USB_EP_Desc_t *)unlink_ep);
+ }
+
+ curr_ep = phys_to_virt(curr_ep->next);
+
+ } while (curr_ep != first_ep);
+ urb->hcpriv = NULL;
+}
+
+void etrax_usb_do_intr_recover(int epid)
+{
+ USB_EP_Desc_t *first_ep, *tmp_ep;
+
+ DBFENTER;
+
+ first_ep = (USB_EP_Desc_t *)phys_to_virt(*R_DMA_CH8_SUB2_EP);
+ tmp_ep = first_ep;
+
+ /* What this does is simply to walk the list of interrupt
+ ep descriptors and enable those that are disabled. */
+
+ do {
+ if (IO_EXTRACT(USB_EP_command, epid, tmp_ep->command) == epid &&
+ !(tmp_ep->command & IO_MASK(USB_EP_command, enable))) {
+ tmp_ep->command |= IO_STATE(USB_EP_command, enable, yes);
+ }
+
+ tmp_ep = (USB_EP_Desc_t *)phys_to_virt(tmp_ep->next);
+
+ } while (tmp_ep != first_ep);
+
+
+ DBFEXIT;
+}
+
+static int etrax_rh_unlink_urb (struct urb *urb)
+{
+ etrax_hc_t *hc;
+
+ DBFENTER;
+
+ hc = urb->dev->bus->hcpriv;
+
+ if (hc->rh.urb == urb) {
+ hc->rh.send = 0;
+ del_timer(&hc->rh.rh_int_timer);
+ }
+
+ DBFEXIT;
+ return 0;
+}
+
+static void etrax_rh_send_irq(struct urb *urb)
+{
+ __u16 data = 0;
+ etrax_hc_t *hc = urb->dev->bus->hcpriv;
+ DBFENTER;
+
+/*
+ dbg_rh("R_USB_FM_NUMBER : 0x%08X", *R_USB_FM_NUMBER);
+ dbg_rh("R_USB_FM_REMAINING: 0x%08X", *R_USB_FM_REMAINING);
+*/
+
+ data |= (hc->rh.wPortChange_1) ? (1 << 1) : 0;
+ data |= (hc->rh.wPortChange_2) ? (1 << 2) : 0;
+
+ *((__u16 *)urb->transfer_buffer) = cpu_to_le16(data);
+ /* FIXME: Why is actual_length set to 1 when data is 2 bytes?
+ Since only 1 byte is used, why not declare data as __u8? */
+ urb->actual_length = 1;
+ urb->status = 0;
+
+ if (hc->rh.send && urb->complete) {
+ dbg_rh("wPortChange_1: 0x%04X", hc->rh.wPortChange_1);
+ dbg_rh("wPortChange_2: 0x%04X", hc->rh.wPortChange_2);
+
+ urb->complete(urb, NULL);
+ }
+
+ DBFEXIT;
+}
+
+static void etrax_rh_init_int_timer(struct urb *urb)
+{
+ etrax_hc_t *hc;
+
+ DBFENTER;
+
+ hc = urb->dev->bus->hcpriv;
+ hc->rh.interval = urb->interval;
+ init_timer(&hc->rh.rh_int_timer);
+ hc->rh.rh_int_timer.function = etrax_rh_int_timer_do;
+ hc->rh.rh_int_timer.data = (unsigned long)urb;
+ /* FIXME: Is the jiffies resolution enough? All intervals < 10 ms will be mapped
+ to 0, and the rest to the nearest lower 10 ms. */
+ hc->rh.rh_int_timer.expires = jiffies + ((HZ * hc->rh.interval) / 1000);
+ add_timer(&hc->rh.rh_int_timer);
+
+ DBFEXIT;
+}
+
+static void etrax_rh_int_timer_do(unsigned long ptr)
+{
+ struct urb *urb;
+ etrax_hc_t *hc;
+
+ DBFENTER;
+
+ urb = (struct urb*)ptr;
+ hc = urb->dev->bus->hcpriv;
+
+ if (hc->rh.send) {
+ etrax_rh_send_irq(urb);
+ }
+
+ DBFEXIT;
+}
+
+static int etrax_usb_setup_epid(struct urb *urb)
+{
+ int epid;
+ char devnum, endpoint, out_traffic, slow;
+ int maxlen;
+ unsigned long flags;
+
+ DBFENTER;
+
+ epid = etrax_usb_lookup_epid(urb);
+ if ((epid != -1)){
+ /* An epid that fits this urb has been found. */
+ DBFEXIT;
+ return epid;
+ }
+
+ /* We must find and initiate a new epid for this urb. */
+ epid = etrax_usb_allocate_epid();
+
+ if (epid == -1) {
+ /* Failed to allocate a new epid. */
+ DBFEXIT;
+ return epid;
+ }
+
+ /* We now have a new epid to use. Initiate it. */
+ set_bit(epid, (void *)&epid_usage_bitmask);
+
+ devnum = usb_pipedevice(urb->pipe);
+ endpoint = usb_pipeendpoint(urb->pipe);
+ slow = usb_pipeslow(urb->pipe);
+ maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
+ if (usb_pipetype(urb->pipe) == PIPE_CONTROL) {
+ /* We want both IN and OUT control traffic to be put on the same EP/SB list. */
+ out_traffic = 1;
+ } else {
+ out_traffic = usb_pipeout(urb->pipe);
+ }
+
+ save_flags(flags);
+ cli();
+
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+
+ if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+ *R_USB_EPT_DATA_ISO = IO_STATE(R_USB_EPT_DATA_ISO, valid, yes) |
+ /* FIXME: Change any to the actual port? */
+ IO_STATE(R_USB_EPT_DATA_ISO, port, any) |
+ IO_FIELD(R_USB_EPT_DATA_ISO, max_len, maxlen) |
+ IO_FIELD(R_USB_EPT_DATA_ISO, ep, endpoint) |
+ IO_FIELD(R_USB_EPT_DATA_ISO, dev, devnum);
+ } else {
+ *R_USB_EPT_DATA = IO_STATE(R_USB_EPT_DATA, valid, yes) |
+ IO_FIELD(R_USB_EPT_DATA, low_speed, slow) |
+ /* FIXME: Change any to the actual port? */
+ IO_STATE(R_USB_EPT_DATA, port, any) |
+ IO_FIELD(R_USB_EPT_DATA, max_len, maxlen) |
+ IO_FIELD(R_USB_EPT_DATA, ep, endpoint) |
+ IO_FIELD(R_USB_EPT_DATA, dev, devnum);
+ }
+
+ restore_flags(flags);
+
+ if (out_traffic) {
+ set_bit(epid, (void *)&epid_out_traffic);
+ } else {
+ clear_bit(epid, (void *)&epid_out_traffic);
+ }
+
+ dbg_epid("Setting up epid %d with devnum %d, endpoint %d and max_len %d (%s)",
+ epid, devnum, endpoint, maxlen, out_traffic ? "OUT" : "IN");
+
+ DBFEXIT;
+ return epid;
+}
+
+static void etrax_usb_free_epid(int epid)
+{
+ unsigned long flags;
+
+ DBFENTER;
+
+ if (!test_bit(epid, (void *)&epid_usage_bitmask)) {
+ warn("Trying to free unused epid %d", epid);
+ DBFEXIT;
+ return;
+ }
+
+ save_flags(flags);
+ cli();
+
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+ while (*R_USB_EPT_DATA & IO_MASK(R_USB_EPT_DATA, hold));
+ /* This will, among other things, set the valid field to 0. */
+ *R_USB_EPT_DATA = 0;
+ restore_flags(flags);
+
+ clear_bit(epid, (void *)&epid_usage_bitmask);
+
+
+ dbg_epid("Freed epid %d", epid);
+
+ DBFEXIT;
+}
+
+static int etrax_usb_lookup_epid(struct urb *urb)
+{
+ int i;
+ __u32 data;
+ char devnum, endpoint, slow, out_traffic;
+ int maxlen;
+ unsigned long flags;
+
+ DBFENTER;
+
+ devnum = usb_pipedevice(urb->pipe);
+ endpoint = usb_pipeendpoint(urb->pipe);
+ slow = usb_pipeslow(urb->pipe);
+ maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
+ if (usb_pipetype(urb->pipe) == PIPE_CONTROL) {
+ /* We want both IN and OUT control traffic to be put on the same EP/SB list. */
+ out_traffic = 1;
+ } else {
+ out_traffic = usb_pipeout(urb->pipe);
+ }
+
+ /* Step through att epids. */
+ for (i = 0; i < NBR_OF_EPIDS; i++) {
+ if (test_bit(i, (void *)&epid_usage_bitmask) &&
+ test_bit(i, (void *)&epid_out_traffic) == out_traffic) {
+
+ save_flags(flags);
+ cli();
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, i);
+ nop();
+
+ if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+ data = *R_USB_EPT_DATA_ISO;
+ restore_flags(flags);
+
+ if ((IO_MASK(R_USB_EPT_DATA_ISO, valid) & data) &&
+ (IO_EXTRACT(R_USB_EPT_DATA_ISO, dev, data) == devnum) &&
+ (IO_EXTRACT(R_USB_EPT_DATA_ISO, ep, data) == endpoint) &&
+ (IO_EXTRACT(R_USB_EPT_DATA_ISO, max_len, data) == maxlen)) {
+ dbg_epid("Found epid %d for devnum %d, endpoint %d (%s)",
+ i, devnum, endpoint, out_traffic ? "OUT" : "IN");
+ DBFEXIT;
+ return i;
+ }
+ } else {
+ data = *R_USB_EPT_DATA;
+ restore_flags(flags);
+
+ if ((IO_MASK(R_USB_EPT_DATA, valid) & data) &&
+ (IO_EXTRACT(R_USB_EPT_DATA, dev, data) == devnum) &&
+ (IO_EXTRACT(R_USB_EPT_DATA, ep, data) == endpoint) &&
+ (IO_EXTRACT(R_USB_EPT_DATA, low_speed, data) == slow) &&
+ (IO_EXTRACT(R_USB_EPT_DATA, max_len, data) == maxlen)) {
+ dbg_epid("Found epid %d for devnum %d, endpoint %d (%s)",
+ i, devnum, endpoint, out_traffic ? "OUT" : "IN");
+ DBFEXIT;
+ return i;
+ }
+ }
+ }
+ }
+
+ DBFEXIT;
+ return -1;
+}
+
+static int etrax_usb_allocate_epid(void)
+{
+ int i;
+
+ DBFENTER;
+
+ for (i = 0; i < NBR_OF_EPIDS; i++) {
+ if (!test_bit(i, (void *)&epid_usage_bitmask)) {
+ dbg_epid("Found free epid %d", i);
+ DBFEXIT;
+ return i;
+ }
+ }
+
+ dbg_epid("Found no free epids");
+ DBFEXIT;
+ return -1;
+}
+
+static int etrax_usb_submit_urb(struct urb *urb, int mem_flags)
+{
+ etrax_hc_t *hc;
+ int ret = -EINVAL;
+
+ DBFENTER;
+
+ if (!urb->dev || !urb->dev->bus) {
+ return -ENODEV;
+ }
+ if (usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)) <= 0) {
+ info("Submit urb to pipe with maxpacketlen 0, pipe 0x%X\n", urb->pipe);
+ return -EMSGSIZE;
+ }
+
+ if (urb->timeout) {
+ /* FIXME. */
+ warn("urb->timeout specified, ignoring.");
+ }
+
+ hc = (etrax_hc_t*)urb->dev->bus->hcpriv;
+
+ if (usb_pipedevice(urb->pipe) == hc->rh.devnum) {
+ /* This request is for the Virtual Root Hub. */
+ ret = etrax_rh_submit_urb(urb);
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_BULK) {
+
+ ret = etrax_usb_submit_bulk_urb(urb);
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_CONTROL) {
+
+ ret = etrax_usb_submit_ctrl_urb(urb);
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_INTERRUPT) {
+ int bustime;
+
+ if (urb->bandwidth == 0) {
+ bustime = usb_check_bandwidth(urb->dev, urb);
+ if (bustime < 0) {
+ ret = bustime;
+ } else {
+ ret = etrax_usb_submit_intr_urb(urb);
+ if (ret == 0)
+ usb_claim_bandwidth(urb->dev, urb, bustime, 0);
+ }
+ } else {
+ /* Bandwidth already set. */
+ ret = etrax_usb_submit_intr_urb(urb);
+ }
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+ int bustime;
+
+ if (urb->bandwidth == 0) {
+ bustime = usb_check_bandwidth(urb->dev, urb);
+ if (bustime < 0) {
+ ret = bustime;
+ } else {
+ ret = etrax_usb_submit_isoc_urb(urb);
+ if (ret == 0)
+ usb_claim_bandwidth(urb->dev, urb, bustime, 0);
+ }
+ } else {
+ /* Bandwidth already set. */
+ ret = etrax_usb_submit_isoc_urb(urb);
+ }
+ }
+
+ DBFEXIT;
+
+ if (ret != 0)
+ printk("Submit URB error %d\n", ret);
+
+ return ret;
+}
+
+static int etrax_usb_unlink_urb(struct urb *urb, int status)
+{
+ etrax_hc_t *hc;
+ etrax_urb_priv_t *urb_priv;
+ int epid;
+ unsigned int flags;
+
+ DBFENTER;
+
+ if (!urb) {
+ return -EINVAL;
+ }
+
+ /* Disable interrupts here since a descriptor interrupt for the isoc epid
+ will modify the sb list. This could possibly be done more granular, but
+ unlink_urb should not be used frequently anyway.
+ */
+
+ save_flags(flags);
+ cli();
+
+ if (!urb->dev || !urb->dev->bus) {
+ restore_flags(flags);
+ return -ENODEV;
+ }
+ if (!urb->hcpriv) {
+ /* This happens if a device driver calls unlink on an urb that
+ was never submitted (lazy driver) or if the urb was completed
+ while unlink was being called. */
+ restore_flags(flags);
+ return 0;
+ }
+ if (urb->transfer_flags & URB_ASYNC_UNLINK) {
+ /* FIXME. */
+ /* If URB_ASYNC_UNLINK is set:
+ unlink
+ move to a separate urb list
+ call complete at next sof with ECONNRESET
+
+ If not:
+ wait 1 ms
+ unlink
+ call complete with ENOENT
+ */
+ warn("URB_ASYNC_UNLINK set, ignoring.");
+ }
+
+ /* One might think that urb->status = -EINPROGRESS would be a requirement for unlinking,
+ but that doesn't work for interrupt and isochronous traffic since they are completed
+ repeatedly, and urb->status is set then. That may in itself be a bug though. */
+
+ hc = urb->dev->bus->hcpriv;
+ urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ epid = urb_priv->epid;
+
+ /* Set the urb status (synchronous unlink). */
+ urb->status = -ENOENT;
+ urb_priv->urb_state = UNLINK;
+
+ if (usb_pipedevice(urb->pipe) == hc->rh.devnum) {
+ int ret;
+ ret = etrax_rh_unlink_urb(urb);
+ DBFEXIT;
+ restore_flags(flags);
+ return ret;
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_BULK) {
+
+ dbg_bulk("Unlink of bulk urb (0x%lx)", (unsigned long)urb);
+
+ if (TxBulkEPList[epid].command & IO_MASK(USB_EP_command, enable)) {
+ /* The EP was enabled, disable it and wait. */
+ TxBulkEPList[epid].command &= ~IO_MASK(USB_EP_command, enable);
+
+ /* Ah, the luxury of busy-wait. */
+ while (*R_DMA_CH8_SUB0_EP == virt_to_phys(&TxBulkEPList[epid]));
+ }
+ /* Kicking dummy list out of the party. */
+ TxBulkEPList[epid].next = virt_to_phys(&TxBulkEPList[(epid + 1) % NBR_OF_EPIDS]);
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_CONTROL) {
+
+ dbg_ctrl("Unlink of ctrl urb (0x%lx)", (unsigned long)urb);
+
+ if (TxCtrlEPList[epid].command & IO_MASK(USB_EP_command, enable)) {
+ /* The EP was enabled, disable it and wait. */
+ TxCtrlEPList[epid].command &= ~IO_MASK(USB_EP_command, enable);
+
+ /* Ah, the luxury of busy-wait. */
+ while (*R_DMA_CH8_SUB1_EP == virt_to_phys(&TxCtrlEPList[epid]));
+ }
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_INTERRUPT) {
+
+ dbg_intr("Unlink of intr urb (0x%lx)", (unsigned long)urb);
+
+ /* Separate function because it's a tad more complicated. */
+ etrax_usb_unlink_intr_urb(urb);
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+
+ dbg_isoc("Unlink of isoc urb (0x%lx)", (unsigned long)urb);
+
+ if (TxIsocEPList[epid].command & IO_MASK(USB_EP_command, enable)) {
+ /* The EP was enabled, disable it and wait. */
+ TxIsocEPList[epid].command &= ~IO_MASK(USB_EP_command, enable);
+
+ /* Ah, the luxury of busy-wait. */
+ while (*R_DMA_CH8_SUB3_EP == virt_to_phys(&TxIsocEPList[epid]));
+ }
+ }
+
+ /* Note that we need to remove the urb from the urb list *before* removing its SB
+ descriptors. (This means that the isoc eof handler might get a null urb when we
+ are unlinking the last urb.) */
+
+ if (usb_pipetype(urb->pipe) == PIPE_BULK) {
+
+ urb_list_del(urb, epid);
+ TxBulkEPList[epid].sub = 0;
+ etrax_remove_from_sb_list(urb);
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_CONTROL) {
+
+ urb_list_del(urb, epid);
+ TxCtrlEPList[epid].sub = 0;
+ etrax_remove_from_sb_list(urb);
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_INTERRUPT) {
+
+ urb_list_del(urb, epid);
+ /* Sanity check (should never happen). */
+ assert(urb_list_empty(epid));
+
+ /* Release allocated bandwidth. */
+ usb_release_bandwidth(urb->dev, urb, 0);
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+
+ if (usb_pipeout(urb->pipe)) {
+
+ USB_SB_Desc_t *iter_sb, *prev_sb, *next_sb;
+
+ if (__urb_list_entry(urb, epid)) {
+
+ urb_list_del(urb, epid);
+ iter_sb = TxIsocEPList[epid].sub ? phys_to_virt(TxIsocEPList[epid].sub) : 0;
+ prev_sb = 0;
+ while (iter_sb && (iter_sb != urb_priv->first_sb)) {
+ prev_sb = iter_sb;
+ iter_sb = iter_sb->next ? phys_to_virt(iter_sb->next) : 0;
+ }
+
+ if (iter_sb == 0) {
+ /* Unlink of the URB currently being transmitted. */
+ prev_sb = 0;
+ iter_sb = TxIsocEPList[epid].sub ? phys_to_virt(TxIsocEPList[epid].sub) : 0;
+ }
+
+ while (iter_sb && (iter_sb != urb_priv->last_sb)) {
+ iter_sb = iter_sb->next ? phys_to_virt(iter_sb->next) : 0;
+ }
+ if (iter_sb) {
+ next_sb = iter_sb->next ? phys_to_virt(iter_sb->next) : 0;
+ } else {
+ /* This should only happen if the DMA has completed
+ processing the SB list for this EP while interrupts
+ are disabled. */
+ dbg_isoc("Isoc urb not found, already sent?");
+ next_sb = 0;
+ }
+ if (prev_sb) {
+ prev_sb->next = next_sb ? virt_to_phys(next_sb) : 0;
+ } else {
+ TxIsocEPList[epid].sub = next_sb ? virt_to_phys(next_sb) : 0;
+ }
+
+ etrax_remove_from_sb_list(urb);
+ if (urb_list_empty(epid)) {
+ TxIsocEPList[epid].sub = 0;
+ dbg_isoc("Last isoc out urb epid %d", epid);
+ } else if (next_sb || prev_sb) {
+ dbg_isoc("Re-enable isoc out epid %d", epid);
+
+ TxIsocEPList[epid].hw_len = 0;
+ TxIsocEPList[epid].command |= IO_STATE(USB_EP_command, enable, yes);
+ } else {
+ TxIsocEPList[epid].sub = 0;
+ dbg_isoc("URB list non-empty and no SB list, EP disabled");
+ }
+ } else {
+ dbg_isoc("Urb 0x%p not found, completed already?", urb);
+ }
+ } else {
+
+ urb_list_del(urb, epid);
+
+ /* For in traffic there is only one SB descriptor for each EP even
+ though there may be several urbs (all urbs point at the same SB). */
+ if (urb_list_empty(epid)) {
+ /* No more urbs, remove the SB. */
+ TxIsocEPList[epid].sub = 0;
+ etrax_remove_from_sb_list(urb);
+ } else {
+ TxIsocEPList[epid].hw_len = 0;
+ TxIsocEPList[epid].command |= IO_STATE(USB_EP_command, enable, yes);
+ }
+ }
+ /* Release allocated bandwidth. */
+ usb_release_bandwidth(urb->dev, urb, 1);
+ }
+ /* Free the epid if urb list is empty. */
+ if (urb_list_empty(epid)) {
+ etrax_usb_free_epid(epid);
+ }
+ restore_flags(flags);
+
+ /* Must be done before calling completion handler. */
+ kfree(urb_priv);
+ urb->hcpriv = 0;
+
+ if (urb->complete) {
+ urb->complete(urb, NULL);
+ }
+
+ DBFEXIT;
+ return 0;
+}
+
+static int etrax_usb_get_frame_number(struct usb_device *usb_dev)
+{
+ DBFENTER;
+ DBFEXIT;
+ return (*R_USB_FM_NUMBER & 0x7ff);
+}
+
+static irqreturn_t etrax_usb_tx_interrupt(int irq, void *vhc, struct pt_regs *regs)
+{
+ DBFENTER;
+
+ /* This interrupt handler could be used when unlinking EP descriptors. */
+
+ if (*R_IRQ_READ2 & IO_MASK(R_IRQ_READ2, dma8_sub0_descr)) {
+ USB_EP_Desc_t *ep;
+
+ //dbg_bulk("dma8_sub0_descr (BULK) intr.");
+
+ /* It should be safe clearing the interrupt here, since we don't expect to get a new
+ one until we restart the bulk channel. */
+ *R_DMA_CH8_SUB0_CLR_INTR = IO_STATE(R_DMA_CH8_SUB0_CLR_INTR, clr_descr, do);
+
+ /* Wait while the DMA is running (though we don't expect it to be). */
+ while (*R_DMA_CH8_SUB0_CMD & IO_MASK(R_DMA_CH8_SUB0_CMD, cmd));
+
+ /* Advance the DMA to the next EP descriptor. */
+ ep = (USB_EP_Desc_t *)phys_to_virt(*R_DMA_CH8_SUB0_EP);
+
+ //dbg_bulk("descr intr: DMA is at 0x%lx", (unsigned long)ep);
+
+ /* ep->next is already a physical address; no need for a virt_to_phys. */
+ *R_DMA_CH8_SUB0_EP = ep->next;
+
+ /* Start the DMA bulk channel again. */
+ *R_DMA_CH8_SUB0_CMD = IO_STATE(R_DMA_CH8_SUB0_CMD, cmd, start);
+ }
+ if (*R_IRQ_READ2 & IO_MASK(R_IRQ_READ2, dma8_sub1_descr)) {
+ struct urb *urb;
+ int epid;
+ etrax_urb_priv_t *urb_priv;
+ unsigned long int flags;
+
+ dbg_ctrl("dma8_sub1_descr (CTRL) intr.");
+ *R_DMA_CH8_SUB1_CLR_INTR = IO_STATE(R_DMA_CH8_SUB1_CLR_INTR, clr_descr, do);
+
+ /* The complete callback gets called so we cli. */
+ save_flags(flags);
+ cli();
+
+ for (epid = 0; epid < NBR_OF_EPIDS - 1; epid++) {
+ if ((TxCtrlEPList[epid].sub == 0) ||
+ (epid == DUMMY_EPID) ||
+ (epid == INVALID_EPID)) {
+ /* Nothing here to see. */
+ continue;
+ }
+
+ /* Get the first urb (if any). */
+ urb = urb_list_first(epid);
+
+ if (urb) {
+
+ /* Sanity check. */
+ assert(usb_pipetype(urb->pipe) == PIPE_CONTROL);
+
+ urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ assert(urb_priv);
+
+ if (urb_priv->urb_state == WAITING_FOR_DESCR_INTR) {
+ assert(!(TxCtrlEPList[urb_priv->epid].command & IO_MASK(USB_EP_command, enable)));
+
+ etrax_usb_complete_urb(urb, 0);
+ }
+ }
+ }
+ restore_flags(flags);
+ }
+ if (*R_IRQ_READ2 & IO_MASK(R_IRQ_READ2, dma8_sub2_descr)) {
+ dbg_intr("dma8_sub2_descr (INTR) intr.");
+ *R_DMA_CH8_SUB2_CLR_INTR = IO_STATE(R_DMA_CH8_SUB2_CLR_INTR, clr_descr, do);
+ }
+ if (*R_IRQ_READ2 & IO_MASK(R_IRQ_READ2, dma8_sub3_descr)) {
+ struct urb *urb;
+ int epid;
+ int epid_done;
+ etrax_urb_priv_t *urb_priv;
+ USB_SB_Desc_t *sb_desc;
+
+ usb_isoc_complete_data_t *comp_data = NULL;
+
+ /* One or more isoc out transfers are done. */
+ dbg_isoc("dma8_sub3_descr (ISOC) intr.");
+
+ /* For each isoc out EP search for the first sb_desc with the intr flag
+ set. This descriptor must be the last packet from an URB. Then
+ traverse the URB list for the EP until the URB with urb_priv->last_sb
+ matching the intr-marked sb_desc is found. All URBs before this have
+ been sent.
+ */
+
+ for (epid = 0; epid < NBR_OF_EPIDS - 1; epid++) {
+ /* Skip past epids with no SB lists, epids used for in traffic,
+ and special (dummy, invalid) epids. */
+ if ((TxIsocEPList[epid].sub == 0) ||
+ (test_bit(epid, (void *)&epid_out_traffic) == 0) ||
+ (epid == DUMMY_EPID) ||
+ (epid == INVALID_EPID)) {
+ /* Nothing here to see. */
+ continue;
+ }
+ sb_desc = phys_to_virt(TxIsocEPList[epid].sub);
+
+ /* Find the last descriptor of the currently active URB for this ep.
+ This is the first descriptor in the sub list marked for a descriptor
+ interrupt. */
+ while (sb_desc && !IO_EXTRACT(USB_SB_command, intr, sb_desc->command)) {
+ sb_desc = sb_desc->next ? phys_to_virt(sb_desc->next) : 0;
+ }
+ assert(sb_desc);
+
+ dbg_isoc("Check epid %d, sub 0x%p, SB 0x%p",
+ epid,
+ phys_to_virt(TxIsocEPList[epid].sub),
+ sb_desc);
+
+ epid_done = 0;
+
+ /* Get the first urb (if any). */
+ urb = urb_list_first(epid);
+ assert(urb);
+
+ while (urb && !epid_done) {
+
+ /* Sanity check. */
+ assert(usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS);
+
+ if (!usb_pipeout(urb->pipe)) {
+ /* descr interrupts are generated only for out pipes. */
+ epid_done = 1;
+ continue;
+ }
+
+ urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ assert(urb_priv);
+
+ if (sb_desc != urb_priv->last_sb) {
+
+ /* This urb has been sent. */
+ dbg_isoc("out URB 0x%p sent", urb);
+
+ urb_priv->urb_state = TRANSFER_DONE;
+
+ } else if ((sb_desc == urb_priv->last_sb) &&
+ !(TxIsocEPList[epid].command & IO_MASK(USB_EP_command, enable))) {
+
+ assert((sb_desc->command & IO_MASK(USB_SB_command, eol)) == IO_STATE(USB_SB_command, eol, yes));
+ assert(sb_desc->next == 0);
+
+ dbg_isoc("out URB 0x%p last in list, epid disabled", urb);
+ TxIsocEPList[epid].sub = 0;
+ TxIsocEPList[epid].hw_len = 0;
+ urb_priv->urb_state = TRANSFER_DONE;
+
+ epid_done = 1;
+
+ } else {
+ epid_done = 1;
+ }
+ if (!epid_done) {
+ urb = urb_list_next(urb, epid);
+ }
+ }
+
+ }
+
+ *R_DMA_CH8_SUB3_CLR_INTR = IO_STATE(R_DMA_CH8_SUB3_CLR_INTR, clr_descr, do);
+
+ comp_data = (usb_isoc_complete_data_t*)kmem_cache_alloc(isoc_compl_cache, SLAB_ATOMIC);
+ assert(comp_data != NULL);
+
+ INIT_WORK(&comp_data->usb_bh, etrax_usb_isoc_descr_interrupt_bottom_half, comp_data);
+ schedule_work(&comp_data->usb_bh);
+ }
+
+ DBFEXIT;
+ return IRQ_HANDLED;
+}
+
+static void etrax_usb_isoc_descr_interrupt_bottom_half(void *data)
+{
+ usb_isoc_complete_data_t *comp_data = (usb_isoc_complete_data_t*)data;
+
+ struct urb *urb;
+ int epid;
+ int epid_done;
+ etrax_urb_priv_t *urb_priv;
+
+ DBFENTER;
+
+ dbg_isoc("dma8_sub3_descr (ISOC) bottom half.");
+
+ for (epid = 0; epid < NBR_OF_EPIDS - 1; epid++) {
+ unsigned long flags;
+
+ save_flags(flags);
+ cli();
+
+ epid_done = 0;
+
+ /* The descriptor interrupt handler has marked all transmitted isoch. out
+ URBs with TRANSFER_DONE. Now we traverse all epids and for all that
+ have isoch. out traffic traverse its URB list and complete the
+ transmitted URB.
+ */
+
+ while (!epid_done) {
+
+ /* Get the first urb (if any). */
+ urb = urb_list_first(epid);
+ if (urb == 0) {
+ epid_done = 1;
+ continue;
+ }
+
+ if (usb_pipetype(urb->pipe) != PIPE_ISOCHRONOUS) {
+ epid_done = 1;
+ continue;
+ }
+
+ if (!usb_pipeout(urb->pipe)) {
+ /* descr interrupts are generated only for out pipes. */
+ epid_done = 1;
+ continue;
+ }
+
+ dbg_isoc("Check epid %d, SB 0x%p", epid, (char*)TxIsocEPList[epid].sub);
+
+ urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ assert(urb_priv);
+
+ if (urb_priv->urb_state == TRANSFER_DONE) {
+ int i;
+ struct usb_iso_packet_descriptor *packet;
+
+ /* This urb has been sent. */
+ dbg_isoc("Completing isoc out URB 0x%p", urb);
+
+ for (i = 0; i < urb->number_of_packets; i++) {
+ packet = &urb->iso_frame_desc[i];
+ packet->status = 0;
+ packet->actual_length = packet->length;
+ }
+
+ etrax_usb_complete_isoc_urb(urb, 0);
+
+ if (urb_list_empty(epid)) {
+ etrax_usb_free_epid(epid);
+ epid_done = 1;
+ }
+ } else {
+ epid_done = 1;
+ }
+ }
+ restore_flags(flags);
+
+ }
+ kmem_cache_free(isoc_compl_cache, comp_data);
+
+ DBFEXIT;
+}
+
+
+
+static irqreturn_t etrax_usb_rx_interrupt(int irq, void *vhc, struct pt_regs *regs)
+{
+ struct urb *urb;
+ etrax_urb_priv_t *urb_priv;
+ int epid = 0;
+ unsigned long flags;
+
+ /* Isoc diagnostics. */
+ static int curr_fm = 0;
+ static int prev_fm = 0;
+
+ DBFENTER;
+
+ /* Clear this interrupt. */
+ *R_DMA_CH9_CLR_INTR = IO_STATE(R_DMA_CH9_CLR_INTR, clr_eop, do);
+
+ /* Note that this while loop assumes that all packets span only
+ one rx descriptor. */
+
+ /* The reason we cli here is that we call the driver's callback functions. */
+ save_flags(flags);
+ cli();
+
+ while (myNextRxDesc->status & IO_MASK(USB_IN_status, eop)) {
+
+ epid = IO_EXTRACT(USB_IN_status, epid, myNextRxDesc->status);
+ urb = urb_list_first(epid);
+
+ //printk("eop for epid %d, first urb 0x%lx\n", epid, (unsigned long)urb);
+
+ if (!urb) {
+ err("No urb for epid %d in rx interrupt", epid);
+ __dump_ept_data(epid);
+ goto skip_out;
+ }
+
+ /* Note that we cannot indescriminately assert(usb_pipein(urb->pipe)) since
+ ctrl pipes are not. */
+
+ if (myNextRxDesc->status & IO_MASK(USB_IN_status, error)) {
+ __u32 r_usb_ept_data;
+ int no_error = 0;
+
+ assert(test_bit(epid, (void *)&epid_usage_bitmask));
+
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+ if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+ r_usb_ept_data = *R_USB_EPT_DATA_ISO;
+
+ if ((r_usb_ept_data & IO_MASK(R_USB_EPT_DATA_ISO, valid)) &&
+ (IO_EXTRACT(R_USB_EPT_DATA_ISO, error_code, r_usb_ept_data) == 0) &&
+ (myNextRxDesc->status & IO_MASK(USB_IN_status, nodata))) {
+ /* Not an error, just a failure to receive an expected iso
+ in packet in this frame. This is not documented
+ in the designers reference.
+ */
+ no_error++;
+ } else {
+ warn("R_USB_EPT_DATA_ISO for epid %d = 0x%x", epid, r_usb_ept_data);
+ }
+ } else {
+ r_usb_ept_data = *R_USB_EPT_DATA;
+ warn("R_USB_EPT_DATA for epid %d = 0x%x", epid, r_usb_ept_data);
+ }
+
+ if (!no_error){
+ warn("error in rx desc->status, epid %d, first urb = 0x%lx",
+ epid, (unsigned long)urb);
+ __dump_in_desc(myNextRxDesc);
+
+ warn("R_USB_STATUS = 0x%x", *R_USB_STATUS);
+
+ /* Check that ept was disabled when error occurred. */
+ switch (usb_pipetype(urb->pipe)) {
+ case PIPE_BULK:
+ assert(!(TxBulkEPList[epid].command & IO_MASK(USB_EP_command, enable)));
+ break;
+ case PIPE_CONTROL:
+ assert(!(TxCtrlEPList[epid].command & IO_MASK(USB_EP_command, enable)));
+ break;
+ case PIPE_INTERRUPT:
+ assert(!(TxIntrEPList[epid].command & IO_MASK(USB_EP_command, enable)));
+ break;
+ case PIPE_ISOCHRONOUS:
+ assert(!(TxIsocEPList[epid].command & IO_MASK(USB_EP_command, enable)));
+ break;
+ default:
+ warn("etrax_usb_rx_interrupt: bad pipetype %d in urb 0x%p",
+ usb_pipetype(urb->pipe),
+ urb);
+ }
+ etrax_usb_complete_urb(urb, -EPROTO);
+ goto skip_out;
+ }
+ }
+
+ urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ assert(urb_priv);
+
+ if ((usb_pipetype(urb->pipe) == PIPE_BULK) ||
+ (usb_pipetype(urb->pipe) == PIPE_CONTROL) ||
+ (usb_pipetype(urb->pipe) == PIPE_INTERRUPT)) {
+
+ if (myNextRxDesc->status & IO_MASK(USB_IN_status, nodata)) {
+ /* We get nodata for empty data transactions, and the rx descriptor's
+ hw_len field is not valid in that case. No data to copy in other
+ words. */
+ } else {
+ /* Make sure the data fits in the buffer. */
+ assert(urb_priv->rx_offset + myNextRxDesc->hw_len
+ <= urb->transfer_buffer_length);
+
+ memcpy(urb->transfer_buffer + urb_priv->rx_offset,
+ phys_to_virt(myNextRxDesc->buf), myNextRxDesc->hw_len);
+ urb_priv->rx_offset += myNextRxDesc->hw_len;
+ }
+
+ if (myNextRxDesc->status & IO_MASK(USB_IN_status, eot)) {
+ if ((usb_pipetype(urb->pipe) == PIPE_CONTROL) &&
+ ((TxCtrlEPList[urb_priv->epid].command & IO_MASK(USB_EP_command, enable)) ==
+ IO_STATE(USB_EP_command, enable, yes))) {
+ /* The EP is still enabled, so the OUT packet used to ack
+ the in data is probably not processed yet. If the EP
+ sub pointer has not moved beyond urb_priv->last_sb mark
+ it for a descriptor interrupt and complete the urb in
+ the descriptor interrupt handler.
+ */
+ USB_SB_Desc_t *sub = TxCtrlEPList[urb_priv->epid].sub ? phys_to_virt(TxCtrlEPList[urb_priv->epid].sub) : 0;
+
+ while ((sub != NULL) && (sub != urb_priv->last_sb)) {
+ sub = sub->next ? phys_to_virt(sub->next) : 0;
+ }
+ if (sub != NULL) {
+ /* The urb has not been fully processed. */
+ urb_priv->urb_state = WAITING_FOR_DESCR_INTR;
+ } else {
+ warn("(CTRL) epid enabled and urb (0x%p) processed, ep->sub=0x%p", urb, (char*)TxCtrlEPList[urb_priv->epid].sub);
+ etrax_usb_complete_urb(urb, 0);
+ }
+ } else {
+ etrax_usb_complete_urb(urb, 0);
+ }
+ }
+
+ } else if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+
+ struct usb_iso_packet_descriptor *packet;
+
+ if (urb_priv->urb_state == UNLINK) {
+ info("Ignoring rx data for urb being unlinked.");
+ goto skip_out;
+ } else if (urb_priv->urb_state == NOT_STARTED) {
+ info("What? Got rx data for urb that isn't started?");
+ goto skip_out;
+ }
+
+ packet = &urb->iso_frame_desc[urb_priv->isoc_packet_counter];
+ packet->status = 0;
+
+ if (myNextRxDesc->status & IO_MASK(USB_IN_status, nodata)) {
+ /* We get nodata for empty data transactions, and the rx descriptor's
+ hw_len field is not valid in that case. We copy 0 bytes however to
+ stay in synch. */
+ packet->actual_length = 0;
+ } else {
+ packet->actual_length = myNextRxDesc->hw_len;
+ /* Make sure the data fits in the buffer. */
+ assert(packet->actual_length <= packet->length);
+ memcpy(urb->transfer_buffer + packet->offset,
+ phys_to_virt(myNextRxDesc->buf), packet->actual_length);
+ }
+
+ /* Increment the packet counter. */
+ urb_priv->isoc_packet_counter++;
+
+ /* Note that we don't care about the eot field in the rx descriptor's status.
+ It will always be set for isoc traffic. */
+ if (urb->number_of_packets == urb_priv->isoc_packet_counter) {
+
+ /* Out-of-synch diagnostics. */
+ curr_fm = (*R_USB_FM_NUMBER & 0x7ff);
+ if (((prev_fm + urb_priv->isoc_packet_counter) % (0x7ff + 1)) != curr_fm) {
+ /* This test is wrong, if there is more than one isoc
+ in endpoint active it will always calculate wrong
+ since prev_fm is shared by all endpoints.
+
+ FIXME Make this check per URB using urb->start_frame.
+ */
+ dbg_isoc("Out of synch? Previous frame = %d, current frame = %d",
+ prev_fm, curr_fm);
+
+ }
+ prev_fm = curr_fm;
+
+ /* Complete the urb with status OK. */
+ etrax_usb_complete_isoc_urb(urb, 0);
+ }
+ }
+
+ skip_out:
+
+ /* DMA IN cache bug. Flush the DMA IN buffer from the cache. (struct etrax_dma_descr
+ has the same layout as USB_IN_Desc for the relevant fields.) */
+ prepare_rx_descriptor((struct etrax_dma_descr*)myNextRxDesc);
+
+ myPrevRxDesc = myNextRxDesc;
+ myPrevRxDesc->command |= IO_MASK(USB_IN_command, eol);
+ myLastRxDesc->command &= ~IO_MASK(USB_IN_command, eol);
+ myLastRxDesc = myPrevRxDesc;
+
+ myNextRxDesc->status = 0;
+ myNextRxDesc = phys_to_virt(myNextRxDesc->next);
+ }
+
+ restore_flags(flags);
+
+ DBFEXIT;
+
+ return IRQ_HANDLED;
+}
+
+
+/* This function will unlink the SB descriptors associated with this urb. */
+static int etrax_remove_from_sb_list(struct urb *urb)
+{
+ USB_SB_Desc_t *next_sb, *first_sb, *last_sb;
+ etrax_urb_priv_t *urb_priv;
+ int i = 0;
+
+ DBFENTER;
+
+ urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ assert(urb_priv);
+
+ /* Just a sanity check. Since we don't fiddle with the DMA list the EP descriptor
+ doesn't really need to be disabled, it's just that we expect it to be. */
+ if (usb_pipetype(urb->pipe) == PIPE_BULK) {
+ assert(!(TxBulkEPList[urb_priv->epid].command & IO_MASK(USB_EP_command, enable)));
+ } else if (usb_pipetype(urb->pipe) == PIPE_CONTROL) {
+ assert(!(TxCtrlEPList[urb_priv->epid].command & IO_MASK(USB_EP_command, enable)));
+ }
+
+ first_sb = urb_priv->first_sb;
+ last_sb = urb_priv->last_sb;
+
+ assert(first_sb);
+ assert(last_sb);
+
+ while (first_sb != last_sb) {
+ next_sb = (USB_SB_Desc_t *)phys_to_virt(first_sb->next);
+ kmem_cache_free(usb_desc_cache, first_sb);
+ first_sb = next_sb;
+ i++;
+ }
+ kmem_cache_free(usb_desc_cache, last_sb);
+ i++;
+ dbg_sb("%d SB descriptors freed", i);
+ /* Compare i with urb->number_of_packets for Isoc traffic.
+ Should be same when calling unlink_urb */
+
+ DBFEXIT;
+
+ return i;
+}
+
+static int etrax_usb_submit_bulk_urb(struct urb *urb)
+{
+ int epid;
+ int empty;
+ unsigned long flags;
+ etrax_urb_priv_t *urb_priv;
+
+ DBFENTER;
+
+ /* Epid allocation, empty check and list add must be protected.
+ Read about this in etrax_usb_submit_ctrl_urb. */
+
+ spin_lock_irqsave(&urb_list_lock, flags);
+ epid = etrax_usb_setup_epid(urb);
+ if (epid == -1) {
+ DBFEXIT;
+ spin_unlock_irqrestore(&urb_list_lock, flags);
+ return -ENOMEM;
+ }
+ empty = urb_list_empty(epid);
+ urb_list_add(urb, epid);
+ spin_unlock_irqrestore(&urb_list_lock, flags);
+
+ dbg_bulk("Adding bulk %s urb 0x%lx to %s list, epid %d",
+ usb_pipein(urb->pipe) ? "IN" : "OUT", (unsigned long)urb, empty ? "empty" : "", epid);
+
+ /* Mark the urb as being in progress. */
+ urb->status = -EINPROGRESS;
+
+ /* Setup the hcpriv data. */
+ urb_priv = kmalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG);
+ assert(urb_priv != NULL);
+ /* This sets rx_offset to 0. */
+ memset(urb_priv, 0, sizeof(etrax_urb_priv_t));
+ urb_priv->urb_state = NOT_STARTED;
+ urb->hcpriv = urb_priv;
+
+ if (empty) {
+ etrax_usb_add_to_bulk_sb_list(urb, epid);
+ }
+
+ DBFEXIT;
+
+ return 0;
+}
+
+static void etrax_usb_add_to_bulk_sb_list(struct urb *urb, int epid)
+{
+ USB_SB_Desc_t *sb_desc;
+ etrax_urb_priv_t *urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ unsigned long flags;
+ char maxlen;
+
+ DBFENTER;
+
+ dbg_bulk("etrax_usb_add_to_bulk_sb_list, urb 0x%lx", (unsigned long)urb);
+
+ maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
+
+ sb_desc = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_FLAG);
+ assert(sb_desc != NULL);
+ memset(sb_desc, 0, sizeof(USB_SB_Desc_t));
+
+
+ if (usb_pipeout(urb->pipe)) {
+
+ dbg_bulk("Grabbing bulk OUT, urb 0x%lx, epid %d", (unsigned long)urb, epid);
+
+ /* This is probably a sanity check of the bulk transaction length
+ not being larger than 64 kB. */
+ if (urb->transfer_buffer_length > 0xffff) {
+ panic("urb->transfer_buffer_length > 0xffff");
+ }
+
+ sb_desc->sw_len = urb->transfer_buffer_length;
+
+ /* The rem field is don't care if it's not a full-length transfer, so setting
+ it shouldn't hurt. Also, rem isn't used for OUT traffic. */
+ sb_desc->command = (IO_FIELD(USB_SB_command, rem, 0) |
+ IO_STATE(USB_SB_command, tt, out) |
+ IO_STATE(USB_SB_command, eot, yes) |
+ IO_STATE(USB_SB_command, eol, yes));
+
+ /* The full field is set to yes, even if we don't actually check that this is
+ a full-length transfer (i.e., that transfer_buffer_length % maxlen = 0).
+ Setting full prevents the USB controller from sending an empty packet in
+ that case. However, if URB_ZERO_PACKET was set we want that. */
+ if (!(urb->transfer_flags & URB_ZERO_PACKET)) {
+ sb_desc->command |= IO_STATE(USB_SB_command, full, yes);
+ }
+
+ sb_desc->buf = virt_to_phys(urb->transfer_buffer);
+ sb_desc->next = 0;
+
+ } else if (usb_pipein(urb->pipe)) {
+
+ dbg_bulk("Grabbing bulk IN, urb 0x%lx, epid %d", (unsigned long)urb, epid);
+
+ sb_desc->sw_len = urb->transfer_buffer_length ?
+ (urb->transfer_buffer_length - 1) / maxlen + 1 : 0;
+
+ /* The rem field is don't care if it's not a full-length transfer, so setting
+ it shouldn't hurt. */
+ sb_desc->command =
+ (IO_FIELD(USB_SB_command, rem,
+ urb->transfer_buffer_length % maxlen) |
+ IO_STATE(USB_SB_command, tt, in) |
+ IO_STATE(USB_SB_command, eot, yes) |
+ IO_STATE(USB_SB_command, eol, yes));
+
+ sb_desc->buf = 0;
+ sb_desc->next = 0;
+ }
+
+ urb_priv->first_sb = sb_desc;
+ urb_priv->last_sb = sb_desc;
+ urb_priv->epid = epid;
+
+ urb->hcpriv = urb_priv;
+
+ /* Reset toggle bits and reset error count. */
+ save_flags(flags);
+ cli();
+
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+
+ /* FIXME: Is this a special case since the hold field is checked,
+ or should we check hold in a lot of other cases as well? */
+ if (*R_USB_EPT_DATA & IO_MASK(R_USB_EPT_DATA, hold)) {
+ panic("Hold was set in %s", __FUNCTION__);
+ }
+
+ /* Reset error counters (regardless of which direction this traffic is). */
+ *R_USB_EPT_DATA &=
+ ~(IO_MASK(R_USB_EPT_DATA, error_count_in) |
+ IO_MASK(R_USB_EPT_DATA, error_count_out));
+
+ /* Software must preset the toggle bits. */
+ if (usb_pipeout(urb->pipe)) {
+ char toggle =
+ usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
+ *R_USB_EPT_DATA &= ~IO_MASK(R_USB_EPT_DATA, t_out);
+ *R_USB_EPT_DATA |= IO_FIELD(R_USB_EPT_DATA, t_out, toggle);
+ } else {
+ char toggle =
+ usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
+ *R_USB_EPT_DATA &= ~IO_MASK(R_USB_EPT_DATA, t_in);
+ *R_USB_EPT_DATA |= IO_FIELD(R_USB_EPT_DATA, t_in, toggle);
+ }
+
+ /* Assert that the EP descriptor is disabled. */
+ assert(!(TxBulkEPList[epid].command & IO_MASK(USB_EP_command, enable)));
+
+ /* The reason we set the EP's sub pointer directly instead of
+ walking the SB list and linking it last in the list is that we only
+ have one active urb at a time (the rest are queued). */
+
+ /* Note that we cannot have interrupts running when we have set the SB descriptor
+ but the EP is not yet enabled. If a bulk eot happens for another EP, we will
+ find this EP disabled and with a SB != 0, which will make us think that it's done. */
+ TxBulkEPList[epid].sub = virt_to_phys(sb_desc);
+ TxBulkEPList[epid].hw_len = 0;
+ /* Note that we don't have to fill in the ep_id field since this
+ was done when we allocated the EP descriptors in init_tx_bulk_ep. */
+
+ /* Check if the dummy list is already with us (if several urbs were queued). */
+ if (TxBulkEPList[epid].next != virt_to_phys(&TxBulkDummyEPList[epid][0])) {
+
+ dbg_bulk("Inviting dummy list to the party for urb 0x%lx, epid %d",
+ (unsigned long)urb, epid);
+
+ /* The last EP in the dummy list already has its next pointer set to
+ TxBulkEPList[epid].next. */
+
+ /* We don't need to check if the DMA is at this EP or not before changing the
+ next pointer, since we will do it in one 32-bit write (EP descriptors are
+ 32-bit aligned). */
+ TxBulkEPList[epid].next = virt_to_phys(&TxBulkDummyEPList[epid][0]);
+ }
+ /* Enable the EP descr. */
+ dbg_bulk("Enabling bulk EP for urb 0x%lx, epid %d", (unsigned long)urb, epid);
+ TxBulkEPList[epid].command |= IO_STATE(USB_EP_command, enable, yes);
+
+ /* Everything is set up, safe to enable interrupts again. */
+ restore_flags(flags);
+
+ /* If the DMA bulk channel isn't running, we need to restart it if it
+ has stopped at the last EP descriptor (DMA stopped because there was
+ no more traffic) or if it has stopped at a dummy EP with the intr flag
+ set (DMA stopped because we were too slow in inserting new traffic). */
+ if (!(*R_DMA_CH8_SUB0_CMD & IO_MASK(R_DMA_CH8_SUB0_CMD, cmd))) {
+
+ USB_EP_Desc_t *ep;
+ ep = (USB_EP_Desc_t *)phys_to_virt(*R_DMA_CH8_SUB0_EP);
+ dbg_bulk("DMA channel not running in add");
+ dbg_bulk("DMA is at 0x%lx", (unsigned long)ep);
+
+ if (*R_DMA_CH8_SUB0_EP == virt_to_phys(&TxBulkEPList[NBR_OF_EPIDS - 1]) ||
+ (ep->command & 0x8) >> 3) {
+ *R_DMA_CH8_SUB0_CMD = IO_STATE(R_DMA_CH8_SUB0_CMD, cmd, start);
+ /* Update/restart the bulk start timer since we just started the channel. */
+ mod_timer(&bulk_start_timer, jiffies + BULK_START_TIMER_INTERVAL);
+ /* Update/restart the bulk eot timer since we just inserted traffic. */
+ mod_timer(&bulk_eot_timer, jiffies + BULK_EOT_TIMER_INTERVAL);
+ }
+ }
+
+ DBFEXIT;
+}
+
+static void etrax_usb_complete_bulk_urb(struct urb *urb, int status)
+{
+ etrax_urb_priv_t *urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ int epid = urb_priv->epid;
+ unsigned long flags;
+
+ DBFENTER;
+
+ if (status)
+ warn("Completing bulk urb with status %d.", status);
+
+ dbg_bulk("Completing bulk urb 0x%lx for epid %d", (unsigned long)urb, epid);
+
+ /* Update the urb list. */
+ urb_list_del(urb, epid);
+
+ /* For an IN pipe, we always set the actual length, regardless of whether there was
+ an error or not (which means the device driver can use the data if it wants to). */
+ if (usb_pipein(urb->pipe)) {
+ urb->actual_length = urb_priv->rx_offset;
+ } else {
+ /* Set actual_length for OUT urbs also; the USB mass storage driver seems
+ to want that. We wouldn't know of any partial writes if there was an error. */
+ if (status == 0) {
+ urb->actual_length = urb->transfer_buffer_length;
+ } else {
+ urb->actual_length = 0;
+ }
+ }
+
+ /* FIXME: Is there something of the things below we shouldn't do if there was an error?
+ Like, maybe we shouldn't toggle the toggle bits, or maybe we shouldn't insert more traffic. */
+
+ save_flags(flags);
+ cli();
+
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+
+ /* We need to fiddle with the toggle bits because the hardware doesn't do it for us. */
+ if (usb_pipeout(urb->pipe)) {
+ char toggle =
+ IO_EXTRACT(R_USB_EPT_DATA, t_out, *R_USB_EPT_DATA);
+ usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe),
+ usb_pipeout(urb->pipe), toggle);
+ } else {
+ char toggle =
+ IO_EXTRACT(R_USB_EPT_DATA, t_in, *R_USB_EPT_DATA);
+ usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe),
+ usb_pipeout(urb->pipe), toggle);
+ }
+ restore_flags(flags);
+
+ /* Remember to free the SBs. */
+ etrax_remove_from_sb_list(urb);
+ kfree(urb_priv);
+ urb->hcpriv = 0;
+
+ /* If there are any more urb's in the list we'd better start sending */
+ if (!urb_list_empty(epid)) {
+
+ struct urb *new_urb;
+
+ /* Get the first urb. */
+ new_urb = urb_list_first(epid);
+ assert(new_urb);
+
+ dbg_bulk("More bulk for epid %d", epid);
+
+ etrax_usb_add_to_bulk_sb_list(new_urb, epid);
+ }
+
+ urb->status = status;
+
+ /* We let any non-zero status from the layer above have precedence. */
+ if (status == 0) {
+ /* URB_SHORT_NOT_OK means that short reads (shorter than the endpoint's max length)
+ is to be treated as an error. */
+ if (urb->transfer_flags & URB_SHORT_NOT_OK) {
+ if (usb_pipein(urb->pipe) &&
+ (urb->actual_length !=
+ usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)))) {
+ urb->status = -EREMOTEIO;
+ }
+ }
+ }
+
+ if (urb->complete) {
+ urb->complete(urb, NULL);
+ }
+
+ if (urb_list_empty(epid)) {
+ /* This means that this EP is now free, deconfigure it. */
+ etrax_usb_free_epid(epid);
+
+ /* No more traffic; time to clean up.
+ Must set sub pointer to 0, since we look at the sub pointer when handling
+ the bulk eot interrupt. */
+
+ dbg_bulk("No bulk for epid %d", epid);
+
+ TxBulkEPList[epid].sub = 0;
+
+ /* Unlink the dummy list. */
+
+ dbg_bulk("Kicking dummy list out of party for urb 0x%lx, epid %d",
+ (unsigned long)urb, epid);
+
+ /* No need to wait for the DMA before changing the next pointer.
+ The modulo NBR_OF_EPIDS isn't actually necessary, since we will never use
+ the last one (INVALID_EPID) for actual traffic. */
+ TxBulkEPList[epid].next =
+ virt_to_phys(&TxBulkEPList[(epid + 1) % NBR_OF_EPIDS]);
+ }
+
+ DBFEXIT;
+}
+
+static int etrax_usb_submit_ctrl_urb(struct urb *urb)
+{
+ int epid;
+ int empty;
+ unsigned long flags;
+ etrax_urb_priv_t *urb_priv;
+
+ DBFENTER;
+
+ /* FIXME: Return -ENXIO if there is already a queued urb for this endpoint? */
+
+ /* Epid allocation, empty check and list add must be protected.
+
+ Epid allocation because if we find an existing epid for this endpoint an urb might be
+ completed (emptying the list) before we add the new urb to the list, causing the epid
+ to be de-allocated. We would then start the transfer with an invalid epid -> epid attn.
+
+ Empty check and add because otherwise we might conclude that the list is not empty,
+ after which it becomes empty before we add the new urb to the list, causing us not to
+ insert the new traffic into the SB list. */
+
+ spin_lock_irqsave(&urb_list_lock, flags);
+ epid = etrax_usb_setup_epid(urb);
+ if (epid == -1) {
+ spin_unlock_irqrestore(&urb_list_lock, flags);
+ DBFEXIT;
+ return -ENOMEM;
+ }
+ empty = urb_list_empty(epid);
+ urb_list_add(urb, epid);
+ spin_unlock_irqrestore(&urb_list_lock, flags);
+
+ dbg_ctrl("Adding ctrl urb 0x%lx to %s list, epid %d",
+ (unsigned long)urb, empty ? "empty" : "", epid);
+
+ /* Mark the urb as being in progress. */
+ urb->status = -EINPROGRESS;
+
+ /* Setup the hcpriv data. */
+ urb_priv = kmalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG);
+ assert(urb_priv != NULL);
+ /* This sets rx_offset to 0. */
+ memset(urb_priv, 0, sizeof(etrax_urb_priv_t));
+ urb_priv->urb_state = NOT_STARTED;
+ urb->hcpriv = urb_priv;
+
+ if (empty) {
+ etrax_usb_add_to_ctrl_sb_list(urb, epid);
+ }
+
+ DBFEXIT;
+
+ return 0;
+}
+
+static void etrax_usb_add_to_ctrl_sb_list(struct urb *urb, int epid)
+{
+ USB_SB_Desc_t *sb_desc_setup;
+ USB_SB_Desc_t *sb_desc_data;
+ USB_SB_Desc_t *sb_desc_status;
+
+ etrax_urb_priv_t *urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+
+ unsigned long flags;
+ char maxlen;
+
+ DBFENTER;
+
+ maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
+
+ sb_desc_setup = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_FLAG);
+ assert(sb_desc_setup != NULL);
+ sb_desc_status = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_FLAG);
+ assert(sb_desc_status != NULL);
+
+ /* Initialize the mandatory setup SB descriptor (used only in control transfers) */
+ sb_desc_setup->sw_len = 8;
+ sb_desc_setup->command = (IO_FIELD(USB_SB_command, rem, 0) |
+ IO_STATE(USB_SB_command, tt, setup) |
+ IO_STATE(USB_SB_command, full, yes) |
+ IO_STATE(USB_SB_command, eot, yes));
+
+ sb_desc_setup->buf = virt_to_phys(urb->setup_packet);
+
+ if (usb_pipeout(urb->pipe)) {
+ dbg_ctrl("Transfer for epid %d is OUT", epid);
+
+ /* If this Control OUT transfer has an optional data stage we add an OUT token
+ before the mandatory IN (status) token, hence the reordered SB list */
+
+ sb_desc_setup->next = virt_to_phys(sb_desc_status);
+ if (urb->transfer_buffer) {
+
+ dbg_ctrl("This OUT transfer has an extra data stage");
+
+ sb_desc_data = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_FLAG);
+ assert(sb_desc_data != NULL);
+
+ sb_desc_setup->next = virt_to_phys(sb_desc_data);
+
+ sb_desc_data->sw_len = urb->transfer_buffer_length;
+ sb_desc_data->command = (IO_STATE(USB_SB_command, tt, out) |
+ IO_STATE(USB_SB_command, full, yes) |
+ IO_STATE(USB_SB_command, eot, yes));
+ sb_desc_data->buf = virt_to_phys(urb->transfer_buffer);
+ sb_desc_data->next = virt_to_phys(sb_desc_status);
+ }
+
+ sb_desc_status->sw_len = 1;
+ sb_desc_status->command = (IO_FIELD(USB_SB_command, rem, 0) |
+ IO_STATE(USB_SB_command, tt, in) |
+ IO_STATE(USB_SB_command, eot, yes) |
+ IO_STATE(USB_SB_command, intr, yes) |
+ IO_STATE(USB_SB_command, eol, yes));
+
+ sb_desc_status->buf = 0;
+ sb_desc_status->next = 0;
+
+ } else if (usb_pipein(urb->pipe)) {
+
+ dbg_ctrl("Transfer for epid %d is IN", epid);
+ dbg_ctrl("transfer_buffer_length = %d", urb->transfer_buffer_length);
+ dbg_ctrl("rem is calculated to %d", urb->transfer_buffer_length % maxlen);
+
+ sb_desc_data = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_FLAG);
+ assert(sb_desc_data != NULL);
+
+ sb_desc_setup->next = virt_to_phys(sb_desc_data);
+
+ sb_desc_data->sw_len = urb->transfer_buffer_length ?
+ (urb->transfer_buffer_length - 1) / maxlen + 1 : 0;
+ dbg_ctrl("sw_len got %d", sb_desc_data->sw_len);
+
+ sb_desc_data->command =
+ (IO_FIELD(USB_SB_command, rem,
+ urb->transfer_buffer_length % maxlen) |
+ IO_STATE(USB_SB_command, tt, in) |
+ IO_STATE(USB_SB_command, eot, yes));
+
+ sb_desc_data->buf = 0;
+ sb_desc_data->next = virt_to_phys(sb_desc_status);
+
+ /* Read comment at zout_buffer declaration for an explanation to this. */
+ sb_desc_status->sw_len = 1;
+ sb_desc_status->command = (IO_FIELD(USB_SB_command, rem, 0) |
+ IO_STATE(USB_SB_command, tt, zout) |
+ IO_STATE(USB_SB_command, full, yes) |
+ IO_STATE(USB_SB_command, eot, yes) |
+ IO_STATE(USB_SB_command, intr, yes) |
+ IO_STATE(USB_SB_command, eol, yes));
+
+ sb_desc_status->buf = virt_to_phys(&zout_buffer[0]);
+ sb_desc_status->next = 0;
+ }
+
+ urb_priv->first_sb = sb_desc_setup;
+ urb_priv->last_sb = sb_desc_status;
+ urb_priv->epid = epid;
+
+ urb_priv->urb_state = STARTED;
+
+ /* Reset toggle bits and reset error count, remember to di and ei */
+ /* Warning: it is possible that this locking doesn't work with bottom-halves */
+
+ save_flags(flags);
+ cli();
+
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+ if (*R_USB_EPT_DATA & IO_MASK(R_USB_EPT_DATA, hold)) {
+ panic("Hold was set in %s", __FUNCTION__);
+ }
+
+
+ /* FIXME: Compare with etrax_usb_add_to_bulk_sb_list where the toggle bits
+ are set to a specific value. Why the difference? Read "Transfer and Toggle Bits
+ in Designer's Reference, p. 8 - 11. */
+ *R_USB_EPT_DATA &=
+ ~(IO_MASK(R_USB_EPT_DATA, error_count_in) |
+ IO_MASK(R_USB_EPT_DATA, error_count_out) |
+ IO_MASK(R_USB_EPT_DATA, t_in) |
+ IO_MASK(R_USB_EPT_DATA, t_out));
+
+ /* Since we use the rx interrupt to complete ctrl urbs, we can enable interrupts now
+ (i.e. we don't check the sub pointer on an eot interrupt like we do for bulk traffic). */
+ restore_flags(flags);
+
+ /* Assert that the EP descriptor is disabled. */
+ assert(!(TxCtrlEPList[epid].command & IO_MASK(USB_EP_command, enable)));
+
+ /* Set up and enable the EP descriptor. */
+ TxCtrlEPList[epid].sub = virt_to_phys(sb_desc_setup);
+ TxCtrlEPList[epid].hw_len = 0;
+ TxCtrlEPList[epid].command |= IO_STATE(USB_EP_command, enable, yes);
+
+ /* We start the DMA sub channel without checking if it's running or not, because:
+ 1) If it's already running, issuing the start command is a nop.
+ 2) We avoid a test-and-set race condition. */
+ *R_DMA_CH8_SUB1_CMD = IO_STATE(R_DMA_CH8_SUB1_CMD, cmd, start);
+
+ DBFEXIT;
+}
+
+static void etrax_usb_complete_ctrl_urb(struct urb *urb, int status)
+{
+ etrax_urb_priv_t *urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ int epid = urb_priv->epid;
+
+ DBFENTER;
+
+ if (status)
+ warn("Completing ctrl urb with status %d.", status);
+
+ dbg_ctrl("Completing ctrl epid %d, urb 0x%lx", epid, (unsigned long)urb);
+
+ /* Remove this urb from the list. */
+ urb_list_del(urb, epid);
+
+ /* For an IN pipe, we always set the actual length, regardless of whether there was
+ an error or not (which means the device driver can use the data if it wants to). */
+ if (usb_pipein(urb->pipe)) {
+ urb->actual_length = urb_priv->rx_offset;
+ }
+
+ /* FIXME: Is there something of the things below we shouldn't do if there was an error?
+ Like, maybe we shouldn't insert more traffic. */
+
+ /* Remember to free the SBs. */
+ etrax_remove_from_sb_list(urb);
+ kfree(urb_priv);
+ urb->hcpriv = 0;
+
+ /* If there are any more urbs in the list we'd better start sending. */
+ if (!urb_list_empty(epid)) {
+ struct urb *new_urb;
+
+ /* Get the first urb. */
+ new_urb = urb_list_first(epid);
+ assert(new_urb);
+
+ dbg_ctrl("More ctrl for epid %d, first urb = 0x%lx", epid, (unsigned long)new_urb);
+
+ etrax_usb_add_to_ctrl_sb_list(new_urb, epid);
+ }
+
+ urb->status = status;
+
+ /* We let any non-zero status from the layer above have precedence. */
+ if (status == 0) {
+ /* URB_SHORT_NOT_OK means that short reads (shorter than the endpoint's max length)
+ is to be treated as an error. */
+ if (urb->transfer_flags & URB_SHORT_NOT_OK) {
+ if (usb_pipein(urb->pipe) &&
+ (urb->actual_length !=
+ usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)))) {
+ urb->status = -EREMOTEIO;
+ }
+ }
+ }
+
+ if (urb->complete) {
+ urb->complete(urb, NULL);
+ }
+
+ if (urb_list_empty(epid)) {
+ /* No more traffic. Time to clean up. */
+ etrax_usb_free_epid(epid);
+ /* Must set sub pointer to 0. */
+ dbg_ctrl("No ctrl for epid %d", epid);
+ TxCtrlEPList[epid].sub = 0;
+ }
+
+ DBFEXIT;
+}
+
+static int etrax_usb_submit_intr_urb(struct urb *urb)
+{
+
+ int epid;
+
+ DBFENTER;
+
+ if (usb_pipeout(urb->pipe)) {
+ /* Unsupported transfer type.
+ We don't support interrupt out traffic. (If we do, we can't support
+ intervals for neither in or out traffic, but are forced to schedule all
+ interrupt traffic in one frame.) */
+ return -EINVAL;
+ }
+
+ epid = etrax_usb_setup_epid(urb);
+ if (epid == -1) {
+ DBFEXIT;
+ return -ENOMEM;
+ }
+
+ if (!urb_list_empty(epid)) {
+ /* There is already a queued urb for this endpoint. */
+ etrax_usb_free_epid(epid);
+ return -ENXIO;
+ }
+
+ urb->status = -EINPROGRESS;
+
+ dbg_intr("Add intr urb 0x%lx, to list, epid %d", (unsigned long)urb, epid);
+
+ urb_list_add(urb, epid);
+ etrax_usb_add_to_intr_sb_list(urb, epid);
+
+ return 0;
+
+ DBFEXIT;
+}
+
+static void etrax_usb_add_to_intr_sb_list(struct urb *urb, int epid)
+{
+
+ volatile USB_EP_Desc_t *tmp_ep;
+ volatile USB_EP_Desc_t *first_ep;
+
+ char maxlen;
+ int interval;
+ int i;
+
+ etrax_urb_priv_t *urb_priv;
+
+ DBFENTER;
+
+ maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
+ interval = urb->interval;
+
+ urb_priv = kmalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG);
+ assert(urb_priv != NULL);
+ memset(urb_priv, 0, sizeof(etrax_urb_priv_t));
+ urb->hcpriv = urb_priv;
+
+ first_ep = &TxIntrEPList[0];
+
+ /* Round of the interval to 2^n, it is obvious that this code favours
+ smaller numbers, but that is actually a good thing */
+ /* FIXME: The "rounding error" for larger intervals will be quite
+ large. For in traffic this shouldn't be a problem since it will only
+ mean that we "poll" more often. */
+ for (i = 0; interval; i++) {
+ interval = interval >> 1;
+ }
+ interval = 1 << (i - 1);
+
+ dbg_intr("Interval rounded to %d", interval);
+
+ tmp_ep = first_ep;
+ i = 0;
+ do {
+ if (tmp_ep->command & IO_MASK(USB_EP_command, eof)) {
+ if ((i % interval) == 0) {
+ /* Insert the traffic ep after tmp_ep */
+ USB_EP_Desc_t *ep_desc;
+ USB_SB_Desc_t *sb_desc;
+
+ dbg_intr("Inserting EP for epid %d", epid);
+
+ ep_desc = (USB_EP_Desc_t *)
+ kmem_cache_alloc(usb_desc_cache, SLAB_FLAG);
+ sb_desc = (USB_SB_Desc_t *)
+ kmem_cache_alloc(usb_desc_cache, SLAB_FLAG);
+ assert(ep_desc != NULL);
+ CHECK_ALIGN(ep_desc);
+ assert(sb_desc != NULL);
+
+ ep_desc->sub = virt_to_phys(sb_desc);
+ ep_desc->hw_len = 0;
+ ep_desc->command = (IO_FIELD(USB_EP_command, epid, epid) |
+ IO_STATE(USB_EP_command, enable, yes));
+
+
+ /* Round upwards the number of packets of size maxlen
+ that this SB descriptor should receive. */
+ sb_desc->sw_len = urb->transfer_buffer_length ?
+ (urb->transfer_buffer_length - 1) / maxlen + 1 : 0;
+ sb_desc->next = 0;
+ sb_desc->buf = 0;
+ sb_desc->command =
+ (IO_FIELD(USB_SB_command, rem, urb->transfer_buffer_length % maxlen) |
+ IO_STATE(USB_SB_command, tt, in) |
+ IO_STATE(USB_SB_command, eot, yes) |
+ IO_STATE(USB_SB_command, eol, yes));
+
+ ep_desc->next = tmp_ep->next;
+ tmp_ep->next = virt_to_phys(ep_desc);
+ }
+ i++;
+ }
+ tmp_ep = (USB_EP_Desc_t *)phys_to_virt(tmp_ep->next);
+ } while (tmp_ep != first_ep);
+
+
+ /* Note that first_sb/last_sb doesn't apply to interrupt traffic. */
+ urb_priv->epid = epid;
+
+ /* We start the DMA sub channel without checking if it's running or not, because:
+ 1) If it's already running, issuing the start command is a nop.
+ 2) We avoid a test-and-set race condition. */
+ *R_DMA_CH8_SUB2_CMD = IO_STATE(R_DMA_CH8_SUB2_CMD, cmd, start);
+
+ DBFEXIT;
+}
+
+
+
+static void etrax_usb_complete_intr_urb(struct urb *urb, int status)
+{
+ etrax_urb_priv_t *urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ int epid = urb_priv->epid;
+
+ DBFENTER;
+
+ if (status)
+ warn("Completing intr urb with status %d.", status);
+
+ dbg_intr("Completing intr epid %d, urb 0x%lx", epid, (unsigned long)urb);
+
+ urb->status = status;
+ urb->actual_length = urb_priv->rx_offset;
+
+ dbg_intr("interrupt urb->actual_length = %d", urb->actual_length);
+
+ /* We let any non-zero status from the layer above have precedence. */
+ if (status == 0) {
+ /* URB_SHORT_NOT_OK means that short reads (shorter than the endpoint's max length)
+ is to be treated as an error. */
+ if (urb->transfer_flags & URB_SHORT_NOT_OK) {
+ if (urb->actual_length !=
+ usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe))) {
+ urb->status = -EREMOTEIO;
+ }
+ }
+ }
+
+ /* The driver will resubmit the URB so we need to remove it first */
+ etrax_usb_unlink_urb(urb, 0);
+ if (urb->complete) {
+ urb->complete(urb, NULL);
+ }
+
+ DBFEXIT;
+}
+
+
+static int etrax_usb_submit_isoc_urb(struct urb *urb)
+{
+ int epid;
+ unsigned long flags;
+
+ DBFENTER;
+
+ dbg_isoc("Submitting isoc urb = 0x%lx", (unsigned long)urb);
+
+ /* Epid allocation, empty check and list add must be protected.
+ Read about this in etrax_usb_submit_ctrl_urb. */
+
+ spin_lock_irqsave(&urb_list_lock, flags);
+ /* Is there an active epid for this urb ? */
+ epid = etrax_usb_setup_epid(urb);
+ if (epid == -1) {
+ DBFEXIT;
+ spin_unlock_irqrestore(&urb_list_lock, flags);
+ return -ENOMEM;
+ }
+
+ /* Ok, now we got valid endpoint, lets insert some traffic */
+
+ urb->status = -EINPROGRESS;
+
+ /* Find the last urb in the URB_List and add this urb after that one.
+ Also add the traffic, that is do an etrax_usb_add_to_isoc_sb_list. This
+ is important to make this in "real time" since isochronous traffic is
+ time sensitive. */
+
+ dbg_isoc("Adding isoc urb to (possibly empty) list");
+ urb_list_add(urb, epid);
+ etrax_usb_add_to_isoc_sb_list(urb, epid);
+ spin_unlock_irqrestore(&urb_list_lock, flags);
+
+ DBFEXIT;
+
+ return 0;
+}
+
+static void etrax_usb_check_error_isoc_ep(const int epid)
+{
+ unsigned long int flags;
+ int error_code;
+ __u32 r_usb_ept_data;
+
+ /* We can't read R_USB_EPID_ATTN here since it would clear the iso_eof,
+ bulk_eot and epid_attn interrupts. So we just check the status of
+ the epid without testing if for it in R_USB_EPID_ATTN. */
+
+
+ save_flags(flags);
+ cli();
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+ /* Note that although there are separate R_USB_EPT_DATA and R_USB_EPT_DATA_ISO
+ registers, they are located at the same address and are of the same size.
+ In other words, this read should be ok for isoc also. */
+ r_usb_ept_data = *R_USB_EPT_DATA;
+ restore_flags(flags);
+
+ error_code = IO_EXTRACT(R_USB_EPT_DATA_ISO, error_code, r_usb_ept_data);
+
+ if (r_usb_ept_data & IO_MASK(R_USB_EPT_DATA, hold)) {
+ warn("Hold was set for epid %d.", epid);
+ return;
+ }
+
+ if (error_code == IO_STATE_VALUE(R_USB_EPT_DATA_ISO, error_code, no_error)) {
+
+ /* This indicates that the SB list of the ept was completed before
+ new data was appended to it. This is not an error, but indicates
+ large system or USB load and could possibly cause trouble for
+ very timing sensitive USB device drivers so we log it.
+ */
+ info("Isoc. epid %d disabled with no error", epid);
+ return;
+
+ } else if (error_code == IO_STATE_VALUE(R_USB_EPT_DATA_ISO, error_code, stall)) {
+ /* Not really a protocol error, just says that the endpoint gave
+ a stall response. Note that error_code cannot be stall for isoc. */
+ panic("Isoc traffic cannot stall");
+
+ } else if (error_code == IO_STATE_VALUE(R_USB_EPT_DATA_ISO, error_code, bus_error)) {
+ /* Two devices responded to a transaction request. Must be resolved
+ by software. FIXME: Reset ports? */
+ panic("Bus error for epid %d."
+ " Two devices responded to transaction request",
+ epid);
+
+ } else if (error_code == IO_STATE_VALUE(R_USB_EPT_DATA, error_code, buffer_error)) {
+ /* DMA overrun or underrun. */
+ warn("Buffer overrun/underrun for epid %d. DMA too busy?", epid);
+
+ /* It seems that error_code = buffer_error in
+ R_USB_EPT_DATA/R_USB_EPT_DATA_ISO and ourun = yes in R_USB_STATUS
+ are the same error. */
+ }
+}
+
+
+static void etrax_usb_add_to_isoc_sb_list(struct urb *urb, int epid)
+{
+
+ int i = 0;
+
+ etrax_urb_priv_t *urb_priv;
+ USB_SB_Desc_t *prev_sb_desc, *next_sb_desc, *temp_sb_desc;
+
+ DBFENTER;
+
+ prev_sb_desc = next_sb_desc = temp_sb_desc = NULL;
+
+ urb_priv = kmalloc(sizeof(etrax_urb_priv_t), GFP_ATOMIC);
+ assert(urb_priv != NULL);
+ memset(urb_priv, 0, sizeof(etrax_urb_priv_t));
+
+ urb->hcpriv = urb_priv;
+ urb_priv->epid = epid;
+
+ if (usb_pipeout(urb->pipe)) {
+
+ if (urb->number_of_packets == 0) panic("etrax_usb_add_to_isoc_sb_list 0 packets\n");
+
+ dbg_isoc("Transfer for epid %d is OUT", epid);
+ dbg_isoc("%d packets in URB", urb->number_of_packets);
+
+ /* Create one SB descriptor for each packet and link them together. */
+ for (i = 0; i < urb->number_of_packets; i++) {
+ if (!urb->iso_frame_desc[i].length)
+ continue;
+
+ next_sb_desc = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_ATOMIC);
+ assert(next_sb_desc != NULL);
+
+ if (urb->iso_frame_desc[i].length > 0) {
+
+ next_sb_desc->command = (IO_STATE(USB_SB_command, tt, out) |
+ IO_STATE(USB_SB_command, eot, yes));
+
+ next_sb_desc->sw_len = urb->iso_frame_desc[i].length;
+ next_sb_desc->buf = virt_to_phys((char*)urb->transfer_buffer + urb->iso_frame_desc[i].offset);
+
+ /* Check if full length transfer. */
+ if (urb->iso_frame_desc[i].length ==
+ usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe))) {
+ next_sb_desc->command |= IO_STATE(USB_SB_command, full, yes);
+ }
+ } else {
+ dbg_isoc("zero len packet");
+ next_sb_desc->command = (IO_FIELD(USB_SB_command, rem, 0) |
+ IO_STATE(USB_SB_command, tt, zout) |
+ IO_STATE(USB_SB_command, eot, yes) |
+ IO_STATE(USB_SB_command, full, yes));
+
+ next_sb_desc->sw_len = 1;
+ next_sb_desc->buf = virt_to_phys(&zout_buffer[0]);
+ }
+
+ /* First SB descriptor that belongs to this urb */
+ if (i == 0)
+ urb_priv->first_sb = next_sb_desc;
+ else
+ prev_sb_desc->next = virt_to_phys(next_sb_desc);
+
+ prev_sb_desc = next_sb_desc;
+ }
+
+ next_sb_desc->command |= (IO_STATE(USB_SB_command, intr, yes) |
+ IO_STATE(USB_SB_command, eol, yes));
+ next_sb_desc->next = 0;
+ urb_priv->last_sb = next_sb_desc;
+
+ } else if (usb_pipein(urb->pipe)) {
+
+ dbg_isoc("Transfer for epid %d is IN", epid);
+ dbg_isoc("transfer_buffer_length = %d", urb->transfer_buffer_length);
+ dbg_isoc("rem is calculated to %d", urb->iso_frame_desc[urb->number_of_packets - 1].length);
+
+ /* Note that in descriptors for periodic traffic are not consumed. This means that
+ the USB controller never propagates in the SB list. In other words, if there already
+ is an SB descriptor in the list for this EP we don't have to do anything. */
+ if (TxIsocEPList[epid].sub == 0) {
+ dbg_isoc("Isoc traffic not already running, allocating SB");
+
+ next_sb_desc = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_ATOMIC);
+ assert(next_sb_desc != NULL);
+
+ next_sb_desc->command = (IO_STATE(USB_SB_command, tt, in) |
+ IO_STATE(USB_SB_command, eot, yes) |
+ IO_STATE(USB_SB_command, eol, yes));
+
+ next_sb_desc->next = 0;
+ next_sb_desc->sw_len = 1; /* Actual number of packets is not relevant
+ for periodic in traffic as long as it is more
+ than zero. Set to 1 always. */
+ next_sb_desc->buf = 0;
+
+ /* The rem field is don't care for isoc traffic, so we don't set it. */
+
+ /* Only one SB descriptor that belongs to this urb. */
+ urb_priv->first_sb = next_sb_desc;
+ urb_priv->last_sb = next_sb_desc;
+
+ } else {
+
+ dbg_isoc("Isoc traffic already running, just setting first/last_sb");
+
+ /* Each EP for isoc in will have only one SB descriptor, setup when submitting the
+ already active urb. Note that even though we may have several first_sb/last_sb
+ pointing at the same SB descriptor, they are freed only once (when the list has
+ become empty). */
+ urb_priv->first_sb = phys_to_virt(TxIsocEPList[epid].sub);
+ urb_priv->last_sb = phys_to_virt(TxIsocEPList[epid].sub);
+ return;
+ }
+
+ }
+
+ /* Find the spot to insert this urb and add it. */
+ if (TxIsocEPList[epid].sub == 0) {
+ /* First SB descriptor inserted in this list (in or out). */
+ dbg_isoc("Inserting SB desc first in list");
+ TxIsocEPList[epid].hw_len = 0;
+ TxIsocEPList[epid].sub = virt_to_phys(urb_priv->first_sb);
+
+ } else {
+ /* Isochronous traffic is already running, insert new traffic last (only out). */
+ dbg_isoc("Inserting SB desc last in list");
+ temp_sb_desc = phys_to_virt(TxIsocEPList[epid].sub);
+ while ((temp_sb_desc->command & IO_MASK(USB_SB_command, eol)) !=
+ IO_STATE(USB_SB_command, eol, yes)) {
+ assert(temp_sb_desc->next);
+ temp_sb_desc = phys_to_virt(temp_sb_desc->next);
+ }
+ dbg_isoc("Appending list on desc 0x%p", temp_sb_desc);
+
+ /* Next pointer must be set before eol is removed. */
+ temp_sb_desc->next = virt_to_phys(urb_priv->first_sb);
+ /* Clear the previous end of list flag since there is a new in the
+ added SB descriptor list. */
+ temp_sb_desc->command &= ~IO_MASK(USB_SB_command, eol);
+
+ if (!(TxIsocEPList[epid].command & IO_MASK(USB_EP_command, enable))) {
+ /* 8.8.5 in Designer's Reference says we should check for and correct
+ any errors in the EP here. That should not be necessary if epid_attn
+ is handled correctly, so we assume all is ok. */
+ dbg_isoc("EP disabled");
+ etrax_usb_check_error_isoc_ep(epid);
+
+ /* The SB list was exhausted. */
+ if (virt_to_phys(urb_priv->last_sb) != TxIsocEPList[epid].sub) {
+ /* The new sublist did not get processed before the EP was
+ disabled. Setup the EP again. */
+ dbg_isoc("Set EP sub to new list");
+ TxIsocEPList[epid].hw_len = 0;
+ TxIsocEPList[epid].sub = virt_to_phys(urb_priv->first_sb);
+ }
+ }
+ }
+
+ if (urb->transfer_flags & URB_ISO_ASAP) {
+ /* The isoc transfer should be started as soon as possible. The start_frame
+ field is a return value if URB_ISO_ASAP was set. Comparing R_USB_FM_NUMBER
+ with a USB Chief trace shows that the first isoc IN token is sent 2 frames
+ later. I'm not sure how this affects usage of the start_frame field by the
+ device driver, or how it affects things when USB_ISO_ASAP is not set, so
+ therefore there's no compensation for the 2 frame "lag" here. */
+ urb->start_frame = (*R_USB_FM_NUMBER & 0x7ff);
+ TxIsocEPList[epid].command |= IO_STATE(USB_EP_command, enable, yes);
+ urb_priv->urb_state = STARTED;
+ dbg_isoc("URB_ISO_ASAP set, urb->start_frame set to %d", urb->start_frame);
+ } else {
+ /* Not started yet. */
+ urb_priv->urb_state = NOT_STARTED;
+ dbg_isoc("urb_priv->urb_state set to NOT_STARTED");
+ }
+
+ /* We start the DMA sub channel without checking if it's running or not, because:
+ 1) If it's already running, issuing the start command is a nop.
+ 2) We avoid a test-and-set race condition. */
+ *R_DMA_CH8_SUB3_CMD = IO_STATE(R_DMA_CH8_SUB3_CMD, cmd, start);
+
+ DBFEXIT;
+}
+
+static void etrax_usb_complete_isoc_urb(struct urb *urb, int status)
+{
+ etrax_urb_priv_t *urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ int epid = urb_priv->epid;
+ int auto_resubmit = 0;
+
+ DBFENTER;
+ dbg_isoc("complete urb 0x%p, status %d", urb, status);
+
+ if (status)
+ warn("Completing isoc urb with status %d.", status);
+
+ if (usb_pipein(urb->pipe)) {
+ int i;
+
+ /* Make that all isoc packets have status and length set before
+ completing the urb. */
+ for (i = urb_priv->isoc_packet_counter; i < urb->number_of_packets; i++) {
+ urb->iso_frame_desc[i].actual_length = 0;
+ urb->iso_frame_desc[i].status = -EPROTO;
+ }
+
+ urb_list_del(urb, epid);
+
+ if (!list_empty(&urb_list[epid])) {
+ ((etrax_urb_priv_t *)(urb_list_first(epid)->hcpriv))->urb_state = STARTED;
+ } else {
+ unsigned long int flags;
+ if (TxIsocEPList[epid].command & IO_MASK(USB_EP_command, enable)) {
+ /* The EP was enabled, disable it and wait. */
+ TxIsocEPList[epid].command &= ~IO_MASK(USB_EP_command, enable);
+
+ /* Ah, the luxury of busy-wait. */
+ while (*R_DMA_CH8_SUB3_EP == virt_to_phys(&TxIsocEPList[epid]));
+ }
+
+ etrax_remove_from_sb_list(urb);
+ TxIsocEPList[epid].sub = 0;
+ TxIsocEPList[epid].hw_len = 0;
+
+ save_flags(flags);
+ cli();
+ etrax_usb_free_epid(epid);
+ restore_flags(flags);
+ }
+
+ urb->hcpriv = 0;
+ kfree(urb_priv);
+
+ /* Release allocated bandwidth. */
+ usb_release_bandwidth(urb->dev, urb, 0);
+ } else if (usb_pipeout(urb->pipe)) {
+ int freed_descr;
+
+ dbg_isoc("Isoc out urb complete 0x%p", urb);
+
+ /* Update the urb list. */
+ urb_list_del(urb, epid);
+
+ freed_descr = etrax_remove_from_sb_list(urb);
+ dbg_isoc("freed %d descriptors of %d packets", freed_descr, urb->number_of_packets);
+ assert(freed_descr == urb->number_of_packets);
+ urb->hcpriv = 0;
+ kfree(urb_priv);
+
+ /* Release allocated bandwidth. */
+ usb_release_bandwidth(urb->dev, urb, 0);
+ }
+
+ urb->status = status;
+ if (urb->complete) {
+ urb->complete(urb, NULL);
+ }
+
+ if (auto_resubmit) {
+ /* Check that urb was not unlinked by the complete callback. */
+ if (__urb_list_entry(urb, epid)) {
+ /* Move this one down the list. */
+ urb_list_move_last(urb, epid);
+
+ /* Mark the now first urb as started (may already be). */
+ ((etrax_urb_priv_t *)(urb_list_first(epid)->hcpriv))->urb_state = STARTED;
+
+ /* Must set this to 0 since this urb is still active after
+ completion. */
+ urb_priv->isoc_packet_counter = 0;
+ } else {
+ warn("(ISOC) automatic resubmit urb 0x%p removed by complete.", urb);
+ }
+ }
+
+ DBFEXIT;
+}
+
+static void etrax_usb_complete_urb(struct urb *urb, int status)
+{
+ switch (usb_pipetype(urb->pipe)) {
+ case PIPE_BULK:
+ etrax_usb_complete_bulk_urb(urb, status);
+ break;
+ case PIPE_CONTROL:
+ etrax_usb_complete_ctrl_urb(urb, status);
+ break;
+ case PIPE_INTERRUPT:
+ etrax_usb_complete_intr_urb(urb, status);
+ break;
+ case PIPE_ISOCHRONOUS:
+ etrax_usb_complete_isoc_urb(urb, status);
+ break;
+ default:
+ err("Unknown pipetype");
+ }
+}
+
+
+
+static irqreturn_t etrax_usb_hc_interrupt_top_half(int irq, void *vhc, struct pt_regs *regs)
+{
+ usb_interrupt_registers_t *reg;
+ unsigned long flags;
+ __u32 irq_mask;
+ __u8 status;
+ __u32 epid_attn;
+ __u16 port_status_1;
+ __u16 port_status_2;
+ __u32 fm_number;
+
+ DBFENTER;
+
+ /* Read critical registers into local variables, do kmalloc afterwards. */
+ save_flags(flags);
+ cli();
+
+ irq_mask = *R_USB_IRQ_MASK_READ;
+ /* Reading R_USB_STATUS clears the ctl_status interrupt. Note that R_USB_STATUS
+ must be read before R_USB_EPID_ATTN since reading the latter clears the
+ ourun and perror fields of R_USB_STATUS. */
+ status = *R_USB_STATUS;
+
+ /* Reading R_USB_EPID_ATTN clears the iso_eof, bulk_eot and epid_attn interrupts. */
+ epid_attn = *R_USB_EPID_ATTN;
+
+ /* Reading R_USB_RH_PORT_STATUS_1 and R_USB_RH_PORT_STATUS_2 clears the
+ port_status interrupt. */
+ port_status_1 = *R_USB_RH_PORT_STATUS_1;
+ port_status_2 = *R_USB_RH_PORT_STATUS_2;
+
+ /* Reading R_USB_FM_NUMBER clears the sof interrupt. */
+ /* Note: the lower 11 bits contain the actual frame number, sent with each sof. */
+ fm_number = *R_USB_FM_NUMBER;
+
+ restore_flags(flags);
+
+ reg = (usb_interrupt_registers_t *)kmem_cache_alloc(top_half_reg_cache, SLAB_ATOMIC);
+
+ assert(reg != NULL);
+
+ reg->hc = (etrax_hc_t *)vhc;
+
+ /* Now put register values into kmalloc'd area. */
+ reg->r_usb_irq_mask_read = irq_mask;
+ reg->r_usb_status = status;
+ reg->r_usb_epid_attn = epid_attn;
+ reg->r_usb_rh_port_status_1 = port_status_1;
+ reg->r_usb_rh_port_status_2 = port_status_2;
+ reg->r_usb_fm_number = fm_number;
+
+ INIT_WORK(&reg->usb_bh, etrax_usb_hc_interrupt_bottom_half, reg);
+ schedule_work(&reg->usb_bh);
+
+ DBFEXIT;
+
+ return IRQ_HANDLED;
+}
+
+static void etrax_usb_hc_interrupt_bottom_half(void *data)
+{
+ usb_interrupt_registers_t *reg = (usb_interrupt_registers_t *)data;
+ __u32 irq_mask = reg->r_usb_irq_mask_read;
+
+ DBFENTER;
+
+ /* Interrupts are handled in order of priority. */
+ if (irq_mask & IO_MASK(R_USB_IRQ_MASK_READ, epid_attn)) {
+ etrax_usb_hc_epid_attn_interrupt(reg);
+ }
+ if (irq_mask & IO_MASK(R_USB_IRQ_MASK_READ, port_status)) {
+ etrax_usb_hc_port_status_interrupt(reg);
+ }
+ if (irq_mask & IO_MASK(R_USB_IRQ_MASK_READ, ctl_status)) {
+ etrax_usb_hc_ctl_status_interrupt(reg);
+ }
+ if (irq_mask & IO_MASK(R_USB_IRQ_MASK_READ, iso_eof)) {
+ etrax_usb_hc_isoc_eof_interrupt();
+ }
+ if (irq_mask & IO_MASK(R_USB_IRQ_MASK_READ, bulk_eot)) {
+ /* Update/restart the bulk start timer since obviously the channel is running. */
+ mod_timer(&bulk_start_timer, jiffies + BULK_START_TIMER_INTERVAL);
+ /* Update/restart the bulk eot timer since we just received an bulk eot interrupt. */
+ mod_timer(&bulk_eot_timer, jiffies + BULK_EOT_TIMER_INTERVAL);
+
+ etrax_usb_hc_bulk_eot_interrupt(0);
+ }
+
+ kmem_cache_free(top_half_reg_cache, reg);
+
+ DBFEXIT;
+}
+
+
+void etrax_usb_hc_isoc_eof_interrupt(void)
+{
+ struct urb *urb;
+ etrax_urb_priv_t *urb_priv;
+ int epid;
+ unsigned long flags;
+
+ DBFENTER;
+
+ /* Do not check the invalid epid (it has a valid sub pointer). */
+ for (epid = 0; epid < NBR_OF_EPIDS - 1; epid++) {
+
+ /* Do not check the invalid epid (it has a valid sub pointer). */
+ if ((epid == DUMMY_EPID) || (epid == INVALID_EPID))
+ continue;
+
+ /* Disable interrupts to block the isoc out descriptor interrupt handler
+ from being called while the isoc EPID list is being checked.
+ */
+ save_flags(flags);
+ cli();
+
+ if (TxIsocEPList[epid].sub == 0) {
+ /* Nothing here to see. */
+ restore_flags(flags);
+ continue;
+ }
+
+ /* Get the first urb (if any). */
+ urb = urb_list_first(epid);
+ if (urb == 0) {
+ warn("Ignoring NULL urb");
+ restore_flags(flags);
+ continue;
+ }
+ if (usb_pipein(urb->pipe)) {
+
+ /* Sanity check. */
+ assert(usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS);
+
+ urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ assert(urb_priv);
+
+ if (urb_priv->urb_state == NOT_STARTED) {
+
+ /* If ASAP is not set and urb->start_frame is the current frame,
+ start the transfer. */
+ if (!(urb->transfer_flags & URB_ISO_ASAP) &&
+ (urb->start_frame == (*R_USB_FM_NUMBER & 0x7ff))) {
+
+ dbg_isoc("Enabling isoc IN EP descr for epid %d", epid);
+ TxIsocEPList[epid].command |= IO_STATE(USB_EP_command, enable, yes);
+
+ /* This urb is now active. */
+ urb_priv->urb_state = STARTED;
+ continue;
+ }
+ }
+ }
+ restore_flags(flags);
+ }
+
+ DBFEXIT;
+
+}
+
+void etrax_usb_hc_bulk_eot_interrupt(int timer_induced)
+{
+ int epid;
+
+ /* The technique is to run one urb at a time, wait for the eot interrupt at which
+ point the EP descriptor has been disabled. */
+
+ DBFENTER;
+ dbg_bulk("bulk eot%s", timer_induced ? ", called by timer" : "");
+
+ for (epid = 0; epid < NBR_OF_EPIDS; epid++) {
+
+ if (!(TxBulkEPList[epid].command & IO_MASK(USB_EP_command, enable)) &&
+ (TxBulkEPList[epid].sub != 0)) {
+
+ struct urb *urb;
+ etrax_urb_priv_t *urb_priv;
+ unsigned long flags;
+ __u32 r_usb_ept_data;
+
+ /* Found a disabled EP descriptor which has a non-null sub pointer.
+ Verify that this ctrl EP descriptor got disabled no errors.
+ FIXME: Necessary to check error_code? */
+ dbg_bulk("for epid %d?", epid);
+
+ /* Get the first urb. */
+ urb = urb_list_first(epid);
+
+ /* FIXME: Could this happen for valid reasons? Why did it disappear? Because of
+ wrong unlinking? */
+ if (!urb) {
+ warn("NULL urb for epid %d", epid);
+ continue;
+ }
+
+ assert(urb);
+ urb_priv = (etrax_urb_priv_t *)urb->hcpriv;
+ assert(urb_priv);
+
+ /* Sanity checks. */
+ assert(usb_pipetype(urb->pipe) == PIPE_BULK);
+ if (phys_to_virt(TxBulkEPList[epid].sub) != urb_priv->last_sb) {
+ err("bulk endpoint got disabled before reaching last sb");
+ }
+
+ /* For bulk IN traffic, there seems to be a race condition between
+ between the bulk eot and eop interrupts, or rather an uncertainty regarding
+ the order in which they happen. Normally we expect the eop interrupt from
+ DMA channel 9 to happen before the eot interrupt.
+
+ Therefore, we complete the bulk IN urb in the rx interrupt handler instead. */
+
+ if (usb_pipein(urb->pipe)) {
+ dbg_bulk("in urb, continuing");
+ continue;
+ }
+
+ save_flags(flags);
+ cli();
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+ r_usb_ept_data = *R_USB_EPT_DATA;
+ restore_flags(flags);
+
+ if (IO_EXTRACT(R_USB_EPT_DATA, error_code, r_usb_ept_data) ==
+ IO_STATE_VALUE(R_USB_EPT_DATA, error_code, no_error)) {
+ /* This means that the endpoint has no error, is disabled
+ and had inserted traffic, i.e. transfer successfully completed. */
+ etrax_usb_complete_bulk_urb(urb, 0);
+ } else {
+ /* Shouldn't happen. We expect errors to be caught by epid attention. */
+ err("Found disabled bulk EP desc, error_code != no_error");
+ }
+ }
+ }
+
+ /* Normally, we should find (at least) one disabled EP descriptor with a valid sub pointer.
+ However, because of the uncertainty in the deliverance of the eop/eot interrupts, we may
+ not. Also, we might find two disabled EPs when handling an eot interrupt, and then find
+ none the next time. */
+
+ DBFEXIT;
+
+}
+
+void etrax_usb_hc_epid_attn_interrupt(usb_interrupt_registers_t *reg)
+{
+ /* This function handles the epid attention interrupt. There are a variety of reasons
+ for this interrupt to happen (Designer's Reference, p. 8 - 22 for the details):
+
+ invalid ep_id - Invalid epid in an EP (EP disabled).
+ stall - Not strictly an error condition (EP disabled).
+ 3rd error - Three successive transaction errors (EP disabled).
+ buffer ourun - Buffer overrun or underrun (EP disabled).
+ past eof1 - Intr or isoc transaction proceeds past EOF1.
+ near eof - Intr or isoc transaction would not fit inside the frame.
+ zout transfer - If zout transfer for a bulk endpoint (EP disabled).
+ setup transfer - If setup transfer for a non-ctrl endpoint (EP disabled). */
+
+ int epid;
+
+
+ DBFENTER;
+
+ assert(reg != NULL);
+
+ /* Note that we loop through all epids. We still want to catch errors for
+ the invalid one, even though we might handle them differently. */
+ for (epid = 0; epid < NBR_OF_EPIDS; epid++) {
+
+ if (test_bit(epid, (void *)&reg->r_usb_epid_attn)) {
+
+ struct urb *urb;
+ __u32 r_usb_ept_data;
+ unsigned long flags;
+ int error_code;
+
+ save_flags(flags);
+ cli();
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
+ nop();
+ /* Note that although there are separate R_USB_EPT_DATA and R_USB_EPT_DATA_ISO
+ registers, they are located at the same address and are of the same size.
+ In other words, this read should be ok for isoc also. */
+ r_usb_ept_data = *R_USB_EPT_DATA;
+ restore_flags(flags);
+
+ /* First some sanity checks. */
+ if (epid == INVALID_EPID) {
+ /* FIXME: What if it became disabled? Could seriously hurt interrupt
+ traffic. (Use do_intr_recover.) */
+ warn("Got epid_attn for INVALID_EPID (%d).", epid);
+ err("R_USB_EPT_DATA = 0x%x", r_usb_ept_data);
+ err("R_USB_STATUS = 0x%x", reg->r_usb_status);
+ continue;
+ } else if (epid == DUMMY_EPID) {
+ /* We definitely don't care about these ones. Besides, they are
+ always disabled, so any possible disabling caused by the
+ epid attention interrupt is irrelevant. */
+ warn("Got epid_attn for DUMMY_EPID (%d).", epid);
+ continue;
+ }
+
+ /* Get the first urb in the urb list for this epid. We blatantly assume
+ that only the first urb could have caused the epid attention.
+ (For bulk and ctrl, only one urb is active at any one time. For intr
+ and isoc we remove them once they are completed.) */
+ urb = urb_list_first(epid);
+
+ if (urb == NULL) {
+ err("Got epid_attn for epid %i with no urb.", epid);
+ err("R_USB_EPT_DATA = 0x%x", r_usb_ept_data);
+ err("R_USB_STATUS = 0x%x", reg->r_usb_status);
+ continue;
+ }
+
+ switch (usb_pipetype(urb->pipe)) {
+ case PIPE_BULK:
+ warn("Got epid attn for bulk endpoint, epid %d", epid);
+ break;
+ case PIPE_CONTROL:
+ warn("Got epid attn for control endpoint, epid %d", epid);
+ break;
+ case PIPE_INTERRUPT:
+ warn("Got epid attn for interrupt endpoint, epid %d", epid);
+ break;
+ case PIPE_ISOCHRONOUS:
+ warn("Got epid attn for isochronous endpoint, epid %d", epid);
+ break;
+ }
+
+ if (usb_pipetype(urb->pipe) != PIPE_ISOCHRONOUS) {
+ if (r_usb_ept_data & IO_MASK(R_USB_EPT_DATA, hold)) {
+ warn("Hold was set for epid %d.", epid);
+ continue;
+ }
+ }
+
+ /* Even though error_code occupies bits 22 - 23 in both R_USB_EPT_DATA and
+ R_USB_EPT_DATA_ISOC, we separate them here so we don't forget in other places. */
+ if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+ error_code = IO_EXTRACT(R_USB_EPT_DATA_ISO, error_code, r_usb_ept_data);
+ } else {
+ error_code = IO_EXTRACT(R_USB_EPT_DATA, error_code, r_usb_ept_data);
+ }
+
+ /* Using IO_STATE_VALUE on R_USB_EPT_DATA should be ok for isoc also. */
+ if (error_code == IO_STATE_VALUE(R_USB_EPT_DATA, error_code, no_error)) {
+
+ /* Isoc traffic doesn't have error_count_in/error_count_out. */
+ if ((usb_pipetype(urb->pipe) != PIPE_ISOCHRONOUS) &&
+ (IO_EXTRACT(R_USB_EPT_DATA, error_count_in, r_usb_ept_data) == 3 ||
+ IO_EXTRACT(R_USB_EPT_DATA, error_count_out, r_usb_ept_data) == 3)) {
+ /* 3rd error. */
+ warn("3rd error for epid %i", epid);
+ etrax_usb_complete_urb(urb, -EPROTO);
+
+ } else if (reg->r_usb_status & IO_MASK(R_USB_STATUS, perror)) {
+
+ warn("Perror for epid %d", epid);
+
+ if (!(r_usb_ept_data & IO_MASK(R_USB_EPT_DATA, valid))) {
+ /* invalid ep_id */
+ panic("Perror because of invalid epid."
+ " Deconfigured too early?");
+ } else {
+ /* past eof1, near eof, zout transfer, setup transfer */
+
+ /* Dump the urb and the relevant EP descriptor list. */
+
+ __dump_urb(urb);
+ __dump_ept_data(epid);
+ __dump_ep_list(usb_pipetype(urb->pipe));
+
+ panic("Something wrong with DMA descriptor contents."
+ " Too much traffic inserted?");
+ }
+ } else if (reg->r_usb_status & IO_MASK(R_USB_STATUS, ourun)) {
+ /* buffer ourun */
+ panic("Buffer overrun/underrun for epid %d. DMA too busy?", epid);
+ }
+
+ } else if (error_code == IO_STATE_VALUE(R_USB_EPT_DATA, error_code, stall)) {
+ /* Not really a protocol error, just says that the endpoint gave
+ a stall response. Note that error_code cannot be stall for isoc. */
+ if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+ panic("Isoc traffic cannot stall");
+ }
+
+ warn("Stall for epid %d", epid);
+ etrax_usb_complete_urb(urb, -EPIPE);
+
+ } else if (error_code == IO_STATE_VALUE(R_USB_EPT_DATA, error_code, bus_error)) {
+ /* Two devices responded to a transaction request. Must be resolved
+ by software. FIXME: Reset ports? */
+ panic("Bus error for epid %d."
+ " Two devices responded to transaction request",
+ epid);
+
+ } else if (error_code == IO_STATE_VALUE(R_USB_EPT_DATA, error_code, buffer_error)) {
+ /* DMA overrun or underrun. */
+ warn("Buffer overrun/underrun for epid %d. DMA too busy?", epid);
+
+ /* It seems that error_code = buffer_error in
+ R_USB_EPT_DATA/R_USB_EPT_DATA_ISO and ourun = yes in R_USB_STATUS
+ are the same error. */
+ etrax_usb_complete_urb(urb, -EPROTO);
+ }
+ }
+ }
+
+ DBFEXIT;
+
+}
+
+void etrax_usb_bulk_start_timer_func(unsigned long dummy)
+{
+
+ /* We might enable an EP descriptor behind the current DMA position when it's about
+ to decide that there are no more bulk traffic and it should stop the bulk channel.
+ Therefore we periodically check if the bulk channel is stopped and there is an
+ enabled bulk EP descriptor, in which case we start the bulk channel. */
+ dbg_bulk("bulk_start_timer timed out.");
+
+ if (!(*R_DMA_CH8_SUB0_CMD & IO_MASK(R_DMA_CH8_SUB0_CMD, cmd))) {
+ int epid;
+
+ dbg_bulk("Bulk DMA channel not running.");
+
+ for (epid = 0; epid < NBR_OF_EPIDS; epid++) {
+ if (TxBulkEPList[epid].command & IO_MASK(USB_EP_command, enable)) {
+ dbg_bulk("Found enabled EP for epid %d, starting bulk channel.\n",
+ epid);
+ *R_DMA_CH8_SUB0_CMD = IO_STATE(R_DMA_CH8_SUB0_CMD, cmd, start);
+
+ /* Restart the bulk eot timer since we just started the bulk channel. */
+ mod_timer(&bulk_eot_timer, jiffies + BULK_EOT_TIMER_INTERVAL);
+
+ /* No need to search any further. */
+ break;
+ }
+ }
+ } else {
+ dbg_bulk("Bulk DMA channel running.");
+ }
+}
+
+void etrax_usb_hc_port_status_interrupt(usb_interrupt_registers_t *reg)
+{
+ etrax_hc_t *hc = reg->hc;
+ __u16 r_usb_rh_port_status_1 = reg->r_usb_rh_port_status_1;
+ __u16 r_usb_rh_port_status_2 = reg->r_usb_rh_port_status_2;
+
+ DBFENTER;
+
+ /* The Etrax RH does not include a wPortChange register, so this has to be handled in software
+ (by saving the old port status value for comparison when the port status interrupt happens).
+ See section 11.16.2.6.2 in the USB 1.1 spec for details. */
+
+ dbg_rh("hc->rh.prev_wPortStatus_1 = 0x%x", hc->rh.prev_wPortStatus_1);
+ dbg_rh("hc->rh.prev_wPortStatus_2 = 0x%x", hc->rh.prev_wPortStatus_2);
+ dbg_rh("r_usb_rh_port_status_1 = 0x%x", r_usb_rh_port_status_1);
+ dbg_rh("r_usb_rh_port_status_2 = 0x%x", r_usb_rh_port_status_2);
+
+ /* C_PORT_CONNECTION is set on any transition. */
+ hc->rh.wPortChange_1 |=
+ ((r_usb_rh_port_status_1 & (1 << RH_PORT_CONNECTION)) !=
+ (hc->rh.prev_wPortStatus_1 & (1 << RH_PORT_CONNECTION))) ?
+ (1 << RH_PORT_CONNECTION) : 0;
+
+ hc->rh.wPortChange_2 |=
+ ((r_usb_rh_port_status_2 & (1 << RH_PORT_CONNECTION)) !=
+ (hc->rh.prev_wPortStatus_2 & (1 << RH_PORT_CONNECTION))) ?
+ (1 << RH_PORT_CONNECTION) : 0;
+
+ /* C_PORT_ENABLE is _only_ set on a one to zero transition, i.e. when
+ the port is disabled, not when it's enabled. */
+ hc->rh.wPortChange_1 |=
+ ((hc->rh.prev_wPortStatus_1 & (1 << RH_PORT_ENABLE))
+ && !(r_usb_rh_port_status_1 & (1 << RH_PORT_ENABLE))) ?
+ (1 << RH_PORT_ENABLE) : 0;
+
+ hc->rh.wPortChange_2 |=
+ ((hc->rh.prev_wPortStatus_2 & (1 << RH_PORT_ENABLE))
+ && !(r_usb_rh_port_status_2 & (1 << RH_PORT_ENABLE))) ?
+ (1 << RH_PORT_ENABLE) : 0;
+
+ /* C_PORT_SUSPEND is set to one when the device has transitioned out
+ of the suspended state, i.e. when suspend goes from one to zero. */
+ hc->rh.wPortChange_1 |=
+ ((hc->rh.prev_wPortStatus_1 & (1 << RH_PORT_SUSPEND))
+ && !(r_usb_rh_port_status_1 & (1 << RH_PORT_SUSPEND))) ?
+ (1 << RH_PORT_SUSPEND) : 0;
+
+ hc->rh.wPortChange_2 |=
+ ((hc->rh.prev_wPortStatus_2 & (1 << RH_PORT_SUSPEND))
+ && !(r_usb_rh_port_status_2 & (1 << RH_PORT_SUSPEND))) ?
+ (1 << RH_PORT_SUSPEND) : 0;
+
+
+ /* C_PORT_RESET is set when reset processing on this port is complete. */
+ hc->rh.wPortChange_1 |=
+ ((hc->rh.prev_wPortStatus_1 & (1 << RH_PORT_RESET))
+ && !(r_usb_rh_port_status_1 & (1 << RH_PORT_RESET))) ?
+ (1 << RH_PORT_RESET) : 0;
+
+ hc->rh.wPortChange_2 |=
+ ((hc->rh.prev_wPortStatus_2 & (1 << RH_PORT_RESET))
+ && !(r_usb_rh_port_status_2 & (1 << RH_PORT_RESET))) ?
+ (1 << RH_PORT_RESET) : 0;
+
+ /* Save the new values for next port status change. */
+ hc->rh.prev_wPortStatus_1 = r_usb_rh_port_status_1;
+ hc->rh.prev_wPortStatus_2 = r_usb_rh_port_status_2;
+
+ dbg_rh("hc->rh.wPortChange_1 set to 0x%x", hc->rh.wPortChange_1);
+ dbg_rh("hc->rh.wPortChange_2 set to 0x%x", hc->rh.wPortChange_2);
+
+ DBFEXIT;
+
+}
+
+void etrax_usb_hc_ctl_status_interrupt(usb_interrupt_registers_t *reg)
+{
+ DBFENTER;
+
+ /* FIXME: What should we do if we get ourun or perror? Dump the EP and SB
+ list for the corresponding epid? */
+ if (reg->r_usb_status & IO_MASK(R_USB_STATUS, ourun)) {
+ panic("USB controller got ourun.");
+ }
+ if (reg->r_usb_status & IO_MASK(R_USB_STATUS, perror)) {
+
+ /* Before, etrax_usb_do_intr_recover was called on this epid if it was
+ an interrupt pipe. I don't see how re-enabling all EP descriptors
+ will help if there was a programming error. */
+ panic("USB controller got perror.");
+ }
+
+ if (reg->r_usb_status & IO_MASK(R_USB_STATUS, device_mode)) {
+ /* We should never operate in device mode. */
+ panic("USB controller in device mode.");
+ }
+
+ /* These if-statements could probably be nested. */
+ if (reg->r_usb_status & IO_MASK(R_USB_STATUS, host_mode)) {
+ info("USB controller in host mode.");
+ }
+ if (reg->r_usb_status & IO_MASK(R_USB_STATUS, started)) {
+ info("USB controller started.");
+ }
+ if (reg->r_usb_status & IO_MASK(R_USB_STATUS, running)) {
+ info("USB controller running.");
+ }
+
+ DBFEXIT;
+
+}
+
+
+static int etrax_rh_submit_urb(struct urb *urb)
+{
+ struct usb_device *usb_dev = urb->dev;
+ etrax_hc_t *hc = 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;
+ int stat = 0;
+
+ __u16 bmRType_bReq;
+ __u16 wValue;
+ __u16 wIndex;
+ __u16 wLength;
+
+ DBFENTER;
+
+ /* FIXME: What is this interrupt urb that is sent to the root hub? */
+ if (usb_pipetype (pipe) == PIPE_INTERRUPT) {
+ dbg_rh("Root-Hub submit IRQ: every %d ms", urb->interval);
+ hc->rh.urb = urb;
+ hc->rh.send = 1;
+ /* FIXME: We could probably remove this line since it's done
+ in etrax_rh_init_int_timer. (Don't remove it from
+ etrax_rh_init_int_timer though.) */
+ hc->rh.interval = urb->interval;
+ etrax_rh_init_int_timer(urb);
+ DBFEXIT;
+
+ 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);
+
+ dbg_rh("bmRType_bReq : 0x%04x (%d)", bmRType_bReq, bmRType_bReq);
+ dbg_rh("wValue : 0x%04x (%d)", wValue, wValue);
+ dbg_rh("wIndex : 0x%04x (%d)", wIndex, wIndex);
+ dbg_rh("wLength : 0x%04x (%d)", wLength, wLength);
+
+ switch (bmRType_bReq) {
+
+ /* Request Destination:
+ without flags: Device,
+ RH_INTERFACE: interface,
+ RH_ENDPOINT: endpoint,
+ RH_CLASS means HUB here,
+ RH_OTHER | RH_CLASS almost ever means HUB_PORT here
+ */
+
+ case RH_GET_STATUS:
+ *(__u16 *) data = cpu_to_le16 (1);
+ OK (2);
+
+ case RH_GET_STATUS | RH_INTERFACE:
+ *(__u16 *) data = cpu_to_le16 (0);
+ OK (2);
+
+ case RH_GET_STATUS | RH_ENDPOINT:
+ *(__u16 *) data = cpu_to_le16 (0);
+ OK (2);
+
+ case RH_GET_STATUS | RH_CLASS:
+ *(__u32 *) data = cpu_to_le32 (0);
+ OK (4); /* hub power ** */
+
+ case RH_GET_STATUS | RH_OTHER | RH_CLASS:
+ if (wIndex == 1) {
+ *((__u16*)data) = cpu_to_le16(hc->rh.prev_wPortStatus_1);
+ *((__u16*)data + 1) = cpu_to_le16(hc->rh.wPortChange_1);
+ } else if (wIndex == 2) {
+ *((__u16*)data) = cpu_to_le16(hc->rh.prev_wPortStatus_2);
+ *((__u16*)data + 1) = cpu_to_le16(hc->rh.wPortChange_2);
+ } else {
+ dbg_rh("RH_GET_STATUS whith invalid wIndex!");
+ OK(0);
+ }
+
+ OK(4);
+
+ case RH_CLEAR_FEATURE | RH_ENDPOINT:
+ switch (wValue) {
+ case (RH_ENDPOINT_STALL):
+ OK (0);
+ }
+ break;
+
+ case RH_CLEAR_FEATURE | RH_CLASS:
+ switch (wValue) {
+ case (RH_C_HUB_OVER_CURRENT):
+ OK (0); /* hub power over current ** */
+ }
+ break;
+
+ case RH_CLEAR_FEATURE | RH_OTHER | RH_CLASS:
+ switch (wValue) {
+ case (RH_PORT_ENABLE):
+ if (wIndex == 1) {
+
+ dbg_rh("trying to do disable port 1");
+
+ *R_USB_PORT1_DISABLE = IO_STATE(R_USB_PORT1_DISABLE, disable, yes);
+
+ while (hc->rh.prev_wPortStatus_1 &
+ IO_STATE(R_USB_RH_PORT_STATUS_1, enabled, yes));
+ *R_USB_PORT1_DISABLE = IO_STATE(R_USB_PORT1_DISABLE, disable, no);
+ dbg_rh("Port 1 is disabled");
+
+ } else if (wIndex == 2) {
+
+ dbg_rh("trying to do disable port 2");
+
+ *R_USB_PORT2_DISABLE = IO_STATE(R_USB_PORT2_DISABLE, disable, yes);
+
+ while (hc->rh.prev_wPortStatus_2 &
+ IO_STATE(R_USB_RH_PORT_STATUS_2, enabled, yes));
+ *R_USB_PORT2_DISABLE = IO_STATE(R_USB_PORT2_DISABLE, disable, no);
+ dbg_rh("Port 2 is disabled");
+
+ } else {
+ dbg_rh("RH_CLEAR_FEATURE->RH_PORT_ENABLE "
+ "with invalid wIndex == %d!", wIndex);
+ }
+
+ OK (0);
+ case (RH_PORT_SUSPEND):
+ /* Opposite to suspend should be resume, so we'll do a resume. */
+ /* FIXME: USB 1.1, 11.16.2.2 says:
+ "Clearing the PORT_SUSPEND feature causes a host-initiated resume
+ on the specified port. If the port is not in the Suspended state,
+ the hub should treat this request as a functional no-operation."
+ Shouldn't we check if the port is in a suspended state before
+ resuming? */
+
+ /* Make sure the controller isn't busy. */
+ while (*R_USB_COMMAND & IO_MASK(R_USB_COMMAND, busy));
+
+ if (wIndex == 1) {
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, port1) |
+ IO_STATE(R_USB_COMMAND, port_cmd, resume) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, nop);
+ } else if (wIndex == 2) {
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, port2) |
+ IO_STATE(R_USB_COMMAND, port_cmd, resume) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, nop);
+ } else {
+ dbg_rh("RH_CLEAR_FEATURE->RH_PORT_SUSPEND "
+ "with invalid wIndex == %d!", wIndex);
+ }
+
+ OK (0);
+ case (RH_PORT_POWER):
+ OK (0); /* port power ** */
+ case (RH_C_PORT_CONNECTION):
+ if (wIndex == 1) {
+ hc->rh.wPortChange_1 &= ~(1 << RH_PORT_CONNECTION);
+ } else if (wIndex == 2) {
+ hc->rh.wPortChange_2 &= ~(1 << RH_PORT_CONNECTION);
+ } else {
+ dbg_rh("RH_CLEAR_FEATURE->RH_C_PORT_CONNECTION "
+ "with invalid wIndex == %d!", wIndex);
+ }
+
+ OK (0);
+ case (RH_C_PORT_ENABLE):
+ if (wIndex == 1) {
+ hc->rh.wPortChange_1 &= ~(1 << RH_PORT_ENABLE);
+ } else if (wIndex == 2) {
+ hc->rh.wPortChange_2 &= ~(1 << RH_PORT_ENABLE);
+ } else {
+ dbg_rh("RH_CLEAR_FEATURE->RH_C_PORT_ENABLE "
+ "with invalid wIndex == %d!", wIndex);
+ }
+ OK (0);
+ case (RH_C_PORT_SUSPEND):
+/*** WR_RH_PORTSTAT(RH_PS_PSSC); */
+ OK (0);
+ case (RH_C_PORT_OVER_CURRENT):
+ OK (0); /* port power over current ** */
+ case (RH_C_PORT_RESET):
+ if (wIndex == 1) {
+ hc->rh.wPortChange_1 &= ~(1 << RH_PORT_RESET);
+ } else if (wIndex == 2) {
+ hc->rh.wPortChange_2 &= ~(1 << RH_PORT_RESET);
+ } else {
+ dbg_rh("RH_CLEAR_FEATURE->RH_C_PORT_RESET "
+ "with invalid index == %d!", wIndex);
+ }
+
+ OK (0);
+
+ }
+ break;
+
+ case RH_SET_FEATURE | RH_OTHER | RH_CLASS:
+ switch (wValue) {
+ case (RH_PORT_SUSPEND):
+
+ /* Make sure the controller isn't busy. */
+ while (*R_USB_COMMAND & IO_MASK(R_USB_COMMAND, busy));
+
+ if (wIndex == 1) {
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, port1) |
+ IO_STATE(R_USB_COMMAND, port_cmd, suspend) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, nop);
+ } else if (wIndex == 2) {
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, port2) |
+ IO_STATE(R_USB_COMMAND, port_cmd, suspend) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, nop);
+ } else {
+ dbg_rh("RH_SET_FEATURE->RH_PORT_SUSPEND "
+ "with invalid wIndex == %d!", wIndex);
+ }
+
+ OK (0);
+ case (RH_PORT_RESET):
+ if (wIndex == 1) {
+
+ port_1_reset:
+ dbg_rh("Doing reset of port 1");
+
+ /* Make sure the controller isn't busy. */
+ while (*R_USB_COMMAND & IO_MASK(R_USB_COMMAND, busy));
+
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, port1) |
+ IO_STATE(R_USB_COMMAND, port_cmd, reset) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, nop);
+
+ /* We must wait at least 10 ms for the device to recover.
+ 15 ms should be enough. */
+ udelay(15000);
+
+ /* Wait for reset bit to go low (should be done by now). */
+ while (hc->rh.prev_wPortStatus_1 &
+ IO_STATE(R_USB_RH_PORT_STATUS_1, reset, yes));
+
+ /* If the port status is
+ 1) connected and enabled then there is a device and everything is fine
+ 2) neither connected nor enabled then there is no device, also fine
+ 3) connected and not enabled then we try again
+ (Yes, there are other port status combinations besides these.) */
+
+ if ((hc->rh.prev_wPortStatus_1 &
+ IO_STATE(R_USB_RH_PORT_STATUS_1, connected, yes)) &&
+ (hc->rh.prev_wPortStatus_1 &
+ IO_STATE(R_USB_RH_PORT_STATUS_1, enabled, no))) {
+ dbg_rh("Connected device on port 1, but port not enabled?"
+ " Trying reset again.");
+ goto port_2_reset;
+ }
+
+ /* Diagnostic printouts. */
+ if ((hc->rh.prev_wPortStatus_1 &
+ IO_STATE(R_USB_RH_PORT_STATUS_1, connected, no)) &&
+ (hc->rh.prev_wPortStatus_1 &
+ IO_STATE(R_USB_RH_PORT_STATUS_1, enabled, no))) {
+ dbg_rh("No connected device on port 1");
+ } else if ((hc->rh.prev_wPortStatus_1 &
+ IO_STATE(R_USB_RH_PORT_STATUS_1, connected, yes)) &&
+ (hc->rh.prev_wPortStatus_1 &
+ IO_STATE(R_USB_RH_PORT_STATUS_1, enabled, yes))) {
+ dbg_rh("Connected device on port 1, port 1 enabled");
+ }
+
+ } else if (wIndex == 2) {
+
+ port_2_reset:
+ dbg_rh("Doing reset of port 2");
+
+ /* Make sure the controller isn't busy. */
+ while (*R_USB_COMMAND & IO_MASK(R_USB_COMMAND, busy));
+
+ /* Issue the reset command. */
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, port2) |
+ IO_STATE(R_USB_COMMAND, port_cmd, reset) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, nop);
+
+ /* We must wait at least 10 ms for the device to recover.
+ 15 ms should be enough. */
+ udelay(15000);
+
+ /* Wait for reset bit to go low (should be done by now). */
+ while (hc->rh.prev_wPortStatus_2 &
+ IO_STATE(R_USB_RH_PORT_STATUS_2, reset, yes));
+
+ /* If the port status is
+ 1) connected and enabled then there is a device and everything is fine
+ 2) neither connected nor enabled then there is no device, also fine
+ 3) connected and not enabled then we try again
+ (Yes, there are other port status combinations besides these.) */
+
+ if ((hc->rh.prev_wPortStatus_2 &
+ IO_STATE(R_USB_RH_PORT_STATUS_2, connected, yes)) &&
+ (hc->rh.prev_wPortStatus_2 &
+ IO_STATE(R_USB_RH_PORT_STATUS_2, enabled, no))) {
+ dbg_rh("Connected device on port 2, but port not enabled?"
+ " Trying reset again.");
+ goto port_2_reset;
+ }
+
+ /* Diagnostic printouts. */
+ if ((hc->rh.prev_wPortStatus_2 &
+ IO_STATE(R_USB_RH_PORT_STATUS_2, connected, no)) &&
+ (hc->rh.prev_wPortStatus_2 &
+ IO_STATE(R_USB_RH_PORT_STATUS_2, enabled, no))) {
+ dbg_rh("No connected device on port 2");
+ } else if ((hc->rh.prev_wPortStatus_2 &
+ IO_STATE(R_USB_RH_PORT_STATUS_2, connected, yes)) &&
+ (hc->rh.prev_wPortStatus_2 &
+ IO_STATE(R_USB_RH_PORT_STATUS_2, enabled, yes))) {
+ dbg_rh("Connected device on port 2, port 2 enabled");
+ }
+
+ } else {
+ dbg_rh("RH_SET_FEATURE->RH_PORT_RESET with invalid wIndex = %d", wIndex);
+ }
+
+ /* Make sure the controller isn't busy. */
+ while (*R_USB_COMMAND & IO_MASK(R_USB_COMMAND, busy));
+
+ /* If all enabled ports were disabled the host controller goes down into
+ started mode, so we need to bring it back into the running state.
+ (This is safe even if it's already in the running state.) */
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, nop) |
+ IO_STATE(R_USB_COMMAND, port_cmd, reset) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, host_run);
+
+ dbg_rh("...Done");
+ OK(0);
+
+ case (RH_PORT_POWER):
+ OK (0); /* port power ** */
+ case (RH_PORT_ENABLE):
+ /* There is no port enable command in the host controller, so if the
+ port is already enabled, we do nothing. If not, we reset the port
+ (with an ugly goto). */
+
+ if (wIndex == 1) {
+ if (hc->rh.prev_wPortStatus_1 &
+ IO_STATE(R_USB_RH_PORT_STATUS_1, enabled, no)) {
+ goto port_1_reset;
+ }
+ } else if (wIndex == 2) {
+ if (hc->rh.prev_wPortStatus_2 &
+ IO_STATE(R_USB_RH_PORT_STATUS_2, enabled, no)) {
+ goto port_2_reset;
+ }
+ } else {
+ dbg_rh("RH_SET_FEATURE->RH_GET_STATUS with invalid wIndex = %d", wIndex);
+ }
+ OK (0);
+ }
+ break;
+
+ case RH_SET_ADDRESS:
+ hc->rh.devnum = wValue;
+ dbg_rh("RH address set to: %d", hc->rh.devnum);
+ OK (0);
+
+ case RH_GET_DESCRIPTOR:
+ switch ((wValue & 0xff00) >> 8) {
+ case (0x01): /* device descriptor */
+ len = min_t(unsigned int, leni, min_t(unsigned int, sizeof (root_hub_dev_des), wLength));
+ memcpy (data, root_hub_dev_des, len);
+ OK (len);
+ case (0x02): /* configuration descriptor */
+ len = min_t(unsigned int, leni, min_t(unsigned int, sizeof (root_hub_config_des), wLength));
+ memcpy (data, root_hub_config_des, len);
+ OK (len);
+ case (0x03): /* string descriptors */
+ len = usb_root_hub_string (wValue & 0xff,
+ 0xff, "ETRAX 100LX",
+ data, wLength);
+ if (len > 0) {
+ OK(min(leni, len));
+ } else {
+ stat = -EPIPE;
+ }
+
+ }
+ break;
+
+ case RH_GET_DESCRIPTOR | RH_CLASS:
+ root_hub_hub_des[2] = hc->rh.numports;
+ len = min_t(unsigned int, leni, min_t(unsigned int, sizeof (root_hub_hub_des), wLength));
+ memcpy (data, root_hub_hub_des, len);
+ OK (len);
+
+ case RH_GET_CONFIGURATION:
+ *(__u8 *) data = 0x01;
+ OK (1);
+
+ case RH_SET_CONFIGURATION:
+ OK (0);
+
+ default:
+ stat = -EPIPE;
+ }
+
+ urb->actual_length = len;
+ urb->status = stat;
+ urb->dev = NULL;
+ if (urb->complete) {
+ urb->complete(urb, NULL);
+ }
+ DBFEXIT;
+
+ return 0;
+}
+
+static void
+etrax_usb_bulk_eot_timer_func(unsigned long dummy)
+{
+ /* Because of a race condition in the top half, we might miss a bulk eot.
+ This timer "simulates" a bulk eot if we don't get one for a while, hopefully
+ correcting the situation. */
+ dbg_bulk("bulk_eot_timer timed out.");
+ etrax_usb_hc_bulk_eot_interrupt(1);
+}
+
+static void*
+etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, int mem_flags, dma_addr_t *dma)
+{
+ return kmalloc(size, mem_flags);
+}
+
+static void
+etrax_usb_buffer_free(struct usb_bus *bus, size_t size, void *addr, dma_addr_t dma)
+{
+ kfree(addr);
+}
+
+
+static struct device fake_device;
+
+static int __init etrax_usb_hc_init(void)
+{
+ static etrax_hc_t *hc;
+ struct usb_bus *bus;
+ struct usb_device *usb_rh;
+ int i;
+
+ DBFENTER;
+
+ info("ETRAX 100LX USB-HCD %s (c) 2001-2003 Axis Communications AB\n", usb_hcd_version);
+
+ hc = kmalloc(sizeof(etrax_hc_t), GFP_KERNEL);
+ assert(hc != NULL);
+
+ /* We use kmem_cache_* to make sure that all DMA desc. are dword aligned */
+ /* Note that we specify sizeof(USB_EP_Desc_t) as the size, but also allocate
+ SB descriptors from this cache. This is ok since sizeof(USB_EP_Desc_t) ==
+ sizeof(USB_SB_Desc_t). */
+
+ usb_desc_cache = kmem_cache_create("usb_desc_cache", sizeof(USB_EP_Desc_t), 0,
+ SLAB_HWCACHE_ALIGN, 0, 0);
+ assert(usb_desc_cache != NULL);
+
+ top_half_reg_cache = kmem_cache_create("top_half_reg_cache",
+ sizeof(usb_interrupt_registers_t),
+ 0, SLAB_HWCACHE_ALIGN, 0, 0);
+ assert(top_half_reg_cache != NULL);
+
+ isoc_compl_cache = kmem_cache_create("isoc_compl_cache",
+ sizeof(usb_isoc_complete_data_t),
+ 0, SLAB_HWCACHE_ALIGN, 0, 0);
+ assert(isoc_compl_cache != NULL);
+
+ etrax_usb_bus = bus = usb_alloc_bus(&etrax_usb_device_operations);
+ hc->bus = bus;
+ bus->bus_name="ETRAX 100LX";
+ bus->hcpriv = hc;
+
+ /* Initalize RH to the default address.
+ And make sure that we have no status change indication */
+ hc->rh.numports = 2; /* The RH has two ports */
+ hc->rh.devnum = 1;
+ hc->rh.wPortChange_1 = 0;
+ hc->rh.wPortChange_2 = 0;
+
+ /* Also initate the previous values to zero */
+ hc->rh.prev_wPortStatus_1 = 0;
+ hc->rh.prev_wPortStatus_2 = 0;
+
+ /* Initialize the intr-traffic flags */
+ /* FIXME: This isn't used. (Besides, the error field isn't initialized.) */
+ hc->intr.sleeping = 0;
+ hc->intr.wq = NULL;
+
+ epid_usage_bitmask = 0;
+ epid_out_traffic = 0;
+
+ /* Mark the invalid epid as being used. */
+ set_bit(INVALID_EPID, (void *)&epid_usage_bitmask);
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, INVALID_EPID);
+ nop();
+ /* The valid bit should still be set ('invalid' is in our world; not the hardware's). */
+ *R_USB_EPT_DATA = (IO_STATE(R_USB_EPT_DATA, valid, yes) |
+ IO_FIELD(R_USB_EPT_DATA, max_len, 1));
+
+ /* Mark the dummy epid as being used. */
+ set_bit(DUMMY_EPID, (void *)&epid_usage_bitmask);
+ *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, DUMMY_EPID);
+ nop();
+ *R_USB_EPT_DATA = (IO_STATE(R_USB_EPT_DATA, valid, no) |
+ IO_FIELD(R_USB_EPT_DATA, max_len, 1));
+
+ /* Initialize the urb list by initiating a head for each list. */
+ for (i = 0; i < NBR_OF_EPIDS; i++) {
+ INIT_LIST_HEAD(&urb_list[i]);
+ }
+ spin_lock_init(&urb_list_lock);
+
+ INIT_LIST_HEAD(&urb_unlink_list);
+
+
+ /* Initiate the bulk start timer. */
+ init_timer(&bulk_start_timer);
+ bulk_start_timer.expires = jiffies + BULK_START_TIMER_INTERVAL;
+ bulk_start_timer.function = etrax_usb_bulk_start_timer_func;
+ add_timer(&bulk_start_timer);
+
+
+ /* Initiate the bulk eot timer. */
+ init_timer(&bulk_eot_timer);
+ bulk_eot_timer.expires = jiffies + BULK_EOT_TIMER_INTERVAL;
+ bulk_eot_timer.function = etrax_usb_bulk_eot_timer_func;
+ add_timer(&bulk_eot_timer);
+
+ /* Set up the data structures for USB traffic. Note that this must be done before
+ any interrupt that relies on sane DMA list occurrs. */
+ init_rx_buffers();
+ init_tx_bulk_ep();
+ init_tx_ctrl_ep();
+ init_tx_intr_ep();
+ init_tx_isoc_ep();
+
+ device_initialize(&fake_device);
+ kobject_set_name(&fake_device.kobj, "etrax_usb");
+ kobject_add(&fake_device.kobj);
+ hc->bus->controller = &fake_device;
+ usb_register_bus(hc->bus);
+
+ *R_IRQ_MASK2_SET =
+ /* Note that these interrupts are not used. */
+ IO_STATE(R_IRQ_MASK2_SET, dma8_sub0_descr, set) |
+ /* Sub channel 1 (ctrl) descr. interrupts are used. */
+ IO_STATE(R_IRQ_MASK2_SET, dma8_sub1_descr, set) |
+ IO_STATE(R_IRQ_MASK2_SET, dma8_sub2_descr, set) |
+ /* Sub channel 3 (isoc) descr. interrupts are used. */
+ IO_STATE(R_IRQ_MASK2_SET, dma8_sub3_descr, set);
+
+ /* Note that the dma9_descr interrupt is not used. */
+ *R_IRQ_MASK2_SET =
+ IO_STATE(R_IRQ_MASK2_SET, dma9_eop, set) |
+ IO_STATE(R_IRQ_MASK2_SET, dma9_descr, set);
+
+ /* FIXME: Enable iso_eof only when isoc traffic is running. */
+ *R_USB_IRQ_MASK_SET =
+ IO_STATE(R_USB_IRQ_MASK_SET, iso_eof, set) |
+ IO_STATE(R_USB_IRQ_MASK_SET, bulk_eot, set) |
+ IO_STATE(R_USB_IRQ_MASK_SET, epid_attn, set) |
+ IO_STATE(R_USB_IRQ_MASK_SET, port_status, set) |
+ IO_STATE(R_USB_IRQ_MASK_SET, ctl_status, set);
+
+
+ if (request_irq(ETRAX_USB_HC_IRQ, etrax_usb_hc_interrupt_top_half, 0,
+ "ETRAX 100LX built-in USB (HC)", hc)) {
+ err("Could not allocate IRQ %d for USB", ETRAX_USB_HC_IRQ);
+ etrax_usb_hc_cleanup();
+ DBFEXIT;
+ return -1;
+ }
+
+ if (request_irq(ETRAX_USB_RX_IRQ, etrax_usb_rx_interrupt, 0,
+ "ETRAX 100LX built-in USB (Rx)", hc)) {
+ err("Could not allocate IRQ %d for USB", ETRAX_USB_RX_IRQ);
+ etrax_usb_hc_cleanup();
+ DBFEXIT;
+ return -1;
+ }
+
+ if (request_irq(ETRAX_USB_TX_IRQ, etrax_usb_tx_interrupt, 0,
+ "ETRAX 100LX built-in USB (Tx)", hc)) {
+ err("Could not allocate IRQ %d for USB", ETRAX_USB_TX_IRQ);
+ etrax_usb_hc_cleanup();
+ DBFEXIT;
+ return -1;
+ }
+
+ /* R_USB_COMMAND:
+ USB commands in host mode. The fields in this register should all be
+ written to in one write. Do not read-modify-write one field at a time. A
+ write to this register will trigger events in the USB controller and an
+ incomplete command may lead to unpredictable results, and in worst case
+ even to a deadlock in the controller.
+ (Note however that the busy field is read-only, so no need to write to it.) */
+
+ /* Check the busy bit before writing to R_USB_COMMAND. */
+
+ while (*R_USB_COMMAND & IO_MASK(R_USB_COMMAND, busy));
+
+ /* Reset the USB interface. */
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, nop) |
+ IO_STATE(R_USB_COMMAND, port_cmd, reset) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, reset);
+
+ /* Designer's Reference, p. 8 - 10 says we should Initate R_USB_FM_PSTART to 0x2A30 (10800),
+ to guarantee that control traffic gets 10% of the bandwidth, and periodic transfer may
+ allocate the rest (90%). This doesn't work though. Read on for a lenghty explanation.
+
+ While there is a difference between rev. 2 and rev. 3 of the ETRAX 100LX regarding the NAK
+ behaviour, it doesn't solve this problem. What happens is that a control transfer will not
+ be interrupted in its data stage when PSTART happens (the point at which periodic traffic
+ is started). Thus, if PSTART is set to 10800 and its IN or OUT token is NAKed until just before
+ PSTART happens, it will continue the IN/OUT transfer as long as it's ACKed. After it's done,
+ there may be too little time left for an isochronous transfer, causing an epid attention
+ interrupt due to perror. The work-around for this is to let the control transfers run at the
+ end of the frame instead of at the beginning, and will be interrupted just fine if it doesn't
+ fit into the frame. However, since there will *always* be a control transfer at the beginning
+ of the frame, regardless of what we set PSTART to, that transfer might be a 64-byte transfer
+ which consumes up to 15% of the frame, leaving only 85% for periodic traffic. The solution to
+ this would be to 'dummy allocate' 5% of the frame with the usb_claim_bandwidth function to make
+ sure that the periodic transfers that are inserted will always fit in the frame.
+
+ The idea was suggested that a control transfer could be split up into several 8 byte transfers,
+ so that it would be interrupted by PSTART, but since this can't be done for an IN transfer this
+ hasn't been implemented.
+
+ The value 11960 is chosen to be just after the SOF token, with a couple of bit times extra
+ for possible bit stuffing. */
+
+ *R_USB_FM_PSTART = IO_FIELD(R_USB_FM_PSTART, value, 11960);
+
+#ifdef CONFIG_ETRAX_USB_HOST_PORT1
+ *R_USB_PORT1_DISABLE = IO_STATE(R_USB_PORT1_DISABLE, disable, no);
+#endif
+
+#ifdef CONFIG_ETRAX_USB_HOST_PORT2
+ *R_USB_PORT2_DISABLE = IO_STATE(R_USB_PORT2_DISABLE, disable, no);
+#endif
+
+ while (*R_USB_COMMAND & IO_MASK(R_USB_COMMAND, busy));
+
+ /* Configure the USB interface as a host controller. */
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, nop) |
+ IO_STATE(R_USB_COMMAND, port_cmd, reset) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, host_config);
+
+ /* Note: Do not reset any ports here. Await the port status interrupts, to have a controlled
+ sequence of resetting the ports. If we reset both ports now, and there are devices
+ on both ports, we will get a bus error because both devices will answer the set address
+ request. */
+
+ while (*R_USB_COMMAND & IO_MASK(R_USB_COMMAND, busy));
+
+ /* Start processing of USB traffic. */
+ *R_USB_COMMAND =
+ IO_STATE(R_USB_COMMAND, port_sel, nop) |
+ IO_STATE(R_USB_COMMAND, port_cmd, reset) |
+ IO_STATE(R_USB_COMMAND, ctrl_cmd, host_run);
+
+ while (*R_USB_COMMAND & IO_MASK(R_USB_COMMAND, busy));
+
+ usb_rh = usb_alloc_dev(NULL, hc->bus, 0);
+ hc->bus->root_hub = usb_rh;
+ usb_rh->state = USB_STATE_ADDRESS;
+ usb_rh->speed = USB_SPEED_FULL;
+ usb_rh->devnum = 1;
+ hc->bus->devnum_next = 2;
+ usb_rh->ep0.desc.wMaxPacketSize = __const_cpu_to_le16(64);
+ usb_get_device_descriptor(usb_rh, USB_DT_DEVICE_SIZE);
+ usb_new_device(usb_rh);
+
+ DBFEXIT;
+
+ return 0;
+}
+
+static void etrax_usb_hc_cleanup(void)
+{
+ DBFENTER;
+
+ free_irq(ETRAX_USB_HC_IRQ, NULL);
+ free_irq(ETRAX_USB_RX_IRQ, NULL);
+ free_irq(ETRAX_USB_TX_IRQ, NULL);
+
+ usb_deregister_bus(etrax_usb_bus);
+
+ /* FIXME: call kmem_cache_destroy here? */
+
+ DBFEXIT;
+}
+
+module_init(etrax_usb_hc_init);
+module_exit(etrax_usb_hc_cleanup);
diff --git a/drivers/usb/host/hc_crisv10.h b/drivers/usb/host/hc_crisv10.h
new file mode 100644
index 000000000000..62f77111d418
--- /dev/null
+++ b/drivers/usb/host/hc_crisv10.h
@@ -0,0 +1,289 @@
+#ifndef __LINUX_ETRAX_USB_H
+#define __LINUX_ETRAX_USB_H
+
+#include <linux/types.h>
+#include <linux/list.h>
+
+typedef struct USB_IN_Desc {
+ volatile __u16 sw_len;
+ volatile __u16 command;
+ volatile unsigned long next;
+ volatile unsigned long buf;
+ volatile __u16 hw_len;
+ volatile __u16 status;
+} USB_IN_Desc_t;
+
+typedef struct USB_SB_Desc {
+ volatile __u16 sw_len;
+ volatile __u16 command;
+ volatile unsigned long next;
+ volatile unsigned long buf;
+ __u32 dummy;
+} USB_SB_Desc_t;
+
+typedef struct USB_EP_Desc {
+ volatile __u16 hw_len;
+ volatile __u16 command;
+ volatile unsigned long sub;
+ volatile unsigned long next;
+ __u32 dummy;
+} USB_EP_Desc_t;
+
+struct virt_root_hub {
+ int devnum;
+ void *urb;
+ void *int_addr;
+ int send;
+ int interval;
+ int numports;
+ struct timer_list rh_int_timer;
+ volatile __u16 wPortChange_1;
+ volatile __u16 wPortChange_2;
+ volatile __u16 prev_wPortStatus_1;
+ volatile __u16 prev_wPortStatus_2;
+};
+
+struct etrax_usb_intr_traffic {
+ int sleeping;
+ int error;
+ struct wait_queue *wq;
+};
+
+typedef struct etrax_usb_hc {
+ struct usb_bus *bus;
+ struct virt_root_hub rh;
+ struct etrax_usb_intr_traffic intr;
+} etrax_hc_t;
+
+typedef enum {
+ STARTED,
+ NOT_STARTED,
+ UNLINK,
+ TRANSFER_DONE,
+ WAITING_FOR_DESCR_INTR
+} etrax_usb_urb_state_t;
+
+
+
+typedef struct etrax_usb_urb_priv {
+ /* The first_sb field is used for freeing all SB descriptors belonging
+ to an urb. The corresponding ep descriptor's sub pointer cannot be
+ used for this since the DMA advances the sub pointer as it processes
+ the sb list. */
+ USB_SB_Desc_t *first_sb;
+ /* The last_sb field referes to the last SB descriptor that belongs to
+ this urb. This is important to know so we can free the SB descriptors
+ that ranges between first_sb and last_sb. */
+ USB_SB_Desc_t *last_sb;
+
+ /* The rx_offset field is used in ctrl and bulk traffic to keep track
+ of the offset in the urb's transfer_buffer where incoming data should be
+ copied to. */
+ __u32 rx_offset;
+
+ /* Counter used in isochronous transfers to keep track of the
+ number of packets received/transmitted. */
+ __u32 isoc_packet_counter;
+
+ /* This field is used to pass information about the urb's current state between
+ the various interrupt handlers (thus marked volatile). */
+ volatile etrax_usb_urb_state_t urb_state;
+
+ /* Connection between the submitted urb and ETRAX epid number */
+ __u8 epid;
+
+ /* The rx_data_list field is used for periodic traffic, to hold
+ received data for later processing in the the complete_urb functions,
+ where the data us copied to the urb's transfer_buffer. Basically, we
+ use this intermediate storage because we don't know when it's safe to
+ reuse the transfer_buffer (FIXME?). */
+ struct list_head rx_data_list;
+} etrax_urb_priv_t;
+
+/* This struct is for passing data from the top half to the bottom half. */
+typedef struct usb_interrupt_registers
+{
+ etrax_hc_t *hc;
+ __u32 r_usb_epid_attn;
+ __u8 r_usb_status;
+ __u16 r_usb_rh_port_status_1;
+ __u16 r_usb_rh_port_status_2;
+ __u32 r_usb_irq_mask_read;
+ __u32 r_usb_fm_number;
+ struct work_struct usb_bh;
+} usb_interrupt_registers_t;
+
+/* This struct is for passing data from the isoc top half to the isoc bottom half. */
+typedef struct usb_isoc_complete_data
+{
+ struct urb *urb;
+ struct work_struct usb_bh;
+} usb_isoc_complete_data_t;
+
+/* This struct holds data we get from the rx descriptors for DMA channel 9
+ for periodic traffic (intr and isoc). */
+typedef struct rx_data
+{
+ void *data;
+ int length;
+ struct list_head list;
+} rx_data_t;
+
+typedef struct urb_entry
+{
+ struct urb *urb;
+ struct list_head list;
+} urb_entry_t;
+
+/* ---------------------------------------------------------------------------
+ Virtual Root HUB
+ ------------------------------------------------------------------------- */
+/* destination of request */
+#define RH_INTERFACE 0x01
+#define RH_ENDPOINT 0x02
+#define RH_OTHER 0x03
+
+#define RH_CLASS 0x20
+#define RH_VENDOR 0x40
+
+/* Requests: bRequest << 8 | bmRequestType */
+#define RH_GET_STATUS 0x0080
+#define RH_CLEAR_FEATURE 0x0100
+#define RH_SET_FEATURE 0x0300
+#define RH_SET_ADDRESS 0x0500
+#define RH_GET_DESCRIPTOR 0x0680
+#define RH_SET_DESCRIPTOR 0x0700
+#define RH_GET_CONFIGURATION 0x0880
+#define RH_SET_CONFIGURATION 0x0900
+#define RH_GET_STATE 0x0280
+#define RH_GET_INTERFACE 0x0A80
+#define RH_SET_INTERFACE 0x0B00
+#define RH_SYNC_FRAME 0x0C80
+/* Our Vendor Specific Request */
+#define RH_SET_EP 0x2000
+
+
+/* Hub port features */
+#define RH_PORT_CONNECTION 0x00
+#define RH_PORT_ENABLE 0x01
+#define RH_PORT_SUSPEND 0x02
+#define RH_PORT_OVER_CURRENT 0x03
+#define RH_PORT_RESET 0x04
+#define RH_PORT_POWER 0x08
+#define RH_PORT_LOW_SPEED 0x09
+#define RH_C_PORT_CONNECTION 0x10
+#define RH_C_PORT_ENABLE 0x11
+#define RH_C_PORT_SUSPEND 0x12
+#define RH_C_PORT_OVER_CURRENT 0x13
+#define RH_C_PORT_RESET 0x14
+
+/* Hub features */
+#define RH_C_HUB_LOCAL_POWER 0x00
+#define RH_C_HUB_OVER_CURRENT 0x01
+
+#define RH_DEVICE_REMOTE_WAKEUP 0x00
+#define RH_ENDPOINT_STALL 0x01
+
+/* Our Vendor Specific feature */
+#define RH_REMOVE_EP 0x00
+
+
+#define RH_ACK 0x01
+#define RH_REQ_ERR -1
+#define RH_NACK 0x00
+
+/* Field definitions for */
+
+#define USB_IN_command__eol__BITNR 0 /* command macros */
+#define USB_IN_command__eol__WIDTH 1
+#define USB_IN_command__eol__no 0
+#define USB_IN_command__eol__yes 1
+
+#define USB_IN_command__intr__BITNR 3
+#define USB_IN_command__intr__WIDTH 1
+#define USB_IN_command__intr__no 0
+#define USB_IN_command__intr__yes 1
+
+#define USB_IN_status__eop__BITNR 1 /* status macros. */
+#define USB_IN_status__eop__WIDTH 1
+#define USB_IN_status__eop__no 0
+#define USB_IN_status__eop__yes 1
+
+#define USB_IN_status__eot__BITNR 5
+#define USB_IN_status__eot__WIDTH 1
+#define USB_IN_status__eot__no 0
+#define USB_IN_status__eot__yes 1
+
+#define USB_IN_status__error__BITNR 6
+#define USB_IN_status__error__WIDTH 1
+#define USB_IN_status__error__no 0
+#define USB_IN_status__error__yes 1
+
+#define USB_IN_status__nodata__BITNR 7
+#define USB_IN_status__nodata__WIDTH 1
+#define USB_IN_status__nodata__no 0
+#define USB_IN_status__nodata__yes 1
+
+#define USB_IN_status__epid__BITNR 8
+#define USB_IN_status__epid__WIDTH 5
+
+#define USB_EP_command__eol__BITNR 0
+#define USB_EP_command__eol__WIDTH 1
+#define USB_EP_command__eol__no 0
+#define USB_EP_command__eol__yes 1
+
+#define USB_EP_command__eof__BITNR 1
+#define USB_EP_command__eof__WIDTH 1
+#define USB_EP_command__eof__no 0
+#define USB_EP_command__eof__yes 1
+
+#define USB_EP_command__intr__BITNR 3
+#define USB_EP_command__intr__WIDTH 1
+#define USB_EP_command__intr__no 0
+#define USB_EP_command__intr__yes 1
+
+#define USB_EP_command__enable__BITNR 4
+#define USB_EP_command__enable__WIDTH 1
+#define USB_EP_command__enable__no 0
+#define USB_EP_command__enable__yes 1
+
+#define USB_EP_command__hw_valid__BITNR 5
+#define USB_EP_command__hw_valid__WIDTH 1
+#define USB_EP_command__hw_valid__no 0
+#define USB_EP_command__hw_valid__yes 1
+
+#define USB_EP_command__epid__BITNR 8
+#define USB_EP_command__epid__WIDTH 5
+
+#define USB_SB_command__eol__BITNR 0 /* command macros. */
+#define USB_SB_command__eol__WIDTH 1
+#define USB_SB_command__eol__no 0
+#define USB_SB_command__eol__yes 1
+
+#define USB_SB_command__eot__BITNR 1
+#define USB_SB_command__eot__WIDTH 1
+#define USB_SB_command__eot__no 0
+#define USB_SB_command__eot__yes 1
+
+#define USB_SB_command__intr__BITNR 3
+#define USB_SB_command__intr__WIDTH 1
+#define USB_SB_command__intr__no 0
+#define USB_SB_command__intr__yes 1
+
+#define USB_SB_command__tt__BITNR 4
+#define USB_SB_command__tt__WIDTH 2
+#define USB_SB_command__tt__zout 0
+#define USB_SB_command__tt__in 1
+#define USB_SB_command__tt__out 2
+#define USB_SB_command__tt__setup 3
+
+
+#define USB_SB_command__rem__BITNR 8
+#define USB_SB_command__rem__WIDTH 6
+
+#define USB_SB_command__full__BITNR 6
+#define USB_SB_command__full__WIDTH 1
+#define USB_SB_command__full__no 0
+#define USB_SB_command__full__yes 1
+
+#endif
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
new file mode 100644
index 000000000000..3981bf15c8c7
--- /dev/null
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -0,0 +1,284 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * (C) Copyright 2002 Hewlett-Packard Company
+ *
+ * Bus Glue for AMD Alchemy Au1xxx
+ *
+ * Written by Christopher Hoover <ch@hpl.hp.com>
+ * Based on fragments of previous driver by Rusell King et al.
+ *
+ * Modified for LH7A404 from ohci-sa1111.c
+ * by Durgesh Pattamatta <pattamattad@sharpsec.com>
+ * Modified for AMD Alchemy Au1xxx
+ * by Matt Porter <mporter@kernel.crashing.org>
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <asm/mach-au1x00/au1000.h>
+
+#define USBH_ENABLE_BE (1<<0)
+#define USBH_ENABLE_C (1<<1)
+#define USBH_ENABLE_E (1<<2)
+#define USBH_ENABLE_CE (1<<3)
+#define USBH_ENABLE_RD (1<<4)
+
+#ifdef __LITTLE_ENDIAN
+#define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C)
+#elif __BIG_ENDIAN
+#define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C | USBH_ENABLE_BE)
+#else
+#error not byte order defined
+#endif
+
+extern int usb_disabled(void);
+
+/*-------------------------------------------------------------------------*/
+
+static void au1xxx_start_hc(struct platform_device *dev)
+{
+ printk(KERN_DEBUG __FILE__
+ ": starting Au1xxx OHCI USB Controller\n");
+
+ /* enable host controller */
+ au_writel(USBH_ENABLE_CE, USB_HOST_CONFIG);
+ udelay(1000);
+ au_writel(USBH_ENABLE_INIT, USB_HOST_CONFIG);
+ udelay(1000);
+
+ /* wait for reset complete (read register twice; see au1500 errata) */
+ while (au_readl(USB_HOST_CONFIG),
+ !(au_readl(USB_HOST_CONFIG) & USBH_ENABLE_RD))
+ udelay(1000);
+
+ printk(KERN_DEBUG __FILE__
+ ": Clock to USB host has been enabled \n");
+}
+
+static void au1xxx_stop_hc(struct platform_device *dev)
+{
+ printk(KERN_DEBUG __FILE__
+ ": stopping Au1xxx OHCI USB Controller\n");
+
+ /* Disable clock */
+ au_writel(readl((void *)USB_HOST_CONFIG) & ~USBH_ENABLE_CE, USB_HOST_CONFIG);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+
+/**
+ * usb_hcd_au1xxx_probe - initialize Au1xxx-based HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ */
+int usb_hcd_au1xxx_probe (const struct hc_driver *driver,
+ struct platform_device *dev)
+{
+ int retval;
+ struct usb_hcd *hcd;
+
+ if(dev->resource[1].flags != IORESOURCE_IRQ) {
+ pr_debug ("resource[1] is not IORESOURCE_IRQ");
+ return -ENOMEM;
+ }
+
+ hcd = usb_create_hcd(driver, &dev->dev, "au1xxx");
+ if (!hcd)
+ return -ENOMEM;
+ hcd->rsrc_start = dev->resource[0].start;
+ hcd->rsrc_len = dev->resource[0].end - dev->resource[0].start + 1;
+
+ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+ pr_debug("request_mem_region failed");
+ retval = -EBUSY;
+ goto err1;
+ }
+
+ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
+ if (!hcd->regs) {
+ pr_debug("ioremap failed");
+ retval = -ENOMEM;
+ goto err2;
+ }
+
+ au1xxx_start_hc(dev);
+ ohci_hcd_init(hcd_to_ohci(hcd));
+
+ retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT);
+ if (retval == 0)
+ return retval;
+
+ au1xxx_stop_hc(dev);
+ iounmap(hcd->regs);
+ err2:
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ err1:
+ usb_put_hcd(hcd);
+ return retval;
+}
+
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_au1xxx_remove - shutdown processing for Au1xxx-based HCDs
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_au1xxx_probe(), first invoking
+ * the HCD's stop() method. It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ */
+void usb_hcd_au1xxx_remove (struct usb_hcd *hcd, struct platform_device *dev)
+{
+ usb_remove_hcd(hcd);
+ au1xxx_stop_hc(dev);
+ iounmap(hcd->regs);
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ usb_put_hcd(hcd);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int __devinit
+ohci_au1xxx_start (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int ret;
+
+ ohci_dbg (ohci, "ohci_au1xxx_start, ohci:%p", ohci);
+
+ if ((ret = ohci_init (ohci)) < 0)
+ return ret;
+
+ if ((ret = ohci_run (ohci)) < 0) {
+ err ("can't start %s", hcd->self.bus_name);
+ ohci_stop (hcd);
+ return ret;
+ }
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static const struct hc_driver ohci_au1xxx_hc_driver = {
+ .description = hcd_name,
+ .product_desc = "Au1xxx OHCI",
+ .hcd_priv_size = sizeof(struct ohci_hcd),
+
+ /*
+ * generic hardware linkage
+ */
+ .irq = ohci_irq,
+ .flags = HCD_USB11 | HCD_MEMORY,
+
+ /*
+ * basic lifecycle operations
+ */
+ .start = ohci_au1xxx_start,
+#ifdef CONFIG_PM
+ /* suspend: ohci_au1xxx_suspend, -- tbd */
+ /* resume: ohci_au1xxx_resume, -- tbd */
+#endif /*CONFIG_PM*/
+ .stop = ohci_stop,
+
+ /*
+ * managing i/o requests and associated device resources
+ */
+ .urb_enqueue = ohci_urb_enqueue,
+ .urb_dequeue = ohci_urb_dequeue,
+ .endpoint_disable = ohci_endpoint_disable,
+
+ /*
+ * scheduling support
+ */
+ .get_frame_number = ohci_get_frame,
+
+ /*
+ * root hub support
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int ohci_hcd_au1xxx_drv_probe(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ int ret;
+
+ pr_debug ("In ohci_hcd_au1xxx_drv_probe");
+
+ if (usb_disabled())
+ return -ENODEV;
+
+ ret = usb_hcd_au1xxx_probe(&ohci_au1xxx_hc_driver, pdev);
+ return ret;
+}
+
+static int ohci_hcd_au1xxx_drv_remove(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+ usb_hcd_au1xxx_remove(hcd, pdev);
+ return 0;
+}
+ /*TBD*/
+/*static int ohci_hcd_au1xxx_drv_suspend(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+ return 0;
+}
+static int ohci_hcd_au1xxx_drv_resume(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+ return 0;
+}
+*/
+
+static struct device_driver ohci_hcd_au1xxx_driver = {
+ .name = "au1xxx-ohci",
+ .bus = &platform_bus_type,
+ .probe = ohci_hcd_au1xxx_drv_probe,
+ .remove = ohci_hcd_au1xxx_drv_remove,
+ /*.suspend = ohci_hcd_au1xxx_drv_suspend, */
+ /*.resume = ohci_hcd_au1xxx_drv_resume, */
+};
+
+static int __init ohci_hcd_au1xxx_init (void)
+{
+ pr_debug (DRIVER_INFO " (Au1xxx)");
+ pr_debug ("block sizes: ed %d td %d\n",
+ sizeof (struct ed), sizeof (struct td));
+
+ return driver_register(&ohci_hcd_au1xxx_driver);
+}
+
+static void __exit ohci_hcd_au1xxx_cleanup (void)
+{
+ driver_unregister(&ohci_hcd_au1xxx_driver);
+}
+
+module_init (ohci_hcd_au1xxx_init);
+module_exit (ohci_hcd_au1xxx_cleanup);
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c
new file mode 100644
index 000000000000..62f53a213808
--- /dev/null
+++ b/drivers/usb/host/ohci-dbg.c
@@ -0,0 +1,707 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ *
+ * This file is licenced under the GPL.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef DEBUG
+
+#define edstring(ed_type) ({ char *temp; \
+ switch (ed_type) { \
+ case PIPE_CONTROL: temp = "ctrl"; break; \
+ case PIPE_BULK: temp = "bulk"; break; \
+ case PIPE_INTERRUPT: temp = "intr"; break; \
+ default: temp = "isoc"; break; \
+ }; temp;})
+#define pipestring(pipe) edstring(usb_pipetype(pipe))
+
+/* debug| print the main components of an URB
+ * small: 0) header + data packets 1) just header
+ */
+static void __attribute__((unused))
+urb_print (struct urb * urb, char * str, int small)
+{
+ unsigned int pipe= urb->pipe;
+
+ if (!urb->dev || !urb->dev->bus) {
+ dbg("%s URB: no dev", str);
+ return;
+ }
+
+#ifndef OHCI_VERBOSE_DEBUG
+ if (urb->status != 0)
+#endif
+ dbg("%s %p dev=%d ep=%d%s-%s flags=%x len=%d/%d stat=%d",
+ str,
+ urb,
+ usb_pipedevice (pipe),
+ usb_pipeendpoint (pipe),
+ usb_pipeout (pipe)? "out" : "in",
+ pipestring (pipe),
+ urb->transfer_flags,
+ urb->actual_length,
+ urb->transfer_buffer_length,
+ urb->status);
+
+#ifdef OHCI_VERBOSE_DEBUG
+ if (!small) {
+ int i, len;
+
+ if (usb_pipecontrol (pipe)) {
+ printk (KERN_DEBUG __FILE__ ": setup(8):");
+ for (i = 0; i < 8 ; i++)
+ printk (" %02x", ((__u8 *) urb->setup_packet) [i]);
+ printk ("\n");
+ }
+ if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) {
+ printk (KERN_DEBUG __FILE__ ": data(%d/%d):",
+ urb->actual_length,
+ urb->transfer_buffer_length);
+ len = usb_pipeout (pipe)?
+ urb->transfer_buffer_length: urb->actual_length;
+ for (i = 0; i < 16 && i < len; i++)
+ printk (" %02x", ((__u8 *) urb->transfer_buffer) [i]);
+ printk ("%s stat:%d\n", i < len? "...": "", urb->status);
+ }
+ }
+#endif
+}
+
+#define ohci_dbg_sw(ohci, next, size, format, arg...) \
+ do { \
+ if (next) { \
+ unsigned s_len; \
+ s_len = scnprintf (*next, *size, format, ## arg ); \
+ *size -= s_len; *next += s_len; \
+ } else \
+ ohci_dbg(ohci,format, ## arg ); \
+ } while (0);
+
+
+static void ohci_dump_intr_mask (
+ struct ohci_hcd *ohci,
+ char *label,
+ u32 mask,
+ char **next,
+ unsigned *size)
+{
+ ohci_dbg_sw (ohci, next, size, "%s 0x%08x%s%s%s%s%s%s%s%s%s\n",
+ label,
+ mask,
+ (mask & OHCI_INTR_MIE) ? " MIE" : "",
+ (mask & OHCI_INTR_OC) ? " OC" : "",
+ (mask & OHCI_INTR_RHSC) ? " RHSC" : "",
+ (mask & OHCI_INTR_FNO) ? " FNO" : "",
+ (mask & OHCI_INTR_UE) ? " UE" : "",
+ (mask & OHCI_INTR_RD) ? " RD" : "",
+ (mask & OHCI_INTR_SF) ? " SF" : "",
+ (mask & OHCI_INTR_WDH) ? " WDH" : "",
+ (mask & OHCI_INTR_SO) ? " SO" : ""
+ );
+}
+
+static void maybe_print_eds (
+ struct ohci_hcd *ohci,
+ char *label,
+ u32 value,
+ char **next,
+ unsigned *size)
+{
+ if (value)
+ ohci_dbg_sw (ohci, next, size, "%s %08x\n", label, value);
+}
+
+static char *hcfs2string (int state)
+{
+ switch (state) {
+ case OHCI_USB_RESET: return "reset";
+ case OHCI_USB_RESUME: return "resume";
+ case OHCI_USB_OPER: return "operational";
+ case OHCI_USB_SUSPEND: return "suspend";
+ }
+ return "?";
+}
+
+// dump control and status registers
+static void
+ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size)
+{
+ struct ohci_regs __iomem *regs = controller->regs;
+ u32 temp;
+
+ temp = ohci_readl (controller, &regs->revision) & 0xff;
+ ohci_dbg_sw (controller, next, size,
+ "OHCI %d.%d, %s legacy support registers\n",
+ 0x03 & (temp >> 4), (temp & 0x0f),
+ (temp & 0x0100) ? "with" : "NO");
+
+ temp = ohci_readl (controller, &regs->control);
+ ohci_dbg_sw (controller, next, size,
+ "control 0x%03x%s%s%s HCFS=%s%s%s%s%s CBSR=%d\n",
+ temp,
+ (temp & OHCI_CTRL_RWE) ? " RWE" : "",
+ (temp & OHCI_CTRL_RWC) ? " RWC" : "",
+ (temp & OHCI_CTRL_IR) ? " IR" : "",
+ hcfs2string (temp & OHCI_CTRL_HCFS),
+ (temp & OHCI_CTRL_BLE) ? " BLE" : "",
+ (temp & OHCI_CTRL_CLE) ? " CLE" : "",
+ (temp & OHCI_CTRL_IE) ? " IE" : "",
+ (temp & OHCI_CTRL_PLE) ? " PLE" : "",
+ temp & OHCI_CTRL_CBSR
+ );
+
+ temp = ohci_readl (controller, &regs->cmdstatus);
+ ohci_dbg_sw (controller, next, size,
+ "cmdstatus 0x%05x SOC=%d%s%s%s%s\n", temp,
+ (temp & OHCI_SOC) >> 16,
+ (temp & OHCI_OCR) ? " OCR" : "",
+ (temp & OHCI_BLF) ? " BLF" : "",
+ (temp & OHCI_CLF) ? " CLF" : "",
+ (temp & OHCI_HCR) ? " HCR" : ""
+ );
+
+ ohci_dump_intr_mask (controller, "intrstatus",
+ ohci_readl (controller, &regs->intrstatus),
+ next, size);
+ ohci_dump_intr_mask (controller, "intrenable",
+ ohci_readl (controller, &regs->intrenable),
+ next, size);
+ // intrdisable always same as intrenable
+
+ maybe_print_eds (controller, "ed_periodcurrent",
+ ohci_readl (controller, &regs->ed_periodcurrent),
+ next, size);
+
+ maybe_print_eds (controller, "ed_controlhead",
+ ohci_readl (controller, &regs->ed_controlhead),
+ next, size);
+ maybe_print_eds (controller, "ed_controlcurrent",
+ ohci_readl (controller, &regs->ed_controlcurrent),
+ next, size);
+
+ maybe_print_eds (controller, "ed_bulkhead",
+ ohci_readl (controller, &regs->ed_bulkhead),
+ next, size);
+ maybe_print_eds (controller, "ed_bulkcurrent",
+ ohci_readl (controller, &regs->ed_bulkcurrent),
+ next, size);
+
+ maybe_print_eds (controller, "donehead",
+ ohci_readl (controller, &regs->donehead), next, size);
+
+ /* broken fminterval means traffic won't flow! */
+ ohci_dbg (controller, "fminterval %08x\n",
+ ohci_readl (controller, &regs->fminterval));
+}
+
+#define dbg_port_sw(hc,num,value,next,size) \
+ ohci_dbg_sw (hc, next, size, \
+ "roothub.portstatus [%d] " \
+ "0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \
+ num, temp, \
+ (temp & RH_PS_PRSC) ? " PRSC" : "", \
+ (temp & RH_PS_OCIC) ? " OCIC" : "", \
+ (temp & RH_PS_PSSC) ? " PSSC" : "", \
+ (temp & RH_PS_PESC) ? " PESC" : "", \
+ (temp & RH_PS_CSC) ? " CSC" : "", \
+ \
+ (temp & RH_PS_LSDA) ? " LSDA" : "", \
+ (temp & RH_PS_PPS) ? " PPS" : "", \
+ (temp & RH_PS_PRS) ? " PRS" : "", \
+ (temp & RH_PS_POCI) ? " POCI" : "", \
+ (temp & RH_PS_PSS) ? " PSS" : "", \
+ \
+ (temp & RH_PS_PES) ? " PES" : "", \
+ (temp & RH_PS_CCS) ? " CCS" : "" \
+ );
+
+
+static void
+ohci_dump_roothub (
+ struct ohci_hcd *controller,
+ int verbose,
+ char **next,
+ unsigned *size)
+{
+ u32 temp, ndp, i;
+
+ temp = roothub_a (controller);
+ if (temp == ~(u32)0)
+ return;
+ ndp = (temp & RH_A_NDP);
+
+ if (verbose) {
+ ohci_dbg_sw (controller, next, size,
+ "roothub.a %08x POTPGT=%d%s%s%s%s%s NDP=%d\n", temp,
+ ((temp & RH_A_POTPGT) >> 24) & 0xff,
+ (temp & RH_A_NOCP) ? " NOCP" : "",
+ (temp & RH_A_OCPM) ? " OCPM" : "",
+ (temp & RH_A_DT) ? " DT" : "",
+ (temp & RH_A_NPS) ? " NPS" : "",
+ (temp & RH_A_PSM) ? " PSM" : "",
+ ndp
+ );
+ temp = roothub_b (controller);
+ ohci_dbg_sw (controller, next, size,
+ "roothub.b %08x PPCM=%04x DR=%04x\n",
+ temp,
+ (temp & RH_B_PPCM) >> 16,
+ (temp & RH_B_DR)
+ );
+ temp = roothub_status (controller);
+ ohci_dbg_sw (controller, next, size,
+ "roothub.status %08x%s%s%s%s%s%s\n",
+ temp,
+ (temp & RH_HS_CRWE) ? " CRWE" : "",
+ (temp & RH_HS_OCIC) ? " OCIC" : "",
+ (temp & RH_HS_LPSC) ? " LPSC" : "",
+ (temp & RH_HS_DRWE) ? " DRWE" : "",
+ (temp & RH_HS_OCI) ? " OCI" : "",
+ (temp & RH_HS_LPS) ? " LPS" : ""
+ );
+ }
+
+ for (i = 0; i < ndp; i++) {
+ temp = roothub_portstatus (controller, i);
+ dbg_port_sw (controller, i, temp, next, size);
+ }
+}
+
+static void ohci_dump (struct ohci_hcd *controller, int verbose)
+{
+ ohci_dbg (controller, "OHCI controller state\n");
+
+ // dumps some of the state we know about
+ ohci_dump_status (controller, NULL, NULL);
+ if (controller->hcca)
+ ohci_dbg (controller,
+ "hcca frame #%04x\n", ohci_frame_no(controller));
+ ohci_dump_roothub (controller, 1, NULL, NULL);
+}
+
+static const char data0 [] = "DATA0";
+static const char data1 [] = "DATA1";
+
+static void ohci_dump_td (const struct ohci_hcd *ohci, const char *label,
+ const struct td *td)
+{
+ u32 tmp = hc32_to_cpup (ohci, &td->hwINFO);
+
+ ohci_dbg (ohci, "%s td %p%s; urb %p index %d; hw next td %08x\n",
+ label, td,
+ (tmp & TD_DONE) ? " (DONE)" : "",
+ td->urb, td->index,
+ hc32_to_cpup (ohci, &td->hwNextTD));
+ if ((tmp & TD_ISO) == 0) {
+ const char *toggle, *pid;
+ u32 cbp, be;
+
+ switch (tmp & TD_T) {
+ case TD_T_DATA0: toggle = data0; break;
+ case TD_T_DATA1: toggle = data1; break;
+ case TD_T_TOGGLE: toggle = "(CARRY)"; break;
+ default: toggle = "(?)"; break;
+ }
+ switch (tmp & TD_DP) {
+ case TD_DP_SETUP: pid = "SETUP"; break;
+ case TD_DP_IN: pid = "IN"; break;
+ case TD_DP_OUT: pid = "OUT"; break;
+ default: pid = "(bad pid)"; break;
+ }
+ ohci_dbg (ohci, " info %08x CC=%x %s DI=%d %s %s\n", tmp,
+ TD_CC_GET(tmp), /* EC, */ toggle,
+ (tmp & TD_DI) >> 21, pid,
+ (tmp & TD_R) ? "R" : "");
+ cbp = hc32_to_cpup (ohci, &td->hwCBP);
+ be = hc32_to_cpup (ohci, &td->hwBE);
+ ohci_dbg (ohci, " cbp %08x be %08x (len %d)\n", cbp, be,
+ cbp ? (be + 1 - cbp) : 0);
+ } else {
+ unsigned i;
+ ohci_dbg (ohci, " info %08x CC=%x FC=%d DI=%d SF=%04x\n", tmp,
+ TD_CC_GET(tmp),
+ (tmp >> 24) & 0x07,
+ (tmp & TD_DI) >> 21,
+ tmp & 0x0000ffff);
+ ohci_dbg (ohci, " bp0 %08x be %08x\n",
+ hc32_to_cpup (ohci, &td->hwCBP) & ~0x0fff,
+ hc32_to_cpup (ohci, &td->hwBE));
+ for (i = 0; i < MAXPSW; i++) {
+ u16 psw = ohci_hwPSW (ohci, td, i);
+ int cc = (psw >> 12) & 0x0f;
+ ohci_dbg (ohci, " psw [%d] = %2x, CC=%x %s=%d\n", i,
+ psw, cc,
+ (cc >= 0x0e) ? "OFFSET" : "SIZE",
+ psw & 0x0fff);
+ }
+ }
+}
+
+/* caller MUST own hcd spinlock if verbose is set! */
+static void __attribute__((unused))
+ohci_dump_ed (const struct ohci_hcd *ohci, const char *label,
+ const struct ed *ed, int verbose)
+{
+ u32 tmp = hc32_to_cpu (ohci, ed->hwINFO);
+ char *type = "";
+
+ ohci_dbg (ohci, "%s, ed %p state 0x%x type %s; next ed %08x\n",
+ label,
+ ed, ed->state, edstring (ed->type),
+ hc32_to_cpup (ohci, &ed->hwNextED));
+ switch (tmp & (ED_IN|ED_OUT)) {
+ case ED_OUT: type = "-OUT"; break;
+ case ED_IN: type = "-IN"; break;
+ /* else from TDs ... control */
+ }
+ ohci_dbg (ohci,
+ " info %08x MAX=%d%s%s%s%s EP=%d%s DEV=%d\n", tmp,
+ 0x03ff & (tmp >> 16),
+ (tmp & ED_DEQUEUE) ? " DQ" : "",
+ (tmp & ED_ISO) ? " ISO" : "",
+ (tmp & ED_SKIP) ? " SKIP" : "",
+ (tmp & ED_LOWSPEED) ? " LOW" : "",
+ 0x000f & (tmp >> 7),
+ type,
+ 0x007f & tmp);
+ tmp = hc32_to_cpup (ohci, &ed->hwHeadP);
+ ohci_dbg (ohci, " tds: head %08x %s%s tail %08x%s\n",
+ tmp,
+ (tmp & ED_C) ? data1 : data0,
+ (tmp & ED_H) ? " HALT" : "",
+ hc32_to_cpup (ohci, &ed->hwTailP),
+ verbose ? "" : " (not listing)");
+ if (verbose) {
+ struct list_head *tmp;
+
+ /* use ed->td_list because HC concurrently modifies
+ * hwNextTD as it accumulates ed_donelist.
+ */
+ list_for_each (tmp, &ed->td_list) {
+ struct td *td;
+ td = list_entry (tmp, struct td, td_list);
+ ohci_dump_td (ohci, " ->", td);
+ }
+ }
+}
+
+#else
+static inline void ohci_dump (struct ohci_hcd *controller, int verbose) {}
+
+#undef OHCI_VERBOSE_DEBUG
+
+#endif /* DEBUG */
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef STUB_DEBUG_FILES
+
+static inline void create_debug_files (struct ohci_hcd *bus) { }
+static inline void remove_debug_files (struct ohci_hcd *bus) { }
+
+#else
+
+static ssize_t
+show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
+{
+ unsigned temp, size = count;
+
+ if (!ed)
+ return 0;
+
+ /* print first --> last */
+ while (ed->ed_prev)
+ ed = ed->ed_prev;
+
+ /* dump a snapshot of the bulk or control schedule */
+ while (ed) {
+ u32 info = hc32_to_cpu (ohci, ed->hwINFO);
+ u32 headp = hc32_to_cpu (ohci, ed->hwHeadP);
+ struct list_head *entry;
+ struct td *td;
+
+ temp = scnprintf (buf, size,
+ "ed/%p %cs dev%d ep%d%s max %d %08x%s%s %s",
+ ed,
+ (info & ED_LOWSPEED) ? 'l' : 'f',
+ info & 0x7f,
+ (info >> 7) & 0xf,
+ (info & ED_IN) ? "in" : "out",
+ 0x03ff & (info >> 16),
+ info,
+ (info & ED_SKIP) ? " s" : "",
+ (headp & ED_H) ? " H" : "",
+ (headp & ED_C) ? data1 : data0);
+ size -= temp;
+ buf += temp;
+
+ list_for_each (entry, &ed->td_list) {
+ u32 cbp, be;
+
+ td = list_entry (entry, struct td, td_list);
+ info = hc32_to_cpup (ohci, &td->hwINFO);
+ cbp = hc32_to_cpup (ohci, &td->hwCBP);
+ be = hc32_to_cpup (ohci, &td->hwBE);
+ temp = scnprintf (buf, size,
+ "\n\ttd %p %s %d cc=%x urb %p (%08x)",
+ td,
+ ({ char *pid;
+ switch (info & TD_DP) {
+ case TD_DP_SETUP: pid = "setup"; break;
+ case TD_DP_IN: pid = "in"; break;
+ case TD_DP_OUT: pid = "out"; break;
+ default: pid = "(?)"; break;
+ } pid;}),
+ cbp ? (be + 1 - cbp) : 0,
+ TD_CC_GET (info), td->urb, info);
+ size -= temp;
+ buf += temp;
+ }
+
+ temp = scnprintf (buf, size, "\n");
+ size -= temp;
+ buf += temp;
+
+ ed = ed->ed_next;
+ }
+ return count - size;
+}
+
+static ssize_t
+show_async (struct class_device *class_dev, char *buf)
+{
+ struct usb_bus *bus;
+ struct usb_hcd *hcd;
+ struct ohci_hcd *ohci;
+ size_t temp;
+ unsigned long flags;
+
+ bus = to_usb_bus(class_dev);
+ hcd = bus->hcpriv;
+ ohci = hcd_to_ohci(hcd);
+
+ /* display control and bulk lists together, for simplicity */
+ spin_lock_irqsave (&ohci->lock, flags);
+ temp = show_list (ohci, buf, PAGE_SIZE, ohci->ed_controltail);
+ temp += show_list (ohci, buf + temp, PAGE_SIZE - temp, ohci->ed_bulktail);
+ spin_unlock_irqrestore (&ohci->lock, flags);
+
+ return temp;
+}
+static CLASS_DEVICE_ATTR (async, S_IRUGO, show_async, NULL);
+
+
+#define DBG_SCHED_LIMIT 64
+
+static ssize_t
+show_periodic (struct class_device *class_dev, char *buf)
+{
+ struct usb_bus *bus;
+ struct usb_hcd *hcd;
+ struct ohci_hcd *ohci;
+ struct ed **seen, *ed;
+ unsigned long flags;
+ unsigned temp, size, seen_count;
+ char *next;
+ unsigned i;
+
+ if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, SLAB_ATOMIC)))
+ return 0;
+ seen_count = 0;
+
+ bus = to_usb_bus(class_dev);
+ hcd = bus->hcpriv;
+ ohci = hcd_to_ohci(hcd);
+ next = buf;
+ size = PAGE_SIZE;
+
+ temp = scnprintf (next, size, "size = %d\n", NUM_INTS);
+ size -= temp;
+ next += temp;
+
+ /* dump a snapshot of the periodic schedule (and load) */
+ spin_lock_irqsave (&ohci->lock, flags);
+ for (i = 0; i < NUM_INTS; i++) {
+ if (!(ed = ohci->periodic [i]))
+ continue;
+
+ temp = scnprintf (next, size, "%2d [%3d]:", i, ohci->load [i]);
+ size -= temp;
+ next += temp;
+
+ do {
+ temp = scnprintf (next, size, " ed%d/%p",
+ ed->interval, ed);
+ size -= temp;
+ next += temp;
+ for (temp = 0; temp < seen_count; temp++) {
+ if (seen [temp] == ed)
+ break;
+ }
+
+ /* show more info the first time around */
+ if (temp == seen_count) {
+ u32 info = hc32_to_cpu (ohci, ed->hwINFO);
+ struct list_head *entry;
+ unsigned qlen = 0;
+
+ /* qlen measured here in TDs, not urbs */
+ list_for_each (entry, &ed->td_list)
+ qlen++;
+
+ temp = scnprintf (next, size,
+ " (%cs dev%d ep%d%s-%s qlen %u"
+ " max %d %08x%s%s)",
+ (info & ED_LOWSPEED) ? 'l' : 'f',
+ info & 0x7f,
+ (info >> 7) & 0xf,
+ (info & ED_IN) ? "in" : "out",
+ (info & ED_ISO) ? "iso" : "int",
+ qlen,
+ 0x03ff & (info >> 16),
+ info,
+ (info & ED_SKIP) ? " K" : "",
+ (ed->hwHeadP &
+ cpu_to_hc32(ohci, ED_H)) ?
+ " H" : "");
+ size -= temp;
+ next += temp;
+
+ if (seen_count < DBG_SCHED_LIMIT)
+ seen [seen_count++] = ed;
+
+ ed = ed->ed_next;
+
+ } else {
+ /* we've seen it and what's after */
+ temp = 0;
+ ed = NULL;
+ }
+
+ } while (ed);
+
+ temp = scnprintf (next, size, "\n");
+ size -= temp;
+ next += temp;
+ }
+ spin_unlock_irqrestore (&ohci->lock, flags);
+ kfree (seen);
+
+ return PAGE_SIZE - size;
+}
+static CLASS_DEVICE_ATTR (periodic, S_IRUGO, show_periodic, NULL);
+
+
+#undef DBG_SCHED_LIMIT
+
+static ssize_t
+show_registers (struct class_device *class_dev, char *buf)
+{
+ struct usb_bus *bus;
+ struct usb_hcd *hcd;
+ struct ohci_hcd *ohci;
+ struct ohci_regs __iomem *regs;
+ unsigned long flags;
+ unsigned temp, size;
+ char *next;
+ u32 rdata;
+
+ bus = to_usb_bus(class_dev);
+ hcd = bus->hcpriv;
+ ohci = hcd_to_ohci(hcd);
+ regs = ohci->regs;
+ next = buf;
+ size = PAGE_SIZE;
+
+ spin_lock_irqsave (&ohci->lock, flags);
+
+ /* dump driver info, then registers in spec order */
+
+ ohci_dbg_sw (ohci, &next, &size,
+ "bus %s, device %s\n"
+ "%s\n"
+ "%s version " DRIVER_VERSION "\n",
+ hcd->self.controller->bus->name,
+ hcd->self.controller->bus_id,
+ hcd->product_desc,
+ hcd_name);
+
+ if (bus->controller->power.power_state) {
+ size -= scnprintf (next, size,
+ "SUSPENDED (no register access)\n");
+ goto done;
+ }
+
+ ohci_dump_status(ohci, &next, &size);
+
+ /* hcca */
+ if (ohci->hcca)
+ ohci_dbg_sw (ohci, &next, &size,
+ "hcca frame 0x%04x\n", ohci_frame_no(ohci));
+
+ /* other registers mostly affect frame timings */
+ rdata = ohci_readl (ohci, &regs->fminterval);
+ temp = scnprintf (next, size,
+ "fmintvl 0x%08x %sFSMPS=0x%04x FI=0x%04x\n",
+ rdata, (rdata >> 31) ? "FIT " : "",
+ (rdata >> 16) & 0xefff, rdata & 0xffff);
+ size -= temp;
+ next += temp;
+
+ rdata = ohci_readl (ohci, &regs->fmremaining);
+ temp = scnprintf (next, size, "fmremaining 0x%08x %sFR=0x%04x\n",
+ rdata, (rdata >> 31) ? "FRT " : "",
+ rdata & 0x3fff);
+ size -= temp;
+ next += temp;
+
+ rdata = ohci_readl (ohci, &regs->periodicstart);
+ temp = scnprintf (next, size, "periodicstart 0x%04x\n",
+ rdata & 0x3fff);
+ size -= temp;
+ next += temp;
+
+ rdata = ohci_readl (ohci, &regs->lsthresh);
+ temp = scnprintf (next, size, "lsthresh 0x%04x\n",
+ rdata & 0x3fff);
+ size -= temp;
+ next += temp;
+
+ /* roothub */
+ ohci_dump_roothub (ohci, 1, &next, &size);
+
+done:
+ spin_unlock_irqrestore (&ohci->lock, flags);
+ return PAGE_SIZE - size;
+}
+static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL);
+
+
+static inline void create_debug_files (struct ohci_hcd *ohci)
+{
+ struct class_device *cldev = &ohci_to_hcd(ohci)->self.class_dev;
+
+ class_device_create_file(cldev, &class_device_attr_async);
+ class_device_create_file(cldev, &class_device_attr_periodic);
+ class_device_create_file(cldev, &class_device_attr_registers);
+ ohci_dbg (ohci, "created debug files\n");
+}
+
+static inline void remove_debug_files (struct ohci_hcd *ohci)
+{
+ struct class_device *cldev = &ohci_to_hcd(ohci)->self.class_dev;
+
+ class_device_remove_file(cldev, &class_device_attr_async);
+ class_device_remove_file(cldev, &class_device_attr_periodic);
+ class_device_remove_file(cldev, &class_device_attr_registers);
+}
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
new file mode 100644
index 000000000000..1e27f10c1592
--- /dev/null
+++ b/drivers/usb/host/ohci-hcd.c
@@ -0,0 +1,925 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net>
+ *
+ * [ Initialisation is based on Linus' ]
+ * [ uhci code and gregs ohci fragments ]
+ * [ (C) Copyright 1999 Linus Torvalds ]
+ * [ (C) Copyright 1999 Gregory P. Smith]
+ *
+ *
+ * OHCI is the main "non-Intel/VIA" standard for USB 1.1 host controller
+ * interfaces (though some non-x86 Intel chips use it). It supports
+ * smarter hardware than UHCI. A download link for the spec available
+ * through the http://www.usb.org website.
+ *
+ * History:
+ *
+ * 2004/03/24 LH7A404 support (Durgesh Pattamatta & Marc Singer)
+ * 2004/02/04 use generic dma_* functions instead of pci_* (dsaxena@plexity.net)
+ * 2003/02/24 show registers in sysfs (Kevin Brosius)
+ *
+ * 2002/09/03 get rid of ed hashtables, rework periodic scheduling and
+ * bandwidth accounting; if debugging, show schedules in driverfs
+ * 2002/07/19 fixes to management of ED and schedule state.
+ * 2002/06/09 SA-1111 support (Christopher Hoover)
+ * 2002/06/01 remember frame when HC won't see EDs any more; use that info
+ * to fix urb unlink races caused by interrupt latency assumptions;
+ * minor ED field and function naming updates
+ * 2002/01/18 package as a patch for 2.5.3; this should match the
+ * 2.4.17 kernel modulo some bugs being fixed.
+ *
+ * 2001/10/18 merge pmac cleanup (Benjamin Herrenschmidt) and bugfixes
+ * from post-2.4.5 patches.
+ * 2001/09/20 URB_ZERO_PACKET support; hcca_dma portability, OPTi warning
+ * 2001/09/07 match PCI PM changes, errnos from Linus' tree
+ * 2001/05/05 fork 2.4.5 version into "hcd" framework, cleanup, simplify;
+ * pbook pci quirks gone (please fix pbook pci sw!) (db)
+ *
+ * 2001/04/08 Identify version on module load (gb)
+ * 2001/03/24 td/ed hashing to remove bus_to_virt (Steve Longerbeam);
+ pci_map_single (db)
+ * 2001/03/21 td and dev/ed allocation uses new pci_pool API (db)
+ * 2001/03/07 hcca allocation uses pci_alloc_consistent (Steve Longerbeam)
+ *
+ * 2000/09/26 fixed races in removing the private portion of the urb
+ * 2000/09/07 disable bulk and control lists when unlinking the last
+ * endpoint descriptor in order to avoid unrecoverable errors on
+ * the Lucent chips. (rwc@sgi)
+ * 2000/08/29 use bandwidth claiming hooks (thanks Randy!), fix some
+ * urb unlink probs, indentation fixes
+ * 2000/08/11 various oops fixes mostly affecting iso and cleanup from
+ * device unplugs.
+ * 2000/06/28 use PCI hotplug framework, for better power management
+ * and for Cardbus support (David Brownell)
+ * 2000/earlier: fixes for NEC/Lucent chips; suspend/resume handling
+ * when the controller loses power; handle UE; cleanup; ...
+ *
+ * v5.2 1999/12/07 URB 3rd preview,
+ * v5.1 1999/11/30 URB 2nd preview, cpia, (usb-scsi)
+ * v5.0 1999/11/22 URB Technical preview, Paul Mackerras powerbook susp/resume
+ * i386: HUB, Keyboard, Mouse, Printer
+ *
+ * v4.3 1999/10/27 multiple HCs, bulk_request
+ * v4.2 1999/09/05 ISO API alpha, new dev alloc, neg Error-codes
+ * v4.1 1999/08/27 Randy Dunlap's - ISO API first impl.
+ * v4.0 1999/08/18
+ * v3.0 1999/06/25
+ * v2.1 1999/05/09 code clean up
+ * v2.0 1999/05/04
+ * v1.0 1999/04/27 initial release
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_USB_DEBUG
+# define DEBUG
+#else
+# undef DEBUG
+#endif
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h> /* for in_interrupt () */
+#include <linux/usb.h>
+#include <linux/usb_otg.h>
+#include "../core/hcd.h"
+#include <linux/dma-mapping.h>
+#include <linux/dmapool.h> /* needed by ohci-mem.c when no PCI */
+
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+#include <asm/byteorder.h>
+
+
+#define DRIVER_VERSION "2004 Nov 08"
+#define DRIVER_AUTHOR "Roman Weissgaerber, David Brownell"
+#define DRIVER_DESC "USB 1.1 'Open' Host Controller (OHCI) Driver"
+
+/*-------------------------------------------------------------------------*/
+
+// #define OHCI_VERBOSE_DEBUG /* not always helpful */
+
+/* For initializing controller (mask in an HCFS mode too) */
+#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR
+#define OHCI_INTR_INIT \
+ (OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_RD | OHCI_INTR_WDH)
+
+#ifdef __hppa__
+/* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
+#define IR_DISABLE
+#endif
+
+#ifdef CONFIG_ARCH_OMAP
+/* OMAP doesn't support IR (no SMM; not needed) */
+#define IR_DISABLE
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static const char hcd_name [] = "ohci_hcd";
+
+#include "ohci.h"
+
+static void ohci_dump (struct ohci_hcd *ohci, int verbose);
+static int ohci_init (struct ohci_hcd *ohci);
+static void ohci_stop (struct usb_hcd *hcd);
+
+#include "ohci-hub.c"
+#include "ohci-dbg.c"
+#include "ohci-mem.c"
+#include "ohci-q.c"
+
+
+/*
+ * On architectures with edge-triggered interrupts we must never return
+ * IRQ_NONE.
+ */
+#if defined(CONFIG_SA1111) /* ... or other edge-triggered systems */
+#define IRQ_NOTMINE IRQ_HANDLED
+#else
+#define IRQ_NOTMINE IRQ_NONE
+#endif
+
+
+/* Some boards misreport power switching/overcurrent */
+static int distrust_firmware = 1;
+module_param (distrust_firmware, bool, 0);
+MODULE_PARM_DESC (distrust_firmware,
+ "true to distrust firmware power/overcurrent setup");
+
+/* Some boards leave IR set wrongly, since they fail BIOS/SMM handshakes */
+static int no_handshake = 0;
+module_param (no_handshake, bool, 0);
+MODULE_PARM_DESC (no_handshake, "true (not default) disables BIOS handshake");
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * queue up an urb for anything except the root hub
+ */
+static int ohci_urb_enqueue (
+ struct usb_hcd *hcd,
+ struct usb_host_endpoint *ep,
+ struct urb *urb,
+ int mem_flags
+) {
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ struct ed *ed;
+ urb_priv_t *urb_priv;
+ unsigned int pipe = urb->pipe;
+ int i, size = 0;
+ unsigned long flags;
+ int retval = 0;
+
+#ifdef OHCI_VERBOSE_DEBUG
+ urb_print (urb, "SUB", usb_pipein (pipe));
+#endif
+
+ /* every endpoint has a ed, locate and maybe (re)initialize it */
+ if (! (ed = ed_get (ohci, ep, urb->dev, pipe, urb->interval)))
+ return -ENOMEM;
+
+ /* for the private part of the URB we need the number of TDs (size) */
+ switch (ed->type) {
+ case PIPE_CONTROL:
+ /* td_submit_urb() doesn't yet handle these */
+ if (urb->transfer_buffer_length > 4096)
+ return -EMSGSIZE;
+
+ /* 1 TD for setup, 1 for ACK, plus ... */
+ size = 2;
+ /* FALLTHROUGH */
+ // case PIPE_INTERRUPT:
+ // case PIPE_BULK:
+ default:
+ /* one TD for every 4096 Bytes (can be upto 8K) */
+ size += urb->transfer_buffer_length / 4096;
+ /* ... and for any remaining bytes ... */
+ if ((urb->transfer_buffer_length % 4096) != 0)
+ size++;
+ /* ... and maybe a zero length packet to wrap it up */
+ if (size == 0)
+ size++;
+ else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0
+ && (urb->transfer_buffer_length
+ % usb_maxpacket (urb->dev, pipe,
+ usb_pipeout (pipe))) == 0)
+ size++;
+ break;
+ case PIPE_ISOCHRONOUS: /* number of packets from URB */
+ size = urb->number_of_packets;
+ break;
+ }
+
+ /* allocate the private part of the URB */
+ urb_priv = kmalloc (sizeof (urb_priv_t) + size * sizeof (struct td *),
+ mem_flags);
+ if (!urb_priv)
+ return -ENOMEM;
+ memset (urb_priv, 0, sizeof (urb_priv_t) + size * sizeof (struct td *));
+ INIT_LIST_HEAD (&urb_priv->pending);
+ urb_priv->length = size;
+ urb_priv->ed = ed;
+
+ /* allocate the TDs (deferring hash chain updates) */
+ for (i = 0; i < size; i++) {
+ urb_priv->td [i] = td_alloc (ohci, mem_flags);
+ if (!urb_priv->td [i]) {
+ urb_priv->length = i;
+ urb_free_priv (ohci, urb_priv);
+ return -ENOMEM;
+ }
+ }
+
+ spin_lock_irqsave (&ohci->lock, flags);
+
+ /* don't submit to a dead HC */
+ if (!HC_IS_RUNNING(hcd->state)) {
+ retval = -ENODEV;
+ goto fail;
+ }
+
+ /* in case of unlink-during-submit */
+ spin_lock (&urb->lock);
+ if (urb->status != -EINPROGRESS) {
+ spin_unlock (&urb->lock);
+ urb->hcpriv = urb_priv;
+ finish_urb (ohci, urb, NULL);
+ retval = 0;
+ goto fail;
+ }
+
+ /* schedule the ed if needed */
+ if (ed->state == ED_IDLE) {
+ retval = ed_schedule (ohci, ed);
+ if (retval < 0)
+ goto fail0;
+ if (ed->type == PIPE_ISOCHRONOUS) {
+ u16 frame = ohci_frame_no(ohci);
+
+ /* delay a few frames before the first TD */
+ frame += max_t (u16, 8, ed->interval);
+ frame &= ~(ed->interval - 1);
+ frame |= ed->branch;
+ urb->start_frame = frame;
+
+ /* yes, only URB_ISO_ASAP is supported, and
+ * urb->start_frame is never used as input.
+ */
+ }
+ } else if (ed->type == PIPE_ISOCHRONOUS)
+ urb->start_frame = ed->last_iso + ed->interval;
+
+ /* fill the TDs and link them to the ed; and
+ * enable that part of the schedule, if needed
+ * and update count of queued periodic urbs
+ */
+ urb->hcpriv = urb_priv;
+ td_submit_urb (ohci, urb);
+
+fail0:
+ spin_unlock (&urb->lock);
+fail:
+ if (retval)
+ urb_free_priv (ohci, urb_priv);
+ spin_unlock_irqrestore (&ohci->lock, flags);
+ return retval;
+}
+
+/*
+ * decouple the URB from the HC queues (TDs, urb_priv); it's
+ * already marked using urb->status. reporting is always done
+ * asynchronously, and we might be dealing with an urb that's
+ * partially transferred, or an ED with other urbs being unlinked.
+ */
+static int ohci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ unsigned long flags;
+
+#ifdef OHCI_VERBOSE_DEBUG
+ urb_print (urb, "UNLINK", 1);
+#endif
+
+ spin_lock_irqsave (&ohci->lock, flags);
+ if (HC_IS_RUNNING(hcd->state)) {
+ urb_priv_t *urb_priv;
+
+ /* Unless an IRQ completed the unlink while it was being
+ * handed to us, flag it for unlink and giveback, and force
+ * some upcoming INTR_SF to call finish_unlinks()
+ */
+ urb_priv = urb->hcpriv;
+ if (urb_priv) {
+ if (urb_priv->ed->state == ED_OPER)
+ start_ed_unlink (ohci, urb_priv->ed);
+ }
+ } else {
+ /*
+ * with HC dead, we won't respect hc queue pointers
+ * any more ... just clean up every urb's memory.
+ */
+ if (urb->hcpriv)
+ finish_urb (ohci, urb, NULL);
+ }
+ spin_unlock_irqrestore (&ohci->lock, flags);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* frees config/altsetting state for endpoints,
+ * including ED memory, dummy TD, and bulk/intr data toggle
+ */
+
+static void
+ohci_endpoint_disable (struct usb_hcd *hcd, struct usb_host_endpoint *ep)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ unsigned long flags;
+ struct ed *ed = ep->hcpriv;
+ unsigned limit = 1000;
+
+ /* ASSERT: any requests/urbs are being unlinked */
+ /* ASSERT: nobody can be submitting urbs for this any more */
+
+ if (!ed)
+ return;
+
+rescan:
+ spin_lock_irqsave (&ohci->lock, flags);
+
+ if (!HC_IS_RUNNING (hcd->state)) {
+sanitize:
+ ed->state = ED_IDLE;
+ finish_unlinks (ohci, 0, NULL);
+ }
+
+ switch (ed->state) {
+ case ED_UNLINK: /* wait for hw to finish? */
+ /* major IRQ delivery trouble loses INTR_SF too... */
+ if (limit-- == 0) {
+ ohci_warn (ohci, "IRQ INTR_SF lossage\n");
+ goto sanitize;
+ }
+ spin_unlock_irqrestore (&ohci->lock, flags);
+ set_current_state (TASK_UNINTERRUPTIBLE);
+ schedule_timeout (1);
+ goto rescan;
+ case ED_IDLE: /* fully unlinked */
+ if (list_empty (&ed->td_list)) {
+ td_free (ohci, ed->dummy);
+ ed_free (ohci, ed);
+ break;
+ }
+ /* else FALL THROUGH */
+ default:
+ /* caller was supposed to have unlinked any requests;
+ * that's not our job. can't recover; must leak ed.
+ */
+ ohci_err (ohci, "leak ed %p (#%02x) state %d%s\n",
+ ed, ep->desc.bEndpointAddress, ed->state,
+ list_empty (&ed->td_list) ? "" : " (has tds)");
+ td_free (ohci, ed->dummy);
+ break;
+ }
+ ep->hcpriv = NULL;
+ spin_unlock_irqrestore (&ohci->lock, flags);
+ return;
+}
+
+static int ohci_get_frame (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+
+ return ohci_frame_no(ohci);
+}
+
+static void ohci_usb_reset (struct ohci_hcd *ohci)
+{
+ ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);
+ ohci->hc_control &= OHCI_CTRL_RWC;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+}
+
+/*-------------------------------------------------------------------------*
+ * HC functions
+ *-------------------------------------------------------------------------*/
+
+/* init memory, and kick BIOS/SMM off */
+
+static int ohci_init (struct ohci_hcd *ohci)
+{
+ int ret;
+
+ disable (ohci);
+ ohci->regs = ohci_to_hcd(ohci)->regs;
+ ohci->next_statechange = jiffies;
+
+#ifndef IR_DISABLE
+ /* SMM owns the HC? not for long! */
+ if (!no_handshake && ohci_readl (ohci,
+ &ohci->regs->control) & OHCI_CTRL_IR) {
+ u32 temp;
+
+ ohci_dbg (ohci, "USB HC TakeOver from BIOS/SMM\n");
+
+ /* this timeout is arbitrary. we make it long, so systems
+ * depending on usb keyboards may be usable even if the
+ * BIOS/SMM code seems pretty broken.
+ */
+ temp = 500; /* arbitrary: five seconds */
+
+ ohci_writel (ohci, OHCI_INTR_OC, &ohci->regs->intrenable);
+ ohci_writel (ohci, OHCI_OCR, &ohci->regs->cmdstatus);
+ while (ohci_readl (ohci, &ohci->regs->control) & OHCI_CTRL_IR) {
+ msleep (10);
+ if (--temp == 0) {
+ ohci_err (ohci, "USB HC takeover failed!"
+ " (BIOS/SMM bug)\n");
+ return -EBUSY;
+ }
+ }
+ ohci_usb_reset (ohci);
+ }
+#endif
+
+ /* Disable HC interrupts */
+ ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
+ // flush the writes
+ (void) ohci_readl (ohci, &ohci->regs->control);
+
+ if (ohci->hcca)
+ return 0;
+
+ ohci->hcca = dma_alloc_coherent (ohci_to_hcd(ohci)->self.controller,
+ sizeof *ohci->hcca, &ohci->hcca_dma, 0);
+ if (!ohci->hcca)
+ return -ENOMEM;
+
+ if ((ret = ohci_mem_init (ohci)) < 0)
+ ohci_stop (ohci_to_hcd(ohci));
+
+ return ret;
+
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* Start an OHCI controller, set the BUS operational
+ * resets USB and controller
+ * enable interrupts
+ * connect the virtual root hub
+ */
+static int ohci_run (struct ohci_hcd *ohci)
+{
+ u32 mask, temp;
+ struct usb_device *udev;
+ struct usb_bus *bus;
+ int first = ohci->fminterval == 0;
+
+ disable (ohci);
+
+ /* boot firmware should have set this up (5.1.1.3.1) */
+ if (first) {
+
+ temp = ohci_readl (ohci, &ohci->regs->fminterval);
+ ohci->fminterval = temp & 0x3fff;
+ if (ohci->fminterval != FI)
+ ohci_dbg (ohci, "fminterval delta %d\n",
+ ohci->fminterval - FI);
+ ohci->fminterval |= FSMP (ohci->fminterval) << 16;
+ /* also: power/overcurrent flags in roothub.a */
+ }
+
+ /* Reset USB nearly "by the book". RemoteWakeupConnected
+ * saved if boot firmware (BIOS/SMM/...) told us it's connected
+ * (for OHCI integrated on mainboard, it normally is)
+ */
+ ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);
+ ohci_dbg (ohci, "resetting from state '%s', control = 0x%x\n",
+ hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),
+ ohci->hc_control);
+
+ if (ohci->hc_control & OHCI_CTRL_RWC
+ && !(ohci->flags & OHCI_QUIRK_AMD756))
+ ohci_to_hcd(ohci)->can_wakeup = 1;
+
+ switch (ohci->hc_control & OHCI_CTRL_HCFS) {
+ case OHCI_USB_OPER:
+ temp = 0;
+ break;
+ case OHCI_USB_SUSPEND:
+ case OHCI_USB_RESUME:
+ ohci->hc_control &= OHCI_CTRL_RWC;
+ ohci->hc_control |= OHCI_USB_RESUME;
+ temp = 10 /* msec wait */;
+ break;
+ // case OHCI_USB_RESET:
+ default:
+ ohci->hc_control &= OHCI_CTRL_RWC;
+ ohci->hc_control |= OHCI_USB_RESET;
+ temp = 50 /* msec wait */;
+ break;
+ }
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ // flush the writes
+ (void) ohci_readl (ohci, &ohci->regs->control);
+ msleep(temp);
+ temp = roothub_a (ohci);
+ if (!(temp & RH_A_NPS)) {
+ unsigned ports = temp & RH_A_NDP;
+
+ /* power down each port */
+ for (temp = 0; temp < ports; temp++)
+ ohci_writel (ohci, RH_PS_LSDA,
+ &ohci->regs->roothub.portstatus [temp]);
+ }
+ // flush those writes
+ (void) ohci_readl (ohci, &ohci->regs->control);
+ memset (ohci->hcca, 0, sizeof (struct ohci_hcca));
+
+ /* 2msec timelimit here means no irqs/preempt */
+ spin_lock_irq (&ohci->lock);
+
+retry:
+ /* HC Reset requires max 10 us delay */
+ ohci_writel (ohci, OHCI_HCR, &ohci->regs->cmdstatus);
+ temp = 30; /* ... allow extra time */
+ while ((ohci_readl (ohci, &ohci->regs->cmdstatus) & OHCI_HCR) != 0) {
+ if (--temp == 0) {
+ spin_unlock_irq (&ohci->lock);
+ ohci_err (ohci, "USB HC reset timed out!\n");
+ return -1;
+ }
+ udelay (1);
+ }
+
+ /* now we're in the SUSPEND state ... must go OPERATIONAL
+ * within 2msec else HC enters RESUME
+ *
+ * ... but some hardware won't init fmInterval "by the book"
+ * (SiS, OPTi ...), so reset again instead. SiS doesn't need
+ * this if we write fmInterval after we're OPERATIONAL.
+ * Unclear about ALi, ServerWorks, and others ... this could
+ * easily be a longstanding bug in chip init on Linux.
+ */
+ if (ohci->flags & OHCI_QUIRK_INITRESET) {
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ // flush those writes
+ (void) ohci_readl (ohci, &ohci->regs->control);
+ }
+
+ /* Tell the controller where the control and bulk lists are
+ * The lists are empty now. */
+ ohci_writel (ohci, 0, &ohci->regs->ed_controlhead);
+ ohci_writel (ohci, 0, &ohci->regs->ed_bulkhead);
+
+ /* a reset clears this */
+ ohci_writel (ohci, (u32) ohci->hcca_dma, &ohci->regs->hcca);
+
+ periodic_reinit (ohci);
+
+ /* some OHCI implementations are finicky about how they init.
+ * bogus values here mean not even enumeration could work.
+ */
+ if ((ohci_readl (ohci, &ohci->regs->fminterval) & 0x3fff0000) == 0
+ || !ohci_readl (ohci, &ohci->regs->periodicstart)) {
+ if (!(ohci->flags & OHCI_QUIRK_INITRESET)) {
+ ohci->flags |= OHCI_QUIRK_INITRESET;
+ ohci_dbg (ohci, "enabling initreset quirk\n");
+ goto retry;
+ }
+ spin_unlock_irq (&ohci->lock);
+ ohci_err (ohci, "init err (%08x %04x)\n",
+ ohci_readl (ohci, &ohci->regs->fminterval),
+ ohci_readl (ohci, &ohci->regs->periodicstart));
+ return -EOVERFLOW;
+ }
+
+ /* start controller operations */
+ ohci->hc_control &= OHCI_CTRL_RWC;
+ ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ ohci_to_hcd(ohci)->state = HC_STATE_RUNNING;
+
+ /* wake on ConnectStatusChange, matching external hubs */
+ ohci_writel (ohci, RH_HS_DRWE, &ohci->regs->roothub.status);
+
+ /* Choose the interrupts we care about now, others later on demand */
+ mask = OHCI_INTR_INIT;
+ ohci_writel (ohci, mask, &ohci->regs->intrstatus);
+ ohci_writel (ohci, mask, &ohci->regs->intrenable);
+
+ /* handle root hub init quirks ... */
+ temp = roothub_a (ohci);
+ temp &= ~(RH_A_PSM | RH_A_OCPM);
+ if (ohci->flags & OHCI_QUIRK_SUPERIO) {
+ /* NSC 87560 and maybe others */
+ temp |= RH_A_NOCP;
+ temp &= ~(RH_A_POTPGT | RH_A_NPS);
+ ohci_writel (ohci, temp, &ohci->regs->roothub.a);
+ } else if ((ohci->flags & OHCI_QUIRK_AMD756) || distrust_firmware) {
+ /* hub power always on; required for AMD-756 and some
+ * Mac platforms. ganged overcurrent reporting, if any.
+ */
+ temp |= RH_A_NPS;
+ ohci_writel (ohci, temp, &ohci->regs->roothub.a);
+ }
+ ohci_writel (ohci, RH_HS_LPSC, &ohci->regs->roothub.status);
+ ohci_writel (ohci, (temp & RH_A_NPS) ? 0 : RH_B_PPCM,
+ &ohci->regs->roothub.b);
+ // flush those writes
+ (void) ohci_readl (ohci, &ohci->regs->control);
+
+ spin_unlock_irq (&ohci->lock);
+
+ // POTPGT delay is bits 24-31, in 2 ms units.
+ mdelay ((temp >> 23) & 0x1fe);
+ bus = &ohci_to_hcd(ohci)->self;
+ ohci_to_hcd(ohci)->state = HC_STATE_RUNNING;
+
+ ohci_dump (ohci, 1);
+
+ udev = bus->root_hub;
+ if (udev) {
+ return 0;
+ }
+
+ /* connect the virtual root hub */
+ udev = usb_alloc_dev (NULL, bus, 0);
+ if (!udev) {
+ disable (ohci);
+ ohci->hc_control &= ~OHCI_CTRL_HCFS;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ return -ENOMEM;
+ }
+
+ udev->speed = USB_SPEED_FULL;
+ if (usb_hcd_register_root_hub (udev, ohci_to_hcd(ohci)) != 0) {
+ usb_put_dev (udev);
+ disable (ohci);
+ ohci->hc_control &= ~OHCI_CTRL_HCFS;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ return -ENODEV;
+ }
+ if (ohci->power_budget)
+ hub_set_power_budget(udev, ohci->power_budget);
+
+ create_debug_files (ohci);
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* an interrupt happens */
+
+static irqreturn_t ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ struct ohci_regs __iomem *regs = ohci->regs;
+ int ints;
+
+ /* we can eliminate a (slow) ohci_readl()
+ if _only_ WDH caused this irq */
+ if ((ohci->hcca->done_head != 0)
+ && ! (hc32_to_cpup (ohci, &ohci->hcca->done_head)
+ & 0x01)) {
+ ints = OHCI_INTR_WDH;
+
+ /* cardbus/... hardware gone before remove() */
+ } else if ((ints = ohci_readl (ohci, &regs->intrstatus)) == ~(u32)0) {
+ disable (ohci);
+ ohci_dbg (ohci, "device removed!\n");
+ return IRQ_HANDLED;
+
+ /* interrupt for some other device? */
+ } else if ((ints &= ohci_readl (ohci, &regs->intrenable)) == 0) {
+ return IRQ_NOTMINE;
+ }
+
+ if (ints & OHCI_INTR_UE) {
+ disable (ohci);
+ ohci_err (ohci, "OHCI Unrecoverable Error, disabled\n");
+ // e.g. due to PCI Master/Target Abort
+
+ ohci_dump (ohci, 1);
+ ohci_usb_reset (ohci);
+ }
+
+ if (ints & OHCI_INTR_RD) {
+ ohci_vdbg (ohci, "resume detect\n");
+ if (hcd->state != HC_STATE_QUIESCING)
+ schedule_work(&ohci->rh_resume);
+ }
+
+ if (ints & OHCI_INTR_WDH) {
+ if (HC_IS_RUNNING(hcd->state))
+ ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrdisable);
+ spin_lock (&ohci->lock);
+ dl_done_list (ohci, ptregs);
+ spin_unlock (&ohci->lock);
+ if (HC_IS_RUNNING(hcd->state))
+ ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrenable);
+ }
+
+ /* could track INTR_SO to reduce available PCI/... bandwidth */
+
+ /* handle any pending URB/ED unlinks, leaving INTR_SF enabled
+ * when there's still unlinking to be done (next frame).
+ */
+ spin_lock (&ohci->lock);
+ if (ohci->ed_rm_list)
+ finish_unlinks (ohci, ohci_frame_no(ohci), ptregs);
+ if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list
+ && HC_IS_RUNNING(hcd->state))
+ ohci_writel (ohci, OHCI_INTR_SF, &regs->intrdisable);
+ spin_unlock (&ohci->lock);
+
+ if (HC_IS_RUNNING(hcd->state)) {
+ ohci_writel (ohci, ints, &regs->intrstatus);
+ ohci_writel (ohci, OHCI_INTR_MIE, &regs->intrenable);
+ // flush those writes
+ (void) ohci_readl (ohci, &ohci->regs->control);
+ }
+
+ return IRQ_HANDLED;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void ohci_stop (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+
+ ohci_dbg (ohci, "stop %s controller (state 0x%02x)\n",
+ hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),
+ hcd->state);
+ ohci_dump (ohci, 1);
+
+ flush_scheduled_work();
+
+ ohci_usb_reset (ohci);
+ ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
+
+ remove_debug_files (ohci);
+ ohci_mem_cleanup (ohci);
+ if (ohci->hcca) {
+ dma_free_coherent (hcd->self.controller,
+ sizeof *ohci->hcca,
+ ohci->hcca, ohci->hcca_dma);
+ ohci->hcca = NULL;
+ ohci->hcca_dma = 0;
+ }
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* must not be called from interrupt context */
+
+#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM)
+
+static int ohci_restart (struct ohci_hcd *ohci)
+{
+ int temp;
+ int i;
+ struct urb_priv *priv;
+ struct usb_device *root = ohci_to_hcd(ohci)->self.root_hub;
+
+ /* mark any devices gone, so they do nothing till khubd disconnects.
+ * recycle any "live" eds/tds (and urbs) right away.
+ * later, khubd disconnect processing will recycle the other state,
+ * (either as disconnect/reconnect, or maybe someday as a reset).
+ */
+ spin_lock_irq(&ohci->lock);
+ disable (ohci);
+ for (i = 0; i < root->maxchild; i++) {
+ if (root->children [i])
+ usb_set_device_state (root->children[i],
+ USB_STATE_NOTATTACHED);
+ }
+ if (!list_empty (&ohci->pending))
+ ohci_dbg(ohci, "abort schedule...\n");
+ list_for_each_entry (priv, &ohci->pending, pending) {
+ struct urb *urb = priv->td[0]->urb;
+ struct ed *ed = priv->ed;
+
+ switch (ed->state) {
+ case ED_OPER:
+ ed->state = ED_UNLINK;
+ ed->hwINFO |= cpu_to_hc32(ohci, ED_DEQUEUE);
+ ed_deschedule (ohci, ed);
+
+ ed->ed_next = ohci->ed_rm_list;
+ ed->ed_prev = NULL;
+ ohci->ed_rm_list = ed;
+ /* FALLTHROUGH */
+ case ED_UNLINK:
+ break;
+ default:
+ ohci_dbg(ohci, "bogus ed %p state %d\n",
+ ed, ed->state);
+ }
+
+ spin_lock (&urb->lock);
+ urb->status = -ESHUTDOWN;
+ spin_unlock (&urb->lock);
+ }
+ finish_unlinks (ohci, 0, NULL);
+ spin_unlock_irq(&ohci->lock);
+
+ /* paranoia, in case that didn't work: */
+
+ /* empty the interrupt branches */
+ for (i = 0; i < NUM_INTS; i++) ohci->load [i] = 0;
+ for (i = 0; i < NUM_INTS; i++) ohci->hcca->int_table [i] = 0;
+
+ /* no EDs to remove */
+ ohci->ed_rm_list = NULL;
+
+ /* empty control and bulk lists */
+ ohci->ed_controltail = NULL;
+ ohci->ed_bulktail = NULL;
+
+ if ((temp = ohci_run (ohci)) < 0) {
+ ohci_err (ohci, "can't restart, %d\n", temp);
+ return temp;
+ } else {
+ /* here we "know" root ports should always stay powered,
+ * and that if we try to turn them back on the root hub
+ * will respond to CSC processing.
+ */
+ i = roothub_a (ohci) & RH_A_NDP;
+ while (i--)
+ ohci_writel (ohci, RH_PS_PSS,
+ &ohci->regs->roothub.portstatus [temp]);
+ ohci_dbg (ohci, "restart complete\n");
+ }
+ return 0;
+}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC
+
+MODULE_AUTHOR (DRIVER_AUTHOR);
+MODULE_DESCRIPTION (DRIVER_INFO);
+MODULE_LICENSE ("GPL");
+
+#ifdef CONFIG_PCI
+#include "ohci-pci.c"
+#endif
+
+#ifdef CONFIG_SA1111
+#include "ohci-sa1111.c"
+#endif
+
+#ifdef CONFIG_ARCH_OMAP
+#include "ohci-omap.c"
+#endif
+
+#ifdef CONFIG_ARCH_LH7A404
+#include "ohci-lh7a404.c"
+#endif
+
+#ifdef CONFIG_PXA27x
+#include "ohci-pxa27x.c"
+#endif
+
+#ifdef CONFIG_SOC_AU1X00
+#include "ohci-au1xxx.c"
+#endif
+
+#ifdef CONFIG_USB_OHCI_HCD_PPC_SOC
+#include "ohci-ppc-soc.c"
+#endif
+
+#if !(defined(CONFIG_PCI) \
+ || defined(CONFIG_SA1111) \
+ || defined(CONFIG_ARCH_OMAP) \
+ || defined (CONFIG_ARCH_LH7A404) \
+ || defined (CONFIG_PXA27x) \
+ || defined (CONFIG_SOC_AU1X00) \
+ || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \
+ )
+#error "missing bus glue for ohci-hcd"
+#endif
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
new file mode 100644
index 000000000000..e2fc4129dfc6
--- /dev/null
+++ b/drivers/usb/host/ohci-hub.c
@@ -0,0 +1,643 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net>
+ *
+ * This file is licenced under GPL
+ */
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * OHCI Root Hub ... the nonsharable stuff
+ */
+
+#define dbg_port(hc,label,num,value) \
+ ohci_dbg (hc, \
+ "%s roothub.portstatus [%d] " \
+ "= 0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \
+ label, num, temp, \
+ (temp & RH_PS_PRSC) ? " PRSC" : "", \
+ (temp & RH_PS_OCIC) ? " OCIC" : "", \
+ (temp & RH_PS_PSSC) ? " PSSC" : "", \
+ (temp & RH_PS_PESC) ? " PESC" : "", \
+ (temp & RH_PS_CSC) ? " CSC" : "", \
+ \
+ (temp & RH_PS_LSDA) ? " LSDA" : "", \
+ (temp & RH_PS_PPS) ? " PPS" : "", \
+ (temp & RH_PS_PRS) ? " PRS" : "", \
+ (temp & RH_PS_POCI) ? " POCI" : "", \
+ (temp & RH_PS_PSS) ? " PSS" : "", \
+ \
+ (temp & RH_PS_PES) ? " PES" : "", \
+ (temp & RH_PS_CCS) ? " CCS" : "" \
+ );
+
+/*-------------------------------------------------------------------------*/
+
+#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM)
+
+#define OHCI_SCHED_ENABLES \
+ (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE)
+
+static void dl_done_list (struct ohci_hcd *, struct pt_regs *);
+static void finish_unlinks (struct ohci_hcd *, u16 , struct pt_regs *);
+static int ohci_restart (struct ohci_hcd *ohci);
+
+static int ohci_hub_suspend (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int status = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave (&ohci->lock, flags);
+
+ ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);
+ switch (ohci->hc_control & OHCI_CTRL_HCFS) {
+ case OHCI_USB_RESUME:
+ ohci_dbg (ohci, "resume/suspend?\n");
+ ohci->hc_control &= ~OHCI_CTRL_HCFS;
+ ohci->hc_control |= OHCI_USB_RESET;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ (void) ohci_readl (ohci, &ohci->regs->control);
+ /* FALL THROUGH */
+ case OHCI_USB_RESET:
+ status = -EBUSY;
+ ohci_dbg (ohci, "needs reinit!\n");
+ goto done;
+ case OHCI_USB_SUSPEND:
+ ohci_dbg (ohci, "already suspended\n");
+ goto done;
+ }
+ ohci_dbg (ohci, "suspend root hub\n");
+
+ /* First stop any processing */
+ hcd->state = HC_STATE_QUIESCING;
+ if (ohci->hc_control & OHCI_SCHED_ENABLES) {
+ int limit;
+
+ ohci->hc_control &= ~OHCI_SCHED_ENABLES;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);
+ ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrstatus);
+
+ /* sched disables take effect on the next frame,
+ * then the last WDH could take 6+ msec
+ */
+ ohci_dbg (ohci, "stopping schedules ...\n");
+ limit = 2000;
+ while (limit > 0) {
+ udelay (250);
+ limit =- 250;
+ if (ohci_readl (ohci, &ohci->regs->intrstatus)
+ & OHCI_INTR_SF)
+ break;
+ }
+ dl_done_list (ohci, NULL);
+ mdelay (7);
+ }
+ dl_done_list (ohci, NULL);
+ finish_unlinks (ohci, ohci_frame_no(ohci), NULL);
+ ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus),
+ &ohci->regs->intrstatus);
+
+ /* maybe resume can wake root hub */
+ if (hcd->remote_wakeup)
+ ohci->hc_control |= OHCI_CTRL_RWE;
+ else
+ ohci->hc_control &= ~OHCI_CTRL_RWE;
+
+ /* Suspend hub */
+ ohci->hc_control &= ~OHCI_CTRL_HCFS;
+ ohci->hc_control |= OHCI_USB_SUSPEND;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ (void) ohci_readl (ohci, &ohci->regs->control);
+
+ /* no resumes until devices finish suspending */
+ ohci->next_statechange = jiffies + msecs_to_jiffies (5);
+
+done:
+ if (status == 0)
+ hcd->state = HC_STATE_SUSPENDED;
+ spin_unlock_irqrestore (&ohci->lock, flags);
+ return status;
+}
+
+static inline struct ed *find_head (struct ed *ed)
+{
+ /* for bulk and control lists */
+ while (ed->ed_prev)
+ ed = ed->ed_prev;
+ return ed;
+}
+
+/* caller has locked the root hub */
+static int ohci_hub_resume (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ u32 temp, enables;
+ int status = -EINPROGRESS;
+
+ if (time_before (jiffies, ohci->next_statechange))
+ msleep(5);
+
+ spin_lock_irq (&ohci->lock);
+ ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);
+
+ if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) {
+ /* this can happen after suspend-to-disk */
+ if (hcd->state == HC_STATE_RESUMING) {
+ ohci_dbg (ohci, "BIOS/SMM active, control %03x\n",
+ ohci->hc_control);
+ status = -EBUSY;
+ /* this happens when pmcore resumes HC then root */
+ } else {
+ ohci_dbg (ohci, "duplicate resume\n");
+ status = 0;
+ }
+ } else switch (ohci->hc_control & OHCI_CTRL_HCFS) {
+ case OHCI_USB_SUSPEND:
+ ohci->hc_control &= ~(OHCI_CTRL_HCFS|OHCI_SCHED_ENABLES);
+ ohci->hc_control |= OHCI_USB_RESUME;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ (void) ohci_readl (ohci, &ohci->regs->control);
+ ohci_dbg (ohci, "resume root hub\n");
+ break;
+ case OHCI_USB_RESUME:
+ /* HCFS changes sometime after INTR_RD */
+ ohci_info (ohci, "wakeup\n");
+ break;
+ case OHCI_USB_OPER:
+ ohci_dbg (ohci, "already resumed\n");
+ status = 0;
+ break;
+ default: /* RESET, we lost power */
+ ohci_dbg (ohci, "root hub hardware reset\n");
+ status = -EBUSY;
+ }
+ spin_unlock_irq (&ohci->lock);
+ if (status == -EBUSY) {
+ (void) ohci_init (ohci);
+ return ohci_restart (ohci);
+ }
+ if (status != -EINPROGRESS)
+ return status;
+
+ temp = roothub_a (ohci) & RH_A_NDP;
+ enables = 0;
+ while (temp--) {
+ u32 stat = ohci_readl (ohci,
+ &ohci->regs->roothub.portstatus [temp]);
+
+ /* force global, not selective, resume */
+ if (!(stat & RH_PS_PSS))
+ continue;
+ ohci_writel (ohci, RH_PS_POCI,
+ &ohci->regs->roothub.portstatus [temp]);
+ }
+
+ /* Some controllers (lucent erratum) need extra-long delays */
+ hcd->state = HC_STATE_RESUMING;
+ mdelay (20 /* usb 11.5.1.10 */ + 15);
+
+ temp = ohci_readl (ohci, &ohci->regs->control);
+ temp &= OHCI_CTRL_HCFS;
+ if (temp != OHCI_USB_RESUME) {
+ ohci_err (ohci, "controller won't resume\n");
+ return -EBUSY;
+ }
+
+ /* disable old schedule state, reinit from scratch */
+ ohci_writel (ohci, 0, &ohci->regs->ed_controlhead);
+ ohci_writel (ohci, 0, &ohci->regs->ed_controlcurrent);
+ ohci_writel (ohci, 0, &ohci->regs->ed_bulkhead);
+ ohci_writel (ohci, 0, &ohci->regs->ed_bulkcurrent);
+ ohci_writel (ohci, 0, &ohci->regs->ed_periodcurrent);
+ ohci_writel (ohci, (u32) ohci->hcca_dma, &ohci->regs->hcca);
+
+ /* Sometimes PCI D3 suspend trashes frame timings ... */
+ periodic_reinit (ohci);
+
+ /* interrupts might have been disabled */
+ ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
+ if (ohci->ed_rm_list)
+ ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable);
+ ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus),
+ &ohci->regs->intrstatus);
+
+ /* Then re-enable operations */
+ ohci_writel (ohci, OHCI_USB_OPER, &ohci->regs->control);
+ (void) ohci_readl (ohci, &ohci->regs->control);
+ msleep (3);
+
+ temp = OHCI_CONTROL_INIT | OHCI_USB_OPER;
+ if (hcd->can_wakeup)
+ temp |= OHCI_CTRL_RWC;
+ ohci->hc_control = temp;
+ ohci_writel (ohci, temp, &ohci->regs->control);
+ (void) ohci_readl (ohci, &ohci->regs->control);
+
+ /* TRSMRCY */
+ msleep (10);
+
+ /* keep it alive for ~5x suspend + resume costs */
+ ohci->next_statechange = jiffies + msecs_to_jiffies (250);
+
+ /* maybe turn schedules back on */
+ enables = 0;
+ temp = 0;
+ if (!ohci->ed_rm_list) {
+ if (ohci->ed_controltail) {
+ ohci_writel (ohci,
+ find_head (ohci->ed_controltail)->dma,
+ &ohci->regs->ed_controlhead);
+ enables |= OHCI_CTRL_CLE;
+ temp |= OHCI_CLF;
+ }
+ if (ohci->ed_bulktail) {
+ ohci_writel (ohci, find_head (ohci->ed_bulktail)->dma,
+ &ohci->regs->ed_bulkhead);
+ enables |= OHCI_CTRL_BLE;
+ temp |= OHCI_BLF;
+ }
+ }
+ if (hcd->self.bandwidth_isoc_reqs || hcd->self.bandwidth_int_reqs)
+ enables |= OHCI_CTRL_PLE|OHCI_CTRL_IE;
+ if (enables) {
+ ohci_dbg (ohci, "restarting schedules ... %08x\n", enables);
+ ohci->hc_control |= enables;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ if (temp)
+ ohci_writel (ohci, temp, &ohci->regs->cmdstatus);
+ (void) ohci_readl (ohci, &ohci->regs->control);
+ }
+
+ hcd->state = HC_STATE_RUNNING;
+ return 0;
+}
+
+static void ohci_rh_resume (void *_hcd)
+{
+ struct usb_hcd *hcd = _hcd;
+
+ usb_lock_device (hcd->self.root_hub);
+ (void) ohci_hub_resume (hcd);
+ usb_unlock_device (hcd->self.root_hub);
+}
+
+#else
+
+static void ohci_rh_resume (void *_hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (_hcd);
+ ohci_dbg(ohci, "rh_resume ??\n");
+}
+
+#endif /* CONFIG_USB_SUSPEND || CONFIG_PM */
+
+/*-------------------------------------------------------------------------*/
+
+/* build "status change" packet (one or two bytes) from HC registers */
+
+static int
+ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int ports, i, changed = 0, length = 1;
+ int can_suspend = hcd->can_wakeup;
+ unsigned long flags;
+
+ spin_lock_irqsave (&ohci->lock, flags);
+
+ /* handle autosuspended root: finish resuming before
+ * letting khubd or root hub timer see state changes.
+ */
+ if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER
+ || !HC_IS_RUNNING(hcd->state)) {
+ can_suspend = 0;
+ goto done;
+ }
+
+ ports = roothub_a (ohci) & RH_A_NDP;
+ if (ports > MAX_ROOT_PORTS) {
+ ohci_err (ohci, "bogus NDP=%d, rereads as NDP=%d\n", ports,
+ ohci_readl (ohci, &ohci->regs->roothub.a) & RH_A_NDP);
+ /* retry later; "should not happen" */
+ goto done;
+ }
+
+ /* init status */
+ if (roothub_status (ohci) & (RH_HS_LPSC | RH_HS_OCIC))
+ buf [0] = changed = 1;
+ else
+ buf [0] = 0;
+ if (ports > 7) {
+ buf [1] = 0;
+ length++;
+ }
+
+ /* look at each port */
+ for (i = 0; i < ports; i++) {
+ u32 status = roothub_portstatus (ohci, i);
+
+ if (status & (RH_PS_CSC | RH_PS_PESC | RH_PS_PSSC
+ | RH_PS_OCIC | RH_PS_PRSC)) {
+ changed = 1;
+ if (i < 7)
+ buf [0] |= 1 << (i + 1);
+ else
+ buf [1] |= 1 << (i - 7);
+ continue;
+ }
+
+ /* can suspend if no ports are enabled; or if all all
+ * enabled ports are suspended AND remote wakeup is on.
+ */
+ if (!(status & RH_PS_CCS))
+ continue;
+ if ((status & RH_PS_PSS) && hcd->remote_wakeup)
+ continue;
+ can_suspend = 0;
+ }
+done:
+ spin_unlock_irqrestore (&ohci->lock, flags);
+
+#ifdef CONFIG_PM
+ /* save power by suspending idle root hubs;
+ * INTR_RD wakes us when there's work
+ * NOTE: if we can do this, we don't need a root hub timer!
+ */
+ if (can_suspend
+ && !changed
+ && !ohci->ed_rm_list
+ && ((OHCI_CTRL_HCFS | OHCI_SCHED_ENABLES)
+ & ohci->hc_control)
+ == OHCI_USB_OPER
+ && time_after (jiffies, ohci->next_statechange)
+ && usb_trylock_device (hcd->self.root_hub)
+ ) {
+ ohci_vdbg (ohci, "autosuspend\n");
+ (void) ohci_hub_suspend (hcd);
+ hcd->state = HC_STATE_RUNNING;
+ usb_unlock_device (hcd->self.root_hub);
+ }
+#endif
+
+ return changed ? length : 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void
+ohci_hub_descriptor (
+ struct ohci_hcd *ohci,
+ struct usb_hub_descriptor *desc
+) {
+ u32 rh = roothub_a (ohci);
+ int ports = rh & RH_A_NDP;
+ u16 temp;
+
+ desc->bDescriptorType = 0x29;
+ desc->bPwrOn2PwrGood = (rh & RH_A_POTPGT) >> 24;
+ desc->bHubContrCurrent = 0;
+
+ desc->bNbrPorts = ports;
+ temp = 1 + (ports / 8);
+ desc->bDescLength = 7 + 2 * temp;
+
+ temp = 0;
+ if (rh & RH_A_NPS) /* no power switching? */
+ temp |= 0x0002;
+ if (rh & RH_A_PSM) /* per-port power switching? */
+ temp |= 0x0001;
+ if (rh & RH_A_NOCP) /* no overcurrent reporting? */
+ temp |= 0x0010;
+ else if (rh & RH_A_OCPM) /* per-port overcurrent reporting? */
+ temp |= 0x0008;
+ desc->wHubCharacteristics = (__force __u16)cpu_to_hc16(ohci, temp);
+
+ /* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */
+ rh = roothub_b (ohci);
+ desc->bitmap [0] = rh & RH_B_DR;
+ if (ports > 7) {
+ desc->bitmap [1] = (rh & RH_B_DR) >> 8;
+ desc->bitmap [2] = desc->bitmap [3] = 0xff;
+ } else
+ desc->bitmap [1] = 0xff;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_USB_OTG
+
+static int ohci_start_port_reset (struct usb_hcd *hcd, unsigned port)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ u32 status;
+
+ if (!port)
+ return -EINVAL;
+ port--;
+
+ /* start port reset before HNP protocol times out */
+ status = ohci_readl(ohci, &ohci->regs->roothub.portstatus [port]);
+ if (!(status & RH_PS_CCS))
+ return -ENODEV;
+
+ /* khubd will finish the reset later */
+ ohci_writel(ohci, RH_PS_PRS, &ohci->regs->roothub.portstatus [port]);
+ return 0;
+}
+
+static void start_hnp(struct ohci_hcd *ohci);
+
+#else
+
+#define ohci_start_port_reset NULL
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+
+/* See usb 7.1.7.5: root hubs must issue at least 50 msec reset signaling,
+ * not necessarily continuous ... to guard against resume signaling.
+ * The short timeout is safe for non-root hubs, and is backward-compatible
+ * with earlier Linux hosts.
+ */
+#ifdef CONFIG_USB_SUSPEND
+#define PORT_RESET_MSEC 50
+#else
+#define PORT_RESET_MSEC 10
+#endif
+
+/* this timer value might be vendor-specific ... */
+#define PORT_RESET_HW_MSEC 10
+
+/* wrap-aware logic morphed from <linux/jiffies.h> */
+#define tick_before(t1,t2) ((s16)(((s16)(t1))-((s16)(t2))) < 0)
+
+/* called from some task, normally khubd */
+static inline void root_port_reset (struct ohci_hcd *ohci, unsigned port)
+{
+ __hc32 __iomem *portstat = &ohci->regs->roothub.portstatus [port];
+ u32 temp;
+ u16 now = ohci_readl(ohci, &ohci->regs->fmnumber);
+ u16 reset_done = now + PORT_RESET_MSEC;
+
+ /* build a "continuous enough" reset signal, with up to
+ * 3msec gap between pulses. scheduler HZ==100 must work;
+ * this might need to be deadline-scheduled.
+ */
+ do {
+ /* spin until any current reset finishes */
+ for (;;) {
+ temp = ohci_readl (ohci, portstat);
+ if (!(temp & RH_PS_PRS))
+ break;
+ udelay (500);
+ }
+
+ if (!(temp & RH_PS_CCS))
+ break;
+ if (temp & RH_PS_PRSC)
+ ohci_writel (ohci, RH_PS_PRSC, portstat);
+
+ /* start the next reset, sleep till it's probably done */
+ ohci_writel (ohci, RH_PS_PRS, portstat);
+ msleep(PORT_RESET_HW_MSEC);
+ now = ohci_readl(ohci, &ohci->regs->fmnumber);
+ } while (tick_before(now, reset_done));
+ /* caller synchronizes using PRSC */
+}
+
+static int ohci_hub_control (
+ struct usb_hcd *hcd,
+ u16 typeReq,
+ u16 wValue,
+ u16 wIndex,
+ char *buf,
+ u16 wLength
+) {
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int ports = hcd_to_bus (hcd)->root_hub->maxchild;
+ u32 temp;
+ int retval = 0;
+
+ switch (typeReq) {
+ case ClearHubFeature:
+ switch (wValue) {
+ case C_HUB_OVER_CURRENT:
+ ohci_writel (ohci, RH_HS_OCIC,
+ &ohci->regs->roothub.status);
+ case C_HUB_LOCAL_POWER:
+ break;
+ default:
+ goto error;
+ }
+ break;
+ case ClearPortFeature:
+ if (!wIndex || wIndex > ports)
+ goto error;
+ wIndex--;
+
+ switch (wValue) {
+ case USB_PORT_FEAT_ENABLE:
+ temp = RH_PS_CCS;
+ break;
+ case USB_PORT_FEAT_C_ENABLE:
+ temp = RH_PS_PESC;
+ break;
+ case USB_PORT_FEAT_SUSPEND:
+ temp = RH_PS_POCI;
+ if ((ohci->hc_control & OHCI_CTRL_HCFS)
+ != OHCI_USB_OPER)
+ schedule_work (&ohci->rh_resume);
+ break;
+ case USB_PORT_FEAT_C_SUSPEND:
+ temp = RH_PS_PSSC;
+ break;
+ case USB_PORT_FEAT_POWER:
+ temp = RH_PS_LSDA;
+ break;
+ case USB_PORT_FEAT_C_CONNECTION:
+ temp = RH_PS_CSC;
+ break;
+ case USB_PORT_FEAT_C_OVER_CURRENT:
+ temp = RH_PS_OCIC;
+ break;
+ case USB_PORT_FEAT_C_RESET:
+ temp = RH_PS_PRSC;
+ break;
+ default:
+ goto error;
+ }
+ ohci_writel (ohci, temp,
+ &ohci->regs->roothub.portstatus [wIndex]);
+ // ohci_readl (ohci, &ohci->regs->roothub.portstatus [wIndex]);
+ break;
+ case GetHubDescriptor:
+ ohci_hub_descriptor (ohci, (struct usb_hub_descriptor *) buf);
+ break;
+ case GetHubStatus:
+ temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE);
+ *(__le32 *) buf = cpu_to_le32 (temp);
+ break;
+ case GetPortStatus:
+ if (!wIndex || wIndex > ports)
+ goto error;
+ wIndex--;
+ temp = roothub_portstatus (ohci, wIndex);
+ *(__le32 *) buf = cpu_to_le32 (temp);
+
+#ifndef OHCI_VERBOSE_DEBUG
+ if (*(u16*)(buf+2)) /* only if wPortChange is interesting */
+#endif
+ dbg_port (ohci, "GetStatus", wIndex, temp);
+ break;
+ case SetHubFeature:
+ switch (wValue) {
+ case C_HUB_OVER_CURRENT:
+ // FIXME: this can be cleared, yes?
+ case C_HUB_LOCAL_POWER:
+ break;
+ default:
+ goto error;
+ }
+ break;
+ case SetPortFeature:
+ if (!wIndex || wIndex > ports)
+ goto error;
+ wIndex--;
+ switch (wValue) {
+ case USB_PORT_FEAT_SUSPEND:
+#ifdef CONFIG_USB_OTG
+ if (hcd->self.otg_port == (wIndex + 1)
+ && hcd->self.b_hnp_enable)
+ start_hnp(ohci);
+ else
+#endif
+ ohci_writel (ohci, RH_PS_PSS,
+ &ohci->regs->roothub.portstatus [wIndex]);
+ break;
+ case USB_PORT_FEAT_POWER:
+ ohci_writel (ohci, RH_PS_PPS,
+ &ohci->regs->roothub.portstatus [wIndex]);
+ break;
+ case USB_PORT_FEAT_RESET:
+ root_port_reset (ohci, wIndex);
+ break;
+ default:
+ goto error;
+ }
+ break;
+
+ default:
+error:
+ /* "protocol stall" on error */
+ retval = -EPIPE;
+ }
+ return retval;
+}
+
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
new file mode 100644
index 000000000000..817620d73841
--- /dev/null
+++ b/drivers/usb/host/ohci-lh7a404.c
@@ -0,0 +1,266 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * (C) Copyright 2002 Hewlett-Packard Company
+ *
+ * Bus Glue for Sharp LH7A404
+ *
+ * Written by Christopher Hoover <ch@hpl.hp.com>
+ * Based on fragments of previous driver by Rusell King et al.
+ *
+ * Modified for LH7A404 from ohci-sa1111.c
+ * by Durgesh Pattamatta <pattamattad@sharpsec.com>
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/arch/hardware.h>
+
+
+extern int usb_disabled(void);
+
+/*-------------------------------------------------------------------------*/
+
+static void lh7a404_start_hc(struct platform_device *dev)
+{
+ printk(KERN_DEBUG __FILE__
+ ": starting LH7A404 OHCI USB Controller\n");
+
+ /*
+ * Now, carefully enable the USB clock, and take
+ * the USB host controller out of reset.
+ */
+ CSC_PWRCNT |= CSC_PWRCNT_USBH_EN; /* Enable clock */
+ udelay(1000);
+ USBH_CMDSTATUS = OHCI_HCR;
+
+ printk(KERN_DEBUG __FILE__
+ ": Clock to USB host has been enabled \n");
+}
+
+static void lh7a404_stop_hc(struct platform_device *dev)
+{
+ printk(KERN_DEBUG __FILE__
+ ": stopping LH7A404 OHCI USB Controller\n");
+
+ CSC_PWRCNT &= ~CSC_PWRCNT_USBH_EN; /* Disable clock */
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+
+/**
+ * usb_hcd_lh7a404_probe - initialize LH7A404-based HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ */
+int usb_hcd_lh7a404_probe (const struct hc_driver *driver,
+ struct platform_device *dev)
+{
+ int retval;
+ struct usb_hcd *hcd;
+
+ if (dev->resource[1].flags != IORESOURCE_IRQ) {
+ pr_debug("resource[1] is not IORESOURCE_IRQ");
+ return -ENOMEM;
+ }
+
+ hcd = usb_create_hcd(driver, &dev->dev, "lh7a404");
+ if (!hcd)
+ return -ENOMEM;
+ hcd->rsrc_start = dev->resource[0].start;
+ hcd->rsrc_len = dev->resource[0].end - dev->resource[0].start + 1;
+
+ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+ pr_debug("request_mem_region failed");
+ retval = -EBUSY;
+ goto err1;
+ }
+
+ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
+ if (!hcd->regs) {
+ pr_debug("ioremap failed");
+ retval = -ENOMEM;
+ goto err2;
+ }
+
+ lh7a404_start_hc(dev);
+ ohci_hcd_init(hcd_to_ohci(hcd));
+
+ retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT);
+ if (retval == 0)
+ return retval;
+
+ lh7a404_stop_hc(dev);
+ iounmap(hcd->regs);
+ err2:
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ err1:
+ usb_put_hcd(hcd);
+ return retval;
+}
+
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_lh7a404_remove - shutdown processing for LH7A404-based HCDs
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_lh7a404_probe(), first invoking
+ * the HCD's stop() method. It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ */
+void usb_hcd_lh7a404_remove (struct usb_hcd *hcd, struct platform_device *dev)
+{
+ usb_remove_hcd(hcd);
+ lh7a404_stop_hc(dev);
+ iounmap(hcd->regs);
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ usb_put_hcd(hcd);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int __devinit
+ohci_lh7a404_start (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int ret;
+
+ ohci_dbg (ohci, "ohci_lh7a404_start, ohci:%p", ohci);
+ if ((ret = ohci_init(ohci)) < 0)
+ return ret;
+
+ if ((ret = ohci_run (ohci)) < 0) {
+ err ("can't start %s", hcd->self.bus_name);
+ ohci_stop (hcd);
+ return ret;
+ }
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static const struct hc_driver ohci_lh7a404_hc_driver = {
+ .description = hcd_name,
+ .product_desc = "LH7A404 OHCI",
+ .hcd_priv_size = sizeof(struct ohci_hcd),
+
+ /*
+ * generic hardware linkage
+ */
+ .irq = ohci_irq,
+ .flags = HCD_USB11 | HCD_MEMORY,
+
+ /*
+ * basic lifecycle operations
+ */
+ .start = ohci_lh7a404_start,
+#ifdef CONFIG_PM
+ /* suspend: ohci_lh7a404_suspend, -- tbd */
+ /* resume: ohci_lh7a404_resume, -- tbd */
+#endif /*CONFIG_PM*/
+ .stop = ohci_stop,
+
+ /*
+ * managing i/o requests and associated device resources
+ */
+ .urb_enqueue = ohci_urb_enqueue,
+ .urb_dequeue = ohci_urb_dequeue,
+ .endpoint_disable = ohci_endpoint_disable,
+
+ /*
+ * scheduling support
+ */
+ .get_frame_number = ohci_get_frame,
+
+ /*
+ * root hub support
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int ohci_hcd_lh7a404_drv_probe(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ int ret;
+
+ pr_debug ("In ohci_hcd_lh7a404_drv_probe");
+
+ if (usb_disabled())
+ return -ENODEV;
+
+ ret = usb_hcd_lh7a404_probe(&ohci_lh7a404_hc_driver, pdev);
+ return ret;
+}
+
+static int ohci_hcd_lh7a404_drv_remove(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+ usb_hcd_lh7a404_remove(hcd, pdev);
+ return 0;
+}
+ /*TBD*/
+/*static int ohci_hcd_lh7a404_drv_suspend(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+ return 0;
+}
+static int ohci_hcd_lh7a404_drv_resume(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+
+ return 0;
+}
+*/
+
+static struct device_driver ohci_hcd_lh7a404_driver = {
+ .name = "lh7a404-ohci",
+ .bus = &platform_bus_type,
+ .probe = ohci_hcd_lh7a404_drv_probe,
+ .remove = ohci_hcd_lh7a404_drv_remove,
+ /*.suspend = ohci_hcd_lh7a404_drv_suspend, */
+ /*.resume = ohci_hcd_lh7a404_drv_resume, */
+};
+
+static int __init ohci_hcd_lh7a404_init (void)
+{
+ pr_debug (DRIVER_INFO " (LH7A404)");
+ pr_debug ("block sizes: ed %d td %d\n",
+ sizeof (struct ed), sizeof (struct td));
+
+ return driver_register(&ohci_hcd_lh7a404_driver);
+}
+
+static void __exit ohci_hcd_lh7a404_cleanup (void)
+{
+ driver_unregister(&ohci_hcd_lh7a404_driver);
+}
+
+module_init (ohci_hcd_lh7a404_init);
+module_exit (ohci_hcd_lh7a404_cleanup);
diff --git a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c
new file mode 100644
index 000000000000..e55682b4919d
--- /dev/null
+++ b/drivers/usb/host/ohci-mem.c
@@ -0,0 +1,139 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ *
+ * This file is licenced under the GPL.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * There's basically three types of memory:
+ * - data used only by the HCD ... kmalloc is fine
+ * - async and periodic schedules, shared by HC and HCD ... these
+ * need to use dma_pool or dma_alloc_coherent
+ * - driver buffers, read/written by HC ... the hcd glue or the
+ * device driver provides us with dma addresses
+ *
+ * There's also PCI "register" data, which is memory mapped.
+ * No memory seen by this driver is pagable.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+static void ohci_hcd_init (struct ohci_hcd *ohci)
+{
+ ohci->next_statechange = jiffies;
+ spin_lock_init (&ohci->lock);
+ INIT_LIST_HEAD (&ohci->pending);
+ INIT_WORK (&ohci->rh_resume, ohci_rh_resume, ohci_to_hcd(ohci));
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int ohci_mem_init (struct ohci_hcd *ohci)
+{
+ ohci->td_cache = dma_pool_create ("ohci_td",
+ ohci_to_hcd(ohci)->self.controller,
+ sizeof (struct td),
+ 32 /* byte alignment */,
+ 0 /* no page-crossing issues */);
+ if (!ohci->td_cache)
+ return -ENOMEM;
+ ohci->ed_cache = dma_pool_create ("ohci_ed",
+ ohci_to_hcd(ohci)->self.controller,
+ sizeof (struct ed),
+ 16 /* byte alignment */,
+ 0 /* no page-crossing issues */);
+ if (!ohci->ed_cache) {
+ dma_pool_destroy (ohci->td_cache);
+ return -ENOMEM;
+ }
+ return 0;
+}
+
+static void ohci_mem_cleanup (struct ohci_hcd *ohci)
+{
+ if (ohci->td_cache) {
+ dma_pool_destroy (ohci->td_cache);
+ ohci->td_cache = NULL;
+ }
+ if (ohci->ed_cache) {
+ dma_pool_destroy (ohci->ed_cache);
+ ohci->ed_cache = NULL;
+ }
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* ohci "done list" processing needs this mapping */
+static inline struct td *
+dma_to_td (struct ohci_hcd *hc, dma_addr_t td_dma)
+{
+ struct td *td;
+
+ td_dma &= TD_MASK;
+ td = hc->td_hash [TD_HASH_FUNC(td_dma)];
+ while (td && td->td_dma != td_dma)
+ td = td->td_hash;
+ return td;
+}
+
+/* TDs ... */
+static struct td *
+td_alloc (struct ohci_hcd *hc, int mem_flags)
+{
+ dma_addr_t dma;
+ struct td *td;
+
+ td = dma_pool_alloc (hc->td_cache, mem_flags, &dma);
+ if (td) {
+ /* in case hc fetches it, make it look dead */
+ memset (td, 0, sizeof *td);
+ td->hwNextTD = cpu_to_hc32 (hc, dma);
+ td->td_dma = dma;
+ /* hashed in td_fill */
+ }
+ return td;
+}
+
+static void
+td_free (struct ohci_hcd *hc, struct td *td)
+{
+ struct td **prev = &hc->td_hash [TD_HASH_FUNC (td->td_dma)];
+
+ while (*prev && *prev != td)
+ prev = &(*prev)->td_hash;
+ if (*prev)
+ *prev = td->td_hash;
+ else if ((td->hwINFO & cpu_to_hc32(hc, TD_DONE)) != 0)
+ ohci_dbg (hc, "no hash for td %p\n", td);
+ dma_pool_free (hc->td_cache, td, td->td_dma);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* EDs ... */
+static struct ed *
+ed_alloc (struct ohci_hcd *hc, int mem_flags)
+{
+ dma_addr_t dma;
+ struct ed *ed;
+
+ ed = dma_pool_alloc (hc->ed_cache, mem_flags, &dma);
+ if (ed) {
+ memset (ed, 0, sizeof (*ed));
+ INIT_LIST_HEAD (&ed->td_list);
+ ed->dma = dma;
+ }
+ return ed;
+}
+
+static void
+ed_free (struct ohci_hcd *hc, struct ed *ed)
+{
+ dma_pool_free (hc->ed_cache, ed, ed->dma);
+}
+
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
new file mode 100644
index 000000000000..90285f180f87
--- /dev/null
+++ b/drivers/usb/host/ohci-omap.c
@@ -0,0 +1,560 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2005 David Brownell
+ * (C) Copyright 2002 Hewlett-Packard Company
+ *
+ * OMAP Bus Glue
+ *
+ * Modified for OMAP by Tony Lindgren <tony@atomide.com>
+ * Based on the 2.4 OMAP OHCI driver originally done by MontaVista Software Inc.
+ * and on ohci-sa1111.c by Christopher Hoover <ch@hpl.hp.com>
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/mach-types.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/irqs.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/fpga.h>
+#include <asm/arch/usb.h>
+#include <asm/hardware/clock.h>
+
+
+/* OMAP-1510 OHCI has its own MMU for DMA */
+#define OMAP1510_LB_MEMSIZE 32 /* Should be same as SDRAM size */
+#define OMAP1510_LB_CLOCK_DIV 0xfffec10c
+#define OMAP1510_LB_MMU_CTL 0xfffec208
+#define OMAP1510_LB_MMU_LCK 0xfffec224
+#define OMAP1510_LB_MMU_LD_TLB 0xfffec228
+#define OMAP1510_LB_MMU_CAM_H 0xfffec22c
+#define OMAP1510_LB_MMU_CAM_L 0xfffec230
+#define OMAP1510_LB_MMU_RAM_H 0xfffec234
+#define OMAP1510_LB_MMU_RAM_L 0xfffec238
+
+
+#ifndef CONFIG_ARCH_OMAP
+#error "This file is OMAP bus glue. CONFIG_OMAP must be defined."
+#endif
+
+#ifdef CONFIG_TPS65010
+#include <asm/arch/tps65010.h>
+#else
+
+#define LOW 0
+#define HIGH 1
+
+#define GPIO1 1
+
+static inline int tps65010_set_gpio_out_value(unsigned gpio, unsigned value)
+{
+ return 0;
+}
+
+#endif
+
+extern int usb_disabled(void);
+extern int ocpi_enable(void);
+
+static struct clk *usb_host_ck;
+
+static void omap_ohci_clock_power(int on)
+{
+ if (on) {
+ clk_enable(usb_host_ck);
+ /* guesstimate for T5 == 1x 32K clock + APLL lock time */
+ udelay(100);
+ } else {
+ clk_disable(usb_host_ck);
+ }
+}
+
+/*
+ * Board specific gang-switched transceiver power on/off.
+ * NOTE: OSK supplies power from DC, not battery.
+ */
+static int omap_ohci_transceiver_power(int on)
+{
+ if (on) {
+ if (machine_is_omap_innovator() && cpu_is_omap1510())
+ fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL)
+ | ((1 << 5/*usb1*/) | (1 << 3/*usb2*/)),
+ INNOVATOR_FPGA_CAM_USB_CONTROL);
+ else if (machine_is_omap_osk())
+ tps65010_set_gpio_out_value(GPIO1, LOW);
+ } else {
+ if (machine_is_omap_innovator() && cpu_is_omap1510())
+ fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL)
+ & ~((1 << 5/*usb1*/) | (1 << 3/*usb2*/)),
+ INNOVATOR_FPGA_CAM_USB_CONTROL);
+ else if (machine_is_omap_osk())
+ tps65010_set_gpio_out_value(GPIO1, HIGH);
+ }
+
+ return 0;
+}
+
+/*
+ * OMAP-1510 specific Local Bus clock on/off
+ */
+static int omap_1510_local_bus_power(int on)
+{
+ if (on) {
+ omap_writel((1 << 1) | (1 << 0), OMAP1510_LB_MMU_CTL);
+ udelay(200);
+ } else {
+ omap_writel(0, OMAP1510_LB_MMU_CTL);
+ }
+
+ return 0;
+}
+
+/*
+ * OMAP-1510 specific Local Bus initialization
+ * NOTE: This assumes 32MB memory size in OMAP1510LB_MEMSIZE.
+ * See also arch/mach-omap/memory.h for __virt_to_dma() and
+ * __dma_to_virt() which need to match with the physical
+ * Local Bus address below.
+ */
+static int omap_1510_local_bus_init(void)
+{
+ unsigned int tlb;
+ unsigned long lbaddr, physaddr;
+
+ omap_writel((omap_readl(OMAP1510_LB_CLOCK_DIV) & 0xfffffff8) | 0x4,
+ OMAP1510_LB_CLOCK_DIV);
+
+ /* Configure the Local Bus MMU table */
+ for (tlb = 0; tlb < OMAP1510_LB_MEMSIZE; tlb++) {
+ lbaddr = tlb * 0x00100000 + OMAP1510_LB_OFFSET;
+ physaddr = tlb * 0x00100000 + PHYS_OFFSET;
+ omap_writel((lbaddr & 0x0fffffff) >> 22, OMAP1510_LB_MMU_CAM_H);
+ omap_writel(((lbaddr & 0x003ffc00) >> 6) | 0xc,
+ OMAP1510_LB_MMU_CAM_L);
+ omap_writel(physaddr >> 16, OMAP1510_LB_MMU_RAM_H);
+ omap_writel((physaddr & 0x0000fc00) | 0x300, OMAP1510_LB_MMU_RAM_L);
+ omap_writel(tlb << 4, OMAP1510_LB_MMU_LCK);
+ omap_writel(0x1, OMAP1510_LB_MMU_LD_TLB);
+ }
+
+ /* Enable the walking table */
+ omap_writel(omap_readl(OMAP1510_LB_MMU_CTL) | (1 << 3), OMAP1510_LB_MMU_CTL);
+ udelay(200);
+
+ return 0;
+}
+
+#ifdef CONFIG_USB_OTG
+
+static void start_hnp(struct ohci_hcd *ohci)
+{
+ const unsigned port = ohci_to_hcd(ohci)->self.otg_port - 1;
+ unsigned long flags;
+
+ otg_start_hnp(ohci->transceiver);
+
+ local_irq_save(flags);
+ ohci->transceiver->state = OTG_STATE_A_SUSPEND;
+ writel (RH_PS_PSS, &ohci->regs->roothub.portstatus [port]);
+ OTG_CTRL_REG &= ~OTG_A_BUSREQ;
+ local_irq_restore(flags);
+}
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static int omap_start_hc(struct ohci_hcd *ohci, struct platform_device *pdev)
+{
+ struct omap_usb_config *config = pdev->dev.platform_data;
+ int need_transceiver = (config->otg != 0);
+ int ret;
+
+ dev_dbg(&pdev->dev, "starting USB Controller\n");
+
+ if (config->otg) {
+ ohci_to_hcd(ohci)->self.otg_port = config->otg;
+ /* default/minimum OTG power budget: 8 mA */
+ ohci->power_budget = 8;
+ }
+
+ /* boards can use OTG transceivers in non-OTG modes */
+ need_transceiver = need_transceiver
+ || machine_is_omap_h2() || machine_is_omap_h3();
+
+ if (cpu_is_omap16xx())
+ ocpi_enable();
+
+#ifdef CONFIG_ARCH_OMAP_OTG
+ if (need_transceiver) {
+ ohci->transceiver = otg_get_transceiver();
+ if (ohci->transceiver) {
+ int status = otg_set_host(ohci->transceiver,
+ &ohci_to_hcd(ohci)->self);
+ dev_dbg(&pdev->dev, "init %s transceiver, status %d\n",
+ ohci->transceiver->label, status);
+ if (status) {
+ if (ohci->transceiver)
+ put_device(ohci->transceiver->dev);
+ return status;
+ }
+ } else {
+ dev_err(&pdev->dev, "can't find transceiver\n");
+ return -ENODEV;
+ }
+ }
+#endif
+
+ omap_ohci_clock_power(1);
+
+ if (cpu_is_omap1510()) {
+ omap_1510_local_bus_power(1);
+ omap_1510_local_bus_init();
+ }
+
+ if ((ret = ohci_init(ohci)) < 0)
+ return ret;
+
+ /* board-specific power switching and overcurrent support */
+ if (machine_is_omap_osk() || machine_is_omap_innovator()) {
+ u32 rh = roothub_a (ohci);
+
+ /* power switching (ganged by default) */
+ rh &= ~RH_A_NPS;
+
+ /* TPS2045 switch for internal transceiver (port 1) */
+ if (machine_is_omap_osk()) {
+ ohci->power_budget = 250;
+
+ rh &= ~RH_A_NOCP;
+
+ /* gpio9 for overcurrent detction */
+ omap_cfg_reg(W8_1610_GPIO9);
+ omap_request_gpio(9);
+ omap_set_gpio_direction(9, 1 /* IN */);
+
+ /* for paranoia's sake: disable USB.PUEN */
+ omap_cfg_reg(W4_USB_HIGHZ);
+ }
+ ohci_writel(ohci, rh, &ohci->regs->roothub.a);
+ distrust_firmware = 0;
+ }
+
+ /* FIXME khubd hub requests should manage power switching */
+ omap_ohci_transceiver_power(1);
+
+ /* board init will have already handled HMC and mux setup.
+ * any external transceiver should already be initialized
+ * too, so all configured ports use the right signaling now.
+ */
+
+ return 0;
+}
+
+static void omap_stop_hc(struct platform_device *pdev)
+{
+ dev_dbg(&pdev->dev, "stopping USB Controller\n");
+ omap_ohci_clock_power(0);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+void usb_hcd_omap_remove (struct usb_hcd *, struct platform_device *);
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+
+/**
+ * usb_hcd_omap_probe - initialize OMAP-based HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ */
+int usb_hcd_omap_probe (const struct hc_driver *driver,
+ struct platform_device *pdev)
+{
+ int retval;
+ struct usb_hcd *hcd = 0;
+ struct ohci_hcd *ohci;
+
+ if (pdev->num_resources != 2) {
+ printk(KERN_ERR "hcd probe: invalid num_resources: %i\n",
+ pdev->num_resources);
+ return -ENODEV;
+ }
+
+ if (pdev->resource[0].flags != IORESOURCE_MEM
+ || pdev->resource[1].flags != IORESOURCE_IRQ) {
+ printk(KERN_ERR "hcd probe: invalid resource type\n");
+ return -ENODEV;
+ }
+
+ usb_host_ck = clk_get(0, "usb_hhc_ck");
+ if (IS_ERR(usb_host_ck))
+ return PTR_ERR(usb_host_ck);
+
+ hcd = usb_create_hcd (driver, &pdev->dev, pdev->dev.bus_id);
+ if (!hcd) {
+ retval = -ENOMEM;
+ goto err0;
+ }
+ hcd->rsrc_start = pdev->resource[0].start;
+ hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
+
+ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+ dev_dbg(&pdev->dev, "request_mem_region failed\n");
+ retval = -EBUSY;
+ goto err1;
+ }
+
+ hcd->regs = (void __iomem *) (int) IO_ADDRESS(hcd->rsrc_start);
+
+ ohci = hcd_to_ohci(hcd);
+ ohci_hcd_init(ohci);
+
+ retval = omap_start_hc(ohci, pdev);
+ if (retval < 0)
+ goto err2;
+
+ retval = usb_add_hcd(hcd, platform_get_irq(pdev, 0), SA_INTERRUPT);
+ if (retval == 0)
+ return retval;
+
+ omap_stop_hc(pdev);
+err2:
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+err1:
+ usb_put_hcd(hcd);
+err0:
+ clk_put(usb_host_ck);
+ return retval;
+}
+
+
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_omap_remove - shutdown processing for OMAP-based HCDs
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_omap_probe(), first invoking
+ * the HCD's stop() method. It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ */
+void usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
+{
+ usb_remove_hcd(hcd);
+ if (machine_is_omap_osk())
+ omap_free_gpio(9);
+ omap_stop_hc(pdev);
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ usb_put_hcd(hcd);
+ clk_put(usb_host_ck);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int __devinit
+ohci_omap_start (struct usb_hcd *hcd)
+{
+ struct omap_usb_config *config;
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int ret;
+
+ config = hcd->self.controller->platform_data;
+ if (config->otg || config->rwc)
+ writel(OHCI_CTRL_RWC, &ohci->regs->control);
+
+ if ((ret = ohci_run (ohci)) < 0) {
+ dev_err(hcd->self.controller, "can't start\n");
+ ohci_stop (hcd);
+ return ret;
+ }
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static const struct hc_driver ohci_omap_hc_driver = {
+ .description = hcd_name,
+ .product_desc = "OMAP OHCI",
+ .hcd_priv_size = sizeof(struct ohci_hcd),
+
+ /*
+ * generic hardware linkage
+ */
+ .irq = ohci_irq,
+ .flags = HCD_USB11 | HCD_MEMORY,
+
+ /*
+ * basic lifecycle operations
+ */
+ .start = ohci_omap_start,
+ .stop = ohci_stop,
+
+ /*
+ * managing i/o requests and associated device resources
+ */
+ .urb_enqueue = ohci_urb_enqueue,
+ .urb_dequeue = ohci_urb_dequeue,
+ .endpoint_disable = ohci_endpoint_disable,
+
+ /*
+ * scheduling support
+ */
+ .get_frame_number = ohci_get_frame,
+
+ /*
+ * root hub support
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+#ifdef CONFIG_USB_SUSPEND
+ .hub_suspend = ohci_hub_suspend,
+ .hub_resume = ohci_hub_resume,
+#endif
+ .start_port_reset = ohci_start_port_reset,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int ohci_hcd_omap_drv_probe(struct device *dev)
+{
+ return usb_hcd_omap_probe(&ohci_omap_hc_driver,
+ to_platform_device(dev));
+}
+
+static int ohci_hcd_omap_drv_remove(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+
+ usb_hcd_omap_remove(hcd, pdev);
+ if (ohci->transceiver) {
+ (void) otg_set_host(ohci->transceiver, 0);
+ put_device(ohci->transceiver->dev);
+ }
+ dev_set_drvdata(dev, NULL);
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_PM
+
+/* states match PCI usage, always suspending the root hub except that
+ * 4 ~= D3cold (ACPI D3) with clock off (resume sees reset).
+ */
+
+static int ohci_omap_suspend(struct device *dev, u32 state, u32 level)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev));
+ int status = -EINVAL;
+
+ if (level != SUSPEND_POWER_DOWN)
+ return 0;
+ if (state <= dev->power.power_state)
+ return 0;
+
+ dev_dbg(dev, "suspend to %d\n", state);
+ down(&ohci_to_hcd(ohci)->self.root_hub->serialize);
+ status = ohci_hub_suspend(ohci_to_hcd(ohci));
+ if (status == 0) {
+ if (state >= 4) {
+ omap_ohci_clock_power(0);
+ ohci_to_hcd(ohci)->self.root_hub->state =
+ USB_STATE_SUSPENDED;
+ state = 4;
+ }
+ ohci_to_hcd(ohci)->state = HC_STATE_SUSPENDED;
+ dev->power.power_state = state;
+ }
+ up(&ohci_to_hcd(ohci)->self.root_hub->serialize);
+ return status;
+}
+
+static int ohci_omap_resume(struct device *dev, u32 level)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev));
+ int status = 0;
+
+ if (level != RESUME_POWER_ON)
+ return 0;
+
+ switch (dev->power.power_state) {
+ case 0:
+ break;
+ case 4:
+ if (time_before(jiffies, ohci->next_statechange))
+ msleep(5);
+ ohci->next_statechange = jiffies;
+ omap_ohci_clock_power(1);
+ /* FALLTHROUGH */
+ default:
+ dev_dbg(dev, "resume from %d\n", dev->power.power_state);
+#ifdef CONFIG_USB_SUSPEND
+ /* get extra cleanup even if remote wakeup isn't in use */
+ status = usb_resume_device(ohci_to_hcd(ohci)->self.root_hub);
+#else
+ down(&ohci_to_hcd(ohci)->self.root_hub->serialize);
+ status = ohci_hub_resume(ohci_to_hcd(ohci));
+ up(&ohci_to_hcd(ohci)->self.root_hub->serialize);
+#endif
+ if (status == 0)
+ dev->power.power_state = 0;
+ break;
+ }
+ return status;
+}
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Driver definition to register with the OMAP bus
+ */
+static struct device_driver ohci_hcd_omap_driver = {
+ .name = "ohci",
+ .bus = &platform_bus_type,
+ .probe = ohci_hcd_omap_drv_probe,
+ .remove = ohci_hcd_omap_drv_remove,
+#ifdef CONFIG_PM
+ .suspend = ohci_omap_suspend,
+ .resume = ohci_omap_resume,
+#endif
+};
+
+static int __init ohci_hcd_omap_init (void)
+{
+ printk (KERN_DEBUG "%s: " DRIVER_INFO " (OMAP)\n", hcd_name);
+ if (usb_disabled())
+ return -ENODEV;
+
+ pr_debug("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
+ sizeof (struct ed), sizeof (struct td));
+
+ return driver_register(&ohci_hcd_omap_driver);
+}
+
+static void __exit ohci_hcd_omap_cleanup (void)
+{
+ driver_unregister(&ohci_hcd_omap_driver);
+}
+
+module_init (ohci_hcd_omap_init);
+module_exit (ohci_hcd_omap_cleanup);
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
new file mode 100644
index 000000000000..b611582e6bcf
--- /dev/null
+++ b/drivers/usb/host/ohci-pci.c
@@ -0,0 +1,264 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ *
+ * [ Initialisation is based on Linus' ]
+ * [ uhci code and gregs ohci fragments ]
+ * [ (C) Copyright 1999 Linus Torvalds ]
+ * [ (C) Copyright 1999 Gregory P. Smith]
+ *
+ * PCI Bus Glue
+ *
+ * This file is licenced under the GPL.
+ */
+
+#ifdef CONFIG_PMAC_PBOOK
+#include <asm/machdep.h>
+#include <asm/pmac_feature.h>
+#include <asm/pci-bridge.h>
+#include <asm/prom.h>
+#ifndef CONFIG_PM
+# define CONFIG_PM
+#endif
+#endif
+
+#ifndef CONFIG_PCI
+#error "This file is PCI bus glue. CONFIG_PCI must be defined."
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static int
+ohci_pci_reset (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+
+ ohci_hcd_init (ohci);
+ return ohci_init (ohci);
+}
+
+static int __devinit
+ohci_pci_start (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int ret;
+
+ if(hcd->self.controller && hcd->self.controller->bus == &pci_bus_type) {
+ struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+
+ /* AMD 756, for most chips (early revs), corrupts register
+ * values on read ... so enable the vendor workaround.
+ */
+ if (pdev->vendor == PCI_VENDOR_ID_AMD
+ && pdev->device == 0x740c) {
+ ohci->flags = OHCI_QUIRK_AMD756;
+ ohci_info (ohci, "AMD756 erratum 4 workaround\n");
+ // also somewhat erratum 10 (suspend/resume issues)
+ }
+
+ /* FIXME for some of the early AMD 760 southbridges, OHCI
+ * won't work at all. blacklist them.
+ */
+
+ /* Apple's OHCI driver has a lot of bizarre workarounds
+ * for this chip. Evidently control and bulk lists
+ * can get confused. (B&W G3 models, and ...)
+ */
+ else if (pdev->vendor == PCI_VENDOR_ID_OPTI
+ && pdev->device == 0xc861) {
+ ohci_info (ohci,
+ "WARNING: OPTi workarounds unavailable\n");
+ }
+
+ /* 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.
+ */
+ else if (pdev->vendor == PCI_VENDOR_ID_NS) {
+ struct pci_dev *b;
+
+ b = pci_find_slot (pdev->bus->number,
+ PCI_DEVFN (PCI_SLOT (pdev->devfn), 1));
+ if (b && b->device == PCI_DEVICE_ID_NS_87560_LIO
+ && b->vendor == PCI_VENDOR_ID_NS) {
+ ohci->flags |= OHCI_QUIRK_SUPERIO;
+ ohci_info (ohci, "Using NSC SuperIO setup\n");
+ }
+ }
+ }
+
+ /* NOTE: there may have already been a first reset, to
+ * keep bios/smm irqs from making trouble
+ */
+ if ((ret = ohci_run (ohci)) < 0) {
+ ohci_err (ohci, "can't start\n");
+ ohci_stop (hcd);
+ return ret;
+ }
+ return 0;
+}
+
+#ifdef CONFIG_PM
+
+static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+
+ /* suspend root hub, hoping it keeps power during suspend */
+ if (time_before (jiffies, ohci->next_statechange))
+ msleep (100);
+
+#ifdef CONFIG_USB_SUSPEND
+ (void) usb_suspend_device (hcd->self.root_hub, state);
+#else
+ usb_lock_device (hcd->self.root_hub);
+ (void) ohci_hub_suspend (hcd);
+ usb_unlock_device (hcd->self.root_hub);
+#endif
+
+ /* let things settle down a bit */
+ msleep (100);
+
+#ifdef CONFIG_PMAC_PBOOK
+ if (_machine == _MACH_Pmac) {
+ struct device_node *of_node;
+
+ /* Disable USB PAD & cell clock */
+ of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
+ if (of_node)
+ pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0);
+ }
+#endif /* CONFIG_PMAC_PBOOK */
+ return 0;
+}
+
+
+static int ohci_pci_resume (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int retval = 0;
+
+#ifdef CONFIG_PMAC_PBOOK
+ if (_machine == _MACH_Pmac) {
+ struct device_node *of_node;
+
+ /* Re-enable USB PAD & cell clock */
+ of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
+ if (of_node)
+ pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, 0, 1);
+ }
+#endif /* CONFIG_PMAC_PBOOK */
+
+ /* resume root hub */
+ if (time_before (jiffies, ohci->next_statechange))
+ msleep (100);
+#ifdef CONFIG_USB_SUSPEND
+ /* get extra cleanup even if remote wakeup isn't in use */
+ retval = usb_resume_device (hcd->self.root_hub);
+#else
+ usb_lock_device (hcd->self.root_hub);
+ retval = ohci_hub_resume (hcd);
+ usb_unlock_device (hcd->self.root_hub);
+#endif
+
+ return retval;
+}
+
+#endif /* CONFIG_PM */
+
+
+/*-------------------------------------------------------------------------*/
+
+static const struct hc_driver ohci_pci_hc_driver = {
+ .description = hcd_name,
+ .product_desc = "OHCI Host Controller",
+ .hcd_priv_size = sizeof(struct ohci_hcd),
+
+ /*
+ * generic hardware linkage
+ */
+ .irq = ohci_irq,
+ .flags = HCD_MEMORY | HCD_USB11,
+
+ /*
+ * basic lifecycle operations
+ */
+ .reset = ohci_pci_reset,
+ .start = ohci_pci_start,
+#ifdef CONFIG_PM
+ .suspend = ohci_pci_suspend,
+ .resume = ohci_pci_resume,
+#endif
+ .stop = ohci_stop,
+
+ /*
+ * managing i/o requests and associated device resources
+ */
+ .urb_enqueue = ohci_urb_enqueue,
+ .urb_dequeue = ohci_urb_dequeue,
+ .endpoint_disable = ohci_endpoint_disable,
+
+ /*
+ * scheduling support
+ */
+ .get_frame_number = ohci_get_frame,
+
+ /*
+ * root hub support
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+#ifdef CONFIG_USB_SUSPEND
+ .hub_suspend = ohci_hub_suspend,
+ .hub_resume = ohci_hub_resume,
+#endif
+ .start_port_reset = ohci_start_port_reset,
+};
+
+/*-------------------------------------------------------------------------*/
+
+
+static const struct pci_device_id pci_ids [] = { {
+ /* handle any USB OHCI controller */
+ PCI_DEVICE_CLASS((PCI_CLASS_SERIAL_USB << 8) | 0x10, ~0),
+ .driver_data = (unsigned long) &ohci_pci_hc_driver,
+ }, { /* end: all zeroes */ }
+};
+MODULE_DEVICE_TABLE (pci, pci_ids);
+
+/* pci driver glue; this is a "new style" PCI driver module */
+static struct pci_driver ohci_pci_driver = {
+ .name = (char *) hcd_name,
+ .id_table = pci_ids,
+
+ .probe = usb_hcd_pci_probe,
+ .remove = usb_hcd_pci_remove,
+
+#ifdef CONFIG_PM
+ .suspend = usb_hcd_pci_suspend,
+ .resume = usb_hcd_pci_resume,
+#endif
+};
+
+
+static int __init ohci_hcd_pci_init (void)
+{
+ printk (KERN_DEBUG "%s: " DRIVER_INFO " (PCI)\n", hcd_name);
+ if (usb_disabled())
+ return -ENODEV;
+
+ pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
+ sizeof (struct ed), sizeof (struct td));
+ return pci_register_driver (&ohci_pci_driver);
+}
+module_init (ohci_hcd_pci_init);
+
+/*-------------------------------------------------------------------------*/
+
+static void __exit ohci_hcd_pci_cleanup (void)
+{
+ pci_unregister_driver (&ohci_pci_driver);
+}
+module_exit (ohci_hcd_pci_cleanup);
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c
new file mode 100644
index 000000000000..17964c39d06a
--- /dev/null
+++ b/drivers/usb/host/ohci-ppc-soc.c
@@ -0,0 +1,234 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * (C) Copyright 2002 Hewlett-Packard Company
+ * (C) Copyright 2003-2005 MontaVista Software Inc.
+ *
+ * Bus Glue for PPC On-Chip OHCI driver
+ * Tested on Freescale MPC5200 and IBM STB04xxx
+ *
+ * Modified by Dale Farnsworth <dale@farnsworth.org> from ohci-sa1111.c
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <asm/usb.h>
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+/**
+ * usb_hcd_ppc_soc_probe - initialize On-Chip HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ * Store this function in the HCD's struct pci_driver as probe().
+ */
+static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
+ struct platform_device *pdev)
+{
+ int retval;
+ struct usb_hcd *hcd;
+ struct ohci_hcd *ohci;
+ struct resource *res;
+ int irq;
+ struct usb_hcd_platform_data *pd = pdev->dev.platform_data;
+
+ pr_debug("initializing PPC-SOC USB Controller\n");
+
+ res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+ if (!res) {
+ pr_debug(__FILE__ ": no irq\n");
+ return -ENODEV;
+ }
+ irq = res->start;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ pr_debug(__FILE__ ": no reg addr\n");
+ return -ENODEV;
+ }
+
+ hcd = usb_create_hcd(driver, &pdev->dev, "PPC-SOC USB");
+ if (!hcd)
+ return -ENOMEM;
+ hcd->rsrc_start = res->start;
+ hcd->rsrc_len = res->end - res->start + 1;
+
+ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+ pr_debug(__FILE__ ": request_mem_region failed\n");
+ retval = -EBUSY;
+ goto err1;
+ }
+
+ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
+ if (!hcd->regs) {
+ pr_debug(__FILE__ ": ioremap failed\n");
+ retval = -ENOMEM;
+ goto err2;
+ }
+
+ if (pd->start && (retval = pd->start(pdev)))
+ goto err3;
+
+ ohci = hcd_to_ohci(hcd);
+ ohci->flags |= OHCI_BIG_ENDIAN;
+ ohci_hcd_init(ohci);
+
+ retval = usb_add_hcd(hcd, irq, SA_INTERRUPT);
+ if (retval == 0)
+ return retval;
+
+ pr_debug("Removing PPC-SOC USB Controller\n");
+ if (pd && pd->stop)
+ pd->stop(pdev);
+ err3:
+ iounmap(hcd->regs);
+ err2:
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ err1:
+ usb_put_hcd(hcd);
+ return retval;
+}
+
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_ppc_soc_remove - shutdown processing for On-Chip HCDs
+ * @pdev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_ppc_soc_probe(), first invoking
+ * the HCD's stop() method. It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ */
+static void usb_hcd_ppc_soc_remove(struct usb_hcd *hcd,
+ struct platform_device *pdev)
+{
+ struct usb_hcd_platform_data *pd = pdev->dev.platform_data;
+
+ usb_remove_hcd(hcd);
+
+ pr_debug("stopping PPC-SOC USB Controller\n");
+ if (pd && pd->stop)
+ pd->stop(pdev);
+
+ iounmap(hcd->regs);
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ usb_hcd_put(hcd);
+}
+
+static int __devinit
+ohci_ppc_soc_start(struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+ int ret;
+
+ if ((ret = ohci_init(ohci)) < 0)
+ return ret;
+
+ if ((ret = ohci_run(ohci)) < 0) {
+ err("can't start %s", ohci_to_hcd(ohci)->self.bus_name);
+ ohci_stop(hcd);
+ return ret;
+ }
+
+ return 0;
+}
+
+static const struct hc_driver ohci_ppc_soc_hc_driver = {
+ .description = hcd_name,
+ .hcd_priv_size = sizeof(struct ohci_hcd),
+
+ /*
+ * generic hardware linkage
+ */
+ .irq = ohci_irq,
+ .flags = HCD_USB11 | HCD_MEMORY,
+
+ /*
+ * basic lifecycle operations
+ */
+ .start = ohci_ppc_soc_start,
+ .stop = ohci_stop,
+
+ /*
+ * managing i/o requests and associated device resources
+ */
+ .urb_enqueue = ohci_urb_enqueue,
+ .urb_dequeue = ohci_urb_dequeue,
+ .endpoint_disable = ohci_endpoint_disable,
+
+ /*
+ * scheduling support
+ */
+ .get_frame_number = ohci_get_frame,
+
+ /*
+ * root hub support
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+#ifdef CONFIG_USB_SUSPEND
+ .hub_suspend = ohci_hub_suspend,
+ .hub_resume = ohci_hub_resume,
+#endif
+ .start_port_reset = ohci_start_port_reset,
+};
+
+static int ohci_hcd_ppc_soc_drv_probe(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ int ret;
+
+ if (usb_disabled())
+ return -ENODEV;
+
+ ret = usb_hcd_ppc_soc_probe(&ohci_ppc_soc_hc_driver, pdev);
+ return ret;
+}
+
+static int ohci_hcd_ppc_soc_drv_remove(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+ usb_hcd_ppc_soc_remove(hcd, pdev);
+ return 0;
+}
+
+static struct device_driver ohci_hcd_ppc_soc_driver = {
+ .name = "ppc-soc-ohci",
+ .bus = &platform_bus_type,
+ .probe = ohci_hcd_ppc_soc_drv_probe,
+ .remove = ohci_hcd_ppc_soc_drv_remove,
+#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM)
+ /*.suspend = ohci_hcd_ppc_soc_drv_suspend,*/
+ /*.resume = ohci_hcd_ppc_soc_drv_resume,*/
+#endif
+};
+
+static int __init ohci_hcd_ppc_soc_init(void)
+{
+ pr_debug(DRIVER_INFO " (PPC SOC)\n");
+ pr_debug("block sizes: ed %d td %d\n", sizeof(struct ed),
+ sizeof(struct td));
+
+ return driver_register(&ohci_hcd_ppc_soc_driver);
+}
+
+static void __exit ohci_hcd_ppc_soc_cleanup(void)
+{
+ driver_unregister(&ohci_hcd_ppc_soc_driver);
+}
+
+module_init(ohci_hcd_ppc_soc_init);
+module_exit(ohci_hcd_ppc_soc_cleanup);
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
new file mode 100644
index 000000000000..6f3464a95779
--- /dev/null
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -0,0 +1,383 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * (C) Copyright 2002 Hewlett-Packard Company
+ *
+ * Bus Glue for pxa27x
+ *
+ * Written by Christopher Hoover <ch@hpl.hp.com>
+ * Based on fragments of previous driver by Russell King et al.
+ *
+ * Modified for LH7A404 from ohci-sa1111.c
+ * by Durgesh Pattamatta <pattamattad@sharpsec.com>
+ *
+ * Modified for pxa27x from ohci-lh7a404.c
+ * by Nick Bane <nick@cecomputing.co.uk> 26-8-2004
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <linux/device.h>
+#include <asm/mach-types.h>
+#include <asm/hardware.h>
+#include <asm/arch/pxa-regs.h>
+
+
+#define PMM_NPS_MODE 1
+#define PMM_GLOBAL_MODE 2
+#define PMM_PERPORT_MODE 3
+
+#define PXA_UHC_MAX_PORTNUM 3
+
+#define UHCRHPS(x) __REG2( 0x4C000050, (x)<<2 )
+
+static int pxa27x_ohci_pmm_state;
+
+/*
+ PMM_NPS_MODE -- PMM Non-power switching mode
+ Ports are powered continuously.
+
+ PMM_GLOBAL_MODE -- PMM global switching mode
+ All ports are powered at the same time.
+
+ PMM_PERPORT_MODE -- PMM per port switching mode
+ Ports are powered individually.
+ */
+static int pxa27x_ohci_select_pmm( int mode )
+{
+ pxa27x_ohci_pmm_state = mode;
+
+ switch ( mode ) {
+ case PMM_NPS_MODE:
+ UHCRHDA |= RH_A_NPS;
+ break;
+ case PMM_GLOBAL_MODE:
+ UHCRHDA &= ~(RH_A_NPS & RH_A_PSM);
+ break;
+ case PMM_PERPORT_MODE:
+ UHCRHDA &= ~(RH_A_NPS);
+ UHCRHDA |= RH_A_PSM;
+
+ /* Set port power control mask bits, only 3 ports. */
+ UHCRHDB |= (0x7<<17);
+ break;
+ default:
+ printk( KERN_ERR
+ "Invalid mode %d, set to non-power switch mode.\n",
+ mode );
+
+ pxa27x_ohci_pmm_state = PMM_NPS_MODE;
+ UHCRHDA |= RH_A_NPS;
+ }
+
+ return 0;
+}
+
+/*
+ If you select PMM_PERPORT_MODE, you should set the port power
+ */
+static int pxa27x_ohci_set_port_power( int port )
+{
+ if ( (pxa27x_ohci_pmm_state==PMM_PERPORT_MODE)
+ && (port>0) && (port<PXA_UHC_MAX_PORTNUM) ) {
+ UHCRHPS(port) |= 0x100;
+ return 0;
+ }
+ return -1;
+}
+
+/*
+ If you select PMM_PERPORT_MODE, you should set the port power
+ */
+static int pxa27x_ohci_clear_port_power( int port )
+{
+ if ( (pxa27x_ohci_pmm_state==PMM_PERPORT_MODE)
+ && (port>0) && (port<PXA_UHC_MAX_PORTNUM) ) {
+ UHCRHPS(port) |= 0x200;
+ return 0;
+ }
+
+ return -1;
+}
+
+extern int usb_disabled(void);
+
+/*-------------------------------------------------------------------------*/
+
+static void pxa27x_start_hc(struct platform_device *dev)
+{
+ pxa_set_cken(CKEN10_USBHOST, 1);
+
+ UHCHR |= UHCHR_FHR;
+ udelay(11);
+ UHCHR &= ~UHCHR_FHR;
+
+ UHCHR |= UHCHR_FSBIR;
+ while (UHCHR & UHCHR_FSBIR)
+ cpu_relax();
+
+ /* This could be properly abstracted away through the
+ device data the day more machines are supported and
+ their differences can be figured out correctly. */
+ if (machine_is_mainstone()) {
+ /* setup Port1 GPIO pin. */
+ pxa_gpio_mode( 88 | GPIO_ALT_FN_1_IN); /* USBHPWR1 */
+ pxa_gpio_mode( 89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */
+
+ /* Set the Power Control Polarity Low and Power Sense
+ Polarity Low to active low. Supply power to USB ports. */
+ UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
+ ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
+ }
+
+ UHCHR &= ~UHCHR_SSE;
+
+ UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE);
+}
+
+static void pxa27x_stop_hc(struct platform_device *dev)
+{
+ UHCHR |= UHCHR_FHR;
+ udelay(11);
+ UHCHR &= ~UHCHR_FHR;
+
+ UHCCOMS |= 1;
+ udelay(10);
+
+ pxa_set_cken(CKEN10_USBHOST, 0);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+
+/**
+ * usb_hcd_pxa27x_probe - initialize pxa27x-based HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ */
+int usb_hcd_pxa27x_probe (const struct hc_driver *driver,
+ struct platform_device *dev)
+{
+ int retval;
+ struct usb_hcd *hcd;
+
+ if (dev->resource[1].flags != IORESOURCE_IRQ) {
+ pr_debug ("resource[1] is not IORESOURCE_IRQ");
+ return -ENOMEM;
+ }
+
+ hcd = usb_create_hcd (driver, &dev->dev, "pxa27x");
+ if (!hcd)
+ return -ENOMEM;
+ hcd->rsrc_start = dev->resource[0].start;
+ hcd->rsrc_len = dev->resource[0].end - dev->resource[0].start + 1;
+
+ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+ pr_debug("request_mem_region failed");
+ retval = -EBUSY;
+ goto err1;
+ }
+
+ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
+ if (!hcd->regs) {
+ pr_debug("ioremap failed");
+ retval = -ENOMEM;
+ goto err2;
+ }
+
+ pxa27x_start_hc(dev);
+
+ /* Select Power Management Mode */
+ pxa27x_ohci_select_pmm( PMM_PERPORT_MODE );
+
+ /* If choosing PMM_PERPORT_MODE, we should set the port power before we use it. */
+ if (pxa27x_ohci_set_port_power(1) < 0)
+ printk(KERN_ERR "Setting port 1 power failed.\n");
+
+ if (pxa27x_ohci_clear_port_power(2) < 0)
+ printk(KERN_ERR "Setting port 2 power failed.\n");
+
+ if (pxa27x_ohci_clear_port_power(3) < 0)
+ printk(KERN_ERR "Setting port 3 power failed.\n");
+
+ ohci_hcd_init(hcd_to_ohci(hcd));
+
+ retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT);
+ if (retval == 0)
+ return retval;
+
+ pxa27x_stop_hc(dev);
+ iounmap(hcd->regs);
+ err2:
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ err1:
+ usb_put_hcd(hcd);
+ return retval;
+}
+
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_pxa27x_remove - shutdown processing for pxa27x-based HCDs
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_pxa27x_probe(), first invoking
+ * the HCD's stop() method. It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ */
+void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *dev)
+{
+ usb_remove_hcd(hcd);
+ pxa27x_stop_hc(dev);
+ iounmap(hcd->regs);
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ usb_put_hcd(hcd);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int __devinit
+ohci_pxa27x_start (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int ret;
+
+ ohci_dbg (ohci, "ohci_pxa27x_start, ohci:%p", ohci);
+
+ if ((ret = ohci_init(ohci)) < 0)
+ return ret;
+
+ if ((ret = ohci_run (ohci)) < 0) {
+ err ("can't start %s", hcd->self.bus_name);
+ ohci_stop (hcd);
+ return ret;
+ }
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static const struct hc_driver ohci_pxa27x_hc_driver = {
+ .description = hcd_name,
+ .product_desc = "PXA27x OHCI",
+ .hcd_priv_size = sizeof(struct ohci_hcd),
+
+ /*
+ * generic hardware linkage
+ */
+ .irq = ohci_irq,
+ .flags = HCD_USB11 | HCD_MEMORY,
+
+ /*
+ * basic lifecycle operations
+ */
+ .start = ohci_pxa27x_start,
+ .stop = ohci_stop,
+
+ /*
+ * managing i/o requests and associated device resources
+ */
+ .urb_enqueue = ohci_urb_enqueue,
+ .urb_dequeue = ohci_urb_dequeue,
+ .endpoint_disable = ohci_endpoint_disable,
+
+ /*
+ * scheduling support
+ */
+ .get_frame_number = ohci_get_frame,
+
+ /*
+ * root hub support
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+#ifdef CONFIG_USB_SUSPEND
+ .hub_suspend = ohci_hub_suspend,
+ .hub_resume = ohci_hub_resume,
+#endif
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int ohci_hcd_pxa27x_drv_probe(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ int ret;
+
+ pr_debug ("In ohci_hcd_pxa27x_drv_probe");
+
+ if (usb_disabled())
+ return -ENODEV;
+
+ ret = usb_hcd_pxa27x_probe(&ohci_pxa27x_hc_driver, pdev);
+ return ret;
+}
+
+static int ohci_hcd_pxa27x_drv_remove(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+ usb_hcd_pxa27x_remove(hcd, pdev);
+ return 0;
+}
+
+static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, u32 state, u32 level)
+{
+// struct platform_device *pdev = to_platform_device(dev);
+// struct usb_hcd *hcd = dev_get_drvdata(dev);
+ printk("%s: not implemented yet\n", __FUNCTION__);
+
+ return 0;
+}
+
+static int ohci_hcd_pxa27x_drv_resume(struct device *dev, u32 state)
+{
+// struct platform_device *pdev = to_platform_device(dev);
+// struct usb_hcd *hcd = dev_get_drvdata(dev);
+ printk("%s: not implemented yet\n", __FUNCTION__);
+
+ return 0;
+}
+
+
+static struct device_driver ohci_hcd_pxa27x_driver = {
+ .name = "pxa27x-ohci",
+ .bus = &platform_bus_type,
+ .probe = ohci_hcd_pxa27x_drv_probe,
+ .remove = ohci_hcd_pxa27x_drv_remove,
+ .suspend = ohci_hcd_pxa27x_drv_suspend,
+ .resume = ohci_hcd_pxa27x_drv_resume,
+};
+
+static int __init ohci_hcd_pxa27x_init (void)
+{
+ pr_debug (DRIVER_INFO " (pxa27x)");
+ pr_debug ("block sizes: ed %d td %d\n",
+ sizeof (struct ed), sizeof (struct td));
+
+ return driver_register(&ohci_hcd_pxa27x_driver);
+}
+
+static void __exit ohci_hcd_pxa27x_cleanup (void)
+{
+ driver_unregister(&ohci_hcd_pxa27x_driver);
+}
+
+module_init (ohci_hcd_pxa27x_init);
+module_exit (ohci_hcd_pxa27x_cleanup);
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
new file mode 100644
index 000000000000..c90114a77277
--- /dev/null
+++ b/drivers/usb/host/ohci-q.c
@@ -0,0 +1,1107 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ *
+ * This file is licenced under the GPL.
+ */
+
+static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv)
+{
+ int last = urb_priv->length - 1;
+
+ if (last >= 0) {
+ int i;
+ struct td *td;
+
+ for (i = 0; i <= last; i++) {
+ td = urb_priv->td [i];
+ if (td)
+ td_free (hc, td);
+ }
+ }
+
+ list_del (&urb_priv->pending);
+ kfree (urb_priv);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * URB goes back to driver, and isn't reissued.
+ * It's completely gone from HC data structures.
+ * PRECONDITION: ohci lock held, irqs blocked.
+ */
+static void
+finish_urb (struct ohci_hcd *ohci, struct urb *urb, struct pt_regs *regs)
+__releases(ohci->lock)
+__acquires(ohci->lock)
+{
+ // ASSERT (urb->hcpriv != 0);
+
+ urb_free_priv (ohci, urb->hcpriv);
+ urb->hcpriv = NULL;
+
+ spin_lock (&urb->lock);
+ if (likely (urb->status == -EINPROGRESS))
+ urb->status = 0;
+ /* report short control reads right even though the data TD always
+ * has TD_R set. (much simpler, but creates the 1-td limit.)
+ */
+ if (unlikely (urb->transfer_flags & URB_SHORT_NOT_OK)
+ && unlikely (usb_pipecontrol (urb->pipe))
+ && urb->actual_length < urb->transfer_buffer_length
+ && usb_pipein (urb->pipe)
+ && urb->status == 0) {
+ urb->status = -EREMOTEIO;
+ }
+ spin_unlock (&urb->lock);
+
+ switch (usb_pipetype (urb->pipe)) {
+ case PIPE_ISOCHRONOUS:
+ ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs--;
+ break;
+ case PIPE_INTERRUPT:
+ ohci_to_hcd(ohci)->self.bandwidth_int_reqs--;
+ break;
+ }
+
+#ifdef OHCI_VERBOSE_DEBUG
+ urb_print (urb, "RET", usb_pipeout (urb->pipe));
+#endif
+
+ /* urb->complete() can reenter this HCD */
+ spin_unlock (&ohci->lock);
+ usb_hcd_giveback_urb (ohci_to_hcd(ohci), urb, regs);
+ spin_lock (&ohci->lock);
+
+ /* stop periodic dma if it's not needed */
+ if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0
+ && ohci_to_hcd(ohci)->self.bandwidth_int_reqs == 0) {
+ ohci->hc_control &= ~(OHCI_CTRL_PLE|OHCI_CTRL_IE);
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ }
+}
+
+
+/*-------------------------------------------------------------------------*
+ * ED handling functions
+ *-------------------------------------------------------------------------*/
+
+/* search for the right schedule branch to use for a periodic ed.
+ * does some load balancing; returns the branch, or negative errno.
+ */
+static int balance (struct ohci_hcd *ohci, int interval, int load)
+{
+ int i, branch = -ENOSPC;
+
+ /* iso periods can be huge; iso tds specify frame numbers */
+ if (interval > NUM_INTS)
+ interval = NUM_INTS;
+
+ /* search for the least loaded schedule branch of that period
+ * that has enough bandwidth left unreserved.
+ */
+ for (i = 0; i < interval ; i++) {
+ if (branch < 0 || ohci->load [branch] > ohci->load [i]) {
+#if 1 /* CONFIG_USB_BANDWIDTH */
+ int j;
+
+ /* usb 1.1 says 90% of one frame */
+ for (j = i; j < NUM_INTS; j += interval) {
+ if ((ohci->load [j] + load) > 900)
+ break;
+ }
+ if (j < NUM_INTS)
+ continue;
+#endif
+ branch = i;
+ }
+ }
+ return branch;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* both iso and interrupt requests have periods; this routine puts them
+ * into the schedule tree in the apppropriate place. most iso devices use
+ * 1msec periods, but that's not required.
+ */
+static void periodic_link (struct ohci_hcd *ohci, struct ed *ed)
+{
+ unsigned i;
+
+ ohci_vdbg (ohci, "link %sed %p branch %d [%dus.], interval %d\n",
+ (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "",
+ ed, ed->branch, ed->load, ed->interval);
+
+ for (i = ed->branch; i < NUM_INTS; i += ed->interval) {
+ struct ed **prev = &ohci->periodic [i];
+ __hc32 *prev_p = &ohci->hcca->int_table [i];
+ struct ed *here = *prev;
+
+ /* sorting each branch by period (slow before fast)
+ * lets us share the faster parts of the tree.
+ * (plus maybe: put interrupt eds before iso)
+ */
+ while (here && ed != here) {
+ if (ed->interval > here->interval)
+ break;
+ prev = &here->ed_next;
+ prev_p = &here->hwNextED;
+ here = *prev;
+ }
+ if (ed != here) {
+ ed->ed_next = here;
+ if (here)
+ ed->hwNextED = *prev_p;
+ wmb ();
+ *prev = ed;
+ *prev_p = cpu_to_hc32(ohci, ed->dma);
+ wmb();
+ }
+ ohci->load [i] += ed->load;
+ }
+ ohci_to_hcd(ohci)->self.bandwidth_allocated += ed->load / ed->interval;
+}
+
+/* link an ed into one of the HC chains */
+
+static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed)
+{
+ int branch;
+
+ if (ohci_to_hcd(ohci)->state == HC_STATE_QUIESCING)
+ return -EAGAIN;
+
+ ed->state = ED_OPER;
+ ed->ed_prev = NULL;
+ ed->ed_next = NULL;
+ ed->hwNextED = 0;
+ wmb ();
+
+ /* we care about rm_list when setting CLE/BLE in case the HC was at
+ * work on some TD when CLE/BLE was turned off, and isn't quiesced
+ * yet. finish_unlinks() restarts as needed, some upcoming INTR_SF.
+ *
+ * control and bulk EDs are doubly linked (ed_next, ed_prev), but
+ * periodic ones are singly linked (ed_next). that's because the
+ * periodic schedule encodes a tree like figure 3-5 in the ohci
+ * spec: each qh can have several "previous" nodes, and the tree
+ * doesn't have unused/idle descriptors.
+ */
+ switch (ed->type) {
+ case PIPE_CONTROL:
+ if (ohci->ed_controltail == NULL) {
+ WARN_ON (ohci->hc_control & OHCI_CTRL_CLE);
+ ohci_writel (ohci, ed->dma,
+ &ohci->regs->ed_controlhead);
+ } else {
+ ohci->ed_controltail->ed_next = ed;
+ ohci->ed_controltail->hwNextED = cpu_to_hc32 (ohci,
+ ed->dma);
+ }
+ ed->ed_prev = ohci->ed_controltail;
+ if (!ohci->ed_controltail && !ohci->ed_rm_list) {
+ wmb();
+ ohci->hc_control |= OHCI_CTRL_CLE;
+ ohci_writel (ohci, 0, &ohci->regs->ed_controlcurrent);
+ ohci_writel (ohci, ohci->hc_control,
+ &ohci->regs->control);
+ }
+ ohci->ed_controltail = ed;
+ break;
+
+ case PIPE_BULK:
+ if (ohci->ed_bulktail == NULL) {
+ WARN_ON (ohci->hc_control & OHCI_CTRL_BLE);
+ ohci_writel (ohci, ed->dma, &ohci->regs->ed_bulkhead);
+ } else {
+ ohci->ed_bulktail->ed_next = ed;
+ ohci->ed_bulktail->hwNextED = cpu_to_hc32 (ohci,
+ ed->dma);
+ }
+ ed->ed_prev = ohci->ed_bulktail;
+ if (!ohci->ed_bulktail && !ohci->ed_rm_list) {
+ wmb();
+ ohci->hc_control |= OHCI_CTRL_BLE;
+ ohci_writel (ohci, 0, &ohci->regs->ed_bulkcurrent);
+ ohci_writel (ohci, ohci->hc_control,
+ &ohci->regs->control);
+ }
+ ohci->ed_bulktail = ed;
+ break;
+
+ // case PIPE_INTERRUPT:
+ // case PIPE_ISOCHRONOUS:
+ default:
+ branch = balance (ohci, ed->interval, ed->load);
+ if (branch < 0) {
+ ohci_dbg (ohci,
+ "ERR %d, interval %d msecs, load %d\n",
+ branch, ed->interval, ed->load);
+ // FIXME if there are TDs queued, fail them!
+ return branch;
+ }
+ ed->branch = branch;
+ periodic_link (ohci, ed);
+ }
+
+ /* the HC may not see the schedule updates yet, but if it does
+ * then they'll be properly ordered.
+ */
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* scan the periodic table to find and unlink this ED */
+static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed)
+{
+ int i;
+
+ for (i = ed->branch; i < NUM_INTS; i += ed->interval) {
+ struct ed *temp;
+ struct ed **prev = &ohci->periodic [i];
+ __hc32 *prev_p = &ohci->hcca->int_table [i];
+
+ while (*prev && (temp = *prev) != ed) {
+ prev_p = &temp->hwNextED;
+ prev = &temp->ed_next;
+ }
+ if (*prev) {
+ *prev_p = ed->hwNextED;
+ *prev = ed->ed_next;
+ }
+ ohci->load [i] -= ed->load;
+ }
+ ohci_to_hcd(ohci)->self.bandwidth_allocated -= ed->load / ed->interval;
+
+ ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n",
+ (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "",
+ ed, ed->branch, ed->load, ed->interval);
+}
+
+/* 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
+ * so the HC can eventually finish the processing of the unlinked ed
+ * (assuming it already started that, which needn't be true).
+ *
+ * ED_UNLINK is a transient state: the HC may still see this ED, but soon
+ * it won't. ED_SKIP means the HC will finish its current transaction,
+ * but won't start anything new. The TD queue may still grow; device
+ * drivers don't know about this HCD-internal state.
+ *
+ * When the HC can't see the ED, something changes ED_UNLINK to one of:
+ *
+ * - ED_OPER: when there's any request queued, the ED gets rescheduled
+ * immediately. HC should be working on them.
+ *
+ * - ED_IDLE: when there's no TD queue. there's no reason for the HC
+ * to care about this ED; safe to disable the endpoint.
+ *
+ * When finish_unlinks() runs later, after SOF interrupt, it will often
+ * complete one or more URB unlinks before making that state change.
+ */
+static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed)
+{
+ ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP);
+ wmb ();
+ ed->state = ED_UNLINK;
+
+ /* To deschedule something from the control or bulk list, just
+ * clear CLE/BLE and wait. There's no safe way to scrub out list
+ * head/current registers until later, and "later" isn't very
+ * tightly specified. Figure 6-5 and Section 6.4.2.2 show how
+ * the HC is reading the ED queues (while we modify them).
+ *
+ * For now, ed_schedule() is "later". It might be good paranoia
+ * to scrub those registers in finish_unlinks(), in case of bugs
+ * that make the HC try to use them.
+ */
+ switch (ed->type) {
+ case PIPE_CONTROL:
+ /* remove ED from the HC's list: */
+ if (ed->ed_prev == NULL) {
+ if (!ed->hwNextED) {
+ ohci->hc_control &= ~OHCI_CTRL_CLE;
+ ohci_writel (ohci, ohci->hc_control,
+ &ohci->regs->control);
+ // a ohci_readl() later syncs CLE with the HC
+ } else
+ ohci_writel (ohci,
+ hc32_to_cpup (ohci, &ed->hwNextED),
+ &ohci->regs->ed_controlhead);
+ } else {
+ ed->ed_prev->ed_next = ed->ed_next;
+ ed->ed_prev->hwNextED = ed->hwNextED;
+ }
+ /* remove ED from the HCD's list: */
+ if (ohci->ed_controltail == ed) {
+ ohci->ed_controltail = ed->ed_prev;
+ if (ohci->ed_controltail)
+ ohci->ed_controltail->ed_next = NULL;
+ } else if (ed->ed_next) {
+ ed->ed_next->ed_prev = ed->ed_prev;
+ }
+ break;
+
+ case PIPE_BULK:
+ /* remove ED from the HC's list: */
+ if (ed->ed_prev == NULL) {
+ if (!ed->hwNextED) {
+ ohci->hc_control &= ~OHCI_CTRL_BLE;
+ ohci_writel (ohci, ohci->hc_control,
+ &ohci->regs->control);
+ // a ohci_readl() later syncs BLE with the HC
+ } else
+ ohci_writel (ohci,
+ hc32_to_cpup (ohci, &ed->hwNextED),
+ &ohci->regs->ed_bulkhead);
+ } else {
+ ed->ed_prev->ed_next = ed->ed_next;
+ ed->ed_prev->hwNextED = ed->hwNextED;
+ }
+ /* remove ED from the HCD's list: */
+ if (ohci->ed_bulktail == ed) {
+ ohci->ed_bulktail = ed->ed_prev;
+ if (ohci->ed_bulktail)
+ ohci->ed_bulktail->ed_next = NULL;
+ } else if (ed->ed_next) {
+ ed->ed_next->ed_prev = ed->ed_prev;
+ }
+ break;
+
+ // case PIPE_INTERRUPT:
+ // case PIPE_ISOCHRONOUS:
+ default:
+ periodic_unlink (ohci, ed);
+ break;
+ }
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* get and maybe (re)init an endpoint. init _should_ be done only as part
+ * of enumeration, usb_set_configuration() or usb_set_interface().
+ */
+static struct ed *ed_get (
+ struct ohci_hcd *ohci,
+ struct usb_host_endpoint *ep,
+ struct usb_device *udev,
+ unsigned int pipe,
+ int interval
+) {
+ struct ed *ed;
+ unsigned long flags;
+
+ spin_lock_irqsave (&ohci->lock, flags);
+
+ if (!(ed = ep->hcpriv)) {
+ struct td *td;
+ int is_out;
+ u32 info;
+
+ ed = ed_alloc (ohci, GFP_ATOMIC);
+ if (!ed) {
+ /* out of memory */
+ goto done;
+ }
+
+ /* dummy td; end of td list for ed */
+ td = td_alloc (ohci, GFP_ATOMIC);
+ if (!td) {
+ /* out of memory */
+ ed_free (ohci, ed);
+ ed = NULL;
+ goto done;
+ }
+ ed->dummy = td;
+ ed->hwTailP = cpu_to_hc32 (ohci, td->td_dma);
+ ed->hwHeadP = ed->hwTailP; /* ED_C, ED_H zeroed */
+ ed->state = ED_IDLE;
+
+ is_out = !(ep->desc.bEndpointAddress & USB_DIR_IN);
+
+ /* FIXME usbcore changes dev->devnum before SET_ADDRESS
+ * suceeds ... otherwise we wouldn't need "pipe".
+ */
+ info = usb_pipedevice (pipe);
+ ed->type = usb_pipetype(pipe);
+
+ info |= (ep->desc.bEndpointAddress & ~USB_DIR_IN) << 7;
+ info |= le16_to_cpu(ep->desc.wMaxPacketSize) << 16;
+ if (udev->speed == USB_SPEED_LOW)
+ info |= ED_LOWSPEED;
+ /* only control transfers store pids in tds */
+ if (ed->type != PIPE_CONTROL) {
+ info |= is_out ? ED_OUT : ED_IN;
+ if (ed->type != PIPE_BULK) {
+ /* periodic transfers... */
+ if (ed->type == PIPE_ISOCHRONOUS)
+ info |= ED_ISO;
+ else if (interval > 32) /* iso can be bigger */
+ interval = 32;
+ ed->interval = interval;
+ ed->load = usb_calc_bus_time (
+ udev->speed, !is_out,
+ ed->type == PIPE_ISOCHRONOUS,
+ le16_to_cpu(ep->desc.wMaxPacketSize))
+ / 1000;
+ }
+ }
+ ed->hwINFO = cpu_to_hc32(ohci, info);
+
+ ep->hcpriv = ed;
+ }
+
+done:
+ spin_unlock_irqrestore (&ohci->lock, flags);
+ return ed;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* request unlinking of an endpoint from an operational HC.
+ * put the ep on the rm_list
+ * real work is done at the next start frame (SF) hardware interrupt
+ * caller guarantees HCD is running, so hardware access is safe,
+ * and that ed->state is ED_OPER
+ */
+static void start_ed_unlink (struct ohci_hcd *ohci, struct ed *ed)
+{
+ ed->hwINFO |= cpu_to_hc32 (ohci, ED_DEQUEUE);
+ ed_deschedule (ohci, ed);
+
+ /* rm_list is just singly linked, for simplicity */
+ ed->ed_next = ohci->ed_rm_list;
+ ed->ed_prev = NULL;
+ ohci->ed_rm_list = ed;
+
+ /* enable SOF interrupt */
+ ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrstatus);
+ ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable);
+ // flush those writes, and get latest HCCA contents
+ (void) ohci_readl (ohci, &ohci->regs->control);
+
+ /* SF interrupt might get delayed; record the frame counter value that
+ * indicates when the HC isn't looking at it, so concurrent unlinks
+ * behave. frame_no wraps every 2^16 msec, and changes right before
+ * SF is triggered.
+ */
+ ed->tick = ohci_frame_no(ohci) + 1;
+
+}
+
+/*-------------------------------------------------------------------------*
+ * TD handling functions
+ *-------------------------------------------------------------------------*/
+
+/* enqueue next TD for this URB (OHCI spec 5.2.8.2) */
+
+static void
+td_fill (struct ohci_hcd *ohci, u32 info,
+ dma_addr_t data, int len,
+ struct urb *urb, int index)
+{
+ struct td *td, *td_pt;
+ struct urb_priv *urb_priv = urb->hcpriv;
+ int is_iso = info & TD_ISO;
+ int hash;
+
+ // ASSERT (index < urb_priv->length);
+
+ /* aim for only one interrupt per urb. mostly applies to control
+ * and iso; other urbs rarely need more than one TD per urb.
+ * this way, only final tds (or ones with an error) cause IRQs.
+ * at least immediately; use DI=6 in case any control request is
+ * tempted to die part way through. (and to force the hc to flush
+ * its donelist soonish, even on unlink paths.)
+ *
+ * NOTE: could delay interrupts even for the last TD, and get fewer
+ * interrupts ... increasing per-urb latency by sharing interrupts.
+ * Drivers that queue bulk urbs may request that behavior.
+ */
+ if (index != (urb_priv->length - 1)
+ || (urb->transfer_flags & URB_NO_INTERRUPT))
+ info |= TD_DI_SET (6);
+
+ /* use this td as the next dummy */
+ td_pt = urb_priv->td [index];
+
+ /* fill the old dummy TD */
+ td = urb_priv->td [index] = urb_priv->ed->dummy;
+ urb_priv->ed->dummy = td_pt;
+
+ td->ed = urb_priv->ed;
+ td->next_dl_td = NULL;
+ td->index = index;
+ td->urb = urb;
+ td->data_dma = data;
+ if (!len)
+ data = 0;
+
+ td->hwINFO = cpu_to_hc32 (ohci, info);
+ if (is_iso) {
+ td->hwCBP = cpu_to_hc32 (ohci, data & 0xFFFFF000);
+ *ohci_hwPSWp(ohci, td, 0) = cpu_to_hc16 (ohci,
+ (data & 0x0FFF) | 0xE000);
+ td->ed->last_iso = info & 0xffff;
+ } else {
+ td->hwCBP = cpu_to_hc32 (ohci, data);
+ }
+ if (data)
+ td->hwBE = cpu_to_hc32 (ohci, data + len - 1);
+ else
+ td->hwBE = 0;
+ td->hwNextTD = cpu_to_hc32 (ohci, td_pt->td_dma);
+
+ /* append to queue */
+ list_add_tail (&td->td_list, &td->ed->td_list);
+
+ /* hash it for later reverse mapping */
+ hash = TD_HASH_FUNC (td->td_dma);
+ td->td_hash = ohci->td_hash [hash];
+ ohci->td_hash [hash] = td;
+
+ /* HC might read the TD (or cachelines) right away ... */
+ wmb ();
+ td->ed->hwTailP = td->hwNextTD;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* Prepare all TDs of a transfer, and queue them onto the ED.
+ * Caller guarantees HC is active.
+ * Usually the ED is already on the schedule, so TDs might be
+ * processed as soon as they're queued.
+ */
+static void td_submit_urb (
+ struct ohci_hcd *ohci,
+ struct urb *urb
+) {
+ struct urb_priv *urb_priv = urb->hcpriv;
+ dma_addr_t data;
+ int data_len = urb->transfer_buffer_length;
+ int cnt = 0;
+ u32 info = 0;
+ int is_out = usb_pipeout (urb->pipe);
+ int periodic = 0;
+
+ /* OHCI handles the bulk/interrupt data toggles itself. We just
+ * use the device toggle bits for resetting, and rely on the fact
+ * that resetting toggle is meaningless if the endpoint is active.
+ */
+ if (!usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out)) {
+ usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe),
+ is_out, 1);
+ urb_priv->ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_C);
+ }
+
+ urb_priv->td_cnt = 0;
+ list_add (&urb_priv->pending, &ohci->pending);
+
+ if (data_len)
+ data = urb->transfer_dma;
+ else
+ data = 0;
+
+ /* NOTE: TD_CC is set so we can tell which TDs the HC processed by
+ * using TD_CC_GET, as well as by seeing them on the done list.
+ * (CC = NotAccessed ... 0x0F, or 0x0E in PSWs for ISO.)
+ */
+ switch (urb_priv->ed->type) {
+
+ /* Bulk and interrupt are identical except for where in the schedule
+ * their EDs live.
+ */
+ case PIPE_INTERRUPT:
+ /* ... and periodic urbs have extra accounting */
+ periodic = ohci_to_hcd(ohci)->self.bandwidth_int_reqs++ == 0
+ && ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0;
+ /* FALLTHROUGH */
+ case PIPE_BULK:
+ info = is_out
+ ? TD_T_TOGGLE | TD_CC | TD_DP_OUT
+ : TD_T_TOGGLE | TD_CC | TD_DP_IN;
+ /* TDs _could_ transfer up to 8K each */
+ while (data_len > 4096) {
+ td_fill (ohci, info, data, 4096, urb, cnt);
+ data += 4096;
+ data_len -= 4096;
+ cnt++;
+ }
+ /* maybe avoid ED halt on final TD short read */
+ if (!(urb->transfer_flags & URB_SHORT_NOT_OK))
+ info |= TD_R;
+ td_fill (ohci, info, data, data_len, urb, cnt);
+ cnt++;
+ if ((urb->transfer_flags & URB_ZERO_PACKET)
+ && cnt < urb_priv->length) {
+ td_fill (ohci, info, 0, 0, urb, cnt);
+ cnt++;
+ }
+ /* maybe kickstart bulk list */
+ if (urb_priv->ed->type == PIPE_BULK) {
+ wmb ();
+ ohci_writel (ohci, OHCI_BLF, &ohci->regs->cmdstatus);
+ }
+ break;
+
+ /* control manages DATA0/DATA1 toggle per-request; SETUP resets it,
+ * any DATA phase works normally, and the STATUS ack is special.
+ */
+ case PIPE_CONTROL:
+ info = TD_CC | TD_DP_SETUP | TD_T_DATA0;
+ td_fill (ohci, info, urb->setup_dma, 8, urb, cnt++);
+ if (data_len > 0) {
+ info = TD_CC | TD_R | TD_T_DATA1;
+ info |= is_out ? TD_DP_OUT : TD_DP_IN;
+ /* NOTE: mishandles transfers >8K, some >4K */
+ td_fill (ohci, info, data, data_len, urb, cnt++);
+ }
+ info = (is_out || data_len == 0)
+ ? TD_CC | TD_DP_IN | TD_T_DATA1
+ : TD_CC | TD_DP_OUT | TD_T_DATA1;
+ td_fill (ohci, info, data, 0, urb, cnt++);
+ /* maybe kickstart control list */
+ wmb ();
+ ohci_writel (ohci, OHCI_CLF, &ohci->regs->cmdstatus);
+ break;
+
+ /* ISO has no retransmit, so no toggle; and it uses special TDs.
+ * Each TD could handle multiple consecutive frames (interval 1);
+ * we could often reduce the number of TDs here.
+ */
+ case PIPE_ISOCHRONOUS:
+ for (cnt = 0; cnt < urb->number_of_packets; cnt++) {
+ int frame = urb->start_frame;
+
+ // FIXME scheduling should handle frame counter
+ // roll-around ... exotic case (and OHCI has
+ // a 2^16 iso range, vs other HCs max of 2^10)
+ frame += cnt * urb->interval;
+ frame &= 0xffff;
+ td_fill (ohci, TD_CC | TD_ISO | frame,
+ data + urb->iso_frame_desc [cnt].offset,
+ urb->iso_frame_desc [cnt].length, urb, cnt);
+ }
+ periodic = ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs++ == 0
+ && ohci_to_hcd(ohci)->self.bandwidth_int_reqs == 0;
+ break;
+ }
+
+ /* start periodic dma if needed */
+ if (periodic) {
+ wmb ();
+ ohci->hc_control |= OHCI_CTRL_PLE|OHCI_CTRL_IE;
+ ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
+ }
+
+ // ASSERT (urb_priv->length == cnt);
+}
+
+/*-------------------------------------------------------------------------*
+ * Done List handling functions
+ *-------------------------------------------------------------------------*/
+
+/* calculate transfer length/status and update the urb
+ * PRECONDITION: irqsafe (only for urb->status locking)
+ */
+static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
+{
+ u32 tdINFO = hc32_to_cpup (ohci, &td->hwINFO);
+ int cc = 0;
+
+ list_del (&td->td_list);
+
+ /* ISO ... drivers see per-TD length/status */
+ if (tdINFO & TD_ISO) {
+ u16 tdPSW = ohci_hwPSW (ohci, td, 0);
+ int dlen = 0;
+
+ /* NOTE: assumes FC in tdINFO == 0, and that
+ * only the first of 0..MAXPSW psws is used.
+ */
+
+ cc = (tdPSW >> 12) & 0xF;
+ if (tdINFO & TD_CC) /* hc didn't touch? */
+ return;
+
+ if (usb_pipeout (urb->pipe))
+ dlen = urb->iso_frame_desc [td->index].length;
+ else {
+ /* short reads are always OK for ISO */
+ if (cc == TD_DATAUNDERRUN)
+ cc = TD_CC_NOERROR;
+ dlen = tdPSW & 0x3ff;
+ }
+ urb->actual_length += dlen;
+ urb->iso_frame_desc [td->index].actual_length = dlen;
+ urb->iso_frame_desc [td->index].status = cc_to_error [cc];
+
+ if (cc != TD_CC_NOERROR)
+ ohci_vdbg (ohci,
+ "urb %p iso td %p (%d) len %d cc %d\n",
+ urb, td, 1 + td->index, dlen, cc);
+
+ /* BULK, INT, CONTROL ... drivers see aggregate length/status,
+ * except that "setup" bytes aren't counted and "short" transfers
+ * might not be reported as errors.
+ */
+ } else {
+ int type = usb_pipetype (urb->pipe);
+ u32 tdBE = hc32_to_cpup (ohci, &td->hwBE);
+
+ cc = TD_CC_GET (tdINFO);
+
+ /* update packet status if needed (short is normally ok) */
+ if (cc == TD_DATAUNDERRUN
+ && !(urb->transfer_flags & URB_SHORT_NOT_OK))
+ cc = TD_CC_NOERROR;
+ if (cc != TD_CC_NOERROR && cc < 0x0E) {
+ spin_lock (&urb->lock);
+ if (urb->status == -EINPROGRESS)
+ urb->status = cc_to_error [cc];
+ spin_unlock (&urb->lock);
+ }
+
+ /* count all non-empty packets except control SETUP packet */
+ if ((type != PIPE_CONTROL || td->index != 0) && tdBE != 0) {
+ if (td->hwCBP == 0)
+ urb->actual_length += tdBE - td->data_dma + 1;
+ else
+ urb->actual_length +=
+ hc32_to_cpup (ohci, &td->hwCBP)
+ - td->data_dma;
+ }
+
+ if (cc != TD_CC_NOERROR && cc < 0x0E)
+ ohci_vdbg (ohci,
+ "urb %p td %p (%d) cc %d, len=%d/%d\n",
+ urb, td, 1 + td->index, cc,
+ urb->actual_length,
+ urb->transfer_buffer_length);
+ }
+}
+
+/*-------------------------------------------------------------------------*/
+
+static inline struct td *
+ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
+{
+ struct urb *urb = td->urb;
+ struct ed *ed = td->ed;
+ struct list_head *tmp = td->td_list.next;
+ __hc32 toggle = ed->hwHeadP & cpu_to_hc32 (ohci, ED_C);
+
+ /* clear ed halt; this is the td that caused it, but keep it inactive
+ * until its urb->complete() has a chance to clean up.
+ */
+ ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP);
+ wmb ();
+ ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_H);
+
+ /* put any later tds from this urb onto the donelist, after 'td',
+ * order won't matter here: no errors, and nothing was transferred.
+ * also patch the ed so it looks as if those tds completed normally.
+ */
+ while (tmp != &ed->td_list) {
+ struct td *next;
+ __hc32 info;
+
+ next = list_entry (tmp, struct td, td_list);
+ tmp = next->td_list.next;
+
+ if (next->urb != urb)
+ break;
+
+ /* NOTE: if multi-td control DATA segments get supported,
+ * this urb had one of them, this td wasn't the last td
+ * in that segment (TD_R clear), this ed halted because
+ * of a short read, _and_ URB_SHORT_NOT_OK is clear ...
+ * then we need to leave the control STATUS packet queued
+ * and clear ED_SKIP.
+ */
+ info = next->hwINFO;
+ info |= cpu_to_hc32 (ohci, TD_DONE);
+ info &= ~cpu_to_hc32 (ohci, TD_CC);
+ next->hwINFO = info;
+
+ next->next_dl_td = rev;
+ rev = next;
+
+ ed->hwHeadP = next->hwNextTD | toggle;
+ }
+
+ /* help for troubleshooting: report anything that
+ * looks odd ... that doesn't include protocol stalls
+ * (or maybe some other things)
+ */
+ switch (cc) {
+ case TD_DATAUNDERRUN:
+ if ((urb->transfer_flags & URB_SHORT_NOT_OK) == 0)
+ break;
+ /* fallthrough */
+ case TD_CC_STALL:
+ if (usb_pipecontrol (urb->pipe))
+ break;
+ /* fallthrough */
+ default:
+ ohci_dbg (ohci,
+ "urb %p path %s ep%d%s %08x cc %d --> status %d\n",
+ urb, urb->dev->devpath,
+ usb_pipeendpoint (urb->pipe),
+ usb_pipein (urb->pipe) ? "in" : "out",
+ hc32_to_cpu (ohci, td->hwINFO),
+ cc, cc_to_error [cc]);
+ }
+
+ return rev;
+}
+
+/* replies to the request have to be on a FIFO basis so
+ * we unreverse the hc-reversed done-list
+ */
+static struct td *dl_reverse_done_list (struct ohci_hcd *ohci)
+{
+ u32 td_dma;
+ struct td *td_rev = NULL;
+ struct td *td = NULL;
+
+ td_dma = hc32_to_cpup (ohci, &ohci->hcca->done_head);
+ ohci->hcca->done_head = 0;
+ wmb();
+
+ /* get TD from hc's singly linked list, and
+ * prepend to ours. ed->td_list changes later.
+ */
+ while (td_dma) {
+ int cc;
+
+ td = dma_to_td (ohci, td_dma);
+ if (!td) {
+ ohci_err (ohci, "bad entry %8x\n", td_dma);
+ break;
+ }
+
+ td->hwINFO |= cpu_to_hc32 (ohci, TD_DONE);
+ cc = TD_CC_GET (hc32_to_cpup (ohci, &td->hwINFO));
+
+ /* Non-iso endpoints can halt on error; un-halt,
+ * and dequeue any other TDs from this urb.
+ * No other TD could have caused the halt.
+ */
+ if (cc != TD_CC_NOERROR
+ && (td->ed->hwHeadP & cpu_to_hc32 (ohci, ED_H)))
+ td_rev = ed_halted (ohci, td, cc, td_rev);
+
+ td->next_dl_td = td_rev;
+ td_rev = td;
+ td_dma = hc32_to_cpup (ohci, &td->hwNextTD);
+ }
+ return td_rev;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* there are some urbs/eds to unlink; called in_irq(), with HCD locked */
+static void
+finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs)
+{
+ struct ed *ed, **last;
+
+rescan_all:
+ for (last = &ohci->ed_rm_list, ed = *last; ed != NULL; ed = *last) {
+ struct list_head *entry, *tmp;
+ int completed, modified;
+ __hc32 *prev;
+
+ /* only take off EDs that the HC isn't using, accounting for
+ * frame counter wraps and EDs with partially retired TDs
+ */
+ if (likely (regs && HC_IS_RUNNING(ohci_to_hcd(ohci)->state))) {
+ if (tick_before (tick, ed->tick)) {
+skip_ed:
+ last = &ed->ed_next;
+ continue;
+ }
+
+ if (!list_empty (&ed->td_list)) {
+ struct td *td;
+ u32 head;
+
+ td = list_entry (ed->td_list.next, struct td,
+ td_list);
+ head = hc32_to_cpu (ohci, ed->hwHeadP) &
+ TD_MASK;
+
+ /* INTR_WDH may need to clean up first */
+ if (td->td_dma != head)
+ goto skip_ed;
+ }
+ }
+
+ /* reentrancy: if we drop the schedule lock, someone might
+ * have modified this list. normally it's just prepending
+ * entries (which we'd ignore), but paranoia won't hurt.
+ */
+ *last = ed->ed_next;
+ ed->ed_next = NULL;
+ modified = 0;
+
+ /* unlink urbs as requested, but rescan the list after
+ * we call a completion since it might have unlinked
+ * another (earlier) urb
+ *
+ * When we get here, the HC doesn't see this ed. But it
+ * must not be rescheduled until all completed URBs have
+ * been given back to the driver.
+ */
+rescan_this:
+ completed = 0;
+ prev = &ed->hwHeadP;
+ list_for_each_safe (entry, tmp, &ed->td_list) {
+ struct td *td;
+ struct urb *urb;
+ urb_priv_t *urb_priv;
+ __hc32 savebits;
+
+ td = list_entry (entry, struct td, td_list);
+ urb = td->urb;
+ urb_priv = td->urb->hcpriv;
+
+ if (urb->status == -EINPROGRESS) {
+ prev = &td->hwNextTD;
+ continue;
+ }
+
+ /* patch pointer hc uses */
+ savebits = *prev & ~cpu_to_hc32 (ohci, TD_MASK);
+ *prev = td->hwNextTD | savebits;
+
+ /* HC may have partly processed this TD */
+ td_done (ohci, urb, td);
+ urb_priv->td_cnt++;
+
+ /* if URB is done, clean up */
+ if (urb_priv->td_cnt == urb_priv->length) {
+ modified = completed = 1;
+ finish_urb (ohci, urb, regs);
+ }
+ }
+ if (completed && !list_empty (&ed->td_list))
+ goto rescan_this;
+
+ /* ED's now officially unlinked, hc doesn't see */
+ ed->state = ED_IDLE;
+ ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_H);
+ ed->hwNextED = 0;
+ wmb ();
+ ed->hwINFO &= ~cpu_to_hc32 (ohci, ED_SKIP | ED_DEQUEUE);
+
+ /* but if there's work queued, reschedule */
+ if (!list_empty (&ed->td_list)) {
+ if (HC_IS_RUNNING(ohci_to_hcd(ohci)->state))
+ ed_schedule (ohci, ed);
+ }
+
+ if (modified)
+ goto rescan_all;
+ }
+
+ /* maybe reenable control and bulk lists */
+ if (HC_IS_RUNNING(ohci_to_hcd(ohci)->state)
+ && ohci_to_hcd(ohci)->state != HC_STATE_QUIESCING
+ && !ohci->ed_rm_list) {
+ u32 command = 0, control = 0;
+
+ if (ohci->ed_controltail) {
+ command |= OHCI_CLF;
+ if (!(ohci->hc_control & OHCI_CTRL_CLE)) {
+ control |= OHCI_CTRL_CLE;
+ ohci_writel (ohci, 0,
+ &ohci->regs->ed_controlcurrent);
+ }
+ }
+ if (ohci->ed_bulktail) {
+ command |= OHCI_BLF;
+ if (!(ohci->hc_control & OHCI_CTRL_BLE)) {
+ control |= OHCI_CTRL_BLE;
+ ohci_writel (ohci, 0,
+ &ohci->regs->ed_bulkcurrent);
+ }
+ }
+
+ /* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */
+ if (control) {
+ ohci->hc_control |= control;
+ ohci_writel (ohci, ohci->hc_control,
+ &ohci->regs->control);
+ }
+ if (command)
+ ohci_writel (ohci, command, &ohci->regs->cmdstatus);
+ }
+}
+
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Process normal completions (error or success) and clean the schedules.
+ *
+ * This is the main path for handing urbs back to drivers. The only other
+ * path is finish_unlinks(), which unlinks URBs using ed_rm_list, instead of
+ * scanning the (re-reversed) donelist as this does.
+ */
+static void
+dl_done_list (struct ohci_hcd *ohci, struct pt_regs *regs)
+{
+ struct td *td = dl_reverse_done_list (ohci);
+
+ while (td) {
+ struct td *td_next = td->next_dl_td;
+ struct urb *urb = td->urb;
+ urb_priv_t *urb_priv = urb->hcpriv;
+ struct ed *ed = td->ed;
+
+ /* update URB's length and status from TD */
+ td_done (ohci, urb, td);
+ urb_priv->td_cnt++;
+
+ /* If all this urb's TDs are done, call complete() */
+ if (urb_priv->td_cnt == urb_priv->length)
+ finish_urb (ohci, urb, regs);
+
+ /* clean schedule: unlink EDs that are no longer busy */
+ if (list_empty (&ed->td_list)) {
+ if (ed->state == ED_OPER)
+ start_ed_unlink (ohci, ed);
+
+ /* ... reenabling halted EDs only after fault cleanup */
+ } else if ((ed->hwINFO & cpu_to_hc32 (ohci, ED_SKIP | ED_DEQUEUE))
+ == cpu_to_hc32 (ohci, ED_SKIP)) {
+ td = list_entry (ed->td_list.next, struct td, td_list);
+ if (!(td->hwINFO & cpu_to_hc32 (ohci, TD_DONE))) {
+ ed->hwINFO &= ~cpu_to_hc32 (ohci, ED_SKIP);
+ /* ... hc may need waking-up */
+ switch (ed->type) {
+ case PIPE_CONTROL:
+ ohci_writel (ohci, OHCI_CLF,
+ &ohci->regs->cmdstatus);
+ break;
+ case PIPE_BULK:
+ ohci_writel (ohci, OHCI_BLF,
+ &ohci->regs->cmdstatus);
+ break;
+ }
+ }
+ }
+
+ td = td_next;
+ }
+}
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
new file mode 100644
index 000000000000..814d2be4ee7b
--- /dev/null
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -0,0 +1,289 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * (C) Copyright 2002 Hewlett-Packard Company
+ *
+ * SA1111 Bus Glue
+ *
+ * Written by Christopher Hoover <ch@hpl.hp.com>
+ * Based on fragments of previous driver by Rusell King et al.
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/arch/assabet.h>
+#include <asm/arch/badge4.h>
+#include <asm/hardware/sa1111.h>
+
+#ifndef CONFIG_SA1111
+#error "This file is SA-1111 bus glue. CONFIG_SA1111 must be defined."
+#endif
+
+extern int usb_disabled(void);
+
+/*-------------------------------------------------------------------------*/
+
+static void sa1111_start_hc(struct sa1111_dev *dev)
+{
+ unsigned int usb_rst = 0;
+
+ printk(KERN_DEBUG __FILE__
+ ": starting SA-1111 OHCI USB Controller\n");
+
+#ifdef CONFIG_SA1100_BADGE4
+ if (machine_is_badge4()) {
+ badge4_set_5V(BADGE4_5V_USB, 1);
+ }
+#endif
+
+ if (machine_is_xp860() ||
+ machine_has_neponset() ||
+ machine_is_pfs168() ||
+ machine_is_badge4())
+ usb_rst = USB_RESET_PWRSENSELOW | USB_RESET_PWRCTRLLOW;
+
+ /*
+ * Configure the power sense and control lines. Place the USB
+ * host controller in reset.
+ */
+ sa1111_writel(usb_rst | USB_RESET_FORCEIFRESET | USB_RESET_FORCEHCRESET,
+ dev->mapbase + SA1111_USB_RESET);
+
+ /*
+ * Now, carefully enable the USB clock, and take
+ * the USB host controller out of reset.
+ */
+ sa1111_enable_device(dev);
+ udelay(11);
+ sa1111_writel(usb_rst, dev->mapbase + SA1111_USB_RESET);
+}
+
+static void sa1111_stop_hc(struct sa1111_dev *dev)
+{
+ unsigned int usb_rst;
+ printk(KERN_DEBUG __FILE__
+ ": stopping SA-1111 OHCI USB Controller\n");
+
+ /*
+ * Put the USB host controller into reset.
+ */
+ usb_rst = sa1111_readl(dev->mapbase + SA1111_USB_RESET);
+ sa1111_writel(usb_rst | USB_RESET_FORCEIFRESET | USB_RESET_FORCEHCRESET,
+ dev->mapbase + SA1111_USB_RESET);
+
+ /*
+ * Stop the USB clock.
+ */
+ sa1111_disable_device(dev);
+
+#ifdef CONFIG_SA1100_BADGE4
+ if (machine_is_badge4()) {
+ /* Disable power to the USB bus */
+ badge4_set_5V(BADGE4_5V_USB, 0);
+ }
+#endif
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+#if 0
+static void dump_hci_status(struct usb_hcd *hcd, const char *label)
+{
+ unsigned long status = sa1111_readl(hcd->regs + SA1111_USB_STATUS);
+
+ dbg ("%s USB_STATUS = { %s%s%s%s%s}", label,
+ ((status & USB_STATUS_IRQHCIRMTWKUP) ? "IRQHCIRMTWKUP " : ""),
+ ((status & USB_STATUS_IRQHCIBUFFACC) ? "IRQHCIBUFFACC " : ""),
+ ((status & USB_STATUS_NIRQHCIM) ? "" : "IRQHCIM "),
+ ((status & USB_STATUS_NHCIMFCLR) ? "" : "HCIMFCLR "),
+ ((status & USB_STATUS_USBPWRSENSE) ? "USBPWRSENSE " : ""));
+}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+
+/**
+ * usb_hcd_sa1111_probe - initialize SA-1111-based HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ * Store this function in the HCD's struct pci_driver as probe().
+ */
+int usb_hcd_sa1111_probe (const struct hc_driver *driver,
+ struct sa1111_dev *dev)
+{
+ struct usb_hcd *hcd;
+ int retval;
+
+ hcd = usb_create_hcd (driver, &dev->dev, "sa1111");
+ if (!hcd)
+ return -ENOMEM;
+ hcd->rsrc_start = dev->res.start;
+ hcd->rsrc_len = dev->res.end - dev->res.start + 1;
+
+ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+ dbg("request_mem_region failed");
+ retval = -EBUSY;
+ goto err1;
+ }
+ hcd->regs = dev->mapbase;
+
+ sa1111_start_hc(dev);
+ ohci_hcd_init(hcd_to_ohci(hcd));
+
+ retval = usb_add_hcd(hcd, dev->irq[1], SA_INTERRUPT);
+ if (retval == 0)
+ return retval;
+
+ sa1111_stop_hc(dev);
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ err1:
+ usb_put_hcd(hcd);
+ return retval;
+}
+
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_sa1111_remove - shutdown processing for SA-1111-based HCDs
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_sa1111_probe(), first invoking
+ * the HCD's stop() method. It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ */
+void usb_hcd_sa1111_remove (struct usb_hcd *hcd, struct sa1111_dev *dev)
+{
+ usb_remove_hcd(hcd);
+ sa1111_stop_hc(dev);
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ usb_put_hcd(hcd);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int __devinit
+ohci_sa1111_start (struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ int ret;
+
+ if ((ret = ohci_init(ohci)) < 0)
+ return ret;
+
+ if ((ret = ohci_run (ohci)) < 0) {
+ err ("can't start %s", hcd->self.bus_name);
+ ohci_stop (hcd);
+ return ret;
+ }
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static const struct hc_driver ohci_sa1111_hc_driver = {
+ .description = hcd_name,
+ .product_desc = "SA-1111 OHCI",
+ .hcd_priv_size = sizeof(struct ohci_hcd),
+
+ /*
+ * generic hardware linkage
+ */
+ .irq = ohci_irq,
+ .flags = HCD_USB11 | HCD_MEMORY,
+
+ /*
+ * basic lifecycle operations
+ */
+ .start = ohci_sa1111_start,
+#ifdef CONFIG_PM
+ /* suspend: ohci_sa1111_suspend, -- tbd */
+ /* resume: ohci_sa1111_resume, -- tbd */
+#endif
+ .stop = ohci_stop,
+
+ /*
+ * managing i/o requests and associated device resources
+ */
+ .urb_enqueue = ohci_urb_enqueue,
+ .urb_dequeue = ohci_urb_dequeue,
+ .endpoint_disable = ohci_endpoint_disable,
+
+ /*
+ * scheduling support
+ */
+ .get_frame_number = ohci_get_frame,
+
+ /*
+ * root hub support
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+#ifdef CONFIG_USB_SUSPEND
+ .hub_suspend = ohci_hub_suspend,
+ .hub_resume = ohci_hub_resume,
+#endif
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int ohci_hcd_sa1111_drv_probe(struct sa1111_dev *dev)
+{
+ int ret;
+
+ if (usb_disabled())
+ return -ENODEV;
+
+ ret = usb_hcd_sa1111_probe(&ohci_sa1111_hc_driver, dev);
+ return ret;
+}
+
+static int ohci_hcd_sa1111_drv_remove(struct sa1111_dev *dev)
+{
+ struct usb_hcd *hcd = sa1111_get_drvdata(dev);
+
+ usb_hcd_sa1111_remove(hcd, dev);
+ return 0;
+}
+
+static struct sa1111_driver ohci_hcd_sa1111_driver = {
+ .drv = {
+ .name = "sa1111-ohci",
+ },
+ .devid = SA1111_DEVID_USB,
+ .probe = ohci_hcd_sa1111_drv_probe,
+ .remove = ohci_hcd_sa1111_drv_remove,
+};
+
+static int __init ohci_hcd_sa1111_init (void)
+{
+ dbg (DRIVER_INFO " (SA-1111)");
+ dbg ("block sizes: ed %d td %d",
+ sizeof (struct ed), sizeof (struct td));
+
+ return sa1111_driver_register(&ohci_hcd_sa1111_driver);
+}
+
+static void __exit ohci_hcd_sa1111_cleanup (void)
+{
+ sa1111_driver_unregister(&ohci_hcd_sa1111_driver);
+}
+
+module_init (ohci_hcd_sa1111_init);
+module_exit (ohci_hcd_sa1111_cleanup);
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
new file mode 100644
index 000000000000..2ba6e2b0210c
--- /dev/null
+++ b/drivers/usb/host/ohci.h
@@ -0,0 +1,636 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ *
+ * This file is licenced under the GPL.
+ */
+
+/*
+ * __hc32 and __hc16 are "Host Controller" types, they may be equivalent to
+ * __leXX (normally) or __beXX (given OHCI_BIG_ENDIAN), depending on the
+ * host controller implementation.
+ */
+typedef __u32 __bitwise __hc32;
+typedef __u16 __bitwise __hc16;
+
+/*
+ * OHCI Endpoint Descriptor (ED) ... holds TD queue
+ * See OHCI spec, section 4.2
+ *
+ * This is a "Queue Head" for those transfers, which is why
+ * both EHCI and UHCI call similar structures a "QH".
+ */
+struct ed {
+ /* first fields are hardware-specified */
+ __hc32 hwINFO; /* endpoint config bitmap */
+ /* info bits defined by hcd */
+#define ED_DEQUEUE (1 << 27)
+ /* info bits defined by the hardware */
+#define ED_ISO (1 << 15)
+#define ED_SKIP (1 << 14)
+#define ED_LOWSPEED (1 << 13)
+#define ED_OUT (0x01 << 11)
+#define ED_IN (0x02 << 11)
+ __hc32 hwTailP; /* tail of TD list */
+ __hc32 hwHeadP; /* head of TD list (hc r/w) */
+#define ED_C (0x02) /* toggle carry */
+#define ED_H (0x01) /* halted */
+ __hc32 hwNextED; /* next ED in list */
+
+ /* rest are purely for the driver's use */
+ dma_addr_t dma; /* addr of ED */
+ struct td *dummy; /* next TD to activate */
+
+ /* host's view of schedule */
+ struct ed *ed_next; /* on schedule or rm_list */
+ struct ed *ed_prev; /* for non-interrupt EDs */
+ struct list_head td_list; /* "shadow list" of our TDs */
+
+ /* create --> IDLE --> OPER --> ... --> IDLE --> destroy
+ * usually: OPER --> UNLINK --> (IDLE | OPER) --> ...
+ */
+ u8 state; /* ED_{IDLE,UNLINK,OPER} */
+#define ED_IDLE 0x00 /* NOT linked to HC */
+#define ED_UNLINK 0x01 /* being unlinked from hc */
+#define ED_OPER 0x02 /* IS linked to hc */
+
+ u8 type; /* PIPE_{BULK,...} */
+
+ /* periodic scheduling params (for intr and iso) */
+ u8 branch;
+ u16 interval;
+ u16 load;
+ u16 last_iso; /* iso only */
+
+ /* HC may see EDs on rm_list until next frame (frame_no == tick) */
+ u16 tick;
+} __attribute__ ((aligned(16)));
+
+#define ED_MASK ((u32)~0x0f) /* strip hw status in low addr bits */
+
+
+/*
+ * OHCI Transfer Descriptor (TD) ... one per transfer segment
+ * See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt)
+ * and 4.3.2 (iso)
+ */
+struct td {
+ /* first fields are hardware-specified */
+ __hc32 hwINFO; /* transfer info bitmask */
+
+ /* hwINFO bits for both general and iso tds: */
+#define TD_CC 0xf0000000 /* condition code */
+#define TD_CC_GET(td_p) ((td_p >>28) & 0x0f)
+//#define TD_CC_SET(td_p, cc) (td_p) = ((td_p) & 0x0fffffff) | (((cc) & 0x0f) << 28)
+#define TD_DI 0x00E00000 /* frames before interrupt */
+#define TD_DI_SET(X) (((X) & 0x07)<< 21)
+ /* these two bits are available for definition/use by HCDs in both
+ * general and iso tds ... others are available for only one type
+ */
+#define TD_DONE 0x00020000 /* retired to donelist */
+#define TD_ISO 0x00010000 /* copy of ED_ISO */
+
+ /* hwINFO bits for general tds: */
+#define TD_EC 0x0C000000 /* error count */
+#define TD_T 0x03000000 /* data toggle state */
+#define TD_T_DATA0 0x02000000 /* DATA0 */
+#define TD_T_DATA1 0x03000000 /* DATA1 */
+#define TD_T_TOGGLE 0x00000000 /* uses ED_C */
+#define TD_DP 0x00180000 /* direction/pid */
+#define TD_DP_SETUP 0x00000000 /* SETUP pid */
+#define TD_DP_IN 0x00100000 /* IN pid */
+#define TD_DP_OUT 0x00080000 /* OUT pid */
+ /* 0x00180000 rsvd */
+#define TD_R 0x00040000 /* round: short packets OK? */
+
+ /* (no hwINFO #defines yet for iso tds) */
+
+ __hc32 hwCBP; /* Current Buffer Pointer (or 0) */
+ __hc32 hwNextTD; /* Next TD Pointer */
+ __hc32 hwBE; /* Memory Buffer End Pointer */
+
+ /* PSW is only for ISO. Only 1 PSW entry is used, but on
+ * big-endian PPC hardware that's the second entry.
+ */
+#define MAXPSW 2
+ __hc16 hwPSW [MAXPSW];
+
+ /* rest are purely for the driver's use */
+ __u8 index;
+ struct ed *ed;
+ struct td *td_hash; /* dma-->td hashtable */
+ struct td *next_dl_td;
+ struct urb *urb;
+
+ dma_addr_t td_dma; /* addr of this TD */
+ dma_addr_t data_dma; /* addr of data it points to */
+
+ struct list_head td_list; /* "shadow list", TDs on same ED */
+} __attribute__ ((aligned(32))); /* c/b/i need 16; only iso needs 32 */
+
+#define TD_MASK ((u32)~0x1f) /* strip hw status in low addr bits */
+
+/*
+ * Hardware transfer status codes -- CC from td->hwINFO or td->hwPSW
+ */
+#define TD_CC_NOERROR 0x00
+#define TD_CC_CRC 0x01
+#define TD_CC_BITSTUFFING 0x02
+#define TD_CC_DATATOGGLEM 0x03
+#define TD_CC_STALL 0x04
+#define TD_DEVNOTRESP 0x05
+#define TD_PIDCHECKFAIL 0x06
+#define TD_UNEXPECTEDPID 0x07
+#define TD_DATAOVERRUN 0x08
+#define TD_DATAUNDERRUN 0x09
+ /* 0x0A, 0x0B reserved for hardware */
+#define TD_BUFFEROVERRUN 0x0C
+#define TD_BUFFERUNDERRUN 0x0D
+ /* 0x0E, 0x0F reserved for HCD */
+#define TD_NOTACCESSED 0x0F
+
+
+/* map OHCI TD status codes (CC) to errno values */
+static const int cc_to_error [16] = {
+ /* No Error */ 0,
+ /* CRC Error */ -EILSEQ,
+ /* Bit Stuff */ -EPROTO,
+ /* Data Togg */ -EILSEQ,
+ /* Stall */ -EPIPE,
+ /* DevNotResp */ -ETIMEDOUT,
+ /* PIDCheck */ -EPROTO,
+ /* UnExpPID */ -EPROTO,
+ /* DataOver */ -EOVERFLOW,
+ /* DataUnder */ -EREMOTEIO,
+ /* (for hw) */ -EIO,
+ /* (for hw) */ -EIO,
+ /* BufferOver */ -ECOMM,
+ /* BuffUnder */ -ENOSR,
+ /* (for HCD) */ -EALREADY,
+ /* (for HCD) */ -EALREADY
+};
+
+
+/*
+ * The HCCA (Host Controller Communications Area) is a 256 byte
+ * structure defined section 4.4.1 of the OHCI spec. The HC is
+ * told the base address of it. It must be 256-byte aligned.
+ */
+struct ohci_hcca {
+#define NUM_INTS 32
+ __hc32 int_table [NUM_INTS]; /* periodic schedule */
+
+ /*
+ * OHCI defines u16 frame_no, followed by u16 zero pad.
+ * Since some processors can't do 16 bit bus accesses,
+ * portable access must be a 32 bits wide.
+ */
+ __hc32 frame_no; /* current frame number */
+ __hc32 done_head; /* info returned for an interrupt */
+ u8 reserved_for_hc [116];
+ u8 what [4]; /* spec only identifies 252 bytes :) */
+} __attribute__ ((aligned(256)));
+
+/*
+ * This is the structure of the OHCI controller's memory mapped I/O region.
+ * You must use readl() and writel() (in <asm/io.h>) to access these fields!!
+ * Layout is in section 7 (and appendix B) of the spec.
+ */
+struct ohci_regs {
+ /* control and status registers (section 7.1) */
+ __hc32 revision;
+ __hc32 control;
+ __hc32 cmdstatus;
+ __hc32 intrstatus;
+ __hc32 intrenable;
+ __hc32 intrdisable;
+
+ /* memory pointers (section 7.2) */
+ __hc32 hcca;
+ __hc32 ed_periodcurrent;
+ __hc32 ed_controlhead;
+ __hc32 ed_controlcurrent;
+ __hc32 ed_bulkhead;
+ __hc32 ed_bulkcurrent;
+ __hc32 donehead;
+
+ /* frame counters (section 7.3) */
+ __hc32 fminterval;
+ __hc32 fmremaining;
+ __hc32 fmnumber;
+ __hc32 periodicstart;
+ __hc32 lsthresh;
+
+ /* Root hub ports (section 7.4) */
+ struct ohci_roothub_regs {
+ __hc32 a;
+ __hc32 b;
+ __hc32 status;
+#define MAX_ROOT_PORTS 15 /* maximum OHCI root hub ports (RH_A_NDP) */
+ __hc32 portstatus [MAX_ROOT_PORTS];
+ } roothub;
+
+ /* and optional "legacy support" registers (appendix B) at 0x0100 */
+
+} __attribute__ ((aligned(32)));
+
+
+/* OHCI CONTROL AND STATUS REGISTER MASKS */
+
+/*
+ * HcControl (control) register masks
+ */
+#define OHCI_CTRL_CBSR (3 << 0) /* control/bulk service ratio */
+#define OHCI_CTRL_PLE (1 << 2) /* periodic list enable */
+#define OHCI_CTRL_IE (1 << 3) /* isochronous enable */
+#define OHCI_CTRL_CLE (1 << 4) /* control list enable */
+#define OHCI_CTRL_BLE (1 << 5) /* bulk list enable */
+#define OHCI_CTRL_HCFS (3 << 6) /* host controller functional state */
+#define OHCI_CTRL_IR (1 << 8) /* interrupt routing */
+#define OHCI_CTRL_RWC (1 << 9) /* remote wakeup connected */
+#define OHCI_CTRL_RWE (1 << 10) /* remote wakeup enable */
+
+/* pre-shifted values for HCFS */
+# define OHCI_USB_RESET (0 << 6)
+# define OHCI_USB_RESUME (1 << 6)
+# define OHCI_USB_OPER (2 << 6)
+# define OHCI_USB_SUSPEND (3 << 6)
+
+/*
+ * HcCommandStatus (cmdstatus) register masks
+ */
+#define OHCI_HCR (1 << 0) /* host controller reset */
+#define OHCI_CLF (1 << 1) /* control list filled */
+#define OHCI_BLF (1 << 2) /* bulk list filled */
+#define OHCI_OCR (1 << 3) /* ownership change request */
+#define OHCI_SOC (3 << 16) /* scheduling overrun count */
+
+/*
+ * masks used with interrupt registers:
+ * HcInterruptStatus (intrstatus)
+ * HcInterruptEnable (intrenable)
+ * HcInterruptDisable (intrdisable)
+ */
+#define OHCI_INTR_SO (1 << 0) /* scheduling overrun */
+#define OHCI_INTR_WDH (1 << 1) /* writeback of done_head */
+#define OHCI_INTR_SF (1 << 2) /* start frame */
+#define OHCI_INTR_RD (1 << 3) /* resume detect */
+#define OHCI_INTR_UE (1 << 4) /* unrecoverable error */
+#define OHCI_INTR_FNO (1 << 5) /* frame number overflow */
+#define OHCI_INTR_RHSC (1 << 6) /* root hub status change */
+#define OHCI_INTR_OC (1 << 30) /* ownership change */
+#define OHCI_INTR_MIE (1 << 31) /* master interrupt enable */
+
+
+/* OHCI ROOT HUB REGISTER MASKS */
+
+/* roothub.portstatus [i] bits */
+#define RH_PS_CCS 0x00000001 /* current connect status */
+#define RH_PS_PES 0x00000002 /* port enable status*/
+#define RH_PS_PSS 0x00000004 /* port suspend status */
+#define RH_PS_POCI 0x00000008 /* port over current indicator */
+#define RH_PS_PRS 0x00000010 /* port reset status */
+#define RH_PS_PPS 0x00000100 /* port power status */
+#define RH_PS_LSDA 0x00000200 /* low speed device attached */
+#define RH_PS_CSC 0x00010000 /* connect status change */
+#define RH_PS_PESC 0x00020000 /* port enable status change */
+#define RH_PS_PSSC 0x00040000 /* port suspend status change */
+#define RH_PS_OCIC 0x00080000 /* over current indicator change */
+#define RH_PS_PRSC 0x00100000 /* port reset status change */
+
+/* roothub.status bits */
+#define RH_HS_LPS 0x00000001 /* local power status */
+#define RH_HS_OCI 0x00000002 /* over current indicator */
+#define RH_HS_DRWE 0x00008000 /* device remote wakeup enable */
+#define RH_HS_LPSC 0x00010000 /* local power status change */
+#define RH_HS_OCIC 0x00020000 /* over current indicator change */
+#define RH_HS_CRWE 0x80000000 /* clear remote wakeup enable */
+
+/* roothub.b masks */
+#define RH_B_DR 0x0000ffff /* device removable flags */
+#define RH_B_PPCM 0xffff0000 /* port power control mask */
+
+/* roothub.a masks */
+#define RH_A_NDP (0xff << 0) /* number of downstream ports */
+#define RH_A_PSM (1 << 8) /* power switching mode */
+#define RH_A_NPS (1 << 9) /* no power switching */
+#define RH_A_DT (1 << 10) /* device type (mbz) */
+#define RH_A_OCPM (1 << 11) /* over current protection mode */
+#define RH_A_NOCP (1 << 12) /* no over current protection */
+#define RH_A_POTPGT (0xff << 24) /* power on to power good time */
+
+
+/* hcd-private per-urb state */
+typedef struct urb_priv {
+ struct ed *ed;
+ u16 length; // # tds in this request
+ u16 td_cnt; // tds already serviced
+ struct list_head pending;
+ struct td *td [0]; // all TDs in this request
+
+} urb_priv_t;
+
+#define TD_HASH_SIZE 64 /* power'o'two */
+// sizeof (struct td) ~= 64 == 2^6 ...
+#define TD_HASH_FUNC(td_dma) ((td_dma ^ (td_dma >> 6)) % TD_HASH_SIZE)
+
+
+/*
+ * This is the full ohci controller description
+ *
+ * Note how the "proper" USB information is just
+ * a subset of what the full implementation needs. (Linus)
+ */
+
+struct ohci_hcd {
+ spinlock_t lock;
+
+ /*
+ * I/O memory used to communicate with the HC (dma-consistent)
+ */
+ struct ohci_regs __iomem *regs;
+
+ /*
+ * main memory used to communicate with the HC (dma-consistent).
+ * hcd adds to schedule for a live hc any time, but removals finish
+ * only at the start of the next frame.
+ */
+ struct ohci_hcca *hcca;
+ dma_addr_t hcca_dma;
+
+ struct ed *ed_rm_list; /* to be removed */
+
+ struct ed *ed_bulktail; /* last in bulk list */
+ struct ed *ed_controltail; /* last in ctrl list */
+ struct ed *periodic [NUM_INTS]; /* shadow int_table */
+
+ /*
+ * OTG controllers and transceivers need software interaction;
+ * other external transceivers should be software-transparent
+ */
+ struct otg_transceiver *transceiver;
+ unsigned power_budget;
+
+ /*
+ * memory management for queue data structures
+ */
+ struct dma_pool *td_cache;
+ struct dma_pool *ed_cache;
+ struct td *td_hash [TD_HASH_SIZE];
+ struct list_head pending;
+
+ /*
+ * driver state
+ */
+ int load [NUM_INTS];
+ u32 hc_control; /* copy of hc control reg */
+ unsigned long next_statechange; /* suspend/resume */
+ u32 fminterval; /* saved register */
+
+ struct work_struct rh_resume;
+
+ unsigned long flags; /* for HC bugs */
+#define OHCI_QUIRK_AMD756 0x01 /* erratum #4 */
+#define OHCI_QUIRK_SUPERIO 0x02 /* natsemi */
+#define OHCI_QUIRK_INITRESET 0x04 /* SiS, OPTi, ... */
+#define OHCI_BIG_ENDIAN 0x08 /* big endian HC */
+ // there are also chip quirks/bugs in init logic
+
+};
+
+/* convert between an hcd pointer and the corresponding ohci_hcd */
+static inline struct ohci_hcd *hcd_to_ohci (struct usb_hcd *hcd)
+{
+ return (struct ohci_hcd *) (hcd->hcd_priv);
+}
+static inline struct usb_hcd *ohci_to_hcd (const struct ohci_hcd *ohci)
+{
+ return container_of ((void *) ohci, struct usb_hcd, hcd_priv);
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifndef DEBUG
+#define STUB_DEBUG_FILES
+#endif /* DEBUG */
+
+#define ohci_dbg(ohci, fmt, args...) \
+ dev_dbg (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
+#define ohci_err(ohci, fmt, args...) \
+ dev_err (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
+#define ohci_info(ohci, fmt, args...) \
+ dev_info (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
+#define ohci_warn(ohci, fmt, args...) \
+ dev_warn (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
+
+#ifdef OHCI_VERBOSE_DEBUG
+# define ohci_vdbg ohci_dbg
+#else
+# define ohci_vdbg(ohci, fmt, args...) do { } while (0)
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * While most USB host controllers implement their registers and
+ * in-memory communication descriptors in little-endian format,
+ * a minority (notably the IBM STB04XXX and the Motorola MPC5200
+ * processors) implement them in big endian format.
+ *
+ * This attempts to support either format at compile time without a
+ * runtime penalty, or both formats with the additional overhead
+ * of checking a flag bit.
+ */
+
+#ifdef CONFIG_USB_OHCI_BIG_ENDIAN
+
+#ifdef CONFIG_USB_OHCI_LITTLE_ENDIAN
+#define big_endian(ohci) (ohci->flags & OHCI_BIG_ENDIAN) /* either */
+#else
+#define big_endian(ohci) 1 /* only big endian */
+#endif
+
+/*
+ * Big-endian read/write functions are arch-specific.
+ * Other arches can be added if/when they're needed.
+ */
+#if defined(CONFIG_PPC)
+#define readl_be(addr) in_be32((__force unsigned *)addr)
+#define writel_be(val, addr) out_be32((__force unsigned *)addr, val)
+#endif
+
+static inline unsigned int ohci_readl (const struct ohci_hcd *ohci,
+ __hc32 __iomem * regs)
+{
+ return big_endian(ohci) ? readl_be (regs) : readl ((__force u32 *)regs);
+}
+
+static inline void ohci_writel (const struct ohci_hcd *ohci,
+ const unsigned int val, __hc32 __iomem *regs)
+{
+ big_endian(ohci) ? writel_be (val, regs) :
+ writel (val, (__force u32 *)regs);
+}
+
+#else /* !CONFIG_USB_OHCI_BIG_ENDIAN */
+
+#define big_endian(ohci) 0 /* only little endian */
+
+#ifdef CONFIG_ARCH_LH7A404
+ /* Marc Singer: at the time this code was written, the LH7A404
+ * had a problem reading the USB host registers. This
+ * implementation of the ohci_readl function performs the read
+ * twice as a work-around.
+ */
+static inline unsigned int
+ohci_readl (const struct ohci_hcd *ohci, const __hc32 *regs)
+{
+ *(volatile __force unsigned int*) regs;
+ return *(volatile __force unsigned int*) regs;
+}
+#else
+ /* Standard version of ohci_readl uses standard, platform
+ * specific implementation. */
+static inline unsigned int
+ohci_readl (const struct ohci_hcd *ohci, __hc32 __iomem * regs)
+{
+ return readl(regs);
+}
+#endif
+
+static inline void ohci_writel (const struct ohci_hcd *ohci,
+ const unsigned int val, __hc32 __iomem *regs)
+{
+ writel (val, regs);
+}
+
+#endif /* !CONFIG_USB_OHCI_BIG_ENDIAN */
+
+/*-------------------------------------------------------------------------*/
+
+/* cpu to ohci */
+static inline __hc16 cpu_to_hc16 (const struct ohci_hcd *ohci, const u16 x)
+{
+ return big_endian(ohci) ? (__force __hc16)cpu_to_be16(x) : (__force __hc16)cpu_to_le16(x);
+}
+
+static inline __hc16 cpu_to_hc16p (const struct ohci_hcd *ohci, const u16 *x)
+{
+ return big_endian(ohci) ? cpu_to_be16p(x) : cpu_to_le16p(x);
+}
+
+static inline __hc32 cpu_to_hc32 (const struct ohci_hcd *ohci, const u32 x)
+{
+ return big_endian(ohci) ? (__force __hc32)cpu_to_be32(x) : (__force __hc32)cpu_to_le32(x);
+}
+
+static inline __hc32 cpu_to_hc32p (const struct ohci_hcd *ohci, const u32 *x)
+{
+ return big_endian(ohci) ? cpu_to_be32p(x) : cpu_to_le32p(x);
+}
+
+/* ohci to cpu */
+static inline u16 hc16_to_cpu (const struct ohci_hcd *ohci, const __hc16 x)
+{
+ return big_endian(ohci) ? be16_to_cpu((__force __be16)x) : le16_to_cpu((__force __le16)x);
+}
+
+static inline u16 hc16_to_cpup (const struct ohci_hcd *ohci, const __hc16 *x)
+{
+ return big_endian(ohci) ? be16_to_cpup((__force __be16 *)x) : le16_to_cpup((__force __le16 *)x);
+}
+
+static inline u32 hc32_to_cpu (const struct ohci_hcd *ohci, const __hc32 x)
+{
+ return big_endian(ohci) ? be32_to_cpu((__force __be32)x) : le32_to_cpu((__force __le32)x);
+}
+
+static inline u32 hc32_to_cpup (const struct ohci_hcd *ohci, const __hc32 *x)
+{
+ return big_endian(ohci) ? be32_to_cpup((__force __be32 *)x) : le32_to_cpup((__force __le32 *)x);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* HCCA frame number is 16 bits, but is accessed as 32 bits since not all
+ * hardware handles 16 bit reads. That creates a different confusion on
+ * some big-endian SOC implementations. Same thing happens with PSW access.
+ */
+
+#ifdef CONFIG_STB03xxx
+#define OHCI_BE_FRAME_NO_SHIFT 16
+#else
+#define OHCI_BE_FRAME_NO_SHIFT 0
+#endif
+
+static inline u16 ohci_frame_no(const struct ohci_hcd *ohci)
+{
+ u32 tmp;
+ if (big_endian(ohci)) {
+ tmp = be32_to_cpup((__force __be32 *)&ohci->hcca->frame_no);
+ tmp >>= OHCI_BE_FRAME_NO_SHIFT;
+ } else
+ tmp = le32_to_cpup((__force __le32 *)&ohci->hcca->frame_no);
+
+ return (u16)tmp;
+}
+
+static inline __hc16 *ohci_hwPSWp(const struct ohci_hcd *ohci,
+ const struct td *td, int index)
+{
+ return (__hc16 *)(big_endian(ohci) ?
+ &td->hwPSW[index ^ 1] : &td->hwPSW[index]);
+}
+
+static inline u16 ohci_hwPSW(const struct ohci_hcd *ohci,
+ const struct td *td, int index)
+{
+ return hc16_to_cpup(ohci, ohci_hwPSWp(ohci, td, index));
+}
+
+/*-------------------------------------------------------------------------*/
+
+static inline void disable (struct ohci_hcd *ohci)
+{
+ ohci_to_hcd(ohci)->state = HC_STATE_HALT;
+}
+
+#define FI 0x2edf /* 12000 bits per frame (-1) */
+#define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7))
+#define FIT (1 << 31)
+#define LSTHRESH 0x628 /* lowspeed bit threshold */
+
+static void periodic_reinit (struct ohci_hcd *ohci)
+{
+ u32 fi = ohci->fminterval & 0x03fff;
+ u32 fit = ohci_readl(ohci, &ohci->regs->fminterval) & FIT;
+
+ ohci_writel (ohci, (fit ^ FIT) | ohci->fminterval,
+ &ohci->regs->fminterval);
+ ohci_writel (ohci, ((9 * fi) / 10) & 0x3fff,
+ &ohci->regs->periodicstart);
+}
+
+/* AMD-756 (D2 rev) reports corrupt register contents in some cases.
+ * The erratum (#4) description is incorrect. AMD's workaround waits
+ * till some bits (mostly reserved) are clear; ok for all revs.
+ */
+#define read_roothub(hc, register, mask) ({ \
+ u32 temp = ohci_readl (hc, &hc->regs->roothub.register); \
+ if (temp == -1) \
+ disable (hc); \
+ else if (hc->flags & OHCI_QUIRK_AMD756) \
+ while (temp & mask) \
+ temp = ohci_readl (hc, &hc->regs->roothub.register); \
+ temp; })
+
+static u32 roothub_a (struct ohci_hcd *hc)
+ { return read_roothub (hc, a, 0xfc0fe000); }
+static inline u32 roothub_b (struct ohci_hcd *hc)
+ { return ohci_readl (hc, &hc->regs->roothub.b); }
+static inline u32 roothub_status (struct ohci_hcd *hc)
+ { return ohci_readl (hc, &hc->regs->roothub.status); }
+static u32 roothub_portstatus (struct ohci_hcd *hc, int i)
+ { return read_roothub (hc, portstatus [i], 0xffe0fce0); }
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
new file mode 100644
index 000000000000..d309e292198e
--- /dev/null
+++ b/drivers/usb/host/sl811-hcd.c
@@ -0,0 +1,1851 @@
+/*
+ * SL811HS HCD (Host Controller Driver) for USB.
+ *
+ * Copyright (C) 2004 Psion Teklogix (for NetBook PRO)
+ * Copyright (C) 2004 David Brownell
+ *
+ * Periodic scheduling is based on Roman's OHCI code
+ * Copyright (C) 1999 Roman Weissgaerber
+ *
+ * The SL811HS controller handles host side USB (like the SL11H, but with
+ * another register set and SOF generation) as well as peripheral side USB
+ * (like the SL811S). This driver version doesn't implement the Gadget API
+ * for the peripheral role; or OTG (that'd need much external circuitry).
+ *
+ * For documentation, see the SL811HS spec and the "SL811HS Embedded Host"
+ * document (providing significant pieces missing from that spec); plus
+ * the SL811S spec if you want peripheral side info.
+ */
+
+/*
+ * Status: Passed basic stress testing, works with hubs, mice, keyboards,
+ * and usb-storage.
+ *
+ * TODO:
+ * - usb suspend/resume triggered by sl811 (with USB_SUSPEND)
+ * - various issues noted in the code
+ * - performance work; use both register banks; ...
+ * - use urb->iso_frame_desc[] with ISO transfers
+ */
+
+#undef VERBOSE
+#undef PACKET_TRACE
+
+#include <linux/config.h>
+
+#ifdef CONFIG_USB_DEBUG
+# define DEBUG
+#else
+# undef DEBUG
+#endif
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/usb.h>
+#include <linux/usb_sl811.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/byteorder.h>
+
+#include "../core/hcd.h"
+#include "sl811.h"
+
+
+MODULE_DESCRIPTION("SL811HS USB Host Controller Driver");
+MODULE_LICENSE("GPL");
+
+#define DRIVER_VERSION "15 Dec 2004"
+
+
+#ifndef DEBUG
+# define STUB_DEBUG_FILE
+#endif
+
+/* for now, use only one transfer register bank */
+#undef USE_B
+
+/* this doesn't understand urb->iso_frame_desc[], but if you had a driver
+ * that just queued one ISO frame per URB then iso transfers "should" work
+ * using the normal urb status fields.
+ */
+#define DISABLE_ISO
+
+// #define QUIRK2
+#define QUIRK3
+
+static const char hcd_name[] = "sl811-hcd";
+
+/*-------------------------------------------------------------------------*/
+
+static void port_power(struct sl811 *sl811, int is_on)
+{
+ struct usb_hcd *hcd = sl811_to_hcd(sl811);
+
+ /* hub is inactive unless the port is powered */
+ if (is_on) {
+ if (sl811->port1 & (1 << USB_PORT_FEAT_POWER))
+ return;
+
+ sl811->port1 = (1 << USB_PORT_FEAT_POWER);
+ sl811->irq_enable = SL11H_INTMASK_INSRMV;
+ hcd->self.controller->power.power_state = PMSG_ON;
+ } else {
+ sl811->port1 = 0;
+ sl811->irq_enable = 0;
+ hcd->state = HC_STATE_HALT;
+ hcd->self.controller->power.power_state = PMSG_SUSPEND;
+ }
+ sl811->ctrl1 = 0;
+ sl811_write(sl811, SL11H_IRQ_ENABLE, 0);
+ sl811_write(sl811, SL11H_IRQ_STATUS, ~0);
+
+ if (sl811->board && sl811->board->port_power) {
+ /* switch VBUS, at 500mA unless hub power budget gets set */
+ DBG("power %s\n", is_on ? "on" : "off");
+ sl811->board->port_power(hcd->self.controller, is_on);
+ }
+
+ /* reset as thoroughly as we can */
+ if (sl811->board && sl811->board->reset)
+ sl811->board->reset(hcd->self.controller);
+
+ sl811_write(sl811, SL11H_IRQ_ENABLE, 0);
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+ sl811_write(sl811, SL811HS_CTLREG2, SL811HS_CTL2_INIT);
+ sl811_write(sl811, SL11H_IRQ_ENABLE, sl811->irq_enable);
+
+ // if !is_on, put into lowpower mode now
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* This is a PIO-only HCD. Queueing appends URBs to the endpoint's queue,
+ * and may start I/O. Endpoint queues are scanned during completion irq
+ * handlers (one per packet: ACK, NAK, faults, etc) and urb cancelation.
+ *
+ * Using an external DMA engine to copy a packet at a time could work,
+ * though setup/teardown costs may be too big to make it worthwhile.
+ */
+
+/* SETUP starts a new control request. Devices are not allowed to
+ * STALL or NAK these; they must cancel any pending control requests.
+ */
+static void setup_packet(
+ struct sl811 *sl811,
+ struct sl811h_ep *ep,
+ struct urb *urb,
+ u8 bank,
+ u8 control
+)
+{
+ u8 addr;
+ u8 len;
+ void __iomem *data_reg;
+
+ addr = SL811HS_PACKET_BUF(bank == 0);
+ len = sizeof(struct usb_ctrlrequest);
+ data_reg = sl811->data_reg;
+ sl811_write_buf(sl811, addr, urb->setup_packet, len);
+
+ /* autoincrementing */
+ sl811_write(sl811, bank + SL11H_BUFADDRREG, addr);
+ writeb(len, data_reg);
+ writeb(SL_SETUP /* | ep->epnum */, data_reg);
+ writeb(usb_pipedevice(urb->pipe), data_reg);
+
+ /* always OUT/data0 */ ;
+ sl811_write(sl811, bank + SL11H_HOSTCTLREG,
+ control | SL11H_HCTLMASK_OUT);
+ ep->length = 0;
+ PACKET("SETUP qh%p\n", ep);
+}
+
+/* STATUS finishes control requests, often after IN or OUT data packets */
+static void status_packet(
+ struct sl811 *sl811,
+ struct sl811h_ep *ep,
+ struct urb *urb,
+ u8 bank,
+ u8 control
+)
+{
+ int do_out;
+ void __iomem *data_reg;
+
+ do_out = urb->transfer_buffer_length && usb_pipein(urb->pipe);
+ data_reg = sl811->data_reg;
+
+ /* autoincrementing */
+ sl811_write(sl811, bank + SL11H_BUFADDRREG, 0);
+ writeb(0, data_reg);
+ writeb((do_out ? SL_OUT : SL_IN) /* | ep->epnum */, data_reg);
+ writeb(usb_pipedevice(urb->pipe), data_reg);
+
+ /* always data1; sometimes IN */
+ control |= SL11H_HCTLMASK_TOGGLE;
+ if (do_out)
+ control |= SL11H_HCTLMASK_OUT;
+ sl811_write(sl811, bank + SL11H_HOSTCTLREG, control);
+ ep->length = 0;
+ PACKET("STATUS%s/%s qh%p\n", ep->nak_count ? "/retry" : "",
+ do_out ? "out" : "in", ep);
+}
+
+/* IN packets can be used with any type of endpoint. here we just
+ * start the transfer, data from the peripheral may arrive later.
+ * urb->iso_frame_desc is currently ignored here...
+ */
+static void in_packet(
+ struct sl811 *sl811,
+ struct sl811h_ep *ep,
+ struct urb *urb,
+ u8 bank,
+ u8 control
+)
+{
+ u8 addr;
+ u8 len;
+ void __iomem *data_reg;
+
+ /* avoid losing data on overflow */
+ len = ep->maxpacket;
+ addr = SL811HS_PACKET_BUF(bank == 0);
+ if (!(control & SL11H_HCTLMASK_ISOCH)
+ && usb_gettoggle(urb->dev, ep->epnum, 0))
+ control |= SL11H_HCTLMASK_TOGGLE;
+ data_reg = sl811->data_reg;
+
+ /* autoincrementing */
+ sl811_write(sl811, bank + SL11H_BUFADDRREG, addr);
+ writeb(len, data_reg);
+ writeb(SL_IN | ep->epnum, data_reg);
+ writeb(usb_pipedevice(urb->pipe), data_reg);
+
+ sl811_write(sl811, bank + SL11H_HOSTCTLREG, control);
+ ep->length = min((int)len,
+ urb->transfer_buffer_length - urb->actual_length);
+ PACKET("IN%s/%d qh%p len%d\n", ep->nak_count ? "/retry" : "",
+ !!usb_gettoggle(urb->dev, ep->epnum, 0), ep, len);
+}
+
+/* OUT packets can be used with any type of endpoint.
+ * urb->iso_frame_desc is currently ignored here...
+ */
+static void out_packet(
+ struct sl811 *sl811,
+ struct sl811h_ep *ep,
+ struct urb *urb,
+ u8 bank,
+ u8 control
+)
+{
+ void *buf;
+ u8 addr;
+ u8 len;
+ void __iomem *data_reg;
+
+ buf = urb->transfer_buffer + urb->actual_length;
+ prefetch(buf);
+
+ len = min((int)ep->maxpacket,
+ urb->transfer_buffer_length - urb->actual_length);
+
+ if (!(control & SL11H_HCTLMASK_ISOCH)
+ && usb_gettoggle(urb->dev, ep->epnum, 1))
+ control |= SL11H_HCTLMASK_TOGGLE;
+ addr = SL811HS_PACKET_BUF(bank == 0);
+ data_reg = sl811->data_reg;
+
+ sl811_write_buf(sl811, addr, buf, len);
+
+ /* autoincrementing */
+ sl811_write(sl811, bank + SL11H_BUFADDRREG, addr);
+ writeb(len, data_reg);
+ writeb(SL_OUT | ep->epnum, data_reg);
+ writeb(usb_pipedevice(urb->pipe), data_reg);
+
+ sl811_write(sl811, bank + SL11H_HOSTCTLREG,
+ control | SL11H_HCTLMASK_OUT);
+ ep->length = len;
+ PACKET("OUT%s/%d qh%p len%d\n", ep->nak_count ? "/retry" : "",
+ !!usb_gettoggle(urb->dev, ep->epnum, 1), ep, len);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* caller updates on-chip enables later */
+
+static inline void sofirq_on(struct sl811 *sl811)
+{
+ if (sl811->irq_enable & SL11H_INTMASK_SOFINTR)
+ return;
+ VDBG("sof irq on\n");
+ sl811->irq_enable |= SL11H_INTMASK_SOFINTR;
+}
+
+static inline void sofirq_off(struct sl811 *sl811)
+{
+ if (!(sl811->irq_enable & SL11H_INTMASK_SOFINTR))
+ return;
+ VDBG("sof irq off\n");
+ sl811->irq_enable &= ~SL11H_INTMASK_SOFINTR;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* pick the next endpoint for a transaction, and issue it.
+ * frames start with periodic transfers (after whatever is pending
+ * from the previous frame), and the rest of the time is async
+ * transfers, scheduled round-robin.
+ */
+static struct sl811h_ep *start(struct sl811 *sl811, u8 bank)
+{
+ struct sl811h_ep *ep;
+ struct urb *urb;
+ int fclock;
+ u8 control;
+
+ /* use endpoint at schedule head */
+ if (sl811->next_periodic) {
+ ep = sl811->next_periodic;
+ sl811->next_periodic = ep->next;
+ } else {
+ if (sl811->next_async)
+ ep = sl811->next_async;
+ else if (!list_empty(&sl811->async))
+ ep = container_of(sl811->async.next,
+ struct sl811h_ep, schedule);
+ else {
+ /* could set up the first fullspeed periodic
+ * transfer for the next frame ...
+ */
+ return NULL;
+ }
+
+#ifdef USE_B
+ if ((bank && sl811->active_b == ep) || sl811->active_a == ep)
+ return NULL;
+#endif
+
+ if (ep->schedule.next == &sl811->async)
+ sl811->next_async = NULL;
+ else
+ sl811->next_async = container_of(ep->schedule.next,
+ struct sl811h_ep, schedule);
+ }
+
+ if (unlikely(list_empty(&ep->hep->urb_list))) {
+ DBG("empty %p queue?\n", ep);
+ return NULL;
+ }
+
+ urb = container_of(ep->hep->urb_list.next, struct urb, urb_list);
+ control = ep->defctrl;
+
+ /* if this frame doesn't have enough time left to transfer this
+ * packet, wait till the next frame. too-simple algorithm...
+ */
+ fclock = sl811_read(sl811, SL11H_SOFTMRREG) << 6;
+ fclock -= 100; /* setup takes not much time */
+ if (urb->dev->speed == USB_SPEED_LOW) {
+ if (control & SL11H_HCTLMASK_PREAMBLE) {
+ /* also note erratum 1: some hubs won't work */
+ fclock -= 800;
+ }
+ fclock -= ep->maxpacket << 8;
+
+ /* erratum 2: AFTERSOF only works for fullspeed */
+ if (fclock < 0) {
+ if (ep->period)
+ sl811->stat_overrun++;
+ sofirq_on(sl811);
+ return NULL;
+ }
+ } else {
+ fclock -= 12000 / 19; /* 19 64byte packets/msec */
+ if (fclock < 0) {
+ if (ep->period)
+ sl811->stat_overrun++;
+ control |= SL11H_HCTLMASK_AFTERSOF;
+
+ /* throttle bulk/control irq noise */
+ } else if (ep->nak_count)
+ control |= SL11H_HCTLMASK_AFTERSOF;
+ }
+
+
+ switch (ep->nextpid) {
+ case USB_PID_IN:
+ in_packet(sl811, ep, urb, bank, control);
+ break;
+ case USB_PID_OUT:
+ out_packet(sl811, ep, urb, bank, control);
+ break;
+ case USB_PID_SETUP:
+ setup_packet(sl811, ep, urb, bank, control);
+ break;
+ case USB_PID_ACK: /* for control status */
+ status_packet(sl811, ep, urb, bank, control);
+ break;
+ default:
+ DBG("bad ep%p pid %02x\n", ep, ep->nextpid);
+ ep = NULL;
+ }
+ return ep;
+}
+
+#define MIN_JIFFIES ((msecs_to_jiffies(2) > 1) ? msecs_to_jiffies(2) : 2)
+
+static inline void start_transfer(struct sl811 *sl811)
+{
+ if (sl811->port1 & (1 << USB_PORT_FEAT_SUSPEND))
+ return;
+ if (sl811->active_a == NULL) {
+ sl811->active_a = start(sl811, SL811_EP_A(SL811_HOST_BUF));
+ if (sl811->active_a != NULL)
+ sl811->jiffies_a = jiffies + MIN_JIFFIES;
+ }
+#ifdef USE_B
+ if (sl811->active_b == NULL) {
+ sl811->active_b = start(sl811, SL811_EP_B(SL811_HOST_BUF));
+ if (sl811->active_b != NULL)
+ sl811->jiffies_b = jiffies + MIN_JIFFIES;
+ }
+#endif
+}
+
+static void finish_request(
+ struct sl811 *sl811,
+ struct sl811h_ep *ep,
+ struct urb *urb,
+ struct pt_regs *regs,
+ int status
+) __releases(sl811->lock) __acquires(sl811->lock)
+{
+ unsigned i;
+
+ if (usb_pipecontrol(urb->pipe))
+ ep->nextpid = USB_PID_SETUP;
+
+ spin_lock(&urb->lock);
+ if (urb->status == -EINPROGRESS)
+ urb->status = status;
+ spin_unlock(&urb->lock);
+
+ spin_unlock(&sl811->lock);
+ usb_hcd_giveback_urb(sl811_to_hcd(sl811), urb, regs);
+ spin_lock(&sl811->lock);
+
+ /* leave active endpoints in the schedule */
+ if (!list_empty(&ep->hep->urb_list))
+ return;
+
+ /* async deschedule? */
+ if (!list_empty(&ep->schedule)) {
+ list_del_init(&ep->schedule);
+ if (ep == sl811->next_async)
+ sl811->next_async = NULL;
+ return;
+ }
+
+ /* periodic deschedule */
+ DBG("deschedule qh%d/%p branch %d\n", ep->period, ep, ep->branch);
+ for (i = ep->branch; i < PERIODIC_SIZE; i += ep->period) {
+ struct sl811h_ep *temp;
+ struct sl811h_ep **prev = &sl811->periodic[i];
+
+ while (*prev && ((temp = *prev) != ep))
+ prev = &temp->next;
+ if (*prev)
+ *prev = ep->next;
+ sl811->load[i] -= ep->load;
+ }
+ ep->branch = PERIODIC_SIZE;
+ sl811->periodic_count--;
+ sl811_to_hcd(sl811)->self.bandwidth_allocated
+ -= ep->load / ep->period;
+ if (ep == sl811->next_periodic)
+ sl811->next_periodic = ep->next;
+
+ /* we might turn SOFs back on again for the async schedule */
+ if (sl811->periodic_count == 0)
+ sofirq_off(sl811);
+}
+
+static void
+done(struct sl811 *sl811, struct sl811h_ep *ep, u8 bank, struct pt_regs *regs)
+{
+ u8 status;
+ struct urb *urb;
+ int urbstat = -EINPROGRESS;
+
+ if (unlikely(!ep))
+ return;
+
+ status = sl811_read(sl811, bank + SL11H_PKTSTATREG);
+
+ urb = container_of(ep->hep->urb_list.next, struct urb, urb_list);
+
+ /* we can safely ignore NAKs */
+ if (status & SL11H_STATMASK_NAK) {
+ // PACKET("...NAK_%02x qh%p\n", bank, ep);
+ if (!ep->period)
+ ep->nak_count++;
+ ep->error_count = 0;
+
+ /* ACK advances transfer, toggle, and maybe queue */
+ } else if (status & SL11H_STATMASK_ACK) {
+ struct usb_device *udev = urb->dev;
+ int len;
+ unsigned char *buf;
+
+ /* urb->iso_frame_desc is currently ignored here... */
+
+ ep->nak_count = ep->error_count = 0;
+ switch (ep->nextpid) {
+ case USB_PID_OUT:
+ // PACKET("...ACK/out_%02x qh%p\n", bank, ep);
+ urb->actual_length += ep->length;
+ usb_dotoggle(udev, ep->epnum, 1);
+ if (urb->actual_length
+ == urb->transfer_buffer_length) {
+ if (usb_pipecontrol(urb->pipe))
+ ep->nextpid = USB_PID_ACK;
+
+ /* some bulk protocols terminate OUT transfers
+ * by a short packet, using ZLPs not padding.
+ */
+ else if (ep->length < ep->maxpacket
+ || !(urb->transfer_flags
+ & URB_ZERO_PACKET))
+ urbstat = 0;
+ }
+ break;
+ case USB_PID_IN:
+ // PACKET("...ACK/in_%02x qh%p\n", bank, ep);
+ buf = urb->transfer_buffer + urb->actual_length;
+ prefetchw(buf);
+ len = ep->maxpacket - sl811_read(sl811,
+ bank + SL11H_XFERCNTREG);
+ if (len > ep->length) {
+ len = ep->length;
+ urb->status = -EOVERFLOW;
+ }
+ urb->actual_length += len;
+ sl811_read_buf(sl811, SL811HS_PACKET_BUF(bank == 0),
+ buf, len);
+ usb_dotoggle(udev, ep->epnum, 0);
+ if (urb->actual_length == urb->transfer_buffer_length)
+ urbstat = 0;
+ else if (len < ep->maxpacket) {
+ if (urb->transfer_flags & URB_SHORT_NOT_OK)
+ urbstat = -EREMOTEIO;
+ else
+ urbstat = 0;
+ }
+ if (usb_pipecontrol(urb->pipe)
+ && (urbstat == -EREMOTEIO
+ || urbstat == 0)) {
+
+ /* NOTE if the status stage STALLs (why?),
+ * this reports the wrong urb status.
+ */
+ spin_lock(&urb->lock);
+ if (urb->status == -EINPROGRESS)
+ urb->status = urbstat;
+ spin_unlock(&urb->lock);
+
+ urb = NULL;
+ ep->nextpid = USB_PID_ACK;
+ }
+ break;
+ case USB_PID_SETUP:
+ // PACKET("...ACK/setup_%02x qh%p\n", bank, ep);
+ if (urb->transfer_buffer_length == urb->actual_length)
+ ep->nextpid = USB_PID_ACK;
+ else if (usb_pipeout(urb->pipe)) {
+ usb_settoggle(udev, 0, 1, 1);
+ ep->nextpid = USB_PID_OUT;
+ } else {
+ usb_settoggle(udev, 0, 0, 1);
+ ep->nextpid = USB_PID_IN;
+ }
+ break;
+ case USB_PID_ACK:
+ // PACKET("...ACK/status_%02x qh%p\n", bank, ep);
+ urbstat = 0;
+ break;
+ }
+
+ /* STALL stops all transfers */
+ } else if (status & SL11H_STATMASK_STALL) {
+ PACKET("...STALL_%02x qh%p\n", bank, ep);
+ ep->nak_count = ep->error_count = 0;
+ urbstat = -EPIPE;
+
+ /* error? retry, until "3 strikes" */
+ } else if (++ep->error_count >= 3) {
+ if (status & SL11H_STATMASK_TMOUT)
+ urbstat = -ETIMEDOUT;
+ else if (status & SL11H_STATMASK_OVF)
+ urbstat = -EOVERFLOW;
+ else
+ urbstat = -EPROTO;
+ ep->error_count = 0;
+ PACKET("...3STRIKES_%02x %02x qh%p stat %d\n",
+ bank, status, ep, urbstat);
+ }
+
+ if (urb && (urbstat != -EINPROGRESS || urb->status != -EINPROGRESS))
+ finish_request(sl811, ep, urb, regs, urbstat);
+}
+
+static inline u8 checkdone(struct sl811 *sl811)
+{
+ u8 ctl;
+ u8 irqstat = 0;
+
+ if (sl811->active_a && time_before_eq(sl811->jiffies_a, jiffies)) {
+ ctl = sl811_read(sl811, SL811_EP_A(SL11H_HOSTCTLREG));
+ if (ctl & SL11H_HCTLMASK_ARM)
+ sl811_write(sl811, SL811_EP_A(SL11H_HOSTCTLREG), 0);
+ DBG("%s DONE_A: ctrl %02x sts %02x\n",
+ (ctl & SL11H_HCTLMASK_ARM) ? "timeout" : "lost",
+ ctl,
+ sl811_read(sl811, SL811_EP_A(SL11H_PKTSTATREG)));
+ irqstat |= SL11H_INTMASK_DONE_A;
+ }
+#ifdef USE_B
+ if (sl811->active_b && time_before_eq(sl811->jiffies_b, jiffies)) {
+ ctl = sl811_read(sl811, SL811_EP_B(SL11H_HOSTCTLREG));
+ if (ctl & SL11H_HCTLMASK_ARM)
+ sl811_write(sl811, SL811_EP_B(SL11H_HOSTCTLREG), 0);
+ DBG("%s DONE_B: ctrl %02x sts %02x\n",
+ (ctl & SL11H_HCTLMASK_ARM) ? "timeout" : "lost",
+ ctl,
+ sl811_read(sl811, SL811_EP_B(SL11H_PKTSTATREG)));
+ irqstat |= SL11H_INTMASK_DONE_A;
+ }
+#endif
+ return irqstat;
+}
+
+static irqreturn_t sl811h_irq(struct usb_hcd *hcd, struct pt_regs *regs)
+{
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+ u8 irqstat;
+ irqreturn_t ret = IRQ_NONE;
+ unsigned retries = 5;
+
+ spin_lock(&sl811->lock);
+
+retry:
+ irqstat = sl811_read(sl811, SL11H_IRQ_STATUS) & ~SL11H_INTMASK_DP;
+ if (irqstat) {
+ sl811_write(sl811, SL11H_IRQ_STATUS, irqstat);
+ irqstat &= sl811->irq_enable;
+ }
+
+#ifdef QUIRK2
+ /* this may no longer be necessary ... */
+ if (irqstat == 0 && ret == IRQ_NONE) {
+ irqstat = checkdone(sl811);
+ if (irqstat /* && irq != ~0 */ )
+ sl811->stat_lost++;
+ }
+#endif
+
+ /* USB packets, not necessarily handled in the order they're
+ * issued ... that's fine if they're different endpoints.
+ */
+ if (irqstat & SL11H_INTMASK_DONE_A) {
+ done(sl811, sl811->active_a, SL811_EP_A(SL811_HOST_BUF), regs);
+ sl811->active_a = NULL;
+ sl811->stat_a++;
+ }
+#ifdef USE_B
+ if (irqstat & SL11H_INTMASK_DONE_B) {
+ done(sl811, sl811->active_b, SL811_EP_B(SL811_HOST_BUF), regs);
+ sl811->active_b = NULL;
+ sl811->stat_b++;
+ }
+#endif
+ if (irqstat & SL11H_INTMASK_SOFINTR) {
+ unsigned index;
+
+ index = sl811->frame++ % (PERIODIC_SIZE - 1);
+ sl811->stat_sof++;
+
+ /* be graceful about almost-inevitable periodic schedule
+ * overruns: continue the previous frame's transfers iff
+ * this one has nothing scheduled.
+ */
+ if (sl811->next_periodic) {
+ // ERR("overrun to slot %d\n", index);
+ sl811->stat_overrun++;
+ }
+ if (sl811->periodic[index])
+ sl811->next_periodic = sl811->periodic[index];
+ }
+
+ /* khubd manages debouncing and wakeup */
+ if (irqstat & SL11H_INTMASK_INSRMV) {
+ sl811->stat_insrmv++;
+
+ /* most stats are reset for each VBUS session */
+ sl811->stat_wake = 0;
+ sl811->stat_sof = 0;
+ sl811->stat_a = 0;
+ sl811->stat_b = 0;
+ sl811->stat_lost = 0;
+
+ sl811->ctrl1 = 0;
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+
+ sl811->irq_enable = SL11H_INTMASK_INSRMV;
+ sl811_write(sl811, SL11H_IRQ_ENABLE, sl811->irq_enable);
+
+ /* usbcore nukes other pending transactions on disconnect */
+ if (sl811->active_a) {
+ sl811_write(sl811, SL811_EP_A(SL11H_HOSTCTLREG), 0);
+ finish_request(sl811, sl811->active_a,
+ container_of(sl811->active_a->hep->urb_list.next,
+ struct urb, urb_list),
+ NULL, -ESHUTDOWN);
+ sl811->active_a = NULL;
+ }
+#ifdef USE_B
+ if (sl811->active_b) {
+ sl811_write(sl811, SL811_EP_B(SL11H_HOSTCTLREG), 0);
+ finish_request(sl811, sl811->active_b,
+ container_of(sl811->active_b->hep->urb_list.next,
+ struct urb, urb_list),
+ NULL, -ESHUTDOWN);
+ sl811->active_b = NULL;
+ }
+#endif
+
+ /* port status seems wierd until after reset, so
+ * force the reset and make khubd clean up later.
+ */
+ sl811->port1 |= (1 << USB_PORT_FEAT_C_CONNECTION)
+ | (1 << USB_PORT_FEAT_CONNECTION);
+
+ } else if (irqstat & SL11H_INTMASK_RD) {
+ if (sl811->port1 & (1 << USB_PORT_FEAT_SUSPEND)) {
+ DBG("wakeup\n");
+ sl811->port1 |= 1 << USB_PORT_FEAT_C_SUSPEND;
+ sl811->stat_wake++;
+ } else
+ irqstat &= ~SL11H_INTMASK_RD;
+ }
+
+ if (irqstat) {
+ if (sl811->port1 & (1 << USB_PORT_FEAT_ENABLE))
+ start_transfer(sl811);
+ ret = IRQ_HANDLED;
+ if (retries--)
+ goto retry;
+ }
+
+ if (sl811->periodic_count == 0 && list_empty(&sl811->async))
+ sofirq_off(sl811);
+ sl811_write(sl811, SL11H_IRQ_ENABLE, sl811->irq_enable);
+
+ spin_unlock(&sl811->lock);
+
+ return ret;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* usb 1.1 says max 90% of a frame is available for periodic transfers.
+ * this driver doesn't promise that much since it's got to handle an
+ * IRQ per packet; irq handling latencies also use up that time.
+ */
+#define MAX_PERIODIC_LOAD 500 /* out of 1000 usec */
+
+static int balance(struct sl811 *sl811, u16 period, u16 load)
+{
+ int i, branch = -ENOSPC;
+
+ /* search for the least loaded schedule branch of that period
+ * which has enough bandwidth left unreserved.
+ */
+ for (i = 0; i < period ; i++) {
+ if (branch < 0 || sl811->load[branch] > sl811->load[i]) {
+ int j;
+
+ for (j = i; j < PERIODIC_SIZE; j += period) {
+ if ((sl811->load[j] + load)
+ > MAX_PERIODIC_LOAD)
+ break;
+ }
+ if (j < PERIODIC_SIZE)
+ continue;
+ branch = i;
+ }
+ }
+ return branch;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int sl811h_urb_enqueue(
+ struct usb_hcd *hcd,
+ struct usb_host_endpoint *hep,
+ struct urb *urb,
+ int mem_flags
+) {
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+ struct usb_device *udev = urb->dev;
+ unsigned int pipe = urb->pipe;
+ int is_out = !usb_pipein(pipe);
+ int type = usb_pipetype(pipe);
+ int epnum = usb_pipeendpoint(pipe);
+ struct sl811h_ep *ep = NULL;
+ unsigned long flags;
+ int i;
+ int retval = 0;
+
+#ifdef DISABLE_ISO
+ if (type == PIPE_ISOCHRONOUS)
+ return -ENOSPC;
+#endif
+
+ /* avoid all allocations within spinlocks */
+ if (!hep->hcpriv)
+ ep = kcalloc(1, sizeof *ep, mem_flags);
+
+ spin_lock_irqsave(&sl811->lock, flags);
+
+ /* don't submit to a dead or disabled port */
+ if (!(sl811->port1 & (1 << USB_PORT_FEAT_ENABLE))
+ || !HC_IS_RUNNING(hcd->state)) {
+ retval = -ENODEV;
+ goto fail;
+ }
+
+ if (hep->hcpriv) {
+ kfree(ep);
+ ep = hep->hcpriv;
+ } else if (!ep) {
+ retval = -ENOMEM;
+ goto fail;
+
+ } else {
+ INIT_LIST_HEAD(&ep->schedule);
+ ep->udev = usb_get_dev(udev);
+ ep->epnum = epnum;
+ ep->maxpacket = usb_maxpacket(udev, urb->pipe, is_out);
+ ep->defctrl = SL11H_HCTLMASK_ARM | SL11H_HCTLMASK_ENABLE;
+ usb_settoggle(udev, epnum, is_out, 0);
+
+ if (type == PIPE_CONTROL)
+ ep->nextpid = USB_PID_SETUP;
+ else if (is_out)
+ ep->nextpid = USB_PID_OUT;
+ else
+ ep->nextpid = USB_PID_IN;
+
+ if (ep->maxpacket > H_MAXPACKET) {
+ /* iso packets up to 240 bytes could work... */
+ DBG("dev %d ep%d maxpacket %d\n",
+ udev->devnum, epnum, ep->maxpacket);
+ retval = -EINVAL;
+ goto fail;
+ }
+
+ if (udev->speed == USB_SPEED_LOW) {
+ /* send preamble for external hub? */
+ if (!(sl811->ctrl1 & SL11H_CTL1MASK_LSPD))
+ ep->defctrl |= SL11H_HCTLMASK_PREAMBLE;
+ }
+ switch (type) {
+ case PIPE_ISOCHRONOUS:
+ case PIPE_INTERRUPT:
+ if (urb->interval > PERIODIC_SIZE)
+ urb->interval = PERIODIC_SIZE;
+ ep->period = urb->interval;
+ ep->branch = PERIODIC_SIZE;
+ if (type == PIPE_ISOCHRONOUS)
+ ep->defctrl |= SL11H_HCTLMASK_ISOCH;
+ ep->load = usb_calc_bus_time(udev->speed, !is_out,
+ (type == PIPE_ISOCHRONOUS),
+ usb_maxpacket(udev, pipe, is_out))
+ / 1000;
+ break;
+ }
+
+ hep->hcpriv = ep;
+ }
+
+ /* maybe put endpoint into schedule */
+ switch (type) {
+ case PIPE_CONTROL:
+ case PIPE_BULK:
+ if (list_empty(&ep->schedule))
+ list_add_tail(&ep->schedule, &sl811->async);
+ break;
+ case PIPE_ISOCHRONOUS:
+ case PIPE_INTERRUPT:
+ urb->interval = ep->period;
+ if (ep->branch < PERIODIC_SIZE)
+ break;
+
+ retval = balance(sl811, ep->period, ep->load);
+ if (retval < 0)
+ goto fail;
+ ep->branch = retval;
+ retval = 0;
+ urb->start_frame = (sl811->frame & (PERIODIC_SIZE - 1))
+ + ep->branch;
+
+ /* sort each schedule branch by period (slow before fast)
+ * to share the faster parts of the tree without needing
+ * dummy/placeholder nodes
+ */
+ DBG("schedule qh%d/%p branch %d\n", ep->period, ep, ep->branch);
+ for (i = ep->branch; i < PERIODIC_SIZE; i += ep->period) {
+ struct sl811h_ep **prev = &sl811->periodic[i];
+ struct sl811h_ep *here = *prev;
+
+ while (here && ep != here) {
+ if (ep->period > here->period)
+ break;
+ prev = &here->next;
+ here = *prev;
+ }
+ if (ep != here) {
+ ep->next = here;
+ *prev = ep;
+ }
+ sl811->load[i] += ep->load;
+ }
+ sl811->periodic_count++;
+ hcd->self.bandwidth_allocated += ep->load / ep->period;
+ sofirq_on(sl811);
+ }
+
+ /* in case of unlink-during-submit */
+ spin_lock(&urb->lock);
+ if (urb->status != -EINPROGRESS) {
+ spin_unlock(&urb->lock);
+ finish_request(sl811, ep, urb, NULL, 0);
+ retval = 0;
+ goto fail;
+ }
+ urb->hcpriv = hep;
+ spin_unlock(&urb->lock);
+
+ start_transfer(sl811);
+ sl811_write(sl811, SL11H_IRQ_ENABLE, sl811->irq_enable);
+fail:
+ spin_unlock_irqrestore(&sl811->lock, flags);
+ return retval;
+}
+
+static int sl811h_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
+{
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+ struct usb_host_endpoint *hep = urb->hcpriv;
+ unsigned long flags;
+ struct sl811h_ep *ep;
+ int retval = 0;
+
+ if (!hep)
+ return -EINVAL;
+
+ spin_lock_irqsave(&sl811->lock, flags);
+ ep = hep->hcpriv;
+ if (ep) {
+ /* finish right away if this urb can't be active ...
+ * note that some drivers wrongly expect delays
+ */
+ if (ep->hep->urb_list.next != &urb->urb_list) {
+ /* not front of queue? never active */
+
+ /* for active transfers, we expect an IRQ */
+ } else if (sl811->active_a == ep) {
+ if (time_before_eq(sl811->jiffies_a, jiffies)) {
+ /* happens a lot with lowspeed?? */
+ DBG("giveup on DONE_A: ctrl %02x sts %02x\n",
+ sl811_read(sl811,
+ SL811_EP_A(SL11H_HOSTCTLREG)),
+ sl811_read(sl811,
+ SL811_EP_A(SL11H_PKTSTATREG)));
+ sl811_write(sl811, SL811_EP_A(SL11H_HOSTCTLREG),
+ 0);
+ sl811->active_a = NULL;
+ } else
+ urb = NULL;
+#ifdef USE_B
+ } else if (sl811->active_b == ep) {
+ if (time_before_eq(sl811->jiffies_a, jiffies)) {
+ /* happens a lot with lowspeed?? */
+ DBG("giveup on DONE_B: ctrl %02x sts %02x\n",
+ sl811_read(sl811,
+ SL811_EP_B(SL11H_HOSTCTLREG)),
+ sl811_read(sl811,
+ SL811_EP_B(SL11H_PKTSTATREG)));
+ sl811_write(sl811, SL811_EP_B(SL11H_HOSTCTLREG),
+ 0);
+ sl811->active_b = NULL;
+ } else
+ urb = NULL;
+#endif
+ } else {
+ /* front of queue for inactive endpoint */
+ }
+
+ if (urb)
+ finish_request(sl811, ep, urb, NULL, 0);
+ else
+ VDBG("dequeue, urb %p active %s; wait4irq\n", urb,
+ (sl811->active_a == ep) ? "A" : "B");
+ } else
+ retval = -EINVAL;
+ spin_unlock_irqrestore(&sl811->lock, flags);
+ return retval;
+}
+
+static void
+sl811h_endpoint_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep)
+{
+ struct sl811h_ep *ep = hep->hcpriv;
+
+ if (!ep)
+ return;
+
+ /* assume we'd just wait for the irq */
+ if (!list_empty(&hep->urb_list))
+ msleep(3);
+ if (!list_empty(&hep->urb_list))
+ WARN("ep %p not empty?\n", ep);
+
+ usb_put_dev(ep->udev);
+ kfree(ep);
+ hep->hcpriv = NULL;
+}
+
+static int
+sl811h_get_frame(struct usb_hcd *hcd)
+{
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+
+ /* wrong except while periodic transfers are scheduled;
+ * never matches the on-the-wire frame;
+ * subject to overruns.
+ */
+ return sl811->frame;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* the virtual root hub timer IRQ checks for hub status */
+static int
+sl811h_hub_status_data(struct usb_hcd *hcd, char *buf)
+{
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+#ifdef QUIRK3
+ unsigned long flags;
+
+ /* non-SMP HACK: use root hub timer as i/o watchdog
+ * this seems essential when SOF IRQs aren't in use...
+ */
+ local_irq_save(flags);
+ if (!timer_pending(&sl811->timer)) {
+ if (sl811h_irq( /* ~0, */ hcd, NULL) != IRQ_NONE)
+ sl811->stat_lost++;
+ }
+ local_irq_restore(flags);
+#endif
+
+ if (!(sl811->port1 & (0xffff << 16)))
+ return 0;
+
+ /* tell khubd port 1 changed */
+ *buf = (1 << 1);
+ return 1;
+}
+
+static void
+sl811h_hub_descriptor (
+ struct sl811 *sl811,
+ struct usb_hub_descriptor *desc
+) {
+ u16 temp = 0;
+
+ desc->bDescriptorType = 0x29;
+ desc->bHubContrCurrent = 0;
+
+ desc->bNbrPorts = 1;
+ desc->bDescLength = 9;
+
+ /* per-port power switching (gang of one!), or none */
+ desc->bPwrOn2PwrGood = 0;
+ if (sl811->board && sl811->board->port_power) {
+ desc->bPwrOn2PwrGood = sl811->board->potpg;
+ if (!desc->bPwrOn2PwrGood)
+ desc->bPwrOn2PwrGood = 10;
+ temp = 0x0001;
+ } else
+ temp = 0x0002;
+
+ /* no overcurrent errors detection/handling */
+ temp |= 0x0010;
+
+ desc->wHubCharacteristics = (__force __u16)cpu_to_le16(temp);
+
+ /* two bitmaps: ports removable, and legacy PortPwrCtrlMask */
+ desc->bitmap[0] = 1 << 1;
+ desc->bitmap[1] = ~0;
+}
+
+static void
+sl811h_timer(unsigned long _sl811)
+{
+ struct sl811 *sl811 = (void *) _sl811;
+ unsigned long flags;
+ u8 irqstat;
+ u8 signaling = sl811->ctrl1 & SL11H_CTL1MASK_FORCE;
+ const u32 mask = (1 << USB_PORT_FEAT_CONNECTION)
+ | (1 << USB_PORT_FEAT_ENABLE)
+ | (1 << USB_PORT_FEAT_LOWSPEED);
+
+ spin_lock_irqsave(&sl811->lock, flags);
+
+ /* stop special signaling */
+ sl811->ctrl1 &= ~SL11H_CTL1MASK_FORCE;
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+ udelay(3);
+
+ irqstat = sl811_read(sl811, SL11H_IRQ_STATUS);
+
+ switch (signaling) {
+ case SL11H_CTL1MASK_SE0:
+ DBG("end reset\n");
+ sl811->port1 = (1 << USB_PORT_FEAT_C_RESET)
+ | (1 << USB_PORT_FEAT_POWER);
+ sl811->ctrl1 = 0;
+ /* don't wrongly ack RD */
+ if (irqstat & SL11H_INTMASK_INSRMV)
+ irqstat &= ~SL11H_INTMASK_RD;
+ break;
+ case SL11H_CTL1MASK_K:
+ DBG("end resume\n");
+ sl811->port1 &= ~(1 << USB_PORT_FEAT_SUSPEND);
+ break;
+ default:
+ DBG("odd timer signaling: %02x\n", signaling);
+ break;
+ }
+ sl811_write(sl811, SL11H_IRQ_STATUS, irqstat);
+
+ if (irqstat & SL11H_INTMASK_RD) {
+ /* usbcore nukes all pending transactions on disconnect */
+ if (sl811->port1 & (1 << USB_PORT_FEAT_CONNECTION))
+ sl811->port1 |= (1 << USB_PORT_FEAT_C_CONNECTION)
+ | (1 << USB_PORT_FEAT_C_ENABLE);
+ sl811->port1 &= ~mask;
+ sl811->irq_enable = SL11H_INTMASK_INSRMV;
+ } else {
+ sl811->port1 |= mask;
+ if (irqstat & SL11H_INTMASK_DP)
+ sl811->port1 &= ~(1 << USB_PORT_FEAT_LOWSPEED);
+ sl811->irq_enable = SL11H_INTMASK_INSRMV | SL11H_INTMASK_RD;
+ }
+
+ if (sl811->port1 & (1 << USB_PORT_FEAT_CONNECTION)) {
+ u8 ctrl2 = SL811HS_CTL2_INIT;
+
+ sl811->irq_enable |= SL11H_INTMASK_DONE_A;
+#ifdef USE_B
+ sl811->irq_enable |= SL11H_INTMASK_DONE_B;
+#endif
+ if (sl811->port1 & (1 << USB_PORT_FEAT_LOWSPEED)) {
+ sl811->ctrl1 |= SL11H_CTL1MASK_LSPD;
+ ctrl2 |= SL811HS_CTL2MASK_DSWAP;
+ }
+
+ /* start SOFs flowing, kickstarting with A registers */
+ sl811->ctrl1 |= SL11H_CTL1MASK_SOF_ENA;
+ sl811_write(sl811, SL11H_SOFLOWREG, 0xe0);
+ sl811_write(sl811, SL811HS_CTLREG2, ctrl2);
+
+ /* autoincrementing */
+ sl811_write(sl811, SL811_EP_A(SL11H_BUFLNTHREG), 0);
+ writeb(SL_SOF, sl811->data_reg);
+ writeb(0, sl811->data_reg);
+ sl811_write(sl811, SL811_EP_A(SL11H_HOSTCTLREG),
+ SL11H_HCTLMASK_ARM);
+
+ /* khubd provides debounce delay */
+ } else {
+ sl811->ctrl1 = 0;
+ }
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+
+ /* reenable irqs */
+ sl811_write(sl811, SL11H_IRQ_ENABLE, sl811->irq_enable);
+ spin_unlock_irqrestore(&sl811->lock, flags);
+}
+
+static int
+sl811h_hub_control(
+ struct usb_hcd *hcd,
+ u16 typeReq,
+ u16 wValue,
+ u16 wIndex,
+ char *buf,
+ u16 wLength
+) {
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+ int retval = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave(&sl811->lock, flags);
+
+ switch (typeReq) {
+ case ClearHubFeature:
+ case SetHubFeature:
+ switch (wValue) {
+ case C_HUB_OVER_CURRENT:
+ case C_HUB_LOCAL_POWER:
+ break;
+ default:
+ goto error;
+ }
+ break;
+ case ClearPortFeature:
+ if (wIndex != 1 || wLength != 0)
+ goto error;
+
+ switch (wValue) {
+ case USB_PORT_FEAT_ENABLE:
+ sl811->port1 &= (1 << USB_PORT_FEAT_POWER);
+ sl811->ctrl1 = 0;
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+ sl811->irq_enable = SL11H_INTMASK_INSRMV;
+ sl811_write(sl811, SL11H_IRQ_ENABLE,
+ sl811->irq_enable);
+ break;
+ case USB_PORT_FEAT_SUSPEND:
+ if (!(sl811->port1 & (1 << USB_PORT_FEAT_SUSPEND)))
+ break;
+
+ /* 20 msec of resume/K signaling, other irqs blocked */
+ DBG("start resume...\n");
+ sl811->irq_enable = 0;
+ sl811_write(sl811, SL11H_IRQ_ENABLE,
+ sl811->irq_enable);
+ sl811->ctrl1 |= SL11H_CTL1MASK_K;
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+
+ mod_timer(&sl811->timer, jiffies
+ + msecs_to_jiffies(20));
+ break;
+ case USB_PORT_FEAT_POWER:
+ port_power(sl811, 0);
+ break;
+ case USB_PORT_FEAT_C_ENABLE:
+ case USB_PORT_FEAT_C_SUSPEND:
+ case USB_PORT_FEAT_C_CONNECTION:
+ case USB_PORT_FEAT_C_OVER_CURRENT:
+ case USB_PORT_FEAT_C_RESET:
+ break;
+ default:
+ goto error;
+ }
+ sl811->port1 &= ~(1 << wValue);
+ break;
+ case GetHubDescriptor:
+ sl811h_hub_descriptor(sl811, (struct usb_hub_descriptor *) buf);
+ break;
+ case GetHubStatus:
+ *(__le32 *) buf = cpu_to_le32(0);
+ break;
+ case GetPortStatus:
+ if (wIndex != 1)
+ goto error;
+ *(__le32 *) buf = cpu_to_le32(sl811->port1);
+
+#ifndef VERBOSE
+ if (*(u16*)(buf+2)) /* only if wPortChange is interesting */
+#endif
+ DBG("GetPortStatus %08x\n", sl811->port1);
+ break;
+ case SetPortFeature:
+ if (wIndex != 1 || wLength != 0)
+ goto error;
+ switch (wValue) {
+ case USB_PORT_FEAT_SUSPEND:
+ if (sl811->port1 & (1 << USB_PORT_FEAT_RESET))
+ goto error;
+ if (!(sl811->port1 & (1 << USB_PORT_FEAT_ENABLE)))
+ goto error;
+
+ DBG("suspend...\n");
+ sl811->ctrl1 &= ~SL11H_CTL1MASK_SOF_ENA;
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+ break;
+ case USB_PORT_FEAT_POWER:
+ port_power(sl811, 1);
+ break;
+ case USB_PORT_FEAT_RESET:
+ if (sl811->port1 & (1 << USB_PORT_FEAT_SUSPEND))
+ goto error;
+ if (!(sl811->port1 & (1 << USB_PORT_FEAT_POWER)))
+ break;
+
+ /* 50 msec of reset/SE0 signaling, irqs blocked */
+ sl811->irq_enable = 0;
+ sl811_write(sl811, SL11H_IRQ_ENABLE,
+ sl811->irq_enable);
+ sl811->ctrl1 = SL11H_CTL1MASK_SE0;
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+ sl811->port1 |= (1 << USB_PORT_FEAT_RESET);
+ mod_timer(&sl811->timer, jiffies
+ + msecs_to_jiffies(50));
+ break;
+ default:
+ goto error;
+ }
+ sl811->port1 |= 1 << wValue;
+ break;
+
+ default:
+error:
+ /* "protocol stall" on error */
+ retval = -EPIPE;
+ }
+
+ spin_unlock_irqrestore(&sl811->lock, flags);
+ return retval;
+}
+
+#ifdef CONFIG_PM
+
+static int
+sl811h_hub_suspend(struct usb_hcd *hcd)
+{
+ // SOFs off
+ DBG("%s\n", __FUNCTION__);
+ return 0;
+}
+
+static int
+sl811h_hub_resume(struct usb_hcd *hcd)
+{
+ // SOFs on
+ DBG("%s\n", __FUNCTION__);
+ return 0;
+}
+
+#else
+
+#define sl811h_hub_suspend NULL
+#define sl811h_hub_resume NULL
+
+#endif
+
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef STUB_DEBUG_FILE
+
+static inline void create_debug_file(struct sl811 *sl811) { }
+static inline void remove_debug_file(struct sl811 *sl811) { }
+
+#else
+
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+static void dump_irq(struct seq_file *s, char *label, u8 mask)
+{
+ seq_printf(s, "%s %02x%s%s%s%s%s%s\n", label, mask,
+ (mask & SL11H_INTMASK_DONE_A) ? " done_a" : "",
+ (mask & SL11H_INTMASK_DONE_B) ? " done_b" : "",
+ (mask & SL11H_INTMASK_SOFINTR) ? " sof" : "",
+ (mask & SL11H_INTMASK_INSRMV) ? " ins/rmv" : "",
+ (mask & SL11H_INTMASK_RD) ? " rd" : "",
+ (mask & SL11H_INTMASK_DP) ? " dp" : "");
+}
+
+static int proc_sl811h_show(struct seq_file *s, void *unused)
+{
+ struct sl811 *sl811 = s->private;
+ struct sl811h_ep *ep;
+ unsigned i;
+
+ seq_printf(s, "%s\n%s version %s\nportstatus[1] = %08x\n",
+ sl811_to_hcd(sl811)->product_desc,
+ hcd_name, DRIVER_VERSION,
+ sl811->port1);
+
+ seq_printf(s, "insert/remove: %ld\n", sl811->stat_insrmv);
+ seq_printf(s, "current session: done_a %ld done_b %ld "
+ "wake %ld sof %ld overrun %ld lost %ld\n\n",
+ sl811->stat_a, sl811->stat_b,
+ sl811->stat_wake, sl811->stat_sof,
+ sl811->stat_overrun, sl811->stat_lost);
+
+ spin_lock_irq(&sl811->lock);
+
+ if (sl811->ctrl1 & SL11H_CTL1MASK_SUSPEND)
+ seq_printf(s, "(suspended)\n\n");
+ else {
+ u8 t = sl811_read(sl811, SL11H_CTLREG1);
+
+ seq_printf(s, "ctrl1 %02x%s%s%s%s\n", t,
+ (t & SL11H_CTL1MASK_SOF_ENA) ? " sofgen" : "",
+ ({char *s; switch (t & SL11H_CTL1MASK_FORCE) {
+ case SL11H_CTL1MASK_NORMAL: s = ""; break;
+ case SL11H_CTL1MASK_SE0: s = " se0/reset"; break;
+ case SL11H_CTL1MASK_K: s = " k/resume"; break;
+ default: s = "j"; break;
+ }; s; }),
+ (t & SL11H_CTL1MASK_LSPD) ? " lowspeed" : "",
+ (t & SL11H_CTL1MASK_SUSPEND) ? " suspend" : "");
+
+ dump_irq(s, "irq_enable",
+ sl811_read(sl811, SL11H_IRQ_ENABLE));
+ dump_irq(s, "irq_status",
+ sl811_read(sl811, SL11H_IRQ_STATUS));
+ seq_printf(s, "frame clocks remaining: %d\n",
+ sl811_read(sl811, SL11H_SOFTMRREG) << 6);
+ }
+
+ seq_printf(s, "A: qh%p ctl %02x sts %02x\n", sl811->active_a,
+ sl811_read(sl811, SL811_EP_A(SL11H_HOSTCTLREG)),
+ sl811_read(sl811, SL811_EP_A(SL11H_PKTSTATREG)));
+ seq_printf(s, "B: qh%p ctl %02x sts %02x\n", sl811->active_b,
+ sl811_read(sl811, SL811_EP_B(SL11H_HOSTCTLREG)),
+ sl811_read(sl811, SL811_EP_B(SL11H_PKTSTATREG)));
+ seq_printf(s, "\n");
+ list_for_each_entry (ep, &sl811->async, schedule) {
+ struct urb *urb;
+
+ seq_printf(s, "%s%sqh%p, ep%d%s, maxpacket %d"
+ " nak %d err %d\n",
+ (ep == sl811->active_a) ? "(A) " : "",
+ (ep == sl811->active_b) ? "(B) " : "",
+ ep, ep->epnum,
+ ({ char *s; switch (ep->nextpid) {
+ case USB_PID_IN: s = "in"; break;
+ case USB_PID_OUT: s = "out"; break;
+ case USB_PID_SETUP: s = "setup"; break;
+ case USB_PID_ACK: s = "status"; break;
+ default: s = "?"; break;
+ }; s;}),
+ ep->maxpacket,
+ ep->nak_count, ep->error_count);
+ list_for_each_entry (urb, &ep->hep->urb_list, urb_list) {
+ seq_printf(s, " urb%p, %d/%d\n", urb,
+ urb->actual_length,
+ urb->transfer_buffer_length);
+ }
+ }
+ if (!list_empty(&sl811->async))
+ seq_printf(s, "\n");
+
+ seq_printf(s, "periodic size= %d\n", PERIODIC_SIZE);
+
+ for (i = 0; i < PERIODIC_SIZE; i++) {
+ ep = sl811->periodic[i];
+ if (!ep)
+ continue;
+ seq_printf(s, "%2d [%3d]:\n", i, sl811->load[i]);
+
+ /* DUMB: prints shared entries multiple times */
+ do {
+ seq_printf(s,
+ " %s%sqh%d/%p (%sdev%d ep%d%s max %d) "
+ "err %d\n",
+ (ep == sl811->active_a) ? "(A) " : "",
+ (ep == sl811->active_b) ? "(B) " : "",
+ ep->period, ep,
+ (ep->udev->speed == USB_SPEED_FULL)
+ ? "" : "ls ",
+ ep->udev->devnum, ep->epnum,
+ (ep->epnum == 0) ? ""
+ : ((ep->nextpid == USB_PID_IN)
+ ? "in"
+ : "out"),
+ ep->maxpacket, ep->error_count);
+ ep = ep->next;
+ } while (ep);
+ }
+
+ spin_unlock_irq(&sl811->lock);
+ seq_printf(s, "\n");
+
+ return 0;
+}
+
+static int proc_sl811h_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, proc_sl811h_show, PDE(inode)->data);
+}
+
+static struct file_operations proc_ops = {
+ .open = proc_sl811h_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+/* expect just one sl811 per system */
+static const char proc_filename[] = "driver/sl811h";
+
+static void create_debug_file(struct sl811 *sl811)
+{
+ struct proc_dir_entry *pde;
+
+ pde = create_proc_entry(proc_filename, 0, NULL);
+ if (pde == NULL)
+ return;
+
+ pde->proc_fops = &proc_ops;
+ pde->data = sl811;
+ sl811->pde = pde;
+}
+
+static void remove_debug_file(struct sl811 *sl811)
+{
+ if (sl811->pde)
+ remove_proc_entry(proc_filename, NULL);
+}
+
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+static void
+sl811h_stop(struct usb_hcd *hcd)
+{
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+ unsigned long flags;
+
+ del_timer_sync(&hcd->rh_timer);
+
+ spin_lock_irqsave(&sl811->lock, flags);
+ port_power(sl811, 0);
+ spin_unlock_irqrestore(&sl811->lock, flags);
+}
+
+static int
+sl811h_start(struct usb_hcd *hcd)
+{
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+ struct usb_device *udev;
+
+ /* chip has been reset, VBUS power is off */
+
+ udev = usb_alloc_dev(NULL, &hcd->self, 0);
+ if (!udev)
+ return -ENOMEM;
+
+ udev->speed = USB_SPEED_FULL;
+ hcd->state = HC_STATE_RUNNING;
+
+ if (sl811->board)
+ hcd->can_wakeup = sl811->board->can_wakeup;
+
+ if (usb_hcd_register_root_hub(udev, hcd) != 0) {
+ usb_put_dev(udev);
+ sl811h_stop(hcd);
+ return -ENODEV;
+ }
+
+ if (sl811->board && sl811->board->power)
+ hub_set_power_budget(udev, sl811->board->power * 2);
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct hc_driver sl811h_hc_driver = {
+ .description = hcd_name,
+ .hcd_priv_size = sizeof(struct sl811),
+
+ /*
+ * generic hardware linkage
+ */
+ .irq = sl811h_irq,
+ .flags = HCD_USB11 | HCD_MEMORY,
+
+ /* Basic lifecycle operations */
+ .start = sl811h_start,
+ .stop = sl811h_stop,
+
+ /*
+ * managing i/o requests and associated device resources
+ */
+ .urb_enqueue = sl811h_urb_enqueue,
+ .urb_dequeue = sl811h_urb_dequeue,
+ .endpoint_disable = sl811h_endpoint_disable,
+
+ /*
+ * periodic schedule support
+ */
+ .get_frame_number = sl811h_get_frame,
+
+ /*
+ * root hub support
+ */
+ .hub_status_data = sl811h_hub_status_data,
+ .hub_control = sl811h_hub_control,
+ .hub_suspend = sl811h_hub_suspend,
+ .hub_resume = sl811h_hub_resume,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int __init_or_module
+sl811h_remove(struct device *dev)
+{
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+ struct platform_device *pdev;
+ struct resource *res;
+
+ pdev = container_of(dev, struct platform_device, dev);
+
+ remove_debug_file(sl811);
+ usb_remove_hcd(hcd);
+
+ iounmap(sl811->data_reg);
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+ release_mem_region(res->start, 1);
+
+ iounmap(sl811->addr_reg);
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ release_mem_region(res->start, 1);
+
+ usb_put_hcd(hcd);
+ return 0;
+}
+
+#define resource_len(r) (((r)->end - (r)->start) + 1)
+
+static int __init
+sl811h_probe(struct device *dev)
+{
+ struct usb_hcd *hcd;
+ struct sl811 *sl811;
+ struct platform_device *pdev;
+ struct resource *addr, *data;
+ int irq;
+ void __iomem *addr_reg;
+ void __iomem *data_reg;
+ int retval;
+ u8 tmp;
+
+ /* basic sanity checks first. board-specific init logic should
+ * have initialized these three resources and probably board
+ * specific platform_data. we don't probe for IRQs, and do only
+ * minimal sanity checking.
+ */
+ pdev = container_of(dev, struct platform_device, dev);
+ if (pdev->num_resources < 3)
+ return -ENODEV;
+
+ addr = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ data = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+ irq = platform_get_irq(pdev, 0);
+ if (!addr || !data || irq < 0)
+ return -ENODEV;
+
+ /* refuse to confuse usbcore */
+ if (dev->dma_mask) {
+ DBG("no we won't dma\n");
+ return -EINVAL;
+ }
+
+ if (!request_mem_region(addr->start, 1, hcd_name)) {
+ retval = -EBUSY;
+ goto err1;
+ }
+ addr_reg = ioremap(addr->start, resource_len(addr));
+ if (addr_reg == NULL) {
+ retval = -ENOMEM;
+ goto err2;
+ }
+
+ if (!request_mem_region(data->start, 1, hcd_name)) {
+ retval = -EBUSY;
+ goto err3;
+ }
+ data_reg = ioremap(data->start, resource_len(addr));
+ if (data_reg == NULL) {
+ retval = -ENOMEM;
+ goto err4;
+ }
+
+ /* allocate and initialize hcd */
+ hcd = usb_create_hcd(&sl811h_hc_driver, dev, dev->bus_id);
+ if (!hcd) {
+ retval = -ENOMEM;
+ goto err5;
+ }
+ hcd->rsrc_start = addr->start;
+ sl811 = hcd_to_sl811(hcd);
+
+ spin_lock_init(&sl811->lock);
+ INIT_LIST_HEAD(&sl811->async);
+ sl811->board = dev->platform_data;
+ init_timer(&sl811->timer);
+ sl811->timer.function = sl811h_timer;
+ sl811->timer.data = (unsigned long) sl811;
+ sl811->addr_reg = addr_reg;
+ sl811->data_reg = data_reg;
+
+ spin_lock_irq(&sl811->lock);
+ port_power(sl811, 0);
+ spin_unlock_irq(&sl811->lock);
+ msleep(200);
+
+ tmp = sl811_read(sl811, SL11H_HWREVREG);
+ switch (tmp >> 4) {
+ case 1:
+ hcd->product_desc = "SL811HS v1.2";
+ break;
+ case 2:
+ hcd->product_desc = "SL811HS v1.5";
+ break;
+ default:
+ /* reject case 0, SL11S is less functional */
+ DBG("chiprev %02x\n", tmp);
+ retval = -ENXIO;
+ goto err6;
+ }
+
+ /* sl811s would need a different handler for this irq */
+#ifdef CONFIG_ARM
+ /* Cypress docs say the IRQ is IRQT_HIGH ... */
+ set_irq_type(irq, IRQT_RISING);
+#endif
+ retval = usb_add_hcd(hcd, irq, SA_INTERRUPT);
+ if (retval != 0)
+ goto err6;
+
+ create_debug_file(sl811);
+ return retval;
+
+ err6:
+ usb_put_hcd(hcd);
+ err5:
+ iounmap(data_reg);
+ err4:
+ release_mem_region(data->start, 1);
+ err3:
+ iounmap(addr_reg);
+ err2:
+ release_mem_region(addr->start, 1);
+ err1:
+ DBG("init error, %d\n", retval);
+ return retval;
+}
+
+#ifdef CONFIG_PM
+
+/* for this device there's no useful distinction between the controller
+ * and its root hub, except that the root hub only gets direct PM calls
+ * when CONFIG_USB_SUSPEND is enabled.
+ */
+
+static int
+sl811h_suspend(struct device *dev, pm_message_t state, u32 phase)
+{
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+ int retval = 0;
+
+ if (phase != SUSPEND_POWER_DOWN)
+ return retval;
+
+ if (state <= PM_SUSPEND_MEM)
+ retval = sl811h_hub_suspend(hcd);
+ else
+ port_power(sl811, 0);
+ if (retval == 0)
+ dev->power.power_state = state;
+ return retval;
+}
+
+static int
+sl811h_resume(struct device *dev, u32 phase)
+{
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+ struct sl811 *sl811 = hcd_to_sl811(hcd);
+
+ if (phase != RESUME_POWER_ON)
+ return 0;
+
+ /* with no "check to see if VBUS is still powered" board hook,
+ * let's assume it'd only be powered to enable remote wakeup.
+ */
+ if (dev->power.power_state > PM_SUSPEND_MEM
+ || !hcd->can_wakeup) {
+ sl811->port1 = 0;
+ port_power(sl811, 1);
+ return 0;
+ }
+
+ dev->power.power_state = PMSG_ON;
+ return sl811h_hub_resume(hcd);
+}
+
+#else
+
+#define sl811h_suspend NULL
+#define sl811h_resume NULL
+
+#endif
+
+
+static struct device_driver sl811h_driver = {
+ .name = (char *) hcd_name,
+ .bus = &platform_bus_type,
+
+ .probe = sl811h_probe,
+ .remove = sl811h_remove,
+
+ .suspend = sl811h_suspend,
+ .resume = sl811h_resume,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int __init sl811h_init(void)
+{
+ if (usb_disabled())
+ return -ENODEV;
+
+ INFO("driver %s, %s\n", hcd_name, DRIVER_VERSION);
+ return driver_register(&sl811h_driver);
+}
+module_init(sl811h_init);
+
+static void __exit sl811h_cleanup(void)
+{
+ driver_unregister(&sl811h_driver);
+}
+module_exit(sl811h_cleanup);
diff --git a/drivers/usb/host/sl811.h b/drivers/usb/host/sl811.h
new file mode 100644
index 000000000000..7690d98e42a7
--- /dev/null
+++ b/drivers/usb/host/sl811.h
@@ -0,0 +1,266 @@
+/*
+ * SL811HS register declarations and HCD data structures
+ *
+ * Copyright (C) 2004 Psion Teklogix
+ * Copyright (C) 2004 David Brownell
+ * Copyright (C) 2001 Cypress Semiconductor Inc.
+ */
+
+/*
+ * SL811HS has transfer registers, and control registers. In host/master
+ * mode one set of registers is used; in peripheral/slave mode, another.
+ * - SL11H only has some "A" transfer registers from 0x00-0x04
+ * - SL811HS also has "B" registers from 0x08-0x0c
+ * - SL811S (or HS in slave mode) has four A+B sets, at 00, 10, 20, 30
+ */
+
+#define SL811_EP_A(base) ((base) + 0)
+#define SL811_EP_B(base) ((base) + 8)
+
+#define SL811_HOST_BUF 0x00
+#define SL811_PERIPH_EP0 0x00
+#define SL811_PERIPH_EP1 0x10
+#define SL811_PERIPH_EP2 0x20
+#define SL811_PERIPH_EP3 0x30
+
+
+/* TRANSFER REGISTERS: host and peripheral sides are similar
+ * except for the control models (master vs slave).
+ */
+#define SL11H_HOSTCTLREG 0
+# define SL11H_HCTLMASK_ARM 0x01
+# define SL11H_HCTLMASK_ENABLE 0x02
+# define SL11H_HCTLMASK_IN 0x00
+# define SL11H_HCTLMASK_OUT 0x04
+# define SL11H_HCTLMASK_ISOCH 0x10
+# define SL11H_HCTLMASK_AFTERSOF 0x20
+# define SL11H_HCTLMASK_TOGGLE 0x40
+# define SL11H_HCTLMASK_PREAMBLE 0x80
+#define SL11H_BUFADDRREG 1
+#define SL11H_BUFLNTHREG 2
+#define SL11H_PKTSTATREG 3 /* read */
+# define SL11H_STATMASK_ACK 0x01
+# define SL11H_STATMASK_ERROR 0x02
+# define SL11H_STATMASK_TMOUT 0x04
+# define SL11H_STATMASK_SEQ 0x08
+# define SL11H_STATMASK_SETUP 0x10
+# define SL11H_STATMASK_OVF 0x20
+# define SL11H_STATMASK_NAK 0x40
+# define SL11H_STATMASK_STALL 0x80
+#define SL11H_PIDEPREG 3 /* write */
+# define SL_SETUP 0xd0
+# define SL_IN 0x90
+# define SL_OUT 0x10
+# define SL_SOF 0x50
+# define SL_PREAMBLE 0xc0
+# define SL_NAK 0xa0
+# define SL_STALL 0xe0
+# define SL_DATA0 0x30
+# define SL_DATA1 0xb0
+#define SL11H_XFERCNTREG 4 /* read */
+#define SL11H_DEVADDRREG 4 /* write */
+
+
+/* CONTROL REGISTERS: host and peripheral are very different.
+ */
+#define SL11H_CTLREG1 5
+# define SL11H_CTL1MASK_SOF_ENA 0x01
+# define SL11H_CTL1MASK_FORCE 0x18
+# define SL11H_CTL1MASK_NORMAL 0x00
+# define SL11H_CTL1MASK_SE0 0x08 /* reset */
+# define SL11H_CTL1MASK_J 0x10
+# define SL11H_CTL1MASK_K 0x18 /* resume */
+# define SL11H_CTL1MASK_LSPD 0x20
+# define SL11H_CTL1MASK_SUSPEND 0x40
+#define SL11H_IRQ_ENABLE 6
+# define SL11H_INTMASK_DONE_A 0x01
+# define SL11H_INTMASK_DONE_B 0x02
+# define SL11H_INTMASK_SOFINTR 0x10
+# define SL11H_INTMASK_INSRMV 0x20 /* to/from SE0 */
+# define SL11H_INTMASK_RD 0x40
+# define SL11H_INTMASK_DP 0x80 /* only in INTSTATREG */
+#define SL11S_ADDRESS 7
+
+/* 0x08-0x0c are for the B buffer (not in SL11) */
+
+#define SL11H_IRQ_STATUS 0x0D /* write to ack */
+#define SL11H_HWREVREG 0x0E /* read */
+# define SL11H_HWRMASK_HWREV 0xF0
+#define SL11H_SOFLOWREG 0x0E /* write */
+#define SL11H_SOFTMRREG 0x0F /* read */
+
+/* a write to this register enables SL811HS features.
+ * HOST flag presumably overrides the chip input signal?
+ */
+#define SL811HS_CTLREG2 0x0F
+# define SL811HS_CTL2MASK_SOF_MASK 0x3F
+# define SL811HS_CTL2MASK_DSWAP 0x40
+# define SL811HS_CTL2MASK_HOST 0x80
+
+#define SL811HS_CTL2_INIT (SL811HS_CTL2MASK_HOST | 0x2e)
+
+
+/* DATA BUFFERS: registers from 0x10..0xff are for data buffers;
+ * that's 240 bytes, which we'll split evenly between A and B sides.
+ * Only ISO can use more than 64 bytes per packet.
+ * (The SL11S has 0x40..0xff for buffers.)
+ */
+#define H_MAXPACKET 120 /* bytes in A or B fifos */
+
+#define SL11H_DATA_START 0x10
+#define SL811HS_PACKET_BUF(is_a) ((is_a) \
+ ? SL11H_DATA_START \
+ : (SL11H_DATA_START + H_MAXPACKET))
+
+/*-------------------------------------------------------------------------*/
+
+#define LOG2_PERIODIC_SIZE 5 /* arbitrary; this matches OHCI */
+#define PERIODIC_SIZE (1 << LOG2_PERIODIC_SIZE)
+
+struct sl811 {
+ spinlock_t lock;
+ void __iomem *addr_reg;
+ void __iomem *data_reg;
+ struct sl811_platform_data *board;
+ struct proc_dir_entry *pde;
+
+ unsigned long stat_insrmv;
+ unsigned long stat_wake;
+ unsigned long stat_sof;
+ unsigned long stat_a;
+ unsigned long stat_b;
+ unsigned long stat_lost;
+ unsigned long stat_overrun;
+
+ /* sw model */
+ struct timer_list timer;
+ struct sl811h_ep *next_periodic;
+ struct sl811h_ep *next_async;
+
+ struct sl811h_ep *active_a;
+ unsigned long jiffies_a;
+ struct sl811h_ep *active_b;
+ unsigned long jiffies_b;
+
+ u32 port1;
+ u8 ctrl1, ctrl2, irq_enable;
+ u16 frame;
+
+ /* async schedule: control, bulk */
+ struct list_head async;
+
+ /* periodic schedule: interrupt, iso */
+ u16 load[PERIODIC_SIZE];
+ struct sl811h_ep *periodic[PERIODIC_SIZE];
+ unsigned periodic_count;
+};
+
+static inline struct sl811 *hcd_to_sl811(struct usb_hcd *hcd)
+{
+ return (struct sl811 *) (hcd->hcd_priv);
+}
+
+static inline struct usb_hcd *sl811_to_hcd(struct sl811 *sl811)
+{
+ return container_of((void *) sl811, struct usb_hcd, hcd_priv);
+}
+
+struct sl811h_ep {
+ struct usb_host_endpoint *hep;
+ struct usb_device *udev;
+
+ u8 defctrl;
+ u8 maxpacket;
+ u8 epnum;
+ u8 nextpid;
+
+ u16 error_count;
+ u16 nak_count;
+ u16 length; /* of current packet */
+
+ /* periodic schedule */
+ u16 period;
+ u16 branch;
+ u16 load;
+ struct sl811h_ep *next;
+
+ /* async schedule */
+ struct list_head schedule;
+};
+
+/*-------------------------------------------------------------------------*/
+
+/* These register utilities should work for the SL811S register API too
+ * NOTE: caller must hold sl811->lock.
+ */
+
+static inline u8 sl811_read(struct sl811 *sl811, int reg)
+{
+ writeb(reg, sl811->addr_reg);
+ return readb(sl811->data_reg);
+}
+
+static inline void sl811_write(struct sl811 *sl811, int reg, u8 val)
+{
+ writeb(reg, sl811->addr_reg);
+ writeb(val, sl811->data_reg);
+}
+
+static inline void
+sl811_write_buf(struct sl811 *sl811, int addr, const void *buf, size_t count)
+{
+ const u8 *data;
+ void __iomem *data_reg;
+
+ if (!count)
+ return;
+ writeb(addr, sl811->addr_reg);
+
+ data = buf;
+ data_reg = sl811->data_reg;
+ do {
+ writeb(*data++, data_reg);
+ } while (--count);
+}
+
+static inline void
+sl811_read_buf(struct sl811 *sl811, int addr, void *buf, size_t count)
+{
+ u8 *data;
+ void __iomem *data_reg;
+
+ if (!count)
+ return;
+ writeb(addr, sl811->addr_reg);
+
+ data = buf;
+ data_reg = sl811->data_reg;
+ do {
+ *data++ = readb(data_reg);
+ } while (--count);
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef DEBUG
+#define DBG(stuff...) printk(KERN_DEBUG "sl811: " stuff)
+#else
+#define DBG(stuff...) do{}while(0)
+#endif
+
+#ifdef VERBOSE
+# define VDBG DBG
+#else
+# define VDBG(stuff...) do{}while(0)
+#endif
+
+#ifdef PACKET_TRACE
+# define PACKET VDBG
+#else
+# define PACKET(stuff...) do{}while(0)
+#endif
+
+#define ERR(stuff...) printk(KERN_ERR "sl811: " stuff)
+#define WARN(stuff...) printk(KERN_WARNING "sl811: " stuff)
+#define INFO(stuff...) printk(KERN_INFO "sl811: " stuff)
+
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c
new file mode 100644
index 000000000000..24c73c5a3435
--- /dev/null
+++ b/drivers/usb/host/uhci-debug.c
@@ -0,0 +1,587 @@
+/*
+ * UHCI-specific debugging code. Invaluable when something
+ * goes wrong, but don't get in my face.
+ *
+ * Kernel visible pointers are surrounded in []'s and bus
+ * visible pointers are surrounded in ()'s
+ *
+ * (C) Copyright 1999 Linus Torvalds
+ * (C) Copyright 1999-2001 Johannes Erdfelt
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/debugfs.h>
+#include <linux/smp_lock.h>
+#include <asm/io.h>
+
+#include "uhci-hcd.h"
+
+static struct dentry *uhci_debugfs_root = NULL;
+
+/* Handle REALLY large printk's so we don't overflow buffers */
+static inline void lprintk(char *buf)
+{
+ char *p;
+
+ /* Just write one line at a time */
+ while (buf) {
+ p = strchr(buf, '\n');
+ if (p)
+ *p = 0;
+ printk(KERN_DEBUG "%s\n", buf);
+ buf = p;
+ if (buf)
+ buf++;
+ }
+}
+
+static int uhci_show_td(struct uhci_td *td, char *buf, int len, int space)
+{
+ char *out = buf;
+ char *spid;
+ u32 status, token;
+
+ /* Try to make sure there's enough memory */
+ if (len < 160)
+ return 0;
+
+ status = td_status(td);
+ out += sprintf(out, "%*s[%p] link (%08x) ", space, "", td, le32_to_cpu(td->link));
+ out += sprintf(out, "e%d %s%s%s%s%s%s%s%s%s%sLength=%x ",
+ ((status >> 27) & 3),
+ (status & TD_CTRL_SPD) ? "SPD " : "",
+ (status & TD_CTRL_LS) ? "LS " : "",
+ (status & TD_CTRL_IOC) ? "IOC " : "",
+ (status & TD_CTRL_ACTIVE) ? "Active " : "",
+ (status & TD_CTRL_STALLED) ? "Stalled " : "",
+ (status & TD_CTRL_DBUFERR) ? "DataBufErr " : "",
+ (status & TD_CTRL_BABBLE) ? "Babble " : "",
+ (status & TD_CTRL_NAK) ? "NAK " : "",
+ (status & TD_CTRL_CRCTIMEO) ? "CRC/Timeo " : "",
+ (status & TD_CTRL_BITSTUFF) ? "BitStuff " : "",
+ status & 0x7ff);
+
+ token = td_token(td);
+ switch (uhci_packetid(token)) {
+ case USB_PID_SETUP:
+ spid = "SETUP";
+ break;
+ case USB_PID_OUT:
+ spid = "OUT";
+ break;
+ case USB_PID_IN:
+ spid = "IN";
+ break;
+ default:
+ spid = "?";
+ break;
+ }
+
+ out += sprintf(out, "MaxLen=%x DT%d EndPt=%x Dev=%x, PID=%x(%s) ",
+ token >> 21,
+ ((token >> 19) & 1),
+ (token >> 15) & 15,
+ (token >> 8) & 127,
+ (token & 0xff),
+ spid);
+ out += sprintf(out, "(buf=%08x)\n", le32_to_cpu(td->buffer));
+
+ return out - buf;
+}
+
+static int uhci_show_qh(struct uhci_qh *qh, char *buf, int len, int space)
+{
+ char *out = buf;
+ struct urb_priv *urbp;
+ struct list_head *head, *tmp;
+ struct uhci_td *td;
+ int i = 0, checked = 0, prevactive = 0;
+ __le32 element = qh_element(qh);
+
+ /* Try to make sure there's enough memory */
+ if (len < 80 * 6)
+ return 0;
+
+ out += sprintf(out, "%*s[%p] link (%08x) element (%08x)\n", space, "",
+ qh, le32_to_cpu(qh->link), le32_to_cpu(element));
+
+ if (element & UHCI_PTR_QH)
+ out += sprintf(out, "%*s Element points to QH (bug?)\n", space, "");
+
+ if (element & UHCI_PTR_DEPTH)
+ out += sprintf(out, "%*s Depth traverse\n", space, "");
+
+ if (element & cpu_to_le32(8))
+ out += sprintf(out, "%*s Bit 3 set (bug?)\n", space, "");
+
+ if (!(element & ~(UHCI_PTR_QH | UHCI_PTR_DEPTH)))
+ out += sprintf(out, "%*s Element is NULL (bug?)\n", space, "");
+
+ if (!qh->urbp) {
+ out += sprintf(out, "%*s urbp == NULL\n", space, "");
+ goto out;
+ }
+
+ urbp = qh->urbp;
+
+ head = &urbp->td_list;
+ tmp = head->next;
+
+ td = list_entry(tmp, struct uhci_td, list);
+
+ if (cpu_to_le32(td->dma_handle) != (element & ~UHCI_PTR_BITS))
+ out += sprintf(out, "%*s Element != First TD\n", space, "");
+
+ while (tmp != head) {
+ struct uhci_td *td = list_entry(tmp, struct uhci_td, list);
+
+ tmp = tmp->next;
+
+ out += sprintf(out, "%*s%d: ", space + 2, "", i++);
+ out += uhci_show_td(td, out, len - (out - buf), 0);
+
+ if (i > 10 && !checked && prevactive && tmp != head &&
+ debug <= 2) {
+ struct list_head *ntmp = tmp;
+ struct uhci_td *ntd = td;
+ int active = 1, ni = i;
+
+ checked = 1;
+
+ while (ntmp != head && ntmp->next != head && active) {
+ ntd = list_entry(ntmp, struct uhci_td, list);
+
+ ntmp = ntmp->next;
+
+ active = td_status(ntd) & TD_CTRL_ACTIVE;
+
+ ni++;
+ }
+
+ if (active && ni > i) {
+ out += sprintf(out, "%*s[skipped %d active TD's]\n", space, "", ni - i);
+ tmp = ntmp;
+ td = ntd;
+ i = ni;
+ }
+ }
+
+ prevactive = td_status(td) & TD_CTRL_ACTIVE;
+ }
+
+ if (list_empty(&urbp->queue_list) || urbp->queued)
+ goto out;
+
+ out += sprintf(out, "%*sQueued QH's:\n", -space, "--");
+
+ head = &urbp->queue_list;
+ tmp = head->next;
+
+ while (tmp != head) {
+ struct urb_priv *nurbp = list_entry(tmp, struct urb_priv,
+ queue_list);
+ tmp = tmp->next;
+
+ out += uhci_show_qh(nurbp->qh, out, len - (out - buf), space);
+ }
+
+out:
+ return out - buf;
+}
+
+#define show_frame_num() \
+ if (!shown) { \
+ shown = 1; \
+ out += sprintf(out, "- Frame %d\n", i); \
+ }
+
+#ifdef CONFIG_PROC_FS
+static const char *qh_names[] = {
+ "skel_int128_qh", "skel_int64_qh",
+ "skel_int32_qh", "skel_int16_qh",
+ "skel_int8_qh", "skel_int4_qh",
+ "skel_int2_qh", "skel_int1_qh",
+ "skel_ls_control_qh", "skel_fs_control_qh",
+ "skel_bulk_qh", "skel_term_qh"
+};
+
+#define show_qh_name() \
+ if (!shown) { \
+ shown = 1; \
+ out += sprintf(out, "- %s\n", qh_names[i]); \
+ }
+
+static int uhci_show_sc(int port, unsigned short status, char *buf, int len)
+{
+ char *out = buf;
+
+ /* Try to make sure there's enough memory */
+ if (len < 160)
+ return 0;
+
+ out += sprintf(out, " stat%d = %04x %s%s%s%s%s%s%s%s%s%s\n",
+ port,
+ status,
+ (status & USBPORTSC_SUSP) ? " Suspend" : "",
+ (status & USBPORTSC_OCC) ? " OverCurrentChange" : "",
+ (status & USBPORTSC_OC) ? " OverCurrent" : "",
+ (status & USBPORTSC_PR) ? " Reset" : "",
+ (status & USBPORTSC_LSDA) ? " LowSpeed" : "",
+ (status & USBPORTSC_RD) ? " ResumeDetect" : "",
+ (status & USBPORTSC_PEC) ? " EnableChange" : "",
+ (status & USBPORTSC_PE) ? " Enabled" : "",
+ (status & USBPORTSC_CSC) ? " ConnectChange" : "",
+ (status & USBPORTSC_CCS) ? " Connected" : "");
+
+ return out - buf;
+}
+
+static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len)
+{
+ char *out = buf;
+ unsigned long io_addr = uhci->io_addr;
+ unsigned short usbcmd, usbstat, usbint, usbfrnum;
+ unsigned int flbaseadd;
+ unsigned char sof;
+ unsigned short portsc1, portsc2;
+
+ /* Try to make sure there's enough memory */
+ if (len < 80 * 6)
+ return 0;
+
+ usbcmd = inw(io_addr + 0);
+ usbstat = inw(io_addr + 2);
+ usbint = inw(io_addr + 4);
+ usbfrnum = inw(io_addr + 6);
+ flbaseadd = inl(io_addr + 8);
+ sof = inb(io_addr + 12);
+ portsc1 = inw(io_addr + 16);
+ portsc2 = inw(io_addr + 18);
+
+ out += sprintf(out, " usbcmd = %04x %s%s%s%s%s%s%s%s\n",
+ usbcmd,
+ (usbcmd & USBCMD_MAXP) ? "Maxp64 " : "Maxp32 ",
+ (usbcmd & USBCMD_CF) ? "CF " : "",
+ (usbcmd & USBCMD_SWDBG) ? "SWDBG " : "",
+ (usbcmd & USBCMD_FGR) ? "FGR " : "",
+ (usbcmd & USBCMD_EGSM) ? "EGSM " : "",
+ (usbcmd & USBCMD_GRESET) ? "GRESET " : "",
+ (usbcmd & USBCMD_HCRESET) ? "HCRESET " : "",
+ (usbcmd & USBCMD_RS) ? "RS " : "");
+
+ out += sprintf(out, " usbstat = %04x %s%s%s%s%s%s\n",
+ usbstat,
+ (usbstat & USBSTS_HCH) ? "HCHalted " : "",
+ (usbstat & USBSTS_HCPE) ? "HostControllerProcessError " : "",
+ (usbstat & USBSTS_HSE) ? "HostSystemError " : "",
+ (usbstat & USBSTS_RD) ? "ResumeDetect " : "",
+ (usbstat & USBSTS_ERROR) ? "USBError " : "",
+ (usbstat & USBSTS_USBINT) ? "USBINT " : "");
+
+ out += sprintf(out, " usbint = %04x\n", usbint);
+ out += sprintf(out, " usbfrnum = (%d)%03x\n", (usbfrnum >> 10) & 1,
+ 0xfff & (4*(unsigned int)usbfrnum));
+ out += sprintf(out, " flbaseadd = %08x\n", flbaseadd);
+ out += sprintf(out, " sof = %02x\n", sof);
+ out += uhci_show_sc(1, portsc1, out, len - (out - buf));
+ out += uhci_show_sc(2, portsc2, out, len - (out - buf));
+
+ return out - buf;
+}
+
+static int uhci_show_urbp(struct uhci_hcd *uhci, struct urb_priv *urbp, char *buf, int len)
+{
+ struct list_head *tmp;
+ char *out = buf;
+ int count = 0;
+
+ if (len < 200)
+ return 0;
+
+ out += sprintf(out, "urb_priv [%p] ", urbp);
+ out += sprintf(out, "urb [%p] ", urbp->urb);
+ out += sprintf(out, "qh [%p] ", urbp->qh);
+ out += sprintf(out, "Dev=%d ", usb_pipedevice(urbp->urb->pipe));
+ out += sprintf(out, "EP=%x(%s) ", usb_pipeendpoint(urbp->urb->pipe), (usb_pipein(urbp->urb->pipe) ? "IN" : "OUT"));
+
+ switch (usb_pipetype(urbp->urb->pipe)) {
+ case PIPE_ISOCHRONOUS: out += sprintf(out, "ISO "); break;
+ case PIPE_INTERRUPT: out += sprintf(out, "INT "); break;
+ case PIPE_BULK: out += sprintf(out, "BLK "); break;
+ case PIPE_CONTROL: out += sprintf(out, "CTL "); break;
+ }
+
+ out += sprintf(out, "%s", (urbp->fsbr ? "FSBR " : ""));
+ out += sprintf(out, "%s", (urbp->fsbr_timeout ? "FSBR_TO " : ""));
+
+ if (urbp->urb->status != -EINPROGRESS)
+ out += sprintf(out, "Status=%d ", urbp->urb->status);
+ //out += sprintf(out, "Inserttime=%lx ",urbp->inserttime);
+ //out += sprintf(out, "FSBRtime=%lx ",urbp->fsbrtime);
+
+ count = 0;
+ list_for_each(tmp, &urbp->td_list)
+ count++;
+ out += sprintf(out, "TDs=%d ",count);
+
+ if (urbp->queued)
+ out += sprintf(out, "queued\n");
+ else {
+ count = 0;
+ list_for_each(tmp, &urbp->queue_list)
+ count++;
+ out += sprintf(out, "queued URBs=%d\n", count);
+ }
+
+ return out - buf;
+}
+
+static int uhci_show_lists(struct uhci_hcd *uhci, char *buf, int len)
+{
+ char *out = buf;
+ struct list_head *head, *tmp;
+ int count;
+
+ out += sprintf(out, "Main list URBs:");
+ if (list_empty(&uhci->urb_list))
+ out += sprintf(out, " Empty\n");
+ else {
+ out += sprintf(out, "\n");
+ count = 0;
+ head = &uhci->urb_list;
+ tmp = head->next;
+ while (tmp != head) {
+ struct urb_priv *urbp = list_entry(tmp, struct urb_priv, urb_list);
+
+ out += sprintf(out, " %d: ", ++count);
+ out += uhci_show_urbp(uhci, urbp, out, len - (out - buf));
+ tmp = tmp->next;
+ }
+ }
+
+ out += sprintf(out, "Remove list URBs:");
+ if (list_empty(&uhci->urb_remove_list))
+ out += sprintf(out, " Empty\n");
+ else {
+ out += sprintf(out, "\n");
+ count = 0;
+ head = &uhci->urb_remove_list;
+ tmp = head->next;
+ while (tmp != head) {
+ struct urb_priv *urbp = list_entry(tmp, struct urb_priv, urb_list);
+
+ out += sprintf(out, " %d: ", ++count);
+ out += uhci_show_urbp(uhci, urbp, out, len - (out - buf));
+ tmp = tmp->next;
+ }
+ }
+
+ out += sprintf(out, "Complete list URBs:");
+ if (list_empty(&uhci->complete_list))
+ out += sprintf(out, " Empty\n");
+ else {
+ out += sprintf(out, "\n");
+ count = 0;
+ head = &uhci->complete_list;
+ tmp = head->next;
+ while (tmp != head) {
+ struct urb_priv *urbp = list_entry(tmp, struct urb_priv, urb_list);
+
+ out += sprintf(out, " %d: ", ++count);
+ out += uhci_show_urbp(uhci, urbp, out, len - (out - buf));
+ tmp = tmp->next;
+ }
+ }
+
+ return out - buf;
+}
+
+static int uhci_sprint_schedule(struct uhci_hcd *uhci, char *buf, int len)
+{
+ unsigned long flags;
+ char *out = buf;
+ int i, j;
+ struct uhci_qh *qh;
+ struct uhci_td *td;
+ struct list_head *tmp, *head;
+
+ spin_lock_irqsave(&uhci->lock, flags);
+
+ out += sprintf(out, "HC status\n");
+ out += uhci_show_status(uhci, out, len - (out - buf));
+
+ out += sprintf(out, "Frame List\n");
+ for (i = 0; i < UHCI_NUMFRAMES; ++i) {
+ int shown = 0;
+ td = uhci->fl->frame_cpu[i];
+ if (!td)
+ continue;
+
+ if (td->dma_handle != (dma_addr_t)uhci->fl->frame[i]) {
+ show_frame_num();
+ out += sprintf(out, " frame list does not match td->dma_handle!\n");
+ }
+ show_frame_num();
+
+ head = &td->fl_list;
+ tmp = head;
+ do {
+ td = list_entry(tmp, struct uhci_td, fl_list);
+ tmp = tmp->next;
+ out += uhci_show_td(td, out, len - (out - buf), 4);
+ } while (tmp != head);
+ }
+
+ out += sprintf(out, "Skeleton QH's\n");
+
+ for (i = 0; i < UHCI_NUM_SKELQH; ++i) {
+ int shown = 0;
+
+ qh = uhci->skelqh[i];
+
+ if (debug > 1) {
+ show_qh_name();
+ out += uhci_show_qh(qh, out, len - (out - buf), 4);
+ }
+
+ /* Last QH is the Terminating QH, it's different */
+ if (i == UHCI_NUM_SKELQH - 1) {
+ if (qh->link != UHCI_PTR_TERM)
+ out += sprintf(out, " bandwidth reclamation on!\n");
+
+ if (qh_element(qh) != cpu_to_le32(uhci->term_td->dma_handle))
+ out += sprintf(out, " skel_term_qh element is not set to term_td!\n");
+
+ continue;
+ }
+
+ j = (i < 7) ? 7 : i+1; /* Next skeleton */
+ if (list_empty(&qh->list)) {
+ if (i < UHCI_NUM_SKELQH - 1) {
+ if (qh->link !=
+ (cpu_to_le32(uhci->skelqh[j]->dma_handle) | UHCI_PTR_QH)) {
+ show_qh_name();
+ out += sprintf(out, " skeleton QH not linked to next skeleton QH!\n");
+ }
+ }
+
+ continue;
+ }
+
+ show_qh_name();
+
+ head = &qh->list;
+ tmp = head->next;
+
+ while (tmp != head) {
+ qh = list_entry(tmp, struct uhci_qh, list);
+
+ tmp = tmp->next;
+
+ out += uhci_show_qh(qh, out, len - (out - buf), 4);
+ }
+
+ if (i < UHCI_NUM_SKELQH - 1) {
+ if (qh->link !=
+ (cpu_to_le32(uhci->skelqh[j]->dma_handle) | UHCI_PTR_QH))
+ out += sprintf(out, " last QH not linked to next skeleton!\n");
+ }
+ }
+
+ if (debug > 2)
+ out += uhci_show_lists(uhci, out, len - (out - buf));
+
+ spin_unlock_irqrestore(&uhci->lock, flags);
+
+ return out - buf;
+}
+
+#define MAX_OUTPUT (64 * 1024)
+
+struct uhci_debug {
+ int size;
+ char *data;
+ struct uhci_hcd *uhci;
+};
+
+static int uhci_debug_open(struct inode *inode, struct file *file)
+{
+ struct uhci_hcd *uhci = inode->u.generic_ip;
+ struct uhci_debug *up;
+ int ret = -ENOMEM;
+
+ lock_kernel();
+ up = kmalloc(sizeof(*up), GFP_KERNEL);
+ if (!up)
+ goto out;
+
+ up->data = kmalloc(MAX_OUTPUT, GFP_KERNEL);
+ if (!up->data) {
+ kfree(up);
+ goto out;
+ }
+
+ up->size = uhci_sprint_schedule(uhci, up->data, MAX_OUTPUT);
+
+ file->private_data = up;
+
+ ret = 0;
+out:
+ unlock_kernel();
+ return ret;
+}
+
+static loff_t uhci_debug_lseek(struct file *file, loff_t off, int whence)
+{
+ struct uhci_debug *up;
+ loff_t new = -1;
+
+ lock_kernel();
+ up = file->private_data;
+
+ switch (whence) {
+ case 0:
+ new = off;
+ break;
+ case 1:
+ new = file->f_pos + off;
+ break;
+ }
+ if (new < 0 || new > up->size) {
+ unlock_kernel();
+ return -EINVAL;
+ }
+ unlock_kernel();
+ return (file->f_pos = new);
+}
+
+static ssize_t uhci_debug_read(struct file *file, char __user *buf,
+ size_t nbytes, loff_t *ppos)
+{
+ struct uhci_debug *up = file->private_data;
+ return simple_read_from_buffer(buf, nbytes, ppos, up->data, up->size);
+}
+
+static int uhci_debug_release(struct inode *inode, struct file *file)
+{
+ struct uhci_debug *up = file->private_data;
+
+ kfree(up->data);
+ kfree(up);
+
+ return 0;
+}
+
+static struct file_operations uhci_debug_operations = {
+ .open = uhci_debug_open,
+ .llseek = uhci_debug_lseek,
+ .read = uhci_debug_read,
+ .release = uhci_debug_release,
+};
+
+#else /* CONFIG_DEBUG_FS */
+
+#define uhci_debug_operations (* (struct file_operations *) NULL)
+
+#endif
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
new file mode 100644
index 000000000000..324a1a9bbdb2
--- /dev/null
+++ b/drivers/usb/host/uhci-hcd.c
@@ -0,0 +1,919 @@
+/*
+ * Universal Host Controller Interface driver for USB.
+ *
+ * Maintainer: Alan Stern <stern@rowland.harvard.edu>
+ *
+ * (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
+ * (C) Copyright 1999 Thomas Sailer, sailer@ife.ee.ethz.ch
+ * (C) Copyright 1999 Roman Weissgaerber, weissg@vienna.at
+ * (C) Copyright 2000 Yggdrasil Computing, Inc. (port of new PCI interface
+ * support from usb-ohci.c by Adam Richter, adam@yggdrasil.com).
+ * (C) Copyright 1999 Gregory P. Smith (from usb-ohci.c)
+ * (C) Copyright 2004 Alan Stern, stern@rowland.harvard.edu
+ *
+ * Intel documents this fairly well, and as far as I know there
+ * are no royalties or anything like that, but even so there are
+ * people who decided that they want to do the same thing in a
+ * completely different way.
+ *
+ * WARNING! The USB documentation is downright evil. Most of it
+ * is just crap, written by a committee. You're better off ignoring
+ * most of it, the important stuff is:
+ * - the low-level protocol (fairly simple but lots of small details)
+ * - working around the horridness of the rest
+ */
+
+#include <linux/config.h>
+#ifdef CONFIG_USB_DEBUG
+#define DEBUG
+#else
+#undef DEBUG
+#endif
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/unistd.h>
+#include <linux/interrupt.h>
+#include <linux/spinlock.h>
+#include <linux/debugfs.h>
+#include <linux/pm.h>
+#include <linux/dmapool.h>
+#include <linux/dma-mapping.h>
+#include <linux/usb.h>
+#include <linux/bitops.h>
+
+#include <asm/uaccess.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+
+#include "../core/hcd.h"
+#include "uhci-hcd.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v2.2"
+#define DRIVER_AUTHOR "Linus 'Frodo Rabbit' Torvalds, Johannes Erdfelt, \
+Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber, \
+Alan Stern"
+#define DRIVER_DESC "USB Universal Host Controller Interface driver"
+
+/*
+ * debug = 0, no debugging messages
+ * debug = 1, dump failed URB's except for stalls
+ * debug = 2, dump all failed URB's (including stalls)
+ * show all queues in /debug/uhci/[pci_addr]
+ * debug = 3, show all TD's in URB's when dumping
+ */
+#ifdef DEBUG
+static int debug = 1;
+#else
+static int debug = 0;
+#endif
+module_param(debug, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug level");
+static char *errbuf;
+#define ERRBUF_LEN (32 * 1024)
+
+static kmem_cache_t *uhci_up_cachep; /* urb_priv */
+
+static void uhci_get_current_frame_number(struct uhci_hcd *uhci);
+static void hc_state_transitions(struct uhci_hcd *uhci);
+
+/* If a transfer is still active after this much time, turn off FSBR */
+#define IDLE_TIMEOUT msecs_to_jiffies(50)
+#define FSBR_DELAY msecs_to_jiffies(50)
+
+/* 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
+
+#include "uhci-hub.c"
+#include "uhci-debug.c"
+#include "uhci-q.c"
+
+static int init_stall_timer(struct usb_hcd *hcd);
+
+static void stall_callback(unsigned long ptr)
+{
+ struct usb_hcd *hcd = (struct usb_hcd *)ptr;
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ struct urb_priv *up;
+ unsigned long flags;
+
+ spin_lock_irqsave(&uhci->lock, flags);
+ uhci_scan_schedule(uhci, NULL);
+
+ list_for_each_entry(up, &uhci->urb_list, urb_list) {
+ struct urb *u = up->urb;
+
+ 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);
+
+ spin_unlock(&u->lock);
+ }
+
+ /* 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;
+ }
+
+ /* Poll for and perform state transitions */
+ hc_state_transitions(uhci);
+ if (unlikely(uhci->suspended_ports && uhci->state != UHCI_SUSPENDED))
+ uhci_check_ports(uhci);
+
+ init_stall_timer(hcd);
+ spin_unlock_irqrestore(&uhci->lock, flags);
+}
+
+static int init_stall_timer(struct usb_hcd *hcd)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+
+ init_timer(&uhci->stall_timer);
+ uhci->stall_timer.function = stall_callback;
+ uhci->stall_timer.data = (unsigned long)hcd;
+ uhci->stall_timer.expires = jiffies + msecs_to_jiffies(100);
+ add_timer(&uhci->stall_timer);
+
+ return 0;
+}
+
+static irqreturn_t uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ unsigned long io_addr = uhci->io_addr;
+ unsigned short status;
+
+ /*
+ * Read the interrupt status, and write it back to clear the
+ * interrupt cause. Contrary to the UHCI specification, the
+ * "HC Halted" status bit is persistent: it is RO, not R/WC.
+ */
+ status = inw(io_addr + USBSTS);
+ if (!(status & ~USBSTS_HCH)) /* shared interrupt, not mine */
+ return IRQ_NONE;
+ outw(status, io_addr + USBSTS); /* Clear it */
+
+ if (status & ~(USBSTS_USBINT | USBSTS_ERROR | USBSTS_RD)) {
+ if (status & USBSTS_HSE)
+ dev_err(uhci_dev(uhci), "host system error, "
+ "PCI problems?\n");
+ if (status & USBSTS_HCPE)
+ dev_err(uhci_dev(uhci), "host controller process "
+ "error, something bad happened!\n");
+ if ((status & USBSTS_HCH) && uhci->state > 0) {
+ dev_err(uhci_dev(uhci), "host controller halted, "
+ "very bad!\n");
+ /* FIXME: Reset the controller, fix the offending TD */
+ }
+ }
+
+ if (status & USBSTS_RD)
+ uhci->resume_detect = 1;
+
+ spin_lock(&uhci->lock);
+ uhci_scan_schedule(uhci, regs);
+ spin_unlock(&uhci->lock);
+
+ return IRQ_HANDLED;
+}
+
+static void reset_hc(struct uhci_hcd *uhci)
+{
+ unsigned long io_addr = uhci->io_addr;
+
+ /* Turn off PIRQ, SMI, and all interrupts. This also turns off
+ * the BIOS's USB Legacy Support.
+ */
+ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
+ outw(0, uhci->io_addr + USBINTR);
+
+ /* Global reset for 50ms */
+ uhci->state = UHCI_RESET;
+ outw(USBCMD_GRESET, io_addr + USBCMD);
+ msleep(50);
+ outw(0, io_addr + USBCMD);
+
+ /* Another 10ms delay */
+ msleep(10);
+ uhci->resume_detect = 0;
+ uhci->is_stopped = UHCI_IS_STOPPED;
+}
+
+static void suspend_hc(struct uhci_hcd *uhci)
+{
+ unsigned long io_addr = uhci->io_addr;
+
+ dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
+ uhci->state = UHCI_SUSPENDED;
+ uhci->resume_detect = 0;
+ outw(USBCMD_EGSM, io_addr + USBCMD);
+
+ /* FIXME: Wait for the controller to actually stop */
+ uhci_get_current_frame_number(uhci);
+ uhci->is_stopped = UHCI_IS_STOPPED;
+
+ uhci_scan_schedule(uhci, NULL);
+}
+
+static void wakeup_hc(struct uhci_hcd *uhci)
+{
+ unsigned long io_addr = uhci->io_addr;
+
+ switch (uhci->state) {
+ case UHCI_SUSPENDED: /* Start the resume */
+ dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
+
+ /* Global resume for >= 20ms */
+ outw(USBCMD_FGR | USBCMD_EGSM, io_addr + USBCMD);
+ uhci->state = UHCI_RESUMING_1;
+ uhci->state_end = jiffies + msecs_to_jiffies(20);
+ uhci->is_stopped = 0;
+ break;
+
+ case UHCI_RESUMING_1: /* End global resume */
+ uhci->state = UHCI_RESUMING_2;
+ outw(0, io_addr + USBCMD);
+ /* Falls through */
+
+ case UHCI_RESUMING_2: /* Wait for EOP to be sent */
+ if (inw(io_addr + USBCMD) & USBCMD_FGR)
+ break;
+
+ /* Run for at least 1 second, and
+ * mark it configured with a 64-byte max packet */
+ uhci->state = UHCI_RUNNING_GRACE;
+ uhci->state_end = jiffies + HZ;
+ outw(USBCMD_RS | USBCMD_CF | USBCMD_MAXP,
+ io_addr + USBCMD);
+ break;
+
+ case UHCI_RUNNING_GRACE: /* Now allowed to suspend */
+ uhci->state = UHCI_RUNNING;
+ break;
+
+ default:
+ break;
+ }
+}
+
+static int ports_active(struct uhci_hcd *uhci)
+{
+ unsigned long io_addr = uhci->io_addr;
+ int connection = 0;
+ int i;
+
+ for (i = 0; i < uhci->rh_numports; i++)
+ connection |= (inw(io_addr + USBPORTSC1 + i * 2) & USBPORTSC_CCS);
+
+ return connection;
+}
+
+static int suspend_allowed(struct uhci_hcd *uhci)
+{
+ unsigned long io_addr = uhci->io_addr;
+ int i;
+
+ if (to_pci_dev(uhci_dev(uhci))->vendor != PCI_VENDOR_ID_INTEL)
+ return 1;
+
+ /* Some of Intel's USB controllers have a bug that causes false
+ * resume indications if any port has an over current condition.
+ * To prevent problems, we will not allow a global suspend if
+ * any ports are OC.
+ *
+ * Some motherboards using Intel's chipsets (but not using all
+ * the USB ports) appear to hardwire the over current inputs active
+ * to disable the USB ports.
+ */
+
+ /* check for over current condition on any port */
+ for (i = 0; i < uhci->rh_numports; i++) {
+ if (inw(io_addr + USBPORTSC1 + i * 2) & USBPORTSC_OC)
+ return 0;
+ }
+
+ return 1;
+}
+
+static void hc_state_transitions(struct uhci_hcd *uhci)
+{
+ switch (uhci->state) {
+ case UHCI_RUNNING:
+
+ /* global suspend if nothing connected for 1 second */
+ if (!ports_active(uhci) && suspend_allowed(uhci)) {
+ uhci->state = UHCI_SUSPENDING_GRACE;
+ uhci->state_end = jiffies + HZ;
+ }
+ break;
+
+ case UHCI_SUSPENDING_GRACE:
+ if (ports_active(uhci))
+ uhci->state = UHCI_RUNNING;
+ else if (time_after_eq(jiffies, uhci->state_end))
+ suspend_hc(uhci);
+ break;
+
+ case UHCI_SUSPENDED:
+
+ /* wakeup if requested by a device */
+ if (uhci->resume_detect)
+ wakeup_hc(uhci);
+ break;
+
+ case UHCI_RESUMING_1:
+ case UHCI_RESUMING_2:
+ case UHCI_RUNNING_GRACE:
+ if (time_after_eq(jiffies, uhci->state_end))
+ wakeup_hc(uhci);
+ break;
+
+ default:
+ break;
+ }
+}
+
+/*
+ * Store the current frame number in uhci->frame_number if the controller
+ * is runnning
+ */
+static void uhci_get_current_frame_number(struct uhci_hcd *uhci)
+{
+ if (!uhci->is_stopped)
+ uhci->frame_number = inw(uhci->io_addr + USBFRNUM);
+}
+
+static int start_hc(struct uhci_hcd *uhci)
+{
+ unsigned long io_addr = uhci->io_addr;
+ int timeout = 10;
+
+ /*
+ * Reset the HC - this will force us to get a
+ * new notification of any already connected
+ * ports due to the virtual disconnect that it
+ * implies.
+ */
+ outw(USBCMD_HCRESET, io_addr + USBCMD);
+ while (inw(io_addr + USBCMD) & USBCMD_HCRESET) {
+ if (--timeout < 0) {
+ dev_err(uhci_dev(uhci), "USBCMD_HCRESET timed out!\n");
+ return -ETIMEDOUT;
+ }
+ msleep(1);
+ }
+
+ /* Mark controller as running before we enable interrupts */
+ uhci_to_hcd(uhci)->state = HC_STATE_RUNNING;
+
+ /* Turn on PIRQ and all interrupts */
+ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
+ USBLEGSUP_DEFAULT);
+ outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC | USBINTR_SP,
+ io_addr + USBINTR);
+
+ /* Start at frame 0 */
+ outw(0, io_addr + USBFRNUM);
+ outl(uhci->fl->dma_handle, io_addr + USBFLBASEADD);
+
+ /* Run and mark it configured with a 64-byte max packet */
+ uhci->state = UHCI_RUNNING_GRACE;
+ uhci->state_end = jiffies + HZ;
+ outw(USBCMD_RS | USBCMD_CF | USBCMD_MAXP, io_addr + USBCMD);
+ uhci->is_stopped = 0;
+
+ return 0;
+}
+
+/*
+ * De-allocate all resources
+ */
+static void release_uhci(struct uhci_hcd *uhci)
+{
+ int i;
+
+ for (i = 0; i < UHCI_NUM_SKELQH; i++)
+ if (uhci->skelqh[i]) {
+ uhci_free_qh(uhci, uhci->skelqh[i]);
+ uhci->skelqh[i] = NULL;
+ }
+
+ if (uhci->term_td) {
+ uhci_free_td(uhci, uhci->term_td);
+ uhci->term_td = NULL;
+ }
+
+ if (uhci->qh_pool) {
+ dma_pool_destroy(uhci->qh_pool);
+ uhci->qh_pool = NULL;
+ }
+
+ if (uhci->td_pool) {
+ dma_pool_destroy(uhci->td_pool);
+ uhci->td_pool = NULL;
+ }
+
+ if (uhci->fl) {
+ dma_free_coherent(uhci_dev(uhci), sizeof(*uhci->fl),
+ uhci->fl, uhci->fl->dma_handle);
+ uhci->fl = NULL;
+ }
+
+ if (uhci->dentry) {
+ debugfs_remove(uhci->dentry);
+ uhci->dentry = NULL;
+ }
+}
+
+static int uhci_reset(struct usb_hcd *hcd)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+
+ uhci->io_addr = (unsigned long) hcd->rsrc_start;
+
+ /* Kick BIOS off this hardware and reset, so we won't get
+ * interrupts from any previous setup.
+ */
+ reset_hc(uhci);
+ return 0;
+}
+
+/*
+ * Allocate a frame list, and then setup the skeleton
+ *
+ * The hardware doesn't really know any difference
+ * in the queues, but the order does matter for the
+ * protocols higher up. The order is:
+ *
+ * - any isochronous events handled before any
+ * of the queues. We don't do that here, because
+ * we'll create the actual TD entries on demand.
+ * - The first queue is the interrupt queue.
+ * - The second queue is the control queue, split into low- and full-speed
+ * - The third queue is bulk queue.
+ * - The fourth queue is the bandwidth reclamation queue, which loops back
+ * to the full-speed control queue.
+ */
+static int uhci_start(struct usb_hcd *hcd)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ int retval = -EBUSY;
+ int i, port;
+ unsigned io_size;
+ dma_addr_t dma_handle;
+ struct usb_device *udev;
+ struct dentry *dentry;
+
+ io_size = (unsigned) hcd->rsrc_len;
+
+ dentry = debugfs_create_file(hcd->self.bus_name, S_IFREG|S_IRUGO|S_IWUSR, uhci_debugfs_root, uhci, &uhci_debug_operations);
+ if (!dentry) {
+ dev_err(uhci_dev(uhci), "couldn't create uhci debugfs entry\n");
+ retval = -ENOMEM;
+ goto err_create_debug_entry;
+ }
+ uhci->dentry = dentry;
+
+ uhci->fsbr = 0;
+ uhci->fsbrtimeout = 0;
+
+ spin_lock_init(&uhci->lock);
+ INIT_LIST_HEAD(&uhci->qh_remove_list);
+
+ INIT_LIST_HEAD(&uhci->td_remove_list);
+
+ INIT_LIST_HEAD(&uhci->urb_remove_list);
+
+ INIT_LIST_HEAD(&uhci->urb_list);
+
+ INIT_LIST_HEAD(&uhci->complete_list);
+
+ init_waitqueue_head(&uhci->waitqh);
+
+ uhci->fl = dma_alloc_coherent(uhci_dev(uhci), sizeof(*uhci->fl),
+ &dma_handle, 0);
+ if (!uhci->fl) {
+ dev_err(uhci_dev(uhci), "unable to allocate "
+ "consistent memory for frame list\n");
+ goto err_alloc_fl;
+ }
+
+ memset((void *)uhci->fl, 0, sizeof(*uhci->fl));
+
+ uhci->fl->dma_handle = dma_handle;
+
+ uhci->td_pool = dma_pool_create("uhci_td", uhci_dev(uhci),
+ sizeof(struct uhci_td), 16, 0);
+ if (!uhci->td_pool) {
+ dev_err(uhci_dev(uhci), "unable to create td dma_pool\n");
+ goto err_create_td_pool;
+ }
+
+ uhci->qh_pool = dma_pool_create("uhci_qh", uhci_dev(uhci),
+ sizeof(struct uhci_qh), 16, 0);
+ if (!uhci->qh_pool) {
+ dev_err(uhci_dev(uhci), "unable to create qh dma_pool\n");
+ goto err_create_qh_pool;
+ }
+
+ /* Initialize the root hub */
+
+ /* UHCI specs says devices must have 2 ports, but goes on to say */
+ /* they may have more but give no way to determine how many they */
+ /* have. However, according to the UHCI spec, Bit 7 is always set */
+ /* to 1. So we try to use this to our advantage */
+ for (port = 0; port < (io_size - 0x10) / 2; port++) {
+ unsigned int portstatus;
+
+ portstatus = inw(uhci->io_addr + 0x10 + (port * 2));
+ if (!(portstatus & 0x0080))
+ break;
+ }
+ if (debug)
+ dev_info(uhci_dev(uhci), "detected %d ports\n", port);
+
+ /* This is experimental so anything less than 2 or greater than 8 is */
+ /* something weird and we'll ignore it */
+ if (port < 2 || port > UHCI_RH_MAXCHILD) {
+ dev_info(uhci_dev(uhci), "port count misdetected? "
+ "forcing to 2 ports\n");
+ port = 2;
+ }
+
+ uhci->rh_numports = port;
+
+ udev = usb_alloc_dev(NULL, &hcd->self, 0);
+ if (!udev) {
+ dev_err(uhci_dev(uhci), "unable to allocate root hub\n");
+ goto err_alloc_root_hub;
+ }
+
+ uhci->term_td = uhci_alloc_td(uhci, udev);
+ if (!uhci->term_td) {
+ dev_err(uhci_dev(uhci), "unable to allocate terminating TD\n");
+ goto err_alloc_term_td;
+ }
+
+ for (i = 0; i < UHCI_NUM_SKELQH; i++) {
+ uhci->skelqh[i] = uhci_alloc_qh(uhci, udev);
+ if (!uhci->skelqh[i]) {
+ dev_err(uhci_dev(uhci), "unable to allocate QH\n");
+ goto err_alloc_skelqh;
+ }
+ }
+
+ /*
+ * 8 Interrupt queues; link all higher int queues to int1,
+ * then link int1 to control and control to bulk
+ */
+ uhci->skel_int128_qh->link =
+ uhci->skel_int64_qh->link =
+ uhci->skel_int32_qh->link =
+ uhci->skel_int16_qh->link =
+ uhci->skel_int8_qh->link =
+ uhci->skel_int4_qh->link =
+ uhci->skel_int2_qh->link =
+ cpu_to_le32(uhci->skel_int1_qh->dma_handle) | UHCI_PTR_QH;
+ uhci->skel_int1_qh->link = cpu_to_le32(uhci->skel_ls_control_qh->dma_handle) | UHCI_PTR_QH;
+
+ uhci->skel_ls_control_qh->link = cpu_to_le32(uhci->skel_fs_control_qh->dma_handle) | UHCI_PTR_QH;
+ uhci->skel_fs_control_qh->link = cpu_to_le32(uhci->skel_bulk_qh->dma_handle) | UHCI_PTR_QH;
+ uhci->skel_bulk_qh->link = cpu_to_le32(uhci->skel_term_qh->dma_handle) | UHCI_PTR_QH;
+
+ /* This dummy TD is to work around a bug in Intel PIIX controllers */
+ uhci_fill_td(uhci->term_td, 0, (UHCI_NULL_DATA_SIZE << 21) |
+ (0x7f << TD_TOKEN_DEVADDR_SHIFT) | USB_PID_IN, 0);
+ uhci->term_td->link = cpu_to_le32(uhci->term_td->dma_handle);
+
+ uhci->skel_term_qh->link = UHCI_PTR_TERM;
+ uhci->skel_term_qh->element = cpu_to_le32(uhci->term_td->dma_handle);
+
+ /*
+ * Fill the frame list: make all entries point to the proper
+ * interrupt queue.
+ *
+ * The interrupt queues will be interleaved as evenly as possible.
+ * There's not much to be done about period-1 interrupts; they have
+ * to occur in every frame. But we can schedule period-2 interrupts
+ * in odd-numbered frames, period-4 interrupts in frames congruent
+ * to 2 (mod 4), and so on. This way each frame only has two
+ * interrupt QHs, which will help spread out bandwidth utilization.
+ */
+ for (i = 0; i < UHCI_NUMFRAMES; i++) {
+ int irq;
+
+ /*
+ * ffs (Find First bit Set) does exactly what we need:
+ * 1,3,5,... => ffs = 0 => use skel_int2_qh = skelqh[6],
+ * 2,6,10,... => ffs = 1 => use skel_int4_qh = skelqh[5], etc.
+ * ffs > 6 => not on any high-period queue, so use
+ * skel_int1_qh = skelqh[7].
+ * Add UHCI_NUMFRAMES to insure at least one bit is set.
+ */
+ irq = 6 - (int) __ffs(i + UHCI_NUMFRAMES);
+ if (irq < 0)
+ irq = 7;
+
+ /* Only place we don't use the frame list routines */
+ uhci->fl->frame[i] = UHCI_PTR_QH |
+ cpu_to_le32(uhci->skelqh[irq]->dma_handle);
+ }
+
+ /*
+ * Some architectures require a full mb() to enforce completion of
+ * the memory writes above before the I/O transfers in start_hc().
+ */
+ mb();
+ if ((retval = start_hc(uhci)) != 0)
+ goto err_alloc_skelqh;
+
+ init_stall_timer(hcd);
+
+ udev->speed = USB_SPEED_FULL;
+
+ if (usb_hcd_register_root_hub(udev, hcd) != 0) {
+ dev_err(uhci_dev(uhci), "unable to start root hub\n");
+ retval = -ENOMEM;
+ goto err_start_root_hub;
+ }
+
+ return 0;
+
+/*
+ * error exits:
+ */
+err_start_root_hub:
+ reset_hc(uhci);
+
+ del_timer_sync(&uhci->stall_timer);
+
+err_alloc_skelqh:
+ for (i = 0; i < UHCI_NUM_SKELQH; i++)
+ if (uhci->skelqh[i]) {
+ uhci_free_qh(uhci, uhci->skelqh[i]);
+ uhci->skelqh[i] = NULL;
+ }
+
+ uhci_free_td(uhci, uhci->term_td);
+ uhci->term_td = NULL;
+
+err_alloc_term_td:
+ usb_put_dev(udev);
+
+err_alloc_root_hub:
+ dma_pool_destroy(uhci->qh_pool);
+ uhci->qh_pool = NULL;
+
+err_create_qh_pool:
+ dma_pool_destroy(uhci->td_pool);
+ uhci->td_pool = NULL;
+
+err_create_td_pool:
+ dma_free_coherent(uhci_dev(uhci), sizeof(*uhci->fl),
+ uhci->fl, uhci->fl->dma_handle);
+ uhci->fl = NULL;
+
+err_alloc_fl:
+ debugfs_remove(uhci->dentry);
+ uhci->dentry = NULL;
+
+err_create_debug_entry:
+ return retval;
+}
+
+static void uhci_stop(struct usb_hcd *hcd)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+
+ del_timer_sync(&uhci->stall_timer);
+ reset_hc(uhci);
+
+ spin_lock_irq(&uhci->lock);
+ uhci_scan_schedule(uhci, NULL);
+ spin_unlock_irq(&uhci->lock);
+
+ release_uhci(uhci);
+}
+
+#ifdef CONFIG_PM
+static int uhci_suspend(struct usb_hcd *hcd, u32 state)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+
+ spin_lock_irq(&uhci->lock);
+
+ /* Don't try to suspend broken motherboards, reset instead */
+ if (suspend_allowed(uhci))
+ suspend_hc(uhci);
+ else {
+ spin_unlock_irq(&uhci->lock);
+ reset_hc(uhci);
+ spin_lock_irq(&uhci->lock);
+ uhci_scan_schedule(uhci, NULL);
+ }
+
+ spin_unlock_irq(&uhci->lock);
+ return 0;
+}
+
+static int uhci_resume(struct usb_hcd *hcd)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ int rc;
+
+ pci_set_master(to_pci_dev(uhci_dev(uhci)));
+
+ spin_lock_irq(&uhci->lock);
+
+ if (uhci->state == UHCI_SUSPENDED) {
+
+ /*
+ * Some systems don't maintain the UHCI register values
+ * during a PM suspend/resume cycle, so reinitialize
+ * the Frame Number, Framelist Base Address, Interrupt
+ * Enable, and Legacy Support registers.
+ */
+ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
+ 0);
+ outw(uhci->frame_number, uhci->io_addr + USBFRNUM);
+ outl(uhci->fl->dma_handle, uhci->io_addr + USBFLBASEADD);
+ outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC |
+ USBINTR_SP, uhci->io_addr + USBINTR);
+ uhci->resume_detect = 1;
+ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
+ USBLEGSUP_DEFAULT);
+ } else {
+ spin_unlock_irq(&uhci->lock);
+ reset_hc(uhci);
+ if ((rc = start_hc(uhci)) != 0)
+ return rc;
+ spin_lock_irq(&uhci->lock);
+ }
+ hcd->state = HC_STATE_RUNNING;
+
+ spin_unlock_irq(&uhci->lock);
+ return 0;
+}
+#endif
+
+/* Wait until all the URBs for a particular device/endpoint are gone */
+static void uhci_hcd_endpoint_disable(struct usb_hcd *hcd,
+ struct usb_host_endpoint *ep)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+
+ wait_event_interruptible(uhci->waitqh, list_empty(&ep->urb_list));
+}
+
+static int uhci_hcd_get_frame_number(struct usb_hcd *hcd)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ int frame_number;
+ unsigned long flags;
+
+ /* Minimize latency by avoiding the spinlock */
+ local_irq_save(flags);
+ rmb();
+ frame_number = (uhci->is_stopped ? uhci->frame_number :
+ inw(uhci->io_addr + USBFRNUM));
+ local_irq_restore(flags);
+ return frame_number;
+}
+
+static const char hcd_name[] = "uhci_hcd";
+
+static const struct hc_driver uhci_driver = {
+ .description = hcd_name,
+ .product_desc = "UHCI Host Controller",
+ .hcd_priv_size = sizeof(struct uhci_hcd),
+
+ /* Generic hardware linkage */
+ .irq = uhci_irq,
+ .flags = HCD_USB11,
+
+ /* Basic lifecycle operations */
+ .reset = uhci_reset,
+ .start = uhci_start,
+#ifdef CONFIG_PM
+ .suspend = uhci_suspend,
+ .resume = uhci_resume,
+#endif
+ .stop = uhci_stop,
+
+ .urb_enqueue = uhci_urb_enqueue,
+ .urb_dequeue = uhci_urb_dequeue,
+
+ .endpoint_disable = uhci_hcd_endpoint_disable,
+ .get_frame_number = uhci_hcd_get_frame_number,
+
+ .hub_status_data = uhci_hub_status_data,
+ .hub_control = uhci_hub_control,
+};
+
+static const struct pci_device_id uhci_pci_ids[] = { {
+ /* handle any USB UHCI controller */
+ PCI_DEVICE_CLASS(((PCI_CLASS_SERIAL_USB << 8) | 0x00), ~0),
+ .driver_data = (unsigned long) &uhci_driver,
+ }, { /* end: all zeroes */ }
+};
+
+MODULE_DEVICE_TABLE(pci, uhci_pci_ids);
+
+static struct pci_driver uhci_pci_driver = {
+ .name = (char *)hcd_name,
+ .id_table = uhci_pci_ids,
+
+ .probe = usb_hcd_pci_probe,
+ .remove = usb_hcd_pci_remove,
+
+#ifdef CONFIG_PM
+ .suspend = usb_hcd_pci_suspend,
+ .resume = usb_hcd_pci_resume,
+#endif /* PM */
+};
+
+static int __init uhci_hcd_init(void)
+{
+ int retval = -ENOMEM;
+
+ printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION "\n");
+
+ if (usb_disabled())
+ return -ENODEV;
+
+ if (debug) {
+ errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL);
+ if (!errbuf)
+ goto errbuf_failed;
+ }
+
+ uhci_debugfs_root = debugfs_create_dir("uhci", NULL);
+ if (!uhci_debugfs_root)
+ goto debug_failed;
+
+ uhci_up_cachep = kmem_cache_create("uhci_urb_priv",
+ sizeof(struct urb_priv), 0, 0, NULL, NULL);
+ if (!uhci_up_cachep)
+ goto up_failed;
+
+ retval = pci_register_driver(&uhci_pci_driver);
+ if (retval)
+ goto init_failed;
+
+ return 0;
+
+init_failed:
+ if (kmem_cache_destroy(uhci_up_cachep))
+ warn("not all urb_priv's were freed!");
+
+up_failed:
+ debugfs_remove(uhci_debugfs_root);
+
+debug_failed:
+ if (errbuf)
+ kfree(errbuf);
+
+errbuf_failed:
+
+ return retval;
+}
+
+static void __exit uhci_hcd_cleanup(void)
+{
+ pci_unregister_driver(&uhci_pci_driver);
+
+ if (kmem_cache_destroy(uhci_up_cachep))
+ warn("not all urb_priv's were freed!");
+
+ debugfs_remove(uhci_debugfs_root);
+
+ if (errbuf)
+ kfree(errbuf);
+}
+
+module_init(uhci_hcd_init);
+module_exit(uhci_hcd_cleanup);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h
new file mode 100644
index 000000000000..02255d69e1fe
--- /dev/null
+++ b/drivers/usb/host/uhci-hcd.h
@@ -0,0 +1,454 @@
+#ifndef __LINUX_UHCI_HCD_H
+#define __LINUX_UHCI_HCD_H
+
+#include <linux/list.h>
+#include <linux/usb.h>
+
+#define usb_packetid(pipe) (usb_pipein(pipe) ? USB_PID_IN : USB_PID_OUT)
+#define PIPE_DEVEP_MASK 0x0007ff00
+
+/*
+ * Universal Host Controller Interface data structures and defines
+ */
+
+/* Command register */
+#define USBCMD 0
+#define USBCMD_RS 0x0001 /* Run/Stop */
+#define USBCMD_HCRESET 0x0002 /* Host reset */
+#define USBCMD_GRESET 0x0004 /* Global reset */
+#define USBCMD_EGSM 0x0008 /* Global Suspend Mode */
+#define USBCMD_FGR 0x0010 /* Force Global Resume */
+#define USBCMD_SWDBG 0x0020 /* SW Debug mode */
+#define USBCMD_CF 0x0040 /* Config Flag (sw only) */
+#define USBCMD_MAXP 0x0080 /* Max Packet (0 = 32, 1 = 64) */
+
+/* Status register */
+#define USBSTS 2
+#define USBSTS_USBINT 0x0001 /* Interrupt due to IOC */
+#define USBSTS_ERROR 0x0002 /* Interrupt due to error */
+#define USBSTS_RD 0x0004 /* Resume Detect */
+#define USBSTS_HSE 0x0008 /* Host System Error - basically PCI problems */
+#define USBSTS_HCPE 0x0010 /* Host Controller Process Error - the scripts were buggy */
+#define USBSTS_HCH 0x0020 /* HC Halted */
+
+/* Interrupt enable register */
+#define USBINTR 4
+#define USBINTR_TIMEOUT 0x0001 /* Timeout/CRC error enable */
+#define USBINTR_RESUME 0x0002 /* Resume interrupt enable */
+#define USBINTR_IOC 0x0004 /* Interrupt On Complete enable */
+#define USBINTR_SP 0x0008 /* Short packet interrupt enable */
+
+#define USBFRNUM 6
+#define USBFLBASEADD 8
+#define USBSOF 12
+
+/* USB port status and control registers */
+#define USBPORTSC1 16
+#define USBPORTSC2 18
+#define USBPORTSC_CCS 0x0001 /* Current Connect Status ("device present") */
+#define USBPORTSC_CSC 0x0002 /* Connect Status Change */
+#define USBPORTSC_PE 0x0004 /* Port Enable */
+#define USBPORTSC_PEC 0x0008 /* Port Enable Change */
+#define USBPORTSC_DPLUS 0x0010 /* D+ high (line status) */
+#define USBPORTSC_DMINUS 0x0020 /* D- high (line status) */
+#define USBPORTSC_RD 0x0040 /* Resume Detect */
+#define USBPORTSC_RES1 0x0080 /* reserved, always 1 */
+#define USBPORTSC_LSDA 0x0100 /* Low Speed Device Attached */
+#define USBPORTSC_PR 0x0200 /* Port Reset */
+/* OC and OCC from Intel 430TX and later (not UHCI 1.1d spec) */
+#define USBPORTSC_OC 0x0400 /* Over Current condition */
+#define USBPORTSC_OCC 0x0800 /* Over Current Change R/WC */
+#define USBPORTSC_SUSP 0x1000 /* Suspend */
+#define USBPORTSC_RES2 0x2000 /* reserved, write zeroes */
+#define USBPORTSC_RES3 0x4000 /* reserved, write zeroes */
+#define USBPORTSC_RES4 0x8000 /* reserved, write zeroes */
+
+/* Legacy support register */
+#define USBLEGSUP 0xc0
+#define USBLEGSUP_DEFAULT 0x2000 /* only PIRQ enable set */
+
+#define UHCI_NULL_DATA_SIZE 0x7FF /* for UHCI controller TD */
+
+#define UHCI_PTR_BITS cpu_to_le32(0x000F)
+#define UHCI_PTR_TERM cpu_to_le32(0x0001)
+#define UHCI_PTR_QH cpu_to_le32(0x0002)
+#define UHCI_PTR_DEPTH cpu_to_le32(0x0004)
+#define UHCI_PTR_BREADTH cpu_to_le32(0x0000)
+
+#define UHCI_NUMFRAMES 1024 /* in the frame list [array] */
+#define UHCI_MAX_SOF_NUMBER 2047 /* in an SOF packet */
+#define CAN_SCHEDULE_FRAMES 1000 /* how far future frames can be scheduled */
+
+struct uhci_frame_list {
+ __le32 frame[UHCI_NUMFRAMES];
+
+ void *frame_cpu[UHCI_NUMFRAMES];
+
+ dma_addr_t dma_handle;
+};
+
+struct urb_priv;
+
+/*
+ * One role of a QH is to hold a queue of TDs for some endpoint. Each QH is
+ * used with one URB, and qh->element (updated by the HC) is either:
+ * - the next unprocessed TD for the URB, or
+ * - UHCI_PTR_TERM (when there's no more traffic for this endpoint), or
+ * - the QH for the next URB queued to the same endpoint.
+ *
+ * The other role of a QH is to serve as a "skeleton" framelist entry, so we
+ * can easily splice a QH for some endpoint into the schedule at the right
+ * place. Then qh->element is UHCI_PTR_TERM.
+ *
+ * In the frame list, qh->link maintains a list of QHs seen by the HC:
+ * skel1 --> ep1-qh --> ep2-qh --> ... --> skel2 --> ...
+ */
+struct uhci_qh {
+ /* Hardware fields */
+ __le32 link; /* Next queue */
+ __le32 element; /* Queue element pointer */
+
+ /* Software fields */
+ dma_addr_t dma_handle;
+
+ struct usb_device *dev;
+ struct urb_priv *urbp;
+
+ struct list_head list; /* P: uhci->frame_list_lock */
+ struct list_head remove_list; /* P: uhci->remove_list_lock */
+} __attribute__((aligned(16)));
+
+/*
+ * We need a special accessor for the element pointer because it is
+ * subject to asynchronous updates by the controller
+ */
+static __le32 inline qh_element(struct uhci_qh *qh) {
+ __le32 element = qh->element;
+
+ barrier();
+ return element;
+}
+
+/*
+ * for TD <status>:
+ */
+#define TD_CTRL_SPD (1 << 29) /* Short Packet Detect */
+#define TD_CTRL_C_ERR_MASK (3 << 27) /* Error Counter bits */
+#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 (1 << 24) /* Interrupt on Complete */
+#define TD_CTRL_ACTIVE (1 << 23) /* TD Active */
+#define TD_CTRL_STALLED (1 << 22) /* TD Stalled */
+#define TD_CTRL_DBUFERR (1 << 21) /* Data Buffer Error */
+#define TD_CTRL_BABBLE (1 << 20) /* Babble Detected */
+#define TD_CTRL_NAK (1 << 19) /* NAK Received */
+#define TD_CTRL_CRCTIMEO (1 << 18) /* CRC/Time Out Error */
+#define TD_CTRL_BITSTUFF (1 << 17) /* Bit Stuff Error */
+#define TD_CTRL_ACTLEN_MASK 0x7FF /* actual length, encoded as n - 1 */
+
+#define TD_CTRL_ANY_ERROR (TD_CTRL_STALLED | TD_CTRL_DBUFERR | \
+ TD_CTRL_BABBLE | TD_CTRL_CRCTIME | TD_CTRL_BITSTUFF)
+
+#define uhci_maxerr(err) ((err) << TD_CTRL_C_ERR_SHIFT)
+#define uhci_status_bits(ctrl_sts) ((ctrl_sts) & 0xF60000)
+#define uhci_actual_length(ctrl_sts) (((ctrl_sts) + 1) & TD_CTRL_ACTLEN_MASK) /* 1-based */
+
+/*
+ * for TD <info>: (a.k.a. Token)
+ */
+#define td_token(td) le32_to_cpu((td)->token)
+#define TD_TOKEN_DEVADDR_SHIFT 8
+#define TD_TOKEN_TOGGLE_SHIFT 19
+#define TD_TOKEN_TOGGLE (1 << 19)
+#define TD_TOKEN_EXPLEN_SHIFT 21
+#define TD_TOKEN_EXPLEN_MASK 0x7FF /* expected length, encoded as n - 1 */
+#define TD_TOKEN_PID_MASK 0xFF
+
+#define uhci_explen(len) ((len) << TD_TOKEN_EXPLEN_SHIFT)
+
+#define uhci_expected_length(token) ((((token) >> 21) + 1) & TD_TOKEN_EXPLEN_MASK)
+#define uhci_toggle(token) (((token) >> TD_TOKEN_TOGGLE_SHIFT) & 1)
+#define uhci_endpoint(token) (((token) >> 15) & 0xf)
+#define uhci_devaddr(token) (((token) >> TD_TOKEN_DEVADDR_SHIFT) & 0x7f)
+#define uhci_devep(token) (((token) >> TD_TOKEN_DEVADDR_SHIFT) & 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)
+
+/*
+ * The documentation says "4 words for hardware, 4 words for software".
+ *
+ * That's silly, the hardware doesn't care. The hardware only cares that
+ * the hardware words are 16-byte aligned, and we can have any amount of
+ * sw space after the TD entry as far as I can tell.
+ *
+ * But let's just go with the documentation, at least for 32-bit machines.
+ * On 64-bit machines we probably want to take advantage of the fact that
+ * hw doesn't really care about the size of the sw-only area.
+ *
+ * Alas, not anymore, we have more than 4 words for software, woops.
+ * Everything still works tho, surprise! -jerdfelt
+ *
+ * td->link points to either another TD (not necessarily for the same urb or
+ * even the same endpoint), or nothing (PTR_TERM), or a QH (for queued urbs)
+ */
+struct uhci_td {
+ /* Hardware fields */
+ __le32 link;
+ __le32 status;
+ __le32 token;
+ __le32 buffer;
+
+ /* Software fields */
+ dma_addr_t dma_handle;
+
+ struct usb_device *dev;
+ struct urb *urb;
+
+ struct list_head list; /* P: urb->lock */
+ struct list_head remove_list; /* P: uhci->td_remove_list_lock */
+
+ int frame; /* for iso: what frame? */
+ struct list_head fl_list; /* P: uhci->frame_list_lock */
+} __attribute__((aligned(16)));
+
+/*
+ * We need a special accessor for the control/status word because it is
+ * subject to asynchronous updates by the controller
+ */
+static u32 inline td_status(struct uhci_td *td) {
+ __le32 status = td->status;
+
+ barrier();
+ return le32_to_cpu(status);
+}
+
+
+/*
+ * The UHCI driver places Interrupt, Control and Bulk into QH's both
+ * to group together TD's for one transfer, and also to faciliate queuing
+ * of URB's. To make it easy to insert entries into the schedule, we have
+ * a skeleton of QH's for each predefined Interrupt latency, low-speed
+ * control, full-speed control and terminating QH (see explanation for
+ * the terminating QH below).
+ *
+ * When we want to add a new QH, we add it to the end of the list for the
+ * skeleton QH.
+ *
+ * For instance, the queue can look like this:
+ *
+ * skel int128 QH
+ * dev 1 interrupt QH
+ * dev 5 interrupt QH
+ * skel int64 QH
+ * skel int32 QH
+ * ...
+ * skel int1 QH
+ * skel low-speed control QH
+ * dev 5 control QH
+ * skel full-speed control QH
+ * skel bulk QH
+ * dev 1 bulk QH
+ * dev 2 bulk QH
+ * skel terminating QH
+ *
+ * The terminating QH is used for 2 reasons:
+ * - To place a terminating TD which is used to workaround a PIIX bug
+ * (see Intel errata for explanation)
+ * - To loop back to the full-speed control queue for full-speed bandwidth
+ * reclamation
+ *
+ * Isochronous transfers are stored before the start of the skeleton
+ * schedule and don't use QH's. While the UHCI spec doesn't forbid the
+ * use of QH's for Isochronous, it doesn't use them either. Since we don't
+ * need to use them either, we follow the spec diagrams in hope that it'll
+ * be more compatible with future UHCI implementations.
+ */
+
+#define UHCI_NUM_SKELQH 12
+#define skel_int128_qh skelqh[0]
+#define skel_int64_qh skelqh[1]
+#define skel_int32_qh skelqh[2]
+#define skel_int16_qh skelqh[3]
+#define skel_int8_qh skelqh[4]
+#define skel_int4_qh skelqh[5]
+#define skel_int2_qh skelqh[6]
+#define skel_int1_qh skelqh[7]
+#define skel_ls_control_qh skelqh[8]
+#define skel_fs_control_qh skelqh[9]
+#define skel_bulk_qh skelqh[10]
+#define skel_term_qh skelqh[11]
+
+/*
+ * Search tree for determining where <interval> fits in the skelqh[]
+ * skeleton.
+ *
+ * An interrupt request should be placed into the slowest skelqh[]
+ * which meets the interval/period/frequency requirement.
+ * An interrupt request is allowed to be faster than <interval> but not slower.
+ *
+ * For a given <interval>, this function returns the appropriate/matching
+ * skelqh[] index value.
+ */
+static inline int __interval_to_skel(int interval)
+{
+ if (interval < 16) {
+ if (interval < 4) {
+ if (interval < 2)
+ return 7; /* int1 for 0-1 ms */
+ return 6; /* int2 for 2-3 ms */
+ }
+ if (interval < 8)
+ return 5; /* int4 for 4-7 ms */
+ return 4; /* int8 for 8-15 ms */
+ }
+ if (interval < 64) {
+ if (interval < 32)
+ return 3; /* int16 for 16-31 ms */
+ return 2; /* int32 for 32-63 ms */
+ }
+ if (interval < 128)
+ return 1; /* int64 for 64-127 ms */
+ return 0; /* int128 for 128-255 ms (Max.) */
+}
+
+/*
+ * Device states for the host controller.
+ *
+ * To prevent "bouncing" in the presence of electrical noise,
+ * we insist on a 1-second "grace" period, before switching to
+ * the RUNNING or SUSPENDED states, during which the state is
+ * not allowed to change.
+ *
+ * The resume process is divided into substates in order to avoid
+ * potentially length delays during the timer handler.
+ *
+ * States in which the host controller is halted must have values <= 0.
+ */
+enum uhci_state {
+ UHCI_RESET,
+ UHCI_RUNNING_GRACE, /* Before RUNNING */
+ UHCI_RUNNING, /* The normal state */
+ UHCI_SUSPENDING_GRACE, /* Before SUSPENDED */
+ UHCI_SUSPENDED = -10, /* When no devices are attached */
+ UHCI_RESUMING_1,
+ UHCI_RESUMING_2
+};
+
+/*
+ * This describes the full uhci information.
+ *
+ * Note how the "proper" USB information is just
+ * a subset of what the full implementation needs.
+ */
+struct uhci_hcd {
+
+ /* debugfs */
+ struct dentry *dentry;
+
+ /* Grabbed from PCI */
+ unsigned long io_addr;
+
+ struct dma_pool *qh_pool;
+ struct dma_pool *td_pool;
+
+ struct usb_bus *bus;
+
+ struct uhci_td *term_td; /* Terminating TD, see UHCI bug */
+ struct uhci_qh *skelqh[UHCI_NUM_SKELQH]; /* Skeleton QH's */
+
+ spinlock_t lock;
+ struct uhci_frame_list *fl; /* P: uhci->lock */
+ int fsbr; /* Full-speed bandwidth reclamation */
+ unsigned long fsbrtimeout; /* FSBR delay */
+
+ enum uhci_state state; /* FIXME: needs a spinlock */
+ unsigned long state_end; /* Time of next transition */
+ unsigned int frame_number; /* As of last check */
+ unsigned int is_stopped;
+#define UHCI_IS_STOPPED 9999 /* Larger than a frame # */
+
+ unsigned int scan_in_progress:1; /* Schedule scan is running */
+ unsigned int need_rescan:1; /* Redo the schedule scan */
+ unsigned int resume_detect:1; /* Need a Global Resume */
+
+ /* Support for port suspend/resume/reset */
+ unsigned long port_c_suspend; /* Bit-arrays of ports */
+ unsigned long suspended_ports;
+ unsigned long resuming_ports;
+ unsigned long ports_timeout; /* Time to stop signalling */
+
+ /* Main list of URB's currently controlled by this HC */
+ struct list_head urb_list; /* P: uhci->lock */
+
+ /* List of QH's that are done, but waiting to be unlinked (race) */
+ struct list_head qh_remove_list; /* P: uhci->lock */
+ unsigned int qh_remove_age; /* Age in frames */
+
+ /* List of TD's that are done, but waiting to be freed (race) */
+ struct list_head td_remove_list; /* P: uhci->lock */
+ unsigned int td_remove_age; /* Age in frames */
+
+ /* List of asynchronously unlinked URB's */
+ struct list_head urb_remove_list; /* P: uhci->lock */
+ unsigned int urb_remove_age; /* Age in frames */
+
+ /* List of URB's awaiting completion callback */
+ struct list_head complete_list; /* P: uhci->lock */
+
+ int rh_numports;
+
+ struct timer_list stall_timer;
+
+ wait_queue_head_t waitqh; /* endpoint_disable waiters */
+};
+
+/* Convert between a usb_hcd pointer and the corresponding uhci_hcd */
+static inline struct uhci_hcd *hcd_to_uhci(struct usb_hcd *hcd)
+{
+ return (struct uhci_hcd *) (hcd->hcd_priv);
+}
+static inline struct usb_hcd *uhci_to_hcd(struct uhci_hcd *uhci)
+{
+ return container_of((void *) uhci, struct usb_hcd, hcd_priv);
+}
+
+#define uhci_dev(u) (uhci_to_hcd(u)->self.controller)
+
+struct urb_priv {
+ struct list_head urb_list;
+
+ struct urb *urb;
+
+ struct uhci_qh *qh; /* QH for this URB */
+ struct list_head td_list; /* P: urb->lock */
+
+ unsigned fsbr : 1; /* URB turned on FSBR */
+ unsigned fsbr_timeout : 1; /* URB timed out on FSBR */
+ unsigned queued : 1; /* QH was queued (not linked in) */
+ unsigned short_control_packet : 1; /* If we get a short packet during */
+ /* a control transfer, retrigger */
+ /* the status phase */
+
+ unsigned long inserttime; /* In jiffies */
+ unsigned long fsbrtime; /* In jiffies */
+
+ struct list_head queue_list; /* P: uhci->frame_list_lock */
+};
+
+/*
+ * Locking in uhci.c
+ *
+ * Almost everything relating to the hardware schedule and processing
+ * of URBs is protected by uhci->lock. urb->status is protected by
+ * urb->lock; that's the one exception.
+ *
+ * To prevent deadlocks, never lock uhci->lock while holding urb->lock.
+ * The safe order of locking is:
+ *
+ * #1 uhci->lock
+ * #2 urb->lock
+ */
+
+#endif
diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c
new file mode 100644
index 000000000000..4c45ba8390f8
--- /dev/null
+++ b/drivers/usb/host/uhci-hub.c
@@ -0,0 +1,299 @@
+/*
+ * Universal Host Controller Interface driver for USB.
+ *
+ * Maintainer: Alan Stern <stern@rowland.harvard.edu>
+ *
+ * (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
+ * (C) Copyright 1999 Thomas Sailer, sailer@ife.ee.ethz.ch
+ * (C) Copyright 2004 Alan Stern, stern@rowland.harvard.edu
+ */
+
+static __u8 root_hub_hub_des[] =
+{
+ 0x09, /* __u8 bLength; */
+ 0x29, /* __u8 bDescriptorType; Hub-descriptor */
+ 0x02, /* __u8 bNbrPorts; */
+ 0x0a, /* __u16 wHubCharacteristics; */
+ 0x00, /* (per-port OC, no power switching) */
+ 0x01, /* __u8 bPwrOn2pwrGood; 2ms */
+ 0x00, /* __u8 bHubContrCurrent; 0 mA */
+ 0x00, /* __u8 DeviceRemovable; *** 7 Ports max *** */
+ 0xff /* __u8 PortPwrCtrlMask; *** 7 ports max *** */
+};
+
+#define UHCI_RH_MAXCHILD 7
+
+/* must write as zeroes */
+#define WZ_BITS (USBPORTSC_RES2 | USBPORTSC_RES3 | USBPORTSC_RES4)
+
+/* status change bits: nonzero writes will clear */
+#define RWC_BITS (USBPORTSC_OCC | USBPORTSC_PEC | USBPORTSC_CSC)
+
+static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ int port;
+
+ *buf = 0;
+ for (port = 0; port < uhci->rh_numports; ++port) {
+ if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & RWC_BITS) ||
+ test_bit(port, &uhci->port_c_suspend))
+ *buf |= (1 << (port + 1));
+ }
+ if (*buf && uhci->state == UHCI_SUSPENDED)
+ uhci->resume_detect = 1;
+ return !!*buf;
+}
+
+#define OK(x) len = (x); break
+
+#define CLR_RH_PORTSTAT(x) \
+ status = inw(port_addr); \
+ status &= ~(RWC_BITS|WZ_BITS); \
+ status &= ~(x); \
+ status |= RWC_BITS & (x); \
+ outw(status, port_addr)
+
+#define SET_RH_PORTSTAT(x) \
+ status = inw(port_addr); \
+ status |= (x); \
+ status &= ~(RWC_BITS|WZ_BITS); \
+ outw(status, port_addr)
+
+/* UHCI controllers don't automatically stop resume signalling after 20 msec,
+ * so we have to poll and check timeouts in order to take care of it.
+ */
+static void uhci_finish_suspend(struct uhci_hcd *uhci, int port,
+ unsigned long port_addr)
+{
+ int status;
+
+ if (test_bit(port, &uhci->suspended_ports)) {
+ CLR_RH_PORTSTAT(USBPORTSC_SUSP | USBPORTSC_RD);
+ clear_bit(port, &uhci->suspended_ports);
+ clear_bit(port, &uhci->resuming_ports);
+ set_bit(port, &uhci->port_c_suspend);
+
+ /* The controller won't actually turn off the RD bit until
+ * it has had a chance to send a low-speed EOP sequence,
+ * which takes 3 bit times (= 2 microseconds). We'll delay
+ * slightly longer for good luck. */
+ udelay(4);
+ }
+}
+
+static void uhci_check_ports(struct uhci_hcd *uhci)
+{
+ unsigned int port;
+ unsigned long port_addr;
+ int status;
+
+ for (port = 0; port < uhci->rh_numports; ++port) {
+ port_addr = uhci->io_addr + USBPORTSC1 + 2 * port;
+ status = inw(port_addr);
+ if (unlikely(status & USBPORTSC_PR)) {
+ if (time_after_eq(jiffies, uhci->ports_timeout)) {
+ CLR_RH_PORTSTAT(USBPORTSC_PR);
+ udelay(10);
+
+ /* If the port was enabled before, turning
+ * reset on caused a port enable change.
+ * Turning reset off causes a port connect
+ * status change. Clear these changes. */
+ CLR_RH_PORTSTAT(USBPORTSC_CSC | USBPORTSC_PEC);
+ SET_RH_PORTSTAT(USBPORTSC_PE);
+ }
+ }
+ if (unlikely(status & USBPORTSC_RD)) {
+ if (!test_bit(port, &uhci->resuming_ports)) {
+
+ /* Port received a wakeup request */
+ set_bit(port, &uhci->resuming_ports);
+ uhci->ports_timeout = jiffies +
+ msecs_to_jiffies(20);
+ } else if (time_after_eq(jiffies,
+ uhci->ports_timeout)) {
+ uhci_finish_suspend(uhci, port, port_addr);
+ }
+ }
+ }
+}
+
+/* size of returned buffer is part of USB spec */
+static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
+ u16 wIndex, char *buf, u16 wLength)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ int status, lstatus, retval = 0, len = 0;
+ unsigned int port = wIndex - 1;
+ unsigned long port_addr = uhci->io_addr + USBPORTSC1 + 2 * port;
+ u16 wPortChange, wPortStatus;
+ unsigned long flags;
+
+ spin_lock_irqsave(&uhci->lock, flags);
+ switch (typeReq) {
+
+ case GetHubStatus:
+ *(__le32 *)buf = cpu_to_le32(0);
+ OK(4); /* hub power */
+ case GetPortStatus:
+ if (port >= uhci->rh_numports)
+ goto err;
+
+ uhci_check_ports(uhci);
+ status = inw(port_addr);
+
+ /* Intel controllers report the OverCurrent bit active on.
+ * VIA controllers report it active off, so we'll adjust the
+ * bit value. (It's not standardized in the UHCI spec.)
+ */
+ if (to_pci_dev(hcd->self.controller)->vendor ==
+ PCI_VENDOR_ID_VIA)
+ status ^= USBPORTSC_OC;
+
+ /* UHCI doesn't support C_RESET (always false) */
+ wPortChange = lstatus = 0;
+ if (status & USBPORTSC_CSC)
+ wPortChange |= USB_PORT_STAT_C_CONNECTION;
+ if (status & USBPORTSC_PEC)
+ wPortChange |= USB_PORT_STAT_C_ENABLE;
+ if (status & USBPORTSC_OCC)
+ wPortChange |= USB_PORT_STAT_C_OVERCURRENT;
+
+ if (test_bit(port, &uhci->port_c_suspend)) {
+ wPortChange |= USB_PORT_STAT_C_SUSPEND;
+ lstatus |= 1;
+ }
+ if (test_bit(port, &uhci->suspended_ports))
+ lstatus |= 2;
+ if (test_bit(port, &uhci->resuming_ports))
+ lstatus |= 4;
+
+ /* UHCI has no power switching (always on) */
+ wPortStatus = USB_PORT_STAT_POWER;
+ if (status & USBPORTSC_CCS)
+ wPortStatus |= USB_PORT_STAT_CONNECTION;
+ if (status & USBPORTSC_PE) {
+ wPortStatus |= USB_PORT_STAT_ENABLE;
+ if (status & (USBPORTSC_SUSP | USBPORTSC_RD))
+ wPortStatus |= USB_PORT_STAT_SUSPEND;
+ }
+ if (status & USBPORTSC_OC)
+ wPortStatus |= USB_PORT_STAT_OVERCURRENT;
+ if (status & USBPORTSC_PR)
+ wPortStatus |= USB_PORT_STAT_RESET;
+ if (status & USBPORTSC_LSDA)
+ wPortStatus |= USB_PORT_STAT_LOW_SPEED;
+
+ if (wPortChange)
+ dev_dbg(uhci_dev(uhci), "port %d portsc %04x,%02x\n",
+ wIndex, status, lstatus);
+
+ *(__le16 *)buf = cpu_to_le16(wPortStatus);
+ *(__le16 *)(buf + 2) = cpu_to_le16(wPortChange);
+ OK(4);
+ case SetHubFeature: /* We don't implement these */
+ case ClearHubFeature:
+ switch (wValue) {
+ case C_HUB_OVER_CURRENT:
+ case C_HUB_LOCAL_POWER:
+ OK(0);
+ default:
+ goto err;
+ }
+ break;
+ case SetPortFeature:
+ if (port >= uhci->rh_numports)
+ goto err;
+
+ switch (wValue) {
+ case USB_PORT_FEAT_SUSPEND:
+ set_bit(port, &uhci->suspended_ports);
+ SET_RH_PORTSTAT(USBPORTSC_SUSP);
+ OK(0);
+ case USB_PORT_FEAT_RESET:
+ SET_RH_PORTSTAT(USBPORTSC_PR);
+
+ /* Reset terminates Resume signalling */
+ uhci_finish_suspend(uhci, port, port_addr);
+
+ /* USB v2.0 7.1.7.5 */
+ uhci->ports_timeout = jiffies + msecs_to_jiffies(50);
+ OK(0);
+ case USB_PORT_FEAT_POWER:
+ /* UHCI has no power switching */
+ OK(0);
+ default:
+ goto err;
+ }
+ break;
+ case ClearPortFeature:
+ if (port >= uhci->rh_numports)
+ goto err;
+
+ switch (wValue) {
+ case USB_PORT_FEAT_ENABLE:
+ CLR_RH_PORTSTAT(USBPORTSC_PE);
+
+ /* Disable terminates Resume signalling */
+ uhci_finish_suspend(uhci, port, port_addr);
+ OK(0);
+ case USB_PORT_FEAT_C_ENABLE:
+ CLR_RH_PORTSTAT(USBPORTSC_PEC);
+ OK(0);
+ case USB_PORT_FEAT_SUSPEND:
+ if (test_bit(port, &uhci->suspended_ports) &&
+ !test_and_set_bit(port,
+ &uhci->resuming_ports)) {
+ SET_RH_PORTSTAT(USBPORTSC_RD);
+
+ /* The controller won't allow RD to be set
+ * if the port is disabled. When this happens
+ * just skip the Resume signalling.
+ */
+ if (!(inw(port_addr) & USBPORTSC_RD))
+ uhci_finish_suspend(uhci, port,
+ port_addr);
+ else
+ /* USB v2.0 7.1.7.7 */
+ uhci->ports_timeout = jiffies +
+ msecs_to_jiffies(20);
+ }
+ OK(0);
+ case USB_PORT_FEAT_C_SUSPEND:
+ clear_bit(port, &uhci->port_c_suspend);
+ OK(0);
+ case USB_PORT_FEAT_POWER:
+ /* UHCI has no power switching */
+ goto err;
+ case USB_PORT_FEAT_C_CONNECTION:
+ CLR_RH_PORTSTAT(USBPORTSC_CSC);
+ OK(0);
+ case USB_PORT_FEAT_C_OVER_CURRENT:
+ CLR_RH_PORTSTAT(USBPORTSC_OCC);
+ OK(0);
+ case USB_PORT_FEAT_C_RESET:
+ /* this driver won't report these */
+ OK(0);
+ default:
+ goto err;
+ }
+ break;
+ case GetHubDescriptor:
+ len = min_t(unsigned int, sizeof(root_hub_hub_des), wLength);
+ memcpy(buf, root_hub_hub_des, len);
+ if (len > 2)
+ buf[2] = uhci->rh_numports;
+ OK(len);
+ default:
+err:
+ retval = -EPIPE;
+ }
+ spin_unlock_irqrestore(&uhci->lock, flags);
+
+ return retval;
+}
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
new file mode 100644
index 000000000000..2a7c19501f24
--- /dev/null
+++ b/drivers/usb/host/uhci-q.c
@@ -0,0 +1,1539 @@
+/*
+ * Universal Host Controller Interface driver for USB.
+ *
+ * Maintainer: Alan Stern <stern@rowland.harvard.edu>
+ *
+ * (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
+ * (C) Copyright 1999 Thomas Sailer, sailer@ife.ee.ethz.ch
+ * (C) Copyright 1999 Roman Weissgaerber, weissg@vienna.at
+ * (C) Copyright 2000 Yggdrasil Computing, Inc. (port of new PCI interface
+ * support from usb-ohci.c by Adam Richter, adam@yggdrasil.com).
+ * (C) Copyright 1999 Gregory P. Smith (from usb-ohci.c)
+ * (C) Copyright 2004 Alan Stern, stern@rowland.harvard.edu
+ */
+
+static int uhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb);
+static void uhci_unlink_generic(struct uhci_hcd *uhci, struct urb *urb);
+static void uhci_remove_pending_urbps(struct uhci_hcd *uhci);
+static void uhci_free_pending_qhs(struct uhci_hcd *uhci);
+static void uhci_free_pending_tds(struct uhci_hcd *uhci);
+
+/*
+ * 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 spurious 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_hcd *uhci)
+{
+ uhci->term_td->status |= cpu_to_le32(TD_CTRL_IOC);
+}
+
+static inline void uhci_clear_next_interrupt(struct uhci_hcd *uhci)
+{
+ uhci->term_td->status &= ~cpu_to_le32(TD_CTRL_IOC);
+}
+
+static inline void uhci_moveto_complete(struct uhci_hcd *uhci,
+ struct urb_priv *urbp)
+{
+ list_move_tail(&urbp->urb_list, &uhci->complete_list);
+}
+
+static struct uhci_td *uhci_alloc_td(struct uhci_hcd *uhci, struct usb_device *dev)
+{
+ dma_addr_t dma_handle;
+ struct uhci_td *td;
+
+ td = dma_pool_alloc(uhci->td_pool, GFP_ATOMIC, &dma_handle);
+ if (!td)
+ return NULL;
+
+ td->dma_handle = dma_handle;
+
+ td->link = UHCI_PTR_TERM;
+ td->buffer = 0;
+
+ td->frame = -1;
+ td->dev = dev;
+
+ INIT_LIST_HEAD(&td->list);
+ INIT_LIST_HEAD(&td->remove_list);
+ INIT_LIST_HEAD(&td->fl_list);
+
+ usb_get_dev(dev);
+
+ return td;
+}
+
+static inline void uhci_fill_td(struct uhci_td *td, u32 status,
+ u32 token, u32 buffer)
+{
+ td->status = cpu_to_le32(status);
+ td->token = cpu_to_le32(token);
+ td->buffer = cpu_to_le32(buffer);
+}
+
+/*
+ * We insert Isochronous URB's directly into the frame list at the beginning
+ */
+static void uhci_insert_td_frame_list(struct uhci_hcd *uhci, struct uhci_td *td, unsigned framenum)
+{
+ framenum &= (UHCI_NUMFRAMES - 1);
+
+ td->frame = framenum;
+
+ /* Is there a TD already mapped there? */
+ if (uhci->fl->frame_cpu[framenum]) {
+ struct uhci_td *ftd, *ltd;
+
+ ftd = uhci->fl->frame_cpu[framenum];
+ ltd = list_entry(ftd->fl_list.prev, struct uhci_td, fl_list);
+
+ list_add_tail(&td->fl_list, &ftd->fl_list);
+
+ td->link = ltd->link;
+ wmb();
+ ltd->link = cpu_to_le32(td->dma_handle);
+ } else {
+ td->link = uhci->fl->frame[framenum];
+ wmb();
+ uhci->fl->frame[framenum] = cpu_to_le32(td->dma_handle);
+ uhci->fl->frame_cpu[framenum] = td;
+ }
+}
+
+static void uhci_remove_td(struct uhci_hcd *uhci, struct uhci_td *td)
+{
+ /* If it's not inserted, don't remove it */
+ if (td->frame == -1 && list_empty(&td->fl_list))
+ return;
+
+ if (td->frame != -1 && uhci->fl->frame_cpu[td->frame] == td) {
+ if (list_empty(&td->fl_list)) {
+ uhci->fl->frame[td->frame] = td->link;
+ uhci->fl->frame_cpu[td->frame] = NULL;
+ } else {
+ struct uhci_td *ntd;
+
+ ntd = list_entry(td->fl_list.next, struct uhci_td, fl_list);
+ uhci->fl->frame[td->frame] = cpu_to_le32(ntd->dma_handle);
+ uhci->fl->frame_cpu[td->frame] = ntd;
+ }
+ } else {
+ struct uhci_td *ptd;
+
+ ptd = list_entry(td->fl_list.prev, struct uhci_td, fl_list);
+ ptd->link = td->link;
+ }
+
+ wmb();
+ td->link = UHCI_PTR_TERM;
+
+ list_del_init(&td->fl_list);
+ td->frame = -1;
+}
+
+/*
+ * Inserts a td list into qh.
+ */
+static void uhci_insert_tds_in_qh(struct uhci_qh *qh, struct urb *urb, __le32 breadth)
+{
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+ struct uhci_td *td;
+ __le32 *plink;
+
+ /* Ordering isn't important here yet since the QH hasn't been */
+ /* inserted into the schedule yet */
+ plink = &qh->element;
+ list_for_each_entry(td, &urbp->td_list, list) {
+ *plink = cpu_to_le32(td->dma_handle) | breadth;
+ plink = &td->link;
+ }
+ *plink = UHCI_PTR_TERM;
+}
+
+static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td)
+{
+ if (!list_empty(&td->list))
+ dev_warn(uhci_dev(uhci), "td %p still in list!\n", td);
+ if (!list_empty(&td->remove_list))
+ dev_warn(uhci_dev(uhci), "td %p still in remove_list!\n", td);
+ if (!list_empty(&td->fl_list))
+ dev_warn(uhci_dev(uhci), "td %p still in fl_list!\n", td);
+
+ if (td->dev)
+ usb_put_dev(td->dev);
+
+ dma_pool_free(uhci->td_pool, td, td->dma_handle);
+}
+
+static struct uhci_qh *uhci_alloc_qh(struct uhci_hcd *uhci, struct usb_device *dev)
+{
+ dma_addr_t dma_handle;
+ struct uhci_qh *qh;
+
+ qh = dma_pool_alloc(uhci->qh_pool, GFP_ATOMIC, &dma_handle);
+ if (!qh)
+ return NULL;
+
+ qh->dma_handle = dma_handle;
+
+ qh->element = UHCI_PTR_TERM;
+ qh->link = UHCI_PTR_TERM;
+
+ qh->dev = dev;
+ qh->urbp = NULL;
+
+ INIT_LIST_HEAD(&qh->list);
+ INIT_LIST_HEAD(&qh->remove_list);
+
+ usb_get_dev(dev);
+
+ return qh;
+}
+
+static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
+{
+ if (!list_empty(&qh->list))
+ dev_warn(uhci_dev(uhci), "qh %p list not empty!\n", qh);
+ if (!list_empty(&qh->remove_list))
+ dev_warn(uhci_dev(uhci), "qh %p still in remove_list!\n", qh);
+
+ if (qh->dev)
+ usb_put_dev(qh->dev);
+
+ dma_pool_free(uhci->qh_pool, qh, qh->dma_handle);
+}
+
+/*
+ * Append this urb's qh after the last qh in skelqh->list
+ *
+ * Note that urb_priv.queue_list doesn't have a separate queue head;
+ * it's a ring with every element "live".
+ */
+static void uhci_insert_qh(struct uhci_hcd *uhci, struct uhci_qh *skelqh, struct urb *urb)
+{
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+ struct urb_priv *turbp;
+ struct uhci_qh *lqh;
+
+ /* Grab the last QH */
+ lqh = list_entry(skelqh->list.prev, struct uhci_qh, list);
+
+ /* Point to the next skelqh */
+ urbp->qh->link = lqh->link;
+ wmb(); /* Ordering is important */
+
+ /*
+ * Patch QHs for previous endpoint's queued URBs? HC goes
+ * here next, not to the next skelqh it now points to.
+ *
+ * lqh --> td ... --> qh ... --> td --> qh ... --> td
+ * | | |
+ * v v v
+ * +<----------------+-----------------+
+ * v
+ * newqh --> td ... --> td
+ * |
+ * v
+ * ...
+ *
+ * The HC could see (and use!) any of these as we write them.
+ */
+ lqh->link = cpu_to_le32(urbp->qh->dma_handle) | UHCI_PTR_QH;
+ if (lqh->urbp) {
+ list_for_each_entry(turbp, &lqh->urbp->queue_list, queue_list)
+ turbp->qh->link = lqh->link;
+ }
+
+ list_add_tail(&urbp->qh->list, &skelqh->list);
+}
+
+/*
+ * Start removal of QH from schedule; it finishes next frame.
+ * TDs should be unlinked before this is called.
+ */
+static void uhci_remove_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
+{
+ struct uhci_qh *pqh;
+ __le32 newlink;
+
+ if (!qh)
+ return;
+
+ /*
+ * Only go through the hoops if it's actually linked in
+ */
+ if (!list_empty(&qh->list)) {
+
+ /* If our queue is nonempty, make the next URB the head */
+ if (!list_empty(&qh->urbp->queue_list)) {
+ struct urb_priv *nurbp;
+
+ nurbp = list_entry(qh->urbp->queue_list.next,
+ struct urb_priv, queue_list);
+ nurbp->queued = 0;
+ list_add(&nurbp->qh->list, &qh->list);
+ newlink = cpu_to_le32(nurbp->qh->dma_handle) | UHCI_PTR_QH;
+ } else
+ newlink = qh->link;
+
+ /* Fix up the previous QH's queue to link to either
+ * the new head of this queue or the start of the
+ * next endpoint's queue. */
+ pqh = list_entry(qh->list.prev, struct uhci_qh, list);
+ pqh->link = newlink;
+ if (pqh->urbp) {
+ struct urb_priv *turbp;
+
+ list_for_each_entry(turbp, &pqh->urbp->queue_list,
+ queue_list)
+ turbp->qh->link = newlink;
+ }
+ wmb();
+
+ /* Leave qh->link in case the HC is on the QH now, it will */
+ /* continue the rest of the schedule */
+ qh->element = UHCI_PTR_TERM;
+
+ list_del_init(&qh->list);
+ }
+
+ list_del_init(&qh->urbp->queue_list);
+ qh->urbp = NULL;
+
+ uhci_get_current_frame_number(uhci);
+ if (uhci->frame_number + uhci->is_stopped != uhci->qh_remove_age) {
+ uhci_free_pending_qhs(uhci);
+ uhci->qh_remove_age = uhci->frame_number;
+ }
+
+ /* Check to see if the remove list is empty. Set the IOC bit */
+ /* to force an interrupt so we can remove the QH */
+ if (list_empty(&uhci->qh_remove_list))
+ uhci_set_next_interrupt(uhci);
+
+ list_add(&qh->remove_list, &uhci->qh_remove_list);
+}
+
+static int uhci_fixup_toggle(struct urb *urb, unsigned int toggle)
+{
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+ struct uhci_td *td;
+
+ list_for_each_entry(td, &urbp->td_list, list) {
+ if (toggle)
+ td->token |= cpu_to_le32(TD_TOKEN_TOGGLE);
+ else
+ td->token &= ~cpu_to_le32(TD_TOKEN_TOGGLE);
+
+ toggle ^= 1;
+ }
+
+ return toggle;
+}
+
+/* This function will append one URB's QH to another URB's QH. This is for */
+/* queuing interrupt, control or bulk transfers */
+static void uhci_append_queued_urb(struct uhci_hcd *uhci, struct urb *eurb, struct urb *urb)
+{
+ struct urb_priv *eurbp, *urbp, *furbp, *lurbp;
+ struct uhci_td *lltd;
+
+ eurbp = eurb->hcpriv;
+ urbp = urb->hcpriv;
+
+ /* Find the first URB in the queue */
+ furbp = eurbp;
+ if (eurbp->queued) {
+ list_for_each_entry(furbp, &eurbp->queue_list, queue_list)
+ if (!furbp->queued)
+ break;
+ }
+
+ lurbp = list_entry(furbp->queue_list.prev, struct urb_priv, queue_list);
+
+ lltd = list_entry(lurbp->td_list.prev, struct uhci_td, list);
+
+ /* Control transfers always start with toggle 0 */
+ if (!usb_pipecontrol(urb->pipe))
+ usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe),
+ usb_pipeout(urb->pipe),
+ uhci_fixup_toggle(urb,
+ uhci_toggle(td_token(lltd)) ^ 1));
+
+ /* All qh's in the queue need to link to the next queue */
+ urbp->qh->link = eurbp->qh->link;
+
+ wmb(); /* Make sure we flush everything */
+
+ lltd->link = cpu_to_le32(urbp->qh->dma_handle) | UHCI_PTR_QH;
+
+ list_add_tail(&urbp->queue_list, &furbp->queue_list);
+
+ urbp->queued = 1;
+}
+
+static void uhci_delete_queued_urb(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct urb_priv *urbp, *nurbp, *purbp, *turbp;
+ struct uhci_td *pltd;
+ unsigned int toggle;
+
+ urbp = urb->hcpriv;
+
+ if (list_empty(&urbp->queue_list))
+ return;
+
+ nurbp = list_entry(urbp->queue_list.next, struct urb_priv, queue_list);
+
+ /*
+ * Fix up the toggle for the following URBs in the queue.
+ * Only needed for bulk and interrupt: control and isochronous
+ * endpoints don't propagate toggles between messages.
+ */
+ if (usb_pipebulk(urb->pipe) || usb_pipeint(urb->pipe)) {
+ if (!urbp->queued)
+ /* We just set the toggle in uhci_unlink_generic */
+ 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 from the TD previous to us */
+ purbp = list_entry(urbp->queue_list.prev,
+ struct urb_priv, queue_list);
+ pltd = list_entry(purbp->td_list.prev,
+ struct uhci_td, list);
+ toggle = uhci_toggle(td_token(pltd)) ^ 1;
+ }
+
+ list_for_each_entry(turbp, &urbp->queue_list, queue_list) {
+ if (!turbp->queued)
+ break;
+ toggle = uhci_fixup_toggle(turbp->urb, toggle);
+ }
+
+ usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe),
+ usb_pipeout(urb->pipe), toggle);
+ }
+
+ if (urbp->queued) {
+ /* We're somewhere in the middle (or end). The case where
+ * we're at the head is handled in uhci_remove_qh(). */
+ purbp = list_entry(urbp->queue_list.prev, struct urb_priv,
+ queue_list);
+
+ pltd = list_entry(purbp->td_list.prev, struct uhci_td, list);
+ if (nurbp->queued)
+ pltd->link = cpu_to_le32(nurbp->qh->dma_handle) | UHCI_PTR_QH;
+ else
+ /* The next URB happens to be the beginning, so */
+ /* we're the last, end the chain */
+ pltd->link = UHCI_PTR_TERM;
+ }
+
+ /* urbp->queue_list is handled in uhci_remove_qh() */
+}
+
+static struct urb_priv *uhci_alloc_urb_priv(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct urb_priv *urbp;
+
+ urbp = kmem_cache_alloc(uhci_up_cachep, SLAB_ATOMIC);
+ if (!urbp)
+ return NULL;
+
+ memset((void *)urbp, 0, sizeof(*urbp));
+
+ urbp->inserttime = jiffies;
+ urbp->fsbrtime = jiffies;
+ urbp->urb = urb;
+
+ INIT_LIST_HEAD(&urbp->td_list);
+ INIT_LIST_HEAD(&urbp->queue_list);
+ INIT_LIST_HEAD(&urbp->urb_list);
+
+ list_add_tail(&urbp->urb_list, &uhci->urb_list);
+
+ urb->hcpriv = urbp;
+
+ return urbp;
+}
+
+static void uhci_add_td_to_urb(struct urb *urb, struct uhci_td *td)
+{
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+
+ td->urb = urb;
+
+ list_add_tail(&td->list, &urbp->td_list);
+}
+
+static void uhci_remove_td_from_urb(struct uhci_td *td)
+{
+ if (list_empty(&td->list))
+ return;
+
+ list_del_init(&td->list);
+
+ td->urb = NULL;
+}
+
+static void uhci_destroy_urb_priv(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct uhci_td *td, *tmp;
+ struct urb_priv *urbp;
+
+ urbp = (struct urb_priv *)urb->hcpriv;
+ if (!urbp)
+ return;
+
+ if (!list_empty(&urbp->urb_list))
+ dev_warn(uhci_dev(uhci), "urb %p still on uhci->urb_list "
+ "or uhci->remove_list!\n", urb);
+
+ uhci_get_current_frame_number(uhci);
+ if (uhci->frame_number + uhci->is_stopped != uhci->td_remove_age) {
+ uhci_free_pending_tds(uhci);
+ uhci->td_remove_age = uhci->frame_number;
+ }
+
+ /* Check to see if the remove list is empty. Set the IOC bit */
+ /* to force an interrupt so we can remove the TD's*/
+ if (list_empty(&uhci->td_remove_list))
+ uhci_set_next_interrupt(uhci);
+
+ list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
+ uhci_remove_td_from_urb(td);
+ uhci_remove_td(uhci, td);
+ list_add(&td->remove_list, &uhci->td_remove_list);
+ }
+
+ urb->hcpriv = NULL;
+ kmem_cache_free(uhci_up_cachep, urbp);
+}
+
+static void uhci_inc_fsbr(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+
+ if ((!(urb->transfer_flags & URB_NO_FSBR)) && !urbp->fsbr) {
+ urbp->fsbr = 1;
+ if (!uhci->fsbr++ && !uhci->fsbrtimeout)
+ uhci->skel_term_qh->link = cpu_to_le32(uhci->skel_fs_control_qh->dma_handle) | UHCI_PTR_QH;
+ }
+}
+
+static void uhci_dec_fsbr(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+
+ if ((!(urb->transfer_flags & URB_NO_FSBR)) && urbp->fsbr) {
+ urbp->fsbr = 0;
+ if (!--uhci->fsbr)
+ uhci->fsbrtimeout = jiffies + FSBR_DELAY;
+ }
+}
+
+/*
+ * Map status to standard result codes
+ *
+ * <status> is (td_status(td) & 0xF60000), a.k.a.
+ * uhci_status_bits(td_status(td)).
+ * Note: <status> does not include the TD_CTRL_NAK bit.
+ * <dir_out> is True for output TDs and False for input TDs.
+ */
+static int uhci_map_status(int status, int dir_out)
+{
+ if (!status)
+ return 0;
+ if (status & TD_CTRL_BITSTUFF) /* Bitstuff error */
+ return -EPROTO;
+ if (status & TD_CTRL_CRCTIMEO) { /* CRC/Timeout */
+ if (dir_out)
+ return -EPROTO;
+ else
+ return -EILSEQ;
+ }
+ if (status & TD_CTRL_BABBLE) /* Babble */
+ return -EOVERFLOW;
+ if (status & TD_CTRL_DBUFERR) /* Buffer error */
+ return -ENOSR;
+ if (status & TD_CTRL_STALLED) /* Stalled */
+ return -EPIPE;
+ WARN_ON(status & TD_CTRL_ACTIVE); /* Active */
+ return 0;
+}
+
+/*
+ * Control transfers
+ */
+static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, struct urb *eurb)
+{
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+ struct uhci_td *td;
+ struct uhci_qh *qh, *skelqh;
+ unsigned long destination, status;
+ int maxsze = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
+ int len = urb->transfer_buffer_length;
+ dma_addr_t data = urb->transfer_dma;
+
+ /* The "pipe" thing contains the destination in bits 8--18 */
+ destination = (urb->pipe & PIPE_DEVEP_MASK) | USB_PID_SETUP;
+
+ /* 3 errors */
+ status = TD_CTRL_ACTIVE | uhci_maxerr(3);
+ if (urb->dev->speed == USB_SPEED_LOW)
+ status |= TD_CTRL_LS;
+
+ /*
+ * Build the TD for the control request setup packet
+ */
+ 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_explen(7),
+ urb->setup_dma);
+
+ /*
+ * If direction is "send", change the packet ID from SETUP (0x2D)
+ * to OUT (0xE1). Else change it from SETUP to IN (0x69) and
+ * set Short Packet Detect (SPD) for all data packets.
+ */
+ if (usb_pipeout(urb->pipe))
+ destination ^= (USB_PID_SETUP ^ USB_PID_OUT);
+ else {
+ destination ^= (USB_PID_SETUP ^ USB_PID_IN);
+ status |= TD_CTRL_SPD;
+ }
+
+ /*
+ * Build the DATA TD's
+ */
+ while (len > 0) {
+ int pktsze = len;
+
+ if (pktsze > maxsze)
+ pktsze = maxsze;
+
+ td = uhci_alloc_td(uhci, urb->dev);
+ if (!td)
+ 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 | uhci_explen(pktsze - 1),
+ data);
+
+ data += pktsze;
+ len -= pktsze;
+ }
+
+ /*
+ * Build the final TD for control status
+ */
+ td = uhci_alloc_td(uhci, urb->dev);
+ if (!td)
+ return -ENOMEM;
+
+ /*
+ * 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;
+
+ uhci_add_td_to_urb(urb, td);
+ uhci_fill_td(td, status | TD_CTRL_IOC,
+ destination | uhci_explen(UHCI_NULL_DATA_SIZE), 0);
+
+ qh = uhci_alloc_qh(uhci, urb->dev);
+ if (!qh)
+ return -ENOMEM;
+
+ urbp->qh = qh;
+ qh->urbp = urbp;
+
+ uhci_insert_tds_in_qh(qh, urb, UHCI_PTR_BREADTH);
+
+ /* Low-speed transfers get a different queue, and won't hog the bus.
+ * Also, some devices enumerate better without FSBR; the easiest way
+ * to do that is to put URBs on the low-speed queue while the device
+ * is in the DEFAULT state. */
+ if (urb->dev->speed == USB_SPEED_LOW ||
+ urb->dev->state == USB_STATE_DEFAULT)
+ skelqh = uhci->skel_ls_control_qh;
+ else {
+ skelqh = uhci->skel_fs_control_qh;
+ uhci_inc_fsbr(uhci, urb);
+ }
+
+ if (eurb)
+ uhci_append_queued_urb(uhci, eurb, urb);
+ else
+ uhci_insert_qh(uhci, skelqh, urb);
+
+ return -EINPROGRESS;
+}
+
+/*
+ * If control-IN transfer was short, the status packet wasn't sent.
+ * This routine changes the element pointer in the QH to point at the
+ * status TD. It's safe to do this even while the QH is live, because
+ * the hardware only updates the element pointer following a successful
+ * transfer. The inactive TD for the short packet won't cause an update,
+ * so the pointer won't get overwritten. The next time the controller
+ * sees this QH, it will send the status packet.
+ */
+static int usb_control_retrigger_status(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+ struct uhci_td *td;
+
+ urbp->short_control_packet = 1;
+
+ td = list_entry(urbp->td_list.prev, struct uhci_td, list);
+ urbp->qh->element = cpu_to_le32(td->dma_handle);
+
+ return -EINPROGRESS;
+}
+
+
+static int uhci_result_control(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct list_head *tmp, *head;
+ struct urb_priv *urbp = urb->hcpriv;
+ struct uhci_td *td;
+ unsigned int status;
+ int ret = 0;
+
+ if (list_empty(&urbp->td_list))
+ return -EINVAL;
+
+ head = &urbp->td_list;
+
+ if (urbp->short_control_packet) {
+ tmp = head->prev;
+ goto status_stage;
+ }
+
+ tmp = head->next;
+ td = list_entry(tmp, struct uhci_td, list);
+
+ /* The first TD is the SETUP stage, check the status, but skip */
+ /* the count */
+ status = uhci_status_bits(td_status(td));
+ if (status & TD_CTRL_ACTIVE)
+ return -EINPROGRESS;
+
+ if (status)
+ goto td_error;
+
+ urb->actual_length = 0;
+
+ /* The rest of the TD's (but the last) are data */
+ tmp = tmp->next;
+ while (tmp != head && tmp->next != head) {
+ unsigned int ctrlstat;
+
+ td = list_entry(tmp, struct uhci_td, list);
+ tmp = tmp->next;
+
+ ctrlstat = td_status(td);
+ status = uhci_status_bits(ctrlstat);
+ if (status & TD_CTRL_ACTIVE)
+ return -EINPROGRESS;
+
+ urb->actual_length += uhci_actual_length(ctrlstat);
+
+ if (status)
+ goto td_error;
+
+ /* Check to see if we received a short packet */
+ if (uhci_actual_length(ctrlstat) <
+ uhci_expected_length(td_token(td))) {
+ if (urb->transfer_flags & URB_SHORT_NOT_OK) {
+ ret = -EREMOTEIO;
+ goto err;
+ }
+
+ if (uhci_packetid(td_token(td)) == USB_PID_IN)
+ return usb_control_retrigger_status(uhci, urb);
+ else
+ return 0;
+ }
+ }
+
+status_stage:
+ td = list_entry(tmp, struct uhci_td, list);
+
+ /* Control status stage */
+ status = td_status(td);
+
+#ifdef I_HAVE_BUGGY_APC_BACKUPS
+ /* APC BackUPS Pro kludge */
+ /* It tries to send all of the descriptor instead of the amount */
+ /* we requested */
+ if (status & TD_CTRL_IOC && /* IOC is masked out by uhci_status_bits */
+ status & TD_CTRL_ACTIVE &&
+ status & TD_CTRL_NAK)
+ return 0;
+#endif
+
+ status = uhci_status_bits(status);
+ if (status & TD_CTRL_ACTIVE)
+ return -EINPROGRESS;
+
+ if (status)
+ goto td_error;
+
+ return 0;
+
+td_error:
+ ret = uhci_map_status(status, uhci_packetout(td_token(td)));
+
+err:
+ if ((debug == 1 && ret != -EPIPE) || debug > 1) {
+ /* Some debugging code */
+ dev_dbg(uhci_dev(uhci), "%s: failed with status %x\n",
+ __FUNCTION__, status);
+
+ if (errbuf) {
+ /* Print the chain for debugging purposes */
+ uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0);
+
+ lprintk(errbuf);
+ }
+ }
+
+ return ret;
+}
+
+/*
+ * Common submit for bulk and interrupt
+ */
+static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, struct urb *eurb, struct uhci_qh *skelqh)
+{
+ struct uhci_td *td;
+ struct uhci_qh *qh;
+ unsigned long destination, status;
+ int maxsze = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
+ int len = urb->transfer_buffer_length;
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+ dma_addr_t data = urb->transfer_dma;
+
+ if (len < 0)
+ return -EINVAL;
+
+ /* The "pipe" thing contains the destination in bits 8--18 */
+ destination = (urb->pipe & PIPE_DEVEP_MASK) | usb_packetid(urb->pipe);
+
+ status = uhci_maxerr(3) | TD_CTRL_ACTIVE;
+ if (urb->dev->speed == USB_SPEED_LOW)
+ status |= TD_CTRL_LS;
+ if (usb_pipein(urb->pipe))
+ status |= TD_CTRL_SPD;
+
+ /*
+ * Build the DATA TD's
+ */
+ do { /* Allow zero length packets */
+ int pktsze = maxsze;
+
+ if (pktsze >= len) {
+ pktsze = len;
+ if (!(urb->transfer_flags & URB_SHORT_NOT_OK))
+ status &= ~TD_CTRL_SPD;
+ }
+
+ 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_explen(pktsze - 1) |
+ (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);
+
+ /*
+ * URB_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 & URB_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_explen(UHCI_NULL_DATA_SIZE) |
+ (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),
+ usb_pipeout(urb->pipe));
+ }
+
+ /* Set the interrupt-on-completion flag on the last packet.
+ * A more-or-less typical 4 KB URB (= size of one memory page)
+ * will require about 3 ms to transfer; that's a little on the
+ * fast side but not enough to justify delaying an interrupt
+ * more than 2 or 3 URBs, so we will ignore the URB_NO_INTERRUPT
+ * flag setting. */
+ td->status |= cpu_to_le32(TD_CTRL_IOC);
+
+ qh = uhci_alloc_qh(uhci, urb->dev);
+ if (!qh)
+ return -ENOMEM;
+
+ urbp->qh = qh;
+ qh->urbp = urbp;
+
+ /* Always breadth first */
+ uhci_insert_tds_in_qh(qh, urb, UHCI_PTR_BREADTH);
+
+ if (eurb)
+ uhci_append_queued_urb(uhci, eurb, urb);
+ else
+ uhci_insert_qh(uhci, skelqh, urb);
+
+ return -EINPROGRESS;
+}
+
+/*
+ * Common result for bulk and interrupt
+ */
+static int uhci_result_common(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct urb_priv *urbp = urb->hcpriv;
+ struct uhci_td *td;
+ unsigned int status = 0;
+ int ret = 0;
+
+ urb->actual_length = 0;
+
+ list_for_each_entry(td, &urbp->td_list, list) {
+ unsigned int ctrlstat = td_status(td);
+
+ status = uhci_status_bits(ctrlstat);
+ if (status & TD_CTRL_ACTIVE)
+ return -EINPROGRESS;
+
+ urb->actual_length += uhci_actual_length(ctrlstat);
+
+ if (status)
+ goto td_error;
+
+ if (uhci_actual_length(ctrlstat) <
+ uhci_expected_length(td_token(td))) {
+ if (urb->transfer_flags & URB_SHORT_NOT_OK) {
+ ret = -EREMOTEIO;
+ goto err;
+ } else
+ return 0;
+ }
+ }
+
+ return 0;
+
+td_error:
+ ret = uhci_map_status(status, uhci_packetout(td_token(td)));
+
+err:
+ /*
+ * Enable this chunk of code if you want to see some more debugging.
+ * But be careful, it has the tendancy to starve out khubd and prevent
+ * disconnects from happening successfully if you have a slow debug
+ * log interface (like a serial console.
+ */
+#if 0
+ if ((debug == 1 && ret != -EPIPE) || debug > 1) {
+ /* Some debugging code */
+ dev_dbg(uhci_dev(uhci), "%s: failed with status %x\n",
+ __FUNCTION__, status);
+
+ if (errbuf) {
+ /* Print the chain for debugging purposes */
+ uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0);
+
+ lprintk(errbuf);
+ }
+ }
+#endif
+ return ret;
+}
+
+static inline int uhci_submit_bulk(struct uhci_hcd *uhci, struct urb *urb, struct urb *eurb)
+{
+ int ret;
+
+ /* Can't have low-speed bulk transfers */
+ if (urb->dev->speed == USB_SPEED_LOW)
+ return -EINVAL;
+
+ ret = uhci_submit_common(uhci, urb, eurb, uhci->skel_bulk_qh);
+ if (ret == -EINPROGRESS)
+ uhci_inc_fsbr(uhci, urb);
+
+ return ret;
+}
+
+static inline int uhci_submit_interrupt(struct uhci_hcd *uhci, struct urb *urb, struct urb *eurb)
+{
+ /* USB 1.1 interrupt transfers only involve one packet per interval;
+ * that's the uhci_submit_common() "breadth first" policy. Drivers
+ * can submit urbs of any length, but longer ones might need many
+ * intervals to complete.
+ */
+ return uhci_submit_common(uhci, urb, eurb, uhci->skelqh[__interval_to_skel(urb->interval)]);
+}
+
+/*
+ * Isochronous transfers
+ */
+static int isochronous_find_limits(struct uhci_hcd *uhci, struct urb *urb, unsigned int *start, unsigned int *end)
+{
+ struct urb *last_urb = NULL;
+ struct urb_priv *up;
+ int ret = 0;
+
+ list_for_each_entry(up, &uhci->urb_list, urb_list) {
+ struct urb *u = up->urb;
+
+ /* look for pending URB's with identical pipe handle */
+ if ((urb->pipe == u->pipe) && (urb->dev == u->dev) &&
+ (u->status == -EINPROGRESS) && (u != urb)) {
+ if (!last_urb)
+ *start = u->start_frame;
+ last_urb = u;
+ }
+ }
+
+ if (last_urb) {
+ *end = (last_urb->start_frame + last_urb->number_of_packets *
+ last_urb->interval) & (UHCI_NUMFRAMES-1);
+ ret = 0;
+ } else
+ ret = -1; /* no previous urb found */
+
+ return ret;
+}
+
+static int isochronous_find_start(struct uhci_hcd *uhci, struct urb *urb)
+{
+ int limits;
+ unsigned int start = 0, end = 0;
+
+ if (urb->number_of_packets > 900) /* 900? Why? */
+ return -EFBIG;
+
+ limits = isochronous_find_limits(uhci, urb, &start, &end);
+
+ if (urb->transfer_flags & URB_ISO_ASAP) {
+ if (limits) {
+ uhci_get_current_frame_number(uhci);
+ urb->start_frame = (uhci->frame_number + 10)
+ & (UHCI_NUMFRAMES - 1);
+ } else
+ urb->start_frame = end;
+ } else {
+ urb->start_frame &= (UHCI_NUMFRAMES - 1);
+ /* FIXME: Sanity check */
+ }
+
+ return 0;
+}
+
+/*
+ * Isochronous transfers
+ */
+static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct uhci_td *td;
+ int i, ret, frame;
+ int status, destination;
+
+ status = TD_CTRL_ACTIVE | TD_CTRL_IOS;
+ destination = (urb->pipe & PIPE_DEVEP_MASK) | usb_packetid(urb->pipe);
+
+ ret = isochronous_find_start(uhci, urb);
+ if (ret)
+ return ret;
+
+ frame = urb->start_frame;
+ for (i = 0; i < urb->number_of_packets; i++, frame += urb->interval) {
+ if (!urb->iso_frame_desc[i].length)
+ continue;
+
+ 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_explen(urb->iso_frame_desc[i].length - 1),
+ urb->transfer_dma + urb->iso_frame_desc[i].offset);
+
+ if (i + 1 >= urb->number_of_packets)
+ td->status |= cpu_to_le32(TD_CTRL_IOC);
+
+ uhci_insert_td_frame_list(uhci, td, frame);
+ }
+
+ return -EINPROGRESS;
+}
+
+static int uhci_result_isochronous(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct uhci_td *td;
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+ int status;
+ int i, ret = 0;
+
+ urb->actual_length = 0;
+
+ i = 0;
+ list_for_each_entry(td, &urbp->td_list, list) {
+ int actlength;
+ unsigned int ctrlstat = td_status(td);
+
+ if (ctrlstat & TD_CTRL_ACTIVE)
+ return -EINPROGRESS;
+
+ actlength = uhci_actual_length(ctrlstat);
+ urb->iso_frame_desc[i].actual_length = actlength;
+ urb->actual_length += actlength;
+
+ status = uhci_map_status(uhci_status_bits(ctrlstat),
+ usb_pipeout(urb->pipe));
+ urb->iso_frame_desc[i].status = status;
+ if (status) {
+ urb->error_count++;
+ ret = status;
+ }
+
+ i++;
+ }
+
+ return ret;
+}
+
+static struct urb *uhci_find_urb_ep(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct urb_priv *up;
+
+ /* We don't match Isoc transfers since they are special */
+ if (usb_pipeisoc(urb->pipe))
+ return NULL;
+
+ list_for_each_entry(up, &uhci->urb_list, urb_list) {
+ struct urb *u = up->urb;
+
+ if (u->dev == urb->dev && u->status == -EINPROGRESS) {
+ /* For control, ignore the direction */
+ if (usb_pipecontrol(urb->pipe) &&
+ (u->pipe & ~USB_DIR_IN) == (urb->pipe & ~USB_DIR_IN))
+ return u;
+ else if (u->pipe == urb->pipe)
+ return u;
+ }
+ }
+
+ return NULL;
+}
+
+static int uhci_urb_enqueue(struct usb_hcd *hcd,
+ struct usb_host_endpoint *ep,
+ struct urb *urb, int mem_flags)
+{
+ int ret;
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ unsigned long flags;
+ struct urb *eurb;
+ int bustime;
+
+ spin_lock_irqsave(&uhci->lock, flags);
+
+ ret = urb->status;
+ if (ret != -EINPROGRESS) /* URB already unlinked! */
+ goto out;
+
+ eurb = uhci_find_urb_ep(uhci, urb);
+
+ if (!uhci_alloc_urb_priv(uhci, urb)) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ switch (usb_pipetype(urb->pipe)) {
+ case PIPE_CONTROL:
+ ret = uhci_submit_control(uhci, urb, eurb);
+ break;
+ case PIPE_INTERRUPT:
+ if (!eurb) {
+ bustime = usb_check_bandwidth(urb->dev, urb);
+ if (bustime < 0)
+ ret = bustime;
+ else {
+ ret = uhci_submit_interrupt(uhci, urb, eurb);
+ if (ret == -EINPROGRESS)
+ usb_claim_bandwidth(urb->dev, urb, bustime, 0);
+ }
+ } else { /* inherit from parent */
+ urb->bandwidth = eurb->bandwidth;
+ ret = uhci_submit_interrupt(uhci, urb, eurb);
+ }
+ break;
+ case PIPE_BULK:
+ ret = uhci_submit_bulk(uhci, urb, eurb);
+ break;
+ case PIPE_ISOCHRONOUS:
+ bustime = usb_check_bandwidth(urb->dev, urb);
+ if (bustime < 0) {
+ ret = bustime;
+ break;
+ }
+
+ ret = uhci_submit_isochronous(uhci, urb);
+ if (ret == -EINPROGRESS)
+ usb_claim_bandwidth(urb->dev, urb, bustime, 1);
+ break;
+ }
+
+ if (ret != -EINPROGRESS) {
+ /* Submit failed, so delete it from the urb_list */
+ struct urb_priv *urbp = urb->hcpriv;
+
+ list_del_init(&urbp->urb_list);
+ uhci_destroy_urb_priv(uhci, urb);
+ } else
+ ret = 0;
+
+out:
+ spin_unlock_irqrestore(&uhci->lock, flags);
+ return ret;
+}
+
+/*
+ * Return the result of a transfer
+ */
+static void uhci_transfer_result(struct uhci_hcd *uhci, struct urb *urb)
+{
+ int ret = -EINPROGRESS;
+ struct urb_priv *urbp;
+
+ spin_lock(&urb->lock);
+
+ urbp = (struct urb_priv *)urb->hcpriv;
+
+ if (urb->status != -EINPROGRESS) /* URB already dequeued */
+ goto out;
+
+ switch (usb_pipetype(urb->pipe)) {
+ case PIPE_CONTROL:
+ ret = uhci_result_control(uhci, urb);
+ break;
+ case PIPE_BULK:
+ case PIPE_INTERRUPT:
+ ret = uhci_result_common(uhci, urb);
+ break;
+ case PIPE_ISOCHRONOUS:
+ ret = uhci_result_isochronous(uhci, urb);
+ break;
+ }
+
+ if (ret == -EINPROGRESS)
+ goto out;
+ urb->status = ret;
+
+ switch (usb_pipetype(urb->pipe)) {
+ case PIPE_CONTROL:
+ case PIPE_BULK:
+ case PIPE_ISOCHRONOUS:
+ /* Release bandwidth for Interrupt or Isoc. transfers */
+ if (urb->bandwidth)
+ usb_release_bandwidth(urb->dev, urb, 1);
+ uhci_unlink_generic(uhci, urb);
+ break;
+ case PIPE_INTERRUPT:
+ /* Release bandwidth for Interrupt or Isoc. transfers */
+ /* Make sure we don't release if we have a queued URB */
+ if (list_empty(&urbp->queue_list) && urb->bandwidth)
+ usb_release_bandwidth(urb->dev, urb, 0);
+ else
+ /* bandwidth was passed on to queued URB, */
+ /* so don't let usb_unlink_urb() release it */
+ urb->bandwidth = 0;
+ uhci_unlink_generic(uhci, urb);
+ break;
+ default:
+ dev_info(uhci_dev(uhci), "%s: unknown pipe type %d "
+ "for urb %p\n",
+ __FUNCTION__, usb_pipetype(urb->pipe), urb);
+ }
+
+ /* Move it from uhci->urb_list to uhci->complete_list */
+ uhci_moveto_complete(uhci, urbp);
+
+out:
+ spin_unlock(&urb->lock);
+}
+
+static void uhci_unlink_generic(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct list_head *head;
+ struct uhci_td *td;
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+ int prevactive = 0;
+
+ 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 are 2 ways 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
+ *
+ * and a third way the first uncompleted TD is found:
+ *
+ * 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
+ *
+ * FIXME: The toggle fixups won't be 100% reliable until we
+ * change over to using a single queue for each endpoint and
+ * stop the queue before unlinking.
+ */
+ head = &urbp->td_list;
+ list_for_each_entry(td, head, list) {
+ unsigned int ctrlstat = td_status(td);
+
+ if (!(ctrlstat & TD_CTRL_ACTIVE) &&
+ (uhci_actual_length(ctrlstat) <
+ uhci_expected_length(td_token(td)) ||
+ td->list.next == head))
+ usb_settoggle(urb->dev, uhci_endpoint(td_token(td)),
+ uhci_packetout(td_token(td)),
+ uhci_toggle(td_token(td)) ^ 1);
+ else if ((ctrlstat & TD_CTRL_ACTIVE) && !prevactive)
+ usb_settoggle(urb->dev, uhci_endpoint(td_token(td)),
+ uhci_packetout(td_token(td)),
+ uhci_toggle(td_token(td)));
+
+ prevactive = ctrlstat & 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_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ unsigned long flags;
+ struct urb_priv *urbp;
+
+ spin_lock_irqsave(&uhci->lock, flags);
+ urbp = urb->hcpriv;
+ if (!urbp) /* URB was never linked! */
+ goto done;
+ list_del_init(&urbp->urb_list);
+
+ uhci_unlink_generic(uhci, urb);
+
+ uhci_get_current_frame_number(uhci);
+ if (uhci->frame_number + uhci->is_stopped != uhci->urb_remove_age) {
+ uhci_remove_pending_urbps(uhci);
+ uhci->urb_remove_age = uhci->frame_number;
+ }
+
+ /* If we're the first, set the next interrupt bit */
+ if (list_empty(&uhci->urb_remove_list))
+ uhci_set_next_interrupt(uhci);
+ list_add_tail(&urbp->urb_list, &uhci->urb_remove_list);
+
+done:
+ spin_unlock_irqrestore(&uhci->lock, flags);
+ return 0;
+}
+
+static int uhci_fsbr_timeout(struct uhci_hcd *uhci, struct urb *urb)
+{
+ struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
+ struct list_head *head;
+ struct uhci_td *td;
+ 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;
+ list_for_each_entry(td, head, list) {
+ /*
+ * 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 (td->list.next != head && (count % DEPTH_INTERVAL) ==
+ (DEPTH_INTERVAL - 1))
+ td->link |= UHCI_PTR_DEPTH;
+
+ count++;
+ }
+
+ return 0;
+}
+
+static void uhci_free_pending_qhs(struct uhci_hcd *uhci)
+{
+ struct uhci_qh *qh, *tmp;
+
+ list_for_each_entry_safe(qh, tmp, &uhci->qh_remove_list, remove_list) {
+ list_del_init(&qh->remove_list);
+
+ uhci_free_qh(uhci, qh);
+ }
+}
+
+static void uhci_free_pending_tds(struct uhci_hcd *uhci)
+{
+ struct uhci_td *td, *tmp;
+
+ list_for_each_entry_safe(td, tmp, &uhci->td_remove_list, remove_list) {
+ list_del_init(&td->remove_list);
+
+ uhci_free_td(uhci, td);
+ }
+}
+
+static void
+uhci_finish_urb(struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs)
+__releases(uhci->lock)
+__acquires(uhci->lock)
+{
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+
+ uhci_destroy_urb_priv(uhci, urb);
+
+ spin_unlock(&uhci->lock);
+ usb_hcd_giveback_urb(hcd, urb, regs);
+ spin_lock(&uhci->lock);
+}
+
+static void uhci_finish_completion(struct uhci_hcd *uhci, struct pt_regs *regs)
+{
+ struct urb_priv *urbp, *tmp;
+
+ list_for_each_entry_safe(urbp, tmp, &uhci->complete_list, urb_list) {
+ struct urb *urb = urbp->urb;
+
+ list_del_init(&urbp->urb_list);
+ uhci_finish_urb(uhci_to_hcd(uhci), urb, regs);
+ }
+}
+
+static void uhci_remove_pending_urbps(struct uhci_hcd *uhci)
+{
+
+ /* Splice the urb_remove_list onto the end of the complete_list */
+ list_splice_init(&uhci->urb_remove_list, uhci->complete_list.prev);
+}
+
+/* Process events in the schedule, but only in one thread at a time */
+static void uhci_scan_schedule(struct uhci_hcd *uhci, struct pt_regs *regs)
+{
+ struct urb_priv *urbp, *tmp;
+
+ /* Don't allow re-entrant calls */
+ if (uhci->scan_in_progress) {
+ uhci->need_rescan = 1;
+ return;
+ }
+ uhci->scan_in_progress = 1;
+ rescan:
+ uhci->need_rescan = 0;
+
+ uhci_get_current_frame_number(uhci);
+
+ if (uhci->frame_number + uhci->is_stopped != uhci->qh_remove_age)
+ uhci_free_pending_qhs(uhci);
+ if (uhci->frame_number + uhci->is_stopped != uhci->td_remove_age)
+ uhci_free_pending_tds(uhci);
+ if (uhci->frame_number + uhci->is_stopped != uhci->urb_remove_age)
+ uhci_remove_pending_urbps(uhci);
+
+ /* Walk the list of pending URBs to see which ones completed
+ * (must be _safe because uhci_transfer_result() dequeues URBs) */
+ list_for_each_entry_safe(urbp, tmp, &uhci->urb_list, urb_list) {
+ struct urb *urb = urbp->urb;
+
+ /* Checks the status and does all of the magic necessary */
+ uhci_transfer_result(uhci, urb);
+ }
+ uhci_finish_completion(uhci, regs);
+
+ /* If the controller is stopped, we can finish these off right now */
+ if (uhci->is_stopped) {
+ uhci_free_pending_qhs(uhci);
+ uhci_free_pending_tds(uhci);
+ uhci_remove_pending_urbps(uhci);
+ }
+
+ if (uhci->need_rescan)
+ goto rescan;
+ uhci->scan_in_progress = 0;
+
+ if (list_empty(&uhci->urb_remove_list) &&
+ list_empty(&uhci->td_remove_list) &&
+ list_empty(&uhci->qh_remove_list))
+ uhci_clear_next_interrupt(uhci);
+ else
+ uhci_set_next_interrupt(uhci);
+
+ /* Wake up anyone waiting for an URB to complete */
+ wake_up_all(&uhci->waitqh);
+}
diff --git a/drivers/usb/image/Kconfig b/drivers/usb/image/Kconfig
new file mode 100644
index 000000000000..95ce703110d2
--- /dev/null
+++ b/drivers/usb/image/Kconfig
@@ -0,0 +1,30 @@
+#
+# USB Imageing devices configuration
+#
+comment "USB Imaging devices"
+ depends on USB
+
+config USB_MDC800
+ tristate "USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)"
+ depends on USB && EXPERIMENTAL
+ ---help---
+ Say Y here if you want to connect this type of still camera to
+ your computer's USB port. This driver can be used with gphoto 0.4.3
+ and higher (look at <http://www.gphoto.org/>).
+ To use it create a device node with "mknod /dev/mustek c 180 32" and
+ configure it in your software.
+
+ To compile this driver as a module, choose M here: the
+ module will be called mdc800.
+
+config USB_MICROTEK
+ tristate "Microtek X6USB scanner support"
+ depends on USB && SCSI
+ help
+ Say Y here if you want support for the Microtek X6USB and
+ possibly the Phantom 336CX, Phantom C6 and ScanMaker V6U(S)L.
+ Support for anything but the X6 is experimental.
+ Please report failures and successes.
+ The scanner will appear as a scsi generic device to the rest
+ of the system. Scsi support is required.
+ This driver can be compiled as a module, called microtek.
diff --git a/drivers/usb/image/Makefile b/drivers/usb/image/Makefile
new file mode 100644
index 000000000000..4148ae306352
--- /dev/null
+++ b/drivers/usb/image/Makefile
@@ -0,0 +1,6 @@
+#
+# Makefile for USB Image drivers
+#
+
+obj-$(CONFIG_USB_MDC800) += mdc800.o
+obj-$(CONFIG_USB_MICROTEK) += microtek.o
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
new file mode 100644
index 000000000000..5791723e6083
--- /dev/null
+++ b/drivers/usb/image/mdc800.c
@@ -0,0 +1,1063 @@
+/*
+ * copyright (C) 1999/2000 by Henning Zabel <henning@uni-paderborn.de>
+ *
+ * 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.
+ */
+
+
+/*
+ * USB-Kernel Driver for the Mustek MDC800 Digital Camera
+ * (c) 1999/2000 Henning Zabel <henning@uni-paderborn.de>
+ *
+ *
+ * The driver brings the USB functions of the MDC800 to Linux.
+ * To use the Camera you must support the USB Protocoll of the camera
+ * to the Kernel Node.
+ * The Driver uses a misc device Node. Create it with :
+ * mknod /dev/mustek c 180 32
+ *
+ * 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 <oliver@neukum.name>
+ * (02/12/2001)
+ *
+ * Identify version on module load.
+ * (08/04/2001) gb
+ *
+ * version 0.7.5
+ * Fixed potential SMP races with Spinlocks.
+ * Thanks to Oliver Neukum <oliver@neukum.name> who
+ * noticed the race conditions.
+ * (30/10/2000)
+ *
+ * Fixed: Setting urb->dev before submitting urb.
+ * by Greg KH <greg@kroah.com>
+ * (13/10/2000)
+ *
+ * version 0.7.3
+ * bugfix : The mdc800->state field gets set to READY after the
+ * the diconnect function sets it to NOT_CONNECTED. This makes the
+ * driver running like the camera is connected and causes some
+ * hang ups.
+ *
+ * version 0.7.1
+ * MOD_INC and MOD_DEC are changed in usb_probe to prevent load/unload
+ * problems when compiled as Module.
+ * (04/04/2000)
+ *
+ * The mdc800 driver gets assigned the USB Minor 32-47. The Registration
+ * was updated to use these values.
+ * (26/03/2000)
+ *
+ * The Init und Exit Module Function are updated.
+ * (01/03/2000)
+ *
+ * version 0.7.0
+ * Rewrite of the driver : The driver now uses URB's. The old stuff
+ * has been removed.
+ *
+ * version 0.6.0
+ * Rewrite of this driver: The Emulation of the rs232 protocoll
+ * has been removed from the driver. A special executeCommand function
+ * for this driver is included to gphoto.
+ * The driver supports two kind of communication to bulk endpoints.
+ * Either with the dev->bus->ops->bulk... or with callback function.
+ * (09/11/1999)
+ *
+ * version 0.5.0:
+ * first Version that gets a version number. Most of the needed
+ * functions work.
+ * (20/10/1999)
+ */
+
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/spinlock.h>
+#include <linux/errno.h>
+#include <linux/random.h>
+#include <linux/poll.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/smp_lock.h>
+#include <linux/wait.h>
+
+#include <linux/usb.h>
+#include <linux/fs.h>
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.7.5 (30/10/2000)"
+#define DRIVER_AUTHOR "Henning Zabel <henning@uni-paderborn.de>"
+#define DRIVER_DESC "USB Driver for Mustek MDC800 Digital Camera"
+
+/* Vendor and Product Information */
+#define MDC800_VENDOR_ID 0x055f
+#define MDC800_PRODUCT_ID 0xa800
+
+/* Timeouts (msec) */
+#define TO_DOWNLOAD_GET_READY 1500
+#define TO_DOWNLOAD_GET_BUSY 1500
+#define TO_WRITE_GET_READY 1000
+#define TO_DEFAULT_COMMAND 5000
+#define TO_READ_FROM_IRQ TO_DEFAULT_COMMAND
+#define TO_GET_READY TO_DEFAULT_COMMAND
+
+/* Minor Number of the device (create with mknod /dev/mustek c 180 32) */
+#define MDC800_DEVICE_MINOR_BASE 32
+
+
+/**************************************************************************
+ Data and structs
+***************************************************************************/
+
+
+typedef enum {
+ NOT_CONNECTED, READY, WORKING, DOWNLOAD
+} mdc800_state;
+
+
+/* Data for the driver */
+struct mdc800_data
+{
+ struct usb_device * dev; // Device Data
+ mdc800_state state;
+
+ 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 ?
+
+
+ /* Device Data */
+ char out [64]; // Answer Buffer
+ int out_ptr; // Index to the first not readen byte
+ 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;
+
+ int pic_index; // Cache for the Imagesize (-1 for nothing cached )
+ int pic_len;
+ int minor;
+};
+
+
+/* Specification of the Endpoints */
+static struct usb_endpoint_descriptor mdc800_ed [4] =
+{
+ {
+ .bLength = 0,
+ .bDescriptorType = 0,
+ .bEndpointAddress = 0x01,
+ .bmAttributes = 0x02,
+ .wMaxPacketSize = __constant_cpu_to_le16(8),
+ .bInterval = 0,
+ .bRefresh = 0,
+ .bSynchAddress = 0,
+ },
+ {
+ .bLength = 0,
+ .bDescriptorType = 0,
+ .bEndpointAddress = 0x82,
+ .bmAttributes = 0x03,
+ .wMaxPacketSize = __constant_cpu_to_le16(8),
+ .bInterval = 0,
+ .bRefresh = 0,
+ .bSynchAddress = 0,
+ },
+ {
+ .bLength = 0,
+ .bDescriptorType = 0,
+ .bEndpointAddress = 0x03,
+ .bmAttributes = 0x02,
+ .wMaxPacketSize = __constant_cpu_to_le16(64),
+ .bInterval = 0,
+ .bRefresh = 0,
+ .bSynchAddress = 0,
+ },
+ {
+ .bLength = 0,
+ .bDescriptorType = 0,
+ .bEndpointAddress = 0x84,
+ .bmAttributes = 0x02,
+ .wMaxPacketSize = __constant_cpu_to_le16(64),
+ .bInterval = 0,
+ .bRefresh = 0,
+ .bSynchAddress = 0,
+ },
+};
+
+/* The Variable used by the driver */
+static struct mdc800_data* mdc800;
+
+
+/***************************************************************************
+ The USB Part of the driver
+****************************************************************************/
+
+static int mdc800_endpoint_equals (struct usb_endpoint_descriptor *a,struct usb_endpoint_descriptor *b)
+{
+ return (
+ ( a->bEndpointAddress == b->bEndpointAddress )
+ && ( a->bmAttributes == b->bmAttributes )
+ && ( a->wMaxPacketSize == b->wMaxPacketSize )
+ );
+}
+
+
+/*
+ * Checks whether the camera responds busy
+ */
+static int mdc800_isBusy (char* ch)
+{
+ int i=0;
+ while (i<8)
+ {
+ if (ch [i] != (char)0x99)
+ return 0;
+ i++;
+ }
+ return 1;
+}
+
+
+/*
+ * Checks whether the Camera is ready
+ */
+static int mdc800_isReady (char *ch)
+{
+ int i=0;
+ while (i<8)
+ {
+ if (ch [i] != (char)0xbb)
+ return 0;
+ i++;
+ }
+ return 1;
+}
+
+
+
+/*
+ * USB IRQ Handler for InputLine
+ */
+static void mdc800_usb_irq (struct urb *urb, struct pt_regs *res)
+{
+ int data_received=0, wake_up;
+ unsigned char* b=urb->transfer_buffer;
+ struct mdc800_data* mdc800=urb->context;
+
+ if (urb->status >= 0)
+ {
+
+ //dbg ("%i %i %i %i %i %i %i %i \n",b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7]);
+
+ if (mdc800_isBusy (b))
+ {
+ if (!mdc800->camera_busy)
+ {
+ mdc800->camera_busy=1;
+ dbg ("gets busy");
+ }
+ }
+ else
+ {
+ if (mdc800->camera_busy && mdc800_isReady (b))
+ {
+ mdc800->camera_busy=0;
+ dbg ("gets ready");
+ }
+ }
+ if (!(mdc800_isBusy (b) || mdc800_isReady (b)))
+ {
+ /* Store Data in camera_answer field */
+ dbg ("%i %i %i %i %i %i %i %i ",b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7]);
+
+ memcpy (mdc800->camera_response,b,8);
+ data_received=1;
+ }
+ }
+ wake_up= ( mdc800->camera_request_ready > 0 )
+ &&
+ (
+ ((mdc800->camera_request_ready == 1) && (!mdc800->camera_busy))
+ ||
+ ((mdc800->camera_request_ready == 2) && data_received)
+ ||
+ ((mdc800->camera_request_ready == 3) && (mdc800->camera_busy))
+ ||
+ (urb->status < 0)
+ );
+
+ if (wake_up)
+ {
+ mdc800->camera_request_ready=0;
+ mdc800->irq_woken=1;
+ wake_up (&mdc800->irq_wait);
+ }
+}
+
+
+/*
+ * Waits a while until the irq responds that camera is ready
+ *
+ * mode : 0: Wait for camera gets ready
+ * 1: Wait for receiving data
+ * 2: Wait for camera gets busy
+ *
+ * msec: Time to wait
+ */
+static int mdc800_usb_waitForIRQ (int mode, int msec)
+{
+ mdc800->camera_request_ready=1+mode;
+
+ wait_event_timeout(mdc800->irq_wait, mdc800->irq_woken, msec*HZ/1000);
+ mdc800->irq_woken = 0;
+
+ if (mdc800->camera_request_ready>0)
+ {
+ mdc800->camera_request_ready=0;
+ err ("timeout waiting for camera.");
+ return -1;
+ }
+
+ if (mdc800->state == NOT_CONNECTED)
+ {
+ warn ("Camera gets disconnected during waiting for irq.");
+ mdc800->camera_request_ready=0;
+ return -2;
+ }
+
+ return 0;
+}
+
+
+/*
+ * The write_urb callback function
+ */
+static void mdc800_usb_write_notify (struct urb *urb, struct pt_regs *res)
+{
+ struct mdc800_data* mdc800=urb->context;
+
+ if (urb->status != 0)
+ {
+ err ("writing command fails (status=%i)", urb->status);
+ }
+ else
+ {
+ mdc800->state=READY;
+ }
+ mdc800->written = 1;
+ wake_up (&mdc800->write_wait);
+}
+
+
+/*
+ * The download_urb callback function
+ */
+static void mdc800_usb_download_notify (struct urb *urb, struct pt_regs *res)
+{
+ struct mdc800_data* mdc800=urb->context;
+
+ if (urb->status == 0)
+ {
+ /* Fill output buffer with these data */
+ memcpy (mdc800->out, urb->transfer_buffer, 64);
+ mdc800->out_count=64;
+ mdc800->out_ptr=0;
+ mdc800->download_left-=64;
+ if (mdc800->download_left == 0)
+ {
+ mdc800->state=READY;
+ }
+ }
+ else
+ {
+ err ("request bytes fails (status:%i)", urb->status);
+ }
+ mdc800->downloaded = 1;
+ wake_up (&mdc800->download_wait);
+}
+
+
+/***************************************************************************
+ Probing for the Camera
+ ***************************************************************************/
+
+static struct usb_driver mdc800_usb_driver;
+static struct file_operations mdc800_device_ops;
+static struct usb_class_driver mdc800_class = {
+ .name = "usb/mdc800%d",
+ .fops = &mdc800_device_ops,
+ .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP,
+ .minor_base = MDC800_DEVICE_MINOR_BASE,
+};
+
+
+/*
+ * Callback to search the Mustek MDC800 on the USB Bus
+ */
+static int mdc800_usb_probe (struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ int i,j;
+ struct usb_host_interface *intf_desc;
+ struct usb_device *dev = interface_to_usbdev (intf);
+ int irq_interval=0;
+ int retval;
+
+ dbg ("(mdc800_usb_probe) called.");
+
+
+ if (mdc800->dev != NULL)
+ {
+ warn ("only one Mustek MDC800 is supported.");
+ return -ENODEV;
+ }
+
+ if (dev->descriptor.bNumConfigurations != 1)
+ {
+ err ("probe fails -> wrong Number of Configuration");
+ return -ENODEV;
+ }
+ intf_desc = intf->cur_altsetting;
+
+ if (
+ ( intf_desc->desc.bInterfaceClass != 0xff )
+ || ( intf_desc->desc.bInterfaceSubClass != 0 )
+ || ( intf_desc->desc.bInterfaceProtocol != 0 )
+ || ( intf_desc->desc.bNumEndpoints != 4)
+ )
+ {
+ err ("probe fails -> wrong Interface");
+ return -ENODEV;
+ }
+
+ /* Check the Endpoints */
+ for (i=0; i<4; i++)
+ {
+ mdc800->endpoint[i]=-1;
+ for (j=0; j<4; j++)
+ {
+ if (mdc800_endpoint_equals (&intf_desc->endpoint [j].desc,&mdc800_ed [i]))
+ {
+ mdc800->endpoint[i]=intf_desc->endpoint [j].desc.bEndpointAddress ;
+ if (i==1)
+ {
+ irq_interval=intf_desc->endpoint [j].desc.bInterval;
+ }
+
+ continue;
+ }
+ }
+ if (mdc800->endpoint[i] == -1)
+ {
+ err ("probe fails -> Wrong Endpoints.");
+ return -ENODEV;
+ }
+ }
+
+
+ info ("Found Mustek MDC800 on USB.");
+
+ down (&mdc800->io_lock);
+
+ retval = usb_register_dev(intf, &mdc800_class);
+ if (retval) {
+ err ("Not able to get a minor for this device.");
+ return -ENODEV;
+ }
+
+ mdc800->dev=dev;
+ mdc800->open=0;
+
+ /* Setup URB Structs */
+ usb_fill_int_urb (
+ mdc800->irq_urb,
+ mdc800->dev,
+ usb_rcvintpipe (mdc800->dev,mdc800->endpoint [1]),
+ mdc800->irq_urb_buffer,
+ 8,
+ mdc800_usb_irq,
+ mdc800,
+ irq_interval
+ );
+
+ usb_fill_bulk_urb (
+ mdc800->write_urb,
+ mdc800->dev,
+ usb_sndbulkpipe (mdc800->dev, mdc800->endpoint[0]),
+ mdc800->write_urb_buffer,
+ 8,
+ mdc800_usb_write_notify,
+ mdc800
+ );
+
+ usb_fill_bulk_urb (
+ mdc800->download_urb,
+ mdc800->dev,
+ usb_rcvbulkpipe (mdc800->dev, mdc800->endpoint [3]),
+ mdc800->download_urb_buffer,
+ 64,
+ mdc800_usb_download_notify,
+ mdc800
+ );
+
+ mdc800->state=READY;
+
+ up (&mdc800->io_lock);
+
+ usb_set_intfdata(intf, mdc800);
+ return 0;
+}
+
+
+/*
+ * Disconnect USB device (maybe the MDC800)
+ */
+static void mdc800_usb_disconnect (struct usb_interface *intf)
+{
+ struct mdc800_data* mdc800 = usb_get_intfdata(intf);
+
+ dbg ("(mdc800_usb_disconnect) called");
+
+ if (mdc800) {
+ if (mdc800->state == NOT_CONNECTED)
+ return;
+
+ usb_deregister_dev(intf, &mdc800_class);
+
+ mdc800->state=NOT_CONNECTED;
+
+ usb_kill_urb(mdc800->irq_urb);
+ usb_kill_urb(mdc800->write_urb);
+ usb_kill_urb(mdc800->download_urb);
+
+ mdc800->dev = NULL;
+ usb_set_intfdata(intf, NULL);
+ }
+ info ("Mustek MDC800 disconnected from USB.");
+}
+
+
+/***************************************************************************
+ The Misc device Part (file_operations)
+****************************************************************************/
+
+/*
+ * This Function calc the Answersize for a command.
+ */
+static int mdc800_getAnswerSize (char command)
+{
+ switch ((unsigned char) command)
+ {
+ case 0x2a:
+ case 0x49:
+ case 0x51:
+ case 0x0d:
+ case 0x20:
+ case 0x07:
+ case 0x01:
+ case 0x25:
+ case 0x00:
+ return 8;
+
+ case 0x05:
+ case 0x3e:
+ return mdc800->pic_len;
+
+ case 0x09:
+ return 4096;
+
+ default:
+ return 0;
+ }
+}
+
+
+/*
+ * Init the device: (1) alloc mem (2) Increase MOD Count ..
+ */
+static int mdc800_device_open (struct inode* inode, struct file *file)
+{
+ int retval=0;
+ int errn=0;
+
+ down (&mdc800->io_lock);
+
+ if (mdc800->state == NOT_CONNECTED)
+ {
+ errn=-EBUSY;
+ goto error_out;
+ }
+ if (mdc800->open)
+ {
+ errn=-EBUSY;
+ goto error_out;
+ }
+
+ mdc800->in_count=0;
+ mdc800->out_count=0;
+ mdc800->out_ptr=0;
+ mdc800->pic_index=0;
+ mdc800->pic_len=-1;
+ mdc800->download_left=0;
+
+ mdc800->camera_busy=0;
+ mdc800->camera_request_ready=0;
+
+ retval=0;
+ mdc800->irq_urb->dev = mdc800->dev;
+ if (usb_submit_urb (mdc800->irq_urb, GFP_KERNEL))
+ {
+ err ("request USB irq fails (submit_retval=%i urb_status=%i).",retval, mdc800->irq_urb->status);
+ errn = -EIO;
+ goto error_out;
+ }
+
+ mdc800->open=1;
+ dbg ("Mustek MDC800 device opened.");
+
+error_out:
+ up (&mdc800->io_lock);
+ return errn;
+}
+
+
+/*
+ * Close the Camera and release Memory
+ */
+static int mdc800_device_release (struct inode* inode, struct file *file)
+{
+ int retval=0;
+ dbg ("Mustek MDC800 device closed.");
+
+ down (&mdc800->io_lock);
+ if (mdc800->open && (mdc800->state != NOT_CONNECTED))
+ {
+ usb_kill_urb(mdc800->irq_urb);
+ usb_kill_urb(mdc800->write_urb);
+ usb_kill_urb(mdc800->download_urb);
+ mdc800->open=0;
+ }
+ else
+ {
+ retval=-EIO;
+ }
+
+ up(&mdc800->io_lock);
+ return retval;
+}
+
+
+/*
+ * The Device read callback Function
+ */
+static ssize_t mdc800_device_read (struct file *file, char __user *buf, size_t len, loff_t *pos)
+{
+ size_t left=len, sts=len; /* single transfer size */
+ char __user *ptr = buf;
+
+ 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;
+ }
+
+ while (left)
+ {
+ if (signal_pending (current))
+ {
+ up (&mdc800->io_lock);
+ return -EINTR;
+ }
+
+ sts=left > (mdc800->out_count-mdc800->out_ptr)?mdc800->out_count-mdc800->out_ptr:left;
+
+ if (sts <= 0)
+ {
+ /* Too less Data in buffer */
+ if (mdc800->state == DOWNLOAD)
+ {
+ mdc800->out_count=0;
+ mdc800->out_ptr=0;
+
+ /* Download -> Request new bytes */
+ mdc800->download_urb->dev = mdc800->dev;
+ if (usb_submit_urb (mdc800->download_urb, GFP_KERNEL))
+ {
+ err ("Can't submit download urb (status=%i)",mdc800->download_urb->status);
+ up (&mdc800->io_lock);
+ return len-left;
+ }
+ wait_event_timeout(mdc800->download_wait, mdc800->downloaded,
+ TO_DOWNLOAD_GET_READY*HZ/1000);
+ 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;
+ }
+ }
+ else
+ {
+ /* Copy Bytes */
+ if (copy_to_user(ptr, &mdc800->out [mdc800->out_ptr],
+ sts)) {
+ up(&mdc800->io_lock);
+ return -EFAULT;
+ }
+ ptr+=sts;
+ left-=sts;
+ mdc800->out_ptr+=sts;
+ }
+ }
+
+ up (&mdc800->io_lock);
+ return len-left;
+}
+
+
+/*
+ * The Device write callback Function
+ * If a 8Byte Command is received, it will be send to the camera.
+ * After this the driver initiates the request for the answer or
+ * just waits until the camera becomes ready.
+ */
+static ssize_t mdc800_device_write (struct file *file, const char __user *buf, size_t len, loff_t *pos)
+{
+ size_t i=0;
+
+ down (&mdc800->io_lock);
+ if (mdc800->state != READY)
+ {
+ up (&mdc800->io_lock);
+ return -EBUSY;
+ }
+ if (!mdc800->open )
+ {
+ up (&mdc800->io_lock);
+ return -EBUSY;
+ }
+
+ while (i<len)
+ {
+ unsigned char c;
+ if (signal_pending (current))
+ {
+ up (&mdc800->io_lock);
+ return -EINTR;
+ }
+
+ if(get_user(c, buf+i))
+ {
+ up(&mdc800->io_lock);
+ return -EFAULT;
+ }
+
+ /* check for command start */
+ if (c == 0x55)
+ {
+ mdc800->in_count=0;
+ mdc800->out_count=0;
+ mdc800->out_ptr=0;
+ mdc800->download_left=0;
+ }
+
+ /* save command byte */
+ if (mdc800->in_count < 8)
+ {
+ mdc800->in[mdc800->in_count] = c;
+ mdc800->in_count++;
+ }
+ else
+ {
+ up (&mdc800->io_lock);
+ return -EIO;
+ }
+
+ /* Command Buffer full ? -> send it to camera */
+ if (mdc800->in_count == 8)
+ {
+ int answersize;
+
+ if (mdc800_usb_waitForIRQ (0,TO_GET_READY))
+ {
+ err ("Camera didn't get ready.\n");
+ up (&mdc800->io_lock);
+ return -EIO;
+ }
+
+ answersize=mdc800_getAnswerSize (mdc800->in[1]);
+
+ mdc800->state=WORKING;
+ memcpy (mdc800->write_urb->transfer_buffer, mdc800->in,8);
+ mdc800->write_urb->dev = mdc800->dev;
+ if (usb_submit_urb (mdc800->write_urb, GFP_KERNEL))
+ {
+ err ("submitting write urb fails (status=%i)", mdc800->write_urb->status);
+ up (&mdc800->io_lock);
+ return -EIO;
+ }
+ wait_event_timeout(mdc800->write_wait, mdc800->written, TO_WRITE_GET_READY*HZ/1000);
+ mdc800->written = 0;
+ if (mdc800->state == WORKING)
+ {
+ usb_kill_urb(mdc800->write_urb);
+ up (&mdc800->io_lock);
+ return -EIO;
+ }
+
+ switch ((unsigned char) mdc800->in[1])
+ {
+ case 0x05: /* Download Image */
+ case 0x3e: /* Take shot in Fine Mode (WCam Mode) */
+ if (mdc800->pic_len < 0)
+ {
+ err ("call 0x07 before 0x05,0x3e");
+ mdc800->state=READY;
+ up (&mdc800->io_lock);
+ return -EIO;
+ }
+ mdc800->pic_len=-1;
+
+ case 0x09: /* Download Thumbnail */
+ mdc800->download_left=answersize+64;
+ mdc800->state=DOWNLOAD;
+ mdc800_usb_waitForIRQ (0,TO_DOWNLOAD_GET_BUSY);
+ break;
+
+
+ default:
+ if (answersize)
+ {
+
+ if (mdc800_usb_waitForIRQ (1,TO_READ_FROM_IRQ))
+ {
+ err ("requesting answer from irq fails");
+ up (&mdc800->io_lock);
+ return -EIO;
+ }
+
+ /* Write dummy data, (this is ugly but part of the USB Protocol */
+ /* if you use endpoint 1 as bulk and not as irq) */
+ memcpy (mdc800->out, mdc800->camera_response,8);
+
+ /* This is the interpreted answer */
+ memcpy (&mdc800->out[8], mdc800->camera_response,8);
+
+ mdc800->out_ptr=0;
+ mdc800->out_count=16;
+
+ /* Cache the Imagesize, if command was getImageSize */
+ if (mdc800->in [1] == (char) 0x07)
+ {
+ mdc800->pic_len=(int) 65536*(unsigned char) mdc800->camera_response[0]+256*(unsigned char) mdc800->camera_response[1]+(unsigned char) mdc800->camera_response[2];
+
+ dbg ("cached imagesize = %i",mdc800->pic_len);
+ }
+
+ }
+ else
+ {
+ if (mdc800_usb_waitForIRQ (0,TO_DEFAULT_COMMAND))
+ {
+ err ("Command Timeout.");
+ up (&mdc800->io_lock);
+ return -EIO;
+ }
+ }
+ mdc800->state=READY;
+ break;
+ }
+ }
+ i++;
+ }
+ up (&mdc800->io_lock);
+ return i;
+}
+
+
+/***************************************************************************
+ Init and Cleanup this driver (Structs and types)
+****************************************************************************/
+
+/* File Operations of this drivers */
+static struct file_operations mdc800_device_ops =
+{
+ .owner = THIS_MODULE,
+ .read = mdc800_device_read,
+ .write = mdc800_device_write,
+ .open = mdc800_device_open,
+ .release = mdc800_device_release,
+};
+
+
+
+static struct usb_device_id mdc800_table [] = {
+ { USB_DEVICE(MDC800_VENDOR_ID, MDC800_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, mdc800_table);
+/*
+ * USB Driver Struct for this device
+ */
+static struct usb_driver mdc800_usb_driver =
+{
+ .owner = THIS_MODULE,
+ .name = "mdc800",
+ .probe = mdc800_usb_probe,
+ .disconnect = mdc800_usb_disconnect,
+ .id_table = mdc800_table
+};
+
+
+
+/************************************************************************
+ Init and Cleanup this driver (Main Functions)
+*************************************************************************/
+
+#define try(A) if (!(A)) goto cleanup_on_fail;
+
+static int __init usb_mdc800_init (void)
+{
+ int retval = -ENODEV;
+ /* Allocate Memory */
+ try (mdc800=kmalloc (sizeof (struct mdc800_data), GFP_KERNEL));
+
+ memset(mdc800, 0, sizeof(struct mdc800_data));
+ mdc800->dev = NULL;
+ 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));
+
+ try (mdc800->irq_urb=usb_alloc_urb (0, GFP_KERNEL));
+ try (mdc800->download_urb=usb_alloc_urb (0, GFP_KERNEL));
+ try (mdc800->write_urb=usb_alloc_urb (0, GFP_KERNEL));
+
+ /* Register the driver */
+ retval = usb_register(&mdc800_usb_driver);
+ if (retval)
+ goto cleanup_on_fail;
+
+ info (DRIVER_VERSION ":" DRIVER_DESC);
+
+ return 0;
+
+ /* Clean driver up, when something fails */
+
+cleanup_on_fail:
+
+ if (mdc800 != NULL)
+ {
+ err ("can't alloc memory!");
+
+ kfree(mdc800->download_urb_buffer);
+ kfree(mdc800->write_urb_buffer);
+ kfree(mdc800->irq_urb_buffer);
+
+ usb_free_urb(mdc800->write_urb);
+ usb_free_urb(mdc800->download_urb);
+ usb_free_urb(mdc800->irq_urb);
+
+ kfree (mdc800);
+ }
+ mdc800 = NULL;
+ return retval;
+}
+
+
+static void __exit usb_mdc800_cleanup (void)
+{
+ usb_deregister (&mdc800_usb_driver);
+
+ usb_free_urb (mdc800->irq_urb);
+ usb_free_urb (mdc800->download_urb);
+ usb_free_urb (mdc800->write_urb);
+
+ kfree (mdc800->irq_urb_buffer);
+ kfree (mdc800->write_urb_buffer);
+ kfree (mdc800->download_urb_buffer);
+
+ kfree (mdc800);
+ mdc800 = NULL;
+}
+
+module_init (usb_mdc800_init);
+module_exit (usb_mdc800_cleanup);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c
new file mode 100644
index 000000000000..de0d32f6618d
--- /dev/null
+++ b/drivers/usb/image/microtek.c
@@ -0,0 +1,862 @@
+/* Driver for Microtek Scanmaker X6 USB scanner, and possibly others.
+ *
+ * (C) Copyright 2000 John Fremlin <vii@penguinpowered.com>
+ * (C) Copyright 2000 Oliver Neukum <Oliver.Neukum@lrz.uni-muenchen.de>
+ *
+ * Parts shamelessly stolen from usb-storage and copyright by their
+ * authors. Thanks to Matt Dharm for giving us permission!
+ *
+ * This driver implements a SCSI host controller driver and a USB
+ * device driver. To avoid confusion, all the USB related stuff is
+ * prefixed by mts_usb_ and all the SCSI stuff by mts_scsi_.
+ *
+ * Microtek (www.microtek.com) did not release the specifications for
+ * their USB protocol to us, so we had to reverse engineer them. We
+ * don't know for which models they are valid.
+ *
+ * The X6 USB has three bulk endpoints, one output (0x1) down which
+ * commands and outgoing data are sent, and two input: 0x82 from which
+ * normal data is read from the scanner (in packets of maximum 32
+ * bytes) and from which the status byte is read, and 0x83 from which
+ * the results of a scan (or preview) are read in up to 64 * 1024 byte
+ * chunks by the Windows driver. We don't know how much it is possible
+ * to read at a time from 0x83.
+ *
+ * It seems possible to read (with URB transfers) everything from 0x82
+ * in one go, without bothering to read in 32 byte chunks.
+ *
+ * There seems to be an optimisation of a further READ implicit if
+ * you simply read from 0x83.
+ *
+ * Guessed protocol:
+ *
+ * Send raw SCSI command to EP 0x1
+ *
+ * If there is data to receive:
+ * If the command was READ datatype=image:
+ * Read a lot of data from EP 0x83
+ * Else:
+ * Read data from EP 0x82
+ * Else:
+ * If there is data to transmit:
+ * Write it to EP 0x1
+ *
+ * Read status byte from EP 0x82
+ *
+ * References:
+ *
+ * The SCSI command set for the scanner is available from
+ * ftp://ftp.microtek.com/microtek/devpack/
+ *
+ * Microtek NV sent us a more up to date version of the document. If
+ * you want it, just send mail.
+ *
+ * Status:
+ *
+ * Untested with multiple scanners.
+ * Untested on SMP.
+ * Untested on a bigendian machine.
+ *
+ * History:
+ *
+ * 20000417 starting history
+ * 20000417 fixed load oops
+ * 20000417 fixed unload oops
+ * 20000419 fixed READ IMAGE detection
+ * 20000424 started conversion to use URBs
+ * 20000502 handled short transfers as errors
+ * 20000513 rename and organisation of functions (john)
+ * 20000513 added IDs for all products supported by Windows driver (john)
+ * 20000514 Rewrote mts_scsi_queuecommand to use URBs (john)
+ * 20000514 Version 0.0.8j
+ * 20000514 Fix reporting of non-existant devices to SCSI layer (john)
+ * 20000514 Added MTS_DEBUG_INT (john)
+ * 20000514 Changed "usb-microtek" to "microtek" for consistency (john)
+ * 20000514 Stupid bug fixes (john)
+ * 20000514 Version 0.0.9j
+ * 20000515 Put transfer context and URB in mts_desc (john)
+ * 20000515 Added prelim turn off debugging support (john)
+ * 20000515 Version 0.0.10j
+ * 20000515 Fixed up URB allocation (clear URB on alloc) (john)
+ * 20000515 Version 0.0.11j
+ * 20000516 Removed unnecessary spinlock in mts_transfer_context (john)
+ * 20000516 Removed unnecessary up on instance lock in mts_remove_nolock (john)
+ * 20000516 Implemented (badly) scsi_abort (john)
+ * 20000516 Version 0.0.12j
+ * 20000517 Hopefully removed mts_remove_nolock quasideadlock (john)
+ * 20000517 Added mts_debug_dump to print ll USB info (john)
+ * 20000518 Tweaks and documentation updates (john)
+ * 20000518 Version 0.0.13j
+ * 20000518 Cleaned up abort handling (john)
+ * 20000523 Removed scsi_command and various scsi_..._resets (john)
+ * 20000523 Added unlink URB on scsi_abort, now OHCI supports it (john)
+ * 20000523 Fixed last tiresome compile warning (john)
+ * 20000523 Version 0.0.14j (though version 0.1 has come out?)
+ * 20000602 Added primitive reset
+ * 20000602 Version 0.2.0
+ * 20000603 various cosmetic changes
+ * 20000603 Version 0.2.1
+ * 20000620 minor cosmetic changes
+ * 20000620 Version 0.2.2
+ * 20000822 Hopefully fixed deadlock in mts_remove_nolock()
+ * 20000822 Fixed minor race in mts_transfer_cleanup()
+ * 20000822 Fixed deadlock on submission error in queuecommand
+ * 20000822 Version 0.2.3
+ * 20000913 Reduced module size if debugging is off
+ * 20000913 Version 0.2.4
+ * 20010210 New abort logic
+ * 20010210 Version 0.3.0
+ * 20010217 Merged scatter/gather
+ * 20010218 Version 0.4.0
+ * 20010218 Cosmetic fixes
+ * 20010218 Version 0.4.1
+ * 20010306 Abort while using scatter/gather
+ * 20010306 Version 0.4.2
+ * 20010311 Remove all timeouts and tidy up generally (john)
+ * 20010320 check return value of scsi_register()
+ * 20010320 Version 0.4.3
+ * 20010408 Identify version on module load.
+ * 20011003 Fix multiple requests
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/errno.h>
+#include <linux/random.h>
+#include <linux/poll.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/smp_lock.h>
+#include <linux/usb.h>
+#include <linux/proc_fs.h>
+
+#include <asm/atomic.h>
+#include <linux/blkdev.h>
+#include "../../scsi/scsi.h"
+#include <scsi/scsi_host.h>
+
+#include "microtek.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.4.3"
+#define DRIVER_AUTHOR "John Fremlin <vii@penguinpowered.com>, Oliver Neukum <Oliver.Neukum@lrz.uni-muenchen.de>"
+#define DRIVER_DESC "Microtek Scanmaker X6 USB scanner driver"
+
+/* Should we do debugging? */
+
+//#define MTS_DO_DEBUG
+
+/* USB layer driver interface */
+
+static int mts_usb_probe(struct usb_interface *intf,
+ const struct usb_device_id *id);
+static void mts_usb_disconnect(struct usb_interface *intf);
+
+static struct usb_device_id mts_usb_ids [];
+
+static struct usb_driver mts_usb_driver = {
+ .owner = THIS_MODULE,
+ .name = "microtekX6",
+ .probe = mts_usb_probe,
+ .disconnect = mts_usb_disconnect,
+ .id_table = mts_usb_ids,
+};
+
+
+/* Internal driver stuff */
+
+#define MTS_VERSION "0.4.3"
+#define MTS_NAME "microtek usb (rev " MTS_VERSION "): "
+
+#define MTS_WARNING(x...) \
+ printk( KERN_WARNING MTS_NAME x )
+#define MTS_ERROR(x...) \
+ printk( KERN_ERR MTS_NAME x )
+#define MTS_INT_ERROR(x...) \
+ MTS_ERROR(x)
+#define MTS_MESSAGE(x...) \
+ printk( KERN_INFO MTS_NAME x )
+
+#if defined MTS_DO_DEBUG
+
+#define MTS_DEBUG(x...) \
+ printk( KERN_DEBUG MTS_NAME x )
+
+#define MTS_DEBUG_GOT_HERE() \
+ MTS_DEBUG("got to %s:%d (%s)\n", __FILE__, (int)__LINE__, __PRETTY_FUNCTION__ )
+#define MTS_DEBUG_INT() \
+ do { MTS_DEBUG_GOT_HERE(); \
+ MTS_DEBUG("transfer = 0x%x context = 0x%x\n",(int)transfer,(int)context ); \
+ MTS_DEBUG("status = 0x%x data-length = 0x%x sent = 0x%x\n",(int)transfer->status,(int)context->data_length, (int)transfer->actual_length ); \
+ mts_debug_dump(context->instance);\
+ } while(0)
+#else
+
+#define MTS_NUL_STATEMENT do { } while(0)
+
+#define MTS_DEBUG(x...) MTS_NUL_STATEMENT
+#define MTS_DEBUG_GOT_HERE() MTS_NUL_STATEMENT
+#define MTS_DEBUG_INT() MTS_NUL_STATEMENT
+
+#endif
+
+
+
+#define MTS_INT_INIT()\
+ struct mts_transfer_context* context = (struct mts_transfer_context*)transfer->context; \
+ MTS_DEBUG_INT();\
+
+#ifdef MTS_DO_DEBUG
+
+static inline void mts_debug_dump(struct mts_desc* desc) {
+ MTS_DEBUG("desc at 0x%x: toggle = %02x%02x\n",
+ (int)desc,
+ (int)desc->usb_dev->toggle[1],(int)desc->usb_dev->toggle[0]
+ );
+ MTS_DEBUG("ep_out=%x ep_response=%x ep_image=%x\n",
+ usb_sndbulkpipe(desc->usb_dev,desc->ep_out),
+ usb_rcvbulkpipe(desc->usb_dev,desc->ep_response),
+ usb_rcvbulkpipe(desc->usb_dev,desc->ep_image)
+ );
+}
+
+
+static inline void mts_show_command(Scsi_Cmnd *srb)
+{
+ char *what = NULL;
+
+ switch (srb->cmnd[0]) {
+ case TEST_UNIT_READY: what = "TEST_UNIT_READY"; break;
+ case REZERO_UNIT: what = "REZERO_UNIT"; break;
+ case REQUEST_SENSE: what = "REQUEST_SENSE"; break;
+ case FORMAT_UNIT: what = "FORMAT_UNIT"; break;
+ case READ_BLOCK_LIMITS: what = "READ_BLOCK_LIMITS"; break;
+ case REASSIGN_BLOCKS: what = "REASSIGN_BLOCKS"; break;
+ case READ_6: what = "READ_6"; break;
+ case WRITE_6: what = "WRITE_6"; break;
+ case SEEK_6: what = "SEEK_6"; break;
+ case READ_REVERSE: what = "READ_REVERSE"; break;
+ case WRITE_FILEMARKS: what = "WRITE_FILEMARKS"; break;
+ case SPACE: what = "SPACE"; break;
+ case INQUIRY: what = "INQUIRY"; break;
+ case RECOVER_BUFFERED_DATA: what = "RECOVER_BUFFERED_DATA"; break;
+ case MODE_SELECT: what = "MODE_SELECT"; break;
+ case RESERVE: what = "RESERVE"; break;
+ case RELEASE: what = "RELEASE"; break;
+ case COPY: what = "COPY"; break;
+ case ERASE: what = "ERASE"; break;
+ case MODE_SENSE: what = "MODE_SENSE"; break;
+ case START_STOP: what = "START_STOP"; break;
+ case RECEIVE_DIAGNOSTIC: what = "RECEIVE_DIAGNOSTIC"; break;
+ case SEND_DIAGNOSTIC: what = "SEND_DIAGNOSTIC"; break;
+ case ALLOW_MEDIUM_REMOVAL: what = "ALLOW_MEDIUM_REMOVAL"; break;
+ case SET_WINDOW: what = "SET_WINDOW"; break;
+ case READ_CAPACITY: what = "READ_CAPACITY"; break;
+ case READ_10: what = "READ_10"; break;
+ case WRITE_10: what = "WRITE_10"; break;
+ case SEEK_10: what = "SEEK_10"; break;
+ case WRITE_VERIFY: what = "WRITE_VERIFY"; break;
+ case VERIFY: what = "VERIFY"; break;
+ case SEARCH_HIGH: what = "SEARCH_HIGH"; break;
+ case SEARCH_EQUAL: what = "SEARCH_EQUAL"; break;
+ case SEARCH_LOW: what = "SEARCH_LOW"; break;
+ case SET_LIMITS: what = "SET_LIMITS"; break;
+ case READ_POSITION: what = "READ_POSITION"; break;
+ case SYNCHRONIZE_CACHE: what = "SYNCHRONIZE_CACHE"; break;
+ case LOCK_UNLOCK_CACHE: what = "LOCK_UNLOCK_CACHE"; break;
+ case READ_DEFECT_DATA: what = "READ_DEFECT_DATA"; break;
+ case MEDIUM_SCAN: what = "MEDIUM_SCAN"; break;
+ case COMPARE: what = "COMPARE"; break;
+ case COPY_VERIFY: what = "COPY_VERIFY"; break;
+ case WRITE_BUFFER: what = "WRITE_BUFFER"; break;
+ case READ_BUFFER: what = "READ_BUFFER"; break;
+ case UPDATE_BLOCK: what = "UPDATE_BLOCK"; break;
+ case READ_LONG: what = "READ_LONG"; break;
+ case WRITE_LONG: what = "WRITE_LONG"; break;
+ case CHANGE_DEFINITION: what = "CHANGE_DEFINITION"; break;
+ case WRITE_SAME: what = "WRITE_SAME"; break;
+ case READ_TOC: what = "READ_TOC"; break;
+ case LOG_SELECT: what = "LOG_SELECT"; break;
+ case LOG_SENSE: what = "LOG_SENSE"; break;
+ case MODE_SELECT_10: what = "MODE_SELECT_10"; break;
+ case MODE_SENSE_10: what = "MODE_SENSE_10"; break;
+ case MOVE_MEDIUM: what = "MOVE_MEDIUM"; break;
+ case READ_12: what = "READ_12"; break;
+ case WRITE_12: what = "WRITE_12"; break;
+ case WRITE_VERIFY_12: what = "WRITE_VERIFY_12"; break;
+ case SEARCH_HIGH_12: what = "SEARCH_HIGH_12"; break;
+ case SEARCH_EQUAL_12: what = "SEARCH_EQUAL_12"; break;
+ case SEARCH_LOW_12: what = "SEARCH_LOW_12"; break;
+ case READ_ELEMENT_STATUS: what = "READ_ELEMENT_STATUS"; break;
+ case SEND_VOLUME_TAG: what = "SEND_VOLUME_TAG"; break;
+ case WRITE_LONG_2: what = "WRITE_LONG_2"; break;
+ default:
+ MTS_DEBUG("can't decode command\n");
+ goto out;
+ break;
+ }
+ MTS_DEBUG( "Command %s (%d bytes)\n", what, srb->cmd_len);
+
+ out:
+ MTS_DEBUG( " %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ srb->cmnd[0], srb->cmnd[1], srb->cmnd[2], srb->cmnd[3], srb->cmnd[4], srb->cmnd[5],
+ srb->cmnd[6], srb->cmnd[7], srb->cmnd[8], srb->cmnd[9]);
+}
+
+#else
+
+static inline void mts_show_command(Scsi_Cmnd * dummy)
+{
+}
+
+static inline void mts_debug_dump(struct mts_desc* dummy)
+{
+}
+
+#endif
+
+static inline void mts_urb_abort(struct mts_desc* desc) {
+ MTS_DEBUG_GOT_HERE();
+ mts_debug_dump(desc);
+
+ usb_kill_urb( desc->urb );
+}
+
+static int mts_scsi_abort (Scsi_Cmnd *srb)
+{
+ struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]);
+
+ MTS_DEBUG_GOT_HERE();
+
+ mts_urb_abort(desc);
+
+ return SCSI_ABORT_PENDING;
+}
+
+static int mts_scsi_host_reset (Scsi_Cmnd *srb)
+{
+ struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]);
+ int result, rc;
+
+ MTS_DEBUG_GOT_HERE();
+ mts_debug_dump(desc);
+
+ rc = usb_lock_device_for_reset(desc->usb_dev, desc->usb_intf);
+ if (rc < 0)
+ return FAILED;
+ result = usb_reset_device(desc->usb_dev);;
+ if (rc)
+ usb_unlock_device(desc->usb_dev);
+ return result ? FAILED : SUCCESS;
+}
+
+static
+int mts_scsi_queuecommand (Scsi_Cmnd *srb, mts_scsi_cmnd_callback callback );
+
+static void mts_transfer_cleanup( struct urb *transfer );
+static void mts_do_sg(struct urb * transfer, struct pt_regs *regs);
+
+
+inline static
+void mts_int_submit_urb (struct urb* transfer,
+ int pipe,
+ void* data,
+ unsigned length,
+ usb_complete_t callback )
+/* Interrupt context! */
+
+/* Holding transfer->context->lock! */
+{
+ int res;
+
+ MTS_INT_INIT();
+
+ usb_fill_bulk_urb(transfer,
+ context->instance->usb_dev,
+ pipe,
+ data,
+ length,
+ callback,
+ context
+ );
+
+ transfer->status = 0;
+
+ res = usb_submit_urb( transfer, GFP_ATOMIC );
+ if ( unlikely(res) ) {
+ MTS_INT_ERROR( "could not submit URB! Error was %d\n",(int)res );
+ context->srb->result = DID_ERROR << 16;
+ mts_transfer_cleanup(transfer);
+ }
+ return;
+}
+
+
+static void mts_transfer_cleanup( struct urb *transfer )
+/* Interrupt context! */
+{
+ MTS_INT_INIT();
+
+ if ( likely(context->final_callback != NULL) )
+ context->final_callback(context->srb);
+
+}
+
+static void mts_transfer_done( struct urb *transfer, struct pt_regs *regs )
+{
+ MTS_INT_INIT();
+
+ context->srb->result &= MTS_SCSI_ERR_MASK;
+ context->srb->result |= (unsigned)context->status<<1;
+
+ mts_transfer_cleanup(transfer);
+
+ return;
+}
+
+
+static void mts_get_status( struct urb *transfer )
+/* Interrupt context! */
+{
+ MTS_INT_INIT();
+
+ mts_int_submit_urb(transfer,
+ usb_rcvbulkpipe(context->instance->usb_dev,
+ context->instance->ep_response),
+ &context->status,
+ 1,
+ mts_transfer_done );
+}
+
+static void mts_data_done( struct urb* transfer, struct pt_regs *regs )
+/* Interrupt context! */
+{
+ MTS_INT_INIT();
+
+ if ( context->data_length != transfer->actual_length ) {
+ context->srb->resid = context->data_length - transfer->actual_length;
+ } else if ( unlikely(transfer->status) ) {
+ context->srb->result = (transfer->status == -ENOENT ? DID_ABORT : DID_ERROR)<<16;
+ }
+
+ mts_get_status(transfer);
+
+ return;
+}
+
+
+static void mts_command_done( struct urb *transfer, struct pt_regs *regs )
+/* Interrupt context! */
+{
+ MTS_INT_INIT();
+
+ if ( unlikely(transfer->status) ) {
+ if (transfer->status == -ENOENT) {
+ /* We are being killed */
+ MTS_DEBUG_GOT_HERE();
+ context->srb->result = DID_ABORT<<16;
+ } else {
+ /* A genuine error has occurred */
+ MTS_DEBUG_GOT_HERE();
+
+ context->srb->result = DID_ERROR<<16;
+ }
+ mts_transfer_cleanup(transfer);
+
+ return;
+ }
+
+ if (context->srb->cmnd[0] == REQUEST_SENSE) {
+ mts_int_submit_urb(transfer,
+ context->data_pipe,
+ context->srb->sense_buffer,
+ context->data_length,
+ mts_data_done);
+ } else { if ( context->data ) {
+ mts_int_submit_urb(transfer,
+ context->data_pipe,
+ context->data,
+ context->data_length,
+ context->srb->use_sg ? mts_do_sg : mts_data_done);
+ } else {
+ mts_get_status(transfer);
+ }
+ }
+
+ return;
+}
+
+static void mts_do_sg (struct urb* transfer, struct pt_regs *regs)
+{
+ struct scatterlist * sg;
+ MTS_INT_INIT();
+
+ MTS_DEBUG("Processing fragment %d of %d\n", context->fragment,context->srb->use_sg);
+
+ if (unlikely(transfer->status)) {
+ context->srb->result = (transfer->status == -ENOENT ? DID_ABORT : DID_ERROR)<<16;
+ mts_transfer_cleanup(transfer);
+ }
+
+ sg = context->srb->buffer;
+ context->fragment++;
+ mts_int_submit_urb(transfer,
+ context->data_pipe,
+ page_address(sg[context->fragment].page) +
+ sg[context->fragment].offset,
+ sg[context->fragment].length,
+ context->fragment + 1 == context->srb->use_sg ? mts_data_done : mts_do_sg);
+ return;
+}
+
+static const u8 mts_read_image_sig[] = { 0x28, 00, 00, 00 };
+static const u8 mts_read_image_sig_len = 4;
+static const unsigned char mts_direction[256/8] = {
+ 0x28, 0x81, 0x14, 0x14, 0x20, 0x01, 0x90, 0x77,
+ 0x0C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+
+#define MTS_DIRECTION_IS_IN(x) ((mts_direction[x>>3] >> (x & 7)) & 1)
+
+static void
+mts_build_transfer_context( Scsi_Cmnd *srb, struct mts_desc* desc )
+{
+ int pipe;
+ struct scatterlist * sg;
+
+ MTS_DEBUG_GOT_HERE();
+
+ desc->context.instance = desc;
+ desc->context.srb = srb;
+ desc->context.fragment = 0;
+
+ if (!srb->use_sg) {
+ if ( !srb->bufflen ){
+ desc->context.data = NULL;
+ desc->context.data_length = 0;
+ return;
+ } else {
+ desc->context.data = srb->buffer;
+ desc->context.data_length = srb->bufflen;
+ MTS_DEBUG("length = %d or %d\n",
+ srb->request_bufflen, srb->bufflen);
+ }
+ } else {
+ MTS_DEBUG("Using scatter/gather\n");
+ sg = srb->buffer;
+ desc->context.data = page_address(sg[0].page) + sg[0].offset;
+ desc->context.data_length = sg[0].length;
+ }
+
+
+ /* can't rely on srb->sc_data_direction */
+
+ /* Brutally ripped from usb-storage */
+
+ if ( !memcmp( srb->cmnd, mts_read_image_sig, mts_read_image_sig_len )
+) { pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_image);
+ MTS_DEBUG( "transfering from desc->ep_image == %d\n",
+ (int)desc->ep_image );
+ } else if ( MTS_DIRECTION_IS_IN(srb->cmnd[0]) ) {
+ pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_response);
+ MTS_DEBUG( "transfering from desc->ep_response == %d\n",
+ (int)desc->ep_response);
+ } else {
+ MTS_DEBUG("transfering to desc->ep_out == %d\n",
+ (int)desc->ep_out);
+ pipe = usb_sndbulkpipe(desc->usb_dev,desc->ep_out);
+ }
+ desc->context.data_pipe = pipe;
+}
+
+
+static
+int mts_scsi_queuecommand( Scsi_Cmnd *srb, mts_scsi_cmnd_callback callback )
+{
+ struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]);
+ int err = 0;
+ int res;
+
+ MTS_DEBUG_GOT_HERE();
+ mts_show_command(srb);
+ mts_debug_dump(desc);
+
+ if ( srb->device->lun || srb->device->id || srb->device->channel ) {
+
+ MTS_DEBUG("Command to LUN=%d ID=%d CHANNEL=%d from SCSI layer\n",(int)srb->device->lun,(int)srb->device->id, (int)srb->device->channel );
+
+ MTS_DEBUG("this device doesn't exist\n");
+
+ srb->result = DID_BAD_TARGET << 16;
+
+ if(likely(callback != NULL))
+ callback(srb);
+
+ goto out;
+ }
+
+
+ usb_fill_bulk_urb(desc->urb,
+ desc->usb_dev,
+ usb_sndbulkpipe(desc->usb_dev,desc->ep_out),
+ srb->cmnd,
+ srb->cmd_len,
+ mts_command_done,
+ &desc->context
+ );
+
+
+ mts_build_transfer_context( srb, desc );
+ desc->context.final_callback = callback;
+
+ /* here we need ATOMIC as we are called with the iolock */
+ res=usb_submit_urb(desc->urb, GFP_ATOMIC);
+
+ if(unlikely(res)){
+ MTS_ERROR("error %d submitting URB\n",(int)res);
+ srb->result = DID_ERROR << 16;
+
+ if(likely(callback != NULL))
+ callback(srb);
+
+ }
+
+out:
+ return err;
+}
+
+static Scsi_Host_Template mts_scsi_host_template = {
+ .module = THIS_MODULE,
+ .name = "microtekX6",
+ .proc_name = "microtekX6",
+ .queuecommand = mts_scsi_queuecommand,
+ .eh_abort_handler = mts_scsi_abort,
+ .eh_host_reset_handler = mts_scsi_host_reset,
+ .sg_tablesize = SG_ALL,
+ .can_queue = 1,
+ .this_id = -1,
+ .cmd_per_lun = 1,
+ .use_clustering = 1,
+ .emulated = 1,
+};
+
+struct vendor_product
+{
+ char* name;
+ enum
+ {
+ mts_sup_unknown=0,
+ mts_sup_alpha,
+ mts_sup_full
+ }
+ support_status;
+} ;
+
+
+/* These are taken from the msmUSB.inf file on the Windows driver CD */
+const static struct vendor_product mts_supported_products[] =
+{
+ { "Phantom 336CX", mts_sup_unknown},
+ { "Phantom 336CX", mts_sup_unknown},
+ { "Scanmaker X6", mts_sup_alpha},
+ { "Phantom C6", mts_sup_unknown},
+ { "Phantom 336CX", mts_sup_unknown},
+ { "ScanMaker V6USL", mts_sup_unknown},
+ { "ScanMaker V6USL", mts_sup_unknown},
+ { "Scanmaker V6UL", mts_sup_unknown},
+ { "Scanmaker V6UPL", mts_sup_alpha},
+};
+
+/* The entries of microtek_table must correspond, line-by-line to
+ the entries of mts_supported_products[]. */
+
+static struct usb_device_id mts_usb_ids [] =
+{
+ { USB_DEVICE(0x4ce, 0x0300) },
+ { USB_DEVICE(0x5da, 0x0094) },
+ { USB_DEVICE(0x5da, 0x0099) },
+ { USB_DEVICE(0x5da, 0x009a) },
+ { USB_DEVICE(0x5da, 0x00a0) },
+ { USB_DEVICE(0x5da, 0x00a3) },
+ { USB_DEVICE(0x5da, 0x80a3) },
+ { USB_DEVICE(0x5da, 0x80ac) },
+ { USB_DEVICE(0x5da, 0x00b6) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, mts_usb_ids);
+
+
+static int mts_usb_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ int i;
+ int ep_out = -1;
+ int ep_in_set[3]; /* this will break if we have more than three endpoints
+ which is why we check */
+ int *ep_in_current = ep_in_set;
+ int err_retval = -ENOMEM;
+
+ struct mts_desc * new_desc;
+ struct vendor_product const* p;
+ struct usb_device *dev = interface_to_usbdev (intf);
+
+ /* the current altsetting on the interface we're probing */
+ struct usb_host_interface *altsetting;
+
+ MTS_DEBUG_GOT_HERE();
+ MTS_DEBUG( "usb-device descriptor at %x\n", (int)dev );
+
+ MTS_DEBUG( "product id = 0x%x, vendor id = 0x%x\n",
+ le16_to_cpu(dev->descriptor.idProduct),
+ le16_to_cpu(dev->descriptor.idVendor) );
+
+ MTS_DEBUG_GOT_HERE();
+
+ p = &mts_supported_products[id - mts_usb_ids];
+
+ MTS_DEBUG_GOT_HERE();
+
+ MTS_DEBUG( "found model %s\n", p->name );
+ if ( p->support_status != mts_sup_full )
+ MTS_MESSAGE( "model %s is not known to be fully supported, reports welcome!\n",
+ p->name );
+
+ /* the current altsetting on the interface we're probing */
+ altsetting = intf->cur_altsetting;
+
+
+ /* Check if the config is sane */
+
+ if ( altsetting->desc.bNumEndpoints != MTS_EP_TOTAL ) {
+ MTS_WARNING( "expecting %d got %d endpoints! Bailing out.\n",
+ (int)MTS_EP_TOTAL, (int)altsetting->desc.bNumEndpoints );
+ return -ENODEV;
+ }
+
+ for( i = 0; i < altsetting->desc.bNumEndpoints; i++ ) {
+ if ((altsetting->endpoint[i].desc.bmAttributes &
+ USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK) {
+
+ MTS_WARNING( "can only deal with bulk endpoints; endpoint %d is not bulk.\n",
+ (int)altsetting->endpoint[i].desc.bEndpointAddress );
+ } else {
+ if (altsetting->endpoint[i].desc.bEndpointAddress &
+ USB_DIR_IN)
+ *ep_in_current++
+ = altsetting->endpoint[i].desc.bEndpointAddress &
+ USB_ENDPOINT_NUMBER_MASK;
+ else {
+ if ( ep_out != -1 ) {
+ MTS_WARNING( "can only deal with one output endpoints. Bailing out." );
+ return -ENODEV;
+ }
+
+ ep_out = altsetting->endpoint[i].desc.bEndpointAddress &
+ USB_ENDPOINT_NUMBER_MASK;
+ }
+ }
+
+ }
+
+
+ if ( ep_out == -1 ) {
+ MTS_WARNING( "couldn't find an output bulk endpoint. Bailing out.\n" );
+ return -ENODEV;
+ }
+
+
+ new_desc = kmalloc(sizeof(struct mts_desc), GFP_KERNEL);
+ if (!new_desc)
+ goto out;
+
+ memset(new_desc, 0, sizeof(*new_desc));
+ new_desc->urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!new_desc->urb)
+ goto out_kfree;
+
+ new_desc->usb_dev = dev;
+ new_desc->usb_intf = intf;
+ init_MUTEX(&new_desc->lock);
+
+ /* endpoints */
+ new_desc->ep_out = ep_out;
+ new_desc->ep_response = ep_in_set[0];
+ new_desc->ep_image = ep_in_set[1];
+
+ if ( new_desc->ep_out != MTS_EP_OUT )
+ MTS_WARNING( "will this work? Command EP is not usually %d\n",
+ (int)new_desc->ep_out );
+
+ if ( new_desc->ep_response != MTS_EP_RESPONSE )
+ MTS_WARNING( "will this work? Response EP is not usually %d\n",
+ (int)new_desc->ep_response );
+
+ if ( new_desc->ep_image != MTS_EP_IMAGE )
+ MTS_WARNING( "will this work? Image data EP is not usually %d\n",
+ (int)new_desc->ep_image );
+
+ new_desc->host = scsi_host_alloc(&mts_scsi_host_template,
+ sizeof(new_desc));
+ if (!new_desc->host)
+ goto out_free_urb;
+
+ new_desc->host->hostdata[0] = (unsigned long)new_desc;
+ if (scsi_add_host(new_desc->host, NULL)) {
+ err_retval = -EIO;
+ goto out_free_urb;
+ }
+ scsi_scan_host(new_desc->host);
+
+ usb_set_intfdata(intf, new_desc);
+ return 0;
+
+ out_free_urb:
+ usb_free_urb(new_desc->urb);
+ out_kfree:
+ kfree(new_desc);
+ out:
+ return err_retval;
+}
+
+static void mts_usb_disconnect (struct usb_interface *intf)
+{
+ struct mts_desc *desc = usb_get_intfdata(intf);
+
+ usb_set_intfdata(intf, NULL);
+
+ usb_kill_urb(desc->urb);
+ scsi_remove_host(desc->host);
+
+ scsi_host_put(desc->host);
+ usb_free_urb(desc->urb);
+ kfree(desc);
+}
+
+
+static int __init microtek_drv_init(void)
+{
+ return usb_register(&mts_usb_driver);
+}
+
+static void __exit microtek_drv_exit(void)
+{
+ usb_deregister(&mts_usb_driver);
+}
+
+module_init(microtek_drv_init);
+module_exit(microtek_drv_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+
diff --git a/drivers/usb/image/microtek.h b/drivers/usb/image/microtek.h
new file mode 100644
index 000000000000..3271deb8c001
--- /dev/null
+++ b/drivers/usb/image/microtek.h
@@ -0,0 +1,55 @@
+ /*
+ * Driver for Microtek Scanmaker X6 USB scanner and possibly others.
+ *
+ * (C) Copyright 2000 John Fremlin <vii@penguinpowered.com>
+ * (C) Copyright 2000 Oliver Neukum <Oliver.Neukum@lrz.uni-muenchen.de>
+ *
+ * See microtek.c for history
+ *
+ */
+
+typedef void (*mts_scsi_cmnd_callback)(Scsi_Cmnd *);
+
+
+struct mts_transfer_context
+{
+ struct mts_desc* instance;
+ mts_scsi_cmnd_callback final_callback;
+ Scsi_Cmnd *srb;
+
+ void* data;
+ unsigned data_length;
+ int data_pipe;
+ int fragment;
+
+ u8 status; /* status returned from ep_response after command completion */
+};
+
+
+struct mts_desc {
+ struct mts_desc *next;
+ struct mts_desc *prev;
+
+ struct usb_device *usb_dev;
+ struct usb_interface *usb_intf;
+
+ /* Endpoint addresses */
+ u8 ep_out;
+ u8 ep_response;
+ u8 ep_image;
+
+ struct Scsi_Host * host;
+ struct semaphore lock;
+
+ struct urb *urb;
+ struct mts_transfer_context context;
+};
+
+
+#define MTS_EP_OUT 0x1
+#define MTS_EP_RESPONSE 0x2
+#define MTS_EP_IMAGE 0x3
+#define MTS_EP_TOTAL 0x3
+
+#define MTS_SCSI_ERR_MASK ~0x3fu
+
diff --git a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig
new file mode 100644
index 000000000000..d28e7eab6f98
--- /dev/null
+++ b/drivers/usb/input/Kconfig
@@ -0,0 +1,237 @@
+#
+# USB Input driver configuration
+#
+comment "USB Input Devices"
+ depends on USB
+
+config USB_HID
+ tristate "USB Human Interface Device (full HID) support"
+ depends on USB
+ ---help---
+ Say Y here if you want full HID support to connect keyboards,
+ mice, joysticks, graphic tablets, or any other HID based devices
+ to your computer via USB. You also need to select HID Input layer
+ support (below) if you want to use keyboards, mice, joysticks and
+ the like ... as well as Uninterruptible Power Supply (UPS) and
+ monitor control devices.
+
+ You can't use this driver and the HIDBP (Boot Protocol) keyboard
+ and mouse drivers at the same time. More information is available:
+ <file:Documentation/input/input.txt>.
+
+ If unsure, say Y.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usbhid.
+
+comment "Input core support is needed for USB HID input layer or HIDBP support"
+ depends on USB_HID && INPUT=n
+
+config USB_HIDINPUT
+ bool "HID input layer support"
+ default y
+ depends on INPUT && USB_HID
+ help
+ Say Y here if you want to use a USB keyboard, mouse or joystick,
+ or any other HID input device.
+
+ If unsure, say Y.
+
+config HID_FF
+ bool "Force feedback support (EXPERIMENTAL)"
+ depends on USB_HIDINPUT && EXPERIMENTAL
+ help
+ Say Y here is you want force feedback support for a few HID devices.
+ See below for a list of supported devices.
+
+ See <file:Documentation/input/ff.txt> for a description of the force
+ feedback API.
+
+ If unsure, say N.
+
+config HID_PID
+ bool "PID Devices (Microsoft Sidewinder Force Feedback 2)"
+ depends on HID_FF
+ help
+ Say Y here if you have a PID-compliant joystick and wish to enable force
+ feedback for it. The Microsoft Sidewinder Force Feedback 2 is one such
+ device.
+
+config LOGITECH_FF
+ bool "Logitech WingMan *3D support"
+ depends on HID_FF
+ help
+ Say Y here if you have one of these devices:
+ - Logitech WingMan Cordless RumblePad
+ - Logitech WingMan Force 3D
+ and if you want to enable force feedback for them.
+ Note: if you say N here, this device will still be supported, but without
+ force feedback.
+
+config THRUSTMASTER_FF
+ bool "ThrustMaster FireStorm Dual Power 2 support (EXPERIMENTAL)"
+ depends on HID_FF && EXPERIMENTAL
+ help
+ Say Y here if you have a THRUSTMASTER FireStore Dual Power 2,
+ and want to enable force feedback support for it.
+ Note: if you say N here, this device will still be supported, but without
+ force feedback.
+
+config USB_HIDDEV
+ bool "/dev/hiddev raw HID device support"
+ depends on USB_HID
+ help
+ Say Y here if you want to support HID devices (from the USB
+ specification standpoint) that aren't strictly user interface
+ devices, like monitor controls and Uninterruptable Power Supplies.
+
+ This module supports these devices separately using a separate
+ event interface on /dev/usb/hiddevX (char 180:96 to 180:111).
+
+ If unsure, say Y.
+
+menu "USB HID Boot Protocol drivers"
+ depends on USB!=n && USB_HID!=y
+
+config USB_KBD
+ tristate "USB HIDBP Keyboard (simple Boot) support"
+ depends on USB && INPUT
+ ---help---
+ Say Y here only if you are absolutely sure that you don't want
+ to use the generic HID driver for your USB keyboard and prefer
+ to use the keyboard in its limited Boot Protocol mode instead.
+
+ This is almost certainly not what you want. This is mostly
+ useful for embedded applications or simple keyboards.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usbkbd.
+
+ If even remotely unsure, say N.
+
+config USB_MOUSE
+ tristate "USB HIDBP Mouse (simple Boot) support"
+ depends on USB && INPUT
+ ---help---
+ Say Y here only if you are absolutely sure that you don't want
+ to use the generic HID driver for your USB mouse and prefer
+ to use the mouse in its limited Boot Protocol mode instead.
+
+ This is almost certainly not what you want. This is mostly
+ useful for embedded applications or simple mice.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usbmouse.
+
+ If even remotely unsure, say N.
+
+endmenu
+
+config USB_AIPTEK
+ tristate "Aiptek 6000U/8000U tablet support"
+ depends on USB && INPUT
+ help
+ Say Y here if you want to use the USB version of the Aiptek 6000U
+ or Aiptek 8000U tablet. Make sure to say Y to "Mouse support"
+ (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
+ (CONFIG_INPUT_EVDEV) as well.
+
+ To compile this driver as a module, choose M here: the
+ module will be called aiptek.
+
+config USB_WACOM
+ tristate "Wacom Intuos/Graphire tablet support"
+ depends on USB && INPUT
+ help
+ Say Y here if you want to use the USB version of the Wacom Intuos
+ or Graphire tablet. Make sure to say Y to "Mouse support"
+ (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
+ (CONFIG_INPUT_EVDEV) as well.
+
+ To compile this driver as a module, choose M here: the
+ module will be called wacom.
+
+config USB_KBTAB
+ tristate "KB Gear JamStudio tablet support"
+ depends on USB && INPUT
+ help
+ Say Y here if you want to use the USB version of the KB Gear
+ JamStudio tablet. Make sure to say Y to "Mouse support"
+ (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
+ (CONFIG_INPUT_EVDEV) as well.
+
+ To compile this driver as a module, choose M here: the
+ module will be called kbtab.
+
+config USB_POWERMATE
+ tristate "Griffin PowerMate and Contour Jog support"
+ depends on USB && INPUT
+ ---help---
+ Say Y here if you want to use Griffin PowerMate or Contour Jog devices.
+ These are aluminum dials which can measure clockwise and anticlockwise
+ rotation. The dial also acts as a pushbutton. The base contains an LED
+ which can be instructed to pulse or to switch to a particular intensity.
+
+ You can download userspace tools from
+ <http://sowerbutts.com/powermate/>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called powermate.
+
+config USB_MTOUCH
+ tristate "MicroTouch USB Touchscreen Driver"
+ depends on USB && INPUT
+ ---help---
+ Say Y here if you want to use a MicroTouch (Now 3M) USB
+ Touchscreen controller.
+
+ See <file:Documentation/usb/mtouch.txt> for additional information.
+
+ To compile this driver as a module, choose M here: the
+ module will be called mtouchusb.
+
+config USB_EGALAX
+ tristate "eGalax TouchKit USB Touchscreen Driver"
+ depends on USB && INPUT
+ ---help---
+ Say Y here if you want to use a eGalax TouchKit USB
+ Touchscreen controller.
+
+ The driver has been tested on a Xenarc 700TSV monitor
+ with eGalax touchscreen.
+
+ Have a look at <http://linux.chapter7.ch/touchkit/> for
+ a usage description and the required user-space stuff.
+
+ To compile this driver as a module, choose M here: the
+ module will be called touchkitusb.
+
+config USB_XPAD
+ tristate "X-Box gamepad support"
+ depends on USB && INPUT
+ ---help---
+ Say Y here if you want to use the X-Box pad with your computer.
+ Make sure to say Y to "Joystick support" (CONFIG_INPUT_JOYDEV)
+ and/or "Event interface support" (CONFIG_INPUT_EVDEV) as well.
+
+ For information about how to connect the X-Box pad to USB, see
+ <file:Documentation/input/xpad.txt>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called xpad.
+
+config USB_ATI_REMOTE
+ tristate "ATI / X10 USB RF remote control"
+ depends on USB && INPUT
+ ---help---
+ Say Y here if you want to use an ATI or X10 "Lola" USB remote control.
+ These are RF remotes with USB receivers.
+ The ATI remote comes with many of ATI's All-In-Wonder video cards.
+ The X10 "Lola" remote is available at:
+ <http://www.x10.com/products/lola_sg1.htm>
+ This driver provides mouse pointer, left and right mouse buttons,
+ and maps all the other remote buttons to keypress events.
+
+ To compile this driver as a module, choose M here: the module will be
+ called ati_remote.
+
diff --git a/drivers/usb/input/Makefile b/drivers/usb/input/Makefile
new file mode 100644
index 000000000000..6bcedd16b0a1
--- /dev/null
+++ b/drivers/usb/input/Makefile
@@ -0,0 +1,39 @@
+#
+# Makefile for the USB input drivers
+#
+
+# Multipart objects.
+usbhid-objs := hid-core.o
+
+# Optional parts of multipart objects.
+
+ifeq ($(CONFIG_USB_HIDDEV),y)
+ usbhid-objs += hiddev.o
+endif
+ifeq ($(CONFIG_USB_HIDINPUT),y)
+ usbhid-objs += hid-input.o
+endif
+ifeq ($(CONFIG_HID_PID),y)
+ usbhid-objs += pid.o
+endif
+ifeq ($(CONFIG_LOGITECH_FF),y)
+ usbhid-objs += hid-lgff.o
+endif
+ifeq ($(CONFIG_THRUSTMASTER_FF),y)
+ usbhid-objs += hid-tmff.o
+endif
+ifeq ($(CONFIG_HID_FF),y)
+ usbhid-objs += hid-ff.o
+endif
+
+obj-$(CONFIG_USB_AIPTEK) += aiptek.o
+obj-$(CONFIG_USB_ATI_REMOTE) += ati_remote.o
+obj-$(CONFIG_USB_HID) += usbhid.o
+obj-$(CONFIG_USB_KBD) += usbkbd.o
+obj-$(CONFIG_USB_KBTAB) += kbtab.o
+obj-$(CONFIG_USB_MOUSE) += usbmouse.o
+obj-$(CONFIG_USB_MTOUCH) += mtouchusb.o
+obj-$(CONFIG_USB_EGALAX) += touchkitusb.o
+obj-$(CONFIG_USB_POWERMATE) += powermate.o
+obj-$(CONFIG_USB_WACOM) += wacom.o
+obj-$(CONFIG_USB_XPAD) += xpad.o
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
new file mode 100644
index 000000000000..d7fea9ea301b
--- /dev/null
+++ b/drivers/usb/input/aiptek.c
@@ -0,0 +1,2283 @@
+/*
+ * Native support for the Aiptek HyperPen USB Tablets
+ * (4000U/5000U/6000U/8000U/12000U)
+ *
+ * Copyright (c) 2001 Chris Atenasio <chris@crud.net>
+ * Copyright (c) 2002-2004 Bryan W. Headley <bwheadley@earthlink.net>
+ *
+ * based on wacom.c by
+ * Vojtech Pavlik <vojtech@suse.cz>
+ * Andreas Bach Aaen <abach@stofanet.dk>
+ * Clifford Wolf <clifford@clifford.at>
+ * Sam Mosel <sam.mosel@computer.org>
+ * James E. Blair <corvus@gnu.org>
+ * Daniel Egger <egger@suse.de>
+ *
+ * Many thanks to Oliver Kuechemann for his support.
+ *
+ * ChangeLog:
+ * v0.1 - Initial release
+ * v0.2 - Hack to get around fake event 28's. (Bryan W. Headley)
+ * v0.3 - Make URB dynamic (Bryan W. Headley, Jun-8-2002)
+ * Released to Linux 2.4.19 and 2.5.x
+ * v0.4 - Rewrote substantial portions of the code to deal with
+ * corrected control sequences, timing, dynamic configuration,
+ * support of 6000U - 12000U, procfs, and macro key support
+ * (Jan-1-2003 - Feb-5-2003, Bryan W. Headley)
+ * v1.0 - Added support for diagnostic messages, count of messages
+ * received from URB - Mar-8-2003, Bryan W. Headley
+ * v1.1 - added support for tablet resolution, changed DV and proximity
+ * some corrections - Jun-22-2003, martin schneebacher
+ * - Added support for the sysfs interface, deprecating the
+ * procfs interface for 2.5.x kernel. Also added support for
+ * Wheel command. Bryan W. Headley July-15-2003.
+ * v1.2 - Reworked jitter timer as a kernel thread.
+ * Bryan W. Headley November-28-2003/Jan-10-2004.
+ * v1.3 - Repaired issue of kernel thread going nuts on single-processor
+ * machines, introduced programmableDelay as a command line
+ * parameter. Feb 7 2004, Bryan W. Headley.
+ * v1.4 - Re-wire jitter so it does not require a thread. Courtesy of
+ * Rene van Paassen. Added reporting of physical pointer device
+ * (e.g., stylus, mouse in reports 2, 3, 4, 5. We don't know
+ * for reports 1, 6.)
+ * what physical device reports for reports 1, 6.) Also enabled
+ * MOUSE and LENS tool button modes. Renamed "rubber" to "eraser".
+ * Feb 20, 2004, Bryan W. Headley.
+ * v1.5 - Added previousJitterable, so we don't do jitter delay when the
+ * user is holding a button down for periods of time.
+ *
+ * NOTE:
+ * This kernel driver is augmented by the "Aiptek" XFree86 input
+ * driver for your X server, as well as the Gaiptek GUI Front-end
+ * "Tablet Manager".
+ * These three products are highly interactive with one another,
+ * so therefore it's easier to document them all as one subsystem.
+ * Please visit the project's "home page", located at,
+ * http://aiptektablet.sourceforge.net.
+ *
+ * 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 <linux/jiffies.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/input.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+#include <linux/sched.h>
+#include <asm/uaccess.h>
+#include <asm/unaligned.h>
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.5 (May-15-2004)"
+#define DRIVER_AUTHOR "Bryan W. Headley/Chris Atenasio"
+#define DRIVER_DESC "Aiptek HyperPen USB Tablet Driver (Linux 2.6.x)"
+
+/*
+ * Aiptek status packet:
+ *
+ * (returned as Report 1 - relative coordinates from mouse and stylus)
+ *
+ * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
+ * byte0 0 0 0 0 0 0 0 1
+ * byte1 0 0 0 0 0 BS2 BS Tip
+ * byte2 X7 X6 X5 X4 X3 X2 X1 X0
+ * byte3 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
+ *
+ * (returned as Report 2 - absolute coordinates from the stylus)
+ *
+ * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
+ * byte0 0 0 0 0 0 0 1 0
+ * byte1 X7 X6 X5 X4 X3 X2 X1 X0
+ * byte2 X15 X14 X13 X12 X11 X10 X9 X8
+ * byte3 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
+ * byte4 Y15 Y14 Y13 Y12 Y11 Y10 Y9 Y8
+ * byte5 * * * BS2 BS1 Tip IR DV
+ * byte6 P7 P6 P5 P4 P3 P2 P1 P0
+ * byte7 P15 P14 P13 P12 P11 P10 P9 P8
+ *
+ * (returned as Report 3 - absolute coordinates from the mouse)
+ *
+ * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
+ * byte0 0 0 0 0 0 0 1 0
+ * byte1 X7 X6 X5 X4 X3 X2 X1 X0
+ * byte2 X15 X14 X13 X12 X11 X10 X9 X8
+ * byte3 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
+ * byte4 Y15 Y14 Y13 Y12 Y11 Y10 Y9 Y8
+ * byte5 * * * BS2 BS1 Tip IR DV
+ * byte6 P7 P6 P5 P4 P3 P2 P1 P0
+ * byte7 P15 P14 P13 P12 P11 P10 P9 P8
+ *
+ * (returned as Report 4 - macrokeys from the stylus)
+ *
+ * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
+ * byte0 0 0 0 0 0 1 0 0
+ * byte1 0 0 0 BS2 BS Tip IR DV
+ * byte2 0 0 0 0 0 0 1 0
+ * byte3 0 0 0 K4 K3 K2 K1 K0
+ * byte4 P7 P6 P5 P4 P3 P2 P1 P0
+ * byte5 P15 P14 P13 P12 P11 P10 P9 P8
+ *
+ * (returned as Report 5 - macrokeys from the mouse)
+ *
+ * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
+ * byte0 0 0 0 0 0 1 0 0
+ * byte1 0 0 0 BS2 BS Tip IR DV
+ * byte2 0 0 0 0 0 0 1 0
+ * byte3 0 0 0 K4 K3 K2 K1 K0
+ * byte4 P7 P6 P5 P4 P3 P2 P1 P0
+ * byte5 P15 P14 P13 P12 P11 P10 P9 P8
+ *
+ * IR: In Range = Proximity on
+ * DV = Data Valid
+ * BS = Barrel Switch (as in, macro keys)
+ * BS2 also referred to as Tablet Pick
+ *
+ * Command Summary:
+ *
+ * Use report_type CONTROL (3)
+ * Use report_id 2
+ *
+ * Command/Data Description Return Bytes Return Value
+ * 0x10/0x00 SwitchToMouse 0
+ * 0x10/0x01 SwitchToTablet 0
+ * 0x18/0x04 SetResolution 0
+ * 0x12/0xFF AutoGainOn 0
+ * 0x17/0x00 FilterOn 0
+ * 0x01/0x00 GetXExtension 2 MaxX
+ * 0x01/0x01 GetYExtension 2 MaxY
+ * 0x02/0x00 GetModelCode 2 ModelCode = LOBYTE
+ * 0x03/0x00 GetODMCode 2 ODMCode
+ * 0x08/0x00 GetPressureLevels 2 =512
+ * 0x04/0x00 GetFirmwareVersion 2 Firmware Version
+ * 0x11/0x02 EnableMacroKeys 0
+ *
+ * To initialize the tablet:
+ *
+ * (1) Send Resolution500LPI (Command)
+ * (2) Query for Model code (Option Report)
+ * (3) Query for ODM code (Option Report)
+ * (4) Query for firmware (Option Report)
+ * (5) Query for GetXExtension (Option Report)
+ * (6) Query for GetYExtension (Option Report)
+ * (7) Query for GetPressureLevels (Option Report)
+ * (8) SwitchToTablet for Absolute coordinates, or
+ * SwitchToMouse for Relative coordinates (Command)
+ * (9) EnableMacroKeys (Command)
+ * (10) FilterOn (Command)
+ * (11) AutoGainOn (Command)
+ *
+ * (Step 9 can be omitted, but you'll then have no function keys.)
+ */
+
+#define USB_VENDOR_ID_AIPTEK 0x08ca
+#define USB_REQ_GET_REPORT 0x01
+#define USB_REQ_SET_REPORT 0x09
+
+ /* PointerMode codes
+ */
+#define AIPTEK_POINTER_ONLY_MOUSE_MODE 0
+#define AIPTEK_POINTER_ONLY_STYLUS_MODE 1
+#define AIPTEK_POINTER_EITHER_MODE 2
+
+#define AIPTEK_POINTER_ALLOW_MOUSE_MODE(a) \
+ (a == AIPTEK_POINTER_ONLY_MOUSE_MODE || \
+ a == AIPTEK_POINTER_EITHER_MODE)
+#define AIPTEK_POINTER_ALLOW_STYLUS_MODE(a) \
+ (a == AIPTEK_POINTER_ONLY_STYLUS_MODE || \
+ a == AIPTEK_POINTER_EITHER_MODE)
+
+ /* CoordinateMode code
+ */
+#define AIPTEK_COORDINATE_RELATIVE_MODE 0
+#define AIPTEK_COORDINATE_ABSOLUTE_MODE 1
+
+ /* XTilt and YTilt values
+ */
+#define AIPTEK_TILT_MIN (-128)
+#define AIPTEK_TILT_MAX 127
+#define AIPTEK_TILT_DISABLE (-10101)
+
+ /* Wheel values
+ */
+#define AIPTEK_WHEEL_MIN 0
+#define AIPTEK_WHEEL_MAX 1024
+#define AIPTEK_WHEEL_DISABLE (-10101)
+
+ /* ToolCode values, which BTW are 0x140 .. 0x14f
+ * We have things set up such that if TOOL_BUTTON_FIRED_BIT is
+ * not set, we'll send one instance of AIPTEK_TOOL_BUTTON_xxx.
+ *
+ * Whenever the user resets the value, TOOL_BUTTON_FIRED_BIT will
+ * get reset.
+ */
+#define TOOL_BUTTON(x) ((x) & 0x14f)
+#define TOOL_BUTTON_FIRED(x) ((x) & 0x200)
+#define TOOL_BUTTON_FIRED_BIT 0x200
+ /* toolMode codes
+ */
+#define AIPTEK_TOOL_BUTTON_PEN_MODE BTN_TOOL_PEN
+#define AIPTEK_TOOL_BUTTON_PEN_MODE BTN_TOOL_PEN
+#define AIPTEK_TOOL_BUTTON_PENCIL_MODE BTN_TOOL_PENCIL
+#define AIPTEK_TOOL_BUTTON_BRUSH_MODE BTN_TOOL_BRUSH
+#define AIPTEK_TOOL_BUTTON_AIRBRUSH_MODE BTN_TOOL_AIRBRUSH
+#define AIPTEK_TOOL_BUTTON_ERASER_MODE BTN_TOOL_RUBBER
+#define AIPTEK_TOOL_BUTTON_MOUSE_MODE BTN_TOOL_MOUSE
+#define AIPTEK_TOOL_BUTTON_LENS_MODE BTN_TOOL_LENS
+
+ /* Diagnostic message codes
+ */
+#define AIPTEK_DIAGNOSTIC_NA 0
+#define AIPTEK_DIAGNOSTIC_SENDING_RELATIVE_IN_ABSOLUTE 1
+#define AIPTEK_DIAGNOSTIC_SENDING_ABSOLUTE_IN_RELATIVE 2
+#define AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED 3
+
+ /* Time to wait (in ms) to help mask hand jittering
+ * when pressing the stylus buttons.
+ */
+#define AIPTEK_JITTER_DELAY_DEFAULT 50
+
+ /* Time to wait (in ms) in-between sending the tablet
+ * a command and beginning the process of reading the return
+ * sequence from the tablet.
+ */
+#define AIPTEK_PROGRAMMABLE_DELAY_25 25
+#define AIPTEK_PROGRAMMABLE_DELAY_50 50
+#define AIPTEK_PROGRAMMABLE_DELAY_100 100
+#define AIPTEK_PROGRAMMABLE_DELAY_200 200
+#define AIPTEK_PROGRAMMABLE_DELAY_300 300
+#define AIPTEK_PROGRAMMABLE_DELAY_400 400
+#define AIPTEK_PROGRAMMABLE_DELAY_DEFAULT AIPTEK_PROGRAMMABLE_DELAY_400
+
+ /* Mouse button programming
+ */
+#define AIPTEK_MOUSE_LEFT_BUTTON 0x01
+#define AIPTEK_MOUSE_RIGHT_BUTTON 0x02
+#define AIPTEK_MOUSE_MIDDLE_BUTTON 0x04
+
+ /* Stylus button programming
+ */
+#define AIPTEK_STYLUS_LOWER_BUTTON 0x08
+#define AIPTEK_STYLUS_UPPER_BUTTON 0x10
+
+ /* Length of incoming packet from the tablet
+ */
+#define AIPTEK_PACKET_LENGTH 8
+
+ /* We report in EV_MISC both the proximity and
+ * whether the report came from the stylus, tablet mouse
+ * or "unknown" -- Unknown when the tablet is in relative
+ * mode, because we only get report 1's.
+ */
+#define AIPTEK_REPORT_TOOL_UNKNOWN 0x10
+#define AIPTEK_REPORT_TOOL_STYLUS 0x20
+#define AIPTEK_REPORT_TOOL_MOUSE 0x40
+
+static int programmableDelay = AIPTEK_PROGRAMMABLE_DELAY_DEFAULT;
+static int jitterDelay = AIPTEK_JITTER_DELAY_DEFAULT;
+
+struct aiptek_features {
+ int odmCode; /* Tablet manufacturer code */
+ int modelCode; /* Tablet model code (not unique) */
+ int firmwareCode; /* prom/eeprom version */
+ char usbPath[64 + 1]; /* device's physical usb path */
+ char inputPath[64 + 1]; /* input device path */
+};
+
+struct aiptek_settings {
+ int pointerMode; /* stylus-, mouse-only or either */
+ int coordinateMode; /* absolute/relative coords */
+ int toolMode; /* pen, pencil, brush, etc. tool */
+ int xTilt; /* synthetic xTilt amount */
+ int yTilt; /* synthetic yTilt amount */
+ int wheel; /* synthetic wheel amount */
+ int stylusButtonUpper; /* stylus upper btn delivers... */
+ int stylusButtonLower; /* stylus lower btn delivers... */
+ int mouseButtonLeft; /* mouse left btn delivers... */
+ int mouseButtonMiddle; /* mouse middle btn delivers... */
+ int mouseButtonRight; /* mouse right btn delivers... */
+ int programmableDelay; /* delay for tablet programming */
+ int jitterDelay; /* delay for hand jittering */
+};
+
+struct aiptek {
+ struct input_dev inputdev; /* input device struct */
+ struct usb_device *usbdev; /* usb device struct */
+ struct urb *urb; /* urb for incoming reports */
+ dma_addr_t data_dma; /* our dma stuffage */
+ struct aiptek_features features; /* tablet's array of features */
+ struct aiptek_settings curSetting; /* tablet's current programmable */
+ struct aiptek_settings newSetting; /* ... and new param settings */
+ unsigned int ifnum; /* interface number for IO */
+ int openCount; /* module use counter */
+ int diagnostic; /* tablet diagnostic codes */
+ unsigned long eventCount; /* event count */
+ int inDelay; /* jitter: in jitter delay? */
+ unsigned long endDelay; /* jitter: time when delay ends */
+ int previousJitterable; /* jitterable prev value */
+ unsigned char *data; /* incoming packet data */
+};
+
+/*
+ * Permit easy lookup of keyboard events to send, versus
+ * the bitmap which comes from the tablet. This hides the
+ * issue that the F_keys are not sequentially numbered.
+ */
+static int macroKeyEvents[] = {
+ KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5,
+ KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11,
+ KEY_F12, KEY_F13, KEY_F14, KEY_F15, KEY_F16, KEY_F17,
+ KEY_F18, KEY_F19, KEY_F20, KEY_F21, KEY_F22, KEY_F23,
+ KEY_F24, KEY_STOP, KEY_AGAIN, KEY_PROPS, KEY_UNDO,
+ KEY_FRONT, KEY_COPY, KEY_OPEN, KEY_PASTE, 0
+};
+
+/***********************************************************************
+ * Relative reports deliver values in 2's complement format to
+ * deal with negative offsets.
+ */
+static int aiptek_convert_from_2s_complement(unsigned char c)
+{
+ int ret;
+ unsigned char b = c;
+ int negate = 0;
+
+ if ((b & 0x80) != 0) {
+ b = ~b;
+ b--;
+ negate = 1;
+ }
+ ret = b;
+ ret = (negate == 1) ? -ret : ret;
+ return ret;
+}
+
+/***********************************************************************
+ * aiptek_irq can receive one of six potential reports.
+ * The documentation for each is in the body of the function.
+ *
+ * The tablet reports on several attributes per invocation of
+ * aiptek_irq. Because the Linux Input Event system allows the
+ * transmission of ONE attribute per input_report_xxx() call,
+ * collation has to be done on the other end to reconstitute
+ * a complete tablet report. Further, the number of Input Event reports
+ * submitted varies, depending on what USB report type, and circumstance.
+ * To deal with this, EV_MSC is used to indicate an 'end-of-report'
+ * message. This has been an undocumented convention understood by the kernel
+ * tablet driver and clients such as gpm and XFree86's tablet drivers.
+ *
+ * Of the information received from the tablet, the one piece I
+ * cannot transmit is the proximity bit (without resorting to an EV_MSC
+ * convention above.) I therefore have taken over REL_MISC and ABS_MISC
+ * (for relative and absolute reports, respectively) for communicating
+ * Proximity. Why two events? I thought it interesting to know if the
+ * Proximity event occured while the tablet was in absolute or relative
+ * mode.
+ *
+ * Other tablets use the notion of a certain minimum stylus pressure
+ * to infer proximity. While that could have been done, that is yet
+ * another 'by convention' behavior, the documentation for which
+ * would be spread between two (or more) pieces of software.
+ *
+ * EV_MSC usage was terminated for this purpose in Linux 2.5.x, and
+ * replaced with the input_sync() method (which emits EV_SYN.)
+ */
+
+static void aiptek_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct aiptek *aiptek = urb->context;
+ unsigned char *data = aiptek->data;
+ struct input_dev *inputdev = &aiptek->inputdev;
+ int jitterable = 0;
+ int retval, macro, x, y, z, left, right, middle, p, dv, tip, bs, pck;
+
+ switch (urb->status) {
+ case 0:
+ /* Success */
+ break;
+
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* This urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d",
+ __FUNCTION__, urb->status);
+ return;
+
+ default:
+ dbg("%s - nonzero urb status received: %d",
+ __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ /* See if we are in a delay loop -- throw out report if true.
+ */
+ if (aiptek->inDelay == 1 && time_after(aiptek->endDelay, jiffies)) {
+ goto exit;
+ }
+
+ aiptek->inDelay = 0;
+ aiptek->eventCount++;
+
+ /* Report 1 delivers relative coordinates with either a stylus
+ * or the mouse. You do not know, however, which input
+ * tool generated the event.
+ */
+ if (data[0] == 1) {
+ if (aiptek->curSetting.coordinateMode ==
+ AIPTEK_COORDINATE_ABSOLUTE_MODE) {
+ aiptek->diagnostic =
+ AIPTEK_DIAGNOSTIC_SENDING_RELATIVE_IN_ABSOLUTE;
+ } else {
+ input_regs(inputdev, regs);
+
+ x = aiptek_convert_from_2s_complement(data[2]);
+ y = aiptek_convert_from_2s_complement(data[3]);
+
+ /* jitterable keeps track of whether any button has been pressed.
+ * We're also using it to remap the physical mouse button mask
+ * to pseudo-settings. (We don't specifically care about it's
+ * value after moving/transposing mouse button bitmasks, except
+ * that a non-zero value indicates that one or more
+ * mouse button was pressed.)
+ */
+ jitterable = data[5] & 0x07;
+
+ left = (data[5] & aiptek->curSetting.mouseButtonLeft) != 0 ? 1 : 0;
+ right = (data[5] & aiptek->curSetting.mouseButtonRight) != 0 ? 1 : 0;
+ middle = (data[5] & aiptek->curSetting.mouseButtonMiddle) != 0 ? 1 : 0;
+
+ input_report_key(inputdev, BTN_LEFT, left);
+ input_report_key(inputdev, BTN_MIDDLE, middle);
+ input_report_key(inputdev, BTN_RIGHT, right);
+ input_report_rel(inputdev, REL_X, x);
+ input_report_rel(inputdev, REL_Y, y);
+ input_report_rel(inputdev, REL_MISC, 1 | AIPTEK_REPORT_TOOL_UNKNOWN);
+
+ /* Wheel support is in the form of a single-event
+ * firing.
+ */
+ if (aiptek->curSetting.wheel != AIPTEK_WHEEL_DISABLE) {
+ input_report_rel(inputdev, REL_WHEEL,
+ aiptek->curSetting.wheel);
+ aiptek->curSetting.wheel = AIPTEK_WHEEL_DISABLE;
+ }
+ input_sync(inputdev);
+ }
+ }
+ /* Report 2 is delivered only by the stylus, and delivers
+ * absolute coordinates.
+ */
+ else if (data[0] == 2) {
+ if (aiptek->curSetting.coordinateMode == AIPTEK_COORDINATE_RELATIVE_MODE) {
+ aiptek->diagnostic = AIPTEK_DIAGNOSTIC_SENDING_ABSOLUTE_IN_RELATIVE;
+ } else if (!AIPTEK_POINTER_ALLOW_STYLUS_MODE
+ (aiptek->curSetting.pointerMode)) {
+ aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED;
+ } else {
+ input_regs(inputdev, regs);
+
+ x = le16_to_cpu(get_unaligned((__le16 *) (data + 1)));
+ y = le16_to_cpu(get_unaligned((__le16 *) (data + 3)));
+ z = le16_to_cpu(get_unaligned((__le16 *) (data + 6)));
+
+ p = (data[5] & 0x01) != 0 ? 1 : 0;
+ dv = (data[5] & 0x02) != 0 ? 1 : 0;
+ tip = (data[5] & 0x04) != 0 ? 1 : 0;
+
+ /* Use jitterable to re-arrange button masks
+ */
+ jitterable = data[5] & 0x18;
+
+ bs = (data[5] & aiptek->curSetting.stylusButtonLower) != 0 ? 1 : 0;
+ pck = (data[5] & aiptek->curSetting.stylusButtonUpper) != 0 ? 1 : 0;
+
+ /* dv indicates 'data valid' (e.g., the tablet is in sync
+ * and has delivered a "correct" report) We will ignore
+ * all 'bad' reports...
+ */
+ if (dv != 0) {
+ /* If we've not already sent a tool_button_?? code, do
+ * so now. Then set FIRED_BIT so it won't be resent unless
+ * the user forces FIRED_BIT off.
+ */
+ if (TOOL_BUTTON_FIRED
+ (aiptek->curSetting.toolMode) == 0) {
+ input_report_key(inputdev,
+ TOOL_BUTTON(aiptek->curSetting.toolMode),
+ 1);
+ aiptek->curSetting.toolMode |= TOOL_BUTTON_FIRED_BIT;
+ }
+
+ if (p != 0) {
+ input_report_abs(inputdev, ABS_X, x);
+ input_report_abs(inputdev, ABS_Y, y);
+ input_report_abs(inputdev, ABS_PRESSURE, z);
+
+ input_report_key(inputdev, BTN_TOUCH, tip);
+ input_report_key(inputdev, BTN_STYLUS, bs);
+ input_report_key(inputdev, BTN_STYLUS2, pck);
+
+ if (aiptek->curSetting.xTilt !=
+ AIPTEK_TILT_DISABLE) {
+ input_report_abs(inputdev,
+ ABS_TILT_X,
+ aiptek->curSetting.xTilt);
+ }
+ if (aiptek->curSetting.yTilt != AIPTEK_TILT_DISABLE) {
+ input_report_abs(inputdev,
+ ABS_TILT_Y,
+ aiptek->curSetting.yTilt);
+ }
+
+ /* Wheel support is in the form of a single-event
+ * firing.
+ */
+ if (aiptek->curSetting.wheel !=
+ AIPTEK_WHEEL_DISABLE) {
+ input_report_abs(inputdev,
+ ABS_WHEEL,
+ aiptek->curSetting.wheel);
+ aiptek->curSetting.wheel = AIPTEK_WHEEL_DISABLE;
+ }
+ }
+ input_report_abs(inputdev, ABS_MISC, p | AIPTEK_REPORT_TOOL_STYLUS);
+ input_sync(inputdev);
+ }
+ }
+ }
+ /* Report 3's come from the mouse in absolute mode.
+ */
+ else if (data[0] == 3) {
+ if (aiptek->curSetting.coordinateMode == AIPTEK_COORDINATE_RELATIVE_MODE) {
+ aiptek->diagnostic = AIPTEK_DIAGNOSTIC_SENDING_ABSOLUTE_IN_RELATIVE;
+ } else if (!AIPTEK_POINTER_ALLOW_MOUSE_MODE
+ (aiptek->curSetting.pointerMode)) {
+ aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED;
+ } else {
+ input_regs(inputdev, regs);
+ x = le16_to_cpu(get_unaligned((__le16 *) (data + 1)));
+ y = le16_to_cpu(get_unaligned((__le16 *) (data + 3)));
+
+ jitterable = data[5] & 0x1c;
+
+ p = (data[5] & 0x01) != 0 ? 1 : 0;
+ dv = (data[5] & 0x02) != 0 ? 1 : 0;
+ left = (data[5] & aiptek->curSetting.mouseButtonLeft) != 0 ? 1 : 0;
+ right = (data[5] & aiptek->curSetting.mouseButtonRight) != 0 ? 1 : 0;
+ middle = (data[5] & aiptek->curSetting.mouseButtonMiddle) != 0 ? 1 : 0;
+
+ if (dv != 0) {
+ /* If we've not already sent a tool_button_?? code, do
+ * so now. Then set FIRED_BIT so it won't be resent unless
+ * the user forces FIRED_BIT off.
+ */
+ if (TOOL_BUTTON_FIRED
+ (aiptek->curSetting.toolMode) == 0) {
+ input_report_key(inputdev,
+ TOOL_BUTTON(aiptek->curSetting.toolMode),
+ 1);
+ aiptek->curSetting.toolMode |= TOOL_BUTTON_FIRED_BIT;
+ }
+
+ if (p != 0) {
+ input_report_abs(inputdev, ABS_X, x);
+ input_report_abs(inputdev, ABS_Y, y);
+
+ input_report_key(inputdev, BTN_LEFT, left);
+ input_report_key(inputdev, BTN_MIDDLE, middle);
+ input_report_key(inputdev, BTN_RIGHT, right);
+
+ /* Wheel support is in the form of a single-event
+ * firing.
+ */
+ if (aiptek->curSetting.wheel != AIPTEK_WHEEL_DISABLE) {
+ input_report_abs(inputdev,
+ ABS_WHEEL,
+ aiptek->curSetting.wheel);
+ aiptek->curSetting.wheel = AIPTEK_WHEEL_DISABLE;
+ }
+ }
+ input_report_rel(inputdev, REL_MISC, p | AIPTEK_REPORT_TOOL_MOUSE);
+ input_sync(inputdev);
+ }
+ }
+ }
+ /* Report 4s come from the macro keys when pressed by stylus
+ */
+ else if (data[0] == 4) {
+ jitterable = data[1] & 0x18;
+
+ p = (data[1] & 0x01) != 0 ? 1 : 0;
+ dv = (data[1] & 0x02) != 0 ? 1 : 0;
+ tip = (data[1] & 0x04) != 0 ? 1 : 0;
+ bs = (data[1] & aiptek->curSetting.stylusButtonLower) != 0 ? 1 : 0;
+ pck = (data[1] & aiptek->curSetting.stylusButtonUpper) != 0 ? 1 : 0;
+
+ macro = data[3];
+ z = le16_to_cpu(get_unaligned((__le16 *) (data + 4)));
+
+ if (dv != 0) {
+ input_regs(inputdev, regs);
+
+ /* If we've not already sent a tool_button_?? code, do
+ * so now. Then set FIRED_BIT so it won't be resent unless
+ * the user forces FIRED_BIT off.
+ */
+ if (TOOL_BUTTON_FIRED(aiptek->curSetting.toolMode) == 0) {
+ input_report_key(inputdev,
+ TOOL_BUTTON(aiptek->curSetting.toolMode),
+ 1);
+ aiptek->curSetting.toolMode |= TOOL_BUTTON_FIRED_BIT;
+ }
+
+ if (p != 0) {
+ input_report_key(inputdev, BTN_TOUCH, tip);
+ input_report_key(inputdev, BTN_STYLUS, bs);
+ input_report_key(inputdev, BTN_STYLUS2, pck);
+ input_report_abs(inputdev, ABS_PRESSURE, z);
+ }
+
+ /* For safety, we're sending key 'break' codes for the
+ * neighboring macro keys.
+ */
+ if (macro > 0) {
+ input_report_key(inputdev,
+ macroKeyEvents[macro - 1], 0);
+ }
+ if (macro < 25) {
+ input_report_key(inputdev,
+ macroKeyEvents[macro + 1], 0);
+ }
+ input_report_key(inputdev, macroKeyEvents[macro], p);
+ input_report_abs(inputdev, ABS_MISC,
+ p | AIPTEK_REPORT_TOOL_STYLUS);
+ input_sync(inputdev);
+ }
+ }
+ /* Report 5s come from the macro keys when pressed by mouse
+ */
+ else if (data[0] == 5) {
+ jitterable = data[1] & 0x1c;
+
+ p = (data[1] & 0x01) != 0 ? 1 : 0;
+ dv = (data[1] & 0x02) != 0 ? 1 : 0;
+ left = (data[1]& aiptek->curSetting.mouseButtonLeft) != 0 ? 1 : 0;
+ right = (data[1] & aiptek->curSetting.mouseButtonRight) != 0 ? 1 : 0;
+ middle = (data[1] & aiptek->curSetting.mouseButtonMiddle) != 0 ? 1 : 0;
+ macro = data[3];
+
+ if (dv != 0) {
+ input_regs(inputdev, regs);
+
+ /* If we've not already sent a tool_button_?? code, do
+ * so now. Then set FIRED_BIT so it won't be resent unless
+ * the user forces FIRED_BIT off.
+ */
+ if (TOOL_BUTTON_FIRED(aiptek->curSetting.toolMode) == 0) {
+ input_report_key(inputdev,
+ TOOL_BUTTON(aiptek->curSetting.toolMode),
+ 1);
+ aiptek->curSetting.toolMode |= TOOL_BUTTON_FIRED_BIT;
+ }
+
+ if (p != 0) {
+ input_report_key(inputdev, BTN_LEFT, left);
+ input_report_key(inputdev, BTN_MIDDLE, middle);
+ input_report_key(inputdev, BTN_RIGHT, right);
+ }
+
+ /* For safety, we're sending key 'break' codes for the
+ * neighboring macro keys.
+ */
+ if (macro > 0) {
+ input_report_key(inputdev,
+ macroKeyEvents[macro - 1], 0);
+ }
+ if (macro < 25) {
+ input_report_key(inputdev,
+ macroKeyEvents[macro + 1], 0);
+ }
+
+ input_report_key(inputdev, macroKeyEvents[macro], 1);
+ input_report_rel(inputdev, ABS_MISC,
+ p | AIPTEK_REPORT_TOOL_MOUSE);
+ input_sync(inputdev);
+ }
+ }
+ /* We have no idea which tool can generate a report 6. Theoretically,
+ * neither need to, having been given reports 4 & 5 for such use.
+ * However, report 6 is the 'official-looking' report for macroKeys;
+ * reports 4 & 5 supposively are used to support unnamed, unknown
+ * hat switches (which just so happen to be the macroKeys.)
+ */
+ else if (data[0] == 6) {
+ macro = le16_to_cpu(get_unaligned((__le16 *) (data + 1)));
+ input_regs(inputdev, regs);
+
+ if (macro > 0) {
+ input_report_key(inputdev, macroKeyEvents[macro - 1],
+ 0);
+ }
+ if (macro < 25) {
+ input_report_key(inputdev, macroKeyEvents[macro + 1],
+ 0);
+ }
+
+ /* If we've not already sent a tool_button_?? code, do
+ * so now. Then set FIRED_BIT so it won't be resent unless
+ * the user forces FIRED_BIT off.
+ */
+ if (TOOL_BUTTON_FIRED(aiptek->curSetting.toolMode) == 0) {
+ input_report_key(inputdev,
+ TOOL_BUTTON(aiptek->curSetting.
+ toolMode), 1);
+ aiptek->curSetting.toolMode |= TOOL_BUTTON_FIRED_BIT;
+ }
+
+ input_report_key(inputdev, macroKeyEvents[macro], 1);
+ input_report_abs(inputdev, ABS_MISC,
+ 1 | AIPTEK_REPORT_TOOL_UNKNOWN);
+ input_sync(inputdev);
+ } else {
+ dbg("Unknown report %d", data[0]);
+ }
+
+ /* Jitter may occur when the user presses a button on the stlyus
+ * or the mouse. What we do to prevent that is wait 'x' milliseconds
+ * following a 'jitterable' event, which should give the hand some time
+ * stabilize itself.
+ *
+ * We just introduced aiptek->previousJitterable to carry forth the
+ * notion that jitter occurs when the button state changes from on to off:
+ * a person drawing, holding a button down is not subject to jittering.
+ * With that in mind, changing from upper button depressed to lower button
+ * WILL transition through a jitter delay.
+ */
+
+ if (aiptek->previousJitterable != jitterable &&
+ aiptek->curSetting.jitterDelay != 0 && aiptek->inDelay != 1) {
+ aiptek->endDelay = jiffies +
+ ((aiptek->curSetting.jitterDelay * HZ) / 1000);
+ aiptek->inDelay = 1;
+ }
+ aiptek->previousJitterable = jitterable;
+
+exit:
+ retval = usb_submit_urb(urb, GFP_ATOMIC);
+ if (retval != 0) {
+ err("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+ }
+}
+
+/***********************************************************************
+ * These are the USB id's known so far. We do not identify them to
+ * specific Aiptek model numbers, because there has been overlaps,
+ * use, and reuse of id's in existing models. Certain models have
+ * been known to use more than one ID, indicative perhaps of
+ * manufacturing revisions. In any event, we consider these
+ * IDs to not be model-specific nor unique.
+ */
+static const struct usb_device_id aiptek_ids[] = {
+ {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x01)},
+ {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x10)},
+ {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x20)},
+ {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x21)},
+ {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x22)},
+ {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x23)},
+ {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x24)},
+ {}
+};
+
+MODULE_DEVICE_TABLE(usb, aiptek_ids);
+
+/***********************************************************************
+ * Open an instance of the tablet driver.
+ */
+static int aiptek_open(struct input_dev *inputdev)
+{
+ struct aiptek *aiptek = inputdev->private;
+
+ if (aiptek->openCount++ > 0) {
+ return 0;
+ }
+
+ aiptek->urb->dev = aiptek->usbdev;
+ if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0) {
+ aiptek->openCount--;
+ return -EIO;
+ }
+
+ return 0;
+}
+
+/***********************************************************************
+ * Close an instance of the tablet driver.
+ */
+static void aiptek_close(struct input_dev *inputdev)
+{
+ struct aiptek *aiptek = inputdev->private;
+
+ if (--aiptek->openCount == 0) {
+ usb_kill_urb(aiptek->urb);
+ }
+}
+
+/***********************************************************************
+ * aiptek_set_report and aiptek_get_report() are borrowed from Linux 2.4.x,
+ * where they were known as usb_set_report and usb_get_report.
+ */
+static int
+aiptek_set_report(struct aiptek *aiptek,
+ unsigned char report_type,
+ unsigned char report_id, void *buffer, int size)
+{
+ return usb_control_msg(aiptek->usbdev,
+ usb_sndctrlpipe(aiptek->usbdev, 0),
+ USB_REQ_SET_REPORT,
+ USB_TYPE_CLASS | USB_RECIP_INTERFACE |
+ USB_DIR_OUT, (report_type << 8) + report_id,
+ aiptek->ifnum, buffer, size, 5000);
+}
+
+static int
+aiptek_get_report(struct aiptek *aiptek,
+ unsigned char report_type,
+ unsigned char report_id, void *buffer, int size)
+{
+ return usb_control_msg(aiptek->usbdev,
+ usb_rcvctrlpipe(aiptek->usbdev, 0),
+ USB_REQ_GET_REPORT,
+ USB_TYPE_CLASS | USB_RECIP_INTERFACE |
+ USB_DIR_IN, (report_type << 8) + report_id,
+ aiptek->ifnum, buffer, size, 5000);
+}
+
+/***********************************************************************
+ * Send a command to the tablet.
+ */
+static int
+aiptek_command(struct aiptek *aiptek, unsigned char command, unsigned char data)
+{
+ const int sizeof_buf = 3 * sizeof(u8);
+ int ret;
+ u8 *buf;
+
+ buf = kmalloc(sizeof_buf, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+
+ buf[0] = 2;
+ buf[1] = command;
+ buf[2] = data;
+
+ if ((ret =
+ aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
+ dbg("aiptek_program: failed, tried to send: 0x%02x 0x%02x",
+ command, data);
+ }
+ kfree(buf);
+ return ret < 0 ? ret : 0;
+}
+
+/***********************************************************************
+ * Retrieve information from the tablet. Querying info is defined as first
+ * sending the {command,data} sequence as a command, followed by a wait
+ * (aka, "programmaticDelay") and then a "read" request.
+ */
+static int
+aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data)
+{
+ const int sizeof_buf = 3 * sizeof(u8);
+ int ret;
+ u8 *buf;
+
+ buf = kmalloc(sizeof_buf, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+
+ buf[0] = 2;
+ buf[1] = command;
+ buf[2] = data;
+
+ if (aiptek_command(aiptek, command, data) != 0) {
+ kfree(buf);
+ return -EIO;
+ }
+ msleep(aiptek->curSetting.programmableDelay);
+
+ if ((ret =
+ aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
+ dbg("aiptek_query failed: returned 0x%02x 0x%02x 0x%02x",
+ buf[0], buf[1], buf[2]);
+ ret = -EIO;
+ } else {
+ ret = le16_to_cpu(get_unaligned((__le16 *) (buf + 1)));
+ }
+ kfree(buf);
+ return ret;
+}
+
+/***********************************************************************
+ * Program the tablet into either absolute or relative mode.
+ * We also get information about the tablet's size.
+ */
+static int aiptek_program_tablet(struct aiptek *aiptek)
+{
+ int ret;
+ /* Execute Resolution500LPI */
+ if ((ret = aiptek_command(aiptek, 0x18, 0x04)) < 0)
+ return ret;
+
+ /* Query getModelCode */
+ if ((ret = aiptek_query(aiptek, 0x02, 0x00)) < 0)
+ return ret;
+ aiptek->features.modelCode = ret & 0xff;
+
+ /* Query getODMCode */
+ if ((ret = aiptek_query(aiptek, 0x03, 0x00)) < 0)
+ return ret;
+ aiptek->features.odmCode = ret;
+
+ /* Query getFirmwareCode */
+ if ((ret = aiptek_query(aiptek, 0x04, 0x00)) < 0)
+ return ret;
+ aiptek->features.firmwareCode = ret;
+
+ /* Query getXextension */
+ if ((ret = aiptek_query(aiptek, 0x01, 0x00)) < 0)
+ return ret;
+ aiptek->inputdev.absmin[ABS_X] = 0;
+ aiptek->inputdev.absmax[ABS_X] = ret - 1;
+
+ /* Query getYextension */
+ if ((ret = aiptek_query(aiptek, 0x01, 0x01)) < 0)
+ return ret;
+ aiptek->inputdev.absmin[ABS_Y] = 0;
+ aiptek->inputdev.absmax[ABS_Y] = ret - 1;
+
+ /* Query getPressureLevels */
+ if ((ret = aiptek_query(aiptek, 0x08, 0x00)) < 0)
+ return ret;
+ aiptek->inputdev.absmin[ABS_PRESSURE] = 0;
+ aiptek->inputdev.absmax[ABS_PRESSURE] = ret - 1;
+
+ /* Depending on whether we are in absolute or relative mode, we will
+ * do a switchToTablet(absolute) or switchToMouse(relative) command.
+ */
+ if (aiptek->curSetting.coordinateMode ==
+ AIPTEK_COORDINATE_ABSOLUTE_MODE) {
+ /* Execute switchToTablet */
+ if ((ret = aiptek_command(aiptek, 0x10, 0x01)) < 0) {
+ return ret;
+ }
+ } else {
+ /* Execute switchToMouse */
+ if ((ret = aiptek_command(aiptek, 0x10, 0x00)) < 0) {
+ return ret;
+ }
+ }
+
+ /* Enable the macro keys */
+ if ((ret = aiptek_command(aiptek, 0x11, 0x02)) < 0)
+ return ret;
+#if 0
+ /* Execute FilterOn */
+ if ((ret = aiptek_command(aiptek, 0x17, 0x00)) < 0)
+ return ret;
+#endif
+
+ /* Execute AutoGainOn */
+ if ((ret = aiptek_command(aiptek, 0x12, 0xff)) < 0)
+ return ret;
+
+ /* Reset the eventCount, so we track events from last (re)programming
+ */
+ aiptek->diagnostic = AIPTEK_DIAGNOSTIC_NA;
+ aiptek->eventCount = 0;
+
+ return 0;
+}
+
+/***********************************************************************
+ * Sysfs functions. Sysfs prefers that individually-tunable parameters
+ * exist in their separate pseudo-files. Summary data that is immutable
+ * may exist in a singular file so long as you don't define a writeable
+ * interface.
+ */
+
+/***********************************************************************
+ * support the 'size' file -- display support
+ */
+static ssize_t show_tabletSize(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "%dx%d\n",
+ aiptek->inputdev.absmax[ABS_X] + 1,
+ aiptek->inputdev.absmax[ABS_Y] + 1);
+}
+
+/* These structs define the sysfs files, param #1 is the name of the
+ * file, param 2 is the file permissions, param 3 & 4 are to the
+ * output generator and input parser routines. Absence of a routine is
+ * permitted -- it only means can't either 'cat' the file, or send data
+ * to it.
+ */
+static DEVICE_ATTR(size, S_IRUGO, show_tabletSize, NULL);
+
+/***********************************************************************
+ * support routines for the 'product_id' file
+ */
+static ssize_t show_tabletProductId(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "0x%04x\n",
+ aiptek->inputdev.id.product);
+}
+
+static DEVICE_ATTR(product_id, S_IRUGO, show_tabletProductId, NULL);
+
+/***********************************************************************
+ * support routines for the 'vendor_id' file
+ */
+static ssize_t show_tabletVendorId(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "0x%04x\n", aiptek->inputdev.id.vendor);
+}
+
+static DEVICE_ATTR(vendor_id, S_IRUGO, show_tabletVendorId, NULL);
+
+/***********************************************************************
+ * support routines for the 'vendor' file
+ */
+static ssize_t show_tabletManufacturer(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ int retval;
+
+ if (aiptek == NULL)
+ return 0;
+
+ retval = snprintf(buf, PAGE_SIZE, "%s\n", aiptek->usbdev->manufacturer);
+ return retval;
+}
+
+static DEVICE_ATTR(vendor, S_IRUGO, show_tabletManufacturer, NULL);
+
+/***********************************************************************
+ * support routines for the 'product' file
+ */
+static ssize_t show_tabletProduct(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ int retval;
+
+ if (aiptek == NULL)
+ return 0;
+
+ retval = snprintf(buf, PAGE_SIZE, "%s\n", aiptek->usbdev->product);
+ return retval;
+}
+
+static DEVICE_ATTR(product, S_IRUGO, show_tabletProduct, NULL);
+
+/***********************************************************************
+ * support routines for the 'pointer_mode' file. Note that this file
+ * both displays current setting and allows reprogramming.
+ */
+static ssize_t show_tabletPointerMode(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ char *s;
+
+ if (aiptek == NULL)
+ return 0;
+
+ switch (aiptek->curSetting.pointerMode) {
+ case AIPTEK_POINTER_ONLY_STYLUS_MODE:
+ s = "stylus";
+ break;
+
+ case AIPTEK_POINTER_ONLY_MOUSE_MODE:
+ s = "mouse";
+ break;
+
+ case AIPTEK_POINTER_EITHER_MODE:
+ s = "either";
+ break;
+
+ default:
+ s = "unknown";
+ break;
+ }
+ return snprintf(buf, PAGE_SIZE, "%s\n", s);
+}
+
+static ssize_t
+store_tabletPointerMode(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "stylus") == 0) {
+ aiptek->newSetting.pointerMode =
+ AIPTEK_POINTER_ONLY_STYLUS_MODE;
+ } else if (strcmp(buf, "mouse") == 0) {
+ aiptek->newSetting.pointerMode = AIPTEK_POINTER_ONLY_MOUSE_MODE;
+ } else if (strcmp(buf, "either") == 0) {
+ aiptek->newSetting.pointerMode = AIPTEK_POINTER_EITHER_MODE;
+ }
+ return count;
+}
+
+static DEVICE_ATTR(pointer_mode,
+ S_IRUGO | S_IWUGO,
+ show_tabletPointerMode, store_tabletPointerMode);
+
+/***********************************************************************
+ * support routines for the 'coordinate_mode' file. Note that this file
+ * both displays current setting and allows reprogramming.
+ */
+static ssize_t show_tabletCoordinateMode(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ char *s;
+
+ if (aiptek == NULL)
+ return 0;
+
+ switch (aiptek->curSetting.coordinateMode) {
+ case AIPTEK_COORDINATE_ABSOLUTE_MODE:
+ s = "absolute";
+ break;
+
+ case AIPTEK_COORDINATE_RELATIVE_MODE:
+ s = "relative";
+ break;
+
+ default:
+ s = "unknown";
+ break;
+ }
+ return snprintf(buf, PAGE_SIZE, "%s\n", s);
+}
+
+static ssize_t
+store_tabletCoordinateMode(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "absolute") == 0) {
+ aiptek->newSetting.pointerMode =
+ AIPTEK_COORDINATE_ABSOLUTE_MODE;
+ } else if (strcmp(buf, "relative") == 0) {
+ aiptek->newSetting.pointerMode =
+ AIPTEK_COORDINATE_RELATIVE_MODE;
+ }
+ return count;
+}
+
+static DEVICE_ATTR(coordinate_mode,
+ S_IRUGO | S_IWUGO,
+ show_tabletCoordinateMode, store_tabletCoordinateMode);
+
+/***********************************************************************
+ * support routines for the 'tool_mode' file. Note that this file
+ * both displays current setting and allows reprogramming.
+ */
+static ssize_t show_tabletToolMode(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ char *s;
+
+ if (aiptek == NULL)
+ return 0;
+
+ switch (TOOL_BUTTON(aiptek->curSetting.toolMode)) {
+ case AIPTEK_TOOL_BUTTON_MOUSE_MODE:
+ s = "mouse";
+ break;
+
+ case AIPTEK_TOOL_BUTTON_ERASER_MODE:
+ s = "eraser";
+ break;
+
+ case AIPTEK_TOOL_BUTTON_PENCIL_MODE:
+ s = "pencil";
+ break;
+
+ case AIPTEK_TOOL_BUTTON_PEN_MODE:
+ s = "pen";
+ break;
+
+ case AIPTEK_TOOL_BUTTON_BRUSH_MODE:
+ s = "brush";
+ break;
+
+ case AIPTEK_TOOL_BUTTON_AIRBRUSH_MODE:
+ s = "airbrush";
+ break;
+
+ case AIPTEK_TOOL_BUTTON_LENS_MODE:
+ s = "lens";
+ break;
+
+ default:
+ s = "unknown";
+ break;
+ }
+ return snprintf(buf, PAGE_SIZE, "%s\n", s);
+}
+
+static ssize_t
+store_tabletToolMode(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "mouse") == 0) {
+ aiptek->newSetting.toolMode = AIPTEK_TOOL_BUTTON_MOUSE_MODE;
+ } else if (strcmp(buf, "eraser") == 0) {
+ aiptek->newSetting.toolMode = AIPTEK_TOOL_BUTTON_ERASER_MODE;
+ } else if (strcmp(buf, "pencil") == 0) {
+ aiptek->newSetting.toolMode = AIPTEK_TOOL_BUTTON_PENCIL_MODE;
+ } else if (strcmp(buf, "pen") == 0) {
+ aiptek->newSetting.toolMode = AIPTEK_TOOL_BUTTON_PEN_MODE;
+ } else if (strcmp(buf, "brush") == 0) {
+ aiptek->newSetting.toolMode = AIPTEK_TOOL_BUTTON_BRUSH_MODE;
+ } else if (strcmp(buf, "airbrush") == 0) {
+ aiptek->newSetting.toolMode = AIPTEK_TOOL_BUTTON_AIRBRUSH_MODE;
+ } else if (strcmp(buf, "lens") == 0) {
+ aiptek->newSetting.toolMode = AIPTEK_TOOL_BUTTON_LENS_MODE;
+ }
+
+ return count;
+}
+
+static DEVICE_ATTR(tool_mode,
+ S_IRUGO | S_IWUGO,
+ show_tabletToolMode, store_tabletToolMode);
+
+/***********************************************************************
+ * support routines for the 'xtilt' file. Note that this file
+ * both displays current setting and allows reprogramming.
+ */
+static ssize_t show_tabletXtilt(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (aiptek->curSetting.xTilt == AIPTEK_TILT_DISABLE) {
+ return snprintf(buf, PAGE_SIZE, "disable\n");
+ } else {
+ return snprintf(buf, PAGE_SIZE, "%d\n",
+ aiptek->curSetting.xTilt);
+ }
+}
+
+static ssize_t
+store_tabletXtilt(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ int x;
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "disable") == 0) {
+ aiptek->newSetting.xTilt = AIPTEK_TILT_DISABLE;
+ } else {
+ x = (int)simple_strtol(buf, NULL, 10);
+ if (x >= AIPTEK_TILT_MIN && x <= AIPTEK_TILT_MAX) {
+ aiptek->newSetting.xTilt = x;
+ }
+ }
+ return count;
+}
+
+static DEVICE_ATTR(xtilt,
+ S_IRUGO | S_IWUGO, show_tabletXtilt, store_tabletXtilt);
+
+/***********************************************************************
+ * support routines for the 'ytilt' file. Note that this file
+ * both displays current setting and allows reprogramming.
+ */
+static ssize_t show_tabletYtilt(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (aiptek->curSetting.yTilt == AIPTEK_TILT_DISABLE) {
+ return snprintf(buf, PAGE_SIZE, "disable\n");
+ } else {
+ return snprintf(buf, PAGE_SIZE, "%d\n",
+ aiptek->curSetting.yTilt);
+ }
+}
+
+static ssize_t
+store_tabletYtilt(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ int y;
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "disable") == 0) {
+ aiptek->newSetting.yTilt = AIPTEK_TILT_DISABLE;
+ } else {
+ y = (int)simple_strtol(buf, NULL, 10);
+ if (y >= AIPTEK_TILT_MIN && y <= AIPTEK_TILT_MAX) {
+ aiptek->newSetting.yTilt = y;
+ }
+ }
+ return count;
+}
+
+static DEVICE_ATTR(ytilt,
+ S_IRUGO | S_IWUGO, show_tabletYtilt, store_tabletYtilt);
+
+/***********************************************************************
+ * support routines for the 'jitter' file. Note that this file
+ * both displays current setting and allows reprogramming.
+ */
+static ssize_t show_tabletJitterDelay(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "%d\n", aiptek->curSetting.jitterDelay);
+}
+
+static ssize_t
+store_tabletJitterDelay(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ aiptek->newSetting.jitterDelay = (int)simple_strtol(buf, NULL, 10);
+ return count;
+}
+
+static DEVICE_ATTR(jitter,
+ S_IRUGO | S_IWUGO,
+ show_tabletJitterDelay, store_tabletJitterDelay);
+
+/***********************************************************************
+ * support routines for the 'delay' file. Note that this file
+ * both displays current setting and allows reprogramming.
+ */
+static ssize_t show_tabletProgrammableDelay(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "%d\n",
+ aiptek->curSetting.programmableDelay);
+}
+
+static ssize_t
+store_tabletProgrammableDelay(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ aiptek->newSetting.programmableDelay = (int)simple_strtol(buf, NULL, 10);
+ return count;
+}
+
+static DEVICE_ATTR(delay,
+ S_IRUGO | S_IWUGO,
+ show_tabletProgrammableDelay, store_tabletProgrammableDelay);
+
+/***********************************************************************
+ * support routines for the 'input_path' file. Note that this file
+ * only displays current setting.
+ */
+static ssize_t show_tabletInputDevice(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "/dev/input/%s\n",
+ aiptek->features.inputPath);
+}
+
+static DEVICE_ATTR(input_path, S_IRUGO, show_tabletInputDevice, NULL);
+
+/***********************************************************************
+ * support routines for the 'event_count' file. Note that this file
+ * only displays current setting.
+ */
+static ssize_t show_tabletEventsReceived(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "%ld\n", aiptek->eventCount);
+}
+
+static DEVICE_ATTR(event_count, S_IRUGO, show_tabletEventsReceived, NULL);
+
+/***********************************************************************
+ * support routines for the 'diagnostic' file. Note that this file
+ * only displays current setting.
+ */
+static ssize_t show_tabletDiagnosticMessage(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ char *retMsg;
+
+ if (aiptek == NULL)
+ return 0;
+
+ switch (aiptek->diagnostic) {
+ case AIPTEK_DIAGNOSTIC_NA:
+ retMsg = "no errors\n";
+ break;
+
+ case AIPTEK_DIAGNOSTIC_SENDING_RELATIVE_IN_ABSOLUTE:
+ retMsg = "Error: receiving relative reports\n";
+ break;
+
+ case AIPTEK_DIAGNOSTIC_SENDING_ABSOLUTE_IN_RELATIVE:
+ retMsg = "Error: receiving absolute reports\n";
+ break;
+
+ case AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED:
+ if (aiptek->curSetting.pointerMode ==
+ AIPTEK_POINTER_ONLY_MOUSE_MODE) {
+ retMsg = "Error: receiving stylus reports\n";
+ } else {
+ retMsg = "Error: receiving mouse reports\n";
+ }
+ break;
+
+ default:
+ return 0;
+ }
+ return snprintf(buf, PAGE_SIZE, retMsg);
+}
+
+static DEVICE_ATTR(diagnostic, S_IRUGO, show_tabletDiagnosticMessage, NULL);
+
+/***********************************************************************
+ * support routines for the 'stylus_upper' file. Note that this file
+ * both displays current setting and allows for setting changing.
+ */
+static ssize_t show_tabletStylusUpper(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ char *s;
+
+ if (aiptek == NULL)
+ return 0;
+
+ switch (aiptek->curSetting.stylusButtonUpper) {
+ case AIPTEK_STYLUS_UPPER_BUTTON:
+ s = "upper";
+ break;
+
+ case AIPTEK_STYLUS_LOWER_BUTTON:
+ s = "lower";
+ break;
+
+ default:
+ s = "unknown";
+ break;
+ }
+ return snprintf(buf, PAGE_SIZE, "%s\n", s);
+}
+
+static ssize_t
+store_tabletStylusUpper(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "upper") == 0) {
+ aiptek->newSetting.stylusButtonUpper =
+ AIPTEK_STYLUS_UPPER_BUTTON;
+ } else if (strcmp(buf, "lower") == 0) {
+ aiptek->newSetting.stylusButtonUpper =
+ AIPTEK_STYLUS_LOWER_BUTTON;
+ }
+ return count;
+}
+
+static DEVICE_ATTR(stylus_upper,
+ S_IRUGO | S_IWUGO,
+ show_tabletStylusUpper, store_tabletStylusUpper);
+
+/***********************************************************************
+ * support routines for the 'stylus_lower' file. Note that this file
+ * both displays current setting and allows for setting changing.
+ */
+static ssize_t show_tabletStylusLower(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ char *s;
+
+ if (aiptek == NULL)
+ return 0;
+
+ switch (aiptek->curSetting.stylusButtonLower) {
+ case AIPTEK_STYLUS_UPPER_BUTTON:
+ s = "upper";
+ break;
+
+ case AIPTEK_STYLUS_LOWER_BUTTON:
+ s = "lower";
+ break;
+
+ default:
+ s = "unknown";
+ break;
+ }
+ return snprintf(buf, PAGE_SIZE, "%s\n", s);
+}
+
+static ssize_t
+store_tabletStylusLower(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "upper") == 0) {
+ aiptek->newSetting.stylusButtonLower =
+ AIPTEK_STYLUS_UPPER_BUTTON;
+ } else if (strcmp(buf, "lower") == 0) {
+ aiptek->newSetting.stylusButtonLower =
+ AIPTEK_STYLUS_LOWER_BUTTON;
+ }
+ return count;
+}
+
+static DEVICE_ATTR(stylus_lower,
+ S_IRUGO | S_IWUGO,
+ show_tabletStylusLower, store_tabletStylusLower);
+
+/***********************************************************************
+ * support routines for the 'mouse_left' file. Note that this file
+ * both displays current setting and allows for setting changing.
+ */
+static ssize_t show_tabletMouseLeft(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ char *s;
+
+ if (aiptek == NULL)
+ return 0;
+
+ switch (aiptek->curSetting.mouseButtonLeft) {
+ case AIPTEK_MOUSE_LEFT_BUTTON:
+ s = "left";
+ break;
+
+ case AIPTEK_MOUSE_MIDDLE_BUTTON:
+ s = "middle";
+ break;
+
+ case AIPTEK_MOUSE_RIGHT_BUTTON:
+ s = "right";
+ break;
+
+ default:
+ s = "unknown";
+ break;
+ }
+ return snprintf(buf, PAGE_SIZE, "%s\n", s);
+}
+
+static ssize_t
+store_tabletMouseLeft(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "left") == 0) {
+ aiptek->newSetting.mouseButtonLeft = AIPTEK_MOUSE_LEFT_BUTTON;
+ } else if (strcmp(buf, "middle") == 0) {
+ aiptek->newSetting.mouseButtonLeft = AIPTEK_MOUSE_MIDDLE_BUTTON;
+ } else if (strcmp(buf, "right") == 0) {
+ aiptek->newSetting.mouseButtonLeft = AIPTEK_MOUSE_RIGHT_BUTTON;
+ }
+ return count;
+}
+
+static DEVICE_ATTR(mouse_left,
+ S_IRUGO | S_IWUGO,
+ show_tabletMouseLeft, store_tabletMouseLeft);
+
+/***********************************************************************
+ * support routines for the 'mouse_middle' file. Note that this file
+ * both displays current setting and allows for setting changing.
+ */
+static ssize_t show_tabletMouseMiddle(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ char *s;
+
+ if (aiptek == NULL)
+ return 0;
+
+ switch (aiptek->curSetting.mouseButtonMiddle) {
+ case AIPTEK_MOUSE_LEFT_BUTTON:
+ s = "left";
+ break;
+
+ case AIPTEK_MOUSE_MIDDLE_BUTTON:
+ s = "middle";
+ break;
+
+ case AIPTEK_MOUSE_RIGHT_BUTTON:
+ s = "right";
+ break;
+
+ default:
+ s = "unknown";
+ break;
+ }
+ return snprintf(buf, PAGE_SIZE, "%s\n", s);
+}
+
+static ssize_t
+store_tabletMouseMiddle(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "left") == 0) {
+ aiptek->newSetting.mouseButtonMiddle = AIPTEK_MOUSE_LEFT_BUTTON;
+ } else if (strcmp(buf, "middle") == 0) {
+ aiptek->newSetting.mouseButtonMiddle =
+ AIPTEK_MOUSE_MIDDLE_BUTTON;
+ } else if (strcmp(buf, "right") == 0) {
+ aiptek->newSetting.mouseButtonMiddle =
+ AIPTEK_MOUSE_RIGHT_BUTTON;
+ }
+ return count;
+}
+
+static DEVICE_ATTR(mouse_middle,
+ S_IRUGO | S_IWUGO,
+ show_tabletMouseMiddle, store_tabletMouseMiddle);
+
+/***********************************************************************
+ * support routines for the 'mouse_right' file. Note that this file
+ * both displays current setting and allows for setting changing.
+ */
+static ssize_t show_tabletMouseRight(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+ char *s;
+
+ if (aiptek == NULL)
+ return 0;
+
+ switch (aiptek->curSetting.mouseButtonRight) {
+ case AIPTEK_MOUSE_LEFT_BUTTON:
+ s = "left";
+ break;
+
+ case AIPTEK_MOUSE_MIDDLE_BUTTON:
+ s = "middle";
+ break;
+
+ case AIPTEK_MOUSE_RIGHT_BUTTON:
+ s = "right";
+ break;
+
+ default:
+ s = "unknown";
+ break;
+ }
+ return snprintf(buf, PAGE_SIZE, "%s\n", s);
+}
+
+static ssize_t
+store_tabletMouseRight(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (strcmp(buf, "left") == 0) {
+ aiptek->newSetting.mouseButtonRight = AIPTEK_MOUSE_LEFT_BUTTON;
+ } else if (strcmp(buf, "middle") == 0) {
+ aiptek->newSetting.mouseButtonRight =
+ AIPTEK_MOUSE_MIDDLE_BUTTON;
+ } else if (strcmp(buf, "right") == 0) {
+ aiptek->newSetting.mouseButtonRight = AIPTEK_MOUSE_RIGHT_BUTTON;
+ }
+ return count;
+}
+
+static DEVICE_ATTR(mouse_right,
+ S_IRUGO | S_IWUGO,
+ show_tabletMouseRight, store_tabletMouseRight);
+
+/***********************************************************************
+ * support routines for the 'wheel' file. Note that this file
+ * both displays current setting and allows for setting changing.
+ */
+static ssize_t show_tabletWheel(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ if (aiptek->curSetting.wheel == AIPTEK_WHEEL_DISABLE) {
+ return snprintf(buf, PAGE_SIZE, "disable\n");
+ } else {
+ return snprintf(buf, PAGE_SIZE, "%d\n",
+ aiptek->curSetting.wheel);
+ }
+}
+
+static ssize_t
+store_tabletWheel(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ aiptek->newSetting.wheel = (int)simple_strtol(buf, NULL, 10);
+ return count;
+}
+
+static DEVICE_ATTR(wheel,
+ S_IRUGO | S_IWUGO, show_tabletWheel, store_tabletWheel);
+
+/***********************************************************************
+ * support routines for the 'execute' file. Note that this file
+ * both displays current setting and allows for setting changing.
+ */
+static ssize_t show_tabletExecute(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ /* There is nothing useful to display, so a one-line manual
+ * is in order...
+ */
+ return snprintf(buf, PAGE_SIZE,
+ "Write anything to this file to program your tablet.\n");
+}
+
+static ssize_t
+store_tabletExecute(struct device *dev, const char *buf, size_t count)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ /* We do not care what you write to this file. Merely the action
+ * of writing to this file triggers a tablet reprogramming.
+ */
+ memcpy(&aiptek->curSetting, &aiptek->newSetting,
+ sizeof(struct aiptek_settings));
+
+ if (aiptek_program_tablet(aiptek) < 0)
+ return -EIO;
+
+ return count;
+}
+
+static DEVICE_ATTR(execute,
+ S_IRUGO | S_IWUGO, show_tabletExecute, store_tabletExecute);
+
+/***********************************************************************
+ * support routines for the 'odm_code' file. Note that this file
+ * only displays current setting.
+ */
+static ssize_t show_tabletODMCode(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "0x%04x\n", aiptek->features.odmCode);
+}
+
+static DEVICE_ATTR(odm_code, S_IRUGO, show_tabletODMCode, NULL);
+
+/***********************************************************************
+ * support routines for the 'model_code' file. Note that this file
+ * only displays current setting.
+ */
+static ssize_t show_tabletModelCode(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "0x%04x\n", aiptek->features.modelCode);
+}
+
+static DEVICE_ATTR(model_code, S_IRUGO, show_tabletModelCode, NULL);
+
+/***********************************************************************
+ * support routines for the 'firmware_code' file. Note that this file
+ * only displays current setting.
+ */
+static ssize_t show_firmwareCode(struct device *dev, char *buf)
+{
+ struct aiptek *aiptek = dev_get_drvdata(dev);
+
+ if (aiptek == NULL)
+ return 0;
+
+ return snprintf(buf, PAGE_SIZE, "%04x\n",
+ aiptek->features.firmwareCode);
+}
+
+static DEVICE_ATTR(firmware_code, S_IRUGO, show_firmwareCode, NULL);
+
+/***********************************************************************
+ * This routine removes all existing sysfs files managed by this device
+ * driver.
+ */
+static void aiptek_delete_files(struct device *dev)
+{
+ device_remove_file(dev, &dev_attr_size);
+ device_remove_file(dev, &dev_attr_product_id);
+ device_remove_file(dev, &dev_attr_vendor_id);
+ device_remove_file(dev, &dev_attr_vendor);
+ device_remove_file(dev, &dev_attr_product);
+ device_remove_file(dev, &dev_attr_pointer_mode);
+ device_remove_file(dev, &dev_attr_coordinate_mode);
+ device_remove_file(dev, &dev_attr_tool_mode);
+ device_remove_file(dev, &dev_attr_xtilt);
+ device_remove_file(dev, &dev_attr_ytilt);
+ device_remove_file(dev, &dev_attr_jitter);
+ device_remove_file(dev, &dev_attr_delay);
+ device_remove_file(dev, &dev_attr_input_path);
+ device_remove_file(dev, &dev_attr_event_count);
+ device_remove_file(dev, &dev_attr_diagnostic);
+ device_remove_file(dev, &dev_attr_odm_code);
+ device_remove_file(dev, &dev_attr_model_code);
+ device_remove_file(dev, &dev_attr_firmware_code);
+ device_remove_file(dev, &dev_attr_stylus_lower);
+ device_remove_file(dev, &dev_attr_stylus_upper);
+ device_remove_file(dev, &dev_attr_mouse_left);
+ device_remove_file(dev, &dev_attr_mouse_middle);
+ device_remove_file(dev, &dev_attr_mouse_right);
+ device_remove_file(dev, &dev_attr_wheel);
+ device_remove_file(dev, &dev_attr_execute);
+}
+
+/***********************************************************************
+ * This routine creates the sysfs files managed by this device
+ * driver.
+ */
+static int aiptek_add_files(struct device *dev)
+{
+ int ret;
+
+ if ((ret = device_create_file(dev, &dev_attr_size)) ||
+ (ret = device_create_file(dev, &dev_attr_product_id)) ||
+ (ret = device_create_file(dev, &dev_attr_vendor_id)) ||
+ (ret = device_create_file(dev, &dev_attr_vendor)) ||
+ (ret = device_create_file(dev, &dev_attr_product)) ||
+ (ret = device_create_file(dev, &dev_attr_pointer_mode)) ||
+ (ret = device_create_file(dev, &dev_attr_coordinate_mode)) ||
+ (ret = device_create_file(dev, &dev_attr_tool_mode)) ||
+ (ret = device_create_file(dev, &dev_attr_xtilt)) ||
+ (ret = device_create_file(dev, &dev_attr_ytilt)) ||
+ (ret = device_create_file(dev, &dev_attr_jitter)) ||
+ (ret = device_create_file(dev, &dev_attr_delay)) ||
+ (ret = device_create_file(dev, &dev_attr_input_path)) ||
+ (ret = device_create_file(dev, &dev_attr_event_count)) ||
+ (ret = device_create_file(dev, &dev_attr_diagnostic)) ||
+ (ret = device_create_file(dev, &dev_attr_odm_code)) ||
+ (ret = device_create_file(dev, &dev_attr_model_code)) ||
+ (ret = device_create_file(dev, &dev_attr_firmware_code)) ||
+ (ret = device_create_file(dev, &dev_attr_stylus_lower)) ||
+ (ret = device_create_file(dev, &dev_attr_stylus_upper)) ||
+ (ret = device_create_file(dev, &dev_attr_mouse_left)) ||
+ (ret = device_create_file(dev, &dev_attr_mouse_middle)) ||
+ (ret = device_create_file(dev, &dev_attr_mouse_right)) ||
+ (ret = device_create_file(dev, &dev_attr_wheel)) ||
+ (ret = device_create_file(dev, &dev_attr_execute))) {
+ err("aiptek: killing own sysfs device files\n");
+ aiptek_delete_files(dev);
+ }
+ return ret;
+}
+
+/***********************************************************************
+ * This routine is called when a tablet has been identified. It basically
+ * sets up the tablet and the driver's internal structures.
+ */
+static int
+aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *usbdev = interface_to_usbdev(intf);
+ struct usb_endpoint_descriptor *endpoint;
+ struct aiptek *aiptek;
+ struct input_dev *inputdev;
+ struct input_handle *inputhandle;
+ struct list_head *node, *next;
+ char path[64 + 1];
+ int i;
+ int speeds[] = { 0,
+ AIPTEK_PROGRAMMABLE_DELAY_50,
+ AIPTEK_PROGRAMMABLE_DELAY_400,
+ AIPTEK_PROGRAMMABLE_DELAY_25,
+ AIPTEK_PROGRAMMABLE_DELAY_100,
+ AIPTEK_PROGRAMMABLE_DELAY_200,
+ AIPTEK_PROGRAMMABLE_DELAY_300
+ };
+
+ /* programmableDelay is where the command-line specified
+ * delay is kept. We make it the first element of speeds[],
+ * so therefore, your override speed is tried first, then the
+ * remainder. Note that the default value of 400ms will be tried
+ * if you do not specify any command line parameter.
+ */
+ speeds[0] = programmableDelay;
+
+ if ((aiptek = kmalloc(sizeof(struct aiptek), GFP_KERNEL)) == NULL)
+ return -ENOMEM;
+ memset(aiptek, 0, sizeof(struct aiptek));
+
+ aiptek->data = usb_buffer_alloc(usbdev, AIPTEK_PACKET_LENGTH,
+ SLAB_ATOMIC, &aiptek->data_dma);
+ if (aiptek->data == NULL) {
+ kfree(aiptek);
+ return -ENOMEM;
+ }
+
+ aiptek->urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (aiptek->urb == NULL) {
+ usb_buffer_free(usbdev, AIPTEK_PACKET_LENGTH, aiptek->data,
+ aiptek->data_dma);
+ kfree(aiptek);
+ return -ENOMEM;
+ }
+
+ /* Set up the curSettings struct. Said struct contains the current
+ * programmable parameters. The newSetting struct contains changes
+ * the user makes to the settings via the sysfs interface. Those
+ * changes are not "committed" to curSettings until the user
+ * writes to the sysfs/.../execute file.
+ */
+ aiptek->curSetting.pointerMode = AIPTEK_POINTER_EITHER_MODE;
+ aiptek->curSetting.coordinateMode = AIPTEK_COORDINATE_ABSOLUTE_MODE;
+ aiptek->curSetting.toolMode = AIPTEK_TOOL_BUTTON_PEN_MODE;
+ aiptek->curSetting.xTilt = AIPTEK_TILT_DISABLE;
+ aiptek->curSetting.yTilt = AIPTEK_TILT_DISABLE;
+ aiptek->curSetting.mouseButtonLeft = AIPTEK_MOUSE_LEFT_BUTTON;
+ aiptek->curSetting.mouseButtonMiddle = AIPTEK_MOUSE_MIDDLE_BUTTON;
+ aiptek->curSetting.mouseButtonRight = AIPTEK_MOUSE_RIGHT_BUTTON;
+ aiptek->curSetting.stylusButtonUpper = AIPTEK_STYLUS_UPPER_BUTTON;
+ aiptek->curSetting.stylusButtonLower = AIPTEK_STYLUS_LOWER_BUTTON;
+ aiptek->curSetting.jitterDelay = jitterDelay;
+ aiptek->curSetting.programmableDelay = programmableDelay;
+
+ /* Both structs should have equivalent settings
+ */
+ memcpy(&aiptek->newSetting, &aiptek->curSetting,
+ sizeof(struct aiptek_settings));
+
+ /* Now program the capacities of the tablet, in terms of being
+ * an input device.
+ */
+ aiptek->inputdev.evbit[0] |= BIT(EV_KEY)
+ | BIT(EV_ABS)
+ | BIT(EV_REL)
+ | BIT(EV_MSC);
+
+ aiptek->inputdev.absbit[0] |=
+ (BIT(ABS_X) |
+ BIT(ABS_Y) |
+ BIT(ABS_PRESSURE) |
+ BIT(ABS_TILT_X) |
+ BIT(ABS_TILT_Y) | BIT(ABS_WHEEL) | BIT(ABS_MISC));
+
+ aiptek->inputdev.relbit[0] |=
+ (BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL) | BIT(REL_MISC));
+
+ aiptek->inputdev.keybit[LONG(BTN_LEFT)] |=
+ (BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE));
+
+ aiptek->inputdev.keybit[LONG(BTN_DIGI)] |=
+ (BIT(BTN_TOOL_PEN) |
+ BIT(BTN_TOOL_RUBBER) |
+ BIT(BTN_TOOL_PENCIL) |
+ BIT(BTN_TOOL_AIRBRUSH) |
+ BIT(BTN_TOOL_BRUSH) |
+ BIT(BTN_TOOL_MOUSE) |
+ BIT(BTN_TOOL_LENS) |
+ BIT(BTN_TOUCH) | BIT(BTN_STYLUS) | BIT(BTN_STYLUS2));
+
+ aiptek->inputdev.mscbit[0] = BIT(MSC_SERIAL);
+
+ /* Programming the tablet macro keys needs to be done with a for loop
+ * as the keycodes are discontiguous.
+ */
+ for (i = 0; i < sizeof(macroKeyEvents) / sizeof(macroKeyEvents[0]); ++i)
+ set_bit(macroKeyEvents[i], aiptek->inputdev.keybit);
+
+ /* Set up client data, pointers to open and close routines
+ * for the input device.
+ */
+ aiptek->inputdev.private = aiptek;
+ aiptek->inputdev.open = aiptek_open;
+ aiptek->inputdev.close = aiptek_close;
+
+ /* Determine the usb devices' physical path.
+ * Asketh not why we always pretend we're using "../input0",
+ * but I suspect this will have to be refactored one
+ * day if a single USB device can be a keyboard & a mouse
+ * & a tablet, and the inputX number actually will tell
+ * us something...
+ */
+ if (usb_make_path(usbdev, path, 64) > 0)
+ sprintf(aiptek->features.usbPath, "%s/input0", path);
+
+ /* Program the input device coordinate capacities. We do not yet
+ * know what maximum X, Y, and Z values are, so we're putting fake
+ * values in. Later, we'll ask the tablet to put in the correct
+ * values.
+ */
+ aiptek->inputdev.absmin[ABS_X] = 0;
+ aiptek->inputdev.absmax[ABS_X] = 2999;
+ aiptek->inputdev.absmin[ABS_Y] = 0;
+ aiptek->inputdev.absmax[ABS_Y] = 2249;
+ aiptek->inputdev.absmin[ABS_PRESSURE] = 0;
+ aiptek->inputdev.absmax[ABS_PRESSURE] = 511;
+ aiptek->inputdev.absmin[ABS_TILT_X] = AIPTEK_TILT_MIN;
+ aiptek->inputdev.absmax[ABS_TILT_X] = AIPTEK_TILT_MAX;
+ aiptek->inputdev.absmin[ABS_TILT_Y] = AIPTEK_TILT_MIN;
+ aiptek->inputdev.absmax[ABS_TILT_Y] = AIPTEK_TILT_MAX;
+ aiptek->inputdev.absmin[ABS_WHEEL] = AIPTEK_WHEEL_MIN;
+ aiptek->inputdev.absmax[ABS_WHEEL] = AIPTEK_WHEEL_MAX - 1;
+ aiptek->inputdev.absfuzz[ABS_X] = 0;
+ aiptek->inputdev.absfuzz[ABS_Y] = 0;
+ aiptek->inputdev.absfuzz[ABS_PRESSURE] = 0;
+ aiptek->inputdev.absfuzz[ABS_TILT_X] = 0;
+ aiptek->inputdev.absfuzz[ABS_TILT_Y] = 0;
+ aiptek->inputdev.absfuzz[ABS_WHEEL] = 0;
+ aiptek->inputdev.absflat[ABS_X] = 0;
+ aiptek->inputdev.absflat[ABS_Y] = 0;
+ aiptek->inputdev.absflat[ABS_PRESSURE] = 0;
+ aiptek->inputdev.absflat[ABS_TILT_X] = 0;
+ aiptek->inputdev.absflat[ABS_TILT_Y] = 0;
+ aiptek->inputdev.absflat[ABS_WHEEL] = 0;
+ aiptek->inputdev.name = "Aiptek";
+ aiptek->inputdev.phys = aiptek->features.usbPath;
+ aiptek->inputdev.id.bustype = BUS_USB;
+ aiptek->inputdev.id.vendor = le16_to_cpu(usbdev->descriptor.idVendor);
+ aiptek->inputdev.id.product = le16_to_cpu(usbdev->descriptor.idProduct);
+ aiptek->inputdev.id.version = le16_to_cpu(usbdev->descriptor.bcdDevice);
+
+ aiptek->usbdev = usbdev;
+ aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber;
+ aiptek->inDelay = 0;
+ aiptek->endDelay = 0;
+ aiptek->previousJitterable = 0;
+
+ endpoint = &intf->altsetting[0].endpoint[0].desc;
+
+ /* Go set up our URB, which is called when the tablet receives
+ * input.
+ */
+ usb_fill_int_urb(aiptek->urb,
+ aiptek->usbdev,
+ usb_rcvintpipe(aiptek->usbdev,
+ endpoint->bEndpointAddress),
+ aiptek->data, 8, aiptek_irq, aiptek,
+ endpoint->bInterval);
+
+ aiptek->urb->transfer_dma = aiptek->data_dma;
+ aiptek->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ /* Register the tablet as an Input Device
+ */
+ input_register_device(&aiptek->inputdev);
+
+ /* We now will look for the evdev device which is mapped to
+ * the tablet. The partial name is kept in the link list of
+ * input_handles associated with this input device.
+ * What identifies an evdev input_handler is that it begins
+ * with 'event', continues with a digit, and that in turn
+ * is mapped to /{devfs}/input/eventN.
+ */
+ inputdev = &aiptek->inputdev;
+ list_for_each_safe(node, next, &inputdev->h_list) {
+ inputhandle = to_handle(node);
+ if (strncmp(inputhandle->name, "event", 5) == 0) {
+ strcpy(aiptek->features.inputPath, inputhandle->name);
+ break;
+ }
+ }
+
+ info("input: Aiptek on %s (%s)\n", path, aiptek->features.inputPath);
+
+ /* Program the tablet. This sets the tablet up in the mode
+ * specified in newSetting, and also queries the tablet's
+ * physical capacities.
+ *
+ * Sanity check: if a tablet doesn't like the slow programmatic
+ * delay, we often get sizes of 0x0. Let's use that as an indicator
+ * to try faster delays, up to 25 ms. If that logic fails, well, you'll
+ * have to explain to us how your tablet thinks it's 0x0, and yet that's
+ * not an error :-)
+ */
+
+ for (i = 0; i < sizeof(speeds) / sizeof(speeds[0]); ++i) {
+ aiptek->curSetting.programmableDelay = speeds[i];
+ (void)aiptek_program_tablet(aiptek);
+ if (aiptek->inputdev.absmax[ABS_X] > 0) {
+ info("input: Aiptek using %d ms programming speed\n",
+ aiptek->curSetting.programmableDelay);
+ break;
+ }
+ }
+
+ /* Associate this driver's struct with the usb interface.
+ */
+ usb_set_intfdata(intf, aiptek);
+
+ /* Set up the sysfs files
+ */
+ aiptek_add_files(&intf->dev);
+
+ /* Make sure the evdev module is loaded. Assuming evdev IS a module :-)
+ */
+ if (request_module("evdev") != 0)
+ info("aiptek: error loading 'evdev' module");
+
+ return 0;
+}
+
+/* Forward declaration */
+static void aiptek_disconnect(struct usb_interface *intf);
+
+static struct usb_driver aiptek_driver = {
+ .owner = THIS_MODULE,
+ .name = "aiptek",
+ .probe = aiptek_probe,
+ .disconnect = aiptek_disconnect,
+ .id_table = aiptek_ids,
+};
+
+/***********************************************************************
+ * Deal with tablet disconnecting from the system.
+ */
+static void aiptek_disconnect(struct usb_interface *intf)
+{
+ struct aiptek *aiptek = usb_get_intfdata(intf);
+
+ /* Disassociate driver's struct with usb interface
+ */
+ usb_set_intfdata(intf, NULL);
+ if (aiptek != NULL) {
+ /* Free & unhook everything from the system.
+ */
+ usb_kill_urb(aiptek->urb);
+ input_unregister_device(&aiptek->inputdev);
+ aiptek_delete_files(&intf->dev);
+ usb_free_urb(aiptek->urb);
+ usb_buffer_free(interface_to_usbdev(intf),
+ AIPTEK_PACKET_LENGTH,
+ aiptek->data, aiptek->data_dma);
+ kfree(aiptek);
+ aiptek = NULL;
+ }
+}
+
+static int __init aiptek_init(void)
+{
+ int result = usb_register(&aiptek_driver);
+ if (result == 0) {
+ info(DRIVER_VERSION ": " DRIVER_AUTHOR);
+ info(DRIVER_DESC);
+ }
+ return result;
+}
+
+static void __exit aiptek_exit(void)
+{
+ usb_deregister(&aiptek_driver);
+}
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
+module_param(programmableDelay, int, 0);
+MODULE_PARM_DESC(programmableDelay, "delay used during tablet programming");
+module_param(jitterDelay, int, 0);
+MODULE_PARM_DESC(jitterDelay, "stylus/mouse settlement delay");
+
+module_init(aiptek_init);
+module_exit(aiptek_exit);
diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c
new file mode 100644
index 000000000000..355add5c29f5
--- /dev/null
+++ b/drivers/usb/input/ati_remote.c
@@ -0,0 +1,850 @@
+/*
+ * USB ATI Remote support
+ *
+ * Version 2.2.0 Copyright (c) 2004 Torrey Hoffman <thoffman@arnor.net>
+ * Version 2.1.1 Copyright (c) 2002 Vladimir Dergachev
+ *
+ * This 2.2.0 version is a rewrite / cleanup of the 2.1.1 driver, including
+ * porting to the 2.6 kernel interfaces, along with other modification
+ * to better match the style of the existing usb/input drivers. However, the
+ * protocol and hardware handling is essentially unchanged from 2.1.1.
+ *
+ * The 2.1.1 driver was derived from the usbati_remote and usbkbd drivers by
+ * Vojtech Pavlik.
+ *
+ * Changes:
+ *
+ * Feb 2004: Torrey Hoffman <thoffman@arnor.net>
+ * Version 2.2.0
+ * Jun 2004: Torrey Hoffman <thoffman@arnor.net>
+ * Version 2.2.1
+ * Added key repeat support contributed by:
+ * Vincent Vanackere <vanackere@lif.univ-mrs.fr>
+ * Added support for the "Lola" remote contributed by:
+ * Seth Cohn <sethcohn@yahoo.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
+ *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Hardware & software notes
+ *
+ * These remote controls are distributed by ATI as part of their
+ * "All-In-Wonder" video card packages. The receiver self-identifies as a
+ * "USB Receiver" with manufacturer "X10 Wireless Technology Inc".
+ *
+ * The "Lola" remote is available from X10. See:
+ * http://www.x10.com/products/lola_sg1.htm
+ * The Lola is similar to the ATI remote but has no mouse support, and slightly
+ * different keys.
+ *
+ * It is possible to use multiple receivers and remotes on multiple computers
+ * simultaneously by configuring them to use specific channels.
+ *
+ * The RF protocol used by the remote supports 16 distinct channels, 1 to 16.
+ * Actually, it may even support more, at least in some revisions of the
+ * hardware.
+ *
+ * Each remote can be configured to transmit on one channel as follows:
+ * - Press and hold the "hand icon" button.
+ * - When the red LED starts to blink, let go of the "hand icon" button.
+ * - When it stops blinking, input the channel code as two digits, from 01
+ * to 16, and press the hand icon again.
+ *
+ * The timing can be a little tricky. Try loading the module with debug=1
+ * to have the kernel print out messages about the remote control number
+ * and mask. Note: debugging prints remote numbers as zero-based hexadecimal.
+ *
+ * The driver has a "channel_mask" parameter. This bitmask specifies which
+ * channels will be ignored by the module. To mask out channels, just add
+ * all the 2^channel_number values together.
+ *
+ * For instance, set channel_mask = 2^4 = 16 (binary 10000) to make ati_remote
+ * ignore signals coming from remote controls transmitting on channel 4, but
+ * accept all other channels.
+ *
+ * Or, set channel_mask = 65533, (0xFFFD), and all channels except 1 will be
+ * ignored.
+ *
+ * The default is 0 (respond to all channels). Bit 0 and bits 17-32 of this
+ * parameter are unused.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/input.h>
+#include <linux/usb.h>
+#include <linux/wait.h>
+
+/*
+ * Module and Version Information, Module Parameters
+ */
+
+#define ATI_REMOTE_VENDOR_ID 0x0bc7
+#define ATI_REMOTE_PRODUCT_ID 0x004
+#define LOLA_REMOTE_PRODUCT_ID 0x002
+#define MEDION_REMOTE_PRODUCT_ID 0x006
+
+#define DRIVER_VERSION "2.2.1"
+#define DRIVER_AUTHOR "Torrey Hoffman <thoffman@arnor.net>"
+#define DRIVER_DESC "ATI/X10 RF USB Remote Control"
+
+#define NAME_BUFSIZE 80 /* size of product name, path buffers */
+#define DATA_BUFSIZE 63 /* size of URB data buffers */
+#define ATI_INPUTNUM 1 /* Which input device to register as */
+
+static unsigned long channel_mask = 0;
+module_param(channel_mask, ulong, 0444);
+MODULE_PARM_DESC(channel_mask, "Bitmask of remote control channels to ignore");
+
+static int debug = 0;
+module_param(debug, int, 0444);
+MODULE_PARM_DESC(debug, "Enable extra debug messages and information");
+
+#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0)
+#undef err
+#define err(format, arg...) printk(KERN_ERR format , ## arg)
+
+static struct usb_device_id ati_remote_table[] = {
+ { USB_DEVICE(ATI_REMOTE_VENDOR_ID, ATI_REMOTE_PRODUCT_ID) },
+ { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA_REMOTE_PRODUCT_ID) },
+ { USB_DEVICE(ATI_REMOTE_VENDOR_ID, MEDION_REMOTE_PRODUCT_ID) },
+ {} /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE(usb, ati_remote_table);
+
+/* Get hi and low bytes of a 16-bits int */
+#define HI(a) ((unsigned char)((a) >> 8))
+#define LO(a) ((unsigned char)((a) & 0xff))
+
+#define SEND_FLAG_IN_PROGRESS 1
+#define SEND_FLAG_COMPLETE 2
+
+/* Device initialization strings */
+static char init1[] = { 0x01, 0x00, 0x20, 0x14 };
+static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 };
+
+/* Acceleration curve for directional control pad */
+static char accel[] = { 1, 2, 4, 6, 9, 13, 20 };
+
+/* Duplicate event filtering time.
+ * Sequential, identical KIND_FILTERED inputs with less than
+ * FILTER_TIME jiffies between them are considered as repeat
+ * events. The hardware generates 5 events for the first keypress
+ * and we have to take this into account for an accurate repeat
+ * behaviour.
+ * (HZ / 20) == 50 ms and works well for me.
+ */
+#define FILTER_TIME (HZ / 20)
+
+static DECLARE_MUTEX(disconnect_sem);
+
+struct ati_remote {
+ struct input_dev idev;
+ struct usb_device *udev;
+ struct usb_interface *interface;
+
+ struct urb *irq_urb;
+ struct urb *out_urb;
+ struct usb_endpoint_descriptor *endpoint_in;
+ struct usb_endpoint_descriptor *endpoint_out;
+ unsigned char *inbuf;
+ unsigned char *outbuf;
+ dma_addr_t inbuf_dma;
+ dma_addr_t outbuf_dma;
+
+ int open; /* open counter */
+
+ unsigned char old_data[2]; /* Detect duplicate events */
+ unsigned long old_jiffies;
+ unsigned long acc_jiffies; /* handle acceleration */
+ unsigned int repeat_count;
+
+ char name[NAME_BUFSIZE];
+ char phys[NAME_BUFSIZE];
+
+ wait_queue_head_t wait;
+ int send_flags;
+};
+
+/* "Kinds" of messages sent from the hardware to the driver. */
+#define KIND_END 0
+#define KIND_LITERAL 1 /* Simply pass to input system */
+#define KIND_FILTERED 2 /* Add artificial key-up events, drop keyrepeats */
+#define KIND_LU 3 /* Directional keypad diagonals - left up, */
+#define KIND_RU 4 /* right up, */
+#define KIND_LD 5 /* left down, */
+#define KIND_RD 6 /* right down */
+#define KIND_ACCEL 7 /* Directional keypad - left, right, up, down.*/
+
+/* Translation table from hardware messages to input events. */
+static struct
+{
+ short kind;
+ unsigned char data1, data2;
+ int type;
+ unsigned int code;
+ int value;
+} ati_remote_tbl[] =
+{
+ /* Directional control pad axes */
+ {KIND_ACCEL, 0x35, 0x70, EV_REL, REL_X, -1}, /* left */
+ {KIND_ACCEL, 0x36, 0x71, EV_REL, REL_X, 1}, /* right */
+ {KIND_ACCEL, 0x37, 0x72, EV_REL, REL_Y, -1}, /* up */
+ {KIND_ACCEL, 0x38, 0x73, EV_REL, REL_Y, 1}, /* down */
+ /* Directional control pad diagonals */
+ {KIND_LU, 0x39, 0x74, EV_REL, 0, 0}, /* left up */
+ {KIND_RU, 0x3a, 0x75, EV_REL, 0, 0}, /* right up */
+ {KIND_LD, 0x3c, 0x77, EV_REL, 0, 0}, /* left down */
+ {KIND_RD, 0x3b, 0x76, EV_REL, 0, 0}, /* right down */
+
+ /* "Mouse button" buttons */
+ {KIND_LITERAL, 0x3d, 0x78, EV_KEY, BTN_LEFT, 1}, /* left btn down */
+ {KIND_LITERAL, 0x3e, 0x79, EV_KEY, BTN_LEFT, 0}, /* left btn up */
+ {KIND_LITERAL, 0x41, 0x7c, EV_KEY, BTN_RIGHT, 1},/* right btn down */
+ {KIND_LITERAL, 0x42, 0x7d, EV_KEY, BTN_RIGHT, 0},/* right btn up */
+
+ /* Artificial "doubleclick" events are generated by the hardware.
+ * They are mapped to the "side" and "extra" mouse buttons here. */
+ {KIND_FILTERED, 0x3f, 0x7a, EV_KEY, BTN_SIDE, 1}, /* left dblclick */
+ {KIND_FILTERED, 0x43, 0x7e, EV_KEY, BTN_EXTRA, 1},/* right dblclick */
+
+ /* keyboard. */
+ {KIND_FILTERED, 0xd2, 0x0d, EV_KEY, KEY_1, 1},
+ {KIND_FILTERED, 0xd3, 0x0e, EV_KEY, KEY_2, 1},
+ {KIND_FILTERED, 0xd4, 0x0f, EV_KEY, KEY_3, 1},
+ {KIND_FILTERED, 0xd5, 0x10, EV_KEY, KEY_4, 1},
+ {KIND_FILTERED, 0xd6, 0x11, EV_KEY, KEY_5, 1},
+ {KIND_FILTERED, 0xd7, 0x12, EV_KEY, KEY_6, 1},
+ {KIND_FILTERED, 0xd8, 0x13, EV_KEY, KEY_7, 1},
+ {KIND_FILTERED, 0xd9, 0x14, EV_KEY, KEY_8, 1},
+ {KIND_FILTERED, 0xda, 0x15, EV_KEY, KEY_9, 1},
+ {KIND_FILTERED, 0xdc, 0x17, EV_KEY, KEY_0, 1},
+ {KIND_FILTERED, 0xc5, 0x00, EV_KEY, KEY_A, 1},
+ {KIND_FILTERED, 0xc6, 0x01, EV_KEY, KEY_B, 1},
+ {KIND_FILTERED, 0xde, 0x19, EV_KEY, KEY_C, 1},
+ {KIND_FILTERED, 0xe0, 0x1b, EV_KEY, KEY_D, 1},
+ {KIND_FILTERED, 0xe6, 0x21, EV_KEY, KEY_E, 1},
+ {KIND_FILTERED, 0xe8, 0x23, EV_KEY, KEY_F, 1},
+
+ /* "special" keys */
+ {KIND_FILTERED, 0xdd, 0x18, EV_KEY, KEY_KPENTER, 1}, /* "check" */
+ {KIND_FILTERED, 0xdb, 0x16, EV_KEY, KEY_MENU, 1}, /* "menu" */
+ {KIND_FILTERED, 0xc7, 0x02, EV_KEY, KEY_POWER, 1}, /* Power */
+ {KIND_FILTERED, 0xc8, 0x03, EV_KEY, KEY_TV, 1}, /* TV */
+ {KIND_FILTERED, 0xc9, 0x04, EV_KEY, KEY_DVD, 1}, /* DVD */
+ {KIND_FILTERED, 0xca, 0x05, EV_KEY, KEY_WWW, 1}, /* WEB */
+ {KIND_FILTERED, 0xcb, 0x06, EV_KEY, KEY_BOOKMARKS, 1}, /* "book" */
+ {KIND_FILTERED, 0xcc, 0x07, EV_KEY, KEY_EDIT, 1}, /* "hand" */
+ {KIND_FILTERED, 0xe1, 0x1c, EV_KEY, KEY_COFFEE, 1}, /* "timer" */
+ {KIND_FILTERED, 0xe5, 0x20, EV_KEY, KEY_FRONT, 1}, /* "max" */
+ {KIND_FILTERED, 0xe2, 0x1d, EV_KEY, KEY_LEFT, 1}, /* left */
+ {KIND_FILTERED, 0xe4, 0x1f, EV_KEY, KEY_RIGHT, 1}, /* right */
+ {KIND_FILTERED, 0xe7, 0x22, EV_KEY, KEY_DOWN, 1}, /* down */
+ {KIND_FILTERED, 0xdf, 0x1a, EV_KEY, KEY_UP, 1}, /* up */
+ {KIND_FILTERED, 0xe3, 0x1e, EV_KEY, KEY_OK, 1}, /* "OK" */
+ {KIND_FILTERED, 0xce, 0x09, EV_KEY, KEY_VOLUMEDOWN, 1}, /* VOL + */
+ {KIND_FILTERED, 0xcd, 0x08, EV_KEY, KEY_VOLUMEUP, 1}, /* VOL - */
+ {KIND_FILTERED, 0xcf, 0x0a, EV_KEY, KEY_MUTE, 1}, /* MUTE */
+ {KIND_FILTERED, 0xd0, 0x0b, EV_KEY, KEY_CHANNELUP, 1}, /* CH + */
+ {KIND_FILTERED, 0xd1, 0x0c, EV_KEY, KEY_CHANNELDOWN, 1},/* CH - */
+ {KIND_FILTERED, 0xec, 0x27, EV_KEY, KEY_RECORD, 1}, /* ( o) red */
+ {KIND_FILTERED, 0xea, 0x25, EV_KEY, KEY_PLAY, 1}, /* ( >) */
+ {KIND_FILTERED, 0xe9, 0x24, EV_KEY, KEY_REWIND, 1}, /* (<<) */
+ {KIND_FILTERED, 0xeb, 0x26, EV_KEY, KEY_FORWARD, 1}, /* (>>) */
+ {KIND_FILTERED, 0xed, 0x28, EV_KEY, KEY_STOP, 1}, /* ([]) */
+ {KIND_FILTERED, 0xee, 0x29, EV_KEY, KEY_PAUSE, 1}, /* ('') */
+ {KIND_FILTERED, 0xf0, 0x2b, EV_KEY, KEY_PREVIOUS, 1}, /* (<-) */
+ {KIND_FILTERED, 0xef, 0x2a, EV_KEY, KEY_NEXT, 1}, /* (>+) */
+ {KIND_FILTERED, 0xf2, 0x2D, EV_KEY, KEY_INFO, 1}, /* PLAYING */
+ {KIND_FILTERED, 0xf3, 0x2E, EV_KEY, KEY_HOME, 1}, /* TOP */
+ {KIND_FILTERED, 0xf4, 0x2F, EV_KEY, KEY_END, 1}, /* END */
+ {KIND_FILTERED, 0xf5, 0x30, EV_KEY, KEY_SELECT, 1}, /* SELECT */
+
+ {KIND_END, 0x00, 0x00, EV_MAX + 1, 0, 0}
+};
+
+/* Local function prototypes */
+static void ati_remote_dump (unsigned char *data, unsigned int actual_length);
+static void ati_remote_delete (struct ati_remote *dev);
+static int ati_remote_open (struct input_dev *inputdev);
+static void ati_remote_close (struct input_dev *inputdev);
+static int ati_remote_sendpacket (struct ati_remote *ati_remote, u16 cmd, unsigned char *data);
+static void ati_remote_irq_out (struct urb *urb, struct pt_regs *regs);
+static void ati_remote_irq_in (struct urb *urb, struct pt_regs *regs);
+static void ati_remote_input_report (struct urb *urb, struct pt_regs *regs);
+static int ati_remote_initialize (struct ati_remote *ati_remote);
+static int ati_remote_probe (struct usb_interface *interface, const struct usb_device_id *id);
+static void ati_remote_disconnect (struct usb_interface *interface);
+
+/* usb specific object to register with the usb subsystem */
+static struct usb_driver ati_remote_driver = {
+ .owner = THIS_MODULE,
+ .name = "ati_remote",
+ .probe = ati_remote_probe,
+ .disconnect = ati_remote_disconnect,
+ .id_table = ati_remote_table,
+};
+
+/*
+ * ati_remote_dump_input
+ */
+static void ati_remote_dump(unsigned char *data, unsigned int len)
+{
+ if ((len == 1) && (data[0] != (unsigned char)0xff) && (data[0] != 0x00))
+ warn("Weird byte 0x%02x", data[0]);
+ else if (len == 4)
+ warn("Weird key %02x %02x %02x %02x",
+ data[0], data[1], data[2], data[3]);
+ else
+ warn("Weird data, len=%d %02x %02x %02x %02x %02x %02x ...",
+ len, data[0], data[1], data[2], data[3], data[4], data[5]);
+}
+
+/*
+ * ati_remote_open
+ */
+static int ati_remote_open(struct input_dev *inputdev)
+{
+ struct ati_remote *ati_remote = inputdev->private;
+ int retval = 0;
+
+ down(&disconnect_sem);
+
+ if (ati_remote->open++)
+ goto exit;
+
+ /* On first open, submit the read urb which was set up previously. */
+ ati_remote->irq_urb->dev = ati_remote->udev;
+ if (usb_submit_urb(ati_remote->irq_urb, GFP_KERNEL)) {
+ dev_err(&ati_remote->interface->dev,
+ "%s: usb_submit_urb failed!\n", __FUNCTION__);
+ ati_remote->open--;
+ retval = -EIO;
+ }
+
+exit:
+ up(&disconnect_sem);
+ return retval;
+}
+
+/*
+ * ati_remote_close
+ */
+static void ati_remote_close(struct input_dev *inputdev)
+{
+ struct ati_remote *ati_remote = inputdev->private;
+
+ if (!--ati_remote->open)
+ usb_kill_urb(ati_remote->irq_urb);
+}
+
+/*
+ * ati_remote_irq_out
+ */
+static void ati_remote_irq_out(struct urb *urb, struct pt_regs *regs)
+{
+ struct ati_remote *ati_remote = urb->context;
+
+ if (urb->status) {
+ dev_dbg(&ati_remote->interface->dev, "%s: status %d\n",
+ __FUNCTION__, urb->status);
+ return;
+ }
+
+ ati_remote->send_flags |= SEND_FLAG_COMPLETE;
+ wmb();
+ wake_up(&ati_remote->wait);
+}
+
+/*
+ * ati_remote_sendpacket
+ *
+ * Used to send device initialization strings
+ */
+static int ati_remote_sendpacket(struct ati_remote *ati_remote, u16 cmd, unsigned char *data)
+{
+ int retval = 0;
+
+ /* Set up out_urb */
+ memcpy(ati_remote->out_urb->transfer_buffer + 1, data, LO(cmd));
+ ((char *) ati_remote->out_urb->transfer_buffer)[0] = HI(cmd);
+
+ ati_remote->out_urb->transfer_buffer_length = LO(cmd) + 1;
+ ati_remote->out_urb->dev = ati_remote->udev;
+ ati_remote->send_flags = SEND_FLAG_IN_PROGRESS;
+
+ retval = usb_submit_urb(ati_remote->out_urb, GFP_ATOMIC);
+ if (retval) {
+ dev_dbg(&ati_remote->interface->dev,
+ "sendpacket: usb_submit_urb failed: %d\n", retval);
+ return retval;
+ }
+
+ wait_event_timeout(ati_remote->wait,
+ ((ati_remote->out_urb->status != -EINPROGRESS) ||
+ (ati_remote->send_flags & SEND_FLAG_COMPLETE)),
+ HZ);
+ usb_kill_urb(ati_remote->out_urb);
+
+ return retval;
+}
+
+/*
+ * ati_remote_event_lookup
+ */
+static int ati_remote_event_lookup(int rem, unsigned char d1, unsigned char d2)
+{
+ int i;
+
+ for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) {
+ /*
+ * Decide if the table entry matches the remote input.
+ */
+ if ((((ati_remote_tbl[i].data1 & 0x0f) == (d1 & 0x0f))) &&
+ ((((ati_remote_tbl[i].data1 >> 4) -
+ (d1 >> 4) + rem) & 0x0f) == 0x0f) &&
+ (ati_remote_tbl[i].data2 == d2))
+ return i;
+
+ }
+ return -1;
+}
+
+/*
+ * ati_remote_report_input
+ */
+static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs)
+{
+ struct ati_remote *ati_remote = urb->context;
+ unsigned char *data= ati_remote->inbuf;
+ struct input_dev *dev = &ati_remote->idev;
+ int index, acc;
+ int remote_num;
+
+ /* Deal with strange looking inputs */
+ if ( (urb->actual_length != 4) || (data[0] != 0x14) ||
+ ((data[3] & 0x0f) != 0x00) ) {
+ ati_remote_dump(data, urb->actual_length);
+ return;
+ }
+
+ /* Mask unwanted remote channels. */
+ /* note: remote_num is 0-based, channel 1 on remote == 0 here */
+ remote_num = (data[3] >> 4) & 0x0f;
+ if (channel_mask & (1 << (remote_num + 1))) {
+ dbginfo(&ati_remote->interface->dev,
+ "Masked input from channel 0x%02x: data %02x,%02x, mask= 0x%02lx\n",
+ remote_num, data[1], data[2], channel_mask);
+ return;
+ }
+
+ /* Look up event code index in translation table */
+ index = ati_remote_event_lookup(remote_num, data[1], data[2]);
+ if (index < 0) {
+ dev_warn(&ati_remote->interface->dev,
+ "Unknown input from channel 0x%02x: data %02x,%02x\n",
+ remote_num, data[1], data[2]);
+ return;
+ }
+ dbginfo(&ati_remote->interface->dev,
+ "channel 0x%02x; data %02x,%02x; index %d; keycode %d\n",
+ remote_num, data[1], data[2], index, ati_remote_tbl[index].code);
+
+ if (ati_remote_tbl[index].kind == KIND_LITERAL) {
+ input_regs(dev, regs);
+ input_event(dev, ati_remote_tbl[index].type,
+ ati_remote_tbl[index].code,
+ ati_remote_tbl[index].value);
+ input_sync(dev);
+
+ ati_remote->old_jiffies = jiffies;
+ return;
+ }
+
+ if (ati_remote_tbl[index].kind == KIND_FILTERED) {
+ /* Filter duplicate events which happen "too close" together. */
+ if ((ati_remote->old_data[0] == data[1]) &&
+ (ati_remote->old_data[1] == data[2]) &&
+ ((ati_remote->old_jiffies + FILTER_TIME) > jiffies)) {
+ ati_remote->repeat_count++;
+ }
+ else {
+ ati_remote->repeat_count = 0;
+ }
+
+ ati_remote->old_data[0] = data[1];
+ ati_remote->old_data[1] = data[2];
+ ati_remote->old_jiffies = jiffies;
+
+ if ((ati_remote->repeat_count > 0)
+ && (ati_remote->repeat_count < 5))
+ return;
+
+
+ input_regs(dev, regs);
+ input_event(dev, ati_remote_tbl[index].type,
+ ati_remote_tbl[index].code, 1);
+ input_event(dev, ati_remote_tbl[index].type,
+ ati_remote_tbl[index].code, 0);
+ input_sync(dev);
+
+ return;
+ }
+
+ /*
+ * Other event kinds are from the directional control pad, and have an
+ * acceleration factor applied to them. Without this acceleration, the
+ * control pad is mostly unusable.
+ *
+ * If elapsed time since last event is > 1/4 second, user "stopped",
+ * so reset acceleration. Otherwise, user is probably holding the control
+ * pad down, so we increase acceleration, ramping up over two seconds to
+ * a maximum speed. The acceleration curve is #defined above.
+ */
+ if ((jiffies - ati_remote->old_jiffies) > (HZ >> 2)) {
+ acc = 1;
+ ati_remote->acc_jiffies = jiffies;
+ }
+ else if ((jiffies - ati_remote->acc_jiffies) < (HZ >> 3)) acc = accel[0];
+ else if ((jiffies - ati_remote->acc_jiffies) < (HZ >> 2)) acc = accel[1];
+ else if ((jiffies - ati_remote->acc_jiffies) < (HZ >> 1)) acc = accel[2];
+ else if ((jiffies - ati_remote->acc_jiffies) < HZ ) acc = accel[3];
+ else if ((jiffies - ati_remote->acc_jiffies) < HZ+(HZ>>1)) acc = accel[4];
+ else if ((jiffies - ati_remote->acc_jiffies) < (HZ << 1)) acc = accel[5];
+ else acc = accel[6];
+
+ input_regs(dev, regs);
+ switch (ati_remote_tbl[index].kind) {
+ case KIND_ACCEL:
+ input_event(dev, ati_remote_tbl[index].type,
+ ati_remote_tbl[index].code,
+ ati_remote_tbl[index].value * acc);
+ break;
+ case KIND_LU:
+ input_report_rel(dev, REL_X, -acc);
+ input_report_rel(dev, REL_Y, -acc);
+ break;
+ case KIND_RU:
+ input_report_rel(dev, REL_X, acc);
+ input_report_rel(dev, REL_Y, -acc);
+ break;
+ case KIND_LD:
+ input_report_rel(dev, REL_X, -acc);
+ input_report_rel(dev, REL_Y, acc);
+ break;
+ case KIND_RD:
+ input_report_rel(dev, REL_X, acc);
+ input_report_rel(dev, REL_Y, acc);
+ break;
+ default:
+ dev_dbg(&ati_remote->interface->dev, "ati_remote kind=%d\n",
+ ati_remote_tbl[index].kind);
+ }
+ input_sync(dev);
+
+ ati_remote->old_jiffies = jiffies;
+ ati_remote->old_data[0] = data[1];
+ ati_remote->old_data[1] = data[2];
+}
+
+/*
+ * ati_remote_irq_in
+ */
+static void ati_remote_irq_in(struct urb *urb, struct pt_regs *regs)
+{
+ struct ati_remote *ati_remote = urb->context;
+ int retval;
+
+ switch (urb->status) {
+ case 0: /* success */
+ ati_remote_input_report(urb, regs);
+ break;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -ESHUTDOWN:
+ dev_dbg(&ati_remote->interface->dev, "%s: urb error status, unlink? \n",
+ __FUNCTION__);
+ return;
+ default: /* error */
+ dev_dbg(&ati_remote->interface->dev, "%s: Nonzero urb status %d\n",
+ __FUNCTION__, urb->status);
+ }
+
+ retval = usb_submit_urb(urb, SLAB_ATOMIC);
+ if (retval)
+ dev_err(&ati_remote->interface->dev, "%s: usb_submit_urb()=%d\n",
+ __FUNCTION__, retval);
+}
+
+/*
+ * ati_remote_delete
+ */
+static void ati_remote_delete(struct ati_remote *ati_remote)
+{
+ if (!ati_remote) return;
+
+ if (ati_remote->irq_urb)
+ usb_kill_urb(ati_remote->irq_urb);
+
+ if (ati_remote->out_urb)
+ usb_kill_urb(ati_remote->out_urb);
+
+ input_unregister_device(&ati_remote->idev);
+
+ if (ati_remote->inbuf)
+ usb_buffer_free(ati_remote->udev, DATA_BUFSIZE,
+ ati_remote->inbuf, ati_remote->inbuf_dma);
+
+ if (ati_remote->outbuf)
+ usb_buffer_free(ati_remote->udev, DATA_BUFSIZE,
+ ati_remote->inbuf, ati_remote->outbuf_dma);
+
+ if (ati_remote->irq_urb)
+ usb_free_urb(ati_remote->irq_urb);
+
+ if (ati_remote->out_urb)
+ usb_free_urb(ati_remote->out_urb);
+
+ kfree(ati_remote);
+}
+
+static void ati_remote_input_init(struct ati_remote *ati_remote)
+{
+ struct input_dev *idev = &(ati_remote->idev);
+ int i;
+
+ idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
+ idev->keybit[LONG(BTN_MOUSE)] = ( BIT(BTN_LEFT) | BIT(BTN_RIGHT) |
+ BIT(BTN_SIDE) | BIT(BTN_EXTRA) );
+ idev->relbit[0] = BIT(REL_X) | BIT(REL_Y);
+ for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++)
+ if (ati_remote_tbl[i].type == EV_KEY)
+ set_bit(ati_remote_tbl[i].code, idev->keybit);
+
+ idev->private = ati_remote;
+ idev->open = ati_remote_open;
+ idev->close = ati_remote_close;
+
+ idev->name = ati_remote->name;
+ idev->phys = ati_remote->phys;
+
+ idev->id.bustype = BUS_USB;
+ idev->id.vendor = le16_to_cpu(ati_remote->udev->descriptor.idVendor);
+ idev->id.product = le16_to_cpu(ati_remote->udev->descriptor.idProduct);
+ idev->id.version = le16_to_cpu(ati_remote->udev->descriptor.bcdDevice);
+}
+
+static int ati_remote_initialize(struct ati_remote *ati_remote)
+{
+ struct usb_device *udev = ati_remote->udev;
+ int pipe, maxp;
+
+ init_waitqueue_head(&ati_remote->wait);
+
+ /* Set up irq_urb */
+ pipe = usb_rcvintpipe(udev, ati_remote->endpoint_in->bEndpointAddress);
+ maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+ maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;
+
+ usb_fill_int_urb(ati_remote->irq_urb, udev, pipe, ati_remote->inbuf,
+ maxp, ati_remote_irq_in, ati_remote,
+ ati_remote->endpoint_in->bInterval);
+ ati_remote->irq_urb->transfer_dma = ati_remote->inbuf_dma;
+ ati_remote->irq_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ /* Set up out_urb */
+ pipe = usb_sndintpipe(udev, ati_remote->endpoint_out->bEndpointAddress);
+ maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+ maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;
+
+ usb_fill_int_urb(ati_remote->out_urb, udev, pipe, ati_remote->outbuf,
+ maxp, ati_remote_irq_out, ati_remote,
+ ati_remote->endpoint_out->bInterval);
+ ati_remote->out_urb->transfer_dma = ati_remote->outbuf_dma;
+ ati_remote->out_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ /* send initialization strings */
+ if ((ati_remote_sendpacket(ati_remote, 0x8004, init1)) ||
+ (ati_remote_sendpacket(ati_remote, 0x8007, init2))) {
+ dev_err(&ati_remote->interface->dev,
+ "Initializing ati_remote hardware failed.\n");
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ * ati_remote_probe
+ */
+static int ati_remote_probe(struct usb_interface *interface, const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev(interface);
+ struct ati_remote *ati_remote = NULL;
+ struct usb_host_interface *iface_host;
+ int retval = -ENOMEM;
+ char path[64];
+
+ /* Allocate and clear an ati_remote struct */
+ if (!(ati_remote = kmalloc(sizeof (struct ati_remote), GFP_KERNEL)))
+ return -ENOMEM;
+ memset(ati_remote, 0x00, sizeof (struct ati_remote));
+
+ iface_host = interface->cur_altsetting;
+ if (iface_host->desc.bNumEndpoints != 2) {
+ err("%s: Unexpected desc.bNumEndpoints\n", __FUNCTION__);
+ retval = -ENODEV;
+ goto error;
+ }
+
+ ati_remote->endpoint_in = &(iface_host->endpoint[0].desc);
+ ati_remote->endpoint_out = &(iface_host->endpoint[1].desc);
+ ati_remote->udev = udev;
+ ati_remote->interface = interface;
+
+ if (!(ati_remote->endpoint_in->bEndpointAddress & 0x80)) {
+ err("%s: Unexpected endpoint_in->bEndpointAddress\n", __FUNCTION__);
+ retval = -ENODEV;
+ goto error;
+ }
+ if ((ati_remote->endpoint_in->bmAttributes & 3) != 3) {
+ err("%s: Unexpected endpoint_in->bmAttributes\n", __FUNCTION__);
+ retval = -ENODEV;
+ goto error;
+ }
+ if (le16_to_cpu(ati_remote->endpoint_in->wMaxPacketSize) == 0) {
+ err("%s: endpoint_in message size==0? \n", __FUNCTION__);
+ retval = -ENODEV;
+ goto error;
+ }
+
+ /* Allocate URB buffers, URBs */
+ ati_remote->inbuf = usb_buffer_alloc(udev, DATA_BUFSIZE, SLAB_ATOMIC,
+ &ati_remote->inbuf_dma);
+ if (!ati_remote->inbuf)
+ goto error;
+
+ ati_remote->outbuf = usb_buffer_alloc(udev, DATA_BUFSIZE, SLAB_ATOMIC,
+ &ati_remote->outbuf_dma);
+ if (!ati_remote->outbuf)
+ goto error;
+
+ ati_remote->irq_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!ati_remote->irq_urb)
+ goto error;
+
+ ati_remote->out_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!ati_remote->out_urb)
+ goto error;
+
+ usb_make_path(udev, path, NAME_BUFSIZE);
+ sprintf(ati_remote->phys, "%s/input%d", path, ATI_INPUTNUM);
+ if (udev->manufacturer)
+ strcat(ati_remote->name, udev->manufacturer);
+
+ if (udev->product)
+ sprintf(ati_remote->name, "%s %s", ati_remote->name, udev->product);
+
+ if (!strlen(ati_remote->name))
+ sprintf(ati_remote->name, DRIVER_DESC "(%04x,%04x)",
+ le16_to_cpu(ati_remote->udev->descriptor.idVendor),
+ le16_to_cpu(ati_remote->udev->descriptor.idProduct));
+
+ /* Device Hardware Initialization - fills in ati_remote->idev from udev. */
+ retval = ati_remote_initialize(ati_remote);
+ if (retval)
+ goto error;
+
+ /* Set up and register input device */
+ ati_remote_input_init(ati_remote);
+ input_register_device(&ati_remote->idev);
+
+ dev_info(&ati_remote->interface->dev, "Input registered: %s on %s\n",
+ ati_remote->name, path);
+
+ usb_set_intfdata(interface, ati_remote);
+
+error:
+ if (retval)
+ ati_remote_delete(ati_remote);
+
+ return retval;
+}
+
+/*
+ * ati_remote_disconnect
+ */
+static void ati_remote_disconnect(struct usb_interface *interface)
+{
+ struct ati_remote *ati_remote;
+
+ down(&disconnect_sem);
+
+ ati_remote = usb_get_intfdata(interface);
+ usb_set_intfdata(interface, NULL);
+ if (!ati_remote) {
+ warn("%s - null device?\n", __FUNCTION__);
+ return;
+ }
+
+ ati_remote_delete(ati_remote);
+
+ up(&disconnect_sem);
+}
+
+/*
+ * ati_remote_init
+ */
+static int __init ati_remote_init(void)
+{
+ int result;
+
+ result = usb_register(&ati_remote_driver);
+ if (result)
+ err("usb_register error #%d\n", result);
+ else
+ info("Registered USB driver " DRIVER_DESC " v. " DRIVER_VERSION);
+
+ return result;
+}
+
+/*
+ * ati_remote_exit
+ */
+static void __exit ati_remote_exit(void)
+{
+ usb_deregister(&ati_remote_driver);
+}
+
+/*
+ * module specification
+ */
+
+module_init(ati_remote_init);
+module_exit(ati_remote_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/input/fixp-arith.h b/drivers/usb/input/fixp-arith.h
new file mode 100644
index 000000000000..26ca5b890a61
--- /dev/null
+++ b/drivers/usb/input/fixp-arith.h
@@ -0,0 +1,90 @@
+#ifndef _FIXP_ARITH_H
+#define _FIXP_ARITH_H
+
+/*
+ * $$
+ *
+ * Simplistic fixed-point arithmetics.
+ * Hmm, I'm probably duplicating some code :(
+ *
+ * Copyright (c) 2002 Johann Deneux
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so by
+ * e-mail - mail your message to <deneux@ifrance.com>
+ */
+
+#include <linux/types.h>
+
+// The type representing fixed-point values
+typedef s16 fixp_t;
+
+#define FRAC_N 8
+#define FRAC_MASK ((1<<FRAC_N)-1)
+
+// Not to be used directly. Use fixp_{cos,sin}
+static fixp_t cos_table[45] = {
+ 0x0100, 0x00FF, 0x00FF, 0x00FE, 0x00FD, 0x00FC, 0x00FA, 0x00F8,
+ 0x00F6, 0x00F3, 0x00F0, 0x00ED, 0x00E9, 0x00E6, 0x00E2, 0x00DD,
+ 0x00D9, 0x00D4, 0x00CF, 0x00C9, 0x00C4, 0x00BE, 0x00B8, 0x00B1,
+ 0x00AB, 0x00A4, 0x009D, 0x0096, 0x008F, 0x0087, 0x0080, 0x0078,
+ 0x0070, 0x0068, 0x005F, 0x0057, 0x004F, 0x0046, 0x003D, 0x0035,
+ 0x002C, 0x0023, 0x001A, 0x0011, 0x0008
+};
+
+
+/* a: 123 -> 123.0 */
+static inline fixp_t fixp_new(s16 a)
+{
+ return a<<FRAC_N;
+}
+
+/* a: 0xFFFF -> -1.0
+ 0x8000 -> 1.0
+ 0x0000 -> 0.0
+*/
+static inline fixp_t fixp_new16(s16 a)
+{
+ return ((s32)a)>>(16-FRAC_N);
+}
+
+static inline fixp_t fixp_cos(unsigned int degrees)
+{
+ int quadrant = (degrees / 90) & 3;
+ unsigned int i = degrees % 90;
+
+ if (quadrant == 1 || quadrant == 3) {
+ i = 89 - i;
+ }
+
+ i >>= 1;
+
+ return (quadrant == 1 || quadrant == 2)? -cos_table[i] : cos_table[i];
+}
+
+static inline fixp_t fixp_sin(unsigned int degrees)
+{
+ return -fixp_cos(degrees + 90);
+}
+
+static inline fixp_t fixp_mult(fixp_t a, fixp_t b)
+{
+ return ((s32)(a*b))>>FRAC_N;
+}
+
+#endif
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
new file mode 100644
index 000000000000..7662cf4e2621
--- /dev/null
+++ b/drivers/usb/input/hid-core.c
@@ -0,0 +1,1864 @@
+/*
+ * USB HID support for Linux
+ *
+ * Copyright (c) 1999 Andreas Gal
+ * Copyright (c) 2000-2001 Vojtech Pavlik <vojtech@suse.cz>
+ */
+
+/*
+ * 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.
+ */
+
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/list.h>
+#include <linux/mm.h>
+#include <linux/smp_lock.h>
+#include <linux/spinlock.h>
+#include <asm/unaligned.h>
+#include <asm/byteorder.h>
+#include <linux/input.h>
+#include <linux/wait.h>
+
+#undef DEBUG
+#undef DEBUG_DATA
+
+#include <linux/usb.h>
+
+#include "hid.h"
+#include <linux/hiddev.h>
+
+/*
+ * Version Information
+ */
+
+#define DRIVER_VERSION "v2.01"
+#define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik"
+#define DRIVER_DESC "USB HID core driver"
+#define DRIVER_LICENSE "GPL"
+
+static char *hid_types[] = {"Device", "Pointer", "Mouse", "Device", "Joystick",
+ "Gamepad", "Keyboard", "Keypad", "Multi-Axis Controller"};
+/*
+ * Module parameters.
+ */
+
+static unsigned int hid_mousepoll_interval;
+module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
+MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
+
+/*
+ * Register a new report for a device.
+ */
+
+static struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id)
+{
+ struct hid_report_enum *report_enum = device->report_enum + type;
+ struct hid_report *report;
+
+ if (report_enum->report_id_hash[id])
+ return report_enum->report_id_hash[id];
+
+ if (!(report = kmalloc(sizeof(struct hid_report), GFP_KERNEL)))
+ return NULL;
+ memset(report, 0, sizeof(struct hid_report));
+
+ if (id != 0)
+ report_enum->numbered = 1;
+
+ report->id = id;
+ report->type = type;
+ report->size = 0;
+ report->device = device;
+ report_enum->report_id_hash[id] = report;
+
+ list_add_tail(&report->list, &report_enum->report_list);
+
+ return report;
+}
+
+/*
+ * Register a new field for this report.
+ */
+
+static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages, unsigned values)
+{
+ struct hid_field *field;
+
+ if (report->maxfield == HID_MAX_FIELDS) {
+ dbg("too many fields in report");
+ return NULL;
+ }
+
+ if (!(field = kmalloc(sizeof(struct hid_field) + usages * sizeof(struct hid_usage)
+ + values * sizeof(unsigned), GFP_KERNEL))) return NULL;
+
+ memset(field, 0, sizeof(struct hid_field) + usages * sizeof(struct hid_usage)
+ + values * sizeof(unsigned));
+
+ field->index = report->maxfield++;
+ report->field[field->index] = field;
+ field->usage = (struct hid_usage *)(field + 1);
+ field->value = (unsigned *)(field->usage + usages);
+ field->report = report;
+
+ return field;
+}
+
+/*
+ * Open a collection. The type/usage is pushed on the stack.
+ */
+
+static int open_collection(struct hid_parser *parser, unsigned type)
+{
+ struct hid_collection *collection;
+ unsigned usage;
+
+ usage = parser->local.usage[0];
+
+ if (parser->collection_stack_ptr == HID_COLLECTION_STACK_SIZE) {
+ dbg("collection stack overflow");
+ return -1;
+ }
+
+ if (parser->device->maxcollection == parser->device->collection_size) {
+ collection = kmalloc(sizeof(struct hid_collection) *
+ parser->device->collection_size * 2, GFP_KERNEL);
+ if (collection == NULL) {
+ dbg("failed to reallocate collection array");
+ return -1;
+ }
+ memcpy(collection, parser->device->collection,
+ sizeof(struct hid_collection) *
+ parser->device->collection_size);
+ memset(collection + parser->device->collection_size, 0,
+ sizeof(struct hid_collection) *
+ parser->device->collection_size);
+ kfree(parser->device->collection);
+ parser->device->collection = collection;
+ parser->device->collection_size *= 2;
+ }
+
+ parser->collection_stack[parser->collection_stack_ptr++] =
+ parser->device->maxcollection;
+
+ collection = parser->device->collection +
+ parser->device->maxcollection++;
+ collection->type = type;
+ collection->usage = usage;
+ collection->level = parser->collection_stack_ptr - 1;
+
+ if (type == HID_COLLECTION_APPLICATION)
+ parser->device->maxapplication++;
+
+ return 0;
+}
+
+/*
+ * Close a collection.
+ */
+
+static int close_collection(struct hid_parser *parser)
+{
+ if (!parser->collection_stack_ptr) {
+ dbg("collection stack underflow");
+ return -1;
+ }
+ parser->collection_stack_ptr--;
+ return 0;
+}
+
+/*
+ * Climb up the stack, search for the specified collection type
+ * and return the usage.
+ */
+
+static unsigned hid_lookup_collection(struct hid_parser *parser, unsigned type)
+{
+ int n;
+ for (n = parser->collection_stack_ptr - 1; n >= 0; n--)
+ if (parser->device->collection[parser->collection_stack[n]].type == type)
+ return parser->device->collection[parser->collection_stack[n]].usage;
+ return 0; /* we know nothing about this usage type */
+}
+
+/*
+ * Add a usage to the temporary parser table.
+ */
+
+static int hid_add_usage(struct hid_parser *parser, unsigned usage)
+{
+ if (parser->local.usage_index >= HID_MAX_USAGES) {
+ dbg("usage index exceeded");
+ return -1;
+ }
+ parser->local.usage[parser->local.usage_index] = usage;
+ parser->local.collection_index[parser->local.usage_index] =
+ parser->collection_stack_ptr ?
+ parser->collection_stack[parser->collection_stack_ptr - 1] : 0;
+ parser->local.usage_index++;
+ return 0;
+}
+
+/*
+ * Register a new field for this report.
+ */
+
+static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsigned flags)
+{
+ struct hid_report *report;
+ struct hid_field *field;
+ int usages;
+ unsigned offset;
+ int i;
+
+ if (!(report = hid_register_report(parser->device, report_type, parser->global.report_id))) {
+ dbg("hid_register_report failed");
+ 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;
+ }
+
+ offset = report->size;
+ report->size += parser->global.report_size * parser->global.report_count;
+
+ if (!parser->local.usage_index) /* Ignore padding fields */
+ return 0;
+
+ usages = max_t(int, parser->local.usage_index, parser->global.report_count);
+
+ if ((field = hid_register_field(report, usages, parser->global.report_count)) == NULL)
+ return 0;
+
+ field->physical = hid_lookup_collection(parser, HID_COLLECTION_PHYSICAL);
+ field->logical = hid_lookup_collection(parser, HID_COLLECTION_LOGICAL);
+ field->application = hid_lookup_collection(parser, HID_COLLECTION_APPLICATION);
+
+ for (i = 0; i < usages; i++) {
+ int j = i;
+ /* Duplicate the last usage we parsed if we have excess values */
+ if (i >= parser->local.usage_index)
+ j = parser->local.usage_index - 1;
+ field->usage[i].hid = parser->local.usage[j];
+ field->usage[i].collection_index =
+ parser->local.collection_index[j];
+ }
+
+ field->maxusage = usages;
+ field->flags = flags;
+ field->report_offset = offset;
+ field->report_type = report_type;
+ field->report_size = parser->global.report_size;
+ field->report_count = parser->global.report_count;
+ field->logical_minimum = parser->global.logical_minimum;
+ field->logical_maximum = parser->global.logical_maximum;
+ field->physical_minimum = parser->global.physical_minimum;
+ field->physical_maximum = parser->global.physical_maximum;
+ field->unit_exponent = parser->global.unit_exponent;
+ field->unit = parser->global.unit;
+
+ return 0;
+}
+
+/*
+ * Read data value from item.
+ */
+
+static __inline__ __u32 item_udata(struct hid_item *item)
+{
+ switch (item->size) {
+ case 1: return item->data.u8;
+ case 2: return item->data.u16;
+ case 4: return item->data.u32;
+ }
+ return 0;
+}
+
+static __inline__ __s32 item_sdata(struct hid_item *item)
+{
+ switch (item->size) {
+ case 1: return item->data.s8;
+ case 2: return item->data.s16;
+ case 4: return item->data.s32;
+ }
+ return 0;
+}
+
+/*
+ * Process a global item.
+ */
+
+static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)
+{
+ switch (item->tag) {
+
+ case HID_GLOBAL_ITEM_TAG_PUSH:
+
+ if (parser->global_stack_ptr == HID_GLOBAL_STACK_SIZE) {
+ dbg("global enviroment stack overflow");
+ return -1;
+ }
+
+ memcpy(parser->global_stack + parser->global_stack_ptr++,
+ &parser->global, sizeof(struct hid_global));
+ return 0;
+
+ case HID_GLOBAL_ITEM_TAG_POP:
+
+ if (!parser->global_stack_ptr) {
+ dbg("global enviroment stack underflow");
+ return -1;
+ }
+
+ memcpy(&parser->global, parser->global_stack + --parser->global_stack_ptr,
+ sizeof(struct hid_global));
+ return 0;
+
+ case HID_GLOBAL_ITEM_TAG_USAGE_PAGE:
+ parser->global.usage_page = item_udata(item);
+ return 0;
+
+ case HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM:
+ parser->global.logical_minimum = item_sdata(item);
+ 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:
+ parser->global.physical_minimum = item_sdata(item);
+ 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:
+ parser->global.unit_exponent = item_sdata(item);
+ return 0;
+
+ case HID_GLOBAL_ITEM_TAG_UNIT:
+ parser->global.unit = item_udata(item);
+ return 0;
+
+ case HID_GLOBAL_ITEM_TAG_REPORT_SIZE:
+ if ((parser->global.report_size = item_udata(item)) > 32) {
+ dbg("invalid report_size %d", parser->global.report_size);
+ return -1;
+ }
+ return 0;
+
+ case HID_GLOBAL_ITEM_TAG_REPORT_COUNT:
+ if ((parser->global.report_count = item_udata(item)) > HID_MAX_USAGES) {
+ dbg("invalid report_count %d", parser->global.report_count);
+ return -1;
+ }
+ return 0;
+
+ case HID_GLOBAL_ITEM_TAG_REPORT_ID:
+ if ((parser->global.report_id = item_udata(item)) == 0) {
+ dbg("report_id 0 is invalid");
+ return -1;
+ }
+ return 0;
+
+ default:
+ dbg("unknown global tag 0x%x", item->tag);
+ return -1;
+ }
+}
+
+/*
+ * Process a local item.
+ */
+
+static int hid_parser_local(struct hid_parser *parser, struct hid_item *item)
+{
+ __u32 data;
+ unsigned n;
+
+ if (item->size == 0) {
+ dbg("item data expected for local item");
+ return -1;
+ }
+
+ data = item_udata(item);
+
+ switch (item->tag) {
+
+ case HID_LOCAL_ITEM_TAG_DELIMITER:
+
+ if (data) {
+ /*
+ * We treat items before the first delimiter
+ * as global to all usage sets (branch 0).
+ * In the moment we process only these global
+ * items and the first delimiter set.
+ */
+ if (parser->local.delimiter_depth != 0) {
+ dbg("nested delimiters");
+ return -1;
+ }
+ parser->local.delimiter_depth++;
+ parser->local.delimiter_branch++;
+ } else {
+ if (parser->local.delimiter_depth < 1) {
+ dbg("bogus close delimiter");
+ return -1;
+ }
+ parser->local.delimiter_depth--;
+ }
+ return 1;
+
+ case HID_LOCAL_ITEM_TAG_USAGE:
+
+ if (parser->local.delimiter_branch > 1) {
+ dbg("alternative usage ignored");
+ return 0;
+ }
+
+ if (item->size <= 2)
+ data = (parser->global.usage_page << 16) + data;
+
+ return hid_add_usage(parser, data);
+
+ case HID_LOCAL_ITEM_TAG_USAGE_MINIMUM:
+
+ if (parser->local.delimiter_branch > 1) {
+ dbg("alternative usage ignored");
+ return 0;
+ }
+
+ if (item->size <= 2)
+ data = (parser->global.usage_page << 16) + data;
+
+ parser->local.usage_minimum = data;
+ return 0;
+
+ case HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM:
+
+ if (parser->local.delimiter_branch > 1) {
+ dbg("alternative usage ignored");
+ return 0;
+ }
+
+ if (item->size <= 2)
+ data = (parser->global.usage_page << 16) + data;
+
+ for (n = parser->local.usage_minimum; n <= data; n++)
+ if (hid_add_usage(parser, n)) {
+ dbg("hid_add_usage failed\n");
+ return -1;
+ }
+ return 0;
+
+ default:
+
+ dbg("unknown local item tag 0x%x", item->tag);
+ return 0;
+ }
+ return 0;
+}
+
+/*
+ * Process a main item.
+ */
+
+static int hid_parser_main(struct hid_parser *parser, struct hid_item *item)
+{
+ __u32 data;
+ int ret;
+
+ data = item_udata(item);
+
+ switch (item->tag) {
+ case HID_MAIN_ITEM_TAG_BEGIN_COLLECTION:
+ ret = open_collection(parser, data & 0xff);
+ break;
+ case HID_MAIN_ITEM_TAG_END_COLLECTION:
+ ret = close_collection(parser);
+ break;
+ case HID_MAIN_ITEM_TAG_INPUT:
+ ret = hid_add_field(parser, HID_INPUT_REPORT, data);
+ break;
+ case HID_MAIN_ITEM_TAG_OUTPUT:
+ ret = hid_add_field(parser, HID_OUTPUT_REPORT, data);
+ break;
+ case HID_MAIN_ITEM_TAG_FEATURE:
+ ret = hid_add_field(parser, HID_FEATURE_REPORT, data);
+ break;
+ default:
+ dbg("unknown main item tag 0x%x", item->tag);
+ ret = 0;
+ }
+
+ memset(&parser->local, 0, sizeof(parser->local)); /* Reset the local parser environment */
+
+ return ret;
+}
+
+/*
+ * Process a reserved item.
+ */
+
+static int hid_parser_reserved(struct hid_parser *parser, struct hid_item *item)
+{
+ dbg("reserved item type, tag 0x%x", item->tag);
+ return 0;
+}
+
+/*
+ * Free a report and all registered fields. The field->usage and
+ * field->value table's are allocated behind the field, so we need
+ * only to free(field) itself.
+ */
+
+static void hid_free_report(struct hid_report *report)
+{
+ unsigned n;
+
+ for (n = 0; n < report->maxfield; n++)
+ kfree(report->field[n]);
+ kfree(report);
+}
+
+/*
+ * Free a device structure, all reports, and all fields.
+ */
+
+static void hid_free_device(struct hid_device *device)
+{
+ unsigned i,j;
+
+ hid_ff_exit(device);
+
+ for (i = 0; i < HID_REPORT_TYPES; i++) {
+ struct hid_report_enum *report_enum = device->report_enum + i;
+
+ for (j = 0; j < 256; j++) {
+ struct hid_report *report = report_enum->report_id_hash[j];
+ if (report)
+ hid_free_report(report);
+ }
+ }
+
+ if (device->rdesc)
+ kfree(device->rdesc);
+ kfree(device);
+}
+
+/*
+ * Fetch a report description item from the data stream. We support long
+ * items, though they are not used yet.
+ */
+
+static u8 *fetch_item(__u8 *start, __u8 *end, struct hid_item *item)
+{
+ u8 b;
+
+ if ((end - start) <= 0)
+ return NULL;
+
+ b = *start++;
+
+ item->type = (b >> 2) & 3;
+ item->tag = (b >> 4) & 15;
+
+ if (item->tag == HID_ITEM_TAG_LONG) {
+
+ item->format = HID_ITEM_FORMAT_LONG;
+
+ if ((end - start) < 2)
+ return NULL;
+
+ item->size = *start++;
+ item->tag = *start++;
+
+ if ((end - start) < item->size)
+ return NULL;
+
+ item->data.longdata = start;
+ start += item->size;
+ return start;
+ }
+
+ item->format = HID_ITEM_FORMAT_SHORT;
+ item->size = b & 3;
+
+ switch (item->size) {
+
+ case 0:
+ return start;
+
+ case 1:
+ if ((end - start) < 1)
+ return NULL;
+ item->data.u8 = *start++;
+ return start;
+
+ case 2:
+ if ((end - start) < 2)
+ return NULL;
+ item->data.u16 = le16_to_cpu(get_unaligned((__le16*)start));
+ start = (__u8 *)((__le16 *)start + 1);
+ return start;
+
+ case 3:
+ item->size++;
+ if ((end - start) < 4)
+ return NULL;
+ item->data.u32 = le32_to_cpu(get_unaligned((__le32*)start));
+ start = (__u8 *)((__le32 *)start + 1);
+ return start;
+ }
+
+ return NULL;
+}
+
+/*
+ * Parse a report description into a hid_device structure. Reports are
+ * enumerated, fields are attached to these reports.
+ */
+
+static struct hid_device *hid_parse_report(__u8 *start, unsigned size)
+{
+ struct hid_device *device;
+ struct hid_parser *parser;
+ struct hid_item item;
+ __u8 *end;
+ unsigned i;
+ static int (*dispatch_type[])(struct hid_parser *parser,
+ struct hid_item *item) = {
+ hid_parser_main,
+ hid_parser_global,
+ hid_parser_local,
+ hid_parser_reserved
+ };
+
+ if (!(device = kmalloc(sizeof(struct hid_device), GFP_KERNEL)))
+ return NULL;
+ memset(device, 0, sizeof(struct hid_device));
+
+ if (!(device->collection = kmalloc(sizeof(struct hid_collection) *
+ HID_DEFAULT_NUM_COLLECTIONS, GFP_KERNEL))) {
+ kfree(device);
+ return NULL;
+ }
+ memset(device->collection, 0, sizeof(struct hid_collection) *
+ HID_DEFAULT_NUM_COLLECTIONS);
+ device->collection_size = HID_DEFAULT_NUM_COLLECTIONS;
+
+ for (i = 0; i < HID_REPORT_TYPES; i++)
+ INIT_LIST_HEAD(&device->report_enum[i].report_list);
+
+ if (!(device->rdesc = (__u8 *)kmalloc(size, GFP_KERNEL))) {
+ kfree(device->collection);
+ kfree(device);
+ return NULL;
+ }
+ memcpy(device->rdesc, start, size);
+ device->rsize = size;
+
+ if (!(parser = kmalloc(sizeof(struct hid_parser), GFP_KERNEL))) {
+ kfree(device->rdesc);
+ kfree(device->collection);
+ kfree(device);
+ return NULL;
+ }
+ memset(parser, 0, sizeof(struct hid_parser));
+ parser->device = device;
+
+ end = start + size;
+ while ((start = fetch_item(start, end, &item)) != NULL) {
+
+ if (item.format != HID_ITEM_FORMAT_SHORT) {
+ dbg("unexpected long global item");
+ kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+ }
+
+ if (dispatch_type[item.type](parser, &item)) {
+ dbg("item %u %u %u %u parsing failed\n",
+ item.format, (unsigned)item.size, (unsigned)item.type, (unsigned)item.tag);
+ kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+ }
+
+ if (start == end) {
+ if (parser->collection_stack_ptr) {
+ dbg("unbalanced collection at end of report description");
+ kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+ }
+ if (parser->local.delimiter_depth) {
+ dbg("unbalanced delimiter at end of report description");
+ kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+ }
+ kfree(parser);
+ return device;
+ }
+ }
+
+ dbg("item fetching failed at offset %d\n", (int)(end - start));
+ kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+}
+
+/*
+ * Convert a signed n-bit integer to signed 32-bit integer. Common
+ * cases are done through the compiler, the screwed things has to be
+ * done by hand.
+ */
+
+static __inline__ __s32 snto32(__u32 value, unsigned n)
+{
+ switch (n) {
+ case 8: return ((__s8)value);
+ case 16: return ((__s16)value);
+ case 32: return ((__s32)value);
+ }
+ return value & (1 << (n - 1)) ? value | (-1 << n) : value;
+}
+
+/*
+ * Convert a signed 32-bit integer to a signed n-bit integer.
+ */
+
+static __inline__ __u32 s32ton(__s32 value, unsigned n)
+{
+ __s32 a = value >> (n - 1);
+ if (a && a != -1)
+ return value < 0 ? 1 << (n - 1) : (1 << (n - 1)) - 1;
+ return value & ((1 << n) - 1);
+}
+
+/*
+ * Extract/implement a data field from/to a report.
+ */
+
+static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n)
+{
+ report += (offset >> 5) << 2; offset &= 31;
+ return (le64_to_cpu(get_unaligned((__le64*)report)) >> offset) & ((1 << n) - 1);
+}
+
+static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value)
+{
+ report += (offset >> 5) << 2; offset &= 31;
+ put_unaligned((get_unaligned((__le64*)report)
+ & cpu_to_le64(~((((__u64) 1 << n) - 1) << offset)))
+ | cpu_to_le64((__u64)value << offset), (__le64*)report);
+}
+
+/*
+ * Search an array for a value.
+ */
+
+static __inline__ int search(__s32 *array, __s32 value, unsigned n)
+{
+ while (n--) {
+ if (*array++ == value)
+ return 0;
+ }
+ return -1;
+}
+
+static void hid_process_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, struct pt_regs *regs)
+{
+ hid_dump_input(usage, value);
+ if (hid->claimed & HID_CLAIMED_INPUT)
+ hidinput_hid_event(hid, field, usage, value, regs);
+ if (hid->claimed & HID_CLAIMED_HIDDEV)
+ hiddev_hid_event(hid, field, usage, value, regs);
+}
+
+/*
+ * Analyse a received field, and fetch the data from it. The field
+ * content is stored for next report processing (we do differential
+ * reporting to the layer).
+ */
+
+static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, struct pt_regs *regs)
+{
+ unsigned n;
+ unsigned count = field->report_count;
+ unsigned offset = field->report_offset;
+ unsigned size = field->report_size;
+ __s32 min = field->logical_minimum;
+ __s32 max = field->logical_maximum;
+ __s32 *value;
+
+ if (!(value = kmalloc(sizeof(__s32) * count, GFP_ATOMIC)))
+ return;
+
+ for (n = 0; n < count; n++) {
+
+ value[n] = min < 0 ? snto32(extract(data, offset + n * size, size), size) :
+ extract(data, offset + n * size, size);
+
+ if (!(field->flags & HID_MAIN_ITEM_VARIABLE) /* Ignore report if ErrorRollOver */
+ && value[n] >= min && value[n] <= max
+ && field->usage[value[n] - min].hid == HID_UP_KEYBOARD + 1)
+ goto exit;
+ }
+
+ for (n = 0; n < count; n++) {
+
+ if (HID_MAIN_ITEM_VARIABLE & field->flags) {
+ hid_process_event(hid, field, &field->usage[n], value[n], regs);
+ continue;
+ }
+
+ if (field->value[n] >= min && field->value[n] <= max
+ && field->usage[field->value[n] - min].hid
+ && search(value, field->value[n], count))
+ hid_process_event(hid, field, &field->usage[field->value[n] - min], 0, regs);
+
+ if (value[n] >= min && value[n] <= max
+ && field->usage[value[n] - min].hid
+ && search(field->value, value[n], count))
+ hid_process_event(hid, field, &field->usage[value[n] - min], 1, regs);
+ }
+
+ memcpy(field->value, value, count * sizeof(__s32));
+exit:
+ kfree(value);
+}
+
+static int hid_input_report(int type, struct urb *urb, struct pt_regs *regs)
+{
+ struct hid_device *hid = urb->context;
+ struct hid_report_enum *report_enum = hid->report_enum + type;
+ u8 *data = urb->transfer_buffer;
+ int len = urb->actual_length;
+ struct hid_report *report;
+ int n, size;
+
+ if (!len) {
+ dbg("empty report");
+ return -1;
+ }
+
+#ifdef DEBUG_DATA
+ printk(KERN_DEBUG __FILE__ ": report (size %u) (%snumbered)\n", len, report_enum->numbered ? "" : "un");
+#endif
+
+ n = 0; /* Normally report number is 0 */
+ if (report_enum->numbered) { /* Device uses numbered reports, data[0] is report number */
+ n = *data++;
+ len--;
+ }
+
+#ifdef DEBUG_DATA
+ {
+ int i;
+ printk(KERN_DEBUG __FILE__ ": report %d (size %u) = ", n, len);
+ for (i = 0; i < len; i++)
+ printk(" %02x", data[i]);
+ printk("\n");
+ }
+#endif
+
+ if (!(report = report_enum->report_id_hash[n])) {
+ dbg("undefined report_id %d received", n);
+ return -1;
+ }
+
+ size = ((report->size - 1) >> 3) + 1;
+
+ if (len < size)
+ dbg("report %d is too short, (%d < %d)", report->id, len, size);
+
+ if (hid->claimed & HID_CLAIMED_HIDDEV)
+ hiddev_report_event(hid, report);
+
+ for (n = 0; n < report->maxfield; n++)
+ hid_input_field(hid, report->field[n], data, regs);
+
+ if (hid->claimed & HID_CLAIMED_INPUT)
+ hidinput_report_event(hid, report);
+
+ return 0;
+}
+
+/*
+ * Input interrupt completion handler.
+ */
+
+static void hid_irq_in(struct urb *urb, struct pt_regs *regs)
+{
+ struct hid_device *hid = urb->context;
+ int status;
+
+ switch (urb->status) {
+ case 0: /* success */
+ hid_input_report(HID_INPUT_REPORT, urb, regs);
+ break;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -EPERM:
+ case -ESHUTDOWN: /* unplug */
+ case -EILSEQ: /* unplug timeout on uhci */
+ return;
+ case -ETIMEDOUT: /* NAK */
+ break;
+ default: /* error */
+ warn("input irq status %d received", urb->status);
+ }
+
+ status = usb_submit_urb(urb, SLAB_ATOMIC);
+ if (status)
+ err("can't resubmit intr, %s-%s/input%d, status %d",
+ hid->dev->bus->bus_name, hid->dev->devpath,
+ hid->ifnum, status);
+}
+
+/*
+ * Output the field into the report.
+ */
+
+static void hid_output_field(struct hid_field *field, __u8 *data)
+{
+ unsigned count = field->report_count;
+ unsigned offset = field->report_offset;
+ unsigned size = field->report_size;
+ unsigned n;
+
+ for (n = 0; n < count; n++) {
+ if (field->logical_minimum < 0) /* signed values */
+ implement(data, offset + n * size, size, s32ton(field->value[n], size));
+ else /* unsigned values */
+ implement(data, offset + n * size, size, field->value[n]);
+ }
+}
+
+/*
+ * Create a report.
+ */
+
+static void hid_output_report(struct hid_report *report, __u8 *data)
+{
+ unsigned n;
+
+ if (report->id > 0)
+ *data++ = report->id;
+
+ for (n = 0; n < report->maxfield; n++)
+ hid_output_field(report->field[n], data);
+}
+
+/*
+ * Set a field value. The report this field belongs to has to be
+ * created and transferred to the device, to set this value in the
+ * device.
+ */
+
+int hid_set_field(struct hid_field *field, unsigned offset, __s32 value)
+{
+ unsigned size = field->report_size;
+
+ hid_dump_input(field->usage + offset, value);
+
+ if (offset >= field->report_count) {
+ dbg("offset (%d) exceeds report_count (%d)", offset, field->report_count);
+ hid_dump_field(field, 8);
+ return -1;
+ }
+ if (field->logical_minimum < 0) {
+ if (value != snto32(s32ton(value, size), size)) {
+ dbg("value %d is out of range", value);
+ return -1;
+ }
+ }
+ field->value[offset] = value;
+ return 0;
+}
+
+/*
+ * Find a report field with a specified HID usage.
+ */
+
+struct hid_field *hid_find_field_by_usage(struct hid_device *hid, __u32 wanted_usage, int type)
+{
+ struct hid_report *report;
+ int i;
+
+ list_for_each_entry(report, &hid->report_enum[type].report_list, list)
+ for (i = 0; i < report->maxfield; i++)
+ if (report->field[i]->logical == wanted_usage)
+ return report->field[i];
+ return NULL;
+}
+
+static int hid_submit_out(struct hid_device *hid)
+{
+ struct hid_report *report;
+
+ report = hid->out[hid->outtail];
+
+ hid_output_report(report, hid->outbuf);
+ hid->urbout->transfer_buffer_length = ((report->size - 1) >> 3) + 1 + (report->id > 0);
+ hid->urbout->dev = hid->dev;
+
+ dbg("submitting out urb");
+
+ if (usb_submit_urb(hid->urbout, GFP_ATOMIC)) {
+ err("usb_submit_urb(out) failed");
+ return -1;
+ }
+
+ return 0;
+}
+
+static int hid_submit_ctrl(struct hid_device *hid)
+{
+ struct hid_report *report;
+ unsigned char dir;
+ int len;
+
+ report = hid->ctrl[hid->ctrltail].report;
+ dir = hid->ctrl[hid->ctrltail].dir;
+
+ len = ((report->size - 1) >> 3) + 1 + (report->id > 0);
+ if (dir == USB_DIR_OUT) {
+ hid_output_report(report, hid->ctrlbuf);
+ hid->urbctrl->pipe = usb_sndctrlpipe(hid->dev, 0);
+ hid->urbctrl->transfer_buffer_length = len;
+ } else {
+ int maxpacket, padlen;
+
+ hid->urbctrl->pipe = usb_rcvctrlpipe(hid->dev, 0);
+ maxpacket = usb_maxpacket(hid->dev, hid->urbctrl->pipe, 0);
+ if (maxpacket > 0) {
+ padlen = (len + maxpacket - 1) / maxpacket;
+ padlen *= maxpacket;
+ if (padlen > HID_BUFFER_SIZE)
+ padlen = HID_BUFFER_SIZE;
+ } else
+ padlen = 0;
+ hid->urbctrl->transfer_buffer_length = padlen;
+ }
+ hid->urbctrl->dev = hid->dev;
+
+ hid->cr->bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE | dir;
+ hid->cr->bRequest = (dir == USB_DIR_OUT) ? HID_REQ_SET_REPORT : HID_REQ_GET_REPORT;
+ hid->cr->wValue = cpu_to_le16(((report->type + 1) << 8) | report->id);
+ hid->cr->wIndex = cpu_to_le16(hid->ifnum);
+ hid->cr->wLength = cpu_to_le16(len);
+
+ dbg("submitting ctrl urb: %s wValue=0x%04x wIndex=0x%04x wLength=%u",
+ hid->cr->bRequest == HID_REQ_SET_REPORT ? "Set_Report" : "Get_Report",
+ hid->cr->wValue, hid->cr->wIndex, hid->cr->wLength);
+
+ if (usb_submit_urb(hid->urbctrl, GFP_ATOMIC)) {
+ err("usb_submit_urb(ctrl) failed");
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
+ * Output interrupt completion handler.
+ */
+
+static void hid_irq_out(struct urb *urb, struct pt_regs *regs)
+{
+ struct hid_device *hid = urb->context;
+ unsigned long flags;
+ int unplug = 0;
+
+ switch (urb->status) {
+ case 0: /* success */
+ case -ESHUTDOWN: /* unplug */
+ case -EILSEQ: /* unplug timeout on uhci */
+ unplug = 1;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ break;
+ default: /* error */
+ warn("output irq status %d received", urb->status);
+ }
+
+ spin_lock_irqsave(&hid->outlock, flags);
+
+ if (unplug)
+ hid->outtail = hid->outhead;
+ else
+ hid->outtail = (hid->outtail + 1) & (HID_OUTPUT_FIFO_SIZE - 1);
+
+ if (hid->outhead != hid->outtail) {
+ if (hid_submit_out(hid)) {
+ clear_bit(HID_OUT_RUNNING, &hid->iofl);;
+ wake_up(&hid->wait);
+ }
+ spin_unlock_irqrestore(&hid->outlock, flags);
+ return;
+ }
+
+ clear_bit(HID_OUT_RUNNING, &hid->iofl);
+ spin_unlock_irqrestore(&hid->outlock, flags);
+ wake_up(&hid->wait);
+}
+
+/*
+ * Control pipe completion handler.
+ */
+
+static void hid_ctrl(struct urb *urb, struct pt_regs *regs)
+{
+ struct hid_device *hid = urb->context;
+ unsigned long flags;
+ int unplug = 0;
+
+ spin_lock_irqsave(&hid->ctrllock, flags);
+
+ switch (urb->status) {
+ case 0: /* success */
+ if (hid->ctrl[hid->ctrltail].dir == USB_DIR_IN)
+ hid_input_report(hid->ctrl[hid->ctrltail].report->type, urb, regs);
+ case -ESHUTDOWN: /* unplug */
+ case -EILSEQ: /* unplug timectrl on uhci */
+ unplug = 1;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -EPIPE: /* report not available */
+ break;
+ default: /* error */
+ warn("ctrl urb status %d received", urb->status);
+ }
+
+ if (unplug)
+ hid->ctrltail = hid->ctrlhead;
+ else
+ hid->ctrltail = (hid->ctrltail + 1) & (HID_CONTROL_FIFO_SIZE - 1);
+
+ if (hid->ctrlhead != hid->ctrltail) {
+ if (hid_submit_ctrl(hid)) {
+ clear_bit(HID_CTRL_RUNNING, &hid->iofl);
+ wake_up(&hid->wait);
+ }
+ spin_unlock_irqrestore(&hid->ctrllock, flags);
+ return;
+ }
+
+ clear_bit(HID_CTRL_RUNNING, &hid->iofl);
+ spin_unlock_irqrestore(&hid->ctrllock, flags);
+ wake_up(&hid->wait);
+}
+
+void hid_submit_report(struct hid_device *hid, struct hid_report *report, unsigned char dir)
+{
+ int head;
+ unsigned long flags;
+
+ if ((hid->quirks & HID_QUIRK_NOGET) && dir == USB_DIR_IN)
+ return;
+
+ if (hid->urbout && dir == USB_DIR_OUT && report->type == HID_OUTPUT_REPORT) {
+
+ spin_lock_irqsave(&hid->outlock, flags);
+
+ if ((head = (hid->outhead + 1) & (HID_OUTPUT_FIFO_SIZE - 1)) == hid->outtail) {
+ spin_unlock_irqrestore(&hid->outlock, flags);
+ warn("output queue full");
+ return;
+ }
+
+ hid->out[hid->outhead] = report;
+ hid->outhead = head;
+
+ if (!test_and_set_bit(HID_OUT_RUNNING, &hid->iofl))
+ if (hid_submit_out(hid))
+ clear_bit(HID_OUT_RUNNING, &hid->iofl);
+
+ spin_unlock_irqrestore(&hid->outlock, flags);
+ return;
+ }
+
+ spin_lock_irqsave(&hid->ctrllock, flags);
+
+ if ((head = (hid->ctrlhead + 1) & (HID_CONTROL_FIFO_SIZE - 1)) == hid->ctrltail) {
+ spin_unlock_irqrestore(&hid->ctrllock, flags);
+ warn("control queue full");
+ return;
+ }
+
+ hid->ctrl[hid->ctrlhead].report = report;
+ hid->ctrl[hid->ctrlhead].dir = dir;
+ hid->ctrlhead = head;
+
+ if (!test_and_set_bit(HID_CTRL_RUNNING, &hid->iofl))
+ if (hid_submit_ctrl(hid))
+ clear_bit(HID_CTRL_RUNNING, &hid->iofl);
+
+ spin_unlock_irqrestore(&hid->ctrllock, flags);
+}
+
+int hid_wait_io(struct hid_device *hid)
+{
+ if (!wait_event_timeout(hid->wait, (!test_bit(HID_CTRL_RUNNING, &hid->iofl) &&
+ !test_bit(HID_OUT_RUNNING, &hid->iofl)),
+ 10*HZ)) {
+ dbg("timeout waiting for ctrl or out queue to clear");
+ return -1;
+ }
+
+ return 0;
+}
+
+static int hid_get_class_descriptor(struct usb_device *dev, int ifnum,
+ unsigned char type, void *buf, int size)
+{
+ int result, retries = 4;
+
+ memset(buf,0,size); // Make sure we parse really received data
+
+ do {
+ result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ USB_REQ_GET_DESCRIPTOR, USB_RECIP_INTERFACE | USB_DIR_IN,
+ (type << 8), ifnum, buf, size, USB_CTRL_GET_TIMEOUT);
+ retries--;
+ } while (result < size && retries);
+ return result;
+}
+
+int hid_open(struct hid_device *hid)
+{
+ if (hid->open++)
+ return 0;
+
+ hid->urbin->dev = hid->dev;
+
+ if (usb_submit_urb(hid->urbin, GFP_KERNEL))
+ return -EIO;
+
+ return 0;
+}
+
+void hid_close(struct hid_device *hid)
+{
+ if (!--hid->open)
+ usb_kill_urb(hid->urbin);
+}
+
+/*
+ * Initialize all reports
+ */
+
+void hid_init_reports(struct hid_device *hid)
+{
+ struct hid_report *report;
+ int err, ret;
+
+ list_for_each_entry(report, &hid->report_enum[HID_INPUT_REPORT].report_list, list) {
+ int size = ((report->size - 1) >> 3) + 1 + hid->report_enum[HID_INPUT_REPORT].numbered;
+ if (size > HID_BUFFER_SIZE) size = HID_BUFFER_SIZE;
+ if (size > hid->urbin->transfer_buffer_length)
+ hid->urbin->transfer_buffer_length = size;
+ hid_submit_report(hid, report, USB_DIR_IN);
+ }
+
+ list_for_each_entry(report, &hid->report_enum[HID_FEATURE_REPORT].report_list, list)
+ hid_submit_report(hid, report, USB_DIR_IN);
+
+ err = 0;
+ ret = hid_wait_io(hid);
+ while (ret) {
+ err |= ret;
+ if (test_bit(HID_CTRL_RUNNING, &hid->iofl))
+ usb_kill_urb(hid->urbctrl);
+ if (test_bit(HID_OUT_RUNNING, &hid->iofl))
+ usb_kill_urb(hid->urbout);
+ ret = hid_wait_io(hid);
+ }
+
+ if (err)
+ warn("timeout initializing reports\n");
+
+ usb_control_msg(hid->dev, usb_sndctrlpipe(hid->dev, 0),
+ HID_REQ_SET_IDLE, USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0,
+ hid->ifnum, NULL, 0, USB_CTRL_SET_TIMEOUT);
+}
+
+#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 0x0040
+#define USB_DEVICE_ID_WACOM_VOLITO 0x0060
+#define USB_DEVICE_ID_WACOM_PTU 0x0003
+
+#define USB_VENDOR_ID_KBGEAR 0x084e
+#define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001
+
+#define USB_VENDOR_ID_AIPTEK 0x08ca
+#define USB_DEVICE_ID_AIPTEK_01 0x0001
+#define USB_DEVICE_ID_AIPTEK_10 0x0010
+#define USB_DEVICE_ID_AIPTEK_20 0x0020
+#define USB_DEVICE_ID_AIPTEK_21 0x0021
+#define USB_DEVICE_ID_AIPTEK_22 0x0022
+#define USB_DEVICE_ID_AIPTEK_23 0x0023
+#define USB_DEVICE_ID_AIPTEK_24 0x0024
+
+#define USB_VENDOR_ID_GRIFFIN 0x077d
+#define USB_DEVICE_ID_POWERMATE 0x0410
+#define USB_DEVICE_ID_SOUNDKNOB 0x04AA
+
+#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
+#define USB_DEVICE_ID_ATEN_4PORTKVMC 0x2208
+
+#define USB_VENDOR_ID_TOPMAX 0x0663
+#define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103
+
+#define USB_VENDOR_ID_HAPP 0x078b
+#define USB_DEVICE_ID_UGCI_DRIVING 0x0010
+#define USB_DEVICE_ID_UGCI_FLYING 0x0020
+#define USB_DEVICE_ID_UGCI_FIGHTING 0x0030
+
+#define USB_VENDOR_ID_MGE 0x0463
+#define USB_DEVICE_ID_MGE_UPS 0xffff
+#define USB_DEVICE_ID_MGE_UPS1 0x0001
+
+#define USB_VENDOR_ID_ONTRAK 0x0a07
+#define USB_DEVICE_ID_ONTRAK_ADU100 0x0064
+
+#define USB_VENDOR_ID_TANGTOP 0x0d3d
+#define USB_DEVICE_ID_TANGTOP_USBPS2 0x0001
+
+#define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f
+#define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100
+
+#define USB_VENDOR_ID_A4TECH 0x09da
+#define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006
+
+#define USB_VENDOR_ID_CYPRESS 0x04b4
+#define USB_DEVICE_ID_CYPRESS_MOUSE 0x0001
+#define USB_DEVICE_ID_CYPRESS_HIDCOM 0x5500
+
+#define USB_VENDOR_ID_BERKSHIRE 0x0c98
+#define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140
+
+#define USB_VENDOR_ID_ALPS 0x0433
+#define USB_DEVICE_ID_IBM_GAMEPAD 0x1101
+
+#define USB_VENDOR_ID_SAITEK 0x06a3
+#define USB_DEVICE_ID_SAITEK_RUMBLEPAD 0xff17
+
+#define USB_VENDOR_ID_NEC 0x073e
+#define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301
+
+#define USB_VENDOR_ID_CHIC 0x05fe
+#define USB_DEVICE_ID_CHIC_GAMEPAD 0x0014
+
+#define USB_VENDOR_ID_GLAB 0x06c2
+#define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038
+#define USB_DEVICE_ID_1_PHIDGETSERVO_30 0x0039
+#define USB_DEVICE_ID_8_8_8_IF_KIT 0x0045
+#define USB_DEVICE_ID_0_0_4_IF_KIT 0x0040
+#define USB_DEVICE_ID_0_8_8_IF_KIT 0x0053
+
+#define USB_VENDOR_ID_WISEGROUP 0x0925
+#define USB_DEVICE_ID_1_PHIDGETSERVO_20 0x8101
+#define USB_DEVICE_ID_4_PHIDGETSERVO_20 0x8104
+
+#define USB_VENDOR_ID_CODEMERCS 0x07c0
+#define USB_DEVICE_ID_CODEMERCS_IOW40 0x1500
+#define USB_DEVICE_ID_CODEMERCS_IOW24 0x1501
+#define USB_DEVICE_ID_CODEMERCS_IOW48 0x1502
+#define USB_DEVICE_ID_CODEMERCS_IOW28 0x1503
+
+#define USB_VENDOR_ID_DELORME 0x1163
+#define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
+
+#define USB_VENDOR_ID_MCC 0x09db
+#define USB_DEVICE_ID_MCC_PMD1024LS 0x0076
+#define USB_DEVICE_ID_MCC_PMD1208LS 0x007a
+
+#define USB_VENDOR_ID_CHICONY 0x04f2
+#define USB_DEVICE_ID_CHICONY_USBHUB_KB 0x0100
+
+#define USB_VENDOR_ID_BTC 0x046e
+#define USB_DEVICE_ID_BTC_KEYBOARD 0x5303
+
+
+/*
+ * Alphabetically sorted blacklist by quirk type.
+ */
+
+static struct hid_blacklist {
+ __u16 idVendor;
+ __u16 idProduct;
+ unsigned quirks;
+} hid_blacklist[] = {
+
+ { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_01, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_10, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_20, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_21, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_22, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_23, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW48, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_4_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_1_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_8_8_8_IF_KIT, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_0_4_IF_KIT, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 100, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 200, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 300, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 400, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 500, HID_QUIRK_IGNORE },
+ { 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_GRAPHIRE + 3, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 4, 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 + 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_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 5, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 7, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
+ { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, 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 },
+ { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
+ { USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_KEYBOARD, HID_QUIRK_NOGET},
+ { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_USBHUB_KB, HID_QUIRK_NOGET},
+ { USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, HID_QUIRK_NOGET },
+
+ { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 },
+ { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 },
+
+ { USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD },
+ { USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD, HID_QUIRK_BADPAD },
+ { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
+ { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
+ { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
+ { USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD, HID_QUIRK_BADPAD },
+ { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD },
+ { USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD },
+
+ { 0, 0 }
+};
+
+static int hid_alloc_buffers(struct usb_device *dev, struct hid_device *hid)
+{
+ if (!(hid->inbuf = usb_buffer_alloc(dev, HID_BUFFER_SIZE, SLAB_ATOMIC, &hid->inbuf_dma)))
+ return -1;
+ if (!(hid->outbuf = usb_buffer_alloc(dev, HID_BUFFER_SIZE, SLAB_ATOMIC, &hid->outbuf_dma)))
+ return -1;
+ if (!(hid->cr = usb_buffer_alloc(dev, sizeof(*(hid->cr)), SLAB_ATOMIC, &hid->cr_dma)))
+ return -1;
+ if (!(hid->ctrlbuf = usb_buffer_alloc(dev, HID_BUFFER_SIZE, SLAB_ATOMIC, &hid->ctrlbuf_dma)))
+ return -1;
+
+ return 0;
+}
+
+static void hid_free_buffers(struct usb_device *dev, struct hid_device *hid)
+{
+ if (hid->inbuf)
+ usb_buffer_free(dev, HID_BUFFER_SIZE, hid->inbuf, hid->inbuf_dma);
+ if (hid->outbuf)
+ usb_buffer_free(dev, HID_BUFFER_SIZE, hid->outbuf, hid->outbuf_dma);
+ if (hid->cr)
+ usb_buffer_free(dev, sizeof(*(hid->cr)), hid->cr, hid->cr_dma);
+ if (hid->ctrlbuf)
+ usb_buffer_free(dev, HID_BUFFER_SIZE, hid->ctrlbuf, hid->ctrlbuf_dma);
+}
+
+static struct hid_device *usb_hid_configure(struct usb_interface *intf)
+{
+ struct usb_host_interface *interface = intf->cur_altsetting;
+ struct usb_device *dev = interface_to_usbdev (intf);
+ struct hid_descriptor *hdesc;
+ struct hid_device *hid;
+ unsigned quirks = 0, rsize = 0;
+ char *buf, *rdesc;
+ int n;
+
+ for (n = 0; hid_blacklist[n].idVendor; n++)
+ if ((hid_blacklist[n].idVendor == le16_to_cpu(dev->descriptor.idVendor)) &&
+ (hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct)))
+ quirks = hid_blacklist[n].quirks;
+
+ if (quirks & HID_QUIRK_IGNORE)
+ return NULL;
+
+ if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) && ((!interface->desc.bNumEndpoints) ||
+ usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {
+ dbg("class descriptor not present\n");
+ return NULL;
+ }
+
+ for (n = 0; n < hdesc->bNumDescriptors; n++)
+ if (hdesc->desc[n].bDescriptorType == HID_DT_REPORT)
+ rsize = le16_to_cpu(hdesc->desc[n].wDescriptorLength);
+
+ if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) {
+ dbg("weird size of report descriptor (%u)", rsize);
+ return NULL;
+ }
+
+ if (!(rdesc = kmalloc(rsize, GFP_KERNEL))) {
+ dbg("couldn't allocate rdesc memory");
+ return NULL;
+ }
+
+ if ((n = hid_get_class_descriptor(dev, interface->desc.bInterfaceNumber, HID_DT_REPORT, rdesc, rsize)) < 0) {
+ dbg("reading report descriptor failed");
+ kfree(rdesc);
+ return NULL;
+ }
+
+#ifdef DEBUG_DATA
+ printk(KERN_DEBUG __FILE__ ": report descriptor (size %u, read %d) = ", rsize, n);
+ for (n = 0; n < rsize; n++)
+ printk(" %02x", (unsigned char) rdesc[n]);
+ printk("\n");
+#endif
+
+ if (!(hid = hid_parse_report(rdesc, n))) {
+ dbg("parsing report descriptor failed");
+ kfree(rdesc);
+ return NULL;
+ }
+
+ kfree(rdesc);
+ hid->quirks = quirks;
+
+ if (hid_alloc_buffers(dev, hid)) {
+ hid_free_buffers(dev, hid);
+ goto fail;
+ }
+
+ for (n = 0; n < interface->desc.bNumEndpoints; n++) {
+
+ struct usb_endpoint_descriptor *endpoint;
+ int pipe;
+ int interval;
+
+ endpoint = &interface->endpoint[n].desc;
+ if ((endpoint->bmAttributes & 3) != 3) /* Not an interrupt endpoint */
+ continue;
+
+ /* handle potential highspeed HID correctly */
+ interval = endpoint->bInterval;
+ if (dev->speed == USB_SPEED_HIGH)
+ interval = 1 << (interval - 1);
+
+ /* Change the polling interval of mice. */
+ if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0)
+ interval = hid_mousepoll_interval;
+
+ if (endpoint->bEndpointAddress & USB_DIR_IN) {
+ if (hid->urbin)
+ continue;
+ if (!(hid->urbin = usb_alloc_urb(0, GFP_KERNEL)))
+ goto fail;
+ pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
+ usb_fill_int_urb(hid->urbin, dev, pipe, hid->inbuf, 0,
+ hid_irq_in, hid, interval);
+ hid->urbin->transfer_dma = hid->inbuf_dma;
+ hid->urbin->transfer_flags |=(URB_NO_TRANSFER_DMA_MAP | URB_ASYNC_UNLINK);
+ } else {
+ if (hid->urbout)
+ continue;
+ if (!(hid->urbout = usb_alloc_urb(0, GFP_KERNEL)))
+ goto fail;
+ pipe = usb_sndintpipe(dev, endpoint->bEndpointAddress);
+ usb_fill_int_urb(hid->urbout, dev, pipe, hid->outbuf, 0,
+ hid_irq_out, hid, interval);
+ hid->urbout->transfer_dma = hid->outbuf_dma;
+ hid->urbout->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP | URB_ASYNC_UNLINK);
+ }
+ }
+
+ if (!hid->urbin) {
+ err("couldn't find an input interrupt endpoint");
+ goto fail;
+ }
+
+ init_waitqueue_head(&hid->wait);
+
+ spin_lock_init(&hid->outlock);
+ spin_lock_init(&hid->ctrllock);
+
+ hid->version = le16_to_cpu(hdesc->bcdHID);
+ hid->country = hdesc->bCountryCode;
+ hid->dev = dev;
+ hid->intf = intf;
+ hid->ifnum = interface->desc.bInterfaceNumber;
+
+ hid->name[0] = 0;
+
+ if (!(buf = kmalloc(64, GFP_KERNEL)))
+ goto fail;
+
+ if (dev->manufacturer) {
+ strcat(hid->name, dev->manufacturer);
+ if (dev->product)
+ snprintf(hid->name, 64, "%s %s", hid->name, dev->product);
+ } else if (dev->product) {
+ snprintf(hid->name, 128, "%s", dev->product);
+ } else
+ snprintf(hid->name, 128, "%04x:%04x",
+ le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(dev->descriptor.idProduct));
+
+ usb_make_path(dev, buf, 64);
+ snprintf(hid->phys, 64, "%s/input%d", buf,
+ intf->altsetting[0].desc.bInterfaceNumber);
+
+ if (usb_string(dev, dev->descriptor.iSerialNumber, hid->uniq, 64) <= 0)
+ hid->uniq[0] = 0;
+
+ kfree(buf);
+
+ hid->urbctrl = usb_alloc_urb(0, GFP_KERNEL);
+ if (!hid->urbctrl)
+ goto fail;
+ usb_fill_control_urb(hid->urbctrl, dev, 0, (void *) hid->cr,
+ hid->ctrlbuf, 1, hid_ctrl, hid);
+ hid->urbctrl->setup_dma = hid->cr_dma;
+ hid->urbctrl->transfer_dma = hid->ctrlbuf_dma;
+ hid->urbctrl->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP | URB_ASYNC_UNLINK);
+
+ return hid;
+
+fail:
+
+ if (hid->urbin)
+ usb_free_urb(hid->urbin);
+ if (hid->urbout)
+ usb_free_urb(hid->urbout);
+ if (hid->urbctrl)
+ usb_free_urb(hid->urbctrl);
+ hid_free_buffers(dev, hid);
+ hid_free_device(hid);
+
+ return NULL;
+}
+
+static void hid_disconnect(struct usb_interface *intf)
+{
+ struct hid_device *hid = usb_get_intfdata (intf);
+
+ if (!hid)
+ return;
+
+ usb_set_intfdata(intf, NULL);
+ usb_kill_urb(hid->urbin);
+ usb_kill_urb(hid->urbout);
+ usb_kill_urb(hid->urbctrl);
+
+ if (hid->claimed & HID_CLAIMED_INPUT)
+ hidinput_disconnect(hid);
+ if (hid->claimed & HID_CLAIMED_HIDDEV)
+ hiddev_disconnect(hid);
+
+ usb_free_urb(hid->urbin);
+ usb_free_urb(hid->urbctrl);
+ if (hid->urbout)
+ usb_free_urb(hid->urbout);
+
+ hid_free_buffers(hid->dev, hid);
+ hid_free_device(hid);
+}
+
+static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct hid_device *hid;
+ char path[64];
+ int i;
+ char *c;
+
+ dbg("HID probe called for ifnum %d",
+ intf->altsetting->desc.bInterfaceNumber);
+
+ if (!(hid = usb_hid_configure(intf)))
+ return -EIO;
+
+ hid_init_reports(hid);
+ hid_dump_device(hid);
+
+ if (!hidinput_connect(hid))
+ hid->claimed |= HID_CLAIMED_INPUT;
+ if (!hiddev_connect(hid))
+ hid->claimed |= HID_CLAIMED_HIDDEV;
+
+ usb_set_intfdata(intf, hid);
+
+ if (!hid->claimed) {
+ printk ("HID device not claimed by input or hiddev\n");
+ hid_disconnect(intf);
+ return -EIO;
+ }
+
+ printk(KERN_INFO);
+
+ if (hid->claimed & HID_CLAIMED_INPUT)
+ printk("input");
+ if (hid->claimed == (HID_CLAIMED_INPUT | HID_CLAIMED_HIDDEV))
+ printk(",");
+ if (hid->claimed & HID_CLAIMED_HIDDEV)
+ printk("hiddev%d", hid->minor);
+
+ c = "Device";
+ for (i = 0; i < hid->maxcollection; i++) {
+ if (hid->collection[i].type == HID_COLLECTION_APPLICATION &&
+ (hid->collection[i].usage & HID_USAGE_PAGE) == HID_UP_GENDESK &&
+ (hid->collection[i].usage & 0xffff) < ARRAY_SIZE(hid_types)) {
+ c = hid_types[hid->collection[i].usage & 0xffff];
+ break;
+ }
+ }
+
+ usb_make_path(interface_to_usbdev(intf), path, 63);
+
+ printk(": USB HID v%x.%02x %s [%s] on %s\n",
+ hid->version >> 8, hid->version & 0xff, c, hid->name, path);
+
+ return 0;
+}
+
+static int hid_suspend(struct usb_interface *intf, u32 state)
+{
+ struct hid_device *hid = usb_get_intfdata (intf);
+
+ usb_kill_urb(hid->urbin);
+ intf->dev.power.power_state = state;
+ dev_dbg(&intf->dev, "suspend\n");
+ return 0;
+}
+
+static int hid_resume(struct usb_interface *intf)
+{
+ struct hid_device *hid = usb_get_intfdata (intf);
+ int status;
+
+ intf->dev.power.power_state = PM_SUSPEND_ON;
+ if (hid->open)
+ status = usb_submit_urb(hid->urbin, GFP_NOIO);
+ else
+ status = 0;
+ dev_dbg(&intf->dev, "resume status %d\n", status);
+ return status;
+}
+
+static struct usb_device_id hid_usb_ids [] = {
+ { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,
+ .bInterfaceClass = USB_INTERFACE_CLASS_HID },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, hid_usb_ids);
+
+static struct usb_driver hid_driver = {
+ .owner = THIS_MODULE,
+ .name = "usbhid",
+ .probe = hid_probe,
+ .disconnect = hid_disconnect,
+ .suspend = hid_suspend,
+ .resume = hid_resume,
+ .id_table = hid_usb_ids,
+};
+
+static int __init hid_init(void)
+{
+ int retval;
+ retval = hiddev_init();
+ if (retval)
+ goto hiddev_init_fail;
+ retval = usb_register(&hid_driver);
+ if (retval)
+ goto usb_register_fail;
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+
+ return 0;
+usb_register_fail:
+ hiddev_exit();
+hiddev_init_fail:
+ return retval;
+}
+
+static void __exit hid_exit(void)
+{
+ usb_deregister(&hid_driver);
+ hiddev_exit();
+}
+
+module_init(hid_init);
+module_exit(hid_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE(DRIVER_LICENSE);
diff --git a/drivers/usb/input/hid-debug.h b/drivers/usb/input/hid-debug.h
new file mode 100644
index 000000000000..2b91705740a7
--- /dev/null
+++ b/drivers/usb/input/hid-debug.h
@@ -0,0 +1,720 @@
+/*
+ * $Id: hid-debug.h,v 1.8 2001/09/25 09:37:57 vojtech Exp $
+ *
+ * (c) 1999 Andreas Gal <gal@cs.uni-magdeburg.de>
+ * (c) 2000-2001 Vojtech Pavlik <vojtech@ucw.cz>
+ *
+ * Some debug stuff for the HID parser.
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so either by
+ * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
+ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ */
+
+#include <linux/input.h>
+
+struct hid_usage_entry {
+ unsigned page;
+ unsigned usage;
+ char *description;
+};
+
+static const struct hid_usage_entry hid_usage_table[] = {
+ { 0, 0, "Undefined" },
+ { 1, 0, "GenericDesktop" },
+ {0, 0x01, "Pointer"},
+ {0, 0x02, "Mouse"},
+ {0, 0x04, "Joystick"},
+ {0, 0x05, "GamePad"},
+ {0, 0x06, "Keyboard"},
+ {0, 0x07, "Keypad"},
+ {0, 0x08, "MultiAxis"},
+ {0, 0x30, "X"},
+ {0, 0x31, "Y"},
+ {0, 0x32, "Z"},
+ {0, 0x33, "Rx"},
+ {0, 0x34, "Ry"},
+ {0, 0x35, "Rz"},
+ {0, 0x36, "Slider"},
+ {0, 0x37, "Dial"},
+ {0, 0x38, "Wheel"},
+ {0, 0x39, "HatSwitch"},
+ {0, 0x3a, "CountedBuffer"},
+ {0, 0x3b, "ByteCount"},
+ {0, 0x3c, "MotionWakeup"},
+ {0, 0x3d, "Start"},
+ {0, 0x3e, "Select"},
+ {0, 0x40, "Vx"},
+ {0, 0x41, "Vy"},
+ {0, 0x42, "Vz"},
+ {0, 0x43, "Vbrx"},
+ {0, 0x44, "Vbry"},
+ {0, 0x45, "Vbrz"},
+ {0, 0x46, "Vno"},
+ {0, 0x80, "SystemControl"},
+ {0, 0x81, "SystemPowerDown"},
+ {0, 0x82, "SystemSleep"},
+ {0, 0x83, "SystemWakeUp"},
+ {0, 0x84, "SystemContextMenu"},
+ {0, 0x85, "SystemMainMenu"},
+ {0, 0x86, "SystemAppMenu"},
+ {0, 0x87, "SystemMenuHelp"},
+ {0, 0x88, "SystemMenuExit"},
+ {0, 0x89, "SystemMenuSelect"},
+ {0, 0x8a, "SystemMenuRight"},
+ {0, 0x8b, "SystemMenuLeft"},
+ {0, 0x8c, "SystemMenuUp"},
+ {0, 0x8d, "SystemMenuDown"},
+ {0, 0x90, "D-PadUp"},
+ {0, 0x91, "D-PadDown"},
+ {0, 0x92, "D-PadRight"},
+ {0, 0x93, "D-PadLeft"},
+ { 7, 0, "Keyboard" },
+ { 8, 0, "LED" },
+ {0, 0x01, "NumLock"},
+ {0, 0x02, "CapsLock"},
+ {0, 0x03, "ScrollLock"},
+ {0, 0x04, "Compose"},
+ {0, 0x05, "Kana"},
+ { 9, 0, "Button" },
+ { 10, 0, "Ordinal" },
+ { 12, 0, "Consumer" },
+ {0, 0x238, "HorizontalWheel"},
+ { 13, 0, "Digitizers" },
+ {0, 0x01, "Digitizer"},
+ {0, 0x02, "Pen"},
+ {0, 0x03, "LightPen"},
+ {0, 0x04, "TouchScreen"},
+ {0, 0x05, "TouchPad"},
+ {0, 0x20, "Stylus"},
+ {0, 0x21, "Puck"},
+ {0, 0x22, "Finger"},
+ {0, 0x30, "TipPressure"},
+ {0, 0x31, "BarrelPressure"},
+ {0, 0x32, "InRange"},
+ {0, 0x33, "Touch"},
+ {0, 0x34, "UnTouch"},
+ {0, 0x35, "Tap"},
+ {0, 0x39, "TabletFunctionKey"},
+ {0, 0x3a, "ProgramChangeKey"},
+ {0, 0x3c, "Invert"},
+ {0, 0x42, "TipSwitch"},
+ {0, 0x43, "SecondaryTipSwitch"},
+ {0, 0x44, "BarrelSwitch"},
+ {0, 0x45, "Eraser"},
+ {0, 0x46, "TabletPick"},
+ { 15, 0, "PhysicalInterfaceDevice" },
+ {0, 0x00, "Undefined"},
+ {0, 0x01, "Physical_Interface_Device"},
+ {0, 0x20, "Normal"},
+ {0, 0x21, "Set_Effect_Report"},
+ {0, 0x22, "Effect_Block_Index"},
+ {0, 0x23, "Parameter_Block_Offset"},
+ {0, 0x24, "ROM_Flag"},
+ {0, 0x25, "Effect_Type"},
+ {0, 0x26, "ET_Constant_Force"},
+ {0, 0x27, "ET_Ramp"},
+ {0, 0x28, "ET_Custom_Force_Data"},
+ {0, 0x30, "ET_Square"},
+ {0, 0x31, "ET_Sine"},
+ {0, 0x32, "ET_Triangle"},
+ {0, 0x33, "ET_Sawtooth_Up"},
+ {0, 0x34, "ET_Sawtooth_Down"},
+ {0, 0x40, "ET_Spring"},
+ {0, 0x41, "ET_Damper"},
+ {0, 0x42, "ET_Inertia"},
+ {0, 0x43, "ET_Friction"},
+ {0, 0x50, "Duration"},
+ {0, 0x51, "Sample_Period"},
+ {0, 0x52, "Gain"},
+ {0, 0x53, "Trigger_Button"},
+ {0, 0x54, "Trigger_Repeat_Interval"},
+ {0, 0x55, "Axes_Enable"},
+ {0, 0x56, "Direction_Enable"},
+ {0, 0x57, "Direction"},
+ {0, 0x58, "Type_Specific_Block_Offset"},
+ {0, 0x59, "Block_Type"},
+ {0, 0x5A, "Set_Envelope_Report"},
+ {0, 0x5B, "Attack_Level"},
+ {0, 0x5C, "Attack_Time"},
+ {0, 0x5D, "Fade_Level"},
+ {0, 0x5E, "Fade_Time"},
+ {0, 0x5F, "Set_Condition_Report"},
+ {0, 0x60, "CP_Offset"},
+ {0, 0x61, "Positive_Coefficient"},
+ {0, 0x62, "Negative_Coefficient"},
+ {0, 0x63, "Positive_Saturation"},
+ {0, 0x64, "Negative_Saturation"},
+ {0, 0x65, "Dead_Band"},
+ {0, 0x66, "Download_Force_Sample"},
+ {0, 0x67, "Isoch_Custom_Force_Enable"},
+ {0, 0x68, "Custom_Force_Data_Report"},
+ {0, 0x69, "Custom_Force_Data"},
+ {0, 0x6A, "Custom_Force_Vendor_Defined_Data"},
+ {0, 0x6B, "Set_Custom_Force_Report"},
+ {0, 0x6C, "Custom_Force_Data_Offset"},
+ {0, 0x6D, "Sample_Count"},
+ {0, 0x6E, "Set_Periodic_Report"},
+ {0, 0x6F, "Offset"},
+ {0, 0x70, "Magnitude"},
+ {0, 0x71, "Phase"},
+ {0, 0x72, "Period"},
+ {0, 0x73, "Set_Constant_Force_Report"},
+ {0, 0x74, "Set_Ramp_Force_Report"},
+ {0, 0x75, "Ramp_Start"},
+ {0, 0x76, "Ramp_End"},
+ {0, 0x77, "Effect_Operation_Report"},
+ {0, 0x78, "Effect_Operation"},
+ {0, 0x79, "Op_Effect_Start"},
+ {0, 0x7A, "Op_Effect_Start_Solo"},
+ {0, 0x7B, "Op_Effect_Stop"},
+ {0, 0x7C, "Loop_Count"},
+ {0, 0x7D, "Device_Gain_Report"},
+ {0, 0x7E, "Device_Gain"},
+ {0, 0x7F, "PID_Pool_Report"},
+ {0, 0x80, "RAM_Pool_Size"},
+ {0, 0x81, "ROM_Pool_Size"},
+ {0, 0x82, "ROM_Effect_Block_Count"},
+ {0, 0x83, "Simultaneous_Effects_Max"},
+ {0, 0x84, "Pool_Alignment"},
+ {0, 0x85, "PID_Pool_Move_Report"},
+ {0, 0x86, "Move_Source"},
+ {0, 0x87, "Move_Destination"},
+ {0, 0x88, "Move_Length"},
+ {0, 0x89, "PID_Block_Load_Report"},
+ {0, 0x8B, "Block_Load_Status"},
+ {0, 0x8C, "Block_Load_Success"},
+ {0, 0x8D, "Block_Load_Full"},
+ {0, 0x8E, "Block_Load_Error"},
+ {0, 0x8F, "Block_Handle"},
+ {0, 0x90, "PID_Block_Free_Report"},
+ {0, 0x91, "Type_Specific_Block_Handle"},
+ {0, 0x92, "PID_State_Report"},
+ {0, 0x94, "Effect_Playing"},
+ {0, 0x95, "PID_Device_Control_Report"},
+ {0, 0x96, "PID_Device_Control"},
+ {0, 0x97, "DC_Enable_Actuators"},
+ {0, 0x98, "DC_Disable_Actuators"},
+ {0, 0x99, "DC_Stop_All_Effects"},
+ {0, 0x9A, "DC_Device_Reset"},
+ {0, 0x9B, "DC_Device_Pause"},
+ {0, 0x9C, "DC_Device_Continue"},
+ {0, 0x9F, "Device_Paused"},
+ {0, 0xA0, "Actuators_Enabled"},
+ {0, 0xA4, "Safety_Switch"},
+ {0, 0xA5, "Actuator_Override_Switch"},
+ {0, 0xA6, "Actuator_Power"},
+ {0, 0xA7, "Start_Delay"},
+ {0, 0xA8, "Parameter_Block_Size"},
+ {0, 0xA9, "Device_Managed_Pool"},
+ {0, 0xAA, "Shared_Parameter_Blocks"},
+ {0, 0xAB, "Create_New_Effect_Report"},
+ {0, 0xAC, "RAM_Pool_Available"},
+ { 0x84, 0, "Power Device" },
+ { 0x84, 0x02, "PresentStatus" },
+ { 0x84, 0x03, "ChangeStatus" },
+ { 0x84, 0x04, "UPS" },
+ { 0x84, 0x05, "PowerSupply" },
+ { 0x84, 0x10, "BatterySystem" },
+ { 0x84, 0x11, "BatterySystemID" },
+ { 0x84, 0x12, "Battery" },
+ { 0x84, 0x13, "BatteryID" },
+ { 0x84, 0x14, "Charger" },
+ { 0x84, 0x15, "ChargerID" },
+ { 0x84, 0x16, "PowerConverter" },
+ { 0x84, 0x17, "PowerConverterID" },
+ { 0x84, 0x18, "OutletSystem" },
+ { 0x84, 0x19, "OutletSystemID" },
+ { 0x84, 0x1a, "Input" },
+ { 0x84, 0x1b, "InputID" },
+ { 0x84, 0x1c, "Output" },
+ { 0x84, 0x1d, "OutputID" },
+ { 0x84, 0x1e, "Flow" },
+ { 0x84, 0x1f, "FlowID" },
+ { 0x84, 0x20, "Outlet" },
+ { 0x84, 0x21, "OutletID" },
+ { 0x84, 0x22, "Gang" },
+ { 0x84, 0x24, "PowerSummary" },
+ { 0x84, 0x25, "PowerSummaryID" },
+ { 0x84, 0x30, "Voltage" },
+ { 0x84, 0x31, "Current" },
+ { 0x84, 0x32, "Frequency" },
+ { 0x84, 0x33, "ApparentPower" },
+ { 0x84, 0x35, "PercentLoad" },
+ { 0x84, 0x40, "ConfigVoltage" },
+ { 0x84, 0x41, "ConfigCurrent" },
+ { 0x84, 0x43, "ConfigApparentPower" },
+ { 0x84, 0x53, "LowVoltageTransfer" },
+ { 0x84, 0x54, "HighVoltageTransfer" },
+ { 0x84, 0x56, "DelayBeforeStartup" },
+ { 0x84, 0x57, "DelayBeforeShutdown" },
+ { 0x84, 0x58, "Test" },
+ { 0x84, 0x5a, "AudibleAlarmControl" },
+ { 0x84, 0x60, "Present" },
+ { 0x84, 0x61, "Good" },
+ { 0x84, 0x62, "InternalFailure" },
+ { 0x84, 0x65, "Overload" },
+ { 0x84, 0x66, "OverCharged" },
+ { 0x84, 0x67, "OverTemperature" },
+ { 0x84, 0x68, "ShutdownRequested" },
+ { 0x84, 0x69, "ShutdownImminent" },
+ { 0x84, 0x6b, "SwitchOn/Off" },
+ { 0x84, 0x6c, "Switchable" },
+ { 0x84, 0x6d, "Used" },
+ { 0x84, 0x6e, "Boost" },
+ { 0x84, 0x73, "CommunicationLost" },
+ { 0x84, 0xfd, "iManufacturer" },
+ { 0x84, 0xfe, "iProduct" },
+ { 0x84, 0xff, "iSerialNumber" },
+ { 0x85, 0, "Battery System" },
+ { 0x85, 0x01, "SMBBatteryMode" },
+ { 0x85, 0x02, "SMBBatteryStatus" },
+ { 0x85, 0x03, "SMBAlarmWarning" },
+ { 0x85, 0x04, "SMBChargerMode" },
+ { 0x85, 0x05, "SMBChargerStatus" },
+ { 0x85, 0x06, "SMBChargerSpecInfo" },
+ { 0x85, 0x07, "SMBSelectorState" },
+ { 0x85, 0x08, "SMBSelectorPresets" },
+ { 0x85, 0x09, "SMBSelectorInfo" },
+ { 0x85, 0x29, "RemainingCapacityLimit" },
+ { 0x85, 0x2c, "CapacityMode" },
+ { 0x85, 0x42, "BelowRemainingCapacityLimit" },
+ { 0x85, 0x44, "Charging" },
+ { 0x85, 0x45, "Discharging" },
+ { 0x85, 0x4b, "NeedReplacement" },
+ { 0x85, 0x66, "RemainingCapacity" },
+ { 0x85, 0x68, "RunTimeToEmpty" },
+ { 0x85, 0x6a, "AverageTimeToFull" },
+ { 0x85, 0x83, "DesignCapacity" },
+ { 0x85, 0x85, "ManufacturerDate" },
+ { 0x85, 0x89, "iDeviceChemistry" },
+ { 0x85, 0x8b, "Rechargable" },
+ { 0x85, 0x8f, "iOEMInformation" },
+ { 0x85, 0x8d, "CapacityGranularity1" },
+ { 0x85, 0xd0, "ACPresent" },
+ /* pages 0xff00 to 0xffff are vendor-specific */
+ { 0xffff, 0, "Vendor-specific-FF" },
+ { 0, 0, NULL }
+};
+
+static void resolv_usage_page(unsigned page) {
+ const struct hid_usage_entry *p;
+
+ for (p = hid_usage_table; p->description; p++)
+ if (p->page == page) {
+ printk("%s", p->description);
+ return;
+ }
+ printk("%04x", page);
+}
+
+static void resolv_usage(unsigned usage) {
+ const struct hid_usage_entry *p;
+
+ resolv_usage_page(usage >> 16);
+ printk(".");
+ for (p = hid_usage_table; p->description; p++)
+ if (p->page == (usage >> 16)) {
+ for(++p; p->description && p->usage != 0; p++)
+ if (p->usage == (usage & 0xffff)) {
+ printk("%s", p->description);
+ return;
+ }
+ break;
+ }
+ printk("%04x", usage & 0xffff);
+}
+
+__inline__ static void tab(int n) {
+ while (n--) printk(" ");
+}
+
+static void hid_dump_field(struct hid_field *field, int n) {
+ int j;
+
+ if (field->physical) {
+ tab(n);
+ printk("Physical(");
+ resolv_usage(field->physical); printk(")\n");
+ }
+ if (field->logical) {
+ tab(n);
+ printk("Logical(");
+ resolv_usage(field->logical); printk(")\n");
+ }
+ tab(n); printk("Usage(%d)\n", field->maxusage);
+ for (j = 0; j < field->maxusage; j++) {
+ tab(n+2);resolv_usage(field->usage[j].hid); printk("\n");
+ }
+ if (field->logical_minimum != field->logical_maximum) {
+ tab(n); printk("Logical Minimum(%d)\n", field->logical_minimum);
+ tab(n); printk("Logical Maximum(%d)\n", field->logical_maximum);
+ }
+ if (field->physical_minimum != field->physical_maximum) {
+ tab(n); printk("Physical Minimum(%d)\n", field->physical_minimum);
+ tab(n); printk("Physical Maximum(%d)\n", field->physical_maximum);
+ }
+ if (field->unit_exponent) {
+ tab(n); printk("Unit Exponent(%d)\n", field->unit_exponent);
+ }
+ if (field->unit) {
+ char *systems[5] = { "None", "SI Linear", "SI Rotation", "English Linear", "English Rotation" };
+ char *units[5][8] = {
+ { "None", "None", "None", "None", "None", "None", "None", "None" },
+ { "None", "Centimeter", "Gram", "Seconds", "Kelvin", "Ampere", "Candela", "None" },
+ { "None", "Radians", "Gram", "Seconds", "Kelvin", "Ampere", "Candela", "None" },
+ { "None", "Inch", "Slug", "Seconds", "Fahrenheit", "Ampere", "Candela", "None" },
+ { "None", "Degrees", "Slug", "Seconds", "Fahrenheit", "Ampere", "Candela", "None" }
+ };
+
+ int i;
+ int sys;
+ __u32 data = field->unit;
+
+ /* First nibble tells us which system we're in. */
+ sys = data & 0xf;
+ data >>= 4;
+
+ if(sys > 4) {
+ tab(n); printk("Unit(Invalid)\n");
+ }
+ else {
+ int earlier_unit = 0;
+
+ tab(n); printk("Unit(%s : ", systems[sys]);
+
+ for (i=1 ; i<sizeof(__u32)*2 ; i++) {
+ char nibble = data & 0xf;
+ data >>= 4;
+ if (nibble != 0) {
+ if(earlier_unit++ > 0)
+ printk("*");
+ printk("%s", units[sys][i]);
+ if(nibble != 1) {
+ /* This is a _signed_ nibble(!) */
+
+ int val = nibble & 0x7;
+ if(nibble & 0x08)
+ val = -((0x7 & ~val) +1);
+ printk("^%d", val);
+ }
+ }
+ }
+ printk(")\n");
+ }
+ }
+ tab(n); printk("Report Size(%u)\n", field->report_size);
+ tab(n); printk("Report Count(%u)\n", field->report_count);
+ tab(n); printk("Report Offset(%u)\n", field->report_offset);
+
+ tab(n); printk("Flags( ");
+ j = field->flags;
+ printk("%s", HID_MAIN_ITEM_CONSTANT & j ? "Constant " : "");
+ printk("%s", HID_MAIN_ITEM_VARIABLE & j ? "Variable " : "Array ");
+ printk("%s", HID_MAIN_ITEM_RELATIVE & j ? "Relative " : "Absolute ");
+ printk("%s", HID_MAIN_ITEM_WRAP & j ? "Wrap " : "");
+ printk("%s", HID_MAIN_ITEM_NONLINEAR & j ? "NonLinear " : "");
+ printk("%s", HID_MAIN_ITEM_NO_PREFERRED & j ? "NoPrefferedState " : "");
+ printk("%s", HID_MAIN_ITEM_NULL_STATE & j ? "NullState " : "");
+ printk("%s", HID_MAIN_ITEM_VOLATILE & j ? "Volatile " : "");
+ printk("%s", HID_MAIN_ITEM_BUFFERED_BYTE & j ? "BufferedByte " : "");
+ printk(")\n");
+}
+
+static void __attribute__((unused)) hid_dump_device(struct hid_device *device) {
+ struct hid_report_enum *report_enum;
+ struct hid_report *report;
+ struct list_head *list;
+ unsigned i,k;
+ static char *table[] = {"INPUT", "OUTPUT", "FEATURE"};
+
+ for (i = 0; i < HID_REPORT_TYPES; i++) {
+ report_enum = device->report_enum + i;
+ list = report_enum->report_list.next;
+ while (list != &report_enum->report_list) {
+ report = (struct hid_report *) list;
+ tab(2);
+ printk("%s", table[i]);
+ if (report->id)
+ printk("(%d)", report->id);
+ printk("[%s]", table[report->type]);
+ printk("\n");
+ for (k = 0; k < report->maxfield; k++) {
+ tab(4);
+ printk("Field(%d)\n", k);
+ hid_dump_field(report->field[k], 6);
+ }
+ list = list->next;
+ }
+ }
+}
+
+static void __attribute__((unused)) hid_dump_input(struct hid_usage *usage, __s32 value) {
+ printk("hid-debug: input ");
+ resolv_usage(usage->hid);
+ printk(" = %d\n", value);
+}
+
+
+static char *events[EV_MAX + 1] = {
+ [EV_SYN] = "Sync", [EV_KEY] = "Key",
+ [EV_REL] = "Relative", [EV_ABS] = "Absolute",
+ [EV_MSC] = "Misc", [EV_LED] = "LED",
+ [EV_SND] = "Sound", [EV_REP] = "Repeat",
+ [EV_FF] = "ForceFeedback", [EV_PWR] = "Power",
+ [EV_FF_STATUS] = "ForceFeedbackStatus",
+};
+
+static char *syncs[2] = {
+ [SYN_REPORT] = "Report", [SYN_CONFIG] = "Config",
+};
+static char *keys[KEY_MAX + 1] = {
+ [KEY_RESERVED] = "Reserved", [KEY_ESC] = "Esc",
+ [KEY_1] = "1", [KEY_2] = "2",
+ [KEY_3] = "3", [KEY_4] = "4",
+ [KEY_5] = "5", [KEY_6] = "6",
+ [KEY_7] = "7", [KEY_8] = "8",
+ [KEY_9] = "9", [KEY_0] = "0",
+ [KEY_MINUS] = "Minus", [KEY_EQUAL] = "Equal",
+ [KEY_BACKSPACE] = "Backspace", [KEY_TAB] = "Tab",
+ [KEY_Q] = "Q", [KEY_W] = "W",
+ [KEY_E] = "E", [KEY_R] = "R",
+ [KEY_T] = "T", [KEY_Y] = "Y",
+ [KEY_U] = "U", [KEY_I] = "I",
+ [KEY_O] = "O", [KEY_P] = "P",
+ [KEY_LEFTBRACE] = "LeftBrace", [KEY_RIGHTBRACE] = "RightBrace",
+ [KEY_ENTER] = "Enter", [KEY_LEFTCTRL] = "LeftControl",
+ [KEY_A] = "A", [KEY_S] = "S",
+ [KEY_D] = "D", [KEY_F] = "F",
+ [KEY_G] = "G", [KEY_H] = "H",
+ [KEY_J] = "J", [KEY_K] = "K",
+ [KEY_L] = "L", [KEY_SEMICOLON] = "Semicolon",
+ [KEY_APOSTROPHE] = "Apostrophe", [KEY_GRAVE] = "Grave",
+ [KEY_LEFTSHIFT] = "LeftShift", [KEY_BACKSLASH] = "BackSlash",
+ [KEY_Z] = "Z", [KEY_X] = "X",
+ [KEY_C] = "C", [KEY_V] = "V",
+ [KEY_B] = "B", [KEY_N] = "N",
+ [KEY_M] = "M", [KEY_COMMA] = "Comma",
+ [KEY_DOT] = "Dot", [KEY_SLASH] = "Slash",
+ [KEY_RIGHTSHIFT] = "RightShift", [KEY_KPASTERISK] = "KPAsterisk",
+ [KEY_LEFTALT] = "LeftAlt", [KEY_SPACE] = "Space",
+ [KEY_CAPSLOCK] = "CapsLock", [KEY_F1] = "F1",
+ [KEY_F2] = "F2", [KEY_F3] = "F3",
+ [KEY_F4] = "F4", [KEY_F5] = "F5",
+ [KEY_F6] = "F6", [KEY_F7] = "F7",
+ [KEY_F8] = "F8", [KEY_F9] = "F9",
+ [KEY_F10] = "F10", [KEY_NUMLOCK] = "NumLock",
+ [KEY_SCROLLLOCK] = "ScrollLock", [KEY_KP7] = "KP7",
+ [KEY_KP8] = "KP8", [KEY_KP9] = "KP9",
+ [KEY_KPMINUS] = "KPMinus", [KEY_KP4] = "KP4",
+ [KEY_KP5] = "KP5", [KEY_KP6] = "KP6",
+ [KEY_KPPLUS] = "KPPlus", [KEY_KP1] = "KP1",
+ [KEY_KP2] = "KP2", [KEY_KP3] = "KP3",
+ [KEY_KP0] = "KP0", [KEY_KPDOT] = "KPDot",
+ [KEY_ZENKAKUHANKAKU] = "Zenkaku/Hankaku", [KEY_102ND] = "102nd",
+ [KEY_F11] = "F11", [KEY_F12] = "F12",
+ [KEY_RO] = "RO", [KEY_KATAKANA] = "Katakana",
+ [KEY_HIRAGANA] = "HIRAGANA", [KEY_HENKAN] = "Henkan",
+ [KEY_KATAKANAHIRAGANA] = "Katakana/Hiragana", [KEY_MUHENKAN] = "Muhenkan",
+ [KEY_KPJPCOMMA] = "KPJpComma", [KEY_KPENTER] = "KPEnter",
+ [KEY_RIGHTCTRL] = "RightCtrl", [KEY_KPSLASH] = "KPSlash",
+ [KEY_SYSRQ] = "SysRq", [KEY_RIGHTALT] = "RightAlt",
+ [KEY_LINEFEED] = "LineFeed", [KEY_HOME] = "Home",
+ [KEY_UP] = "Up", [KEY_PAGEUP] = "PageUp",
+ [KEY_LEFT] = "Left", [KEY_RIGHT] = "Right",
+ [KEY_END] = "End", [KEY_DOWN] = "Down",
+ [KEY_PAGEDOWN] = "PageDown", [KEY_INSERT] = "Insert",
+ [KEY_DELETE] = "Delete", [KEY_MACRO] = "Macro",
+ [KEY_MUTE] = "Mute", [KEY_VOLUMEDOWN] = "VolumeDown",
+ [KEY_VOLUMEUP] = "VolumeUp", [KEY_POWER] = "Power",
+ [KEY_KPEQUAL] = "KPEqual", [KEY_KPPLUSMINUS] = "KPPlusMinus",
+ [KEY_PAUSE] = "Pause", [KEY_KPCOMMA] = "KPComma",
+ [KEY_HANGUEL] = "Hanguel", [KEY_HANJA] = "Hanja",
+ [KEY_YEN] = "Yen", [KEY_LEFTMETA] = "LeftMeta",
+ [KEY_RIGHTMETA] = "RightMeta", [KEY_COMPOSE] = "Compose",
+ [KEY_STOP] = "Stop", [KEY_AGAIN] = "Again",
+ [KEY_PROPS] = "Props", [KEY_UNDO] = "Undo",
+ [KEY_FRONT] = "Front", [KEY_COPY] = "Copy",
+ [KEY_OPEN] = "Open", [KEY_PASTE] = "Paste",
+ [KEY_FIND] = "Find", [KEY_CUT] = "Cut",
+ [KEY_HELP] = "Help", [KEY_MENU] = "Menu",
+ [KEY_CALC] = "Calc", [KEY_SETUP] = "Setup",
+ [KEY_SLEEP] = "Sleep", [KEY_WAKEUP] = "WakeUp",
+ [KEY_FILE] = "File", [KEY_SENDFILE] = "SendFile",
+ [KEY_DELETEFILE] = "DeleteFile", [KEY_XFER] = "X-fer",
+ [KEY_PROG1] = "Prog1", [KEY_PROG2] = "Prog2",
+ [KEY_WWW] = "WWW", [KEY_MSDOS] = "MSDOS",
+ [KEY_COFFEE] = "Coffee", [KEY_DIRECTION] = "Direction",
+ [KEY_CYCLEWINDOWS] = "CycleWindows", [KEY_MAIL] = "Mail",
+ [KEY_BOOKMARKS] = "Bookmarks", [KEY_COMPUTER] = "Computer",
+ [KEY_BACK] = "Back", [KEY_FORWARD] = "Forward",
+ [KEY_CLOSECD] = "CloseCD", [KEY_EJECTCD] = "EjectCD",
+ [KEY_EJECTCLOSECD] = "EjectCloseCD", [KEY_NEXTSONG] = "NextSong",
+ [KEY_PLAYPAUSE] = "PlayPause", [KEY_PREVIOUSSONG] = "PreviousSong",
+ [KEY_STOPCD] = "StopCD", [KEY_RECORD] = "Record",
+ [KEY_REWIND] = "Rewind", [KEY_PHONE] = "Phone",
+ [KEY_ISO] = "ISOKey", [KEY_CONFIG] = "Config",
+ [KEY_HOMEPAGE] = "HomePage", [KEY_REFRESH] = "Refresh",
+ [KEY_EXIT] = "Exit", [KEY_MOVE] = "Move",
+ [KEY_EDIT] = "Edit", [KEY_SCROLLUP] = "ScrollUp",
+ [KEY_SCROLLDOWN] = "ScrollDown", [KEY_KPLEFTPAREN] = "KPLeftParenthesis",
+ [KEY_KPRIGHTPAREN] = "KPRightParenthesis", [KEY_F13] = "F13",
+ [KEY_F14] = "F14", [KEY_F15] = "F15",
+ [KEY_F16] = "F16", [KEY_F17] = "F17",
+ [KEY_F18] = "F18", [KEY_F19] = "F19",
+ [KEY_F20] = "F20", [KEY_F21] = "F21",
+ [KEY_F22] = "F22", [KEY_F23] = "F23",
+ [KEY_F24] = "F24", [KEY_PLAYCD] = "PlayCD",
+ [KEY_PAUSECD] = "PauseCD", [KEY_PROG3] = "Prog3",
+ [KEY_PROG4] = "Prog4", [KEY_SUSPEND] = "Suspend",
+ [KEY_CLOSE] = "Close", [KEY_PLAY] = "Play",
+ [KEY_FASTFORWARD] = "Fast Forward", [KEY_BASSBOOST] = "Bass Boost",
+ [KEY_PRINT] = "Print", [KEY_HP] = "HP",
+ [KEY_CAMERA] = "Camera", [KEY_SOUND] = "Sound",
+ [KEY_QUESTION] = "Question", [KEY_EMAIL] = "Email",
+ [KEY_CHAT] = "Chat", [KEY_SEARCH] = "Search",
+ [KEY_CONNECT] = "Connect", [KEY_FINANCE] = "Finance",
+ [KEY_SPORT] = "Sport", [KEY_SHOP] = "Shop",
+ [KEY_ALTERASE] = "Alternate Erase", [KEY_CANCEL] = "Cancel",
+ [KEY_BRIGHTNESSDOWN] = "Brightness down", [KEY_BRIGHTNESSUP] = "Brightness up",
+ [KEY_MEDIA] = "Media", [KEY_UNKNOWN] = "Unknown",
+ [BTN_0] = "Btn0", [BTN_1] = "Btn1",
+ [BTN_2] = "Btn2", [BTN_3] = "Btn3",
+ [BTN_4] = "Btn4", [BTN_5] = "Btn5",
+ [BTN_6] = "Btn6", [BTN_7] = "Btn7",
+ [BTN_8] = "Btn8", [BTN_9] = "Btn9",
+ [BTN_LEFT] = "LeftBtn", [BTN_RIGHT] = "RightBtn",
+ [BTN_MIDDLE] = "MiddleBtn", [BTN_SIDE] = "SideBtn",
+ [BTN_EXTRA] = "ExtraBtn", [BTN_FORWARD] = "ForwardBtn",
+ [BTN_BACK] = "BackBtn", [BTN_TASK] = "TaskBtn",
+ [BTN_TRIGGER] = "Trigger", [BTN_THUMB] = "ThumbBtn",
+ [BTN_THUMB2] = "ThumbBtn2", [BTN_TOP] = "TopBtn",
+ [BTN_TOP2] = "TopBtn2", [BTN_PINKIE] = "PinkieBtn",
+ [BTN_BASE] = "BaseBtn", [BTN_BASE2] = "BaseBtn2",
+ [BTN_BASE3] = "BaseBtn3", [BTN_BASE4] = "BaseBtn4",
+ [BTN_BASE5] = "BaseBtn5", [BTN_BASE6] = "BaseBtn6",
+ [BTN_DEAD] = "BtnDead", [BTN_A] = "BtnA",
+ [BTN_B] = "BtnB", [BTN_C] = "BtnC",
+ [BTN_X] = "BtnX", [BTN_Y] = "BtnY",
+ [BTN_Z] = "BtnZ", [BTN_TL] = "BtnTL",
+ [BTN_TR] = "BtnTR", [BTN_TL2] = "BtnTL2",
+ [BTN_TR2] = "BtnTR2", [BTN_SELECT] = "BtnSelect",
+ [BTN_START] = "BtnStart", [BTN_MODE] = "BtnMode",
+ [BTN_THUMBL] = "BtnThumbL", [BTN_THUMBR] = "BtnThumbR",
+ [BTN_TOOL_PEN] = "ToolPen", [BTN_TOOL_RUBBER] = "ToolRubber",
+ [BTN_TOOL_BRUSH] = "ToolBrush", [BTN_TOOL_PENCIL] = "ToolPencil",
+ [BTN_TOOL_AIRBRUSH] = "ToolAirbrush", [BTN_TOOL_FINGER] = "ToolFinger",
+ [BTN_TOOL_MOUSE] = "ToolMouse", [BTN_TOOL_LENS] = "ToolLens",
+ [BTN_TOUCH] = "Touch", [BTN_STYLUS] = "Stylus",
+ [BTN_STYLUS2] = "Stylus2", [BTN_TOOL_DOUBLETAP] = "Tool Doubletap",
+ [BTN_TOOL_TRIPLETAP] = "Tool Tripletap", [BTN_GEAR_DOWN] = "WheelBtn",
+ [BTN_GEAR_UP] = "Gear up", [KEY_OK] = "Ok",
+ [KEY_SELECT] = "Select", [KEY_GOTO] = "Goto",
+ [KEY_CLEAR] = "Clear", [KEY_POWER2] = "Power2",
+ [KEY_OPTION] = "Option", [KEY_INFO] = "Info",
+ [KEY_TIME] = "Time", [KEY_VENDOR] = "Vendor",
+ [KEY_ARCHIVE] = "Archive", [KEY_PROGRAM] = "Program",
+ [KEY_CHANNEL] = "Channel", [KEY_FAVORITES] = "Favorites",
+ [KEY_EPG] = "EPG", [KEY_PVR] = "PVR",
+ [KEY_MHP] = "MHP", [KEY_LANGUAGE] = "Language",
+ [KEY_TITLE] = "Title", [KEY_SUBTITLE] = "Subtitle",
+ [KEY_ANGLE] = "Angle", [KEY_ZOOM] = "Zoom",
+ [KEY_MODE] = "Mode", [KEY_KEYBOARD] = "Keyboard",
+ [KEY_SCREEN] = "Screen", [KEY_PC] = "PC",
+ [KEY_TV] = "TV", [KEY_TV2] = "TV2",
+ [KEY_VCR] = "VCR", [KEY_VCR2] = "VCR2",
+ [KEY_SAT] = "Sat", [KEY_SAT2] = "Sat2",
+ [KEY_CD] = "CD", [KEY_TAPE] = "Tape",
+ [KEY_RADIO] = "Radio", [KEY_TUNER] = "Tuner",
+ [KEY_PLAYER] = "Player", [KEY_TEXT] = "Text",
+ [KEY_DVD] = "DVD", [KEY_AUX] = "Aux",
+ [KEY_MP3] = "MP3", [KEY_AUDIO] = "Audio",
+ [KEY_VIDEO] = "Video", [KEY_DIRECTORY] = "Directory",
+ [KEY_LIST] = "List", [KEY_MEMO] = "Memo",
+ [KEY_CALENDAR] = "Calendar", [KEY_RED] = "Red",
+ [KEY_GREEN] = "Green", [KEY_YELLOW] = "Yellow",
+ [KEY_BLUE] = "Blue", [KEY_CHANNELUP] = "ChannelUp",
+ [KEY_CHANNELDOWN] = "ChannelDown", [KEY_FIRST] = "First",
+ [KEY_LAST] = "Last", [KEY_AB] = "AB",
+ [KEY_NEXT] = "Next", [KEY_RESTART] = "Restart",
+ [KEY_SLOW] = "Slow", [KEY_SHUFFLE] = "Shuffle",
+ [KEY_BREAK] = "Break", [KEY_PREVIOUS] = "Previous",
+ [KEY_DIGITS] = "Digits", [KEY_TEEN] = "TEEN",
+ [KEY_TWEN] = "TWEN", [KEY_DEL_EOL] = "DeleteEOL",
+ [KEY_DEL_EOS] = "DeleteEOS", [KEY_INS_LINE] = "InsertLine",
+ [KEY_DEL_LINE] = "DeleteLine",
+};
+
+static char *relatives[REL_MAX + 1] = {
+ [REL_X] = "X", [REL_Y] = "Y",
+ [REL_Z] = "Z", [REL_HWHEEL] = "HWheel",
+ [REL_DIAL] = "Dial", [REL_WHEEL] = "Wheel",
+ [REL_MISC] = "Misc",
+};
+
+static char *absolutes[ABS_MAX + 1] = {
+ [ABS_X] = "X", [ABS_Y] = "Y",
+ [ABS_Z] = "Z", [ABS_RX] = "Rx",
+ [ABS_RY] = "Ry", [ABS_RZ] = "Rz",
+ [ABS_THROTTLE] = "Throttle", [ABS_RUDDER] = "Rudder",
+ [ABS_WHEEL] = "Wheel", [ABS_GAS] = "Gas",
+ [ABS_BRAKE] = "Brake", [ABS_HAT0X] = "Hat0X",
+ [ABS_HAT0Y] = "Hat0Y", [ABS_HAT1X] = "Hat1X",
+ [ABS_HAT1Y] = "Hat1Y", [ABS_HAT2X] = "Hat2X",
+ [ABS_HAT2Y] = "Hat2Y", [ABS_HAT3X] = "Hat3X",
+ [ABS_HAT3Y] = "Hat 3Y", [ABS_PRESSURE] = "Pressure",
+ [ABS_DISTANCE] = "Distance", [ABS_TILT_X] = "XTilt",
+ [ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "Tool Width",
+ [ABS_VOLUME] = "Volume", [ABS_MISC] = "Misc",
+};
+
+static char *misc[MSC_MAX + 1] = {
+ [MSC_SERIAL] = "Serial", [MSC_PULSELED] = "Pulseled",
+ [MSC_GESTURE] = "Gesture", [MSC_RAW] = "RawData"
+};
+
+static char *leds[LED_MAX + 1] = {
+ [LED_NUML] = "NumLock", [LED_CAPSL] = "CapsLock",
+ [LED_SCROLLL] = "ScrollLock", [LED_COMPOSE] = "Compose",
+ [LED_KANA] = "Kana", [LED_SLEEP] = "Sleep",
+ [LED_SUSPEND] = "Suspend", [LED_MUTE] = "Mute",
+ [LED_MISC] = "Misc",
+};
+
+static char *repeats[REP_MAX + 1] = {
+ [REP_DELAY] = "Delay", [REP_PERIOD] = "Period"
+};
+
+static char *sounds[SND_MAX + 1] = {
+ [SND_CLICK] = "Click", [SND_BELL] = "Bell",
+ [SND_TONE] = "Tone"
+};
+
+static char **names[EV_MAX + 1] = {
+ [EV_SYN] = syncs, [EV_KEY] = keys,
+ [EV_REL] = relatives, [EV_ABS] = absolutes,
+ [EV_MSC] = misc, [EV_LED] = leds,
+ [EV_SND] = sounds, [EV_REP] = repeats,
+};
+
+static void __attribute__((unused)) resolv_event(__u8 type, __u16 code) {
+
+ printk("%s.%s", events[type] ? events[type] : "?",
+ names[type] ? (names[type][code] ? names[type][code] : "?") : "?");
+}
diff --git a/drivers/usb/input/hid-ff.c b/drivers/usb/input/hid-ff.c
new file mode 100644
index 000000000000..72e698658b53
--- /dev/null
+++ b/drivers/usb/input/hid-ff.c
@@ -0,0 +1,94 @@
+/*
+ * $Id: hid-ff.c,v 1.2 2002/04/18 22:02:47 jdeneux Exp $
+ *
+ * Force feedback support for hid devices.
+ * Not all hid devices use the same protocol. For example, some use PID,
+ * other use their own proprietary procotol.
+ *
+ * Copyright (c) 2002-2004 Johann Deneux
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so by
+ * e-mail - mail your message to <johann.deneux@it.uu.se>
+ */
+
+#include <linux/input.h>
+
+#undef DEBUG
+#include <linux/usb.h>
+
+#include "hid.h"
+
+/* Drivers' initializing functions */
+extern int hid_lgff_init(struct hid_device* hid);
+extern int hid_lg3d_init(struct hid_device* hid);
+extern int hid_pid_init(struct hid_device* hid);
+extern int hid_tmff_init(struct hid_device* hid);
+
+/*
+ * This table contains pointers to initializers. To add support for new
+ * devices, you need to add the USB vendor and product ids here.
+ */
+struct hid_ff_initializer {
+ u16 idVendor;
+ u16 idProduct;
+ int (*init)(struct hid_device*);
+};
+
+static struct hid_ff_initializer inits[] = {
+#ifdef CONFIG_LOGITECH_FF
+ {0x46d, 0xc211, hid_lgff_init}, // Logitech Cordless rumble pad
+ {0x46d, 0xc283, hid_lgff_init}, // Logitech Wingman Force 3d
+ {0x46d, 0xc295, hid_lgff_init}, // Logitech MOMO force wheel
+ {0x46d, 0xc219, hid_lgff_init}, // Logitech Cordless rumble pad 2
+#endif
+#ifdef CONFIG_HID_PID
+ {0x45e, 0x001b, hid_pid_init},
+#endif
+#ifdef CONFIG_THRUSTMASTER_FF
+ {0x44f, 0xb304, hid_tmff_init},
+#endif
+ {0, 0, NULL} /* Terminating entry */
+};
+
+static struct hid_ff_initializer *hid_get_ff_init(__u16 idVendor,
+ __u16 idProduct)
+{
+ struct hid_ff_initializer *init;
+ for (init = inits;
+ init->idVendor
+ && !(init->idVendor == idVendor
+ && init->idProduct == idProduct);
+ init++);
+
+ return init->idVendor? init : NULL;
+}
+
+int hid_ff_init(struct hid_device* hid)
+{
+ struct hid_ff_initializer *init;
+
+ init = hid_get_ff_init(le16_to_cpu(hid->dev->descriptor.idVendor),
+ le16_to_cpu(hid->dev->descriptor.idProduct));
+
+ if (!init) {
+ dbg("hid_ff_init could not find initializer");
+ return -ENOSYS;
+ }
+ return init->init(hid);
+}
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
new file mode 100644
index 000000000000..5553c3553e9d
--- /dev/null
+++ b/drivers/usb/input/hid-input.c
@@ -0,0 +1,630 @@
+/*
+ * $Id: hid-input.c,v 1.2 2002/04/23 00:59:25 rdamazio Exp $
+ *
+ * Copyright (c) 2000-2001 Vojtech Pavlik
+ *
+ * USB HID to Linux Input mapping
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so either by
+ * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
+ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ */
+
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/kernel.h>
+#include <linux/input.h>
+#include <linux/usb.h>
+
+#undef DEBUG
+
+#include "hid.h"
+
+#define unk KEY_UNKNOWN
+
+static unsigned char hid_keyboard[256] = {
+ 0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
+ 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 28, 1, 14, 15, 57, 12, 13, 26,
+ 27, 43, 43, 39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 87, 88, 99, 70,119,110,102,104,111,107,109,106,
+ 105,108,103, 69, 98, 55, 74, 78, 96, 79, 80, 81, 75, 76, 77, 71,
+ 72, 73, 82, 83, 86,127,116,117,183,184,185,186,187,188,189,190,
+ 191,192,193,194,134,138,130,132,128,129,131,137,133,135,136,113,
+ 115,114,unk,unk,unk,121,unk, 89, 93,124, 92, 94, 95,unk,unk,unk,
+ 122,123, 90, 91, 85,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
+ unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
+ unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
+ unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
+ unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
+ 29, 42, 56,125, 97, 54,100,126,164,166,165,163,161,115,114,113,
+ 150,158,159,128,136,177,178,176,142,152,173,140,unk,unk,unk,unk
+};
+
+static struct {
+ __s32 x;
+ __s32 y;
+} hid_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}};
+
+#define map_abs(c) do { usage->code = c; usage->type = EV_ABS; bit = input->absbit; max = ABS_MAX; } while (0)
+#define map_rel(c) do { usage->code = c; usage->type = EV_REL; bit = input->relbit; max = REL_MAX; } while (0)
+#define map_key(c) do { usage->code = c; usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX; } while (0)
+#define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0)
+#define map_ff(c) do { usage->code = c; usage->type = EV_FF; bit = input->ffbit; max = FF_MAX; } while (0)
+
+#define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0)
+#define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0)
+#define map_ff_effect(c) do { set_bit(c, input->ffbit); } while (0)
+
+static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field,
+ struct hid_usage *usage)
+{
+ struct input_dev *input = &hidinput->input;
+ struct hid_device *device = hidinput->input.private;
+ int max, code;
+ unsigned long *bit;
+
+ field->hidinput = hidinput;
+
+#ifdef DEBUG
+ printk(KERN_DEBUG "Mapping: ");
+ resolv_usage(usage->hid);
+ printk(" ---> ");
+#endif
+
+ if (field->flags & HID_MAIN_ITEM_CONSTANT)
+ goto ignore;
+
+ switch (usage->hid & HID_USAGE_PAGE) {
+
+ case HID_UP_UNDEFINED:
+ goto ignore;
+
+ case HID_UP_KEYBOARD:
+
+ set_bit(EV_REP, input->evbit);
+
+ if ((usage->hid & HID_USAGE) < 256) {
+ if (!hid_keyboard[usage->hid & HID_USAGE]) goto ignore;
+ map_key_clear(hid_keyboard[usage->hid & HID_USAGE]);
+ } else
+ map_key(KEY_UNKNOWN);
+
+ break;
+
+ case HID_UP_BUTTON:
+
+ code = ((usage->hid - 1) & 0xf);
+
+ switch (field->application) {
+ case HID_GD_MOUSE:
+ case HID_GD_POINTER: code += 0x110; break;
+ case HID_GD_JOYSTICK: code += 0x120; break;
+ case HID_GD_GAMEPAD: code += 0x130; break;
+ default:
+ switch (field->physical) {
+ case HID_GD_MOUSE:
+ case HID_GD_POINTER: code += 0x110; break;
+ case HID_GD_JOYSTICK: code += 0x120; break;
+ case HID_GD_GAMEPAD: code += 0x130; break;
+ default: code += 0x100;
+ }
+ }
+
+ map_key(code);
+ break;
+
+ case HID_UP_GENDESK:
+
+ if ((usage->hid & 0xf0) == 0x80) { /* SystemControl */
+ switch (usage->hid & 0xf) {
+ case 0x1: map_key_clear(KEY_POWER); break;
+ case 0x2: map_key_clear(KEY_SLEEP); break;
+ case 0x3: map_key_clear(KEY_WAKEUP); break;
+ default: goto unknown;
+ }
+ break;
+ }
+
+ if ((usage->hid & 0xf0) == 0x90) { /* D-pad */
+ switch (usage->hid) {
+ case HID_GD_UP: usage->hat_dir = 1; break;
+ case HID_GD_DOWN: usage->hat_dir = 5; break;
+ case HID_GD_RIGHT: usage->hat_dir = 3; break;
+ case HID_GD_LEFT: usage->hat_dir = 7; break;
+ default: goto unknown;
+ }
+ if (field->dpad) {
+ map_abs(field->dpad);
+ goto ignore;
+ }
+ map_abs(ABS_HAT0X);
+ break;
+ }
+
+ switch (usage->hid) {
+
+ /* These usage IDs map directly to the usage codes. */
+ case HID_GD_X: case HID_GD_Y: case HID_GD_Z:
+ case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ:
+ case HID_GD_SLIDER: case HID_GD_DIAL: case HID_GD_WHEEL:
+ if (field->flags & HID_MAIN_ITEM_RELATIVE)
+ map_rel(usage->hid & 0xf);
+ else
+ map_abs(usage->hid & 0xf);
+ break;
+
+ case HID_GD_HATSWITCH:
+ usage->hat_min = field->logical_minimum;
+ usage->hat_max = field->logical_maximum;
+ map_abs(ABS_HAT0X);
+ break;
+
+ case HID_GD_START: map_key_clear(BTN_START); break;
+ case HID_GD_SELECT: map_key_clear(BTN_SELECT); break;
+
+ default: goto unknown;
+ }
+
+ break;
+
+ case HID_UP_LED:
+ if (((usage->hid - 1) & 0xffff) >= LED_MAX)
+ goto ignore;
+ map_led((usage->hid - 1) & 0xffff);
+ break;
+
+ case HID_UP_DIGITIZER:
+
+ switch (usage->hid & 0xff) {
+
+ case 0x30: /* TipPressure */
+ if (!test_bit(BTN_TOUCH, input->keybit)) {
+ device->quirks |= HID_QUIRK_NOTOUCH;
+ set_bit(EV_KEY, input->evbit);
+ set_bit(BTN_TOUCH, input->keybit);
+ }
+
+ map_abs_clear(ABS_PRESSURE);
+ break;
+
+ case 0x32: /* InRange */
+ switch (field->physical & 0xff) {
+ case 0x21: map_key(BTN_TOOL_MOUSE); break;
+ case 0x22: map_key(BTN_TOOL_FINGER); break;
+ default: map_key(BTN_TOOL_PEN); break;
+ }
+ break;
+
+ case 0x3c: /* Invert */
+ map_key_clear(BTN_TOOL_RUBBER);
+ break;
+
+ case 0x33: /* Touch */
+ case 0x42: /* TipSwitch */
+ case 0x43: /* TipSwitch2 */
+ device->quirks &= ~HID_QUIRK_NOTOUCH;
+ map_key_clear(BTN_TOUCH);
+ break;
+
+ case 0x44: /* BarrelSwitch */
+ map_key_clear(BTN_STYLUS);
+ break;
+
+ default: goto unknown;
+ }
+ break;
+
+ case HID_UP_CONSUMER: /* USB HUT v1.1, pages 56-62 */
+
+ switch (usage->hid & HID_USAGE) {
+ case 0x000: goto ignore;
+ case 0x034: map_key_clear(KEY_SLEEP); break;
+ case 0x036: map_key_clear(BTN_MISC); break;
+ case 0x08a: map_key_clear(KEY_WWW); break;
+ case 0x095: map_key_clear(KEY_HELP); break;
+ case 0x0b0: map_key_clear(KEY_PLAY); break;
+ case 0x0b1: map_key_clear(KEY_PAUSE); break;
+ case 0x0b2: map_key_clear(KEY_RECORD); break;
+ case 0x0b3: map_key_clear(KEY_FASTFORWARD); break;
+ case 0x0b4: map_key_clear(KEY_REWIND); break;
+ case 0x0b5: map_key_clear(KEY_NEXTSONG); break;
+ case 0x0b6: map_key_clear(KEY_PREVIOUSSONG); break;
+ case 0x0b7: map_key_clear(KEY_STOPCD); break;
+ case 0x0b8: map_key_clear(KEY_EJECTCD); break;
+ case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break;
+ case 0x0e0: map_abs_clear(ABS_VOLUME); break;
+ case 0x0e2: map_key_clear(KEY_MUTE); break;
+ case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
+ case 0x0e9: map_key_clear(KEY_VOLUMEUP); break;
+ case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break;
+ case 0x183: map_key_clear(KEY_CONFIG); break;
+ case 0x18a: map_key_clear(KEY_MAIL); break;
+ case 0x192: map_key_clear(KEY_CALC); break;
+ case 0x194: map_key_clear(KEY_FILE); break;
+ case 0x21a: map_key_clear(KEY_UNDO); break;
+ case 0x21b: map_key_clear(KEY_COPY); break;
+ case 0x21c: map_key_clear(KEY_CUT); break;
+ case 0x21d: map_key_clear(KEY_PASTE); break;
+ case 0x221: map_key_clear(KEY_FIND); break;
+ case 0x223: map_key_clear(KEY_HOMEPAGE); break;
+ case 0x224: map_key_clear(KEY_BACK); break;
+ case 0x225: map_key_clear(KEY_FORWARD); break;
+ case 0x226: map_key_clear(KEY_STOP); break;
+ case 0x227: map_key_clear(KEY_REFRESH); break;
+ case 0x22a: map_key_clear(KEY_BOOKMARKS); break;
+ case 0x238: map_rel(REL_HWHEEL); break;
+ default: goto unknown;
+ }
+ break;
+
+ case HID_UP_HPVENDOR: /* Reported on a Dutch layout HP5308 */
+
+ set_bit(EV_REP, input->evbit);
+ switch (usage->hid & HID_USAGE) {
+ case 0x021: map_key_clear(KEY_PRINT); break;
+ case 0x070: map_key_clear(KEY_HP); break;
+ case 0x071: map_key_clear(KEY_CAMERA); break;
+ case 0x072: map_key_clear(KEY_SOUND); break;
+ case 0x073: map_key_clear(KEY_QUESTION); break;
+ case 0x080: map_key_clear(KEY_EMAIL); break;
+ case 0x081: map_key_clear(KEY_CHAT); break;
+ case 0x082: map_key_clear(KEY_SEARCH); break;
+ case 0x083: map_key_clear(KEY_CONNECT); break;
+ case 0x084: map_key_clear(KEY_FINANCE); break;
+ case 0x085: map_key_clear(KEY_SPORT); break;
+ case 0x086: map_key_clear(KEY_SHOP); break;
+ default: goto ignore;
+ }
+ break;
+
+ case HID_UP_MSVENDOR:
+
+ goto ignore;
+
+ case HID_UP_PID:
+
+ set_bit(EV_FF, input->evbit);
+ switch(usage->hid & HID_USAGE) {
+ case 0x26: map_ff_effect(FF_CONSTANT); goto ignore;
+ case 0x27: map_ff_effect(FF_RAMP); goto ignore;
+ case 0x28: map_ff_effect(FF_CUSTOM); goto ignore;
+ case 0x30: map_ff_effect(FF_SQUARE); map_ff_effect(FF_PERIODIC); goto ignore;
+ case 0x31: map_ff_effect(FF_SINE); map_ff_effect(FF_PERIODIC); goto ignore;
+ case 0x32: map_ff_effect(FF_TRIANGLE); map_ff_effect(FF_PERIODIC); goto ignore;
+ case 0x33: map_ff_effect(FF_SAW_UP); map_ff_effect(FF_PERIODIC); goto ignore;
+ case 0x34: map_ff_effect(FF_SAW_DOWN); map_ff_effect(FF_PERIODIC); goto ignore;
+ case 0x40: map_ff_effect(FF_SPRING); goto ignore;
+ case 0x41: map_ff_effect(FF_DAMPER); goto ignore;
+ case 0x42: map_ff_effect(FF_INERTIA); goto ignore;
+ case 0x43: map_ff_effect(FF_FRICTION); goto ignore;
+ case 0x7e: map_ff(FF_GAIN); break;
+ case 0x83: input->ff_effects_max = field->value[0]; goto ignore;
+ case 0x98: map_ff(FF_AUTOCENTER); break;
+ case 0xa4: map_key_clear(BTN_DEAD); break;
+ default: goto ignore;
+ }
+ break;
+
+ default:
+ unknown:
+ if (field->report_size == 1) {
+ if (field->report->type == HID_OUTPUT_REPORT) {
+ map_led(LED_MISC);
+ break;
+ }
+ map_key(BTN_MISC);
+ break;
+ }
+ if (field->flags & HID_MAIN_ITEM_RELATIVE) {
+ map_rel(REL_MISC);
+ break;
+ }
+ map_abs(ABS_MISC);
+ break;
+ }
+
+ set_bit(usage->type, input->evbit);
+
+ while (usage->code <= max && test_and_set_bit(usage->code, bit))
+ usage->code = find_next_zero_bit(bit, max + 1, usage->code);
+
+ if (usage->code > max)
+ goto ignore;
+
+ if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5)) &&
+ (usage->type == EV_REL) && (usage->code == REL_WHEEL))
+ set_bit(REL_HWHEEL, bit);
+
+ if (((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005))
+ || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007)))
+ goto ignore;
+
+ if (usage->type == EV_ABS) {
+
+ int a = field->logical_minimum;
+ int b = field->logical_maximum;
+
+ if ((device->quirks & HID_QUIRK_BADPAD) && (usage->code == ABS_X || usage->code == ABS_Y)) {
+ a = field->logical_minimum = 0;
+ b = field->logical_maximum = 255;
+ }
+
+ if (field->application == HID_GD_GAMEPAD || field->application == HID_GD_JOYSTICK)
+ input_set_abs_params(input, usage->code, a, b, (b - a) >> 8, (b - a) >> 4);
+ else input_set_abs_params(input, usage->code, a, b, 0, 0);
+
+ }
+
+ if (usage->hat_min < usage->hat_max || usage->hat_dir) {
+ int i;
+ for (i = usage->code; i < usage->code + 2 && i <= max; i++) {
+ input_set_abs_params(input, i, -1, 1, 0, 0);
+ set_bit(i, input->absbit);
+ }
+ if (usage->hat_dir && !field->dpad)
+ field->dpad = usage->code;
+ }
+
+#ifdef DEBUG
+ resolv_event(usage->type, usage->code);
+ printk("\n");
+#endif
+ return;
+
+ignore:
+#ifdef DEBUG
+ printk("IGNORED\n");
+#endif
+ return;
+}
+
+void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, struct pt_regs *regs)
+{
+ struct input_dev *input = &field->hidinput->input;
+ int *quirks = &hid->quirks;
+
+ if (!input)
+ return;
+
+ input_regs(input, regs);
+
+ if (!usage->type)
+ return;
+
+ if (((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005))
+ || ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) {
+ if (value) hid->quirks |= HID_QUIRK_2WHEEL_MOUSE_HACK_ON;
+ else hid->quirks &= ~HID_QUIRK_2WHEEL_MOUSE_HACK_ON;
+ return;
+ }
+
+ if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_ON) && (usage->code == REL_WHEEL)) {
+ input_event(input, usage->type, REL_HWHEEL, value);
+ return;
+ }
+
+ if (usage->hat_min < usage->hat_max || usage->hat_dir) {
+ int hat_dir = usage->hat_dir;
+ if (!hat_dir)
+ hat_dir = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1;
+ if (hat_dir < 0 || hat_dir > 8) hat_dir = 0;
+ input_event(input, usage->type, usage->code , hid_hat_to_axis[hat_dir].x);
+ input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y);
+ return;
+ }
+
+ if (usage->hid == (HID_UP_DIGITIZER | 0x003c)) { /* Invert */
+ *quirks = value ? (*quirks | HID_QUIRK_INVERT) : (*quirks & ~HID_QUIRK_INVERT);
+ return;
+ }
+
+ if (usage->hid == (HID_UP_DIGITIZER | 0x0032)) { /* InRange */
+ if (value) {
+ input_event(input, usage->type, (*quirks & HID_QUIRK_INVERT) ? BTN_TOOL_RUBBER : usage->code, 1);
+ return;
+ }
+ input_event(input, usage->type, usage->code, 0);
+ input_event(input, usage->type, BTN_TOOL_RUBBER, 0);
+ return;
+ }
+
+ if (usage->hid == (HID_UP_DIGITIZER | 0x0030) && (*quirks & HID_QUIRK_NOTOUCH)) { /* Pressure */
+ int a = field->logical_minimum;
+ int b = field->logical_maximum;
+ input_event(input, EV_KEY, BTN_TOUCH, value > a + ((b - a) >> 3));
+ }
+
+ if (usage->hid == (HID_UP_PID | 0x83UL)) { /* Simultaneous Effects Max */
+ input->ff_effects_max = value;
+ dbg("Maximum Effects - %d",input->ff_effects_max);
+ return;
+ }
+
+ if (usage->hid == (HID_UP_PID | 0x7fUL)) {
+ dbg("PID Pool Report\n");
+ return;
+ }
+
+ if((usage->type == EV_KEY) && (usage->code == 0)) /* Key 0 is "unassigned", not KEY_UNKNOWN */
+ return;
+
+ input_event(input, usage->type, usage->code, value);
+
+ if ((field->flags & HID_MAIN_ITEM_RELATIVE) && (usage->type == EV_KEY))
+ input_event(input, usage->type, usage->code, 0);
+}
+
+void hidinput_report_event(struct hid_device *hid, struct hid_report *report)
+{
+ struct list_head *lh;
+ struct hid_input *hidinput;
+
+ list_for_each (lh, &hid->inputs) {
+ hidinput = list_entry(lh, struct hid_input, list);
+ input_sync(&hidinput->input);
+ }
+}
+
+static int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field)
+{
+ struct hid_report *report;
+ int i, j;
+
+ list_for_each_entry(report, &hid->report_enum[HID_OUTPUT_REPORT].report_list, list) {
+ for (i = 0; i < report->maxfield; i++) {
+ *field = report->field[i];
+ for (j = 0; j < (*field)->maxusage; j++)
+ if ((*field)->usage[j].type == type && (*field)->usage[j].code == code)
+ return j;
+ }
+ }
+ return -1;
+}
+
+static int hidinput_input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
+{
+ struct hid_device *hid = dev->private;
+ struct hid_field *field;
+ int offset;
+
+ if (type == EV_FF)
+ return hid_ff_event(hid, dev, type, code, value);
+
+ if (type != EV_LED)
+ return -1;
+
+ if ((offset = hidinput_find_field(hid, type, code, &field)) == -1) {
+ warn("event field not found");
+ return -1;
+ }
+
+ hid_set_field(field, offset, value);
+ hid_submit_report(hid, field->report, USB_DIR_OUT);
+
+ return 0;
+}
+
+static int hidinput_open(struct input_dev *dev)
+{
+ struct hid_device *hid = dev->private;
+ return hid_open(hid);
+}
+
+static void hidinput_close(struct input_dev *dev)
+{
+ struct hid_device *hid = dev->private;
+ hid_close(hid);
+}
+
+/*
+ * Register the input device; print a message.
+ * Configure the input layer interface
+ * Read all reports and initialize the absolute field values.
+ */
+
+int hidinput_connect(struct hid_device *hid)
+{
+ struct usb_device *dev = hid->dev;
+ struct hid_report *report;
+ struct hid_input *hidinput = NULL;
+ int i, j, k;
+
+ INIT_LIST_HEAD(&hid->inputs);
+
+ for (i = 0; i < hid->maxcollection; i++)
+ if (hid->collection[i].type == HID_COLLECTION_APPLICATION ||
+ hid->collection[i].type == HID_COLLECTION_PHYSICAL)
+ if (IS_INPUT_APPLICATION(hid->collection[i].usage))
+ break;
+
+ if (i == hid->maxcollection)
+ return -1;
+
+ for (k = HID_INPUT_REPORT; k <= HID_OUTPUT_REPORT; k++)
+ list_for_each_entry(report, &hid->report_enum[k].report_list, list) {
+
+ if (!report->maxfield)
+ continue;
+
+ if (!hidinput) {
+ hidinput = kmalloc(sizeof(*hidinput), GFP_KERNEL);
+ if (!hidinput) {
+ err("Out of memory during hid input probe");
+ return -1;
+ }
+ memset(hidinput, 0, sizeof(*hidinput));
+
+ list_add_tail(&hidinput->list, &hid->inputs);
+
+ hidinput->input.private = hid;
+ hidinput->input.event = hidinput_input_event;
+ hidinput->input.open = hidinput_open;
+ hidinput->input.close = hidinput_close;
+
+ hidinput->input.name = hid->name;
+ hidinput->input.phys = hid->phys;
+ hidinput->input.uniq = hid->uniq;
+ hidinput->input.id.bustype = BUS_USB;
+ hidinput->input.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+ hidinput->input.id.product = le16_to_cpu(dev->descriptor.idProduct);
+ hidinput->input.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
+ hidinput->input.dev = &hid->intf->dev;
+ }
+
+ for (i = 0; i < report->maxfield; i++)
+ for (j = 0; j < report->field[i]->maxusage; j++)
+ hidinput_configure_usage(hidinput, report->field[i],
+ report->field[i]->usage + j);
+
+ if (hid->quirks & HID_QUIRK_MULTI_INPUT) {
+ /* This will leave hidinput NULL, so that it
+ * allocates another one if we have more inputs on
+ * the same interface. Some devices (e.g. Happ's
+ * UGCI) cram a lot of unrelated inputs into the
+ * same interface. */
+ hidinput->report = report;
+ input_register_device(&hidinput->input);
+ hidinput = NULL;
+ }
+ }
+
+ /* This only gets called when we are a single-input (most of the
+ * time). IOW, not a HID_QUIRK_MULTI_INPUT. The hid_ff_init() is
+ * only useful in this case, and not for multi-input quirks. */
+ if (hidinput) {
+ hid_ff_init(hid);
+ input_register_device(&hidinput->input);
+ }
+
+ return 0;
+}
+
+void hidinput_disconnect(struct hid_device *hid)
+{
+ struct list_head *lh, *next;
+ struct hid_input *hidinput;
+
+ list_for_each_safe(lh, next, &hid->inputs) {
+ hidinput = list_entry(lh, struct hid_input, list);
+ input_unregister_device(&hidinput->input);
+ list_del(&hidinput->list);
+ kfree(hidinput);
+ }
+}
diff --git a/drivers/usb/input/hid-lgff.c b/drivers/usb/input/hid-lgff.c
new file mode 100644
index 000000000000..0d7404bab92f
--- /dev/null
+++ b/drivers/usb/input/hid-lgff.c
@@ -0,0 +1,528 @@
+/*
+ * $$
+ *
+ * Force feedback support for hid-compliant for some of the devices from
+ * Logitech, namely:
+ * - WingMan Cordless RumblePad
+ * - WingMan Force 3D
+ *
+ * Copyright (c) 2002-2004 Johann Deneux
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so by
+ * e-mail - mail your message to <johann.deneux@it.uu.se>
+ */
+
+#include <linux/input.h>
+#include <linux/sched.h>
+
+//#define DEBUG
+#include <linux/usb.h>
+
+#include <linux/circ_buf.h>
+
+#include "hid.h"
+#include "fixp-arith.h"
+
+
+/* Periodicity of the update */
+#define PERIOD (HZ/10)
+
+#define RUN_AT(t) (jiffies + (t))
+
+/* Effect status */
+#define EFFECT_STARTED 0 /* Effect is going to play after some time
+ (ff_replay.delay) */
+#define EFFECT_PLAYING 1 /* Effect is being played */
+#define EFFECT_USED 2
+
+// For lgff_device::flags
+#define DEVICE_CLOSING 0 /* The driver is being unitialised */
+
+/* Check that the current process can access an effect */
+#define CHECK_OWNERSHIP(effect) (current->pid == 0 \
+ || effect.owner == current->pid)
+
+#define LGFF_CHECK_OWNERSHIP(i, l) \
+ (i>=0 && i<LGFF_EFFECTS \
+ && test_bit(EFFECT_USED, l->effects[i].flags) \
+ && CHECK_OWNERSHIP(l->effects[i]))
+
+#define LGFF_EFFECTS 8
+
+struct device_type {
+ u16 idVendor;
+ u16 idProduct;
+ signed short *ff;
+};
+
+struct lgff_effect {
+ pid_t owner;
+
+ struct ff_effect effect;
+
+ unsigned long flags[1];
+ unsigned int count; /* Number of times left to play */
+ unsigned long started_at; /* When the effect started to play */
+};
+
+struct lgff_device {
+ struct hid_device* hid;
+
+ struct hid_report* constant;
+ struct hid_report* rumble;
+ struct hid_report* condition;
+
+ struct lgff_effect effects[LGFF_EFFECTS];
+ spinlock_t lock; /* device-level lock. Having locks on
+ a per-effect basis could be nice, but
+ isn't really necessary */
+
+ unsigned long flags[1]; /* Contains various information about the
+ state of the driver for this device */
+
+ struct timer_list timer;
+};
+
+/* Callbacks */
+static void hid_lgff_exit(struct hid_device* hid);
+static int hid_lgff_event(struct hid_device *hid, struct input_dev *input,
+ unsigned int type, unsigned int code, int value);
+static int hid_lgff_flush(struct input_dev *input, struct file *file);
+static int hid_lgff_upload_effect(struct input_dev *input,
+ struct ff_effect *effect);
+static int hid_lgff_erase(struct input_dev *input, int id);
+
+/* Local functions */
+static void hid_lgff_input_init(struct hid_device* hid);
+static void hid_lgff_timer(unsigned long timer_data);
+static struct hid_report* hid_lgff_duplicate_report(struct hid_report*);
+static void hid_lgff_delete_report(struct hid_report*);
+
+static signed short ff_rumble[] = {
+ FF_RUMBLE,
+ -1
+};
+
+static signed short ff_joystick[] = {
+ FF_CONSTANT,
+ -1
+};
+
+static struct device_type devices[] = {
+ {0x046d, 0xc211, ff_rumble},
+ {0x046d, 0xc219, ff_rumble},
+ {0x046d, 0xc283, ff_joystick},
+ {0x0000, 0x0000, ff_joystick}
+};
+
+int hid_lgff_init(struct hid_device* hid)
+{
+ struct lgff_device *private;
+ struct hid_report* report;
+ struct hid_field* field;
+
+ /* Find the report to use */
+ if (list_empty(&hid->report_enum[HID_OUTPUT_REPORT].report_list)) {
+ err("No output report found");
+ return -1;
+ }
+ /* Check that the report looks ok */
+ report = (struct hid_report*)hid->report_enum[HID_OUTPUT_REPORT].report_list.next;
+ if (!report) {
+ err("NULL output report");
+ return -1;
+ }
+ field = report->field[0];
+ if (!field) {
+ err("NULL field");
+ return -1;
+ }
+
+ private = kmalloc(sizeof(struct lgff_device), GFP_KERNEL);
+ if (!private)
+ return -1;
+ memset(private, 0, sizeof(struct lgff_device));
+ hid->ff_private = private;
+
+ /* Input init */
+ hid_lgff_input_init(hid);
+
+
+ private->constant = hid_lgff_duplicate_report(report);
+ if (!private->constant) {
+ kfree(private);
+ return -1;
+ }
+ private->constant->field[0]->value[0] = 0x51;
+ private->constant->field[0]->value[1] = 0x08;
+ private->constant->field[0]->value[2] = 0x7f;
+ private->constant->field[0]->value[3] = 0x7f;
+
+ private->rumble = hid_lgff_duplicate_report(report);
+ if (!private->rumble) {
+ hid_lgff_delete_report(private->constant);
+ kfree(private);
+ return -1;
+ }
+ private->rumble->field[0]->value[0] = 0x42;
+
+
+ private->condition = hid_lgff_duplicate_report(report);
+ if (!private->condition) {
+ hid_lgff_delete_report(private->rumble);
+ hid_lgff_delete_report(private->constant);
+ kfree(private);
+ return -1;
+ }
+
+ private->hid = hid;
+
+ spin_lock_init(&private->lock);
+ init_timer(&private->timer);
+ private->timer.data = (unsigned long)private;
+ private->timer.function = hid_lgff_timer;
+
+ /* Event and exit callbacks */
+ hid->ff_exit = hid_lgff_exit;
+ hid->ff_event = hid_lgff_event;
+
+ /* Start the update task */
+ private->timer.expires = RUN_AT(PERIOD);
+ add_timer(&private->timer); /*TODO: only run the timer when at least
+ one effect is playing */
+
+ printk(KERN_INFO "Force feedback for Logitech force feedback devices by Johann Deneux <johann.deneux@it.uu.se>\n");
+
+ return 0;
+}
+
+static struct hid_report* hid_lgff_duplicate_report(struct hid_report* report)
+{
+ struct hid_report* ret;
+
+ ret = kmalloc(sizeof(struct lgff_device), GFP_KERNEL);
+ if (!ret)
+ return NULL;
+ *ret = *report;
+
+ ret->field[0] = kmalloc(sizeof(struct hid_field), GFP_KERNEL);
+ if (!ret->field[0]) {
+ kfree(ret);
+ return NULL;
+ }
+ *ret->field[0] = *report->field[0];
+
+ ret->field[0]->value = kmalloc(sizeof(s32[8]), GFP_KERNEL);
+ if (!ret->field[0]->value) {
+ kfree(ret->field[0]);
+ kfree(ret);
+ return NULL;
+ }
+ memset(ret->field[0]->value, 0, sizeof(s32[8]));
+
+ return ret;
+}
+
+static void hid_lgff_delete_report(struct hid_report* report)
+{
+ if (report) {
+ kfree(report->field[0]->value);
+ kfree(report->field[0]);
+ kfree(report);
+ }
+}
+
+static void hid_lgff_input_init(struct hid_device* hid)
+{
+ struct device_type* dev = devices;
+ signed short* ff;
+ u16 idVendor = le16_to_cpu(hid->dev->descriptor.idVendor);
+ u16 idProduct = le16_to_cpu(hid->dev->descriptor.idProduct);
+ struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
+
+ while (dev->idVendor && (idVendor != dev->idVendor || idProduct != dev->idProduct))
+ dev++;
+
+ ff = dev->ff;
+
+ while (*ff >= 0) {
+ set_bit(*ff, hidinput->input.ffbit);
+ ++ff;
+ }
+
+ hidinput->input.upload_effect = hid_lgff_upload_effect;
+ hidinput->input.flush = hid_lgff_flush;
+
+ set_bit(EV_FF, hidinput->input.evbit);
+ hidinput->input.ff_effects_max = LGFF_EFFECTS;
+}
+
+static void hid_lgff_exit(struct hid_device* hid)
+{
+ struct lgff_device *lgff = hid->ff_private;
+
+ set_bit(DEVICE_CLOSING, lgff->flags);
+ del_timer_sync(&lgff->timer);
+
+ hid_lgff_delete_report(lgff->condition);
+ hid_lgff_delete_report(lgff->rumble);
+ hid_lgff_delete_report(lgff->constant);
+
+ kfree(lgff);
+}
+
+static int hid_lgff_event(struct hid_device *hid, struct input_dev* input,
+ unsigned int type, unsigned int code, int value)
+{
+ struct lgff_device *lgff = hid->ff_private;
+ struct lgff_effect *effect = lgff->effects + code;
+ unsigned long flags;
+
+ if (type != EV_FF) return -EINVAL;
+ if (!LGFF_CHECK_OWNERSHIP(code, lgff)) return -EACCES;
+ if (value < 0) return -EINVAL;
+
+ spin_lock_irqsave(&lgff->lock, flags);
+
+ if (value > 0) {
+ if (test_bit(EFFECT_STARTED, effect->flags)) {
+ spin_unlock_irqrestore(&lgff->lock, flags);
+ return -EBUSY;
+ }
+ if (test_bit(EFFECT_PLAYING, effect->flags)) {
+ spin_unlock_irqrestore(&lgff->lock, flags);
+ return -EBUSY;
+ }
+
+ effect->count = value;
+
+ if (effect->effect.replay.delay) {
+ set_bit(EFFECT_STARTED, effect->flags);
+ } else {
+ set_bit(EFFECT_PLAYING, effect->flags);
+ }
+ effect->started_at = jiffies;
+ }
+ else { /* value == 0 */
+ clear_bit(EFFECT_STARTED, effect->flags);
+ clear_bit(EFFECT_PLAYING, effect->flags);
+ }
+
+ spin_unlock_irqrestore(&lgff->lock, flags);
+
+ return 0;
+
+}
+
+/* Erase all effects this process owns */
+static int hid_lgff_flush(struct input_dev *dev, struct file *file)
+{
+ struct hid_device *hid = dev->private;
+ struct lgff_device *lgff = hid->ff_private;
+ int i;
+
+ for (i=0; i<dev->ff_effects_max; ++i) {
+
+ /*NOTE: no need to lock here. The only times EFFECT_USED is
+ modified is when effects are uploaded or when an effect is
+ erased. But a process cannot close its dev/input/eventX fd
+ and perform ioctls on the same fd all at the same time */
+ if ( current->pid == lgff->effects[i].owner
+ && test_bit(EFFECT_USED, lgff->effects[i].flags)) {
+
+ if (hid_lgff_erase(dev, i))
+ warn("erase effect %d failed", i);
+ }
+
+ }
+
+ return 0;
+}
+
+static int hid_lgff_erase(struct input_dev *dev, int id)
+{
+ struct hid_device *hid = dev->private;
+ struct lgff_device *lgff = hid->ff_private;
+ unsigned long flags;
+
+ if (!LGFF_CHECK_OWNERSHIP(id, lgff)) return -EACCES;
+
+ spin_lock_irqsave(&lgff->lock, flags);
+ lgff->effects[id].flags[0] = 0;
+ spin_unlock_irqrestore(&lgff->lock, flags);
+
+ return 0;
+}
+
+static int hid_lgff_upload_effect(struct input_dev* input,
+ struct ff_effect* effect)
+{
+ struct hid_device *hid = input->private;
+ struct lgff_device *lgff = hid->ff_private;
+ struct lgff_effect new;
+ int id;
+ unsigned long flags;
+
+ dbg("ioctl rumble");
+
+ if (!test_bit(effect->type, input->ffbit)) return -EINVAL;
+
+ spin_lock_irqsave(&lgff->lock, flags);
+
+ if (effect->id == -1) {
+ int i;
+
+ for (i=0; i<LGFF_EFFECTS && test_bit(EFFECT_USED, lgff->effects[i].flags); ++i);
+ if (i >= LGFF_EFFECTS) {
+ spin_unlock_irqrestore(&lgff->lock, flags);
+ return -ENOSPC;
+ }
+
+ effect->id = i;
+ lgff->effects[i].owner = current->pid;
+ lgff->effects[i].flags[0] = 0;
+ set_bit(EFFECT_USED, lgff->effects[i].flags);
+ }
+ else if (!LGFF_CHECK_OWNERSHIP(effect->id, lgff)) {
+ spin_unlock_irqrestore(&lgff->lock, flags);
+ return -EACCES;
+ }
+
+ id = effect->id;
+ new = lgff->effects[id];
+
+ new.effect = *effect;
+
+ if (test_bit(EFFECT_STARTED, lgff->effects[id].flags)
+ || test_bit(EFFECT_STARTED, lgff->effects[id].flags)) {
+
+ /* Changing replay parameters is not allowed (for the time
+ being) */
+ if (new.effect.replay.delay != lgff->effects[id].effect.replay.delay
+ || new.effect.replay.length != lgff->effects[id].effect.replay.length) {
+ spin_unlock_irqrestore(&lgff->lock, flags);
+ return -ENOSYS;
+ }
+
+ lgff->effects[id] = new;
+
+ } else {
+ lgff->effects[id] = new;
+ }
+
+ spin_unlock_irqrestore(&lgff->lock, flags);
+ return 0;
+}
+
+static void hid_lgff_timer(unsigned long timer_data)
+{
+ struct lgff_device *lgff = (struct lgff_device*)timer_data;
+ struct hid_device *hid = lgff->hid;
+ unsigned long flags;
+ int x = 0x7f, y = 0x7f; // Coordinates of constant effects
+ unsigned int left = 0, right = 0; // Rumbling
+ int i;
+
+ spin_lock_irqsave(&lgff->lock, flags);
+
+ for (i=0; i<LGFF_EFFECTS; ++i) {
+ struct lgff_effect* effect = lgff->effects +i;
+
+ if (test_bit(EFFECT_PLAYING, effect->flags)) {
+
+ switch (effect->effect.type) {
+ case FF_CONSTANT: {
+ //TODO: handle envelopes
+ int degrees = effect->effect.direction * 360 >> 16;
+ x += fixp_mult(fixp_sin(degrees),
+ fixp_new16(effect->effect.u.constant.level));
+ y += fixp_mult(-fixp_cos(degrees),
+ fixp_new16(effect->effect.u.constant.level));
+ } break;
+ case FF_RUMBLE:
+ right += effect->effect.u.rumble.strong_magnitude;
+ left += effect->effect.u.rumble.weak_magnitude;
+ break;
+ };
+
+ /* One run of the effect is finished playing */
+ if (time_after(jiffies,
+ effect->started_at
+ + effect->effect.replay.delay*HZ/1000
+ + effect->effect.replay.length*HZ/1000)) {
+ dbg("Finished playing once %d", i);
+ if (--effect->count <= 0) {
+ dbg("Stopped %d", i);
+ clear_bit(EFFECT_PLAYING, effect->flags);
+ }
+ else {
+ dbg("Start again %d", i);
+ if (effect->effect.replay.length != 0) {
+ clear_bit(EFFECT_PLAYING, effect->flags);
+ set_bit(EFFECT_STARTED, effect->flags);
+ }
+ effect->started_at = jiffies;
+ }
+ }
+
+ } else if (test_bit(EFFECT_STARTED, lgff->effects[i].flags)) {
+ /* Check if we should start playing the effect */
+ if (time_after(jiffies,
+ lgff->effects[i].started_at
+ + lgff->effects[i].effect.replay.delay*HZ/1000)) {
+ dbg("Now playing %d", i);
+ clear_bit(EFFECT_STARTED, lgff->effects[i].flags);
+ set_bit(EFFECT_PLAYING, lgff->effects[i].flags);
+ }
+ }
+ }
+
+#define CLAMP(x) if (x < 0) x = 0; if (x > 0xff) x = 0xff
+
+ // Clamp values
+ CLAMP(x);
+ CLAMP(y);
+ CLAMP(left);
+ CLAMP(right);
+
+#undef CLAMP
+
+ if (x != lgff->constant->field[0]->value[2]
+ || y != lgff->constant->field[0]->value[3]) {
+ lgff->constant->field[0]->value[2] = x;
+ lgff->constant->field[0]->value[3] = y;
+ dbg("(x,y)=(%04x, %04x)", x, y);
+ hid_submit_report(hid, lgff->constant, USB_DIR_OUT);
+ }
+
+ if (left != lgff->rumble->field[0]->value[2]
+ || right != lgff->rumble->field[0]->value[3]) {
+ lgff->rumble->field[0]->value[2] = left;
+ lgff->rumble->field[0]->value[3] = right;
+ dbg("(left,right)=(%04x, %04x)", left, right);
+ hid_submit_report(hid, lgff->rumble, USB_DIR_OUT);
+ }
+
+ if (!test_bit(DEVICE_CLOSING, lgff->flags)) {
+ lgff->timer.expires = RUN_AT(PERIOD);
+ add_timer(&lgff->timer);
+ }
+
+ spin_unlock_irqrestore(&lgff->lock, flags);
+}
diff --git a/drivers/usb/input/hid-tmff.c b/drivers/usb/input/hid-tmff.c
new file mode 100644
index 000000000000..8f6a0a6f94a9
--- /dev/null
+++ b/drivers/usb/input/hid-tmff.c
@@ -0,0 +1,463 @@
+/*
+ * Force feedback support for various HID compliant devices by ThrustMaster:
+ * ThrustMaster FireStorm Dual Power 2
+ * and possibly others whose device ids haven't been added.
+ *
+ * Modified to support ThrustMaster devices by Zinx Verituse
+ * on 2003-01-25 from the Logitech force feedback driver,
+ * which is by Johann Deneux.
+ *
+ * Copyright (c) 2003 Zinx Verituse <zinx@epicsol.org>
+ * Copyright (c) 2002 Johann Deneux
+ */
+
+/*
+ * 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 <linux/input.h>
+#include <linux/sched.h>
+
+#undef DEBUG
+#include <linux/usb.h>
+
+#include <linux/circ_buf.h>
+
+#include "hid.h"
+#include "fixp-arith.h"
+
+/* Usages for thrustmaster devices I know about */
+#define THRUSTMASTER_USAGE_RUMBLE_LR (HID_UP_GENDESK | 0xbb)
+#define DELAY_CALC(t,delay) ((t) + (delay)*HZ/1000)
+
+/* Effect status */
+#define EFFECT_STARTED 0 /* Effect is going to play after some time */
+#define EFFECT_PLAYING 1 /* Effect is playing */
+#define EFFECT_USED 2
+
+/* For tmff_device::flags */
+#define DEVICE_CLOSING 0 /* The driver is being unitialised */
+
+/* Check that the current process can access an effect */
+#define CHECK_OWNERSHIP(effect) (current->pid == 0 \
+ || effect.owner == current->pid)
+
+#define TMFF_CHECK_ID(id) ((id) >= 0 && (id) < TMFF_EFFECTS)
+
+#define TMFF_CHECK_OWNERSHIP(i, l) \
+ (test_bit(EFFECT_USED, l->effects[i].flags) \
+ && CHECK_OWNERSHIP(l->effects[i]))
+
+#define TMFF_EFFECTS 8
+
+struct tmff_effect {
+ pid_t owner;
+
+ struct ff_effect effect;
+
+ unsigned long flags[1];
+ unsigned int count; /* Number of times left to play */
+
+ unsigned long play_at; /* When the effect starts to play */
+ unsigned long stop_at; /* When the effect ends */
+};
+
+struct tmff_device {
+ struct hid_device *hid;
+
+ struct hid_report *report;
+
+ struct hid_field *rumble;
+
+ unsigned int effects_playing;
+ struct tmff_effect effects[TMFF_EFFECTS];
+ spinlock_t lock; /* device-level lock. Having locks on
+ a per-effect basis could be nice, but
+ isn't really necessary */
+
+ unsigned long flags[1]; /* Contains various information about the
+ state of the driver for this device */
+
+ struct timer_list timer;
+};
+
+/* Callbacks */
+static void hid_tmff_exit(struct hid_device *hid);
+static int hid_tmff_event(struct hid_device *hid, struct input_dev *input,
+ unsigned int type, unsigned int code, int value);
+static int hid_tmff_flush(struct input_dev *input, struct file *file);
+static int hid_tmff_upload_effect(struct input_dev *input,
+ struct ff_effect *effect);
+static int hid_tmff_erase(struct input_dev *input, int id);
+
+/* Local functions */
+static void hid_tmff_recalculate_timer(struct tmff_device *tmff);
+static void hid_tmff_timer(unsigned long timer_data);
+
+int hid_tmff_init(struct hid_device *hid)
+{
+ struct tmff_device *private;
+ struct list_head *pos;
+ struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
+
+ private = kmalloc(sizeof(struct tmff_device), GFP_KERNEL);
+ if (!private)
+ return -ENOMEM;
+
+ memset(private, 0, sizeof(struct tmff_device));
+ hid->ff_private = private;
+
+ /* Find the report to use */
+ __list_for_each(pos, &hid->report_enum[HID_OUTPUT_REPORT].report_list) {
+ struct hid_report *report = (struct hid_report *)pos;
+ int fieldnum;
+
+ for (fieldnum = 0; fieldnum < report->maxfield; ++fieldnum) {
+ struct hid_field *field = report->field[fieldnum];
+
+ if (field->maxusage <= 0)
+ continue;
+
+ switch (field->usage[0].hid) {
+ case THRUSTMASTER_USAGE_RUMBLE_LR:
+ if (field->report_count < 2) {
+ warn("ignoring THRUSTMASTER_USAGE_RUMBLE_LR with report_count < 2");
+ continue;
+ }
+
+ if (field->logical_maximum == field->logical_minimum) {
+ warn("ignoring THRUSTMASTER_USAGE_RUMBLE_LR with logical_maximum == logical_minimum");
+ continue;
+ }
+
+ if (private->report && private->report != report) {
+ warn("ignoring THRUSTMASTER_USAGE_RUMBLE_LR in other report");
+ continue;
+ }
+
+ if (private->rumble && private->rumble != field) {
+ warn("ignoring duplicate THRUSTMASTER_USAGE_RUMBLE_LR");
+ continue;
+ }
+
+ private->report = report;
+ private->rumble = field;
+
+ set_bit(FF_RUMBLE, hidinput->input.ffbit);
+ break;
+
+ default:
+ warn("ignoring unknown output usage %08x", field->usage[0].hid);
+ continue;
+ }
+
+ /* Fallthrough to here only when a valid usage is found */
+ hidinput->input.upload_effect = hid_tmff_upload_effect;
+ hidinput->input.flush = hid_tmff_flush;
+
+ set_bit(EV_FF, hidinput->input.evbit);
+ hidinput->input.ff_effects_max = TMFF_EFFECTS;
+ }
+ }
+
+ private->hid = hid;
+
+ spin_lock_init(&private->lock);
+ init_timer(&private->timer);
+ private->timer.data = (unsigned long)private;
+ private->timer.function = hid_tmff_timer;
+
+ /* Event and exit callbacks */
+ hid->ff_exit = hid_tmff_exit;
+ hid->ff_event = hid_tmff_event;
+
+ info("Force feedback for ThrustMaster rumble pad devices by Zinx Verituse <zinx@epicsol.org>");
+
+ return 0;
+}
+
+static void hid_tmff_exit(struct hid_device *hid)
+{
+ struct tmff_device *tmff = hid->ff_private;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tmff->lock, flags);
+
+ set_bit(DEVICE_CLOSING, tmff->flags);
+ del_timer_sync(&tmff->timer);
+
+ spin_unlock_irqrestore(&tmff->lock, flags);
+
+ kfree(tmff);
+}
+
+static int hid_tmff_event(struct hid_device *hid, struct input_dev *input,
+ unsigned int type, unsigned int code, int value)
+{
+ struct tmff_device *tmff = hid->ff_private;
+ struct tmff_effect *effect = &tmff->effects[code];
+ unsigned long flags;
+
+ if (type != EV_FF)
+ return -EINVAL;
+ if (!TMFF_CHECK_ID(code))
+ return -EINVAL;
+ if (!TMFF_CHECK_OWNERSHIP(code, tmff))
+ return -EACCES;
+ if (value < 0)
+ return -EINVAL;
+
+ spin_lock_irqsave(&tmff->lock, flags);
+
+ if (value > 0) {
+ set_bit(EFFECT_STARTED, effect->flags);
+ clear_bit(EFFECT_PLAYING, effect->flags);
+ effect->count = value;
+ effect->play_at = DELAY_CALC(jiffies, effect->effect.replay.delay);
+ } else {
+ clear_bit(EFFECT_STARTED, effect->flags);
+ clear_bit(EFFECT_PLAYING, effect->flags);
+ }
+
+ hid_tmff_recalculate_timer(tmff);
+
+ spin_unlock_irqrestore(&tmff->lock, flags);
+
+ return 0;
+
+}
+
+/* Erase all effects this process owns */
+
+static int hid_tmff_flush(struct input_dev *dev, struct file *file)
+{
+ struct hid_device *hid = dev->private;
+ struct tmff_device *tmff = hid->ff_private;
+ int i;
+
+ for (i=0; i<dev->ff_effects_max; ++i)
+
+ /* NOTE: no need to lock here. The only times EFFECT_USED is
+ modified is when effects are uploaded or when an effect is
+ erased. But a process cannot close its dev/input/eventX fd
+ and perform ioctls on the same fd all at the same time */
+
+ if (current->pid == tmff->effects[i].owner
+ && test_bit(EFFECT_USED, tmff->effects[i].flags))
+ if (hid_tmff_erase(dev, i))
+ warn("erase effect %d failed", i);
+
+
+ return 0;
+}
+
+static int hid_tmff_erase(struct input_dev *dev, int id)
+{
+ struct hid_device *hid = dev->private;
+ struct tmff_device *tmff = hid->ff_private;
+ unsigned long flags;
+
+ if (!TMFF_CHECK_ID(id))
+ return -EINVAL;
+ if (!TMFF_CHECK_OWNERSHIP(id, tmff))
+ return -EACCES;
+
+ spin_lock_irqsave(&tmff->lock, flags);
+
+ tmff->effects[id].flags[0] = 0;
+ hid_tmff_recalculate_timer(tmff);
+
+ spin_unlock_irqrestore(&tmff->lock, flags);
+
+ return 0;
+}
+
+static int hid_tmff_upload_effect(struct input_dev *input,
+ struct ff_effect *effect)
+{
+ struct hid_device *hid = input->private;
+ struct tmff_device *tmff = hid->ff_private;
+ int id;
+ unsigned long flags;
+
+ if (!test_bit(effect->type, input->ffbit))
+ return -EINVAL;
+ if (effect->id != -1 && !TMFF_CHECK_ID(effect->id))
+ return -EINVAL;
+
+ spin_lock_irqsave(&tmff->lock, flags);
+
+ if (effect->id == -1) {
+ /* Find a free effect */
+ for (id = 0; id < TMFF_EFFECTS && test_bit(EFFECT_USED, tmff->effects[id].flags); ++id);
+
+ if (id >= TMFF_EFFECTS) {
+ spin_unlock_irqrestore(&tmff->lock, flags);
+ return -ENOSPC;
+ }
+
+ effect->id = id;
+ tmff->effects[id].owner = current->pid;
+ tmff->effects[id].flags[0] = 0;
+ set_bit(EFFECT_USED, tmff->effects[id].flags);
+
+ } else {
+ /* Re-uploading an owned effect, to change parameters */
+ id = effect->id;
+ clear_bit(EFFECT_PLAYING, tmff->effects[id].flags);
+ }
+
+ tmff->effects[id].effect = *effect;
+
+ hid_tmff_recalculate_timer(tmff);
+
+ spin_unlock_irqrestore(&tmff->lock, flags);
+ return 0;
+}
+
+/* Start the timer for the next start/stop/delay */
+/* Always call this while tmff->lock is locked */
+
+static void hid_tmff_recalculate_timer(struct tmff_device *tmff)
+{
+ int i;
+ int events = 0;
+ unsigned long next_time;
+
+ next_time = 0; /* Shut up compiler's incorrect warning */
+
+ /* Find the next change in an effect's status */
+ for (i = 0; i < TMFF_EFFECTS; ++i) {
+ struct tmff_effect *effect = &tmff->effects[i];
+ unsigned long play_time;
+
+ if (!test_bit(EFFECT_STARTED, effect->flags))
+ continue;
+
+ effect->stop_at = DELAY_CALC(effect->play_at, effect->effect.replay.length);
+
+ if (!test_bit(EFFECT_PLAYING, effect->flags))
+ play_time = effect->play_at;
+ else
+ play_time = effect->stop_at;
+
+ events++;
+
+ if (time_after(jiffies, play_time))
+ play_time = jiffies;
+
+ if (events == 1)
+ next_time = play_time;
+ else {
+ if (time_after(next_time, play_time))
+ next_time = play_time;
+ }
+ }
+
+ if (!events && tmff->effects_playing) {
+ /* Treat all effects turning off as an event */
+ events = 1;
+ next_time = jiffies;
+ }
+
+ if (!events) {
+ /* No events, no time, no need for a timer. */
+ del_timer_sync(&tmff->timer);
+ return;
+ }
+
+ mod_timer(&tmff->timer, next_time);
+}
+
+/* Changes values from 0 to 0xffff into values from minimum to maximum */
+static inline int hid_tmff_scale(unsigned int in, int minimum, int maximum)
+{
+ int ret;
+
+ ret = (in * (maximum - minimum) / 0xffff) + minimum;
+ if (ret < minimum)
+ return minimum;
+ if (ret > maximum)
+ return maximum;
+ return ret;
+}
+
+static void hid_tmff_timer(unsigned long timer_data)
+{
+ struct tmff_device *tmff = (struct tmff_device *) timer_data;
+ struct hid_device *hid = tmff->hid;
+ unsigned long flags;
+ int left = 0, right = 0; /* Rumbling */
+ int i;
+
+ spin_lock_irqsave(&tmff->lock, flags);
+
+ tmff->effects_playing = 0;
+
+ for (i = 0; i < TMFF_EFFECTS; ++i) {
+ struct tmff_effect *effect = &tmff->effects[i];
+
+ if (!test_bit(EFFECT_STARTED, effect->flags))
+ continue;
+
+ if (!time_after(jiffies, effect->play_at))
+ continue;
+
+ if (time_after(jiffies, effect->stop_at)) {
+
+ dbg("Finished playing once %d", i);
+ clear_bit(EFFECT_PLAYING, effect->flags);
+
+ if (--effect->count <= 0) {
+ dbg("Stopped %d", i);
+ clear_bit(EFFECT_STARTED, effect->flags);
+ continue;
+ } else {
+ dbg("Start again %d", i);
+ effect->play_at = DELAY_CALC(jiffies, effect->effect.replay.delay);
+ continue;
+ }
+ }
+
+ ++tmff->effects_playing;
+
+ set_bit(EFFECT_PLAYING, effect->flags);
+
+ switch (effect->effect.type) {
+ case FF_RUMBLE:
+ right += effect->effect.u.rumble.strong_magnitude;
+ left += effect->effect.u.rumble.weak_magnitude;
+ break;
+ default:
+ BUG();
+ break;
+ }
+ }
+
+ left = hid_tmff_scale(left, tmff->rumble->logical_minimum, tmff->rumble->logical_maximum);
+ right = hid_tmff_scale(right, tmff->rumble->logical_minimum, tmff->rumble->logical_maximum);
+
+ if (left != tmff->rumble->value[0] || right != tmff->rumble->value[1]) {
+ tmff->rumble->value[0] = left;
+ tmff->rumble->value[1] = right;
+ dbg("(left,right)=(%08x, %08x)", left, right);
+ hid_submit_report(hid, tmff->report, USB_DIR_OUT);
+ }
+
+ if (!test_bit(DEVICE_CLOSING, tmff->flags))
+ hid_tmff_recalculate_timer(tmff);
+
+ spin_unlock_irqrestore(&tmff->lock, flags);
+}
diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
new file mode 100644
index 000000000000..6d9329c698d9
--- /dev/null
+++ b/drivers/usb/input/hid.h
@@ -0,0 +1,510 @@
+#ifndef __HID_H
+#define __HID_H
+
+/*
+ * $Id: hid.h,v 1.24 2001/12/27 10:37:41 vojtech Exp $
+ *
+ * Copyright (c) 1999 Andreas Gal
+ * Copyright (c) 2000-2001 Vojtech Pavlik
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so either by
+ * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
+ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ */
+
+#include <linux/types.h>
+#include <linux/slab.h>
+#include <linux/list.h>
+
+/*
+ * USB HID (Human Interface Device) interface class code
+ */
+
+#define USB_INTERFACE_CLASS_HID 3
+
+/*
+ * HID class requests
+ */
+
+#define HID_REQ_GET_REPORT 0x01
+#define HID_REQ_GET_IDLE 0x02
+#define HID_REQ_GET_PROTOCOL 0x03
+#define HID_REQ_SET_REPORT 0x09
+#define HID_REQ_SET_IDLE 0x0A
+#define HID_REQ_SET_PROTOCOL 0x0B
+
+/*
+ * HID class descriptor types
+ */
+
+#define HID_DT_HID (USB_TYPE_CLASS | 0x01)
+#define HID_DT_REPORT (USB_TYPE_CLASS | 0x02)
+#define HID_DT_PHYSICAL (USB_TYPE_CLASS | 0x03)
+
+/*
+ * We parse each description item into this structure. Short items data
+ * values are expanded to 32-bit signed int, long items contain a pointer
+ * into the data area.
+ */
+
+struct hid_item {
+ unsigned format;
+ __u8 size;
+ __u8 type;
+ __u8 tag;
+ union {
+ __u8 u8;
+ __s8 s8;
+ __u16 u16;
+ __s16 s16;
+ __u32 u32;
+ __s32 s32;
+ __u8 *longdata;
+ } data;
+};
+
+/*
+ * HID report item format
+ */
+
+#define HID_ITEM_FORMAT_SHORT 0
+#define HID_ITEM_FORMAT_LONG 1
+
+/*
+ * Special tag indicating long items
+ */
+
+#define HID_ITEM_TAG_LONG 15
+
+/*
+ * HID report descriptor item type (prefix bit 2,3)
+ */
+
+#define HID_ITEM_TYPE_MAIN 0
+#define HID_ITEM_TYPE_GLOBAL 1
+#define HID_ITEM_TYPE_LOCAL 2
+#define HID_ITEM_TYPE_RESERVED 3
+
+/*
+ * HID report descriptor main item tags
+ */
+
+#define HID_MAIN_ITEM_TAG_INPUT 8
+#define HID_MAIN_ITEM_TAG_OUTPUT 9
+#define HID_MAIN_ITEM_TAG_FEATURE 11
+#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION 10
+#define HID_MAIN_ITEM_TAG_END_COLLECTION 12
+
+/*
+ * HID report descriptor main item contents
+ */
+
+#define HID_MAIN_ITEM_CONSTANT 0x001
+#define HID_MAIN_ITEM_VARIABLE 0x002
+#define HID_MAIN_ITEM_RELATIVE 0x004
+#define HID_MAIN_ITEM_WRAP 0x008
+#define HID_MAIN_ITEM_NONLINEAR 0x010
+#define HID_MAIN_ITEM_NO_PREFERRED 0x020
+#define HID_MAIN_ITEM_NULL_STATE 0x040
+#define HID_MAIN_ITEM_VOLATILE 0x080
+#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100
+
+/*
+ * HID report descriptor collection item types
+ */
+
+#define HID_COLLECTION_PHYSICAL 0
+#define HID_COLLECTION_APPLICATION 1
+#define HID_COLLECTION_LOGICAL 2
+
+/*
+ * HID report descriptor global item tags
+ */
+
+#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE 0
+#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM 1
+#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM 2
+#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM 3
+#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM 4
+#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT 5
+#define HID_GLOBAL_ITEM_TAG_UNIT 6
+#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE 7
+#define HID_GLOBAL_ITEM_TAG_REPORT_ID 8
+#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT 9
+#define HID_GLOBAL_ITEM_TAG_PUSH 10
+#define HID_GLOBAL_ITEM_TAG_POP 11
+
+/*
+ * HID report descriptor local item tags
+ */
+
+#define HID_LOCAL_ITEM_TAG_USAGE 0
+#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 1
+#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 2
+#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 3
+#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4
+#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5
+#define HID_LOCAL_ITEM_TAG_STRING_INDEX 7
+#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 8
+#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 9
+#define HID_LOCAL_ITEM_TAG_DELIMITER 10
+
+/*
+ * HID usage tables
+ */
+
+#define HID_USAGE_PAGE 0xffff0000
+
+#define HID_UP_UNDEFINED 0x00000000
+#define HID_UP_GENDESK 0x00010000
+#define HID_UP_KEYBOARD 0x00070000
+#define HID_UP_LED 0x00080000
+#define HID_UP_BUTTON 0x00090000
+#define HID_UP_ORDINAL 0x000a0000
+#define HID_UP_CONSUMER 0x000c0000
+#define HID_UP_DIGITIZER 0x000d0000
+#define HID_UP_PID 0x000f0000
+#define HID_UP_HPVENDOR 0xff7f0000
+#define HID_UP_MSVENDOR 0xff000000
+
+#define HID_USAGE 0x0000ffff
+
+#define HID_GD_POINTER 0x00010001
+#define HID_GD_MOUSE 0x00010002
+#define HID_GD_JOYSTICK 0x00010004
+#define HID_GD_GAMEPAD 0x00010005
+#define HID_GD_KEYBOARD 0x00010006
+#define HID_GD_KEYPAD 0x00010007
+#define HID_GD_MULTIAXIS 0x00010008
+#define HID_GD_X 0x00010030
+#define HID_GD_Y 0x00010031
+#define HID_GD_Z 0x00010032
+#define HID_GD_RX 0x00010033
+#define HID_GD_RY 0x00010034
+#define HID_GD_RZ 0x00010035
+#define HID_GD_SLIDER 0x00010036
+#define HID_GD_DIAL 0x00010037
+#define HID_GD_WHEEL 0x00010038
+#define HID_GD_HATSWITCH 0x00010039
+#define HID_GD_BUFFER 0x0001003a
+#define HID_GD_BYTECOUNT 0x0001003b
+#define HID_GD_MOTION 0x0001003c
+#define HID_GD_START 0x0001003d
+#define HID_GD_SELECT 0x0001003e
+#define HID_GD_VX 0x00010040
+#define HID_GD_VY 0x00010041
+#define HID_GD_VZ 0x00010042
+#define HID_GD_VBRX 0x00010043
+#define HID_GD_VBRY 0x00010044
+#define HID_GD_VBRZ 0x00010045
+#define HID_GD_VNO 0x00010046
+#define HID_GD_FEATURE 0x00010047
+#define HID_GD_UP 0x00010090
+#define HID_GD_DOWN 0x00010091
+#define HID_GD_RIGHT 0x00010092
+#define HID_GD_LEFT 0x00010093
+
+/*
+ * HID report types --- Ouch! HID spec says 1 2 3!
+ */
+
+#define HID_INPUT_REPORT 0
+#define HID_OUTPUT_REPORT 1
+#define HID_FEATURE_REPORT 2
+
+/*
+ * HID device quirks.
+ */
+
+#define HID_QUIRK_INVERT 0x001
+#define HID_QUIRK_NOTOUCH 0x002
+#define HID_QUIRK_IGNORE 0x004
+#define HID_QUIRK_NOGET 0x008
+#define HID_QUIRK_HIDDEV 0x010
+#define HID_QUIRK_BADPAD 0x020
+#define HID_QUIRK_MULTI_INPUT 0x040
+#define HID_QUIRK_2WHEEL_MOUSE_HACK_7 0x080
+#define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x100
+#define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x200
+
+/*
+ * This is the global environment of the parser. This information is
+ * persistent for main-items. The global environment can be saved and
+ * restored with PUSH/POP statements.
+ */
+
+struct hid_global {
+ unsigned usage_page;
+ __s32 logical_minimum;
+ __s32 logical_maximum;
+ __s32 physical_minimum;
+ __s32 physical_maximum;
+ __s32 unit_exponent;
+ unsigned unit;
+ unsigned report_id;
+ unsigned report_size;
+ unsigned report_count;
+};
+
+/*
+ * This is the local environment. It is persistent up the next main-item.
+ */
+
+#define HID_MAX_DESCRIPTOR_SIZE 4096
+#define HID_MAX_USAGES 1024
+#define HID_DEFAULT_NUM_COLLECTIONS 16
+
+struct hid_local {
+ unsigned usage[HID_MAX_USAGES]; /* usage array */
+ unsigned collection_index[HID_MAX_USAGES]; /* collection index array */
+ unsigned usage_index;
+ unsigned usage_minimum;
+ unsigned delimiter_depth;
+ unsigned delimiter_branch;
+};
+
+/*
+ * This is the collection stack. We climb up the stack to determine
+ * application and function of each field.
+ */
+
+struct hid_collection {
+ unsigned type;
+ unsigned usage;
+ unsigned level;
+};
+
+struct hid_usage {
+ unsigned hid; /* hid usage code */
+ unsigned collection_index; /* index into collection array */
+ /* hidinput data */
+ __u16 code; /* input driver code */
+ __u8 type; /* input driver type */
+ __s8 hat_min; /* hat switch fun */
+ __s8 hat_max; /* ditto */
+ __s8 hat_dir; /* ditto */
+};
+
+struct hid_input;
+
+struct hid_field {
+ unsigned physical; /* physical usage for this field */
+ unsigned logical; /* logical usage for this field */
+ unsigned application; /* application usage for this field */
+ struct hid_usage *usage; /* usage table for this function */
+ unsigned maxusage; /* maximum usage index */
+ unsigned flags; /* main-item flags (i.e. volatile,array,constant) */
+ unsigned report_offset; /* bit offset in the report */
+ unsigned report_size; /* size of this field in the report */
+ unsigned report_count; /* number of this field in the report */
+ unsigned report_type; /* (input,output,feature) */
+ __s32 *value; /* last known value(s) */
+ __s32 logical_minimum;
+ __s32 logical_maximum;
+ __s32 physical_minimum;
+ __s32 physical_maximum;
+ __s32 unit_exponent;
+ unsigned unit;
+ struct hid_report *report; /* associated report */
+ unsigned index; /* index into report->field[] */
+ /* hidinput data */
+ struct hid_input *hidinput; /* associated input structure */
+ __u16 dpad; /* dpad input code */
+};
+
+#define HID_MAX_FIELDS 64
+
+struct hid_report {
+ struct list_head list;
+ unsigned id; /* id of this report */
+ unsigned type; /* report type */
+ struct hid_field *field[HID_MAX_FIELDS]; /* fields of the report */
+ unsigned maxfield; /* maximum valid field index */
+ unsigned size; /* size of the report (bits) */
+ struct hid_device *device; /* associated device */
+};
+
+struct hid_report_enum {
+ unsigned numbered;
+ struct list_head report_list;
+ struct hid_report *report_id_hash[256];
+};
+
+#define HID_REPORT_TYPES 3
+
+#define HID_BUFFER_SIZE 64 /* use 64 for compatibility with all possible packetlen */
+#define HID_CONTROL_FIFO_SIZE 256 /* to init devices with >100 reports */
+#define HID_OUTPUT_FIFO_SIZE 64
+
+struct hid_control_fifo {
+ unsigned char dir;
+ struct hid_report *report;
+};
+
+#define HID_CLAIMED_INPUT 1
+#define HID_CLAIMED_HIDDEV 2
+
+#define HID_CTRL_RUNNING 1
+#define HID_OUT_RUNNING 2
+
+struct hid_input {
+ struct list_head list;
+ struct hid_report *report;
+ struct input_dev input;
+};
+
+struct hid_device { /* device report descriptor */
+ __u8 *rdesc;
+ unsigned rsize;
+ struct hid_collection *collection; /* List of HID collections */
+ unsigned collection_size; /* Number of allocated hid_collections */
+ unsigned maxcollection; /* Number of parsed collections */
+ unsigned maxapplication; /* Number of applications */
+ unsigned version; /* HID version */
+ unsigned country; /* HID country */
+ struct hid_report_enum report_enum[HID_REPORT_TYPES];
+
+ struct usb_device *dev; /* USB device */
+ struct usb_interface *intf; /* USB interface */
+ int ifnum; /* USB interface number */
+
+ unsigned long iofl; /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */
+
+ struct urb *urbin; /* Input URB */
+ char *inbuf; /* Input buffer */
+ dma_addr_t inbuf_dma; /* Input buffer dma */
+
+ struct urb *urbctrl; /* Control URB */
+ struct usb_ctrlrequest *cr; /* Control request struct */
+ dma_addr_t cr_dma; /* Control request struct dma */
+ struct hid_control_fifo ctrl[HID_CONTROL_FIFO_SIZE]; /* Control fifo */
+ unsigned char ctrlhead, ctrltail; /* Control fifo head & tail */
+ char *ctrlbuf; /* Control buffer */
+ dma_addr_t ctrlbuf_dma; /* Control buffer dma */
+ spinlock_t ctrllock; /* Control fifo spinlock */
+
+ struct urb *urbout; /* Output URB */
+ struct hid_report *out[HID_CONTROL_FIFO_SIZE]; /* Output pipe fifo */
+ unsigned char outhead, outtail; /* Output pipe fifo head & tail */
+ char *outbuf; /* Output buffer */
+ dma_addr_t outbuf_dma; /* Output buffer dma */
+ spinlock_t outlock; /* Output fifo spinlock */
+
+ unsigned claimed; /* Claimed by hidinput, hiddev? */
+ unsigned quirks; /* Various quirks the device can pull on us */
+
+ struct list_head inputs; /* The list of inputs */
+ void *hiddev; /* The hiddev structure */
+ int minor; /* Hiddev minor number */
+
+ wait_queue_head_t wait; /* For sleeping */
+
+ int open; /* is the device open by anyone? */
+ char name[128]; /* Device name */
+ char phys[64]; /* Device physical location */
+ char uniq[64]; /* Device unique identifier (serial #) */
+
+ void *ff_private; /* Private data for the force-feedback driver */
+ void (*ff_exit)(struct hid_device*); /* Called by hid_exit_ff(hid) */
+ int (*ff_event)(struct hid_device *hid, struct input_dev *input,
+ unsigned int type, unsigned int code, int value);
+};
+
+#define HID_GLOBAL_STACK_SIZE 4
+#define HID_COLLECTION_STACK_SIZE 4
+
+struct hid_parser {
+ struct hid_global global;
+ struct hid_global global_stack[HID_GLOBAL_STACK_SIZE];
+ unsigned global_stack_ptr;
+ struct hid_local local;
+ unsigned collection_stack[HID_COLLECTION_STACK_SIZE];
+ unsigned collection_stack_ptr;
+ struct hid_device *device;
+};
+
+struct hid_class_descriptor {
+ __u8 bDescriptorType;
+ __u16 wDescriptorLength;
+} __attribute__ ((packed));
+
+struct hid_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u16 bcdHID;
+ __u8 bCountryCode;
+ __u8 bNumDescriptors;
+
+ struct hid_class_descriptor desc[1];
+} __attribute__ ((packed));
+
+#ifdef DEBUG
+#include "hid-debug.h"
+#else
+#define hid_dump_input(a,b) do { } while (0)
+#define hid_dump_device(c) do { } while (0)
+#define hid_dump_field(a,b) do { } while (0)
+#define resolv_usage(a) do { } while (0)
+#define resolv_event(a,b) do { } while (0)
+#endif
+
+#endif
+
+#ifdef CONFIG_USB_HIDINPUT
+/* Applications from HID Usage Tables 4/8/99 Version 1.1 */
+/* We ignore a few input applications that are not widely used */
+#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, struct pt_regs *regs);
+extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report);
+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, struct pt_regs *regs) { }
+static inline void hidinput_report_event(struct hid_device *hid, struct hid_report *report) { }
+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 *);
+int hid_set_field(struct hid_field *, unsigned, __s32);
+void hid_submit_report(struct hid_device *, struct hid_report *, unsigned char dir);
+void hid_init_reports(struct hid_device *hid);
+struct hid_field *hid_find_field_by_usage(struct hid_device *hid, __u32 wanted_usage, int type);
+int hid_wait_io(struct hid_device* hid);
+
+
+#ifdef CONFIG_HID_FF
+int hid_ff_init(struct hid_device *hid);
+#else
+static inline int hid_ff_init(struct hid_device *hid) { return -1; }
+#endif
+static inline void hid_ff_exit(struct hid_device *hid)
+{
+ if (hid->ff_exit)
+ hid->ff_exit(hid);
+}
+static inline int hid_ff_event(struct hid_device *hid, struct input_dev *input,
+ unsigned int type, unsigned int code, int value)
+{
+ if (hid->ff_event)
+ return hid->ff_event(hid, input, type, code, value);
+ return -ENOSYS;
+}
diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c
new file mode 100644
index 000000000000..96b7c9067951
--- /dev/null
+++ b/drivers/usb/input/hiddev.c
@@ -0,0 +1,844 @@
+/*
+ * Copyright (c) 2001 Paul Stewart
+ * Copyright (c) 2001 Vojtech Pavlik
+ *
+ * HID char devices, giving access to raw HID device events.
+ *
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so either by
+ * e-mail - mail your message to Paul Stewart <stewart@wetlogic.net>
+ */
+
+#include <linux/config.h>
+#include <linux/poll.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/smp_lock.h>
+#include <linux/input.h>
+#include <linux/usb.h>
+#include "hid.h"
+#include <linux/hiddev.h>
+#include <linux/devfs_fs_kernel.h>
+
+#ifdef CONFIG_USB_DYNAMIC_MINORS
+#define HIDDEV_MINOR_BASE 0
+#define HIDDEV_MINORS 256
+#else
+#define HIDDEV_MINOR_BASE 96
+#define HIDDEV_MINORS 16
+#endif
+#define HIDDEV_BUFFER_SIZE 64
+
+struct hiddev {
+ int exist;
+ int open;
+ wait_queue_head_t wait;
+ struct hid_device *hid;
+ struct hiddev_list *list;
+};
+
+struct hiddev_list {
+ struct hiddev_usage_ref buffer[HIDDEV_BUFFER_SIZE];
+ int head;
+ int tail;
+ unsigned flags;
+ struct fasync_struct *fasync;
+ struct hiddev *hiddev;
+ struct hiddev_list *next;
+};
+
+static struct hiddev *hiddev_table[HIDDEV_MINORS];
+
+/*
+ * Find a report, given the report's type and ID. The ID can be specified
+ * indirectly by REPORT_ID_FIRST (which returns the first report of the given
+ * type) or by (REPORT_ID_NEXT | old_id), which returns the next report of the
+ * given type which follows old_id.
+ */
+static struct hid_report *
+hiddev_lookup_report(struct hid_device *hid, struct hiddev_report_info *rinfo)
+{
+ unsigned flags = rinfo->report_id & ~HID_REPORT_ID_MASK;
+ struct hid_report_enum *report_enum;
+ struct list_head *list;
+
+ if (rinfo->report_type < HID_REPORT_TYPE_MIN ||
+ rinfo->report_type > HID_REPORT_TYPE_MAX) return NULL;
+
+ report_enum = hid->report_enum +
+ (rinfo->report_type - HID_REPORT_TYPE_MIN);
+
+ switch (flags) {
+ case 0: /* Nothing to do -- report_id is already set correctly */
+ break;
+
+ case HID_REPORT_ID_FIRST:
+ list = report_enum->report_list.next;
+ if (list == &report_enum->report_list)
+ return NULL;
+ rinfo->report_id = ((struct hid_report *) list)->id;
+ break;
+
+ case HID_REPORT_ID_NEXT:
+ list = (struct list_head *)
+ report_enum->report_id_hash[rinfo->report_id & HID_REPORT_ID_MASK];
+ if (list == NULL)
+ return NULL;
+ list = list->next;
+ if (list == &report_enum->report_list)
+ return NULL;
+ rinfo->report_id = ((struct hid_report *) list)->id;
+ break;
+
+ default:
+ return NULL;
+ }
+
+ return report_enum->report_id_hash[rinfo->report_id];
+}
+
+/*
+ * Perform an exhaustive search of the report table for a usage, given its
+ * type and usage id.
+ */
+static struct hid_field *
+hiddev_lookup_usage(struct hid_device *hid, struct hiddev_usage_ref *uref)
+{
+ int i, j;
+ struct hid_report *report;
+ struct hid_report_enum *report_enum;
+ struct hid_field *field;
+
+ if (uref->report_type < HID_REPORT_TYPE_MIN ||
+ uref->report_type > HID_REPORT_TYPE_MAX) return NULL;
+
+ report_enum = hid->report_enum +
+ (uref->report_type - HID_REPORT_TYPE_MIN);
+
+ list_for_each_entry(report, &report_enum->report_list, list)
+ for (i = 0; i < report->maxfield; i++) {
+ field = report->field[i];
+ for (j = 0; j < field->maxusage; j++) {
+ if (field->usage[j].hid == uref->usage_code) {
+ uref->report_id = report->id;
+ uref->field_index = i;
+ uref->usage_index = j;
+ return field;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+static void hiddev_send_event(struct hid_device *hid,
+ struct hiddev_usage_ref *uref)
+{
+ struct hiddev *hiddev = hid->hiddev;
+ struct hiddev_list *list = hiddev->list;
+
+ while (list) {
+ if (uref->field_index != HID_FIELD_INDEX_NONE ||
+ (list->flags & HIDDEV_FLAG_REPORT) != 0) {
+ list->buffer[list->head] = *uref;
+ list->head = (list->head + 1) &
+ (HIDDEV_BUFFER_SIZE - 1);
+ kill_fasync(&list->fasync, SIGIO, POLL_IN);
+ }
+
+ list = list->next;
+ }
+
+ wake_up_interruptible(&hiddev->wait);
+}
+
+/*
+ * This is where hid.c calls into hiddev to pass an event that occurred over
+ * the interrupt pipe
+ */
+void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
+ struct hid_usage *usage, __s32 value, struct pt_regs *regs)
+{
+ unsigned type = field->report_type;
+ struct hiddev_usage_ref uref;
+
+ uref.report_type =
+ (type == HID_INPUT_REPORT) ? HID_REPORT_TYPE_INPUT :
+ ((type == HID_OUTPUT_REPORT) ? HID_REPORT_TYPE_OUTPUT :
+ ((type == HID_FEATURE_REPORT) ? HID_REPORT_TYPE_FEATURE:0));
+ uref.report_id = field->report->id;
+ uref.field_index = field->index;
+ uref.usage_index = (usage - field->usage);
+ uref.usage_code = usage->hid;
+ uref.value = value;
+
+ hiddev_send_event(hid, &uref);
+}
+
+
+void hiddev_report_event(struct hid_device *hid, struct hid_report *report)
+{
+ unsigned type = report->type;
+ struct hiddev_usage_ref uref;
+
+ memset(&uref, 0, sizeof(uref));
+ uref.report_type =
+ (type == HID_INPUT_REPORT) ? HID_REPORT_TYPE_INPUT :
+ ((type == HID_OUTPUT_REPORT) ? HID_REPORT_TYPE_OUTPUT :
+ ((type == HID_FEATURE_REPORT) ? HID_REPORT_TYPE_FEATURE:0));
+ uref.report_id = report->id;
+ uref.field_index = HID_FIELD_INDEX_NONE;
+
+ hiddev_send_event(hid, &uref);
+}
+/*
+ * fasync file op
+ */
+static int hiddev_fasync(int fd, struct file *file, int on)
+{
+ int retval;
+ struct hiddev_list *list = file->private_data;
+ retval = fasync_helper(fd, file, on, &list->fasync);
+ return retval < 0 ? retval : 0;
+}
+
+
+/*
+ * release file op
+ */
+static int hiddev_release(struct inode * inode, struct file * file)
+{
+ struct hiddev_list *list = file->private_data;
+ struct hiddev_list **listptr;
+
+ listptr = &list->hiddev->list;
+ hiddev_fasync(-1, file, 0);
+
+ while (*listptr && (*listptr != list))
+ listptr = &((*listptr)->next);
+ *listptr = (*listptr)->next;
+
+ if (!--list->hiddev->open) {
+ if (list->hiddev->exist)
+ hid_close(list->hiddev->hid);
+ else
+ kfree(list->hiddev);
+ }
+
+ kfree(list);
+
+ return 0;
+}
+
+/*
+ * open file op
+ */
+static int hiddev_open(struct inode * inode, struct file * file) {
+ struct hiddev_list *list;
+
+ int i = iminor(inode) - HIDDEV_MINOR_BASE;
+
+ if (i >= HIDDEV_MINORS || !hiddev_table[i])
+ return -ENODEV;
+
+ if (!(list = kmalloc(sizeof(struct hiddev_list), GFP_KERNEL)))
+ return -ENOMEM;
+ memset(list, 0, sizeof(struct hiddev_list));
+
+ list->hiddev = hiddev_table[i];
+ list->next = hiddev_table[i]->list;
+ hiddev_table[i]->list = list;
+
+ file->private_data = list;
+
+ if (!list->hiddev->open++)
+ if (list->hiddev->exist)
+ hid_open(hiddev_table[i]->hid);
+
+ return 0;
+}
+
+/*
+ * "write" file op
+ */
+static ssize_t hiddev_write(struct file * file, const char __user * buffer, size_t count, loff_t *ppos)
+{
+ return -EINVAL;
+}
+
+/*
+ * "read" file op
+ */
+static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t count, loff_t *ppos)
+{
+ DECLARE_WAITQUEUE(wait, current);
+ struct hiddev_list *list = file->private_data;
+ int event_size;
+ int retval = 0;
+
+ event_size = ((list->flags & HIDDEV_FLAG_UREF) != 0) ?
+ sizeof(struct hiddev_usage_ref) : sizeof(struct hiddev_event);
+
+ if (count < event_size)
+ return 0;
+
+ while (retval == 0) {
+ if (list->head == list->tail) {
+ add_wait_queue(&list->hiddev->wait, &wait);
+ set_current_state(TASK_INTERRUPTIBLE);
+
+ while (list->head == list->tail) {
+ if (file->f_flags & O_NONBLOCK) {
+ retval = -EAGAIN;
+ break;
+ }
+ if (signal_pending(current)) {
+ retval = -ERESTARTSYS;
+ break;
+ }
+ if (!list->hiddev->exist) {
+ retval = -EIO;
+ break;
+ }
+
+ schedule();
+ }
+
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&list->hiddev->wait, &wait);
+ }
+
+ if (retval)
+ return retval;
+
+
+ while (list->head != list->tail &&
+ retval + event_size <= count) {
+ if ((list->flags & HIDDEV_FLAG_UREF) == 0) {
+ if (list->buffer[list->tail].field_index !=
+ HID_FIELD_INDEX_NONE) {
+ struct hiddev_event event;
+ event.hid = list->buffer[list->tail].usage_code;
+ event.value = list->buffer[list->tail].value;
+ if (copy_to_user(buffer + retval, &event, sizeof(struct hiddev_event)))
+ return -EFAULT;
+ retval += sizeof(struct hiddev_event);
+ }
+ } else {
+ if (list->buffer[list->tail].field_index != HID_FIELD_INDEX_NONE ||
+ (list->flags & HIDDEV_FLAG_REPORT) != 0) {
+ if (copy_to_user(buffer + retval, list->buffer + list->tail, sizeof(struct hiddev_usage_ref)))
+ return -EFAULT;
+ retval += sizeof(struct hiddev_usage_ref);
+ }
+ }
+ list->tail = (list->tail + 1) & (HIDDEV_BUFFER_SIZE - 1);
+ }
+
+ }
+
+ return retval;
+}
+
+/*
+ * "poll" file op
+ * No kernel lock - fine
+ */
+static unsigned int hiddev_poll(struct file *file, poll_table *wait)
+{
+ struct hiddev_list *list = file->private_data;
+ poll_wait(file, &list->hiddev->wait, wait);
+ if (list->head != list->tail)
+ return POLLIN | POLLRDNORM;
+ if (!list->hiddev->exist)
+ return POLLERR | POLLHUP;
+ return 0;
+}
+
+/*
+ * "ioctl" file op
+ */
+static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct hiddev_list *list = file->private_data;
+ struct hiddev *hiddev = list->hiddev;
+ struct hid_device *hid = hiddev->hid;
+ struct usb_device *dev = hid->dev;
+ struct hiddev_collection_info cinfo;
+ struct hiddev_report_info rinfo;
+ struct hiddev_field_info finfo;
+ struct hiddev_usage_ref_multi *uref_multi=NULL;
+ struct hiddev_usage_ref *uref;
+ struct hiddev_devinfo dinfo;
+ struct hid_report *report;
+ struct hid_field *field;
+ void __user *user_arg = (void __user *)arg;
+ int i;
+
+ if (!hiddev->exist)
+ return -EIO;
+
+ switch (cmd) {
+
+ case HIDIOCGVERSION:
+ return put_user(HID_VERSION, (int __user *)arg);
+
+ case HIDIOCAPPLICATION:
+ if (arg < 0 || arg >= hid->maxapplication)
+ return -EINVAL;
+
+ for (i = 0; i < hid->maxcollection; i++)
+ if (hid->collection[i].type ==
+ HID_COLLECTION_APPLICATION && arg-- == 0)
+ break;
+
+ if (i == hid->maxcollection)
+ return -EINVAL;
+
+ return hid->collection[i].usage;
+
+ case HIDIOCGDEVINFO:
+ dinfo.bustype = BUS_USB;
+ dinfo.busnum = dev->bus->busnum;
+ dinfo.devnum = dev->devnum;
+ dinfo.ifnum = hid->ifnum;
+ dinfo.vendor = le16_to_cpu(dev->descriptor.idVendor);
+ dinfo.product = le16_to_cpu(dev->descriptor.idProduct);
+ dinfo.version = le16_to_cpu(dev->descriptor.bcdDevice);
+ dinfo.num_applications = hid->maxapplication;
+ if (copy_to_user(user_arg, &dinfo, sizeof(dinfo)))
+ return -EFAULT;
+
+ return 0;
+
+ case HIDIOCGFLAG:
+ if (put_user(list->flags, (int __user *)arg))
+ return -EFAULT;
+
+ return 0;
+
+ case HIDIOCSFLAG:
+ {
+ int newflags;
+ if (get_user(newflags, (int __user *)arg))
+ return -EFAULT;
+
+ if ((newflags & ~HIDDEV_FLAGS) != 0 ||
+ ((newflags & HIDDEV_FLAG_REPORT) != 0 &&
+ (newflags & HIDDEV_FLAG_UREF) == 0))
+ return -EINVAL;
+
+ list->flags = newflags;
+
+ return 0;
+ }
+
+ case HIDIOCGSTRING:
+ {
+ int idx, len;
+ char *buf;
+
+ if (get_user(idx, (int __user *)arg))
+ return -EFAULT;
+
+ if ((buf = kmalloc(HID_STRING_SIZE, GFP_KERNEL)) == NULL)
+ return -ENOMEM;
+
+ if ((len = usb_string(dev, idx, buf, HID_STRING_SIZE-1)) < 0) {
+ kfree(buf);
+ return -EINVAL;
+ }
+
+ if (copy_to_user(user_arg+sizeof(int), buf, len+1)) {
+ kfree(buf);
+ return -EFAULT;
+ }
+
+ kfree(buf);
+
+ return len;
+ }
+
+ case HIDIOCINITREPORT:
+ hid_init_reports(hid);
+
+ return 0;
+
+ case HIDIOCGREPORT:
+ if (copy_from_user(&rinfo, user_arg, sizeof(rinfo)))
+ return -EFAULT;
+
+ if (rinfo.report_type == HID_REPORT_TYPE_OUTPUT)
+ return -EINVAL;
+
+ if ((report = hiddev_lookup_report(hid, &rinfo)) == NULL)
+ return -EINVAL;
+
+ hid_submit_report(hid, report, USB_DIR_IN);
+ hid_wait_io(hid);
+
+ return 0;
+
+ case HIDIOCSREPORT:
+ if (copy_from_user(&rinfo, user_arg, sizeof(rinfo)))
+ return -EFAULT;
+
+ if (rinfo.report_type == HID_REPORT_TYPE_INPUT)
+ return -EINVAL;
+
+ if ((report = hiddev_lookup_report(hid, &rinfo)) == NULL)
+ return -EINVAL;
+
+ hid_submit_report(hid, report, USB_DIR_OUT);
+
+ return 0;
+
+ case HIDIOCGREPORTINFO:
+ if (copy_from_user(&rinfo, user_arg, sizeof(rinfo)))
+ return -EFAULT;
+
+ if ((report = hiddev_lookup_report(hid, &rinfo)) == NULL)
+ return -EINVAL;
+
+ rinfo.num_fields = report->maxfield;
+
+ if (copy_to_user(user_arg, &rinfo, sizeof(rinfo)))
+ return -EFAULT;
+
+ return 0;
+
+ case HIDIOCGFIELDINFO:
+ if (copy_from_user(&finfo, user_arg, sizeof(finfo)))
+ return -EFAULT;
+ rinfo.report_type = finfo.report_type;
+ rinfo.report_id = finfo.report_id;
+ if ((report = hiddev_lookup_report(hid, &rinfo)) == NULL)
+ return -EINVAL;
+
+ if (finfo.field_index >= report->maxfield)
+ return -EINVAL;
+
+ field = report->field[finfo.field_index];
+ memset(&finfo, 0, sizeof(finfo));
+ finfo.report_type = rinfo.report_type;
+ finfo.report_id = rinfo.report_id;
+ finfo.field_index = field->report_count - 1;
+ finfo.maxusage = field->maxusage;
+ finfo.flags = field->flags;
+ finfo.physical = field->physical;
+ finfo.logical = field->logical;
+ finfo.application = field->application;
+ finfo.logical_minimum = field->logical_minimum;
+ finfo.logical_maximum = field->logical_maximum;
+ finfo.physical_minimum = field->physical_minimum;
+ finfo.physical_maximum = field->physical_maximum;
+ finfo.unit_exponent = field->unit_exponent;
+ finfo.unit = field->unit;
+
+ if (copy_to_user(user_arg, &finfo, sizeof(finfo)))
+ return -EFAULT;
+
+ return 0;
+
+ case HIDIOCGUCODE:
+ uref_multi = kmalloc(sizeof(struct hiddev_usage_ref_multi), GFP_KERNEL);
+ if (!uref_multi)
+ return -ENOMEM;
+ uref = &uref_multi->uref;
+ if (copy_from_user(uref, user_arg, sizeof(*uref)))
+ goto fault;
+
+ rinfo.report_type = uref->report_type;
+ rinfo.report_id = uref->report_id;
+ if ((report = hiddev_lookup_report(hid, &rinfo)) == NULL)
+ goto inval;
+
+ if (uref->field_index >= report->maxfield)
+ goto inval;
+
+ field = report->field[uref->field_index];
+ if (uref->usage_index >= field->maxusage)
+ goto inval;
+
+ uref->usage_code = field->usage[uref->usage_index].hid;
+
+ if (copy_to_user(user_arg, uref, sizeof(*uref)))
+ goto fault;
+
+ kfree(uref_multi);
+ return 0;
+
+ case HIDIOCGUSAGE:
+ case HIDIOCSUSAGE:
+ case HIDIOCGUSAGES:
+ case HIDIOCSUSAGES:
+ case HIDIOCGCOLLECTIONINDEX:
+ uref_multi = kmalloc(sizeof(struct hiddev_usage_ref_multi), GFP_KERNEL);
+ if (!uref_multi)
+ return -ENOMEM;
+ uref = &uref_multi->uref;
+ if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) {
+ if (copy_from_user(uref_multi, user_arg,
+ sizeof(*uref_multi)))
+ goto fault;
+ } else {
+ if (copy_from_user(uref, user_arg, sizeof(*uref)))
+ goto fault;
+ }
+
+ if (cmd != HIDIOCGUSAGE &&
+ cmd != HIDIOCGUSAGES &&
+ uref->report_type == HID_REPORT_TYPE_INPUT)
+ goto inval;
+
+ if (uref->report_id == HID_REPORT_ID_UNKNOWN) {
+ field = hiddev_lookup_usage(hid, uref);
+ if (field == NULL)
+ goto inval;
+ } else {
+ rinfo.report_type = uref->report_type;
+ rinfo.report_id = uref->report_id;
+ if ((report = hiddev_lookup_report(hid, &rinfo)) == NULL)
+ goto inval;
+
+ if (uref->field_index >= report->maxfield)
+ goto inval;
+
+ field = report->field[uref->field_index];
+
+ if (cmd == HIDIOCGCOLLECTIONINDEX) {
+ if (uref->usage_index >= field->maxusage)
+ goto inval;
+ } else if (uref->usage_index >= field->report_count)
+ goto inval;
+
+ else if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) &&
+ (uref_multi->num_values > HID_MAX_MULTI_USAGES ||
+ uref->usage_index + uref_multi->num_values >= field->report_count))
+ goto inval;
+ }
+
+ switch (cmd) {
+ case HIDIOCGUSAGE:
+ uref->value = field->value[uref->usage_index];
+ if (copy_to_user(user_arg, uref, sizeof(*uref)))
+ goto fault;
+ goto goodreturn;
+
+ case HIDIOCSUSAGE:
+ field->value[uref->usage_index] = uref->value;
+ goto goodreturn;
+
+ case HIDIOCGCOLLECTIONINDEX:
+ kfree(uref_multi);
+ return field->usage[uref->usage_index].collection_index;
+ case HIDIOCGUSAGES:
+ for (i = 0; i < uref_multi->num_values; i++)
+ uref_multi->values[i] =
+ field->value[uref->usage_index + i];
+ if (copy_to_user(user_arg, uref_multi,
+ sizeof(*uref_multi)))
+ goto fault;
+ goto goodreturn;
+ case HIDIOCSUSAGES:
+ for (i = 0; i < uref_multi->num_values; i++)
+ field->value[uref->usage_index + i] =
+ uref_multi->values[i];
+ goto goodreturn;
+ }
+
+goodreturn:
+ kfree(uref_multi);
+ return 0;
+fault:
+ kfree(uref_multi);
+ return -EFAULT;
+inval:
+ kfree(uref_multi);
+ return -EINVAL;
+
+ case HIDIOCGCOLLECTIONINFO:
+ if (copy_from_user(&cinfo, user_arg, sizeof(cinfo)))
+ return -EFAULT;
+
+ if (cinfo.index >= hid->maxcollection)
+ return -EINVAL;
+
+ cinfo.type = hid->collection[cinfo.index].type;
+ cinfo.usage = hid->collection[cinfo.index].usage;
+ cinfo.level = hid->collection[cinfo.index].level;
+
+ if (copy_to_user(user_arg, &cinfo, sizeof(cinfo)))
+ return -EFAULT;
+ return 0;
+
+ default:
+
+ if (_IOC_TYPE(cmd) != 'H' || _IOC_DIR(cmd) != _IOC_READ)
+ return -EINVAL;
+
+ if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGNAME(0))) {
+ int len;
+ if (!hid->name)
+ return 0;
+ len = strlen(hid->name) + 1;
+ if (len > _IOC_SIZE(cmd))
+ len = _IOC_SIZE(cmd);
+ return copy_to_user(user_arg, hid->name, len) ?
+ -EFAULT : len;
+ }
+
+ if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGPHYS(0))) {
+ int len;
+ if (!hid->phys)
+ return 0;
+ len = strlen(hid->phys) + 1;
+ if (len > _IOC_SIZE(cmd))
+ len = _IOC_SIZE(cmd);
+ return copy_to_user(user_arg, hid->phys, len) ?
+ -EFAULT : len;
+ }
+ }
+ return -EINVAL;
+}
+
+static struct file_operations hiddev_fops = {
+ .owner = THIS_MODULE,
+ .read = hiddev_read,
+ .write = hiddev_write,
+ .poll = hiddev_poll,
+ .open = hiddev_open,
+ .release = hiddev_release,
+ .ioctl = hiddev_ioctl,
+ .fasync = hiddev_fasync,
+};
+
+static struct usb_class_driver hiddev_class = {
+ .name = "usb/hid/hiddev%d",
+ .fops = &hiddev_fops,
+ .mode = S_IFCHR | S_IRUGO | S_IWUSR,
+ .minor_base = HIDDEV_MINOR_BASE,
+};
+
+/*
+ * This is where hid.c calls us to connect a hid device to the hiddev driver
+ */
+int hiddev_connect(struct hid_device *hid)
+{
+ struct hiddev *hiddev;
+ int i;
+ int retval;
+
+ for (i = 0; i < hid->maxcollection; i++)
+ if (hid->collection[i].type ==
+ HID_COLLECTION_APPLICATION &&
+ !IS_INPUT_APPLICATION(hid->collection[i].usage))
+ break;
+
+ if (i == hid->maxcollection && (hid->quirks & HID_QUIRK_HIDDEV) == 0)
+ return -1;
+
+ if (!(hiddev = kmalloc(sizeof(struct hiddev), GFP_KERNEL)))
+ return -1;
+ memset(hiddev, 0, sizeof(struct hiddev));
+
+ retval = usb_register_dev(hid->intf, &hiddev_class);
+ if (retval) {
+ err("Not able to get a minor for this device.");
+ kfree(hiddev);
+ return -1;
+ }
+
+ init_waitqueue_head(&hiddev->wait);
+
+ hiddev_table[hid->intf->minor - HIDDEV_MINOR_BASE] = hiddev;
+
+ hiddev->hid = hid;
+ hiddev->exist = 1;
+
+ hid->minor = hid->intf->minor;
+ hid->hiddev = hiddev;
+
+ return 0;
+}
+
+/*
+ * This is where hid.c calls us to disconnect a hiddev device from the
+ * corresponding hid device (usually because the usb device has disconnected)
+ */
+static struct usb_class_driver hiddev_class;
+void hiddev_disconnect(struct hid_device *hid)
+{
+ struct hiddev *hiddev = hid->hiddev;
+
+ hiddev->exist = 0;
+
+ hiddev_table[hiddev->hid->minor - HIDDEV_MINOR_BASE] = NULL;
+ usb_deregister_dev(hiddev->hid->intf, &hiddev_class);
+
+ if (hiddev->open) {
+ hid_close(hiddev->hid);
+ wake_up_interruptible(&hiddev->wait);
+ } else {
+ kfree(hiddev);
+ }
+}
+
+/* Currently this driver is a USB driver. It's not a conventional one in
+ * the sense that it doesn't probe at the USB level. Instead it waits to
+ * be connected by HID through the hiddev_connect / hiddev_disconnect
+ * routines. The reason to register as a USB device is to gain part of the
+ * minor number space from the USB major.
+ *
+ * In theory, should the HID code be generalized to more than one physical
+ * medium (say, IEEE 1384), this driver will probably need to register its
+ * own major number, and in doing so, no longer need to register with USB.
+ * At that point the probe routine and hiddev_driver struct below will no
+ * longer be useful.
+ */
+
+
+/* We never attach in this manner, and rely on HID to connect us. This
+ * is why there is no disconnect routine defined in the usb_driver either.
+ */
+static int hiddev_usbd_probe(struct usb_interface *intf,
+ const struct usb_device_id *hiddev_info)
+{
+ return -ENODEV;
+}
+
+
+static /* const */ struct usb_driver hiddev_driver = {
+ .owner = THIS_MODULE,
+ .name = "hiddev",
+ .probe = hiddev_usbd_probe,
+};
+
+int __init hiddev_init(void)
+{
+ devfs_mk_dir("usb/hid");
+ return usb_register(&hiddev_driver);
+}
+
+void hiddev_exit(void)
+{
+ usb_deregister(&hiddev_driver);
+ devfs_remove("usb/hid");
+}
diff --git a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c
new file mode 100644
index 000000000000..a68c5b4e7b37
--- /dev/null
+++ b/drivers/usb/input/kbtab.c
@@ -0,0 +1,241 @@
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/input.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+#include <asm/unaligned.h>
+#include <asm/byteorder.h>
+
+/*
+ * Version Information
+ * v0.0.1 - Original, extremely basic version, 2.4.xx only
+ * v0.0.2 - Updated, works with 2.5.62 and 2.4.20;
+ * - added pressure-threshold modules param code from
+ * Alex Perry <alex.perry@ieee.org>
+ */
+
+#define DRIVER_VERSION "v0.0.2"
+#define DRIVER_AUTHOR "Josh Myer <josh@joshisanerd.com>"
+#define DRIVER_DESC "USB KB Gear JamStudio Tablet driver"
+#define DRIVER_LICENSE "GPL"
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE(DRIVER_LICENSE);
+
+#define USB_VENDOR_ID_KBGEAR 0x084e
+
+static int kb_pressure_click = 0x10;
+module_param(kb_pressure_click, int, 0);
+MODULE_PARM_DESC(kb_pressure_click, "pressure threshold for clicks");
+
+struct kbtab {
+ signed char *data;
+ dma_addr_t data_dma;
+ struct input_dev dev;
+ struct usb_device *usbdev;
+ struct urb *irq;
+ int open;
+ int x, y;
+ int button;
+ int pressure;
+ __u32 serial[2];
+ char phys[32];
+};
+
+static void kbtab_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct kbtab *kbtab = urb->context;
+ unsigned char *data = kbtab->data;
+ struct input_dev *dev = &kbtab->dev;
+ int retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ kbtab->x = le16_to_cpu(get_unaligned((__le16 *) &data[1]));
+ kbtab->y = le16_to_cpu(get_unaligned((__le16 *) &data[3]));
+
+ kbtab->pressure = (data[5]);
+
+ input_report_key(dev, BTN_TOOL_PEN, 1);
+
+ input_report_abs(dev, ABS_X, kbtab->x);
+ input_report_abs(dev, ABS_Y, kbtab->y);
+
+ /*input_report_key(dev, BTN_TOUCH , data[0] & 0x01);*/
+ input_report_key(dev, BTN_RIGHT, data[0] & 0x02);
+
+ if( -1 == kb_pressure_click){
+ input_report_abs(dev, ABS_PRESSURE, kbtab->pressure);
+ } else {
+ input_report_key(dev, BTN_LEFT, (kbtab->pressure > kb_pressure_click) ? 1 : 0);
+ };
+
+ input_sync(dev);
+
+ exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+static struct usb_device_id kbtab_ids[] = {
+ { USB_DEVICE(USB_VENDOR_ID_KBGEAR, 0x1001), .driver_info = 0 },
+ { }
+};
+
+MODULE_DEVICE_TABLE(usb, kbtab_ids);
+
+static int kbtab_open(struct input_dev *dev)
+{
+ struct kbtab *kbtab = dev->private;
+
+ if (kbtab->open++)
+ return 0;
+
+ kbtab->irq->dev = kbtab->usbdev;
+ if (usb_submit_urb(kbtab->irq, GFP_KERNEL)) {
+ kbtab->open--;
+ return -EIO;
+ }
+
+ return 0;
+}
+
+static void kbtab_close(struct input_dev *dev)
+{
+ struct kbtab *kbtab = dev->private;
+
+ if (!--kbtab->open)
+ usb_kill_urb(kbtab->irq);
+}
+
+static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct usb_endpoint_descriptor *endpoint;
+ struct kbtab *kbtab;
+ char path[64];
+
+ if (!(kbtab = kmalloc(sizeof(struct kbtab), GFP_KERNEL)))
+ return -ENOMEM;
+ memset(kbtab, 0, sizeof(struct kbtab));
+
+ kbtab->data = usb_buffer_alloc(dev, 8, GFP_KERNEL, &kbtab->data_dma);
+ if (!kbtab->data) {
+ kfree(kbtab);
+ return -ENOMEM;
+ }
+
+ kbtab->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!kbtab->irq) {
+ usb_buffer_free(dev, 10, kbtab->data, kbtab->data_dma);
+ kfree(kbtab);
+ return -ENOMEM;
+ }
+
+ kbtab->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC);
+ kbtab->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
+
+ kbtab->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+
+ kbtab->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH);
+
+ kbtab->dev.mscbit[0] |= BIT(MSC_SERIAL);
+
+ kbtab->dev.absmax[ABS_X] = 0x2000;
+ kbtab->dev.absmax[ABS_Y] = 0x1750;
+ kbtab->dev.absmax[ABS_PRESSURE] = 0xff;
+
+ kbtab->dev.absfuzz[ABS_X] = 4;
+ kbtab->dev.absfuzz[ABS_Y] = 4;
+
+ kbtab->dev.private = kbtab;
+ kbtab->dev.open = kbtab_open;
+ kbtab->dev.close = kbtab_close;
+
+ usb_make_path(dev, path, 64);
+ sprintf(kbtab->phys, "%s/input0", path);
+
+ kbtab->dev.name = "KB Gear Tablet";
+ kbtab->dev.phys = kbtab->phys;
+ kbtab->dev.id.bustype = BUS_USB;
+ kbtab->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+ kbtab->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
+ kbtab->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
+ kbtab->dev.dev = &intf->dev;
+ kbtab->usbdev = dev;
+
+ endpoint = &intf->cur_altsetting->endpoint[0].desc;
+
+ usb_fill_int_urb(kbtab->irq, dev,
+ usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+ kbtab->data, 8,
+ kbtab_irq, kbtab, endpoint->bInterval);
+ kbtab->irq->transfer_dma = kbtab->data_dma;
+ kbtab->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ input_register_device(&kbtab->dev);
+
+ printk(KERN_INFO "input: KB Gear Tablet on %s\n", path);
+
+ usb_set_intfdata(intf, kbtab);
+
+ return 0;
+}
+
+static void kbtab_disconnect(struct usb_interface *intf)
+{
+ struct kbtab *kbtab = usb_get_intfdata (intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (kbtab) {
+ usb_kill_urb(kbtab->irq);
+ input_unregister_device(&kbtab->dev);
+ usb_free_urb(kbtab->irq);
+ usb_buffer_free(interface_to_usbdev(intf), 10, kbtab->data, kbtab->data_dma);
+ kfree(kbtab);
+ }
+}
+
+static struct usb_driver kbtab_driver = {
+ .owner = THIS_MODULE,
+ .name = "kbtab",
+ .probe = kbtab_probe,
+ .disconnect = kbtab_disconnect,
+ .id_table = kbtab_ids,
+};
+
+static int __init kbtab_init(void)
+{
+ int retval;
+ retval = usb_register(&kbtab_driver);
+ if (retval)
+ goto out;
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+out:
+ return retval;
+}
+
+static void __exit kbtab_exit(void)
+{
+ usb_deregister(&kbtab_driver);
+}
+
+module_init(kbtab_init);
+module_exit(kbtab_exit);
diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c
new file mode 100644
index 000000000000..6b45a66d58c1
--- /dev/null
+++ b/drivers/usb/input/mtouchusb.c
@@ -0,0 +1,367 @@
+/******************************************************************************
+ * mtouchusb.c -- Driver for Microtouch (Now 3M) USB Touchscreens
+ *
+ * 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.
+ *
+ * Based upon original work by Radoslaw Garbacz (usb-support@ite.pl)
+ * (http://freshmeat.net/projects/3mtouchscreendriver)
+ *
+ * History
+ *
+ * 0.3 & 0.4 2002 (TEJ) tejohnson@yahoo.com
+ * Updated to 2.4.18, then 2.4.19
+ * Old version still relied on stealing a minor
+ *
+ * 0.5 02/26/2004 (TEJ) tejohnson@yahoo.com
+ * Complete rewrite using Linux Input in 2.6.3
+ * Unfortunately no calibration support at this time
+ *
+ * 1.4 04/25/2004 (TEJ) tejohnson@yahoo.com
+ * Changed reset from standard USB dev reset to vendor reset
+ * Changed data sent to host from compensated to raw coordinates
+ * Eliminated vendor/product module params
+ * Performed multiple successfull tests with an EXII-5010UC
+ *
+ * 1.5 02/27/2005 ddstreet@ieee.org
+ * Added module parameter to select raw or hw-calibrated coordinate reporting
+ *
+ *****************************************************************************/
+
+#include <linux/config.h>
+
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG
+#else
+ #undef DEBUG
+#endif
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/input.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+
+#define MTOUCHUSB_MIN_XC 0x0
+#define MTOUCHUSB_MAX_RAW_XC 0x4000
+#define MTOUCHUSB_MAX_CALIB_XC 0xffff
+#define MTOUCHUSB_XC_FUZZ 0x0
+#define MTOUCHUSB_XC_FLAT 0x0
+#define MTOUCHUSB_MIN_YC 0x0
+#define MTOUCHUSB_MAX_RAW_YC 0x4000
+#define MTOUCHUSB_MAX_CALIB_YC 0xffff
+#define MTOUCHUSB_YC_FUZZ 0x0
+#define MTOUCHUSB_YC_FLAT 0x0
+
+#define MTOUCHUSB_ASYNC_REPORT 1
+#define MTOUCHUSB_RESET 7
+#define MTOUCHUSB_REPORT_DATA_SIZE 11
+#define MTOUCHUSB_REQ_CTRLLR_ID 10
+
+#define MTOUCHUSB_GET_RAW_XC(data) (data[8]<<8 | data[7])
+#define MTOUCHUSB_GET_CALIB_XC(data) (data[4]<<8 | data[3])
+#define MTOUCHUSB_GET_RAW_YC(data) (data[10]<<8 | data[9])
+#define MTOUCHUSB_GET_CALIB_YC(data) (data[6]<<8 | data[5])
+#define MTOUCHUSB_GET_XC(data) (raw_coordinates ? \
+ MTOUCHUSB_GET_RAW_XC(data) : \
+ MTOUCHUSB_GET_CALIB_XC(data))
+#define MTOUCHUSB_GET_YC(data) (raw_coordinates ? \
+ MTOUCHUSB_GET_RAW_YC(data) : \
+ MTOUCHUSB_GET_CALIB_YC(data))
+#define MTOUCHUSB_GET_TOUCHED(data) ((data[2] & 0x40) ? 1:0)
+
+#define DRIVER_VERSION "v1.5"
+#define DRIVER_AUTHOR "Todd E. Johnson, tejohnson@yahoo.com"
+#define DRIVER_DESC "3M USB Touchscreen Driver"
+#define DRIVER_LICENSE "GPL"
+
+static int raw_coordinates = 1;
+
+module_param(raw_coordinates, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(raw_coordinates, "report raw coordinate values (y, default) or hardware-calibrated coordinate values (n)");
+
+struct mtouch_usb {
+ unsigned char *data;
+ dma_addr_t data_dma;
+ struct urb *irq;
+ struct usb_device *udev;
+ struct input_dev input;
+ int open;
+ char name[128];
+ char phys[64];
+};
+
+static struct usb_device_id mtouchusb_devices [] = {
+ { USB_DEVICE(0x0596, 0x0001) },
+ { }
+};
+
+static void mtouchusb_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct mtouch_usb *mtouch = urb->context;
+ int retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ETIMEDOUT:
+ /* this urb is timing out */
+ dbg("%s - urb timed out - was the device unplugged?",
+ __FUNCTION__);
+ return;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d",
+ __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d",
+ __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ input_regs(&mtouch->input, regs);
+ input_report_key(&mtouch->input, BTN_TOUCH,
+ MTOUCHUSB_GET_TOUCHED(mtouch->data));
+ input_report_abs(&mtouch->input, ABS_X,
+ MTOUCHUSB_GET_XC(mtouch->data));
+ input_report_abs(&mtouch->input, ABS_Y,
+ (raw_coordinates ? MTOUCHUSB_MAX_RAW_YC : MTOUCHUSB_MAX_CALIB_YC)
+ - MTOUCHUSB_GET_YC(mtouch->data));
+ input_sync(&mtouch->input);
+
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result: %d",
+ __FUNCTION__, retval);
+}
+
+static int mtouchusb_open (struct input_dev *input)
+{
+ struct mtouch_usb *mtouch = input->private;
+
+ if (mtouch->open++)
+ return 0;
+
+ mtouch->irq->dev = mtouch->udev;
+
+ if (usb_submit_urb (mtouch->irq, GFP_ATOMIC)) {
+ mtouch->open--;
+ return -EIO;
+ }
+
+ return 0;
+}
+
+static void mtouchusb_close (struct input_dev *input)
+{
+ struct mtouch_usb *mtouch = input->private;
+
+ if (!--mtouch->open)
+ usb_kill_urb (mtouch->irq);
+}
+
+static int mtouchusb_alloc_buffers(struct usb_device *udev, struct mtouch_usb *mtouch)
+{
+ dbg("%s - called", __FUNCTION__);
+
+ mtouch->data = usb_buffer_alloc(udev, MTOUCHUSB_REPORT_DATA_SIZE,
+ SLAB_ATOMIC, &mtouch->data_dma);
+
+ if (!mtouch->data)
+ return -1;
+
+ return 0;
+}
+
+static void mtouchusb_free_buffers(struct usb_device *udev, struct mtouch_usb *mtouch)
+{
+ dbg("%s - called", __FUNCTION__);
+
+ if (mtouch->data)
+ usb_buffer_free(udev, MTOUCHUSB_REPORT_DATA_SIZE,
+ mtouch->data, mtouch->data_dma);
+}
+
+static int mtouchusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct mtouch_usb *mtouch;
+ struct usb_host_interface *interface;
+ struct usb_endpoint_descriptor *endpoint;
+ struct usb_device *udev = interface_to_usbdev (intf);
+ char path[64];
+ int nRet;
+
+ dbg("%s - called", __FUNCTION__);
+
+ dbg("%s - setting interface", __FUNCTION__);
+ interface = intf->cur_altsetting;
+
+ dbg("%s - setting endpoint", __FUNCTION__);
+ endpoint = &interface->endpoint[0].desc;
+
+ if (!(mtouch = kmalloc (sizeof (struct mtouch_usb), GFP_KERNEL))) {
+ err("%s - Out of memory.", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ memset(mtouch, 0, sizeof(struct mtouch_usb));
+ mtouch->udev = udev;
+
+ dbg("%s - allocating buffers", __FUNCTION__);
+ if (mtouchusb_alloc_buffers(udev, mtouch)) {
+ mtouchusb_free_buffers(udev, mtouch);
+ kfree(mtouch);
+ return -ENOMEM;
+ }
+
+ mtouch->input.private = mtouch;
+ mtouch->input.open = mtouchusb_open;
+ mtouch->input.close = mtouchusb_close;
+
+ usb_make_path(udev, path, 64);
+ sprintf(mtouch->phys, "%s/input0", path);
+
+ mtouch->input.name = mtouch->name;
+ mtouch->input.phys = mtouch->phys;
+ mtouch->input.id.bustype = BUS_USB;
+ mtouch->input.id.vendor = le16_to_cpu(udev->descriptor.idVendor);
+ mtouch->input.id.product = le16_to_cpu(udev->descriptor.idProduct);
+ mtouch->input.id.version = le16_to_cpu(udev->descriptor.bcdDevice);
+ mtouch->input.dev = &intf->dev;
+
+ mtouch->input.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
+ mtouch->input.absbit[0] = BIT(ABS_X) | BIT(ABS_Y);
+ mtouch->input.keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
+
+ /* Used to Scale Compensated Data and Flip Y */
+ mtouch->input.absmin[ABS_X] = MTOUCHUSB_MIN_XC;
+ mtouch->input.absmax[ABS_X] = raw_coordinates ? \
+ MTOUCHUSB_MAX_RAW_XC : MTOUCHUSB_MAX_CALIB_XC;
+ mtouch->input.absfuzz[ABS_X] = MTOUCHUSB_XC_FUZZ;
+ mtouch->input.absflat[ABS_X] = MTOUCHUSB_XC_FLAT;
+ mtouch->input.absmin[ABS_Y] = MTOUCHUSB_MIN_YC;
+ mtouch->input.absmax[ABS_Y] = raw_coordinates ? \
+ MTOUCHUSB_MAX_RAW_YC : MTOUCHUSB_MAX_CALIB_YC;
+ mtouch->input.absfuzz[ABS_Y] = MTOUCHUSB_YC_FUZZ;
+ mtouch->input.absflat[ABS_Y] = MTOUCHUSB_YC_FLAT;
+
+ if (udev->manufacturer)
+ strcat(mtouch->name, udev->manufacturer);
+ if (udev->product)
+ sprintf(mtouch->name, "%s %s", mtouch->name, udev->product);
+
+ if (!strlen(mtouch->name))
+ sprintf(mtouch->name, "USB Touchscreen %04x:%04x",
+ mtouch->input.id.vendor, mtouch->input.id.product);
+
+ nRet = usb_control_msg(mtouch->udev,
+ usb_rcvctrlpipe(udev, 0),
+ MTOUCHUSB_RESET,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ 1,
+ 0,
+ NULL,
+ 0,
+ USB_CTRL_SET_TIMEOUT);
+ dbg("%s - usb_control_msg - MTOUCHUSB_RESET - bytes|err: %d",
+ __FUNCTION__, nRet);
+
+ dbg("%s - usb_alloc_urb: mtouch->irq", __FUNCTION__);
+ mtouch->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!mtouch->irq) {
+ dbg("%s - usb_alloc_urb failed: mtouch->irq", __FUNCTION__);
+ mtouchusb_free_buffers(udev, mtouch);
+ kfree(mtouch);
+ return -ENOMEM;
+ }
+
+ dbg("%s - usb_fill_int_urb", __FUNCTION__);
+ usb_fill_int_urb(mtouch->irq,
+ mtouch->udev,
+ usb_rcvintpipe(mtouch->udev, 0x81),
+ mtouch->data,
+ MTOUCHUSB_REPORT_DATA_SIZE,
+ mtouchusb_irq,
+ mtouch,
+ endpoint->bInterval);
+
+ dbg("%s - input_register_device", __FUNCTION__);
+ input_register_device(&mtouch->input);
+
+ nRet = usb_control_msg(mtouch->udev,
+ usb_rcvctrlpipe(udev, 0),
+ MTOUCHUSB_ASYNC_REPORT,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ 1,
+ 1,
+ NULL,
+ 0,
+ USB_CTRL_SET_TIMEOUT);
+ dbg("%s - usb_control_msg - MTOUCHUSB_ASYNC_REPORT - bytes|err: %d",
+ __FUNCTION__, nRet);
+
+ printk(KERN_INFO "input: %s on %s\n", mtouch->name, path);
+ usb_set_intfdata(intf, mtouch);
+
+ return 0;
+}
+
+static void mtouchusb_disconnect(struct usb_interface *intf)
+{
+ struct mtouch_usb *mtouch = usb_get_intfdata (intf);
+
+ dbg("%s - called", __FUNCTION__);
+ usb_set_intfdata(intf, NULL);
+ if (mtouch) {
+ dbg("%s - mtouch is initialized, cleaning up", __FUNCTION__);
+ usb_kill_urb(mtouch->irq);
+ input_unregister_device(&mtouch->input);
+ usb_free_urb(mtouch->irq);
+ mtouchusb_free_buffers(interface_to_usbdev(intf), mtouch);
+ kfree(mtouch);
+ }
+}
+
+MODULE_DEVICE_TABLE (usb, mtouchusb_devices);
+
+static struct usb_driver mtouchusb_driver = {
+ .owner = THIS_MODULE,
+ .name = "mtouchusb",
+ .probe = mtouchusb_probe,
+ .disconnect = mtouchusb_disconnect,
+ .id_table = mtouchusb_devices,
+};
+
+static int __init mtouchusb_init(void) {
+ dbg("%s - called", __FUNCTION__);
+ return usb_register(&mtouchusb_driver);
+}
+
+static void __exit mtouchusb_cleanup(void) {
+ dbg("%s - called", __FUNCTION__);
+ usb_deregister(&mtouchusb_driver);
+}
+
+module_init(mtouchusb_init);
+module_exit(mtouchusb_cleanup);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c
new file mode 100644
index 000000000000..256963863478
--- /dev/null
+++ b/drivers/usb/input/pid.c
@@ -0,0 +1,295 @@
+/*
+ * PID Force feedback support for hid devices.
+ *
+ * Copyright (c) 2002 Rodrigo Damazio.
+ * Portions by Johann Deneux and Bjorn Augustson
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so by
+ * e-mail - mail your message to <rdamazio@lsi.usp.br>
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/mm.h>
+#include <linux/smp_lock.h>
+#include <linux/spinlock.h>
+#include <linux/input.h>
+#include <linux/usb.h>
+#include "hid.h"
+#include "pid.h"
+
+#define DEBUG
+
+#define CHECK_OWNERSHIP(i, hid_pid) \
+ ((i) < FF_EFFECTS_MAX && i >= 0 && \
+ test_bit(FF_PID_FLAGS_USED, &hid_pid->effects[(i)].flags) && \
+ (current->pid == 0 || \
+ (hid_pid)->effects[(i)].owner == current->pid))
+
+/* Called when a transfer is completed */
+static void hid_pid_ctrl_out(struct urb *u, struct pt_regs *regs)
+{
+ dev_dbg(&u->dev->dev, "hid_pid_ctrl_out - Transfer Completed\n");
+}
+
+static void hid_pid_exit(struct hid_device *hid)
+{
+ struct hid_ff_pid *private = hid->ff_private;
+
+ if (private->urbffout) {
+ usb_kill_urb(private->urbffout);
+ usb_free_urb(private->urbffout);
+ }
+}
+
+static int pid_upload_periodic(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update)
+{
+ dev_info(&pid->hid->dev->dev, "requested periodic force upload\n");
+ return 0;
+}
+
+static int pid_upload_constant(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update)
+{
+ dev_info(&pid->hid->dev->dev, "requested constant force upload\n");
+ return 0;
+}
+
+static int pid_upload_condition(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update)
+{
+ dev_info(&pid->hid->dev->dev, "requested Condition force upload\n");
+ return 0;
+}
+
+static int pid_upload_ramp(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update)
+{
+ dev_info(&pid->hid->dev->dev, "request ramp force upload\n");
+ return 0;
+}
+
+static int hid_pid_event(struct hid_device *hid, struct input_dev *input,
+ unsigned int type, unsigned int code, int value)
+{
+ dev_dbg(&hid->dev->dev, "PID event received: type=%d,code=%d,value=%d.\n", type, code, value);
+
+ if (type != EV_FF)
+ return -1;
+
+ return 0;
+}
+
+/* Lock must be held by caller */
+static void hid_pid_ctrl_playback(struct hid_device *hid, struct hid_pid_effect *effect, int play)
+{
+ if (play)
+ set_bit(FF_PID_FLAGS_PLAYING, &effect->flags);
+ else
+ clear_bit(FF_PID_FLAGS_PLAYING, &effect->flags);
+}
+
+static int hid_pid_erase(struct input_dev *dev, int id)
+{
+ struct hid_device *hid = dev->private;
+ struct hid_ff_pid *pid = hid->ff_private;
+ struct hid_field *field;
+ unsigned long flags;
+ int ret;
+
+ if (!CHECK_OWNERSHIP(id, pid))
+ return -EACCES;
+
+ /* Find report */
+ field = hid_find_field_by_usage(hid, HID_UP_PID | FF_PID_USAGE_BLOCK_FREE,
+ HID_OUTPUT_REPORT);
+ if (!field) {
+ dev_err(&hid->dev->dev, "couldn't find report\n");
+ return -EIO;
+ }
+
+ ret = hid_set_field(field, 0, pid->effects[id].device_id);
+ if (ret) {
+ dev_err(&hid->dev->dev, "couldn't set field\n");
+ return ret;
+ }
+
+ hid_submit_report(hid, field->report, USB_DIR_OUT);
+
+ spin_lock_irqsave(&pid->lock, flags);
+ hid_pid_ctrl_playback(hid, pid->effects + id, 0);
+ pid->effects[id].flags = 0;
+ spin_unlock_irqrestore(&pid->lock, flags);
+
+ return 0;
+}
+
+/* Erase all effects this process owns */
+static int hid_pid_flush(struct input_dev *dev, struct file *file)
+{
+ struct hid_device *hid = dev->private;
+ struct hid_ff_pid *pid = hid->ff_private;
+ int i;
+
+ /*NOTE: no need to lock here. The only times EFFECT_USED is
+ modified is when effects are uploaded or when an effect is
+ erased. But a process cannot close its dev/input/eventX fd
+ and perform ioctls on the same fd all at the same time */
+ /*FIXME: multiple threads, anyone? */
+ for (i = 0; i < dev->ff_effects_max; ++i)
+ if (current->pid == pid->effects[i].owner
+ && test_bit(FF_PID_FLAGS_USED, &pid->effects[i].flags))
+ if (hid_pid_erase(dev, i))
+ dev_warn(&hid->dev->dev, "erase effect %d failed", i);
+
+ return 0;
+}
+
+static int hid_pid_upload_effect(struct input_dev *dev,
+ struct ff_effect *effect)
+{
+ struct hid_ff_pid *pid_private = (struct hid_ff_pid *)(dev->private);
+ int ret;
+ int is_update;
+ unsigned long flags;
+
+ dev_dbg(&pid_private->hid->dev->dev, "upload effect called: effect_type=%x\n", effect->type);
+ /* Check this effect type is supported by this device */
+ if (!test_bit(effect->type, dev->ffbit)) {
+ dev_dbg(&pid_private->hid->dev->dev,
+ "invalid kind of effect requested.\n");
+ return -EINVAL;
+ }
+
+ /*
+ * If we want to create a new effect, get a free id
+ */
+ if (effect->id == -1) {
+ int id = 0;
+
+ // Spinlock so we don`t get a race condition when choosing IDs
+ spin_lock_irqsave(&pid_private->lock, flags);
+
+ while (id < FF_EFFECTS_MAX)
+ if (!test_and_set_bit(FF_PID_FLAGS_USED, &pid_private->effects[id++].flags))
+ break;
+
+ if (id == FF_EFFECTS_MAX) {
+ spin_unlock_irqrestore(&pid_private->lock, flags);
+// TEMP - We need to get ff_effects_max correctly first: || id >= dev->ff_effects_max) {
+ dev_dbg(&pid_private->hid->dev->dev, "Not enough device memory\n");
+ return -ENOMEM;
+ }
+
+ effect->id = id;
+ dev_dbg(&pid_private->hid->dev->dev, "effect ID is %d\n.", id);
+ pid_private->effects[id].owner = current->pid;
+ pid_private->effects[id].flags = (1 << FF_PID_FLAGS_USED);
+ spin_unlock_irqrestore(&pid_private->lock, flags);
+
+ is_update = FF_PID_FALSE;
+ } else {
+ /* We want to update an effect */
+ if (!CHECK_OWNERSHIP(effect->id, pid_private))
+ return -EACCES;
+
+ /* Parameter type cannot be updated */
+ if (effect->type != pid_private->effects[effect->id].effect.type)
+ return -EINVAL;
+
+ /* Check the effect is not already being updated */
+ if (test_bit(FF_PID_FLAGS_UPDATING, &pid_private->effects[effect->id].flags))
+ return -EAGAIN;
+
+ is_update = FF_PID_TRUE;
+ }
+
+ /*
+ * Upload the effect
+ */
+ switch (effect->type) {
+ case FF_PERIODIC:
+ ret = pid_upload_periodic(pid_private, effect, is_update);
+ break;
+
+ case FF_CONSTANT:
+ ret = pid_upload_constant(pid_private, effect, is_update);
+ break;
+
+ case FF_SPRING:
+ case FF_FRICTION:
+ case FF_DAMPER:
+ case FF_INERTIA:
+ ret = pid_upload_condition(pid_private, effect, is_update);
+ break;
+
+ case FF_RAMP:
+ ret = pid_upload_ramp(pid_private, effect, is_update);
+ break;
+
+ default:
+ dev_dbg(&pid_private->hid->dev->dev,
+ "invalid type of effect requested - %x.\n",
+ effect->type);
+ return -EINVAL;
+ }
+ /* If a packet was sent, forbid new updates until we are notified
+ * that the packet was updated
+ */
+ if (ret == 0)
+ set_bit(FF_PID_FLAGS_UPDATING, &pid_private->effects[effect->id].flags);
+ pid_private->effects[effect->id].effect = *effect;
+ return ret;
+}
+
+int hid_pid_init(struct hid_device *hid)
+{
+ struct hid_ff_pid *private;
+ struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list);
+
+ private = hid->ff_private = kcalloc(1, sizeof(struct hid_ff_pid), GFP_KERNEL);
+ if (!private)
+ return -ENOMEM;
+
+ private->hid = hid;
+
+ hid->ff_exit = hid_pid_exit;
+ hid->ff_event = hid_pid_event;
+
+ /* Open output URB */
+ if (!(private->urbffout = usb_alloc_urb(0, GFP_KERNEL))) {
+ kfree(private);
+ return -1;
+ }
+
+ usb_fill_control_urb(private->urbffout, hid->dev, 0,
+ (void *)&private->ffcr, private->ctrl_buffer, 8,
+ hid_pid_ctrl_out, hid);
+ hidinput->input.upload_effect = hid_pid_upload_effect;
+ hidinput->input.flush = hid_pid_flush;
+ hidinput->input.ff_effects_max = 8; // A random default
+ set_bit(EV_FF, hidinput->input.evbit);
+ set_bit(EV_FF_STATUS, hidinput->input.evbit);
+
+ spin_lock_init(&private->lock);
+
+ printk(KERN_INFO "Force feedback driver for PID devices by Rodrigo Damazio <rdamazio@lsi.usp.br>.\n");
+
+ return 0;
+}
diff --git a/drivers/usb/input/pid.h b/drivers/usb/input/pid.h
new file mode 100644
index 000000000000..a2cb9627ed0e
--- /dev/null
+++ b/drivers/usb/input/pid.h
@@ -0,0 +1,62 @@
+/*
+ * PID Force feedback support for hid devices.
+ *
+ * Copyright (c) 2002 Rodrigo Damazio.
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so by
+ * e-mail - mail your message to <rdamazio@lsi.usp.br>
+ */
+
+#define FF_EFFECTS_MAX 64
+
+#define FF_PID_FLAGS_USED 1 /* If the effect exists */
+#define FF_PID_FLAGS_UPDATING 2 /* If the effect is being updated */
+#define FF_PID_FLAGS_PLAYING 3 /* If the effect is currently being played */
+
+#define FF_PID_FALSE 0
+#define FF_PID_TRUE 1
+
+struct hid_pid_effect {
+ unsigned long flags;
+ pid_t owner;
+ unsigned int device_id; /* The device-assigned ID */
+ struct ff_effect effect;
+};
+
+struct hid_ff_pid {
+ struct hid_device *hid;
+ unsigned long gain;
+
+ struct urb *urbffout;
+ struct usb_ctrlrequest ffcr;
+ spinlock_t lock;
+
+ unsigned char ctrl_buffer[8];
+
+ struct hid_pid_effect effects[FF_EFFECTS_MAX];
+};
+
+/*
+ * Constants from the PID usage table (still far from complete)
+ */
+
+#define FF_PID_USAGE_BLOCK_LOAD 0x89UL
+#define FF_PID_USAGE_BLOCK_FREE 0x90UL
+#define FF_PID_USAGE_NEW_EFFECT 0xABUL
+#define FF_PID_USAGE_POOL_REPORT 0x7FUL
diff --git a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c
new file mode 100644
index 000000000000..7fa2f9b9fb69
--- /dev/null
+++ b/drivers/usb/input/powermate.c
@@ -0,0 +1,464 @@
+/*
+ * A driver for the Griffin Technology, Inc. "PowerMate" USB controller dial.
+ *
+ * v1.1, (c)2002 William R Sowerbutts <will@sowerbutts.com>
+ *
+ * This device is a anodised aluminium knob which connects over USB. It can measure
+ * clockwise and anticlockwise rotation. The dial also acts as a pushbutton with
+ * a spring for automatic release. The base contains a pair of LEDs which illuminate
+ * the translucent base. It rotates without limit and reports its relative rotation
+ * back to the host when polled by the USB controller.
+ *
+ * Testing with the knob I have has shown that it measures approximately 94 "clicks"
+ * for one full rotation. Testing with my High Speed Rotation Actuator (ok, it was
+ * a variable speed cordless electric drill) has shown that the device can measure
+ * speeds of up to 7 clicks either clockwise or anticlockwise between pollings from
+ * the host. If it counts more than 7 clicks before it is polled, it will wrap back
+ * to zero and start counting again. This was at quite high speed, however, almost
+ * certainly faster than the human hand could turn it. Griffin say that it loses a
+ * pulse or two on a direction change; the granularity is so fine that I never
+ * noticed this in practice.
+ *
+ * The device's microcontroller can be programmed to set the LED to either a constant
+ * intensity, or to a rhythmic pulsing. Several patterns and speeds are available.
+ *
+ * Griffin were very happy to provide documentation and free hardware for development.
+ *
+ * Some userspace tools are available on the web: http://sowerbutts.com/powermate/
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/input.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <linux/usb.h>
+
+#define POWERMATE_VENDOR 0x077d /* Griffin Technology, Inc. */
+#define POWERMATE_PRODUCT_NEW 0x0410 /* Griffin PowerMate */
+#define POWERMATE_PRODUCT_OLD 0x04AA /* Griffin soundKnob */
+
+#define CONTOUR_VENDOR 0x05f3 /* Contour Design, Inc. */
+#define CONTOUR_JOG 0x0240 /* Jog and Shuttle */
+
+/* these are the command codes we send to the device */
+#define SET_STATIC_BRIGHTNESS 0x01
+#define SET_PULSE_ASLEEP 0x02
+#define SET_PULSE_AWAKE 0x03
+#define SET_PULSE_MODE 0x04
+
+/* these refer to bits in the powermate_device's requires_update field. */
+#define UPDATE_STATIC_BRIGHTNESS (1<<0)
+#define UPDATE_PULSE_ASLEEP (1<<1)
+#define UPDATE_PULSE_AWAKE (1<<2)
+#define UPDATE_PULSE_MODE (1<<3)
+
+/* at least two versions of the hardware exist, with differing payload
+ sizes. the first three bytes always contain the "interesting" data in
+ the relevant format. */
+#define POWERMATE_PAYLOAD_SIZE_MAX 6
+#define POWERMATE_PAYLOAD_SIZE_MIN 3
+struct powermate_device {
+ signed char *data;
+ dma_addr_t data_dma;
+ struct urb *irq, *config;
+ struct usb_ctrlrequest *configcr;
+ dma_addr_t configcr_dma;
+ struct usb_device *udev;
+ struct input_dev input;
+ spinlock_t lock;
+ int static_brightness;
+ int pulse_speed;
+ int pulse_table;
+ int pulse_asleep;
+ int pulse_awake;
+ int requires_update; // physical settings which are out of sync
+ char phys[64];
+};
+
+static char pm_name_powermate[] = "Griffin PowerMate";
+static char pm_name_soundknob[] = "Griffin SoundKnob";
+
+static void powermate_config_complete(struct urb *urb, struct pt_regs *regs);
+
+/* Callback for data arriving from the PowerMate over the USB interrupt pipe */
+static void powermate_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct powermate_device *pm = urb->context;
+ int retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ /* handle updates to device state */
+ input_regs(&pm->input, regs);
+ input_report_key(&pm->input, BTN_0, pm->data[0] & 0x01);
+ input_report_rel(&pm->input, REL_DIAL, pm->data[1]);
+ input_sync(&pm->input);
+
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+/* Decide if we need to issue a control message and do so. Must be called with pm->lock taken */
+static void powermate_sync_state(struct powermate_device *pm)
+{
+ if (pm->requires_update == 0)
+ return; /* no updates are required */
+ if (pm->config->status == -EINPROGRESS)
+ return; /* an update is already in progress; it'll issue this update when it completes */
+
+ if (pm->requires_update & UPDATE_PULSE_ASLEEP){
+ pm->configcr->wValue = cpu_to_le16( SET_PULSE_ASLEEP );
+ pm->configcr->wIndex = cpu_to_le16( pm->pulse_asleep ? 1 : 0 );
+ pm->requires_update &= ~UPDATE_PULSE_ASLEEP;
+ }else if (pm->requires_update & UPDATE_PULSE_AWAKE){
+ pm->configcr->wValue = cpu_to_le16( SET_PULSE_AWAKE );
+ pm->configcr->wIndex = cpu_to_le16( pm->pulse_awake ? 1 : 0 );
+ pm->requires_update &= ~UPDATE_PULSE_AWAKE;
+ }else if (pm->requires_update & UPDATE_PULSE_MODE){
+ int op, arg;
+ /* the powermate takes an operation and an argument for its pulse algorithm.
+ the operation can be:
+ 0: divide the speed
+ 1: pulse at normal speed
+ 2: multiply the speed
+ the argument only has an effect for operations 0 and 2, and ranges between
+ 1 (least effect) to 255 (maximum effect).
+
+ thus, several states are equivalent and are coalesced into one state.
+
+ we map this onto a range from 0 to 510, with:
+ 0 -- 254 -- use divide (0 = slowest)
+ 255 -- use normal speed
+ 256 -- 510 -- use multiple (510 = fastest).
+
+ Only values of 'arg' quite close to 255 are particularly useful/spectacular.
+ */
+ if (pm->pulse_speed < 255){
+ op = 0; // divide
+ arg = 255 - pm->pulse_speed;
+ } else if (pm->pulse_speed > 255){
+ op = 2; // multiply
+ arg = pm->pulse_speed - 255;
+ } else {
+ op = 1; // normal speed
+ arg = 0; // can be any value
+ }
+ pm->configcr->wValue = cpu_to_le16( (pm->pulse_table << 8) | SET_PULSE_MODE );
+ pm->configcr->wIndex = cpu_to_le16( (arg << 8) | op );
+ pm->requires_update &= ~UPDATE_PULSE_MODE;
+ }else if (pm->requires_update & UPDATE_STATIC_BRIGHTNESS){
+ pm->configcr->wValue = cpu_to_le16( SET_STATIC_BRIGHTNESS );
+ pm->configcr->wIndex = cpu_to_le16( pm->static_brightness );
+ pm->requires_update &= ~UPDATE_STATIC_BRIGHTNESS;
+ }else{
+ printk(KERN_ERR "powermate: unknown update required");
+ pm->requires_update = 0; /* fudge the bug */
+ return;
+ }
+
+/* printk("powermate: %04x %04x\n", pm->configcr->wValue, pm->configcr->wIndex); */
+
+ pm->configcr->bRequestType = 0x41; /* vendor request */
+ pm->configcr->bRequest = 0x01;
+ pm->configcr->wLength = 0;
+
+ usb_fill_control_urb(pm->config, pm->udev, usb_sndctrlpipe(pm->udev, 0),
+ (void *) pm->configcr, NULL, 0,
+ powermate_config_complete, pm);
+ pm->config->setup_dma = pm->configcr_dma;
+ pm->config->transfer_flags |= URB_NO_SETUP_DMA_MAP;
+
+ if (usb_submit_urb(pm->config, GFP_ATOMIC))
+ printk(KERN_ERR "powermate: usb_submit_urb(config) failed");
+}
+
+/* Called when our asynchronous control message completes. We may need to issue another immediately */
+static void powermate_config_complete(struct urb *urb, struct pt_regs *regs)
+{
+ struct powermate_device *pm = urb->context;
+ unsigned long flags;
+
+ if (urb->status)
+ printk(KERN_ERR "powermate: config urb returned %d\n", urb->status);
+
+ spin_lock_irqsave(&pm->lock, flags);
+ powermate_sync_state(pm);
+ spin_unlock_irqrestore(&pm->lock, flags);
+}
+
+/* Set the LED up as described and begin the sync with the hardware if required */
+static void powermate_pulse_led(struct powermate_device *pm, int static_brightness, int pulse_speed,
+ int pulse_table, int pulse_asleep, int pulse_awake)
+{
+ unsigned long flags;
+
+ if (pulse_speed < 0)
+ pulse_speed = 0;
+ if (pulse_table < 0)
+ pulse_table = 0;
+ if (pulse_speed > 510)
+ pulse_speed = 510;
+ if (pulse_table > 2)
+ pulse_table = 2;
+
+ pulse_asleep = !!pulse_asleep;
+ pulse_awake = !!pulse_awake;
+
+
+ spin_lock_irqsave(&pm->lock, flags);
+
+ /* mark state updates which are required */
+ if (static_brightness != pm->static_brightness){
+ pm->static_brightness = static_brightness;
+ pm->requires_update |= UPDATE_STATIC_BRIGHTNESS;
+ }
+ if (pulse_asleep != pm->pulse_asleep){
+ pm->pulse_asleep = pulse_asleep;
+ pm->requires_update |= (UPDATE_PULSE_ASLEEP | UPDATE_STATIC_BRIGHTNESS);
+ }
+ if (pulse_awake != pm->pulse_awake){
+ pm->pulse_awake = pulse_awake;
+ pm->requires_update |= (UPDATE_PULSE_AWAKE | UPDATE_STATIC_BRIGHTNESS);
+ }
+ if (pulse_speed != pm->pulse_speed || pulse_table != pm->pulse_table){
+ pm->pulse_speed = pulse_speed;
+ pm->pulse_table = pulse_table;
+ pm->requires_update |= UPDATE_PULSE_MODE;
+ }
+
+ powermate_sync_state(pm);
+
+ spin_unlock_irqrestore(&pm->lock, flags);
+}
+
+/* Callback from the Input layer when an event arrives from userspace to configure the LED */
+static int powermate_input_event(struct input_dev *dev, unsigned int type, unsigned int code, int _value)
+{
+ unsigned int command = (unsigned int)_value;
+ struct powermate_device *pm = dev->private;
+
+ if (type == EV_MSC && code == MSC_PULSELED){
+ /*
+ bits 0- 7: 8 bits: LED brightness
+ bits 8-16: 9 bits: pulsing speed modifier (0 ... 510); 0-254 = slower, 255 = standard, 256-510 = faster.
+ bits 17-18: 2 bits: pulse table (0, 1, 2 valid)
+ bit 19: 1 bit : pulse whilst asleep?
+ bit 20: 1 bit : pulse constantly?
+ */
+ int static_brightness = command & 0xFF; // bits 0-7
+ int pulse_speed = (command >> 8) & 0x1FF; // bits 8-16
+ int pulse_table = (command >> 17) & 0x3; // bits 17-18
+ int pulse_asleep = (command >> 19) & 0x1; // bit 19
+ int pulse_awake = (command >> 20) & 0x1; // bit 20
+
+ powermate_pulse_led(pm, static_brightness, pulse_speed, pulse_table, pulse_asleep, pulse_awake);
+ }
+
+ return 0;
+}
+
+static int powermate_alloc_buffers(struct usb_device *udev, struct powermate_device *pm)
+{
+ pm->data = usb_buffer_alloc(udev, POWERMATE_PAYLOAD_SIZE_MAX,
+ SLAB_ATOMIC, &pm->data_dma);
+ if (!pm->data)
+ return -1;
+ pm->configcr = usb_buffer_alloc(udev, sizeof(*(pm->configcr)),
+ SLAB_ATOMIC, &pm->configcr_dma);
+ if (!pm->configcr)
+ return -1;
+
+ return 0;
+}
+
+static void powermate_free_buffers(struct usb_device *udev, struct powermate_device *pm)
+{
+ if (pm->data)
+ usb_buffer_free(udev, POWERMATE_PAYLOAD_SIZE_MAX,
+ pm->data, pm->data_dma);
+ if (pm->configcr)
+ usb_buffer_free(udev, sizeof(*(pm->configcr)),
+ pm->configcr, pm->configcr_dma);
+}
+
+/* Called whenever a USB device matching one in our supported devices table is connected */
+static int powermate_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev (intf);
+ struct usb_host_interface *interface;
+ struct usb_endpoint_descriptor *endpoint;
+ struct powermate_device *pm;
+ int pipe, maxp;
+ char path[64];
+
+ interface = intf->cur_altsetting;
+ endpoint = &interface->endpoint[0].desc;
+ if (!(endpoint->bEndpointAddress & 0x80))
+ return -EIO;
+ if ((endpoint->bmAttributes & 3) != 3)
+ return -EIO;
+
+ usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+ 0x0a, USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ 0, interface->desc.bInterfaceNumber, NULL, 0,
+ USB_CTRL_SET_TIMEOUT);
+
+ if (!(pm = kmalloc(sizeof(struct powermate_device), GFP_KERNEL)))
+ return -ENOMEM;
+
+ memset(pm, 0, sizeof(struct powermate_device));
+ pm->udev = udev;
+
+ if (powermate_alloc_buffers(udev, pm)) {
+ powermate_free_buffers(udev, pm);
+ kfree(pm);
+ return -ENOMEM;
+ }
+
+ pm->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!pm->irq) {
+ powermate_free_buffers(udev, pm);
+ kfree(pm);
+ return -ENOMEM;
+ }
+
+ pm->config = usb_alloc_urb(0, GFP_KERNEL);
+ if (!pm->config) {
+ usb_free_urb(pm->irq);
+ powermate_free_buffers(udev, pm);
+ kfree(pm);
+ return -ENOMEM;
+ }
+
+ spin_lock_init(&pm->lock);
+ init_input_dev(&pm->input);
+
+ /* get a handle to the interrupt data pipe */
+ pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
+ maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+
+ if(maxp < POWERMATE_PAYLOAD_SIZE_MIN || maxp > POWERMATE_PAYLOAD_SIZE_MAX){
+ printk("powermate: Expected payload of %d--%d bytes, found %d bytes!\n",
+ POWERMATE_PAYLOAD_SIZE_MIN, POWERMATE_PAYLOAD_SIZE_MAX, maxp);
+ maxp = POWERMATE_PAYLOAD_SIZE_MAX;
+ }
+
+ usb_fill_int_urb(pm->irq, udev, pipe, pm->data,
+ maxp, powermate_irq,
+ pm, endpoint->bInterval);
+ pm->irq->transfer_dma = pm->data_dma;
+ pm->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ /* register our interrupt URB with the USB system */
+ if (usb_submit_urb(pm->irq, GFP_KERNEL)) {
+ powermate_free_buffers(udev, pm);
+ kfree(pm);
+ return -EIO; /* failure */
+ }
+
+ switch (le16_to_cpu(udev->descriptor.idProduct)) {
+ case POWERMATE_PRODUCT_NEW: pm->input.name = pm_name_powermate; break;
+ case POWERMATE_PRODUCT_OLD: pm->input.name = pm_name_soundknob; break;
+ default:
+ pm->input.name = pm_name_soundknob;
+ printk(KERN_WARNING "powermate: unknown product id %04x\n",
+ le16_to_cpu(udev->descriptor.idProduct));
+ }
+
+ pm->input.private = pm;
+ pm->input.evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_MSC);
+ pm->input.keybit[LONG(BTN_0)] = BIT(BTN_0);
+ pm->input.relbit[LONG(REL_DIAL)] = BIT(REL_DIAL);
+ pm->input.mscbit[LONG(MSC_PULSELED)] = BIT(MSC_PULSELED);
+ pm->input.id.bustype = BUS_USB;
+ pm->input.id.vendor = le16_to_cpu(udev->descriptor.idVendor);
+ pm->input.id.product = le16_to_cpu(udev->descriptor.idProduct);
+ pm->input.id.version = le16_to_cpu(udev->descriptor.bcdDevice);
+ pm->input.event = powermate_input_event;
+ pm->input.dev = &intf->dev;
+ pm->input.phys = pm->phys;
+
+ input_register_device(&pm->input);
+
+ usb_make_path(udev, path, 64);
+ snprintf(pm->phys, 64, "%s/input0", path);
+ printk(KERN_INFO "input: %s on %s\n", pm->input.name, pm->input.phys);
+
+ /* force an update of everything */
+ pm->requires_update = UPDATE_PULSE_ASLEEP | UPDATE_PULSE_AWAKE | UPDATE_PULSE_MODE | UPDATE_STATIC_BRIGHTNESS;
+ powermate_pulse_led(pm, 0x80, 255, 0, 1, 0); // set default pulse parameters
+
+ usb_set_intfdata(intf, pm);
+ return 0;
+}
+
+/* Called when a USB device we've accepted ownership of is removed */
+static void powermate_disconnect(struct usb_interface *intf)
+{
+ struct powermate_device *pm = usb_get_intfdata (intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (pm) {
+ pm->requires_update = 0;
+ usb_kill_urb(pm->irq);
+ input_unregister_device(&pm->input);
+ usb_free_urb(pm->irq);
+ usb_free_urb(pm->config);
+ powermate_free_buffers(interface_to_usbdev(intf), pm);
+
+ kfree(pm);
+ }
+}
+
+static struct usb_device_id powermate_devices [] = {
+ { USB_DEVICE(POWERMATE_VENDOR, POWERMATE_PRODUCT_NEW) },
+ { USB_DEVICE(POWERMATE_VENDOR, POWERMATE_PRODUCT_OLD) },
+ { USB_DEVICE(CONTOUR_VENDOR, CONTOUR_JOG) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, powermate_devices);
+
+static struct usb_driver powermate_driver = {
+ .owner = THIS_MODULE,
+ .name = "powermate",
+ .probe = powermate_probe,
+ .disconnect = powermate_disconnect,
+ .id_table = powermate_devices,
+};
+
+static int __init powermate_init(void)
+{
+ return usb_register(&powermate_driver);
+}
+
+static void __exit powermate_cleanup(void)
+{
+ usb_deregister(&powermate_driver);
+}
+
+module_init(powermate_init);
+module_exit(powermate_cleanup);
+
+MODULE_AUTHOR( "William R Sowerbutts" );
+MODULE_DESCRIPTION( "Griffin Technology, Inc PowerMate driver" );
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c
new file mode 100644
index 000000000000..a71f1bbd0a17
--- /dev/null
+++ b/drivers/usb/input/touchkitusb.c
@@ -0,0 +1,310 @@
+/******************************************************************************
+ * touchkitusb.c -- Driver for eGalax TouchKit USB Touchscreens
+ *
+ * Copyright (C) 2004 by Daniel Ritz
+ * Copyright (C) by Todd E. Johnson (mtouchusb.c)
+ *
+ * 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.
+ *
+ * Based upon mtouchusb.c
+ *
+ *****************************************************************************/
+
+//#define DEBUG
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/input.h>
+#include <linux/module.h>
+#include <linux/init.h>
+
+#if !defined(DEBUG) && defined(CONFIG_USB_DEBUG)
+#define DEBUG
+#endif
+#include <linux/usb.h>
+
+
+#define TOUCHKIT_MIN_XC 0x0
+#define TOUCHKIT_MAX_XC 0x07ff
+#define TOUCHKIT_XC_FUZZ 0x0
+#define TOUCHKIT_XC_FLAT 0x0
+#define TOUCHKIT_MIN_YC 0x0
+#define TOUCHKIT_MAX_YC 0x07ff
+#define TOUCHKIT_YC_FUZZ 0x0
+#define TOUCHKIT_YC_FLAT 0x0
+#define TOUCHKIT_REPORT_DATA_SIZE 8
+
+#define TOUCHKIT_DOWN 0x01
+#define TOUCHKIT_POINT_TOUCH 0x81
+#define TOUCHKIT_POINT_NOTOUCH 0x80
+
+#define TOUCHKIT_GET_TOUCHED(dat) ((((dat)[0]) & TOUCHKIT_DOWN) ? 1 : 0)
+#define TOUCHKIT_GET_X(dat) (((dat)[3] << 7) | (dat)[4])
+#define TOUCHKIT_GET_Y(dat) (((dat)[1] << 7) | (dat)[2])
+
+#define DRIVER_VERSION "v0.1"
+#define DRIVER_AUTHOR "Daniel Ritz <daniel.ritz@gmx.ch>"
+#define DRIVER_DESC "eGalax TouchKit USB HID Touchscreen Driver"
+
+static int swap_xy;
+module_param(swap_xy, bool, 0644);
+MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped.");
+
+struct touchkit_usb {
+ unsigned char *data;
+ dma_addr_t data_dma;
+ struct urb *irq;
+ struct usb_device *udev;
+ struct input_dev input;
+ int open;
+ char name[128];
+ char phys[64];
+};
+
+static struct usb_device_id touchkit_devices[] = {
+ {USB_DEVICE(0x3823, 0x0001)},
+ {USB_DEVICE(0x0eef, 0x0001)},
+ {}
+};
+
+static void touchkit_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct touchkit_usb *touchkit = urb->context;
+ int retval;
+ int x, y;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ETIMEDOUT:
+ /* this urb is timing out */
+ dbg("%s - urb timed out - was the device unplugged?",
+ __FUNCTION__);
+ return;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d",
+ __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d",
+ __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (swap_xy) {
+ y = TOUCHKIT_GET_X(touchkit->data);
+ x = TOUCHKIT_GET_Y(touchkit->data);
+ } else {
+ x = TOUCHKIT_GET_X(touchkit->data);
+ y = TOUCHKIT_GET_Y(touchkit->data);
+ }
+
+ input_regs(&touchkit->input, regs);
+ input_report_key(&touchkit->input, BTN_TOUCH,
+ TOUCHKIT_GET_TOUCHED(touchkit->data));
+ input_report_abs(&touchkit->input, ABS_X, x);
+ input_report_abs(&touchkit->input, ABS_Y, y);
+ input_sync(&touchkit->input);
+
+exit:
+ retval = usb_submit_urb(urb, GFP_ATOMIC);
+ if (retval)
+ err("%s - usb_submit_urb failed with result: %d",
+ __FUNCTION__, retval);
+}
+
+static int touchkit_open(struct input_dev *input)
+{
+ struct touchkit_usb *touchkit = input->private;
+
+ if (touchkit->open++)
+ return 0;
+
+ touchkit->irq->dev = touchkit->udev;
+
+ if (usb_submit_urb(touchkit->irq, GFP_ATOMIC)) {
+ touchkit->open--;
+ return -EIO;
+ }
+
+ return 0;
+}
+
+static void touchkit_close(struct input_dev *input)
+{
+ struct touchkit_usb *touchkit = input->private;
+
+ if (!--touchkit->open)
+ usb_kill_urb(touchkit->irq);
+}
+
+static int touchkit_alloc_buffers(struct usb_device *udev,
+ struct touchkit_usb *touchkit)
+{
+ touchkit->data = usb_buffer_alloc(udev, TOUCHKIT_REPORT_DATA_SIZE,
+ SLAB_ATOMIC, &touchkit->data_dma);
+
+ if (!touchkit->data)
+ return -1;
+
+ return 0;
+}
+
+static void touchkit_free_buffers(struct usb_device *udev,
+ struct touchkit_usb *touchkit)
+{
+ if (touchkit->data)
+ usb_buffer_free(udev, TOUCHKIT_REPORT_DATA_SIZE,
+ touchkit->data, touchkit->data_dma);
+}
+
+static int touchkit_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ int ret;
+ struct touchkit_usb *touchkit;
+ struct usb_host_interface *interface;
+ struct usb_endpoint_descriptor *endpoint;
+ struct usb_device *udev = interface_to_usbdev(intf);
+ char path[64];
+
+ interface = intf->cur_altsetting;
+ endpoint = &interface->endpoint[0].desc;
+
+ touchkit = kmalloc(sizeof(struct touchkit_usb), GFP_KERNEL);
+ if (!touchkit)
+ return -ENOMEM;
+
+ memset(touchkit, 0, sizeof(struct touchkit_usb));
+ touchkit->udev = udev;
+
+ if (touchkit_alloc_buffers(udev, touchkit)) {
+ ret = -ENOMEM;
+ goto out_free;
+ }
+
+ touchkit->input.private = touchkit;
+ touchkit->input.open = touchkit_open;
+ touchkit->input.close = touchkit_close;
+
+ usb_make_path(udev, path, 64);
+ sprintf(touchkit->phys, "%s/input0", path);
+
+ touchkit->input.name = touchkit->name;
+ touchkit->input.phys = touchkit->phys;
+ touchkit->input.id.bustype = BUS_USB;
+ touchkit->input.id.vendor = le16_to_cpu(udev->descriptor.idVendor);
+ touchkit->input.id.product = le16_to_cpu(udev->descriptor.idProduct);
+ touchkit->input.id.version = le16_to_cpu(udev->descriptor.bcdDevice);
+ touchkit->input.dev = &intf->dev;
+
+ touchkit->input.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
+ touchkit->input.absbit[0] = BIT(ABS_X) | BIT(ABS_Y);
+ touchkit->input.keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
+
+ /* Used to Scale Compensated Data */
+ touchkit->input.absmin[ABS_X] = TOUCHKIT_MIN_XC;
+ touchkit->input.absmax[ABS_X] = TOUCHKIT_MAX_XC;
+ touchkit->input.absfuzz[ABS_X] = TOUCHKIT_XC_FUZZ;
+ touchkit->input.absflat[ABS_X] = TOUCHKIT_XC_FLAT;
+ touchkit->input.absmin[ABS_Y] = TOUCHKIT_MIN_YC;
+ touchkit->input.absmax[ABS_Y] = TOUCHKIT_MAX_YC;
+ touchkit->input.absfuzz[ABS_Y] = TOUCHKIT_YC_FUZZ;
+ touchkit->input.absflat[ABS_Y] = TOUCHKIT_YC_FLAT;
+
+ if (udev->manufacturer)
+ strcat(touchkit->name, udev->manufacturer);
+ if (udev->product)
+ sprintf(touchkit->name, "%s %s", touchkit->name, udev->product);
+
+ if (!strlen(touchkit->name))
+ sprintf(touchkit->name, "USB Touchscreen %04x:%04x",
+ touchkit->input.id.vendor, touchkit->input.id.product);
+
+ touchkit->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!touchkit->irq) {
+ dbg("%s - usb_alloc_urb failed: touchkit->irq", __FUNCTION__);
+ ret = -ENOMEM;
+ goto out_free_buffers;
+ }
+
+ usb_fill_int_urb(touchkit->irq, touchkit->udev,
+ usb_rcvintpipe(touchkit->udev, 0x81),
+ touchkit->data, TOUCHKIT_REPORT_DATA_SIZE,
+ touchkit_irq, touchkit, endpoint->bInterval);
+
+ input_register_device(&touchkit->input);
+
+ printk(KERN_INFO "input: %s on %s\n", touchkit->name, path);
+ usb_set_intfdata(intf, touchkit);
+
+ return 0;
+
+out_free_buffers:
+ touchkit_free_buffers(udev, touchkit);
+out_free:
+ kfree(touchkit);
+ return ret;
+}
+
+static void touchkit_disconnect(struct usb_interface *intf)
+{
+ struct touchkit_usb *touchkit = usb_get_intfdata(intf);
+
+ dbg("%s - called", __FUNCTION__);
+
+ if (!touchkit)
+ return;
+
+ dbg("%s - touchkit is initialized, cleaning up", __FUNCTION__);
+ usb_set_intfdata(intf, NULL);
+ input_unregister_device(&touchkit->input);
+ usb_kill_urb(touchkit->irq);
+ usb_free_urb(touchkit->irq);
+ touchkit_free_buffers(interface_to_usbdev(intf), touchkit);
+ kfree(touchkit);
+}
+
+MODULE_DEVICE_TABLE(usb, touchkit_devices);
+
+static struct usb_driver touchkit_driver = {
+ .owner = THIS_MODULE,
+ .name = "touchkitusb",
+ .probe = touchkit_probe,
+ .disconnect = touchkit_disconnect,
+ .id_table = touchkit_devices,
+};
+
+static int __init touchkit_init(void)
+{
+ return usb_register(&touchkit_driver);
+}
+
+static void __exit touchkit_cleanup(void)
+{
+ usb_deregister(&touchkit_driver);
+}
+
+module_init(touchkit_init);
+module_exit(touchkit_cleanup);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/input/usbkbd.c b/drivers/usb/input/usbkbd.c
new file mode 100644
index 000000000000..01514b0551b8
--- /dev/null
+++ b/drivers/usb/input/usbkbd.c
@@ -0,0 +1,370 @@
+/*
+ * $Id: usbkbd.c,v 1.27 2001/12/27 10:37:41 vojtech Exp $
+ *
+ * Copyright (c) 1999-2001 Vojtech Pavlik
+ *
+ * USB HIDBP Keyboard support
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so either by
+ * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
+ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/input.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION ""
+#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
+#define DRIVER_DESC "USB HID Boot Protocol keyboard driver"
+#define DRIVER_LICENSE "GPL"
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE(DRIVER_LICENSE);
+
+static unsigned char usb_kbd_keycode[256] = {
+ 0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
+ 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 28, 1, 14, 15, 57, 12, 13, 26,
+ 27, 43, 43, 39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 87, 88, 99, 70,119,110,102,104,111,107,109,106,
+ 105,108,103, 69, 98, 55, 74, 78, 96, 79, 80, 81, 75, 76, 77, 71,
+ 72, 73, 82, 83, 86,127,116,117,183,184,185,186,187,188,189,190,
+ 191,192,193,194,134,138,130,132,128,129,131,137,133,135,136,113,
+ 115,114, 0, 0, 0,121, 0, 89, 93,124, 92, 94, 95, 0, 0, 0,
+ 122,123, 90, 91, 85, 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, 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,
+ 29, 42, 56,125, 97, 54,100,126,164,166,165,163,161,115,114,113,
+ 150,158,159,128,136,177,178,176,142,152,173,140
+};
+
+struct usb_kbd {
+ struct input_dev dev;
+ struct usb_device *usbdev;
+ unsigned char old[8];
+ struct urb *irq, *led;
+ unsigned char newleds;
+ char name[128];
+ char phys[64];
+ int open;
+
+ unsigned char *new;
+ struct usb_ctrlrequest *cr;
+ unsigned char *leds;
+ dma_addr_t cr_dma;
+ dma_addr_t new_dma;
+ dma_addr_t leds_dma;
+};
+
+static void usb_kbd_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_kbd *kbd = urb->context;
+ int i;
+
+ switch (urb->status) {
+ case 0: /* success */
+ break;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -ESHUTDOWN:
+ return;
+ /* -EPIPE: should clear the halt */
+ default: /* error */
+ goto resubmit;
+ }
+
+ input_regs(&kbd->dev, regs);
+
+ for (i = 0; i < 8; i++)
+ input_report_key(&kbd->dev, usb_kbd_keycode[i + 224], (kbd->new[0] >> i) & 1);
+
+ for (i = 2; i < 8; i++) {
+
+ if (kbd->old[i] > 3 && memscan(kbd->new + 2, kbd->old[i], 6) == kbd->new + 8) {
+ if (usb_kbd_keycode[kbd->old[i]])
+ input_report_key(&kbd->dev, usb_kbd_keycode[kbd->old[i]], 0);
+ else
+ info("Unknown key (scancode %#x) released.", kbd->old[i]);
+ }
+
+ if (kbd->new[i] > 3 && memscan(kbd->old + 2, kbd->new[i], 6) == kbd->old + 8) {
+ if (usb_kbd_keycode[kbd->new[i]])
+ input_report_key(&kbd->dev, usb_kbd_keycode[kbd->new[i]], 1);
+ else
+ info("Unknown key (scancode %#x) pressed.", kbd->new[i]);
+ }
+ }
+
+ input_sync(&kbd->dev);
+
+ memcpy(kbd->old, kbd->new, 8);
+
+resubmit:
+ i = usb_submit_urb (urb, SLAB_ATOMIC);
+ if (i)
+ err ("can't resubmit intr, %s-%s/input0, status %d",
+ kbd->usbdev->bus->bus_name,
+ kbd->usbdev->devpath, i);
+}
+
+int usb_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
+{
+ struct usb_kbd *kbd = dev->private;
+
+ if (type != EV_LED)
+ return -1;
+
+
+ kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 3) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
+ (!!test_bit(LED_SCROLLL, dev->led) << 2) | (!!test_bit(LED_CAPSL, dev->led) << 1) |
+ (!!test_bit(LED_NUML, dev->led));
+
+ if (kbd->led->status == -EINPROGRESS)
+ return 0;
+
+ if (*(kbd->leds) == kbd->newleds)
+ return 0;
+
+ *(kbd->leds) = kbd->newleds;
+ kbd->led->dev = kbd->usbdev;
+ if (usb_submit_urb(kbd->led, GFP_ATOMIC))
+ err("usb_submit_urb(leds) failed");
+
+ return 0;
+}
+
+static void usb_kbd_led(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_kbd *kbd = urb->context;
+
+ if (urb->status)
+ warn("led urb status %d received", urb->status);
+
+ if (*(kbd->leds) == kbd->newleds)
+ return;
+
+ *(kbd->leds) = kbd->newleds;
+ kbd->led->dev = kbd->usbdev;
+ if (usb_submit_urb(kbd->led, GFP_ATOMIC))
+ err("usb_submit_urb(leds) failed");
+}
+
+static int usb_kbd_open(struct input_dev *dev)
+{
+ struct usb_kbd *kbd = dev->private;
+
+ if (kbd->open++)
+ return 0;
+
+ kbd->irq->dev = kbd->usbdev;
+ if (usb_submit_urb(kbd->irq, GFP_KERNEL)) {
+ kbd->open--;
+ return -EIO;
+ }
+
+ return 0;
+}
+
+static void usb_kbd_close(struct input_dev *dev)
+{
+ struct usb_kbd *kbd = dev->private;
+
+ if (!--kbd->open)
+ usb_kill_urb(kbd->irq);
+}
+
+static int usb_kbd_alloc_mem(struct usb_device *dev, struct usb_kbd *kbd)
+{
+ if (!(kbd->irq = usb_alloc_urb(0, GFP_KERNEL)))
+ return -1;
+ if (!(kbd->led = usb_alloc_urb(0, GFP_KERNEL)))
+ return -1;
+ if (!(kbd->new = usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &kbd->new_dma)))
+ return -1;
+ if (!(kbd->cr = usb_buffer_alloc(dev, sizeof(struct usb_ctrlrequest), SLAB_ATOMIC, &kbd->cr_dma)))
+ return -1;
+ if (!(kbd->leds = usb_buffer_alloc(dev, 1, SLAB_ATOMIC, &kbd->leds_dma)))
+ return -1;
+
+ return 0;
+}
+
+static void usb_kbd_free_mem(struct usb_device *dev, struct usb_kbd *kbd)
+{
+ if (kbd->irq)
+ usb_free_urb(kbd->irq);
+ if (kbd->led)
+ usb_free_urb(kbd->led);
+ if (kbd->new)
+ usb_buffer_free(dev, 8, kbd->new, kbd->new_dma);
+ if (kbd->cr)
+ usb_buffer_free(dev, sizeof(struct usb_ctrlrequest), kbd->cr, kbd->cr_dma);
+ if (kbd->leds)
+ usb_buffer_free(dev, 1, kbd->leds, kbd->leds_dma);
+}
+
+static int usb_kbd_probe(struct usb_interface *iface,
+ const struct usb_device_id *id)
+{
+ struct usb_device * dev = interface_to_usbdev(iface);
+ struct usb_host_interface *interface;
+ struct usb_endpoint_descriptor *endpoint;
+ struct usb_kbd *kbd;
+ int i, pipe, maxp;
+ char path[64];
+
+ interface = iface->cur_altsetting;
+
+ if (interface->desc.bNumEndpoints != 1)
+ return -ENODEV;
+
+ endpoint = &interface->endpoint[0].desc;
+ if (!(endpoint->bEndpointAddress & 0x80))
+ return -ENODEV;
+ if ((endpoint->bmAttributes & 3) != 3)
+ return -ENODEV;
+
+ pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
+ maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+
+ if (!(kbd = kmalloc(sizeof(struct usb_kbd), GFP_KERNEL)))
+ return -ENOMEM;
+ memset(kbd, 0, sizeof(struct usb_kbd));
+
+ if (usb_kbd_alloc_mem(dev, kbd)) {
+ usb_kbd_free_mem(dev, kbd);
+ kfree(kbd);
+ return -ENOMEM;
+ }
+
+ kbd->usbdev = dev;
+
+ kbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP);
+ kbd->dev.ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL) | BIT(LED_COMPOSE) | BIT(LED_KANA);
+
+ for (i = 0; i < 255; i++)
+ set_bit(usb_kbd_keycode[i], kbd->dev.keybit);
+ clear_bit(0, kbd->dev.keybit);
+
+ kbd->dev.private = kbd;
+ kbd->dev.event = usb_kbd_event;
+ kbd->dev.open = usb_kbd_open;
+ kbd->dev.close = usb_kbd_close;
+
+ usb_fill_int_urb(kbd->irq, dev, pipe,
+ kbd->new, (maxp > 8 ? 8 : maxp),
+ usb_kbd_irq, kbd, endpoint->bInterval);
+ kbd->irq->transfer_dma = kbd->new_dma;
+ kbd->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ kbd->cr->bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
+ kbd->cr->bRequest = 0x09;
+ kbd->cr->wValue = cpu_to_le16(0x200);
+ kbd->cr->wIndex = cpu_to_le16(interface->desc.bInterfaceNumber);
+ kbd->cr->wLength = cpu_to_le16(1);
+
+ usb_make_path(dev, path, 64);
+ sprintf(kbd->phys, "%s/input0", path);
+
+ kbd->dev.name = kbd->name;
+ kbd->dev.phys = kbd->phys;
+ kbd->dev.id.bustype = BUS_USB;
+ kbd->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+ kbd->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
+ kbd->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
+ kbd->dev.dev = &iface->dev;
+
+ if (dev->manufacturer)
+ strcat(kbd->name, dev->manufacturer);
+ if (dev->product)
+ sprintf(kbd->name, "%s %s", kbd->name, dev->product);
+
+ if (!strlen(kbd->name))
+ sprintf(kbd->name, "USB HIDBP Keyboard %04x:%04x",
+ kbd->dev.id.vendor, kbd->dev.id.product);
+
+ usb_fill_control_urb(kbd->led, dev, usb_sndctrlpipe(dev, 0),
+ (void *) kbd->cr, kbd->leds, 1,
+ usb_kbd_led, kbd);
+ kbd->led->setup_dma = kbd->cr_dma;
+ kbd->led->transfer_dma = kbd->leds_dma;
+ kbd->led->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP
+ | URB_NO_SETUP_DMA_MAP);
+
+ input_register_device(&kbd->dev);
+
+ printk(KERN_INFO "input: %s on %s\n", kbd->name, path);
+
+ usb_set_intfdata(iface, kbd);
+ return 0;
+}
+
+static void usb_kbd_disconnect(struct usb_interface *intf)
+{
+ struct usb_kbd *kbd = usb_get_intfdata (intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (kbd) {
+ usb_kill_urb(kbd->irq);
+ input_unregister_device(&kbd->dev);
+ usb_kbd_free_mem(interface_to_usbdev(intf), kbd);
+ kfree(kbd);
+ }
+}
+
+static struct usb_device_id usb_kbd_id_table [] = {
+ { USB_INTERFACE_INFO(3, 1, 1) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, usb_kbd_id_table);
+
+static struct usb_driver usb_kbd_driver = {
+ .owner = THIS_MODULE,
+ .name = "usbkbd",
+ .probe = usb_kbd_probe,
+ .disconnect = usb_kbd_disconnect,
+ .id_table = usb_kbd_id_table,
+};
+
+static int __init usb_kbd_init(void)
+{
+ int result = usb_register(&usb_kbd_driver);
+ if (result == 0)
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+ return result;
+}
+
+static void __exit usb_kbd_exit(void)
+{
+ usb_deregister(&usb_kbd_driver);
+}
+
+module_init(usb_kbd_init);
+module_exit(usb_kbd_exit);
diff --git a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c
new file mode 100644
index 000000000000..01155bbddd43
--- /dev/null
+++ b/drivers/usb/input/usbmouse.c
@@ -0,0 +1,252 @@
+/*
+ * $Id: usbmouse.c,v 1.15 2001/12/27 10:37:41 vojtech Exp $
+ *
+ * Copyright (c) 1999-2001 Vojtech Pavlik
+ *
+ * USB HIDBP Mouse support
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so either by
+ * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
+ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/input.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.6"
+#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
+#define DRIVER_DESC "USB HID Boot Protocol mouse driver"
+#define DRIVER_LICENSE "GPL"
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE(DRIVER_LICENSE);
+
+struct usb_mouse {
+ char name[128];
+ char phys[64];
+ struct usb_device *usbdev;
+ struct input_dev dev;
+ struct urb *irq;
+ int open;
+
+ signed char *data;
+ dma_addr_t data_dma;
+};
+
+static void usb_mouse_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_mouse *mouse = urb->context;
+ signed char *data = mouse->data;
+ struct input_dev *dev = &mouse->dev;
+ int status;
+
+ switch (urb->status) {
+ case 0: /* success */
+ break;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -ESHUTDOWN:
+ return;
+ /* -EPIPE: should clear the halt */
+ default: /* error */
+ goto resubmit;
+ }
+
+ input_regs(dev, regs);
+
+ input_report_key(dev, BTN_LEFT, data[0] & 0x01);
+ input_report_key(dev, BTN_RIGHT, data[0] & 0x02);
+ input_report_key(dev, BTN_MIDDLE, data[0] & 0x04);
+ input_report_key(dev, BTN_SIDE, data[0] & 0x08);
+ input_report_key(dev, BTN_EXTRA, data[0] & 0x10);
+
+ input_report_rel(dev, REL_X, data[1]);
+ input_report_rel(dev, REL_Y, data[2]);
+ input_report_rel(dev, REL_WHEEL, data[3]);
+
+ input_sync(dev);
+resubmit:
+ status = usb_submit_urb (urb, SLAB_ATOMIC);
+ if (status)
+ err ("can't resubmit intr, %s-%s/input0, status %d",
+ mouse->usbdev->bus->bus_name,
+ mouse->usbdev->devpath, status);
+}
+
+static int usb_mouse_open(struct input_dev *dev)
+{
+ struct usb_mouse *mouse = dev->private;
+
+ if (mouse->open++)
+ return 0;
+
+ mouse->irq->dev = mouse->usbdev;
+ if (usb_submit_urb(mouse->irq, GFP_KERNEL)) {
+ mouse->open--;
+ return -EIO;
+ }
+
+ return 0;
+}
+
+static void usb_mouse_close(struct input_dev *dev)
+{
+ struct usb_mouse *mouse = dev->private;
+
+ if (!--mouse->open)
+ usb_kill_urb(mouse->irq);
+}
+
+static int usb_mouse_probe(struct usb_interface * intf, const struct usb_device_id * id)
+{
+ struct usb_device * dev = interface_to_usbdev(intf);
+ struct usb_host_interface *interface;
+ struct usb_endpoint_descriptor *endpoint;
+ struct usb_mouse *mouse;
+ int pipe, maxp;
+ char path[64];
+
+ interface = intf->cur_altsetting;
+
+ if (interface->desc.bNumEndpoints != 1)
+ return -ENODEV;
+
+ endpoint = &interface->endpoint[0].desc;
+ if (!(endpoint->bEndpointAddress & 0x80))
+ return -ENODEV;
+ if ((endpoint->bmAttributes & 3) != 3)
+ return -ENODEV;
+
+ pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
+ maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+
+ if (!(mouse = kmalloc(sizeof(struct usb_mouse), GFP_KERNEL)))
+ return -ENOMEM;
+ memset(mouse, 0, sizeof(struct usb_mouse));
+
+ mouse->data = usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &mouse->data_dma);
+ if (!mouse->data) {
+ kfree(mouse);
+ return -ENOMEM;
+ }
+
+ mouse->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!mouse->irq) {
+ usb_buffer_free(dev, 8, mouse->data, mouse->data_dma);
+ kfree(mouse);
+ return -ENODEV;
+ }
+
+ mouse->usbdev = dev;
+
+ mouse->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
+ mouse->dev.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+ mouse->dev.relbit[0] = BIT(REL_X) | BIT(REL_Y);
+ mouse->dev.keybit[LONG(BTN_MOUSE)] |= BIT(BTN_SIDE) | BIT(BTN_EXTRA);
+ mouse->dev.relbit[0] |= BIT(REL_WHEEL);
+
+ mouse->dev.private = mouse;
+ mouse->dev.open = usb_mouse_open;
+ mouse->dev.close = usb_mouse_close;
+
+ usb_make_path(dev, path, 64);
+ sprintf(mouse->phys, "%s/input0", path);
+
+ mouse->dev.name = mouse->name;
+ mouse->dev.phys = mouse->phys;
+ mouse->dev.id.bustype = BUS_USB;
+ mouse->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+ mouse->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
+ mouse->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
+ mouse->dev.dev = &intf->dev;
+
+ if (dev->manufacturer)
+ strcat(mouse->name, dev->manufacturer);
+ if (dev->product)
+ sprintf(mouse->name, "%s %s", mouse->name, dev->product);
+
+ if (!strlen(mouse->name))
+ sprintf(mouse->name, "USB HIDBP Mouse %04x:%04x",
+ mouse->dev.id.vendor, mouse->dev.id.product);
+
+ usb_fill_int_urb(mouse->irq, dev, pipe, mouse->data,
+ (maxp > 8 ? 8 : maxp),
+ usb_mouse_irq, mouse, endpoint->bInterval);
+ mouse->irq->transfer_dma = mouse->data_dma;
+ mouse->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ input_register_device(&mouse->dev);
+ printk(KERN_INFO "input: %s on %s\n", mouse->name, path);
+
+ usb_set_intfdata(intf, mouse);
+ return 0;
+}
+
+static void usb_mouse_disconnect(struct usb_interface *intf)
+{
+ struct usb_mouse *mouse = usb_get_intfdata (intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (mouse) {
+ usb_kill_urb(mouse->irq);
+ input_unregister_device(&mouse->dev);
+ usb_free_urb(mouse->irq);
+ usb_buffer_free(interface_to_usbdev(intf), 8, mouse->data, mouse->data_dma);
+ kfree(mouse);
+ }
+}
+
+static struct usb_device_id usb_mouse_id_table [] = {
+ { USB_INTERFACE_INFO(3, 1, 2) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, usb_mouse_id_table);
+
+static struct usb_driver usb_mouse_driver = {
+ .owner = THIS_MODULE,
+ .name = "usbmouse",
+ .probe = usb_mouse_probe,
+ .disconnect = usb_mouse_disconnect,
+ .id_table = usb_mouse_id_table,
+};
+
+static int __init usb_mouse_init(void)
+{
+ int retval = usb_register(&usb_mouse_driver);
+ if (retval == 0)
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+ return retval;
+}
+
+static void __exit usb_mouse_exit(void)
+{
+ usb_deregister(&usb_mouse_driver);
+}
+
+module_init(usb_mouse_init);
+module_exit(usb_mouse_exit);
diff --git a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c
new file mode 100644
index 000000000000..fec04dda088e
--- /dev/null
+++ b/drivers/usb/input/wacom.c
@@ -0,0 +1,951 @@
+/*
+ * USB Wacom Graphire and Wacom Intuos tablet support
+ *
+ * Copyright (c) 2000-2004 Vojtech Pavlik <vojtech@ucw.cz>
+ * Copyright (c) 2000 Andreas Bach Aaen <abach@stofanet.dk>
+ * Copyright (c) 2000 Clifford Wolf <clifford@clifford.at>
+ * Copyright (c) 2000 Sam Mosel <sam.mosel@computer.org>
+ * Copyright (c) 2000 James E. Blair <corvus@gnu.org>
+ * Copyright (c) 2000 Daniel Egger <egger@suse.de>
+ * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com>
+ * Copyright (c) 2004 Panagiotis Issaris <panagiotis.issaris@mech.kuleuven.ac.be>
+ * Copyright (c) 2002-2004 Ping Cheng <pingc@wacom.com>
+ *
+ * ChangeLog:
+ * v0.1 (vp) - Initial release
+ * v0.2 (aba) - Support for all buttons / combinations
+ * v0.3 (vp) - Support for Intuos added
+ * v0.4 (sm) - Support for more Intuos models, menustrip
+ * relative mode, proximity.
+ * v0.5 (vp) - Big cleanup, nifty features removed,
+ * they belong in userspace
+ * v1.8 (vp) - Submit URB only when operating, moved to CVS,
+ * use input_report_key instead of report_btn and
+ * other cleanups
+ * v1.11 (vp) - Add URB ->dev setting for new kernels
+ * v1.11 (jb) - Add support for the 4D Mouse & Lens
+ * v1.12 (de) - Add support for two more inking pen IDs
+ * v1.14 (vp) - Use new USB device id probing scheme.
+ * Fix Wacom Graphire mouse wheel
+ * v1.18 (vp) - Fix mouse wheel direction
+ * Make mouse relative
+ * v1.20 (fl) - Report tool id for Intuos devices
+ * - Multi tools support
+ * - Corrected Intuos protocol decoding (airbrush, 4D mouse, lens cursor...)
+ * - Add PL models support
+ * - Fix Wacom Graphire mouse wheel again
+ * 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
+ * v1.29 (pc) - Add support for more tablets
+ * - Fix pressure reporting
+ * v1.30 (vp) - Merge 2.4 and 2.5 drivers
+ * - Since 2.5 now has input_sync(), remove MSC_SERIAL abuse
+ * - Cleanups here and there
+ * v1.30.1 (pi) - Added Graphire3 support
+ * v1.40 (pc) - Add support for several new devices, fix eraser reporting, ...
+ */
+
+/*
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/input.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+#include <asm/unaligned.h>
+#include <asm/byteorder.h>
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.40"
+#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
+#define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver"
+#define DRIVER_LICENSE "GPL"
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE(DRIVER_LICENSE);
+
+#define USB_VENDOR_ID_WACOM 0x056a
+
+struct wacom_features {
+ char *name;
+ int pktlen;
+ int x_max;
+ int y_max;
+ int pressure_max;
+ int distance_max;
+ int type;
+ usb_complete_t irq;
+};
+
+struct wacom {
+ signed char *data;
+ dma_addr_t data_dma;
+ struct input_dev dev;
+ struct usb_device *usbdev;
+ struct urb *irq;
+ struct wacom_features *features;
+ int tool[2];
+ int open;
+ __u32 serial[2];
+ char phys[32];
+};
+
+#define USB_REQ_SET_REPORT 0x09
+static int usb_set_report(struct usb_interface *intf, unsigned char type,
+ unsigned char id, void *buf, int size)
+{
+ return usb_control_msg(interface_to_usbdev(intf),
+ usb_sndctrlpipe(interface_to_usbdev(intf), 0),
+ USB_REQ_SET_REPORT, USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ (type << 8) + id, intf->altsetting[0].desc.bInterfaceNumber,
+ buf, size, 1000);
+}
+
+static void wacom_pl_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct wacom *wacom = urb->context;
+ unsigned char *data = wacom->data;
+ struct input_dev *dev = &wacom->dev;
+ int prox, pressure;
+ int retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (data[0] != 2) {
+ dbg("wacom_pl_irq: received unknown report #%d", data[0]);
+ goto exit;
+ }
+
+ prox = data[1] & 0x40;
+
+ input_regs(dev, regs);
+
+ if (prox) {
+
+ pressure = (signed char)((data[7] << 1) | ((data[4] >> 2) & 1));
+ if (wacom->features->pressure_max > 255)
+ pressure = (pressure << 1) | ((data[4] >> 6) & 1);
+ pressure += (wacom->features->pressure_max + 1) / 2;
+
+ /*
+ * if going from out of proximity into proximity select between the eraser
+ * and the pen based on the state of the stylus2 button, choose eraser if
+ * pressed else choose pen. if not a proximity change from out to in, send
+ * an out of proximity for previous tool then a in for new tool.
+ */
+ if (!wacom->tool[0]) {
+ /* Going into proximity select tool */
+ wacom->tool[1] = (data[4] & 0x20)? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
+ }
+ else {
+ /* was entered with stylus2 pressed */
+ if (wacom->tool[1] == BTN_TOOL_RUBBER && !(data[4] & 0x20) ) {
+ /* report out proximity for previous tool */
+ input_report_key(dev, wacom->tool[1], 0);
+ input_sync(dev);
+ wacom->tool[1] = BTN_TOOL_PEN;
+ goto exit;
+ }
+ }
+ if (wacom->tool[1] != BTN_TOOL_RUBBER) {
+ /* Unknown tool selected default to pen tool */
+ wacom->tool[1] = BTN_TOOL_PEN;
+ }
+ input_report_key(dev, wacom->tool[1], prox); /* report in proximity for tool */
+ input_report_abs(dev, ABS_X, data[3] | ((__u32)data[2] << 7) | ((__u32)(data[1] & 0x03) << 14));
+ input_report_abs(dev, ABS_Y, data[6] | ((__u32)data[5] << 7) | ((__u32)(data[4] & 0x03) << 14));
+ input_report_abs(dev, ABS_PRESSURE, pressure);
+
+ input_report_key(dev, BTN_TOUCH, data[4] & 0x08);
+ input_report_key(dev, BTN_STYLUS, data[4] & 0x10);
+ /* Only allow the stylus2 button to be reported for the pen tool. */
+ input_report_key(dev, BTN_STYLUS2, (wacom->tool[1] == BTN_TOOL_PEN) && (data[4] & 0x20));
+ }
+ else {
+ /* report proximity-out of a (valid) tool */
+ if (wacom->tool[1] != BTN_TOOL_RUBBER) {
+ /* Unknown tool selected default to pen tool */
+ wacom->tool[1] = BTN_TOOL_PEN;
+ }
+ input_report_key(dev, wacom->tool[1], prox);
+ }
+
+ wacom->tool[0] = prox; /* Save proximity state */
+ input_sync(dev);
+
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+static void wacom_ptu_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct wacom *wacom = urb->context;
+ unsigned char *data = wacom->data;
+ struct input_dev *dev = &wacom->dev;
+ int retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (data[0] != 2)
+ {
+ printk(KERN_INFO "wacom_ptu_irq: received unknown report #%d\n", data[0]);
+ goto exit;
+ }
+
+ input_regs(dev, regs);
+ if (data[1] & 0x04)
+ {
+ input_report_key(dev, BTN_TOOL_RUBBER, data[1] & 0x20);
+ input_report_key(dev, BTN_TOUCH, data[1] & 0x08);
+ }
+ else
+ {
+ input_report_key(dev, BTN_TOOL_PEN, data[1] & 0x20);
+ input_report_key(dev, BTN_TOUCH, data[1] & 0x01);
+ }
+ input_report_abs(dev, ABS_X, le16_to_cpu(*(__le16 *) &data[2]));
+ input_report_abs(dev, ABS_Y, le16_to_cpu(*(__le16 *) &data[4]));
+ input_report_abs(dev, ABS_PRESSURE, le16_to_cpu(*(__le16 *) &data[6]));
+ input_report_key(dev, BTN_STYLUS, data[1] & 0x02);
+ input_report_key(dev, BTN_STYLUS2, data[1] & 0x10);
+
+ input_sync(dev);
+
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+static void wacom_penpartner_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct wacom *wacom = urb->context;
+ unsigned char *data = wacom->data;
+ struct input_dev *dev = &wacom->dev;
+ int retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (data[0] != 2) {
+ printk(KERN_INFO "wacom_penpartner_irq: received unknown report #%d\n", data[0]);
+ goto exit;
+ }
+
+ input_regs(dev, regs);
+ input_report_key(dev, BTN_TOOL_PEN, 1);
+ input_report_abs(dev, ABS_X, le16_to_cpu(*(__le16 *) &data[1]));
+ input_report_abs(dev, ABS_Y, le16_to_cpu(*(__le16 *) &data[3]));
+ input_report_abs(dev, ABS_PRESSURE, (signed char)data[6] + 127);
+ input_report_key(dev, BTN_TOUCH, ((signed char)data[6] > -80) && !(data[5] & 0x20));
+ input_report_key(dev, BTN_STYLUS, (data[5] & 0x40));
+ input_sync(dev);
+
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct wacom *wacom = urb->context;
+ unsigned char *data = wacom->data;
+ struct input_dev *dev = &wacom->dev;
+ int x, y;
+ int retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (data[0] != 2) {
+ dbg("wacom_graphire_irq: received unknown report #%d", data[0]);
+ goto exit;
+ }
+
+ x = le16_to_cpu(*(__le16 *) &data[2]);
+ y = le16_to_cpu(*(__le16 *) &data[4]);
+
+ input_regs(dev, regs);
+
+ switch ((data[1] >> 5) & 3) {
+
+ case 0: /* Pen */
+ input_report_key(dev, BTN_TOOL_PEN, data[1] & 0x80);
+ break;
+
+ case 1: /* Rubber */
+ input_report_key(dev, BTN_TOOL_RUBBER, data[1] & 0x80);
+ break;
+
+ case 2: /* Mouse with wheel */
+ input_report_key(dev, BTN_MIDDLE, data[1] & 0x04);
+ input_report_rel(dev, REL_WHEEL, (signed char) data[6]);
+ /* fall through */
+
+ case 3: /* Mouse without wheel */
+ input_report_key(dev, BTN_TOOL_MOUSE, data[7] > 24);
+ input_report_key(dev, BTN_LEFT, data[1] & 0x01);
+ input_report_key(dev, BTN_RIGHT, data[1] & 0x02);
+ input_report_abs(dev, ABS_DISTANCE, data[7]);
+
+ input_report_abs(dev, ABS_X, x);
+ input_report_abs(dev, ABS_Y, y);
+
+ input_sync(dev);
+ goto exit;
+ }
+
+ if (data[1] & 0x80) {
+ input_report_abs(dev, ABS_X, x);
+ input_report_abs(dev, ABS_Y, y);
+ }
+
+ input_report_abs(dev, ABS_PRESSURE, le16_to_cpu(*(__le16 *) &data[6]));
+ input_report_key(dev, BTN_TOUCH, data[1] & 0x01);
+ input_report_key(dev, BTN_STYLUS, data[1] & 0x02);
+ input_report_key(dev, BTN_STYLUS2, data[1] & 0x04);
+
+ input_sync(dev);
+
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+static int wacom_intuos_inout(struct urb *urb)
+{
+ struct wacom *wacom = urb->context;
+ unsigned char *data = wacom->data;
+ struct input_dev *dev = &wacom->dev;
+ int idx;
+
+ /* tool number */
+ idx = data[1] & 0x01;
+
+ /* Enter report */
+ if ((data[1] & 0xfc) == 0xc0)
+ {
+ /* serial number of the tool */
+ wacom->serial[idx] = ((__u32)(data[3] & 0x0f) << 28) +
+ ((__u32)data[4] << 20) + ((__u32)data[5] << 12) +
+ ((__u32)data[6] << 4) + (data[7] >> 4);
+
+ switch (((__u32)data[2] << 4) | (data[3] >> 4)) {
+ case 0x812: /* Inking pen */
+ case 0x801: /* Intuos3 Inking pen */
+ case 0x012:
+ wacom->tool[idx] = BTN_TOOL_PENCIL;
+ break;
+ case 0x822: /* Pen */
+ case 0x842:
+ case 0x852:
+ case 0x823: /* Intuos3 Grip Pen */
+ case 0x813: /* Intuos3 Classic Pen */
+ case 0x885: /* Intuos3 Marker Pen */
+ case 0x022:
+ wacom->tool[idx] = BTN_TOOL_PEN;
+ break;
+ case 0x832: /* Stroke pen */
+ case 0x032:
+ wacom->tool[idx] = BTN_TOOL_BRUSH;
+ break;
+ case 0x007: /* Mouse 4D and 2D */
+ case 0x09c:
+ case 0x094:
+ case 0x017: /* Intuos3 2D Mouse */
+ wacom->tool[idx] = BTN_TOOL_MOUSE;
+ break;
+ case 0x096: /* Lens cursor */
+ case 0x097: /* Intuos3 Lens cursor */
+ wacom->tool[idx] = BTN_TOOL_LENS;
+ break;
+ case 0x82a: /* Eraser */
+ case 0x85a:
+ case 0x91a:
+ case 0xd1a:
+ case 0x0fa:
+ case 0x82b: /* Intuos3 Grip Pen Eraser */
+ case 0x81b: /* Intuos3 Classic Pen Eraser */
+ case 0x91b: /* Intuos3 Airbrush Eraser */
+ wacom->tool[idx] = BTN_TOOL_RUBBER;
+ break;
+ case 0xd12:
+ case 0x912:
+ case 0x112:
+ case 0x913: /* Intuos3 Airbrush */
+ wacom->tool[idx] = BTN_TOOL_AIRBRUSH;
+ break; /* Airbrush */
+ default: /* Unknown tool */
+ wacom->tool[idx] = BTN_TOOL_PEN;
+ }
+ input_report_key(dev, wacom->tool[idx], 1);
+ input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
+ input_sync(dev);
+ return 1;
+ }
+
+ /* Exit report */
+ if ((data[1] & 0xfe) == 0x80) {
+ input_report_key(dev, wacom->tool[idx], 0);
+ input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
+ input_sync(dev);
+ return 1;
+ }
+
+ return 0;
+}
+
+static void wacom_intuos_general(struct urb *urb)
+{
+ struct wacom *wacom = urb->context;
+ unsigned char *data = wacom->data;
+ struct input_dev *dev = &wacom->dev;
+ unsigned int t;
+
+ /* general pen packet */
+ if ((data[1] & 0xb8) == 0xa0)
+ {
+ t = ((__u32)data[6] << 2) | ((data[7] >> 6) & 3);
+ input_report_abs(dev, ABS_PRESSURE, t);
+ input_report_abs(dev, ABS_TILT_X,
+ ((data[7] << 1) & 0x7e) | (data[8] >> 7));
+ input_report_abs(dev, ABS_TILT_Y, data[8] & 0x7f);
+ input_report_key(dev, BTN_STYLUS, data[1] & 2);
+ input_report_key(dev, BTN_STYLUS2, data[1] & 4);
+ input_report_key(dev, BTN_TOUCH, t > 10);
+ }
+
+ /* airbrush second packet */
+ if ((data[1] & 0xbc) == 0xb4)
+ {
+ input_report_abs(dev, ABS_WHEEL,
+ ((__u32)data[6] << 2) | ((data[7] >> 6) & 3));
+ input_report_abs(dev, ABS_TILT_X,
+ ((data[7] << 1) & 0x7e) | (data[8] >> 7));
+ input_report_abs(dev, ABS_TILT_Y, data[8] & 0x7f);
+ }
+ return;
+}
+
+static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct wacom *wacom = urb->context;
+ unsigned char *data = wacom->data;
+ struct input_dev *dev = &wacom->dev;
+ unsigned int t;
+ int idx;
+ int retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (data[0] != 2 && data[0] != 5 && data[0] != 6) {
+ dbg("wacom_intuos_irq: received unknown report #%d", data[0]);
+ goto exit;
+ }
+
+ input_regs(dev, regs);
+
+ /* tool number */
+ idx = data[1] & 0x01;
+
+ /* process in/out prox events */
+ if (wacom_intuos_inout(urb)) goto exit;
+
+ input_report_abs(dev, ABS_X, be16_to_cpu(*(__be16 *) &data[2]));
+ input_report_abs(dev, ABS_Y, be16_to_cpu(*(__be16 *) &data[4]));
+ input_report_abs(dev, ABS_DISTANCE, data[9]);
+
+ /* process general packets */
+ wacom_intuos_general(urb);
+
+ if ((data[1] & 0xbc) == 0xa8 || (data[1] & 0xbe) == 0xb0) { /* 4D mouse or Lens cursor packets */
+
+ if (data[1] & 0x02) { /* Rotation packet */
+
+ t = ((__u32)data[6] << 3) | ((data[7] >> 5) & 7);
+ input_report_abs(dev, ABS_RZ, (data[7] & 0x20) ? ((t - 1) / 2) : -t / 2);
+
+ } else {
+
+ if ((data[1] & 0x10) == 0) { /* 4D mouse packets */
+
+ input_report_key(dev, BTN_LEFT, data[8] & 0x01);
+ input_report_key(dev, BTN_MIDDLE, data[8] & 0x02);
+ input_report_key(dev, BTN_RIGHT, data[8] & 0x04);
+
+ input_report_key(dev, BTN_SIDE, data[8] & 0x20);
+ input_report_key(dev, BTN_EXTRA, data[8] & 0x10);
+ t = ((__u32)data[6] << 2) | ((data[7] >> 6) & 3);
+ input_report_abs(dev, ABS_THROTTLE, (data[8] & 0x08) ? -t : t);
+
+ } else {
+ if (wacom->tool[idx] == BTN_TOOL_MOUSE) { /* 2D mouse packets */
+ input_report_key(dev, BTN_LEFT, data[8] & 0x04);
+ input_report_key(dev, BTN_MIDDLE, data[8] & 0x08);
+ input_report_key(dev, BTN_RIGHT, data[8] & 0x10);
+ input_report_rel(dev, REL_WHEEL,
+ (-(__u32)(data[8] & 0x01) + (__u32)((data[8] & 0x02) >> 1)));
+ }
+ else { /* Lens cursor packets */
+ input_report_key(dev, BTN_LEFT, data[8] & 0x01);
+ input_report_key(dev, BTN_MIDDLE, data[8] & 0x02);
+ input_report_key(dev, BTN_RIGHT, data[8] & 0x04);
+ input_report_key(dev, BTN_SIDE, data[8] & 0x10);
+ input_report_key(dev, BTN_EXTRA, data[8] & 0x08);
+ }
+ }
+ }
+ }
+
+ input_report_key(dev, wacom->tool[idx], 1);
+ input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
+ input_sync(dev);
+
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+static void wacom_intuos3_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct wacom *wacom = urb->context;
+ unsigned char *data = wacom->data;
+ struct input_dev *dev = &wacom->dev;
+ unsigned int t;
+ int idx, retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ /* check for valid report */
+ if (data[0] != 2 && data[0] != 5 && data[0] != 12)
+ {
+ printk(KERN_INFO "wacom_intuos3_irq: received unknown report #%d\n", data[0]);
+ goto exit;
+ }
+
+ input_regs(dev, regs);
+
+ /* tool index is always 0 here since there is no dual input tool */
+ idx = data[1] & 0x01;
+
+ /* pad packets. Works as a second tool and is always in prox */
+ if (data[0] == 12)
+ {
+ /* initiate the pad as a device */
+ if (wacom->tool[1] != BTN_TOOL_FINGER)
+ {
+ wacom->tool[1] = BTN_TOOL_FINGER;
+ input_report_key(dev, wacom->tool[1], 1);
+ }
+ input_report_key(dev, BTN_0, (data[5] & 0x01));
+ input_report_key(dev, BTN_1, (data[5] & 0x02));
+ input_report_key(dev, BTN_2, (data[5] & 0x04));
+ input_report_key(dev, BTN_3, (data[5] & 0x08));
+ input_report_key(dev, BTN_4, (data[6] & 0x01));
+ input_report_key(dev, BTN_5, (data[6] & 0x02));
+ input_report_key(dev, BTN_6, (data[6] & 0x04));
+ input_report_key(dev, BTN_7, (data[6] & 0x08));
+ input_report_abs(dev, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]);
+ input_report_abs(dev, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]);
+ input_event(dev, EV_MSC, MSC_SERIAL, 0xffffffff);
+ input_sync(dev);
+ goto exit;
+ }
+
+ /* process in/out prox events */
+ if (wacom_intuos_inout(urb)) goto exit;
+
+ input_report_abs(dev, ABS_X, ((__u32)data[2] << 9) | ((__u32)data[3] << 1) | ((data[9] >> 1) & 1));
+ input_report_abs(dev, ABS_Y, ((__u32)data[4] << 9) | ((__u32)data[5] << 1) | (data[9] & 1));
+ input_report_abs(dev, ABS_DISTANCE, ((data[9] >> 2) & 0x3f));
+
+ /* process general packets */
+ wacom_intuos_general(urb);
+
+ if ((data[1] & 0xbc) == 0xa8 || (data[1] & 0xbe) == 0xb0)
+ {
+ /* Marker pen rotation packet. Reported as wheel due to valuator limitation */
+ if (data[1] & 0x02)
+ {
+ t = ((__u32)data[6] << 3) | ((data[7] >> 5) & 7);
+ t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) :
+ ((t-1) / 2 + 450)) : (450 - t / 2) ;
+ input_report_abs(dev, ABS_WHEEL, t);
+ }
+
+ /* 2D mouse packets */
+ if (wacom->tool[idx] == BTN_TOOL_MOUSE)
+ {
+ input_report_key(dev, BTN_LEFT, data[8] & 0x04);
+ input_report_key(dev, BTN_MIDDLE, data[8] & 0x08);
+ input_report_key(dev, BTN_RIGHT, data[8] & 0x10);
+ input_report_key(dev, BTN_SIDE, data[8] & 0x40);
+ input_report_key(dev, BTN_EXTRA, data[8] & 0x20);
+ /* mouse wheel is positive when rolled backwards */
+ input_report_rel(dev, REL_WHEEL, ((__u32)((data[8] & 0x02) >> 1)
+ - (__u32)(data[8] & 0x01)));
+ }
+ }
+
+ input_report_key(dev, wacom->tool[idx], 1);
+ input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
+ input_sync(dev);
+
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+static struct wacom_features wacom_features[] = {
+ { "Wacom Penpartner", 7, 5040, 3780, 255, 32, 0, wacom_penpartner_irq },
+ { "Wacom Graphire", 8, 10206, 7422, 511, 32, 1, wacom_graphire_irq },
+ { "Wacom Graphire2 4x5", 8, 10206, 7422, 511, 32, 1, wacom_graphire_irq },
+ { "Wacom Graphire2 5x7", 8, 13918, 10206, 511, 32, 1, wacom_graphire_irq },
+ { "Wacom Graphire3", 8, 10208, 7424, 511, 32, 1, wacom_graphire_irq },
+ { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 32, 1, wacom_graphire_irq },
+ { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom Intuos 12x12", 10, 30480, 31680, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom Intuos 12x18", 10, 45720, 31680, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom PL400", 8, 5408, 4056, 255, 32, 3, wacom_pl_irq },
+ { "Wacom PL500", 8, 6144, 4608, 255, 32, 3, wacom_pl_irq },
+ { "Wacom PL600", 8, 6126, 4604, 255, 32, 3, wacom_pl_irq },
+ { "Wacom PL600SX", 8, 6260, 5016, 255, 32, 3, wacom_pl_irq },
+ { "Wacom PL550", 8, 6144, 4608, 511, 32, 3, wacom_pl_irq },
+ { "Wacom PL800", 8, 7220, 5780, 511, 32, 3, wacom_pl_irq },
+ { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom Intuos2 9x12", 10, 30480, 24060, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom Intuos2 12x12", 10, 30480, 31680, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom Intuos2 12x18", 10, 45720, 31680, 1023, 15, 2, wacom_intuos_irq },
+ { "Wacom Volito", 8, 5104, 3712, 511, 32, 1, wacom_graphire_irq },
+ { "Wacom Cintiq Partner",8, 20480, 15360, 511, 32, 3, wacom_ptu_irq },
+ { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 15, 4, wacom_intuos3_irq },
+ { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 15, 4, wacom_intuos3_irq },
+ { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 15, 4, wacom_intuos3_irq },
+ { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 15, 2, wacom_intuos_irq },
+ { }
+};
+
+static struct usb_device_id wacom_ids[] = {
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x00) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x10) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x11) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x12) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x23) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x24) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x30) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x31) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x32) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x33) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x34) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x35) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x41) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x42) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x43) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x44) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x45) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2) },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x47) },
+ { }
+};
+
+MODULE_DEVICE_TABLE(usb, wacom_ids);
+
+static int wacom_open(struct input_dev *dev)
+{
+ struct wacom *wacom = dev->private;
+
+ if (wacom->open++)
+ return 0;
+
+ wacom->irq->dev = wacom->usbdev;
+ if (usb_submit_urb(wacom->irq, GFP_KERNEL)) {
+ wacom->open--;
+ return -EIO;
+ }
+
+ return 0;
+}
+
+static void wacom_close(struct input_dev *dev)
+{
+ struct wacom *wacom = dev->private;
+
+ if (!--wacom->open)
+ usb_kill_urb(wacom->irq);
+}
+
+static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct usb_endpoint_descriptor *endpoint;
+ char rep_data[2] = {0x02, 0x02};
+ struct wacom *wacom;
+ char path[64];
+
+ if (!(wacom = kmalloc(sizeof(struct wacom), GFP_KERNEL)))
+ return -ENOMEM;
+ memset(wacom, 0, sizeof(struct wacom));
+
+ wacom->data = usb_buffer_alloc(dev, 10, GFP_KERNEL, &wacom->data_dma);
+ if (!wacom->data) {
+ kfree(wacom);
+ return -ENOMEM;
+ }
+
+ wacom->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!wacom->irq) {
+ usb_buffer_free(dev, 10, wacom->data, wacom->data_dma);
+ kfree(wacom);
+ return -ENOMEM;
+ }
+
+ wacom->features = wacom_features + (id - wacom_ids);
+
+ wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS);
+ wacom->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
+ wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS);
+
+ switch (wacom->features->type) {
+ case 1:
+ wacom->dev.evbit[0] |= BIT(EV_REL);
+ wacom->dev.relbit[0] |= BIT(REL_WHEEL);
+ wacom->dev.absbit[0] |= BIT(ABS_DISTANCE);
+ wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+ wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_STYLUS2);
+ break;
+
+ case 4: /* new functions for Intuos3 */
+ wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
+ wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3) | BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
+ wacom->dev.absbit[0] |= BIT(ABS_RX) | BIT(ABS_RY);
+ /* fall through */
+
+ case 2:
+ wacom->dev.evbit[0] |= BIT(EV_MSC) | BIT(EV_REL);
+ wacom->dev.mscbit[0] |= BIT(MSC_SERIAL);
+ wacom->dev.relbit[0] |= BIT(REL_WHEEL);
+ wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
+ wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOOL_BRUSH)
+ | BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS) | BIT(BTN_STYLUS2);
+ wacom->dev.absbit[0] |= BIT(ABS_DISTANCE) | BIT(ABS_WHEEL) | BIT(ABS_TILT_X) | BIT(ABS_TILT_Y) | BIT(ABS_RZ) | BIT(ABS_THROTTLE);
+ break;
+
+ case 3:
+ wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_STYLUS2) | BIT(BTN_TOOL_RUBBER);
+ break;
+ }
+
+ wacom->dev.absmax[ABS_X] = wacom->features->x_max;
+ wacom->dev.absmax[ABS_Y] = wacom->features->y_max;
+ wacom->dev.absmax[ABS_PRESSURE] = wacom->features->pressure_max;
+ wacom->dev.absmax[ABS_DISTANCE] = wacom->features->distance_max;
+ wacom->dev.absmax[ABS_TILT_X] = 127;
+ wacom->dev.absmax[ABS_TILT_Y] = 127;
+ wacom->dev.absmax[ABS_WHEEL] = 1023;
+
+ wacom->dev.absmax[ABS_RX] = 4097;
+ wacom->dev.absmax[ABS_RY] = 4097;
+ wacom->dev.absmin[ABS_RZ] = -900;
+ wacom->dev.absmax[ABS_RZ] = 899;
+ wacom->dev.absmin[ABS_THROTTLE] = -1023;
+ wacom->dev.absmax[ABS_THROTTLE] = 1023;
+
+ wacom->dev.absfuzz[ABS_X] = 4;
+ wacom->dev.absfuzz[ABS_Y] = 4;
+
+ wacom->dev.private = wacom;
+ wacom->dev.open = wacom_open;
+ wacom->dev.close = wacom_close;
+
+ usb_make_path(dev, path, 64);
+ sprintf(wacom->phys, "%s/input0", path);
+
+ wacom->dev.name = wacom->features->name;
+ wacom->dev.phys = wacom->phys;
+ wacom->dev.id.bustype = BUS_USB;
+ wacom->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+ wacom->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
+ wacom->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
+ wacom->dev.dev = &intf->dev;
+ wacom->usbdev = dev;
+
+ endpoint = &intf->cur_altsetting->endpoint[0].desc;
+
+ if (wacom->features->pktlen > 10)
+ BUG();
+
+ usb_fill_int_urb(wacom->irq, dev,
+ usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+ wacom->data, wacom->features->pktlen,
+ wacom->features->irq, wacom, endpoint->bInterval);
+ wacom->irq->transfer_dma = wacom->data_dma;
+ wacom->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ input_register_device(&wacom->dev);
+
+ /* ask the tablet to report tablet data */
+ usb_set_report(intf, 3, 2, rep_data, 2);
+ /* repeat once (not sure why the first call often fails) */
+ usb_set_report(intf, 3, 2, rep_data, 2);
+
+ printk(KERN_INFO "input: %s on %s\n", wacom->features->name, path);
+
+ usb_set_intfdata(intf, wacom);
+
+ return 0;
+}
+
+static void wacom_disconnect(struct usb_interface *intf)
+{
+ struct wacom *wacom = usb_get_intfdata (intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (wacom) {
+ usb_kill_urb(wacom->irq);
+ input_unregister_device(&wacom->dev);
+ usb_free_urb(wacom->irq);
+ usb_buffer_free(interface_to_usbdev(intf), 10, wacom->data, wacom->data_dma);
+ kfree(wacom);
+ }
+}
+
+static struct usb_driver wacom_driver = {
+ .owner = THIS_MODULE,
+ .name = "wacom",
+ .probe = wacom_probe,
+ .disconnect = wacom_disconnect,
+ .id_table = wacom_ids,
+};
+
+static int __init wacom_init(void)
+{
+ int result = usb_register(&wacom_driver);
+ if (result == 0)
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+ return result;
+}
+
+static void __exit wacom_exit(void)
+{
+ usb_deregister(&wacom_driver);
+}
+
+module_init(wacom_init);
+module_exit(wacom_exit);
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
new file mode 100644
index 000000000000..d65edb22e545
--- /dev/null
+++ b/drivers/usb/input/xpad.c
@@ -0,0 +1,362 @@
+/*
+ * X-Box gamepad - v0.0.5
+ *
+ * Copyright (c) 2002 Marko Friedemann <mfr@bmx-chemnitz.de>
+ *
+ *
+ * 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
+ *
+ *
+ * This driver is based on:
+ * - information from http://euc.jp/periphs/xbox-controller.ja.html
+ * - the iForce driver drivers/char/joystick/iforce.c
+ * - the skeleton-driver drivers/usb/usb-skeleton.c
+ *
+ * Thanks to:
+ * - ITO Takayuki for providing essential xpad information on his website
+ * - Vojtech Pavlik - iforce driver / input subsystem
+ * - Greg Kroah-Hartman - usb-skeleton driver
+ *
+ * TODO:
+ * - fine tune axes
+ * - fix "analog" buttons (reported as digital now)
+ * - get rumble working
+ *
+ * History:
+ *
+ * 2002-06-27 - 0.0.1 : first version, just said "XBOX HID controller"
+ *
+ * 2002-07-02 - 0.0.2 : basic working version
+ * - all axes and 9 of the 10 buttons work (german InterAct device)
+ * - the black button does not work
+ *
+ * 2002-07-14 - 0.0.3 : rework by Vojtech Pavlik
+ * - indentation fixes
+ * - usb + input init sequence fixes
+ *
+ * 2002-07-16 - 0.0.4 : minor changes, merge with Vojtech's v0.0.3
+ * - verified the lack of HID and report descriptors
+ * - verified that ALL buttons WORK
+ * - fixed d-pad to axes mapping
+ *
+ * 2002-07-17 - 0.0.5 : simplified d-pad handling
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/input.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/smp_lock.h>
+#include <linux/usb.h>
+
+#define DRIVER_VERSION "v0.0.5"
+#define DRIVER_AUTHOR "Marko Friedemann <mfr@bmx-chemnitz.de>"
+#define DRIVER_DESC "X-Box pad driver"
+
+#define XPAD_PKT_LEN 32
+
+static struct xpad_device {
+ u16 idVendor;
+ u16 idProduct;
+ char *name;
+} xpad_device[] = {
+ { 0x045e, 0x0202, "Microsoft X-Box pad (US)" },
+ { 0x045e, 0x0285, "Microsoft X-Box pad (Japan)" },
+ { 0x05fd, 0x107a, "InterAct 'PowerPad Pro' X-Box pad (Germany)" },
+ { 0x0000, 0x0000, "X-Box pad" }
+};
+
+static signed short xpad_btn[] = {
+ BTN_A, BTN_B, BTN_C, BTN_X, BTN_Y, BTN_Z, /* "analog" buttons */
+ BTN_START, BTN_BACK, BTN_THUMBL, BTN_THUMBR, /* start/back/sticks */
+ -1 /* terminating entry */
+};
+
+static signed short xpad_abs[] = {
+ ABS_X, ABS_Y, /* left stick */
+ ABS_RX, ABS_RY, /* right stick */
+ ABS_Z, ABS_RZ, /* triggers left/right */
+ ABS_HAT0X, ABS_HAT0Y, /* digital pad */
+ -1 /* terminating entry */
+};
+
+static struct usb_device_id xpad_table [] = {
+ { USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */
+ { }
+};
+
+MODULE_DEVICE_TABLE (usb, xpad_table);
+
+struct usb_xpad {
+ struct input_dev dev; /* input device interface */
+ struct usb_device *udev; /* usb device */
+
+ struct urb *irq_in; /* urb for interrupt in report */
+ unsigned char *idata; /* input data */
+ dma_addr_t idata_dma;
+
+ char phys[65]; /* physical device path */
+ int open_count; /* reference count */
+};
+
+/*
+ * xpad_process_packet
+ *
+ * Completes a request by converting the data into events for the
+ * input subsystem.
+ *
+ * The used report descriptor was taken from ITO Takayukis website:
+ * http://euc.jp/periphs/xbox-controller.ja.html
+ */
+
+static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *data, struct pt_regs *regs)
+{
+ struct input_dev *dev = &xpad->dev;
+
+ input_regs(dev, regs);
+
+ /* left stick */
+ input_report_abs(dev, ABS_X, (__s16) (((__s16)data[13] << 8) | data[12]));
+ input_report_abs(dev, ABS_Y, (__s16) (((__s16)data[15] << 8) | data[14]));
+
+ /* right stick */
+ input_report_abs(dev, ABS_RX, (__s16) (((__s16)data[17] << 8) | data[16]));
+ input_report_abs(dev, ABS_RY, (__s16) (((__s16)data[19] << 8) | data[18]));
+
+ /* triggers left/right */
+ input_report_abs(dev, ABS_Z, data[10]);
+ input_report_abs(dev, ABS_RZ, data[11]);
+
+ /* digital pad */
+ input_report_abs(dev, ABS_HAT0X, !!(data[2] & 0x08) - !!(data[2] & 0x04));
+ input_report_abs(dev, ABS_HAT0Y, !!(data[2] & 0x02) - !!(data[2] & 0x01));
+
+ /* start/back buttons and stick press left/right */
+ input_report_key(dev, BTN_START, (data[2] & 0x10) >> 4);
+ input_report_key(dev, BTN_BACK, (data[2] & 0x20) >> 5);
+ input_report_key(dev, BTN_THUMBL, (data[2] & 0x40) >> 6);
+ input_report_key(dev, BTN_THUMBR, data[2] >> 7);
+
+ /* "analog" buttons A, B, X, Y */
+ input_report_key(dev, BTN_A, data[4]);
+ input_report_key(dev, BTN_B, data[5]);
+ input_report_key(dev, BTN_X, data[6]);
+ input_report_key(dev, BTN_Y, data[7]);
+
+ /* "analog" buttons black, white */
+ input_report_key(dev, BTN_C, data[8]);
+ input_report_key(dev, BTN_Z, data[9]);
+
+ input_sync(dev);
+}
+
+static void xpad_irq_in(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_xpad *xpad = urb->context;
+ int retval;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ xpad_process_packet(xpad, 0, xpad->idata, regs);
+
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+static int xpad_open (struct input_dev *dev)
+{
+ struct usb_xpad *xpad = dev->private;
+
+ if (xpad->open_count++)
+ return 0;
+
+ xpad->irq_in->dev = xpad->udev;
+ if (usb_submit_urb(xpad->irq_in, GFP_KERNEL)) {
+ xpad->open_count--;
+ return -EIO;
+ }
+
+ return 0;
+}
+
+static void xpad_close (struct input_dev *dev)
+{
+ struct usb_xpad *xpad = dev->private;
+
+ if (!--xpad->open_count)
+ usb_kill_urb(xpad->irq_in);
+}
+
+static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev (intf);
+ struct usb_xpad *xpad = NULL;
+ struct usb_endpoint_descriptor *ep_irq_in;
+ char path[64];
+ int i;
+
+ for (i = 0; xpad_device[i].idVendor; i++) {
+ if ((le16_to_cpu(udev->descriptor.idVendor) == xpad_device[i].idVendor) &&
+ (le16_to_cpu(udev->descriptor.idProduct) == xpad_device[i].idProduct))
+ break;
+ }
+
+ if ((xpad = kmalloc (sizeof(struct usb_xpad), GFP_KERNEL)) == NULL) {
+ err("cannot allocate memory for new pad");
+ return -ENOMEM;
+ }
+ memset(xpad, 0, sizeof(struct usb_xpad));
+
+ xpad->idata = usb_buffer_alloc(udev, XPAD_PKT_LEN,
+ SLAB_ATOMIC, &xpad->idata_dma);
+ if (!xpad->idata) {
+ kfree(xpad);
+ return -ENOMEM;
+ }
+
+ xpad->irq_in = usb_alloc_urb(0, GFP_KERNEL);
+ if (!xpad->irq_in) {
+ err("cannot allocate memory for new pad irq urb");
+ usb_buffer_free(udev, XPAD_PKT_LEN, xpad->idata, xpad->idata_dma);
+ kfree(xpad);
+ return -ENOMEM;
+ }
+
+ ep_irq_in = &intf->cur_altsetting->endpoint[0].desc;
+
+ usb_fill_int_urb(xpad->irq_in, udev,
+ usb_rcvintpipe(udev, ep_irq_in->bEndpointAddress),
+ xpad->idata, XPAD_PKT_LEN, xpad_irq_in,
+ xpad, ep_irq_in->bInterval);
+ xpad->irq_in->transfer_dma = xpad->idata_dma;
+ xpad->irq_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ xpad->udev = udev;
+
+ xpad->dev.id.bustype = BUS_USB;
+ xpad->dev.id.vendor = le16_to_cpu(udev->descriptor.idVendor);
+ xpad->dev.id.product = le16_to_cpu(udev->descriptor.idProduct);
+ xpad->dev.id.version = le16_to_cpu(udev->descriptor.bcdDevice);
+ xpad->dev.dev = &intf->dev;
+ xpad->dev.private = xpad;
+ xpad->dev.name = xpad_device[i].name;
+ xpad->dev.phys = xpad->phys;
+ xpad->dev.open = xpad_open;
+ xpad->dev.close = xpad_close;
+
+ usb_make_path(udev, path, 64);
+ snprintf(xpad->phys, 64, "%s/input0", path);
+
+ xpad->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
+
+ for (i = 0; xpad_btn[i] >= 0; i++)
+ set_bit(xpad_btn[i], xpad->dev.keybit);
+
+ for (i = 0; xpad_abs[i] >= 0; i++) {
+
+ signed short t = xpad_abs[i];
+
+ set_bit(t, xpad->dev.absbit);
+
+ switch (t) {
+ case ABS_X:
+ case ABS_Y:
+ case ABS_RX:
+ case ABS_RY: /* the two sticks */
+ xpad->dev.absmax[t] = 32767;
+ xpad->dev.absmin[t] = -32768;
+ xpad->dev.absflat[t] = 128;
+ xpad->dev.absfuzz[t] = 16;
+ break;
+ case ABS_Z:
+ case ABS_RZ: /* the triggers */
+ xpad->dev.absmax[t] = 255;
+ xpad->dev.absmin[t] = 0;
+ break;
+ case ABS_HAT0X:
+ case ABS_HAT0Y: /* the d-pad */
+ xpad->dev.absmax[t] = 1;
+ xpad->dev.absmin[t] = -1;
+ break;
+ }
+ }
+
+ input_register_device(&xpad->dev);
+
+ printk(KERN_INFO "input: %s on %s", xpad->dev.name, path);
+
+ usb_set_intfdata(intf, xpad);
+ return 0;
+}
+
+static void xpad_disconnect(struct usb_interface *intf)
+{
+ struct usb_xpad *xpad = usb_get_intfdata (intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (xpad) {
+ usb_kill_urb(xpad->irq_in);
+ input_unregister_device(&xpad->dev);
+ usb_free_urb(xpad->irq_in);
+ usb_buffer_free(interface_to_usbdev(intf), XPAD_PKT_LEN, xpad->idata, xpad->idata_dma);
+ kfree(xpad);
+ }
+}
+
+static struct usb_driver xpad_driver = {
+ .owner = THIS_MODULE,
+ .name = "xpad",
+ .probe = xpad_probe,
+ .disconnect = xpad_disconnect,
+ .id_table = xpad_table,
+};
+
+static int __init usb_xpad_init(void)
+{
+ int result = usb_register(&xpad_driver);
+ if (result == 0)
+ info(DRIVER_DESC ":" DRIVER_VERSION);
+ return result;
+}
+
+static void __exit usb_xpad_exit(void)
+{
+ usb_deregister(&xpad_driver);
+}
+
+module_init(usb_xpad_init);
+module_exit(usb_xpad_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/media/Kconfig b/drivers/usb/media/Kconfig
new file mode 100644
index 000000000000..21232ee2974c
--- /dev/null
+++ b/drivers/usb/media/Kconfig
@@ -0,0 +1,213 @@
+#
+# USB Multimedia device configuration
+#
+comment "USB Multimedia devices"
+ depends on USB
+
+config USB_DABUSB
+ tristate "DABUSB driver"
+ depends on USB
+ ---help---
+ A Digital Audio Broadcasting (DAB) Receiver for USB and Linux
+ brought to you by the DAB-Team
+ <http://wwwbode.cs.tum.edu/Par/arch/dab/>. This driver can be taken
+ as an example for URB-based bulk, control, and isochronous
+ transactions. URB's are explained in
+ <file:Documentation/usb/URB.txt>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called dabusb.
+
+comment "Video4Linux support is needed for USB Multimedia device support"
+ depends on USB && VIDEO_DEV=n
+
+config USB_VICAM
+ tristate "USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)"
+ depends on USB && VIDEO_DEV && EXPERIMENTAL
+ ---help---
+ Say Y here if you have 3com homeconnect camera (vicam).
+
+ This driver uses the Video For Linux API. You must say Y or M to
+ "Video For Linux" (under Multimedia Devices) to use this driver.
+ Information on this API and pointers to "v4l" programs may be found
+ at <file:Documentation/video4linux/API.html>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called vicam.
+
+config USB_DSBR
+ tristate "D-Link USB FM radio support (EXPERIMENTAL)"
+ depends on USB && VIDEO_DEV && EXPERIMENTAL
+ ---help---
+ Say Y here if you want to connect this type of radio to your
+ computer's USB port. Note that the audio is not digital, and
+ you must connect the line out connector to a sound card or a
+ set of speakers.
+
+ This driver uses the Video For Linux API. You must enable
+ (Y or M in config) Video For Linux (under Character Devices)
+ to use this driver. Information on this API and pointers to
+ "v4l" programs may be found at
+ <file:Documentation/video4linux/API.html>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called dsbr100.
+
+config USB_IBMCAM
+ tristate "USB IBM (Xirlink) C-it Camera support"
+ depends on USB && VIDEO_DEV
+ ---help---
+ Say Y here if you want to connect a IBM "C-It" camera, also known as
+ "Xirlink PC Camera" to your computer's USB port. For more
+ information, read <file:Documentation/usb/ibmcam.txt>.
+
+ This driver uses the Video For Linux API. You must enable
+ (Y or M in config) Video For Linux (under Character Devices)
+ to use this driver. Information on this API and pointers to
+ "v4l" programs may be found at
+ <file:Documentation/video4linux/API.html>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ibmcam.
+
+ This camera has several configuration options which
+ can be specified when you load the module. Read
+ <file:Documentation/usb/ibmcam.txt> to learn more.
+
+config USB_KONICAWC
+ tristate "USB Konica Webcam support"
+ depends on USB && VIDEO_DEV
+ ---help---
+ Say Y here if you want support for webcams based on a Konica
+ chipset. This is known to work with the Intel YC76 webcam.
+
+ This driver uses the Video For Linux API. You must enable
+ (Y or M in config) Video For Linux (under Character Devices)
+ to use this driver. Information on this API and pointers to
+ "v4l" programs may be found at
+ <file:Documentation/video4linux/API.html>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called konicawc.
+
+config USB_OV511
+ tristate "USB OV511 Camera support"
+ depends on USB && VIDEO_DEV
+ ---help---
+ Say Y here if you want to connect this type of camera to your
+ computer's USB port. See <file:Documentation/usb/ov511.txt> for more
+ information and for a list of supported cameras.
+
+ This driver uses the Video For Linux API. You must say Y or M to
+ "Video For Linux" (under Character Devices) to use this driver.
+ Information on this API and pointers to "v4l" programs may be found
+ at <file:Documentation/video4linux/API.html>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ov511.
+
+config USB_SE401
+ tristate "USB SE401 Camera support"
+ depends on USB && VIDEO_DEV
+ ---help---
+ Say Y here if you want to connect this type of camera to your
+ computer's USB port. See <file:Documentation/usb/se401.txt> for more
+ information and for a list of supported cameras.
+
+ This driver uses the Video For Linux API. You must say Y or M to
+ "Video For Linux" (under Multimedia Devices) to use this driver.
+ Information on this API and pointers to "v4l" programs may be found
+ at <file:Documentation/video4linux/API.html>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called se401.
+
+config USB_SN9C102
+ tristate "USB SN9C10x PC Camera Controller support"
+ depends on USB && VIDEO_DEV
+ ---help---
+ Say Y here if you want support for cameras based on SONiX SN9C101,
+ SN9C102 or SN9C103 PC Camera Controllers.
+
+ See <file:Documentation/usb/sn9c102.txt> for more informations.
+
+ This driver uses the Video For Linux API. You must say Y or M to
+ "Video For Linux" to use this driver.
+
+ To compile this driver as a module, choose M here: the
+ module will be called sn9c102.
+
+config USB_STV680
+ tristate "USB STV680 (Pencam) Camera support"
+ depends on USB && VIDEO_DEV
+ ---help---
+ Say Y here if you want to connect this type of camera to your
+ computer's USB port. This includes the Pencam line of cameras.
+ See <file:Documentation/usb/stv680.txt> for more information and for
+ a list of supported cameras.
+
+ This driver uses the Video For Linux API. You must say Y or M to
+ "Video For Linux" (under Multimedia Devices) to use this driver.
+ Information on this API and pointers to "v4l" programs may be found
+ at <file:Documentation/video4linux/API.html>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called stv680.
+
+config USB_W9968CF
+ tristate "USB W996[87]CF JPEG Dual Mode Camera support"
+ depends on USB && VIDEO_DEV && I2C && VIDEO_OVCAMCHIP
+ ---help---
+ Say Y here if you want support for cameras based on OV681 or
+ Winbond W9967CF/W9968CF JPEG USB Dual Mode Camera Chips.
+
+ This driver has an optional plugin, which is distributed as a
+ separate module only (released under GPL). It allows to use higher
+ resolutions and framerates, but cannot be included in the official
+ Linux kernel for performance purposes.
+
+ See <file:Documentation/usb/w9968cf.txt> for more informations.
+
+ This driver uses the Video For Linux and the I2C APIs. It needs the
+ OmniVision Camera Chip support as well. You must say Y or M to
+ "Video For Linux", "I2C Support" and "OmniVision Camera Chip
+ support" to use this driver.
+
+ To compile this driver as a module, choose M here: the
+ module will be called w9968cf.
+
+config USB_PWC
+ tristate "USB Philips Cameras"
+ depends on USB && VIDEO_DEV
+ ---help---
+ Say Y or M here if you want to use one of these Philips & OEM
+ webcams:
+ * Philips PCA645, PCA646
+ * Philips PCVC675, PCVC680, PCVC690
+ * Philips PCVC720/40, PCVC730, PCVC740, PCVC750
+ * Askey VC010
+ * Logitech QuickCam Pro 3000, 4000, 'Zoom', 'Notebook Pro'
+ and 'Orbit'/'Sphere'
+ * Samsung MPC-C10, MPC-C30
+ * Creative Webcam 5, Pro Ex
+ * SOTEC Afina Eye
+ * Visionite VCS-UC300, VCS-UM100
+
+ The PCA635, PCVC665 and PCVC720/20 are not supported by this driver
+ and never will be, but the 665 and 720/20 are supported by other
+ drivers.
+
+ See <file:Documentation/usb/philips.txt> for more information and
+ installation instructions.
+
+ The built-in microphone is enabled by selecting USB Audio support.
+
+ This driver uses the Video For Linux API. You must say Y or M to
+ "Video For Linux" (under Character Devices) to use this driver.
+ Information on this API and pointers to "v4l" programs may be found
+ at <file:Documentation/video4linux/API.html>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called pwc.
+
+
diff --git a/drivers/usb/media/Makefile b/drivers/usb/media/Makefile
new file mode 100644
index 000000000000..2b76df7005fe
--- /dev/null
+++ b/drivers/usb/media/Makefile
@@ -0,0 +1,17 @@
+#
+# Makefile for USB Media drivers
+#
+
+sn9c102-objs := sn9c102_core.o sn9c102_hv7131d.o sn9c102_mi0343.o sn9c102_pas106b.o sn9c102_pas202bcb.o sn9c102_tas5110c1b.o sn9c102_tas5130d1b.o
+
+obj-$(CONFIG_USB_DABUSB) += dabusb.o
+obj-$(CONFIG_USB_DSBR) += dsbr100.o
+obj-$(CONFIG_USB_IBMCAM) += ibmcam.o usbvideo.o ultracam.o
+obj-$(CONFIG_USB_KONICAWC) += konicawc.o usbvideo.o
+obj-$(CONFIG_USB_OV511) += ov511.o
+obj-$(CONFIG_USB_SE401) += se401.o
+obj-$(CONFIG_USB_SN9C102) += sn9c102.o
+obj-$(CONFIG_USB_STV680) += stv680.o
+obj-$(CONFIG_USB_VICAM) += vicam.o usbvideo.o
+obj-$(CONFIG_USB_W9968CF) += w9968cf.o
+obj-$(CONFIG_USB_PWC) += pwc/
diff --git a/drivers/usb/media/dabfirmware.h b/drivers/usb/media/dabfirmware.h
new file mode 100644
index 000000000000..d14d803566a3
--- /dev/null
+++ b/drivers/usb/media/dabfirmware.h
@@ -0,0 +1,1408 @@
+/*
+ * dabdata.h - dab usb firmware and bitstream data
+ */
+
+static INTEL_HEX_RECORD firmware[] = {
+
+{ 2, 0x0000, 0, {0x21,0x57} },
+{ 3, 0x0003, 0, {0x02,0x01,0x66} },
+{ 3, 0x000b, 0, {0x02,0x01,0x66} },
+{ 3, 0x0013, 0, {0x02,0x01,0x66} },
+{ 3, 0x001b, 0, {0x02,0x01,0x66} },
+{ 3, 0x0023, 0, {0x02,0x01,0x66} },
+{ 3, 0x002b, 0, {0x02,0x01,0x66} },
+{ 3, 0x0033, 0, {0x02,0x03,0x0f} },
+{ 3, 0x003b, 0, {0x02,0x01,0x66} },
+{ 3, 0x0043, 0, {0x02,0x01,0x00} },
+{ 3, 0x004b, 0, {0x02,0x01,0x66} },
+{ 3, 0x0053, 0, {0x02,0x01,0x66} },
+{ 3, 0x005b, 0, {0x02,0x04,0xbd} },
+{ 3, 0x0063, 0, {0x02,0x01,0x67} },
+{ 3, 0x0100, 0, {0x02,0x0c,0x5a} },
+{ 3, 0x0104, 0, {0x02,0x01,0xed} },
+{ 3, 0x0108, 0, {0x02,0x02,0x51} },
+{ 3, 0x010c, 0, {0x02,0x02,0x7c} },
+{ 3, 0x0110, 0, {0x02,0x02,0xe4} },
+{ 1, 0x0114, 0, {0x32} },
+{ 1, 0x0118, 0, {0x32} },
+{ 3, 0x011c, 0, {0x02,0x05,0xfd} },
+{ 3, 0x0120, 0, {0x02,0x00,0x00} },
+{ 3, 0x0124, 0, {0x02,0x00,0x00} },
+{ 3, 0x0128, 0, {0x02,0x04,0x3c} },
+{ 3, 0x012c, 0, {0x02,0x04,0x6a} },
+{ 3, 0x0130, 0, {0x02,0x00,0x00} },
+{ 3, 0x0134, 0, {0x02,0x00,0x00} },
+{ 3, 0x0138, 0, {0x02,0x00,0x00} },
+{ 3, 0x013c, 0, {0x02,0x00,0x00} },
+{ 3, 0x0140, 0, {0x02,0x00,0x00} },
+{ 3, 0x0144, 0, {0x02,0x00,0x00} },
+{ 3, 0x0148, 0, {0x02,0x00,0x00} },
+{ 3, 0x014c, 0, {0x02,0x00,0x00} },
+{ 3, 0x0150, 0, {0x02,0x00,0x00} },
+{ 3, 0x0154, 0, {0x02,0x00,0x00} },
+{ 10, 0x0157, 0, {0x75,0x81,0x7f,0xe5,0x82,0x60,0x03,0x02,0x01,0x61} },
+{ 5, 0x0161, 0, {0x12,0x07,0x6f,0x21,0x64} },
+{ 1, 0x0166, 0, {0x32} },
+{ 14, 0x0167, 0, {0xc0,0xd0,0xc0,0x86,0xc0,0x82,0xc0,0x83,0xc0,0xe0,0x90,0x7f,0x97,0xe0} },
+{ 14, 0x0175, 0, {0x44,0x80,0xf0,0x90,0x7f,0x69,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0} },
+{ 14, 0x0183, 0, {0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0} },
+{ 14, 0x0191, 0, {0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x90,0x7f,0x97,0xe0} },
+{ 3, 0x019f, 0, {0x55,0x7f,0xf0} },
+{ 14, 0x01a2, 0, {0x90,0x7f,0x9a,0xe0,0x30,0xe4,0x23,0x90,0x7f,0x68,0xf0,0xf0,0xf0,0xf0} },
+{ 14, 0x01b0, 0, {0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0} },
+{ 14, 0x01be, 0, {0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0} },
+{ 14, 0x01cc, 0, {0xe5,0xd8,0xc2,0xe3,0xf5,0xd8,0xd0,0xe0,0xd0,0x83,0xd0,0x82,0xd0,0x86} },
+{ 3, 0x01da, 0, {0xd0,0xd0,0x32} },
+{ 8, 0x01dd, 0, {0x75,0x86,0x00,0x90,0xff,0xc3,0x7c,0x05} },
+{ 7, 0x01e5, 0, {0xa3,0xe5,0x82,0x45,0x83,0x70,0xf9} },
+{ 1, 0x01ec, 0, {0x22} },
+{ 14, 0x01ed, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x02,0xc0,0x03,0xc0,0xd0} },
+{ 14, 0x01fb, 0, {0x75,0xd0,0x00,0xc0,0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe4,0xf5,0x91} },
+{ 13, 0x0209, 0, {0x90,0x88,0x00,0xe0,0xf5,0x41,0x90,0x7f,0xab,0x74,0x02,0xf0,0x90} },
+{ 9, 0x0216, 0, {0x7f,0xab,0x74,0x02,0xf0,0xe5,0x32,0x60,0x21} },
+{ 4, 0x021f, 0, {0x7a,0x00,0x7b,0x00} },
+{ 11, 0x0223, 0, {0xc3,0xea,0x94,0x18,0xeb,0x64,0x80,0x94,0x80,0x50,0x12} },
+{ 14, 0x022e, 0, {0x90,0x7f,0x69,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x0a,0xba,0x00} },
+{ 2, 0x023c, 0, {0x01,0x0b} },
+{ 2, 0x023e, 0, {0x80,0xe3} },
+{ 2, 0x0240, 0, {0xd0,0x86} },
+{ 14, 0x0242, 0, {0xd0,0xd0,0xd0,0x03,0xd0,0x02,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0} },
+{ 1, 0x0250, 0, {0x32} },
+{ 14, 0x0251, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0xd0,0x75,0xd0,0x00,0xc0} },
+{ 14, 0x025f, 0, {0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe4,0xf5,0x91,0x90,0x7f,0xab,0x74} },
+{ 4, 0x026d, 0, {0x04,0xf0,0xd0,0x86} },
+{ 11, 0x0271, 0, {0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 14, 0x027c, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x02,0xc0,0x03,0xc0,0x04} },
+{ 14, 0x028a, 0, {0xc0,0x05,0xc0,0x06,0xc0,0x07,0xc0,0x00,0xc0,0x01,0xc0,0xd0,0x75,0xd0} },
+{ 13, 0x0298, 0, {0x00,0xc0,0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe4,0xf5,0x91,0x90} },
+{ 12, 0x02a5, 0, {0x7f,0xab,0x74,0x08,0xf0,0x75,0x6e,0x00,0x75,0x6f,0x02,0x12} },
+{ 6, 0x02b1, 0, {0x11,0x44,0x75,0x70,0x39,0x75} },
+{ 6, 0x02b7, 0, {0x71,0x0c,0x75,0x72,0x02,0x12} },
+{ 12, 0x02bd, 0, {0x11,0x75,0x90,0x7f,0xd6,0xe4,0xf0,0x75,0xd8,0x20,0xd0,0x86} },
+{ 14, 0x02c9, 0, {0xd0,0xd0,0xd0,0x01,0xd0,0x00,0xd0,0x07,0xd0,0x06,0xd0,0x05,0xd0,0x04} },
+{ 13, 0x02d7, 0, {0xd0,0x03,0xd0,0x02,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 14, 0x02e4, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0xd0,0x75,0xd0,0x00,0xc0} },
+{ 14, 0x02f2, 0, {0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe4,0xf5,0x91,0x90,0x7f,0xab,0x74} },
+{ 4, 0x0300, 0, {0x10,0xf0,0xd0,0x86} },
+{ 11, 0x0304, 0, {0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 14, 0x030f, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x02,0xc0,0x03,0xc0,0x04} },
+{ 14, 0x031d, 0, {0xc0,0x05,0xc0,0x06,0xc0,0x07,0xc0,0x00,0xc0,0x01,0xc0,0xd0,0x75,0xd0} },
+{ 12, 0x032b, 0, {0x00,0xc0,0x86,0x75,0x86,0x00,0x75,0x6e,0x00,0x75,0x6f,0x02} },
+{ 7, 0x0337, 0, {0x12,0x11,0x44,0x75,0x70,0x40,0x75} },
+{ 6, 0x033e, 0, {0x71,0x0c,0x75,0x72,0x02,0x12} },
+{ 14, 0x0344, 0, {0x11,0x75,0x90,0x7f,0xd6,0x74,0x02,0xf0,0x90,0x7f,0xd6,0x74,0x06,0xf0} },
+{ 5, 0x0352, 0, {0x75,0xd8,0x10,0xd0,0x86} },
+{ 14, 0x0357, 0, {0xd0,0xd0,0xd0,0x01,0xd0,0x00,0xd0,0x07,0xd0,0x06,0xd0,0x05,0xd0,0x04} },
+{ 13, 0x0365, 0, {0xd0,0x03,0xd0,0x02,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 13, 0x0372, 0, {0x90,0x7f,0xa5,0x74,0x80,0xf0,0x90,0x7f,0xa6,0x74,0x9a,0xf0,0x12} },
+{ 12, 0x037f, 0, {0x10,0x1b,0x90,0x7f,0xa6,0xe5,0x42,0xf0,0x12,0x10,0x1b,0x90} },
+{ 13, 0x038b, 0, {0x7f,0xa6,0xe5,0x43,0xf0,0x12,0x10,0x1b,0x90,0x7f,0xa5,0x74,0x40} },
+{ 1, 0x0398, 0, {0xf0} },
+{ 1, 0x0399, 0, {0x22} },
+{ 13, 0x039a, 0, {0x90,0x7f,0xa5,0x74,0x80,0xf0,0x90,0x7f,0xa6,0x74,0x9a,0xf0,0x12} },
+{ 12, 0x03a7, 0, {0x10,0x1b,0x90,0x7f,0xa6,0xe5,0x44,0xf0,0x12,0x10,0x1b,0x90} },
+{ 12, 0x03b3, 0, {0x7f,0xa6,0xe5,0x45,0xf0,0x12,0x10,0x1b,0x90,0x7f,0xa6,0xe5} },
+{ 11, 0x03bf, 0, {0x46,0xf0,0x12,0x10,0x1b,0x90,0x7f,0xa5,0x74,0x40,0xf0} },
+{ 1, 0x03ca, 0, {0x22} },
+{ 10, 0x03cb, 0, {0x75,0x44,0x02,0x75,0x45,0x00,0x75,0x46,0x00,0x12} },
+{ 9, 0x03d5, 0, {0x03,0x9a,0x75,0x42,0x03,0x75,0x43,0x00,0x12} },
+{ 2, 0x03de, 0, {0x03,0x72} },
+{ 1, 0x03e0, 0, {0x22} },
+{ 12, 0x03e1, 0, {0x90,0x88,0x00,0xe5,0x36,0xf0,0x90,0x88,0x00,0x74,0x10,0x25} },
+{ 9, 0x03ed, 0, {0x36,0xf0,0x12,0x01,0xdd,0x75,0x42,0x01,0x75} },
+{ 9, 0x03f6, 0, {0x43,0x18,0x12,0x03,0x72,0x75,0x44,0x02,0x75} },
+{ 9, 0x03ff, 0,{0x45,0x00,0x75,0x46,0x00,0x12,0x03,0x9a,0x75} },
+{ 8, 0x0408, 0,{0x42,0x03,0x75,0x43,0x44,0x12,0x03,0x72} },
+{ 1, 0x0410, 0,{0x22} },
+{ 14, 0x0411, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0xd0,0x75,0xd0,0x00,0xc0} },
+{ 14, 0x041f, 0, {0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe4,0xf5,0x91,0x90,0x7f,0xaa,0x74} },
+{ 4, 0x042d, 0, {0x02,0xf0,0xd0,0x86} },
+{ 11, 0x0431, 0, {0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 14, 0x043c, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0xd0,0x75,0xd0,0x00,0xc0} },
+{ 14, 0x044a, 0, {0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe4,0xf5,0x91,0x90,0x7f,0xa9,0x74} },
+{ 7, 0x0458, 0, {0x04,0xf0,0x75,0x30,0x01,0xd0,0x86} },
+{ 11, 0x045f, 0, {0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 14, 0x046a, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0xd0,0x75,0xd0,0x00,0xc0} },
+{ 14, 0x0478, 0, {0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe4,0xf5,0x91,0x90,0x7f,0xaa,0x74} },
+{ 7, 0x0486, 0, {0x04,0xf0,0x75,0x31,0x01,0xd0,0x86} },
+{ 11, 0x048d, 0, {0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 14, 0x0498, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0xd0,0x75,0xd0,0x00,0xc0} },
+{ 12, 0x04a6, 0, {0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe5,0xf5,0x91,0xd0,0x86} },
+{ 11, 0x04b2, 0, {0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 14, 0x04bd, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0xd0,0x75,0xd0,0x00,0xc0} },
+{ 12, 0x04cb, 0, {0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe7,0xf5,0x91,0xd0,0x86} },
+{ 11, 0x04d7, 0, {0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 12, 0x04e2, 0, {0x90,0x7f,0xea,0xe0,0xfa,0x8a,0x20,0x90,0x7f,0x96,0xe4,0xf0} },
+{ 1, 0x04ee, 0, {0x22} },
+{ 7, 0x04ef, 0, {0x90,0x7f,0xea,0xe0,0xfa,0x8a,0x21} },
+{ 1, 0x04f6, 0, {0x22} },
+{ 14, 0x04f7, 0, {0x90,0x17,0x13,0xe0,0xfa,0x90,0x17,0x15,0xe0,0xfb,0x74,0x80,0x2a,0xfa} },
+{ 14, 0x0505, 0, {0x74,0x80,0x2b,0xfb,0xea,0x03,0x03,0x54,0x3f,0xfc,0xea,0xc4,0x23,0x54} },
+{ 14, 0x0513, 0, {0x1f,0xfa,0x2c,0xfa,0xeb,0x03,0x03,0x54,0x3f,0xfc,0xeb,0xc4,0x23,0x54} },
+{ 11, 0x0521, 0, {0x1f,0xfb,0x2c,0xfb,0x90,0x17,0x0a,0xe0,0xfc,0x60,0x02} },
+{ 2, 0x052c, 0, {0x7a,0x00} },
+{ 7, 0x052e, 0, {0x90,0x17,0x0c,0xe0,0xfc,0x60,0x02} },
+{ 2, 0x0535, 0, {0x7b,0x00} },
+{ 11, 0x0537, 0, {0xea,0x2b,0xfc,0xc3,0x13,0xf5,0x3a,0x75,0x44,0x02,0x8b} },
+{ 7, 0x0542, 0, {0x45,0x8a,0x46,0x12,0x03,0x9a,0x75} },
+{ 9, 0x0549, 0, {0x6e,0x08,0x75,0x6f,0x00,0x12,0x11,0x44,0x75} },
+{ 4, 0x0552, 0, {0x70,0x47,0x75,0x71} },
+{ 8, 0x0556, 0, {0x0c,0x75,0x72,0x02,0x12,0x11,0x75,0x85} },
+{ 5, 0x055e, 0, {0x3a,0x73,0x12,0x11,0xa0} },
+{ 1, 0x0563, 0, {0x22} },
+{ 14, 0x0564, 0, {0x90,0x7f,0x96,0xe0,0xfa,0x90,0x7f,0x96,0x74,0x80,0x65,0x02,0xf0,0x90} },
+{ 14, 0x0572, 0, {0x7f,0xeb,0xe0,0xfa,0x90,0x7f,0xea,0xe0,0xfb,0x90,0x7f,0xef,0xe0,0xfc} },
+{ 14, 0x0580, 0, {0x33,0x95,0xe0,0xfd,0x8c,0x05,0x7c,0x00,0x90,0x7f,0xee,0xe0,0xfe,0x33} },
+{ 14, 0x058e, 0, {0x95,0xe0,0xff,0xec,0x2e,0xfc,0xed,0x3f,0xfd,0x90,0x7f,0xe9,0xe0,0xfe} },
+{ 5, 0x059c, 0, {0xbe,0x01,0x02,0x80,0x03} },
+{ 3, 0x05a1, 0, {0x02,0x05,0xf9} },
+{ 6, 0x05a4, 0, {0xbc,0x01,0x21,0xbd,0x00,0x1e} },
+{ 14, 0x05aa, 0, {0xea,0xc4,0x03,0x54,0xf8,0xfc,0xeb,0x25,0xe0,0xfd,0x2c,0x24,0x00,0xfc} },
+{ 14, 0x05b8, 0, {0xe4,0x34,0x17,0xfd,0x90,0x7e,0xc0,0xe0,0xfe,0x8c,0x82,0x8d,0x83,0xf0} },
+{ 2, 0x05c6, 0, {0x80,0x31} },
+{ 14, 0x05c8, 0, {0xea,0xc4,0x03,0x54,0xf8,0xfa,0xeb,0x25,0xe0,0xfb,0x2a,0xfa,0x24,0x00} },
+{ 14, 0x05d6, 0, {0xfb,0xe4,0x34,0x17,0xfc,0x90,0x7e,0xc0,0xe0,0xfd,0x8b,0x82,0x8c,0x83} },
+{ 14, 0x05e4, 0, {0xf0,0x74,0x01,0x2a,0x24,0x00,0xfa,0xe4,0x34,0x17,0xfb,0x90,0x7e,0xc1} },
+{ 7, 0x05f2, 0, {0xe0,0xfc,0x8a,0x82,0x8b,0x83,0xf0} },
+{ 3, 0x05f9, 0, {0x75,0x38,0x01} },
+{ 1, 0x05fc, 0, {0x22} },
+{ 14, 0x05fd, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x02,0xc0,0x03,0xc0,0x04} },
+{ 14, 0x060b, 0, {0xc0,0x05,0xc0,0x06,0xc0,0x07,0xc0,0x00,0xc0,0x01,0xc0,0xd0,0x75,0xd0} },
+{ 13, 0x0619, 0, {0x00,0xc0,0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe4,0xf5,0x91,0x90} },
+{ 13, 0x0626, 0, {0x7f,0xaa,0x74,0x01,0xf0,0x12,0x05,0x64,0x75,0x37,0x00,0xd0,0x86} },
+{ 14, 0x0633, 0, {0xd0,0xd0,0xd0,0x01,0xd0,0x00,0xd0,0x07,0xd0,0x06,0xd0,0x05,0xd0,0x04} },
+{ 13, 0x0641, 0, {0xd0,0x03,0xd0,0x02,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 14, 0x064e, 0, {0x90,0x7f,0xeb,0xe0,0xfa,0x90,0x7f,0xea,0xe0,0xfb,0x90,0x7f,0xee,0xe0} },
+{ 14, 0x065c, 0, {0xfc,0x33,0x95,0xe0,0xfd,0x90,0x7f,0x96,0xe0,0xfe,0x90,0x7f,0x96,0x74} },
+{ 14, 0x066a, 0, {0x80,0x65,0x06,0xf0,0x90,0x7f,0x00,0x74,0x01,0xf0,0xea,0xc4,0x03,0x54} },
+{ 14, 0x0678, 0, {0xf8,0xfe,0xeb,0x25,0xe0,0xfb,0x2e,0xfe,0x24,0x00,0xfb,0xe4,0x34,0x17} },
+{ 14, 0x0686, 0, {0xff,0x8b,0x82,0x8f,0x83,0xe0,0xfb,0x74,0x01,0x2e,0x24,0x00,0xfe,0xe4} },
+{ 14, 0x0694, 0, {0x34,0x17,0xff,0x8e,0x82,0x8f,0x83,0xe0,0xfe,0x90,0x7f,0xe9,0xe0,0xff} },
+{ 3, 0x06a2, 0, {0xbf,0x81,0x0a} },
+{ 10, 0x06a5, 0, {0x90,0x7f,0x00,0xeb,0xf0,0x90,0x7f,0x01,0xee,0xf0} },
+{ 8, 0x06af, 0, {0x90,0x7f,0xe9,0xe0,0xfb,0xbb,0x82,0x1a} },
+{ 3, 0x06b7, 0, {0xba,0x01,0x0c} },
+{ 12, 0x06ba, 0, {0x90,0x7f,0x00,0xe4,0xf0,0x90,0x7f,0x01,0xe4,0xf0,0x80,0x0b} },
+{ 11, 0x06c6, 0, {0x90,0x7f,0x00,0xe4,0xf0,0x90,0x7f,0x01,0x74,0xb5,0xf0} },
+{ 8, 0x06d1, 0, {0x90,0x7f,0xe9,0xe0,0xfb,0xbb,0x83,0x1b} },
+{ 3, 0x06d9, 0, {0xba,0x01,0x0d} },
+{ 13, 0x06dc, 0, {0x90,0x7f,0x00,0x74,0x01,0xf0,0x90,0x7f,0x01,0xe4,0xf0,0x80,0x0b} },
+{ 11, 0x06e9, 0, {0x90,0x7f,0x00,0xe4,0xf0,0x90,0x7f,0x01,0x74,0x12,0xf0} },
+{ 8, 0x06f4, 0, {0x90,0x7f,0xe9,0xe0,0xfb,0xbb,0x84,0x1c} },
+{ 3, 0x06fc, 0, {0xba,0x01,0x0d} },
+{ 13, 0x06ff, 0, {0x90,0x7f,0x00,0x74,0x01,0xf0,0x90,0x7f,0x01,0xe4,0xf0,0x80,0x0c} },
+{ 12, 0x070c, 0, {0x90,0x7f,0x00,0x74,0x80,0xf0,0x90,0x7f,0x01,0x74,0x01,0xf0} },
+{ 5, 0x0718, 0, {0x90,0x7f,0xb5,0xec,0xf0} },
+{ 1, 0x071d, 0, {0x22} },
+{ 12, 0x071e, 0, {0x75,0x36,0x0d,0x90,0x88,0x00,0x74,0x1d,0xf0,0x75,0x6b,0x80} },
+{ 10, 0x072a, 0, {0x75,0x6c,0x3c,0x12,0x10,0xe2,0x75,0x6b,0x80,0x75} },
+{ 9, 0x0734, 0, {0x6c,0x0f,0x12,0x10,0xe2,0x75,0x6b,0x80,0x75} },
+{ 9, 0x073d, 0, {0x6c,0x06,0x12,0x10,0xe2,0x75,0x6b,0x80,0x75} },
+{ 7, 0x0746, 0, {0x6c,0x01,0x12,0x10,0xe2,0x7a,0x00} },
+{ 3, 0x074d, 0, {0xba,0xff,0x00} },
+{ 2, 0x0750, 0, {0x50,0x0a} },
+{ 10, 0x0752, 0, {0xc0,0x02,0x12,0x01,0xdd,0xd0,0x02,0x0a,0x80,0xf1} },
+{ 10, 0x075c, 0, {0x75,0x6b,0x80,0x75,0x6c,0x3c,0x12,0x10,0xe2,0x75} },
+{ 8, 0x0766, 0, {0x6b,0x80,0x75,0x6c,0x0f,0x12,0x10,0xe2} },
+{ 1, 0x076e, 0, {0x22} },
+{ 14, 0x076f, 0, {0x90,0x7f,0xa1,0xe4,0xf0,0x90,0x7f,0xaf,0x74,0x01,0xf0,0x90,0x7f,0x92} },
+{ 14, 0x077d, 0, {0x74,0x02,0xf0,0x75,0x8e,0x31,0x75,0x89,0x21,0x75,0x88,0x00,0x75,0xc8} },
+{ 14, 0x078b, 0, {0x00,0x75,0x8d,0x40,0x75,0x98,0x40,0x75,0xc0,0x40,0x75,0x87,0x00,0x75} },
+{ 9, 0x0799, 0, {0x20,0x00,0x75,0x21,0x00,0x75,0x22,0x00,0x75} },
+{ 5, 0x07a2, 0, {0x23,0x00,0x75,0x47,0x00} },
+{ 7, 0x07a7, 0, {0xc3,0xe5,0x47,0x94,0x20,0x50,0x11} },
+{ 13, 0x07ae, 0, {0xe5,0x47,0x24,0x00,0xf5,0x82,0xe4,0x34,0x17,0xf5,0x83,0xe4,0xf0} },
+{ 4, 0x07bb, 0, {0x05,0x47,0x80,0xe8} },
+{ 9, 0x07bf, 0, {0xe4,0xf5,0x40,0xf5,0x3f,0xe4,0xf5,0x3c,0xf5} },
+{ 7, 0x07c8, 0, {0x3b,0xe4,0xf5,0x3e,0xf5,0x3d,0x75} },
+{ 11, 0x07cf, 0, {0x32,0x00,0x75,0x37,0x00,0x75,0x39,0x00,0x90,0x7f,0x93} },
+{ 14, 0x07da, 0, {0x74,0x3c,0xf0,0x90,0x7f,0x9c,0x74,0xff,0xf0,0x90,0x7f,0x96,0x74,0x80} },
+{ 14, 0x07e8, 0, {0xf0,0x90,0x7f,0x94,0x74,0x70,0xf0,0x90,0x7f,0x9d,0x74,0x8f,0xf0,0x90} },
+{ 14, 0x07f6, 0, {0x7f,0x97,0xe4,0xf0,0x90,0x7f,0x95,0x74,0xc2,0xf0,0x90,0x7f,0x98,0x74} },
+{ 14, 0x0804, 0, {0x28,0xf0,0x90,0x7f,0x9e,0x74,0x28,0xf0,0x90,0x7f,0xf0,0xe4,0xf0,0x90} },
+{ 14, 0x0812, 0, {0x7f,0xf1,0xe4,0xf0,0x90,0x7f,0xf2,0xe4,0xf0,0x90,0x7f,0xf3,0xe4,0xf0} },
+{ 14, 0x0820, 0, {0x90,0x7f,0xf4,0xe4,0xf0,0x90,0x7f,0xf5,0xe4,0xf0,0x90,0x7f,0xf6,0xe4} },
+{ 14, 0x082e, 0, {0xf0,0x90,0x7f,0xf7,0xe4,0xf0,0x90,0x7f,0xf8,0xe4,0xf0,0x90,0x7f,0xf9} },
+{ 14, 0x083c, 0, {0x74,0x38,0xf0,0x90,0x7f,0xfa,0x74,0xa0,0xf0,0x90,0x7f,0xfb,0x74,0xa0} },
+{ 14, 0x084a, 0, {0xf0,0x90,0x7f,0xfc,0x74,0xa0,0xf0,0x90,0x7f,0xfd,0x74,0xa0,0xf0,0x90} },
+{ 14, 0x0858, 0, {0x7f,0xfe,0x74,0xa0,0xf0,0x90,0x7f,0xff,0x74,0xa0,0xf0,0x90,0x7f,0xe0} },
+{ 14, 0x0866, 0, {0x74,0x03,0xf0,0x90,0x7f,0xe1,0x74,0x01,0xf0,0x90,0x7f,0xdd,0x74,0x80} },
+{ 11, 0x0874, 0, {0xf0,0x12,0x12,0x43,0x12,0x07,0x1e,0x7a,0x00,0x7b,0x00} },
+{ 9, 0x087f, 0, {0xc3,0xea,0x94,0x1e,0xeb,0x94,0x00,0x50,0x17} },
+{ 12, 0x0888, 0, {0x90,0x88,0x00,0xe0,0xf5,0x47,0x90,0x88,0x0b,0xe0,0xf5,0x47} },
+{ 9, 0x0894, 0, {0x90,0x7f,0x68,0xf0,0x0a,0xba,0x00,0x01,0x0b} },
+{ 2, 0x089d, 0, {0x80,0xe0} },
+{ 12, 0x089f, 0, {0x12,0x03,0xe1,0x90,0x7f,0xd6,0xe4,0xf0,0x7a,0x00,0x7b,0x00} },
+{ 13, 0x08ab, 0, {0x8a,0x04,0x8b,0x05,0xc3,0xea,0x94,0xe0,0xeb,0x94,0x2e,0x50,0x1a} },
+{ 14, 0x08b8, 0, {0xc0,0x02,0xc0,0x03,0xc0,0x04,0xc0,0x05,0x12,0x01,0xdd,0xd0,0x05,0xd0} },
+{ 10, 0x08c6, 0, {0x04,0xd0,0x03,0xd0,0x02,0x0a,0xba,0x00,0x01,0x0b} },
+{ 2, 0x08d0, 0, {0x80,0xd9} },
+{ 13, 0x08d2, 0, {0x90,0x7f,0xd6,0x74,0x02,0xf0,0x90,0x7f,0xd6,0x74,0x06,0xf0,0x90} },
+{ 14, 0x08df, 0, {0x7f,0xde,0x74,0x05,0xf0,0x90,0x7f,0xdf,0x74,0x05,0xf0,0x90,0x7f,0xac} },
+{ 14, 0x08ed, 0, {0xe4,0xf0,0x90,0x7f,0xad,0x74,0x05,0xf0,0x75,0xa8,0x80,0x75,0xf8,0x10} },
+{ 13, 0x08fb, 0, {0x90,0x7f,0xae,0x74,0x0b,0xf0,0x90,0x7f,0xe2,0x74,0x88,0xf0,0x90} },
+{ 12, 0x0908, 0, {0x7f,0xab,0x74,0x08,0xf0,0x75,0xe8,0x11,0x75,0x32,0x01,0x75} },
+{ 12, 0x0914, 0, {0x31,0x00,0x75,0x30,0x00,0xc0,0x04,0xc0,0x05,0x12,0x04,0xf7} },
+{ 10, 0x0920, 0, {0xd0,0x05,0xd0,0x04,0x75,0x34,0x00,0x75,0x35,0x01} },
+{ 13, 0x092a, 0, {0x90,0x7f,0xae,0x74,0x03,0xf0,0x8c,0x02,0xba,0x00,0x02,0x80,0x03} },
+{ 3, 0x0937, 0, {0x02,0x0a,0x3f} },
+{ 12, 0x093a, 0, {0x85,0x33,0x34,0x90,0x7f,0x9d,0x74,0x8f,0xf0,0x90,0x7f,0x97} },
+{ 14, 0x0946, 0, {0x74,0x08,0xf0,0x90,0x7f,0x9d,0x74,0x88,0xf0,0x90,0x7f,0x9a,0xe0,0xfa} },
+{ 12, 0x0954, 0, {0x74,0x05,0x5a,0xf5,0x33,0x90,0x7f,0x9d,0x74,0x8f,0xf0,0x90} },
+{ 13, 0x0960, 0, {0x7f,0x97,0x74,0x02,0xf0,0x90,0x7f,0x9d,0x74,0x82,0xf0,0xe5,0x33} },
+{ 13, 0x096d, 0, {0x25,0xe0,0xfa,0x90,0x7f,0x9a,0xe0,0x54,0x05,0xfb,0x4a,0xf5,0x33} },
+{ 2, 0x097a, 0, {0x60,0x0c} },
+{ 12, 0x097c, 0, {0x90,0x7f,0x96,0xe0,0xfa,0x90,0x7f,0x96,0x74,0x80,0x4a,0xf0} },
+{ 11, 0x0988, 0, {0x75,0x6e,0x00,0x75,0x6f,0x00,0xc0,0x04,0xc0,0x05,0x12} },
+{ 14, 0x0993, 0, {0x11,0x44,0xd0,0x05,0xd0,0x04,0x90,0x17,0x13,0xe0,0xfa,0x74,0x80,0x2a} },
+{ 6, 0x09a1, 0, {0xfa,0xe5,0x33,0xb4,0x04,0x29} },
+{ 3, 0x09a7, 0, {0xba,0xa0,0x00} },
+{ 2, 0x09aa, 0, {0x50,0x24} },
+{ 13, 0x09ac, 0, {0x90,0x17,0x13,0xe0,0x04,0xfb,0x0b,0x90,0x17,0x13,0xeb,0xf0,0x90} },
+{ 14, 0x09b9, 0, {0x17,0x13,0xe0,0xfb,0x90,0x17,0x15,0xf0,0xc0,0x02,0xc0,0x04,0xc0,0x05} },
+{ 9, 0x09c7, 0, {0x12,0x04,0xf7,0xd0,0x05,0xd0,0x04,0xd0,0x02} },
+{ 5, 0x09d0, 0, {0xe5,0x33,0xb4,0x02,0x26} },
+{ 6, 0x09d5, 0, {0xc3,0x74,0x04,0x9a,0x50,0x20} },
+{ 13, 0x09db, 0, {0x90,0x17,0x13,0xe0,0xfa,0x1a,0x1a,0x90,0x17,0x13,0xea,0xf0,0x90} },
+{ 13, 0x09e8, 0, {0x17,0x13,0xe0,0xfa,0x90,0x17,0x15,0xf0,0xc0,0x04,0xc0,0x05,0x12} },
+{ 6, 0x09f5, 0, {0x04,0xf7,0xd0,0x05,0xd0,0x04} },
+{ 5, 0x09fb, 0, {0xe5,0x33,0xb4,0x08,0x1d} },
+{ 4, 0x0a00, 0, {0xe5,0x34,0x70,0x19} },
+{ 10, 0x0a04, 0, {0x74,0x01,0x25,0x35,0x54,0x0f,0xf5,0x35,0x85,0x35} },
+{ 12, 0x0a0e, 0, {0x75,0x75,0x76,0x00,0xc0,0x04,0xc0,0x05,0x12,0x13,0xfe,0xd0} },
+{ 3, 0x0a1a, 0, {0x05,0xd0,0x04} },
+{ 5, 0x0a1d, 0, {0xe5,0x33,0xb4,0x01,0x1d} },
+{ 4, 0x0a22, 0, {0xe5,0x34,0x70,0x19} },
+{ 10, 0x0a26, 0, {0xe5,0x35,0x24,0xff,0x54,0x0f,0xf5,0x35,0x85,0x35} },
+{ 12, 0x0a30, 0, {0x75,0x75,0x76,0x00,0xc0,0x04,0xc0,0x05,0x12,0x13,0xfe,0xd0} },
+{ 3, 0x0a3c, 0, {0x05,0xd0,0x04} },
+{ 14, 0x0a3f, 0, {0xc0,0x04,0xc0,0x05,0x12,0x01,0xdd,0xd0,0x05,0xd0,0x04,0x90,0x7f,0x96} },
+{ 14, 0x0a4d, 0, {0xe0,0xfa,0x90,0x7f,0x96,0x74,0x7f,0x5a,0xf0,0x90,0x7f,0x97,0x74,0x08} },
+{ 10, 0x0a5b, 0, {0xf0,0xc3,0xec,0x94,0x00,0xed,0x94,0x02,0x40,0x08} },
+{ 8, 0x0a65, 0, {0x90,0x7f,0x96,0xe0,0xfa,0x20,0xe6,0x08} },
+{ 8, 0x0a6d, 0, {0xc3,0xe4,0x9c,0x74,0x08,0x9d,0x50,0x13} },
+{ 14, 0x0a75, 0, {0x90,0x7f,0x96,0xe0,0xfa,0x90,0x7f,0x96,0x74,0x40,0x65,0x02,0xf0,0x7c} },
+{ 5, 0x0a83, 0, {0x00,0x7d,0x00,0x80,0x05} },
+{ 5, 0x0a88, 0, {0x0c,0xbc,0x00,0x01,0x0d} },
+{ 5, 0x0a8d, 0, {0xe5,0x38,0xb4,0x01,0x0e} },
+{ 13, 0x0a92, 0, {0xc0,0x04,0xc0,0x05,0x12,0x04,0xf7,0xd0,0x05,0xd0,0x04,0x75,0x38} },
+{ 1, 0x0a9f, 0, {0x00} },
+{ 7, 0x0aa0, 0, {0xe5,0x31,0x70,0x03,0x02,0x09,0x2a} },
+{ 10, 0x0aa7, 0, {0x90,0x7f,0xc9,0xe0,0xfa,0x70,0x03,0x02,0x0c,0x2d} },
+{ 14, 0x0ab1, 0, {0x90,0x7f,0x96,0xe0,0xfa,0x90,0x7f,0x96,0x74,0x80,0x65,0x02,0xf0,0x90} },
+{ 9, 0x0abf, 0, {0x7d,0xc0,0xe0,0xfa,0xba,0x2c,0x02,0x80,0x03} },
+{ 3, 0x0ac8, 0, {0x02,0x0b,0x36} },
+{ 5, 0x0acb, 0, {0x75,0x32,0x00,0x7b,0x00} },
+{ 3, 0x0ad0, 0, {0xbb,0x64,0x00} },
+{ 2, 0x0ad3, 0, {0x50,0x1c} },
+{ 14, 0x0ad5, 0, {0xc0,0x02,0xc0,0x03,0xc0,0x04,0xc0,0x05,0x12,0x01,0xdd,0xd0,0x05,0xd0} },
+{ 13, 0x0ae3, 0, {0x04,0xd0,0x03,0xd0,0x02,0x90,0x88,0x0f,0xe0,0xf5,0x47,0x0b,0x80} },
+{ 1, 0x0af0, 0, {0xdf} },
+{ 13, 0x0af1, 0, {0xc0,0x02,0xc0,0x04,0xc0,0x05,0x12,0x07,0x1e,0x12,0x03,0xe1,0x12} },
+{ 12, 0x0afe, 0, {0x04,0xf7,0xd0,0x05,0xd0,0x04,0xd0,0x02,0x75,0x6e,0x00,0x75} },
+{ 13, 0x0b0a, 0, {0x6f,0x01,0xc0,0x02,0xc0,0x04,0xc0,0x05,0x12,0x11,0x44,0xd0,0x05} },
+{ 9, 0x0b17, 0, {0xd0,0x04,0xd0,0x02,0x75,0x70,0x4d,0x75,0x71} },
+{ 11, 0x0b20, 0, {0x0c,0x75,0x72,0x02,0xc0,0x02,0xc0,0x04,0xc0,0x05,0x12} },
+{ 11, 0x0b2b, 0, {0x11,0x75,0xd0,0x05,0xd0,0x04,0xd0,0x02,0x02,0x0c,0x2d} },
+{ 3, 0x0b36, 0, {0xba,0x2a,0x3b} },
+{ 13, 0x0b39, 0, {0x90,0x7f,0x98,0x74,0x20,0xf0,0xc0,0x02,0xc0,0x04,0xc0,0x05,0x12} },
+{ 14, 0x0b46, 0, {0x01,0xdd,0xd0,0x05,0xd0,0x04,0xd0,0x02,0x90,0x7f,0x98,0x74,0x28,0xf0} },
+{ 2, 0x0b54, 0, {0x7b,0x00} },
+{ 3, 0x0b56, 0, {0xbb,0x0a,0x00} },
+{ 5, 0x0b59, 0, {0x40,0x03,0x02,0x0c,0x2d} },
+{ 14, 0x0b5e, 0, {0xc0,0x02,0xc0,0x03,0xc0,0x04,0xc0,0x05,0x12,0x01,0xdd,0xd0,0x05,0xd0} },
+{ 8, 0x0b6c, 0, {0x04,0xd0,0x03,0xd0,0x02,0x0b,0x80,0xe2} },
+{ 3, 0x0b74, 0, {0xba,0x2b,0x1a} },
+{ 8, 0x0b77, 0, {0x90,0x7f,0xc9,0xe0,0xfb,0xbb,0x40,0x12} },
+{ 14, 0x0b7f, 0, {0xc0,0x02,0xc0,0x04,0xc0,0x05,0x12,0x12,0x05,0xd0,0x05,0xd0,0x04,0xd0} },
+{ 4, 0x0b8d, 0, {0x02,0x02,0x0c,0x2d} },
+{ 3, 0x0b91, 0, {0xba,0x10,0x1f} },
+{ 14, 0x0b94, 0, {0x90,0x7f,0x96,0xe0,0xfb,0x90,0x7f,0x96,0x74,0x80,0x65,0x03,0xf0,0xc0} },
+{ 14, 0x0ba2, 0, {0x02,0xc0,0x04,0xc0,0x05,0x12,0x10,0x3d,0xd0,0x05,0xd0,0x04,0xd0,0x02} },
+{ 3, 0x0bb0, 0, {0x02,0x0c,0x2d} },
+{ 3, 0x0bb3, 0, {0xba,0x11,0x12} },
+{ 14, 0x0bb6, 0, {0xc0,0x02,0xc0,0x04,0xc0,0x05,0x12,0x10,0x6a,0xd0,0x05,0xd0,0x04,0xd0} },
+{ 4, 0x0bc4, 0, {0x02,0x02,0x0c,0x2d} },
+{ 3, 0x0bc8, 0, {0xba,0x12,0x12} },
+{ 14, 0x0bcb, 0, {0xc0,0x02,0xc0,0x04,0xc0,0x05,0x12,0x10,0x8f,0xd0,0x05,0xd0,0x04,0xd0} },
+{ 4, 0x0bd9, 0, {0x02,0x02,0x0c,0x2d} },
+{ 3, 0x0bdd, 0, {0xba,0x13,0x0b} },
+{ 11, 0x0be0, 0, {0x90,0x7d,0xc1,0xe0,0xfb,0x90,0x88,0x00,0xf0,0x80,0x42} },
+{ 3, 0x0beb, 0, {0xba,0x14,0x11} },
+{ 14, 0x0bee, 0, {0xc0,0x02,0xc0,0x04,0xc0,0x05,0x12,0x11,0xdd,0xd0,0x05,0xd0,0x04,0xd0} },
+{ 3, 0x0bfc, 0, {0x02,0x80,0x2e} },
+{ 3, 0x0bff, 0, {0xba,0x15,0x1d} },
+{ 12, 0x0c02, 0, {0x90,0x7d,0xc1,0xe0,0xf5,0x75,0x90,0x7d,0xc2,0xe0,0xf5,0x76} },
+{ 14, 0x0c0e, 0, {0xc0,0x02,0xc0,0x04,0xc0,0x05,0x12,0x13,0xfe,0xd0,0x05,0xd0,0x04,0xd0} },
+{ 3, 0x0c1c, 0, {0x02,0x80,0x0e} },
+{ 3, 0x0c1f, 0, {0xba,0x16,0x0b} },
+{ 11, 0x0c22, 0, {0xc0,0x04,0xc0,0x05,0x12,0x13,0xa3,0xd0,0x05,0xd0,0x04} },
+{ 11, 0x0c2d, 0, {0x90,0x7f,0xc9,0xe4,0xf0,0x75,0x31,0x00,0x02,0x09,0x2a} },
+{ 1, 0x0c38, 0, {0x22} },
+{ 7, 0x0c39, 0, {0x53,0x55,0x50,0x45,0x4e,0x44,0x00} },
+{ 7, 0x0c40, 0, {0x52,0x45,0x53,0x55,0x4d,0x45,0x00} },
+{ 6, 0x0c47, 0, {0x20,0x56,0x6f,0x6c,0x20,0x00} },
+{ 13, 0x0c4d, 0, {0x44,0x41,0x42,0x55,0x53,0x42,0x20,0x76,0x31,0x2e,0x30,0x30,0x00} },
+{ 14, 0x0c5a, 0, {0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x02,0xc0,0x03,0xc0,0x04} },
+{ 14, 0x0c68, 0, {0xc0,0x05,0xc0,0x06,0xc0,0x07,0xc0,0x00,0xc0,0x01,0xc0,0xd0,0x75,0xd0} },
+{ 13, 0x0c76, 0, {0x00,0xc0,0x86,0x75,0x86,0x00,0xe5,0x91,0xc2,0xe4,0xf5,0x91,0x90} },
+{ 14, 0x0c83, 0, {0x7f,0xab,0x74,0x01,0xf0,0x90,0x7f,0xe8,0xe0,0xfa,0x90,0x7f,0xe9,0xe0} },
+{ 6, 0x0c91, 0, {0xfb,0xbb,0x00,0x02,0x80,0x03} },
+{ 3, 0x0c97, 0, {0x02,0x0d,0x38} },
+{ 3, 0x0c9a, 0, {0xba,0x80,0x14} },
+{ 14, 0x0c9d, 0, {0x90,0x7f,0x00,0x74,0x01,0xf0,0x90,0x7f,0x01,0xe4,0xf0,0x90,0x7f,0xb5} },
+{ 6, 0x0cab, 0, {0x74,0x02,0xf0,0x02,0x0e,0xcd} },
+{ 5, 0x0cb1, 0, {0xba,0x82,0x02,0x80,0x03} },
+{ 3, 0x0cb6, 0, {0x02,0x0d,0x1d} },
+{ 8, 0x0cb9, 0, {0x90,0x7f,0xec,0xe0,0xfc,0xbc,0x01,0x00} },
+{ 2, 0x0cc1, 0, {0x40,0x21} },
+{ 6, 0x0cc3, 0, {0xc3,0x74,0x07,0x9c,0x40,0x1b} },
+{ 14, 0x0cc9, 0, {0xec,0x24,0xff,0x25,0xe0,0xfd,0x24,0xc6,0xf5,0x82,0xe4,0x34,0x7f,0xf5} },
+{ 13, 0x0cd7, 0, {0x83,0xe0,0xfd,0x53,0x05,0x01,0x90,0x7f,0x00,0xed,0xf0,0x80,0x2b} },
+{ 3, 0x0ce4, 0, {0xbc,0x81,0x00} },
+{ 2, 0x0ce7, 0, {0x40,0x21} },
+{ 6, 0x0ce9, 0, {0xc3,0x74,0x87,0x9c,0x40,0x1b} },
+{ 14, 0x0cef, 0, {0xec,0x24,0x7f,0x25,0xe0,0xfc,0x24,0xb6,0xf5,0x82,0xe4,0x34,0x7f,0xf5} },
+{ 13, 0x0cfd, 0, {0x83,0xe0,0xfc,0x53,0x04,0x01,0x90,0x7f,0x00,0xec,0xf0,0x80,0x05} },
+{ 5, 0x0d0a, 0, {0x90,0x7f,0x00,0xe4,0xf0} },
+{ 14, 0x0d0f, 0, {0x90,0x7f,0x01,0xe4,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x02,0x0e,0xcd} },
+{ 5, 0x0d1d, 0, {0xba,0x81,0x02,0x80,0x03} },
+{ 3, 0x0d22, 0, {0x02,0x0e,0xc5} },
+{ 14, 0x0d25, 0, {0x90,0x7f,0x00,0xe4,0xf0,0x90,0x7f,0x01,0xe4,0xf0,0x90,0x7f,0xb5,0x74} },
+{ 5, 0x0d33, 0, {0x02,0xf0,0x02,0x0e,0xcd} },
+{ 3, 0x0d38, 0, {0xbb,0x01,0x2d} },
+{ 6, 0x0d3b, 0, {0xba,0x00,0x03,0x02,0x0e,0xcd} },
+{ 3, 0x0d41, 0, {0xba,0x02,0x11} },
+{ 13, 0x0d44, 0, {0x75,0x59,0x00,0xc0,0x02,0xc0,0x03,0x12,0x0e,0xf0,0xd0,0x03,0xd0} },
+{ 4, 0x0d51, 0, {0x02,0x02,0x0e,0xcd} },
+{ 5, 0x0d55, 0, {0xba,0x21,0x02,0x80,0x03} },
+{ 3, 0x0d5a, 0, {0x02,0x0e,0xcd} },
+{ 11, 0x0d5d, 0, {0x75,0x37,0x01,0x90,0x7f,0xc5,0xe4,0xf0,0x02,0x0e,0xcd} },
+{ 3, 0x0d68, 0, {0xbb,0x03,0x1f} },
+{ 6, 0x0d6b, 0, {0xba,0x00,0x03,0x02,0x0e,0xcd} },
+{ 5, 0x0d71, 0, {0xba,0x02,0x02,0x80,0x03} },
+{ 3, 0x0d76, 0, {0x02,0x0e,0xcd} },
+{ 13, 0x0d79, 0, {0x75,0x59,0x01,0xc0,0x02,0xc0,0x03,0x12,0x0e,0xf0,0xd0,0x03,0xd0} },
+{ 4, 0x0d86, 0, {0x02,0x02,0x0e,0xcd} },
+{ 3, 0x0d8a, 0, {0xbb,0x06,0x54} },
+{ 5, 0x0d8d, 0, {0xba,0x80,0x02,0x80,0x03} },
+{ 3, 0x0d92, 0, {0x02,0x0e,0xc5} },
+{ 8, 0x0d95, 0, {0x90,0x7f,0xeb,0xe0,0xfc,0xbc,0x01,0x15} },
+{ 12, 0x0d9d, 0, {0x7c,0xfb,0x7d,0x0f,0x8d,0x06,0x7f,0x00,0x90,0x7f,0xd4,0xee} },
+{ 9, 0x0da9, 0, {0xf0,0x90,0x7f,0xd5,0xec,0xf0,0x02,0x0e,0xcd} },
+{ 10, 0x0db2, 0, {0x90,0x7f,0xeb,0xe0,0xfc,0xbc,0x02,0x02,0x80,0x03} },
+{ 3, 0x0dbc, 0, {0x02,0x0e,0xc5} },
+{ 10, 0x0dbf, 0, {0x90,0x7f,0xea,0xe0,0xfc,0xbc,0x00,0x02,0x80,0x03} },
+{ 3, 0x0dc9, 0, {0x02,0x0e,0xc5} },
+{ 12, 0x0dcc, 0, {0x7c,0x3b,0x7d,0x0f,0x8d,0x06,0x7f,0x00,0x90,0x7f,0xd4,0xee} },
+{ 9, 0x0dd8, 0, {0xf0,0x90,0x7f,0xd5,0xec,0xf0,0x02,0x0e,0xcd} },
+{ 6, 0x0de1, 0, {0xbb,0x07,0x03,0x02,0x0e,0xc5} },
+{ 3, 0x0de7, 0, {0xbb,0x08,0x10} },
+{ 13, 0x0dea, 0, {0xac,0x48,0x90,0x7f,0x00,0xec,0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0} },
+{ 3, 0x0df7, 0, {0x02,0x0e,0xcd} },
+{ 3, 0x0dfa, 0, {0xbb,0x09,0x31} },
+{ 5, 0x0dfd, 0, {0xba,0x00,0x02,0x80,0x03} },
+{ 3, 0x0e02, 0, {0x02,0x0e,0xc5} },
+{ 14, 0x0e05, 0, {0x90,0x7f,0xea,0xe0,0xfc,0xc3,0x74,0x01,0x9c,0x50,0x03,0x02,0x0e,0xc5} },
+{ 8, 0x0e13, 0, {0x90,0x7f,0xea,0xe0,0xfc,0xbc,0x00,0x0a} },
+{ 10, 0x0e1b, 0, {0x90,0x17,0x21,0xe4,0xf0,0x90,0x17,0x22,0xe4,0xf0} },
+{ 9, 0x0e25, 0, {0x90,0x7f,0xea,0xe0,0xf5,0x48,0x02,0x0e,0xcd} },
+{ 3, 0x0e2e, 0, {0xbb,0x0a,0x27} },
+{ 5, 0x0e31, 0, {0xba,0x81,0x02,0x80,0x03} },
+{ 3, 0x0e36, 0, {0x02,0x0e,0xc5} },
+{ 14, 0x0e39, 0, {0x90,0x7f,0xec,0xe0,0xfa,0x24,0x20,0xfa,0xe4,0x34,0x17,0xfc,0x8a,0x82} },
+{ 14, 0x0e47, 0, {0x8c,0x83,0xe0,0xfa,0x90,0x7f,0x00,0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0} },
+{ 3, 0x0e55, 0, {0x02,0x0e,0xcd} },
+{ 5, 0x0e58, 0, {0xbb,0x0b,0x02,0x80,0x03} },
+{ 3, 0x0e5d, 0, {0x02,0x0e,0xa9} },
+{ 13, 0x0e60, 0, {0x90,0x17,0x20,0xe4,0xf0,0x90,0x7f,0xec,0xe0,0xfa,0xba,0x01,0x1a} },
+{ 8, 0x0e6d, 0, {0x90,0x7f,0xed,0xe0,0xfa,0xba,0x00,0x12} },
+{ 14, 0x0e75, 0, {0x90,0x7f,0xea,0xe0,0xfa,0x90,0x17,0x21,0xf0,0xc0,0x03,0x12,0x04,0xe2} },
+{ 4, 0x0e83, 0, {0xd0,0x03,0x80,0x46} },
+{ 8, 0x0e87, 0, {0x90,0x7f,0xec,0xe0,0xfa,0xba,0x02,0x3e} },
+{ 8, 0x0e8f, 0, {0x90,0x7f,0xed,0xe0,0xfa,0xba,0x00,0x36} },
+{ 13, 0x0e97, 0, {0xc0,0x03,0x12,0x04,0xef,0xd0,0x03,0x90,0x7f,0xea,0xe0,0xfa,0x90} },
+{ 5, 0x0ea4, 0, {0x17,0x22,0xf0,0x80,0x24} },
+{ 5, 0x0ea9, 0, {0xbb,0x12,0x02,0x80,0x17} },
+{ 5, 0x0eae, 0, {0xbb,0x81,0x02,0x80,0x0d} },
+{ 5, 0x0eb3, 0, {0xbb,0x83,0x02,0x80,0x08} },
+{ 5, 0x0eb8, 0, {0xbb,0x82,0x02,0x80,0x03} },
+{ 3, 0x0ebd, 0, {0xbb,0x84,0x05} },
+{ 5, 0x0ec0, 0, {0x12,0x06,0x4e,0x80,0x08} },
+{ 8, 0x0ec5, 0, {0x90,0x7f,0xb4,0x74,0x03,0xf0,0x80,0x06} },
+{ 6, 0x0ecd, 0, {0x90,0x7f,0xb4,0x74,0x02,0xf0} },
+{ 2, 0x0ed3, 0, {0xd0,0x86} },
+{ 14, 0x0ed5, 0, {0xd0,0xd0,0xd0,0x01,0xd0,0x00,0xd0,0x07,0xd0,0x06,0xd0,0x05,0xd0,0x04} },
+{ 13, 0x0ee3, 0, {0xd0,0x03,0xd0,0x02,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 11, 0x0ef0, 0, {0x90,0x7f,0xec,0xe0,0xf5,0x5a,0xc3,0x94,0x01,0x40,0x1d} },
+{ 7, 0x0efb, 0, {0xc3,0x74,0x07,0x95,0x5a,0x40,0x16} },
+{ 13, 0x0f02, 0, {0xe5,0x5a,0x24,0xff,0x25,0xe0,0xfa,0x24,0xc6,0xf5,0x82,0xe4,0x34} },
+{ 9, 0x0f0f, 0, {0x7f,0xf5,0x83,0xaa,0x59,0xea,0xf0,0x80,0x22} },
+{ 7, 0x0f18, 0, {0xc3,0xe5,0x5a,0x94,0x81,0x40,0x1b} },
+{ 7, 0x0f1f, 0, {0xc3,0x74,0x87,0x95,0x5a,0x40,0x14} },
+{ 13, 0x0f26, 0, {0xe5,0x5a,0x24,0xff,0x25,0xe0,0xfa,0x24,0xb6,0xf5,0x82,0xe4,0x34} },
+{ 7, 0x0f33, 0, {0x7f,0xf5,0x83,0xaa,0x59,0xea,0xf0} },
+{ 1, 0x0f3a, 0, {0x22} },
+{ 14, 0x0f3b, 0, {0x09,0x02,0xba,0x00,0x03,0x01,0x00,0x40,0x00,0x09,0x04,0x00,0x00,0x00} },
+{ 14, 0x0f49, 0, {0x01,0x01,0x00,0x00,0x09,0x24,0x01,0x00,0x01,0x3d,0x00,0x01,0x01,0x0c} },
+{ 14, 0x0f57, 0, {0x24,0x02,0x01,0x10,0x07,0x00,0x02,0x03,0x00,0x00,0x00,0x0d,0x24,0x06} },
+{ 14, 0x0f65, 0, {0x03,0x01,0x02,0x15,0x00,0x03,0x00,0x03,0x00,0x00,0x09,0x24,0x03,0x02} },
+{ 14, 0x0f73, 0, {0x01,0x01,0x00,0x01,0x00,0x09,0x24,0x03,0x04,0x02,0x03,0x00,0x03,0x00} },
+{ 14, 0x0f81, 0, {0x09,0x24,0x03,0x05,0x03,0x06,0x00,0x01,0x00,0x09,0x04,0x01,0x00,0x00} },
+{ 14, 0x0f8f, 0, {0x01,0x02,0x00,0x00,0x09,0x04,0x01,0x01,0x01,0x01,0x02,0x00,0x00,0x07} },
+{ 14, 0x0f9d, 0, {0x24,0x01,0x02,0x01,0x01,0x00,0x0b,0x24,0x02,0x01,0x02,0x02,0x10,0x01} },
+{ 14, 0x0fab, 0, {0x80,0xbb,0x00,0x09,0x05,0x88,0x05,0x00,0x01,0x01,0x00,0x00,0x07,0x25} },
+{ 14, 0x0fb9, 0, {0x01,0x00,0x00,0x00,0x00,0x09,0x04,0x02,0x00,0x02,0x00,0x00,0x00,0x00} },
+{ 14, 0x0fc7, 0, {0x07,0x05,0x82,0x02,0x40,0x00,0x00,0x07,0x05,0x02,0x02,0x40,0x00,0x00} },
+{ 14, 0x0fd5, 0, {0x09,0x04,0x02,0x01,0x03,0x00,0x00,0x00,0x00,0x07,0x05,0x82,0x02,0x40} },
+{ 14, 0x0fe3, 0, {0x00,0x00,0x07,0x05,0x02,0x02,0x40,0x00,0x00,0x09,0x05,0x89,0x05,0xa0} },
+{ 10, 0x0ff1, 0, {0x01,0x01,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00} },
+{ 14, 0x0ffb, 0, {0x12,0x01,0x00,0x01,0x00,0x00,0x00,0x40,0x47,0x05,0x99,0x99,0x00,0x01} },
+{ 14, 0x1009, 0, {0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x02,0xba} },
+{ 4, 0x1017, 0, {0x00,0x03,0x01,0x00} },
+{ 2, 0x101b, 0, {0x7a,0x00} },
+{ 3, 0x101d, 0, {0xba,0x05,0x00} },
+{ 2, 0x1020, 0, {0x50,0x17} },
+{ 8, 0x1022, 0, {0x90,0x7f,0xa5,0xe0,0xfb,0x30,0xe0,0x05} },
+{ 5, 0x102a, 0, {0x90,0x00,0x01,0x80,0x0d} },
+{ 10, 0x102f, 0, {0xc0,0x02,0x12,0x01,0xdd,0xd0,0x02,0x0a,0x80,0xe4} },
+{ 3, 0x1039, 0, {0x90,0x00,0x01} },
+{ 1, 0x103c, 0, {0x22} },
+{ 14, 0x103d, 0, {0x90,0x7d,0xc1,0xe0,0xf9,0xa3,0xe0,0xfa,0xa3,0xe0,0xfb,0x7c,0x00,0x7d} },
+{ 4, 0x104b, 0, {0x7e,0xeb,0x60,0x12} },
+{ 14, 0x104f, 0, {0x89,0x82,0x8a,0x83,0xe0,0xa3,0xa9,0x82,0xaa,0x83,0x8c,0x82,0x8d,0x83} },
+{ 4, 0x105d, 0, {0xf0,0x0c,0xdb,0xee} },
+{ 8, 0x1061, 0, {0x90,0x7d,0xc3,0xe0,0x90,0x7f,0xb9,0xf0} },
+{ 1, 0x1069, 0, {0x22} },
+{ 14, 0x106a, 0, {0x90,0x7d,0xc1,0xe0,0xf9,0xa3,0xe0,0xfa,0xa3,0xe0,0xfb,0x7c,0xc4,0x7d} },
+{ 4, 0x1078, 0, {0x7d,0xeb,0x60,0xe5} },
+{ 14, 0x107c, 0, {0x8c,0x82,0x8d,0x83,0xe0,0x0c,0x89,0x82,0x8a,0x83,0xf0,0xa3,0xa9,0x82} },
+{ 4, 0x108a, 0, {0xaa,0x83,0xdb,0xee} },
+{ 1, 0x108e, 0, {0x22} },
+{ 14, 0x108f, 0, {0x90,0x7f,0xa5,0x74,0x80,0xf0,0x05,0x86,0x90,0x7d,0xc1,0xe0,0x05,0x86} },
+{ 14, 0x109d, 0, {0xa3,0xf0,0x12,0x10,0x1b,0x90,0x7f,0xa6,0x05,0x86,0xa3,0xa3,0xe0,0xf9} },
+{ 5, 0x10ab, 0, {0x60,0x16,0xa3,0x05,0x86} },
+{ 13, 0x10b0, 0, {0x90,0x7f,0xa6,0x05,0x86,0xe0,0xa3,0x05,0x86,0xf0,0xc0,0x01,0x12} },
+{ 6, 0x10bd, 0, {0x10,0x1b,0xd0,0x01,0xd9,0xed} },
+{ 6, 0x10c3, 0, {0x90,0x7f,0xa5,0x74,0x40,0xf0} },
+{ 1, 0x10c9, 0, {0x22} },
+{ 8, 0x10ca, 0, {0x90,0x88,0x02,0x74,0x01,0xf0,0x7a,0x00} },
+{ 3, 0x10d2, 0, {0xba,0xff,0x00} },
+{ 2, 0x10d5, 0, {0x50,0x0a} },
+{ 10, 0x10d7, 0, {0xc0,0x02,0x12,0x01,0xdd,0xd0,0x02,0x0a,0x80,0xf1} },
+{ 1, 0x10e1, 0, {0x22} },
+{ 5, 0x10e2, 0, {0xe5,0x6b,0xb4,0xc0,0x08} },
+{ 8, 0x10e7, 0, {0x90,0x88,0x03,0xe5,0x6c,0xf0,0x80,0x06} },
+{ 6, 0x10ef, 0, {0x90,0x88,0x02,0xe5,0x6c,0xf0} },
+{ 4, 0x10f5, 0, {0x7a,0x00,0x7b,0x00} },
+{ 11, 0x10f9, 0, {0xc3,0xea,0x94,0x32,0xeb,0x64,0x80,0x94,0x80,0x50,0x07} },
+{ 5, 0x1104, 0, {0x0a,0xba,0x00,0x01,0x0b} },
+{ 2, 0x1109, 0, {0x80,0xee} },
+{ 1, 0x110b, 0, {0x22} },
+{ 10, 0x110c, 0, {0x90,0x88,0x03,0xe5,0x6d,0xf0,0x05,0x39,0x7a,0x00} },
+{ 3, 0x1116, 0, {0xba,0x28,0x00} },
+{ 2, 0x1119, 0, {0x50,0x03} },
+{ 3, 0x111b, 0, {0x0a,0x80,0xf8} },
+{ 5, 0x111e, 0, {0xe5,0x39,0xb4,0x10,0x08} },
+{ 8, 0x1123, 0, {0x90,0x88,0x02,0x74,0xc0,0xf0,0x80,0x0e} },
+{ 5, 0x112b, 0, {0xe5,0x39,0xb4,0x20,0x09} },
+{ 9, 0x1130, 0, {0x90,0x88,0x02,0x74,0x80,0xf0,0x75,0x39,0x00} },
+{ 2, 0x1139, 0, {0x7a,0x00} },
+{ 3, 0x113b, 0, {0xba,0x28,0x00} },
+{ 2, 0x113e, 0, {0x50,0x03} },
+{ 3, 0x1140, 0, {0x0a,0x80,0xf8} },
+{ 1, 0x1143, 0, {0x22} },
+{ 4, 0x1144, 0, {0xe5,0x6f,0x60,0x02} },
+{ 2, 0x1148, 0, {0x80,0x07} },
+{ 7, 0x114a, 0, {0x7a,0x00,0x75,0x39,0x00,0x80,0x05} },
+{ 5, 0x1151, 0, {0x7a,0x40,0x75,0x39,0x10} },
+{ 9, 0x1156, 0, {0xe5,0x6e,0x2a,0xfa,0xe5,0x6e,0x25,0x39,0xf5} },
+{ 10, 0x115f, 0, {0x39,0x90,0x88,0x02,0x74,0x80,0x2a,0xf0,0x7a,0x00} },
+{ 8, 0x1169, 0, {0xc3,0xea,0x64,0x80,0x94,0xa8,0x50,0x03} },
+{ 3, 0x1171, 0, {0x0a,0x80,0xf5} },
+{ 1, 0x1174, 0, {0x22} },
+{ 6, 0x1175, 0, {0xaa,0x70,0xab,0x71,0xac,0x72} },
+{ 12, 0x117b, 0, {0x8a,0x82,0x8b,0x83,0x8c,0xf0,0x12,0x14,0xee,0xfd,0x60,0x18} },
+{ 13, 0x1187, 0, {0x8d,0x6d,0xc0,0x02,0xc0,0x03,0xc0,0x04,0x12,0x11,0x0c,0xd0,0x04} },
+{ 9, 0x1194, 0, {0xd0,0x03,0xd0,0x02,0x0a,0xba,0x00,0x01,0x0b} },
+{ 2, 0x119d, 0, {0x80,0xdc} },
+{ 1, 0x119f, 0, {0x22} },
+{ 13, 0x11a0, 0, {0xe5,0x73,0xc4,0x54,0x0f,0xfa,0x53,0x02,0x0f,0xc3,0x74,0x09,0x9a} },
+{ 2, 0x11ad, 0, {0x50,0x06} },
+{ 6, 0x11af, 0, {0x74,0x37,0x2a,0xfb,0x80,0x04} },
+{ 4, 0x11b5, 0, {0x74,0x30,0x2a,0xfb} },
+{ 12, 0x11b9, 0, {0x8b,0x6d,0xc0,0x03,0x12,0x11,0x0c,0xd0,0x03,0xaa,0x73,0x53} },
+{ 8, 0x11c5, 0, {0x02,0x0f,0xc3,0x74,0x09,0x9a,0x50,0x06} },
+{ 6, 0x11cd, 0, {0x74,0x37,0x2a,0xfb,0x80,0x04} },
+{ 4, 0x11d3, 0, {0x74,0x30,0x2a,0xfb} },
+{ 5, 0x11d7, 0, {0x8b,0x6d,0x12,0x11,0x0c} },
+{ 1, 0x11dc, 0, {0x22} },
+{ 7, 0x11dd, 0, {0x90,0x7d,0xc3,0xe0,0xfa,0x60,0x0f} },
+{ 12, 0x11e4, 0, {0x90,0x7d,0xc1,0xe0,0xf5,0x6e,0x90,0x7d,0xc2,0xe0,0xf5,0x6f} },
+{ 3, 0x11f0, 0, {0x12,0x11,0x44} },
+{ 12, 0x11f3, 0, {0x90,0x7d,0xff,0xe4,0xf0,0x75,0x70,0xc4,0x75,0x71,0x7d,0x75} },
+{ 5, 0x11ff, 0, {0x72,0x01,0x12,0x11,0x75} },
+{ 1, 0x1204, 0, {0x22} },
+{ 2, 0x1205, 0, {0x7a,0x04} },
+{ 3, 0x1207, 0, {0xba,0x40,0x00} },
+{ 2, 0x120a, 0, {0x50,0x36} },
+{ 14, 0x120c, 0, {0xea,0x24,0xc0,0xf5,0x82,0xe4,0x34,0x7d,0xf5,0x83,0xe0,0xfb,0x7c,0x00} },
+{ 3, 0x121a, 0, {0xbc,0x08,0x00} },
+{ 2, 0x121d, 0, {0x50,0x20} },
+{ 6, 0x121f, 0, {0x8b,0x05,0xed,0x30,0xe7,0x0b} },
+{ 11, 0x1225, 0, {0x90,0x7f,0x96,0x74,0x42,0xf0,0x74,0xc3,0xf0,0x80,0x08} },
+{ 8, 0x1230, 0, {0x90,0x7f,0x96,0xe4,0xf0,0x74,0x81,0xf0} },
+{ 7, 0x1238, 0, {0xeb,0x25,0xe0,0xfb,0x0c,0x80,0xdb} },
+{ 3, 0x123f, 0, {0x0a,0x80,0xc5} },
+{ 1, 0x1242, 0, {0x22} },
+{ 4, 0x1243, 0, {0x7a,0x00,0x7b,0xef} },
+{ 3, 0x1247, 0, {0xba,0x10,0x00} },
+{ 2, 0x124a, 0, {0x50,0x20} },
+{ 14, 0x124c, 0, {0x74,0x11,0x2b,0xfb,0x24,0x00,0xfc,0xe4,0x34,0x18,0xfd,0x8c,0x82,0x8d} },
+{ 14, 0x125a, 0, {0x83,0xe4,0xf0,0xea,0x24,0x00,0xf5,0x82,0xe4,0x34,0x19,0xf5,0x83,0xe4} },
+{ 4, 0x1268, 0, {0xf0,0x0a,0x80,0xdb} },
+{ 1, 0x126c, 0, {0x22} },
+{ 14, 0x126d, 0, {0x74,0xf8,0x24,0x00,0xf5,0x82,0x74,0x03,0x34,0x84,0xf5,0x83,0xe4,0xf0} },
+{ 14, 0x127b, 0, {0x74,0xf9,0x24,0x00,0xf5,0x82,0x74,0x03,0x34,0x84,0xf5,0x83,0xe4,0xf0} },
+{ 14, 0x1289, 0, {0x74,0xfa,0x24,0x00,0xf5,0x82,0x74,0x03,0x34,0x84,0xf5,0x83,0xe4,0xf0} },
+{ 14, 0x1297, 0, {0x74,0xfb,0x24,0x00,0xf5,0x82,0x74,0x03,0x34,0x84,0xf5,0x83,0xe4,0xf0} },
+{ 14, 0x12a5, 0, {0x74,0xff,0x24,0x00,0xf5,0x82,0x74,0x03,0x34,0x84,0xf5,0x83,0xe4,0xf0} },
+{ 1, 0x12b3, 0, {0x22} },
+{ 14, 0x12b4, 0, {0x12,0x03,0xcb,0x12,0x12,0x6d,0x7a,0xc0,0x7b,0x87,0x7c,0x01,0x74,0x01} },
+{ 14, 0x12c2, 0, {0x2a,0xfd,0xe4,0x3b,0xfe,0x8c,0x07,0x8a,0x82,0x8b,0x83,0x8c,0xf0,0x74} },
+{ 14, 0x12d0, 0, {0x01,0x12,0x14,0xbf,0x2d,0xfa,0xe4,0x3e,0xfb,0x8f,0x04,0x8d,0x82,0x8e} },
+{ 14, 0x12de, 0, {0x83,0x8f,0xf0,0x74,0x06,0x12,0x14,0xbf,0x74,0x01,0x2a,0xfd,0xe4,0x3b} },
+{ 14, 0x12ec, 0, {0xfe,0x8c,0x07,0x8a,0x82,0x8b,0x83,0x8c,0xf0,0xe4,0x12,0x14,0xbf,0x74} },
+{ 14, 0x12fa, 0, {0x01,0x2d,0xfa,0xe4,0x3e,0xfb,0x8f,0x04,0x8d,0x82,0x8e,0x83,0x8f,0xf0} },
+{ 14, 0x1308, 0, {0x74,0x0b,0x12,0x14,0xbf,0x74,0x01,0x2a,0xfd,0xe4,0x3b,0xfe,0x8c,0x07} },
+{ 14, 0x1316, 0, {0x8a,0x82,0x8b,0x83,0x8c,0xf0,0x74,0x08,0x12,0x14,0xbf,0x74,0x01,0x2d} },
+{ 14, 0x1324, 0, {0xfa,0xe4,0x3e,0xfb,0x8f,0x04,0x8d,0x82,0x8e,0x83,0x8f,0xf0,0x74,0x01} },
+{ 14, 0x1332, 0, {0x12,0x14,0xbf,0x2a,0xfd,0xe4,0x3b,0xfe,0x8c,0x07,0x8a,0x82,0x8b,0x83} },
+{ 14, 0x1340, 0, {0x8c,0xf0,0xe4,0x12,0x14,0xbf,0x74,0x01,0x2d,0xfa,0xe4,0x3e,0xfb,0x8f} },
+{ 14, 0x134e, 0, {0x04,0x8d,0x82,0x8e,0x83,0x8f,0xf0,0x74,0x03,0x12,0x14,0xbf,0x7d,0x00} },
+{ 3, 0x135c, 0, {0xbd,0x06,0x00} },
+{ 2, 0x135f, 0, {0x50,0x12} },
+{ 11, 0x1361, 0, {0x8a,0x82,0x8b,0x83,0x8c,0xf0,0x0a,0xba,0x00,0x01,0x0b} },
+{ 7, 0x136c, 0, {0xe4,0x12,0x14,0xbf,0x0d,0x80,0xe9} },
+{ 13, 0x1373, 0, {0x8a,0x82,0x8b,0x83,0x8c,0xf0,0xe5,0x74,0x12,0x14,0xbf,0x74,0xf9} },
+{ 14, 0x1380, 0, {0x24,0x00,0xf5,0x82,0x74,0x03,0x34,0x84,0xf5,0x83,0x74,0x0f,0xf0,0x74} },
+{ 14, 0x138e, 0, {0xfe,0x24,0x00,0xf5,0x82,0x74,0x03,0x34,0x84,0xf5,0x83,0x74,0x01,0xf0} },
+{ 6, 0x139c, 0, {0x12,0x03,0xe1,0x12,0x04,0xf7} },
+{ 1, 0x13a2, 0, {0x22} },
+{ 13, 0x13a3, 0, {0x90,0x7d,0xc1,0xe0,0xfa,0x24,0x00,0xfb,0xe4,0x34,0x19,0xfc,0x90} },
+{ 14, 0x13b0, 0, {0x7d,0xc2,0xe0,0xfd,0x8b,0x82,0x8c,0x83,0xf0,0x75,0xf0,0x11,0xea,0xa4} },
+{ 3, 0x13be, 0, {0xfa,0x7b,0x00} },
+{ 3, 0x13c1, 0, {0xbb,0x10,0x00} },
+{ 2, 0x13c4, 0, {0x50,0x24} },
+{ 14, 0x13c6, 0, {0xea,0x24,0x00,0xfc,0xe4,0x34,0x18,0xfd,0xeb,0x2c,0xfc,0xe4,0x3d,0xfd} },
+{ 14, 0x13d4, 0, {0x74,0x04,0x2b,0x24,0xc0,0xf5,0x82,0xe4,0x34,0x7d,0xf5,0x83,0xe0,0xfe} },
+{ 8, 0x13e2, 0, {0x8c,0x82,0x8d,0x83,0xf0,0x0b,0x80,0xd7} },
+{ 14, 0x13ea, 0, {0xea,0x24,0x00,0xfa,0xe4,0x34,0x18,0xfb,0x74,0x10,0x2a,0xf5,0x82,0xe4} },
+{ 5, 0x13f8, 0, {0x3b,0xf5,0x83,0xe4,0xf0} },
+{ 1, 0x13fd, 0, {0x22} },
+{ 4, 0x13fe, 0, {0xe5,0x76,0x60,0x02} },
+{ 2, 0x1402, 0, {0x80,0x16} },
+{ 12, 0x1404, 0, {0x74,0x0f,0x55,0x75,0xfa,0x8a,0x75,0x24,0x00,0xf5,0x82,0xe4} },
+{ 10, 0x1410, 0, {0x34,0x19,0xf5,0x83,0xe0,0xf5,0x74,0x12,0x12,0xb4} },
+{ 10, 0x141a, 0, {0x12,0x10,0xca,0x75,0x6e,0x00,0x75,0x6f,0x00,0x12} },
+{ 6, 0x1424, 0, {0x11,0x44,0x75,0x70,0xb9,0x75} },
+{ 6, 0x142a, 0, {0x71,0x14,0x75,0x72,0x02,0x12} },
+{ 11, 0x1430, 0, {0x11,0x75,0xe5,0x76,0xb4,0x02,0x04,0x74,0x01,0x80,0x01} },
+{ 1, 0x143b, 0, {0xe4} },
+{ 3, 0x143c, 0, {0xfa,0x70,0x0f} },
+{ 12, 0x143f, 0, {0x74,0x01,0x25,0x75,0xf5,0x73,0xc0,0x02,0x12,0x11,0xa0,0xd0} },
+{ 3, 0x144b, 0, {0x02,0x80,0x0a} },
+{ 10, 0x144e, 0, {0x85,0x75,0x73,0xc0,0x02,0x12,0x11,0xa0,0xd0,0x02} },
+{ 12, 0x1458, 0, {0x75,0x6e,0x00,0x75,0x6f,0x01,0xc0,0x02,0x12,0x11,0x44,0xd0} },
+{ 4, 0x1464, 0, {0x02,0xea,0x70,0x1a} },
+{ 13, 0x1468, 0, {0x75,0xf0,0x11,0xe5,0x75,0xa4,0xfa,0x24,0x00,0xfa,0xe4,0x34,0x18} },
+{ 9, 0x1475, 0, {0xfb,0x8a,0x70,0x8b,0x71,0x75,0x72,0x01,0x12} },
+{ 4, 0x147e, 0, {0x11,0x75,0x80,0x36} },
+{ 2, 0x1482, 0, {0x7a,0x00} },
+{ 3, 0x1484, 0, {0xba,0x10,0x00} },
+{ 2, 0x1487, 0, {0x50,0x2f} },
+{ 13, 0x1489, 0, {0xea,0x24,0x00,0xf5,0x82,0xe4,0x34,0x19,0xf5,0x83,0xe0,0xfb,0xe5} },
+{ 4, 0x1496, 0, {0x75,0xb5,0x03,0x1b} },
+{ 14, 0x149a, 0, {0x75,0xf0,0x11,0xea,0xa4,0xfb,0x24,0x00,0xfb,0xe4,0x34,0x18,0xfc,0x8b} },
+{ 9, 0x14a8, 0, {0x70,0x8c,0x71,0x75,0x72,0x01,0xc0,0x02,0x12} },
+{ 4, 0x14b1, 0, {0x11,0x75,0xd0,0x02} },
+{ 3, 0x14b5, 0, {0x0a,0x80,0xcc} },
+{ 1, 0x14b8, 0, {0x22} },
+{ 6, 0x14b9, 0, {0x50,0x72,0x6f,0x67,0x20,0x00} },
+{ 14, 0x14bf, 0, {0xc8,0xc0,0xe0,0xc8,0xc0,0xe0,0xe5,0xf0,0x60,0x0b,0x14,0x60,0x0f,0x14} },
+{ 7, 0x14cd, 0, {0x60,0x11,0x14,0x60,0x12,0x80,0x15} },
+{ 7, 0x14d4, 0, {0xd0,0xe0,0xa8,0x82,0xf6,0x80,0x0e} },
+{ 5, 0x14db, 0, {0xd0,0xe0,0xf0,0x80,0x09} },
+{ 4, 0x14e0, 0, {0xd0,0xe0,0x80,0x05} },
+{ 5, 0x14e4, 0, {0xd0,0xe0,0xa8,0x82,0xf2} },
+{ 4, 0x14e9, 0, {0xc8,0xd0,0xe0,0xc8} },
+{ 1, 0x14ed, 0, {0x22} },
+{ 14, 0x14ee, 0, {0xc8,0xc0,0xe0,0xe5,0xf0,0x60,0x0d,0x14,0x60,0x0f,0x14,0x60,0x0f,0x14} },
+{ 6, 0x14fc, 0, {0x60,0x10,0x74,0xff,0x80,0x0f} },
+{ 5, 0x1502, 0, {0xa8,0x82,0xe6,0x80,0x0a} },
+{ 3, 0x1507, 0, {0xe0,0x80,0x07} },
+{ 4, 0x150a, 0, {0xe4,0x93,0x80,0x03} },
+{ 3, 0x150e, 0, {0xa8,0x82,0xe2} },
+{ 4, 0x1511, 0, {0xf8,0xd0,0xe0,0xc8} },
+{ 1, 0x1515, 0, {0x22} },
+{ 0, 0x0000, 1, {0} }
+
+};
+
+static unsigned char bitstream[] = {
+
+0x00,0x09,0x0F,0xF0,0x0F,0xF0,0x0F,0xF0, 0x0F,0xF0,0x00,0x00,0x01,0x61,0x00,0x0D,
+0x64,0x61,0x62,0x75,0x73,0x62,0x74,0x72, 0x2E,0x6E,0x63,0x64,0x00,0x62,0x00,0x0B,
+0x73,0x31,0x30,0x78,0x6C,0x76,0x71,0x31, 0x30,0x30,0x00,0x63,0x00,0x0B,0x31,0x39,
+0x39,0x39,0x2F,0x30,0x39,0x2F,0x32,0x34, 0x00,0x64,0x00,0x09,0x31,0x30,0x3A,0x34,
+0x32,0x3A,0x34,0x36,0x00,0x65,0x00,0x00, 0x2E,0xC0,0xFF,0x20,0x17,0x5F,0x9F,0x5B,
+0xFE,0xFB,0xBB,0xB7,0xBB,0xBB,0xFB,0xBF, 0xAF,0xEF,0xFB,0xDF,0xB7,0xFB,0xFB,0x7F,
+0xBF,0xB7,0xEF,0xF2,0xFF,0xFB,0xFE,0xFF, 0xFF,0xEF,0xFF,0xFE,0xFF,0xBF,0xFF,0xFF,
+0xFF,0xFF,0xAF,0xFF,0xFA,0xFF,0xFF,0xFF, 0xC9,0xFF,0xFF,0xFF,0xDF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFB,0xFF,0xA3,0xFF,0xFB,
+0xFE,0xFF,0xBF,0xEF,0xE3,0xFE,0xFF,0xBF, 0xE3,0xFE,0xFF,0xBF,0x6F,0xFB,0xF6,0xFF,
+0xBF,0xFF,0x47,0xFF,0xFF,0x9F,0xEE,0xF9, 0xFE,0xCF,0x9F,0xEF,0xFB,0xCF,0x9B,0xEE,
+0xF8,0xFE,0xEF,0x8F,0xEE,0xFB,0xFE,0x0B, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xBF,0xFF,0xFF,0xFB,0xFF,0xFF, 0xBF,0xFF,0xFF,0xFC,0x17,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0x7F, 0xFF,0xFF,0xFB,0xFF,0xFF,0x7F,0xFF,0xFF,
+0xFC,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x5F,0xFF, 0xFF,0xFD,0xFF,0xFF,0xDB,0xFF,0xFD,0xFF,
+0x77,0xFF,0xFD,0xFF,0xFF,0xDF,0xFE,0xFD, 0xFF,0xFF,0xF2,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFD,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE1,
+0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xE3,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBF,
+0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0x67,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0x7F,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF, 0xFF,0xFF,0xDF,0xFF,0xFF,0xFF,0x2F,0xFF,
+0xF3,0xFD,0xFF,0x7F,0xDE,0xF7,0xFD,0xFF, 0x7F,0xF7,0x7D,0xFF,0x7F,0xDF,0xF7,0xBD,
+0xFF,0x7F,0xFF,0x1F,0xFF,0xEF,0xFB,0xFE, 0xFF,0xBF,0xEF,0xFB,0xFE,0xFF,0xEF,0xFB,
+0xFE,0xFF,0xBF,0xEF,0xFB,0xFE,0xFF,0xFF, 0x3F,0xFE,0x7F,0x9F,0xE7,0xF9,0xFE,0x7F,
+0x9F,0xE7,0xFA,0x7F,0x9F,0xE7,0xF9,0xFE, 0x7F,0x9F,0xE7,0xFF,0xFC,0x7F,0xBF,0xBF,
+0xEF,0xFB,0xFE,0xFF,0xBF,0xEF,0xFB,0xB7, 0xBF,0xEF,0xFB,0xFE,0xFF,0xBF,0xEF,0xFB,
+0xFF,0xE0,0xFD,0xF9,0xFE,0x7F,0x9F,0xE7, 0xF9,0xFE,0x7F,0x9D,0xF9,0xFE,0x7D,0x9D,
+0xE7,0xF9,0xFE,0x7F,0x9F,0xED,0xED,0xFF, 0xFD,0xFF,0x7F,0xDF,0xF7,0xFD,0xFF,0x7F,
+0xDF,0xFD,0xFF,0x7F,0xDF,0xF7,0xFD,0xFF, 0x7F,0xDF,0xFF,0x9B,0xFF,0xEF,0xFB,0xFE,
+0xFB,0xBF,0xEF,0xBB,0xFE,0xFF,0xAF,0xBB, 0xBE,0xFF,0xBF,0xEF,0xFB,0xFE,0xFF,0xFF,
+0xB7,0xBF,0xDB,0xF6,0xBD,0xBF,0x6B,0xDB, 0xF6,0xF9,0xBF,0x5B,0xD6,0xF9,0xBF,0x6F,
+0xDB,0xF6,0xFD,0xBF,0xFF,0x0E,0xFF,0xFF, 0xFF,0xFF,0x5F,0xFF,0xF7,0xFF,0xFF,0x7F,
+0xF7,0xBD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xDF,0x9F,0xFF,0xFF,0xFF,0xFE,0xFF,
+0xFF,0xEF,0xFE,0xFE,0xFF,0xFF,0x77,0xFF, 0xFB,0xFB,0xFF,0xFF,0xFF,0xFF,0xF8,0x3F,
+0xFF,0xFD,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xF4,0x7F,0xFF,0xFE,0xFD, 0xBE,0xFF,0xDF,0xFE,0xFF,0xFF,0xEF,0x7F,
+0xFF,0xCF,0xFF,0xCF,0xFF,0xFF,0xFF,0xDF, 0xE6,0xFF,0xFF,0x7F,0xDF,0xF7,0xDD,0x7F,
+0x7F,0xDF,0xF7,0xFF,0x7F,0xDF,0xD7,0xFD, 0xFF,0x7F,0xDF,0xF7,0xFF,0xCD,0xFF,0xF2,
+0xFF,0xFF,0x4F,0x7F,0xF4,0xFF,0xFF,0xFF, 0xE7,0xEF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xBB,0xFF,0xEF,0xFF,0xFE,0xFF, 0xFF,0xFF,0xEF,0xFF,0xFF,0xEF,0xFF,0xFB,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x65, 0xEF,0xFF,0xFF,0x7F,0xFF,0xFD,0xEF,0xFF,
+0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFE,0xCF,0xDF,0xFE,0xFF,
+0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xF3,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFE,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xBF,0xFF, 0xFF,0xFF,0xE3,0x7F,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xEF,0xEB,0xFF,0xFE,0xBF,0xFF, 0xEB,0xFF,0xFC,0x7F,0xFF,0xFF,0xFF,0xEE,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDD,0xFF, 0xD6,0xFF,0xFD,0xBF,0xFF,0xFB,0xFF,0xFE,
+0xFD,0xFF,0xFF,0xFD,0xEF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xDE,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xBF,0xFF,0xFD,0xFF,0x7F,0xBF, 0xFF,0x5F,0xDF,0xFF,0xFF,0xBF,0x77,0xFF,
+0xFF,0xFF,0x7F,0xD7,0xFF,0xFF,0xFF,0xFF, 0xFF,0xC3,0xFF,0xFF,0xFF,0xFF,0xDF,0xEF,
+0xFF,0xFF,0xFE,0xFB,0xFF,0xFF,0xDF,0xBF, 0xFF,0xFF,0xFF,0xFF,0xED,0xFF,0xB7,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xAF,0x7F,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xDF,0xBF,0xDF,0xF3,0xFD,0xFB,0xFF,0x5B,
+0xFD,0xFF,0xBF,0xEF,0xF7,0xFF,0xFF,0x7D, 0xFF,0xFF,0xFF,0xFF,0xF8,0x3B,0xFF,0xBF,
+0x6F,0xFF,0xFE,0xFF,0xBF,0xFF,0xEB,0x7D, 0xFF,0xEF,0xFB,0xFE,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xF2,0x7F,0xFC,0xFF,0x3F,0xDF,0xED, 0xFE,0xFF,0xFF,0xFF,0xFF,0xEF,0x5F,0xF7,
+0xB5,0xFF,0xEF,0xFF,0xFF,0xFF,0xE0,0x3F, 0x9F,0x9E,0xFF,0xFF,0xEF,0xFF,0xDF,0xFF,
+0xBF,0x5F,0xBF,0xCF,0xF3,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0x69,0xAF,0x33,0xFD,0xFF,
+0xFB,0xFF,0xFF,0xFF,0xFF,0xFC,0xFF,0x7F, 0xD9,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xF5,
+0xA3,0xDF,0x6E,0xDE,0xFF,0xFF,0xBD,0xFF, 0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xE7,0xFD,
+0xFF,0xFF,0xFF,0xF9,0xEF,0xC6,0xFE,0xB7, 0xAD,0xE5,0xF9,0xFF,0xFF,0xFF,0xCF,0xFF,
+0xFF,0xFF,0xCD,0xFB,0x7F,0xFF,0xFF,0xFF, 0xF9,0xF6,0x0F,0xDF,0xEC,0xCF,0x7F,0xFF,
+0xFB,0x7F,0xFF,0xFF,0xFF,0xFD,0xFF,0xFE, 0xF9,0xFD,0x7F,0xFF,0x7F,0xFF,0xF9,0x5B,
+0xFF,0x73,0xDC,0xFD,0x7B,0xDF,0xFF,0xFF, 0xFF,0x7B,0xFF,0xFF,0xF7,0x53,0xD6,0xFF,
+0xFF,0xFF,0xFF,0xD8,0x9F,0xFE,0xFF,0xEF, 0x7F,0xEE,0xFF,0xFF,0xFF,0xFB,0xED,0xED,
+0xFD,0xFF,0xFE,0xFF,0xFF,0xFB,0x7F,0xFF, 0xE2,0x7F,0xFF,0x6F,0xD8,0x57,0xF7,0xFF,
+0xFF,0xFF,0xDF,0xFF,0xE8,0xFF,0xFF,0xFD, 0xFF,0xFF,0xFC,0x7F,0xFF,0xE4,0xFF,0xFB,
+0xEF,0xFB,0xFE,0xDF,0xB7,0xED,0xFF,0xFE, 0xDF,0x7F,0xFF,0xFE,0x7F,0xB7,0xFF,0xFF,
+0xFF,0xFF,0x89,0xFF,0xFF,0xCF,0xF3,0xFE, 0x7F,0xFF,0xEF,0xFF,0xFE,0x7E,0x7F,0xFB,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF1, 0xFF,0xEB,0x7A,0xD5,0xBF,0x6F,0xDB,0xBE,
+0xFD,0xB7,0xD8,0xF6,0xE5,0xBF,0x6F,0xFB, 0xFE,0xF5,0xBD,0x7E,0x06,0xFF,0xDF,0xF7,
+0xFB,0xF6,0xFF,0x3F,0xFF,0xDB,0xFF,0xFF, 0x6F,0xFB,0xF7,0xFF,0xFF,0xFF,0xFB,0xFE,
+0xF7,0xAF,0xFF,0xB7,0xED,0xEF,0xF7,0xFE, 0xFF,0xFF,0xDF,0xFF,0xFE,0xFF,0xEF,0xFF,
+0xFF,0xFF,0xFF,0xBF,0xF7,0xFC,0x1F,0xEE, 0xFB,0xFE,0xBD,0xFF,0x7F,0x5F,0xD7,0xFD,
+0xFB,0x43,0xFF,0xFF,0xFD,0xFF,0x5F,0xFF, 0xF7,0xFF,0xF9,0x3F,0xFF,0xCF,0xF3,0xFD,
+0xF7,0x7E,0xEF,0xA7,0xF9,0xFE,0x8F,0xA7, 0xE9,0xF3,0x7E,0x9F,0xFB,0xF8,0xFF,0xFF,
+0x3F,0xFD,0x7F,0x5F,0xDF,0xFD,0xFF,0xFF, 0x5F,0xFF,0xFD,0x5F,0xFF,0xFF,0x7F,0xFD,
+0x7F,0xFD,0x9F,0xFF,0xE0,0xFF,0xFA,0xF8, 0xBE,0x6F,0x9F,0xE6,0xF8,0xBE,0x3F,0x9A,
+0xF9,0xBE,0x6F,0x9F,0xE2,0xF9,0xFE,0x6F, 0x9F,0xF9,0xFF,0xF5,0xFD,0x7F,0xCF,0xDF,
+0xFD,0xFD,0x7F,0xFF,0xF5,0xFF,0xFF,0xFF, 0xF7,0xF5,0xFD,0x0F,0xDB,0xFF,0xD3,0xFF,
+0xEB,0xFA,0xFF,0xFF,0xBF,0xFF,0xFA,0xFF, 0xFF,0xCB,0xFB,0xFE,0xFF,0xFF,0xEB,0xFA,
+0xFE,0xFF,0xFF,0xB7,0xFF,0xFF,0xFF,0xFF, 0xBF,0xFF,0xDF,0xF5,0xFF,0xFF,0xD7,0xFF,
+0xFF,0xFF,0xDF,0xD7,0xF5,0xFF,0x7F,0xFE, 0x4F,0xFF,0xFD,0xFF,0x7F,0x7F,0xFF,0xAD,
+0xEB,0xFB,0xFF,0xAD,0xFF,0xFF,0xFF,0xFF, 0xAF,0xEB,0xFB,0xFF,0xFC,0x0D,0xFF,0xFF,
+0xDF,0xD2,0xFD,0xFF,0xFF,0xFD,0xF6,0xFF, 0xFF,0x7F,0xFF,0xFF,0x1F,0xFF,0xFF,0xFF,
+0xFF,0xFB,0x3F,0x7D,0xEB,0x32,0xFE,0xBF, 0x2F,0xEB,0xFA,0xAE,0xBD,0xE0,0xFA,0x7E,
+0xBF,0xAD,0xEB,0xFA,0xFE,0xBF,0xF5,0x7F, 0xFF,0xDE,0xFE,0xE3,0xFB,0xFF,0xFF,0xFF,
+0xDF,0xEF,0x4F,0xDF,0xFF,0x7F,0xDF,0xFF, 0xF7,0xFF,0xFF,0xF8,0x7F,0xFF,0xFF,0xEF,
+0xFB,0xFF,0xFF,0xFF,0xEF,0xFF,0xFF,0xDF, 0xED,0xFB,0xDF,0xFF,0xBF,0xFF,0xFF,0xFF,
+0x81,0xFF,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF, 0xFF,0xFF,0xFE,0xDD,0xFE,0xEF,0xFD,0xFF,
+0xFF,0xFB,0xFE,0xF7,0xFF,0x93,0xFD,0xFB, 0x7E,0xFF,0xFE,0x87,0xE9,0xFF,0x7F,0xB3,
+0x9F,0xFE,0xFE,0xFF,0xAF,0xFD,0xFE,0x7E, 0x3F,0xFE,0x67,0xFF,0xFF,0xF7,0xFF,0xFF,
+0xFC,0xF7,0xDF,0xFD,0xFF,0x7F,0xFF,0xFF, 0x7F,0x6D,0xFF,0xFF,0xFE,0xFF,0xFF,0x2F,
+0xFF,0xBF,0xFF,0xFF,0xEE,0xFF,0xBE,0xFF, 0xFF,0xFE,0xFF,0xEF,0xFF,0xFF,0xFE,0xFF,
+0xEF,0xFF,0xFF,0xFA,0x5F,0xFF,0xFF,0xFB, 0xFF,0xFF,0xEF,0xFF,0xFB,0xFE,0xFD,0xFF,
+0xFE,0xFF,0xFB,0xFF,0xFF,0xFF,0x7F,0xFF, 0xFE,0xBF,0xDF,0xFF,0xFB,0xFF,0xFF,0xF7,
+0xFC,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F, 0xFF,0xFF,0xFF,0xFF,0xFF,0xF2,0x7F,0xFF,
+0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF, 0xF3,0xFF,0xFF,0xFF,0xEF,0xFB,0xFF,0xFF,
+0xFF,0xDF,0xE2,0xFF,0xFF,0xFB,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFB,0xE7,0xFF,0xFD,
+0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,0xED, 0xEF,0xFD,0xFF,0xFF,0xDF,0xD7,0xF5,0xFD,
+0x7F,0x5D,0xFD,0xFF,0x7F,0xDF,0x97,0xF4, 0xFD,0x7B,0x5F,0xFF,0xC9,0xFF,0xFB,0xFE,
+0xFF,0xBF,0xFF,0x5F,0xFF,0xFF,0xF7,0xFF, 0xEF,0xFD,0xFF,0xEF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xF7,0xFF,0xD7,0xFD,0x7D,0x7F,0xFF, 0xFF,0xFF,0xFF,0xEF,0xDF,0xF7,0xFD,0xFF,
+0xBB,0xFF,0xFF,0x7F,0xFF,0xFE,0xE3,0xFF, 0xF9,0xFE,0x7F,0xBF,0xEF,0xFB,0xFE,0xFF,
+0xBF,0xF9,0xFE,0xFF,0x9F,0xEF,0xF9,0xFE, 0xFF,0xBF,0xF3,0xDA,0xFF,0x37,0xCD,0xF3,
+0x7C,0xDF,0x37,0xCD,0xF3,0x7F,0x37,0xCD, 0xF3,0x7C,0xDF,0x37,0xCC,0xF3,0x7F,0x5A,
+0xBD,0xF6,0xFD,0xBF,0x6F,0xDB,0xF6,0xFD, 0xBF,0x6F,0xDE,0xFD,0xBF,0x6F,0xDB,0xF6,
+0xFD,0xBF,0x6F,0xFE,0xF1,0x6F,0xEB,0x7A, 0xDE,0xB7,0xAD,0xEB,0x7A,0xDE,0xB7,0xAF,
+0x7A,0xDE,0xB7,0xAD,0xEB,0x7A,0xDE,0xB7, 0xFF,0x7E,0xFF,0xFE,0xCD,0xB3,0x6C,0xDB,
+0x36,0xCD,0xB3,0x6C,0xDE,0xCD,0xB3,0x6C, 0xDB,0x36,0xCD,0xB3,0x6C,0xDF,0xC9,0xBF,
+0xF7,0xBD,0xEF,0x7A,0x9E,0xA7,0xA9,0xEA, 0x7A,0xB7,0xBD,0xEA,0x7B,0xDE,0xA7,0xBD,
+0xCA,0x72,0x8D,0x91,0xFF,0xEF,0xFB,0xFE, 0xFF,0xBF,0xEF,0xFB,0xFE,0xF7,0xEF,0xFB,
+0xFE,0xFF,0xBF,0xEF,0xFB,0xFE,0xFF,0xFE, 0x87,0xFF,0xF6,0xFD,0xBF,0x6F,0xDB,0xF6,
+0xFD,0xBF,0x6F,0xF6,0xFD,0xBF,0x6F,0xDB, 0xF6,0xFD,0xBF,0x6F,0xFE,0x4F,0xFF,0xBF,
+0xEF,0xBB,0xEE,0xFB,0xBE,0xEF,0xBB,0xEF, 0xBE,0xEF,0xBB,0xEE,0xFB,0xBE,0xEF,0xBB,
+0xEF,0xFC,0x5F,0xFF,0xFF,0xFF,0x3F,0xCF, 0xF3,0xFC,0xFF,0x3F,0xCF,0xFC,0xFF,0x3F,
+0xCF,0xF3,0xFC,0xFF,0x3F,0xCF,0xFD,0x9F, 0xFE,0xBF,0xAF,0xEB,0xFA,0xFE,0xBF,0xAF,
+0xEB,0xFE,0xBF,0xAF,0xEB,0xFA,0xFE,0xBF, 0xAF,0xEB,0xFF,0xE1,0x6F,0xFD,0xFF,0x7F,
+0xDF,0xF7,0xFD,0xFF,0x7F,0xDF,0xFD,0xFF, 0x7F,0xDF,0xF7,0xFD,0xFF,0x7F,0xDF,0xFF,
+0x7A,0xBF,0xFB,0xFE,0xDF,0xB7,0xED,0xFB, 0x7E,0xDF,0xB7,0xFB,0x7E,0xDF,0xB7,0xED,
+0xFB,0x7E,0xDF,0xB7,0xFF,0xC9,0xFF,0xFF, 0xBF,0xEF,0xFB,0xFE,0xFF,0xBF,0xEF,0xFB,
+0xFF,0xBF,0xEF,0xFB,0xFE,0xFF,0xBF,0xEE, 0xFB,0xFE,0xBB,0xFF,0xFE,0xFF,0xBF,0xEF,
+0xFB,0xFE,0xFF,0xBF,0xEF,0xFE,0xFF,0xBF, 0xEF,0xFB,0xFE,0xFF,0x3F,0xCF,0xFF,0xE7,
+0xFE,0xFF,0xF5,0xFD,0x77,0x5D,0xD7,0x35, 0xDD,0x77,0xD7,0xF5,0xCD,0x7B,0x5D,0xD7,
+0xF5,0xDD,0x77,0xFE,0x27,0xFF,0xFF,0x8B, 0xE2,0xF8,0xBE,0x2F,0x8B,0xE2,0xF9,0xAF,
+0x8B,0xE2,0xF8,0xBE,0x2F,0x8B,0xE2,0xF9, 0xFE,0x1F,0xFF,0x5F,0xD7,0xF5,0xFD,0x7F,
+0x5F,0xD7,0xF5,0xFF,0x5F,0xD7,0xF5,0xFD, 0x7F,0x5F,0xD7,0xF5,0xFF,0xFA,0x3F,0xFE,
+0xBF,0xAF,0xEB,0xFA,0xFE,0xBF,0xAF,0xEB, 0xEC,0xBF,0xAF,0xEB,0xFA,0xFE,0xBF,0xAF,
+0xEB,0xFF,0xFE,0x7F,0xFD,0x7F,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE6, 0xFF,0xFA,0xDF,0xF7,0xFD,0xFF,0x7F,0xDF,
+0xF7,0xFC,0xFF,0xDF,0xF7,0xFD,0xFF,0x7F, 0xDF,0xF7,0xFD,0xFF,0xF5,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0x02,0xFF,0xFE,0xBF,0xAB,0xEB,0xFA, 0xBE,0xBF,0x23,0xEB,0xDE,0x1F,0xAF,0xEA,
+0xFA,0xFE,0xAF,0xAF,0xEB,0xFD,0x97,0xFF, 0xF3,0xFC,0x7B,0x1F,0xCF,0xF1,0xFC,0x7F,
+0x1F,0xF1,0xFC,0x77,0x1F,0xCD,0xF1,0xFC, 0xFF,0x1F,0xFE,0x87,0xFF,0xAF,0xEF,0xFA,
+0xFE,0xFF,0xAF,0xEF,0xFA,0xFD,0xBF,0x2B, 0xFB,0x7E,0xBF,0xBF,0xEB,0xFB,0xFB,0xFB,
+0xDF,0xFF,0xFB,0xF7,0xFF,0xFF,0x7F,0xF7, 0xF7,0xFF,0xFD,0xDF,0xFE,0xFC,0xDF,0xFF,
+0xDF,0xFF,0xFD,0xFF,0xDA,0xBF,0xFF,0xBB, 0xEF,0xFB,0xF9,0xFF,0xBE,0xEF,0xFB,0xFB,
+0xBF,0xEF,0xFB,0xFE,0xFF,0xBF,0xEF,0xFB, 0xFF,0xF7,0x7F,0xFD,0xD7,0xFF,0xFF,0x7F,
+0xFF,0xFF,0xFF,0xFE,0xF7,0xFF,0xFE,0xFF, 0xF7,0xFF,0xFF,0x7F,0xFF,0xFF,0xEC,0xFF,
+0xFF,0xFE,0xDF,0xBF,0xFF,0xFB,0xFE,0xFF, 0xBB,0x68,0xAE,0x1F,0xAE,0xFB,0xFB,0xFF,
+0xFF,0xBF,0xFF,0xD5,0xFF,0x7F,0xFF,0xFF, 0xF7,0xFE,0xFE,0xFF,0xBF,0xEF,0x9F,0xFD,
+0x7F,0xFF,0xCB,0xFF,0xFF,0xDF,0xFF,0xFF, 0xBB,0xF7,0xBF,0xFF,0xFF,0xFF,0xFF,0xDF,
+0xFF,0xBF,0xFB,0xFF,0xFF,0xFF,0xDE,0x3F, 0xFF,0xFF,0xFF,0xFF,0xFF,0xA7,0xFF,0xFF,
+0xFF,0xFF,0xEF,0xFF,0x7F,0xFB,0xFD,0xFB, 0x7F,0xFF,0xFF,0xFF,0xFF,0xCF,0xF3,0x7C,
+0xFF,0x7F,0x8D,0x7F,0xFF,0xFF,0xFF,0xFF, 0xFB,0xFF,0xF7,0xFB,0xFE,0xFD,0xFF,0xFF,
+0xFF,0xFF,0xF7,0xFD,0xFF,0x7F,0xFD,0x1F, 0xFD,0xFF,0xFF,0xFF,0xFF,0xBF,0xDF,0xFF,
+0xFF,0xFE,0x5C,0xFF,0x6D,0xFF,0x7F,0xAB, 0xE7,0xF1,0xFF,0xFD,0x9F,0xFF,0xFF,0xAD,
+0xEB,0x7A,0x3F,0x1F,0xFF,0xFF,0xFE,0xBF, 0xAF,0xF3,0xDE,0xF5,0xFF,0x8F,0xFB,0xDF,
+0xE6,0x7F,0xFF,0xDF,0xF3,0xFD,0xFF,0x7E, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0xF7,0xF3,
+0x7F,0xDF,0xF7,0xEF,0xFF,0xF6,0x3F,0x9F, 0xDF,0xFF,0xFF,0xEE,0xFF,0xFF,0xEF,0xFB,
+0xFF,0xFF,0xF9,0xFB,0xFE,0x4F,0xBF,0xEF, 0xBB,0xFF,0x69,0xAF,0xAF,0xFC,0xFF,0x3F,
+0xDD,0xFF,0xFC,0xBF,0x8F,0xFF,0xFD,0xF3, 0xBF,0xED,0x9E,0xFC,0xBF,0x6F,0xF5,0xD3,
+0xDF,0xFF,0xDB,0xD6,0xF5,0xEF,0xFD,0xFE, 0xFF,0xB9,0xFF,0x1F,0xD2,0xA9,0xAF,0xFF,
+0xDB,0xF7,0xBF,0xEF,0x46,0xFF,0xFF,0xAD, 0xEB,0x7A,0xDF,0xEF,0xF7,0xFF,0x7F,0xF7,
+0x9F,0xED,0xFF,0x7F,0xFF,0xAD,0xEB,0x7F, 0xF5,0x6F,0xFF,0xFD,0xFB,0xD6,0xF4,0xF7,
+0xFB,0xF9,0x7E,0x7F,0xFF,0x5F,0xC2,0xFE, 0xBF,0xFD,0xFB,0x33,0xDF,0xF9,0x5B,0xFF,
+0xFF,0xDD,0x67,0x7D,0xCF,0xEF,0xDB,0xEC, 0xFF,0x77,0xDD,0xF7,0xFD,0xFF,0xFF,0xDE,
+0xA7,0xBF,0xD4,0x9F,0xFF,0xFF,0xBF,0xEF, 0xFE,0xFF,0xDF,0xEF,0xBB,0xFF,0xFF,0xEF,
+0xEB,0xFA,0xFF,0xEF,0xBD,0xFB,0xFF,0xE2, 0x7F,0xFF,0xDF,0xDF,0xF7,0xFD,0xBF,0xBB,
+0x73,0xF7,0xFD,0x7F,0xDF,0xDE,0xF7,0xBF, 0xEA,0xDB,0xF6,0xFF,0xD6,0xFF,0xFF,0x66,
+0xFF,0xBE,0xFF,0xBF,0x6B,0xD9,0xF6,0xDF, 0xFF,0xFB,0x7E,0x7F,0xB7,0x7E,0xFF,0xFE,
+0xFF,0xCD,0xFF,0xFE,0x7F,0xFF,0xFC,0xFD, 0x3F,0xFB,0xFB,0xF7,0xFF,0xFF,0xFB,0xF6,
+0x7D,0xFE,0x7F,0xFF,0xFC,0xFF,0xB9,0xFF, 0xF9,0xFA,0xFE,0xBF,0xAF,0x5B,0xD6,0xED,
+0xAD,0x7B,0xF6,0xF9,0xBF,0xEF,0xF8,0xFA, 0xFE,0xBF,0xFE,0xE6,0xFF,0xFF,0xF7,0xFD,
+0xFF,0x7F,0xBF,0xEF,0xF3,0xFF,0xFF,0x6F, 0xF7,0xFE,0xFF,0xFF,0xF7,0xFD,0xFE,0xF7,
+0xEF,0xFF,0xFB,0xEF,0xFB,0x7E,0xDE,0xFE, 0xFF,0xBF,0xFF,0xFE,0xFF,0xFF,0xFB,0xFF,
+0xFF,0xEF,0xFB,0x6F,0xFC,0x1F,0xFE,0xE7, 0xFF,0xFF,0xFF,0xEF,0xFF,0xD3,0xB4,0xBB,
+0xFF,0xFF,0xFD,0xBF,0x6F,0xE3,0xFE,0xFF, 0xBF,0xFC,0xBF,0xF7,0xCF,0xF7,0xFD,0xFF,
+0x2F,0xDF,0xAB,0xEA,0xFF,0xDF,0xE7,0xEA, 0x9A,0xAF,0xEF,0xFB,0xFE,0xFF,0xF5,0x3F,
+0xFD,0x7E,0xFF,0xD7,0xF5,0xFB,0xFF,0xFD, 0xF7,0xFF,0x7F,0xFE,0xF7,0xFD,0xFF,0xD7,
+0xFF,0xD7,0x7F,0xEE,0x7F,0xFA,0x79,0xFE, 0x2F,0x8B,0xE6,0xF9,0xFE,0x3F,0x9E,0xF9,
+0xBE,0x2F,0x0B,0xE7,0xF9,0xFE,0x2F,0x9F, 0xFD,0xFF,0xFE,0x7D,0x7F,0x5F,0xD7,0xFF,
+0xFF,0x7F,0xFF,0xFD,0xFF,0x7F,0x5F,0x97, 0xFF,0xFD,0x7F,0x5F,0xFF,0xE3,0xFF,0xFF,
+0xFA,0xFE,0xBF,0xAF,0xFB,0xFB,0xFF,0xFF, 0xCF,0xEB,0xFE,0xBF,0xAF,0xFF,0xFA,0xFE,
+0xBF,0xFF,0x87,0xFF,0xFF,0xF5,0xFF,0xFF, 0xFF,0xFF,0xFD,0xFF,0x7F,0xFF,0xFF,0xFF,
+0xFB,0xFF,0xFF,0xF5,0xFF,0xFF,0xFE,0x0F, 0xFF,0xFD,0xEB,0xFF,0xFF,0xF7,0xFF,0xEF,
+0x7B,0xDF,0xFE,0xFF,0xFF,0xDF,0xF7,0xFD, 0xEB,0x7F,0xDF,0xFF,0x5F,0xFF,0xFF,0xFF,
+0xFF,0xFD,0xBF,0xFF,0x7E,0xFA,0xBF,0xC7, 0xDB,0xF7,0xBD,0x3F,0xFB,0xFF,0xF6,0xFF,
+0xFA,0xAF,0xFF,0xEB,0xFA,0xFE,0x3F,0x2F, 0xEA,0xFA,0x3E,0xAD,0xC9,0xBA,0xF6,0xAD,
+0xAF,0xEB,0xFA,0xF6,0xBF,0xFE,0x7F,0xFF, 0xFF,0xFD,0xFF,0xF1,0x7F,0x3F,0xCF,0xF1,
+0xEF,0xFF,0x7F,0xFF,0xBC,0xDF,0xDF,0xF7, 0xDD,0xFF,0xE0,0x7F,0xFF,0xFF,0xFE,0xFF,
+0xFA,0xEC,0xBB,0x7F,0x5F,0xFF,0xFB,0xEC, 0xFF,0xEF,0xB7,0xFF,0xF7,0xFF,0xFF,0xB5,
+0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0xEE,0xDF, 0x5F,0xDF,0xDE,0xFF,0xAE,0xE7,0x77,0xFF,
+0xFF,0xDF,0xF7,0xFF,0xE3,0xFF,0xFA,0xBB, 0xFE,0xFF,0xAF,0xFD,0xFB,0xFE,0xBF,0xAB,
+0xF9,0xFE,0xFF,0xBF,0x7F,0xBF,0xFE,0xBD, 0xFE,0xD7,0xFF,0x9F,0xFD,0xFF,0xBE,0xEF,
+0xFF,0xEE,0xFD,0xBB,0x5B,0xEF,0xFF,0x7F, 0xEF,0xFF,0xEF,0xFF,0x7F,0xFF,0x4F,0xFF,
+0xEF,0xFB,0xBC,0xFC,0xFF,0xFF,0xFF,0xFE, 0xFE,0xFD,0xFA,0xFE,0xFB,0xFF,0xFD,0xF3,
+0xFB,0xFF,0xF8,0x5F,0xFF,0xFF,0xD7,0xF5, 0xFD,0xDF,0xEF,0xFF,0xF3,0xDC,0x5F,0xCE,
+0xF5,0xBD,0xFF,0xFF,0xD7,0xFF,0xFF,0xF9, 0x3F,0xFF,0xDF,0xF7,0xFF,0xFE,0xFF,0xFD,
+0xFF,0xFB,0xFF,0xF7,0xB9,0x7D,0xFE,0xDF, 0xFF,0xFF,0xFF,0xFF,0xF9,0x7F,0xFF,0xFE,
+0xFF,0xFF,0x7F,0xFF,0xFE,0xFF,0xFF,0xF7, 0xF6,0xFF,0xBF,0xF1,0xF8,0xFF,0xFF,0xFF,
+0xFF,0xE0,0xFF,0xFF,0xFF,0xFF,0xF9,0xFF, 0xFF,0xFF,0xFF,0xFF,0xEF,0xEF,0xFF,0xFF,
+0x9B,0xFB,0x7F,0xFF,0xFF,0xFF,0xC1,0xFF, 0xDF,0xFF,0x3F,0x5F,0xD7,0xBF,0xEF,0xBB,
+0xDE,0xEE,0xFF,0x7F,0xDF,0xFF,0xFE,0xF5, 0x7F,0xDF,0xFF,0x99,0xFF,0xFF,0xFA,0xFF,
+0xBF,0xFD,0xEB,0x7A,0xFF,0xB7,0xFE,0xFE, 0xFF,0xFF,0xEF,0xFF,0xFF,0xFD,0xBF,0xFF,
+0x97,0xFF,0xFD,0xF7,0xFF,0x7F,0xF7,0xFF, 0xFF,0xFD,0x5F,0xFE,0xF3,0xF9,0xDF,0xDF,
+0xFF,0xFF,0xFC,0xFF,0xFF,0x83,0xFF,0xFF, 0xFE,0xFF,0x9E,0xEC,0xFB,0xEE,0xFF,0x9F,
+0xBF,0xEF,0xFF,0xFE,0xED,0x7B,0xFF,0xFF, 0xFF,0xF1,0x5A,0xFF,0xFF,0xFD,0xFF,0x7C,
+0x69,0x3B,0xDF,0xFF,0x7F,0x1F,0xDF,0xFF, 0xFD,0xBA,0xFF,0xFF,0xFB,0xFF,0x5B,0xBD,
+0xFF,0xFF,0xFF,0xFF,0xD7,0xB6,0xED,0xE9, 0xFF,0xD6,0xBD,0x6F,0x5F,0xFB,0xFF,0xEF,
+0xFF,0x5F,0xFE,0xF6,0x6F,0xFF,0xFF,0xFF, 0xFF,0xF7,0xEB,0x7A,0xDF,0xFF,0x9F,0x7F,
+0x7F,0xFF,0xB7,0xFF,0xFF,0xFE,0xDF,0xFF, 0x6C,0xFF,0xFB,0xFF,0xBB,0x6F,0xEB,0xFE,
+0xCC,0xF7,0xA5,0xFA,0x5C,0xF5,0x75,0xBB, 0xB7,0xDF,0xFE,0x6F,0x5F,0xC5,0xBF,0xFD,
+0x7B,0xFE,0xFF,0x95,0xE7,0x29,0xCF,0x4F, 0xF5,0x91,0xEE,0x6B,0xDF,0xEF,0xFD,0x54,
+0xF5,0xBD,0xB1,0xFF,0xEF,0xEE,0xFB,0xBE, 0xBF,0xAF,0xFE,0xDE,0xBD,0x6F,0xDA,0xF2,
+0xFF,0xAF,0xBE,0xFF,0xFF,0xFD,0x7E,0xA7, 0xFF,0xF7,0xFF,0xBF,0xEF,0x7B,0xF6,0xFD,
+0xBD,0x4A,0xF2,0x85,0x85,0xBF,0x5B,0xFE, 0xB5,0xFD,0xFA,0xFF,0x4F,0xFF,0xFE,0xDF,
+0xFF,0xED,0xFF,0xBF,0xFF,0xBF,0x7F,0xFE, 0xFF,0xB7,0x6D,0xFF,0xF7,0xBF,0xBF,0xEF,
+0xFD,0x1F,0xFF,0xFE,0x7D,0xFF,0x67,0xFF, 0xFF,0xFF,0x3F,0x7F,0xFE,0xBF,0xFF,0xE7,
+0xDF,0xE7,0xFF,0xEF,0x6B,0xFC,0x1F,0xFF, 0xBF,0xEF,0xFB,0xFE,0xDE,0xBF,0xAF,0xFA,
+0xFF,0xB6,0xEF,0xF9,0xFE,0xFF,0x8F,0xEF, 0xDB,0xEF,0xAB,0x6F,0xFB,0xFE,0xFF,0xFF,
+0xEF,0xFD,0xFF,0x7F,0xFF,0xFF,0xDE,0xFF, 0xFF,0xEF,0xFF,0xFF,0xFF,0x3F,0xFF,0x6C,
+0xFF,0xBF,0xFB,0xFF,0xFE,0xFF,0xFB,0xFE, 0xDF,0xFF,0xFF,0xEF,0xFF,0xFF,0xBF,0xFF,
+0xFF,0xFE,0xFB,0xFF,0xD5,0x7F,0xFF,0xFF, 0xEF,0xFB,0xFF,0xFF,0xBF,0xEF,0x43,0xB5,
+0xFD,0x6F,0xCF,0xD6,0xBE,0x3F,0x7F,0xDB, 0xFE,0xC3,0xFF,0xFD,0xFF,0xAF,0xEB,0xFB,
+0xFC,0xFF,0x3E,0xEF,0xE8,0xFA,0xBD,0xCD, 0xAA,0xFE,0xFE,0x7D,0xCF,0xFF,0xB7,0xFF,
+0xF7,0xFF,0xFF,0xFF,0xFD,0xFF,0x75,0xCD, 0x52,0xD7,0xFD,0xFB,0xF7,0xDD,0xFB,0xEF,
+0xEB,0xFF,0xFF,0x4F,0xFF,0xBF,0x9F,0xE7, 0xF9,0xFC,0x7F,0x8B,0xC3,0xF9,0xAF,0x8F,
+0xE7,0xE9,0xBE,0x7F,0x9F,0xE6,0xF9,0xFC, 0x5F,0xFF,0xFF,0xF7,0xFD,0xFF,0x7A,0x5F,
+0xD7,0xED,0xFF,0xFF,0xD7,0xFF,0xDD,0x7F, 0xE7,0xFF,0xFC,0xFF,0xFC,0x3F,0xFF,0xFF,
+0xFF,0xFB,0xFF,0xFE,0xBF,0xAF,0xFF,0xFD, 0xFF,0xEF,0xFF,0xEB,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xF7,0x7F,0xFF,0x7F,0xDF,0xFF,0xFD, 0xFD,0x7F,0xFE,0xF7,0xFD,0x7F,0xDF,0xFF,
+0xFD,0xFF,0xFF,0xDF,0xFB,0xFF,0xEE,0xFF, 0xFB,0xFF,0xF7,0xFD,0xFF,0x7A,0xDF,0xF5,
+0xFD,0xFA,0xDF,0xF7,0xFC,0xFF,0x7F,0xDF, 0xBF,0xED,0xFF,0xC9,0xFF,0xDF,0xFF,0xBF,
+0x2F,0xFB,0xFF,0xBC,0xAD,0xFF,0xF7,0xFF, 0xFF,0xEF,0xD3,0xFF,0x7D,0xBF,0x6F,0xFF,
+0xFA,0xFF,0xFE,0xBF,0xAE,0xEA,0xFA,0xBE, 0xAD,0xA5,0xEB,0xCE,0xBF,0xA7,0xEB,0x5A,
+0xDE,0xBD,0xAF,0x6B,0xFD,0x57,0xFF,0xFF, 0xF4,0x7F,0x1F,0x7F,0xFD,0xFF,0x7F,0x36,
+0xF0,0xDF,0x79,0xFF,0xFF,0xFF,0xF7,0xFD, 0xBF,0xFF,0x87,0xFF,0xFB,0xF3,0xFC,0xFF,
+0xFF,0xFF,0xFF,0x7E,0xFF,0xBF,0xDF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFD,0xBF,0xF8,0x9F,
+0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFD, 0xF7,0xFC,0xBD,0xFF,0xFE,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFB,0xF9,0xBF,0xFF,0xFF,0xEB, 0xE2,0xFE,0xFF,0xBF,0xEF,0xA9,0xBA,0x2F,
+0xEB,0xF9,0xFE,0x77,0xDF,0xF7,0xFF,0xFF, 0xF9,0x7F,0xFF,0xFF,0x7F,0xEF,0xD7,0xFF,
+0xFD,0xFF,0xFB,0xF5,0xFF,0xBF,0x6F,0xDF, 0xFF,0xFF,0xFD,0xFF,0xFF,0xF0,0xFF,0xFF,
+0xFF,0x3F,0xCF,0xFF,0xBA,0xEE,0x9B,0xBF, 0xEE,0xD7,0xFE,0xCD,0xEF,0xFF,0xDF,0xBF,
+0xFF,0xFF,0xC5,0xFF,0xFF,0xFD,0x7F,0x4F, 0xFD,0xF6,0xD9,0xFF,0x4F,0xD6,0xFD,0xBF,
+0x6E,0xFF,0xFF,0xF4,0x7F,0xFF,0x7F,0x8B, 0xFF,0xFF,0xFF,0xFF,0xF7,0xFF,0xF9,0xFE,
+0x37,0xFF,0xD9,0xFB,0xF5,0xAF,0xFD,0xFF, 0xFF,0xFB,0xFF,0xFF,0x07,0xFF,0xFF,0xFF,
+0xFB,0xF7,0xFF,0xFD,0xFF,0x7C,0xFA,0x7E, 0x4F,0xFC,0xDF,0x1D,0xC7,0xFF,0xFF,0xFF,
+0xFF,0xAE,0xFF,0xFF,0xFF,0xFF,0xFD,0xFB, 0xFF,0xFF,0xFE,0xFE,0xFC,0xFF,0x7F,0x7F,
+0xBF,0xEF,0xFE,0xFF,0xFF,0xFF,0x5F,0xFD, 0xFF,0xFF,0xFF,0xFD,0x6F,0x5A,0xD7,0x7B,
+0xBE,0x5F,0xFE,0x39,0xFF,0xF7,0xFF,0xF7, 0xFD,0xFE,0xAA,0x1F,0xFF,0xFF,0xFF,0xFF,
+0xFE,0xFE,0xAB,0xAF,0xFD,0xFE,0xBF,0xFF, 0xF7,0xFF,0x7F,0xFE,0x8F,0xE3,0xFB,0xEE,
+0x7F,0xFF,0xFF,0xFF,0xFF,0xEB,0xFB,0xFF, 0xFD,0xBF,0xEF,0xDF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFB,0xE4,0x3F,0xFF,0xDF, 0xFF,0xFF,0xFF,0xFF,0xF3,0xEF,0xBB,0xFB,
+0xBF,0xEF,0xBB,0xFF,0xD7,0xBF,0xFF,0xFF, 0xFF,0x29,0xAF,0xF7,0xFF,0xFF,0xFB,0xFF,
+0xFB,0xE6,0xFF,0x0F,0xFB,0x3F,0xDF,0x0F, 0xFF,0xAF,0xFF,0xFF,0xFF,0xF5,0xC3,0xDF,
+0x5F,0xFF,0xFF,0xFF,0xFE,0x6B,0xCA,0xBE, 0xBC,0xFF,0x9F,0xF2,0xBF,0xFF,0xFE,0xFA,
+0xFF,0xFF,0xEF,0x16,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFC,0xDF,0x97,0xFD,0x79,0xFF,0x37,
+0xE7,0x7F,0xFF,0xFF,0xB5,0xFF,0xFF,0xF6, 0x2F,0xFF,0xFD,0xFB,0xFE,0xFF,0xFF,0xFD,
+0x5F,0x57,0x5F,0xFF,0xDB,0x52,0xDF,0xFF, 0xFD,0xBF,0xFF,0xFF,0xFC,0xDB,0xFF,0x7B,
+0xB5,0xFD,0x7F,0xFF,0x71,0x9C,0x6E,0xFF, 0xF6,0x35,0xA5,0x9B,0xFF,0xFF,0xFD,0xFF,
+0xFF,0xDB,0x9E,0x7F,0xFE,0xEF,0xFB,0xFF, 0xFF,0xBD,0xEF,0xFF,0xDE,0xB7,0xF9,0x4B,
+0xFF,0xF5,0xEF,0xFF,0xFF,0xFF,0xE8,0x7E, 0xFF,0xEA,0xDF,0xF7,0xFF,0xFD,0x69,0x5B,
+0xFC,0x9F,0xEF,0x78,0xD6,0xFF,0xEB,0xEF, 0xFF,0xFF,0xFF,0xE8,0xFF,0xFF,0xED,0xFF,
+0xFF,0xFF,0xFF,0xE3,0xF9,0xF6,0xBF,0xFF, 0xFF,0xFE,0xDF,0xFF,0x7F,0xFF,0xFF,0xFF,
+0xD1,0xFF,0xFF,0xE7,0xFF,0xFF,0xFF,0xFF, 0xE7,0xF9,0xFF,0xBF,0x7F,0xD9,0xFF,0xFD,
+0xFE,0x7F,0xFF,0xFE,0xFF,0xF9,0xFF,0xFB, 0xD6,0xDF,0xBF,0xEF,0x5B,0xD6,0xFF,0xBF,
+0xFB,0xF6,0xFF,0xBF,0xEF,0xF8,0xF6,0xDD, 0xBE,0xFE,0x16,0xFF,0xBF,0xEF,0xFF,0xFE,
+0xFF,0xBF,0xEF,0xFF,0xFF,0xFF,0x6F,0xFB, 0xFF,0xFF,0xFF,0x6F,0xF3,0xFF,0xF7,0xEF,
+0xFB,0xFF,0xBF,0xFF,0xEF,0xFE,0xFF,0xBF, 0xFF,0xFF,0xFF,0xBE,0xBF,0xFF,0xEF,0xFF,
+0x7F,0xEF,0xFF,0xFD,0x17,0xFB,0x7B,0xFF, 0xFF,0xFD,0x7F,0xDB,0xF6,0xF4,0x7F,0xFA,
+0xFE,0xF5,0xBF,0xEB,0xE3,0xF7,0xFF,0xFF, 0xE9,0xBF,0xFF,0xAF,0xF7,0xFD,0xF3,0x7E,
+0x8F,0xA3,0xEA,0xFF,0xCB,0xF3,0xEE,0xFF, 0xBF,0xEF,0xF7,0xF9,0xFF,0xFE,0x7F,0xFF,
+0xFF,0xFF,0xFF,0xF5,0xFB,0xF6,0xFF,0xF5, 0x2F,0xFE,0xFB,0xD7,0xBF,0xFF,0xBE,0xDF,
+0x9F,0xFF,0xF0,0xFF,0xFF,0xF9,0xFE,0x7F, 0x8F,0xA3,0xF8,0xFE,0x6F,0x9F,0xF9,0xF6,
+0x2F,0x9F,0xE7,0xF9,0xFE,0x2F,0x9F,0xE1, 0xFF,0xFF,0xFF,0x7F,0xDF,0xF7,0xF5,0xFD,
+0x7F,0x7F,0xF5,0xFF,0x9F,0x5F,0xFB,0xFE, 0xFF,0x7F,0xFF,0xFF,0xCB,0xFF,0xFF,0xFB,
+0xFE,0xFF,0xBF,0xAF,0xFB,0xFE,0xFF,0xDF, 0xFE,0xFE,0xBF,0xF7,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xC7,0xFF,0xFF,0xFD,0xFF,0x7F,0xDD, 0xF7,0xFD,0xFF,0xFF,0xD7,0xFF,0xFD,0x7F,
+0xFF,0xFB,0xFD,0xFF,0xFF,0xFE,0xEF,0x7F, 0xFD,0xEF,0xFB,0xFE,0xFB,0xFD,0xFF,0x7F,
+0xDF,0xFD,0xFF,0x7A,0xDF,0xF7,0xFD,0xFF, 0xFF,0xFF,0xFF,0x1F,0xFF,0xFF,0xD3,0xF7,
+0xFF,0xFF,0x6F,0xDB,0xFF,0xFF,0xEF,0xCB, 0xF4,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
+0x29,0xFF,0xE8,0xDA,0x76,0x9F,0xAF,0x6A, 0xDA,0xFE,0x35,0xEB,0xDA,0xD6,0xBF,0xAB,
+0xEB,0x7A,0xDE,0xBF,0xD7,0x7F,0xFF,0xFE, 0xFF,0xBF,0xEF,0xFD,0xDF,0x77,0xBF,0xFD,
+0x37,0xEF,0xFF,0xEF,0xFF,0x3F,0xFF,0xFF, 0xFF,0xFE,0x7F,0xFF,0xFF,0xFF,0xF7,0x7E,
+0xDF,0xFF,0xFF,0xFF,0xFA,0xB7,0x7F,0xFF, 0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0x89,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0x9F,0xFB,0xFF,0xFF,0xFF,0xE7,0xFF,
+0xFF,0xFF,0xFF,0xAA,0xFF,0xAB,0xFB,0xFA, 0xEF,0xBF,0xFF,0xDF,0xFA,0x7B,0xB9,0xFE,
+0xFE,0xFF,0xFD,0xFF,0xF7,0xFE,0x3F,0xFF, 0xB7,0xFF,0xF7,0xEE,0xFF,0x7F,0xEF,0xFF,
+0xFF,0x7F,0xFF,0x1F,0xFB,0xFF,0xBF,0xFB, 0xFE,0xFF,0xBD,0xFF,0xFF,0x2F,0xFF,0xBF,
+0xFF,0x7F,0xDF,0xFA,0xFF,0xFF,0xFC,0xEE, 0xF5,0xF3,0xBE,0xFB,0x0F,0xEF,0xF3,0xBE,
+0xEF,0xFC,0x5F,0xFF,0x5A,0xFF,0xF7,0xDF, 0xFF,0xFF,0xFE,0xD5,0xFC,0x5F,0xFB,0xF2,
+0xFF,0xFF,0x2F,0xBB,0xF3,0xFF,0xFF,0xBF, 0xFF,0xEF,0xFF,0xEF,0xFF,0xFF,0xFF,0xFF,
+0xBF,0xFF,0xFF,0xFD,0x7B,0xFF,0xDF,0xB9, 0xFF,0xFB,0xFF,0xD8,0x7F,0xFF,0xFF,0xFF,
+0xFB,0xFF,0xFC,0x7F,0x1F,0xBF,0xE0,0xDF, 0xF7,0xEF,0xFF,0xFD,0x7F,0xFE,0xDF,0xFF,
+0xE0,0xFF,0xFF,0xFD,0xEF,0xFB,0xFF,0xFE, 0xF7,0xDF,0xFF,0xEB,0x5F,0xFF,0xF7,0xFF,
+0xFF,0xFF,0xFF,0xBF,0xFF,0xFD,0xFF,0xFD, 0xFF,0xFF,0xFF,0xF7,0xFD,0xFF,0x3B,0xDC,
+0xFD,0x6D,0x7B,0x5F,0x57,0xF5,0xFD,0x7F, 0x5F,0xFF,0xB1,0xFF,0xEB,0xFF,0xFF,0xFF,
+0xFB,0xFB,0xFE,0xFF,0xBF,0xFB,0xBE,0xFF, 0xBF,0xEF,0xFB,0xFE,0xFF,0xAF,0xFE,0xF7,
+0xDF,0xDF,0xFF,0xFF,0xFF,0x7F,0xCF,0xF3, 0xF8,0xFF,0xD7,0xFB,0xFF,0x5F,0xBF,0xF7,
+0xFB,0xFF,0x7F,0xFE,0x23,0xFF,0xFF,0xFE, 0x7F,0xF3,0xFF,0xFB,0xFE,0xFF,0xFF,0xF3,
+0xFF,0xFF,0xF5,0xF9,0xFF,0x3F,0xFF,0xFF, 0xF0,0x9A,0xFF,0xBE,0x7F,0xFF,0xFC,0xF9,
+0xFF,0xFD,0xAF,0xEB,0xFE,0xBF,0xFF,0xCF, 0xF3,0xFE,0x7F,0xFF,0xFF,0x5B,0xBD,0xFF,
+0xBC,0xEB,0xFF,0xD7,0xD4,0xAF,0xAF,0xFD, 0xFF,0xCF,0xF7,0xFD,0xFF,0x7F,0xDF,0xF7,
+0xFD,0xFE,0xFF,0x6F,0xFF,0xFB,0xFF,0xFF, 0xFF,0xFD,0x7F,0x5E,0xFD,0xBF,0xDB,0xF6,
+0xFD,0xBF,0x6F,0xFB,0xEE,0xFD,0xFF,0x7A, 0xFF,0xFA,0xFB,0xFF,0x3F,0xFB,0xB7,0x5F,
+0xD6,0xF7,0x1F,0x71,0xDC,0x77,0x1D,0xC7, 0x31,0xDC,0x77,0xDF,0xF9,0xBF,0xF5,0x5B,
+0xF4,0xD7,0x9D,0xAE,0xFF,0xBF,0xFD,0xBF, 0xDB,0xF6,0xFD,0xBF,0x6F,0xDB,0xF6,0xFE,
+0x3D,0x81,0xFF,0xEB,0xFE,0xFE,0xFE,0xFF, 0xEB,0x7A,0xDF,0x7D,0x77,0x7D,0xF5,0x79,
+0xDF,0x57,0xDD,0xF5,0x7D,0x7E,0xE6,0xFF, 0xD6,0x3F,0xBF,0x7F,0xFF,0xD4,0xF5,0x3F,
+0xBF,0xFB,0xBE,0xEF,0xB3,0xEE,0xFB,0x9E, 0xEF,0xBB,0xFE,0x8B,0xFF,0xFE,0xDF,0xB7,
+0xED,0xFF,0xF7,0xFD,0xFE,0xFF,0xEF,0xBB, 0xEE,0xFF,0xBE,0xEF,0xBB,0xEE,0xEB,0xFC,
+0x1F,0xFF,0xFF,0xFD,0xFF,0xE7,0xFF,0xF7, 0xFD,0xFF,0xEF,0xFE,0xFF,0xBF,0xEF,0xFB,
+0xFE,0xFF,0xBF,0xEB,0xFA,0x1F,0xFF,0xB7, 0xEF,0x5B,0xFE,0xFF,0xAF,0xEB,0xDD,0xE7,
+0xDE,0x77,0x9D,0xE7,0x79,0xDE,0x77,0x9D, 0xBF,0xE6,0x6F,0xFF,0xFE,0xFF,0xBF,0xEF,
+0xFB,0xFE,0xFD,0xBF,0x6F,0xF6,0xFD,0xBF, 0x6F,0xDB,0xF6,0xFD,0xBF,0xFF,0x7E,0xFF,
+0xFF,0xFB,0xFE,0xFE,0xFF,0xEF,0xFB,0xFD, 0xEF,0x7E,0xF7,0xBD,0xEF,0x7B,0xDE,0xF7,
+0xBD,0xEF,0xFF,0xD5,0xFF,0xBF,0xFF,0xEF, 0xFE,0xFF,0xFC,0x3F,0x0F,0xE7,0xFE,0x7F,
+0x9F,0xE7,0xF9,0xFE,0x7F,0x9F,0xE7,0xFE, 0xF3,0xFF,0xFE,0xDF,0xAD,0xDF,0x67,0xEE,
+0xFB,0xBF,0xEF,0xFE,0xFF,0xBF,0xEF,0xFB, 0xFE,0xFF,0xBF,0xEF,0xFF,0x23,0xFF,0xFF,
+0xFF,0xFF,0x7F,0xFF,0xF3,0xBC,0xDB,0xFE, 0xFB,0xFF,0xFB,0xBE,0xF7,0xFB,0xFF,0x7F,
+0xDF,0xFF,0xCF,0xFB,0xFF,0x9F,0xE3,0xF9, 0xBE,0x3F,0x8F,0xE7,0x79,0xFF,0x9D,0xE7,
+0xF9,0xFE,0x7F,0x9F,0xE7,0xF9,0xFE,0x5F, 0xFF,0xCF,0xF7,0xFF,0xFF,0xFF,0xDF,0xF7,
+0xFE,0x7F,0xE7,0xF9,0xFE,0x7F,0xFF,0xFF, 0xFB,0xFE,0xFF,0xFF,0xBF,0xFF,0xBF,0xBF,
+0xFF,0xFE,0xFF,0xBF,0xEF,0xFF,0xFD,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,0xFD,0xFF,
+0xFF,0x3F,0xFF,0xBF,0xFF,0xF7,0xFF,0xFF, 0x7F,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xE8,0xEF,0xFF, 0x5F,0xF7,0xBF,0xF9,0xFE,0xDF,0xB7,0xFD,
+0xFF,0xDF,0xF7,0xFD,0xFF,0x7F,0xDF,0xF7, 0xFD,0xFF,0xDD,0xFF,0xF2,0xFF,0xBF,0xFF,
+0xFF,0xBF,0xFF,0xFF,0x2F,0xF2,0xFF,0xBF, 0x2F,0x7B,0xD2,0xF7,0xBF,0x2F,0xFF,0xBB,
+0xFF,0xEE,0x8F,0xAF,0xEB,0xFA,0xFE,0x3F, 0xA7,0x69,0xCE,0x8F,0xA4,0xEA,0xFA,0xEE,
+0xB7,0xAE,0xEB,0xFD,0xC7,0xFF,0xF7,0xF7, 0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3E,0xF3,
+0x74,0xFF,0x3F,0x4F,0xFF,0xE7,0xFF,0x3F, 0xFE,0xA7,0xFF,0xFF,0xDF,0xF7,0xB7,0xFF,
+0xF7,0xFF,0xBA,0xEF,0x37,0xEB,0xFB,0xFE, 0xBF,0xFB,0xFE,0xF3,0xFF,0xF9,0xDF,0xFF,
+0xBF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFF, 0xFD,0xDF,0xFF,0xFD,0xFF,0xFF,0xFB,0xFE,
+0xFD,0xFF,0xFB,0xBF,0xFE,0x3F,0xED,0xFF, 0xDF,0xBE,0x3D,0xA7,0xFB,0xFA,0x3F,0xE6,
+0xE1,0xFE,0xFE,0x3F,0xEF,0xE3,0xDF,0xF5, 0x7F,0xFE,0xFF,0x7E,0xFF,0xFF,0xFF,0xFF,
+0xEF,0x6F,0xF6,0xFF,0x7D,0xEF,0xD7,0xDE, 0xFF,0x7D,0xEF,0xFF,0xF2,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0x7B,0xDE,0xFB,0xE6,0xEE, 0xEF,0x37,0x6E,0xF3,0x7E,0xEB,0x37,0xEF,
+0xFF,0xC1,0xFF,0xFE,0xFF,0xF7,0xEF,0xFF, 0xFF,0xFF,0xBF,0x3F,0xD2,0xDF,0xBF,0x2F,
+0x7B,0xE2,0xFF,0xFE,0x3B,0xBD,0xDB,0xFF, 0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFE,
+0xFF,0xFB,0xFF,0xFF,0xBF,0xFF,0xFB,0xDF, 0xFF,0xBF,0xFF,0xB7,0xFF,0xFF,0xBF,0xEF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xFF, 0x7F,0xFF,0x1F,0xEF,0xF1,0xFD,0xFF,0xF6,
+0xAF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF, 0xFF,0xFF,0xFE,0x9F,0xFF,0xFF,0xFF,0x77,
+0xEF,0xF7,0xFB,0xFF,0xFE,0x5F,0xFF,0xFF, 0xBF,0xCF,0xFB,0xF7,0xDD,0xF7,0xF5,0xFF,
+0x5F,0xD5,0xF5,0xFD,0x7F,0x5F,0xD7,0xF5, 0xFF,0xFB,0x0F,0xFF,0xFF,0xA9,0xEA,0x7A,
+0xFF,0xAF,0x8F,0xFE,0xDF,0xAF,0xEF,0xFB, 0xFE,0xFF,0xBF,0xEF,0xFB,0xDF,0xE5,0x5F,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xBD,0x57,0xFF, 0xFF,0x6F,0x77,0xBF,0xF7,0xFB,0xFF,0x7F,
+0xBF,0xF7,0xFF,0xFC,0xBF,0xFF,0x9F,0xFF, 0xFF,0xEF,0xFF,0xFE,0xFF,0xFF,0xFF,0x1F,
+0xCF,0xFF,0xFC,0xFF,0xFF,0xFF,0xFF,0xFB, 0x65,0xAF,0xF3,0x7C,0xFF,0x3F,0xDF,0xFF,
+0xFD,0xE9,0xFE,0x7F,0xE7,0xFF,0xFE,0x7F, 0xFF,0xFF,0xFF,0xFF,0xFD,0xE3,0xDF,0xFB,
+0xDB,0xF6,0xFD,0xEF,0x5B,0xFB,0xFF,0xDF, 0xFC,0xFF,0x3F,0xDF,0xF3,0xFD,0xFF,0x7F,
+0xDF,0xEF,0x66,0xFF,0xDF,0xAD,0xEB,0x7A, 0xDE,0xF7,0xF7,0xE7,0xD9,0xFD,0x9F,0x67,
+0xD9,0xF6,0x7D,0x9F,0xE7,0xDF,0xF5,0x47, 0xFD,0x65,0x5B,0xD6,0xF4,0xFE,0xFF,0xEF,
+0xFF,0x6D,0xF6,0xDD,0xB7,0x6D,0xDB,0x76, 0xDC,0xB7,0x7D,0xFA,0x9B,0xF6,0x6D,0x9D,
+0x67,0x59,0xDF,0xF7,0xDD,0xFF,0xEB,0xFE, 0xBF,0xAF,0xEB,0xFA,0xFE,0xBF,0xAF,0xE3,
+0xD1,0x9F,0xFF,0xBD,0xBF,0xEF,0xFE,0xF7, 0xBF,0xBF,0xF7,0xD7,0x7F,0xDD,0xF7,0x9D,
+0xDF,0x7F,0xDF,0xF7,0xFF,0xE0,0x7F,0xFD, 0xC1,0xDF,0xF7,0xFD,0xC7,0x7F,0x7F,0xFB,
+0xFF,0xBB,0xEC,0xFB,0x3E,0xFF,0xBF,0xEC, 0xFB,0xFF,0xD8,0x7F,0xBF,0x6C,0xFF,0xBE,
+0xFF,0xBF,0xED,0xFF,0xEF,0xFE,0xFB,0xBF, 0xEF,0xFB,0xFE,0xFF,0xBF,0xEE,0xFF,0xC5,
+0xFF,0xAF,0x6F,0xFF,0xFC,0xFD,0x3F,0xE7, 0xFF,0xFE,0xFF,0xEF,0xFB,0xFE,0xFF,0xBF,
+0xEF,0xFB,0xFE,0xBF,0x89,0xFE,0xFA,0xBA, 0xFE,0xBF,0xAF,0xFB,0xF6,0xF5,0xD9,0x7D,
+0x97,0x65,0xD9,0x74,0x5D,0x97,0x65,0xD3, 0xFE,0xD6,0xFF,0xBF,0xF7,0xFD,0xFF,0x7F,
+0xBF,0xCF,0xFB,0xFE,0xFF,0xEF,0xFB,0xFE, 0xFF,0xBF,0xEF,0xFB,0xFF,0xF6,0x8F,0xFB,
+0xFF,0xEF,0xFB,0x7E,0xDB,0xFE,0xFF,0xBE, 0xEF,0xEE,0xFB,0xBE,0xEF,0xBB,0xEE,0xFB,
+0xBE,0xFF,0xFF,0xDF,0xFF,0x43,0xFF,0xFF, 0xFB,0xEF,0x5F,0xB7,0xFE,0x7F,0xE7,0xF9,
+0xFE,0x7F,0x9F,0xE7,0xF9,0xFE,0x7F,0xF9, 0xBF,0xFE,0xAF,0x77,0xFD,0xFF,0x2F,0xAF,
+0xA7,0xFE,0xFF,0xEF,0xFB,0xFE,0xFF,0xBF, 0xEF,0xFB,0xFE,0xFF,0xF1,0x7F,0xEF,0xDF,
+0xFF,0x97,0xF5,0xEF,0xFF,0xDF,0xFF,0xFF, 0xBF,0xFF,0xBF,0xFF,0xFF,0xFE,0xFF,0xFF,
+0xFF,0xE0,0xFF,0xFF,0xF9,0xFE,0x2F,0x8B, 0xE3,0xF8,0xBE,0x77,0x9F,0xF9,0xDA,0x77,
+0x9D,0xE7,0x79,0xDE,0x77,0x9F,0xDD,0xFF, 0xFD,0xFD,0x7F,0x5F,0xD7,0xFD,0xFF,0x7F,
+0xE7,0xFE,0x7F,0x97,0xE7,0xFB,0xFE,0xFF, 0xBF,0xEF,0xFF,0xAB,0xFF,0xEF,0xFA,0xFE,
+0xBF,0xAF,0xFF,0xFA,0xFF,0xFF,0xDF,0xFF, 0xFB,0xFF,0xF7,0xFD,0xFF,0x7F,0xDF,0xFF,
+0x67,0xFF,0xF7,0xF5,0xFF,0xFF,0xFF,0xDF, 0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF,0xBD, 0xEB,0xFF,0xFF,0xF7,0xAD,0xEB,0xFF,0xDF,
+0xFD,0xFF,0x3F,0xDF,0xF7,0xFD,0xFF,0x7F, 0xDF,0xFF,0x5F,0xFF,0xF7,0xFF,0xFF,0xFD,
+0xBF,0xFF,0xCB,0xF4,0xFF,0x7F,0xD3,0xF7, 0xFD,0x3F,0x7F,0xD3,0xF7,0xFF,0xFC,0x3F,
+0xFF,0xEA,0xFA,0xBE,0xAF,0xAB,0xEB,0xBA, 0xF4,0x95,0x6B,0x52,0xD4,0xAD,0x2F,0x4A,
+0xD2,0xF6,0xBF,0xD2,0x7F,0xF7,0x3F,0xFF, 0xFF,0xF3,0x7F,0xFF,0xFF,0xF7,0xFF,0xBA,
+0xDF,0xFB,0xFD,0xFF,0xBF,0xFF,0xFB,0xFF, 0xF8,0x7F,0xEA,0xFF,0xFE,0xFE,0xDF,0xFF,
+0xF7,0xFF,0x7F,0xBB,0xFF,0xFF,0xBF,0xDF, 0xFB,0xFF,0xFF,0xBF,0xFF,0xB1,0x7F,0xFF,
+0xFB,0xEF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBF, 0xCF,0xFE,0xFF,0xFF,0xEF,0xFF,0xF7,0xFF,
+0xFF,0xFF,0xF1,0xFF,0x69,0xBE,0xFA,0xBF, 0xAF,0xE2,0xFF,0xFE,0xFD,0xAF,0xF3,0xFE,
+0xFF,0xBF,0xEF,0xFB,0xFC,0xFF,0xFF,0x07, 0xFD,0x95,0xDB,0xDF,0x7F,0xDF,0xAF,0xFF,
+0xF7,0xAF,0x36,0xFE,0xBF,0x65,0xEB,0xF6, 0xFE,0x9F,0x6F,0xFE,0x07,0xFF,0xCF,0xFF,
+0xF8,0xFE,0xFF,0xCF,0xFF,0xF6,0xFA,0xE7, 0xFB,0xFE,0xFF,0xBB,0xED,0xF9,0xFF,0xFF,
+0xFF,0x5F,0xFF,0xFF,0xFF,0x75,0xFF,0xEF, 0x7E,0xFD,0xE0,0xE8,0x5E,0xD3,0xE5,0xF9,
+0x3E,0x5F,0xD7,0xF7,0xFF,0xFA,0x2F,0xFB, 0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0x7F,
+0x7F,0xD7,0xF5,0x7D,0x5F,0x57,0xD5,0xF5, 0xEF,0xFF,0xF3,0x7F,0xFC,0x7F,0xFF,0xC7,
+0xF1,0xFF,0xFF,0x1F,0xCF,0xB0,0xFF,0x3F, 0xCF,0xF3,0xFC,0xFF,0x3F,0xCE,0xFF,0xE4,
+0xFF,0xDF,0x7F,0xFE,0xF7,0xBB,0xFF,0xFF, 0xDF,0xEF,0xEE,0xFF,0xBF,0xEF,0xFB,0xFE,
+0xBF,0xBF,0xEF,0xFF,0xD1,0xFF,0xFF,0xFF, 0xFD,0xFB,0xFF,0xFD,0xFF,0xFB,0x9F,0xE9,
+0xFE,0x7F,0x9F,0xE7,0xF9,0xFE,0x7F,0xBF, 0xFF,0xB3,0xFF,0xFF,0xF7,0xFF,0xFF,0xAF,
+0xF7,0xFF,0xB6,0x3F,0xEB,0xFA,0xFE,0xBF, 0xAF,0xEB,0xFA,0xFE,0xBF,0xFE,0xA7,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xF7,0xFF,0xFF,0xFF, 0xFE,0x9F,0xF7,0xF9,0xFF,0x7F,0x9F,0xE7,
+0xFF,0xFF,0xFE,0xAF,0x6F,0xFF,0xFF,0xFF, 0x9F,0xFF,0xDF,0xFF,0x7D,0x5F,0xDD,0xFF,
+0xFB,0xBF,0xE7,0xBB,0xFF,0xFB,0xDF,0x6D, 0x5F,0x7E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xEB,0xF7,0xFF,0xE7,0xEF,0xF7,0xFF,0xFF, 0x7F,0xFF,0xF7,0xFF,0xFC,0x8F,0xFF,0xEF,
+0xFD,0xFE,0xFF,0xBE,0xF4,0xF2,0x7D,0xD7, 0xCF,0xFF,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xCF,0x6B,0xFF,0xBF,0x3F,0xFB,0xF2, 0xFC,0x7F,0xEB,0xFF,0x9F,0xFA,0xFF,0xFF,
+0x3F,0xFF,0xF3,0xFF,0xFF,0xFD,0x70,0xF7, 0xFF,0xFF,0xBF,0xFF,0xFB,0xD7,0xFE,0xF5,
+0x77,0xFF,0x15,0xDD,0x77,0xFD,0xFF,0x7F, 0xDF,0xF7,0xFB,0xCD,0xBF,0xFF,0xFD,0xFF,
+0xFF,0xDF,0x37,0xCD,0xF9,0xEC,0xFE,0xEF, 0xBB,0xF4,0xFB,0x3F,0x4F,0xB3,0xFF,0xFD,
+0xCB,0xFF,0xE9,0x7E,0x54,0x9F,0xE5,0x4B, 0xB7,0xFF,0xDD,0x7D,0xC7,0x71,0xDD,0x77,
+0x5D,0xD7,0x75,0xCD,0x7F,0xD6,0xFF,0xD3, 0xF6,0xF9,0x3F,0x6D,0x95,0xAF,0x7F,0xFE,
+0xFF,0xEF,0xFB,0xFE,0xFF,0xBF,0xEF,0xFB, 0xFE,0xF6,0xC7,0xFF,0xAD,0x7B,0xCA,0xFF,
+0xBF,0xBF,0xEF,0xFD,0xE3,0xDF,0xB7,0xED, 0xFB,0x7E,0xDF,0x37,0xED,0xE3,0xFB,0xDF,
+0xFF,0x52,0x5C,0x15,0xFD,0xCF,0x7F,0xDF, 0xFE,0xEF,0xEF,0xFB,0xFE,0xFF,0xBF,0xEC,
+0x7B,0xFE,0xFF,0xFE,0x3E,0x7F,0xDA,0xF7, 0xFD,0xFF,0x7F,0xFF,0xFF,0xFB,0xEF,0xBB,
+0x6F,0xFB,0xFE,0xFF,0xBF,0xEF,0xFB,0xFF, 0xF7,0x7D,0xFF,0xD8,0xFF,0xFD,0xBF,0x7F,
+0xFB,0xFF,0xFF,0x9F,0xFB,0xFE,0x7F,0x9F, 0xE7,0xF9,0xFE,0x7F,0x9F,0xEA,0x7F,0xF6,
+0xBF,0xBD,0x6A,0x5A,0xF6,0xE5,0xBF,0x77, 0x5F,0x6D,0xDD,0x77,0x5D,0xD7,0x75,0xDD,
+0x77,0xFF,0xA5,0xBF,0xCF,0xFB,0xFF,0xFF, 0xBF,0xCF,0xFB,0xFD,0xFF,0xBF,0xF3,0xFE,
+0xFF,0xBF,0xEF,0xFB,0xFE,0xFF,0xFD,0xAB, 0xFF,0xBF,0xBF,0xFF,0xFB,0xFF,0x7F,0xEF,
+0xFF,0xBE,0xFB,0xEE,0xFB,0xBE,0xEF,0xBB, 0xEE,0xFB,0xBF,0xFF,0xB5,0xFF,0xD0,0xBC,
+0xFD,0x2F,0x4B,0xF7,0xFF,0xFF,0x9F,0xF9, 0xFE,0x7F,0x9F,0xE7,0xF9,0xFE,0x7F,0x9F,
+0xFA,0x8F,0xFD,0xAB,0xFA,0xDA,0xBF,0xAF, 0xB3,0xFD,0xFF,0xBF,0xFB,0xFE,0xFF,0xBF,
+0xEF,0xFB,0xFE,0xF7,0xBF,0xFF,0x9F,0xFF, 0x77,0xF7,0xBD,0xFD,0x77,0xDF,0xFF,0x7E,
+0xDF,0xED,0xBB,0xFE,0xFF,0xBE,0xEF,0xFB, 0xFE,0xFF,0xFA,0x3F,0xFF,0xBE,0x6F,0x8F,
+0xE6,0xF9,0xFE,0x7F,0x9F,0xC7,0xFE,0x7F, 0x9F,0xE7,0xF9,0xFE,0x7F,0x9F,0xE7,0xFB,
+0x7F,0xFF,0x7F,0xCF,0xFF,0xFD,0xFF,0xFF, 0xDF,0xFB,0xAF,0xBF,0xEF,0xFF,0xFE,0xFF,
+0x9F,0xEF,0xFB,0xFF,0xFC,0xFF,0xFB,0xFE, 0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xF7,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xF5,0xFF,0xFF,0xFF,0x3F,0xDF,0xF7,
+0xFF,0xFF,0x7F,0xEF,0xFE,0xFF,0xBF,0xFF, 0xFB,0xFF,0xFF,0xBF,0xEF,0xFF,0xB3,0x7F,
+0xFF,0x7B,0x5E,0xF7,0xFD,0xFF,0x7B,0x7F, 0xF7,0xFF,0x7F,0xDF,0xF7,0xFD,0xFF,0x7F,
+0xDF,0xF7,0xFF,0x17,0xFF,0xFF,0xFF,0x7F, 0xFF,0xFF,0xDD,0xF6,0xFC,0xBF,0xCB,0xF2,
+0xBC,0xBF,0x2F,0xCB,0xF2,0xFC,0xBF,0xFE, 0x8F,0xFF,0xFA,0x7E,0xBF,0xA7,0xEB,0xDA,
+0xFC,0xBF,0xAF,0x7A,0xFE,0xBF,0xAF,0xEA, 0xFA,0xFE,0xBF,0xAF,0xF4,0xDF,0xFE,0xFF,
+0xF3,0x3C,0x7F,0x3E,0xFF,0xCF,0xF8,0xBF, 0x8F,0xE3,0xF8,0xFE,0x3F,0x8F,0xE7,0xE8,
+0xFF,0xFC,0x9F,0xFF,0xFF,0xCF,0xEB,0xB3, 0xE7,0xFB,0x7B,0xF3,0xFE,0xFF,0xCF,0xDB,
+0xFB,0xFB,0xBF,0x6F,0x6F,0xDF,0xEC,0x7F, 0xFF,0xFF,0xF7,0xFD,0xFD,0xFF,0xFF,0xFF,
+0xFF,0xB2,0xBF,0xFF,0xDE,0xFD,0xBD,0xEF, 0xFB,0xF6,0xDF,0xEA,0xE7,0xDB,0xFE,0xBB,
+0xFF,0xEB,0xFB,0xBF,0x9F,0x8F,0xE8,0xFE, 0x3F,0x8F,0xA3,0xF8,0xFE,0x3F,0x8F,0xFF,
+0xF8,0x7E,0xFD,0xFD,0x7F,0xFF,0xFB,0xCD, 0xFF,0xFD,0xFF,0x5F,0xEF,0xFD,0xFF,0xFF,
+0xDF,0xF7,0xFD,0xFF,0xBE,0x90,0xFF,0xFF, 0xEE,0xFF,0x3F,0xBF,0xF3,0xBB,0xFE,0xB7,
+0xAB,0xFA,0xFE,0xAF,0xAD,0xEA,0xFA,0xDE, 0xAB,0xFF,0x63,0xFF,0xFE,0xF2,0xFF,0xB3,
+0xFF,0xDF,0xEE,0x7D,0xFF,0x03,0xF1,0xF4, 0x3F,0x1F,0xC3,0xF1,0xEC,0x7F,0xFE,0x6F,
+0xFF,0xFB,0xFB,0xFF,0x9F,0xFF,0xBF,0xFF, 0x7B,0x5F,0xFD,0xFF,0xDF,0xF7,0xFD,0xFD,
+0x7F,0x7F,0xDF,0xFE,0xCF,0xFB,0xFF,0xFF, 0xAF,0xFB,0xFF,0x1F,0xEF,0xA5,0xFD,0xBF,
+0xDF,0xFB,0x7D,0xFF,0xBF,0xDF,0xFB,0xFF, 0xFD,0x3B,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,
+0xAF,0xF3,0xFF,0xFB,0x7F,0xBF,0xD7,0xFB, 0xBF,0x7F,0xBB,0xF7,0xFF,0xF8,0x7F,0xFF,
+0xFA,0x5F,0xD7,0xFF,0xDF,0x7F,0xEF,0xFF, 0xFF,0x7F,0xDB,0xF7,0xFD,0xFF,0x7F,0xDF,
+0xB7,0xFB,0xEC,0xFF,0xFF,0xF7,0xBF,0xEF, 0xFD,0xFC,0xFB,0xFF,0xEF,0xF0,0xFE,0x3F,
+0x8F,0xE3,0xF8,0xFE,0x3F,0x8F,0xEF,0x8D, 0xFF,0xFF,0xEF,0x7F,0xBF,0xFF,0xFB,0xFF,
+0xDB,0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xEF,0xD8,0xFF,0x2E,0x7F,
+0xBE,0xEF,0xFE,0x6E,0xFF,0xBF,0xF9,0xFF, 0xFF,0xF3,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFC,0x66,0xBE,0x47,0xF3,0x7F,0xDF,0xFE, 0x87,0x9F,0xFF,0xFF,0xFF,0xFF,0xE7,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xD6,0x6F,0x7C, 0xFB,0x4F,0xD2,0xFF,0xFD,0x2B,0xFE,0xFF,
+0xFF,0xFD,0x5F,0xD7,0xD5,0xF5,0x7D,0xFF, 0xFF,0xFF,0xBF,0x9B,0xFF,0xFF,0xDF,0xB7,
+0xFF,0xFF,0xDF,0xFF,0x3F,0xCF,0xFE,0x7F, 0xBF,0xEF,0xFB,0xFC,0xFF,0x3F,0xFF,0xD9,
+0xBF,0xFE,0x97,0xEC,0x8F,0xB7,0xFE,0x9B, 0x7D,0xFD,0xB7,0xDD,0x77,0x1D,0xC7,0x71,
+0xDD,0x77,0x5D,0xD7,0xF3,0x6F,0xFD,0x3F, 0x73,0xDD,0xAF,0xFD,0x7A,0xFF,0xFF,0xAF,
+0xFE,0xFD,0xBF,0xEF,0xFB,0xFE,0xFF,0xBF, 0xEF,0x66,0x7F,0xFF,0xFF,0xBF,0xBF,0xFF,
+0xFB,0xFF,0xF7,0xDF,0xFD,0xFB,0x7D,0xDF, 0xB7,0xCD,0xF3,0x7C,0x5F,0x3F,0x91,0x3F,
+0xFF,0x3D,0xEF,0x7B,0xFF,0xFC,0xFF,0xCA, 0xEF,0xFE,0xFF,0xBD,0xEF,0xFB,0x1E,0xE7,
+0xBB,0xEC,0x7F,0xB3,0xFF,0xFD,0x9F,0xFF, 0xFF,0xFE,0xFF,0xFF,0x7F,0xBF,0xFB,0xFE,
+0xFF,0xBF,0xEF,0xFB,0xEE,0xFB,0xBF,0xDF, 0x67,0xFF,0xFF,0xBF,0xEF,0xDB,0xFF,0xBC,
+0xFE,0x7F,0xFB,0xFF,0x9F,0xEF,0xF9,0xFE, 0x7F,0x9F,0xE7,0xF9,0xFE,0x87,0xFF,0xEE,
+0xFB,0xBE,0xE5,0xBF,0xEF,0xF9,0xD7,0x65, 0xF7,0xDD,0xE7,0x7D,0xDF,0x77,0x5D,0xD7,
+0x7F,0xF8,0x9B,0xFE,0xFF,0xBF,0xEF,0xFB, 0xFF,0xFF,0xBF,0xEF,0xFB,0xFF,0x7F,0xCF,
+0xF3,0xFC,0xFF,0xBF,0xEF,0xFF,0xDB,0x3F, 0xEF,0xFB,0xFE,0xFF,0xDF,0xFF,0xFE,0xFB,
+0xBB,0xEF,0xBF,0xEF,0xBB,0xEE,0xFB,0xBE, 0xEF,0xBB,0xFF,0xFC,0x7F,0xFD,0x3B,0x5B,
+0xD6,0xE5,0xFD,0x4F,0xC3,0xFB,0xFF,0xBF, 0xEF,0xFB,0xFE,0xFF,0xBF,0xEF,0xFB,0xFF,
+0xB4,0xFF,0xFA,0xBC,0x8F,0xB2,0xE9,0xD2, 0x2E,0xCF,0xFB,0xFF,0xBF,0xEF,0xFB,0xFE,
+0xFF,0xBF,0xEF,0xFB,0xFF,0xEC,0xFF,0xFD, 0xFD,0x7F,0xDF,0xF7,0xE4,0xDF,0x5F,0xFF,
+0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xC3,0xFF,0xEF,0xE6,0xF8,0xFE,
+0x3F,0x8B,0x83,0xF9,0xFE,0x7F,0xE7,0xF9, 0xFE,0x7F,0x9F,0xE7,0xF9,0xFE,0x7F,0x17,
+0xFD,0xFF,0xFF,0xFF,0x7F,0x5F,0xF7,0x2C, 0xFF,0xFF,0xFF,0xFE,0x7F,0xFF,0xE7,0xF9,
+0xFE,0x7F,0x9F,0xFE,0x2F,0xFF,0xFF,0xEF, 0xFF,0xFE,0xBF,0xEF,0xAD,0xFF,0xFF,0x7F,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFE,0xDF,0xFF,0xDF,0xFF,0xFD,0xFD,0x7F,
+0xDF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFA,0x3F,0xFE,
+0xF7,0xFD,0xEF,0x7A,0xFF,0xB1,0xBD,0xFF, 0x7F,0xF7,0xFD,0xFF,0x7F,0xDF,0xF7,0xFD,
+0xFF,0x7F,0xF3,0x27,0xFF,0xDF,0xFF,0xDD, 0xFF,0xFC,0x9B,0xFF,0xCB,0xFC,0xBF,0x2F,
+0xCB,0xF2,0xFC,0xBF,0x2F,0xC9,0xFF,0xDE, 0xFF,0xDF,0xAF,0xEB,0xDA,0xFE,0xBB,0xAF,
+0xEB,0xF8,0xF7,0xAF,0xE8,0xFA,0xFE,0xBF, 0xAF,0xEB,0xF2,0xFF,0xFD,0xFF,0xFF,0xEF,
+0xBD,0xD7,0xBF,0xFF,0xFF,0xDE,0x8F,0xB8, 0xDE,0x37,0x8D,0xA3,0x78,0xDA,0x3F,0x8F,
+0xFF,0xA1,0xFF,0xFF,0xFB,0xFB,0xFF,0xFF, 0xFF,0xFF,0xA7,0xBD,0xFB,0x76,0xFD,0xBF,
+0xEF,0xDB,0xFE,0xBB,0xBF,0xFE,0x27,0x7F, 0xFF,0xFE,0xFE,0xFD,0xF5,0xFF,0xEF,0xF5,
+0xDF,0x1F,0xE7,0xFD,0xFF,0x7F,0xDF,0xF7, 0xFD,0xFF,0xFF,0xCD,0xFD,0xAE,0xFF,0xFA,
+0x3E,0x3F,0xAB,0xFD,0xF8,0x7E,0x8F,0xE3, 0xF8,0xFE,0x3E,0x8F,0xE3,0xF8,0xFF,0xFE,
+0x1F,0xEF,0xDF,0xBF,0xFE,0xDE,0xDF,0xD9, 0xFF,0xDF,0xBC,0xFF,0xFF,0x7F,0xFF,0xEF,
+0xFD,0x7F,0xDF,0xF7,0xF9,0x3F,0xFE,0xFF, 0xFF,0x6F,0xFE,0xDE,0xBF,0xF7,0xED,0xEA,
+0xFD,0x8F,0x83,0xF8,0xEA,0x3F,0x8F,0xEF, 0xFF,0xF4,0x7F,0xFF,0xEF,0xEF,0x7B,0xF3,
+0xF1,0x5F,0xFF,0xFF,0xF1,0x3B,0x7F,0xDF, 0xF7,0xFD,0xFF,0xFF,0xFF,0xFF,0xE0,0xFF,
+0xFF,0xFF,0xF7,0xFF,0x6F,0xFF,0x7F,0xFF, 0xFF,0xF7,0xDE,0xF7,0xBF,0xEF,0xFB,0xF7,
+0xFD,0xFF,0xFF,0xF5,0xFA,0xFF,0xFF,0xFB, 0xE7,0xFF,0xF3,0xF8,0x7F,0xF3,0xDF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x1F,0xEF, 0xBB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,
+0xFF,0x7F,0xFF,0x9F,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xCF,0xFF,0x37,0xFF,0xFF,
+0x7F,0xDF,0x77,0x5D,0xE7,0xFC,0xFF,0xBF, 0xF7,0xF5,0xFB,0xFF,0xFF,0xD7,0xF5,0xFB,
+0xFF,0xFF,0x45,0xFD,0x7F,0xEA,0xFD,0xBE, 0xBF,0xDF,0xF7,0xFF,0xFF,0xDB,0xFB,0xFE,
+0xFF,0xBF,0xEF,0xFF,0xFF,0xFF,0xFB,0x5F, 0x7F,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFE,0xFF,0xEF,0xFD,0xFF,0x7F,0xDF, 0xFF,0xEF,0xFB,0xF8,0x0F,0xF3,0xFF,0xF9,
+0x2E,0xFB,0xFE,0xFC,0xF3,0xEF,0xFF,0xFF, 0xBF,0xFF,0xFB,0xE7,0xFF,0xFE,0x7E,0xFF,
+0xC0,0x6B,0xCF,0xFF,0x34,0xDF,0xF1,0xFD, 0xFF,0xEF,0xFF,0xFF,0xFF,0xDF,0xF7,0xFD,
+0xCF,0x7F,0x9C,0xFD,0xFD,0x6C,0xF7,0xFF, 0xF6,0xFD,0xEB,0x2B,0x9F,0xFF,0xFC,0xFE,
+0x7E,0xFF,0xFF,0xFF,0xFF,0xD7,0xF3,0xF7, 0xFF,0xFB,0xE1,0xBF,0xFF,0xEB,0x7A,0xDE,
+0xD7,0xFB,0xFF,0xF9,0xFE,0xFF,0xFF,0xF3, 0xDE,0x7F,0xFD,0xE7,0x7F,0xFF,0xFD,0xBB,
+0xFF,0xFF,0x7E,0xCC,0xF6,0xAF,0x5F,0x7F, 0xFE,0xF4,0x7D,0xF7,0xFD,0xBB,0x6E,0xDB,
+0xB7,0xFF,0xF7,0xDF,0x66,0xFF,0xFF,0xF7, 0x3D,0xCF,0xDE,0xBD,0xFF,0xFF,0xDE,0xDB,
+0x8D,0xF7,0x7E,0xDF,0xB7,0xEF,0x7F,0xFF, 0xF6,0x87,0xFF,0xFF,0xEF,0xFE,0xDE,0xBF,
+0xFF,0xFF,0xFF,0xBB,0xEF,0xFD,0xFF,0x7B, 0xDE,0xF7,0x3F,0xFF,0xBF,0xFB,0xDB,0xFF,
+0xF2,0xB6,0xFD,0xBD,0x7F,0xE7,0xFF,0xFF, 0xFF,0x6F,0xF7,0xFF,0xFF,0xFF,0xFE,0x77,
+0xFF,0xBF,0xF8,0xAF,0xFF,0xDF,0xBF,0xFF, 0xBF,0x7F,0xFB,0xFF,0xFF,0xFF,0xDB,0xFE,
+0xFF,0xBF,0xFF,0xFA,0xFF,0xFD,0xFF,0xF6, 0x7F,0xFF,0x9F,0xFF,0xFF,0x3F,0xEF,0xF8,
+0xEE,0x7E,0x9F,0xBA,0xFE,0xBF,0x8F,0xEF, 0xFE,0xFE,0xF9,0xFF,0xFA,0x7F,0xFE,0x7E,
+0xBF,0xAF,0xFB,0x96,0xFD,0x9F,0xEF,0x5E, 0x65,0xBE,0xEF,0x5B,0xB6,0xFF,0xBE,0xE3,
+0xFF,0xB5,0xBF,0xFF,0xFD,0xFF,0x7F,0xFF, 0xEF,0xDF,0xFE,0xFF,0xBF,0xFB,0xFE,0xFF,
+0xBF,0xCF,0xFF,0xFF,0xFF,0xFD,0x9B,0xFF, 0xFE,0xFB,0xFE,0xDF,0xFF,0x7F,0xFF,0xF7,
+0xFE,0xFF,0xDF,0xFB,0xFB,0xFE,0xFF,0xFF, 0xFF,0xFF,0xFF,0xB7,0xFE,0xFA,0xFF,0xAB,
+0xEF,0xFF,0xFD,0xB5,0x7B,0x7F,0xFB,0xF7, 0xFD,0xFF,0xFF,0xDD,0xFF,0xEF,0x8F,0xFF,
+0x2F,0xFF,0xFB,0x7C,0xFF,0x3F,0xDF,0x73, 0xEB,0xFE,0x3F,0xFF,0xEF,0xFB,0xFE,0xFF,
+0xEF,0xFD,0xFF,0xBF,0xFD,0x0F,0xFF,0xFF, 0xFF,0xF5,0xF9,0xFF,0x7F,0xD7,0xFD,0xFF,
+0xDF,0xFF,0xF7,0xFB,0xFF,0x7F,0xBF,0xFF, 0xFF,0xF0,0x9F,0xFF,0xFE,0x7F,0x8B,0xE3,
+0xF9,0xDE,0x27,0x9B,0xE6,0xBE,0x7F,0x9B, 0xC3,0xF8,0xDE,0x7F,0x9D,0xE7,0xFE,0x7F,
+0xFF,0xFF,0x5F,0xD7,0xFF,0xFF,0xFF,0x4F, 0xFB,0xFF,0xFF,0x7F,0xFF,0xAF,0xFF,0x9F,
+0x7F,0xFB,0xFF,0xE8,0xFF,0xFF,0xFE,0xBF, 0xAF,0xFF,0xFF,0xFE,0xBF,0xEF,0xF7,0xFF,
+0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,0xFF, 0xFC,0xFF,0xFF,0xFD,0x7F,0xFF,0xFF,0xFF,
+0xFD,0x3F,0xCF,0xFF,0xFF,0xFF,0xFF,0xF7, 0xFF,0xFD,0x7F,0xFF,0xFF,0x93,0xFF,0xFF,
+0x7A,0xDF,0xF7,0xFF,0xFF,0x7B,0x7F,0xB7, 0xEF,0xFF,0xFF,0xFD,0xBF,0xFD,0xFB,0xFF,
+0xF7,0xFF,0xD7,0xFF,0xFF,0xFF,0xFC,0x9F, 0x6F,0xCB,0xFF,0xF4,0xBB,0xDF,0xD6,0xFD,
+0xBF,0x2F,0xD3,0xF7,0xFF,0xDF,0xFF,0xCF, 0xFF,0xFA,0xBE,0xBD,0xAF,0x6A,0xDA,0xBE,
+0xBB,0xAB,0x3A,0xBE,0x2D,0xAE,0xEB,0xDA, 0xF6,0x3F,0xAD,0xF5,0xDD,0xFF,0xCF,0xF1,
+0xFF,0xF9,0x7F,0xFF,0x73,0xFE,0xFF,0xCF, 0xC3,0xF4,0xF7,0x2F,0xF3,0xFF,0xFC,0xFF,
+0x7C,0x1F,0xFF,0x3F,0x4F,0xFF,0x7E,0xFF, 0xEF,0xBD,0xF6,0xFE,0xFF,0x2B,0xEF,0xDC,
+0xFB,0xFD,0xFF,0xFB,0xFF,0xEA,0x7B,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFB,0xF7,0xDF,0xFF,
+0xE3,0x7D,0xFF,0xB7,0xFF,0xBF,0xFF,0xFF, 0xDF,0xFF,0xF8,0xFF,0xBF,0xFF,0xBF,0xEB,
+0xE7,0xFA,0xFE,0x3D,0xBF,0xE9,0xFC,0xBF, 0xFF,0xFA,0xFB,0xFE,0xFF,0xFF,0xFF,0xD9,
+0xFF,0xFF,0xFF,0xF6,0x7F,0xFF,0xF6,0x7D, 0xFF,0xDF,0xCF,0xFD,0xBF,0xFB,0xEF,0x7E,
+0xFF,0x7F,0xFF,0xFF,0xD3,0xFF,0xFD,0xFB, 0xFF,0xFB,0xFF,0xFF,0xFF,0xEF,0xFF,0xBF,
+0xFE,0xFF,0xF7,0xEF,0xFF,0xFF,0xFF,0xFB, 0xFF,0x87,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,
+0x7B,0xFE,0xFF,0xFE,0x3B,0xF7,0xF7,0xFF, 0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xFF,
+0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xF7, 0xFF,0xFF,0xAD,0xFF,0xFE,0xF7,0xFF,0xFF,
+0x5F,0xFF,0xFF,0xDF,0xFF,0xFD,0xFF,0xF5, 0xFF,0xDF,0xFF,0xBD,0xFF,0xE9,0xFF,0xC7,
+0xF3,0xFF,0xFF,0xF7,0xFF,0xF3,0xFF,0xF8, 0x3B,0xFF,0xFF,0x7B,0xDF,0xBF,0xFB,0xEF,
+0xFB,0xFF,0xFB,0xF7,0xF7,0xBB,0xFF,0xFF, 0xFF,0xFF,0xFB,0xFF,0xFE,0x7F,0xF3,0x7F,
+0x5E,0xB7,0xBF,0xFD,0x7F,0xFF,0xF9,0x7F, 0xFB,0xFF,0xEB,0xFD,0x7F,0x7F,0xFF,0xEF,
+0xFB,0xE0,0x3F,0xFE,0xBF,0xBF,0xDF,0xFF, 0x7E,0xFF,0xF7,0xFF,0xFF,0xFE,0xBF,0xFF,
+0xDB,0x78,0xFF,0xFF,0xFF,0xEE,0xA1,0xBF, 0xF5,0xDE,0xFB,0xF7,0xFF,0xFB,0xFF,0xFF,
+0xFF,0xFF,0xFB,0xFF,0xFF,0xD7,0xFF,0xFF, 0xFF,0xFF,0xEF,0xF0,0xFF,0xFF,0xFF,0xF3,
+0xF7,0xFF,0xEF,0xFF,0xE7,0xCF,0xFF,0xFB, 0xFF,0xEF,0xFF,0xFF,0x9F,0x9F,0xEF,0xFC,
+0x16,0xBF,0xFE,0xF3,0xE4,0xFF,0xFF,0xC6, 0xFF,0xE7,0xFF,0xFF,0xFD,0xFF,0xBF,0xFF,
+0xFF,0x3F,0xFF,0xBF,0xD6,0xAF,0x7F,0xFE, 0x6B,0x7E,0x7F,0xFF,0xAF,0xFF,0xFF,0xBF,
+0xFF,0x5F,0xFF,0xFE,0xFF,0xFF,0xFE,0xFF, 0xFF,0xBD,0xDB,0xFF,0xFE,0x5F,0xF2,0xFF,
+0xFF,0x5F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xEF,0x7F,0xFF,0xFF,0xFF,0xFF,0xDE,0xBF,
+0xFF,0xFF,0xEF,0xFB,0x77,0xFE,0xBD,0x7F, 0x5F,0xFF,0xFF,0xFF,0xDF,0x6F,0xED,0xFF,
+0xFD,0xFF,0x7F,0xFD,0x6F,0xFF,0xFF,0x77, 0xDA,0xCF,0xFD,0x5F,0xFF,0xBF,0xFF,0xFF,
+0xDF,0x7F,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF, 0x66,0x7F,0xFF,0xFE,0xBF,0xE7,0xBF,0xFA,
+0xFF,0xFE,0xFF,0xFF,0xFF,0xDF,0xFF,0x59, 0xEF,0xFF,0xEF,0xFB,0x7F,0x89,0xFF,0xFF,
+0xE9,0xFF,0x6F,0xFF,0xF5,0xFF,0xFF,0xFF, 0xFF,0xFF,0x7F,0xF2,0xF7,0xFF,0xFF,0xEF,
+0xF8,0x7F,0xFB,0xFF,0xFD,0xFF,0xFF,0xD9, 0xFF,0xEF,0xBB,0xFF,0xFF,0xFF,0xBF,0xEF,
+0xDE,0xFF,0xFF,0x9F,0x7F,0xDF,0xFF,0xF7, 0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0xFF,0xAF,
+0xFF,0xFF,0xF7,0x3F,0xEB,0x9F,0xFE,0x7F, 0x9E,0x7F,0x9F,0xFE,0x87,0xFF,0xED,0xDB,
+0x56,0xFF,0xBF,0xAF,0x0B,0xD2,0xFF,0xEF, 0xDB,0x6E,0x7D,0xBD,0x6F,0xF8,0xFE,0x3F,
+0xFA,0x5B,0xFF,0xFD,0xBF,0xEF,0xFF,0xBF, 0x6F,0xDB,0xE6,0xFF,0xFF,0x3F,0xFF,0xDF,
+0xFE,0xFF,0xFF,0xFF,0xFF,0xDA,0x3F,0xFF, 0xFB,0xFE,0xFE,0xFF,0xFF,0xDF,0xF7,0xBD,
+0xFF,0xFD,0xFF,0xFE,0xFF,0xFB,0xFF,0xFF, 0xFF,0xFF,0xF1,0x5F,0xFD,0x9F,0xDF,0xFD,
+0xFF,0xFD,0x7F,0xFF,0xFF,0xFF,0xFF,0x76, 0xFA,0xFF,0xFF,0x7F,0xE3,0xF8,0xFF,0xAE,
+0xFF,0xFB,0x7E,0x9D,0x73,0xFF,0xFA,0x7F, 0xDF,0xFF,0xFF,0x7F,0xFF,0xFB,0xCD,0xFF,
+0x7F,0xEF,0xFB,0xFF,0xFD,0xFF,0xF7,0x7F, 0x7F,0xEF,0xFF,0xED,0xFF,0xFF,0xFF,0xB5,
+0xFF,0xBF,0xFF,0xBF,0xFD,0xEF,0xDB,0xF7, 0xFF,0x93,0xFF,0xEF,0xE2,0xF9,0xBE,0x7F,
+0x8B,0xE7,0xF9,0xFE,0x6B,0xE7,0xF9,0xFE, 0x7F,0x9F,0xE7,0xF9,0xFE,0x7F,0x47,0xFF,
+0xFF,0xFD,0xFF,0x9F,0xFF,0xD7,0xFF,0xFF, 0xFF,0xFF,0xF5,0xFF,0x9F,0xFF,0xF7,0xFE,
+0xFF,0xBF,0xFE,0x6F,0xFF,0xFF,0xFB,0xFF, 0xFF,0xFF,0xAF,0xFF,0xFF,0xFF,0x7F,0xFB,
+0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD, 0xDF,0xFF,0xFF,0xF7,0xFF,0xFF,0xFF,0xDF,
+0xFF,0xFF,0xFF,0x5F,0xFF,0xFF,0xFF,0xFF, 0x5F,0xFB,0xFE,0xFF,0xF8,0x37,0xFF,0xFF,
+0xEF,0xFF,0x7F,0xFE,0xBF,0xFF,0xFF,0xFE, 0xBF,0xFF,0xFF,0x7F,0xFF,0xBF,0xFD,0xFF,
+0x7F,0xFA,0x7F,0xFF,0xFF,0x6F,0xFF,0xFF, 0x7D,0xFF,0xCF,0xFF,0xFF,0xFF,0x4F,0xFF,
+0xF2,0xFF,0xFF,0xFF,0xFF,0xFF,0xFA,0xBF, 0xFF,0xAE,0xEB,0xFA,0xFE,0xBB,0xAD,0xEB,
+0xFA,0xF7,0xAF,0x6B,0xFA,0xF6,0xBF,0x25, 0xE9,0xF2,0x7F,0x45,0xFF,0xFF,0xFD,0xF7,
+0xF7,0xBF,0xFF,0xDF,0xFF,0xFF,0xBF,0xFB, 0xFF,0xDF,0xF3,0xFF,0xF7,0x3F,0xCF,0xFF,
+0xA1,0xFF,0xFF,0xBF,0xE7,0xFF,0xFF,0x7F, 0xFF,0x3D,0xFF,0xFF,0xFF,0xF7,0xFF,0x2F,
+0xFF,0xFB,0xF5,0x7F,0xFE,0x57,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,
+0x3F,0xFF,0xFE,0xFF,0xFF,0xFF,0xFD,0xFE, 0xF7,0xEE,0xAF,0xFE,0xEE,0xE7,0xFA,0xFF,
+0xFE,0x9D,0xF9,0x5E,0xFE,0xFF,0xEB,0xFF, 0xFF,0xDF,0xA7,0xFF,0xFF,0xFF,0xFC,0xDB,
+0xFF,0xFF,0xFF,0x7E,0xFB,0xFF,0xFF,0xEF, 0xFB,0xFD,0xFF,0xDB,0xFF,0xFF,0xFF,0xEF,
+0xFF,0xFF,0xFF,0xFD,0xBF,0xFE,0xBF,0xFF, 0x6F,0x7F,0xFF,0xF7,0xFF,0xFF,0xF9,0xFF,
+0xF7,0xFF,0xBF,0xDE,0xF7,0xFF,0xFF,0xFF, 0xFA,0x7F,0xFD,0xBF,0x5F,0xFF,0xFF,0xBF,
+0xFF,0xED,0xFF,0xF7,0xBF,0xFF,0xFF,0xEF, 0xFF,0xDF,0xFF,0xFF,0xFF,0xE6,0xFF,0xFB,
+0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEB,0xFF,
+0xFD,0xFF,0xF5,0xFF,0xF6,0x7F,0xDF,0xBD, 0xCF,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0xFF,
+0xFF,0xF9,0xFF,0xFF,0xFF,0xFF,0xFF,0xE3, 0xFF,0xEE,0xBF,0xFF,0x7D,0xEF,0xFE,0xFF,
+0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,0xFF,0xFE, 0xFF,0xFF,0xFF,0xFF,0xE7,0xFF,0xB5,0xAE,
+0xFF,0xFF,0xB6,0xFE,0xBF,0xFF,0xFF,0xBF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0x27,0xFF,0xEF,0xFE,0x7F,0xDF,0xFF, 0x7E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFD,0xFF,0xF7,0xF9,0x9F,0xFF, 0x5F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,
+0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0x0F,0xFF,0xE7,0xBF,0xFE,
+0xFF,0xBF,0xFF,0xFF,0xFF,0xFF,0xFC,0xBF, 0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xC4,
+0x6B,0xFF,0x29,0x1F,0xFB,0xAF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xEF,0x1B,0xFE,0xFF,0xFC,
+0x6F,0xFF,0xFF,0xFD,0x6A,0xF7,0xD7,0xF5, 0xBF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFE,0xBF,0xFF,0xFF,0xFA,0xFF,0xFF,0xF7, 0xFB,0xDD,0xBF,0xFF,0xE7,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0x7F,0xFF, 0xFF,0xF5,0xFF,0xFF,0xF7,0xFD,0xB3,0xEF,
+0xFD,0x7E,0x5D,0xFF,0xFD,0xFF,0xFF,0xFF, 0xFD,0x7F,0xD2,0xF5,0xFB,0x7E,0xCB,0xB7,
+0xFF,0xFF,0xFF,0xC6,0xFF,0xFD,0xEE,0x63, 0xFF,0xFF,0xFF,0xFF,0xFF,0xF6,0xFD,0x65,
+0x5B,0xDF,0xFF,0xD5,0xFF,0xFF,0xFF,0xF6, 0xE7,0xBF,0xF7,0xA9,0xFF,0xFF,0xED,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xEB,0xFF,0xFF,0xFF, 0xAF,0xFF,0xFF,0xFF,0xF8,0x1B,0xFF,0xE3,
+0xD0,0xBF,0xFF,0xE1,0xFF,0xFF,0xFF,0xFF, 0xFF,0xD7,0xFF,0xFF,0xFF,0x5F,0xFF,0xFF,
+0xFF,0xFF,0xAF,0xFF,0xDB,0x76,0xBF,0xFF, 0x7F,0xFF,0xBF,0xEF,0xFE,0xFF,0xBF,0xEF,
+0xFB,0xFE,0xFF,0xFF,0xFF,0xBF,0xF2,0x7F, 0xFF,0x9F,0xFE,0xBD,0xFE,0x7F,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xF7,0x3F,0xEC,0x7F,0xF6,0x95,0xBB,
+0xEF,0xF8,0xFE,0xFC,0xBF,0x2F,0xDA,0xFC, 0xBF,0x2F,0xCB,0xF2,0xFC,0xBF,0xEF,0xFF,
+0xA9,0xBF,0xCF,0xFB,0xFF,0xFF,0xFF,0xFE, 0xDD,0xB7,0x6D,0xF6,0xD9,0xB6,0x6D,0x9B,
+0x76,0xD9,0xBF,0xFB,0xFD,0xA3,0xFF,0xBF, 0xEF,0xFF,0xEF,0xFF,0xFF,0xFF,0x7F,0xDF,
+0xFD,0xEF,0x7B,0xDE,0xF7,0xFD,0xEF,0x7F, 0xFF,0xFF,0x05,0xFF,0xFA,0xFE,0x7F,0xEF,
+0xE3,0xFF,0xFF,0xFD,0x7F,0xFF,0xFF,0xFF, 0xFF,0x5F,0xFF,0xFF,0xFD,0x7F,0xFB,0xAF,
+0xFF,0x63,0xC8,0xFF,0xBF,0xEF,0xFF,0xFF, 0xFA,0x7F,0xFF,0xFF,0xFF,0xFE,0x9F,0xF7,
+0xFF,0xFA,0xBF,0xFE,0x9F,0xFB,0x7F,0xFF, 0xFF,0xEF,0xD7,0xFF,0xFF,0xF5,0xFF,0xFF,
+0xFF,0xFF,0xFD,0x7F,0xFF,0xFF,0xBF,0xFF, 0xF9,0xBF,0xFF,0xBE,0x27,0x9F,0xE7,0xF9,
+0xFE,0x7F,0x8B,0xE7,0xFE,0x7F,0x9F,0xE2, 0xF9,0xFE,0x7F,0x9F,0xE7,0xF1,0x7F,0xFF,
+0xFF,0xFF,0xFB,0xFE,0xFF,0xFF,0xFF,0xD7, 0xFF,0xFF,0xFF,0xFF,0xF5,0xFF,0xFF,0xFF,
+0xD7,0xFF,0xFA,0xFF,0xFE,0xFF,0xFF,0xFF, 0xFD,0xFF,0xFF,0xFF,0xAF,0xF7,0xFF,0xFF,
+0xFF,0xEB,0xFF,0xFF,0xFF,0xAF,0xFF,0xC4, 0xFF,0xF7,0xFF,0xFF,0xEF,0xFF,0xFF,0xFF,
+0xFF,0x5F,0xFF,0xFF,0xFF,0xFF,0xD7,0xFF, 0xFF,0xFF,0xFF,0xFF,0xEB,0xFF,0xFB,0x7A,
+0xDF,0xF7,0xFD,0xFF,0xFF,0xFE,0xBF,0xFF, 0xFF,0x7F,0xFF,0xAF,0xFF,0xFF,0xFF,0xF7,
+0xEF,0xE3,0xFF,0xDD,0xD2,0xFF,0xDF,0xFF, 0xFF,0xF2,0xFC,0xBF,0xCB,0xF6,0xFD,0xBF,
+0x2F,0xCB,0xFF,0x7F,0xDF,0xDE,0xAF,0xFF, 0xDA,0xEE,0xBF,0xAF,0xE9,0xFA,0xF4,0xBD,
+0xAF,0x5A,0xAE,0xBB,0xAB,0x6B,0xDA,0xDE, 0xBF,0xAD,0xD7,0x5E,0xFF,0xFF,0xBF,0xFC,
+0xFF,0xDF,0xFD,0xFF,0xFF,0xFF,0xFF,0xDF, 0xF7,0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFA,
+0x1F,0xFF,0xFE,0xFB,0xEF,0xBF,0xFD,0xFF, 0xFD,0xBD,0x77,0xFF,0xFF,0xFF,0xFF,0x9D,
+0xEF,0xFF,0xFF,0xFF,0xEF,0x7D,0xFF,0xFB, 0xFE,0xEF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEE, 0xBF,0xE4,0xFB,0xFF,0xFE,0x3F,0xFE,0xFF,
+0xFF,0xFF,0xFF,0xAF,0xEA,0xFE,0xBF,0xAF, 0xEB,0xFA,0xFE,0xFF,0xFF,0xFF,0x55,0xF6,
+0xFF,0xFE,0xF7,0xFF,0x7F,0xFF,0xEB,0xF7, 0x5F,0xC5,0xFD,0x7F,0x5F,0xD7,0xF5,0xFF,
+0x6F,0xFB,0xFF,0x8A,0xFF,0xFF,0xFF,0xFF, 0xEB,0xFF,0xFF,0xFF,0xFF,0xFB,0xBF,0xBF,
+0xEF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF, 0x77,0xDF,0xFB,0xFF,0xFD,0x7F,0xEF,0xFF,
+0xFF,0xFF,0xBF,0x7F,0xFF,0xDF,0xBF,0xFF, 0xFB,0xFF,0xFF,0xFF,0xFE,0xEF,0xDF,0xFF,
+0xFE,0xFF,0x9F,0xEF,0x7D,0xFF,0xF7,0xFF, 0x7F,0xFF,0xFF,0xDF,0xF7,0xFD,0xFF,0xEF,
+0xDF,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFB,
+0xFD,0xFF,0xBF,0xDF,0xD1,0xFF,0xF8,0x3B, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0x7E,0xDB,0xFD,0xFF,0x77,0xDB,0xB7,0x7D, 0xBF,0xFB,0xFF,0xF8,0x7F,0xED,0x7B,0x5E,
+0xFF,0xFE,0xFF,0xFF,0x4F,0xD7,0xFD,0x7F, 0xDF,0xD7,0xF5,0xFF,0x7F,0xFF,0xFF,0xFF,
+0xF2,0x3F,0xFE,0xFF,0xBF,0xFF,0xFF,0xFF, 0xFF,0xBF,0xEF,0xFE,0xFF,0x3B,0xEE,0xFF,
+0xFC,0xEF,0xFF,0xFF,0xFF,0x85,0xFF,0xFD, 0xFE,0xFF,0xF5,0xFF,0xFF,0xFE,0xFF,0xDF,
+0xFB,0xFF,0x5F,0xBF,0xFF,0xFD,0xFF,0xFF, 0xFF,0xFF,0xA8,0xFF,0xFF,0x9F,0x9E,0xFF,
+0xFF,0xFF,0x7F,0xF3,0xFF,0xFF,0xCF,0xFF, 0xF7,0xFD,0xFF,0x7F,0xFF,0xFF,0xFC,0x16,
+0xBF,0xCF,0xA3,0xE5,0xEF,0x7F,0xFF,0xF3, 0xE4,0xFF,0xCF,0x93,0xFC,0xFF,0x3F,0xCF,
+0xFF,0xFF,0xFF,0xD6,0x0F,0x7D,0xBF,0x6E, 0xFB,0xF4,0xFC,0xAF,0x6D,0xDB,0x77,0xB7,
+0x6D,0xDB,0xF6,0xFD,0xBF,0xFF,0xFF,0xFF, 0xBF,0x9B,0xFA,0xDE,0xB7,0xB7,0xED,0xF9,
+0x7E,0xB7,0xAC,0xEB,0xD6,0xB3,0xAD,0xEB, 0x7A,0xDF,0xFF,0xFF,0xFF,0xD8,0xBF,0xFF,
+0xB7,0xED,0x9F,0x6F,0xDD,0xF7,0x68,0xDB, 0x37,0xB3,0x6C,0xDB,0x36,0xCD,0xB3,0x7F,
+0xFF,0x7F,0xF5,0x6F,0xFD,0xEF,0x79,0x3D, 0xF7,0x93,0xE4,0x7A,0x9E,0xAD,0xEA,0x7A,
+0x9E,0xF7,0xBD,0xEF,0xFF,0xFF,0xFF,0x76, 0x7F,0xFB,0xC6,0xFF,0xBB,0xEF,0xDA,0xFE,
+0xFD,0xBF,0xFB,0xFE,0xFF,0xBF,0xEF,0xFB, 0xFF,0xFF,0xFB,0xFF,0xA5,0xFF,0xFD,0xAB,
+0x6F,0x78,0xDE,0x17,0x8F,0x79,0xDF,0xFD, 0xFF,0x7F,0xDF,0xF7,0xFD,0xFF,0xFF,0xFB,
+0xFF,0xFB,0xFF,0xEF,0xFB,0xEF,0xFB,0xFE, 0xFF,0xBB,0xDA,0xF3,0xEF,0x3B,0xCE,0xF3,
+0xBC,0xEF,0x3F,0xCF,0xDF,0xFF,0xB7,0xFF, 0xFF,0xFF,0xCF,0x73,0xFF,0xBF,0xEF,0xFF,
+0xF3,0xFF,0x3F,0xCF,0xF3,0xFC,0xFF,0x3D, 0xCF,0x9F,0xFE,0x07,0xFF,0xAF,0xEB,0xFE,
+0xFD,0xBF,0xEF,0xEB,0xFA,0xFF,0xAF,0xEB, 0xFA,0xFE,0xBF,0xAF,0xFB,0xFE,0x3F,0xFB,
+0x9B,0xFF,0x7F,0xDF,0xFF,0xF3,0xFE,0xFF, 0xDE,0xF7,0xBF,0x7B,0xDE,0xF7,0xBD,0xEF,
+0x7B,0xFE,0xFF,0xFF,0xDF,0x3F,0xFE,0xFF, 0xB7,0xFF,0xEF,0xF7,0xFF,0xBF,0xED,0xFE,
+0xDF,0xB7,0xED,0xFB,0x7E,0xDF,0xFF,0xFF, 0xFF,0xFD,0x5F,0xEF,0xEB,0xFA,0xFE,0xF5,
+0xBF,0x6F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFE,0xF8,0xFF,0xA8,0xFF,
+0xFF,0xBF,0xEF,0xFB,0x6A,0xFB,0xB7,0xEF, 0xFB,0xFF,0xBF,0xEF,0xFB,0xFE,0xFF,0xBF,
+0xEF,0xFB,0xFF,0xE0,0xFF,0xFF,0xFD,0x7F, 0x5C,0xD7,0x7D,0xDF,0xF3,0x5C,0xF5,0xCD,
+0x73,0x5E,0xD7,0xB5,0xFD,0x7F,0xEF,0xFF, 0xDB,0xFF,0xFF,0xE2,0xF8,0xBE,0x2F,0x8F,
+0xE7,0xF8,0xBE,0x6B,0xE2,0xF8,0xBE,0x2F, 0x8B,0xE2,0xF9,0xFE,0x7F,0xE7,0xFF,0xD7,
+0xF5,0xFD,0x7F,0xFF,0xF7,0xF5,0xFD,0x7F, 0xD7,0xF5,0xFD,0x7F,0x5F,0xD7,0xF5,0xFF,
+0xFF,0xFF,0x8F,0xFF,0xAF,0xEB,0xFA,0xFF, 0xFF,0xBF,0xEB,0xFA,0xFF,0x2F,0xEB,0xFA,
+0xFE,0xBF,0xAF,0xEB,0xFF,0xFF,0xFE,0x5F, 0xFF,0x5F,0xFF,0xFF,0xFD,0xFF,0xFF,0xD7,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xBF,0xFE,0xB7,0xFD,
+0xFF,0x7E,0xDF,0xF7,0xAD,0xFF,0x7F,0xF7, 0xFD,0xFF,0x7F,0xDF,0xF7,0xFD,0xFF,0x7F,
+0xF6,0x7F,0xFF,0xFF,0xFF,0xDB,0xF6,0xFC, 0xAF,0xFF,0xFF,0xFF,0xFF,0xF7,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xEC,0xBF,0xFF, 0xAF,0xEB,0xFA,0xF6,0xAB,0x8F,0xEB,0xFA,
+0xF7,0xA5,0xEB,0xFA,0xBE,0xBF,0xAF,0xEB, 0xFA,0xFF,0x6D,0xFF,0xFF,0x7F,0xDF,0x33,
+0xDD,0xFF,0x7F,0xFE,0xF7,0xFC,0x7F,0xFB, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xA9,
+0xFF,0xFD,0xFF,0xFF,0xFE,0xFF,0xFF,0xDF, 0xFF,0xFF,0xEF,0xEF,0xFD,0xFF,0x7F,0xFF,
+0xFF,0xFF,0xFF,0xFE,0xA7,0xFF,0xFF,0xFF, 0x77,0xDF,0xF7,0xFD,0x9F,0x7F,0xFE,0x77,
+0xEF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xAF,0xBF,0xAF,0xFF,0xF9,0xBE,0xBF,
+0x8F,0xFB,0xFE,0xFE,0xEF,0xFB,0xFE,0xFF, 0xBF,0xEF,0xFB,0xFF,0xFF,0xFD,0xDF,0x6F,
+0xEF,0xFF,0x7F,0xFF,0xBF,0xBF,0xDF,0xFF, 0xFC,0xFF,0xDF,0xF7,0xFD,0xEF,0x7F,0xDF,
+0xFF,0xFF,0xFF,0x3F,0xF6,0xFF,0xCF,0xFF, 0xDB,0xFB,0xF7,0xFF,0xEB,0x7A,0xFF,0xFF,
+0xFF,0xBF,0xEF,0xFB,0xFF,0xFF,0xFF,0xFE, 0x6D,0xFD,0xFF,0x5F,0xFB,0xFF,0xFF,0xF7,
+0xFF,0x5F,0xF5,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xF8,0xFF,0xFB,0xFF,
+0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xE7,0xF6, 0xBF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,
+0xFF,0xC9,0xFF,0xFF,0xFF,0xBD,0xFF,0xBF, 0xAF,0xEF,0xEF,0x3F,0xD1,0xFC,0x7F,0xFB,
+0xC7,0xFF,0xFF,0xFF,0xFF,0xFF,0xE3,0xFF, 0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0x77,0xFF,
+0xDF,0xB7,0xFD,0xF7,0xFD,0xF7,0xFF,0xFF, 0xFF,0xFF,0xFF,0x57,0xFF,0xF7,0xA5,0xFD,
+0x3F,0xDF,0xBF,0xBF,0xFE,0x7F,0xFF,0xFF, 0xFF,0xDF,0xFA,0xFD,0xFF,0xFF,0xFF,0xFE,
+0x87,0xFF,0xE9,0xFF,0xFE,0xEF,0xBF,0xEF, 0xFE,0xFE,0xFF,0xEF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFA,0x9F,0xFF,0x3F, 0xFF,0xFD,0xFD,0x57,0xDF,0xFD,0xF3,0xFF,
+0xDF,0xFD,0xFF,0x5F,0xDF,0xF5,0xFD,0xFF, 0xFF,0xF9,0x8F,0xFF,0xFF,0xFF,0xEE,0x7F,
+0xFF,0xFF,0xBF,0x5E,0xFE,0xEC,0xFB,0x3F, 0x7F,0x9F,0xEF,0xF9,0xFF,0xFF,0xCD,0x6B,
+0xFF,0xFF,0xFF,0xC5,0xF3,0xFC,0xFA,0x38, 0xFF,0xAF,0x3F,0xEE,0x7F,0x9F,0xFF,0xD9,
+0xFF,0xFF,0xFD,0x7A,0xF7,0xFF,0xF3,0xFF, 0xAF,0x6F,0xDB,0xF2,0xB9,0xE9,0xFB,0xFF,
+0xFF,0xFF,0xFE,0xFF,0xFF,0xEF,0xFF,0xFB, 0xC5,0xBF,0xFF,0xEF,0xFF,0x5E,0xB7,0xAD,
+0xCD,0x79,0x7C,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFD,0x93,0xFF,0xEF,
+0xEA,0xFE,0xBF,0xEF,0x5B,0xD2,0xCD,0xF5, 0x6D,0x77,0xDF,0xF7,0xFD,0xFF,0x7F,0xDF,
+0xFF,0xFF,0x66,0xFF,0xD5,0x65,0x7D,0x5F, 0x75,0x9D,0x65,0x7F,0xD6,0xFB,0x4F,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF6,0xC7, 0xFF,0xBF,0xEF,0xFA,0xFE,0xFF,0xBF,0xEB,
+0xFF,0xDF,0xFF,0x7E,0xFF,0xFF,0xEF,0xFD, 0x7E,0xD7,0xFF,0x78,0xDF,0xFF,0x5F,0xDF,
+0xF5,0xBF,0x7F,0xDF,0xC5,0xFF,0x3F,0xF6, 0x7E,0xFF,0x0F,0xEF,0xF2,0x3E,0xBF,0xFF,
+0xFB,0x3F,0xFF,0xFB,0x7F,0xFF,0xB3,0xFE, 0xFB,0xF6,0xFD,0xFF,0xDA,0xF7,0xFD,0xFF,
+0x7F,0xDF,0xF7,0xBF,0xFF,0xFA,0x7F,0xFF, 0xFF,0xFF,0xFF,0x9F,0xFF,0xF3,0xDC,0xF9,
+0xBF,0xCE,0xE7,0xF9,0xFE,0x7F,0x9F,0xE7, 0xFF,0xFF,0xE2,0x7F,0xFE,0xFF,0xBF,0xEF,
+0xEB,0xFA,0xFF,0x9F,0x67,0x1E,0xFF,0x8F, 0xE7,0xF8,0xFE,0x7F,0x8F,0xEF,0xFF,0xBD,
+0xBF,0xFF,0xFB,0xFF,0xFF,0xDF,0xF7,0xFF, 0xFC,0xFF,0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFD,0xB3,0xFF,0xFF,0xEF, 0xFF,0xFF,0xBF,0xED,0xFF,0xFB,0xEE,0xFE,
+0xFF,0xFF,0xEF,0xFF,0xFE,0xFF,0xFF,0xFF, 0xFF,0xB5,0xFF,0xB7,0xFD,0xFD,0x6E,0xFF,
+0xFF,0xFE,0xFD,0x2F,0xD8,0xFE,0xBF,0x8F, 0xEB,0xF9,0xFE,0x3F,0xFF,0xFA,0xCF,0xFF,
+0xE7,0xD9,0xFA,0xBF,0xDF,0x77,0xFC,0xFB, 0x3F,0xAB,0xFE,0xFF,0xBF,0xEF,0xFB,0xFE,
+0xFF,0xFF,0xEE,0x1F,0xFF,0xDF,0xF7,0xFF, 0xFF,0xFF,0x5F,0x97,0x35,0xBF,0x5E,0xFE,
+0xBF,0xEF,0xFF,0xF7,0xFD,0xFF,0xFF,0xFA, 0xBF,0xFF,0xBE,0x6F,0x9F,0xE7,0xF8,0xBE,
+0x2F,0x8B,0x66,0x94,0x7D,0x9D,0xE7,0xF9, 0xFE,0x7F,0x9F,0xE7,0xF1,0x7F,0xFF,0xFF,
+0xFF,0xF7,0xF5,0xFD,0x7F,0x5F,0xFB,0xFD, 0x9E,0xFF,0xFB,0xFE,0xFF,0xFF,0xEF,0xFF,
+0xFF,0xA0,0xFF,0xFF,0xFF,0xBF,0xEF,0xEB, 0xFA,0xFE,0xBF,0xB7,0xF7,0xF7,0xFF,0xFF,
+0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xDD,0xFF, 0xFD,0xFF,0xFF,0xFF,0xD7,0xFF,0xFF,0xFF,
+0x7F,0xF5,0xFF,0xFF,0xEF,0xFF,0xFF,0xFF, 0xBF,0xFF,0xFF,0xAB,0xFE,0xFB,0xFE,0xFF,
+0xF7,0xAF,0xFF,0xFF,0xDE,0xF7,0xEB,0x5F, 0xDF,0xF7,0xFD,0xFF,0x7F,0xDF,0xFF,0xFF,
+0xB3,0xFF,0xC9,0xFE,0xFF,0xFF,0xFF,0xFF, 0xD6,0xFF,0xFF,0xCB,0xFF,0xFF,0xDF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFC,0x8F,0xFF,0xBA, 0xBE,0xBF,0xAF,0xEB,0x78,0xFE,0xB7,0xAD,
+0x3A,0xFE,0xB7,0xAF,0xEB,0x7A,0xFE,0xBF, 0xAF,0xFF,0x9F,0xFF,0xFF,0xDF,0xFC,0xFF,
+0xFF,0xFE,0xC3,0xFE,0xFF,0xFF,0x33,0xFC, 0xFF,0xBF,0xDF,0xF3,0xFF,0xFF,0xBB,0x9F,
+0xFF,0xFF,0xFF,0xEB,0xDF,0xFF,0xFF,0xAF, 0xF7,0x6F,0xF9,0xBF,0xEF,0xFD,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xE3,0x7F,0xFF,0xFF,0xFF, 0xFB,0xFF,0xFF,0xBF,0xFD,0xFB,0xF7,0xFF,
+0xDF,0xF7,0xFF,0xFE,0xEF,0x5F,0xBD,0xFF, 0xFA,0xFF,0xF8,0xFF,0xBF,0xAF,0xFB,0xFE,
+0xFE,0x3F,0xEF,0xE8,0xFF,0xDF,0xF3,0xFD, 0xFF,0xFF,0xFF,0xFF,0xFF,0xED,0xFF,0xFB,
+0xFD,0xFF,0xAF,0xFF,0xFF,0xFE,0xFE,0xBF, 0xDB,0xFF,0xFF,0xFF,0xBF,0xFF,0xDF,0xFF,
+0xFD,0xFF,0xCB,0xFF,0xFF,0xFF,0xFF,0xFF, 0xBF,0x6F,0xFF,0x7F,0xB7,0xB3,0xFF,0xFF,
+0xDF,0xFF,0xFB,0xEF,0xFF,0xFF,0xFF,0x07, 0xFF,0xFB,0xFF,0xFF,0xFF,0xED,0xFF,0xF5,
+0x7C,0xFF,0x7F,0xFE,0xFF,0xFF,0xEF,0xCF, 0xFF,0xFB,0xFF,0xFF,0x2F,0xFF,0xFF,0xFF,
+0xFF,0xF3,0xFF,0xFB,0xFF,0xFE,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,
+0xFD,0x1B,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFE,0x7C,0xFF,0xFF,0xFF,0xFF,
+0xEF,0xFF,0xFF,0xFF,0xFF,0xFB,0xBF,0x7F, 0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xDB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD, 0xFF,0xFF,0xF0,0x7F,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF,0xDF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0xBF,0xFE,
+0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xEF,0xFE,0xFF,0xBF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xEF,0xFA,0xB5,0xFF,0xFF,0xFF, 0xF7,0xF7,0xFF,0xFF,0xFF,0xFF,0xDF,0xFB,
+0xFC,0xFF,0xFF,0xFE,0xFF,0x7F,0xDF,0xBF, 0xFF,0xCB,0xBF,0xF9,0xFE,0x7F,0x9F,0xE7,
+0xF9,0xFE,0x7F,0x97,0xE1,0xFE,0x79,0x9F, 0xE7,0xFD,0xFE,0x7F,0xDF,0xFE,0x37,0xFF,
+0xFB,0xDE,0xDE,0xBD,0xEF,0xF3,0xFE,0xFB, 0xAF,0xEB,0xFE,0xFF,0xFF,0xCF,0xFF,0xFE,
+0xFF,0xBF,0xFF,0x8F,0xFF,0xEF,0xFB,0xFE, 0xFF,0xBF,0xE7,0xF9,0x5E,0x7F,0xEF,0xFB,
+0xDA,0xFF,0xBF,0xEF,0xFB,0xFE,0xFF,0xFD, 0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,
+0xFF,0xFF,0x7F,0xFF,0xFF,0xF7,0xFB,0x7F, 0xFF,0xFF,0xFF,0xFF,0xFC,0x3F,0xFF,0xBF,
+0xEF,0xFB,0xFE,0xFF,0xBF,0xEF,0x7B,0x7F, 0xBF,0xEF,0xFB,0xFE,0xFF,0xB5,0xEF,0xFB,
+0xBF,0xFA,0x7F,0xFC,0xFF,0x3F,0xCF,0xF3, 0xFC,0xFF,0x3F,0xCF,0xBC,0xFF,0x3F,0xEF,
+0xF3,0xFC,0xFE,0x3F,0xCF,0xFF,0xEE,0xEF, 0xFB,0xFE,0xFF,0xBF,0xEF,0xFB,0x6A,0xD7,
+0xB7,0xFB,0xF8,0xFF,0xB7,0xEF,0xBA,0xFE, 0xFF,0xBF,0x7F,0xE9,0xFF,0xF9,0x7E,0x5F,
+0x97,0xE5,0xF9,0xFE,0x7F,0xBF,0xF9,0x7E, 0x5F,0x9F,0xE5,0xFB,0xFE,0x5F,0xB7,0xFF,
+0xA3,0xFF,0xF7,0xFD,0xFF,0x7F,0xDF,0xF7, 0xFD,0xFF,0x5E,0xF7,0x7D,0xFF,0x77,0xDF,
+0xF7,0xFD,0xFF,0x7F,0xFF,0xD7,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFD,0xDF,0xFB,0x7F,
+0xFF,0xFF,0xEF,0xFF,0xFE,0xFB,0xFF,0xFF, 0xBF,0xFE,0x8F,0xFF,0xDF,0xF7,0xFD,0xFD,
+0x7F,0xDF,0xF7,0xFD,0x3E,0xDF,0xF5,0xBD, 0xFF,0x7F,0xDF,0xF7,0xFD,0xF7,0xFF,0x9F,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFD,0xFF,0xBE,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFD,0x3F,0xFF,0xDF,0xF7, 0xFD,0xFF,0x7F,0xDF,0xF7,0xFD,0xFF,0xCF,
+0x77,0xFC,0xFF,0x5F,0xDF,0xF7,0xFD,0xFF, 0xF4,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFD,0xFF,0xFF,0xFF,0xEE,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xED,0xFB,0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xE9,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFB,0xFF,0xFF,0xFF,0xD3,0xFF,0xFF,
+0xBF,0x3F,0xFB,0xFF,0xFF,0xFF,0xFB,0xF3, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xF7, 0xFF,0xFF,0xFF,0xFF,0x17,0xFF,0xFF,0xFF,
+0xDF,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF, 0xDF,0xDF,0xFF,0xFD,0xFF,0xFF,0xDF,0xF7,
+0xFF,0x4F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFD,
+0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x9F,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF, 0xFF,0xFF,0x7A,0x3F,0xFF,0xFF,0xFF,0xFF,
+0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF2,
+0x7F,0xFF,0xFB,0xFE,0xFF,0xBF,0xEF,0xF8, 0xFE,0xFF,0xBF,0xFB,0xFE,0xFF,0x8F,0xEC,
+0xFB,0xFE,0xFF,0xBF,0xF8,0xF7,0xFE,0xFF, 0xBF,0xEF,0xFB,0xFE,0xFD,0xBF,0xCF,0xEC,
+0xFF,0x3F,0xEF,0xDB,0xF8,0xFF,0xBF,0xCF, 0xFF,0xF9,0xFF,0xFF,0xBF,0xFF,0xFB,0xFF,
+0xFF,0xFF,0xEF,0xFB,0xDF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,0xBB,0xFF,
+0xEF,0xFB,0xFE,0xEF,0xBF,0xEE,0xEB,0xFB, 0xFE,0xFF,0xEF,0xFE,0xEE,0xBF,0xFE,0xEB,
+0xFF,0xEF,0xFF,0x17,0xFF,0x7E,0xEB,0xBB, 0xFE,0xBF,0xBE,0xFB,0xEF,0x5B,0xF7,0xBD,
+0xFB,0xCF,0xBF,0xBF,0xBB,0xFB,0x7E,0xCC, 0xEF,0xFF
+
+};
diff --git a/drivers/usb/media/dabusb.c b/drivers/usb/media/dabusb.c
new file mode 100644
index 000000000000..8823297d2191
--- /dev/null
+++ b/drivers/usb/media/dabusb.c
@@ -0,0 +1,877 @@
+/*****************************************************************************/
+
+/*
+ * dabusb.c -- dab usb driver.
+ *
+ * Copyright (C) 1999 Deti Fliegl (deti@fliegl.de)
+ *
+ * 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.
+ *
+ *
+ *
+ * $Id: dabusb.c,v 1.54 2000/07/24 21:39:39 deti Exp $
+ *
+ */
+
+/*****************************************************************************/
+
+#include <linux/module.h>
+#include <linux/socket.h>
+#include <linux/list.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <asm/uaccess.h>
+#include <asm/atomic.h>
+#include <linux/delay.h>
+#include <linux/usb.h>
+#include <linux/smp_lock.h>
+
+#include "dabusb.h"
+#include "dabfirmware.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.54"
+#define DRIVER_AUTHOR "Deti Fliegl, deti@fliegl.de"
+#define DRIVER_DESC "DAB-USB Interface Driver for Linux (c)1999"
+
+/* --------------------------------------------------------------------- */
+
+#ifdef CONFIG_USB_DYNAMIC_MINORS
+#define NRDABUSB 256
+#else
+#define NRDABUSB 4
+#endif
+
+/*-------------------------------------------------------------------*/
+
+static dabusb_t dabusb[NRDABUSB];
+static int buffers = 256;
+static struct usb_driver dabusb_driver;
+
+/*-------------------------------------------------------------------*/
+
+static int dabusb_add_buf_tail (pdabusb_t s, struct list_head *dst, struct list_head *src)
+{
+ unsigned long flags;
+ struct list_head *tmp;
+ int ret = 0;
+
+ spin_lock_irqsave (&s->lock, flags);
+
+ if (list_empty (src)) {
+ // no elements in source buffer
+ ret = -1;
+ goto err;
+ }
+ tmp = src->next;
+ list_move_tail (tmp, dst);
+
+ err: spin_unlock_irqrestore (&s->lock, flags);
+ return ret;
+}
+/*-------------------------------------------------------------------*/
+#ifdef DEBUG
+static void dump_urb (struct urb *urb)
+{
+ dbg("urb :%p", urb);
+ dbg("dev :%p", urb->dev);
+ dbg("pipe :%08X", urb->pipe);
+ dbg("status :%d", urb->status);
+ dbg("transfer_flags :%08X", urb->transfer_flags);
+ dbg("transfer_buffer :%p", urb->transfer_buffer);
+ dbg("transfer_buffer_length:%d", urb->transfer_buffer_length);
+ dbg("actual_length :%d", urb->actual_length);
+ dbg("setup_packet :%p", urb->setup_packet);
+ dbg("start_frame :%d", urb->start_frame);
+ dbg("number_of_packets :%d", urb->number_of_packets);
+ dbg("interval :%d", urb->interval);
+ dbg("error_count :%d", urb->error_count);
+ dbg("context :%p", urb->context);
+ dbg("complete :%p", urb->complete);
+}
+#endif
+/*-------------------------------------------------------------------*/
+static int dabusb_cancel_queue (pdabusb_t s, struct list_head *q)
+{
+ unsigned long flags;
+ pbuff_t b;
+
+ dbg("dabusb_cancel_queue");
+
+ spin_lock_irqsave (&s->lock, flags);
+
+ list_for_each_entry(b, q, buff_list) {
+#ifdef DEBUG
+ dump_urb(b->purb);
+#endif
+ usb_unlink_urb (b->purb);
+ }
+ spin_unlock_irqrestore (&s->lock, flags);
+ return 0;
+}
+/*-------------------------------------------------------------------*/
+static int dabusb_free_queue (struct list_head *q)
+{
+ struct list_head *tmp;
+ struct list_head *p;
+ pbuff_t b;
+
+ dbg("dabusb_free_queue");
+ for (p = q->next; p != q;) {
+ b = list_entry (p, buff_t, buff_list);
+
+#ifdef DEBUG
+ dump_urb(b->purb);
+#endif
+ if (b->purb->transfer_buffer)
+ kfree (b->purb->transfer_buffer);
+ usb_free_urb(b->purb);
+ tmp = p->next;
+ list_del (p);
+ kfree (b);
+ p = tmp;
+ }
+
+ return 0;
+}
+/*-------------------------------------------------------------------*/
+static int dabusb_free_buffers (pdabusb_t s)
+{
+ unsigned long flags;
+ dbg("dabusb_free_buffers");
+
+ spin_lock_irqsave(&s->lock, flags);
+
+ dabusb_free_queue (&s->free_buff_list);
+ dabusb_free_queue (&s->rec_buff_list);
+
+ spin_unlock_irqrestore(&s->lock, flags);
+
+ s->got_mem = 0;
+ return 0;
+}
+/*-------------------------------------------------------------------*/
+static void dabusb_iso_complete (struct urb *purb, struct pt_regs *regs)
+{
+ pbuff_t b = purb->context;
+ pdabusb_t s = b->s;
+ int i;
+ int len;
+ int dst = 0;
+ void *buf = purb->transfer_buffer;
+
+ dbg("dabusb_iso_complete");
+
+ // process if URB was not killed
+ if (purb->status != -ENOENT) {
+ unsigned int pipe = usb_rcvisocpipe (purb->dev, _DABUSB_ISOPIPE);
+ int pipesize = usb_maxpacket (purb->dev, pipe, usb_pipeout (pipe));
+ for (i = 0; i < purb->number_of_packets; i++)
+ if (!purb->iso_frame_desc[i].status) {
+ len = purb->iso_frame_desc[i].actual_length;
+ if (len <= pipesize) {
+ memcpy (buf + dst, buf + purb->iso_frame_desc[i].offset, len);
+ dst += len;
+ }
+ else
+ err("dabusb_iso_complete: invalid len %d", len);
+ }
+ else
+ warn("dabusb_iso_complete: corrupted packet status: %d", purb->iso_frame_desc[i].status);
+ if (dst != purb->actual_length)
+ err("dst!=purb->actual_length:%d!=%d", dst, purb->actual_length);
+ }
+
+ if (atomic_dec_and_test (&s->pending_io) && !s->remove_pending && s->state != _stopped) {
+ s->overruns++;
+ err("overrun (%d)", s->overruns);
+ }
+ wake_up (&s->wait);
+}
+/*-------------------------------------------------------------------*/
+static int dabusb_alloc_buffers (pdabusb_t s)
+{
+ int buffers = 0;
+ pbuff_t b;
+ unsigned int pipe = usb_rcvisocpipe (s->usbdev, _DABUSB_ISOPIPE);
+ int pipesize = usb_maxpacket (s->usbdev, pipe, usb_pipeout (pipe));
+ int packets = _ISOPIPESIZE / pipesize;
+ int transfer_buffer_length = packets * pipesize;
+ int i;
+
+ dbg("dabusb_alloc_buffers pipesize:%d packets:%d transfer_buffer_len:%d",
+ pipesize, packets, transfer_buffer_length);
+
+ while (buffers < (s->total_buffer_size << 10)) {
+ b = (pbuff_t) kmalloc (sizeof (buff_t), GFP_KERNEL);
+ if (!b) {
+ err("kmalloc(sizeof(buff_t))==NULL");
+ goto err;
+ }
+ memset (b, 0, sizeof (buff_t));
+ b->s = s;
+ b->purb = usb_alloc_urb(packets, GFP_KERNEL);
+ if (!b->purb) {
+ err("usb_alloc_urb == NULL");
+ kfree (b);
+ goto err;
+ }
+
+ b->purb->transfer_buffer = kmalloc (transfer_buffer_length, GFP_KERNEL);
+ if (!b->purb->transfer_buffer) {
+ kfree (b->purb);
+ kfree (b);
+ err("kmalloc(%d)==NULL", transfer_buffer_length);
+ goto err;
+ }
+
+ b->purb->transfer_buffer_length = transfer_buffer_length;
+ b->purb->number_of_packets = packets;
+ b->purb->complete = dabusb_iso_complete;
+ b->purb->context = b;
+ b->purb->dev = s->usbdev;
+ b->purb->pipe = pipe;
+ b->purb->transfer_flags = URB_ISO_ASAP;
+
+ for (i = 0; i < packets; i++) {
+ b->purb->iso_frame_desc[i].offset = i * pipesize;
+ b->purb->iso_frame_desc[i].length = pipesize;
+ }
+
+ buffers += transfer_buffer_length;
+ list_add_tail (&b->buff_list, &s->free_buff_list);
+ }
+ s->got_mem = buffers;
+
+ return 0;
+
+ err:
+ dabusb_free_buffers (s);
+ return -ENOMEM;
+}
+/*-------------------------------------------------------------------*/
+static int dabusb_bulk (pdabusb_t s, pbulk_transfer_t pb)
+{
+ int ret;
+ unsigned int pipe;
+ int actual_length;
+
+ dbg("dabusb_bulk");
+
+ if (!pb->pipe)
+ pipe = usb_rcvbulkpipe (s->usbdev, 2);
+ else
+ pipe = usb_sndbulkpipe (s->usbdev, 2);
+
+ ret=usb_bulk_msg(s->usbdev, pipe, pb->data, pb->size, &actual_length, 100);
+ if(ret<0) {
+ err("dabusb: usb_bulk_msg failed(%d)",ret);
+
+ if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) {
+ err("set_interface failed");
+ return -EINVAL;
+ }
+
+ }
+
+ if( ret == -EPIPE ) {
+ warn("CLEAR_FEATURE request to remove STALL condition.");
+ if(usb_clear_halt(s->usbdev, usb_pipeendpoint(pipe)))
+ err("request failed");
+ }
+
+ pb->size = actual_length;
+ return ret;
+}
+/* --------------------------------------------------------------------- */
+static int dabusb_writemem (pdabusb_t s, int pos, unsigned char *data, int len)
+{
+ int ret;
+ unsigned char *transfer_buffer = kmalloc (len, GFP_KERNEL);
+
+ if (!transfer_buffer) {
+ err("dabusb_writemem: kmalloc(%d) failed.", len);
+ return -ENOMEM;
+ }
+
+ memcpy (transfer_buffer, data, len);
+
+ ret=usb_control_msg(s->usbdev, usb_sndctrlpipe( s->usbdev, 0 ), 0xa0, 0x40, pos, 0, transfer_buffer, len, 300);
+
+ kfree (transfer_buffer);
+ return ret;
+}
+/* --------------------------------------------------------------------- */
+static int dabusb_8051_reset (pdabusb_t s, unsigned char reset_bit)
+{
+ dbg("dabusb_8051_reset: %d",reset_bit);
+ return dabusb_writemem (s, CPUCS_REG, &reset_bit, 1);
+}
+/* --------------------------------------------------------------------- */
+static int dabusb_loadmem (pdabusb_t s, const char *fname)
+{
+ int ret;
+ PINTEL_HEX_RECORD ptr = firmware;
+
+ dbg("Enter dabusb_loadmem (internal)");
+
+ ret = dabusb_8051_reset (s, 1);
+ while (ptr->Type == 0) {
+
+ dbg("dabusb_writemem: %04X %p %d)", ptr->Address, ptr->Data, ptr->Length);
+
+ ret = dabusb_writemem (s, ptr->Address, ptr->Data, ptr->Length);
+ if (ret < 0) {
+ err("dabusb_writemem failed (%d %04X %p %d)", ret, ptr->Address, ptr->Data, ptr->Length);
+ break;
+ }
+ ptr++;
+ }
+ ret = dabusb_8051_reset (s, 0);
+
+ dbg("dabusb_loadmem: exit");
+
+ return ret;
+}
+/* --------------------------------------------------------------------- */
+static int dabusb_fpga_clear (pdabusb_t s, pbulk_transfer_t b)
+{
+ b->size = 4;
+ b->data[0] = 0x2a;
+ b->data[1] = 0;
+ b->data[2] = 0;
+ b->data[3] = 0;
+
+ dbg("dabusb_fpga_clear");
+
+ return dabusb_bulk (s, b);
+}
+/* --------------------------------------------------------------------- */
+static int dabusb_fpga_init (pdabusb_t s, pbulk_transfer_t b)
+{
+ b->size = 4;
+ b->data[0] = 0x2c;
+ b->data[1] = 0;
+ b->data[2] = 0;
+ b->data[3] = 0;
+
+ dbg("dabusb_fpga_init");
+
+ return dabusb_bulk (s, b);
+}
+/* --------------------------------------------------------------------- */
+static int dabusb_fpga_download (pdabusb_t s, const char *fname)
+{
+ pbulk_transfer_t b = kmalloc (sizeof (bulk_transfer_t), GFP_KERNEL);
+ unsigned int blen, n;
+ int ret;
+ unsigned char *buf = bitstream;
+
+ dbg("Enter dabusb_fpga_download (internal)");
+
+ if (!b) {
+ err("kmalloc(sizeof(bulk_transfer_t))==NULL");
+ return -ENOMEM;
+ }
+
+ b->pipe = 1;
+ ret = dabusb_fpga_clear (s, b);
+ mdelay (10);
+ blen = buf[73] + (buf[72] << 8);
+
+ dbg("Bitstream len: %i", blen);
+
+ b->data[0] = 0x2b;
+ b->data[1] = 0;
+ b->data[2] = 0;
+ b->data[3] = 60;
+
+ for (n = 0; n <= blen + 60; n += 60) {
+ // some cclks for startup
+ b->size = 64;
+ memcpy (b->data + 4, buf + 74 + n, 60);
+ ret = dabusb_bulk (s, b);
+ if (ret < 0) {
+ err("dabusb_bulk failed.");
+ break;
+ }
+ mdelay (1);
+ }
+
+ ret = dabusb_fpga_init (s, b);
+ kfree (b);
+
+ dbg("exit dabusb_fpga_download");
+
+ return ret;
+}
+
+static int dabusb_stop (pdabusb_t s)
+{
+ dbg("dabusb_stop");
+
+ s->state = _stopped;
+ dabusb_cancel_queue (s, &s->rec_buff_list);
+
+ dbg("pending_io: %d", s->pending_io.counter);
+
+ s->pending_io.counter = 0;
+ return 0;
+}
+
+static int dabusb_startrek (pdabusb_t s)
+{
+ if (!s->got_mem && s->state != _started) {
+
+ dbg("dabusb_startrek");
+
+ if (dabusb_alloc_buffers (s) < 0)
+ return -ENOMEM;
+ dabusb_stop (s);
+ s->state = _started;
+ s->readptr = 0;
+ }
+
+ if (!list_empty (&s->free_buff_list)) {
+ pbuff_t end;
+ int ret;
+
+ while (!dabusb_add_buf_tail (s, &s->rec_buff_list, &s->free_buff_list)) {
+
+ dbg("submitting: end:%p s->rec_buff_list:%p", s->rec_buff_list.prev, &s->rec_buff_list);
+
+ end = list_entry (s->rec_buff_list.prev, buff_t, buff_list);
+
+ ret = usb_submit_urb (end->purb, GFP_KERNEL);
+ if (ret) {
+ err("usb_submit_urb returned:%d", ret);
+ if (dabusb_add_buf_tail (s, &s->free_buff_list, &s->rec_buff_list))
+ err("startrek: dabusb_add_buf_tail failed");
+ break;
+ }
+ else
+ atomic_inc (&s->pending_io);
+ }
+ dbg("pending_io: %d",s->pending_io.counter);
+ }
+
+ return 0;
+}
+
+static ssize_t dabusb_read (struct file *file, char __user *buf, size_t count, loff_t * ppos)
+{
+ pdabusb_t s = (pdabusb_t) file->private_data;
+ unsigned long flags;
+ unsigned ret = 0;
+ int rem;
+ int cnt;
+ pbuff_t b;
+ struct urb *purb = NULL;
+
+ dbg("dabusb_read");
+
+ if (*ppos)
+ return -ESPIPE;
+
+ if (s->remove_pending)
+ return -EIO;
+
+
+ if (!s->usbdev)
+ return -EIO;
+
+ while (count > 0) {
+ dabusb_startrek (s);
+
+ spin_lock_irqsave (&s->lock, flags);
+
+ if (list_empty (&s->rec_buff_list)) {
+
+ spin_unlock_irqrestore(&s->lock, flags);
+
+ err("error: rec_buf_list is empty");
+ goto err;
+ }
+
+ b = list_entry (s->rec_buff_list.next, buff_t, buff_list);
+ purb = b->purb;
+
+ spin_unlock_irqrestore(&s->lock, flags);
+
+ if (purb->status == -EINPROGRESS) {
+ if (file->f_flags & O_NONBLOCK) // return nonblocking
+ {
+ if (!ret)
+ ret = -EAGAIN;
+ goto err;
+ }
+
+ interruptible_sleep_on (&s->wait);
+
+ if (signal_pending (current)) {
+ if (!ret)
+ ret = -ERESTARTSYS;
+ goto err;
+ }
+
+ spin_lock_irqsave (&s->lock, flags);
+
+ if (list_empty (&s->rec_buff_list)) {
+ spin_unlock_irqrestore(&s->lock, flags);
+ err("error: still no buffer available.");
+ goto err;
+ }
+ spin_unlock_irqrestore(&s->lock, flags);
+ s->readptr = 0;
+ }
+ if (s->remove_pending) {
+ ret = -EIO;
+ goto err;
+ }
+
+ rem = purb->actual_length - s->readptr; // set remaining bytes to copy
+
+ if (count >= rem)
+ cnt = rem;
+ else
+ cnt = count;
+
+ dbg("copy_to_user:%p %p %d",buf, purb->transfer_buffer + s->readptr, cnt);
+
+ if (copy_to_user (buf, purb->transfer_buffer + s->readptr, cnt)) {
+ err("read: copy_to_user failed");
+ if (!ret)
+ ret = -EFAULT;
+ goto err;
+ }
+
+ s->readptr += cnt;
+ count -= cnt;
+ buf += cnt;
+ ret += cnt;
+
+ if (s->readptr == purb->actual_length) {
+ // finished, take next buffer
+ if (dabusb_add_buf_tail (s, &s->free_buff_list, &s->rec_buff_list))
+ err("read: dabusb_add_buf_tail failed");
+ s->readptr = 0;
+ }
+ }
+ err: //up(&s->mutex);
+ return ret;
+}
+
+static int dabusb_open (struct inode *inode, struct file *file)
+{
+ int devnum = iminor(inode);
+ pdabusb_t s;
+
+ if (devnum < DABUSB_MINOR || devnum >= (DABUSB_MINOR + NRDABUSB))
+ return -EIO;
+
+ s = &dabusb[devnum - DABUSB_MINOR];
+
+ dbg("dabusb_open");
+ down (&s->mutex);
+
+ while (!s->usbdev || s->opened) {
+ up (&s->mutex);
+
+ if (file->f_flags & O_NONBLOCK) {
+ return -EBUSY;
+ }
+ msleep_interruptible(500);
+
+ if (signal_pending (current)) {
+ return -EAGAIN;
+ }
+ down (&s->mutex);
+ }
+ if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) {
+ up(&s->mutex);
+ err("set_interface failed");
+ return -EINVAL;
+ }
+ s->opened = 1;
+ up (&s->mutex);
+
+ file->f_pos = 0;
+ file->private_data = s;
+
+ return nonseekable_open(inode, file);
+}
+
+static int dabusb_release (struct inode *inode, struct file *file)
+{
+ pdabusb_t s = (pdabusb_t) file->private_data;
+
+ dbg("dabusb_release");
+
+ down (&s->mutex);
+ dabusb_stop (s);
+ dabusb_free_buffers (s);
+ up (&s->mutex);
+
+ if (!s->remove_pending) {
+ if (usb_set_interface (s->usbdev, _DABUSB_IF, 0) < 0)
+ err("set_interface failed");
+ }
+ else
+ wake_up (&s->remove_ok);
+
+ s->opened = 0;
+ return 0;
+}
+
+static int dabusb_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ pdabusb_t s = (pdabusb_t) file->private_data;
+ pbulk_transfer_t pbulk;
+ int ret = 0;
+ int version = DABUSB_VERSION;
+
+ dbg("dabusb_ioctl");
+
+ if (s->remove_pending)
+ return -EIO;
+
+ down (&s->mutex);
+
+ if (!s->usbdev) {
+ up (&s->mutex);
+ return -EIO;
+ }
+
+ switch (cmd) {
+
+ case IOCTL_DAB_BULK:
+ pbulk = (pbulk_transfer_t) kmalloc (sizeof (bulk_transfer_t), GFP_KERNEL);
+
+ if (!pbulk) {
+ ret = -ENOMEM;
+ break;
+ }
+
+ if (copy_from_user (pbulk, (void __user *) arg, sizeof (bulk_transfer_t))) {
+ ret = -EFAULT;
+ kfree (pbulk);
+ break;
+ }
+
+ ret=dabusb_bulk (s, pbulk);
+ if(ret==0)
+ if (copy_to_user((void __user *)arg, pbulk,
+ sizeof(bulk_transfer_t)))
+ ret = -EFAULT;
+ kfree (pbulk);
+ break;
+
+ case IOCTL_DAB_OVERRUNS:
+ ret = put_user (s->overruns, (unsigned int __user *) arg);
+ break;
+
+ case IOCTL_DAB_VERSION:
+ ret = put_user (version, (unsigned int __user *) arg);
+ break;
+
+ default:
+ ret = -ENOIOCTLCMD;
+ break;
+ }
+ up (&s->mutex);
+ return ret;
+}
+
+static struct file_operations dabusb_fops =
+{
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .read = dabusb_read,
+ .ioctl = dabusb_ioctl,
+ .open = dabusb_open,
+ .release = dabusb_release,
+};
+
+static struct usb_class_driver dabusb_class = {
+ .name = "usb/dabusb%d",
+ .fops = &dabusb_fops,
+ .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP,
+ .minor_base = DABUSB_MINOR,
+};
+
+
+/* --------------------------------------------------------------------- */
+static int dabusb_probe (struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *usbdev = interface_to_usbdev(intf);
+ int retval;
+ pdabusb_t s;
+
+ dbg("dabusb: probe: vendor id 0x%x, device id 0x%x ifnum:%d",
+ le16_to_cpu(usbdev->descriptor.idVendor),
+ le16_to_cpu(usbdev->descriptor.idProduct),
+ intf->altsetting->desc.bInterfaceNumber);
+
+ /* We don't handle multiple configurations */
+ if (usbdev->descriptor.bNumConfigurations != 1)
+ return -ENODEV;
+
+ if (intf->altsetting->desc.bInterfaceNumber != _DABUSB_IF &&
+ le16_to_cpu(usbdev->descriptor.idProduct) == 0x9999)
+ return -ENODEV;
+
+
+
+ s = &dabusb[intf->minor];
+
+ down (&s->mutex);
+ s->remove_pending = 0;
+ s->usbdev = usbdev;
+ s->devnum = intf->minor;
+
+ if (usb_reset_configuration (usbdev) < 0) {
+ err("reset_configuration failed");
+ goto reject;
+ }
+ if (le16_to_cpu(usbdev->descriptor.idProduct) == 0x2131) {
+ dabusb_loadmem (s, NULL);
+ goto reject;
+ }
+ else {
+ dabusb_fpga_download (s, NULL);
+
+ if (usb_set_interface (s->usbdev, _DABUSB_IF, 0) < 0) {
+ err("set_interface failed");
+ goto reject;
+ }
+ }
+ dbg("bound to interface: %d", intf->altsetting->desc.bInterfaceNumber);
+ usb_set_intfdata (intf, s);
+ up (&s->mutex);
+
+ retval = usb_register_dev(intf, &dabusb_class);
+ if (retval) {
+ usb_set_intfdata (intf, NULL);
+ return -ENOMEM;
+ }
+
+ return 0;
+
+ reject:
+ up (&s->mutex);
+ s->usbdev = NULL;
+ return -ENODEV;
+}
+
+static void dabusb_disconnect (struct usb_interface *intf)
+{
+ wait_queue_t __wait;
+ pdabusb_t s = usb_get_intfdata (intf);
+
+ dbg("dabusb_disconnect");
+
+ init_waitqueue_entry(&__wait, current);
+
+ usb_set_intfdata (intf, NULL);
+ if (s) {
+ usb_deregister_dev (intf, &dabusb_class);
+ s->remove_pending = 1;
+ wake_up (&s->wait);
+ add_wait_queue(&s->remove_ok, &__wait);
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ if (s->state == _started)
+ schedule();
+ current->state = TASK_RUNNING;
+ remove_wait_queue(&s->remove_ok, &__wait);
+
+ s->usbdev = NULL;
+ s->overruns = 0;
+ }
+}
+
+static struct usb_device_id dabusb_ids [] = {
+ // { USB_DEVICE(0x0547, 0x2131) }, /* An2131 chip, no boot ROM */
+ { USB_DEVICE(0x0547, 0x9999) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, dabusb_ids);
+
+static struct usb_driver dabusb_driver = {
+ .owner = THIS_MODULE,
+ .name = "dabusb",
+ .probe = dabusb_probe,
+ .disconnect = dabusb_disconnect,
+ .id_table = dabusb_ids,
+};
+
+/* --------------------------------------------------------------------- */
+
+static int __init dabusb_init (void)
+{
+ int retval;
+ unsigned u;
+
+ /* initialize struct */
+ for (u = 0; u < NRDABUSB; u++) {
+ pdabusb_t s = &dabusb[u];
+ memset (s, 0, sizeof (dabusb_t));
+ init_MUTEX (&s->mutex);
+ s->usbdev = NULL;
+ s->total_buffer_size = buffers;
+ init_waitqueue_head (&s->wait);
+ init_waitqueue_head (&s->remove_ok);
+ spin_lock_init (&s->lock);
+ INIT_LIST_HEAD (&s->free_buff_list);
+ INIT_LIST_HEAD (&s->rec_buff_list);
+ }
+
+ /* register misc device */
+ retval = usb_register(&dabusb_driver);
+ if (retval)
+ goto out;
+
+ dbg("dabusb_init: driver registered");
+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+
+out:
+ return retval;
+}
+
+static void __exit dabusb_cleanup (void)
+{
+ dbg("dabusb_cleanup");
+
+ usb_deregister (&dabusb_driver);
+}
+
+/* --------------------------------------------------------------------- */
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(buffers, int, 0);
+MODULE_PARM_DESC (buffers, "Number of buffers (default=256)");
+
+module_init (dabusb_init);
+module_exit (dabusb_cleanup);
+
+/* --------------------------------------------------------------------- */
diff --git a/drivers/usb/media/dabusb.h b/drivers/usb/media/dabusb.h
new file mode 100644
index 000000000000..10b666e43abc
--- /dev/null
+++ b/drivers/usb/media/dabusb.h
@@ -0,0 +1,85 @@
+#define _BULK_DATA_LEN 64
+typedef struct
+{
+ unsigned char data[_BULK_DATA_LEN];
+ unsigned int size;
+ unsigned int pipe;
+}bulk_transfer_t,*pbulk_transfer_t;
+
+#define DABUSB_MINOR 240 /* some unassigned USB minor */
+#define DABUSB_VERSION 0x1000
+#define IOCTL_DAB_BULK _IOWR('d', 0x30, bulk_transfer_t)
+#define IOCTL_DAB_OVERRUNS _IOR('d', 0x15, int)
+#define IOCTL_DAB_VERSION _IOR('d', 0x3f, int)
+
+#ifdef __KERNEL__
+
+typedef enum { _stopped=0, _started } driver_state_t;
+
+typedef struct
+{
+ struct semaphore mutex;
+ struct usb_device *usbdev;
+ wait_queue_head_t wait;
+ wait_queue_head_t remove_ok;
+ spinlock_t lock;
+ atomic_t pending_io;
+ driver_state_t state;
+ int remove_pending;
+ int got_mem;
+ int total_buffer_size;
+ unsigned int overruns;
+ int readptr;
+ int opened;
+ int devnum;
+ struct list_head free_buff_list;
+ struct list_head rec_buff_list;
+} dabusb_t,*pdabusb_t;
+
+typedef struct
+{
+ pdabusb_t s;
+ struct urb *purb;
+ struct list_head buff_list;
+} buff_t,*pbuff_t;
+
+typedef struct
+{
+ wait_queue_head_t wait;
+} bulk_completion_context_t, *pbulk_completion_context_t;
+
+
+#define _DABUSB_IF 2
+#define _DABUSB_ISOPIPE 0x09
+#define _ISOPIPESIZE 16384
+
+#define _BULK_DATA_LEN 64
+// Vendor specific request code for Anchor Upload/Download
+// This one is implemented in the core
+#define ANCHOR_LOAD_INTERNAL 0xA0
+
+// EZ-USB Control and Status Register. Bit 0 controls 8051 reset
+#define CPUCS_REG 0x7F92
+#define _TOTAL_BUFFERS 384
+
+#define MAX_INTEL_HEX_RECORD_LENGTH 16
+
+#ifndef _BYTE_DEFINED
+#define _BYTE_DEFINED
+typedef unsigned char BYTE;
+#endif // !_BYTE_DEFINED
+
+#ifndef _WORD_DEFINED
+#define _WORD_DEFINED
+typedef unsigned short WORD;
+#endif // !_WORD_DEFINED
+
+typedef struct _INTEL_HEX_RECORD
+{
+ BYTE Length;
+ WORD Address;
+ BYTE Type;
+ BYTE Data[MAX_INTEL_HEX_RECORD_LENGTH];
+} INTEL_HEX_RECORD, *PINTEL_HEX_RECORD;
+
+#endif
diff --git a/drivers/usb/media/dsbr100.c b/drivers/usb/media/dsbr100.c
new file mode 100644
index 000000000000..7503f5b96f59
--- /dev/null
+++ b/drivers/usb/media/dsbr100.c
@@ -0,0 +1,429 @@
+/* A driver for the D-Link DSB-R100 USB radio. The R100 plugs
+ into both the USB and an analog audio input, so this thing
+ only deals with initialisation and frequency setting, the
+ audio data has to be handled by a sound driver.
+
+ Major issue: I can't find out where the device reports the signal
+ strength, and indeed the windows software appearantly just looks
+ at the stereo indicator as well. So, scanning will only find
+ stereo stations. Sad, but I can't help it.
+
+ Also, the windows program sends oodles of messages over to the
+ device, and I couldn't figure out their meaning. My suspicion
+ is that they don't have any:-)
+
+ You might find some interesting stuff about this module at
+ http://unimut.fsk.uni-heidelberg.de/unimut/demi/dsbr
+
+ Copyright (c) 2000 Markus Demleitner <msdemlei@cl.uni-heidelberg.de>
+
+ 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
+
+ History:
+
+ Version 0.40:
+ Markus: Updates for 2.6.x kernels, code layout changes, name sanitizing
+
+ Version 0.30:
+ Markus: Updates for 2.5.x kernel and more ISO compliant source
+
+ Version 0.25:
+ PSL and Markus: Cleanup, radio now doesn't stop on device close
+
+ Version 0.24:
+ Markus: Hope I got these silly VIDEO_TUNER_LOW issues finally
+ right. Some minor cleanup, improved standalone compilation
+
+ Version 0.23:
+ Markus: Sign extension bug fixed by declaring transfer_buffer unsigned
+
+ Version 0.22:
+ Markus: Some (brown bag) cleanup in what VIDIOCSTUNER returns,
+ thanks to Mike Cox for pointing the problem out.
+
+ Version 0.21:
+ Markus: Minor cleanup, warnings if something goes wrong, lame attempt
+ to adhere to Documentation/CodingStyle
+
+ Version 0.2:
+ Brad Hards <bradh@dynamite.com.au>: Fixes to make it work as non-module
+ Markus: Copyright clarification
+
+ Version 0.01: Markus: initial release
+
+*/
+
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/input.h>
+#include <linux/videodev.h>
+#include <linux/usb.h>
+#include <linux/smp_lock.h>
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.40"
+#define DRIVER_AUTHOR "Markus Demleitner <msdemlei@tucana.harvard.edu>"
+#define DRIVER_DESC "D-Link DSB-R100 USB FM radio driver"
+
+#define DSB100_VENDOR 0x04b4
+#define DSB100_PRODUCT 0x1002
+
+/* Commands the device appears to understand */
+#define DSB100_TUNE 1
+#define DSB100_ONOFF 2
+
+#define TB_LEN 16
+
+/* Frequency limits in MHz -- these are European values. For Japanese
+devices, that would be 76 and 91. */
+#define FREQ_MIN 87.5
+#define FREQ_MAX 108.0
+#define FREQ_MUL 16000
+
+
+static int usb_dsbr100_probe(struct usb_interface *intf,
+ const struct usb_device_id *id);
+static void usb_dsbr100_disconnect(struct usb_interface *intf);
+static int usb_dsbr100_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg);
+static int usb_dsbr100_open(struct inode *inode, struct file *file);
+static int usb_dsbr100_close(struct inode *inode, struct file *file);
+
+static int radio_nr = -1;
+module_param(radio_nr, int, 0);
+
+/* Data for one (physical) device */
+typedef struct {
+ struct usb_device *usbdev;
+ struct video_device *videodev;
+ unsigned char transfer_buffer[TB_LEN];
+ int curfreq;
+ int stereo;
+ int users;
+ int removed;
+} dsbr100_device;
+
+
+/* File system interface */
+static struct file_operations usb_dsbr100_fops = {
+ .owner = THIS_MODULE,
+ .open = usb_dsbr100_open,
+ .release = usb_dsbr100_close,
+ .ioctl = usb_dsbr100_ioctl,
+ .llseek = no_llseek,
+};
+
+/* V4L interface */
+static struct video_device dsbr100_videodev_template=
+{
+ .owner = THIS_MODULE,
+ .name = "D-Link DSB-R 100",
+ .type = VID_TYPE_TUNER,
+ .hardware = VID_HARDWARE_AZTECH,
+ .fops = &usb_dsbr100_fops,
+ .release = video_device_release,
+};
+
+static struct usb_device_id usb_dsbr100_device_table [] = {
+ { USB_DEVICE(DSB100_VENDOR, DSB100_PRODUCT) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, usb_dsbr100_device_table);
+
+/* USB subsystem interface */
+static struct usb_driver usb_dsbr100_driver = {
+ .owner = THIS_MODULE,
+ .name = "dsbr100",
+ .probe = usb_dsbr100_probe,
+ .disconnect = usb_dsbr100_disconnect,
+ .id_table = usb_dsbr100_device_table,
+};
+
+/* Low-level device interface begins here */
+
+/* switch on radio */
+static int dsbr100_start(dsbr100_device *radio)
+{
+ if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
+ USB_REQ_GET_STATUS,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
+ 0x00, 0xC7, radio->transfer_buffer, 8, 300)<0 ||
+ usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
+ DSB100_ONOFF,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
+ 0x01, 0x00, radio->transfer_buffer, 8, 300)<0)
+ return -1;
+ return (radio->transfer_buffer)[0];
+}
+
+
+/* switch off radio */
+static int dsbr100_stop(dsbr100_device *radio)
+{
+ if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
+ USB_REQ_GET_STATUS,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
+ 0x16, 0x1C, radio->transfer_buffer, 8, 300)<0 ||
+ usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
+ DSB100_ONOFF,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
+ 0x00, 0x00, radio->transfer_buffer, 8, 300)<0)
+ return -1;
+ return (radio->transfer_buffer)[0];
+}
+
+/* set a frequency, freq is defined by v4l's TUNER_LOW, i.e. 1/16th kHz */
+static int dsbr100_setfreq(dsbr100_device *radio, int freq)
+{
+ freq = (freq/16*80)/1000+856;
+ if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
+ DSB100_TUNE,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
+ (freq>>8)&0x00ff, freq&0xff,
+ radio->transfer_buffer, 8, 300)<0 ||
+ usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
+ USB_REQ_GET_STATUS,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
+ 0x96, 0xB7, radio->transfer_buffer, 8, 300)<0 ||
+ usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
+ USB_REQ_GET_STATUS,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
+ 0x00, 0x24, radio->transfer_buffer, 8, 300)<0) {
+ radio->stereo = -1;
+ return -1;
+ }
+ radio->stereo = ! ((radio->transfer_buffer)[0]&0x01);
+ return (radio->transfer_buffer)[0];
+}
+
+/* return the device status. This is, in effect, just whether it
+sees a stereo signal or not. Pity. */
+static void dsbr100_getstat(dsbr100_device *radio)
+{
+ if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
+ USB_REQ_GET_STATUS,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
+ 0x00 , 0x24, radio->transfer_buffer, 8, 300)<0)
+ radio->stereo = -1;
+ else
+ radio->stereo = ! (radio->transfer_buffer[0]&0x01);
+}
+
+
+/* USB subsystem interface begins here */
+
+/* check if the device is present and register with v4l and
+usb if it is */
+static int usb_dsbr100_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ dsbr100_device *radio;
+
+ if (!(radio = kmalloc(sizeof(dsbr100_device), GFP_KERNEL)))
+ return -ENOMEM;
+ if (!(radio->videodev = video_device_alloc())) {
+ kfree(radio);
+ return -ENOMEM;
+ }
+ memcpy(radio->videodev, &dsbr100_videodev_template,
+ sizeof(dsbr100_videodev_template));
+ radio->removed = 0;
+ radio->users = 0;
+ radio->usbdev = interface_to_usbdev(intf);
+ radio->curfreq = FREQ_MIN*FREQ_MUL;
+ video_set_drvdata(radio->videodev, radio);
+ if (video_register_device(radio->videodev, VFL_TYPE_RADIO,
+ radio_nr)) {
+ warn("Could not register video device");
+ video_device_release(radio->videodev);
+ kfree(radio);
+ return -EIO;
+ }
+ usb_set_intfdata(intf, radio);
+ return 0;
+}
+
+/* handle unplugging of the device, release data structures
+if nothing keeps us from doing it. If something is still
+keeping us busy, the release callback of v4l will take care
+of releasing it. stv680.c does not relase its private
+data, so I don't do this here either. Checking out the
+code I'd expect I better did that, but if there's a memory
+leak here it's tiny (~50 bytes per disconnect) */
+static void usb_dsbr100_disconnect(struct usb_interface *intf)
+{
+ dsbr100_device *radio = usb_get_intfdata(intf);
+
+ usb_set_intfdata (intf, NULL);
+ if (radio) {
+ video_unregister_device(radio->videodev);
+ radio->videodev = NULL;
+ if (radio->users) {
+ kfree(radio);
+ } else {
+ radio->removed = 1;
+ }
+ }
+}
+
+
+/* Video for Linux interface */
+
+static int usb_dsbr100_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
+{
+ dsbr100_device *radio=video_get_drvdata(video_devdata(file));
+
+ if (!radio)
+ return -EIO;
+
+ switch(cmd) {
+ case VIDIOCGCAP: {
+ struct video_capability *v = arg;
+
+ memset(v, 0, sizeof(*v));
+ v->type = VID_TYPE_TUNER;
+ v->channels = 1;
+ v->audios = 1;
+ strcpy(v->name, "D-Link R-100 USB FM Radio");
+ return 0;
+ }
+ case VIDIOCGTUNER: {
+ struct video_tuner *v = arg;
+
+ dsbr100_getstat(radio);
+ if(v->tuner) /* Only 1 tuner */
+ return -EINVAL;
+ v->rangelow = FREQ_MIN*FREQ_MUL;
+ v->rangehigh = FREQ_MAX*FREQ_MUL;
+ v->flags = VIDEO_TUNER_LOW;
+ v->mode = VIDEO_MODE_AUTO;
+ v->signal = radio->stereo*0x7000;
+ /* Don't know how to get signal strength */
+ v->flags |= VIDEO_TUNER_STEREO_ON*radio->stereo;
+ strcpy(v->name, "DSB R-100");
+ return 0;
+ }
+ case VIDIOCSTUNER: {
+ struct video_tuner *v = arg;
+
+ if(v->tuner!=0)
+ return -EINVAL;
+ /* Only 1 tuner so no setting needed ! */
+ return 0;
+ }
+ case VIDIOCGFREQ: {
+ int *freq = arg;
+
+ if (radio->curfreq==-1)
+ return -EINVAL;
+ *freq = radio->curfreq;
+ return 0;
+ }
+ case VIDIOCSFREQ: {
+ int *freq = arg;
+
+ radio->curfreq = *freq;
+ if (dsbr100_setfreq(radio, radio->curfreq)==-1)
+ warn("Set frequency failed");
+ return 0;
+ }
+ case VIDIOCGAUDIO: {
+ struct video_audio *v = arg;
+
+ memset(v, 0, sizeof(*v));
+ v->flags |= VIDEO_AUDIO_MUTABLE;
+ v->mode = VIDEO_SOUND_STEREO;
+ v->volume = 1;
+ v->step = 1;
+ strcpy(v->name, "Radio");
+ return 0;
+ }
+ case VIDIOCSAUDIO: {
+ struct video_audio *v = arg;
+
+ if (v->audio)
+ return -EINVAL;
+ if (v->flags&VIDEO_AUDIO_MUTE) {
+ if (dsbr100_stop(radio)==-1)
+ warn("Radio did not respond properly");
+ }
+ else
+ if (dsbr100_start(radio)==-1)
+ warn("Radio did not respond properly");
+ return 0;
+ }
+ default:
+ return -ENOIOCTLCMD;
+ }
+}
+
+static int usb_dsbr100_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, usb_dsbr100_do_ioctl);
+}
+
+static int usb_dsbr100_open(struct inode *inode, struct file *file)
+{
+ dsbr100_device *radio=video_get_drvdata(video_devdata(file));
+
+ radio->users = 1;
+ if (dsbr100_start(radio)<0) {
+ warn("Radio did not start up properly");
+ radio->users = 0;
+ return -EIO;
+ }
+ dsbr100_setfreq(radio, radio->curfreq);
+ return 0;
+}
+
+static int usb_dsbr100_close(struct inode *inode, struct file *file)
+{
+ dsbr100_device *radio=video_get_drvdata(video_devdata(file));
+
+ if (!radio)
+ return -ENODEV;
+ radio->users = 0;
+ if (radio->removed) {
+ kfree(radio);
+ }
+ return 0;
+}
+
+static int __init dsbr100_init(void)
+{
+ int retval = usb_register(&usb_dsbr100_driver);
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+ return retval;
+}
+
+static void __exit dsbr100_exit(void)
+{
+ usb_deregister(&usb_dsbr100_driver);
+}
+
+module_init (dsbr100_init);
+module_exit (dsbr100_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/media/ibmcam.c b/drivers/usb/media/ibmcam.c
new file mode 100644
index 000000000000..ba41fc7b95c2
--- /dev/null
+++ b/drivers/usb/media/ibmcam.c
@@ -0,0 +1,3932 @@
+/*
+ * 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:
+ *
+ * (C) Copyright 1999 Johannes Erdfelt
+ * (C) Copyright 1999 Randy Dunlap
+ *
+ * 5/24/00 Removed optional (and unnecessary) locking of the driver while
+ * the device remains plugged in. Corrected race conditions in ibmcam_open
+ * and ibmcam_probe() routines using this as a guideline:
+ */
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/module.h>
+#include <linux/init.h>
+
+#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 */
+
+/* Header signatures */
+
+/* Model 1 header: 00 FF 00 xx */
+#define HDRSIG_MODEL1_128x96 0x06 /* U Y V Y ... */
+#define HDRSIG_MODEL1_176x144 0x0e /* U Y V Y ... */
+#define HDRSIG_MODEL1_352x288 0x00 /* V Y U Y ... */
+
+#define IBMCAM_MODEL_1 1 /* XVP-501, 3 interfaces, rev. 0.02 */
+#define IBMCAM_MODEL_2 2 /* KSX-X9903, 2 interfaces, rev. 3.0a */
+#define IBMCAM_MODEL_3 3 /* KSX-X9902, 2 interfaces, rev. 3.01 */
+#define IBMCAM_MODEL_4 4 /* IBM NetCamera, 0545/8002/3.0a */
+
+/* Video sizes supported */
+#define VIDEOSIZE_128x96 VIDEOSIZE(128, 96)
+#define VIDEOSIZE_176x144 VIDEOSIZE(176,144)
+#define VIDEOSIZE_352x288 VIDEOSIZE(352,288)
+#define VIDEOSIZE_320x240 VIDEOSIZE(320,240)
+#define VIDEOSIZE_352x240 VIDEOSIZE(352,240)
+#define VIDEOSIZE_640x480 VIDEOSIZE(640,480)
+#define VIDEOSIZE_160x120 VIDEOSIZE(160,120)
+
+/* Video sizes supported */
+enum {
+ SIZE_128x96 = 0,
+ SIZE_160x120,
+ SIZE_176x144,
+ SIZE_320x240,
+ SIZE_352x240,
+ SIZE_352x288,
+ SIZE_640x480,
+ /* Add/remove/rearrange items before this line */
+ SIZE_LastItem
+};
+
+/*
+ * This structure lives in uvd->user field.
+ */
+typedef struct {
+ int initialized; /* Had we already sent init sequence? */
+ int camera_model; /* What type of IBM camera we got? */
+ int has_hdr;
+} ibmcam_t;
+#define IBMCAM_T(uvd) ((ibmcam_t *)((uvd)->user_data))
+
+static struct usbvideo *cams;
+
+static int debug;
+
+static int flags; /* = FLAGS_DISPLAY_HINTS | FLAGS_OVERLAY_STATS; */
+
+static const int min_canvasWidth = 8;
+static const int min_canvasHeight = 4;
+
+static int lighting = 1; /* Medium */
+
+#define SHARPNESS_MIN 0
+#define SHARPNESS_MAX 6
+static int sharpness = 4; /* Low noise, good details */
+
+#define FRAMERATE_MIN 0
+#define FRAMERATE_MAX 6
+static int framerate = -1;
+
+static int size = SIZE_352x288;
+
+/*
+ * Here we define several initialization variables. They may
+ * be used to automatically set color, hue, brightness and
+ * contrast to desired values. This is particularly useful in
+ * case of webcams (which have no controls and no on-screen
+ * output) and also when a client V4L software is used that
+ * does not have some of those controls. In any case it's
+ * good to have startup values as options.
+ *
+ * These values are all in [0..255] range. This simplifies
+ * operation. Note that actual values of V4L variables may
+ * be scaled up (as much as << 8). User can see that only
+ * on overlay output, however, or through a V4L client.
+ */
+static int init_brightness = 128;
+static int init_contrast = 192;
+static int init_color = 128;
+static int init_hue = 128;
+static int hue_correction = 128;
+
+/* Settings for camera model 2 */
+static int init_model2_rg2 = -1;
+static int init_model2_sat = -1;
+static int init_model2_yb = -1;
+
+/* 01.01.08 - Added for RCA video in support -LO */
+/* Settings for camera model 3 */
+static int init_model3_input = 0;
+
+module_param(debug, int, 0);
+MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)");
+module_param(flags, int, 0);
+MODULE_PARM_DESC(flags, "Bitfield: 0=VIDIOCSYNC, 1=B/W, 2=show hints, 3=show stats, 4=test pattern, 5=separate frames, 6=clean frames");
+module_param(framerate, int, 0);
+MODULE_PARM_DESC(framerate, "Framerate setting: 0=slowest, 6=fastest (default=2)");
+module_param(lighting, int, 0);
+MODULE_PARM_DESC(lighting, "Photosensitivity: 0=bright, 1=medium (default), 2=low light");
+module_param(sharpness, int, 0);
+MODULE_PARM_DESC(sharpness, "Model1 noise reduction: 0=smooth, 6=sharp (default=4)");
+module_param(size, int, 0);
+MODULE_PARM_DESC(size, "Image size: 0=128x96 1=160x120 2=176x144 3=320x240 4=352x240 5=352x288 6=640x480 (default=5)");
+module_param(init_brightness, int, 0);
+MODULE_PARM_DESC(init_brightness, "Brightness preconfiguration: 0-255 (default=128)");
+module_param(init_contrast, int, 0);
+MODULE_PARM_DESC(init_contrast, "Contrast preconfiguration: 0-255 (default=192)");
+module_param(init_color, int, 0);
+MODULE_PARM_DESC(init_color, "Color preconfiguration: 0-255 (default=128)");
+module_param(init_hue, int, 0);
+MODULE_PARM_DESC(init_hue, "Hue preconfiguration: 0-255 (default=128)");
+module_param(hue_correction, int, 0);
+MODULE_PARM_DESC(hue_correction, "YUV colorspace regulation: 0-255 (default=128)");
+
+module_param(init_model2_rg2, int, 0);
+MODULE_PARM_DESC(init_model2_rg2, "Model2 preconfiguration: 0-255 (default=47)");
+module_param(init_model2_sat, int, 0);
+MODULE_PARM_DESC(init_model2_sat, "Model2 preconfiguration: 0-255 (default=52)");
+module_param(init_model2_yb, int, 0);
+MODULE_PARM_DESC(init_model2_yb, "Model2 preconfiguration: 0-255 (default=160)");
+
+/* 01.01.08 - Added for RCA video in support -LO */
+module_param(init_model3_input, int, 0);
+MODULE_PARM_DESC(init_model3_input, "Model3 input: 0=CCD 1=RCA");
+
+MODULE_AUTHOR ("Dmitri");
+MODULE_DESCRIPTION ("IBM/Xirlink C-it USB Camera Driver for Linux (c) 2000");
+MODULE_LICENSE("GPL");
+
+/* Still mysterious i2c commands */
+static const unsigned short unknown_88 = 0x0088;
+static const unsigned short unknown_89 = 0x0089;
+static const unsigned short bright_3x[3] = { 0x0031, 0x0032, 0x0033 };
+static const unsigned short contrast_14 = 0x0014;
+static const unsigned short light_27 = 0x0027;
+static const unsigned short sharp_13 = 0x0013;
+
+/* i2c commands for Model 2 cameras */
+static const unsigned short mod2_brightness = 0x001a; /* $5b .. $ee; default=$5a */
+static const unsigned short mod2_set_framerate = 0x001c; /* 0 (fast).. $1F (slow) */
+static const unsigned short mod2_color_balance_rg2 = 0x001e; /* 0 (red) .. $7F (green) */
+static const unsigned short mod2_saturation = 0x0020; /* 0 (b/w) - $7F (full color) */
+static const unsigned short mod2_color_balance_yb = 0x0022; /* 0..$7F, $50 is about right */
+static const unsigned short mod2_hue = 0x0024; /* 0..$7F, $70 is about right */
+static const unsigned short mod2_sensitivity = 0x0028; /* 0 (min) .. $1F (max) */
+
+struct struct_initData {
+ unsigned char req;
+ unsigned short value;
+ unsigned short index;
+};
+
+/*
+ * ibmcam_size_to_videosize()
+ *
+ * This procedure converts module option 'size' into the actual
+ * videosize_t that defines the image size in pixels. We need
+ * simplified 'size' because user wants a simple enumerated list
+ * of choices, not an infinite set of possibilities.
+ */
+static videosize_t ibmcam_size_to_videosize(int size)
+{
+ videosize_t vs = VIDEOSIZE_352x288;
+ RESTRICT_TO_RANGE(size, 0, (SIZE_LastItem-1));
+ switch (size) {
+ case SIZE_128x96:
+ vs = VIDEOSIZE_128x96;
+ break;
+ case SIZE_160x120:
+ vs = VIDEOSIZE_160x120;
+ break;
+ case SIZE_176x144:
+ vs = VIDEOSIZE_176x144;
+ break;
+ case SIZE_320x240:
+ vs = VIDEOSIZE_320x240;
+ break;
+ case SIZE_352x240:
+ vs = VIDEOSIZE_352x240;
+ break;
+ case SIZE_352x288:
+ vs = VIDEOSIZE_352x288;
+ break;
+ case SIZE_640x480:
+ vs = VIDEOSIZE_640x480;
+ break;
+ default:
+ err("size=%d. is not valid", size);
+ break;
+ }
+ return vs;
+}
+
+/*
+ * ibmcam_find_header()
+ *
+ * Locate one of supported header markers in the queue.
+ * Once found, remove all preceding bytes AND the marker (4 bytes)
+ * from the data pump queue. Whatever follows must be video lines.
+ *
+ * History:
+ * 1/21/00 Created.
+ */
+static enum ParseState ibmcam_find_header(struct uvd *uvd) /* FIXME: Add frame here */
+{
+ struct usbvideo_frame *frame;
+ ibmcam_t *icam;
+
+ if ((uvd->curframe) < 0 || (uvd->curframe >= USBVIDEO_NUMFRAMES)) {
+ err("ibmcam_find_header: Illegal frame %d.", uvd->curframe);
+ return scan_EndParse;
+ }
+ icam = IBMCAM_T(uvd);
+ assert(icam != NULL);
+ frame = &uvd->frame[uvd->curframe];
+ icam->has_hdr = 0;
+ switch (icam->camera_model) {
+ case IBMCAM_MODEL_1:
+ {
+ const int marker_len = 4;
+ while (RingQueue_GetLength(&uvd->dp) >= marker_len) {
+ if ((RING_QUEUE_PEEK(&uvd->dp, 0) == 0x00) &&
+ (RING_QUEUE_PEEK(&uvd->dp, 1) == 0xFF) &&
+ (RING_QUEUE_PEEK(&uvd->dp, 2) == 0x00))
+ {
+#if 0 /* This code helps to detect new frame markers */
+ info("Header sig: 00 FF 00 %02X", RING_QUEUE_PEEK(&uvd->dp, 3));
+#endif
+ frame->header = RING_QUEUE_PEEK(&uvd->dp, 3);
+ if ((frame->header == HDRSIG_MODEL1_128x96) ||
+ (frame->header == HDRSIG_MODEL1_176x144) ||
+ (frame->header == HDRSIG_MODEL1_352x288))
+ {
+#if 0
+ info("Header found.");
+#endif
+ RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, marker_len);
+ icam->has_hdr = 1;
+ break;
+ }
+ }
+ /* If we are still here then this doesn't look like a header */
+ RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, 1);
+ }
+ break;
+ }
+ case IBMCAM_MODEL_2:
+case IBMCAM_MODEL_4:
+ {
+ int marker_len = 0;
+ switch (uvd->videosize) {
+ case VIDEOSIZE_176x144:
+ marker_len = 10;
+ break;
+ default:
+ marker_len = 2;
+ break;
+ }
+ while (RingQueue_GetLength(&uvd->dp) >= marker_len) {
+ if ((RING_QUEUE_PEEK(&uvd->dp, 0) == 0x00) &&
+ (RING_QUEUE_PEEK(&uvd->dp, 1) == 0xFF))
+ {
+#if 0
+ info("Header found.");
+#endif
+ RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, marker_len);
+ icam->has_hdr = 1;
+ frame->header = HDRSIG_MODEL1_176x144;
+ break;
+ }
+ /* If we are still here then this doesn't look like a header */
+ RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, 1);
+ }
+ break;
+ }
+ case IBMCAM_MODEL_3:
+ { /*
+ * Headers: (one precedes every frame). nc=no compression,
+ * bq=best quality bf=best frame rate.
+ *
+ * 176x144: 00 FF 02 { 0A=nc CA=bq EA=bf }
+ * 320x240: 00 FF 02 { 08=nc 28=bq 68=bf }
+ * 640x480: 00 FF 03 { 08=nc 28=bq 68=bf }
+ *
+ * Bytes '00 FF' seem to indicate header. Other two bytes
+ * encode the frame type. This is a set of bit fields that
+ * encode image size, compression type etc. These fields
+ * do NOT contain frame number because all frames carry
+ * the same header.
+ */
+ const int marker_len = 4;
+ while (RingQueue_GetLength(&uvd->dp) >= marker_len) {
+ if ((RING_QUEUE_PEEK(&uvd->dp, 0) == 0x00) &&
+ (RING_QUEUE_PEEK(&uvd->dp, 1) == 0xFF) &&
+ (RING_QUEUE_PEEK(&uvd->dp, 2) != 0xFF))
+ {
+ /*
+ * Combine 2 bytes of frame type into one
+ * easy to use value
+ */
+ unsigned long byte3, byte4;
+
+ byte3 = RING_QUEUE_PEEK(&uvd->dp, 2);
+ byte4 = RING_QUEUE_PEEK(&uvd->dp, 3);
+ frame->header = (byte3 << 8) | byte4;
+#if 0
+ info("Header found.");
+#endif
+ RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, marker_len);
+ icam->has_hdr = 1;
+ break;
+ }
+ /* If we are still here then this doesn't look like a header */
+ RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, 1);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ if (!icam->has_hdr) {
+ if (uvd->debug > 2)
+ info("Skipping frame, no header");
+ return scan_EndParse;
+ }
+
+ /* Header found */
+ icam->has_hdr = 1;
+ uvd->stats.header_count++;
+ frame->scanstate = ScanState_Lines;
+ frame->curline = 0;
+
+ if (flags & FLAGS_FORCE_TESTPATTERN) {
+ usbvideo_TestPattern(uvd, 1, 1);
+ return scan_NextFrame;
+ }
+ return scan_Continue;
+}
+
+/*
+ * ibmcam_parse_lines()
+ *
+ * Parse one line (interlaced) from the buffer, put
+ * decoded RGB value into the current frame buffer
+ * and add the written number of bytes (RGB) to
+ * the *pcopylen.
+ *
+ * History:
+ * 21-Jan-2000 Created.
+ * 12-Oct-2000 Reworked to reflect interlaced nature of the data.
+ */
+static enum ParseState ibmcam_parse_lines(
+ struct uvd *uvd,
+ struct usbvideo_frame *frame,
+ long *pcopylen)
+{
+ unsigned char *f;
+ ibmcam_t *icam;
+ unsigned int len, scanLength, scanHeight, order_uv, order_yc;
+ int v4l_linesize; /* V4L line offset */
+ const int hue_corr = (uvd->vpic.hue - 0x8000) >> 10; /* -32..+31 */
+ const int hue2_corr = (hue_correction - 128) / 4; /* -32..+31 */
+ const int ccm = 128; /* Color correction median - see below */
+ int y, u, v, i, frame_done=0, color_corr;
+ static unsigned char lineBuffer[640*3];
+ unsigned const char *chromaLine, *lumaLine;
+
+ assert(uvd != NULL);
+ assert(frame != NULL);
+ icam = IBMCAM_T(uvd);
+ assert(icam != NULL);
+ color_corr = (uvd->vpic.colour - 0x8000) >> 8; /* -128..+127 = -ccm..+(ccm-1)*/
+ RESTRICT_TO_RANGE(color_corr, -ccm, ccm+1);
+
+ v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
+
+ if (IBMCAM_T(uvd)->camera_model == IBMCAM_MODEL_4) {
+ /* Model 4 frame markers do not carry image size identification */
+ switch (uvd->videosize) {
+ case VIDEOSIZE_128x96:
+ case VIDEOSIZE_160x120:
+ case VIDEOSIZE_176x144:
+ scanLength = VIDEOSIZE_X(uvd->videosize);
+ scanHeight = VIDEOSIZE_Y(uvd->videosize);
+ break;
+ default:
+ err("ibmcam_parse_lines: Wrong mode.");
+ return scan_Out;
+ }
+ order_yc = 1; /* order_yc: true=Yc false=cY ('c'=either U or V) */
+ order_uv = 1; /* Always true in this algorithm */
+ } else {
+ switch (frame->header) {
+ case HDRSIG_MODEL1_128x96:
+ scanLength = 128;
+ scanHeight = 96;
+ order_uv = 1; /* U Y V Y ... */
+ break;
+ case HDRSIG_MODEL1_176x144:
+ scanLength = 176;
+ scanHeight = 144;
+ order_uv = 1; /* U Y V Y ... */
+ break;
+ case HDRSIG_MODEL1_352x288:
+ scanLength = 352;
+ scanHeight = 288;
+ order_uv = 0; /* Y V Y V ... */
+ break;
+ default:
+ err("Unknown header signature 00 FF 00 %02lX", frame->header);
+ return scan_NextFrame;
+ }
+ /* order_yc: true=Yc false=cY ('c'=either U or V) */
+ order_yc = (IBMCAM_T(uvd)->camera_model == IBMCAM_MODEL_2);
+ }
+
+ len = scanLength * 3;
+ assert(len <= sizeof(lineBuffer));
+
+ /*
+ * Lines are organized this way:
+ *
+ * I420:
+ * ~~~~
+ * <scanLength->
+ * ___________________________________
+ * |-----Y-----|---UVUVUV...UVUV-----| \
+ * |-----------+---------------------| \
+ * |<-- 176 -->|<------ 176*2 ------>| Total 72. lines (interlaced)
+ * |... ... | ... | /
+ * |<-- 352 -->|<------ 352*2 ------>| Total 144. lines (interlaced)
+ * |___________|_____________________| /
+ * \ \
+ * lumaLine chromaLine
+ */
+
+ /* Make sure there's enough data for the entire line */
+ if (RingQueue_GetLength(&uvd->dp) < len)
+ return scan_Out;
+
+ /* Suck one line out of the ring queue */
+ RingQueue_Dequeue(&uvd->dp, lineBuffer, len);
+
+ /*
+ * Make sure that our writing into output buffer
+ * will not exceed the buffer. Mind that we may write
+ * not into current output scanline but in several after
+ * it as well (if we enlarge image vertically.)
+ */
+ if ((frame->curline + 2) >= VIDEOSIZE_Y(frame->request))
+ return scan_NextFrame;
+
+ /*
+ * Now we are sure that entire line (representing all 'scanLength'
+ * pixels from the camera) is available in the buffer. We
+ * start copying the line left-aligned to the V4L buffer.
+ * If the camera line is shorter then we should pad the V4L
+ * buffer with something (black) to complete the line.
+ */
+ assert(frame->data != NULL);
+ f = frame->data + (v4l_linesize * frame->curline);
+
+ /*
+ * To obtain chrominance data from the 'chromaLine' use this:
+ * v = chromaLine[0]; // 0-1:[0], 2-3:[4], 4-5:[8]...
+ * u = chromaLine[2]; // 0-1:[2], 2-3:[6], 4-5:[10]...
+ *
+ * Indices must be calculated this way:
+ * v_index = (i >> 1) << 2;
+ * u_index = (i >> 1) << 2 + 2;
+ *
+ * where 'i' is the column number [0..VIDEOSIZE_X(frame->request)-1]
+ */
+ lumaLine = lineBuffer;
+ chromaLine = lineBuffer + scanLength;
+ for (i = 0; i < VIDEOSIZE_X(frame->request); i++)
+ {
+ unsigned char rv, gv, bv; /* RGB components */
+
+ /* Check for various visual debugging hints (colorized pixels) */
+ if ((flags & FLAGS_DISPLAY_HINTS) && (icam->has_hdr)) {
+ /*
+ * This is bad and should not happen. This means that
+ * we somehow overshoot the line and encountered new
+ * frame! Obviously our camera/V4L frame size is out
+ * of whack. This cyan dot will help you to figure
+ * out where exactly the new frame arrived.
+ */
+ if (icam->has_hdr == 1) {
+ bv = 0; /* Yellow marker */
+ gv = 0xFF;
+ rv = 0xFF;
+ } else {
+ bv = 0xFF; /* Cyan marker */
+ gv = 0xFF;
+ rv = 0;
+ }
+ icam->has_hdr = 0;
+ goto make_pixel;
+ }
+
+ /*
+ * Check if we are still in range. We may be out of range if our
+ * V4L canvas is wider or taller than the camera "native" image.
+ * Then we quickly fill the remainder of the line with zeros to
+ * make black color and quit the horizontal scanning loop.
+ */
+ if (((frame->curline + 2) >= scanHeight) || (i >= scanLength)) {
+ const int j = i * V4L_BYTES_PER_PIXEL;
+#if USES_IBMCAM_PUTPIXEL
+ /* Refresh 'f' because we don't use it much with PUTPIXEL */
+ f = frame->data + (v4l_linesize * frame->curline) + j;
+#endif
+ memset(f, 0, v4l_linesize - j);
+ break;
+ }
+
+ y = lumaLine[i];
+ if (flags & FLAGS_MONOCHROME) /* Use monochrome for debugging */
+ rv = gv = bv = y;
+ else {
+ int off_0, off_2;
+
+ off_0 = (i >> 1) << 2;
+ off_2 = off_0 + 2;
+
+ if (order_yc) {
+ off_0++;
+ off_2++;
+ }
+ if (!order_uv) {
+ off_0 += 2;
+ off_2 -= 2;
+ }
+ u = chromaLine[off_0] + hue_corr;
+ v = chromaLine[off_2] + hue2_corr;
+
+ /* Apply color correction */
+ if (color_corr != 0) {
+ /* Magnify up to 2 times, reduce down to zero saturation */
+ u = 128 + ((ccm + color_corr) * (u - 128)) / ccm;
+ v = 128 + ((ccm + color_corr) * (v - 128)) / ccm;
+ }
+ YUV_TO_RGB_BY_THE_BOOK(y, u, v, rv, gv, bv);
+ }
+
+ make_pixel:
+ /*
+ * The purpose of creating the pixel here, in one,
+ * dedicated place is that we may need to make the
+ * pixel wider and taller than it actually is. This
+ * may be used if camera generates small frames for
+ * sake of frame rate (or any other reason.)
+ *
+ * The output data consists of B, G, R bytes
+ * (in this order).
+ */
+#if USES_IBMCAM_PUTPIXEL
+ RGB24_PUTPIXEL(frame, i, frame->curline, rv, gv, bv);
+#else
+ *f++ = bv;
+ *f++ = gv;
+ *f++ = rv;
+#endif
+ /*
+ * Typically we do not decide within a legitimate frame
+ * that we want to end the frame. However debugging code
+ * may detect marker of new frame within the data. Then
+ * this condition activates. The 'data' pointer is already
+ * pointing at the new marker, so we'd better leave it as is.
+ */
+ if (frame_done)
+ break; /* End scanning of lines */
+ }
+ /*
+ * Account for number of bytes that we wrote into output V4L frame.
+ * We do it here, after we are done with the scanline, because we
+ * may fill more than one output scanline if we do vertical
+ * enlargement.
+ */
+ frame->curline += 2;
+ if (pcopylen != NULL)
+ *pcopylen += 2 * v4l_linesize;
+ frame->deinterlace = Deinterlace_FillOddLines;
+
+ if (frame_done || (frame->curline >= VIDEOSIZE_Y(frame->request)))
+ return scan_NextFrame;
+ else
+ return scan_Continue;
+}
+
+/*
+ * ibmcam_model2_320x240_parse_lines()
+ *
+ * This procedure deals with a weird RGB format that is produced by IBM
+ * camera model 2 in modes 320x240 and above; 'x' below is 159 or 175,
+ * depending on horizontal size of the picture:
+ *
+ * <--- 160 or 176 pairs of RA,RB bytes ----->
+ * *-----------------------------------------* \
+ * | RA0 | RB0 | RA1 | RB1 | ... | RAx | RBx | \ This is pair of horizontal lines,
+ * |-----+-----+-----+-----+ ... +-----+-----| *- or one interlaced line, total
+ * | B0 | G0 | B1 | G1 | ... | Bx | Gx | / 120 or 144 such pairs which yield
+ * |=====+=====+=====+=====+ ... +=====+=====| / 240 or 288 lines after deinterlacing.
+ *
+ * Each group of FOUR bytes (RAi, RBi, Bi, Gi) where i=0..frame_width/2-1
+ * defines ONE pixel. Therefore this format yields 176x144 "decoded"
+ * resolution at best. I do not know why camera sends such format - the
+ * previous model (1) just used interlaced I420 and everyone was happy.
+ *
+ * I do not know what is the difference between RAi and RBi bytes. Both
+ * seemingly represent R component, but slightly vary in value (so that
+ * the picture looks a bit colored if one or another is used). I use
+ * them both as R component in attempt to at least partially recover the
+ * lost resolution.
+ */
+static enum ParseState ibmcam_model2_320x240_parse_lines(
+ struct uvd *uvd,
+ struct usbvideo_frame *frame,
+ long *pcopylen)
+{
+ unsigned char *f, *la, *lb;
+ unsigned int len;
+ int v4l_linesize; /* V4L line offset */
+ int i, j, frame_done=0, color_corr;
+ int scanLength, scanHeight;
+ static unsigned char lineBuffer[352*2];
+
+ switch (uvd->videosize) {
+ case VIDEOSIZE_320x240:
+ case VIDEOSIZE_352x240:
+ case VIDEOSIZE_352x288:
+ scanLength = VIDEOSIZE_X(uvd->videosize);
+ scanHeight = VIDEOSIZE_Y(uvd->videosize);
+ break;
+ default:
+ err("ibmcam_model2_320x240_parse_lines: Wrong mode.");
+ return scan_Out;
+ }
+
+ color_corr = (uvd->vpic.colour) >> 8; /* 0..+255 */
+ v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
+
+ len = scanLength * 2; /* See explanation above */
+ assert(len <= sizeof(lineBuffer));
+
+ /* Make sure there's enough data for the entire line */
+ if (RingQueue_GetLength(&uvd->dp) < len)
+ return scan_Out;
+
+ /* Suck one line out of the ring queue */
+ RingQueue_Dequeue(&uvd->dp, lineBuffer, len);
+
+ /*
+ * Make sure that our writing into output buffer
+ * will not exceed the buffer. Mind that we may write
+ * not into current output scanline but in several after
+ * it as well (if we enlarge image vertically.)
+ */
+ if ((frame->curline + 2) >= VIDEOSIZE_Y(frame->request))
+ return scan_NextFrame;
+
+ la = lineBuffer;
+ lb = lineBuffer + scanLength;
+
+ /*
+ * Now we are sure that entire line (representing all
+ * VIDEOSIZE_X(frame->request)
+ * pixels from the camera) is available in the scratch buffer. We
+ * start copying the line left-aligned to the V4L buffer (which
+ * might be larger - not smaller, hopefully). If the camera
+ * line is shorter then we should pad the V4L buffer with something
+ * (black in this case) to complete the line.
+ */
+ f = frame->data + (v4l_linesize * frame->curline);
+
+ /* Fill the 2-line strip */
+ for (i = 0; i < VIDEOSIZE_X(frame->request); i++) {
+ int y, rv, gv, bv; /* RGB components */
+
+ j = i & (~1);
+
+ /* Check for various visual debugging hints (colorized pixels) */
+ if ((flags & FLAGS_DISPLAY_HINTS) && (IBMCAM_T(uvd)->has_hdr)) {
+ if (IBMCAM_T(uvd)->has_hdr == 1) {
+ bv = 0; /* Yellow marker */
+ gv = 0xFF;
+ rv = 0xFF;
+ } else {
+ bv = 0xFF; /* Cyan marker */
+ gv = 0xFF;
+ rv = 0;
+ }
+ IBMCAM_T(uvd)->has_hdr = 0;
+ goto make_pixel;
+ }
+
+ /*
+ * Check if we are still in range. We may be out of range if our
+ * V4L canvas is wider or taller than the camera "native" image.
+ * Then we quickly fill the remainder of the line with zeros to
+ * make black color and quit the horizontal scanning loop.
+ */
+ if (((frame->curline + 2) >= scanHeight) || (i >= scanLength)) {
+ const int j = i * V4L_BYTES_PER_PIXEL;
+#if USES_IBMCAM_PUTPIXEL
+ /* Refresh 'f' because we don't use it much with PUTPIXEL */
+ f = frame->data + (v4l_linesize * frame->curline) + j;
+#endif
+ memset(f, 0, v4l_linesize - j);
+ break;
+ }
+
+ /*
+ * Here I use RA and RB components, one per physical pixel.
+ * This causes fine vertical grid on the picture but may improve
+ * horizontal resolution. If you prefer replicating, use this:
+ * rv = la[j + 0]; ... or ... rv = la[j + 1];
+ * then the pixel will be replicated.
+ */
+ rv = la[i];
+ gv = lb[j + 1];
+ bv = lb[j + 0];
+
+ y = (rv + gv + bv) / 3; /* Brightness (badly calculated) */
+
+ if (flags & FLAGS_MONOCHROME) /* Use monochrome for debugging */
+ rv = gv = bv = y;
+ else if (color_corr != 128) {
+
+ /* Calculate difference between color and brightness */
+ rv -= y;
+ gv -= y;
+ bv -= y;
+
+ /* Scale differences */
+ rv = (rv * color_corr) / 128;
+ gv = (gv * color_corr) / 128;
+ bv = (bv * color_corr) / 128;
+
+ /* Reapply brightness */
+ rv += y;
+ gv += y;
+ bv += y;
+
+ /* Watch for overflows */
+ RESTRICT_TO_RANGE(rv, 0, 255);
+ RESTRICT_TO_RANGE(gv, 0, 255);
+ RESTRICT_TO_RANGE(bv, 0, 255);
+ }
+
+ make_pixel:
+ RGB24_PUTPIXEL(frame, i, frame->curline, rv, gv, bv);
+ }
+ /*
+ * Account for number of bytes that we wrote into output V4L frame.
+ * We do it here, after we are done with the scanline, because we
+ * may fill more than one output scanline if we do vertical
+ * enlargement.
+ */
+ frame->curline += 2;
+ *pcopylen += v4l_linesize * 2;
+ frame->deinterlace = Deinterlace_FillOddLines;
+
+ if (frame_done || (frame->curline >= VIDEOSIZE_Y(frame->request)))
+ return scan_NextFrame;
+ else
+ return scan_Continue;
+}
+
+static enum ParseState ibmcam_model3_parse_lines(
+ struct uvd *uvd,
+ struct usbvideo_frame *frame,
+ long *pcopylen)
+{
+ unsigned char *data;
+ const unsigned char *color;
+ unsigned int len;
+ int v4l_linesize; /* V4L line offset */
+ const int hue_corr = (uvd->vpic.hue - 0x8000) >> 10; /* -32..+31 */
+ const int hue2_corr = (hue_correction - 128) / 4; /* -32..+31 */
+ const int ccm = 128; /* Color correction median - see below */
+ int i, u, v, rw, data_w=0, data_h=0, color_corr;
+ static unsigned char lineBuffer[640*3];
+
+ color_corr = (uvd->vpic.colour - 0x8000) >> 8; /* -128..+127 = -ccm..+(ccm-1)*/
+ RESTRICT_TO_RANGE(color_corr, -ccm, ccm+1);
+
+ v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
+
+ /* The header tells us what sort of data is in this frame */
+ switch (frame->header) {
+ /*
+ * Uncompressed modes (that are easy to decode).
+ */
+ case 0x0308:
+ data_w = 640;
+ data_h = 480;
+ break;
+ case 0x0208:
+ data_w = 320;
+ data_h = 240;
+ break;
+ case 0x020A:
+ data_w = 160;
+ data_h = 120;
+ break;
+ /*
+ * Compressed modes (ViCE - that I don't know how to decode).
+ */
+ case 0x0328: /* 640x480, best quality compression */
+ case 0x0368: /* 640x480, best frame rate compression */
+ case 0x0228: /* 320x240, best quality compression */
+ case 0x0268: /* 320x240, best frame rate compression */
+ case 0x02CA: /* 160x120, best quality compression */
+ case 0x02EA: /* 160x120, best frame rate compression */
+ /* Do nothing with this - not supported */
+ err("Unsupported mode $%04lx", frame->header);
+ return scan_NextFrame;
+ default:
+ /* Catch unknown headers, may help in learning new headers */
+ err("Strange frame->header=$%08lx", frame->header);
+ return scan_NextFrame;
+ }
+
+ /*
+ * Make sure that our writing into output buffer
+ * will not exceed the buffer. Note that we may write
+ * not into current output scanline but in several after
+ * it as well (if we enlarge image vertically.)
+ */
+ if ((frame->curline + 1) >= data_h) {
+ if (uvd->debug >= 3)
+ info("Reached line %d. (frame is done)", frame->curline);
+ return scan_NextFrame;
+ }
+
+ /* Make sure there's enough data for the entire line */
+ len = 3 * data_w; /* <y-data> <uv-data> */
+ assert(len <= sizeof(lineBuffer));
+
+ /* Make sure there's enough data for the entire line */
+ if (RingQueue_GetLength(&uvd->dp) < len)
+ return scan_Out;
+
+ /* Suck one line out of the ring queue */
+ RingQueue_Dequeue(&uvd->dp, lineBuffer, len);
+
+ data = lineBuffer;
+ color = data + data_w; /* Point to where color planes begin */
+
+ /* Bottom-to-top scanning */
+ rw = (int)VIDEOSIZE_Y(frame->request) - (int)(frame->curline) - 1;
+ RESTRICT_TO_RANGE(rw, 0, VIDEOSIZE_Y(frame->request)-1);
+
+ for (i = 0; i < VIDEOSIZE_X(frame->request); i++) {
+ int y, rv, gv, bv; /* RGB components */
+
+ if (i < data_w) {
+ y = data[i]; /* Luminosity is the first line */
+
+ /* Apply static color correction */
+ u = color[i*2] + hue_corr;
+ v = color[i*2 + 1] + hue2_corr;
+
+ /* Apply color correction */
+ if (color_corr != 0) {
+ /* Magnify up to 2 times, reduce down to zero saturation */
+ u = 128 + ((ccm + color_corr) * (u - 128)) / ccm;
+ v = 128 + ((ccm + color_corr) * (v - 128)) / ccm;
+ }
+ } else
+ y = 0, u = v = 128;
+
+ YUV_TO_RGB_BY_THE_BOOK(y, u, v, rv, gv, bv);
+ RGB24_PUTPIXEL(frame, i, rw, rv, gv, bv); /* Done by deinterlacing now */
+ }
+ frame->deinterlace = Deinterlace_FillEvenLines;
+
+ /*
+ * Account for number of bytes that we wrote into output V4L frame.
+ * We do it here, after we are done with the scanline, because we
+ * may fill more than one output scanline if we do vertical
+ * enlargement.
+ */
+ frame->curline += 2;
+ *pcopylen += 2 * v4l_linesize;
+
+ if (frame->curline >= VIDEOSIZE_Y(frame->request)) {
+ if (uvd->debug >= 3) {
+ info("All requested lines (%ld.) done.",
+ VIDEOSIZE_Y(frame->request));
+ }
+ return scan_NextFrame;
+ } else
+ return scan_Continue;
+}
+
+/*
+ * ibmcam_model4_128x96_parse_lines()
+ *
+ * This decoder is for one strange data format that is produced by Model 4
+ * camera only in 128x96 mode. This is RGB format and here is its description.
+ * First of all, this is non-interlaced stream, meaning that all scan lines
+ * are present in the datastream. There are 96 consecutive blocks of data
+ * that describe all 96 lines of the image. Each block is 5*128 bytes long
+ * and carries R, G, B components. The format of the block is shown in the
+ * code below. First 128*2 bytes are interleaved R and G components. Then
+ * we have a gap (junk data) 64 bytes long. Then follow B and something
+ * else, also interleaved (this makes another 128*2 bytes). After that
+ * probably another 64 bytes of junk follow.
+ *
+ * History:
+ * 10-Feb-2001 Created.
+ */
+static enum ParseState ibmcam_model4_128x96_parse_lines(
+ struct uvd *uvd,
+ struct usbvideo_frame *frame,
+ long *pcopylen)
+{
+ const unsigned char *data_rv, *data_gv, *data_bv;
+ unsigned int len;
+ int i, v4l_linesize; /* V4L line offset */
+ const int data_w=128, data_h=96;
+ static unsigned char lineBuffer[128*5];
+
+ v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
+
+ /*
+ * Make sure that our writing into output buffer
+ * will not exceed the buffer. Note that we may write
+ * not into current output scanline but in several after
+ * it as well (if we enlarge image vertically.)
+ */
+ if ((frame->curline + 1) >= data_h) {
+ if (uvd->debug >= 3)
+ info("Reached line %d. (frame is done)", frame->curline);
+ return scan_NextFrame;
+ }
+
+ /*
+ * RGRGRG .... RGRG_____________B?B?B? ... B?B?____________
+ * <---- 128*2 ---><---- 64 ---><--- 128*2 ---><--- 64 --->
+ */
+
+ /* Make sure there's enough data for the entire line */
+ len = 5 * data_w;
+ assert(len <= sizeof(lineBuffer));
+
+ /* Make sure there's enough data for the entire line */
+ if (RingQueue_GetLength(&uvd->dp) < len)
+ return scan_Out;
+
+ /* Suck one line out of the ring queue */
+ RingQueue_Dequeue(&uvd->dp, lineBuffer, len);
+
+ data_rv = lineBuffer;
+ data_gv = lineBuffer + 1;
+ data_bv = lineBuffer + data_w*2 + data_w/2;
+ for (i = 0; i < VIDEOSIZE_X(frame->request); i++) {
+ int rv, gv, bv; /* RGB components */
+ if (i < data_w) {
+ const int j = i * 2;
+ gv = data_rv[j];
+ rv = data_gv[j];
+ bv = data_bv[j];
+ if (flags & FLAGS_MONOCHROME) {
+ unsigned long y;
+ y = rv + gv + bv;
+ y /= 3;
+ if (y > 0xFF)
+ y = 0xFF;
+ rv = gv = bv = (unsigned char) y;
+ }
+ } else {
+ rv = gv = bv = 0;
+ }
+ RGB24_PUTPIXEL(frame, i, frame->curline, rv, gv, bv);
+ }
+ frame->deinterlace = Deinterlace_None;
+ frame->curline++;
+ *pcopylen += v4l_linesize;
+
+ if (frame->curline >= VIDEOSIZE_Y(frame->request)) {
+ if (uvd->debug >= 3) {
+ info("All requested lines (%ld.) done.",
+ VIDEOSIZE_Y(frame->request));
+ }
+ return scan_NextFrame;
+ } else
+ return scan_Continue;
+}
+
+/*
+ * ibmcam_ProcessIsocData()
+ *
+ * Generic routine to parse the ring queue data. It employs either
+ * ibmcam_find_header() or ibmcam_parse_lines() to do most
+ * of work.
+ *
+ * History:
+ * 1/21/00 Created.
+ */
+static void ibmcam_ProcessIsocData(struct uvd *uvd,
+ struct usbvideo_frame *frame)
+{
+ enum ParseState newstate;
+ long copylen = 0;
+ int mod = IBMCAM_T(uvd)->camera_model;
+
+ while (1) {
+ newstate = scan_Out;
+ if (RingQueue_GetLength(&uvd->dp) > 0) {
+ if (frame->scanstate == ScanState_Scanning) {
+ newstate = ibmcam_find_header(uvd);
+ } else if (frame->scanstate == ScanState_Lines) {
+ if ((mod == IBMCAM_MODEL_2) &&
+ ((uvd->videosize == VIDEOSIZE_352x288) ||
+ (uvd->videosize == VIDEOSIZE_320x240) ||
+ (uvd->videosize == VIDEOSIZE_352x240)))
+ {
+ newstate = ibmcam_model2_320x240_parse_lines(
+ uvd, frame, &copylen);
+ } else if (mod == IBMCAM_MODEL_4) {
+ /*
+ * Model 4 cameras (IBM NetCamera) use Model 2 decoder (RGB)
+ * for 320x240 and above; 160x120 and 176x144 uses Model 1
+ * decoder (YUV), and 128x96 mode uses ???
+ */
+ if ((uvd->videosize == VIDEOSIZE_352x288) ||
+ (uvd->videosize == VIDEOSIZE_320x240) ||
+ (uvd->videosize == VIDEOSIZE_352x240))
+ {
+ newstate = ibmcam_model2_320x240_parse_lines(uvd, frame, &copylen);
+ } else if (uvd->videosize == VIDEOSIZE_128x96) {
+ newstate = ibmcam_model4_128x96_parse_lines(uvd, frame, &copylen);
+ } else {
+ newstate = ibmcam_parse_lines(uvd, frame, &copylen);
+ }
+ } else if (mod == IBMCAM_MODEL_3) {
+ newstate = ibmcam_model3_parse_lines(uvd, frame, &copylen);
+ } else {
+ newstate = ibmcam_parse_lines(uvd, frame, &copylen);
+ }
+ }
+ }
+ if (newstate == scan_Continue)
+ continue;
+ else if ((newstate == scan_NextFrame) || (newstate == scan_Out))
+ break;
+ else
+ return; /* scan_EndParse */
+ }
+
+ if (newstate == scan_NextFrame) {
+ frame->frameState = FrameState_Done;
+ uvd->curframe = -1;
+ uvd->stats.frame_num++;
+ if ((mod == IBMCAM_MODEL_2) || (mod == IBMCAM_MODEL_4)) {
+ /* Need software contrast adjustment for those cameras */
+ frame->flags |= USBVIDEO_FRAME_FLAG_SOFTWARE_CONTRAST;
+ }
+ }
+
+ /* Update the frame's uncompressed length. */
+ frame->seqRead_Length += copylen;
+
+#if 0
+ {
+ static unsigned char j=0;
+ memset(frame->data, j++, uvd->max_frame_size);
+ frame->frameState = FrameState_Ready;
+ }
+#endif
+}
+
+/*
+ * ibmcam_veio()
+ *
+ * History:
+ * 1/27/00 Added check for dev == NULL; this happens if camera is unplugged.
+ */
+static int ibmcam_veio(
+ struct uvd *uvd,
+ unsigned char req,
+ unsigned short value,
+ unsigned short index)
+{
+ static const char proc[] = "ibmcam_veio";
+ unsigned char cp[8] /* = { 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef } */;
+ int i;
+
+ if (!CAMERA_IS_OPERATIONAL(uvd))
+ return 0;
+
+ if (req == 1) {
+ i = usb_control_msg(
+ uvd->dev,
+ usb_rcvctrlpipe(uvd->dev, 0),
+ req,
+ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT,
+ value,
+ index,
+ cp,
+ sizeof(cp),
+ 1000);
+#if 0
+ info("USB => %02x%02x%02x%02x%02x%02x%02x%02x "
+ "(req=$%02x val=$%04x ind=$%04x)",
+ cp[0],cp[1],cp[2],cp[3],cp[4],cp[5],cp[6],cp[7],
+ req, value, index);
+#endif
+ } else {
+ i = usb_control_msg(
+ uvd->dev,
+ usb_sndctrlpipe(uvd->dev, 0),
+ req,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT,
+ value,
+ index,
+ NULL,
+ 0,
+ 1000);
+ }
+ if (i < 0) {
+ err("%s: ERROR=%d. Camera stopped; Reconnect or reload driver.",
+ proc, i);
+ uvd->last_error = i;
+ }
+ return i;
+}
+
+/*
+ * ibmcam_calculate_fps()
+ *
+ * This procedure roughly calculates the real frame rate based
+ * on FPS code (framerate=NNN option). Actual FPS differs
+ * slightly depending on lighting conditions, so that actual frame
+ * rate is determined by the camera. Since I don't know how to ask
+ * the camera what FPS is now I have to use the FPS code instead.
+ *
+ * The FPS code is in range [0..6], 0 is slowest, 6 is fastest.
+ * Corresponding real FPS should be in range [3..30] frames per second.
+ * The conversion formula is obvious:
+ *
+ * real_fps = 3 + (fps_code * 4.5)
+ *
+ * History:
+ * 1/18/00 Created.
+ */
+static int ibmcam_calculate_fps(struct uvd *uvd)
+{
+ return 3 + framerate*4 + framerate/2;
+}
+
+/*
+ * ibmcam_send_FF_04_02()
+ *
+ * This procedure sends magic 3-command prefix to the camera.
+ * The purpose of this prefix is not known.
+ *
+ * History:
+ * 1/2/00 Created.
+ */
+static void ibmcam_send_FF_04_02(struct uvd *uvd)
+{
+ ibmcam_veio(uvd, 0, 0x00FF, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0004, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0002, 0x0124);
+}
+
+static void ibmcam_send_00_04_06(struct uvd *uvd)
+{
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0004, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0006, 0x0124);
+}
+
+static void ibmcam_send_x_00(struct uvd *uvd, unsigned short x)
+{
+ ibmcam_veio(uvd, 0, x, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0124);
+}
+
+static void ibmcam_send_x_00_05(struct uvd *uvd, unsigned short x)
+{
+ ibmcam_send_x_00(uvd, x);
+ ibmcam_veio(uvd, 0, 0x0005, 0x0124);
+}
+
+static void ibmcam_send_x_00_05_02(struct uvd *uvd, unsigned short x)
+{
+ ibmcam_veio(uvd, 0, x, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0005, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0002, 0x0124);
+}
+
+static void ibmcam_send_x_01_00_05(struct uvd *uvd, unsigned short x)
+{
+ ibmcam_veio(uvd, 0, x, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0005, 0x0124);
+}
+
+static void ibmcam_send_x_00_05_02_01(struct uvd *uvd, unsigned short x)
+{
+ ibmcam_veio(uvd, 0, x, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0005, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0002, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0124);
+}
+
+static void ibmcam_send_x_00_05_02_08_01(struct uvd *uvd, unsigned short x)
+{
+ ibmcam_veio(uvd, 0, x, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0005, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0002, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0008, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0124);
+}
+
+static void ibmcam_Packet_Format1(struct uvd *uvd, unsigned char fkey, unsigned char val)
+{
+ ibmcam_send_x_01_00_05(uvd, unknown_88);
+ ibmcam_send_x_00_05(uvd, fkey);
+ ibmcam_send_x_00_05_02_08_01(uvd, val);
+ ibmcam_send_x_00_05(uvd, unknown_88);
+ ibmcam_send_x_00_05_02_01(uvd, fkey);
+ ibmcam_send_x_00_05(uvd, unknown_89);
+ ibmcam_send_x_00(uvd, fkey);
+ ibmcam_send_00_04_06(uvd);
+ ibmcam_veio(uvd, 1, 0x0000, 0x0126);
+ ibmcam_send_FF_04_02(uvd);
+}
+
+static void ibmcam_PacketFormat2(struct uvd *uvd, unsigned char fkey, unsigned char val)
+{
+ ibmcam_send_x_01_00_05 (uvd, unknown_88);
+ ibmcam_send_x_00_05 (uvd, fkey);
+ ibmcam_send_x_00_05_02 (uvd, val);
+}
+
+static void ibmcam_model2_Packet2(struct uvd *uvd)
+{
+ ibmcam_veio(uvd, 0, 0x00ff, 0x012d);
+ ibmcam_veio(uvd, 0, 0xfea3, 0x0124);
+}
+
+static void ibmcam_model2_Packet1(struct uvd *uvd, unsigned short v1, unsigned short v2)
+{
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x00ff, 0x012e);
+ ibmcam_veio(uvd, 0, v1, 0x012f);
+ ibmcam_veio(uvd, 0, 0x00ff, 0x0130);
+ ibmcam_veio(uvd, 0, 0xc719, 0x0124);
+ ibmcam_veio(uvd, 0, v2, 0x0127);
+
+ ibmcam_model2_Packet2(uvd);
+}
+
+/*
+ * ibmcam_model3_Packet1()
+ *
+ * 00_0078_012d
+ * 00_0097_012f
+ * 00_d141_0124
+ * 00_0096_0127
+ * 00_fea8_0124
+*/
+static void ibmcam_model3_Packet1(struct uvd *uvd, unsigned short v1, unsigned short v2)
+{
+ ibmcam_veio(uvd, 0, 0x0078, 0x012d);
+ ibmcam_veio(uvd, 0, v1, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, v2, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+}
+
+static void ibmcam_model4_BrightnessPacket(struct uvd *uvd, int i)
+{
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0026, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, i, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0004, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+}
+
+/*
+ * ibmcam_adjust_contrast()
+ *
+ * The contrast value changes from 0 (high contrast) to 15 (low contrast).
+ * This is in reverse to usual order of things (such as TV controls), so
+ * we reverse it again here.
+ *
+ * TODO: we probably don't need to send the setup 5 times...
+ *
+ * History:
+ * 1/2/00 Created.
+ */
+static void ibmcam_adjust_contrast(struct uvd *uvd)
+{
+ unsigned char a_contrast = uvd->vpic.contrast >> 12;
+ unsigned char new_contrast;
+
+ if (a_contrast >= 16)
+ a_contrast = 15;
+ new_contrast = 15 - a_contrast;
+ if (new_contrast == uvd->vpic_old.contrast)
+ return;
+ uvd->vpic_old.contrast = new_contrast;
+ switch (IBMCAM_T(uvd)->camera_model) {
+ case IBMCAM_MODEL_1:
+ {
+ const int ntries = 5;
+ int i;
+ for (i=0; i < ntries; i++) {
+ ibmcam_Packet_Format1(uvd, contrast_14, new_contrast);
+ ibmcam_send_FF_04_02(uvd);
+ }
+ break;
+ }
+ case IBMCAM_MODEL_2:
+ case IBMCAM_MODEL_4:
+ /* Models 2, 4 do not have this control; implemented in software. */
+ break;
+ case IBMCAM_MODEL_3:
+ { /* Preset hardware values */
+ static const struct {
+ unsigned short cv1;
+ unsigned short cv2;
+ unsigned short cv3;
+ } cv[7] = {
+ { 0x05, 0x05, 0x0f }, /* Minimum */
+ { 0x04, 0x04, 0x16 },
+ { 0x02, 0x03, 0x16 },
+ { 0x02, 0x08, 0x16 },
+ { 0x01, 0x0c, 0x16 },
+ { 0x01, 0x0e, 0x16 },
+ { 0x01, 0x10, 0x16 } /* Maximum */
+ };
+ int i = a_contrast / 2;
+ RESTRICT_TO_RANGE(i, 0, 6);
+ ibmcam_veio(uvd, 0, 0x0000, 0x010c); /* Stop */
+ ibmcam_model3_Packet1(uvd, 0x0067, cv[i].cv1);
+ ibmcam_model3_Packet1(uvd, 0x005b, cv[i].cv2);
+ ibmcam_model3_Packet1(uvd, 0x005c, cv[i].cv3);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0114);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c); /* Go! */
+ usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp));
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+/*
+ * ibmcam_change_lighting_conditions()
+ *
+ * Camera model 1:
+ * We have 3 levels of lighting conditions: 0=Bright, 1=Medium, 2=Low.
+ *
+ * Camera model 2:
+ * We have 16 levels of lighting, 0 for bright light and up to 15 for
+ * low light. But values above 5 or so are useless because camera is
+ * not really capable to produce anything worth viewing at such light.
+ * This setting may be altered only in certain camera state.
+ *
+ * Low lighting forces slower FPS. Lighting is set as a module parameter.
+ *
+ * History:
+ * 1/5/00 Created.
+ * 2/20/00 Added support for Model 2 cameras.
+ */
+static void ibmcam_change_lighting_conditions(struct uvd *uvd)
+{
+ static const char proc[] = "ibmcam_change_lighting_conditions";
+
+ if (debug > 0)
+ info("%s: Set lighting to %hu.", proc, lighting);
+
+ switch (IBMCAM_T(uvd)->camera_model) {
+ case IBMCAM_MODEL_1:
+ {
+ const int ntries = 5;
+ int i;
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, light_27, (unsigned short) lighting);
+ break;
+ }
+ case IBMCAM_MODEL_2:
+#if 0
+ /*
+ * This command apparently requires camera to be stopped. My
+ * experiments showed that it -is- possible to alter the lighting
+ * conditions setting "on the fly", but why bother? This setting does
+ * not work reliably in all cases, so I decided simply to leave the
+ * setting where Xirlink put it - in the camera setup phase. This code
+ * is commented out because it does not work at -any- moment, so its
+ * presence makes no sense. You may use it for experiments.
+ */
+ ibmcam_veio(uvd, 0, 0x0000, 0x010c); /* Stop camera */
+ ibmcam_model2_Packet1(uvd, mod2_sensitivity, lighting);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c); /* Start camera */
+#endif
+ break;
+ case IBMCAM_MODEL_3:
+ case IBMCAM_MODEL_4:
+ default:
+ break;
+ }
+}
+
+/*
+ * ibmcam_set_sharpness()
+ *
+ * Cameras model 1 have internal smoothing feature. It is controlled by value in
+ * range [0..6], where 0 is most smooth and 6 is most sharp (raw image, I guess).
+ * Recommended value is 4. Cameras model 2 do not have this feature at all.
+ */
+static void ibmcam_set_sharpness(struct uvd *uvd)
+{
+ static const char proc[] = "ibmcam_set_sharpness";
+
+ switch (IBMCAM_T(uvd)->camera_model) {
+ case IBMCAM_MODEL_1:
+ {
+ static const unsigned short sa[] = { 0x11, 0x13, 0x16, 0x18, 0x1a, 0x8, 0x0a };
+ unsigned short i, sv;
+
+ RESTRICT_TO_RANGE(sharpness, SHARPNESS_MIN, SHARPNESS_MAX);
+ if (debug > 0)
+ info("%s: Set sharpness to %hu.", proc, sharpness);
+
+ sv = sa[sharpness - SHARPNESS_MIN];
+ for (i=0; i < 2; i++) {
+ ibmcam_send_x_01_00_05 (uvd, unknown_88);
+ ibmcam_send_x_00_05 (uvd, sharp_13);
+ ibmcam_send_x_00_05_02 (uvd, sv);
+ }
+ break;
+ }
+ case IBMCAM_MODEL_2:
+ case IBMCAM_MODEL_4:
+ /* Models 2, 4 do not have this control */
+ break;
+ case IBMCAM_MODEL_3:
+ { /*
+ * "Use a table of magic numbers.
+ * This setting doesn't really change much.
+ * But that's how Windows does it."
+ */
+ static const struct {
+ unsigned short sv1;
+ unsigned short sv2;
+ unsigned short sv3;
+ unsigned short sv4;
+ } sv[7] = {
+ { 0x00, 0x00, 0x05, 0x14 }, /* Smoothest */
+ { 0x01, 0x04, 0x05, 0x14 },
+ { 0x02, 0x04, 0x05, 0x14 },
+ { 0x03, 0x04, 0x05, 0x14 },
+ { 0x03, 0x05, 0x05, 0x14 },
+ { 0x03, 0x06, 0x05, 0x14 },
+ { 0x03, 0x07, 0x05, 0x14 } /* Sharpest */
+ };
+ RESTRICT_TO_RANGE(sharpness, SHARPNESS_MIN, SHARPNESS_MAX);
+ RESTRICT_TO_RANGE(sharpness, 0, 6);
+ ibmcam_veio(uvd, 0, 0x0000, 0x010c); /* Stop */
+ ibmcam_model3_Packet1(uvd, 0x0060, sv[sharpness].sv1);
+ ibmcam_model3_Packet1(uvd, 0x0061, sv[sharpness].sv2);
+ ibmcam_model3_Packet1(uvd, 0x0062, sv[sharpness].sv3);
+ ibmcam_model3_Packet1(uvd, 0x0063, sv[sharpness].sv4);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0114);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c); /* Go! */
+ usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp));
+ ibmcam_veio(uvd, 0, 0x0001, 0x0113);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+/*
+ * ibmcam_set_brightness()
+ *
+ * This procedure changes brightness of the picture.
+ */
+static void ibmcam_set_brightness(struct uvd *uvd)
+{
+ static const char proc[] = "ibmcam_set_brightness";
+ static const unsigned short n = 1;
+
+ if (debug > 0)
+ info("%s: Set brightness to %hu.", proc, uvd->vpic.brightness);
+
+ switch (IBMCAM_T(uvd)->camera_model) {
+ case IBMCAM_MODEL_1:
+ {
+ unsigned short i, j, bv[3];
+ bv[0] = bv[1] = bv[2] = uvd->vpic.brightness >> 10;
+ if (bv[0] == (uvd->vpic_old.brightness >> 10))
+ return;
+ uvd->vpic_old.brightness = bv[0];
+ for (j=0; j < 3; j++)
+ for (i=0; i < n; i++)
+ ibmcam_Packet_Format1(uvd, bright_3x[j], bv[j]);
+ break;
+ }
+ case IBMCAM_MODEL_2:
+ {
+ unsigned short i, j;
+ i = uvd->vpic.brightness >> 12; /* 0 .. 15 */
+ j = 0x60 + i * ((0xee - 0x60) / 16); /* 0x60 .. 0xee or so */
+ if (uvd->vpic_old.brightness == j)
+ break;
+ uvd->vpic_old.brightness = j;
+ ibmcam_model2_Packet1(uvd, mod2_brightness, j);
+ break;
+ }
+ case IBMCAM_MODEL_3:
+ {
+ /* Model 3: Brightness range 'i' in [0x0C..0x3F] */
+ unsigned short i =
+ 0x0C + (uvd->vpic.brightness / (0xFFFF / (0x3F - 0x0C + 1)));
+ RESTRICT_TO_RANGE(i, 0x0C, 0x3F);
+ if (uvd->vpic_old.brightness == i)
+ break;
+ uvd->vpic_old.brightness = i;
+ ibmcam_veio(uvd, 0, 0x0000, 0x010c); /* Stop */
+ ibmcam_model3_Packet1(uvd, 0x0036, i);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0114);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c); /* Go! */
+ usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp));
+ ibmcam_veio(uvd, 0, 0x0001, 0x0113);
+ break;
+ }
+ case IBMCAM_MODEL_4:
+ {
+ /* Model 4: Brightness range 'i' in [0x04..0xb4] */
+ unsigned short i = 0x04 + (uvd->vpic.brightness / (0xFFFF / (0xb4 - 0x04 + 1)));
+ RESTRICT_TO_RANGE(i, 0x04, 0xb4);
+ if (uvd->vpic_old.brightness == i)
+ break;
+ uvd->vpic_old.brightness = i;
+ ibmcam_model4_BrightnessPacket(uvd, i);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+static void ibmcam_set_hue(struct uvd *uvd)
+{
+ switch (IBMCAM_T(uvd)->camera_model) {
+ case IBMCAM_MODEL_2:
+ {
+ unsigned short hue = uvd->vpic.hue >> 9; /* 0 .. 7F */
+ if (uvd->vpic_old.hue == hue)
+ return;
+ uvd->vpic_old.hue = hue;
+ ibmcam_model2_Packet1(uvd, mod2_hue, hue);
+ /* ibmcam_model2_Packet1(uvd, mod2_saturation, sat); */
+ break;
+ }
+ case IBMCAM_MODEL_3:
+ {
+#if 0 /* This seems not to work. No problem, will fix programmatically */
+ unsigned short hue = 0x05 + (uvd->vpic.hue / (0xFFFF / (0x37 - 0x05 + 1)));
+ RESTRICT_TO_RANGE(hue, 0x05, 0x37);
+ if (uvd->vpic_old.hue == hue)
+ return;
+ uvd->vpic_old.hue = hue;
+ ibmcam_veio(uvd, 0, 0x0000, 0x010c); /* Stop */
+ ibmcam_model3_Packet1(uvd, 0x007e, hue);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0114);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c); /* Go! */
+ usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp));
+ ibmcam_veio(uvd, 0, 0x0001, 0x0113);
+#endif
+ break;
+ }
+ case IBMCAM_MODEL_4:
+ {
+ unsigned short r_gain, g_gain, b_gain, hue;
+
+ /*
+ * I am not sure r/g/b_gain variables exactly control gain
+ * of those channels. Most likely they subtly change some
+ * very internal image processing settings in the camera.
+ * In any case, here is what they do, and feel free to tweak:
+ *
+ * r_gain: seriously affects red gain
+ * g_gain: seriously affects green gain
+ * b_gain: seriously affects blue gain
+ * hue: changes average color from violet (0) to red (0xFF)
+ *
+ * These settings are preset for a decent white balance in
+ * 320x240, 352x288 modes. Low-res modes exhibit higher contrast
+ * and therefore may need different values here.
+ */
+ hue = 20 + (uvd->vpic.hue >> 9);
+ switch (uvd->videosize) {
+ case VIDEOSIZE_128x96:
+ r_gain = 90;
+ g_gain = 166;
+ b_gain = 175;
+ break;
+ case VIDEOSIZE_160x120:
+ r_gain = 70;
+ g_gain = 166;
+ b_gain = 185;
+ break;
+ case VIDEOSIZE_176x144:
+ r_gain = 160;
+ g_gain = 175;
+ b_gain = 185;
+ break;
+ default:
+ r_gain = 120;
+ g_gain = 166;
+ b_gain = 175;
+ break;
+ }
+ RESTRICT_TO_RANGE(hue, 1, 0x7f);
+
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x001e, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, g_gain, 0x0127); /* Green gain */
+ ibmcam_veio(uvd, 0, r_gain, 0x012e); /* Red gain */
+ ibmcam_veio(uvd, 0, b_gain, 0x0130); /* Blue gain */
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, hue, 0x012d); /* Hue */
+ ibmcam_veio(uvd, 0, 0xf545, 0x0124);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+/*
+ * ibmcam_adjust_picture()
+ *
+ * This procedure gets called from V4L interface to update picture settings.
+ * Here we change brightness and contrast.
+ */
+static void ibmcam_adjust_picture(struct uvd *uvd)
+{
+ ibmcam_adjust_contrast(uvd);
+ ibmcam_set_brightness(uvd);
+ ibmcam_set_hue(uvd);
+}
+
+static int ibmcam_model1_setup(struct uvd *uvd)
+{
+ const int ntries = 5;
+ int i;
+
+ ibmcam_veio(uvd, 1, 0x00, 0x0128);
+ ibmcam_veio(uvd, 1, 0x00, 0x0100);
+ ibmcam_veio(uvd, 0, 0x01, 0x0100); /* LED On */
+ ibmcam_veio(uvd, 1, 0x00, 0x0100);
+ ibmcam_veio(uvd, 0, 0x81, 0x0100); /* LED Off */
+ ibmcam_veio(uvd, 1, 0x00, 0x0100);
+ ibmcam_veio(uvd, 0, 0x01, 0x0100); /* LED On */
+ ibmcam_veio(uvd, 0, 0x01, 0x0108);
+
+ ibmcam_veio(uvd, 0, 0x03, 0x0112);
+ ibmcam_veio(uvd, 1, 0x00, 0x0115);
+ ibmcam_veio(uvd, 0, 0x06, 0x0115);
+ ibmcam_veio(uvd, 1, 0x00, 0x0116);
+ ibmcam_veio(uvd, 0, 0x44, 0x0116);
+ ibmcam_veio(uvd, 1, 0x00, 0x0116);
+ ibmcam_veio(uvd, 0, 0x40, 0x0116);
+ ibmcam_veio(uvd, 1, 0x00, 0x0115);
+ ibmcam_veio(uvd, 0, 0x0e, 0x0115);
+ ibmcam_veio(uvd, 0, 0x19, 0x012c);
+
+ ibmcam_Packet_Format1(uvd, 0x00, 0x1e);
+ ibmcam_Packet_Format1(uvd, 0x39, 0x0d);
+ ibmcam_Packet_Format1(uvd, 0x39, 0x09);
+ ibmcam_Packet_Format1(uvd, 0x3b, 0x00);
+ ibmcam_Packet_Format1(uvd, 0x28, 0x22);
+ ibmcam_Packet_Format1(uvd, light_27, 0);
+ ibmcam_Packet_Format1(uvd, 0x2b, 0x1f);
+ ibmcam_Packet_Format1(uvd, 0x39, 0x08);
+
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x2c, 0x00);
+
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x30, 0x14);
+
+ ibmcam_PacketFormat2(uvd, 0x39, 0x02);
+ ibmcam_PacketFormat2(uvd, 0x01, 0xe1);
+ ibmcam_PacketFormat2(uvd, 0x02, 0xcd);
+ ibmcam_PacketFormat2(uvd, 0x03, 0xcd);
+ ibmcam_PacketFormat2(uvd, 0x04, 0xfa);
+ ibmcam_PacketFormat2(uvd, 0x3f, 0xff);
+ ibmcam_PacketFormat2(uvd, 0x39, 0x00);
+
+ ibmcam_PacketFormat2(uvd, 0x39, 0x02);
+ ibmcam_PacketFormat2(uvd, 0x0a, 0x37);
+ ibmcam_PacketFormat2(uvd, 0x0b, 0xb8);
+ ibmcam_PacketFormat2(uvd, 0x0c, 0xf3);
+ ibmcam_PacketFormat2(uvd, 0x0d, 0xe3);
+ ibmcam_PacketFormat2(uvd, 0x0e, 0x0d);
+ ibmcam_PacketFormat2(uvd, 0x0f, 0xf2);
+ ibmcam_PacketFormat2(uvd, 0x10, 0xd5);
+ ibmcam_PacketFormat2(uvd, 0x11, 0xba);
+ ibmcam_PacketFormat2(uvd, 0x12, 0x53);
+ ibmcam_PacketFormat2(uvd, 0x3f, 0xff);
+ ibmcam_PacketFormat2(uvd, 0x39, 0x00);
+
+ ibmcam_PacketFormat2(uvd, 0x39, 0x02);
+ ibmcam_PacketFormat2(uvd, 0x16, 0x00);
+ ibmcam_PacketFormat2(uvd, 0x17, 0x28);
+ ibmcam_PacketFormat2(uvd, 0x18, 0x7d);
+ ibmcam_PacketFormat2(uvd, 0x19, 0xbe);
+ ibmcam_PacketFormat2(uvd, 0x3f, 0xff);
+ ibmcam_PacketFormat2(uvd, 0x39, 0x00);
+
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x00, 0x18);
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x13, 0x18);
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x14, 0x06);
+
+ /* This is default brightness */
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x31, 0x37);
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x32, 0x46);
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x33, 0x55);
+
+ ibmcam_Packet_Format1(uvd, 0x2e, 0x04);
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x2d, 0x04);
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x29, 0x80);
+ ibmcam_Packet_Format1(uvd, 0x2c, 0x01);
+ ibmcam_Packet_Format1(uvd, 0x30, 0x17);
+ ibmcam_Packet_Format1(uvd, 0x39, 0x08);
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x34, 0x00);
+
+ ibmcam_veio(uvd, 0, 0x00, 0x0101);
+ ibmcam_veio(uvd, 0, 0x00, 0x010a);
+
+ switch (uvd->videosize) {
+ case VIDEOSIZE_128x96:
+ ibmcam_veio(uvd, 0, 0x80, 0x0103);
+ ibmcam_veio(uvd, 0, 0x60, 0x0105);
+ ibmcam_veio(uvd, 0, 0x0c, 0x010b);
+ ibmcam_veio(uvd, 0, 0x04, 0x011b); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x0b, 0x011d);
+ ibmcam_veio(uvd, 0, 0x00, 0x011e); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x00, 0x0129);
+ break;
+ case VIDEOSIZE_176x144:
+ ibmcam_veio(uvd, 0, 0xb0, 0x0103);
+ ibmcam_veio(uvd, 0, 0x8f, 0x0105);
+ ibmcam_veio(uvd, 0, 0x06, 0x010b);
+ ibmcam_veio(uvd, 0, 0x04, 0x011b); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x0d, 0x011d);
+ ibmcam_veio(uvd, 0, 0x00, 0x011e); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x03, 0x0129);
+ break;
+ case VIDEOSIZE_352x288:
+ ibmcam_veio(uvd, 0, 0xb0, 0x0103);
+ ibmcam_veio(uvd, 0, 0x90, 0x0105);
+ ibmcam_veio(uvd, 0, 0x02, 0x010b);
+ ibmcam_veio(uvd, 0, 0x04, 0x011b); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x05, 0x011d);
+ ibmcam_veio(uvd, 0, 0x00, 0x011e); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x00, 0x0129);
+ break;
+ }
+
+ ibmcam_veio(uvd, 0, 0xff, 0x012b);
+
+ /* This is another brightness - don't know why */
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x31, 0xc3);
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x32, 0xd2);
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, 0x33, 0xe1);
+
+ /* Default contrast */
+ for (i=0; i < ntries; i++)
+ ibmcam_Packet_Format1(uvd, contrast_14, 0x0a);
+
+ /* Default sharpness */
+ for (i=0; i < 2; i++)
+ ibmcam_PacketFormat2(uvd, sharp_13, 0x1a); /* Level 4 FIXME */
+
+ /* Default lighting conditions */
+ ibmcam_Packet_Format1(uvd, light_27, lighting); /* 0=Bright 2=Low */
+
+ /* Assorted init */
+
+ switch (uvd->videosize) {
+ case VIDEOSIZE_128x96:
+ ibmcam_Packet_Format1(uvd, 0x2b, 0x1e);
+ ibmcam_veio(uvd, 0, 0xc9, 0x0119); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x80, 0x0109); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x36, 0x0102);
+ ibmcam_veio(uvd, 0, 0x1a, 0x0104);
+ ibmcam_veio(uvd, 0, 0x04, 0x011a); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x2b, 0x011c);
+ ibmcam_veio(uvd, 0, 0x23, 0x012a); /* Same everywhere */
+#if 0
+ ibmcam_veio(uvd, 0, 0x00, 0x0106);
+ ibmcam_veio(uvd, 0, 0x38, 0x0107);
+#else
+ ibmcam_veio(uvd, 0, 0x02, 0x0106);
+ ibmcam_veio(uvd, 0, 0x2a, 0x0107);
+#endif
+ break;
+ case VIDEOSIZE_176x144:
+ ibmcam_Packet_Format1(uvd, 0x2b, 0x1e);
+ ibmcam_veio(uvd, 0, 0xc9, 0x0119); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x80, 0x0109); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x04, 0x0102);
+ ibmcam_veio(uvd, 0, 0x02, 0x0104);
+ ibmcam_veio(uvd, 0, 0x04, 0x011a); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x2b, 0x011c);
+ ibmcam_veio(uvd, 0, 0x23, 0x012a); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x01, 0x0106);
+ ibmcam_veio(uvd, 0, 0xca, 0x0107);
+ break;
+ case VIDEOSIZE_352x288:
+ ibmcam_Packet_Format1(uvd, 0x2b, 0x1f);
+ ibmcam_veio(uvd, 0, 0xc9, 0x0119); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x80, 0x0109); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x08, 0x0102);
+ ibmcam_veio(uvd, 0, 0x01, 0x0104);
+ ibmcam_veio(uvd, 0, 0x04, 0x011a); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x2f, 0x011c);
+ ibmcam_veio(uvd, 0, 0x23, 0x012a); /* Same everywhere */
+ ibmcam_veio(uvd, 0, 0x03, 0x0106);
+ ibmcam_veio(uvd, 0, 0xf6, 0x0107);
+ break;
+ }
+ return (CAMERA_IS_OPERATIONAL(uvd) ? 0 : -EFAULT);
+}
+
+static int ibmcam_model2_setup(struct uvd *uvd)
+{
+ ibmcam_veio(uvd, 0, 0x0000, 0x0100); /* LED on */
+ ibmcam_veio(uvd, 1, 0x0000, 0x0116);
+ ibmcam_veio(uvd, 0, 0x0060, 0x0116);
+ ibmcam_veio(uvd, 0, 0x0002, 0x0112);
+ ibmcam_veio(uvd, 0, 0x00bc, 0x012c);
+ ibmcam_veio(uvd, 0, 0x0008, 0x012b);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0108);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0133);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0102);
+ switch (uvd->videosize) {
+ case VIDEOSIZE_176x144:
+ ibmcam_veio(uvd, 0, 0x002c, 0x0103); /* All except 320x240 */
+ ibmcam_veio(uvd, 0, 0x0000, 0x0104); /* Same */
+ ibmcam_veio(uvd, 0, 0x0024, 0x0105); /* 176x144, 352x288 */
+ ibmcam_veio(uvd, 0, 0x00b9, 0x010a); /* Unique to this mode */
+ ibmcam_veio(uvd, 0, 0x0038, 0x0119); /* Unique to this mode */
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106); /* Same */
+ ibmcam_veio(uvd, 0, 0x0090, 0x0107); /* Unique to every mode*/
+ break;
+ case VIDEOSIZE_320x240:
+ ibmcam_veio(uvd, 0, 0x0028, 0x0103); /* Unique to this mode */
+ ibmcam_veio(uvd, 0, 0x0000, 0x0104); /* Same */
+ ibmcam_veio(uvd, 0, 0x001e, 0x0105); /* 320x240, 352x240 */
+ ibmcam_veio(uvd, 0, 0x0039, 0x010a); /* All except 176x144 */
+ ibmcam_veio(uvd, 0, 0x0070, 0x0119); /* All except 176x144 */
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106); /* Same */
+ ibmcam_veio(uvd, 0, 0x0098, 0x0107); /* Unique to every mode*/
+ break;
+ case VIDEOSIZE_352x240:
+ ibmcam_veio(uvd, 0, 0x002c, 0x0103); /* All except 320x240 */
+ ibmcam_veio(uvd, 0, 0x0000, 0x0104); /* Same */
+ ibmcam_veio(uvd, 0, 0x001e, 0x0105); /* 320x240, 352x240 */
+ ibmcam_veio(uvd, 0, 0x0039, 0x010a); /* All except 176x144 */
+ ibmcam_veio(uvd, 0, 0x0070, 0x0119); /* All except 176x144 */
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106); /* Same */
+ ibmcam_veio(uvd, 0, 0x00da, 0x0107); /* Unique to every mode*/
+ break;
+ case VIDEOSIZE_352x288:
+ ibmcam_veio(uvd, 0, 0x002c, 0x0103); /* All except 320x240 */
+ ibmcam_veio(uvd, 0, 0x0000, 0x0104); /* Same */
+ ibmcam_veio(uvd, 0, 0x0024, 0x0105); /* 176x144, 352x288 */
+ ibmcam_veio(uvd, 0, 0x0039, 0x010a); /* All except 176x144 */
+ ibmcam_veio(uvd, 0, 0x0070, 0x0119); /* All except 176x144 */
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106); /* Same */
+ ibmcam_veio(uvd, 0, 0x00fe, 0x0107); /* Unique to every mode*/
+ break;
+ }
+ return (CAMERA_IS_OPERATIONAL(uvd) ? 0 : -EFAULT);
+}
+
+/*
+ * ibmcam_model1_setup_after_video_if()
+ *
+ * This code adds finishing touches to the video data interface.
+ * Here we configure the frame rate and turn on the LED.
+ */
+static void ibmcam_model1_setup_after_video_if(struct uvd *uvd)
+{
+ unsigned short internal_frame_rate;
+
+ RESTRICT_TO_RANGE(framerate, FRAMERATE_MIN, FRAMERATE_MAX);
+ internal_frame_rate = FRAMERATE_MAX - framerate; /* 0=Fast 6=Slow */
+ ibmcam_veio(uvd, 0, 0x01, 0x0100); /* LED On */
+ ibmcam_veio(uvd, 0, internal_frame_rate, 0x0111);
+ ibmcam_veio(uvd, 0, 0x01, 0x0114);
+ ibmcam_veio(uvd, 0, 0xc0, 0x010c);
+}
+
+static void ibmcam_model2_setup_after_video_if(struct uvd *uvd)
+{
+ unsigned short setup_model2_rg2, setup_model2_sat, setup_model2_yb;
+
+ ibmcam_veio(uvd, 0, 0x0000, 0x0100); /* LED on */
+
+ switch (uvd->videosize) {
+ case VIDEOSIZE_176x144:
+ ibmcam_veio(uvd, 0, 0x0050, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00d0, 0x0111);
+ break;
+ case VIDEOSIZE_320x240:
+ case VIDEOSIZE_352x240:
+ case VIDEOSIZE_352x288:
+ ibmcam_veio(uvd, 0, 0x0040, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x0111);
+ break;
+ }
+ ibmcam_veio(uvd, 0, 0x009b, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00bb, 0x010f);
+
+ /*
+ * Hardware settings, may affect CMOS sensor; not user controls!
+ * -------------------------------------------------------------
+ * 0x0004: no effect
+ * 0x0006: hardware effect
+ * 0x0008: no effect
+ * 0x000a: stops video stream, probably important h/w setting
+ * 0x000c: changes color in hardware manner (not user setting)
+ * 0x0012: changes number of colors (does not affect speed)
+ * 0x002a: no effect
+ * 0x002c: hardware setting (related to scan lines)
+ * 0x002e: stops video stream, probably important h/w setting
+ */
+ ibmcam_model2_Packet1(uvd, 0x000a, 0x005c);
+ ibmcam_model2_Packet1(uvd, 0x0004, 0x0000);
+ ibmcam_model2_Packet1(uvd, 0x0006, 0x00fb);
+ ibmcam_model2_Packet1(uvd, 0x0008, 0x0000);
+ ibmcam_model2_Packet1(uvd, 0x000c, 0x0009);
+ ibmcam_model2_Packet1(uvd, 0x0012, 0x000a);
+ ibmcam_model2_Packet1(uvd, 0x002a, 0x0000);
+ ibmcam_model2_Packet1(uvd, 0x002c, 0x0000);
+ ibmcam_model2_Packet1(uvd, 0x002e, 0x0008);
+
+ /*
+ * Function 0x0030 pops up all over the place. Apparently
+ * it is a hardware control register, with every bit assigned to
+ * do something.
+ */
+ ibmcam_model2_Packet1(uvd, 0x0030, 0x0000);
+
+ /*
+ * Magic control of CMOS sensor. Only lower values like
+ * 0-3 work, and picture shifts left or right. Don't change.
+ */
+ switch (uvd->videosize) {
+ case VIDEOSIZE_176x144:
+ ibmcam_model2_Packet1(uvd, 0x0014, 0x0002);
+ ibmcam_model2_Packet1(uvd, 0x0016, 0x0002); /* Horizontal shift */
+ ibmcam_model2_Packet1(uvd, 0x0018, 0x004a); /* Another hardware setting */
+ break;
+ case VIDEOSIZE_320x240:
+ ibmcam_model2_Packet1(uvd, 0x0014, 0x0009);
+ ibmcam_model2_Packet1(uvd, 0x0016, 0x0005); /* Horizontal shift */
+ ibmcam_model2_Packet1(uvd, 0x0018, 0x0044); /* Another hardware setting */
+ break;
+ case VIDEOSIZE_352x240:
+ /* This mode doesn't work as Windows programs it; changed to work */
+ ibmcam_model2_Packet1(uvd, 0x0014, 0x0009); /* Windows sets this to 8 */
+ ibmcam_model2_Packet1(uvd, 0x0016, 0x0003); /* Horizontal shift */
+ ibmcam_model2_Packet1(uvd, 0x0018, 0x0044); /* Windows sets this to 0x0045 */
+ break;
+ case VIDEOSIZE_352x288:
+ ibmcam_model2_Packet1(uvd, 0x0014, 0x0003);
+ ibmcam_model2_Packet1(uvd, 0x0016, 0x0002); /* Horizontal shift */
+ ibmcam_model2_Packet1(uvd, 0x0018, 0x004a); /* Another hardware setting */
+ break;
+ }
+
+ ibmcam_model2_Packet1(uvd, mod2_brightness, 0x005a);
+
+ /*
+ * We have our own frame rate setting varying from 0 (slowest) to 6 (fastest).
+ * The camera model 2 allows frame rate in range [0..0x1F] where 0 is also the
+ * slowest setting. However for all practical reasons high settings make no
+ * sense because USB is not fast enough to support high FPS. Be aware that
+ * the picture datastream will be severely disrupted if you ask for
+ * frame rate faster than allowed for the video size - see below:
+ *
+ * Allowable ranges (obtained experimentally on OHCI, K6-3, 450 MHz):
+ * -----------------------------------------------------------------
+ * 176x144: [6..31]
+ * 320x240: [8..31]
+ * 352x240: [10..31]
+ * 352x288: [16..31] I have to raise lower threshold for stability...
+ *
+ * As usual, slower FPS provides better sensitivity.
+ */
+ {
+ short hw_fps=31, i_framerate;
+
+ RESTRICT_TO_RANGE(framerate, FRAMERATE_MIN, FRAMERATE_MAX);
+ i_framerate = FRAMERATE_MAX - framerate + FRAMERATE_MIN;
+ switch (uvd->videosize) {
+ case VIDEOSIZE_176x144:
+ hw_fps = 6 + i_framerate*4;
+ break;
+ case VIDEOSIZE_320x240:
+ hw_fps = 8 + i_framerate*3;
+ break;
+ case VIDEOSIZE_352x240:
+ hw_fps = 10 + i_framerate*2;
+ break;
+ case VIDEOSIZE_352x288:
+ hw_fps = 28 + i_framerate/2;
+ break;
+ }
+ if (uvd->debug > 0)
+ info("Framerate (hardware): %hd.", hw_fps);
+ RESTRICT_TO_RANGE(hw_fps, 0, 31);
+ ibmcam_model2_Packet1(uvd, mod2_set_framerate, hw_fps);
+ }
+
+ /*
+ * This setting does not visibly affect pictures; left it here
+ * because it was present in Windows USB data stream. This function
+ * does not allow arbitrary values and apparently is a bit mask, to
+ * be activated only at appropriate time. Don't change it randomly!
+ */
+ switch (uvd->videosize) {
+ case VIDEOSIZE_176x144:
+ ibmcam_model2_Packet1(uvd, 0x0026, 0x00c2);
+ break;
+ case VIDEOSIZE_320x240:
+ ibmcam_model2_Packet1(uvd, 0x0026, 0x0044);
+ break;
+ case VIDEOSIZE_352x240:
+ ibmcam_model2_Packet1(uvd, 0x0026, 0x0046);
+ break;
+ case VIDEOSIZE_352x288:
+ ibmcam_model2_Packet1(uvd, 0x0026, 0x0048);
+ break;
+ }
+
+ ibmcam_model2_Packet1(uvd, mod2_sensitivity, lighting);
+
+ if (init_model2_rg2 >= 0) {
+ RESTRICT_TO_RANGE(init_model2_rg2, 0, 255);
+ setup_model2_rg2 = init_model2_rg2;
+ } else
+ setup_model2_rg2 = 0x002f;
+
+ if (init_model2_sat >= 0) {
+ RESTRICT_TO_RANGE(init_model2_sat, 0, 255);
+ setup_model2_sat = init_model2_sat;
+ } else
+ setup_model2_sat = 0x0034;
+
+ if (init_model2_yb >= 0) {
+ RESTRICT_TO_RANGE(init_model2_yb, 0, 255);
+ setup_model2_yb = init_model2_yb;
+ } else
+ setup_model2_yb = 0x00a0;
+
+ ibmcam_model2_Packet1(uvd, mod2_color_balance_rg2, setup_model2_rg2);
+ ibmcam_model2_Packet1(uvd, mod2_saturation, setup_model2_sat);
+ ibmcam_model2_Packet1(uvd, mod2_color_balance_yb, setup_model2_yb);
+ ibmcam_model2_Packet1(uvd, mod2_hue, uvd->vpic.hue >> 9); /* 0 .. 7F */;
+
+ /* Hardware control command */
+ ibmcam_model2_Packet1(uvd, 0x0030, 0x0004);
+
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c); /* Go camera, go! */
+ usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp));
+}
+
+static void ibmcam_model4_setup_after_video_if(struct uvd *uvd)
+{
+ switch (uvd->videosize) {
+ case VIDEOSIZE_128x96:
+ ibmcam_veio(uvd, 0, 0x0000, 0x0100);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00bc, 0x012c);
+ ibmcam_veio(uvd, 0, 0x0080, 0x012b);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0108);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0133);
+ ibmcam_veio(uvd, 0, 0x009b, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00bb, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x000a, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005c, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0004, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00fb, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x000c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0009, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0012, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0008, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x002a, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0000, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0034, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0070, 0x0119);
+ ibmcam_veio(uvd, 0, 0x00d2, 0x0107);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106);
+ ibmcam_veio(uvd, 0, 0x005e, 0x0107);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106);
+ ibmcam_veio(uvd, 0, 0x00d0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x0039, 0x010a);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0102);
+ ibmcam_veio(uvd, 0, 0x0028, 0x0103);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0104);
+ ibmcam_veio(uvd, 0, 0x001e, 0x0105);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0016, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x000a, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0014, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0008, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012e);
+ ibmcam_veio(uvd, 0, 0x001a, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a0a, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005a, 0x012d);
+ ibmcam_veio(uvd, 0, 0x9545, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0018, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0043, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x001c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00eb, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0032, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0036, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0008, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x001e, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0017, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0013, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0031, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0017, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0078, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0004, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c);
+ break;
+ case VIDEOSIZE_160x120:
+ ibmcam_veio(uvd, 0, 0x0000, 0x0100);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00bc, 0x012c);
+ ibmcam_veio(uvd, 0, 0x0080, 0x012b);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0108);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0133);
+ ibmcam_veio(uvd, 0, 0x009b, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00bb, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x000a, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005c, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0004, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00fb, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x000c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0009, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0012, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0008, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x002a, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0000, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0034, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0038, 0x0119);
+ ibmcam_veio(uvd, 0, 0x00d8, 0x0107);
+ ibmcam_veio(uvd, 0, 0x0002, 0x0106);
+ ibmcam_veio(uvd, 0, 0x00d0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00b9, 0x010a);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0102);
+ ibmcam_veio(uvd, 0, 0x0028, 0x0103);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0104);
+ ibmcam_veio(uvd, 0, 0x001e, 0x0105);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0016, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x000b, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0014, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0008, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012e);
+ ibmcam_veio(uvd, 0, 0x001a, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a0a, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005a, 0x012d);
+ ibmcam_veio(uvd, 0, 0x9545, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0018, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0043, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x001c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00c7, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0032, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0025, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0036, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0008, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x001e, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0048, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0035, 0x012e);
+ ibmcam_veio(uvd, 0, 0x00d0, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0048, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0090, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0004, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c);
+ break;
+ case VIDEOSIZE_176x144:
+ ibmcam_veio(uvd, 0, 0x0000, 0x0100);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00bc, 0x012c);
+ ibmcam_veio(uvd, 0, 0x0080, 0x012b);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0108);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0133);
+ ibmcam_veio(uvd, 0, 0x009b, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00bb, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x000a, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005c, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0004, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00fb, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x000c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0009, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0012, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0008, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x002a, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0000, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0034, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0038, 0x0119);
+ ibmcam_veio(uvd, 0, 0x00d6, 0x0107);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106);
+ ibmcam_veio(uvd, 0, 0x0018, 0x0107);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106);
+ ibmcam_veio(uvd, 0, 0x00d0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00b9, 0x010a);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0102);
+ ibmcam_veio(uvd, 0, 0x002c, 0x0103);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0104);
+ ibmcam_veio(uvd, 0, 0x0024, 0x0105);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0016, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0007, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0014, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0001, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012e);
+ ibmcam_veio(uvd, 0, 0x001a, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a0a, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005e, 0x012d);
+ ibmcam_veio(uvd, 0, 0x9545, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0018, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0049, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x001c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00c7, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0032, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0028, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0036, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0008, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x001e, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0010, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0013, 0x012e);
+ ibmcam_veio(uvd, 0, 0x002a, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0010, 0x012d);
+ ibmcam_veio(uvd, 0, 0x006d, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0004, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c);
+ break;
+ case VIDEOSIZE_320x240:
+ ibmcam_veio(uvd, 0, 0x0000, 0x0100);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00bc, 0x012c);
+ ibmcam_veio(uvd, 0, 0x0080, 0x012b);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0108);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0133);
+ ibmcam_veio(uvd, 0, 0x009b, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00bb, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x000a, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005c, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0004, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00fb, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x000c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0009, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0012, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0008, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x002a, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0000, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0034, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0070, 0x0119);
+ ibmcam_veio(uvd, 0, 0x00d2, 0x0107);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106);
+ ibmcam_veio(uvd, 0, 0x005e, 0x0107);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106);
+ ibmcam_veio(uvd, 0, 0x00d0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x0039, 0x010a);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0102);
+ ibmcam_veio(uvd, 0, 0x0028, 0x0103);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0104);
+ ibmcam_veio(uvd, 0, 0x001e, 0x0105);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0016, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x000a, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0014, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0008, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012e);
+ ibmcam_veio(uvd, 0, 0x001a, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a0a, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005a, 0x012d);
+ ibmcam_veio(uvd, 0, 0x9545, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0018, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0043, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x001c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00eb, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0032, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0036, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0008, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x001e, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0017, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0013, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0031, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0017, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0078, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0004, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c);
+ break;
+ case VIDEOSIZE_352x288:
+ ibmcam_veio(uvd, 0, 0x0000, 0x0100);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00bc, 0x012c);
+ ibmcam_veio(uvd, 0, 0x0080, 0x012b);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0108);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0133);
+ ibmcam_veio(uvd, 0, 0x009b, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00bb, 0x010f);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x000a, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005c, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0004, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00fb, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x000c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0009, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0012, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0008, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x002a, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0000, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0034, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0070, 0x0119);
+ ibmcam_veio(uvd, 0, 0x00f2, 0x0107);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106);
+ ibmcam_veio(uvd, 0, 0x008c, 0x0107);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x0111);
+ ibmcam_veio(uvd, 0, 0x0039, 0x010a);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0102);
+ ibmcam_veio(uvd, 0, 0x002c, 0x0103);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0104);
+ ibmcam_veio(uvd, 0, 0x0024, 0x0105);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0016, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0006, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0014, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0002, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012e);
+ ibmcam_veio(uvd, 0, 0x001a, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a0a, 0x0124);
+ ibmcam_veio(uvd, 0, 0x005e, 0x012d);
+ ibmcam_veio(uvd, 0, 0x9545, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0018, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0049, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd055, 0x0124);
+ ibmcam_veio(uvd, 0, 0x001c, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00cf, 0x012e);
+ ibmcam_veio(uvd, 0, 0xaa28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0032, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x0130);
+ ibmcam_veio(uvd, 0, 0x82a8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0036, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0008, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0xfffa, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x001e, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0010, 0x0127);
+ ibmcam_veio(uvd, 0, 0x0013, 0x012e);
+ ibmcam_veio(uvd, 0, 0x0025, 0x0130);
+ ibmcam_veio(uvd, 0, 0x8a28, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0010, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0048, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd145, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00aa, 0x012d);
+ ibmcam_veio(uvd, 0, 0x0038, 0x012f);
+ ibmcam_veio(uvd, 0, 0xd141, 0x0124);
+ ibmcam_veio(uvd, 0, 0x0004, 0x0127);
+ ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c);
+ break;
+ }
+ usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp));
+}
+
+static void ibmcam_model3_setup_after_video_if(struct uvd *uvd)
+{
+ int i;
+ /*
+ * 01.01.08 - Added for RCA video in support -LO
+ * This struct is used to init the Model3 cam to use the RCA video in port
+ * instead of the CCD sensor.
+ */
+ static const struct struct_initData initData[] = {
+ {0, 0x0000, 0x010c},
+ {0, 0x0006, 0x012c},
+ {0, 0x0078, 0x012d},
+ {0, 0x0046, 0x012f},
+ {0, 0xd141, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfea8, 0x0124},
+ {1, 0x0000, 0x0116},
+ {0, 0x0064, 0x0116},
+ {1, 0x0000, 0x0115},
+ {0, 0x0003, 0x0115},
+ {0, 0x0008, 0x0123},
+ {0, 0x0000, 0x0117},
+ {0, 0x0000, 0x0112},
+ {0, 0x0080, 0x0100},
+ {0, 0x0000, 0x0100},
+ {1, 0x0000, 0x0116},
+ {0, 0x0060, 0x0116},
+ {0, 0x0002, 0x0112},
+ {0, 0x0000, 0x0123},
+ {0, 0x0001, 0x0117},
+ {0, 0x0040, 0x0108},
+ {0, 0x0019, 0x012c},
+ {0, 0x0040, 0x0116},
+ {0, 0x000a, 0x0115},
+ {0, 0x000b, 0x0115},
+ {0, 0x0078, 0x012d},
+ {0, 0x0046, 0x012f},
+ {0, 0xd141, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfea8, 0x0124},
+ {0, 0x0064, 0x0116},
+ {0, 0x0000, 0x0115},
+ {0, 0x0001, 0x0115},
+ {0, 0xffff, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x00aa, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xffff, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x00f2, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x000f, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xffff, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x00f8, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x00fc, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xffff, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x00f9, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x003c, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xffff, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0027, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0019, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0021, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0006, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0045, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x002a, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x000e, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x002b, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x00f4, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x002c, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0004, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x002d, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0014, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x002e, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0003, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x002f, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0003, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0014, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0040, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0040, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0053, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0x0000, 0x0101},
+ {0, 0x00a0, 0x0103},
+ {0, 0x0078, 0x0105},
+ {0, 0x0000, 0x010a},
+ {0, 0x0024, 0x010b},
+ {0, 0x0028, 0x0119},
+ {0, 0x0088, 0x011b},
+ {0, 0x0002, 0x011d},
+ {0, 0x0003, 0x011e},
+ {0, 0x0000, 0x0129},
+ {0, 0x00fc, 0x012b},
+ {0, 0x0008, 0x0102},
+ {0, 0x0000, 0x0104},
+ {0, 0x0008, 0x011a},
+ {0, 0x0028, 0x011c},
+ {0, 0x0021, 0x012a},
+ {0, 0x0000, 0x0118},
+ {0, 0x0000, 0x0132},
+ {0, 0x0000, 0x0109},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0031, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0040, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0040, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x00dc, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0032, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0020, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0001, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0040, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0040, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0037, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0030, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0xfff9, 0x0124},
+ {0, 0x0086, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0038, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0008, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0x0000, 0x0127},
+ {0, 0xfff8, 0x0124},
+ {0, 0xfffd, 0x0124},
+ {0, 0xfffa, 0x0124},
+ {0, 0x0003, 0x0106},
+ {0, 0x0062, 0x0107},
+ {0, 0x0003, 0x0111},
+ };
+#define NUM_INIT_DATA
+
+ unsigned short compression = 0; /* 0=none, 7=best frame rate */
+ int f_rate; /* 0=Fastest 7=slowest */
+
+ if (IBMCAM_T(uvd)->initialized)
+ return;
+
+ /* Internal frame rate is controlled by f_rate value */
+ f_rate = 7 - framerate;
+ RESTRICT_TO_RANGE(f_rate, 0, 7);
+
+ ibmcam_veio(uvd, 0, 0x0000, 0x0100);
+ ibmcam_veio(uvd, 1, 0x0000, 0x0116);
+ ibmcam_veio(uvd, 0, 0x0060, 0x0116);
+ ibmcam_veio(uvd, 0, 0x0002, 0x0112);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0123);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0117);
+ ibmcam_veio(uvd, 0, 0x0040, 0x0108);
+ ibmcam_veio(uvd, 0, 0x0019, 0x012c);
+ ibmcam_veio(uvd, 0, 0x0060, 0x0116);
+ ibmcam_veio(uvd, 0, 0x0002, 0x0115);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0115);
+ ibmcam_veio(uvd, 1, 0x0000, 0x0115);
+ ibmcam_veio(uvd, 0, 0x000b, 0x0115);
+ ibmcam_model3_Packet1(uvd, 0x000a, 0x0040);
+ ibmcam_model3_Packet1(uvd, 0x000b, 0x00f6);
+ ibmcam_model3_Packet1(uvd, 0x000c, 0x0002);
+ ibmcam_model3_Packet1(uvd, 0x000d, 0x0020);
+ ibmcam_model3_Packet1(uvd, 0x000e, 0x0033);
+ ibmcam_model3_Packet1(uvd, 0x000f, 0x0007);
+ ibmcam_model3_Packet1(uvd, 0x0010, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0011, 0x0070);
+ ibmcam_model3_Packet1(uvd, 0x0012, 0x0030);
+ ibmcam_model3_Packet1(uvd, 0x0013, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0014, 0x0001);
+ ibmcam_model3_Packet1(uvd, 0x0015, 0x0001);
+ ibmcam_model3_Packet1(uvd, 0x0016, 0x0001);
+ ibmcam_model3_Packet1(uvd, 0x0017, 0x0001);
+ ibmcam_model3_Packet1(uvd, 0x0018, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x001e, 0x00c3);
+ ibmcam_model3_Packet1(uvd, 0x0020, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0028, 0x0010);
+ ibmcam_model3_Packet1(uvd, 0x0029, 0x0054);
+ ibmcam_model3_Packet1(uvd, 0x002a, 0x0013);
+ ibmcam_model3_Packet1(uvd, 0x002b, 0x0007);
+ ibmcam_model3_Packet1(uvd, 0x002d, 0x0028);
+ ibmcam_model3_Packet1(uvd, 0x002e, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0031, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0032, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0033, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0034, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0035, 0x0038);
+ ibmcam_model3_Packet1(uvd, 0x003a, 0x0001);
+ ibmcam_model3_Packet1(uvd, 0x003c, 0x001e);
+ ibmcam_model3_Packet1(uvd, 0x003f, 0x000a);
+ ibmcam_model3_Packet1(uvd, 0x0041, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0046, 0x003f);
+ ibmcam_model3_Packet1(uvd, 0x0047, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0050, 0x0005);
+ ibmcam_model3_Packet1(uvd, 0x0052, 0x001a);
+ ibmcam_model3_Packet1(uvd, 0x0053, 0x0003);
+ ibmcam_model3_Packet1(uvd, 0x005a, 0x006b);
+ ibmcam_model3_Packet1(uvd, 0x005d, 0x001e);
+ ibmcam_model3_Packet1(uvd, 0x005e, 0x0030);
+ ibmcam_model3_Packet1(uvd, 0x005f, 0x0041);
+ ibmcam_model3_Packet1(uvd, 0x0064, 0x0008);
+ ibmcam_model3_Packet1(uvd, 0x0065, 0x0015);
+ ibmcam_model3_Packet1(uvd, 0x0068, 0x000f);
+ ibmcam_model3_Packet1(uvd, 0x0079, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x007a, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x007c, 0x003f);
+ ibmcam_model3_Packet1(uvd, 0x0082, 0x000f);
+ ibmcam_model3_Packet1(uvd, 0x0085, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x0099, 0x0000);
+ ibmcam_model3_Packet1(uvd, 0x009b, 0x0023);
+ ibmcam_model3_Packet1(uvd, 0x009c, 0x0022);
+ ibmcam_model3_Packet1(uvd, 0x009d, 0x0096);
+ ibmcam_model3_Packet1(uvd, 0x009e, 0x0096);
+ ibmcam_model3_Packet1(uvd, 0x009f, 0x000a);
+
+ switch (uvd->videosize) {
+ case VIDEOSIZE_160x120:
+ ibmcam_veio(uvd, 0, 0x0000, 0x0101); /* Same on 176x144, 320x240 */
+ ibmcam_veio(uvd, 0, 0x00a0, 0x0103); /* Same on 176x144, 320x240 */
+ ibmcam_veio(uvd, 0, 0x0078, 0x0105); /* Same on 176x144, 320x240 */
+ ibmcam_veio(uvd, 0, 0x0000, 0x010a); /* Same */
+ ibmcam_veio(uvd, 0, 0x0024, 0x010b); /* Differs everywhere */
+ ibmcam_veio(uvd, 0, 0x00a9, 0x0119);
+ ibmcam_veio(uvd, 0, 0x0016, 0x011b);
+ ibmcam_veio(uvd, 0, 0x0002, 0x011d); /* Same on 176x144, 320x240 */
+ ibmcam_veio(uvd, 0, 0x0003, 0x011e); /* Same on 176x144, 640x480 */
+ ibmcam_veio(uvd, 0, 0x0000, 0x0129); /* Same */
+ ibmcam_veio(uvd, 0, 0x00fc, 0x012b); /* Same */
+ ibmcam_veio(uvd, 0, 0x0018, 0x0102);
+ ibmcam_veio(uvd, 0, 0x0004, 0x0104);
+ ibmcam_veio(uvd, 0, 0x0004, 0x011a);
+ ibmcam_veio(uvd, 0, 0x0028, 0x011c);
+ ibmcam_veio(uvd, 0, 0x0022, 0x012a); /* Same */
+ ibmcam_veio(uvd, 0, 0x0000, 0x0118);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0132);
+ ibmcam_model3_Packet1(uvd, 0x0021, 0x0001); /* Same */
+ ibmcam_veio(uvd, 0, compression, 0x0109);
+ break;
+ case VIDEOSIZE_320x240:
+ ibmcam_veio(uvd, 0, 0x0000, 0x0101); /* Same on 176x144, 320x240 */
+ ibmcam_veio(uvd, 0, 0x00a0, 0x0103); /* Same on 176x144, 320x240 */
+ ibmcam_veio(uvd, 0, 0x0078, 0x0105); /* Same on 176x144, 320x240 */
+ ibmcam_veio(uvd, 0, 0x0000, 0x010a); /* Same */
+ ibmcam_veio(uvd, 0, 0x0028, 0x010b); /* Differs everywhere */
+ ibmcam_veio(uvd, 0, 0x0002, 0x011d); /* Same */
+ ibmcam_veio(uvd, 0, 0x0000, 0x011e);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0129); /* Same */
+ ibmcam_veio(uvd, 0, 0x00fc, 0x012b); /* Same */
+ /* 4 commands from 160x120 skipped */
+ ibmcam_veio(uvd, 0, 0x0022, 0x012a); /* Same */
+ ibmcam_model3_Packet1(uvd, 0x0021, 0x0001); /* Same */
+ ibmcam_veio(uvd, 0, compression, 0x0109);
+ ibmcam_veio(uvd, 0, 0x00d9, 0x0119);
+ ibmcam_veio(uvd, 0, 0x0006, 0x011b);
+ ibmcam_veio(uvd, 0, 0x0021, 0x0102); /* Same on 320x240, 640x480 */
+ ibmcam_veio(uvd, 0, 0x0010, 0x0104);
+ ibmcam_veio(uvd, 0, 0x0004, 0x011a);
+ ibmcam_veio(uvd, 0, 0x003f, 0x011c);
+ ibmcam_veio(uvd, 0, 0x001c, 0x0118);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0132);
+ break;
+ case VIDEOSIZE_640x480:
+ ibmcam_veio(uvd, 0, 0x00f0, 0x0105);
+ ibmcam_veio(uvd, 0, 0x0000, 0x010a); /* Same */
+ ibmcam_veio(uvd, 0, 0x0038, 0x010b); /* Differs everywhere */
+ ibmcam_veio(uvd, 0, 0x00d9, 0x0119); /* Same on 320x240, 640x480 */
+ ibmcam_veio(uvd, 0, 0x0006, 0x011b); /* Same on 320x240, 640x480 */
+ ibmcam_veio(uvd, 0, 0x0004, 0x011d); /* NC */
+ ibmcam_veio(uvd, 0, 0x0003, 0x011e); /* Same on 176x144, 640x480 */
+ ibmcam_veio(uvd, 0, 0x0000, 0x0129); /* Same */
+ ibmcam_veio(uvd, 0, 0x00fc, 0x012b); /* Same */
+ ibmcam_veio(uvd, 0, 0x0021, 0x0102); /* Same on 320x240, 640x480 */
+ ibmcam_veio(uvd, 0, 0x0016, 0x0104); /* NC */
+ ibmcam_veio(uvd, 0, 0x0004, 0x011a); /* Same on 320x240, 640x480 */
+ ibmcam_veio(uvd, 0, 0x003f, 0x011c); /* Same on 320x240, 640x480 */
+ ibmcam_veio(uvd, 0, 0x0022, 0x012a); /* Same */
+ ibmcam_veio(uvd, 0, 0x001c, 0x0118); /* Same on 320x240, 640x480 */
+ ibmcam_model3_Packet1(uvd, 0x0021, 0x0001); /* Same */
+ ibmcam_veio(uvd, 0, compression, 0x0109);
+ ibmcam_veio(uvd, 0, 0x0040, 0x0101);
+ ibmcam_veio(uvd, 0, 0x0040, 0x0103);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0132); /* Same on 320x240, 640x480 */
+ break;
+ }
+ ibmcam_model3_Packet1(uvd, 0x007e, 0x000e); /* Hue */
+ ibmcam_model3_Packet1(uvd, 0x0036, 0x0011); /* Brightness */
+ ibmcam_model3_Packet1(uvd, 0x0060, 0x0002); /* Sharpness */
+ ibmcam_model3_Packet1(uvd, 0x0061, 0x0004); /* Sharpness */
+ ibmcam_model3_Packet1(uvd, 0x0062, 0x0005); /* Sharpness */
+ ibmcam_model3_Packet1(uvd, 0x0063, 0x0014); /* Sharpness */
+ ibmcam_model3_Packet1(uvd, 0x0096, 0x00a0); /* Red gain */
+ ibmcam_model3_Packet1(uvd, 0x0097, 0x0096); /* Blue gain */
+ ibmcam_model3_Packet1(uvd, 0x0067, 0x0001); /* Contrast */
+ ibmcam_model3_Packet1(uvd, 0x005b, 0x000c); /* Contrast */
+ ibmcam_model3_Packet1(uvd, 0x005c, 0x0016); /* Contrast */
+ ibmcam_model3_Packet1(uvd, 0x0098, 0x000b);
+ ibmcam_model3_Packet1(uvd, 0x002c, 0x0003); /* Was 1, broke 640x480 */
+ ibmcam_model3_Packet1(uvd, 0x002f, 0x002a);
+ ibmcam_model3_Packet1(uvd, 0x0030, 0x0029);
+ ibmcam_model3_Packet1(uvd, 0x0037, 0x0002);
+ ibmcam_model3_Packet1(uvd, 0x0038, 0x0059);
+ ibmcam_model3_Packet1(uvd, 0x003d, 0x002e);
+ ibmcam_model3_Packet1(uvd, 0x003e, 0x0028);
+ ibmcam_model3_Packet1(uvd, 0x0078, 0x0005);
+ ibmcam_model3_Packet1(uvd, 0x007b, 0x0011);
+ ibmcam_model3_Packet1(uvd, 0x007d, 0x004b);
+ ibmcam_model3_Packet1(uvd, 0x007f, 0x0022);
+ ibmcam_model3_Packet1(uvd, 0x0080, 0x000c);
+ ibmcam_model3_Packet1(uvd, 0x0081, 0x000b);
+ ibmcam_model3_Packet1(uvd, 0x0083, 0x00fd);
+ ibmcam_model3_Packet1(uvd, 0x0086, 0x000b);
+ ibmcam_model3_Packet1(uvd, 0x0087, 0x000b);
+ ibmcam_model3_Packet1(uvd, 0x007e, 0x000e);
+ ibmcam_model3_Packet1(uvd, 0x0096, 0x00a0); /* Red gain */
+ ibmcam_model3_Packet1(uvd, 0x0097, 0x0096); /* Blue gain */
+ ibmcam_model3_Packet1(uvd, 0x0098, 0x000b);
+
+ switch (uvd->videosize) {
+ case VIDEOSIZE_160x120:
+ ibmcam_veio(uvd, 0, 0x0002, 0x0106);
+ ibmcam_veio(uvd, 0, 0x0008, 0x0107);
+ ibmcam_veio(uvd, 0, f_rate, 0x0111); /* Frame rate */
+ ibmcam_model3_Packet1(uvd, 0x001f, 0x0000); /* Same */
+ ibmcam_model3_Packet1(uvd, 0x0039, 0x001f); /* Same */
+ ibmcam_model3_Packet1(uvd, 0x003b, 0x003c); /* Same */
+ ibmcam_model3_Packet1(uvd, 0x0040, 0x000a);
+ ibmcam_model3_Packet1(uvd, 0x0051, 0x000a);
+ break;
+ case VIDEOSIZE_320x240:
+ ibmcam_veio(uvd, 0, 0x0003, 0x0106);
+ ibmcam_veio(uvd, 0, 0x0062, 0x0107);
+ ibmcam_veio(uvd, 0, f_rate, 0x0111); /* Frame rate */
+ ibmcam_model3_Packet1(uvd, 0x001f, 0x0000); /* Same */
+ ibmcam_model3_Packet1(uvd, 0x0039, 0x001f); /* Same */
+ ibmcam_model3_Packet1(uvd, 0x003b, 0x003c); /* Same */
+ ibmcam_model3_Packet1(uvd, 0x0040, 0x0008);
+ ibmcam_model3_Packet1(uvd, 0x0051, 0x000b);
+ break;
+ case VIDEOSIZE_640x480:
+ ibmcam_veio(uvd, 0, 0x0002, 0x0106); /* Adjustments */
+ ibmcam_veio(uvd, 0, 0x00b4, 0x0107); /* Adjustments */
+ ibmcam_veio(uvd, 0, f_rate, 0x0111); /* Frame rate */
+ ibmcam_model3_Packet1(uvd, 0x001f, 0x0002); /* !Same */
+ ibmcam_model3_Packet1(uvd, 0x0039, 0x003e); /* !Same */
+ ibmcam_model3_Packet1(uvd, 0x0040, 0x0008);
+ ibmcam_model3_Packet1(uvd, 0x0051, 0x000a);
+ break;
+ }
+
+ /* 01.01.08 - Added for RCA video in support -LO */
+ if(init_model3_input) {
+ if (debug > 0)
+ info("Setting input to RCA.");
+ for (i=0; i < (sizeof(initData)/sizeof(initData[0])); i++) {
+ ibmcam_veio(uvd, initData[i].req, initData[i].value, initData[i].index);
+ }
+ }
+
+ ibmcam_veio(uvd, 0, 0x0001, 0x0114);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c);
+ usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp));
+}
+
+/*
+ * ibmcam_video_stop()
+ *
+ * This code tells camera to stop streaming. The interface remains
+ * configured and bandwidth - claimed.
+ */
+static void ibmcam_video_stop(struct uvd *uvd)
+{
+ switch (IBMCAM_T(uvd)->camera_model) {
+ case IBMCAM_MODEL_1:
+ ibmcam_veio(uvd, 0, 0x00, 0x010c);
+ ibmcam_veio(uvd, 0, 0x00, 0x010c);
+ ibmcam_veio(uvd, 0, 0x01, 0x0114);
+ ibmcam_veio(uvd, 0, 0xc0, 0x010c);
+ ibmcam_veio(uvd, 0, 0x00, 0x010c);
+ ibmcam_send_FF_04_02(uvd);
+ ibmcam_veio(uvd, 1, 0x00, 0x0100);
+ ibmcam_veio(uvd, 0, 0x81, 0x0100); /* LED Off */
+ break;
+ case IBMCAM_MODEL_2:
+case IBMCAM_MODEL_4:
+ ibmcam_veio(uvd, 0, 0x0000, 0x010c); /* Stop the camera */
+
+ ibmcam_model2_Packet1(uvd, 0x0030, 0x0004);
+
+ ibmcam_veio(uvd, 0, 0x0080, 0x0100); /* LED Off */
+ ibmcam_veio(uvd, 0, 0x0020, 0x0111);
+ ibmcam_veio(uvd, 0, 0x00a0, 0x0111);
+
+ ibmcam_model2_Packet1(uvd, 0x0030, 0x0002);
+
+ ibmcam_veio(uvd, 0, 0x0020, 0x0111);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0112);
+ break;
+ case IBMCAM_MODEL_3:
+#if 1
+ ibmcam_veio(uvd, 0, 0x0000, 0x010c);
+
+ /* Here we are supposed to select video interface alt. setting 0 */
+ ibmcam_veio(uvd, 0, 0x0006, 0x012c);
+
+ ibmcam_model3_Packet1(uvd, 0x0046, 0x0000);
+
+ ibmcam_veio(uvd, 1, 0x0000, 0x0116);
+ ibmcam_veio(uvd, 0, 0x0064, 0x0116);
+ ibmcam_veio(uvd, 1, 0x0000, 0x0115);
+ ibmcam_veio(uvd, 0, 0x0003, 0x0115);
+ ibmcam_veio(uvd, 0, 0x0008, 0x0123);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0117);
+ ibmcam_veio(uvd, 0, 0x0000, 0x0112);
+ ibmcam_veio(uvd, 0, 0x0080, 0x0100);
+ IBMCAM_T(uvd)->initialized = 0;
+#endif
+ break;
+ } /* switch */
+}
+
+/*
+ * ibmcam_reinit_iso()
+ *
+ * This procedure sends couple of commands to the camera and then
+ * resets the video pipe. This sequence was observed to reinit the
+ * camera or, at least, to initiate ISO data stream.
+ *
+ * History:
+ * 1/2/00 Created.
+ */
+static void ibmcam_reinit_iso(struct uvd *uvd, int do_stop)
+{
+ switch (IBMCAM_T(uvd)->camera_model) {
+ case IBMCAM_MODEL_1:
+ if (do_stop)
+ ibmcam_video_stop(uvd);
+ ibmcam_veio(uvd, 0, 0x0001, 0x0114);
+ ibmcam_veio(uvd, 0, 0x00c0, 0x010c);
+ usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp));
+ ibmcam_model1_setup_after_video_if(uvd);
+ break;
+ case IBMCAM_MODEL_2:
+ ibmcam_model2_setup_after_video_if(uvd);
+ break;
+ case IBMCAM_MODEL_3:
+ ibmcam_video_stop(uvd);
+ ibmcam_model3_setup_after_video_if(uvd);
+ break;
+ case IBMCAM_MODEL_4:
+ ibmcam_model4_setup_after_video_if(uvd);
+ break;
+ }
+}
+
+static void ibmcam_video_start(struct uvd *uvd)
+{
+ ibmcam_change_lighting_conditions(uvd);
+ ibmcam_set_sharpness(uvd);
+ ibmcam_reinit_iso(uvd, 0);
+}
+
+/*
+ * Return negative code on failure, 0 on success.
+ */
+static int ibmcam_setup_on_open(struct uvd *uvd)
+{
+ int setup_ok = 0; /* Success by default */
+ /* Send init sequence only once, it's large! */
+ if (!IBMCAM_T(uvd)->initialized) { /* FIXME rename */
+ switch (IBMCAM_T(uvd)->camera_model) {
+ case IBMCAM_MODEL_1:
+ setup_ok = ibmcam_model1_setup(uvd);
+ break;
+ case IBMCAM_MODEL_2:
+ setup_ok = ibmcam_model2_setup(uvd);
+ break;
+ case IBMCAM_MODEL_3:
+ case IBMCAM_MODEL_4:
+ /* We do all setup when Isoc stream is requested */
+ break;
+ }
+ IBMCAM_T(uvd)->initialized = (setup_ok != 0);
+ }
+ return setup_ok;
+}
+
+static void ibmcam_configure_video(struct uvd *uvd)
+{
+ if (uvd == NULL)
+ return;
+
+ RESTRICT_TO_RANGE(init_brightness, 0, 255);
+ RESTRICT_TO_RANGE(init_contrast, 0, 255);
+ RESTRICT_TO_RANGE(init_color, 0, 255);
+ RESTRICT_TO_RANGE(init_hue, 0, 255);
+ RESTRICT_TO_RANGE(hue_correction, 0, 255);
+
+ memset(&uvd->vpic, 0, sizeof(uvd->vpic));
+ memset(&uvd->vpic_old, 0x55, sizeof(uvd->vpic_old));
+
+ uvd->vpic.colour = init_color << 8;
+ uvd->vpic.hue = init_hue << 8;
+ uvd->vpic.brightness = init_brightness << 8;
+ uvd->vpic.contrast = init_contrast << 8;
+ uvd->vpic.whiteness = 105 << 8; /* This one isn't used */
+ uvd->vpic.depth = 24;
+ uvd->vpic.palette = VIDEO_PALETTE_RGB24;
+
+ memset(&uvd->vcap, 0, sizeof(uvd->vcap));
+ strcpy(uvd->vcap.name, "IBM USB Camera");
+ uvd->vcap.type = VID_TYPE_CAPTURE;
+ uvd->vcap.channels = 1;
+ uvd->vcap.audios = 0;
+ uvd->vcap.maxwidth = VIDEOSIZE_X(uvd->canvas);
+ uvd->vcap.maxheight = VIDEOSIZE_Y(uvd->canvas);
+ uvd->vcap.minwidth = min_canvasWidth;
+ uvd->vcap.minheight = min_canvasHeight;
+
+ memset(&uvd->vchan, 0, sizeof(uvd->vchan));
+ uvd->vchan.flags = 0;
+ uvd->vchan.tuners = 0;
+ uvd->vchan.channel = 0;
+ uvd->vchan.type = VIDEO_TYPE_CAMERA;
+ strcpy(uvd->vchan.name, "Camera");
+}
+
+/*
+ * ibmcam_probe()
+ *
+ * This procedure queries device descriptor and accepts the interface
+ * if it looks like IBM C-it camera.
+ *
+ * History:
+ * 22-Jan-2000 Moved camera init code to ibmcam_open()
+ * 27=Jan-2000 Changed to use static structures, added locking.
+ * 24-May-2000 Corrected to prevent race condition (MOD_xxx_USE_COUNT).
+ * 03-Jul-2000 Fixed endianness bug.
+ * 12-Nov-2000 Reworked to comply with new probe() signature.
+ * 23-Jan-2001 Added compatibility with 2.2.x kernels.
+ */
+static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *devid)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct uvd *uvd = NULL;
+ int ix, i, nas, model=0, canvasX=0, canvasY=0;
+ int actInterface=-1, inactInterface=-1, maxPS=0;
+ __u8 ifnum = intf->altsetting->desc.bInterfaceNumber;
+ unsigned char video_ep = 0;
+
+ if (debug >= 1)
+ info("ibmcam_probe(%p,%u.)", intf, ifnum);
+
+ /* We don't handle multi-config cameras */
+ if (dev->descriptor.bNumConfigurations != 1)
+ return -ENODEV;
+
+ /* Check the version/revision */
+ switch (le16_to_cpu(dev->descriptor.bcdDevice)) {
+ case 0x0002:
+ if (ifnum != 2)
+ return -ENODEV;
+ model = IBMCAM_MODEL_1;
+ break;
+ case 0x030A:
+ if (ifnum != 0)
+ return -ENODEV;
+ if ((le16_to_cpu(dev->descriptor.idProduct) == NETCAM_PRODUCT_ID) ||
+ (le16_to_cpu(dev->descriptor.idProduct) == VEO_800D_PRODUCT_ID))
+ model = IBMCAM_MODEL_4;
+ else
+ model = IBMCAM_MODEL_2;
+ break;
+ case 0x0301:
+ if (ifnum != 0)
+ return -ENODEV;
+ model = IBMCAM_MODEL_3;
+ break;
+ default:
+ err("IBM camera with revision 0x%04x is not supported.",
+ le16_to_cpu(dev->descriptor.bcdDevice));
+ return -ENODEV;
+ }
+
+ /* Print detailed info on what we found so far */
+ do {
+ char *brand = NULL;
+ switch (le16_to_cpu(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, le16_to_cpu(dev->descriptor.bcdDevice));
+ } while (0);
+
+ /* Validate found interface: must have one ISO endpoint */
+ nas = intf->num_altsetting;
+ if (debug > 0)
+ info("Number of alternate settings=%d.", nas);
+ if (nas < 2) {
+ err("Too few alternate settings for this camera!");
+ return -ENODEV;
+ }
+ /* Validate all alternate settings */
+ for (ix=0; ix < nas; ix++) {
+ const struct usb_host_interface *interface;
+ const struct usb_endpoint_descriptor *endpoint;
+
+ interface = &intf->altsetting[ix];
+ i = interface->desc.bAlternateSetting;
+ if (interface->desc.bNumEndpoints != 1) {
+ err("Interface %d. has %u. endpoints!",
+ ifnum, (unsigned)(interface->desc.bNumEndpoints));
+ return -ENODEV;
+ }
+ endpoint = &interface->endpoint[0].desc;
+ if (video_ep == 0)
+ video_ep = endpoint->bEndpointAddress;
+ else if (video_ep != endpoint->bEndpointAddress) {
+ err("Alternate settings have different endpoint addresses!");
+ return -ENODEV;
+ }
+ if ((endpoint->bmAttributes & 0x03) != 0x01) {
+ err("Interface %d. has non-ISO endpoint!", ifnum);
+ return -ENODEV;
+ }
+ if ((endpoint->bEndpointAddress & 0x80) == 0) {
+ err("Interface %d. has ISO OUT endpoint!", ifnum);
+ return -ENODEV;
+ }
+ if (le16_to_cpu(endpoint->wMaxPacketSize) == 0) {
+ if (inactInterface < 0)
+ inactInterface = i;
+ else {
+ err("More than one inactive alt. setting!");
+ return -ENODEV;
+ }
+ } else {
+ if (actInterface < 0) {
+ actInterface = i;
+ maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
+ if (debug > 0)
+ info("Active setting=%d. maxPS=%d.", i, maxPS);
+ } else
+ err("More than one active alt. setting! Ignoring #%d.", i);
+ }
+ }
+ if ((maxPS <= 0) || (actInterface < 0) || (inactInterface < 0)) {
+ err("Failed to recognize the camera!");
+ return -ENODEV;
+ }
+
+ /* Validate options */
+ switch (model) {
+ case IBMCAM_MODEL_1:
+ RESTRICT_TO_RANGE(lighting, 0, 2);
+ RESTRICT_TO_RANGE(size, SIZE_128x96, SIZE_352x288);
+ if (framerate < 0)
+ framerate = 2;
+ canvasX = 352;
+ canvasY = 288;
+ break;
+ case IBMCAM_MODEL_2:
+ RESTRICT_TO_RANGE(lighting, 0, 15);
+ RESTRICT_TO_RANGE(size, SIZE_176x144, SIZE_352x240);
+ if (framerate < 0)
+ framerate = 2;
+ canvasX = 352;
+ canvasY = 240;
+ break;
+ case IBMCAM_MODEL_3:
+ RESTRICT_TO_RANGE(lighting, 0, 15); /* FIXME */
+ switch (size) {
+ case SIZE_160x120:
+ canvasX = 160;
+ canvasY = 120;
+ if (framerate < 0)
+ framerate = 2;
+ RESTRICT_TO_RANGE(framerate, 0, 5);
+ break;
+ default:
+ info("IBM camera: using 320x240");
+ size = SIZE_320x240;
+ /* No break here */
+ case SIZE_320x240:
+ canvasX = 320;
+ canvasY = 240;
+ if (framerate < 0)
+ framerate = 3;
+ RESTRICT_TO_RANGE(framerate, 0, 5);
+ break;
+ case SIZE_640x480:
+ canvasX = 640;
+ canvasY = 480;
+ framerate = 0; /* Slowest, and maybe even that is too fast */
+ break;
+ }
+ break;
+ case IBMCAM_MODEL_4:
+ RESTRICT_TO_RANGE(lighting, 0, 2);
+ switch (size) {
+ case SIZE_128x96:
+ canvasX = 128;
+ canvasY = 96;
+ break;
+ case SIZE_160x120:
+ canvasX = 160;
+ canvasY = 120;
+ break;
+ default:
+ info("IBM NetCamera: using 176x144");
+ size = SIZE_176x144;
+ /* No break here */
+ case SIZE_176x144:
+ canvasX = 176;
+ canvasY = 144;
+ break;
+ case SIZE_320x240:
+ canvasX = 320;
+ canvasY = 240;
+ break;
+ case SIZE_352x288:
+ canvasX = 352;
+ canvasY = 288;
+ break;
+ }
+ break;
+ default:
+ err("IBM camera: Model %d. not supported!", model);
+ return -ENODEV;
+ }
+
+ uvd = usbvideo_AllocateDevice(cams);
+ if (uvd != NULL) {
+ /* Here uvd is a fully allocated uvd object */
+ uvd->flags = flags;
+ uvd->debug = debug;
+ uvd->dev = dev;
+ uvd->iface = ifnum;
+ uvd->ifaceAltInactive = inactInterface;
+ uvd->ifaceAltActive = actInterface;
+ uvd->video_endp = video_ep;
+ uvd->iso_packet_len = maxPS;
+ uvd->paletteBits = 1L << VIDEO_PALETTE_RGB24;
+ uvd->defaultPalette = VIDEO_PALETTE_RGB24;
+ uvd->canvas = VIDEOSIZE(canvasX, canvasY);
+ uvd->videosize = ibmcam_size_to_videosize(size);
+
+ /* Initialize ibmcam-specific data */
+ assert(IBMCAM_T(uvd) != NULL);
+ IBMCAM_T(uvd)->camera_model = model;
+ IBMCAM_T(uvd)->initialized = 0;
+
+ ibmcam_configure_video(uvd);
+
+ i = usbvideo_RegisterVideoDevice(uvd);
+ if (i != 0) {
+ err("usbvideo_RegisterVideoDevice() failed.");
+ uvd = NULL;
+ }
+ }
+ usb_set_intfdata (intf, uvd);
+ return 0;
+}
+
+
+static 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 */
+};
+
+/*
+ * ibmcam_init()
+ *
+ * This code is run to initialize the driver.
+ *
+ * History:
+ * 1/27/00 Reworked to use statically allocated ibmcam structures.
+ * 21/10/00 Completely redesigned to use usbvideo services.
+ */
+static int __init ibmcam_init(void)
+{
+ struct usbvideo_cb cbTbl;
+ memset(&cbTbl, 0, sizeof(cbTbl));
+ cbTbl.probe = ibmcam_probe;
+ cbTbl.setupOnOpen = ibmcam_setup_on_open;
+ cbTbl.videoStart = ibmcam_video_start;
+ cbTbl.videoStop = ibmcam_video_stop;
+ cbTbl.processData = ibmcam_ProcessIsocData;
+ cbTbl.postProcess = usbvideo_DeinterlaceFrame;
+ cbTbl.adjustPicture = ibmcam_adjust_picture;
+ cbTbl.getFPS = ibmcam_calculate_fps;
+ return usbvideo_register(
+ &cams,
+ MAX_IBMCAM,
+ sizeof(ibmcam_t),
+ "ibmcam",
+ &cbTbl,
+ THIS_MODULE,
+ id_table);
+}
+
+static void __exit ibmcam_cleanup(void)
+{
+ usbvideo_Deregister(&cams);
+}
+
+MODULE_DEVICE_TABLE(usb, id_table);
+
+module_init(ibmcam_init);
+module_exit(ibmcam_cleanup);
diff --git a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c
new file mode 100644
index 000000000000..08521a2b4f3d
--- /dev/null
+++ b/drivers/usb/media/konicawc.c
@@ -0,0 +1,947 @@
+/*
+ * konicawc.c - konica webcam driver
+ *
+ * Author: Simon Evans <spse@secret.org.uk>
+ *
+ * Copyright (C) 2002 Simon Evans
+ *
+ * Licence: GPL
+ *
+ * Driver for USB webcams based on Konica chipset. This
+ * chipset is used in Intel YC76 camera.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/input.h>
+
+#include "usbvideo.h"
+
+#define MAX_BRIGHTNESS 108
+#define MAX_CONTRAST 108
+#define MAX_SATURATION 108
+#define MAX_SHARPNESS 108
+#define MAX_WHITEBAL 372
+#define MAX_SPEED 6
+
+
+#define MAX_CAMERAS 1
+
+#define DRIVER_VERSION "v1.4"
+#define DRIVER_DESC "Konica Webcam driver"
+
+enum ctrl_req {
+ SetWhitebal = 0x01,
+ SetBrightness = 0x02,
+ SetSharpness = 0x03,
+ SetContrast = 0x04,
+ SetSaturation = 0x05,
+};
+
+
+enum frame_sizes {
+ SIZE_160X120 = 0,
+ SIZE_160X136 = 1,
+ SIZE_176X144 = 2,
+ SIZE_320X240 = 3,
+
+};
+
+#define MAX_FRAME_SIZE SIZE_320X240
+
+static struct usbvideo *cams;
+
+#ifdef CONFIG_USB_DEBUG
+static int debug;
+#define DEBUG(n, format, arg...) \
+ if (n <= debug) { \
+ printk(KERN_DEBUG __FILE__ ":%s(): " format "\n", __FUNCTION__ , ## arg); \
+ }
+#else
+#define DEBUG(n, arg...)
+static const int debug = 0;
+#endif
+
+
+/* Some default values for initial camera settings,
+ can be set by modprobe */
+
+static int size;
+static int speed = 6; /* Speed (fps) 0 (slowest) to 6 (fastest) */
+static int brightness = MAX_BRIGHTNESS/2;
+static int contrast = MAX_CONTRAST/2;
+static int saturation = MAX_SATURATION/2;
+static int sharpness = MAX_SHARPNESS/2;
+static int whitebal = 3*(MAX_WHITEBAL/4);
+
+static int spd_to_iface[] = { 1, 0, 3, 2, 4, 5, 6 };
+
+/* These FPS speeds are from the windows config box. They are
+ * indexed on size (0-2) and speed (0-6). Divide by 3 to get the
+ * real fps.
+ */
+
+static int spd_to_fps[][7] = { { 24, 40, 48, 60, 72, 80, 100 },
+ { 24, 40, 48, 60, 72, 80, 100 },
+ { 18, 30, 36, 45, 54, 60, 75 },
+ { 6, 10, 12, 15, 18, 21, 25 } };
+
+struct cam_size {
+ u16 width;
+ u16 height;
+ u8 cmd;
+};
+
+static struct cam_size camera_sizes[] = { { 160, 120, 0x7 },
+ { 160, 136, 0xa },
+ { 176, 144, 0x4 },
+ { 320, 240, 0x5 } };
+
+struct konicawc {
+ u8 brightness; /* camera uses 0 - 9, x11 for real value */
+ u8 contrast; /* as above */
+ u8 saturation; /* as above */
+ u8 sharpness; /* as above */
+ u8 white_bal; /* 0 - 33, x11 for real value */
+ u8 speed; /* Stored as 0 - 6, used as index in spd_to_* (above) */
+ u8 size; /* Frame Size */
+ int height;
+ int width;
+ struct urb *sts_urb[USBVIDEO_NUMSBUF];
+ u8 sts_buf[USBVIDEO_NUMSBUF][FRAMES_PER_DESC];
+ struct urb *last_data_urb;
+ int lastframe;
+ int cur_frame_size; /* number of bytes in current frame size */
+ int maxline; /* number of lines per frame */
+ int yplanesz; /* Number of bytes in the Y plane */
+ unsigned int buttonsts:1;
+#ifdef CONFIG_INPUT
+ struct input_dev input;
+ char input_physname[64];
+#endif
+};
+
+
+#define konicawc_set_misc(uvd, req, value, index) konicawc_ctrl_msg(uvd, USB_DIR_OUT, req, value, index, NULL, 0)
+#define konicawc_get_misc(uvd, req, value, index, buf, sz) konicawc_ctrl_msg(uvd, USB_DIR_IN, req, value, index, buf, sz)
+#define konicawc_set_value(uvd, value, index) konicawc_ctrl_msg(uvd, USB_DIR_OUT, 2, value, index, NULL, 0)
+
+
+static int konicawc_ctrl_msg(struct uvd *uvd, u8 dir, u8 request, u16 value, u16 index, void *buf, int len)
+{
+ int retval = usb_control_msg(uvd->dev,
+ dir ? usb_rcvctrlpipe(uvd->dev, 0) : usb_sndctrlpipe(uvd->dev, 0),
+ request, 0x40 | dir, value, index, buf, len, 1000);
+ return retval < 0 ? retval : 0;
+}
+
+
+static inline void konicawc_camera_on(struct uvd *uvd)
+{
+ DEBUG(0, "camera on");
+ konicawc_set_misc(uvd, 0x2, 1, 0x0b);
+}
+
+
+static inline void konicawc_camera_off(struct uvd *uvd)
+{
+ DEBUG(0, "camera off");
+ konicawc_set_misc(uvd, 0x2, 0, 0x0b);
+}
+
+
+static void konicawc_set_camera_size(struct uvd *uvd)
+{
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+
+ konicawc_set_misc(uvd, 0x2, camera_sizes[cam->size].cmd, 0x08);
+ cam->width = camera_sizes[cam->size].width;
+ cam->height = camera_sizes[cam->size].height;
+ cam->yplanesz = cam->height * cam->width;
+ cam->cur_frame_size = (cam->yplanesz * 3) / 2;
+ cam->maxline = cam->yplanesz / 256;
+ uvd->videosize = VIDEOSIZE(cam->width, cam->height);
+}
+
+
+static int konicawc_setup_on_open(struct uvd *uvd)
+{
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+
+ DEBUG(1, "setting brightness to %d (%d)", cam->brightness,
+ cam->brightness * 11);
+ konicawc_set_value(uvd, cam->brightness, SetBrightness);
+ DEBUG(1, "setting white balance to %d (%d)", cam->white_bal,
+ cam->white_bal * 11);
+ konicawc_set_value(uvd, cam->white_bal, SetWhitebal);
+ DEBUG(1, "setting contrast to %d (%d)", cam->contrast,
+ cam->contrast * 11);
+ konicawc_set_value(uvd, cam->contrast, SetContrast);
+ DEBUG(1, "setting saturation to %d (%d)", cam->saturation,
+ cam->saturation * 11);
+ konicawc_set_value(uvd, cam->saturation, SetSaturation);
+ DEBUG(1, "setting sharpness to %d (%d)", cam->sharpness,
+ cam->sharpness * 11);
+ konicawc_set_value(uvd, cam->sharpness, SetSharpness);
+ konicawc_set_camera_size(uvd);
+ cam->lastframe = -2;
+ cam->buttonsts = 0;
+ return 0;
+}
+
+
+static void konicawc_adjust_picture(struct uvd *uvd)
+{
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+
+ konicawc_camera_off(uvd);
+ DEBUG(1, "new brightness: %d", uvd->vpic.brightness);
+ uvd->vpic.brightness = (uvd->vpic.brightness > MAX_BRIGHTNESS) ? MAX_BRIGHTNESS : uvd->vpic.brightness;
+ if(cam->brightness != uvd->vpic.brightness / 11) {
+ cam->brightness = uvd->vpic.brightness / 11;
+ DEBUG(1, "setting brightness to %d (%d)", cam->brightness,
+ cam->brightness * 11);
+ konicawc_set_value(uvd, cam->brightness, SetBrightness);
+ }
+
+ DEBUG(1, "new contrast: %d", uvd->vpic.contrast);
+ uvd->vpic.contrast = (uvd->vpic.contrast > MAX_CONTRAST) ? MAX_CONTRAST : uvd->vpic.contrast;
+ if(cam->contrast != uvd->vpic.contrast / 11) {
+ cam->contrast = uvd->vpic.contrast / 11;
+ DEBUG(1, "setting contrast to %d (%d)", cam->contrast,
+ cam->contrast * 11);
+ konicawc_set_value(uvd, cam->contrast, SetContrast);
+ }
+ konicawc_camera_on(uvd);
+}
+
+
+static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct urb *stsurb)
+{
+ char *cdata;
+ int i, totlen = 0;
+ unsigned char *status = stsurb->transfer_buffer;
+ int keep = 0, discard = 0, bad = 0;
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+
+ for (i = 0; i < dataurb->number_of_packets; i++) {
+ int button = cam->buttonsts;
+ unsigned char sts;
+ int n = dataurb->iso_frame_desc[i].actual_length;
+ int st = dataurb->iso_frame_desc[i].status;
+ cdata = dataurb->transfer_buffer +
+ dataurb->iso_frame_desc[i].offset;
+
+ /* Detect and ignore errored packets */
+ if (st < 0) {
+ DEBUG(1, "Data error: packet=%d. len=%d. status=%d.",
+ i, n, st);
+ uvd->stats.iso_err_count++;
+ continue;
+ }
+
+ /* Detect and ignore empty packets */
+ if (n <= 0) {
+ uvd->stats.iso_skip_count++;
+ continue;
+ }
+
+ /* See what the status data said about the packet */
+ sts = *(status+stsurb->iso_frame_desc[i].offset);
+
+ /* sts: 0x80-0xff: frame start with frame number (ie 0-7f)
+ * otherwise:
+ * bit 0 0: keep packet
+ * 1: drop packet (padding data)
+ *
+ * bit 4 0 button not clicked
+ * 1 button clicked
+ * button is used to `take a picture' (in software)
+ */
+
+ if(sts < 0x80) {
+ button = !!(sts & 0x40);
+ sts &= ~0x40;
+ }
+
+ /* work out the button status, but don't do
+ anything with it for now */
+
+ if(button != cam->buttonsts) {
+ DEBUG(2, "button: %sclicked", button ? "" : "un");
+ cam->buttonsts = button;
+#ifdef CONFIG_INPUT
+ input_report_key(&cam->input, BTN_0, cam->buttonsts);
+ input_sync(&cam->input);
+#endif
+ }
+
+ if(sts == 0x01) { /* drop frame */
+ discard++;
+ continue;
+ }
+
+ if((sts > 0x01) && (sts < 0x80)) {
+ info("unknown status %2.2x", sts);
+ bad++;
+ continue;
+ }
+ if(!sts && cam->lastframe == -2) {
+ DEBUG(2, "dropping frame looking for image start");
+ continue;
+ }
+
+ keep++;
+ if(sts & 0x80) { /* frame start */
+ unsigned char marker[] = { 0, 0xff, 0, 0x00 };
+
+ if(cam->lastframe == -2) {
+ DEBUG(2, "found initial image");
+ cam->lastframe = -1;
+ }
+
+ marker[3] = sts & 0x7F;
+ RingQueue_Enqueue(&uvd->dp, marker, 4);
+ totlen += 4;
+ }
+
+ totlen += n; /* Little local accounting */
+ RingQueue_Enqueue(&uvd->dp, cdata, n);
+ }
+ DEBUG(8, "finished: keep = %d discard = %d bad = %d added %d bytes",
+ keep, discard, bad, totlen);
+ return totlen;
+}
+
+
+static void resubmit_urb(struct uvd *uvd, struct urb *urb)
+{
+ int i, ret;
+ for (i = 0; i < FRAMES_PER_DESC; i++) {
+ urb->iso_frame_desc[i].status = 0;
+ }
+ urb->dev = uvd->dev;
+ urb->status = 0;
+ ret = usb_submit_urb(urb, GFP_ATOMIC);
+ DEBUG(3, "submitting urb of length %d", urb->transfer_buffer_length);
+ if(ret)
+ err("usb_submit_urb error (%d)", ret);
+
+}
+
+
+static void konicawc_isoc_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct uvd *uvd = urb->context;
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+
+ /* We don't want to do anything if we are about to be removed! */
+ if (!CAMERA_IS_OPERATIONAL(uvd))
+ return;
+
+ if (!uvd->streaming) {
+ DEBUG(1, "Not streaming, but interrupt!");
+ return;
+ }
+
+ DEBUG(3, "got frame %d len = %d buflen =%d", urb->start_frame, urb->actual_length, urb->transfer_buffer_length);
+
+ uvd->stats.urb_count++;
+
+ if (urb->transfer_buffer_length > 32) {
+ cam->last_data_urb = urb;
+ return;
+ }
+ /* Copy the data received into ring queue */
+ if(cam->last_data_urb) {
+ int len = 0;
+ if(urb->start_frame != cam->last_data_urb->start_frame)
+ err("Lost sync on frames");
+ else if (!urb->status && !cam->last_data_urb->status)
+ len = konicawc_compress_iso(uvd, cam->last_data_urb, urb);
+
+ resubmit_urb(uvd, cam->last_data_urb);
+ resubmit_urb(uvd, urb);
+ cam->last_data_urb = NULL;
+ uvd->stats.urb_length = len;
+ uvd->stats.data_count += len;
+ if(len)
+ RingQueue_WakeUpInterruptible(&uvd->dp);
+ return;
+ }
+ return;
+}
+
+
+static int konicawc_start_data(struct uvd *uvd)
+{
+ struct usb_device *dev = uvd->dev;
+ int i, errFlag;
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+ int pktsz;
+ struct usb_interface *intf;
+ struct usb_host_interface *interface = NULL;
+
+ intf = usb_ifnum_to_if(dev, uvd->iface);
+ if (intf)
+ interface = usb_altnum_to_altsetting(intf,
+ spd_to_iface[cam->speed]);
+ if (!interface)
+ return -ENXIO;
+ pktsz = le16_to_cpu(interface->endpoint[1].desc.wMaxPacketSize);
+ DEBUG(1, "pktsz = %d", pktsz);
+ if (!CAMERA_IS_OPERATIONAL(uvd)) {
+ err("Camera is not operational");
+ return -EFAULT;
+ }
+ uvd->curframe = -1;
+ konicawc_camera_on(uvd);
+ /* Alternate interface 1 is is the biggest frame size */
+ i = usb_set_interface(dev, uvd->iface, uvd->ifaceAltActive);
+ if (i < 0) {
+ err("usb_set_interface error");
+ uvd->last_error = i;
+ return -EBUSY;
+ }
+
+ /* 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);
+ urb->interval = 1;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->transfer_buffer = uvd->sbuf[i].data;
+ urb->complete = konicawc_isoc_irq;
+ urb->number_of_packets = FRAMES_PER_DESC;
+ urb->transfer_buffer_length = pktsz * FRAMES_PER_DESC;
+ for (j=k=0; j < FRAMES_PER_DESC; j++, k += pktsz) {
+ urb->iso_frame_desc[j].offset = k;
+ urb->iso_frame_desc[j].length = pktsz;
+ }
+
+ urb = cam->sts_urb[i];
+ urb->dev = dev;
+ urb->context = uvd;
+ urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp-1);
+ urb->interval = 1;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->transfer_buffer = cam->sts_buf[i];
+ urb->complete = konicawc_isoc_irq;
+ urb->number_of_packets = FRAMES_PER_DESC;
+ urb->transfer_buffer_length = FRAMES_PER_DESC;
+ for (j=0; j < FRAMES_PER_DESC; j++) {
+ urb->iso_frame_desc[j].offset = j;
+ urb->iso_frame_desc[j].length = 1;
+ }
+ }
+
+ cam->last_data_urb = NULL;
+
+ /* Submit all URBs */
+ for (i=0; i < USBVIDEO_NUMSBUF; i++) {
+ errFlag = usb_submit_urb(cam->sts_urb[i], GFP_KERNEL);
+ if (errFlag)
+ err("usb_submit_isoc(%d) ret %d", i, errFlag);
+
+ errFlag = usb_submit_urb(uvd->sbuf[i].urb, GFP_KERNEL);
+ if (errFlag)
+ err ("usb_submit_isoc(%d) ret %d", i, errFlag);
+ }
+
+ uvd->streaming = 1;
+ DEBUG(1, "streaming=1 video_endp=$%02x", uvd->video_endp);
+ return 0;
+}
+
+
+static void konicawc_stop_data(struct uvd *uvd)
+{
+ int i, j;
+ struct konicawc *cam;
+
+ if ((uvd == NULL) || (!uvd->streaming) || (uvd->dev == NULL))
+ return;
+
+ konicawc_camera_off(uvd);
+ uvd->streaming = 0;
+ cam = (struct konicawc *)uvd->user_data;
+ cam->last_data_urb = NULL;
+
+ /* Unschedule all of the iso td's */
+ for (i=0; i < USBVIDEO_NUMSBUF; i++) {
+ usb_kill_urb(uvd->sbuf[i].urb);
+ usb_kill_urb(cam->sts_urb[i]);
+ }
+
+ if (!uvd->remove_pending) {
+ /* Set packet size to 0 */
+ j = usb_set_interface(uvd->dev, uvd->iface, uvd->ifaceAltInactive);
+ if (j < 0) {
+ err("usb_set_interface() error %d.", j);
+ uvd->last_error = j;
+ }
+ }
+}
+
+
+static void konicawc_process_isoc(struct uvd *uvd, struct usbvideo_frame *frame)
+{
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+ int maxline = cam->maxline;
+ int yplanesz = cam->yplanesz;
+
+ assert(frame != NULL);
+
+ DEBUG(5, "maxline = %d yplanesz = %d", maxline, yplanesz);
+ DEBUG(3, "Frame state = %d", frame->scanstate);
+
+ if(frame->scanstate == ScanState_Scanning) {
+ int drop = 0;
+ int curframe;
+ int fdrops = 0;
+ DEBUG(3, "Searching for marker, queue len = %d", RingQueue_GetLength(&uvd->dp));
+ while(RingQueue_GetLength(&uvd->dp) >= 4) {
+ if ((RING_QUEUE_PEEK(&uvd->dp, 0) == 0x00) &&
+ (RING_QUEUE_PEEK(&uvd->dp, 1) == 0xff) &&
+ (RING_QUEUE_PEEK(&uvd->dp, 2) == 0x00) &&
+ (RING_QUEUE_PEEK(&uvd->dp, 3) < 0x80)) {
+ curframe = RING_QUEUE_PEEK(&uvd->dp, 3);
+ if(cam->lastframe >= 0) {
+ fdrops = (0x80 + curframe - cam->lastframe) & 0x7F;
+ fdrops--;
+ if(fdrops) {
+ info("Dropped %d frames (%d -> %d)", fdrops,
+ cam->lastframe, curframe);
+ }
+ }
+ cam->lastframe = curframe;
+ frame->curline = 0;
+ frame->scanstate = ScanState_Lines;
+ RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, 4);
+ break;
+ }
+ RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, 1);
+ drop++;
+ }
+ if(drop)
+ DEBUG(2, "dropped %d bytes looking for new frame", drop);
+ }
+
+ if(frame->scanstate == ScanState_Scanning)
+ return;
+
+ /* Try to move data from queue into frame buffer
+ * We get data in blocks of 384 bytes made up of:
+ * 256 Y, 64 U, 64 V.
+ * This needs to be written out as a Y plane, a U plane and a V plane.
+ */
+
+ while ( frame->curline < maxline && (RingQueue_GetLength(&uvd->dp) >= 384)) {
+ /* Y */
+ RingQueue_Dequeue(&uvd->dp, frame->data + (frame->curline * 256), 256);
+ /* U */
+ RingQueue_Dequeue(&uvd->dp, frame->data + yplanesz + (frame->curline * 64), 64);
+ /* V */
+ RingQueue_Dequeue(&uvd->dp, frame->data + (5 * yplanesz)/4 + (frame->curline * 64), 64);
+ frame->seqRead_Length += 384;
+ frame->curline++;
+ }
+ /* See if we filled the frame */
+ if (frame->curline == maxline) {
+ DEBUG(5, "got whole frame");
+
+ frame->frameState = FrameState_Done_Hold;
+ frame->curline = 0;
+ uvd->curframe = -1;
+ uvd->stats.frame_num++;
+ }
+}
+
+
+static int konicawc_find_fps(int size, int fps)
+{
+ int i;
+
+ fps *= 3;
+ DEBUG(1, "konica_find_fps: size = %d fps = %d", size, fps);
+ if(fps <= spd_to_fps[size][0])
+ return 0;
+
+ if(fps >= spd_to_fps[size][MAX_SPEED])
+ return MAX_SPEED;
+
+ for(i = 0; i < MAX_SPEED; i++) {
+ if((fps >= spd_to_fps[size][i]) && (fps <= spd_to_fps[size][i+1])) {
+ DEBUG(2, "fps %d between %d and %d", fps, i, i+1);
+ if( (fps - spd_to_fps[size][i]) < (spd_to_fps[size][i+1] - fps))
+ return i;
+ else
+ return i+1;
+ }
+ }
+ return MAX_SPEED+1;
+}
+
+
+static int konicawc_set_video_mode(struct uvd *uvd, struct video_window *vw)
+{
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+ int newspeed = cam->speed;
+ int newsize;
+ int x = vw->width;
+ int y = vw->height;
+ int fps = vw->flags;
+
+ if(x > 0 && y > 0) {
+ DEBUG(2, "trying to find size %d,%d", x, y);
+ for(newsize = 0; newsize <= MAX_FRAME_SIZE; newsize++) {
+ if((camera_sizes[newsize].width == x) && (camera_sizes[newsize].height == y))
+ break;
+ }
+ } else {
+ newsize = cam->size;
+ }
+
+ if(newsize > MAX_FRAME_SIZE) {
+ DEBUG(1, "couldn't find size %d,%d", x, y);
+ return -EINVAL;
+ }
+
+ if(fps > 0) {
+ DEBUG(1, "trying to set fps to %d", fps);
+ newspeed = konicawc_find_fps(newsize, fps);
+ DEBUG(1, "find_fps returned %d (%d)", newspeed, spd_to_fps[newsize][newspeed]);
+ }
+
+ if(newspeed > MAX_SPEED)
+ return -EINVAL;
+
+ DEBUG(1, "setting size to %d speed to %d", newsize, newspeed);
+ if((newsize == cam->size) && (newspeed == cam->speed)) {
+ DEBUG(1, "Nothing to do");
+ return 0;
+ }
+ DEBUG(0, "setting to %dx%d @ %d fps", camera_sizes[newsize].width,
+ camera_sizes[newsize].height, spd_to_fps[newsize][newspeed]/3);
+
+ konicawc_stop_data(uvd);
+ uvd->ifaceAltActive = spd_to_iface[newspeed];
+ DEBUG(1, "new interface = %d", uvd->ifaceAltActive);
+ cam->speed = newspeed;
+
+ if(cam->size != newsize) {
+ cam->size = newsize;
+ konicawc_set_camera_size(uvd);
+ }
+
+ /* Flush the input queue and clear any current frame in progress */
+
+ RingQueue_Flush(&uvd->dp);
+ cam->lastframe = -2;
+ if(uvd->curframe != -1) {
+ uvd->frame[uvd->curframe].curline = 0;
+ uvd->frame[uvd->curframe].seqRead_Length = 0;
+ uvd->frame[uvd->curframe].seqRead_Index = 0;
+ }
+
+ konicawc_start_data(uvd);
+ return 0;
+}
+
+
+static int konicawc_calculate_fps(struct uvd *uvd)
+{
+ struct konicawc *cam = uvd->user_data;
+ return spd_to_fps[cam->size][cam->speed]/3;
+}
+
+
+static void konicawc_configure_video(struct uvd *uvd)
+{
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+ u8 buf[2];
+
+ memset(&uvd->vpic, 0, sizeof(uvd->vpic));
+ memset(&uvd->vpic_old, 0x55, sizeof(uvd->vpic_old));
+
+ RESTRICT_TO_RANGE(brightness, 0, MAX_BRIGHTNESS);
+ RESTRICT_TO_RANGE(contrast, 0, MAX_CONTRAST);
+ RESTRICT_TO_RANGE(saturation, 0, MAX_SATURATION);
+ RESTRICT_TO_RANGE(sharpness, 0, MAX_SHARPNESS);
+ RESTRICT_TO_RANGE(whitebal, 0, MAX_WHITEBAL);
+
+ cam->brightness = brightness / 11;
+ cam->contrast = contrast / 11;
+ cam->saturation = saturation / 11;
+ cam->sharpness = sharpness / 11;
+ cam->white_bal = whitebal / 11;
+
+ uvd->vpic.colour = 108;
+ uvd->vpic.hue = 108;
+ uvd->vpic.brightness = brightness;
+ uvd->vpic.contrast = contrast;
+ uvd->vpic.whiteness = whitebal;
+ uvd->vpic.depth = 6;
+ uvd->vpic.palette = VIDEO_PALETTE_YUV420P;
+
+ memset(&uvd->vcap, 0, sizeof(uvd->vcap));
+ strcpy(uvd->vcap.name, "Konica Webcam");
+ uvd->vcap.type = VID_TYPE_CAPTURE;
+ uvd->vcap.channels = 1;
+ uvd->vcap.audios = 0;
+ uvd->vcap.minwidth = camera_sizes[SIZE_160X120].width;
+ uvd->vcap.minheight = camera_sizes[SIZE_160X120].height;
+ uvd->vcap.maxwidth = camera_sizes[SIZE_320X240].width;
+ uvd->vcap.maxheight = camera_sizes[SIZE_320X240].height;
+
+ memset(&uvd->vchan, 0, sizeof(uvd->vchan));
+ uvd->vchan.flags = 0 ;
+ uvd->vchan.tuners = 0;
+ uvd->vchan.channel = 0;
+ uvd->vchan.type = VIDEO_TYPE_CAMERA;
+ strcpy(uvd->vchan.name, "Camera");
+
+ /* Talk to device */
+ DEBUG(1, "device init");
+ if(!konicawc_get_misc(uvd, 0x3, 0, 0x10, buf, 2))
+ DEBUG(2, "3,10 -> %2.2x %2.2x", buf[0], buf[1]);
+ if(!konicawc_get_misc(uvd, 0x3, 0, 0x10, buf, 2))
+ DEBUG(2, "3,10 -> %2.2x %2.2x", buf[0], buf[1]);
+ if(konicawc_set_misc(uvd, 0x2, 0, 0xd))
+ DEBUG(2, "2,0,d failed");
+ DEBUG(1, "setting initial values");
+}
+
+
+static int konicawc_probe(struct usb_interface *intf, const struct usb_device_id *devid)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct uvd *uvd = NULL;
+ int ix, i, nas;
+ int actInterface=-1, inactInterface=-1, maxPS=0;
+ unsigned char video_ep = 0;
+
+ DEBUG(1, "konicawc_probe(%p)", intf);
+
+ /* We don't handle multi-config cameras */
+ if (dev->descriptor.bNumConfigurations != 1)
+ return -ENODEV;
+
+ info("Konica Webcam (rev. 0x%04x)", le16_to_cpu(dev->descriptor.bcdDevice));
+ RESTRICT_TO_RANGE(speed, 0, MAX_SPEED);
+
+ /* Validate found interface: must have one ISO endpoint */
+ nas = intf->num_altsetting;
+ if (nas != 8) {
+ err("Incorrect number of alternate settings (%d) for this camera!", nas);
+ return -ENODEV;
+ }
+ /* Validate all alternate settings */
+ for (ix=0; ix < nas; ix++) {
+ const struct usb_host_interface *interface;
+ const struct usb_endpoint_descriptor *endpoint;
+
+ interface = &intf->altsetting[ix];
+ i = interface->desc.bAlternateSetting;
+ if (interface->desc.bNumEndpoints != 2) {
+ err("Interface %d. has %u. endpoints!",
+ interface->desc.bInterfaceNumber,
+ (unsigned)(interface->desc.bNumEndpoints));
+ return -ENODEV;
+ }
+ endpoint = &interface->endpoint[1].desc;
+ DEBUG(1, "found endpoint: addr: 0x%2.2x maxps = 0x%4.4x",
+ endpoint->bEndpointAddress, le16_to_cpu(endpoint->wMaxPacketSize));
+ if (video_ep == 0)
+ video_ep = endpoint->bEndpointAddress;
+ else if (video_ep != endpoint->bEndpointAddress) {
+ err("Alternate settings have different endpoint addresses!");
+ return -ENODEV;
+ }
+ if ((endpoint->bmAttributes & 0x03) != 0x01) {
+ err("Interface %d. has non-ISO endpoint!",
+ interface->desc.bInterfaceNumber);
+ return -ENODEV;
+ }
+ if ((endpoint->bEndpointAddress & 0x80) == 0) {
+ err("Interface %d. has ISO OUT endpoint!",
+ interface->desc.bInterfaceNumber);
+ return -ENODEV;
+ }
+ if (le16_to_cpu(endpoint->wMaxPacketSize) == 0) {
+ if (inactInterface < 0)
+ inactInterface = i;
+ else {
+ err("More than one inactive alt. setting!");
+ return -ENODEV;
+ }
+ } else {
+ if (i == spd_to_iface[speed]) {
+ /* This one is the requested one */
+ actInterface = i;
+ }
+ }
+ if (le16_to_cpu(endpoint->wMaxPacketSize) > maxPS)
+ maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
+ }
+ if(actInterface == -1) {
+ err("Cant find required endpoint");
+ return -ENODEV;
+ }
+
+ DEBUG(1, "Selecting requested active setting=%d. maxPS=%d.", actInterface, maxPS);
+
+ uvd = usbvideo_AllocateDevice(cams);
+ if (uvd != NULL) {
+ struct konicawc *cam = (struct konicawc *)(uvd->user_data);
+ /* Here uvd is a fully allocated uvd object */
+ for(i = 0; i < USBVIDEO_NUMSBUF; i++) {
+ cam->sts_urb[i] = usb_alloc_urb(FRAMES_PER_DESC, GFP_KERNEL);
+ if(cam->sts_urb[i] == NULL) {
+ while(i--) {
+ usb_free_urb(cam->sts_urb[i]);
+ }
+ err("can't allocate urbs");
+ return -ENOMEM;
+ }
+ }
+ cam->speed = speed;
+ RESTRICT_TO_RANGE(size, SIZE_160X120, SIZE_320X240);
+ cam->width = camera_sizes[size].width;
+ cam->height = camera_sizes[size].height;
+ cam->size = size;
+
+ uvd->flags = 0;
+ uvd->debug = debug;
+ uvd->dev = dev;
+ uvd->iface = intf->altsetting->desc.bInterfaceNumber;
+ uvd->ifaceAltInactive = inactInterface;
+ uvd->ifaceAltActive = actInterface;
+ uvd->video_endp = video_ep;
+ uvd->iso_packet_len = maxPS;
+ uvd->paletteBits = 1L << VIDEO_PALETTE_YUV420P;
+ uvd->defaultPalette = VIDEO_PALETTE_YUV420P;
+ uvd->canvas = VIDEOSIZE(320, 240);
+ uvd->videosize = VIDEOSIZE(cam->width, cam->height);
+
+ /* Initialize konicawc specific data */
+ konicawc_configure_video(uvd);
+
+ i = usbvideo_RegisterVideoDevice(uvd);
+ uvd->max_frame_size = (320 * 240 * 3)/2;
+ if (i != 0) {
+ err("usbvideo_RegisterVideoDevice() failed.");
+ uvd = NULL;
+ }
+#ifdef CONFIG_INPUT
+ /* Register input device for button */
+ memset(&cam->input, 0, sizeof(struct input_dev));
+ cam->input.name = "Konicawc snapshot button";
+ cam->input.private = cam;
+ cam->input.evbit[0] = BIT(EV_KEY);
+ cam->input.keybit[LONG(BTN_0)] = BIT(BTN_0);
+ cam->input.id.bustype = BUS_USB;
+ cam->input.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+ cam->input.id.product = le16_to_cpu(dev->descriptor.idProduct);
+ cam->input.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
+ input_register_device(&cam->input);
+
+ usb_make_path(dev, cam->input_physname, 56);
+ strcat(cam->input_physname, "/input0");
+ cam->input.phys = cam->input_physname;
+ info("konicawc: %s on %s\n", cam->input.name, cam->input.phys);
+#endif
+ }
+
+ if (uvd) {
+ usb_set_intfdata (intf, uvd);
+ return 0;
+ }
+ return -EIO;
+}
+
+
+static void konicawc_free_uvd(struct uvd *uvd)
+{
+ int i;
+ struct konicawc *cam = (struct konicawc *)uvd->user_data;
+
+#ifdef CONFIG_INPUT
+ input_unregister_device(&cam->input);
+#endif
+ for (i=0; i < USBVIDEO_NUMSBUF; i++) {
+ usb_free_urb(cam->sts_urb[i]);
+ cam->sts_urb[i] = NULL;
+ }
+}
+
+
+static struct usb_device_id id_table[] = {
+ { USB_DEVICE(0x04c8, 0x0720) }, /* Intel YC 76 */
+ { } /* Terminating entry */
+};
+
+
+static int __init konicawc_init(void)
+{
+ struct usbvideo_cb cbTbl;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ memset(&cbTbl, 0, sizeof(cbTbl));
+ cbTbl.probe = konicawc_probe;
+ cbTbl.setupOnOpen = konicawc_setup_on_open;
+ cbTbl.processData = konicawc_process_isoc;
+ cbTbl.getFPS = konicawc_calculate_fps;
+ cbTbl.setVideoMode = konicawc_set_video_mode;
+ cbTbl.startDataPump = konicawc_start_data;
+ cbTbl.stopDataPump = konicawc_stop_data;
+ cbTbl.adjustPicture = konicawc_adjust_picture;
+ cbTbl.userFree = konicawc_free_uvd;
+ return usbvideo_register(
+ &cams,
+ MAX_CAMERAS,
+ sizeof(struct konicawc),
+ "konicawc",
+ &cbTbl,
+ THIS_MODULE,
+ id_table);
+}
+
+
+static void __exit konicawc_cleanup(void)
+{
+ usbvideo_Deregister(&cams);
+}
+
+
+MODULE_DEVICE_TABLE(usb, id_table);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Simon Evans <spse@secret.org.uk>");
+MODULE_DESCRIPTION(DRIVER_DESC);
+module_param(speed, int, 0);
+MODULE_PARM_DESC(speed, "Initial speed: 0 (slowest) - 6 (fastest)");
+module_param(size, int, 0);
+MODULE_PARM_DESC(size, "Initial Size 0: 160x120 1: 160x136 2: 176x144 3: 320x240");
+module_param(brightness, int, 0);
+MODULE_PARM_DESC(brightness, "Initial brightness 0 - 108");
+module_param(contrast, int, 0);
+MODULE_PARM_DESC(contrast, "Initial contrast 0 - 108");
+module_param(saturation, int, 0);
+MODULE_PARM_DESC(saturation, "Initial saturation 0 - 108");
+module_param(sharpness, int, 0);
+MODULE_PARM_DESC(sharpness, "Initial brightness 0 - 108");
+module_param(whitebal, int, 0);
+MODULE_PARM_DESC(whitebal, "Initial white balance 0 - 363");
+
+#ifdef CONFIG_USB_DEBUG
+module_param(debug, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)");
+#endif
+
+module_init(konicawc_init);
+module_exit(konicawc_cleanup);
diff --git a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c
new file mode 100644
index 000000000000..0fd7ffed3a98
--- /dev/null
+++ b/drivers/usb/media/ov511.c
@@ -0,0 +1,6131 @@
+/*
+ * OmniVision OV511 Camera-to-USB Bridge Driver
+ *
+ * Copyright (c) 1999-2003 Mark W. McClelland
+ * Original decompression code Copyright 1998-2000 OmniVision Technologies
+ * Many improvements by Bret Wallach <bwallac1@san.rr.com>
+ * Color fixes by by Orion Sky Lawlor <olawlor@acm.org> (2/26/2000)
+ * Snapshot code by Kevin Moore
+ * OV7620 fixes by Charl P. Botha <cpbotha@ieee.org>
+ * Changes by Claudio Matsuoka <claudio@conectiva.com>
+ * Original SAA7111A code by Dave Perks <dperks@ibm.net>
+ * URB error messages from pwc driver by Nemosoft
+ * generic_ioctl() code from videodev.c by Gerd Knorr and Alan Cox
+ * Memory management (rvmalloc) code from bttv driver, by Gerd Knorr and others
+ *
+ * Based on the Linux CPiA driver written by Peter Pregler,
+ * Scott J. Bertin and Johannes Erdfelt.
+ *
+ * Please see the file: Documentation/usb/ov511.txt
+ * and the website at: http://alpha.dyndns.org/ov511
+ * for more info.
+ *
+ * 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.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+#include <linux/ctype.h>
+#include <linux/pagemap.h>
+#include <asm/semaphore.h>
+#include <asm/processor.h>
+#include <linux/mm.h>
+#include <linux/device.h>
+
+#if defined (__i386__)
+ #include <asm/cpufeature.h>
+#endif
+
+#include "ov511.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.64 for Linux 2.5"
+#define EMAIL "mark@alpha.dyndns.org"
+#define DRIVER_AUTHOR "Mark McClelland <mark@alpha.dyndns.org> & Bret Wallach \
+ & Orion Sky Lawlor <olawlor@acm.org> & Kevin Moore & Charl P. Botha \
+ <cpbotha@ieee.org> & Claudio Matsuoka <claudio@conectiva.com>"
+#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 * bytes per YUV420 pixel (1.5) */
+#define MAX_FRAME_SIZE(w, h) ((w) * (h) * 3 / 2)
+
+#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 cams = 1;
+static int compress;
+static int testpat;
+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;
+static int ov518_color;
+
+module_param(autobright, int, 0);
+MODULE_PARM_DESC(autobright, "Sensor automatically changes brightness");
+module_param(autogain, int, 0);
+MODULE_PARM_DESC(autogain, "Sensor automatically changes gain");
+module_param(autoexp, int, 0);
+MODULE_PARM_DESC(autoexp, "Sensor automatically changes exposure");
+module_param(debug, int, 0);
+MODULE_PARM_DESC(debug,
+ "Debug level: 0=none, 1=inits, 2=warning, 3=config, 4=functions, 5=max");
+module_param(snapshot, int, 0);
+MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
+module_param(cams, int, 0);
+MODULE_PARM_DESC(cams, "Number of simultaneous cameras");
+module_param(compress, int, 0);
+MODULE_PARM_DESC(compress, "Turn on compression");
+module_param(testpat, int, 0);
+MODULE_PARM_DESC(testpat,
+ "Replace image with vertical bar testpattern (only partially working)");
+module_param(dumppix, int, 0);
+MODULE_PARM_DESC(dumppix, "Dump raw pixel data");
+module_param(led, int, 0);
+MODULE_PARM_DESC(led,
+ "LED policy (OV511+ or later). 0=off, 1=on (default), 2=auto (on when open)");
+module_param(dump_bridge, int, 0);
+MODULE_PARM_DESC(dump_bridge, "Dump the bridge registers");
+module_param(dump_sensor, int, 0);
+MODULE_PARM_DESC(dump_sensor, "Dump the sensor registers");
+module_param(printph, int, 0);
+MODULE_PARM_DESC(printph, "Print frame start/end headers");
+module_param(phy, int, 0);
+MODULE_PARM_DESC(phy, "Prediction range (horiz. Y)");
+module_param(phuv, int, 0);
+MODULE_PARM_DESC(phuv, "Prediction range (horiz. UV)");
+module_param(pvy, int, 0);
+MODULE_PARM_DESC(pvy, "Prediction range (vert. Y)");
+module_param(pvuv, int, 0);
+MODULE_PARM_DESC(pvuv, "Prediction range (vert. UV)");
+module_param(qhy, int, 0);
+MODULE_PARM_DESC(qhy, "Quantization threshold (horiz. Y)");
+module_param(qhuv, int, 0);
+MODULE_PARM_DESC(qhuv, "Quantization threshold (horiz. UV)");
+module_param(qvy, int, 0);
+MODULE_PARM_DESC(qvy, "Quantization threshold (vert. Y)");
+module_param(qvuv, int, 0);
+MODULE_PARM_DESC(qvuv, "Quantization threshold (vert. UV)");
+module_param(lightfreq, int, 0);
+MODULE_PARM_DESC(lightfreq,
+ "Light frequency. Set to 50 or 60 Hz, or zero for default settings");
+module_param(bandingfilter, int, 0);
+MODULE_PARM_DESC(bandingfilter,
+ "Enable banding filter (to reduce effects of fluorescent lighting)");
+module_param(clockdiv, int, 0);
+MODULE_PARM_DESC(clockdiv, "Force pixel clock divisor to a specific value");
+module_param(packetsize, int, 0);
+MODULE_PARM_DESC(packetsize, "Force a specific isoc packet size");
+module_param(framedrop, int, 0);
+MODULE_PARM_DESC(framedrop, "Force a specific frame drop register setting");
+module_param(fastset, int, 0);
+MODULE_PARM_DESC(fastset, "Allows picture settings to take effect immediately");
+module_param(force_palette, int, 0);
+MODULE_PARM_DESC(force_palette, "Force the palette to a specific value");
+module_param(backlight, int, 0);
+MODULE_PARM_DESC(backlight, "For objects that are lit from behind");
+static int num_uv;
+module_param_array(unit_video, int, &num_uv, 0);
+MODULE_PARM_DESC(unit_video,
+ "Force use of specific minor number(s). 0 is not allowed.");
+module_param(remove_zeros, int, 0);
+MODULE_PARM_DESC(remove_zeros,
+ "Remove zero-padding from uncompressed incoming data");
+module_param(mirror, int, 0);
+MODULE_PARM_DESC(mirror, "Reverse image horizontally");
+module_param(ov518_color, int, 0);
+MODULE_PARM_DESC(ov518_color, "Enable OV518 color (experimental)");
+
+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. */
+#if defined(__i386__) || defined(__x86_64__)
+#define ov51x_mmx_available (cpu_has_mmx)
+#else
+#define ov51x_mmx_available (0)
+#endif
+
+static 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 */
+ { 134, "Ezonics EZCam II" },
+ { 192, "Webeye 2000B" },
+ { 253, "Alpha Vision Tech. AlphaCam SE" },
+ { -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 }
+};
+
+/**********************************************************************
+ * Memory management
+ **********************************************************************/
+static void *
+rvmalloc(unsigned long size)
+{
+ void *mem;
+ unsigned long adr;
+
+ size = PAGE_ALIGN(size);
+ mem = vmalloc_32(size);
+ if (!mem)
+ return NULL;
+
+ memset(mem, 0, size); /* Clear the ram out, no junk to the user */
+ adr = (unsigned long) mem;
+ while (size > 0) {
+ SetPageReserved(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) {
+ ClearPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+ vfree(mem);
+}
+
+/**********************************************************************
+ *
+ * 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, 1000);
+ 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, 1000);
+
+ 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);
+
+ *((__le32 *)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, 1000);
+ 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)
+ break;
+
+ /* Write "value" to I2C data port of OV511 */
+ rc = reg_w(ov, R51x_I2C_DATA, value);
+ if (rc < 0)
+ break;
+
+ /* Initiate 3-byte write cycle */
+ rc = reg_w(ov, R511_I2C_CTL, 0x01);
+ if (rc < 0)
+ break;
+
+ /* Retry until idle */
+ do
+ rc = reg_r(ov, R511_I2C_CTL);
+ while (rc > 0 && ((rc&1) == 0));
+ if (rc < 0)
+ break;
+
+ /* Ack? */
+ if ((rc&2) == 0) {
+ rc = 0;
+ break;
+ }
+#if 0
+ /* I2C abort */
+ reg_w(ov, R511_I2C_CTL, 0x10);
+#endif
+ if (--retries < 0) {
+ err("i2c write retries exhausted");
+ rc = -1;
+ break;
+ }
+ }
+
+ return rc;
+}
+
+/* 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;
+
+ /* Retry until idle */
+ do
+ rc = reg_r(ov, R511_I2C_CTL);
+ while (rc > 0 && ((rc&1) == 0));
+ 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;
+
+ /* Retry until idle */
+ do
+ rc = reg_r(ov, R511_I2C_CTL);
+ while (rc > 0 && ((rc&1) == 0));
+ 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 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;
+}
+
+/* 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;
+}
+
+/* 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);
+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, 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, rc;
+
+ for (i = reg1; i <= regn; i++) {
+ rc = reg_r(ov, i);
+ info("OV511[0x%02X] = 0x%02X", i, rc);
+ }
+}
+
+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);
+
+}
+
+static void
+ov518_dump_regs(struct usb_ov511 *ov)
+{
+ info("VIDEO MODE REGS");
+ dump_reg_range(ov, 0x20, 0x2f);
+ info("DATA PUMP AND SNAPSHOT REGS");
+ dump_reg_range(ov, 0x30, 0x3f);
+ info("I2C REGS");
+ dump_reg_range(ov, 0x40, 0x4f);
+ info("SYSTEM CONTROL AND VENDOR REGS");
+ dump_reg_range(ov, 0x50, 0x5f);
+ info("60 - 6F");
+ dump_reg_range(ov, 0x60, 0x6f);
+ info("70 - 7F");
+ dump_reg_range(ov, 0x70, 0x7f);
+ info("Y QUANTIZATION TABLE");
+ dump_reg_range(ov, 0x80, 0x8f);
+ info("UV QUANTIZATION TABLE");
+ dump_reg_range(ov, 0x90, 0x9f);
+ info("A0 - BF");
+ dump_reg_range(ov, 0xa0, 0xbf);
+ info("CBR");
+ dump_reg_range(ov, 0xc0, 0xcf);
+}
+#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;
+}
+
+/* Sleeps until no frames are active. Returns !0 if got signal */
+static int
+ov51x_wait_frames_inactive(struct usb_ov511 *ov)
+{
+ return wait_event_interruptible(ov->wq, ov->curframe < 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, 0x00);
+ reg_w(ov, R51x_SYS_SNAP, 0x02);
+ reg_w(ov, R51x_SYS_SNAP, 0x00);
+ } else if (ov->bclass == BCL_OV518) {
+ warn("snapshot reset not supported yet on OV518(+)");
+ } else {
+ err("clear snap: invalid bridge type");
+ }
+}
+
+#if 0
+/* 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 */
+ msleep(150);
+
+ 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 */
+ msleep(150);
+ /* 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 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 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;
+
+ return 0;
+}
+
+#if 0
+// 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;
+}
+#endif
+
+/* 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 = NULL;
+ 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;
+}
+
+/* Turns on or off the LED. Only has an effect with OV511+/OV518(+) */
+static 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 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 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 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 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 */
+ 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:
+ i2c_w(ov, 0x14, qvga?0x24:0x04);
+ break;
+ case SEN_OV6630:
+ i2c_w(ov, 0x14, qvga?0xa0:0x80);
+ 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);
+ }
+
+ if (ov->sensor == SEN_OV6630 && ov->bridge == BRG_OV518
+ && ov518_color) {
+ i2c_w_mask(ov, 0x12, 0x00, 0x10);
+ i2c_w_mask(ov, 0x13, 0x00, 0x20);
+ } else {
+ 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);
+ }
+
+ /* The OV518 needs special treatment. Although both the OV518
+ * and the OV6630 support a 16-bit video bus, only the 8 bit Y
+ * bus is actually used. The UV bus is tied to ground.
+ * Therefore, the OV6630 needs to be in 8-bit multiplexed
+ * output mode */
+
+ if (ov->sensor == SEN_OV6630 && ov->bridge == BRG_OV518
+ && ov518_color) {
+ i2c_w_mask(ov, 0x12, 0x10, 0x10);
+ i2c_w_mask(ov, 0x13, 0x20, 0x20);
+ } else {
+ i2c_w_mask(ov, 0x13, 0x00, 0x20);
+ }
+ }
+
+ /******** Clock programming ********/
+
+ /* 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);
+
+ /* Test Pattern */
+ i2c_w_mask(ov, 0x12, (testpat?0x02:0x00), 0x02);
+
+ /* Enable auto white balance */
+ i2c_w_mask(ov, 0x12, 0x04, 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 filter 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);
+
+ if (ov->bridge == BRG_OV518 && ov518_color) {
+ /* OV518 needs U and V swapped */
+ i2c_w_mask(ov, 0x15, 0x00, 0x01);
+
+ if (mode == VIDEO_PALETTE_GREY) {
+ /* Set 16-bit input format (UV data are ignored) */
+ reg_w_mask(ov, 0x20, 0x00, 0x08);
+
+ /* Set 8-bit (4:0:0) output format */
+ reg_w_mask(ov, 0x28, 0x00, 0xf0);
+ reg_w_mask(ov, 0x38, 0x00, 0xf0);
+ } else {
+ /* Set 8-bit (YVYU) input format */
+ reg_w_mask(ov, 0x20, 0x08, 0x08);
+
+ /* Set 12-bit (4:2:0) output format */
+ reg_w_mask(ov, 0x28, 0x80, 0xf0);
+ reg_w_mask(ov, 0x38, 0x80, 0xf0);
+ }
+ } else {
+ 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_YUV420;
+
+ 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;
+}
+
+/**********************************************************************
+ *
+ * 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 (YUV 4:0:0) images, data show 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 YUV 4:2:0 images, the data show 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:
+ *
+ * 0 1 ... 7
+ * 8 9 ... 15
+ * ...
+ * 56 57 ... 63
+ *
+ * U and V are shipped at half resolution (1 U,V sample -> one 2x2 block).
+ *
+ * The next 256 bytes are full resolution Y data and 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
+ *
+ * Note that the U and V data in one segment represent a 16 x 16 pixel
+ * area, but the Y data represent 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
+ * this puts the data on the standard output and can be analyzed with the
+ * parseppm.c utility I wrote. That's a much faster way for figuring out how
+ * these data are 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;
+ }
+}
+
+/**********************************************************************
+ *
+ * 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)
+ goto nosys;
+
+ if (!ov->decomp_ops->owner) {
+ ov->decomp_ops = NULL;
+ goto nosys;
+ }
+
+ if (!try_module_get(ov->decomp_ops->owner))
+ goto nosys;
+
+ unlock_kernel();
+ return 0;
+
+ nosys:
+ 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) {
+ module_put(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
+ *
+ **********************************************************************/
+
+/* 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 standard YUV420P */
+static void
+ov51x_postprocess_yuv420(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
+ yuv420raw_to_yuv420p(frame, frame->rawdata,
+ frame->tempdata);
+
+ deinterlace(frame, RAWFMT_YUV420, frame->tempdata,
+ frame->data);
+ } else {
+ if (frame->compressed)
+ decompress(ov, frame, frame->rawdata, frame->data);
+ else
+ yuv420raw_to_yuv420p(frame, frame->rawdata,
+ frame->data);
+ }
+}
+
+/* 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:
+ 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;
+ 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;
+ 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, struct pt_regs *regs)
+{
+ int i;
+ struct usb_ov511 *ov;
+ struct ov511_sbuf *sbuf;
+
+ if (!urb->context) {
+ PDEBUG(4, "no context");
+ 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);
+ }
+ }
+
+ /* Resubmit this URB */
+ urb->dev = ov->dev;
+ if ((i = usb_submit_urb(urb, GFP_ATOMIC)) != 0)
+ err("usb_submit_urb() ret %d", i);
+
+ 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, GFP_KERNEL);
+ 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 = URB_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;
+ urb->interval = 1;
+ 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;
+
+ for (n = 0; n < OV511_NUMSBUF; n++) {
+ ov->sbuf[n].urb->dev = ov->dev;
+ err = usb_submit_urb(ov->sbuf[n].urb, GFP_KERNEL);
+ 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_kill_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 */
+
+ return 0;
+}
+
+/****************************************************************************
+ *
+ * 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;
+ }
+
+ vfree(ov->rawfbuf);
+ ov->rawfbuf = NULL;
+
+ 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_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)
+{
+ 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 inode *inode, struct file *file)
+{
+ struct video_device *vdev = video_devdata(file);
+ struct usb_ov511 *ov = video_get_drvdata(vdev);
+ int err, i;
+
+ PDEBUG(4, "opening");
+
+ down(&ov->lock);
+
+ err = -EBUSY;
+ if (ov->user)
+ 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_alloc(ov);
+ if (err < 0)
+ goto out;
+
+ err = ov51x_init_isoc(ov);
+ if (err) {
+ ov51x_dealloc(ov);
+ goto out;
+ }
+
+ ov->user++;
+ file->private_data = vdev;
+
+ if (ov->led_policy == LED_AUTO)
+ ov51x_led_control(ov, 1);
+
+out:
+ up(&ov->lock);
+ return err;
+}
+
+static int
+ov51x_v4l1_close(struct inode *inode, struct file *file)
+{
+ struct video_device *vdev = file->private_data;
+ struct usb_ov511 *ov = video_get_drvdata(vdev);
+
+ 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);
+
+ 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);
+ kfree(ov);
+ ov = NULL;
+ }
+
+ file->private_data = NULL;
+ return 0;
+}
+
+/* Do not call this function directly! */
+static int
+ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
+{
+ struct video_device *vdev = file->private_data;
+ struct usb_ov511 *ov = video_get_drvdata(vdev);
+ 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;
+
+ /* Can we get these from frame[0]? -claudio? */
+ p->depth = ov->frame[0].depth;
+ p->palette = ov->frame[0].format;
+
+ return 0;
+ }
+ case VIDIOCSPICT:
+ {
+ struct video_picture *p = arg;
+ int i, rc;
+
+ 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");
+
+ rc = ov51x_wait_frames_inactive(ov);
+ if (rc)
+ return rc;
+
+ 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, rc;
+
+ 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
+
+ rc = ov51x_wait_frames_inactive(ov);
+ if (rc)
+ return rc;
+
+ rc = mode_init_regs(ov, vw->width, vw->height,
+ ov->frame[0].format, ov->sub_flag);
+ if (rc < 0)
+ return rc;
+
+ 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 rc, 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) {
+ PDEBUG(2, "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)) {
+ PDEBUG(2, "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");
+
+ rc = ov51x_wait_frames_inactive(ov);
+ if (rc)
+ return rc;
+
+ rc = mode_init_regs(ov, vm->width, vm->height,
+ vm->format, ov->sub_flag);
+#if 0
+ if (rc < 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) {
+ if ((rc = ov51x_new_frame(ov, fnum)) < 0)
+ return rc;
+ goto redo;
+ }
+ /* Fall through */
+ case FRAME_DONE:
+ if (ov->snap_enabled && !frame->snapshot) {
+ if ((rc = ov51x_new_frame(ov, fnum)) < 0)
+ return rc;
+ 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 */
+
+ return 0;
+ }
+ 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;
+ }
+ case OV511IOC_WI2C:
+ {
+ struct ov511_i2c_struct *w = arg;
+
+ return i2c_w_slave(ov, w->slave, w->reg, w->value, w->mask);
+ }
+ case OV511IOC_RI2C:
+ {
+ struct ov511_i2c_struct *r = arg;
+ int rc;
+
+ rc = i2c_r_slave(ov, r->slave, r->reg);
+ if (rc < 0)
+ return rc;
+
+ r->value = rc;
+ return 0;
+ }
+ default:
+ PDEBUG(3, "Unsupported IOCtl: 0x%X", cmd);
+ return -ENOIOCTLCMD;
+ } /* end switch */
+
+ return 0;
+}
+
+static int
+ov51x_v4l1_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ struct video_device *vdev = file->private_data;
+ struct usb_ov511 *ov = video_get_drvdata(vdev);
+ int rc;
+
+ if (down_interruptible(&ov->lock))
+ return -EINTR;
+
+ rc = video_usercopy(inode, file, cmd, arg, ov51x_v4l1_ioctl_internal);
+
+ up(&ov->lock);
+ return rc;
+}
+
+static ssize_t
+ov51x_v4l1_read(struct file *file, char __user *buf, size_t cnt, loff_t *ppos)
+{
+ struct video_device *vdev = file->private_data;
+ int noblock = file->f_flags&O_NONBLOCK;
+ unsigned long count = cnt;
+ struct usb_ov511 *ov = video_get_drvdata(vdev);
+ 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 have 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 file *file, struct vm_area_struct *vma)
+{
+ struct video_device *vdev = file->private_data;
+ unsigned long start = vma->vm_start;
+ unsigned long size = vma->vm_end - vma->vm_start;
+ struct usb_ov511 *ov = video_get_drvdata(vdev);
+ 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 = vmalloc_to_pfn((void *)pos);
+ if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {
+ up(&ov->lock);
+ return -EAGAIN;
+ }
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+ if (size > PAGE_SIZE)
+ size -= PAGE_SIZE;
+ else
+ size = 0;
+ }
+
+ up(&ov->lock);
+ return 0;
+}
+
+static struct file_operations ov511_fops = {
+ .owner = THIS_MODULE,
+ .open = ov51x_v4l1_open,
+ .release = ov51x_v4l1_close,
+ .read = ov51x_v4l1_read,
+ .mmap = ov51x_v4l1_mmap,
+ .ioctl = ov51x_v4l1_ioctl,
+ .llseek = no_llseek,
+};
+
+static struct video_device vdev_template = {
+ .owner = THIS_MODULE,
+ .name = "OV511 USB Camera",
+ .type = VID_TYPE_CAPTURE,
+ .hardware = VID_HARDWARE_OV511,
+ .fops = &ov511_fops,
+ .release = video_device_release,
+ .minor = -1,
+};
+
+/****************************************************************************
+ *
+ * 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;
+
+ /* Lawrence Glaister <lg@jfm.bc.ca> reports:
+ *
+ * Register 0x0f in the 7610 has the following effects:
+ *
+ * 0x85 (AEC method 1): Best overall, good contrast range
+ * 0x45 (AEC method 2): Very overexposed
+ * 0xa5 (spec sheet default): Ok, but the black level is
+ * shifted resulting in loss of contrast
+ * 0x05 (old driver setting): very overexposed, too much
+ * contrast
+ */
+ static struct ov511_regvals aRegvalsNorm7610[] = {
+ { 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, 0x38, 0x81 },
+ { OV511_I2C_BUS, 0x28, 0x24 }, /* 0c */
+ { OV511_I2C_BUS, 0x0f, 0x85 }, /* lg's setting */
+ { OV511_I2C_BUS, 0x15, 0x01 },
+ { OV511_I2C_BUS, 0x20, 0x1c },
+ { 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 },
+ { 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 },
+ };
+
+ 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 */
+ msleep(150);
+
+ 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 {
+ i++;
+ }
+ }
+
+// 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");
+ 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+/7620AE 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 }, /* END MARKER */
+ };
+
+ static struct ov511_regvals aRegvalsNorm6x30[] = {
+ /*OK*/ { OV511_I2C_BUS, 0x12, 0x80 }, /* reset */
+ { OV511_I2C_BUS, 0x11, 0x00 },
+ /*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 },
+// /*04?*/ { OV511_I2C_BUS, 0x14, 0x80 },
+ { OV511_I2C_BUS, 0x16, 0x03 },
+// /*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 */
+ { 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 */
+// /*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 */
+ { OV511_I2C_BUS, 0x3d, 0x80 },
+// /*A*/ { OV511_I2C_BUS, 0x3f, 0x0e },
+
+ /* 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 },
+ { OV511_I2C_BUS, 0x4d, 0x10 }, /* U = 0.563u, V = 0.714v */
+ /*c1?*/ { OV511_I2C_BUS, 0x4e, 0x40 },
+
+ /* UV average mode, color killer: strongest */
+ { OV511_I2C_BUS, 0x4f, 0x07 },
+
+ { OV511_I2C_BUS, 0x54, 0x23 }, /* Max AGC gain: 18dB */
+ { OV511_I2C_BUS, 0x57, 0x81 }, /* (default) */
+ { OV511_I2C_BUS, 0x59, 0x01 }, /* AGC dark current comp: +1 */
+ { OV511_I2C_BUS, 0x5a, 0x2c }, /* (undocumented) */
+ { OV511_I2C_BUS, 0x5b, 0x0f }, /* AWB chrominance levels */
+// { OV511_I2C_BUS, 0x5c, 0x10 },
+ { OV511_DONE_BUS, 0x0, 0x00 }, /* END MARKER */
+ };
+
+ 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;
+ info("Sensor is an OV6630");
+ } else if ((rc & 3) == 1) {
+ ov->sensor = SEN_OV6620;
+ info("Sensor is an OV6620");
+ } else if ((rc & 3) == 2) {
+ ov->sensor = SEN_OV6630;
+ info("Sensor is an OV6630AE");
+ } else if ((rc & 3) == 3) {
+ ov->sensor = SEN_OV6630;
+ info("Sensor is an OV6630AF");
+ }
+
+ /* 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, 0x00 },
+ { OV511_REG_BUS, R51x_SYS_SNAP, 0x02 },
+ { OV511_REG_BUS, R51x_SYS_SNAP, 0x00 },
+ { 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, 0x00 },
+ { OV511_REG_BUS, R51x_SYS_SNAP, 0x02 },
+ { OV511_REG_BUS, R51x_SYS_SNAP, 0x00 },
+ { 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 },
+ { 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 },
+ { 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;
+
+ if (ov->bridge == BRG_OV518)
+ {
+ struct usb_interface *ifp;
+ struct usb_host_interface *alt;
+ __u16 mxps = 0;
+
+ ifp = usb_ifnum_to_if(ov->dev, 0);
+ if (ifp) {
+ alt = usb_altnum_to_altsetting(ifp, 7);
+ if (alt)
+ mxps = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
+ }
+
+ /* Some OV518s have packet numbering by default, some don't */
+ if (mxps == 897)
+ ov->packet_numbering = 1;
+ else
+ ov->packet_numbering = 0;
+ } else {
+ /* OV518+ has packet numbering turned on by default */
+ 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;
+}
+
+/****************************************************************************
+ * sysfs
+ ***************************************************************************/
+
+static inline struct usb_ov511 *cd_to_ov(struct class_device *cd)
+{
+ struct video_device *vdev = to_video_device(cd);
+ return video_get_drvdata(vdev);
+}
+
+static ssize_t show_custom_id(struct class_device *cd, char *buf)
+{
+ struct usb_ov511 *ov = cd_to_ov(cd);
+ return sprintf(buf, "%d\n", ov->customid);
+}
+static CLASS_DEVICE_ATTR(custom_id, S_IRUGO, show_custom_id, NULL);
+
+static ssize_t show_model(struct class_device *cd, char *buf)
+{
+ struct usb_ov511 *ov = cd_to_ov(cd);
+ return sprintf(buf, "%s\n", ov->desc);
+}
+static CLASS_DEVICE_ATTR(model, S_IRUGO, show_model, NULL);
+
+static ssize_t show_bridge(struct class_device *cd, char *buf)
+{
+ struct usb_ov511 *ov = cd_to_ov(cd);
+ return sprintf(buf, "%s\n", symbolic(brglist, ov->bridge));
+}
+static CLASS_DEVICE_ATTR(bridge, S_IRUGO, show_bridge, NULL);
+
+static ssize_t show_sensor(struct class_device *cd, char *buf)
+{
+ struct usb_ov511 *ov = cd_to_ov(cd);
+ return sprintf(buf, "%s\n", symbolic(senlist, ov->sensor));
+}
+static CLASS_DEVICE_ATTR(sensor, S_IRUGO, show_sensor, NULL);
+
+static ssize_t show_brightness(struct class_device *cd, char *buf)
+{
+ struct usb_ov511 *ov = cd_to_ov(cd);
+ unsigned short x;
+
+ if (!ov->dev)
+ return -ENODEV;
+ sensor_get_brightness(ov, &x);
+ return sprintf(buf, "%d\n", x >> 8);
+}
+static CLASS_DEVICE_ATTR(brightness, S_IRUGO, show_brightness, NULL);
+
+static ssize_t show_saturation(struct class_device *cd, char *buf)
+{
+ struct usb_ov511 *ov = cd_to_ov(cd);
+ unsigned short x;
+
+ if (!ov->dev)
+ return -ENODEV;
+ sensor_get_saturation(ov, &x);
+ return sprintf(buf, "%d\n", x >> 8);
+}
+static CLASS_DEVICE_ATTR(saturation, S_IRUGO, show_saturation, NULL);
+
+static ssize_t show_contrast(struct class_device *cd, char *buf)
+{
+ struct usb_ov511 *ov = cd_to_ov(cd);
+ unsigned short x;
+
+ if (!ov->dev)
+ return -ENODEV;
+ sensor_get_contrast(ov, &x);
+ return sprintf(buf, "%d\n", x >> 8);
+}
+static CLASS_DEVICE_ATTR(contrast, S_IRUGO, show_contrast, NULL);
+
+static ssize_t show_hue(struct class_device *cd, char *buf)
+{
+ struct usb_ov511 *ov = cd_to_ov(cd);
+ unsigned short x;
+
+ if (!ov->dev)
+ return -ENODEV;
+ sensor_get_hue(ov, &x);
+ return sprintf(buf, "%d\n", x >> 8);
+}
+static CLASS_DEVICE_ATTR(hue, S_IRUGO, show_hue, NULL);
+
+static ssize_t show_exposure(struct class_device *cd, char *buf)
+{
+ struct usb_ov511 *ov = cd_to_ov(cd);
+ unsigned char exp;
+
+ if (!ov->dev)
+ return -ENODEV;
+ sensor_get_exposure(ov, &exp);
+ return sprintf(buf, "%d\n", exp >> 8);
+}
+static CLASS_DEVICE_ATTR(exposure, S_IRUGO, show_exposure, NULL);
+
+static void ov_create_sysfs(struct video_device *vdev)
+{
+ video_device_create_file(vdev, &class_device_attr_custom_id);
+ video_device_create_file(vdev, &class_device_attr_model);
+ video_device_create_file(vdev, &class_device_attr_bridge);
+ video_device_create_file(vdev, &class_device_attr_sensor);
+ video_device_create_file(vdev, &class_device_attr_brightness);
+ video_device_create_file(vdev, &class_device_attr_saturation);
+ video_device_create_file(vdev, &class_device_attr_contrast);
+ video_device_create_file(vdev, &class_device_attr_hue);
+ video_device_create_file(vdev, &class_device_attr_exposure);
+}
+
+/****************************************************************************
+ * USB routines
+ ***************************************************************************/
+
+static int
+ov51x_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct usb_interface_descriptor *idesc;
+ struct usb_ov511 *ov;
+ int i;
+
+ PDEBUG(1, "probing for device...");
+
+ /* We don't handle multi-config cameras */
+ if (dev->descriptor.bNumConfigurations != 1)
+ return -ENODEV;
+
+ idesc = &intf->cur_altsetting->desc;
+
+ if (idesc->bInterfaceClass != 0xFF)
+ return -ENODEV;
+ if (idesc->bInterfaceSubClass != 0x00)
+ return -ENODEV;
+
+ 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 = idesc->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 (le16_to_cpu(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 (le16_to_cpu(dev->descriptor.idVendor) != VEND_MATTEL)
+ goto error;
+ ov->bridge = BRG_OV511PLUS;
+ ov->bclass = BCL_OV511;
+ break;
+ default:
+ err("Unknown product ID 0x%04x", le16_to_cpu(dev->descriptor.idProduct));
+ goto error;
+ }
+
+ info("USB %s video device found", symbolic(brglist, ov->bridge));
+
+ 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;
+
+ if (usb_make_path(dev, ov->usb_path, OV511_USB_PATH_LEN) < 0) {
+ err("usb_make_path error");
+ goto error;
+ }
+
+ /* Allocate control transfer buffer. */
+ /* Must be kmalloc()'ed, for DMA compatibility */
+ 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) {
+ if (ov->bclass == BCL_OV511)
+ ov511_dump_regs(ov);
+ else
+ ov518_dump_regs(ov);
+ }
+#endif
+
+ ov->vdev = video_device_alloc();
+ if (!ov->vdev)
+ goto error;
+
+ memcpy(ov->vdev, &vdev_template, sizeof(*ov->vdev));
+ ov->vdev->dev = &dev->dev;
+ video_set_drvdata(ov->vdev, 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) {
+ break;
+ }
+ }
+
+ /* Use the next available one */
+ if ((ov->vdev->minor == -1) &&
+ video_register_device(ov->vdev, VFL_TYPE_GRABBER, -1) < 0) {
+ err("video_register_device failed");
+ goto error;
+ }
+
+ info("Device at %s registered to minor %d", ov->usb_path,
+ ov->vdev->minor);
+
+ usb_set_intfdata(intf, ov);
+ ov_create_sysfs(ov->vdev);
+ return 0;
+
+error:
+ if (ov->vdev) {
+ if (-1 == ov->vdev->minor)
+ video_device_release(ov->vdev);
+ else
+ video_unregister_device(ov->vdev);
+ ov->vdev = NULL;
+ }
+
+ if (ov->cbuf) {
+ down(&ov->cbuf_lock);
+ kfree(ov->cbuf);
+ ov->cbuf = NULL;
+ up(&ov->cbuf_lock);
+ }
+
+ if (ov) {
+ kfree(ov);
+ ov = NULL;
+ }
+
+error_out:
+ err("Camera initialization failed");
+ return -EIO;
+}
+
+static void
+ov51x_disconnect(struct usb_interface *intf)
+{
+ struct usb_ov511 *ov = usb_get_intfdata(intf);
+ int n;
+
+ PDEBUG(3, "");
+
+ usb_set_intfdata (intf, NULL);
+
+ if (!ov)
+ return;
+
+ if (ov->vdev)
+ video_unregister_device(ov->vdev);
+
+ 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++)
+ wake_up_interruptible(&ov->frame[n].wq);
+
+ wake_up_interruptible(&ov->wq);
+
+ ov->streaming = 0;
+ ov51x_unlink_isoc(ov);
+
+ 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);
+ kfree(ov);
+ ov = NULL;
+ }
+
+ PDEBUG(3, "Disconnect complete");
+}
+
+static struct usb_driver ov511_driver = {
+ .owner = THIS_MODULE,
+ .name = "ov511",
+ .id_table = device_table,
+ .probe = ov51x_probe,
+ .disconnect = ov51x_disconnect
+};
+
+/****************************************************************************
+ *
+ * Module routines
+ *
+ ***************************************************************************/
+
+/* 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;
+ }
+ }
+
+ 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;
+ }
+
+ unlock_kernel();
+}
+
+static int __init
+usb_ov511_init(void)
+{
+ int retval;
+
+ retval = usb_register(&ov511_driver);
+ if (retval)
+ goto out;
+
+ info(DRIVER_VERSION " : " DRIVER_DESC);
+
+out:
+ return retval;
+}
+
+static void __exit
+usb_ov511_exit(void)
+{
+ usb_deregister(&ov511_driver);
+ info("driver deregistered");
+
+}
+
+module_init(usb_ov511_init);
+module_exit(usb_ov511_exit);
+
+EXPORT_SYMBOL(ov511_register_decomp_module);
+EXPORT_SYMBOL(ov511_deregister_decomp_module);
diff --git a/drivers/usb/media/ov511.h b/drivers/usb/media/ov511.h
new file mode 100644
index 000000000000..086509a137c6
--- /dev/null
+++ b/drivers/usb/media/ov511.h
@@ -0,0 +1,569 @@
+#ifndef __LINUX_OV511_H
+#define __LINUX_OV511_H
+
+#include <asm/uaccess.h>
+#include <linux/videodev.h>
+#include <linux/smp_lock.h>
+#include <linux/usb.h>
+
+#define OV511_DEBUG /* Turn on debug messages */
+
+#ifdef OV511_DEBUG
+ #define PDEBUG(level, fmt, args...) \
+ if (debug >= (level)) info("[%s:%d] " fmt, \
+ __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
+#define OV511_ALT_SIZE_993 1
+#define OV511_ALT_SIZE_768 2
+#define OV511_ALT_SIZE_769 3
+#define OV511_ALT_SIZE_512 4
+#define OV511_ALT_SIZE_513 5
+#define OV511_ALT_SIZE_257 6
+#define OV511_ALT_SIZE_0 7
+
+/* Alternate numbers for various max packet sizes (OV511+ only) */
+#define OV511PLUS_ALT_SIZE_0 0
+#define OV511PLUS_ALT_SIZE_33 1
+#define OV511PLUS_ALT_SIZE_129 2
+#define OV511PLUS_ALT_SIZE_257 3
+#define OV511PLUS_ALT_SIZE_385 4
+#define OV511PLUS_ALT_SIZE_513 5
+#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 */
+#define OV7610_REG_RED 0x02 /* red channel balance */
+#define OV7610_REG_SAT 0x03 /* saturation */
+ /* 04 reserved */
+#define OV7610_REG_CNT 0x05 /* Y contrast */
+#define OV7610_REG_BRT 0x06 /* Y brightness */
+ /* 08-0b reserved */
+#define OV7610_REG_BLUE_BIAS 0x0C /* blue channel bias (5:0) */
+#define OV7610_REG_RED_BIAS 0x0D /* read channel bias (5:0) */
+#define OV7610_REG_GAMMA_COEFF 0x0E /* gamma settings */
+#define OV7610_REG_WB_RANGE 0x0F /* AEC/ALC/S-AWB settings */
+#define OV7610_REG_EXP 0x10 /* manual exposure setting */
+#define OV7610_REG_CLOCK 0x11 /* polarity/clock prescaler */
+#define OV7610_REG_COM_A 0x12 /* misc common regs */
+#define OV7610_REG_COM_B 0x13 /* misc common regs */
+#define OV7610_REG_COM_C 0x14 /* misc common regs */
+#define OV7610_REG_COM_D 0x15 /* misc common regs */
+#define OV7610_REG_FIELD_DIVIDE 0x16 /* field interval/mode settings */
+#define OV7610_REG_HWIN_START 0x17 /* horizontal window start */
+#define OV7610_REG_HWIN_END 0x18 /* horizontal window end */
+#define OV7610_REG_VWIN_START 0x19 /* vertical window start */
+#define OV7610_REG_VWIN_END 0x1A /* vertical window end */
+#define OV7610_REG_PIXEL_SHIFT 0x1B /* pixel shift */
+#define OV7610_REG_ID_HIGH 0x1C /* manufacturer ID MSB */
+#define OV7610_REG_ID_LOW 0x1D /* manufacturer ID LSB */
+ /* 0e-0f reserved */
+#define OV7610_REG_COM_E 0x20 /* misc common regs */
+#define OV7610_REG_YOFFSET 0x21 /* Y channel offset */
+#define OV7610_REG_UOFFSET 0x22 /* U channel offset */
+ /* 23 reserved */
+#define OV7610_REG_ECW 0x24 /* Exposure white level for AEC */
+#define OV7610_REG_ECB 0x25 /* Exposure black level for AEC */
+#define OV7610_REG_COM_F 0x26 /* misc settings */
+#define OV7610_REG_COM_G 0x27 /* misc settings */
+#define OV7610_REG_COM_H 0x28 /* misc settings */
+#define OV7610_REG_COM_I 0x29 /* misc settings */
+#define OV7610_REG_FRAMERATE_H 0x2A /* frame rate MSB + misc */
+#define OV7610_REG_FRAMERATE_L 0x2B /* frame rate LSB */
+#define OV7610_REG_ALC 0x2C /* Auto Level Control settings */
+#define OV7610_REG_COM_J 0x2D /* misc settings */
+#define OV7610_REG_VOFFSET 0x2E /* V channel offset adjustment */
+#define OV7610_REG_ARRAY_BIAS 0x2F /* Array bias -- don't change */
+ /* 30-32 reserved */
+#define OV7610_REG_YGAMMA 0x33 /* misc gamma settings (7:6) */
+#define OV7610_REG_BIAS_ADJUST 0x34 /* misc bias settings */
+#define OV7610_REG_COM_L 0x35 /* misc settings */
+ /* 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
+
+/* Size of usb_make_path() buffer */
+#define OV511_USB_PATH_LEN 64
+
+/* 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,
+};
+
+enum {
+ STATE_SCANNING, /* Scanning for start */
+ STATE_HEADER, /* Parsing header */
+ STATE_LINES, /* Parsing lines */
+};
+
+/* Buffer states */
+enum {
+ BUF_NOT_ALLOCATED,
+ BUF_ALLOCATED,
+};
+
+/* --------- 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,
+};
+
+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_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 {
+ FRAME_UNUSED, /* Unused (no MCAPTURE) */
+ FRAME_READY, /* Ready to start grabbing */
+ FRAME_GRABBING, /* In the process of being grabbed into */
+ FRAME_DONE, /* Finished grabbing, but not been synced yet */
+ FRAME_ERROR, /* Something bad happened while processing */
+};
+
+struct ov511_regvals {
+ enum {
+ OV511_DONE_BUS,
+ OV511_REG_BUS,
+ OV511_I2C_BUS,
+ } bus;
+ unsigned char reg;
+ unsigned char val;
+};
+
+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;
+ struct usb_device *dev;
+
+ int customid;
+ char *desc;
+ unsigned char iface;
+ char usb_path[OV511_USB_PATH_LEN];
+
+ /* 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 */
+ int suby; /* Pix Array subcapture y offset */
+ int subw; /* Pix Array subcapture width */
+ int subh; /* Pix Array subcapture height */
+
+ 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 packet_size; /* Frame size per isoc desc */
+ int packet_numbering; /* Is ISO frame numbering enabled? */
+
+ struct semaphore param_lock; /* params lock for this camera */
+
+ /* Framebuffer/sbuf management */
+ int buf_state;
+ struct semaphore buf_lock;
+
+ 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
diff --git a/drivers/usb/media/pwc/ChangeLog b/drivers/usb/media/pwc/ChangeLog
new file mode 100644
index 000000000000..b2eb71a9afb5
--- /dev/null
+++ b/drivers/usb/media/pwc/ChangeLog
@@ -0,0 +1,143 @@
+9.0.2
+
+* Adding #ifdef to compile PWC before and after 2.6.5
+
+9.0.1
+
+9.0
+
+
+8.12
+
+* Implement motorized pan/tilt feature for Logitech QuickCam Orbit/Spere.
+
+8.11.1
+
+* Fix for PCVC720/40, would not be able to set videomode
+* Fix for Samsung MPC models, appearantly they are based on a newer chipset
+
+8.11
+
+* 20 dev_hints (per request)
+* Hot unplugging should be better, no more dangling pointers or memory leaks
+* Added reserved Logitech webcam IDs
+* Device now remembers size & fps between close()/open()
+* Removed palette stuff altogether
+
+8.10.1
+
+* Added IDs for PCVC720K/40 and Creative Labs Webcam Pro
+
+8.10
+
+* Fixed ID for QuickCam Notebook pro
+* Added GREALSIZE ioctl() call
+* Fixed bug in case PWCX was not loaded and invalid size was set
+
+8.9
+
+* Merging with kernel 2.5.49
+* Adding IDs for QuickCam Zoom & QuickCam Notebook
+
+8.8
+
+* Fixing 'leds' parameter
+* Adding IDs for Logitech QuickCam Pro 4000
+* Making URB init/cleanup a little nicer
+
+8.7
+
+* Incorporating changes in ioctl() parameter passing
+* Also changes to URB mechanism
+
+8.6
+
+* Added ID's for Visionite VCS UM100 and UC300
+* Removed YUV420-interlaced palette altogether (was confusing)
+* Removed MIRROR stuff as it didn't work anyway
+* Fixed a problem with the 'leds' parameter (wouldn't blink)
+* Added ioctl()s for advanced features: 'extended' whitebalance ioctl()s,
+ CONTOUR, BACKLIGHT, FLICKER, DYNNOISE.
+* VIDIOCGCAP.name now contains real camera model name instead of
+ 'Philips xxx webcam'
+* Added PROBE ioctl (see previous point & API doc)
+
+8.5
+
+* Adding IDs for Creative Labs Webcam 5
+* Adding IDs for SOTEC CMS-001 webcam
+* Solving possible hang in VIDIOCSYNC when unplugging the cam
+* Forgot to return structure in VIDIOCPWCGAWB, oops
+* Time interval for the LEDs are now in milliseconds
+
+8.4
+
+* Fixing power_save option for Vesta range
+* Handling new error codes in ISOC callback
+* Adding dev_hint module parameter, to specify /dev/videoX device nodes
+
+8.3
+
+* Adding Samsung C10 and C30 cameras
+* Removing palette module parameter
+* Fixed typo in ID of QuickCam 3000 Pro
+* Adding LED settings (blinking while in use) for ToUCam cameras.
+* Turns LED off when camera is not in use.
+
+8.2
+
+* Making module more silent when trace = 0
+* Adding QuickCam 3000 Pro IDs
+* Chrominance control for the Vesta cameras
+* Hopefully fixed problems on machines with BIGMEM and > 1GB of RAM
+* Included Oliver Neukem's lock_kernel() patch
+* Allocates less memory for image buffers
+* Adds ioctl()s for the whitebalancing
+
+8.1
+
+* Adding support for 750
+* Adding V4L GAUDIO/SAUDIO/UNIT ioctl() calls
+
+8.0
+* 'damage control' after inclusion in 2.4.5.
+* Changed wait-queue mechanism in read/mmap/poll according to the book.
+* Included YUV420P palette.
+* Changed interface to decompressor module.
+* Cleaned up pwc structure a bit.
+
+7.0
+
+* Fixed bug in vcvt_420i_yuyv; extra variables on stack were misaligned.
+* There is now a clear error message when an image size is selected that
+ is only supported using the decompressor, and the decompressor isn't
+ loaded.
+* When the decompressor wasn't loaded, selecting large image size
+ would create skewed or double images.
+
+6.3
+
+* Introduced spinlocks for the buffer pointer manipulation; a number of
+ reports seem to suggest the down()/up() semaphores were the cause of
+ lockups, since they are not suitable for interrupt/user locking.
+* Separated decompressor and core code into 2 modules.
+
+6.2
+
+* Non-integral image sizes are now padded with gray or black.
+* Added SHUTTERSPEED ioctl().
+* Fixed buglet in VIDIOCPWCSAGC; the function would always return an error,
+ even though the call succeeded.
+* Added hotplug support for 2.4.*.
+* Memory: the 645/646 uses less memory now.
+
+6.1
+
+* VIDIOCSPICT returns -EINVAL with invalid palettes.
+* Added saturation control.
+* Split decompressors from rest.
+* Fixed bug that would reset the framerate to the default framerate if
+ the rate field was set to 0 (which is not what I intended, nl. do not
+ change the framerate!).
+* VIDIOCPWCSCQUAL (setting compression quality) now takes effect immediately.
+* Workaround for a bug in the 730 sensor.
diff --git a/drivers/usb/media/pwc/Makefile b/drivers/usb/media/pwc/Makefile
new file mode 100644
index 000000000000..e0b41ed4407f
--- /dev/null
+++ b/drivers/usb/media/pwc/Makefile
@@ -0,0 +1,20 @@
+ifneq ($(KERNELRELEASE),)
+
+pwc-objs := pwc-if.o pwc-misc.o pwc-ctrl.o pwc-uncompress.o pwc-dec1.o pwc-dec23.o pwc-kiara.o pwc-timon.o
+
+obj-$(CONFIG_USB_PWC) += pwc.o
+
+else
+
+KDIR := /lib/modules/$(shell uname -r)/build
+PWD := $(shell pwd)
+
+default:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+
+endif
+
+clean:
+ rm -f *.[oas] .*.flags *.ko .*.cmd .*.d .*.tmp *.mod.c
+ rm -rf .tmp_versions
+
diff --git a/drivers/usb/media/pwc/philips.txt b/drivers/usb/media/pwc/philips.txt
new file mode 100644
index 000000000000..04a640d723ed
--- /dev/null
+++ b/drivers/usb/media/pwc/philips.txt
@@ -0,0 +1,236 @@
+This file contains some additional information for the Philips and OEM webcams.
+E-mail: webcam@smcc.demon.nl Last updated: 2004-01-19
+Site: http://www.smcc.demon.nl/webcam/
+
+As of this moment, the following cameras are supported:
+ * Philips PCA645
+ * Philips PCA646
+ * Philips PCVC675
+ * Philips PCVC680
+ * Philips PCVC690
+ * Philips PCVC720/40
+ * Philips PCVC730
+ * Philips PCVC740
+ * Philips PCVC750
+ * Askey VC010
+ * Creative Labs Webcam 5
+ * Creative Labs Webcam Pro Ex
+ * Logitech QuickCam 3000 Pro
+ * Logitech QuickCam 4000 Pro
+ * Logitech QuickCam Notebook Pro
+ * Logitech QuickCam Zoom
+ * Logitech QuickCam Orbit
+ * Logitech QuickCam Sphere
+ * Samsung MPC-C10
+ * Samsung MPC-C30
+ * Sotec Afina Eye
+ * AME CU-001
+ * Visionite VCS-UM100
+ * Visionite VCS-UC300
+
+The main webpage for the Philips driver is at the address above. It contains
+a lot of extra information, a FAQ, and the binary plugin 'PWCX'. This plugin
+contains decompression routines that allow you to use higher image sizes and
+framerates; in addition the webcam uses less bandwidth on the USB bus (handy
+if you want to run more than 1 camera simultaneously). These routines fall
+under a NDA, and may therefor not be distributed as source; however, its use
+is completely optional.
+
+You can build this code either into your kernel, or as a module. I recommend
+the latter, since it makes troubleshooting a lot easier. The built-in
+microphone is supported through the USB Audio class.
+
+When you load the module you can set some default settings for the
+camera; some programs depend on a particular image-size or -format and
+don't know how to set it properly in the driver. The options are:
+
+size
+ Can be one of 'sqcif', 'qsif', 'qcif', 'sif', 'cif' or
+ 'vga', for an image size of resp. 128x96, 160x120, 176x144,
+ 320x240, 352x288 and 640x480 (of course, only for those cameras that
+ support these resolutions).
+
+fps
+ Specifies the desired framerate. Is an integer in the range of 4-30.
+
+fbufs
+ This paramter specifies the number of internal buffers to use for storing
+ frames from the cam. This will help if the process that reads images from
+ the cam is a bit slow or momentarely busy. However, on slow machines it
+ only introduces lag, so choose carefully. The default is 3, which is
+ reasonable. You can set it between 2 and 5.
+
+mbufs
+ This is an integer between 1 and 10. It will tell the module the number of
+ buffers to reserve for mmap(), VIDIOCCGMBUF, VIDIOCMCAPTURE and friends.
+ The default is 2, which is adequate for most applications (double
+ buffering).
+
+ Should you experience a lot of 'Dumping frame...' messages during
+ grabbing with a tool that uses mmap(), you might want to increase if.
+ However, it doesn't really buffer images, it just gives you a bit more
+ slack when your program is behind. But you need a multi-threaded or
+ forked program to really take advantage of these buffers.
+
+ The absolute maximum is 10, but don't set it too high! Every buffer takes
+ up 460 KB of RAM, so unless you have a lot of memory setting this to
+ something more than 4 is an absolute waste. This memory is only
+ allocated during open(), so nothing is wasted when the camera is not in
+ use.
+
+power_save
+ When power_save is enabled (set to 1), the module will try to shut down
+ the cam on close() and re-activate on open(). This will save power and
+ turn off the LED. Not all cameras support this though (the 645 and 646
+ don't have power saving at all), and some models don't work either (they
+ will shut down, but never wake up). Consider this experimental. By
+ default this option is disabled.
+
+compression (only useful with the plugin)
+ With this option you can control the compression factor that the camera
+ uses to squeeze the image through the USB bus. You can set the
+ parameter between 0 and 3:
+ 0 = prefer uncompressed images; if the requested mode is not available
+ in an uncompressed format, the driver will silently switch to low
+ compression.
+ 1 = low compression.
+ 2 = medium compression.
+ 3 = high compression.
+
+ High compression takes less bandwidth of course, but it could also
+ introduce some unwanted artefacts. The default is 2, medium compression.
+ See the FAQ on the website for an overview of which modes require
+ compression.
+
+ The compression parameter does not apply to the 645 and 646 cameras
+ and OEM models derived from those (only a few). Most cams honour this
+ parameter.
+
+leds
+ This settings takes 2 integers, that define the on/off time for the LED
+ (in milliseconds). One of the interesting things that you can do with
+ this is let the LED blink while the camera is in use. This:
+
+ leds=500,500
+
+ will blink the LED once every second. But with:
+
+ leds=0,0
+
+ the LED never goes on, making it suitable for silent surveillance.
+
+ By default the camera's LED is on solid while in use, and turned off
+ when the camera is not used anymore.
+
+ This parameter works only with the ToUCam range of cameras (720, 730, 740,
+ 750) and OEMs. For other cameras this command is silently ignored, and
+ the LED cannot be controlled.
+
+ Finally: this parameters does not take effect UNTIL the first time you
+ open the camera device. Until then, the LED remains on.
+
+dev_hint
+ A long standing problem with USB devices is their dynamic nature: you
+ never know what device a camera gets assigned; it depends on module load
+ order, the hub configuration, the order in which devices are plugged in,
+ and the phase of the moon (i.e. it can be random). With this option you
+ can give the driver a hint as to what video device node (/dev/videoX) it
+ should use with a specific camera. This is also handy if you have two
+ cameras of the same model.
+
+ A camera is specified by its type (the number from the camera model,
+ like PCA645, PCVC750VC, etc) and optionally the serial number (visible
+ in /proc/bus/usb/devices). A hint consists of a string with the following
+ format:
+
+ [type[.serialnumber]:]node
+
+ The square brackets mean that both the type and the serialnumber are
+ optional, but a serialnumber cannot be specified without a type (which
+ would be rather pointless). The serialnumber is separated from the type
+ by a '.'; the node number by a ':'.
+
+ This somewhat cryptic syntax is best explained by a few examples:
+
+ dev_hint=3,5 The first detected cam gets assigned
+ /dev/video3, the second /dev/video5. Any
+ other cameras will get the first free
+ available slot (see below).
+
+ dev_hint=645:1,680:2 The PCA645 camera will get /dev/video1,
+ and a PCVC680 /dev/video2.
+
+ dev_hint=645.0123:3,645.4567:0 The PCA645 camera with serialnumber
+ 0123 goes to /dev/video3, the same
+ camera model with the 4567 serial
+ gets /dev/video0.
+
+ dev_hint=750:1,4,5,6 The PCVC750 camera will get /dev/video1, the
+ next 3 Philips cams will use /dev/video4
+ through /dev/video6.
+
+ Some points worth knowing:
+ - Serialnumbers are case sensitive and must be written full, including
+ leading zeroes (it's treated as a string).
+ - If a device node is already occupied, registration will fail and
+ the webcam is not available.
+ - You can have up to 64 video devices; be sure to make enough device
+ nodes in /dev if you want to spread the numbers (this does not apply
+ to devfs). After /dev/video9 comes /dev/video10 (not /dev/videoA).
+ - If a camera does not match any dev_hint, it will simply get assigned
+ the first available device node, just as it used to be.
+
+trace
+ In order to better detect problems, it is now possible to turn on a
+ 'trace' of some of the calls the module makes; it logs all items in your
+ kernel log at debug level.
+
+ The trace variable is a bitmask; each bit represents a certain feature.
+ If you want to trace something, look up the bit value(s) in the table
+ below, add the values together and supply that to the trace variable.
+
+ Value Value Description Default
+ (dec) (hex)
+ 1 0x1 Module initialization; this will log messages On
+ while loading and unloading the module
+
+ 2 0x2 probe() and disconnect() traces On
+
+ 4 0x4 Trace open() and close() calls Off
+
+ 8 0x8 read(), mmap() and associated ioctl() calls Off
+
+ 16 0x10 Memory allocation of buffers, etc. Off
+
+ 32 0x20 Showing underflow, overflow and Dumping frame On
+ messages
+
+ 64 0x40 Show viewport and image sizes Off
+
+ 128 0x80 PWCX debugging Off
+
+ For example, to trace the open() & read() fuctions, sum 8 + 4 = 12,
+ so you would supply trace=12 during insmod or modprobe. If
+ you want to turn the initialization and probing tracing off, set trace=0.
+ The default value for trace is 35 (0x23).
+
+
+
+Example:
+
+ # modprobe pwc size=cif fps=15 power_save=1
+
+The fbufs, mbufs and trace parameters are global and apply to all connected
+cameras. Each camera has its own set of buffers.
+
+size and fps only specify defaults when you open() the device; this is to
+accommodate some tools that don't set the size. You can change these
+settings after open() with the Video4Linux ioctl() calls. The default of
+defaults is QCIF size at 10 fps.
+
+The compression parameter is semiglobal; it sets the initial compression
+preference for all camera's, but this parameter can be set per camera with
+the VIDIOCPWCSCQUAL ioctl() call.
+
+All parameters are optional.
+
diff --git a/drivers/usb/media/pwc/pwc-ctrl.c b/drivers/usb/media/pwc/pwc-ctrl.c
new file mode 100644
index 000000000000..26aa914bc541
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-ctrl.c
@@ -0,0 +1,1630 @@
+/* Driver for Philips webcam
+ Functions that send various control messages to the webcam, including
+ video modes.
+ (C) 1999-2003 Nemosoft Unv.
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+/*
+ Changes
+ 2001/08/03 Alvarado Added methods for changing white balance and
+ red/green gains
+ */
+
+/* Control functions for the cam; brightness, contrast, video mode, etc. */
+
+#ifdef __KERNEL__
+#include <asm/uaccess.h>
+#endif
+#include <asm/errno.h>
+#include <linux/version.h>
+
+#include "pwc.h"
+#include "pwc-ioctl.h"
+#include "pwc-uncompress.h"
+#include "pwc-kiara.h"
+#include "pwc-timon.h"
+#include "pwc-dec1.h"
+#include "pwc-dec23.h"
+
+/* Request types: video */
+#define SET_LUM_CTL 0x01
+#define GET_LUM_CTL 0x02
+#define SET_CHROM_CTL 0x03
+#define GET_CHROM_CTL 0x04
+#define SET_STATUS_CTL 0x05
+#define GET_STATUS_CTL 0x06
+#define SET_EP_STREAM_CTL 0x07
+#define GET_EP_STREAM_CTL 0x08
+#define SET_MPT_CTL 0x0D
+#define GET_MPT_CTL 0x0E
+
+/* Selectors for the Luminance controls [GS]ET_LUM_CTL */
+#define AGC_MODE_FORMATTER 0x2000
+#define PRESET_AGC_FORMATTER 0x2100
+#define SHUTTER_MODE_FORMATTER 0x2200
+#define PRESET_SHUTTER_FORMATTER 0x2300
+#define PRESET_CONTOUR_FORMATTER 0x2400
+#define AUTO_CONTOUR_FORMATTER 0x2500
+#define BACK_LIGHT_COMPENSATION_FORMATTER 0x2600
+#define CONTRAST_FORMATTER 0x2700
+#define DYNAMIC_NOISE_CONTROL_FORMATTER 0x2800
+#define FLICKERLESS_MODE_FORMATTER 0x2900
+#define AE_CONTROL_SPEED 0x2A00
+#define BRIGHTNESS_FORMATTER 0x2B00
+#define GAMMA_FORMATTER 0x2C00
+
+/* Selectors for the Chrominance controls [GS]ET_CHROM_CTL */
+#define WB_MODE_FORMATTER 0x1000
+#define AWB_CONTROL_SPEED_FORMATTER 0x1100
+#define AWB_CONTROL_DELAY_FORMATTER 0x1200
+#define PRESET_MANUAL_RED_GAIN_FORMATTER 0x1300
+#define PRESET_MANUAL_BLUE_GAIN_FORMATTER 0x1400
+#define COLOUR_MODE_FORMATTER 0x1500
+#define SATURATION_MODE_FORMATTER1 0x1600
+#define SATURATION_MODE_FORMATTER2 0x1700
+
+/* Selectors for the Status controls [GS]ET_STATUS_CTL */
+#define SAVE_USER_DEFAULTS_FORMATTER 0x0200
+#define RESTORE_USER_DEFAULTS_FORMATTER 0x0300
+#define RESTORE_FACTORY_DEFAULTS_FORMATTER 0x0400
+#define READ_AGC_FORMATTER 0x0500
+#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
+
+/* Formatters for the motorized pan & tilt [GS]ET_MPT_CTL */
+#define PT_RELATIVE_CONTROL_FORMATTER 0x01
+#define PT_RESET_CONTROL_FORMATTER 0x02
+#define PT_STATUS_FORMATTER 0x03
+
+static char *size2name[PSZ_MAX] =
+{
+ "subQCIF",
+ "QSIF",
+ "QCIF",
+ "SIF",
+ "CIF",
+ "VGA",
+};
+
+/********/
+
+/* Entries for the Nala (645/646) camera; the Nala doesn't have compression
+ preferences, so you either get compressed or non-compressed streams.
+
+ An alternate value of 0 means this mode is not available at all.
+ */
+
+struct Nala_table_entry {
+ char alternate; /* USB alternate setting */
+ int compressed; /* Compressed yes/no */
+
+ unsigned char mode[3]; /* precomputed mode table */
+};
+
+static struct Nala_table_entry Nala_table[PSZ_MAX][8] =
+{
+#include "pwc-nala.h"
+};
+
+
+/****************************************************************************/
+
+
+#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, 500)
+
+#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, 500)
+
+
+#if PWC_DEBUG
+void pwc_hexdump(void *p, int len)
+{
+ int i;
+ unsigned char *s;
+ char buf[100], *d;
+
+ s = (unsigned char *)p;
+ d = buf;
+ *d = '\0';
+ Debug("Doing hexdump @ %p, %d bytes.\n", p, len);
+ for (i = 0; i < len; i++) {
+ d += sprintf(d, "%02X ", *s++);
+ if ((i & 0xF) == 0xF) {
+ Debug("%s\n", buf);
+ d = buf;
+ *d = '\0';
+ }
+ }
+ if ((i & 0xF) != 0)
+ Debug("%s\n", buf);
+}
+#endif
+
+static inline int send_video_command(struct usb_device *udev, int index, void *buf, int buflen)
+{
+ return usb_control_msg(udev,
+ usb_sndctrlpipe(udev, 0),
+ SET_EP_STREAM_CTL,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ VIDEO_OUTPUT_CONTROL_FORMATTER,
+ index,
+ buf, buflen, 1000);
+}
+
+
+
+static inline int set_video_mode_Nala(struct pwc_device *pdev, int size, int frames)
+{
+ unsigned char buf[3];
+ int ret, fps;
+ struct Nala_table_entry *pEntry;
+ int frames2frames[31] =
+ { /* closest match of framerate */
+ 0, 0, 0, 0, 4, /* 0-4 */
+ 5, 5, 7, 7, 10, /* 5-9 */
+ 10, 10, 12, 12, 15, /* 10-14 */
+ 15, 15, 15, 20, 20, /* 15-19 */
+ 20, 20, 20, 24, 24, /* 20-24 */
+ 24, 24, 24, 24, 24, /* 25-29 */
+ 24 /* 30 */
+ };
+ int frames2table[31] =
+ { 0, 0, 0, 0, 0, /* 0-4 */
+ 1, 1, 1, 2, 2, /* 5-9 */
+ 3, 3, 4, 4, 4, /* 10-14 */
+ 5, 5, 5, 5, 5, /* 15-19 */
+ 6, 6, 6, 6, 7, /* 20-24 */
+ 7, 7, 7, 7, 7, /* 25-29 */
+ 7 /* 30 */
+ };
+
+ if (size < 0 || size > PSZ_CIF || frames < 4 || frames > 25)
+ return -EINVAL;
+ frames = frames2frames[frames];
+ fps = frames2table[frames];
+ pEntry = &Nala_table[size][fps];
+ if (pEntry->alternate == 0)
+ return -EINVAL;
+
+ if (pEntry->compressed)
+ return -ENOENT; /* Not supported. */
+
+ memcpy(buf, pEntry->mode, 3);
+ ret = send_video_command(pdev->udev, pdev->vendpoint, buf, 3);
+ if (ret < 0) {
+ Debug("Failed to send video command... %d\n", ret);
+ return ret;
+ }
+ if (pEntry->compressed && pdev->vpalette != VIDEO_PALETTE_RAW)
+ {
+ switch(pdev->type) {
+ case 645:
+ case 646:
+ pwc_dec1_init(pdev->type, pdev->release, buf, pdev->decompress_data);
+ break;
+
+ case 675:
+ case 680:
+ case 690:
+ case 720:
+ case 730:
+ case 740:
+ case 750:
+ pwc_dec23_init(pdev->type, pdev->release, buf, pdev->decompress_data);
+ break;
+ }
+ }
+
+ pdev->cmd_len = 3;
+ memcpy(pdev->cmd_buf, buf, 3);
+
+ /* Set various parameters */
+ pdev->vframes = frames;
+ pdev->vsize = size;
+ pdev->valternate = pEntry->alternate;
+ pdev->image = pwc_image_sizes[size];
+ pdev->frame_size = (pdev->image.x * pdev->image.y * 3) / 2;
+ if (pEntry->compressed) {
+ if (pdev->release < 5) { /* 4 fold compression */
+ pdev->vbandlength = 528;
+ pdev->frame_size /= 4;
+ }
+ else {
+ pdev->vbandlength = 704;
+ pdev->frame_size /= 3;
+ }
+ }
+ else
+ pdev->vbandlength = 0;
+ return 0;
+}
+
+
+static inline int set_video_mode_Timon(struct pwc_device *pdev, int size, int frames, int compression, int snapshot)
+{
+ unsigned char buf[13];
+ const struct Timon_table_entry *pChoose;
+ int ret, fps;
+
+ if (size >= PSZ_MAX || frames < 5 || frames > 30 || compression < 0 || compression > 3)
+ return -EINVAL;
+ if (size == PSZ_VGA && frames > 15)
+ return -EINVAL;
+ fps = (frames / 5) - 1;
+
+ /* Find a supported framerate with progressively higher compression ratios
+ if the preferred ratio is not available.
+ */
+ pChoose = NULL;
+ while (compression <= 3) {
+ pChoose = &Timon_table[size][fps][compression];
+ if (pChoose->alternate != 0)
+ break;
+ compression++;
+ }
+ if (pChoose == NULL || pChoose->alternate == 0)
+ return -ENOENT; /* Not supported. */
+
+ memcpy(buf, pChoose->mode, 13);
+ if (snapshot)
+ buf[0] |= 0x80;
+ ret = send_video_command(pdev->udev, pdev->vendpoint, buf, 13);
+ if (ret < 0)
+ return ret;
+
+ if (pChoose->bandlength > 0 && pdev->vpalette != VIDEO_PALETTE_RAW)
+ pwc_dec23_init(pdev->type, pdev->release, buf, pdev->decompress_data);
+
+ pdev->cmd_len = 13;
+ memcpy(pdev->cmd_buf, buf, 13);
+
+ /* Set various parameters */
+ pdev->vframes = frames;
+ pdev->vsize = size;
+ pdev->vsnapshot = snapshot;
+ pdev->valternate = pChoose->alternate;
+ pdev->image = pwc_image_sizes[size];
+ pdev->vbandlength = pChoose->bandlength;
+ if (pChoose->bandlength > 0)
+ pdev->frame_size = (pChoose->bandlength * pdev->image.y) / 4;
+ else
+ pdev->frame_size = (pdev->image.x * pdev->image.y * 12) / 8;
+ return 0;
+}
+
+
+static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, int compression, int snapshot)
+{
+ const struct Kiara_table_entry *pChoose = NULL;
+ int fps, ret;
+ unsigned char buf[12];
+ struct Kiara_table_entry RawEntry = {6, 773, 1272, {0xAD, 0xF4, 0x10, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x03, 0x80}};
+
+ if (size >= PSZ_MAX || frames < 5 || frames > 30 || compression < 0 || compression > 3)
+ return -EINVAL;
+ if (size == PSZ_VGA && frames > 15)
+ return -EINVAL;
+ fps = (frames / 5) - 1;
+
+ /* special case: VGA @ 5 fps and snapshot is raw bayer mode */
+ if (size == PSZ_VGA && frames == 5 && snapshot)
+ {
+ /* Only available in case the raw palette is selected or
+ we have the decompressor available. This mode is
+ only available in compressed form
+ */
+ if (pdev->vpalette == VIDEO_PALETTE_RAW)
+ {
+ Info("Choosing VGA/5 BAYER mode (%d).\n", pdev->vpalette);
+ pChoose = &RawEntry;
+ }
+ else
+ {
+ Info("VGA/5 BAYER mode _must_ have a decompressor available, or use RAW palette.\n");
+ }
+ }
+ else
+ {
+ /* Find a supported framerate with progressively higher compression ratios
+ if the preferred ratio is not available.
+ Skip this step when using RAW modes.
+ */
+ while (compression <= 3) {
+ pChoose = &Kiara_table[size][fps][compression];
+ if (pChoose->alternate != 0)
+ break;
+ compression++;
+ }
+ }
+ if (pChoose == NULL || pChoose->alternate == 0)
+ return -ENOENT; /* Not supported. */
+
+ Debug("Using alternate setting %d.\n", pChoose->alternate);
+
+ /* usb_control_msg won't take staticly allocated arrays as argument?? */
+ memcpy(buf, pChoose->mode, 12);
+ if (snapshot)
+ buf[0] |= 0x80;
+
+ /* Firmware bug: video endpoint is 5, but commands are sent to endpoint 4 */
+ ret = send_video_command(pdev->udev, 4 /* pdev->vendpoint */, buf, 12);
+ if (ret < 0)
+ return ret;
+
+ if (pChoose->bandlength > 0 && pdev->vpalette != VIDEO_PALETTE_RAW)
+ pwc_dec23_init(pdev->type, pdev->release, buf, pdev->decompress_data);
+
+ pdev->cmd_len = 12;
+ memcpy(pdev->cmd_buf, buf, 12);
+ /* All set and go */
+ pdev->vframes = frames;
+ pdev->vsize = size;
+ pdev->vsnapshot = snapshot;
+ pdev->valternate = pChoose->alternate;
+ pdev->image = pwc_image_sizes[size];
+ pdev->vbandlength = pChoose->bandlength;
+ if (pdev->vbandlength > 0)
+ pdev->frame_size = (pdev->vbandlength * pdev->image.y) / 4;
+ else
+ pdev->frame_size = (pdev->image.x * pdev->image.y * 12) / 8;
+ return 0;
+}
+
+
+
+/**
+ @pdev: device structure
+ @width: viewport width
+ @height: viewport height
+ @frame: framerate, in fps
+ @compression: preferred compression ratio
+ @snapshot: snapshot mode or streaming
+ */
+int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot)
+{
+ int ret, size;
+
+ Trace(TRACE_FLOW, "set_video_mode(%dx%d @ %d, palette %d).\n", width, height, frames, pdev->vpalette);
+ size = pwc_decode_size(pdev, width, height);
+ if (size < 0) {
+ Debug("Could not find suitable size.\n");
+ return -ERANGE;
+ }
+ Debug("decode_size = %d.\n", size);
+
+ ret = -EINVAL;
+ switch(pdev->type) {
+ case 645:
+ case 646:
+ ret = set_video_mode_Nala(pdev, size, frames);
+ break;
+
+ case 675:
+ case 680:
+ case 690:
+ ret = set_video_mode_Timon(pdev, size, frames, compression, snapshot);
+ break;
+
+ case 720:
+ case 730:
+ case 740:
+ case 750:
+ ret = set_video_mode_Kiara(pdev, size, frames, compression, snapshot);
+ break;
+ }
+ if (ret < 0) {
+ if (ret == -ENOENT)
+ Info("Video mode %s@%d fps is only supported with the decompressor module (pwcx).\n", size2name[size], frames);
+ else {
+ Err("Failed to set video mode %s@%d fps; return code = %d\n", size2name[size], frames, ret);
+ }
+ return ret;
+ }
+ pdev->view.x = width;
+ pdev->view.y = height;
+ pdev->frame_total_size = pdev->frame_size + pdev->frame_header_size + pdev->frame_trailer_size;
+ pwc_set_image_buffer_size(pdev);
+ Trace(TRACE_SIZE, "Set viewport to %dx%d, image size is %dx%d.\n", width, height, pwc_image_sizes[size].x, pwc_image_sizes[size].y);
+ return 0;
+}
+
+
+void pwc_set_image_buffer_size(struct pwc_device *pdev)
+{
+ int i, factor = 0, filler = 0;
+
+ /* for PALETTE_YUV420P */
+ switch(pdev->vpalette)
+ {
+ case VIDEO_PALETTE_YUV420P:
+ factor = 6;
+ filler = 128;
+ break;
+ case VIDEO_PALETTE_RAW:
+ factor = 6; /* can be uncompressed YUV420P */
+ filler = 0;
+ break;
+ }
+
+ /* Set sizes in bytes */
+ pdev->image.size = pdev->image.x * pdev->image.y * factor / 4;
+ pdev->view.size = pdev->view.x * pdev->view.y * factor / 4;
+
+ /* Align offset, or you'll get some very weird results in
+ YUV420 mode... x must be multiple of 4 (to get the Y's in
+ place), and y even (or you'll mixup U & V). This is less of a
+ problem for YUV420P.
+ */
+ pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC;
+ pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE;
+
+ /* Fill buffers with gray or black */
+ for (i = 0; i < MAX_IMAGES; i++) {
+ if (pdev->image_ptr[i] != NULL)
+ memset(pdev->image_ptr[i], filler, pdev->view.size);
+ }
+}
+
+
+
+/* BRIGHTNESS */
+
+int pwc_get_brightness(struct pwc_device *pdev)
+{
+ char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_LUM_CTL, BRIGHTNESS_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ return buf << 9;
+}
+
+int pwc_set_brightness(struct pwc_device *pdev, int value)
+{
+ char buf;
+
+ if (value < 0)
+ value = 0;
+ if (value > 0xffff)
+ value = 0xffff;
+ buf = (value >> 9) & 0x7f;
+ return SendControlMsg(SET_LUM_CTL, BRIGHTNESS_FORMATTER, 1);
+}
+
+/* CONTRAST */
+
+int pwc_get_contrast(struct pwc_device *pdev)
+{
+ char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_LUM_CTL, CONTRAST_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ return buf << 10;
+}
+
+int pwc_set_contrast(struct pwc_device *pdev, int value)
+{
+ char buf;
+
+ if (value < 0)
+ value = 0;
+ if (value > 0xffff)
+ value = 0xffff;
+ buf = (value >> 10) & 0x3f;
+ return SendControlMsg(SET_LUM_CTL, CONTRAST_FORMATTER, 1);
+}
+
+/* GAMMA */
+
+int pwc_get_gamma(struct pwc_device *pdev)
+{
+ char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_LUM_CTL, GAMMA_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ return buf << 11;
+}
+
+int pwc_set_gamma(struct pwc_device *pdev, int value)
+{
+ char buf;
+
+ if (value < 0)
+ value = 0;
+ if (value > 0xffff)
+ value = 0xffff;
+ buf = (value >> 11) & 0x1f;
+ return SendControlMsg(SET_LUM_CTL, GAMMA_FORMATTER, 1);
+}
+
+
+/* SATURATION */
+
+int pwc_get_saturation(struct pwc_device *pdev)
+{
+ char buf;
+ int ret;
+
+ if (pdev->type < 675)
+ return -1;
+ ret = RecvControlMsg(GET_CHROM_CTL, pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1, 1);
+ if (ret < 0)
+ return ret;
+ return 32768 + buf * 327;
+}
+
+int pwc_set_saturation(struct pwc_device *pdev, int value)
+{
+ char buf;
+
+ if (pdev->type < 675)
+ return -EINVAL;
+ if (value < 0)
+ value = 0;
+ if (value > 0xffff)
+ value = 0xffff;
+ /* saturation ranges from -100 to +100 */
+ buf = (value - 32768) / 327;
+ return SendControlMsg(SET_CHROM_CTL, pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1, 1);
+}
+
+/* AGC */
+
+static inline int pwc_set_agc(struct pwc_device *pdev, int mode, int value)
+{
+ char buf;
+ int ret;
+
+ if (mode)
+ buf = 0x0; /* auto */
+ else
+ buf = 0xff; /* fixed */
+
+ ret = SendControlMsg(SET_LUM_CTL, AGC_MODE_FORMATTER, 1);
+
+ if (!mode && ret >= 0) {
+ if (value < 0)
+ value = 0;
+ if (value > 0xffff)
+ value = 0xffff;
+ buf = (value >> 10) & 0x3F;
+ ret = SendControlMsg(SET_LUM_CTL, PRESET_AGC_FORMATTER, 1);
+ }
+ if (ret < 0)
+ return ret;
+ return 0;
+}
+
+static inline int pwc_get_agc(struct pwc_device *pdev, int *value)
+{
+ unsigned char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_LUM_CTL, AGC_MODE_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+
+ if (buf != 0) { /* fixed */
+ ret = RecvControlMsg(GET_LUM_CTL, PRESET_AGC_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ if (buf > 0x3F)
+ buf = 0x3F;
+ *value = (buf << 10);
+ }
+ else { /* auto */
+ ret = RecvControlMsg(GET_STATUS_CTL, READ_AGC_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ /* Gah... this value ranges from 0x00 ... 0x9F */
+ if (buf > 0x9F)
+ buf = 0x9F;
+ *value = -(48 + buf * 409);
+ }
+
+ return 0;
+}
+
+static inline int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value)
+{
+ char buf[2];
+ int speed, ret;
+
+
+ if (mode)
+ buf[0] = 0x0; /* auto */
+ else
+ buf[0] = 0xff; /* fixed */
+
+ ret = SendControlMsg(SET_LUM_CTL, SHUTTER_MODE_FORMATTER, 1);
+
+ if (!mode && ret >= 0) {
+ if (value < 0)
+ value = 0;
+ if (value > 0xffff)
+ value = 0xffff;
+ switch(pdev->type) {
+ case 675:
+ case 680:
+ case 690:
+ /* speed ranges from 0x0 to 0x290 (656) */
+ speed = (value / 100);
+ buf[1] = speed >> 8;
+ buf[0] = speed & 0xff;
+ break;
+ case 720:
+ case 730:
+ case 740:
+ case 750:
+ /* speed seems to range from 0x0 to 0xff */
+ buf[1] = 0;
+ buf[0] = value >> 8;
+ break;
+ }
+
+ ret = SendControlMsg(SET_LUM_CTL, PRESET_SHUTTER_FORMATTER, 2);
+ }
+ return ret;
+}
+
+
+/* POWER */
+
+int pwc_camera_power(struct pwc_device *pdev, int power)
+{
+ char buf;
+
+ if (pdev->type < 675 || (pdev->type < 730 && pdev->release < 6))
+ return 0; /* Not supported by Nala or Timon < release 6 */
+
+ if (power)
+ buf = 0x00; /* active */
+ else
+ buf = 0xFF; /* power save */
+ return SendControlMsg(SET_STATUS_CTL, SET_POWER_SAVE_MODE_FORMATTER, 1);
+}
+
+
+
+/* private calls */
+
+static inline int pwc_restore_user(struct pwc_device *pdev)
+{
+ char buf; /* dummy */
+ return SendControlMsg(SET_STATUS_CTL, RESTORE_USER_DEFAULTS_FORMATTER, 0);
+}
+
+static inline int pwc_save_user(struct pwc_device *pdev)
+{
+ char buf; /* dummy */
+ return SendControlMsg(SET_STATUS_CTL, SAVE_USER_DEFAULTS_FORMATTER, 0);
+}
+
+static inline int pwc_restore_factory(struct pwc_device *pdev)
+{
+ char buf; /* dummy */
+ return SendControlMsg(SET_STATUS_CTL, RESTORE_FACTORY_DEFAULTS_FORMATTER, 0);
+}
+
+ /* ************************************************* */
+ /* Patch by Alvarado: (not in the original version */
+
+ /*
+ * the camera recognizes modes from 0 to 4:
+ *
+ * 00: indoor (incandescant lighting)
+ * 01: outdoor (sunlight)
+ * 02: fluorescent lighting
+ * 03: manual
+ * 04: auto
+ */
+static inline int pwc_set_awb(struct pwc_device *pdev, int mode)
+{
+ char buf;
+ int ret;
+
+ if (mode < 0)
+ mode = 0;
+
+ if (mode > 4)
+ mode = 4;
+
+ buf = mode & 0x07; /* just the lowest three bits */
+
+ ret = SendControlMsg(SET_CHROM_CTL, WB_MODE_FORMATTER, 1);
+
+ if (ret < 0)
+ return ret;
+ return 0;
+}
+
+static inline int pwc_get_awb(struct pwc_device *pdev)
+{
+ unsigned char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_CHROM_CTL, WB_MODE_FORMATTER, 1);
+
+ if (ret < 0)
+ return ret;
+ return buf;
+}
+
+static inline int pwc_set_red_gain(struct pwc_device *pdev, int value)
+{
+ unsigned char buf;
+
+ if (value < 0)
+ value = 0;
+ if (value > 0xffff)
+ value = 0xffff;
+ /* only the msb is considered */
+ buf = value >> 8;
+ return SendControlMsg(SET_CHROM_CTL, PRESET_MANUAL_RED_GAIN_FORMATTER, 1);
+}
+
+static inline int pwc_get_red_gain(struct pwc_device *pdev, int *value)
+{
+ unsigned char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_RED_GAIN_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ *value = buf << 8;
+ return 0;
+}
+
+
+static inline int pwc_set_blue_gain(struct pwc_device *pdev, int value)
+{
+ unsigned char buf;
+
+ if (value < 0)
+ value = 0;
+ if (value > 0xffff)
+ value = 0xffff;
+ /* only the msb is considered */
+ buf = value >> 8;
+ return SendControlMsg(SET_CHROM_CTL, PRESET_MANUAL_BLUE_GAIN_FORMATTER, 1);
+}
+
+static inline int pwc_get_blue_gain(struct pwc_device *pdev, int *value)
+{
+ unsigned char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_BLUE_GAIN_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ *value = buf << 8;
+ return 0;
+}
+
+
+/* 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.
+ */
+static inline int pwc_read_red_gain(struct pwc_device *pdev, int *value)
+{
+ unsigned char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_STATUS_CTL, READ_RED_GAIN_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ *value = buf << 8;
+ return 0;
+}
+
+static inline int pwc_read_blue_gain(struct pwc_device *pdev, int *value)
+{
+ unsigned char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_STATUS_CTL, READ_BLUE_GAIN_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ *value = buf << 8;
+ return 0;
+}
+
+
+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 SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1);
+}
+
+static inline int pwc_get_wb_speed(struct pwc_device *pdev, int *value)
+{
+ unsigned char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ *value = buf * 0x7f0;
+ return 0;
+}
+
+
+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 SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1);
+}
+
+static inline int pwc_get_wb_delay(struct pwc_device *pdev, int *value)
+{
+ unsigned char buf;
+ int ret;
+
+ ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ *value = buf << 10;
+ return 0;
+}
+
+
+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)
+ on_value = 0xff;
+ if (off_value < 0)
+ off_value = 0;
+ if (off_value > 0xff)
+ off_value = 0xff;
+
+ buf[0] = on_value;
+ buf[1] = off_value;
+
+ return SendControlMsg(SET_STATUS_CTL, LED_FORMATTER, 2);
+}
+
+int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value)
+{
+ unsigned char buf[2];
+ int ret;
+
+ if (pdev->type < 730) {
+ *on_value = -1;
+ *off_value = -1;
+ return 0;
+ }
+
+ ret = RecvControlMsg(GET_STATUS_CTL, LED_FORMATTER, 2);
+ 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 = SendControlMsg(SET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+
+ if (contour < 0)
+ return 0;
+ if (contour > 0xffff)
+ contour = 0xffff;
+
+ buf = (contour >> 10); /* contour preset is [0..3f] */
+ ret = SendControlMsg(SET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1);
+ 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 = RecvControlMsg(GET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+
+ if (buf == 0) {
+ /* auto mode off, query current preset value */
+ ret = RecvControlMsg(GET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1);
+ 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 SendControlMsg(SET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1);
+}
+
+static inline int pwc_get_backlight(struct pwc_device *pdev, int *backlight)
+{
+ int ret;
+ unsigned char buf;
+
+ ret = RecvControlMsg(GET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ *backlight = buf;
+ return 0;
+}
+
+
+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 *flicker)
+{
+ int ret;
+ unsigned char buf;
+
+ ret = RecvControlMsg(GET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ *flicker = buf;
+ return 0;
+}
+
+
+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 *noise)
+{
+ int ret;
+ unsigned char buf;
+
+ ret = RecvControlMsg(GET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1);
+ if (ret < 0)
+ return ret;
+ *noise = buf;
+ return 0;
+}
+
+static int pwc_mpt_reset(struct pwc_device *pdev, int flags)
+{
+ unsigned char buf;
+
+ buf = flags & 0x03; // only lower two bits are currently used
+ return SendControlMsg(SET_MPT_CTL, PT_RESET_CONTROL_FORMATTER, 1);
+}
+
+static inline int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt)
+{
+ unsigned char buf[4];
+
+ /* set new relative angle; angles are expressed in degrees * 100,
+ but cam as .5 degree resolution, hence devide by 200. Also
+ the angle must be multiplied by 64 before it's send to
+ the cam (??)
+ */
+ pan = 64 * pan / 100;
+ tilt = -64 * tilt / 100; /* positive tilt is down, which is not what the user would expect */
+ buf[0] = pan & 0xFF;
+ buf[1] = (pan >> 8) & 0xFF;
+ buf[2] = tilt & 0xFF;
+ buf[3] = (tilt >> 8) & 0xFF;
+ return SendControlMsg(SET_MPT_CTL, PT_RELATIVE_CONTROL_FORMATTER, 4);
+}
+
+static inline int pwc_mpt_get_status(struct pwc_device *pdev, struct pwc_mpt_status *status)
+{
+ int ret;
+ unsigned char buf[5];
+
+ ret = RecvControlMsg(GET_MPT_CTL, PT_STATUS_FORMATTER, 5);
+ if (ret < 0)
+ return ret;
+ status->status = buf[0] & 0x7; // 3 bits are used for reporting
+ status->time_pan = (buf[1] << 8) + buf[2];
+ status->time_tilt = (buf[3] << 8) + buf[4];
+ return 0;
+}
+
+
+int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor)
+{
+ 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 = RecvControlMsg(GET_STATUS_CTL, request, 1);
+ if (ret < 0)
+ return ret;
+ if (pdev->type < 675)
+ *sensor = buf | 0x100;
+ else
+ *sensor = buf;
+ return 0;
+}
+
+
+ /* End of Add-Ons */
+ /* ************************************************* */
+
+/* Linux 2.5.something and 2.6 pass direct pointers to arguments of
+ ioctl() calls. With 2.4, you have to do tedious copy_from_user()
+ and copy_to_user() calls. With these macros we circumvent this,
+ and let me maintain only one source file. The functionality is
+ exactly the same otherwise.
+ */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
+
+/* define local variable for arg */
+#define ARG_DEF(ARG_type, ARG_name)\
+ ARG_type *ARG_name = arg;
+/* copy arg to local variable */
+#define ARG_IN(ARG_name) /* nothing */
+/* argument itself (referenced) */
+#define ARGR(ARG_name) (*ARG_name)
+/* argument address */
+#define ARGA(ARG_name) ARG_name
+/* copy local variable to arg */
+#define ARG_OUT(ARG_name) /* nothing */
+
+#else
+
+#define ARG_DEF(ARG_type, ARG_name)\
+ ARG_type ARG_name;
+#define ARG_IN(ARG_name)\
+ if (copy_from_user(&ARG_name, arg, sizeof(ARG_name))) {\
+ ret = -EFAULT;\
+ break;\
+ }
+#define ARGR(ARG_name) ARG_name
+#define ARGA(ARG_name) &ARG_name
+#define ARG_OUT(ARG_name)\
+ if (copy_to_user(arg, &ARG_name, sizeof(ARG_name))) {\
+ ret = -EFAULT;\
+ break;\
+ }
+
+#endif
+
+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:
+ {
+ ARG_DEF(int, qual)
+
+ ARG_IN(qual)
+ if (ARGR(qual) < 0 || ARGR(qual) > 3)
+ ret = -EINVAL;
+ else
+ ret = pwc_try_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, ARGR(qual), pdev->vsnapshot);
+ if (ret >= 0)
+ pdev->vcompression = ARGR(qual);
+ break;
+ }
+
+ case VIDIOCPWCGCQUAL:
+ {
+ ARG_DEF(int, qual)
+
+ ARGR(qual) = pdev->vcompression;
+ ARG_OUT(qual)
+ break;
+ }
+
+ case VIDIOCPWCPROBE:
+ {
+ ARG_DEF(struct pwc_probe, probe)
+
+ strcpy(ARGR(probe).name, pdev->vdev->name);
+ ARGR(probe).type = pdev->type;
+ ARG_OUT(probe)
+ break;
+ }
+
+ case VIDIOCPWCGSERIAL:
+ {
+ ARG_DEF(struct pwc_serial, serial)
+
+ strcpy(ARGR(serial).serial, pdev->serial);
+ ARG_OUT(serial)
+ break;
+ }
+
+ case VIDIOCPWCSAGC:
+ {
+ ARG_DEF(int, agc)
+
+ ARG_IN(agc)
+ if (pwc_set_agc(pdev, ARGR(agc) < 0 ? 1 : 0, ARGR(agc)))
+ ret = -EINVAL;
+ break;
+ }
+
+ case VIDIOCPWCGAGC:
+ {
+ ARG_DEF(int, agc)
+
+ if (pwc_get_agc(pdev, ARGA(agc)))
+ ret = -EINVAL;
+ ARG_OUT(agc)
+ break;
+ }
+
+ case VIDIOCPWCSSHUTTER:
+ {
+ ARG_DEF(int, shutter_speed)
+
+ ARG_IN(shutter_speed)
+ ret = pwc_set_shutter_speed(pdev, ARGR(shutter_speed) < 0 ? 1 : 0, ARGR(shutter_speed));
+ break;
+ }
+
+ case VIDIOCPWCSAWB:
+ {
+ ARG_DEF(struct pwc_whitebalance, wb)
+
+ ARG_IN(wb)
+ ret = pwc_set_awb(pdev, ARGR(wb).mode);
+ if (ret >= 0 && ARGR(wb).mode == PWC_WB_MANUAL) {
+ pwc_set_red_gain(pdev, ARGR(wb).manual_red);
+ pwc_set_blue_gain(pdev, ARGR(wb).manual_blue);
+ }
+ break;
+ }
+
+ case VIDIOCPWCGAWB:
+ {
+ ARG_DEF(struct pwc_whitebalance, wb)
+
+ memset(ARGA(wb), 0, sizeof(struct pwc_whitebalance));
+ ARGR(wb).mode = pwc_get_awb(pdev);
+ if (ARGR(wb).mode < 0)
+ ret = -EINVAL;
+ else {
+ if (ARGR(wb).mode == PWC_WB_MANUAL) {
+ ret = pwc_get_red_gain(pdev, &ARGR(wb).manual_red);
+ if (ret < 0)
+ break;
+ ret = pwc_get_blue_gain(pdev, &ARGR(wb).manual_blue);
+ if (ret < 0)
+ break;
+ }
+ if (ARGR(wb).mode == PWC_WB_AUTO) {
+ ret = pwc_read_red_gain(pdev, &ARGR(wb).read_red);
+ if (ret < 0)
+ break;
+ ret =pwc_read_blue_gain(pdev, &ARGR(wb).read_blue);
+ if (ret < 0)
+ break;
+ }
+ }
+ ARG_OUT(wb)
+ break;
+ }
+
+ case VIDIOCPWCSAWBSPEED:
+ {
+ ARG_DEF(struct pwc_wb_speed, wbs)
+
+ if (ARGR(wbs).control_speed > 0) {
+ ret = pwc_set_wb_speed(pdev, ARGR(wbs).control_speed);
+ }
+ if (ARGR(wbs).control_delay > 0) {
+ ret = pwc_set_wb_delay(pdev, ARGR(wbs).control_delay);
+ }
+ break;
+ }
+
+ case VIDIOCPWCGAWBSPEED:
+ {
+ ARG_DEF(struct pwc_wb_speed, wbs)
+
+ ret = pwc_get_wb_speed(pdev, &ARGR(wbs).control_speed);
+ if (ret < 0)
+ break;
+ ret = pwc_get_wb_delay(pdev, &ARGR(wbs).control_delay);
+ if (ret < 0)
+ break;
+ ARG_OUT(wbs)
+ break;
+ }
+
+ case VIDIOCPWCSLED:
+ {
+ ARG_DEF(struct pwc_leds, leds)
+
+ ARG_IN(leds)
+ ret = pwc_set_leds(pdev, ARGR(leds).led_on, ARGR(leds).led_off);
+ break;
+ }
+
+
+ case VIDIOCPWCGLED:
+ {
+ ARG_DEF(struct pwc_leds, leds)
+
+ ret = pwc_get_leds(pdev, &ARGR(leds).led_on, &ARGR(leds).led_off);
+ ARG_OUT(leds)
+ break;
+ }
+
+ case VIDIOCPWCSCONTOUR:
+ {
+ ARG_DEF(int, contour)
+
+ ARG_IN(contour)
+ ret = pwc_set_contour(pdev, ARGR(contour));
+ break;
+ }
+
+ case VIDIOCPWCGCONTOUR:
+ {
+ ARG_DEF(int, contour)
+
+ ret = pwc_get_contour(pdev, ARGA(contour));
+ ARG_OUT(contour)
+ break;
+ }
+
+ case VIDIOCPWCSBACKLIGHT:
+ {
+ ARG_DEF(int, backlight)
+
+ ARG_IN(backlight)
+ ret = pwc_set_backlight(pdev, ARGR(backlight));
+ break;
+ }
+
+ case VIDIOCPWCGBACKLIGHT:
+ {
+ ARG_DEF(int, backlight)
+
+ ret = pwc_get_backlight(pdev, ARGA(backlight));
+ ARG_OUT(backlight)
+ break;
+ }
+
+ case VIDIOCPWCSFLICKER:
+ {
+ ARG_DEF(int, flicker)
+
+ ARG_IN(flicker)
+ ret = pwc_set_flicker(pdev, ARGR(flicker));
+ break;
+ }
+
+ case VIDIOCPWCGFLICKER:
+ {
+ ARG_DEF(int, flicker)
+
+ ret = pwc_get_flicker(pdev, ARGA(flicker));
+ ARG_OUT(flicker)
+ break;
+ }
+
+ case VIDIOCPWCSDYNNOISE:
+ {
+ ARG_DEF(int, dynnoise)
+
+ ARG_IN(dynnoise)
+ ret = pwc_set_dynamic_noise(pdev, ARGR(dynnoise));
+ break;
+ }
+
+ case VIDIOCPWCGDYNNOISE:
+ {
+ ARG_DEF(int, dynnoise)
+
+ ret = pwc_get_dynamic_noise(pdev, ARGA(dynnoise));
+ ARG_OUT(dynnoise);
+ break;
+ }
+
+ case VIDIOCPWCGREALSIZE:
+ {
+ ARG_DEF(struct pwc_imagesize, size)
+
+ ARGR(size).width = pdev->image.x;
+ ARGR(size).height = pdev->image.y;
+ ARG_OUT(size)
+ break;
+ }
+
+ case VIDIOCPWCMPTRESET:
+ {
+ if (pdev->features & FEATURE_MOTOR_PANTILT)
+ {
+ ARG_DEF(int, flags)
+
+ ARG_IN(flags)
+ ret = pwc_mpt_reset(pdev, ARGR(flags));
+ if (ret >= 0)
+ {
+ pdev->pan_angle = 0;
+ pdev->tilt_angle = 0;
+ }
+ }
+ else
+ {
+ ret = -ENXIO;
+ }
+ break;
+ }
+
+ case VIDIOCPWCMPTGRANGE:
+ {
+ if (pdev->features & FEATURE_MOTOR_PANTILT)
+ {
+ ARG_DEF(struct pwc_mpt_range, range)
+
+ ARGR(range) = pdev->angle_range;
+ ARG_OUT(range)
+ }
+ else
+ {
+ ret = -ENXIO;
+ }
+ break;
+ }
+
+ case VIDIOCPWCMPTSANGLE:
+ {
+ int new_pan, new_tilt;
+
+ if (pdev->features & FEATURE_MOTOR_PANTILT)
+ {
+ ARG_DEF(struct pwc_mpt_angles, angles)
+
+ ARG_IN(angles)
+ /* The camera can only set relative angles, so
+ do some calculations when getting an absolute angle .
+ */
+ if (ARGR(angles).absolute)
+ {
+ new_pan = ARGR(angles).pan;
+ new_tilt = ARGR(angles).tilt;
+ }
+ else
+ {
+ new_pan = pdev->pan_angle + ARGR(angles).pan;
+ new_tilt = pdev->tilt_angle + ARGR(angles).tilt;
+ }
+ /* check absolute ranges */
+ if (new_pan < pdev->angle_range.pan_min ||
+ new_pan > pdev->angle_range.pan_max ||
+ new_tilt < pdev->angle_range.tilt_min ||
+ new_tilt > pdev->angle_range.tilt_max)
+ {
+ ret = -ERANGE;
+ }
+ else
+ {
+ /* go to relative range, check again */
+ new_pan -= pdev->pan_angle;
+ new_tilt -= pdev->tilt_angle;
+ /* angles are specified in degrees * 100, thus the limit = 36000 */
+ if (new_pan < -36000 || new_pan > 36000 || new_tilt < -36000 || new_tilt > 36000)
+ ret = -ERANGE;
+ }
+ if (ret == 0) /* no errors so far */
+ {
+ ret = pwc_mpt_set_angle(pdev, new_pan, new_tilt);
+ if (ret >= 0)
+ {
+ pdev->pan_angle += new_pan;
+ pdev->tilt_angle += new_tilt;
+ }
+ if (ret == -EPIPE) /* stall -> out of range */
+ ret = -ERANGE;
+ }
+ }
+ else
+ {
+ ret = -ENXIO;
+ }
+ break;
+ }
+
+ case VIDIOCPWCMPTGANGLE:
+ {
+
+ if (pdev->features & FEATURE_MOTOR_PANTILT)
+ {
+ ARG_DEF(struct pwc_mpt_angles, angles)
+
+ ARGR(angles).absolute = 1;
+ ARGR(angles).pan = pdev->pan_angle;
+ ARGR(angles).tilt = pdev->tilt_angle;
+ ARG_OUT(angles)
+ }
+ else
+ {
+ ret = -ENXIO;
+ }
+ break;
+ }
+
+ case VIDIOCPWCMPTSTATUS:
+ {
+ if (pdev->features & FEATURE_MOTOR_PANTILT)
+ {
+ ARG_DEF(struct pwc_mpt_status, status)
+
+ ret = pwc_mpt_get_status(pdev, ARGA(status));
+ ARG_OUT(status)
+ }
+ else
+ {
+ ret = -ENXIO;
+ }
+ break;
+ }
+
+ case VIDIOCPWCGVIDCMD:
+ {
+ ARG_DEF(struct pwc_video_command, cmd);
+
+ ARGR(cmd).type = pdev->type;
+ ARGR(cmd).release = pdev->release;
+ ARGR(cmd).command_len = pdev->cmd_len;
+ memcpy(&ARGR(cmd).command_buf, pdev->cmd_buf, pdev->cmd_len);
+ ARGR(cmd).bandlength = pdev->vbandlength;
+ ARGR(cmd).frame_size = pdev->frame_size;
+ ARG_OUT(cmd)
+ break;
+ }
+ /*
+ case VIDIOCPWCGVIDTABLE:
+ {
+ ARG_DEF(struct pwc_table_init_buffer, table);
+ ARGR(table).len = pdev->cmd_len;
+ memcpy(&ARGR(table).buffer, pdev->decompress_data, pdev->decompressor->table_size);
+ ARG_OUT(table)
+ break;
+ }
+ */
+
+ default:
+ ret = -ENOIOCTLCMD;
+ break;
+ }
+
+ if (ret > 0)
+ return 0;
+ return ret;
+}
+
+
+
diff --git a/drivers/usb/media/pwc/pwc-dec1.c b/drivers/usb/media/pwc/pwc-dec1.c
new file mode 100644
index 000000000000..57d03d9178f6
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-dec1.c
@@ -0,0 +1,42 @@
+/* Linux driver for Philips webcam
+ Decompression for chipset version 1
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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 "pwc-dec1.h"
+
+
+void pwc_dec1_init(int type, int release, void *buffer, void *table)
+{
+
+}
+
+void pwc_dec1_exit(void)
+{
+
+
+
+}
+
diff --git a/drivers/usb/media/pwc/pwc-dec1.h b/drivers/usb/media/pwc/pwc-dec1.h
new file mode 100644
index 000000000000..a7ffd9c45a2c
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-dec1.h
@@ -0,0 +1,36 @@
+/* Linux driver for Philips webcam
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+
+
+#ifndef PWC_DEC1_H
+#define PWC_DEC1_H
+
+void pwc_dec1_init(int type, int release, void *buffer, void *private_data);
+void pwc_dec1_exit(void);
+
+#endif
+
+
+
diff --git a/drivers/usb/media/pwc/pwc-dec23.c b/drivers/usb/media/pwc/pwc-dec23.c
new file mode 100644
index 000000000000..98fa3f7a9eff
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-dec23.c
@@ -0,0 +1,623 @@
+/* Linux driver for Philips webcam
+ Decompression for chipset version 2 et 3
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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 "pwc-timon.h"
+#include "pwc-kiara.h"
+#include "pwc-dec23.h"
+#include "pwc-ioctl.h"
+
+#include <linux/string.h>
+
+/****
+ *
+ *
+ *
+ */
+
+
+static void fill_table_a000(unsigned int *p)
+{
+ static unsigned int initial_values[12] = {
+ 0xFFAD9B00, 0xFFDDEE00, 0x00221200, 0x00526500,
+ 0xFFC21E00, 0x003DE200, 0xFF924B80, 0xFFD2A300,
+ 0x002D5D00, 0x006DB480, 0xFFED3E00, 0x0012C200
+ };
+ static unsigned int values_derivated[12] = {
+ 0x0000A4CA, 0x00004424, 0xFFFFBBDC, 0xFFFF5B36,
+ 0x00007BC4, 0xFFFF843C, 0x0000DB69, 0x00005ABA,
+ 0xFFFFA546, 0xFFFF2497, 0x00002584, 0xFFFFDA7C
+ };
+ unsigned int temp_values[12];
+ int i,j;
+
+ memcpy(temp_values,initial_values,sizeof(initial_values));
+ for (i=0;i<256;i++)
+ {
+ for (j=0;j<12;j++)
+ {
+ *p++ = temp_values[j];
+ temp_values[j] += values_derivated[j];
+ }
+ }
+}
+
+static void fill_table_d000(unsigned char *p)
+{
+ int bit,byte;
+
+ for (bit=0; bit<8; bit++)
+ {
+ unsigned char bitpower = 1<<bit;
+ unsigned char mask = bitpower-1;
+ for (byte=0; byte<256; byte++)
+ {
+ if (byte & bitpower)
+ *p++ = -(byte & mask);
+ else
+ *p++ = (byte & mask);
+ }
+ }
+}
+
+/*
+ *
+ * Kiara: 0 <= ver <= 7
+ * Timon: 0 <= ver <= 15
+ *
+ */
+static void fill_table_color(unsigned int version, const unsigned int *romtable,
+ unsigned char *p0004,
+ unsigned char *p8004)
+{
+ const unsigned int *table;
+ unsigned char *p0, *p8;
+ int i,j,k;
+ int dl,bit,pw;
+
+ romtable += version*256;
+
+ for (i=0; i<2; i++)
+ {
+ table = romtable + i*128;
+
+ for (dl=0; dl<16; dl++)
+ {
+ p0 = p0004 + (i<<14) + (dl<<10);
+ p8 = p8004 + (i<<12) + (dl<<8);
+
+ for (j=0; j<8; j++ , table++, p0+=128)
+ {
+ for (k=0; k<16; k++)
+ {
+ if (k==0)
+ bit=1;
+ else if (k>=1 && k<3)
+ bit=(table[0]>>15)&7;
+ else if (k>=3 && k<6)
+ bit=(table[0]>>12)&7;
+ else if (k>=6 && k<10)
+ bit=(table[0]>>9)&7;
+ else if (k>=10 && k<13)
+ bit=(table[0]>>6)&7;
+ else if (k>=13 && k<15)
+ bit=(table[0]>>3)&7;
+ else
+ bit=(table[0])&7;
+ if (k == 0)
+ *(unsigned char *)p8++ = 8;
+ else
+ *(unsigned char *)p8++ = j - bit;
+ *(unsigned char *)p8++ = bit;
+
+ pw = 1<<bit;
+ p0[k+0x00] = (1*pw) + 0x80;
+ p0[k+0x10] = (2*pw) + 0x80;
+ p0[k+0x20] = (3*pw) + 0x80;
+ p0[k+0x30] = (4*pw) + 0x80;
+ p0[k+0x40] = (-pw) + 0x80;
+ p0[k+0x50] = (2*-pw) + 0x80;
+ p0[k+0x60] = (3*-pw) + 0x80;
+ p0[k+0x70] = (4*-pw) + 0x80;
+ } /* end of for (k=0; k<16; k++, p8++) */
+ } /* end of for (j=0; j<8; j++ , table++) */
+ } /* end of for (dl=0; dl<16; dl++) */
+ } /* end of for (i=0; i<2; i++) */
+}
+
+/*
+ * precision = (pdev->xx + pdev->yy)
+ *
+ */
+static void fill_table_dc00_d800(unsigned int precision, unsigned int *pdc00, unsigned int *pd800)
+{
+ int i;
+ unsigned int offset1, offset2;
+
+ for(i=0,offset1=0x4000, offset2=0; i<256 ; i++,offset1+=0x7BC4, offset2+=0x7BC4)
+ {
+ unsigned int msb = offset1 >> 15;
+
+ if ( msb > 255)
+ {
+ if (msb)
+ msb=0;
+ else
+ msb=255;
+ }
+
+ *pdc00++ = msb << precision;
+ *pd800++ = offset2;
+ }
+
+}
+
+/*
+ * struct {
+ * unsigned char op; // operation to execute
+ * unsigned char bits; // bits use to perform operation
+ * unsigned char offset1; // offset to add to access in the table_0004 % 16
+ * unsigned char offset2; // offset to add to access in the table_0004
+ * }
+ *
+ */
+static unsigned int table_ops[] = {
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x10, 0x00,0x06,0x01,0x30,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x01,0x20, 0x01,0x00,0x00,0x00,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x50, 0x00,0x05,0x02,0x00,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x03,0x00, 0x01,0x00,0x00,0x00,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x10, 0x00,0x06,0x02,0x10,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x01,0x60, 0x01,0x00,0x00,0x00,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x50, 0x00,0x05,0x02,0x40,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x03,0x40, 0x01,0x00,0x00,0x00,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x10, 0x00,0x06,0x01,0x70,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x01,0x20, 0x01,0x00,0x00,0x00,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x50, 0x00,0x05,0x02,0x00,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x03,0x00, 0x01,0x00,0x00,0x00,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x10, 0x00,0x06,0x02,0x50,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x01,0x60, 0x01,0x00,0x00,0x00,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x50, 0x00,0x05,0x02,0x40,
+0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x03,0x40, 0x01,0x00,0x00,0x00
+};
+
+/*
+ * TODO: multiply by 4 all values
+ *
+ */
+static unsigned int MulIdx[256] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
+ 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4,
+ 6, 7, 8, 9, 7,10,11, 8, 8,11,10, 7, 9, 8, 7, 6,
+ 4, 5, 5, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 5, 5, 4,
+ 1, 3, 0, 2, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3, 0, 2,
+ 0, 3, 3, 0, 1, 2, 2, 1, 2, 1, 1, 2, 3, 0, 0, 3,
+ 0, 1, 2, 3, 3, 2, 1, 0, 3, 2, 1, 0, 0, 1, 2, 3,
+ 1, 1, 1, 1, 3, 3, 3, 3, 0, 0, 0, 0, 2, 2, 2, 2,
+ 7,10,11, 8, 9, 8, 7, 6, 6, 7, 8, 9, 8,11,10, 7,
+ 4, 5, 5, 4, 5, 4, 4, 5, 5, 4, 4, 5, 4, 5, 5, 4,
+ 7, 9, 6, 8,10, 8, 7,11,11, 7, 8,10, 8, 6, 9, 7,
+ 1, 3, 0, 2, 2, 0, 3, 1, 2, 0, 3, 1, 1, 3, 0, 2,
+ 1, 2, 2, 1, 3, 0, 0, 3, 0, 3, 3, 0, 2, 1, 1, 2,
+10, 8, 7,11, 8, 6, 9, 7, 7, 9, 6, 8,11, 7, 8,10
+};
+
+
+
+void pwc_dec23_init(int type, int release, unsigned char *mode, void *data)
+{
+ int flags;
+ struct pwc_dec23_private *pdev = data;
+ release = release;
+
+ switch (type)
+ {
+ case 720:
+ case 730:
+ case 740:
+ case 750:
+ flags = mode[2]&0x18; /* our: flags = 8, mode[2]==e8 */
+ if (flags==8)
+ pdev->zz = 7;
+ else if (flags==0x10)
+ pdev->zz = 8;
+ else
+ pdev->zz = 6;
+ flags = mode[2]>>5; /* our: 7 */
+
+ fill_table_color(flags, (unsigned int *)KiaraRomTable, pdev->table_0004, pdev->table_8004);
+ break;
+
+
+ case 675:
+ case 680:
+ case 690:
+ flags = mode[2]&6;
+ if (flags==2)
+ pdev->zz = 7;
+ else if (flags==4)
+ pdev->zz = 8;
+ else
+ pdev->zz = 6;
+ flags = mode[2]>>3;
+
+ fill_table_color(flags, (unsigned int *)TimonRomTable, pdev->table_0004, pdev->table_8004);
+ break;
+
+ default:
+ /* Not supported */
+ return;
+ }
+
+ /* * * * ** */
+ pdev->xx = 8 - pdev->zz;
+ pdev->yy = 15 - pdev->xx;
+ pdev->zzmask = 0xFF>>pdev->xx;
+ //pdev->zzmask = (1U<<pdev->zz)-1;
+
+
+ fill_table_dc00_d800(pdev->xx + pdev->yy, pdev->table_dc00, pdev->table_d800);
+ fill_table_a000(pdev->table_a004);
+ fill_table_d000(pdev->table_d004);
+}
+
+
+/*
+ * To manage the stream, we keep in a 32 bits variables,
+ * the next bits in the stream. fill_reservoir() add to
+ * the reservoir at least wanted nbits.
+ *
+ *
+ */
+#define fill_nbits(reservoir,nbits_in_reservoir,stream,nbits_wanted) do { \
+ while (nbits_in_reservoir<nbits_wanted) \
+ { \
+ reservoir |= (*(stream)++) << nbits_in_reservoir; \
+ nbits_in_reservoir+=8; \
+ } \
+} while(0);
+
+#define get_nbits(reservoir,nbits_in_reservoir,stream,nbits_wanted,result) do { \
+ fill_nbits(reservoir,nbits_in_reservoir,stream,nbits_wanted); \
+ result = (reservoir) & ((1U<<nbits_wanted)-1); \
+ reservoir >>= nbits_wanted; \
+ nbits_in_reservoir -= nbits_wanted; \
+} while(0);
+
+
+
+static void DecompressBand23(const struct pwc_dec23_private *pdev,
+ const unsigned char *rawyuv,
+ unsigned char *planar_y,
+ unsigned char *planar_u,
+ unsigned char *planar_v,
+ unsigned int image_x, /* aka number of pixels wanted ??? */
+ unsigned int pixels_per_line, /* aka number of pixels per line */
+ int flags)
+{
+
+
+ unsigned int reservoir, nbits_in_reservoir;
+ int first_4_bits;
+ unsigned int bytes_per_channel;
+ int line_size; /* size of the line (4Y+U+V) */
+ int passes;
+ const unsigned char *ptable0004, *ptable8004;
+
+ int even_line;
+ unsigned int temp_colors[16];
+ int nblocks;
+
+ const unsigned char *stream;
+ unsigned char *dest_y, *dest_u=NULL, *dest_v=NULL;
+ unsigned int offset_to_plane_u, offset_to_plane_v;
+
+ int i;
+
+
+ reservoir = 0;
+ nbits_in_reservoir = 0;
+ stream = rawyuv+1; /* The first byte of the stream is skipped */
+ even_line = 1;
+
+ get_nbits(reservoir,nbits_in_reservoir,stream,4,first_4_bits);
+
+ line_size = pixels_per_line*3;
+
+ for (passes=0;passes<2;passes++)
+ {
+ if (passes==0)
+ {
+ bytes_per_channel = pixels_per_line;
+ dest_y = planar_y;
+ nblocks = image_x/4;
+ }
+ else
+ {
+ /* Format planar: All Y, then all U, then all V */
+ bytes_per_channel = pixels_per_line/2;
+ dest_u = planar_u;
+ dest_v = planar_v;
+ dest_y = dest_u;
+ nblocks = image_x/8;
+ }
+
+ offset_to_plane_u = bytes_per_channel*2;
+ offset_to_plane_v = bytes_per_channel*3;
+ /*
+ printf("bytes_per_channel = %d\n",bytes_per_channel);
+ printf("offset_to_plane_u = %d\n",offset_to_plane_u);
+ printf("offset_to_plane_v = %d\n",offset_to_plane_v);
+ */
+
+ while (nblocks-->0)
+ {
+ unsigned int gray_index;
+
+ fill_nbits(reservoir,nbits_in_reservoir,stream,16);
+ gray_index = reservoir & pdev->zzmask;
+ reservoir >>= pdev->zz;
+ nbits_in_reservoir -= pdev->zz;
+
+ fill_nbits(reservoir,nbits_in_reservoir,stream,2);
+
+ if ( (reservoir & 3) == 0)
+ {
+ reservoir>>=2;
+ nbits_in_reservoir-=2;
+ for (i=0;i<16;i++)
+ temp_colors[i] = pdev->table_dc00[gray_index];
+
+ }
+ else
+ {
+ unsigned int channel_v, offset1;
+
+ /* swap bit 0 and 2 of offset_OR */
+ channel_v = ((reservoir & 1) << 2) | (reservoir & 2) | ((reservoir & 4)>>2);
+ reservoir>>=3;
+ nbits_in_reservoir-=3;
+
+ for (i=0;i<16;i++)
+ temp_colors[i] = pdev->table_d800[gray_index];
+
+ ptable0004 = pdev->table_0004 + (passes*16384) + (first_4_bits*1024) + (channel_v*128);
+ ptable8004 = pdev->table_8004 + (passes*4096) + (first_4_bits*256) + (channel_v*32);
+
+ offset1 = 0;
+ while(1)
+ {
+ unsigned int index_in_table_ops, op, rows=0;
+ fill_nbits(reservoir,nbits_in_reservoir,stream,16);
+
+ /* mode is 0,1 or 2 */
+ index_in_table_ops = (reservoir&0x3F);
+ op = table_ops[ index_in_table_ops*4 ];
+ if (op == 2)
+ {
+ reservoir >>= 2;
+ nbits_in_reservoir -= 2;
+ break; /* exit the while(1) */
+ }
+ if (op == 0)
+ {
+ unsigned int shift;
+
+ offset1 = (offset1 + table_ops[index_in_table_ops*4+2]) & 0x0F;
+ shift = table_ops[ index_in_table_ops*4+1 ];
+ reservoir >>= shift;
+ nbits_in_reservoir -= shift;
+ rows = ptable0004[ offset1 + table_ops[index_in_table_ops*4+3] ];
+ }
+ if (op == 1)
+ {
+ /* 10bits [ xxxx xxxx yyyy 000 ]
+ * yyy => offset in the table8004
+ * xxx => offset in the tabled004
+ */
+ unsigned int mask, shift;
+ unsigned int col1, row1, total_bits;
+
+ offset1 = (offset1 + ((reservoir>>3)&0x0F)+1) & 0x0F;
+
+ col1 = (reservoir>>7) & 0xFF;
+ row1 = ptable8004 [ offset1*2 ];
+
+ /* Bit mask table */
+ mask = pdev->table_d004[ (row1<<8) + col1 ];
+ shift = ptable8004 [ offset1*2 + 1];
+ rows = ((mask << shift) + 0x80) & 0xFF;
+
+ total_bits = row1 + 8;
+ reservoir >>= total_bits;
+ nbits_in_reservoir -= total_bits;
+ }
+ {
+ const unsigned int *table_a004 = pdev->table_a004 + rows*12;
+ unsigned int *poffset = MulIdx + offset1*16; /* 64/4 (int) */
+ for (i=0;i<16;i++)
+ {
+ temp_colors[i] += table_a004[ *poffset ];
+ poffset++;
+ }
+ }
+ }
+ }
+#define USE_SIGNED_INT_FOR_COLOR
+#ifdef USE_SIGNED_INT_FOR_COLOR
+# define CLAMP(x) ((x)>255?255:((x)<0?0:x))
+#else
+# define CLAMP(x) ((x)>255?255:x)
+#endif
+
+ if (passes == 0)
+ {
+#ifdef USE_SIGNED_INT_FOR_COLOR
+ const int *c = temp_colors;
+#else
+ const unsigned int *c = temp_colors;
+#endif
+ unsigned char *d;
+
+ d = dest_y;
+ for (i=0;i<4;i++,c++)
+ *d++ = CLAMP((*c) >> pdev->yy);
+
+ d = dest_y + bytes_per_channel;
+ for (i=0;i<4;i++,c++)
+ *d++ = CLAMP((*c) >> pdev->yy);
+
+ d = dest_y + offset_to_plane_u;
+ for (i=0;i<4;i++,c++)
+ *d++ = CLAMP((*c) >> pdev->yy);
+
+ d = dest_y + offset_to_plane_v;
+ for (i=0;i<4;i++,c++)
+ *d++ = CLAMP((*c) >> pdev->yy);
+
+ dest_y += 4;
+ }
+ else if (passes == 1)
+ {
+#ifdef USE_SIGNED_INT_FOR_COLOR
+ int *c1 = temp_colors;
+ int *c2 = temp_colors+4;
+#else
+ unsigned int *c1 = temp_colors;
+ unsigned int *c2 = temp_colors+4;
+#endif
+ unsigned char *d;
+
+ d = dest_y;
+ for (i=0;i<4;i++,c1++,c2++)
+ {
+ *d++ = CLAMP((*c1) >> pdev->yy);
+ *d++ = CLAMP((*c2) >> pdev->yy);
+ }
+ c1 = temp_colors+12;
+ //c2 = temp_colors+8;
+ d = dest_y + bytes_per_channel;
+ for (i=0;i<4;i++,c1++,c2++)
+ {
+ *d++ = CLAMP((*c1) >> pdev->yy);
+ *d++ = CLAMP((*c2) >> pdev->yy);
+ }
+
+ if (even_line) /* Each line, swap u/v */
+ {
+ even_line=0;
+ dest_y = dest_v;
+ dest_u += 8;
+ }
+ else
+ {
+ even_line=1;
+ dest_y = dest_u;
+ dest_v += 8;
+ }
+ }
+
+ } /* end of while (nblocks-->0) */
+
+ } /* end of for (passes=0;passes<2;passes++) */
+
+}
+
+
+/**
+ *
+ * image: size of the image wanted
+ * view : size of the image returned by the camera
+ * offset: (x,y) to displayer image in the view
+ *
+ * src: raw data
+ * dst: image output
+ * flags: PWCX_FLAG_PLANAR
+ * pdev: private buffer
+ * bandlength:
+ *
+ */
+void pwc_dec23_decompress(const struct pwc_coord *image,
+ const struct pwc_coord *view,
+ const struct pwc_coord *offset,
+ const void *src,
+ void *dst,
+ int flags,
+ const void *data,
+ int bandlength)
+{
+ const struct pwc_dec23_private *pdev = data;
+ unsigned char *pout, *pout_planar_y=NULL, *pout_planar_u=NULL, *pout_planar_v=NULL;
+ int i,n,stride,pixel_size;
+
+
+ if (flags & PWCX_FLAG_BAYER)
+ {
+ pout = dst + (view->x * offset->y) + offset->x;
+ pixel_size = view->x * 4;
+ }
+ else
+ {
+ n = view->x * view->y;
+
+ /* offset in Y plane */
+ stride = view->x * offset->y;
+ pout_planar_y = dst + stride + offset->x;
+
+ /* offsets in U/V planes */
+ stride = (view->x * offset->y)/4 + offset->x/2;
+ pout_planar_u = dst + n + + stride;
+ pout_planar_v = dst + n + n/4 + stride;
+
+ pixel_size = view->x * 4;
+ }
+
+
+ for (i=0;i<image->y;i+=4)
+ {
+ if (flags & PWCX_FLAG_BAYER)
+ {
+ //TODO:
+ //DecompressBandBayer(pdev,src,pout,image.x,view->x,flags);
+ src += bandlength;
+ pout += pixel_size;
+ }
+ else
+ {
+ DecompressBand23(pdev,src,pout_planar_y,pout_planar_u,pout_planar_v,image->x,view->x,flags);
+ src += bandlength;
+ pout_planar_y += pixel_size;
+ pout_planar_u += view->x;
+ pout_planar_v += view->x;
+ }
+ }
+}
+
+void pwc_dec23_exit(void)
+{
+ /* Do nothing */
+
+}
+
diff --git a/drivers/usb/media/pwc/pwc-dec23.h b/drivers/usb/media/pwc/pwc-dec23.h
new file mode 100644
index 000000000000..5b2aacdefa6c
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-dec23.h
@@ -0,0 +1,58 @@
+/* Linux driver for Philips webcam
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+#ifndef PWC_DEC23_H
+#define PWC_DEC23_H
+
+struct pwc_dec23_private
+{
+ unsigned char xx,yy,zz,zzmask;
+
+ unsigned char table_0004[2*0x4000];
+ unsigned char table_8004[2*0x1000];
+ unsigned int table_a004[256*12];
+
+ unsigned char table_d004[8*256];
+ unsigned int table_d800[256];
+ unsigned int table_dc00[256];
+};
+
+
+void pwc_dec23_init(int type, int release, unsigned char *buffer, void *private_data);
+void pwc_dec23_exit(void);
+void pwc_dec23_decompress(const struct pwc_coord *image,
+ const struct pwc_coord *view,
+ const struct pwc_coord *offset,
+ const void *src,
+ void *dst,
+ int flags,
+ const void *data,
+ int bandlength);
+
+
+
+#endif
+
+
+
diff --git a/drivers/usb/media/pwc/pwc-if.c b/drivers/usb/media/pwc/pwc-if.c
new file mode 100644
index 000000000000..100a5a4f03a3
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-if.c
@@ -0,0 +1,2212 @@
+/* Linux driver for Philips webcam
+ USB and Video4Linux interface part.
+ (C) 1999-2004 Nemosoft Unv.
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+
+*/
+
+/*
+ This code forms the interface between the USB layers and the Philips
+ specific stuff. Some adanved stuff of the driver falls under an
+ NDA, signed between me and Philips B.V., Eindhoven, the Netherlands, and
+ is thus not distributed in source form. The binary pwcx.o module
+ contains the code that falls under the NDA.
+
+ In case you're wondering: 'pwc' stands for "Philips WebCam", but
+ I really didn't want to type 'philips_web_cam' every time (I'm lazy as
+ any Linux kernel hacker, but I don't like uncomprehensible abbreviations
+ without explanation).
+
+ Oh yes, convention: to disctinguish between all the various pointers to
+ device-structures, I use these names for the pointer variables:
+ udev: struct usb_device *
+ vdev: struct video_device *
+ pdev: struct pwc_devive *
+*/
+
+/* 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 Afina Eye ID
+ - Xavier Roche: QuickCam Pro 4000 ID
+ - Jens Knudsen: QuickCam Zoom ID
+ - J. Debert: QuickCam for Notebooks ID
+*/
+
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/poll.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <asm/io.h>
+
+#include "pwc.h"
+#include "pwc-ioctl.h"
+#include "pwc-kiara.h"
+#include "pwc-timon.h"
+#include "pwc-dec23.h"
+#include "pwc-dec1.h"
+#include "pwc-uncompress.h"
+
+/* 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) },
+ { USB_DEVICE(0x0471, 0x0308) },
+ { USB_DEVICE(0x0471, 0x030C) },
+ { USB_DEVICE(0x0471, 0x0310) },
+ { USB_DEVICE(0x0471, 0x0311) },
+ { USB_DEVICE(0x0471, 0x0312) },
+ { USB_DEVICE(0x0471, 0x0313) }, /* the 'new' 720K */
+ { USB_DEVICE(0x069A, 0x0001) }, /* Askey */
+ { USB_DEVICE(0x046D, 0x08B0) }, /* Logitech QuickCam Pro 3000 */
+ { USB_DEVICE(0x046D, 0x08B1) }, /* Logitech QuickCam Notebook Pro */
+ { USB_DEVICE(0x046D, 0x08B2) }, /* Logitech QuickCam Pro 4000 */
+ { USB_DEVICE(0x046D, 0x08B3) }, /* Logitech QuickCam Zoom (old model) */
+ { USB_DEVICE(0x046D, 0x08B4) }, /* Logitech QuickCam Zoom (new model) */
+ { USB_DEVICE(0x046D, 0x08B5) }, /* Logitech QuickCam Orbit/Sphere */
+ { USB_DEVICE(0x046D, 0x08B6) }, /* Logitech (reserved) */
+ { USB_DEVICE(0x046D, 0x08B7) }, /* Logitech (reserved) */
+ { USB_DEVICE(0x046D, 0x08B8) }, /* Logitech (reserved) */
+ { USB_DEVICE(0x055D, 0x9000) }, /* Samsung */
+ { USB_DEVICE(0x055D, 0x9001) },
+ { USB_DEVICE(0x041E, 0x400C) }, /* Creative Webcam 5 */
+ { USB_DEVICE(0x041E, 0x4011) }, /* Creative Webcam Pro Ex */
+ { USB_DEVICE(0x04CC, 0x8116) }, /* Afina Eye */
+ { USB_DEVICE(0x06BE, 0x8116) }, /* new Afina Eye */
+ { USB_DEVICE(0x0d81, 0x1910) }, /* Visionite */
+ { USB_DEVICE(0x0d81, 0x1900) },
+ { }
+};
+MODULE_DEVICE_TABLE(usb, pwc_device_table);
+
+static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id *id);
+static void usb_pwc_disconnect(struct usb_interface *intf);
+
+static struct usb_driver pwc_driver = {
+ .owner = THIS_MODULE,
+ .name = "Philips webcam", /* name */
+ .id_table = pwc_device_table,
+ .probe = usb_pwc_probe, /* probe() */
+ .disconnect = usb_pwc_disconnect, /* disconnect() */
+};
+
+#define MAX_DEV_HINTS 20
+#define MAX_ISOC_ERRORS 20
+
+static int default_size = PSZ_QCIF;
+static int default_fps = 10;
+static int default_fbufs = 3; /* Default number of frame buffers */
+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;
+ char serial_number[30];
+ int device_node;
+ struct pwc_device *pdev;
+} device_hint[MAX_DEV_HINTS];
+
+/***/
+
+static int pwc_video_open(struct inode *inode, struct file *file);
+static int pwc_video_close(struct inode *inode, struct file *file);
+static ssize_t pwc_video_read(struct file *file, char __user * buf,
+ size_t count, loff_t *ppos);
+static unsigned int pwc_video_poll(struct file *file, poll_table *wait);
+static int pwc_video_ioctl(struct inode *inode, struct file *file,
+ unsigned int ioctlnr, unsigned long arg);
+static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma);
+
+static struct file_operations pwc_fops = {
+ .owner = THIS_MODULE,
+ .open = pwc_video_open,
+ .release = pwc_video_close,
+ .read = pwc_video_read,
+ .poll = pwc_video_poll,
+ .mmap = pwc_video_mmap,
+ .ioctl = pwc_video_ioctl,
+ .llseek = no_llseek,
+};
+static struct video_device pwc_template = {
+ .owner = THIS_MODULE,
+ .name = "Philips Webcam", /* Filled in later */
+ .type = VID_TYPE_CAPTURE,
+ .hardware = VID_HARDWARE_PWC,
+ .release = video_device_release,
+ .fops = &pwc_fops,
+ .minor = -1,
+};
+
+/***************************************************************************/
+
+/* Okay, this is some magic that I worked out and the reasoning behind it...
+
+ The biggest problem with any USB device is of course: "what to do
+ when the user unplugs the device while it is in use by an application?"
+ We have several options:
+ 1) Curse them with the 7 plagues when they do (requires divine intervention)
+ 2) Tell them not to (won't work: they'll do it anyway)
+ 3) Oops the kernel (this will have a negative effect on a user's uptime)
+ 4) Do something sensible.
+
+ Of course, we go for option 4.
+
+ It happens that this device will be linked to two times, once from
+ usb_device and once from the video_device in their respective 'private'
+ pointers. This is done when the device is probed() and all initialization
+ 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.
+
+ A small 'advantage' is that if a user unplugs the cam and plugs it back
+ in, it should get assigned the same video device minor, but unfortunately
+ it's non-trivial to re-link the cam back to the video device... (that
+ would surely be magic! :))
+*/
+
+/***************************************************************************/
+/* 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)
+ {
+ memset(mem, 0, size); /* Clear the ram out, no junk to the user */
+ adr=(unsigned long) mem;
+ while (size > 0)
+ {
+ SetPageReserved(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)
+ {
+ adr=(unsigned long) mem;
+ while ((long) size > 0)
+ {
+ ClearPageReserved(vmalloc_to_page((void *)adr));
+ adr+=PAGE_SIZE;
+ size-=PAGE_SIZE;
+ }
+ vfree(mem);
+ }
+}
+
+
+
+
+static int pwc_allocate_buffers(struct pwc_device *pdev)
+{
+ int i;
+ void *kbuf;
+
+ Trace(TRACE_MEMORY, ">> pwc_allocate_buffers(pdev = 0x%p)\n", pdev);
+
+ if (pdev == NULL)
+ return -ENXIO;
+
+#ifdef PWC_MAGIC
+ if (pdev->magic != PWC_MAGIC) {
+ Err("allocate_buffers(): magic failed.\n");
+ return -ENXIO;
+ }
+#endif
+ /* Allocate Isochronuous pipe buffers */
+ for (i = 0; i < MAX_ISO_BUFS; i++) {
+ if (pdev->sbuf[i].data == NULL) {
+ kbuf = kmalloc(ISO_BUFFER_SIZE, GFP_KERNEL);
+ if (kbuf == NULL) {
+ Err("Failed to allocate iso buffer %d.\n", i);
+ return -ENOMEM;
+ }
+ Trace(TRACE_MEMORY, "Allocated iso buffer at %p.\n", kbuf);
+ pdev->sbuf[i].data = kbuf;
+ memset(kbuf, 0, ISO_BUFFER_SIZE);
+ }
+ }
+
+ /* Allocate frame buffer structure */
+ if (pdev->fbuf == NULL) {
+ kbuf = kmalloc(default_fbufs * sizeof(struct pwc_frame_buf), GFP_KERNEL);
+ if (kbuf == NULL) {
+ Err("Failed to allocate frame buffer structure.\n");
+ return -ENOMEM;
+ }
+ Trace(TRACE_MEMORY, "Allocated frame buffer structure at %p.\n", kbuf);
+ pdev->fbuf = kbuf;
+ memset(kbuf, 0, default_fbufs * sizeof(struct pwc_frame_buf));
+ }
+ /* create frame buffers, and make circular ring */
+ for (i = 0; i < default_fbufs; i++) {
+ if (pdev->fbuf[i].data == NULL) {
+ kbuf = vmalloc(PWC_FRAME_SIZE); /* need vmalloc since frame buffer > 128K */
+ if (kbuf == NULL) {
+ Err("Failed to allocate frame buffer %d.\n", i);
+ return -ENOMEM;
+ }
+ Trace(TRACE_MEMORY, "Allocated frame buffer %d at %p.\n", i, kbuf);
+ pdev->fbuf[i].data = kbuf;
+ memset(kbuf, 128, PWC_FRAME_SIZE);
+ }
+ }
+
+ /* Allocate decompressor table space */
+ kbuf = NULL;
+ switch (pdev->type)
+ {
+ case 675:
+ case 680:
+ case 690:
+ case 720:
+ case 730:
+ case 740:
+ case 750:
+ Trace(TRACE_MEMORY,"private_data(%Zd)\n",sizeof(struct pwc_dec23_private));
+ kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); /* Timon & Kiara */
+ break;
+ case 645:
+ case 646:
+ /* TODO & FIXME */
+ kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL);
+ break;
+ }
+ if (kbuf == NULL) {
+ Err("Failed to allocate decompress table.\n");
+ return -ENOMEM;
+ }
+ pdev->decompress_data = kbuf;
+
+ /* Allocate image buffer; double buffer for mmap() */
+ kbuf = rvmalloc(default_mbufs * pdev->len_per_image);
+ if (kbuf == NULL) {
+ Err("Failed to allocate image buffer(s). needed (%d)\n",default_mbufs * pdev->len_per_image);
+ return -ENOMEM;
+ }
+ Trace(TRACE_MEMORY, "Allocated image buffer at %p.\n", kbuf);
+ pdev->image_data = kbuf;
+ for (i = 0; i < default_mbufs; i++)
+ pdev->image_ptr[i] = kbuf + i * pdev->len_per_image;
+ for (; i < MAX_IMAGES; i++)
+ pdev->image_ptr[i] = NULL;
+
+ kbuf = NULL;
+
+ Trace(TRACE_MEMORY, "<< pwc_allocate_buffers()\n");
+ return 0;
+}
+
+static void pwc_free_buffers(struct pwc_device *pdev)
+{
+ int i;
+
+ Trace(TRACE_MEMORY, "Entering free_buffers(%p).\n", pdev);
+
+ if (pdev == NULL)
+ return;
+#ifdef PWC_MAGIC
+ if (pdev->magic != PWC_MAGIC) {
+ Err("free_buffers(): magic failed.\n");
+ return;
+ }
+#endif
+
+ /* Release Iso-pipe buffers */
+ for (i = 0; i < MAX_ISO_BUFS; i++)
+ if (pdev->sbuf[i].data != NULL) {
+ Trace(TRACE_MEMORY, "Freeing ISO buffer at %p.\n", pdev->sbuf[i].data);
+ kfree(pdev->sbuf[i].data);
+ pdev->sbuf[i].data = NULL;
+ }
+
+ /* The same for frame buffers */
+ if (pdev->fbuf != NULL) {
+ for (i = 0; i < default_fbufs; i++) {
+ if (pdev->fbuf[i].data != NULL) {
+ Trace(TRACE_MEMORY, "Freeing frame buffer %d at %p.\n", i, pdev->fbuf[i].data);
+ vfree(pdev->fbuf[i].data);
+ pdev->fbuf[i].data = NULL;
+ }
+ }
+ kfree(pdev->fbuf);
+ pdev->fbuf = NULL;
+ }
+
+ /* Intermediate decompression buffer & tables */
+ if (pdev->decompress_data != NULL) {
+ Trace(TRACE_MEMORY, "Freeing decompression buffer at %p.\n", pdev->decompress_data);
+ kfree(pdev->decompress_data);
+ pdev->decompress_data = NULL;
+ }
+ pdev->decompressor = NULL;
+
+ /* Release image buffers */
+ if (pdev->image_data != NULL) {
+ Trace(TRACE_MEMORY, "Freeing image buffer at %p.\n", pdev->image_data);
+ rvfree(pdev->image_data, default_mbufs * pdev->len_per_image);
+ }
+ pdev->image_data = NULL;
+
+ Trace(TRACE_MEMORY, "Leaving free_buffers().\n");
+}
+
+/* The frame & image buffer mess.
+
+ Yes, this is a mess. Well, it used to be simple, but alas... In this
+ module, 3 buffers schemes are used to get the data from the USB bus to
+ the user program. The first scheme involves the ISO buffers (called thus
+ since they transport ISO data from the USB controller), and not really
+ interesting. Suffices to say the data from this buffer is quickly
+ gathered in an interrupt handler (pwc_isoc_handler) and placed into the
+ frame buffer.
+
+ The frame buffer is the second scheme, and is the central element here.
+ It collects the data from a single frame from the camera (hence, the
+ name). Frames are delimited by the USB camera with a short USB packet,
+ so that's easy to detect. The frame buffers form a list that is filled
+ by the camera+USB controller and drained by the user process through
+ either read() or mmap().
+
+ The image buffer is the third scheme, in which frames are decompressed
+ and converted into planar format. For mmap() there is more than
+ one image buffer available.
+
+ The frame buffers provide the image buffering. In case the user process
+ is a bit slow, this introduces lag and some undesired side-effects.
+ The problem arises when the frame buffer is full. I used to drop the last
+ frame, which makes the data in the queue stale very quickly. But dropping
+ the frame at the head of the queue proved to be a litte bit more difficult.
+ I tried a circular linked scheme, but this introduced more problems than
+ it solved.
+
+ Because filling and draining are completely asynchronous processes, this
+ requires some fiddling with pointers and mutexes.
+
+ Eventually, I came up with a system with 2 lists: an 'empty' frame list
+ and a 'full' frame list:
+ * Initially, all frame buffers but one are on the 'empty' list; the one
+ remaining buffer is our initial fill frame.
+ * If a frame is needed for filling, we try to take it from the 'empty'
+ list, unless that list is empty, in which case we take the buffer at
+ the head of the 'full' list.
+ * When our fill buffer has been filled, it is appended to the 'full'
+ list.
+ * If a frame is needed by read() or mmap(), it is taken from the head of
+ the 'full' list, handled, and then appended to the 'empty' list. If no
+ buffer is present on the 'full' list, we wait.
+ The advantage is that the buffer that is currently being decompressed/
+ converted, is on neither list, and thus not in our way (any other scheme
+ I tried had the problem of old data lingering in the queue).
+
+ Whatever strategy you choose, it always remains a tradeoff: with more
+ frame buffers the chances of a missed frame are reduced. On the other
+ hand, on slower machines it introduces lag because the queue will
+ always be full.
+ */
+
+/**
+ \brief Find next frame buffer to fill. Take from empty or full list, whichever comes first.
+ */
+static inline int pwc_next_fill_frame(struct pwc_device *pdev)
+{
+ int ret;
+ unsigned long flags;
+
+ ret = 0;
+ spin_lock_irqsave(&pdev->ptrlock, flags);
+ if (pdev->fill_frame != NULL) {
+ /* append to 'full' list */
+ if (pdev->full_frames == NULL) {
+ pdev->full_frames = pdev->fill_frame;
+ pdev->full_frames_tail = pdev->full_frames;
+ }
+ else {
+ pdev->full_frames_tail->next = pdev->fill_frame;
+ pdev->full_frames_tail = pdev->fill_frame;
+ }
+ }
+ if (pdev->empty_frames != NULL) {
+ /* We have empty frames available. That's easy */
+ pdev->fill_frame = pdev->empty_frames;
+ pdev->empty_frames = pdev->empty_frames->next;
+ }
+ else {
+ /* Hmm. Take it from the full list */
+#if PWC_DEBUG
+ /* sanity check */
+ if (pdev->full_frames == NULL) {
+ Err("Neither empty or full frames available!\n");
+ spin_unlock_irqrestore(&pdev->ptrlock, flags);
+ return -EINVAL;
+ }
+#endif
+ pdev->fill_frame = pdev->full_frames;
+ pdev->full_frames = pdev->full_frames->next;
+ ret = 1;
+ }
+ pdev->fill_frame->next = NULL;
+#if PWC_DEBUG
+ Trace(TRACE_SEQUENCE, "Assigning sequence number %d.\n", pdev->sequence);
+ pdev->fill_frame->sequence = pdev->sequence++;
+#endif
+ spin_unlock_irqrestore(&pdev->ptrlock, flags);
+ return ret;
+}
+
+
+/**
+ \brief Reset all buffers, pointers and lists, except for the image_used[] buffer.
+
+ If the image_used[] buffer is cleared too, mmap()/VIDIOCSYNC will run into trouble.
+ */
+static void pwc_reset_buffers(struct pwc_device *pdev)
+{
+ int i;
+ unsigned long flags;
+
+ spin_lock_irqsave(&pdev->ptrlock, flags);
+ pdev->full_frames = NULL;
+ pdev->full_frames_tail = NULL;
+ for (i = 0; i < default_fbufs; i++) {
+ pdev->fbuf[i].filled = 0;
+ if (i > 0)
+ pdev->fbuf[i].next = &pdev->fbuf[i - 1];
+ else
+ pdev->fbuf->next = NULL;
+ }
+ pdev->empty_frames = &pdev->fbuf[default_fbufs - 1];
+ pdev->empty_frames_tail = pdev->fbuf;
+ pdev->read_frame = NULL;
+ pdev->fill_frame = pdev->empty_frames;
+ pdev->empty_frames = pdev->empty_frames->next;
+
+ pdev->image_read_pos = 0;
+ pdev->fill_image = 0;
+ spin_unlock_irqrestore(&pdev->ptrlock, flags);
+}
+
+
+/**
+ \brief Do all the handling for getting one frame: get pointer, decompress, advance pointers.
+ */
+static int pwc_handle_frame(struct pwc_device *pdev)
+{
+ int ret = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave(&pdev->ptrlock, flags);
+ /* First grab our read_frame; this is removed from all lists, so
+ we can release the lock after this without problems */
+ if (pdev->read_frame != NULL) {
+ /* This can't theoretically happen */
+ Err("Huh? Read frame still in use?\n");
+ }
+ else {
+ if (pdev->full_frames == NULL) {
+ Err("Woops. No frames ready.\n");
+ }
+ else {
+ pdev->read_frame = pdev->full_frames;
+ pdev->full_frames = pdev->full_frames->next;
+ pdev->read_frame->next = NULL;
+ }
+
+ if (pdev->read_frame != NULL) {
+#if PWC_DEBUG
+ Trace(TRACE_SEQUENCE, "Decompressing frame %d\n", pdev->read_frame->sequence);
+#endif
+ /* Decompression is a lenghty process, so it's outside of the lock.
+ This gives the isoc_handler the opportunity to fill more frames
+ in the mean time.
+ */
+ spin_unlock_irqrestore(&pdev->ptrlock, flags);
+ ret = pwc_decompress(pdev);
+ spin_lock_irqsave(&pdev->ptrlock, flags);
+
+ /* We're done with read_buffer, tack it to the end of the empty buffer list */
+ if (pdev->empty_frames == NULL) {
+ pdev->empty_frames = pdev->read_frame;
+ pdev->empty_frames_tail = pdev->empty_frames;
+ }
+ else {
+ pdev->empty_frames_tail->next = pdev->read_frame;
+ pdev->empty_frames_tail = pdev->read_frame;
+ }
+ pdev->read_frame = NULL;
+ }
+ }
+ spin_unlock_irqrestore(&pdev->ptrlock, flags);
+ return ret;
+}
+
+/**
+ \brief Advance pointers of image buffer (after each user request)
+*/
+static inline void pwc_next_image(struct pwc_device *pdev)
+{
+ pdev->image_used[pdev->fill_image] = 0;
+ pdev->fill_image = (pdev->fill_image + 1) % default_mbufs;
+}
+
+
+/* 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 pt_regs *regs)
+{
+ struct pwc_device *pdev;
+ int i, fst, flen;
+ int awake;
+ struct pwc_frame_buf *fbuf;
+ unsigned char *fillptr = NULL, *iso_buf = NULL;
+
+ awake = 0;
+ pdev = (struct pwc_device *)urb->context;
+ if (pdev == NULL) {
+ Err("isoc_handler() called with NULL device?!\n");
+ return;
+ }
+#ifdef PWC_MAGIC
+ if (pdev->magic != PWC_MAGIC) {
+ Err("isoc_handler() called with bad magic!\n");
+ return;
+ }
+#endif
+ if (urb->status == -ENOENT || urb->status == -ECONNRESET) {
+ Trace(TRACE_OPEN, "pwc_isoc_handler(): URB (%p) unlinked %ssynchronuously.\n", urb, urb->status == -ENOENT ? "" : "a");
+ return;
+ }
+ if (urb->status != -EINPROGRESS && urb->status != 0) {
+ const char *errmsg;
+
+ errmsg = "Unknown";
+ switch(urb->status) {
+ case -ENOSR: errmsg = "Buffer error (overrun)"; break;
+ case -EPIPE: errmsg = "Stalled (device not responding)"; break;
+ case -EOVERFLOW: errmsg = "Babble (bad cable?)"; break;
+ case -EPROTO: errmsg = "Bit-stuff error (bad cable?)"; break;
+ case -EILSEQ: errmsg = "CRC/Timeout (could be anything)"; break;
+ case -ETIMEDOUT: errmsg = "NAK (device does not respond)"; break;
+ }
+ Trace(TRACE_FLOW, "pwc_isoc_handler() called with status %d [%s].\n", urb->status, errmsg);
+ /* Give up after a number of contiguous errors on the USB bus.
+ Appearantly something is wrong so we simulate an unplug event.
+ */
+ if (++pdev->visoc_errors > MAX_ISOC_ERRORS)
+ {
+ Info("Too many ISOC errors, bailing out.\n");
+ pdev->error_status = EIO;
+ awake = 1;
+ wake_up_interruptible(&pdev->frameq);
+ }
+ goto handler_end; // ugly, but practical
+ }
+
+ fbuf = pdev->fill_frame;
+ if (fbuf == NULL) {
+ Err("pwc_isoc_handler without valid fill frame.\n");
+ awake = 1;
+ goto handler_end;
+ }
+ else {
+ fillptr = fbuf->data + fbuf->filled;
+ }
+
+ /* Reset ISOC error counter. We did get here, after all. */
+ pdev->visoc_errors = 0;
+
+ /* vsync: 0 = don't copy data
+ 1 = sync-hunt
+ 2 = synched
+ */
+ /* Compact data */
+ for (i = 0; i < urb->number_of_packets; i++) {
+ fst = urb->iso_frame_desc[i].status;
+ flen = urb->iso_frame_desc[i].actual_length;
+ iso_buf = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
+ if (fst == 0) {
+ if (flen > 0) { /* if valid data... */
+ if (pdev->vsync > 0) { /* ...and we are not sync-hunting... */
+ pdev->vsync = 2;
+
+ /* ...copy data to frame buffer, if possible */
+ if (flen + fbuf->filled > pdev->frame_total_size) {
+ Trace(TRACE_FLOW, "Frame buffer overflow (flen = %d, frame_total_size = %d).\n", flen, pdev->frame_total_size);
+ pdev->vsync = 0; /* Hmm, let's wait for an EOF (end-of-frame) */
+ pdev->vframes_error++;
+ }
+ else {
+ memmove(fillptr, iso_buf, flen);
+ fillptr += flen;
+ }
+ }
+ fbuf->filled += flen;
+ } /* ..flen > 0 */
+
+ if (flen < pdev->vlast_packet_size) {
+ /* Shorter packet... We probably have the end of an image-frame;
+ wake up read() process and let select()/poll() do something.
+ Decompression is done in user time over there.
+ */
+ if (pdev->vsync == 2) {
+ /* The ToUCam Fun CMOS sensor causes the firmware to send 2 or 3 bogus
+ frames on the USB wire after an exposure change. This conditition is
+ however detected in the cam and a bit is set in the header.
+ */
+ if (pdev->type == 730) {
+ unsigned char *ptr = (unsigned char *)fbuf->data;
+
+ if (ptr[1] == 1 && ptr[0] & 0x10) {
+#if PWC_DEBUG
+ Debug("Hyundai CMOS sensor bug. Dropping frame %d.\n", fbuf->sequence);
+#endif
+ pdev->drop_frames += 2;
+ pdev->vframes_error++;
+ }
+ if ((ptr[0] ^ pdev->vmirror) & 0x01) {
+ if (ptr[0] & 0x01)
+ Info("Snapshot button pressed.\n");
+ else
+ Info("Snapshot button released.\n");
+ }
+ if ((ptr[0] ^ pdev->vmirror) & 0x02) {
+ if (ptr[0] & 0x02)
+ Info("Image is mirrored.\n");
+ else
+ Info("Image is normal.\n");
+ }
+ pdev->vmirror = ptr[0] & 0x03;
+ /* Sometimes the trailer of the 730 is still sent as a 4 byte packet
+ after a short frame; this condition is filtered out specifically. A 4 byte
+ frame doesn't make sense anyway.
+ So we get either this sequence:
+ drop_bit set -> 4 byte frame -> short frame -> good frame
+ Or this one:
+ drop_bit set -> short frame -> good frame
+ So we drop either 3 or 2 frames in all!
+ */
+ if (fbuf->filled == 4)
+ pdev->drop_frames++;
+ }
+
+ /* In case we were instructed to drop the frame, do so silently.
+ The buffer pointers are not updated either (but the counters are reset below).
+ */
+ if (pdev->drop_frames > 0)
+ pdev->drop_frames--;
+ else {
+ /* Check for underflow first */
+ if (fbuf->filled < pdev->frame_total_size) {
+ Trace(TRACE_FLOW, "Frame buffer underflow (%d bytes); discarded.\n", fbuf->filled);
+ pdev->vframes_error++;
+ }
+ else {
+ /* Send only once per EOF */
+ awake = 1; /* delay wake_ups */
+
+ /* Find our next frame to fill. This will always succeed, since we
+ * nick a frame from either empty or full list, but if we had to
+ * take it from the full list, it means a frame got dropped.
+ */
+ if (pwc_next_fill_frame(pdev)) {
+ pdev->vframes_dumped++;
+ if ((pdev->vframe_count > FRAME_LOWMARK) && (pwc_trace & TRACE_FLOW)) {
+ if (pdev->vframes_dumped < 20)
+ Trace(TRACE_FLOW, "Dumping frame %d.\n", pdev->vframe_count);
+ if (pdev->vframes_dumped == 20)
+ Trace(TRACE_FLOW, "Dumping frame %d (last message).\n", pdev->vframe_count);
+ }
+ }
+ fbuf = pdev->fill_frame;
+ }
+ } /* !drop_frames */
+ pdev->vframe_count++;
+ }
+ fbuf->filled = 0;
+ fillptr = fbuf->data;
+ pdev->vsync = 1;
+ } /* .. flen < last_packet_size */
+ pdev->vlast_packet_size = flen;
+ } /* ..status == 0 */
+#if PWC_DEBUG
+ /* This is normally not interesting to the user, unless you are really debugging something */
+ else {
+ static int iso_error = 0;
+ iso_error++;
+ if (iso_error < 20)
+ Trace(TRACE_FLOW, "Iso frame %d of USB has error %d\n", i, fst);
+ }
+#endif
+ }
+
+handler_end:
+ if (awake)
+ wake_up_interruptible(&pdev->frameq);
+
+ urb->dev = pdev->udev;
+ i = usb_submit_urb(urb, GFP_ATOMIC);
+ if (i != 0)
+ Err("Error (%d) re-submitting urb in pwc_isoc_handler.\n", i);
+}
+
+
+static int pwc_isoc_init(struct pwc_device *pdev)
+{
+ struct usb_device *udev;
+ struct urb *urb;
+ int i, j, ret;
+
+ struct usb_interface *intf;
+ struct usb_host_interface *idesc = NULL;
+
+ if (pdev == NULL)
+ return -EFAULT;
+ if (pdev->iso_init)
+ return 0;
+ pdev->vsync = 0;
+ udev = pdev->udev;
+
+ /* Get the current alternate interface, adjust packet size */
+ if (!udev->actconfig)
+ return -EFAULT;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
+ idesc = &udev->actconfig->interface[0]->altsetting[pdev->valternate];
+#else
+ intf = usb_ifnum_to_if(udev, 0);
+ if (intf)
+ idesc = usb_altnum_to_altsetting(intf, pdev->valternate);
+#endif
+
+ if (!idesc)
+ return -EFAULT;
+
+ /* Search video endpoint */
+ pdev->vmax_packet_size = -1;
+ for (i = 0; i < idesc->desc.bNumEndpoints; i++)
+ if ((idesc->endpoint[i].desc.bEndpointAddress & 0xF) == pdev->vendpoint) {
+ pdev->vmax_packet_size = le16_to_cpu(idesc->endpoint[i].desc.wMaxPacketSize);
+ break;
+ }
+
+ if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) {
+ Err("Failed to find packet size for video endpoint in current alternate setting.\n");
+ return -ENFILE; /* Odd error, that should be noticable */
+ }
+
+ /* Set alternate interface */
+ ret = 0;
+ Trace(TRACE_OPEN, "Setting alternate interface %d\n", pdev->valternate);
+ ret = usb_set_interface(pdev->udev, 0, pdev->valternate);
+ if (ret < 0)
+ return ret;
+
+ for (i = 0; i < MAX_ISO_BUFS; i++) {
+ urb = usb_alloc_urb(ISO_FRAMES_PER_DESC, GFP_KERNEL);
+ if (urb == NULL) {
+ Err("Failed to allocate urb %d\n", i);
+ ret = -ENOMEM;
+ break;
+ }
+ pdev->sbuf[i].urb = urb;
+ Trace(TRACE_MEMORY, "Allocated URB at 0x%p\n", urb);
+ }
+ if (ret) {
+ /* De-allocate in reverse order */
+ while (i >= 0) {
+ if (pdev->sbuf[i].urb != NULL)
+ usb_free_urb(pdev->sbuf[i].urb);
+ pdev->sbuf[i].urb = NULL;
+ i--;
+ }
+ return ret;
+ }
+
+ /* init URB structure */
+ for (i = 0; i < MAX_ISO_BUFS; i++) {
+ urb = pdev->sbuf[i].urb;
+
+ urb->interval = 1; // devik
+ urb->dev = udev;
+ urb->pipe = usb_rcvisocpipe(udev, pdev->vendpoint);
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->transfer_buffer = pdev->sbuf[i].data;
+ urb->transfer_buffer_length = ISO_BUFFER_SIZE;
+ urb->complete = pwc_isoc_handler;
+ urb->context = pdev;
+ urb->start_frame = 0;
+ urb->number_of_packets = ISO_FRAMES_PER_DESC;
+ for (j = 0; j < ISO_FRAMES_PER_DESC; j++) {
+ urb->iso_frame_desc[j].offset = j * ISO_MAX_FRAME_SIZE;
+ urb->iso_frame_desc[j].length = pdev->vmax_packet_size;
+ }
+ }
+
+ /* link */
+ for (i = 0; i < MAX_ISO_BUFS; i++) {
+ ret = usb_submit_urb(pdev->sbuf[i].urb, GFP_KERNEL);
+ if (ret)
+ Err("isoc_init() submit_urb %d failed with error %d\n", i, ret);
+ else
+ Trace(TRACE_MEMORY, "URB 0x%p submitted.\n", pdev->sbuf[i].urb);
+ }
+
+ /* All is done... */
+ pdev->iso_init = 1;
+ Trace(TRACE_OPEN, "<< pwc_isoc_init()\n");
+ return 0;
+}
+
+static void pwc_isoc_cleanup(struct pwc_device *pdev)
+{
+ int i;
+
+ Trace(TRACE_OPEN, ">> pwc_isoc_cleanup()\n");
+ if (pdev == NULL)
+ return;
+
+ /* Unlinking ISOC buffers one by one */
+ for (i = 0; i < MAX_ISO_BUFS; i++) {
+ struct urb *urb;
+
+ urb = pdev->sbuf[i].urb;
+ if (urb != 0) {
+ if (pdev->iso_init) {
+ Trace(TRACE_MEMORY, "Unlinking URB %p\n", urb);
+ usb_kill_urb(urb);
+ }
+ Trace(TRACE_MEMORY, "Freeing URB\n");
+ usb_free_urb(urb);
+ pdev->sbuf[i].urb = NULL;
+ }
+ }
+
+ /* Stop camera, but only if we are sure the camera is still there (unplug
+ is signalled by EPIPE)
+ */
+ if (pdev->error_status && pdev->error_status != EPIPE) {
+ Trace(TRACE_OPEN, "Setting alternate interface 0.\n");
+ usb_set_interface(pdev->udev, 0, 0);
+ }
+
+ pdev->iso_init = 0;
+ Trace(TRACE_OPEN, "<< pwc_isoc_cleanup()\n");
+}
+
+int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot)
+{
+ int ret, start;
+
+ /* Stop isoc stuff */
+ pwc_isoc_cleanup(pdev);
+ /* Reset parameters */
+ pwc_reset_buffers(pdev);
+ /* Try to set video mode... */
+ start = ret = pwc_set_video_mode(pdev, width, height, new_fps, new_compression, new_snapshot);
+ if (ret) {
+ Trace(TRACE_FLOW, "pwc_set_video_mode attempt 1 failed.\n");
+ /* That failed... restore old mode (we know that worked) */
+ start = pwc_set_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot);
+ if (start) {
+ Trace(TRACE_FLOW, "pwc_set_video_mode attempt 2 failed.\n");
+ }
+ }
+ if (start == 0)
+ {
+ if (pwc_isoc_init(pdev) < 0)
+ {
+ Info("Failed to restart ISOC transfers in pwc_try_video_mode.\n");
+ ret = -EAGAIN; /* let's try again, who knows if it works a second time */
+ }
+ }
+ pdev->drop_frames++; /* try to avoid garbage during switch */
+ return ret; /* Return original error code */
+}
+
+
+/***************************************************************************/
+/* Video4Linux functions */
+
+static int pwc_video_open(struct inode *inode, struct file *file)
+{
+ int i;
+ struct video_device *vdev = video_devdata(file);
+ struct pwc_device *pdev;
+
+ Trace(TRACE_OPEN, ">> video_open called(vdev = 0x%p).\n", vdev);
+
+ pdev = (struct pwc_device *)vdev->priv;
+ if (pdev == NULL)
+ BUG();
+ if (pdev->vopen)
+ return -EBUSY;
+
+ down(&pdev->modlock);
+ if (!pdev->usb_init) {
+ Trace(TRACE_OPEN, "Doing first time initialization.\n");
+ pdev->usb_init = 1;
+
+ if (pwc_trace & TRACE_OPEN)
+ {
+ /* Query sensor type */
+ const char *sensor_type = NULL;
+ int ret;
+
+ ret = pwc_get_cmos_sensor(pdev, &i);
+ if (ret >= 0)
+ {
+ switch(i) {
+ 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("This %s camera is equipped with a %s (%d).\n", pdev->vdev->name, sensor_type, i);
+ }
+ }
+
+ /* Turn on camera */
+ if (power_save) {
+ i = pwc_camera_power(pdev, 1);
+ if (i < 0)
+ Info("Failed to restore power to the camera! (%d)\n", i);
+ }
+ /* Set LED on/off time */
+ if (pwc_set_leds(pdev, led_on, led_off) < 0)
+ Info("Failed to set LED on/off time.\n");
+
+ pwc_construct(pdev); /* set min/max sizes correct */
+
+ /* So far, so good. Allocate memory. */
+ i = pwc_allocate_buffers(pdev);
+ if (i < 0) {
+ Trace(TRACE_OPEN, "Failed to allocate buffer memory.\n");
+ up(&pdev->modlock);
+ return i;
+ }
+
+ /* Reset buffers & parameters */
+ pwc_reset_buffers(pdev);
+ for (i = 0; i < default_mbufs; i++)
+ pdev->image_used[i] = 0;
+ pdev->vframe_count = 0;
+ pdev->vframes_dumped = 0;
+ pdev->vframes_error = 0;
+ pdev->visoc_errors = 0;
+ pdev->error_status = 0;
+#if PWC_DEBUG
+ pdev->sequence = 0;
+#endif
+ pwc_construct(pdev); /* set min/max sizes correct */
+
+ /* Set some defaults */
+ pdev->vsnapshot = 0;
+
+ /* Start iso pipe for video; first try the last used video size
+ (or the default one); if that fails try QCIF/10 or QSIF/10;
+ it that fails too, give up.
+ */
+ i = pwc_set_video_mode(pdev, pwc_image_sizes[pdev->vsize].x, pwc_image_sizes[pdev->vsize].y, pdev->vframes, pdev->vcompression, 0);
+ if (i) {
+ Trace(TRACE_OPEN, "First attempt at set_video_mode failed.\n");
+ if (pdev->type == 730 || pdev->type == 740 || pdev->type == 750)
+ i = pwc_set_video_mode(pdev, pwc_image_sizes[PSZ_QSIF].x, pwc_image_sizes[PSZ_QSIF].y, 10, pdev->vcompression, 0);
+ else
+ i = pwc_set_video_mode(pdev, pwc_image_sizes[PSZ_QCIF].x, pwc_image_sizes[PSZ_QCIF].y, 10, pdev->vcompression, 0);
+ }
+ if (i) {
+ Trace(TRACE_OPEN, "Second attempt at set_video_mode failed.\n");
+ up(&pdev->modlock);
+ return i;
+ }
+
+ i = pwc_isoc_init(pdev);
+ if (i) {
+ Trace(TRACE_OPEN, "Failed to init ISOC stuff = %d.\n", i);
+ up(&pdev->modlock);
+ return i;
+ }
+
+ pdev->vopen++;
+ file->private_data = vdev;
+ up(&pdev->modlock);
+ Trace(TRACE_OPEN, "<< video_open() returns 0.\n");
+ return 0;
+}
+
+/* Note that all cleanup is done in the reverse order as in _open */
+static int pwc_video_close(struct inode *inode, struct file *file)
+{
+ struct video_device *vdev = file->private_data;
+ struct pwc_device *pdev;
+ int i;
+
+ Trace(TRACE_OPEN, ">> video_close called(vdev = 0x%p).\n", vdev);
+
+ pdev = (struct pwc_device *)vdev->priv;
+ if (pdev->vopen == 0)
+ Info("video_close() called on closed device?\n");
+
+ /* Dump statistics, but only if a reasonable amount of frames were
+ processed (to prevent endless log-entries in case of snap-shot
+ programs)
+ */
+ if (pdev->vframe_count > 20)
+ Info("Closing video device: %d frames received, dumped %d frames, %d frames with errors.\n", pdev->vframe_count, pdev->vframes_dumped, pdev->vframes_error);
+
+ switch (pdev->type)
+ {
+ case 675:
+ case 680:
+ case 690:
+ case 720:
+ case 730:
+ case 740:
+ case 750:
+ pwc_dec23_exit(); /* Timon & Kiara */
+ break;
+ case 645:
+ case 646:
+ pwc_dec1_exit();
+ break;
+ }
+
+ pwc_isoc_cleanup(pdev);
+ pwc_free_buffers(pdev);
+
+ /* Turn off LEDS and power down camera, but only when not unplugged */
+ if (pdev->error_status != EPIPE) {
+ /* Turn LEDs off */
+ if (pwc_set_leds(pdev, 0, 0) < 0)
+ Info("Failed to set LED on/off time.\n");
+ if (power_save) {
+ i = pwc_camera_power(pdev, 0);
+ if (i < 0)
+ Err("Failed to power down camera (%d)\n", i);
+ }
+ }
+ pdev->vopen = 0;
+ Trace(TRACE_OPEN, "<< video_close()\n");
+ return 0;
+}
+
+/*
+ * FIXME: what about two parallel reads ????
+ * ANSWER: Not supported. You can't open the device more than once,
+ despite what the V4L1 interface says. First, I don't see
+ the need, second there's no mechanism of alerting the
+ 2nd/3rd/... process of events like changing image size.
+ And I don't see the point of blocking that for the
+ 2nd/3rd/... process.
+ In multi-threaded environments reading parallel from any
+ device is tricky anyhow.
+ */
+
+static ssize_t pwc_video_read(struct file *file, char __user * buf,
+ size_t count, loff_t *ppos)
+{
+ struct video_device *vdev = file->private_data;
+ struct pwc_device *pdev;
+ int noblock = file->f_flags & O_NONBLOCK;
+ DECLARE_WAITQUEUE(wait, current);
+ int bytes_to_read;
+
+ Trace(TRACE_READ, "video_read(0x%p, %p, %Zd) called.\n", vdev, buf, count);
+ if (vdev == NULL)
+ return -EFAULT;
+ pdev = vdev->priv;
+ if (pdev == NULL)
+ return -EFAULT;
+ if (pdev->error_status)
+ return -pdev->error_status; /* Something happened, report what. */
+
+ /* In case we're doing partial reads, we don't have to wait for a frame */
+ if (pdev->image_read_pos == 0) {
+ /* Do wait queueing according to the (doc)book */
+ add_wait_queue(&pdev->frameq, &wait);
+ while (pdev->full_frames == NULL) {
+ /* Check for unplugged/etc. here */
+ if (pdev->error_status) {
+ remove_wait_queue(&pdev->frameq, &wait);
+ set_current_state(TASK_RUNNING);
+ return -pdev->error_status ;
+ }
+ if (noblock) {
+ remove_wait_queue(&pdev->frameq, &wait);
+ set_current_state(TASK_RUNNING);
+ return -EWOULDBLOCK;
+ }
+ if (signal_pending(current)) {
+ remove_wait_queue(&pdev->frameq, &wait);
+ set_current_state(TASK_RUNNING);
+ return -ERESTARTSYS;
+ }
+ schedule();
+ set_current_state(TASK_INTERRUPTIBLE);
+ }
+ remove_wait_queue(&pdev->frameq, &wait);
+ set_current_state(TASK_RUNNING);
+
+ /* Decompress and release frame */
+ if (pwc_handle_frame(pdev))
+ return -EFAULT;
+ }
+
+ Trace(TRACE_READ, "Copying data to user space.\n");
+ if (pdev->vpalette == VIDEO_PALETTE_RAW)
+ bytes_to_read = pdev->frame_size;
+ else
+ bytes_to_read = pdev->view.size;
+
+ /* copy bytes to user space; we allow for partial reads */
+ if (count + pdev->image_read_pos > bytes_to_read)
+ count = bytes_to_read - pdev->image_read_pos;
+ if (copy_to_user(buf, pdev->image_ptr[pdev->fill_image] + pdev->image_read_pos, count))
+ return -EFAULT;
+ pdev->image_read_pos += count;
+ if (pdev->image_read_pos >= bytes_to_read) { /* All data has been read */
+ pdev->image_read_pos = 0;
+ pwc_next_image(pdev);
+ }
+ return count;
+}
+
+static unsigned int pwc_video_poll(struct file *file, poll_table *wait)
+{
+ struct video_device *vdev = file->private_data;
+ struct pwc_device *pdev;
+
+ if (vdev == NULL)
+ return -EFAULT;
+ pdev = vdev->priv;
+ if (pdev == NULL)
+ return -EFAULT;
+
+ poll_wait(file, &pdev->frameq, wait);
+ if (pdev->error_status)
+ return POLLERR;
+ if (pdev->full_frames != NULL) /* we have frames waiting */
+ return (POLLIN | POLLRDNORM);
+
+ return 0;
+}
+
+static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
+{
+ struct video_device *vdev = file->private_data;
+ struct pwc_device *pdev;
+ DECLARE_WAITQUEUE(wait, current);
+
+ if (vdev == NULL)
+ return -EFAULT;
+ pdev = vdev->priv;
+ if (pdev == NULL)
+ return -EFAULT;
+
+ switch (cmd) {
+ /* Query cabapilities */
+ case VIDIOCGCAP:
+ {
+ struct video_capability *caps = arg;
+
+ strcpy(caps->name, vdev->name);
+ caps->type = VID_TYPE_CAPTURE;
+ caps->channels = 1;
+ caps->audios = 1;
+ caps->minwidth = pdev->view_min.x;
+ caps->minheight = pdev->view_min.y;
+ caps->maxwidth = pdev->view_max.x;
+ caps->maxheight = pdev->view_max.y;
+ break;
+ }
+
+ /* Channel functions (simulate 1 channel) */
+ case VIDIOCGCHAN:
+ {
+ struct video_channel *v = arg;
+
+ if (v->channel != 0)
+ return -EINVAL;
+ v->flags = 0;
+ v->tuners = 0;
+ v->type = VIDEO_TYPE_CAMERA;
+ strcpy(v->name, "Webcam");
+ return 0;
+ }
+
+ case VIDIOCSCHAN:
+ {
+ /* The spec says the argument is an integer, but
+ the bttv driver uses a video_channel arg, which
+ makes sense becasue it also has the norm flag.
+ */
+ struct video_channel *v = arg;
+ if (v->channel != 0)
+ return -EINVAL;
+ return 0;
+ }
+
+
+ /* Picture functions; contrast etc. */
+ case VIDIOCGPICT:
+ {
+ struct video_picture *p = arg;
+ int val;
+
+ val = pwc_get_brightness(pdev);
+ if (val >= 0)
+ p->brightness = val;
+ else
+ p->brightness = 0xffff;
+ val = pwc_get_contrast(pdev);
+ if (val >= 0)
+ p->contrast = val;
+ else
+ p->contrast = 0xffff;
+ /* Gamma, Whiteness, what's the difference? :) */
+ val = pwc_get_gamma(pdev);
+ if (val >= 0)
+ p->whiteness = val;
+ else
+ p->whiteness = 0xffff;
+ val = pwc_get_saturation(pdev);
+ if (val >= 0)
+ p->colour = val;
+ else
+ p->colour = 0xffff;
+ p->depth = 24;
+ p->palette = pdev->vpalette;
+ p->hue = 0xFFFF; /* N/A */
+ break;
+ }
+
+ case VIDIOCSPICT:
+ {
+ struct video_picture *p = arg;
+ /*
+ * FIXME: Suppose we are mid read
+ ANSWER: No problem: the firmware of the camera
+ can handle brightness/contrast/etc
+ changes at _any_ time, and the palette
+ is used exactly once in the uncompress
+ routine.
+ */
+ pwc_set_brightness(pdev, p->brightness);
+ pwc_set_contrast(pdev, p->contrast);
+ pwc_set_gamma(pdev, p->whiteness);
+ pwc_set_saturation(pdev, p->colour);
+ if (p->palette && p->palette != pdev->vpalette) {
+ switch (p->palette) {
+ case VIDEO_PALETTE_YUV420P:
+ case VIDEO_PALETTE_RAW:
+ pdev->vpalette = p->palette;
+ return pwc_try_video_mode(pdev, pdev->image.x, pdev->image.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot);
+ break;
+ default:
+ return -EINVAL;
+ break;
+ }
+ }
+ break;
+ }
+
+ /* Window/size parameters */
+ case VIDIOCGWIN:
+ {
+ struct video_window *vw = arg;
+
+ vw->x = 0;
+ vw->y = 0;
+ vw->width = pdev->view.x;
+ vw->height = pdev->view.y;
+ vw->chromakey = 0;
+ vw->flags = (pdev->vframes << PWC_FPS_SHIFT) |
+ (pdev->vsnapshot ? PWC_FPS_SNAPSHOT : 0);
+ break;
+ }
+
+ case VIDIOCSWIN:
+ {
+ struct video_window *vw = arg;
+ int fps, snapshot, ret;
+
+ fps = (vw->flags & PWC_FPS_FRMASK) >> PWC_FPS_SHIFT;
+ snapshot = vw->flags & PWC_FPS_SNAPSHOT;
+ if (fps == 0)
+ fps = pdev->vframes;
+ if (pdev->view.x == vw->width && pdev->view.y && fps == pdev->vframes && snapshot == pdev->vsnapshot)
+ return 0;
+ ret = pwc_try_video_mode(pdev, vw->width, vw->height, fps, pdev->vcompression, snapshot);
+ if (ret)
+ return ret;
+ break;
+ }
+
+ /* We don't have overlay support (yet) */
+ case VIDIOCGFBUF:
+ {
+ struct video_buffer *vb = arg;
+
+ memset(vb,0,sizeof(*vb));
+ break;
+ }
+
+ /* mmap() functions */
+ case VIDIOCGMBUF:
+ {
+ /* Tell the user program how much memory is needed for a mmap() */
+ struct video_mbuf *vm = arg;
+ int i;
+
+ memset(vm, 0, sizeof(*vm));
+ vm->size = default_mbufs * pdev->len_per_image;
+ vm->frames = default_mbufs; /* double buffering should be enough for most applications */
+ for (i = 0; i < default_mbufs; i++)
+ vm->offsets[i] = i * pdev->len_per_image;
+ break;
+ }
+
+ case VIDIOCMCAPTURE:
+ {
+ /* Start capture into a given image buffer (called 'frame' in video_mmap structure) */
+ struct video_mmap *vm = arg;
+
+ Trace(TRACE_READ, "VIDIOCMCAPTURE: %dx%d, frame %d, format %d\n", vm->width, vm->height, vm->frame, vm->format);
+ if (vm->frame < 0 || vm->frame >= default_mbufs)
+ return -EINVAL;
+
+ /* xawtv is nasty. It probes the available palettes
+ by setting a very small image size and trying
+ various palettes... The driver doesn't support
+ such small images, so I'm working around it.
+ */
+ if (vm->format)
+ {
+ switch (vm->format)
+ {
+ case VIDEO_PALETTE_YUV420P:
+ case VIDEO_PALETTE_RAW:
+ break;
+ default:
+ return -EINVAL;
+ break;
+ }
+ }
+
+ if ((vm->width != pdev->view.x || vm->height != pdev->view.y) &&
+ (vm->width >= pdev->view_min.x && vm->height >= pdev->view_min.y)) {
+ int ret;
+
+ Trace(TRACE_OPEN, "VIDIOCMCAPTURE: changing size to please xawtv :-(.\n");
+ ret = pwc_try_video_mode(pdev, vm->width, vm->height, pdev->vframes, pdev->vcompression, pdev->vsnapshot);
+ if (ret)
+ return ret;
+ } /* ... size mismatch */
+
+ /* FIXME: should we lock here? */
+ if (pdev->image_used[vm->frame])
+ return -EBUSY; /* buffer wasn't available. Bummer */
+ pdev->image_used[vm->frame] = 1;
+
+ /* Okay, we're done here. In the SYNC call we wait until a
+ frame comes available, then expand image into the given
+ buffer.
+ In contrast to the CPiA cam the Philips cams deliver a
+ constant stream, almost like a grabber card. Also,
+ we have separate buffers for the rawdata and the image,
+ meaning we can nearly always expand into the requested buffer.
+ */
+ Trace(TRACE_READ, "VIDIOCMCAPTURE done.\n");
+ break;
+ }
+
+ case VIDIOCSYNC:
+ {
+ /* The doc says: "Whenever a buffer is used it should
+ call VIDIOCSYNC to free this frame up and continue."
+
+ The only odd thing about this whole procedure is
+ that MCAPTURE flags the buffer as "in use", and
+ SYNC immediately unmarks it, while it isn't
+ after SYNC that you know that the buffer actually
+ got filled! So you better not start a CAPTURE in
+ the same frame immediately (use double buffering).
+ This is not a problem for this cam, since it has
+ extra intermediate buffers, but a hardware
+ grabber card will then overwrite the buffer
+ you're working on.
+ */
+ int *mbuf = arg;
+ int ret;
+
+ Trace(TRACE_READ, "VIDIOCSYNC called (%d).\n", *mbuf);
+
+ /* bounds check */
+ if (*mbuf < 0 || *mbuf >= default_mbufs)
+ return -EINVAL;
+ /* check if this buffer was requested anyway */
+ if (pdev->image_used[*mbuf] == 0)
+ return -EINVAL;
+
+ /* Add ourselves to the frame wait-queue.
+
+ FIXME: needs auditing for safety.
+ QUESTION: In what respect? I think that using the
+ frameq is safe now.
+ */
+ add_wait_queue(&pdev->frameq, &wait);
+ while (pdev->full_frames == NULL) {
+ if (pdev->error_status) {
+ remove_wait_queue(&pdev->frameq, &wait);
+ set_current_state(TASK_RUNNING);
+ return -pdev->error_status;
+ }
+
+ if (signal_pending(current)) {
+ remove_wait_queue(&pdev->frameq, &wait);
+ set_current_state(TASK_RUNNING);
+ return -ERESTARTSYS;
+ }
+ schedule();
+ set_current_state(TASK_INTERRUPTIBLE);
+ }
+ remove_wait_queue(&pdev->frameq, &wait);
+ set_current_state(TASK_RUNNING);
+
+ /* The frame is ready. Expand in the image buffer
+ requested by the user. I don't care if you
+ mmap() 5 buffers and request data in this order:
+ buffer 4 2 3 0 1 2 3 0 4 3 1 . . .
+ Grabber hardware may not be so forgiving.
+ */
+ Trace(TRACE_READ, "VIDIOCSYNC: frame ready.\n");
+ pdev->fill_image = *mbuf; /* tell in which buffer we want the image to be expanded */
+ /* Decompress, etc */
+ ret = pwc_handle_frame(pdev);
+ pdev->image_used[*mbuf] = 0;
+ if (ret)
+ return -EFAULT;
+ break;
+ }
+
+ case VIDIOCGAUDIO:
+ {
+ struct video_audio *v = arg;
+
+ strcpy(v->name, "Microphone");
+ v->audio = -1; /* unknown audio minor */
+ v->flags = 0;
+ v->mode = VIDEO_SOUND_MONO;
+ v->volume = 0;
+ v->bass = 0;
+ v->treble = 0;
+ v->balance = 0x8000;
+ v->step = 1;
+ break;
+ }
+
+ case VIDIOCSAUDIO:
+ {
+ /* Dummy: nothing can be set */
+ break;
+ }
+
+ case VIDIOCGUNIT:
+ {
+ struct video_unit *vu = arg;
+
+ vu->video = pdev->vdev->minor & 0x3F;
+ vu->audio = -1; /* not known yet */
+ vu->vbi = -1;
+ vu->radio = -1;
+ vu->teletext = -1;
+ break;
+ }
+ default:
+ return pwc_ioctl(pdev, cmd, arg);
+ } /* ..switch */
+ return 0;
+}
+
+static int pwc_video_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, pwc_video_do_ioctl);
+}
+
+
+static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma)
+{
+ struct video_device *vdev = file->private_data;
+ struct pwc_device *pdev;
+ unsigned long start = vma->vm_start;
+ unsigned long size = vma->vm_end-vma->vm_start;
+ unsigned long page, pos;
+
+ Trace(TRACE_MEMORY, "mmap(0x%p, 0x%lx, %lu) called.\n", vdev, start, size);
+ pdev = vdev->priv;
+
+ vma->vm_flags |= VM_IO;
+
+ pos = (unsigned long)pdev->image_data;
+ while (size > 0) {
+ page = vmalloc_to_pfn((void *)pos);
+ if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
+ return -EAGAIN;
+
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+ if (size > PAGE_SIZE)
+ size -= PAGE_SIZE;
+ else
+ size = 0;
+ }
+
+ return 0;
+}
+
+/***************************************************************************/
+/* USB functions */
+
+/* This function gets called when a new device is plugged in or the usb core
+ * is loaded.
+ */
+
+static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev(intf);
+ struct pwc_device *pdev = NULL;
+ int vendor_id, product_id, type_id;
+ int i, hint;
+ int features = 0;
+ int video_nr = -1; /* default: use next available device */
+ char serial_number[30], *name;
+
+ /* Check if we can handle this device */
+ Trace(TRACE_PROBE, "probe() called [%04X %04X], if %d\n",
+ le16_to_cpu(udev->descriptor.idVendor),
+ le16_to_cpu(udev->descriptor.idProduct),
+ intf->altsetting->desc.bInterfaceNumber);
+
+ /* the interfaces are probed one by one. We are only interested in the
+ video interface (0) now.
+ Interface 1 is the Audio Control, and interface 2 Audio itself.
+ */
+ if (intf->altsetting->desc.bInterfaceNumber > 0)
+ return -ENODEV;
+
+ vendor_id = le16_to_cpu(udev->descriptor.idVendor);
+ product_id = le16_to_cpu(udev->descriptor.idProduct);
+
+ if (vendor_id == 0x0471) {
+ 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)/PCVC830 (ToUCam II) USB webcam detected.\n");
+ name = "Philips 730 webcam";
+ type_id = 730;
+ break;
+ case 0x0311:
+ Info("Philips PCVC740K (ToUCam Pro)/PCVC840 (ToUCam II) 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;
+ case 0x0313:
+ Info("Philips PCVC720K/40 (ToUCam XS) USB webcam detected.\n");
+ name = "Philips 720K/40 webcam";
+ type_id = 720;
+ break;
+ default:
+ return -ENODEV;
+ break;
+ }
+ }
+ else if (vendor_id == 0x069A) {
+ switch(product_id) {
+ case 0x0001:
+ Info("Askey VC010 type 1 USB webcam detected.\n");
+ name = "Askey VC010 webcam";
+ type_id = 645;
+ break;
+ default:
+ return -ENODEV;
+ break;
+ }
+ }
+ else if (vendor_id == 0x046d) {
+ switch(product_id) {
+ case 0x08b0:
+ Info("Logitech QuickCam Pro 3000 USB webcam detected.\n");
+ name = "Logitech QuickCam Pro 3000";
+ type_id = 740; /* CCD sensor */
+ break;
+ case 0x08b1:
+ Info("Logitech QuickCam Notebook Pro USB webcam detected.\n");
+ name = "Logitech QuickCam Notebook Pro";
+ type_id = 740; /* CCD sensor */
+ break;
+ case 0x08b2:
+ Info("Logitech QuickCam 4000 Pro USB webcam detected.\n");
+ name = "Logitech QuickCam Pro 4000";
+ type_id = 740; /* CCD sensor */
+ break;
+ case 0x08b3:
+ Info("Logitech QuickCam Zoom USB webcam detected.\n");
+ name = "Logitech QuickCam Zoom";
+ type_id = 740; /* CCD sensor */
+ break;
+ case 0x08B4:
+ Info("Logitech QuickCam Zoom (new model) USB webcam detected.\n");
+ name = "Logitech QuickCam Zoom";
+ type_id = 740; /* CCD sensor */
+ break;
+ case 0x08b5:
+ Info("Logitech QuickCam Orbit/Sphere USB webcam detected.\n");
+ name = "Logitech QuickCam Orbit";
+ type_id = 740; /* CCD sensor */
+ features |= FEATURE_MOTOR_PANTILT;
+ break;
+ case 0x08b6:
+ case 0x08b7:
+ case 0x08b8:
+ Info("Logitech QuickCam detected (reserved ID).\n");
+ name = "Logitech QuickCam (res.)";
+ type_id = 730; /* Assuming CMOS */
+ break;
+ default:
+ return -ENODEV;
+ break;
+ }
+ }
+ else if (vendor_id == 0x055d) {
+ /* I don't know the difference between the C10 and the C30;
+ I suppose the difference is the sensor, but both cameras
+ work equally well with a type_id of 675
+ */
+ 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:
+ return -ENODEV;
+ 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;
+ case 0x4011:
+ Info("Creative Labs Webcam Pro Ex detected.\n");
+ name = "Creative Labs Webcam Pro Ex";
+ type_id = 740;
+ break;
+ default:
+ return -ENODEV;
+ 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 -ENODEV;
+ break;
+ }
+ }
+ else if (vendor_id == 0x06be) {
+ switch(product_id) {
+ case 0x8116:
+ /* This is essentially the same cam as the Sotec Afina Eye */
+ Info("AME Co. Afina Eye USB webcam detected.\n");
+ name = "AME Co. Afina Eye";
+ type_id = 750;
+ break;
+ default:
+ return -ENODEV;
+ 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 -ENODEV;
+ break;
+ }
+ }
+ else
+ return -ENODEV; /* 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);
+ Trace(TRACE_PROBE, "Device serial number is %s\n", serial_number);
+
+ if (udev->descriptor.bNumConfigurations > 1)
+ Info("Warning: more than 1 configuration available.\n");
+
+ /* Allocate structure, initialize pointers, mutexes, etc. and link it to the usb_device */
+ pdev = kmalloc(sizeof(struct pwc_device), GFP_KERNEL);
+ if (pdev == NULL) {
+ Err("Oops, could not allocate memory for pwc_device.\n");
+ return -ENOMEM;
+ }
+ memset(pdev, 0, sizeof(struct pwc_device));
+ pdev->type = type_id;
+ pdev->vsize = default_size;
+ pdev->vframes = default_fps;
+ strcpy(pdev->serial, serial_number);
+ pdev->features = features;
+ if (vendor_id == 0x046D && product_id == 0x08B5)
+ {
+ /* Logitech QuickCam Orbit
+ The ranges have been determined experimentally; they may differ from cam to cam.
+ Also, the exact ranges left-right and up-down are different for my cam
+ */
+ pdev->angle_range.pan_min = -7000;
+ pdev->angle_range.pan_max = 7000;
+ pdev->angle_range.tilt_min = -3000;
+ pdev->angle_range.tilt_max = 2500;
+ }
+
+ init_MUTEX(&pdev->modlock);
+ spin_lock_init(&pdev->ptrlock);
+
+ pdev->udev = udev;
+ init_waitqueue_head(&pdev->frameq);
+ pdev->vcompression = pwc_preferred_compression;
+
+ /* Allocate video_device structure */
+ pdev->vdev = video_device_alloc();
+ if (pdev->vdev == 0)
+ {
+ Err("Err, cannot allocate video_device struture. Failing probe.");
+ kfree(pdev);
+ return -ENOMEM;
+ }
+ memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template));
+ strcpy(pdev->vdev->name, name);
+ pdev->vdev->owner = THIS_MODULE;
+ video_set_drvdata(pdev->vdev, pdev);
+
+ pdev->release = le16_to_cpu(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)) &&
+ (device_hint[hint].pdev == NULL)) {
+ /* so far, so good... try serial number */
+ if ((device_hint[hint].serial_number[0] == '*') || !strcmp(device_hint[hint].serial_number, serial_number)) {
+ /* match! */
+ video_nr = device_hint[hint].device_node;
+ Trace(TRACE_PROBE, "Found hint, will try to register as /dev/video%d\n", video_nr);
+ break;
+ }
+ }
+ }
+
+ pdev->vdev->release = video_device_release;
+ i = video_register_device(pdev->vdev, VFL_TYPE_GRABBER, video_nr);
+ if (i < 0) {
+ Err("Failed to register as video device (%d).\n", i);
+ video_device_release(pdev->vdev); /* Drip... drip... drip... */
+ kfree(pdev); /* Oops, no memory leaks please */
+ return -EIO;
+ }
+ else {
+ Info("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F);
+ }
+
+ /* occupy slot */
+ if (hint < MAX_DEV_HINTS)
+ device_hint[hint].pdev = pdev;
+
+ Trace(TRACE_PROBE, "probe() function returning struct at 0x%p.\n", pdev);
+ usb_set_intfdata (intf, pdev);
+ return 0;
+}
+
+/* The user janked out the cable... */
+static void usb_pwc_disconnect(struct usb_interface *intf)
+{
+ struct pwc_device *pdev;
+ int hint;
+
+ lock_kernel();
+ pdev = usb_get_intfdata (intf);
+ usb_set_intfdata (intf, NULL);
+ if (pdev == NULL) {
+ Err("pwc_disconnect() Called without private pointer.\n");
+ goto disconnect_out;
+ }
+ if (pdev->udev == NULL) {
+ Err("pwc_disconnect() already called for %p\n", pdev);
+ goto disconnect_out;
+ }
+ if (pdev->udev != interface_to_usbdev(intf)) {
+ Err("pwc_disconnect() Woops: pointer mismatch udev/pdev.\n");
+ goto disconnect_out;
+ }
+#ifdef PWC_MAGIC
+ if (pdev->magic != PWC_MAGIC) {
+ Err("pwc_disconnect() Magic number failed. Consult your scrolls and try again.\n");
+ goto disconnect_out;
+ }
+#endif
+
+ /* We got unplugged; this is signalled by an EPIPE error code */
+ if (pdev->vopen) {
+ Info("Disconnected while webcam is in use!\n");
+ pdev->error_status = EPIPE;
+ }
+
+ /* Alert waiting processes */
+ wake_up_interruptible(&pdev->frameq);
+ /* Wait until device is closed */
+ while (pdev->vopen)
+ schedule();
+ /* Device is now closed, so we can safely unregister it */
+ Trace(TRACE_PROBE, "Unregistering video device in disconnect().\n");
+ video_unregister_device(pdev->vdev);
+
+ /* Free memory (don't set pdev to 0 just yet) */
+ kfree(pdev);
+
+disconnect_out:
+ /* search device_hint[] table if we occupy a slot, by any chance */
+ for (hint = 0; hint < MAX_DEV_HINTS; hint++)
+ if (device_hint[hint].pdev == pdev)
+ device_hint[hint].pdev = NULL;
+
+ unlock_kernel();
+}
+
+
+/* *grunt* We have to do atoi ourselves :-( */
+static int pwc_atoi(const char *s)
+{
+ int k = 0;
+
+ k = 0;
+ while (*s != '\0' && *s >= '0' && *s <= '9') {
+ k = 10 * k + (*s - '0');
+ s++;
+ }
+ return k;
+}
+
+
+/*
+ * Initialization code & module stuff
+ */
+
+static char size[10];
+static int fps = 0;
+static int fbufs = 0;
+static int mbufs = 0;
+static int trace = -1;
+static int compression = -1;
+static int leds[2] = { -1, -1 };
+static char *dev_hint[MAX_DEV_HINTS] = { };
+
+module_param_string(size, size, sizeof(size), 0);
+MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga");
+module_param(fps, int, 0000);
+MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30");
+module_param(fbufs, int, 0000);
+MODULE_PARM_DESC(fbufs, "Number of internal frame buffers to reserve");
+module_param(mbufs, int, 0000);
+MODULE_PARM_DESC(mbufs, "Number of external (mmap()ed) image buffers");
+module_param(trace, int, 0000);
+MODULE_PARM_DESC(trace, "For debugging purposes");
+module_param(power_save, bool, 0000);
+MODULE_PARM_DESC(power_save, "Turn power save feature in camera on or off");
+module_param(compression, int, 0000);
+MODULE_PARM_DESC(compression, "Preferred compression quality. Range 0 (uncompressed) to 3 (high compression)");
+module_param_array(leds, int, NULL, 0000);
+MODULE_PARM_DESC(leds, "LED on,off time in milliseconds");
+module_param_array(dev_hint, charp, NULL, 0000);
+MODULE_PARM_DESC(dev_hint, "Device node hints");
+
+MODULE_DESCRIPTION("Philips & OEM USB webcam driver");
+MODULE_AUTHOR("Luc Saillard <luc@saillard.org>");
+MODULE_LICENSE("GPL");
+
+static int __init usb_pwc_init(void)
+{
+ int i, sz;
+ char *sizenames[PSZ_MAX] = { "sqcif", "qsif", "qcif", "sif", "cif", "vga" };
+
+ Info("Philips webcam module version " PWC_VERSION " loaded.\n");
+ Info("Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.\n");
+ Info("Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,\n");
+ Info("the Creative WebCam 5 & Pro Ex, 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;
+ Info("Default framerate set to %d.\n", default_fps);
+ }
+
+ if (size[0]) {
+ /* string; try matching with array */
+ for (sz = 0; sz < PSZ_MAX; sz++) {
+ if (!strcmp(sizenames[sz], size)) { /* Found! */
+ default_size = sz;
+ break;
+ }
+ }
+ if (sz == PSZ_MAX) {
+ Err("Size not recognized; try size=[sqcif | qsif | qcif | sif | cif | vga].\n");
+ return -EINVAL;
+ }
+ Info("Default image size set to %s [%dx%d].\n", sizenames[default_size], pwc_image_sizes[default_size].x, pwc_image_sizes[default_size].y);
+ }
+ if (mbufs) {
+ if (mbufs < 1 || mbufs > MAX_IMAGES) {
+ Err("Illegal number of mmap() buffers; use a number between 1 and %d.\n", MAX_IMAGES);
+ return -EINVAL;
+ }
+ default_mbufs = mbufs;
+ Info("Number of image buffers set to %d.\n", default_mbufs);
+ }
+ if (fbufs) {
+ if (fbufs < 2 || fbufs > MAX_FRAMES) {
+ Err("Illegal number of frame buffers; use a number between 2 and %d.\n", MAX_FRAMES);
+ return -EINVAL;
+ }
+ default_fbufs = fbufs;
+ Info("Number of frame buffers set to %d.\n", default_fbufs);
+ }
+ if (trace >= 0) {
+ Info("Trace options: 0x%04x\n", trace);
+ pwc_trace = trace;
+ }
+ if (compression >= 0) {
+ if (compression > 3) {
+ Err("Invalid compression setting; use a number between 0 (uncompressed) and 3 (high).\n");
+ return -EINVAL;
+ }
+ pwc_preferred_compression = compression;
+ Info("Preferred compression set to %d.\n", pwc_preferred_compression);
+ }
+ 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
+ & serial number. The format is [type[.serialnumber]:]node.
+
+ Any camera that isn't matched by these rules gets the next
+ available free device node.
+ */
+ for (i = 0; i < MAX_DEV_HINTS; i++) {
+ char *s, *colon, *dot;
+
+ /* This loop also initializes the array */
+ device_hint[i].pdev = NULL;
+ s = dev_hint[i];
+ if (s != NULL && *s != '\0') {
+ device_hint[i].type = -1; /* wildcard */
+ strcpy(device_hint[i].serial_number, "*");
+
+ /* parse string: chop at ':' & '/' */
+ colon = dot = s;
+ while (*colon != '\0' && *colon != ':')
+ colon++;
+ while (*dot != '\0' && *dot != '.')
+ dot++;
+ /* Few sanity checks */
+ if (*dot != '\0' && dot > colon) {
+ Err("Malformed camera hint: the colon must be after the dot.\n");
+ return -EINVAL;
+ }
+
+ if (*colon == '\0') {
+ /* No colon */
+ if (*dot != '\0') {
+ Err("Malformed camera hint: no colon + device node given.\n");
+ return -EINVAL;
+ }
+ else {
+ /* No type or serial number specified, just a number. */
+ device_hint[i].device_node = pwc_atoi(s);
+ }
+ }
+ else {
+ /* There's a colon, so we have at least a type and a device node */
+ device_hint[i].type = pwc_atoi(s);
+ device_hint[i].device_node = pwc_atoi(colon + 1);
+ if (*dot != '\0') {
+ /* There's a serial number as well */
+ int k;
+
+ dot++;
+ k = 0;
+ while (*dot != ':' && k < 29) {
+ device_hint[i].serial_number[k++] = *dot;
+ dot++;
+ }
+ device_hint[i].serial_number[k] = '\0';
+ }
+ }
+#if PWC_DEBUG
+ Debug("device_hint[%d]:\n", i);
+ Debug(" type : %d\n", device_hint[i].type);
+ Debug(" serial# : %s\n", device_hint[i].serial_number);
+ Debug(" node : %d\n", device_hint[i].device_node);
+#endif
+ }
+ else
+ device_hint[i].type = 0; /* not filled */
+ } /* ..for MAX_DEV_HINTS */
+
+ Trace(TRACE_PROBE, "Registering driver at address 0x%p.\n", &pwc_driver);
+ return usb_register(&pwc_driver);
+}
+
+static void __exit usb_pwc_exit(void)
+{
+ Trace(TRACE_MODULE, "Deregistering driver.\n");
+ usb_deregister(&pwc_driver);
+ Info("Philips webcam module removed.\n");
+}
+
+module_init(usb_pwc_init);
+module_exit(usb_pwc_exit);
+
diff --git a/drivers/usb/media/pwc/pwc-ioctl.h b/drivers/usb/media/pwc/pwc-ioctl.h
new file mode 100644
index 000000000000..65805eaa9a1c
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-ioctl.h
@@ -0,0 +1,292 @@
+#ifndef PWC_IOCTL_H
+#define PWC_IOCTL_H
+
+/* (C) 2001-2004 Nemosoft Unv.
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+/* This is pwc-ioctl.h belonging to PWC 8.12.1
+ It contains structures and defines to communicate from user space
+ directly to the driver.
+ */
+
+/*
+ Changes
+ 2001/08/03 Alvarado Added ioctl constants to access methods for
+ changing white balance and red/blue gains
+ 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE
+ 2003/12/13 Nemosft Unv. Some modifications to make interfacing to
+ PWCX easier
+ */
+
+/* These are private ioctl() commands, specific for the Philips webcams.
+ They contain functions not found in other webcams, and settings not
+ specified in the Video4Linux API.
+
+ The #define names are built up like follows:
+ VIDIOC VIDeo IOCtl prefix
+ PWC Philps WebCam
+ G optional: Get
+ S optional: Set
+ ... the function
+ */
+
+
+ /* Enumeration of image sizes */
+#define PSZ_SQCIF 0x00
+#define PSZ_QSIF 0x01
+#define PSZ_QCIF 0x02
+#define PSZ_SIF 0x03
+#define PSZ_CIF 0x04
+#define PSZ_VGA 0x05
+#define PSZ_MAX 6
+
+
+/* The frame rate is encoded in the video_window.flags parameter using
+ the upper 16 bits, since some flags are defined nowadays. The following
+ defines provide a mask and shift to filter out this value.
+
+ In 'Snapshot' mode the camera freezes its automatic exposure and colour
+ balance controls.
+ */
+#define PWC_FPS_SHIFT 16
+#define PWC_FPS_MASK 0x00FF0000
+#define PWC_FPS_FRMASK 0x003F0000
+#define PWC_FPS_SNAPSHOT 0x00400000
+
+
+/* structure for transfering x & y coordinates */
+struct pwc_coord
+{
+ int x, y; /* guess what */
+ int size; /* size, or offset */
+};
+
+
+/* Used with VIDIOCPWCPROBE */
+struct pwc_probe
+{
+ char name[32];
+ int type;
+};
+
+struct pwc_serial
+{
+ char serial[30]; /* String with serial number. Contains terminating 0 */
+};
+
+/* pwc_whitebalance.mode values */
+#define PWC_WB_INDOOR 0
+#define PWC_WB_OUTDOOR 1
+#define PWC_WB_FL 2
+#define PWC_WB_MANUAL 3
+#define PWC_WB_AUTO 4
+
+/* Used with VIDIOCPWC[SG]AWB (Auto White Balance).
+ 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
+{
+ int mode;
+ int manual_red, manual_blue; /* R/W */
+ 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 */
+};
+
+/* Image size (used with GREALSIZE) */
+struct pwc_imagesize
+{
+ int width;
+ int height;
+};
+
+/* Defines and structures for Motorized Pan & Tilt */
+#define PWC_MPT_PAN 0x01
+#define PWC_MPT_TILT 0x02
+#define PWC_MPT_TIMEOUT 0x04 /* for status */
+
+/* Set angles; when absolute != 0, the angle is absolute and the
+ driver calculates the relative offset for you. This can only
+ be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns
+ absolute angles.
+ */
+struct pwc_mpt_angles
+{
+ int absolute; /* write-only */
+ int pan; /* degrees * 100 */
+ int tilt; /* degress * 100 */
+};
+
+/* Range of angles of the camera, both horizontally and vertically.
+ */
+struct pwc_mpt_range
+{
+ int pan_min, pan_max; /* degrees * 100 */
+ int tilt_min, tilt_max;
+};
+
+struct pwc_mpt_status
+{
+ int status;
+ int time_pan;
+ int time_tilt;
+};
+
+
+/* This is used for out-of-kernel decompression. With it, you can get
+ all the necessary information to initialize and use the decompressor
+ routines in standalone applications.
+ */
+struct pwc_video_command
+{
+ int type; /* camera type (645, 675, 730, etc.) */
+ int release; /* release number */
+
+ int size; /* one of PSZ_* */
+ int alternate;
+ int command_len; /* length of USB video command */
+ unsigned char command_buf[13]; /* Actual USB video command */
+ int bandlength; /* >0 = compressed */
+ int frame_size; /* Size of one (un)compressed frame */
+};
+
+/* Flags for PWCX subroutines. Not all modules honour all flags. */
+#define PWCX_FLAG_PLANAR 0x0001
+#define PWCX_FLAG_BAYER 0x0008
+
+
+/* IOCTL definitions */
+
+ /* Restore user settings */
+#define VIDIOCPWCRUSER _IO('v', 192)
+ /* Save user settings */
+#define VIDIOCPWCSUSER _IO('v', 193)
+ /* Restore factory settings */
+#define VIDIOCPWCFACTORY _IO('v', 194)
+
+ /* You can manipulate the compression factor. A compression preference of 0
+ means use uncompressed modes when available; 1 is low compression, 2 is
+ medium and 3 is high compression preferred. Of course, the higher the
+ compression, the lower the bandwidth used but more chance of artefacts
+ in the image. The driver automatically chooses a higher compression when
+ the preferred mode is not available.
+ */
+ /* Set preferred compression quality (0 = uncompressed, 3 = highest compression) */
+#define VIDIOCPWCSCQUAL _IOW('v', 195, int)
+ /* Get preferred compression quality */
+#define VIDIOCPWCGCQUAL _IOR('v', 195, int)
+
+
+/* Retrieve serial number of camera */
+#define VIDIOCPWCGSERIAL _IOR('v', 198, struct pwc_serial)
+
+ /* 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 */
+#define VIDIOCPWCGAGC _IOR('v', 200, int)
+ /* Set shutter speed; int < 0 = auto; >= 0 = fixed, range 0..65535 */
+#define VIDIOCPWCSSHUTTER _IOW('v', 201, int)
+
+ /* Color compensation (Auto White Balance) */
+#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)
+
+ /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */
+#define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize)
+
+ /* Motorized pan & tilt functions */
+#define VIDIOCPWCMPTRESET _IOW('v', 211, int)
+#define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range)
+#define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles)
+#define VIDIOCPWCMPTGANGLE _IOR('v', 212, struct pwc_mpt_angles)
+#define VIDIOCPWCMPTSTATUS _IOR('v', 213, struct pwc_mpt_status)
+
+ /* Get the USB set-video command; needed for initializing libpwcx */
+#define VIDIOCPWCGVIDCMD _IOR('v', 215, struct pwc_video_command)
+struct pwc_table_init_buffer {
+ int len;
+ char *buffer;
+
+};
+#define VIDIOCPWCGVIDTABLE _IOR('v', 216, struct pwc_table_init_buffer)
+
+#endif
diff --git a/drivers/usb/media/pwc/pwc-kiara.c b/drivers/usb/media/pwc/pwc-kiara.c
new file mode 100644
index 000000000000..5485800efd83
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-kiara.c
@@ -0,0 +1,891 @@
+/* Linux driver for Philips webcam
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+
+/* This tables contains entries for the 730/740/750 (Kiara) camera, with
+ 4 different qualities (no compression, low, medium, high).
+ It lists the bandwidth requirements for said mode by its alternate interface
+ number. An alternate of 0 means that the mode is unavailable.
+
+ There are 6 * 4 * 4 entries:
+ 6 different resolutions subqcif, qsif, qcif, sif, cif, vga
+ 6 framerates: 5, 10, 15, 20, 25, 30
+ 4 compression modi: none, low, medium, high
+
+ When an uncompressed mode is not available, the next available compressed mode
+ will be chosen (unless the decompressor is absent). Sometimes there are only
+ 1 or 2 compressed modes available; in that case entries are duplicated.
+*/
+
+
+#include "pwc-kiara.h"
+#include "pwc-uncompress.h"
+
+const struct Kiara_table_entry Kiara_table[PSZ_MAX][6][4] =
+{
+ /* SQCIF */
+ {
+ /* 5 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 10 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 15 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 20 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 25 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 30 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ },
+ /* QSIF */
+ {
+ /* 5 fps */
+ {
+ {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}},
+ {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}},
+ {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}},
+ {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}},
+ },
+ /* 10 fps */
+ {
+ {2, 291, 0, {0x1C, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x23, 0x01, 0x80}},
+ {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}},
+ {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}},
+ {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}},
+ },
+ /* 15 fps */
+ {
+ {3, 437, 0, {0x1B, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xB5, 0x01, 0x80}},
+ {2, 292, 640, {0x13, 0xF4, 0x30, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x20, 0x24, 0x01, 0x80}},
+ {2, 292, 640, {0x13, 0xF4, 0x30, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x20, 0x24, 0x01, 0x80}},
+ {1, 192, 420, {0x13, 0xF4, 0x30, 0x0D, 0x1B, 0x0C, 0x53, 0x1E, 0x18, 0xC0, 0x00, 0x80}},
+ },
+ /* 20 fps */
+ {
+ {4, 589, 0, {0x1A, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x4D, 0x02, 0x80}},
+ {3, 448, 730, {0x12, 0xF4, 0x30, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x18, 0xC0, 0x01, 0x80}},
+ {2, 292, 476, {0x12, 0xF4, 0x30, 0x0E, 0xD8, 0x0E, 0x10, 0x19, 0x18, 0x24, 0x01, 0x80}},
+ {1, 192, 312, {0x12, 0xF4, 0x50, 0x09, 0xB3, 0x08, 0xEB, 0x1E, 0x18, 0xC0, 0x00, 0x80}},
+ },
+ /* 25 fps */
+ {
+ {5, 703, 0, {0x19, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xBF, 0x02, 0x80}},
+ {3, 447, 610, {0x11, 0xF4, 0x30, 0x13, 0x0B, 0x12, 0x43, 0x14, 0x28, 0xBF, 0x01, 0x80}},
+ {2, 292, 398, {0x11, 0xF4, 0x50, 0x0C, 0x6C, 0x0B, 0xA4, 0x1E, 0x28, 0x24, 0x01, 0x80}},
+ {1, 193, 262, {0x11, 0xF4, 0x50, 0x08, 0x23, 0x07, 0x5B, 0x1E, 0x28, 0xC1, 0x00, 0x80}},
+ },
+ /* 30 fps */
+ {
+ {8, 874, 0, {0x18, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x6A, 0x03, 0x80}},
+ {5, 704, 730, {0x10, 0xF4, 0x30, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x28, 0xC0, 0x02, 0x80}},
+ {3, 448, 492, {0x10, 0xF4, 0x30, 0x0F, 0x5D, 0x0E, 0x95, 0x15, 0x28, 0xC0, 0x01, 0x80}},
+ {2, 292, 320, {0x10, 0xF4, 0x50, 0x09, 0xFB, 0x09, 0x33, 0x1E, 0x28, 0x24, 0x01, 0x80}},
+ },
+ },
+ /* QCIF */
+ {
+ /* 5 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 10 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 15 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 20 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 25 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 30 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ },
+ /* SIF */
+ {
+ /* 5 fps */
+ {
+ {4, 582, 0, {0x0D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x46, 0x02, 0x80}},
+ {3, 387, 1276, {0x05, 0xF4, 0x30, 0x27, 0xD8, 0x26, 0x48, 0x03, 0x10, 0x83, 0x01, 0x80}},
+ {2, 291, 960, {0x05, 0xF4, 0x30, 0x1D, 0xF2, 0x1C, 0x62, 0x04, 0x10, 0x23, 0x01, 0x80}},
+ {1, 191, 630, {0x05, 0xF4, 0x50, 0x13, 0xA9, 0x12, 0x19, 0x05, 0x18, 0xBF, 0x00, 0x80}},
+ },
+ /* 10 fps */
+ {
+ {0, },
+ {6, 775, 1278, {0x04, 0xF4, 0x30, 0x27, 0xE8, 0x26, 0x58, 0x05, 0x30, 0x07, 0x03, 0x80}},
+ {3, 447, 736, {0x04, 0xF4, 0x30, 0x16, 0xFB, 0x15, 0x6B, 0x05, 0x28, 0xBF, 0x01, 0x80}},
+ {2, 292, 480, {0x04, 0xF4, 0x70, 0x0E, 0xF9, 0x0D, 0x69, 0x09, 0x28, 0x24, 0x01, 0x80}},
+ },
+ /* 15 fps */
+ {
+ {0, },
+ {9, 955, 1050, {0x03, 0xF4, 0x30, 0x20, 0xCF, 0x1F, 0x3F, 0x06, 0x48, 0xBB, 0x03, 0x80}},
+ {4, 592, 650, {0x03, 0xF4, 0x30, 0x14, 0x44, 0x12, 0xB4, 0x08, 0x30, 0x50, 0x02, 0x80}},
+ {3, 448, 492, {0x03, 0xF4, 0x50, 0x0F, 0x52, 0x0D, 0xC2, 0x09, 0x38, 0xC0, 0x01, 0x80}},
+ },
+ /* 20 fps */
+ {
+ {0, },
+ {9, 958, 782, {0x02, 0xF4, 0x30, 0x18, 0x6A, 0x16, 0xDA, 0x0B, 0x58, 0xBE, 0x03, 0x80}},
+ {5, 703, 574, {0x02, 0xF4, 0x50, 0x11, 0xE7, 0x10, 0x57, 0x0B, 0x40, 0xBF, 0x02, 0x80}},
+ {3, 446, 364, {0x02, 0xF4, 0x90, 0x0B, 0x5C, 0x09, 0xCC, 0x0E, 0x38, 0xBE, 0x01, 0x80}},
+ },
+ /* 25 fps */
+ {
+ {0, },
+ {9, 958, 654, {0x01, 0xF4, 0x30, 0x14, 0x66, 0x12, 0xD6, 0x0B, 0x50, 0xBE, 0x03, 0x80}},
+ {6, 776, 530, {0x01, 0xF4, 0x50, 0x10, 0x8C, 0x0E, 0xFC, 0x0C, 0x48, 0x08, 0x03, 0x80}},
+ {4, 592, 404, {0x01, 0xF4, 0x70, 0x0C, 0x96, 0x0B, 0x06, 0x0B, 0x48, 0x50, 0x02, 0x80}},
+ },
+ /* 30 fps */
+ {
+ {0, },
+ {9, 957, 526, {0x00, 0xF4, 0x50, 0x10, 0x68, 0x0E, 0xD8, 0x0D, 0x58, 0xBD, 0x03, 0x80}},
+ {6, 775, 426, {0x00, 0xF4, 0x70, 0x0D, 0x48, 0x0B, 0xB8, 0x0F, 0x50, 0x07, 0x03, 0x80}},
+ {4, 590, 324, {0x00, 0x7A, 0x88, 0x0A, 0x1C, 0x08, 0xB4, 0x0E, 0x50, 0x4E, 0x02, 0x80}},
+ },
+ },
+ /* CIF */
+ {
+ /* 5 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 10 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 15 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 20 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 25 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 30 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ },
+ /* VGA */
+ {
+ /* 5 fps */
+ {
+ {0, },
+ {6, 773, 1272, {0x25, 0xF4, 0x30, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x03, 0x80}},
+ {4, 592, 976, {0x25, 0xF4, 0x50, 0x1E, 0x78, 0x1B, 0x58, 0x03, 0x30, 0x50, 0x02, 0x80}},
+ {3, 448, 738, {0x25, 0xF4, 0x90, 0x17, 0x0C, 0x13, 0xEC, 0x04, 0x30, 0xC0, 0x01, 0x80}},
+ },
+ /* 10 fps */
+ {
+ {0, },
+ {9, 956, 788, {0x24, 0xF4, 0x70, 0x18, 0x9C, 0x15, 0x7C, 0x03, 0x48, 0xBC, 0x03, 0x80}},
+ {6, 776, 640, {0x24, 0xF4, 0xB0, 0x13, 0xFC, 0x11, 0x2C, 0x04, 0x48, 0x08, 0x03, 0x80}},
+ {4, 592, 488, {0x24, 0x7A, 0xE8, 0x0F, 0x3C, 0x0C, 0x6C, 0x06, 0x48, 0x50, 0x02, 0x80}},
+ },
+ /* 15 fps */
+ {
+ {0, },
+ {9, 957, 526, {0x23, 0x7A, 0xE8, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x03, 0x80}},
+ {9, 957, 526, {0x23, 0x7A, 0xE8, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x03, 0x80}},
+ {8, 895, 492, {0x23, 0x7A, 0xE8, 0x0F, 0x5D, 0x0C, 0x8D, 0x06, 0x58, 0x7F, 0x03, 0x80}},
+ },
+ /* 20 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 25 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 30 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ },
+};
+
+
+/*
+ * Rom table for kiara chips
+ *
+ * 32 roms tables (one for each resolution ?)
+ * 2 tables per roms (one for each passes) (Y, and U&V)
+ * 128 bytes per passes
+ */
+
+const unsigned int KiaraRomTable [8][2][16][8] =
+{
+ { /* version 0 */
+ { /* version 0, passes 0 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000001,0x00000001},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000009,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000009,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000249,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000249,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x00000249,0x0000124a,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x0000124a,0x00009252,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00009252,0x00009292,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009292,0x00009292,0x00009493,0x000124db},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009492,0x0000a49b,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x0000a493,0x000124db,0x000124db,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x000124db,0x000126dc,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000124db,0x000136e4,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b925,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 0, passes 1 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000001,0x00000009,
+ 0x00000009,0x00000009,0x00000009,0x00000001},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000249,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00001252},
+ {0x00000000,0x00000000,0x00000049,0x00001249,
+ 0x0000124a,0x0000124a,0x00001252,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009252,0x00009292,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009292,0x00009292,0x00009292,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x00009292,
+ 0x00009492,0x00009493,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x000124db,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00009252,0x00009493,
+ 0x000126dc,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000136e4,0x000136e4,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 1 */
+ { /* version 1, passes 0 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000001},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000009,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00001252},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x0000124a,0x00009252,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009292,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009252,0x00009493,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009292,0x00009493,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x00009252,
+ 0x00009492,0x00009493,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x000124db,0x000124db,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000126dc,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 1, passes 1 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000049,0x00000009,
+ 0x00000049,0x00000009,0x00000001,0x00000000},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000000},
+ {0x00000000,0x00000000,0x00000249,0x00000049,
+ 0x00000249,0x00000049,0x0000024a,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x0000024a,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x0000024a,0x00000009},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00009252,0x00001252,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00009292,0x00001252,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00009292,0x00001252,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009292,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x0000924a,0x0000924a,
+ 0x00009492,0x00009493,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 2 */
+ { /* version 2, passes 0 */
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x00001252,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x00009252,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x0000124a,0x00009292,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009493,0x00009493,0x0000a49b},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009292,0x00009493,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009292,0x00009493,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x0000a49b,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x000124db,0x000124db,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x000124db,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0001249b,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000136e4,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x00009252,0x000124db,
+ 0x000126dc,0x0001b724,0x0001b725,0x0001b925},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 2, passes 1 */
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00000249,
+ 0x0000124a,0x0000124a,0x00001252,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00009292,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x0000a49b,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x0000a49b,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x0000a49b,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x00009252,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 3 */
+ { /* version 3, passes 0 */
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x0000a49b,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x000124db,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0001249b,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000136e4,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000136e4,0x0001b725,0x0001b925},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x000136e4,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x000136e4,0x0001b925,0x00025bb6,0x00024b77},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 3, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00000249,
+ 0x0000124a,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x00009493,0x0000a49b,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x000126dc,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00009492,0x0000a49b,
+ 0x000136e4,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001b724,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 4 */
+ { /* version 4, passes 0 */
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000249,0x00000049,
+ 0x00000249,0x00000249,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x00009252,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009493,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009292,0x00009493,0x00009493,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0001249b,0x000126dc,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00009252,0x00009493,
+ 0x000124db,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009252,0x0000a49b,
+ 0x000124db,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x000136e4,0x0001b925,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 4, passes 1 */
+ {0x00000000,0x00000000,0x00000249,0x00000049,
+ 0x00000009,0x00000009,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000049,0x00000049,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00000249,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x0000124a,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009252,0x0000124a,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x00009252,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x00009292,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x00009292,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x00009493,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000124db,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009252,0x000124db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 5 */
+ { /* version 5, passes 0 */
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000126dc,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b725,0x000136e4},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b92d,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b92d,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b925,0x0001c96e,0x0001b925},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001c924,0x0002496d,0x00025bb6,0x00024b77},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 5, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009252,0x00009252,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000124db,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000124db,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000126dc,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009292,0x000124db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 6 */
+ { /* version 6, passes 0 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000126dc,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b725,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b92d,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b92d,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b724,0x0001b92d,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b925,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001c92d,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001c92d,0x00024b76,0x0002496e},
+ {0x00000000,0x00000000,0x00012492,0x000126db,
+ 0x0001c924,0x00024b6d,0x0002ddb6,0x00025bbf},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 6, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x00009252,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x00009292,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x0000a49b,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000124db,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000126dc,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001c924,0x0001b724,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 7 */
+ { /* version 7, passes 0 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x0001b725,0x000124db},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b725,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x000124db,
+ 0x000136e4,0x0001b724,0x0001b725,0x000126dc},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b724,0x0001c96e,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001c92d,0x0001c96e,0x0001b925},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b924,0x0001c92d,0x00024b76,0x0002496e},
+ {0x00000000,0x00000000,0x00012492,0x000136db,
+ 0x00024924,0x00024b6d,0x0002ddb6,0x00025bbf},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 7, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x00009492,0x00009292,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x0000a49b,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000124db,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000136db,
+ 0x0001b724,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000136db,
+ 0x0001b724,0x000126dc,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00009292,0x000136db,
+ 0x0001b724,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009492,0x000136db,
+ 0x0001b724,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00012492,0x0001b6db,
+ 0x0001c924,0x0001b724,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ }
+};
+
diff --git a/drivers/usb/media/pwc/pwc-kiara.h b/drivers/usb/media/pwc/pwc-kiara.h
new file mode 100644
index 000000000000..12929abbb1f0
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-kiara.h
@@ -0,0 +1,45 @@
+/* Linux driver for Philips webcam
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+/* Entries for the Kiara (730/740/750) camera */
+
+#ifndef PWC_KIARA_H
+#define PWC_KIARA_H
+
+#include "pwc-ioctl.h"
+
+struct Kiara_table_entry
+{
+ char alternate; /* USB alternate interface */
+ unsigned short packetsize; /* Normal packet size */
+ unsigned short bandlength; /* Bandlength when decompressing */
+ unsigned char mode[12]; /* precomputed mode settings for cam */
+};
+
+const extern struct Kiara_table_entry Kiara_table[PSZ_MAX][6][4];
+const extern unsigned int KiaraRomTable[8][2][16][8];
+
+#endif
+
+
diff --git a/drivers/usb/media/pwc/pwc-misc.c b/drivers/usb/media/pwc/pwc-misc.c
new file mode 100644
index 000000000000..b7a4bd3524c7
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-misc.c
@@ -0,0 +1,140 @@
+/* Linux driver for Philips webcam
+ Various miscellaneous functions and tables.
+ (C) 1999-2003 Nemosoft Unv.
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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 <linux/slab.h>
+
+#include "pwc.h"
+
+struct pwc_coord pwc_image_sizes[PSZ_MAX] =
+{
+ { 128, 96, 0 },
+ { 160, 120, 0 },
+ { 176, 144, 0 },
+ { 320, 240, 0 },
+ { 352, 288, 0 },
+ { 640, 480, 0 },
+};
+
+/* x,y -> PSZ_ */
+int pwc_decode_size(struct pwc_device *pdev, int width, int height)
+{
+ int i, find;
+
+ /* Make sure we don't go beyond our max size.
+ NB: we have different limits for RAW and normal modes. In case
+ you don't have the decompressor loaded or use RAW mode,
+ the maximum viewable size is smaller.
+ */
+ if (pdev->vpalette == VIDEO_PALETTE_RAW)
+ {
+ if (width > pdev->abs_max.x || height > pdev->abs_max.y)
+ {
+ Debug("VIDEO_PALETTE_RAW: going beyond abs_max.\n");
+ return -1;
+ }
+ }
+ else
+ {
+ if (width > pdev->view_max.x || height > pdev->view_max.y)
+ {
+ Debug("VIDEO_PALETTE_ not RAW: going beyond view_max.\n");
+ return -1;
+ }
+ }
+
+ /* Find the largest size supported by the camera that fits into the
+ requested size.
+ */
+ find = -1;
+ for (i = 0; i < PSZ_MAX; i++) {
+ if (pdev->image_mask & (1 << i)) {
+ if (pwc_image_sizes[i].x <= width && pwc_image_sizes[i].y <= height)
+ find = i;
+ }
+ }
+ return find;
+}
+
+/* initialize variables depending on type and decompressor*/
+void pwc_construct(struct pwc_device *pdev)
+{
+ switch(pdev->type) {
+ case 645:
+ case 646:
+ pdev->view_min.x = 128;
+ pdev->view_min.y = 96;
+ pdev->view_max.x = 352;
+ pdev->view_max.y = 288;
+ pdev->abs_max.x = 352;
+ pdev->abs_max.y = 288;
+ pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QCIF | 1 << PSZ_CIF;
+ pdev->vcinterface = 2;
+ pdev->vendpoint = 4;
+ pdev->frame_header_size = 0;
+ pdev->frame_trailer_size = 0;
+ break;
+ case 675:
+ case 680:
+ case 690:
+ pdev->view_min.x = 128;
+ pdev->view_min.y = 96;
+ /* Anthill bug #38: PWC always reports max size, even without PWCX */
+ pdev->view_max.x = 640;
+ pdev->view_max.y = 480;
+ pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QSIF | 1 << PSZ_QCIF | 1 << PSZ_SIF | 1 << PSZ_CIF | 1 << PSZ_VGA;
+ pdev->abs_max.x = 640;
+ pdev->abs_max.y = 480;
+ pdev->vcinterface = 3;
+ pdev->vendpoint = 4;
+ pdev->frame_header_size = 0;
+ pdev->frame_trailer_size = 0;
+ break;
+ case 720:
+ case 730:
+ case 740:
+ case 750:
+ pdev->view_min.x = 160;
+ pdev->view_min.y = 120;
+ pdev->view_max.x = 640;
+ pdev->view_max.y = 480;
+ pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF | 1 << PSZ_VGA;
+ pdev->abs_max.x = 640;
+ pdev->abs_max.y = 480;
+ pdev->vcinterface = 3;
+ pdev->vendpoint = 5;
+ pdev->frame_header_size = TOUCAM_HEADER_SIZE;
+ pdev->frame_trailer_size = TOUCAM_TRAILER_SIZE;
+ break;
+ }
+ Debug("type = %d\n",pdev->type);
+ pdev->vpalette = VIDEO_PALETTE_YUV420P; /* default */
+ pdev->view_min.size = pdev->view_min.x * pdev->view_min.y;
+ pdev->view_max.size = pdev->view_max.x * pdev->view_max.y;
+ /* length of image, in YUV format; always allocate enough memory. */
+ pdev->len_per_image = (pdev->abs_max.x * pdev->abs_max.y * 3) / 2;
+}
+
+
diff --git a/drivers/usb/media/pwc/pwc-nala.h b/drivers/usb/media/pwc/pwc-nala.h
new file mode 100644
index 000000000000..e6c5cb69d03b
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-nala.h
@@ -0,0 +1,66 @@
+ /* SQCIF */
+ {
+ {0, 0, {0x04, 0x01, 0x03}},
+ {8, 0, {0x05, 0x01, 0x03}},
+ {7, 0, {0x08, 0x01, 0x03}},
+ {7, 0, {0x0A, 0x01, 0x03}},
+ {6, 0, {0x0C, 0x01, 0x03}},
+ {5, 0, {0x0F, 0x01, 0x03}},
+ {4, 0, {0x14, 0x01, 0x03}},
+ {3, 0, {0x18, 0x01, 0x03}},
+ },
+ /* QSIF */
+ {
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ },
+ /* QCIF */
+ {
+ {0, 0, {0x04, 0x01, 0x02}},
+ {8, 0, {0x05, 0x01, 0x02}},
+ {7, 0, {0x08, 0x01, 0x02}},
+ {6, 0, {0x0A, 0x01, 0x02}},
+ {5, 0, {0x0C, 0x01, 0x02}},
+ {4, 0, {0x0F, 0x01, 0x02}},
+ {1, 0, {0x14, 0x01, 0x02}},
+ {1, 0, {0x18, 0x01, 0x02}},
+ },
+ /* SIF */
+ {
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ },
+ /* CIF */
+ {
+ {4, 0, {0x04, 0x01, 0x01}},
+ {7, 1, {0x05, 0x03, 0x01}},
+ {6, 1, {0x08, 0x03, 0x01}},
+ {4, 1, {0x0A, 0x03, 0x01}},
+ {3, 1, {0x0C, 0x03, 0x01}},
+ {2, 1, {0x0F, 0x03, 0x01}},
+ {0},
+ {0},
+ },
+ /* VGA */
+ {
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ {0},
+ },
diff --git a/drivers/usb/media/pwc/pwc-timon.c b/drivers/usb/media/pwc/pwc-timon.c
new file mode 100644
index 000000000000..f950a4e5ed96
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-timon.c
@@ -0,0 +1,1446 @@
+/* Linux driver for Philips webcam
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+
+/* This tables contains entries for the 675/680/690 (Timon) camera, with
+ 4 different qualities (no compression, low, medium, high).
+ It lists the bandwidth requirements for said mode by its alternate interface
+ number. An alternate of 0 means that the mode is unavailable.
+
+ There are 6 * 4 * 4 entries:
+ 6 different resolutions subqcif, qsif, qcif, sif, cif, vga
+ 6 framerates: 5, 10, 15, 20, 25, 30
+ 4 compression modi: none, low, medium, high
+
+ When an uncompressed mode is not available, the next available compressed mode
+ will be chosen (unless the decompressor is absent). Sometimes there are only
+ 1 or 2 compressed modes available; in that case entries are duplicated.
+*/
+
+#include "pwc-timon.h"
+
+const struct Timon_table_entry Timon_table[PSZ_MAX][6][4] =
+{
+ /* SQCIF */
+ {
+ /* 5 fps */
+ {
+ {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}},
+ {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}},
+ {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}},
+ {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}},
+ },
+ /* 10 fps */
+ {
+ {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}},
+ {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}},
+ {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}},
+ {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}},
+ },
+ /* 15 fps */
+ {
+ {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}},
+ {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}},
+ {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}},
+ {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}},
+ },
+ /* 20 fps */
+ {
+ {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}},
+ {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}},
+ {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}},
+ {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}},
+ },
+ /* 25 fps */
+ {
+ {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}},
+ {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}},
+ {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}},
+ {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}},
+ },
+ /* 30 fps */
+ {
+ {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}},
+ {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}},
+ {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}},
+ {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}},
+ },
+ },
+ /* QSIF */
+ {
+ /* 5 fps */
+ {
+ {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}},
+ {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}},
+ {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}},
+ {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}},
+ },
+ /* 10 fps */
+ {
+ {2, 291, 0, {0x2C, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x23, 0xA1, 0xC0, 0x02}},
+ {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}},
+ {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}},
+ {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}},
+ },
+ /* 15 fps */
+ {
+ {3, 437, 0, {0x2B, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xB5, 0x6D, 0xC0, 0x02}},
+ {2, 291, 640, {0x2B, 0xF4, 0x05, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x08, 0x23, 0xA1, 0xC0, 0x02}},
+ {2, 291, 640, {0x2B, 0xF4, 0x05, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x08, 0x23, 0xA1, 0xC0, 0x02}},
+ {1, 191, 420, {0x2B, 0xF4, 0x0D, 0x0D, 0x1B, 0x0C, 0x53, 0x1E, 0x08, 0xBF, 0xF4, 0xC0, 0x02}},
+ },
+ /* 20 fps */
+ {
+ {4, 588, 0, {0x2A, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x4C, 0x52, 0xC0, 0x02}},
+ {3, 447, 730, {0x2A, 0xF4, 0x05, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x18, 0xBF, 0x69, 0xC0, 0x02}},
+ {2, 292, 476, {0x2A, 0xF4, 0x0D, 0x0E, 0xD8, 0x0E, 0x10, 0x19, 0x18, 0x24, 0xA1, 0xC0, 0x02}},
+ {1, 192, 312, {0x2A, 0xF4, 0x1D, 0x09, 0xB3, 0x08, 0xEB, 0x1E, 0x18, 0xC0, 0xF4, 0xC0, 0x02}},
+ },
+ /* 25 fps */
+ {
+ {5, 703, 0, {0x29, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xBF, 0x42, 0xC0, 0x02}},
+ {3, 447, 610, {0x29, 0xF4, 0x05, 0x13, 0x0B, 0x12, 0x43, 0x14, 0x18, 0xBF, 0x69, 0xC0, 0x02}},
+ {2, 292, 398, {0x29, 0xF4, 0x0D, 0x0C, 0x6C, 0x0B, 0xA4, 0x1E, 0x18, 0x24, 0xA1, 0xC0, 0x02}},
+ {1, 192, 262, {0x29, 0xF4, 0x25, 0x08, 0x23, 0x07, 0x5B, 0x1E, 0x18, 0xC0, 0xF4, 0xC0, 0x02}},
+ },
+ /* 30 fps */
+ {
+ {8, 873, 0, {0x28, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x69, 0x37, 0xC0, 0x02}},
+ {5, 704, 774, {0x28, 0xF4, 0x05, 0x18, 0x21, 0x17, 0x59, 0x0F, 0x18, 0xC0, 0x42, 0xC0, 0x02}},
+ {3, 448, 492, {0x28, 0xF4, 0x05, 0x0F, 0x5D, 0x0E, 0x95, 0x15, 0x18, 0xC0, 0x69, 0xC0, 0x02}},
+ {2, 291, 320, {0x28, 0xF4, 0x1D, 0x09, 0xFB, 0x09, 0x33, 0x1E, 0x18, 0x23, 0xA1, 0xC0, 0x02}},
+ },
+ },
+ /* QCIF */
+ {
+ /* 5 fps */
+ {
+ {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}},
+ {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}},
+ {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}},
+ {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}},
+ },
+ /* 10 fps */
+ {
+ {3, 385, 0, {0x0C, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x81, 0x79, 0xC0, 0x02}},
+ {2, 291, 800, {0x0C, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x11, 0x08, 0x23, 0xA1, 0xC0, 0x02}},
+ {2, 291, 800, {0x0C, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x11, 0x08, 0x23, 0xA1, 0xC0, 0x02}},
+ {1, 194, 532, {0x0C, 0xF4, 0x05, 0x10, 0x9A, 0x0F, 0xBE, 0x1B, 0x08, 0xC2, 0xF0, 0xC0, 0x02}},
+ },
+ /* 15 fps */
+ {
+ {4, 577, 0, {0x0B, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x41, 0x52, 0xC0, 0x02}},
+ {3, 447, 818, {0x0B, 0xF4, 0x05, 0x19, 0x89, 0x18, 0xAD, 0x0F, 0x10, 0xBF, 0x69, 0xC0, 0x02}},
+ {2, 292, 534, {0x0B, 0xF4, 0x05, 0x10, 0xA3, 0x0F, 0xC7, 0x19, 0x10, 0x24, 0xA1, 0xC0, 0x02}},
+ {1, 195, 356, {0x0B, 0xF4, 0x15, 0x0B, 0x11, 0x0A, 0x35, 0x1E, 0x10, 0xC3, 0xF0, 0xC0, 0x02}},
+ },
+ /* 20 fps */
+ {
+ {6, 776, 0, {0x0A, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x08, 0x3F, 0xC0, 0x02}},
+ {4, 591, 804, {0x0A, 0xF4, 0x05, 0x19, 0x1E, 0x18, 0x42, 0x0F, 0x18, 0x4F, 0x4E, 0xC0, 0x02}},
+ {3, 447, 608, {0x0A, 0xF4, 0x05, 0x12, 0xFD, 0x12, 0x21, 0x15, 0x18, 0xBF, 0x69, 0xC0, 0x02}},
+ {2, 291, 396, {0x0A, 0xF4, 0x15, 0x0C, 0x5E, 0x0B, 0x82, 0x1E, 0x18, 0x23, 0xA1, 0xC0, 0x02}},
+ },
+ /* 25 fps */
+ {
+ {9, 928, 0, {0x09, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xA0, 0x33, 0xC0, 0x02}},
+ {5, 703, 800, {0x09, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x10, 0x18, 0xBF, 0x42, 0xC0, 0x02}},
+ {3, 447, 508, {0x09, 0xF4, 0x0D, 0x0F, 0xD2, 0x0E, 0xF6, 0x1B, 0x18, 0xBF, 0x69, 0xC0, 0x02}},
+ {2, 292, 332, {0x09, 0xF4, 0x1D, 0x0A, 0x5A, 0x09, 0x7E, 0x1E, 0x18, 0x24, 0xA1, 0xC0, 0x02}},
+ },
+ /* 30 fps */
+ {
+ {0, },
+ {9, 956, 876, {0x08, 0xF4, 0x05, 0x1B, 0x58, 0x1A, 0x7C, 0x0E, 0x20, 0xBC, 0x33, 0x10, 0x02}},
+ {4, 592, 542, {0x08, 0xF4, 0x05, 0x10, 0xE4, 0x10, 0x08, 0x17, 0x20, 0x50, 0x4E, 0x10, 0x02}},
+ {2, 291, 266, {0x08, 0xF4, 0x25, 0x08, 0x48, 0x07, 0x6C, 0x1E, 0x20, 0x23, 0xA1, 0x10, 0x02}},
+ },
+ },
+ /* SIF */
+ {
+ /* 5 fps */
+ {
+ {4, 582, 0, {0x35, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x46, 0x52, 0x60, 0x02}},
+ {3, 387, 1276, {0x35, 0xF4, 0x05, 0x27, 0xD8, 0x26, 0x48, 0x03, 0x10, 0x83, 0x79, 0x60, 0x02}},
+ {2, 291, 960, {0x35, 0xF4, 0x0D, 0x1D, 0xF2, 0x1C, 0x62, 0x04, 0x10, 0x23, 0xA1, 0x60, 0x02}},
+ {1, 191, 630, {0x35, 0xF4, 0x1D, 0x13, 0xA9, 0x12, 0x19, 0x05, 0x08, 0xBF, 0xF4, 0x60, 0x02}},
+ },
+ /* 10 fps */
+ {
+ {0, },
+ {6, 775, 1278, {0x34, 0xF4, 0x05, 0x27, 0xE8, 0x26, 0x58, 0x05, 0x30, 0x07, 0x3F, 0x10, 0x02}},
+ {3, 447, 736, {0x34, 0xF4, 0x15, 0x16, 0xFB, 0x15, 0x6B, 0x05, 0x18, 0xBF, 0x69, 0x10, 0x02}},
+ {2, 291, 480, {0x34, 0xF4, 0x2D, 0x0E, 0xF9, 0x0D, 0x69, 0x09, 0x18, 0x23, 0xA1, 0x10, 0x02}},
+ },
+ /* 15 fps */
+ {
+ {0, },
+ {9, 955, 1050, {0x33, 0xF4, 0x05, 0x20, 0xCF, 0x1F, 0x3F, 0x06, 0x48, 0xBB, 0x33, 0x10, 0x02}},
+ {4, 591, 650, {0x33, 0xF4, 0x15, 0x14, 0x44, 0x12, 0xB4, 0x08, 0x30, 0x4F, 0x4E, 0x10, 0x02}},
+ {3, 448, 492, {0x33, 0xF4, 0x25, 0x0F, 0x52, 0x0D, 0xC2, 0x09, 0x28, 0xC0, 0x69, 0x10, 0x02}},
+ },
+ /* 20 fps */
+ {
+ {0, },
+ {9, 958, 782, {0x32, 0xF4, 0x0D, 0x18, 0x6A, 0x16, 0xDA, 0x0B, 0x58, 0xBE, 0x33, 0xD0, 0x02}},
+ {5, 703, 574, {0x32, 0xF4, 0x1D, 0x11, 0xE7, 0x10, 0x57, 0x0B, 0x40, 0xBF, 0x42, 0xD0, 0x02}},
+ {3, 446, 364, {0x32, 0xF4, 0x3D, 0x0B, 0x5C, 0x09, 0xCC, 0x0E, 0x30, 0xBE, 0x69, 0xD0, 0x02}},
+ },
+ /* 25 fps */
+ {
+ {0, },
+ {9, 958, 654, {0x31, 0xF4, 0x15, 0x14, 0x66, 0x12, 0xD6, 0x0B, 0x50, 0xBE, 0x33, 0x90, 0x02}},
+ {6, 776, 530, {0x31, 0xF4, 0x25, 0x10, 0x8C, 0x0E, 0xFC, 0x0C, 0x48, 0x08, 0x3F, 0x90, 0x02}},
+ {4, 592, 404, {0x31, 0xF4, 0x35, 0x0C, 0x96, 0x0B, 0x06, 0x0B, 0x38, 0x50, 0x4E, 0x90, 0x02}},
+ },
+ /* 30 fps */
+ {
+ {0, },
+ {9, 957, 526, {0x30, 0xF4, 0x25, 0x10, 0x68, 0x0E, 0xD8, 0x0D, 0x58, 0xBD, 0x33, 0x60, 0x02}},
+ {6, 775, 426, {0x30, 0xF4, 0x35, 0x0D, 0x48, 0x0B, 0xB8, 0x0F, 0x50, 0x07, 0x3F, 0x60, 0x02}},
+ {4, 590, 324, {0x30, 0x7A, 0x4B, 0x0A, 0x1C, 0x08, 0xB4, 0x0E, 0x40, 0x4E, 0x52, 0x60, 0x02}},
+ },
+ },
+ /* CIF */
+ {
+ /* 5 fps */
+ {
+ {6, 771, 0, {0x15, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x3F, 0x80, 0x02}},
+ {4, 465, 1278, {0x15, 0xF4, 0x05, 0x27, 0xEE, 0x26, 0x36, 0x03, 0x18, 0xD1, 0x65, 0x80, 0x02}},
+ {2, 291, 800, {0x15, 0xF4, 0x15, 0x18, 0xF4, 0x17, 0x3C, 0x05, 0x18, 0x23, 0xA1, 0x80, 0x02}},
+ {1, 193, 528, {0x15, 0xF4, 0x2D, 0x10, 0x7E, 0x0E, 0xC6, 0x0A, 0x18, 0xC1, 0xF4, 0x80, 0x02}},
+ },
+ /* 10 fps */
+ {
+ {0, },
+ {9, 932, 1278, {0x14, 0xF4, 0x05, 0x27, 0xEE, 0x26, 0x36, 0x04, 0x30, 0xA4, 0x33, 0x10, 0x02}},
+ {4, 591, 812, {0x14, 0xF4, 0x15, 0x19, 0x56, 0x17, 0x9E, 0x06, 0x28, 0x4F, 0x4E, 0x10, 0x02}},
+ {2, 291, 400, {0x14, 0xF4, 0x3D, 0x0C, 0x7A, 0x0A, 0xC2, 0x0E, 0x28, 0x23, 0xA1, 0x10, 0x02}},
+ },
+ /* 15 fps */
+ {
+ {0, },
+ {9, 956, 876, {0x13, 0xF4, 0x0D, 0x1B, 0x58, 0x19, 0xA0, 0x05, 0x38, 0xBC, 0x33, 0x60, 0x02}},
+ {5, 703, 644, {0x13, 0xF4, 0x1D, 0x14, 0x1C, 0x12, 0x64, 0x08, 0x38, 0xBF, 0x42, 0x60, 0x02}},
+ {3, 448, 410, {0x13, 0xF4, 0x3D, 0x0C, 0xC4, 0x0B, 0x0C, 0x0E, 0x38, 0xC0, 0x69, 0x60, 0x02}},
+ },
+ /* 20 fps */
+ {
+ {0, },
+ {9, 956, 650, {0x12, 0xF4, 0x1D, 0x14, 0x4A, 0x12, 0x92, 0x09, 0x48, 0xBC, 0x33, 0x10, 0x03}},
+ {6, 776, 528, {0x12, 0xF4, 0x2D, 0x10, 0x7E, 0x0E, 0xC6, 0x0A, 0x40, 0x08, 0x3F, 0x10, 0x03}},
+ {4, 591, 402, {0x12, 0xF4, 0x3D, 0x0C, 0x8F, 0x0A, 0xD7, 0x0E, 0x40, 0x4F, 0x4E, 0x10, 0x03}},
+ },
+ /* 25 fps */
+ {
+ {0, },
+ {9, 956, 544, {0x11, 0xF4, 0x25, 0x10, 0xF4, 0x0F, 0x3C, 0x0A, 0x48, 0xBC, 0x33, 0xC0, 0x02}},
+ {7, 840, 478, {0x11, 0xF4, 0x2D, 0x0E, 0xEB, 0x0D, 0x33, 0x0B, 0x48, 0x48, 0x3B, 0xC0, 0x02}},
+ {5, 703, 400, {0x11, 0xF4, 0x3D, 0x0C, 0x7A, 0x0A, 0xC2, 0x0E, 0x48, 0xBF, 0x42, 0xC0, 0x02}},
+ },
+ /* 30 fps */
+ {
+ {0, },
+ {9, 956, 438, {0x10, 0xF4, 0x35, 0x0D, 0xAC, 0x0B, 0xF4, 0x0D, 0x50, 0xBC, 0x33, 0x10, 0x02}},
+ {7, 838, 384, {0x10, 0xF4, 0x45, 0x0B, 0xFD, 0x0A, 0x45, 0x0F, 0x50, 0x46, 0x3B, 0x10, 0x02}},
+ {6, 773, 354, {0x10, 0x7A, 0x4B, 0x0B, 0x0C, 0x09, 0x80, 0x10, 0x50, 0x05, 0x3F, 0x10, 0x02}},
+ },
+ },
+ /* VGA */
+ {
+ /* 5 fps */
+ {
+ {0, },
+ {6, 773, 1272, {0x1D, 0xF4, 0x15, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x3F, 0x10, 0x02}},
+ {4, 592, 976, {0x1D, 0xF4, 0x25, 0x1E, 0x78, 0x1B, 0x58, 0x03, 0x30, 0x50, 0x4E, 0x10, 0x02}},
+ {3, 448, 738, {0x1D, 0xF4, 0x3D, 0x17, 0x0C, 0x13, 0xEC, 0x04, 0x30, 0xC0, 0x69, 0x10, 0x02}},
+ },
+ /* 10 fps */
+ {
+ {0, },
+ {9, 956, 788, {0x1C, 0xF4, 0x35, 0x18, 0x9C, 0x15, 0x7C, 0x03, 0x48, 0xBC, 0x33, 0x10, 0x02}},
+ {6, 776, 640, {0x1C, 0x7A, 0x53, 0x13, 0xFC, 0x11, 0x2C, 0x04, 0x48, 0x08, 0x3F, 0x10, 0x02}},
+ {4, 592, 488, {0x1C, 0x7A, 0x6B, 0x0F, 0x3C, 0x0C, 0x6C, 0x06, 0x48, 0x50, 0x4E, 0x10, 0x02}},
+ },
+ /* 15 fps */
+ {
+ {0, },
+ {9, 957, 526, {0x1B, 0x7A, 0x63, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x33, 0x80, 0x02}},
+ {9, 957, 526, {0x1B, 0x7A, 0x63, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x33, 0x80, 0x02}},
+ {8, 895, 492, {0x1B, 0x7A, 0x6B, 0x0F, 0x5D, 0x0C, 0x8D, 0x06, 0x58, 0x7F, 0x37, 0x80, 0x02}},
+ },
+ /* 20 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 25 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ /* 30 fps */
+ {
+ {0, },
+ {0, },
+ {0, },
+ {0, },
+ },
+ },
+};
+
+/*
+ * 16 versions:
+ * 2 tables (one for Y, and one for U&V)
+ * 16 levels of details per tables
+ * 8 blocs
+ */
+
+const unsigned int TimonRomTable [16][2][16][8] =
+{
+ { /* version 0 */
+ { /* version 0, passes 0 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000001},
+ {0x00000000,0x00000000,0x00000001,0x00000001,
+ 0x00000001,0x00000001,0x00000001,0x00000001},
+ {0x00000000,0x00000000,0x00000001,0x00000001,
+ 0x00000001,0x00000009,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000009,0x00000001,
+ 0x00000009,0x00000009,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000009,0x00000049,0x00000009},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000009,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000249,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000249,0x00000249,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000249,0x0000124a,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x00000249,0x0000124a,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x0000124a,0x00009252,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 0, passes 1 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000001,0x00000001,
+ 0x00000001,0x00000001,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000009,0x00000001,
+ 0x00000001,0x00000009,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000009,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000009,0x00000001,0x00000000},
+ {0x00000000,0x00000000,0x00000049,0x00000009,
+ 0x00000009,0x00000049,0x00000001,0x00000001},
+ {0x00000000,0x00000000,0x00000049,0x00000009,
+ 0x00000009,0x00000049,0x00000001,0x00000001},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000009,0x00000001},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000009,0x00000001},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000009,0x00000001},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000249,0x00000049,0x00000009},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000249,0x00000049,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000049,
+ 0x00000249,0x00000249,0x00000049,0x00000009},
+ {0x00000000,0x00000000,0x00001249,0x00000249,
+ 0x0000124a,0x0000124a,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 1 */
+ { /* version 1, passes 0 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000001},
+ {0x00000000,0x00000000,0x00000001,0x00000001,
+ 0x00000001,0x00000009,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000009,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000009,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000249,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00001252},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x00000249,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x0000124a,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x0000124a,0x00009252,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009252,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009292,0x00009493,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x0000a49b,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 1, passes 1 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000001,0x00000001,0x00000000},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000009,0x00000001,0x00000000},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000009,0x00000001,0x00000000},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000001,0x00000001},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000009,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000049,
+ 0x00000049,0x00000249,0x00000009,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000049,
+ 0x00000249,0x00000249,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x00000049,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x00000049,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x00000049,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009252,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 2 */
+ { /* version 2, passes 0 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000001},
+ {0x00000000,0x00000000,0x00000009,0x00000009,
+ 0x00000009,0x00000009,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00001252},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x0000124a,0x00009252,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009292,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009252,0x00009493,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009292,0x00009493,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x00009252,
+ 0x00009492,0x00009493,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x000124db,0x000124db,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000126dc,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 2, passes 1 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000049,0x00000009,
+ 0x00000049,0x00000009,0x00000001,0x00000000},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000000},
+ {0x00000000,0x00000000,0x00000249,0x00000049,
+ 0x00000249,0x00000049,0x0000024a,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x0000024a,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x0000024a,0x00000009},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00009252,0x00001252,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00009292,0x00001252,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00009292,0x00001252,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009292,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x0000924a,0x0000924a,
+ 0x00009492,0x00009493,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 3 */
+ { /* version 3, passes 0 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000001},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000049,0x00000249,
+ 0x00000249,0x00000249,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x00009252,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x0000124a,0x00009292,0x00009292,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009292,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009292,0x00009493,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x00009252,
+ 0x00009292,0x00009493,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009292,0x0000a49b,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x0000a49b,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x000124db,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x0000a49b,0x000124db,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0001249b,0x000126dc,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000136e4,0x0001b725,0x000136e4},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 3, passes 1 */
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000},
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000001,0x00000000},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x00000049,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x00001252,0x00000001},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x00001252,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x0000124a,0x00009252,0x00009292,0x00000009},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00009252,0x00009292,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009252,0x00009292,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009493,0x00009292,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009493,0x00009292,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009493,0x00009493,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009292,0x00009493,0x00009493,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x00009493,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x0000a49b,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x00009292,
+ 0x0000a493,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 4 */
+ { /* version 4, passes 0 */
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x00001252,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x00009252,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x0000124a,0x00009292,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009493,0x00009493,0x0000a49b},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009292,0x00009493,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009292,0x00009493,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x0000a49b,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x000124db,0x000124db,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x000124db,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0001249b,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000136e4,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x00009252,0x000124db,
+ 0x000126dc,0x0001b724,0x0001b725,0x0001b925},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 4, passes 1 */
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00000249,
+ 0x0000124a,0x0000124a,0x00001252,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00009292,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x0000a49b,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x0000a49b,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x0000a49b,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x00009252,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 5 */
+ { /* version 5, passes 0 */
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x0000124a,0x00001252,0x00009292},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x0000124a,0x00009292,0x00009292,0x00009493},
+ {0x00000000,0x00000000,0x00000249,0x0000924a,
+ 0x00009292,0x00009493,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009292,0x00009493,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x0000a49b,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x000124db,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x000124db,0x000124db,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0001249b,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0001249b,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0001249b,0x000126dc,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000126dc,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x000136e4,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b724,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 5, passes 1 */
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x00009493,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x00009493,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x0000a49b,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x00009493,0x000124db,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x00009493,0x000124db,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x000124db,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x000124db,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009252,0x000124db,
+ 0x000126dc,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 6 */
+ { /* version 6, passes 0 */
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x0000124a,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x0000a49b,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x000124db,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0001249b,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000136e4,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000136e4,0x0001b725,0x0001b925},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x000136e4,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x000136e4,0x0001b925,0x00025bb6,0x00024b77},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 6, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00000249,
+ 0x0000124a,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x00009493,0x0000a49b,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x000126dc,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00009492,0x0000a49b,
+ 0x000136e4,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001b724,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 7 */
+ { /* version 7, passes 0 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x0000a49b,0x000124db,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0001249b,0x000126dc,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000136e4,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x0001b725,0x0001b925},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x00009292,0x000124db,
+ 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b724,0x0001c96e,0x0002496e},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x000136e4,0x0001b925,0x0001c96e,0x0002496e},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x0002496d,0x00025bb6,0x00025bbf},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 7, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x00009493,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x000124db,0x000136e4,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x000124db,0x000136e4,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000124db,0x000136e4,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x000136e4,0x0001b724,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00012492,0x000126db,
+ 0x0001b724,0x0001b925,0x0001b725,0x000136e4},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 8 */
+ { /* version 8, passes 0 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009292,0x00009493,0x0000a49b,0x000124db},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x000124db,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x000136e4},
+ {0x00000000,0x00000000,0x00001249,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000136e4,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x0001b725,0x0001b925},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d},
+ {0x00000000,0x00000000,0x00009252,0x000124db,
+ 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d},
+ {0x00000000,0x00000000,0x00009292,0x000124db,
+ 0x000126dc,0x0001b925,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b925,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b925,0x00024b76,0x00024b77},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x000136e4,0x0001b925,0x00024b76,0x00025bbf},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x000136e4,0x0001c92d,0x00024b76,0x00025bbf},
+ {0x00000000,0x00000000,0x00012492,0x000136db,
+ 0x0001b724,0x00024b6d,0x0002ddb6,0x0002efff},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 8, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009493,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x000124db,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000126dc,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000136e4,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00009292,0x000124db,
+ 0x000136e4,0x0001b724,0x0001b725,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x000136e4,0x0001b925,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x000136e4,0x0001b925,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x0002496d,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 9 */
+ { /* version 9, passes 0 */
+ {0x00000000,0x00000000,0x00000049,0x00000049,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00000249,0x00000049,
+ 0x00000249,0x00000249,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x0000124a,0x00009252,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009493,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009292,0x00009493,0x00009493,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0001249b,0x000126dc,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00009252,0x00009493,
+ 0x000124db,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009252,0x0000a49b,
+ 0x000124db,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x000136e4,0x0001b925,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 9, passes 1 */
+ {0x00000000,0x00000000,0x00000249,0x00000049,
+ 0x00000009,0x00000009,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000049,0x00000049,0x00000009,0x00000009},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00000249,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x0000124a,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009252,0x0000124a,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x00009252,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x00009292,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x00009292,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x00009493,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000124db,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009252,0x000124db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 10 */
+ { /* version 10, passes 0 */
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00000249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x00009493,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x000124db,0x000124db,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0001249b,0x000126dc,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000126dc,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009252,0x0000a49b,
+ 0x000124db,0x000136e4,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b92d,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000126dc,0x0001b925,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x000136e4,0x0002496d,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 10, passes 1 */
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000049,0x00000049,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00000249,0x00000049,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x00009252,0x0000024a,0x00000049},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009493,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00009252,
+ 0x00009492,0x00009493,0x00001252,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x00009493,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x00009492,0x00009493,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x00009493,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009252,0x000126db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 11 */
+ { /* version 11, passes 0 */
+ {0x00000000,0x00000000,0x00000249,0x00000249,
+ 0x00000249,0x00000249,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009492,0x0000a49b,0x0000a49b,0x00009292},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x000124db,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000126dc,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b725,0x000136e4},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b92d,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b92d,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b925,0x0001c96e,0x0001b925},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001c924,0x0002496d,0x00025bb6,0x00024b77},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 11, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00000249,
+ 0x00000249,0x00000249,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009252,0x00009252,0x0000024a,0x0000024a},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x0000a49b,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x0000a49b,0x00009292,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000124db,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000124db,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000126dc,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009292,0x000124db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 12 */
+ { /* version 12, passes 0 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x0000a493,0x0000a49b,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x000126dc,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b725,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b92d,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b92d,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b724,0x0001b92d,0x0001b724},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b925,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001c92d,0x0001c96e,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001c92d,0x00024b76,0x0002496e},
+ {0x00000000,0x00000000,0x00012492,0x000126db,
+ 0x0001c924,0x00024b6d,0x0002ddb6,0x00025bbf},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 12, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x00001249,0x00009292,
+ 0x00009492,0x00009252,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x00009292,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x0000a49b,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000124db,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000124db,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000126dc,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x000136e4,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00009492,0x000126db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001c924,0x0001b724,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 13 */
+ { /* version 13, passes 0 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x00009252,0x00009292,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x000124db,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000126dc,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x000136e4,0x0001b725,0x000124db},
+ {0x00000000,0x00000000,0x00009292,0x0000a49b,
+ 0x000136e4,0x0001b724,0x0001b725,0x000126dc},
+ {0x00000000,0x00000000,0x00009292,0x000124db,
+ 0x000136e4,0x0001b724,0x0001b725,0x000126dc},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b724,0x0001c96e,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001c92d,0x0001c96e,0x0001b925},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b924,0x0001c92d,0x00024b76,0x0002496e},
+ {0x00000000,0x00000000,0x00012492,0x000136db,
+ 0x00024924,0x00024b6d,0x0002ddb6,0x00025bbf},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 13, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x00009492,0x00009292,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x0000a49b,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000124db,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000136db,
+ 0x0001b724,0x000124db,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000136db,
+ 0x0001b724,0x000126dc,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00009292,0x000136db,
+ 0x0001b724,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x00009492,0x000136db,
+ 0x0001b724,0x000126dc,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00012492,0x0001b6db,
+ 0x0001c924,0x0001b724,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 14 */
+ { /* version 14, passes 0 */
+ {0x00000000,0x00000000,0x00001249,0x0000924a,
+ 0x00009292,0x00009493,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00001249,0x0000a49b,
+ 0x0000a493,0x000124db,0x000126dc,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x0000a49b},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x000136e4,0x0001b725,0x000124db},
+ {0x00000000,0x00000000,0x00009292,0x000124db,
+ 0x000126dc,0x0001b724,0x0001b92d,0x000126dc},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b724,0x0001b92d,0x000126dc},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001c92d,0x0001c96e,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x0001b724,0x0001c92d,0x0001c96e,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001c92d,0x00024b76,0x0001b925},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x0001c92d,0x00024b76,0x0002496e},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b924,0x0002496d,0x00024b76,0x00024b77},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b924,0x00024b6d,0x0002ddb6,0x00025bbf},
+ {0x00000000,0x00000000,0x00012492,0x0001b6db,
+ 0x00024924,0x0002db6d,0x00036db6,0x0002efff},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 14, passes 1 */
+ {0x00000000,0x00000000,0x00001249,0x00001249,
+ 0x0000124a,0x0000124a,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x00009493,
+ 0x0000a493,0x00009292,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x0000a49b,0x00001252,0x00001252},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000136e4,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000136e4,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x000136e4,0x00009493,0x00009292},
+ {0x00000000,0x00000000,0x00009492,0x000136db,
+ 0x0001b724,0x000136e4,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x00009492,0x000136db,
+ 0x0001b724,0x000136e4,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x00009492,0x000136db,
+ 0x0001b724,0x000136e4,0x0000a49b,0x00009493},
+ {0x00000000,0x00000000,0x00009492,0x000136db,
+ 0x0001b724,0x000136e4,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x000136e4,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x000136e4,0x000124db,0x0000a49b},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b724,0x000136e4,0x000126dc,0x000124db},
+ {0x00000000,0x00000000,0x00012492,0x0001b6db,
+ 0x0001c924,0x0001b724,0x000136e4,0x000126dc},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ },
+ { /* version 15 */
+ { /* version 15, passes 0 */
+ {0x00000000,0x00000000,0x00001249,0x00009493,
+ 0x0000a493,0x0000a49b,0x000124db,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0001249b,0x000126dc,0x000136e4,0x000124db},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x000126dc,0x0001b724,0x0001b725,0x000126dc},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x0001b724,0x0001b92d,0x000126dc},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x000136e4,0x0001b925,0x0001c96e,0x000136e4},
+ {0x00000000,0x00000000,0x00009492,0x000124db,
+ 0x0001b724,0x0001c92d,0x0001c96e,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000124db,
+ 0x0001b724,0x0001c92d,0x0001c96e,0x0001b724},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b724,0x0001c92d,0x0001c96e,0x0001b925},
+ {0x00000000,0x00000000,0x0000a492,0x000126db,
+ 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001b924,0x0002496d,0x00024b76,0x0002496e},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001c924,0x0002496d,0x00025bb6,0x00024b77},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001c924,0x00024b6d,0x00025bb6,0x00024b77},
+ {0x00000000,0x00000000,0x00012492,0x000136db,
+ 0x0001c924,0x00024b6d,0x0002ddb6,0x00025bbf},
+ {0x00000000,0x00000000,0x00012492,0x0001b6db,
+ 0x00024924,0x0002db6d,0x00036db6,0x0002efff},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ },
+ { /* version 15, passes 1 */
+ {0x00000000,0x00000000,0x0000924a,0x0000924a,
+ 0x00009292,0x00009292,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x0000a49b,
+ 0x0000a493,0x000124db,0x00009292,0x00009292},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000124db,0x0001b724,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000126dc,0x0001b724,0x00009493,0x00009493},
+ {0x00000000,0x00000000,0x0000924a,0x000124db,
+ 0x000136e4,0x0001b724,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00009292,0x000136db,
+ 0x0001b724,0x0001b724,0x0000a49b,0x0000a49b},
+ {0x00000000,0x00000000,0x00009492,0x000136db,
+ 0x0001c924,0x0001b724,0x000124db,0x000124db},
+ {0x00000000,0x00000000,0x00009492,0x000136db,
+ 0x0001c924,0x0001b724,0x000124db,0x000124db},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001c924,0x0001b724,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001c924,0x0001b925,0x000126dc,0x000126dc},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001c924,0x0001b925,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001c924,0x0001b925,0x000136e4,0x000136e4},
+ {0x00000000,0x00000000,0x0000a492,0x000136db,
+ 0x0001c924,0x0001b925,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x00012492,0x000136db,
+ 0x0001c924,0x0001b925,0x0001b725,0x0001b724},
+ {0x00000000,0x00000000,0x00012492,0x0001b6db,
+ 0x00024924,0x0002496d,0x0001b92d,0x0001b925},
+ {0x00000000,0x00000000,0x00000000,0x00000000,
+ 0x00000000,0x00000000,0x00000000,0x00000000}
+ }
+ }
+};
diff --git a/drivers/usb/media/pwc/pwc-timon.h b/drivers/usb/media/pwc/pwc-timon.h
new file mode 100644
index 000000000000..a86b3782a081
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-timon.h
@@ -0,0 +1,61 @@
+/* Linux driver for Philips webcam
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+
+
+/* This tables contains entries for the 675/680/690 (Timon) camera, with
+ 4 different qualities (no compression, low, medium, high).
+ It lists the bandwidth requirements for said mode by its alternate interface
+ number. An alternate of 0 means that the mode is unavailable.
+
+ There are 6 * 4 * 4 entries:
+ 6 different resolutions subqcif, qsif, qcif, sif, cif, vga
+ 6 framerates: 5, 10, 15, 20, 25, 30
+ 4 compression modi: none, low, medium, high
+
+ When an uncompressed mode is not available, the next available compressed mode
+ will be chosen (unless the decompressor is absent). Sometimes there are only
+ 1 or 2 compressed modes available; in that case entries are duplicated.
+*/
+
+#ifndef PWC_TIMON_H
+#define PWC_TIMON_H
+
+#include "pwc-ioctl.h"
+
+struct Timon_table_entry
+{
+ char alternate; /* USB alternate interface */
+ unsigned short packetsize; /* Normal packet size */
+ unsigned short bandlength; /* Bandlength when decompressing */
+ unsigned char mode[13]; /* precomputed mode settings for cam */
+};
+
+const extern struct Timon_table_entry Timon_table[PSZ_MAX][6][4];
+const extern unsigned int TimonRomTable [16][2][16][8];
+
+
+#endif
+
+
diff --git a/drivers/usb/media/pwc/pwc-uncompress.c b/drivers/usb/media/pwc/pwc-uncompress.c
new file mode 100644
index 000000000000..c062e43b3ac5
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-uncompress.c
@@ -0,0 +1,147 @@
+/* Linux driver for Philips webcam
+ Decompression frontend.
+ (C) 1999-2003 Nemosoft Unv.
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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 <asm/current.h>
+#include <asm/types.h>
+
+#include "pwc.h"
+#include "pwc-uncompress.h"
+#include "pwc-dec1.h"
+#include "pwc-dec23.h"
+
+int pwc_decompress(struct pwc_device *pdev)
+{
+ struct pwc_frame_buf *fbuf;
+ int n, line, col, stride;
+ void *yuv, *image;
+ u16 *src;
+ u16 *dsty, *dstu, *dstv;
+
+ if (pdev == NULL)
+ return -EFAULT;
+#if defined(__KERNEL__) && defined(PWC_MAGIC)
+ if (pdev->magic != PWC_MAGIC) {
+ Err("pwc_decompress(): magic failed.\n");
+ return -EFAULT;
+ }
+#endif
+
+ fbuf = pdev->read_frame;
+ if (fbuf == NULL)
+ return -EFAULT;
+ image = pdev->image_ptr[pdev->fill_image];
+ if (!image)
+ return -EFAULT;
+
+ yuv = fbuf->data + pdev->frame_header_size; /* Skip header */
+
+ /* Raw format; that's easy... */
+ if (pdev->vpalette == VIDEO_PALETTE_RAW)
+ {
+ memcpy(image, yuv, pdev->frame_size);
+ return 0;
+ }
+
+ if (pdev->vbandlength == 0) {
+ /* Uncompressed mode. We copy the data into the output buffer,
+ using the viewport size (which may be larger than the image
+ size). Unfortunately we have to do a bit of byte stuffing
+ to get the desired output format/size.
+ */
+ /*
+ * We do some byte shuffling here to go from the
+ * native format to YUV420P.
+ */
+ src = (u16 *)yuv;
+ n = pdev->view.x * pdev->view.y;
+
+ /* offset in Y plane */
+ stride = pdev->view.x * pdev->offset.y + pdev->offset.x;
+ dsty = (u16 *)(image + stride);
+
+ /* offsets in U/V planes */
+ stride = pdev->view.x * pdev->offset.y / 4 + pdev->offset.x / 2;
+ dstu = (u16 *)(image + n + stride);
+ dstv = (u16 *)(image + n + n / 4 + stride);
+
+ /* increment after each line */
+ stride = (pdev->view.x - pdev->image.x) / 2; /* u16 is 2 bytes */
+
+ for (line = 0; line < pdev->image.y; line++) {
+ for (col = 0; col < pdev->image.x; col += 4) {
+ *dsty++ = *src++;
+ *dsty++ = *src++;
+ if (line & 1)
+ *dstv++ = *src++;
+ else
+ *dstu++ = *src++;
+ }
+ dsty += stride;
+ if (line & 1)
+ dstv += (stride >> 1);
+ else
+ dstu += (stride >> 1);
+ }
+ }
+ else {
+ /* Compressed; the decompressor routines will write the data
+ in planar format immediately.
+ */
+ int flags;
+
+ flags = PWCX_FLAG_PLANAR;
+ if (pdev->vsize == PSZ_VGA && pdev->vframes == 5 && pdev->vsnapshot)
+ {
+ printk(KERN_ERR "pwc: Mode Bayer is not supported for now\n");
+ flags |= PWCX_FLAG_BAYER;
+ return -ENXIO; /* No such device or address: missing decompressor */
+ }
+
+ switch (pdev->type)
+ {
+ case 675:
+ case 680:
+ case 690:
+ case 720:
+ case 730:
+ case 740:
+ case 750:
+ pwc_dec23_decompress(&pdev->image, &pdev->view, &pdev->offset,
+ yuv, image,
+ flags,
+ pdev->decompress_data, pdev->vbandlength);
+ break;
+ case 645:
+ case 646:
+ /* TODO & FIXME */
+ return -ENXIO; /* No such device or address: missing decompressor */
+ break;
+ }
+ }
+ return 0;
+}
+
+
diff --git a/drivers/usb/media/pwc/pwc-uncompress.h b/drivers/usb/media/pwc/pwc-uncompress.h
new file mode 100644
index 000000000000..d3b9250e4ed3
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc-uncompress.h
@@ -0,0 +1,41 @@
+/* (C) 1999-2003 Nemosoft Unv.
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+/* This file is the bridge between the kernel module and the plugin; it
+ describes the structures and datatypes used in both modules. Any
+ significant change should be reflected by increasing the
+ pwc_decompressor_version major number.
+ */
+#ifndef PWC_UNCOMPRESS_H
+#define PWC_UNCOMPRESS_H
+
+#include <linux/config.h>
+
+#include "pwc-ioctl.h"
+
+/* from pwc-dec.h */
+#define PWCX_FLAG_PLANAR 0x0001
+/* */
+
+#endif
diff --git a/drivers/usb/media/pwc/pwc.h b/drivers/usb/media/pwc/pwc.h
new file mode 100644
index 000000000000..53b516d29cf5
--- /dev/null
+++ b/drivers/usb/media/pwc/pwc.h
@@ -0,0 +1,278 @@
+/* (C) 1999-2003 Nemosoft Unv.
+ (C) 2004 Luc Saillard (luc@saillard.org)
+
+ NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
+ driver and thus may have bugs that are not present in the original version.
+ Please send bug reports and support requests to <luc@saillard.org>.
+ The decompression routines have been implemented by reverse-engineering the
+ Nemosoft binary pwcx module. Caveat emptor.
+
+ 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
+*/
+
+#ifndef PWC_H
+#define PWC_H
+
+#include <linux/version.h>
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include <linux/spinlock.h>
+#include <linux/videodev.h>
+#include <linux/wait.h>
+#include <linux/smp_lock.h>
+#include <asm/semaphore.h>
+#include <asm/errno.h>
+
+#include "pwc-uncompress.h"
+#include "pwc-ioctl.h"
+
+/* Defines and structures for the Philips webcam */
+/* Used for checking memory corruption/pointer validation */
+#define PWC_MAGIC 0x89DC10ABUL
+#undef PWC_MAGIC
+
+/* Turn some debugging options on/off */
+#define PWC_DEBUG 0
+
+/* Trace certain actions in the driver */
+#define TRACE_MODULE 0x0001
+#define TRACE_PROBE 0x0002
+#define TRACE_OPEN 0x0004
+#define TRACE_READ 0x0008
+#define TRACE_MEMORY 0x0010
+#define TRACE_FLOW 0x0020
+#define TRACE_SIZE 0x0040
+#define TRACE_PWCX 0x0080
+#define TRACE_SEQUENCE 0x1000
+
+#define Trace(R, A...) if (pwc_trace & R) printk(KERN_DEBUG PWC_NAME " " A)
+#define Debug(A...) printk(KERN_DEBUG PWC_NAME " " A)
+#define Info(A...) printk(KERN_INFO PWC_NAME " " A)
+#define Err(A...) printk(KERN_ERR PWC_NAME " " A)
+
+
+/* Defines for ToUCam cameras */
+#define TOUCAM_HEADER_SIZE 8
+#define TOUCAM_TRAILER_SIZE 4
+
+#define FEATURE_MOTOR_PANTILT 0x0001
+
+/* Version block */
+#define PWC_MAJOR 9
+#define PWC_MINOR 0
+#define PWC_VERSION "9.0.2-unofficial"
+#define PWC_NAME "pwc"
+
+/* Turn certain features on/off */
+#define PWC_INT_PIPE 0
+
+/* Ignore errors in the first N frames, to allow for startup delays */
+#define FRAME_LOWMARK 5
+
+/* Size and number of buffers for the ISO pipe. */
+#define MAX_ISO_BUFS 2
+#define ISO_FRAMES_PER_DESC 10
+#define ISO_MAX_FRAME_SIZE 960
+#define ISO_BUFFER_SIZE (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE)
+
+/* Frame buffers: contains compressed or uncompressed video data. */
+#define MAX_FRAMES 5
+/* Maximum size after decompression is 640x480 YUV data, 1.5 * 640 * 480 */
+#define PWC_FRAME_SIZE (460800 + TOUCAM_HEADER_SIZE + TOUCAM_TRAILER_SIZE)
+
+/* Absolute maximum number of buffers available for mmap() */
+#define MAX_IMAGES 10
+
+/* The following structures were based on cpia.h. Why reinvent the wheel? :-) */
+struct pwc_iso_buf
+{
+ void *data;
+ int length;
+ int read;
+ struct urb *urb;
+};
+
+/* intermediate buffers with raw data from the USB cam */
+struct pwc_frame_buf
+{
+ void *data;
+ volatile int filled; /* number of bytes filled */
+ struct pwc_frame_buf *next; /* list */
+#if PWC_DEBUG
+ int sequence; /* Sequence number */
+#endif
+};
+
+struct pwc_device
+{
+ struct video_device *vdev;
+#ifdef PWC_MAGIC
+ int magic;
+#endif
+ /* Pointer to our usb_device */
+ struct usb_device *udev;
+
+ int type; /* type of cam (645, 646, 675, 680, 690, 720, 730, 740, 750) */
+ int release; /* release number */
+ int features; /* feature bits */
+ char serial[30]; /* serial number (string) */
+ int error_status; /* set when something goes wrong with the cam (unplugged, USB errors) */
+ int usb_init; /* set when the cam has been initialized over USB */
+
+ /*** Video data ***/
+ int vopen; /* flag */
+ int vendpoint; /* video isoc endpoint */
+ int vcinterface; /* video control interface */
+ int valternate; /* alternate interface needed */
+ int vframes, vsize; /* frames-per-second & size (see PSZ_*) */
+ int vpalette; /* palette: 420P, RAW or RGBBAYER */
+ int vframe_count; /* received frames */
+ int vframes_dumped; /* counter for dumped frames */
+ int vframes_error; /* frames received in error */
+ int vmax_packet_size; /* USB maxpacket size */
+ int vlast_packet_size; /* for frame synchronisation */
+ int visoc_errors; /* number of contiguous ISOC errors */
+ int vcompression; /* desired compression factor */
+ int vbandlength; /* compressed band length; 0 is uncompressed */
+ char vsnapshot; /* snapshot mode */
+ char vsync; /* used by isoc handler */
+ char vmirror; /* for ToUCaM series */
+
+ int cmd_len;
+ unsigned char cmd_buf[13];
+
+ /* The image acquisition requires 3 to 4 steps:
+ 1. data is gathered in short packets from the USB controller
+ 2. data is synchronized and packed into a frame buffer
+ 3a. in case data is compressed, decompress it directly into image buffer
+ 3b. in case data is uncompressed, copy into image buffer with viewport
+ 4. data is transferred to the user process
+
+ Note that MAX_ISO_BUFS != MAX_FRAMES != MAX_IMAGES....
+ We have in effect a back-to-back-double-buffer system.
+ */
+ /* 1: isoc */
+ struct pwc_iso_buf sbuf[MAX_ISO_BUFS];
+ char iso_init;
+
+ /* 2: frame */
+ struct pwc_frame_buf *fbuf; /* all frames */
+ struct pwc_frame_buf *empty_frames, *empty_frames_tail; /* all empty frames */
+ struct pwc_frame_buf *full_frames, *full_frames_tail; /* all filled frames */
+ struct pwc_frame_buf *fill_frame; /* frame currently being filled */
+ struct pwc_frame_buf *read_frame; /* frame currently read by user process */
+ int frame_header_size, frame_trailer_size;
+ int frame_size;
+ int frame_total_size; /* including header & trailer */
+ int drop_frames;
+#if PWC_DEBUG
+ int sequence; /* Debugging aid */
+#endif
+
+ /* 3: decompression */
+ struct pwc_decompressor *decompressor; /* function block with decompression routines */
+ void *decompress_data; /* private data for decompression engine */
+
+ /* 4: image */
+ /* We have an 'image' and a 'view', where 'image' is the fixed-size image
+ as delivered by the camera, and 'view' is the size requested by the
+ program. The camera image is centered in this viewport, laced with
+ a gray or black border. view_min <= image <= view <= view_max;
+ */
+ int image_mask; /* bitmask of supported sizes */
+ struct pwc_coord view_min, view_max; /* minimum and maximum viewable sizes */
+ struct pwc_coord abs_max; /* maximum supported size with compression */
+ struct pwc_coord image, view; /* image and viewport size */
+ struct pwc_coord offset; /* offset within the viewport */
+
+ void *image_data; /* total buffer, which is subdivided into ... */
+ void *image_ptr[MAX_IMAGES]; /* ...several images... */
+ int fill_image; /* ...which are rotated. */
+ int len_per_image; /* length per image */
+ int image_read_pos; /* In case we read data in pieces, keep track of were we are in the imagebuffer */
+ int image_used[MAX_IMAGES]; /* For MCAPTURE and SYNC */
+
+ struct semaphore modlock; /* to prevent races in video_open(), etc */
+ spinlock_t ptrlock; /* for manipulating the buffer pointers */
+
+ /*** motorized pan/tilt feature */
+ struct pwc_mpt_range angle_range;
+ int pan_angle; /* in degrees * 100 */
+ int tilt_angle; /* absolute angle; 0,0 is home position */
+
+ /*** Misc. data ***/
+ wait_queue_head_t frameq; /* When waiting for a frame to finish... */
+#if PWC_INT_PIPE
+ void *usb_int_handler; /* for the interrupt endpoint */
+#endif
+};
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Global variables */
+extern int pwc_trace;
+extern int pwc_preferred_compression;
+
+/** functions in pwc-if.c */
+int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot);
+
+/** Functions in pwc-misc.c */
+/* sizes in pixels */
+extern struct pwc_coord pwc_image_sizes[PSZ_MAX];
+
+int pwc_decode_size(struct pwc_device *pdev, int width, int height);
+void pwc_construct(struct pwc_device *pdev);
+
+/** Functions in pwc-ctrl.c */
+/* Request a certain video mode. Returns < 0 if not possible */
+extern int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot);
+/* Calculate the number of bytes per image (not frame) */
+extern void pwc_set_image_buffer_size(struct pwc_device *pdev);
+
+/* Various controls; should be obvious. Value 0..65535, or < 0 on error */
+extern int pwc_get_brightness(struct pwc_device *pdev);
+extern int pwc_set_brightness(struct pwc_device *pdev, int value);
+extern int pwc_get_contrast(struct pwc_device *pdev);
+extern int pwc_set_contrast(struct pwc_device *pdev, int value);
+extern int pwc_get_gamma(struct pwc_device *pdev);
+extern int pwc_set_gamma(struct pwc_device *pdev, int value);
+extern int pwc_get_saturation(struct pwc_device *pdev);
+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, int *sensor);
+
+/* Power down or up the camera; not supported by all models */
+extern int pwc_camera_power(struct pwc_device *pdev, int power);
+
+/* Private ioctl()s; see pwc-ioctl.h */
+extern int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg);
+
+
+/** pwc-uncompress.c */
+/* Expand frame to image, possibly including decompression. Uses read_frame and fill_image */
+extern int pwc_decompress(struct pwc_device *pdev);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/drivers/usb/media/se401.c b/drivers/usb/media/se401.c
new file mode 100644
index 000000000000..685bdae5cb62
--- /dev/null
+++ b/drivers/usb/media/se401.c
@@ -0,0 +1,1436 @@
+/*
+ * Endpoints (formerly known as AOX) se401 USB Camera Driver
+ *
+ * Copyright (c) 2000 Jeroen B. Vreeken (pe1rxq@amsat.org)
+ *
+ * Still somewhat based on the Linux ov511 driver.
+ *
+ * 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.
+ *
+ *
+ * Thanks to Endpoints Inc. (www.endpoints.com) for making documentation on
+ * their chipset available and supporting me while writing this driver.
+ * - Jeroen Vreeken
+ */
+
+static const char version[] = "0.24";
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+#include <linux/pagemap.h>
+#include <linux/usb.h>
+#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 */
+ { USB_DEVICE(0x047d, 0x5002) },/* Kensington 6701(5/7) */
+ { USB_DEVICE(0x047d, 0x5003) },/* Kensington 67016 */
+ { }
+};
+
+MODULE_DEVICE_TABLE(usb, device_table);
+
+MODULE_AUTHOR("Jeroen Vreeken <pe1rxq@amsat.org>");
+MODULE_DESCRIPTION("SE401 USB Camera Driver");
+MODULE_LICENSE("GPL");
+module_param(flickerless, int, 0);
+MODULE_PARM_DESC(flickerless, "Net frequency to adjust exposure time to (0/50/60)");
+module_param(video_nr, int, 0);
+
+static struct usb_driver se401_driver;
+
+
+/**********************************************************************
+ *
+ * Memory management
+ *
+ **********************************************************************/
+static void *rvmalloc(unsigned long size)
+{
+ void *mem;
+ unsigned long adr;
+
+ size = PAGE_ALIGN(size);
+ mem = vmalloc_32(size);
+ if (!mem)
+ return NULL;
+
+ memset(mem, 0, size); /* Clear the ram out, no junk to the user */
+ adr = (unsigned long) mem;
+ while (size > 0) {
+ SetPageReserved(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) {
+ ClearPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+ vfree(mem);
+}
+
+
+
+/****************************************************************************
+ *
+ * se401 register read/write functions
+ *
+ ***************************************************************************/
+
+static int se401_sndctrl(int set, struct usb_se401 *se401, unsigned short req,
+ unsigned short value, unsigned char *cp, int size)
+{
+ return usb_control_msg (
+ se401->dev,
+ set ? usb_sndctrlpipe(se401->dev, 0) : usb_rcvctrlpipe(se401->dev, 0),
+ req,
+ (set ? USB_DIR_OUT : USB_DIR_IN) | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ value,
+ 0,
+ cp,
+ size,
+ 1000
+ );
+}
+
+static int se401_set_feature(struct usb_se401 *se401, unsigned short selector,
+ unsigned short param)
+{
+ /* specs say that the selector (address) should go in the value field
+ and the param in index, but in the logs of the windows driver they do
+ this the other way around...
+ */
+ return usb_control_msg (
+ se401->dev,
+ usb_sndctrlpipe(se401->dev, 0),
+ SE401_REQ_SET_EXT_FEATURE,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ param,
+ selector,
+ NULL,
+ 0,
+ 1000
+ );
+}
+
+static unsigned short se401_get_feature(struct usb_se401 *se401,
+ unsigned short selector)
+{
+ /* For 'set' the selecetor should be in index, not sure if the spec is
+ wrong here to....
+ */
+ unsigned char cp[2];
+ usb_control_msg (
+ se401->dev,
+ usb_rcvctrlpipe(se401->dev, 0),
+ SE401_REQ_GET_EXT_FEATURE,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ 0,
+ selector,
+ cp,
+ 2,
+ 1000
+ );
+ return cp[0]+cp[1]*256;
+}
+
+/****************************************************************************
+ *
+ * Camera control
+ *
+ ***************************************************************************/
+
+
+static int se401_send_pict(struct usb_se401 *se401)
+{
+ se401_set_feature(se401, HV7131_REG_TITL, se401->expose_l);/* integration time low */
+ se401_set_feature(se401, HV7131_REG_TITM, se401->expose_m);/* integration time mid */
+ se401_set_feature(se401, HV7131_REG_TITU, se401->expose_h);/* integration time mid */
+ se401_set_feature(se401, HV7131_REG_ARLV, se401->resetlevel);/* reset level value */
+ se401_set_feature(se401, HV7131_REG_ARCG, se401->rgain);/* red color gain */
+ se401_set_feature(se401, HV7131_REG_AGCG, se401->ggain);/* green color gain */
+ se401_set_feature(se401, HV7131_REG_ABCG, se401->bgain);/* blue color gain */
+
+ return 0;
+}
+
+static void se401_set_exposure(struct usb_se401 *se401, int brightness)
+{
+ int integration=brightness<<5;
+
+ if (flickerless==50) {
+ integration=integration-integration%106667;
+ }
+ if (flickerless==60) {
+ integration=integration-integration%88889;
+ }
+ se401->brightness=integration>>5;
+ se401->expose_h=(integration>>16)&0xff;
+ se401->expose_m=(integration>>8)&0xff;
+ se401->expose_l=integration&0xff;
+}
+
+static int se401_get_pict(struct usb_se401 *se401, struct video_picture *p)
+{
+ p->brightness=se401->brightness;
+ if (se401->enhance) {
+ p->whiteness=32768;
+ } else {
+ p->whiteness=0;
+ }
+ p->colour=65535;
+ p->contrast=65535;
+ p->hue=se401->rgain<<10;
+ p->palette=se401->palette;
+ p->depth=3; /* rgb24 */
+ return 0;
+}
+
+
+static int se401_set_pict(struct usb_se401 *se401, struct video_picture *p)
+{
+ if (p->palette != VIDEO_PALETTE_RGB24)
+ return 1;
+ se401->palette=p->palette;
+ if (p->hue!=se401->hue) {
+ se401->rgain= p->hue>>10;
+ se401->bgain= 0x40-(p->hue>>10);
+ se401->hue=p->hue;
+ }
+ if (p->brightness!=se401->brightness) {
+ se401_set_exposure(se401, p->brightness);
+ }
+ if (p->whiteness>=32768) {
+ se401->enhance=1;
+ } else {
+ se401->enhance=0;
+ }
+ se401_send_pict(se401);
+ se401_send_pict(se401);
+ return 0;
+}
+
+/*
+ Hyundai have some really nice docs about this and other sensor related
+ stuff on their homepage: www.hei.co.kr
+*/
+static void se401_auto_resetlevel(struct usb_se401 *se401)
+{
+ unsigned int ahrc, alrc;
+ int oldreset=se401->resetlevel;
+
+ /* For some reason this normally read-only register doesn't get reset
+ to zero after reading them just once...
+ */
+ se401_get_feature(se401, HV7131_REG_HIREFNOH);
+ se401_get_feature(se401, HV7131_REG_HIREFNOL);
+ se401_get_feature(se401, HV7131_REG_LOREFNOH);
+ se401_get_feature(se401, HV7131_REG_LOREFNOL);
+ ahrc=256*se401_get_feature(se401, HV7131_REG_HIREFNOH) +
+ se401_get_feature(se401, HV7131_REG_HIREFNOL);
+ alrc=256*se401_get_feature(se401, HV7131_REG_LOREFNOH) +
+ se401_get_feature(se401, HV7131_REG_LOREFNOL);
+
+ /* Not an exact science, but it seems to work pretty well... */
+ if (alrc > 10) {
+ while (alrc>=10 && se401->resetlevel < 63) {
+ se401->resetlevel++;
+ alrc /=2;
+ }
+ } else if (ahrc > 20) {
+ while (ahrc>=20 && se401->resetlevel > 0) {
+ se401->resetlevel--;
+ ahrc /=2;
+ }
+ }
+ if (se401->resetlevel!=oldreset)
+ se401_set_feature(se401, HV7131_REG_ARLV, se401->resetlevel);
+
+ return;
+}
+
+/* irq handler for snapshot button */
+static void se401_button_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_se401 *se401 = urb->context;
+ int status;
+
+ if (!se401->dev) {
+ info("ohoh: device vapourished");
+ return;
+ }
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (urb->actual_length >=2) {
+ if (se401->button)
+ se401->buttonpressed=1;
+ }
+exit:
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, status);
+}
+
+static void se401_video_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_se401 *se401 = urb->context;
+ int length = urb->actual_length;
+
+ /* ohoh... */
+ if (!se401->streaming)
+ return;
+
+ if (!se401->dev) {
+ info ("ohoh: device vapourished");
+ return;
+ }
+
+ /* 0 sized packets happen if we are to fast, but sometimes the camera
+ keeps sending them forever...
+ */
+ if (length && !urb->status) {
+ se401->nullpackets=0;
+ switch(se401->scratch[se401->scratch_next].state) {
+ case BUFFER_READY:
+ case BUFFER_BUSY: {
+ se401->dropped++;
+ break;
+ }
+ case BUFFER_UNUSED: {
+ memcpy(se401->scratch[se401->scratch_next].data, (unsigned char *)urb->transfer_buffer, length);
+ se401->scratch[se401->scratch_next].state=BUFFER_READY;
+ se401->scratch[se401->scratch_next].offset=se401->bayeroffset;
+ se401->scratch[se401->scratch_next].length=length;
+ if (waitqueue_active(&se401->wq)) {
+ wake_up_interruptible(&se401->wq);
+ }
+ se401->scratch_overflow=0;
+ se401->scratch_next++;
+ if (se401->scratch_next>=SE401_NUMSCRATCH)
+ se401->scratch_next=0;
+ break;
+ }
+ }
+ se401->bayeroffset+=length;
+ if (se401->bayeroffset>=se401->cheight*se401->cwidth) {
+ se401->bayeroffset=0;
+ }
+ } else {
+ se401->nullpackets++;
+ if (se401->nullpackets > SE401_MAX_NULLPACKETS) {
+ if (waitqueue_active(&se401->wq)) {
+ wake_up_interruptible(&se401->wq);
+ }
+ }
+ }
+
+ /* Resubmit urb for new data */
+ urb->status=0;
+ urb->dev=se401->dev;
+ if(usb_submit_urb(urb, GFP_KERNEL))
+ info("urb burned down");
+ return;
+}
+
+static void se401_send_size(struct usb_se401 *se401, int width, int height)
+{
+ int i=0;
+ int mode=0x03; /* No compression */
+ int sendheight=height;
+ int sendwidth=width;
+
+ /* JangGu compression can only be used with the camera supported sizes,
+ but bayer seems to work with any size that fits on the sensor.
+ We check if we can use compression with the current size with either
+ 4 or 16 times subcapturing, if not we use uncompressed bayer data
+ but this will result in cutouts of the maximum size....
+ */
+ while (i<se401->sizes && !(se401->width[i]==width && se401->height[i]==height))
+ i++;
+ while (i<se401->sizes) {
+ if (se401->width[i]==width*2 && se401->height[i]==height*2) {
+ sendheight=se401->height[i];
+ sendwidth=se401->width[i];
+ mode=0x40;
+ }
+ if (se401->width[i]==width*4 && se401->height[i]==height*4) {
+ sendheight=se401->height[i];
+ sendwidth=se401->width[i];
+ mode=0x42;
+ }
+ i++;
+ }
+
+ se401_sndctrl(1, se401, SE401_REQ_SET_WIDTH, sendwidth, NULL, 0);
+ se401_sndctrl(1, se401, SE401_REQ_SET_HEIGHT, sendheight, NULL, 0);
+ se401_set_feature(se401, SE401_OPERATINGMODE, mode);
+
+ if (mode==0x03) {
+ se401->format=FMT_BAYER;
+ } else {
+ se401->format=FMT_JANGGU;
+ }
+
+ return;
+}
+
+/*
+ In this function se401_send_pict is called several times,
+ for some reason (depending on the state of the sensor and the phase of
+ the moon :) doing this only in either place doesn't always work...
+*/
+static int se401_start_stream(struct usb_se401 *se401)
+{
+ struct urb *urb;
+ int err=0, i;
+ se401->streaming=1;
+
+ se401_sndctrl(1, se401, SE401_REQ_CAMERA_POWER, 1, NULL, 0);
+ se401_sndctrl(1, se401, SE401_REQ_LED_CONTROL, 1, NULL, 0);
+
+ /* Set picture settings */
+ se401_set_feature(se401, HV7131_REG_MODE_B, 0x05);/*windowed + pix intg */
+ se401_send_pict(se401);
+
+ se401_send_size(se401, se401->cwidth, se401->cheight);
+
+ se401_sndctrl(1, se401, SE401_REQ_START_CONTINUOUS_CAPTURE, 0, NULL, 0);
+
+ /* Do some memory allocation */
+ for (i=0; i<SE401_NUMFRAMES; i++) {
+ se401->frame[i].data=se401->fbuf + i * se401->maxframesize;
+ se401->frame[i].curpix=0;
+ }
+ for (i=0; i<SE401_NUMSBUF; i++) {
+ se401->sbuf[i].data=kmalloc(SE401_PACKETSIZE, GFP_KERNEL);
+ }
+
+ se401->bayeroffset=0;
+ se401->scratch_next=0;
+ se401->scratch_use=0;
+ se401->scratch_overflow=0;
+ for (i=0; i<SE401_NUMSCRATCH; i++) {
+ se401->scratch[i].data=kmalloc(SE401_PACKETSIZE, GFP_KERNEL);
+ se401->scratch[i].state=BUFFER_UNUSED;
+ }
+
+ for (i=0; i<SE401_NUMSBUF; i++) {
+ urb=usb_alloc_urb(0, GFP_KERNEL);
+ if(!urb)
+ return -ENOMEM;
+
+ usb_fill_bulk_urb(urb, se401->dev,
+ usb_rcvbulkpipe(se401->dev, SE401_VIDEO_ENDPOINT),
+ se401->sbuf[i].data, SE401_PACKETSIZE,
+ se401_video_irq,
+ se401);
+
+ se401->urb[i]=urb;
+
+ err=usb_submit_urb(se401->urb[i], GFP_KERNEL);
+ if(err)
+ err("urb burned down");
+ }
+
+ se401->framecount=0;
+
+ return 0;
+}
+
+static int se401_stop_stream(struct usb_se401 *se401)
+{
+ int i;
+
+ if (!se401->streaming || !se401->dev)
+ return 1;
+
+ se401->streaming=0;
+
+ se401_sndctrl(1, se401, SE401_REQ_STOP_CONTINUOUS_CAPTURE, 0, NULL, 0);
+
+ se401_sndctrl(1, se401, SE401_REQ_LED_CONTROL, 0, NULL, 0);
+ se401_sndctrl(1, se401, SE401_REQ_CAMERA_POWER, 0, NULL, 0);
+
+ for (i=0; i<SE401_NUMSBUF; i++) if (se401->urb[i]) {
+ usb_kill_urb(se401->urb[i]);
+ usb_free_urb(se401->urb[i]);
+ se401->urb[i]=NULL;
+ kfree(se401->sbuf[i].data);
+ }
+ for (i=0; i<SE401_NUMSCRATCH; i++) {
+ kfree(se401->scratch[i].data);
+ se401->scratch[i].data=NULL;
+ }
+
+ return 0;
+}
+
+static int se401_set_size(struct usb_se401 *se401, int width, int height)
+{
+ int wasstreaming=se401->streaming;
+ /* Check to see if we need to change */
+ if (se401->cwidth==width && se401->cheight==height)
+ return 0;
+
+ /* Check for a valid mode */
+ if (!width || !height)
+ return 1;
+ if ((width & 1) || (height & 1))
+ return 1;
+ if (width>se401->width[se401->sizes-1])
+ return 1;
+ if (height>se401->height[se401->sizes-1])
+ return 1;
+
+ /* Stop a current stream and start it again at the new size */
+ if (wasstreaming)
+ se401_stop_stream(se401);
+ se401->cwidth=width;
+ se401->cheight=height;
+ if (wasstreaming)
+ se401_start_stream(se401);
+ return 0;
+}
+
+
+/****************************************************************************
+ *
+ * Video Decoding
+ *
+ ***************************************************************************/
+
+/*
+ This shouldn't really be done in a v4l driver....
+ But it does make the image look a lot more usable.
+ Basically it lifts the dark pixels more than the light pixels.
+*/
+static inline void enhance_picture(unsigned char *frame, int len)
+{
+ while (len--) {
+ *frame=(((*frame^255)*(*frame^255))/255)^255;
+ frame++;
+ }
+}
+
+static inline void decode_JangGu_integrate(struct usb_se401 *se401, int data)
+{
+ struct se401_frame *frame=&se401->frame[se401->curframe];
+ int linelength=se401->cwidth*3;
+
+ if (frame->curlinepix >= linelength) {
+ frame->curlinepix=0;
+ frame->curline+=linelength;
+ }
+
+ /* First three are absolute, all others relative.
+ * Format is rgb from right to left (mirrorred image),
+ * we flip it to get bgr from left to right. */
+ if (frame->curlinepix < 3) {
+ *(frame->curline-frame->curlinepix)=1+data*4;
+ } else {
+ *(frame->curline-frame->curlinepix)=
+ *(frame->curline-frame->curlinepix+3)+data*4;
+ }
+ frame->curlinepix++;
+}
+
+static inline void decode_JangGu_vlc (struct usb_se401 *se401, unsigned char *data, int bit_exp, int packetlength)
+{
+ int pos=0;
+ int vlc_cod=0;
+ int vlc_size=0;
+ int vlc_data=0;
+ int bit_cur;
+ int bit;
+ data+=4;
+ while (pos < packetlength) {
+ bit_cur=8;
+ while (bit_cur && bit_exp) {
+ bit=((*data)>>(bit_cur-1))&1;
+ if (!vlc_cod) {
+ if (bit) {
+ vlc_size++;
+ } else {
+ if (!vlc_size) {
+ decode_JangGu_integrate(se401, 0);
+ } else {
+ vlc_cod=2;
+ vlc_data=0;
+ }
+ }
+ } else {
+ if (vlc_cod==2) {
+ if (!bit)
+ vlc_data = -(1<<vlc_size) + 1;
+ vlc_cod--;
+ }
+ vlc_size--;
+ vlc_data+=bit<<vlc_size;
+ if (!vlc_size) {
+ decode_JangGu_integrate(se401, vlc_data);
+ vlc_cod=0;
+ }
+ }
+ bit_cur--;
+ bit_exp--;
+ }
+ pos++;
+ data++;
+ }
+}
+
+static inline void decode_JangGu (struct usb_se401 *se401, struct se401_scratch *buffer)
+{
+ unsigned char *data=buffer->data;
+ int len=buffer->length;
+ int bit_exp=0, pix_exp=0, frameinfo=0, packetlength=0, size;
+ int datapos=0;
+
+ /* New image? */
+ if (!se401->frame[se401->curframe].curpix) {
+ se401->frame[se401->curframe].curlinepix=0;
+ se401->frame[se401->curframe].curline=
+ se401->frame[se401->curframe].data+
+ se401->cwidth*3-1;
+ if (se401->frame[se401->curframe].grabstate==FRAME_READY)
+ se401->frame[se401->curframe].grabstate=FRAME_GRABBING;
+ se401->vlcdatapos=0;
+ }
+ while (datapos < len) {
+ size=1024-se401->vlcdatapos;
+ if (size+datapos > len)
+ size=len-datapos;
+ memcpy(se401->vlcdata+se401->vlcdatapos, data+datapos, size);
+ se401->vlcdatapos+=size;
+ packetlength=0;
+ if (se401->vlcdatapos >= 4) {
+ bit_exp=se401->vlcdata[3]+(se401->vlcdata[2]<<8);
+ pix_exp=se401->vlcdata[1]+((se401->vlcdata[0]&0x3f)<<8);
+ frameinfo=se401->vlcdata[0]&0xc0;
+ packetlength=((bit_exp+47)>>4)<<1;
+ if (packetlength > 1024) {
+ se401->vlcdatapos=0;
+ datapos=len;
+ packetlength=0;
+ se401->error++;
+ se401->frame[se401->curframe].curpix=0;
+ }
+ }
+ if (packetlength && se401->vlcdatapos >= packetlength) {
+ decode_JangGu_vlc(se401, se401->vlcdata, bit_exp, packetlength);
+ se401->frame[se401->curframe].curpix+=pix_exp*3;
+ datapos+=size-(se401->vlcdatapos-packetlength);
+ se401->vlcdatapos=0;
+ if (se401->frame[se401->curframe].curpix>=se401->cwidth*se401->cheight*3) {
+ if (se401->frame[se401->curframe].curpix==se401->cwidth*se401->cheight*3) {
+ if (se401->frame[se401->curframe].grabstate==FRAME_GRABBING) {
+ se401->frame[se401->curframe].grabstate=FRAME_DONE;
+ se401->framecount++;
+ se401->readcount++;
+ }
+ if (se401->frame[(se401->curframe+1)&(SE401_NUMFRAMES-1)].grabstate==FRAME_READY) {
+ se401->curframe=(se401->curframe+1) & (SE401_NUMFRAMES-1);
+ }
+ } else {
+ se401->error++;
+ }
+ se401->frame[se401->curframe].curpix=0;
+ datapos=len;
+ }
+ } else {
+ datapos+=size;
+ }
+ }
+}
+
+static inline void decode_bayer (struct usb_se401 *se401, struct se401_scratch *buffer)
+{
+ unsigned char *data=buffer->data;
+ int len=buffer->length;
+ int offset=buffer->offset;
+ int datasize=se401->cwidth*se401->cheight;
+ struct se401_frame *frame=&se401->frame[se401->curframe];
+
+ unsigned char *framedata=frame->data, *curline, *nextline;
+ int width=se401->cwidth;
+ int blineoffset=0, bline;
+ int linelength=width*3, i;
+
+
+ if (frame->curpix==0) {
+ if (frame->grabstate==FRAME_READY) {
+ frame->grabstate=FRAME_GRABBING;
+ }
+ frame->curline=framedata+linelength;
+ frame->curlinepix=0;
+ }
+
+ if (offset!=frame->curpix) {
+ /* Regard frame as lost :( */
+ frame->curpix=0;
+ se401->error++;
+ return;
+ }
+
+ /* Check if we have to much data */
+ if (frame->curpix+len > datasize) {
+ len=datasize-frame->curpix;
+ }
+ if (se401->cheight%4)
+ blineoffset=1;
+ bline=frame->curpix/se401->cwidth+blineoffset;
+
+ curline=frame->curline;
+ nextline=curline+linelength;
+ if (nextline >= framedata+datasize*3)
+ nextline=curline;
+ while (len) {
+ if (frame->curlinepix>=width) {
+ frame->curlinepix-=width;
+ bline=frame->curpix/width+blineoffset;
+ curline+=linelength*2;
+ nextline+=linelength*2;
+ if (curline >= framedata+datasize*3) {
+ frame->curlinepix++;
+ curline-=3;
+ nextline-=3;
+ len--;
+ data++;
+ frame->curpix++;
+ }
+ if (nextline >= framedata+datasize*3)
+ nextline=curline;
+ }
+ if ((bline&1)) {
+ if ((frame->curlinepix&1)) {
+ *(curline+2)=*data;
+ *(curline-1)=*data;
+ *(nextline+2)=*data;
+ *(nextline-1)=*data;
+ } else {
+ *(curline+1)=
+ (*(curline+1)+*data)/2;
+ *(curline-2)=
+ (*(curline-2)+*data)/2;
+ *(nextline+1)=*data;
+ *(nextline-2)=*data;
+ }
+ } else {
+ if ((frame->curlinepix&1)) {
+ *(curline+1)=
+ (*(curline+1)+*data)/2;
+ *(curline-2)=
+ (*(curline-2)+*data)/2;
+ *(nextline+1)=*data;
+ *(nextline-2)=*data;
+ } else {
+ *curline=*data;
+ *(curline-3)=*data;
+ *nextline=*data;
+ *(nextline-3)=*data;
+ }
+ }
+ frame->curlinepix++;
+ curline-=3;
+ nextline-=3;
+ len--;
+ data++;
+ frame->curpix++;
+ }
+ frame->curline=curline;
+
+ if (frame->curpix>=datasize) {
+ /* Fix the top line */
+ framedata+=linelength;
+ for (i=0; i<linelength; i++) {
+ framedata--;
+ *framedata=*(framedata+linelength);
+ }
+ /* Fix the left side (green is already present) */
+ for (i=0; i<se401->cheight; i++) {
+ *framedata=*(framedata+3);
+ *(framedata+1)=*(framedata+4);
+ *(framedata+2)=*(framedata+5);
+ framedata+=linelength;
+ }
+ frame->curpix=0;
+ frame->grabstate=FRAME_DONE;
+ se401->framecount++;
+ se401->readcount++;
+ if (se401->frame[(se401->curframe+1)&(SE401_NUMFRAMES-1)].grabstate==FRAME_READY) {
+ se401->curframe=(se401->curframe+1) & (SE401_NUMFRAMES-1);
+ }
+ }
+}
+
+static int se401_newframe(struct usb_se401 *se401, int framenr)
+{
+ DECLARE_WAITQUEUE(wait, current);
+ int errors=0;
+
+ while (se401->streaming &&
+ (se401->frame[framenr].grabstate==FRAME_READY ||
+ se401->frame[framenr].grabstate==FRAME_GRABBING) ) {
+ if(!se401->frame[framenr].curpix) {
+ errors++;
+ }
+ wait_interruptible(
+ se401->scratch[se401->scratch_use].state!=BUFFER_READY,
+ &se401->wq,
+ &wait
+ );
+ if (se401->nullpackets > SE401_MAX_NULLPACKETS) {
+ se401->nullpackets=0;
+ info("to many null length packets, restarting capture");
+ se401_stop_stream(se401);
+ se401_start_stream(se401);
+ } else {
+ if (se401->scratch[se401->scratch_use].state!=BUFFER_READY) {
+ se401->frame[framenr].grabstate=FRAME_ERROR;
+ return -EIO;
+ }
+ se401->scratch[se401->scratch_use].state=BUFFER_BUSY;
+ if (se401->format==FMT_JANGGU) {
+ decode_JangGu(se401, &se401->scratch[se401->scratch_use]);
+ } else {
+ decode_bayer(se401, &se401->scratch[se401->scratch_use]);
+ }
+ se401->scratch[se401->scratch_use].state=BUFFER_UNUSED;
+ se401->scratch_use++;
+ if (se401->scratch_use>=SE401_NUMSCRATCH)
+ se401->scratch_use=0;
+ if (errors > SE401_MAX_ERRORS) {
+ errors=0;
+ info("to much errors, restarting capture");
+ se401_stop_stream(se401);
+ se401_start_stream(se401);
+ }
+ }
+ }
+
+ if (se401->frame[framenr].grabstate==FRAME_DONE)
+ if (se401->enhance)
+ enhance_picture(se401->frame[framenr].data, se401->cheight*se401->cwidth*3);
+ return 0;
+}
+
+static void usb_se401_remove_disconnected (struct usb_se401 *se401)
+{
+ int i;
+
+ se401->dev = NULL;
+
+ for (i=0; i<SE401_NUMSBUF; i++) if (se401->urb[i]) {
+ usb_kill_urb(se401->urb[i]);
+ usb_free_urb(se401->urb[i]);
+ se401->urb[i] = NULL;
+ kfree(se401->sbuf[i].data);
+ }
+ for (i=0; i<SE401_NUMSCRATCH; i++) if (se401->scratch[i].data) {
+ kfree(se401->scratch[i].data);
+ }
+ if (se401->inturb) {
+ usb_kill_urb(se401->inturb);
+ usb_free_urb(se401->inturb);
+ }
+ info("%s disconnected", se401->camera_name);
+
+ /* Free the memory */
+ kfree(se401->width);
+ kfree(se401->height);
+ kfree(se401);
+}
+
+
+
+/****************************************************************************
+ *
+ * Video4Linux
+ *
+ ***************************************************************************/
+
+
+static int se401_open(struct inode *inode, struct file *file)
+{
+ struct video_device *dev = video_devdata(file);
+ struct usb_se401 *se401 = (struct usb_se401 *)dev;
+ int err = 0;
+
+ if (se401->user)
+ return -EBUSY;
+ se401->fbuf = rvmalloc(se401->maxframesize * SE401_NUMFRAMES);
+ if (se401->fbuf)
+ file->private_data = dev;
+ else
+ err = -ENOMEM;
+ se401->user = !err;
+
+ return err;
+}
+
+static int se401_close(struct inode *inode, struct file *file)
+{
+ struct video_device *dev = file->private_data;
+ struct usb_se401 *se401 = (struct usb_se401 *)dev;
+ int i;
+
+ rvfree(se401->fbuf, se401->maxframesize * SE401_NUMFRAMES);
+ if (se401->removed) {
+ usb_se401_remove_disconnected(se401);
+ info("device unregistered");
+ } else {
+ for (i=0; i<SE401_NUMFRAMES; i++)
+ se401->frame[i].grabstate=FRAME_UNUSED;
+ if (se401->streaming)
+ se401_stop_stream(se401);
+ se401->user=0;
+ }
+ file->private_data = NULL;
+ return 0;
+}
+
+static int se401_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
+{
+ struct video_device *vdev = file->private_data;
+ struct usb_se401 *se401 = (struct usb_se401 *)vdev;
+
+ if (!se401->dev)
+ return -EIO;
+
+ switch (cmd) {
+ case VIDIOCGCAP:
+ {
+ struct video_capability *b = arg;
+ strcpy(b->name, se401->camera_name);
+ b->type = VID_TYPE_CAPTURE;
+ b->channels = 1;
+ b->audios = 0;
+ b->maxwidth = se401->width[se401->sizes-1];
+ b->maxheight = se401->height[se401->sizes-1];
+ b->minwidth = se401->width[0];
+ b->minheight = se401->height[0];
+ return 0;
+ }
+ case VIDIOCGCHAN:
+ {
+ struct video_channel *v = arg;
+
+ if (v->channel != 0)
+ return -EINVAL;
+ v->flags = 0;
+ v->tuners = 0;
+ v->type = VIDEO_TYPE_CAMERA;
+ strcpy(v->name, "Camera");
+ return 0;
+ }
+ case VIDIOCSCHAN:
+ {
+ struct video_channel *v = arg;
+
+ if (v->channel != 0)
+ return -EINVAL;
+ return 0;
+ }
+ case VIDIOCGPICT:
+ {
+ struct video_picture *p = arg;
+
+ se401_get_pict(se401, p);
+ return 0;
+ }
+ case VIDIOCSPICT:
+ {
+ struct video_picture *p = arg;
+
+ if (se401_set_pict(se401, p))
+ return -EINVAL;
+ return 0;
+ }
+ case VIDIOCSWIN:
+ {
+ struct video_window *vw = arg;
+
+ if (vw->flags)
+ return -EINVAL;
+ if (vw->clipcount)
+ return -EINVAL;
+ if (se401_set_size(se401, vw->width, vw->height))
+ return -EINVAL;
+ return 0;
+ }
+ case VIDIOCGWIN:
+ {
+ struct video_window *vw = arg;
+
+ vw->x = 0; /* FIXME */
+ vw->y = 0;
+ vw->chromakey = 0;
+ vw->flags = 0;
+ vw->clipcount = 0;
+ vw->width = se401->cwidth;
+ vw->height = se401->cheight;
+ return 0;
+ }
+ case VIDIOCGMBUF:
+ {
+ struct video_mbuf *vm = arg;
+ int i;
+
+ memset(vm, 0, sizeof(*vm));
+ vm->size = SE401_NUMFRAMES * se401->maxframesize;
+ vm->frames = SE401_NUMFRAMES;
+ for (i=0; i<SE401_NUMFRAMES; i++)
+ vm->offsets[i] = se401->maxframesize * i;
+ return 0;
+ }
+ case VIDIOCMCAPTURE:
+ {
+ struct video_mmap *vm = arg;
+
+ if (vm->format != VIDEO_PALETTE_RGB24)
+ return -EINVAL;
+ if (vm->frame >= SE401_NUMFRAMES)
+ return -EINVAL;
+ if (se401->frame[vm->frame].grabstate != FRAME_UNUSED)
+ return -EBUSY;
+
+ /* Is this according to the v4l spec??? */
+ if (se401_set_size(se401, vm->width, vm->height))
+ return -EINVAL;
+ se401->frame[vm->frame].grabstate=FRAME_READY;
+
+ if (!se401->streaming)
+ se401_start_stream(se401);
+
+ /* Set the picture properties */
+ if (se401->framecount==0)
+ se401_send_pict(se401);
+ /* Calibrate the reset level after a few frames. */
+ if (se401->framecount%20==1)
+ se401_auto_resetlevel(se401);
+
+ return 0;
+ }
+ case VIDIOCSYNC:
+ {
+ int *frame = arg;
+ int ret=0;
+
+ if(*frame <0 || *frame >= SE401_NUMFRAMES)
+ return -EINVAL;
+
+ ret=se401_newframe(se401, *frame);
+ se401->frame[*frame].grabstate=FRAME_UNUSED;
+ return ret;
+ }
+ case VIDIOCGFBUF:
+ {
+ struct video_buffer *vb = arg;
+
+ memset(vb, 0, sizeof(*vb));
+ 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 int se401_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, se401_do_ioctl);
+}
+
+static ssize_t se401_read(struct file *file, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ int realcount=count, ret=0;
+ struct video_device *dev = file->private_data;
+ struct usb_se401 *se401 = (struct usb_se401 *)dev;
+
+
+ if (se401->dev == NULL)
+ return -EIO;
+ if (realcount > se401->cwidth*se401->cheight*3)
+ realcount=se401->cwidth*se401->cheight*3;
+
+ /* Shouldn't happen: */
+ if (se401->frame[0].grabstate==FRAME_GRABBING)
+ return -EBUSY;
+ se401->frame[0].grabstate=FRAME_READY;
+ se401->frame[1].grabstate=FRAME_UNUSED;
+ se401->curframe=0;
+
+ if (!se401->streaming)
+ se401_start_stream(se401);
+
+ /* Set the picture properties */
+ if (se401->framecount==0)
+ se401_send_pict(se401);
+ /* Calibrate the reset level after a few frames. */
+ if (se401->framecount%20==1)
+ se401_auto_resetlevel(se401);
+
+ ret=se401_newframe(se401, 0);
+
+ se401->frame[0].grabstate=FRAME_UNUSED;
+ if (ret)
+ return ret;
+ if (copy_to_user(buf, se401->frame[0].data, realcount))
+ return -EFAULT;
+
+ return realcount;
+}
+
+static int se401_mmap(struct file *file, struct vm_area_struct *vma)
+{
+ struct video_device *dev = file->private_data;
+ struct usb_se401 *se401 = (struct usb_se401 *)dev;
+ unsigned long start = vma->vm_start;
+ unsigned long size = vma->vm_end-vma->vm_start;
+ unsigned long page, pos;
+
+ down(&se401->lock);
+
+ if (se401->dev == NULL) {
+ up(&se401->lock);
+ return -EIO;
+ }
+ if (size > (((SE401_NUMFRAMES * se401->maxframesize) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))) {
+ up(&se401->lock);
+ return -EINVAL;
+ }
+ pos = (unsigned long)se401->fbuf;
+ while (size > 0) {
+ page = vmalloc_to_pfn((void *)pos);
+ if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {
+ up(&se401->lock);
+ return -EAGAIN;
+ }
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+ if (size > PAGE_SIZE)
+ size -= PAGE_SIZE;
+ else
+ size = 0;
+ }
+ up(&se401->lock);
+
+ return 0;
+}
+
+static struct file_operations se401_fops = {
+ .owner = THIS_MODULE,
+ .open = se401_open,
+ .release = se401_close,
+ .read = se401_read,
+ .mmap = se401_mmap,
+ .ioctl = se401_ioctl,
+ .llseek = no_llseek,
+};
+static struct video_device se401_template = {
+ .owner = THIS_MODULE,
+ .name = "se401 USB camera",
+ .type = VID_TYPE_CAPTURE,
+ .hardware = VID_HARDWARE_SE401,
+ .fops = &se401_fops,
+};
+
+
+
+/***************************/
+static int se401_init(struct usb_se401 *se401, int button)
+{
+ int i=0, rc;
+ unsigned char cp[0x40];
+ char temp[200];
+
+ /* led on */
+ se401_sndctrl(1, se401, SE401_REQ_LED_CONTROL, 1, NULL, 0);
+
+ /* get camera descriptor */
+ rc=se401_sndctrl(0, se401, SE401_REQ_GET_CAMERA_DESCRIPTOR, 0, cp, sizeof(cp));
+ if (cp[1]!=0x41) {
+ err("Wrong descriptor type");
+ return 1;
+ }
+ sprintf (temp, "ExtraFeatures: %d", cp[3]);
+
+ 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; i<se401->sizes; 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;
+ }
+ sprintf (temp, "%s Sizes:", temp);
+ for (i=0; i<se401->sizes; i++) {
+ sprintf(temp, "%s %dx%d", temp, se401->width[i], se401->height[i]);
+ }
+ info("%s", temp);
+ se401->maxframesize=se401->width[se401->sizes-1]*se401->height[se401->sizes-1]*3;
+
+ rc=se401_sndctrl(0, se401, SE401_REQ_GET_WIDTH, 0, cp, sizeof(cp));
+ se401->cwidth=cp[0]+cp[1]*256;
+ rc=se401_sndctrl(0, se401, SE401_REQ_GET_HEIGHT, 0, cp, sizeof(cp));
+ se401->cheight=cp[0]+cp[1]*256;
+
+ if (!cp[2] && SE401_FORMAT_BAYER) {
+ err("Bayer format not supported!");
+ return 1;
+ }
+ /* set output mode (BAYER) */
+ se401_sndctrl(1, se401, SE401_REQ_SET_OUTPUT_MODE, SE401_FORMAT_BAYER, NULL, 0);
+
+ rc=se401_sndctrl(0, se401, SE401_REQ_GET_BRT, 0, cp, sizeof(cp));
+ se401->brightness=cp[0]+cp[1]*256;
+ /* some default values */
+ se401->resetlevel=0x2d;
+ se401->rgain=0x20;
+ se401->ggain=0x20;
+ se401->bgain=0x20;
+ se401_set_exposure(se401, 20000);
+ se401->palette=VIDEO_PALETTE_RGB24;
+ se401->enhance=1;
+ se401->dropped=0;
+ se401->error=0;
+ se401->framecount=0;
+ se401->readcount=0;
+
+ /* Start interrupt transfers for snapshot button */
+ if (button) {
+ se401->inturb=usb_alloc_urb(0, GFP_KERNEL);
+ if (!se401->inturb) {
+ info("Allocation of inturb failed");
+ return 1;
+ }
+ usb_fill_int_urb(se401->inturb, se401->dev,
+ usb_rcvintpipe(se401->dev, SE401_BUTTON_ENDPOINT),
+ &se401->button, sizeof(se401->button),
+ se401_button_irq,
+ se401,
+ 8
+ );
+ if (usb_submit_urb(se401->inturb, GFP_KERNEL)) {
+ info("int urb burned down");
+ return 1;
+ }
+ } else
+ se401->inturb=NULL;
+
+ /* Flash the led */
+ se401_sndctrl(1, se401, SE401_REQ_CAMERA_POWER, 1, NULL, 0);
+ se401_sndctrl(1, se401, SE401_REQ_LED_CONTROL, 1, NULL, 0);
+ se401_sndctrl(1, se401, SE401_REQ_CAMERA_POWER, 0, NULL, 0);
+ se401_sndctrl(1, se401, SE401_REQ_LED_CONTROL, 0, NULL, 0);
+
+ return 0;
+}
+
+static int se401_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct usb_interface_descriptor *interface;
+ struct usb_se401 *se401;
+ char *camera_name=NULL;
+ int button=1;
+
+ /* We don't handle multi-config cameras */
+ if (dev->descriptor.bNumConfigurations != 1)
+ return -ENODEV;
+
+ interface = &intf->cur_altsetting->desc;
+
+ /* Is it an se401? */
+ if (le16_to_cpu(dev->descriptor.idVendor) == 0x03e8 &&
+ le16_to_cpu(dev->descriptor.idProduct) == 0x0004) {
+ camera_name="Endpoints/Aox SE401";
+ } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x0471 &&
+ le16_to_cpu(dev->descriptor.idProduct) == 0x030b) {
+ camera_name="Philips PCVC665K";
+ } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x047d &&
+ le16_to_cpu(dev->descriptor.idProduct) == 0x5001) {
+ camera_name="Kensington VideoCAM 67014";
+ } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x047d &&
+ le16_to_cpu(dev->descriptor.idProduct) == 0x5002) {
+ camera_name="Kensington VideoCAM 6701(5/7)";
+ } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x047d &&
+ le16_to_cpu(dev->descriptor.idProduct) == 0x5003) {
+ camera_name="Kensington VideoCAM 67016";
+ button=0;
+ } else
+ return -ENODEV;
+
+ /* Checking vendor/product should be enough, but what the hell */
+ if (interface->bInterfaceClass != 0x00)
+ return -ENODEV;
+ if (interface->bInterfaceSubClass != 0x00)
+ return -ENODEV;
+
+ /* We found one */
+ info("SE401 camera found: %s", camera_name);
+
+ if ((se401 = kmalloc(sizeof(*se401), GFP_KERNEL)) == NULL) {
+ err("couldn't kmalloc se401 struct");
+ return -ENOMEM;
+ }
+
+ memset(se401, 0, sizeof(*se401));
+
+ se401->dev = dev;
+ se401->iface = interface->bInterfaceNumber;
+ se401->camera_name = camera_name;
+
+ info("firmware version: %02x", le16_to_cpu(dev->descriptor.bcdDevice) & 255);
+
+ if (se401_init(se401, button)) {
+ kfree(se401);
+ return -EIO;
+ }
+
+ memcpy(&se401->vdev, &se401_template, sizeof(se401_template));
+ memcpy(se401->vdev.name, se401->camera_name, strlen(se401->camera_name));
+ init_waitqueue_head(&se401->wq);
+ init_MUTEX(&se401->lock);
+ wmb();
+
+ if (video_register_device(&se401->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
+ kfree(se401);
+ err("video_register_device failed");
+ return -EIO;
+ }
+ info("registered new video device: video%d", se401->vdev.minor);
+
+ usb_set_intfdata (intf, se401);
+ return 0;
+}
+
+static void se401_disconnect(struct usb_interface *intf)
+{
+ struct usb_se401 *se401 = usb_get_intfdata (intf);
+
+ usb_set_intfdata (intf, NULL);
+ if (se401) {
+ video_unregister_device(&se401->vdev);
+ if (!se401->user){
+ usb_se401_remove_disconnected(se401);
+ } else {
+ se401->frame[0].grabstate = FRAME_ERROR;
+ se401->frame[0].grabstate = FRAME_ERROR;
+
+ se401->streaming = 0;
+
+ wake_up_interruptible(&se401->wq);
+ se401->removed = 1;
+ }
+ }
+}
+
+static struct usb_driver se401_driver = {
+ .owner = THIS_MODULE,
+ .name = "se401",
+ .id_table = device_table,
+ .probe = se401_probe,
+ .disconnect = se401_disconnect,
+};
+
+
+
+/****************************************************************************
+ *
+ * Module routines
+ *
+ ***************************************************************************/
+
+static int __init usb_se401_init(void)
+{
+ info("SE401 usb camera driver version %s registering", version);
+ if (flickerless)
+ if (flickerless!=50 && flickerless!=60) {
+ info("Invallid flickerless value, use 0, 50 or 60.");
+ return -1;
+ }
+ return usb_register(&se401_driver);
+}
+
+static void __exit usb_se401_exit(void)
+{
+ usb_deregister(&se401_driver);
+ info("SE401 driver deregistered");
+}
+
+module_init(usb_se401_init);
+module_exit(usb_se401_exit);
diff --git a/drivers/usb/media/se401.h b/drivers/usb/media/se401.h
new file mode 100644
index 000000000000..2e5846f1eb20
--- /dev/null
+++ b/drivers/usb/media/se401.h
@@ -0,0 +1,233 @@
+
+#ifndef __LINUX_se401_H
+#define __LINUX_se401_H
+
+#include <asm/uaccess.h>
+#include <linux/videodev.h>
+#include <linux/smp_lock.h>
+
+#define se401_DEBUG /* Turn on debug messages */
+
+#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
+
+/* An almost drop-in replacement for sleep_on_interruptible */
+#define wait_interruptible(test, queue, wait) \
+{ \
+ add_wait_queue(queue, wait); \
+ set_current_state(TASK_INTERRUPTIBLE); \
+ if (test) \
+ schedule(); \
+ remove_wait_queue(queue, wait); \
+ set_current_state(TASK_RUNNING); \
+ if (signal_pending(current)) \
+ break; \
+}
+
+#define SE401_REQ_GET_CAMERA_DESCRIPTOR 0x06
+#define SE401_REQ_START_CONTINUOUS_CAPTURE 0x41
+#define SE401_REQ_STOP_CONTINUOUS_CAPTURE 0x42
+#define SE401_REQ_CAPTURE_FRAME 0x43
+#define SE401_REQ_GET_BRT 0x44
+#define SE401_REQ_SET_BRT 0x45
+#define SE401_REQ_GET_WIDTH 0x4c
+#define SE401_REQ_SET_WIDTH 0x4d
+#define SE401_REQ_GET_HEIGHT 0x4e
+#define SE401_REQ_SET_HEIGHT 0x4f
+#define SE401_REQ_GET_OUTPUT_MODE 0x50
+#define SE401_REQ_SET_OUTPUT_MODE 0x51
+#define SE401_REQ_GET_EXT_FEATURE 0x52
+#define SE401_REQ_SET_EXT_FEATURE 0x53
+#define SE401_REQ_CAMERA_POWER 0x56
+#define SE401_REQ_LED_CONTROL 0x57
+#define SE401_REQ_BIOS 0xff
+
+#define SE401_BIOS_READ 0x07
+
+#define SE401_FORMAT_BAYER 0x40
+
+/* Hyundai hv7131b registers
+ 7121 and 7141 should be the same (haven't really checked...) */
+/* Mode registers: */
+#define HV7131_REG_MODE_A 0x00
+#define HV7131_REG_MODE_B 0x01
+#define HV7131_REG_MODE_C 0x02
+/* Frame registers: */
+#define HV7131_REG_FRSU 0x10
+#define HV7131_REG_FRSL 0x11
+#define HV7131_REG_FCSU 0x12
+#define HV7131_REG_FCSL 0x13
+#define HV7131_REG_FWHU 0x14
+#define HV7131_REG_FWHL 0x15
+#define HV7131_REG_FWWU 0x16
+#define HV7131_REG_FWWL 0x17
+/* Timing registers: */
+#define HV7131_REG_THBU 0x20
+#define HV7131_REG_THBL 0x21
+#define HV7131_REG_TVBU 0x22
+#define HV7131_REG_TVBL 0x23
+#define HV7131_REG_TITU 0x25
+#define HV7131_REG_TITM 0x26
+#define HV7131_REG_TITL 0x27
+#define HV7131_REG_TMCD 0x28
+/* Adjust Registers: */
+#define HV7131_REG_ARLV 0x30
+#define HV7131_REG_ARCG 0x31
+#define HV7131_REG_AGCG 0x32
+#define HV7131_REG_ABCG 0x33
+#define HV7131_REG_APBV 0x34
+#define HV7131_REG_ASLP 0x54
+/* Offset Registers: */
+#define HV7131_REG_OFSR 0x50
+#define HV7131_REG_OFSG 0x51
+#define HV7131_REG_OFSB 0x52
+/* REset level statistics registers: */
+#define HV7131_REG_LOREFNOH 0x57
+#define HV7131_REG_LOREFNOL 0x58
+#define HV7131_REG_HIREFNOH 0x59
+#define HV7131_REG_HIREFNOL 0x5a
+
+/* se401 registers */
+#define SE401_OPERATINGMODE 0x2000
+
+
+/* size of usb transfers */
+#define SE401_PACKETSIZE 4096
+/* number of queued bulk transfers to use, should be about 8 */
+#define SE401_NUMSBUF 1
+/* read the usb specs for this one :) */
+#define SE401_VIDEO_ENDPOINT 1
+#define SE401_BUTTON_ENDPOINT 2
+/* number of frames supported by the v4l part */
+#define SE401_NUMFRAMES 2
+/* scratch buffers for passing data to the decoders */
+#define SE401_NUMSCRATCH 32
+/* maximum amount of data in a JangGu packet */
+#define SE401_VLCDATALEN 1024
+/* number of nul sized packets to receive before kicking the camera */
+#define SE401_MAX_NULLPACKETS 4000
+/* number of decoding errors before kicking the camera */
+#define SE401_MAX_ERRORS 200
+
+struct usb_device;
+
+struct se401_sbuf {
+ unsigned char *data;
+};
+
+enum {
+ FRAME_UNUSED, /* Unused (no MCAPTURE) */
+ FRAME_READY, /* Ready to start grabbing */
+ FRAME_GRABBING, /* In the process of being grabbed into */
+ FRAME_DONE, /* Finished grabbing, but not been synced yet */
+ FRAME_ERROR, /* Something bad happened while processing */
+};
+
+enum {
+ FMT_BAYER,
+ FMT_JANGGU,
+};
+
+enum {
+ BUFFER_UNUSED,
+ BUFFER_READY,
+ BUFFER_BUSY,
+ BUFFER_DONE,
+};
+
+struct se401_scratch {
+ unsigned char *data;
+ volatile int state;
+ int offset;
+ int length;
+};
+
+struct se401_frame {
+ unsigned char *data; /* Frame buffer */
+
+ volatile int grabstate; /* State of grabbing */
+
+ unsigned char *curline;
+ int curlinepix;
+ int curpix;
+};
+
+struct usb_se401 {
+ struct video_device vdev;
+
+ /* Device structure */
+ struct usb_device *dev;
+
+ unsigned char iface;
+
+ char *camera_name;
+
+ int change;
+ int brightness;
+ int hue;
+ int rgain;
+ int ggain;
+ int bgain;
+ int expose_h;
+ int expose_m;
+ int expose_l;
+ int resetlevel;
+
+ int enhance;
+
+ int format;
+ int sizes;
+ int *width;
+ int *height;
+ int cwidth; /* current width */
+ int cheight; /* current height */
+ int palette;
+ int maxframesize;
+ int cframesize; /* current framesize */
+
+ struct semaphore lock;
+ int user; /* user count for exclusive use */
+ int removed; /* device disconnected */
+
+ int streaming; /* Are we streaming video? */
+
+ char *fbuf; /* Videodev buffer area */
+
+ struct urb *urb[SE401_NUMSBUF];
+ struct urb *inturb;
+
+ int button;
+ int buttonpressed;
+
+ int curframe; /* Current receiving frame */
+ struct se401_frame frame[SE401_NUMFRAMES];
+ int readcount;
+ int framecount;
+ int error;
+ int dropped;
+
+ int scratch_next;
+ int scratch_use;
+ int scratch_overflow;
+ struct se401_scratch scratch[SE401_NUMSCRATCH];
+
+ /* Decoder specific data: */
+ unsigned char vlcdata[SE401_VLCDATALEN];
+ int vlcdatapos;
+ int bayeroffset;
+
+ struct se401_sbuf sbuf[SE401_NUMSBUF];
+
+ wait_queue_head_t wq; /* Processes waiting */
+
+ int nullpackets;
+};
+
+
+
+#endif
+
diff --git a/drivers/usb/media/sn9c102.h b/drivers/usb/media/sn9c102.h
new file mode 100644
index 000000000000..8b8a4c8743f8
--- /dev/null
+++ b/drivers/usb/media/sn9c102.h
@@ -0,0 +1,206 @@
+/***************************************************************************
+ * V4L2 driver for SN9C10x PC Camera Controllers *
+ * *
+ * Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#ifndef _SN9C102_H_
+#define _SN9C102_H_
+
+#include <linux/version.h>
+#include <linux/usb.h>
+#include <linux/videodev.h>
+#include <linux/device.h>
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <linux/time.h>
+#include <linux/wait.h>
+#include <linux/types.h>
+#include <linux/param.h>
+#include <linux/rwsem.h>
+#include <asm/semaphore.h>
+
+#include "sn9c102_sensor.h"
+
+/*****************************************************************************/
+
+#define SN9C102_DEBUG
+#define SN9C102_DEBUG_LEVEL 2
+#define SN9C102_MAX_DEVICES 64
+#define SN9C102_PRESERVE_IMGSCALE 0
+#define SN9C102_FORCE_MUNMAP 0
+#define SN9C102_MAX_FRAMES 32
+#define SN9C102_URBS 2
+#define SN9C102_ISO_PACKETS 7
+#define SN9C102_ALTERNATE_SETTING 8
+#define SN9C102_URB_TIMEOUT msecs_to_jiffies(2 * SN9C102_ISO_PACKETS)
+#define SN9C102_CTRL_TIMEOUT 300
+
+/*****************************************************************************/
+
+#define SN9C102_MODULE_NAME "V4L2 driver for SN9C10x PC Camera Controllers"
+#define SN9C102_MODULE_AUTHOR "(C) 2004-2005 Luca Risolia"
+#define SN9C102_AUTHOR_EMAIL "<luca.risolia@studio.unibo.it>"
+#define SN9C102_MODULE_LICENSE "GPL"
+#define SN9C102_MODULE_VERSION "1:1.24"
+#define SN9C102_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 24)
+
+enum sn9c102_bridge {
+ BRIDGE_SN9C101 = 0x01,
+ BRIDGE_SN9C102 = 0x02,
+ BRIDGE_SN9C103 = 0x04,
+};
+
+SN9C102_ID_TABLE
+SN9C102_SENSOR_TABLE
+
+enum sn9c102_frame_state {
+ F_UNUSED,
+ F_QUEUED,
+ F_GRABBING,
+ F_DONE,
+ F_ERROR,
+};
+
+struct sn9c102_frame_t {
+ void* bufmem;
+ struct v4l2_buffer buf;
+ enum sn9c102_frame_state state;
+ struct list_head frame;
+ unsigned long vma_use_count;
+};
+
+enum sn9c102_dev_state {
+ DEV_INITIALIZED = 0x01,
+ DEV_DISCONNECTED = 0x02,
+ DEV_MISCONFIGURED = 0x04,
+};
+
+enum sn9c102_io_method {
+ IO_NONE,
+ IO_READ,
+ IO_MMAP,
+};
+
+enum sn9c102_stream_state {
+ STREAM_OFF,
+ STREAM_INTERRUPT,
+ STREAM_ON,
+};
+
+typedef char sn9c102_sof_header_t[12];
+typedef char sn9c102_eof_header_t[4];
+
+struct sn9c102_sysfs_attr {
+ u8 reg, i2c_reg;
+ sn9c102_sof_header_t frame_header;
+};
+
+struct sn9c102_module_param {
+ u8 force_munmap;
+};
+
+static DECLARE_MUTEX(sn9c102_sysfs_lock);
+static DECLARE_RWSEM(sn9c102_disconnect);
+
+struct sn9c102_device {
+ struct device dev;
+
+ struct video_device* v4ldev;
+
+ enum sn9c102_bridge bridge;
+ struct sn9c102_sensor* sensor;
+
+ struct usb_device* usbdev;
+ struct urb* urb[SN9C102_URBS];
+ void* transfer_buffer[SN9C102_URBS];
+ u8* control_buffer;
+
+ struct sn9c102_frame_t *frame_current, frame[SN9C102_MAX_FRAMES];
+ struct list_head inqueue, outqueue;
+ u32 frame_count, nbuffers, nreadbuffers;
+
+ enum sn9c102_io_method io;
+ enum sn9c102_stream_state stream;
+
+ struct v4l2_jpegcompression compression;
+
+ struct sn9c102_sysfs_attr sysfs;
+ sn9c102_sof_header_t sof_header;
+ u16 reg[32];
+
+ struct sn9c102_module_param module_param;
+
+ enum sn9c102_dev_state state;
+ u8 users;
+
+ struct semaphore dev_sem, fileop_sem;
+ spinlock_t queue_lock;
+ wait_queue_head_t open, wait_frame, wait_stream;
+};
+
+/*****************************************************************************/
+
+void
+sn9c102_attach_sensor(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor)
+{
+ cam->sensor = sensor;
+ cam->sensor->dev = &cam->dev;
+ cam->sensor->usbdev = cam->usbdev;
+}
+
+/*****************************************************************************/
+
+#undef DBG
+#undef KDBG
+#ifdef SN9C102_DEBUG
+# define DBG(level, fmt, args...) \
+{ \
+ if (debug >= (level)) { \
+ if ((level) == 1) \
+ dev_err(&cam->dev, fmt "\n", ## args); \
+ else if ((level) == 2) \
+ dev_info(&cam->dev, fmt "\n", ## args); \
+ else if ((level) >= 3) \
+ dev_info(&cam->dev, "[%s:%d] " fmt "\n", \
+ __FUNCTION__, __LINE__ , ## args); \
+ } \
+}
+# define KDBG(level, fmt, args...) \
+{ \
+ if (debug >= (level)) { \
+ if ((level) == 1 || (level) == 2) \
+ pr_info("sn9c102: " fmt "\n", ## args); \
+ else if ((level) == 3) \
+ pr_debug("sn9c102: [%s:%d] " fmt "\n", __FUNCTION__, \
+ __LINE__ , ## args); \
+ } \
+}
+#else
+# define KDBG(level, fmt, args...) do {;} while(0);
+# define DBG(level, fmt, args...) do {;} while(0);
+#endif
+
+#undef PDBG
+#define PDBG(fmt, args...) \
+dev_info(&cam->dev, "[%s:%d] " fmt "\n", __FUNCTION__, __LINE__ , ## args);
+
+#undef PDBGG
+#define PDBGG(fmt, args...) do {;} while(0); /* placeholder */
+
+#endif /* _SN9C102_H_ */
diff --git a/drivers/usb/media/sn9c102_core.c b/drivers/usb/media/sn9c102_core.c
new file mode 100644
index 000000000000..898401cf7dcc
--- /dev/null
+++ b/drivers/usb/media/sn9c102_core.c
@@ -0,0 +1,2744 @@
+/***************************************************************************
+ * V4L2 driver for SN9C10x PC Camera Controllers *
+ * *
+ * Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/param.h>
+#include <linux/moduleparam.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/device.h>
+#include <linux/fs.h>
+#include <linux/delay.h>
+#include <linux/stddef.h>
+#include <linux/compiler.h>
+#include <linux/ioctl.h>
+#include <linux/poll.h>
+#include <linux/stat.h>
+#include <linux/mm.h>
+#include <linux/vmalloc.h>
+#include <linux/page-flags.h>
+#include <linux/byteorder/generic.h>
+#include <asm/page.h>
+#include <asm/uaccess.h>
+
+#include "sn9c102.h"
+
+/*****************************************************************************/
+
+MODULE_DEVICE_TABLE(usb, sn9c102_id_table);
+
+MODULE_AUTHOR(SN9C102_MODULE_AUTHOR " " SN9C102_AUTHOR_EMAIL);
+MODULE_DESCRIPTION(SN9C102_MODULE_NAME);
+MODULE_VERSION(SN9C102_MODULE_VERSION);
+MODULE_LICENSE(SN9C102_MODULE_LICENSE);
+
+static short video_nr[] = {[0 ... SN9C102_MAX_DEVICES-1] = -1};
+module_param_array(video_nr, short, NULL, 0444);
+MODULE_PARM_DESC(video_nr,
+ "\n<-1|n[,...]> Specify V4L2 minor mode number."
+ "\n -1 = use next available (default)"
+ "\n n = use minor number n (integer >= 0)"
+ "\nYou can specify up to "__MODULE_STRING(SN9C102_MAX_DEVICES)
+ " cameras this way."
+ "\nFor example:"
+ "\nvideo_nr=-1,2,-1 would assign minor number 2 to"
+ "\nthe second camera and use auto for the first"
+ "\none and for every other camera."
+ "\n");
+
+static short force_munmap[] = {[0 ... SN9C102_MAX_DEVICES-1] =
+ SN9C102_FORCE_MUNMAP};
+module_param_array(force_munmap, bool, NULL, 0444);
+MODULE_PARM_DESC(force_munmap,
+ "\n<0|1[,...]> Force the application to unmap previously "
+ "\nmapped buffer memory before calling any VIDIOC_S_CROP or "
+ "\nVIDIOC_S_FMT ioctl's. Not all the applications support "
+ "\nthis feature. This parameter is specific for each "
+ "\ndetected camera."
+ "\n 0 = do not force memory unmapping"
+ "\n 1 = force memory unmapping (save memory)"
+ "\nDefault value is "__MODULE_STRING(SN9C102_FORCE_MUNMAP)"."
+ "\n");
+
+#ifdef SN9C102_DEBUG
+static unsigned short debug = SN9C102_DEBUG_LEVEL;
+module_param(debug, ushort, 0644);
+MODULE_PARM_DESC(debug,
+ "\n<n> Debugging information level, from 0 to 3:"
+ "\n0 = none (use carefully)"
+ "\n1 = critical errors"
+ "\n2 = significant informations"
+ "\n3 = more verbose messages"
+ "\nLevel 3 is useful for testing only, when only "
+ "one device is used."
+ "\nDefault value is "__MODULE_STRING(SN9C102_DEBUG_LEVEL)"."
+ "\n");
+#endif
+
+/*****************************************************************************/
+
+static sn9c102_sof_header_t sn9c102_sof_header[] = {
+ {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96, 0x00},
+ {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96, 0x01},
+};
+
+
+static sn9c102_eof_header_t sn9c102_eof_header[] = {
+ {0x00, 0x00, 0x00, 0x00},
+ {0x40, 0x00, 0x00, 0x00},
+ {0x80, 0x00, 0x00, 0x00},
+ {0xc0, 0x00, 0x00, 0x00},
+};
+
+/*****************************************************************************/
+
+static void* rvmalloc(size_t size)
+{
+ void* mem;
+ unsigned long adr;
+
+ size = PAGE_ALIGN(size);
+
+ mem = vmalloc_32((unsigned long)size);
+ if (!mem)
+ return NULL;
+
+ memset(mem, 0, size);
+
+ adr = (unsigned long)mem;
+ while (size > 0) {
+ SetPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+
+ return mem;
+}
+
+
+static void rvfree(void* mem, size_t size)
+{
+ unsigned long adr;
+
+ if (!mem)
+ return;
+
+ size = PAGE_ALIGN(size);
+
+ adr = (unsigned long)mem;
+ while (size > 0) {
+ ClearPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+
+ vfree(mem);
+}
+
+
+static u32
+sn9c102_request_buffers(struct sn9c102_device* cam, u32 count,
+ enum sn9c102_io_method io)
+{
+ struct v4l2_pix_format* p = &(cam->sensor->pix_format);
+ struct v4l2_rect* r = &(cam->sensor->cropcap.bounds);
+ const size_t imagesize = cam->module_param.force_munmap ||
+ io == IO_READ ?
+ (p->width * p->height * p->priv) / 8 :
+ (r->width * r->height * p->priv) / 8;
+ void* buff = NULL;
+ u32 i;
+
+ if (count > SN9C102_MAX_FRAMES)
+ count = SN9C102_MAX_FRAMES;
+
+ cam->nbuffers = count;
+ while (cam->nbuffers > 0) {
+ if ((buff = rvmalloc(cam->nbuffers * PAGE_ALIGN(imagesize))))
+ break;
+ cam->nbuffers--;
+ }
+
+ for (i = 0; i < cam->nbuffers; i++) {
+ cam->frame[i].bufmem = buff + i*PAGE_ALIGN(imagesize);
+ cam->frame[i].buf.index = i;
+ cam->frame[i].buf.m.offset = i*PAGE_ALIGN(imagesize);
+ cam->frame[i].buf.length = imagesize;
+ cam->frame[i].buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ cam->frame[i].buf.sequence = 0;
+ cam->frame[i].buf.field = V4L2_FIELD_NONE;
+ cam->frame[i].buf.memory = V4L2_MEMORY_MMAP;
+ cam->frame[i].buf.flags = 0;
+ }
+
+ return cam->nbuffers;
+}
+
+
+static void sn9c102_release_buffers(struct sn9c102_device* cam)
+{
+ if (cam->nbuffers) {
+ rvfree(cam->frame[0].bufmem,
+ cam->nbuffers * cam->frame[0].buf.length);
+ cam->nbuffers = 0;
+ }
+}
+
+
+static void sn9c102_empty_framequeues(struct sn9c102_device* cam)
+{
+ u32 i;
+
+ INIT_LIST_HEAD(&cam->inqueue);
+ INIT_LIST_HEAD(&cam->outqueue);
+
+ for (i = 0; i < SN9C102_MAX_FRAMES; i++) {
+ cam->frame[i].state = F_UNUSED;
+ cam->frame[i].buf.bytesused = 0;
+ }
+}
+
+
+static void sn9c102_queue_unusedframes(struct sn9c102_device* cam)
+{
+ unsigned long lock_flags;
+ u32 i;
+
+ for (i = 0; i < cam->nbuffers; i++)
+ if (cam->frame[i].state == F_UNUSED) {
+ cam->frame[i].state = F_QUEUED;
+ spin_lock_irqsave(&cam->queue_lock, lock_flags);
+ list_add_tail(&cam->frame[i].frame, &cam->inqueue);
+ spin_unlock_irqrestore(&cam->queue_lock, lock_flags);
+ }
+}
+
+/*****************************************************************************/
+
+int sn9c102_write_reg(struct sn9c102_device* cam, u8 value, u16 index)
+{
+ struct usb_device* udev = cam->usbdev;
+ u8* buff = cam->control_buffer;
+ int res;
+
+ *buff = value;
+
+ res = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x08, 0x41,
+ index, 0, buff, 1, SN9C102_CTRL_TIMEOUT);
+ if (res < 0) {
+ DBG(3, "Failed to write a register (value 0x%02X, index "
+ "0x%02X, error %d)", value, index, res)
+ return -1;
+ }
+
+ cam->reg[index] = value;
+
+ return 0;
+}
+
+
+/* NOTE: reading some registers always returns 0 */
+static int sn9c102_read_reg(struct sn9c102_device* cam, u16 index)
+{
+ struct usb_device* udev = cam->usbdev;
+ u8* buff = cam->control_buffer;
+ int res;
+
+ res = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 0x00, 0xc1,
+ index, 0, buff, 1, SN9C102_CTRL_TIMEOUT);
+ if (res < 0)
+ DBG(3, "Failed to read a register (index 0x%02X, error %d)",
+ index, res)
+
+ return (res >= 0) ? (int)(*buff) : -1;
+}
+
+
+int sn9c102_pread_reg(struct sn9c102_device* cam, u16 index)
+{
+ if (index > 0x1f)
+ return -EINVAL;
+
+ return cam->reg[index];
+}
+
+
+static int
+sn9c102_i2c_wait(struct sn9c102_device* cam, struct sn9c102_sensor* sensor)
+{
+ int i, r;
+
+ for (i = 1; i <= 5; i++) {
+ r = sn9c102_read_reg(cam, 0x08);
+ if (r < 0)
+ return -EIO;
+ if (r & 0x04)
+ return 0;
+ if (sensor->frequency & SN9C102_I2C_400KHZ)
+ udelay(5*16);
+ else
+ udelay(16*16);
+ }
+ return -EBUSY;
+}
+
+
+static int
+sn9c102_i2c_detect_read_error(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor)
+{
+ int r;
+ r = sn9c102_read_reg(cam, 0x08);
+ return (r < 0 || (r >= 0 && !(r & 0x08))) ? -EIO : 0;
+}
+
+
+static int
+sn9c102_i2c_detect_write_error(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor)
+{
+ int r;
+ r = sn9c102_read_reg(cam, 0x08);
+ return (r < 0 || (r >= 0 && (r & 0x08))) ? -EIO : 0;
+}
+
+
+int
+sn9c102_i2c_try_raw_read(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor, u8 data0, u8 data1,
+ u8 n, u8 buffer[])
+{
+ struct usb_device* udev = cam->usbdev;
+ u8* data = cam->control_buffer;
+ int err = 0, res;
+
+ /* Write cycle */
+ data[0] = ((sensor->interface == SN9C102_I2C_2WIRES) ? 0x80 : 0) |
+ ((sensor->frequency & SN9C102_I2C_400KHZ) ? 0x01 : 0) | 0x10;
+ data[1] = data0; /* I2C slave id */
+ data[2] = data1; /* address */
+ data[7] = 0x10;
+ res = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x08, 0x41,
+ 0x08, 0, data, 8, SN9C102_CTRL_TIMEOUT);
+ if (res < 0)
+ err += res;
+
+ err += sn9c102_i2c_wait(cam, sensor);
+
+ /* Read cycle - n bytes */
+ data[0] = ((sensor->interface == SN9C102_I2C_2WIRES) ? 0x80 : 0) |
+ ((sensor->frequency & SN9C102_I2C_400KHZ) ? 0x01 : 0) |
+ (n << 4) | 0x02;
+ data[1] = data0;
+ data[7] = 0x10;
+ res = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x08, 0x41,
+ 0x08, 0, data, 8, SN9C102_CTRL_TIMEOUT);
+ if (res < 0)
+ err += res;
+
+ err += sn9c102_i2c_wait(cam, sensor);
+
+ /* The first read byte will be placed in data[4] */
+ res = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 0x00, 0xc1,
+ 0x0a, 0, data, 5, SN9C102_CTRL_TIMEOUT);
+ if (res < 0)
+ err += res;
+
+ err += sn9c102_i2c_detect_read_error(cam, sensor);
+
+ PDBGG("I2C read: address 0x%02X, first read byte: 0x%02X", data1,
+ data[4])
+
+ if (err) {
+ DBG(3, "I2C read failed for %s image sensor", sensor->name)
+ return -1;
+ }
+
+ if (buffer)
+ memcpy(buffer, data, sizeof(buffer));
+
+ return (int)data[4];
+}
+
+
+int
+sn9c102_i2c_try_raw_write(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor, u8 n, u8 data0,
+ u8 data1, u8 data2, u8 data3, u8 data4, u8 data5)
+{
+ struct usb_device* udev = cam->usbdev;
+ u8* data = cam->control_buffer;
+ int err = 0, res;
+
+ /* Write cycle. It usually is address + value */
+ data[0] = ((sensor->interface == SN9C102_I2C_2WIRES) ? 0x80 : 0) |
+ ((sensor->frequency & SN9C102_I2C_400KHZ) ? 0x01 : 0)
+ | ((n - 1) << 4);
+ data[1] = data0;
+ data[2] = data1;
+ data[3] = data2;
+ data[4] = data3;
+ data[5] = data4;
+ data[6] = data5;
+ data[7] = 0x14;
+ res = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x08, 0x41,
+ 0x08, 0, data, 8, SN9C102_CTRL_TIMEOUT);
+ if (res < 0)
+ err += res;
+
+ err += sn9c102_i2c_wait(cam, sensor);
+ err += sn9c102_i2c_detect_write_error(cam, sensor);
+
+ if (err)
+ DBG(3, "I2C write failed for %s image sensor", sensor->name)
+
+ PDBGG("I2C raw write: %u bytes, data0 = 0x%02X, data1 = 0x%02X, "
+ "data2 = 0x%02X, data3 = 0x%02X, data4 = 0x%02X, data5 = 0x%02X",
+ n, data0, data1, data2, data3, data4, data5)
+
+ return err ? -1 : 0;
+}
+
+
+int
+sn9c102_i2c_try_read(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor, u8 address)
+{
+ return sn9c102_i2c_try_raw_read(cam, sensor, sensor->i2c_slave_id,
+ address, 1, NULL);
+}
+
+
+int
+sn9c102_i2c_try_write(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor, u8 address, u8 value)
+{
+ return sn9c102_i2c_try_raw_write(cam, sensor, 3,
+ sensor->i2c_slave_id, address,
+ value, 0, 0, 0);
+}
+
+
+int sn9c102_i2c_read(struct sn9c102_device* cam, u8 address)
+{
+ if (!cam->sensor)
+ return -1;
+
+ return sn9c102_i2c_try_read(cam, cam->sensor, address);
+}
+
+
+int sn9c102_i2c_write(struct sn9c102_device* cam, u8 address, u8 value)
+{
+ if (!cam->sensor)
+ return -1;
+
+ return sn9c102_i2c_try_write(cam, cam->sensor, address, value);
+}
+
+/*****************************************************************************/
+
+static void*
+sn9c102_find_sof_header(struct sn9c102_device* cam, void* mem, size_t len)
+{
+ size_t soflen = sizeof(sn9c102_sof_header_t), i;
+ u8 j, n = sizeof(sn9c102_sof_header) / soflen;
+
+ for (i = 0; (len >= soflen) && (i <= len - soflen); i++)
+ for (j = 0; j < n; j++)
+ /* It's enough to compare 7 bytes */
+ if (!memcmp(mem + i, sn9c102_sof_header[j], 7)) {
+ memcpy(cam->sof_header, mem + i, soflen);
+ /* Skip the header */
+ return mem + i + soflen;
+ }
+
+ return NULL;
+}
+
+
+static void*
+sn9c102_find_eof_header(struct sn9c102_device* cam, void* mem, size_t len)
+{
+ size_t eoflen = sizeof(sn9c102_eof_header_t), i;
+ unsigned j, n = sizeof(sn9c102_eof_header) / eoflen;
+
+ if (cam->sensor->pix_format.pixelformat == V4L2_PIX_FMT_SN9C10X)
+ return NULL; /* EOF header does not exist in compressed data */
+
+ for (i = 0; (len >= eoflen) && (i <= len - eoflen); i++)
+ for (j = 0; j < n; j++)
+ if (!memcmp(mem + i, sn9c102_eof_header[j], eoflen))
+ return mem + i;
+
+ return NULL;
+}
+
+
+static void sn9c102_urb_complete(struct urb *urb, struct pt_regs* regs)
+{
+ struct sn9c102_device* cam = urb->context;
+ struct sn9c102_frame_t** f;
+ size_t imagesize;
+ unsigned long lock_flags;
+ u8 i;
+ int err = 0;
+
+ if (urb->status == -ENOENT)
+ return;
+
+ f = &cam->frame_current;
+
+ if (cam->stream == STREAM_INTERRUPT) {
+ cam->stream = STREAM_OFF;
+ if ((*f))
+ (*f)->state = F_QUEUED;
+ DBG(3, "Stream interrupted")
+ wake_up_interruptible(&cam->wait_stream);
+ }
+
+ if (cam->state & DEV_DISCONNECTED)
+ return;
+
+ if (cam->state & DEV_MISCONFIGURED) {
+ wake_up_interruptible(&cam->wait_frame);
+ return;
+ }
+
+ if (cam->stream == STREAM_OFF || list_empty(&cam->inqueue))
+ goto resubmit_urb;
+
+ if (!(*f))
+ (*f) = list_entry(cam->inqueue.next, struct sn9c102_frame_t,
+ frame);
+
+ imagesize = (cam->sensor->pix_format.width *
+ cam->sensor->pix_format.height *
+ cam->sensor->pix_format.priv) / 8;
+
+ for (i = 0; i < urb->number_of_packets; i++) {
+ unsigned int img, len, status;
+ void *pos, *sof, *eof;
+
+ len = urb->iso_frame_desc[i].actual_length;
+ status = urb->iso_frame_desc[i].status;
+ pos = urb->iso_frame_desc[i].offset + urb->transfer_buffer;
+
+ if (status) {
+ DBG(3, "Error in isochronous frame")
+ (*f)->state = F_ERROR;
+ continue;
+ }
+
+ PDBGG("Isochrnous frame: length %u, #%u i", len, i)
+
+ /*
+ NOTE: It is probably correct to assume that SOF and EOF
+ headers do not occur between two consecutive packets,
+ but who knows..Whatever is the truth, this assumption
+ doesn't introduce bugs.
+ */
+
+redo:
+ sof = sn9c102_find_sof_header(cam, pos, len);
+ if (!sof) {
+ eof = sn9c102_find_eof_header(cam, pos, len);
+ if ((*f)->state == F_GRABBING) {
+end_of_frame:
+ img = len;
+
+ if (eof)
+ img = (eof > pos) ? eof - pos - 1 : 0;
+
+ if ((*f)->buf.bytesused+img > imagesize) {
+ u32 b = (*f)->buf.bytesused + img -
+ imagesize;
+ img = imagesize - (*f)->buf.bytesused;
+ DBG(3, "Expected EOF not found: "
+ "video frame cut")
+ if (eof)
+ DBG(3, "Exceeded limit: +%u "
+ "bytes", (unsigned)(b))
+ }
+
+ memcpy((*f)->bufmem + (*f)->buf.bytesused, pos,
+ img);
+
+ if ((*f)->buf.bytesused == 0)
+ do_gettimeofday(&(*f)->buf.timestamp);
+
+ (*f)->buf.bytesused += img;
+
+ if ((*f)->buf.bytesused == imagesize ||
+ (cam->sensor->pix_format.pixelformat ==
+ V4L2_PIX_FMT_SN9C10X && eof)) {
+ u32 b = (*f)->buf.bytesused;
+ (*f)->state = F_DONE;
+ (*f)->buf.sequence= ++cam->frame_count;
+ spin_lock_irqsave(&cam->queue_lock,
+ lock_flags);
+ list_move_tail(&(*f)->frame,
+ &cam->outqueue);
+ if (!list_empty(&cam->inqueue))
+ (*f) = list_entry(
+ cam->inqueue.next,
+ struct sn9c102_frame_t,
+ frame );
+ else
+ (*f) = NULL;
+ spin_unlock_irqrestore(&cam->queue_lock
+ , lock_flags);
+ memcpy(cam->sysfs.frame_header,
+ cam->sof_header,
+ sizeof(sn9c102_sof_header_t));
+ DBG(3, "Video frame captured: "
+ "%lu bytes", (unsigned long)(b))
+
+ if (!(*f))
+ goto resubmit_urb;
+
+ } else if (eof) {
+ (*f)->state = F_ERROR;
+ DBG(3, "Not expected EOF after %lu "
+ "bytes of image data",
+ (unsigned long)((*f)->buf.bytesused))
+ }
+
+ if (sof) /* (1) */
+ goto start_of_frame;
+
+ } else if (eof) {
+ DBG(3, "EOF without SOF")
+ continue;
+
+ } else {
+ PDBGG("Ignoring pointless isochronous frame")
+ continue;
+ }
+
+ } else if ((*f)->state == F_QUEUED || (*f)->state == F_ERROR) {
+start_of_frame:
+ (*f)->state = F_GRABBING;
+ (*f)->buf.bytesused = 0;
+ len -= (sof - pos);
+ pos = sof;
+ DBG(3, "SOF detected: new video frame")
+ if (len)
+ goto redo;
+
+ } else if ((*f)->state == F_GRABBING) {
+ eof = sn9c102_find_eof_header(cam, pos, len);
+ if (eof && eof < sof)
+ goto end_of_frame; /* (1) */
+ else {
+ if (cam->sensor->pix_format.pixelformat ==
+ V4L2_PIX_FMT_SN9C10X) {
+ eof = sof-sizeof(sn9c102_sof_header_t);
+ goto end_of_frame;
+ } else {
+ DBG(3, "SOF before expected EOF after "
+ "%lu bytes of image data",
+ (unsigned long)((*f)->buf.bytesused))
+ goto start_of_frame;
+ }
+ }
+ }
+ }
+
+resubmit_urb:
+ urb->dev = cam->usbdev;
+ err = usb_submit_urb(urb, GFP_ATOMIC);
+ if (err < 0 && err != -EPERM) {
+ cam->state |= DEV_MISCONFIGURED;
+ DBG(1, "usb_submit_urb() failed")
+ }
+
+ wake_up_interruptible(&cam->wait_frame);
+}
+
+
+static int sn9c102_start_transfer(struct sn9c102_device* cam)
+{
+ struct usb_device *udev = cam->usbdev;
+ struct urb* urb;
+ const unsigned int wMaxPacketSize[] = {0, 128, 256, 384, 512,
+ 680, 800, 900, 1023};
+ const unsigned int psz = wMaxPacketSize[SN9C102_ALTERNATE_SETTING];
+ s8 i, j;
+ int err = 0;
+
+ for (i = 0; i < SN9C102_URBS; i++) {
+ cam->transfer_buffer[i] = kmalloc(SN9C102_ISO_PACKETS * psz,
+ GFP_KERNEL);
+ if (!cam->transfer_buffer[i]) {
+ err = -ENOMEM;
+ DBG(1, "Not enough memory")
+ goto free_buffers;
+ }
+ }
+
+ for (i = 0; i < SN9C102_URBS; i++) {
+ urb = usb_alloc_urb(SN9C102_ISO_PACKETS, GFP_KERNEL);
+ cam->urb[i] = urb;
+ if (!urb) {
+ err = -ENOMEM;
+ DBG(1, "usb_alloc_urb() failed")
+ goto free_urbs;
+ }
+ urb->dev = udev;
+ urb->context = cam;
+ urb->pipe = usb_rcvisocpipe(udev, 1);
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = SN9C102_ISO_PACKETS;
+ urb->complete = sn9c102_urb_complete;
+ urb->transfer_buffer = cam->transfer_buffer[i];
+ urb->transfer_buffer_length = psz * SN9C102_ISO_PACKETS;
+ urb->interval = 1;
+ for (j = 0; j < SN9C102_ISO_PACKETS; j++) {
+ urb->iso_frame_desc[j].offset = psz * j;
+ urb->iso_frame_desc[j].length = psz;
+ }
+ }
+
+ /* Enable video */
+ if (!(cam->reg[0x01] & 0x04)) {
+ err = sn9c102_write_reg(cam, cam->reg[0x01] | 0x04, 0x01);
+ if (err) {
+ err = -EIO;
+ DBG(1, "I/O hardware error")
+ goto free_urbs;
+ }
+ }
+
+ err = usb_set_interface(udev, 0, SN9C102_ALTERNATE_SETTING);
+ if (err) {
+ DBG(1, "usb_set_interface() failed")
+ goto free_urbs;
+ }
+
+ cam->frame_current = NULL;
+
+ for (i = 0; i < SN9C102_URBS; i++) {
+ err = usb_submit_urb(cam->urb[i], GFP_KERNEL);
+ if (err) {
+ for (j = i-1; j >= 0; j--)
+ usb_kill_urb(cam->urb[j]);
+ DBG(1, "usb_submit_urb() failed, error %d", err)
+ goto free_urbs;
+ }
+ }
+
+ return 0;
+
+free_urbs:
+ for (i = 0; (i < SN9C102_URBS) && cam->urb[i]; i++)
+ usb_free_urb(cam->urb[i]);
+
+free_buffers:
+ for (i = 0; (i < SN9C102_URBS) && cam->transfer_buffer[i]; i++)
+ kfree(cam->transfer_buffer[i]);
+
+ return err;
+}
+
+
+static int sn9c102_stop_transfer(struct sn9c102_device* cam)
+{
+ struct usb_device *udev = cam->usbdev;
+ s8 i;
+ int err = 0;
+
+ if (cam->state & DEV_DISCONNECTED)
+ return 0;
+
+ for (i = SN9C102_URBS-1; i >= 0; i--) {
+ usb_kill_urb(cam->urb[i]);
+ usb_free_urb(cam->urb[i]);
+ kfree(cam->transfer_buffer[i]);
+ }
+
+ err = usb_set_interface(udev, 0, 0); /* 0 Mb/s */
+ if (err)
+ DBG(3, "usb_set_interface() failed")
+
+ return err;
+}
+
+
+int sn9c102_stream_interrupt(struct sn9c102_device* cam)
+{
+ int err = 0;
+
+ cam->stream = STREAM_INTERRUPT;
+ err = wait_event_timeout(cam->wait_stream,
+ (cam->stream == STREAM_OFF) ||
+ (cam->state & DEV_DISCONNECTED),
+ SN9C102_URB_TIMEOUT);
+ if (cam->state & DEV_DISCONNECTED)
+ return -ENODEV;
+ else if (err) {
+ cam->state |= DEV_MISCONFIGURED;
+ DBG(1, "The camera is misconfigured. To use it, close and "
+ "open /dev/video%d again.", cam->v4ldev->minor)
+ return err;
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+
+static u8 sn9c102_strtou8(const char* buff, size_t len, ssize_t* count)
+{
+ char str[5];
+ char* endp;
+ unsigned long val;
+
+ if (len < 4) {
+ strncpy(str, buff, len);
+ str[len+1] = '\0';
+ } else {
+ strncpy(str, buff, 4);
+ str[4] = '\0';
+ }
+
+ val = simple_strtoul(str, &endp, 0);
+
+ *count = 0;
+ if (val <= 0xff)
+ *count = (ssize_t)(endp - str);
+ if ((*count) && (len == *count+1) && (buff[*count] == '\n'))
+ *count += 1;
+
+ return (u8)val;
+}
+
+/*
+ NOTE 1: being inside one of the following methods implies that the v4l
+ device exists for sure (see kobjects and reference counters)
+ NOTE 2: buffers are PAGE_SIZE long
+*/
+
+static ssize_t sn9c102_show_reg(struct class_device* cd, char* buf)
+{
+ struct sn9c102_device* cam;
+ ssize_t count;
+
+ if (down_interruptible(&sn9c102_sysfs_lock))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam) {
+ up(&sn9c102_sysfs_lock);
+ return -ENODEV;
+ }
+
+ count = sprintf(buf, "%u\n", cam->sysfs.reg);
+
+ up(&sn9c102_sysfs_lock);
+
+ return count;
+}
+
+
+static ssize_t
+sn9c102_store_reg(struct class_device* cd, const char* buf, size_t len)
+{
+ struct sn9c102_device* cam;
+ u8 index;
+ ssize_t count;
+
+ if (down_interruptible(&sn9c102_sysfs_lock))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam) {
+ up(&sn9c102_sysfs_lock);
+ return -ENODEV;
+ }
+
+ index = sn9c102_strtou8(buf, len, &count);
+ if (index > 0x1f || !count) {
+ up(&sn9c102_sysfs_lock);
+ return -EINVAL;
+ }
+
+ cam->sysfs.reg = index;
+
+ DBG(2, "Moved SN9C10X register index to 0x%02X", cam->sysfs.reg)
+ DBG(3, "Written bytes: %zd", count)
+
+ up(&sn9c102_sysfs_lock);
+
+ return count;
+}
+
+
+static ssize_t sn9c102_show_val(struct class_device* cd, char* buf)
+{
+ struct sn9c102_device* cam;
+ ssize_t count;
+ int val;
+
+ if (down_interruptible(&sn9c102_sysfs_lock))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam) {
+ up(&sn9c102_sysfs_lock);
+ return -ENODEV;
+ }
+
+ if ((val = sn9c102_read_reg(cam, cam->sysfs.reg)) < 0) {
+ up(&sn9c102_sysfs_lock);
+ return -EIO;
+ }
+
+ count = sprintf(buf, "%d\n", val);
+
+ DBG(3, "Read bytes: %zd", count)
+
+ up(&sn9c102_sysfs_lock);
+
+ return count;
+}
+
+
+static ssize_t
+sn9c102_store_val(struct class_device* cd, const char* buf, size_t len)
+{
+ struct sn9c102_device* cam;
+ u8 value;
+ ssize_t count;
+ int err;
+
+ if (down_interruptible(&sn9c102_sysfs_lock))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam) {
+ up(&sn9c102_sysfs_lock);
+ return -ENODEV;
+ }
+
+ value = sn9c102_strtou8(buf, len, &count);
+ if (!count) {
+ up(&sn9c102_sysfs_lock);
+ return -EINVAL;
+ }
+
+ err = sn9c102_write_reg(cam, value, cam->sysfs.reg);
+ if (err) {
+ up(&sn9c102_sysfs_lock);
+ return -EIO;
+ }
+
+ DBG(2, "Written SN9C10X reg. 0x%02X, val. 0x%02X",
+ cam->sysfs.reg, value)
+ DBG(3, "Written bytes: %zd", count)
+
+ up(&sn9c102_sysfs_lock);
+
+ return count;
+}
+
+
+static ssize_t sn9c102_show_i2c_reg(struct class_device* cd, char* buf)
+{
+ struct sn9c102_device* cam;
+ ssize_t count;
+
+ if (down_interruptible(&sn9c102_sysfs_lock))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam) {
+ up(&sn9c102_sysfs_lock);
+ return -ENODEV;
+ }
+
+ count = sprintf(buf, "%u\n", cam->sysfs.i2c_reg);
+
+ DBG(3, "Read bytes: %zd", count)
+
+ up(&sn9c102_sysfs_lock);
+
+ return count;
+}
+
+
+static ssize_t
+sn9c102_store_i2c_reg(struct class_device* cd, const char* buf, size_t len)
+{
+ struct sn9c102_device* cam;
+ u8 index;
+ ssize_t count;
+
+ if (down_interruptible(&sn9c102_sysfs_lock))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam) {
+ up(&sn9c102_sysfs_lock);
+ return -ENODEV;
+ }
+
+ index = sn9c102_strtou8(buf, len, &count);
+ if (!count) {
+ up(&sn9c102_sysfs_lock);
+ return -EINVAL;
+ }
+
+ cam->sysfs.i2c_reg = index;
+
+ DBG(2, "Moved sensor register index to 0x%02X", cam->sysfs.i2c_reg)
+ DBG(3, "Written bytes: %zd", count)
+
+ up(&sn9c102_sysfs_lock);
+
+ return count;
+}
+
+
+static ssize_t sn9c102_show_i2c_val(struct class_device* cd, char* buf)
+{
+ struct sn9c102_device* cam;
+ ssize_t count;
+ int val;
+
+ if (down_interruptible(&sn9c102_sysfs_lock))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam) {
+ up(&sn9c102_sysfs_lock);
+ return -ENODEV;
+ }
+
+ if (!(cam->sensor->sysfs_ops & SN9C102_I2C_READ)) {
+ up(&sn9c102_sysfs_lock);
+ return -ENOSYS;
+ }
+
+ if ((val = sn9c102_i2c_read(cam, cam->sysfs.i2c_reg)) < 0) {
+ up(&sn9c102_sysfs_lock);
+ return -EIO;
+ }
+
+ count = sprintf(buf, "%d\n", val);
+
+ DBG(3, "Read bytes: %zd", count)
+
+ up(&sn9c102_sysfs_lock);
+
+ return count;
+}
+
+
+static ssize_t
+sn9c102_store_i2c_val(struct class_device* cd, const char* buf, size_t len)
+{
+ struct sn9c102_device* cam;
+ u8 value;
+ ssize_t count;
+ int err;
+
+ if (down_interruptible(&sn9c102_sysfs_lock))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam) {
+ up(&sn9c102_sysfs_lock);
+ return -ENODEV;
+ }
+
+ if (!(cam->sensor->sysfs_ops & SN9C102_I2C_WRITE)) {
+ up(&sn9c102_sysfs_lock);
+ return -ENOSYS;
+ }
+
+ value = sn9c102_strtou8(buf, len, &count);
+ if (!count) {
+ up(&sn9c102_sysfs_lock);
+ return -EINVAL;
+ }
+
+ err = sn9c102_i2c_write(cam, cam->sysfs.i2c_reg, value);
+ if (err) {
+ up(&sn9c102_sysfs_lock);
+ return -EIO;
+ }
+
+ DBG(2, "Written sensor reg. 0x%02X, val. 0x%02X",
+ cam->sysfs.i2c_reg, value)
+ DBG(3, "Written bytes: %zd", count)
+
+ up(&sn9c102_sysfs_lock);
+
+ return count;
+}
+
+
+static ssize_t
+sn9c102_store_green(struct class_device* cd, const char* buf, size_t len)
+{
+ struct sn9c102_device* cam;
+ enum sn9c102_bridge bridge;
+ ssize_t res = 0;
+ u8 value;
+ ssize_t count;
+
+ if (down_interruptible(&sn9c102_sysfs_lock))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam) {
+ up(&sn9c102_sysfs_lock);
+ return -ENODEV;
+ }
+
+ bridge = cam->bridge;
+
+ up(&sn9c102_sysfs_lock);
+
+ value = sn9c102_strtou8(buf, len, &count);
+ if (!count)
+ return -EINVAL;
+
+ switch (bridge) {
+ case BRIDGE_SN9C101:
+ case BRIDGE_SN9C102:
+ if (value > 0x0f)
+ return -EINVAL;
+ if ((res = sn9c102_store_reg(cd, "0x11", 4)) >= 0)
+ res = sn9c102_store_val(cd, buf, len);
+ break;
+ case BRIDGE_SN9C103:
+ if (value > 0x7f)
+ return -EINVAL;
+ if ((res = sn9c102_store_reg(cd, "0x04", 4)) >= 0)
+ res = sn9c102_store_val(cd, buf, len);
+ break;
+ }
+
+ return res;
+}
+
+
+static ssize_t
+sn9c102_store_blue(struct class_device* cd, const char* buf, size_t len)
+{
+ ssize_t res = 0;
+ u8 value;
+ ssize_t count;
+
+ value = sn9c102_strtou8(buf, len, &count);
+ if (!count || value > 0x7f)
+ return -EINVAL;
+
+ if ((res = sn9c102_store_reg(cd, "0x06", 4)) >= 0)
+ res = sn9c102_store_val(cd, buf, len);
+
+ return res;
+}
+
+
+static ssize_t
+sn9c102_store_red(struct class_device* cd, const char* buf, size_t len)
+{
+ ssize_t res = 0;
+ u8 value;
+ ssize_t count;
+
+ value = sn9c102_strtou8(buf, len, &count);
+ if (!count || value > 0x7f)
+ return -EINVAL;
+
+ if ((res = sn9c102_store_reg(cd, "0x05", 4)) >= 0)
+ res = sn9c102_store_val(cd, buf, len);
+
+ return res;
+}
+
+
+static ssize_t sn9c102_show_frame_header(struct class_device* cd, char* buf)
+{
+ struct sn9c102_device* cam;
+ ssize_t count;
+
+ cam = video_get_drvdata(to_video_device(cd));
+ if (!cam)
+ return -ENODEV;
+
+ count = sizeof(cam->sysfs.frame_header);
+ memcpy(buf, cam->sysfs.frame_header, count);
+
+ DBG(3, "Frame header, read bytes: %zd", count)
+
+ return count;
+}
+
+
+static CLASS_DEVICE_ATTR(reg, S_IRUGO | S_IWUSR,
+ sn9c102_show_reg, sn9c102_store_reg);
+static CLASS_DEVICE_ATTR(val, S_IRUGO | S_IWUSR,
+ sn9c102_show_val, sn9c102_store_val);
+static CLASS_DEVICE_ATTR(i2c_reg, S_IRUGO | S_IWUSR,
+ sn9c102_show_i2c_reg, sn9c102_store_i2c_reg);
+static CLASS_DEVICE_ATTR(i2c_val, S_IRUGO | S_IWUSR,
+ sn9c102_show_i2c_val, sn9c102_store_i2c_val);
+static CLASS_DEVICE_ATTR(green, S_IWUGO, NULL, sn9c102_store_green);
+static CLASS_DEVICE_ATTR(blue, S_IWUGO, NULL, sn9c102_store_blue);
+static CLASS_DEVICE_ATTR(red, S_IWUGO, NULL, sn9c102_store_red);
+static CLASS_DEVICE_ATTR(frame_header, S_IRUGO,
+ sn9c102_show_frame_header, NULL);
+
+
+static void sn9c102_create_sysfs(struct sn9c102_device* cam)
+{
+ struct video_device *v4ldev = cam->v4ldev;
+
+ video_device_create_file(v4ldev, &class_device_attr_reg);
+ video_device_create_file(v4ldev, &class_device_attr_val);
+ video_device_create_file(v4ldev, &class_device_attr_frame_header);
+ if (cam->bridge == BRIDGE_SN9C101 || cam->bridge == BRIDGE_SN9C102)
+ video_device_create_file(v4ldev, &class_device_attr_green);
+ else if (cam->bridge == BRIDGE_SN9C103) {
+ video_device_create_file(v4ldev, &class_device_attr_blue);
+ video_device_create_file(v4ldev, &class_device_attr_red);
+ }
+ if (cam->sensor->sysfs_ops) {
+ video_device_create_file(v4ldev, &class_device_attr_i2c_reg);
+ video_device_create_file(v4ldev, &class_device_attr_i2c_val);
+ }
+}
+
+/*****************************************************************************/
+
+static int
+sn9c102_set_pix_format(struct sn9c102_device* cam, struct v4l2_pix_format* pix)
+{
+ int err = 0;
+
+ if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+ err += sn9c102_write_reg(cam, cam->reg[0x18] | 0x80, 0x18);
+ else
+ err += sn9c102_write_reg(cam, cam->reg[0x18] & 0x7f, 0x18);
+
+ return err ? -EIO : 0;
+}
+
+
+static int
+sn9c102_set_compression(struct sn9c102_device* cam,
+ struct v4l2_jpegcompression* compression)
+{
+ int err = 0;
+
+ if (compression->quality == 0)
+ err += sn9c102_write_reg(cam, cam->reg[0x17] | 0x01, 0x17);
+ else if (compression->quality == 1)
+ err += sn9c102_write_reg(cam, cam->reg[0x17] & 0xfe, 0x17);
+
+ return err ? -EIO : 0;
+}
+
+
+static int sn9c102_set_scale(struct sn9c102_device* cam, u8 scale)
+{
+ u8 r = 0;
+ int err = 0;
+
+ if (scale == 1)
+ r = cam->reg[0x18] & 0xcf;
+ else if (scale == 2) {
+ r = cam->reg[0x18] & 0xcf;
+ r |= 0x10;
+ } else if (scale == 4)
+ r = cam->reg[0x18] | 0x20;
+
+ err += sn9c102_write_reg(cam, r, 0x18);
+ if (err)
+ return -EIO;
+
+ PDBGG("Scaling factor: %u", scale)
+
+ return 0;
+}
+
+
+static int sn9c102_set_crop(struct sn9c102_device* cam, struct v4l2_rect* rect)
+{
+ struct sn9c102_sensor* s = cam->sensor;
+ u8 h_start = (u8)(rect->left - s->cropcap.bounds.left),
+ v_start = (u8)(rect->top - s->cropcap.bounds.top),
+ h_size = (u8)(rect->width / 16),
+ v_size = (u8)(rect->height / 16);
+ int err = 0;
+
+ err += sn9c102_write_reg(cam, h_start, 0x12);
+ err += sn9c102_write_reg(cam, v_start, 0x13);
+ err += sn9c102_write_reg(cam, h_size, 0x15);
+ err += sn9c102_write_reg(cam, v_size, 0x16);
+ if (err)
+ return -EIO;
+
+ PDBGG("h_start, v_start, h_size, v_size, ho_size, vo_size "
+ "%u %u %u %u", h_start, v_start, h_size, v_size)
+
+ return 0;
+}
+
+
+static int sn9c102_init(struct sn9c102_device* cam)
+{
+ struct sn9c102_sensor* s = cam->sensor;
+ struct v4l2_control ctrl;
+ struct v4l2_queryctrl *qctrl;
+ struct v4l2_rect* rect;
+ u8 i = 0, n = 0;
+ int err = 0;
+
+ if (!(cam->state & DEV_INITIALIZED)) {
+ init_waitqueue_head(&cam->open);
+ qctrl = s->qctrl;
+ rect = &(s->cropcap.defrect);
+ } else { /* use current values */
+ qctrl = s->_qctrl;
+ rect = &(s->_rect);
+ }
+
+ err += sn9c102_set_scale(cam, rect->width / s->pix_format.width);
+ err += sn9c102_set_crop(cam, rect);
+ if (err)
+ return err;
+
+ if (s->init) {
+ err = s->init(cam);
+ if (err) {
+ DBG(3, "Sensor initialization failed")
+ return err;
+ }
+ }
+
+ if (!(cam->state & DEV_INITIALIZED))
+ cam->compression.quality = cam->reg[0x17] & 0x01 ? 0 : 1;
+ else
+ err += sn9c102_set_compression(cam, &cam->compression);
+ err += sn9c102_set_pix_format(cam, &s->pix_format);
+ if (s->set_pix_format)
+ err += s->set_pix_format(cam, &s->pix_format);
+ if (err)
+ return err;
+
+ if (s->pix_format.pixelformat == V4L2_PIX_FMT_SN9C10X)
+ DBG(3, "Compressed video format is active, quality %d",
+ cam->compression.quality)
+ else
+ DBG(3, "Uncompressed video format is active")
+
+ if (s->set_crop)
+ if ((err = s->set_crop(cam, rect))) {
+ DBG(3, "set_crop() failed")
+ return err;
+ }
+
+ if (s->set_ctrl) {
+ n = sizeof(s->qctrl) / sizeof(s->qctrl[0]);
+ for (i = 0; i < n; i++)
+ if (s->qctrl[i].id != 0 &&
+ !(s->qctrl[i].flags & V4L2_CTRL_FLAG_DISABLED)) {
+ ctrl.id = s->qctrl[i].id;
+ ctrl.value = qctrl[i].default_value;
+ err = s->set_ctrl(cam, &ctrl);
+ if (err) {
+ DBG(3, "Set %s control failed",
+ s->qctrl[i].name)
+ return err;
+ }
+ DBG(3, "Image sensor supports '%s' control",
+ s->qctrl[i].name)
+ }
+ }
+
+ if (!(cam->state & DEV_INITIALIZED)) {
+ init_MUTEX(&cam->fileop_sem);
+ spin_lock_init(&cam->queue_lock);
+ init_waitqueue_head(&cam->wait_frame);
+ init_waitqueue_head(&cam->wait_stream);
+ cam->nreadbuffers = 2;
+ memcpy(s->_qctrl, s->qctrl, sizeof(s->qctrl));
+ memcpy(&(s->_rect), &(s->cropcap.defrect),
+ sizeof(struct v4l2_rect));
+ cam->state |= DEV_INITIALIZED;
+ }
+
+ DBG(2, "Initialization succeeded")
+ return 0;
+}
+
+
+static void sn9c102_release_resources(struct sn9c102_device* cam)
+{
+ down(&sn9c102_sysfs_lock);
+
+ DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->minor)
+ video_set_drvdata(cam->v4ldev, NULL);
+ video_unregister_device(cam->v4ldev);
+
+ up(&sn9c102_sysfs_lock);
+
+ kfree(cam->control_buffer);
+}
+
+/*****************************************************************************/
+
+static int sn9c102_open(struct inode* inode, struct file* filp)
+{
+ struct sn9c102_device* cam;
+ int err = 0;
+
+ /*
+ This is the only safe way to prevent race conditions with
+ disconnect
+ */
+ if (!down_read_trylock(&sn9c102_disconnect))
+ return -ERESTARTSYS;
+
+ cam = video_get_drvdata(video_devdata(filp));
+
+ if (down_interruptible(&cam->dev_sem)) {
+ up_read(&sn9c102_disconnect);
+ return -ERESTARTSYS;
+ }
+
+ if (cam->users) {
+ DBG(2, "Device /dev/video%d is busy...", cam->v4ldev->minor)
+ if ((filp->f_flags & O_NONBLOCK) ||
+ (filp->f_flags & O_NDELAY)) {
+ err = -EWOULDBLOCK;
+ goto out;
+ }
+ up(&cam->dev_sem);
+ err = wait_event_interruptible_exclusive(cam->open,
+ cam->state & DEV_DISCONNECTED
+ || !cam->users);
+ if (err) {
+ up_read(&sn9c102_disconnect);
+ return err;
+ }
+ if (cam->state & DEV_DISCONNECTED) {
+ up_read(&sn9c102_disconnect);
+ return -ENODEV;
+ }
+ down(&cam->dev_sem);
+ }
+
+
+ if (cam->state & DEV_MISCONFIGURED) {
+ err = sn9c102_init(cam);
+ if (err) {
+ DBG(1, "Initialization failed again. "
+ "I will retry on next open().")
+ goto out;
+ }
+ cam->state &= ~DEV_MISCONFIGURED;
+ }
+
+ if ((err = sn9c102_start_transfer(cam)))
+ goto out;
+
+ filp->private_data = cam;
+ cam->users++;
+ cam->io = IO_NONE;
+ cam->stream = STREAM_OFF;
+ cam->nbuffers = 0;
+ cam->frame_count = 0;
+ sn9c102_empty_framequeues(cam);
+
+ DBG(3, "Video device /dev/video%d is open", cam->v4ldev->minor)
+
+out:
+ up(&cam->dev_sem);
+ up_read(&sn9c102_disconnect);
+ return err;
+}
+
+
+static int sn9c102_release(struct inode* inode, struct file* filp)
+{
+ struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+
+ down(&cam->dev_sem); /* prevent disconnect() to be called */
+
+ sn9c102_stop_transfer(cam);
+
+ sn9c102_release_buffers(cam);
+
+ if (cam->state & DEV_DISCONNECTED) {
+ sn9c102_release_resources(cam);
+ up(&cam->dev_sem);
+ kfree(cam);
+ return 0;
+ }
+
+ cam->users--;
+ wake_up_interruptible_nr(&cam->open, 1);
+
+ DBG(3, "Video device /dev/video%d closed", cam->v4ldev->minor)
+
+ up(&cam->dev_sem);
+
+ return 0;
+}
+
+
+static ssize_t
+sn9c102_read(struct file* filp, char __user * buf, size_t count, loff_t* f_pos)
+{
+ struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+ struct sn9c102_frame_t* f, * i;
+ unsigned long lock_flags;
+ int err = 0;
+
+ if (down_interruptible(&cam->fileop_sem))
+ return -ERESTARTSYS;
+
+ if (cam->state & DEV_DISCONNECTED) {
+ DBG(1, "Device not present")
+ up(&cam->fileop_sem);
+ return -ENODEV;
+ }
+
+ if (cam->state & DEV_MISCONFIGURED) {
+ DBG(1, "The camera is misconfigured. Close and open it again.")
+ up(&cam->fileop_sem);
+ return -EIO;
+ }
+
+ if (cam->io == IO_MMAP) {
+ DBG(3, "Close and open the device again to choose "
+ "the read method")
+ up(&cam->fileop_sem);
+ return -EINVAL;
+ }
+
+ if (cam->io == IO_NONE) {
+ if (!sn9c102_request_buffers(cam,cam->nreadbuffers, IO_READ)) {
+ DBG(1, "read() failed, not enough memory")
+ up(&cam->fileop_sem);
+ return -ENOMEM;
+ }
+ cam->io = IO_READ;
+ cam->stream = STREAM_ON;
+ sn9c102_queue_unusedframes(cam);
+ }
+
+ if (!count) {
+ up(&cam->fileop_sem);
+ return 0;
+ }
+
+ if (list_empty(&cam->outqueue)) {
+ if (filp->f_flags & O_NONBLOCK) {
+ up(&cam->fileop_sem);
+ return -EAGAIN;
+ }
+ err = wait_event_interruptible
+ ( cam->wait_frame,
+ (!list_empty(&cam->outqueue)) ||
+ (cam->state & DEV_DISCONNECTED) ||
+ (cam->state & DEV_MISCONFIGURED) );
+ if (err) {
+ up(&cam->fileop_sem);
+ return err;
+ }
+ if (cam->state & DEV_DISCONNECTED) {
+ up(&cam->fileop_sem);
+ return -ENODEV;
+ }
+ if (cam->state & DEV_MISCONFIGURED) {
+ up(&cam->fileop_sem);
+ return -EIO;
+ }
+ }
+
+ f = list_entry(cam->outqueue.prev, struct sn9c102_frame_t, frame);
+
+ spin_lock_irqsave(&cam->queue_lock, lock_flags);
+ list_for_each_entry(i, &cam->outqueue, frame)
+ i->state = F_UNUSED;
+ INIT_LIST_HEAD(&cam->outqueue);
+ spin_unlock_irqrestore(&cam->queue_lock, lock_flags);
+
+ sn9c102_queue_unusedframes(cam);
+
+ if (count > f->buf.bytesused)
+ count = f->buf.bytesused;
+
+ if (copy_to_user(buf, f->bufmem, count)) {
+ up(&cam->fileop_sem);
+ return -EFAULT;
+ }
+ *f_pos += count;
+
+ PDBGG("Frame #%lu, bytes read: %zu", (unsigned long)f->buf.index,count)
+
+ up(&cam->fileop_sem);
+
+ return count;
+}
+
+
+static unsigned int sn9c102_poll(struct file *filp, poll_table *wait)
+{
+ struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+ unsigned int mask = 0;
+
+ if (down_interruptible(&cam->fileop_sem))
+ return POLLERR;
+
+ if (cam->state & DEV_DISCONNECTED) {
+ DBG(1, "Device not present")
+ goto error;
+ }
+
+ if (cam->state & DEV_MISCONFIGURED) {
+ DBG(1, "The camera is misconfigured. Close and open it again.")
+ goto error;
+ }
+
+ if (cam->io == IO_NONE) {
+ if (!sn9c102_request_buffers(cam, cam->nreadbuffers,
+ IO_READ)) {
+ DBG(1, "poll() failed, not enough memory")
+ goto error;
+ }
+ cam->io = IO_READ;
+ cam->stream = STREAM_ON;
+ }
+
+ if (cam->io == IO_READ)
+ sn9c102_queue_unusedframes(cam);
+
+ poll_wait(filp, &cam->wait_frame, wait);
+
+ if (!list_empty(&cam->outqueue))
+ mask |= POLLIN | POLLRDNORM;
+
+ up(&cam->fileop_sem);
+
+ return mask;
+
+error:
+ up(&cam->fileop_sem);
+ return POLLERR;
+}
+
+
+static void sn9c102_vm_open(struct vm_area_struct* vma)
+{
+ struct sn9c102_frame_t* f = vma->vm_private_data;
+ f->vma_use_count++;
+}
+
+
+static void sn9c102_vm_close(struct vm_area_struct* vma)
+{
+ /* NOTE: buffers are not freed here */
+ struct sn9c102_frame_t* f = vma->vm_private_data;
+ f->vma_use_count--;
+}
+
+
+static struct vm_operations_struct sn9c102_vm_ops = {
+ .open = sn9c102_vm_open,
+ .close = sn9c102_vm_close,
+};
+
+
+static int sn9c102_mmap(struct file* filp, struct vm_area_struct *vma)
+{
+ struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+ unsigned long size = vma->vm_end - vma->vm_start,
+ start = vma->vm_start,
+ pos,
+ page;
+ u32 i;
+
+ if (down_interruptible(&cam->fileop_sem))
+ return -ERESTARTSYS;
+
+ if (cam->state & DEV_DISCONNECTED) {
+ DBG(1, "Device not present")
+ up(&cam->fileop_sem);
+ return -ENODEV;
+ }
+
+ if (cam->state & DEV_MISCONFIGURED) {
+ DBG(1, "The camera is misconfigured. Close and open it again.")
+ up(&cam->fileop_sem);
+ return -EIO;
+ }
+
+ if (cam->io != IO_MMAP || !(vma->vm_flags & VM_WRITE) ||
+ size != PAGE_ALIGN(cam->frame[0].buf.length)) {
+ up(&cam->fileop_sem);
+ return -EINVAL;
+ }
+
+ for (i = 0; i < cam->nbuffers; i++) {
+ if ((cam->frame[i].buf.m.offset>>PAGE_SHIFT) == vma->vm_pgoff)
+ break;
+ }
+ if (i == cam->nbuffers) {
+ up(&cam->fileop_sem);
+ return -EINVAL;
+ }
+
+ /* VM_IO is eventually going to replace PageReserved altogether */
+ vma->vm_flags |= VM_IO;
+ vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */
+
+ pos = (unsigned long)cam->frame[i].bufmem;
+ while (size > 0) { /* size is page-aligned */
+ page = vmalloc_to_pfn((void *)pos);
+ if (remap_pfn_range(vma, start, page, PAGE_SIZE,
+ vma->vm_page_prot)) {
+ up(&cam->fileop_sem);
+ return -EAGAIN;
+ }
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+
+ vma->vm_ops = &sn9c102_vm_ops;
+ vma->vm_private_data = &cam->frame[i];
+
+ sn9c102_vm_open(vma);
+
+ up(&cam->fileop_sem);
+
+ return 0;
+}
+
+
+static int sn9c102_ioctl_v4l2(struct inode* inode, struct file* filp,
+ unsigned int cmd, void __user * arg)
+{
+ struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+
+ switch (cmd) {
+
+ case VIDIOC_QUERYCAP:
+ {
+ struct v4l2_capability cap = {
+ .driver = "sn9c102",
+ .version = SN9C102_MODULE_VERSION_CODE,
+ .capabilities = V4L2_CAP_VIDEO_CAPTURE |
+ V4L2_CAP_READWRITE |
+ V4L2_CAP_STREAMING,
+ };
+
+ strlcpy(cap.card, cam->v4ldev->name, sizeof(cap.card));
+ if (usb_make_path(cam->usbdev, cap.bus_info,
+ sizeof(cap.bus_info)) < 0)
+ strlcpy(cap.bus_info, cam->dev.bus_id,
+ sizeof(cap.bus_info));
+
+ if (copy_to_user(arg, &cap, sizeof(cap)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOC_ENUMINPUT:
+ {
+ struct v4l2_input i;
+
+ if (copy_from_user(&i, arg, sizeof(i)))
+ return -EFAULT;
+
+ if (i.index)
+ return -EINVAL;
+
+ memset(&i, 0, sizeof(i));
+ strcpy(i.name, "USB");
+
+ if (copy_to_user(arg, &i, sizeof(i)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOC_G_INPUT:
+ case VIDIOC_S_INPUT:
+ {
+ int index;
+
+ if (copy_from_user(&index, arg, sizeof(index)))
+ return -EFAULT;
+
+ if (index != 0)
+ return -EINVAL;
+
+ return 0;
+ }
+
+ case VIDIOC_QUERYCTRL:
+ {
+ struct sn9c102_sensor* s = cam->sensor;
+ struct v4l2_queryctrl qc;
+ u8 i, n;
+
+ if (copy_from_user(&qc, arg, sizeof(qc)))
+ return -EFAULT;
+
+ n = sizeof(s->qctrl) / sizeof(s->qctrl[0]);
+ for (i = 0; i < n; i++)
+ if (qc.id && qc.id == s->qctrl[i].id) {
+ memcpy(&qc, &(s->qctrl[i]), sizeof(qc));
+ if (copy_to_user(arg, &qc, sizeof(qc)))
+ return -EFAULT;
+ return 0;
+ }
+
+ return -EINVAL;
+ }
+
+ case VIDIOC_G_CTRL:
+ {
+ struct sn9c102_sensor* s = cam->sensor;
+ struct v4l2_control ctrl;
+ int err = 0;
+
+ if (!s->get_ctrl)
+ return -EINVAL;
+
+ if (copy_from_user(&ctrl, arg, sizeof(ctrl)))
+ return -EFAULT;
+
+ err = s->get_ctrl(cam, &ctrl);
+
+ if (copy_to_user(arg, &ctrl, sizeof(ctrl)))
+ return -EFAULT;
+
+ return err;
+ }
+
+ case VIDIOC_S_CTRL_OLD:
+ case VIDIOC_S_CTRL:
+ {
+ struct sn9c102_sensor* s = cam->sensor;
+ struct v4l2_control ctrl;
+ u8 i, n;
+ int err = 0;
+
+ if (!s->set_ctrl)
+ return -EINVAL;
+
+ if (copy_from_user(&ctrl, arg, sizeof(ctrl)))
+ return -EFAULT;
+
+ n = sizeof(s->qctrl) / sizeof(s->qctrl[0]);
+ for (i = 0; i < n; i++)
+ if (ctrl.id == s->qctrl[i].id) {
+ if (ctrl.value < s->qctrl[i].minimum ||
+ ctrl.value > s->qctrl[i].maximum)
+ return -ERANGE;
+ ctrl.value -= ctrl.value % s->qctrl[i].step;
+ break;
+ }
+
+ if ((err = s->set_ctrl(cam, &ctrl)))
+ return err;
+
+ s->_qctrl[i].default_value = ctrl.value;
+
+ PDBGG("VIDIOC_S_CTRL: id %lu, value %lu",
+ (unsigned long)ctrl.id, (unsigned long)ctrl.value)
+
+ return 0;
+ }
+
+ case VIDIOC_CROPCAP:
+ {
+ struct v4l2_cropcap* cc = &(cam->sensor->cropcap);
+
+ cc->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ cc->pixelaspect.numerator = 1;
+ cc->pixelaspect.denominator = 1;
+
+ if (copy_to_user(arg, cc, sizeof(*cc)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOC_G_CROP:
+ {
+ struct sn9c102_sensor* s = cam->sensor;
+ struct v4l2_crop crop = {
+ .type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
+ };
+
+ memcpy(&(crop.c), &(s->_rect), sizeof(struct v4l2_rect));
+
+ if (copy_to_user(arg, &crop, sizeof(crop)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOC_S_CROP:
+ {
+ struct sn9c102_sensor* s = cam->sensor;
+ struct v4l2_crop crop;
+ struct v4l2_rect* rect;
+ struct v4l2_rect* bounds = &(s->cropcap.bounds);
+ struct v4l2_pix_format* pix_format = &(s->pix_format);
+ u8 scale;
+ const enum sn9c102_stream_state stream = cam->stream;
+ const u32 nbuffers = cam->nbuffers;
+ u32 i;
+ int err = 0;
+
+ if (copy_from_user(&crop, arg, sizeof(crop)))
+ return -EFAULT;
+
+ rect = &(crop.c);
+
+ if (crop.type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+ return -EINVAL;
+
+ if (cam->module_param.force_munmap)
+ for (i = 0; i < cam->nbuffers; i++)
+ if (cam->frame[i].vma_use_count) {
+ DBG(3, "VIDIOC_S_CROP failed. "
+ "Unmap the buffers first.")
+ return -EINVAL;
+ }
+
+ /* Preserve R,G or B origin */
+ rect->left = (s->_rect.left & 1L) ?
+ rect->left | 1L : rect->left & ~1L;
+ rect->top = (s->_rect.top & 1L) ?
+ rect->top | 1L : rect->top & ~1L;
+
+ if (rect->width < 16)
+ rect->width = 16;
+ if (rect->height < 16)
+ rect->height = 16;
+ if (rect->width > bounds->width)
+ rect->width = bounds->width;
+ if (rect->height > bounds->height)
+ rect->height = bounds->height;
+ if (rect->left < bounds->left)
+ rect->left = bounds->left;
+ if (rect->top < bounds->top)
+ rect->top = bounds->top;
+ if (rect->left + rect->width > bounds->left + bounds->width)
+ rect->left = bounds->left+bounds->width - rect->width;
+ if (rect->top + rect->height > bounds->top + bounds->height)
+ rect->top = bounds->top+bounds->height - rect->height;
+
+ rect->width &= ~15L;
+ rect->height &= ~15L;
+
+ if (SN9C102_PRESERVE_IMGSCALE) {
+ /* Calculate the actual scaling factor */
+ u32 a, b;
+ a = rect->width * rect->height;
+ b = pix_format->width * pix_format->height;
+ scale = b ? (u8)((a / b) < 4 ? 1 :
+ ((a / b) < 16 ? 2 : 4)) : 1;
+ } else
+ scale = 1;
+
+ if (cam->stream == STREAM_ON)
+ if ((err = sn9c102_stream_interrupt(cam)))
+ return err;
+
+ if (copy_to_user(arg, &crop, sizeof(crop))) {
+ cam->stream = stream;
+ return -EFAULT;
+ }
+
+ if (cam->module_param.force_munmap || cam->io == IO_READ)
+ sn9c102_release_buffers(cam);
+
+ err = sn9c102_set_crop(cam, rect);
+ if (s->set_crop)
+ err += s->set_crop(cam, rect);
+ err += sn9c102_set_scale(cam, scale);
+
+ if (err) { /* atomic, no rollback in ioctl() */
+ cam->state |= DEV_MISCONFIGURED;
+ DBG(1, "VIDIOC_S_CROP failed because of hardware "
+ "problems. To use the camera, close and open "
+ "/dev/video%d again.", cam->v4ldev->minor)
+ return -EIO;
+ }
+
+ s->pix_format.width = rect->width/scale;
+ s->pix_format.height = rect->height/scale;
+ memcpy(&(s->_rect), rect, sizeof(*rect));
+
+ if ((cam->module_param.force_munmap || cam->io == IO_READ) &&
+ nbuffers != sn9c102_request_buffers(cam, nbuffers,
+ cam->io)) {
+ cam->state |= DEV_MISCONFIGURED;
+ DBG(1, "VIDIOC_S_CROP failed because of not enough "
+ "memory. To use the camera, close and open "
+ "/dev/video%d again.", cam->v4ldev->minor)
+ return -ENOMEM;
+ }
+
+ cam->stream = stream;
+
+ return 0;
+ }
+
+ case VIDIOC_ENUM_FMT:
+ {
+ struct v4l2_fmtdesc fmtd;
+
+ if (copy_from_user(&fmtd, arg, sizeof(fmtd)))
+ return -EFAULT;
+
+ if (fmtd.index == 0) {
+ strcpy(fmtd.description, "bayer rgb");
+ fmtd.pixelformat = V4L2_PIX_FMT_SBGGR8;
+ } else if (fmtd.index == 1) {
+ strcpy(fmtd.description, "compressed");
+ fmtd.pixelformat = V4L2_PIX_FMT_SN9C10X;
+ fmtd.flags = V4L2_FMT_FLAG_COMPRESSED;
+ } else
+ return -EINVAL;
+
+ fmtd.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ memset(&fmtd.reserved, 0, sizeof(fmtd.reserved));
+
+ if (copy_to_user(arg, &fmtd, sizeof(fmtd)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOC_G_FMT:
+ {
+ struct v4l2_format format;
+ struct v4l2_pix_format* pfmt = &(cam->sensor->pix_format);
+
+ if (copy_from_user(&format, arg, sizeof(format)))
+ return -EFAULT;
+
+ if (format.type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+ return -EINVAL;
+
+ pfmt->bytesperline = (pfmt->pixelformat==V4L2_PIX_FMT_SN9C10X)
+ ? 0 : (pfmt->width * pfmt->priv) / 8;
+ pfmt->sizeimage = pfmt->height * ((pfmt->width*pfmt->priv)/8);
+ pfmt->field = V4L2_FIELD_NONE;
+ memcpy(&(format.fmt.pix), pfmt, sizeof(*pfmt));
+
+ if (copy_to_user(arg, &format, sizeof(format)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOC_TRY_FMT:
+ case VIDIOC_S_FMT:
+ {
+ struct sn9c102_sensor* s = cam->sensor;
+ struct v4l2_format format;
+ struct v4l2_pix_format* pix;
+ struct v4l2_pix_format* pfmt = &(s->pix_format);
+ struct v4l2_rect* bounds = &(s->cropcap.bounds);
+ struct v4l2_rect rect;
+ u8 scale;
+ const enum sn9c102_stream_state stream = cam->stream;
+ const u32 nbuffers = cam->nbuffers;
+ u32 i;
+ int err = 0;
+
+ if (copy_from_user(&format, arg, sizeof(format)))
+ return -EFAULT;
+
+ pix = &(format.fmt.pix);
+
+ if (format.type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+ return -EINVAL;
+
+ memcpy(&rect, &(s->_rect), sizeof(rect));
+
+ { /* calculate the actual scaling factor */
+ u32 a, b;
+ a = rect.width * rect.height;
+ b = pix->width * pix->height;
+ scale = b ? (u8)((a / b) < 4 ? 1 :
+ ((a / b) < 16 ? 2 : 4)) : 1;
+ }
+
+ rect.width = scale * pix->width;
+ rect.height = scale * pix->height;
+
+ if (rect.width < 16)
+ rect.width = 16;
+ if (rect.height < 16)
+ rect.height = 16;
+ if (rect.width > bounds->left + bounds->width - rect.left)
+ rect.width = bounds->left + bounds->width - rect.left;
+ if (rect.height > bounds->top + bounds->height - rect.top)
+ rect.height = bounds->top + bounds->height - rect.top;
+
+ rect.width &= ~15L;
+ rect.height &= ~15L;
+
+ { /* adjust the scaling factor */
+ u32 a, b;
+ a = rect.width * rect.height;
+ b = pix->width * pix->height;
+ scale = b ? (u8)((a / b) < 4 ? 1 :
+ ((a / b) < 16 ? 2 : 4)) : 1;
+ }
+
+ pix->width = rect.width / scale;
+ pix->height = rect.height / scale;
+
+ if (pix->pixelformat != V4L2_PIX_FMT_SN9C10X &&
+ pix->pixelformat != V4L2_PIX_FMT_SBGGR8)
+ pix->pixelformat = pfmt->pixelformat;
+ pix->priv = pfmt->priv; /* bpp */
+ pix->colorspace = pfmt->colorspace;
+ pix->bytesperline = (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+ ? 0 : (pix->width * pix->priv) / 8;
+ pix->sizeimage = pix->height * ((pix->width * pix->priv) / 8);
+ pix->field = V4L2_FIELD_NONE;
+
+ if (cmd == VIDIOC_TRY_FMT) {
+ if (copy_to_user(arg, &format, sizeof(format)))
+ return -EFAULT;
+ return 0;
+ }
+
+ if (cam->module_param.force_munmap)
+ for (i = 0; i < cam->nbuffers; i++)
+ if (cam->frame[i].vma_use_count) {
+ DBG(3, "VIDIOC_S_FMT failed. "
+ "Unmap the buffers first.")
+ return -EINVAL;
+ }
+
+ if (cam->stream == STREAM_ON)
+ if ((err = sn9c102_stream_interrupt(cam)))
+ return err;
+
+ if (copy_to_user(arg, &format, sizeof(format))) {
+ cam->stream = stream;
+ return -EFAULT;
+ }
+
+ if (cam->module_param.force_munmap || cam->io == IO_READ)
+ sn9c102_release_buffers(cam);
+
+ err += sn9c102_set_pix_format(cam, pix);
+ err += sn9c102_set_crop(cam, &rect);
+ if (s->set_pix_format)
+ err += s->set_pix_format(cam, pix);
+ if (s->set_crop)
+ err += s->set_crop(cam, &rect);
+ err += sn9c102_set_scale(cam, scale);
+
+ if (err) { /* atomic, no rollback in ioctl() */
+ cam->state |= DEV_MISCONFIGURED;
+ DBG(1, "VIDIOC_S_FMT failed because of hardware "
+ "problems. To use the camera, close and open "
+ "/dev/video%d again.", cam->v4ldev->minor)
+ return -EIO;
+ }
+
+ memcpy(pfmt, pix, sizeof(*pix));
+ memcpy(&(s->_rect), &rect, sizeof(rect));
+
+ if ((cam->module_param.force_munmap || cam->io == IO_READ) &&
+ nbuffers != sn9c102_request_buffers(cam, nbuffers,
+ cam->io)) {
+ cam->state |= DEV_MISCONFIGURED;
+ DBG(1, "VIDIOC_S_FMT failed because of not enough "
+ "memory. To use the camera, close and open "
+ "/dev/video%d again.", cam->v4ldev->minor)
+ return -ENOMEM;
+ }
+
+ cam->stream = stream;
+
+ return 0;
+ }
+
+ case VIDIOC_G_JPEGCOMP:
+ {
+ if (copy_to_user(arg, &cam->compression,
+ sizeof(cam->compression)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOC_S_JPEGCOMP:
+ {
+ struct v4l2_jpegcompression jc;
+ const enum sn9c102_stream_state stream = cam->stream;
+ int err = 0;
+
+ if (copy_from_user(&jc, arg, sizeof(jc)))
+ return -EFAULT;
+
+ if (jc.quality != 0 && jc.quality != 1)
+ return -EINVAL;
+
+ if (cam->stream == STREAM_ON)
+ if ((err = sn9c102_stream_interrupt(cam)))
+ return err;
+
+ err += sn9c102_set_compression(cam, &jc);
+ if (err) { /* atomic, no rollback in ioctl() */
+ cam->state |= DEV_MISCONFIGURED;
+ DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware "
+ "problems. To use the camera, close and open "
+ "/dev/video%d again.", cam->v4ldev->minor)
+ return -EIO;
+ }
+
+ cam->compression.quality = jc.quality;
+
+ cam->stream = stream;
+
+ return 0;
+ }
+
+ case VIDIOC_REQBUFS:
+ {
+ struct v4l2_requestbuffers rb;
+ u32 i;
+ int err;
+
+ if (copy_from_user(&rb, arg, sizeof(rb)))
+ return -EFAULT;
+
+ if (rb.type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
+ rb.memory != V4L2_MEMORY_MMAP)
+ return -EINVAL;
+
+ if (cam->io == IO_READ) {
+ DBG(3, "Close and open the device again to choose "
+ "the mmap I/O method")
+ return -EINVAL;
+ }
+
+ for (i = 0; i < cam->nbuffers; i++)
+ if (cam->frame[i].vma_use_count) {
+ DBG(3, "VIDIOC_REQBUFS failed. "
+ "Previous buffers are still mapped.")
+ return -EINVAL;
+ }
+
+ if (cam->stream == STREAM_ON)
+ if ((err = sn9c102_stream_interrupt(cam)))
+ return err;
+
+ sn9c102_empty_framequeues(cam);
+
+ sn9c102_release_buffers(cam);
+ if (rb.count)
+ rb.count = sn9c102_request_buffers(cam, rb.count,
+ IO_MMAP);
+
+ if (copy_to_user(arg, &rb, sizeof(rb))) {
+ sn9c102_release_buffers(cam);
+ cam->io = IO_NONE;
+ return -EFAULT;
+ }
+
+ cam->io = rb.count ? IO_MMAP : IO_NONE;
+
+ return 0;
+ }
+
+ case VIDIOC_QUERYBUF:
+ {
+ struct v4l2_buffer b;
+
+ if (copy_from_user(&b, arg, sizeof(b)))
+ return -EFAULT;
+
+ if (b.type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
+ b.index >= cam->nbuffers || cam->io != IO_MMAP)
+ return -EINVAL;
+
+ memcpy(&b, &cam->frame[b.index].buf, sizeof(b));
+
+ if (cam->frame[b.index].vma_use_count)
+ b.flags |= V4L2_BUF_FLAG_MAPPED;
+
+ if (cam->frame[b.index].state == F_DONE)
+ b.flags |= V4L2_BUF_FLAG_DONE;
+ else if (cam->frame[b.index].state != F_UNUSED)
+ b.flags |= V4L2_BUF_FLAG_QUEUED;
+
+ if (copy_to_user(arg, &b, sizeof(b)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOC_QBUF:
+ {
+ struct v4l2_buffer b;
+ unsigned long lock_flags;
+
+ if (copy_from_user(&b, arg, sizeof(b)))
+ return -EFAULT;
+
+ if (b.type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
+ b.index >= cam->nbuffers || cam->io != IO_MMAP)
+ return -EINVAL;
+
+ if (cam->frame[b.index].state != F_UNUSED)
+ return -EINVAL;
+
+ cam->frame[b.index].state = F_QUEUED;
+
+ spin_lock_irqsave(&cam->queue_lock, lock_flags);
+ list_add_tail(&cam->frame[b.index].frame, &cam->inqueue);
+ spin_unlock_irqrestore(&cam->queue_lock, lock_flags);
+
+ PDBGG("Frame #%lu queued", (unsigned long)b.index)
+
+ return 0;
+ }
+
+ case VIDIOC_DQBUF:
+ {
+ struct v4l2_buffer b;
+ struct sn9c102_frame_t *f;
+ unsigned long lock_flags;
+ int err = 0;
+
+ if (copy_from_user(&b, arg, sizeof(b)))
+ return -EFAULT;
+
+ if (b.type != V4L2_BUF_TYPE_VIDEO_CAPTURE || cam->io!= IO_MMAP)
+ return -EINVAL;
+
+ if (list_empty(&cam->outqueue)) {
+ if (cam->stream == STREAM_OFF)
+ return -EINVAL;
+ if (filp->f_flags & O_NONBLOCK)
+ return -EAGAIN;
+ err = wait_event_interruptible
+ ( cam->wait_frame,
+ (!list_empty(&cam->outqueue)) ||
+ (cam->state & DEV_DISCONNECTED) ||
+ (cam->state & DEV_MISCONFIGURED) );
+ if (err)
+ return err;
+ if (cam->state & DEV_DISCONNECTED)
+ return -ENODEV;
+ if (cam->state & DEV_MISCONFIGURED)
+ return -EIO;
+ }
+
+ spin_lock_irqsave(&cam->queue_lock, lock_flags);
+ f = list_entry(cam->outqueue.next, struct sn9c102_frame_t,
+ frame);
+ list_del(cam->outqueue.next);
+ spin_unlock_irqrestore(&cam->queue_lock, lock_flags);
+
+ f->state = F_UNUSED;
+
+ memcpy(&b, &f->buf, sizeof(b));
+ if (f->vma_use_count)
+ b.flags |= V4L2_BUF_FLAG_MAPPED;
+
+ if (copy_to_user(arg, &b, sizeof(b)))
+ return -EFAULT;
+
+ PDBGG("Frame #%lu dequeued", (unsigned long)f->buf.index)
+
+ return 0;
+ }
+
+ case VIDIOC_STREAMON:
+ {
+ int type;
+
+ if (copy_from_user(&type, arg, sizeof(type)))
+ return -EFAULT;
+
+ if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE || cam->io != IO_MMAP)
+ return -EINVAL;
+
+ if (list_empty(&cam->inqueue))
+ return -EINVAL;
+
+ cam->stream = STREAM_ON;
+
+ DBG(3, "Stream on")
+
+ return 0;
+ }
+
+ case VIDIOC_STREAMOFF:
+ {
+ int type, err;
+
+ if (copy_from_user(&type, arg, sizeof(type)))
+ return -EFAULT;
+
+ if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE || cam->io != IO_MMAP)
+ return -EINVAL;
+
+ if (cam->stream == STREAM_ON)
+ if ((err = sn9c102_stream_interrupt(cam)))
+ return err;
+
+ sn9c102_empty_framequeues(cam);
+
+ DBG(3, "Stream off")
+
+ return 0;
+ }
+
+ case VIDIOC_G_PARM:
+ {
+ struct v4l2_streamparm sp;
+
+ if (copy_from_user(&sp, arg, sizeof(sp)))
+ return -EFAULT;
+
+ if (sp.type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+ return -EINVAL;
+
+ sp.parm.capture.extendedmode = 0;
+ sp.parm.capture.readbuffers = cam->nreadbuffers;
+
+ if (copy_to_user(arg, &sp, sizeof(sp)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOC_S_PARM_OLD:
+ case VIDIOC_S_PARM:
+ {
+ struct v4l2_streamparm sp;
+
+ if (copy_from_user(&sp, arg, sizeof(sp)))
+ return -EFAULT;
+
+ if (sp.type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+ return -EINVAL;
+
+ sp.parm.capture.extendedmode = 0;
+
+ if (sp.parm.capture.readbuffers == 0)
+ sp.parm.capture.readbuffers = cam->nreadbuffers;
+
+ if (sp.parm.capture.readbuffers > SN9C102_MAX_FRAMES)
+ sp.parm.capture.readbuffers = SN9C102_MAX_FRAMES;
+
+ if (copy_to_user(arg, &sp, sizeof(sp)))
+ return -EFAULT;
+
+ cam->nreadbuffers = sp.parm.capture.readbuffers;
+
+ return 0;
+ }
+
+ case VIDIOC_G_STD:
+ case VIDIOC_S_STD:
+ case VIDIOC_QUERYSTD:
+ case VIDIOC_ENUMSTD:
+ case VIDIOC_QUERYMENU:
+ return -EINVAL;
+
+ default:
+ return -EINVAL;
+
+ }
+}
+
+
+static int sn9c102_ioctl(struct inode* inode, struct file* filp,
+ unsigned int cmd, unsigned long arg)
+{
+ struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+ int err = 0;
+
+ if (down_interruptible(&cam->fileop_sem))
+ return -ERESTARTSYS;
+
+ if (cam->state & DEV_DISCONNECTED) {
+ DBG(1, "Device not present")
+ up(&cam->fileop_sem);
+ return -ENODEV;
+ }
+
+ if (cam->state & DEV_MISCONFIGURED) {
+ DBG(1, "The camera is misconfigured. Close and open it again.")
+ up(&cam->fileop_sem);
+ return -EIO;
+ }
+
+ err = sn9c102_ioctl_v4l2(inode, filp, cmd, (void __user *)arg);
+
+ up(&cam->fileop_sem);
+
+ return err;
+}
+
+
+static struct file_operations sn9c102_fops = {
+ .owner = THIS_MODULE,
+ .open = sn9c102_open,
+ .release = sn9c102_release,
+ .ioctl = sn9c102_ioctl,
+ .read = sn9c102_read,
+ .poll = sn9c102_poll,
+ .mmap = sn9c102_mmap,
+ .llseek = no_llseek,
+};
+
+/*****************************************************************************/
+
+/* It exists a single interface only. We do not need to validate anything. */
+static int
+sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
+{
+ struct usb_device *udev = interface_to_usbdev(intf);
+ struct sn9c102_device* cam;
+ static unsigned int dev_nr = 0;
+ unsigned int i, n;
+ int err = 0, r;
+
+ n = sizeof(sn9c102_id_table)/sizeof(sn9c102_id_table[0]);
+ for (i = 0; i < n-1; i++)
+ if (le16_to_cpu(udev->descriptor.idVendor) ==
+ sn9c102_id_table[i].idVendor &&
+ le16_to_cpu(udev->descriptor.idProduct) ==
+ sn9c102_id_table[i].idProduct)
+ break;
+ if (i == n-1)
+ return -ENODEV;
+
+ if (!(cam = kmalloc(sizeof(struct sn9c102_device), GFP_KERNEL)))
+ return -ENOMEM;
+ memset(cam, 0, sizeof(*cam));
+
+ cam->usbdev = udev;
+
+ memcpy(&cam->dev, &udev->dev, sizeof(struct device));
+
+ if (!(cam->control_buffer = kmalloc(8, GFP_KERNEL))) {
+ DBG(1, "kmalloc() failed")
+ err = -ENOMEM;
+ goto fail;
+ }
+ memset(cam->control_buffer, 0, 8);
+
+ if (!(cam->v4ldev = video_device_alloc())) {
+ DBG(1, "video_device_alloc() failed")
+ err = -ENOMEM;
+ goto fail;
+ }
+
+ init_MUTEX(&cam->dev_sem);
+
+ r = sn9c102_read_reg(cam, 0x00);
+ if (r < 0 || r != 0x10) {
+ DBG(1, "Sorry, this is not a SN9C10x based camera "
+ "(vid/pid 0x%04X/0x%04X)",
+ sn9c102_id_table[i].idVendor,sn9c102_id_table[i].idProduct)
+ err = -ENODEV;
+ goto fail;
+ }
+
+ cam->bridge = (sn9c102_id_table[i].idProduct & 0xffc0) == 0x6080 ?
+ BRIDGE_SN9C103 : BRIDGE_SN9C102;
+ switch (cam->bridge) {
+ case BRIDGE_SN9C101:
+ case BRIDGE_SN9C102:
+ DBG(2, "SN9C10[12] PC Camera Controller detected "
+ "(vid/pid 0x%04X/0x%04X)", sn9c102_id_table[i].idVendor,
+ sn9c102_id_table[i].idProduct)
+ break;
+ case BRIDGE_SN9C103:
+ DBG(2, "SN9C103 PC Camera Controller detected "
+ "(vid/pid 0x%04X/0x%04X)", sn9c102_id_table[i].idVendor,
+ sn9c102_id_table[i].idProduct)
+ break;
+ }
+
+ for (i = 0; sn9c102_sensor_table[i]; i++) {
+ err = sn9c102_sensor_table[i](cam);
+ if (!err)
+ break;
+ }
+
+ if (!err && cam->sensor) {
+ DBG(2, "%s image sensor detected", cam->sensor->name)
+ DBG(3, "Support for %s maintained by %s",
+ cam->sensor->name, cam->sensor->maintainer)
+ } else {
+ DBG(1, "No supported image sensor detected")
+ err = -ENODEV;
+ goto fail;
+ }
+
+ if (sn9c102_init(cam)) {
+ DBG(1, "Initialization failed. I will retry on open().")
+ cam->state |= DEV_MISCONFIGURED;
+ }
+
+ strcpy(cam->v4ldev->name, "SN9C10x PC Camera");
+ cam->v4ldev->owner = THIS_MODULE;
+ cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES;
+ cam->v4ldev->hardware = VID_HARDWARE_SN9C102;
+ cam->v4ldev->fops = &sn9c102_fops;
+ cam->v4ldev->minor = video_nr[dev_nr];
+ cam->v4ldev->release = video_device_release;
+ video_set_drvdata(cam->v4ldev, cam);
+
+ down(&cam->dev_sem);
+
+ err = video_register_device(cam->v4ldev, VFL_TYPE_GRABBER,
+ video_nr[dev_nr]);
+ if (err) {
+ DBG(1, "V4L2 device registration failed")
+ if (err == -ENFILE && video_nr[dev_nr] == -1)
+ DBG(1, "Free /dev/videoX node not found")
+ video_nr[dev_nr] = -1;
+ dev_nr = (dev_nr < SN9C102_MAX_DEVICES-1) ? dev_nr+1 : 0;
+ up(&cam->dev_sem);
+ goto fail;
+ }
+
+ DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->minor)
+
+ cam->module_param.force_munmap = force_munmap[dev_nr];
+
+ dev_nr = (dev_nr < SN9C102_MAX_DEVICES-1) ? dev_nr+1 : 0;
+
+ sn9c102_create_sysfs(cam);
+ DBG(2, "Optional device control through 'sysfs' interface ready")
+
+ usb_set_intfdata(intf, cam);
+
+ up(&cam->dev_sem);
+
+ return 0;
+
+fail:
+ if (cam) {
+ kfree(cam->control_buffer);
+ if (cam->v4ldev)
+ video_device_release(cam->v4ldev);
+ kfree(cam);
+ }
+ return err;
+}
+
+
+static void sn9c102_usb_disconnect(struct usb_interface* intf)
+{
+ struct sn9c102_device* cam = usb_get_intfdata(intf);
+
+ if (!cam)
+ return;
+
+ down_write(&sn9c102_disconnect);
+
+ down(&cam->dev_sem);
+
+ DBG(2, "Disconnecting %s...", cam->v4ldev->name)
+
+ wake_up_interruptible_all(&cam->open);
+
+ if (cam->users) {
+ DBG(2, "Device /dev/video%d is open! Deregistration and "
+ "memory deallocation are deferred on close.",
+ cam->v4ldev->minor)
+ cam->state |= DEV_MISCONFIGURED;
+ sn9c102_stop_transfer(cam);
+ cam->state |= DEV_DISCONNECTED;
+ wake_up_interruptible(&cam->wait_frame);
+ wake_up_interruptible(&cam->wait_stream);
+ } else {
+ cam->state |= DEV_DISCONNECTED;
+ sn9c102_release_resources(cam);
+ }
+
+ up(&cam->dev_sem);
+
+ if (!cam->users)
+ kfree(cam);
+
+ up_write(&sn9c102_disconnect);
+}
+
+
+static struct usb_driver sn9c102_usb_driver = {
+ .owner = THIS_MODULE,
+ .name = "sn9c102",
+ .id_table = sn9c102_id_table,
+ .probe = sn9c102_usb_probe,
+ .disconnect = sn9c102_usb_disconnect,
+};
+
+/*****************************************************************************/
+
+static int __init sn9c102_module_init(void)
+{
+ int err = 0;
+
+ KDBG(2, SN9C102_MODULE_NAME " v" SN9C102_MODULE_VERSION)
+ KDBG(3, SN9C102_MODULE_AUTHOR)
+
+ if ((err = usb_register(&sn9c102_usb_driver)))
+ KDBG(1, "usb_register() failed")
+
+ return err;
+}
+
+
+static void __exit sn9c102_module_exit(void)
+{
+ usb_deregister(&sn9c102_usb_driver);
+}
+
+
+module_init(sn9c102_module_init);
+module_exit(sn9c102_module_exit);
diff --git a/drivers/usb/media/sn9c102_hv7131d.c b/drivers/usb/media/sn9c102_hv7131d.c
new file mode 100644
index 000000000000..18070d5333cf
--- /dev/null
+++ b/drivers/usb/media/sn9c102_hv7131d.c
@@ -0,0 +1,271 @@
+/***************************************************************************
+ * Plug-in for HV7131D image sensor connected to the SN9C10x PC Camera *
+ * Controllers *
+ * *
+ * Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include "sn9c102_sensor.h"
+
+
+static struct sn9c102_sensor hv7131d;
+
+
+static int hv7131d_init(struct sn9c102_device* cam)
+{
+ int err = 0;
+
+ err += sn9c102_write_reg(cam, 0x00, 0x10);
+ err += sn9c102_write_reg(cam, 0x00, 0x11);
+ err += sn9c102_write_reg(cam, 0x00, 0x14);
+ err += sn9c102_write_reg(cam, 0x60, 0x17);
+ err += sn9c102_write_reg(cam, 0x0e, 0x18);
+ err += sn9c102_write_reg(cam, 0xf2, 0x19);
+
+ err += sn9c102_i2c_write(cam, 0x01, 0x04);
+ err += sn9c102_i2c_write(cam, 0x02, 0x00);
+ err += sn9c102_i2c_write(cam, 0x28, 0x00);
+
+ return err;
+}
+
+
+static int hv7131d_get_ctrl(struct sn9c102_device* cam,
+ struct v4l2_control* ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_EXPOSURE:
+ {
+ int r1 = sn9c102_i2c_read(cam, 0x26),
+ r2 = sn9c102_i2c_read(cam, 0x27);
+ if (r1 < 0 || r2 < 0)
+ return -EIO;
+ ctrl->value = (r1 << 8) | (r2 & 0xff);
+ }
+ return 0;
+ case V4L2_CID_RED_BALANCE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x31)) < 0)
+ return -EIO;
+ ctrl->value = 0x3f - (ctrl->value & 0x3f);
+ return 0;
+ case V4L2_CID_BLUE_BALANCE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x33)) < 0)
+ return -EIO;
+ ctrl->value = 0x3f - (ctrl->value & 0x3f);
+ return 0;
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x32)) < 0)
+ return -EIO;
+ ctrl->value = 0x3f - (ctrl->value & 0x3f);
+ return 0;
+ case SN9C102_V4L2_CID_RESET_LEVEL:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x30)) < 0)
+ return -EIO;
+ ctrl->value &= 0x3f;
+ return 0;
+ case SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x34)) < 0)
+ return -EIO;
+ ctrl->value &= 0x07;
+ return 0;
+ default:
+ return -EINVAL;
+ }
+}
+
+
+static int hv7131d_set_ctrl(struct sn9c102_device* cam,
+ const struct v4l2_control* ctrl)
+{
+ int err = 0;
+
+ switch (ctrl->id) {
+ case V4L2_CID_EXPOSURE:
+ err += sn9c102_i2c_write(cam, 0x26, ctrl->value >> 8);
+ err += sn9c102_i2c_write(cam, 0x27, ctrl->value & 0xff);
+ break;
+ case V4L2_CID_RED_BALANCE:
+ err += sn9c102_i2c_write(cam, 0x31, 0x3f - ctrl->value);
+ break;
+ case V4L2_CID_BLUE_BALANCE:
+ err += sn9c102_i2c_write(cam, 0x33, 0x3f - ctrl->value);
+ break;
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ err += sn9c102_i2c_write(cam, 0x32, 0x3f - ctrl->value);
+ break;
+ case SN9C102_V4L2_CID_RESET_LEVEL:
+ err += sn9c102_i2c_write(cam, 0x30, ctrl->value);
+ break;
+ case SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE:
+ err += sn9c102_i2c_write(cam, 0x34, ctrl->value);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return err ? -EIO : 0;
+}
+
+
+static int hv7131d_set_crop(struct sn9c102_device* cam,
+ const struct v4l2_rect* rect)
+{
+ struct sn9c102_sensor* s = &hv7131d;
+ int err = 0;
+ u8 h_start = (u8)(rect->left - s->cropcap.bounds.left) + 2,
+ v_start = (u8)(rect->top - s->cropcap.bounds.top) + 2;
+
+ err += sn9c102_write_reg(cam, h_start, 0x12);
+ err += sn9c102_write_reg(cam, v_start, 0x13);
+
+ return err;
+}
+
+
+static int hv7131d_set_pix_format(struct sn9c102_device* cam,
+ const struct v4l2_pix_format* pix)
+{
+ int err = 0;
+
+ if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+ err += sn9c102_write_reg(cam, 0x42, 0x19);
+ else
+ err += sn9c102_write_reg(cam, 0xf2, 0x19);
+
+ return err;
+}
+
+
+static struct sn9c102_sensor hv7131d = {
+ .name = "HV7131D",
+ .maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+ .sysfs_ops = SN9C102_I2C_READ | SN9C102_I2C_WRITE,
+ .frequency = SN9C102_I2C_100KHZ,
+ .interface = SN9C102_I2C_2WIRES,
+ .i2c_slave_id = 0x11,
+ .init = &hv7131d_init,
+ .qctrl = {
+ {
+ .id = V4L2_CID_EXPOSURE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .minimum = 0x0250,
+ .maximum = 0xffff,
+ .step = 0x0001,
+ .default_value = 0x0250,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_RED_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "red balance",
+ .minimum = 0x00,
+ .maximum = 0x3f,
+ .step = 0x01,
+ .default_value = 0x00,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_BLUE_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "blue balance",
+ .minimum = 0x00,
+ .maximum = 0x3f,
+ .step = 0x01,
+ .default_value = 0x20,
+ .flags = 0,
+ },
+ {
+ .id = SN9C102_V4L2_CID_GREEN_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "green balance",
+ .minimum = 0x00,
+ .maximum = 0x3f,
+ .step = 0x01,
+ .default_value = 0x1e,
+ .flags = 0,
+ },
+ {
+ .id = SN9C102_V4L2_CID_RESET_LEVEL,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "reset level",
+ .minimum = 0x19,
+ .maximum = 0x3f,
+ .step = 0x01,
+ .default_value = 0x30,
+ .flags = 0,
+ },
+ {
+ .id = SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "pixel bias voltage",
+ .minimum = 0x00,
+ .maximum = 0x07,
+ .step = 0x01,
+ .default_value = 0x02,
+ .flags = 0,
+ },
+ },
+ .get_ctrl = &hv7131d_get_ctrl,
+ .set_ctrl = &hv7131d_set_ctrl,
+ .cropcap = {
+ .bounds = {
+ .left = 0,
+ .top = 0,
+ .width = 640,
+ .height = 480,
+ },
+ .defrect = {
+ .left = 0,
+ .top = 0,
+ .width = 640,
+ .height = 480,
+ },
+ },
+ .set_crop = &hv7131d_set_crop,
+ .pix_format = {
+ .width = 640,
+ .height = 480,
+ .pixelformat = V4L2_PIX_FMT_SBGGR8,
+ .priv = 8,
+ },
+ .set_pix_format = &hv7131d_set_pix_format
+};
+
+
+int sn9c102_probe_hv7131d(struct sn9c102_device* cam)
+{
+ int r0 = 0, r1 = 0, err = 0;
+
+ err += sn9c102_write_reg(cam, 0x01, 0x01);
+ err += sn9c102_write_reg(cam, 0x00, 0x01);
+ err += sn9c102_write_reg(cam, 0x28, 0x17);
+ if (err)
+ return -EIO;
+
+ r0 = sn9c102_i2c_try_read(cam, &hv7131d, 0x00);
+ r1 = sn9c102_i2c_try_read(cam, &hv7131d, 0x01);
+ if (r0 < 0 || r1 < 0)
+ return -EIO;
+
+ if (r0 != 0x00 && r1 != 0x04)
+ return -ENODEV;
+
+ sn9c102_attach_sensor(cam, &hv7131d);
+
+ return 0;
+}
diff --git a/drivers/usb/media/sn9c102_mi0343.c b/drivers/usb/media/sn9c102_mi0343.c
new file mode 100644
index 000000000000..86676abf3547
--- /dev/null
+++ b/drivers/usb/media/sn9c102_mi0343.c
@@ -0,0 +1,363 @@
+/***************************************************************************
+ * Plug-in for MI-0343 image sensor connected to the SN9C10x PC Camera *
+ * Controllers *
+ * *
+ * Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include "sn9c102_sensor.h"
+
+
+static struct sn9c102_sensor mi0343;
+static u8 mi0343_i2c_data[5+1];
+
+
+static int mi0343_init(struct sn9c102_device* cam)
+{
+ int err = 0;
+
+ err += sn9c102_write_reg(cam, 0x00, 0x10);
+ err += sn9c102_write_reg(cam, 0x00, 0x11);
+ err += sn9c102_write_reg(cam, 0x0a, 0x14);
+ err += sn9c102_write_reg(cam, 0x40, 0x01);
+ err += sn9c102_write_reg(cam, 0x20, 0x17);
+ err += sn9c102_write_reg(cam, 0x07, 0x18);
+ err += sn9c102_write_reg(cam, 0xa0, 0x19);
+
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+ 0x0d, 0x00, 0x01, 0, 0);
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+ 0x0d, 0x00, 0x00, 0, 0);
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+ 0x03, 0x01, 0xe1, 0, 0);
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+ 0x04, 0x02, 0x81, 0, 0);
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+ 0x05, 0x00, 0x17, 0, 0);
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+ 0x06, 0x00, 0x11, 0, 0);
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+ 0x62, 0x04, 0x9a, 0, 0);
+
+ return err;
+}
+
+
+static int mi0343_get_ctrl(struct sn9c102_device* cam,
+ struct v4l2_control* ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_EXPOSURE:
+ if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+ 0x09, 2+1, mi0343_i2c_data) < 0)
+ return -EIO;
+ ctrl->value = mi0343_i2c_data[2];
+ return 0;
+ case V4L2_CID_GAIN:
+ if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+ 0x35, 2+1, mi0343_i2c_data) < 0)
+ return -EIO;
+ break;
+ case V4L2_CID_HFLIP:
+ if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+ 0x20, 2+1, mi0343_i2c_data) < 0)
+ return -EIO;
+ ctrl->value = mi0343_i2c_data[3] & 0x20 ? 1 : 0;
+ return 0;
+ case V4L2_CID_VFLIP:
+ if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+ 0x20, 2+1, mi0343_i2c_data) < 0)
+ return -EIO;
+ ctrl->value = mi0343_i2c_data[3] & 0x80 ? 1 : 0;
+ return 0;
+ case V4L2_CID_RED_BALANCE:
+ if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+ 0x2d, 2+1, mi0343_i2c_data) < 0)
+ return -EIO;
+ break;
+ case V4L2_CID_BLUE_BALANCE:
+ if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+ 0x2c, 2+1, mi0343_i2c_data) < 0)
+ return -EIO;
+ break;
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+ 0x2e, 2+1, mi0343_i2c_data) < 0)
+ return -EIO;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ switch (ctrl->id) {
+ case V4L2_CID_GAIN:
+ case V4L2_CID_RED_BALANCE:
+ case V4L2_CID_BLUE_BALANCE:
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ ctrl->value = mi0343_i2c_data[3] | (mi0343_i2c_data[2] << 8);
+ if (ctrl->value >= 0x10 && ctrl->value <= 0x3f)
+ ctrl->value -= 0x10;
+ else if (ctrl->value >= 0x60 && ctrl->value <= 0x7f)
+ ctrl->value -= 0x60;
+ else if (ctrl->value >= 0xe0 && ctrl->value <= 0xff)
+ ctrl->value -= 0xe0;
+ }
+
+ return 0;
+}
+
+
+static int mi0343_set_ctrl(struct sn9c102_device* cam,
+ const struct v4l2_control* ctrl)
+{
+ u16 reg = 0;
+ int err = 0;
+
+ switch (ctrl->id) {
+ case V4L2_CID_GAIN:
+ case V4L2_CID_RED_BALANCE:
+ case V4L2_CID_BLUE_BALANCE:
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ if (ctrl->value <= (0x3f-0x10))
+ reg = 0x10 + ctrl->value;
+ else if (ctrl->value <= ((0x3f-0x10) + (0x7f-0x60)))
+ reg = 0x60 + (ctrl->value - (0x3f-0x10));
+ else
+ reg = 0xe0 + (ctrl->value - (0x3f-0x10) - (0x7f-0x60));
+ break;
+ }
+
+ switch (ctrl->id) {
+ case V4L2_CID_EXPOSURE:
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x09, ctrl->value, 0x00,
+ 0, 0);
+ break;
+ case V4L2_CID_GAIN:
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x35, reg >> 8, reg & 0xff,
+ 0, 0);
+ break;
+ case V4L2_CID_HFLIP:
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x20, ctrl->value ? 0x40:0x00,
+ ctrl->value ? 0x20:0x00,
+ 0, 0);
+ break;
+ case V4L2_CID_VFLIP:
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x20, ctrl->value ? 0x80:0x00,
+ ctrl->value ? 0x80:0x00,
+ 0, 0);
+ break;
+ case V4L2_CID_RED_BALANCE:
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x2d, reg >> 8, reg & 0xff,
+ 0, 0);
+ break;
+ case V4L2_CID_BLUE_BALANCE:
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x2c, reg >> 8, reg & 0xff,
+ 0, 0);
+ break;
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x2b, reg >> 8, reg & 0xff,
+ 0, 0);
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x2e, reg >> 8, reg & 0xff,
+ 0, 0);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return err ? -EIO : 0;
+}
+
+
+static int mi0343_set_crop(struct sn9c102_device* cam,
+ const struct v4l2_rect* rect)
+{
+ struct sn9c102_sensor* s = &mi0343;
+ int err = 0;
+ u8 h_start = (u8)(rect->left - s->cropcap.bounds.left) + 0,
+ v_start = (u8)(rect->top - s->cropcap.bounds.top) + 2;
+
+ err += sn9c102_write_reg(cam, h_start, 0x12);
+ err += sn9c102_write_reg(cam, v_start, 0x13);
+
+ return err;
+}
+
+
+static int mi0343_set_pix_format(struct sn9c102_device* cam,
+ const struct v4l2_pix_format* pix)
+{
+ int err = 0;
+
+ if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X) {
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x0a, 0x00, 0x03, 0, 0);
+ err += sn9c102_write_reg(cam, 0x20, 0x19);
+ } else {
+ err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+ mi0343.i2c_slave_id,
+ 0x0a, 0x00, 0x05, 0, 0);
+ err += sn9c102_write_reg(cam, 0xa0, 0x19);
+ }
+
+ return err;
+}
+
+
+static struct sn9c102_sensor mi0343 = {
+ .name = "MI-0343",
+ .maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+ .frequency = SN9C102_I2C_100KHZ,
+ .interface = SN9C102_I2C_2WIRES,
+ .i2c_slave_id = 0x5d,
+ .init = &mi0343_init,
+ .qctrl = {
+ {
+ .id = V4L2_CID_EXPOSURE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .minimum = 0x00,
+ .maximum = 0x0f,
+ .step = 0x01,
+ .default_value = 0x06,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_GAIN,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "global gain",
+ .minimum = 0x00,
+ .maximum = (0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0),/*0x6d*/
+ .step = 0x01,
+ .default_value = 0x00,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_HFLIP,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
+ .name = "horizontal mirror",
+ .minimum = 0,
+ .maximum = 1,
+ .step = 1,
+ .default_value = 0,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_VFLIP,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
+ .name = "vertical mirror",
+ .minimum = 0,
+ .maximum = 1,
+ .step = 1,
+ .default_value = 0,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_RED_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "red balance",
+ .minimum = 0x00,
+ .maximum = (0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0),
+ .step = 0x01,
+ .default_value = 0x00,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_BLUE_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "blue balance",
+ .minimum = 0x00,
+ .maximum = (0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0),
+ .step = 0x01,
+ .default_value = 0x00,
+ .flags = 0,
+ },
+ {
+ .id = SN9C102_V4L2_CID_GREEN_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "green balance",
+ .minimum = 0x00,
+ .maximum = ((0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0)),
+ .step = 0x01,
+ .default_value = 0x00,
+ .flags = 0,
+ },
+ },
+ .get_ctrl = &mi0343_get_ctrl,
+ .set_ctrl = &mi0343_set_ctrl,
+ .cropcap = {
+ .bounds = {
+ .left = 0,
+ .top = 0,
+ .width = 640,
+ .height = 480,
+ },
+ .defrect = {
+ .left = 0,
+ .top = 0,
+ .width = 640,
+ .height = 480,
+ },
+ },
+ .set_crop = &mi0343_set_crop,
+ .pix_format = {
+ .width = 640,
+ .height = 480,
+ .pixelformat = V4L2_PIX_FMT_SBGGR8,
+ .priv = 8,
+ },
+ .set_pix_format = &mi0343_set_pix_format
+};
+
+
+int sn9c102_probe_mi0343(struct sn9c102_device* cam)
+{
+ int err = 0;
+
+ err += sn9c102_write_reg(cam, 0x01, 0x01);
+ err += sn9c102_write_reg(cam, 0x00, 0x01);
+ err += sn9c102_write_reg(cam, 0x28, 0x17);
+ if (err)
+ return -EIO;
+
+ if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id, 0x00,
+ 2, mi0343_i2c_data) < 0)
+ return -EIO;
+
+ if (mi0343_i2c_data[4] != 0x32 && mi0343_i2c_data[3] != 0xe3)
+ return -ENODEV;
+
+ sn9c102_attach_sensor(cam, &mi0343);
+
+ return 0;
+}
diff --git a/drivers/usb/media/sn9c102_pas106b.c b/drivers/usb/media/sn9c102_pas106b.c
new file mode 100644
index 000000000000..48e3ec39d4e2
--- /dev/null
+++ b/drivers/usb/media/sn9c102_pas106b.c
@@ -0,0 +1,307 @@
+/***************************************************************************
+ * Plug-in for PAS106B image sensor connected to the SN9C10x PC Camera *
+ * Controllers *
+ * *
+ * Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include <linux/delay.h>
+#include "sn9c102_sensor.h"
+
+
+static struct sn9c102_sensor pas106b;
+
+
+static int pas106b_init(struct sn9c102_device* cam)
+{
+ int err = 0;
+
+ err += sn9c102_write_reg(cam, 0x00, 0x10);
+ err += sn9c102_write_reg(cam, 0x00, 0x11);
+ err += sn9c102_write_reg(cam, 0x00, 0x14);
+ err += sn9c102_write_reg(cam, 0x20, 0x17);
+ err += sn9c102_write_reg(cam, 0x20, 0x19);
+ err += sn9c102_write_reg(cam, 0x09, 0x18);
+
+ err += sn9c102_i2c_write(cam, 0x02, 0x0c);
+ err += sn9c102_i2c_write(cam, 0x05, 0x5a);
+ err += sn9c102_i2c_write(cam, 0x06, 0x88);
+ err += sn9c102_i2c_write(cam, 0x07, 0x80);
+ err += sn9c102_i2c_write(cam, 0x10, 0x06);
+ err += sn9c102_i2c_write(cam, 0x11, 0x06);
+ err += sn9c102_i2c_write(cam, 0x12, 0x00);
+ err += sn9c102_i2c_write(cam, 0x14, 0x02);
+ err += sn9c102_i2c_write(cam, 0x13, 0x01);
+
+ msleep(400);
+
+ return err;
+}
+
+
+static int pas106b_get_ctrl(struct sn9c102_device* cam,
+ struct v4l2_control* ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_EXPOSURE:
+ {
+ int r1 = sn9c102_i2c_read(cam, 0x03),
+ r2 = sn9c102_i2c_read(cam, 0x04);
+ if (r1 < 0 || r2 < 0)
+ return -EIO;
+ ctrl->value = (r1 << 4) | (r2 & 0x0f);
+ }
+ return 0;
+ case V4L2_CID_RED_BALANCE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x0c)) < 0)
+ return -EIO;
+ ctrl->value &= 0x1f;
+ return 0;
+ case V4L2_CID_BLUE_BALANCE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x09)) < 0)
+ return -EIO;
+ ctrl->value &= 0x1f;
+ return 0;
+ case V4L2_CID_GAIN:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x0e)) < 0)
+ return -EIO;
+ ctrl->value &= 0x1f;
+ return 0;
+ case V4L2_CID_CONTRAST:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x0f)) < 0)
+ return -EIO;
+ ctrl->value &= 0x07;
+ return 0;
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x0a)) < 0)
+ return -EIO;
+ ctrl->value = (ctrl->value & 0x1f) << 1;
+ return 0;
+ case SN9C102_V4L2_CID_DAC_MAGNITUDE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x08)) < 0)
+ return -EIO;
+ ctrl->value &= 0xf8;
+ return 0;
+ default:
+ return -EINVAL;
+ }
+}
+
+
+static int pas106b_set_ctrl(struct sn9c102_device* cam,
+ const struct v4l2_control* ctrl)
+{
+ int err = 0;
+
+ switch (ctrl->id) {
+ case V4L2_CID_EXPOSURE:
+ err += sn9c102_i2c_write(cam, 0x03, ctrl->value >> 4);
+ err += sn9c102_i2c_write(cam, 0x04, ctrl->value & 0x0f);
+ break;
+ case V4L2_CID_RED_BALANCE:
+ err += sn9c102_i2c_write(cam, 0x0c, ctrl->value);
+ break;
+ case V4L2_CID_BLUE_BALANCE:
+ err += sn9c102_i2c_write(cam, 0x09, ctrl->value);
+ break;
+ case V4L2_CID_GAIN:
+ err += sn9c102_i2c_write(cam, 0x0e, ctrl->value);
+ break;
+ case V4L2_CID_CONTRAST:
+ err += sn9c102_i2c_write(cam, 0x0f, ctrl->value);
+ break;
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ err += sn9c102_i2c_write(cam, 0x0a, ctrl->value >> 1);
+ err += sn9c102_i2c_write(cam, 0x0b, ctrl->value >> 1);
+ break;
+ case SN9C102_V4L2_CID_DAC_MAGNITUDE:
+ err += sn9c102_i2c_write(cam, 0x08, ctrl->value << 3);
+ break;
+ default:
+ return -EINVAL;
+ }
+ err += sn9c102_i2c_write(cam, 0x13, 0x01);
+
+ return err ? -EIO : 0;
+}
+
+
+static int pas106b_set_crop(struct sn9c102_device* cam,
+ const struct v4l2_rect* rect)
+{
+ struct sn9c102_sensor* s = &pas106b;
+ int err = 0;
+ u8 h_start = (u8)(rect->left - s->cropcap.bounds.left) + 4,
+ v_start = (u8)(rect->top - s->cropcap.bounds.top) + 3;
+
+ err += sn9c102_write_reg(cam, h_start, 0x12);
+ err += sn9c102_write_reg(cam, v_start, 0x13);
+
+ return err;
+}
+
+
+static int pas106b_set_pix_format(struct sn9c102_device* cam,
+ const struct v4l2_pix_format* pix)
+{
+ int err = 0;
+
+ if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+ err += sn9c102_write_reg(cam, 0x2c, 0x17);
+ else
+ err += sn9c102_write_reg(cam, 0x20, 0x17);
+
+ return err;
+}
+
+
+static struct sn9c102_sensor pas106b = {
+ .name = "PAS106B",
+ .maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+ .sysfs_ops = SN9C102_I2C_READ | SN9C102_I2C_WRITE,
+ .frequency = SN9C102_I2C_400KHZ | SN9C102_I2C_100KHZ,
+ .interface = SN9C102_I2C_2WIRES,
+ .i2c_slave_id = 0x40,
+ .init = &pas106b_init,
+ .qctrl = {
+ {
+ .id = V4L2_CID_EXPOSURE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .minimum = 0x125,
+ .maximum = 0xfff,
+ .step = 0x001,
+ .default_value = 0x140,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_GAIN,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "global gain",
+ .minimum = 0x00,
+ .maximum = 0x1f,
+ .step = 0x01,
+ .default_value = 0x0d,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_CONTRAST,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "contrast",
+ .minimum = 0x00,
+ .maximum = 0x07,
+ .step = 0x01,
+ .default_value = 0x00, /* 0x00~0x03 have same effect */
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_RED_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "red balance",
+ .minimum = 0x00,
+ .maximum = 0x1f,
+ .step = 0x01,
+ .default_value = 0x04,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_BLUE_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "blue balance",
+ .minimum = 0x00,
+ .maximum = 0x1f,
+ .step = 0x01,
+ .default_value = 0x06,
+ .flags = 0,
+ },
+ {
+ .id = SN9C102_V4L2_CID_GREEN_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "green balance",
+ .minimum = 0x00,
+ .maximum = 0x3e,
+ .step = 0x02,
+ .default_value = 0x02,
+ .flags = 0,
+ },
+ {
+ .id = SN9C102_V4L2_CID_DAC_MAGNITUDE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "DAC magnitude",
+ .minimum = 0x00,
+ .maximum = 0x1f,
+ .step = 0x01,
+ .default_value = 0x01,
+ .flags = 0,
+ },
+ },
+ .get_ctrl = &pas106b_get_ctrl,
+ .set_ctrl = &pas106b_set_ctrl,
+ .cropcap = {
+ .bounds = {
+ .left = 0,
+ .top = 0,
+ .width = 352,
+ .height = 288,
+ },
+ .defrect = {
+ .left = 0,
+ .top = 0,
+ .width = 352,
+ .height = 288,
+ },
+ },
+ .set_crop = &pas106b_set_crop,
+ .pix_format = {
+ .width = 352,
+ .height = 288,
+ .pixelformat = V4L2_PIX_FMT_SBGGR8,
+ .priv = 8, /* we use this field as 'bits per pixel' */
+ },
+ .set_pix_format = &pas106b_set_pix_format
+};
+
+
+int sn9c102_probe_pas106b(struct sn9c102_device* cam)
+{
+ int r0 = 0, r1 = 0, err = 0;
+ unsigned int pid = 0;
+
+ /*
+ Minimal initialization to enable the I2C communication
+ NOTE: do NOT change the values!
+ */
+ err += sn9c102_write_reg(cam, 0x01, 0x01); /* sensor power down */
+ err += sn9c102_write_reg(cam, 0x00, 0x01); /* sensor power on */
+ err += sn9c102_write_reg(cam, 0x28, 0x17); /* sensor clock at 24 MHz */
+ if (err)
+ return -EIO;
+
+ r0 = sn9c102_i2c_try_read(cam, &pas106b, 0x00);
+ r1 = sn9c102_i2c_try_read(cam, &pas106b, 0x01);
+
+ if (r0 < 0 || r1 < 0)
+ return -EIO;
+
+ pid = (r0 << 11) | ((r1 & 0xf0) >> 4);
+ if (pid != 0x007)
+ return -ENODEV;
+
+ sn9c102_attach_sensor(cam, &pas106b);
+
+ return 0;
+}
diff --git a/drivers/usb/media/sn9c102_pas202bcb.c b/drivers/usb/media/sn9c102_pas202bcb.c
new file mode 100644
index 000000000000..5ca54c7daaf2
--- /dev/null
+++ b/drivers/usb/media/sn9c102_pas202bcb.c
@@ -0,0 +1,293 @@
+/***************************************************************************
+ * Plug-in for PAS202BCB image sensor connected to the SN9C10x PC Camera *
+ * Controllers *
+ * *
+ * Copyright (C) 2004 by Carlos Eduardo Medaglia Dyonisio *
+ * <medaglia@undl.org.br> *
+ * http://cadu.homelinux.com:8080/ *
+ * *
+ * DAC Magnitude, exposure and green gain controls added by *
+ * Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include <linux/delay.h>
+#include "sn9c102_sensor.h"
+
+
+static struct sn9c102_sensor pas202bcb;
+
+
+static int pas202bcb_init(struct sn9c102_device* cam)
+{
+ int err = 0;
+
+ err += sn9c102_write_reg(cam, 0x00, 0x10);
+ err += sn9c102_write_reg(cam, 0x00, 0x11);
+ err += sn9c102_write_reg(cam, 0x00, 0x14);
+ err += sn9c102_write_reg(cam, 0x20, 0x17);
+ err += sn9c102_write_reg(cam, 0x30, 0x19);
+ err += sn9c102_write_reg(cam, 0x09, 0x18);
+
+ err += sn9c102_i2c_write(cam, 0x02, 0x14);
+ err += sn9c102_i2c_write(cam, 0x03, 0x40);
+ err += sn9c102_i2c_write(cam, 0x0d, 0x2c);
+ err += sn9c102_i2c_write(cam, 0x0e, 0x01);
+ err += sn9c102_i2c_write(cam, 0x0f, 0xa9);
+ err += sn9c102_i2c_write(cam, 0x10, 0x08);
+ err += sn9c102_i2c_write(cam, 0x13, 0x63);
+ err += sn9c102_i2c_write(cam, 0x15, 0x70);
+ err += sn9c102_i2c_write(cam, 0x11, 0x01);
+
+ msleep(400);
+
+ return err;
+}
+
+
+static int pas202bcb_get_ctrl(struct sn9c102_device* cam,
+ struct v4l2_control* ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_EXPOSURE:
+ {
+ int r1 = sn9c102_i2c_read(cam, 0x04),
+ r2 = sn9c102_i2c_read(cam, 0x05);
+ if (r1 < 0 || r2 < 0)
+ return -EIO;
+ ctrl->value = (r1 << 6) | (r2 & 0x3f);
+ }
+ return 0;
+ case V4L2_CID_RED_BALANCE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x09)) < 0)
+ return -EIO;
+ ctrl->value &= 0x0f;
+ return 0;
+ case V4L2_CID_BLUE_BALANCE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x07)) < 0)
+ return -EIO;
+ ctrl->value &= 0x0f;
+ return 0;
+ case V4L2_CID_GAIN:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x10)) < 0)
+ return -EIO;
+ ctrl->value &= 0x1f;
+ return 0;
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x08)) < 0)
+ return -EIO;
+ ctrl->value &= 0x0f;
+ return 0;
+ case SN9C102_V4L2_CID_DAC_MAGNITUDE:
+ if ((ctrl->value = sn9c102_i2c_read(cam, 0x0c)) < 0)
+ return -EIO;
+ return 0;
+ default:
+ return -EINVAL;
+ }
+}
+
+
+static int pas202bcb_set_pix_format(struct sn9c102_device* cam,
+ const struct v4l2_pix_format* pix)
+{
+ int err = 0;
+
+ if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+ err += sn9c102_write_reg(cam, 0x24, 0x17);
+ else
+ err += sn9c102_write_reg(cam, 0x20, 0x17);
+
+ return err;
+}
+
+
+static int pas202bcb_set_ctrl(struct sn9c102_device* cam,
+ const struct v4l2_control* ctrl)
+{
+ int err = 0;
+
+ switch (ctrl->id) {
+ case V4L2_CID_EXPOSURE:
+ err += sn9c102_i2c_write(cam, 0x04, ctrl->value >> 6);
+ err += sn9c102_i2c_write(cam, 0x05, ctrl->value & 0x3f);
+ break;
+ case V4L2_CID_RED_BALANCE:
+ err += sn9c102_i2c_write(cam, 0x09, ctrl->value);
+ break;
+ case V4L2_CID_BLUE_BALANCE:
+ err += sn9c102_i2c_write(cam, 0x07, ctrl->value);
+ break;
+ case V4L2_CID_GAIN:
+ err += sn9c102_i2c_write(cam, 0x10, ctrl->value);
+ break;
+ case SN9C102_V4L2_CID_GREEN_BALANCE:
+ err += sn9c102_i2c_write(cam, 0x08, ctrl->value);
+ break;
+ case SN9C102_V4L2_CID_DAC_MAGNITUDE:
+ err += sn9c102_i2c_write(cam, 0x0c, ctrl->value);
+ break;
+ default:
+ return -EINVAL;
+ }
+ err += sn9c102_i2c_write(cam, 0x11, 0x01);
+
+ return err ? -EIO : 0;
+}
+
+
+static int pas202bcb_set_crop(struct sn9c102_device* cam,
+ const struct v4l2_rect* rect)
+{
+ struct sn9c102_sensor* s = &pas202bcb;
+ int err = 0;
+ u8 h_start = (u8)(rect->left - s->cropcap.bounds.left) + 4,
+ v_start = (u8)(rect->top - s->cropcap.bounds.top) + 3;
+
+ err += sn9c102_write_reg(cam, h_start, 0x12);
+ err += sn9c102_write_reg(cam, v_start, 0x13);
+
+ return err;
+}
+
+
+static struct sn9c102_sensor pas202bcb = {
+ .name = "PAS202BCB",
+ .maintainer = "Carlos Eduardo Medaglia Dyonisio "
+ "<medaglia@undl.org.br>",
+ .sysfs_ops = SN9C102_I2C_READ | SN9C102_I2C_WRITE,
+ .frequency = SN9C102_I2C_400KHZ | SN9C102_I2C_100KHZ,
+ .interface = SN9C102_I2C_2WIRES,
+ .i2c_slave_id = 0x40,
+ .init = &pas202bcb_init,
+ .qctrl = {
+ {
+ .id = V4L2_CID_EXPOSURE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .minimum = 0x01e5,
+ .maximum = 0x3fff,
+ .step = 0x0001,
+ .default_value = 0x01e5,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_GAIN,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "global gain",
+ .minimum = 0x00,
+ .maximum = 0x1f,
+ .step = 0x01,
+ .default_value = 0x0c,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_RED_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "red balance",
+ .minimum = 0x00,
+ .maximum = 0x0f,
+ .step = 0x01,
+ .default_value = 0x01,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_BLUE_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "blue balance",
+ .minimum = 0x00,
+ .maximum = 0x0f,
+ .step = 0x01,
+ .default_value = 0x05,
+ .flags = 0,
+ },
+ {
+ .id = SN9C102_V4L2_CID_GREEN_BALANCE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "green balance",
+ .minimum = 0x00,
+ .maximum = 0x0f,
+ .step = 0x01,
+ .default_value = 0x00,
+ .flags = 0,
+ },
+ {
+ .id = SN9C102_V4L2_CID_DAC_MAGNITUDE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "DAC magnitude",
+ .minimum = 0x00,
+ .maximum = 0xff,
+ .step = 0x01,
+ .default_value = 0x04,
+ .flags = 0,
+ },
+ },
+ .get_ctrl = &pas202bcb_get_ctrl,
+ .set_ctrl = &pas202bcb_set_ctrl,
+ .cropcap = {
+ .bounds = {
+ .left = 0,
+ .top = 0,
+ .width = 640,
+ .height = 480,
+ },
+ .defrect = {
+ .left = 0,
+ .top = 0,
+ .width = 640,
+ .height = 480,
+ },
+ },
+ .set_crop = &pas202bcb_set_crop,
+ .pix_format = {
+ .width = 640,
+ .height = 480,
+ .pixelformat = V4L2_PIX_FMT_SBGGR8,
+ .priv = 8,
+ },
+ .set_pix_format = &pas202bcb_set_pix_format
+};
+
+
+int sn9c102_probe_pas202bcb(struct sn9c102_device* cam)
+{
+ int r0 = 0, r1 = 0, err = 0;
+ unsigned int pid = 0;
+
+ /*
+ * Minimal initialization to enable the I2C communication
+ * NOTE: do NOT change the values!
+ */
+ err += sn9c102_write_reg(cam, 0x01, 0x01); /* sensor power down */
+ err += sn9c102_write_reg(cam, 0x40, 0x01); /* sensor power on */
+ err += sn9c102_write_reg(cam, 0x28, 0x17); /* sensor clock at 24 MHz */
+ if (err)
+ return -EIO;
+
+ r0 = sn9c102_i2c_try_read(cam, &pas202bcb, 0x00);
+ r1 = sn9c102_i2c_try_read(cam, &pas202bcb, 0x01);
+
+ if (r0 < 0 || r1 < 0)
+ return -EIO;
+
+ pid = (r0 << 4) | ((r1 & 0xf0) >> 4);
+ if (pid != 0x017)
+ return -ENODEV;
+
+ sn9c102_attach_sensor(cam, &pas202bcb);
+
+ return 0;
+}
diff --git a/drivers/usb/media/sn9c102_sensor.h b/drivers/usb/media/sn9c102_sensor.h
new file mode 100644
index 000000000000..16f7483559f0
--- /dev/null
+++ b/drivers/usb/media/sn9c102_sensor.h
@@ -0,0 +1,373 @@
+/***************************************************************************
+ * API for image sensors connected to the SN9C10x PC Camera Controllers *
+ * *
+ * Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#ifndef _SN9C102_SENSOR_H_
+#define _SN9C102_SENSOR_H_
+
+#include <linux/usb.h>
+#include <linux/videodev.h>
+#include <linux/device.h>
+#include <linux/stddef.h>
+#include <linux/errno.h>
+#include <asm/types.h>
+
+struct sn9c102_device;
+struct sn9c102_sensor;
+
+/*****************************************************************************/
+
+/*
+ OVERVIEW.
+ This is a small interface that allows you to add support for any CCD/CMOS
+ image sensors connected to the SN9C10X bridges. The entire API is documented
+ below. In the most general case, to support a sensor there are three steps
+ you have to follow:
+ 1) define the main "sn9c102_sensor" structure by setting the basic fields;
+ 2) write a probing function to be called by the core module when the USB
+ camera is recognized, then add both the USB ids and the name of that
+ function to the two corresponding tables SENSOR_TABLE and ID_TABLE (see
+ below);
+ 3) implement the methods that you want/need (and fill the rest of the main
+ structure accordingly).
+ "sn9c102_pas106b.c" is an example of all this stuff. Remember that you do
+ NOT need to touch the source code of the core module for the things to work
+ properly, unless you find bugs or flaws in it. Finally, do not forget to
+ read the V4L2 API for completeness.
+*/
+
+/*****************************************************************************/
+
+/*
+ Probing functions: on success, you must attach the sensor to the camera
+ by calling sn9c102_attach_sensor() provided below.
+ To enable the I2C communication, you might need to perform a really basic
+ initialization of the SN9C10X chip by using the write function declared
+ ahead.
+ Functions must return 0 on success, the appropriate error otherwise.
+*/
+extern int sn9c102_probe_hv7131d(struct sn9c102_device* cam);
+extern int sn9c102_probe_mi0343(struct sn9c102_device* cam);
+extern int sn9c102_probe_pas106b(struct sn9c102_device* cam);
+extern int sn9c102_probe_pas202bcb(struct sn9c102_device* cam);
+extern int sn9c102_probe_tas5110c1b(struct sn9c102_device* cam);
+extern int sn9c102_probe_tas5130d1b(struct sn9c102_device* cam);
+
+/*
+ Add the above entries to this table. Be sure to add the entry in the right
+ place, since, on failure, the next probing routine is called according to
+ the order of the list below, from top to bottom.
+*/
+#define SN9C102_SENSOR_TABLE \
+static int (*sn9c102_sensor_table[])(struct sn9c102_device*) = { \
+ &sn9c102_probe_mi0343, /* strong detection based on SENSOR ids */ \
+ &sn9c102_probe_pas106b, /* strong detection based on SENSOR ids */ \
+ &sn9c102_probe_pas202bcb, /* strong detection based on SENSOR ids */ \
+ &sn9c102_probe_hv7131d, /* strong detection based on SENSOR ids */ \
+ &sn9c102_probe_tas5110c1b, /* detection based on USB pid/vid */ \
+ &sn9c102_probe_tas5130d1b, /* detection based on USB pid/vid */ \
+ NULL, \
+};
+
+/* Attach a probed sensor to the camera. */
+extern void
+sn9c102_attach_sensor(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor);
+
+/* Each SN9C10X camera has proper PID/VID identifiers. Add them here in case.*/
+#define SN9C102_ID_TABLE \
+static const struct usb_device_id sn9c102_id_table[] = { \
+ { USB_DEVICE(0x0c45, 0x6001), }, /* TAS5110C1B */ \
+ { USB_DEVICE(0x0c45, 0x6005), }, /* TAS5110C1B */ \
+ { USB_DEVICE(0x0c45, 0x6009), }, /* PAS106B */ \
+ { USB_DEVICE(0x0c45, 0x600d), }, /* PAS106B */ \
+ { USB_DEVICE(0x0c45, 0x6024), }, \
+ { USB_DEVICE(0x0c45, 0x6025), }, /* TAS5130D1B and TAS5110C1B */ \
+ { USB_DEVICE(0x0c45, 0x6028), }, /* PAS202BCB */ \
+ { USB_DEVICE(0x0c45, 0x6029), }, /* PAS106B */ \
+ { USB_DEVICE(0x0c45, 0x602a), }, /* HV7131D */ \
+ { USB_DEVICE(0x0c45, 0x602b), }, /* MI-0343 */ \
+ { USB_DEVICE(0x0c45, 0x602c), }, /* OV7620 */ \
+ { USB_DEVICE(0x0c45, 0x6030), }, /* MI03x */ \
+ { USB_DEVICE(0x0c45, 0x6080), }, \
+ { USB_DEVICE(0x0c45, 0x6082), }, /* MI0343 and MI0360 */ \
+ { USB_DEVICE(0x0c45, 0x6083), }, /* HV7131[D|E1] */ \
+ { USB_DEVICE(0x0c45, 0x6088), }, \
+ { USB_DEVICE(0x0c45, 0x608a), }, \
+ { USB_DEVICE(0x0c45, 0x608b), }, \
+ { USB_DEVICE(0x0c45, 0x608c), }, /* HV7131x */ \
+ { USB_DEVICE(0x0c45, 0x608e), }, /* CIS-VF10 */ \
+ { USB_DEVICE(0x0c45, 0x608f), }, /* OV7630 */ \
+ { USB_DEVICE(0x0c45, 0x60a0), }, \
+ { USB_DEVICE(0x0c45, 0x60a2), }, \
+ { USB_DEVICE(0x0c45, 0x60a3), }, \
+ { USB_DEVICE(0x0c45, 0x60a8), }, /* PAS106B */ \
+ { USB_DEVICE(0x0c45, 0x60aa), }, /* TAS5130D1B */ \
+ { USB_DEVICE(0x0c45, 0x60ab), }, /* TAS5110C1B */ \
+ { USB_DEVICE(0x0c45, 0x60ac), }, \
+ { USB_DEVICE(0x0c45, 0x60ae), }, \
+ { USB_DEVICE(0x0c45, 0x60af), }, /* PAS202BCB */ \
+ { USB_DEVICE(0x0c45, 0x60b0), }, \
+ { USB_DEVICE(0x0c45, 0x60b2), }, \
+ { USB_DEVICE(0x0c45, 0x60b3), }, \
+ { USB_DEVICE(0x0c45, 0x60b8), }, \
+ { USB_DEVICE(0x0c45, 0x60ba), }, \
+ { USB_DEVICE(0x0c45, 0x60bb), }, \
+ { USB_DEVICE(0x0c45, 0x60bc), }, \
+ { USB_DEVICE(0x0c45, 0x60be), }, \
+ { } \
+};
+
+/*****************************************************************************/
+
+/*
+ Read/write routines: they always return -1 on error, 0 or the read value
+ otherwise. NOTE that a real read operation is not supported by the SN9C10X
+ chip for some of its registers. To work around this problem, a pseudo-read
+ call is provided instead: it returns the last successfully written value
+ on the register (0 if it has never been written), the usual -1 on error.
+*/
+
+/* The "try" I2C I/O versions are used when probing the sensor */
+extern int sn9c102_i2c_try_write(struct sn9c102_device*,struct sn9c102_sensor*,
+ u8 address, u8 value);
+extern int sn9c102_i2c_try_read(struct sn9c102_device*,struct sn9c102_sensor*,
+ u8 address);
+
+/*
+ These must be used if and only if the sensor doesn't implement the standard
+ I2C protocol. There are a number of good reasons why you must use the
+ single-byte versions of these functions: do not abuse. The first function
+ writes n bytes, from data0 to datan, to registers 0x09 - 0x09+n of SN9C10X
+ chip. The second one programs the registers 0x09 and 0x10 with data0 and
+ data1, and places the n bytes read from the sensor register table in the
+ buffer pointed by 'buffer'. Both the functions return -1 on error; the write
+ version returns 0 on success, while the read version returns the first read
+ byte.
+*/
+extern int sn9c102_i2c_try_raw_write(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor, u8 n,
+ u8 data0, u8 data1, u8 data2, u8 data3,
+ u8 data4, u8 data5);
+extern int sn9c102_i2c_try_raw_read(struct sn9c102_device* cam,
+ struct sn9c102_sensor* sensor, u8 data0,
+ u8 data1, u8 n, u8 buffer[]);
+
+/* To be used after the sensor struct has been attached to the camera struct */
+extern int sn9c102_i2c_write(struct sn9c102_device*, u8 address, u8 value);
+extern int sn9c102_i2c_read(struct sn9c102_device*, u8 address);
+
+/* I/O on registers in the bridge. Could be used by the sensor methods too */
+extern int sn9c102_write_reg(struct sn9c102_device*, u8 value, u16 index);
+extern int sn9c102_pread_reg(struct sn9c102_device*, u16 index);
+
+/*
+ NOTE: there are no exported debugging functions. To uniform the output you
+ must use the dev_info()/dev_warn()/dev_err() macros defined in device.h,
+ already included here, the argument being the struct device 'dev' of the
+ sensor structure. Do NOT use these macros before the sensor is attached or
+ the kernel will crash! However, you should not need to notify the user about
+ common errors or other messages, since this is done by the master module.
+*/
+
+/*****************************************************************************/
+
+enum sn9c102_i2c_sysfs_ops {
+ SN9C102_I2C_READ = 0x01,
+ SN9C102_I2C_WRITE = 0x02,
+};
+
+enum sn9c102_i2c_frequency { /* sensors may support both the frequencies */
+ SN9C102_I2C_100KHZ = 0x01,
+ SN9C102_I2C_400KHZ = 0x02,
+};
+
+enum sn9c102_i2c_interface {
+ SN9C102_I2C_2WIRES,
+ SN9C102_I2C_3WIRES,
+};
+
+struct sn9c102_sensor {
+ char name[32], /* sensor name */
+ maintainer[64]; /* name of the mantainer <email> */
+
+ /* Supported operations through the 'sysfs' interface */
+ enum sn9c102_i2c_sysfs_ops sysfs_ops;
+
+ /*
+ These sensor capabilities must be provided if the SN9C10X controller
+ needs to communicate through the sensor serial interface by using
+ at least one of the i2c functions available.
+ */
+ enum sn9c102_i2c_frequency frequency;
+ enum sn9c102_i2c_interface interface;
+
+ /*
+ This identifier must be provided if the image sensor implements
+ the standard I2C protocol.
+ */
+ u8 i2c_slave_id; /* reg. 0x09 */
+
+ /*
+ NOTE: Where not noted,most of the functions below are not mandatory.
+ Set to null if you do not implement them. If implemented,
+ they must return 0 on success, the proper error otherwise.
+ */
+
+ int (*init)(struct sn9c102_device* cam);
+ /*
+ This function will be called after the sensor has been attached.
+ It should be used to initialize the sensor only, but may also
+ configure part of the SN9C10X chip if necessary. You don't need to
+ setup picture settings like brightness, contrast, etc.. here, if
+ the corrisponding controls are implemented (see below), since
+ they are adjusted in the core driver by calling the set_ctrl()
+ method after init(), where the arguments are the default values
+ specified in the v4l2_queryctrl list of supported controls;
+ Same suggestions apply for other settings, _if_ the corresponding
+ methods are present; if not, the initialization must configure the
+ sensor according to the default configuration structures below.
+ */
+
+ struct v4l2_queryctrl qctrl[V4L2_CID_LASTP1-V4L2_CID_BASE];
+ /*
+ Optional list of default controls, defined as indicated in the
+ V4L2 API. Menu type controls are not handled by this interface.
+ */
+
+ int (*get_ctrl)(struct sn9c102_device* cam, struct v4l2_control* ctrl);
+ int (*set_ctrl)(struct sn9c102_device* cam,
+ const struct v4l2_control* ctrl);
+ /*
+ You must implement at least the set_ctrl method if you have defined
+ the list above. The returned value must follow the V4L2
+ specifications for the VIDIOC_G|C_CTRL ioctls. V4L2_CID_H|VCENTER
+ are not supported by this driver, so do not implement them. Also,
+ you don't have to check whether the passed values are out of bounds,
+ given that this is done by the core module.
+ */
+
+ struct v4l2_cropcap cropcap;
+ /*
+ Think the image sensor as a grid of R,G,B monochromatic pixels
+ disposed according to a particular Bayer pattern, which describes
+ the complete array of pixels, from (0,0) to (xmax, ymax). We will
+ use this coordinate system from now on. It is assumed the sensor
+ chip can be programmed to capture/transmit a subsection of that
+ array of pixels: we will call this subsection "active window".
+ It is not always true that the largest achievable active window can
+ cover the whole array of pixels. The V4L2 API defines another
+ area called "source rectangle", which, in turn, is a subrectangle of
+ the active window. The SN9C10X chip is always programmed to read the
+ source rectangle.
+ The bounds of both the active window and the source rectangle are
+ specified in the cropcap substructures 'bounds' and 'defrect'.
+ By default, the source rectangle should cover the largest possible
+ area. Again, it is not always true that the largest source rectangle
+ can cover the entire active window, although it is a rare case for
+ the hardware we have. The bounds of the source rectangle _must_ be
+ multiple of 16 and must use the same coordinate system as indicated
+ before; their centers shall align initially.
+ If necessary, the sensor chip must be initialized during init() to
+ set the bounds of the active sensor window; however, by default, it
+ usually covers the largest achievable area (maxwidth x maxheight)
+ of pixels, so no particular initialization is needed, if you have
+ defined the correct default bounds in the structures.
+ See the V4L2 API for further details.
+ NOTE: once you have defined the bounds of the active window
+ (struct cropcap.bounds) you must not change them.anymore.
+ Only 'bounds' and 'defrect' fields are mandatory, other fields
+ will be ignored.
+ */
+
+ int (*set_crop)(struct sn9c102_device* cam,
+ const struct v4l2_rect* rect);
+ /*
+ To be called on VIDIOC_C_SETCROP. The core module always calls a
+ default routine which configures the appropriate SN9C10X regs (also
+ scaling), but you may need to override/adjust specific stuff.
+ 'rect' contains width and height values that are multiple of 16: in
+ case you override the default function, you always have to program
+ the chip to match those values; on error return the corresponding
+ error code without rolling back.
+ NOTE: in case, you must program the SN9C10X chip to get rid of
+ blank pixels or blank lines at the _start_ of each line or
+ frame after each HSYNC or VSYNC, so that the image starts with
+ real RGB data (see regs 0x12, 0x13) (having set H_SIZE and,
+ V_SIZE you don't have to care about blank pixels or blank
+ lines at the end of each line or frame).
+ */
+
+ struct v4l2_pix_format pix_format;
+ /*
+ What you have to define here are: 1) initial 'width' and 'height' of
+ the target rectangle 2) the initial 'pixelformat', which can be
+ either V4L2_PIX_FMT_SN9C10X (for compressed video) or
+ V4L2_PIX_FMT_SBGGR8 3) 'priv', which we'll be used to indicate the
+ number of bits per pixel for uncompressed video, 8 or 9 (despite the
+ current value of 'pixelformat').
+ NOTE 1: both 'width' and 'height' _must_ be either 1/1 or 1/2 or 1/4
+ of cropcap.defrect.width and cropcap.defrect.height. I
+ suggest 1/1.
+ NOTE 2: The initial compression quality is defined by the first bit
+ of reg 0x17 during the initialization of the image sensor.
+ NOTE 3: as said above, you have to program the SN9C10X chip to get
+ rid of any blank pixels, so that the output of the sensor
+ matches the RGB bayer sequence (i.e. BGBGBG...GRGRGR).
+ */
+
+ int (*set_pix_format)(struct sn9c102_device* cam,
+ const struct v4l2_pix_format* pix);
+ /*
+ To be called on VIDIOC_S_FMT, when switching from the SBGGR8 to
+ SN9C10X pixel format or viceversa. On error return the corresponding
+ error code without rolling back.
+ */
+
+ const struct device* dev;
+ /*
+ This is the argument for dev_err(), dev_info() and dev_warn(). It
+ is used for debugging purposes. You must not access the struct
+ before the sensor is attached.
+ */
+
+ const struct usb_device* usbdev;
+ /*
+ Points to the usb_device struct after the sensor is attached.
+ Do not touch unless you know what you are doing.
+ */
+
+ /*
+ Do NOT write to the data below, it's READ ONLY. It is used by the
+ core module to store successfully updated values of the above
+ settings, for rollbacks..etc..in case of errors during atomic I/O
+ */
+ struct v4l2_queryctrl _qctrl[V4L2_CID_LASTP1-V4L2_CID_BASE];
+ struct v4l2_rect _rect;
+};
+
+/*****************************************************************************/
+
+/* Private ioctl's for control settings supported by some image sensors */
+#define SN9C102_V4L2_CID_DAC_MAGNITUDE V4L2_CID_PRIVATE_BASE
+#define SN9C102_V4L2_CID_GREEN_BALANCE V4L2_CID_PRIVATE_BASE + 1
+#define SN9C102_V4L2_CID_RESET_LEVEL V4L2_CID_PRIVATE_BASE + 2
+#define SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE V4L2_CID_PRIVATE_BASE + 3
+
+#endif /* _SN9C102_SENSOR_H_ */
diff --git a/drivers/usb/media/sn9c102_tas5110c1b.c b/drivers/usb/media/sn9c102_tas5110c1b.c
new file mode 100644
index 000000000000..690d62192273
--- /dev/null
+++ b/drivers/usb/media/sn9c102_tas5110c1b.c
@@ -0,0 +1,174 @@
+/***************************************************************************
+ * Plug-in for TAS5110C1B image sensor connected to the SN9C10x PC Camera *
+ * Controllers *
+ * *
+ * Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include "sn9c102_sensor.h"
+
+
+static struct sn9c102_sensor tas5110c1b;
+
+static struct v4l2_control tas5110c1b_gain;
+
+
+static int tas5110c1b_init(struct sn9c102_device* cam)
+{
+ int err = 0;
+
+ err += sn9c102_write_reg(cam, 0x01, 0x01);
+ err += sn9c102_write_reg(cam, 0x44, 0x01);
+ err += sn9c102_write_reg(cam, 0x00, 0x10);
+ err += sn9c102_write_reg(cam, 0x00, 0x11);
+ err += sn9c102_write_reg(cam, 0x0a, 0x14);
+ err += sn9c102_write_reg(cam, 0x60, 0x17);
+ err += sn9c102_write_reg(cam, 0x06, 0x18);
+ err += sn9c102_write_reg(cam, 0xfb, 0x19);
+
+ err += sn9c102_i2c_write(cam, 0xc0, 0x80);
+
+ return err;
+}
+
+
+static int tas5110c1b_get_ctrl(struct sn9c102_device* cam,
+ struct v4l2_control* ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_GAIN:
+ ctrl->value = tas5110c1b_gain.value;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+
+static int tas5110c1b_set_ctrl(struct sn9c102_device* cam,
+ const struct v4l2_control* ctrl)
+{
+ int err = 0;
+
+ switch (ctrl->id) {
+ case V4L2_CID_GAIN:
+ if (!(err += sn9c102_i2c_write(cam, 0x20, 0xf6 - ctrl->value)))
+ tas5110c1b_gain.value = ctrl->value;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return err ? -EIO : 0;
+}
+
+
+static int tas5110c1b_set_crop(struct sn9c102_device* cam,
+ const struct v4l2_rect* rect)
+{
+ struct sn9c102_sensor* s = &tas5110c1b;
+ int err = 0;
+ u8 h_start = (u8)(rect->left - s->cropcap.bounds.left) + 69,
+ v_start = (u8)(rect->top - s->cropcap.bounds.top) + 9;
+
+ err += sn9c102_write_reg(cam, h_start, 0x12);
+ err += sn9c102_write_reg(cam, v_start, 0x13);
+
+ /* Don't change ! */
+ err += sn9c102_write_reg(cam, 0x14, 0x1a);
+ err += sn9c102_write_reg(cam, 0x0a, 0x1b);
+ err += sn9c102_write_reg(cam, sn9c102_pread_reg(cam, 0x19), 0x19);
+
+ return err;
+}
+
+
+static int tas5110c1b_set_pix_format(struct sn9c102_device* cam,
+ const struct v4l2_pix_format* pix)
+{
+ int err = 0;
+
+ if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+ err += sn9c102_write_reg(cam, 0x2b, 0x19);
+ else
+ err += sn9c102_write_reg(cam, 0xfb, 0x19);
+
+ return err;
+}
+
+
+static struct sn9c102_sensor tas5110c1b = {
+ .name = "TAS5110C1B",
+ .maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+ .sysfs_ops = SN9C102_I2C_WRITE,
+ .frequency = SN9C102_I2C_100KHZ,
+ .interface = SN9C102_I2C_3WIRES,
+ .init = &tas5110c1b_init,
+ .qctrl = {
+ {
+ .id = V4L2_CID_GAIN,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "global gain",
+ .minimum = 0x00,
+ .maximum = 0xf6,
+ .step = 0x01,
+ .default_value = 0x40,
+ .flags = 0,
+ },
+ },
+ .set_ctrl = &tas5110c1b_set_ctrl,
+ .cropcap = {
+ .bounds = {
+ .left = 0,
+ .top = 0,
+ .width = 352,
+ .height = 288,
+ },
+ .defrect = {
+ .left = 0,
+ .top = 0,
+ .width = 352,
+ .height = 288,
+ },
+ },
+ .get_ctrl = &tas5110c1b_get_ctrl,
+ .set_crop = &tas5110c1b_set_crop,
+ .pix_format = {
+ .width = 352,
+ .height = 288,
+ .pixelformat = V4L2_PIX_FMT_SBGGR8,
+ .priv = 8,
+ },
+ .set_pix_format = &tas5110c1b_set_pix_format
+};
+
+
+int sn9c102_probe_tas5110c1b(struct sn9c102_device* cam)
+{
+ /* This sensor has no identifiers, so let's attach it anyway */
+ sn9c102_attach_sensor(cam, &tas5110c1b);
+
+ /* Sensor detection is based on USB pid/vid */
+ if (le16_to_cpu(tas5110c1b.usbdev->descriptor.idProduct) != 0x6001 &&
+ le16_to_cpu(tas5110c1b.usbdev->descriptor.idProduct) != 0x6005 &&
+ le16_to_cpu(tas5110c1b.usbdev->descriptor.idProduct) != 0x60ab)
+ return -ENODEV;
+
+ return 0;
+}
diff --git a/drivers/usb/media/sn9c102_tas5130d1b.c b/drivers/usb/media/sn9c102_tas5130d1b.c
new file mode 100644
index 000000000000..b378e941bbe8
--- /dev/null
+++ b/drivers/usb/media/sn9c102_tas5130d1b.c
@@ -0,0 +1,188 @@
+/***************************************************************************
+ * Plug-in for TAS5130D1B image sensor connected to the SN9C10x PC Camera *
+ * Controllers *
+ * *
+ * Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include "sn9c102_sensor.h"
+
+
+static struct sn9c102_sensor tas5130d1b;
+
+static struct v4l2_control tas5130d1b_gain, tas5130d1b_exposure;
+
+
+static int tas5130d1b_init(struct sn9c102_device* cam)
+{
+ int err = 0;
+
+ err += sn9c102_write_reg(cam, 0x01, 0x01);
+ err += sn9c102_write_reg(cam, 0x20, 0x17);
+ err += sn9c102_write_reg(cam, 0x04, 0x01);
+ err += sn9c102_write_reg(cam, 0x01, 0x10);
+ err += sn9c102_write_reg(cam, 0x00, 0x11);
+ err += sn9c102_write_reg(cam, 0x00, 0x14);
+ err += sn9c102_write_reg(cam, 0x60, 0x17);
+ err += sn9c102_write_reg(cam, 0x07, 0x18);
+
+ return err;
+}
+
+
+static int tas5130d1b_get_ctrl(struct sn9c102_device* cam,
+ struct v4l2_control* ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_GAIN:
+ ctrl->value = tas5130d1b_gain.value;
+ break;
+ case V4L2_CID_EXPOSURE:
+ ctrl->value = tas5130d1b_exposure.value;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+
+static int tas5130d1b_set_ctrl(struct sn9c102_device* cam,
+ const struct v4l2_control* ctrl)
+{
+ int err = 0;
+
+ switch (ctrl->id) {
+ case V4L2_CID_GAIN:
+ if (!(err += sn9c102_i2c_write(cam, 0x20, 0xf6 - ctrl->value)))
+ tas5130d1b_gain.value = ctrl->value;
+ break;
+ case V4L2_CID_EXPOSURE:
+ if (!(err += sn9c102_i2c_write(cam, 0x40, 0x47 - ctrl->value)))
+ tas5130d1b_exposure.value = ctrl->value;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return err ? -EIO : 0;
+}
+
+
+static int tas5130d1b_set_crop(struct sn9c102_device* cam,
+ const struct v4l2_rect* rect)
+{
+ struct sn9c102_sensor* s = &tas5130d1b;
+ u8 h_start = (u8)(rect->left - s->cropcap.bounds.left) + 104,
+ v_start = (u8)(rect->top - s->cropcap.bounds.top) + 12;
+ int err = 0;
+
+ err += sn9c102_write_reg(cam, h_start, 0x12);
+ err += sn9c102_write_reg(cam, v_start, 0x13);
+
+ /* Do NOT change! */
+ err += sn9c102_write_reg(cam, 0x1f, 0x1a);
+ err += sn9c102_write_reg(cam, 0x1a, 0x1b);
+ err += sn9c102_write_reg(cam, sn9c102_pread_reg(cam, 0x19), 0x19);
+
+ return err;
+}
+
+
+static int tas5130d1b_set_pix_format(struct sn9c102_device* cam,
+ const struct v4l2_pix_format* pix)
+{
+ int err = 0;
+
+ if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+ err += sn9c102_write_reg(cam, 0x63, 0x19);
+ else
+ err += sn9c102_write_reg(cam, 0xf3, 0x19);
+
+ return err;
+}
+
+
+static struct sn9c102_sensor tas5130d1b = {
+ .name = "TAS5130D1B",
+ .maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+ .sysfs_ops = SN9C102_I2C_WRITE,
+ .frequency = SN9C102_I2C_100KHZ,
+ .interface = SN9C102_I2C_3WIRES,
+ .init = &tas5130d1b_init,
+ .qctrl = {
+ {
+ .id = V4L2_CID_GAIN,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "global gain",
+ .minimum = 0x00,
+ .maximum = 0xf6,
+ .step = 0x02,
+ .default_value = 0x00,
+ .flags = 0,
+ },
+ {
+ .id = V4L2_CID_EXPOSURE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .minimum = 0x00,
+ .maximum = 0x47,
+ .step = 0x01,
+ .default_value = 0x00,
+ .flags = 0,
+ },
+ },
+ .get_ctrl = &tas5130d1b_get_ctrl,
+ .set_ctrl = &tas5130d1b_set_ctrl,
+ .cropcap = {
+ .bounds = {
+ .left = 0,
+ .top = 0,
+ .width = 640,
+ .height = 480,
+ },
+ .defrect = {
+ .left = 0,
+ .top = 0,
+ .width = 640,
+ .height = 480,
+ },
+ },
+ .set_crop = &tas5130d1b_set_crop,
+ .pix_format = {
+ .width = 640,
+ .height = 480,
+ .pixelformat = V4L2_PIX_FMT_SBGGR8,
+ .priv = 8,
+ },
+ .set_pix_format = &tas5130d1b_set_pix_format
+};
+
+
+int sn9c102_probe_tas5130d1b(struct sn9c102_device* cam)
+{
+ /* This sensor has no identifiers, so let's attach it anyway */
+ sn9c102_attach_sensor(cam, &tas5130d1b);
+
+ /* Sensor detection is based on USB pid/vid */
+ if (le16_to_cpu(tas5130d1b.usbdev->descriptor.idProduct) != 0x6025 &&
+ le16_to_cpu(tas5130d1b.usbdev->descriptor.idProduct) != 0x60aa)
+ return -ENODEV;
+
+ return 0;
+}
diff --git a/drivers/usb/media/stv680.c b/drivers/usb/media/stv680.c
new file mode 100644
index 000000000000..ae455c8e3702
--- /dev/null
+++ b/drivers/usb/media/stv680.c
@@ -0,0 +1,1506 @@
+/*
+ * STV0680 USB Camera Driver, by Kevin Sisson (kjsisson@bellsouth.net)
+ *
+ * Thanks to STMicroelectronics for information on the usb commands, and
+ * to Steve Miller at STM for his help and encouragement while I was
+ * writing this driver.
+ *
+ * This driver is based heavily on the
+ * Endpoints (formerly known as AOX) se401 USB Camera Driver
+ * Copyright (c) 2000 Jeroen B. Vreeken (pe1rxq@amsat.org)
+ *
+ * Still somewhat based on the Linux ov511 driver.
+ *
+ * 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.
+ *
+ * History:
+ * ver 0.1 October, 2001. Initial attempt.
+ *
+ * ver 0.2 November, 2001. Fixed asbility to resize, added brightness
+ * function, made more stable (?)
+ *
+ * ver 0.21 Nov, 2001. Added gamma correction and white balance,
+ * due to Alexander Schwartz. Still trying to
+ * improve stablility. Moved stuff into stv680.h
+ *
+ * ver 0.22 Nov, 2001. Added sharpen function (by Michael Sweet,
+ * mike@easysw.com) from GIMP, also used in pencam.
+ * Simple, fast, good integer math routine.
+ *
+ * ver 0.23 Dec, 2001 (gkh)
+ * Took out sharpen function, ran code through
+ * Lindent, and did other minor tweaks to get
+ * things to work properly with 2.5.1
+ *
+ * ver 0.24 Jan, 2002 (kjs)
+ * Fixed the problem with webcam crashing after
+ * two pictures. Changed the way pic is halved to
+ * improve quality. Got rid of green line around
+ * frame. Fix brightness reset when changing size
+ * bug. Adjusted gamma filters slightly.
+ *
+ * ver 0.25 Jan, 2002 (kjs)
+ * Fixed a bug in which the driver sometimes attempted
+ * to set to a non-supported size. This allowed
+ * gnomemeeting to work.
+ * Fixed proc entry removal bug.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+#include <linux/pagemap.h>
+#include <linux/errno.h>
+#include <linux/videodev.h>
+#include <linux/usb.h>
+
+#include "stv680.h"
+
+static int video_nr = -1;
+static int swapRGB = 0; /* default for auto sleect */
+static int swapRGB_on = 0; /* default to allow auto select; -1=swap never, +1= swap always */
+
+static unsigned int debug = 0;
+
+#define PDEBUG(level, fmt, args...) \
+ do { \
+ if (debug >= level) \
+ info("[%s:%d] " fmt, __FUNCTION__, __LINE__ , ## args); \
+ } while (0)
+
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.25"
+#define DRIVER_AUTHOR "Kevin Sisson <kjsisson@bellsouth.net>"
+#define DRIVER_DESC "STV0680 USB Camera Driver"
+
+MODULE_AUTHOR (DRIVER_AUTHOR);
+MODULE_DESCRIPTION (DRIVER_DESC);
+MODULE_LICENSE ("GPL");
+module_param(debug, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC (debug, "Debug enabled or not");
+module_param(swapRGB_on, int, 0);
+MODULE_PARM_DESC (swapRGB_on, "Red/blue swap: 1=always, 0=auto, -1=never");
+module_param(video_nr, int, 0);
+
+/********************************************************************
+ *
+ * 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
+ *
+ * And the STV0680 driver - Kevin
+ ********************************************************************/
+static void *rvmalloc (unsigned long size)
+{
+ void *mem;
+ unsigned long adr;
+
+ size = PAGE_ALIGN(size);
+ mem = vmalloc_32 (size);
+ if (!mem)
+ return NULL;
+
+ memset (mem, 0, size); /* Clear the ram out, no junk to the user */
+ adr = (unsigned long) mem;
+ while (size > 0) {
+ SetPageReserved(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) {
+ ClearPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+ vfree (mem);
+}
+
+
+/*********************************************************************
+ * pencam read/write functions
+ ********************************************************************/
+
+static int stv_sndctrl (int set, struct usb_stv *stv680, unsigned short req, unsigned short value, unsigned char *buffer, int size)
+{
+ int ret = -1;
+
+ switch (set) {
+ case 0: /* 0xc1 */
+ ret = usb_control_msg (stv680->udev,
+ usb_rcvctrlpipe (stv680->udev, 0),
+ req,
+ (USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT),
+ value, 0, buffer, size, PENCAM_TIMEOUT);
+ break;
+
+ case 1: /* 0x41 */
+ ret = usb_control_msg (stv680->udev,
+ usb_sndctrlpipe (stv680->udev, 0),
+ req,
+ (USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT),
+ value, 0, buffer, size, PENCAM_TIMEOUT);
+ break;
+
+ case 2: /* 0x80 */
+ ret = usb_control_msg (stv680->udev,
+ usb_rcvctrlpipe (stv680->udev, 0),
+ req,
+ (USB_DIR_IN | USB_RECIP_DEVICE),
+ value, 0, buffer, size, PENCAM_TIMEOUT);
+ break;
+
+ case 3: /* 0x40 */
+ ret = usb_control_msg (stv680->udev,
+ usb_sndctrlpipe (stv680->udev, 0),
+ req,
+ (USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
+ value, 0, buffer, size, PENCAM_TIMEOUT);
+ break;
+
+ }
+ if ((ret < 0) && (req != 0x0a)) {
+ PDEBUG (1, "STV(e): usb_control_msg error %i, request = 0x%x, error = %i", set, req, ret);
+ }
+ return ret;
+}
+
+static int stv_set_config (struct usb_stv *dev, int configuration, int interface, int alternate)
+{
+
+ if (configuration != dev->udev->actconfig->desc.bConfigurationValue
+ || usb_reset_configuration (dev->udev) < 0) {
+ PDEBUG (1, "STV(e): FAILED to reset configuration %i", configuration);
+ return -1;
+ }
+ if (usb_set_interface (dev->udev, interface, alternate) < 0) {
+ PDEBUG (1, "STV(e): FAILED to set alternate interface %i", alternate);
+ return -1;
+ }
+ return 0;
+}
+
+static int stv_stop_video (struct usb_stv *dev)
+{
+ int i;
+ unsigned char *buf;
+
+ buf = kmalloc (40, GFP_KERNEL);
+ if (buf == NULL) {
+ PDEBUG (0, "STV(e): Out of (small buf) memory");
+ return -1;
+ }
+
+ /* this is a high priority command; it stops all lower order commands */
+ if ((i = stv_sndctrl (1, dev, 0x04, 0x0000, buf, 0x0)) < 0) {
+ i = stv_sndctrl (0, dev, 0x80, 0, buf, 0x02); /* Get Last Error; 2 = busy */
+ PDEBUG (1, "STV(i): last error: %i, command = 0x%x", buf[0], buf[1]);
+ } else {
+ PDEBUG (1, "STV(i): Camera reset to idle mode.");
+ }
+
+ if ((i = stv_set_config (dev, 1, 0, 0)) < 0)
+ PDEBUG (1, "STV(e): Reset config during exit failed");
+
+ /* get current mode */
+ buf[0] = 0xf0;
+ if ((i = stv_sndctrl (0, dev, 0x87, 0, buf, 0x08)) != 0x08) /* get mode */
+ PDEBUG (0, "STV(e): Stop_video: problem setting original mode");
+ if (dev->origMode != buf[0]) {
+ memset (buf, 0, 8);
+ buf[0] = (unsigned char) dev->origMode;
+ if ((i = stv_sndctrl (3, dev, 0x07, 0x0100, buf, 0x08)) != 0x08) {
+ PDEBUG (0, "STV(e): Stop_video: Set_Camera_Mode failed");
+ i = -1;
+ }
+ buf[0] = 0xf0;
+ i = stv_sndctrl (0, dev, 0x87, 0, buf, 0x08);
+ if ((i != 0x08) || (buf[0] != dev->origMode)) {
+ PDEBUG (0, "STV(e): camera NOT set to original resolution.");
+ i = -1;
+ } else
+ PDEBUG (0, "STV(i): Camera set to original resolution");
+ }
+ /* origMode */
+ kfree (buf);
+ return i;
+}
+
+static int stv_set_video_mode (struct usb_stv *dev)
+{
+ int i, stop_video = 1;
+ unsigned char *buf;
+
+ buf = kmalloc (40, GFP_KERNEL);
+ if (buf == NULL) {
+ PDEBUG (0, "STV(e): Out of (small buf) memory");
+ return -1;
+ }
+
+ if ((i = stv_set_config (dev, 1, 0, 0)) < 0) {
+ kfree (buf);
+ return i;
+ }
+
+ i = stv_sndctrl (2, dev, 0x06, 0x0100, buf, 0x12);
+ if (!(i > 0) && (buf[8] == 0x53) && (buf[9] == 0x05)) {
+ PDEBUG (1, "STV(e): Could not get descriptor 0100.");
+ goto error;
+ }
+
+ /* set alternate interface 1 */
+ if ((i = stv_set_config (dev, 1, 0, 1)) < 0)
+ goto error;
+
+ if ((i = stv_sndctrl (0, dev, 0x85, 0, buf, 0x10)) != 0x10)
+ goto error;
+ PDEBUG (1, "STV(i): Setting video mode.");
+ /* Switch to Video mode: 0x0100 = VGA (640x480), 0x0000 = CIF (352x288) 0x0300 = QVGA (320x240) */
+ if ((i = stv_sndctrl (1, dev, 0x09, dev->VideoMode, buf, 0x0)) < 0) {
+ stop_video = 0;
+ goto error;
+ }
+ goto exit;
+
+error:
+ kfree (buf);
+ if (stop_video == 1)
+ stv_stop_video (dev);
+ return -1;
+
+exit:
+ kfree (buf);
+ return 0;
+}
+
+static int stv_init (struct usb_stv *stv680)
+{
+ int i = 0;
+ unsigned char *buffer;
+ unsigned long int bufsize;
+
+ buffer = kmalloc (40, GFP_KERNEL);
+ if (buffer == NULL) {
+ PDEBUG (0, "STV(e): Out of (small buf) memory");
+ return -1;
+ }
+ memset (buffer, 0, 40);
+ udelay (100);
+
+ /* set config 1, interface 0, alternate 0 */
+ if ((i = stv_set_config (stv680, 1, 0, 0)) < 0) {
+ kfree (buffer);
+ PDEBUG (0, "STV(e): set config 1,0,0 failed");
+ return -1;
+ }
+ /* ping camera to be sure STV0680 is present */
+ if ((i = stv_sndctrl (0, stv680, 0x88, 0x5678, buffer, 0x02)) != 0x02)
+ goto error;
+ if ((buffer[0] != 0x56) || (buffer[1] != 0x78)) {
+ PDEBUG (1, "STV(e): camera ping failed!!");
+ goto error;
+ }
+
+ /* get camera descriptor */
+ if ((i = stv_sndctrl (2, stv680, 0x06, 0x0200, buffer, 0x09)) != 0x09)
+ goto error;
+ i = stv_sndctrl (2, stv680, 0x06, 0x0200, buffer, 0x22);
+ if (!(i >= 0) && (buffer[7] == 0xa0) && (buffer[8] == 0x23)) {
+ PDEBUG (1, "STV(e): Could not get descriptor 0200.");
+ goto error;
+ }
+ if ((i = stv_sndctrl (0, stv680, 0x8a, 0, buffer, 0x02)) != 0x02)
+ goto error;
+ if ((i = stv_sndctrl (0, stv680, 0x8b, 0, buffer, 0x24)) != 0x24)
+ goto error;
+ if ((i = stv_sndctrl (0, stv680, 0x85, 0, buffer, 0x10)) != 0x10)
+ goto error;
+
+ stv680->SupportedModes = buffer[7];
+ i = stv680->SupportedModes;
+ stv680->CIF = 0;
+ stv680->VGA = 0;
+ stv680->QVGA = 0;
+ if (i & 1)
+ stv680->CIF = 1;
+ if (i & 2)
+ stv680->VGA = 1;
+ if (i & 8)
+ stv680->QVGA = 1;
+ if (stv680->SupportedModes == 0) {
+ PDEBUG (0, "STV(e): There are NO supported STV680 modes!!");
+ i = -1;
+ goto error;
+ } else {
+ if (stv680->CIF)
+ PDEBUG (0, "STV(i): CIF is supported");
+ if (stv680->QVGA)
+ PDEBUG (0, "STV(i): QVGA is supported");
+ }
+ /* FW rev, ASIC rev, sensor ID */
+ PDEBUG (1, "STV(i): Firmware rev is %i.%i", buffer[0], buffer[1]);
+ PDEBUG (1, "STV(i): ASIC rev is %i.%i", buffer[2], buffer[3]);
+ PDEBUG (1, "STV(i): Sensor ID is %i", (buffer[4]*16) + (buffer[5]>>4));
+
+ /* set alternate interface 1 */
+ if ((i = stv_set_config (stv680, 1, 0, 1)) < 0)
+ goto error;
+
+ if ((i = stv_sndctrl (0, stv680, 0x85, 0, buffer, 0x10)) != 0x10)
+ goto error;
+ if ((i = stv_sndctrl (0, stv680, 0x8d, 0, buffer, 0x08)) != 0x08)
+ goto error;
+ i = buffer[3];
+ PDEBUG (0, "STV(i): Camera has %i pictures.", i);
+
+ /* get current mode */
+ if ((i = stv_sndctrl (0, stv680, 0x87, 0, buffer, 0x08)) != 0x08)
+ goto error;
+ stv680->origMode = buffer[0]; /* 01 = VGA, 03 = QVGA, 00 = CIF */
+
+ /* This will attemp CIF mode, if supported. If not, set to QVGA */
+ memset (buffer, 0, 8);
+ if (stv680->CIF)
+ buffer[0] = 0x00;
+ else if (stv680->QVGA)
+ buffer[0] = 0x03;
+ if ((i = stv_sndctrl (3, stv680, 0x07, 0x0100, buffer, 0x08)) != 0x08) {
+ PDEBUG (0, "STV(i): Set_Camera_Mode failed");
+ i = -1;
+ goto error;
+ }
+ buffer[0] = 0xf0;
+ stv_sndctrl (0, stv680, 0x87, 0, buffer, 0x08);
+ if (((stv680->CIF == 1) && (buffer[0] != 0x00)) || ((stv680->QVGA == 1) && (buffer[0] != 0x03))) {
+ PDEBUG (0, "STV(e): Error setting camera video mode!");
+ i = -1;
+ goto error;
+ } else {
+ if (buffer[0] == 0) {
+ stv680->VideoMode = 0x0000;
+ PDEBUG (0, "STV(i): Video Mode set to CIF");
+ }
+ if (buffer[0] == 0x03) {
+ stv680->VideoMode = 0x0300;
+ PDEBUG (0, "STV(i): Video Mode set to QVGA");
+ }
+ }
+ if ((i = stv_sndctrl (0, stv680, 0x8f, 0, buffer, 0x10)) != 0x10)
+ goto error;
+ bufsize = (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | (buffer[3]);
+ stv680->cwidth = (buffer[4] << 8) | (buffer[5]); /* ->camera = 322, 356, 644 */
+ stv680->cheight = (buffer[6] << 8) | (buffer[7]); /* ->camera = 242, 292, 484 */
+ stv680->origGain = buffer[12];
+
+ goto exit;
+
+error:
+ i = stv_sndctrl (0, stv680, 0x80, 0, buffer, 0x02); /* Get Last Error */
+ PDEBUG (1, "STV(i): last error: %i, command = 0x%x", buffer[0], buffer[1]);
+ kfree (buffer);
+ return -1;
+
+exit:
+ kfree (buffer);
+
+ /* video = 320x240, 352x288 */
+ if (stv680->CIF == 1) {
+ stv680->maxwidth = 352;
+ stv680->maxheight = 288;
+ stv680->vwidth = 352;
+ stv680->vheight = 288;
+ }
+ if (stv680->QVGA == 1) {
+ stv680->maxwidth = 320;
+ stv680->maxheight = 240;
+ stv680->vwidth = 320;
+ stv680->vheight = 240;
+ }
+
+ stv680->rawbufsize = bufsize; /* must be ./. by 8 */
+ stv680->maxframesize = bufsize * 3; /* RGB size */
+ PDEBUG (2, "STV(i): cwidth = %i, cheight = %i", stv680->cwidth, stv680->cheight);
+ PDEBUG (1, "STV(i): width = %i, height = %i, rawbufsize = %li", stv680->vwidth, stv680->vheight, stv680->rawbufsize);
+
+ /* some default values */
+ stv680->bulk_in_endpointAddr = 0x82;
+ stv680->dropped = 0;
+ stv680->error = 0;
+ stv680->framecount = 0;
+ stv680->readcount = 0;
+ stv680->streaming = 0;
+ /* bright, white, colour, hue, contrast are set by software, not in stv0680 */
+ stv680->brightness = 32767;
+ stv680->chgbright = 0;
+ stv680->whiteness = 0; /* only for greyscale */
+ stv680->colour = 32767;
+ stv680->contrast = 32767;
+ stv680->hue = 32767;
+ stv680->palette = STV_VIDEO_PALETTE;
+ stv680->depth = 24; /* rgb24 bits */
+ if ((swapRGB_on == 0) && (swapRGB == 0))
+ PDEBUG (1, "STV(i): swapRGB is (auto) OFF");
+ else if ((swapRGB_on == 0) && (swapRGB == 1))
+ PDEBUG (1, "STV(i): swapRGB is (auto) ON");
+ else if (swapRGB_on == 1)
+ PDEBUG (1, "STV(i): swapRGB is (forced) ON");
+ else if (swapRGB_on == -1)
+ PDEBUG (1, "STV(i): swapRGB is (forced) OFF");
+
+ if (stv_set_video_mode (stv680) < 0) {
+ PDEBUG (0, "STV(e): Could not set video mode in stv_init");
+ return -1;
+ }
+
+ return 0;
+}
+
+/***************** last of pencam routines *******************/
+
+/****************************************************************************
+ * sysfs
+ ***************************************************************************/
+#define stv680_file(name, variable, field) \
+static ssize_t show_##name(struct class_device *class_dev, char *buf) \
+{ \
+ struct video_device *vdev = to_video_device(class_dev); \
+ struct usb_stv *stv = video_get_drvdata(vdev); \
+ return sprintf(buf, field, stv->variable); \
+} \
+static CLASS_DEVICE_ATTR(name, S_IRUGO, show_##name, NULL);
+
+stv680_file(model, camera_name, "%s\n");
+stv680_file(in_use, user, "%d\n");
+stv680_file(streaming, streaming, "%d\n");
+stv680_file(palette, palette, "%i\n");
+stv680_file(frames_total, readcount, "%d\n");
+stv680_file(frames_read, framecount, "%d\n");
+stv680_file(packets_dropped, dropped, "%d\n");
+stv680_file(decoding_errors, error, "%d\n");
+
+static void stv680_create_sysfs_files(struct video_device *vdev)
+{
+ video_device_create_file(vdev, &class_device_attr_model);
+ video_device_create_file(vdev, &class_device_attr_in_use);
+ video_device_create_file(vdev, &class_device_attr_streaming);
+ video_device_create_file(vdev, &class_device_attr_palette);
+ video_device_create_file(vdev, &class_device_attr_frames_total);
+ video_device_create_file(vdev, &class_device_attr_frames_read);
+ video_device_create_file(vdev, &class_device_attr_packets_dropped);
+ video_device_create_file(vdev, &class_device_attr_decoding_errors);
+}
+
+static void stv680_remove_sysfs_files(struct video_device *vdev)
+{
+ video_device_remove_file(vdev, &class_device_attr_model);
+ video_device_remove_file(vdev, &class_device_attr_in_use);
+ video_device_remove_file(vdev, &class_device_attr_streaming);
+ video_device_remove_file(vdev, &class_device_attr_palette);
+ video_device_remove_file(vdev, &class_device_attr_frames_total);
+ video_device_remove_file(vdev, &class_device_attr_frames_read);
+ video_device_remove_file(vdev, &class_device_attr_packets_dropped);
+ video_device_remove_file(vdev, &class_device_attr_decoding_errors);
+}
+
+/********************************************************************
+ * Camera control
+ *******************************************************************/
+
+static int stv680_get_pict (struct usb_stv *stv680, struct video_picture *p)
+{
+ /* This sets values for v4l interface. max/min = 65535/0 */
+
+ p->brightness = stv680->brightness;
+ p->whiteness = stv680->whiteness; /* greyscale */
+ p->colour = stv680->colour;
+ p->contrast = stv680->contrast;
+ p->hue = stv680->hue;
+ p->palette = stv680->palette;
+ p->depth = stv680->depth;
+ return 0;
+}
+
+static int stv680_set_pict (struct usb_stv *stv680, struct video_picture *p)
+{
+ /* See above stv680_get_pict */
+
+ if (p->palette != STV_VIDEO_PALETTE) {
+ PDEBUG (2, "STV(e): Palette set error in _set_pic");
+ return 1;
+ }
+
+ if (stv680->brightness != p->brightness) {
+ stv680->chgbright = 1;
+ stv680->brightness = p->brightness;
+ }
+
+ stv680->whiteness = p->whiteness; /* greyscale */
+ stv680->colour = p->colour;
+ stv680->contrast = p->contrast;
+ stv680->hue = p->hue;
+ stv680->palette = p->palette;
+ stv680->depth = p->depth;
+
+ return 0;
+}
+
+static void stv680_video_irq (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_stv *stv680 = urb->context;
+ int length = urb->actual_length;
+
+ if (length < stv680->rawbufsize)
+ PDEBUG (2, "STV(i): Lost data in transfer: exp %li, got %i", stv680->rawbufsize, length);
+
+ /* ohoh... */
+ if (!stv680->streaming)
+ return;
+
+ if (!stv680->udev) {
+ PDEBUG (0, "STV(e): device vapourished in video_irq");
+ return;
+ }
+
+ /* 0 sized packets happen if we are to fast, but sometimes the camera
+ keeps sending them forever...
+ */
+ if (length && !urb->status) {
+ stv680->nullpackets = 0;
+ switch (stv680->scratch[stv680->scratch_next].state) {
+ case BUFFER_READY:
+ case BUFFER_BUSY:
+ stv680->dropped++;
+ break;
+
+ case BUFFER_UNUSED:
+ memcpy (stv680->scratch[stv680->scratch_next].data,
+ (unsigned char *) urb->transfer_buffer, length);
+ stv680->scratch[stv680->scratch_next].state = BUFFER_READY;
+ stv680->scratch[stv680->scratch_next].length = length;
+ if (waitqueue_active (&stv680->wq)) {
+ wake_up_interruptible (&stv680->wq);
+ }
+ stv680->scratch_overflow = 0;
+ stv680->scratch_next++;
+ if (stv680->scratch_next >= STV680_NUMSCRATCH)
+ stv680->scratch_next = 0;
+ break;
+ } /* switch */
+ } else {
+ stv680->nullpackets++;
+ if (stv680->nullpackets > STV680_MAX_NULLPACKETS) {
+ if (waitqueue_active (&stv680->wq)) {
+ wake_up_interruptible (&stv680->wq);
+ }
+ }
+ } /* if - else */
+
+ /* Resubmit urb for new data */
+ urb->status = 0;
+ urb->dev = stv680->udev;
+ if (usb_submit_urb (urb, GFP_ATOMIC))
+ PDEBUG (0, "STV(e): urb burned down in video irq");
+ return;
+} /* _video_irq */
+
+static int stv680_start_stream (struct usb_stv *stv680)
+{
+ struct urb *urb;
+ int err = 0, i;
+
+ stv680->streaming = 1;
+
+ /* Do some memory allocation */
+ for (i = 0; i < STV680_NUMFRAMES; i++) {
+ stv680->frame[i].data = stv680->fbuf + i * stv680->maxframesize;
+ stv680->frame[i].curpix = 0;
+ }
+ /* packet size = 4096 */
+ for (i = 0; i < STV680_NUMSBUF; i++) {
+ stv680->sbuf[i].data = kmalloc (stv680->rawbufsize, GFP_KERNEL);
+ if (stv680->sbuf[i].data == NULL) {
+ PDEBUG (0, "STV(e): Could not kmalloc raw data buffer %i", i);
+ return -1;
+ }
+ }
+
+ stv680->scratch_next = 0;
+ stv680->scratch_use = 0;
+ stv680->scratch_overflow = 0;
+ for (i = 0; i < STV680_NUMSCRATCH; i++) {
+ stv680->scratch[i].data = kmalloc (stv680->rawbufsize, GFP_KERNEL);
+ if (stv680->scratch[i].data == NULL) {
+ PDEBUG (0, "STV(e): Could not kmalloc raw scratch buffer %i", i);
+ return -1;
+ }
+ stv680->scratch[i].state = BUFFER_UNUSED;
+ }
+
+ for (i = 0; i < STV680_NUMSBUF; i++) {
+ urb = usb_alloc_urb (0, GFP_KERNEL);
+ if (!urb)
+ return -ENOMEM;
+
+ /* sbuf is urb->transfer_buffer, later gets memcpyed to scratch */
+ usb_fill_bulk_urb (urb, stv680->udev,
+ usb_rcvbulkpipe (stv680->udev, stv680->bulk_in_endpointAddr),
+ stv680->sbuf[i].data, stv680->rawbufsize,
+ stv680_video_irq, stv680);
+ stv680->urb[i] = urb;
+ err = usb_submit_urb (stv680->urb[i], GFP_KERNEL);
+ if (err)
+ PDEBUG (0, "STV(e): urb burned down in start stream");
+ } /* i STV680_NUMSBUF */
+
+ stv680->framecount = 0;
+ return 0;
+}
+
+static int stv680_stop_stream (struct usb_stv *stv680)
+{
+ int i;
+
+ if (!stv680->streaming || !stv680->udev)
+ return 1;
+
+ stv680->streaming = 0;
+
+ for (i = 0; i < STV680_NUMSBUF; i++)
+ if (stv680->urb[i]) {
+ usb_kill_urb (stv680->urb[i]);
+ usb_free_urb (stv680->urb[i]);
+ stv680->urb[i] = NULL;
+ kfree (stv680->sbuf[i].data);
+ }
+ for (i = 0; i < STV680_NUMSCRATCH; i++) {
+ kfree (stv680->scratch[i].data);
+ stv680->scratch[i].data = NULL;
+ }
+
+ return 0;
+}
+
+static int stv680_set_size (struct usb_stv *stv680, int width, int height)
+{
+ int wasstreaming = stv680->streaming;
+
+ /* Check to see if we need to change */
+ if ((stv680->vwidth == width) && (stv680->vheight == height))
+ return 0;
+
+ PDEBUG (1, "STV(i): size request for %i x %i", width, height);
+ /* Check for a valid mode */
+ if ((!width || !height) || ((width & 1) || (height & 1))) {
+ PDEBUG (1, "STV(e): set_size error: request: v.width = %i, v.height = %i actual: stv.width = %i, stv.height = %i", width, height, stv680->vwidth, stv680->vheight);
+ return 1;
+ }
+
+ if ((width < (stv680->maxwidth / 2)) || (height < (stv680->maxheight / 2))) {
+ width = stv680->maxwidth / 2;
+ height = stv680->maxheight / 2;
+ } else if ((width >= 158) && (width <= 166) && (stv680->QVGA == 1)) {
+ width = 160;
+ height = 120;
+ } else if ((width >= 172) && (width <= 180) && (stv680->CIF == 1)) {
+ width = 176;
+ height = 144;
+ } else if ((width >= 318) && (width <= 350) && (stv680->QVGA == 1)) {
+ width = 320;
+ height = 240;
+ } else if ((width >= 350) && (width <= 358) && (stv680->CIF == 1)) {
+ width = 352;
+ height = 288;
+ } else {
+ PDEBUG (1, "STV(e): request for non-supported size: request: v.width = %i, v.height = %i actual: stv.width = %i, stv.height = %i", width, height, stv680->vwidth, stv680->vheight);
+ return 1;
+ }
+
+ /* Stop a current stream and start it again at the new size */
+ if (wasstreaming)
+ stv680_stop_stream (stv680);
+ stv680->vwidth = width;
+ stv680->vheight = height;
+ PDEBUG (1, "STV(i): size set to %i x %i", stv680->vwidth, stv680->vheight);
+ if (wasstreaming)
+ stv680_start_stream (stv680);
+
+ return 0;
+}
+
+/**********************************************************************
+ * Video Decoding
+ **********************************************************************/
+
+/******* routines from the pencam program; hey, they work! ********/
+
+/*
+ * STV0680 Vision Camera Chipset Driver
+ * Copyright (C) 2000 Adam Harrison <adam@antispin.org>
+*/
+
+#define RED 0
+#define GREEN 1
+#define BLUE 2
+#define AD(x, y, w) (((y)*(w)+(x))*3)
+
+static void bayer_unshuffle (struct usb_stv *stv680, struct stv680_scratch *buffer)
+{
+ int x, y, i;
+ int w = stv680->cwidth;
+ int vw = stv680->cwidth, vh = stv680->cheight;
+ unsigned int p = 0;
+ int colour = 0, bayer = 0;
+ unsigned char *raw = buffer->data;
+ struct stv680_frame *frame = &stv680->frame[stv680->curframe];
+ unsigned char *output = frame->data;
+ unsigned char *temp = frame->data;
+ int offset = buffer->offset;
+
+ if (frame->curpix == 0) {
+ if (frame->grabstate == FRAME_READY) {
+ frame->grabstate = FRAME_GRABBING;
+ }
+ }
+ if (offset != frame->curpix) { /* Regard frame as lost :( */
+ frame->curpix = 0;
+ stv680->error++;
+ return;
+ }
+
+ if ((stv680->vwidth == 320) || (stv680->vwidth == 160)) {
+ vw = 320;
+ vh = 240;
+ }
+ if ((stv680->vwidth == 352) || (stv680->vwidth == 176)) {
+ vw = 352;
+ vh = 288;
+ }
+
+ memset (output, 0, 3 * vw * vh); /* clear output matrix. */
+
+ for (y = 0; y < vh; y++) {
+ for (x = 0; x < vw; x++) {
+ if (x & 1)
+ p = *(raw + y * w + (x >> 1));
+ else
+ p = *(raw + y * w + (x >> 1) + (w >> 1));
+
+ if (y & 1)
+ bayer = 2;
+ else
+ bayer = 0;
+ if (x & 1)
+ bayer++;
+
+ switch (bayer) {
+ case 0:
+ case 3:
+ colour = 1;
+ break;
+ case 1:
+ colour = 0;
+ break;
+ case 2:
+ colour = 2;
+ break;
+ }
+ i = (y * vw + x) * 3;
+ *(output + i + colour) = (unsigned char) p;
+ } /* for x */
+
+ } /* for y */
+
+ /****** gamma correction plus hardcoded white balance */
+ /* Thanks to Alexander Schwartx <alexander.schwartx@gmx.net> for this code.
+ Correction values red[], green[], blue[], are generated by
+ (pow(i/256.0, GAMMA)*255.0)*white balanceRGB where GAMMA=0.55, 1<i<255.
+ White balance (RGB)= 1.0, 1.17, 1.48. Values are calculated as double float and
+ converted to unsigned char. Values are in stv680.h */
+
+ for (y = 0; y < vh; y++) {
+ for (x = 0; x < vw; x++) {
+ i = (y * vw + x) * 3;
+ *(output + i) = red[*(output + i)];
+ *(output + i + 1) = green[*(output + i + 1)];
+ *(output + i + 2) = blue[*(output + i + 2)];
+ }
+ }
+
+ /****** bayer demosaic ******/
+ for (y = 1; y < (vh - 1); y++) {
+ for (x = 1; x < (vw - 1); x++) { /* work out pixel type */
+ if (y & 1)
+ bayer = 0;
+ else
+ bayer = 2;
+ if (!(x & 1))
+ bayer++;
+
+ switch (bayer) {
+ case 0: /* green. blue lr, red tb */
+ *(output + AD (x, y, vw) + BLUE) = ((int) *(output + AD (x - 1, y, vw) + BLUE) + (int) *(output + AD (x + 1, y, vw) + BLUE)) >> 1;
+ *(output + AD (x, y, vw) + RED) = ((int) *(output + AD (x, y - 1, vw) + RED) + (int) *(output + AD (x, y + 1, vw) + RED)) >> 1;
+ break;
+
+ case 1: /* blue. green lrtb, red diagonals */
+ *(output + AD (x, y, vw) + GREEN) = ((int) *(output + AD (x - 1, y, vw) + GREEN) + (int) *(output + AD (x + 1, y, vw) + GREEN) + (int) *(output + AD (x, y - 1, vw) + GREEN) + (int) *(output + AD (x, y + 1, vw) + GREEN)) >> 2;
+ *(output + AD (x, y, vw) + RED) = ((int) *(output + AD (x - 1, y - 1, vw) + RED) + (int) *(output + AD (x - 1, y + 1, vw) + RED) + (int) *(output + AD (x + 1, y - 1, vw) + RED) + (int) *(output + AD (x + 1, y + 1, vw) + RED)) >> 2;
+ break;
+
+ case 2: /* red. green lrtb, blue diagonals */
+ *(output + AD (x, y, vw) + GREEN) = ((int) *(output + AD (x - 1, y, vw) + GREEN) + (int) *(output + AD (x + 1, y, vw) + GREEN) + (int) *(output + AD (x, y - 1, vw) + GREEN) + (int) *(output + AD (x, y + 1, vw) + GREEN)) >> 2;
+ *(output + AD (x, y, vw) + BLUE) = ((int) *(output + AD (x - 1, y - 1, vw) + BLUE) + (int) *(output + AD (x + 1, y - 1, vw) + BLUE) + (int) *(output + AD (x - 1, y + 1, vw) + BLUE) + (int) *(output + AD (x + 1, y + 1, vw) + BLUE)) >> 2;
+ break;
+
+ case 3: /* green. red lr, blue tb */
+ *(output + AD (x, y, vw) + RED) = ((int) *(output + AD (x - 1, y, vw) + RED) + (int) *(output + AD (x + 1, y, vw) + RED)) >> 1;
+ *(output + AD (x, y, vw) + BLUE) = ((int) *(output + AD (x, y - 1, vw) + BLUE) + (int) *(output + AD (x, y + 1, vw) + BLUE)) >> 1;
+ break;
+ } /* switch */
+ } /* for x */
+ } /* for y - end demosaic */
+
+ /* fix top and bottom row, left and right side */
+ i = vw * 3;
+ memcpy (output, (output + i), i);
+ memcpy ((output + (vh * i)), (output + ((vh - 1) * i)), i);
+ for (y = 0; y < vh; y++) {
+ i = y * vw * 3;
+ memcpy ((output + i), (output + i + 3), 3);
+ memcpy ((output + i + (vw * 3)), (output + i + (vw - 1) * 3), 3);
+ }
+
+ /* process all raw data, then trim to size if necessary */
+ if ((stv680->vwidth == 160) || (stv680->vwidth == 176)) {
+ i = 0;
+ for (y = 0; y < vh; y++) {
+ if (!(y & 1)) {
+ for (x = 0; x < vw; x++) {
+ p = (y * vw + x) * 3;
+ if (!(x & 1)) {
+ *(output + i) = *(output + p);
+ *(output + i + 1) = *(output + p + 1);
+ *(output + i + 2) = *(output + p + 2);
+ i += 3;
+ }
+ } /* for x */
+ }
+ } /* for y */
+ }
+ /* reset to proper width */
+ if ((stv680->vwidth == 160)) {
+ vw = 160;
+ vh = 120;
+ }
+ if ((stv680->vwidth == 176)) {
+ vw = 176;
+ vh = 144;
+ }
+
+ /* output is RGB; some programs want BGR */
+ /* swapRGB_on=0 -> program decides; swapRGB_on=1, always swap */
+ /* swapRGB_on=-1, never swap */
+ if (((swapRGB == 1) && (swapRGB_on != -1)) || (swapRGB_on == 1)) {
+ for (y = 0; y < vh; y++) {
+ for (x = 0; x < vw; x++) {
+ i = (y * vw + x) * 3;
+ *(temp) = *(output + i);
+ *(output + i) = *(output + i + 2);
+ *(output + i + 2) = *(temp);
+ }
+ }
+ }
+ /* brightness */
+ if (stv680->chgbright == 1) {
+ if (stv680->brightness >= 32767) {
+ p = (stv680->brightness - 32767) / 256;
+ for (x = 0; x < (vw * vh * 3); x++) {
+ if ((*(output + x) + (unsigned char) p) > 255)
+ *(output + x) = 255;
+ else
+ *(output + x) += (unsigned char) p;
+ } /* for */
+ } else {
+ p = (32767 - stv680->brightness) / 256;
+ for (x = 0; x < (vw * vh * 3); x++) {
+ if ((unsigned char) p > *(output + x))
+ *(output + x) = 0;
+ else
+ *(output + x) -= (unsigned char) p;
+ } /* for */
+ } /* else */
+ }
+ /* if */
+ frame->curpix = 0;
+ frame->curlinepix = 0;
+ frame->grabstate = FRAME_DONE;
+ stv680->framecount++;
+ stv680->readcount++;
+ if (stv680->frame[(stv680->curframe + 1) & (STV680_NUMFRAMES - 1)].grabstate == FRAME_READY) {
+ stv680->curframe = (stv680->curframe + 1) & (STV680_NUMFRAMES - 1);
+ }
+
+} /* bayer_unshuffle */
+
+/******* end routines from the pencam program *********/
+
+static int stv680_newframe (struct usb_stv *stv680, int framenr)
+{
+ int errors = 0;
+
+ while (stv680->streaming && (stv680->frame[framenr].grabstate == FRAME_READY || stv680->frame[framenr].grabstate == FRAME_GRABBING)) {
+ if (!stv680->frame[framenr].curpix) {
+ errors++;
+ }
+ wait_event_interruptible (stv680->wq, (stv680->scratch[stv680->scratch_use].state == BUFFER_READY));
+
+ if (stv680->nullpackets > STV680_MAX_NULLPACKETS) {
+ stv680->nullpackets = 0;
+ PDEBUG (2, "STV(i): too many null length packets, restarting capture");
+ stv680_stop_stream (stv680);
+ stv680_start_stream (stv680);
+ } else {
+ if (stv680->scratch[stv680->scratch_use].state != BUFFER_READY) {
+ stv680->frame[framenr].grabstate = FRAME_ERROR;
+ PDEBUG (2, "STV(e): FRAME_ERROR in _newframe");
+ return -EIO;
+ }
+ stv680->scratch[stv680->scratch_use].state = BUFFER_BUSY;
+
+ bayer_unshuffle (stv680, &stv680->scratch[stv680->scratch_use]);
+
+ stv680->scratch[stv680->scratch_use].state = BUFFER_UNUSED;
+ stv680->scratch_use++;
+ if (stv680->scratch_use >= STV680_NUMSCRATCH)
+ stv680->scratch_use = 0;
+ if (errors > STV680_MAX_ERRORS) {
+ errors = 0;
+ PDEBUG (2, "STV(i): too many errors, restarting capture");
+ stv680_stop_stream (stv680);
+ stv680_start_stream (stv680);
+ }
+ } /* else */
+ } /* while */
+ return 0;
+}
+
+/*********************************************************************
+ * Video4Linux
+ *********************************************************************/
+
+static int stv_open (struct inode *inode, struct file *file)
+{
+ struct video_device *dev = video_devdata(file);
+ struct usb_stv *stv680 = video_get_drvdata(dev);
+ int err = 0;
+
+ /* we are called with the BKL held */
+ stv680->user = 1;
+ err = stv_init (stv680); /* main initialization routine for camera */
+
+ if (err >= 0) {
+ stv680->fbuf = rvmalloc (stv680->maxframesize * STV680_NUMFRAMES);
+ if (!stv680->fbuf) {
+ PDEBUG (0, "STV(e): Could not rvmalloc frame bufer");
+ err = -ENOMEM;
+ }
+ file->private_data = dev;
+ }
+ if (err)
+ stv680->user = 0;
+
+ return err;
+}
+
+static int stv_close (struct inode *inode, struct file *file)
+{
+ struct video_device *dev = file->private_data;
+ struct usb_stv *stv680 = video_get_drvdata(dev);
+ int i;
+
+ for (i = 0; i < STV680_NUMFRAMES; i++)
+ stv680->frame[i].grabstate = FRAME_UNUSED;
+ if (stv680->streaming)
+ stv680_stop_stream (stv680);
+
+ if ((i = stv_stop_video (stv680)) < 0)
+ PDEBUG (1, "STV(e): stop_video failed in stv_close");
+
+ rvfree (stv680->fbuf, stv680->maxframesize * STV680_NUMFRAMES);
+ stv680->user = 0;
+
+ if (stv680->removed) {
+ kfree (stv680);
+ stv680 = NULL;
+ PDEBUG (0, "STV(i): device unregistered");
+ }
+ file->private_data = NULL;
+ return 0;
+}
+
+static int stv680_do_ioctl (struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
+{
+ struct video_device *vdev = file->private_data;
+ struct usb_stv *stv680 = video_get_drvdata(vdev);
+
+ if (!stv680->udev)
+ return -EIO;
+
+ switch (cmd) {
+ case VIDIOCGCAP:{
+ struct video_capability *b = arg;
+
+ strcpy (b->name, stv680->camera_name);
+ b->type = VID_TYPE_CAPTURE;
+ b->channels = 1;
+ b->audios = 0;
+ b->maxwidth = stv680->maxwidth;
+ b->maxheight = stv680->maxheight;
+ b->minwidth = stv680->maxwidth / 2;
+ b->minheight = stv680->maxheight / 2;
+ return 0;
+ }
+ case VIDIOCGCHAN:{
+ struct video_channel *v = arg;
+
+ if (v->channel != 0)
+ return -EINVAL;
+ v->flags = 0;
+ v->tuners = 0;
+ v->type = VIDEO_TYPE_CAMERA;
+ strcpy (v->name, "STV Camera");
+ return 0;
+ }
+ case VIDIOCSCHAN:{
+ struct video_channel *v = arg;
+ if (v->channel != 0)
+ return -EINVAL;
+ return 0;
+ }
+ case VIDIOCGPICT:{
+ struct video_picture *p = arg;
+
+ stv680_get_pict (stv680, p);
+ return 0;
+ }
+ case VIDIOCSPICT:{
+ struct video_picture *p = arg;
+
+ if (stv680_set_pict (stv680, p))
+ return -EINVAL;
+ return 0;
+ }
+ case VIDIOCSWIN:{
+ struct video_window *vw = arg;
+
+ if (vw->flags)
+ return -EINVAL;
+ if (vw->clipcount)
+ return -EINVAL;
+ if (vw->width != stv680->vwidth) {
+ if (stv680_set_size (stv680, vw->width, vw->height)) {
+ PDEBUG (2, "STV(e): failed (from user) set size in VIDIOCSWIN");
+ return -EINVAL;
+ }
+ }
+ return 0;
+ }
+ case VIDIOCGWIN:{
+ struct video_window *vw = arg;
+
+ vw->x = 0; /* FIXME */
+ vw->y = 0;
+ vw->chromakey = 0;
+ vw->flags = 0;
+ vw->clipcount = 0;
+ vw->width = stv680->vwidth;
+ vw->height = stv680->vheight;
+ return 0;
+ }
+ case VIDIOCGMBUF:{
+ struct video_mbuf *vm = arg;
+ int i;
+
+ memset (vm, 0, sizeof (*vm));
+ vm->size = STV680_NUMFRAMES * stv680->maxframesize;
+ vm->frames = STV680_NUMFRAMES;
+ for (i = 0; i < STV680_NUMFRAMES; i++)
+ vm->offsets[i] = stv680->maxframesize * i;
+ return 0;
+ }
+ case VIDIOCMCAPTURE:{
+ struct video_mmap *vm = arg;
+
+ if (vm->format != STV_VIDEO_PALETTE) {
+ PDEBUG (2, "STV(i): VIDIOCMCAPTURE vm.format (%i) != VIDEO_PALETTE (%i)",
+ vm->format, STV_VIDEO_PALETTE);
+ if ((vm->format == 3) && (swapRGB_on == 0)) {
+ PDEBUG (2, "STV(i): VIDIOCMCAPTURE swapRGB is (auto) ON");
+ /* this may fix those apps (e.g., xawtv) that want BGR */
+ swapRGB = 1;
+ }
+ return -EINVAL;
+ }
+ if (vm->frame >= STV680_NUMFRAMES) {
+ PDEBUG (2, "STV(e): VIDIOCMCAPTURE vm.frame > NUMFRAMES");
+ return -EINVAL;
+ }
+ if ((stv680->frame[vm->frame].grabstate == FRAME_ERROR)
+ || (stv680->frame[vm->frame].grabstate == FRAME_GRABBING)) {
+ PDEBUG (2, "STV(e): VIDIOCMCAPTURE grabstate (%i) error",
+ stv680->frame[vm->frame].grabstate);
+ return -EBUSY;
+ }
+ /* Is this according to the v4l spec??? */
+ if (stv680->vwidth != vm->width) {
+ if (stv680_set_size (stv680, vm->width, vm->height)) {
+ PDEBUG (2, "STV(e): VIDIOCMCAPTURE set_size failed");
+ return -EINVAL;
+ }
+ }
+ stv680->frame[vm->frame].grabstate = FRAME_READY;
+
+ if (!stv680->streaming)
+ stv680_start_stream (stv680);
+
+ return 0;
+ }
+ case VIDIOCSYNC:{
+ int *frame = arg;
+ int ret = 0;
+
+ if (*frame < 0 || *frame >= STV680_NUMFRAMES) {
+ PDEBUG (2, "STV(e): Bad frame # in VIDIOCSYNC");
+ return -EINVAL;
+ }
+ ret = stv680_newframe (stv680, *frame);
+ stv680->frame[*frame].grabstate = FRAME_UNUSED;
+ return ret;
+ }
+ case VIDIOCGFBUF:{
+ struct video_buffer *vb = arg;
+
+ memset (vb, 0, sizeof (*vb));
+ return 0;
+ }
+ case VIDIOCKEY:
+ return 0;
+ case VIDIOCCAPTURE:
+ {
+ PDEBUG (2, "STV(e): VIDIOCCAPTURE failed");
+ return -EINVAL;
+ }
+ case VIDIOCSFBUF:
+ case VIDIOCGTUNER:
+ case VIDIOCSTUNER:
+ case VIDIOCGFREQ:
+ case VIDIOCSFREQ:
+ case VIDIOCGAUDIO:
+ case VIDIOCSAUDIO:
+ return -EINVAL;
+ default:
+ return -ENOIOCTLCMD;
+ } /* end switch */
+
+ return 0;
+}
+
+static int stv680_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, stv680_do_ioctl);
+}
+
+static int stv680_mmap (struct file *file, struct vm_area_struct *vma)
+{
+ struct video_device *dev = file->private_data;
+ struct usb_stv *stv680 = video_get_drvdata(dev);
+ unsigned long start = vma->vm_start;
+ unsigned long size = vma->vm_end-vma->vm_start;
+ unsigned long page, pos;
+
+ down (&stv680->lock);
+
+ if (stv680->udev == NULL) {
+ up (&stv680->lock);
+ return -EIO;
+ }
+ if (size > (((STV680_NUMFRAMES * stv680->maxframesize) + PAGE_SIZE - 1)
+ & ~(PAGE_SIZE - 1))) {
+ up (&stv680->lock);
+ return -EINVAL;
+ }
+ pos = (unsigned long) stv680->fbuf;
+ while (size > 0) {
+ page = vmalloc_to_pfn((void *)pos);
+ if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {
+ up (&stv680->lock);
+ return -EAGAIN;
+ }
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+ if (size > PAGE_SIZE)
+ size -= PAGE_SIZE;
+ else
+ size = 0;
+ }
+ up (&stv680->lock);
+
+ return 0;
+}
+
+static ssize_t stv680_read (struct file *file, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ struct video_device *dev = file->private_data;
+ unsigned long int realcount = count;
+ int ret = 0;
+ struct usb_stv *stv680 = video_get_drvdata(dev);
+ unsigned long int i;
+
+ if (STV680_NUMFRAMES != 2) {
+ PDEBUG (0, "STV(e): STV680_NUMFRAMES needs to be 2!");
+ return -1;
+ }
+ if (stv680->udev == NULL)
+ return -EIO;
+ if (realcount > (stv680->vwidth * stv680->vheight * 3))
+ realcount = stv680->vwidth * stv680->vheight * 3;
+
+ /* Shouldn't happen: */
+ if (stv680->frame[0].grabstate == FRAME_GRABBING) {
+ PDEBUG (2, "STV(e): FRAME_GRABBING in stv680_read");
+ return -EBUSY;
+ }
+ stv680->frame[0].grabstate = FRAME_READY;
+ stv680->frame[1].grabstate = FRAME_UNUSED;
+ stv680->curframe = 0;
+
+ if (!stv680->streaming)
+ stv680_start_stream (stv680);
+
+ if (!stv680->streaming) {
+ ret = stv680_newframe (stv680, 0); /* ret should = 0 */
+ }
+
+ ret = stv680_newframe (stv680, 0);
+
+ if (!ret) {
+ if ((i = copy_to_user (buf, stv680->frame[0].data, realcount)) != 0) {
+ PDEBUG (2, "STV(e): copy_to_user frame 0 failed, ret count = %li", i);
+ return -EFAULT;
+ }
+ } else {
+ realcount = ret;
+ }
+ stv680->frame[0].grabstate = FRAME_UNUSED;
+ return realcount;
+} /* stv680_read */
+
+static struct file_operations stv680_fops = {
+ .owner = THIS_MODULE,
+ .open = stv_open,
+ .release = stv_close,
+ .read = stv680_read,
+ .mmap = stv680_mmap,
+ .ioctl = stv680_ioctl,
+ .llseek = no_llseek,
+};
+static struct video_device stv680_template = {
+ .owner = THIS_MODULE,
+ .name = "STV0680 USB camera",
+ .type = VID_TYPE_CAPTURE,
+ .hardware = VID_HARDWARE_SE401,
+ .fops = &stv680_fops,
+ .release = video_device_release,
+ .minor = -1,
+};
+
+static int stv680_probe (struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct usb_host_interface *interface;
+ struct usb_stv *stv680 = NULL;
+ char *camera_name = NULL;
+ int retval = 0;
+
+ /* We don't handle multi-config cameras */
+ if (dev->descriptor.bNumConfigurations != 1) {
+ PDEBUG (0, "STV(e): Number of Configurations != 1");
+ return -ENODEV;
+ }
+
+ interface = &intf->altsetting[0];
+ /* Is it a STV680? */
+ if ((le16_to_cpu(dev->descriptor.idVendor) == USB_PENCAM_VENDOR_ID) &&
+ (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
+ camera_name = "STV0680";
+ PDEBUG (0, "STV(i): STV0680 camera found.");
+ } else {
+ PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 values.");
+ PDEBUG (0, "STV(e): Check that the STV0680 camera is connected to the computer.");
+ retval = -ENODEV;
+ goto error;
+ }
+ /* We found one */
+ if ((stv680 = kmalloc (sizeof (*stv680), GFP_KERNEL)) == NULL) {
+ PDEBUG (0, "STV(e): couldn't kmalloc stv680 struct.");
+ retval = -ENOMEM;
+ goto error;
+ }
+
+ memset (stv680, 0, sizeof (*stv680));
+
+ stv680->udev = dev;
+ stv680->camera_name = camera_name;
+
+ stv680->vdev = video_device_alloc();
+ if (!stv680->vdev) {
+ retval = -ENOMEM;
+ goto error;
+ }
+ memcpy(stv680->vdev, &stv680_template, sizeof(stv680_template));
+ stv680->vdev->dev = &intf->dev;
+ video_set_drvdata(stv680->vdev, stv680);
+
+ memcpy (stv680->vdev->name, stv680->camera_name, strlen (stv680->camera_name));
+ init_waitqueue_head (&stv680->wq);
+ init_MUTEX (&stv680->lock);
+ wmb ();
+
+ if (video_register_device (stv680->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
+ PDEBUG (0, "STV(e): video_register_device failed");
+ retval = -EIO;
+ goto error_vdev;
+ }
+ PDEBUG (0, "STV(i): registered new video device: video%d", stv680->vdev->minor);
+
+ usb_set_intfdata (intf, stv680);
+ stv680_create_sysfs_files(stv680->vdev);
+ return 0;
+
+error_vdev:
+ video_device_release(stv680->vdev);
+error:
+ kfree(stv680);
+ return retval;
+}
+
+static inline void usb_stv680_remove_disconnected (struct usb_stv *stv680)
+{
+ int i;
+
+ stv680->udev = NULL;
+ stv680->frame[0].grabstate = FRAME_ERROR;
+ stv680->frame[1].grabstate = FRAME_ERROR;
+ stv680->streaming = 0;
+
+ wake_up_interruptible (&stv680->wq);
+
+ for (i = 0; i < STV680_NUMSBUF; i++)
+ if (stv680->urb[i]) {
+ usb_kill_urb (stv680->urb[i]);
+ usb_free_urb (stv680->urb[i]);
+ stv680->urb[i] = NULL;
+ kfree (stv680->sbuf[i].data);
+ }
+ for (i = 0; i < STV680_NUMSCRATCH; i++)
+ kfree (stv680->scratch[i].data);
+ PDEBUG (0, "STV(i): %s disconnected", stv680->camera_name);
+
+ /* Free the memory */
+ kfree (stv680);
+}
+
+static void stv680_disconnect (struct usb_interface *intf)
+{
+ struct usb_stv *stv680 = usb_get_intfdata (intf);
+
+ usb_set_intfdata (intf, NULL);
+
+ if (stv680) {
+ /* We don't want people trying to open up the device */
+ if (stv680->vdev) {
+ stv680_remove_sysfs_files(stv680->vdev);
+ video_unregister_device(stv680->vdev);
+ stv680->vdev = NULL;
+ }
+ if (!stv680->user) {
+ usb_stv680_remove_disconnected (stv680);
+ } else {
+ stv680->removed = 1;
+ }
+ }
+}
+
+static struct usb_driver stv680_driver = {
+ .owner = THIS_MODULE,
+ .name = "stv680",
+ .probe = stv680_probe,
+ .disconnect = stv680_disconnect,
+ .id_table = device_table
+};
+
+/********************************************************************
+ * Module routines
+ ********************************************************************/
+
+static int __init usb_stv680_init (void)
+{
+ if (usb_register (&stv680_driver) < 0) {
+ PDEBUG (0, "STV(e): Could not setup STV0680 driver");
+ return -1;
+ }
+ PDEBUG (0, "STV(i): usb camera driver version %s registering", DRIVER_VERSION);
+
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+}
+
+static void __exit usb_stv680_exit (void)
+{
+ usb_deregister (&stv680_driver);
+ PDEBUG (0, "STV(i): driver deregistered");
+}
+
+module_init (usb_stv680_init);
+module_exit (usb_stv680_exit);
diff --git a/drivers/usb/media/stv680.h b/drivers/usb/media/stv680.h
new file mode 100644
index 000000000000..7e0e314dcf12
--- /dev/null
+++ b/drivers/usb/media/stv680.h
@@ -0,0 +1,222 @@
+/****************************************************************************
+ *
+ * Filename: stv680.h
+ *
+ * Description:
+ * This is a USB driver for STV0680 based usb video cameras.
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/* size of usb transfers */
+#define STV680_PACKETSIZE 4096
+
+/* number of queued bulk transfers to use, may have problems if > 1 */
+#define STV680_NUMSBUF 1
+
+/* number of frames supported by the v4l part */
+#define STV680_NUMFRAMES 2
+
+/* scratch buffers for passing data to the decoders: 2 or 4 are good */
+#define STV680_NUMSCRATCH 2
+
+/* number of nul sized packets to receive before kicking the camera */
+#define STV680_MAX_NULLPACKETS 200
+
+/* number of decoding errors before kicking the camera */
+#define STV680_MAX_ERRORS 100
+
+#define USB_PENCAM_VENDOR_ID 0x0553
+#define USB_PENCAM_PRODUCT_ID 0x0202
+#define PENCAM_TIMEOUT 1000
+/* fmt 4 */
+#define STV_VIDEO_PALETTE VIDEO_PALETTE_RGB24
+
+static struct usb_device_id device_table[] = {
+ {USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
+ {}
+};
+MODULE_DEVICE_TABLE (usb, device_table);
+
+struct stv680_sbuf {
+ unsigned char *data;
+};
+
+enum {
+ FRAME_UNUSED, /* Unused (no MCAPTURE) */
+ FRAME_READY, /* Ready to start grabbing */
+ FRAME_GRABBING, /* In the process of being grabbed into */
+ FRAME_DONE, /* Finished grabbing, but not been synced yet */
+ FRAME_ERROR, /* Something bad happened while processing */
+};
+
+enum {
+ BUFFER_UNUSED,
+ BUFFER_READY,
+ BUFFER_BUSY,
+ BUFFER_DONE,
+};
+
+/* raw camera data <- sbuf (urb transfer buf) */
+struct stv680_scratch {
+ unsigned char *data;
+ volatile int state;
+ int offset;
+ int length;
+};
+
+/* processed data for display ends up here, after bayer */
+struct stv680_frame {
+ unsigned char *data; /* Frame buffer */
+ volatile int grabstate; /* State of grabbing */
+ unsigned char *curline;
+ int curlinepix;
+ int curpix;
+};
+
+/* this is almost the video structure uvd_t, with extra parameters for stv */
+struct usb_stv {
+ struct video_device *vdev;
+
+ struct usb_device *udev;
+
+ unsigned char bulk_in_endpointAddr; /* __u8 the address of the bulk in endpoint */
+ char *camera_name;
+
+ unsigned int VideoMode; /* 0x0100 = VGA, 0x0000 = CIF, 0x0300 = QVGA */
+ int SupportedModes;
+ int CIF;
+ int VGA;
+ int QVGA;
+ int cwidth; /* camera width */
+ int cheight; /* camera height */
+ int maxwidth; /* max video width */
+ int maxheight; /* max video height */
+ int vwidth; /* current width for video window */
+ int vheight; /* current height for video window */
+ unsigned long int rawbufsize;
+ unsigned long int maxframesize; /* rawbufsize * 3 for RGB */
+
+ int origGain;
+ int origMode; /* original camera mode */
+
+ struct semaphore lock; /* to lock the structure */
+ int user; /* user count for exclusive use */
+ int removed; /* device disconnected */
+ int streaming; /* Are we streaming video? */
+ char *fbuf; /* Videodev buffer area */
+ struct urb *urb[STV680_NUMSBUF]; /* # of queued bulk transfers */
+ int curframe; /* Current receiving frame */
+ struct stv680_frame frame[STV680_NUMFRAMES]; /* # frames supported by v4l part */
+ int readcount;
+ int framecount;
+ int error;
+ int dropped;
+ int scratch_next;
+ int scratch_use;
+ int scratch_overflow;
+ struct stv680_scratch scratch[STV680_NUMSCRATCH]; /* for decoders */
+ struct stv680_sbuf sbuf[STV680_NUMSBUF];
+
+ unsigned int brightness;
+ unsigned int chgbright;
+ unsigned int whiteness;
+ unsigned int colour;
+ unsigned int contrast;
+ unsigned int hue;
+ unsigned int palette;
+ unsigned int depth; /* rgb24 in bits */
+
+ wait_queue_head_t wq; /* Processes waiting */
+
+ int nullpackets;
+};
+
+
+static unsigned char red[256] = {
+ 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 25, 30, 35, 38, 42,
+ 44, 47, 50, 53, 54, 57, 59, 61, 63, 65, 67, 69,
+ 71, 71, 73, 75, 77, 78, 80, 81, 82, 84, 85, 87,
+ 88, 89, 90, 91, 93, 94, 95, 97, 98, 98, 99, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 125, 126, 127, 128, 129, 129, 130, 131, 132, 133, 134,
+ 134, 135, 135, 136, 137, 138, 139, 140, 140, 141, 142, 143,
+ 143, 143, 144, 145, 146, 147, 147, 148, 149, 150, 150, 151,
+ 152, 152, 152, 153, 154, 154, 155, 156, 157, 157, 158, 159,
+ 159, 160, 161, 161, 161, 162, 163, 163, 164, 165, 165, 166,
+ 167, 167, 168, 168, 169, 170, 170, 170, 171, 171, 172, 173,
+ 173, 174, 174, 175, 176, 176, 177, 178, 178, 179, 179, 179,
+ 180, 180, 181, 181, 182, 183, 183, 184, 184, 185, 185, 186,
+ 187, 187, 188, 188, 188, 188, 189, 190, 190, 191, 191, 192,
+ 192, 193, 193, 194, 195, 195, 196, 196, 197, 197, 197, 197,
+ 198, 198, 199, 199, 200, 201, 201, 202, 202, 203, 203, 204,
+ 204, 205, 205, 206, 206, 206, 206, 207, 207, 208, 208, 209,
+ 209, 210, 210, 211, 211, 212, 212, 213, 213, 214, 214, 215,
+ 215, 215, 215, 216, 216, 217, 217, 218, 218, 218, 219, 219,
+ 220, 220, 221, 221
+};
+
+static unsigned char green[256] = {
+ 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 28, 34, 39, 43, 47,
+ 50, 53, 56, 59, 61, 64, 66, 68, 71, 73, 75, 77,
+ 79, 80, 82, 84, 86, 87, 89, 91, 92, 94, 95, 97,
+ 98, 100, 101, 102, 104, 105, 106, 108, 109, 110, 111, 113,
+ 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 144, 145, 146, 147, 148, 149,
+ 150, 151, 151, 152, 153, 154, 155, 156, 156, 157, 158, 159,
+ 160, 160, 161, 162, 163, 164, 164, 165, 166, 167, 167, 168,
+ 169, 170, 170, 171, 172, 172, 173, 174, 175, 175, 176, 177,
+ 177, 178, 179, 179, 180, 181, 182, 182, 183, 184, 184, 185,
+ 186, 186, 187, 187, 188, 189, 189, 190, 191, 191, 192, 193,
+ 193, 194, 194, 195, 196, 196, 197, 198, 198, 199, 199, 200,
+ 201, 201, 202, 202, 203, 204, 204, 205, 205, 206, 206, 207,
+ 208, 208, 209, 209, 210, 210, 211, 212, 212, 213, 213, 214,
+ 214, 215, 215, 216, 217, 217, 218, 218, 219, 219, 220, 220,
+ 221, 221, 222, 222, 223, 224, 224, 225, 225, 226, 226, 227,
+ 227, 228, 228, 229, 229, 230, 230, 231, 231, 232, 232, 233,
+ 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238, 239,
+ 239, 240, 240, 241, 241, 242, 242, 243, 243, 243, 244, 244,
+ 245, 245, 246, 246
+};
+
+static unsigned char blue[256] = {
+ 0, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 30, 37, 42, 47, 51,
+ 55, 58, 61, 64, 67, 70, 72, 74, 78, 80, 82, 84,
+ 86, 88, 90, 92, 94, 95, 97, 100, 101, 103, 104, 106,
+ 107, 110, 111, 112, 114, 115, 116, 118, 119, 121, 122, 124,
+ 125, 126, 127, 128, 129, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 154, 155, 156, 157, 158, 158, 159, 160, 161, 162, 163,
+ 165, 166, 166, 167, 168, 169, 170, 171, 171, 172, 173, 174,
+ 176, 176, 177, 178, 179, 180, 180, 181, 182, 183, 183, 184,
+ 185, 187, 187, 188, 189, 189, 190, 191, 192, 192, 193, 194,
+ 194, 195, 196, 196, 198, 199, 200, 200, 201, 202, 202, 203,
+ 204, 204, 205, 205, 206, 207, 207, 209, 210, 210, 211, 212,
+ 212, 213, 213, 214, 215, 215, 216, 217, 217, 218, 218, 220,
+ 221, 221, 222, 222, 223, 224, 224, 225, 225, 226, 226, 227,
+ 228, 228, 229, 229, 231, 231, 232, 233, 233, 234, 234, 235,
+ 235, 236, 236, 237, 238, 238, 239, 239, 240, 240, 242, 242,
+ 243, 243, 244, 244, 245, 246, 246, 247, 247, 248, 248, 249,
+ 249, 250, 250, 251, 251, 253, 253, 254, 254, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255
+};
diff --git a/drivers/usb/media/ultracam.c b/drivers/usb/media/ultracam.c
new file mode 100644
index 000000000000..75ff755224df
--- /dev/null
+++ b/drivers/usb/media/ultracam.c
@@ -0,0 +1,679 @@
+/*
+ * USB NB Camera driver
+ *
+ * HISTORY:
+ * 25-Dec-2002 Dmitri Removed lighting, sharpness parameters, methods.
+ */
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/module.h>
+#include <linux/init.h>
+
+#include "usbvideo.h"
+
+#define ULTRACAM_VENDOR_ID 0x0461
+#define ULTRACAM_PRODUCT_ID 0x0813
+
+#define MAX_CAMERAS 4 /* How many devices we allow to connect */
+
+/*
+ * This structure lives in uvd_t->user field.
+ */
+typedef struct {
+ int initialized; /* Had we already sent init sequence? */
+ int camera_model; /* What type of IBM camera we got? */
+ int has_hdr;
+} ultracam_t;
+#define ULTRACAM_T(uvd) ((ultracam_t *)((uvd)->user_data))
+
+static struct usbvideo *cams = NULL;
+
+static int debug = 0;
+
+static int flags = 0; /* FLAGS_DISPLAY_HINTS | FLAGS_OVERLAY_STATS; */
+
+static const int min_canvasWidth = 8;
+static const int min_canvasHeight = 4;
+
+#define FRAMERATE_MIN 0
+#define FRAMERATE_MAX 6
+static int framerate = -1;
+
+/*
+ * Here we define several initialization variables. They may
+ * be used to automatically set color, hue, brightness and
+ * contrast to desired values. This is particularly useful in
+ * case of webcams (which have no controls and no on-screen
+ * output) and also when a client V4L software is used that
+ * does not have some of those controls. In any case it's
+ * good to have startup values as options.
+ *
+ * These values are all in [0..255] range. This simplifies
+ * operation. Note that actual values of V4L variables may
+ * be scaled up (as much as << 8). User can see that only
+ * on overlay output, however, or through a V4L client.
+ */
+static int init_brightness = 128;
+static int init_contrast = 192;
+static int init_color = 128;
+static int init_hue = 128;
+static int hue_correction = 128;
+
+module_param(debug, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)");
+module_param(flags, int, 0);
+MODULE_PARM_DESC(flags,
+ "Bitfield: 0=VIDIOCSYNC, "
+ "1=B/W, "
+ "2=show hints, "
+ "3=show stats, "
+ "4=test pattern, "
+ "5=separate frames, "
+ "6=clean frames");
+module_param(framerate, int, 0);
+MODULE_PARM_DESC(framerate, "Framerate setting: 0=slowest, 6=fastest (default=2)");
+
+module_param(init_brightness, int, 0);
+MODULE_PARM_DESC(init_brightness, "Brightness preconfiguration: 0-255 (default=128)");
+module_param(init_contrast, int, 0);
+MODULE_PARM_DESC(init_contrast, "Contrast preconfiguration: 0-255 (default=192)");
+module_param(init_color, int, 0);
+MODULE_PARM_DESC(init_color, "Color preconfiguration: 0-255 (default=128)");
+module_param(init_hue, int, 0);
+MODULE_PARM_DESC(init_hue, "Hue preconfiguration: 0-255 (default=128)");
+module_param(hue_correction, int, 0);
+MODULE_PARM_DESC(hue_correction, "YUV colorspace regulation: 0-255 (default=128)");
+
+/*
+ * ultracam_ProcessIsocData()
+ *
+ * Generic routine to parse the ring queue data. It employs either
+ * ultracam_find_header() or ultracam_parse_lines() to do most
+ * of work.
+ *
+ * 02-Nov-2000 First (mostly dummy) version.
+ * 06-Nov-2000 Rewrote to dump all data into frame.
+ */
+static void ultracam_ProcessIsocData(struct uvd *uvd, struct usbvideo_frame *frame)
+{
+ int n;
+
+ assert(uvd != NULL);
+ assert(frame != NULL);
+
+ /* Try to move data from queue into frame buffer */
+ n = RingQueue_GetLength(&uvd->dp);
+ if (n > 0) {
+ int m;
+ /* See how much spare we have left */
+ m = uvd->max_frame_size - frame->seqRead_Length;
+ if (n > m)
+ n = m;
+ /* Now move that much data into frame buffer */
+ RingQueue_Dequeue(
+ &uvd->dp,
+ frame->data + frame->seqRead_Length,
+ m);
+ frame->seqRead_Length += m;
+ }
+ /* See if we filled the frame */
+ if (frame->seqRead_Length >= uvd->max_frame_size) {
+ frame->frameState = FrameState_Done;
+ uvd->curframe = -1;
+ uvd->stats.frame_num++;
+ }
+}
+
+/*
+ * ultracam_veio()
+ *
+ * History:
+ * 1/27/00 Added check for dev == NULL; this happens if camera is unplugged.
+ */
+static int ultracam_veio(
+ struct uvd *uvd,
+ unsigned char req,
+ unsigned short value,
+ unsigned short index,
+ int is_out)
+{
+ static const char proc[] = "ultracam_veio";
+ unsigned char cp[8] /* = { 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef } */;
+ int i;
+
+ if (!CAMERA_IS_OPERATIONAL(uvd))
+ return 0;
+
+ if (!is_out) {
+ i = usb_control_msg(
+ uvd->dev,
+ usb_rcvctrlpipe(uvd->dev, 0),
+ req,
+ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ value,
+ index,
+ cp,
+ sizeof(cp),
+ 1000);
+#if 1
+ info("USB => %02x%02x%02x%02x%02x%02x%02x%02x "
+ "(req=$%02x val=$%04x ind=$%04x)",
+ cp[0],cp[1],cp[2],cp[3],cp[4],cp[5],cp[6],cp[7],
+ req, value, index);
+#endif
+ } else {
+ i = usb_control_msg(
+ uvd->dev,
+ usb_sndctrlpipe(uvd->dev, 0),
+ req,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ value,
+ index,
+ NULL,
+ 0,
+ 1000);
+ }
+ if (i < 0) {
+ err("%s: ERROR=%d. Camera stopped; Reconnect or reload driver.",
+ proc, i);
+ uvd->last_error = i;
+ }
+ return i;
+}
+
+/*
+ * ultracam_calculate_fps()
+ */
+static int ultracam_calculate_fps(struct uvd *uvd)
+{
+ return 3 + framerate*4 + framerate/2;
+}
+
+/*
+ * ultracam_adjust_contrast()
+ */
+static void ultracam_adjust_contrast(struct uvd *uvd)
+{
+}
+
+/*
+ * ultracam_set_brightness()
+ *
+ * This procedure changes brightness of the picture.
+ */
+static void ultracam_set_brightness(struct uvd *uvd)
+{
+}
+
+static void ultracam_set_hue(struct uvd *uvd)
+{
+}
+
+/*
+ * ultracam_adjust_picture()
+ *
+ * This procedure gets called from V4L interface to update picture settings.
+ * Here we change brightness and contrast.
+ */
+static void ultracam_adjust_picture(struct uvd *uvd)
+{
+ ultracam_adjust_contrast(uvd);
+ ultracam_set_brightness(uvd);
+ ultracam_set_hue(uvd);
+}
+
+/*
+ * ultracam_video_stop()
+ *
+ * This code tells camera to stop streaming. The interface remains
+ * configured and bandwidth - claimed.
+ */
+static void ultracam_video_stop(struct uvd *uvd)
+{
+}
+
+/*
+ * ultracam_reinit_iso()
+ *
+ * This procedure sends couple of commands to the camera and then
+ * resets the video pipe. This sequence was observed to reinit the
+ * camera or, at least, to initiate ISO data stream.
+ */
+static void ultracam_reinit_iso(struct uvd *uvd, int do_stop)
+{
+}
+
+static void ultracam_video_start(struct uvd *uvd)
+{
+ ultracam_reinit_iso(uvd, 0);
+}
+
+static int ultracam_resetPipe(struct uvd *uvd)
+{
+ usb_clear_halt(uvd->dev, uvd->video_endp);
+ return 0;
+}
+
+static int ultracam_alternateSetting(struct uvd *uvd, int setting)
+{
+ static const char proc[] = "ultracam_alternateSetting";
+ int i;
+ i = usb_set_interface(uvd->dev, uvd->iface, setting);
+ if (i < 0) {
+ err("%s: usb_set_interface error", proc);
+ uvd->last_error = i;
+ return -EBUSY;
+ }
+ return 0;
+}
+
+/*
+ * Return negative code on failure, 0 on success.
+ */
+static int ultracam_setup_on_open(struct uvd *uvd)
+{
+ int setup_ok = 0; /* Success by default */
+ /* Send init sequence only once, it's large! */
+ if (!ULTRACAM_T(uvd)->initialized) {
+ ultracam_alternateSetting(uvd, 0x04);
+ ultracam_alternateSetting(uvd, 0x00);
+ ultracam_veio(uvd, 0x02, 0x0004, 0x000b, 1);
+ ultracam_veio(uvd, 0x02, 0x0001, 0x0005, 1);
+ ultracam_veio(uvd, 0x02, 0x8000, 0x0000, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x0000, 1);
+ ultracam_veio(uvd, 0x00, 0x00b0, 0x0001, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x0002, 1);
+ ultracam_veio(uvd, 0x00, 0x000c, 0x0003, 1);
+ ultracam_veio(uvd, 0x00, 0x000b, 0x0004, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x0005, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x0006, 1);
+ ultracam_veio(uvd, 0x00, 0x0079, 0x0007, 1);
+ ultracam_veio(uvd, 0x00, 0x003b, 0x0008, 1);
+ ultracam_veio(uvd, 0x00, 0x0002, 0x000f, 1);
+ ultracam_veio(uvd, 0x00, 0x0001, 0x0010, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x0011, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00bf, 1);
+ ultracam_veio(uvd, 0x00, 0x0001, 0x00c0, 1);
+ ultracam_veio(uvd, 0x00, 0x0010, 0x00cb, 1);
+ ultracam_veio(uvd, 0x01, 0x00a4, 0x0001, 1);
+ ultracam_veio(uvd, 0x01, 0x0010, 0x0002, 1);
+ ultracam_veio(uvd, 0x01, 0x0066, 0x0007, 1);
+ ultracam_veio(uvd, 0x01, 0x000b, 0x0008, 1);
+ ultracam_veio(uvd, 0x01, 0x0034, 0x0009, 1);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x000a, 1);
+ ultracam_veio(uvd, 0x01, 0x002e, 0x000b, 1);
+ ultracam_veio(uvd, 0x01, 0x00d6, 0x000c, 1);
+ ultracam_veio(uvd, 0x01, 0x00fc, 0x000d, 1);
+ ultracam_veio(uvd, 0x01, 0x00f1, 0x000e, 1);
+ ultracam_veio(uvd, 0x01, 0x00da, 0x000f, 1);
+ ultracam_veio(uvd, 0x01, 0x0036, 0x0010, 1);
+ ultracam_veio(uvd, 0x01, 0x000b, 0x0011, 1);
+ ultracam_veio(uvd, 0x01, 0x0001, 0x0012, 1);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x0013, 1);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x0014, 1);
+ ultracam_veio(uvd, 0x01, 0x0087, 0x0051, 1);
+ ultracam_veio(uvd, 0x01, 0x0040, 0x0052, 1);
+ ultracam_veio(uvd, 0x01, 0x0058, 0x0053, 1);
+ ultracam_veio(uvd, 0x01, 0x0040, 0x0054, 1);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x0040, 1);
+ ultracam_veio(uvd, 0x01, 0x0010, 0x0041, 1);
+ ultracam_veio(uvd, 0x01, 0x0020, 0x0042, 1);
+ ultracam_veio(uvd, 0x01, 0x0030, 0x0043, 1);
+ ultracam_veio(uvd, 0x01, 0x0040, 0x0044, 1);
+ ultracam_veio(uvd, 0x01, 0x0050, 0x0045, 1);
+ ultracam_veio(uvd, 0x01, 0x0060, 0x0046, 1);
+ ultracam_veio(uvd, 0x01, 0x0070, 0x0047, 1);
+ ultracam_veio(uvd, 0x01, 0x0080, 0x0048, 1);
+ ultracam_veio(uvd, 0x01, 0x0090, 0x0049, 1);
+ ultracam_veio(uvd, 0x01, 0x00a0, 0x004a, 1);
+ ultracam_veio(uvd, 0x01, 0x00b0, 0x004b, 1);
+ ultracam_veio(uvd, 0x01, 0x00c0, 0x004c, 1);
+ ultracam_veio(uvd, 0x01, 0x00d0, 0x004d, 1);
+ ultracam_veio(uvd, 0x01, 0x00e0, 0x004e, 1);
+ ultracam_veio(uvd, 0x01, 0x00f0, 0x004f, 1);
+ ultracam_veio(uvd, 0x01, 0x00ff, 0x0050, 1);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x0056, 1);
+ ultracam_veio(uvd, 0x00, 0x0080, 0x00c1, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c2, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00ca, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0080, 0x00c1, 1);
+ ultracam_veio(uvd, 0x00, 0x0004, 0x00c2, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00ca, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0002, 0x00c1, 1);
+ ultracam_veio(uvd, 0x00, 0x0020, 0x00c2, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00ca, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c3, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c4, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c5, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c6, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c7, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c8, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c3, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c4, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c5, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c6, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c7, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c8, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0040, 0x00c1, 1);
+ ultracam_veio(uvd, 0x00, 0x0017, 0x00c2, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00ca, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c3, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c4, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c5, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c6, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c7, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c8, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c3, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c4, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c5, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c6, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c7, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c8, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c9, 1);
+ ultracam_veio(uvd, 0x00, 0x00c0, 0x00c1, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00c2, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00ca, 1);
+ ultracam_veio(uvd, 0x02, 0xc040, 0x0001, 1);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x0008, 0);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x0009, 0);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x000a, 0);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x000b, 0);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x000c, 0);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x000d, 0);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x000e, 0);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x000f, 0);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x0010, 0);
+ ultracam_veio(uvd, 0x01, 0x000b, 0x0008, 1);
+ ultracam_veio(uvd, 0x01, 0x0034, 0x0009, 1);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x000a, 1);
+ ultracam_veio(uvd, 0x01, 0x002e, 0x000b, 1);
+ ultracam_veio(uvd, 0x01, 0x00d6, 0x000c, 1);
+ ultracam_veio(uvd, 0x01, 0x00fc, 0x000d, 1);
+ ultracam_veio(uvd, 0x01, 0x00f1, 0x000e, 1);
+ ultracam_veio(uvd, 0x01, 0x00da, 0x000f, 1);
+ ultracam_veio(uvd, 0x01, 0x0036, 0x0010, 1);
+ ultracam_veio(uvd, 0x01, 0x0000, 0x0001, 0);
+ ultracam_veio(uvd, 0x01, 0x0064, 0x0001, 1);
+ ultracam_veio(uvd, 0x01, 0x0059, 0x0051, 1);
+ ultracam_veio(uvd, 0x01, 0x003f, 0x0052, 1);
+ ultracam_veio(uvd, 0x01, 0x0094, 0x0053, 1);
+ ultracam_veio(uvd, 0x01, 0x00ff, 0x0011, 1);
+ ultracam_veio(uvd, 0x01, 0x0003, 0x0012, 1);
+ ultracam_veio(uvd, 0x01, 0x00f7, 0x0013, 1);
+ ultracam_veio(uvd, 0x00, 0x0009, 0x0011, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x0001, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x0000, 1);
+ ultracam_veio(uvd, 0x00, 0x0020, 0x00c1, 1);
+ ultracam_veio(uvd, 0x00, 0x0010, 0x00c2, 1);
+ ultracam_veio(uvd, 0x00, 0x0000, 0x00ca, 1);
+ ultracam_alternateSetting(uvd, 0x04);
+ ultracam_veio(uvd, 0x02, 0x0000, 0x0001, 1);
+ ultracam_veio(uvd, 0x02, 0x0000, 0x0001, 1);
+ ultracam_veio(uvd, 0x02, 0x0000, 0x0006, 1);
+ ultracam_veio(uvd, 0x02, 0x9000, 0x0007, 1);
+ ultracam_veio(uvd, 0x02, 0x0042, 0x0001, 1);
+ ultracam_veio(uvd, 0x02, 0x0000, 0x000b, 0);
+ ultracam_resetPipe(uvd);
+ ULTRACAM_T(uvd)->initialized = (setup_ok != 0);
+ }
+ return setup_ok;
+}
+
+static void ultracam_configure_video(struct uvd *uvd)
+{
+ if (uvd == NULL)
+ return;
+
+ RESTRICT_TO_RANGE(init_brightness, 0, 255);
+ RESTRICT_TO_RANGE(init_contrast, 0, 255);
+ RESTRICT_TO_RANGE(init_color, 0, 255);
+ RESTRICT_TO_RANGE(init_hue, 0, 255);
+ RESTRICT_TO_RANGE(hue_correction, 0, 255);
+
+ memset(&uvd->vpic, 0, sizeof(uvd->vpic));
+ memset(&uvd->vpic_old, 0x55, sizeof(uvd->vpic_old));
+
+ uvd->vpic.colour = init_color << 8;
+ uvd->vpic.hue = init_hue << 8;
+ uvd->vpic.brightness = init_brightness << 8;
+ uvd->vpic.contrast = init_contrast << 8;
+ uvd->vpic.whiteness = 105 << 8; /* This one isn't used */
+ uvd->vpic.depth = 24;
+ uvd->vpic.palette = VIDEO_PALETTE_RGB24;
+
+ memset(&uvd->vcap, 0, sizeof(uvd->vcap));
+ strcpy(uvd->vcap.name, "IBM Ultra Camera");
+ uvd->vcap.type = VID_TYPE_CAPTURE;
+ uvd->vcap.channels = 1;
+ uvd->vcap.audios = 0;
+ uvd->vcap.maxwidth = VIDEOSIZE_X(uvd->canvas);
+ uvd->vcap.maxheight = VIDEOSIZE_Y(uvd->canvas);
+ uvd->vcap.minwidth = min_canvasWidth;
+ uvd->vcap.minheight = min_canvasHeight;
+
+ memset(&uvd->vchan, 0, sizeof(uvd->vchan));
+ uvd->vchan.flags = 0;
+ uvd->vchan.tuners = 0;
+ uvd->vchan.channel = 0;
+ uvd->vchan.type = VIDEO_TYPE_CAMERA;
+ strcpy(uvd->vchan.name, "Camera");
+}
+
+/*
+ * ultracam_probe()
+ *
+ * This procedure queries device descriptor and accepts the interface
+ * if it looks like our camera.
+ *
+ * History:
+ * 12-Nov-2000 Reworked to comply with new probe() signature.
+ * 23-Jan-2001 Added compatibility with 2.2.x kernels.
+ */
+static int ultracam_probe(struct usb_interface *intf, const struct usb_device_id *devid)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct uvd *uvd = NULL;
+ int ix, i, nas;
+ int actInterface=-1, inactInterface=-1, maxPS=0;
+ unsigned char video_ep = 0;
+
+ if (debug >= 1)
+ info("ultracam_probe(%p)", intf);
+
+ /* We don't handle multi-config cameras */
+ if (dev->descriptor.bNumConfigurations != 1)
+ return -ENODEV;
+
+ info("IBM Ultra camera found (rev. 0x%04x)",
+ le16_to_cpu(dev->descriptor.bcdDevice));
+
+ /* Validate found interface: must have one ISO endpoint */
+ nas = intf->num_altsetting;
+ if (debug > 0)
+ info("Number of alternate settings=%d.", nas);
+ if (nas < 8) {
+ err("Too few alternate settings for this camera!");
+ return -ENODEV;
+ }
+ /* Validate all alternate settings */
+ for (ix=0; ix < nas; ix++) {
+ const struct usb_host_interface *interface;
+ const struct usb_endpoint_descriptor *endpoint;
+
+ interface = &intf->altsetting[ix];
+ i = interface->desc.bAlternateSetting;
+ if (interface->desc.bNumEndpoints != 1) {
+ err("Interface %d. has %u. endpoints!",
+ interface->desc.bInterfaceNumber,
+ (unsigned)(interface->desc.bNumEndpoints));
+ return -ENODEV;
+ }
+ endpoint = &interface->endpoint[0].desc;
+ if (video_ep == 0)
+ video_ep = endpoint->bEndpointAddress;
+ else if (video_ep != endpoint->bEndpointAddress) {
+ err("Alternate settings have different endpoint addresses!");
+ return -ENODEV;
+ }
+ if ((endpoint->bmAttributes & 0x03) != 0x01) {
+ err("Interface %d. has non-ISO endpoint!",
+ interface->desc.bInterfaceNumber);
+ return -ENODEV;
+ }
+ if ((endpoint->bEndpointAddress & 0x80) == 0) {
+ err("Interface %d. has ISO OUT endpoint!",
+ interface->desc.bInterfaceNumber);
+ return -ENODEV;
+ }
+ if (le16_to_cpu(endpoint->wMaxPacketSize) == 0) {
+ if (inactInterface < 0)
+ inactInterface = i;
+ else {
+ err("More than one inactive alt. setting!");
+ return -ENODEV;
+ }
+ } else {
+ if (actInterface < 0) {
+ actInterface = i;
+ maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
+ if (debug > 0)
+ info("Active setting=%d. maxPS=%d.", i, maxPS);
+ } else {
+ /* Got another active alt. setting */
+ if (maxPS < le16_to_cpu(endpoint->wMaxPacketSize)) {
+ /* This one is better! */
+ actInterface = i;
+ maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
+ if (debug > 0) {
+ info("Even better ctive setting=%d. maxPS=%d.",
+ i, maxPS);
+ }
+ }
+ }
+ }
+ }
+ if ((maxPS <= 0) || (actInterface < 0) || (inactInterface < 0)) {
+ err("Failed to recognize the camera!");
+ return -ENODEV;
+ }
+
+ uvd = usbvideo_AllocateDevice(cams);
+ if (uvd != NULL) {
+ /* Here uvd is a fully allocated uvd object */
+ uvd->flags = flags;
+ uvd->debug = debug;
+ uvd->dev = dev;
+ uvd->iface = intf->altsetting->desc.bInterfaceNumber;
+ uvd->ifaceAltInactive = inactInterface;
+ uvd->ifaceAltActive = actInterface;
+ uvd->video_endp = video_ep;
+ uvd->iso_packet_len = maxPS;
+ uvd->paletteBits = 1L << VIDEO_PALETTE_RGB24;
+ uvd->defaultPalette = VIDEO_PALETTE_RGB24;
+ uvd->canvas = VIDEOSIZE(640, 480); /* FIXME */
+ uvd->videosize = uvd->canvas; /* ultracam_size_to_videosize(size);*/
+
+ /* Initialize ibmcam-specific data */
+ assert(ULTRACAM_T(uvd) != NULL);
+ ULTRACAM_T(uvd)->camera_model = 0; /* Not used yet */
+ ULTRACAM_T(uvd)->initialized = 0;
+
+ ultracam_configure_video(uvd);
+
+ i = usbvideo_RegisterVideoDevice(uvd);
+ if (i != 0) {
+ err("usbvideo_RegisterVideoDevice() failed.");
+ uvd = NULL;
+ }
+ }
+
+ if (uvd) {
+ usb_set_intfdata (intf, uvd);
+ return 0;
+ }
+ return -EIO;
+}
+
+
+static struct usb_device_id id_table[] = {
+ { USB_DEVICE(ULTRACAM_VENDOR_ID, ULTRACAM_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+
+/*
+ * ultracam_init()
+ *
+ * This code is run to initialize the driver.
+ */
+static int __init ultracam_init(void)
+{
+ struct usbvideo_cb cbTbl;
+ memset(&cbTbl, 0, sizeof(cbTbl));
+ cbTbl.probe = ultracam_probe;
+ cbTbl.setupOnOpen = ultracam_setup_on_open;
+ cbTbl.videoStart = ultracam_video_start;
+ cbTbl.videoStop = ultracam_video_stop;
+ cbTbl.processData = ultracam_ProcessIsocData;
+ cbTbl.postProcess = usbvideo_DeinterlaceFrame;
+ cbTbl.adjustPicture = ultracam_adjust_picture;
+ cbTbl.getFPS = ultracam_calculate_fps;
+ return usbvideo_register(
+ &cams,
+ MAX_CAMERAS,
+ sizeof(ultracam_t),
+ "ultracam",
+ &cbTbl,
+ THIS_MODULE,
+ id_table);
+}
+
+static void __exit ultracam_cleanup(void)
+{
+ usbvideo_Deregister(&cams);
+}
+
+MODULE_DEVICE_TABLE(usb, id_table);
+MODULE_LICENSE("GPL");
+
+module_init(ultracam_init);
+module_exit(ultracam_cleanup);
diff --git a/drivers/usb/media/usbvideo.c b/drivers/usb/media/usbvideo.c
new file mode 100644
index 000000000000..298484aa27d2
--- /dev/null
+++ b/drivers/usb/media/usbvideo.c
@@ -0,0 +1,2192 @@
+/*
+ * 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,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/list.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/mm.h>
+#include <linux/smp_lock.h>
+#include <linux/vmalloc.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+
+#include <asm/io.h>
+
+#include "usbvideo.h"
+
+#if defined(MAP_NR)
+#define virt_to_page(v) MAP_NR(v) /* Kernels 2.2.x */
+#endif
+
+static int video_nr = -1;
+module_param(video_nr, int, 0);
+
+/*
+ * Local prototypes.
+ */
+static void usbvideo_Disconnect(struct usb_interface *intf);
+static void usbvideo_CameraRelease(struct uvd *uvd);
+
+static int usbvideo_v4l_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg);
+static int usbvideo_v4l_mmap(struct file *file, struct vm_area_struct *vma);
+static int usbvideo_v4l_open(struct inode *inode, struct file *file);
+static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf,
+ size_t count, loff_t *ppos);
+static int usbvideo_v4l_close(struct inode *inode, struct file *file);
+
+static int usbvideo_StartDataPump(struct uvd *uvd);
+static void usbvideo_StopDataPump(struct uvd *uvd);
+static int usbvideo_GetFrame(struct uvd *uvd, int frameNum);
+static int usbvideo_NewFrame(struct uvd *uvd, int framenum);
+static void usbvideo_SoftwareContrastAdjustment(struct uvd *uvd,
+ struct usbvideo_frame *frame);
+
+/*******************************/
+/* Memory management functions */
+/*******************************/
+static void *usbvideo_rvmalloc(unsigned long size)
+{
+ void *mem;
+ unsigned long adr;
+
+ size = PAGE_ALIGN(size);
+ mem = vmalloc_32(size);
+ if (!mem)
+ return NULL;
+
+ memset(mem, 0, size); /* Clear the ram out, no junk to the user */
+ adr = (unsigned long) mem;
+ while (size > 0) {
+ SetPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+
+ return mem;
+}
+
+static void usbvideo_rvfree(void *mem, unsigned long size)
+{
+ unsigned long adr;
+
+ if (!mem)
+ return;
+
+ adr = (unsigned long) mem;
+ while ((long) size > 0) {
+ ClearPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+ vfree(mem);
+}
+
+static void RingQueue_Initialize(struct RingQueue *rq)
+{
+ assert(rq != NULL);
+ init_waitqueue_head(&rq->wqh);
+}
+
+static void RingQueue_Allocate(struct RingQueue *rq, int rqLen)
+{
+ /* Make sure the requested size is a power of 2 and
+ round up if necessary. This allows index wrapping
+ using masks rather than modulo */
+
+ int i = 1;
+ assert(rq != NULL);
+ assert(rqLen > 0);
+
+ while(rqLen >> i)
+ i++;
+ if(rqLen != 1 << (i-1))
+ rqLen = 1 << i;
+
+ rq->length = rqLen;
+ rq->ri = rq->wi = 0;
+ rq->queue = usbvideo_rvmalloc(rq->length);
+ assert(rq->queue != NULL);
+}
+
+static int RingQueue_IsAllocated(const struct RingQueue *rq)
+{
+ if (rq == NULL)
+ return 0;
+ return (rq->queue != NULL) && (rq->length > 0);
+}
+
+static void RingQueue_Free(struct RingQueue *rq)
+{
+ assert(rq != NULL);
+ if (RingQueue_IsAllocated(rq)) {
+ usbvideo_rvfree(rq->queue, rq->length);
+ rq->queue = NULL;
+ rq->length = 0;
+ }
+}
+
+int RingQueue_Dequeue(struct RingQueue *rq, unsigned char *dst, int len)
+{
+ int rql, toread;
+
+ assert(rq != NULL);
+ assert(dst != NULL);
+
+ rql = RingQueue_GetLength(rq);
+ if(!rql)
+ return 0;
+
+ /* Clip requested length to available data */
+ if(len > rql)
+ len = rql;
+
+ toread = len;
+ if(rq->ri > rq->wi) {
+ /* Read data from tail */
+ int read = (toread < (rq->length - rq->ri)) ? toread : rq->length - rq->ri;
+ memcpy(dst, rq->queue + rq->ri, read);
+ toread -= read;
+ dst += read;
+ rq->ri = (rq->ri + read) & (rq->length-1);
+ }
+ if(toread) {
+ /* Read data from head */
+ memcpy(dst, rq->queue + rq->ri, toread);
+ rq->ri = (rq->ri + toread) & (rq->length-1);
+ }
+ return len;
+}
+
+EXPORT_SYMBOL(RingQueue_Dequeue);
+
+int RingQueue_Enqueue(struct RingQueue *rq, const unsigned char *cdata, int n)
+{
+ int enqueued = 0;
+
+ assert(rq != NULL);
+ assert(cdata != NULL);
+ assert(rq->length > 0);
+ while (n > 0) {
+ int m, q_avail;
+
+ /* Calculate the largest chunk that fits the tail of the ring */
+ q_avail = rq->length - rq->wi;
+ if (q_avail <= 0) {
+ rq->wi = 0;
+ q_avail = rq->length;
+ }
+ m = n;
+ assert(q_avail > 0);
+ if (m > q_avail)
+ m = q_avail;
+
+ memcpy(rq->queue + rq->wi, cdata, m);
+ RING_QUEUE_ADVANCE_INDEX(rq, wi, m);
+ cdata += m;
+ enqueued += m;
+ n -= m;
+ }
+ return enqueued;
+}
+
+EXPORT_SYMBOL(RingQueue_Enqueue);
+
+static void RingQueue_InterruptibleSleepOn(struct RingQueue *rq)
+{
+ assert(rq != NULL);
+ interruptible_sleep_on(&rq->wqh);
+}
+
+void RingQueue_WakeUpInterruptible(struct RingQueue *rq)
+{
+ assert(rq != NULL);
+ if (waitqueue_active(&rq->wqh))
+ wake_up_interruptible(&rq->wqh);
+}
+
+EXPORT_SYMBOL(RingQueue_WakeUpInterruptible);
+
+void RingQueue_Flush(struct RingQueue *rq)
+{
+ assert(rq != NULL);
+ rq->ri = 0;
+ rq->wi = 0;
+}
+
+EXPORT_SYMBOL(RingQueue_Flush);
+
+
+/*
+ * usbvideo_VideosizeToString()
+ *
+ * This procedure converts given videosize value to readable string.
+ *
+ * History:
+ * 07-Aug-2000 Created.
+ * 19-Oct-2000 Reworked for usbvideo module.
+ */
+static void usbvideo_VideosizeToString(char *buf, int bufLen, videosize_t vs)
+{
+ char tmp[40];
+ int n;
+
+ n = 1 + sprintf(tmp, "%ldx%ld", VIDEOSIZE_X(vs), VIDEOSIZE_Y(vs));
+ assert(n < sizeof(tmp));
+ if ((buf == NULL) || (bufLen < n))
+ err("usbvideo_VideosizeToString: buffer is too small.");
+ else
+ memmove(buf, tmp, n);
+}
+
+/*
+ * usbvideo_OverlayChar()
+ *
+ * History:
+ * 01-Feb-2000 Created.
+ */
+static void usbvideo_OverlayChar(struct uvd *uvd, struct usbvideo_frame *frame,
+ int x, int y, int ch)
+{
+ static const unsigned short digits[16] = {
+ 0xF6DE, /* 0 */
+ 0x2492, /* 1 */
+ 0xE7CE, /* 2 */
+ 0xE79E, /* 3 */
+ 0xB792, /* 4 */
+ 0xF39E, /* 5 */
+ 0xF3DE, /* 6 */
+ 0xF492, /* 7 */
+ 0xF7DE, /* 8 */
+ 0xF79E, /* 9 */
+ 0x77DA, /* a */
+ 0xD75C, /* b */
+ 0xF24E, /* c */
+ 0xD6DC, /* d */
+ 0xF34E, /* e */
+ 0xF348 /* f */
+ };
+ unsigned short digit;
+ int ix, iy;
+
+ if ((uvd == NULL) || (frame == NULL))
+ return;
+
+ if (ch >= '0' && ch <= '9')
+ ch -= '0';
+ else if (ch >= 'A' && ch <= 'F')
+ ch = 10 + (ch - 'A');
+ else if (ch >= 'a' && ch <= 'f')
+ ch = 10 + (ch - 'a');
+ else
+ return;
+ digit = digits[ch];
+
+ for (iy=0; iy < 5; iy++) {
+ for (ix=0; ix < 3; ix++) {
+ if (digit & 0x8000) {
+ if (uvd->paletteBits & (1L << VIDEO_PALETTE_RGB24)) {
+/* TODO */ RGB24_PUTPIXEL(frame, x+ix, y+iy, 0xFF, 0xFF, 0xFF);
+ }
+ }
+ digit = digit << 1;
+ }
+ }
+}
+
+/*
+ * usbvideo_OverlayString()
+ *
+ * History:
+ * 01-Feb-2000 Created.
+ */
+static void usbvideo_OverlayString(struct uvd *uvd, struct usbvideo_frame *frame,
+ int x, int y, const char *str)
+{
+ while (*str) {
+ usbvideo_OverlayChar(uvd, frame, x, y, *str);
+ str++;
+ x += 4; /* 3 pixels character + 1 space */
+ }
+}
+
+/*
+ * usbvideo_OverlayStats()
+ *
+ * Overlays important debugging information.
+ *
+ * History:
+ * 01-Feb-2000 Created.
+ */
+static void usbvideo_OverlayStats(struct uvd *uvd, struct usbvideo_frame *frame)
+{
+ const int y_diff = 8;
+ char tmp[16];
+ int x = 10, y=10;
+ long i, j, barLength;
+ const int qi_x1 = 60, qi_y1 = 10;
+ const int qi_x2 = VIDEOSIZE_X(frame->request) - 10, qi_h = 10;
+
+ /* Call the user callback, see if we may proceed after that */
+ if (VALID_CALLBACK(uvd, overlayHook)) {
+ if (GET_CALLBACK(uvd, overlayHook)(uvd, frame) < 0)
+ return;
+ }
+
+ /*
+ * We draw a (mostly) hollow rectangle with qi_xxx coordinates.
+ * Left edge symbolizes the queue index 0; right edge symbolizes
+ * the full capacity of the queue.
+ */
+ barLength = qi_x2 - qi_x1 - 2;
+ if ((barLength > 10) && (uvd->paletteBits & (1L << VIDEO_PALETTE_RGB24))) {
+/* TODO */ long u_lo, u_hi, q_used;
+ long m_ri, m_wi, m_lo, m_hi;
+
+ /*
+ * Determine fill zones (used areas of the queue):
+ * 0 xxxxxxx u_lo ...... uvd->dp.ri xxxxxxxx u_hi ..... uvd->dp.length
+ *
+ * if u_lo < 0 then there is no first filler.
+ */
+
+ q_used = RingQueue_GetLength(&uvd->dp);
+ if ((uvd->dp.ri + q_used) >= uvd->dp.length) {
+ u_hi = uvd->dp.length;
+ u_lo = (q_used + uvd->dp.ri) & (uvd->dp.length-1);
+ } else {
+ u_hi = (q_used + uvd->dp.ri);
+ u_lo = -1;
+ }
+
+ /* Convert byte indices into screen units */
+ m_ri = qi_x1 + ((barLength * uvd->dp.ri) / uvd->dp.length);
+ m_wi = qi_x1 + ((barLength * uvd->dp.wi) / uvd->dp.length);
+ m_lo = (u_lo > 0) ? (qi_x1 + ((barLength * u_lo) / uvd->dp.length)) : -1;
+ m_hi = qi_x1 + ((barLength * u_hi) / uvd->dp.length);
+
+ for (j=qi_y1; j < (qi_y1 + qi_h); j++) {
+ for (i=qi_x1; i < qi_x2; i++) {
+ /* Draw border lines */
+ if ((j == qi_y1) || (j == (qi_y1 + qi_h - 1)) ||
+ (i == qi_x1) || (i == (qi_x2 - 1))) {
+ RGB24_PUTPIXEL(frame, i, j, 0xFF, 0xFF, 0xFF);
+ continue;
+ }
+ /* For all other points the Y coordinate does not matter */
+ if ((i >= m_ri) && (i <= (m_ri + 3))) {
+ RGB24_PUTPIXEL(frame, i, j, 0x00, 0xFF, 0x00);
+ } else if ((i >= m_wi) && (i <= (m_wi + 3))) {
+ RGB24_PUTPIXEL(frame, i, j, 0xFF, 0x00, 0x00);
+ } else if ((i < m_lo) || ((i > m_ri) && (i < m_hi)))
+ RGB24_PUTPIXEL(frame, i, j, 0x00, 0x00, 0xFF);
+ }
+ }
+ }
+
+ sprintf(tmp, "%8lx", uvd->stats.frame_num);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8lx", uvd->stats.urb_count);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8lx", uvd->stats.urb_length);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8lx", uvd->stats.data_count);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8lx", uvd->stats.header_count);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8lx", uvd->stats.iso_skip_count);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8lx", uvd->stats.iso_err_count);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8x", uvd->vpic.colour);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8x", uvd->vpic.hue);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8x", uvd->vpic.brightness >> 8);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8x", uvd->vpic.contrast >> 12);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+
+ sprintf(tmp, "%8d", uvd->vpic.whiteness >> 8);
+ usbvideo_OverlayString(uvd, frame, x, y, tmp);
+ y += y_diff;
+}
+
+/*
+ * usbvideo_ReportStatistics()
+ *
+ * This procedure prints packet and transfer statistics.
+ *
+ * History:
+ * 14-Jan-2000 Corrected default multiplier.
+ */
+static void usbvideo_ReportStatistics(const struct uvd *uvd)
+{
+ if ((uvd != NULL) && (uvd->stats.urb_count > 0)) {
+ unsigned long allPackets, badPackets, goodPackets, percent;
+ allPackets = uvd->stats.urb_count * CAMERA_URB_FRAMES;
+ badPackets = uvd->stats.iso_skip_count + uvd->stats.iso_err_count;
+ goodPackets = allPackets - badPackets;
+ /* Calculate percentage wisely, remember integer limits */
+ assert(allPackets != 0);
+ if (goodPackets < (((unsigned long)-1)/100))
+ percent = (100 * goodPackets) / allPackets;
+ else
+ percent = goodPackets / (allPackets / 100);
+ info("Packet Statistics: Total=%lu. Empty=%lu. Usage=%lu%%",
+ allPackets, badPackets, percent);
+ if (uvd->iso_packet_len > 0) {
+ unsigned long allBytes, xferBytes;
+ char multiplier = ' ';
+ allBytes = allPackets * uvd->iso_packet_len;
+ xferBytes = uvd->stats.data_count;
+ assert(allBytes != 0);
+ if (xferBytes < (((unsigned long)-1)/100))
+ percent = (100 * xferBytes) / allBytes;
+ else
+ percent = xferBytes / (allBytes / 100);
+ /* Scale xferBytes for easy reading */
+ if (xferBytes > 10*1024) {
+ xferBytes /= 1024;
+ multiplier = 'K';
+ if (xferBytes > 10*1024) {
+ xferBytes /= 1024;
+ multiplier = 'M';
+ if (xferBytes > 10*1024) {
+ xferBytes /= 1024;
+ multiplier = 'G';
+ if (xferBytes > 10*1024) {
+ xferBytes /= 1024;
+ multiplier = 'T';
+ }
+ }
+ }
+ }
+ info("Transfer Statistics: Transferred=%lu%cB Usage=%lu%%",
+ xferBytes, multiplier, percent);
+ }
+ }
+}
+
+/*
+ * usbvideo_TestPattern()
+ *
+ * Procedure forms a test pattern (yellow grid on blue background).
+ *
+ * Parameters:
+ * fullframe: if TRUE then entire frame is filled, otherwise the procedure
+ * continues from the current scanline.
+ * pmode 0: fill the frame with solid blue color (like on VCR or TV)
+ * 1: Draw a colored grid
+ *
+ * History:
+ * 01-Feb-2000 Created.
+ */
+void usbvideo_TestPattern(struct uvd *uvd, int fullframe, int pmode)
+{
+ struct usbvideo_frame *frame;
+ int num_cell = 0;
+ int scan_length = 0;
+ static int num_pass = 0;
+
+ if (uvd == NULL) {
+ err("%s: uvd == NULL", __FUNCTION__);
+ return;
+ }
+ if ((uvd->curframe < 0) || (uvd->curframe >= USBVIDEO_NUMFRAMES)) {
+ err("%s: uvd->curframe=%d.", __FUNCTION__, uvd->curframe);
+ return;
+ }
+
+ /* Grab the current frame */
+ frame = &uvd->frame[uvd->curframe];
+
+ /* Optionally start at the beginning */
+ if (fullframe) {
+ frame->curline = 0;
+ frame->seqRead_Length = 0;
+ }
+#if 0
+ { /* For debugging purposes only */
+ char tmp[20];
+ usbvideo_VideosizeToString(tmp, sizeof(tmp), frame->request);
+ info("testpattern: frame=%s", tmp);
+ }
+#endif
+ /* Form every scan line */
+ for (; frame->curline < VIDEOSIZE_Y(frame->request); frame->curline++) {
+ int i;
+ unsigned char *f = frame->data +
+ (VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL * frame->curline);
+ for (i=0; i < VIDEOSIZE_X(frame->request); i++) {
+ unsigned char cb=0x80;
+ unsigned char cg = 0;
+ unsigned char cr = 0;
+
+ if (pmode == 1) {
+ if (frame->curline % 32 == 0)
+ cb = 0, cg = cr = 0xFF;
+ else if (i % 32 == 0) {
+ if (frame->curline % 32 == 1)
+ num_cell++;
+ cb = 0, cg = cr = 0xFF;
+ } else {
+ cb = ((num_cell*7) + num_pass) & 0xFF;
+ cg = ((num_cell*5) + num_pass*2) & 0xFF;
+ cr = ((num_cell*3) + num_pass*3) & 0xFF;
+ }
+ } else {
+ /* Just the blue screen */
+ }
+
+ *f++ = cb;
+ *f++ = cg;
+ *f++ = cr;
+ scan_length += 3;
+ }
+ }
+
+ frame->frameState = FrameState_Done;
+ frame->seqRead_Length += scan_length;
+ ++num_pass;
+
+ /* We do this unconditionally, regardless of FLAGS_OVERLAY_STATS */
+ usbvideo_OverlayStats(uvd, frame);
+}
+
+EXPORT_SYMBOL(usbvideo_TestPattern);
+
+
+#ifdef DEBUG
+/*
+ * usbvideo_HexDump()
+ *
+ * A debugging tool. Prints hex dumps.
+ *
+ * History:
+ * 29-Jul-2000 Added printing of offsets.
+ */
+void usbvideo_HexDump(const unsigned char *data, int len)
+{
+ const int bytes_per_line = 32;
+ char tmp[128]; /* 32*3 + 5 */
+ int i, k;
+
+ for (i=k=0; len > 0; i++, len--) {
+ if (i > 0 && ((i % bytes_per_line) == 0)) {
+ printk("%s\n", tmp);
+ k=0;
+ }
+ if ((i % bytes_per_line) == 0)
+ k += sprintf(&tmp[k], "%04x: ", i);
+ k += sprintf(&tmp[k], "%02x ", data[i]);
+ }
+ if (k > 0)
+ printk("%s\n", tmp);
+}
+
+EXPORT_SYMBOL(usbvideo_HexDump);
+
+#endif
+
+/* ******************************************************************** */
+
+/* XXX: this piece of crap really wants some error handling.. */
+static void usbvideo_ClientIncModCount(struct uvd *uvd)
+{
+ if (uvd == NULL) {
+ err("%s: uvd == NULL", __FUNCTION__);
+ return;
+ }
+ if (uvd->handle == NULL) {
+ err("%s: uvd->handle == NULL", __FUNCTION__);
+ return;
+ }
+ if (uvd->handle->md_module == NULL) {
+ err("%s: uvd->handle->md_module == NULL", __FUNCTION__);
+ return;
+ }
+ if (!try_module_get(uvd->handle->md_module)) {
+ err("%s: try_module_get() == 0", __FUNCTION__);
+ return;
+ }
+}
+
+static void usbvideo_ClientDecModCount(struct uvd *uvd)
+{
+ if (uvd == NULL) {
+ err("%s: uvd == NULL", __FUNCTION__);
+ return;
+ }
+ if (uvd->handle == NULL) {
+ err("%s: uvd->handle == NULL", __FUNCTION__);
+ return;
+ }
+ if (uvd->handle->md_module == NULL) {
+ err("%s: uvd->handle->md_module == NULL", __FUNCTION__);
+ return;
+ }
+ module_put(uvd->handle->md_module);
+}
+
+int usbvideo_register(
+ struct usbvideo **pCams,
+ const int num_cams,
+ const int num_extra,
+ const char *driverName,
+ const struct usbvideo_cb *cbTbl,
+ struct module *md,
+ const struct usb_device_id *id_table)
+{
+ struct usbvideo *cams;
+ int i, base_size, result;
+
+ /* Check parameters for sanity */
+ if ((num_cams <= 0) || (pCams == NULL) || (cbTbl == NULL)) {
+ err("%s: Illegal call", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ /* Check registration callback - must be set! */
+ if (cbTbl->probe == NULL) {
+ err("%s: probe() is required!", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ base_size = num_cams * sizeof(struct uvd) + sizeof(struct usbvideo);
+ cams = (struct usbvideo *) kmalloc(base_size, GFP_KERNEL);
+ if (cams == NULL) {
+ err("Failed to allocate %d. bytes for usbvideo struct", base_size);
+ return -ENOMEM;
+ }
+ dbg("%s: Allocated $%p (%d. bytes) for %d. cameras",
+ __FUNCTION__, cams, base_size, num_cams);
+ memset(cams, 0, base_size);
+
+ /* Copy callbacks, apply defaults for those that are not set */
+ memmove(&cams->cb, cbTbl, sizeof(cams->cb));
+ if (cams->cb.getFrame == NULL)
+ cams->cb.getFrame = usbvideo_GetFrame;
+ if (cams->cb.disconnect == NULL)
+ cams->cb.disconnect = usbvideo_Disconnect;
+ if (cams->cb.startDataPump == NULL)
+ cams->cb.startDataPump = usbvideo_StartDataPump;
+ if (cams->cb.stopDataPump == NULL)
+ cams->cb.stopDataPump = usbvideo_StopDataPump;
+
+ cams->num_cameras = num_cams;
+ cams->cam = (struct uvd *) &cams[1];
+ cams->md_module = md;
+ if (cams->md_module == NULL)
+ warn("%s: module == NULL!", __FUNCTION__);
+ init_MUTEX(&cams->lock); /* to 1 == available */
+
+ for (i = 0; i < num_cams; i++) {
+ struct uvd *up = &cams->cam[i];
+
+ up->handle = cams;
+
+ /* Allocate user_data separately because of kmalloc's limits */
+ if (num_extra > 0) {
+ up->user_size = num_cams * num_extra;
+ up->user_data = (char *) kmalloc(up->user_size, GFP_KERNEL);
+ if (up->user_data == NULL) {
+ err("%s: Failed to allocate user_data (%d. bytes)",
+ __FUNCTION__, up->user_size);
+ while (i) {
+ up = &cams->cam[--i];
+ kfree(up->user_data);
+ }
+ kfree(cams);
+ return -ENOMEM;
+ }
+ dbg("%s: Allocated cams[%d].user_data=$%p (%d. bytes)",
+ __FUNCTION__, i, up->user_data, up->user_size);
+ }
+ }
+
+ /*
+ * Register ourselves with USB stack.
+ */
+ strcpy(cams->drvName, (driverName != NULL) ? driverName : "Unknown");
+ cams->usbdrv.name = cams->drvName;
+ cams->usbdrv.probe = cams->cb.probe;
+ cams->usbdrv.disconnect = cams->cb.disconnect;
+ cams->usbdrv.id_table = id_table;
+
+ /*
+ * Update global handle to usbvideo. This is very important
+ * because probe() can be called before usb_register() returns.
+ * If the handle is not yet updated then the probe() will fail.
+ */
+ *pCams = cams;
+ result = usb_register(&cams->usbdrv);
+ if (result) {
+ for (i = 0; i < num_cams; i++) {
+ struct uvd *up = &cams->cam[i];
+ kfree(up->user_data);
+ }
+ kfree(cams);
+ }
+
+ return result;
+}
+
+EXPORT_SYMBOL(usbvideo_register);
+
+/*
+ * usbvideo_Deregister()
+ *
+ * Procedure frees all usbvideo and user data structures. Be warned that
+ * if you had some dynamically allocated components in ->user field then
+ * you should free them before calling here.
+ */
+void usbvideo_Deregister(struct usbvideo **pCams)
+{
+ struct usbvideo *cams;
+ int i;
+
+ if (pCams == NULL) {
+ err("%s: pCams == NULL", __FUNCTION__);
+ return;
+ }
+ cams = *pCams;
+ if (cams == NULL) {
+ err("%s: cams == NULL", __FUNCTION__);
+ return;
+ }
+
+ dbg("%s: Deregistering %s driver.", __FUNCTION__, cams->drvName);
+ usb_deregister(&cams->usbdrv);
+
+ dbg("%s: Deallocating cams=$%p (%d. cameras)", __FUNCTION__, cams, cams->num_cameras);
+ for (i=0; i < cams->num_cameras; i++) {
+ struct uvd *up = &cams->cam[i];
+ int warning = 0;
+
+ if (up->user_data != NULL) {
+ if (up->user_size <= 0)
+ ++warning;
+ } else {
+ if (up->user_size > 0)
+ ++warning;
+ }
+ if (warning) {
+ err("%s: Warning: user_data=$%p user_size=%d.",
+ __FUNCTION__, up->user_data, up->user_size);
+ } else {
+ dbg("%s: Freeing %d. $%p->user_data=$%p",
+ __FUNCTION__, i, up, up->user_data);
+ kfree(up->user_data);
+ }
+ }
+ /* Whole array was allocated in one chunk */
+ dbg("%s: Freed %d uvd structures",
+ __FUNCTION__, cams->num_cameras);
+ kfree(cams);
+ *pCams = NULL;
+}
+
+EXPORT_SYMBOL(usbvideo_Deregister);
+
+/*
+ * usbvideo_Disconnect()
+ *
+ * This procedure stops all driver activity. Deallocation of
+ * the interface-private structure (pointed by 'ptr') is done now
+ * (if we don't have any open files) or later, when those files
+ * are closed. After that driver should be removable.
+ *
+ * This code handles surprise removal. The uvd->user is a counter which
+ * increments on open() and decrements on close(). If we see here that
+ * this counter is not 0 then we have a client who still has us opened.
+ * We set uvd->remove_pending flag as early as possible, and after that
+ * all access to the camera will gracefully fail. These failures should
+ * prompt client to (eventually) close the video device, and then - in
+ * usbvideo_v4l_close() - we decrement uvd->uvd_used and usage counter.
+ *
+ * History:
+ * 22-Jan-2000 Added polling of MOD_IN_USE to delay removal until all users gone.
+ * 27-Jan-2000 Reworked to allow pending disconnects; see xxx_close()
+ * 24-May-2000 Corrected to prevent race condition (MOD_xxx_USE_COUNT).
+ * 19-Oct-2000 Moved to usbvideo module.
+ */
+static void usbvideo_Disconnect(struct usb_interface *intf)
+{
+ struct uvd *uvd = usb_get_intfdata (intf);
+ int i;
+
+ if (uvd == NULL) {
+ err("%s($%p): Illegal call.", __FUNCTION__, intf);
+ return;
+ }
+
+ usb_set_intfdata (intf, NULL);
+
+ usbvideo_ClientIncModCount(uvd);
+ if (uvd->debug > 0)
+ info("%s(%p.)", __FUNCTION__, intf);
+
+ down(&uvd->lock);
+ uvd->remove_pending = 1; /* Now all ISO data will be ignored */
+
+ /* At this time we ask to cancel outstanding URBs */
+ GET_CALLBACK(uvd, stopDataPump)(uvd);
+
+ for (i=0; i < USBVIDEO_NUMSBUF; i++)
+ usb_free_urb(uvd->sbuf[i].urb);
+
+ usb_put_dev(uvd->dev);
+ uvd->dev = NULL; /* USB device is no more */
+
+ video_unregister_device(&uvd->vdev);
+ if (uvd->debug > 0)
+ info("%s: Video unregistered.", __FUNCTION__);
+
+ if (uvd->user)
+ info("%s: In use, disconnect pending.", __FUNCTION__);
+ else
+ usbvideo_CameraRelease(uvd);
+ up(&uvd->lock);
+ info("USB camera disconnected.");
+
+ usbvideo_ClientDecModCount(uvd);
+}
+
+/*
+ * usbvideo_CameraRelease()
+ *
+ * This code does final release of uvd. This happens
+ * after the device is disconnected -and- all clients
+ * closed their files.
+ *
+ * History:
+ * 27-Jan-2000 Created.
+ */
+static void usbvideo_CameraRelease(struct uvd *uvd)
+{
+ if (uvd == NULL) {
+ err("%s: Illegal call", __FUNCTION__);
+ return;
+ }
+
+ RingQueue_Free(&uvd->dp);
+ if (VALID_CALLBACK(uvd, userFree))
+ GET_CALLBACK(uvd, userFree)(uvd);
+ uvd->uvd_used = 0; /* This is atomic, no need to take mutex */
+}
+
+/*
+ * usbvideo_find_struct()
+ *
+ * This code searches the array of preallocated (static) structures
+ * and returns index of the first one that isn't in use. Returns -1
+ * if there are no free structures.
+ *
+ * History:
+ * 27-Jan-2000 Created.
+ */
+static int usbvideo_find_struct(struct usbvideo *cams)
+{
+ int u, rv = -1;
+
+ if (cams == NULL) {
+ err("No usbvideo handle?");
+ return -1;
+ }
+ down(&cams->lock);
+ for (u = 0; u < cams->num_cameras; u++) {
+ struct uvd *uvd = &cams->cam[u];
+ if (!uvd->uvd_used) /* This one is free */
+ {
+ uvd->uvd_used = 1; /* In use now */
+ init_MUTEX(&uvd->lock); /* to 1 == available */
+ uvd->dev = NULL;
+ rv = u;
+ break;
+ }
+ }
+ up(&cams->lock);
+ return rv;
+}
+
+static struct file_operations usbvideo_fops = {
+ .owner = THIS_MODULE,
+ .open = usbvideo_v4l_open,
+ .release =usbvideo_v4l_close,
+ .read = usbvideo_v4l_read,
+ .mmap = usbvideo_v4l_mmap,
+ .ioctl = usbvideo_v4l_ioctl,
+ .llseek = no_llseek,
+};
+static struct video_device usbvideo_template = {
+ .owner = THIS_MODULE,
+ .type = VID_TYPE_CAPTURE,
+ .hardware = VID_HARDWARE_CPIA,
+ .fops = &usbvideo_fops,
+};
+
+struct uvd *usbvideo_AllocateDevice(struct usbvideo *cams)
+{
+ int i, devnum;
+ struct uvd *uvd = NULL;
+
+ if (cams == NULL) {
+ err("No usbvideo handle?");
+ return NULL;
+ }
+
+ devnum = usbvideo_find_struct(cams);
+ if (devnum == -1) {
+ err("IBM USB camera driver: Too many devices!");
+ return NULL;
+ }
+ uvd = &cams->cam[devnum];
+ dbg("Device entry #%d. at $%p", devnum, uvd);
+
+ /* Not relying upon caller we increase module counter ourselves */
+ usbvideo_ClientIncModCount(uvd);
+
+ down(&uvd->lock);
+ for (i=0; i < USBVIDEO_NUMSBUF; i++) {
+ uvd->sbuf[i].urb = usb_alloc_urb(FRAMES_PER_DESC, GFP_KERNEL);
+ if (uvd->sbuf[i].urb == NULL) {
+ err("usb_alloc_urb(%d.) failed.", FRAMES_PER_DESC);
+ uvd->uvd_used = 0;
+ uvd = NULL;
+ goto allocate_done;
+ }
+ }
+ uvd->user=0;
+ uvd->remove_pending = 0;
+ uvd->last_error = 0;
+ RingQueue_Initialize(&uvd->dp);
+
+ /* Initialize video device structure */
+ uvd->vdev = usbvideo_template;
+ sprintf(uvd->vdev.name, "%.20s USB Camera", cams->drvName);
+ /*
+ * The client is free to overwrite those because we
+ * return control to the client's probe function right now.
+ */
+allocate_done:
+ up (&uvd->lock);
+ usbvideo_ClientDecModCount(uvd);
+ return uvd;
+}
+
+EXPORT_SYMBOL(usbvideo_AllocateDevice);
+
+int usbvideo_RegisterVideoDevice(struct uvd *uvd)
+{
+ char tmp1[20], tmp2[20]; /* Buffers for printing */
+
+ if (uvd == NULL) {
+ err("%s: Illegal call.", __FUNCTION__);
+ return -EINVAL;
+ }
+ if (uvd->video_endp == 0) {
+ info("%s: No video endpoint specified; data pump disabled.", __FUNCTION__);
+ }
+ if (uvd->paletteBits == 0) {
+ err("%s: No palettes specified!", __FUNCTION__);
+ return -EINVAL;
+ }
+ if (uvd->defaultPalette == 0) {
+ info("%s: No default palette!", __FUNCTION__);
+ }
+
+ uvd->max_frame_size = VIDEOSIZE_X(uvd->canvas) *
+ VIDEOSIZE_Y(uvd->canvas) * V4L_BYTES_PER_PIXEL;
+ usbvideo_VideosizeToString(tmp1, sizeof(tmp1), uvd->videosize);
+ usbvideo_VideosizeToString(tmp2, sizeof(tmp2), uvd->canvas);
+
+ if (uvd->debug > 0) {
+ info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx",
+ __FUNCTION__, uvd->iface, uvd->video_endp, uvd->paletteBits);
+ }
+ if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
+ err("%s: video_register_device failed", __FUNCTION__);
+ return -EPIPE;
+ }
+ if (uvd->debug > 1) {
+ info("%s: video_register_device() successful", __FUNCTION__);
+ }
+ if (uvd->dev == NULL) {
+ err("%s: uvd->dev == NULL", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ info("%s on /dev/video%d: canvas=%s videosize=%s",
+ (uvd->handle != NULL) ? uvd->handle->drvName : "???",
+ uvd->vdev.minor, tmp2, tmp1);
+
+ usb_get_dev(uvd->dev);
+ return 0;
+}
+
+EXPORT_SYMBOL(usbvideo_RegisterVideoDevice);
+
+/* ******************************************************************** */
+
+static int usbvideo_v4l_mmap(struct file *file, struct vm_area_struct *vma)
+{
+ struct uvd *uvd = file->private_data;
+ unsigned long start = vma->vm_start;
+ unsigned long size = vma->vm_end-vma->vm_start;
+ unsigned long page, pos;
+
+ if (!CAMERA_IS_OPERATIONAL(uvd))
+ return -EFAULT;
+
+ if (size > (((USBVIDEO_NUMFRAMES * uvd->max_frame_size) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
+ return -EINVAL;
+
+ pos = (unsigned long) uvd->fbuf;
+ while (size > 0) {
+ page = vmalloc_to_pfn((void *)pos);
+ if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
+ return -EAGAIN;
+
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+ if (size > PAGE_SIZE)
+ size -= PAGE_SIZE;
+ else
+ size = 0;
+ }
+
+ return 0;
+}
+
+/*
+ * usbvideo_v4l_open()
+ *
+ * This is part of Video 4 Linux API. The driver can be opened by one
+ * client only (checks internal counter 'uvdser'). The procedure
+ * then allocates buffers needed for video processing.
+ *
+ * History:
+ * 22-Jan-2000 Rewrote, moved scratch buffer allocation here. Now the
+ * camera is also initialized here (once per connect), at
+ * expense of V4L client (it waits on open() call).
+ * 27-Jan-2000 Used USBVIDEO_NUMSBUF as number of URB buffers.
+ * 24-May-2000 Corrected to prevent race condition (MOD_xxx_USE_COUNT).
+ */
+static int usbvideo_v4l_open(struct inode *inode, struct file *file)
+{
+ struct video_device *dev = video_devdata(file);
+ struct uvd *uvd = (struct uvd *) dev;
+ const int sb_size = FRAMES_PER_DESC * uvd->iso_packet_len;
+ int i, errCode = 0;
+
+ if (uvd->debug > 1)
+ info("%s($%p)", __FUNCTION__, dev);
+
+ usbvideo_ClientIncModCount(uvd);
+ down(&uvd->lock);
+
+ if (uvd->user) {
+ err("%s: Someone tried to open an already opened device!", __FUNCTION__);
+ errCode = -EBUSY;
+ } else {
+ /* Clear statistics */
+ memset(&uvd->stats, 0, sizeof(uvd->stats));
+
+ /* Clean pointers so we know if we allocated something */
+ for (i=0; i < USBVIDEO_NUMSBUF; i++)
+ uvd->sbuf[i].data = NULL;
+
+ /* Allocate memory for the frame buffers */
+ uvd->fbuf_size = USBVIDEO_NUMFRAMES * uvd->max_frame_size;
+ uvd->fbuf = usbvideo_rvmalloc(uvd->fbuf_size);
+ RingQueue_Allocate(&uvd->dp, RING_QUEUE_SIZE);
+ if ((uvd->fbuf == NULL) ||
+ (!RingQueue_IsAllocated(&uvd->dp))) {
+ err("%s: Failed to allocate fbuf or dp", __FUNCTION__);
+ errCode = -ENOMEM;
+ } else {
+ /* Allocate all buffers */
+ for (i=0; i < USBVIDEO_NUMFRAMES; i++) {
+ uvd->frame[i].frameState = FrameState_Unused;
+ uvd->frame[i].data = uvd->fbuf + i*(uvd->max_frame_size);
+ /*
+ * Set default sizes in case IOCTL (VIDIOCMCAPTURE)
+ * is not used (using read() instead).
+ */
+ uvd->frame[i].canvas = uvd->canvas;
+ uvd->frame[i].seqRead_Index = 0;
+ }
+ for (i=0; i < USBVIDEO_NUMSBUF; i++) {
+ uvd->sbuf[i].data = kmalloc(sb_size, GFP_KERNEL);
+ if (uvd->sbuf[i].data == NULL) {
+ errCode = -ENOMEM;
+ break;
+ }
+ }
+ }
+ if (errCode != 0) {
+ /* Have to free all that memory */
+ if (uvd->fbuf != NULL) {
+ usbvideo_rvfree(uvd->fbuf, uvd->fbuf_size);
+ uvd->fbuf = NULL;
+ }
+ RingQueue_Free(&uvd->dp);
+ for (i=0; i < USBVIDEO_NUMSBUF; i++) {
+ if (uvd->sbuf[i].data != NULL) {
+ kfree (uvd->sbuf[i].data);
+ uvd->sbuf[i].data = NULL;
+ }
+ }
+ }
+ }
+
+ /* If so far no errors then we shall start the camera */
+ if (errCode == 0) {
+ /* Start data pump if we have valid endpoint */
+ if (uvd->video_endp != 0)
+ errCode = GET_CALLBACK(uvd, startDataPump)(uvd);
+ if (errCode == 0) {
+ if (VALID_CALLBACK(uvd, setupOnOpen)) {
+ if (uvd->debug > 1)
+ info("%s: setupOnOpen callback", __FUNCTION__);
+ errCode = GET_CALLBACK(uvd, setupOnOpen)(uvd);
+ if (errCode < 0) {
+ err("%s: setupOnOpen callback failed (%d.).",
+ __FUNCTION__, errCode);
+ } else if (uvd->debug > 1) {
+ info("%s: setupOnOpen callback successful", __FUNCTION__);
+ }
+ }
+ if (errCode == 0) {
+ uvd->settingsAdjusted = 0;
+ if (uvd->debug > 1)
+ info("%s: Open succeeded.", __FUNCTION__);
+ uvd->user++;
+ file->private_data = uvd;
+ }
+ }
+ }
+ up(&uvd->lock);
+ if (errCode != 0)
+ usbvideo_ClientDecModCount(uvd);
+ if (uvd->debug > 0)
+ info("%s: Returning %d.", __FUNCTION__, errCode);
+ return errCode;
+}
+
+/*
+ * usbvideo_v4l_close()
+ *
+ * This is part of Video 4 Linux API. The procedure
+ * stops streaming and deallocates all buffers that were earlier
+ * allocated in usbvideo_v4l_open().
+ *
+ * History:
+ * 22-Jan-2000 Moved scratch buffer deallocation here.
+ * 27-Jan-2000 Used USBVIDEO_NUMSBUF as number of URB buffers.
+ * 24-May-2000 Moved MOD_DEC_USE_COUNT outside of code that can sleep.
+ */
+static int usbvideo_v4l_close(struct inode *inode, struct file *file)
+{
+ struct video_device *dev = file->private_data;
+ struct uvd *uvd = (struct uvd *) dev;
+ int i;
+
+ if (uvd->debug > 1)
+ info("%s($%p)", __FUNCTION__, dev);
+
+ down(&uvd->lock);
+ GET_CALLBACK(uvd, stopDataPump)(uvd);
+ usbvideo_rvfree(uvd->fbuf, uvd->fbuf_size);
+ uvd->fbuf = NULL;
+ RingQueue_Free(&uvd->dp);
+
+ for (i=0; i < USBVIDEO_NUMSBUF; i++) {
+ kfree(uvd->sbuf[i].data);
+ uvd->sbuf[i].data = NULL;
+ }
+
+#if USBVIDEO_REPORT_STATS
+ usbvideo_ReportStatistics(uvd);
+#endif
+
+ uvd->user--;
+ if (uvd->remove_pending) {
+ if (uvd->debug > 0)
+ info("usbvideo_v4l_close: Final disconnect.");
+ usbvideo_CameraRelease(uvd);
+ }
+ up(&uvd->lock);
+ usbvideo_ClientDecModCount(uvd);
+
+ if (uvd->debug > 1)
+ info("%s: Completed.", __FUNCTION__);
+ file->private_data = NULL;
+ return 0;
+}
+
+/*
+ * usbvideo_v4l_ioctl()
+ *
+ * This is part of Video 4 Linux API. The procedure handles ioctl() calls.
+ *
+ * History:
+ * 22-Jan-2000 Corrected VIDIOCSPICT to reject unsupported settings.
+ */
+static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
+{
+ struct uvd *uvd = file->private_data;
+
+ if (!CAMERA_IS_OPERATIONAL(uvd))
+ return -EIO;
+
+ switch (cmd) {
+ case VIDIOCGCAP:
+ {
+ struct video_capability *b = arg;
+ *b = uvd->vcap;
+ return 0;
+ }
+ case VIDIOCGCHAN:
+ {
+ struct video_channel *v = arg;
+ *v = uvd->vchan;
+ return 0;
+ }
+ case VIDIOCSCHAN:
+ {
+ struct video_channel *v = arg;
+ if (v->channel != 0)
+ return -EINVAL;
+ return 0;
+ }
+ case VIDIOCGPICT:
+ {
+ struct video_picture *pic = arg;
+ *pic = uvd->vpic;
+ return 0;
+ }
+ case VIDIOCSPICT:
+ {
+ struct video_picture *pic = arg;
+ /*
+ * Use temporary 'video_picture' structure to preserve our
+ * own settings (such as color depth, palette) that we
+ * aren't allowing everyone (V4L client) to change.
+ */
+ uvd->vpic.brightness = pic->brightness;
+ uvd->vpic.hue = pic->hue;
+ uvd->vpic.colour = pic->colour;
+ uvd->vpic.contrast = pic->contrast;
+ uvd->settingsAdjusted = 0; /* Will force new settings */
+ return 0;
+ }
+ case VIDIOCSWIN:
+ {
+ struct video_window *vw = arg;
+
+ if(VALID_CALLBACK(uvd, setVideoMode)) {
+ return GET_CALLBACK(uvd, setVideoMode)(uvd, vw);
+ }
+
+ if (vw->flags)
+ return -EINVAL;
+ if (vw->clipcount)
+ return -EINVAL;
+ if (vw->width != VIDEOSIZE_X(uvd->canvas))
+ return -EINVAL;
+ if (vw->height != VIDEOSIZE_Y(uvd->canvas))
+ return -EINVAL;
+
+ return 0;
+ }
+ case VIDIOCGWIN:
+ {
+ struct video_window *vw = arg;
+
+ vw->x = 0;
+ vw->y = 0;
+ vw->width = VIDEOSIZE_X(uvd->videosize);
+ vw->height = VIDEOSIZE_Y(uvd->videosize);
+ vw->chromakey = 0;
+ if (VALID_CALLBACK(uvd, getFPS))
+ vw->flags = GET_CALLBACK(uvd, getFPS)(uvd);
+ else
+ vw->flags = 10; /* FIXME: do better! */
+ return 0;
+ }
+ case VIDIOCGMBUF:
+ {
+ struct video_mbuf *vm = arg;
+ int i;
+
+ memset(vm, 0, sizeof(*vm));
+ vm->size = uvd->max_frame_size * USBVIDEO_NUMFRAMES;
+ vm->frames = USBVIDEO_NUMFRAMES;
+ for(i = 0; i < USBVIDEO_NUMFRAMES; i++)
+ vm->offsets[i] = i * uvd->max_frame_size;
+
+ return 0;
+ }
+ case VIDIOCMCAPTURE:
+ {
+ struct video_mmap *vm = arg;
+
+ if (uvd->debug >= 1) {
+ info("VIDIOCMCAPTURE: frame=%d. size=%dx%d, format=%d.",
+ vm->frame, vm->width, vm->height, vm->format);
+ }
+ /*
+ * Check if the requested size is supported. If the requestor
+ * requests too big a frame then we may be tricked into accessing
+ * outside of own preallocated frame buffer (in uvd->frame).
+ * This will cause oops or a security hole. Theoretically, we
+ * could only clamp the size down to acceptable bounds, but then
+ * we'd need to figure out how to insert our smaller buffer into
+ * larger caller's buffer... this is not an easy question. So we
+ * here just flatly reject too large requests, assuming that the
+ * caller will resubmit with smaller size. Callers should know
+ * what size we support (returned by VIDIOCGCAP). However vidcat,
+ * for one, does not care and allows to ask for any size.
+ */
+ if ((vm->width > VIDEOSIZE_X(uvd->canvas)) ||
+ (vm->height > VIDEOSIZE_Y(uvd->canvas))) {
+ if (uvd->debug > 0) {
+ info("VIDIOCMCAPTURE: Size=%dx%d too large; "
+ "allowed only up to %ldx%ld", vm->width, vm->height,
+ VIDEOSIZE_X(uvd->canvas), VIDEOSIZE_Y(uvd->canvas));
+ }
+ return -EINVAL;
+ }
+ /* Check if the palette is supported */
+ if (((1L << vm->format) & uvd->paletteBits) == 0) {
+ if (uvd->debug > 0) {
+ info("VIDIOCMCAPTURE: format=%d. not supported"
+ " (paletteBits=$%08lx)",
+ vm->format, uvd->paletteBits);
+ }
+ return -EINVAL;
+ }
+ if ((vm->frame < 0) || (vm->frame >= USBVIDEO_NUMFRAMES)) {
+ err("VIDIOCMCAPTURE: vm.frame=%d. !E [0-%d]", vm->frame, USBVIDEO_NUMFRAMES-1);
+ return -EINVAL;
+ }
+ if (uvd->frame[vm->frame].frameState == FrameState_Grabbing) {
+ /* Not an error - can happen */
+ }
+ uvd->frame[vm->frame].request = VIDEOSIZE(vm->width, vm->height);
+ uvd->frame[vm->frame].palette = vm->format;
+
+ /* Mark it as ready */
+ uvd->frame[vm->frame].frameState = FrameState_Ready;
+
+ return usbvideo_NewFrame(uvd, vm->frame);
+ }
+ case VIDIOCSYNC:
+ {
+ int *frameNum = arg;
+ int ret;
+
+ if (*frameNum < 0 || *frameNum >= USBVIDEO_NUMFRAMES)
+ return -EINVAL;
+
+ if (uvd->debug >= 1)
+ info("VIDIOCSYNC: syncing to frame %d.", *frameNum);
+ if (uvd->flags & FLAGS_NO_DECODING)
+ ret = usbvideo_GetFrame(uvd, *frameNum);
+ else if (VALID_CALLBACK(uvd, getFrame)) {
+ ret = GET_CALLBACK(uvd, getFrame)(uvd, *frameNum);
+ if ((ret < 0) && (uvd->debug >= 1)) {
+ err("VIDIOCSYNC: getFrame() returned %d.", ret);
+ }
+ } else {
+ err("VIDIOCSYNC: getFrame is not set");
+ ret = -EFAULT;
+ }
+
+ /*
+ * The frame is in FrameState_Done_Hold state. Release it
+ * right now because its data is already mapped into
+ * the user space and it's up to the application to
+ * make use of it until it asks for another frame.
+ */
+ uvd->frame[*frameNum].frameState = FrameState_Unused;
+ return ret;
+ }
+ case VIDIOCGFBUF:
+ {
+ struct video_buffer *vb = arg;
+
+ memset(vb, 0, sizeof(*vb));
+ return 0;
+ }
+ case VIDIOCKEY:
+ return 0;
+
+ case VIDIOCCAPTURE:
+ return -EINVAL;
+
+ case VIDIOCSFBUF:
+
+ case VIDIOCGTUNER:
+ case VIDIOCSTUNER:
+
+ case VIDIOCGFREQ:
+ case VIDIOCSFREQ:
+
+ case VIDIOCGAUDIO:
+ case VIDIOCSAUDIO:
+ return -EINVAL;
+
+ default:
+ return -ENOIOCTLCMD;
+ }
+ return 0;
+}
+
+static int usbvideo_v4l_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, usbvideo_v4l_do_ioctl);
+}
+
+/*
+ * usbvideo_v4l_read()
+ *
+ * This is mostly boring stuff. We simply ask for a frame and when it
+ * arrives copy all the video data from it into user space. There is
+ * no obvious need to override this method.
+ *
+ * History:
+ * 20-Oct-2000 Created.
+ * 01-Nov-2000 Added mutex (uvd->lock).
+ */
+static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ struct uvd *uvd = file->private_data;
+ int noblock = file->f_flags & O_NONBLOCK;
+ int frmx = -1, i;
+ struct usbvideo_frame *frame;
+
+ if (!CAMERA_IS_OPERATIONAL(uvd) || (buf == NULL))
+ return -EFAULT;
+
+ if (uvd->debug >= 1)
+ info("%s: %Zd. bytes, noblock=%d.", __FUNCTION__, count, noblock);
+
+ down(&uvd->lock);
+
+ /* See if a frame is completed, then use it. */
+ for(i = 0; i < USBVIDEO_NUMFRAMES; i++) {
+ if ((uvd->frame[i].frameState == FrameState_Done) ||
+ (uvd->frame[i].frameState == FrameState_Done_Hold) ||
+ (uvd->frame[i].frameState == FrameState_Error)) {
+ frmx = i;
+ break;
+ }
+ }
+
+ /* FIXME: If we don't start a frame here then who ever does? */
+ if (noblock && (frmx == -1)) {
+ count = -EAGAIN;
+ goto read_done;
+ }
+
+ /*
+ * If no FrameState_Done, look for a FrameState_Grabbing state.
+ * See if a frame is in process (grabbing), then use it.
+ * We will need to wait until it becomes cooked, of course.
+ */
+ if (frmx == -1) {
+ for(i = 0; i < USBVIDEO_NUMFRAMES; i++) {
+ if (uvd->frame[i].frameState == FrameState_Grabbing) {
+ frmx = i;
+ break;
+ }
+ }
+ }
+
+ /*
+ * If no frame is active, start one. We don't care which one
+ * it will be, so #0 is as good as any.
+ * In read access mode we don't have convenience of VIDIOCMCAPTURE
+ * to specify the requested palette (video format) on per-frame
+ * basis. This means that we have to return data in -some- format
+ * and just hope that the client knows what to do with it.
+ * The default format is configured in uvd->defaultPalette field
+ * as one of VIDEO_PALETTE_xxx values. We stuff it into the new
+ * frame and initiate the frame filling process.
+ */
+ if (frmx == -1) {
+ if (uvd->defaultPalette == 0) {
+ err("%s: No default palette; don't know what to do!", __FUNCTION__);
+ count = -EFAULT;
+ goto read_done;
+ }
+ frmx = 0;
+ /*
+ * We have no per-frame control over video size.
+ * Therefore we only can use whatever size was
+ * specified as default.
+ */
+ uvd->frame[frmx].request = uvd->videosize;
+ uvd->frame[frmx].palette = uvd->defaultPalette;
+ uvd->frame[frmx].frameState = FrameState_Ready;
+ usbvideo_NewFrame(uvd, frmx);
+ /* Now frame 0 is supposed to start filling... */
+ }
+
+ /*
+ * Get a pointer to the active frame. It is either previously
+ * completed frame or frame in progress but not completed yet.
+ */
+ frame = &uvd->frame[frmx];
+
+ /*
+ * Sit back & wait until the frame gets filled and postprocessed.
+ * If we fail to get the picture [in time] then return the error.
+ * In this call we specify that we want the frame to be waited for,
+ * postprocessed and switched into FrameState_Done_Hold state. This
+ * state is used to hold the frame as "fully completed" between
+ * subsequent partial reads of the same frame.
+ */
+ if (frame->frameState != FrameState_Done_Hold) {
+ long rv = -EFAULT;
+ if (uvd->flags & FLAGS_NO_DECODING)
+ rv = usbvideo_GetFrame(uvd, frmx);
+ else if (VALID_CALLBACK(uvd, getFrame))
+ rv = GET_CALLBACK(uvd, getFrame)(uvd, frmx);
+ else
+ err("getFrame is not set");
+ if ((rv != 0) || (frame->frameState != FrameState_Done_Hold)) {
+ count = rv;
+ goto read_done;
+ }
+ }
+
+ /*
+ * Copy bytes to user space. We allow for partial reads, which
+ * means that the user application can request read less than
+ * the full frame size. It is up to the application to issue
+ * subsequent calls until entire frame is read.
+ *
+ * First things first, make sure we don't copy more than we
+ * have - even if the application wants more. That would be
+ * a big security embarassment!
+ */
+ if ((count + frame->seqRead_Index) > frame->seqRead_Length)
+ count = frame->seqRead_Length - frame->seqRead_Index;
+
+ /*
+ * Copy requested amount of data to user space. We start
+ * copying from the position where we last left it, which
+ * will be zero for a new frame (not read before).
+ */
+ if (copy_to_user(buf, frame->data + frame->seqRead_Index, count)) {
+ count = -EFAULT;
+ goto read_done;
+ }
+
+ /* Update last read position */
+ frame->seqRead_Index += count;
+ if (uvd->debug >= 1) {
+ err("%s: {copy} count used=%Zd, new seqRead_Index=%ld",
+ __FUNCTION__, count, frame->seqRead_Index);
+ }
+
+ /* Finally check if the frame is done with and "release" it */
+ if (frame->seqRead_Index >= frame->seqRead_Length) {
+ /* All data has been read */
+ frame->seqRead_Index = 0;
+
+ /* Mark it as available to be used again. */
+ uvd->frame[frmx].frameState = FrameState_Unused;
+ if (usbvideo_NewFrame(uvd, (frmx + 1) % USBVIDEO_NUMFRAMES)) {
+ err("%s: usbvideo_NewFrame failed.", __FUNCTION__);
+ }
+ }
+read_done:
+ up(&uvd->lock);
+ return count;
+}
+
+/*
+ * Make all of the blocks of data contiguous
+ */
+static int usbvideo_CompressIsochronous(struct uvd *uvd, struct urb *urb)
+{
+ char *cdata;
+ int i, totlen = 0;
+
+ 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;
+
+ cdata = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
+
+ /* Detect and ignore errored packets */
+ if (st < 0) {
+ if (uvd->debug >= 1)
+ err("Data error: packet=%d. len=%d. status=%d.", i, n, st);
+ uvd->stats.iso_err_count++;
+ continue;
+ }
+
+ /* Detect and ignore empty packets */
+ if (n <= 0) {
+ uvd->stats.iso_skip_count++;
+ continue;
+ }
+ totlen += n; /* Little local accounting */
+ RingQueue_Enqueue(&uvd->dp, cdata, n);
+ }
+ return totlen;
+}
+
+static void usbvideo_IsocIrq(struct urb *urb, struct pt_regs *regs)
+{
+ int i, ret, len;
+ struct uvd *uvd = urb->context;
+
+ /* We don't want to do anything if we are about to be removed! */
+ if (!CAMERA_IS_OPERATIONAL(uvd))
+ return;
+#if 0
+ if (urb->actual_length > 0) {
+ info("urb=$%p status=%d. errcount=%d. length=%d.",
+ urb, urb->status, urb->error_count, urb->actual_length);
+ } else {
+ static int c = 0;
+ if (c++ % 100 == 0)
+ info("No Isoc data");
+ }
+#endif
+
+ if (!uvd->streaming) {
+ if (uvd->debug >= 1)
+ info("Not streaming, but interrupt!");
+ return;
+ }
+
+ uvd->stats.urb_count++;
+ if (urb->actual_length <= 0)
+ goto urb_done_with;
+
+ /* Copy the data received into ring queue */
+ len = usbvideo_CompressIsochronous(uvd, urb);
+ uvd->stats.urb_length = len;
+ if (len <= 0)
+ goto urb_done_with;
+
+ /* Here we got some data */
+ uvd->stats.data_count += len;
+ RingQueue_WakeUpInterruptible(&uvd->dp);
+
+urb_done_with:
+ for (i = 0; i < FRAMES_PER_DESC; i++) {
+ urb->iso_frame_desc[i].status = 0;
+ urb->iso_frame_desc[i].actual_length = 0;
+ }
+ urb->status = 0;
+ urb->dev = uvd->dev;
+ ret = usb_submit_urb (urb, GFP_KERNEL);
+ if(ret)
+ err("usb_submit_urb error (%d)", ret);
+ return;
+}
+
+/*
+ * usbvideo_StartDataPump()
+ *
+ * History:
+ * 27-Jan-2000 Used ibmcam->iface, ibmcam->ifaceAltActive instead
+ * of hardcoded values. Simplified by using for loop,
+ * allowed any number of URBs.
+ */
+static int usbvideo_StartDataPump(struct uvd *uvd)
+{
+ struct usb_device *dev = uvd->dev;
+ int i, errFlag;
+
+ if (uvd->debug > 1)
+ info("%s($%p)", __FUNCTION__, uvd);
+
+ if (!CAMERA_IS_OPERATIONAL(uvd)) {
+ err("%s: Camera is not operational", __FUNCTION__);
+ return -EFAULT;
+ }
+ uvd->curframe = -1;
+
+ /* Alternate interface 1 is is the biggest frame size */
+ i = usb_set_interface(dev, uvd->iface, uvd->ifaceAltActive);
+ if (i < 0) {
+ err("%s: usb_set_interface error", __FUNCTION__);
+ uvd->last_error = i;
+ return -EBUSY;
+ }
+ if (VALID_CALLBACK(uvd, videoStart))
+ GET_CALLBACK(uvd, videoStart)(uvd);
+ else
+ err("%s: videoStart not set", __FUNCTION__);
+
+ /* 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);
+ urb->interval = 1;
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->transfer_buffer = uvd->sbuf[i].data;
+ urb->complete = usbvideo_IsocIrq;
+ urb->number_of_packets = FRAMES_PER_DESC;
+ urb->transfer_buffer_length = uvd->iso_packet_len * FRAMES_PER_DESC;
+ for (j=k=0; j < FRAMES_PER_DESC; j++, k += uvd->iso_packet_len) {
+ urb->iso_frame_desc[j].offset = k;
+ urb->iso_frame_desc[j].length = uvd->iso_packet_len;
+ }
+ }
+
+ /* Submit all URBs */
+ for (i=0; i < USBVIDEO_NUMSBUF; i++) {
+ errFlag = usb_submit_urb(uvd->sbuf[i].urb, GFP_KERNEL);
+ if (errFlag)
+ err("%s: usb_submit_isoc(%d) ret %d", __FUNCTION__, i, errFlag);
+ }
+
+ uvd->streaming = 1;
+ if (uvd->debug > 1)
+ info("%s: streaming=1 video_endp=$%02x", __FUNCTION__, uvd->video_endp);
+ return 0;
+}
+
+/*
+ * usbvideo_StopDataPump()
+ *
+ * This procedure stops streaming and deallocates URBs. Then it
+ * activates zero-bandwidth alt. setting of the video interface.
+ *
+ * History:
+ * 22-Jan-2000 Corrected order of actions to work after surprise removal.
+ * 27-Jan-2000 Used uvd->iface, uvd->ifaceAltInactive instead of hardcoded values.
+ */
+static void usbvideo_StopDataPump(struct uvd *uvd)
+{
+ int i, j;
+
+ if ((uvd == NULL) || (!uvd->streaming) || (uvd->dev == NULL))
+ return;
+
+ if (uvd->debug > 1)
+ info("%s($%p)", __FUNCTION__, uvd);
+
+ /* Unschedule all of the iso td's */
+ for (i=0; i < USBVIDEO_NUMSBUF; i++) {
+ usb_kill_urb(uvd->sbuf[i].urb);
+ }
+ if (uvd->debug > 1)
+ info("%s: streaming=0", __FUNCTION__);
+ uvd->streaming = 0;
+
+ if (!uvd->remove_pending) {
+ /* Invoke minidriver's magic to stop the camera */
+ if (VALID_CALLBACK(uvd, videoStop))
+ GET_CALLBACK(uvd, videoStop)(uvd);
+ else
+ err("%s: videoStop not set", __FUNCTION__);
+
+ /* Set packet size to 0 */
+ j = usb_set_interface(uvd->dev, uvd->iface, uvd->ifaceAltInactive);
+ if (j < 0) {
+ err("%s: usb_set_interface() error %d.", __FUNCTION__, j);
+ uvd->last_error = j;
+ }
+ }
+}
+
+/*
+ * usbvideo_NewFrame()
+ *
+ * History:
+ * 29-Mar-00 Added copying of previous frame into the current one.
+ * 6-Aug-00 Added model 3 video sizes, removed redundant width, height.
+ */
+static int usbvideo_NewFrame(struct uvd *uvd, int framenum)
+{
+ struct usbvideo_frame *frame;
+ int n;
+
+ if (uvd->debug > 1)
+ info("usbvideo_NewFrame($%p,%d.)", uvd, framenum);
+
+ /* If we're not grabbing a frame right now and the other frame is */
+ /* ready to be grabbed into, then use it instead */
+ if (uvd->curframe != -1)
+ return 0;
+
+ /* If necessary we adjust picture settings between frames */
+ if (!uvd->settingsAdjusted) {
+ if (VALID_CALLBACK(uvd, adjustPicture))
+ GET_CALLBACK(uvd, adjustPicture)(uvd);
+ uvd->settingsAdjusted = 1;
+ }
+
+ n = (framenum + 1) % USBVIDEO_NUMFRAMES;
+ if (uvd->frame[n].frameState == FrameState_Ready)
+ framenum = n;
+
+ frame = &uvd->frame[framenum];
+
+ frame->frameState = FrameState_Grabbing;
+ frame->scanstate = ScanState_Scanning;
+ frame->seqRead_Length = 0; /* Accumulated in xxx_parse_data() */
+ frame->deinterlace = Deinterlace_None;
+ frame->flags = 0; /* No flags yet, up to minidriver (or us) to set them */
+ uvd->curframe = framenum;
+
+ /*
+ * Normally we would want to copy previous frame into the current one
+ * before we even start filling it with data; this allows us to stop
+ * filling at any moment; top portion of the frame will be new and
+ * bottom portion will stay as it was in previous frame. If we don't
+ * do that then missing chunks of video stream will result in flickering
+ * portions of old data whatever it was before.
+ *
+ * If we choose not to copy previous frame (to, for example, save few
+ * bus cycles - the frame can be pretty large!) then we have an option
+ * to clear the frame before using. If we experience losses in this
+ * mode then missing picture will be black (no flickering).
+ *
+ * Finally, if user chooses not to clean the current frame before
+ * filling it with data then the old data will be visible if we fail
+ * to refill entire frame with new data.
+ */
+ if (!(uvd->flags & FLAGS_SEPARATE_FRAMES)) {
+ /* This copies previous frame into this one to mask losses */
+ int prev = (framenum - 1 + USBVIDEO_NUMFRAMES) % USBVIDEO_NUMFRAMES;
+ memmove(frame->data, uvd->frame[prev].data, uvd->max_frame_size);
+ } else {
+ if (uvd->flags & FLAGS_CLEAN_FRAMES) {
+ /* This provides a "clean" frame but slows things down */
+ memset(frame->data, 0, uvd->max_frame_size);
+ }
+ }
+ return 0;
+}
+
+/*
+ * usbvideo_CollectRawData()
+ *
+ * This procedure can be used instead of 'processData' callback if you
+ * only want to dump the raw data from the camera into the output
+ * device (frame buffer). You can look at it with V4L client, but the
+ * image will be unwatchable. The main purpose of this code and of the
+ * mode FLAGS_NO_DECODING is debugging and capturing of datastreams from
+ * new, unknown cameras. This procedure will be automatically invoked
+ * instead of the specified callback handler when uvd->flags has bit
+ * FLAGS_NO_DECODING set. Therefore, any regular build of any driver
+ * based on usbvideo can use this feature at any time.
+ */
+static void usbvideo_CollectRawData(struct uvd *uvd, struct usbvideo_frame *frame)
+{
+ int n;
+
+ assert(uvd != NULL);
+ assert(frame != NULL);
+
+ /* Try to move data from queue into frame buffer */
+ n = RingQueue_GetLength(&uvd->dp);
+ if (n > 0) {
+ int m;
+ /* See how much space we have left */
+ m = uvd->max_frame_size - frame->seqRead_Length;
+ if (n > m)
+ n = m;
+ /* Now move that much data into frame buffer */
+ RingQueue_Dequeue(
+ &uvd->dp,
+ frame->data + frame->seqRead_Length,
+ m);
+ frame->seqRead_Length += m;
+ }
+ /* See if we filled the frame */
+ if (frame->seqRead_Length >= uvd->max_frame_size) {
+ frame->frameState = FrameState_Done;
+ uvd->curframe = -1;
+ uvd->stats.frame_num++;
+ }
+}
+
+static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
+{
+ struct usbvideo_frame *frame = &uvd->frame[frameNum];
+
+ if (uvd->debug >= 2)
+ info("%s($%p,%d.)", __FUNCTION__, uvd, frameNum);
+
+ switch (frame->frameState) {
+ case FrameState_Unused:
+ if (uvd->debug >= 2)
+ info("%s: FrameState_Unused", __FUNCTION__);
+ return -EINVAL;
+ case FrameState_Ready:
+ case FrameState_Grabbing:
+ case FrameState_Error:
+ {
+ int ntries, signalPending;
+ redo:
+ if (!CAMERA_IS_OPERATIONAL(uvd)) {
+ if (uvd->debug >= 2)
+ info("%s: Camera is not operational (1)", __FUNCTION__);
+ return -EIO;
+ }
+ ntries = 0;
+ do {
+ RingQueue_InterruptibleSleepOn(&uvd->dp);
+ signalPending = signal_pending(current);
+ if (!CAMERA_IS_OPERATIONAL(uvd)) {
+ if (uvd->debug >= 2)
+ info("%s: Camera is not operational (2)", __FUNCTION__);
+ return -EIO;
+ }
+ assert(uvd->fbuf != NULL);
+ if (signalPending) {
+ if (uvd->debug >= 2)
+ info("%s: Signal=$%08x", __FUNCTION__, signalPending);
+ if (uvd->flags & FLAGS_RETRY_VIDIOCSYNC) {
+ usbvideo_TestPattern(uvd, 1, 0);
+ uvd->curframe = -1;
+ uvd->stats.frame_num++;
+ if (uvd->debug >= 2)
+ info("%s: Forced test pattern screen", __FUNCTION__);
+ return 0;
+ } else {
+ /* Standard answer: Interrupted! */
+ if (uvd->debug >= 2)
+ info("%s: Interrupted!", __FUNCTION__);
+ return -EINTR;
+ }
+ } else {
+ /* No signals - we just got new data in dp queue */
+ if (uvd->flags & FLAGS_NO_DECODING)
+ usbvideo_CollectRawData(uvd, frame);
+ else if (VALID_CALLBACK(uvd, processData))
+ GET_CALLBACK(uvd, processData)(uvd, frame);
+ else
+ err("%s: processData not set", __FUNCTION__);
+ }
+ } while (frame->frameState == FrameState_Grabbing);
+ if (uvd->debug >= 2) {
+ info("%s: Grabbing done; state=%d. (%lu. bytes)",
+ __FUNCTION__, frame->frameState, frame->seqRead_Length);
+ }
+ if (frame->frameState == FrameState_Error) {
+ int ret = usbvideo_NewFrame(uvd, frameNum);
+ if (ret < 0) {
+ err("%s: usbvideo_NewFrame() failed (%d.)", __FUNCTION__, ret);
+ return ret;
+ }
+ goto redo;
+ }
+ /* Note that we fall through to meet our destiny below */
+ }
+ case FrameState_Done:
+ /*
+ * Do all necessary postprocessing of data prepared in
+ * "interrupt" code and the collecting code above. The
+ * frame gets marked as FrameState_Done by queue parsing code.
+ * This status means that we collected enough data and
+ * most likely processed it as we went through. However
+ * the data may need postprocessing, such as deinterlacing
+ * or picture adjustments implemented in software (horror!)
+ *
+ * As soon as the frame becomes "final" it gets promoted to
+ * FrameState_Done_Hold status where it will remain until the
+ * caller consumed all the video data from the frame. Then
+ * the empty shell of ex-frame is thrown out for dogs to eat.
+ * But we, worried about pets, will recycle the frame!
+ */
+ uvd->stats.frame_num++;
+ if ((uvd->flags & FLAGS_NO_DECODING) == 0) {
+ if (VALID_CALLBACK(uvd, postProcess))
+ GET_CALLBACK(uvd, postProcess)(uvd, frame);
+ if (frame->flags & USBVIDEO_FRAME_FLAG_SOFTWARE_CONTRAST)
+ usbvideo_SoftwareContrastAdjustment(uvd, frame);
+ }
+ frame->frameState = FrameState_Done_Hold;
+ if (uvd->debug >= 2)
+ info("%s: Entered FrameState_Done_Hold state.", __FUNCTION__);
+ return 0;
+
+ case FrameState_Done_Hold:
+ /*
+ * We stay in this state indefinitely until someone external,
+ * like ioctl() or read() call finishes digesting the frame
+ * data. Then it will mark the frame as FrameState_Unused and
+ * it will be released back into the wild to roam freely.
+ */
+ if (uvd->debug >= 2)
+ info("%s: FrameState_Done_Hold state.", __FUNCTION__);
+ return 0;
+ }
+
+ /* Catch-all for other cases. We shall not be here. */
+ err("%s: Invalid state %d.", __FUNCTION__, frame->frameState);
+ frame->frameState = FrameState_Unused;
+ return 0;
+}
+
+/*
+ * usbvideo_DeinterlaceFrame()
+ *
+ * This procedure deinterlaces the given frame. Some cameras produce
+ * only half of scanlines - sometimes only even lines, sometimes only
+ * odd lines. The deinterlacing method is stored in frame->deinterlace
+ * variable.
+ *
+ * Here we scan the frame vertically and replace missing scanlines with
+ * average between surrounding ones - before and after. If we have no
+ * line above then we just copy next line. Similarly, if we need to
+ * create a last line then preceding line is used.
+ */
+void usbvideo_DeinterlaceFrame(struct uvd *uvd, struct usbvideo_frame *frame)
+{
+ if ((uvd == NULL) || (frame == NULL))
+ return;
+
+ if ((frame->deinterlace == Deinterlace_FillEvenLines) ||
+ (frame->deinterlace == Deinterlace_FillOddLines))
+ {
+ const int v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
+ int i = (frame->deinterlace == Deinterlace_FillEvenLines) ? 0 : 1;
+
+ for (; i < VIDEOSIZE_Y(frame->request); i += 2) {
+ const unsigned char *fs1, *fs2;
+ unsigned char *fd;
+ int ip, in, j; /* Previous and next lines */
+
+ /*
+ * Need to average lines before and after 'i'.
+ * If we go out of bounds seeking those lines then
+ * we point back to existing line.
+ */
+ ip = i - 1; /* First, get rough numbers */
+ in = i + 1;
+
+ /* Now validate */
+ if (ip < 0)
+ ip = in;
+ if (in >= VIDEOSIZE_Y(frame->request))
+ in = ip;
+
+ /* Sanity check */
+ if ((ip < 0) || (in < 0) ||
+ (ip >= VIDEOSIZE_Y(frame->request)) ||
+ (in >= VIDEOSIZE_Y(frame->request)))
+ {
+ err("Error: ip=%d. in=%d. req.height=%ld.",
+ ip, in, VIDEOSIZE_Y(frame->request));
+ break;
+ }
+
+ /* Now we need to average lines 'ip' and 'in' to produce line 'i' */
+ fs1 = frame->data + (v4l_linesize * ip);
+ fs2 = frame->data + (v4l_linesize * in);
+ fd = frame->data + (v4l_linesize * i);
+
+ /* Average lines around destination */
+ for (j=0; j < v4l_linesize; j++) {
+ fd[j] = (unsigned char)((((unsigned) fs1[j]) +
+ ((unsigned)fs2[j])) >> 1);
+ }
+ }
+ }
+
+ /* Optionally display statistics on the screen */
+ if (uvd->flags & FLAGS_OVERLAY_STATS)
+ usbvideo_OverlayStats(uvd, frame);
+}
+
+EXPORT_SYMBOL(usbvideo_DeinterlaceFrame);
+
+/*
+ * usbvideo_SoftwareContrastAdjustment()
+ *
+ * This code adjusts the contrast of the frame, assuming RGB24 format.
+ * As most software image processing, this job is CPU-intensive.
+ * Get a camera that supports hardware adjustment!
+ *
+ * History:
+ * 09-Feb-2001 Created.
+ */
+static void usbvideo_SoftwareContrastAdjustment(struct uvd *uvd,
+ struct usbvideo_frame *frame)
+{
+ int i, j, v4l_linesize;
+ signed long adj;
+ const int ccm = 128; /* Color correction median - see below */
+
+ if ((uvd == NULL) || (frame == NULL)) {
+ err("%s: Illegal call.", __FUNCTION__);
+ return;
+ }
+ adj = (uvd->vpic.contrast - 0x8000) >> 8; /* -128..+127 = -ccm..+(ccm-1)*/
+ RESTRICT_TO_RANGE(adj, -ccm, ccm+1);
+ if (adj == 0) {
+ /* In rare case of no adjustment */
+ return;
+ }
+ v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
+ for (i=0; i < VIDEOSIZE_Y(frame->request); i++) {
+ unsigned char *fd = frame->data + (v4l_linesize * i);
+ for (j=0; j < v4l_linesize; j++) {
+ signed long v = (signed long) fd[j];
+ /* Magnify up to 2 times, reduce down to zero */
+ v = 128 + ((ccm + adj) * (v - 128)) / ccm;
+ RESTRICT_TO_RANGE(v, 0, 0xFF); /* Must flatten tails */
+ fd[j] = (unsigned char) v;
+ }
+ }
+}
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/media/usbvideo.h b/drivers/usb/media/usbvideo.h
new file mode 100644
index 000000000000..6c390a1f981b
--- /dev/null
+++ b/drivers/usb/media/usbvideo.h
@@ -0,0 +1,393 @@
+/*
+ * 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,
+ * 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.
+ */
+#ifndef usbvideo_h
+#define usbvideo_h
+
+#include <linux/config.h>
+#include <linux/videodev.h>
+#include <linux/usb.h>
+
+/* Most helpful debugging aid */
+#define assert(expr) ((void) ((expr) ? 0 : (err("assert failed at line %d",__LINE__))))
+
+#define USBVIDEO_REPORT_STATS 1 /* Set to 0 to block statistics on close */
+
+/* Bit flags (options) */
+#define FLAGS_RETRY_VIDIOCSYNC (1 << 0)
+#define FLAGS_MONOCHROME (1 << 1)
+#define FLAGS_DISPLAY_HINTS (1 << 2)
+#define FLAGS_OVERLAY_STATS (1 << 3)
+#define FLAGS_FORCE_TESTPATTERN (1 << 4)
+#define FLAGS_SEPARATE_FRAMES (1 << 5)
+#define FLAGS_CLEAN_FRAMES (1 << 6)
+#define FLAGS_NO_DECODING (1 << 7)
+
+/* Bit flags for frames (apply to the frame where they are specified) */
+#define USBVIDEO_FRAME_FLAG_SOFTWARE_CONTRAST (1 << 0)
+
+/* Camera capabilities (maximum) */
+#define CAMERA_URB_FRAMES 32
+#define CAMERA_MAX_ISO_PACKET 1023 /* 1022 actually sent by camera */
+#define FRAMES_PER_DESC (CAMERA_URB_FRAMES)
+#define FRAME_SIZE_PER_DESC (CAMERA_MAX_ISO_PACKET)
+
+/* 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); }
+
+#define V4L_BYTES_PER_PIXEL 3 /* Because we produce RGB24 */
+
+/*
+ * Use this macro to construct constants for different video sizes.
+ * We have to deal with different video sizes that have to be
+ * configured in the device or compared against when we receive
+ * a data. Normally one would define a bunch of VIDEOSIZE_x_by_y
+ * #defines and that's the end of story. However this solution
+ * does not allow to convert between real pixel sizes and the
+ * constant (integer) value that may be used to tag a frame or
+ * whatever. The set of macros below constructs videosize constants
+ * from the pixel size and allows to reconstruct the pixel size
+ * from the combined value later.
+ */
+#define VIDEOSIZE(x,y) (((x) & 0xFFFFL) | (((y) & 0xFFFFL) << 16))
+#define VIDEOSIZE_X(vs) ((vs) & 0xFFFFL)
+#define VIDEOSIZE_Y(vs) (((vs) >> 16) & 0xFFFFL)
+typedef unsigned long videosize_t;
+
+/*
+ * This macro checks if the camera is still operational. The 'uvd'
+ * pointer must be valid, uvd->dev must be valid, we are not
+ * removing the device and the device has not erred on us.
+ */
+#define CAMERA_IS_OPERATIONAL(uvd) (\
+ (uvd != NULL) && \
+ ((uvd)->dev != NULL) && \
+ ((uvd)->last_error == 0) && \
+ (!(uvd)->remove_pending))
+
+/*
+ * We use macros to do YUV -> RGB conversion because this is
+ * very important for speed and totally unimportant for size.
+ *
+ * YUV -> RGB Conversion
+ * ---------------------
+ *
+ * B = 1.164*(Y-16) + 2.018*(V-128)
+ * G = 1.164*(Y-16) - 0.813*(U-128) - 0.391*(V-128)
+ * R = 1.164*(Y-16) + 1.596*(U-128)
+ *
+ * If you fancy integer arithmetics (as you should), hear this:
+ *
+ * 65536*B = 76284*(Y-16) + 132252*(V-128)
+ * 65536*G = 76284*(Y-16) - 53281*(U-128) - 25625*(V-128)
+ * 65536*R = 76284*(Y-16) + 104595*(U-128)
+ *
+ * Make sure the output values are within [0..255] range.
+ */
+#define LIMIT_RGB(x) (((x) < 0) ? 0 : (((x) > 255) ? 255 : (x)))
+#define YUV_TO_RGB_BY_THE_BOOK(my,mu,mv,mr,mg,mb) { \
+ int mm_y, mm_yc, mm_u, mm_v, mm_r, mm_g, mm_b; \
+ mm_y = (my) - 16; \
+ mm_u = (mu) - 128; \
+ mm_v = (mv) - 128; \
+ mm_yc= mm_y * 76284; \
+ mm_b = (mm_yc + 132252*mm_v ) >> 16; \
+ mm_g = (mm_yc - 53281*mm_u - 25625*mm_v ) >> 16; \
+ mm_r = (mm_yc + 104595*mm_u ) >> 16; \
+ mb = LIMIT_RGB(mm_b); \
+ mg = LIMIT_RGB(mm_g); \
+ mr = LIMIT_RGB(mm_r); \
+}
+
+#define RING_QUEUE_SIZE (128*1024) /* Must be a power of 2 */
+#define RING_QUEUE_ADVANCE_INDEX(rq,ind,n) (rq)->ind = ((rq)->ind + (n)) & ((rq)->length-1)
+#define RING_QUEUE_DEQUEUE_BYTES(rq,n) RING_QUEUE_ADVANCE_INDEX(rq,ri,n)
+#define RING_QUEUE_PEEK(rq,ofs) ((rq)->queue[((ofs) + (rq)->ri) & ((rq)->length-1)])
+
+struct RingQueue {
+ unsigned char *queue; /* Data from the Isoc data pump */
+ int length; /* How many bytes allocated for the queue */
+ int wi; /* That's where we write */
+ int ri; /* Read from here until you hit write index */
+ wait_queue_head_t wqh; /* Processes waiting */
+};
+
+enum ScanState {
+ ScanState_Scanning, /* Scanning for header */
+ ScanState_Lines /* Parsing lines */
+};
+
+/* Completion states of the data parser */
+enum ParseState {
+ scan_Continue, /* Just parse next item */
+ scan_NextFrame, /* Frame done, send it to V4L */
+ scan_Out, /* Not enough data for frame */
+ scan_EndParse /* End parsing */
+};
+
+enum FrameState {
+ FrameState_Unused, /* Unused (no MCAPTURE) */
+ FrameState_Ready, /* Ready to start grabbing */
+ FrameState_Grabbing, /* In the process of being grabbed into */
+ FrameState_Done, /* Finished grabbing, but not been synced yet */
+ FrameState_Done_Hold, /* Are syncing or reading */
+ FrameState_Error, /* Something bad happened while processing */
+};
+
+/*
+ * Some frames may contain only even or odd lines. This type
+ * specifies what type of deinterlacing is required.
+ */
+enum Deinterlace {
+ Deinterlace_None=0,
+ Deinterlace_FillOddLines,
+ Deinterlace_FillEvenLines
+};
+
+#define USBVIDEO_NUMFRAMES 2 /* How many frames we work with */
+#define USBVIDEO_NUMSBUF 2 /* How many URBs linked in a ring */
+
+/* This structure represents one Isoc request - URB and buffer */
+struct usbvideo_sbuf {
+ char *data;
+ struct urb *urb;
+};
+
+struct usbvideo_frame {
+ char *data; /* Frame buffer */
+ unsigned long header; /* Significant bits from the header */
+
+ videosize_t canvas; /* The canvas (max. image) allocated */
+ videosize_t request; /* That's what the application asked for */
+ unsigned short palette; /* The desired format */
+
+ enum FrameState frameState;/* State of grabbing */
+ enum ScanState scanstate; /* State of scanning */
+ enum Deinterlace deinterlace;
+ int flags; /* USBVIDEO_FRAME_FLAG_xxx bit flags */
+
+ int curline; /* Line of frame we're working on */
+
+ long seqRead_Length; /* Raw data length of frame */
+ long seqRead_Index; /* Amount of data that has been already read */
+
+ void *user; /* Additional data that user may need */
+};
+
+/* Statistics that can be overlaid on screen */
+struct usbvideo_statistics {
+ unsigned long frame_num; /* Sequential number of the frame */
+ unsigned long urb_count; /* How many URBs we received so far */
+ unsigned long urb_length; /* Length of last URB */
+ unsigned long data_count; /* How many bytes we received */
+ unsigned long header_count; /* How many frame headers we found */
+ unsigned long iso_skip_count; /* How many empty ISO packets received */
+ unsigned long iso_err_count; /* How many bad ISO packets received */
+};
+
+struct usbvideo;
+
+struct uvd {
+ struct video_device vdev; /* Must be the first field! */
+ struct usb_device *dev;
+ struct usbvideo *handle; /* Points back to the struct usbvideo */
+ void *user_data; /* Camera-dependent data */
+ int user_size; /* Size of that camera-dependent data */
+ int debug; /* Debug level for usbvideo */
+ unsigned char iface; /* Video interface number */
+ unsigned char video_endp;
+ unsigned char ifaceAltActive;
+ unsigned char ifaceAltInactive; /* Alt settings */
+ unsigned long flags; /* FLAGS_USBVIDEO_xxx */
+ unsigned long paletteBits; /* Which palettes we accept? */
+ unsigned short defaultPalette; /* What palette to use for read() */
+ struct semaphore lock;
+ int user; /* user count for exclusive use */
+
+ videosize_t videosize; /* Current setting */
+ videosize_t canvas; /* This is the width,height of the V4L canvas */
+ int max_frame_size; /* Bytes in one video frame */
+
+ int uvd_used; /* Is this structure in use? */
+ int streaming; /* Are we streaming Isochronous? */
+ int grabbing; /* Are we grabbing? */
+ int settingsAdjusted; /* Have we adjusted contrast etc.? */
+ int last_error; /* What calamity struck us? */
+
+ char *fbuf; /* Videodev buffer area */
+ int fbuf_size; /* Videodev buffer size */
+
+ int curframe;
+ int iso_packet_len; /* Videomode-dependent, saves bus bandwidth */
+
+ struct RingQueue dp; /* Isoc data pump */
+ struct usbvideo_frame frame[USBVIDEO_NUMFRAMES];
+ struct usbvideo_sbuf sbuf[USBVIDEO_NUMSBUF];
+
+ volatile int remove_pending; /* If set then about to exit */
+
+ struct video_picture vpic, vpic_old; /* Picture settings */
+ struct video_capability vcap; /* Video capabilities */
+ struct video_channel vchan; /* May be used for tuner support */
+ struct usbvideo_statistics stats;
+ char videoName[32]; /* Holds name like "video7" */
+};
+
+/*
+ * usbvideo callbacks (virtual methods). They are set when usbvideo
+ * services are registered. All of these default to NULL, except those
+ * that default to usbvideo-provided methods.
+ */
+struct usbvideo_cb {
+ int (*probe)(struct usb_interface *, const struct usb_device_id *);
+ void (*userFree)(struct uvd *);
+ void (*disconnect)(struct usb_interface *);
+ int (*setupOnOpen)(struct uvd *);
+ void (*videoStart)(struct uvd *);
+ void (*videoStop)(struct uvd *);
+ void (*processData)(struct uvd *, struct usbvideo_frame *);
+ void (*postProcess)(struct uvd *, struct usbvideo_frame *);
+ void (*adjustPicture)(struct uvd *);
+ int (*getFPS)(struct uvd *);
+ int (*overlayHook)(struct uvd *, struct usbvideo_frame *);
+ int (*getFrame)(struct uvd *, int);
+ int (*startDataPump)(struct uvd *uvd);
+ void (*stopDataPump)(struct uvd *uvd);
+ int (*setVideoMode)(struct uvd *uvd, struct video_window *vw);
+};
+
+struct usbvideo {
+ int num_cameras; /* As allocated */
+ struct usb_driver usbdrv; /* Interface to the USB stack */
+ char drvName[80]; /* Driver name */
+ struct semaphore lock; /* Mutex protecting camera structures */
+ struct usbvideo_cb cb; /* Table of callbacks (virtual methods) */
+ struct video_device vdt; /* Video device template */
+ struct uvd *cam; /* Array of camera structures */
+ struct module *md_module; /* Minidriver module */
+};
+
+
+/*
+ * This macro retrieves callback address from the struct uvd object.
+ * No validity checks are done here, so be sure to check the
+ * callback beforehand with VALID_CALLBACK.
+ */
+#define GET_CALLBACK(uvd,cbName) ((uvd)->handle->cb.cbName)
+
+/*
+ * This macro returns either callback pointer or NULL. This is safe
+ * macro, meaning that most of components of data structures involved
+ * may be NULL - this only results in NULL being returned. You may
+ * wish to use this macro to make sure that the callback is callable.
+ * However keep in mind that those checks take time.
+ */
+#define VALID_CALLBACK(uvd,cbName) ((((uvd) != NULL) && \
+ ((uvd)->handle != NULL)) ? GET_CALLBACK(uvd,cbName) : NULL)
+
+int RingQueue_Dequeue(struct RingQueue *rq, unsigned char *dst, int len);
+int RingQueue_Enqueue(struct RingQueue *rq, const unsigned char *cdata, int n);
+void RingQueue_WakeUpInterruptible(struct RingQueue *rq);
+void RingQueue_Flush(struct RingQueue *rq);
+
+static inline int RingQueue_GetLength(const struct RingQueue *rq)
+{
+ return (rq->wi - rq->ri + rq->length) & (rq->length-1);
+}
+
+static inline int RingQueue_GetFreeSpace(const struct RingQueue *rq)
+{
+ return rq->length - RingQueue_GetLength(rq);
+}
+
+void usbvideo_DrawLine(
+ struct usbvideo_frame *frame,
+ int x1, int y1,
+ int x2, int y2,
+ unsigned char cr, unsigned char cg, unsigned char cb);
+void usbvideo_HexDump(const unsigned char *data, int len);
+void usbvideo_SayAndWait(const char *what);
+void usbvideo_TestPattern(struct uvd *uvd, int fullframe, int pmode);
+
+/* Memory allocation routines */
+unsigned long usbvideo_kvirt_to_pa(unsigned long adr);
+
+int usbvideo_register(
+ struct usbvideo **pCams,
+ const int num_cams,
+ const int num_extra,
+ const char *driverName,
+ const struct usbvideo_cb *cbTable,
+ struct module *md,
+ const struct usb_device_id *id_table);
+struct uvd *usbvideo_AllocateDevice(struct usbvideo *cams);
+int usbvideo_RegisterVideoDevice(struct uvd *uvd);
+void usbvideo_Deregister(struct usbvideo **uvt);
+
+int usbvideo_v4l_initialize(struct video_device *dev);
+
+void usbvideo_DeinterlaceFrame(struct uvd *uvd, struct usbvideo_frame *frame);
+
+/*
+ * This code performs bounds checking - use it when working with
+ * new formats, or else you may get oopses all over the place.
+ * If pixel falls out of bounds then it gets shoved back (as close
+ * to place of offence as possible) and is painted bright red.
+ *
+ * There are two important concepts: frame width, height and
+ * V4L canvas width, height. The former is the area requested by
+ * the application -for this very frame-. The latter is the largest
+ * possible frame that we can serve (we advertise that via V4L ioctl).
+ * The frame data is expected to be formatted as lines of length
+ * VIDEOSIZE_X(fr->request), total VIDEOSIZE_Y(frame->request) lines.
+ */
+static inline void RGB24_PUTPIXEL(
+ struct usbvideo_frame *fr,
+ int ix, int iy,
+ unsigned char vr,
+ unsigned char vg,
+ unsigned char vb)
+{
+ register unsigned char *pf;
+ int limiter = 0, mx, my;
+ mx = ix;
+ my = iy;
+ if (mx < 0) {
+ mx=0;
+ limiter++;
+ } else if (mx >= VIDEOSIZE_X((fr)->request)) {
+ mx= VIDEOSIZE_X((fr)->request) - 1;
+ limiter++;
+ }
+ if (my < 0) {
+ my = 0;
+ limiter++;
+ } else if (my >= VIDEOSIZE_Y((fr)->request)) {
+ my = VIDEOSIZE_Y((fr)->request) - 1;
+ limiter++;
+ }
+ pf = (fr)->data + V4L_BYTES_PER_PIXEL*((iy)*VIDEOSIZE_X((fr)->request) + (ix));
+ if (limiter) {
+ *pf++ = 0;
+ *pf++ = 0;
+ *pf++ = 0xFF;
+ } else {
+ *pf++ = (vb);
+ *pf++ = (vg);
+ *pf++ = (vr);
+ }
+}
+
+#endif /* usbvideo_h */
diff --git a/drivers/usb/media/vicam.c b/drivers/usb/media/vicam.c
new file mode 100644
index 000000000000..4a5857c53f11
--- /dev/null
+++ b/drivers/usb/media/vicam.c
@@ -0,0 +1,1409 @@
+/*
+ * USB ViCam WebCam driver
+ * Copyright (c) 2002 Joe Burks (jburks@wavicle.org),
+ * Christopher L Cheney (ccheney@cheney.cx),
+ * Pavel Machek (pavel@suse.cz),
+ * John Tyner (jtyner@cs.ucr.edu),
+ * Monroe Williams (monroe@pobox.com)
+ *
+ * Supports 3COM HomeConnect PC Digital WebCam
+ *
+ * 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.
+ *
+ * This source code is based heavily on the CPiA webcam driver which was
+ * written by Peter Pregler, Scott J. Bertin and Johannes Erdfelt
+ *
+ * Portions of this code were also copied from usbvideo.c
+ *
+ * Special thanks to the the whole team at Sourceforge for help making
+ * this driver become a reality. Notably:
+ * Andy Armstrong who reverse engineered the color encoding and
+ * Pavel Machek and Chris Cheney who worked on reverse engineering the
+ * camera controls and wrote the first generation driver.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/videodev.h>
+#include <linux/usb.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+#include <linux/proc_fs.h>
+#include "usbvideo.h"
+
+// #define VICAM_DEBUG
+
+#ifdef VICAM_DEBUG
+#define ADBG(lineno,fmt,args...) printk(fmt, jiffies, __FUNCTION__, lineno, ##args)
+#define DBG(fmt,args...) ADBG((__LINE__),KERN_DEBUG __FILE__"(%ld):%s (%d):"fmt,##args)
+#else
+#define DBG(fmn,args...) do {} while(0)
+#endif
+
+#define DRIVER_AUTHOR "Joe Burks, jburks@wavicle.org"
+#define DRIVER_DESC "ViCam WebCam Driver"
+
+/* Define these values to match your device */
+#define USB_VICAM_VENDOR_ID 0x04c1
+#define USB_VICAM_PRODUCT_ID 0x009d
+
+#define VICAM_BYTES_PER_PIXEL 3
+#define VICAM_MAX_READ_SIZE (512*242+128)
+#define VICAM_MAX_FRAME_SIZE (VICAM_BYTES_PER_PIXEL*320*240)
+#define VICAM_FRAMES 2
+
+#define VICAM_HEADER_SIZE 64
+
+#define clamp( x, l, h ) max_t( __typeof__( x ), \
+ ( l ), \
+ min_t( __typeof__( x ), \
+ ( h ), \
+ ( x ) ) )
+
+/* Not sure what all the bytes in these char
+ * arrays do, but they're necessary to make
+ * the camera work.
+ */
+
+static unsigned char setup1[] = {
+ 0xB6, 0xC3, 0x1F, 0x00, 0x02, 0x64, 0xE7, 0x67,
+ 0xFD, 0xFF, 0x0E, 0xC0, 0xE7, 0x09, 0xDE, 0x00,
+ 0x8E, 0x00, 0xC0, 0x09, 0x40, 0x03, 0xC0, 0x17,
+ 0x44, 0x03, 0x4B, 0xAF, 0xC0, 0x07, 0x00, 0x00,
+ 0x4B, 0xAF, 0x97, 0xCF, 0x00, 0x00
+};
+
+static unsigned char setup2[] = {
+ 0xB6, 0xC3, 0x03, 0x00, 0x03, 0x64, 0x18, 0x00,
+ 0x00, 0x00
+};
+
+static unsigned char setup3[] = {
+ 0xB6, 0xC3, 0x01, 0x00, 0x06, 0x64, 0x00, 0x00
+};
+
+static unsigned char setup4[] = {
+ 0xB6, 0xC3, 0x8F, 0x06, 0x02, 0x64, 0xE7, 0x07,
+ 0x00, 0x00, 0x08, 0xC0, 0xE7, 0x07, 0x00, 0x00,
+ 0x3E, 0xC0, 0xE7, 0x07, 0x54, 0x01, 0xAA, 0x00,
+ 0xE7, 0x07, 0xC8, 0x05, 0xB6, 0x00, 0xE7, 0x07,
+ 0x42, 0x01, 0xD2, 0x00, 0xE7, 0x07, 0x7C, 0x00,
+ 0x16, 0x00, 0xE7, 0x07, 0x56, 0x00, 0x18, 0x00,
+ 0xE7, 0x07, 0x06, 0x00, 0x92, 0xC0, 0xE7, 0x07,
+ 0x00, 0x00, 0x1E, 0xC0, 0xE7, 0x07, 0xFF, 0xFF,
+ 0x22, 0xC0, 0xE7, 0x07, 0x04, 0x00, 0x24, 0xC0,
+ 0xE7, 0x07, 0xEC, 0x27, 0x28, 0xC0, 0xE7, 0x07,
+ 0x16, 0x01, 0x8E, 0x00, 0xE7, 0x87, 0x01, 0x00,
+ 0x0E, 0xC0, 0x97, 0xCF, 0xD7, 0x09, 0x00, 0xC0,
+ 0xE7, 0x77, 0x01, 0x00, 0x92, 0xC0, 0x09, 0xC1,
+ 0xE7, 0x09, 0xFE, 0x05, 0x24, 0x01, 0xE7, 0x09,
+ 0x04, 0x06, 0x26, 0x01, 0xE7, 0x07, 0x07, 0x00,
+ 0x92, 0xC0, 0xE7, 0x05, 0x00, 0xC0, 0xC0, 0xDF,
+ 0x97, 0xCF, 0x17, 0x00, 0x57, 0x00, 0x17, 0x02,
+ 0xD7, 0x09, 0x00, 0xC0, 0xE7, 0x77, 0x01, 0x00,
+ 0x92, 0xC0, 0x0A, 0xC1, 0xE7, 0x57, 0xFF, 0xFF,
+ 0xFA, 0x05, 0x0D, 0xC0, 0xE7, 0x57, 0x00, 0x00,
+ 0xFA, 0x05, 0x0F, 0xC0, 0x9F, 0xAF, 0xC6, 0x00,
+ 0xE7, 0x05, 0x00, 0xC0, 0xC8, 0x05, 0xC1, 0x05,
+ 0xC0, 0x05, 0xC0, 0xDF, 0x97, 0xCF, 0x27, 0xDA,
+ 0xFA, 0x05, 0xEF, 0x07, 0x01, 0x00, 0x0B, 0x06,
+ 0x73, 0xCF, 0x9F, 0xAF, 0x78, 0x01, 0x9F, 0xAF,
+ 0x1A, 0x03, 0x6E, 0xCF, 0xE7, 0x09, 0xFC, 0x05,
+ 0x24, 0x01, 0xE7, 0x09, 0x02, 0x06, 0x26, 0x01,
+ 0xE7, 0x07, 0x07, 0x00, 0x92, 0xC0, 0xE7, 0x09,
+ 0xFC, 0x05, 0xFE, 0x05, 0xE7, 0x09, 0x02, 0x06,
+ 0x04, 0x06, 0xE7, 0x09, 0x00, 0x06, 0xFC, 0x05,
+ 0xE7, 0x09, 0xFE, 0x05, 0x00, 0x06, 0x27, 0xDA,
+ 0xFA, 0x05, 0xE7, 0x57, 0x01, 0x00, 0xFA, 0x05,
+ 0x02, 0xCA, 0x04, 0xC0, 0x97, 0xCF, 0x9F, 0xAF,
+ 0x66, 0x05, 0x97, 0xCF, 0xE7, 0x07, 0x40, 0x00,
+ 0x02, 0x06, 0xC8, 0x09, 0xFC, 0x05, 0x9F, 0xAF,
+ 0xDA, 0x02, 0x97, 0xCF, 0xCF, 0x17, 0x02, 0x00,
+ 0xEF, 0x57, 0x81, 0x00, 0x09, 0x06, 0x9F, 0xA0,
+ 0xB6, 0x01, 0xEF, 0x57, 0x80, 0x00, 0x09, 0x06,
+ 0x9F, 0xA0, 0x40, 0x02, 0xEF, 0x57, 0x01, 0x00,
+ 0x0B, 0x06, 0x9F, 0xA0, 0x46, 0x03, 0xE7, 0x07,
+ 0x01, 0x00, 0x0A, 0xC0, 0x46, 0xAF, 0x47, 0xAF,
+ 0x9F, 0xAF, 0x40, 0x02, 0xE7, 0x07, 0x2E, 0x00,
+ 0x0A, 0xC0, 0xEF, 0x87, 0x80, 0x00, 0x09, 0x06,
+ 0x97, 0xCF, 0x00, 0x0E, 0x01, 0x00, 0xC0, 0x57,
+ 0x51, 0x00, 0x9F, 0xC0, 0x9E, 0x02, 0xC0, 0x57,
+ 0x50, 0x00, 0x20, 0xC0, 0xC0, 0x57, 0x55, 0x00,
+ 0x12, 0xC0, 0xC0, 0x57, 0x56, 0x00, 0x9F, 0xC0,
+ 0x72, 0x02, 0x9F, 0xCF, 0xD6, 0x02, 0xC1, 0x0B,
+ 0x08, 0x06, 0x01, 0xD0, 0x6F, 0x90, 0x08, 0x06,
+ 0xC0, 0x07, 0x08, 0x00, 0xC1, 0x0B, 0x08, 0x06,
+ 0x9F, 0xAF, 0x28, 0x05, 0x97, 0xCF, 0x2F, 0x0E,
+ 0x02, 0x00, 0x08, 0x06, 0xC0, 0x07, 0x08, 0x00,
+ 0xC1, 0x0B, 0x08, 0x06, 0x9F, 0xAF, 0x28, 0x05,
+ 0x9F, 0xCF, 0xD6, 0x02, 0x2F, 0x0E, 0x02, 0x00,
+ 0x09, 0x06, 0xEF, 0x87, 0x80, 0x00, 0x09, 0x06,
+ 0x9F, 0xCF, 0xD6, 0x02, 0xEF, 0x67, 0x7F, 0xFF,
+ 0x09, 0x06, 0xE7, 0x67, 0xFF, 0xFD, 0x22, 0xC0,
+ 0xE7, 0x67, 0xEF, 0xFF, 0x24, 0xC0, 0xE7, 0x87,
+ 0x10, 0x00, 0x28, 0xC0, 0x9F, 0xAF, 0xB8, 0x05,
+ 0xE7, 0x87, 0xE0, 0x21, 0x24, 0xC0, 0x9F, 0xAF,
+ 0xA8, 0x05, 0xE7, 0x87, 0x08, 0x00, 0x24, 0xC0,
+ 0xE7, 0x67, 0xDF, 0xFF, 0x24, 0xC0, 0xC8, 0x07,
+ 0x0A, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xC1, 0x07,
+ 0x01, 0x00, 0x9F, 0xAF, 0x28, 0x05, 0x9F, 0xAF,
+ 0xB8, 0x05, 0xC0, 0x07, 0x9E, 0x00, 0x9F, 0xAF,
+ 0x44, 0x05, 0xE7, 0x67, 0xFF, 0xFE, 0x24, 0xC0,
+ 0xC0, 0x09, 0x20, 0xC0, 0xE7, 0x87, 0x00, 0x01,
+ 0x24, 0xC0, 0xC0, 0x77, 0x00, 0x02, 0x0F, 0xC1,
+ 0xE7, 0x67, 0xF7, 0xFF, 0x24, 0xC0, 0xE7, 0x67,
+ 0xF7, 0xFF, 0x24, 0xC0, 0xE7, 0x87, 0x08, 0x00,
+ 0x24, 0xC0, 0x08, 0xDA, 0x5E, 0xC1, 0xEF, 0x07,
+ 0x80, 0x00, 0x09, 0x06, 0x97, 0xCF, 0xEF, 0x07,
+ 0x01, 0x00, 0x0A, 0x06, 0x97, 0xCF, 0xEF, 0x07,
+ 0x00, 0x00, 0x0B, 0x06, 0xEF, 0x07, 0x00, 0x00,
+ 0x0A, 0x06, 0xEF, 0x67, 0x7F, 0xFF, 0x09, 0x06,
+ 0xEF, 0x07, 0x00, 0x00, 0x0D, 0x06, 0xE7, 0x67,
+ 0xEF, 0xFF, 0x28, 0xC0, 0xE7, 0x67, 0x17, 0xD8,
+ 0x24, 0xC0, 0xE7, 0x07, 0x00, 0x00, 0x1E, 0xC0,
+ 0xE7, 0x07, 0xFF, 0xFF, 0x22, 0xC0, 0x97, 0xCF,
+ 0xC8, 0x07, 0x0E, 0x06, 0x9F, 0xAF, 0xDA, 0x02,
+ 0xE7, 0x07, 0x00, 0x00, 0xF2, 0x05, 0xE7, 0x07,
+ 0x10, 0x00, 0xF6, 0x05, 0xE7, 0x07, 0x0E, 0x06,
+ 0xF4, 0x05, 0xE7, 0x07, 0xD6, 0x02, 0xF8, 0x05,
+ 0xC8, 0x07, 0xF2, 0x05, 0xC1, 0x07, 0x00, 0x80,
+ 0x50, 0xAF, 0x97, 0xCF, 0x2F, 0x0C, 0x02, 0x00,
+ 0x07, 0x06, 0x2F, 0x0C, 0x04, 0x00, 0x06, 0x06,
+ 0xE7, 0x07, 0x00, 0x00, 0xF2, 0x05, 0xE7, 0x07,
+ 0x10, 0x00, 0xF6, 0x05, 0xE7, 0x07, 0xE2, 0x05,
+ 0xF4, 0x05, 0xE7, 0x07, 0xCE, 0x02, 0xF8, 0x05,
+ 0xC8, 0x07, 0xF2, 0x05, 0xC1, 0x07, 0x00, 0x80,
+ 0x51, 0xAF, 0x97, 0xCF, 0x9F, 0xAF, 0x66, 0x04,
+ 0x9F, 0xAF, 0x1A, 0x03, 0x59, 0xAF, 0x97, 0xCF,
+ 0xC0, 0x07, 0x0E, 0x00, 0xC1, 0x0B, 0x0C, 0x06,
+ 0x41, 0xD1, 0x9F, 0xAF, 0x28, 0x05, 0xC0, 0x07,
+ 0x3C, 0x00, 0x9F, 0xAF, 0x44, 0x05, 0x68, 0x00,
+ 0xC0, 0x07, 0x3B, 0x00, 0x9F, 0xAF, 0x44, 0x05,
+ 0x6F, 0x00, 0x0C, 0x06, 0x68, 0x00, 0xE0, 0x07,
+ 0x04, 0x01, 0xE8, 0x0B, 0x0A, 0x06, 0xE8, 0x07,
+ 0x00, 0x00, 0xE0, 0x07, 0x00, 0x02, 0xE0, 0x07,
+ 0xEC, 0x01, 0xE0, 0x07, 0xFC, 0xFF, 0x97, 0xCF,
+ 0xE7, 0x07, 0xFF, 0xFF, 0xFA, 0x05, 0xEF, 0x07,
+ 0x00, 0x00, 0x0B, 0x06, 0xE7, 0x07, 0x0E, 0x06,
+ 0x24, 0x01, 0xE7, 0x07, 0x0E, 0x06, 0xFE, 0x05,
+ 0xE7, 0x07, 0x40, 0x00, 0x26, 0x01, 0xE7, 0x07,
+ 0x40, 0x00, 0x04, 0x06, 0xE7, 0x07, 0x07, 0x00,
+ 0x92, 0xC0, 0x97, 0xCF, 0xEF, 0x07, 0x02, 0x00,
+ 0x0B, 0x06, 0x9F, 0xAF, 0x78, 0x01, 0xEF, 0x77,
+ 0x80, 0x00, 0x07, 0x06, 0x9F, 0xC0, 0x14, 0x04,
+ 0xEF, 0x77, 0x01, 0x00, 0x07, 0x06, 0x37, 0xC0,
+ 0xEF, 0x77, 0x01, 0x00, 0x0D, 0x06, 0x0F, 0xC1,
+ 0xEF, 0x07, 0x01, 0x00, 0x0D, 0x06, 0xC0, 0x07,
+ 0x02, 0x00, 0xC1, 0x07, 0x30, 0x00, 0x9F, 0xAF,
+ 0x28, 0x05, 0xC0, 0x07, 0x01, 0x00, 0xC1, 0x07,
+ 0x02, 0x00, 0x9F, 0xAF, 0x28, 0x05, 0xC8, 0x07,
+ 0xFF, 0x4F, 0x9F, 0xAF, 0xA8, 0x05, 0xC0, 0x07,
+ 0x38, 0x00, 0x9F, 0xAF, 0x44, 0x05, 0xC1, 0x77,
+ 0x03, 0x00, 0x02, 0xC1, 0x08, 0xDA, 0x75, 0xC1,
+ 0xC1, 0x77, 0x01, 0x00, 0x0A, 0xC1, 0xC0, 0x07,
+ 0x01, 0x00, 0xC1, 0x07, 0x02, 0x00, 0x9F, 0xAF,
+ 0x28, 0x05, 0xEF, 0x07, 0x01, 0x00, 0x06, 0x06,
+ 0x2C, 0xCF, 0xC0, 0x07, 0x01, 0x00, 0xC1, 0x07,
+ 0x04, 0x00, 0x9F, 0xAF, 0x28, 0x05, 0xEF, 0x07,
+ 0x00, 0x00, 0x06, 0x06, 0x22, 0xCF, 0xEF, 0x07,
+ 0x00, 0x00, 0x0D, 0x06, 0xEF, 0x57, 0x01, 0x00,
+ 0x06, 0x06, 0x1B, 0xC0, 0xC0, 0x07, 0x01, 0x00,
+ 0xC1, 0x07, 0x01, 0x00, 0x9F, 0xAF, 0x28, 0x05,
+ 0xC0, 0x07, 0x02, 0x00, 0xC1, 0x07, 0x30, 0x00,
+ 0x9F, 0xAF, 0x28, 0x05, 0xC8, 0x07, 0xFF, 0x4F,
+ 0x9F, 0xAF, 0xA8, 0x05, 0xC0, 0x07, 0x38, 0x00,
+ 0x9F, 0xAF, 0x44, 0x05, 0xC1, 0x67, 0x03, 0x00,
+ 0xC1, 0x57, 0x03, 0x00, 0x02, 0xC0, 0x08, 0xDA,
+ 0x73, 0xC1, 0xC0, 0x07, 0x02, 0x00, 0xC1, 0x07,
+ 0x12, 0x00, 0xEF, 0x57, 0x00, 0x00, 0x06, 0x06,
+ 0x02, 0xC0, 0xC1, 0x07, 0x23, 0x00, 0x9F, 0xAF,
+ 0x28, 0x05, 0xC0, 0x07, 0x14, 0x00, 0xC1, 0x0B,
+ 0xEA, 0x05, 0x9F, 0xAF, 0x28, 0x05, 0xC0, 0x07,
+ 0x3E, 0x00, 0x9F, 0xAF, 0x0A, 0x05, 0xE7, 0x09,
+ 0xE4, 0x05, 0xFA, 0x05, 0x27, 0xD8, 0xFA, 0x05,
+ 0xE7, 0x07, 0x0E, 0x06, 0xFC, 0x05, 0xE7, 0x07,
+ 0x4E, 0x06, 0x00, 0x06, 0xE7, 0x07, 0x40, 0x00,
+ 0x02, 0x06, 0x9F, 0xAF, 0x66, 0x05, 0x9F, 0xAF,
+ 0xC6, 0x00, 0x97, 0xCF, 0xC1, 0x0B, 0xE2, 0x05,
+ 0x41, 0xD0, 0x01, 0xD2, 0xC1, 0x17, 0x23, 0x00,
+ 0x9F, 0xAF, 0xDC, 0x04, 0xC0, 0x07, 0x04, 0x00,
+ 0xC1, 0x0B, 0xE3, 0x05, 0x9F, 0xAF, 0x28, 0x05,
+ 0xC0, 0x07, 0x06, 0x00, 0xC1, 0x09, 0xE6, 0x05,
+ 0x9F, 0xAF, 0x28, 0x05, 0xC0, 0x07, 0x07, 0x00,
+ 0xC1, 0x09, 0xE6, 0x05, 0xC1, 0xD1, 0x9F, 0xAF,
+ 0x28, 0x05, 0xC0, 0x07, 0x0B, 0x00, 0xC1, 0x09,
+ 0xE8, 0x05, 0x9F, 0xAF, 0x28, 0x05, 0xC0, 0x07,
+ 0x0C, 0x00, 0xC1, 0x09, 0xE8, 0x05, 0xC1, 0xD1,
+ 0x9F, 0xAF, 0x28, 0x05, 0xC0, 0x07, 0x0D, 0x00,
+ 0xC1, 0x07, 0x09, 0x00, 0x9F, 0xAF, 0x28, 0x05,
+ 0xC0, 0x07, 0x03, 0x00, 0xC1, 0x07, 0x32, 0x00,
+ 0x9F, 0xAF, 0x28, 0x05, 0xC0, 0x07, 0x0F, 0x00,
+ 0xC1, 0x07, 0x00, 0x00, 0x9F, 0xAF, 0x28, 0x05,
+ 0x97, 0xCF, 0xE7, 0x67, 0xFF, 0xD9, 0x24, 0xC0,
+ 0xC8, 0x07, 0x0A, 0x00, 0x40, 0x00, 0xC0, 0x67,
+ 0x00, 0x02, 0x27, 0x80, 0x24, 0xC0, 0xE7, 0x87,
+ 0x00, 0x04, 0x24, 0xC0, 0xE7, 0x67, 0xFF, 0xF9,
+ 0x24, 0xC0, 0x01, 0xD2, 0x08, 0xDA, 0x72, 0xC1,
+ 0xE7, 0x87, 0x00, 0x20, 0x24, 0xC0, 0x97, 0xCF,
+ 0x27, 0x00, 0x1E, 0xC0, 0xE7, 0x87, 0xFF, 0x00,
+ 0x22, 0xC0, 0xE7, 0x67, 0x7F, 0xFF, 0x24, 0xC0,
+ 0xE7, 0x87, 0x80, 0x00, 0x24, 0xC0, 0xE7, 0x87,
+ 0x80, 0x00, 0x24, 0xC0, 0x97, 0xCF, 0x9F, 0xAF,
+ 0x0A, 0x05, 0x67, 0x00, 0x1E, 0xC0, 0xE7, 0x67,
+ 0xBF, 0xFF, 0x24, 0xC0, 0xE7, 0x87, 0x40, 0x00,
+ 0x24, 0xC0, 0xE7, 0x87, 0x40, 0x00, 0x24, 0xC0,
+ 0x97, 0xCF, 0x9F, 0xAF, 0x0A, 0x05, 0xE7, 0x67,
+ 0x00, 0xFF, 0x22, 0xC0, 0xE7, 0x67, 0xFF, 0xFE,
+ 0x24, 0xC0, 0xE7, 0x67, 0xFF, 0xFE, 0x24, 0xC0,
+ 0xC1, 0x09, 0x20, 0xC0, 0xE7, 0x87, 0x00, 0x01,
+ 0x24, 0xC0, 0x97, 0xCF, 0xC0, 0x07, 0x40, 0x00,
+ 0xC8, 0x09, 0xFC, 0x05, 0xE7, 0x67, 0x00, 0xFF,
+ 0x22, 0xC0, 0xE7, 0x67, 0xFF, 0xFE, 0x24, 0xC0,
+ 0xE7, 0x67, 0xBF, 0xFF, 0x24, 0xC0, 0xE7, 0x67,
+ 0xBF, 0xFF, 0x24, 0xC0, 0x00, 0xDA, 0xE8, 0x09,
+ 0x20, 0xC0, 0xE7, 0x87, 0x40, 0x00, 0x24, 0xC0,
+ 0xE7, 0x87, 0x40, 0x00, 0x24, 0xC0, 0x00, 0xDA,
+ 0xE8, 0x09, 0x20, 0xC0, 0x6D, 0xC1, 0xE7, 0x87,
+ 0x00, 0x01, 0x24, 0xC0, 0x97, 0xCF, 0xE7, 0x07,
+ 0x32, 0x00, 0x12, 0xC0, 0xE7, 0x77, 0x00, 0x80,
+ 0x12, 0xC0, 0x7C, 0xC0, 0x97, 0xCF, 0xE7, 0x07,
+ 0x20, 0x4E, 0x12, 0xC0, 0xE7, 0x77, 0x00, 0x80,
+ 0x12, 0xC0, 0x7C, 0xC0, 0x97, 0xCF, 0x09, 0x02,
+ 0x19, 0x00, 0x01, 0x01, 0x00, 0x80, 0x96, 0x09,
+ 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x07, 0x05, 0x81, 0x02, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+static unsigned char setup5[] = {
+ 0xB6, 0xC3, 0x2F, 0x01, 0x03, 0x64, 0x0E, 0x00,
+ 0x14, 0x00, 0x1A, 0x00, 0x20, 0x00, 0x26, 0x00,
+ 0x4A, 0x00, 0x64, 0x00, 0x6A, 0x00, 0x92, 0x00,
+ 0x9A, 0x00, 0xA0, 0x00, 0xB2, 0x00, 0xB8, 0x00,
+ 0xBE, 0x00, 0xC2, 0x00, 0xC8, 0x00, 0xCE, 0x00,
+ 0xDC, 0x00, 0xDA, 0x00, 0xE2, 0x00, 0xE0, 0x00,
+ 0xE8, 0x00, 0xE6, 0x00, 0xEE, 0x00, 0xEC, 0x00,
+ 0xF2, 0x00, 0xF8, 0x00, 0x02, 0x01, 0x0A, 0x01,
+ 0x0E, 0x01, 0x12, 0x01, 0x1E, 0x01, 0x22, 0x01,
+ 0x28, 0x01, 0x2C, 0x01, 0x32, 0x01, 0x36, 0x01,
+ 0x44, 0x01, 0x50, 0x01, 0x5E, 0x01, 0x72, 0x01,
+ 0x76, 0x01, 0x7A, 0x01, 0x80, 0x01, 0x88, 0x01,
+ 0x8C, 0x01, 0x94, 0x01, 0x9C, 0x01, 0xA0, 0x01,
+ 0xA4, 0x01, 0xAA, 0x01, 0xB0, 0x01, 0xB4, 0x01,
+ 0xBA, 0x01, 0xD0, 0x01, 0xDA, 0x01, 0xF6, 0x01,
+ 0xFA, 0x01, 0x02, 0x02, 0x34, 0x02, 0x3C, 0x02,
+ 0x44, 0x02, 0x4A, 0x02, 0x50, 0x02, 0x56, 0x02,
+ 0x74, 0x02, 0x78, 0x02, 0x7E, 0x02, 0x84, 0x02,
+ 0x8A, 0x02, 0x88, 0x02, 0x90, 0x02, 0x8E, 0x02,
+ 0x94, 0x02, 0xA2, 0x02, 0xA8, 0x02, 0xAE, 0x02,
+ 0xB4, 0x02, 0xBA, 0x02, 0xB8, 0x02, 0xC0, 0x02,
+ 0xBE, 0x02, 0xC4, 0x02, 0xD0, 0x02, 0xD4, 0x02,
+ 0xE0, 0x02, 0xE6, 0x02, 0xEE, 0x02, 0xF8, 0x02,
+ 0xFC, 0x02, 0x06, 0x03, 0x1E, 0x03, 0x24, 0x03,
+ 0x28, 0x03, 0x30, 0x03, 0x2E, 0x03, 0x3C, 0x03,
+ 0x4A, 0x03, 0x4E, 0x03, 0x54, 0x03, 0x58, 0x03,
+ 0x5E, 0x03, 0x66, 0x03, 0x6E, 0x03, 0x7A, 0x03,
+ 0x86, 0x03, 0x8E, 0x03, 0x96, 0x03, 0xB2, 0x03,
+ 0xB8, 0x03, 0xC6, 0x03, 0xCC, 0x03, 0xD4, 0x03,
+ 0xDA, 0x03, 0xE8, 0x03, 0xF4, 0x03, 0xFC, 0x03,
+ 0x04, 0x04, 0x20, 0x04, 0x2A, 0x04, 0x32, 0x04,
+ 0x36, 0x04, 0x3E, 0x04, 0x44, 0x04, 0x42, 0x04,
+ 0x48, 0x04, 0x4E, 0x04, 0x4C, 0x04, 0x54, 0x04,
+ 0x52, 0x04, 0x5A, 0x04, 0x5E, 0x04, 0x62, 0x04,
+ 0x68, 0x04, 0x74, 0x04, 0x7C, 0x04, 0x80, 0x04,
+ 0x88, 0x04, 0x8C, 0x04, 0x94, 0x04, 0x9A, 0x04,
+ 0xA2, 0x04, 0xA6, 0x04, 0xAE, 0x04, 0xB4, 0x04,
+ 0xC0, 0x04, 0xCC, 0x04, 0xD8, 0x04, 0x2A, 0x05,
+ 0x46, 0x05, 0x6C, 0x05, 0x00, 0x00
+};
+
+/* rvmalloc / rvfree copied from usbvideo.c
+ *
+ * Not sure why these are not yet non-statics which I can reference through
+ * usbvideo.h the same as it is in 2.4.20. I bet this will get fixed sometime
+ * in the future.
+ *
+*/
+static void *rvmalloc(unsigned long size)
+{
+ void *mem;
+ unsigned long adr;
+
+ size = PAGE_ALIGN(size);
+ mem = vmalloc_32(size);
+ if (!mem)
+ return NULL;
+
+ memset(mem, 0, size); /* Clear the ram out, no junk to the user */
+ adr = (unsigned long) mem;
+ while (size > 0) {
+ SetPageReserved(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) {
+ ClearPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+ vfree(mem);
+}
+
+struct vicam_camera {
+ u16 shutter_speed; // capture shutter speed
+ u16 gain; // capture gain
+
+ u8 *raw_image; // raw data captured from the camera
+ u8 *framebuf; // processed data in RGB24 format
+ u8 *cntrlbuf; // area used to send control msgs
+
+ struct video_device vdev; // v4l video device
+ struct usb_device *udev; // usb device
+
+ /* guard against simultaneous accesses to the camera */
+ struct semaphore cam_lock;
+
+ int is_initialized;
+ u8 open_count;
+ u8 bulkEndpoint;
+ int needsDummyRead;
+
+#if defined(CONFIG_VIDEO_PROC_FS)
+ struct proc_dir_entry *proc_dir;
+#endif
+
+};
+
+static int vicam_probe( struct usb_interface *intf, const struct usb_device_id *id);
+static void vicam_disconnect(struct usb_interface *intf);
+static void read_frame(struct vicam_camera *cam, int framenum);
+static void vicam_decode_color(const u8 *, u8 *);
+
+static int __send_control_msg(struct vicam_camera *cam,
+ u8 request,
+ u16 value,
+ u16 index,
+ unsigned char *cp,
+ u16 size)
+{
+ int status;
+
+ /* cp must be memory that has been allocated by kmalloc */
+
+ status = usb_control_msg(cam->udev,
+ usb_sndctrlpipe(cam->udev, 0),
+ request,
+ USB_DIR_OUT | USB_TYPE_VENDOR |
+ USB_RECIP_DEVICE, value, index,
+ cp, size, 1000);
+
+ status = min(status, 0);
+
+ if (status < 0) {
+ printk(KERN_INFO "Failed sending control message, error %d.\n",
+ status);
+ }
+
+ return status;
+}
+
+static int send_control_msg(struct vicam_camera *cam,
+ u8 request,
+ u16 value,
+ u16 index,
+ unsigned char *cp,
+ u16 size)
+{
+ int status = -ENODEV;
+ down(&cam->cam_lock);
+ if (cam->udev) {
+ status = __send_control_msg(cam, request, value,
+ index, cp, size);
+ }
+ up(&cam->cam_lock);
+ return status;
+}
+static int
+initialize_camera(struct vicam_camera *cam)
+{
+ const struct {
+ u8 *data;
+ u32 size;
+ } firmware[] = {
+ { .data = setup1, .size = sizeof(setup1) },
+ { .data = setup2, .size = sizeof(setup2) },
+ { .data = setup3, .size = sizeof(setup3) },
+ { .data = setup4, .size = sizeof(setup4) },
+ { .data = setup5, .size = sizeof(setup5) },
+ { .data = setup3, .size = sizeof(setup3) },
+ { .data = NULL, .size = 0 }
+ };
+
+ int err, i;
+
+ for (i = 0, err = 0; firmware[i].data && !err; i++) {
+ memcpy(cam->cntrlbuf, firmware[i].data, firmware[i].size);
+
+ err = send_control_msg(cam, 0xff, 0, 0,
+ cam->cntrlbuf, firmware[i].size);
+ }
+
+ return err;
+}
+
+static int
+set_camera_power(struct vicam_camera *cam, int state)
+{
+ int status;
+
+ if ((status = send_control_msg(cam, 0x50, state, 0, NULL, 0)) < 0)
+ return status;
+
+ if (state) {
+ send_control_msg(cam, 0x55, 1, 0, NULL, 0);
+ }
+
+ return 0;
+}
+
+static int
+vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsigned long arg)
+{
+ void __user *user_arg = (void __user *)arg;
+ struct vicam_camera *cam = file->private_data;
+ int retval = 0;
+
+ if (!cam)
+ return -ENODEV;
+
+ switch (ioctlnr) {
+ /* query capabilities */
+ case VIDIOCGCAP:
+ {
+ struct video_capability b;
+
+ DBG("VIDIOCGCAP\n");
+ memset(&b, 0, sizeof(b));
+ strcpy(b.name, "ViCam-based Camera");
+ b.type = VID_TYPE_CAPTURE;
+ b.channels = 1;
+ b.audios = 0;
+ b.maxwidth = 320; /* VIDEOSIZE_CIF */
+ b.maxheight = 240;
+ b.minwidth = 320; /* VIDEOSIZE_48_48 */
+ b.minheight = 240;
+
+ if (copy_to_user(user_arg, &b, sizeof(b)))
+ retval = -EFAULT;
+
+ break;
+ }
+ /* get/set video source - we are a camera and nothing else */
+ case VIDIOCGCHAN:
+ {
+ struct video_channel v;
+
+ DBG("VIDIOCGCHAN\n");
+ if (copy_from_user(&v, user_arg, sizeof(v))) {
+ retval = -EFAULT;
+ break;
+ }
+ if (v.channel != 0) {
+ retval = -EINVAL;
+ break;
+ }
+
+ v.channel = 0;
+ strcpy(v.name, "Camera");
+ v.tuners = 0;
+ v.flags = 0;
+ v.type = VIDEO_TYPE_CAMERA;
+ v.norm = 0;
+
+ if (copy_to_user(user_arg, &v, sizeof(v)))
+ retval = -EFAULT;
+ break;
+ }
+
+ case VIDIOCSCHAN:
+ {
+ int v;
+
+ if (copy_from_user(&v, user_arg, sizeof(v)))
+ retval = -EFAULT;
+ DBG("VIDIOCSCHAN %d\n", v);
+
+ if (retval == 0 && v != 0)
+ retval = -EINVAL;
+
+ break;
+ }
+
+ /* image properties */
+ case VIDIOCGPICT:
+ {
+ struct video_picture vp;
+ DBG("VIDIOCGPICT\n");
+ memset(&vp, 0, sizeof (struct video_picture));
+ vp.brightness = cam->gain << 8;
+ vp.depth = 24;
+ vp.palette = VIDEO_PALETTE_RGB24;
+ if (copy_to_user(user_arg, &vp, sizeof (struct video_picture)))
+ retval = -EFAULT;
+ break;
+ }
+
+ case VIDIOCSPICT:
+ {
+ struct video_picture vp;
+
+ if (copy_from_user(&vp, user_arg, sizeof(vp))) {
+ retval = -EFAULT;
+ break;
+ }
+
+ DBG("VIDIOCSPICT depth = %d, pal = %d\n", vp.depth,
+ vp.palette);
+
+ cam->gain = vp.brightness >> 8;
+
+ if (vp.depth != 24
+ || vp.palette != VIDEO_PALETTE_RGB24)
+ retval = -EINVAL;
+
+ break;
+ }
+
+ /* get/set capture window */
+ case VIDIOCGWIN:
+ {
+ struct video_window vw;
+ vw.x = 0;
+ vw.y = 0;
+ vw.width = 320;
+ vw.height = 240;
+ vw.chromakey = 0;
+ vw.flags = 0;
+ vw.clips = NULL;
+ vw.clipcount = 0;
+
+ DBG("VIDIOCGWIN\n");
+
+ if (copy_to_user(user_arg, (void *)&vw, sizeof(vw)))
+ retval = -EFAULT;
+
+ // I'm not sure what the deal with a capture window is, it is very poorly described
+ // in the doc. So I won't support it now.
+ break;
+ }
+
+ case VIDIOCSWIN:
+ {
+
+ struct video_window vw;
+
+ if (copy_from_user(&vw, user_arg, sizeof(vw))) {
+ retval = -EFAULT;
+ break;
+ }
+
+ DBG("VIDIOCSWIN %d x %d\n", vw.width, vw.height);
+
+ if ( vw.width != 320 || vw.height != 240 )
+ retval = -EFAULT;
+
+ break;
+ }
+
+ /* mmap interface */
+ case VIDIOCGMBUF:
+ {
+ struct video_mbuf vm;
+ int i;
+
+ DBG("VIDIOCGMBUF\n");
+ memset(&vm, 0, sizeof (vm));
+ vm.size =
+ VICAM_MAX_FRAME_SIZE * VICAM_FRAMES;
+ vm.frames = VICAM_FRAMES;
+ for (i = 0; i < VICAM_FRAMES; i++)
+ vm.offsets[i] = VICAM_MAX_FRAME_SIZE * i;
+
+ if (copy_to_user(user_arg, (void *)&vm, sizeof(vm)))
+ retval = -EFAULT;
+
+ break;
+ }
+
+ case VIDIOCMCAPTURE:
+ {
+ struct video_mmap vm;
+ // int video_size;
+
+ if (copy_from_user((void *)&vm, user_arg, sizeof(vm))) {
+ retval = -EFAULT;
+ break;
+ }
+
+ DBG("VIDIOCMCAPTURE frame=%d, height=%d, width=%d, format=%d.\n",vm.frame,vm.width,vm.height,vm.format);
+
+ if ( vm.frame >= VICAM_FRAMES || vm.format != VIDEO_PALETTE_RGB24 )
+ retval = -EINVAL;
+
+ // in theory right here we'd start the image capturing
+ // (fill in a bulk urb and submit it asynchronously)
+ //
+ // Instead we're going to do a total hack job for now and
+ // retrieve the frame in VIDIOCSYNC
+
+ break;
+ }
+
+ case VIDIOCSYNC:
+ {
+ int frame;
+
+ if (copy_from_user((void *)&frame, user_arg, sizeof(int))) {
+ retval = -EFAULT;
+ break;
+ }
+ DBG("VIDIOCSYNC: %d\n", frame);
+
+ read_frame(cam, frame);
+ vicam_decode_color(cam->raw_image,
+ cam->framebuf +
+ frame * VICAM_MAX_FRAME_SIZE );
+
+ break;
+ }
+
+ /* pointless to implement overlay with this camera */
+ case VIDIOCCAPTURE:
+ case VIDIOCGFBUF:
+ case VIDIOCSFBUF:
+ case VIDIOCKEY:
+ retval = -EINVAL;
+ break;
+
+ /* tuner interface - we have none */
+ case VIDIOCGTUNER:
+ case VIDIOCSTUNER:
+ case VIDIOCGFREQ:
+ case VIDIOCSFREQ:
+ retval = -EINVAL;
+ break;
+
+ /* audio interface - we have none */
+ case VIDIOCGAUDIO:
+ case VIDIOCSAUDIO:
+ retval = -EINVAL;
+ break;
+ default:
+ retval = -ENOIOCTLCMD;
+ break;
+ }
+
+ return retval;
+}
+
+static int
+vicam_open(struct inode *inode, struct file *file)
+{
+ struct video_device *dev = video_devdata(file);
+ struct vicam_camera *cam =
+ (struct vicam_camera *) dev->priv;
+ DBG("open\n");
+
+ if (!cam) {
+ printk(KERN_ERR
+ "vicam video_device improperly initialized");
+ }
+
+ /* the videodev_lock held above us protects us from
+ * simultaneous opens...for now. we probably shouldn't
+ * rely on this fact forever.
+ */
+
+ if (cam->open_count > 0) {
+ printk(KERN_INFO
+ "vicam_open called on already opened camera");
+ return -EBUSY;
+ }
+
+ cam->raw_image = kmalloc(VICAM_MAX_READ_SIZE, GFP_KERNEL);
+ if (!cam->raw_image) {
+ return -ENOMEM;
+ }
+
+ cam->framebuf = rvmalloc(VICAM_MAX_FRAME_SIZE * VICAM_FRAMES);
+ if (!cam->framebuf) {
+ kfree(cam->raw_image);
+ return -ENOMEM;
+ }
+
+ cam->cntrlbuf = kmalloc(PAGE_SIZE, GFP_KERNEL);
+ if (!cam->cntrlbuf) {
+ kfree(cam->raw_image);
+ rvfree(cam->framebuf, VICAM_MAX_FRAME_SIZE * VICAM_FRAMES);
+ return -ENOMEM;
+ }
+
+ // First upload firmware, then turn the camera on
+
+ if (!cam->is_initialized) {
+ initialize_camera(cam);
+
+ cam->is_initialized = 1;
+ }
+
+ set_camera_power(cam, 1);
+
+ cam->needsDummyRead = 1;
+ cam->open_count++;
+
+ file->private_data = cam;
+
+ return 0;
+}
+
+static int
+vicam_close(struct inode *inode, struct file *file)
+{
+ struct vicam_camera *cam = file->private_data;
+ int open_count;
+ struct usb_device *udev;
+
+ DBG("close\n");
+
+ /* it's not the end of the world if
+ * we fail to turn the camera off.
+ */
+
+ set_camera_power(cam, 0);
+
+ kfree(cam->raw_image);
+ rvfree(cam->framebuf, VICAM_MAX_FRAME_SIZE * VICAM_FRAMES);
+ kfree(cam->cntrlbuf);
+
+ down(&cam->cam_lock);
+
+ cam->open_count--;
+ open_count = cam->open_count;
+ udev = cam->udev;
+
+ up(&cam->cam_lock);
+
+ if (!open_count && !udev) {
+ kfree(cam);
+ }
+
+ return 0;
+}
+
+static void vicam_decode_color(const u8 *data, u8 *rgb)
+{
+ /* vicam_decode_color - Convert from Vicam Y-Cr-Cb to RGB
+ * Copyright (C) 2002 Monroe Williams (monroe@pobox.com)
+ */
+
+ int i, prevY, nextY;
+
+ prevY = 512;
+ nextY = 512;
+
+ data += VICAM_HEADER_SIZE;
+
+ for( i = 0; i < 240; i++, data += 512 ) {
+ const int y = ( i * 242 ) / 240;
+
+ int j, prevX, nextX;
+ int Y, Cr, Cb;
+
+ if ( y == 242 - 1 ) {
+ nextY = -512;
+ }
+
+ prevX = 1;
+ nextX = 1;
+
+ for ( j = 0; j < 320; j++, rgb += 3 ) {
+ const int x = ( j * 512 ) / 320;
+ const u8 * const src = &data[x];
+
+ if ( x == 512 - 1 ) {
+ nextX = -1;
+ }
+
+ Cr = ( src[prevX] - src[0] ) +
+ ( src[nextX] - src[0] );
+ Cr /= 2;
+
+ Cb = ( src[prevY] - src[prevX + prevY] ) +
+ ( src[prevY] - src[nextX + prevY] ) +
+ ( src[nextY] - src[prevX + nextY] ) +
+ ( src[nextY] - src[nextX + nextY] );
+ Cb /= 4;
+
+ Y = 1160 * ( src[0] + ( Cr / 2 ) - 16 );
+
+ if ( i & 1 ) {
+ int Ct = Cr;
+ Cr = Cb;
+ Cb = Ct;
+ }
+
+ if ( ( x ^ i ) & 1 ) {
+ Cr = -Cr;
+ Cb = -Cb;
+ }
+
+ rgb[0] = clamp( ( ( Y + ( 2017 * Cb ) ) +
+ 500 ) / 900, 0, 255 );
+ rgb[1] = clamp( ( ( Y - ( 392 * Cb ) -
+ ( 813 * Cr ) ) +
+ 500 ) / 1000, 0, 255 );
+ rgb[2] = clamp( ( ( Y + ( 1594 * Cr ) ) +
+ 500 ) / 1300, 0, 255 );
+
+ prevX = -1;
+ }
+
+ prevY = -512;
+ }
+}
+
+static void
+read_frame(struct vicam_camera *cam, int framenum)
+{
+ unsigned char *request = cam->cntrlbuf;
+ int realShutter;
+ int n;
+ int actual_length;
+
+ if (cam->needsDummyRead) {
+ cam->needsDummyRead = 0;
+ read_frame(cam, framenum);
+ }
+
+ memset(request, 0, 16);
+ request[0] = cam->gain; // 0 = 0% gain, FF = 100% gain
+
+ request[1] = 0; // 512x242 capture
+
+ request[2] = 0x90; // the function of these two bytes
+ request[3] = 0x07; // is not yet understood
+
+ if (cam->shutter_speed > 60) {
+ // Short exposure
+ realShutter =
+ ((-15631900 / cam->shutter_speed) + 260533) / 1000;
+ request[4] = realShutter & 0xFF;
+ request[5] = (realShutter >> 8) & 0xFF;
+ request[6] = 0x03;
+ request[7] = 0x01;
+ } else {
+ // Long exposure
+ realShutter = 15600 / cam->shutter_speed - 1;
+ request[4] = 0;
+ request[5] = 0;
+ request[6] = realShutter & 0xFF;
+ request[7] = realShutter >> 8;
+ }
+
+ // Per John Markus Bjørndalen, byte at index 8 causes problems if it isn't 0
+ request[8] = 0;
+ // bytes 9-15 do not seem to affect exposure or image quality
+
+ down(&cam->cam_lock);
+
+ if (!cam->udev) {
+ goto done;
+ }
+
+ n = __send_control_msg(cam, 0x51, 0x80, 0, request, 16);
+
+ if (n < 0) {
+ printk(KERN_ERR
+ " Problem sending frame capture control message");
+ goto done;
+ }
+
+ n = usb_bulk_msg(cam->udev,
+ usb_rcvbulkpipe(cam->udev, cam->bulkEndpoint),
+ cam->raw_image,
+ 512 * 242 + 128, &actual_length, 10000);
+
+ if (n < 0) {
+ printk(KERN_ERR "Problem during bulk read of frame data: %d\n",
+ n);
+ }
+
+ done:
+ up(&cam->cam_lock);
+}
+
+static ssize_t
+vicam_read( struct file *file, char __user *buf, size_t count, loff_t *ppos )
+{
+ struct vicam_camera *cam = file->private_data;
+
+ DBG("read %d bytes.\n", (int) count);
+
+ if (*ppos >= VICAM_MAX_FRAME_SIZE) {
+ *ppos = 0;
+ return 0;
+ }
+
+ if (*ppos == 0) {
+ read_frame(cam, 0);
+ vicam_decode_color(cam->raw_image,
+ cam->framebuf +
+ 0 * VICAM_MAX_FRAME_SIZE);
+ }
+
+ count = min_t(size_t, count, VICAM_MAX_FRAME_SIZE - *ppos);
+
+ if (copy_to_user(buf, &cam->framebuf[*ppos], count)) {
+ count = -EFAULT;
+ } else {
+ *ppos += count;
+ }
+
+ if (count == VICAM_MAX_FRAME_SIZE) {
+ *ppos = 0;
+ }
+
+ return count;
+}
+
+
+static int
+vicam_mmap(struct file *file, struct vm_area_struct *vma)
+{
+ // TODO: allocate the raw frame buffer if necessary
+ unsigned long page, pos;
+ unsigned long start = vma->vm_start;
+ unsigned long size = vma->vm_end-vma->vm_start;
+ struct vicam_camera *cam = file->private_data;
+
+ if (!cam)
+ return -ENODEV;
+
+ DBG("vicam_mmap: %ld\n", size);
+
+ /* We let mmap allocate as much as it wants because Linux was adding 2048 bytes
+ * to the size the application requested for mmap and it was screwing apps up.
+ if (size > VICAM_FRAMES*VICAM_MAX_FRAME_SIZE)
+ return -EINVAL;
+ */
+
+ pos = (unsigned long)cam->framebuf;
+ while (size > 0) {
+ page = vmalloc_to_pfn((void *)pos);
+ if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
+ return -EAGAIN;
+
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+ if (size > PAGE_SIZE)
+ size -= PAGE_SIZE;
+ else
+ size = 0;
+ }
+
+ return 0;
+}
+
+#if defined(CONFIG_VIDEO_PROC_FS)
+
+static struct proc_dir_entry *vicam_proc_root = NULL;
+
+static int vicam_read_helper(char *page, char **start, off_t off,
+ int count, int *eof, int value)
+{
+ char *out = page;
+ int len;
+
+ out += sprintf(out, "%d",value);
+
+ len = out - page;
+ len -= off;
+ if (len < count) {
+ *eof = 1;
+ if (len <= 0)
+ return 0;
+ } else
+ len = count;
+
+ *start = page + off;
+ return len;
+}
+
+static int vicam_read_proc_shutter(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ return vicam_read_helper(page,start,off,count,eof,
+ ((struct vicam_camera *)data)->shutter_speed);
+}
+
+static int vicam_read_proc_gain(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ return vicam_read_helper(page,start,off,count,eof,
+ ((struct vicam_camera *)data)->gain);
+}
+
+static int
+vicam_write_proc_shutter(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ u16 stmp;
+ char kbuf[8];
+ struct vicam_camera *cam = (struct vicam_camera *) data;
+
+ if (count > 6)
+ return -EINVAL;
+
+ if (copy_from_user(kbuf, buffer, count))
+ return -EFAULT;
+
+ stmp = (u16) simple_strtoul(kbuf, NULL, 10);
+ if (stmp < 4 || stmp > 32000)
+ return -EINVAL;
+
+ cam->shutter_speed = stmp;
+
+ return count;
+}
+
+static int
+vicam_write_proc_gain(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ u16 gtmp;
+ char kbuf[8];
+
+ struct vicam_camera *cam = (struct vicam_camera *) data;
+
+ if (count > 4)
+ return -EINVAL;
+
+ if (copy_from_user(kbuf, buffer, count))
+ return -EFAULT;
+
+ gtmp = (u16) simple_strtoul(kbuf, NULL, 10);
+ if (gtmp > 255)
+ return -EINVAL;
+ cam->gain = gtmp;
+
+ return count;
+}
+
+static void
+vicam_create_proc_root(void)
+{
+ vicam_proc_root = create_proc_entry("video/vicam", S_IFDIR, 0);
+
+ if (vicam_proc_root)
+ vicam_proc_root->owner = THIS_MODULE;
+ else
+ printk(KERN_ERR
+ "could not create /proc entry for vicam!");
+}
+
+static void
+vicam_destroy_proc_root(void)
+{
+ if (vicam_proc_root)
+ remove_proc_entry("video/vicam", 0);
+}
+
+static void
+vicam_create_proc_entry(struct vicam_camera *cam)
+{
+ char name[64];
+ struct proc_dir_entry *ent;
+
+ DBG(KERN_INFO "vicam: creating proc entry\n");
+
+ if (!vicam_proc_root || !cam) {
+ printk(KERN_INFO
+ "vicam: could not create proc entry, %s pointer is null.\n",
+ (!cam ? "camera" : "root"));
+ return;
+ }
+
+ sprintf(name, "video%d", cam->vdev.minor);
+
+ cam->proc_dir = create_proc_entry(name, S_IFDIR, vicam_proc_root);
+
+ if ( !cam->proc_dir )
+ return; // FIXME: We should probably return an error here
+
+ ent = create_proc_entry("shutter", S_IFREG | S_IRUGO | S_IWUSR,
+ cam->proc_dir);
+ if (ent) {
+ ent->data = cam;
+ ent->read_proc = vicam_read_proc_shutter;
+ ent->write_proc = vicam_write_proc_shutter;
+ ent->size = 64;
+ }
+
+ ent = create_proc_entry("gain", S_IFREG | S_IRUGO | S_IWUSR,
+ cam->proc_dir);
+ if (ent) {
+ ent->data = cam;
+ ent->read_proc = vicam_read_proc_gain;
+ ent->write_proc = vicam_write_proc_gain;
+ ent->size = 64;
+ }
+}
+
+static void
+vicam_destroy_proc_entry(void *ptr)
+{
+ struct vicam_camera *cam = (struct vicam_camera *) ptr;
+ char name[16];
+
+ if ( !cam->proc_dir )
+ return;
+
+ sprintf(name, "video%d", cam->vdev.minor);
+ remove_proc_entry("shutter", cam->proc_dir);
+ remove_proc_entry("gain", cam->proc_dir);
+ remove_proc_entry(name,vicam_proc_root);
+ cam->proc_dir = NULL;
+
+}
+
+#else
+static inline void vicam_create_proc_root(void) { }
+static inline void vicam_destroy_proc_root(void) { }
+static inline void vicam_create_proc_entry(struct vicam_camera *cam) { }
+static inline void vicam_destroy_proc_entry(void *ptr) { }
+#endif
+
+static struct file_operations vicam_fops = {
+ .owner = THIS_MODULE,
+ .open = vicam_open,
+ .release = vicam_close,
+ .read = vicam_read,
+ .mmap = vicam_mmap,
+ .ioctl = vicam_ioctl,
+ .llseek = no_llseek,
+};
+
+static struct video_device vicam_template = {
+ .owner = THIS_MODULE,
+ .name = "ViCam-based USB Camera",
+ .type = VID_TYPE_CAPTURE,
+ .hardware = VID_HARDWARE_VICAM,
+ .fops = &vicam_fops,
+ .minor = -1,
+};
+
+/* table of devices that work with this driver */
+static struct usb_device_id vicam_table[] = {
+ {USB_DEVICE(USB_VICAM_VENDOR_ID, USB_VICAM_PRODUCT_ID)},
+ {} /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE(usb, vicam_table);
+
+static struct usb_driver vicam_driver = {
+ .owner = THIS_MODULE,
+ .name = "vicam",
+ .probe = vicam_probe,
+ .disconnect = vicam_disconnect,
+ .id_table = vicam_table
+};
+
+/**
+ * vicam_probe
+ * @intf: the interface
+ * @id: the device id
+ *
+ * Called by the usb core when a new device is connected that it thinks
+ * this driver might be interested in.
+ */
+static int
+vicam_probe( struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ int bulkEndpoint = 0;
+ const struct usb_host_interface *interface;
+ const struct usb_endpoint_descriptor *endpoint;
+ struct vicam_camera *cam;
+
+ printk(KERN_INFO "ViCam based webcam connected\n");
+
+ interface = intf->cur_altsetting;
+
+ DBG(KERN_DEBUG "Interface %d. has %u. endpoints!\n",
+ interface->desc.bInterfaceNumber, (unsigned) (interface->desc.bNumEndpoints));
+ endpoint = &interface->endpoint[0].desc;
+
+ if ((endpoint->bEndpointAddress & 0x80) &&
+ ((endpoint->bmAttributes & 3) == 0x02)) {
+ /* we found a bulk in endpoint */
+ bulkEndpoint = endpoint->bEndpointAddress;
+ } else {
+ printk(KERN_ERR
+ "No bulk in endpoint was found ?! (this is bad)\n");
+ }
+
+ if ((cam =
+ kmalloc(sizeof (struct vicam_camera), GFP_KERNEL)) == NULL) {
+ printk(KERN_WARNING
+ "could not allocate kernel memory for vicam_camera struct\n");
+ return -ENOMEM;
+ }
+
+ memset(cam, 0, sizeof (struct vicam_camera));
+
+ cam->shutter_speed = 15;
+
+ init_MUTEX(&cam->cam_lock);
+
+ memcpy(&cam->vdev, &vicam_template,
+ sizeof (vicam_template));
+ cam->vdev.priv = cam; // sort of a reverse mapping for those functions that get vdev only
+
+ cam->udev = dev;
+ cam->bulkEndpoint = bulkEndpoint;
+
+ if (video_register_device(&cam->vdev, VFL_TYPE_GRABBER, -1) == -1) {
+ kfree(cam);
+ printk(KERN_WARNING "video_register_device failed\n");
+ return -EIO;
+ }
+
+ vicam_create_proc_entry(cam);
+
+ printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",cam->vdev.minor);
+
+ usb_set_intfdata (intf, cam);
+
+ return 0;
+}
+
+static void
+vicam_disconnect(struct usb_interface *intf)
+{
+ int open_count;
+ struct vicam_camera *cam = usb_get_intfdata (intf);
+ usb_set_intfdata (intf, NULL);
+
+ /* we must unregister the device before taking its
+ * cam_lock. This is because the video open call
+ * holds the same lock as video unregister. if we
+ * unregister inside of the cam_lock and open also
+ * uses the cam_lock, we get deadlock.
+ */
+
+ video_unregister_device(&cam->vdev);
+
+ /* stop the camera from being used */
+
+ down(&cam->cam_lock);
+
+ /* mark the camera as gone */
+
+ cam->udev = NULL;
+
+ vicam_destroy_proc_entry(cam);
+
+ /* the only thing left to do is synchronize with
+ * our close/release function on who should release
+ * the camera memory. if there are any users using the
+ * camera, it's their job. if there are no users,
+ * it's ours.
+ */
+
+ open_count = cam->open_count;
+
+ up(&cam->cam_lock);
+
+ if (!open_count) {
+ kfree(cam);
+ }
+
+ printk(KERN_DEBUG "ViCam-based WebCam disconnected\n");
+}
+
+/*
+ */
+static int __init
+usb_vicam_init(void)
+{
+ int retval;
+ DBG(KERN_INFO "ViCam-based WebCam driver startup\n");
+ vicam_create_proc_root();
+ retval = usb_register(&vicam_driver);
+ if (retval)
+ printk(KERN_WARNING "usb_register failed!\n");
+ return retval;
+}
+
+static void __exit
+usb_vicam_exit(void)
+{
+ DBG(KERN_INFO
+ "ViCam-based WebCam driver shutdown\n");
+
+ usb_deregister(&vicam_driver);
+ vicam_destroy_proc_root();
+}
+
+module_init(usb_vicam_init);
+module_exit(usb_vicam_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/media/w9968cf.c b/drivers/usb/media/w9968cf.c
new file mode 100644
index 000000000000..689e79e4bcee
--- /dev/null
+++ b/drivers/usb/media/w9968cf.c
@@ -0,0 +1,3822 @@
+/***************************************************************************
+ * Video4Linux driver for W996[87]CF JPEG USB Dual Mode Camera Chip. *
+ * *
+ * Copyright (C) 2002-2004 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * - Memory management code from bttv driver by Ralph Metzler, *
+ * Marcus Metzler and Gerd Knorr. *
+ * - I2C interface to kernel, high-level image sensor control routines and *
+ * some symbolic names from OV511 driver by Mark W. McClelland. *
+ * - Low-level I2C fast write function by Piotr Czerczak. *
+ * - Low-level I2C read function by Frederic Jouault. *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/kmod.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+#include <linux/mm.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/ioctl.h>
+#include <linux/delay.h>
+#include <linux/stddef.h>
+#include <asm/page.h>
+#include <asm/uaccess.h>
+#include <linux/page-flags.h>
+#include <linux/moduleparam.h>
+
+#include "w9968cf.h"
+#include "w9968cf_decoder.h"
+
+
+
+/****************************************************************************
+ * Module macros and parameters *
+ ****************************************************************************/
+
+MODULE_DEVICE_TABLE(usb, winbond_id_table);
+
+MODULE_AUTHOR(W9968CF_MODULE_AUTHOR" "W9968CF_AUTHOR_EMAIL);
+MODULE_DESCRIPTION(W9968CF_MODULE_NAME);
+MODULE_VERSION(W9968CF_MODULE_VERSION);
+MODULE_LICENSE(W9968CF_MODULE_LICENSE);
+MODULE_SUPPORTED_DEVICE("Video");
+
+static int ovmod_load = W9968CF_OVMOD_LOAD;
+static int vppmod_load = W9968CF_VPPMOD_LOAD;
+static unsigned short simcams = W9968CF_SIMCAMS;
+static short video_nr[]={[0 ... W9968CF_MAX_DEVICES-1] = -1}; /*-1=first free*/
+static unsigned int packet_size[] = {[0 ... W9968CF_MAX_DEVICES-1] =
+ W9968CF_PACKET_SIZE};
+static unsigned short max_buffers[] = {[0 ... W9968CF_MAX_DEVICES-1] =
+ W9968CF_BUFFERS};
+static int double_buffer[] = {[0 ... W9968CF_MAX_DEVICES-1] =
+ W9968CF_DOUBLE_BUFFER};
+static int clamping[] = {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_CLAMPING};
+static unsigned short filter_type[]= {[0 ... W9968CF_MAX_DEVICES-1] =
+ W9968CF_FILTER_TYPE};
+static int largeview[]= {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_LARGEVIEW};
+static unsigned short decompression[] = {[0 ... W9968CF_MAX_DEVICES-1] =
+ W9968CF_DECOMPRESSION};
+static int upscaling[]= {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_UPSCALING};
+static unsigned short force_palette[] = {[0 ... W9968CF_MAX_DEVICES-1] = 0};
+static int force_rgb[] = {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_FORCE_RGB};
+static int autobright[] = {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_AUTOBRIGHT};
+static int autoexp[] = {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_AUTOEXP};
+static unsigned short lightfreq[] = {[0 ... W9968CF_MAX_DEVICES-1] =
+ W9968CF_LIGHTFREQ};
+static int bandingfilter[] = {[0 ... W9968CF_MAX_DEVICES-1]=
+ W9968CF_BANDINGFILTER};
+static short clockdiv[] = {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_CLOCKDIV};
+static int backlight[] = {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_BACKLIGHT};
+static int mirror[] = {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_MIRROR};
+static int monochrome[] = {[0 ... W9968CF_MAX_DEVICES-1]=W9968CF_MONOCHROME};
+static unsigned int brightness[] = {[0 ... W9968CF_MAX_DEVICES-1] =
+ W9968CF_BRIGHTNESS};
+static unsigned int hue[] = {[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_HUE};
+static unsigned int colour[]={[0 ... W9968CF_MAX_DEVICES-1] = W9968CF_COLOUR};
+static unsigned int contrast[] = {[0 ... W9968CF_MAX_DEVICES-1] =
+ W9968CF_CONTRAST};
+static unsigned int whiteness[] = {[0 ... W9968CF_MAX_DEVICES-1] =
+ W9968CF_WHITENESS};
+#ifdef W9968CF_DEBUG
+static unsigned short debug = W9968CF_DEBUG_LEVEL;
+static int specific_debug = W9968CF_SPECIFIC_DEBUG;
+#endif
+
+static unsigned int param_nv[24]; /* number of values per parameter */
+
+#ifdef CONFIG_KMOD
+module_param(ovmod_load, bool, 0644);
+module_param(vppmod_load, bool, 0444);
+#endif
+module_param(simcams, ushort, 0644);
+module_param_array(video_nr, short, &param_nv[0], 0444);
+module_param_array(packet_size, uint, &param_nv[1], 0444);
+module_param_array(max_buffers, ushort, &param_nv[2], 0444);
+module_param_array(double_buffer, bool, &param_nv[3], 0444);
+module_param_array(clamping, bool, &param_nv[4], 0444);
+module_param_array(filter_type, ushort, &param_nv[5], 0444);
+module_param_array(largeview, bool, &param_nv[6], 0444);
+module_param_array(decompression, ushort, &param_nv[7], 0444);
+module_param_array(upscaling, bool, &param_nv[8], 0444);
+module_param_array(force_palette, ushort, &param_nv[9], 0444);
+module_param_array(force_rgb, ushort, &param_nv[10], 0444);
+module_param_array(autobright, bool, &param_nv[11], 0444);
+module_param_array(autoexp, bool, &param_nv[12], 0444);
+module_param_array(lightfreq, ushort, &param_nv[13], 0444);
+module_param_array(bandingfilter, bool, &param_nv[14], 0444);
+module_param_array(clockdiv, short, &param_nv[15], 0444);
+module_param_array(backlight, bool, &param_nv[16], 0444);
+module_param_array(mirror, bool, &param_nv[17], 0444);
+module_param_array(monochrome, bool, &param_nv[18], 0444);
+module_param_array(brightness, uint, &param_nv[19], 0444);
+module_param_array(hue, uint, &param_nv[20], 0444);
+module_param_array(colour, uint, &param_nv[21], 0444);
+module_param_array(contrast, uint, &param_nv[22], 0444);
+module_param_array(whiteness, uint, &param_nv[23], 0444);
+#ifdef W9968CF_DEBUG
+module_param(debug, ushort, 0644);
+module_param(specific_debug, bool, 0644);
+#endif
+
+#ifdef CONFIG_KMOD
+MODULE_PARM_DESC(ovmod_load,
+ "\n<0|1> Automatic 'ovcamchip' module loading."
+ "\n0 disabled, 1 enabled."
+ "\nIf enabled,'insmod' searches for the required 'ovcamchip'"
+ "\nmodule in the system, according to its configuration, and"
+ "\nattempts to load that module automatically. This action is"
+ "\nperformed once as soon as the 'w9968cf' module is loaded"
+ "\ninto memory."
+ "\nDefault value is "__MODULE_STRING(W9968CF_OVMOD_LOAD)"."
+ "\n");
+MODULE_PARM_DESC(vppmod_load,
+ "\n<0|1> Automatic 'w9968cf-vpp' module loading."
+ "\n0 disabled, 1 enabled."
+ "\nIf enabled, every time an application attempts to open a"
+ "\ncamera, 'insmod' searches for the video post-processing"
+ "\nmodule in the system and loads it automatically (if"
+ "\npresent). The optional 'w9968cf-vpp' module adds extra"
+ "\n image manipulation functions to the 'w9968cf' module,like"
+ "\nsoftware up-scaling,colour conversions and video decoding"
+ "\nfor very high frame rates."
+ "\nDefault value is "__MODULE_STRING(W9968CF_VPPMOD_LOAD)"."
+ "\n");
+#endif
+MODULE_PARM_DESC(simcams,
+ "\n<n> Number of cameras allowed to stream simultaneously."
+ "\nn may vary from 0 to "
+ __MODULE_STRING(W9968CF_MAX_DEVICES)"."
+ "\nDefault value is "__MODULE_STRING(W9968CF_SIMCAMS)"."
+ "\n");
+MODULE_PARM_DESC(video_nr,
+ "\n<-1|n[,...]> Specify V4L minor mode number."
+ "\n -1 = use next available (default)"
+ "\n n = use minor number n (integer >= 0)"
+ "\nYou can specify up to "__MODULE_STRING(W9968CF_MAX_DEVICES)
+ " cameras this way."
+ "\nFor example:"
+ "\nvideo_nr=-1,2,-1 would assign minor number 2 to"
+ "\nthe second camera and use auto for the first"
+ "\none and for every other camera."
+ "\n");
+MODULE_PARM_DESC(packet_size,
+ "\n<n[,...]> Specify the maximum data payload"
+ "\nsize in bytes for alternate settings, for each device."
+ "\nn is scaled between 63 and 1023 "
+ "(default is "__MODULE_STRING(W9968CF_PACKET_SIZE)")."
+ "\n");
+MODULE_PARM_DESC(max_buffers,
+ "\n<n[,...]> For advanced users."
+ "\nSpecify the maximum number of video frame buffers"
+ "\nto allocate for each device, from 2 to "
+ __MODULE_STRING(W9968CF_MAX_BUFFERS)
+ ". (default is "__MODULE_STRING(W9968CF_BUFFERS)")."
+ "\n");
+MODULE_PARM_DESC(double_buffer,
+ "\n<0|1[,...]> "
+ "Hardware double buffering: 0 disabled, 1 enabled."
+ "\nIt should be enabled if you want smooth video output: if"
+ "\nyou obtain out of sync. video, disable it, or try to"
+ "\ndecrease the 'clockdiv' module parameter value."
+ "\nDefault value is "__MODULE_STRING(W9968CF_DOUBLE_BUFFER)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(clamping,
+ "\n<0|1[,...]> Video data clamping: 0 disabled, 1 enabled."
+ "\nDefault value is "__MODULE_STRING(W9968CF_CLAMPING)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(filter_type,
+ "\n<0|1|2[,...]> Video filter type."
+ "\n0 none, 1 (1-2-1) 3-tap filter, "
+ "2 (2-3-6-3-2) 5-tap filter."
+ "\nDefault value is "__MODULE_STRING(W9968CF_FILTER_TYPE)
+ " for every device."
+ "\nThe filter is used to reduce noise and aliasing artifacts"
+ "\nproduced by the CCD or CMOS image sensor, and the scaling"
+ " process."
+ "\n");
+MODULE_PARM_DESC(largeview,
+ "\n<0|1[,...]> Large view: 0 disabled, 1 enabled."
+ "\nDefault value is "__MODULE_STRING(W9968CF_LARGEVIEW)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(upscaling,
+ "\n<0|1[,...]> Software scaling (for non-compressed video):"
+ "\n0 disabled, 1 enabled."
+ "\nDisable it if you have a slow CPU or you don't have"
+ " enough memory."
+ "\nDefault value is "__MODULE_STRING(W9968CF_UPSCALING)
+ " for every device."
+ "\nIf 'w9968cf-vpp' is not present, this parameter is"
+ " set to 0."
+ "\n");
+MODULE_PARM_DESC(decompression,
+ "\n<0|1|2[,...]> Software video decompression:"
+ "\n- 0 disables decompression (doesn't allow formats needing"
+ " decompression)"
+ "\n- 1 forces decompression (allows formats needing"
+ " decompression only);"
+ "\n- 2 allows any permitted formats."
+ "\nFormats supporting compressed video are YUV422P and"
+ " YUV420P/YUV420 "
+ "\nin any resolutions where both width and height are "
+ "a multiple of 16."
+ "\nDefault value is "__MODULE_STRING(W9968CF_DECOMPRESSION)
+ " for every device."
+ "\nIf 'w9968cf-vpp' is not present, forcing decompression is "
+ "\nnot allowed; in this case this parameter is set to 2."
+ "\n");
+MODULE_PARM_DESC(force_palette,
+ "\n<0"
+ "|" __MODULE_STRING(VIDEO_PALETTE_UYVY)
+ "|" __MODULE_STRING(VIDEO_PALETTE_YUV420)
+ "|" __MODULE_STRING(VIDEO_PALETTE_YUV422P)
+ "|" __MODULE_STRING(VIDEO_PALETTE_YUV420P)
+ "|" __MODULE_STRING(VIDEO_PALETTE_YUYV)
+ "|" __MODULE_STRING(VIDEO_PALETTE_YUV422)
+ "|" __MODULE_STRING(VIDEO_PALETTE_GREY)
+ "|" __MODULE_STRING(VIDEO_PALETTE_RGB555)
+ "|" __MODULE_STRING(VIDEO_PALETTE_RGB565)
+ "|" __MODULE_STRING(VIDEO_PALETTE_RGB24)
+ "|" __MODULE_STRING(VIDEO_PALETTE_RGB32)
+ "[,...]>"
+ " Force picture palette."
+ "\nIn order:"
+ "\n- 0 allows any of the following formats:"
+ "\n- UYVY 16 bpp - Original video, compression disabled"
+ "\n- YUV420 12 bpp - Original video, compression enabled"
+ "\n- YUV422P 16 bpp - Original video, compression enabled"
+ "\n- YUV420P 12 bpp - Original video, compression enabled"
+ "\n- YUVY 16 bpp - Software conversion from UYVY"
+ "\n- YUV422 16 bpp - Software conversion from UYVY"
+ "\n- GREY 8 bpp - Software conversion from UYVY"
+ "\n- RGB555 16 bpp - Software conversion from UYVY"
+ "\n- RGB565 16 bpp - Software conversion from UYVY"
+ "\n- RGB24 24 bpp - Software conversion from UYVY"
+ "\n- RGB32 32 bpp - Software conversion from UYVY"
+ "\nWhen not 0, this parameter will override 'decompression'."
+ "\nDefault value is 0 for every device."
+ "\nInitial palette is "
+ __MODULE_STRING(W9968CF_PALETTE_DECOMP_ON)"."
+ "\nIf 'w9968cf-vpp' is not present, this parameter is"
+ " set to 9 (UYVY)."
+ "\n");
+MODULE_PARM_DESC(force_rgb,
+ "\n<0|1[,...]> Read RGB video data instead of BGR:"
+ "\n 1 = use RGB component ordering."
+ "\n 0 = use BGR component ordering."
+ "\nThis parameter has effect when using RGBX palettes only."
+ "\nDefault value is "__MODULE_STRING(W9968CF_FORCE_RGB)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(autobright,
+ "\n<0|1[,...]> Image sensor automatically changes brightness:"
+ "\n 0 = no, 1 = yes"
+ "\nDefault value is "__MODULE_STRING(W9968CF_AUTOBRIGHT)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(autoexp,
+ "\n<0|1[,...]> Image sensor automatically changes exposure:"
+ "\n 0 = no, 1 = yes"
+ "\nDefault value is "__MODULE_STRING(W9968CF_AUTOEXP)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(lightfreq,
+ "\n<50|60[,...]> Light frequency in Hz:"
+ "\n 50 for European and Asian lighting,"
+ " 60 for American lighting."
+ "\nDefault value is "__MODULE_STRING(W9968CF_LIGHTFREQ)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(bandingfilter,
+ "\n<0|1[,...]> Banding filter to reduce effects of"
+ " fluorescent lighting:"
+ "\n 0 disabled, 1 enabled."
+ "\nThis filter tries to reduce the pattern of horizontal"
+ "\nlight/dark bands caused by some (usually fluorescent)"
+ " lighting."
+ "\nDefault value is "__MODULE_STRING(W9968CF_BANDINGFILTER)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(clockdiv,
+ "\n<-1|n[,...]> "
+ "Force pixel clock divisor to a specific value (for experts):"
+ "\n n may vary from 0 to 127."
+ "\n -1 for automatic value."
+ "\nSee also the 'double_buffer' module parameter."
+ "\nDefault value is "__MODULE_STRING(W9968CF_CLOCKDIV)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(backlight,
+ "\n<0|1[,...]> Objects are lit from behind:"
+ "\n 0 = no, 1 = yes"
+ "\nDefault value is "__MODULE_STRING(W9968CF_BACKLIGHT)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(mirror,
+ "\n<0|1[,...]> Reverse image horizontally:"
+ "\n 0 = no, 1 = yes"
+ "\nDefault value is "__MODULE_STRING(W9968CF_MIRROR)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(monochrome,
+ "\n<0|1[,...]> Use image sensor as monochrome sensor:"
+ "\n 0 = no, 1 = yes"
+ "\nNot all the sensors support monochrome color."
+ "\nDefault value is "__MODULE_STRING(W9968CF_MONOCHROME)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(brightness,
+ "\n<n[,...]> Set picture brightness (0-65535)."
+ "\nDefault value is "__MODULE_STRING(W9968CF_BRIGHTNESS)
+ " for every device."
+ "\nThis parameter has no effect if 'autobright' is enabled."
+ "\n");
+MODULE_PARM_DESC(hue,
+ "\n<n[,...]> Set picture hue (0-65535)."
+ "\nDefault value is "__MODULE_STRING(W9968CF_HUE)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(colour,
+ "\n<n[,...]> Set picture saturation (0-65535)."
+ "\nDefault value is "__MODULE_STRING(W9968CF_COLOUR)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(contrast,
+ "\n<n[,...]> Set picture contrast (0-65535)."
+ "\nDefault value is "__MODULE_STRING(W9968CF_CONTRAST)
+ " for every device."
+ "\n");
+MODULE_PARM_DESC(whiteness,
+ "\n<n[,...]> Set picture whiteness (0-65535)."
+ "\nDefault value is "__MODULE_STRING(W9968CF_WHITENESS)
+ " for every device."
+ "\n");
+#ifdef W9968CF_DEBUG
+MODULE_PARM_DESC(debug,
+ "\n<n> Debugging information level, from 0 to 6:"
+ "\n0 = none (use carefully)"
+ "\n1 = critical errors"
+ "\n2 = significant informations"
+ "\n3 = configuration or general messages"
+ "\n4 = warnings"
+ "\n5 = called functions"
+ "\n6 = function internals"
+ "\nLevel 5 and 6 are useful for testing only, when only "
+ "one device is used."
+ "\nDefault value is "__MODULE_STRING(W9968CF_DEBUG_LEVEL)"."
+ "\n");
+MODULE_PARM_DESC(specific_debug,
+ "\n<0|1> Enable or disable specific debugging messages:"
+ "\n0 = print messages concerning every level"
+ " <= 'debug' level."
+ "\n1 = print messages concerning the level"
+ " indicated by 'debug'."
+ "\nDefault value is "
+ __MODULE_STRING(W9968CF_SPECIFIC_DEBUG)"."
+ "\n");
+#endif /* W9968CF_DEBUG */
+
+
+
+/****************************************************************************
+ * Some prototypes *
+ ****************************************************************************/
+
+/* Video4linux interface */
+static struct file_operations w9968cf_fops;
+static int w9968cf_open(struct inode*, struct file*);
+static int w9968cf_release(struct inode*, struct file*);
+static int w9968cf_mmap(struct file*, struct vm_area_struct*);
+static int w9968cf_ioctl(struct inode*, struct file*, unsigned, unsigned long);
+static ssize_t w9968cf_read(struct file*, char __user *, size_t, loff_t*);
+static int w9968cf_v4l_ioctl(struct inode*, struct file*, unsigned int,
+ void __user *);
+
+/* USB-specific */
+static int w9968cf_start_transfer(struct w9968cf_device*);
+static int w9968cf_stop_transfer(struct w9968cf_device*);
+static int w9968cf_write_reg(struct w9968cf_device*, u16 value, u16 index);
+static int w9968cf_read_reg(struct w9968cf_device*, u16 index);
+static int w9968cf_write_fsb(struct w9968cf_device*, u16* data);
+static int w9968cf_write_sb(struct w9968cf_device*, u16 value);
+static int w9968cf_read_sb(struct w9968cf_device*);
+static int w9968cf_upload_quantizationtables(struct w9968cf_device*);
+static void w9968cf_urb_complete(struct urb *urb, struct pt_regs *regs);
+
+/* Low-level I2C (SMBus) I/O */
+static int w9968cf_smbus_start(struct w9968cf_device*);
+static int w9968cf_smbus_stop(struct w9968cf_device*);
+static int w9968cf_smbus_write_byte(struct w9968cf_device*, u8 v);
+static int w9968cf_smbus_read_byte(struct w9968cf_device*, u8* v);
+static int w9968cf_smbus_write_ack(struct w9968cf_device*);
+static int w9968cf_smbus_read_ack(struct w9968cf_device*);
+static int w9968cf_smbus_refresh_bus(struct w9968cf_device*);
+static int w9968cf_i2c_adap_read_byte(struct w9968cf_device* cam,
+ u16 address, u8* value);
+static int w9968cf_i2c_adap_read_byte_data(struct w9968cf_device*, u16 address,
+ u8 subaddress, u8* value);
+static int w9968cf_i2c_adap_write_byte(struct w9968cf_device*,
+ u16 address, u8 subaddress);
+static int w9968cf_i2c_adap_fastwrite_byte_data(struct w9968cf_device*,
+ u16 address, u8 subaddress,
+ u8 value);
+
+/* I2C interface to kernel */
+static int w9968cf_i2c_init(struct w9968cf_device*);
+static int w9968cf_i2c_smbus_xfer(struct i2c_adapter*, u16 addr,
+ unsigned short flags, char read_write,
+ u8 command, int size, union i2c_smbus_data*);
+static u32 w9968cf_i2c_func(struct i2c_adapter*);
+static int w9968cf_i2c_attach_inform(struct i2c_client*);
+static int w9968cf_i2c_detach_inform(struct i2c_client*);
+static int w9968cf_i2c_control(struct i2c_adapter*, unsigned int cmd,
+ unsigned long arg);
+
+/* Memory management */
+static void* rvmalloc(unsigned long size);
+static void rvfree(void *mem, unsigned long size);
+static void w9968cf_deallocate_memory(struct w9968cf_device*);
+static int w9968cf_allocate_memory(struct w9968cf_device*);
+
+/* High-level image sensor control functions */
+static int w9968cf_sensor_set_control(struct w9968cf_device*,int cid,int val);
+static int w9968cf_sensor_get_control(struct w9968cf_device*,int cid,int *val);
+static int w9968cf_sensor_cmd(struct w9968cf_device*,
+ unsigned int cmd, void *arg);
+static int w9968cf_sensor_init(struct w9968cf_device*);
+static int w9968cf_sensor_update_settings(struct w9968cf_device*);
+static int w9968cf_sensor_get_picture(struct w9968cf_device*);
+static int w9968cf_sensor_update_picture(struct w9968cf_device*,
+ struct video_picture pict);
+
+/* Other helper functions */
+static void w9968cf_configure_camera(struct w9968cf_device*,struct usb_device*,
+ enum w9968cf_model_id,
+ const unsigned short dev_nr);
+static void w9968cf_adjust_configuration(struct w9968cf_device*);
+static int w9968cf_turn_on_led(struct w9968cf_device*);
+static int w9968cf_init_chip(struct w9968cf_device*);
+static inline u16 w9968cf_valid_palette(u16 palette);
+static inline u16 w9968cf_valid_depth(u16 palette);
+static inline u8 w9968cf_need_decompression(u16 palette);
+static int w9968cf_set_picture(struct w9968cf_device*, struct video_picture);
+static int w9968cf_set_window(struct w9968cf_device*, struct video_window);
+static int w9968cf_postprocess_frame(struct w9968cf_device*,
+ struct w9968cf_frame_t*);
+static int w9968cf_adjust_window_size(struct w9968cf_device*, u16* w, u16* h);
+static void w9968cf_init_framelist(struct w9968cf_device*);
+static void w9968cf_push_frame(struct w9968cf_device*, u8 f_num);
+static void w9968cf_pop_frame(struct w9968cf_device*,struct w9968cf_frame_t**);
+static void w9968cf_release_resources(struct w9968cf_device*);
+
+/* Intermodule communication */
+static int w9968cf_vppmod_detect(struct w9968cf_device*);
+static void w9968cf_vppmod_release(struct w9968cf_device*);
+
+
+
+/****************************************************************************
+ * Symbolic names *
+ ****************************************************************************/
+
+/* Used to represent a list of values and their respective symbolic names */
+struct w9968cf_symbolic_list {
+ const int num;
+ const char *name;
+};
+
+/*--------------------------------------------------------------------------
+ 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 const char *
+symbolic(struct w9968cf_symbolic_list list[], const int num)
+{
+ int i;
+
+ for (i = 0; list[i].name != NULL; i++)
+ if (list[i].num == num)
+ return (list[i].name);
+
+ return "Unknown";
+}
+
+static struct w9968cf_symbolic_list camlist[] = {
+ { W9968CF_MOD_GENERIC, "W996[87]CF JPEG USB Dual Mode Camera" },
+ { W9968CF_MOD_CLVBWGP, "Creative Labs Video Blaster WebCam Go Plus" },
+
+ /* Other cameras (having the same descriptors as Generic W996[87]CF) */
+ { W9968CF_MOD_ADPVDMA, "Aroma Digi Pen VGA Dual Mode ADG-5000" },
+ { W9986CF_MOD_AAU, "AVerMedia AVerTV USB" },
+ { W9968CF_MOD_CLVBWG, "Creative Labs Video Blaster WebCam Go" },
+ { W9968CF_MOD_LL, "Lebon LDC-035A" },
+ { W9968CF_MOD_EEEMC, "Ezonics EZ-802 EZMega Cam" },
+ { W9968CF_MOD_OOE, "OmniVision OV8610-EDE" },
+ { W9968CF_MOD_ODPVDMPC, "OPCOM Digi Pen VGA Dual Mode Pen Camera" },
+ { W9968CF_MOD_PDPII, "Pretec Digi Pen-II" },
+ { W9968CF_MOD_PDP480, "Pretec DigiPen-480" },
+
+ { -1, NULL }
+};
+
+static struct w9968cf_symbolic_list senlist[] = {
+ { CC_OV76BE, "OV76BE" },
+ { CC_OV7610, "OV7610" },
+ { CC_OV7620, "OV7620" },
+ { CC_OV7620AE, "OV7620AE" },
+ { CC_OV6620, "OV6620" },
+ { CC_OV6630, "OV6630" },
+ { CC_OV6630AE, "OV6630AE" },
+ { CC_OV6630AF, "OV6630AF" },
+ { -1, NULL }
+};
+
+/* Video4Linux1 palettes */
+static struct w9968cf_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 }
+};
+
+/* Decoder error codes: */
+static struct w9968cf_symbolic_list decoder_errlist[] = {
+ { W9968CF_DEC_ERR_CORRUPTED_DATA, "Corrupted data" },
+ { W9968CF_DEC_ERR_BUF_OVERFLOW, "Buffer overflow" },
+ { W9968CF_DEC_ERR_NO_SOI, "SOI marker not found" },
+ { W9968CF_DEC_ERR_NO_SOF0, "SOF0 marker not found" },
+ { W9968CF_DEC_ERR_NO_SOS, "SOS marker not found" },
+ { W9968CF_DEC_ERR_NO_EOI, "EOI marker not found" },
+ { -1, NULL }
+};
+
+/* URB error codes: */
+static struct w9968cf_symbolic_list urb_errlist[] = {
+ { -ENOMEM, "No memory for allocation of internal structures" },
+ { -ENOSPC, "The host controller's bandwidth is already consumed" },
+ { -ENOENT, "URB was canceled by unlink_urb" },
+ { -EXDEV, "ISO transfer only partially completed" },
+ { -EAGAIN, "Too match scheduled for the future" },
+ { -ENXIO, "URB already queued" },
+ { -EFBIG, "Too much ISO frames requested" },
+ { -ENOSR, "Buffer error (overrun)" },
+ { -EPIPE, "Specified endpoint is 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 }
+};
+
+
+
+/****************************************************************************
+ * Memory management functions *
+ ****************************************************************************/
+static void* rvmalloc(unsigned long size)
+{
+ void* mem;
+ unsigned long adr;
+
+ size = PAGE_ALIGN(size);
+ mem = vmalloc_32(size);
+ if (!mem)
+ return NULL;
+
+ memset(mem, 0, size); /* Clear the ram out, no junk to the user */
+ adr = (unsigned long) mem;
+ while (size > 0) {
+ SetPageReserved(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) {
+ ClearPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+ vfree(mem);
+}
+
+
+/*--------------------------------------------------------------------------
+ Deallocate previously allocated memory.
+ --------------------------------------------------------------------------*/
+static void w9968cf_deallocate_memory(struct w9968cf_device* cam)
+{
+ u8 i;
+
+ /* Free the isochronous transfer buffers */
+ for (i = 0; i < W9968CF_URBS; i++) {
+ kfree(cam->transfer_buffer[i]);
+ cam->transfer_buffer[i] = NULL;
+ }
+
+ /* Free temporary frame buffer */
+ if (cam->frame_tmp.buffer) {
+ rvfree(cam->frame_tmp.buffer, cam->frame_tmp.size);
+ cam->frame_tmp.buffer = NULL;
+ }
+
+ /* Free helper buffer */
+ if (cam->frame_vpp.buffer) {
+ rvfree(cam->frame_vpp.buffer, cam->frame_vpp.size);
+ cam->frame_vpp.buffer = NULL;
+ }
+
+ /* Free video frame buffers */
+ if (cam->frame[0].buffer) {
+ rvfree(cam->frame[0].buffer, cam->nbuffers*cam->frame[0].size);
+ cam->frame[0].buffer = NULL;
+ }
+
+ cam->nbuffers = 0;
+
+ DBG(5, "Memory successfully deallocated")
+}
+
+
+/*--------------------------------------------------------------------------
+ Allocate memory buffers for USB transfers and video frames.
+ This function is called by open() only.
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_allocate_memory(struct w9968cf_device* cam)
+{
+ const u16 p_size = wMaxPacketSize[cam->altsetting-1];
+ void* buff = NULL;
+ unsigned long hw_bufsize, vpp_bufsize;
+ u8 i, bpp;
+
+ /* NOTE: Deallocation is done elsewhere in case of error */
+
+ /* Calculate the max amount of raw data per frame from the device */
+ hw_bufsize = cam->maxwidth*cam->maxheight*2;
+
+ /* Calculate the max buf. size needed for post-processing routines */
+ bpp = (w9968cf_vpp) ? 4 : 2;
+ if (cam->upscaling)
+ vpp_bufsize = max(W9968CF_MAX_WIDTH*W9968CF_MAX_HEIGHT*bpp,
+ cam->maxwidth*cam->maxheight*bpp);
+ else
+ vpp_bufsize = cam->maxwidth*cam->maxheight*bpp;
+
+ /* Allocate memory for the isochronous transfer buffers */
+ for (i = 0; i < W9968CF_URBS; i++) {
+ if (!(cam->transfer_buffer[i] =
+ kmalloc(W9968CF_ISO_PACKETS*p_size, GFP_KERNEL))) {
+ DBG(1, "Couldn't allocate memory for the isochronous "
+ "transfer buffers (%u bytes)",
+ p_size * W9968CF_ISO_PACKETS)
+ return -ENOMEM;
+ }
+ memset(cam->transfer_buffer[i], 0, W9968CF_ISO_PACKETS*p_size);
+ }
+
+ /* Allocate memory for the temporary frame buffer */
+ if (!(cam->frame_tmp.buffer = rvmalloc(hw_bufsize))) {
+ DBG(1, "Couldn't allocate memory for the temporary "
+ "video frame buffer (%lu bytes)", hw_bufsize)
+ return -ENOMEM;
+ }
+ cam->frame_tmp.size = hw_bufsize;
+ cam->frame_tmp.number = -1;
+
+ /* Allocate memory for the helper buffer */
+ if (w9968cf_vpp) {
+ if (!(cam->frame_vpp.buffer = rvmalloc(vpp_bufsize))) {
+ DBG(1, "Couldn't allocate memory for the helper buffer"
+ " (%lu bytes)", vpp_bufsize)
+ return -ENOMEM;
+ }
+ cam->frame_vpp.size = vpp_bufsize;
+ } else
+ cam->frame_vpp.buffer = NULL;
+
+ /* Allocate memory for video frame buffers */
+ cam->nbuffers = cam->max_buffers;
+ while (cam->nbuffers >= 2) {
+ if ((buff = rvmalloc(cam->nbuffers * vpp_bufsize)))
+ break;
+ else
+ cam->nbuffers--;
+ }
+
+ if (!buff) {
+ DBG(1, "Couldn't allocate memory for the video frame buffers")
+ cam->nbuffers = 0;
+ return -ENOMEM;
+ }
+
+ if (cam->nbuffers != cam->max_buffers)
+ DBG(2, "Couldn't allocate memory for %u video frame buffers. "
+ "Only memory for %u buffers has been allocated",
+ cam->max_buffers, cam->nbuffers)
+
+ for (i = 0; i < cam->nbuffers; i++) {
+ cam->frame[i].buffer = buff + i*vpp_bufsize;
+ cam->frame[i].size = vpp_bufsize;
+ cam->frame[i].number = i;
+ /* Circular list */
+ if (i != cam->nbuffers-1)
+ cam->frame[i].next = &cam->frame[i+1];
+ else
+ cam->frame[i].next = &cam->frame[0];
+ cam->frame[i].status = F_UNUSED;
+ }
+
+ DBG(5, "Memory successfully allocated")
+ return 0;
+}
+
+
+
+/****************************************************************************
+ * USB-specific functions *
+ ****************************************************************************/
+
+/*--------------------------------------------------------------------------
+ This is an handler function which is called after the URBs are completed.
+ It collects multiple data packets coming from the camera by putting them
+ into frame buffers: one or more zero data length data packets are used to
+ mark the end of a video frame; the first non-zero data packet is the start
+ of the next video frame; if an error is encountered in a packet, the entire
+ video frame is discarded and grabbed again.
+ If there are no requested frames in the FIFO list, packets are collected into
+ a temporary buffer.
+ --------------------------------------------------------------------------*/
+static void w9968cf_urb_complete(struct urb *urb, struct pt_regs *regs)
+{
+ struct w9968cf_device* cam = (struct w9968cf_device*)urb->context;
+ struct w9968cf_frame_t** f;
+ unsigned int len, status;
+ void* pos;
+ u8 i;
+ int err = 0;
+
+ if ((!cam->streaming) || cam->disconnected) {
+ DBG(4, "Got interrupt, but not streaming")
+ return;
+ }
+
+ /* "(*f)" will be used instead of "cam->frame_current" */
+ f = &cam->frame_current;
+
+ /* If a frame has been requested and we are grabbing into
+ the temporary frame, we'll switch to that requested frame */
+ if ((*f) == &cam->frame_tmp && *cam->requested_frame) {
+ if (cam->frame_tmp.status == F_GRABBING) {
+ w9968cf_pop_frame(cam, &cam->frame_current);
+ (*f)->status = F_GRABBING;
+ (*f)->length = cam->frame_tmp.length;
+ memcpy((*f)->buffer, cam->frame_tmp.buffer,
+ (*f)->length);
+ DBG(6, "Switched from temp. frame to frame #%d",
+ (*f)->number)
+ }
+ }
+
+ for (i = 0; i < urb->number_of_packets; i++) {
+ len = urb->iso_frame_desc[i].actual_length;
+ status = urb->iso_frame_desc[i].status;
+ pos = urb->iso_frame_desc[i].offset + urb->transfer_buffer;
+
+ if (status && len != 0) {
+ DBG(4, "URB failed, error in data packet "
+ "(error #%u, %s)",
+ status, symbolic(urb_errlist, status))
+ (*f)->status = F_ERROR;
+ continue;
+ }
+
+ if (len) { /* start of frame */
+
+ if ((*f)->status == F_UNUSED) {
+ (*f)->status = F_GRABBING;
+ (*f)->length = 0;
+ }
+
+ /* Buffer overflows shouldn't happen, however...*/
+ if ((*f)->length + len > (*f)->size) {
+ DBG(4, "Buffer overflow: bad data packets")
+ (*f)->status = F_ERROR;
+ }
+
+ if ((*f)->status == F_GRABBING) {
+ memcpy((*f)->buffer + (*f)->length, pos, len);
+ (*f)->length += len;
+ }
+
+ } else if ((*f)->status == F_GRABBING) { /* end of frame */
+
+ DBG(6, "Frame #%d successfully grabbed", (*f)->number)
+
+ if (cam->vpp_flag & VPP_DECOMPRESSION) {
+ err = w9968cf_vpp->check_headers((*f)->buffer,
+ (*f)->length);
+ if (err) {
+ DBG(4, "Skip corrupted frame: %s",
+ symbolic(decoder_errlist, err))
+ (*f)->status = F_UNUSED;
+ continue; /* grab this frame again */
+ }
+ }
+
+ (*f)->status = F_READY;
+ (*f)->queued = 0;
+
+ /* Take a pointer to the new frame from the FIFO list.
+ If the list is empty,we'll use the temporary frame*/
+ if (*cam->requested_frame)
+ w9968cf_pop_frame(cam, &cam->frame_current);
+ else {
+ cam->frame_current = &cam->frame_tmp;
+ (*f)->status = F_UNUSED;
+ }
+
+ } else if ((*f)->status == F_ERROR)
+ (*f)->status = F_UNUSED; /* grab it again */
+
+ PDBGG("Frame length %lu | pack.#%u | pack.len. %u | state %d",
+ (unsigned long)(*f)->length, i, len, (*f)->status)
+
+ } /* end for */
+
+ /* Resubmit this URB */
+ urb->dev = cam->usbdev;
+ urb->status = 0;
+ spin_lock(&cam->urb_lock);
+ if (cam->streaming)
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC))) {
+ cam->misconfigured = 1;
+ DBG(1, "Couldn't resubmit the URB: error %d, %s",
+ err, symbolic(urb_errlist, err))
+ }
+ spin_unlock(&cam->urb_lock);
+
+ /* Wake up the user process */
+ wake_up_interruptible(&cam->wait_queue);
+}
+
+
+/*---------------------------------------------------------------------------
+ Setup the URB structures for the isochronous transfer.
+ Submit the URBs so that the data transfer begins.
+ Return 0 on success, a negative number otherwise.
+ ---------------------------------------------------------------------------*/
+static int w9968cf_start_transfer(struct w9968cf_device* cam)
+{
+ struct usb_device *udev = cam->usbdev;
+ struct urb* urb;
+ const u16 p_size = wMaxPacketSize[cam->altsetting-1];
+ u16 w, h, d;
+ int vidcapt;
+ u32 t_size;
+ int err = 0;
+ s8 i, j;
+
+ for (i = 0; i < W9968CF_URBS; i++) {
+ urb = usb_alloc_urb(W9968CF_ISO_PACKETS, GFP_KERNEL);
+ cam->urb[i] = urb;
+ if (!urb) {
+ for (j = 0; j < i; j++)
+ usb_free_urb(cam->urb[j]);
+ DBG(1, "Couldn't allocate the URB structures")
+ return -ENOMEM;
+ }
+
+ urb->dev = udev;
+ urb->context = (void*)cam;
+ urb->pipe = usb_rcvisocpipe(udev, 1);
+ urb->transfer_flags = URB_ISO_ASAP;
+ urb->number_of_packets = W9968CF_ISO_PACKETS;
+ urb->complete = w9968cf_urb_complete;
+ urb->transfer_buffer = cam->transfer_buffer[i];
+ urb->transfer_buffer_length = p_size*W9968CF_ISO_PACKETS;
+ urb->interval = 1;
+ for (j = 0; j < W9968CF_ISO_PACKETS; j++) {
+ urb->iso_frame_desc[j].offset = p_size*j;
+ urb->iso_frame_desc[j].length = p_size;
+ }
+ }
+
+ /* Transfer size per frame, in WORD ! */
+ d = cam->hw_depth;
+ w = cam->hw_width;
+ h = cam->hw_height;
+
+ t_size = (w*h*d)/16;
+
+ err = w9968cf_write_reg(cam, 0xbf17, 0x00); /* reset everything */
+ err += w9968cf_write_reg(cam, 0xbf10, 0x00); /* normal operation */
+
+ /* Transfer size */
+ err += w9968cf_write_reg(cam, t_size & 0xffff, 0x3d); /* low bits */
+ err += w9968cf_write_reg(cam, t_size >> 16, 0x3e); /* high bits */
+
+ if (cam->vpp_flag & VPP_DECOMPRESSION)
+ err += w9968cf_upload_quantizationtables(cam);
+
+ vidcapt = w9968cf_read_reg(cam, 0x16); /* read picture settings */
+ err += w9968cf_write_reg(cam, vidcapt|0x8000, 0x16); /* capt. enable */
+
+ err += usb_set_interface(udev, 0, cam->altsetting);
+ err += w9968cf_write_reg(cam, 0x8a05, 0x3c); /* USB FIFO enable */
+
+ if (err || (vidcapt < 0)) {
+ for (i = 0; i < W9968CF_URBS; i++)
+ usb_free_urb(cam->urb[i]);
+ DBG(1, "Couldn't tell the camera to start the data transfer")
+ return err;
+ }
+
+ w9968cf_init_framelist(cam);
+
+ /* Begin to grab into the temporary buffer */
+ cam->frame_tmp.status = F_UNUSED;
+ cam->frame_tmp.queued = 0;
+ cam->frame_current = &cam->frame_tmp;
+
+ if (!(cam->vpp_flag & VPP_DECOMPRESSION))
+ DBG(5, "Isochronous transfer size: %lu bytes/frame",
+ (unsigned long)t_size*2)
+
+ DBG(5, "Starting the isochronous transfer...")
+
+ cam->streaming = 1;
+
+ /* Submit the URBs */
+ for (i = 0; i < W9968CF_URBS; i++) {
+ err = usb_submit_urb(cam->urb[i], GFP_KERNEL);
+ if (err) {
+ cam->streaming = 0;
+ for (j = i-1; j >= 0; j--) {
+ usb_kill_urb(cam->urb[j]);
+ usb_free_urb(cam->urb[j]);
+ }
+ DBG(1, "Couldn't send a transfer request to the "
+ "USB core (error #%d, %s)", err,
+ symbolic(urb_errlist, err))
+ return err;
+ }
+ }
+
+ return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ Stop the isochronous transfer and set alternate setting to 0 (0Mb/s).
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_stop_transfer(struct w9968cf_device* cam)
+{
+ struct usb_device *udev = cam->usbdev;
+ unsigned long lock_flags;
+ int err = 0;
+ s8 i;
+
+ if (!cam->streaming)
+ return 0;
+
+ /* This avoids race conditions with usb_submit_urb()
+ in the URB completition handler */
+ spin_lock_irqsave(&cam->urb_lock, lock_flags);
+ cam->streaming = 0;
+ spin_unlock_irqrestore(&cam->urb_lock, lock_flags);
+
+ for (i = W9968CF_URBS-1; i >= 0; i--)
+ if (cam->urb[i]) {
+ usb_kill_urb(cam->urb[i]);
+ usb_free_urb(cam->urb[i]);
+ cam->urb[i] = NULL;
+ }
+
+ if (cam->disconnected)
+ goto exit;
+
+ err = w9968cf_write_reg(cam, 0x0a05, 0x3c); /* stop USB transfer */
+ err += usb_set_interface(udev, 0, 0); /* 0 Mb/s */
+ err += w9968cf_write_reg(cam, 0x0000, 0x39); /* disable JPEG encoder */
+ err += w9968cf_write_reg(cam, 0x0000, 0x16); /* stop video capture */
+
+ if (err) {
+ DBG(2, "Failed to tell the camera to stop the isochronous "
+ "transfer. However this is not a critical error.")
+ return -EIO;
+ }
+
+exit:
+ DBG(5, "Isochronous transfer stopped")
+ return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ Write a W9968CF register.
+ Return 0 on success, -1 otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_write_reg(struct w9968cf_device* cam, u16 value, u16 index)
+{
+ struct usb_device* udev = cam->usbdev;
+ int res;
+
+ res = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0,
+ USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
+ value, index, NULL, 0, W9968CF_USB_CTRL_TIMEOUT);
+
+ if (res < 0)
+ DBG(4, "Failed to write a register "
+ "(value 0x%04X, index 0x%02X, error #%d, %s)",
+ value, index, res, symbolic(urb_errlist, res))
+
+ return (res >= 0) ? 0 : -1;
+}
+
+
+/*--------------------------------------------------------------------------
+ Read a W9968CF register.
+ Return the register value on success, -1 otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_read_reg(struct w9968cf_device* cam, u16 index)
+{
+ struct usb_device* udev = cam->usbdev;
+ u16* buff = cam->control_buffer;
+ int res;
+
+ res = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 1,
+ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ 0, index, buff, 2, W9968CF_USB_CTRL_TIMEOUT);
+
+ if (res < 0)
+ DBG(4, "Failed to read a register "
+ "(index 0x%02X, error #%d, %s)",
+ index, res, symbolic(urb_errlist, res))
+
+ return (res >= 0) ? (int)(*buff) : -1;
+}
+
+
+/*--------------------------------------------------------------------------
+ Write 64-bit data to the fast serial bus registers.
+ Return 0 on success, -1 otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_write_fsb(struct w9968cf_device* cam, u16* data)
+{
+ struct usb_device* udev = cam->usbdev;
+ u16 value;
+ int res;
+
+ value = *data++;
+
+ res = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0,
+ USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
+ value, 0x06, data, 6, W9968CF_USB_CTRL_TIMEOUT);
+
+ if (res < 0)
+ DBG(4, "Failed to write the FSB registers "
+ "(error #%d, %s)", res, symbolic(urb_errlist, res))
+
+ return (res >= 0) ? 0 : -1;
+}
+
+
+/*--------------------------------------------------------------------------
+ Write data to the serial bus control register.
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_write_sb(struct w9968cf_device* cam, u16 value)
+{
+ int err = 0;
+
+ err = w9968cf_write_reg(cam, value, 0x01);
+ udelay(W9968CF_I2C_BUS_DELAY);
+
+ return err;
+}
+
+
+/*--------------------------------------------------------------------------
+ Read data from the serial bus control register.
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_read_sb(struct w9968cf_device* cam)
+{
+ int v = 0;
+
+ v = w9968cf_read_reg(cam, 0x01);
+ udelay(W9968CF_I2C_BUS_DELAY);
+
+ return v;
+}
+
+
+/*--------------------------------------------------------------------------
+ Upload quantization tables for the JPEG compression.
+ This function is called by w9968cf_start_transfer().
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_upload_quantizationtables(struct w9968cf_device* cam)
+{
+ u16 a, b;
+ int err = 0, i, j;
+
+ err += w9968cf_write_reg(cam, 0x0010, 0x39); /* JPEG clock enable */
+
+ for (i = 0, j = 0; i < 32; i++, j += 2) {
+ a = Y_QUANTABLE[j] | ((unsigned)(Y_QUANTABLE[j+1]) << 8);
+ b = UV_QUANTABLE[j] | ((unsigned)(UV_QUANTABLE[j+1]) << 8);
+ err += w9968cf_write_reg(cam, a, 0x40+i);
+ err += w9968cf_write_reg(cam, b, 0x60+i);
+ }
+ err += w9968cf_write_reg(cam, 0x0012, 0x39); /* JPEG encoder enable */
+
+ return err;
+}
+
+
+
+/****************************************************************************
+ * Low-level I2C I/O functions. *
+ * The adapter supports the following I2C transfer functions: *
+ * i2c_adap_fastwrite_byte_data() (at 400 kHz bit frequency only) *
+ * i2c_adap_read_byte_data() *
+ * i2c_adap_read_byte() *
+ ****************************************************************************/
+
+static int w9968cf_smbus_start(struct w9968cf_device* cam)
+{
+ int err = 0;
+
+ err += w9968cf_write_sb(cam, 0x0011); /* SDE=1, SDA=0, SCL=1 */
+ err += w9968cf_write_sb(cam, 0x0010); /* SDE=1, SDA=0, SCL=0 */
+
+ return err;
+}
+
+
+static int w9968cf_smbus_stop(struct w9968cf_device* cam)
+{
+ int err = 0;
+
+ err += w9968cf_write_sb(cam, 0x0011); /* SDE=1, SDA=0, SCL=1 */
+ err += w9968cf_write_sb(cam, 0x0013); /* SDE=1, SDA=1, SCL=1 */
+
+ return err;
+}
+
+
+static int w9968cf_smbus_write_byte(struct w9968cf_device* cam, u8 v)
+{
+ u8 bit;
+ int err = 0, sda;
+
+ for (bit = 0 ; bit < 8 ; bit++) {
+ sda = (v & 0x80) ? 2 : 0;
+ v <<= 1;
+ /* SDE=1, SDA=sda, SCL=0 */
+ err += w9968cf_write_sb(cam, 0x10 | sda);
+ /* SDE=1, SDA=sda, SCL=1 */
+ err += w9968cf_write_sb(cam, 0x11 | sda);
+ /* SDE=1, SDA=sda, SCL=0 */
+ err += w9968cf_write_sb(cam, 0x10 | sda);
+ }
+
+ return err;
+}
+
+
+static int w9968cf_smbus_read_byte(struct w9968cf_device* cam, u8* v)
+{
+ u8 bit;
+ int err = 0;
+
+ *v = 0;
+ for (bit = 0 ; bit < 8 ; bit++) {
+ *v <<= 1;
+ err += w9968cf_write_sb(cam, 0x0013);
+ *v |= (w9968cf_read_sb(cam) & 0x0008) ? 1 : 0;
+ err += w9968cf_write_sb(cam, 0x0012);
+ }
+
+ return err;
+}
+
+
+static int w9968cf_smbus_write_ack(struct w9968cf_device* cam)
+{
+ int err = 0;
+
+ err += w9968cf_write_sb(cam, 0x0010); /* SDE=1, SDA=0, SCL=0 */
+ err += w9968cf_write_sb(cam, 0x0011); /* SDE=1, SDA=0, SCL=1 */
+ err += w9968cf_write_sb(cam, 0x0010); /* SDE=1, SDA=0, SCL=0 */
+
+ return err;
+}
+
+
+static int w9968cf_smbus_read_ack(struct w9968cf_device* cam)
+{
+ int err = 0, sda;
+
+ err += w9968cf_write_sb(cam, 0x0013); /* SDE=1, SDA=1, SCL=1 */
+ sda = (w9968cf_read_sb(cam) & 0x08) ? 1 : 0; /* sda = SDA */
+ err += w9968cf_write_sb(cam, 0x0012); /* SDE=1, SDA=1, SCL=0 */
+ if (sda < 0)
+ err += sda;
+ if (sda == 1) {
+ DBG(6, "Couldn't receive the ACK")
+ err += -1;
+ }
+
+ return err;
+}
+
+
+/* This seems to refresh the communication through the serial bus */
+static int w9968cf_smbus_refresh_bus(struct w9968cf_device* cam)
+{
+ int err = 0, j;
+
+ for (j = 1; j <= 10; j++) {
+ err = w9968cf_write_reg(cam, 0x0020, 0x01);
+ err += w9968cf_write_reg(cam, 0x0000, 0x01);
+ if (err)
+ break;
+ }
+
+ return err;
+}
+
+
+/* SMBus protocol: S Addr Wr [A] Subaddr [A] Value [A] P */
+static int
+w9968cf_i2c_adap_fastwrite_byte_data(struct w9968cf_device* cam,
+ u16 address, u8 subaddress,u8 value)
+{
+ u16* data = cam->data_buffer;
+ int err = 0;
+
+ err += w9968cf_smbus_refresh_bus(cam);
+
+ /* Enable SBUS outputs */
+ err += w9968cf_write_sb(cam, 0x0020);
+
+ data[0] = 0x082f | ((address & 0x80) ? 0x1500 : 0x0);
+ data[0] |= (address & 0x40) ? 0x4000 : 0x0;
+ data[1] = 0x2082 | ((address & 0x40) ? 0x0005 : 0x0);
+ data[1] |= (address & 0x20) ? 0x0150 : 0x0;
+ data[1] |= (address & 0x10) ? 0x5400 : 0x0;
+ data[2] = 0x8208 | ((address & 0x08) ? 0x0015 : 0x0);
+ data[2] |= (address & 0x04) ? 0x0540 : 0x0;
+ data[2] |= (address & 0x02) ? 0x5000 : 0x0;
+ data[3] = 0x1d20 | ((address & 0x02) ? 0x0001 : 0x0);
+ data[3] |= (address & 0x01) ? 0x0054 : 0x0;
+
+ err += w9968cf_write_fsb(cam, data);
+
+ data[0] = 0x8208 | ((subaddress & 0x80) ? 0x0015 : 0x0);
+ data[0] |= (subaddress & 0x40) ? 0x0540 : 0x0;
+ data[0] |= (subaddress & 0x20) ? 0x5000 : 0x0;
+ data[1] = 0x0820 | ((subaddress & 0x20) ? 0x0001 : 0x0);
+ data[1] |= (subaddress & 0x10) ? 0x0054 : 0x0;
+ data[1] |= (subaddress & 0x08) ? 0x1500 : 0x0;
+ data[1] |= (subaddress & 0x04) ? 0x4000 : 0x0;
+ data[2] = 0x2082 | ((subaddress & 0x04) ? 0x0005 : 0x0);
+ data[2] |= (subaddress & 0x02) ? 0x0150 : 0x0;
+ data[2] |= (subaddress & 0x01) ? 0x5400 : 0x0;
+ data[3] = 0x001d;
+
+ err += w9968cf_write_fsb(cam, data);
+
+ data[0] = 0x8208 | ((value & 0x80) ? 0x0015 : 0x0);
+ data[0] |= (value & 0x40) ? 0x0540 : 0x0;
+ data[0] |= (value & 0x20) ? 0x5000 : 0x0;
+ data[1] = 0x0820 | ((value & 0x20) ? 0x0001 : 0x0);
+ data[1] |= (value & 0x10) ? 0x0054 : 0x0;
+ data[1] |= (value & 0x08) ? 0x1500 : 0x0;
+ data[1] |= (value & 0x04) ? 0x4000 : 0x0;
+ data[2] = 0x2082 | ((value & 0x04) ? 0x0005 : 0x0);
+ data[2] |= (value & 0x02) ? 0x0150 : 0x0;
+ data[2] |= (value & 0x01) ? 0x5400 : 0x0;
+ data[3] = 0xfe1d;
+
+ err += w9968cf_write_fsb(cam, data);
+
+ /* Disable SBUS outputs */
+ err += w9968cf_write_sb(cam, 0x0000);
+
+ if (!err)
+ DBG(5, "I2C write byte data done, addr.0x%04X, subaddr.0x%02X "
+ "value 0x%02X", address, subaddress, value)
+ else
+ DBG(5, "I2C write byte data failed, addr.0x%04X, "
+ "subaddr.0x%02X, value 0x%02X",
+ address, subaddress, value)
+
+ return err;
+}
+
+
+/* SMBus protocol: S Addr Wr [A] Subaddr [A] P S Addr+1 Rd [A] [Value] NA P */
+static int
+w9968cf_i2c_adap_read_byte_data(struct w9968cf_device* cam,
+ u16 address, u8 subaddress,
+ u8* value)
+{
+ int err = 0;
+
+ /* Serial data enable */
+ err += w9968cf_write_sb(cam, 0x0013); /* don't change ! */
+
+ err += w9968cf_smbus_start(cam);
+ err += w9968cf_smbus_write_byte(cam, address);
+ err += w9968cf_smbus_read_ack(cam);
+ err += w9968cf_smbus_write_byte(cam, subaddress);
+ err += w9968cf_smbus_read_ack(cam);
+ err += w9968cf_smbus_stop(cam);
+ err += w9968cf_smbus_start(cam);
+ err += w9968cf_smbus_write_byte(cam, address + 1);
+ err += w9968cf_smbus_read_ack(cam);
+ err += w9968cf_smbus_read_byte(cam, value);
+ err += w9968cf_smbus_write_ack(cam);
+ err += w9968cf_smbus_stop(cam);
+
+ /* Serial data disable */
+ err += w9968cf_write_sb(cam, 0x0000);
+
+ if (!err)
+ DBG(5, "I2C read byte data done, addr.0x%04X, "
+ "subaddr.0x%02X, value 0x%02X",
+ address, subaddress, *value)
+ else
+ DBG(5, "I2C read byte data failed, addr.0x%04X, "
+ "subaddr.0x%02X, wrong value 0x%02X",
+ address, subaddress, *value)
+
+ return err;
+}
+
+
+/* SMBus protocol: S Addr+1 Rd [A] [Value] NA P */
+static int
+w9968cf_i2c_adap_read_byte(struct w9968cf_device* cam,
+ u16 address, u8* value)
+{
+ int err = 0;
+
+ /* Serial data enable */
+ err += w9968cf_write_sb(cam, 0x0013);
+
+ err += w9968cf_smbus_start(cam);
+ err += w9968cf_smbus_write_byte(cam, address + 1);
+ err += w9968cf_smbus_read_ack(cam);
+ err += w9968cf_smbus_read_byte(cam, value);
+ err += w9968cf_smbus_write_ack(cam);
+ err += w9968cf_smbus_stop(cam);
+
+ /* Serial data disable */
+ err += w9968cf_write_sb(cam, 0x0000);
+
+ if (!err)
+ DBG(5, "I2C read byte done, addr.0x%04X, "
+ "value 0x%02X", address, *value)
+ else
+ DBG(5, "I2C read byte failed, addr.0x%04X, "
+ "wrong value 0x%02X", address, *value)
+
+ return err;
+}
+
+
+/* SMBus protocol: S Addr Wr [A] Value [A] P */
+static int
+w9968cf_i2c_adap_write_byte(struct w9968cf_device* cam,
+ u16 address, u8 value)
+{
+ DBG(4, "i2c_write_byte() is an unsupported transfer mode")
+ return -EINVAL;
+}
+
+
+
+/****************************************************************************
+ * I2C interface to kernel *
+ ****************************************************************************/
+
+static int
+w9968cf_i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
+ unsigned short flags, char read_write, u8 command,
+ int size, union i2c_smbus_data *data)
+{
+ struct w9968cf_device* cam = i2c_get_adapdata(adapter);
+ u8 i;
+ int err = 0;
+
+ switch (addr) {
+ case OV6xx0_SID:
+ case OV7xx0_SID:
+ break;
+ default:
+ DBG(4, "Rejected slave ID 0x%04X", addr)
+ return -EINVAL;
+ }
+
+ if (size == I2C_SMBUS_BYTE) {
+ /* Why addr <<= 1? See OVXXX0_SID defines in ovcamchip.h */
+ addr <<= 1;
+
+ if (read_write == I2C_SMBUS_WRITE)
+ err = w9968cf_i2c_adap_write_byte(cam, addr, command);
+ else if (read_write == I2C_SMBUS_READ)
+ err = w9968cf_i2c_adap_read_byte(cam,addr,&data->byte);
+
+ } else if (size == I2C_SMBUS_BYTE_DATA) {
+ addr <<= 1;
+
+ if (read_write == I2C_SMBUS_WRITE)
+ err = w9968cf_i2c_adap_fastwrite_byte_data(cam, addr,
+ command, data->byte);
+ else if (read_write == I2C_SMBUS_READ) {
+ for (i = 1; i <= W9968CF_I2C_RW_RETRIES; i++) {
+ err = w9968cf_i2c_adap_read_byte_data(cam,addr,
+ command, &data->byte);
+ if (err) {
+ if (w9968cf_smbus_refresh_bus(cam)) {
+ err = -EIO;
+ break;
+ }
+ } else
+ break;
+ }
+
+ } else
+ return -EINVAL;
+
+ } else {
+ DBG(4, "Unsupported I2C transfer mode (%d)", size)
+ return -EINVAL;
+ }
+
+ return err;
+}
+
+
+static u32 w9968cf_i2c_func(struct i2c_adapter* adap)
+{
+ return I2C_FUNC_SMBUS_READ_BYTE |
+ I2C_FUNC_SMBUS_READ_BYTE_DATA |
+ I2C_FUNC_SMBUS_WRITE_BYTE_DATA;
+}
+
+
+static int w9968cf_i2c_attach_inform(struct i2c_client* client)
+{
+ struct w9968cf_device* cam = i2c_get_adapdata(client->adapter);
+ const char* clientname = i2c_clientname(client);
+ int id = client->driver->id, err = 0;
+
+ if (id == I2C_DRIVERID_OVCAMCHIP) {
+ cam->sensor_client = client;
+ err = w9968cf_sensor_init(cam);
+ if (err) {
+ cam->sensor_client = NULL;
+ return err;
+ }
+ } else {
+ DBG(4, "Rejected client [%s] with driver [%s]",
+ clientname, client->driver->name)
+ return -EINVAL;
+ }
+
+ DBG(5, "I2C attach client [%s] with driver [%s]",
+ clientname, client->driver->name)
+
+ return 0;
+}
+
+
+static int w9968cf_i2c_detach_inform(struct i2c_client* client)
+{
+ struct w9968cf_device* cam = i2c_get_adapdata(client->adapter);
+ const char* clientname = i2c_clientname(client);
+
+ if (cam->sensor_client == client)
+ cam->sensor_client = NULL;
+
+ DBG(5, "I2C detach client [%s]", clientname)
+
+ return 0;
+}
+
+
+static int
+w9968cf_i2c_control(struct i2c_adapter* adapter, unsigned int cmd,
+ unsigned long arg)
+{
+ return 0;
+}
+
+
+static int w9968cf_i2c_init(struct w9968cf_device* cam)
+{
+ int err = 0;
+
+ static struct i2c_algorithm algo = {
+ .name = "W996[87]CF algorithm",
+ .id = I2C_ALGO_SMBUS,
+ .smbus_xfer = w9968cf_i2c_smbus_xfer,
+ .algo_control = w9968cf_i2c_control,
+ .functionality = w9968cf_i2c_func,
+ };
+
+ static struct i2c_adapter adap = {
+ .id = I2C_ALGO_SMBUS | I2C_HW_SMBUS_W9968CF,
+ .class = I2C_CLASS_CAM_DIGITAL,
+ .owner = THIS_MODULE,
+ .client_register = w9968cf_i2c_attach_inform,
+ .client_unregister = w9968cf_i2c_detach_inform,
+ .algo = &algo,
+ };
+
+ memcpy(&cam->i2c_adapter, &adap, sizeof(struct i2c_adapter));
+ strcpy(cam->i2c_adapter.name, "w9968cf");
+ i2c_set_adapdata(&cam->i2c_adapter, cam);
+
+ DBG(6, "Registering I2C adapter with kernel...")
+
+ err = i2c_add_adapter(&cam->i2c_adapter);
+ if (err)
+ DBG(1, "Failed to register the I2C adapter")
+ else
+ DBG(5, "I2C adapter registered")
+
+ return err;
+}
+
+
+
+/****************************************************************************
+ * Helper functions *
+ ****************************************************************************/
+
+/*--------------------------------------------------------------------------
+ Turn on the LED on some webcams. A beep should be heard too.
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_turn_on_led(struct w9968cf_device* cam)
+{
+ int err = 0;
+
+ err += w9968cf_write_reg(cam, 0xff00, 0x00); /* power-down */
+ err += w9968cf_write_reg(cam, 0xbf17, 0x00); /* reset everything */
+ err += w9968cf_write_reg(cam, 0xbf10, 0x00); /* normal operation */
+ err += w9968cf_write_reg(cam, 0x0010, 0x01); /* serial bus, SDS high */
+ err += w9968cf_write_reg(cam, 0x0000, 0x01); /* serial bus, SDS low */
+ err += w9968cf_write_reg(cam, 0x0010, 0x01); /* ..high 'beep-beep' */
+
+ if (err)
+ DBG(2, "Couldn't turn on the LED")
+
+ DBG(5, "LED turned on")
+
+ return err;
+}
+
+
+/*--------------------------------------------------------------------------
+ Write some registers for the device initialization.
+ This function is called once on open().
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_init_chip(struct w9968cf_device* cam)
+{
+ unsigned long hw_bufsize = cam->maxwidth*cam->maxheight*2,
+ y0 = 0x0000,
+ u0 = y0 + hw_bufsize/2,
+ v0 = u0 + hw_bufsize/4,
+ y1 = v0 + hw_bufsize/4,
+ u1 = y1 + hw_bufsize/2,
+ v1 = u1 + hw_bufsize/4;
+ int err = 0;
+
+ err += w9968cf_write_reg(cam, 0xff00, 0x00); /* power off */
+ err += w9968cf_write_reg(cam, 0xbf10, 0x00); /* power on */
+
+ err += w9968cf_write_reg(cam, 0x405d, 0x03); /* DRAM timings */
+ err += w9968cf_write_reg(cam, 0x0030, 0x04); /* SDRAM timings */
+
+ err += w9968cf_write_reg(cam, y0 & 0xffff, 0x20); /* Y buf.0, low */
+ err += w9968cf_write_reg(cam, y0 >> 16, 0x21); /* Y buf.0, high */
+ err += w9968cf_write_reg(cam, u0 & 0xffff, 0x24); /* U buf.0, low */
+ err += w9968cf_write_reg(cam, u0 >> 16, 0x25); /* U buf.0, high */
+ err += w9968cf_write_reg(cam, v0 & 0xffff, 0x28); /* V buf.0, low */
+ err += w9968cf_write_reg(cam, v0 >> 16, 0x29); /* V buf.0, high */
+
+ err += w9968cf_write_reg(cam, y1 & 0xffff, 0x22); /* Y buf.1, low */
+ err += w9968cf_write_reg(cam, y1 >> 16, 0x23); /* Y buf.1, high */
+ err += w9968cf_write_reg(cam, u1 & 0xffff, 0x26); /* U buf.1, low */
+ err += w9968cf_write_reg(cam, u1 >> 16, 0x27); /* U buf.1, high */
+ err += w9968cf_write_reg(cam, v1 & 0xffff, 0x2a); /* V buf.1, low */
+ err += w9968cf_write_reg(cam, v1 >> 16, 0x2b); /* V buf.1, high */
+
+ err += w9968cf_write_reg(cam, y1 & 0xffff, 0x32); /* JPEG buf 0 low */
+ err += w9968cf_write_reg(cam, y1 >> 16, 0x33); /* JPEG buf 0 high */
+
+ err += w9968cf_write_reg(cam, y1 & 0xffff, 0x34); /* JPEG buf 1 low */
+ err += w9968cf_write_reg(cam, y1 >> 16, 0x35); /* JPEG bug 1 high */
+
+ err += w9968cf_write_reg(cam, 0x0000, 0x36);/* JPEG restart interval */
+ err += w9968cf_write_reg(cam, 0x0804, 0x37);/*JPEG VLE FIFO threshold*/
+ err += w9968cf_write_reg(cam, 0x0000, 0x38);/* disable hw up-scaling */
+ err += w9968cf_write_reg(cam, 0x0000, 0x3f); /* JPEG/MCTL test data */
+
+ err += w9968cf_set_picture(cam, cam->picture); /* this before */
+ err += w9968cf_set_window(cam, cam->window);
+
+ if (err)
+ DBG(1, "Chip initialization failed")
+ else
+ DBG(5, "Chip successfully initialized")
+
+ return err;
+}
+
+
+/*--------------------------------------------------------------------------
+ Return non-zero if the palette is supported, 0 otherwise.
+ --------------------------------------------------------------------------*/
+static inline u16 w9968cf_valid_palette(u16 palette)
+{
+ u8 i = 0;
+ while (w9968cf_formatlist[i].palette != 0) {
+ if (palette == w9968cf_formatlist[i].palette)
+ return palette;
+ i++;
+ }
+ return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ Return the depth corresponding to the given palette.
+ Palette _must_ be supported !
+ --------------------------------------------------------------------------*/
+static inline u16 w9968cf_valid_depth(u16 palette)
+{
+ u8 i=0;
+ while (w9968cf_formatlist[i].palette != palette)
+ i++;
+
+ return w9968cf_formatlist[i].depth;
+}
+
+
+/*--------------------------------------------------------------------------
+ Return non-zero if the format requires decompression, 0 otherwise.
+ --------------------------------------------------------------------------*/
+static inline u8 w9968cf_need_decompression(u16 palette)
+{
+ u8 i = 0;
+ while (w9968cf_formatlist[i].palette != 0) {
+ if (palette == w9968cf_formatlist[i].palette)
+ return w9968cf_formatlist[i].compression;
+ i++;
+ }
+ return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ Change the picture settings of the camera.
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int
+w9968cf_set_picture(struct w9968cf_device* cam, struct video_picture pict)
+{
+ u16 fmt, hw_depth, hw_palette, reg_v = 0x0000;
+ int err = 0;
+
+ /* Make sure we are using a valid depth */
+ pict.depth = w9968cf_valid_depth(pict.palette);
+
+ fmt = pict.palette;
+
+ hw_depth = pict.depth; /* depth used by the winbond chip */
+ hw_palette = pict.palette; /* palette used by the winbond chip */
+
+ /* VS & HS polarities */
+ reg_v = (cam->vs_polarity << 12) | (cam->hs_polarity << 11);
+
+ switch (fmt)
+ {
+ case VIDEO_PALETTE_UYVY:
+ reg_v |= 0x0000;
+ cam->vpp_flag = VPP_NONE;
+ break;
+ case VIDEO_PALETTE_YUV422P:
+ reg_v |= 0x0002;
+ cam->vpp_flag = VPP_DECOMPRESSION;
+ break;
+ case VIDEO_PALETTE_YUV420:
+ case VIDEO_PALETTE_YUV420P:
+ reg_v |= 0x0003;
+ cam->vpp_flag = VPP_DECOMPRESSION;
+ break;
+ case VIDEO_PALETTE_YUYV:
+ case VIDEO_PALETTE_YUV422:
+ reg_v |= 0x0000;
+ cam->vpp_flag = VPP_SWAP_YUV_BYTES;
+ hw_palette = VIDEO_PALETTE_UYVY;
+ break;
+ /* Original video is used instead of RGBX palettes.
+ Software conversion later. */
+ case VIDEO_PALETTE_GREY:
+ case VIDEO_PALETTE_RGB555:
+ case VIDEO_PALETTE_RGB565:
+ case VIDEO_PALETTE_RGB24:
+ case VIDEO_PALETTE_RGB32:
+ reg_v |= 0x0000; /* UYVY 16 bit is used */
+ hw_depth = 16;
+ hw_palette = VIDEO_PALETTE_UYVY;
+ cam->vpp_flag = VPP_UYVY_TO_RGBX;
+ break;
+ }
+
+ /* NOTE: due to memory issues, it is better to disable the hardware
+ double buffering during compression */
+ if (cam->double_buffer && !(cam->vpp_flag & VPP_DECOMPRESSION))
+ reg_v |= 0x0080;
+
+ if (cam->clamping)
+ reg_v |= 0x0020;
+
+ if (cam->filter_type == 1)
+ reg_v |= 0x0008;
+ else if (cam->filter_type == 2)
+ reg_v |= 0x000c;
+
+ if ((err = w9968cf_write_reg(cam, reg_v, 0x16)))
+ goto error;
+
+ if ((err = w9968cf_sensor_update_picture(cam, pict)))
+ goto error;
+
+ /* If all went well, update the device data structure */
+ memcpy(&cam->picture, &pict, sizeof(pict));
+ cam->hw_depth = hw_depth;
+ cam->hw_palette = hw_palette;
+
+ /* Settings changed, so we clear the frame buffers */
+ memset(cam->frame[0].buffer, 0, cam->nbuffers*cam->frame[0].size);
+
+ DBG(4, "Palette is %s, depth is %u bpp",
+ symbolic(v4l1_plist, pict.palette), pict.depth)
+
+ return 0;
+
+error:
+ DBG(1, "Failed to change picture settings")
+ return err;
+}
+
+
+/*--------------------------------------------------------------------------
+ Change the capture area size of the camera.
+ This function _must_ be called _after_ w9968cf_set_picture().
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int
+w9968cf_set_window(struct w9968cf_device* cam, struct video_window win)
+{
+ u16 x, y, w, h, scx, scy, cw, ch, ax, ay;
+ unsigned long fw, fh;
+ struct ovcamchip_window s_win;
+ int err = 0;
+
+ /* Work around to avoid FP arithmetics */
+ #define __SC(x) ((x) << 10)
+ #define __UNSC(x) ((x) >> 10)
+
+ /* Make sure we are using a supported resolution */
+ if ((err = w9968cf_adjust_window_size(cam, (u16*)&win.width,
+ (u16*)&win.height)))
+ goto error;
+
+ /* Scaling factors */
+ fw = __SC(win.width) / cam->maxwidth;
+ fh = __SC(win.height) / cam->maxheight;
+
+ /* Set up the width and height values used by the chip */
+ if ((win.width > cam->maxwidth) || (win.height > cam->maxheight)) {
+ cam->vpp_flag |= VPP_UPSCALE;
+ /* Calculate largest w,h mantaining the same w/h ratio */
+ w = (fw >= fh) ? cam->maxwidth : __SC(win.width)/fh;
+ h = (fw >= fh) ? __SC(win.height)/fw : cam->maxheight;
+ if (w < cam->minwidth) /* just in case */
+ w = cam->minwidth;
+ if (h < cam->minheight) /* just in case */
+ h = cam->minheight;
+ } else {
+ cam->vpp_flag &= ~VPP_UPSCALE;
+ w = win.width;
+ h = win.height;
+ }
+
+ /* x,y offsets of the cropped area */
+ scx = cam->start_cropx;
+ scy = cam->start_cropy;
+
+ /* Calculate cropped area manteining the right w/h ratio */
+ if (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE)) {
+ cw = (fw >= fh) ? cam->maxwidth : __SC(win.width)/fh;
+ ch = (fw >= fh) ? __SC(win.height)/fw : cam->maxheight;
+ } else {
+ cw = w;
+ ch = h;
+ }
+
+ /* Setup the window of the sensor */
+ s_win.format = VIDEO_PALETTE_UYVY;
+ s_win.width = cam->maxwidth;
+ s_win.height = cam->maxheight;
+ s_win.quarter = 0; /* full progressive video */
+
+ /* Center it */
+ s_win.x = (s_win.width - cw) / 2;
+ s_win.y = (s_win.height - ch) / 2;
+
+ /* Clock divisor */
+ if (cam->clockdiv >= 0)
+ s_win.clockdiv = cam->clockdiv; /* manual override */
+ else
+ switch (cam->sensor) {
+ case CC_OV6620:
+ s_win.clockdiv = 0;
+ break;
+ case CC_OV6630:
+ s_win.clockdiv = 0;
+ break;
+ case CC_OV76BE:
+ case CC_OV7610:
+ case CC_OV7620:
+ s_win.clockdiv = 0;
+ break;
+ default:
+ s_win.clockdiv = W9968CF_DEF_CLOCKDIVISOR;
+ }
+
+ /* We have to scale win.x and win.y offsets */
+ if ( (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE))
+ || (cam->vpp_flag & VPP_UPSCALE) ) {
+ ax = __SC(win.x)/fw;
+ ay = __SC(win.y)/fh;
+ } else {
+ ax = win.x;
+ ay = win.y;
+ }
+
+ if ((ax + cw) > cam->maxwidth)
+ ax = cam->maxwidth - cw;
+
+ if ((ay + ch) > cam->maxheight)
+ ay = cam->maxheight - ch;
+
+ /* Adjust win.x, win.y */
+ if ( (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE))
+ || (cam->vpp_flag & VPP_UPSCALE) ) {
+ win.x = __UNSC(ax*fw);
+ win.y = __UNSC(ay*fh);
+ } else {
+ win.x = ax;
+ win.y = ay;
+ }
+
+ /* Offsets used by the chip */
+ x = ax + s_win.x;
+ y = ay + s_win.y;
+
+ /* Go ! */
+ if ((err = w9968cf_sensor_cmd(cam, OVCAMCHIP_CMD_S_MODE, &s_win)))
+ goto error;
+
+ err += w9968cf_write_reg(cam, scx + x, 0x10);
+ err += w9968cf_write_reg(cam, scy + y, 0x11);
+ err += w9968cf_write_reg(cam, scx + x + cw, 0x12);
+ err += w9968cf_write_reg(cam, scy + y + ch, 0x13);
+ err += w9968cf_write_reg(cam, w, 0x14);
+ err += w9968cf_write_reg(cam, h, 0x15);
+
+ /* JPEG width & height */
+ err += w9968cf_write_reg(cam, w, 0x30);
+ err += w9968cf_write_reg(cam, h, 0x31);
+
+ /* Y & UV frame buffer strides (in WORD) */
+ if (cam->vpp_flag & VPP_DECOMPRESSION) {
+ err += w9968cf_write_reg(cam, w/2, 0x2c);
+ err += w9968cf_write_reg(cam, w/4, 0x2d);
+ } else
+ err += w9968cf_write_reg(cam, w, 0x2c);
+
+ if (err)
+ goto error;
+
+ /* If all went well, update the device data structure */
+ memcpy(&cam->window, &win, sizeof(win));
+ cam->hw_width = w;
+ cam->hw_height = h;
+
+ /* Settings changed, so we clear the frame buffers */
+ memset(cam->frame[0].buffer, 0, cam->nbuffers*cam->frame[0].size);
+
+ DBG(4, "The capture area is %dx%d, Offset (x,y)=(%u,%u)",
+ win.width, win.height, win.x, win.y)
+
+ PDBGG("x=%u ,y=%u, w=%u, h=%u, ax=%u, ay=%u, s_win.x=%u, s_win.y=%u, "
+ "cw=%u, ch=%u, win.x=%u, win.y=%u, win.width=%u, win.height=%u",
+ x, y, w, h, ax, ay, s_win.x, s_win.y, cw, ch, win.x, win.y,
+ win.width, win.height)
+
+ return 0;
+
+error:
+ DBG(1, "Failed to change the capture area size")
+ return err;
+}
+
+
+/*--------------------------------------------------------------------------
+ Adjust the asked values for window width and height.
+ Return 0 on success, -1 otherwise.
+ --------------------------------------------------------------------------*/
+static int
+w9968cf_adjust_window_size(struct w9968cf_device* cam, u16* width, u16* height)
+{
+ u16 maxw, maxh;
+
+ if ((*width < cam->minwidth) || (*height < cam->minheight))
+ return -ERANGE;
+
+ maxw = cam->upscaling && !(cam->vpp_flag & VPP_DECOMPRESSION) &&
+ w9968cf_vpp ? max((u16)W9968CF_MAX_WIDTH, cam->maxwidth)
+ : cam->maxwidth;
+ maxh = cam->upscaling && !(cam->vpp_flag & VPP_DECOMPRESSION) &&
+ w9968cf_vpp ? max((u16)W9968CF_MAX_HEIGHT, cam->maxheight)
+ : cam->maxheight;
+
+ if (*width > maxw)
+ *width = maxw;
+ if (*height > maxh)
+ *height = maxh;
+
+ if (cam->vpp_flag & VPP_DECOMPRESSION) {
+ *width &= ~15L; /* multiple of 16 */
+ *height &= ~15L;
+ }
+
+ PDBGG("Window size adjusted w=%u, h=%u ", *width, *height)
+
+ return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ Initialize the FIFO list of requested frames.
+ --------------------------------------------------------------------------*/
+static void w9968cf_init_framelist(struct w9968cf_device* cam)
+{
+ u8 i;
+
+ for (i = 0; i < cam->nbuffers; i++) {
+ cam->requested_frame[i] = NULL;
+ cam->frame[i].queued = 0;
+ cam->frame[i].status = F_UNUSED;
+ }
+}
+
+
+/*--------------------------------------------------------------------------
+ Add a frame in the FIFO list of requested frames.
+ This function is called in process context.
+ --------------------------------------------------------------------------*/
+static void w9968cf_push_frame(struct w9968cf_device* cam, u8 f_num)
+{
+ u8 f;
+ unsigned long lock_flags;
+
+ spin_lock_irqsave(&cam->flist_lock, lock_flags);
+
+ for (f=0; cam->requested_frame[f] != NULL; f++);
+ cam->requested_frame[f] = &cam->frame[f_num];
+ cam->frame[f_num].queued = 1;
+ cam->frame[f_num].status = F_UNUSED; /* clear the status */
+
+ spin_unlock_irqrestore(&cam->flist_lock, lock_flags);
+
+ DBG(6, "Frame #%u pushed into the FIFO list. Position %u", f_num, f)
+}
+
+
+/*--------------------------------------------------------------------------
+ Read, store and remove the first pointer in the FIFO list of requested
+ frames. This function is called in interrupt context.
+ --------------------------------------------------------------------------*/
+static void
+w9968cf_pop_frame(struct w9968cf_device* cam, struct w9968cf_frame_t** framep)
+{
+ u8 i;
+
+ spin_lock(&cam->flist_lock);
+
+ *framep = cam->requested_frame[0];
+
+ /* Shift the list of pointers */
+ for (i = 0; i < cam->nbuffers-1; i++)
+ cam->requested_frame[i] = cam->requested_frame[i+1];
+ cam->requested_frame[i] = NULL;
+
+ spin_unlock(&cam->flist_lock);
+
+ DBG(6,"Popped frame #%d from the list", (*framep)->number)
+}
+
+
+/*--------------------------------------------------------------------------
+ High-level video post-processing routine on grabbed frames.
+ Return 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int
+w9968cf_postprocess_frame(struct w9968cf_device* cam,
+ struct w9968cf_frame_t* fr)
+{
+ void *pIn = fr->buffer, *pOut = cam->frame_vpp.buffer, *tmp;
+ u16 w = cam->window.width,
+ h = cam->window.height,
+ d = cam->picture.depth,
+ fmt = cam->picture.palette,
+ rgb = cam->force_rgb,
+ hw_w = cam->hw_width,
+ hw_h = cam->hw_height,
+ hw_d = cam->hw_depth;
+ int err = 0;
+
+ #define _PSWAP(pIn, pOut) {tmp = (pIn); (pIn) = (pOut); (pOut) = tmp;}
+
+ if (cam->vpp_flag & VPP_DECOMPRESSION) {
+ memcpy(pOut, pIn, fr->length);
+ _PSWAP(pIn, pOut)
+ err = w9968cf_vpp->decode(pIn, fr->length, hw_w, hw_h, pOut);
+ PDBGG("Compressed frame length: %lu",(unsigned long)fr->length)
+ fr->length = (hw_w*hw_h*hw_d)/8;
+ _PSWAP(pIn, pOut)
+ if (err) {
+ DBG(4, "An error occurred while decoding the frame: "
+ "%s", symbolic(decoder_errlist, err))
+ return err;
+ } else
+ DBG(6, "Frame decoded")
+ }
+
+ if (cam->vpp_flag & VPP_SWAP_YUV_BYTES) {
+ w9968cf_vpp->swap_yuvbytes(pIn, fr->length);
+ DBG(6, "Original UYVY component ordering changed")
+ }
+
+ if (cam->vpp_flag & VPP_UPSCALE) {
+ w9968cf_vpp->scale_up(pIn, pOut, hw_w, hw_h, hw_d, w, h);
+ fr->length = (w*h*hw_d)/8;
+ _PSWAP(pIn, pOut)
+ DBG(6, "Vertical up-scaling done: %u,%u,%ubpp->%u,%u",
+ hw_w, hw_h, hw_d, w, h)
+ }
+
+ if (cam->vpp_flag & VPP_UYVY_TO_RGBX) {
+ w9968cf_vpp->uyvy_to_rgbx(pIn, fr->length, pOut, fmt, rgb);
+ fr->length = (w*h*d)/8;
+ _PSWAP(pIn, pOut)
+ DBG(6, "UYVY-16bit to %s conversion done",
+ symbolic(v4l1_plist, fmt))
+ }
+
+ if (pOut == fr->buffer)
+ memcpy(fr->buffer, cam->frame_vpp.buffer, fr->length);
+
+ return 0;
+}
+
+
+
+/****************************************************************************
+ * Image sensor control routines *
+ ****************************************************************************/
+
+static int
+w9968cf_sensor_set_control(struct w9968cf_device* cam, int cid, int val)
+{
+ struct ovcamchip_control ctl;
+ int err;
+
+ ctl.id = cid;
+ ctl.value = val;
+
+ err = w9968cf_sensor_cmd(cam, OVCAMCHIP_CMD_S_CTRL, &ctl);
+
+ return err;
+}
+
+
+static int
+w9968cf_sensor_get_control(struct w9968cf_device* cam, int cid, int* val)
+{
+ struct ovcamchip_control ctl;
+ int err;
+
+ ctl.id = cid;
+
+ err = w9968cf_sensor_cmd(cam, OVCAMCHIP_CMD_G_CTRL, &ctl);
+ if (!err)
+ *val = ctl.value;
+
+ return err;
+}
+
+
+static int
+w9968cf_sensor_cmd(struct w9968cf_device* cam, unsigned int cmd, void* arg)
+{
+ struct i2c_client* c = cam->sensor_client;
+ int rc = 0;
+
+ if (!c || !c->driver || !c->driver->command)
+ return -EINVAL;
+
+ rc = c->driver->command(c, cmd, arg);
+ /* The I2C driver returns -EPERM on non-supported controls */
+ return (rc < 0 && rc != -EPERM) ? rc : 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ Update some settings of the image sensor.
+ Returns: 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_sensor_update_settings(struct w9968cf_device* cam)
+{
+ int err = 0;
+
+ /* Auto brightness */
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_AUTOBRIGHT,
+ cam->auto_brt);
+ if (err)
+ return err;
+
+ /* Auto exposure */
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_AUTOEXP,
+ cam->auto_exp);
+ if (err)
+ return err;
+
+ /* Banding filter */
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_BANDFILT,
+ cam->bandfilt);
+ if (err)
+ return err;
+
+ /* Light frequency */
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_FREQ,
+ cam->lightfreq);
+ if (err)
+ return err;
+
+ /* Back light */
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_BACKLIGHT,
+ cam->backlight);
+ if (err)
+ return err;
+
+ /* Mirror */
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_MIRROR,
+ cam->mirror);
+ if (err)
+ return err;
+
+ return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ Get some current picture settings from the image sensor and update the
+ internal 'picture' structure of the camera.
+ Returns: 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_sensor_get_picture(struct w9968cf_device* cam)
+{
+ int err, v;
+
+ err = w9968cf_sensor_get_control(cam, OVCAMCHIP_CID_CONT, &v);
+ if (err)
+ return err;
+ cam->picture.contrast = v;
+
+ err = w9968cf_sensor_get_control(cam, OVCAMCHIP_CID_BRIGHT, &v);
+ if (err)
+ return err;
+ cam->picture.brightness = v;
+
+ err = w9968cf_sensor_get_control(cam, OVCAMCHIP_CID_SAT, &v);
+ if (err)
+ return err;
+ cam->picture.colour = v;
+
+ err = w9968cf_sensor_get_control(cam, OVCAMCHIP_CID_HUE, &v);
+ if (err)
+ return err;
+ cam->picture.hue = v;
+
+ DBG(5, "Got picture settings from the image sensor")
+
+ PDBGG("Brightness, contrast, hue, colour, whiteness are "
+ "%u,%u,%u,%u,%u", cam->picture.brightness,cam->picture.contrast,
+ cam->picture.hue, cam->picture.colour, cam->picture.whiteness)
+
+ return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ Update picture settings of the image sensor.
+ Returns: 0 on success, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int
+w9968cf_sensor_update_picture(struct w9968cf_device* cam,
+ struct video_picture pict)
+{
+ int err = 0;
+
+ if ((!cam->sensor_initialized)
+ || pict.contrast != cam->picture.contrast) {
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_CONT,
+ pict.contrast);
+ if (err)
+ goto fail;
+ DBG(4, "Contrast changed from %u to %u",
+ cam->picture.contrast, pict.contrast)
+ cam->picture.contrast = pict.contrast;
+ }
+
+ if (((!cam->sensor_initialized) ||
+ pict.brightness != cam->picture.brightness) && (!cam->auto_brt)) {
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_BRIGHT,
+ pict.brightness);
+ if (err)
+ goto fail;
+ DBG(4, "Brightness changed from %u to %u",
+ cam->picture.brightness, pict.brightness)
+ cam->picture.brightness = pict.brightness;
+ }
+
+ if ((!cam->sensor_initialized) || pict.colour != cam->picture.colour) {
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_SAT,
+ pict.colour);
+ if (err)
+ goto fail;
+ DBG(4, "Colour changed from %u to %u",
+ cam->picture.colour, pict.colour)
+ cam->picture.colour = pict.colour;
+ }
+
+ if ((!cam->sensor_initialized) || pict.hue != cam->picture.hue) {
+ err = w9968cf_sensor_set_control(cam, OVCAMCHIP_CID_HUE,
+ pict.hue);
+ if (err)
+ goto fail;
+ DBG(4, "Hue changed from %u to %u",
+ cam->picture.hue, pict.hue)
+ cam->picture.hue = pict.hue;
+ }
+
+ return 0;
+
+fail:
+ DBG(4, "Failed to change sensor picture setting")
+ return err;
+}
+
+
+
+/****************************************************************************
+ * Camera configuration *
+ ****************************************************************************/
+
+/*--------------------------------------------------------------------------
+ This function is called when a supported image sensor is detected.
+ Return 0 if the initialization succeeds, a negative number otherwise.
+ --------------------------------------------------------------------------*/
+static int w9968cf_sensor_init(struct w9968cf_device* cam)
+{
+ int err = 0;
+
+ if ((err = w9968cf_sensor_cmd(cam, OVCAMCHIP_CMD_INITIALIZE,
+ &cam->monochrome)))
+ goto error;
+
+ if ((err = w9968cf_sensor_cmd(cam, OVCAMCHIP_CMD_Q_SUBTYPE,
+ &cam->sensor)))
+ goto error;
+
+ /* NOTE: Make sure width and height are a multiple of 16 */
+ switch (cam->sensor_client->addr) {
+ case OV6xx0_SID:
+ cam->maxwidth = 352;
+ cam->maxheight = 288;
+ cam->minwidth = 64;
+ cam->minheight = 48;
+ break;
+ case OV7xx0_SID:
+ cam->maxwidth = 640;
+ cam->maxheight = 480;
+ cam->minwidth = 64;
+ cam->minheight = 48;
+ break;
+ default:
+ DBG(1, "Not supported image sensor detected for %s",
+ symbolic(camlist, cam->id))
+ return -EINVAL;
+ }
+
+ /* These values depend on the ones in the ovxxx0.c sources */
+ switch (cam->sensor) {
+ case CC_OV7620:
+ cam->start_cropx = 287;
+ cam->start_cropy = 35;
+ /* Seems to work around a bug in the image sensor */
+ cam->vs_polarity = 1;
+ cam->hs_polarity = 1;
+ break;
+ default:
+ cam->start_cropx = 320;
+ cam->start_cropy = 35;
+ cam->vs_polarity = 1;
+ cam->hs_polarity = 0;
+ }
+
+ if ((err = w9968cf_sensor_update_settings(cam)))
+ goto error;
+
+ if ((err = w9968cf_sensor_update_picture(cam, cam->picture)))
+ goto error;
+
+ cam->sensor_initialized = 1;
+
+ DBG(2, "%s image sensor initialized", symbolic(senlist, cam->sensor))
+ return 0;
+
+error:
+ cam->sensor_initialized = 0;
+ cam->sensor = CC_UNKNOWN;
+ DBG(1, "Image sensor initialization failed for %s (/dev/video%d). "
+ "Try to detach and attach this device again",
+ symbolic(camlist, cam->id), cam->v4ldev->minor)
+ return err;
+}
+
+
+/*--------------------------------------------------------------------------
+ Fill some basic fields in the main device data structure.
+ This function is called once on w9968cf_usb_probe() for each recognized
+ camera.
+ --------------------------------------------------------------------------*/
+static void
+w9968cf_configure_camera(struct w9968cf_device* cam,
+ struct usb_device* udev,
+ enum w9968cf_model_id mod_id,
+ const unsigned short dev_nr)
+{
+ init_MUTEX(&cam->fileop_sem);
+ init_waitqueue_head(&cam->open);
+ spin_lock_init(&cam->urb_lock);
+ spin_lock_init(&cam->flist_lock);
+
+ cam->users = 0;
+ cam->disconnected = 0;
+ cam->id = mod_id;
+ cam->sensor = CC_UNKNOWN;
+ cam->sensor_initialized = 0;
+
+ /* Calculate the alternate setting number (from 1 to 16)
+ according to the 'packet_size' module parameter */
+ if (packet_size[dev_nr] < W9968CF_MIN_PACKET_SIZE)
+ packet_size[dev_nr] = W9968CF_MIN_PACKET_SIZE;
+ for (cam->altsetting = 1;
+ packet_size[dev_nr] < wMaxPacketSize[cam->altsetting-1];
+ cam->altsetting++);
+
+ cam->max_buffers = (max_buffers[dev_nr] < 2 ||
+ max_buffers[dev_nr] > W9968CF_MAX_BUFFERS)
+ ? W9968CF_BUFFERS : (u8)max_buffers[dev_nr];
+
+ cam->double_buffer = (double_buffer[dev_nr] == 0 ||
+ double_buffer[dev_nr] == 1)
+ ? (u8)double_buffer[dev_nr]:W9968CF_DOUBLE_BUFFER;
+
+ cam->clamping = (clamping[dev_nr] == 0 || clamping[dev_nr] == 1)
+ ? (u8)clamping[dev_nr] : W9968CF_CLAMPING;
+
+ cam->filter_type = (filter_type[dev_nr] == 0 ||
+ filter_type[dev_nr] == 1 ||
+ filter_type[dev_nr] == 2)
+ ? (u8)filter_type[dev_nr] : W9968CF_FILTER_TYPE;
+
+ cam->capture = 1;
+
+ cam->largeview = (largeview[dev_nr] == 0 || largeview[dev_nr] == 1)
+ ? (u8)largeview[dev_nr] : W9968CF_LARGEVIEW;
+
+ cam->decompression = (decompression[dev_nr] == 0 ||
+ decompression[dev_nr] == 1 ||
+ decompression[dev_nr] == 2)
+ ? (u8)decompression[dev_nr]:W9968CF_DECOMPRESSION;
+
+ cam->upscaling = (upscaling[dev_nr] == 0 ||
+ upscaling[dev_nr] == 1)
+ ? (u8)upscaling[dev_nr] : W9968CF_UPSCALING;
+
+ cam->auto_brt = (autobright[dev_nr] == 0 || autobright[dev_nr] == 1)
+ ? (u8)autobright[dev_nr] : W9968CF_AUTOBRIGHT;
+
+ cam->auto_exp = (autoexp[dev_nr] == 0 || autoexp[dev_nr] == 1)
+ ? (u8)autoexp[dev_nr] : W9968CF_AUTOEXP;
+
+ cam->lightfreq = (lightfreq[dev_nr] == 50 || lightfreq[dev_nr] == 60)
+ ? (u8)lightfreq[dev_nr] : W9968CF_LIGHTFREQ;
+
+ cam->bandfilt = (bandingfilter[dev_nr] == 0 ||
+ bandingfilter[dev_nr] == 1)
+ ? (u8)bandingfilter[dev_nr] : W9968CF_BANDINGFILTER;
+
+ cam->backlight = (backlight[dev_nr] == 0 || backlight[dev_nr] == 1)
+ ? (u8)backlight[dev_nr] : W9968CF_BACKLIGHT;
+
+ cam->clockdiv = (clockdiv[dev_nr] == -1 || clockdiv[dev_nr] >= 0)
+ ? (s8)clockdiv[dev_nr] : W9968CF_CLOCKDIV;
+
+ cam->mirror = (mirror[dev_nr] == 0 || mirror[dev_nr] == 1)
+ ? (u8)mirror[dev_nr] : W9968CF_MIRROR;
+
+ cam->monochrome = (monochrome[dev_nr] == 0 || monochrome[dev_nr] == 1)
+ ? monochrome[dev_nr] : W9968CF_MONOCHROME;
+
+ cam->picture.brightness = (u16)brightness[dev_nr];
+ cam->picture.hue = (u16)hue[dev_nr];
+ cam->picture.colour = (u16)colour[dev_nr];
+ cam->picture.contrast = (u16)contrast[dev_nr];
+ cam->picture.whiteness = (u16)whiteness[dev_nr];
+ if (w9968cf_valid_palette((u16)force_palette[dev_nr])) {
+ cam->picture.palette = (u16)force_palette[dev_nr];
+ cam->force_palette = 1;
+ } else {
+ cam->force_palette = 0;
+ if (cam->decompression == 0)
+ cam->picture.palette = W9968CF_PALETTE_DECOMP_OFF;
+ else if (cam->decompression == 1)
+ cam->picture.palette = W9968CF_PALETTE_DECOMP_FORCE;
+ else
+ cam->picture.palette = W9968CF_PALETTE_DECOMP_ON;
+ }
+ cam->picture.depth = w9968cf_valid_depth(cam->picture.palette);
+
+ cam->force_rgb = (force_rgb[dev_nr] == 0 || force_rgb[dev_nr] == 1)
+ ? (u8)force_rgb[dev_nr] : W9968CF_FORCE_RGB;
+
+ cam->window.x = 0;
+ cam->window.y = 0;
+ cam->window.width = W9968CF_WIDTH;
+ cam->window.height = W9968CF_HEIGHT;
+ cam->window.chromakey = 0;
+ cam->window.clipcount = 0;
+ cam->window.flags = 0;
+
+ DBG(3, "%s configured with settings #%u:",
+ symbolic(camlist, cam->id), dev_nr)
+
+ DBG(3, "- Data packet size for USB isochrnous transfer: %u bytes",
+ wMaxPacketSize[cam->altsetting-1])
+
+ DBG(3, "- Number of requested video frame buffers: %u",
+ cam->max_buffers)
+
+ if (cam->double_buffer)
+ DBG(3, "- Hardware double buffering enabled")
+ else
+ DBG(3, "- Hardware double buffering disabled")
+
+ if (cam->filter_type == 0)
+ DBG(3, "- Video filtering disabled")
+ else if (cam->filter_type == 1)
+ DBG(3, "- Video filtering enabled: type 1-2-1")
+ else if (cam->filter_type == 2)
+ DBG(3, "- Video filtering enabled: type 2-3-6-3-2")
+
+ if (cam->clamping)
+ DBG(3, "- Video data clamping (CCIR-601 format) enabled")
+ else
+ DBG(3, "- Video data clamping (CCIR-601 format) disabled")
+
+ if (cam->largeview)
+ DBG(3, "- Large view enabled")
+ else
+ DBG(3, "- Large view disabled")
+
+ if ((cam->decompression) == 0 && (!cam->force_palette))
+ DBG(3, "- Decompression disabled")
+ else if ((cam->decompression) == 1 && (!cam->force_palette))
+ DBG(3, "- Decompression forced")
+ else if ((cam->decompression) == 2 && (!cam->force_palette))
+ DBG(3, "- Decompression allowed")
+
+ if (cam->upscaling)
+ DBG(3, "- Software image scaling enabled")
+ else
+ DBG(3, "- Software image scaling disabled")
+
+ if (cam->force_palette)
+ DBG(3, "- Image palette forced to %s",
+ symbolic(v4l1_plist, cam->picture.palette))
+
+ if (cam->force_rgb)
+ DBG(3, "- RGB component ordering will be used instead of BGR")
+
+ if (cam->auto_brt)
+ DBG(3, "- Auto brightness enabled")
+ else
+ DBG(3, "- Auto brightness disabled")
+
+ if (cam->auto_exp)
+ DBG(3, "- Auto exposure enabled")
+ else
+ DBG(3, "- Auto exposure disabled")
+
+ if (cam->backlight)
+ DBG(3, "- Backlight exposure algorithm enabled")
+ else
+ DBG(3, "- Backlight exposure algorithm disabled")
+
+ if (cam->mirror)
+ DBG(3, "- Mirror enabled")
+ else
+ DBG(3, "- Mirror disabled")
+
+ if (cam->bandfilt)
+ DBG(3, "- Banding filter enabled")
+ else
+ DBG(3, "- Banding filter disabled")
+
+ DBG(3, "- Power lighting frequency: %u", cam->lightfreq)
+
+ if (cam->clockdiv == -1)
+ DBG(3, "- Automatic clock divisor enabled")
+ else
+ DBG(3, "- Clock divisor: %d", cam->clockdiv)
+
+ if (cam->monochrome)
+ DBG(3, "- Image sensor used as monochrome")
+ else
+ DBG(3, "- Image sensor not used as monochrome")
+}
+
+
+/*--------------------------------------------------------------------------
+ If the video post-processing module is not loaded, some parameters
+ must be overridden.
+ --------------------------------------------------------------------------*/
+static void w9968cf_adjust_configuration(struct w9968cf_device* cam)
+{
+ if (!w9968cf_vpp) {
+ if (cam->decompression == 1) {
+ cam->decompression = 2;
+ DBG(2, "Video post-processing module not found: "
+ "'decompression' parameter forced to 2")
+ }
+ if (cam->upscaling) {
+ cam->upscaling = 0;
+ DBG(2, "Video post-processing module not found: "
+ "'upscaling' parameter forced to 0")
+ }
+ if (cam->picture.palette != VIDEO_PALETTE_UYVY) {
+ cam->force_palette = 0;
+ DBG(2, "Video post-processing module not found: "
+ "'force_palette' parameter forced to 0")
+ }
+ cam->picture.palette = VIDEO_PALETTE_UYVY;
+ cam->picture.depth = w9968cf_valid_depth(cam->picture.palette);
+ }
+}
+
+
+/*--------------------------------------------------------------------------
+ Release the resources used by the driver.
+ This function is called on disconnect
+ (or on close if deallocation has been deferred)
+ --------------------------------------------------------------------------*/
+static void w9968cf_release_resources(struct w9968cf_device* cam)
+{
+ down(&w9968cf_devlist_sem);
+
+ DBG(2, "V4L device deregistered: /dev/video%d", cam->v4ldev->minor)
+
+ video_unregister_device(cam->v4ldev);
+ list_del(&cam->v4llist);
+ i2c_del_adapter(&cam->i2c_adapter);
+ w9968cf_deallocate_memory(cam);
+ kfree(cam->control_buffer);
+ kfree(cam->data_buffer);
+
+ up(&w9968cf_devlist_sem);
+}
+
+
+
+/****************************************************************************
+ * Video4Linux interface *
+ ****************************************************************************/
+
+static int w9968cf_open(struct inode* inode, struct file* filp)
+{
+ struct w9968cf_device* cam;
+ int err;
+
+ /* This the only safe way to prevent race conditions with disconnect */
+ if (!down_read_trylock(&w9968cf_disconnect))
+ return -ERESTARTSYS;
+
+ cam = (struct w9968cf_device*)video_get_drvdata(video_devdata(filp));
+
+ down(&cam->dev_sem);
+
+ if (cam->sensor == CC_UNKNOWN) {
+ DBG(2, "No supported image sensor has been detected by the "
+ "'ovcamchip' module for the %s (/dev/video%d). Make "
+ "sure it is loaded *before* (re)connecting the camera.",
+ symbolic(camlist, cam->id), cam->v4ldev->minor)
+ up(&cam->dev_sem);
+ up_read(&w9968cf_disconnect);
+ return -ENODEV;
+ }
+
+ if (cam->users) {
+ DBG(2, "%s (/dev/video%d) has been already occupied by '%s'",
+ symbolic(camlist, cam->id),cam->v4ldev->minor,cam->command)
+ if ((filp->f_flags & O_NONBLOCK)||(filp->f_flags & O_NDELAY)) {
+ up(&cam->dev_sem);
+ up_read(&w9968cf_disconnect);
+ return -EWOULDBLOCK;
+ }
+ up(&cam->dev_sem);
+ err = wait_event_interruptible_exclusive(cam->open,
+ cam->disconnected ||
+ !cam->users);
+ if (err) {
+ up_read(&w9968cf_disconnect);
+ return err;
+ }
+ if (cam->disconnected) {
+ up_read(&w9968cf_disconnect);
+ return -ENODEV;
+ }
+ down(&cam->dev_sem);
+ }
+
+ DBG(5, "Opening '%s', /dev/video%d ...",
+ symbolic(camlist, cam->id), cam->v4ldev->minor)
+
+ cam->streaming = 0;
+ cam->misconfigured = 0;
+
+ if (!w9968cf_vpp)
+ if ((err = w9968cf_vppmod_detect(cam)))
+ goto out;
+
+ if ((err = w9968cf_allocate_memory(cam)))
+ goto deallocate_memory;
+
+ if ((err = w9968cf_init_chip(cam)))
+ goto deallocate_memory;
+
+ if ((err = w9968cf_start_transfer(cam)))
+ goto deallocate_memory;
+
+ filp->private_data = cam;
+
+ cam->users++;
+ strcpy(cam->command, current->comm);
+
+ init_waitqueue_head(&cam->wait_queue);
+
+ DBG(5, "Video device is open")
+
+ up(&cam->dev_sem);
+ up_read(&w9968cf_disconnect);
+
+ return 0;
+
+deallocate_memory:
+ w9968cf_deallocate_memory(cam);
+out:
+ DBG(2, "Failed to open the video device")
+ up(&cam->dev_sem);
+ up_read(&w9968cf_disconnect);
+ return err;
+}
+
+
+static int w9968cf_release(struct inode* inode, struct file* filp)
+{
+ struct w9968cf_device* cam;
+
+ cam = (struct w9968cf_device*)video_get_drvdata(video_devdata(filp));
+
+ down(&cam->dev_sem); /* prevent disconnect() to be called */
+
+ w9968cf_stop_transfer(cam);
+
+ w9968cf_vppmod_release(cam);
+
+ if (cam->disconnected) {
+ w9968cf_release_resources(cam);
+ up(&cam->dev_sem);
+ kfree(cam);
+ return 0;
+ }
+
+ cam->users--;
+ w9968cf_deallocate_memory(cam);
+ wake_up_interruptible_nr(&cam->open, 1);
+
+ DBG(5, "Video device closed")
+ up(&cam->dev_sem);
+ return 0;
+}
+
+
+static ssize_t
+w9968cf_read(struct file* filp, char __user * buf, size_t count, loff_t* f_pos)
+{
+ struct w9968cf_device* cam;
+ struct w9968cf_frame_t* fr;
+ int err = 0;
+
+ cam = (struct w9968cf_device*)video_get_drvdata(video_devdata(filp));
+
+ if (filp->f_flags & O_NONBLOCK)
+ return -EWOULDBLOCK;
+
+ if (down_interruptible(&cam->fileop_sem))
+ return -ERESTARTSYS;
+
+ if (cam->disconnected) {
+ DBG(2, "Device not present")
+ up(&cam->fileop_sem);
+ return -ENODEV;
+ }
+
+ if (cam->misconfigured) {
+ DBG(2, "The camera is misconfigured. Close and open it again.")
+ up(&cam->fileop_sem);
+ return -EIO;
+ }
+
+ if (!cam->frame[0].queued)
+ w9968cf_push_frame(cam, 0);
+
+ if (!cam->frame[1].queued)
+ w9968cf_push_frame(cam, 1);
+
+ err = wait_event_interruptible(cam->wait_queue,
+ cam->frame[0].status == F_READY ||
+ cam->frame[1].status == F_READY ||
+ cam->disconnected);
+ if (err) {
+ up(&cam->fileop_sem);
+ return err;
+ }
+ if (cam->disconnected) {
+ up(&cam->fileop_sem);
+ return -ENODEV;
+ }
+
+ fr = (cam->frame[0].status == F_READY) ? &cam->frame[0]:&cam->frame[1];
+
+ if (w9968cf_vpp)
+ w9968cf_postprocess_frame(cam, fr);
+
+ if (count > fr->length)
+ count = fr->length;
+
+ if (copy_to_user(buf, fr->buffer, count)) {
+ fr->status = F_UNUSED;
+ up(&cam->fileop_sem);
+ return -EFAULT;
+ }
+ *f_pos += count;
+
+ fr->status = F_UNUSED;
+
+ DBG(5, "%zu bytes read", count)
+
+ up(&cam->fileop_sem);
+ return count;
+}
+
+
+static int w9968cf_mmap(struct file* filp, struct vm_area_struct *vma)
+{
+ struct w9968cf_device* cam = (struct w9968cf_device*)
+ video_get_drvdata(video_devdata(filp));
+ unsigned long vsize = vma->vm_end - vma->vm_start,
+ psize = cam->nbuffers * cam->frame[0].size,
+ start = vma->vm_start,
+ pos = (unsigned long)cam->frame[0].buffer,
+ page;
+
+ if (cam->disconnected) {
+ DBG(2, "Device not present")
+ return -ENODEV;
+ }
+
+ if (cam->misconfigured) {
+ DBG(2, "The camera is misconfigured. Close and open it again")
+ return -EIO;
+ }
+
+ PDBGG("mmapping %lu bytes...", vsize)
+
+ if (vsize > psize - (vma->vm_pgoff << PAGE_SHIFT))
+ return -EINVAL;
+
+ while (vsize > 0) {
+ page = vmalloc_to_pfn((void *)pos);
+ if (remap_pfn_range(vma, start, page + vma->vm_pgoff,
+ PAGE_SIZE, vma->vm_page_prot))
+ return -EAGAIN;
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+ vsize -= PAGE_SIZE;
+ }
+
+ DBG(5, "mmap method successfully called")
+ return 0;
+}
+
+
+static int
+w9968cf_ioctl(struct inode* inode, struct file* filp,
+ unsigned int cmd, unsigned long arg)
+{
+ struct w9968cf_device* cam;
+ int err;
+
+ cam = (struct w9968cf_device*)video_get_drvdata(video_devdata(filp));
+
+ if (down_interruptible(&cam->fileop_sem))
+ return -ERESTARTSYS;
+
+ if (cam->disconnected) {
+ DBG(2, "Device not present")
+ up(&cam->fileop_sem);
+ return -ENODEV;
+ }
+
+ if (cam->misconfigured) {
+ DBG(2, "The camera is misconfigured. Close and open it again.")
+ up(&cam->fileop_sem);
+ return -EIO;
+ }
+
+ err = w9968cf_v4l_ioctl(inode, filp, cmd, (void __user *)arg);
+
+ up(&cam->fileop_sem);
+ return err;
+}
+
+
+static int w9968cf_v4l_ioctl(struct inode* inode, struct file* filp,
+ unsigned int cmd, void __user * arg)
+{
+ struct w9968cf_device* cam;
+ const char* v4l1_ioctls[] = {
+ "?", "CGAP", "GCHAN", "SCHAN", "GTUNER", "STUNER",
+ "GPICT", "SPICT", "CCAPTURE", "GWIN", "SWIN", "GFBUF",
+ "SFBUF", "KEY", "GFREQ", "SFREQ", "GAUDIO", "SAUDIO",
+ "SYNC", "MCAPTURE", "GMBUF", "GUNIT", "GCAPTURE", "SCAPTURE",
+ "SPLAYMODE", "SWRITEMODE", "GPLAYINFO", "SMICROCODE",
+ "GVBIFMT", "SVBIFMT"
+ };
+
+ #define V4L1_IOCTL(cmd) \
+ ((_IOC_NR((cmd)) < sizeof(v4l1_ioctls)/sizeof(char*)) ? \
+ v4l1_ioctls[_IOC_NR((cmd))] : "?")
+
+ cam = (struct w9968cf_device*)video_get_drvdata(video_devdata(filp));
+
+ switch (cmd) {
+
+ case VIDIOCGCAP: /* get video capability */
+ {
+ struct video_capability cap = {
+ .type = VID_TYPE_CAPTURE | VID_TYPE_SCALES,
+ .channels = 1,
+ .audios = 0,
+ .minwidth = cam->minwidth,
+ .minheight = cam->minheight,
+ };
+ sprintf(cap.name, "W996[87]CF USB Camera #%d",
+ cam->v4ldev->minor);
+ cap.maxwidth = (cam->upscaling && w9968cf_vpp)
+ ? max((u16)W9968CF_MAX_WIDTH, cam->maxwidth)
+ : cam->maxwidth;
+ cap.maxheight = (cam->upscaling && w9968cf_vpp)
+ ? max((u16)W9968CF_MAX_HEIGHT, cam->maxheight)
+ : cam->maxheight;
+
+ if (copy_to_user(arg, &cap, sizeof(cap)))
+ return -EFAULT;
+
+ DBG(5, "VIDIOCGCAP successfully called")
+ return 0;
+ }
+
+ case VIDIOCGCHAN: /* get video channel informations */
+ {
+ struct video_channel chan;
+ if (copy_from_user(&chan, arg, sizeof(chan)))
+ return -EFAULT;
+
+ if (chan.channel != 0)
+ return -EINVAL;
+
+ strcpy(chan.name, "Camera");
+ chan.tuners = 0;
+ chan.flags = 0;
+ chan.type = VIDEO_TYPE_CAMERA;
+ chan.norm = VIDEO_MODE_AUTO;
+
+ if (copy_to_user(arg, &chan, sizeof(chan)))
+ return -EFAULT;
+
+ DBG(5, "VIDIOCGCHAN successfully called")
+ return 0;
+ }
+
+ case VIDIOCSCHAN: /* set active channel */
+ {
+ struct video_channel chan;
+
+ if (copy_from_user(&chan, arg, sizeof(chan)))
+ return -EFAULT;
+
+ if (chan.channel != 0)
+ return -EINVAL;
+
+ DBG(5, "VIDIOCSCHAN successfully called")
+ return 0;
+ }
+
+ case VIDIOCGPICT: /* get image properties of the picture */
+ {
+ if (w9968cf_sensor_get_picture(cam))
+ return -EIO;
+
+ if (copy_to_user(arg, &cam->picture, sizeof(cam->picture)))
+ return -EFAULT;
+
+ DBG(5, "VIDIOCGPICT successfully called")
+ return 0;
+ }
+
+ case VIDIOCSPICT: /* change picture settings */
+ {
+ struct video_picture pict;
+ int err = 0;
+
+ if (copy_from_user(&pict, arg, sizeof(pict)))
+ return -EFAULT;
+
+ if ( (cam->force_palette || !w9968cf_vpp)
+ && pict.palette != cam->picture.palette ) {
+ DBG(4, "Palette %s rejected: only %s is allowed",
+ symbolic(v4l1_plist, pict.palette),
+ symbolic(v4l1_plist, cam->picture.palette))
+ return -EINVAL;
+ }
+
+ if (!w9968cf_valid_palette(pict.palette)) {
+ DBG(4, "Palette %s not supported. VIDIOCSPICT failed",
+ symbolic(v4l1_plist, pict.palette))
+ return -EINVAL;
+ }
+
+ if (!cam->force_palette) {
+ if (cam->decompression == 0) {
+ if (w9968cf_need_decompression(pict.palette)) {
+ DBG(4, "Decompression disabled: palette %s is not "
+ "allowed. VIDIOCSPICT failed",
+ symbolic(v4l1_plist, pict.palette))
+ return -EINVAL;
+ }
+ } else if (cam->decompression == 1) {
+ if (!w9968cf_need_decompression(pict.palette)) {
+ DBG(4, "Decompression forced: palette %s is not "
+ "allowed. VIDIOCSPICT failed",
+ symbolic(v4l1_plist, pict.palette))
+ return -EINVAL;
+ }
+ }
+ }
+
+ if (pict.depth != w9968cf_valid_depth(pict.palette)) {
+ DBG(4, "Requested depth %u bpp is not valid for %s "
+ "palette: ignored and changed to %u bpp",
+ pict.depth, symbolic(v4l1_plist, pict.palette),
+ w9968cf_valid_depth(pict.palette))
+ pict.depth = w9968cf_valid_depth(pict.palette);
+ }
+
+ if (pict.palette != cam->picture.palette) {
+ if(*cam->requested_frame
+ || cam->frame_current->queued) {
+ err = wait_event_interruptible
+ ( cam->wait_queue,
+ cam->disconnected ||
+ (!*cam->requested_frame &&
+ !cam->frame_current->queued) );
+ if (err)
+ return err;
+ if (cam->disconnected)
+ return -ENODEV;
+ }
+
+ if (w9968cf_stop_transfer(cam))
+ goto ioctl_fail;
+
+ if (w9968cf_set_picture(cam, pict))
+ goto ioctl_fail;
+
+ if (w9968cf_start_transfer(cam))
+ goto ioctl_fail;
+
+ } else if (w9968cf_sensor_update_picture(cam, pict))
+ return -EIO;
+
+
+ DBG(5, "VIDIOCSPICT successfully called")
+ return 0;
+ }
+
+ case VIDIOCSWIN: /* set capture area */
+ {
+ struct video_window win;
+ int err = 0;
+
+ if (copy_from_user(&win, arg, sizeof(win)))
+ return -EFAULT;
+
+ DBG(6, "VIDIOCSWIN called: clipcount=%d, flags=%u, "
+ "x=%u, y=%u, %ux%u", win.clipcount, win.flags,
+ win.x, win.y, win.width, win.height)
+
+ if (win.clipcount != 0 || win.flags != 0)
+ return -EINVAL;
+
+ if ((err = w9968cf_adjust_window_size(cam, (u16*)&win.width,
+ (u16*)&win.height))) {
+ DBG(4, "Resolution not supported (%ux%u). "
+ "VIDIOCSWIN failed", win.width, win.height)
+ return err;
+ }
+
+ if (win.x != cam->window.x ||
+ win.y != cam->window.y ||
+ win.width != cam->window.width ||
+ win.height != cam->window.height) {
+ if(*cam->requested_frame
+ || cam->frame_current->queued) {
+ err = wait_event_interruptible
+ ( cam->wait_queue,
+ cam->disconnected ||
+ (!*cam->requested_frame &&
+ !cam->frame_current->queued) );
+ if (err)
+ return err;
+ if (cam->disconnected)
+ return -ENODEV;
+ }
+
+ if (w9968cf_stop_transfer(cam))
+ goto ioctl_fail;
+
+ /* This _must_ be called before set_window() */
+ if (w9968cf_set_picture(cam, cam->picture))
+ goto ioctl_fail;
+
+ if (w9968cf_set_window(cam, win))
+ goto ioctl_fail;
+
+ if (w9968cf_start_transfer(cam))
+ goto ioctl_fail;
+ }
+
+ DBG(5, "VIDIOCSWIN successfully called. ")
+ return 0;
+ }
+
+ case VIDIOCGWIN: /* get current window properties */
+ {
+ if (copy_to_user(arg,&cam->window,sizeof(struct video_window)))
+ return -EFAULT;
+
+ DBG(5, "VIDIOCGWIN successfully called")
+ return 0;
+ }
+
+ case VIDIOCGMBUF: /* request for memory (mapped) buffer */
+ {
+ struct video_mbuf mbuf;
+ u8 i;
+
+ mbuf.size = cam->nbuffers * cam->frame[0].size;
+ mbuf.frames = cam->nbuffers;
+ for (i = 0; i < cam->nbuffers; i++)
+ mbuf.offsets[i] = (unsigned long)cam->frame[i].buffer -
+ (unsigned long)cam->frame[0].buffer;
+
+ if (copy_to_user(arg, &mbuf, sizeof(mbuf)))
+ return -EFAULT;
+
+ DBG(5, "VIDIOCGMBUF successfully called")
+ return 0;
+ }
+
+ case VIDIOCMCAPTURE: /* start the capture to a frame */
+ {
+ struct video_mmap mmap;
+ struct w9968cf_frame_t* fr;
+ int err = 0;
+
+ if (copy_from_user(&mmap, arg, sizeof(mmap)))
+ return -EFAULT;
+
+ DBG(6, "VIDIOCMCAPTURE called: frame #%u, format=%s, %dx%d",
+ mmap.frame, symbolic(v4l1_plist, mmap.format),
+ mmap.width, mmap.height)
+
+ if (mmap.frame >= cam->nbuffers) {
+ DBG(4, "Invalid frame number (%u). "
+ "VIDIOCMCAPTURE failed", mmap.frame)
+ return -EINVAL;
+ }
+
+ if (mmap.format!=cam->picture.palette &&
+ (cam->force_palette || !w9968cf_vpp)) {
+ DBG(4, "Palette %s rejected: only %s is allowed",
+ symbolic(v4l1_plist, mmap.format),
+ symbolic(v4l1_plist, cam->picture.palette))
+ return -EINVAL;
+ }
+
+ if (!w9968cf_valid_palette(mmap.format)) {
+ DBG(4, "Palette %s not supported. "
+ "VIDIOCMCAPTURE failed",
+ symbolic(v4l1_plist, mmap.format))
+ return -EINVAL;
+ }
+
+ if (!cam->force_palette) {
+ if (cam->decompression == 0) {
+ if (w9968cf_need_decompression(mmap.format)) {
+ DBG(4, "Decompression disabled: palette %s is not "
+ "allowed. VIDIOCSPICT failed",
+ symbolic(v4l1_plist, mmap.format))
+ return -EINVAL;
+ }
+ } else if (cam->decompression == 1) {
+ if (!w9968cf_need_decompression(mmap.format)) {
+ DBG(4, "Decompression forced: palette %s is not "
+ "allowed. VIDIOCSPICT failed",
+ symbolic(v4l1_plist, mmap.format))
+ return -EINVAL;
+ }
+ }
+ }
+
+ if ((err = w9968cf_adjust_window_size(cam, (u16*)&mmap.width,
+ (u16*)&mmap.height))) {
+ DBG(4, "Resolution not supported (%dx%d). "
+ "VIDIOCMCAPTURE failed",
+ mmap.width, mmap.height)
+ return err;
+ }
+
+ fr = &cam->frame[mmap.frame];
+
+ if (mmap.width != cam->window.width ||
+ mmap.height != cam->window.height ||
+ mmap.format != cam->picture.palette) {
+
+ struct video_window win;
+ struct video_picture pict;
+
+ if(*cam->requested_frame
+ || cam->frame_current->queued) {
+ DBG(6, "VIDIOCMCAPTURE. Change settings for "
+ "frame #%u: %dx%d, format %s. Wait...",
+ mmap.frame, mmap.width, mmap.height,
+ symbolic(v4l1_plist, mmap.format))
+ err = wait_event_interruptible
+ ( cam->wait_queue,
+ cam->disconnected ||
+ (!*cam->requested_frame &&
+ !cam->frame_current->queued) );
+ if (err)
+ return err;
+ if (cam->disconnected)
+ return -ENODEV;
+ }
+
+ memcpy(&win, &cam->window, sizeof(win));
+ memcpy(&pict, &cam->picture, sizeof(pict));
+ win.width = mmap.width;
+ win.height = mmap.height;
+ pict.palette = mmap.format;
+
+ if (w9968cf_stop_transfer(cam))
+ goto ioctl_fail;
+
+ /* This before set_window */
+ if (w9968cf_set_picture(cam, pict))
+ goto ioctl_fail;
+
+ if (w9968cf_set_window(cam, win))
+ goto ioctl_fail;
+
+ if (w9968cf_start_transfer(cam))
+ goto ioctl_fail;
+
+ } else if (fr->queued) {
+
+ DBG(6, "Wait until frame #%u is free", mmap.frame)
+
+ err = wait_event_interruptible(cam->wait_queue,
+ cam->disconnected ||
+ (!fr->queued));
+ if (err)
+ return err;
+ if (cam->disconnected)
+ return -ENODEV;
+ }
+
+ w9968cf_push_frame(cam, mmap.frame);
+ DBG(5, "VIDIOCMCAPTURE(%u): successfully called", mmap.frame)
+ return 0;
+ }
+
+ case VIDIOCSYNC: /* wait until the capture of a frame is finished */
+ {
+ unsigned int f_num;
+ struct w9968cf_frame_t* fr;
+ int err = 0;
+
+ if (copy_from_user(&f_num, arg, sizeof(f_num)))
+ return -EFAULT;
+
+ if (f_num >= cam->nbuffers) {
+ DBG(4, "Invalid frame number (%u). "
+ "VIDIOCMCAPTURE failed", f_num)
+ return -EINVAL;
+ }
+
+ DBG(6, "VIDIOCSYNC called for frame #%u", f_num)
+
+ fr = &cam->frame[f_num];
+
+ switch (fr->status) {
+ case F_UNUSED:
+ if (!fr->queued) {
+ DBG(4, "VIDIOSYNC: Frame #%u not requested!",
+ f_num)
+ return -EFAULT;
+ }
+ case F_ERROR:
+ case F_GRABBING:
+ err = wait_event_interruptible(cam->wait_queue,
+ (fr->status == F_READY)
+ || cam->disconnected);
+ if (err)
+ return err;
+ if (cam->disconnected)
+ return -ENODEV;
+ break;
+ case F_READY:
+ break;
+ }
+
+ if (w9968cf_vpp)
+ w9968cf_postprocess_frame(cam, fr);
+
+ fr->status = F_UNUSED;
+
+ DBG(5, "VIDIOCSYNC(%u) successfully called", f_num)
+ return 0;
+ }
+
+ case VIDIOCGUNIT:/* report the unit numbers of the associated devices*/
+ {
+ struct video_unit unit = {
+ .video = cam->v4ldev->minor,
+ .vbi = VIDEO_NO_UNIT,
+ .radio = VIDEO_NO_UNIT,
+ .audio = VIDEO_NO_UNIT,
+ .teletext = VIDEO_NO_UNIT,
+ };
+
+ if (copy_to_user(arg, &unit, sizeof(unit)))
+ return -EFAULT;
+
+ DBG(5, "VIDIOCGUNIT successfully called")
+ return 0;
+ }
+
+ case VIDIOCKEY:
+ return 0;
+
+ case VIDIOCGFBUF:
+ {
+ if (clear_user(arg, sizeof(struct video_buffer)))
+ return -EFAULT;
+
+ DBG(5, "VIDIOCGFBUF successfully called")
+ return 0;
+ }
+
+ case VIDIOCGTUNER:
+ {
+ struct video_tuner tuner;
+ if (copy_from_user(&tuner, arg, sizeof(tuner)))
+ return -EFAULT;
+
+ if (tuner.tuner != 0)
+ return -EINVAL;
+
+ strcpy(tuner.name, "no_tuner");
+ tuner.rangelow = 0;
+ tuner.rangehigh = 0;
+ tuner.flags = VIDEO_TUNER_NORM;
+ tuner.mode = VIDEO_MODE_AUTO;
+ tuner.signal = 0xffff;
+
+ if (copy_to_user(arg, &tuner, sizeof(tuner)))
+ return -EFAULT;
+
+ DBG(5, "VIDIOCGTUNER successfully called")
+ return 0;
+ }
+
+ case VIDIOCSTUNER:
+ {
+ struct video_tuner tuner;
+ if (copy_from_user(&tuner, arg, sizeof(tuner)))
+ return -EFAULT;
+
+ if (tuner.tuner != 0)
+ return -EINVAL;
+
+ if (tuner.mode != VIDEO_MODE_AUTO)
+ return -EINVAL;
+
+ DBG(5, "VIDIOCSTUNER successfully called")
+ return 0;
+ }
+
+ case VIDIOCSFBUF:
+ case VIDIOCCAPTURE:
+ case VIDIOCGFREQ:
+ case VIDIOCSFREQ:
+ case VIDIOCGAUDIO:
+ case VIDIOCSAUDIO:
+ case VIDIOCSPLAYMODE:
+ case VIDIOCSWRITEMODE:
+ case VIDIOCGPLAYINFO:
+ case VIDIOCSMICROCODE:
+ case VIDIOCGVBIFMT:
+ case VIDIOCSVBIFMT:
+ DBG(4, "Unsupported V4L1 IOCtl: VIDIOC%s "
+ "(type 0x%01X, "
+ "n. 0x%01X, "
+ "dir. 0x%01X, "
+ "size 0x%02X)",
+ V4L1_IOCTL(cmd),
+ _IOC_TYPE(cmd),_IOC_NR(cmd),_IOC_DIR(cmd),_IOC_SIZE(cmd))
+
+ return -EINVAL;
+
+ default:
+ DBG(4, "Invalid V4L1 IOCtl: VIDIOC%s "
+ "type 0x%01X, "
+ "n. 0x%01X, "
+ "dir. 0x%01X, "
+ "size 0x%02X",
+ V4L1_IOCTL(cmd),
+ _IOC_TYPE(cmd),_IOC_NR(cmd),_IOC_DIR(cmd),_IOC_SIZE(cmd))
+
+ return -ENOIOCTLCMD;
+
+ } /* end of switch */
+
+ioctl_fail:
+ cam->misconfigured = 1;
+ DBG(1, "VIDIOC%s failed because of hardware problems. "
+ "To use the camera, close and open it again.", V4L1_IOCTL(cmd))
+ return -EFAULT;
+}
+
+
+static struct file_operations w9968cf_fops = {
+ .owner = THIS_MODULE,
+ .open = w9968cf_open,
+ .release = w9968cf_release,
+ .read = w9968cf_read,
+ .ioctl = w9968cf_ioctl,
+ .mmap = w9968cf_mmap,
+ .llseek = no_llseek,
+};
+
+
+
+/****************************************************************************
+ * USB probe and V4L registration, disconnect and id_table[] definition *
+ ****************************************************************************/
+
+static int
+w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
+{
+ struct usb_device *udev = interface_to_usbdev(intf);
+ struct w9968cf_device* cam;
+ int err = 0;
+ enum w9968cf_model_id mod_id;
+ struct list_head* ptr;
+ u8 sc = 0; /* number of simultaneous cameras */
+ static unsigned short dev_nr = 0; /* we are handling device number n */
+
+ if (le16_to_cpu(udev->descriptor.idVendor) == winbond_id_table[0].idVendor &&
+ le16_to_cpu(udev->descriptor.idProduct) == winbond_id_table[0].idProduct)
+ mod_id = W9968CF_MOD_CLVBWGP; /* see camlist[] table */
+ else if (le16_to_cpu(udev->descriptor.idVendor) == winbond_id_table[1].idVendor &&
+ le16_to_cpu(udev->descriptor.idProduct) == winbond_id_table[1].idProduct)
+ mod_id = W9968CF_MOD_GENERIC; /* see camlist[] table */
+ else
+ return -ENODEV;
+
+ cam = (struct w9968cf_device*)
+ kmalloc(sizeof(struct w9968cf_device), GFP_KERNEL);
+ if (!cam)
+ return -ENOMEM;
+
+ memset(cam, 0, sizeof(*cam));
+
+ init_MUTEX(&cam->dev_sem);
+ down(&cam->dev_sem);
+
+ cam->usbdev = udev;
+ /* NOTE: a local copy is used to avoid possible race conditions */
+ memcpy(&cam->dev, &udev->dev, sizeof(struct device));
+
+ DBG(2, "%s detected", symbolic(camlist, mod_id))
+
+ if (simcams > W9968CF_MAX_DEVICES)
+ simcams = W9968CF_SIMCAMS;
+
+ /* How many cameras are connected ? */
+ down(&w9968cf_devlist_sem);
+ list_for_each(ptr, &w9968cf_dev_list)
+ sc++;
+ up(&w9968cf_devlist_sem);
+
+ if (sc >= simcams) {
+ DBG(2, "Device rejected: too many connected cameras "
+ "(max. %u)", simcams)
+ err = -EPERM;
+ goto fail;
+ }
+
+
+ /* Allocate 2 bytes of memory for camera control USB transfers */
+ if (!(cam->control_buffer = (u16*)kmalloc(2, GFP_KERNEL))) {
+ DBG(1,"Couldn't allocate memory for camera control transfers")
+ err = -ENOMEM;
+ goto fail;
+ }
+ memset(cam->control_buffer, 0, 2);
+
+ /* Allocate 8 bytes of memory for USB data transfers to the FSB */
+ if (!(cam->data_buffer = (u16*)kmalloc(8, GFP_KERNEL))) {
+ DBG(1, "Couldn't allocate memory for data "
+ "transfers to the FSB")
+ err = -ENOMEM;
+ goto fail;
+ }
+ memset(cam->data_buffer, 0, 8);
+
+ /* Register the V4L device */
+ cam->v4ldev = video_device_alloc();
+ if (!cam->v4ldev) {
+ DBG(1, "Could not allocate memory for a V4L structure")
+ err = -ENOMEM;
+ goto fail;
+ }
+
+ strcpy(cam->v4ldev->name, symbolic(camlist, mod_id));
+ cam->v4ldev->owner = THIS_MODULE;
+ cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES;
+ cam->v4ldev->hardware = VID_HARDWARE_W9968CF;
+ cam->v4ldev->fops = &w9968cf_fops;
+ cam->v4ldev->minor = video_nr[dev_nr];
+ cam->v4ldev->release = video_device_release;
+ video_set_drvdata(cam->v4ldev, cam);
+ cam->v4ldev->dev = &cam->dev;
+
+ err = video_register_device(cam->v4ldev, VFL_TYPE_GRABBER,
+ video_nr[dev_nr]);
+ if (err) {
+ DBG(1, "V4L device registration failed")
+ if (err == -ENFILE && video_nr[dev_nr] == -1)
+ DBG(2, "Couldn't find a free /dev/videoX node")
+ video_nr[dev_nr] = -1;
+ dev_nr = (dev_nr < W9968CF_MAX_DEVICES-1) ? dev_nr+1 : 0;
+ goto fail;
+ }
+
+ DBG(2, "V4L device registered as /dev/video%d", cam->v4ldev->minor)
+
+ /* Set some basic constants */
+ w9968cf_configure_camera(cam, udev, mod_id, dev_nr);
+
+ /* Add a new entry into the list of V4L registered devices */
+ down(&w9968cf_devlist_sem);
+ list_add(&cam->v4llist, &w9968cf_dev_list);
+ up(&w9968cf_devlist_sem);
+ dev_nr = (dev_nr < W9968CF_MAX_DEVICES-1) ? dev_nr+1 : 0;
+
+ w9968cf_turn_on_led(cam);
+
+ w9968cf_i2c_init(cam);
+
+ usb_set_intfdata(intf, cam);
+ up(&cam->dev_sem);
+ return 0;
+
+fail: /* Free unused memory */
+ if (cam->control_buffer)
+ kfree(cam->control_buffer);
+ if (cam->data_buffer)
+ kfree(cam->data_buffer);
+ if (cam->v4ldev)
+ video_device_release(cam->v4ldev);
+ up(&cam->dev_sem);
+ kfree(cam);
+ return err;
+}
+
+
+static void w9968cf_usb_disconnect(struct usb_interface* intf)
+{
+ struct w9968cf_device* cam =
+ (struct w9968cf_device*)usb_get_intfdata(intf);
+
+ down_write(&w9968cf_disconnect);
+
+ if (cam) {
+ /* Prevent concurrent accesses to data */
+ down(&cam->dev_sem);
+
+ cam->disconnected = 1;
+
+ DBG(2, "Disconnecting %s...", symbolic(camlist, cam->id))
+
+ wake_up_interruptible_all(&cam->open);
+
+ if (cam->users) {
+ DBG(2, "The device is open (/dev/video%d)! "
+ "Process name: %s. Deregistration and memory "
+ "deallocation are deferred on close.",
+ cam->v4ldev->minor, cam->command)
+ cam->misconfigured = 1;
+ w9968cf_stop_transfer(cam);
+ wake_up_interruptible(&cam->wait_queue);
+ } else
+ w9968cf_release_resources(cam);
+
+ up(&cam->dev_sem);
+
+ if (!cam->users)
+ kfree(cam);
+ }
+
+ up_write(&w9968cf_disconnect);
+}
+
+
+static struct usb_driver w9968cf_usb_driver = {
+ .owner = THIS_MODULE,
+ .name = "w9968cf",
+ .id_table = winbond_id_table,
+ .probe = w9968cf_usb_probe,
+ .disconnect = w9968cf_usb_disconnect,
+};
+
+
+
+/****************************************************************************
+ * Module init, exit and intermodule communication *
+ ****************************************************************************/
+
+static int w9968cf_vppmod_detect(struct w9968cf_device* cam)
+{
+ if (!w9968cf_vpp)
+ if (vppmod_load)
+ request_module("w9968cf-vpp");
+
+ down(&w9968cf_vppmod_lock);
+
+ if (!w9968cf_vpp) {
+ DBG(4, "Video post-processing module not detected")
+ w9968cf_adjust_configuration(cam);
+ goto out;
+ }
+
+ if (!try_module_get(w9968cf_vpp->owner)) {
+ DBG(1, "Couldn't increment the reference count of "
+ "the video post-processing module")
+ up(&w9968cf_vppmod_lock);
+ return -ENOSYS;
+ }
+
+ w9968cf_vpp->busy++;
+
+ DBG(5, "Video post-processing module detected")
+
+out:
+ up(&w9968cf_vppmod_lock);
+ return 0;
+}
+
+
+static void w9968cf_vppmod_release(struct w9968cf_device* cam)
+{
+ down(&w9968cf_vppmod_lock);
+
+ if (w9968cf_vpp && w9968cf_vpp->busy) {
+ module_put(w9968cf_vpp->owner);
+ w9968cf_vpp->busy--;
+ wake_up(&w9968cf_vppmod_wait);
+ DBG(5, "Video post-processing module released")
+ }
+
+ up(&w9968cf_vppmod_lock);
+}
+
+
+int w9968cf_vppmod_register(struct w9968cf_vpp_t* vpp)
+{
+ down(&w9968cf_vppmod_lock);
+
+ if (w9968cf_vpp) {
+ KDBG(1, "Video post-processing module already registered")
+ up(&w9968cf_vppmod_lock);
+ return -EINVAL;
+ }
+
+ w9968cf_vpp = vpp;
+ w9968cf_vpp->busy = 0;
+
+ KDBG(2, "Video post-processing module registered")
+ up(&w9968cf_vppmod_lock);
+ return 0;
+}
+
+
+int w9968cf_vppmod_deregister(struct w9968cf_vpp_t* vpp)
+{
+ down(&w9968cf_vppmod_lock);
+
+ if (!w9968cf_vpp) {
+ up(&w9968cf_vppmod_lock);
+ return -EINVAL;
+ }
+
+ if (w9968cf_vpp != vpp) {
+ KDBG(1, "Only the owner can unregister the video "
+ "post-processing module")
+ up(&w9968cf_vppmod_lock);
+ return -EINVAL;
+ }
+
+ if (w9968cf_vpp->busy) {
+ KDBG(2, "Video post-processing module busy. Wait for it to be "
+ "released...")
+ up(&w9968cf_vppmod_lock);
+ wait_event(w9968cf_vppmod_wait, !w9968cf_vpp->busy);
+ w9968cf_vpp = NULL;
+ goto out;
+ }
+
+ w9968cf_vpp = NULL;
+
+ up(&w9968cf_vppmod_lock);
+
+out:
+ KDBG(2, "Video post-processing module unregistered")
+ return 0;
+}
+
+
+static int __init w9968cf_module_init(void)
+{
+ int err;
+
+ KDBG(2, W9968CF_MODULE_NAME" "W9968CF_MODULE_VERSION)
+ KDBG(3, W9968CF_MODULE_AUTHOR)
+
+ if (ovmod_load)
+ request_module("ovcamchip");
+
+ if ((err = usb_register(&w9968cf_usb_driver)))
+ return err;
+
+ return 0;
+}
+
+
+static void __exit w9968cf_module_exit(void)
+{
+ /* w9968cf_usb_disconnect() will be called */
+ usb_deregister(&w9968cf_usb_driver);
+
+ KDBG(2, W9968CF_MODULE_NAME" deregistered")
+}
+
+
+module_init(w9968cf_module_init);
+module_exit(w9968cf_module_exit);
+
+
+EXPORT_SYMBOL(w9968cf_vppmod_register);
+EXPORT_SYMBOL(w9968cf_vppmod_deregister);
diff --git a/drivers/usb/media/w9968cf.h b/drivers/usb/media/w9968cf.h
new file mode 100644
index 000000000000..8acbfe205bc7
--- /dev/null
+++ b/drivers/usb/media/w9968cf.h
@@ -0,0 +1,339 @@
+/***************************************************************************
+ * Video4Linux driver for W996[87]CF JPEG USB Dual Mode Camera Chip. *
+ * *
+ * Copyright (C) 2002-2004 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#ifndef _W9968CF_H_
+#define _W9968CF_H_
+
+#include <linux/videodev.h>
+#include <linux/usb.h>
+#include <linux/i2c.h>
+#include <linux/device.h>
+#include <linux/spinlock.h>
+#include <linux/list.h>
+#include <linux/wait.h>
+#include <linux/config.h>
+#include <linux/param.h>
+#include <linux/types.h>
+#include <linux/rwsem.h>
+#include <asm/semaphore.h>
+
+#include <media/ovcamchip.h>
+
+#include "w9968cf_vpp.h"
+
+
+/****************************************************************************
+ * Default values *
+ ****************************************************************************/
+
+#define W9968CF_OVMOD_LOAD 1 /* automatic 'ovcamchip' module loading */
+#define W9968CF_VPPMOD_LOAD 1 /* automatic 'w9968cf-vpp' module loading */
+
+/* Comment/uncomment the following line to enable/disable debugging messages */
+#define W9968CF_DEBUG
+
+/* These have effect only if W9968CF_DEBUG is defined */
+#define W9968CF_DEBUG_LEVEL 2 /* from 0 to 6. 0 for no debug informations */
+#define W9968CF_SPECIFIC_DEBUG 0 /* 0 or 1 */
+
+#define W9968CF_MAX_DEVICES 32
+#define W9968CF_SIMCAMS W9968CF_MAX_DEVICES /* simultaneous cameras */
+
+#define W9968CF_MAX_BUFFERS 32
+#define W9968CF_BUFFERS 2 /* n. of frame buffers from 2 to MAX_BUFFERS */
+
+/* Maximum data payload sizes in bytes for alternate settings */
+static const u16 wMaxPacketSize[] = {1023, 959, 895, 831, 767, 703, 639, 575,
+ 511, 447, 383, 319, 255, 191, 127, 63};
+#define W9968CF_PACKET_SIZE 1023 /* according to wMaxPacketSizes[] */
+#define W9968CF_MIN_PACKET_SIZE 63 /* minimum value */
+#define W9968CF_ISO_PACKETS 5 /* n.of packets for isochronous transfers */
+#define W9968CF_USB_CTRL_TIMEOUT 1000 /* timeout (ms) for usb control commands */
+#define W9968CF_URBS 2 /* n. of scheduled URBs for ISO transfer */
+
+#define W9968CF_I2C_BUS_DELAY 4 /* delay in us for I2C bit r/w operations */
+#define W9968CF_I2C_RW_RETRIES 15 /* number of max I2C r/w retries */
+
+/* Available video formats */
+struct w9968cf_format {
+ const u16 palette;
+ const u16 depth;
+ const u8 compression;
+};
+
+static const struct w9968cf_format w9968cf_formatlist[] = {
+ { VIDEO_PALETTE_UYVY, 16, 0 }, /* original video */
+ { VIDEO_PALETTE_YUV422P, 16, 1 }, /* with JPEG compression */
+ { VIDEO_PALETTE_YUV420P, 12, 1 }, /* with JPEG compression */
+ { VIDEO_PALETTE_YUV420, 12, 1 }, /* same as YUV420P */
+ { VIDEO_PALETTE_YUYV, 16, 0 }, /* software conversion */
+ { VIDEO_PALETTE_YUV422, 16, 0 }, /* software conversion */
+ { VIDEO_PALETTE_GREY, 8, 0 }, /* software conversion */
+ { VIDEO_PALETTE_RGB555, 16, 0 }, /* software conversion */
+ { VIDEO_PALETTE_RGB565, 16, 0 }, /* software conversion */
+ { VIDEO_PALETTE_RGB24, 24, 0 }, /* software conversion */
+ { VIDEO_PALETTE_RGB32, 32, 0 }, /* software conversion */
+ { 0, 0, 0 } /* 0 is a terminating entry */
+};
+
+#define W9968CF_DECOMPRESSION 2 /* decomp:0=disable,1=force,2=any formats */
+#define W9968CF_PALETTE_DECOMP_OFF VIDEO_PALETTE_UYVY /* when decomp=0 */
+#define W9968CF_PALETTE_DECOMP_FORCE VIDEO_PALETTE_YUV420P /* when decomp=1 */
+#define W9968CF_PALETTE_DECOMP_ON VIDEO_PALETTE_UYVY /* when decomp=2 */
+
+#define W9968CF_FORCE_RGB 0 /* read RGB instead of BGR, yes=1/no=0 */
+
+#define W9968CF_MAX_WIDTH 800 /* Has effect if up-scaling is on */
+#define W9968CF_MAX_HEIGHT 600 /* Has effect if up-scaling is on */
+#define W9968CF_WIDTH 320 /* from 128 to 352, multiple of 16 */
+#define W9968CF_HEIGHT 240 /* from 96 to 288, multiple of 16 */
+
+#define W9968CF_CLAMPING 0 /* 0 disable, 1 enable video data clamping */
+#define W9968CF_FILTER_TYPE 0 /* 0 disable 1 (1-2-1), 2 (2-3-6-3-2) */
+#define W9968CF_DOUBLE_BUFFER 1 /* 0 disable, 1 enable double buffer */
+#define W9968CF_LARGEVIEW 1 /* 0 disable, 1 enable */
+#define W9968CF_UPSCALING 0 /* 0 disable, 1 enable */
+
+#define W9968CF_MONOCHROME 0 /* 0 not monochrome, 1 monochrome sensor */
+#define W9968CF_BRIGHTNESS 31000 /* from 0 to 65535 */
+#define W9968CF_HUE 32768 /* from 0 to 65535 */
+#define W9968CF_COLOUR 32768 /* from 0 to 65535 */
+#define W9968CF_CONTRAST 50000 /* from 0 to 65535 */
+#define W9968CF_WHITENESS 32768 /* from 0 to 65535 */
+
+#define W9968CF_AUTOBRIGHT 0 /* 0 disable, 1 enable automatic brightness */
+#define W9968CF_AUTOEXP 1 /* 0 disable, 1 enable automatic exposure */
+#define W9968CF_LIGHTFREQ 50 /* light frequency. 50Hz (Europe) or 60Hz */
+#define W9968CF_BANDINGFILTER 0 /* 0 disable, 1 enable banding filter */
+#define W9968CF_BACKLIGHT 0 /* 0 or 1, 1=object is lit from behind */
+#define W9968CF_MIRROR 0 /* 0 or 1 [don't] reverse image horizontally*/
+
+#define W9968CF_CLOCKDIV -1 /* -1 = automatic clock divisor */
+#define W9968CF_DEF_CLOCKDIVISOR 0 /* default sensor clock divisor value */
+
+
+/****************************************************************************
+ * Globals *
+ ****************************************************************************/
+
+#define W9968CF_MODULE_NAME "V4L driver for W996[87]CF JPEG USB " \
+ "Dual Mode Camera Chip"
+#define W9968CF_MODULE_VERSION "1:1.33-basic"
+#define W9968CF_MODULE_AUTHOR "(C) 2002-2004 Luca Risolia"
+#define W9968CF_AUTHOR_EMAIL "<luca.risolia@studio.unibo.it>"
+#define W9968CF_MODULE_LICENSE "GPL"
+
+static const struct usb_device_id winbond_id_table[] = {
+ {
+ /* Creative Labs Video Blaster WebCam Go Plus */
+ USB_DEVICE(0x041e, 0x4003),
+ .driver_info = (unsigned long)"w9968cf",
+ },
+ {
+ /* Generic W996[87]CF JPEG USB Dual Mode Camera */
+ USB_DEVICE(0x1046, 0x9967),
+ .driver_info = (unsigned long)"w9968cf",
+ },
+ { } /* terminating entry */
+};
+
+/* W996[87]CF camera models, internal ids: */
+enum w9968cf_model_id {
+ W9968CF_MOD_GENERIC = 1, /* Generic W996[87]CF based device */
+ W9968CF_MOD_CLVBWGP = 11,/*Creative Labs Video Blaster WebCam Go Plus*/
+ W9968CF_MOD_ADPVDMA = 21, /* Aroma Digi Pen VGA Dual Mode ADG-5000 */
+ W9986CF_MOD_AAU = 31, /* AVerMedia AVerTV USB */
+ W9968CF_MOD_CLVBWG = 34, /* Creative Labs Video Blaster WebCam Go */
+ W9968CF_MOD_LL = 37, /* Lebon LDC-035A */
+ W9968CF_MOD_EEEMC = 40, /* Ezonics EZ-802 EZMega Cam */
+ W9968CF_MOD_OOE = 42, /* OmniVision OV8610-EDE */
+ W9968CF_MOD_ODPVDMPC = 43,/* OPCOM Digi Pen VGA Dual Mode Pen Camera */
+ W9968CF_MOD_PDPII = 46, /* Pretec Digi Pen-II */
+ W9968CF_MOD_PDP480 = 49, /* Pretec DigiPen-480 */
+};
+
+enum w9968cf_frame_status {
+ F_READY, /* finished grabbing & ready to be read/synced */
+ F_GRABBING, /* in the process of being grabbed into */
+ F_ERROR, /* something bad happened while processing */
+ F_UNUSED /* unused (no VIDIOCMCAPTURE) */
+};
+
+struct w9968cf_frame_t {
+ void* buffer;
+ unsigned long size;
+ u32 length;
+ int number;
+ enum w9968cf_frame_status status;
+ struct w9968cf_frame_t* next;
+ u8 queued;
+};
+
+enum w9968cf_vpp_flag {
+ VPP_NONE = 0x00,
+ VPP_UPSCALE = 0x01,
+ VPP_SWAP_YUV_BYTES = 0x02,
+ VPP_DECOMPRESSION = 0x04,
+ VPP_UYVY_TO_RGBX = 0x08,
+};
+
+static struct w9968cf_vpp_t* w9968cf_vpp;
+static DECLARE_MUTEX(w9968cf_vppmod_lock);
+static DECLARE_WAIT_QUEUE_HEAD(w9968cf_vppmod_wait);
+
+static LIST_HEAD(w9968cf_dev_list); /* head of V4L registered cameras list */
+static DECLARE_MUTEX(w9968cf_devlist_sem); /* semaphore for list traversal */
+
+static DECLARE_RWSEM(w9968cf_disconnect); /* prevent races with open() */
+
+/* Main device driver structure */
+struct w9968cf_device {
+ struct device dev; /* device structure */
+
+ enum w9968cf_model_id id; /* private device identifier */
+
+ struct video_device* v4ldev; /* -> V4L structure */
+ struct list_head v4llist; /* entry of the list of V4L cameras */
+
+ struct usb_device* usbdev; /* -> main USB structure */
+ struct urb* urb[W9968CF_URBS]; /* -> USB request block structs */
+ void* transfer_buffer[W9968CF_URBS]; /* -> ISO transfer buffers */
+ u16* control_buffer; /* -> buffer for control req.*/
+ u16* data_buffer; /* -> data to send to the FSB */
+
+ struct w9968cf_frame_t frame[W9968CF_MAX_BUFFERS];
+ struct w9968cf_frame_t frame_tmp; /* temporary frame */
+ struct w9968cf_frame_t frame_vpp; /* helper frame.*/
+ struct w9968cf_frame_t* frame_current; /* -> frame being grabbed */
+ struct w9968cf_frame_t* requested_frame[W9968CF_MAX_BUFFERS];
+
+ u8 max_buffers, /* number of requested buffers */
+ force_palette, /* yes=1/no=0 */
+ force_rgb, /* read RGB instead of BGR, yes=1, no=0 */
+ double_buffer, /* hardware double buffering yes=1/no=0 */
+ clamping, /* video data clamping yes=1/no=0 */
+ filter_type, /* 0=disabled, 1=3 tap, 2=5 tap filter */
+ capture, /* 0=disabled, 1=enabled */
+ largeview, /* 0=disabled, 1=enabled */
+ decompression, /* 0=disabled, 1=forced, 2=allowed */
+ upscaling; /* software image scaling, 0=enabled, 1=disabled */
+
+ struct video_picture picture; /* current picture settings */
+ struct video_window window; /* current window settings */
+
+ u16 hw_depth, /* depth (used by the chip) */
+ hw_palette, /* palette (used by the chip) */
+ hw_width, /* width (used by the chip) */
+ hw_height, /* height (used by the chip) */
+ hs_polarity, /* 0=negative sync pulse, 1=positive sync pulse */
+ vs_polarity, /* 0=negative sync pulse, 1=positive sync pulse */
+ start_cropx, /* pixels from HS inactive edge to 1st cropped pixel*/
+ start_cropy; /* pixels from VS inactive edge to 1st cropped pixel*/
+
+ enum w9968cf_vpp_flag vpp_flag; /* post-processing routines in use */
+
+ u8 nbuffers, /* number of allocated frame buffers */
+ altsetting, /* camera alternate setting */
+ disconnected, /* flag: yes=1, no=0 */
+ misconfigured, /* flag: yes=1, no=0 */
+ users, /* flag: number of users holding the device */
+ streaming; /* flag: yes=1, no=0 */
+
+ u8 sensor_initialized; /* flag: yes=1, no=0 */
+
+ /* Determined by the image sensor type: */
+ int sensor, /* type of image sensor chip (CC_*) */
+ monochrome; /* image sensor is (probably) monochrome */
+ u16 maxwidth, /* maximum width supported by the image sensor */
+ maxheight, /* maximum height supported by the image sensor */
+ minwidth, /* minimum width supported by the image sensor */
+ minheight; /* minimum height supported by the image sensor */
+ u8 auto_brt, /* auto brightness enabled flag */
+ auto_exp, /* auto exposure enabled flag */
+ backlight, /* backlight exposure algorithm flag */
+ mirror, /* image is reversed horizontally */
+ lightfreq, /* power (lighting) frequency */
+ bandfilt; /* banding filter enabled flag */
+ s8 clockdiv; /* clock divisor */
+
+ /* I2C interface to kernel */
+ struct i2c_adapter i2c_adapter;
+ struct i2c_client* sensor_client;
+
+ /* Locks */
+ struct semaphore dev_sem, /* for probe, disconnect,open and close */
+ fileop_sem; /* for read and ioctl */
+ spinlock_t urb_lock, /* for submit_urb() and unlink_urb() */
+ flist_lock; /* for requested frame list accesses */
+ wait_queue_head_t open, wait_queue;
+
+ char command[16]; /* name of the program holding the device */
+};
+
+
+/****************************************************************************
+ * Macros for debugging *
+ ****************************************************************************/
+
+#undef DBG
+#undef KDBG
+#ifdef W9968CF_DEBUG
+/* For device specific debugging messages */
+# define DBG(level, fmt, args...) \
+{ \
+ if ( ((specific_debug) && (debug == (level))) || \
+ ((!specific_debug) && (debug >= (level))) ) { \
+ if ((level) == 1) \
+ dev_err(&cam->dev, fmt "\n", ## args); \
+ else if ((level) == 2 || (level) == 3) \
+ dev_info(&cam->dev, fmt "\n", ## args); \
+ else if ((level) == 4) \
+ dev_warn(&cam->dev, fmt "\n", ## args); \
+ else if ((level) >= 5) \
+ dev_info(&cam->dev, "[%s:%d] " fmt "\n", \
+ __FUNCTION__, __LINE__ , ## args); \
+ } \
+}
+/* For generic kernel (not device specific) messages */
+# define KDBG(level, fmt, args...) \
+{ \
+ if ( ((specific_debug) && (debug == (level))) || \
+ ((!specific_debug) && (debug >= (level))) ) { \
+ if ((level) >= 1 && (level) <= 4) \
+ pr_info("w9968cf: " fmt "\n", ## args); \
+ else if ((level) >= 5) \
+ pr_debug("w9968cf: [%s:%d] " fmt "\n", __FUNCTION__, \
+ __LINE__ , ## args); \
+ } \
+}
+#else
+ /* Not debugging: nothing */
+# define DBG(level, fmt, args...) do {;} while(0);
+# define KDBG(level, fmt, args...) do {;} while(0);
+#endif
+
+#undef PDBG
+#define PDBG(fmt, args...) \
+dev_info(&cam->dev, "[%s:%d] " fmt "\n", __FUNCTION__, __LINE__ , ## args);
+
+#undef PDBGG
+#define PDBGG(fmt, args...) do {;} while(0); /* nothing: it's a placeholder */
+
+#endif /* _W9968CF_H_ */
diff --git a/drivers/usb/media/w9968cf_decoder.h b/drivers/usb/media/w9968cf_decoder.h
new file mode 100644
index 000000000000..31faccbe8f03
--- /dev/null
+++ b/drivers/usb/media/w9968cf_decoder.h
@@ -0,0 +1,86 @@
+/***************************************************************************
+ * Video decoder for the W996[87]CF driver for Linux. *
+ * *
+ * Copyright (C) 2003 2004 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#ifndef _W9968CF_DECODER_H_
+#define _W9968CF_DECODER_H_
+
+/* Comment/uncomment this for high/low quality of compressed video */
+#define W9968CF_DEC_FAST_LOWQUALITY_VIDEO
+
+#ifdef W9968CF_DEC_FAST_LOWQUALITY_VIDEO
+static const unsigned char Y_QUANTABLE[64] = {
+ 16, 11, 10, 16, 24, 40, 51, 61,
+ 12, 12, 14, 19, 26, 58, 60, 55,
+ 14, 13, 16, 24, 40, 57, 69, 56,
+ 14, 17, 22, 29, 51, 87, 80, 62,
+ 18, 22, 37, 56, 68, 109, 103, 77,
+ 24, 35, 55, 64, 81, 104, 113, 92,
+ 49, 64, 78, 87, 103, 121, 120, 101,
+ 72, 92, 95, 98, 112, 100, 103, 99
+};
+
+static const unsigned char UV_QUANTABLE[64] = {
+ 17, 18, 24, 47, 99, 99, 99, 99,
+ 18, 21, 26, 66, 99, 99, 99, 99,
+ 24, 26, 56, 99, 99, 99, 99, 99,
+ 47, 66, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99
+};
+#else
+static const unsigned char Y_QUANTABLE[64] = {
+ 8, 5, 5, 8, 12, 20, 25, 30,
+ 6, 6, 7, 9, 13, 29, 30, 27,
+ 7, 6, 8, 12, 20, 28, 34, 28,
+ 7, 8, 11, 14, 25, 43, 40, 31,
+ 9, 11, 18, 28, 34, 54, 51, 38,
+ 12, 17, 27, 32, 40, 52, 56, 46,
+ 24, 32, 39, 43, 51, 60, 60, 50,
+ 36, 46, 47, 49, 56, 50, 51, 49
+};
+
+static const unsigned char UV_QUANTABLE[64] = {
+ 8, 9, 12, 23, 49, 49, 49, 49,
+ 9, 10, 13, 33, 49, 49, 49, 49,
+ 12, 13, 28, 49, 49, 49, 49, 49,
+ 23, 33, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49
+};
+#endif
+
+#define W9968CF_DEC_ERR_CORRUPTED_DATA -1
+#define W9968CF_DEC_ERR_BUF_OVERFLOW -2
+#define W9968CF_DEC_ERR_NO_SOI -3
+#define W9968CF_DEC_ERR_NO_SOF0 -4
+#define W9968CF_DEC_ERR_NO_SOS -5
+#define W9968CF_DEC_ERR_NO_EOI -6
+
+extern void w9968cf_init_decoder(void);
+extern int w9968cf_check_headers(const unsigned char* Pin,
+ const unsigned long BUF_SIZE);
+extern int w9968cf_decode(const char* Pin, const unsigned long BUF_SIZE,
+ const unsigned W, const unsigned H, char* Pout);
+
+#endif /* _W9968CF_DECODER_H_ */
diff --git a/drivers/usb/media/w9968cf_vpp.h b/drivers/usb/media/w9968cf_vpp.h
new file mode 100644
index 000000000000..3f5317dc4c29
--- /dev/null
+++ b/drivers/usb/media/w9968cf_vpp.h
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * Interface for video post-processing functions for the W996[87]CF driver *
+ * for Linux. *
+ * *
+ * Copyright (C) 2002-2004 by Luca Risolia <luca.risolia@studio.unibo.it> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#ifndef _W9968CF_VPP_H_
+#define _W9968CF_VPP_H_
+
+#include <linux/module.h>
+#include <asm/types.h>
+
+struct w9968cf_vpp_t {
+ struct module* owner;
+ int (*check_headers)(const unsigned char*, const unsigned long);
+ int (*decode)(const char*, const unsigned long, const unsigned,
+ const unsigned, char*);
+ void (*swap_yuvbytes)(void*, unsigned long);
+ void (*uyvy_to_rgbx)(u8*, unsigned long, u8*, u16, u8);
+ void (*scale_up)(u8*, u8*, u16, u16, u16, u16, u16);
+
+ u8 busy; /* read-only flag: module is/is not in use */
+};
+
+extern int w9968cf_vppmod_register(struct w9968cf_vpp_t*);
+extern int w9968cf_vppmod_deregister(struct w9968cf_vpp_t*);
+
+#endif /* _W9968CF_VPP_H_ */
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
new file mode 100644
index 000000000000..3a896954b3a9
--- /dev/null
+++ b/drivers/usb/misc/Kconfig
@@ -0,0 +1,152 @@
+#
+# USB Miscellaneous driver configuration
+#
+comment "USB Miscellaneous drivers"
+ depends on USB
+
+config USB_EMI62
+ tristate "EMI 6|2m USB Audio interface support"
+ depends on USB
+ ---help---
+ This driver loads firmware to Emagic EMI 6|2m low latency USB
+ Audio and Midi interface.
+
+ After firmware load the device is handled with standard linux
+ USB Audio driver.
+
+ This code is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called audio. If you want to compile it as a
+ module, say M here and read <file:Documentation/kbuild/modules.txt>.
+
+config USB_EMI26
+ tristate "EMI 2|6 USB Audio interface support"
+ depends on USB
+ ---help---
+ This driver loads firmware to Emagic EMI 2|6 low latency USB
+ Audio interface.
+
+ After firmware load the device is handled with standard linux
+ USB Audio driver.
+
+ To compile this driver as a module, choose M here: the
+ module will be called emi26.
+
+config USB_AUERSWALD
+ tristate "USB Auerswald ISDN support (EXPERIMENTAL)"
+ depends on USB && EXPERIMENTAL
+ help
+ Say Y here if you want to connect an Auerswald USB ISDN Device
+ to your computer's USB port.
+
+ To compile this driver as a module, choose M here: the
+ module will be called auerswald.
+
+config USB_RIO500
+ tristate "USB Diamond Rio500 support (EXPERIMENTAL)"
+ depends on USB && EXPERIMENTAL
+ help
+ Say Y here if you want to connect a USB Rio500 mp3 player to your
+ computer's USB port. Please read <file:Documentation/usb/rio.txt>
+ for more information.
+
+ To compile this driver as a module, choose M here: the
+ module will be called rio500.
+
+config USB_LEGOTOWER
+ tristate "USB Lego Infrared Tower support (EXPERIMENTAL)"
+ depends on USB && EXPERIMENTAL
+ help
+ Say Y here if you want to connect a USB Lego Infrared Tower to your
+ computer's USB port.
+
+ This code is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called legousbtower. If you want to compile it as
+ a module, say M here and read
+ <file:Documentation/kbuild/modules.txt>.
+
+config USB_LCD
+ tristate "USB LCD driver support"
+ depends on USB
+ help
+ Say Y here if you want to connect an USBLCD to your computer's
+ USB port. The USBLCD is a small USB interface board for
+ alphanumeric LCD modules. See <http://www.usblcd.de/> for more
+ information.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usblcd.
+
+config USB_LED
+ tristate "USB LED driver support"
+ depends on USB
+ help
+ Say Y here if you want to connect an USBLED device to your
+ computer's USB port.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usbled.
+
+config USB_CYTHERM
+ tristate "Cypress USB thermometer driver support"
+ depends on USB
+ help
+ Say Y here if you want to connect a Cypress USB thermometer
+ device to your computer's USB port. This device is also known
+ as the Cypress USB Starter kit or demo board. The Elektor
+ magazine published a modified version of this device in issue
+ #291.
+
+ To compile this driver as a module, choose M here: the
+ module will be called cytherm.
+
+config USB_PHIDGETKIT
+ tristate "USB PhidgetKit support"
+ depends on USB
+ help
+ Say Y here if you want to connect a PhidgetKit USB device from
+ Phidgets Inc.
+
+ To compile this driver as a module, choose M here: the
+ module will be called phidgetkit.
+
+config USB_PHIDGETSERVO
+ tristate "USB PhidgetServo support"
+ depends on USB
+ help
+ Say Y here if you want to connect an 1 or 4 Motor PhidgetServo
+ servo controller version 2.0 or 3.0.
+
+ Phidgets Inc. has a web page at <http://www.phidgets.com/>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called phidgetservo.
+
+config USB_IDMOUSE
+ tristate "Siemens ID USB Mouse Fingerprint sensor support"
+ depends on USB
+ help
+ Say Y here if you want to use the fingerprint sensor on
+ the Siemens ID Mouse. There is also a Siemens ID Mouse
+ _Professional_, which has not been tested with this driver,
+ but uses the same sensor and may therefore work.
+
+ This driver creates an entry "/dev/idmouseX" or "/dev/usb/idmouseX",
+ which can be used by, e.g.,"cat /dev/idmouse0 > fingerprint.pnm".
+
+ See also <http://www.fs.tum.de/~echtler/idmouse/>.
+
+source "drivers/usb/misc/sisusbvga/Kconfig"
+
+config USB_TEST
+ tristate "USB testing driver (DEVELOPMENT)"
+ depends on USB && USB_DEVICEFS && EXPERIMENTAL
+ help
+ This driver is for testing host controller software. It is used
+ with specialized device firmware for regression and stress testing,
+ to help prevent problems from cropping up with "real" drivers.
+
+ See <http://www.linux-usb.org/usbtest/> for more information,
+ including sample test device firmware and "how to use it".
+
diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile
new file mode 100644
index 000000000000..4a3814cbd48d
--- /dev/null
+++ b/drivers/usb/misc/Makefile
@@ -0,0 +1,20 @@
+#
+# Makefile for the rest of the USB drivers
+# (the ones that don't fit into any other categories)
+#
+
+obj-$(CONFIG_USB_AUERSWALD) += auerswald.o
+obj-$(CONFIG_USB_CYTHERM) += cytherm.o
+obj-$(CONFIG_USB_EMI26) += emi26.o
+obj-$(CONFIG_USB_EMI62) += emi62.o
+obj-$(CONFIG_USB_IDMOUSE) += idmouse.o
+obj-$(CONFIG_USB_LCD) += usblcd.o
+obj-$(CONFIG_USB_LED) += usbled.o
+obj-$(CONFIG_USB_LEGOTOWER) += legousbtower.o
+obj-$(CONFIG_USB_PHIDGETKIT) += phidgetkit.o
+obj-$(CONFIG_USB_PHIDGETSERVO) += phidgetservo.o
+obj-$(CONFIG_USB_RIO500) += rio500.o
+obj-$(CONFIG_USB_TEST) += usbtest.o
+obj-$(CONFIG_USB_USS720) += uss720.o
+
+obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/ \ No newline at end of file
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
new file mode 100644
index 000000000000..a530bb976e43
--- /dev/null
+++ b/drivers/usb/misc/auerswald.c
@@ -0,0 +1,2163 @@
+/*****************************************************************************/
+/*
+ * auerswald.c -- Auerswald PBX/System Telephone usb driver.
+ *
+ * Copyright (C) 2001 Wolfgang Mües (wolfgang@iksw-muees.de)
+ *
+ * Very much code of this driver is borrowed from dabusb.c (Deti Fliegl)
+ * and from the USB Skeleton driver (Greg Kroah-Hartman). Thank you.
+ *
+ * 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.
+ */
+ /*****************************************************************************/
+
+/* Standard Linux module include files */
+#include <asm/uaccess.h>
+#include <asm/byteorder.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/wait.h>
+#undef DEBUG /* include debug macros until it's done */
+#include <linux/usb.h>
+
+/*-------------------------------------------------------------------*/
+/* Debug support */
+#ifdef DEBUG
+#define dump( adr, len) \
+do { \
+ unsigned int u; \
+ printk (KERN_DEBUG); \
+ for (u = 0; u < len; u++) \
+ printk (" %02X", adr[u] & 0xFF); \
+ printk ("\n"); \
+} while (0)
+#else
+#define dump( adr, len)
+#endif
+
+/*-------------------------------------------------------------------*/
+/* Version Information */
+#define DRIVER_VERSION "0.9.11"
+#define DRIVER_AUTHOR "Wolfgang Mües <wolfgang@iksw-muees.de>"
+#define DRIVER_DESC "Auerswald PBX/System Telephone usb driver"
+
+/*-------------------------------------------------------------------*/
+/* Private declarations for Auerswald USB driver */
+
+/* Auerswald Vendor ID */
+#define ID_AUERSWALD 0x09BF
+
+#define AUER_MINOR_BASE 112 /* auerswald driver minor number */
+
+/* we can have up to this number of device plugged in at once */
+#define AUER_MAX_DEVICES 16
+
+
+/* Number of read buffers for each device */
+#define AU_RBUFFERS 10
+
+/* Number of chain elements for each control chain */
+#define AUCH_ELEMENTS 20
+
+/* Number of retries in communication */
+#define AU_RETRIES 10
+
+/*-------------------------------------------------------------------*/
+/* vendor specific protocol */
+/* Header Byte */
+#define AUH_INDIRMASK 0x80 /* mask for direct/indirect bit */
+#define AUH_DIRECT 0x00 /* data is for USB device */
+#define AUH_INDIRECT 0x80 /* USB device is relay */
+
+#define AUH_SPLITMASK 0x40 /* mask for split bit */
+#define AUH_UNSPLIT 0x00 /* data block is full-size */
+#define AUH_SPLIT 0x40 /* data block is part of a larger one,
+ split-byte follows */
+
+#define AUH_TYPEMASK 0x3F /* mask for type of data transfer */
+#define AUH_TYPESIZE 0x40 /* different types */
+#define AUH_DCHANNEL 0x00 /* D channel data */
+#define AUH_B1CHANNEL 0x01 /* B1 channel transparent */
+#define AUH_B2CHANNEL 0x02 /* B2 channel transparent */
+/* 0x03..0x0F reserved for driver internal use */
+#define AUH_COMMAND 0x10 /* Command channel */
+#define AUH_BPROT 0x11 /* Configuration block protocol */
+#define AUH_DPROTANA 0x12 /* D channel protocol analyzer */
+#define AUH_TAPI 0x13 /* telephone api data (ATD) */
+/* 0x14..0x3F reserved for other protocols */
+#define AUH_UNASSIGNED 0xFF /* if char device has no assigned service */
+#define AUH_FIRSTUSERCH 0x11 /* first channel which is available for driver users */
+
+#define AUH_SIZE 1 /* Size of Header Byte */
+
+/* Split Byte. Only present if split bit in header byte set.*/
+#define AUS_STARTMASK 0x80 /* mask for first block of splitted frame */
+#define AUS_FIRST 0x80 /* first block */
+#define AUS_FOLLOW 0x00 /* following block */
+
+#define AUS_ENDMASK 0x40 /* mask for last block of splitted frame */
+#define AUS_END 0x40 /* last block */
+#define AUS_NOEND 0x00 /* not the last block */
+
+#define AUS_LENMASK 0x3F /* mask for block length information */
+
+/* Request types */
+#define AUT_RREQ (USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER) /* Read Request */
+#define AUT_WREQ (USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER) /* Write Request */
+
+/* Vendor Requests */
+#define AUV_GETINFO 0x00 /* GetDeviceInfo */
+#define AUV_WBLOCK 0x01 /* Write Block */
+#define AUV_RBLOCK 0x02 /* Read Block */
+#define AUV_CHANNELCTL 0x03 /* Channel Control */
+#define AUV_DUMMY 0x04 /* Dummy Out for retry */
+
+/* Device Info Types */
+#define AUDI_NUMBCH 0x0000 /* Number of supported B channels */
+#define AUDI_OUTFSIZE 0x0001 /* Size of OUT B channel fifos */
+#define AUDI_MBCTRANS 0x0002 /* max. Blocklength of control transfer */
+
+/* Interrupt endpoint definitions */
+#define AU_IRQENDP 1 /* Endpoint number */
+#define AU_IRQCMDID 16 /* Command-block ID */
+#define AU_BLOCKRDY 0 /* Command: Block data ready on ctl endpoint */
+#define AU_IRQMINSIZE 5 /* Nr. of bytes decoded in this driver */
+
+/* Device String Descriptors */
+#define AUSI_VENDOR 1 /* "Auerswald GmbH & Co. KG" */
+#define AUSI_DEVICE 2 /* Name of the Device */
+#define AUSI_SERIALNR 3 /* Serial Number */
+#define AUSI_MSN 4 /* "MSN ..." (first) Multiple Subscriber Number */
+
+#define AUSI_DLEN 100 /* Max. Length of Device Description */
+
+#define AUV_RETRY 0x101 /* First Firmware version which can do control retries */
+
+/*-------------------------------------------------------------------*/
+/* External data structures / Interface */
+typedef struct
+{
+ char __user *buf; /* return buffer for string contents */
+ unsigned int bsize; /* size of return buffer */
+} audevinfo_t,*paudevinfo_t;
+
+/* IO controls */
+#define IOCTL_AU_SLEN _IOR( 'U', 0xF0, int) /* return the max. string descriptor length */
+#define IOCTL_AU_DEVINFO _IOWR('U', 0xF1, audevinfo_t) /* get name of a specific device */
+#define IOCTL_AU_SERVREQ _IOW( 'U', 0xF2, int) /* request a service channel */
+#define IOCTL_AU_BUFLEN _IOR( 'U', 0xF3, int) /* return the max. buffer length for the device */
+#define IOCTL_AU_RXAVAIL _IOR( 'U', 0xF4, int) /* return != 0 if Receive Data available */
+#define IOCTL_AU_CONNECT _IOR( 'U', 0xF5, int) /* return != 0 if connected to a service channel */
+#define IOCTL_AU_TXREADY _IOR( 'U', 0xF6, int) /* return != 0 if Transmitt channel ready to send */
+/* 'U' 0xF7..0xFF reseved */
+
+/*-------------------------------------------------------------------*/
+/* Internal data structures */
+
+/* ..................................................................*/
+/* urb chain element */
+struct auerchain; /* forward for circular reference */
+typedef struct
+{
+ struct auerchain *chain; /* pointer to the chain to which this element belongs */
+ struct urb * urbp; /* pointer to attached urb */
+ void *context; /* saved URB context */
+ usb_complete_t complete; /* saved URB completion function */
+ struct list_head list; /* to include element into a list */
+} auerchainelement_t,*pauerchainelement_t;
+
+/* urb chain */
+typedef struct auerchain
+{
+ pauerchainelement_t active; /* element which is submitted to urb */
+ spinlock_t lock; /* protection agains interrupts */
+ struct list_head waiting_list; /* list of waiting elements */
+ struct list_head free_list; /* list of available elements */
+} auerchain_t,*pauerchain_t;
+
+/* urb blocking completion helper struct */
+typedef struct
+{
+ wait_queue_head_t wqh; /* wait for completion */
+ unsigned int done; /* completion flag */
+} auerchain_chs_t,*pauerchain_chs_t;
+
+/* ...................................................................*/
+/* buffer element */
+struct auerbufctl; /* forward */
+typedef struct
+{
+ char *bufp; /* reference to allocated data buffer */
+ unsigned int len; /* number of characters in data buffer */
+ unsigned int retries; /* for urb retries */
+ struct usb_ctrlrequest *dr; /* for setup data in control messages */
+ struct urb * urbp; /* USB urb */
+ struct auerbufctl *list; /* pointer to list */
+ struct list_head buff_list; /* reference to next buffer in list */
+} auerbuf_t,*pauerbuf_t;
+
+/* buffer list control block */
+typedef struct auerbufctl
+{
+ spinlock_t lock; /* protection in interrupt */
+ struct list_head free_buff_list;/* free buffers */
+ struct list_head rec_buff_list; /* buffers with receive data */
+} auerbufctl_t,*pauerbufctl_t;
+
+/* ...................................................................*/
+/* service context */
+struct auerscon; /* forward */
+typedef void (*auer_dispatch_t)(struct auerscon*, pauerbuf_t);
+typedef void (*auer_disconn_t) (struct auerscon*);
+typedef struct auerscon
+{
+ unsigned int id; /* protocol service id AUH_xxxx */
+ auer_dispatch_t dispatch; /* dispatch read buffer */
+ auer_disconn_t disconnect; /* disconnect from device, wake up all char readers */
+} auerscon_t,*pauerscon_t;
+
+/* ...................................................................*/
+/* USB device context */
+typedef struct
+{
+ struct semaphore mutex; /* protection in user context */
+ char name[20]; /* name of the /dev/usb entry */
+ unsigned int dtindex; /* index in the device table */
+ struct usb_device * usbdev; /* USB device handle */
+ int open_count; /* count the number of open character channels */
+ char dev_desc[AUSI_DLEN];/* for storing a textual description */
+ unsigned int maxControlLength; /* max. Length of control paket (without header) */
+ struct urb * inturbp; /* interrupt urb */
+ char * intbufp; /* data buffer for interrupt urb */
+ unsigned int irqsize; /* size of interrupt endpoint 1 */
+ struct auerchain controlchain; /* for chaining of control messages */
+ auerbufctl_t bufctl; /* Buffer control for control transfers */
+ pauerscon_t services[AUH_TYPESIZE];/* context pointers for each service */
+ unsigned int version; /* Version of the device */
+ wait_queue_head_t bufferwait; /* wait for a control buffer */
+} auerswald_t,*pauerswald_t;
+
+/* ................................................................... */
+/* character device context */
+typedef struct
+{
+ struct semaphore mutex; /* protection in user context */
+ pauerswald_t auerdev; /* context pointer of assigned device */
+ auerbufctl_t bufctl; /* controls the buffer chain */
+ auerscon_t scontext; /* service context */
+ wait_queue_head_t readwait; /* for synchronous reading */
+ struct semaphore readmutex; /* protection against multiple reads */
+ pauerbuf_t readbuf; /* buffer held for partial reading */
+ unsigned int readoffset; /* current offset in readbuf */
+ unsigned int removed; /* is != 0 if device is removed */
+} auerchar_t,*pauerchar_t;
+
+
+/*-------------------------------------------------------------------*/
+/* Forwards */
+static void auerswald_ctrlread_complete (struct urb * urb, struct pt_regs *regs);
+static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp);
+static struct usb_driver auerswald_driver;
+
+
+/*-------------------------------------------------------------------*/
+/* USB chain helper functions */
+/* -------------------------- */
+
+/* completion function for chained urbs */
+static void auerchain_complete (struct urb * urb, struct pt_regs *regs)
+{
+ unsigned long flags;
+ int result;
+
+ /* get pointer to element and to chain */
+ pauerchainelement_t acep = (pauerchainelement_t) urb->context;
+ pauerchain_t acp = acep->chain;
+
+ /* restore original entries in urb */
+ urb->context = acep->context;
+ urb->complete = acep->complete;
+
+ dbg ("auerchain_complete called");
+
+ /* call original completion function
+ NOTE: this function may lead to more urbs submitted into the chain.
+ (no chain lock at calling complete()!)
+ acp->active != NULL is protecting us against recursion.*/
+ urb->complete (urb, regs);
+
+ /* detach element from chain data structure */
+ spin_lock_irqsave (&acp->lock, flags);
+ if (acp->active != acep) /* paranoia debug check */
+ dbg ("auerchain_complete: completion on non-active element called!");
+ else
+ acp->active = NULL;
+
+ /* add the used chain element to the list of free elements */
+ list_add_tail (&acep->list, &acp->free_list);
+ acep = NULL;
+
+ /* is there a new element waiting in the chain? */
+ if (!acp->active && !list_empty (&acp->waiting_list)) {
+ /* yes: get the entry */
+ struct list_head *tmp = acp->waiting_list.next;
+ list_del (tmp);
+ acep = list_entry (tmp, auerchainelement_t, list);
+ acp->active = acep;
+ }
+ spin_unlock_irqrestore (&acp->lock, flags);
+
+ /* submit the new urb */
+ if (acep) {
+ urb = acep->urbp;
+ dbg ("auerchain_complete: submitting next urb from chain");
+ urb->status = 0; /* needed! */
+ result = usb_submit_urb(urb, GFP_ATOMIC);
+
+ /* check for submit errors */
+ if (result) {
+ urb->status = result;
+ dbg("auerchain_complete: usb_submit_urb with error code %d", result);
+ /* and do error handling via *this* completion function (recursive) */
+ auerchain_complete( urb, NULL);
+ }
+ } else {
+ /* simple return without submitting a new urb.
+ The empty chain is detected with acp->active == NULL. */
+ };
+}
+
+
+/* submit function for chained urbs
+ this function may be called from completion context or from user space!
+ early = 1 -> submit in front of chain
+*/
+static int auerchain_submit_urb_list (pauerchain_t acp, struct urb * urb, int early)
+{
+ int result;
+ unsigned long flags;
+ pauerchainelement_t acep = NULL;
+
+ dbg ("auerchain_submit_urb called");
+
+ /* try to get a chain element */
+ spin_lock_irqsave (&acp->lock, flags);
+ if (!list_empty (&acp->free_list)) {
+ /* yes: get the entry */
+ struct list_head *tmp = acp->free_list.next;
+ list_del (tmp);
+ acep = list_entry (tmp, auerchainelement_t, list);
+ }
+ spin_unlock_irqrestore (&acp->lock, flags);
+
+ /* if no chain element available: return with error */
+ if (!acep) {
+ return -ENOMEM;
+ }
+
+ /* fill in the new chain element values */
+ acep->chain = acp;
+ acep->context = urb->context;
+ acep->complete = urb->complete;
+ acep->urbp = urb;
+ INIT_LIST_HEAD (&acep->list);
+
+ /* modify urb */
+ urb->context = acep;
+ urb->complete = auerchain_complete;
+ urb->status = -EINPROGRESS; /* usb_submit_urb does this, too */
+
+ /* add element to chain - or start it immediately */
+ spin_lock_irqsave (&acp->lock, flags);
+ if (acp->active) {
+ /* there is traffic in the chain, simple add element to chain */
+ if (early) {
+ dbg ("adding new urb to head of chain");
+ list_add (&acep->list, &acp->waiting_list);
+ } else {
+ dbg ("adding new urb to end of chain");
+ list_add_tail (&acep->list, &acp->waiting_list);
+ }
+ acep = NULL;
+ } else {
+ /* the chain is empty. Prepare restart */
+ acp->active = acep;
+ }
+ /* Spin has to be removed before usb_submit_urb! */
+ spin_unlock_irqrestore (&acp->lock, flags);
+
+ /* Submit urb if immediate restart */
+ if (acep) {
+ dbg("submitting urb immediate");
+ urb->status = 0; /* needed! */
+ result = usb_submit_urb(urb, GFP_ATOMIC);
+ /* check for submit errors */
+ if (result) {
+ urb->status = result;
+ dbg("auerchain_submit_urb: usb_submit_urb with error code %d", result);
+ /* and do error handling via completion function */
+ auerchain_complete( urb, NULL);
+ }
+ }
+
+ return 0;
+}
+
+/* submit function for chained urbs
+ this function may be called from completion context or from user space!
+*/
+static int auerchain_submit_urb (pauerchain_t acp, struct urb * urb)
+{
+ return auerchain_submit_urb_list (acp, urb, 0);
+}
+
+/* cancel an urb which is submitted to the chain
+ the result is 0 if the urb is cancelled, or -EINPROGRESS if
+ URB_ASYNC_UNLINK is set and the function is successfully started.
+*/
+static int auerchain_unlink_urb (pauerchain_t acp, struct urb * urb)
+{
+ unsigned long flags;
+ struct urb * urbp;
+ pauerchainelement_t acep;
+ struct list_head *tmp;
+
+ dbg ("auerchain_unlink_urb called");
+
+ /* search the chain of waiting elements */
+ spin_lock_irqsave (&acp->lock, flags);
+ list_for_each (tmp, &acp->waiting_list) {
+ acep = list_entry (tmp, auerchainelement_t, list);
+ if (acep->urbp == urb) {
+ list_del (tmp);
+ urb->context = acep->context;
+ urb->complete = acep->complete;
+ list_add_tail (&acep->list, &acp->free_list);
+ spin_unlock_irqrestore (&acp->lock, flags);
+ dbg ("unlink waiting urb");
+ urb->status = -ENOENT;
+ urb->complete (urb, NULL);
+ return 0;
+ }
+ }
+ /* not found. */
+ spin_unlock_irqrestore (&acp->lock, flags);
+
+ /* get the active urb */
+ acep = acp->active;
+ if (acep) {
+ urbp = acep->urbp;
+
+ /* check if we have to cancel the active urb */
+ if (urbp == urb) {
+ /* note that there is a race condition between the check above
+ and the unlink() call because of no lock. This race is harmless,
+ because the usb module will detect the unlink() after completion.
+ We can't use the acp->lock here because the completion function
+ wants to grab it.
+ */
+ dbg ("unlink active urb");
+ return usb_unlink_urb (urbp);
+ }
+ }
+
+ /* not found anyway
+ ... is some kind of success
+ */
+ dbg ("urb to unlink not found in chain");
+ return 0;
+}
+
+/* cancel all urbs which are in the chain.
+ this function must not be called from interrupt or completion handler.
+*/
+static void auerchain_unlink_all (pauerchain_t acp)
+{
+ unsigned long flags;
+ struct urb * urbp;
+ pauerchainelement_t acep;
+
+ dbg ("auerchain_unlink_all called");
+
+ /* clear the chain of waiting elements */
+ spin_lock_irqsave (&acp->lock, flags);
+ while (!list_empty (&acp->waiting_list)) {
+ /* get the next entry */
+ struct list_head *tmp = acp->waiting_list.next;
+ list_del (tmp);
+ acep = list_entry (tmp, auerchainelement_t, list);
+ urbp = acep->urbp;
+ urbp->context = acep->context;
+ urbp->complete = acep->complete;
+ list_add_tail (&acep->list, &acp->free_list);
+ spin_unlock_irqrestore (&acp->lock, flags);
+ dbg ("unlink waiting urb");
+ urbp->status = -ENOENT;
+ urbp->complete (urbp, NULL);
+ spin_lock_irqsave (&acp->lock, flags);
+ }
+ spin_unlock_irqrestore (&acp->lock, flags);
+
+ /* clear the active urb */
+ acep = acp->active;
+ if (acep) {
+ urbp = acep->urbp;
+ urbp->transfer_flags &= ~URB_ASYNC_UNLINK;
+ dbg ("unlink active urb");
+ usb_kill_urb (urbp);
+ }
+}
+
+
+/* free the chain.
+ this function must not be called from interrupt or completion handler.
+*/
+static void auerchain_free (pauerchain_t acp)
+{
+ unsigned long flags;
+ pauerchainelement_t acep;
+
+ dbg ("auerchain_free called");
+
+ /* first, cancel all pending urbs */
+ auerchain_unlink_all (acp);
+
+ /* free the elements */
+ spin_lock_irqsave (&acp->lock, flags);
+ while (!list_empty (&acp->free_list)) {
+ /* get the next entry */
+ struct list_head *tmp = acp->free_list.next;
+ list_del (tmp);
+ spin_unlock_irqrestore (&acp->lock, flags);
+ acep = list_entry (tmp, auerchainelement_t, list);
+ kfree (acep);
+ spin_lock_irqsave (&acp->lock, flags);
+ }
+ spin_unlock_irqrestore (&acp->lock, flags);
+}
+
+
+/* Init the chain control structure */
+static void auerchain_init (pauerchain_t acp)
+{
+ /* init the chain data structure */
+ acp->active = NULL;
+ spin_lock_init (&acp->lock);
+ INIT_LIST_HEAD (&acp->waiting_list);
+ INIT_LIST_HEAD (&acp->free_list);
+}
+
+/* setup a chain.
+ It is assumed that there is no concurrency while setting up the chain
+ requirement: auerchain_init()
+*/
+static int auerchain_setup (pauerchain_t acp, unsigned int numElements)
+{
+ pauerchainelement_t acep;
+
+ dbg ("auerchain_setup called with %d elements", numElements);
+
+ /* fill the list of free elements */
+ for (;numElements; numElements--) {
+ acep = (pauerchainelement_t) kmalloc (sizeof (auerchainelement_t), GFP_KERNEL);
+ if (!acep)
+ goto ac_fail;
+ memset (acep, 0, sizeof (auerchainelement_t));
+ INIT_LIST_HEAD (&acep->list);
+ list_add_tail (&acep->list, &acp->free_list);
+ }
+ return 0;
+
+ac_fail:/* free the elements */
+ while (!list_empty (&acp->free_list)) {
+ /* get the next entry */
+ struct list_head *tmp = acp->free_list.next;
+ list_del (tmp);
+ acep = list_entry (tmp, auerchainelement_t, list);
+ kfree (acep);
+ }
+ return -ENOMEM;
+}
+
+
+/* completion handler for synchronous chained URBs */
+static void auerchain_blocking_completion (struct urb *urb, struct pt_regs *regs)
+{
+ pauerchain_chs_t pchs = (pauerchain_chs_t)urb->context;
+ pchs->done = 1;
+ wmb();
+ wake_up (&pchs->wqh);
+}
+
+
+/* Starts chained urb and waits for completion or timeout */
+static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int timeout, int* actual_length)
+{
+ auerchain_chs_t chs;
+ int status;
+
+ dbg ("auerchain_start_wait_urb called");
+ init_waitqueue_head (&chs.wqh);
+ chs.done = 0;
+
+ urb->context = &chs;
+ status = auerchain_submit_urb (acp, urb);
+ if (status)
+ /* something went wrong */
+ return status;
+
+ timeout = wait_event_timeout(chs.wqh, chs.done, timeout);
+
+ if (!timeout && !chs.done) {
+ if (urb->status != -EINPROGRESS) { /* No callback?!! */
+ dbg ("auerchain_start_wait_urb: raced timeout");
+ status = urb->status;
+ } else {
+ dbg ("auerchain_start_wait_urb: timeout");
+ auerchain_unlink_urb (acp, urb); /* remove urb safely */
+ status = -ETIMEDOUT;
+ }
+ } else
+ status = urb->status;
+
+ if (actual_length)
+ *actual_length = urb->actual_length;
+
+ return status;
+}
+
+
+/* auerchain_control_msg - Builds a control urb, sends it off and waits for completion
+ acp: pointer to the auerchain
+ dev: pointer to the usb device to send the message to
+ pipe: endpoint "pipe" to send the message to
+ request: USB message request value
+ requesttype: USB message request type value
+ value: USB message value
+ index: USB message index value
+ data: pointer to the data to send
+ size: length in bytes of the data to send
+ timeout: time to wait for the message to complete before timing out (if 0 the wait is forever)
+
+ 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 transferred length, otherwise a negative error number.
+
+ Don't use this function from within an interrupt context, like a
+ bottom half handler. If you need an asynchronous message, or need to send
+ a message from within interrupt context, use auerchain_submit_urb()
+*/
+static int auerchain_control_msg (pauerchain_t acp, struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype,
+ __u16 value, __u16 index, void *data, __u16 size, int timeout)
+{
+ int ret;
+ struct usb_ctrlrequest *dr;
+ struct urb *urb;
+ int length;
+
+ dbg ("auerchain_control_msg");
+ dr = kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL);
+ if (!dr)
+ return -ENOMEM;
+ urb = usb_alloc_urb (0, GFP_KERNEL);
+ if (!urb) {
+ kfree (dr);
+ return -ENOMEM;
+ }
+
+ dr->bRequestType = requesttype;
+ dr->bRequest = request;
+ dr->wValue = cpu_to_le16 (value);
+ dr->wIndex = cpu_to_le16 (index);
+ dr->wLength = cpu_to_le16 (size);
+
+ usb_fill_control_urb (urb, dev, pipe, (unsigned char*)dr, data, size, /* build urb */
+ auerchain_blocking_completion, NULL);
+ ret = auerchain_start_wait_urb (acp, urb, timeout, &length);
+
+ usb_free_urb (urb);
+ kfree (dr);
+
+ if (ret < 0)
+ return ret;
+ else
+ return length;
+}
+
+
+/*-------------------------------------------------------------------*/
+/* Buffer List helper functions */
+
+/* free a single auerbuf */
+static void auerbuf_free (pauerbuf_t bp)
+{
+ if (bp->bufp) {
+ kfree (bp->bufp);
+ }
+ if (bp->dr) {
+ kfree (bp->dr);
+ }
+ if (bp->urbp) {
+ usb_free_urb (bp->urbp);
+ }
+ kfree (bp);
+}
+
+/* free the buffers from an auerbuf list */
+static void auerbuf_free_list (struct list_head *q)
+{
+ struct list_head *tmp;
+ struct list_head *p;
+ pauerbuf_t bp;
+
+ dbg ("auerbuf_free_list");
+ for (p = q->next; p != q;) {
+ bp = list_entry (p, auerbuf_t, buff_list);
+ tmp = p->next;
+ list_del (p);
+ p = tmp;
+ auerbuf_free (bp);
+ }
+}
+
+/* init the members of a list control block */
+static void auerbuf_init (pauerbufctl_t bcp)
+{
+ dbg ("auerbuf_init");
+ spin_lock_init (&bcp->lock);
+ INIT_LIST_HEAD (&bcp->free_buff_list);
+ INIT_LIST_HEAD (&bcp->rec_buff_list);
+}
+
+/* free all buffers from an auerbuf chain */
+static void auerbuf_free_buffers (pauerbufctl_t bcp)
+{
+ unsigned long flags;
+ dbg ("auerbuf_free_buffers");
+
+ spin_lock_irqsave (&bcp->lock, flags);
+
+ auerbuf_free_list (&bcp->free_buff_list);
+ auerbuf_free_list (&bcp->rec_buff_list);
+
+ spin_unlock_irqrestore (&bcp->lock, flags);
+}
+
+/* setup a list of buffers */
+/* requirement: auerbuf_init() */
+static int auerbuf_setup (pauerbufctl_t bcp, unsigned int numElements, unsigned int bufsize)
+{
+ pauerbuf_t bep = NULL;
+
+ dbg ("auerbuf_setup called with %d elements of %d bytes", numElements, bufsize);
+
+ /* fill the list of free elements */
+ for (;numElements; numElements--) {
+ bep = (pauerbuf_t) kmalloc (sizeof (auerbuf_t), GFP_KERNEL);
+ if (!bep)
+ goto bl_fail;
+ memset (bep, 0, sizeof (auerbuf_t));
+ bep->list = bcp;
+ INIT_LIST_HEAD (&bep->buff_list);
+ bep->bufp = (char *) kmalloc (bufsize, GFP_KERNEL);
+ if (!bep->bufp)
+ goto bl_fail;
+ bep->dr = (struct usb_ctrlrequest *) kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL);
+ if (!bep->dr)
+ goto bl_fail;
+ bep->urbp = usb_alloc_urb (0, GFP_KERNEL);
+ if (!bep->urbp)
+ goto bl_fail;
+ list_add_tail (&bep->buff_list, &bcp->free_buff_list);
+ }
+ return 0;
+
+bl_fail:/* not enough memory. Free allocated elements */
+ dbg ("auerbuf_setup: no more memory");
+ kfree(bep);
+ auerbuf_free_buffers (bcp);
+ return -ENOMEM;
+}
+
+/* insert a used buffer into the free list */
+static void auerbuf_releasebuf( pauerbuf_t bp)
+{
+ unsigned long flags;
+ pauerbufctl_t bcp = bp->list;
+ bp->retries = 0;
+
+ dbg ("auerbuf_releasebuf called");
+ spin_lock_irqsave (&bcp->lock, flags);
+ list_add_tail (&bp->buff_list, &bcp->free_buff_list);
+ spin_unlock_irqrestore (&bcp->lock, flags);
+}
+
+
+/*-------------------------------------------------------------------*/
+/* Completion handlers */
+
+/* Values of urb->status or results of usb_submit_urb():
+0 Initial, OK
+-EINPROGRESS during submission until end
+-ENOENT if urb is unlinked
+-ETIMEDOUT Transfer timed out, NAK
+-ENOMEM Memory Overflow
+-ENODEV Specified USB-device or bus doesn't exist
+-ENXIO URB already queued
+-EINVAL a) Invalid transfer type specified (or not supported)
+ b) Invalid interrupt interval (0n256)
+-EAGAIN a) Specified ISO start frame too early
+ b) (using ISO-ASAP) Too much scheduled for the future wait some time and try again.
+-EFBIG Too much ISO frames requested (currently uhci900)
+-EPIPE Specified pipe-handle/Endpoint is already stalled
+-EMSGSIZE Endpoint message size is zero, do interface/alternate setting
+-EPROTO a) Bitstuff error
+ b) Unknown USB error
+-EILSEQ CRC mismatch
+-ENOSR Buffer error
+-EREMOTEIO Short packet detected
+-EXDEV ISO transfer only partially completed look at individual frame status for details
+-EINVAL ISO madness, if this happens: Log off and go home
+-EOVERFLOW babble
+*/
+
+/* check if a status code allows a retry */
+static int auerswald_status_retry (int status)
+{
+ switch (status) {
+ case 0:
+ case -ETIMEDOUT:
+ case -EOVERFLOW:
+ case -EAGAIN:
+ case -EPIPE:
+ case -EPROTO:
+ case -EILSEQ:
+ case -ENOSR:
+ case -EREMOTEIO:
+ return 1; /* do a retry */
+ }
+ return 0; /* no retry possible */
+}
+
+/* Completion of asynchronous write block */
+static void auerchar_ctrlwrite_complete (struct urb * urb, struct pt_regs *regs)
+{
+ pauerbuf_t bp = (pauerbuf_t) urb->context;
+ pauerswald_t cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl)));
+ dbg ("auerchar_ctrlwrite_complete called");
+
+ /* reuse the buffer */
+ auerbuf_releasebuf (bp);
+ /* Wake up all processes waiting for a buffer */
+ wake_up (&cp->bufferwait);
+}
+
+/* Completion handler for dummy retry packet */
+static void auerswald_ctrlread_wretcomplete (struct urb * urb, struct pt_regs *regs)
+{
+ pauerbuf_t bp = (pauerbuf_t) urb->context;
+ pauerswald_t cp;
+ int ret;
+ dbg ("auerswald_ctrlread_wretcomplete called");
+ dbg ("complete with status: %d", urb->status);
+ cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl)));
+
+ /* check if it is possible to advance */
+ if (!auerswald_status_retry (urb->status) || !cp->usbdev) {
+ /* reuse the buffer */
+ err ("control dummy: transmission error %d, can not retry", urb->status);
+ auerbuf_releasebuf (bp);
+ /* Wake up all processes waiting for a buffer */
+ wake_up (&cp->bufferwait);
+ return;
+ }
+
+ /* fill the control message */
+ bp->dr->bRequestType = AUT_RREQ;
+ bp->dr->bRequest = AUV_RBLOCK;
+ bp->dr->wLength = bp->dr->wValue; /* temporary stored */
+ bp->dr->wValue = cpu_to_le16 (1); /* Retry Flag */
+ /* bp->dr->index = channel id; remains */
+ usb_fill_control_urb (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
+ (unsigned char*)bp->dr, bp->bufp, le16_to_cpu (bp->dr->wLength),
+ auerswald_ctrlread_complete,bp);
+
+ /* submit the control msg as next paket */
+ ret = auerchain_submit_urb_list (&cp->controlchain, bp->urbp, 1);
+ if (ret) {
+ dbg ("auerswald_ctrlread_complete: nonzero result of auerchain_submit_urb_list %d", ret);
+ bp->urbp->status = ret;
+ auerswald_ctrlread_complete (bp->urbp, NULL);
+ }
+}
+
+/* completion handler for receiving of control messages */
+static void auerswald_ctrlread_complete (struct urb * urb, struct pt_regs *regs)
+{
+ unsigned int serviceid;
+ pauerswald_t cp;
+ pauerscon_t scp;
+ pauerbuf_t bp = (pauerbuf_t) urb->context;
+ int ret;
+ dbg ("auerswald_ctrlread_complete called");
+
+ cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl)));
+
+ /* check if there is valid data in this urb */
+ if (urb->status) {
+ dbg ("complete with non-zero status: %d", urb->status);
+ /* should we do a retry? */
+ if (!auerswald_status_retry (urb->status)
+ || !cp->usbdev
+ || (cp->version < AUV_RETRY)
+ || (bp->retries >= AU_RETRIES)) {
+ /* reuse the buffer */
+ err ("control read: transmission error %d, can not retry", urb->status);
+ auerbuf_releasebuf (bp);
+ /* Wake up all processes waiting for a buffer */
+ wake_up (&cp->bufferwait);
+ return;
+ }
+ bp->retries++;
+ dbg ("Retry count = %d", bp->retries);
+ /* send a long dummy control-write-message to allow device firmware to react */
+ bp->dr->bRequestType = AUT_WREQ;
+ bp->dr->bRequest = AUV_DUMMY;
+ bp->dr->wValue = bp->dr->wLength; /* temporary storage */
+ // bp->dr->wIndex channel ID remains
+ bp->dr->wLength = cpu_to_le16 (32); /* >= 8 bytes */
+ usb_fill_control_urb (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
+ (unsigned char*)bp->dr, bp->bufp, 32,
+ auerswald_ctrlread_wretcomplete,bp);
+
+ /* submit the control msg as next paket */
+ ret = auerchain_submit_urb_list (&cp->controlchain, bp->urbp, 1);
+ if (ret) {
+ dbg ("auerswald_ctrlread_complete: nonzero result of auerchain_submit_urb_list %d", ret);
+ bp->urbp->status = ret;
+ auerswald_ctrlread_wretcomplete (bp->urbp, regs);
+ }
+ return;
+ }
+
+ /* get the actual bytecount (incl. headerbyte) */
+ bp->len = urb->actual_length;
+ serviceid = bp->bufp[0] & AUH_TYPEMASK;
+ dbg ("Paket with serviceid %d and %d bytes received", serviceid, bp->len);
+
+ /* dispatch the paket */
+ scp = cp->services[serviceid];
+ if (scp) {
+ /* look, Ma, a listener! */
+ scp->dispatch (scp, bp);
+ }
+
+ /* release the paket */
+ auerbuf_releasebuf (bp);
+ /* Wake up all processes waiting for a buffer */
+ wake_up (&cp->bufferwait);
+}
+
+/*-------------------------------------------------------------------*/
+/* Handling of Interrupt Endpoint */
+/* This interrupt Endpoint is used to inform the host about waiting
+ messages from the USB device.
+*/
+/* int completion handler. */
+static void auerswald_int_complete (struct urb * urb, struct pt_regs *regs)
+{
+ unsigned long flags;
+ unsigned int channelid;
+ unsigned int bytecount;
+ int ret;
+ pauerbuf_t bp = NULL;
+ pauerswald_t cp = (pauerswald_t) urb->context;
+
+ dbg ("%s called", __FUNCTION__);
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ /* check if all needed data was received */
+ if (urb->actual_length < AU_IRQMINSIZE) {
+ dbg ("invalid data length received: %d bytes", urb->actual_length);
+ goto exit;
+ }
+
+ /* check the command code */
+ if (cp->intbufp[0] != AU_IRQCMDID) {
+ dbg ("invalid command received: %d", cp->intbufp[0]);
+ goto exit;
+ }
+
+ /* check the command type */
+ if (cp->intbufp[1] != AU_BLOCKRDY) {
+ dbg ("invalid command type received: %d", cp->intbufp[1]);
+ goto exit;
+ }
+
+ /* now extract the information */
+ channelid = cp->intbufp[2];
+ bytecount = (unsigned char)cp->intbufp[3];
+ bytecount |= (unsigned char)cp->intbufp[4] << 8;
+
+ /* check the channel id */
+ if (channelid >= AUH_TYPESIZE) {
+ dbg ("invalid channel id received: %d", channelid);
+ goto exit;
+ }
+
+ /* check the byte count */
+ if (bytecount > (cp->maxControlLength+AUH_SIZE)) {
+ dbg ("invalid byte count received: %d", bytecount);
+ goto exit;
+ }
+ dbg ("Service Channel = %d", channelid);
+ dbg ("Byte Count = %d", bytecount);
+
+ /* get a buffer for the next data paket */
+ spin_lock_irqsave (&cp->bufctl.lock, flags);
+ if (!list_empty (&cp->bufctl.free_buff_list)) {
+ /* yes: get the entry */
+ struct list_head *tmp = cp->bufctl.free_buff_list.next;
+ list_del (tmp);
+ bp = list_entry (tmp, auerbuf_t, buff_list);
+ }
+ spin_unlock_irqrestore (&cp->bufctl.lock, flags);
+
+ /* if no buffer available: skip it */
+ if (!bp) {
+ dbg ("auerswald_int_complete: no data buffer available");
+ /* can we do something more?
+ This is a big problem: if this int packet is ignored, the
+ device will wait forever and not signal any more data.
+ The only real solution is: having enough buffers!
+ Or perhaps temporary disabling the int endpoint?
+ */
+ goto exit;
+ }
+
+ /* fill the control message */
+ bp->dr->bRequestType = AUT_RREQ;
+ bp->dr->bRequest = AUV_RBLOCK;
+ bp->dr->wValue = cpu_to_le16 (0);
+ bp->dr->wIndex = cpu_to_le16 (channelid | AUH_DIRECT | AUH_UNSPLIT);
+ bp->dr->wLength = cpu_to_le16 (bytecount);
+ usb_fill_control_urb (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
+ (unsigned char*)bp->dr, bp->bufp, bytecount,
+ auerswald_ctrlread_complete,bp);
+
+ /* submit the control msg */
+ ret = auerchain_submit_urb (&cp->controlchain, bp->urbp);
+ if (ret) {
+ dbg ("auerswald_int_complete: nonzero result of auerchain_submit_urb %d", ret);
+ bp->urbp->status = ret;
+ auerswald_ctrlread_complete( bp->urbp, NULL);
+ /* here applies the same problem as above: device locking! */
+ }
+exit:
+ ret = usb_submit_urb (urb, GFP_ATOMIC);
+ if (ret)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, ret);
+}
+
+/* int memory deallocation
+ NOTE: no mutex please!
+*/
+static void auerswald_int_free (pauerswald_t cp)
+{
+ if (cp->inturbp) {
+ usb_free_urb (cp->inturbp);
+ cp->inturbp = NULL;
+ }
+ if (cp->intbufp) {
+ kfree (cp->intbufp);
+ cp->intbufp = NULL;
+ }
+}
+
+/* This function is called to activate the interrupt
+ endpoint. This function returns 0 if successful or an error code.
+ NOTE: no mutex please!
+*/
+static int auerswald_int_open (pauerswald_t cp)
+{
+ int ret;
+ struct usb_host_endpoint *ep;
+ int irqsize;
+ dbg ("auerswald_int_open");
+
+ ep = cp->usbdev->ep_in[AU_IRQENDP];
+ if (!ep) {
+ ret = -EFAULT;
+ goto intoend;
+ }
+ irqsize = le16_to_cpu(ep->desc.wMaxPacketSize);
+ cp->irqsize = irqsize;
+
+ /* allocate the urb and data buffer */
+ if (!cp->inturbp) {
+ cp->inturbp = usb_alloc_urb (0, GFP_KERNEL);
+ if (!cp->inturbp) {
+ ret = -ENOMEM;
+ goto intoend;
+ }
+ }
+ if (!cp->intbufp) {
+ cp->intbufp = (char *) kmalloc (irqsize, GFP_KERNEL);
+ if (!cp->intbufp) {
+ ret = -ENOMEM;
+ goto intoend;
+ }
+ }
+ /* setup urb */
+ usb_fill_int_urb (cp->inturbp, cp->usbdev,
+ usb_rcvintpipe (cp->usbdev,AU_IRQENDP), cp->intbufp,
+ irqsize, auerswald_int_complete, cp, ep->desc.bInterval);
+ /* start the urb */
+ cp->inturbp->status = 0; /* needed! */
+ ret = usb_submit_urb (cp->inturbp, GFP_KERNEL);
+
+intoend:
+ if (ret < 0) {
+ /* activation of interrupt endpoint has failed. Now clean up. */
+ dbg ("auerswald_int_open: activation of int endpoint failed");
+
+ /* deallocate memory */
+ auerswald_int_free (cp);
+ }
+ return ret;
+}
+
+/* This function is called to deactivate the interrupt
+ endpoint. This function returns 0 if successful or an error code.
+ NOTE: no mutex please!
+*/
+static void auerswald_int_release (pauerswald_t cp)
+{
+ dbg ("auerswald_int_release");
+
+ /* stop the int endpoint */
+ if (cp->inturbp)
+ usb_kill_urb (cp->inturbp);
+
+ /* deallocate memory */
+ auerswald_int_free (cp);
+}
+
+/* --------------------------------------------------------------------- */
+/* Helper functions */
+
+/* wake up waiting readers */
+static void auerchar_disconnect (pauerscon_t scp)
+{
+ pauerchar_t ccp = ((pauerchar_t)((char *)(scp)-(unsigned long)(&((pauerchar_t)0)->scontext)));
+ dbg ("auerchar_disconnect called");
+ ccp->removed = 1;
+ wake_up (&ccp->readwait);
+}
+
+
+/* dispatch a read paket to a waiting character device */
+static void auerchar_ctrlread_dispatch (pauerscon_t scp, pauerbuf_t bp)
+{
+ unsigned long flags;
+ pauerchar_t ccp;
+ pauerbuf_t newbp = NULL;
+ char * charp;
+ dbg ("auerchar_ctrlread_dispatch called");
+ ccp = ((pauerchar_t)((char *)(scp)-(unsigned long)(&((pauerchar_t)0)->scontext)));
+
+ /* get a read buffer from character device context */
+ spin_lock_irqsave (&ccp->bufctl.lock, flags);
+ if (!list_empty (&ccp->bufctl.free_buff_list)) {
+ /* yes: get the entry */
+ struct list_head *tmp = ccp->bufctl.free_buff_list.next;
+ list_del (tmp);
+ newbp = list_entry (tmp, auerbuf_t, buff_list);
+ }
+ spin_unlock_irqrestore (&ccp->bufctl.lock, flags);
+
+ if (!newbp) {
+ dbg ("No read buffer available, discard paket!");
+ return; /* no buffer, no dispatch */
+ }
+
+ /* copy information to new buffer element
+ (all buffers have the same length) */
+ charp = newbp->bufp;
+ newbp->bufp = bp->bufp;
+ bp->bufp = charp;
+ newbp->len = bp->len;
+
+ /* insert new buffer in read list */
+ spin_lock_irqsave (&ccp->bufctl.lock, flags);
+ list_add_tail (&newbp->buff_list, &ccp->bufctl.rec_buff_list);
+ spin_unlock_irqrestore (&ccp->bufctl.lock, flags);
+ dbg ("read buffer appended to rec_list");
+
+ /* wake up pending synchronous reads */
+ wake_up (&ccp->readwait);
+}
+
+
+/* Delete an auerswald driver context */
+static void auerswald_delete( pauerswald_t cp)
+{
+ dbg( "auerswald_delete");
+ if (cp == NULL)
+ return;
+
+ /* Wake up all processes waiting for a buffer */
+ wake_up (&cp->bufferwait);
+
+ /* Cleaning up */
+ auerswald_int_release (cp);
+ auerchain_free (&cp->controlchain);
+ auerbuf_free_buffers (&cp->bufctl);
+
+ /* release the memory */
+ kfree( cp);
+}
+
+
+/* Delete an auerswald character context */
+static void auerchar_delete( pauerchar_t ccp)
+{
+ dbg ("auerchar_delete");
+ if (ccp == NULL)
+ return;
+
+ /* wake up pending synchronous reads */
+ ccp->removed = 1;
+ wake_up (&ccp->readwait);
+
+ /* remove the read buffer */
+ if (ccp->readbuf) {
+ auerbuf_releasebuf (ccp->readbuf);
+ ccp->readbuf = NULL;
+ }
+
+ /* remove the character buffers */
+ auerbuf_free_buffers (&ccp->bufctl);
+
+ /* release the memory */
+ kfree( ccp);
+}
+
+
+/* add a new service to the device
+ scp->id must be set!
+ return: 0 if OK, else error code
+*/
+static int auerswald_addservice (pauerswald_t cp, pauerscon_t scp)
+{
+ int ret;
+
+ /* is the device available? */
+ if (!cp->usbdev) {
+ dbg ("usbdev == NULL");
+ return -EIO; /*no: can not add a service, sorry*/
+ }
+
+ /* is the service available? */
+ if (cp->services[scp->id]) {
+ dbg ("service is busy");
+ return -EBUSY;
+ }
+
+ /* device is available, service is free */
+ cp->services[scp->id] = scp;
+
+ /* register service in device */
+ ret = auerchain_control_msg(
+ &cp->controlchain, /* pointer to control chain */
+ cp->usbdev, /* pointer to device */
+ usb_sndctrlpipe (cp->usbdev, 0), /* pipe to control endpoint */
+ AUV_CHANNELCTL, /* USB message request value */
+ AUT_WREQ, /* USB message request type value */
+ 0x01, /* open USB message value */
+ scp->id, /* USB message index value */
+ NULL, /* pointer to the data to send */
+ 0, /* length in bytes of the data to send */
+ HZ * 2); /* time to wait for the message to complete before timing out */
+ if (ret < 0) {
+ dbg ("auerswald_addservice: auerchain_control_msg returned error code %d", ret);
+ /* undo above actions */
+ cp->services[scp->id] = NULL;
+ return ret;
+ }
+
+ dbg ("auerswald_addservice: channel open OK");
+ return 0;
+}
+
+
+/* remove a service from the the device
+ scp->id must be set! */
+static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp)
+{
+ dbg ("auerswald_removeservice called");
+
+ /* check if we have a service allocated */
+ if (scp->id == AUH_UNASSIGNED)
+ return;
+
+ /* If there is a device: close the channel */
+ if (cp->usbdev) {
+ /* Close the service channel inside the device */
+ int ret = auerchain_control_msg(
+ &cp->controlchain, /* pointer to control chain */
+ cp->usbdev, /* pointer to device */
+ usb_sndctrlpipe (cp->usbdev, 0), /* pipe to control endpoint */
+ AUV_CHANNELCTL, /* USB message request value */
+ AUT_WREQ, /* USB message request type value */
+ 0x00, // close /* USB message value */
+ scp->id, /* USB message index value */
+ NULL, /* pointer to the data to send */
+ 0, /* length in bytes of the data to send */
+ HZ * 2); /* time to wait for the message to complete before timing out */
+ if (ret < 0) {
+ dbg ("auerswald_removeservice: auerchain_control_msg returned error code %d", ret);
+ }
+ else {
+ dbg ("auerswald_removeservice: channel close OK");
+ }
+ }
+
+ /* remove the service from the device */
+ cp->services[scp->id] = NULL;
+ scp->id = AUH_UNASSIGNED;
+}
+
+
+/* --------------------------------------------------------------------- */
+/* Char device functions */
+
+/* Open a new character device */
+static int auerchar_open (struct inode *inode, struct file *file)
+{
+ int dtindex = iminor(inode);
+ pauerswald_t cp = NULL;
+ pauerchar_t ccp = NULL;
+ struct usb_interface *intf;
+ int ret;
+
+ /* minor number in range? */
+ if (dtindex < 0) {
+ return -ENODEV;
+ }
+ intf = usb_find_interface(&auerswald_driver, dtindex);
+ if (!intf) {
+ return -ENODEV;
+ }
+
+ /* usb device available? */
+ cp = usb_get_intfdata (intf);
+ if (cp == NULL) {
+ return -ENODEV;
+ }
+ if (down_interruptible (&cp->mutex)) {
+ return -ERESTARTSYS;
+ }
+
+ /* we have access to the device. Now lets allocate memory */
+ ccp = (pauerchar_t) kmalloc(sizeof(auerchar_t), GFP_KERNEL);
+ if (ccp == NULL) {
+ err ("out of memory");
+ ret = -ENOMEM;
+ goto ofail;
+ }
+
+ /* Initialize device descriptor */
+ memset( ccp, 0, sizeof(auerchar_t));
+ init_MUTEX( &ccp->mutex);
+ init_MUTEX( &ccp->readmutex);
+ auerbuf_init (&ccp->bufctl);
+ ccp->scontext.id = AUH_UNASSIGNED;
+ ccp->scontext.dispatch = auerchar_ctrlread_dispatch;
+ ccp->scontext.disconnect = auerchar_disconnect;
+ init_waitqueue_head (&ccp->readwait);
+
+ ret = auerbuf_setup (&ccp->bufctl, AU_RBUFFERS, cp->maxControlLength+AUH_SIZE);
+ if (ret) {
+ goto ofail;
+ }
+
+ cp->open_count++;
+ ccp->auerdev = cp;
+ dbg("open %s as /dev/%s", cp->dev_desc, cp->name);
+ up (&cp->mutex);
+
+ /* file IO stuff */
+ file->f_pos = 0;
+ file->private_data = ccp;
+ return nonseekable_open(inode, file);
+
+ /* Error exit */
+ofail: up (&cp->mutex);
+ auerchar_delete (ccp);
+ return ret;
+}
+
+
+/* IOCTL functions */
+static int auerchar_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ pauerchar_t ccp = (pauerchar_t) file->private_data;
+ int ret = 0;
+ audevinfo_t devinfo;
+ pauerswald_t cp = NULL;
+ unsigned int u;
+ unsigned int __user *user_arg = (unsigned int __user *)arg;
+
+ dbg ("ioctl");
+
+ /* get the mutexes */
+ if (down_interruptible (&ccp->mutex)) {
+ return -ERESTARTSYS;
+ }
+ cp = ccp->auerdev;
+ if (!cp) {
+ up (&ccp->mutex);
+ return -ENODEV;
+ }
+ if (down_interruptible (&cp->mutex)) {
+ up(&ccp->mutex);
+ return -ERESTARTSYS;
+ }
+
+ /* Check for removal */
+ if (!cp->usbdev) {
+ up(&cp->mutex);
+ up(&ccp->mutex);
+ return -ENODEV;
+ }
+
+ switch (cmd) {
+
+ /* return != 0 if Transmitt channel ready to send */
+ case IOCTL_AU_TXREADY:
+ dbg ("IOCTL_AU_TXREADY");
+ u = ccp->auerdev
+ && (ccp->scontext.id != AUH_UNASSIGNED)
+ && !list_empty (&cp->bufctl.free_buff_list);
+ ret = put_user (u, user_arg);
+ break;
+
+ /* return != 0 if connected to a service channel */
+ case IOCTL_AU_CONNECT:
+ dbg ("IOCTL_AU_CONNECT");
+ u = (ccp->scontext.id != AUH_UNASSIGNED);
+ ret = put_user (u, user_arg);
+ break;
+
+ /* return != 0 if Receive Data available */
+ case IOCTL_AU_RXAVAIL:
+ dbg ("IOCTL_AU_RXAVAIL");
+ if (ccp->scontext.id == AUH_UNASSIGNED) {
+ ret = -EIO;
+ break;
+ }
+ u = 0; /* no data */
+ if (ccp->readbuf) {
+ int restlen = ccp->readbuf->len - ccp->readoffset;
+ if (restlen > 0)
+ u = 1;
+ }
+ if (!u) {
+ if (!list_empty (&ccp->bufctl.rec_buff_list)) {
+ u = 1;
+ }
+ }
+ ret = put_user (u, user_arg);
+ break;
+
+ /* return the max. buffer length for the device */
+ case IOCTL_AU_BUFLEN:
+ dbg ("IOCTL_AU_BUFLEN");
+ u = cp->maxControlLength;
+ ret = put_user (u, user_arg);
+ break;
+
+ /* requesting a service channel */
+ case IOCTL_AU_SERVREQ:
+ dbg ("IOCTL_AU_SERVREQ");
+ /* requesting a service means: release the previous one first */
+ auerswald_removeservice (cp, &ccp->scontext);
+ /* get the channel number */
+ ret = get_user (u, user_arg);
+ if (ret) {
+ break;
+ }
+ if ((u < AUH_FIRSTUSERCH) || (u >= AUH_TYPESIZE)) {
+ ret = -EIO;
+ break;
+ }
+ dbg ("auerchar service request parameters are ok");
+ ccp->scontext.id = u;
+
+ /* request the service now */
+ ret = auerswald_addservice (cp, &ccp->scontext);
+ if (ret) {
+ /* no: revert service entry */
+ ccp->scontext.id = AUH_UNASSIGNED;
+ }
+ break;
+
+ /* get a string descriptor for the device */
+ case IOCTL_AU_DEVINFO:
+ dbg ("IOCTL_AU_DEVINFO");
+ if (copy_from_user (&devinfo, (void __user *) arg, sizeof (audevinfo_t))) {
+ ret = -EFAULT;
+ break;
+ }
+ u = strlen(cp->dev_desc)+1;
+ if (u > devinfo.bsize) {
+ u = devinfo.bsize;
+ }
+ ret = copy_to_user(devinfo.buf, cp->dev_desc, u) ? -EFAULT : 0;
+ break;
+
+ /* get the max. string descriptor length */
+ case IOCTL_AU_SLEN:
+ dbg ("IOCTL_AU_SLEN");
+ u = AUSI_DLEN;
+ ret = put_user (u, user_arg);
+ break;
+
+ default:
+ dbg ("IOCTL_AU_UNKNOWN");
+ ret = -ENOIOCTLCMD;
+ break;
+ }
+ /* release the mutexes */
+ up(&cp->mutex);
+ up(&ccp->mutex);
+ return ret;
+}
+
+/* Read data from the device */
+static ssize_t auerchar_read (struct file *file, char __user *buf, size_t count, loff_t * ppos)
+{
+ unsigned long flags;
+ pauerchar_t ccp = (pauerchar_t) file->private_data;
+ pauerbuf_t bp = NULL;
+ wait_queue_t wait;
+
+ dbg ("auerchar_read");
+
+ /* Error checking */
+ if (!ccp)
+ return -EIO;
+ if (*ppos)
+ return -ESPIPE;
+ if (count == 0)
+ return 0;
+
+ /* get the mutex */
+ if (down_interruptible (&ccp->mutex))
+ return -ERESTARTSYS;
+
+ /* Can we expect to read something? */
+ if (ccp->scontext.id == AUH_UNASSIGNED) {
+ up (&ccp->mutex);
+ return -EIO;
+ }
+
+ /* only one reader per device allowed */
+ if (down_interruptible (&ccp->readmutex)) {
+ up (&ccp->mutex);
+ return -ERESTARTSYS;
+ }
+
+ /* read data from readbuf, if available */
+doreadbuf:
+ bp = ccp->readbuf;
+ if (bp) {
+ /* read the maximum bytes */
+ int restlen = bp->len - ccp->readoffset;
+ if (restlen < 0)
+ restlen = 0;
+ if (count > restlen)
+ count = restlen;
+ if (count) {
+ if (copy_to_user (buf, bp->bufp+ccp->readoffset, count)) {
+ dbg ("auerswald_read: copy_to_user failed");
+ up (&ccp->readmutex);
+ up (&ccp->mutex);
+ return -EFAULT;
+ }
+ }
+ /* advance the read offset */
+ ccp->readoffset += count;
+ restlen -= count;
+ // reuse the read buffer
+ if (restlen <= 0) {
+ auerbuf_releasebuf (bp);
+ ccp->readbuf = NULL;
+ }
+ /* return with number of bytes read */
+ if (count) {
+ up (&ccp->readmutex);
+ up (&ccp->mutex);
+ return count;
+ }
+ }
+
+ /* a read buffer is not available. Try to get the next data block. */
+doreadlist:
+ /* Preparing for sleep */
+ init_waitqueue_entry (&wait, current);
+ set_current_state (TASK_INTERRUPTIBLE);
+ add_wait_queue (&ccp->readwait, &wait);
+
+ bp = NULL;
+ spin_lock_irqsave (&ccp->bufctl.lock, flags);
+ if (!list_empty (&ccp->bufctl.rec_buff_list)) {
+ /* yes: get the entry */
+ struct list_head *tmp = ccp->bufctl.rec_buff_list.next;
+ list_del (tmp);
+ bp = list_entry (tmp, auerbuf_t, buff_list);
+ }
+ spin_unlock_irqrestore (&ccp->bufctl.lock, flags);
+
+ /* have we got data? */
+ if (bp) {
+ ccp->readbuf = bp;
+ ccp->readoffset = AUH_SIZE; /* for headerbyte */
+ set_current_state (TASK_RUNNING);
+ remove_wait_queue (&ccp->readwait, &wait);
+ goto doreadbuf; /* now we can read! */
+ }
+
+ /* no data available. Should we wait? */
+ if (file->f_flags & O_NONBLOCK) {
+ dbg ("No read buffer available, returning -EAGAIN");
+ set_current_state (TASK_RUNNING);
+ remove_wait_queue (&ccp->readwait, &wait);
+ up (&ccp->readmutex);
+ up (&ccp->mutex);
+ return -EAGAIN; /* nonblocking, no data available */
+ }
+
+ /* yes, we should wait! */
+ up (&ccp->mutex); /* allow other operations while we wait */
+ schedule();
+ remove_wait_queue (&ccp->readwait, &wait);
+ if (signal_pending (current)) {
+ /* waked up by a signal */
+ up (&ccp->readmutex);
+ return -ERESTARTSYS;
+ }
+
+ /* Anything left to read? */
+ if ((ccp->scontext.id == AUH_UNASSIGNED) || ccp->removed) {
+ up (&ccp->readmutex);
+ return -EIO;
+ }
+
+ if (down_interruptible (&ccp->mutex)) {
+ up (&ccp->readmutex);
+ return -ERESTARTSYS;
+ }
+
+ /* try to read the incoming data again */
+ goto doreadlist;
+}
+
+
+/* Write a data block into the right service channel of the device */
+static ssize_t auerchar_write (struct file *file, const char __user *buf, size_t len, loff_t *ppos)
+{
+ pauerchar_t ccp = (pauerchar_t) file->private_data;
+ pauerswald_t cp = NULL;
+ pauerbuf_t bp;
+ unsigned long flags;
+ int ret;
+ wait_queue_t wait;
+
+ dbg ("auerchar_write %d bytes", len);
+
+ /* Error checking */
+ if (!ccp)
+ return -EIO;
+ if (*ppos)
+ return -ESPIPE;
+ if (len == 0)
+ return 0;
+
+write_again:
+ /* get the mutex */
+ if (down_interruptible (&ccp->mutex))
+ return -ERESTARTSYS;
+
+ /* Can we expect to write something? */
+ if (ccp->scontext.id == AUH_UNASSIGNED) {
+ up (&ccp->mutex);
+ return -EIO;
+ }
+
+ cp = ccp->auerdev;
+ if (!cp) {
+ up (&ccp->mutex);
+ return -ERESTARTSYS;
+ }
+ if (down_interruptible (&cp->mutex)) {
+ up (&ccp->mutex);
+ return -ERESTARTSYS;
+ }
+ if (!cp->usbdev) {
+ up (&cp->mutex);
+ up (&ccp->mutex);
+ return -EIO;
+ }
+ /* Prepare for sleep */
+ init_waitqueue_entry (&wait, current);
+ set_current_state (TASK_INTERRUPTIBLE);
+ add_wait_queue (&cp->bufferwait, &wait);
+
+ /* Try to get a buffer from the device pool.
+ We can't use a buffer from ccp->bufctl because the write
+ command will last beond a release() */
+ bp = NULL;
+ spin_lock_irqsave (&cp->bufctl.lock, flags);
+ if (!list_empty (&cp->bufctl.free_buff_list)) {
+ /* yes: get the entry */
+ struct list_head *tmp = cp->bufctl.free_buff_list.next;
+ list_del (tmp);
+ bp = list_entry (tmp, auerbuf_t, buff_list);
+ }
+ spin_unlock_irqrestore (&cp->bufctl.lock, flags);
+
+ /* are there any buffers left? */
+ if (!bp) {
+ up (&cp->mutex);
+ up (&ccp->mutex);
+
+ /* NONBLOCK: don't wait */
+ if (file->f_flags & O_NONBLOCK) {
+ set_current_state (TASK_RUNNING);
+ remove_wait_queue (&cp->bufferwait, &wait);
+ return -EAGAIN;
+ }
+
+ /* BLOCKING: wait */
+ schedule();
+ remove_wait_queue (&cp->bufferwait, &wait);
+ if (signal_pending (current)) {
+ /* waked up by a signal */
+ return -ERESTARTSYS;
+ }
+ goto write_again;
+ } else {
+ set_current_state (TASK_RUNNING);
+ remove_wait_queue (&cp->bufferwait, &wait);
+ }
+
+ /* protect against too big write requests */
+ if (len > cp->maxControlLength)
+ len = cp->maxControlLength;
+
+ /* Fill the buffer */
+ if (copy_from_user ( bp->bufp+AUH_SIZE, buf, len)) {
+ dbg ("copy_from_user failed");
+ auerbuf_releasebuf (bp);
+ /* Wake up all processes waiting for a buffer */
+ wake_up (&cp->bufferwait);
+ up (&cp->mutex);
+ up (&ccp->mutex);
+ return -EFAULT;
+ }
+
+ /* set the header byte */
+ *(bp->bufp) = ccp->scontext.id | AUH_DIRECT | AUH_UNSPLIT;
+
+ /* Set the transfer Parameters */
+ bp->len = len+AUH_SIZE;
+ bp->dr->bRequestType = AUT_WREQ;
+ bp->dr->bRequest = AUV_WBLOCK;
+ bp->dr->wValue = cpu_to_le16 (0);
+ bp->dr->wIndex = cpu_to_le16 (ccp->scontext.id | AUH_DIRECT | AUH_UNSPLIT);
+ bp->dr->wLength = cpu_to_le16 (len+AUH_SIZE);
+ usb_fill_control_urb (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
+ (unsigned char*)bp->dr, bp->bufp, len+AUH_SIZE,
+ auerchar_ctrlwrite_complete, bp);
+ /* up we go */
+ ret = auerchain_submit_urb (&cp->controlchain, bp->urbp);
+ up (&cp->mutex);
+ if (ret) {
+ dbg ("auerchar_write: nonzero result of auerchain_submit_urb %d", ret);
+ auerbuf_releasebuf (bp);
+ /* Wake up all processes waiting for a buffer */
+ wake_up (&cp->bufferwait);
+ up (&ccp->mutex);
+ return -EIO;
+ }
+ else {
+ dbg ("auerchar_write: Write OK");
+ up (&ccp->mutex);
+ return len;
+ }
+}
+
+
+/* Close a character device */
+static int auerchar_release (struct inode *inode, struct file *file)
+{
+ pauerchar_t ccp = (pauerchar_t) file->private_data;
+ pauerswald_t cp;
+ dbg("release");
+
+ /* get the mutexes */
+ if (down_interruptible (&ccp->mutex)) {
+ return -ERESTARTSYS;
+ }
+ cp = ccp->auerdev;
+ if (cp) {
+ if (down_interruptible (&cp->mutex)) {
+ up (&ccp->mutex);
+ return -ERESTARTSYS;
+ }
+ /* remove an open service */
+ auerswald_removeservice (cp, &ccp->scontext);
+ /* detach from device */
+ if ((--cp->open_count <= 0) && (cp->usbdev == NULL)) {
+ /* usb device waits for removal */
+ up (&cp->mutex);
+ auerswald_delete (cp);
+ } else {
+ up (&cp->mutex);
+ }
+ cp = NULL;
+ ccp->auerdev = NULL;
+ }
+ up (&ccp->mutex);
+ auerchar_delete (ccp);
+
+ return 0;
+}
+
+
+/*----------------------------------------------------------------------*/
+/* File operation structure */
+static struct file_operations auerswald_fops =
+{
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .read = auerchar_read,
+ .write = auerchar_write,
+ .ioctl = auerchar_ioctl,
+ .open = auerchar_open,
+ .release = auerchar_release,
+};
+
+static struct usb_class_driver auerswald_class = {
+ .name = "usb/auer%d",
+ .fops = &auerswald_fops,
+ .mode = S_IFCHR | S_IRUGO | S_IWUGO,
+ .minor_base = AUER_MINOR_BASE,
+};
+
+
+/* --------------------------------------------------------------------- */
+/* Special USB driver functions */
+
+/* Probe if this driver wants to serve an USB device
+
+ This entry point is called whenever a new device is attached to the bus.
+ Then the device driver has to create a new instance of its internal data
+ structures for the new device.
+
+ The dev argument specifies the device context, which contains pointers
+ to all USB descriptors. The interface argument specifies the interface
+ number. If a USB driver wants to bind itself to a particular device and
+ interface it has to return a pointer. This pointer normally references
+ the device driver's context structure.
+
+ Probing normally is done by checking the vendor and product identifications
+ or the class and subclass definitions. If they match the interface number
+ is compared with the ones supported by the driver. When probing is done
+ class based it might be necessary to parse some more USB descriptors because
+ the device properties can differ in a wide range.
+*/
+static int auerswald_probe (struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *usbdev = interface_to_usbdev(intf);
+ pauerswald_t cp = NULL;
+ unsigned int u = 0;
+ __le16 *pbuf;
+ int ret;
+
+ dbg ("probe: vendor id 0x%x, device id 0x%x",
+ le16_to_cpu(usbdev->descriptor.idVendor),
+ le16_to_cpu(usbdev->descriptor.idProduct));
+
+ /* we use only the first -and only- interface */
+ if (intf->altsetting->desc.bInterfaceNumber != 0)
+ return -ENODEV;
+
+ /* allocate memory for our device and initialize it */
+ cp = kmalloc (sizeof(auerswald_t), GFP_KERNEL);
+ if (cp == NULL) {
+ err ("out of memory");
+ goto pfail;
+ }
+
+ /* Initialize device descriptor */
+ memset (cp, 0, sizeof(auerswald_t));
+ init_MUTEX (&cp->mutex);
+ cp->usbdev = usbdev;
+ auerchain_init (&cp->controlchain);
+ auerbuf_init (&cp->bufctl);
+ init_waitqueue_head (&cp->bufferwait);
+
+ ret = usb_register_dev(intf, &auerswald_class);
+ if (ret) {
+ err ("Not able to get a minor for this device.");
+ goto pfail;
+ }
+
+ /* Give the device a name */
+ sprintf (cp->name, "usb/auer%d", intf->minor);
+
+ /* Store the index */
+ cp->dtindex = intf->minor;
+
+ /* Get the usb version of the device */
+ cp->version = le16_to_cpu(cp->usbdev->descriptor.bcdDevice);
+ dbg ("Version is %X", cp->version);
+
+ /* allow some time to settle the device */
+ msleep(334);
+
+ /* Try to get a suitable textual description of the device */
+ /* Device name:*/
+ ret = usb_string( cp->usbdev, AUSI_DEVICE, cp->dev_desc, AUSI_DLEN-1);
+ if (ret >= 0) {
+ u += ret;
+ /* Append Serial Number */
+ memcpy(&cp->dev_desc[u], ",Ser# ", 6);
+ u += 6;
+ ret = usb_string( cp->usbdev, AUSI_SERIALNR, &cp->dev_desc[u], AUSI_DLEN-u-1);
+ if (ret >= 0) {
+ u += ret;
+ /* Append subscriber number */
+ memcpy(&cp->dev_desc[u], ", ", 2);
+ u += 2;
+ ret = usb_string( cp->usbdev, AUSI_MSN, &cp->dev_desc[u], AUSI_DLEN-u-1);
+ if (ret >= 0) {
+ u += ret;
+ }
+ }
+ }
+ cp->dev_desc[u] = '\0';
+ info("device is a %s", cp->dev_desc);
+
+ /* get the maximum allowed control transfer length */
+ pbuf = (__le16 *) kmalloc (2, GFP_KERNEL); /* use an allocated buffer because of urb target */
+ if (!pbuf) {
+ err( "out of memory");
+ goto pfail;
+ }
+ ret = usb_control_msg(cp->usbdev, /* pointer to device */
+ usb_rcvctrlpipe( cp->usbdev, 0 ), /* pipe to control endpoint */
+ AUV_GETINFO, /* USB message request value */
+ AUT_RREQ, /* USB message request type value */
+ 0, /* USB message value */
+ AUDI_MBCTRANS, /* USB message index value */
+ pbuf, /* pointer to the receive buffer */
+ 2, /* length of the buffer */
+ 2000); /* time to wait for the message to complete before timing out */
+ if (ret == 2) {
+ cp->maxControlLength = le16_to_cpup(pbuf);
+ kfree(pbuf);
+ dbg("setup: max. allowed control transfersize is %d bytes", cp->maxControlLength);
+ } else {
+ kfree(pbuf);
+ err("setup: getting max. allowed control transfer length failed with error %d", ret);
+ goto pfail;
+ }
+
+ /* allocate a chain for the control messages */
+ if (auerchain_setup (&cp->controlchain, AUCH_ELEMENTS)) {
+ err ("out of memory");
+ goto pfail;
+ }
+
+ /* allocate buffers for control messages */
+ if (auerbuf_setup (&cp->bufctl, AU_RBUFFERS, cp->maxControlLength+AUH_SIZE)) {
+ err ("out of memory");
+ goto pfail;
+ }
+
+ /* start the interrupt endpoint */
+ if (auerswald_int_open (cp)) {
+ err ("int endpoint failed");
+ goto pfail;
+ }
+
+ /* all OK */
+ usb_set_intfdata (intf, cp);
+ return 0;
+
+ /* Error exit: clean up the memory */
+pfail: auerswald_delete (cp);
+ return -EIO;
+}
+
+
+/* Disconnect driver from a served device
+
+ This function is called whenever a device which was served by this driver
+ is disconnected.
+
+ The argument dev specifies the device context and the driver_context
+ returns a pointer to the previously registered driver_context of the
+ probe function. After returning from the disconnect function the USB
+ framework completely deallocates all data structures associated with
+ this device. So especially the usb_device structure must not be used
+ any longer by the usb driver.
+*/
+static void auerswald_disconnect (struct usb_interface *intf)
+{
+ pauerswald_t cp = usb_get_intfdata (intf);
+ unsigned int u;
+
+ usb_set_intfdata (intf, NULL);
+ if (!cp)
+ return;
+
+ down (&cp->mutex);
+ info ("device /dev/%s now disconnecting", cp->name);
+
+ /* give back our USB minor number */
+ usb_deregister_dev(intf, &auerswald_class);
+
+ /* Stop the interrupt endpoint */
+ auerswald_int_release (cp);
+
+ /* remove the control chain allocated in auerswald_probe
+ This has the benefit of
+ a) all pending (a)synchronous urbs are unlinked
+ b) all buffers dealing with urbs are reclaimed
+ */
+ auerchain_free (&cp->controlchain);
+
+ if (cp->open_count == 0) {
+ /* nobody is using this device. So we can clean up now */
+ up (&cp->mutex);/* up() is possible here because no other task
+ can open the device (see above). I don't want
+ to kfree() a locked mutex. */
+ auerswald_delete (cp);
+ } else {
+ /* device is used. Remove the pointer to the
+ usb device (it's not valid any more). The last
+ release() will do the clean up */
+ cp->usbdev = NULL;
+ up (&cp->mutex);
+ /* Terminate waiting writers */
+ wake_up (&cp->bufferwait);
+ /* Inform all waiting readers */
+ for ( u = 0; u < AUH_TYPESIZE; u++) {
+ pauerscon_t scp = cp->services[u];
+ if (scp)
+ scp->disconnect( scp);
+ }
+ }
+}
+
+/* Descriptor for the devices which are served by this driver.
+ NOTE: this struct is parsed by the usbmanager install scripts.
+ Don't change without caution!
+*/
+static struct usb_device_id auerswald_ids [] = {
+ { USB_DEVICE (ID_AUERSWALD, 0x00C0) }, /* COMpact 2104 USB */
+ { USB_DEVICE (ID_AUERSWALD, 0x00DB) }, /* COMpact 4410/2206 USB */
+ { USB_DEVICE (ID_AUERSWALD, 0x00F1) }, /* Comfort 2000 System Telephone */
+ { USB_DEVICE (ID_AUERSWALD, 0x00F2) }, /* Comfort 1200 System Telephone */
+ { } /* Terminating entry */
+};
+
+/* Standard module device table */
+MODULE_DEVICE_TABLE (usb, auerswald_ids);
+
+/* Standard usb driver struct */
+static struct usb_driver auerswald_driver = {
+ .owner = THIS_MODULE,
+ .name = "auerswald",
+ .probe = auerswald_probe,
+ .disconnect = auerswald_disconnect,
+ .id_table = auerswald_ids,
+};
+
+
+/* --------------------------------------------------------------------- */
+/* Module loading/unloading */
+
+/* Driver initialisation. Called after module loading.
+ NOTE: there is no concurrency at _init
+*/
+static int __init auerswald_init (void)
+{
+ int result;
+ dbg ("init");
+
+ /* register driver at the USB subsystem */
+ result = usb_register (&auerswald_driver);
+ if (result < 0) {
+ err ("driver could not be registered");
+ return -1;
+ }
+ return 0;
+}
+
+/* Driver deinit. Called before module removal.
+ NOTE: there is no concurrency at _cleanup
+*/
+static void __exit auerswald_cleanup (void)
+{
+ dbg ("cleanup");
+ usb_deregister (&auerswald_driver);
+}
+
+/* --------------------------------------------------------------------- */
+/* Linux device driver module description */
+
+MODULE_AUTHOR (DRIVER_AUTHOR);
+MODULE_DESCRIPTION (DRIVER_DESC);
+MODULE_LICENSE ("GPL");
+
+module_init (auerswald_init);
+module_exit (auerswald_cleanup);
+
+/* --------------------------------------------------------------------- */
+
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c
new file mode 100644
index 000000000000..626e2b05f719
--- /dev/null
+++ b/drivers/usb/misc/cytherm.c
@@ -0,0 +1,430 @@
+/* -*- linux-c -*-
+ * Cypress USB Thermometer driver
+ *
+ * Copyright (c) 2004 Erik Rigtorp <erkki@linux.nu> <erik@rigtorp.com>
+ *
+ * This driver works with Elektor magazine USB Interface as published in
+ * issue #291. It should also work with the original starter kit/demo board
+ * from Cypress.
+ *
+ * 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, version 2.
+ *
+ */
+
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+
+#define DRIVER_VERSION "v1.0"
+#define DRIVER_AUTHOR "Erik Rigtorp"
+#define DRIVER_DESC "Cypress USB Thermometer driver"
+
+#define USB_SKEL_VENDOR_ID 0x04b4
+#define USB_SKEL_PRODUCT_ID 0x0002
+
+static struct usb_device_id id_table [] = {
+ { USB_DEVICE(USB_SKEL_VENDOR_ID, USB_SKEL_PRODUCT_ID) },
+ { }
+};
+MODULE_DEVICE_TABLE (usb, id_table);
+
+/* Structure to hold all of our device specific stuff */
+struct usb_cytherm {
+ struct usb_device *udev; /* save off the usb device pointer */
+ struct usb_interface *interface; /* the interface for this device */
+ int brightness;
+};
+
+
+/* local function prototypes */
+static int cytherm_probe(struct usb_interface *interface,
+ const struct usb_device_id *id);
+static void cytherm_disconnect(struct usb_interface *interface);
+
+
+/* usb specific object needed to register this driver with the usb subsystem */
+static struct usb_driver cytherm_driver = {
+ .owner = THIS_MODULE,
+ .name = "cytherm",
+ .probe = cytherm_probe,
+ .disconnect = cytherm_disconnect,
+ .id_table = id_table,
+};
+
+/* Vendor requests */
+/* They all operate on one byte at a time */
+#define PING 0x00
+#define READ_ROM 0x01 /* Reads form ROM, value = address */
+#define READ_RAM 0x02 /* Reads form RAM, value = address */
+#define WRITE_RAM 0x03 /* Write to RAM, value = address, index = data */
+#define READ_PORT 0x04 /* Reads from port, value = address */
+#define WRITE_PORT 0x05 /* Write to port, value = address, index = data */
+
+
+/* Send a vendor command to device */
+static int vendor_command(struct usb_device *dev, unsigned char request,
+ unsigned char value, unsigned char index,
+ void *buf, int size)
+{
+ return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ request,
+ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER,
+ value,
+ index, buf, size,
+ USB_CTRL_GET_TIMEOUT);
+}
+
+
+
+#define BRIGHTNESS 0x2c /* RAM location for brightness value */
+#define BRIGHTNESS_SEM 0x2b /* RAM location for brightness semaphore */
+
+static ssize_t show_brightness(struct device *dev, char *buf)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_cytherm *cytherm = usb_get_intfdata(intf);
+
+ return sprintf(buf, "%i", cytherm->brightness);
+}
+
+static ssize_t set_brightness(struct device *dev, const char *buf,
+ size_t count)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_cytherm *cytherm = usb_get_intfdata(intf);
+
+ unsigned char *buffer;
+ int retval;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&cytherm->udev->dev, "out of memory\n");
+ return 0;
+ }
+
+ cytherm->brightness = simple_strtoul(buf, NULL, 10);
+
+ if (cytherm->brightness > 0xFF)
+ cytherm->brightness = 0xFF;
+ else if (cytherm->brightness < 0)
+ cytherm->brightness = 0;
+
+ /* Set brightness */
+ retval = vendor_command(cytherm->udev, WRITE_RAM, BRIGHTNESS,
+ cytherm->brightness, buffer, 8);
+ if (retval)
+ dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval);
+ /* Inform µC that we have changed the brightness setting */
+ retval = vendor_command(cytherm->udev, WRITE_RAM, BRIGHTNESS_SEM,
+ 0x01, buffer, 8);
+ if (retval)
+ dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval);
+
+ kfree(buffer);
+
+ return count;
+}
+
+static DEVICE_ATTR(brightness, S_IRUGO | S_IWUSR | S_IWGRP,
+ show_brightness, set_brightness);
+
+
+#define TEMP 0x33 /* RAM location for temperature */
+#define SIGN 0x34 /* RAM location for temperature sign */
+
+static ssize_t show_temp(struct device *dev, char *buf)
+{
+
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_cytherm *cytherm = usb_get_intfdata(intf);
+
+ int retval;
+ unsigned char *buffer;
+
+ int temp, sign;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&cytherm->udev->dev, "out of memory\n");
+ return 0;
+ }
+
+ /* read temperature */
+ retval = vendor_command(cytherm->udev, READ_RAM, TEMP, 0, buffer, 8);
+ if (retval)
+ dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval);
+ temp = buffer[1];
+
+ /* read sign */
+ retval = vendor_command(cytherm->udev, READ_RAM, SIGN, 0, buffer, 8);
+ if (retval)
+ dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval);
+ sign = buffer[1];
+
+ kfree(buffer);
+
+ return sprintf(buf, "%c%i.%i", sign ? '-' : '+', temp >> 1,
+ 5*(temp - ((temp >> 1) << 1)));
+}
+
+
+static ssize_t set_temp(struct device *dev, const char *buf, size_t count)
+{
+ return count;
+}
+
+static DEVICE_ATTR(temp, S_IRUGO, show_temp, set_temp);
+
+
+#define BUTTON 0x7a
+
+static ssize_t show_button(struct device *dev, char *buf)
+{
+
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_cytherm *cytherm = usb_get_intfdata(intf);
+
+ int retval;
+ unsigned char *buffer;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&cytherm->udev->dev, "out of memory\n");
+ return 0;
+ }
+
+ /* check button */
+ retval = vendor_command(cytherm->udev, READ_RAM, BUTTON, 0, buffer, 8);
+ if (retval)
+ dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval);
+
+ retval = buffer[1];
+
+ kfree(buffer);
+
+ if (retval)
+ return sprintf(buf, "1");
+ else
+ return sprintf(buf, "0");
+}
+
+
+static ssize_t set_button(struct device *dev, const char *buf, size_t count)
+{
+ return count;
+}
+
+static DEVICE_ATTR(button, S_IRUGO, show_button, set_button);
+
+
+static ssize_t show_port0(struct device *dev, char *buf)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_cytherm *cytherm = usb_get_intfdata(intf);
+
+ int retval;
+ unsigned char *buffer;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&cytherm->udev->dev, "out of memory\n");
+ return 0;
+ }
+
+ retval = vendor_command(cytherm->udev, READ_PORT, 0, 0, buffer, 8);
+ if (retval)
+ dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval);
+
+ retval = buffer[1];
+
+ kfree(buffer);
+
+ return sprintf(buf, "%d", retval);
+}
+
+
+static ssize_t set_port0(struct device *dev, const char *buf, size_t count)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_cytherm *cytherm = usb_get_intfdata(intf);
+
+ unsigned char *buffer;
+ int retval;
+ int tmp;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&cytherm->udev->dev, "out of memory\n");
+ return 0;
+ }
+
+ tmp = simple_strtoul(buf, NULL, 10);
+
+ if (tmp > 0xFF)
+ tmp = 0xFF;
+ else if (tmp < 0)
+ tmp = 0;
+
+ retval = vendor_command(cytherm->udev, WRITE_PORT, 0,
+ tmp, buffer, 8);
+ if (retval)
+ dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval);
+
+ kfree(buffer);
+
+ return count;
+}
+
+static DEVICE_ATTR(port0, S_IRUGO | S_IWUSR | S_IWGRP, show_port0, set_port0);
+
+static ssize_t show_port1(struct device *dev, char *buf)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_cytherm *cytherm = usb_get_intfdata(intf);
+
+ int retval;
+ unsigned char *buffer;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&cytherm->udev->dev, "out of memory\n");
+ return 0;
+ }
+
+ retval = vendor_command(cytherm->udev, READ_PORT, 1, 0, buffer, 8);
+ if (retval)
+ dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval);
+
+ retval = buffer[1];
+
+ kfree(buffer);
+
+ return sprintf(buf, "%d", retval);
+}
+
+
+static ssize_t set_port1(struct device *dev, const char *buf, size_t count)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct usb_cytherm *cytherm = usb_get_intfdata(intf);
+
+ unsigned char *buffer;
+ int retval;
+ int tmp;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&cytherm->udev->dev, "out of memory\n");
+ return 0;
+ }
+
+ tmp = simple_strtoul(buf, NULL, 10);
+
+ if (tmp > 0xFF)
+ tmp = 0xFF;
+ else if (tmp < 0)
+ tmp = 0;
+
+ retval = vendor_command(cytherm->udev, WRITE_PORT, 1,
+ tmp, buffer, 8);
+ if (retval)
+ dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval);
+
+ kfree(buffer);
+
+ return count;
+}
+
+static DEVICE_ATTR(port1, S_IRUGO | S_IWUSR | S_IWGRP, show_port1, set_port1);
+
+
+
+static int cytherm_probe(struct usb_interface *interface,
+ const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev(interface);
+ struct usb_cytherm *dev = NULL;
+ int retval = -ENOMEM;
+
+ dev = kmalloc (sizeof(struct usb_cytherm), GFP_KERNEL);
+ if (dev == NULL) {
+ dev_err (&interface->dev, "Out of memory\n");
+ goto error;
+ }
+ memset (dev, 0x00, sizeof (*dev));
+
+ dev->udev = usb_get_dev(udev);
+
+ usb_set_intfdata (interface, dev);
+
+ dev->brightness = 0xFF;
+
+ device_create_file(&interface->dev, &dev_attr_brightness);
+ device_create_file(&interface->dev, &dev_attr_temp);
+ device_create_file(&interface->dev, &dev_attr_button);
+ device_create_file(&interface->dev, &dev_attr_port0);
+ device_create_file(&interface->dev, &dev_attr_port1);
+
+ dev_info (&interface->dev,
+ "Cypress thermometer device now attached\n");
+ return 0;
+
+ error:
+ kfree(dev);
+ return retval;
+}
+
+static void cytherm_disconnect(struct usb_interface *interface)
+{
+ struct usb_cytherm *dev;
+
+ dev = usb_get_intfdata (interface);
+ usb_set_intfdata (interface, NULL);
+
+ device_remove_file(&interface->dev, &dev_attr_brightness);
+ device_remove_file(&interface->dev, &dev_attr_temp);
+ device_remove_file(&interface->dev, &dev_attr_button);
+ device_remove_file(&interface->dev, &dev_attr_port0);
+ device_remove_file(&interface->dev, &dev_attr_port1);
+
+ usb_put_dev(dev->udev);
+
+ kfree(dev);
+
+ dev_info(&interface->dev, "Cypress thermometer now disconnected\n");
+}
+
+
+static int __init usb_cytherm_init(void)
+{
+ int result;
+
+ result = usb_register(&cytherm_driver);
+ if (result)
+ {
+ err("usb_register failed. Error number %d", result);
+ return result;
+ }
+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+ return 0;
+}
+
+static void __exit usb_cytherm_exit(void)
+{
+ usb_deregister(&cytherm_driver);
+}
+
+
+module_init (usb_cytherm_init);
+module_exit (usb_cytherm_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c
new file mode 100644
index 000000000000..c8155209bf4b
--- /dev/null
+++ b/drivers/usb/misc/emi26.c
@@ -0,0 +1,255 @@
+/*
+ * Emagic EMI 2|6 usb audio interface firmware loader.
+ * Copyright (C) 2002
+ * Tapio Laxström (tapio.laxstrom@iptime.fi)
+ *
+ * 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, version 2.
+ *
+ * emi26.c,v 1.13 2002/03/08 13:10:26 tapio Exp
+ */
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+
+#define MAX_INTEL_HEX_RECORD_LENGTH 16
+typedef struct _INTEL_HEX_RECORD
+{
+ __u32 length;
+ __u32 address;
+ __u32 type;
+ __u8 data[MAX_INTEL_HEX_RECORD_LENGTH];
+} INTEL_HEX_RECORD, *PINTEL_HEX_RECORD;
+
+/* include firmware (variables) */
+#include "emi26_fw.h"
+
+#define EMI26_VENDOR_ID 0x086a /* Emagic Soft-und Hardware GmBH */
+#define EMI26_PRODUCT_ID 0x0100 /* EMI 2|6 without firmware */
+#define EMI26B_PRODUCT_ID 0x0102 /* EMI 2|6 without firmware */
+
+#define ANCHOR_LOAD_INTERNAL 0xA0 /* Vendor specific request code for Anchor Upload/Download (This one is implemented in the core) */
+#define ANCHOR_LOAD_EXTERNAL 0xA3 /* This command is not implemented in the core. Requires firmware */
+#define ANCHOR_LOAD_FPGA 0xA5 /* This command is not implemented in the core. Requires firmware. Emagic extension */
+#define MAX_INTERNAL_ADDRESS 0x1B3F /* This is the highest internal RAM address for the AN2131Q */
+#define CPUCS_REG 0x7F92 /* EZ-USB Control and Status Register. Bit 0 controls 8051 reset */
+#define INTERNAL_RAM(address) (address <= MAX_INTERNAL_ADDRESS)
+
+static int emi26_writememory( struct usb_device *dev, int address, unsigned char *data, int length, __u8 bRequest);
+static int emi26_set_reset(struct usb_device *dev, unsigned char reset_bit);
+static int emi26_load_firmware (struct usb_device *dev);
+static int emi26_probe(struct usb_interface *intf, const struct usb_device_id *id);
+static void emi26_disconnect(struct usb_interface *intf);
+static int __init emi26_init (void);
+static void __exit emi26_exit (void);
+
+
+/* thanks to drivers/usb/serial/keyspan_pda.c code */
+static int emi26_writememory (struct usb_device *dev, int address, unsigned char *data, int length, __u8 request)
+{
+ int result;
+ unsigned char *buffer = kmalloc (length, GFP_KERNEL);
+
+ if (!buffer) {
+ err("emi26: kmalloc(%d) failed.", length);
+ return -ENOMEM;
+ }
+ memcpy (buffer, data, length);
+ /* Note: usb_control_msg returns negative value on error or length of the
+ * data that was written! */
+ result = usb_control_msg (dev, usb_sndctrlpipe(dev, 0), request, 0x40, address, 0, buffer, length, 300);
+ kfree (buffer);
+ return result;
+}
+
+/* thanks to drivers/usb/serial/keyspan_pda.c code */
+static int emi26_set_reset (struct usb_device *dev, unsigned char reset_bit)
+{
+ int response;
+ info("%s - %d", __FUNCTION__, reset_bit);
+ /* printk(KERN_DEBUG "%s - %d", __FUNCTION__, reset_bit); */
+ response = emi26_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
+ if (response < 0) {
+ err("emi26: set_reset (%d) failed", reset_bit);
+ }
+ return response;
+}
+
+#define FW_LOAD_SIZE 1023
+
+static int emi26_load_firmware (struct usb_device *dev)
+{
+ int err;
+ int i;
+ int pos = 0; /* Position in hex record */
+ __u32 addr; /* Address to write */
+ __u8 *buf;
+
+ buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL);
+ if (!buf) {
+ err( "%s - error loading firmware: error = %d", __FUNCTION__, -ENOMEM);
+ err = -ENOMEM;
+ goto wraperr;
+ }
+
+ /* Assert reset (stop the CPU in the EMI) */
+ err = emi26_set_reset(dev,1);
+ if (err < 0) {
+ err( "%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+ /* 1. We need to put the loader for the FPGA into the EZ-USB */
+ for (i=0; g_Loader[i].type == 0; i++) {
+ err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ }
+
+ /* De-assert reset (let the CPU run) */
+ err = emi26_set_reset(dev,0);
+
+ /* 2. We upload the FPGA firmware into the EMI
+ * Note: collect up to 1023 (yes!) bytes and send them with
+ * a single request. This is _much_ faster! */
+ do {
+ i = 0;
+ addr = g_bitstream[pos].address;
+
+ /* intel hex records are terminated with type 0 element */
+ while ((g_bitstream[pos].type == 0) && (i + g_bitstream[pos].length < FW_LOAD_SIZE)) {
+ memcpy(buf + i, g_bitstream[pos].data, g_bitstream[pos].length);
+ i += g_bitstream[pos].length;
+ pos++;
+ }
+ err = emi26_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ } while (i > 0);
+
+ /* Assert reset (stop the CPU in the EMI) */
+ err = emi26_set_reset(dev,1);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+ /* 3. We need to put the loader for the firmware into the EZ-USB (again...) */
+ for (i=0; g_Loader[i].type == 0; i++) {
+ err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ }
+
+ /* De-assert reset (let the CPU run) */
+ err = emi26_set_reset(dev,0);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+ /* 4. We put the part of the firmware that lies in the external RAM into the EZ-USB */
+ for (i=0; g_Firmware[i].type == 0; i++) {
+ if (!INTERNAL_RAM(g_Firmware[i].address)) {
+ err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_EXTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ }
+ }
+
+ /* Assert reset (stop the CPU in the EMI) */
+ err = emi26_set_reset(dev,1);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+ for (i=0; g_Firmware[i].type == 0; i++) {
+ if (INTERNAL_RAM(g_Firmware[i].address)) {
+ err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_INTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ }
+ }
+
+ /* De-assert reset (let the CPU run) */
+ err = emi26_set_reset(dev,0);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+ /* return 1 to fail the driver inialization
+ * and give real driver change to load */
+ err = 1;
+
+wraperr:
+ kfree(buf);
+ return err;
+}
+
+static struct usb_device_id id_table [] = {
+ { USB_DEVICE(EMI26_VENDOR_ID, EMI26_PRODUCT_ID) },
+ { USB_DEVICE(EMI26_VENDOR_ID, EMI26B_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static int emi26_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+
+ info("%s start", __FUNCTION__);
+
+ emi26_load_firmware(dev);
+
+ /* do not return the driver context, let real audio driver do that */
+ return -EIO;
+}
+
+static void emi26_disconnect(struct usb_interface *intf)
+{
+}
+
+static struct usb_driver emi26_driver = {
+ .owner = THIS_MODULE,
+ .name = "emi26 - firmware loader",
+ .probe = emi26_probe,
+ .disconnect = emi26_disconnect,
+ .id_table = id_table,
+};
+
+static int __init emi26_init (void)
+{
+ return usb_register(&emi26_driver);
+}
+
+static void __exit emi26_exit (void)
+{
+ usb_deregister (&emi26_driver);
+}
+
+module_init(emi26_init);
+module_exit(emi26_exit);
+
+MODULE_AUTHOR("tapio laxström");
+MODULE_DESCRIPTION("Emagic EMI 2|6 firmware loader.");
+MODULE_LICENSE("GPL");
+
+/* vi:ai:syntax=c:sw=8:ts=8:tw=80
+ */
diff --git a/drivers/usb/misc/emi26_fw.h b/drivers/usb/misc/emi26_fw.h
new file mode 100644
index 000000000000..a47ff107ad9e
--- /dev/null
+++ b/drivers/usb/misc/emi26_fw.h
@@ -0,0 +1,5779 @@
+/*
+ * This file is generated from three different files, provided by Emagic.
+ */
+/* generated Fri Mar 8 15:11:35 EET 2002 */
+
+/*
+ * This firmware is for the Emagic EMI 2|6 Audio Interface
+ *
+ * The firmware contained herein is Copyright (c) 1999-2002 Emagic
+ * as an unpublished work. This notice does not imply unrestricted
+ * or public access to this firmware which is a trade secret of Emagic,
+ * and which may not be reproduced, used, sold or transferred to
+ * any third party without Emagic's 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
+ * Emagic EMI 2|6 Audio Interface. Distribution and/or Modification of
+ * any driver which includes this firmware, in whole or in part,
+ * requires the inclusion of this statement.
+ */
+static INTEL_HEX_RECORD g_bitstream[]={
+{ 16, 0x8010, 0, {0xff,0xff,0xff,0xff,0xaa,0x99,0x55,0x66,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x07 } },
+{ 16, 0x8020, 0, {0x30,0x01,0x60,0x01,0x00,0x00,0x00,0x0b,0x30,0x01,0x20,0x01,0x00,0x80,0x3f,0x2d } },
+{ 16, 0x8030, 0, {0x30,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x09 } },
+{ 16, 0x8040, 0, {0x30,0x00,0x20,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x01 } },
+{ 16, 0x8050, 0, {0x30,0x00,0x40,0x00,0x50,0x00,0x3e,0x04,0x08,0x12,0x10,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8060, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x04 } },
+{ 16, 0x8080, 0, {0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x10,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8090, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x80a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x84 } },
+{ 16, 0x80b0, 0, {0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x80c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x80d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00 } },
+{ 16, 0x80e0, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x80f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8100, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8110, 0, {0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8130, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04 } },
+{ 16, 0x8140, 0, {0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x13,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8150, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8170, 0, {0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8190, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84 } },
+{ 16, 0x81a0, 0, {0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x10,0x01,0x14,0x00,0x25,0x00,0x05 } },
+{ 16, 0x81b0, 0, {0x40,0x01,0x50,0x00,0x94,0x00,0x15,0x00,0x07,0x40,0x01,0xd0,0x00,0x94,0x00,0x25 } },
+{ 16, 0x81c0, 0, {0x80,0x01,0x60,0x02,0xd8,0x00,0xf6,0x00,0x2f,0x80,0x02,0xe0,0x04,0xd8,0x37,0x44 } },
+{ 16, 0x81d0, 0, {0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf2,0x00,0xcc,0x90,0x39,0x20 } },
+{ 16, 0x81e0, 0, {0x0d,0x98,0x03,0xd2,0x00,0xe7,0x80,0x37,0x04,0x0e,0xf1,0x83,0x7e,0x00,0xdf,0x90 } },
+{ 16, 0x81f0, 0, {0x31,0xe4,0x8f,0x79,0x03,0x7c,0x20,0xdf,0x22,0x33,0xc0,0x0c,0xf0,0x22,0x30,0x00 } },
+{ 16, 0x8200, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0x62,0x00,0x80,0x24,0x22,0x20 } },
+{ 16, 0x8210, 0, {0x08,0x98,0x12,0xe2,0x00,0x8b,0x81,0x20,0x94,0x08,0x74,0x02,0x2e,0x00,0x8a,0x01 } },
+{ 16, 0x8220, 0, {0x22,0xc8,0x08,0x92,0x02,0x3d,0x80,0x8b,0x60,0x22,0x80,0x08,0xb0,0x02,0x20,0x04 } },
+{ 16, 0x8230, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc8,0x00,0xa0,0x00,0x20,0x00 } },
+{ 16, 0x8240, 0, {0x0b,0x10,0x02,0xc0,0x00,0xa1,0x00,0x24,0x09,0x4a,0x32,0x02,0x48,0x00,0xb1,0x00 } },
+{ 16, 0x8250, 0, {0x62,0xc0,0x09,0xa0,0x46,0xcc,0x24,0x93,0x49,0x2a,0x80,0x48,0x30,0x22,0x62,0x01 } },
+{ 16, 0x8260, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xa8,0x12,0xa8,0x00,0x22,0x00 } },
+{ 16, 0x8270, 0, {0x08,0x90,0x02,0xe0,0x00,0x89,0x80,0x22,0x44,0x08,0xb0,0x12,0xa8,0x00,0xa9,0x40 } },
+{ 16, 0x8280, 0, {0x22,0xc0,0x08,0x90,0x82,0xac,0x00,0x9b,0x04,0x2a,0xc4,0x08,0xb0,0x02,0x70,0x04 } },
+{ 16, 0x8290, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x84,0x00,0xe9,0x80,0xb2,0x64 } },
+{ 16, 0x82a0, 0, {0x4d,0xa0,0x03,0xea,0x20,0xe9,0xc0,0x36,0x40,0x0e,0xb0,0x03,0x44,0x00,0xfb,0x90 } },
+{ 16, 0x82b0, 0, {0xb2,0x88,0x0d,0xbc,0x03,0xec,0x08,0x5b,0x00,0x38,0x60,0x2c,0xb0,0x63,0x40,0x04 } },
+{ 16, 0x82c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb4,0x26,0xdd,0x90,0x37,0x40 } },
+{ 16, 0x82d0, 0, {0x4f,0xe0,0x13,0xf2,0x80,0xfd,0x00,0x3d,0xa0,0x0d,0x70,0x03,0x75,0x00,0x5e,0x00 } },
+{ 16, 0x82e0, 0, {0x3f,0xa4,0x0d,0xf9,0x03,0x5c,0x10,0xeb,0x00,0x37,0x20,0x0f,0x30,0x03,0xb8,0x00 } },
+{ 16, 0x82f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xe9,0x80,0x32,0x40 } },
+{ 16, 0x8300, 0, {0x0c,0xa1,0x83,0xe8,0x00,0xe9,0x00,0x32,0x42,0x0e,0xb0,0x03,0xac,0x48,0xe9,0x00 } },
+{ 16, 0x8310, 0, {0x3a,0x80,0x0e,0xa4,0x03,0xec,0x00,0xeb,0x00,0xb2,0x03,0x0e,0xb0,0x0b,0x10,0x04 } },
+{ 16, 0x8320, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2e,0x80,0x89,0xd1,0x20,0x40 } },
+{ 16, 0x8330, 0, {0x08,0xa0,0x02,0xc0,0x00,0x81,0x80,0x22,0x58,0x08,0xf5,0x02,0x2f,0x40,0x8b,0x00 } },
+{ 16, 0x8340, 0, {0x20,0xc0,0x08,0x30,0x43,0x7c,0x00,0x87,0x00,0x22,0x40,0x08,0xf0,0x02,0x32,0x00 } },
+{ 16, 0x8350, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x42,0x01,0x9a,0x44,0x28,0xa2 } },
+{ 16, 0x8360, 0, {0x08,0x18,0x02,0xc0,0x80,0xa1,0x80,0xa0,0x00,0x08,0x30,0x02,0x8e,0x00,0xab,0x00 } },
+{ 16, 0x8370, 0, {0x2c,0x40,0x0a,0x30,0x02,0x0c,0x00,0xa3,0x00,0x20,0x44,0x0a,0x30,0x02,0x38,0x00 } },
+{ 16, 0x8380, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x32,0x00,0x96,0x82,0x2b,0xa2 } },
+{ 16, 0x8390, 0, {0x88,0x5a,0x02,0xf2,0x00,0x05,0x80,0x29,0xa0,0x08,0x78,0x42,0xbe,0x00,0x8e,0x84 } },
+{ 16, 0x83a0, 0, {0x2f,0x61,0x0a,0xd8,0x02,0x4e,0x10,0xa7,0x80,0x20,0x28,0x08,0x78,0x02,0x18,0x00 } },
+{ 16, 0x83b0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x08,0x00,0xf2,0x24,0x38,0x80 } },
+{ 16, 0x83c0, 0, {0x2c,0x1a,0x03,0xc4,0x00,0xe0,0x58,0xa0,0x80,0x2e,0x30,0x03,0x88,0x41,0xe3,0x02 } },
+{ 16, 0x83d0, 0, {0x3c,0x40,0x06,0x20,0x03,0x8c,0x00,0xe3,0x00,0x10,0x00,0x0e,0x31,0x43,0x12,0x02 } },
+{ 16, 0x83e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0x98,0x00,0xee,0x01,0x37,0x84 } },
+{ 16, 0x83f0, 0, {0x9f,0xd9,0x03,0xf0,0x48,0xfd,0x10,0x37,0xc0,0x07,0xb0,0x03,0x5c,0x00,0xf6,0x10 } },
+{ 16, 0x8400, 0, {0x33,0xc0,0x0d,0xe1,0x03,0xed,0x20,0xdf,0x10,0x3f,0x48,0x0f,0xf0,0x23,0xd0,0x06 } },
+{ 16, 0x8410, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x02,0xcb,0x80,0x30,0xc0 } },
+{ 16, 0x8420, 0, {0x0c,0xa0,0x03,0xe2,0x02,0xc9,0x00,0x3a,0x40,0x0d,0xb6,0x03,0x64,0x00,0xeb,0x00 } },
+{ 16, 0x8430, 0, {0x3e,0xc0,0x0f,0xb0,0x03,0xed,0x00,0xfb,0x01,0x3e,0xe0,0x0c,0xb0,0x02,0xea,0x00 } },
+{ 16, 0x8440, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x94,0x00,0x87,0x00,0x21,0xc0 } },
+{ 16, 0x8450, 0, {0x28,0x60,0x02,0xd0,0x00,0x85,0x00,0x2d,0x80,0x48,0xf0,0x82,0x1c,0x00,0xb7,0x00 } },
+{ 16, 0x8460, 0, {0x2d,0x00,0x0b,0x50,0x02,0xdc,0x00,0xb7,0xa0,0x2f,0x80,0x28,0x7a,0x02,0xd2,0x04 } },
+{ 16, 0x8470, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc1,0x00,0xbe,0x00,0x87,0x80,0x21,0xe0 } },
+{ 16, 0x8480, 0, {0x28,0x68,0x02,0xd7,0x00,0x84,0x80,0x2d,0xe0,0x49,0x79,0x06,0x53,0x09,0xb5,0x80 } },
+{ 16, 0x8490, 0, {0x2d,0xe2,0x0b,0x78,0x02,0xde,0x80,0xb7,0x90,0x2d,0xb0,0x08,0x79,0x02,0xf0,0x00 } },
+{ 16, 0x84a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x10,0x83,0x01,0x28,0xc8 } },
+{ 16, 0x84b0, 0, {0x08,0x20,0x02,0xc2,0x06,0x81,0x00,0x2c,0xc8,0x88,0x30,0x62,0x0e,0x21,0xb3,0xa0 } },
+{ 16, 0x84c0, 0, {0x2c,0xc1,0x0b,0xb6,0x02,0xcc,0x00,0xb3,0x00,0x2c,0xe0,0x08,0x30,0x02,0xd2,0x04 } },
+{ 16, 0x84d0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xca,0x40,0xb0,0x80 } },
+{ 16, 0x84e0, 0, {0x0c,0x2c,0x02,0xf8,0x00,0xc6,0x20,0x3f,0x90,0x0d,0xa0,0x03,0x7b,0x01,0xee,0xe0 } },
+{ 16, 0x84f0, 0, {0x3f,0xb4,0x0f,0xec,0x03,0xe8,0x00,0xfa,0x00,0x3f,0xa0,0x0c,0xa0,0x03,0xfa,0x04 } },
+{ 16, 0x8500, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe3,0x00,0xf8,0x09,0x26,0x00 } },
+{ 16, 0x8510, 0, {0x0f,0xc1,0x83,0xe0,0x10,0xf8,0x40,0x3c,0x00,0x0f,0x80,0x03,0xe0,0x01,0xf8,0x00 } },
+{ 16, 0x8520, 0, {0x3e,0x00,0x0f,0x81,0x03,0xe0,0x04,0xf8,0x00,0x3e,0x10,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0x8530, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x02,0xc9,0x00,0x3e,0x40 } },
+{ 16, 0x8540, 0, {0x4f,0x90,0x63,0x26,0x84,0x39,0x02,0xb2,0x40,0x0c,0x91,0x03,0x24,0x00,0xf9,0x00 } },
+{ 16, 0x8550, 0, {0x3e,0x40,0x0f,0x90,0x03,0x24,0x00,0xf1,0x00,0x3a,0x44,0x0f,0x90,0x03,0xc2,0x04 } },
+{ 16, 0x8560, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x45,0x00,0x89,0x40,0x2e,0x40 } },
+{ 16, 0x8570, 0, {0x08,0x92,0x0a,0x24,0x00,0xb9,0x31,0x22,0x60,0x88,0x94,0x8a,0x24,0x20,0xb9,0x00 } },
+{ 16, 0x8580, 0, {0x2e,0x40,0x0b,0x90,0x02,0x24,0x00,0xb9,0x00,0x22,0x68,0x0b,0x90,0x02,0xe0,0x00 } },
+{ 16, 0x8590, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0xa0,0x8d,0x84,0x2f,0x40 } },
+{ 16, 0x85a0, 0, {0x0b,0xd1,0x02,0x24,0x00,0xb9,0x00,0x22,0x4a,0x08,0x10,0x02,0x2c,0x40,0xb9,0x00 } },
+{ 16, 0x85b0, 0, {0x2e,0x40,0x0b,0x90,0x02,0x24,0x00,0xb9,0x00,0x2a,0x40,0x0b,0x90,0x02,0xc6,0x00 } },
+{ 16, 0x85c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x14,0x00,0x85,0x80,0x2d,0x40 } },
+{ 16, 0x85d0, 0, {0x08,0x50,0x02,0x04,0x0c,0xb9,0x00,0xa0,0x50,0x08,0x14,0x22,0x04,0x00,0xb1,0x00 } },
+{ 16, 0x85e0, 0, {0x2c,0x40,0x0b,0x10,0x02,0x04,0x00,0xb1,0x28,0x20,0x4a,0x0b,0x13,0x02,0xc2,0x01 } },
+{ 16, 0x85f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xc0,0x50,0x3e,0x80 } },
+{ 16, 0x8600, 0, {0x0f,0xc0,0x43,0x20,0x00,0xf8,0x00,0x30,0x00,0x2c,0x80,0x23,0x20,0x00,0xf8,0x51 } },
+{ 16, 0x8610, 0, {0x3e,0x14,0x8f,0x85,0x0b,0x21,0x40,0xf8,0x70,0x3a,0x08,0x0f,0x84,0x83,0xee,0x03 } },
+{ 16, 0x8620, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xc4,0x00,0xf9,0x04,0x3e,0x40 } },
+{ 16, 0x8630, 0, {0x0f,0x90,0x23,0xd4,0x00,0xfd,0x00,0x3f,0x50,0x0f,0x94,0x03,0xf4,0x04,0xfd,0x00 } },
+{ 16, 0x8640, 0, {0x3f,0x41,0x8f,0xd0,0x43,0xe5,0x0c,0xf9,0x02,0x3f,0x4a,0x0f,0x92,0x03,0xe6,0x02 } },
+{ 16, 0x8650, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xd4,0x01,0xfd,0x00,0x3d,0x40 } },
+{ 16, 0x8660, 0, {0x0c,0xd0,0x13,0xf4,0x00,0xd5,0x00,0x33,0x6a,0x1c,0xdc,0x83,0x34,0x00,0xd1,0x04 } },
+{ 16, 0x8670, 0, {0x3e,0x50,0x0c,0x91,0x03,0xe6,0xc0,0xdd,0xb0,0x33,0x6a,0x2c,0x9c,0x83,0xe6,0x00 } },
+{ 16, 0x8680, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe0,0x09,0xf8,0x80,0x2e,0x00 } },
+{ 16, 0x8690, 0, {0x88,0x80,0x00,0xe8,0x00,0xba,0x00,0x22,0xb0,0x08,0x8e,0x02,0x28,0x00,0x88,0xa8 } },
+{ 16, 0x86a0, 0, {0x26,0x28,0x08,0x8a,0x22,0xe2,0x00,0x88,0xe4,0x22,0x30,0x08,0x8c,0x02,0xce,0x04 } },
+{ 16, 0x86b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0xb1,0x28,0x2e,0x40 } },
+{ 16, 0x86c0, 0, {0x08,0x10,0x02,0xc4,0x00,0x99,0x00,0x20,0x42,0x48,0x10,0x02,0x64,0x01,0x91,0x80 } },
+{ 16, 0x86d0, 0, {0x2c,0x48,0x08,0x10,0x02,0xc4,0xc0,0x81,0x40,0x20,0x4a,0x08,0x12,0x02,0xc2,0x01 } },
+{ 16, 0x86e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa4,0x94,0xa9,0x02,0x2e,0x40 } },
+{ 16, 0x86f0, 0, {0x0a,0x90,0x02,0x64,0x00,0xb9,0x00,0x82,0x60,0x08,0x90,0x02,0x66,0x00,0x89,0x10 } },
+{ 16, 0x8700, 0, {0x24,0x62,0x08,0x90,0x02,0xe4,0x00,0x89,0x02,0x22,0x40,0x18,0x90,0x02,0xc6,0x04 } },
+{ 16, 0x8710, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe6,0x00,0xb9,0x04,0x3e,0x40 } },
+{ 16, 0x8720, 0, {0x0c,0x90,0x13,0xe4,0x00,0xd1,0xc0,0x12,0x50,0x28,0x90,0x03,0x44,0x00,0xd9,0x00 } },
+{ 16, 0x8730, 0, {0x3e,0x40,0x28,0x92,0x03,0xe4,0x02,0xd9,0x00,0x32,0x42,0x8c,0x90,0x12,0xe8,0x04 } },
+{ 16, 0x8740, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa6,0x20,0xf9,0x00,0x3e,0x41 } },
+{ 16, 0x8750, 0, {0x2d,0x90,0x03,0xe4,0x00,0xf9,0x20,0x3e,0x40,0x4f,0x90,0x01,0xa4,0x00,0xf9,0x00 } },
+{ 16, 0x8760, 0, {0x36,0x40,0x8f,0x92,0x07,0xe4,0x00,0xf1,0x00,0xbe,0x40,0x0f,0x90,0x03,0xca,0x00 } },
+{ 16, 0x8770, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xc8,0x00,0x3e,0x20 } },
+{ 16, 0x8780, 0, {0x0c,0x80,0x03,0xe0,0x40,0xf8,0x00,0x36,0x12,0x2c,0x00,0x03,0xe0,0xc0,0xf8,0x00 } },
+{ 16, 0x8790, 0, {0x32,0x10,0x0d,0x84,0x03,0xa0,0x00,0xf8,0x02,0x3e,0x08,0x0f,0x80,0x00,0xca,0x04 } },
+{ 16, 0x87a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x3a,0x90,0x8e,0x00,0x2d,0xa0 } },
+{ 16, 0x87b0, 0, {0x80,0xe8,0x02,0xfa,0x00,0xbe,0x40,0x23,0x80,0x08,0xe8,0x02,0xfa,0x00,0x8a,0x00 } },
+{ 16, 0x87c0, 0, {0x36,0x80,0x08,0xa0,0x02,0xe8,0x00,0xba,0x00,0x2f,0x80,0x0b,0xa0,0x03,0x8a,0x00 } },
+{ 16, 0x87d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x46,0x02,0x83,0x00,0x2c,0x80 } },
+{ 16, 0x87e0, 0, {0x08,0x22,0x42,0xc6,0x80,0xb1,0x60,0x2e,0xf4,0x08,0x38,0x22,0xce,0x00,0xa3,0x00 } },
+{ 16, 0x87f0, 0, {0x20,0xc0,0x08,0x30,0x02,0xac,0x00,0xb1,0x00,0x2e,0x40,0x0b,0x30,0x02,0xca,0x00 } },
+{ 16, 0x8800, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1e,0x02,0x85,0x01,0x2d,0xc2 } },
+{ 16, 0x8810, 0, {0xa8,0x44,0x02,0xd4,0x00,0xbd,0x01,0x29,0x40,0x18,0x68,0xd2,0xdc,0x00,0x8f,0x80 } },
+{ 16, 0x8820, 0, {0x25,0xcc,0x28,0x73,0x42,0xdc,0x80,0xb5,0x30,0x2d,0xc0,0x1b,0x72,0x02,0xe8,0x00 } },
+{ 16, 0x8830, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x04,0xc6,0x82,0x3d,0xe0 } },
+{ 16, 0x8840, 0, {0x0c,0x48,0x12,0xd6,0x10,0xf5,0x80,0x3c,0xa0,0x0c,0x70,0x03,0xde,0x00,0xe7,0x90 } },
+{ 16, 0x8850, 0, {0x23,0xea,0x04,0x7a,0x03,0x9e,0x00,0xf5,0x80,0x3d,0xe0,0x0f,0x7a,0x03,0xea,0x02 } },
+{ 16, 0x8860, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x0d,0xac,0x00,0x9c,0x00,0x3e,0xc0 } },
+{ 16, 0x8870, 0, {0x0f,0x80,0x03,0xe4,0x10,0xf9,0x00,0x36,0x01,0x0f,0xa0,0x03,0xc0,0x00,0xeb,0x00 } },
+{ 16, 0x8880, 0, {0x3e,0xd8,0x4e,0xb0,0x83,0xec,0x00,0xf9,0x00,0x3e,0xc0,0x0f,0xb4,0x43,0x82,0x06 } },
+{ 16, 0x8890, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xde,0x00,0xcf,0x84,0x31,0xe0 } },
+{ 16, 0x88a0, 0, {0x0e,0xc8,0x43,0xd6,0x00,0xcd,0x80,0x33,0xe0,0xcd,0xd9,0x03,0x3a,0x00,0xff,0x88 } },
+{ 16, 0x88b0, 0, {0x33,0xe0,0x0f,0xf9,0x13,0xfe,0x24,0xfd,0x80,0x3f,0x20,0x0c,0xf6,0x83,0x10,0x00 } },
+{ 16, 0x88c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x00,0x85,0x00,0x21,0xc4 } },
+{ 16, 0x88d0, 0, {0x28,0x40,0x82,0xd0,0x00,0xd5,0x00,0x23,0x80,0x48,0xc9,0x02,0x1c,0x00,0xb7,0x00 } },
+{ 16, 0x88e0, 0, {0x21,0xc0,0x0b,0x71,0x02,0xde,0x80,0xb5,0x10,0x2d,0xc0,0x28,0xf0,0x02,0x2a,0x04 } },
+{ 16, 0x88f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x9c,0x00,0x96,0x00,0x21,0xc0 } },
+{ 16, 0x8900, 0, {0x0a,0x41,0x02,0xf5,0x40,0x8d,0x00,0x21,0x40,0x09,0x52,0x02,0x98,0x20,0xb7,0x00 } },
+{ 16, 0x8910, 0, {0x21,0xc0,0x0b,0x70,0x06,0xdc,0x80,0xb5,0x00,0x2d,0xc0,0x08,0x70,0x02,0x04,0x00 } },
+{ 16, 0x8920, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x14,0xcc,0x10,0x98,0x00,0x00,0xc0 } },
+{ 16, 0x8930, 0, {0x88,0x04,0x82,0xc0,0x00,0x91,0x04,0x20,0x03,0x09,0x00,0x02,0x8a,0x00,0xb3,0x0a } },
+{ 16, 0x8940, 0, {0x20,0xc4,0x8b,0x34,0x02,0xcc,0x00,0xb9,0x00,0x2c,0xc0,0x00,0x30,0x02,0x18,0x04 } },
+{ 16, 0x8950, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x15,0xac,0x00,0xdb,0x00,0xb0,0xc0 } },
+{ 16, 0x8960, 0, {0x0e,0x9c,0x02,0xc5,0x00,0xc1,0x10,0xb2,0xc0,0x0d,0xb0,0x0b,0xa7,0x08,0xff,0x00 } },
+{ 16, 0x8970, 0, {0xb3,0xc0,0x0f,0xfa,0x03,0xfc,0x00,0xfd,0x00,0x3e,0xd4,0x0c,0xf0,0x0b,0x2e,0x04 } },
+{ 16, 0x8980, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x04,0xed,0x00,0x3e,0x40 } },
+{ 16, 0x8990, 0, {0x0f,0x84,0x03,0xe5,0x40,0xf9,0x40,0x3e,0x60,0xce,0xb4,0x43,0x64,0x00,0xfb,0x80 } },
+{ 16, 0x89a0, 0, {0x3e,0xc2,0x0f,0xb0,0x13,0xec,0x00,0xf9,0x02,0x3e,0xc0,0x4f,0xb0,0x03,0xe1,0x00 } },
+{ 16, 0x89b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x10,0xff,0x00,0xce,0x00,0x33,0xc0 } },
+{ 16, 0x89c0, 0, {0x0e,0xc0,0x07,0x74,0x04,0xec,0x00,0x11,0x80,0x0c,0xca,0x03,0xfe,0x60,0xff,0x00 } },
+{ 16, 0x89d0, 0, {0x3f,0xc0,0x0f,0xf0,0x83,0x3c,0x00,0xdd,0x00,0xb3,0x50,0x2c,0xf0,0x03,0x20,0x04 } },
+{ 16, 0x89e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x4c,0x04,0x8b,0x0b,0x22,0x70 } },
+{ 16, 0x89f0, 0, {0x08,0x08,0x03,0x67,0x20,0x8a,0x88,0xa2,0x00,0x28,0x84,0x02,0xe7,0x00,0xbb,0x00 } },
+{ 16, 0x8a00, 0, {0x3e,0xc0,0x0b,0xb0,0x02,0x2c,0x00,0xb9,0x00,0x22,0x61,0x08,0xb0,0x03,0x60,0x40 } },
+{ 16, 0x8a10, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x8b,0x20,0x22,0xe2 } },
+{ 16, 0x8a20, 0, {0x0a,0x8c,0x02,0x26,0x00,0xa9,0x80,0x2a,0xc0,0x08,0xb4,0x42,0xed,0x00,0xbb,0x00 } },
+{ 16, 0x8a30, 0, {0x2e,0xc0,0x0b,0x30,0x02,0x2c,0x00,0xb9,0x00,0x20,0x80,0x08,0x30,0x02,0x60,0x00 } },
+{ 16, 0x8a40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0e,0x01,0x81,0x00,0xa0,0xc0 } },
+{ 16, 0x8a50, 0, {0x08,0x81,0x02,0x44,0x00,0x81,0x00,0x28,0x81,0x08,0x32,0x02,0xcc,0x00,0xb3,0x00 } },
+{ 16, 0x8a60, 0, {0x28,0xc0,0x0b,0x30,0x02,0x0c,0x80,0xb1,0x00,0x20,0xc0,0x08,0x30,0x12,0x42,0x01 } },
+{ 16, 0x8a70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0d,0x6c,0x00,0xc2,0x01,0x32,0xc0 } },
+{ 16, 0x8a80, 0, {0x2e,0x80,0x16,0x2c,0x08,0xe9,0x00,0x3a,0x40,0x0c,0x80,0x03,0xec,0x00,0xf7,0x00 } },
+{ 16, 0x8a90, 0, {0x2f,0xc0,0x0f,0xf0,0x0b,0x2c,0x00,0xd9,0x00,0x30,0x40,0x0c,0xf0,0x03,0x60,0x03 } },
+{ 16, 0x8aa0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x0d,0xf8,0x08,0xff,0x00,0x3f,0xc0 } },
+{ 16, 0x8ab0, 0, {0x0f,0xc2,0x17,0xfc,0x00,0xf7,0x00,0x37,0x00,0x0f,0x84,0x03,0xfc,0x00,0xff,0x00 } },
+{ 16, 0x8ac0, 0, {0x3f,0xc0,0x0f,0xf0,0x03,0xed,0x00,0xfd,0x00,0x3f,0x40,0x0f,0xf0,0x03,0xe8,0x06 } },
+{ 16, 0x8ad0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xcf,0x30,0x17,0x48 } },
+{ 16, 0x8ae0, 0, {0x0c,0x59,0x03,0xb9,0x00,0xdf,0x28,0x35,0x24,0x0d,0x82,0xa3,0x7c,0x80,0xff,0x00 } },
+{ 16, 0x8af0, 0, {0x3f,0xc8,0x0f,0xf2,0x03,0xe4,0xa0,0xef,0x80,0x3f,0xe1,0x8c,0xd8,0x43,0x30,0x00 } },
+{ 16, 0x8b00, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xed,0x48,0x89,0x34,0xa3,0x70 } },
+{ 16, 0x8b10, 0, {0x28,0xb0,0x23,0x60,0x00,0x8b,0xc0,0x22,0x40,0x08,0xb4,0x82,0x2f,0x40,0xbf,0xd1 } },
+{ 16, 0x8b20, 0, {0x6f,0xf4,0x8e,0xbd,0x02,0xe7,0x00,0xbb,0x80,0x3a,0xe0,0x08,0x98,0x0a,0x28,0x04 } },
+{ 16, 0x8b30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc4,0xb0,0x91,0x00,0xa8,0x50 } },
+{ 16, 0x8b40, 0, {0x08,0xb2,0x02,0xc8,0x84,0x93,0x00,0x24,0x49,0x0b,0x02,0x02,0x4c,0x00,0xb3,0x04 } },
+{ 16, 0x8b50, 0, {0x2c,0xc0,0x0b,0x30,0x42,0x84,0x00,0xb3,0x00,0x2e,0x00,0x0a,0xb0,0x12,0x22,0x01 } },
+{ 16, 0x8b60, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x11,0xac,0x02,0x99,0x18,0x2a,0x44 } },
+{ 16, 0x8b70, 0, {0x08,0xb8,0x82,0xa2,0x01,0xbb,0x00,0x28,0x60,0x0a,0xa0,0x12,0x6c,0x00,0xbb,0x00 } },
+{ 16, 0x8b80, 0, {0x6e,0xc0,0x0a,0xb0,0x02,0xe4,0x00,0xbb,0x00,0x2a,0x00,0x2a,0xb0,0x02,0x38,0x04 } },
+{ 16, 0x8b90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0xe4,0x08,0xda,0xc0,0x3a,0x60 } },
+{ 16, 0x8ba0, 0, {0x0c,0x18,0x0a,0xeb,0x04,0xdb,0x00,0x36,0xe0,0x07,0x85,0x83,0x6c,0x00,0xfb,0x00 } },
+{ 16, 0x8bb0, 0, {0x2e,0xc0,0x0f,0xb0,0x43,0xe4,0x00,0xeb,0x00,0x3e,0x88,0x0e,0x18,0x03,0x10,0x04 } },
+{ 16, 0x8bc0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x41,0x9c,0x10,0xe9,0x00,0x37,0x60 } },
+{ 16, 0x8bd0, 0, {0x87,0xf0,0x17,0x70,0x00,0xcf,0x01,0x37,0xc0,0x4c,0x98,0x03,0xbc,0x00,0xfb,0x00 } },
+{ 16, 0x8be0, 0, {0x3f,0xc2,0x0f,0xf0,0x03,0xe4,0x00,0xff,0x40,0x3f,0xe4,0x0d,0xd9,0x03,0xf0,0x00 } },
+{ 16, 0x8bf0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa4,0x00,0xf4,0x00,0x30,0x40 } },
+{ 16, 0x8c00, 0, {0x0f,0xb4,0x03,0x99,0x00,0xfb,0x00,0x3e,0xc0,0x0d,0x04,0x23,0x2c,0x08,0xfb,0x88 } },
+{ 16, 0x8c10, 0, {0x32,0xc0,0x0f,0xb0,0x03,0xe6,0x00,0xdb,0x10,0x3e,0x02,0x0f,0xb0,0x83,0xd0,0x04 } },
+{ 16, 0x8c20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2c,0x00,0xb9,0x50,0xa2,0x48 } },
+{ 16, 0x8c30, 0, {0x8b,0xb0,0x03,0x20,0x00,0xd7,0x80,0x2e,0xd8,0x00,0x80,0x02,0x3c,0x00,0xbf,0x80 } },
+{ 16, 0x8c40, 0, {0x23,0xe8,0x8b,0xf0,0x02,0xf4,0x40,0x8b,0x40,0x0c,0x42,0x03,0xb6,0x02,0xf2,0x00 } },
+{ 16, 0x8c50, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb2,0x44,0x00,0xc8 } },
+{ 16, 0x8c60, 0, {0x0b,0x30,0x12,0x8c,0x00,0xa3,0x80,0x24,0xc8,0x0b,0x00,0x0a,0xcc,0x00,0xb3,0x44 } },
+{ 16, 0x8c70, 0, {0x04,0xc0,0x1b,0x36,0x02,0xc5,0x01,0x83,0x0c,0x2c,0xa0,0x0b,0x30,0x02,0xf8,0x00 } },
+{ 16, 0x8c80, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1e,0x08,0xb7,0x90,0x21,0x64 } },
+{ 16, 0x8c90, 0, {0x0b,0xf8,0x02,0x4a,0x04,0x97,0x81,0x2f,0xe4,0x0a,0x78,0x02,0x9e,0x00,0xb7,0x80 } },
+{ 16, 0x8ca0, 0, {0x21,0xe0,0x8b,0x78,0x82,0xd6,0x86,0x87,0x84,0x2d,0xa0,0x0b,0x78,0x02,0xc0,0x00 } },
+{ 16, 0x8cb0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x04,0x00,0xf2,0x00,0x30,0xc0 } },
+{ 16, 0x8cc0, 0, {0x0f,0x30,0x03,0x8c,0x00,0xe3,0x0a,0x3c,0xc0,0x0f,0x18,0x03,0x8c,0x00,0xf3,0x02 } },
+{ 16, 0x8cd0, 0, {0x30,0xc0,0x1f,0x30,0x01,0xc6,0x80,0xc3,0x00,0x3c,0xc0,0x0f,0x12,0x03,0xda,0x02 } },
+{ 16, 0x8ce0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x0d,0xbc,0x00,0xff,0x00,0x3f,0x41 } },
+{ 16, 0x8cf0, 0, {0x0f,0xf0,0x03,0xb8,0x08,0xff,0x08,0x3f,0xc0,0x0d,0xf0,0x03,0x3c,0x20,0xff,0x08 } },
+{ 16, 0x8d00, 0, {0x3b,0xd2,0x0f,0xf0,0x03,0xf4,0x40,0xef,0x00,0x3f,0xc4,0x0f,0xd0,0x03,0xd0,0x06 } },
+{ 16, 0x8d10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x00,0xfe,0x00,0x32,0xc2 } },
+{ 16, 0x8d20, 0, {0x0c,0x30,0x0b,0x26,0x00,0xfb,0x80,0x36,0xc0,0x0d,0xa0,0x03,0xec,0x00,0xfb,0xe0 } },
+{ 16, 0x8d30, 0, {0x32,0xd0,0x0f,0xb8,0x43,0x64,0x44,0xdb,0x04,0x3e,0x80,0x0f,0xb0,0x03,0xe2,0x00 } },
+{ 16, 0x8d40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x00,0xb7,0x00,0xa1,0xc0 } },
+{ 16, 0x8d50, 0, {0x88,0x70,0x03,0x10,0x00,0xb7,0x20,0x21,0xc0,0x08,0x70,0x02,0xdc,0x80,0xb3,0x30 } },
+{ 16, 0x8d60, 0, {0x31,0xc8,0x0b,0x74,0x02,0x14,0x00,0x87,0x40,0x2d,0xc0,0x4b,0x70,0x02,0xd2,0x00 } },
+{ 16, 0x8d70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x96,0x20,0xb6,0x80,0x20,0xe0 } },
+{ 16, 0x8d80, 0, {0x28,0xf8,0x02,0x94,0x10,0xb7,0x81,0x27,0xe2,0x09,0x78,0x02,0xde,0x00,0xb7,0xa0 } },
+{ 16, 0x8d90, 0, {0xa9,0xe8,0x0b,0x38,0x02,0x76,0x00,0x87,0x80,0x2d,0xa0,0x0b,0x58,0x02,0xf0,0x00 } },
+{ 16, 0x8da0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xce,0x10,0xb3,0x00,0x20,0xc4 } },
+{ 16, 0x8db0, 0, {0x08,0x20,0x02,0x80,0x10,0xb3,0x00,0x22,0xc8,0x08,0xb0,0x02,0xcc,0x11,0xb3,0x02 } },
+{ 16, 0x8dc0, 0, {0x28,0xc0,0x0b,0x30,0x02,0x04,0x00,0x93,0x80,0x2c,0xd2,0x0b,0x10,0x02,0xd2,0x04 } },
+{ 16, 0x8dd0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfe,0x40,0x32,0xa0 } },
+{ 16, 0x8de0, 0, {0x0c,0xe4,0x03,0x98,0x80,0xfa,0x00,0x37,0xa0,0x0d,0xe0,0x83,0xe8,0x00,0xfe,0x00 } },
+{ 16, 0x8df0, 0, {0x3a,0x80,0x0b,0xa0,0x03,0x68,0x00,0xd8,0xa0,0x3f,0x90,0x0f,0xa0,0x03,0xfa,0x04 } },
+{ 16, 0x8e00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x08,0xf8,0x08,0x3e,0x00 } },
+{ 16, 0x8e10, 0, {0x0f,0x80,0x03,0x20,0x00,0xf8,0x40,0x3e,0x00,0x0f,0x80,0x03,0xe0,0x00,0xf8,0x04 } },
+{ 16, 0x8e20, 0, {0x30,0x10,0x0f,0x80,0x03,0xe0,0x02,0xe8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0x8e30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf1,0x00,0x32,0x40 } },
+{ 16, 0x8e40, 0, {0x0e,0x90,0x83,0xa4,0x00,0xc9,0x80,0x3e,0x40,0x0e,0x90,0x03,0xa4,0x00,0xf9,0x00 } },
+{ 16, 0x8e50, 0, {0x3e,0x40,0x0c,0x90,0x03,0xe4,0x00,0xc8,0x00,0x3e,0x40,0x8f,0x90,0x03,0x02,0x04 } },
+{ 16, 0x8e60, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0xb9,0x40,0xa0,0x62 } },
+{ 16, 0x8e70, 0, {0x08,0x10,0x02,0x24,0x10,0x89,0x00,0x2e,0x40,0x08,0x90,0x02,0x24,0x00,0xb9,0x00 } },
+{ 16, 0x8e80, 0, {0x2e,0x52,0x08,0x94,0x02,0xc4,0x00,0x89,0x40,0x2e,0x40,0x0b,0x10,0x03,0x60,0x10 } },
+{ 16, 0x8e90, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x18,0x22,0x44 } },
+{ 16, 0x8ea0, 0, {0x0a,0x90,0x02,0xac,0x00,0x89,0x10,0x2e,0xc0,0x0a,0x90,0x02,0xa4,0x00,0xb9,0x80 } },
+{ 16, 0x8eb0, 0, {0x2e,0x60,0x08,0x98,0x02,0xe6,0x02,0x89,0x08,0x2e,0x40,0x0b,0x90,0x02,0x06,0x00 } },
+{ 16, 0x8ec0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x80,0xb1,0x20,0xa0,0x48 } },
+{ 16, 0x8ed0, 0, {0x08,0x90,0x02,0x24,0x08,0x81,0x23,0x2c,0x50,0x08,0x10,0x02,0x04,0x80,0xb1,0x20 } },
+{ 16, 0x8ee0, 0, {0x2c,0x48,0x28,0x12,0x02,0xe4,0x80,0x81,0x20,0x2c,0x40,0x0b,0x98,0x02,0x42,0x05 } },
+{ 16, 0x8ef0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xf8,0x50,0x32,0x00 } },
+{ 16, 0x8f00, 0, {0x0e,0x85,0x03,0xa1,0xe0,0xca,0x00,0x3e,0x00,0x0e,0x85,0x03,0xa0,0x00,0xf8,0x00 } },
+{ 16, 0x8f10, 0, {0x2e,0x00,0x9c,0xa0,0x03,0xe0,0x00,0xc8,0x28,0x3e,0x00,0x0f,0x80,0x03,0x2e,0x01 } },
+{ 16, 0x8f20, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xf4,0x40,0xf5,0x10,0x3f,0x44 } },
+{ 16, 0x8f30, 0, {0x0f,0xd0,0x03,0xf4,0x00,0xf1,0x10,0x3d,0x40,0x8f,0xd4,0x03,0xe4,0x50,0xf9,0x10 } },
+{ 16, 0x8f40, 0, {0x3e,0x45,0x0f,0x91,0x03,0xd4,0x40,0xfc,0x00,0x3f,0xc0,0x8f,0xd0,0x23,0xe6,0x04 } },
+{ 16, 0x8f50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0x20,0xcd,0xa8,0x33,0x40 } },
+{ 16, 0x8f60, 0, {0x8d,0xd0,0x03,0x26,0x80,0xcd,0x00,0x3d,0x50,0x0c,0x9a,0x03,0x64,0x00,0xf9,0xa0 } },
+{ 16, 0x8f70, 0, {0x7a,0x6a,0x0f,0x9a,0x63,0xe6,0x80,0xc9,0x80,0x3e,0x40,0x0f,0x90,0x03,0x06,0x00 } },
+{ 16, 0x8f80, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe1,0x00,0x88,0xe0,0x36,0x00 } },
+{ 16, 0x8f90, 0, {0x08,0x80,0x0a,0x21,0x42,0xc8,0x00,0x2e,0x29,0x0c,0xa4,0x42,0x20,0x00,0xb8,0x40 } },
+{ 16, 0x8fa0, 0, {0x2e,0x00,0x0b,0x81,0x02,0xe1,0x00,0x88,0x02,0x3a,0x01,0x0b,0xc0,0x02,0x0e,0x04 } },
+{ 16, 0x8fb0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x02,0x81,0x08,0x24,0x40 } },
+{ 16, 0x8fc0, 0, {0x09,0x10,0x02,0x04,0x00,0x91,0x00,0x2c,0x40,0x4b,0x14,0x02,0x44,0x00,0xb5,0x10 } },
+{ 16, 0x8fd0, 0, {0x29,0x40,0x0b,0x50,0x02,0xf5,0x00,0xb5,0x00,0x2d,0x40,0x0b,0xd0,0x02,0x02,0x01 } },
+{ 16, 0x8fe0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xa6,0x01,0x89,0x00,0x26,0x40 } },
+{ 16, 0x8ff0, 0, {0x08,0x94,0x02,0x24,0x01,0x89,0x00,0x2e,0x40,0x1a,0x90,0x02,0x6c,0x00,0xbf,0x02 } },
+{ 16, 0x9000, 0, {0x2f,0x40,0x0b,0xd0,0x02,0xf4,0x02,0xbd,0x80,0x2b,0x40,0x8b,0xd8,0x3a,0x06,0x04 } },
+{ 16, 0x9010, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xc9,0x05,0x36,0x41 } },
+{ 16, 0x9020, 0, {0x0d,0x1c,0x03,0x24,0x00,0xd9,0x00,0x3e,0x42,0x2f,0x94,0x03,0x64,0x00,0xf9,0x00 } },
+{ 16, 0x9030, 0, {0x3a,0x40,0x0f,0x90,0x03,0xc4,0x00,0xf9,0x00,0x3e,0x70,0x0f,0x10,0x03,0x28,0x04 } },
+{ 16, 0x9040, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0x84,0x08,0xf9,0x24,0x3e,0x40 } },
+{ 16, 0x9050, 0, {0x0f,0x91,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x41,0x0d,0x10,0x03,0xa4,0x00,0xf9,0x00 } },
+{ 16, 0x9060, 0, {0x3e,0x40,0x0f,0x90,0x03,0xe4,0x00,0xc9,0x00,0x3e,0x64,0x0f,0x90,0x03,0xca,0x00 } },
+{ 16, 0x9070, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x08,0xc8,0x80,0x32,0x02 } },
+{ 16, 0x9080, 0, {0x0f,0x80,0x03,0x00,0x00,0xc8,0x08,0x3a,0x10,0xce,0x84,0x03,0xe0,0x00,0xfc,0x00 } },
+{ 16, 0x9090, 0, {0x3f,0x00,0x8f,0xc0,0x03,0xf0,0x80,0xfc,0x00,0x3f,0x18,0x0f,0xc0,0x43,0xca,0x04 } },
+{ 16, 0x90a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0x8e,0x00,0xa1,0x80 } },
+{ 16, 0x90b0, 0, {0x0b,0xe0,0x02,0x28,0x00,0xde,0xc2,0x23,0x90,0x00,0xa0,0x02,0xe8,0x00,0xba,0x00 } },
+{ 16, 0x90c0, 0, {0x2e,0x80,0x0b,0xa0,0x02,0xe8,0x00,0xfa,0x00,0x2e,0x80,0x0b,0xa0,0x02,0xca,0x00 } },
+{ 16, 0x90d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x99,0x81,0x60,0xc0 } },
+{ 16, 0x90e0, 0, {0x0b,0x10,0x02,0x0c,0x00,0x90,0x10,0x2a,0xfc,0x0b,0x30,0x02,0xcc,0x00,0xb3,0x00 } },
+{ 16, 0x90f0, 0, {0x2c,0xc0,0x0b,0x30,0x02,0xcc,0x00,0xb3,0x00,0x2c,0xc0,0x0b,0x30,0x02,0xca,0x00 } },
+{ 16, 0x9100, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1c,0x82,0x95,0x40,0x21,0xc0 } },
+{ 16, 0x9110, 0, {0x0b,0x50,0x02,0x1c,0x80,0x90,0x80,0x23,0x01,0x09,0x72,0x12,0xdc,0x00,0xb6,0x00 } },
+{ 16, 0x9120, 0, {0x2d,0x00,0x0b,0x40,0x02,0xd0,0x00,0xb4,0x09,0x2d,0x00,0x4b,0x40,0x82,0xe8,0x00 } },
+{ 16, 0x9130, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3e,0x80,0xdd,0x80,0xb1,0xe0 } },
+{ 16, 0x9140, 0, {0x0f,0xda,0x03,0x0f,0x80,0xd4,0x80,0x39,0xe0,0x0b,0x7a,0x03,0xde,0x00,0xf5,0x80 } },
+{ 16, 0x9150, 0, {0x3d,0x20,0x0f,0x48,0x03,0xd6,0x10,0xf6,0x81,0x3d,0xe0,0x8f,0x68,0x03,0xea,0x02 } },
+{ 16, 0x9160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x00,0xed,0x00,0x3e,0x00 } },
+{ 16, 0x9170, 0, {0x0f,0x91,0x0b,0xec,0x10,0xf8,0x00,0x3e,0x00,0x0e,0xb0,0x03,0xec,0x00,0xf8,0x00 } },
+{ 16, 0x9180, 0, {0x3e,0xc0,0x4f,0xb0,0x03,0xe8,0x00,0xe9,0x01,0x3e,0x00,0x0f,0x90,0x03,0xc2,0x06 } },
+{ 16, 0x9190, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x20,0xbf,0x81,0x33,0xa4 } },
+{ 16, 0x91a0, 0, {0x8c,0x19,0x03,0x3e,0x00,0xcd,0x80,0x3f,0xe0,0x0f,0xf8,0x83,0x3e,0x00,0xef,0x80 } },
+{ 16, 0x91b0, 0, {0x3f,0xe0,0x0f,0xf9,0x13,0xfa,0x10,0xfd,0x80,0x3f,0xa4,0x0f,0xd8,0x03,0xc0,0x00 } },
+{ 16, 0x91c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x00,0xbf,0x20,0x31,0xc2 } },
+{ 16, 0x91d0, 0, {0x08,0x5a,0x02,0x3c,0x02,0x87,0x00,0x2d,0x94,0x0b,0x70,0x0a,0x1c,0x40,0x86,0x10 } },
+{ 16, 0x91e0, 0, {0x2d,0x00,0x0b,0x40,0x02,0xd4,0x00,0xf6,0x00,0x2d,0x40,0x4b,0x60,0x02,0xea,0x04 } },
+{ 16, 0x91f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xb7,0x01,0x23,0x80 } },
+{ 16, 0x9200, 0, {0x28,0x50,0x02,0x1c,0x00,0x84,0x00,0x2d,0xc0,0x0b,0x30,0x02,0x1c,0x00,0xb5,0x00 } },
+{ 16, 0x9210, 0, {0x2d,0x00,0x0b,0x40,0x06,0xd0,0x40,0xb4,0x08,0x2d,0x80,0x0b,0x48,0x02,0xc0,0x00 } },
+{ 16, 0x9220, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcc,0x00,0xb3,0x08,0xa0,0x20 } },
+{ 16, 0x9230, 0, {0x08,0x11,0x8a,0x0e,0x00,0x80,0x00,0x2c,0x90,0x0b,0x37,0x02,0x0c,0x00,0x90,0x00 } },
+{ 16, 0x9240, 0, {0x2c,0xc0,0x0b,0x30,0x42,0xcc,0x04,0xa3,0x80,0x2c,0x50,0x0b,0x30,0x02,0xc8,0x04 } },
+{ 16, 0x9250, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xf9,0x80,0x32,0x60 } },
+{ 16, 0x9260, 0, {0x0c,0xd4,0x03,0x3c,0x80,0x88,0x00,0x3e,0xd0,0x0f,0xf8,0x03,0x28,0x00,0xfa,0x00 } },
+{ 16, 0x9270, 0, {0x3e,0xc0,0x0f,0xb0,0x07,0xec,0x01,0xbb,0x80,0x3e,0x54,0x0f,0xb0,0x06,0xea,0x04 } },
+{ 16, 0x9280, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xee,0x08,0xf9,0x80,0x3a,0xc0 } },
+{ 16, 0x9290, 0, {0x0f,0x90,0x03,0xec,0x00,0xf8,0x40,0x3e,0x58,0x0f,0xb0,0x43,0xe9,0x00,0xeb,0x44 } },
+{ 16, 0x92a0, 0, {0x3e,0x00,0x0f,0x80,0x03,0xe0,0x0d,0xf8,0x00,0x3e,0x80,0x0f,0x80,0x03,0xe0,0x00 } },
+{ 16, 0x92b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x00,0xcf,0x00,0x33,0x40 } },
+{ 16, 0x92c0, 0, {0x0c,0xd0,0x03,0x3c,0x30,0xcc,0x00,0x3b,0xc0,0x2d,0xf0,0x03,0xd8,0x02,0xcc,0x00 } },
+{ 16, 0x92d0, 0, {0x3d,0x00,0x0c,0xc0,0x03,0xf4,0x00,0xee,0x02,0x37,0x40,0x0c,0xe0,0x03,0xc0,0x44 } },
+{ 16, 0x92e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6c,0x18,0x83,0x84,0x20,0x00 } },
+{ 16, 0x92f0, 0, {0x4a,0x10,0x02,0x0c,0x00,0xa8,0x48,0x2e,0x60,0x08,0xb0,0x02,0xe9,0x00,0x89,0x40 } },
+{ 16, 0x9300, 0, {0x2e,0xc0,0x08,0xb0,0x02,0xe8,0x10,0xb1,0x01,0x20,0x80,0x0a,0x90,0x03,0xa0,0x40 } },
+{ 16, 0x9310, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x8b,0x82,0x22,0x08 } },
+{ 16, 0x9320, 0, {0x08,0x90,0x02,0x2c,0x14,0x88,0x04,0x2c,0x08,0x08,0xb0,0x12,0xe8,0x00,0x8a,0x00 } },
+{ 16, 0x9330, 0, {0x2e,0xc0,0x0a,0xb0,0x02,0xe8,0x01,0xb9,0x00,0x26,0x04,0x08,0x90,0x02,0xe0,0x00 } },
+{ 16, 0x9340, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x00,0x83,0x80,0xa2,0xc0 } },
+{ 16, 0x9350, 0, {0x0a,0x92,0x02,0x2c,0x00,0xa2,0x00,0x2c,0x00,0x08,0x34,0x02,0xc8,0x00,0x83,0x00 } },
+{ 16, 0x9360, 0, {0x2c,0x00,0x28,0x00,0x02,0xc4,0x01,0xba,0x00,0x22,0xc0,0x02,0x20,0x06,0xc2,0x01 } },
+{ 16, 0x9370, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xca,0x00,0xb2,0x00 } },
+{ 16, 0x9380, 0, {0x0c,0x92,0x0b,0x2c,0x04,0xc8,0x04,0x3a,0x00,0x0c,0xb4,0x03,0xe8,0x00,0xc8,0x00 } },
+{ 16, 0x9390, 0, {0x2e,0x00,0x0c,0x80,0x33,0xe1,0x40,0xe8,0x00,0x36,0x00,0x0c,0x80,0x03,0xc0,0x03 } },
+{ 16, 0x93a0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xfc,0x00,0xff,0x00,0x3d,0x00 } },
+{ 16, 0x93b0, 0, {0x0f,0xd1,0x0b,0xfc,0x01,0xfc,0x00,0x3f,0x00,0x0f,0xf0,0x03,0xd8,0x00,0xfd,0x00 } },
+{ 16, 0x93c0, 0, {0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x80,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x07,0xa8,0x06 } },
+{ 16, 0x93d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xf3,0x00,0xcf,0x80,0x35,0x60 } },
+{ 16, 0x93e0, 0, {0x4e,0x68,0x43,0x5c,0x00,0xe7,0x80,0x39,0xc0,0x0c,0xc1,0x03,0x7e,0x00,0xcf,0x34 } },
+{ 16, 0x93f0, 0, {0x35,0xe1,0x4d,0xf2,0x03,0x7c,0x00,0xdf,0x38,0x3f,0xc8,0x0f,0xf8,0x03,0xf0,0x00 } },
+{ 16, 0x9400, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x18,0xc8,0x00,0xdb,0x84,0x22,0x60 } },
+{ 16, 0x9410, 0, {0x08,0xac,0x0a,0x2c,0x00,0x8b,0x80,0x22,0x30,0x08,0x91,0x22,0x2c,0x90,0x27,0x61 } },
+{ 16, 0x9420, 0, {0x22,0xca,0x88,0xfc,0x22,0xbf,0x00,0x8b,0x62,0x2f,0xd0,0x09,0xb8,0x03,0xb0,0x04 } },
+{ 16, 0x9430, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0xe2,0x80,0xa9,0x02,0x24,0x40 } },
+{ 16, 0x9440, 0, {0x82,0x34,0x42,0x04,0x00,0xa9,0x00,0x28,0xc5,0x48,0x32,0x02,0x4c,0x20,0x83,0x30 } },
+{ 16, 0x9450, 0, {0x20,0xc0,0x08,0x31,0x02,0x0d,0x00,0xb3,0x20,0x2c,0xc4,0x0b,0x30,0x02,0xf2,0x01 } },
+{ 16, 0x9460, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xaa,0x02,0xb9,0x04,0x22,0x60 } },
+{ 16, 0x9470, 0, {0x28,0xb2,0x02,0x26,0x00,0x89,0x88,0x02,0xc0,0x08,0x31,0x12,0xec,0x00,0x8b,0x00 } },
+{ 16, 0x9480, 0, {0x2a,0xd0,0x08,0xb0,0x02,0xac,0x00,0x2b,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0xb0,0x04 } },
+{ 16, 0x9490, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xe2,0x00,0xe3,0x00,0x36,0x20 } },
+{ 16, 0x94a0, 0, {0x0e,0xa4,0x63,0x6e,0x00,0xe1,0xc0,0x1a,0xc1,0x0c,0x80,0x03,0x68,0x70,0xcb,0x00 } },
+{ 16, 0x94b0, 0, {0x36,0x80,0x0d,0xb0,0x03,0x4c,0x00,0xfb,0x04,0x3e,0xc1,0x0f,0xb0,0x03,0xd0,0x04 } },
+{ 16, 0x94c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb8,0x04,0xdf,0x00,0x3f,0x00 } },
+{ 16, 0x94d0, 0, {0x0f,0xe8,0x03,0xfc,0x00,0xfd,0x00,0x3f,0x00,0x2b,0x98,0x03,0x3a,0x00,0x77,0x00 } },
+{ 16, 0x94e0, 0, {0x27,0xe4,0x0f,0xf0,0x03,0xfc,0x00,0xdf,0x00,0x3e,0xc0,0x0d,0xf0,0x43,0xf8,0x00 } },
+{ 16, 0x94f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0xa4,0x68,0xcb,0x20,0x3a,0x90 } },
+{ 16, 0x9500, 0, {0x0f,0x24,0xa3,0xac,0x00,0xe9,0x50,0x3a,0xc0,0x0e,0xb4,0x83,0x2c,0x08,0xeb,0x00 } },
+{ 16, 0x9510, 0, {0x3a,0x90,0x0e,0xb0,0x8b,0xec,0x80,0xfb,0x00,0x3e,0xc0,0x0e,0xb0,0x03,0x90,0x04 } },
+{ 16, 0x9520, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x01,0x0a,0x00,0x8b,0xa0,0x20,0x80 } },
+{ 16, 0x9530, 0, {0x0d,0xa8,0x02,0x2c,0x04,0x89,0x40,0x28,0xe8,0x08,0xb2,0x02,0x2c,0x00,0xaf,0x00 } },
+{ 16, 0x9540, 0, {0x02,0x80,0x08,0x7c,0x03,0x3d,0x80,0x3f,0x00,0x2f,0xc0,0x08,0xb0,0x02,0x36,0x00 } },
+{ 16, 0x9550, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x49,0x00,0x03,0x40,0x28,0xc0 } },
+{ 16, 0x9560, 0, {0x2b,0x28,0x4a,0x28,0x00,0xa1,0x00,0x68,0xd2,0x0a,0x20,0x42,0xa4,0x01,0xa3,0x00 } },
+{ 16, 0x9570, 0, {0x02,0x40,0x0a,0x34,0x02,0x0d,0x00,0x33,0x00,0x2c,0xc0,0x0a,0x30,0x00,0xb8,0x00 } },
+{ 16, 0x9580, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x01,0x1a,0x00,0x87,0x90,0x21,0xe4 } },
+{ 16, 0x9590, 0, {0x2b,0xc8,0x12,0x3a,0x00,0x85,0xc0,0x2b,0x21,0x28,0x68,0x02,0xb6,0x00,0xa7,0x84 } },
+{ 16, 0x95a0, 0, {0x23,0x60,0x08,0x38,0x80,0x1e,0x00,0xb7,0x80,0x2d,0xe0,0x08,0x78,0x02,0x2e,0x00 } },
+{ 16, 0x95b0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x08,0x00,0xc1,0x00,0x38,0x54 } },
+{ 16, 0x95c0, 0, {0x0f,0x26,0x83,0x80,0x00,0xe0,0x34,0x28,0xc8,0x0e,0x2c,0x0b,0x8c,0x00,0xe3,0x00 } },
+{ 16, 0x95d0, 0, {0x78,0x45,0x0e,0x30,0x03,0x8e,0x80,0xf3,0x00,0x3c,0xc8,0x0e,0x30,0x03,0x92,0x02 } },
+{ 16, 0x95e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xb8,0x00,0xf5,0x02,0x3f,0x44 } },
+{ 16, 0x95f0, 0, {0x0d,0x90,0x03,0xf8,0x00,0xbd,0x14,0x1f,0xc0,0x0f,0xe1,0x23,0x5c,0x44,0x9f,0x42 } },
+{ 16, 0x9600, 0, {0x3f,0xc0,0x0f,0xf4,0x82,0x7d,0x40,0xff,0x10,0x3f,0xc0,0x4f,0x70,0x07,0xd0,0x06 } },
+{ 16, 0x9610, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe8,0x02,0xcb,0x00,0x38,0xc0 } },
+{ 16, 0x9620, 0, {0x3c,0xa0,0x03,0xec,0x00,0xe9,0x00,0x3e,0xc0,0x0c,0xb0,0x03,0x20,0x04,0xfb,0x21 } },
+{ 16, 0x9630, 0, {0x3e,0x80,0x4f,0xb4,0x03,0xcf,0x00,0xcb,0x00,0x3e,0xcc,0x4f,0xb0,0x43,0xea,0x00 } },
+{ 16, 0x9640, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x91,0x98,0x00,0x87,0x00,0x21,0xc0 } },
+{ 16, 0x9650, 0, {0x08,0x40,0x02,0xdc,0x04,0xb5,0x00,0x2d,0x00,0x2d,0x70,0x02,0x1c,0x1c,0xb7,0x02 } },
+{ 16, 0x9660, 0, {0x2d,0xc0,0x0b,0x72,0x02,0xdc,0x00,0x87,0x40,0x2d,0xca,0x8b,0x70,0x02,0xf2,0x04 } },
+{ 16, 0x9670, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xba,0x00,0x87,0x88,0x2b,0xe0 } },
+{ 16, 0x9680, 0, {0x18,0x78,0x22,0xd6,0x11,0xa4,0x82,0x2f,0xe0,0x08,0x78,0x02,0x12,0x00,0xb7,0x94 } },
+{ 16, 0x9690, 0, {0x6d,0x60,0x4b,0x7a,0x02,0xde,0x40,0xb7,0xa0,0x2d,0xe0,0x0b,0x78,0x06,0xe0,0x00 } },
+{ 16, 0x96a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xc9,0x12,0x83,0x82,0x28,0xd4 } },
+{ 16, 0x96b0, 0, {0x98,0x00,0x06,0xef,0x05,0xb1,0x90,0x2c,0xc1,0x09,0xb4,0x02,0x0c,0x04,0xb3,0x01 } },
+{ 16, 0x96c0, 0, {0x6c,0xf0,0x0b,0x30,0x02,0xcc,0x00,0xbb,0x00,0x2e,0xc0,0x0b,0x30,0x02,0xd2,0x04 } },
+{ 16, 0x96d0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x40,0xca,0x80,0x3b,0xa0 } },
+{ 16, 0x96e0, 0, {0x4c,0xe5,0x02,0xf8,0x80,0xee,0x00,0x3d,0x80,0x2c,0xe0,0x0f,0x38,0x80,0xfa,0x00 } },
+{ 16, 0x96f0, 0, {0x3f,0xa9,0x0f,0xa0,0x03,0xe8,0x00,0xba,0x02,0x3e,0x80,0x8b,0xa0,0x03,0xfa,0x04 } },
+{ 16, 0x9700, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x10,0xf8,0x00,0x26,0x02 } },
+{ 16, 0x9710, 0, {0x0f,0x84,0x03,0xe0,0x24,0xf8,0x00,0x3e,0x00,0x4f,0x80,0xa3,0xe0,0x30,0xf8,0x00 } },
+{ 16, 0x9720, 0, {0x36,0x02,0x0f,0x80,0x23,0xe0,0x04,0x08,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0x9730, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xd9,0x00,0xb6,0x41 } },
+{ 16, 0x9740, 0, {0x4e,0x99,0x0b,0xa4,0x00,0x69,0x10,0x3e,0x40,0x0c,0x90,0x03,0xa4,0x10,0xc9,0x00 } },
+{ 16, 0x9750, 0, {0x3e,0x40,0x0d,0x92,0x03,0xe6,0x00,0xf9,0x00,0x3a,0x40,0x0e,0x90,0x03,0xc2,0x04 } },
+{ 16, 0x9760, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0x81,0x00,0x20,0x42 } },
+{ 16, 0x9770, 0, {0x08,0x14,0x9a,0x24,0x00,0x89,0x00,0x6e,0x50,0x00,0x90,0x02,0x24,0x10,0xd9,0x02 } },
+{ 16, 0x9780, 0, {0x6e,0x40,0x0b,0x94,0x03,0xa7,0x00,0xb9,0x00,0x22,0x40,0x08,0x90,0x03,0xe0,0x00 } },
+{ 16, 0x9790, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x06,0x00,0x99,0x00,0xa6,0x41 } },
+{ 16, 0x97a0, 0, {0x0a,0x90,0x06,0x2c,0x00,0xa9,0x09,0x6e,0x50,0x08,0x91,0x02,0x84,0x04,0x89,0x00 } },
+{ 16, 0x97b0, 0, {0x0e,0x40,0x0b,0x94,0x02,0xe5,0x49,0xb9,0x00,0x0a,0x40,0x0a,0x90,0x02,0xc6,0x00 } },
+{ 16, 0x97c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x06,0x00,0x81,0x00,0x22,0x40 } },
+{ 16, 0x97d0, 0, {0x08,0x12,0x22,0x04,0x81,0xa1,0x00,0x2c,0x40,0x08,0x16,0x02,0x04,0x00,0x91,0x20 } },
+{ 16, 0x97e0, 0, {0x2c,0x40,0x0b,0x12,0x42,0x84,0x89,0xb1,0x20,0x20,0x48,0x08,0x10,0x02,0xc2,0x01 } },
+{ 16, 0x97f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xd8,0x00,0x36,0x00 } },
+{ 16, 0x9800, 0, {0x0a,0x80,0x03,0xa1,0x40,0xe8,0x00,0x2e,0x00,0x0c,0x00,0x23,0xa1,0x40,0xc8,0x50 } },
+{ 16, 0x9810, 0, {0x2e,0x14,0x0d,0x80,0x03,0xe0,0x00,0xf8,0x50,0x3a,0x00,0x0e,0x80,0x03,0xee,0x03 } },
+{ 16, 0x9820, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x1d,0xd4,0x00,0xf5,0x00,0xbf,0x40 } },
+{ 16, 0x9830, 0, {0x0f,0xd1,0x03,0xf4,0x44,0xdd,0x02,0x3d,0x50,0x2b,0xd1,0x23,0xf4,0x00,0xf9,0x10 } },
+{ 16, 0x9840, 0, {0x3f,0x40,0x0d,0x91,0x03,0xa4,0x48,0xf9,0x12,0x3e,0x4e,0x1f,0x90,0x03,0xa6,0x02 } },
+{ 16, 0x9850, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xf4,0x00,0xc5,0x04,0x3b,0x40 } },
+{ 16, 0x9860, 0, {0x0f,0xd8,0x03,0xa7,0x80,0xfd,0x00,0xb3,0x68,0x0d,0xd8,0x43,0xa5,0x10,0xc9,0xa0 } },
+{ 16, 0x9870, 0, {0x32,0x51,0x4f,0x5a,0x43,0x36,0x00,0xc9,0xa0,0x7a,0x68,0x0b,0xd0,0x03,0xc6,0x01 } },
+{ 16, 0x9880, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x18,0xca,0x88,0x88,0x02,0x02,0x00 } },
+{ 16, 0x9890, 0, {0x8d,0x84,0x22,0x23,0x42,0xf8,0x00,0x22,0x04,0x28,0x8a,0xa2,0xaa,0x94,0x88,0xe9 } },
+{ 16, 0x98a0, 0, {0x20,0xa8,0x0a,0x80,0x0a,0x21,0x40,0x80,0xe2,0x2e,0x28,0x0b,0x80,0x02,0xce,0x04 } },
+{ 16, 0x98b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc4,0x20,0xa1,0x04,0xa8,0xc0 } },
+{ 16, 0x98c0, 0, {0x0b,0x1c,0x2a,0x24,0x00,0x39,0x04,0x20,0x40,0x2a,0x1e,0x02,0xe4,0x80,0xb1,0x10 } },
+{ 16, 0x98d0, 0, {0x2a,0x48,0x09,0x14,0x46,0x04,0x00,0x81,0x38,0x2c,0x5b,0x0b,0x10,0x02,0xd2,0x00 } },
+{ 16, 0x98e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xa4,0x12,0xa9,0x24,0x22,0x40 } },
+{ 16, 0x98f0, 0, {0x29,0x90,0x02,0x24,0x00,0x39,0x00,0x02,0x58,0x08,0x18,0x10,0xe6,0x01,0xb9,0x00 } },
+{ 16, 0x9900, 0, {0xaa,0x44,0x08,0x90,0x02,0x24,0x00,0x89,0x00,0x0e,0x41,0x0b,0x90,0x02,0xc6,0x04 } },
+{ 16, 0x9910, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe4,0x00,0xe1,0x01,0x2a,0x64 } },
+{ 16, 0x9920, 0, {0x2f,0x94,0x13,0x24,0x02,0x71,0x60,0x12,0x60,0x4d,0x90,0x00,0xc5,0x02,0xf9,0x00 } },
+{ 16, 0x9930, 0, {0x3a,0x40,0x0f,0x90,0x23,0x24,0x02,0xc9,0x02,0x3a,0x40,0x0f,0x90,0x02,0xe8,0x04 } },
+{ 16, 0x9940, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x01,0xa4,0x00,0xd9,0x00,0x3e,0x60 } },
+{ 16, 0x9950, 0, {0xaf,0x90,0x83,0x64,0x88,0xf9,0x20,0x3e,0x62,0x03,0x90,0x83,0xa4,0x00,0xc9,0x00 } },
+{ 16, 0x9960, 0, {0x36,0x60,0x0f,0x10,0x03,0xc4,0x00,0xf9,0x00,0x7e,0x40,0x0f,0x90,0x03,0xda,0x00 } },
+{ 16, 0x9970, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa1,0x00,0xc8,0x82,0x32,0x00 } },
+{ 16, 0x9980, 0, {0x6f,0x00,0x03,0xa0,0x00,0xd8,0x40,0x30,0x00,0x0e,0x80,0x03,0x60,0x04,0xf8,0x01 } },
+{ 16, 0x9990, 0, {0x3e,0x10,0x4f,0x80,0x8b,0x22,0x00,0xf8,0x00,0x32,0x01,0x0e,0x80,0x03,0xca,0x04 } },
+{ 16, 0x99a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0x38,0x00,0x0e,0x00,0xa9,0x90 } },
+{ 16, 0x99b0, 0, {0x2f,0xe6,0x20,0x88,0x00,0x9e,0x80,0x23,0x80,0x0a,0xe8,0x03,0x28,0x00,0xba,0x00 } },
+{ 16, 0x99c0, 0, {0x18,0x80,0x0d,0xec,0x02,0x38,0x80,0xba,0x00,0xa2,0x80,0x08,0xa0,0x03,0x8a,0x00 } },
+{ 16, 0x99d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x6c,0x02,0x83,0x80,0x20,0xc8 } },
+{ 16, 0x99e0, 0, {0x0b,0x20,0x02,0x0c,0x01,0x92,0x10,0x68,0xc0,0x3a,0x3c,0x02,0xcc,0x10,0x3b,0x02 } },
+{ 16, 0x99f0, 0, {0x0c,0xc0,0x28,0x3c,0x02,0x4e,0x00,0xb3,0x00,0x28,0xc0,0x28,0x30,0x02,0xca,0x00 } },
+{ 16, 0x9a00, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x14,0x00,0x87,0x42,0x2b,0xc0 } },
+{ 16, 0x9a10, 0, {0x29,0x70,0x22,0x9c,0x00,0xb6,0x00,0x2b,0xc2,0x0a,0x60,0x86,0x1c,0x00,0xb7,0x21 } },
+{ 16, 0x9a20, 0, {0x29,0xc0,0x00,0x74,0x02,0x5c,0x00,0x37,0x91,0x01,0xe0,0x08,0x74,0x02,0xa8,0x00 } },
+{ 16, 0x9a30, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xc7,0x80,0x21,0xe0 } },
+{ 16, 0x9a40, 0, {0x2f,0x78,0x02,0x9e,0x00,0x96,0x80,0x39,0xe0,0x2e,0xf8,0x03,0xde,0x30,0xf7,0xd0 } },
+{ 16, 0x9a50, 0, {0x2d,0xf2,0x00,0x78,0x03,0x52,0x00,0xf7,0xa2,0x3b,0xe0,0x0e,0x78,0x07,0xea,0x02 } },
+{ 16, 0x9a60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xb4,0x00,0xfb,0x00,0x0c,0xc0 } },
+{ 16, 0x9a70, 0, {0x0f,0x30,0x03,0xec,0x10,0xd3,0x00,0xb4,0xc0,0x2f,0x80,0x03,0x6c,0x48,0xfb,0x00 } },
+{ 16, 0x9a80, 0, {0x3e,0xc8,0x4d,0x90,0x03,0xa4,0x00,0xfb,0x20,0x1e,0xc0,0x0f,0xb0,0x03,0xc2,0x06 } },
+{ 16, 0x9a90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xcc,0x80,0x2b,0x2c } },
+{ 16, 0x9aa0, 0, {0x2f,0xf8,0x03,0x7e,0x00,0x6e,0x80,0x3b,0xa1,0x0d,0xd8,0x43,0x3e,0x00,0xff,0x90 } },
+{ 16, 0x9ab0, 0, {0x33,0xe0,0x0f,0xe9,0x33,0xfe,0x00,0xcf,0xc0,0x3f,0xe2,0x0f,0xd8,0x03,0xc0,0x00 } },
+{ 16, 0x9ac0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xb4,0x40,0x87,0x00,0x21,0x04 } },
+{ 16, 0x9ad0, 0, {0x08,0x78,0x02,0x1c,0x00,0x86,0x00,0x21,0xc0,0x28,0x90,0x02,0xdc,0x00,0xb7,0x10 } },
+{ 16, 0x9ae0, 0, {0x21,0xc0,0x0f,0x73,0x02,0xcc,0x00,0x87,0x00,0x2d,0xc0,0x0b,0x50,0x02,0xea,0x00 } },
+{ 16, 0x9af0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9d,0x00,0xa4,0x00,0x29,0x48 } },
+{ 16, 0x9b00, 0, {0x6a,0xf0,0x82,0x4c,0x00,0xae,0x00,0xa1,0xc4,0x29,0x74,0x02,0x5c,0x40,0xa3,0x10 } },
+{ 16, 0x9b10, 0, {0x61,0xc2,0x0b,0x60,0x06,0xc8,0x00,0x87,0x00,0x2d,0xc0,0x0b,0x50,0x02,0xc0,0x04 } },
+{ 16, 0x9b20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xe6,0x01,0xa3,0x02,0x20,0x40 } },
+{ 16, 0x9b30, 0, {0x28,0x3c,0x02,0x0c,0x00,0x83,0x42,0x20,0xc8,0x08,0x10,0x02,0xcd,0x00,0xb3,0x00 } },
+{ 16, 0x9b40, 0, {0x28,0xf0,0x0b,0x30,0x02,0xcc,0x01,0x83,0x04,0x2c,0xc0,0x83,0x10,0x02,0xc8,0x04 } },
+{ 16, 0x9b50, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xaa,0x80,0xeb,0x00,0x38,0xc0 } },
+{ 16, 0x9b60, 0, {0x0a,0x90,0x03,0x7c,0x22,0xa2,0x40,0x32,0x48,0x0d,0xb0,0x0b,0x3e,0x00,0xff,0x00 } },
+{ 16, 0x9b70, 0, {0x33,0xf4,0x0f,0x90,0x03,0xec,0x00,0x8f,0x02,0x3f,0xc0,0x0f,0x90,0x03,0xea,0x04 } },
+{ 16, 0x9b80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xe0,0x00,0xd9,0x02,0x3e,0xc0 } },
+{ 16, 0x9b90, 0, {0x0e,0xb6,0x03,0xec,0x00,0xfa,0x20,0x3e,0xc0,0x4f,0x24,0x23,0xac,0x60,0xfb,0x00 } },
+{ 16, 0x9ba0, 0, {0xa6,0xc0,0x0e,0x90,0x03,0xe4,0x00,0xfb,0x00,0x3c,0xc1,0x0f,0x90,0x03,0xe0,0x00 } },
+{ 16, 0x9bb0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf8,0x02,0xcf,0x00,0x33,0xe0 } },
+{ 16, 0x9bc0, 0, {0x2c,0xf0,0x13,0xbc,0x00,0x2e,0x10,0xb1,0x64,0x2e,0xf0,0x02,0x3c,0x00,0xff,0x02 } },
+{ 16, 0x9bd0, 0, {0x3f,0xc1,0x4d,0xec,0x63,0xfe,0x00,0xb7,0x00,0x3b,0xc0,0x0c,0xd8,0x03,0xc0,0x44 } },
+{ 16, 0x9be0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x6c,0x28,0x81,0x81,0x22,0xe0 } },
+{ 16, 0x9bf0, 0, {0x0a,0x38,0x02,0x3c,0x04,0xba,0xc9,0x32,0xe0,0x20,0x84,0x02,0x2c,0x00,0xbb,0x00 } },
+{ 16, 0x9c00, 0, {0x2e,0xc0,0x0b,0x9c,0x02,0xe7,0x81,0xbb,0x04,0x22,0xc0,0x0a,0x99,0x02,0xe0,0x00 } },
+{ 16, 0x9c10, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x28,0x40,0x88,0x80,0x22,0x88 } },
+{ 16, 0x9c20, 0, {0x28,0xbc,0x42,0xac,0x00,0xba,0x00,0x2a,0x80,0x08,0x84,0x02,0xac,0x00,0xbb,0x00 } },
+{ 16, 0x9c30, 0, {0x2e,0xc0,0x0b,0xb0,0x82,0xe8,0x90,0xab,0x00,0x62,0xc0,0x08,0xb0,0x12,0xe0,0x00 } },
+{ 16, 0x9c40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x00,0x00,0x89,0x00,0x2a,0x80 } },
+{ 16, 0x9c50, 0, {0x28,0xb2,0x02,0x0c,0x00,0xba,0x00,0x20,0xc0,0x08,0x00,0x02,0x8c,0x00,0xb3,0x00 } },
+{ 16, 0x9c60, 0, {0x2c,0xc0,0x0b,0x30,0x20,0x4c,0x14,0xb3,0x00,0x20,0xc0,0x08,0x30,0x02,0xc2,0x01 } },
+{ 16, 0x9c70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x68,0x00,0xc8,0x00,0xb2,0xc0 } },
+{ 16, 0x9c80, 0, {0x2c,0xb2,0x03,0xac,0x00,0xfa,0x00,0x3a,0xc0,0x4e,0xa5,0x03,0xbc,0x00,0xff,0x00 } },
+{ 16, 0x9c90, 0, {0x3f,0xc0,0x09,0xa0,0x03,0xe9,0x04,0xef,0x00,0xba,0xc0,0x0c,0xb0,0x01,0xc0,0x01 } },
+{ 16, 0x9ca0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x19,0xfc,0x00,0xf5,0x00,0x35,0xc0 } },
+{ 16, 0x9cb0, 0, {0xaf,0x34,0x03,0xfc,0x00,0xf4,0x00,0x39,0xc0,0x0f,0xc2,0x03,0x7c,0x00,0xff,0x01 } },
+{ 16, 0x9cc0, 0, {0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0xa0,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xe8,0x05 } },
+{ 16, 0x9cd0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xff,0x29,0x3d,0x20 } },
+{ 16, 0x9ce0, 0, {0x8e,0xc1,0x03,0x32,0x48,0xdc,0x80,0x23,0x25,0x0e,0xf2,0x03,0x3c,0xc0,0xdf,0x84 } },
+{ 16, 0x9cf0, 0, {0x33,0xc9,0x0f,0xf2,0x03,0xfc,0x00,0xcf,0x80,0x33,0x40,0x0c,0xf2,0x03,0x30,0x00 } },
+{ 16, 0x9d00, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xec,0xc0,0xbb,0x60,0x2e,0x08 } },
+{ 16, 0x9d10, 0, {0x08,0x81,0x02,0x20,0x04,0x88,0x20,0x20,0x48,0x08,0xf1,0x82,0x2d,0xc0,0x83,0x00 } },
+{ 16, 0x9d20, 0, {0x22,0xd4,0x09,0xf5,0x02,0xfc,0x08,0x8b,0x01,0x22,0x40,0x28,0xb4,0x02,0x20,0x04 } },
+{ 16, 0x9d30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x20,0xb3,0x09,0x2c,0x82 } },
+{ 16, 0x9d40, 0, {0x08,0x10,0x16,0xa0,0x10,0x90,0x08,0x28,0x48,0x0a,0x32,0x02,0x0c,0x00,0xbb,0x00 } },
+{ 16, 0x9d50, 0, {0x2c,0xc0,0x0b,0x30,0x02,0xcc,0x02,0x93,0x01,0x20,0x00,0x8a,0x31,0x22,0xe2,0x01 } },
+{ 16, 0x9d60, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xac,0x04,0xbb,0x00,0x2c,0x80 } },
+{ 16, 0x9d70, 0, {0x08,0x86,0x02,0xa0,0x20,0xa0,0x00,0x2a,0x60,0x0a,0xb0,0x10,0x2c,0x00,0xab,0x0c } },
+{ 16, 0x9d80, 0, {0x6e,0xc0,0x09,0xb0,0x02,0xcc,0x00,0x9b,0x00,0x22,0x60,0x0a,0xb0,0x02,0xf0,0x04 } },
+{ 16, 0x9d90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0xec,0x00,0xbb,0x00,0x3e,0x34 } },
+{ 16, 0x9da0, 0, {0x08,0xa0,0x0b,0x83,0x00,0xd9,0x02,0x3a,0xe0,0x2e,0xb0,0x0b,0x2c,0x00,0xf8,0x80 } },
+{ 16, 0x9db0, 0, {0x3e,0xc0,0x4f,0xb0,0x03,0xec,0x00,0xca,0x40,0xb2,0x72,0x0e,0xb0,0x0b,0xc0,0x04 } },
+{ 16, 0x9dc0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xbc,0x10,0xfb,0x00,0x3f,0x00 } },
+{ 16, 0x9dd0, 0, {0x0d,0xf8,0x13,0x70,0x48,0xdd,0x40,0x37,0xc2,0x8d,0xf0,0x03,0xdc,0x00,0xdd,0xc8 } },
+{ 16, 0x9de0, 0, {0x13,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xee,0x40,0x7f,0x40,0x0d,0x70,0x03,0x38,0x00 } },
+{ 16, 0x9df0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xfb,0x01,0x32,0xc0 } },
+{ 16, 0x9e00, 0, {0x04,0x10,0x03,0x20,0x40,0xe8,0x10,0x3a,0xc0,0x0d,0xb0,0x03,0xac,0x08,0xf8,0x40 } },
+{ 16, 0x9e10, 0, {0xb2,0xc0,0x2c,0xb0,0x33,0xa4,0x82,0xda,0x40,0xba,0x40,0x0f,0xb0,0x03,0xd0,0x04 } },
+{ 16, 0x9e20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x3c,0x08,0xbf,0x80,0x22,0xc8 } },
+{ 16, 0x9e30, 0, {0x08,0xb7,0x00,0x23,0x44,0x88,0xd0,0x22,0xd0,0x08,0x70,0x82,0xfc,0x00,0xb2,0xe0 } },
+{ 16, 0x9e40, 0, {0x03,0xf4,0x08,0xf5,0x02,0x37,0x04,0x8b,0xd1,0x22,0x60,0x4b,0xfd,0x02,0xf2,0x00 } },
+{ 16, 0x9e50, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb3,0x10,0xa4,0x40 } },
+{ 16, 0x9e60, 0, {0x08,0x00,0x02,0x48,0x00,0xa0,0x42,0x2a,0xd0,0x01,0x30,0x02,0x8c,0x00,0xb3,0x80 } },
+{ 16, 0x9e70, 0, {0x2c,0xc0,0x09,0x31,0x02,0xcc,0x00,0x89,0x00,0x22,0xe8,0x03,0x38,0x02,0xf8,0x00 } },
+{ 16, 0x9e80, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x1e,0x00,0xb7,0x80,0x27,0x64 } },
+{ 16, 0x9e90, 0, {0x68,0x4a,0x02,0x52,0x00,0x8c,0x80,0x21,0xe0,0x08,0x78,0x02,0xde,0x00,0xb7,0x80 } },
+{ 16, 0x9ea0, 0, {0x2d,0xe2,0x19,0x39,0x02,0x5e,0x30,0x85,0x98,0x21,0xe4,0x0b,0x79,0x02,0xd8,0x00 } },
+{ 16, 0x9eb0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xf3,0x20,0x34,0x00 } },
+{ 16, 0x9ec0, 0, {0x0c,0xb8,0x03,0x48,0x80,0xe2,0x22,0x38,0xc0,0x0d,0x30,0x03,0x8c,0x00,0xf3,0x00 } },
+{ 16, 0x9ed0, 0, {0x3e,0xc0,0x0d,0x31,0x03,0xec,0x00,0xcb,0x00,0x38,0x06,0x0f,0x30,0x83,0xd2,0x02 } },
+{ 16, 0x9ee0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xbc,0x00,0xff,0x00,0x3b,0x01 } },
+{ 16, 0x9ef0, 0, {0x0f,0xd0,0x03,0x90,0x00,0xf6,0x00,0x3f,0xc0,0x0f,0xf4,0x01,0xfc,0x00,0xff,0x01 } },
+{ 16, 0x9f00, 0, {0x33,0xc2,0x0e,0xf5,0x13,0xbc,0x00,0xed,0x00,0x3f,0xc4,0x0f,0xf0,0x03,0xd0,0x06 } },
+{ 16, 0x9f10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xfb,0x00,0x3c,0xc0 } },
+{ 16, 0x9f20, 0, {0x0e,0xa0,0x01,0x64,0x01,0xd8,0x00,0x32,0xe0,0x2c,0xb5,0x03,0x2c,0x00,0xf2,0x00 } },
+{ 16, 0x9f30, 0, {0x7a,0xc0,0x0d,0xb4,0x03,0x2d,0x80,0xc9,0x02,0x32,0xc0,0x0c,0xb0,0x03,0x2a,0x00 } },
+{ 16, 0x9f40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x80,0xb7,0x00,0x2d,0xc0 } },
+{ 16, 0x9f50, 0, {0x0d,0x60,0x02,0xd0,0x01,0x84,0x00,0x21,0xc0,0x08,0x30,0x02,0x1d,0x00,0xb7,0x00 } },
+{ 16, 0x9f60, 0, {0x21,0xc8,0x0b,0xf4,0x03,0x1e,0xc0,0x86,0x00,0x21,0xc0,0x08,0x7c,0x03,0x52,0x04 } },
+{ 16, 0x9f70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0xc0,0xb7,0x90,0x2d,0xe0 } },
+{ 16, 0x9f80, 0, {0x08,0x78,0x06,0xd6,0x01,0xb4,0x82,0x21,0xe0,0x08,0x78,0x0a,0x1e,0x00,0xb5,0xc0 } },
+{ 16, 0x9f90, 0, {0x29,0xe8,0x09,0x78,0x02,0x36,0xc1,0x97,0x80,0x28,0xb0,0x0a,0x7a,0x02,0x30,0x00 } },
+{ 16, 0x9fa0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x00,0xbb,0x00,0x2c,0xe0 } },
+{ 16, 0x9fb0, 0, {0x09,0x35,0x82,0xc0,0xc1,0xa0,0x51,0x20,0xe4,0x08,0x30,0x02,0x8c,0x00,0xbb,0xc4 } },
+{ 16, 0x9fc0, 0, {0x20,0xc0,0x0b,0x30,0x02,0x06,0x00,0x93,0x18,0xaa,0xb0,0x2a,0x30,0x0a,0x52,0x04 } },
+{ 16, 0x9fd0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfa,0x01,0x3d,0xac } },
+{ 16, 0x9fe0, 0, {0x4c,0xec,0x13,0x78,0x10,0xf6,0x80,0xb3,0x90,0x0c,0xa0,0x03,0x28,0x00,0xfe,0x00 } },
+{ 16, 0x9ff0, 0, {0x3a,0x81,0x0d,0xa0,0x0f,0x2a,0x80,0xde,0x04,0x3b,0xa0,0x0e,0xa0,0x03,0x3a,0x04 } },
+{ 16, 0xa000, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x00,0xf8,0x00,0x3e,0x00 } },
+{ 16, 0xa010, 0, {0x0d,0x80,0x02,0xe1,0x00,0xd8,0x48,0x3e,0x12,0x0f,0x80,0x13,0x60,0x00,0xf8,0x60 } },
+{ 16, 0xa020, 0, {0x3e,0x00,0x07,0x80,0x03,0xa0,0x02,0xe8,0x04,0x26,0x08,0x05,0x80,0x03,0x92,0x00 } },
+{ 16, 0xa030, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x04,0x3a,0x40 } },
+{ 16, 0xa040, 0, {0x0c,0x12,0x03,0x24,0x82,0xc9,0x00,0x36,0x44,0x0f,0x10,0x03,0x24,0x00,0xf9,0x00 } },
+{ 16, 0xa050, 0, {0x36,0x40,0x04,0x90,0x03,0x04,0x00,0xc9,0x00,0x12,0x40,0x0c,0x90,0x03,0x02,0x04 } },
+{ 16, 0xa060, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0xb9,0x81,0x22,0x40 } },
+{ 16, 0xa070, 0, {0x08,0x90,0x1a,0x24,0x00,0x89,0x00,0x22,0x68,0x0b,0x99,0x02,0x24,0x00,0xb9,0x00 } },
+{ 16, 0xa080, 0, {0x22,0x40,0x68,0x90,0x0a,0x24,0x00,0x89,0x00,0xa2,0x40,0x08,0x90,0x0a,0x20,0x00 } },
+{ 16, 0xa090, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x10,0x22,0xe0 } },
+{ 16, 0xa0a0, 0, {0x08,0x94,0x00,0x04,0x04,0x8b,0x08,0x26,0xc0,0x0b,0x90,0x02,0x24,0x04,0xb9,0x0c } },
+{ 16, 0xa0b0, 0, {0x24,0x40,0x0a,0x10,0x02,0x24,0x00,0x23,0x02,0x2a,0x40,0xa8,0x10,0x02,0x06,0x00 } },
+{ 16, 0xa0c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x90,0xb1,0x20,0x22,0x40 } },
+{ 16, 0xa0d0, 0, {0x08,0x12,0x02,0x0c,0x10,0x81,0x02,0xa0,0x50,0x0b,0x12,0x02,0x04,0x80,0xb1,0x05 } },
+{ 16, 0xa0e0, 0, {0x00,0x48,0x0a,0x10,0x02,0x04,0xa0,0xa1,0x00,0x28,0x4a,0x08,0x12,0x00,0x02,0x01 } },
+{ 16, 0xa0f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xf8,0x50,0xba,0x14 } },
+{ 16, 0xa100, 0, {0x0c,0x85,0x03,0x01,0x42,0xc8,0x50,0x34,0x00,0x0f,0x85,0x03,0x21,0x40,0xf8,0x00 } },
+{ 16, 0xa110, 0, {0x36,0x00,0x0e,0x80,0x13,0x20,0x80,0xe0,0x00,0x1a,0x08,0x0c,0x00,0x03,0x2e,0x03 } },
+{ 16, 0xa120, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xe4,0x44,0xf9,0x10,0x3f,0x40 } },
+{ 16, 0xa130, 0, {0x2f,0xd1,0x13,0xf4,0x04,0xf5,0x00,0x3f,0x40,0x0f,0x91,0x0b,0xe4,0x40,0xff,0x28 } },
+{ 16, 0xa140, 0, {0xbe,0x4e,0x0d,0x96,0x83,0xd4,0xa2,0xdd,0x28,0x37,0x4a,0x0f,0x93,0x83,0xe6,0x06 } },
+{ 16, 0xa150, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x05,0xe4,0x10,0xcd,0x00,0x3f,0x40 } },
+{ 16, 0xa160, 0, {0x0f,0xd0,0x03,0x35,0x02,0x5d,0x01,0x31,0x44,0x0f,0xd0,0x03,0x24,0x00,0xf9,0x00 } },
+{ 16, 0xa170, 0, {0x32,0x60,0x0c,0x98,0x83,0xe6,0x40,0xd9,0x00,0x36,0x6a,0x0c,0x9e,0x83,0x26,0x01 } },
+{ 16, 0xa180, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe0,0x00,0x88,0x00,0x2e,0x00 } },
+{ 16, 0xa190, 0, {0x0b,0x80,0x42,0x02,0x80,0x8a,0x00,0x22,0x20,0x88,0x80,0x03,0x20,0x08,0xb8,0x82 } },
+{ 16, 0xa1a0, 0, {0x22,0x21,0x08,0x88,0x82,0xe2,0x42,0x88,0xa8,0x22,0x20,0x08,0xce,0x02,0x0e,0x04 } },
+{ 16, 0xa1b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x02,0x81,0x00,0x68,0x40 } },
+{ 16, 0xa1c0, 0, {0x0b,0x10,0x02,0x84,0x01,0xb9,0x00,0x20,0x40,0x49,0x10,0x0a,0x04,0x00,0xb5,0x08 } },
+{ 16, 0xa1d0, 0, {0x21,0x46,0x08,0x50,0x02,0xd4,0x00,0x8d,0x20,0x25,0x4a,0x0b,0x50,0x02,0x42,0x01 } },
+{ 16, 0xa1e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xa4,0x00,0x89,0x04,0x6e,0x54 } },
+{ 16, 0xa1f0, 0, {0x0b,0x10,0x12,0xa4,0x01,0xa9,0x00,0xa2,0x40,0x18,0x90,0x16,0x24,0x00,0xb9,0x00 } },
+{ 16, 0xa200, 0, {0x23,0x40,0x18,0xd0,0x02,0xf4,0x00,0x8d,0x40,0x21,0x4a,0x0b,0xd0,0x02,0x46,0x04 } },
+{ 16, 0xa210, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xc9,0x00,0x3a,0x50 } },
+{ 16, 0xa220, 0, {0x8f,0x96,0x0b,0x84,0x02,0xf1,0x01,0x30,0x48,0x8d,0x90,0x03,0x24,0x10,0xf9,0x00 } },
+{ 16, 0xa230, 0, {0xb2,0x40,0x2c,0x90,0x03,0xe6,0x40,0xd1,0xc0,0x36,0x50,0x2f,0x90,0x0b,0x68,0x04 } },
+{ 16, 0xa240, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x00,0xf9,0x00,0x3e,0x60 } },
+{ 16, 0xa250, 0, {0x0f,0x99,0xc3,0x64,0x00,0xd9,0x28,0x3e,0x40,0x0d,0x90,0x03,0xa4,0x00,0xf9,0x40 } },
+{ 16, 0xa260, 0, {0x3e,0x40,0x0f,0x90,0x03,0xe4,0x20,0xf9,0x40,0x3e,0x40,0x0c,0x90,0x03,0x8a,0x00 } },
+{ 16, 0xa270, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x01,0x36,0x00 } },
+{ 16, 0xa280, 0, {0x8f,0x80,0x03,0xe0,0x02,0xf8,0x04,0x32,0x00,0x0d,0x80,0x43,0x20,0x02,0xcc,0x00 } },
+{ 16, 0xa290, 0, {0x3f,0x00,0x0f,0xc0,0x13,0x90,0x02,0xdc,0x40,0x3f,0x10,0x4c,0xc0,0x23,0x0a,0x04 } },
+{ 16, 0xa2a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0xba,0x00,0x22,0x80 } },
+{ 16, 0xa2b0, 0, {0x0b,0xe8,0x20,0xf8,0x00,0x4e,0xc0,0x23,0xa0,0x08,0xa0,0x03,0x68,0x00,0x8a,0x00 } },
+{ 16, 0xa2c0, 0, {0x2e,0x80,0x1f,0xa0,0x02,0x2a,0x06,0x8a,0x00,0x2e,0xa0,0x02,0x60,0x03,0x0a,0x00 } },
+{ 16, 0xa2d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x6c,0x00,0xb3,0x00,0x20,0xc0 } },
+{ 16, 0xa2e0, 0, {0x0b,0x3d,0x02,0xc0,0x03,0x23,0x00,0x20,0xe0,0x01,0xb0,0x06,0x4c,0x00,0x8b,0x00 } },
+{ 16, 0xa2f0, 0, {0x2e,0xc0,0x4b,0x30,0x02,0x8e,0x08,0x83,0x80,0x2c,0xc4,0x00,0x34,0x8e,0x4a,0x00 } },
+{ 16, 0xa300, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1c,0x80,0xb5,0x80,0x61,0xc0 } },
+{ 16, 0xa310, 0, {0x0b,0x40,0x02,0xd4,0x00,0x84,0x08,0x23,0xc2,0x08,0x50,0x02,0x5e,0xc0,0x84,0x01 } },
+{ 16, 0xa320, 0, {0x2d,0x00,0x8a,0x08,0x02,0x10,0x24,0x84,0x08,0x6d,0x00,0x0a,0x03,0x12,0x28,0x00 } },
+{ 16, 0xa330, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xf5,0x82,0x21,0x60 } },
+{ 16, 0xa340, 0, {0x0f,0x78,0x03,0xd6,0x04,0xae,0x80,0x31,0xe0,0x0d,0x58,0x23,0x7e,0x00,0xc6,0x80 } },
+{ 16, 0xa350, 0, {0x2d,0xe0,0x0b,0x78,0x03,0x8e,0x00,0xd7,0x82,0x3d,0xf0,0x0c,0x7a,0x03,0x6a,0x02 } },
+{ 16, 0xa360, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x00,0xf1,0x00,0xba,0xd8 } },
+{ 16, 0xa370, 0, {0x0f,0x80,0x03,0xe4,0x12,0xf8,0x00,0xbe,0x80,0x0e,0x10,0x03,0xec,0x00,0xf9,0x00 } },
+{ 16, 0xa380, 0, {0x3e,0x00,0x5f,0x80,0x03,0xe0,0x08,0xf8,0x04,0x3c,0x00,0x0f,0x80,0x03,0xc2,0x06 } },
+{ 16, 0xa390, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x20,0xff,0x80,0x3f,0xf0 } },
+{ 16, 0xa3a0, 0, {0x0f,0xf8,0x03,0xd2,0x00,0xef,0x84,0xb3,0x61,0x0c,0xb9,0x03,0xfe,0x00,0xff,0x80 } },
+{ 16, 0xa3b0, 0, {0x33,0xe0,0x0c,0xf8,0x13,0x22,0x11,0xcd,0x90,0x3f,0x60,0x0c,0xe8,0x03,0x10,0x00 } },
+{ 16, 0xa3c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x00,0xf5,0x00,0x2d,0xc0 } },
+{ 16, 0xa3d0, 0, {0x0b,0x00,0x02,0xd4,0x04,0x84,0x20,0x23,0x40,0x08,0x5a,0x02,0xdc,0x00,0xb4,0x00 } },
+{ 16, 0xa3e0, 0, {0x21,0x00,0x28,0xc2,0x02,0x1e,0x04,0x86,0x04,0x2d,0x88,0x08,0xd0,0x02,0x2a,0x04 } },
+{ 16, 0xa3f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x9c,0x00,0xb5,0x00,0x2d,0x40 } },
+{ 16, 0xa400, 0, {0x0b,0x70,0x02,0xf4,0x20,0xa7,0x04,0x21,0xc0,0x0a,0x50,0x02,0xdc,0x00,0xbe,0x00 } },
+{ 16, 0xa410, 0, {0x21,0xc0,0x08,0x70,0x12,0x00,0x00,0x85,0x00,0x2d,0x40,0x88,0x68,0x0a,0x04,0x00 } },
+{ 16, 0xa420, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x14,0xcc,0x00,0xa1,0x00,0x2e,0xc0 } },
+{ 16, 0xa430, 0, {0x1b,0x08,0x06,0xc4,0x20,0x80,0x00,0x20,0x98,0x1a,0x10,0x02,0xcc,0x00,0xb1,0x08 } },
+{ 16, 0xa440, 0, {0x20,0x00,0x08,0x00,0x02,0x0c,0x01,0x82,0xc0,0x2c,0xac,0x28,0x90,0x22,0x18,0x04 } },
+{ 16, 0xa450, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xb3,0x00,0x3e,0x40 } },
+{ 16, 0xa460, 0, {0x0f,0xba,0x03,0xe5,0x02,0xe9,0x04,0x32,0x90,0xae,0xb0,0x03,0xfc,0x10,0xfb,0x40 } },
+{ 16, 0xa470, 0, {0xb2,0x00,0x0c,0x80,0x0b,0x2c,0x02,0x82,0x18,0x3f,0xa0,0x0c,0xd0,0x03,0x2e,0x04 } },
+{ 16, 0xa480, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0xec,0x04,0xfb,0x01,0x3e,0x40 } },
+{ 16, 0xa490, 0, {0x0f,0xb6,0x43,0xe4,0x00,0xf8,0x00,0x3e,0x80,0x01,0x90,0x03,0xec,0x00,0xf8,0x81 } },
+{ 16, 0xa4a0, 0, {0x3e,0xd0,0x0d,0xb4,0x53,0xe0,0x00,0xf9,0x40,0x3e,0x40,0x0f,0xa0,0x03,0xe0,0x00 } },
+{ 16, 0xa4b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xdc,0x02,0xcd,0x80,0x33,0x60 } },
+{ 16, 0xa4c0, 0, {0x2c,0xda,0x03,0xfc,0x00,0xec,0x00,0x33,0x40,0x0f,0xf2,0x03,0x7c,0x04,0xfe,0x00 } },
+{ 16, 0xa4d0, 0, {0x32,0x00,0x0c,0xc8,0x03,0x3c,0x00,0xce,0x00,0x31,0x80,0x0c,0xd1,0x03,0x24,0x04 } },
+{ 16, 0xa4e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x91,0x04,0x6c,0x00,0x09,0x00,0x2a,0x64 } },
+{ 16, 0xa4f0, 0, {0x08,0x8e,0x02,0xc2,0x10,0xa0,0x10,0x3e,0x10,0x0b,0x98,0x02,0xec,0x00,0xb9,0x00 } },
+{ 16, 0xa500, 0, {0x02,0xd8,0x08,0xbe,0x22,0x20,0x00,0x89,0x00,0x22,0x50,0x08,0xa0,0x02,0x20,0x40 } },
+{ 16, 0xa510, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x0b,0x20,0x22,0x40 } },
+{ 16, 0xa520, 0, {0x08,0xa0,0x02,0xe5,0x42,0xab,0x04,0x22,0x18,0x0b,0xb0,0x02,0x6c,0x00,0xb3,0x00 } },
+{ 16, 0xa530, 0, {0x20,0x04,0x08,0x01,0x02,0x00,0x04,0xa8,0x40,0x22,0x10,0x08,0x80,0x02,0x20,0x00 } },
+{ 16, 0xa540, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x08,0x83,0x00,0x28,0x40 } },
+{ 16, 0xa550, 0, {0x08,0x04,0x02,0xc4,0x02,0xa8,0x00,0x2c,0x00,0x0b,0x12,0x02,0xcc,0x00,0xb0,0x00 } },
+{ 16, 0xa560, 0, {0x20,0xc0,0x40,0x30,0x02,0x0c,0x00,0x8b,0x00,0xa8,0xc0,0x08,0x30,0x02,0x02,0x11 } },
+{ 16, 0xa570, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0d,0x6c,0x00,0xc9,0x00,0x33,0x40 } },
+{ 16, 0xa580, 0, {0x0c,0xb0,0x03,0xec,0x02,0xeb,0x00,0x32,0x40,0x0f,0xb0,0x03,0x6c,0x00,0xfa,0x00 } },
+{ 16, 0xa590, 0, {0x32,0x00,0x0c,0x80,0x03,0x20,0x80,0xc8,0x00,0x30,0x00,0x0c,0x80,0x03,0x20,0x03 } },
+{ 16, 0xa5a0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x19,0xfc,0x00,0xfd,0x00,0x3f,0x40 } },
+{ 16, 0xa5b0, 0, {0x0f,0xc2,0x13,0xf0,0x00,0xf4,0x00,0x3f,0x00,0x4f,0xd4,0x03,0xfc,0x00,0xf5,0x00 } },
+{ 16, 0xa5c0, 0, {0x3f,0xc0,0x8f,0xf0,0x03,0xfc,0x40,0xff,0x00,0x37,0xc0,0x2f,0xf0,0x03,0xe8,0x06 } },
+{ 16, 0xa5d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf0,0x00,0xcc,0x00,0x33,0x00 } },
+{ 16, 0xa5e0, 0, {0x0e,0xd0,0x0b,0x33,0x00,0xcc,0x00,0x33,0xe0,0x0f,0xc0,0x83,0x7c,0x00,0xcf,0x20 } },
+{ 16, 0xa5f0, 0, {0x7b,0x09,0x8c,0xf8,0x03,0xfe,0x50,0xcf,0x38,0x3f,0xe1,0x0d,0xc2,0x03,0xf0,0x00 } },
+{ 16, 0xa600, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xe2,0x00,0x98,0x08,0x20,0x80 } },
+{ 16, 0xa610, 0, {0x08,0x98,0x02,0x20,0x00,0x88,0xd0,0x22,0xe0,0x0e,0xb4,0x22,0x7d,0x19,0x9f,0x69 } },
+{ 16, 0xa620, 0, {0x2e,0x90,0x08,0x30,0x92,0x28,0x81,0xdb,0x64,0x2e,0xe1,0x88,0x16,0xa2,0xe0,0x04 } },
+{ 16, 0xa630, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc8,0x00,0x90,0x24,0x20,0x01 } },
+{ 16, 0xa640, 0, {0x08,0x10,0x16,0x00,0x82,0x83,0x01,0x28,0xc1,0x0b,0x02,0x82,0x0c,0xe0,0xa3,0x10 } },
+{ 16, 0xa650, 0, {0x28,0x0e,0x1b,0x92,0x02,0x84,0x84,0x93,0x20,0x2e,0xc0,0x08,0x31,0x02,0xe2,0x01 } },
+{ 16, 0xa660, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xa8,0x10,0x98,0x00,0x22,0x80 } },
+{ 16, 0xa670, 0, {0x08,0x90,0x02,0x00,0x60,0x8a,0x10,0x2a,0xc0,0x0a,0x20,0x02,0x6c,0x18,0xbb,0x00 } },
+{ 16, 0xa680, 0, {0x6e,0x60,0x2b,0x90,0x02,0x46,0x20,0x8b,0x00,0x2e,0xc2,0x08,0xb1,0x82,0xf0,0x04 } },
+{ 16, 0xa690, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0xe4,0x02,0xcb,0x00,0xb2,0x40 } },
+{ 16, 0xa6a0, 0, {0x2c,0x92,0x03,0x27,0x00,0x88,0x00,0xba,0xc0,0x0f,0x88,0x03,0x2c,0x00,0xeb,0x04 } },
+{ 16, 0xa6b0, 0, {0x3a,0xa0,0xcf,0x2c,0xa3,0xed,0x00,0x9b,0x00,0x3c,0xf0,0x2d,0x8c,0x33,0xd0,0x04 } },
+{ 16, 0xa6c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb4,0x04,0xef,0x00,0x3f,0xc0 } },
+{ 16, 0xa6d0, 0, {0x0d,0x51,0x03,0xf0,0x00,0xf1,0x81,0x37,0xc0,0x0e,0xf4,0x03,0x9c,0x10,0xcf,0x00 } },
+{ 16, 0xa6e0, 0, {0x3d,0x80,0x0c,0xec,0x07,0xb8,0x08,0xff,0x02,0x1f,0xc4,0x0f,0xc8,0x03,0xf8,0x00 } },
+{ 16, 0xa6f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x9e,0x00,0xc3,0x00,0x38,0x40 } },
+{ 16, 0xa700, 0, {0x0c,0x92,0x03,0xa4,0x80,0xfb,0x20,0x3a,0xc0,0x0d,0x94,0x03,0x2c,0x40,0xfb,0x00 } },
+{ 16, 0xa710, 0, {0x3e,0x01,0x0f,0x80,0x03,0xe5,0x00,0xeb,0x00,0x3a,0xc0,0x0d,0x84,0x0b,0x10,0x04 } },
+{ 16, 0xa720, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2c,0x08,0x8b,0x02,0x22,0xc0 } },
+{ 16, 0xa730, 0, {0x08,0x92,0x03,0x21,0x00,0x8b,0x48,0x22,0xc0,0x0b,0xb7,0x02,0x3d,0x40,0x3f,0x01 } },
+{ 16, 0xa740, 0, {0x22,0x74,0x0b,0x90,0x02,0x28,0x04,0xbf,0x00,0xb2,0xc0,0x0b,0x85,0x02,0x32,0x00 } },
+{ 16, 0xa750, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x40,0x01,0x80,0x00,0x28,0x00 } },
+{ 16, 0xa760, 0, {0x08,0x2c,0x12,0x88,0x40,0xb0,0x40,0x08,0xc0,0x0b,0x18,0x02,0x0e,0x00,0xb3,0x00 } },
+{ 16, 0xa770, 0, {0x28,0x20,0x11,0x30,0x02,0x0c,0x00,0xb3,0x00,0x24,0x00,0x09,0x00,0x06,0x38,0x00 } },
+{ 16, 0xa780, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x12,0x00,0x84,0x80,0x21,0xa0 } },
+{ 16, 0xa790, 0, {0x28,0x68,0x12,0x3a,0x00,0x84,0x80,0x25,0xe0,0x8b,0x58,0x02,0x1e,0x40,0xb7,0x82 } },
+{ 16, 0xa7a0, 0, {0x21,0xa6,0x0b,0x78,0x02,0x1a,0x00,0xb7,0x80,0x21,0x20,0x0b,0x58,0x02,0x08,0x00 } },
+{ 16, 0xa7b0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x08,0x00,0xc8,0x21,0x38,0x09 } },
+{ 16, 0xa7c0, 0, {0x0c,0x28,0x03,0x80,0x01,0xf1,0x00,0x38,0xc0,0x0d,0x85,0x02,0x0c,0x00,0xfb,0x00 } },
+{ 16, 0xa7d0, 0, {0x38,0x85,0x0f,0x10,0x03,0x8c,0x00,0xeb,0x10,0x3c,0xc8,0x0d,0x30,0x03,0x12,0x02 } },
+{ 16, 0xa7e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0x98,0x00,0xfc,0x01,0x3f,0x80 } },
+{ 16, 0xa7f0, 0, {0x0f,0x68,0x03,0xd0,0x40,0xfc,0x00,0x3b,0xc0,0x0d,0xc0,0x03,0xfc,0x20,0xff,0x00 } },
+{ 16, 0xa800, 0, {0x3b,0xc5,0x0f,0xf0,0x0b,0xb4,0x40,0xff,0x18,0x3f,0x00,0x0f,0xf1,0x03,0xd0,0x06 } },
+{ 16, 0xa810, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x00,0xeb,0x00,0xb0,0x41 } },
+{ 16, 0xa820, 0, {0x0c,0xa0,0x03,0xe0,0x04,0xca,0x04,0xb0,0xe0,0x0e,0xb0,0x03,0xec,0x80,0xcb,0x20 } },
+{ 16, 0xa830, 0, {0x32,0x81,0x0c,0xa0,0x03,0xee,0x00,0xdb,0x00,0x3e,0x00,0x0e,0xb0,0x03,0x2a,0x00 } },
+{ 16, 0xa840, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x94,0x04,0x87,0x00,0x21,0xc0 } },
+{ 16, 0xa850, 0, {0x48,0x60,0x02,0xf0,0x00,0x87,0x00,0x21,0xc0,0x08,0x70,0x02,0xfc,0xa0,0x83,0x28 } },
+{ 16, 0xa860, 0, {0xa3,0x80,0x08,0x60,0x02,0xdc,0x00,0x87,0x20,0x2d,0xc0,0x0b,0x70,0x02,0x12,0x04 } },
+{ 16, 0xa870, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9c,0x02,0xa3,0x80,0x21,0x60 } },
+{ 16, 0xa880, 0, {0x08,0x68,0x02,0xd2,0x00,0x87,0x80,0x21,0xe0,0x29,0x78,0x02,0xde,0x80,0x87,0x90 } },
+{ 16, 0xa890, 0, {0x21,0xa0,0x19,0x48,0x02,0xfe,0x00,0x97,0x80,0x2d,0xe0,0x0a,0x38,0x82,0x30,0x00 } },
+{ 16, 0xa8a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x01,0x83,0x80,0x20,0xc0 } },
+{ 16, 0xa8b0, 0, {0x08,0x20,0x42,0xc0,0x30,0x83,0x70,0xa0,0xc0,0x89,0x34,0x02,0xcc,0x02,0x83,0x00 } },
+{ 16, 0xa8c0, 0, {0x60,0xc0,0x29,0x00,0x02,0xce,0x00,0x83,0x00,0x2c,0xc8,0x0b,0xbc,0x02,0x12,0x04 } },
+{ 16, 0xa8d0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa9,0x00,0xea,0xe2,0x32,0x90 } },
+{ 16, 0xa8e0, 0, {0x2c,0xe0,0x03,0xfb,0x02,0xce,0xc0,0x32,0x80,0x0f,0xe4,0x03,0xe8,0x00,0x8a,0x00 } },
+{ 16, 0xa8f0, 0, {0x33,0x88,0x0d,0x64,0xc3,0xfa,0x00,0xda,0x00,0x3d,0x90,0x0e,0xe0,0x0b,0x3a,0x04 } },
+{ 16, 0xa900, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xc0,0x24,0xf8,0x08,0x3e,0x12 } },
+{ 16, 0xa910, 0, {0x0f,0xc0,0x03,0xe0,0x48,0xf0,0x00,0x3e,0x00,0x0e,0x80,0x93,0xc0,0x00,0xf8,0x00 } },
+{ 16, 0xa920, 0, {0x7e,0x01,0x0e,0x80,0xc2,0xe0,0x40,0xf8,0x00,0x7e,0x00,0x8f,0x84,0x03,0xd2,0x00 } },
+{ 16, 0xa930, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe5,0x00,0xc1,0x01,0x32,0x48 } },
+{ 16, 0xa940, 0, {0x0c,0x98,0x03,0xe6,0x40,0xc9,0x00,0x32,0x40,0x0f,0x90,0x03,0x66,0x00,0xc9,0x00 } },
+{ 16, 0xa950, 0, {0x18,0x61,0x0c,0x90,0x03,0x64,0x20,0xf9,0x05,0x3e,0x40,0x0c,0x90,0x83,0x02,0x04 } },
+{ 16, 0xa960, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x66,0x20,0x89,0x00,0x20,0x52 } },
+{ 16, 0xa970, 0, {0x28,0x10,0xc2,0x26,0x02,0xa9,0x00,0x22,0x40,0x0b,0x90,0x0a,0x27,0x00,0xa9,0x00 } },
+{ 16, 0xa980, 0, {0x22,0x70,0x08,0x90,0x02,0x24,0x08,0xb9,0x00,0x2e,0x40,0x0a,0x90,0x0a,0x20,0x00 } },
+{ 16, 0xa990, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x02,0x8d,0x00,0x23,0x40 } },
+{ 16, 0xa9a0, 0, {0x08,0xd1,0x02,0x84,0x20,0x89,0x00,0x22,0x60,0x0b,0x11,0xf2,0x24,0xb0,0x81,0x00 } },
+{ 16, 0xa9b0, 0, {0x2a,0x46,0x08,0x90,0x42,0x64,0x08,0xb9,0x00,0x2e,0x40,0x08,0x92,0x02,0x06,0x00 } },
+{ 16, 0xa9c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x14,0x80,0x85,0x20,0x23,0x48 } },
+{ 16, 0xa9d0, 0, {0x08,0x52,0x02,0x84,0x08,0x81,0x00,0x20,0x40,0x0b,0x12,0x02,0x04,0x80,0xa1,0x20 } },
+{ 16, 0xa9e0, 0, {0x28,0x49,0x28,0x90,0x02,0x04,0x00,0x31,0x20,0x2e,0x40,0x08,0x32,0x02,0x02,0x01 } },
+{ 16, 0xa9f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xc8,0x50,0xb2,0x14 } },
+{ 16, 0xaa00, 0, {0x0c,0xc0,0x03,0xa1,0x40,0xc8,0x00,0xb2,0x00,0x07,0x85,0x03,0x21,0x40,0xc8,0x50 } },
+{ 16, 0xaa10, 0, {0x3a,0x15,0x0c,0x85,0x03,0x61,0x40,0xf8,0x51,0x3e,0x00,0x2c,0x85,0x03,0x2e,0x03 } },
+{ 16, 0xaa20, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xc4,0x48,0xf9,0x10,0x3e,0x44 } },
+{ 16, 0xaa30, 0, {0x4f,0x91,0x03,0x74,0x00,0xf5,0x44,0x3e,0x40,0x0f,0xd1,0x03,0xe4,0x40,0xf9,0x10 } },
+{ 16, 0xaa40, 0, {0x37,0x44,0x0f,0xd0,0x03,0xd4,0x00,0xf9,0x10,0x3f,0xc0,0x0f,0xd1,0x03,0xe6,0x06 } },
+{ 16, 0xaa50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xf6,0xa0,0xdd,0x8c,0x33,0x78 } },
+{ 16, 0xaa60, 0, {0x0e,0xda,0x03,0x35,0x00,0xcd,0xa0,0x33,0x40,0x0d,0xf8,0x0b,0x36,0x81,0xe9,0x80 } },
+{ 16, 0xaa70, 0, {0x33,0x70,0x0c,0x91,0x03,0xe4,0x40,0xf9,0xc0,0x3e,0xc0,0x0f,0xdc,0x03,0xc6,0x00 } },
+{ 16, 0xaa80, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe1,0x04,0xb8,0x40,0x20,0x3c } },
+{ 16, 0xaa90, 0, {0x0c,0x85,0x02,0x02,0x84,0x8a,0x40,0x22,0x00,0x08,0x8f,0x82,0x23,0x00,0xb8,0xe8 } },
+{ 16, 0xaaa0, 0, {0x22,0x20,0x08,0x88,0x02,0xe2,0x00,0xb8,0xd0,0x2e,0x00,0x0b,0x8c,0x02,0xce,0x04 } },
+{ 16, 0xaab0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0x91,0x00,0x60,0x48 } },
+{ 16, 0xaac0, 0, {0x4b,0x10,0x02,0x04,0x8a,0x81,0x40,0x60,0x40,0x49,0x10,0x02,0x8d,0xa0,0xa1,0x41 } },
+{ 16, 0xaad0, 0, {0x20,0x50,0x09,0x12,0x22,0xc4,0x80,0xb1,0x20,0x2c,0x40,0x4b,0x3e,0x02,0xc2,0x01 } },
+{ 16, 0xaae0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa4,0x08,0xb9,0x04,0xa0,0x40 } },
+{ 16, 0xaaf0, 0, {0x48,0xb0,0x02,0x24,0x00,0x89,0x00,0x82,0x40,0x08,0x90,0xa6,0xa4,0x00,0xb9,0x04 } },
+{ 16, 0xab00, 0, {0x22,0x54,0x29,0x95,0x02,0xe5,0x40,0xb9,0x00,0x6e,0x40,0x0b,0x92,0x02,0xc6,0x04 } },
+{ 16, 0xab10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe4,0x00,0x91,0x00,0x32,0x40 } },
+{ 16, 0xab20, 0, {0x0f,0x90,0x09,0x24,0x00,0x89,0x90,0x32,0x40,0x0d,0x94,0x03,0xa4,0x00,0xe9,0x02 } },
+{ 16, 0xab30, 0, {0x72,0x60,0x0d,0x94,0x03,0xe4,0x01,0xf9,0x01,0x3e,0x60,0x0f,0x90,0x03,0xe8,0x04 } },
+{ 16, 0xab40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x40,0xf9,0x00,0x3e,0x40 } },
+{ 16, 0xab50, 0, {0x4f,0x90,0x03,0xe7,0x10,0xf9,0x80,0x3e,0x40,0x0f,0x10,0x13,0x64,0x00,0xf1,0x00 } },
+{ 16, 0xab60, 0, {0xbe,0x40,0x0e,0x90,0x03,0xe6,0x08,0xf9,0x01,0x3e,0x64,0x0f,0x90,0x03,0xca,0x00 } },
+{ 16, 0xab70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa0,0x00,0xf8,0x00,0x32,0x08 } },
+{ 16, 0xab80, 0, {0x0c,0x01,0x0b,0x20,0x40,0xc8,0x40,0x32,0x00,0x0e,0x84,0x83,0x20,0x00,0xf8,0x04 } },
+{ 16, 0xab90, 0, {0x3e,0x04,0x0f,0x80,0x03,0x21,0x00,0xe8,0x00,0x3e,0x10,0x0f,0x88,0x03,0xca,0x04 } },
+{ 16, 0xaba0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x38,0x00,0x3e,0x04,0x23,0x80 } },
+{ 16, 0xabb0, 0, {0x08,0xec,0x12,0x39,0x44,0xa6,0x00,0x28,0x81,0x08,0xe0,0x00,0x38,0x08,0xba,0x00 } },
+{ 16, 0xabc0, 0, {0x3f,0x80,0x0b,0xa0,0x02,0xa8,0x00,0x8a,0x02,0x2e,0x80,0x0b,0xe0,0x02,0xca,0x00 } },
+{ 16, 0xabd0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x48,0x00,0x31,0x00,0x24,0xd0 } },
+{ 16, 0xabe0, 0, {0x08,0x3e,0x12,0xae,0x08,0x81,0xa0,0x2c,0xc0,0x0a,0x38,0x00,0x4c,0x00,0xb3,0x00 } },
+{ 16, 0xabf0, 0, {0x6e,0xc0,0x0a,0x30,0x02,0x0c,0x00,0xa3,0x00,0x6c,0xc0,0x0b,0x30,0x02,0xca,0x00 } },
+{ 16, 0xac00, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x18,0x00,0xb5,0x10,0x25,0xc0 } },
+{ 16, 0xac10, 0, {0x28,0x60,0x12,0x90,0x10,0xa5,0x08,0x2d,0xc2,0x08,0x64,0x22,0x58,0x18,0xb7,0x00 } },
+{ 16, 0xac20, 0, {0x2d,0x80,0x0b,0x79,0x02,0xbe,0xc0,0x87,0x01,0x6d,0xc0,0x0b,0x60,0x02,0xe8,0x00 } },
+{ 16, 0xac30, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xf5,0x84,0x35,0x20 } },
+{ 16, 0xac40, 0, {0x8c,0x18,0x02,0x92,0x10,0xc5,0x80,0x3d,0x60,0x0e,0xc8,0x0b,0x5a,0x08,0x77,0xf3 } },
+{ 16, 0xac50, 0, {0x3d,0xa0,0x0f,0xf8,0x03,0x1e,0xb0,0xe7,0x85,0x3d,0xe0,0x0f,0x78,0x03,0xea,0x02 } },
+{ 16, 0xac60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x00,0xf1,0x04,0xba,0x01 } },
+{ 16, 0xac70, 0, {0x0f,0xa0,0x43,0x60,0x09,0xe1,0x00,0x38,0x40,0x0e,0xa0,0x03,0xa8,0x14,0xfb,0x20 } },
+{ 16, 0xac80, 0, {0x3a,0x80,0x0f,0xb4,0x1b,0x4c,0x80,0xfb,0x29,0x3e,0xc0,0x0f,0xb0,0x23,0xc2,0x06 } },
+{ 16, 0xac90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfa,0x00,0xcd,0x80,0x3b,0xe0 } },
+{ 16, 0xaca0, 0, {0x4e,0xf8,0x03,0xf2,0x02,0xd4,0x81,0x3b,0xe0,0x8e,0x98,0x07,0x3e,0x44,0xef,0x91 } },
+{ 16, 0xacb0, 0, {0x3f,0xe0,0x4f,0xfc,0x07,0xee,0xd0,0xcf,0x98,0x33,0xe4,0x0f,0xf8,0x03,0xc0,0x00 } },
+{ 16, 0xacc0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x01,0x98,0x00,0x85,0x10,0x2d,0xc4 } },
+{ 16, 0xacd0, 0, {0x0d,0x11,0x02,0xf0,0x00,0x85,0x20,0x31,0xc4,0x0b,0x7b,0x00,0x38,0x40,0xd7,0x10 } },
+{ 16, 0xace0, 0, {0x2d,0x80,0x0b,0x70,0x62,0xfe,0xe1,0x87,0x14,0x39,0xc0,0x0b,0x60,0x02,0xea,0x04 } },
+{ 16, 0xacf0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xbc,0x40,0xa5,0x00,0x29,0x40 } },
+{ 16, 0xad00, 0, {0x0b,0x50,0x82,0xdc,0x40,0x84,0x04,0x2d,0xc0,0x0b,0x10,0x06,0x58,0x44,0xa7,0x10 } },
+{ 16, 0xad10, 0, {0x2d,0x80,0x0b,0x71,0x02,0xdc,0x00,0x87,0x04,0x21,0xc2,0x0b,0x50,0x02,0xc0,0x10 } },
+{ 16, 0xad20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcc,0x0a,0xa1,0x01,0x2c,0x40 } },
+{ 16, 0xad30, 0, {0x89,0x18,0x02,0xc1,0x00,0xa1,0x08,0x20,0xc0,0x0b,0x34,0x06,0x40,0x00,0x93,0x05 } },
+{ 16, 0xad40, 0, {0x2c,0x14,0x0b,0x3c,0x86,0xce,0x10,0x83,0x01,0x28,0xf1,0x0b,0x14,0x02,0xc8,0x04 } },
+{ 16, 0xad50, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa0,0x00,0xed,0x00,0x3a,0xc0 } },
+{ 16, 0xad60, 0, {0x07,0xbc,0x63,0xed,0x00,0x81,0x40,0x3e,0xc0,0x0e,0x88,0x03,0x64,0x00,0xef,0x00 } },
+{ 16, 0xad70, 0, {0x7e,0x50,0x0f,0xf0,0x02,0xfd,0x42,0xcf,0x00,0x72,0xc0,0x1f,0xb4,0x03,0xea,0x04 } },
+{ 16, 0xad80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xe8,0x00,0x99,0x00,0x3e,0xe0 } },
+{ 16, 0xad90, 0, {0x4f,0xb4,0x83,0xed,0x90,0x09,0x40,0x3e,0xc0,0x0f,0xa1,0x83,0xa8,0x01,0xeb,0x01 } },
+{ 16, 0xada0, 0, {0x3e,0x00,0x0f,0xb1,0x13,0xec,0x0c,0xfb,0x00,0x3a,0xc0,0x5f,0x20,0x23,0xe0,0x00 } },
+{ 16, 0xadb0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf8,0x00,0xfd,0x04,0x3f,0xb0 } },
+{ 16, 0xadc0, 0, {0x0d,0x60,0x03,0x3e,0x00,0xcd,0x00,0x33,0xf0,0x0f,0xf2,0x01,0xf0,0x00,0xff,0x03 } },
+{ 16, 0xadd0, 0, {0x3f,0x03,0x0f,0xf0,0x01,0xfc,0x00,0xfb,0x02,0x33,0xc2,0x0f,0xf0,0xe3,0x00,0x44 } },
+{ 16, 0xade0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6a,0x00,0xb9,0x02,0x2e,0xa0 } },
+{ 16, 0xadf0, 0, {0x4a,0xac,0x02,0x0e,0x80,0xf9,0xc0,0x36,0xe1,0x0b,0xa0,0x02,0x2a,0x08,0xbb,0x00 } },
+{ 16, 0xae00, 0, {0x2e,0x20,0x0e,0xb0,0x02,0xec,0x00,0xeb,0x00,0x22,0xc0,0x8b,0xb0,0x02,0x20,0x40 } },
+{ 16, 0xae10, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x23,0x00,0xa9,0x00,0x28,0xc0 } },
+{ 16, 0xae20, 0, {0x09,0xb2,0x22,0x6c,0x40,0x89,0x89,0x2a,0xc0,0x0b,0x14,0x06,0x26,0x00,0xab,0x02 } },
+{ 16, 0xae30, 0, {0x6e,0xe0,0x09,0xb0,0x06,0x6c,0x00,0xb3,0x02,0x22,0xc0,0x0b,0xb0,0x02,0x20,0x00 } },
+{ 16, 0xae40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x08,0x00,0xb1,0x00,0x2c,0xc0 } },
+{ 16, 0xae50, 0, {0x0a,0x30,0x02,0x2c,0x00,0xbb,0x00,0x64,0xc0,0x0b,0x32,0x0a,0x08,0x00,0x33,0x00 } },
+{ 16, 0xae60, 0, {0x6c,0x80,0x02,0x30,0x46,0xcc,0x18,0xa3,0x00,0x20,0xc0,0x0b,0x28,0x02,0x02,0x11 } },
+{ 16, 0xae70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x68,0x00,0xe9,0x00,0x38,0xc1 } },
+{ 16, 0xae80, 0, {0x0d,0xb1,0x0b,0x2c,0x00,0x89,0x00,0x3a,0xc0,0x0b,0x90,0x03,0x60,0x00,0xff,0x02 } },
+{ 16, 0xae90, 0, {0x3e,0x80,0x0f,0xf0,0x03,0xfc,0x80,0xff,0x00,0x32,0xc0,0x8f,0x80,0x0b,0x00,0x03 } },
+{ 16, 0xaea0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xd8,0x00,0xfd,0x04,0x3f,0xc0 } },
+{ 16, 0xaeb0, 0, {0x2f,0xf2,0x03,0xfc,0x11,0xef,0x00,0x3f,0xc0,0x0f,0xf4,0x43,0x70,0x00,0xff,0x00 } },
+{ 16, 0xaec0, 0, {0x3f,0x00,0x46,0xf0,0x03,0xfd,0x00,0xef,0x00,0x3f,0xc0,0x0f,0xc0,0x03,0xe8,0x06 } },
+{ 16, 0xaed0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfe,0x00,0xff,0x80,0x3d,0xe0 } },
+{ 16, 0xaee0, 0, {0x0c,0xf9,0x13,0xde,0x00,0x7f,0x80,0xb3,0xe0,0x0f,0xfc,0x03,0xbe,0x40,0xcf,0x80 } },
+{ 16, 0xaef0, 0, {0x33,0xf0,0x0f,0xf8,0x03,0x7c,0x04,0xcc,0x80,0x33,0xa0,0x0c,0xf0,0x0b,0x30,0x01 } },
+{ 16, 0xaf00, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xe0,0x20,0x88,0x00,0x2e,0x20 } },
+{ 16, 0xaf10, 0, {0x08,0x82,0x12,0xe0,0x80,0xa8,0x81,0x22,0x02,0x0b,0x80,0x02,0x20,0x80,0xa8,0x80 } },
+{ 16, 0xaf20, 0, {0x22,0x08,0x0b,0x80,0x02,0x2c,0x02,0x88,0x04,0xaa,0x20,0x08,0xb0,0x02,0x20,0x04 } },
+{ 16, 0xaf30, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xec,0x00,0xa3,0x08,0x2c,0x80 } },
+{ 16, 0xaf40, 0, {0x08,0x32,0x02,0xc4,0x20,0xa3,0x00,0x28,0x40,0x0b,0x92,0x02,0x84,0x00,0xa9,0x01 } },
+{ 16, 0xaf50, 0, {0x28,0xc8,0x1b,0x12,0x82,0xcc,0x40,0xa8,0x00,0x24,0xe0,0x0a,0x30,0x42,0x22,0x01 } },
+{ 16, 0xaf60, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x11,0xa8,0x80,0xa8,0x02,0x2e,0x40 } },
+{ 16, 0xaf70, 0, {0x68,0x80,0x10,0xc8,0x00,0xb8,0x40,0x2a,0x90,0x0b,0xa0,0x00,0x28,0x00,0xaa,0x08 } },
+{ 16, 0xaf80, 0, {0x2a,0x02,0x03,0x20,0x02,0x8c,0x00,0xa8,0x88,0x2e,0x20,0x0a,0xb0,0x02,0x30,0x04 } },
+{ 16, 0xaf90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe8,0x04,0xfa,0x00,0x3c,0x40 } },
+{ 16, 0xafa0, 0, {0x0c,0xa0,0x03,0xe8,0x00,0xeb,0x00,0x3a,0xc0,0x0f,0x20,0x53,0xa8,0x00,0xe3,0x40 } },
+{ 16, 0xafb0, 0, {0x2a,0x40,0x0f,0xa0,0x03,0x6c,0x00,0xa8,0x80,0x34,0x20,0x1e,0xb0,0x03,0x10,0x04 } },
+{ 16, 0xafc0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb4,0x00,0x9d,0x91,0x3f,0x80 } },
+{ 16, 0xafd0, 0, {0x0f,0xda,0x23,0xf4,0x00,0xcc,0x20,0x37,0x00,0x07,0xd0,0x13,0x74,0x00,0xbc,0x00 } },
+{ 16, 0xafe0, 0, {0xb7,0x80,0x0b,0xd0,0x43,0x7c,0x00,0xdc,0x04,0x3b,0x00,0x6d,0xf0,0x03,0xf8,0x00 } },
+{ 16, 0xaff0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa8,0x00,0xfa,0x80,0x3a,0x00 } },
+{ 16, 0xb000, 0, {0x2c,0xa0,0x0b,0x20,0x02,0xcb,0x62,0x3e,0x50,0x0e,0x88,0x03,0x20,0x00,0xd9,0x10 } },
+{ 16, 0xb010, 0, {0x3e,0x70,0x8c,0x80,0x33,0xec,0x80,0xd8,0x40,0x3a,0x02,0x0d,0xb0,0x03,0x10,0x04 } },
+{ 16, 0xb020, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x01,0x0c,0x00,0x39,0x80,0x22,0xc0 } },
+{ 16, 0xb030, 0, {0x0c,0x9d,0x82,0x2c,0x10,0xd0,0x40,0x2e,0xa0,0x08,0xb8,0x03,0x4e,0x02,0x8a,0x40 } },
+{ 16, 0xb040, 0, {0x0e,0xa0,0x0d,0xb0,0x03,0x3d,0x00,0xd0,0x90,0x36,0x10,0x0b,0xf0,0x02,0xb2,0x00 } },
+{ 16, 0xb050, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb1,0x00,0x60,0xc0 } },
+{ 16, 0xb060, 0, {0x8a,0x18,0x02,0x8c,0x08,0x80,0x40,0x0c,0xa0,0x02,0x30,0x02,0xce,0x00,0x82,0x48 } },
+{ 16, 0xb070, 0, {0x2c,0x80,0x2b,0x30,0x06,0x8c,0x00,0x81,0x02,0x20,0x90,0x09,0xb0,0x02,0x38,0x00 } },
+{ 16, 0xb080, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x12,0x00,0xb6,0x90,0xa3,0x30 } },
+{ 16, 0xb090, 0, {0x08,0xe8,0x22,0xb2,0x14,0x87,0x80,0x2d,0x60,0x08,0x49,0x12,0x12,0x61,0x95,0x90 } },
+{ 16, 0xb0a0, 0, {0x2d,0x61,0x0a,0x48,0x16,0x1e,0x80,0x95,0x80,0x25,0x20,0x0b,0x78,0x02,0x88,0x00 } },
+{ 16, 0xb0b0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xf1,0x00,0x28,0x8c } },
+{ 16, 0xb0c0, 0, {0x8e,0x10,0x03,0x84,0x80,0x80,0x00,0x2c,0x02,0x0a,0x9a,0x02,0xe4,0x00,0xd0,0x00 } },
+{ 16, 0xb0d0, 0, {0x3e,0x80,0x0b,0x91,0x03,0x8e,0x80,0xc2,0x08,0x38,0x80,0x0d,0xb0,0x03,0x12,0x02 } },
+{ 16, 0xb0e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xb0,0x00,0xf6,0x00,0x3f,0x44 } },
+{ 16, 0xb0f0, 0, {0x0f,0x21,0x13,0x78,0x00,0xff,0x00,0x3d,0xc0,0x0f,0xe0,0x03,0x78,0x00,0xef,0x04 } },
+{ 16, 0xb100, 0, {0x3f,0x40,0x8d,0xe8,0x03,0xdc,0x04,0xf6,0x00,0x3f,0x00,0x0f,0xf0,0x83,0xd0,0x06 } },
+{ 16, 0xb110, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe8,0x00,0xe8,0x80,0x32,0x40 } },
+{ 16, 0xb120, 0, {0x0f,0x88,0x0b,0x28,0x00,0x78,0x02,0x3e,0x80,0x0e,0x28,0x03,0x28,0x00,0xca,0x80 } },
+{ 16, 0xb130, 0, {0x32,0x00,0x0f,0xa0,0x03,0xec,0x00,0xc9,0x80,0x32,0x80,0x0f,0xb0,0x03,0x2a,0x00 } },
+{ 16, 0xb140, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x8c,0x00,0x8f,0x00,0xa1,0x80 } },
+{ 16, 0xb150, 0, {0x0b,0x70,0x42,0x14,0x00,0xb7,0x00,0x2d,0x41,0x0b,0x50,0x42,0x14,0x00,0xa5,0x00 } },
+{ 16, 0xb160, 0, {0xa1,0xc0,0x0b,0x50,0x02,0xfc,0x80,0xa5,0x00,0x21,0x00,0x0b,0xf2,0x02,0x12,0x04 } },
+{ 16, 0xb170, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0xba,0x00,0xa4,0x80,0x29,0x30 } },
+{ 16, 0xb180, 0, {0x4b,0x48,0x06,0x52,0x08,0xb4,0x80,0x2d,0x20,0x0b,0x48,0x42,0x32,0x00,0x84,0x80 } },
+{ 16, 0xb190, 0, {0x21,0x20,0x0b,0x48,0x12,0xde,0x40,0x86,0x81,0x29,0xa0,0x0b,0x78,0x0a,0x30,0x00 } },
+{ 16, 0xb1a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x00,0x83,0x05,0x20,0xe0 } },
+{ 16, 0xb1b0, 0, {0x0b,0x34,0x02,0x6c,0x10,0xb3,0x00,0x2c,0xc0,0x0b,0x36,0x4a,0x0d,0x0d,0xa3,0x00 } },
+{ 16, 0xb1c0, 0, {0x20,0xc0,0x0b,0x34,0x82,0xcc,0x02,0xa2,0x00,0x28,0x00,0x0b,0x30,0x02,0x12,0x04 } },
+{ 16, 0xb1d0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa9,0x20,0xea,0x40,0x30,0xa0 } },
+{ 16, 0xb1e0, 0, {0x07,0xa0,0x43,0x69,0x40,0xfa,0x00,0x3c,0x80,0x0f,0xa0,0x03,0x08,0x40,0xca,0x00 } },
+{ 16, 0xb1f0, 0, {0x30,0xa0,0x0f,0xa4,0x03,0xe8,0x00,0xce,0x00,0x3b,0x98,0x0f,0xa0,0x03,0x3a,0x04 } },
+{ 16, 0xb200, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xd2,0x00,0xfc,0x08,0x3f,0x00 } },
+{ 16, 0xb210, 0, {0x0b,0xc2,0x03,0xb0,0x00,0xfc,0x00,0x3f,0x00,0x0f,0xc0,0x03,0xf0,0x00,0xfc,0x00 } },
+{ 16, 0xb220, 0, {0x3f,0x04,0x0f,0xc0,0x03,0xe0,0x00,0xf8,0x00,0xb6,0x02,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0xb230, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xd9,0x00,0x3e,0x68 } },
+{ 16, 0xb240, 0, {0x4c,0x91,0x01,0xe4,0x08,0xc9,0x00,0x3e,0x40,0x2c,0x92,0x03,0xe4,0x02,0xc9,0xa0 } },
+{ 16, 0xb250, 0, {0x3e,0x70,0x0e,0x90,0x03,0xc6,0x42,0xc9,0x00,0x3e,0x40,0x0f,0x10,0x03,0x02,0x04 } },
+{ 16, 0xb260, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0x89,0x86,0x0e,0x60 } },
+{ 16, 0xb270, 0, {0x08,0x98,0x02,0xe4,0x08,0x89,0x10,0x2e,0x60,0x08,0x90,0x02,0xe4,0x00,0x89,0x0c } },
+{ 16, 0xb280, 0, {0x2e,0x60,0x08,0x90,0x02,0xe6,0x88,0x89,0x00,0x2e,0x40,0x0b,0x90,0x02,0xa0,0x00 } },
+{ 16, 0xb290, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x9d,0x10,0x2f,0x40 } },
+{ 16, 0xb2a0, 0, {0x28,0xd0,0x06,0xf4,0x02,0xad,0x00,0x2f,0x60,0x08,0xd0,0x02,0xf4,0x00,0x8d,0x00 } },
+{ 16, 0xb2b0, 0, {0x2f,0x40,0x0a,0xd0,0x02,0xe4,0x00,0x89,0x00,0x2e,0x60,0x0b,0x90,0x02,0x06,0x00 } },
+{ 16, 0xb2c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x34,0x00,0x85,0x00,0x2d,0x40 } },
+{ 16, 0xb2d0, 0, {0x08,0x58,0x02,0xd4,0x00,0xa5,0x02,0x2d,0x40,0x08,0x50,0x00,0xd4,0x00,0x85,0x00 } },
+{ 16, 0xb2e0, 0, {0x2d,0x40,0x08,0x54,0x02,0xc4,0x80,0x81,0x00,0x2c,0x60,0x0b,0x14,0x02,0x82,0x01 } },
+{ 16, 0xb2f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xd8,0x52,0x3e,0x00 } },
+{ 16, 0xb300, 0, {0x0c,0x05,0x03,0xe1,0x40,0xe8,0x04,0x3e,0x14,0x0c,0x85,0x03,0xe1,0x40,0xc8,0x00 } },
+{ 16, 0xb310, 0, {0x3e,0x14,0x0e,0xc0,0x03,0xe0,0x00,0xc0,0x02,0x3e,0x00,0x4f,0x80,0x23,0x2e,0x03 } },
+{ 16, 0xb320, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xf4,0x00,0xf9,0x01,0x3e,0x40 } },
+{ 16, 0xb330, 0, {0x4f,0x90,0x13,0xe4,0x00,0xd9,0x00,0x1e,0x40,0x0f,0x90,0x03,0xc4,0x10,0xf1,0x00 } },
+{ 16, 0xb340, 0, {0x1e,0x40,0x0f,0x90,0x03,0xe4,0xe0,0xfd,0x28,0x3f,0x40,0x0f,0x94,0x03,0xe6,0x06 } },
+{ 16, 0xb350, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xa4,0x00,0xfd,0x00,0x3f,0x40 } },
+{ 16, 0xb360, 0, {0x4d,0x50,0x02,0xe4,0x00,0x95,0x04,0x33,0x40,0x28,0xd0,0x03,0xf4,0x00,0xfd,0x00 } },
+{ 16, 0xb370, 0, {0x33,0x40,0x0f,0x91,0x03,0x34,0x00,0xcd,0x40,0x33,0x40,0x0f,0x98,0x81,0x06,0x00 } },
+{ 16, 0xb380, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe0,0x10,0xb8,0x00,0x2e,0x00 } },
+{ 16, 0xb390, 0, {0x0b,0x80,0x02,0xe0,0x10,0xb8,0x00,0x22,0x00,0x08,0x80,0x02,0xe0,0x00,0xb8,0x00 } },
+{ 16, 0xb3a0, 0, {0x22,0x00,0x0b,0x88,0x03,0xc2,0x80,0x88,0x80,0x22,0x00,0x0b,0x8c,0x02,0x0e,0x04 } },
+{ 16, 0xb3b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0xc4,0x00,0xb1,0x00,0x2c,0xc0 } },
+{ 16, 0xb3c0, 0, {0x0b,0x10,0x02,0xc4,0x00,0xbb,0x00,0x22,0x40,0x08,0x10,0x02,0xc4,0x01,0xb9,0x00 } },
+{ 16, 0xb3d0, 0, {0x20,0x40,0x1b,0x90,0x02,0x04,0x22,0x89,0x00,0x20,0x60,0x0b,0x12,0x82,0x02,0x01 } },
+{ 16, 0xb3e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa4,0x44,0xb9,0x00,0x2e,0xc0 } },
+{ 16, 0xb3f0, 0, {0x4b,0x90,0x02,0xe4,0x10,0xb9,0x02,0x02,0x40,0x08,0x91,0x42,0xe4,0x00,0xb9,0x80 } },
+{ 16, 0xb400, 0, {0x22,0x40,0x0b,0x92,0x02,0xc4,0x00,0x99,0x40,0x22,0x40,0x4b,0x90,0x12,0x06,0x04 } },
+{ 16, 0xb410, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe6,0x00,0xb9,0x01,0x3e,0x58 } },
+{ 16, 0xb420, 0, {0x0d,0x90,0x03,0xe6,0x00,0xd1,0x00,0x32,0x60,0x0c,0x98,0x02,0xe6,0x40,0xf9,0x00 } },
+{ 16, 0xb430, 0, {0xb2,0x40,0x0f,0x18,0x03,0x24,0x00,0xc9,0x80,0x32,0x50,0x0f,0x90,0x23,0x28,0x04 } },
+{ 16, 0xb440, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x00,0xf9,0x00,0x3e,0x42 } },
+{ 16, 0xb450, 0, {0x0b,0x90,0x03,0xe7,0x08,0xf9,0x00,0xbe,0x48,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x00 } },
+{ 16, 0xb460, 0, {0x3e,0x40,0x0f,0x98,0x03,0xa4,0x00,0xe9,0xa0,0xbe,0x40,0x0f,0x10,0x0b,0x4a,0x00 } },
+{ 16, 0xb470, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xd8,0x01,0x3e,0x00 } },
+{ 16, 0xb480, 0, {0x0f,0x80,0x8b,0x20,0x00,0xf8,0x20,0x3e,0x01,0x0f,0x81,0x03,0xe0,0x00,0xf8,0x08 } },
+{ 16, 0xb490, 0, {0x3a,0x00,0x0c,0x80,0x03,0xe0,0x00,0xd8,0x40,0x32,0x00,0x0f,0x80,0x13,0x0a,0x04 } },
+{ 16, 0xb4a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0x8a,0x80,0x2f,0x91 } },
+{ 16, 0xb4b0, 0, {0x0b,0xee,0x02,0x28,0x01,0xbe,0x00,0x20,0x80,0x0b,0xa0,0x02,0xea,0x80,0xb6,0x48 } },
+{ 16, 0xb4c0, 0, {0x22,0x80,0x0d,0xa0,0x02,0xfa,0x02,0x86,0x41,0xa3,0xa6,0x0b,0xa0,0x03,0x0a,0x00 } },
+{ 16, 0xb4d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x93,0x80,0x2c,0xc0 } },
+{ 16, 0xb4e0, 0, {0x0b,0x30,0x02,0x0c,0x10,0xb3,0x00,0x28,0xc0,0x0b,0x38,0x02,0xcc,0x00,0xb3,0x00 } },
+{ 16, 0xb4f0, 0, {0x28,0xc0,0x09,0x30,0x02,0xc6,0x01,0x83,0x60,0x20,0x70,0x0b,0x30,0x0a,0x4a,0x00 } },
+{ 16, 0xb500, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x2e,0x88,0x85,0x08,0x2d,0x80 } },
+{ 16, 0xb510, 0, {0x4b,0xf8,0x06,0x1c,0x80,0xb7,0x00,0x21,0xc0,0x0b,0x50,0x02,0xd4,0x00,0xb6,0x00 } },
+{ 16, 0xb520, 0, {0x29,0x60,0x09,0x70,0x02,0xd0,0xa0,0x8d,0x00,0x21,0x40,0x0b,0x32,0x02,0x28,0x00 } },
+{ 16, 0xb530, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xd5,0x80,0x3d,0xe0 } },
+{ 16, 0xb540, 0, {0x8f,0x78,0x03,0x1e,0x84,0xb7,0x82,0x3d,0x60,0x0f,0x59,0x03,0xde,0x00,0xf7,0x80 } },
+{ 16, 0xb550, 0, {0x29,0x60,0x15,0x78,0x03,0xde,0x00,0xc7,0x80,0x31,0x60,0x0f,0x7c,0x03,0x6a,0x02 } },
+{ 16, 0xb560, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x40,0xe9,0x00,0x3e,0x80 } },
+{ 16, 0xb570, 0, {0x0f,0xa0,0x03,0xed,0x30,0xfb,0x00,0x36,0xc1,0x0f,0x96,0x03,0xe4,0x00,0xb3,0x00 } },
+{ 16, 0xb580, 0, {0x34,0x40,0x0f,0xb7,0x83,0xec,0x40,0x21,0x00,0x3e,0x40,0x0f,0xb0,0x03,0xc2,0x06 } },
+{ 16, 0xb590, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xff,0x81,0x33,0xe0 } },
+{ 16, 0xb5a0, 0, {0x0f,0xf9,0x03,0xde,0x20,0xcf,0x81,0x3f,0xe0,0x07,0x78,0x03,0x3e,0x00,0xff,0x80 } },
+{ 16, 0xb5b0, 0, {0x3f,0xe0,0x04,0xf8,0x13,0xfe,0x02,0xde,0x80,0x33,0x60,0x0f,0xf8,0x03,0x00,0x00 } },
+{ 16, 0xb5c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x00,0xb7,0x00,0x21,0xc4 } },
+{ 16, 0xb5d0, 0, {0x0b,0x5a,0x02,0xdc,0x48,0x86,0x50,0x2d,0xc0,0x0b,0x31,0x02,0x94,0x60,0xb4,0x18 } },
+{ 16, 0xb5e0, 0, {0x2d,0x40,0x48,0x70,0x02,0xe8,0x00,0xa5,0x10,0x21,0x40,0x0b,0x71,0x02,0x2a,0x04 } },
+{ 16, 0xb5f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xbd,0x00,0x21,0x42 } },
+{ 16, 0xb600, 0, {0x0b,0x70,0x02,0xfc,0x02,0x85,0x00,0x25,0x40,0x0b,0x50,0x02,0x9c,0x00,0xb7,0x00 } },
+{ 16, 0xb610, 0, {0x2f,0x40,0x28,0x71,0x02,0xdc,0x00,0xa6,0x00,0x21,0xc0,0x0b,0x70,0x02,0x00,0x00 } },
+{ 16, 0xb620, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0x6d,0x80,0xb1,0x20,0xa0,0x50 } },
+{ 16, 0xb630, 0, {0x0b,0xb2,0x06,0xce,0x00,0xa0,0x34,0x2e,0xf0,0x0b,0x18,0x02,0x85,0x20,0xb3,0x4a } },
+{ 16, 0xb640, 0, {0x2c,0x54,0x88,0x38,0x02,0xcc,0x10,0xa1,0x00,0x20,0xb0,0x0b,0x30,0x02,0x08,0x04 } },
+{ 16, 0xb650, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbe,0x80,0xf3,0x08,0x10,0x54 } },
+{ 16, 0xb660, 0, {0x0b,0x88,0x13,0xff,0x00,0xc0,0x80,0x3e,0x64,0x0f,0xb4,0x83,0x07,0x00,0xf9,0xc0 } },
+{ 16, 0xb670, 0, {0x3e,0xf0,0x0c,0xfc,0x13,0xf4,0x00,0xea,0x00,0x32,0x70,0x0f,0xf0,0x0b,0x2a,0x04 } },
+{ 16, 0xb680, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x00,0xf9,0x00,0x3e,0x10 } },
+{ 16, 0xb690, 0, {0x07,0x91,0x03,0xec,0xc0,0x58,0x00,0x3e,0x44,0x0f,0x92,0x03,0xe4,0x00,0xf9,0x00 } },
+{ 16, 0xb6a0, 0, {0x3e,0xc0,0x8f,0xb3,0x03,0xe0,0x00,0xbb,0x00,0xbe,0x44,0x0f,0xb0,0x03,0xe0,0x00 } },
+{ 16, 0xb6b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x02,0xcd,0x04,0x33,0xe0 } },
+{ 16, 0xb6c0, 0, {0x0c,0xc0,0x03,0x3c,0x08,0xfe,0x00,0x33,0x60,0x2c,0xd0,0x02,0xb4,0x80,0xcf,0x00 } },
+{ 16, 0xb6d0, 0, {0x3f,0x52,0x07,0xf0,0x13,0xfc,0x00,0xce,0x10,0x33,0x42,0x0c,0xb0,0x03,0xc0,0x44 } },
+{ 16, 0xb6e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6c,0x00,0x89,0x00,0x2a,0xb0 } },
+{ 16, 0xb6f0, 0, {0x08,0x88,0x02,0x2c,0x00,0xba,0x00,0x36,0x44,0x08,0x90,0x00,0x26,0x00,0xdb,0xc0 } },
+{ 16, 0xb700, 0, {0x2e,0x40,0x0b,0xb0,0x02,0xec,0x00,0x83,0xc0,0x28,0x40,0x0a,0xb0,0x02,0xe0,0x40 } },
+{ 16, 0xb710, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x8b,0x00,0x22,0x08 } },
+{ 16, 0xb720, 0, {0x1a,0xa2,0x02,0x2c,0x10,0xb9,0x20,0x22,0x40,0x08,0x30,0x02,0x2c,0x04,0xaa,0x54 } },
+{ 16, 0xb730, 0, {0x2e,0xc0,0x0b,0xb0,0x12,0xcc,0x00,0x8b,0x08,0x22,0x40,0x08,0xb0,0x02,0xe0,0x00 } },
+{ 16, 0xb740, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x00,0x83,0x04,0x2a,0x00 } },
+{ 16, 0xb750, 0, {0x0a,0x08,0x82,0x0c,0x00,0xb8,0x00,0x64,0x40,0x08,0x30,0x02,0xa4,0x00,0xb0,0x00 } },
+{ 16, 0xb760, 0, {0x2c,0xc0,0x8b,0x30,0x10,0xc8,0x02,0x8b,0x00,0x2a,0x40,0x0a,0x30,0x02,0xc2,0x01 } },
+{ 16, 0xb770, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xc9,0x00,0x32,0x00 } },
+{ 16, 0xb780, 0, {0x1a,0x82,0x03,0x3c,0x00,0xf9,0x00,0x32,0x40,0x0c,0xd1,0x03,0xac,0x00,0xeb,0x00 } },
+{ 16, 0xb790, 0, {0x3e,0x40,0x0f,0xf0,0x03,0xed,0x00,0xc3,0x00,0x32,0xc0,0x8c,0xb0,0x03,0xc0,0x03 } },
+{ 16, 0xb7a0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x19,0xfc,0x00,0xf5,0x00,0x3f,0x00 } },
+{ 16, 0xb7b0, 0, {0x0d,0x80,0x4b,0xfc,0x00,0x7c,0x00,0x3f,0x40,0x0f,0xd2,0x0b,0x74,0x00,0xdf,0x00 } },
+{ 16, 0xb7c0, 0, {0x1d,0x40,0x8f,0xf0,0x03,0xfc,0xa0,0xff,0x00,0x3f,0x80,0x0f,0xf0,0x03,0xe8,0x06 } },
+{ 16, 0xb7d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xdf,0x84,0x3b,0xe0 } },
+{ 16, 0xb7e0, 0, {0x0f,0xf8,0x0b,0x3e,0x00,0xec,0x80,0x33,0xe1,0x0c,0x30,0x03,0x3c,0x80,0xcf,0x48 } },
+{ 16, 0xb7f0, 0, {0x37,0xc0,0x0e,0x40,0x03,0xe0,0xc0,0xc7,0x91,0xb3,0x04,0x0c,0xf0,0x03,0x30,0x00 } },
+{ 16, 0xb800, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xef,0x04,0x8b,0x80,0x22,0x41 } },
+{ 16, 0xb810, 0, {0x0b,0xb0,0x82,0x2e,0x00,0x88,0x80,0xa2,0xe0,0x0a,0xa2,0x92,0xad,0x80,0x87,0x42 } },
+{ 16, 0xb820, 0, {0x23,0xd8,0x8a,0xad,0x02,0xe0,0xc0,0x8b,0x00,0x20,0x4c,0x48,0xa4,0x02,0x20,0x04 } },
+{ 16, 0xb830, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x58,0xbb,0x00,0x28,0x80 } },
+{ 16, 0xb840, 0, {0x0b,0xb2,0x42,0x24,0x00,0xa8,0x00,0x2a,0xc0,0x0a,0x10,0x02,0x04,0x60,0xa3,0x20 } },
+{ 16, 0xb850, 0, {0x24,0xd2,0x08,0x00,0x42,0x8c,0x83,0x9b,0x01,0x20,0x49,0x08,0x33,0xc2,0x22,0x01 } },
+{ 16, 0xb860, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xac,0x00,0xab,0x88,0x22,0xa0 } },
+{ 16, 0xb870, 0, {0x0b,0xb8,0x02,0x26,0x0c,0xa8,0x00,0x2a,0xc0,0x0a,0x92,0x02,0xa4,0x00,0xab,0x06 } },
+{ 16, 0xb880, 0, {0x22,0xc0,0x0a,0xb0,0x02,0xe8,0x00,0x9b,0x00,0x02,0x40,0x08,0xa0,0x42,0x30,0x04 } },
+{ 16, 0xb890, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xd3,0x80,0x3a,0xe0 } },
+{ 16, 0xb8a0, 0, {0x0f,0x18,0x01,0x06,0x00,0xe8,0x30,0x38,0x66,0x0e,0xb8,0x03,0x2a,0x40,0xeb,0x00 } },
+{ 16, 0xb8b0, 0, {0x36,0xc1,0x0e,0x96,0x03,0xe2,0x80,0xda,0x08,0x32,0x80,0x2c,0xbb,0x03,0x10,0x04 } },
+{ 16, 0xb8c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x9c,0x00,0xdf,0x00,0x3f,0xc0 } },
+{ 16, 0xb8d0, 0, {0x0f,0xd0,0x03,0xf4,0x00,0xdc,0x80,0x37,0x60,0x0f,0xe8,0x03,0xfa,0x00,0xdf,0x01 } },
+{ 16, 0xb8e0, 0, {0x3f,0xc0,0x0f,0xc0,0x43,0xe6,0x4c,0xef,0xa0,0x3f,0x44,0x0f,0xa0,0x03,0xf8,0x00 } },
+{ 16, 0xb8f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x40,0xdb,0x00,0x36,0x80 } },
+{ 16, 0xb900, 0, {0x0c,0x98,0x03,0x26,0x00,0xf8,0x00,0x3e,0xc0,0x0e,0x18,0x03,0x84,0x02,0xe3,0x01 } },
+{ 16, 0xb910, 0, {0x38,0xc1,0x0e,0xb4,0x03,0xac,0x80,0xca,0x18,0x3a,0xd0,0x2c,0x30,0x03,0x10,0x04 } },
+{ 16, 0xb920, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x3f,0x40,0xb9,0x88,0x2e,0x80 } },
+{ 16, 0xb930, 0, {0x08,0xbc,0x02,0xa3,0x00,0xb0,0x00,0x0e,0xc0,0x08,0xb0,0x06,0x20,0x00,0x8f,0x04 } },
+{ 16, 0xb940, 0, {0x23,0xc1,0x08,0xb9,0x12,0x2f,0x00,0x83,0x80,0x36,0x40,0x08,0xad,0x02,0x32,0x00 } },
+{ 16, 0xb950, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb2,0x00,0x2c,0xc0 } },
+{ 16, 0xb960, 0, {0x09,0x32,0x02,0x84,0x00,0x33,0x00,0x2c,0xb2,0x0a,0x36,0x12,0x8c,0x08,0x93,0x05 } },
+{ 16, 0xb970, 0, {0x20,0xc0,0x0b,0x18,0x02,0xed,0x00,0x91,0x80,0x6a,0x00,0x08,0x10,0x02,0x38,0x00 } },
+{ 16, 0xb980, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1e,0x00,0xb7,0x80,0x2d,0xe0 } },
+{ 16, 0xb990, 0, {0x09,0x78,0x02,0x97,0x40,0xb4,0x80,0x2f,0xa0,0x08,0xe8,0x02,0x0e,0x40,0x97,0x82 } },
+{ 16, 0xb9a0, 0, {0x21,0xe0,0x98,0x68,0x82,0x1a,0x18,0x9d,0x90,0x2d,0xa1,0x18,0x58,0x02,0x08,0x00 } },
+{ 16, 0xb9b0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0xc0,0xf3,0x00,0x3e,0xc0 } },
+{ 16, 0xb9c0, 0, {0x0d,0xb0,0x43,0x84,0x40,0xf0,0x00,0x3c,0x82,0x0e,0x38,0x12,0x8c,0x44,0xf3,0x30 } },
+{ 16, 0xb9d0, 0, {0xba,0xc1,0x1e,0x10,0x47,0x8e,0x22,0xd1,0x10,0x38,0x18,0x0c,0x30,0x83,0x12,0x02 } },
+{ 16, 0xb9e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xbc,0x40,0xff,0x00,0x3f,0xc0 } },
+{ 16, 0xb9f0, 0, {0x0e,0xe0,0x03,0xf4,0x40,0xfc,0x00,0x3d,0xc4,0x0f,0xd0,0x01,0xf4,0x41,0xef,0x18 } },
+{ 16, 0xba00, 0, {0x3f,0xc4,0x1f,0xf0,0x03,0xf8,0x48,0xef,0x14,0x33,0x80,0x0f,0xc1,0x03,0xd0,0x06 } },
+{ 16, 0xba10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xfc,0x40,0xfb,0x00,0x3e,0xc0 } },
+{ 16, 0xba20, 0, {0x0f,0x98,0x03,0x24,0x00,0xcb,0x00,0x3e,0x40,0x0f,0xb0,0x03,0xa8,0x00,0xdb,0x28 } },
+{ 16, 0xba30, 0, {0x3e,0xc4,0x1f,0x90,0x23,0xec,0x00,0xca,0x00,0x32,0xe0,0x0c,0x90,0x03,0xea,0x00 } },
+{ 16, 0xba40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x80,0xb7,0x00,0x2d,0xc0 } },
+{ 16, 0xba50, 0, {0x4b,0x50,0x52,0x14,0x00,0xd4,0x01,0x2d,0x80,0x0b,0x60,0x02,0xd8,0x00,0xa7,0x20 } },
+{ 16, 0xba60, 0, {0x2d,0xc5,0x0b,0x40,0x16,0xdc,0x00,0x84,0x00,0x23,0xc0,0x08,0x40,0x02,0xd2,0x04 } },
+{ 16, 0xba70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x80,0xb7,0x80,0x2d,0xe0 } },
+{ 16, 0xba80, 0, {0x0b,0x78,0x0a,0x96,0x00,0x94,0x80,0x2d,0x60,0x1b,0x78,0x06,0xd2,0x00,0xa7,0x80 } },
+{ 16, 0xba90, 0, {0x2d,0xe0,0x0b,0x78,0x22,0xde,0x00,0x87,0x82,0x21,0xe0,0x08,0x58,0x02,0xf0,0x00 } },
+{ 16, 0xbaa0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x00,0xb3,0xe4,0x2c,0xc0 } },
+{ 16, 0xbab0, 0, {0x1b,0x21,0x02,0x81,0x00,0x90,0x00,0x2c,0xc8,0x0b,0x39,0x02,0xce,0x00,0xa3,0x00 } },
+{ 16, 0xbac0, 0, {0x2c,0xc0,0x0b,0x30,0x02,0xcd,0x00,0x8b,0x20,0x20,0xf0,0x08,0xb2,0x02,0xd2,0x04 } },
+{ 16, 0xbad0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfe,0xa0,0x3f,0x82 } },
+{ 16, 0xbae0, 0, {0x0f,0xe8,0x03,0x98,0x30,0xd6,0x00,0x3f,0xa0,0x0f,0xe0,0x03,0xba,0xc0,0xfa,0x00 } },
+{ 16, 0xbaf0, 0, {0x3e,0x80,0x0f,0xec,0x33,0xf8,0x02,0xce,0x00,0xb3,0xb8,0x2c,0xec,0x83,0xfa,0x04 } },
+{ 16, 0xbb00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x18,0xf8,0x40,0x3e,0x00 } },
+{ 16, 0xbb10, 0, {0x0f,0x80,0x02,0x60,0x84,0xf8,0x05,0x2e,0x04,0x8f,0x80,0x41,0xe0,0x00,0x78,0x02 } },
+{ 16, 0xbb20, 0, {0x3e,0x00,0x0f,0x81,0x83,0xe0,0x20,0xf8,0x00,0xbe,0x02,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0xbb30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe6,0x18,0xf9,0x20,0x3e,0x40 } },
+{ 16, 0xbb40, 0, {0x0f,0x9c,0x03,0xe4,0x40,0xc9,0x00,0x32,0x61,0x0c,0x90,0x13,0xc4,0x08,0xc9,0x01 } },
+{ 16, 0xbb50, 0, {0x3e,0x41,0x0f,0x18,0x03,0x24,0x00,0xc9,0xa0,0x32,0x40,0x0f,0x98,0x43,0x02,0x04 } },
+{ 16, 0xbb60, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x65,0x00,0xb1,0xc0,0x22,0x40 } },
+{ 16, 0xbb70, 0, {0x0b,0x9c,0x02,0xe7,0x10,0x89,0x00,0x28,0x44,0x08,0x94,0x22,0xe4,0x10,0x89,0x00 } },
+{ 16, 0xbb80, 0, {0x2e,0x40,0x0b,0x9f,0x22,0x26,0x60,0x89,0x80,0x22,0x40,0x0b,0x91,0x0a,0x20,0x00 } },
+{ 16, 0xbb90, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x80,0xb9,0x00,0x2e,0xc0 } },
+{ 16, 0xbba0, 0, {0x4b,0xb4,0x02,0xe4,0x20,0x89,0x20,0x22,0x40,0x08,0x94,0x02,0xec,0x00,0x89,0x00 } },
+{ 16, 0xbbb0, 0, {0x2e,0x41,0x0b,0x90,0x02,0x04,0x00,0x89,0x40,0x22,0x40,0x0b,0x90,0x02,0x06,0x00 } },
+{ 16, 0xbbc0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x00,0xb1,0x04,0x20,0x40 } },
+{ 16, 0xbbd0, 0, {0x8b,0x10,0x02,0xe4,0x05,0x81,0x00,0x28,0x40,0x28,0x12,0x12,0xc4,0x82,0x81,0x20 } },
+{ 16, 0xbbe0, 0, {0x2c,0x48,0x0b,0x12,0x0a,0x04,0x82,0x81,0x00,0x20,0x48,0x0b,0x12,0x02,0x02,0x01 } },
+{ 16, 0xbbf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x68,0xa0,0xfa,0x02,0x3e,0x14 } },
+{ 16, 0xbc00, 0, {0x0f,0x85,0x03,0xe0,0x00,0xc8,0x00,0x32,0x00,0x0c,0x85,0x03,0xc1,0x40,0xc8,0x53 } },
+{ 16, 0xbc10, 0, {0x3e,0x14,0x0f,0x80,0x03,0x01,0x48,0xc0,0x50,0xb2,0x14,0x0f,0x85,0x03,0x2e,0x03 } },
+{ 16, 0xbc20, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xe4,0x00,0xfd,0x00,0xbf,0x40 } },
+{ 16, 0xbc30, 0, {0x0f,0x50,0x13,0xd4,0x02,0xfd,0x00,0x2f,0xc0,0x0f,0xd1,0x03,0xf4,0x40,0xf9,0x10 } },
+{ 16, 0xbc40, 0, {0x3e,0x44,0x0f,0xd1,0x03,0xf4,0x40,0xff,0x00,0xbf,0x44,0x0f,0xd1,0x03,0xe6,0x06 } },
+{ 16, 0xbc50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0xa0,0xfd,0x01,0x3e,0x44 } },
+{ 16, 0xbc60, 0, {0x0f,0xd1,0x03,0xd4,0x00,0xc5,0x00,0x33,0x41,0x0f,0xdb,0x03,0x27,0x20,0xd9,0xe0 } },
+{ 16, 0xbc70, 0, {0xb2,0x70,0x0d,0xda,0x83,0xf6,0x40,0xcf,0x10,0x32,0x78,0x2d,0xda,0x03,0x06,0x00 } },
+{ 16, 0xbc80, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe1,0x00,0xb8,0x00,0x2e,0x28 } },
+{ 16, 0xbc90, 0, {0x0b,0x88,0x42,0xe0,0x10,0xd8,0x00,0x22,0x00,0x0b,0x8c,0x0a,0x23,0x00,0x88,0xc0 } },
+{ 16, 0xbca0, 0, {0x22,0x28,0x08,0x84,0x02,0xc2,0x80,0x80,0xa0,0x22,0x30,0x48,0xaa,0x82,0x0e,0x04 } },
+{ 16, 0xbcb0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0xb1,0x00,0x2c,0x40 } },
+{ 16, 0xbcc0, 0, {0x8b,0x12,0x02,0xc4,0x00,0x99,0x02,0x28,0x40,0x8b,0x16,0x02,0x84,0x81,0x91,0x30 } },
+{ 16, 0xbcd0, 0, {0x20,0x58,0x09,0x10,0x02,0xc5,0x00,0x81,0x00,0x64,0x4d,0x08,0x34,0x02,0x02,0x01 } },
+{ 16, 0xbce0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xac,0x0c,0xb9,0x04,0x2e,0x48 } },
+{ 16, 0xbcf0, 0, {0x0b,0x94,0x06,0xe4,0x00,0x99,0x40,0xaa,0x40,0x0b,0x92,0x22,0xa4,0x00,0x89,0x00 } },
+{ 16, 0xbd00, 0, {0x60,0x40,0x08,0x94,0x02,0xe4,0x00,0x89,0x80,0xa6,0x50,0x08,0x92,0x02,0x06,0x04 } },
+{ 16, 0xbd10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0x98,0x3e,0x48 } },
+{ 16, 0xbd20, 0, {0x0f,0x98,0x03,0xe5,0x20,0xd9,0x00,0x3a,0x64,0x0f,0x94,0x83,0xa4,0xc0,0xd9,0x02 } },
+{ 16, 0xbd30, 0, {0x72,0x40,0x4d,0x90,0x42,0xe4,0x82,0xc9,0x40,0x36,0x40,0x0c,0x90,0x0b,0x28,0x04 } },
+{ 16, 0xbd40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xac,0x28,0xf9,0x88,0x3e,0x40 } },
+{ 16, 0xbd50, 0, {0x0f,0x99,0x13,0xe7,0x00,0xf9,0xc0,0x36,0x60,0x0f,0x90,0x03,0x66,0x00,0xf1,0x00 } },
+{ 16, 0xbd60, 0, {0x7e,0x40,0x0f,0x99,0x07,0xe4,0x60,0xf9,0x00,0x38,0x40,0x0f,0x98,0x03,0xca,0x00 } },
+{ 16, 0xbd70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x10,0x32,0x00 } },
+{ 16, 0xbd80, 0, {0x0f,0x82,0x0b,0x21,0x00,0xe8,0x00,0x36,0x04,0x0c,0x86,0x03,0xe1,0x00,0xd8,0x00 } },
+{ 16, 0xbd90, 0, {0x32,0x00,0x0f,0x80,0x03,0x61,0x00,0xc8,0x00,0x32,0x00,0x0f,0x00,0x03,0x0a,0x04 } },
+{ 16, 0xbda0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x20,0xbe,0x00,0x22,0x80 } },
+{ 16, 0xbdb0, 0, {0x28,0xec,0x02,0x19,0x04,0x82,0x00,0x03,0x80,0x0d,0xe4,0x82,0xe8,0x00,0x8a,0x01 } },
+{ 16, 0xbdc0, 0, {0xaa,0x80,0x8b,0xed,0x82,0x3b,0x80,0x8e,0x90,0x36,0x80,0x0b,0xe0,0x03,0x4a,0x00 } },
+{ 16, 0xbdd0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x42,0x00,0xb3,0x80,0x20,0xc0 } },
+{ 16, 0xbde0, 0, {0x6b,0x34,0x16,0x40,0xc0,0x83,0x10,0x24,0x72,0x88,0xb0,0x02,0xec,0x00,0x83,0x00 } },
+{ 16, 0xbdf0, 0, {0x24,0xc0,0x0b,0x04,0x02,0x6f,0x09,0x9b,0x00,0x24,0xc0,0x0b,0x30,0x02,0x0a,0x00 } },
+{ 16, 0xbe00, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x14,0x00,0xb7,0x80,0x23,0xe4 } },
+{ 16, 0xbe10, 0, {0x28,0x78,0x82,0x74,0x14,0x8f,0x00,0x61,0xe0,0x09,0x50,0x12,0xdc,0x04,0x87,0x22 } },
+{ 16, 0xbe20, 0, {0x25,0xc8,0x1b,0x78,0x02,0x14,0x00,0x94,0x40,0xa5,0xc0,0x0b,0x60,0x22,0x68,0x00 } },
+{ 16, 0xbe30, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x12,0x20,0xb7,0x80,0xb1,0xe0 } },
+{ 16, 0xbe40, 0, {0x8f,0xf8,0x03,0x12,0x02,0xe7,0x80,0x35,0xe0,0x0c,0x68,0x06,0xcf,0xc2,0xcf,0xb0 } },
+{ 16, 0xbe50, 0, {0x25,0xf4,0x0f,0x58,0x03,0x5a,0x02,0xd5,0x80,0x75,0xfa,0x4f,0xf8,0x03,0x2a,0x02 } },
+{ 16, 0xbe60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xa5,0x90,0xf3,0x00,0x3d,0xc0 } },
+{ 16, 0xbe70, 0, {0x4f,0xb0,0x13,0xa8,0x04,0xfb,0x00,0x3c,0xc0,0x0f,0x80,0x43,0xec,0x80,0xeb,0x60 } },
+{ 16, 0xbe80, 0, {0x3a,0xc9,0x0f,0x30,0x03,0xec,0x00,0xe9,0x00,0x3e,0xc8,0x0f,0xa0,0x03,0xc2,0x06 } },
+{ 16, 0xbe90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xee,0x80,0x3f,0xe0 } },
+{ 16, 0xbea0, 0, {0x0d,0x89,0x03,0xd2,0x40,0xe5,0x81,0x39,0xe0,0x3c,0xf9,0x07,0xfe,0x00,0xcf,0x88 } },
+{ 16, 0xbeb0, 0, {0x3f,0xe0,0x0f,0xe8,0x03,0xf2,0x08,0xce,0x80,0x33,0xe0,0x0c,0xf8,0x03,0x00,0x00 } },
+{ 16, 0xbec0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x94,0x44,0xc6,0x00,0x2f,0xc0 } },
+{ 16, 0xbed0, 0, {0x08,0x58,0x02,0xd0,0xc4,0x85,0x24,0x21,0x90,0x08,0x54,0x12,0xdc,0x82,0x07,0x00 } },
+{ 16, 0xbee0, 0, {0x2d,0xc0,0x0b,0x70,0x06,0xd4,0x00,0x8e,0x48,0x21,0xc0,0x0a,0x60,0x02,0x2a,0x04 } },
+{ 16, 0xbef0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xa7,0x40,0x2d,0xc0 } },
+{ 16, 0xbf00, 0, {0x08,0x42,0x02,0xd0,0x00,0xad,0x00,0x29,0xc0,0x08,0x70,0x22,0xdc,0x28,0x87,0x00 } },
+{ 16, 0xbf10, 0, {0x2d,0xc0,0x0b,0x40,0x02,0x98,0x00,0x97,0x00,0xa0,0xc4,0x08,0x70,0x02,0x00,0x00 } },
+{ 16, 0xbf20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcc,0x08,0x93,0x00,0x2c,0xe0 } },
+{ 16, 0xbf30, 0, {0x08,0x3c,0x22,0xc1,0x00,0x81,0x00,0x20,0x80,0x88,0x15,0x02,0xce,0x30,0x83,0x00 } },
+{ 16, 0xbf40, 0, {0x2c,0xc0,0x0b,0x3c,0x02,0xcc,0x04,0x93,0xc0,0x20,0xf4,0x4a,0x0c,0x82,0x08,0x04 } },
+{ 16, 0xbf50, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa0,0x00,0xe3,0xc0,0x1f,0xe0 } },
+{ 16, 0xbf60, 0, {0x6c,0x10,0x83,0xe0,0x04,0xeb,0x00,0x3a,0x52,0x4c,0xb4,0x03,0xfe,0x02,0xcf,0x00 } },
+{ 16, 0xbf70, 0, {0x3f,0xc0,0x0f,0x84,0x43,0xe1,0x02,0xd8,0xc2,0x33,0xc0,0x0c,0x84,0x0b,0x2a,0x04 } },
+{ 16, 0xbf80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xe9,0x00,0xeb,0x10,0x3e,0xc4 } },
+{ 16, 0xbf90, 0, {0x0e,0x94,0x03,0xe4,0x00,0xfb,0x18,0x3e,0xc2,0x0f,0xb6,0x03,0xec,0x00,0xfb,0x01 } },
+{ 16, 0xbfa0, 0, {0x3e,0xc0,0x0f,0x35,0x03,0xc4,0x28,0xea,0x42,0x3e,0xc0,0x0f,0x81,0x03,0xe0,0x00 } },
+{ 16, 0xbfb0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x40,0xff,0x00,0x33,0xc0 } },
+{ 16, 0xbfc0, 0, {0x0c,0xc0,0xa3,0x30,0x28,0xcd,0xa0,0x33,0xc0,0x0c,0xe8,0x03,0x0c,0x00,0xef,0x05 } },
+{ 16, 0xbfd0, 0, {0x3d,0xc0,0x0c,0xca,0x83,0x3c,0x00,0xcd,0x08,0x3f,0xc2,0x0c,0xa0,0x03,0xc0,0x44 } },
+{ 16, 0xbfe0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x67,0x00,0xbb,0x80,0x20,0xc0 } },
+{ 16, 0xbff0, 0, {0x08,0xaa,0x02,0x08,0x00,0xa1,0x01,0x34,0xd1,0x08,0xa4,0x12,0x2c,0x00,0x8b,0x00 } },
+{ 16, 0xc000, 0, {0x6e,0xc0,0x88,0xb2,0x02,0x2c,0x08,0x89,0x80,0x2e,0xc0,0x0a,0xa8,0x03,0xa0,0x40 } },
+{ 16, 0xc010, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xba,0x80,0xa2,0xc0 } },
+{ 16, 0xc020, 0, {0x08,0xa8,0x0a,0xa0,0x00,0x8b,0x00,0xa2,0xc0,0x48,0x11,0x02,0xac,0x04,0x8b,0x00 } },
+{ 16, 0xc030, 0, {0x2e,0xc0,0x00,0x80,0x12,0x2a,0x08,0x8b,0x14,0x2c,0xc0,0x08,0x88,0x02,0xe0,0x00 } },
+{ 16, 0xc040, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x00,0xb2,0x00,0x22,0xc0 } },
+{ 16, 0xc050, 0, {0x08,0xb2,0x12,0x80,0x00,0xab,0x01,0x24,0xc0,0x08,0x00,0x02,0x0c,0x04,0x83,0x00 } },
+{ 16, 0xc060, 0, {0x2c,0xc0,0x08,0x30,0x02,0x07,0x00,0x82,0x00,0x24,0xc0,0x08,0x08,0x02,0x82,0x01 } },
+{ 16, 0xc070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xfb,0x00,0x32,0xc0 } },
+{ 16, 0xc080, 0, {0x0c,0xa2,0x03,0xa0,0x00,0xc9,0x00,0x32,0xc0,0x24,0x94,0x03,0x3c,0x02,0xcf,0x00 } },
+{ 16, 0xc090, 0, {0x2f,0xc0,0x04,0x80,0x0b,0x09,0x02,0xcb,0x01,0x3f,0xc0,0x2c,0xa0,0x03,0xc0,0x03 } },
+{ 16, 0xc0a0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x19,0xdc,0x00,0xfd,0x02,0x3f,0xc0 } },
+{ 16, 0xc0b0, 0, {0x4f,0xe4,0x13,0x70,0x00,0xfd,0x00,0x3f,0xc0,0x0f,0xc2,0x83,0xfc,0x00,0xff,0x00 } },
+{ 16, 0xc0c0, 0, {0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xff,0x00,0x3f,0xc0,0x0f,0xc0,0x03,0xa8,0x06 } },
+{ 16, 0xc0d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x20,0xef,0x30,0x3f,0x04 } },
+{ 16, 0xc0e0, 0, {0x6c,0x88,0x03,0x3a,0x42,0xe4,0x91,0x3f,0x0d,0x0d,0x48,0x03,0x3c,0xc0,0xff,0x02 } },
+{ 16, 0xc0f0, 0, {0x33,0x44,0x0c,0xf4,0x03,0xfc,0x82,0xdf,0x30,0x33,0x60,0x0d,0xf1,0x03,0x30,0x00 } },
+{ 16, 0xc100, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x10,0xed,0x00,0x8b,0x70,0x2e,0x18 } },
+{ 16, 0xc110, 0, {0x88,0x22,0x4a,0x2c,0x82,0xea,0x26,0x2e,0x0c,0x0b,0xb8,0x42,0x3d,0x80,0xbf,0x90 } },
+{ 16, 0xc120, 0, {0x2a,0x54,0x28,0xb4,0x02,0xcd,0x00,0xdb,0x40,0x2a,0x4a,0x48,0x30,0x02,0xa0,0x04 } },
+{ 16, 0xc130, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0xb0,0xa3,0x00,0x6c,0x10 } },
+{ 16, 0xc140, 0, {0x09,0x00,0x82,0x20,0x82,0xa0,0x20,0x2c,0x88,0x4b,0x80,0x00,0x0c,0x40,0xb3,0x01 } },
+{ 16, 0xc150, 0, {0x20,0x48,0x0b,0x36,0x02,0x8c,0xe0,0x83,0x64,0x24,0x40,0x28,0x32,0x02,0x22,0x01 } },
+{ 16, 0xc160, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x11,0xac,0x00,0x8b,0x00,0x2e,0x00 } },
+{ 16, 0xc170, 0, {0x09,0x80,0x80,0xa6,0x00,0xba,0x11,0x2e,0x88,0x0b,0xb0,0x00,0x2c,0x00,0xbb,0x02 } },
+{ 16, 0xc180, 0, {0x02,0x40,0x09,0xb0,0x02,0xec,0x00,0x8b,0x00,0x2c,0xc8,0x08,0xb8,0x82,0xb0,0x04 } },
+{ 16, 0xc190, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xeb,0x00,0x3e,0x92 } },
+{ 16, 0xc1a0, 0, {0x0d,0x80,0x03,0x0a,0x20,0xe9,0x00,0x3e,0x50,0x45,0x80,0x01,0x2c,0x04,0xf3,0x00 } },
+{ 16, 0xc1b0, 0, {0x90,0x60,0x09,0xb0,0x03,0xec,0x00,0x8b,0x02,0x26,0x50,0x8d,0xbc,0x03,0x10,0x04 } },
+{ 16, 0xc1c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xbc,0x00,0xff,0x02,0x3f,0x80 } },
+{ 16, 0xc1d0, 0, {0x0e,0xf9,0x02,0x7c,0x22,0xaf,0x00,0x3f,0x60,0x03,0xc0,0x0b,0xfc,0x10,0xff,0x00 } },
+{ 16, 0xc1e0, 0, {0x3f,0x4a,0x4e,0xf0,0x03,0xfc,0x00,0xf7,0x00,0x2b,0x60,0x0f,0x70,0x03,0xf8,0x00 } },
+{ 16, 0xc1f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xfb,0x00,0xb0,0x00 } },
+{ 16, 0xc200, 0, {0x0f,0x82,0x0b,0xa9,0x00,0xc9,0x00,0x32,0xd2,0x0f,0xa0,0x83,0xac,0x00,0xcb,0x10 } },
+{ 16, 0xc210, 0, {0x3e,0x40,0x0c,0xb0,0x03,0xec,0x00,0xdb,0x00,0x32,0x50,0x2c,0x95,0x03,0x10,0x04 } },
+{ 16, 0xc220, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x3c,0x04,0xbf,0x02,0x22,0x80 } },
+{ 16, 0xc230, 0, {0x0b,0x98,0x00,0x29,0x00,0xcb,0x40,0x22,0xc0,0x0b,0x24,0x02,0x3c,0x08,0x8f,0x50 } },
+{ 16, 0xc240, 0, {0x2e,0x50,0x0d,0xf0,0x02,0xfd,0x42,0x8f,0x58,0x22,0xe0,0x48,0xb5,0x02,0x32,0x00 } },
+{ 16, 0xc250, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x6c,0x00,0xb3,0x00,0x24,0x40 } },
+{ 16, 0xc260, 0, {0x4b,0x94,0x00,0x49,0x00,0x90,0x80,0x04,0x30,0x09,0x00,0x0e,0x4c,0x00,0x83,0x80 } },
+{ 16, 0xc270, 0, {0x2c,0xc0,0x09,0x30,0x22,0x6e,0x42,0x83,0x80,0x20,0x48,0x08,0x38,0x02,0x38,0x00 } },
+{ 16, 0xc280, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1e,0x00,0xb7,0x80,0x65,0x20 } },
+{ 16, 0xc290, 0, {0x0b,0x78,0x82,0x7a,0x08,0x8c,0xc0,0x25,0xa3,0x4b,0x78,0x02,0x5e,0x04,0x87,0x84 } },
+{ 16, 0xc2a0, 0, {0x2d,0x61,0x89,0x78,0x02,0xde,0x04,0x87,0x80,0xe9,0x62,0x08,0x78,0x02,0x08,0x00 } },
+{ 16, 0xc2b0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xfb,0x00,0x34,0x48 } },
+{ 16, 0xc2c0, 0, {0x0f,0x3b,0x03,0x48,0x00,0x93,0x48,0x34,0x50,0x0d,0x00,0x03,0x6c,0x00,0xc3,0x10 } },
+{ 16, 0xc2d0, 0, {0x1c,0xc2,0x05,0x30,0x03,0xcc,0x40,0xcb,0x00,0x32,0x40,0x0c,0x20,0x03,0x12,0x02 } },
+{ 16, 0xc2e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xbc,0x20,0xff,0x01,0x03,0x40 } },
+{ 16, 0xc2f0, 0, {0x0f,0xf0,0x23,0x1c,0x00,0xff,0x00,0x3b,0x80,0x0f,0xb0,0x23,0x3c,0x02,0xff,0x50 } },
+{ 16, 0xc300, 0, {0x3d,0xc4,0x0f,0xf1,0x03,0xec,0x00,0xef,0x00,0xb7,0xc0,0x0f,0xe1,0x03,0xd0,0x06 } },
+{ 16, 0xc310, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xec,0x00,0xfb,0x02,0x3e,0xe0 } },
+{ 16, 0xc320, 0, {0x0c,0x80,0x03,0x48,0x02,0xc8,0x81,0x32,0x00,0x0f,0x90,0x42,0xec,0xa0,0xfb,0x10 } },
+{ 16, 0xc330, 0, {0x3e,0xe0,0x0c,0xb1,0x03,0xec,0x40,0xfb,0x10,0x32,0x40,0x1f,0xf0,0x03,0x2a,0x00 } },
+{ 16, 0xc340, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x00,0xb7,0x24,0x2d,0x80 } },
+{ 16, 0xc350, 0, {0x08,0x70,0x42,0xd8,0x10,0x8c,0x02,0x21,0x40,0x0b,0x50,0x02,0xdd,0x00,0xe7,0x20 } },
+{ 16, 0xc360, 0, {0x2f,0x40,0x08,0x70,0x02,0xdc,0x05,0xb7,0x00,0x21,0xc0,0x0b,0xf0,0x02,0x12,0x04 } },
+{ 16, 0xc370, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xb7,0x90,0x2f,0x40 } },
+{ 16, 0xc380, 0, {0x0a,0x68,0x02,0x7a,0x00,0x97,0x80,0x21,0xe0,0x0b,0x78,0x02,0xde,0x00,0xb7,0x80 } },
+{ 16, 0xc390, 0, {0x2d,0xe0,0x08,0x78,0x06,0xde,0x00,0xb7,0xa0,0x21,0x60,0x0b,0x78,0x42,0x30,0x00 } },
+{ 16, 0xc3a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x00,0xb3,0x00,0x2c,0xc0 } },
+{ 16, 0xc3b0, 0, {0x0a,0x34,0x02,0xc8,0x00,0x83,0x4a,0x20,0xf8,0x0b,0x31,0x02,0xcc,0x00,0xa3,0x00 } },
+{ 16, 0xc3c0, 0, {0x2c,0xc0,0x08,0x30,0x02,0xcc,0x00,0xb3,0x00,0x20,0xb2,0x0b,0x20,0x42,0x12,0x04 } },
+{ 16, 0xc3d0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xba,0x00,0x3f,0x88 } },
+{ 16, 0xc3e0, 0, {0x2e,0xe0,0x43,0x59,0x88,0xde,0x00,0x33,0xb0,0x0f,0x6c,0x03,0xe8,0x00,0xfa,0x00 } },
+{ 16, 0xc3f0, 0, {0x3e,0x80,0x2c,0xa0,0x03,0xe8,0x04,0xfa,0x00,0x23,0xb8,0x0f,0xe0,0x8b,0x3a,0x04 } },
+{ 16, 0xc400, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x04,0xf8,0x01,0x3e,0x00 } },
+{ 16, 0xc410, 0, {0x09,0x82,0x21,0xe0,0x00,0xf8,0x40,0xbe,0x14,0x0f,0x84,0x81,0xe0,0x00,0xe8,0x00 } },
+{ 16, 0xc420, 0, {0x3e,0x00,0x1f,0x80,0x03,0xe0,0x00,0xf8,0x00,0xbe,0x00,0x0f,0x88,0x03,0xd2,0x00 } },
+{ 16, 0xc430, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xe1,0x00,0x32,0x40 } },
+{ 16, 0xc440, 0, {0x0c,0x90,0x43,0xe4,0x20,0xd9,0x00,0x3c,0x44,0x08,0x90,0x03,0x24,0x00,0xf9,0x01 } },
+{ 16, 0xc450, 0, {0x3e,0x48,0x0f,0x10,0x43,0x25,0x00,0xc9,0x00,0xb2,0x40,0x0c,0x90,0x03,0x02,0x04 } },
+{ 16, 0xc460, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0xb9,0x00,0xa0,0x40 } },
+{ 16, 0xc470, 0, {0x08,0x98,0x02,0xe6,0x08,0xa9,0x60,0x2e,0x49,0x08,0x94,0x02,0x24,0x00,0xb9,0x00 } },
+{ 16, 0xc480, 0, {0x2e,0x70,0x0b,0x90,0x02,0x26,0x02,0x89,0x00,0xa0,0x40,0x0a,0x90,0x0a,0x20,0x00 } },
+{ 16, 0xc490, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x00,0x22,0x40 } },
+{ 16, 0xc4a0, 0, {0x08,0x98,0x04,0xe6,0x00,0x99,0x80,0x2e,0x40,0x0a,0xb1,0x02,0x24,0x00,0xb9,0x00 } },
+{ 16, 0xc4b0, 0, {0x0e,0x40,0x0b,0x90,0x0a,0x04,0x00,0x81,0x01,0x22,0xc0,0x08,0x10,0x02,0x06,0x00 } },
+{ 16, 0xc4c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x80,0xb1,0x20,0x22,0x48 } },
+{ 16, 0xc4d0, 0, {0x08,0x18,0x06,0xc4,0x00,0xa1,0x00,0x2c,0x48,0x2a,0x30,0x02,0x04,0x80,0xb1,0x22 } },
+{ 16, 0xc4e0, 0, {0x2c,0x48,0x0b,0x12,0x02,0x05,0x80,0x81,0x60,0x22,0x50,0x0a,0x14,0x02,0x02,0x01 } },
+{ 16, 0xc4f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xf8,0x50,0x32,0x14 } },
+{ 16, 0xc500, 0, {0x0c,0x85,0x03,0xe1,0x40,0xd8,0x50,0x3e,0x14,0x0e,0x80,0x0b,0x21,0x40,0xfa,0x00 } },
+{ 16, 0xc510, 0, {0x3e,0x94,0x0f,0x85,0x03,0x20,0x00,0xc0,0x00,0x32,0x00,0x0c,0x80,0x03,0x2e,0x03 } },
+{ 16, 0xc520, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xe4,0x41,0xf9,0x10,0x3d,0x45 } },
+{ 16, 0xc530, 0, {0x0f,0xd0,0x03,0xf4,0x00,0xff,0x00,0x3f,0x45,0x0d,0xd0,0x03,0xe4,0x40,0xf9,0x10 } },
+{ 16, 0xc540, 0, {0x3f,0x44,0x0f,0x91,0x03,0xe4,0x42,0xf9,0x10,0x3f,0x40,0x0f,0xd4,0x03,0xe6,0x06 } },
+{ 16, 0xc550, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe4,0x00,0xf9,0x00,0x3e,0x40 } },
+{ 16, 0xc560, 0, {0x0c,0xd0,0x03,0xf4,0x08,0x8d,0x02,0x3f,0x40,0x0f,0xd0,0x03,0xe4,0x00,0xcd,0x00 } },
+{ 16, 0xc570, 0, {0x33,0x40,0x0c,0x90,0x03,0x24,0x00,0xf9,0x00,0x32,0x40,0x4c,0x98,0x23,0x06,0x00 } },
+{ 16, 0xc580, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe0,0x00,0xe8,0x00,0x2e,0x00 } },
+{ 16, 0xc590, 0, {0x48,0x80,0x02,0xe8,0x00,0xd0,0x00,0x2e,0x80,0x0b,0x80,0x12,0xe0,0x02,0x88,0x00 } },
+{ 16, 0xc5a0, 0, {0xa2,0x00,0x0a,0x80,0x12,0x22,0x00,0xb8,0x81,0x22,0x28,0x08,0xcf,0x02,0x0e,0x04 } },
+{ 16, 0xc5b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0xb1,0x00,0x2c,0x40 } },
+{ 16, 0xc5c0, 0, {0x28,0x10,0x02,0xc4,0x00,0x81,0x00,0x2c,0x40,0x0b,0x10,0x02,0xc4,0x00,0x91,0x00 } },
+{ 16, 0xc5d0, 0, {0x26,0x40,0x09,0x10,0x02,0x54,0xa0,0xb5,0x2c,0xa5,0x42,0x08,0x50,0x82,0x02,0x01 } },
+{ 16, 0xc5e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa4,0x00,0xa9,0x00,0x2e,0x50 } },
+{ 16, 0xc5f0, 0, {0x58,0x90,0x02,0xe4,0x80,0x9b,0x00,0x2e,0x45,0x8b,0x92,0x02,0xe4,0x00,0x99,0x00 } },
+{ 16, 0xc600, 0, {0x26,0x44,0x0b,0x90,0x02,0x64,0x08,0xb5,0x00,0x25,0x4a,0x08,0x51,0x02,0x06,0x04 } },
+{ 16, 0xc610, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0x00,0x3e,0x54 } },
+{ 16, 0xc620, 0, {0x0c,0x90,0x43,0xc4,0x00,0xc9,0x90,0x3e,0x70,0x0f,0x98,0x03,0xe4,0x00,0xd9,0x00 } },
+{ 16, 0xc630, 0, {0x34,0x60,0x4d,0x90,0x0a,0x64,0x00,0xf9,0x00,0x36,0x40,0x2c,0x9e,0x03,0x28,0x04 } },
+{ 16, 0xc640, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x00,0xf9,0x00,0x3c,0x40 } },
+{ 16, 0xc650, 0, {0x0f,0x9c,0x03,0xe6,0x30,0xf9,0x00,0x3e,0x62,0x0f,0x90,0x03,0xe4,0x00,0xe9,0x00 } },
+{ 16, 0xc660, 0, {0x3a,0x40,0x4e,0x90,0x03,0xa4,0x00,0x79,0x0c,0x3a,0x40,0x0f,0x90,0x1b,0xca,0x00 } },
+{ 16, 0xc670, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x00,0x3e,0x00 } },
+{ 16, 0xc680, 0, {0x0c,0x81,0x13,0xe1,0x08,0xc8,0x48,0x32,0x00,0x3c,0x80,0x03,0xc0,0x00,0xf0,0x10 } },
+{ 16, 0xc690, 0, {0x3e,0x06,0x0c,0x80,0x03,0xf0,0x08,0xcc,0x00,0x33,0x04,0x0c,0xc0,0x03,0x0a,0x04 } },
+{ 16, 0xc6a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0xba,0x00,0x2e,0x80 } },
+{ 16, 0xc6b0, 0, {0x08,0xec,0x42,0xfa,0x20,0x8e,0x00,0x23,0xa0,0x08,0xe8,0x42,0xe8,0x00,0xbe,0x80 } },
+{ 16, 0xc6c0, 0, {0x2f,0x80,0x08,0xa0,0x02,0xe8,0x00,0xda,0x00,0x22,0x80,0x48,0xe0,0x02,0x0a,0x00 } },
+{ 16, 0xc6d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb3,0x00,0x2c,0xc0 } },
+{ 16, 0xc6e0, 0, {0x09,0x34,0x82,0xc9,0x00,0x83,0x80,0x20,0xf0,0x08,0x30,0x82,0xcc,0x00,0xb3,0x80 } },
+{ 16, 0xc6f0, 0, {0x2c,0xf0,0x08,0xb0,0x02,0xc1,0x20,0x80,0x00,0xa0,0x32,0x08,0x00,0x02,0x0a,0x00 } },
+{ 16, 0xc700, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1c,0xc0,0xb7,0x01,0x2f,0xc8 } },
+{ 16, 0xc710, 0, {0x89,0x50,0x02,0xd8,0x02,0x87,0xc4,0x21,0xe2,0x48,0x70,0x82,0xdc,0x00,0xb7,0x00 } },
+{ 16, 0xc720, 0, {0x2c,0x40,0x08,0x72,0x02,0xce,0x00,0x97,0x08,0x23,0xc0,0x08,0x70,0x02,0x28,0x00 } },
+{ 16, 0xc730, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xf7,0xe1,0x3d,0xe8 } },
+{ 16, 0xc740, 0, {0x2d,0x68,0x03,0xf2,0x00,0xc7,0x80,0xb0,0xe0,0x08,0x68,0x03,0xdf,0x80,0xf6,0x80 } },
+{ 16, 0xc750, 0, {0x3d,0xe0,0x8c,0x7e,0x03,0xda,0x00,0xcc,0x80,0x31,0x20,0x0c,0xc8,0x0b,0x2a,0x02 } },
+{ 16, 0xc760, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x08,0xfb,0x00,0x3c,0xc0 } },
+{ 16, 0xc770, 0, {0x0e,0x80,0x03,0xe0,0x08,0xf9,0x00,0x3e,0x40,0x0f,0xb0,0x02,0xec,0x00,0xfa,0x00 } },
+{ 16, 0xc780, 0, {0x3e,0x40,0x2f,0xb0,0x03,0xe4,0x00,0xfb,0x00,0x3c,0xc0,0x2f,0xb0,0x03,0xc2,0x06 } },
+{ 16, 0xc790, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xff,0x92,0x7f,0xea } },
+{ 16, 0xc7a0, 0, {0x0c,0xf8,0x03,0xfe,0x00,0xcc,0xa0,0x3f,0x20,0x0d,0xf9,0x03,0x3e,0x00,0xcf,0x80 } },
+{ 16, 0xc7b0, 0, {0x33,0x60,0x0f,0xf8,0x03,0xf6,0x00,0xef,0x84,0x33,0xe0,0x2c,0xc8,0x03,0x00,0x00 } },
+{ 16, 0xc7c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x00,0xb7,0x00,0x2f,0xc8 } },
+{ 16, 0xc7d0, 0, {0x08,0x54,0x02,0xd8,0x00,0xd6,0x04,0x2d,0x01,0x08,0x69,0x02,0x1c,0x00,0x85,0x00 } },
+{ 16, 0xc7e0, 0, {0x21,0x43,0x0b,0x70,0x03,0x9a,0xc0,0x8c,0x00,0xa3,0x02,0x08,0xf1,0x02,0x2a,0x04 } },
+{ 16, 0xc7f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xb7,0x01,0x2d,0xcc } },
+{ 16, 0xc800, 0, {0x08,0x70,0x02,0xd4,0x00,0x94,0x28,0x2d,0xc2,0x08,0xc2,0x02,0x5c,0x00,0x86,0x00 } },
+{ 16, 0xc810, 0, {0x21,0x80,0x0b,0x71,0x02,0xdc,0x00,0xa7,0x10,0x21,0xc0,0x08,0x48,0x02,0x40,0x00 } },
+{ 16, 0xc820, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcc,0x08,0xb3,0x00,0x2c,0xf0 } },
+{ 16, 0xc830, 0, {0x08,0x05,0x02,0xc0,0x20,0x90,0x80,0x2e,0x00,0x08,0x00,0x82,0x4c,0x02,0x80,0x00 } },
+{ 16, 0xc840, 0, {0xa0,0x61,0x0b,0x30,0x02,0xa0,0x00,0x80,0x00,0xa0,0x30,0x88,0xb1,0x0a,0x48,0x04 } },
+{ 16, 0xc850, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xff,0x00,0x2d,0xc8 } },
+{ 16, 0xc860, 0, {0x0c,0x3d,0x03,0xe4,0x00,0xdb,0x02,0x3e,0xf0,0x2c,0x90,0x4b,0x7c,0x00,0xc1,0x00 } },
+{ 16, 0xc870, 0, {0x32,0x20,0x4f,0xf0,0x13,0xe0,0x00,0xe8,0x01,0x32,0x00,0x8c,0xac,0x03,0x6a,0x04 } },
+{ 16, 0xc880, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x00,0xfb,0x04,0x3e,0xc2 } },
+{ 16, 0xc890, 0, {0x4f,0xb0,0x03,0xe0,0x04,0xfa,0x40,0x3e,0xc2,0x4e,0x98,0x23,0xac,0x10,0xf8,0x00 } },
+{ 16, 0xc8a0, 0, {0x3e,0x50,0x07,0xb0,0x13,0xac,0x00,0xfb,0x00,0x3e,0xc2,0x0f,0x92,0x03,0xa0,0x00 } },
+{ 16, 0xc8b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x00,0xcf,0x00,0x3f,0xc0 } },
+{ 16, 0xc8c0, 0, {0x0c,0xc8,0x23,0x36,0x82,0xcf,0x80,0x3f,0x80,0x0c,0xe0,0x03,0xec,0x00,0xf9,0x20 } },
+{ 16, 0xc8d0, 0, {0x33,0xc0,0x0e,0xf0,0x03,0xf8,0x10,0xdc,0x00,0x33,0x00,0x4c,0xe8,0x21,0x00,0x44 } },
+{ 16, 0xc8e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6c,0x00,0xab,0x00,0x2e,0xc0 } },
+{ 16, 0xc8f0, 0, {0x4a,0x8d,0x42,0x21,0x00,0x8b,0x42,0x2e,0xd2,0x08,0xb0,0x03,0xec,0x00,0xb8,0x88 } },
+{ 16, 0xc900, 0, {0x34,0x62,0x0d,0xb0,0x02,0xe4,0x00,0x8b,0x00,0x22,0xc0,0x08,0x90,0x0a,0x20,0x40 } },
+{ 16, 0xc910, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x8b,0x00,0x2e,0xc0 } },
+{ 16, 0xc920, 0, {0x08,0xa0,0x02,0x0d,0x00,0x89,0x10,0x2e,0x08,0x28,0x92,0x02,0xec,0x04,0xbb,0x00 } },
+{ 16, 0xc930, 0, {0x22,0xa0,0x08,0xb0,0x02,0x64,0x02,0xb3,0x02,0x20,0xc0,0x08,0xa2,0x02,0xa0,0x00 } },
+{ 16, 0xc940, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x00,0xa3,0x00,0x2e,0xc0 } },
+{ 16, 0xc950, 0, {0x0a,0x90,0x22,0x0c,0x10,0x80,0x00,0x2c,0x00,0x18,0x02,0x82,0xcc,0x00,0xb0,0x00 } },
+{ 16, 0xc960, 0, {0x26,0x40,0x09,0x30,0x02,0xc8,0x20,0x80,0x00,0x20,0x00,0x08,0x10,0x06,0x82,0x01 } },
+{ 16, 0xc970, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xcb,0x00,0x2e,0xc0 } },
+{ 16, 0xc980, 0, {0x0c,0xa1,0x02,0x24,0x00,0x88,0x00,0x3c,0x00,0x0c,0x80,0x03,0xec,0x00,0xfb,0x00 } },
+{ 16, 0xc990, 0, {0x32,0x80,0x0e,0xb0,0x03,0xcc,0x80,0xdb,0x00,0x32,0xc0,0x0c,0xa0,0x03,0x80,0x03 } },
+{ 16, 0xc9a0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xfc,0x00,0xff,0x00,0x3f,0xc0 } },
+{ 16, 0xc9b0, 0, {0x4f,0xc2,0x13,0xd4,0x10,0xfc,0x00,0x3f,0x00,0x0f,0x00,0x03,0xbc,0x00,0xfc,0x00 } },
+{ 16, 0xc9c0, 0, {0x3f,0x40,0x0f,0xf0,0x23,0xe0,0x12,0xfc,0x01,0xbf,0x00,0x0f,0xd0,0x03,0x68,0x02 } },
+{ 16, 0xc9d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xc7,0x80,0x33,0xc0 } },
+{ 16, 0xc9e0, 0, {0x8b,0xb4,0x03,0xb0,0xc0,0xcf,0x2e,0x1f,0x0c,0x4f,0xc3,0x03,0x30,0x80,0xff,0x01 } },
+{ 16, 0xc9f0, 0, {0x3f,0x08,0x0f,0xf0,0x00,0x7c,0x00,0xff,0x21,0x33,0xe4,0x0c,0xe0,0x03,0x30,0x00 } },
+{ 16, 0xca00, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xee,0x00,0x8b,0x82,0x23,0xf0 } },
+{ 16, 0xca10, 0, {0x0b,0xb5,0x12,0x0d,0x88,0x88,0xc0,0x0e,0x98,0x0b,0x86,0x02,0x21,0x00,0xbb,0xc0 } },
+{ 16, 0xca20, 0, {0x2e,0xe4,0x4b,0xf7,0x83,0x2f,0x44,0xbf,0x90,0x22,0xc8,0x48,0xa6,0x82,0x20,0x04 } },
+{ 16, 0xca30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x09,0x8a,0x00,0x20,0x50 } },
+{ 16, 0xca40, 0, {0x4b,0xb2,0x0a,0x80,0xcc,0x83,0x01,0x0c,0x8c,0x0b,0x23,0x0a,0x04,0x60,0xb3,0x14 } },
+{ 16, 0xca50, 0, {0x24,0x40,0x4b,0x30,0x02,0xcc,0x10,0xb3,0x00,0x20,0xc8,0xe9,0x11,0x06,0x62,0x01 } },
+{ 16, 0xca60, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xac,0x01,0x8a,0x80,0xa2,0x44 } },
+{ 16, 0xca70, 0, {0x0b,0xb0,0x02,0xa1,0x04,0x88,0x40,0x2e,0xa0,0x0b,0x20,0x02,0x28,0x20,0xbb,0x40 } },
+{ 16, 0xca80, 0, {0x2e,0x40,0x0b,0xb0,0x02,0x2c,0x08,0xbb,0x00,0x22,0xc0,0x09,0xb0,0x02,0x70,0x04 } },
+{ 16, 0xca90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xc3,0x83,0x32,0xe0 } },
+{ 16, 0xcaa0, 0, {0x8f,0x00,0x03,0xa0,0x02,0xcb,0xc4,0x3e,0x28,0x07,0x8b,0x03,0x21,0x00,0xf9,0xc0 } },
+{ 16, 0xcab0, 0, {0x3e,0x10,0x0f,0xb0,0x03,0xec,0x00,0x7b,0x00,0x32,0xc0,0x0d,0xa0,0x03,0x50,0x04 } },
+{ 16, 0xcac0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x9c,0x02,0xff,0x00,0x3f,0xe0 } },
+{ 16, 0xcad0, 0, {0x0f,0xf4,0x43,0x5e,0x80,0xfc,0x94,0x3f,0x00,0x0f,0xc0,0x2b,0xf2,0x50,0xfd,0x21 } },
+{ 16, 0xcae0, 0, {0x7e,0x84,0x8f,0xf0,0x03,0x6c,0x0c,0xff,0x00,0x3f,0xc0,0x0e,0x62,0x03,0xb8,0x00 } },
+{ 16, 0xcaf0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xeb,0x00,0x32,0x40 } },
+{ 16, 0xcb00, 0, {0x2c,0x80,0x03,0x69,0x00,0xcb,0x30,0xb2,0x00,0x4f,0xb3,0x43,0xe5,0x00,0xcb,0x40 } },
+{ 16, 0xcb10, 0, {0x72,0x18,0x2c,0xb0,0x03,0xec,0x28,0xc3,0x21,0x3a,0xc1,0x0f,0x94,0x03,0x10,0x04 } },
+{ 16, 0xcb20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x3c,0x00,0x8b,0x20,0x22,0x50 } },
+{ 16, 0xcb30, 0, {0x08,0xb0,0x02,0x28,0x00,0x88,0xc0,0x2a,0x00,0x8b,0xb4,0x02,0xe8,0x00,0xdb,0x00 } },
+{ 16, 0xcb40, 0, {0x62,0x30,0x08,0xf0,0x02,0xfc,0x00,0x8f,0x80,0x22,0xc0,0x0b,0x95,0x47,0x32,0x00 } },
+{ 16, 0xcb50, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb1,0x00,0x20,0xc2 } },
+{ 16, 0xcb60, 0, {0x48,0x30,0x02,0x49,0x80,0x83,0x42,0x60,0x12,0x0b,0x30,0x02,0xc8,0x00,0x82,0x02 } },
+{ 16, 0xcb70, 0, {0x2c,0x30,0x09,0xb0,0x02,0xcf,0x01,0x83,0x50,0x2a,0xc0,0x0b,0x20,0x02,0xb8,0x00 } },
+{ 16, 0xcb80, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1e,0x00,0x9d,0x80,0xa0,0xe0 } },
+{ 16, 0xcb90, 0, {0x08,0x79,0x22,0x5e,0x60,0x87,0x90,0x29,0xa0,0x0b,0x78,0x02,0xc6,0x00,0x92,0x81 } },
+{ 16, 0xcba0, 0, {0x05,0xe0,0x09,0x78,0x02,0xde,0x40,0x87,0x80,0x21,0xe0,0x0b,0x29,0x02,0x08,0x00 } },
+{ 16, 0xcbb0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x40,0xf2,0x00,0x30,0xc0 } },
+{ 16, 0xcbc0, 0, {0x08,0x3a,0x03,0x44,0x04,0xc3,0x14,0x30,0xc0,0x0f,0x22,0x03,0xcc,0x80,0xc2,0x00 } },
+{ 16, 0xcbd0, 0, {0xa4,0xd2,0x0d,0x30,0x13,0xcc,0x20,0xc3,0x00,0x38,0xc4,0x4f,0x04,0x43,0x12,0x02 } },
+{ 16, 0xcbe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0x9c,0x00,0xee,0x00,0x3f,0xe0 } },
+{ 16, 0xcbf0, 0, {0x0f,0x70,0x03,0xb4,0x02,0xf4,0x10,0x3f,0xc0,0x8f,0xa0,0x03,0xfc,0x00,0x7e,0x00 } },
+{ 16, 0xcc00, 0, {0x3b,0xc0,0x0e,0xf0,0x83,0xec,0x00,0xf7,0x00,0x3f,0xc0,0x0f,0xc0,0x03,0xd0,0x06 } },
+{ 16, 0xcc10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xfc,0x00,0xf9,0x00,0x3e,0xc0 } },
+{ 16, 0xcc20, 0, {0x0f,0xa0,0x03,0xaa,0x12,0xcb,0x01,0x32,0x80,0x0f,0xb0,0x13,0x28,0x14,0xf9,0x80 } },
+{ 16, 0xcc30, 0, {0x3a,0x40,0x03,0xb4,0x03,0xec,0x42,0xcb,0x18,0x3e,0xc0,0x0f,0xb0,0x03,0x2a,0x00 } },
+{ 16, 0xcc40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9d,0x00,0xb5,0x00,0x2d,0xc4 } },
+{ 16, 0xcc50, 0, {0x0b,0x70,0x4b,0x7c,0x00,0x84,0x00,0x21,0x80,0x0b,0x70,0x02,0x94,0x10,0xb2,0x00 } },
+{ 16, 0xcc60, 0, {0x29,0xc0,0x0b,0x72,0x82,0xdc,0x00,0x87,0x20,0x2d,0xc1,0x0e,0x70,0x02,0x12,0x04 } },
+{ 16, 0xcc70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xb7,0x80,0x2d,0xe0 } },
+{ 16, 0xcc80, 0, {0x0b,0x68,0x02,0x9e,0x00,0x83,0x80,0x21,0xe0,0x5b,0x38,0x02,0x1e,0x00,0xb4,0xc0 } },
+{ 16, 0xcc90, 0, {0x25,0xe0,0x09,0x78,0x32,0xce,0x00,0x97,0x80,0x2d,0xe0,0x0b,0x5c,0x4e,0x30,0x00 } },
+{ 16, 0xcca0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x00,0xb3,0x44,0x2c,0xc0 } },
+{ 16, 0xccb0, 0, {0x0b,0x3c,0x02,0xcc,0x40,0x93,0x08,0x20,0xe0,0x0b,0x30,0x02,0x8c,0x10,0xb3,0xc0 } },
+{ 16, 0xccc0, 0, {0x28,0xd8,0x1b,0x30,0x02,0xcc,0x08,0x93,0x01,0x6c,0xc0,0x0a,0xb8,0x82,0x12,0x04 } },
+{ 16, 0xccd0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xf6,0x10,0x3e,0x80 } },
+{ 16, 0xcce0, 0, {0x4b,0xed,0x83,0xb8,0x00,0xce,0xe4,0xb3,0xa3,0x0f,0xe0,0x03,0x38,0x00,0xfe,0x00 } },
+{ 16, 0xccf0, 0, {0x3b,0x80,0x0d,0xa0,0x02,0xe8,0x00,0xda,0x00,0x3e,0x80,0x0f,0xe8,0x02,0x3a,0x04 } },
+{ 16, 0xcd00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x10,0xf8,0x40,0x3e,0x00 } },
+{ 16, 0xcd10, 0, {0x0f,0x80,0x13,0x60,0x00,0xe0,0x00,0x3e,0x00,0x43,0x08,0x03,0xe0,0x00,0xf8,0x08 } },
+{ 16, 0xcd20, 0, {0x3a,0x00,0x0f,0x80,0x03,0xe0,0x00,0xe8,0x40,0x3e,0x00,0x0e,0x80,0x23,0xd2,0x00 } },
+{ 16, 0xcd30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc4,0x00,0xd9,0xc0,0xbe,0x40 } },
+{ 16, 0xcd40, 0, {0x0f,0x90,0x03,0xe6,0x00,0xf9,0x00,0x32,0x40,0x01,0x9a,0x03,0x24,0x00,0xf9,0x00 } },
+{ 16, 0xcd50, 0, {0x3e,0x40,0x0f,0x90,0x03,0xc4,0x40,0x09,0x10,0x0e,0x40,0x0f,0x9a,0x03,0x02,0x04 } },
+{ 16, 0xcd60, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x04,0x89,0x04,0xa2,0x60 } },
+{ 16, 0xcd70, 0, {0x8b,0x9d,0x80,0xa6,0x00,0xb9,0x80,0x22,0x40,0x48,0x98,0x02,0x24,0x00,0xb9,0x00 } },
+{ 16, 0xcd80, 0, {0x2e,0x40,0x8b,0x90,0x02,0xe4,0x94,0x89,0x60,0x2e,0x40,0x0b,0x94,0x0b,0x20,0x00 } },
+{ 16, 0xcd90, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x99,0x08,0xae,0x48 } },
+{ 16, 0xcda0, 0, {0x4b,0x10,0x02,0xe5,0x81,0xb9,0x10,0x20,0x44,0x1b,0x94,0x02,0x24,0x10,0xb9,0x00 } },
+{ 16, 0xcdb0, 0, {0x6e,0x60,0x0b,0x90,0x02,0xe4,0x00,0x89,0x00,0x2e,0x40,0x0b,0x94,0x02,0x06,0x00 } },
+{ 16, 0xcdc0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x80,0x89,0x00,0xa0,0x68 } },
+{ 16, 0xcdd0, 0, {0x0b,0x12,0x02,0x84,0x89,0xb1,0x20,0x20,0x48,0x1a,0x12,0x12,0x04,0x80,0xb1,0x22 } },
+{ 16, 0xcde0, 0, {0x0c,0x48,0x0b,0x12,0x02,0xc4,0x81,0xa1,0x20,0x2c,0x40,0x0b,0x12,0x02,0x02,0x01 } },
+{ 16, 0xcdf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xd8,0x00,0xbe,0x00 } },
+{ 16, 0xce00, 0, {0x0f,0x05,0x0b,0xe1,0x40,0xf8,0x00,0x32,0x14,0x0f,0x85,0x03,0x21,0x40,0xf8,0x00 } },
+{ 16, 0xce10, 0, {0x2e,0x80,0x0f,0x85,0x13,0xe0,0x02,0xc8,0x00,0x3e,0x14,0x0f,0x05,0x01,0x2e,0x03 } },
+{ 16, 0xce20, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xe4,0x40,0xfd,0x00,0xbf,0x44 } },
+{ 16, 0xce30, 0, {0x0f,0xd1,0x03,0xf4,0x40,0x7d,0x10,0xbf,0x44,0x45,0xf1,0x2b,0xf4,0x40,0xfd,0x10 } },
+{ 16, 0xce40, 0, {0x3f,0x44,0x0f,0x91,0x03,0xe4,0x40,0xd9,0x10,0x3e,0x40,0x0f,0xd1,0x03,0xa6,0x06 } },
+{ 16, 0xce50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x00,0xfd,0x00,0x1f,0x62 } },
+{ 16, 0xce60, 0, {0x0f,0xd8,0x82,0x36,0x00,0xbd,0xa0,0x3b,0x68,0x0c,0xdc,0x83,0x26,0xc8,0xd9,0xa0 } },
+{ 16, 0xce70, 0, {0x33,0x60,0x0d,0x99,0x83,0x56,0x20,0xd5,0xa8,0x2e,0x44,0x0c,0xd8,0x83,0x86,0x04 } },
+{ 16, 0xce80, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe1,0x48,0xb8,0x00,0x2e,0x00 } },
+{ 16, 0xce90, 0, {0x0b,0x0a,0x82,0x22,0x20,0xb8,0x50,0x22,0xba,0x08,0x8a,0x22,0x22,0x80,0x88,0x00 } },
+{ 16, 0xcea0, 0, {0x22,0x01,0x08,0x0c,0x02,0x20,0x00,0x88,0x00,0x2e,0x28,0x88,0x88,0x02,0xce,0x04 } },
+{ 16, 0xceb0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0xb1,0x00,0x2c,0x40 } },
+{ 16, 0xcec0, 0, {0x1b,0x10,0x0a,0x84,0x40,0xb1,0x00,0x28,0x58,0x0a,0x32,0x02,0x05,0x00,0x99,0x40 } },
+{ 16, 0xced0, 0, {0x20,0x65,0x09,0x10,0x42,0xc4,0x00,0x91,0x00,0x2c,0x40,0x0a,0x30,0x82,0xc2,0x01 } },
+{ 16, 0xcee0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xa4,0x00,0xb9,0x00,0x2e,0x40 } },
+{ 16, 0xcef0, 0, {0x1b,0x90,0x02,0xa5,0x80,0xb9,0x10,0x22,0x48,0x08,0x10,0x42,0x04,0x10,0x09,0x00 } },
+{ 16, 0xcf00, 0, {0x22,0x40,0x08,0x90,0x02,0xe4,0x00,0x9b,0x00,0x2c,0x40,0x0a,0x94,0x22,0xc6,0x04 } },
+{ 16, 0xcf10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0x20,0x3e,0x40 } },
+{ 16, 0xcf20, 0, {0x0f,0x90,0x13,0xa7,0x10,0xf9,0x60,0xba,0x50,0x2e,0x9c,0x0a,0x25,0x84,0xd1,0xf0 } },
+{ 16, 0xcf30, 0, {0xb2,0x60,0x0d,0x90,0x03,0xe4,0x00,0xd9,0x00,0x3e,0x40,0x0e,0x90,0x03,0xa8,0x00 } },
+{ 16, 0xcf40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x0c,0xf9,0x90,0x3e,0x6a } },
+{ 16, 0xcf50, 0, {0x8f,0x90,0x23,0x66,0x00,0xf1,0x08,0x3c,0x40,0x0f,0x9c,0x43,0xe4,0x40,0xf9,0x80 } },
+{ 16, 0xcf60, 0, {0x3a,0x44,0x0f,0x90,0x03,0x24,0x04,0xe9,0x02,0x3e,0x40,0x2d,0x91,0x13,0xca,0x00 } },
+{ 16, 0xcf70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xe8,0x20,0x3e,0x01 } },
+{ 16, 0xcf80, 0, {0x0c,0x00,0x03,0xa1,0x20,0xe8,0x50,0x32,0x10,0x2c,0x8c,0x03,0x21,0x00,0xe8,0x00 } },
+{ 16, 0xcf90, 0, {0x32,0x02,0x0f,0x00,0x13,0x20,0x88,0xc8,0x08,0x32,0x00,0x0f,0x8c,0x03,0xca,0x00 } },
+{ 16, 0xcfa0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x20,0x8e,0xe3,0x2f,0x90 } },
+{ 16, 0xcfb0, 0, {0x0a,0xe0,0x06,0x3b,0x00,0xee,0x04,0x23,0x90,0x08,0xe0,0x02,0x28,0x08,0x8a,0x02 } },
+{ 16, 0xcfc0, 0, {0x75,0x90,0x8b,0xa0,0x41,0x58,0x90,0x8e,0x80,0x2a,0x81,0x0b,0xe0,0x03,0x8a,0x10 } },
+{ 16, 0xcfd0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4e,0x00,0xa3,0x00,0x6c,0x60 } },
+{ 16, 0xcfe0, 0, {0x08,0x38,0x1a,0x8e,0x40,0xa0,0x80,0x20,0xcc,0x09,0x30,0x02,0x0c,0x05,0xa3,0x04 } },
+{ 16, 0xcff0, 0, {0x28,0xc4,0x0b,0x30,0x02,0x0d,0x01,0x83,0xc0,0x20,0xc0,0x0b,0x30,0x02,0xca,0x00 } },
+{ 16, 0xd000, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1e,0x08,0x87,0x00,0x2d,0x62 } },
+{ 16, 0xd010, 0, {0x0b,0x70,0x92,0x1c,0x08,0xa0,0x00,0x61,0xc0,0x09,0x60,0x06,0x1c,0x80,0xa7,0x00 } },
+{ 16, 0xd020, 0, {0x21,0xc0,0x0b,0x72,0x02,0x58,0x01,0x87,0x88,0x29,0xc0,0x0b,0x60,0x12,0xa8,0x00 } },
+{ 16, 0xd030, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xe6,0x80,0x3d,0x60 } },
+{ 16, 0xd040, 0, {0x0c,0x78,0x42,0x96,0x00,0xe4,0x80,0xa3,0x60,0x0d,0x78,0x03,0x3f,0x00,0xe3,0x80 } },
+{ 16, 0xd050, 0, {0x21,0xe0,0x0f,0x7b,0x03,0x16,0x08,0xc7,0x80,0x31,0xe2,0x4f,0x78,0x43,0xea,0x02 } },
+{ 16, 0xd060, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0x8c,0x01,0xf8,0x00,0x3c,0x40 } },
+{ 16, 0xd070, 0, {0x0e,0xb0,0x02,0xec,0x00,0xf8,0x01,0x3e,0x40,0x4e,0x30,0x33,0xed,0x20,0xdb,0x01 } },
+{ 16, 0xd080, 0, {0xbe,0xc0,0x0f,0xb4,0x03,0xec,0x00,0xfb,0x00,0x3e,0xd8,0x0f,0xa0,0x03,0xc2,0x06 } },
+{ 16, 0xd090, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xc7,0x84,0x23,0x60 } },
+{ 16, 0xd0a0, 0, {0x0c,0x78,0x0b,0xbe,0x00,0xfd,0x80,0x3f,0xe0,0x0f,0xeb,0x03,0x3e,0x00,0xcf,0x80 } },
+{ 16, 0xd0b0, 0, {0x3b,0x25,0x0c,0xf8,0x83,0x7e,0x40,0xcd,0x80,0x33,0xe2,0x0b,0xf9,0x03,0x00,0x00 } },
+{ 16, 0xd0c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x02,0x87,0x00,0x15,0x48 } },
+{ 16, 0xd0d0, 0, {0x08,0x70,0x02,0x14,0x20,0xb6,0x00,0x35,0x9a,0x49,0xc8,0x03,0x9c,0x84,0xa7,0x00 } },
+{ 16, 0xd0e0, 0, {0x39,0xd0,0x0a,0x70,0x02,0x1a,0x08,0xa4,0x00,0x21,0xc0,0x09,0x61,0x42,0x2a,0x04 } },
+{ 16, 0xd0f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0x87,0x00,0x21,0x40 } },
+{ 16, 0xd100, 0, {0x08,0x71,0x02,0x94,0x00,0xb5,0x00,0x2d,0x40,0x0b,0xf1,0x22,0x5c,0x02,0x07,0x08 } },
+{ 16, 0xd110, 0, {0x2c,0x50,0x08,0x70,0x02,0x50,0x00,0x87,0x00,0x2d,0xc4,0x0b,0x50,0x42,0x00,0x00 } },
+{ 16, 0xd120, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcc,0x00,0x83,0x02,0x24,0x40 } },
+{ 16, 0xd130, 0, {0x18,0x3d,0x0a,0x01,0x00,0xb0,0x58,0x24,0x20,0x09,0x30,0x02,0x8f,0x40,0x83,0xe0 } },
+{ 16, 0xd140, 0, {0x2c,0xc1,0x0a,0x30,0x42,0x08,0x00,0xb3,0x01,0x6c,0xc0,0x09,0x08,0x16,0x08,0x04 } },
+{ 16, 0xd150, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0x8c,0x00,0x8b,0x00,0x32,0x40 } },
+{ 16, 0xd160, 0, {0x0c,0x25,0x03,0xa8,0x48,0xf8,0x81,0x3e,0x80,0x0f,0x80,0x63,0x7c,0x00,0xcb,0x80 } },
+{ 16, 0xd170, 0, {0x3a,0xc0,0x0c,0xf0,0x03,0x6c,0x00,0xca,0x02,0xbf,0xc0,0x0f,0x98,0x8b,0x2a,0x04 } },
+{ 16, 0xd180, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x00,0xf9,0x00,0x3e,0x50 } },
+{ 16, 0xd190, 0, {0x2f,0xa4,0x0b,0xc8,0x00,0xf0,0x40,0x3e,0xd0,0x0f,0xa0,0x33,0xec,0x20,0xfb,0x04 } },
+{ 16, 0xd1a0, 0, {0x7a,0xe0,0x0f,0xb0,0x03,0xed,0x08,0xe9,0x03,0x32,0xc0,0x0d,0x90,0x03,0xe0,0x00 } },
+{ 16, 0xd1b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xec,0x40,0xee,0x00,0x3e,0xc0 } },
+{ 16, 0xd1c0, 0, {0x0c,0xda,0x03,0x70,0x04,0xcc,0x02,0xb1,0xa0,0x0e,0xf0,0x23,0xec,0x00,0xff,0x00 } },
+{ 16, 0xd1d0, 0, {0x37,0x20,0xcd,0xb0,0x73,0xec,0x88,0xfb,0x80,0x3f,0xc0,0x0f,0x30,0x03,0x00,0x44 } },
+{ 16, 0xd1e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6e,0x00,0x88,0x80,0x2c,0xe1 } },
+{ 16, 0xd1f0, 0, {0x08,0x94,0x0a,0xa9,0x02,0x88,0x40,0x22,0xd0,0x08,0xb9,0x42,0xec,0x04,0xbb,0x00 } },
+{ 16, 0xd200, 0, {0x2c,0xd4,0x0d,0xb0,0x02,0xed,0x20,0xbb,0xd0,0x2e,0xc0,0x0b,0xb0,0x02,0xa0,0x40 } },
+{ 16, 0xd210, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x24,0x00,0xab,0x80,0x2e,0xf0 } },
+{ 16, 0xd220, 0, {0x29,0xa0,0x82,0x6d,0x00,0x88,0x08,0x22,0x04,0x08,0x90,0x42,0xec,0x00,0xbb,0x00 } },
+{ 16, 0xd230, 0, {0x2a,0x81,0x08,0xb0,0x02,0xe4,0x09,0xba,0x04,0x2e,0xc1,0x4b,0x98,0x82,0x20,0x00 } },
+{ 16, 0xd240, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x00,0x83,0x00,0x2c,0xc0 } },
+{ 16, 0xd250, 0, {0x0a,0x21,0x02,0x84,0x10,0x82,0x00,0xe0,0x00,0x18,0x0a,0x12,0xcc,0x00,0xb3,0x00 } },
+{ 16, 0xd260, 0, {0x0c,0xc0,0x09,0x30,0x02,0xcc,0x90,0xb0,0x00,0x2c,0xc0,0x0b,0x10,0x02,0x82,0x01 } },
+{ 16, 0xd270, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x64,0x00,0xeb,0x00,0x3e,0x00 } },
+{ 16, 0xd280, 0, {0x2c,0xb4,0x03,0x64,0x08,0x88,0x00,0xb2,0x00,0x0c,0xb2,0x43,0xfc,0x00,0xfb,0x00 } },
+{ 16, 0xd290, 0, {0x56,0x00,0x0c,0xf0,0x01,0xe4,0x00,0xfb,0x00,0x3f,0xc0,0x0f,0x80,0x0b,0x00,0x03 } },
+{ 16, 0xd2a0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xf4,0x00,0xff,0x00,0x3f,0x40 } },
+{ 16, 0xd2b0, 0, {0x2d,0xf0,0x61,0xf0,0x00,0xf4,0x00,0x27,0x01,0x0d,0xb1,0x11,0xfc,0x00,0xff,0x02 } },
+{ 16, 0xd2c0, 0, {0x07,0xc0,0x0f,0xf0,0x03,0xec,0x40,0xff,0x00,0x3f,0xc0,0x0f,0xc0,0x03,0x68,0x06 } },
+{ 16, 0xd2d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf6,0x00,0xef,0x90,0x3d,0x4c } },
+{ 16, 0xd2e0, 0, {0x2c,0xc0,0x13,0xf4,0x08,0xfd,0x20,0x37,0x4c,0x8e,0x82,0x83,0x74,0x84,0xdc,0xc2 } },
+{ 16, 0xd2f0, 0, {0x3f,0xd8,0x0d,0xf2,0x03,0xec,0xc0,0xff,0x81,0x3f,0x00,0x0c,0xf8,0x03,0xf0,0x00 } },
+{ 16, 0xd300, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xe6,0x00,0x8b,0x24,0x2e,0x5c } },
+{ 16, 0xd310, 0, {0x08,0x8d,0x02,0xff,0x48,0xb9,0x90,0x2f,0x54,0x0b,0x84,0x82,0x3e,0x40,0xa0,0x80 } },
+{ 16, 0xd320, 0, {0x2e,0xc4,0x0a,0xfc,0x42,0xed,0x80,0xb9,0x80,0x2e,0x60,0x0a,0x98,0x12,0xe0,0x04 } },
+{ 16, 0xd330, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xe4,0x01,0xa3,0x00,0x28,0x48 } },
+{ 16, 0xd340, 0, {0x0a,0x00,0x42,0xc4,0x00,0xb1,0x00,0x2c,0x49,0x0b,0x0a,0x42,0x04,0xa2,0x91,0x21 } },
+{ 16, 0xd350, 0, {0x2c,0xc9,0x08,0x31,0x02,0x8c,0xc1,0xa3,0x00,0x2c,0x40,0x08,0x18,0x02,0xa2,0x01 } },
+{ 16, 0xd360, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xa0,0x20,0x8b,0x82,0x2e,0x44 } },
+{ 16, 0xd370, 0, {0x58,0x80,0x02,0xe4,0x00,0xbb,0x10,0x2e,0x40,0x0b,0xa1,0x12,0x0c,0x01,0x89,0x10 } },
+{ 16, 0xd380, 0, {0x2e,0xc0,0x0a,0xb0,0x02,0xec,0x01,0xb8,0x80,0x2e,0xe2,0x0a,0xa1,0x02,0xf0,0x04 } },
+{ 16, 0xd390, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xeb,0x40,0xeb,0x40,0x3e,0x60 } },
+{ 16, 0xd3a0, 0, {0x0e,0x87,0x33,0xe4,0x00,0xb9,0xa1,0x36,0xc0,0x0e,0xa8,0x0b,0x26,0x00,0xda,0xc0 } },
+{ 16, 0xd3b0, 0, {0x3e,0xc0,0x8d,0xb0,0x03,0xec,0x00,0xfb,0x85,0x3e,0xe1,0x08,0xb8,0x03,0x90,0x05 } },
+{ 16, 0xd3c0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb8,0x00,0xff,0x02,0x2f,0x60 } },
+{ 16, 0xd3d0, 0, {0x03,0xe8,0x83,0xfc,0x10,0xfd,0x80,0x1f,0x40,0x1f,0xd0,0x13,0xbe,0x40,0xee,0x04 } },
+{ 16, 0xd3e0, 0, {0x3f,0xc0,0x0f,0xf0,0x43,0xfc,0x08,0xfd,0x00,0x3c,0xc0,0x0f,0xd0,0x11,0xf8,0x00 } },
+{ 16, 0xd3f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa4,0x00,0xdb,0x00,0xb2,0x40 } },
+{ 16, 0xd400, 0, {0x0e,0x94,0x03,0x24,0x00,0xd9,0x00,0xba,0xc0,0x0c,0x20,0x03,0xe4,0x90,0xfb,0x00 } },
+{ 16, 0xd410, 0, {0x3a,0xc0,0x0c,0xb0,0x03,0xec,0x01,0xfa,0x00,0x3e,0xd0,0x2c,0x98,0x03,0x90,0x04 } },
+{ 16, 0xd420, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x03,0x00,0x8b,0x00,0x22,0x48 } },
+{ 16, 0xd430, 0, {0x08,0x84,0x22,0x2c,0x00,0xb9,0x00,0x22,0xc0,0x08,0xa0,0x02,0xed,0x00,0x8b,0xa0 } },
+{ 16, 0xd440, 0, {0x21,0xc0,0x08,0xf0,0x02,0xfc,0x00,0xb9,0x80,0x2e,0xc0,0x08,0xa0,0x02,0x32,0x00 } },
+{ 16, 0xd450, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x45,0x20,0x93,0x00,0x22,0xf8 } },
+{ 16, 0xd460, 0, {0x0b,0x30,0x0a,0x84,0x40,0xb2,0x00,0x20,0x40,0x08,0x10,0x02,0xc4,0x00,0x80,0x80 } },
+{ 16, 0xd470, 0, {0x28,0xc0,0x28,0x39,0x02,0x4c,0x00,0xb1,0x00,0x2c,0xc0,0x08,0x30,0x02,0xb8,0x00 } },
+{ 16, 0xd480, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x36,0x00,0x9f,0x80,0x21,0x60 } },
+{ 16, 0xd490, 0, {0x09,0x38,0x02,0x9e,0x00,0xb2,0xc0,0x20,0x60,0x48,0x48,0x12,0xd6,0xc6,0x86,0xd0 } },
+{ 16, 0xd4a0, 0, {0x21,0xe0,0x08,0x78,0x00,0xde,0x80,0xb7,0x82,0x2d,0xe0,0x08,0xf8,0x02,0x08,0x00 } },
+{ 16, 0xd4b0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x20,0xd3,0x10,0x30,0xc8 } },
+{ 16, 0xd4c0, 0, {0x0f,0x30,0x03,0x84,0x00,0xf1,0x00,0x30,0x40,0x24,0x19,0x03,0xe4,0xc0,0xe0,0x40 } },
+{ 16, 0xd4d0, 0, {0x3a,0xc0,0x0c,0x32,0x03,0xce,0x80,0xb1,0x28,0x3c,0xc0,0x0c,0x30,0x13,0x92,0x02 } },
+{ 16, 0xd4e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0x9c,0x00,0xe6,0x00,0x7f,0xc0 } },
+{ 16, 0xd4f0, 0, {0x0e,0xf0,0x23,0x74,0x40,0xff,0x10,0x3f,0x40,0x4f,0xd0,0x03,0xfc,0xd2,0xce,0x04 } },
+{ 16, 0xd500, 0, {0x3f,0xc0,0x0f,0xf4,0x03,0xfc,0x00,0xfe,0x00,0x3f,0xc0,0x0f,0x71,0x03,0xd0,0x12 } },
+{ 16, 0xd510, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xee,0x00,0xcb,0x00,0x16,0xc0 } },
+{ 16, 0xd520, 0, {0x0d,0x80,0x03,0x27,0x20,0xcb,0x00,0x3e,0xc2,0x0a,0xb0,0x53,0xe4,0x28,0xc1,0x81 } },
+{ 16, 0xd530, 0, {0x32,0xc1,0x0e,0xb9,0x03,0x2c,0x00,0xf1,0x80,0x35,0xe0,0x0c,0xb8,0x03,0x2a,0x04 } },
+{ 16, 0xd540, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x02,0x87,0x10,0x2d,0x40 } },
+{ 16, 0xd550, 0, {0x08,0x70,0x03,0x5c,0x00,0xa7,0x00,0x2d,0x40,0x28,0x70,0x02,0xd4,0x04,0x87,0x04 } },
+{ 16, 0xd560, 0, {0xa1,0xd0,0x0b,0x72,0x02,0x1d,0x00,0xf7,0x00,0x21,0xc0,0x0d,0x50,0x02,0x12,0x04 } },
+{ 16, 0xd570, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0x85,0x80,0x25,0xe0 } },
+{ 16, 0xd580, 0, {0x09,0x78,0x02,0x37,0x03,0x87,0x80,0x2f,0xe0,0x08,0x78,0x12,0xc6,0x10,0x8d,0x80 } },
+{ 16, 0xd590, 0, {0x25,0xe8,0x0b,0x38,0x02,0x1e,0x80,0xbc,0x84,0x25,0xe0,0x08,0x58,0x02,0x70,0x00 } },
+{ 16, 0xd5a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcd,0x80,0x83,0x88,0x2c,0xc0 } },
+{ 16, 0xd5b0, 0, {0x08,0x3c,0x02,0x4e,0x01,0xa3,0xd2,0x2e,0xc4,0x08,0xb1,0x02,0xcc,0x00,0x83,0x80 } },
+{ 16, 0xd5c0, 0, {0x24,0xc1,0x0b,0x30,0x02,0x0c,0x00,0xb3,0x40,0xa0,0xd2,0x09,0x30,0x12,0x52,0x00 } },
+{ 16, 0xd5d0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xba,0x00,0xca,0xc0,0x36,0x80 } },
+{ 16, 0xd5e0, 0, {0x0d,0x67,0x13,0x28,0x00,0xce,0x00,0x3e,0xa0,0x0c,0xed,0x03,0xe8,0x00,0xce,0xe0 } },
+{ 16, 0xd5f0, 0, {0x36,0x80,0x1e,0xa0,0x0b,0x28,0x04,0xfe,0x00,0xb7,0xb2,0x0c,0xe0,0x0b,0x7a,0x00 } },
+{ 16, 0xd600, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x40,0xf8,0x10,0x2e,0x10 } },
+{ 16, 0xd610, 0, {0x0f,0x80,0x03,0xe0,0x01,0xd8,0x0a,0x3e,0x00,0x0f,0x80,0x03,0xc0,0x02,0xf8,0x08 } },
+{ 16, 0xd620, 0, {0x3a,0x00,0x0f,0x80,0x03,0xe0,0x10,0xe8,0x20,0xbe,0x00,0x0f,0x80,0x13,0x92,0x00 } },
+{ 16, 0xd630, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe5,0x00,0xfb,0x00,0x3e,0x40 } },
+{ 16, 0xd640, 0, {0x0c,0x91,0x03,0x26,0x00,0x61,0x80,0x32,0x40,0x0c,0x90,0x03,0x24,0x00,0xc9,0x00 } },
+{ 16, 0xd650, 0, {0x1e,0x40,0x0c,0x9c,0x03,0xe4,0x01,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xc2,0x00 } },
+{ 16, 0xd660, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x67,0x00,0xb9,0x00,0x2c,0x40 } },
+{ 16, 0xd670, 0, {0x00,0x9c,0x02,0xa6,0x00,0x79,0x00,0x22,0x40,0x28,0x90,0x02,0x24,0x00,0x89,0x00 } },
+{ 16, 0xd680, 0, {0x2c,0x44,0x08,0x98,0x02,0xe4,0x00,0xb9,0x80,0x2e,0x40,0x0b,0x90,0x02,0xe0,0x01 } },
+{ 16, 0xd690, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x00,0xbb,0x00,0x26,0x50 } },
+{ 16, 0xd6a0, 0, {0x28,0x90,0x82,0x24,0x84,0x99,0x20,0x22,0x40,0x49,0x90,0x02,0x24,0x00,0x89,0x00 } },
+{ 16, 0xd6b0, 0, {0x2e,0x40,0x08,0x90,0x02,0xe4,0x00,0xb9,0x60,0x2e,0x40,0x0b,0x90,0x02,0xc6,0x04 } },
+{ 16, 0xd6c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x06,0x00,0xb1,0x00,0x2e,0x48 } },
+{ 16, 0xd6d0, 0, {0x08,0x12,0x02,0x84,0x80,0xb1,0x20,0xa0,0x48,0x09,0x12,0x0a,0x04,0x80,0x81,0x00 } },
+{ 16, 0xd6e0, 0, {0x2c,0x48,0x28,0x12,0x42,0xc4,0x88,0x31,0x00,0x2c,0x40,0x0b,0x18,0x02,0xc2,0x01 } },
+{ 16, 0xd6f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xf8,0x50,0x36,0x14 } },
+{ 16, 0xd700, 0, {0x0c,0x80,0x03,0x20,0x00,0xe8,0x00,0x32,0x14,0x0c,0x85,0x03,0x21,0x40,0xc8,0x50 } },
+{ 16, 0xd710, 0, {0x3e,0x14,0x0c,0x80,0x03,0xe1,0x40,0x38,0x00,0x3e,0x00,0x8f,0x80,0x03,0xee,0x03 } },
+{ 16, 0xd720, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xd4,0x00,0xfb,0x04,0x3d,0x44 } },
+{ 16, 0xd730, 0, {0x0f,0x51,0x23,0xd4,0x48,0xed,0x10,0x3d,0x44,0x4e,0xd1,0x23,0xf4,0x42,0xfd,0x00 } },
+{ 16, 0xd740, 0, {0x3e,0x44,0x8f,0x91,0x03,0xe4,0x58,0xfd,0x00,0x3f,0x50,0x0f,0x50,0x03,0xe6,0x06 } },
+{ 16, 0xd750, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf4,0x00,0xf9,0x00,0x3d,0x40 } },
+{ 16, 0xd760, 0, {0x0c,0xd0,0x03,0xf4,0x00,0xdd,0x02,0x3e,0x40,0x0c,0x90,0x03,0xe4,0x40,0xc9,0x10 } },
+{ 16, 0xd770, 0, {0x37,0x40,0x07,0xd0,0x07,0x24,0x00,0xe5,0x00,0x2f,0x6a,0x0f,0x70,0x03,0x06,0x00 } },
+{ 16, 0xd780, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe0,0x00,0xb8,0x00,0x3a,0x00 } },
+{ 16, 0xd790, 0, {0x80,0x80,0x02,0xe0,0x00,0x88,0x00,0x2e,0x00,0x0a,0x80,0x53,0xa2,0x80,0x2c,0xa0 } },
+{ 16, 0xd7a0, 0, {0x22,0x00,0x0b,0x80,0x0a,0x20,0x00,0xb8,0x00,0x2e,0x10,0x09,0x80,0x03,0x0e,0x04 } },
+{ 16, 0xd7b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0xb1,0x00,0x6c,0x40 } },
+{ 16, 0xd7c0, 0, {0x2a,0x10,0x02,0x84,0x01,0x81,0x80,0x2e,0x40,0x09,0x10,0x02,0xf4,0x00,0x8d,0x04 } },
+{ 16, 0xd7d0, 0, {0x20,0x40,0x0b,0x10,0x02,0x84,0x00,0xb1,0x00,0x2c,0x40,0x0b,0x98,0x02,0x42,0x01 } },
+{ 16, 0xd7e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xa4,0x20,0xb9,0x00,0x2a,0x40 } },
+{ 16, 0xd7f0, 0, {0x88,0xb4,0x02,0xe6,0x01,0xa9,0x20,0x2e,0x48,0x0a,0x90,0x00,0xa4,0x40,0xad,0x40 } },
+{ 16, 0xd800, 0, {0x22,0x40,0x0b,0x90,0x12,0xa4,0x04,0xb9,0x01,0x2e,0x41,0x0b,0x90,0x02,0x06,0x04 } },
+{ 16, 0xd810, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0xc0,0x3e,0x60 } },
+{ 16, 0xd820, 0, {0x0c,0x94,0x13,0xa6,0x02,0xd9,0x42,0x1c,0x60,0x0c,0x9e,0x01,0xc6,0x04,0xc1,0x00 } },
+{ 16, 0xd830, 0, {0xb2,0x40,0x1f,0x90,0x02,0xa4,0x00,0xe9,0x08,0x3e,0x68,0x4f,0x98,0x0b,0x68,0x04 } },
+{ 16, 0xd840, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa6,0x40,0xf9,0x20,0x38,0x70 } },
+{ 16, 0xd850, 0, {0x0f,0x91,0x03,0xe4,0x00,0xd9,0x80,0x3e,0x40,0x0f,0x9c,0x13,0xa4,0x00,0xf9,0x00 } },
+{ 16, 0xd860, 0, {0x3e,0x40,0x0f,0x10,0x03,0x64,0x10,0xf9,0x0a,0x3e,0x50,0x0d,0x9a,0x03,0xca,0x00 } },
+{ 16, 0xd870, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x00,0xd8,0x04,0x3e,0x00 } },
+{ 16, 0xd880, 0, {0x0c,0x81,0x13,0xc0,0x02,0xd8,0x20,0x3e,0x00,0x2d,0x84,0x03,0xe0,0x00,0xcc,0x08 } },
+{ 16, 0xd890, 0, {0x3a,0x00,0x0f,0x80,0x43,0xe0,0x00,0xf8,0x41,0x32,0x00,0x07,0x81,0x8b,0x0a,0x04 } },
+{ 16, 0xd8a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x3a,0x60,0x8a,0x00,0x2f,0xa8 } },
+{ 16, 0xd8b0, 0, {0x0a,0xe0,0x22,0xe8,0x02,0x7e,0x48,0x2e,0x80,0x08,0xa0,0x42,0xe8,0x04,0x8e,0x00 } },
+{ 16, 0xd8c0, 0, {0x23,0xa8,0x0b,0xa8,0x82,0xe8,0x00,0xee,0x00,0xa2,0x80,0x4b,0x60,0x02,0x0a,0x00 } },
+{ 16, 0xd8d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x93,0x00,0x6c,0xc0 } },
+{ 16, 0xd8e0, 0, {0x08,0x30,0x02,0xcc,0x00,0x13,0x81,0x2c,0xc0,0x08,0x30,0x02,0xce,0x40,0x82,0x40 } },
+{ 16, 0xd8f0, 0, {0x28,0xe0,0x0b,0x38,0x02,0xcc,0x00,0xb3,0x10,0x24,0xc0,0x8b,0x38,0x02,0x0a,0x00 } },
+{ 16, 0xd900, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1e,0x00,0x87,0x20,0x2f,0xc0 } },
+{ 16, 0xd910, 0, {0x0a,0x70,0x02,0xdc,0x0a,0xb6,0x00,0x2c,0xc8,0x88,0x72,0x06,0xd8,0x00,0x86,0x00 } },
+{ 16, 0xd920, 0, {0x21,0xc0,0x0b,0x70,0x02,0xdc,0x84,0xaf,0x80,0xa5,0xc0,0x0b,0xd0,0x02,0x28,0x00 } },
+{ 16, 0xd930, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xd7,0x80,0x3d,0xa0 } },
+{ 16, 0xd940, 0, {0x1c,0x78,0x13,0xd6,0x02,0xd7,0x80,0x3d,0xec,0x08,0x7e,0x23,0xfe,0x00,0xce,0x80 } },
+{ 16, 0xd950, 0, {0x39,0x60,0x0f,0x78,0x03,0xdf,0x00,0xf6,0x80,0x75,0xe0,0x0f,0x78,0x03,0x2a,0x02 } },
+{ 16, 0xd960, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0x8c,0x00,0xfb,0x10,0x3e,0x80 } },
+{ 16, 0xd970, 0, {0x1f,0xa0,0x21,0xcc,0x00,0xfa,0x00,0x3e,0xc0,0x0e,0xb0,0x03,0xe8,0x02,0xfa,0x00 } },
+{ 16, 0xd980, 0, {0x3e,0x40,0x0f,0xb0,0x13,0xec,0x00,0xea,0x01,0x3a,0xc0,0x0f,0x90,0x03,0xc2,0x06 } },
+{ 16, 0xd990, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfc,0x00,0xff,0x80,0x3f,0x60 } },
+{ 16, 0xd9a0, 0, {0x08,0x99,0x07,0x7e,0x00,0xdd,0x80,0x3f,0xe2,0x0c,0xf8,0x03,0xf6,0x02,0xdf,0x80 } },
+{ 16, 0xd9b0, 0, {0xb3,0xe0,0x0c,0xf8,0x03,0x3e,0x41,0xcc,0x80,0x33,0xe4,0x0f,0xf8,0x03,0xc0,0x00 } },
+{ 16, 0xd9c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x40,0xb7,0x00,0x2d,0xc0 } },
+{ 16, 0xd9d0, 0, {0x0d,0x5a,0x22,0xdc,0x80,0x75,0x00,0x2d,0xc0,0x08,0x71,0x02,0xf0,0x20,0x87,0x00 } },
+{ 16, 0xd9e0, 0, {0x21,0xc0,0x0a,0x70,0x02,0x1c,0x00,0xd4,0x28,0x21,0xc0,0x0b,0x72,0x02,0xea,0x04 } },
+{ 16, 0xd9f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x40,0xb7,0x00,0x2d,0x00 } },
+{ 16, 0xda00, 0, {0x08,0x72,0x22,0xf4,0x00,0x87,0x00,0x2d,0xc2,0x08,0x70,0x02,0xd4,0x00,0x87,0x80 } },
+{ 16, 0xda10, 0, {0x25,0x40,0x09,0x30,0x02,0x5c,0x01,0xad,0x00,0x29,0xd0,0x4b,0x70,0x02,0xc0,0x00 } },
+{ 16, 0xda20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcc,0x00,0xbb,0xc8,0x2c,0xa0 } },
+{ 16, 0xda30, 0, {0x09,0x20,0x02,0xce,0x00,0xa3,0x00,0x2c,0xe0,0xa8,0x3d,0x42,0xc2,0x00,0x8b,0x80 } },
+{ 16, 0xda40, 0, {0x24,0x40,0x0b,0x30,0x0a,0x6c,0x08,0xa3,0x40,0xa8,0xe0,0x0b,0x34,0x02,0xc8,0x04 } },
+{ 16, 0xda50, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xad,0x00,0xff,0x48,0x3c,0x28 } },
+{ 16, 0xda60, 0, {0x0c,0xa9,0x23,0x6c,0x80,0x8b,0x00,0x3f,0xc0,0x0c,0xfc,0x03,0xec,0x00,0xd8,0x80 } },
+{ 16, 0xda70, 0, {0x34,0x40,0x0d,0x30,0x03,0x7c,0x02,0xa3,0x40,0x38,0x68,0x0f,0x24,0x03,0xea,0x04 } },
+{ 16, 0xda80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xed,0x88,0xfb,0x00,0x3e,0x50 } },
+{ 16, 0xda90, 0, {0x0f,0xa1,0x03,0xec,0x04,0x3a,0xc0,0x3e,0xc0,0x0f,0xb0,0x83,0xe8,0x02,0xf8,0x10 } },
+{ 16, 0xdaa0, 0, {0x3a,0x41,0x0e,0x90,0x03,0xac,0x00,0x9b,0x08,0xb6,0x40,0x0f,0x81,0x03,0xe0,0x00 } },
+{ 16, 0xdab0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xff,0x00,0xb3,0x20 } },
+{ 16, 0xdac0, 0, {0x0c,0x50,0x13,0x1c,0x09,0xcd,0x83,0x33,0xc0,0x83,0x70,0x00,0x3c,0x00,0xdc,0x10 } },
+{ 16, 0xdad0, 0, {0x32,0x60,0x0e,0xf1,0x43,0x2c,0x00,0xce,0x04,0x3b,0x70,0x0c,0xf0,0x83,0x00,0x44 } },
+{ 16, 0xdae0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x67,0x80,0xbb,0x01,0x62,0x21 } },
+{ 16, 0xdaf0, 0, {0x8a,0x89,0x20,0x2c,0x00,0x80,0xe0,0x22,0xc0,0x0b,0xb0,0x03,0xd8,0x10,0x8c,0x04 } },
+{ 16, 0xdb00, 0, {0x22,0x40,0x05,0x90,0x02,0xac,0x00,0xd8,0x80,0x36,0x40,0x0a,0x90,0x02,0x20,0x40 } },
+{ 16, 0xdb10, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x26,0x00,0xbb,0x00,0x22,0x06 } },
+{ 16, 0xdb20, 0, {0x08,0x80,0x02,0x2e,0x00,0x88,0x20,0x22,0xc0,0x09,0xb0,0x02,0xa4,0x00,0x99,0x00 } },
+{ 16, 0xdb30, 0, {0x62,0xc4,0x08,0xb0,0x06,0x2c,0x00,0x88,0x80,0x22,0x41,0x08,0xa0,0x02,0x20,0x00 } },
+{ 16, 0xdb40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x00,0xb3,0x00,0x20,0x40 } },
+{ 16, 0xdb50, 0, {0x0a,0x00,0x82,0x0c,0x00,0x80,0x00,0x20,0xc0,0x0b,0x30,0x22,0xa0,0x00,0x81,0x00 } },
+{ 16, 0xdb60, 0, {0xa0,0xc0,0x09,0x30,0x02,0x8c,0x00,0x90,0x00,0x24,0x40,0x0a,0x28,0x02,0x02,0x01 } },
+{ 16, 0xdb70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xfb,0x02,0x20,0x00 } },
+{ 16, 0xdb80, 0, {0x2c,0x92,0x03,0x2c,0x02,0x88,0x00,0x31,0xc0,0x0b,0xb5,0x02,0xa4,0x00,0xd1,0x04 } },
+{ 16, 0xdb90, 0, {0x32,0x40,0x0e,0x90,0x03,0x2c,0x40,0xc9,0x00,0x3a,0x40,0x8c,0xa0,0x03,0x00,0x03 } },
+{ 16, 0xdba0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xf4,0x00,0xff,0x00,0x2f,0x00 } },
+{ 16, 0xdbb0, 0, {0x0f,0xc0,0x03,0xdc,0x00,0xfc,0x00,0x3f,0xc1,0x0f,0xf0,0x43,0xf0,0x00,0xfd,0x00 } },
+{ 16, 0xdbc0, 0, {0x3f,0x40,0x4f,0xd0,0x03,0xfc,0x00,0xf5,0x00,0x3f,0x40,0x0f,0xe0,0x03,0xe8,0x06 } },
+{ 16, 0xdbd0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xd8,0x80,0xcc,0x00,0xb7,0x04 } },
+{ 16, 0xdbe0, 0, {0x4e,0xe1,0x03,0x3c,0x20,0xdf,0x10,0x31,0x80,0x06,0xf0,0x03,0x7f,0x00,0xff,0xc0 } },
+{ 16, 0xdbf0, 0, {0x3b,0xc0,0x0e,0xf2,0x03,0x5e,0x00,0xef,0x10,0x33,0xd0,0x2c,0xf2,0x03,0x30,0x00 } },
+{ 16, 0xdc00, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x10,0xe9,0x00,0x88,0xc6,0x20,0x5c } },
+{ 16, 0xdc10, 0, {0x08,0xa4,0x57,0x65,0x00,0x8f,0x52,0x2a,0xf0,0x09,0xfc,0x02,0x04,0x00,0xbb,0x00 } },
+{ 16, 0xdc20, 0, {0x2d,0xd9,0x09,0x74,0x83,0x64,0x28,0x83,0x44,0x22,0x84,0x88,0x06,0x82,0x30,0x04 } },
+{ 16, 0xdc30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0xc9,0x00,0x80,0x10,0x20,0x08 } },
+{ 16, 0xdc40, 0, {0x08,0x31,0x12,0x04,0xb2,0xa3,0x00,0x20,0x84,0x1b,0x34,0x02,0x0c,0x80,0xb3,0x20 } },
+{ 16, 0xdc50, 0, {0x2c,0xc7,0x09,0x36,0x02,0x8c,0x80,0x93,0x40,0xac,0xc8,0x08,0x31,0x28,0x32,0x01 } },
+{ 16, 0xdc60, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xa9,0x00,0x88,0x00,0xa2,0x50 } },
+{ 16, 0xdc70, 0, {0x08,0x35,0x02,0x24,0x00,0x8b,0x04,0x2e,0xc1,0x09,0xb0,0x02,0x24,0x94,0xbb,0x00 } },
+{ 16, 0xdc80, 0, {0x2e,0xc0,0x0b,0xb0,0x02,0xcc,0x60,0x8b,0x00,0x2e,0x80,0x08,0x80,0x00,0x30,0x04 } },
+{ 16, 0xdc90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0xe7,0x02,0xcb,0x18,0xb2,0x80 } },
+{ 16, 0xdca0, 0, {0x2c,0xac,0x0a,0x2e,0x08,0xeb,0x00,0x32,0x12,0x4e,0xb0,0x03,0x2b,0x80,0xfb,0x00 } },
+{ 16, 0xdcb0, 0, {0x3a,0xc0,0x0a,0xb0,0x03,0xab,0x08,0xeb,0x04,0x2e,0x48,0x0c,0xb8,0x83,0x00,0x04 } },
+{ 16, 0xdcc0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb6,0x80,0xff,0x80,0x39,0xca } },
+{ 16, 0xdcd0, 0, {0x0d,0xe8,0x03,0xd6,0x40,0xe7,0x04,0x3b,0x66,0x4e,0x70,0x03,0xb8,0x00,0xff,0x01 } },
+{ 16, 0xdce0, 0, {0x3f,0xc0,0x6c,0xf0,0x03,0x70,0x06,0xe7,0x00,0x31,0x04,0x0f,0xc1,0x43,0xf8,0x00 } },
+{ 16, 0xdcf0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x85,0x00,0xcb,0x40,0x32,0x90 } },
+{ 16, 0xdd00, 0, {0x2f,0xb0,0x0b,0x64,0x80,0xfb,0x08,0xba,0x10,0x0d,0xb0,0xa7,0x2d,0x00,0xfb,0x04 } },
+{ 16, 0xdd10, 0, {0x3e,0xc0,0x8e,0xb0,0x03,0x6d,0x00,0xdb,0x01,0x32,0x40,0x8c,0x33,0x03,0x90,0x04 } },
+{ 16, 0xdd20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0x24,0x00,0x83,0xe0,0xa2,0xd0 } },
+{ 16, 0xdd30, 0, {0x40,0xb0,0x02,0x25,0x04,0xbf,0x80,0xa0,0x50,0x08,0xf8,0x02,0x20,0x00,0x8b,0x02 } },
+{ 16, 0xdd40, 0, {0x2f,0xd0,0x08,0xf0,0x02,0x24,0x00,0x8f,0x80,0x36,0x01,0x08,0x84,0x42,0x36,0x00 } },
+{ 16, 0xdd50, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0x44,0x00,0x83,0x48,0x20,0xc4 } },
+{ 16, 0xdd60, 0, {0x09,0x00,0x02,0x46,0x00,0xb3,0x01,0xa8,0x90,0x19,0x30,0x12,0x8c,0x00,0xa3,0x04 } },
+{ 16, 0xdd70, 0, {0x2e,0xe2,0x0a,0xb0,0x02,0x0c,0x00,0x83,0x49,0x28,0xc0,0x09,0x3c,0x02,0x38,0x00 } },
+{ 16, 0xdd80, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x01,0x36,0x04,0x83,0x80,0x21,0xe1 } },
+{ 16, 0xdd90, 0, {0x08,0x38,0x12,0x1e,0x28,0xb3,0x98,0x21,0xa0,0x19,0x38,0x82,0x96,0x00,0x87,0x83 } },
+{ 16, 0xdda0, 0, {0x2d,0xe2,0x08,0x78,0x22,0x36,0x8c,0x87,0x80,0x2d,0xe0,0x09,0x79,0x02,0x3e,0x00 } },
+{ 16, 0xddb0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x04,0x00,0xc3,0x30,0x30,0xc8 } },
+{ 16, 0xddc0, 0, {0x4d,0x00,0x0b,0x4c,0x80,0xf3,0x12,0x38,0xc0,0x0d,0x3a,0x02,0x8c,0x80,0xf3,0x00 } },
+{ 16, 0xddd0, 0, {0x3c,0xc0,0x0e,0x30,0x0b,0x0e,0x00,0xc3,0x0c,0x3a,0xc0,0x0d,0x30,0x03,0x12,0x02 } },
+{ 16, 0xdde0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xb4,0x06,0xff,0x10,0x3f,0xc0 } },
+{ 16, 0xddf0, 0, {0x0f,0xb0,0x13,0xbc,0x00,0xff,0x10,0x7f,0xc0,0x0e,0xf1,0xa3,0x7c,0x00,0xff,0x12 } },
+{ 16, 0xde00, 0, {0x3f,0xc2,0x0f,0xf5,0x23,0xbc,0x41,0xef,0x18,0x37,0x80,0xae,0xc0,0x03,0x50,0x06 } },
+{ 16, 0xde10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x00,0xdb,0x00,0x3e,0xda } },
+{ 16, 0xde20, 0, {0x0c,0x80,0x03,0x66,0x10,0x8b,0x00,0x32,0x80,0x8c,0xb6,0x03,0x4a,0x00,0x4b,0x80 } },
+{ 16, 0xde30, 0, {0x32,0xc8,0x0c,0xb4,0x03,0x0a,0x10,0xdb,0x00,0x3e,0xc1,0x0c,0xb0,0x43,0x2a,0x00 } },
+{ 16, 0xde40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x11,0xb4,0x00,0x87,0x04,0x2c,0xc0 } },
+{ 16, 0xde50, 0, {0x0d,0x70,0x03,0x1c,0x08,0x87,0x48,0x20,0x81,0x0d,0x72,0x82,0x5c,0x00,0xd7,0x00 } },
+{ 16, 0xde60, 0, {0x21,0xcc,0x28,0xf0,0x02,0x1c,0x10,0x87,0x20,0x2c,0x00,0x08,0x40,0x0a,0x32,0x04 } },
+{ 16, 0xde70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x96,0x00,0xb7,0x81,0x2d,0xe0 } },
+{ 16, 0xde80, 0, {0x08,0x48,0x02,0x0e,0x04,0x87,0x80,0x21,0xe0,0x08,0x78,0x02,0x3e,0x01,0x87,0x80 } },
+{ 16, 0xde90, 0, {0x21,0xe0,0x18,0x79,0x02,0x3a,0x01,0x97,0xa0,0x2d,0x60,0x08,0x38,0x02,0x20,0x00 } },
+{ 16, 0xdea0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xc6,0x00,0xa3,0xc6,0x2c,0xc0 } },
+{ 16, 0xdeb0, 0, {0x09,0x30,0x02,0x0c,0x01,0x83,0x00,0x20,0xe0,0x09,0x30,0x02,0x4e,0x00,0x93,0x00 } },
+{ 16, 0xdec0, 0, {0x20,0xc0,0x49,0x30,0x22,0x0f,0x64,0x83,0x02,0x6c,0xd4,0x28,0x30,0x02,0x12,0x04 } },
+{ 16, 0xded0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x11,0xab,0x80,0xfa,0xe0,0x3c,0x88 } },
+{ 16, 0xdee0, 0, {0x0c,0xe0,0x02,0x28,0x02,0xca,0x00,0xb3,0xa9,0x0c,0xa0,0x03,0x3b,0x10,0xca,0x00 } },
+{ 16, 0xdef0, 0, {0xa2,0x80,0x0c,0xa0,0x0b,0x38,0x00,0xda,0x00,0x3f,0xb0,0x0c,0xe6,0x03,0x3a,0x04 } },
+{ 16, 0xdf00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xc0,0x20,0x98,0x08,0x3e,0x00 } },
+{ 16, 0xdf10, 0, {0x0f,0x80,0x0b,0xe1,0x00,0xf8,0x01,0x3c,0x10,0x4f,0x00,0x03,0xa0,0x40,0xf8,0x00 } },
+{ 16, 0xdf20, 0, {0x3e,0x10,0x0e,0x80,0x03,0xe0,0x00,0xf8,0x00,0x3c,0x02,0x2f,0x04,0x93,0xd2,0x00 } },
+{ 16, 0xdf30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xc1,0xc1,0x32,0x40 } },
+{ 16, 0xdf40, 0, {0x0c,0x98,0x03,0x26,0x40,0xf9,0x00,0x32,0x40,0x0c,0x98,0x03,0x24,0x24,0xf9,0x00 } },
+{ 16, 0xdf50, 0, {0x3c,0x60,0x0c,0x10,0x03,0xa4,0x00,0xf9,0x82,0x32,0x40,0x0c,0x90,0x03,0x02,0x04 } },
+{ 16, 0xdf60, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0x89,0x00,0x22,0x50 } },
+{ 16, 0xdf70, 0, {0x0d,0x98,0x02,0x25,0x80,0xb9,0x00,0x22,0x52,0x0d,0x9c,0x02,0x24,0x00,0xb9,0x00 } },
+{ 16, 0xdf80, 0, {0x2e,0x60,0x08,0x90,0x42,0x24,0x00,0xb9,0x40,0x36,0x40,0x08,0x90,0x0a,0x20,0x00 } },
+{ 16, 0xdf90, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x8d,0x00,0x23,0x40 } },
+{ 16, 0xdfa0, 0, {0x08,0x12,0x02,0x24,0x00,0xa1,0x10,0xa2,0x60,0x08,0x92,0x8a,0x24,0x00,0xb9,0x01 } },
+{ 16, 0xdfb0, 0, {0x2e,0x46,0x08,0x90,0x02,0xa4,0x00,0xb1,0x50,0x22,0x40,0x28,0x90,0x82,0x06,0x00 } },
+{ 16, 0xdfc0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x84,0x85,0x20,0xa1,0xd8 } },
+{ 16, 0xdfd0, 0, {0x09,0x10,0x02,0x04,0x80,0xb3,0x20,0x20,0x40,0x29,0x12,0x06,0x04,0x00,0xb1,0x01 } },
+{ 16, 0xdfe0, 0, {0x2c,0x48,0x28,0x12,0x02,0x04,0x00,0xb1,0x20,0x24,0x48,0x08,0x12,0x02,0x02,0x01 } },
+{ 16, 0xdff0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x42,0x8a,0x00,0xb3,0x00 } },
+{ 16, 0xe000, 0, {0x0c,0x05,0x03,0x21,0x40,0xe0,0x50,0xb2,0x00,0x2c,0x80,0x02,0x21,0x40,0xf0,0x50 } },
+{ 16, 0xe010, 0, {0x3c,0x14,0x0c,0x85,0x13,0xa1,0x50,0xf8,0x50,0x32,0x14,0x0c,0x85,0x23,0x2e,0x03 } },
+{ 16, 0xe020, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xf4,0x40,0xf9,0x10,0x3e,0x44 } },
+{ 16, 0xe030, 0, {0x0f,0xd4,0x0b,0xf4,0x44,0xf9,0x10,0x3f,0x50,0x4f,0x11,0x03,0xf4,0x00,0xf9,0x00 } },
+{ 16, 0xe040, 0, {0x3e,0x44,0x0f,0x91,0x53,0xf4,0x14,0xf9,0x10,0x3f,0x44,0x0f,0xd1,0x03,0xe6,0x02 } },
+{ 16, 0xe050, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x05,0xe6,0xa0,0xdd,0x88,0xb3,0x66 } },
+{ 16, 0xe060, 0, {0x0c,0xdc,0x83,0x36,0x88,0xbd,0xa0,0x37,0x6a,0x0c,0xda,0x0b,0x25,0x02,0xc9,0x40 } },
+{ 16, 0xe070, 0, {0x3f,0x78,0x4f,0x98,0xb3,0xe5,0x04,0xcd,0xa0,0x72,0x78,0x0c,0xd8,0x8b,0x26,0x14 } },
+{ 16, 0xe080, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe3,0x00,0x88,0x42,0x22,0x31 } },
+{ 16, 0xe090, 0, {0x08,0x0a,0x02,0x22,0xa0,0xb8,0xf9,0x22,0x10,0x0d,0x84,0x12,0x6a,0x80,0x88,0x80 } },
+{ 16, 0xe0a0, 0, {0x2e,0x20,0x0b,0x08,0x02,0xe2,0x80,0xa8,0xa8,0xa2,0x38,0x48,0xa8,0x02,0x0e,0x00 } },
+{ 16, 0xe0b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc4,0xa2,0x81,0x00,0x20,0x48 } },
+{ 16, 0xe0c0, 0, {0x08,0x12,0x42,0x45,0x00,0xb1,0x00,0x24,0x40,0x09,0x14,0x02,0x24,0x00,0x81,0x20 } },
+{ 16, 0xe0d0, 0, {0x2c,0x58,0x0b,0x10,0x82,0xc4,0x04,0x91,0x40,0x64,0x6c,0x08,0x30,0x82,0x12,0x05 } },
+{ 16, 0xe0e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa4,0x00,0x89,0x00,0x22,0x41 } },
+{ 16, 0xe0f0, 0, {0x08,0x90,0x8a,0x64,0x80,0xb9,0x00,0x22,0x50,0x09,0x90,0x06,0x64,0x08,0x99,0x00 } },
+{ 16, 0xe100, 0, {0x2e,0x40,0x0b,0x90,0x06,0xc4,0x01,0xb9,0x02,0x26,0x61,0x88,0x90,0x02,0x06,0x04 } },
+{ 16, 0xe110, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xc9,0x00,0x22,0x40 } },
+{ 16, 0xe120, 0, {0x2c,0x94,0x23,0x64,0x00,0xb9,0x00,0x36,0x40,0x09,0x90,0x13,0x05,0x00,0xc9,0x00 } },
+{ 16, 0xe130, 0, {0x3e,0x40,0x4f,0x90,0x13,0xe5,0xc0,0xd9,0x00,0x26,0x40,0x2c,0x94,0x03,0x28,0x00 } },
+{ 16, 0xe140, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x01,0xa4,0x02,0xe9,0x08,0x3c,0x40 } },
+{ 16, 0xe150, 0, {0x0f,0x90,0x0b,0xa4,0x00,0xf1,0x00,0x3e,0x41,0x0f,0x90,0x43,0xa4,0x88,0xe9,0x04 } },
+{ 16, 0xe160, 0, {0x3e,0x40,0x0f,0x90,0x03,0xe6,0x00,0xe1,0x00,0x3a,0x40,0x9f,0x92,0x63,0xda,0x00 } },
+{ 16, 0xe170, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0x80,0x10,0xe0,0x01,0x32,0x00 } },
+{ 16, 0xe180, 0, {0x8f,0x80,0x03,0x20,0x00,0xd8,0x08,0x30,0x01,0x8c,0x00,0x03,0xe1,0x02,0xc8,0x04 } },
+{ 16, 0xe190, 0, {0x3e,0x00,0x0c,0x80,0x0b,0x21,0x00,0xc8,0x00,0x78,0x00,0x0f,0x86,0x03,0x0a,0x00 } },
+{ 16, 0xe1a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0x8e,0x40,0x2b,0x82 } },
+{ 16, 0xe1b0, 0, {0x0b,0xa0,0x02,0x3a,0x00,0x8e,0x80,0x23,0x82,0x08,0xe2,0x02,0x28,0x10,0x8a,0x00 } },
+{ 16, 0xe1c0, 0, {0x2f,0x98,0x28,0xa0,0x12,0x28,0x00,0x8e,0x20,0x2e,0x80,0x4b,0xe4,0x02,0x0a,0x00 } },
+{ 16, 0xe1d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x02,0xa2,0x40,0x20,0x80 } },
+{ 16, 0xe1e0, 0, {0x0b,0xb0,0x02,0x4e,0x40,0x93,0xc0,0xa0,0x20,0x08,0x36,0x02,0x8c,0x00,0x93,0x00 } },
+{ 16, 0xe1f0, 0, {0x2c,0xe2,0x08,0x30,0x06,0x4c,0x12,0x93,0x08,0x28,0xc0,0x0b,0xb0,0x02,0x0a,0x00 } },
+{ 16, 0xe200, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1c,0x08,0x82,0x40,0x29,0x40 } },
+{ 16, 0xe210, 0, {0x0b,0x70,0x02,0x5e,0x08,0x84,0x08,0x23,0x40,0x08,0x70,0x06,0x1c,0x80,0x87,0x00 } },
+{ 16, 0xe220, 0, {0x2d,0x20,0x08,0x79,0x12,0x5c,0x00,0x94,0x00,0x2d,0xc0,0x0b,0x30,0x42,0x28,0x00 } },
+{ 16, 0xe230, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3e,0x00,0xe4,0x80,0x31,0xa1 } },
+{ 16, 0xe240, 0, {0x0f,0x58,0x13,0x76,0x00,0xd0,0x80,0x31,0xc0,0x0c,0x38,0x03,0xbe,0x80,0xd7,0x81 } },
+{ 16, 0xe250, 0, {0x3f,0x20,0x8c,0x79,0x03,0x7f,0x01,0xd6,0x80,0x39,0xe8,0x4f,0x68,0x03,0x2a,0x00 } },
+{ 16, 0xe260, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xbe,0x00,0xfa,0x00,0x3e,0x00 } },
+{ 16, 0xe270, 0, {0x8f,0x96,0x0b,0xa4,0x00,0xea,0x00,0x3c,0xc0,0x0f,0x90,0x03,0xac,0x20,0xfb,0x40 } },
+{ 16, 0xe280, 0, {0x2e,0x00,0x0f,0xb2,0x03,0xad,0xa0,0xea,0x00,0x3e,0xc0,0x0f,0xa0,0x1b,0xc2,0x04 } },
+{ 16, 0xe290, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x08,0xde,0x81,0x33,0xa4 } },
+{ 16, 0xe2a0, 0, {0x0e,0xfc,0x13,0x3e,0x00,0xfc,0x80,0x13,0x20,0x0c,0x68,0x03,0x3e,0x20,0xff,0xc8 } },
+{ 16, 0xe2b0, 0, {0x3f,0x60,0x1d,0xf8,0x03,0x7e,0x00,0xc7,0x80,0x33,0xe2,0x0c,0xd8,0x03,0x10,0x00 } },
+{ 16, 0xe2c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x00,0x86,0x41,0x31,0xc4 } },
+{ 16, 0xe2d0, 0, {0x08,0x79,0x42,0x9c,0x00,0xbc,0x10,0x21,0x40,0x85,0x35,0x03,0x5c,0x00,0xb7,0x00 } },
+{ 16, 0xe2e0, 0, {0x2d,0xc0,0x08,0x72,0x02,0x2c,0x00,0xa7,0x01,0x37,0xc0,0x08,0x51,0x42,0x2a,0x00 } },
+{ 16, 0xe2f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x8c,0x40,0x82,0x00,0x24,0x81 } },
+{ 16, 0xe300, 0, {0x08,0xd8,0x02,0x14,0x20,0xb5,0x00,0x20,0x40,0x09,0x60,0x02,0x1c,0x40,0xb7,0x00 } },
+{ 16, 0xe310, 0, {0x2c,0x40,0x0b,0x30,0x22,0xdc,0x00,0x97,0x00,0x21,0xc4,0x08,0x40,0x02,0x44,0x00 } },
+{ 16, 0xe320, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x14,0xec,0x00,0x92,0x06,0x20,0x90 } },
+{ 16, 0xe330, 0, {0x38,0x15,0x02,0x86,0x00,0xb8,0x00,0x60,0x50,0x09,0x30,0x02,0x4e,0x01,0xbb,0x00 } },
+{ 16, 0xe340, 0, {0x2e,0x40,0x0b,0x30,0x02,0xce,0x20,0xb3,0x00,0x24,0xf0,0x48,0x02,0x0a,0x58,0x04 } },
+{ 16, 0xe350, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xca,0x00,0xa6,0x94 } },
+{ 16, 0xe360, 0, {0x2c,0x90,0x03,0x2e,0x00,0xfb,0x05,0xb2,0x85,0x0d,0x90,0x03,0x3f,0x90,0xff,0x00 } },
+{ 16, 0xe370, 0, {0x7e,0x80,0x1f,0xf0,0x43,0xfc,0x21,0x9a,0x00,0x33,0xc8,0x3c,0xb2,0x03,0x6a,0x04 } },
+{ 16, 0xe380, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0xec,0x02,0xea,0x40,0x3d,0x80 } },
+{ 16, 0xe390, 0, {0x0f,0x10,0x93,0xed,0x00,0xfb,0x40,0x3e,0x90,0x8f,0x30,0x03,0xec,0x80,0xfb,0x00 } },
+{ 16, 0xe3a0, 0, {0x3e,0x91,0x1c,0xb0,0x03,0x2c,0x10,0xe8,0x00,0x3e,0xc8,0x1f,0x90,0x03,0xa5,0x10 } },
+{ 16, 0xe3b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xfc,0x02,0xe4,0x00,0x73,0xa0 } },
+{ 16, 0xe3c0, 0, {0x0c,0xfc,0x03,0x7c,0x02,0xff,0x10,0x13,0xc4,0x1c,0xc0,0x03,0x3c,0x00,0xff,0x00 } },
+{ 16, 0xe3d0, 0, {0x37,0xe0,0x0d,0xf0,0x03,0xfc,0x00,0xed,0x80,0x31,0xc0,0x0c,0x32,0x63,0x20,0x04 } },
+{ 16, 0xe3e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x00,0x6c,0x00,0x8a,0xc0,0x22,0xb1 } },
+{ 16, 0xe3f0, 0, {0x8a,0xb8,0x43,0x4a,0x10,0xdb,0x20,0x20,0xf0,0x0a,0x94,0x03,0x6c,0x00,0xbb,0x07 } },
+{ 16, 0xe400, 0, {0x22,0xb8,0x08,0xb0,0x02,0xec,0x11,0xe8,0xc0,0xb2,0xc0,0x2a,0x92,0x1a,0x20,0x00 } },
+{ 16, 0xe410, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x2c,0x00,0xaa,0x80,0x22,0x98 } },
+{ 16, 0xe420, 0, {0x08,0x90,0x02,0x2f,0x03,0xbb,0x01,0x2a,0x83,0x08,0xb2,0x4e,0x2c,0x04,0xab,0x02 } },
+{ 16, 0xe430, 0, {0x22,0xc4,0x28,0xb0,0x22,0xec,0x09,0xb3,0x50,0x62,0xc0,0x08,0xb0,0x02,0x20,0x00 } },
+{ 16, 0xe440, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x01,0x83,0x00,0x60,0x80 } },
+{ 16, 0xe450, 0, {0x08,0x12,0x0a,0x44,0x00,0x93,0x00,0x2a,0x80,0x4a,0x30,0x02,0x0c,0x00,0xb3,0x00 } },
+{ 16, 0xe460, 0, {0x60,0xc0,0x08,0x30,0x02,0xcc,0x00,0xb3,0x02,0x60,0xc0,0x08,0x00,0x46,0x02,0x01 } },
+{ 16, 0xe470, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0d,0x6c,0x00,0xe8,0x02,0x22,0x80 } },
+{ 16, 0xe480, 0, {0x2c,0xf2,0x43,0x2c,0x00,0xfb,0x00,0xba,0xc0,0x08,0xa5,0x02,0x3c,0x00,0xef,0x00 } },
+{ 16, 0xe490, 0, {0x36,0xc0,0x4d,0xf0,0x13,0xfd,0x51,0xfb,0x00,0x32,0xc0,0x0c,0xb0,0x03,0x20,0x01 } },
+{ 16, 0xe4a0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xfc,0x00,0x7e,0x04,0x3f,0x80 } },
+{ 16, 0xe4b0, 0, {0x0f,0x31,0x43,0xf0,0x02,0xff,0x00,0x37,0xc0,0x0f,0xf0,0x03,0xfc,0x08,0xff,0x00 } },
+{ 16, 0xe4c0, 0, {0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xef,0x00,0x3b,0xc0,0x0f,0xc0,0x03,0xe8,0x16 } },
+{ 16, 0xe4d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf2,0x40,0xfc,0x80,0x3f,0x24 } },
+{ 16, 0xe4e0, 0, {0x0d,0xd8,0x53,0xd6,0x04,0xdf,0x32,0x3f,0xcc,0x4c,0xc0,0x43,0xfc,0x00,0xdf,0x60 } },
+{ 16, 0xe4f0, 0, {0x37,0xc0,0x0f,0xc4,0x03,0x7c,0xd0,0xdf,0x20,0x33,0xd8,0x0d,0xf8,0x43,0xf0,0x00 } },
+{ 16, 0xe500, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x18,0xe8,0x80,0xb0,0x01,0x2e,0x08 } },
+{ 16, 0xe510, 0, {0x88,0x90,0x02,0xec,0x20,0x8b,0x70,0x2f,0xcc,0x08,0xb3,0x82,0xfd,0xe0,0xbf,0x40 } },
+{ 16, 0xe520, 0, {0x22,0xd8,0x0b,0x93,0x02,0xfd,0xc0,0xaf,0x10,0x28,0xf0,0x08,0xbc,0x12,0xf0,0x04 } },
+{ 16, 0xe530, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc4,0x00,0xb0,0x00,0x2e,0x01 } },
+{ 16, 0xe540, 0, {0x0a,0x12,0x82,0xec,0x80,0xb3,0x00,0x2c,0xc8,0x0a,0x00,0x32,0x8c,0x00,0xa3,0x30 } },
+{ 16, 0xe550, 0, {0x20,0xd2,0x09,0x00,0x02,0x8c,0x80,0x83,0x00,0x28,0xd8,0x0b,0x34,0x12,0xf2,0x01 } },
+{ 16, 0xe560, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xac,0x01,0xb8,0x02,0x2e,0x00 } },
+{ 16, 0xe570, 0, {0x0a,0x90,0x12,0xec,0x10,0x8b,0x00,0x2e,0xc0,0x0a,0xb0,0x00,0xec,0x00,0xb3,0x00 } },
+{ 16, 0xe580, 0, {0x22,0xc1,0x0b,0x92,0x02,0xcc,0x01,0xab,0x00,0x2a,0xc0,0x02,0xb0,0x02,0xf0,0x04 } },
+{ 16, 0xe590, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe0,0x00,0xfa,0x0c,0x3e,0xc0 } },
+{ 16, 0xe5a0, 0, {0x0f,0xa0,0x13,0xee,0x20,0xdb,0x00,0x3e,0xc0,0x2e,0x88,0x53,0xec,0x00,0xfb,0x00 } },
+{ 16, 0xe5b0, 0, {0xb2,0xc0,0x8f,0xac,0x83,0xac,0x08,0xdb,0x00,0x1a,0xc0,0x4f,0xb0,0x03,0xc0,0x04 } },
+{ 16, 0xe5c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb8,0x00,0xfe,0x00,0x3f,0xc0 } },
+{ 16, 0xe5d0, 0, {0x2d,0xe0,0x03,0xfe,0x80,0x7f,0x00,0x3f,0xc0,0x0d,0xd2,0x03,0xfc,0x00,0xbf,0x01 } },
+{ 16, 0xe5e0, 0, {0x3e,0xc0,0x0d,0xc8,0x03,0xfc,0x0c,0xff,0x00,0x3f,0xc0,0x09,0xf0,0x23,0xf8,0x00 } },
+{ 16, 0xe5f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa4,0x00,0xfa,0x40,0x32,0xc1 } },
+{ 16, 0xe600, 0, {0x0f,0xa0,0x03,0x29,0x08,0xdb,0x00,0x3e,0xc0,0x0e,0x85,0x03,0xec,0x20,0xcb,0x00 } },
+{ 16, 0xe610, 0, {0x3a,0xc0,0x0e,0xa4,0x03,0xec,0x00,0xfb,0x00,0x3a,0xc2,0x0e,0xb0,0x03,0x10,0x04 } },
+{ 16, 0xe620, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2c,0x00,0xba,0x60,0x20,0xc0 } },
+{ 16, 0xe630, 0, {0x0b,0xa0,0x02,0x08,0x00,0xaf,0x00,0x2f,0xd0,0x0b,0xb5,0x02,0xfe,0x02,0x8f,0x00 } },
+{ 16, 0xe640, 0, {0x2f,0xc0,0x0d,0x80,0x0a,0x3c,0x00,0xb7,0x00,0x23,0xc2,0x05,0xf0,0x22,0x36,0x00 } },
+{ 16, 0xe650, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x04,0x40,0x00,0xb1,0x88,0x20,0x00 } },
+{ 16, 0xe660, 0, {0x0b,0x10,0x02,0x0c,0x00,0x83,0x00,0x2e,0xc8,0x0b,0x08,0x06,0x4d,0x40,0x83,0x00 } },
+{ 16, 0xe670, 0, {0x20,0xc0,0x08,0x30,0x06,0x0c,0x08,0x93,0x20,0x0a,0xe0,0x4a,0x30,0x02,0x38,0x00 } },
+{ 16, 0xe680, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x10,0x5a,0x00,0xb5,0x90,0x21,0x20 } },
+{ 16, 0xe690, 0, {0x0b,0x58,0x42,0x3e,0x00,0xa7,0x80,0x2d,0xe0,0x0b,0x69,0x02,0xde,0x40,0x87,0x92 } },
+{ 16, 0xe6a0, 0, {0x2d,0xe0,0x09,0x18,0x02,0x9e,0x01,0xb7,0x80,0x29,0xe0,0x03,0x70,0x02,0x3e,0x00 } },
+{ 16, 0xe6b0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x44,0x00,0xf1,0x01,0x30,0x00 } },
+{ 16, 0xe6c0, 0, {0x5f,0x18,0x03,0x0c,0x10,0x83,0x00,0x3c,0xc4,0x0e,0x04,0x03,0xec,0x00,0x83,0x00 } },
+{ 16, 0xe6d0, 0, {0x30,0xc4,0x0c,0x31,0x03,0x8c,0x00,0xf3,0x00,0x38,0xc8,0x0e,0x31,0x03,0x12,0x02 } },
+{ 16, 0xe6e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xbc,0x00,0xfd,0x04,0xbf,0x04 } },
+{ 16, 0xe6f0, 0, {0x4f,0x58,0x03,0xf8,0x08,0xef,0x08,0x3f,0xc0,0x0f,0xf0,0x01,0xfc,0x00,0xff,0x4c } },
+{ 16, 0xe700, 0, {0x3f,0xc1,0x0f,0xd0,0x03,0x3c,0x00,0xf7,0x00,0x37,0xc2,0x0d,0x72,0x03,0xd0,0x06 } },
+{ 16, 0xe710, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xe2,0x00,0xdb,0x00,0x32,0xc0 } },
+{ 16, 0xe720, 0, {0x4d,0xa8,0x03,0x2c,0x08,0xfb,0x00,0x7e,0xc8,0x8f,0xb0,0x0b,0x6f,0x45,0xeb,0xc2 } },
+{ 16, 0xe730, 0, {0x36,0xc0,0x07,0xa0,0x03,0xef,0x20,0xcb,0x50,0xb2,0xc0,0x0c,0x79,0x03,0x2a,0x00 } },
+{ 16, 0xe740, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x19,0x98,0x00,0x8f,0x00,0x21,0xc0 } },
+{ 16, 0xe750, 0, {0x0b,0x60,0x03,0x5c,0x00,0x37,0x00,0x2d,0xd2,0x0b,0x30,0x02,0x0c,0xa8,0x87,0x24 } },
+{ 16, 0xe760, 0, {0x21,0xd0,0x09,0x70,0x02,0xdd,0x88,0x87,0x2a,0x23,0xe8,0x08,0x70,0x02,0x32,0x04 } },
+{ 16, 0xe770, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0xb6,0x00,0x97,0x80,0x21,0xe0 } },
+{ 16, 0xe780, 0, {0x0b,0x68,0x02,0x1e,0x00,0xb7,0x80,0x2d,0xe8,0x8b,0x48,0x82,0x1e,0x80,0xa3,0x84 } },
+{ 16, 0xe790, 0, {0x25,0xe8,0x0b,0x68,0x02,0xce,0x02,0x87,0x80,0x21,0xe0,0x08,0x7a,0x02,0x20,0x00 } },
+{ 16, 0xe7a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x04,0xcc,0x08,0x83,0x82,0x20,0xe0 } },
+{ 16, 0xe7b0, 0, {0x8b,0x2a,0x02,0x48,0x40,0xb3,0x00,0x2c,0xc0,0x0b,0x30,0x82,0x0c,0x00,0x83,0x00 } },
+{ 16, 0xe7c0, 0, {0x00,0xc1,0x09,0x31,0x02,0xcc,0x00,0x83,0x00,0x20,0xc0,0x08,0x30,0x0a,0x12,0x04 } },
+{ 16, 0xe7d0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xe8,0x00,0xda,0xa0,0x32,0xa8 } },
+{ 16, 0xe7e0, 0, {0x8d,0xa8,0x03,0x3b,0x00,0xfa,0x00,0x3e,0x80,0x0f,0xe4,0x03,0x68,0x00,0xea,0x02 } },
+{ 16, 0xe7f0, 0, {0x36,0x80,0x0f,0xe4,0x03,0xe8,0x00,0xca,0x00,0x32,0x80,0x2c,0xa0,0x03,0x3a,0x04 } },
+{ 16, 0xe800, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x01,0xa0,0x10,0xf8,0x00,0xbe,0x20 } },
+{ 16, 0xe810, 0, {0x8f,0xc1,0x03,0xe0,0x24,0xf8,0x00,0x3e,0x10,0x0f,0x84,0x03,0xe0,0x00,0xf8,0x01 } },
+{ 16, 0xe820, 0, {0x3e,0x00,0x0f,0x80,0x03,0xe0,0x00,0xf8,0x01,0xbe,0x10,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0xe830, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xa4,0x00,0xf9,0x40,0x32,0x40 } },
+{ 16, 0xe840, 0, {0xcf,0x90,0x03,0xe4,0x00,0xc9,0x00,0x0e,0x50,0x0f,0x1a,0x03,0x26,0x00,0xf9,0x00 } },
+{ 16, 0xe850, 0, {0x3e,0x40,0x0f,0x90,0x81,0xe4,0x00,0xf9,0x80,0x32,0x40,0x0c,0x90,0x03,0xc2,0x04 } },
+{ 16, 0xe860, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x04,0xb1,0x04,0x22,0x40 } },
+{ 16, 0xe870, 0, {0x0b,0x90,0x02,0xe4,0x00,0xa9,0x00,0x2e,0x53,0x0b,0x92,0x0a,0x26,0x48,0xb9,0x04 } },
+{ 16, 0xe880, 0, {0x2e,0x40,0x0b,0x90,0x02,0xe4,0x00,0xb9,0x80,0x02,0x50,0x08,0x90,0x02,0xe0,0x00 } },
+{ 16, 0xe890, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x05,0x24,0x00,0xbd,0x00,0x23,0x40 } },
+{ 16, 0xe8a0, 0, {0x0b,0xd0,0x12,0xc4,0x00,0x89,0x02,0x2e,0x40,0x0b,0x90,0x22,0x24,0x00,0xb9,0x00 } },
+{ 16, 0xe8b0, 0, {0x2e,0x40,0x0b,0x90,0x02,0xe4,0x00,0xb1,0x20,0x20,0x40,0x68,0x90,0x22,0xc6,0x00 } },
+{ 16, 0xe8c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x14,0x14,0x00,0xbf,0x12,0xa1,0x40 } },
+{ 16, 0xe8d0, 0, {0x0b,0x50,0x02,0xc4,0x00,0xa1,0x20,0x2c,0x48,0x0b,0x12,0x02,0x04,0x10,0xb1,0x11 } },
+{ 16, 0xe8e0, 0, {0x2c,0x48,0x0b,0x13,0x22,0xc4,0x00,0xb1,0x40,0x20,0x5a,0x08,0x10,0x02,0xc2,0x01 } },
+{ 16, 0xe8f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xf8,0x40,0x32,0x14 } },
+{ 16, 0xe900, 0, {0x0f,0x45,0x03,0xe1,0x40,0xc8,0x50,0x3e,0x15,0x8f,0x85,0x03,0x21,0xe8,0xf8,0x68 } },
+{ 16, 0xe910, 0, {0x3e,0x14,0x0f,0x84,0x03,0xe1,0xe0,0xf0,0x28,0x32,0xa8,0xcc,0x80,0x23,0xee,0x03 } },
+{ 16, 0xe920, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x15,0xc4,0x10,0xf9,0x20,0x3e,0x40 } },
+{ 16, 0xe930, 0, {0x0f,0x90,0x03,0xf4,0x00,0xf9,0x10,0x3e,0x44,0x0f,0xd1,0x03,0xe4,0x00,0xf9,0x20 } },
+{ 16, 0xe940, 0, {0x3e,0x44,0x0f,0xd3,0x03,0xe4,0x00,0xf9,0x00,0xbe,0x40,0x0f,0x94,0x03,0xe6,0x06 } },
+{ 16, 0xe950, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xe4,0x00,0xfd,0x10,0x33,0x40 } },
+{ 16, 0xe960, 0, {0x0c,0xd0,0x03,0x24,0x00,0xd9,0x00,0x3f,0x40,0x4c,0xd0,0x03,0xf6,0x00,0xfd,0x90 } },
+{ 16, 0xe970, 0, {0x3a,0x40,0x0c,0x90,0x03,0xe6,0xa0,0xfd,0xa8,0x37,0x68,0x0c,0xd8,0x83,0x26,0x00 } },
+{ 16, 0xe980, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe0,0x08,0xc8,0xa0,0x22,0x00 } },
+{ 16, 0xe990, 0, {0x08,0x80,0x02,0x20,0x00,0x88,0x00,0x2e,0x00,0x0c,0x80,0x12,0xe0,0x00,0xb8,0x80 } },
+{ 16, 0xe9a0, 0, {0x22,0x00,0x0d,0x0a,0x02,0xe3,0x80,0xb0,0xc0,0x20,0x34,0x08,0x84,0x03,0x4e,0x04 } },
+{ 16, 0xe9b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x84,0x09,0xa1,0x00,0x20,0x41 } },
+{ 16, 0xe9c0, 0, {0x08,0x90,0x02,0x24,0x00,0x91,0x00,0x2c,0x40,0x08,0x10,0x02,0xc5,0x00,0xb1,0x60 } },
+{ 16, 0xe9d0, 0, {0x20,0x40,0x08,0x10,0xa2,0xc4,0x20,0xb1,0x28,0x24,0x4a,0x08,0x10,0x02,0x52,0x01 } },
+{ 16, 0xe9e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x14,0xa4,0x01,0x81,0x00,0xa2,0x40 } },
+{ 16, 0xe9f0, 0, {0xa8,0x90,0x00,0x25,0x40,0x89,0x01,0x2c,0x40,0x08,0x94,0x02,0xe4,0x00,0xb9,0x00 } },
+{ 16, 0xea00, 0, {0x2a,0x40,0x09,0x90,0x02,0xe4,0x01,0xb9,0x04,0x22,0x41,0x48,0x90,0x02,0x46,0x04 } },
+{ 16, 0xea10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x14,0xa5,0x20,0xe9,0x00,0x32,0x40 } },
+{ 16, 0xea20, 0, {0x4c,0x10,0x0b,0x26,0x00,0xd9,0x00,0x3e,0x40,0x2c,0x98,0x03,0xe4,0x00,0xf9,0x00 } },
+{ 16, 0xea30, 0, {0xb2,0x40,0x0c,0x90,0x03,0xe4,0x00,0xf9,0x00,0x36,0x40,0x2c,0x90,0x03,0x68,0x04 } },
+{ 16, 0xea40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x01,0xa4,0x00,0xe9,0x00,0x3e,0x40 } },
+{ 16, 0xea50, 0, {0x0f,0x90,0x03,0xe6,0x00,0xf9,0x00,0x3e,0x40,0x0e,0x9a,0x03,0xe4,0x00,0xf9,0x00 } },
+{ 16, 0xea60, 0, {0x36,0x40,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3c,0x40,0x0f,0x90,0x03,0xda,0x00 } },
+{ 16, 0xea70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xa1,0x00,0xf8,0x00,0x32,0x00 } },
+{ 16, 0xea80, 0, {0x0f,0x80,0x13,0xa0,0x00,0xc8,0x00,0x32,0x04,0x8c,0x80,0x03,0xa0,0xc0,0xf8,0x00 } },
+{ 16, 0xea90, 0, {0x3a,0x00,0x0f,0x80,0x03,0x20,0x00,0xc0,0x09,0x32,0x00,0x4c,0x80,0x01,0x0a,0x04 } },
+{ 16, 0xeaa0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0xbe,0x00,0x20,0x80 } },
+{ 16, 0xeab0, 0, {0x0b,0xe0,0x02,0x88,0x00,0xaa,0x00,0x03,0xa0,0x0a,0xe6,0x02,0xfa,0x00,0x8a,0x00 } },
+{ 16, 0xeac0, 0, {0x32,0x80,0x0b,0xa0,0x02,0x28,0x00,0x8e,0x80,0xa3,0x80,0x28,0x20,0x02,0x8a,0x00 } },
+{ 16, 0xead0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x6c,0x00,0xb3,0x48,0x20,0x40 } },
+{ 16, 0xeae0, 0, {0x0b,0x10,0x02,0x0c,0x00,0x83,0x00,0x20,0xc0,0x08,0x34,0x82,0x8e,0x04,0x99,0x00 } },
+{ 16, 0xeaf0, 0, {0x0a,0xc0,0x1b,0x30,0x02,0x0c,0x02,0x90,0x50,0x20,0x60,0x08,0x30,0x02,0x0a,0x00 } },
+{ 16, 0xeb00, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x11,0x1c,0x80,0xbd,0x0a,0x21,0x48 } },
+{ 16, 0xeb10, 0, {0x0b,0x52,0x02,0x9c,0x40,0xa3,0xa0,0x20,0x80,0x0a,0x60,0x02,0xce,0x00,0x85,0x20 } },
+{ 16, 0xeb20, 0, {0x21,0xc4,0x0b,0x7a,0x06,0x1e,0x80,0x95,0x20,0x21,0x90,0x08,0x70,0x02,0x28,0x00 } },
+{ 16, 0xeb30, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x08,0x1e,0x80,0xf7,0x80,0xb1,0x79 } },
+{ 16, 0xeb40, 0, {0x0f,0xdb,0x02,0x3e,0x20,0xc7,0xa0,0xb1,0x60,0xcc,0x78,0x13,0x96,0x00,0xf1,0xf0 } },
+{ 16, 0xeb50, 0, {0x39,0xe2,0x0f,0x7b,0x13,0x0f,0x00,0xd4,0xa0,0x31,0x60,0x2c,0x70,0x03,0x2a,0x02 } },
+{ 16, 0xeb60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x15,0xac,0x00,0xf7,0x00,0x3e,0x40 } },
+{ 16, 0xeb70, 0, {0x0f,0x90,0x03,0xed,0x80,0xfb,0x10,0x3e,0x40,0x0b,0xb0,0x23,0xec,0x00,0xf9,0x20 } },
+{ 16, 0xeb80, 0, {0x3a,0xd8,0x0f,0xb0,0x0b,0xed,0x81,0xed,0x10,0x3e,0x80,0x0f,0x30,0x03,0xc2,0x06 } },
+{ 16, 0xeb90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xbe,0x20,0xee,0x80,0x33,0x60 } },
+{ 16, 0xeba0, 0, {0x0c,0xd8,0x83,0x1e,0x00,0x6f,0x80,0x33,0xe0,0x0f,0xb8,0x11,0x32,0x04,0xf5,0x80 } },
+{ 16, 0xebb0, 0, {0x33,0xe0,0x0f,0xf8,0x83,0x2f,0x40,0xfe,0x80,0xb3,0xe0,0x0c,0xf8,0x03,0x10,0x00 } },
+{ 16, 0xebc0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x18,0x9c,0x00,0xbc,0x00,0xa1,0x44 } },
+{ 16, 0xebd0, 0, {0x08,0x10,0x03,0x5c,0x00,0x8f,0x00,0x21,0x80,0x0b,0xea,0x22,0x1c,0x80,0xb5,0x01 } },
+{ 16, 0xebe0, 0, {0x21,0xc0,0x0b,0xf0,0x02,0x1e,0x80,0xbe,0x00,0x23,0x80,0x2a,0x70,0x02,0x2a,0x04 } },
+{ 16, 0xebf0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x20,0xa7,0x00,0x23,0x40 } },
+{ 16, 0xec00, 0, {0x0b,0x50,0x0a,0x3c,0x00,0xa7,0x00,0x25,0xc0,0x0a,0x43,0x02,0x10,0x00,0xb5,0x00 } },
+{ 16, 0xec10, 0, {0x21,0xc0,0x0b,0x70,0x82,0x1c,0x80,0xb4,0x00,0x21,0xc0,0x08,0x70,0x02,0x04,0x00 } },
+{ 16, 0xec20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x04,0x8e,0x04,0xb3,0x00,0x22,0x40 } },
+{ 16, 0xec30, 0, {0x09,0x14,0x02,0x4c,0x00,0x83,0x00,0x20,0xc0,0x0b,0x24,0x82,0x04,0x00,0xb1,0x00 } },
+{ 16, 0xec40, 0, {0x20,0xc0,0x8b,0x3a,0x02,0x2c,0x01,0xb0,0x00,0x20,0x80,0x0a,0x30,0x02,0x1a,0x04 } },
+{ 16, 0xec50, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0x9e,0x00,0xeb,0x04,0x33,0x40 } },
+{ 16, 0xec60, 0, {0x2d,0xdc,0x03,0x1d,0x60,0xef,0x00,0x32,0x00,0xcf,0x9a,0x03,0x28,0x00,0xfd,0x00 } },
+{ 16, 0xec70, 0, {0x33,0xc1,0x8b,0xfc,0x0b,0x3c,0x00,0xfc,0x00,0x32,0x80,0x0c,0x90,0x03,0x2a,0x04 } },
+{ 16, 0xec80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xac,0x10,0xf8,0x00,0x3e,0x40 } },
+{ 16, 0xec90, 0, {0x0e,0x98,0x23,0xac,0x04,0xfb,0x00,0x3c,0x00,0x0f,0x84,0x20,0xed,0x00,0xf9,0x00 } },
+{ 16, 0xeca0, 0, {0x3e,0xc0,0x4f,0xb0,0x03,0xec,0x00,0xfd,0x00,0x3e,0x80,0x0f,0x90,0x03,0xe4,0x00 } },
+{ 16, 0xecb0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x10,0xfc,0x00,0xcf,0x80,0x33,0x40 } },
+{ 16, 0xecc0, 0, {0x0c,0xd0,0x83,0xfc,0x00,0xef,0x00,0x3f,0x40,0x0c,0xf1,0x41,0x30,0x10,0xcd,0x00 } },
+{ 16, 0xecd0, 0, {0x3f,0xc0,0x00,0x70,0x13,0x3c,0x00,0xe4,0x00,0xb1,0xd0,0x0c,0x10,0x03,0x20,0x04 } },
+{ 16, 0xece0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa1,0x04,0x2c,0x00,0x8a,0xe4,0x2a,0x40 } },
+{ 16, 0xecf0, 0, {0x28,0x90,0x02,0xec,0x00,0x8b,0x00,0x3e,0x02,0x0a,0x80,0x02,0x2c,0x82,0x89,0x04 } },
+{ 16, 0xed00, 0, {0x2e,0xc1,0x0a,0xb0,0x0a,0x2c,0x00,0x89,0x02,0x22,0xf2,0x2a,0x98,0x02,0x20,0x00 } },
+{ 16, 0xed10, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x02,0x80,0x14,0x2a,0x40 } },
+{ 16, 0xed20, 0, {0x08,0x90,0x02,0xec,0x08,0xab,0x04,0x2e,0x84,0x08,0x10,0x82,0x80,0x10,0x89,0x03 } },
+{ 16, 0xed30, 0, {0x2c,0xc0,0x4a,0xb0,0x22,0x2c,0x00,0xaa,0x00,0x22,0x80,0x08,0x91,0x02,0x20,0x00 } },
+{ 16, 0xed40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x14,0x2c,0x00,0x80,0x00,0x28,0x40 } },
+{ 16, 0xed50, 0, {0x08,0x11,0x02,0xec,0x00,0x83,0x00,0x2c,0x81,0x0a,0x00,0x5a,0x88,0x00,0x01,0x00 } },
+{ 16, 0xed60, 0, {0x2c,0xc0,0x0a,0x30,0x02,0x0c,0x00,0x82,0x00,0x20,0x80,0x0a,0x10,0x02,0x02,0x01 } },
+{ 16, 0xed70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xc9,0x00,0x3a,0x40 } },
+{ 16, 0xed80, 0, {0x0c,0xd4,0x03,0xfc,0x00,0xeb,0x00,0x3e,0x40,0x0c,0x92,0x03,0xa0,0x00,0x4d,0x00 } },
+{ 16, 0xed90, 0, {0x3f,0xc0,0x0e,0xf0,0x33,0x3c,0x80,0xe8,0x00,0x32,0xc0,0x0c,0x90,0x03,0x20,0x03 } },
+{ 16, 0xeda0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xfc,0x00,0xfc,0x00,0x3d,0x40 } },
+{ 16, 0xedb0, 0, {0x0f,0x50,0x03,0xfc,0x02,0x3f,0x04,0x3b,0x01,0x4f,0xc4,0x13,0x70,0x00,0xfd,0x00 } },
+{ 16, 0xedc0, 0, {0x3f,0xc0,0x1f,0xf0,0x01,0xfc,0x40,0xfc,0x00,0x3f,0xc0,0x0f,0xd0,0x13,0xe8,0x06 } },
+{ 16, 0xedd0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf8,0xe0,0xff,0x80,0x3d,0xc0 } },
+{ 16, 0xede0, 0, {0x0d,0xf3,0x82,0xf0,0x80,0xff,0x40,0x31,0xcb,0x0c,0xf3,0x03,0xfd,0x04,0xef,0xc1 } },
+{ 16, 0xedf0, 0, {0x33,0xe0,0x0f,0x79,0x03,0xfe,0x00,0xcf,0x42,0x33,0xf0,0x4c,0xf8,0x03,0x30,0x00 } },
+{ 16, 0xee00, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x10,0xe9,0x08,0xb9,0x81,0x2f,0xf0 } },
+{ 16, 0xee10, 0, {0x08,0xf4,0x52,0xe9,0x20,0xbf,0x40,0x23,0xf0,0x0a,0xf3,0x02,0xfd,0x08,0x8b,0x00 } },
+{ 16, 0xee20, 0, {0x36,0xe0,0x0b,0x80,0x22,0xe8,0x80,0x8f,0x40,0x22,0xc0,0x08,0xb0,0x82,0x30,0x04 } },
+{ 16, 0xee30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0xcc,0x00,0xb1,0x80,0x2c,0xc5 } },
+{ 16, 0xee40, 0, {0x09,0x32,0x42,0xc8,0xc0,0xb3,0x31,0x20,0xc1,0x08,0x32,0x02,0xcc,0xd4,0xbb,0x20 } },
+{ 16, 0xee50, 0, {0x68,0xc0,0x0b,0x30,0x02,0xcc,0x20,0x93,0x60,0x20,0x88,0x08,0x32,0x02,0x32,0x01 } },
+{ 16, 0xee60, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x15,0xa0,0x00,0xbb,0x80,0x2e,0xc0 } },
+{ 16, 0xee70, 0, {0x08,0xb0,0x02,0xea,0x00,0xbb,0x00,0x62,0xc1,0x0a,0xb0,0x02,0xcc,0x00,0xab,0x00 } },
+{ 16, 0xee80, 0, {0x2e,0xc0,0x0b,0xa0,0x00,0xe8,0x00,0x83,0x00,0x22,0xc1,0x08,0x30,0x02,0x30,0x04 } },
+{ 16, 0xee90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0xe8,0x90,0xfb,0x80,0x3e,0xc0 } },
+{ 16, 0xeea0, 0, {0x0d,0xb0,0x03,0xe2,0x10,0xfb,0x00,0x32,0xc0,0x4c,0xb0,0x13,0xec,0x00,0xe9,0x54 } },
+{ 16, 0xeeb0, 0, {0x3a,0xc0,0x0f,0xb0,0x03,0xe6,0x00,0xcb,0x00,0xb2,0x40,0x0c,0xb0,0x03,0x04,0x04 } },
+{ 16, 0xeec0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb8,0x00,0xff,0x00,0x3f,0xc0 } },
+{ 16, 0xeed0, 0, {0x8f,0xf0,0x03,0xf0,0x00,0xf7,0x02,0xbf,0xc1,0x0f,0xf0,0x23,0xfc,0x00,0xdf,0x06 } },
+{ 16, 0xeee0, 0, {0x37,0xc0,0x8f,0xc9,0x07,0xfa,0x92,0xff,0x04,0x3f,0x50,0x2f,0xf0,0x03,0xf8,0x00 } },
+{ 16, 0xeef0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x10,0xac,0x00,0xc9,0x00,0x3e,0xc2 } },
+{ 16, 0xef00, 0, {0x0e,0xb0,0x23,0xe4,0x00,0xeb,0x00,0x3a,0xc8,0x0e,0xb0,0x03,0xec,0x00,0xf9,0x00 } },
+{ 16, 0xef10, 0, {0x3e,0xc0,0x0f,0xb4,0x03,0xa4,0x00,0xfb,0x00,0x3e,0x80,0x0f,0xb0,0x83,0xd0,0x04 } },
+{ 16, 0xef20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x28,0x00,0x8b,0x74,0x2d,0xc0 } },
+{ 16, 0xef30, 0, {0x08,0xf0,0x02,0xe4,0x00,0x8f,0x00,0x21,0xf0,0x08,0xf0,0x02,0xfc,0x10,0xd3,0x00 } },
+{ 16, 0xef40, 0, {0x2e,0xc0,0x0b,0x90,0x12,0x2c,0x00,0xef,0x00,0x2e,0xc0,0x0b,0xb6,0x02,0xf6,0x00 } },
+{ 16, 0xef50, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0x48,0x00,0xa3,0x00,0x2c,0xc4 } },
+{ 16, 0xef60, 0, {0x0a,0x30,0x02,0xc0,0x00,0xa3,0x00,0x68,0xf0,0x0a,0x30,0x12,0xcc,0x04,0xa2,0x00 } },
+{ 16, 0xef70, 0, {0x2c,0xc0,0x0b,0x30,0x02,0xec,0x00,0xb3,0x01,0x2e,0xc0,0x0b,0x34,0x02,0xf8,0x00 } },
+{ 16, 0xef80, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x01,0x0c,0x00,0x87,0x80,0x2d,0xe8 } },
+{ 16, 0xef90, 0, {0x08,0x78,0x42,0xda,0x00,0x87,0x80,0x25,0xe0,0x08,0x79,0x02,0xce,0x00,0x96,0x80 } },
+{ 16, 0xefa0, 0, {0x2d,0xe0,0x0b,0xd9,0x02,0xde,0x00,0xa7,0x80,0x2d,0xe0,0x0b,0x78,0x02,0xfc,0x00 } },
+{ 16, 0xefb0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x40,0xe3,0x10,0x3c,0xc0 } },
+{ 16, 0xefc0, 0, {0x0a,0x38,0x03,0xe8,0x00,0xeb,0x00,0x38,0xc2,0x0a,0x30,0x03,0xcc,0x00,0xe3,0x40 } },
+{ 16, 0xefd0, 0, {0x3c,0xc0,0x0f,0x34,0x03,0xcd,0x00,0xf3,0x20,0x3c,0x88,0x0f,0x30,0x03,0xd2,0x02 } },
+{ 16, 0xefe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xb4,0x80,0xff,0x04,0x3f,0xc8 } },
+{ 16, 0xeff0, 0, {0x0f,0xf0,0x83,0xf8,0x40,0xff,0x18,0x3b,0xc0,0x0f,0xf4,0x83,0xfc,0x00,0xee,0x02 } },
+{ 16, 0xf000, 0, {0x3f,0xc0,0x0f,0xf0,0x03,0x3c,0x00,0xef,0x08,0x3f,0x80,0x0f,0xf0,0x13,0xd0,0x06 } },
+{ 16, 0xf010, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xe8,0x00,0xcb,0x00,0x3e,0xf2 } },
+{ 16, 0xf020, 0, {0x4d,0xb2,0x13,0xe8,0x04,0xcb,0x01,0x32,0xf8,0x4d,0xb2,0x13,0x6d,0x20,0xf8,0x00 } },
+{ 16, 0xf030, 0, {0x3e,0xc0,0x0f,0x30,0x03,0x24,0x00,0xfb,0x00,0x3e,0x40,0x8f,0xb8,0x03,0x2a,0x00 } },
+{ 16, 0xf040, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x11,0x8c,0x00,0x86,0x00,0x2c,0xc0 } },
+{ 16, 0xf050, 0, {0x08,0x73,0x02,0xd8,0x12,0x87,0x30,0x20,0xcb,0x08,0xf2,0x02,0x1d,0x05,0xb5,0x00 } },
+{ 16, 0xf060, 0, {0x2d,0xc0,0x0b,0x60,0x03,0x50,0x10,0xb7,0x09,0x2d,0xc0,0x0b,0xf0,0x02,0x32,0x04 } },
+{ 16, 0xf070, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x9e,0x00,0x87,0x80,0x2d,0xe4 } },
+{ 16, 0xf080, 0, {0x09,0x7a,0x02,0xce,0x01,0x87,0x80,0x21,0xec,0x09,0x78,0x02,0x5e,0x80,0xb7,0xc0 } },
+{ 16, 0xf090, 0, {0x2d,0xe0,0x0b,0xf8,0x02,0x1e,0x00,0xb7,0xa0,0x2d,0x60,0x0b,0x78,0x02,0x20,0x00 } },
+{ 16, 0xf0a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xee,0x00,0x82,0x80,0x2c,0xc0 } },
+{ 16, 0xf0b0, 0, {0x08,0x30,0x02,0xec,0x00,0x83,0x00,0xa0,0xc0,0x08,0x30,0x02,0x0c,0x00,0xb3,0x80 } },
+{ 16, 0xf0c0, 0, {0x2c,0xc1,0x0b,0x30,0x02,0x4e,0x00,0xb3,0x00,0x2c,0xf1,0x0b,0x30,0x0a,0x12,0x04 } },
+{ 16, 0xf0d0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xba,0x80,0xc6,0x00,0x3e,0x80 } },
+{ 16, 0xf0e0, 0, {0x0d,0xa0,0x03,0xf8,0x40,0xca,0x00,0x32,0x80,0x0d,0xa0,0x13,0x68,0x00,0xfe,0x02 } },
+{ 16, 0xf0f0, 0, {0x7e,0x80,0x0f,0xed,0x83,0x39,0x10,0xfa,0x00,0x3f,0x8c,0x0f,0xa0,0x03,0x3a,0x04 } },
+{ 16, 0xf100, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x12,0xf8,0x90,0x3e,0x00 } },
+{ 16, 0xf110, 0, {0x0f,0x80,0x03,0xe0,0x00,0xf8,0x05,0x3e,0x00,0x0e,0x00,0x03,0xe0,0x00,0xf8,0x80 } },
+{ 16, 0xf120, 0, {0x3e,0x00,0x0f,0x80,0x03,0xe0,0x60,0xf8,0x00,0x7e,0x00,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0xf130, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xc9,0x80,0x32,0x64 } },
+{ 16, 0xf140, 0, {0x0f,0x90,0x43,0xe4,0x06,0xc1,0x04,0x3a,0x40,0x0f,0x90,0x03,0xe4,0x00,0xe9,0x00 } },
+{ 16, 0xf150, 0, {0x32,0x40,0x0f,0x90,0x03,0x24,0x00,0xc1,0x01,0x32,0x40,0x0c,0x90,0x03,0xc2,0x04 } },
+{ 16, 0xf160, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0x89,0xc0,0x22,0x40 } },
+{ 16, 0xf170, 0, {0x0b,0x90,0x02,0x24,0x00,0x89,0x00,0x22,0x50,0x1b,0x90,0x22,0x24,0x00,0x81,0x00 } },
+{ 16, 0xf180, 0, {0x22,0x40,0x0b,0x90,0x22,0x24,0x08,0xc9,0x00,0x20,0x40,0x08,0x94,0x02,0xe0,0x00 } },
+{ 16, 0xf190, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x99,0x20,0x22,0x40 } },
+{ 16, 0xf1a0, 0, {0x0b,0x10,0x02,0xa4,0x00,0x89,0x00,0x2a,0x58,0x0b,0x90,0x02,0x84,0x00,0xa9,0x00 } },
+{ 16, 0xf1b0, 0, {0x22,0x40,0x0b,0x10,0x0a,0x04,0x00,0x99,0x02,0x22,0xc1,0x08,0x90,0x82,0xc6,0x00 } },
+{ 16, 0xf1c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x00,0x91,0x02,0xa0,0xc8 } },
+{ 16, 0xf1d0, 0, {0x0b,0x12,0x02,0x04,0x80,0x81,0x22,0x20,0x48,0x9b,0x12,0x02,0x04,0x90,0x89,0x01 } },
+{ 16, 0xf1e0, 0, {0x20,0x40,0x0b,0x10,0x02,0x04,0x02,0x81,0x22,0x22,0x40,0x08,0x10,0x02,0xc2,0x01 } },
+{ 16, 0xf1f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x42,0xda,0x01,0x32,0x01 } },
+{ 16, 0xf200, 0, {0x0f,0x85,0x03,0xa1,0x40,0xc0,0x50,0x3a,0x01,0x8b,0x85,0x23,0xa1,0x44,0xe8,0x50 } },
+{ 16, 0xf210, 0, {0xb2,0x00,0x0f,0x85,0x03,0x21,0x48,0xd8,0x51,0x32,0x14,0x2c,0x85,0x03,0xee,0x03 } },
+{ 16, 0xf220, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xf5,0x00,0xed,0x02,0x3e,0x44 } },
+{ 16, 0xf230, 0, {0x0f,0x91,0x03,0xf4,0x40,0xf9,0x10,0x3e,0x44,0x0f,0x91,0x03,0xe4,0x40,0xfd,0x00 } },
+{ 16, 0xf240, 0, {0x3e,0x40,0x0f,0xd0,0x03,0xf4,0x00,0xe9,0x10,0xbf,0x40,0x0f,0x90,0x03,0x66,0x06 } },
+{ 16, 0xf250, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0x21,0xc5,0x00,0x33,0x68 } },
+{ 16, 0xf260, 0, {0x0f,0x9a,0x03,0x6f,0x88,0xc9,0xc0,0x33,0x68,0x0c,0x9e,0x03,0x27,0x80,0xd9,0x40 } },
+{ 16, 0xf270, 0, {0x3e,0x40,0x0f,0x90,0x03,0xc5,0x10,0xd9,0xe8,0x36,0x50,0x0c,0xd0,0x03,0xe6,0x00 } },
+{ 16, 0xf280, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe1,0x08,0x88,0x00,0x82,0x00 } },
+{ 16, 0xf290, 0, {0x0b,0x8e,0x82,0xeb,0xc8,0x88,0xe0,0x22,0x00,0x28,0x88,0x42,0xa2,0x80,0x8a,0x80 } },
+{ 16, 0xf2a0, 0, {0x22,0x00,0x0b,0xaa,0x02,0xe2,0x00,0x88,0xc0,0x22,0xa9,0x08,0x8a,0x03,0x8e,0x04 } },
+{ 16, 0xf2b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc4,0x00,0x81,0x00,0x20,0xd0 } },
+{ 16, 0xf2c0, 0, {0x0b,0x11,0x32,0x84,0x84,0x81,0x60,0x60,0x50,0x08,0x16,0x06,0x05,0x00,0x91,0x20 } },
+{ 16, 0xf2d0, 0, {0x20,0x40,0x0b,0x10,0x82,0xe4,0x09,0x91,0x20,0x24,0x40,0x08,0x10,0xc2,0xd2,0x01 } },
+{ 16, 0xf2e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa4,0x04,0x89,0x04,0x22,0x40 } },
+{ 16, 0xf2f0, 0, {0x0b,0x90,0x02,0xc4,0x00,0xa9,0x00,0x22,0x41,0x00,0x90,0x02,0xa4,0x00,0x81,0x00 } },
+{ 16, 0xf300, 0, {0x22,0x40,0x0b,0x92,0x22,0xe5,0x80,0x99,0x01,0x22,0x61,0x08,0x90,0x02,0x86,0x04 } },
+{ 16, 0xf310, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x14,0xa5,0x82,0x81,0x90,0x32,0x40 } },
+{ 16, 0xf320, 0, {0x0f,0x90,0x13,0x67,0x02,0xc9,0x00,0x32,0x40,0x0c,0x90,0x23,0x24,0x04,0xd9,0xc0 } },
+{ 16, 0xf330, 0, {0xb2,0x40,0x0f,0x9c,0x03,0xe6,0x00,0xd9,0x00,0x36,0x50,0x0c,0x90,0x03,0xe8,0x04 } },
+{ 16, 0xf340, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x00,0xa6,0x80,0xf9,0x00,0x3e,0x40 } },
+{ 16, 0xf350, 0, {0x0f,0x90,0x03,0xe7,0x00,0xd9,0x00,0xbc,0x42,0x0f,0x90,0x53,0xe4,0x04,0xf9,0x10 } },
+{ 16, 0xf360, 0, {0x3e,0x40,0x0f,0x98,0x03,0xe6,0x04,0xe1,0x00,0x3e,0x40,0x2f,0x90,0x03,0xda,0x00 } },
+{ 16, 0xf370, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0x81,0x10,0x48,0x10,0x32,0x08 } },
+{ 16, 0xf380, 0, {0x0c,0x80,0x0f,0x21,0x02,0xc8,0x00,0x3a,0x04,0x0f,0x80,0x07,0x60,0x00,0xf8,0x40 } },
+{ 16, 0xf390, 0, {0xb2,0x00,0x0f,0x84,0x0b,0x20,0x00,0xd8,0x00,0x36,0x10,0x0c,0x80,0x03,0xca,0x04 } },
+{ 16, 0xf3a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x04,0x28,0x04,0x8e,0x80,0x23,0x80 } },
+{ 16, 0xf3b0, 0, {0x08,0xa0,0x42,0x28,0x00,0x8a,0x00,0x23,0xa0,0x4b,0xa0,0x02,0xe8,0x00,0xba,0x00 } },
+{ 16, 0xf3c0, 0, {0x76,0x80,0x0b,0xa0,0x02,0x08,0x00,0x8a,0x00,0x32,0x80,0x08,0xe0,0x03,0xca,0x00 } },
+{ 16, 0xf3d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x82,0x00,0x20,0xd0 } },
+{ 16, 0xf3e0, 0, {0x08,0x30,0x02,0x0c,0x00,0x9b,0x00,0x28,0xc0,0x1a,0xb0,0x02,0x6c,0x00,0xb3,0x02 } },
+{ 16, 0xf3f0, 0, {0x20,0xc0,0x0b,0x30,0x02,0x0c,0x00,0xa3,0x00,0x22,0xc0,0x28,0x34,0x82,0xca,0x00 } },
+{ 16, 0xf400, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1c,0x00,0x87,0x00,0x20,0xe0 } },
+{ 16, 0xf410, 0, {0x08,0x78,0x02,0x0c,0x00,0x97,0x20,0x25,0xc0,0x0b,0x71,0x02,0xdc,0x81,0xb7,0x20 } },
+{ 16, 0xf420, 0, {0x21,0xc0,0x0b,0x7a,0x42,0x3c,0x80,0x87,0x20,0x21,0xc0,0x08,0x70,0x02,0xe8,0x00 } },
+{ 16, 0xf430, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x0e,0x82,0xc7,0x80,0xb1,0xe0 } },
+{ 16, 0xf440, 0, {0x2c,0xfa,0x06,0x1e,0x08,0xd3,0xb1,0x39,0x60,0x4e,0x78,0x12,0x5e,0xa0,0xff,0xf0 } },
+{ 16, 0xf450, 0, {0x21,0xe0,0x0f,0xf8,0x03,0x1f,0x08,0xe3,0xa0,0x33,0xe0,0x0c,0x68,0x03,0xea,0x02 } },
+{ 16, 0xf460, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x40,0xfb,0x00,0x3e,0xc0 } },
+{ 16, 0xf470, 0, {0x0f,0xb2,0x03,0xed,0xa8,0xeb,0x10,0x3a,0x80,0x0f,0xb0,0xc3,0xec,0x40,0xfb,0x00 } },
+{ 16, 0xf480, 0, {0x3e,0xc0,0x0f,0xb0,0x83,0xec,0x80,0xeb,0x70,0xbe,0xc4,0x0f,0xb0,0x03,0x82,0x06 } },
+{ 16, 0xf490, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x00,0xce,0x80,0xb3,0x60 } },
+{ 16, 0xf4a0, 0, {0x0f,0xfc,0x83,0x7e,0x20,0xef,0xb0,0x3b,0xe0,0x0f,0xb8,0x03,0x3e,0x00,0xcf,0x81 } },
+{ 16, 0xf4b0, 0, {0x3f,0xe0,0x8f,0xf8,0x83,0xef,0x40,0xff,0xc2,0x33,0xe1,0x0c,0xf8,0x03,0xd0,0x00 } },
+{ 16, 0xf4c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x82,0x87,0x18,0x21,0x80 } },
+{ 16, 0xf4d0, 0, {0x0b,0x30,0x02,0x1c,0x60,0xd7,0x10,0x21,0xd0,0x0b,0x7b,0x02,0x3c,0x00,0xd7,0x00 } },
+{ 16, 0xf4e0, 0, {0x2d,0xc0,0x0b,0x70,0x02,0xde,0x00,0xbf,0x00,0xa3,0xc4,0x08,0x70,0x03,0xaa,0x04 } },
+{ 16, 0xf4f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xbc,0x11,0x87,0x00,0x21,0xc0 } },
+{ 16, 0xf500, 0, {0x0b,0x30,0x02,0x1c,0x00,0x93,0x20,0x69,0xc0,0x0b,0x70,0x02,0x1c,0x00,0x87,0x00 } },
+{ 16, 0xf510, 0, {0x2d,0xc0,0x0b,0x71,0x02,0xdc,0x20,0xb7,0x10,0x21,0xc0,0x08,0x60,0x02,0x84,0x00 } },
+{ 16, 0xf520, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x14,0xcd,0x00,0x83,0x40,0x20,0xc0 } },
+{ 16, 0xf530, 0, {0x4b,0x30,0x02,0x0c,0x01,0x83,0x00,0x20,0xc0,0x0b,0x30,0x02,0x0c,0x00,0x93,0x80 } },
+{ 16, 0xf540, 0, {0x2c,0xc0,0x0b,0x30,0x02,0xcc,0x01,0xb3,0x00,0x20,0xc0,0x08,0x30,0x22,0x98,0x04 } },
+{ 16, 0xf550, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbf,0x20,0xca,0xc0,0x32,0x80 } },
+{ 16, 0xf560, 0, {0x0f,0xf0,0x03,0x3e,0x00,0x9f,0x00,0x3a,0x80,0x0f,0xf0,0x0b,0x3c,0x00,0xcf,0x98 } },
+{ 16, 0xf570, 0, {0x3e,0xc0,0x0f,0xf6,0x03,0xff,0x00,0xff,0x00,0x31,0xe0,0x2c,0xb0,0x03,0xae,0x04 } },
+{ 16, 0xf580, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xcc,0x80,0xfb,0x00,0x3e,0x50 } },
+{ 16, 0xf590, 0, {0x0f,0xb0,0x03,0xac,0x02,0xfb,0x00,0x7e,0x50,0x0f,0xb0,0x03,0xec,0x00,0xfb,0x00 } },
+{ 16, 0xf5a0, 0, {0x3e,0xc0,0x0f,0xb2,0x03,0xec,0x20,0xf3,0x00,0x3e,0xc6,0x0f,0x90,0x03,0xa0,0x00 } },
+{ 16, 0xf5b0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x02,0xcf,0x98,0x73,0xc8 } },
+{ 16, 0xf5c0, 0, {0x0f,0x70,0x03,0x3c,0x00,0xff,0x00,0x33,0x28,0x0f,0xb0,0x02,0x1c,0x00,0x4f,0x00 } },
+{ 16, 0xf5d0, 0, {0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xff,0x01,0x33,0xc0,0x0c,0xe4,0x03,0xe4,0x04 } },
+{ 16, 0xf5e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x6c,0x00,0x83,0x80,0xa2,0xf8 } },
+{ 16, 0xf5f0, 0, {0x0b,0xb0,0x42,0x2c,0x00,0xbb,0x00,0x32,0x10,0x0f,0xb0,0x03,0x6c,0x04,0xab,0x00 } },
+{ 16, 0xf600, 0, {0x2e,0xc0,0x0b,0xb0,0x12,0xec,0x04,0xeb,0x00,0x22,0xc0,0x4a,0x94,0x82,0xe0,0x00 } },
+{ 16, 0xf610, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x6c,0x00,0x8a,0x00,0x22,0x00 } },
+{ 16, 0xf620, 0, {0x0b,0xb0,0x02,0x2c,0x00,0xb3,0x00,0xa2,0xc0,0x0b,0x30,0x02,0xac,0x00,0xab,0x04 } },
+{ 16, 0xf630, 0, {0x2e,0xc0,0x0b,0xb0,0x42,0xec,0x00,0xbb,0x00,0x22,0xc0,0x08,0xb0,0x22,0xe0,0x00 } },
+{ 16, 0xf640, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x0c,0x00,0x8b,0x01,0x20,0x00 } },
+{ 16, 0xf650, 0, {0x0b,0x30,0x06,0x0c,0x00,0xb3,0x00,0x20,0xc0,0x0a,0x32,0x0a,0xcc,0x00,0xa3,0x00 } },
+{ 16, 0xf660, 0, {0x2c,0xc0,0x0b,0x30,0x02,0xcc,0x00,0xa3,0x00,0x22,0xc0,0x4a,0x00,0x12,0xc2,0x01 } },
+{ 16, 0xf670, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x6c,0x00,0x8b,0x04,0x22,0xc0 } },
+{ 16, 0xf680, 0, {0x0f,0xf1,0x03,0x1c,0x00,0xff,0x04,0x32,0xc0,0x0b,0xf2,0x03,0xbc,0x00,0xef,0x00 } },
+{ 16, 0xf690, 0, {0x3e,0xc0,0x07,0xf0,0x03,0xfc,0x80,0xff,0x00,0xb2,0xc0,0x0c,0xa0,0x03,0xe0,0x03 } },
+{ 16, 0xf6a0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x19,0xdc,0x00,0xf5,0x00,0x3f,0xc0 } },
+{ 16, 0xf6b0, 0, {0x0f,0xf0,0x03,0xfc,0x01,0xff,0x02,0x3b,0xc0,0x0f,0xf1,0x03,0x7c,0x00,0xff,0x00 } },
+{ 16, 0xf6c0, 0, {0x3f,0xc0,0x0f,0xf0,0x13,0xfc,0x40,0xef,0x00,0x3f,0xc0,0x0f,0xc0,0x03,0xe8,0x06 } },
+{ 16, 0xf6d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xf2,0x40,0xcc,0x80,0x37,0x20 } },
+{ 16, 0xf6e0, 0, {0x0c,0xd8,0x03,0xb0,0x44,0xfc,0x08,0x3f,0x0e,0x0f,0xc1,0x03,0xfc,0x00,0xcc,0x94 } },
+{ 16, 0xf6f0, 0, {0x3f,0x0a,0x2e,0xc4,0x03,0x7d,0x80,0xcf,0x10,0x3f,0xc0,0x0f,0xc0,0x83,0x30,0x00 } },
+{ 16, 0xf700, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x08,0xe0,0x90,0x88,0x02,0x22,0x81 } },
+{ 16, 0xf710, 0, {0x08,0x92,0x13,0xa4,0x40,0x3b,0x60,0x22,0x18,0x0b,0x81,0x02,0xfc,0xd4,0x81,0x00 } },
+{ 16, 0xf720, 0, {0x3a,0xb0,0x0a,0x94,0x02,0x3d,0x40,0xaf,0x63,0x2f,0xdf,0x0b,0x98,0x00,0x20,0x04 } },
+{ 16, 0xf730, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xe0,0x00,0x88,0x00,0x20,0x40 } },
+{ 16, 0xf740, 0, {0x88,0x30,0x82,0xc0,0x00,0xb0,0x08,0x28,0x80,0x0a,0x10,0x02,0xcc,0x20,0x80,0x01 } },
+{ 16, 0xf750, 0, {0x2c,0x40,0x1b,0x06,0x02,0x8c,0x90,0x93,0x60,0x68,0xc0,0x4a,0x00,0x42,0x22,0x01 } },
+{ 16, 0xf760, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xa0,0x02,0x88,0x00,0x22,0xc0 } },
+{ 16, 0xf770, 0, {0x08,0xb0,0x02,0xe4,0x20,0xbb,0x88,0x26,0x98,0x0b,0x80,0x42,0xcc,0x18,0x8a,0x00 } },
+{ 16, 0xf780, 0, {0x2e,0xc2,0x1b,0x98,0x02,0xac,0x00,0xab,0x00,0x2e,0xc0,0x0b,0x98,0x82,0x30,0x04 } },
+{ 16, 0xf790, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0xe3,0xc0,0xcb,0x02,0x32,0x00 } },
+{ 16, 0xf7a0, 0, {0x2c,0x80,0x03,0xae,0x08,0xb9,0x00,0x3e,0x70,0x0f,0xb9,0x03,0xec,0x02,0x48,0x48 } },
+{ 16, 0xf7b0, 0, {0x3c,0xc0,0x0f,0x8c,0x93,0xec,0x00,0xdb,0x00,0x1a,0xc0,0x0e,0xac,0x03,0x10,0x04 } },
+{ 16, 0xf7c0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb2,0x00,0xff,0x00,0xbb,0x80 } },
+{ 16, 0xf7d0, 0, {0x0f,0xc0,0x43,0xb6,0x40,0xbd,0x00,0x3b,0x60,0x0f,0xe8,0x03,0xfc,0x00,0xff,0x94 } },
+{ 16, 0xf7e0, 0, {0x3b,0xe4,0x0e,0x60,0x0f,0x6c,0x08,0xef,0x01,0x3f,0xc0,0x0f,0x60,0x03,0xf8,0x00 } },
+{ 16, 0xf7f0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa1,0x00,0xfb,0x00,0x3e,0x60 } },
+{ 16, 0xf800, 0, {0x0f,0xa0,0x03,0xed,0x00,0xf9,0x40,0x3a,0x00,0x0f,0x90,0x03,0xec,0x02,0xc9,0x04 } },
+{ 16, 0xf810, 0, {0x32,0xd0,0x0f,0x90,0x03,0x2c,0x08,0xdb,0x00,0xb6,0xc0,0x0d,0xb4,0x03,0xd0,0x04 } },
+{ 16, 0xf820, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x00,0x00,0xb3,0x89,0x2e,0xe0 } },
+{ 16, 0xf830, 0, {0x0b,0xa4,0x03,0xa4,0x01,0xb9,0x00,0x2e,0x01,0x0b,0x90,0x42,0xfc,0x10,0x89,0x50 } },
+{ 16, 0xf840, 0, {0xa2,0xc0,0x8d,0xb4,0x02,0x3c,0x44,0x8f,0x00,0x23,0xc0,0x08,0xb0,0x02,0xf2,0x00 } },
+{ 16, 0xf850, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x04,0x0c,0x00,0xb0,0x80,0x2e,0x00 } },
+{ 16, 0xf860, 0, {0x0b,0x12,0x02,0xc8,0x00,0xba,0x00,0x2c,0xc0,0x0b,0x20,0x02,0xcc,0x00,0xa2,0x00 } },
+{ 16, 0xf870, 0, {0x20,0x00,0x2b,0x2d,0x9a,0x2e,0x42,0x83,0x00,0x28,0xc0,0x08,0x20,0x02,0xf8,0x00 } },
+{ 16, 0xf880, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x1e,0x04,0xb4,0x80,0x2d,0xa0 } },
+{ 16, 0xf890, 0, {0x0b,0x58,0x02,0x92,0x00,0xb6,0x80,0x2d,0xe0,0x0b,0x68,0x02,0xde,0x40,0xa6,0x80 } },
+{ 16, 0xf8a0, 0, {0x21,0x24,0x29,0x48,0x02,0x1e,0x80,0x87,0x80,0x69,0xe0,0x08,0x61,0x02,0xc8,0x00 } },
+{ 16, 0xf8b0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x18,0x0c,0x00,0xf0,0x30,0x3c,0x4c } },
+{ 16, 0xf8c0, 0, {0x0f,0x32,0x03,0xc8,0x80,0xb2,0x00,0x38,0x80,0x0f,0x1b,0x03,0xec,0x00,0xe0,0x30 } },
+{ 16, 0xf8d0, 0, {0x30,0x04,0x0f,0xb1,0x03,0x0e,0x85,0xcb,0x00,0x3a,0xc0,0x0c,0x31,0x03,0xd2,0x02 } },
+{ 16, 0xf8e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1c,0xbc,0x00,0xfc,0x11,0x3f,0xc4 } },
+{ 16, 0xf8f0, 0, {0x0f,0xb8,0x13,0xb0,0x04,0xfe,0x02,0x3f,0x80,0x0f,0xc0,0x03,0xfd,0x00,0xdf,0x12 } },
+{ 16, 0xf900, 0, {0x1d,0x04,0x0f,0xd0,0x43,0xbc,0x01,0xef,0x10,0x33,0xc4,0x0e,0xf3,0x03,0xd0,0x06 } },
+{ 16, 0xf910, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xee,0x00,0xcb,0x00,0x3e,0x00 } },
+{ 16, 0xf920, 0, {0x0f,0x80,0x03,0x28,0x00,0xf8,0x00,0x3e,0x40,0x3d,0xb0,0x03,0xef,0x08,0xc9,0x00 } },
+{ 16, 0xf930, 0, {0x3a,0x00,0x0c,0xa0,0x03,0xec,0x98,0xfb,0x20,0x32,0xd2,0x0c,0xa8,0x03,0x2a,0x02 } },
+{ 16, 0xf940, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x00,0x87,0x01,0x2d,0x80 } },
+{ 16, 0xf950, 0, {0x0b,0x40,0x42,0x1c,0x04,0x37,0x00,0xa1,0x40,0x08,0x60,0x02,0xcc,0x80,0x87,0x00 } },
+{ 16, 0xf960, 0, {0x2d,0x80,0x2e,0x70,0x02,0xdc,0xa9,0xb7,0x28,0x21,0xd0,0x08,0x70,0x02,0x12,0x00 } },
+{ 16, 0xf970, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0xbe,0x02,0x87,0x80,0x2d,0x60 } },
+{ 16, 0xf980, 0, {0x4b,0xe8,0x02,0x5a,0x01,0xb4,0x88,0x28,0xe0,0x88,0x78,0xc2,0xde,0x52,0x86,0xc0 } },
+{ 16, 0xf990, 0, {0x29,0x60,0x08,0x68,0x02,0xde,0x40,0xb3,0x92,0xe1,0xe8,0x28,0x28,0x02,0x70,0x00 } },
+{ 16, 0xf9a0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x14,0xcc,0x00,0x8b,0x80,0x2e,0xc0 } },
+{ 16, 0xf9b0, 0, {0x0b,0x20,0x02,0x4d,0x80,0x9b,0x20,0x20,0xe0,0x08,0x38,0x02,0xcc,0x00,0x83,0x80 } },
+{ 16, 0xf9c0, 0, {0x2c,0xc0,0x0a,0xb0,0x02,0xcc,0x08,0xb3,0x00,0x20,0xc0,0x08,0x31,0x02,0x52,0x04 } },
+{ 16, 0xf9d0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0xa8,0x00,0xca,0xe0,0x3e,0x80 } },
+{ 16, 0xf9e0, 0, {0x1f,0xa4,0x0b,0x79,0x00,0xfe,0x00,0x3f,0x82,0x1d,0xe0,0x03,0xe8,0x00,0xce,0x40 } },
+{ 16, 0xf9f0, 0, {0x3b,0x88,0x2c,0xe4,0x03,0xe8,0x01,0xfa,0x00,0x32,0x80,0x0c,0xe8,0x03,0x7a,0x04 } },
+{ 16, 0xfa00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0xa0,0x00,0xf8,0x09,0x3e,0x00 } },
+{ 16, 0xfa10, 0, {0x8f,0xc0,0x83,0xa0,0x18,0xf8,0x00,0x3c,0x20,0x0f,0x88,0x03,0xe0,0x00,0xf8,0x08 } },
+{ 16, 0xfa20, 0, {0x3e,0x20,0x0e,0x80,0x83,0xe1,0x01,0xf0,0x00,0x3c,0x00,0x0f,0x80,0x0b,0x92,0x00 } },
+{ 16, 0xfa30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xa4,0x00,0xf9,0x42,0x32,0x40 } },
+{ 16, 0xfa40, 0, {0x4c,0x98,0x03,0x04,0x00,0xc9,0x00,0x3a,0x40,0x0f,0x90,0x23,0x24,0x00,0xb9,0x81 } },
+{ 16, 0xfa50, 0, {0x3c,0x40,0x0c,0x92,0x03,0x24,0x00,0xf9,0x05,0x32,0x40,0x6c,0x90,0xc3,0xc2,0x04 } },
+{ 16, 0xfa60, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x24,0x14,0xb9,0x00,0xa2,0x54 } },
+{ 16, 0xfa70, 0, {0x08,0x9b,0x1a,0x24,0x02,0x89,0x00,0x22,0x40,0x28,0x90,0x02,0xa4,0x00,0xb9,0x90 } },
+{ 16, 0xfa80, 0, {0x2e,0x40,0x28,0x9c,0x82,0x25,0x04,0xb9,0x00,0x22,0x40,0x08,0x98,0x12,0xe0,0x00 } },
+{ 16, 0xfa90, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xad,0x00,0x23,0x40 } },
+{ 16, 0xfaa0, 0, {0x08,0x50,0x02,0x64,0x00,0x89,0x00,0x2a,0x40,0x08,0x10,0x02,0x64,0x00,0xb9,0x00 } },
+{ 16, 0xfab0, 0, {0x6e,0x40,0x08,0x90,0x02,0x25,0x00,0xa9,0x00,0x22,0x40,0x08,0x91,0x06,0xc6,0x00 } },
+{ 16, 0xfac0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x14,0x00,0xb5,0x10,0xa1,0x44 } },
+{ 16, 0xfad0, 0, {0x28,0x50,0x02,0x44,0x80,0x81,0x30,0x20,0x48,0x08,0x12,0x02,0x84,0x40,0xb1,0x80 } },
+{ 16, 0xfae0, 0, {0x6c,0xc8,0x08,0x12,0x02,0x04,0x80,0xb1,0x34,0x20,0x48,0x08,0x12,0x02,0xc2,0x01 } },
+{ 16, 0xfaf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xe8,0x40,0x32,0x90 } },
+{ 16, 0xfb00, 0, {0x0c,0xc5,0x03,0x61,0x40,0xc0,0x40,0x3a,0x14,0x0f,0x85,0x03,0x21,0xb0,0xf8,0x50 } },
+{ 16, 0xfb10, 0, {0x3e,0x00,0x0c,0x85,0x03,0x21,0x40,0xf8,0x40,0xb0,0x14,0x0c,0x80,0x03,0xee,0x01 } },
+{ 16, 0xfb20, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x1d,0xc4,0x04,0xf9,0x22,0x0e,0x48 } },
+{ 16, 0xfb30, 0, {0x0f,0x10,0x13,0xb4,0x40,0xfd,0x30,0x3f,0x44,0x4f,0xd1,0x00,0xe4,0x84,0xff,0x01 } },
+{ 16, 0xfb40, 0, {0x3d,0x44,0x0f,0xd1,0x0b,0xe4,0x40,0xf9,0x30,0x3e,0x44,0x0f,0xd1,0x03,0xe6,0x04 } },
+{ 16, 0xfb50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x05,0xe4,0x00,0xdd,0x40,0x3f,0x50 } },
+{ 16, 0xfb60, 0, {0x0c,0xd0,0x03,0x2c,0x00,0xc9,0x00,0x36,0x40,0x0f,0x90,0x13,0x27,0x04,0xf5,0x01 } },
+{ 16, 0xfb70, 0, {0x37,0x40,0x0c,0xf0,0x03,0xf6,0x20,0xf9,0xa8,0x32,0x68,0x0c,0xd0,0x03,0xc6,0x00 } },
+{ 16, 0xfb80, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0xe0,0x00,0x88,0xa0,0x2e,0x28 } },
+{ 16, 0xfb90, 0, {0x28,0x80,0x02,0x20,0x00,0x88,0xa0,0x22,0x00,0x0b,0x80,0x0a,0x62,0x80,0xb8,0x00 } },
+{ 16, 0xfba0, 0, {0x22,0x00,0x08,0x80,0x02,0xe1,0x00,0xb8,0xe0,0x22,0x3a,0x08,0xa0,0x02,0xce,0x04 } },
+{ 16, 0xfbb0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x84,0x02,0x81,0x00,0x2e,0x40 } },
+{ 16, 0xfbc0, 0, {0x08,0x10,0x0a,0x44,0x02,0x81,0x08,0x24,0x40,0x0a,0x10,0x02,0x45,0x80,0xb9,0x00 } },
+{ 16, 0xfbd0, 0, {0x24,0x40,0x29,0x10,0x02,0xc4,0x00,0xb1,0x08,0x24,0x44,0x08,0x10,0x02,0xc2,0x01 } },
+{ 16, 0xfbe0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x14,0xa4,0x04,0x89,0x01,0x2e,0x50 } },
+{ 16, 0xfbf0, 0, {0x48,0xb2,0x02,0x64,0x00,0x91,0x00,0x22,0x46,0x0b,0x90,0x02,0x64,0x00,0xb9,0x01 } },
+{ 16, 0xfc00, 0, {0x26,0xc0,0x09,0xb0,0x12,0xe4,0x00,0xb1,0x00,0x26,0x40,0x08,0x90,0x02,0xc6,0x04 } },
+{ 16, 0xfc10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x04,0xe4,0x00,0xc9,0x00,0x3c,0x40 } },
+{ 16, 0xfc20, 0, {0x0c,0x90,0x03,0x64,0x00,0xc9,0x02,0x36,0x50,0x0e,0x93,0x03,0x24,0x00,0xf9,0x90 } },
+{ 16, 0xfc30, 0, {0x36,0x48,0x0d,0x94,0x83,0xe4,0x08,0xf9,0x00,0xb6,0x40,0x0c,0x94,0x03,0xe8,0x04 } },
+{ 16, 0xfc40, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x10,0xa4,0x00,0xe9,0x00,0x3e,0x40 } },
+{ 16, 0xfc50, 0, {0x0f,0x90,0x13,0xa4,0x00,0xe9,0x02,0x2e,0x61,0x05,0x90,0x03,0xa4,0x00,0xf9,0x00 } },
+{ 16, 0xfc60, 0, {0x3a,0x40,0x0e,0x90,0x43,0xe4,0x10,0xf9,0x00,0x38,0x40,0x2f,0x90,0x03,0xca,0x00 } },
+{ 16, 0xfc70, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xd8,0x01,0x32,0x04 } },
+{ 16, 0xfc80, 0, {0x0f,0x80,0x43,0xc0,0x01,0xc8,0x00,0xb2,0x01,0x0c,0x80,0x03,0x20,0x00,0xc8,0x40 } },
+{ 16, 0xfc90, 0, {0x30,0x00,0x8c,0x84,0x83,0xe0,0x00,0xc8,0x00,0x32,0x00,0x6c,0x84,0x03,0xca,0x04 } },
+{ 16, 0xfca0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x28,0x00,0xba,0x00,0x23,0x80 } },
+{ 16, 0xfcb0, 0, {0x0b,0xea,0x02,0xe8,0x00,0xaa,0x00,0x22,0x80,0x08,0xa0,0x02,0x28,0x00,0x86,0x20 } },
+{ 16, 0xfcc0, 0, {0x37,0xa0,0x8d,0xe4,0x02,0xf8,0x00,0xda,0x00,0x22,0x80,0x08,0xa0,0x02,0xca,0x00 } },
+{ 16, 0xfcd0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0x6c,0x00,0xb3,0x00,0x20,0xc0 } },
+{ 16, 0xfce0, 0, {0x0b,0xb8,0x02,0x4c,0x04,0x83,0x00,0x20,0xc0,0x08,0xb0,0x02,0x0c,0x02,0x83,0x00 } },
+{ 16, 0xfcf0, 0, {0x20,0x40,0x28,0x34,0x02,0xce,0x90,0x83,0x00,0xa0,0xc0,0x08,0x30,0x02,0xca,0x00 } },
+{ 16, 0xfd00, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1c,0xc0,0xb5,0x88,0x21,0x40 } },
+{ 16, 0xfd10, 0, {0x0b,0x70,0x02,0xdc,0x80,0xa3,0x20,0x21,0xe0,0x48,0x32,0x42,0x0e,0x90,0x8e,0x01 } },
+{ 16, 0xfd20, 0, {0x65,0x50,0x09,0x70,0x02,0xde,0x20,0x93,0x21,0x21,0xc0,0x08,0x70,0x02,0xe8,0x00 } },
+{ 16, 0xfd30, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x18,0x1e,0x00,0xff,0x80,0xb1,0xa0 } },
+{ 16, 0xfd40, 0, {0x0f,0x48,0x02,0x7e,0x00,0x87,0xa0,0x33,0xe0,0x28,0x7a,0x0b,0x1f,0x00,0xc4,0x80 } },
+{ 16, 0xfd50, 0, {0x31,0x60,0x8c,0x58,0x03,0xfe,0x00,0xc7,0xc8,0x33,0xe8,0x0c,0x58,0x03,0xea,0x02 } },
+{ 16, 0xfd60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x00,0xff,0x00,0x3e,0x00 } },
+{ 16, 0xfd70, 0, {0x0f,0x90,0x23,0xec,0xa0,0xfb,0x40,0x3e,0xc0,0x8f,0xb5,0x03,0xed,0x80,0xf8,0x00 } },
+{ 16, 0xfd80, 0, {0x3c,0x40,0x0f,0xb0,0x03,0xe8,0x00,0xfb,0x02,0x3e,0xd0,0x0f,0x90,0x03,0xc2,0x06 } },
+{ 16, 0xfd90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x04,0xbe,0x00,0xff,0x80,0x3f,0xe0 } },
+{ 16, 0xfda0, 0, {0x0f,0xd9,0x03,0xfe,0x20,0xcf,0xc8,0x33,0xea,0x8f,0xfc,0x03,0x3f,0x00,0xfd,0x80 } },
+{ 16, 0xfdb0, 0, {0x3f,0x60,0x0e,0xe8,0x03,0xf2,0x00,0xcf,0x80,0x2f,0xfe,0x0c,0x78,0x03,0x00,0x00 } },
+{ 16, 0xfdc0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x00,0x9c,0x00,0xb5,0x02,0x2d,0xc0 } },
+{ 16, 0xfdd0, 0, {0x0b,0x58,0x42,0xdc,0x80,0xcf,0x00,0x21,0xc1,0x0b,0x30,0x12,0x1c,0x40,0xb4,0x02 } },
+{ 16, 0xfde0, 0, {0x2d,0x46,0x08,0x71,0x12,0xc8,0x00,0xe7,0x00,0x2d,0xc4,0x08,0x70,0x03,0x6a,0x04 } },
+{ 16, 0xfdf0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xb7,0x00,0x2d,0x02 } },
+{ 16, 0xfe00, 0, {0x0b,0x46,0x02,0xdc,0x08,0x97,0x00,0x21,0xc9,0x0a,0x30,0x22,0x1c,0x00,0xb4,0x00 } },
+{ 16, 0xfe10, 0, {0x2d,0x40,0x0a,0x50,0x82,0xc4,0x00,0xb7,0x00,0x2c,0xc8,0x28,0x50,0x02,0x40,0x10 } },
+{ 16, 0xfe20, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x14,0x8c,0x18,0xb3,0x00,0x2e,0x20 } },
+{ 16, 0xfe30, 0, {0x0b,0x18,0x02,0xcf,0x4a,0x83,0xc2,0x20,0xc1,0x0b,0x34,0x22,0x0c,0x04,0xb8,0x58 } },
+{ 16, 0xfe40, 0, {0x2c,0x40,0x0b,0x28,0x02,0xc8,0x00,0xa3,0x00,0x2c,0xc0,0x08,0x14,0x02,0x48,0x04 } },
+{ 16, 0xfe50, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xbc,0x00,0xfb,0x00,0x3e,0x80 } },
+{ 16, 0xfe60, 0, {0x0f,0xa0,0x02,0xfc,0x00,0xdf,0xa0,0xb3,0xc0,0x0e,0xf0,0x0b,0x3c,0x00,0xfb,0xc0 } },
+{ 16, 0xfe70, 0, {0x3c,0xa0,0x0e,0xbd,0x03,0xec,0x00,0xff,0x00,0x3f,0xc0,0x0c,0x30,0x03,0x6a,0x04 } },
+{ 16, 0xfe80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x10,0xec,0x00,0xf9,0x00,0x3e,0x01 } },
+{ 16, 0xfe90, 0, {0x8f,0xb1,0x43,0xec,0x00,0xf3,0x00,0x3e,0xc0,0x4f,0xb0,0x13,0xec,0x00,0xfb,0x00 } },
+{ 16, 0xfea0, 0, {0x3e,0x80,0x0c,0x84,0x03,0xe1,0x00,0x73,0x00,0x3e,0xc1,0x0f,0xb2,0x43,0xe0,0x00 } },
+{ 16, 0xfeb0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x50,0xfc,0x10,0xff,0x80,0x37,0xc0 } },
+{ 16, 0xfec0, 0, {0x0c,0xe0,0x03,0xfc,0x20,0xff,0x08,0x33,0xc0,0x0f,0xf0,0x83,0xbc,0x00,0xff,0x00 } },
+{ 16, 0xfed0, 0, {0x33,0xc0,0x2e,0x40,0x03,0x1c,0x01,0xcf,0x00,0x11,0xc0,0x4c,0xd0,0x03,0x00,0x44 } },
+{ 16, 0xfee0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6c,0x04,0xb3,0x02,0x22,0x72 } },
+{ 16, 0xfef0, 0, {0x08,0xa1,0x16,0xec,0x00,0xbb,0x04,0x22,0xc0,0x0b,0xb0,0x42,0xec,0x00,0xba,0x19 } },
+{ 16, 0xff00, 0, {0xb6,0xd0,0x08,0x9c,0x4a,0x26,0x80,0xdb,0x00,0x22,0xc0,0x08,0x90,0x03,0x60,0x40 } },
+{ 16, 0xff10, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xb9,0x10,0x62,0x20 } },
+{ 16, 0xff20, 0, {0x48,0xa0,0x02,0xec,0x00,0xbb,0x00,0x22,0xc0,0x0b,0xb0,0x02,0xec,0x10,0xbb,0x00 } },
+{ 16, 0xff30, 0, {0x66,0x08,0x0a,0xa8,0x12,0x26,0x10,0x9b,0x00,0x2a,0xc0,0x28,0xb0,0x26,0x20,0x00 } },
+{ 16, 0xff40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x0c,0x00,0xb9,0x00,0x20,0x00 } },
+{ 16, 0xff50, 0, {0x08,0x32,0x02,0xcc,0x04,0xb3,0x00,0x20,0xc0,0x4b,0x30,0x02,0xcc,0x00,0xb3,0x00 } },
+{ 16, 0xff60, 0, {0x20,0x00,0x08,0x00,0x02,0x01,0x00,0x93,0x00,0x28,0xc0,0x08,0x30,0x06,0x42,0x11 } },
+{ 16, 0xff70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x6c,0x00,0xf9,0x00,0xb2,0x40 } },
+{ 16, 0xff80, 0, {0x0c,0x82,0x02,0xdc,0x01,0xff,0x00,0xb2,0xc0,0x0b,0xf1,0x03,0xbc,0x00,0xf9,0x00 } },
+{ 16, 0xff90, 0, {0x26,0x40,0x2e,0x80,0x03,0x21,0x04,0xcf,0x00,0xbb,0xc0,0x0c,0x90,0x03,0x00,0x03 } },
+{ 16, 0xffa0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xfc,0x00,0xfd,0x00,0x3f,0x40 } },
+{ 16, 0xffb0, 0, {0x0f,0x81,0x03,0xfc,0x00,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x23,0xfc,0x00,0xfc,0x00 } },
+{ 16, 0xffc0, 0, {0x2d,0x40,0x2f,0xc0,0x03,0xf0,0x88,0xff,0x00,0x37,0xc0,0x8f,0xd0,0x03,0xe8,0x02 } },
+{ 16, 0xffd0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfe,0x40,0xff,0x80,0x33,0xc2 } },
+{ 16, 0xffe0, 0, {0x0c,0xf8,0x03,0x7c,0xa0,0xff,0x90,0x3f,0xc4,0x2c,0xb4,0x03,0xbc,0x80,0xcf,0x40 } },
+{ 16, 0xfff0, 0, {0x37,0xe0,0x0f,0xf1,0x93,0x6e,0x44,0xbf,0x30,0x3f,0x20,0x2c,0xf8,0x63,0xf0,0x04 } },
+{ 16, 0x8010, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xec,0x00,0xeb,0x20,0x23,0xf0 } },
+{ 16, 0x8020, 0, {0x08,0xb8,0x52,0x3d,0x00,0xb3,0x00,0x2e,0xdc,0x08,0xf4,0x42,0x1c,0x42,0x8b,0x40 } },
+{ 16, 0x8030, 0, {0x22,0xc8,0x0b,0xf6,0x03,0x6c,0x88,0xbb,0x30,0x2e,0x00,0x08,0xb2,0x02,0xe0,0x04 } },
+{ 16, 0x8040, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0xbb,0x08,0x20,0xc0 } },
+{ 16, 0x8050, 0, {0x08,0x30,0x02,0x4c,0xa0,0xb3,0x20,0x26,0x80,0x88,0x36,0x02,0xcc,0xa0,0x93,0x60 } },
+{ 16, 0x8060, 0, {0xa4,0xc2,0x0a,0x32,0x42,0x4c,0x90,0xb3,0x20,0x2c,0x0b,0x88,0x30,0x82,0xe2,0x01 } },
+{ 16, 0x8070, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xac,0x08,0xbb,0x22,0xa2,0xc0 } },
+{ 16, 0x8080, 0, {0x08,0xb0,0x02,0x2c,0x00,0xbb,0x00,0x2e,0x90,0x08,0xb0,0x02,0xec,0x00,0x9b,0x00 } },
+{ 16, 0x8090, 0, {0x22,0xc0,0x0b,0xb0,0x02,0x6c,0x00,0xbb,0x02,0x2e,0x20,0x08,0xb0,0x02,0xf0,0x00 } },
+{ 16, 0x80a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xb1,0x83,0x32,0xc0 } },
+{ 16, 0x80b0, 0, {0x0c,0x1a,0x03,0x6c,0x10,0xfb,0x00,0x34,0xc0,0x0c,0xb0,0x03,0xec,0x08,0xda,0x00 } },
+{ 16, 0x80c0, 0, {0x36,0xc0,0x0e,0xb0,0x0b,0x6c,0x00,0xfb,0x00,0x3e,0x28,0x0c,0xb0,0x02,0xd0,0x00 } },
+{ 16, 0x80d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xbc,0x00,0xed,0x80,0x3f,0xc0 } },
+{ 16, 0x80e0, 0, {0x0f,0xd4,0x03,0xec,0x00,0xff,0x00,0x3f,0xc8,0x0f,0xb0,0x03,0x3c,0x00,0xee,0x40 } },
+{ 16, 0x80f0, 0, {0x3f,0xc0,0x0f,0x70,0x03,0xfc,0x00,0xff,0x00,0x3f,0x80,0x0f,0xf0,0x03,0xf8,0x00 } },
+{ 16, 0x8100, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xfb,0x20,0xb0,0xc0 } },
+{ 16, 0x8110, 0, {0x0f,0xb4,0x03,0xac,0x02,0xcb,0x00,0x32,0x90,0x0e,0xb0,0x03,0x6c,0x00,0xeb,0x00 } },
+{ 16, 0x8120, 0, {0x3a,0xc0,0x0c,0xb0,0x02,0xec,0x00,0xfb,0x00,0x3e,0x91,0x0f,0xb0,0x03,0x90,0x00 } },
+{ 16, 0x8130, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2c,0x00,0xbb,0x80,0x23,0xd7 } },
+{ 16, 0x8140, 0, {0x0b,0x90,0x02,0x3c,0x14,0x8b,0x00,0x6a,0x08,0x28,0xf0,0x00,0xbc,0x00,0x83,0x00 } },
+{ 16, 0x8150, 0, {0xbe,0xc0,0x88,0xf0,0x13,0x2c,0x00,0xef,0x00,0x2e,0x80,0x0b,0xb0,0x07,0xb2,0x00 } },
+{ 16, 0x8160, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb3,0x40,0x20,0xd0 } },
+{ 16, 0x8170, 0, {0x0b,0x28,0x02,0x8c,0x00,0x83,0x01,0x20,0xc0,0x1a,0xb8,0x00,0x6c,0x10,0xa1,0x00 } },
+{ 16, 0x8180, 0, {0x68,0xc0,0x2a,0x30,0x02,0x8c,0x00,0xb3,0x02,0x2e,0x00,0x4b,0x30,0x02,0xf8,0x04 } },
+{ 16, 0x8190, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1e,0x00,0xb7,0xa0,0x21,0xe0 } },
+{ 16, 0x81a0, 0, {0x0b,0xec,0xc2,0x1e,0x04,0x87,0x80,0x29,0xe4,0x08,0x79,0x82,0x9e,0x40,0xaf,0x90 } },
+{ 16, 0x81b0, 0, {0x29,0xe0,0x0a,0x38,0x00,0x1e,0x00,0xa7,0x90,0x2d,0x24,0x0b,0x78,0x02,0x88,0x00 } },
+{ 16, 0x81c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x50,0xfb,0x09,0x30,0xc0 } },
+{ 16, 0x81d0, 0, {0x0f,0x20,0x02,0x8c,0x40,0xc3,0x00,0x20,0xc0,0x0a,0x38,0x03,0x4c,0x44,0xe1,0x00 } },
+{ 16, 0x81e0, 0, {0xaa,0xc0,0x0e,0x31,0x43,0x8e,0x00,0xf3,0x00,0x3c,0x00,0x0f,0x30,0x03,0xd2,0x02 } },
+{ 16, 0x81f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x4d,0xbc,0x00,0xff,0x20,0x3f,0xd0 } },
+{ 16, 0x8200, 0, {0x4f,0x70,0x03,0xfc,0x00,0xff,0x00,0x3d,0xc0,0x0f,0xf3,0x43,0xfc,0x40,0xd7,0x00 } },
+{ 16, 0x8210, 0, {0xbf,0xc0,0x0d,0xf4,0xc3,0xfc,0x40,0xff,0x00,0x3f,0x40,0x0f,0xf0,0x03,0xd0,0x06 } },
+{ 16, 0x8220, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xfb,0x00,0x32,0xd0 } },
+{ 16, 0x8230, 0, {0x0d,0x90,0x01,0xed,0xc0,0xfb,0x00,0x3e,0xc0,0x1f,0xba,0x03,0xac,0xc0,0xc8,0x00 } },
+{ 16, 0x8240, 0, {0x32,0xe0,0x8d,0xb4,0x43,0xec,0x00,0xfb,0x00,0x36,0xa0,0x0c,0xb0,0x03,0x6a,0x00 } },
+{ 16, 0x8250, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x00,0xb7,0x00,0x21,0xc8 } },
+{ 16, 0x8260, 0, {0x08,0x60,0x02,0xdc,0x20,0xb7,0x00,0x2d,0xc0,0x0f,0x74,0xa2,0x1c,0x28,0xd6,0x00 } },
+{ 16, 0x8270, 0, {0x35,0xc0,0x08,0x72,0x02,0x5c,0x08,0xb7,0x44,0xa1,0x80,0x48,0x70,0x02,0x12,0x00 } },
+{ 16, 0x8280, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xb7,0x80,0x20,0xe4 } },
+{ 16, 0x8290, 0, {0x09,0x78,0x26,0xde,0x00,0xb7,0x80,0x2d,0xe2,0x0a,0x70,0x12,0x8c,0x88,0x81,0x80 } },
+{ 16, 0x82a0, 0, {0x21,0xe0,0x09,0x78,0x02,0xde,0x00,0xb3,0xa0,0x25,0xa0,0x28,0x78,0x02,0x70,0x04 } },
+{ 16, 0x82b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x01,0xbb,0x80,0x20,0xc0 } },
+{ 16, 0x82c0, 0, {0x08,0x30,0x42,0xec,0x00,0xb3,0x00,0x2c,0xc0,0x0a,0x30,0x22,0x0c,0x00,0x93,0x00 } },
+{ 16, 0x82d0, 0, {0x24,0xc1,0x08,0x30,0x02,0xcc,0x00,0xb3,0x00,0x20,0xe0,0x08,0xb0,0x02,0x12,0x04 } },
+{ 16, 0x82e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfa,0x08,0xb2,0x80 } },
+{ 16, 0x82f0, 0, {0x0d,0xe2,0x03,0xe8,0x00,0xfa,0x00,0x3f,0x80,0x0a,0xa0,0x03,0xa8,0x00,0xce,0x50 } },
+{ 16, 0x8300, 0, {0x32,0x80,0x05,0xa0,0x03,0xe8,0x00,0xfa,0x00,0x37,0xa8,0x0c,0xa0,0x03,0x7a,0x04 } },
+{ 16, 0x8310, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x60,0x08,0xf8,0x00,0x3c,0x00 } },
+{ 16, 0x8320, 0, {0x0f,0x88,0x01,0xe0,0x00,0xf8,0x04,0x3c,0x00,0x4f,0x00,0x13,0xc0,0x00,0xf8,0x00 } },
+{ 16, 0x8330, 0, {0x3e,0x00,0x0f,0x80,0x03,0x60,0x00,0xf8,0x02,0x3e,0x01,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0x8340, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x90,0x12,0x40 } },
+{ 16, 0x8350, 0, {0x0c,0x90,0x03,0xa4,0x00,0xc9,0x00,0x3e,0x70,0x0e,0x94,0x33,0x24,0x08,0xc9,0x00 } },
+{ 16, 0x8360, 0, {0x2a,0x40,0x0b,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3a,0x40,0x0f,0x90,0x03,0x02,0x04 } },
+{ 16, 0x8370, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0xb9,0x42,0x22,0x60 } },
+{ 16, 0x8380, 0, {0x08,0x10,0x02,0x24,0x00,0x89,0x03,0x2e,0x40,0x08,0x90,0x02,0xa4,0x01,0x81,0x04 } },
+{ 16, 0x8390, 0, {0x3e,0x40,0x0b,0x90,0x02,0xe4,0x00,0xb9,0x02,0x22,0x40,0x0e,0x90,0x02,0x20,0x00 } },
+{ 16, 0x83a0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x40,0x2a,0x4a } },
+{ 16, 0x83b0, 0, {0x08,0x91,0x02,0xa4,0x00,0x89,0x00,0x2e,0x40,0x1a,0x90,0x0a,0x24,0x04,0x89,0x00 } },
+{ 16, 0x83c0, 0, {0x2a,0x40,0x0b,0x90,0x02,0xe4,0x00,0xb1,0x00,0x2a,0x40,0x0b,0x90,0x02,0x06,0x00 } },
+{ 16, 0x83d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x00,0xb1,0x01,0xa8,0x48 } },
+{ 16, 0x83e0, 0, {0x88,0x90,0x02,0x04,0x80,0x81,0x40,0x2c,0x50,0x18,0x14,0x0a,0x84,0x10,0x89,0x40 } },
+{ 16, 0x83f0, 0, {0x2c,0x40,0x0b,0x10,0x02,0xc4,0x00,0x31,0x20,0x20,0x40,0x0a,0x10,0x0a,0x02,0x01 } },
+{ 16, 0x8400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xf0,0x50,0x3a,0x00 } },
+{ 16, 0x8410, 0, {0x2c,0xa0,0x02,0xa1,0x42,0xc8,0x00,0x3e,0x00,0xde,0x00,0x23,0x21,0x42,0x88,0x00 } },
+{ 16, 0x8420, 0, {0x38,0x14,0x0f,0x85,0x03,0xe1,0x40,0xf8,0x50,0x38,0x14,0x0f,0x05,0x03,0x2e,0x01 } },
+{ 16, 0x8430, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xe4,0x08,0xfd,0x00,0x36,0x44 } },
+{ 16, 0x8440, 0, {0x0f,0xd0,0x03,0x64,0x40,0xf9,0x00,0x3d,0x50,0x0f,0x94,0x03,0xe5,0x00,0x7d,0x40 } },
+{ 16, 0x8450, 0, {0x3e,0x40,0x0f,0x94,0x03,0xe4,0x00,0xf9,0x10,0x3f,0x40,0x0e,0x90,0x03,0xe6,0x04 } },
+{ 16, 0x8460, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe4,0x00,0xfd,0x40,0x33,0x68 } },
+{ 16, 0x8470, 0, {0x0c,0xd0,0x03,0xe7,0x81,0xf9,0x00,0x33,0x78,0x0d,0xd8,0x13,0x26,0xa0,0xcd,0xa0 } },
+{ 16, 0x8480, 0, {0x32,0x40,0x0d,0x9b,0x03,0x24,0x00,0xf9,0xa0,0x3c,0x44,0x2c,0x90,0x07,0x86,0x00 } },
+{ 16, 0x8490, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe0,0x00,0xb8,0xa0,0xa2,0x10 } },
+{ 16, 0x84a0, 0, {0x18,0x80,0x03,0x82,0x84,0xb8,0x80,0x36,0x2c,0x2e,0x0f,0x02,0xa3,0xa0,0xd8,0xe0 } },
+{ 16, 0x84b0, 0, {0x36,0x22,0x8b,0x08,0x03,0x42,0xa0,0xf8,0xe0,0x2e,0x28,0x08,0x88,0x02,0xce,0x04 } },
+{ 16, 0x84c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0xb1,0x00,0xa0,0x50 } },
+{ 16, 0x84d0, 0, {0x28,0x30,0x02,0xc5,0x80,0xb1,0x08,0x20,0x40,0x09,0x10,0xa2,0x44,0x08,0x81,0x48 } },
+{ 16, 0x84e0, 0, {0x20,0x40,0x0b,0x14,0x02,0x04,0x80,0xb1,0x38,0x2c,0x48,0x08,0x12,0x82,0x82,0x01 } },
+{ 16, 0x84f0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xa4,0x00,0xb1,0x00,0x22,0x40 } },
+{ 16, 0x8500, 0, {0x08,0x92,0x02,0xe4,0x00,0xb9,0x02,0x26,0x58,0x4a,0x90,0x02,0xe4,0x08,0x99,0x40 } },
+{ 16, 0x8510, 0, {0x26,0x40,0x0b,0x90,0x02,0x64,0x08,0xb9,0x01,0x2c,0x48,0x08,0x90,0x12,0xc6,0x04 } },
+{ 16, 0x8520, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0x80,0x32,0x40 } },
+{ 16, 0x8530, 0, {0x08,0x98,0x83,0xe4,0x04,0xb9,0x01,0x30,0x40,0x0d,0x90,0x0b,0x64,0x02,0xc9,0x00 } },
+{ 16, 0x8540, 0, {0x32,0x40,0x0f,0x90,0x03,0x24,0x00,0xf9,0x00,0x1e,0x58,0x0c,0x90,0x03,0xa8,0x04 } },
+{ 16, 0x8550, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x00,0xf9,0x20,0x3c,0x40 } },
+{ 16, 0x8560, 0, {0x0f,0x98,0x03,0xa4,0x00,0xb9,0x00,0x3e,0x42,0x8e,0x10,0x4b,0x84,0x04,0xf9,0x00 } },
+{ 16, 0x8570, 0, {0x3e,0x40,0x8f,0x90,0x03,0xe4,0x00,0xe9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xca,0x00 } },
+{ 16, 0x8580, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xd8,0x00,0x32,0x08 } },
+{ 16, 0x8590, 0, {0x0f,0x84,0x83,0xa0,0x04,0xc8,0x04,0x3e,0x00,0x83,0x80,0x01,0x20,0x00,0xc0,0x00 } },
+{ 16, 0x85a0, 0, {0x32,0x00,0x0f,0x00,0x03,0xa0,0x00,0xc8,0x00,0x32,0x10,0x4e,0x80,0x13,0xca,0x04 } },
+{ 16, 0x85b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0x8e,0x90,0xa3,0x80 } },
+{ 16, 0x85c0, 0, {0x0b,0xe4,0x02,0x28,0x00,0xca,0x00,0x2f,0x80,0x4a,0xa0,0x13,0xa8,0x00,0xaa,0x00 } },
+{ 16, 0x85d0, 0, {0x36,0x81,0x0b,0xa0,0x02,0x28,0x00,0x8a,0x00,0x22,0x80,0x08,0xa0,0x03,0x8a,0x00 } },
+{ 16, 0x85e0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x93,0xc0,0x20,0xd0 } },
+{ 16, 0x85f0, 0, {0x0b,0x34,0x02,0x8c,0x00,0x8b,0x00,0x2c,0xf0,0x8b,0x18,0x02,0x4c,0x00,0x83,0x00 } },
+{ 16, 0x8600, 0, {0x60,0xc0,0x0b,0x30,0x02,0x8c,0x02,0x83,0x00,0x28,0xc1,0x0a,0x30,0x02,0xca,0x00 } },
+{ 16, 0x8610, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1e,0x00,0xb4,0x0b,0x69,0xc0 } },
+{ 16, 0x8620, 0, {0x09,0x58,0x06,0x1e,0x80,0x97,0x10,0x2f,0xc2,0x48,0x70,0x82,0x9c,0x80,0xa7,0x08 } },
+{ 16, 0x8630, 0, {0x25,0xcc,0x0b,0x70,0x02,0x1e,0x81,0x87,0xa2,0xab,0xc4,0x08,0x73,0x02,0xe8,0x00 } },
+{ 16, 0x8640, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3e,0x10,0xdc,0x84,0x21,0xe0 } },
+{ 16, 0x8650, 0, {0x0f,0x78,0x42,0x9f,0x02,0xc7,0x88,0x3d,0xe0,0x2f,0x71,0x03,0x4e,0x00,0xcf,0x80 } },
+{ 16, 0x8660, 0, {0x21,0xe2,0x0f,0x78,0x83,0x9e,0x49,0xcf,0xd0,0x39,0xe8,0x0e,0x78,0x03,0xea,0x02 } },
+{ 16, 0x8670, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x4d,0xac,0x40,0xca,0x00,0x36,0x00 } },
+{ 16, 0x8680, 0, {0x8f,0x30,0x23,0xec,0xa8,0xeb,0x40,0x3c,0xc0,0x0f,0x96,0x43,0xed,0x80,0xfb,0x00 } },
+{ 16, 0x8690, 0, {0x3e,0xd8,0x8f,0xb1,0x43,0xed,0x80,0xfb,0x20,0x36,0xca,0x0f,0xb0,0xa3,0x82,0x06 } },
+{ 16, 0x86a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x80,0xfc,0x80,0x31,0xe0 } },
+{ 16, 0x86b0, 0, {0x05,0xaa,0x10,0xfe,0x44,0xff,0x90,0x3f,0xe1,0xcf,0xf9,0x17,0x3f,0x20,0xd7,0x80 } },
+{ 16, 0x86c0, 0, {0x8b,0xe4,0x0f,0xf8,0x03,0x3e,0x30,0xff,0x80,0x37,0xe0,0x0f,0xf8,0x00,0x40,0x00 } },
+{ 16, 0x86d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x00,0xbd,0x10,0x21,0xc0 } },
+{ 16, 0x86e0, 0, {0x08,0x4a,0x02,0xdc,0xc0,0xb7,0x00,0x2d,0xc2,0x0c,0xd3,0x02,0x1c,0x80,0x87,0x00 } },
+{ 16, 0x86f0, 0, {0x29,0xc0,0x4b,0x72,0x02,0x1c,0x00,0xb7,0x01,0x21,0xc0,0x0b,0xf0,0x12,0x2a,0x04 } },
+{ 16, 0x8700, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x90,0x34,0x00,0x21,0x80 } },
+{ 16, 0x8710, 0, {0x09,0x70,0x00,0x5c,0x0c,0xb7,0x00,0x2d,0xc4,0x08,0x50,0x1a,0x0c,0x00,0x97,0x00 } },
+{ 16, 0x8720, 0, {0x21,0xc0,0x4b,0x30,0x02,0x1c,0x00,0xb7,0x00,0x25,0xc0,0x0b,0x70,0x02,0x40,0x00 } },
+{ 16, 0x8730, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcc,0x00,0xb0,0x00,0x60,0x00 } },
+{ 16, 0x8740, 0, {0x08,0x3e,0x02,0xcc,0x00,0xb3,0x02,0x0c,0xe0,0x2b,0xb0,0x02,0x0c,0x00,0x93,0x00 } },
+{ 16, 0x8750, 0, {0x28,0xc0,0x0b,0xb0,0x02,0x2c,0x10,0xb3,0x00,0x20,0xd6,0x03,0x30,0x02,0x08,0x04 } },
+{ 16, 0x8760, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xfb,0x00,0xb2,0x00 } },
+{ 16, 0x8770, 0, {0x05,0xbe,0x03,0x7c,0x00,0xff,0x00,0x3e,0x20,0x0c,0xb0,0x03,0x3c,0x00,0xd9,0x80 } },
+{ 16, 0x8780, 0, {0x33,0xc0,0x8b,0xf0,0x03,0x3c,0x00,0xff,0x00,0x37,0xe0,0x0f,0xf0,0x03,0x6a,0x04 } },
+{ 16, 0x8790, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x00,0xfb,0x04,0x3e,0x00 } },
+{ 16, 0x87a0, 0, {0x0f,0xa4,0x23,0xcc,0x00,0xfb,0x00,0x3e,0x81,0x08,0x90,0x03,0xec,0x00,0xe9,0x14 } },
+{ 16, 0x87b0, 0, {0x3e,0xc0,0x0f,0xb0,0x03,0xec,0x10,0xfb,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0xe0,0x00 } },
+{ 16, 0x87c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xff,0x00,0x37,0x80 } },
+{ 16, 0x87d0, 0, {0x0f,0xfa,0x03,0xfc,0x00,0xcf,0x00,0x3f,0x90,0x06,0xdc,0x23,0x3c,0x00,0xfd,0x10 } },
+{ 16, 0x87e0, 0, {0x33,0xc0,0x0f,0xf0,0x0b,0x3c,0x00,0x43,0x00,0x33,0xc0,0x0f,0xf0,0x03,0xc0,0x44 } },
+{ 16, 0x87f0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x6c,0x09,0xbb,0x19,0x22,0x32 } },
+{ 16, 0x8800, 0, {0x0b,0xbe,0x03,0x6c,0x00,0x8b,0x00,0x2c,0x90,0x0d,0xb8,0x02,0xac,0x00,0xb1,0x00 } },
+{ 16, 0x8810, 0, {0xf2,0xc0,0x0b,0xb0,0x12,0xac,0x00,0x8b,0x00,0x22,0xc0,0x0b,0xb0,0x03,0xa0,0x40 } },
+{ 16, 0x8820, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x10,0xb3,0x00,0x26,0x20 } },
+{ 16, 0x8830, 0, {0x0b,0x90,0x12,0xec,0x01,0x8b,0x00,0x2a,0xc2,0x0a,0x90,0x02,0x2c,0x00,0xbb,0x00 } },
+{ 16, 0x8840, 0, {0xa2,0xc0,0x0b,0xb0,0x02,0x2c,0x00,0xab,0x00,0x2a,0xc0,0x0b,0xb0,0x02,0xe0,0x00 } },
+{ 16, 0x8850, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x01,0xb3,0x00,0x20,0x00 } },
+{ 16, 0x8860, 0, {0x0b,0x00,0x02,0x8c,0x00,0x83,0x00,0x2e,0xc0,0x0b,0x34,0x02,0x8c,0x00,0xbb,0x00 } },
+{ 16, 0x8870, 0, {0x20,0xc0,0x0b,0x30,0x02,0x0d,0x00,0xa3,0x00,0xa0,0xc0,0x0b,0x30,0x02,0x82,0x01 } },
+{ 16, 0x8880, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xbb,0x04,0x36,0x80 } },
+{ 16, 0x8890, 0, {0x0f,0xb2,0x02,0xfc,0x02,0xcf,0x02,0x38,0xc0,0x0e,0xf0,0x03,0x3c,0x00,0xfb,0x00 } },
+{ 16, 0x88a0, 0, {0x23,0xc0,0x0f,0xf0,0x03,0x3d,0x02,0xef,0x00,0x33,0xc0,0x0f,0xf0,0x43,0xc0,0x03 } },
+{ 16, 0x88b0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xfc,0x00,0xff,0x00,0x3f,0x00 } },
+{ 16, 0x88c0, 0, {0x0f,0xf4,0x23,0x7c,0x00,0xff,0x00,0x3f,0xc0,0x0d,0xd0,0x03,0xfc,0x00,0xff,0x00 } },
+{ 16, 0x88d0, 0, {0x3b,0xc0,0x0f,0xf0,0x03,0xfc,0x88,0xdf,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xa8,0x06 } },
+{ 16, 0x88e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf0,0x50,0xce,0x12,0x33,0xd0 } },
+{ 16, 0x88f0, 0, {0x4c,0x86,0x83,0x30,0x80,0x5f,0x68,0x33,0xc4,0x0f,0xf3,0x83,0x3c,0xc0,0xcc,0x38 } },
+{ 16, 0x8900, 0, {0xb3,0x08,0x0c,0xc6,0x03,0xf1,0xa0,0xff,0x00,0x33,0x24,0x0c,0xc2,0x03,0xf0,0x00 } },
+{ 16, 0x8910, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xec,0x80,0xd2,0x20,0x23,0xd8 } },
+{ 16, 0x8920, 0, {0x0d,0x96,0x02,0x88,0x60,0xaf,0x40,0x23,0xdc,0x0b,0xf6,0x02,0x3c,0xc2,0x88,0x60 } },
+{ 16, 0x8930, 0, {0x22,0x52,0x08,0x91,0x22,0xe1,0x00,0xb7,0x24,0xa2,0x48,0x8a,0x84,0x82,0x60,0x04 } },
+{ 16, 0x8940, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc4,0x00,0x81,0x00,0xe0,0xc4 } },
+{ 16, 0x8950, 0, {0x0a,0x00,0x02,0x04,0x80,0xa3,0x20,0xa8,0xc0,0x1b,0x30,0x0a,0x0c,0x00,0xa0,0x00 } },
+{ 16, 0x8960, 0, {0x28,0x0c,0x09,0x02,0x02,0xc4,0x80,0xb3,0x1c,0x22,0x08,0x19,0x03,0x02,0xe2,0x11 } },
+{ 16, 0x8970, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xa4,0x00,0x99,0x80,0x62,0xc0 } },
+{ 16, 0x8980, 0, {0x0b,0xa0,0x32,0xa4,0x51,0xab,0x00,0x2a,0xc0,0x8b,0xb0,0x00,0x0c,0x00,0xa9,0xc0 } },
+{ 16, 0x8990, 0, {0x2a,0x21,0x08,0xb8,0x22,0xe2,0x00,0xbb,0x00,0x22,0x84,0x1b,0xa8,0x42,0x70,0x04 } },
+{ 16, 0x89a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe2,0x00,0xcb,0xc9,0x32,0xc0 } },
+{ 16, 0x89b0, 0, {0x0e,0x8b,0x13,0x22,0x10,0xdb,0x01,0x32,0xc0,0x0f,0xb0,0x0b,0x2c,0x00,0x68,0x81 } },
+{ 16, 0x89c0, 0, {0x3a,0x22,0x2c,0x88,0x23,0xe3,0x00,0xfb,0x00,0x30,0x30,0x8d,0x9c,0x83,0xd0,0x04 } },
+{ 16, 0x89d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xba,0x40,0xf7,0x04,0x3e,0xc2 } },
+{ 16, 0x89e0, 0, {0x0d,0xd8,0x23,0xd8,0x00,0x7b,0x00,0x37,0xc0,0x0f,0x70,0x33,0xfc,0x10,0xd2,0x00 } },
+{ 16, 0x89f0, 0, {0x35,0xc0,0x8f,0xc0,0x03,0xf4,0x00,0xf7,0x02,0x3f,0xe0,0x0e,0x80,0x03,0xf8,0x00 } },
+{ 16, 0x8a00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x81,0x20,0xc8,0x08,0x30,0xc0 } },
+{ 16, 0x8a10, 0, {0x0c,0x00,0x83,0x24,0x40,0xc3,0x89,0x3a,0xc0,0x0e,0xb0,0x0b,0x2c,0x08,0xc9,0x48 } },
+{ 16, 0x8a20, 0, {0x72,0x54,0x0f,0x91,0x03,0xed,0x02,0xeb,0x8a,0x3a,0x62,0x8c,0x80,0x0b,0x10,0x04 } },
+{ 16, 0x8a30, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2b,0x04,0x88,0x40,0xa3,0xc2 } },
+{ 16, 0x8a40, 0, {0x02,0xae,0x12,0x27,0x42,0x8f,0x44,0x23,0xc2,0x0b,0xf4,0x02,0x3d,0x00,0x0a,0x40 } },
+{ 16, 0x8a50, 0, {0x22,0xe0,0x0b,0xb5,0x02,0xec,0x20,0x8f,0x44,0xa2,0x40,0x8d,0xbd,0x23,0x32,0x00 } },
+{ 16, 0x8a60, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x49,0x40,0x83,0x81,0x24,0xc1 } },
+{ 16, 0x8a70, 0, {0x08,0x28,0x02,0x01,0x00,0x93,0x00,0xa0,0xe8,0x0a,0x30,0x82,0x8f,0x60,0xb3,0x90 } },
+{ 16, 0x8a80, 0, {0x60,0xb8,0x0b,0x28,0x12,0x4a,0x00,0x93,0x00,0x20,0x90,0x09,0x20,0x02,0x78,0x00 } },
+{ 16, 0x8a90, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1e,0x02,0x87,0xa8,0x25,0xe0 } },
+{ 16, 0x8aa0, 0, {0x0a,0x7b,0x02,0x1a,0x04,0x87,0x80,0x21,0xe4,0x0b,0x78,0x82,0x8e,0x02,0x96,0x91 } },
+{ 16, 0x8ab0, 0, {0x21,0x21,0x0b,0x69,0x40,0xdb,0x40,0x97,0x92,0x23,0xa0,0x89,0x58,0x82,0x08,0x00 } },
+{ 16, 0x8ac0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x25,0x82,0xc3,0x00,0x34,0xc0 } },
+{ 16, 0x8ad0, 0, {0x0c,0x9b,0x43,0x08,0xd0,0xd3,0x20,0x38,0xc0,0x0e,0xb0,0x03,0x8c,0x00,0xb3,0x00 } },
+{ 16, 0x8ae0, 0, {0x20,0x80,0x07,0x10,0x03,0xe0,0x00,0xd3,0x10,0x38,0x18,0x0d,0x30,0x03,0x52,0x02 } },
+{ 16, 0x8af0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xb4,0x00,0x7f,0x20,0x1b,0xd0 } },
+{ 16, 0x8b00, 0, {0x0f,0xf1,0x03,0xf8,0x40,0xef,0x00,0x3f,0xc0,0x0f,0xb4,0x03,0x7c,0x20,0xcf,0x04 } },
+{ 16, 0x8b10, 0, {0xbf,0x40,0x0f,0xf0,0x03,0xe4,0x10,0xef,0x18,0x3d,0xc0,0x0f,0xe0,0x03,0xd0,0x06 } },
+{ 16, 0x8b20, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe8,0x00,0xe3,0x00,0xb2,0xc4 } },
+{ 16, 0x8b30, 0, {0x0c,0xa0,0x03,0x24,0x00,0xdb,0x68,0x32,0xc8,0x0c,0xb4,0x03,0xec,0x80,0xc8,0x80 } },
+{ 16, 0x8b40, 0, {0xb6,0xe0,0x0c,0xa0,0x03,0x2e,0x00,0xcb,0xe0,0xb2,0x60,0x0c,0xb8,0x0b,0x2a,0x00 } },
+{ 16, 0x8b50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x02,0x87,0x00,0xa1,0xc8 } },
+{ 16, 0x8b60, 0, {0x08,0x70,0x02,0x1c,0x08,0x97,0x02,0x21,0xd4,0x08,0x74,0x02,0xdc,0xc0,0x07,0x00 } },
+{ 16, 0x8b70, 0, {0x21,0xc0,0x88,0x70,0x02,0x18,0x00,0x83,0x08,0x21,0xc0,0x08,0x50,0x02,0x12,0x04 } },
+{ 16, 0x8b80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x20,0xad,0x80,0x29,0xe0 } },
+{ 16, 0x8b90, 0, {0x08,0x58,0x02,0x1e,0x00,0x97,0xb0,0x21,0xe8,0x08,0x78,0x02,0xde,0x10,0x15,0x80 } },
+{ 16, 0x8ba0, 0, {0x21,0xa1,0x08,0x48,0x02,0x5e,0x00,0x87,0xa4,0x65,0xa0,0x08,0x78,0x02,0x30,0x00 } },
+{ 16, 0x8bb0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcf,0x10,0x81,0x70,0xa8,0xc0 } },
+{ 16, 0x8bc0, 0, {0x38,0x30,0x0a,0x0d,0x00,0x93,0x00,0xa0,0xc1,0x28,0x30,0x02,0xcc,0x02,0x83,0x88 } },
+{ 16, 0x8bd0, 0, {0x20,0xe0,0x38,0x34,0x0a,0x4d,0x72,0x83,0x00,0x24,0xe8,0x28,0x34,0x82,0x12,0x04 } },
+{ 16, 0x8be0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xba,0x40,0xee,0xc0,0xba,0x80 } },
+{ 16, 0x8bf0, 0, {0x0c,0xe0,0x03,0x39,0x10,0xda,0x00,0x32,0x80,0x0c,0xa0,0x03,0xe8,0x00,0xde,0xc8 } },
+{ 16, 0x8c00, 0, {0x33,0xa0,0x0c,0xe0,0x03,0x7b,0x00,0xca,0x00,0x37,0xb1,0x0c,0xe4,0x23,0x3a,0x04 } },
+{ 16, 0x8c10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xc1,0x00,0xf8,0x00,0x36,0x00 } },
+{ 16, 0x8c20, 0, {0x0f,0x80,0x03,0xc0,0x20,0x38,0x00,0x3e,0x00,0x0f,0x00,0x03,0xe0,0x00,0xf8,0x02 } },
+{ 16, 0x8c30, 0, {0x3a,0x24,0x0f,0x80,0x83,0xa0,0x01,0xf8,0x04,0x3a,0x04,0x0d,0x80,0x13,0xd2,0x00 } },
+{ 16, 0x8c40, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x44,0xc1,0x00,0x32,0x40 } },
+{ 16, 0x8c50, 0, {0x0c,0x90,0x32,0x24,0x0c,0xc1,0x06,0x38,0x40,0x0d,0x90,0x09,0x04,0x00,0xd9,0x00 } },
+{ 16, 0x8c60, 0, {0x3e,0x40,0x0f,0x18,0x03,0x24,0x00,0xf9,0x01,0x3e,0x40,0x0f,0x90,0x03,0xc2,0x04 } },
+{ 16, 0x8c70, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x06,0x89,0x00,0x2a,0x50 } },
+{ 16, 0x8c80, 0, {0x08,0x94,0x0a,0x24,0x00,0x89,0x42,0x22,0x50,0x0a,0x90,0x12,0x25,0x00,0x89,0x00 } },
+{ 16, 0x8c90, 0, {0x2e,0x50,0x0b,0x9c,0x0a,0x25,0x10,0xb9,0x00,0x2e,0x50,0x0b,0x90,0x02,0xe0,0x00 } },
+{ 16, 0x8ca0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x20,0x89,0x00,0x20,0x42 } },
+{ 16, 0x8cb0, 0, {0x08,0x10,0xc2,0xac,0x10,0x89,0x08,0x2a,0x42,0x09,0x90,0x02,0x24,0x20,0x99,0x00 } },
+{ 16, 0x8cc0, 0, {0x2e,0x42,0x0a,0xb1,0x82,0x2c,0x20,0xb9,0x00,0x6e,0x42,0x0b,0x90,0x02,0xc6,0x00 } },
+{ 16, 0x8cd0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x00,0x83,0x00,0x28,0x48 } },
+{ 16, 0x8ce0, 0, {0x08,0x12,0x62,0x8c,0x80,0x81,0x00,0x20,0x40,0x02,0x10,0x02,0x84,0x80,0x81,0x20 } },
+{ 16, 0x8cf0, 0, {0x2c,0x49,0x0b,0x12,0x06,0x04,0x84,0xb3,0x02,0x6c,0x40,0x0b,0x12,0x02,0xc2,0x01 } },
+{ 16, 0x8d00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x41,0xe0,0xc8,0x78,0x30,0x14 } },
+{ 16, 0x8d10, 0, {0x4c,0x05,0x13,0xa1,0x42,0xc0,0x78,0x38,0x1e,0x0d,0x87,0x83,0x01,0x40,0xd0,0x50 } },
+{ 16, 0x8d20, 0, {0x3c,0x14,0x0e,0x05,0x03,0x01,0x40,0xf8,0x78,0x3c,0x14,0x0f,0x05,0x03,0xee,0x03 } },
+{ 16, 0x8d30, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xfc,0x00,0xff,0x00,0x0e,0x44 } },
+{ 16, 0x8d40, 0, {0x2f,0xf1,0x03,0x74,0x40,0xf9,0x00,0x3e,0x40,0x0d,0x90,0x03,0x64,0x40,0xfd,0x10 } },
+{ 16, 0x8d50, 0, {0x3f,0x44,0x0f,0xd1,0x01,0xf4,0x40,0xf9,0x01,0x3f,0xc0,0x0f,0xd1,0x03,0xe6,0x06 } },
+{ 16, 0x8d60, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0x22,0xe9,0x88,0xb2,0x40 } },
+{ 16, 0x8d70, 0, {0x0f,0x90,0x03,0x24,0x16,0xc9,0x8c,0x36,0x7b,0x8f,0x9c,0x83,0xa7,0x90,0xc9,0x00 } },
+{ 16, 0x8d80, 0, {0x3e,0x50,0x04,0x94,0x13,0x24,0x50,0xc9,0xe0,0x3e,0x50,0x0f,0x90,0x03,0x06,0x00 } },
+{ 16, 0x8d90, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe2,0x80,0x88,0xa0,0x22,0x28 } },
+{ 16, 0x8da0, 0, {0x0b,0x8a,0x02,0x2a,0x80,0x88,0xa4,0x22,0x30,0x08,0x8e,0x0a,0x22,0x02,0x88,0xa0 } },
+{ 16, 0x8db0, 0, {0x2e,0x28,0x88,0xaa,0x12,0x22,0x90,0x88,0xf4,0x2e,0x20,0x0b,0xc8,0x02,0x0e,0x04 } },
+{ 16, 0x8dc0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xd4,0x20,0xa5,0x08,0x21,0x42 } },
+{ 16, 0x8dd0, 0, {0x0b,0x50,0x82,0x14,0x31,0x85,0x08,0x25,0x40,0x0a,0x50,0x22,0x94,0x40,0x85,0x08 } },
+{ 16, 0x8de0, 0, {0x6d,0x40,0x08,0x50,0x02,0x54,0x02,0x95,0x00,0x2d,0x48,0x0b,0x50,0x82,0x42,0x01 } },
+{ 16, 0x8df0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0x84,0x00,0x8d,0x10,0x23,0x40 } },
+{ 16, 0x8e00, 0, {0x0b,0xd0,0x00,0x34,0x01,0x8d,0x00,0x23,0x41,0x58,0xd0,0x02,0x34,0x00,0x8d,0x08 } },
+{ 16, 0x8e10, 0, {0x2f,0x50,0x08,0xd2,0x02,0x74,0x80,0x9d,0x00,0x2f,0x48,0x0b,0xdc,0x02,0x46,0x04 } },
+{ 16, 0x8e20, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe7,0x40,0xe9,0xc0,0x32,0x40 } },
+{ 16, 0x8e30, 0, {0x0f,0x90,0x09,0x26,0x00,0xc9,0x04,0x36,0x40,0x1f,0x90,0x23,0xa4,0x08,0xc9,0x40 } },
+{ 16, 0x8e40, 0, {0x3e,0x40,0x0c,0x94,0x0b,0x64,0x20,0xd9,0x02,0x3e,0x41,0x0f,0x94,0x03,0x68,0x04 } },
+{ 16, 0x8e50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x00,0xf9,0x80,0x3e,0x40 } },
+{ 16, 0x8e60, 0, {0x0f,0x14,0x03,0xc5,0x08,0xf9,0x00,0x3e,0x40,0x1f,0x90,0x23,0xe4,0x00,0xf9,0x00 } },
+{ 16, 0x8e70, 0, {0x3c,0x40,0xaf,0x98,0x03,0x86,0x00,0xe9,0x00,0x3e,0x40,0x0f,0x10,0x0b,0x8a,0x00 } },
+{ 16, 0x8e80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xb0,0x00,0xdc,0x40,0xb3,0x00 } },
+{ 16, 0x8e90, 0, {0x0f,0xc0,0x03,0x31,0x02,0xc4,0x04,0xb1,0x00,0x3c,0x40,0x03,0x10,0x00,0xfc,0x40 } },
+{ 16, 0x8ea0, 0, {0x33,0x00,0x0c,0xc4,0x03,0xb1,0x00,0xcc,0x00,0xb3,0x00,0x0c,0xc4,0x03,0xca,0x04 } },
+{ 16, 0x8eb0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0x8a,0x80,0x22,0xa0 } },
+{ 16, 0x8ec0, 0, {0x0b,0xa0,0x02,0x2a,0x00,0x8a,0x84,0x22,0xa1,0x08,0xa0,0x02,0x28,0x08,0xba,0x01 } },
+{ 16, 0x8ed0, 0, {0x22,0x80,0x08,0xa0,0x2b,0x28,0x00,0x8a,0x80,0x2a,0x80,0x08,0xe0,0x02,0xca,0x00 } },
+{ 16, 0x8ee0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x02,0x9b,0x81,0x20,0xe0 } },
+{ 16, 0x8ef0, 0, {0x8b,0x38,0x06,0xce,0x00,0x93,0x80,0x20,0xc0,0x08,0x38,0x02,0x0c,0x00,0xb3,0x80 } },
+{ 16, 0x8f00, 0, {0x6c,0xe0,0x0a,0xb0,0x02,0x4c,0x00,0x93,0x00,0x20,0xe0,0x08,0x30,0x02,0xca,0x00 } },
+{ 16, 0x8f10, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x10,0x04,0x80,0x08,0x21,0x02 } },
+{ 16, 0x8f20, 0, {0x4b,0x44,0x06,0xd0,0x20,0x90,0x08,0x21,0x02,0x80,0x44,0x02,0x10,0x00,0xb4,0xc0 } },
+{ 16, 0x8f30, 0, {0x2d,0x10,0x48,0x40,0x02,0x00,0x00,0x94,0x89,0x29,0x30,0x08,0x40,0x02,0xe8,0x00 } },
+{ 16, 0x8f40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x32,0x00,0xd6,0x80,0x31,0xa0 } },
+{ 16, 0x8f50, 0, {0x0f,0xe8,0x0b,0xca,0x00,0xd6,0x80,0x23,0xa0,0x04,0xf8,0x0b,0x1a,0x00,0xff,0x80 } },
+{ 16, 0x8f60, 0, {0xbf,0xa0,0x2e,0xc8,0x13,0xda,0x02,0x5e,0x80,0x73,0xa0,0x2c,0x78,0x03,0xea,0x02 } },
+{ 16, 0x8f70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x00,0xf9,0x00,0x3e,0x40 } },
+{ 16, 0x8f80, 0, {0x0f,0x90,0x03,0x24,0x00,0xe9,0x00,0x3e,0x40,0x0e,0x80,0x03,0xe4,0x00,0xf8,0x00 } },
+{ 16, 0x8f90, 0, {0x32,0x40,0x0f,0xb0,0x03,0xe4,0x01,0xe9,0x04,0x36,0x40,0x0f,0x80,0x03,0xc2,0x06 } },
+{ 16, 0x8fa0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xcd,0x80,0x33,0x60 } },
+{ 16, 0x8fb0, 0, {0x0c,0xd8,0x43,0x36,0x00,0xcd,0x80,0x33,0x60,0x0c,0xd9,0x23,0xbe,0x00,0x4d,0x80 } },
+{ 16, 0x8fc0, 0, {0x33,0x60,0x08,0xf8,0x0b,0x3e,0x00,0xfd,0x84,0x3f,0x60,0x0f,0xf9,0x03,0xc0,0x00 } },
+{ 16, 0x8fd0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x90,0x04,0xde,0x00,0x23,0x80 } },
+{ 16, 0x8fe0, 0, {0x08,0x60,0x02,0xb8,0x20,0x8e,0x04,0x23,0x80,0x08,0x68,0x02,0x10,0x00,0x8e,0x20 } },
+{ 16, 0x8ff0, 0, {0x23,0x82,0x08,0x40,0x02,0x12,0x00,0xf6,0x00,0x2d,0x80,0x0b,0x41,0xa0,0xea,0x04 } },
+{ 16, 0x9000, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x84,0x00,0x21,0x00 } },
+{ 16, 0x9010, 0, {0x08,0x41,0x02,0x50,0x40,0x94,0x00,0x21,0x00,0x0a,0x52,0x02,0xd8,0x00,0x85,0x02 } },
+{ 16, 0x9020, 0, {0x25,0x04,0x08,0x40,0x22,0x18,0x08,0xb4,0x00,0x2d,0x10,0x0b,0x78,0x40,0xc0,0x00 } },
+{ 16, 0x9030, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xee,0x22,0x93,0x00,0x20,0xc0 } },
+{ 16, 0x9040, 0, {0x08,0x38,0x02,0xec,0x00,0x93,0x00,0x20,0xc1,0x2a,0x20,0x02,0x64,0x02,0x82,0x10 } },
+{ 16, 0x9050, 0, {0x24,0xf0,0x0a,0x3c,0x42,0x24,0x28,0xb3,0x00,0x2c,0xe0,0x0b,0x88,0x82,0xc8,0x04 } },
+{ 16, 0x9060, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xad,0x00,0xcb,0x00,0xb2,0xc0 } },
+{ 16, 0x9070, 0, {0xac,0xbe,0x03,0x6e,0x02,0xdb,0x00,0xb2,0xc0,0x1e,0xa0,0x03,0xe4,0x00,0xca,0x11 } },
+{ 16, 0x9080, 0, {0xb6,0xd0,0xac,0xbc,0x03,0x24,0x00,0xfb,0x00,0x3e,0xc0,0xcf,0x84,0x03,0xea,0x04 } },
+{ 16, 0x9090, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xe0,0x40,0xf8,0x00,0x3c,0x00 } },
+{ 16, 0x90a0, 0, {0x2f,0x82,0x03,0xa0,0x00,0xe8,0x00,0x3e,0x00,0x1d,0x90,0x13,0xa8,0x00,0xf9,0x00 } },
+{ 16, 0x90b0, 0, {0x3a,0x00,0x81,0x83,0x43,0xe8,0x00,0xe8,0x03,0x3e,0x04,0x0f,0xb0,0x03,0xe0,0x00 } },
+{ 16, 0x90c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xe0,0x00,0xd6,0x00,0x37,0x80 } },
+{ 16, 0x90d0, 0, {0x0c,0xa0,0x03,0xf8,0x00,0xce,0x00,0x33,0x80,0x0d,0xa0,0x13,0x20,0x08,0xce,0x00 } },
+{ 16, 0x90e0, 0, {0x33,0x82,0x0c,0x40,0x73,0x30,0x18,0xce,0x00,0x1f,0x80,0x4f,0xc1,0x43,0x00,0x44 } },
+{ 16, 0x90f0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x7c,0x00,0x8d,0x00,0x23,0x40 } },
+{ 16, 0x9100, 0, {0x0a,0xd0,0x02,0xf4,0x00,0x8d,0x00,0x23,0x40,0x08,0xd4,0x80,0x3e,0x42,0x8d,0x40 } },
+{ 16, 0x9110, 0, {0x23,0x40,0x08,0xf0,0x02,0x3e,0x40,0x8d,0x00,0x0f,0x40,0x0b,0xf4,0x02,0x20,0x40 } },
+{ 16, 0x9120, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x99,0x00,0xa6,0x40 } },
+{ 16, 0x9130, 0, {0x08,0x90,0x06,0xe4,0x00,0x91,0x00,0x20,0x40,0x88,0x00,0x02,0x24,0x08,0x80,0x40 } },
+{ 16, 0x9140, 0, {0x20,0x40,0x0a,0xb0,0x02,0x24,0x00,0x89,0x00,0x0e,0x40,0x0b,0x84,0x02,0x20,0x00 } },
+{ 16, 0x9150, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x00,0x00,0x82,0x00,0x20,0x80 } },
+{ 16, 0x9160, 0, {0x0a,0x21,0x06,0xc8,0x01,0x82,0x00,0x20,0x80,0x08,0x32,0x82,0x08,0x08,0x83,0x00 } },
+{ 16, 0x9170, 0, {0x60,0x80,0x0a,0x00,0x12,0x08,0x80,0x82,0x00,0x2c,0x80,0x0b,0x30,0x0a,0x02,0x01 } },
+{ 16, 0x9180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xd8,0x00,0x36,0x00 } },
+{ 16, 0x9190, 0, {0x0c,0x84,0x23,0xe0,0x00,0xc8,0x00,0x32,0x00,0x0d,0x82,0x0b,0x20,0x02,0xc8,0x00 } },
+{ 16, 0x91a0, 0, {0x32,0x00,0x0e,0x00,0x03,0x20,0x02,0xc8,0x00,0x3e,0x00,0x0f,0x80,0x03,0x00,0x03 } },
+{ 16, 0x91b0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xfc,0x00,0xbf,0x00,0x3f,0xc0 } },
+{ 16, 0x91c0, 0, {0x0f,0xf0,0x03,0xfc,0x00,0xff,0x00,0xbf,0xc0,0x8f,0xb0,0x03,0xfc,0x08,0xff,0x02 } },
+{ 16, 0x91d0, 0, {0x3f,0xc0,0x0d,0xf0,0x03,0xed,0x00,0xff,0x02,0x3f,0xc0,0x0f,0xf0,0x03,0xe8,0x06 } },
+{ 16, 0x91e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xf0,0x8c,0xff,0x00,0x3d,0x60 } },
+{ 16, 0x91f0, 0, {0x2c,0xb2,0x83,0x7c,0x90,0xdf,0x38,0x31,0xe0,0x0f,0xf8,0x03,0x3c,0x00,0xff,0x20 } },
+{ 16, 0x9200, 0, {0x3f,0xc4,0x0e,0xf4,0x03,0x7c,0x00,0xf4,0x80,0x33,0x00,0x0d,0xf8,0x03,0xf0,0x00 } },
+{ 16, 0x9210, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xe1,0x20,0xbb,0x62,0x2e,0x42 } },
+{ 16, 0x9220, 0, {0x28,0xf4,0x42,0x3e,0x40,0x8f,0x44,0x22,0xe0,0x0b,0xb0,0x83,0x7f,0x44,0xbf,0xc1 } },
+{ 16, 0x9230, 0, {0x2d,0xdc,0x2a,0xf6,0x02,0x3f,0x45,0xb8,0x80,0x22,0x61,0x88,0xb8,0x02,0xe0,0x04 } },
+{ 16, 0x9240, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc5,0x80,0xb2,0x18,0x2e,0xc8 } },
+{ 16, 0x9250, 0, {0x29,0x30,0x32,0x0c,0x08,0xb3,0x20,0x20,0xc0,0x4b,0x92,0x02,0x0c,0x00,0xb3,0x40 } },
+{ 16, 0x9260, 0, {0x2c,0xc0,0x89,0x34,0x12,0x4c,0x00,0xb0,0x00,0x24,0xc1,0x49,0x30,0x02,0xe2,0x01 } },
+{ 16, 0x9270, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x11,0xa4,0x00,0xba,0x0c,0x2e,0xe0 } },
+{ 16, 0x9280, 0, {0xa9,0xb0,0x06,0x2c,0x00,0x8b,0x00,0xa2,0xc0,0x0b,0x90,0x00,0x6c,0x00,0xbb,0x00 } },
+{ 16, 0x9290, 0, {0x2e,0xc0,0x0b,0x30,0x02,0x6c,0x00,0xba,0x80,0x26,0xf0,0x08,0xb0,0x02,0xf0,0x04 } },
+{ 16, 0x92a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0xee,0x00,0xfb,0xc4,0x3e,0x78 } },
+{ 16, 0x92b0, 0, {0x2d,0xb0,0x03,0x6c,0x08,0xfb,0x00,0x32,0xc0,0x8b,0x24,0x83,0x2c,0x00,0xfb,0x00 } },
+{ 16, 0x92c0, 0, {0x3e,0xc0,0x8f,0xb0,0x0b,0x6c,0x08,0xb2,0xe0,0x16,0x60,0x8d,0xb0,0x23,0xd0,0x04 } },
+{ 16, 0x92d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xbe,0x98,0xff,0x40,0x3f,0xc0 } },
+{ 16, 0x92e0, 0, {0x0e,0x70,0x03,0xdc,0x00,0xff,0x00,0x3f,0xc0,0x0f,0xe0,0x03,0xfc,0x00,0xff,0x00 } },
+{ 16, 0x92f0, 0, {0x3f,0xc0,0x0e,0xf0,0x03,0xac,0x00,0xfe,0x00,0xb9,0xc0,0x0f,0xf0,0x03,0xf8,0x00 } },
+{ 16, 0x9300, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xad,0x00,0xfa,0x40,0x3e,0xd0 } },
+{ 16, 0x9310, 0, {0x0e,0xb2,0x03,0xec,0x00,0xc3,0x00,0x3e,0xc0,0x0c,0xa0,0x03,0x2c,0x01,0xfb,0x00 } },
+{ 16, 0x9320, 0, {0x3c,0xc0,0x0e,0xb8,0x03,0xec,0x00,0xda,0x00,0x3a,0xd0,0x4f,0xb0,0x23,0xd0,0x04 } },
+{ 16, 0x9330, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2c,0x00,0xba,0x00,0x2c,0xc0 } },
+{ 16, 0x9340, 0, {0x08,0xf4,0x07,0xbc,0x14,0xdf,0x00,0x3e,0xc0,0x1a,0xa0,0x52,0xbc,0x00,0xbf,0x04 } },
+{ 16, 0x9350, 0, {0x3f,0xc0,0x8a,0xf0,0x03,0xbc,0x00,0xfa,0x00,0x22,0xc8,0x0f,0xb0,0x03,0xf2,0x00 } },
+{ 16, 0x9360, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x48,0x01,0xb1,0x00,0x6c,0xc2 } },
+{ 16, 0x9370, 0, {0x0a,0x30,0x42,0xcc,0x00,0x83,0x05,0x2c,0xc0,0x08,0x30,0x02,0x8c,0x01,0xb3,0x04 } },
+{ 16, 0x9380, 0, {0x2c,0xc0,0x0a,0x30,0x22,0x8c,0x00,0x80,0x80,0x28,0xc0,0x0b,0x30,0x22,0xf8,0x00 } },
+{ 16, 0x9390, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1e,0x08,0xb7,0x80,0x6f,0xe0 } },
+{ 16, 0x93a0, 0, {0x18,0x78,0x02,0x8e,0x40,0xb7,0x80,0x2d,0xe0,0x0a,0x78,0x02,0x9e,0x00,0xb7,0x80 } },
+{ 16, 0x93b0, 0, {0x29,0xe1,0x0a,0x78,0x02,0x9e,0x01,0xbc,0x80,0x29,0xe4,0x0b,0x78,0x02,0xc8,0x00 } },
+{ 16, 0x93c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x09,0x40,0xf1,0x20,0x3c,0xc4 } },
+{ 16, 0x93d0, 0, {0x0e,0x39,0x02,0xcc,0x00,0xc3,0x00,0x2c,0xc4,0x08,0x92,0x03,0x8c,0x88,0xb3,0x10 } },
+{ 16, 0x93e0, 0, {0x2c,0xc4,0x0e,0xb0,0x07,0x8c,0x00,0xc2,0x08,0x38,0xc0,0x0f,0x30,0x43,0xd2,0x02 } },
+{ 16, 0x93f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xbc,0x10,0xfc,0x00,0x7f,0xc0 } },
+{ 16, 0x9400, 0, {0x0f,0xf0,0x83,0xfc,0x21,0xdf,0x08,0x3b,0xc0,0x8f,0x90,0x01,0xfc,0x21,0xff,0x0c } },
+{ 16, 0x9410, 0, {0x3f,0xc2,0x0f,0xf1,0x03,0xec,0x00,0xef,0x00,0x77,0xc0,0x1e,0xf0,0x03,0x90,0x06 } },
+{ 16, 0x9420, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe8,0x01,0xf9,0x00,0x32,0xc0 } },
+{ 16, 0x9430, 0, {0x0f,0xb2,0x03,0xee,0x90,0xdb,0xe1,0x3a,0xc0,0x4d,0x38,0x13,0x2d,0x30,0xfb,0x00 } },
+{ 16, 0x9440, 0, {0x3e,0xe0,0x4f,0xba,0x43,0x2c,0x40,0xfa,0x00,0x3f,0xc0,0x8c,0xb0,0x03,0xea,0x00 } },
+{ 16, 0x9450, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x00,0xb1,0x00,0x21,0xc0 } },
+{ 16, 0x9460, 0, {0x0b,0x71,0x02,0xcc,0x20,0xa7,0x28,0x21,0xc0,0x0b,0x70,0x13,0x5c,0x08,0xb7,0x10 } },
+{ 16, 0x9470, 0, {0x2d,0xc4,0x4b,0x34,0x83,0x1c,0xc1,0xb7,0x02,0x2d,0xc0,0x1a,0x70,0x02,0xd2,0x04 } },
+{ 16, 0x9480, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9a,0x20,0xb4,0xc4,0x25,0xa2 } },
+{ 16, 0x9490, 0, {0x0b,0x78,0x06,0xde,0x00,0x83,0x80,0x29,0xe0,0x1b,0xf8,0x02,0x5e,0x80,0xa7,0xa0 } },
+{ 16, 0x94a0, 0, {0x2d,0xc8,0x0a,0x72,0x02,0x1e,0x00,0xa6,0x80,0x28,0xe0,0x08,0x78,0x02,0xf0,0x00 } },
+{ 16, 0x94b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xed,0x00,0xb3,0x40,0x24,0xc3 } },
+{ 16, 0x94c0, 0, {0x0b,0x30,0x42,0xcc,0x00,0xa3,0x00,0x20,0xc0,0x1b,0x34,0x02,0x4c,0x00,0xb3,0x00 } },
+{ 16, 0x94d0, 0, {0x2c,0xc0,0x4b,0x30,0x02,0x0c,0x00,0xb3,0x88,0x2c,0xd4,0x0a,0x30,0x02,0xd2,0x04 } },
+{ 16, 0x94e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x00,0xfe,0x40,0xb7,0xa0 } },
+{ 16, 0x94f0, 0, {0x0f,0xa0,0x03,0xe8,0x00,0xda,0x00,0x3a,0x80,0x0f,0xe2,0x03,0x68,0x00,0xfa,0x00 } },
+{ 16, 0x9500, 0, {0x3e,0x80,0x0f,0xa0,0x0b,0x28,0x00,0xee,0xe0,0x3f,0xb0,0x04,0xa0,0x03,0xfa,0x04 } },
+{ 16, 0x9510, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x04,0xf0,0x08,0x3a,0x10 } },
+{ 16, 0x9520, 0, {0x0f,0x84,0x03,0xe0,0x10,0xf8,0x00,0x3e,0x00,0x4f,0x80,0x83,0xe0,0x00,0xf8,0x00 } },
+{ 16, 0x9530, 0, {0x3c,0x00,0x0f,0x80,0x03,0x80,0x00,0xf8,0x40,0x3e,0x09,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0x9540, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x20,0xe9,0x00,0x32,0x44 } },
+{ 16, 0x9550, 0, {0x0c,0x90,0x03,0x24,0x00,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x13,0xe4,0x00,0xb9,0x00 } },
+{ 16, 0x9560, 0, {0x1e,0x40,0x0c,0x10,0x03,0x24,0x00,0xc9,0xa0,0x3c,0x64,0x0c,0x90,0x03,0x82,0x04 } },
+{ 16, 0x9570, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0x89,0x00,0x22,0x68 } },
+{ 16, 0x9580, 0, {0x08,0x13,0x02,0x24,0x08,0xf9,0x00,0x2e,0x48,0x1b,0x90,0x02,0xe4,0x00,0xb9,0x00 } },
+{ 16, 0x9590, 0, {0x3e,0x40,0x0c,0x90,0x02,0x24,0x08,0xf9,0x40,0x2e,0x60,0x0a,0x90,0x06,0xe0,0x00 } },
+{ 16, 0x95a0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x00,0xa9,0x00,0x20,0x40 } },
+{ 16, 0x95b0, 0, {0x08,0x90,0x02,0x24,0x00,0xb9,0x01,0x2e,0x40,0x0b,0x90,0x02,0xe4,0x00,0xb9,0x00 } },
+{ 16, 0x95c0, 0, {0x2e,0x40,0x08,0x92,0x22,0x24,0x00,0x89,0x00,0x2e,0x40,0x08,0x90,0x02,0xc6,0x00 } },
+{ 16, 0x95d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x80,0x81,0x21,0xe0,0x50 } },
+{ 16, 0x95e0, 0, {0x28,0x16,0x0a,0x04,0x80,0xa1,0x40,0x2c,0x40,0x4b,0x14,0x22,0xc4,0x00,0xb1,0x00 } },
+{ 16, 0x95f0, 0, {0x2c,0x50,0x09,0x14,0x02,0x04,0x04,0xb1,0x00,0x2c,0x40,0x0a,0x10,0x02,0xc2,0x01 } },
+{ 16, 0x9600, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xe8,0x50,0x32,0x00 } },
+{ 16, 0x9610, 0, {0x8c,0x80,0x02,0x20,0x00,0xb8,0x00,0x3e,0x00,0x0b,0x80,0x33,0xe0,0x10,0xf8,0x00 } },
+{ 16, 0x9620, 0, {0x3e,0x00,0x0c,0x80,0x03,0x20,0x08,0xca,0x00,0x3e,0x00,0x0c,0x80,0x03,0xae,0x03 } },
+{ 16, 0x9630, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xfc,0x40,0xfd,0x10,0x2f,0x41 } },
+{ 16, 0x9640, 0, {0x4f,0x91,0x03,0xe4,0x40,0xf9,0x40,0x3e,0x40,0x4f,0xd0,0x63,0xe5,0x00,0xf9,0x40 } },
+{ 16, 0x9650, 0, {0x3a,0x50,0x2e,0x94,0x03,0x65,0x00,0xed,0x00,0x3f,0x50,0x0f,0x90,0x03,0xe6,0x06 } },
+{ 16, 0x9660, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xe6,0x00,0xf9,0xe0,0x33,0x50 } },
+{ 16, 0x9670, 0, {0x0c,0xda,0x03,0xa6,0x00,0xd9,0x80,0x3f,0x40,0x0f,0x91,0x03,0xa6,0x00,0xf9,0x88 } },
+{ 16, 0x9680, 0, {0x3e,0x68,0x0c,0xde,0x03,0x66,0x00,0xed,0x00,0x3b,0x69,0x0c,0x90,0x03,0xc6,0x00 } },
+{ 16, 0x9690, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe1,0x08,0xb8,0xe0,0x20,0x20 } },
+{ 16, 0x96a0, 0, {0x18,0x8e,0x26,0xe1,0x00,0x80,0xa0,0x2e,0x00,0x4b,0x88,0x42,0xe1,0x50,0xb8,0x40 } },
+{ 16, 0x96b0, 0, {0x2e,0x2a,0x0d,0x0a,0x02,0x20,0x08,0xb8,0x00,0x2e,0x14,0x0d,0x80,0x02,0xce,0x04 } },
+{ 16, 0x96c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb1,0x60,0x20,0x40 } },
+{ 16, 0x96d0, 0, {0x08,0x31,0xa2,0xc5,0x00,0x91,0x48,0x2c,0x40,0x1b,0x12,0x02,0x84,0x00,0xb1,0x00 } },
+{ 16, 0x96e0, 0, {0x2c,0x50,0x09,0x16,0x02,0x05,0x00,0xa3,0x04,0x28,0x40,0x08,0x10,0x02,0xc2,0x01 } },
+{ 16, 0x96f0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xa4,0x00,0xb9,0x08,0x20,0x70 } },
+{ 16, 0x9700, 0, {0x28,0x90,0x02,0xe4,0x00,0x89,0x00,0x2e,0x40,0x0b,0x90,0x02,0xe4,0x08,0xb9,0x03 } },
+{ 16, 0x9710, 0, {0x2c,0x40,0x29,0x90,0x02,0x64,0x00,0xb9,0x00,0x2e,0x62,0x09,0x90,0x02,0xc6,0x04 } },
+{ 16, 0x9720, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe5,0x00,0xf9,0xd0,0xb2,0x70 } },
+{ 16, 0x9730, 0, {0x08,0x90,0x03,0xe4,0x00,0xd9,0x04,0x3e,0x40,0x0f,0x90,0x03,0xa4,0x10,0xf9,0x02 } },
+{ 16, 0x9740, 0, {0x3e,0x40,0x0d,0x90,0x2b,0x64,0x00,0xe9,0x8d,0x3a,0x60,0x0c,0x90,0x03,0xe8,0x04 } },
+{ 16, 0x9750, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x00,0xf9,0x80,0x3e,0x42 } },
+{ 16, 0x9760, 0, {0x0f,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x40,0x0f,0x9a,0x03,0xe4,0x00,0xf9,0x00 } },
+{ 16, 0x9770, 0, {0x3e,0x40,0x2f,0x10,0x03,0xa4,0x00,0xf9,0x22,0x3c,0x40,0x4f,0x90,0x03,0xca,0x00 } },
+{ 16, 0x9780, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa0,0x00,0xf0,0x40,0x32,0x00 } },
+{ 16, 0x9790, 0, {0x0c,0x80,0x03,0xc0,0x00,0xf8,0x00,0x32,0x20,0x1f,0x80,0x03,0xe0,0x00,0xc8,0x00 } },
+{ 16, 0x97a0, 0, {0x32,0x00,0x0c,0x80,0x02,0x20,0x00,0xc8,0xc0,0x3e,0x00,0x0c,0x80,0x03,0xca,0x04 } },
+{ 16, 0x97b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x15,0x28,0x10,0xba,0x00,0x23,0xa0 } },
+{ 16, 0x97c0, 0, {0x0a,0xe4,0x02,0xe8,0x00,0xba,0x00,0x2b,0xa1,0x0b,0xa0,0x02,0xe8,0x00,0xaa,0x00 } },
+{ 16, 0x97d0, 0, {0x2a,0x81,0x0a,0xa0,0x03,0xe8,0x08,0xde,0x00,0x2e,0x80,0x0a,0xa0,0x02,0xca,0x00 } },
+{ 16, 0x97e0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb3,0x04,0xa0,0xb1 } },
+{ 16, 0x97f0, 0, {0x08,0x36,0x22,0xcc,0x00,0xb3,0x00,0x20,0xe4,0x0b,0x30,0x02,0xcc,0x00,0x83,0x00 } },
+{ 16, 0x9800, 0, {0x20,0xc0,0x08,0x18,0x02,0x0c,0x00,0x91,0x01,0x2c,0xc0,0x08,0x30,0x06,0xca,0x00 } },
+{ 16, 0x9810, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1c,0xc8,0xb3,0x21,0x21,0xc2 } },
+{ 16, 0x9820, 0, {0x2a,0x70,0x02,0xdc,0x00,0xb7,0xa0,0x29,0xc0,0x0b,0x72,0x02,0xce,0x00,0xa7,0x81 } },
+{ 16, 0x9830, 0, {0x29,0xc0,0x4a,0x74,0x02,0xfe,0x00,0x97,0x01,0x2c,0xc0,0x0a,0x70,0x12,0xe8,0x00 } },
+{ 16, 0x9840, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x80,0xf7,0xc0,0x31,0xe0 } },
+{ 16, 0x9850, 0, {0x0c,0x48,0x03,0xde,0x11,0xf7,0x80,0x21,0xe0,0x0b,0x7a,0x03,0xde,0x00,0xc3,0x80 } },
+{ 16, 0x9860, 0, {0x33,0xd8,0x6c,0x78,0x03,0x3e,0x00,0xd6,0x80,0x3d,0xe0,0x0c,0x78,0x03,0xea,0x02 } },
+{ 16, 0x9870, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x0d,0xac,0x08,0xfb,0x80,0x3e,0xc0 } },
+{ 16, 0x9880, 0, {0x0f,0xd0,0x03,0xec,0x04,0xfb,0x3c,0x3e,0xc0,0x0f,0xb6,0x07,0x6c,0x01,0xfb,0x00 } },
+{ 16, 0x9890, 0, {0x3e,0xd0,0x0f,0x94,0x07,0xec,0x01,0xea,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0xc2,0x06 } },
+{ 16, 0x98a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xfe,0x00,0xcf,0xa4,0x3b,0x60 } },
+{ 16, 0x98b0, 0, {0x08,0xd9,0x03,0x7e,0x00,0xcf,0x80,0x3f,0x25,0x4f,0xfc,0x87,0xbe,0x00,0xcf,0x80 } },
+{ 16, 0x98c0, 0, {0x7f,0xfc,0x0c,0xfc,0x03,0x7c,0x00,0xf6,0x90,0x33,0xe0,0x0f,0xf8,0x03,0xc0,0x00 } },
+{ 16, 0x98d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x08,0x8f,0x28,0x21,0x40 } },
+{ 16, 0x98e0, 0, {0x08,0xd0,0x02,0x1c,0x40,0xa7,0x20,0x31,0x04,0x1b,0x78,0x02,0xdc,0x80,0xd7,0x00 } },
+{ 16, 0x98f0, 0, {0x2f,0xc4,0x1a,0xd0,0x02,0x1e,0x48,0xb6,0x00,0x61,0xc0,0x0b,0x70,0x06,0xea,0x04 } },
+{ 16, 0x9900, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8c,0x00,0x87,0x30,0x69,0x44 } },
+{ 16, 0x9910, 0, {0x08,0x50,0x22,0x0c,0x00,0x87,0x01,0x2d,0x44,0x8b,0x70,0x06,0x8c,0x10,0x87,0x00 } },
+{ 16, 0x9920, 0, {0x29,0xc9,0x08,0x50,0x02,0x1c,0x44,0xa6,0x00,0x61,0xc0,0x0b,0x70,0x02,0xc0,0x00 } },
+{ 16, 0x9930, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcd,0x00,0x83,0x88,0x60,0x40 } },
+{ 16, 0x9940, 0, {0x00,0x10,0x02,0x4c,0x00,0x2b,0x00,0x2c,0x41,0x1b,0x30,0x02,0xcc,0x00,0x93,0x00 } },
+{ 16, 0x9950, 0, {0x2c,0xc0,0x0a,0x30,0x42,0x0c,0x00,0xb2,0x40,0x20,0xf1,0x0b,0x30,0x02,0xc8,0x04 } },
+{ 16, 0x9960, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbd,0x41,0xcf,0xc0,0xba,0xf0 } },
+{ 16, 0x9970, 0, {0x28,0x90,0x1b,0x6c,0x08,0xcf,0x00,0x2c,0xc0,0x0f,0xf0,0x03,0xac,0x00,0x8b,0x00 } },
+{ 16, 0x9980, 0, {0x3f,0xc0,0x6c,0xb0,0x4b,0x2c,0x01,0xfb,0x40,0x22,0xc8,0x0f,0xb0,0x03,0xea,0x04 } },
+{ 16, 0x9990, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x04,0xfb,0x04,0x3f,0xd4 } },
+{ 16, 0x99a0, 0, {0x0f,0x10,0x03,0xac,0x00,0xfb,0x00,0x32,0xc0,0x5f,0xb0,0x03,0xec,0x00,0xfb,0x04 } },
+{ 16, 0x99b0, 0, {0x3e,0xc0,0x4f,0x10,0x13,0xec,0x00,0xfb,0x88,0x3e,0xc0,0x4f,0xb0,0x03,0xe0,0x00 } },
+{ 16, 0x99c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x00,0xc7,0x00,0x33,0x62 } },
+{ 16, 0x99d0, 0, {0x0c,0xc0,0x0b,0x3c,0x00,0xef,0x00,0x33,0xe0,0x1c,0xf0,0x13,0x3c,0x08,0xf7,0x00 } },
+{ 16, 0x99e0, 0, {0x31,0xc0,0x0e,0xd8,0x03,0xbc,0x00,0xfe,0x00,0x3d,0xc6,0x0c,0xf0,0x03,0xc0,0x44 } },
+{ 16, 0x99f0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6c,0x00,0xcb,0x03,0x22,0x47 } },
+{ 16, 0x9a00, 0, {0x08,0x98,0x42,0x2c,0x00,0x9b,0x00,0x2a,0xc0,0x0a,0xb0,0x02,0x2c,0x00,0xbb,0x04 } },
+{ 16, 0x9a10, 0, {0x2a,0xc0,0x0a,0xb0,0x02,0xac,0x08,0xfa,0x00,0x2e,0x60,0x08,0xb0,0x02,0xe0,0x40 } },
+{ 16, 0x9a20, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x9b,0x00,0x20,0x40 } },
+{ 16, 0x9a30, 0, {0x08,0x98,0x02,0x2c,0x00,0xbb,0x00,0x22,0x88,0x08,0x30,0x02,0x2c,0x00,0xbb,0x00 } },
+{ 16, 0x9a40, 0, {0x22,0xc0,0x8a,0x92,0x02,0xac,0x00,0xaa,0x80,0x2e,0xc0,0x08,0xb0,0x06,0xe0,0x00 } },
+{ 16, 0x9a50, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x00,0x83,0x00,0xa0,0x40 } },
+{ 16, 0x9a60, 0, {0x08,0x10,0x02,0x0c,0x00,0xb3,0x00,0x28,0x80,0x0a,0x32,0x12,0x0c,0x00,0xb3,0x04 } },
+{ 16, 0x9a70, 0, {0x28,0xc0,0x0a,0x30,0x22,0x8c,0x20,0xb2,0x00,0x2c,0xc0,0x08,0x30,0x02,0xc2,0x01 } },
+{ 16, 0x9a80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x02,0xcb,0x00,0x30,0x40 } },
+{ 16, 0x9a90, 0, {0x1c,0x94,0x03,0x2c,0x00,0xef,0x00,0x32,0xc0,0x88,0xf0,0x8b,0x2c,0x00,0xfb,0x00 } },
+{ 16, 0x9aa0, 0, {0x33,0xc0,0xae,0xf0,0x03,0xac,0x80,0xea,0x01,0x3e,0xc0,0x2c,0xb0,0x03,0xc0,0x03 } },
+{ 16, 0x9ab0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xfc,0x00,0xff,0x00,0x2f,0x40 } },
+{ 16, 0x9ac0, 0, {0x07,0xd2,0x83,0xfc,0x00,0xdf,0x04,0x3f,0xc0,0x0f,0xb0,0x03,0xfc,0x00,0xff,0x00 } },
+{ 16, 0x9ad0, 0, {0x3f,0xc0,0x0f,0xd0,0x0b,0xec,0x00,0xee,0x00,0x3f,0x40,0x0f,0xf0,0x03,0xe8,0x06 } },
+{ 16, 0x9ae0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf5,0x00,0xcf,0x08,0x3f,0x48 } },
+{ 16, 0x9af0, 0, {0x0f,0xc3,0x93,0x70,0xd0,0xdc,0x30,0x3f,0xd8,0x0c,0xb2,0x03,0x3c,0xc0,0xff,0x40 } },
+{ 16, 0x9b00, 0, {0x33,0xc4,0x2c,0xf1,0x03,0x62,0x50,0xfc,0x34,0x33,0x00,0x0f,0x5c,0x03,0xf0,0x00 } },
+{ 16, 0x9b10, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xc4,0x80,0x8b,0x00,0x2f,0x5a } },
+{ 16, 0x9b20, 0, {0x0b,0xa6,0x12,0x21,0xc0,0x89,0x70,0x2f,0xdc,0x08,0xf2,0xc2,0x3d,0xd0,0xbf,0x40 } },
+{ 16, 0x9b30, 0, {0x37,0xdc,0x88,0xf5,0x0a,0x20,0x80,0xe8,0x10,0x2a,0x16,0x0b,0x90,0x02,0xe0,0x04 } },
+{ 16, 0x9b40, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc0,0x00,0x83,0x08,0x2c,0x44 } },
+{ 16, 0x9b50, 0, {0x0b,0x02,0x02,0x0c,0x00,0x80,0x00,0x2c,0xc8,0x08,0x33,0x42,0x8c,0x90,0xb3,0x30 } },
+{ 16, 0x9b60, 0, {0x28,0xc8,0x4a,0x32,0x12,0x80,0x0c,0xb0,0xa0,0x28,0x28,0x0b,0x12,0x02,0xe2,0x01 } },
+{ 16, 0x9b70, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xa2,0x00,0x8b,0x00,0x2e,0x48 } },
+{ 16, 0x9b80, 0, {0x0b,0xa0,0x22,0x20,0x20,0x88,0x80,0x2e,0xc0,0x28,0xb0,0x0a,0xac,0x00,0xbb,0x00 } },
+{ 16, 0x9b90, 0, {0x2e,0xc0,0x0a,0xb0,0x02,0xa0,0x00,0xab,0x82,0x2a,0xa0,0x0b,0xb2,0x02,0xf0,0x04 } },
+{ 16, 0x9ba0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe7,0x00,0xcb,0x00,0x3e,0xc0 } },
+{ 16, 0x9bb0, 0, {0xcf,0x9c,0x0b,0x21,0x00,0xd8,0x88,0x3e,0xc0,0x0c,0xb0,0x03,0xac,0x00,0xfb,0x00 } },
+{ 16, 0x9bc0, 0, {0x3a,0xc0,0x0e,0xb0,0x43,0xe8,0x40,0xf8,0x80,0x3a,0x60,0x0f,0x98,0x03,0xd0,0x04 } },
+{ 16, 0x9bd0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb4,0x00,0xff,0x00,0x0f,0xe0 } },
+{ 16, 0x9be0, 0, {0x07,0xa1,0x03,0xe8,0x02,0xfb,0x00,0x3f,0xc0,0x0f,0x70,0x23,0x7c,0x00,0xff,0x02 } },
+{ 16, 0x9bf0, 0, {0x35,0xc0,0x4d,0xb0,0x03,0x74,0x20,0xfc,0x01,0x3f,0x00,0x0f,0xf8,0x03,0xf8,0x00 } },
+{ 16, 0x9c00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa5,0x00,0xcb,0x00,0xba,0x40 } },
+{ 16, 0x9c10, 0, {0x0c,0x14,0x0b,0x2f,0x22,0xc9,0x40,0x32,0xc0,0x8e,0xb0,0x03,0xac,0x00,0xfb,0x00 } },
+{ 16, 0x9c20, 0, {0x3e,0xc0,0x0e,0xb0,0x03,0xe4,0x00,0xc9,0x00,0x32,0x00,0x2c,0x90,0x03,0x10,0x04 } },
+{ 16, 0x9c30, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x01,0x24,0x00,0x8f,0x00,0x22,0x40 } },
+{ 16, 0x9c40, 0, {0x2c,0xa5,0x42,0x29,0x00,0x8b,0x04,0xa3,0xc1,0x0d,0xf0,0x0a,0x3c,0x00,0xbf,0x00 } },
+{ 16, 0x9c50, 0, {0x3f,0xc0,0x08,0xf0,0x01,0x69,0x00,0xda,0x05,0x22,0xd0,0x08,0x94,0x03,0x72,0x00 } },
+{ 16, 0x9c60, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x60,0x40,0x83,0x01,0x20,0xc0 } },
+{ 16, 0x9c70, 0, {0x09,0x00,0x02,0x20,0x00,0x82,0x60,0x22,0xc0,0x08,0x30,0x42,0x4c,0x10,0xbb,0x02 } },
+{ 16, 0x9c80, 0, {0x2c,0xc0,0x08,0xb0,0x12,0x05,0x00,0x9b,0x00,0x20,0x82,0x09,0x32,0x02,0x38,0x00 } },
+{ 16, 0x9c90, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x16,0x90,0x87,0x80,0x20,0xe0 } },
+{ 16, 0x9ca0, 0, {0x08,0x58,0x02,0x16,0x14,0x84,0x81,0x21,0xe0,0x29,0x39,0x02,0x5e,0x00,0xb7,0x80 } },
+{ 16, 0x9cb0, 0, {0x28,0xe0,0x08,0x78,0x02,0x7a,0x80,0x96,0x81,0x21,0xe0,0x09,0xf8,0x02,0x48,0x00 } },
+{ 16, 0x9cc0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x08,0x09,0x8b,0x10,0x38,0x44 } },
+{ 16, 0x9cd0, 0, {0x4d,0x25,0x12,0x0c,0x00,0xc2,0x10,0x22,0xc8,0x0a,0x38,0x03,0xcc,0x00,0xf3,0x10 } },
+{ 16, 0x9ce0, 0, {0x2c,0xc0,0x0c,0x30,0x03,0x8a,0xc0,0xd9,0x10,0x32,0x40,0x2d,0x10,0x03,0x12,0x02 } },
+{ 16, 0x9cf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xbc,0x80,0xff,0x00,0x3f,0x40 } },
+{ 16, 0x9d00, 0, {0x0f,0xf0,0x03,0xf4,0x40,0xed,0x00,0x3f,0xc0,0x0e,0xf3,0x03,0xbc,0x04,0xff,0x00 } },
+{ 16, 0x9d10, 0, {0x3f,0xc2,0x0f,0xf0,0x0b,0xd4,0x00,0xff,0x10,0xbf,0x80,0x0e,0xf0,0x03,0xd0,0x06 } },
+{ 16, 0x9d20, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xfa,0x00,0xcb,0x02,0x3e,0xc0 } },
+{ 16, 0x9d30, 0, {0x0f,0x90,0x03,0xa0,0x00,0xcb,0x00,0x3a,0xca,0x0c,0xb3,0x13,0xaf,0x24,0xcb,0x48 } },
+{ 16, 0x9d40, 0, {0x1e,0xc8,0x0f,0xb6,0x03,0x2c,0x00,0xfa,0x00,0x3e,0xc0,0x0f,0x90,0x03,0xea,0x00 } },
+{ 16, 0x9d50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x08,0x87,0x20,0x2d,0xc4 } },
+{ 16, 0x9d60, 0, {0x0b,0x50,0x12,0xdc,0x04,0x87,0x00,0x2c,0xc0,0x08,0x70,0xa2,0x1d,0x00,0xa7,0x40 } },
+{ 16, 0x9d70, 0, {0x25,0xcb,0x8b,0x74,0x82,0x1c,0x00,0xb7,0x00,0x2d,0xc1,0x0b,0x70,0x02,0xd2,0x04 } },
+{ 16, 0x9d80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9a,0x01,0x87,0x90,0x2d,0xe0 } },
+{ 16, 0x9d90, 0, {0x0b,0x78,0x02,0xce,0x00,0x86,0x80,0x2d,0xe4,0x29,0x7a,0x02,0x9e,0x80,0x87,0xa0 } },
+{ 16, 0x9da0, 0, {0x6d,0xe8,0x0b,0x78,0x02,0x1e,0x00,0xb5,0x80,0x2d,0x60,0x0b,0x78,0x02,0xf0,0x00 } },
+{ 16, 0x9db0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcd,0x00,0x83,0x02,0x2c,0xe0 } },
+{ 16, 0x9dc0, 0, {0x0b,0x30,0x02,0xcc,0x00,0x83,0xe0,0x2c,0xc0,0x08,0x30,0x02,0x0c,0x00,0xa3,0x00 } },
+{ 16, 0x9dd0, 0, {0x24,0xc0,0x0b,0xb0,0x02,0x0e,0x20,0xb3,0x08,0x2c,0xc0,0x0b,0x30,0x02,0xd2,0x04 } },
+{ 16, 0x9de0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x82,0xca,0x00,0x3e,0xa8 } },
+{ 16, 0x9df0, 0, {0x0f,0xe0,0x03,0xf8,0x02,0x8e,0x80,0x3e,0x80,0x0d,0xa0,0x5b,0xa8,0x00,0xca,0x00 } },
+{ 16, 0x9e00, 0, {0x3e,0x80,0x0f,0xa0,0x03,0x3b,0x80,0xfe,0x42,0x2f,0x80,0x0f,0xa8,0x03,0xfa,0x04 } },
+{ 16, 0x9e10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x20,0xf8,0x00,0x3e,0x00 } },
+{ 16, 0x9e20, 0, {0x0f,0x06,0x03,0xc0,0x00,0xf8,0x11,0x3e,0x00,0x0f,0x00,0x03,0xe0,0x00,0xf8,0x00 } },
+{ 16, 0x9e30, 0, {0x36,0x00,0x0f,0x80,0x0b,0xe0,0x00,0xf8,0x04,0x3e,0x20,0x0f,0x81,0x03,0xd2,0x00 } },
+{ 16, 0x9e40, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x00,0x3e,0x40 } },
+{ 16, 0x9e50, 0, {0x0c,0x9a,0x03,0x24,0x40,0xc9,0xc0,0x3e,0x40,0x4c,0x90,0x03,0x24,0x00,0xf9,0x00 } },
+{ 16, 0x9e60, 0, {0x36,0x40,0x07,0x90,0x03,0x24,0x00,0xc9,0x04,0x32,0x60,0x0f,0x90,0x03,0xc2,0x04 } },
+{ 16, 0x9e70, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0xb9,0x02,0x2e,0x40 } },
+{ 16, 0x9e80, 0, {0x0a,0x92,0x02,0x25,0x02,0x89,0xe0,0x2e,0x40,0x98,0x90,0x02,0x24,0x00,0xb9,0x00 } },
+{ 16, 0x9e90, 0, {0x22,0x40,0x09,0x90,0x02,0x04,0x00,0xd9,0x00,0x22,0x44,0x0b,0x9c,0x02,0xe0,0x00 } },
+{ 16, 0x9ea0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x2c,0x00,0xb9,0x00,0x2c,0x40 } },
+{ 16, 0x9eb0, 0, {0x08,0x90,0x02,0x24,0x28,0x89,0x00,0x2c,0x40,0x68,0x90,0x42,0x24,0x0c,0xb1,0x04 } },
+{ 16, 0x9ec0, 0, {0x26,0x40,0x0b,0x90,0x0a,0x2c,0x80,0x81,0x00,0x22,0x40,0xcb,0x92,0x82,0xc6,0x00 } },
+{ 16, 0x9ed0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x00,0xb1,0x20,0x2c,0x48 } },
+{ 16, 0x9ee0, 0, {0x0a,0x12,0x02,0x04,0x80,0x81,0x21,0x2c,0x4c,0x08,0x11,0x02,0x04,0x08,0xb1,0x10 } },
+{ 16, 0x9ef0, 0, {0x20,0x4c,0x09,0x12,0x02,0x24,0x01,0x91,0x20,0xa0,0x48,0x0b,0x10,0x02,0xc2,0x01 } },
+{ 16, 0x9f00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x41,0xe0,0xf8,0x50,0x3e,0x14 } },
+{ 16, 0x9f10, 0, {0x0c,0x85,0x03,0x21,0x40,0xc8,0x50,0x3e,0x10,0x08,0x06,0x83,0x01,0xf0,0xf8,0x68 } },
+{ 16, 0x9f20, 0, {0x36,0x10,0x0f,0x05,0x03,0x29,0x40,0xc8,0x50,0x32,0x94,0x0f,0x85,0x03,0xee,0x03 } },
+{ 16, 0x9f30, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xf4,0x00,0xf9,0x10,0x3f,0x44 } },
+{ 16, 0x9f40, 0, {0x0f,0xd1,0x0b,0xf4,0x40,0xfd,0x12,0x2e,0x4c,0x03,0x92,0x0b,0xe4,0x00,0xf9,0x20 } },
+{ 16, 0x9f50, 0, {0x3e,0x4c,0x0f,0x91,0x03,0xfc,0x00,0xfd,0x10,0x3f,0x44,0x0f,0xd0,0x03,0xe6,0x06 } },
+{ 16, 0x9f60, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x20,0xc9,0x01,0x3e,0x40 } },
+{ 16, 0x9f70, 0, {0x0f,0xd0,0x03,0x3c,0x00,0xbd,0x00,0x32,0x63,0x0c,0x9e,0x43,0x27,0x00,0xe9,0xc0 } },
+{ 16, 0x9f80, 0, {0x3e,0x68,0x0c,0x98,0x03,0x34,0x00,0xf9,0x10,0x3f,0x40,0x0f,0xd0,0x03,0xc6,0x00 } },
+{ 16, 0x9f90, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xc2,0x20,0xd8,0x00,0x2e,0x00 } },
+{ 16, 0x9fa0, 0, {0x0b,0x80,0x52,0x28,0x04,0xb8,0x00,0x22,0x38,0x08,0x88,0x03,0x62,0x00,0x88,0xf0 } },
+{ 16, 0x9fb0, 0, {0x2e,0x3a,0x48,0x8f,0x0a,0x20,0x00,0xb0,0x80,0x2e,0x00,0x0b,0x80,0x02,0xce,0x04 } },
+{ 16, 0x9fc0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x80,0x81,0x00,0x2c,0x40 } },
+{ 16, 0x9fd0, 0, {0x0b,0x10,0x02,0x04,0x00,0xb1,0x00,0x20,0x42,0x48,0x14,0x42,0x05,0x80,0xa1,0x20 } },
+{ 16, 0x9fe0, 0, {0x2c,0x44,0x08,0x10,0x82,0x04,0x00,0xb1,0x20,0x2c,0x40,0x0b,0x10,0x02,0xc2,0x01 } },
+{ 16, 0x9ff0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa5,0x01,0x99,0x00,0x2e,0x40 } },
+{ 16, 0xa000, 0, {0x0b,0x90,0x02,0x24,0x40,0xbb,0x01,0x22,0x41,0x08,0x90,0x12,0x24,0x00,0xa9,0x00 } },
+{ 16, 0xa010, 0, {0x2c,0x40,0x08,0x10,0x40,0x24,0x08,0xb9,0x40,0x6e,0x50,0x0b,0x92,0x02,0xc6,0x04 } },
+{ 16, 0xa020, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe7,0x14,0xc9,0x05,0x3e,0x41 } },
+{ 16, 0xa030, 0, {0x0f,0x90,0x0b,0x24,0x04,0xf9,0x08,0xb2,0x40,0x2c,0x90,0x0a,0x24,0x00,0xe9,0x00 } },
+{ 16, 0xa040, 0, {0x3e,0x40,0x2c,0x90,0x03,0x27,0x00,0xf9,0x80,0x3e,0x60,0x0f,0x90,0x03,0xe8,0x04 } },
+{ 16, 0xa050, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0x84,0x88,0xf9,0x00,0x3e,0x48 } },
+{ 16, 0xa060, 0, {0x0f,0x99,0x03,0xe6,0x00,0xf9,0x02,0x3c,0x40,0xaf,0x10,0x03,0xe4,0x12,0xd9,0x04 } },
+{ 16, 0xa070, 0, {0x3e,0x40,0x0f,0x90,0x03,0xe5,0x00,0xf9,0xc0,0x3e,0x64,0x0f,0x90,0x83,0xca,0x00 } },
+{ 16, 0xa080, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x00,0xc8,0x00,0x3e,0x00 } },
+{ 16, 0xa090, 0, {0x0f,0x80,0x03,0x21,0x00,0xc8,0x40,0xb2,0x00,0x0c,0x80,0x03,0x20,0x10,0xc8,0x00 } },
+{ 16, 0xa0a0, 0, {0x32,0x00,0x0c,0x80,0x03,0xe0,0x80,0xf8,0x04,0x32,0x00,0x2c,0x80,0x0b,0x0a,0x04 } },
+{ 16, 0xa0b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0xca,0x00,0x2e,0x80 } },
+{ 16, 0xa0c0, 0, {0x0b,0xe8,0x0a,0x38,0x10,0x8e,0xc0,0x22,0x80,0x0d,0xa0,0x02,0x28,0x00,0x0a,0x04 } },
+{ 16, 0xa0d0, 0, {0x02,0x80,0x28,0xa0,0x02,0xfb,0x00,0xba,0x00,0x37,0xb0,0x48,0xea,0x02,0x0a,0x00 } },
+{ 16, 0xa0e0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x93,0x01,0x2c,0xc0 } },
+{ 16, 0xa0f0, 0, {0x8b,0xb0,0x42,0x0c,0x90,0x9b,0x20,0x20,0xc0,0x48,0x30,0x42,0x2c,0x00,0x83,0x00 } },
+{ 16, 0xa100, 0, {0x20,0xc0,0x08,0x30,0x02,0xcd,0x40,0xb3,0x00,0x24,0xc8,0x08,0x38,0x02,0x0a,0x00 } },
+{ 16, 0xa110, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x14,0x00,0x87,0x00,0x2d,0xc0 } },
+{ 16, 0xa120, 0, {0x0b,0x24,0x06,0x16,0x00,0x93,0x08,0x21,0xc8,0x09,0x31,0x02,0x0c,0x80,0x87,0xa0 } },
+{ 16, 0xa130, 0, {0x21,0xc0,0x18,0x72,0x02,0xdc,0x00,0xb7,0xb4,0x24,0xe3,0x08,0x78,0x02,0x28,0x00 } },
+{ 16, 0xa140, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x02,0x97,0xa0,0x3d,0xf0 } },
+{ 16, 0xa150, 0, {0x0f,0x48,0x03,0x3e,0x00,0xd6,0x80,0x30,0xe0,0x2c,0x7a,0x02,0x1e,0x82,0xc3,0xf0 } },
+{ 16, 0xa160, 0, {0x33,0xec,0x0c,0x7c,0x03,0xd6,0x00,0xf7,0x80,0x35,0xe0,0x0c,0xd8,0x03,0x2a,0x02 } },
+{ 16, 0xa170, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x19,0xa5,0xa0,0xfb,0x00,0x3e,0xca } },
+{ 16, 0xa180, 0, {0x0f,0x80,0x03,0xec,0x02,0xea,0x00,0x3e,0xc6,0x0f,0xb4,0x0b,0xed,0x40,0xfb,0x00 } },
+{ 16, 0xa190, 0, {0xbe,0xc0,0x0f,0xb6,0x43,0xe0,0x00,0xfb,0x02,0x3e,0x80,0x0f,0x90,0x03,0xc2,0x06 } },
+{ 16, 0xa1a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x02,0xcf,0x88,0x3f,0xe0 } },
+{ 16, 0xa1b0, 0, {0x0c,0xb9,0x03,0xfe,0x00,0xdd,0x81,0x33,0xe0,0x8c,0xfc,0x03,0x3f,0x04,0xcf,0x80 } },
+{ 16, 0xa1c0, 0, {0x33,0xe2,0x4f,0xfc,0x03,0x3e,0x00,0xcf,0xc0,0x33,0x64,0x0c,0xf8,0x03,0xc0,0x00 } },
+{ 16, 0xa1d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x94,0x40,0x87,0x00,0x2f,0xc1 } },
+{ 16, 0xa1e0, 0, {0x0d,0x69,0xa2,0xd0,0x40,0xbc,0x00,0x23,0xc0,0x08,0xf0,0x02,0x9c,0x00,0x87,0x00 } },
+{ 16, 0xa1f0, 0, {0x21,0xc0,0x0b,0x70,0x0a,0x3c,0x04,0x87,0x10,0x21,0x4c,0x08,0x60,0x02,0xea,0x04 } },
+{ 16, 0xa200, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9e,0x00,0x87,0x00,0x2d,0xc0 } },
+{ 16, 0xa210, 0, {0x09,0x62,0x02,0xd8,0x00,0x97,0x00,0x21,0xc4,0x08,0x70,0x02,0x0c,0x40,0x97,0x00 } },
+{ 16, 0xa220, 0, {0x21,0xc4,0x0b,0x30,0x02,0x58,0x00,0xa7,0x08,0x21,0x80,0x08,0x60,0x82,0xc0,0x00 } },
+{ 16, 0xa230, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xe4,0x25,0x83,0x00,0x2c,0xc0 } },
+{ 16, 0xa240, 0, {0x09,0x22,0x02,0xcc,0x20,0xb2,0x00,0x20,0xc0,0x28,0xb0,0x02,0x8c,0x00,0x93,0x00 } },
+{ 16, 0xa250, 0, {0x20,0xc0,0x0b,0x30,0x42,0x6c,0x20,0x83,0x08,0x20,0xe2,0x08,0xb8,0x02,0xc8,0x04 } },
+{ 16, 0xa260, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa4,0x00,0xcf,0x00,0x3f,0xc0 } },
+{ 16, 0xa270, 0, {0x0d,0x9c,0x03,0xe8,0x00,0xdb,0x80,0x33,0xc0,0x0c,0xf0,0x0b,0x3c,0x06,0xdf,0x00 } },
+{ 16, 0xa280, 0, {0xb3,0xc0,0x0b,0xf0,0x07,0x68,0x00,0xef,0x40,0x32,0xa8,0x0c,0xa8,0x03,0xea,0x04 } },
+{ 16, 0xa290, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x00,0xfb,0x00,0x2e,0xc0 } },
+{ 16, 0xa2a0, 0, {0x0f,0x94,0x03,0xc5,0x40,0xfa,0x30,0x3e,0xc0,0x0f,0xb0,0x03,0x6c,0x00,0xeb,0x00 } },
+{ 16, 0xa2b0, 0, {0x3e,0xc0,0x0f,0x30,0x13,0xad,0x40,0xfb,0x02,0x3e,0xd0,0x0f,0xb4,0x03,0xe0,0x00 } },
+{ 16, 0xa2c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xe4,0x00,0xc7,0x00,0x31,0xc1 } },
+{ 16, 0xa2d0, 0, {0x8c,0xd0,0x03,0x34,0x00,0xcd,0x00,0x3d,0xc0,0x0c,0xf0,0x01,0x7c,0x00,0xdb,0x01 } },
+{ 16, 0xa2e0, 0, {0x3d,0xc0,0x4c,0xf0,0x0b,0x30,0x02,0xc3,0x00,0x32,0x00,0x0f,0xd0,0x03,0x00,0x44 } },
+{ 16, 0xa2f0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6e,0x40,0x8b,0x00,0x2a,0xc0 } },
+{ 16, 0xa300, 0, {0x28,0x84,0x42,0x22,0x80,0x88,0x80,0x3a,0xc0,0x0d,0xb0,0x02,0xac,0x08,0x8b,0x00 } },
+{ 16, 0xa310, 0, {0x2e,0xc0,0x08,0xb0,0x02,0x23,0x20,0x8b,0x00,0x22,0x30,0x8b,0x8c,0x02,0x20,0x40 } },
+{ 16, 0xa320, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x24,0x00,0x8b,0x00,0x22,0xc0 } },
+{ 16, 0xa330, 0, {0x08,0x38,0x86,0x2a,0x00,0x89,0x80,0x2a,0xc0,0x08,0xb0,0x02,0xcc,0x00,0x9b,0x00 } },
+{ 16, 0xa340, 0, {0x2e,0xc0,0x08,0xb0,0x42,0x26,0x00,0x8b,0x00,0x22,0x71,0x0b,0x8c,0x02,0x20,0x00 } },
+{ 16, 0xa350, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x00,0x83,0x00,0x28,0xc0 } },
+{ 16, 0xa360, 0, {0x08,0x32,0x42,0x00,0x00,0x81,0x00,0x28,0xc0,0x09,0x30,0x52,0x8c,0x08,0x83,0x00 } },
+{ 16, 0xa370, 0, {0x2c,0xc0,0x18,0x30,0x06,0x00,0x00,0x83,0x00,0xa0,0x00,0x0b,0x00,0x02,0x02,0x01 } },
+{ 16, 0xa380, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x74,0x02,0x8b,0x00,0x33,0xc0 } },
+{ 16, 0xa390, 0, {0x0c,0x92,0x0b,0x20,0x02,0xc8,0x00,0x3b,0xc0,0x0c,0xf5,0x03,0xfc,0x00,0xdf,0x01 } },
+{ 16, 0xa3a0, 0, {0x3f,0xc1,0x04,0xf0,0x33,0x21,0x40,0xcf,0x00,0x32,0x00,0x0f,0x80,0x0b,0x00,0x03 } },
+{ 16, 0xa3b0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x19,0xfc,0x00,0xff,0x00,0x3f,0xc0 } },
+{ 16, 0xa3c0, 0, {0x0f,0xc4,0x03,0xf0,0x00,0x9c,0x00,0x3b,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xff,0x00 } },
+{ 16, 0xa3d0, 0, {0x2f,0xc0,0x0f,0xf0,0x03,0xf0,0x80,0xff,0x00,0x3f,0x00,0x0f,0xc0,0x03,0xe8,0x06 } },
+{ 16, 0xa3e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf0,0xc0,0xff,0xa0,0x31,0x24 } },
+{ 16, 0xa3f0, 0, {0x0e,0xf0,0x63,0x10,0x04,0xef,0x64,0x3f,0xc0,0x4c,0xf3,0x03,0x1c,0x80,0xdf,0x08 } },
+{ 16, 0xa400, 0, {0x37,0xc0,0x0f,0xf0,0x03,0xf0,0xa0,0xfc,0x00,0x31,0x08,0x2c,0xd2,0x03,0xf0,0x00 } },
+{ 16, 0xa410, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xe1,0x00,0xbb,0xc1,0x22,0x48 } },
+{ 16, 0xa420, 0, {0x08,0xfd,0x02,0x2e,0x00,0x97,0x00,0x2f,0xc2,0x48,0x71,0x23,0x7e,0x40,0xbf,0x00 } },
+{ 16, 0xa430, 0, {0x21,0xc5,0x4b,0xf5,0x02,0xef,0x00,0xbb,0x40,0x36,0xe0,0x08,0xa8,0x02,0xe0,0x04 } },
+{ 16, 0xa440, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc5,0x84,0xb3,0x11,0xa2,0xc9 } },
+{ 16, 0xa450, 0, {0x0a,0x30,0x02,0x00,0x01,0xb3,0x30,0x28,0xc4,0x08,0x32,0x42,0x0c,0x00,0xa3,0x08 } },
+{ 16, 0xa460, 0, {0xa0,0xca,0x0a,0x32,0x82,0x80,0x10,0xb0,0x41,0x24,0x11,0x08,0x31,0x02,0xe2,0x01 } },
+{ 16, 0xa470, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xa5,0x00,0xbb,0x00,0x22,0xe1 } },
+{ 16, 0xa480, 0, {0x28,0xb0,0x02,0x2c,0x80,0x9b,0x00,0x2e,0xc0,0x08,0xb0,0x02,0x6c,0x00,0xb3,0x00 } },
+{ 16, 0xa490, 0, {0x22,0xc0,0x0b,0xb0,0x00,0xec,0x20,0xbb,0x00,0x26,0xc0,0x08,0x80,0x02,0xf0,0x04 } },
+{ 16, 0xa4a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe3,0x40,0xf7,0x04,0x32,0xc0 } },
+{ 16, 0xa4b0, 0, {0x4e,0xb0,0x23,0x2e,0x20,0xeb,0x00,0x1e,0xc0,0x0c,0xb0,0x01,0x2c,0x00,0xfb,0x00 } },
+{ 16, 0xa4c0, 0, {0x36,0xc0,0x1f,0xb0,0x03,0xe1,0x40,0xfb,0x00,0x36,0x98,0x0c,0x90,0x03,0xd0,0x04 } },
+{ 16, 0xa4d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb6,0x04,0xff,0x02,0x3f,0xc0 } },
+{ 16, 0xa4e0, 0, {0x0f,0xf0,0x03,0xfe,0x00,0xef,0x02,0x3d,0xc0,0x0f,0xf0,0x23,0xfc,0x00,0xff,0x00 } },
+{ 16, 0xa4f0, 0, {0x3f,0xc0,0x4f,0xf0,0x03,0xfc,0x00,0xf4,0x00,0x3b,0x40,0x0f,0xa0,0x13,0xf8,0x00 } },
+{ 16, 0xa500, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xaa,0x20,0xeb,0x10,0x36,0xc0 } },
+{ 16, 0xa510, 0, {0x0d,0xb0,0x07,0xec,0x20,0xdb,0x00,0x32,0xc0,0x0c,0xb0,0x02,0x6c,0x20,0xeb,0x00 } },
+{ 16, 0xa520, 0, {0x3e,0xc1,0x0d,0xb0,0x03,0xe0,0x20,0xdb,0xa0,0x32,0x90,0x4c,0xb0,0x0b,0x10,0x04 } },
+{ 16, 0xa530, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2d,0x00,0x8f,0x80,0x20,0xc1 } },
+{ 16, 0xa540, 0, {0x08,0x70,0x12,0xcf,0x00,0x8f,0x00,0xa3,0xc0,0x0d,0xf0,0x02,0x3c,0x00,0x8f,0x00 } },
+{ 16, 0xa550, 0, {0x37,0xc0,0x88,0xf0,0x02,0xec,0x00,0x88,0x00,0x20,0x40,0x08,0x80,0x02,0x32,0x00 } },
+{ 16, 0xa560, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xa3,0x80,0x24,0x81 } },
+{ 16, 0xa570, 0, {0x09,0x30,0x06,0xcc,0x40,0x93,0x00,0x28,0xc1,0x08,0xb0,0x02,0xcf,0x40,0xa3,0x00 } },
+{ 16, 0xa580, 0, {0x2c,0xc0,0x09,0x30,0x02,0xcd,0x00,0x90,0x40,0x60,0x40,0x28,0x10,0x02,0x38,0x00 } },
+{ 16, 0xa590, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x0e,0x00,0x87,0x80,0x23,0xe0 } },
+{ 16, 0xa5a0, 0, {0x48,0x79,0x02,0xde,0x41,0x97,0x80,0x29,0xe0,0x19,0x78,0x06,0x9e,0x00,0x87,0x80 } },
+{ 16, 0xa5b0, 0, {0x25,0xe0,0x08,0x78,0x02,0xd2,0x03,0x83,0x80,0x21,0xa0,0x08,0x68,0x02,0x08,0x00 } },
+{ 16, 0xa5c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xa3,0x00,0x34,0xc0 } },
+{ 16, 0xa5d0, 0, {0x0d,0x30,0x42,0xcc,0x01,0xd3,0x10,0x3a,0xc5,0x0c,0x39,0x03,0xcc,0x00,0xe3,0x04 } },
+{ 16, 0xa5e0, 0, {0x3c,0xc4,0x0d,0x30,0x03,0xce,0x00,0xd0,0x00,0x30,0x40,0x0c,0x30,0x03,0x12,0x02 } },
+{ 16, 0xa5f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xbc,0x00,0xf7,0x00,0x3f,0xc0 } },
+{ 16, 0xa600, 0, {0x1f,0xf0,0x53,0xfc,0x00,0xef,0x08,0x37,0xd1,0x0f,0xf0,0x83,0x7c,0x00,0xf7,0x40 } },
+{ 16, 0xa610, 0, {0x3f,0xc1,0x0f,0xf1,0x03,0xd0,0x00,0xff,0x00,0xbf,0x84,0x0f,0xc8,0x03,0xd0,0x06 } },
+{ 16, 0xa620, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe0,0x00,0xfb,0x00,0x3e,0xe0 } },
+{ 16, 0xa630, 0, {0x2c,0xbe,0x83,0xec,0x00,0xeb,0x40,0x3e,0xc0,0x0f,0xb4,0x03,0xed,0x20,0xfb,0x10 } },
+{ 16, 0xa640, 0, {0xb6,0xd2,0x0f,0xb4,0x83,0xec,0x00,0xdb,0x80,0x36,0xc1,0x0c,0x90,0x21,0x2a,0x00 } },
+{ 16, 0xa650, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x94,0x00,0xb7,0x00,0x2f,0xc0 } },
+{ 16, 0xa660, 0, {0x08,0x36,0x02,0x0c,0x08,0x87,0x30,0x2d,0xd9,0x8b,0x72,0x86,0xdd,0x00,0xb3,0x20 } },
+{ 16, 0xa670, 0, {0x21,0xc8,0x0b,0x74,0x02,0xd0,0x02,0x84,0x00,0xa0,0x00,0x28,0x20,0x02,0x12,0x04 } },
+{ 16, 0xa680, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9a,0x00,0xb7,0x80,0x2d,0xe0 } },
+{ 16, 0xa690, 0, {0x08,0x7a,0x02,0x9d,0x00,0xa7,0xa0,0x2d,0xe0,0x0b,0x78,0x02,0x9e,0x80,0xa7,0x80 } },
+{ 16, 0xa6a0, 0, {0x21,0xe4,0x08,0x7a,0x26,0x9e,0x18,0x83,0x04,0x21,0xe0,0x08,0x78,0x0a,0x70,0x00 } },
+{ 16, 0xa6b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x00,0xb3,0x00,0x2c,0xe0 } },
+{ 16, 0xa6c0, 0, {0x58,0x30,0x12,0x0e,0x82,0x83,0x00,0x2c,0xc0,0x0b,0x30,0x02,0xcc,0x01,0xb3,0x00 } },
+{ 16, 0xa6d0, 0, {0x20,0xc1,0x0b,0x30,0x02,0xc0,0x08,0x88,0xd2,0x20,0x20,0x08,0x00,0x02,0x52,0x04 } },
+{ 16, 0xa6e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x60,0xfa,0x00,0x3f,0x82 } },
+{ 16, 0xa6f0, 0, {0x0c,0xa0,0x03,0xfa,0x00,0xaa,0x00,0x1e,0x80,0x8f,0xa0,0x03,0xe8,0x00,0xf2,0x00 } },
+{ 16, 0xa700, 0, {0x32,0x80,0x1f,0xa0,0x03,0xe8,0x00,0xda,0x00,0x36,0x88,0xac,0xe0,0x03,0x7a,0x04 } },
+{ 16, 0xa710, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe1,0x00,0xf8,0x00,0x3e,0x20 } },
+{ 16, 0xa720, 0, {0x4f,0x80,0x03,0xe1,0x00,0xf0,0x00,0x3c,0x00,0x0b,0x80,0x03,0xe0,0x00,0xf8,0x02 } },
+{ 16, 0xa730, 0, {0x3a,0x00,0x0f,0x80,0x43,0xf1,0x00,0xfc,0x0a,0x3d,0x00,0x0f,0xc0,0x03,0x92,0x00 } },
+{ 16, 0xa740, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe6,0x00,0xc9,0x90,0x3e,0x40 } },
+{ 16, 0xa750, 0, {0x0f,0x92,0x03,0xe4,0x00,0xd9,0x00,0x32,0x40,0x04,0x90,0x07,0xe7,0x00,0xf9,0x10 } },
+{ 16, 0xa760, 0, {0x30,0x40,0x0c,0x90,0x43,0xe4,0x09,0xd9,0x80,0x22,0x40,0x2c,0x10,0x0b,0x02,0x04 } },
+{ 16, 0xa770, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x60,0x89,0xc0,0x2e,0x40 } },
+{ 16, 0xa780, 0, {0x0b,0x98,0x26,0xc5,0x80,0x89,0x00,0x22,0x40,0x28,0x90,0x12,0xe7,0x10,0xb9,0x00 } },
+{ 16, 0xa790, 0, {0x36,0x40,0x28,0x90,0x12,0xc5,0x83,0xc9,0x80,0xb6,0x40,0x08,0x90,0x02,0x20,0x00 } },
+{ 16, 0xa7a0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x04,0x00,0x89,0x40,0x2e,0x41 } },
+{ 16, 0xa7b0, 0, {0x4b,0x90,0x02,0xe4,0x00,0x99,0x00,0xa2,0x40,0x0a,0x90,0x02,0xe5,0x00,0xb9,0x00 } },
+{ 16, 0xa7c0, 0, {0xe2,0x41,0x08,0x90,0x42,0xe4,0x00,0x9d,0x50,0xab,0x4a,0x08,0xd0,0x26,0x06,0x00 } },
+{ 16, 0xa7d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x82,0x81,0x20,0x2c,0x50 } },
+{ 16, 0xa7e0, 0, {0x0b,0x10,0x02,0xe4,0x00,0x81,0x40,0x20,0x50,0x4a,0x14,0x32,0xc4,0x00,0xb1,0x40 } },
+{ 16, 0xa7f0, 0, {0x24,0x51,0x18,0x14,0x12,0xd4,0x00,0x85,0x40,0x2d,0x40,0x08,0x50,0x06,0x02,0x01 } },
+{ 16, 0xa800, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xc8,0x00,0x3e,0x00 } },
+{ 16, 0xa810, 0, {0x0f,0x80,0x02,0xe0,0x00,0xd8,0x00,0x32,0x00,0x0a,0x80,0x02,0xe0,0x10,0xf8,0x00 } },
+{ 16, 0xa820, 0, {0x32,0x00,0x04,0x80,0x03,0xe0,0x00,0xd8,0x00,0x3a,0x00,0x0c,0xc0,0x03,0x2e,0x03 } },
+{ 16, 0xa830, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xf4,0x40,0xf9,0x10,0x3f,0x41 } },
+{ 16, 0xa840, 0, {0x0f,0x94,0x03,0xf5,0x00,0xf9,0x40,0x3e,0x50,0x0d,0x94,0x03,0xe5,0x10,0xf9,0x40 } },
+{ 16, 0xa850, 0, {0x3e,0x50,0x4f,0x94,0x03,0xc5,0x00,0xe9,0x41,0x36,0x50,0x0f,0x94,0x03,0xe6,0x06 } },
+{ 16, 0xa860, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x00,0xfd,0xa8,0x3a,0x40 } },
+{ 16, 0xa870, 0, {0x0c,0xd8,0x23,0x36,0x00,0xe9,0xa0,0x3e,0x78,0x0f,0x9e,0x03,0xb6,0x80,0xcd,0xe2 } },
+{ 16, 0xa880, 0, {0x32,0x68,0x0c,0x9b,0x03,0x36,0x82,0x4d,0xa0,0x37,0x68,0x8c,0x98,0x03,0x06,0x00 } },
+{ 16, 0xa890, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xeb,0xa0,0xb8,0x40,0x20,0x20 } },
+{ 16, 0xa8a0, 0, {0x08,0x85,0x02,0x21,0x51,0x88,0xc0,0x2e,0x29,0x0b,0x8e,0x02,0xe1,0x00,0xd8,0xe0 } },
+{ 16, 0xa8b0, 0, {0x22,0x32,0x0d,0x8d,0x23,0x61,0x48,0x98,0xd4,0xa2,0x10,0x28,0x84,0x02,0x0e,0x04 } },
+{ 16, 0xa8c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb3,0x00,0x2a,0x4a } },
+{ 16, 0xa8d0, 0, {0x28,0x10,0x4e,0xa4,0x08,0xa1,0x68,0x28,0x44,0x0b,0x14,0x02,0xc5,0x00,0x81,0x40 } },
+{ 16, 0xa8e0, 0, {0xa0,0x50,0x08,0x10,0x02,0x04,0x02,0x91,0x2a,0x20,0x44,0x28,0x14,0x4a,0x02,0x01 } },
+{ 16, 0xa8f0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xac,0x80,0xb9,0x00,0x22,0x40 } },
+{ 16, 0xa900, 0, {0x48,0x90,0x06,0xa4,0x00,0xa9,0x00,0x2e,0x40,0x0b,0x90,0x22,0xe4,0x00,0x99,0x00 } },
+{ 16, 0xa910, 0, {0x22,0x40,0x09,0x10,0x02,0x64,0x02,0x99,0x00,0x22,0x40,0x08,0x90,0x02,0x06,0x04 } },
+{ 16, 0xa920, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0x00,0x38,0x58 } },
+{ 16, 0xa930, 0, {0x0c,0x90,0x53,0x84,0x14,0xa9,0x04,0x3e,0x40,0x0f,0x90,0x03,0xe4,0x00,0xc9,0x00 } },
+{ 16, 0xa940, 0, {0x32,0x40,0x0c,0x90,0x03,0x24,0x04,0xd9,0x00,0xb6,0x40,0x4c,0x90,0x0b,0x28,0x04 } },
+{ 16, 0xa950, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x00,0xf9,0x02,0x3e,0x49 } },
+{ 16, 0xa960, 0, {0x0f,0x10,0x43,0x64,0x00,0xd9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xc4,0x00,0xf1,0x02 } },
+{ 16, 0xa970, 0, {0x3e,0x40,0x0f,0x90,0x03,0xc4,0x02,0xe9,0x04,0x3c,0x40,0x0f,0x1c,0x03,0xca,0x00 } },
+{ 16, 0xa980, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x80,0xc8,0x20,0x3e,0x00 } },
+{ 16, 0xa990, 0, {0x8c,0x80,0x0b,0x20,0x00,0xe8,0x02,0x3e,0x00,0x0f,0x80,0x03,0xa0,0x82,0xc8,0x00 } },
+{ 16, 0xa9a0, 0, {0x6c,0x00,0x0f,0x80,0x03,0x20,0x10,0xc8,0x00,0x32,0x02,0x0c,0x80,0x03,0x0a,0x04 } },
+{ 16, 0xa9b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x38,0x00,0x86,0x00,0x2e,0x80 } },
+{ 16, 0xa9c0, 0, {0x68,0xa8,0x80,0x3a,0x00,0x8a,0x00,0x2e,0x80,0x0b,0xa0,0x02,0xf8,0x00,0x8a,0x00 } },
+{ 16, 0xa9d0, 0, {0x2e,0x80,0x0b,0xa0,0x0a,0x3a,0x00,0x8e,0x10,0x23,0x80,0x08,0xa0,0x03,0x0a,0x00 } },
+{ 16, 0xa9e0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4d,0x00,0x83,0x00,0x2c,0xc0 } },
+{ 16, 0xa9f0, 0, {0x08,0x38,0x00,0x0c,0x60,0x23,0x00,0x2c,0xc0,0x0b,0x30,0x02,0xcc,0x40,0x83,0x00 } },
+{ 16, 0xaa00, 0, {0x2c,0xc0,0x0b,0x30,0x02,0x0c,0x02,0x8a,0x80,0xa0,0xe0,0x28,0x30,0x0a,0x4a,0x00 } },
+{ 16, 0xaa10, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x16,0x20,0x87,0x02,0x2d,0xc1 } },
+{ 16, 0xaa20, 0, {0x48,0x70,0x12,0x7c,0x00,0xa7,0x20,0x2d,0xc9,0x0b,0x72,0x00,0xdc,0x00,0x87,0x08 } },
+{ 16, 0xaa30, 0, {0x2d,0xc4,0x1b,0x32,0x02,0x1d,0x01,0x87,0x42,0x21,0xc2,0x08,0x70,0x02,0x28,0x00 } },
+{ 16, 0xaa40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3e,0x02,0xc7,0x80,0x3d,0xec } },
+{ 16, 0xaa50, 0, {0x0c,0x58,0x03,0x1e,0x00,0xe7,0x80,0x3d,0xec,0x0f,0x7f,0x03,0x96,0x00,0xc7,0x80 } },
+{ 16, 0xaa60, 0, {0x2d,0xe2,0x07,0x79,0x03,0x0a,0x06,0xc3,0x80,0x30,0x20,0x8c,0x38,0x03,0x6a,0x02 } },
+{ 16, 0xaa70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x00,0xfb,0x00,0x3e,0xc0 } },
+{ 16, 0xaa80, 0, {0x0f,0x10,0x43,0x8c,0x00,0xdb,0x38,0x3e,0xd8,0x0f,0xb0,0x03,0xcc,0x04,0xfb,0x44 } },
+{ 16, 0xaa90, 0, {0x3e,0xc0,0x8f,0xb6,0x13,0xec,0x02,0xff,0x02,0x3e,0x00,0x0f,0xb0,0x03,0xc2,0x06 } },
+{ 16, 0xaaa0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfa,0x00,0xff,0x80,0x31,0xe3 } },
+{ 16, 0xaab0, 0, {0x0e,0xf8,0x23,0xfe,0x02,0xdf,0x80,0xb7,0xe2,0x0e,0xf8,0x03,0x7e,0x00,0x6d,0xd0 } },
+{ 16, 0xaac0, 0, {0x33,0xe0,0x0c,0xf8,0x9b,0x76,0xc0,0xdf,0x84,0xb3,0xe0,0x04,0xf8,0x03,0xc0,0x00 } },
+{ 16, 0xaad0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x90,0x40,0xb7,0x02,0x21,0xc4 } },
+{ 16, 0xaae0, 0, {0x08,0x7b,0x42,0xdc,0x00,0x87,0x00,0x21,0xc4,0x0b,0x30,0x00,0x10,0x80,0x8d,0x00 } },
+{ 16, 0xaaf0, 0, {0x23,0xc0,0x0d,0xf2,0x02,0x04,0x42,0x8f,0x00,0x29,0xc8,0x28,0x70,0x02,0xea,0x04 } },
+{ 16, 0xab00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x00,0xb6,0x00,0x23,0xc0 } },
+{ 16, 0xab10, 0, {0x0a,0x72,0x02,0x8c,0x00,0x87,0x00,0x21,0xc0,0x0a,0x30,0x02,0x04,0x01,0xa7,0x02 } },
+{ 16, 0xab20, 0, {0x21,0xc0,0x08,0x70,0x42,0x00,0x8a,0x87,0x00,0x21,0xc0,0x28,0x70,0x02,0xc0,0x00 } },
+{ 16, 0xab30, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xc5,0x00,0xb0,0x00,0xa0,0xd0 } },
+{ 16, 0xab40, 0, {0x08,0xb0,0x02,0xc9,0x42,0x8b,0x00,0x20,0xc0,0x0b,0x30,0x22,0x04,0x00,0x83,0x00 } },
+{ 16, 0xab50, 0, {0xa0,0xc0,0x49,0x30,0x02,0x45,0x40,0x93,0xc0,0xa8,0xd4,0x00,0x35,0x02,0xc8,0x04 } },
+{ 16, 0xab60, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x00,0xbb,0x00,0x31,0xc0 } },
+{ 16, 0xab70, 0, {0x0e,0xb0,0x23,0xcd,0x00,0xdf,0x00,0x37,0xc0,0x0e,0xf0,0x01,0x68,0x00,0xe3,0x00 } },
+{ 16, 0xab80, 0, {0x33,0xc0,0x1c,0xf0,0x03,0x45,0x00,0xda,0xc8,0x92,0xd4,0x2c,0xb4,0x03,0xea,0x04 } },
+{ 16, 0xab90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xe5,0x20,0xfb,0x00,0x3e,0xc0 } },
+{ 16, 0xaba0, 0, {0x0f,0xb0,0x03,0xec,0x00,0xfb,0x00,0x3e,0xc0,0x4f,0xb0,0x03,0xad,0x00,0xfb,0x00 } },
+{ 16, 0xabb0, 0, {0x7e,0xc0,0x1f,0x30,0x03,0xa4,0x80,0xe9,0x20,0x3c,0xc0,0x0f,0x32,0x03,0xe0,0x00 } },
+{ 16, 0xabc0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x00,0xc7,0x00,0x33,0xc2 } },
+{ 16, 0xabd0, 0, {0x2c,0xf0,0x03,0x3e,0x20,0xdb,0x00,0x13,0xc0,0x0c,0x70,0x03,0x3c,0x80,0xef,0x04 } },
+{ 16, 0xabe0, 0, {0x73,0xc1,0x0f,0xf0,0x22,0x30,0x00,0xc6,0x00,0xb2,0xc0,0x0c,0xf0,0x03,0x00,0x44 } },
+{ 16, 0xabf0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x69,0x00,0x8b,0x44,0xa2,0xc1 } },
+{ 16, 0xac00, 0, {0x88,0xb0,0x03,0x6c,0x00,0x8b,0x00,0x22,0xc0,0x28,0xb0,0x0a,0x2d,0x00,0xbb,0x00 } },
+{ 16, 0xac10, 0, {0x62,0xc0,0x0b,0xb0,0x02,0x26,0x02,0x8b,0x80,0x22,0xc0,0x08,0xb0,0x03,0x20,0x40 } },
+{ 16, 0xac20, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x28,0x01,0x8a,0x08,0x22,0xc0 } },
+{ 16, 0xac30, 0, {0x08,0xb2,0x02,0x6c,0x40,0x9b,0x00,0x28,0xc0,0x48,0xb0,0x16,0x29,0x04,0xb9,0x01 } },
+{ 16, 0xac40, 0, {0x22,0xc0,0x49,0xb0,0x06,0xae,0x09,0x8b,0x80,0x22,0xe0,0x48,0xb0,0x02,0x20,0x00 } },
+{ 16, 0xac50, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x00,0x02,0x82,0x00,0x22,0xc0 } },
+{ 16, 0xac60, 0, {0x88,0xb0,0x02,0x44,0x00,0x83,0x00,0x28,0xc0,0x08,0x30,0x02,0x08,0x00,0xb1,0x00 } },
+{ 16, 0xac70, 0, {0x20,0xc0,0x0b,0x30,0x02,0x8c,0x00,0x83,0x80,0x20,0xe0,0x08,0x30,0x0a,0x02,0x01 } },
+{ 16, 0xac80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x64,0x00,0xca,0x00,0x33,0xc0 } },
+{ 16, 0xac90, 0, {0x0c,0xb2,0x03,0x2c,0x00,0xdf,0x00,0x3b,0xc0,0x4c,0xf5,0x13,0x2c,0x04,0xef,0x00 } },
+{ 16, 0xaca0, 0, {0xa3,0xc0,0x0d,0xf0,0x03,0xa8,0x40,0xcb,0x00,0xb2,0x00,0x2c,0xb0,0x03,0x00,0x03 } },
+{ 16, 0xacb0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xf0,0x00,0xf4,0x00,0x3f,0xc0 } },
+{ 16, 0xacc0, 0, {0x0f,0xb1,0x03,0xf0,0x00,0xff,0x00,0x37,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xff,0x00 } },
+{ 16, 0xacd0, 0, {0x3f,0xc0,0x07,0xf0,0x0b,0x7c,0x08,0xff,0x01,0x3f,0x00,0x0f,0xf0,0x03,0xa8,0x06 } },
+{ 16, 0xace0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf0,0xc5,0xed,0x33,0x3b,0xcc } },
+{ 16, 0xacf0, 0, {0x0c,0xf0,0x03,0x30,0x40,0xff,0x25,0x3f,0xcc,0x0c,0xf3,0x83,0x3c,0xd0,0xdf,0x48 } },
+{ 16, 0xad00, 0, {0x37,0x30,0x4c,0xf3,0x03,0xfd,0x80,0xcf,0x28,0x33,0xd8,0x0c,0xf1,0x03,0x30,0x00 } },
+{ 16, 0xad10, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xec,0xd0,0xbb,0x31,0x20,0xcc } },
+{ 16, 0xad20, 0, {0x88,0xf3,0x42,0x20,0x50,0xbf,0x90,0x2f,0xc4,0x0a,0xf6,0x02,0x7d,0xc0,0x8f,0x40 } },
+{ 16, 0xad30, 0, {0x26,0x40,0x8f,0xf6,0x02,0xfd,0x00,0xff,0x08,0x39,0xc8,0x08,0xf6,0x02,0xa0,0x04 } },
+{ 16, 0xad40, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc4,0x80,0xa1,0x20,0x28,0xc9 } },
+{ 16, 0xad50, 0, {0x08,0x30,0x9a,0x00,0x09,0xb3,0x00,0x2c,0xc0,0x20,0x30,0x02,0x4c,0x90,0x83,0x20 } },
+{ 16, 0xad60, 0, {0x02,0x08,0x0b,0x33,0x12,0xcd,0x80,0x93,0x20,0x24,0xd8,0x08,0x34,0x22,0x22,0x01 } },
+{ 16, 0xad70, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x11,0xae,0x00,0xbb,0x10,0x22,0xc0 } },
+{ 16, 0xad80, 0, {0x08,0xb0,0x02,0x26,0x01,0x3b,0x01,0x6e,0xc0,0x08,0xb0,0x02,0x4c,0x08,0x8b,0x00 } },
+{ 16, 0xad90, 0, {0xa2,0x89,0x0b,0xb0,0x02,0xec,0x00,0xab,0x00,0x6a,0xc1,0x28,0xb0,0x02,0xb0,0x04 } },
+{ 16, 0xada0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0x6e,0x00,0xe8,0xc1,0x3a,0xc0 } },
+{ 16, 0xadb0, 0, {0x2c,0xb0,0x43,0x26,0x00,0xfb,0x06,0x3e,0xc1,0x0c,0xb0,0x0b,0x2c,0x02,0xcb,0x00 } },
+{ 16, 0xadc0, 0, {0x34,0x22,0x9f,0xb0,0x43,0xec,0x00,0x9b,0x02,0x36,0xc1,0x8c,0xb0,0x03,0x10,0x04 } },
+{ 16, 0xadd0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xbc,0x00,0xfc,0x80,0x3d,0xd0 } },
+{ 16, 0xade0, 0, {0x2f,0xf0,0x03,0xfc,0x00,0xfb,0x00,0x3d,0xc0,0x07,0x30,0x03,0xbc,0x00,0xef,0x04 } },
+{ 16, 0xadf0, 0, {0x3f,0xe0,0x5e,0xb0,0x01,0xfc,0x00,0xff,0x00,0x1b,0xc0,0x0f,0xf0,0x03,0xf8,0x00 } },
+{ 16, 0xae00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xcb,0x01,0x3e,0xc9 } },
+{ 16, 0xae10, 0, {0x0c,0xb0,0x17,0x20,0x84,0xeb,0x00,0xb2,0xc1,0x0d,0xb0,0x03,0x6c,0x00,0xc3,0x00 } },
+{ 16, 0xae20, 0, {0x32,0x50,0x0f,0xb0,0x03,0x0c,0x40,0xc3,0x00,0x7e,0xc0,0x0c,0x30,0x03,0x10,0x04 } },
+{ 16, 0xae30, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2c,0x00,0x8a,0x58,0x2e,0xe0 } },
+{ 16, 0xae40, 0, {0x48,0xf0,0x02,0x2d,0x00,0xef,0x01,0x23,0xc0,0x08,0xf0,0x22,0x3c,0x04,0x8f,0x60 } },
+{ 16, 0xae50, 0, {0x36,0x54,0x0b,0xf0,0x0a,0x3d,0x40,0x8f,0x00,0x2f,0xc0,0x08,0xf0,0x03,0x72,0x00 } },
+{ 16, 0xae60, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x40,0x00,0x89,0x80,0x2c,0x10 } },
+{ 16, 0xae70, 0, {0x08,0xb0,0x02,0x49,0x00,0xa3,0xa0,0x24,0xc0,0x09,0x30,0x02,0x4c,0x00,0x83,0xc9 } },
+{ 16, 0xae80, 0, {0x20,0x90,0x42,0x30,0x12,0x4d,0x00,0x83,0x00,0x6a,0xc0,0x09,0x30,0x02,0x38,0x00 } },
+{ 16, 0xae90, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x16,0x00,0x85,0x80,0x6d,0x62 } },
+{ 16, 0xaea0, 0, {0x08,0x7e,0x02,0x56,0x40,0x27,0x80,0x25,0xe0,0x19,0x78,0x06,0x0e,0x00,0x83,0x80 } },
+{ 16, 0xaeb0, 0, {0x61,0xa0,0x0b,0x78,0x02,0x4e,0x00,0x87,0x82,0x6d,0xe0,0x09,0x79,0x02,0x48,0x00 } },
+{ 16, 0xaec0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x2c,0x02,0xc3,0x61,0x3c,0x88 } },
+{ 16, 0xaed0, 0, {0x2c,0xba,0x12,0x49,0x10,0xe3,0x2c,0x36,0xc0,0x0d,0x30,0x53,0x4c,0x44,0xc3,0x00 } },
+{ 16, 0xaee0, 0, {0x20,0x01,0x0f,0x31,0x03,0x4c,0x00,0xc3,0x01,0x3c,0xc0,0x2d,0xb1,0x03,0x12,0x02 } },
+{ 16, 0xaef0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xbc,0x00,0xff,0x00,0x3f,0x00 } },
+{ 16, 0xaf00, 0, {0x4f,0xf1,0x09,0xb0,0x00,0xff,0x00,0x3b,0xc0,0x0e,0xf4,0x01,0xfd,0x24,0xff,0x40 } },
+{ 16, 0xaf10, 0, {0xbf,0xc0,0x07,0xf0,0x03,0xbc,0x00,0x6f,0x10,0x3f,0xc4,0x1e,0xf1,0x83,0xd0,0x06 } },
+{ 16, 0xaf20, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xc4,0x00,0xe8,0x04,0x32,0x00 } },
+{ 16, 0xaf30, 0, {0x0c,0xb6,0x03,0xe8,0x02,0xcb,0x00,0x36,0xca,0x0f,0xb5,0x03,0xad,0x00,0xfb,0x20 } },
+{ 16, 0xaf40, 0, {0x3e,0x40,0x0f,0xb3,0x03,0xec,0x80,0xfb,0xa8,0x32,0xc6,0x8c,0xb6,0x03,0x2a,0x00 } },
+{ 16, 0xaf50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x94,0x02,0xe6,0x00,0x20,0x00 } },
+{ 16, 0xaf60, 0, {0x08,0x73,0x02,0xdc,0x00,0x87,0x70,0x2d,0xd0,0x0b,0xf0,0x02,0x1c,0x84,0xb7,0x20 } },
+{ 16, 0xaf70, 0, {0x2d,0xc0,0x0b,0x70,0x82,0xdd,0x24,0xb7,0x40,0x34,0xc9,0x28,0x72,0x82,0x92,0x04 } },
+{ 16, 0xaf80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0xbe,0x02,0xac,0x80,0xa1,0x20 } },
+{ 16, 0xaf90, 0, {0x08,0x79,0x00,0xce,0x04,0x87,0x80,0x65,0xe0,0x0b,0x7a,0x02,0x9e,0x00,0xb7,0x90 } },
+{ 16, 0xafa0, 0, {0x6d,0xa0,0x0b,0x78,0x02,0xde,0x00,0xb7,0x80,0x21,0xe0,0x08,0x78,0x02,0x30,0x00 } },
+{ 16, 0xafb0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xed,0x82,0xab,0xe0,0x20,0xe4 } },
+{ 16, 0xafc0, 0, {0x08,0x30,0x02,0xee,0x04,0x83,0x00,0x2c,0xc1,0x1b,0x30,0x02,0x0c,0x08,0xb3,0x00 } },
+{ 16, 0xafd0, 0, {0x64,0xf6,0x0b,0xb0,0x02,0xcc,0x04,0xb3,0x00,0x26,0xc0,0x08,0x30,0x02,0x92,0x04 } },
+{ 16, 0xafe0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xbb,0x80,0xee,0x49,0x31,0xa0 } },
+{ 16, 0xaff0, 0, {0x2c,0xa0,0x03,0xfa,0x00,0xca,0x02,0x36,0x80,0x0f,0xa0,0x03,0xa8,0x00,0xfa,0x02 } },
+{ 16, 0xb000, 0, {0x3f,0x90,0x0f,0xa0,0x63,0xe8,0x00,0xfa,0x00,0x32,0x80,0x0c,0xa0,0x23,0x3a,0x04 } },
+{ 16, 0xb010, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x0a,0xe8,0x00,0x3e,0x08 } },
+{ 16, 0xb020, 0, {0x0f,0x80,0x03,0xe3,0x50,0xf0,0x00,0x3e,0x00,0x0f,0x80,0x13,0xe0,0x00,0xf8,0x00 } },
+{ 16, 0xb030, 0, {0x3e,0x00,0x0f,0x80,0x03,0xe0,0x01,0xf8,0x01,0x7e,0x00,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0xb040, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x40,0xc9,0xa1,0x32,0x40 } },
+{ 16, 0xb050, 0, {0x20,0x11,0x01,0xa6,0x40,0xc9,0x84,0x36,0x40,0x0d,0x90,0x03,0x44,0x00,0x41,0x00 } },
+{ 16, 0xb060, 0, {0x32,0x40,0x0f,0x90,0x0b,0x24,0x00,0xf9,0x00,0x3e,0x40,0x4c,0x10,0x03,0x02,0x04 } },
+{ 16, 0xb070, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0x89,0x82,0xa2,0x40 } },
+{ 16, 0xb080, 0, {0x08,0x9c,0x02,0x25,0x00,0x89,0xc8,0x22,0x40,0x08,0x90,0x42,0x24,0x00,0x89,0x20 } },
+{ 16, 0xb090, 0, {0x22,0x60,0x0b,0x90,0x02,0x24,0x10,0xb9,0x00,0x2e,0x40,0x08,0x90,0x03,0x60,0x00 } },
+{ 16, 0xb0a0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x89,0x04,0x22,0xca } },
+{ 16, 0xb0b0, 0, {0x0a,0x90,0x0a,0x25,0x02,0x89,0x20,0x20,0x40,0x28,0x10,0x02,0x64,0x01,0xa9,0x00 } },
+{ 16, 0xb0c0, 0, {0x22,0x4b,0x0b,0x90,0x02,0x24,0x01,0xb9,0x00,0x2e,0x41,0x28,0x90,0x02,0x06,0x00 } },
+{ 16, 0xb0d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x90,0x81,0xa0,0x20,0x48 } },
+{ 16, 0xb0e0, 0, {0x0a,0x32,0x02,0x04,0x80,0x81,0x00,0x20,0x44,0x08,0x11,0x02,0x04,0xd0,0xa1,0x20 } },
+{ 16, 0xb0f0, 0, {0x20,0x40,0x0b,0x11,0x02,0x06,0x00,0xb1,0x31,0x2c,0x48,0x08,0x14,0x02,0x42,0x01 } },
+{ 16, 0xb100, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x42,0xc8,0x54,0x32,0x14 } },
+{ 16, 0xb110, 0, {0x0e,0x85,0x03,0x21,0x44,0xc8,0x28,0xb2,0x1a,0x4c,0x86,0x93,0x61,0x14,0xe8,0x50 } },
+{ 16, 0xb120, 0, {0x22,0x14,0x0f,0x86,0x83,0x21,0x40,0xf0,0x40,0x1e,0x14,0x0c,0x00,0x03,0x2e,0x03 } },
+{ 16, 0xb130, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0x74,0x44,0xf5,0x10,0x3f,0x44 } },
+{ 16, 0xb140, 0, {0x0d,0x91,0x03,0x74,0x40,0xf9,0x00,0x3e,0x48,0x0b,0x92,0x03,0xe4,0xc2,0xd9,0x10 } },
+{ 16, 0xb150, 0, {0xbf,0x40,0x0f,0x92,0x03,0xe5,0x04,0xf9,0x30,0x3e,0x44,0x0f,0x94,0x43,0xe6,0x06 } },
+{ 16, 0xb160, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x22,0xcd,0xa1,0x33,0x61 } },
+{ 16, 0xb170, 0, {0x0c,0xd8,0xd3,0x34,0x10,0xcd,0xa8,0x3e,0x60,0x8e,0x9c,0x93,0xa7,0x08,0xcd,0x80 } },
+{ 16, 0xb180, 0, {0x33,0x40,0x0e,0x9a,0xd3,0x36,0xa0,0xc9,0x80,0x32,0x60,0x0c,0x99,0x03,0x06,0x00 } },
+{ 16, 0xb190, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe3,0x88,0x8a,0xa0,0x20,0x28 } },
+{ 16, 0xb1a0, 0, {0x08,0x80,0x22,0x20,0x12,0x88,0x40,0x2c,0x28,0x08,0x8a,0x02,0x22,0x00,0x88,0x00 } },
+{ 16, 0xb1b0, 0, {0x22,0x00,0x0b,0x8c,0x03,0x21,0x00,0x88,0xd0,0xa2,0x3e,0x28,0x8d,0x02,0x0e,0x04 } },
+{ 16, 0xb1c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xce,0x20,0xa1,0x48,0x20,0x52 } },
+{ 16, 0xb1d0, 0, {0x29,0x10,0x02,0x24,0x03,0x81,0x00,0x2c,0x52,0x0a,0x10,0x12,0x85,0x10,0x91,0x40 } },
+{ 16, 0xb1e0, 0, {0xa4,0x40,0x0a,0x12,0x82,0x44,0x00,0x91,0x28,0x24,0x40,0x28,0x12,0x02,0x02,0x01 } },
+{ 16, 0xb1f0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa4,0x00,0xa9,0x14,0x22,0x40 } },
+{ 16, 0xb200, 0, {0x09,0x90,0x02,0xa4,0x01,0x89,0x04,0x2c,0x40,0x08,0x90,0x02,0x24,0x00,0x99,0x00 } },
+{ 16, 0xb210, 0, {0x22,0x44,0x4b,0x10,0x42,0x24,0x14,0x99,0x00,0x26,0x40,0x08,0x10,0x02,0x06,0x04 } },
+{ 16, 0xb220, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x40,0xe9,0x40,0xb2,0x78 } },
+{ 16, 0xb230, 0, {0x0d,0x90,0x0b,0x24,0x22,0xc9,0x03,0x3e,0x41,0x0e,0x90,0x03,0xa4,0x02,0xd9,0x00 } },
+{ 16, 0xb240, 0, {0x16,0x58,0x06,0x90,0x0b,0x64,0x02,0xd9,0x00,0x36,0x40,0x0c,0x90,0x0b,0x28,0x04 } },
+{ 16, 0xb250, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0x84,0x00,0xd9,0x80,0x3e,0x4a } },
+{ 16, 0xb260, 0, {0x0e,0x90,0x03,0x64,0x20,0xf9,0x08,0x3e,0x41,0x0f,0x90,0x03,0xe4,0x00,0xe1,0x08 } },
+{ 16, 0xb270, 0, {0x3e,0x40,0x0f,0x90,0x03,0xc4,0x00,0xe1,0x00,0x38,0x40,0x0f,0x90,0x03,0xca,0x00 } },
+{ 16, 0xb280, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x09,0xf0,0x40,0xb0,0x10 } },
+{ 16, 0xb290, 0, {0x4c,0x00,0x0b,0x20,0x00,0xf8,0x00,0x3a,0x00,0x1c,0x00,0x03,0xe0,0x00,0xc8,0x00 } },
+{ 16, 0xb2a0, 0, {0x36,0x00,0x0c,0x80,0x03,0x20,0x00,0xc8,0x00,0x32,0x00,0x0f,0x80,0x03,0x0a,0x04 } },
+{ 16, 0xb2b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x28,0x00,0x3e,0x88,0x23,0xa2 } },
+{ 16, 0xb2c0, 0, {0x48,0xe0,0x00,0x19,0x80,0xbe,0x88,0x2e,0x80,0x0d,0xa0,0x42,0xe8,0x00,0x8e,0x00 } },
+{ 16, 0xb2d0, 0, {0x23,0x90,0x08,0xa0,0x0a,0x3a,0x00,0xda,0x00,0x36,0x80,0x0b,0xa0,0x0a,0x0a,0x00 } },
+{ 16, 0xb2e0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb3,0x80,0x20,0xe0 } },
+{ 16, 0xb2f0, 0, {0x28,0x30,0xc2,0x0f,0x10,0xb3,0x40,0x28,0xc0,0x0b,0x30,0x02,0xec,0x11,0x83,0x40 } },
+{ 16, 0xb300, 0, {0x28,0xd2,0x0a,0x30,0x02,0x0c,0xc0,0x83,0x00,0x20,0xc0,0x0b,0x30,0x02,0x0a,0x00 } },
+{ 16, 0xb310, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1c,0x00,0xb6,0x00,0x21,0xc0 } },
+{ 16, 0xb320, 0, {0x08,0x20,0xc2,0x1c,0x10,0xb5,0x00,0x2d,0xc8,0x0a,0x72,0x02,0xdc,0x40,0x85,0x08 } },
+{ 16, 0xb330, 0, {0x29,0xa2,0x1a,0x72,0x22,0x0c,0x00,0x93,0x30,0x05,0xc4,0x0b,0x32,0x22,0x28,0x00 } },
+{ 16, 0xb340, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x16,0x00,0xb2,0x80,0x31,0x20 } },
+{ 16, 0xb350, 0, {0x0c,0x58,0x03,0x1e,0x00,0xf7,0x80,0x39,0xf8,0x0b,0x7c,0x22,0xce,0x40,0xcf,0x80 } },
+{ 16, 0xb360, 0, {0x9b,0x60,0x2e,0x3b,0x03,0x1a,0x00,0xc7,0xa8,0x11,0xe0,0x0f,0x78,0x03,0x2a,0x02 } },
+{ 16, 0xb370, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xa4,0x00,0xfa,0x00,0x3e,0xc0 } },
+{ 16, 0xb380, 0, {0x0f,0x90,0x23,0xe8,0x00,0xfb,0x00,0x3e,0xd0,0x2d,0xb6,0x03,0xed,0x02,0xf9,0x00 } },
+{ 16, 0xb390, 0, {0x32,0x40,0x0d,0xb0,0x07,0xec,0x00,0xfb,0x60,0x3e,0xc8,0x0f,0xb5,0x03,0xc2,0x06 } },
+{ 16, 0xb3a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xff,0x80,0x33,0xa0 } },
+{ 16, 0xb3b0, 0, {0x0c,0xf8,0x0b,0x32,0x40,0xce,0x81,0x37,0xf0,0x0c,0xbc,0x03,0xfe,0x00,0xff,0x84 } },
+{ 16, 0xb3c0, 0, {0x33,0xe0,0x2c,0xf8,0x83,0xe6,0x02,0xcf,0x85,0x33,0xf0,0x0c,0xfc,0x03,0x00,0x14 } },
+{ 16, 0xb3d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x00,0xbe,0x00,0x35,0xc6 } },
+{ 16, 0xb3e0, 0, {0x28,0x30,0x02,0x30,0x40,0x87,0x00,0x23,0xc0,0x08,0x7a,0x02,0xdc,0x00,0xbe,0x00 } },
+{ 16, 0xb3f0, 0, {0x23,0xc0,0x08,0x70,0x12,0xfe,0x00,0x87,0x00,0x21,0xc0,0x08,0xf0,0x02,0x2a,0x04 } },
+{ 16, 0xb400, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x95,0x20,0xb6,0x00,0x20,0x80 } },
+{ 16, 0xb410, 0, {0x08,0x31,0x02,0x5c,0x01,0x87,0x00,0x25,0xc0,0x08,0x72,0x02,0xdc,0x00,0xb6,0x00 } },
+{ 16, 0xb420, 0, {0x21,0xd0,0x09,0x70,0x02,0xd4,0x08,0x93,0x00,0x20,0xc0,0x08,0x70,0x02,0x00,0x00 } },
+{ 16, 0xb430, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xc4,0x00,0xb0,0xe0,0x24,0x60 } },
+{ 16, 0xb440, 0, {0x08,0x20,0x06,0x48,0x01,0x80,0x00,0x20,0xc0,0x08,0x30,0x02,0xcc,0x04,0xb3,0x00 } },
+{ 16, 0xb450, 0, {0x20,0x84,0x0b,0x30,0x02,0xe8,0x00,0x9b,0x00,0x20,0xc0,0x08,0x30,0x02,0x08,0x04 } },
+{ 16, 0xb460, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x00,0xb9,0xe0,0x32,0x80 } },
+{ 16, 0xb470, 0, {0x6c,0xb0,0x23,0x6f,0x00,0xc3,0x00,0x37,0xc1,0x3c,0xf0,0x03,0xfc,0x00,0xfa,0x00 } },
+{ 16, 0xb480, 0, {0xb0,0xc0,0x09,0xf0,0x03,0xec,0x10,0xdf,0x00,0x73,0xc0,0x0c,0xf0,0x0b,0x2a,0x00 } },
+{ 16, 0xb490, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x10,0xf8,0x00,0x3e,0x42 } },
+{ 16, 0xb4a0, 0, {0x0f,0x24,0x03,0xa8,0x60,0xf8,0x00,0x3c,0xc1,0x0f,0xb0,0x03,0xec,0x00,0xf9,0x40 } },
+{ 16, 0xb4b0, 0, {0x3e,0x80,0x04,0xb0,0x23,0xe1,0x00,0xeb,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0xe0,0x00 } },
+{ 16, 0xb4c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf4,0x00,0xee,0x00,0x3d,0x30 } },
+{ 16, 0xb4d0, 0, {0x0c,0xc0,0x03,0x14,0x00,0xcc,0xa0,0xb3,0xc0,0x4c,0x70,0x03,0x5c,0x10,0xdf,0x00 } },
+{ 16, 0xb4e0, 0, {0x3f,0x00,0x0c,0xf0,0x03,0xf8,0x00,0xcf,0x00,0x23,0xc0,0x0c,0xf0,0x03,0x00,0x40 } },
+{ 16, 0xb4f0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x64,0x00,0xba,0x81,0x2e,0x58 } },
+{ 16, 0xb500, 0, {0x08,0x88,0x02,0x27,0x80,0x89,0x20,0x22,0xc0,0x28,0xb0,0x02,0x2c,0x00,0x88,0x83 } },
+{ 16, 0xb510, 0, {0x2e,0x20,0x05,0xb0,0x62,0xe3,0x00,0x8b,0x00,0x2a,0xc0,0x08,0xb0,0x03,0x60,0x40 } },
+{ 16, 0xb520, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x26,0x00,0xb9,0x81,0x2e,0x40 } },
+{ 16, 0xb530, 0, {0x08,0x8c,0x06,0x26,0x00,0x88,0x00,0x22,0xc0,0x08,0xb0,0x16,0x6c,0x00,0x98,0x88 } },
+{ 16, 0xb540, 0, {0x2e,0x20,0x08,0xb0,0x04,0xe3,0x01,0x0b,0x00,0x28,0xc0,0x08,0x30,0x02,0x20,0x00 } },
+{ 16, 0xb550, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x00,0xb0,0x00,0x2c,0xc0 } },
+{ 16, 0xb560, 0, {0x28,0x00,0x0e,0x00,0x10,0x80,0x00,0x20,0xc0,0x08,0x32,0x02,0x0c,0x00,0x80,0x04 } },
+{ 16, 0xb570, 0, {0x2e,0x20,0x09,0x30,0x02,0xc4,0x12,0x83,0x00,0x28,0xc0,0x08,0x30,0x02,0x42,0x01 } },
+{ 16, 0xb580, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xfa,0x00,0x3e,0x00 } },
+{ 16, 0xb590, 0, {0x2c,0x91,0x03,0x20,0x00,0x8a,0x00,0x33,0xc0,0x0c,0xf0,0x03,0x7c,0x00,0xd8,0x00 } },
+{ 16, 0xb5a0, 0, {0x2e,0x40,0x0c,0xf0,0x03,0xe0,0x80,0xcf,0x00,0x3b,0xc0,0x0c,0xf0,0x03,0x00,0x03 } },
+{ 16, 0xb5b0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xfc,0x00,0xfc,0x01,0x3f,0x40 } },
+{ 16, 0xb5c0, 0, {0x0f,0xc0,0x13,0xf0,0x00,0xf4,0x00,0x3f,0xc1,0x0f,0xf4,0x23,0xfc,0x08,0xfc,0x00 } },
+{ 16, 0xb5d0, 0, {0x3f,0x00,0x0f,0xf0,0x03,0xf0,0x40,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xe8,0x06 } },
+{ 16, 0xb5e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x20,0xcd,0x10,0x39,0xc8 } },
+{ 16, 0xb5f0, 0, {0x0d,0xc1,0x03,0x3c,0x80,0xef,0x90,0x23,0xd8,0x0f,0xf8,0x00,0xfe,0x00,0xcf,0x80 } },
+{ 16, 0xb600, 0, {0x1f,0xd0,0x0f,0xf9,0x03,0xff,0x00,0xe7,0xc0,0x33,0xc4,0x0f,0xf0,0x03,0xb0,0x00 } },
+{ 16, 0xb610, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x10,0xfe,0x02,0x89,0x40,0x23,0xf0 } },
+{ 16, 0xb620, 0, {0x08,0x85,0x10,0x3c,0x00,0x8b,0x00,0xa3,0xdc,0x4b,0xb2,0x82,0xec,0x20,0x8b,0x00 } },
+{ 16, 0xb630, 0, {0x26,0xc0,0x4b,0xb0,0x02,0xec,0x10,0xb9,0x04,0x2a,0xc9,0x0b,0xb5,0x80,0xf0,0x04 } },
+{ 16, 0xb640, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0xcc,0x00,0x81,0x64,0x28,0xc4 } },
+{ 16, 0xb650, 0, {0x09,0xb2,0x0a,0x0c,0xf0,0xa3,0x20,0x20,0xc8,0x0b,0x32,0x02,0xec,0x02,0x83,0x08 } },
+{ 16, 0xb660, 0, {0x2c,0xc8,0x09,0x32,0x02,0xcc,0x80,0xab,0xa0,0x20,0xc8,0x0b,0x32,0x00,0xb2,0x01 } },
+{ 16, 0xb670, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xac,0x10,0x89,0x00,0x22,0xc0 } },
+{ 16, 0xb680, 0, {0x08,0xb2,0x12,0x2c,0x02,0x0b,0x00,0x22,0xc0,0x0b,0xb8,0x02,0xec,0x00,0x8b,0x00 } },
+{ 16, 0xb690, 0, {0x26,0xc0,0x4b,0xb0,0x46,0xec,0x00,0xb9,0x00,0x0a,0xc0,0x0b,0xb0,0x02,0xf0,0x04 } },
+{ 16, 0xb6a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x15,0xec,0x10,0xc9,0xe0,0x3a,0xc0 } },
+{ 16, 0xb6b0, 0, {0x0d,0x28,0x03,0x2c,0x00,0xeb,0x10,0x32,0xc0,0x0f,0x82,0x03,0xc4,0x00,0xcb,0x00 } },
+{ 16, 0xb6c0, 0, {0x3e,0xc1,0x0f,0xb0,0x06,0xec,0x08,0xe9,0x00,0xb2,0xc0,0x0f,0xb0,0x13,0x90,0x04 } },
+{ 16, 0xb6d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x9c,0x00,0xf5,0xa0,0x3f,0xc0 } },
+{ 16, 0xb6e0, 0, {0x0f,0xe8,0x03,0xfc,0x08,0xff,0x00,0x3f,0xc0,0x8f,0xc0,0x03,0xfc,0x00,0xff,0x00 } },
+{ 16, 0xb6f0, 0, {0x37,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xff,0x04,0x3e,0xc0,0x0f,0xf0,0x03,0xf8,0x00 } },
+{ 16, 0xb700, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x10,0xac,0x00,0xf9,0x40,0x34,0xc0 } },
+{ 16, 0xb710, 0, {0x0d,0xb4,0x03,0x2c,0x00,0xdb,0x40,0x3e,0xc0,0x2c,0x80,0x03,0x64,0x08,0xfb,0x10 } },
+{ 16, 0xb720, 0, {0x3e,0xc6,0x8f,0xb0,0x03,0xec,0x00,0xf9,0x80,0x32,0xc0,0x0c,0xb0,0x0b,0x14,0x04 } },
+{ 16, 0xb730, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x3e,0x20,0xe9,0xc8,0x37,0xd4 } },
+{ 16, 0xb740, 0, {0x48,0xaa,0x22,0x1c,0x00,0x8b,0x00,0x6f,0xe0,0x08,0x85,0x82,0xed,0x40,0xbb,0x84 } },
+{ 16, 0xb750, 0, {0x2f,0xc0,0x4b,0xb8,0x03,0xad,0x40,0xb3,0x00,0x23,0xd4,0x08,0xf7,0x02,0x32,0x00 } },
+{ 16, 0xb760, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x4c,0x00,0xb1,0x64,0xa4,0xc0 } },
+{ 16, 0xb770, 0, {0x09,0x20,0x0a,0x0c,0x04,0xb8,0x00,0x6c,0xc0,0x08,0x38,0x02,0xc8,0x40,0xb3,0x80 } },
+{ 16, 0xb780, 0, {0x2c,0xd1,0x0b,0x30,0x02,0xcc,0x04,0xb3,0x00,0x28,0xc0,0x08,0x30,0x02,0x3a,0x00 } },
+{ 16, 0xb790, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x01,0x1e,0x00,0xa5,0x80,0x25,0xe0 } },
+{ 16, 0xb7a0, 0, {0x88,0x3a,0x12,0x1e,0x00,0xa6,0x90,0x2d,0xe2,0x08,0x79,0x02,0xda,0x00,0xb7,0x82 } },
+{ 16, 0xb7b0, 0, {0x2d,0xe0,0x03,0x78,0x82,0x9e,0x00,0xbc,0xc1,0x29,0xe0,0x08,0x78,0x02,0x2c,0x10 } },
+{ 16, 0xb7c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x08,0x0c,0x00,0xf3,0x00,0x34,0xc0 } },
+{ 16, 0xb7d0, 0, {0x0d,0x3e,0x03,0x0c,0x00,0xf0,0x40,0x2e,0xc0,0x0c,0x30,0x43,0xc8,0x00,0xf3,0x00 } },
+{ 16, 0xb7e0, 0, {0x3c,0xc0,0x07,0x30,0x03,0xcc,0x80,0xf2,0x00,0x38,0xc0,0x0c,0x30,0x03,0x12,0x02 } },
+{ 16, 0xb7f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x19,0xbd,0x20,0xf7,0x00,0x3f,0xc2 } },
+{ 16, 0xb800, 0, {0x0f,0xf1,0x0b,0xdc,0x20,0xde,0x04,0x3f,0xd2,0x07,0xf0,0x13,0xf8,0x40,0xff,0x00 } },
+{ 16, 0xb810, 0, {0x3f,0xc0,0x07,0xf0,0x03,0xfc,0x00,0xfd,0x00,0x37,0xc0,0x0f,0x70,0x03,0xd0,0x06 } },
+{ 16, 0xb820, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x05,0xcf,0x00,0xdc,0x00,0x3e,0xca } },
+{ 16, 0xb830, 0, {0x0f,0xa0,0x00,0xac,0x92,0xc9,0x00,0x32,0xc0,0x0f,0xb0,0x11,0xa4,0x08,0xfb,0x00 } },
+{ 16, 0xb840, 0, {0x2e,0xc0,0x4f,0xb0,0x23,0xec,0x00,0xf9,0x00,0x3e,0xc4,0x0f,0xb0,0x03,0xea,0x00 } },
+{ 16, 0xb850, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x91,0x9c,0x00,0x84,0x00,0x01,0xc0 } },
+{ 16, 0xb860, 0, {0x4b,0x70,0x22,0x1c,0xc0,0x87,0x00,0x21,0xc0,0x4b,0x70,0x02,0x1c,0x00,0xb7,0x01 } },
+{ 16, 0xb870, 0, {0x25,0xd8,0x0b,0x70,0x22,0xdc,0x00,0xb6,0x00,0x2d,0xc0,0x0b,0x72,0x22,0xf2,0x04 } },
+{ 16, 0xb880, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x9e,0x80,0x97,0x80,0xa9,0xe0 } },
+{ 16, 0xb890, 0, {0x0b,0xf8,0x02,0xce,0x08,0x85,0x80,0x29,0xe8,0x0b,0xfc,0x02,0x17,0x00,0xb7,0x80 } },
+{ 16, 0xb8a0, 0, {0x2d,0xe0,0x8b,0x78,0x02,0xde,0x00,0xb4,0xc0,0x2d,0xe8,0x0b,0x79,0x02,0xe0,0x00 } },
+{ 16, 0xb8b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x00,0x83,0x08,0xa0,0xc0 } },
+{ 16, 0xb8c0, 0, {0x8b,0x3c,0x02,0x4c,0x00,0x83,0x00,0xa0,0xc0,0x1b,0x3c,0x0a,0x0f,0x29,0xb3,0x00 } },
+{ 16, 0xb8d0, 0, {0x24,0xc0,0x0b,0x30,0x02,0xcc,0x00,0xb3,0x80,0x2c,0xc0,0x0b,0x30,0x02,0xd2,0x04 } },
+{ 16, 0xb8e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xde,0x00,0x3a,0x80 } },
+{ 16, 0xb8f0, 0, {0x0f,0xea,0x02,0xe8,0x00,0xce,0x00,0x3a,0x80,0x0f,0xe0,0x03,0x38,0x00,0xfa,0x00 } },
+{ 16, 0xb900, 0, {0x3e,0x80,0x0f,0xa0,0x03,0xe8,0x00,0xfe,0x00,0x3e,0x80,0x0b,0xa0,0x03,0xfa,0x04 } },
+{ 16, 0xb910, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x00,0xf8,0x04,0xba,0x01 } },
+{ 16, 0xb920, 0, {0x0f,0x82,0x0b,0x80,0x04,0xf8,0x80,0x3e,0x00,0x0f,0x86,0x03,0x60,0x00,0xf8,0x00 } },
+{ 16, 0xb930, 0, {0x36,0x00,0x0f,0x80,0x23,0xe1,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0xb940, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x01,0xf9,0x00,0x32,0x40 } },
+{ 16, 0xb950, 0, {0x0f,0x90,0x03,0xe4,0x00,0x49,0x00,0x32,0x40,0x0b,0x90,0x03,0x24,0x00,0x49,0x00 } },
+{ 16, 0xb960, 0, {0x3c,0x40,0x0d,0x90,0x03,0xe4,0x08,0xc9,0x00,0x3e,0x60,0x0c,0x90,0x03,0x02,0x04 } },
+{ 16, 0xb970, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x00,0xb9,0x40,0xa2,0x64 } },
+{ 16, 0xb980, 0, {0x0b,0x18,0x02,0x25,0x00,0xd1,0x50,0x36,0x50,0x4e,0x90,0x0a,0x24,0x02,0x89,0x40 } },
+{ 16, 0xb990, 0, {0x3a,0x51,0x08,0x94,0x02,0xe5,0x22,0x89,0x44,0x2e,0x60,0x28,0x90,0x0a,0x20,0x00 } },
+{ 16, 0xb9a0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x00,0xb1,0x08,0x22,0x40 } },
+{ 16, 0xb9b0, 0, {0x4b,0x92,0x82,0xa5,0x00,0xa9,0x08,0x22,0x50,0x0a,0x10,0x02,0x0c,0x00,0xa9,0x40 } },
+{ 16, 0xb9c0, 0, {0x6e,0x50,0x0b,0x94,0x02,0xc4,0x04,0x89,0x44,0x6c,0x48,0x88,0x10,0x02,0x46,0x00 } },
+{ 16, 0xb9d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0xb1,0x40,0xe0,0x40 } },
+{ 16, 0xb9e0, 0, {0x1b,0x14,0x0a,0x04,0x00,0xb9,0x00,0x24,0x40,0x1a,0x10,0x22,0x04,0x00,0xa1,0x00 } },
+{ 16, 0xb9f0, 0, {0x28,0x40,0x0a,0x10,0x12,0xc4,0x00,0x81,0x02,0x6c,0x40,0x08,0x12,0x02,0x42,0x01 } },
+{ 16, 0xba00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x08,0xb0,0x00,0x32,0x00 } },
+{ 16, 0xba10, 0, {0x4f,0x80,0x02,0xa1,0x50,0xe0,0x50,0x32,0x14,0x0e,0xa5,0x23,0x21,0x40,0xe8,0x50 } },
+{ 16, 0xba20, 0, {0x3e,0x14,0x0f,0x85,0x03,0xe1,0x40,0xc8,0x50,0x1e,0x14,0x0c,0x85,0x43,0x6e,0x03 } },
+{ 16, 0xba30, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x19,0xe5,0x00,0xfd,0x40,0x3e,0x50 } },
+{ 16, 0xba40, 0, {0x0f,0x74,0x03,0xa5,0x00,0x5d,0x00,0x3e,0x50,0x0a,0x50,0x13,0xf4,0x00,0xd9,0x00 } },
+{ 16, 0xba50, 0, {0x3a,0x50,0x0d,0x90,0x13,0xe4,0x00,0xff,0x00,0x3e,0x50,0x0f,0x91,0x03,0xa6,0x06 } },
+{ 16, 0xba60, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x90,0xbd,0xe8,0x23,0x6b } },
+{ 16, 0xba70, 0, {0x0b,0xda,0x0b,0x36,0x80,0xc9,0x00,0x32,0x68,0x46,0x90,0x43,0xe4,0x00,0x49,0x00 } },
+{ 16, 0xba80, 0, {0x32,0x68,0x0c,0x90,0x03,0x24,0x40,0xf9,0x00,0x32,0x60,0x0c,0x9c,0x03,0xc6,0x01 } },
+{ 16, 0xba90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x10,0xe1,0x00,0xb8,0xe0,0xa2,0x11 } },
+{ 16, 0xbaa0, 0, {0x0b,0x8e,0x0a,0x23,0x22,0x88,0x80,0x2a,0x31,0x28,0x88,0x02,0x62,0x00,0x88,0x80 } },
+{ 16, 0xbab0, 0, {0xa2,0x30,0x28,0x88,0x8a,0x22,0x00,0xb8,0xa8,0xa2,0x39,0x08,0xca,0x02,0xce,0x04 } },
+{ 16, 0xbac0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc5,0x08,0x21,0x00,0x00,0x40 } },
+{ 16, 0xbad0, 0, {0x03,0x14,0x82,0x85,0x80,0xad,0x08,0x21,0x52,0x98,0x50,0x82,0x34,0x23,0x85,0x08 } },
+{ 16, 0xbae0, 0, {0x21,0x52,0x08,0x50,0x06,0x54,0x00,0xb5,0x20,0x21,0x5a,0x09,0x54,0x02,0xd2,0x01 } },
+{ 16, 0xbaf0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xa4,0x00,0xb9,0x61,0x22,0x40 } },
+{ 16, 0xbb00, 0, {0x0b,0x90,0x06,0x04,0x00,0xad,0x00,0x69,0x40,0x08,0xd0,0x02,0x74,0x00,0x85,0x00 } },
+{ 16, 0xbb10, 0, {0x01,0x40,0x00,0x70,0x06,0x74,0x04,0xb5,0x00,0x23,0x40,0x09,0xd0,0x02,0xc6,0x04 } },
+{ 16, 0xbb20, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x14,0xa4,0x00,0xe9,0x00,0x32,0x40 } },
+{ 16, 0xbb30, 0, {0x4f,0x95,0x0b,0xa4,0x00,0xe9,0x00,0x32,0x40,0x8c,0x90,0x03,0x24,0x00,0xc9,0x00 } },
+{ 16, 0xbb40, 0, {0x32,0x40,0x0c,0x90,0x03,0x64,0x08,0xf9,0x00,0x32,0x40,0x3d,0x90,0x03,0xe8,0x04 } },
+{ 16, 0xbb50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x01,0xa4,0x08,0xf9,0x00,0x3e,0x40 } },
+{ 16, 0xbb60, 0, {0x4f,0x90,0x8b,0xe4,0x04,0xd9,0x01,0x3e,0x40,0x0d,0x90,0x03,0x64,0x00,0xd9,0x01 } },
+{ 16, 0xbb70, 0, {0x3e,0x40,0x0f,0x90,0x03,0xa4,0x00,0xf9,0x00,0x3c,0x40,0x0e,0x90,0x03,0xda,0x00 } },
+{ 16, 0xbb80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x40,0x36,0x20 } },
+{ 16, 0xbb90, 0, {0x17,0x84,0x03,0x20,0x21,0xc8,0x00,0x7e,0x02,0x2c,0x80,0x43,0x20,0x00,0xe8,0x02 } },
+{ 16, 0xbba0, 0, {0x3e,0x01,0x0f,0x80,0x03,0xe0,0x00,0xc8,0x40,0x1e,0x00,0x0f,0x80,0x03,0xca,0x04 } },
+{ 16, 0xbbb0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x2a,0x88,0xb6,0x02,0x23,0xa0 } },
+{ 16, 0xbbc0, 0, {0x0b,0xec,0x42,0x2b,0x00,0xd2,0x80,0x6e,0xb1,0x08,0xa0,0x22,0x08,0x00,0xea,0x04 } },
+{ 16, 0xbbd0, 0, {0x3a,0x80,0x9f,0xa0,0x03,0xa8,0x00,0x8a,0x04,0x2e,0x80,0x0b,0xa8,0x02,0xca,0x00 } },
+{ 16, 0xbbe0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb2,0x00,0xa4,0xe1 } },
+{ 16, 0xbbf0, 0, {0x8b,0xb4,0x32,0x47,0x45,0x83,0x90,0x2c,0xf4,0x4b,0x38,0x12,0x0e,0x44,0xa3,0x01 } },
+{ 16, 0xbc00, 0, {0x2c,0xc0,0x4b,0x30,0x02,0xce,0x00,0x93,0x00,0x6c,0xc0,0x0b,0x38,0x02,0xca,0x00 } },
+{ 16, 0xbc10, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1c,0x00,0xb7,0x44,0x21,0xc2 } },
+{ 16, 0xbc20, 0, {0x0b,0x54,0x02,0x54,0x05,0x87,0x00,0x2c,0x40,0x9b,0x6c,0x02,0x18,0x10,0xa7,0x04 } },
+{ 16, 0xbc30, 0, {0x29,0xc0,0x0a,0x70,0x02,0x9b,0x00,0x97,0x04,0x0d,0x80,0x0b,0x60,0x82,0xe8,0x00 } },
+{ 16, 0xbc40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xf3,0x80,0x35,0xe0 } },
+{ 16, 0xbc50, 0, {0x0b,0x38,0x02,0x52,0x10,0x84,0x80,0x2d,0xa0,0x0f,0xf8,0x0b,0x1e,0x00,0xe6,0x80 } },
+{ 16, 0xbc60, 0, {0x1d,0xa0,0x0b,0x68,0x03,0xfe,0x02,0xd6,0x80,0x3d,0xe0,0x0f,0x78,0x03,0xea,0x02 } },
+{ 16, 0xbc70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x1d,0xac,0x00,0xfb,0x00,0x3e,0xc1 } },
+{ 16, 0xbc80, 0, {0x8b,0x90,0x0b,0x80,0x0a,0xb8,0x01,0x2e,0x00,0x0c,0xb0,0x03,0xe8,0x00,0xfa,0x00 } },
+{ 16, 0xbc90, 0, {0x3e,0xc0,0x0f,0xa0,0x43,0xec,0x00,0xeb,0x00,0x3e,0x80,0x0f,0xa6,0x23,0xc2,0x02 } },
+{ 16, 0xbca0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xfe,0x80,0x33,0x20 } },
+{ 16, 0xbcb0, 0, {0x4e,0xc9,0x12,0xf6,0x50,0xef,0x90,0x3f,0xe0,0x0c,0x19,0x00,0xb6,0x42,0xcf,0x21 } },
+{ 16, 0xbcc0, 0, {0x3f,0xe0,0x0e,0xf9,0x02,0xe6,0xc0,0xff,0x80,0x3f,0xe0,0x4c,0xdc,0x03,0x40,0x00 } },
+{ 16, 0xbcd0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x11,0x94,0x00,0xb7,0x00,0x81,0x40 } },
+{ 16, 0xbce0, 0, {0x08,0x03,0x02,0x14,0xc4,0x87,0x01,0x2d,0xc8,0x08,0x6a,0x12,0x38,0x40,0x87,0x02 } },
+{ 16, 0xbcf0, 0, {0x2d,0xc0,0x08,0x71,0x12,0xd2,0x80,0xb7,0x00,0x2d,0x80,0x08,0x60,0x02,0x2a,0x04 } },
+{ 16, 0xbd00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xb7,0x10,0x21,0x80 } },
+{ 16, 0xbd10, 0, {0x08,0xf4,0x12,0x94,0x04,0xa6,0x00,0x2c,0xc0,0x18,0xd2,0x02,0x14,0x48,0x86,0x10 } },
+{ 16, 0xbd20, 0, {0x2d,0x80,0x0a,0x61,0x32,0xd4,0x00,0xb6,0x18,0x2d,0xc4,0x08,0x58,0x02,0x00,0x10 } },
+{ 16, 0xbd30, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xc4,0x00,0xb3,0x00,0x20,0xc0 } },
+{ 16, 0xbd40, 0, {0x40,0xb0,0x22,0x04,0x00,0x82,0x81,0x0c,0xc0,0x08,0x30,0x0a,0x0a,0x00,0x8a,0x00 } },
+{ 16, 0xbd50, 0, {0x2e,0xc0,0x08,0xa0,0x02,0xc4,0x00,0xbb,0x00,0x2e,0x80,0x08,0x20,0x02,0x08,0x04 } },
+{ 16, 0xbd60, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x00,0xfb,0x00,0xa0,0xc0 } },
+{ 16, 0xbd70, 0, {0x24,0x94,0x23,0xac,0x10,0xeb,0xa0,0x0e,0xc0,0x0c,0xb0,0x02,0x2e,0x20,0xc9,0x00 } },
+{ 16, 0xbd80, 0, {0x2e,0x40,0x0e,0x90,0x03,0xec,0x00,0xf9,0x80,0x3e,0x40,0x6c,0xa0,0x0b,0x2a,0x04 } },
+{ 16, 0xbd90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xcc,0x00,0xfb,0x00,0x3e,0xc0 } },
+{ 16, 0xbda0, 0, {0x89,0x90,0x03,0x2c,0x00,0xfb,0x02,0x3e,0x40,0x4f,0xa0,0x03,0x6d,0x01,0xfb,0x41 } },
+{ 16, 0xbdb0, 0, {0x3e,0xc0,0x8f,0xb4,0x03,0xe8,0x00,0xfb,0x20,0x3e,0x50,0x0f,0xa4,0x03,0xe0,0x00 } },
+{ 16, 0xbdc0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xc3,0x20,0xb2,0xc0 } },
+{ 16, 0xbdd0, 0, {0x0d,0xd0,0x03,0x38,0x00,0xcd,0x00,0x3f,0x80,0x0d,0xf0,0x03,0xfc,0x00,0xfd,0x02 } },
+{ 16, 0xbde0, 0, {0x36,0x00,0x0c,0xd0,0x03,0x3f,0x08,0xfc,0x04,0x12,0xc0,0x0c,0xa0,0x03,0xc0,0x44 } },
+{ 16, 0xbdf0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x6c,0x02,0x8b,0xc8,0x22,0xc0 } },
+{ 16, 0xbe00, 0, {0x08,0x98,0x0a,0x2a,0x40,0x89,0x20,0x2e,0x01,0x8e,0xb0,0x12,0xec,0x80,0xbb,0xf0 } },
+{ 16, 0xbe10, 0, {0x22,0xe5,0x08,0xbd,0x02,0x2e,0x00,0xbb,0x90,0x22,0xed,0x08,0xa2,0x02,0xe0,0x00 } },
+{ 16, 0xbe20, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x8b,0x01,0x22,0x00 } },
+{ 16, 0xbe30, 0, {0x49,0xa8,0x1e,0x04,0x00,0x8b,0x01,0x2e,0xc0,0x49,0x90,0x02,0xe4,0x00,0xb9,0x00 } },
+{ 16, 0xbe40, 0, {0x22,0x40,0x0a,0x90,0x02,0x2c,0x00,0xb9,0x00,0x2a,0x40,0x08,0x80,0x02,0xe0,0x00 } },
+{ 16, 0xbe50, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x00,0x81,0x00,0x20,0x40 } },
+{ 16, 0xbe60, 0, {0x08,0x20,0x02,0x04,0x00,0x83,0x00,0x2c,0xc0,0x0a,0x20,0x42,0xcc,0x00,0xb3,0x00 } },
+{ 16, 0xbe70, 0, {0x20,0xc0,0x02,0x30,0x02,0x08,0x84,0xb3,0x04,0x08,0x40,0x08,0x20,0x02,0xc2,0x11 } },
+{ 16, 0xbe80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0x8b,0x00,0xb2,0x80 } },
+{ 16, 0xbe90, 0, {0x0d,0xb1,0x03,0x24,0x02,0xcb,0x01,0x3e,0xc0,0x4d,0x90,0x43,0xe4,0x00,0xf9,0x00 } },
+{ 16, 0xbea0, 0, {0xb2,0x00,0x2e,0x90,0x0b,0x2c,0x80,0xf8,0x00,0xba,0xc0,0x2c,0x80,0x03,0xc0,0x03 } },
+{ 16, 0xbeb0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xf4,0x00,0x7d,0x00,0x3f,0xc0 } },
+{ 16, 0xbec0, 0, {0x0f,0x72,0x03,0xd4,0x00,0xff,0x00,0x3f,0xc0,0x0e,0xf1,0x47,0xfc,0x00,0xff,0x00 } },
+{ 16, 0xbed0, 0, {0x3b,0xc0,0x0d,0xf0,0x13,0xfc,0x50,0xff,0x00,0x37,0xc0,0x0f,0xe0,0x03,0xe8,0x06 } },
+{ 16, 0xbee0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf0,0xc4,0xcc,0x33,0x3f,0x04 } },
+{ 16, 0xbef0, 0, {0x2c,0xf6,0x03,0x38,0x60,0xcc,0x90,0xb3,0x20,0x0f,0xf1,0x23,0xf0,0x60,0xff,0x01 } },
+{ 16, 0xbf00, 0, {0x23,0xc8,0x0c,0xf2,0x8a,0x3c,0x81,0xdf,0x30,0x3f,0x64,0x0c,0xd8,0x03,0x30,0x04 } },
+{ 16, 0xbf10, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xe0,0xc2,0x8a,0x30,0x2e,0x18 } },
+{ 16, 0xbf20, 0, {0x08,0xf5,0x30,0xa5,0x94,0x58,0x22,0x22,0x21,0x4b,0xf3,0x02,0xe1,0x00,0x9f,0x70 } },
+{ 16, 0xbf30, 0, {0x2b,0xe4,0x0a,0xf4,0x12,0x1d,0x40,0xaf,0x72,0x2c,0x49,0x2f,0x30,0x82,0xa0,0x06 } },
+{ 16, 0xbf40, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc4,0x80,0x80,0xa0,0x2c,0x98 } },
+{ 16, 0xbf50, 0, {0x08,0x32,0x22,0x08,0x00,0x82,0x00,0x28,0x00,0x03,0x32,0x02,0xc0,0x84,0xb3,0x0c } },
+{ 16, 0xbf60, 0, {0x20,0xc0,0x58,0x32,0x92,0x8c,0x30,0xa3,0x20,0x2e,0xc0,0x48,0x12,0x42,0x62,0x01 } },
+{ 16, 0xbf70, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xa8,0x00,0x8b,0x00,0x2e,0x20 } },
+{ 16, 0xbf80, 0, {0x08,0xb0,0x0a,0x20,0x01,0x98,0x00,0x2a,0x22,0x0b,0xb0,0x02,0xe6,0x00,0x9b,0x00 } },
+{ 16, 0xbf90, 0, {0x22,0xc0,0x0a,0xb0,0x12,0xac,0x04,0xab,0x00,0x2e,0xc0,0x03,0xb0,0x02,0xf0,0x00 } },
+{ 16, 0xbfa0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0xe5,0x00,0xc8,0x00,0x3e,0xb0 } },
+{ 16, 0xbfb0, 0, {0x0c,0xb0,0x03,0x29,0x00,0xc8,0x00,0x3a,0x20,0x4f,0xb0,0x03,0xe2,0x20,0xfb,0x01 } },
+{ 16, 0xbfc0, 0, {0xb0,0xc0,0x0c,0xb0,0x03,0x2c,0x00,0xfb,0x02,0x3c,0x41,0x0c,0x90,0x43,0x48,0x04 } },
+{ 16, 0xbfd0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xa2,0x80,0xfe,0x40,0x3e,0x00 } },
+{ 16, 0xbfe0, 0, {0x0f,0xf0,0x63,0xec,0x00,0xbf,0xc4,0x17,0x42,0x0f,0xf0,0x03,0xec,0x00,0xff,0x00 } },
+{ 16, 0xbff0, 0, {0x1f,0xc1,0x0f,0xb0,0x03,0x5c,0x00,0xfb,0x00,0x3f,0x40,0x4f,0xf0,0x00,0xb8,0x00 } },
+{ 16, 0xc000, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa5,0x02,0xc8,0x00,0x3e,0x90 } },
+{ 16, 0xc010, 0, {0x2c,0xb0,0x0b,0x01,0x06,0xcb,0x01,0x3e,0x50,0x5f,0xb0,0x13,0x21,0x10,0xcb,0x00 } },
+{ 16, 0xc020, 0, {0x7e,0xc0,0x0c,0xb0,0x0b,0x2c,0x00,0xcb,0x00,0x32,0xc0,0x0c,0x90,0x03,0x10,0x04 } },
+{ 16, 0xc030, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x28,0x01,0x8b,0xd0,0x2c,0x34 } },
+{ 16, 0xc040, 0, {0x48,0xff,0x02,0x30,0x00,0xaa,0x04,0x2e,0x69,0x0f,0xf0,0x03,0x68,0x10,0xdf,0x00 } },
+{ 16, 0xc050, 0, {0x2f,0xd4,0x0d,0xf0,0x02,0x3e,0x00,0x5f,0x04,0xb6,0xc0,0x08,0xb0,0x03,0x72,0x00 } },
+{ 16, 0xc060, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x69,0x90,0x81,0x80,0x2c,0x00 } },
+{ 16, 0xc070, 0, {0x48,0xb8,0x02,0x08,0x09,0x99,0x00,0x4c,0xb0,0x0b,0x30,0x02,0x0c,0x00,0x8b,0x00 } },
+{ 16, 0xc080, 0, {0x2c,0xc0,0x09,0xb0,0x40,0x0c,0x40,0x83,0x00,0x00,0x40,0x0a,0x90,0x02,0x30,0x00 } },
+{ 16, 0xc090, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x16,0x00,0x84,0x88,0x2d,0xe4 } },
+{ 16, 0xc0a0, 0, {0x48,0x39,0x02,0x16,0x00,0xb4,0x80,0x2d,0xe0,0x0a,0x7b,0x06,0x5e,0x00,0x97,0x80 } },
+{ 16, 0xc0b0, 0, {0x2d,0xe2,0x09,0x78,0x02,0x1e,0x90,0x97,0x80,0x25,0x64,0x8a,0x78,0x02,0x48,0x00 } },
+{ 16, 0xc0c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0d,0x00,0x81,0x10,0x2c,0x96 } },
+{ 16, 0xc0d0, 0, {0x08,0x31,0x23,0x0c,0x00,0x90,0x20,0x3c,0xc4,0x1b,0xb8,0x02,0x08,0x40,0xc3,0x00 } },
+{ 16, 0xc0e0, 0, {0x2c,0xc4,0x0d,0x30,0x03,0x0e,0x40,0xc3,0x10,0x30,0xc0,0x4e,0x10,0x07,0x1a,0x12 } },
+{ 16, 0xc0f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xbc,0x00,0x7d,0x05,0x3f,0xc5 } },
+{ 16, 0xc100, 0, {0x0f,0xb1,0x0b,0xf4,0x00,0xef,0x00,0x1f,0x45,0x0f,0xf0,0x43,0xfc,0x01,0xff,0x40 } },
+{ 16, 0xc110, 0, {0x3d,0xc4,0x1f,0xf0,0x06,0xfc,0x10,0xff,0x00,0x3b,0xc1,0x2d,0xf1,0x03,0xd0,0x06 } },
+{ 16, 0xc120, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x04,0xcb,0x04,0x3e,0xa0 } },
+{ 16, 0xc130, 0, {0x44,0xb6,0x03,0x28,0x04,0xcb,0x80,0x32,0x80,0x0f,0xb3,0x93,0x60,0x08,0xfb,0x20 } },
+{ 16, 0xc140, 0, {0x3e,0xd2,0x1f,0xb3,0x03,0x2d,0x80,0xfb,0x61,0x7e,0x40,0x8c,0x98,0x03,0x2a,0x00 } },
+{ 16, 0xc150, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x84,0x0c,0x86,0x05,0x2d,0xc0 } },
+{ 16, 0xc160, 0, {0x08,0xf4,0x82,0x8c,0x90,0x85,0x00,0xa1,0xc0,0x0b,0xf0,0x02,0x5c,0x00,0x37,0x00 } },
+{ 16, 0xc170, 0, {0x2d,0xd0,0x0b,0x71,0x02,0x1c,0xc8,0xb7,0x48,0x2d,0x40,0x0a,0x70,0x02,0x12,0x04 } },
+{ 16, 0xc180, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0x87,0x80,0x2d,0xa1 } },
+{ 16, 0xc190, 0, {0x60,0x78,0x4a,0x16,0xd0,0xa7,0x80,0x29,0xe0,0x0b,0x78,0x52,0x96,0x01,0xb7,0x90 } },
+{ 16, 0xc1a0, 0, {0x2d,0xe8,0x0b,0x7a,0x22,0x5e,0x40,0xb7,0xa0,0x2f,0xe1,0x48,0x50,0x22,0x30,0x00 } },
+{ 16, 0xc1b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x10,0x83,0x84,0x2c,0xc0 } },
+{ 16, 0xc1c0, 0, {0x08,0x30,0x02,0xa4,0x10,0x83,0xcb,0x28,0xe0,0x0b,0x30,0x2a,0x4f,0x40,0x93,0x00 } },
+{ 16, 0xc1d0, 0, {0x2c,0xc0,0x0b,0x30,0x02,0x4c,0x10,0xb3,0x02,0x2c,0xc0,0xaa,0x30,0x02,0x12,0x04 } },
+{ 16, 0xc1e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x00,0xce,0xa0,0x3f,0x80 } },
+{ 16, 0xc1f0, 0, {0x4c,0xa0,0x2b,0x3a,0x00,0xce,0x40,0x3b,0xb8,0x0f,0xa0,0x03,0xb9,0x00,0xba,0x00 } },
+{ 16, 0xc200, 0, {0x3e,0x80,0x0f,0xa0,0x03,0x68,0x00,0xfa,0x00,0x7e,0x80,0x1c,0xa0,0x0b,0x3a,0x04 } },
+{ 16, 0xc210, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x02,0xf8,0x00,0x3e,0x04 } },
+{ 16, 0xc220, 0, {0x8f,0x00,0x03,0xe0,0x4a,0xf8,0x10,0x26,0x18,0x0f,0x80,0x03,0xa0,0x80,0xf8,0x02 } },
+{ 16, 0xc230, 0, {0x3e,0x00,0x8f,0x00,0x0b,0xa0,0x00,0xf8,0x02,0x3e,0x00,0x0f,0x80,0x13,0xd2,0x00 } },
+{ 16, 0xc240, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x20,0xc9,0x00,0x32,0x40 } },
+{ 16, 0xc250, 0, {0x4d,0x99,0x03,0x24,0x00,0xc9,0x02,0x3e,0x68,0x0f,0x90,0x02,0x24,0x00,0xe9,0x00 } },
+{ 16, 0xc260, 0, {0x30,0x40,0x8c,0x90,0x03,0x04,0x40,0xc9,0x00,0x3e,0x40,0x0c,0x90,0x03,0x02,0x04 } },
+{ 16, 0xc270, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x20,0x89,0x06,0x22,0x50 } },
+{ 16, 0xc280, 0, {0x8b,0x9c,0xc2,0x24,0x00,0xd9,0x01,0x2e,0x40,0x0b,0x90,0x42,0x24,0x08,0xb9,0x01 } },
+{ 16, 0xc290, 0, {0x22,0x46,0x0d,0x90,0x0a,0x26,0x02,0x89,0x00,0x2c,0x40,0x0a,0x10,0x02,0x20,0x00 } },
+{ 16, 0xc2a0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x06,0x00,0x91,0x40,0x42,0x70 } },
+{ 16, 0xc2b0, 0, {0x0b,0x90,0x12,0x2c,0x02,0x8b,0x00,0x2e,0x40,0x0b,0x10,0x22,0xe4,0x10,0xb1,0x00 } },
+{ 16, 0xc2c0, 0, {0xa2,0x40,0x48,0x90,0x12,0x24,0x08,0x99,0x02,0x2e,0x40,0x08,0x90,0x02,0x06,0x00 } },
+{ 16, 0xc2d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x92,0x91,0x20,0xe0,0x48 } },
+{ 16, 0xc2e0, 0, {0x0b,0x12,0x02,0x04,0x02,0x91,0x10,0x2c,0xc0,0x0b,0x10,0x06,0x84,0xc0,0xb1,0x10 } },
+{ 16, 0xc2f0, 0, {0x20,0x48,0x89,0x11,0x02,0x05,0x80,0x91,0x40,0x2e,0x44,0x2a,0x94,0x02,0x02,0x01 } },
+{ 16, 0xc300, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xd8,0x50,0x30,0x14 } },
+{ 16, 0xc310, 0, {0x0f,0x85,0x0b,0x21,0xe0,0x80,0x40,0x3e,0x00,0x0f,0x87,0x8b,0xe1,0x0c,0xf8,0x6c } },
+{ 16, 0xc320, 0, {0x32,0x00,0x84,0x06,0x83,0x20,0x04,0xd8,0x28,0x3e,0x10,0x0c,0x00,0x03,0x2e,0x03 } },
+{ 16, 0xc330, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xf4,0x40,0xad,0x10,0x3f,0x45 } },
+{ 16, 0xc340, 0, {0x0f,0x91,0x03,0xfc,0x18,0x7d,0x20,0x1f,0x41,0x0f,0x90,0x03,0x74,0xc0,0xf9,0x21 } },
+{ 16, 0xc350, 0, {0x3e,0x44,0x0f,0x92,0x01,0xe4,0x40,0xe9,0x00,0x3d,0x48,0x4f,0xd0,0x03,0xe6,0x06 } },
+{ 16, 0xc360, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf7,0x80,0xfd,0xe0,0x33,0x70 } },
+{ 16, 0xc370, 0, {0x0c,0xda,0x03,0x26,0x20,0xc9,0x40,0x31,0x40,0x0e,0x9a,0x03,0x24,0x00,0xf9,0x80 } },
+{ 16, 0xc380, 0, {0x3b,0x60,0x0f,0x9c,0x83,0x36,0xa0,0xf9,0xa1,0xb0,0x40,0x0f,0x91,0x03,0xc6,0x00 } },
+{ 16, 0xc390, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe2,0x90,0xb8,0xa0,0x22,0x28 } },
+{ 16, 0xc3a0, 0, {0x28,0x88,0x0a,0x22,0x02,0x88,0xa0,0x22,0x00,0x08,0x88,0x02,0xc2,0x80,0xb8,0x88 } },
+{ 16, 0xc3b0, 0, {0x22,0x04,0x0b,0x8e,0x03,0x22,0x80,0xb8,0xd0,0x2a,0x20,0x0b,0x88,0x02,0xce,0x04 } },
+{ 16, 0xc3c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x80,0xb1,0x61,0x00,0x58 } },
+{ 16, 0xc3d0, 0, {0x48,0x16,0x8a,0x04,0xa0,0x89,0x01,0x22,0x40,0x1a,0x14,0x88,0x04,0x20,0xb1,0x40 } },
+{ 16, 0xc3e0, 0, {0x28,0x40,0x0b,0x10,0x0a,0x04,0x20,0xb1,0x2c,0x20,0x4a,0x0b,0x12,0x02,0xc2,0x01 } },
+{ 16, 0xc3f0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa5,0x90,0xbb,0x40,0x20,0x40 } },
+{ 16, 0xc400, 0, {0x08,0x90,0x02,0x24,0x40,0x89,0x42,0x62,0x58,0x08,0x10,0x02,0xe5,0x00,0xb9,0x03 } },
+{ 16, 0xc410, 0, {0x22,0xc0,0x0b,0x90,0x02,0xa4,0x14,0x31,0x00,0x2a,0x44,0x0b,0x90,0x02,0xc6,0x04 } },
+{ 16, 0xc420, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x10,0xa5,0x00,0xf9,0x01,0x32,0x40 } },
+{ 16, 0xc430, 0, {0x8c,0x90,0x03,0x27,0x00,0xc1,0x94,0x30,0x40,0x0e,0x90,0x03,0x24,0x00,0xf9,0x00 } },
+{ 16, 0xc440, 0, {0x3a,0x40,0x0f,0x90,0x03,0x24,0x00,0xf9,0x00,0x32,0x60,0x07,0x90,0x27,0xe8,0x05 } },
+{ 16, 0xc450, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa4,0x18,0xf9,0x00,0xbe,0x44 } },
+{ 16, 0xc460, 0, {0x0f,0x90,0x03,0xc4,0x00,0xf9,0x00,0xbe,0x61,0x8f,0x90,0x03,0xa4,0x00,0xf1,0x00 } },
+{ 16, 0xc470, 0, {0x1e,0x40,0x0f,0x10,0x03,0x24,0x08,0xf9,0x00,0x7e,0x40,0x0f,0x90,0x03,0xca,0x00 } },
+{ 16, 0xc480, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x81,0xf8,0x00,0x32,0x04 } },
+{ 16, 0xc490, 0, {0x0c,0x00,0xd3,0x21,0x00,0xd8,0x04,0x3a,0x14,0x9c,0x80,0x03,0x21,0x01,0xc8,0x00 } },
+{ 16, 0xc4a0, 0, {0x36,0x00,0x0c,0x80,0x13,0x20,0x10,0xc8,0x00,0x32,0x00,0x2c,0x80,0x03,0xca,0x04 } },
+{ 16, 0xc4b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x04,0x3a,0x00,0xbe,0x84,0x23,0x85 } },
+{ 16, 0xc4c0, 0, {0x08,0xec,0x83,0x68,0x04,0x8a,0x00,0x2f,0x90,0x4d,0xa0,0x02,0x28,0x01,0xda,0x00 } },
+{ 16, 0xc4d0, 0, {0x23,0xb0,0x0a,0xa0,0x02,0x2a,0x08,0xda,0x01,0x22,0x80,0x0f,0xa0,0x02,0xca,0x00 } },
+{ 16, 0xc4e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xbb,0xf0,0x20,0xc0 } },
+{ 16, 0xc4f0, 0, {0x08,0x3c,0x0a,0x0c,0x00,0x93,0x01,0x28,0xc8,0x89,0x30,0x06,0x4c,0x00,0x83,0x02 } },
+{ 16, 0xc500, 0, {0x2c,0xf6,0x08,0x30,0x02,0x04,0x00,0xa3,0x00,0x20,0xc0,0x0a,0x30,0x02,0xca,0x00 } },
+{ 16, 0xc510, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1d,0x11,0xb3,0x00,0xa0,0xc0 } },
+{ 16, 0xc520, 0, {0x08,0x50,0x02,0x5c,0x10,0x87,0x01,0x6d,0x81,0x49,0x32,0x52,0x1e,0xc3,0x87,0x00 } },
+{ 16, 0xc530, 0, {0x28,0xe0,0x0a,0x32,0x26,0x1f,0x00,0x37,0x00,0x23,0xe0,0x0b,0x72,0x02,0xc8,0x00 } },
+{ 16, 0xc540, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x12,0x00,0xb7,0x82,0x31,0x20 } },
+{ 16, 0xc550, 0, {0x08,0x08,0x37,0x0f,0x08,0xd7,0xe0,0x39,0x60,0x19,0x7a,0x0b,0x5e,0x0c,0x83,0xb2 } },
+{ 16, 0xc560, 0, {0x7d,0xe0,0x0c,0x7a,0x0b,0x3e,0x02,0xaf,0xa0,0xb1,0xe0,0x0e,0x7a,0x03,0xca,0x02 } },
+{ 16, 0xc570, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xa0,0x10,0xfb,0x00,0x3e,0xc0 } },
+{ 16, 0xc580, 0, {0x6f,0xb0,0x43,0xec,0x11,0xfb,0x00,0x3e,0x40,0x0f,0xb5,0x03,0xec,0x20,0xfb,0x50 } },
+{ 16, 0xc590, 0, {0x36,0x00,0x0f,0xb5,0x43,0xe5,0xa1,0xdb,0x78,0x3e,0xc0,0x0f,0xb4,0x03,0xc2,0x06 } },
+{ 16, 0xc5a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x00,0xff,0xa0,0x3f,0xa0 } },
+{ 16, 0xc5b0, 0, {0x0d,0xc9,0x13,0x3e,0x00,0xcf,0xd0,0x3d,0xe8,0x02,0xff,0x13,0x3e,0x00,0xcf,0x82 } },
+{ 16, 0xc5c0, 0, {0x3f,0x60,0x0c,0xfc,0x23,0x3e,0x10,0xef,0x80,0x33,0xf2,0x0c,0xfc,0x83,0x10,0x00 } },
+{ 16, 0xc5d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x40,0xb5,0x01,0x2d,0xd0 } },
+{ 16, 0xc5e0, 0, {0x08,0x58,0x02,0x1c,0x40,0x57,0x10,0x2d,0x5a,0x28,0x31,0x02,0xbc,0x01,0x97,0x10 } },
+{ 16, 0xc5f0, 0, {0x2d,0x00,0x0a,0x70,0x02,0x84,0x04,0xcf,0x00,0x29,0xc0,0x0a,0xf0,0x02,0x2a,0x04 } },
+{ 16, 0xc600, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0xb7,0x2a,0x2d,0x82 } },
+{ 16, 0xc610, 0, {0x08,0x42,0x22,0x3c,0x00,0x87,0x11,0x0d,0xcc,0x88,0x32,0x02,0x1d,0x00,0x97,0x00 } },
+{ 16, 0xc620, 0, {0x2c,0xc4,0x08,0x30,0x02,0x14,0x00,0xa7,0x00,0x23,0xc0,0x09,0x70,0x82,0x00,0x00 } },
+{ 16, 0xc630, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x14,0xc0,0x20,0xb0,0x20,0x2c,0x50 } },
+{ 16, 0xc640, 0, {0x08,0x10,0x02,0x2d,0xc0,0x93,0xe2,0x2c,0x21,0x08,0x30,0x02,0x0e,0x08,0x93,0x00 } },
+{ 16, 0xc650, 0, {0x2c,0x40,0x0a,0x30,0x02,0x8c,0x00,0x93,0x00,0x2a,0xc0,0x0b,0x30,0x02,0x18,0x04 } },
+{ 16, 0xc660, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x00,0xf8,0xc0,0x3e,0x80 } },
+{ 16, 0xc670, 0, {0x2c,0xa0,0x0b,0x3f,0x00,0xc7,0x60,0x3e,0xd0,0x0c,0xf0,0x0b,0x3c,0x00,0xcf,0x00 } },
+{ 16, 0xc680, 0, {0x3e,0x80,0x0c,0xf0,0x0b,0x2c,0x00,0xef,0x00,0x33,0xc1,0x0d,0xf0,0x0b,0x2a,0x04 } },
+{ 16, 0xc690, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x40,0xf3,0x40,0x3e,0x50 } },
+{ 16, 0xc6a0, 0, {0x8e,0xb4,0x03,0xec,0x10,0xfb,0x00,0x3e,0x09,0x0f,0xb0,0x13,0xec,0x42,0xeb,0x00 } },
+{ 16, 0xc6b0, 0, {0x3c,0x00,0x8f,0xb0,0x13,0xc4,0x11,0xe3,0x00,0x3e,0xc0,0x0e,0xb0,0x03,0xe0,0x00 } },
+{ 16, 0xc6c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xfc,0x80,0x31,0x22 } },
+{ 16, 0xc6d0, 0, {0x0c,0xa8,0x03,0x3c,0x00,0xcf,0x00,0x33,0xa0,0x0e,0xf0,0x03,0xdc,0x00,0xcf,0x00 } },
+{ 16, 0xc6e0, 0, {0x1f,0xf0,0x0c,0xf0,0x03,0xf4,0x00,0xcf,0x02,0x33,0xc0,0x0c,0xf0,0x02,0x00,0x54 } },
+{ 16, 0xc6f0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6f,0x00,0xbb,0xc0,0x22,0x70 } },
+{ 16, 0xc700, 0, {0x0a,0xb9,0x42,0x2c,0x10,0x8b,0x00,0x76,0x11,0x83,0xb0,0x02,0xec,0x10,0xab,0x00 } },
+{ 16, 0xc710, 0, {0x2e,0xb0,0x0a,0xb0,0x03,0xec,0x04,0x8b,0x00,0xa2,0xc0,0x28,0xb0,0x02,0x20,0x40 } },
+{ 16, 0xc720, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x65,0x40,0xb8,0x20,0x22,0x44 } },
+{ 16, 0xc730, 0, {0x58,0x34,0x0a,0x2c,0x00,0x8b,0x00,0x22,0x84,0x4b,0xb0,0x02,0xec,0x00,0x8b,0x00 } },
+{ 16, 0xc740, 0, {0x6e,0xc0,0x08,0xb0,0x42,0xe6,0x04,0x8b,0x00,0x02,0xc0,0x08,0x30,0x02,0xa0,0x01 } },
+{ 16, 0xc750, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0xb1,0x00,0x20,0xc0 } },
+{ 16, 0xc760, 0, {0x0a,0x30,0x0a,0x0c,0x00,0x8b,0x03,0x24,0x80,0x0b,0x30,0x02,0xcc,0x00,0xa3,0x00 } },
+{ 16, 0xc770, 0, {0x6c,0x00,0x0a,0x30,0x02,0x8d,0x00,0x83,0x00,0x20,0xc0,0x18,0x30,0x02,0x82,0x00 } },
+{ 16, 0xc780, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x64,0x00,0xf8,0x00,0x30,0x00 } },
+{ 16, 0xc790, 0, {0x4c,0xa0,0x0b,0x2c,0x02,0xcf,0x00,0x22,0x40,0x0e,0xf5,0x03,0xfc,0x00,0xcf,0x01 } },
+{ 16, 0xc7a0, 0, {0x3e,0x00,0x0c,0xf0,0x12,0xdd,0x02,0xcf,0x02,0x33,0xc0,0x4c,0xf0,0x0b,0x80,0x03 } },
+{ 16, 0xc7b0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa4,0x19,0xf0,0x00,0xfc,0x00,0x3f,0x40 } },
+{ 16, 0xc7c0, 0, {0x0f,0xb1,0x03,0xdc,0x00,0xbf,0x01,0x3f,0x00,0x0f,0xf2,0x23,0xfc,0x10,0xff,0x00 } },
+{ 16, 0xc7d0, 0, {0x3f,0x00,0x0f,0xf0,0x01,0xf4,0x84,0xff,0x00,0x3d,0xc0,0x4f,0xf0,0x13,0x68,0x06 } },
+{ 16, 0xc7e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfe,0x40,0xdf,0x80,0x33,0xc8 } },
+{ 16, 0xc7f0, 0, {0x0c,0xf8,0x03,0x3c,0x0a,0x9f,0xc0,0x3f,0xf0,0x08,0xb8,0x02,0x3e,0x00,0xff,0x80 } },
+{ 16, 0xc800, 0, {0x3f,0xd8,0x0c,0xf9,0x61,0x2e,0x40,0x6f,0x90,0x3f,0xe4,0x8f,0xf1,0x83,0x30,0x00 } },
+{ 16, 0xc810, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xec,0x04,0x8b,0x80,0x23,0xf0 } },
+{ 16, 0xc820, 0, {0x08,0xb8,0x02,0x3d,0x40,0xab,0x00,0x0e,0x08,0x48,0x22,0x82,0x6c,0x20,0xbb,0x00 } },
+{ 16, 0xc830, 0, {0x2f,0xd0,0x48,0xb0,0x02,0x2c,0x00,0xbb,0x00,0x2e,0xc1,0x0b,0xb0,0x02,0x30,0x04 } },
+{ 16, 0xc840, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x02,0x83,0x01,0xa0,0xc5 } },
+{ 16, 0xc850, 0, {0x08,0xb0,0x4a,0x4c,0xa0,0x80,0x24,0x28,0xc8,0x09,0x32,0x02,0x4c,0x00,0xb3,0x08 } },
+{ 16, 0xc860, 0, {0x2e,0xd1,0x29,0xb2,0x3a,0x0c,0x84,0xa3,0x21,0x2c,0xc8,0x4b,0xb2,0x0a,0x32,0x01 } },
+{ 16, 0xc870, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xac,0x08,0x8b,0x00,0x22,0xc0 } },
+{ 16, 0xc880, 0, {0x08,0xb0,0x02,0x4c,0x00,0x88,0x21,0x24,0x21,0x09,0xb0,0x46,0x6c,0x00,0xbb,0x06 } },
+{ 16, 0xc890, 0, {0x2e,0xc0,0x09,0xb0,0x02,0x2c,0x10,0xbb,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0x30,0x04 } },
+{ 16, 0xc8a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xcb,0x00,0x32,0xc0 } },
+{ 16, 0xc8b0, 0, {0x0c,0xb9,0x02,0x6c,0x00,0xcb,0xc8,0x3a,0xc0,0x2d,0x90,0x0b,0x2c,0x08,0xfb,0x00 } },
+{ 16, 0xc8c0, 0, {0x3e,0xc0,0x0d,0x30,0x42,0x2c,0x00,0xeb,0x00,0x3e,0xc0,0x0f,0xb0,0x13,0x00,0x04 } },
+{ 16, 0xc8d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xbc,0x00,0xef,0x00,0x3d,0xc0 } },
+{ 16, 0xc8e0, 0, {0x0f,0xf0,0x03,0xbc,0x06,0xef,0x82,0x3f,0x40,0x4e,0xc9,0x83,0xbc,0x00,0xff,0x00 } },
+{ 16, 0xc8f0, 0, {0x7f,0xc0,0x1c,0xf0,0x13,0x7c,0x00,0xff,0x04,0x3f,0xc0,0x0f,0xf0,0x03,0xf8,0x00 } },
+{ 16, 0xc900, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xfb,0x02,0x3e,0xc0 } },
+{ 16, 0xc910, 0, {0x0e,0xb0,0x03,0xac,0x20,0xd8,0x40,0x3e,0xc0,0x8c,0x90,0x0b,0x2c,0x00,0xfb,0x00 } },
+{ 16, 0xc920, 0, {0x3e,0xc9,0x0d,0xb0,0x33,0xec,0x08,0xfb,0x02,0x3e,0xc0,0x0f,0xb0,0x0b,0x54,0x04 } },
+{ 16, 0xc930, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2c,0x00,0xb3,0x00,0x2f,0xc0 } },
+{ 16, 0xc940, 0, {0x0b,0x30,0x12,0xfc,0x00,0x88,0xa0,0x2e,0x40,0x28,0x94,0x02,0x2c,0x10,0xbb,0x04 } },
+{ 16, 0xc950, 0, {0x2d,0xc0,0x28,0xb0,0x02,0xec,0x00,0xbb,0x00,0x2e,0xc0,0x0b,0x72,0x06,0x32,0x00 } },
+{ 16, 0xc960, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x6c,0x00,0xb3,0x00,0x2c,0xe0 } },
+{ 16, 0xc970, 0, {0x0a,0x10,0x02,0xcd,0x00,0x93,0x00,0x2c,0xc0,0x08,0xb0,0x02,0x4c,0x00,0xb3,0x00 } },
+{ 16, 0xc980, 0, {0x28,0xc0,0x08,0x30,0x02,0xcc,0x00,0xb3,0x00,0x2c,0xc0,0x0b,0x30,0x02,0x3a,0x00 } },
+{ 16, 0xc990, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x1e,0x40,0xb7,0x80,0x2d,0xe2 } },
+{ 16, 0xc9a0, 0, {0x0b,0x58,0x02,0xde,0x02,0x97,0x81,0x2f,0xa0,0x08,0x68,0x02,0x5e,0x00,0xb7,0x81 } },
+{ 16, 0xc9b0, 0, {0x2f,0xe0,0x08,0x79,0x02,0xde,0x00,0xb7,0x81,0x2d,0xe0,0x0b,0x78,0x02,0x3c,0x00 } },
+{ 16, 0xc9c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xf3,0x00,0x3c,0xc0 } },
+{ 16, 0xc9d0, 0, {0x0e,0x32,0x03,0xcc,0x80,0xd3,0x00,0x3c,0xc4,0x0c,0x39,0x03,0x4c,0x08,0xf3,0x1a } },
+{ 16, 0xc9e0, 0, {0x3c,0xc6,0x0d,0x30,0x03,0xce,0x20,0xf3,0x08,0x3c,0xc0,0x0f,0x30,0x03,0x52,0x02 } },
+{ 16, 0xc9f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x1d,0xac,0x00,0xfb,0x00,0x2e,0xc0 } },
+{ 16, 0xca00, 0, {0x0b,0xb0,0x03,0xcc,0x20,0xeb,0x00,0x3c,0x80,0x0f,0xb0,0x41,0xac,0x00,0xfb,0x00 } },
+{ 16, 0xca10, 0, {0x3c,0xc2,0x0f,0xb0,0x03,0xec,0x40,0xfb,0x00,0x3e,0xc0,0x0f,0x30,0x03,0xd0,0x06 } },
+{ 16, 0xca20, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xee,0x02,0xc3,0x80,0x30,0xce } },
+{ 16, 0xca30, 0, {0x0d,0x98,0x03,0xac,0xa0,0xc3,0x80,0xb2,0xc0,0x0f,0xb0,0x03,0xec,0x00,0xfb,0x00 } },
+{ 16, 0xca40, 0, {0x3e,0xd2,0x4f,0xb0,0x09,0x2e,0x08,0x4b,0x01,0x3e,0xc0,0x24,0xb0,0x03,0xea,0x00 } },
+{ 16, 0xca50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x9c,0x00,0x87,0x01,0x21,0xc0 } },
+{ 16, 0xca60, 0, {0x48,0x50,0x12,0x4c,0x00,0x87,0x00,0x35,0xc0,0x4b,0x60,0x02,0xdc,0x04,0xb7,0x01 } },
+{ 16, 0xca70, 0, {0x2d,0xc0,0x0b,0x70,0x02,0x1c,0x00,0x87,0x00,0x2d,0xc1,0x0c,0x72,0x02,0xf2,0x04 } },
+{ 16, 0xca80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0x87,0x80,0x23,0xe0 } },
+{ 16, 0xca90, 0, {0x08,0xf8,0x02,0xde,0x80,0x8f,0x81,0x21,0xe0,0x4b,0x78,0x12,0xde,0x04,0x37,0x80 } },
+{ 16, 0xcaa0, 0, {0x2d,0xe8,0x0b,0xf8,0x02,0x3e,0x18,0x87,0x80,0x2f,0xe0,0x09,0x79,0x02,0xe0,0x00 } },
+{ 16, 0xcab0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x00,0x83,0x00,0xa0,0xc0 } },
+{ 16, 0xcac0, 0, {0x28,0x30,0x42,0x4c,0x00,0x83,0x00,0x24,0xc0,0x0b,0x38,0x06,0xcc,0x04,0xb3,0x00 } },
+{ 16, 0xcad0, 0, {0x2c,0xc0,0x0b,0x30,0x02,0x0c,0x02,0x83,0x00,0x2c,0xc0,0x08,0x30,0x02,0xd2,0x04 } },
+{ 16, 0xcae0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xca,0x00,0x31,0x80 } },
+{ 16, 0xcaf0, 0, {0x08,0xe0,0x02,0x98,0x02,0xce,0x00,0x33,0x84,0x0b,0xea,0x03,0xe8,0x00,0xba,0x00 } },
+{ 16, 0xcb00, 0, {0x3f,0x81,0x0f,0xa0,0x03,0x28,0x00,0xca,0x00,0x3e,0x80,0x0d,0xe0,0x03,0xfa,0x04 } },
+{ 16, 0xcb10, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x00,0xf8,0x00,0x3e,0x00 } },
+{ 16, 0xcb20, 0, {0x0e,0x84,0x23,0xa0,0x00,0xf8,0x00,0x3a,0x10,0x0f,0x80,0x03,0xe0,0x00,0xf8,0x00 } },
+{ 16, 0xcb30, 0, {0x3e,0x10,0x0f,0x80,0x13,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0d,0x80,0x03,0xd2,0x00 } },
+{ 16, 0xcb40, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x01,0xf9,0x00,0x3e,0x40 } },
+{ 16, 0xcb50, 0, {0x0c,0x9a,0x13,0xe4,0x00,0xc9,0x00,0x3e,0x40,0x0c,0x98,0x23,0xe4,0x80,0xf9,0x00 } },
+{ 16, 0xcb60, 0, {0x3e,0x40,0x2c,0x98,0x03,0x64,0x00,0xf9,0x00,0x3e,0x40,0x0c,0x90,0x03,0xc2,0x04 } },
+{ 16, 0xcb70, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x04,0xb9,0x00,0x2e,0x40 } },
+{ 16, 0xcb80, 0, {0x68,0x9c,0x22,0xe4,0x02,0x89,0x01,0x7c,0x50,0x8d,0x98,0x22,0xe4,0x80,0xb9,0x20 } },
+{ 16, 0xcb90, 0, {0x2e,0x50,0x48,0x10,0x0b,0x25,0x00,0xb9,0x44,0x2c,0x40,0x28,0x90,0x00,0xe0,0x00 } },
+{ 16, 0xcba0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x00,0x2e,0x50 } },
+{ 16, 0xcbb0, 0, {0x08,0x90,0x02,0xe4,0x04,0x89,0x00,0x2e,0x50,0x0a,0x92,0x02,0xe4,0x00,0xb9,0x00 } },
+{ 16, 0xcbc0, 0, {0x2c,0x40,0x08,0x91,0x02,0x24,0x00,0xb9,0x00,0x2e,0x40,0x08,0x90,0x02,0xc6,0x00 } },
+{ 16, 0xcbd0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x05,0x00,0xb1,0x01,0x2c,0x40 } },
+{ 16, 0xcbe0, 0, {0x48,0x30,0x02,0xe4,0x00,0x81,0x00,0x2a,0x40,0x4b,0x10,0x02,0xc4,0x00,0xb1,0x00 } },
+{ 16, 0xcbf0, 0, {0x0c,0xc0,0x08,0x90,0x02,0x0c,0x00,0xb3,0x00,0x2e,0x40,0x48,0x12,0x02,0xc2,0x01 } },
+{ 16, 0xcc00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xb8,0x01,0x3e,0x00 } },
+{ 16, 0xcc10, 0, {0x1c,0x80,0x07,0xe1,0x50,0xc8,0x50,0x2e,0x14,0x1e,0x85,0x03,0xe1,0x41,0xf8,0x50 } },
+{ 16, 0xcc20, 0, {0x3e,0x14,0x0c,0x85,0x13,0x21,0x48,0xf8,0x50,0x3e,0x14,0x0c,0x85,0x43,0xee,0x03 } },
+{ 16, 0xcc30, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x19,0xc4,0x00,0xf9,0x00,0x3e,0x51 } },
+{ 16, 0xcc40, 0, {0x0f,0x50,0x03,0xe5,0x00,0xfd,0x00,0x3f,0x40,0x1d,0xd0,0x03,0xf4,0x10,0xf9,0x00 } },
+{ 16, 0xcc50, 0, {0x3e,0x50,0x0f,0x50,0x00,0x94,0x00,0xf9,0x00,0x3d,0x40,0x0f,0x91,0x03,0xe6,0x06 } },
+{ 16, 0xcc60, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xe4,0x50,0xcd,0x00,0x31,0x60 } },
+{ 16, 0xcc70, 0, {0x04,0xd0,0x03,0x36,0x80,0xc1,0x42,0x2e,0x50,0x1f,0x94,0x03,0xe5,0x00,0xe9,0x02 } },
+{ 16, 0xcc80, 0, {0x2e,0x72,0x0a,0x90,0x22,0x05,0x08,0xe9,0x40,0x3e,0x50,0x40,0x9c,0x03,0x26,0x00 } },
+{ 16, 0xcc90, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xc2,0x82,0x88,0x00,0x22,0x15 } },
+{ 16, 0xcca0, 0, {0x08,0x80,0x02,0x23,0x58,0x88,0xa0,0x2e,0x28,0x0b,0xaa,0x42,0xe2,0x82,0x88,0x80 } },
+{ 16, 0xccb0, 0, {0x2e,0x38,0x28,0x88,0x02,0x22,0x80,0xb8,0xa0,0x3a,0x28,0x08,0xcd,0x02,0x0e,0x04 } },
+{ 16, 0xccc0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0x81,0x00,0xa6,0x40 } },
+{ 16, 0xccd0, 0, {0x28,0x10,0x0a,0x24,0x26,0x95,0x00,0x0d,0x40,0x0b,0x50,0x02,0x74,0x00,0x85,0x08 } },
+{ 16, 0xcce0, 0, {0x2f,0x40,0x79,0xd2,0xaa,0x14,0x00,0xa5,0x01,0x2f,0x40,0x38,0x50,0x02,0x12,0x01 } },
+{ 16, 0xccf0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa4,0x04,0x89,0x00,0x26,0x40 } },
+{ 16, 0xcd00, 0, {0x08,0x91,0x02,0x24,0x10,0x9d,0x08,0x2f,0x40,0x0b,0xd0,0x02,0xf4,0x00,0x8d,0x02 } },
+{ 16, 0xcd10, 0, {0x2f,0x40,0x09,0xd0,0x00,0x34,0x00,0xbd,0x00,0x0b,0x40,0x18,0x70,0x02,0x06,0x04 } },
+{ 16, 0xcd20, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xc4,0x00,0xc9,0x05,0x36,0x41 } },
+{ 16, 0xcd30, 0, {0x4c,0x90,0x63,0x24,0x00,0xd9,0x00,0x3e,0x40,0x0b,0x90,0x03,0x44,0x08,0xc9,0x00 } },
+{ 16, 0xcd40, 0, {0x3e,0x40,0x15,0x10,0x03,0x24,0x00,0xe9,0x00,0x3c,0x40,0x0c,0x90,0x03,0x28,0x04 } },
+{ 16, 0xcd50, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0xa4,0x04,0xf9,0x00,0x3a,0x40 } },
+{ 16, 0xcd60, 0, {0x4f,0x98,0x03,0xe4,0x00,0xe9,0x99,0x3e,0x40,0x4f,0x90,0x03,0xe4,0x20,0xf9,0x0a } },
+{ 16, 0xcd70, 0, {0x3e,0x40,0x0e,0x90,0x43,0x64,0x24,0xf9,0x08,0x3a,0x42,0x0f,0x90,0x8b,0xda,0x00 } },
+{ 16, 0xcd80, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xc8,0x00,0x12,0x00 } },
+{ 16, 0xcd90, 0, {0x0c,0x80,0x43,0xe0,0x00,0xc8,0x40,0x32,0x00,0x0f,0x84,0x53,0xe0,0x10,0xf8,0x00 } },
+{ 16, 0xcda0, 0, {0x3e,0x00,0x0d,0x80,0x23,0x20,0x00,0xd8,0x00,0x3e,0x00,0x0f,0x80,0x03,0x0a,0x04 } },
+{ 16, 0xcdb0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x38,0x02,0x82,0x00,0xa1,0x88 } },
+{ 16, 0xcdc0, 0, {0x08,0x60,0x22,0xc8,0x00,0x8a,0x40,0x36,0xa1,0x0b,0xa0,0x02,0xe9,0x10,0xba,0x44 } },
+{ 16, 0xcdd0, 0, {0x2c,0x80,0x0c,0xa4,0x12,0x29,0x02,0x8a,0x44,0x2e,0x98,0x0b,0xa4,0x02,0x0a,0x00 } },
+{ 16, 0xcde0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x10,0x83,0x00,0x20,0xe0 } },
+{ 16, 0xcdf0, 0, {0x18,0x30,0x92,0xc4,0x08,0x93,0x40,0x20,0xe0,0x0b,0x30,0x02,0xcd,0x00,0xb3,0x40 } },
+{ 16, 0xce00, 0, {0x2c,0xc0,0x0b,0x3a,0x42,0xcd,0x00,0x83,0x40,0x2c,0xd0,0x0b,0x38,0x02,0x4a,0x00 } },
+{ 16, 0xce10, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x41,0x1c,0x00,0x87,0x00,0x21,0xc0 } },
+{ 16, 0xce20, 0, {0x28,0x70,0x02,0xd1,0x00,0x9d,0x80,0x25,0xc2,0x4b,0x60,0x02,0xdc,0x08,0xb7,0x02 } },
+{ 16, 0xce30, 0, {0x2c,0xc0,0x0a,0x74,0x02,0xfe,0x00,0x87,0x00,0x2d,0xc0,0x0b,0x34,0x02,0x68,0x00 } },
+{ 16, 0xce40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xc7,0x84,0x31,0xe0 } },
+{ 16, 0xce50, 0, {0x0c,0x68,0x03,0xd6,0x00,0x97,0x80,0x31,0xa0,0x0f,0x58,0x13,0xde,0x08,0xf7,0x82 } },
+{ 16, 0xce60, 0, {0x3d,0xa0,0x0f,0xf8,0x0b,0xde,0x00,0xc7,0x80,0x3d,0xe0,0x0f,0x78,0x8b,0x6a,0x02 } },
+{ 16, 0xce70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xad,0x80,0xf3,0x00,0x3e,0xc1 } },
+{ 16, 0xce80, 0, {0x0f,0xa0,0x23,0xc0,0x02,0xe9,0x00,0x3e,0x81,0x0f,0x80,0x03,0xec,0x00,0xfb,0x00 } },
+{ 16, 0xce90, 0, {0x3e,0xc0,0x0d,0xb0,0x13,0x2c,0x00,0xeb,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0x82,0x02 } },
+{ 16, 0xcea0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xff,0x32,0xc7,0x80,0x33,0x60 } },
+{ 16, 0xceb0, 0, {0x0f,0x78,0x03,0x3e,0xc8,0x4e,0x80,0x23,0x64,0x0c,0xf8,0x03,0x3a,0x00,0xce,0x80 } },
+{ 16, 0xcec0, 0, {0x13,0xec,0x06,0xd8,0x03,0x3a,0x00,0xde,0x80,0x33,0xa4,0x0c,0xc8,0x03,0xd0,0x00 } },
+{ 16, 0xced0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0x9c,0x00,0x87,0x10,0x01,0xc0 } },
+{ 16, 0xcee0, 0, {0x0b,0x70,0x02,0x18,0x50,0x84,0x00,0x2b,0x44,0x08,0x60,0x12,0x98,0x00,0x86,0x13 } },
+{ 16, 0xcef0, 0, {0x21,0xc4,0x88,0x50,0x02,0x18,0x80,0x86,0x00,0x21,0x80,0x08,0x61,0x02,0xea,0x04 } },
+{ 16, 0xcf00, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0x87,0x00,0x21,0x40 } },
+{ 16, 0xcf10, 0, {0x0b,0xf1,0x02,0x5c,0x80,0x06,0x00,0x21,0x00,0x88,0xd0,0x02,0x5c,0x00,0x87,0x00 } },
+{ 16, 0xcf20, 0, {0x20,0x89,0x8a,0xf1,0x02,0x1c,0x08,0x87,0x10,0x21,0x81,0x88,0x48,0x02,0xc6,0x00 } },
+{ 16, 0xcf30, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcc,0x10,0x83,0x04,0xa0,0xc1 } },
+{ 16, 0xcf40, 0, {0x0b,0x30,0x0a,0x48,0x0c,0x88,0x06,0x60,0x38,0x08,0x04,0x42,0xec,0x01,0x8b,0x04 } },
+{ 16, 0xcf50, 0, {0x22,0xc1,0x08,0x30,0x0a,0x2c,0x00,0x8b,0x00,0x22,0x80,0x00,0x20,0x02,0xd8,0x04 } },
+{ 16, 0xcf60, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xc3,0x00,0x22,0x80 } },
+{ 16, 0xcf70, 0, {0x8f,0x90,0x03,0x64,0x0a,0xcb,0x02,0xb2,0xf2,0x20,0x35,0x12,0x64,0x0a,0xc9,0x00 } },
+{ 16, 0xcf80, 0, {0xb2,0x40,0x0e,0xa0,0x03,0x24,0x0a,0xc9,0x00,0xa2,0x40,0x2c,0xa0,0x03,0xee,0x04 } },
+{ 16, 0xcf90, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xec,0x00,0xfb,0x00,0x3c,0x80 } },
+{ 16, 0xcfa0, 0, {0x0f,0x90,0x03,0xa5,0x00,0xdb,0x40,0x3e,0xd0,0x4d,0xb4,0x13,0xa4,0x08,0xfb,0x01 } },
+{ 16, 0xcfb0, 0, {0x3e,0xc0,0x1c,0xa0,0x03,0x6c,0x00,0xfb,0x04,0x3e,0x50,0x4f,0xa4,0x03,0xe0,0x00 } },
+{ 16, 0xcfc0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xff,0x00,0x33,0xc0 } },
+{ 16, 0xcfd0, 0, {0x0c,0xe8,0x43,0x26,0x00,0xdf,0x80,0xb3,0xe0,0x0f,0xf8,0x03,0x7c,0x00,0xcd,0x00 } },
+{ 16, 0xcfe0, 0, {0x33,0x04,0x0c,0xe0,0x23,0x34,0x40,0xcd,0x00,0x23,0x40,0x0c,0xe0,0x03,0xe0,0x04 } },
+{ 16, 0xcff0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x6c,0x10,0xbb,0x00,0xa2,0xd2 } },
+{ 16, 0xd000, 0, {0x08,0x28,0x02,0x04,0x60,0x8b,0x19,0x22,0xc6,0x0e,0xb1,0x8a,0x2e,0x40,0x8b,0x90 } },
+{ 16, 0xd010, 0, {0x22,0xc1,0x08,0xa4,0x82,0x2c,0x00,0x8b,0x90,0x22,0x64,0x48,0xa4,0x02,0xe0,0x00 } },
+{ 16, 0xd020, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xbb,0x00,0x22,0x00 } },
+{ 16, 0xd030, 0, {0x08,0x91,0x2e,0x24,0x00,0x9b,0x00,0x22,0xc0,0x8b,0xb0,0x12,0x20,0x04,0x88,0x00 } },
+{ 16, 0xd040, 0, {0x22,0x40,0x08,0x10,0x22,0x20,0x00,0x88,0x01,0x2a,0xd0,0x08,0x80,0x42,0xe0,0x00 } },
+{ 16, 0xd050, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x00,0xb3,0x04,0x20,0x80 } },
+{ 16, 0xd060, 0, {0x08,0x10,0x06,0x04,0x10,0x83,0x00,0x20,0xc0,0x8b,0xb0,0x12,0x00,0x00,0x82,0x00 } },
+{ 16, 0xd070, 0, {0x20,0xc0,0x28,0x10,0x42,0x09,0x06,0x82,0x00,0x28,0xc0,0x08,0x20,0x02,0xc2,0x01 } },
+{ 16, 0xd080, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x00,0xbb,0x00,0x32,0x40 } },
+{ 16, 0xd090, 0, {0x2c,0xb0,0x03,0x24,0x00,0xd3,0x00,0x32,0xc0,0x5f,0xb5,0x03,0x0c,0x02,0xc1,0x00 } },
+{ 16, 0xd0a0, 0, {0xb2,0x00,0x0c,0xb0,0x0b,0x05,0x00,0xc1,0x00,0xb8,0xc0,0x2c,0x80,0x13,0xe0,0x03 } },
+{ 16, 0xd0b0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xdc,0x00,0xff,0x00,0x1f,0xc0 } },
+{ 16, 0xd0c0, 0, {0x87,0xf0,0x01,0xf4,0x00,0xff,0x00,0x3f,0xc0,0x0e,0x70,0x43,0xfc,0x10,0x7f,0x00 } },
+{ 16, 0xd0d0, 0, {0x3f,0xc0,0x0f,0x70,0x03,0xfc,0x00,0xff,0x00,0x37,0xc0,0x0f,0xe0,0x03,0xe8,0x06 } },
+{ 16, 0xd0e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf1,0x84,0xfe,0x61,0x31,0xd8 } },
+{ 16, 0xd0f0, 0, {0x0c,0xb2,0xc3,0xfc,0xe0,0xcc,0x80,0x7b,0xc0,0x0e,0xf1,0x03,0x7c,0xe0,0xcc,0x83 } },
+{ 16, 0xd100, 0, {0x3f,0x20,0x0f,0xf0,0xcb,0x32,0x44,0xdc,0x84,0x3f,0x25,0x4c,0xf2,0x43,0x30,0x00 } },
+{ 16, 0xd110, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x10,0xe4,0x48,0xb0,0x10,0x22,0xdc } },
+{ 16, 0xd120, 0, {0x08,0xb6,0x02,0xfd,0x92,0x88,0x85,0x23,0xf4,0x40,0xf1,0x02,0xed,0x00,0x88,0x2d } },
+{ 16, 0xd130, 0, {0x0e,0x60,0x0b,0xbc,0x12,0x2c,0x10,0xa8,0x82,0x2e,0x00,0x0a,0xfc,0x22,0xa0,0x04 } },
+{ 16, 0xd140, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc0,0x80,0xb3,0x22,0x28,0xc0 } },
+{ 16, 0xd150, 0, {0x08,0x30,0x82,0xcc,0x01,0x88,0x00,0x2c,0xc0,0x4a,0x32,0x02,0xcc,0x00,0x01,0x01 } },
+{ 16, 0xd160, 0, {0x28,0x00,0x4b,0xb0,0x02,0xa0,0x00,0x80,0x00,0x2c,0x09,0x08,0x34,0x02,0x62,0x01 } },
+{ 16, 0xd170, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xac,0x04,0xb2,0x10,0x2a,0xc1 } },
+{ 16, 0xd180, 0, {0x08,0xb0,0x02,0xec,0x10,0x89,0x80,0x22,0xc0,0x08,0xb0,0x02,0xec,0x08,0x88,0x00 } },
+{ 16, 0xd190, 0, {0x2e,0x40,0x83,0xb0,0x02,0xa0,0x40,0xb9,0x80,0x2c,0x21,0x0a,0xb0,0x02,0xf0,0x04 } },
+{ 16, 0xd1a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xfa,0x00,0xba,0xc0 } },
+{ 16, 0xd1b0, 0, {0x2c,0xb0,0x43,0xec,0x00,0xc0,0x80,0x3e,0xc0,0x8e,0xb0,0x03,0x4c,0x0c,0xc8,0x10 } },
+{ 16, 0xd1c0, 0, {0x3e,0x80,0x8f,0xb0,0x03,0x82,0x10,0xd8,0x82,0x3e,0x28,0x0c,0xb0,0x0b,0x50,0x04 } },
+{ 16, 0xd1d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0xb6,0x80,0xfd,0x02,0x37,0xc1 } },
+{ 16, 0xd1e0, 0, {0x0f,0xb0,0x03,0xfc,0x00,0xfd,0x00,0x3e,0xc0,0x0f,0xb0,0x53,0xfc,0x02,0xff,0x01 } },
+{ 16, 0xd1f0, 0, {0x2f,0xa4,0x8b,0xf0,0x83,0x7c,0x00,0xad,0x02,0x2f,0x40,0x03,0x70,0x03,0xb8,0x00 } },
+{ 16, 0xd200, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xfb,0x04,0x32,0xc0 } },
+{ 16, 0xd210, 0, {0x4c,0xb0,0x23,0x2c,0x00,0xf8,0x40,0x3e,0xc2,0x0c,0xb0,0x03,0x2c,0x00,0xfb,0x41 } },
+{ 16, 0xd220, 0, {0x32,0xc2,0x0f,0xb0,0x43,0x2d,0x00,0xc8,0x50,0x3e,0x40,0x0c,0xb0,0x0b,0x10,0x04 } },
+{ 16, 0xd230, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x05,0x2f,0x90,0xb9,0x50,0x03,0xc0 } },
+{ 16, 0xd240, 0, {0x18,0xf0,0x1a,0x3c,0x00,0xb9,0x32,0x2d,0xe0,0x38,0xf0,0x60,0x3c,0x04,0xf9,0x00 } },
+{ 16, 0xd250, 0, {0x3e,0xf0,0x0b,0x7c,0x80,0x2c,0x00,0xd9,0xc0,0x2e,0x40,0x0d,0xf0,0x02,0x32,0x00 } },
+{ 16, 0xd260, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4b,0x24,0xb2,0x10,0x02,0xc1 } },
+{ 16, 0xd270, 0, {0x28,0x30,0x02,0x6c,0x04,0xb2,0xc1,0x2c,0xc0,0x08,0x30,0x00,0x0c,0x00,0xb2,0x00 } },
+{ 16, 0xd280, 0, {0x28,0x24,0x03,0x3c,0x0a,0x00,0x00,0x82,0xc8,0x2c,0xa0,0x08,0x30,0x02,0x38,0x00 } },
+{ 16, 0xd290, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x16,0x00,0xb4,0x80,0x21,0xe4 } },
+{ 16, 0xd2a0, 0, {0x48,0x7b,0x02,0x5e,0x00,0xb6,0x80,0x6d,0xe2,0x48,0x79,0x22,0x1e,0x40,0xac,0x84 } },
+{ 16, 0xd2b0, 0, {0x2d,0xe0,0x0b,0xfa,0x00,0x52,0x40,0x96,0x80,0x2d,0xe8,0x19,0x38,0x02,0x08,0x00 } },
+{ 16, 0xd2c0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x08,0x40,0xf3,0x10,0xb0,0xc4 } },
+{ 16, 0xd2d0, 0, {0x08,0x3a,0x02,0x4c,0x90,0xf3,0x10,0x3c,0xcc,0x08,0x31,0x03,0x0c,0x49,0xb0,0x40 } },
+{ 16, 0xd2e0, 0, {0x30,0x05,0x0f,0x30,0x07,0x21,0x40,0x43,0x01,0x3e,0xc2,0x1c,0x30,0x43,0x12,0x02 } },
+{ 16, 0xd2f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x0d,0xbc,0x10,0xfc,0x10,0x3f,0xc5 } },
+{ 16, 0xd300, 0, {0x0f,0xf1,0x01,0xbc,0x04,0xff,0x04,0x3f,0xc4,0x0f,0xb1,0x4b,0xfc,0x64,0xf7,0x00 } },
+{ 16, 0xd310, 0, {0x37,0xc0,0x0f,0x72,0x53,0xac,0x44,0xff,0x01,0x3f,0xc9,0x0f,0xf4,0x03,0xd0,0x06 } },
+{ 16, 0xd320, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x08,0xfa,0x00,0x3e,0xe0 } },
+{ 16, 0xd330, 0, {0x0c,0xb0,0x03,0x2c,0x00,0xcb,0x02,0x3e,0xca,0x0f,0xb2,0x07,0x2e,0x00,0xdb,0x02 } },
+{ 16, 0xd340, 0, {0x32,0x08,0x0f,0x31,0x03,0x2c,0x00,0xcb,0x04,0x3e,0x80,0x0c,0x35,0x03,0x2a,0x00 } },
+{ 16, 0xd350, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x11,0x94,0x00,0xb5,0x00,0x2d,0xc8 } },
+{ 16, 0xd360, 0, {0x08,0x70,0x0a,0x1c,0x22,0x87,0x00,0x2d,0xc9,0x0b,0xf2,0x82,0x9c,0x80,0xa6,0x00 } },
+{ 16, 0xd370, 0, {0x09,0x8b,0x0b,0x70,0x0a,0x1c,0x02,0x85,0x00,0x2d,0x40,0x08,0x70,0x02,0x92,0x04 } },
+{ 16, 0xd380, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xb7,0x80,0x2c,0xec } },
+{ 16, 0xd390, 0, {0x08,0x7b,0x02,0x5e,0x40,0x85,0x89,0x2d,0xec,0x8b,0x7b,0x02,0x4e,0x84,0x8f,0x80 } },
+{ 16, 0xd3a0, 0, {0x25,0x64,0x0b,0xfa,0x02,0x12,0x08,0x97,0x80,0x6f,0xe1,0x08,0x7a,0x02,0x30,0x00 } },
+{ 16, 0xd3b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x14,0xcc,0x20,0xb3,0x64,0x2c,0xc0 } },
+{ 16, 0xd3c0, 0, {0x08,0x30,0x06,0x0c,0x10,0x83,0x8a,0x6c,0xc0,0x5b,0x30,0x42,0xcc,0x00,0xab,0x10 } },
+{ 16, 0xd3d0, 0, {0x2c,0xf2,0x0b,0x30,0x02,0x0d,0x00,0x93,0x04,0x2c,0xd5,0x08,0x30,0x0a,0x92,0x04 } },
+{ 16, 0xd3e0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xbb,0x00,0xfe,0xc0,0x3e,0x80 } },
+{ 16, 0xd3f0, 0, {0x2c,0xa0,0x03,0x68,0x00,0xc6,0x40,0x3f,0x80,0x0f,0xa0,0x02,0x68,0x00,0xce,0x44 } },
+{ 16, 0xd400, 0, {0x36,0x90,0x4f,0x60,0x03,0x1b,0x70,0xde,0xd8,0x3f,0xa0,0x0c,0x20,0x03,0x3a,0x04 } },
+{ 16, 0xd410, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0xe0,0x40,0xf8,0x10,0x3e,0x00 } },
+{ 16, 0xd420, 0, {0x0f,0x80,0x03,0xa0,0x10,0xf8,0x42,0x3e,0x10,0x1f,0x80,0x03,0xa0,0x00,0xe8,0x0c } },
+{ 16, 0xd430, 0, {0x3a,0x04,0x1f,0x80,0x03,0xe0,0x00,0xe8,0x45,0x7e,0x02,0x2f,0x80,0x03,0xd2,0x00 } },
+{ 16, 0xd440, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x64,0x00,0xe9,0x80,0x32,0x40 } },
+{ 16, 0xd450, 0, {0x0f,0x90,0x0b,0x04,0x08,0xd9,0x80,0x36,0x40,0x0f,0x10,0x13,0x24,0x08,0xf9,0x00 } },
+{ 16, 0xd460, 0, {0x72,0x70,0x0f,0x91,0x13,0x24,0x10,0xc9,0x10,0x3e,0x69,0x0c,0x90,0x03,0x02,0x04 } },
+{ 16, 0xd470, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x64,0x08,0xb9,0x80,0x22,0x40 } },
+{ 16, 0xd480, 0, {0x0b,0x10,0x02,0x24,0x00,0x89,0xc4,0x22,0x52,0x0b,0x90,0x42,0x24,0x00,0xb9,0x00 } },
+{ 16, 0xd490, 0, {0x22,0xe0,0x0b,0x90,0x12,0x24,0x04,0xd9,0x4a,0x2e,0x60,0x08,0x90,0x03,0x60,0x00 } },
+{ 16, 0xd4a0, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb1,0x18,0x22,0x40 } },
+{ 16, 0xd4b0, 0, {0x0b,0x90,0x02,0x24,0x00,0x8b,0x20,0x26,0x49,0x0b,0x90,0x02,0x64,0x00,0xb9,0x00 } },
+{ 16, 0xd4c0, 0, {0xa2,0x40,0x0b,0x90,0x8a,0x24,0x00,0x8b,0x00,0x2c,0x40,0xa8,0x90,0x02,0x06,0x00 } },
+{ 16, 0xd4d0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x84,0xb1,0x20,0xa0,0x48 } },
+{ 16, 0xd4e0, 0, {0x0b,0x11,0x06,0x04,0x00,0x83,0x00,0x00,0x40,0x4b,0x11,0x02,0x04,0x49,0xb1,0x10 } },
+{ 16, 0xd4f0, 0, {0x28,0x40,0x0b,0x10,0x02,0x24,0x41,0x91,0x00,0x2c,0x50,0x08,0x10,0x02,0x42,0x01 } },
+{ 16, 0xd500, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x69,0x40,0xe8,0x50,0x32,0x14 } },
+{ 16, 0xd510, 0, {0x0f,0x86,0x93,0x21,0xe2,0xc8,0x00,0x36,0x0a,0x0b,0x86,0x8b,0x61,0xa8,0xf8,0x40 } },
+{ 16, 0xd520, 0, {0x22,0x80,0x0f,0x82,0xa3,0x21,0x08,0xc8,0x02,0x3e,0x00,0x0c,0x80,0x43,0x2e,0x03 } },
+{ 16, 0xd530, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x1d,0xf4,0x48,0xfd,0x12,0x3e,0x44 } },
+{ 16, 0xd540, 0, {0x0f,0x12,0x03,0xc4,0x00,0x7d,0x01,0x1e,0x40,0x0b,0x92,0x03,0xe4,0x80,0xf5,0x20 } },
+{ 16, 0xd550, 0, {0x36,0x40,0x0f,0x90,0x03,0xd4,0x90,0x7d,0x00,0x3d,0x40,0x0f,0x94,0x03,0xe6,0x06 } },
+{ 16, 0xd560, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xf6,0xc1,0xdd,0x88,0x32,0x72 } },
+{ 16, 0xd570, 0, {0x0c,0x98,0x03,0x26,0x22,0xdd,0x00,0x3f,0x62,0x2c,0x99,0x83,0x46,0xa0,0xc9,0x40 } },
+{ 16, 0xd580, 0, {0xb2,0x40,0x0f,0xd8,0x03,0x24,0x00,0xfd,0x00,0x33,0x51,0x2c,0xd8,0x83,0x06,0x00 } },
+{ 16, 0xd590, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0xe3,0xc2,0x88,0xc0,0x22,0x30 } },
+{ 16, 0xd5a0, 0, {0x08,0x8c,0x42,0x22,0x11,0x8a,0x01,0x2e,0x00,0x08,0x88,0x52,0x23,0x00,0x80,0xa3 } },
+{ 16, 0xd5b0, 0, {0x2a,0x00,0x4b,0x80,0x42,0x22,0xa0,0xb8,0x00,0x22,0x28,0x08,0x84,0x02,0x8e,0x04 } },
+{ 16, 0xd5c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0x81,0x2d,0x20,0x48 } },
+{ 16, 0xd5d0, 0, {0x68,0x14,0x80,0x04,0x20,0x81,0x00,0x2e,0x40,0x0b,0x12,0x12,0x04,0x24,0x81,0x20 } },
+{ 16, 0xd5e0, 0, {0x20,0x40,0x0b,0x94,0x32,0x04,0x90,0xb9,0x00,0x20,0x40,0x48,0x10,0x4a,0x02,0x01 } },
+{ 16, 0xd5f0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xa4,0x00,0x89,0x20,0x22,0x40 } },
+{ 16, 0xd600, 0, {0x08,0x90,0x12,0x24,0x00,0x89,0x00,0x2e,0x40,0x08,0x90,0x02,0x24,0x08,0x89,0x40 } },
+{ 16, 0xd610, 0, {0x22,0x50,0x0b,0xb0,0x02,0x24,0x20,0xb9,0x09,0xa2,0x44,0x08,0x90,0x02,0x86,0x04 } },
+{ 16, 0xd620, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xd9,0x08,0xb2,0x40 } },
+{ 16, 0xd630, 0, {0x4c,0x10,0x23,0x04,0x04,0xd9,0xc1,0x3e,0x40,0x8f,0x90,0x0b,0x04,0x08,0xc1,0x40 } },
+{ 16, 0xd640, 0, {0x12,0x40,0x0f,0x90,0x43,0x24,0x04,0xf1,0x41,0x30,0x78,0x0c,0x90,0x03,0x28,0x04 } },
+{ 16, 0xd650, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0x86,0x64,0xf9,0x80,0x3e,0x40 } },
+{ 16, 0xd660, 0, {0x0f,0x90,0x0b,0xe4,0x00,0xf9,0x98,0x3e,0x40,0x2f,0x10,0x03,0xa4,0x02,0xf9,0x10 } },
+{ 16, 0xd670, 0, {0x3e,0x40,0x0f,0x90,0x0b,0xe6,0x40,0xf9,0x90,0x3e,0x60,0x0f,0x90,0x03,0xca,0x00 } },
+{ 16, 0xd680, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xc8,0x41,0x32,0x00 } },
+{ 16, 0xd690, 0, {0x0c,0x80,0x07,0x20,0x10,0xc8,0x10,0x3e,0x0c,0x0e,0x80,0x03,0xe0,0x04,0xc8,0x00 } },
+{ 16, 0xd6a0, 0, {0xba,0x00,0x0f,0x81,0x43,0x20,0x00,0xf8,0x70,0x3e,0x00,0x0f,0x00,0x0b,0x0a,0x04 } },
+{ 16, 0xd6b0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x39,0x02,0x8e,0x20,0xa3,0x80 } },
+{ 16, 0xd6c0, 0, {0x28,0xe0,0x0a,0x38,0x10,0xae,0x04,0x3d,0xa1,0x8e,0xe0,0x02,0xf8,0x00,0x8e,0x00 } },
+{ 16, 0xd6d0, 0, {0x76,0x80,0x0b,0x60,0x03,0x78,0x00,0xbe,0x40,0x2f,0x82,0x0b,0xa0,0x03,0xca,0x00 } },
+{ 16, 0xd6e0, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4d,0x00,0x8b,0x88,0x22,0xc0 } },
+{ 16, 0xd6f0, 0, {0x18,0x30,0x02,0x0c,0x00,0x83,0x44,0x2c,0xd0,0x1b,0x30,0x12,0xcc,0x06,0x83,0x00 } },
+{ 16, 0xd700, 0, {0x20,0xc1,0x0b,0x30,0x82,0x0c,0x01,0xb3,0x00,0x2c,0x40,0x0b,0x30,0x02,0x0a,0x00 } },
+{ 16, 0xd710, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x1c,0x00,0x85,0x00,0x20,0xcc } },
+{ 16, 0xd720, 0, {0x08,0x70,0x06,0x1c,0x84,0xa7,0x01,0x29,0xc0,0x0b,0x72,0x22,0xdc,0x80,0x87,0x34 } },
+{ 16, 0xd730, 0, {0x61,0x80,0x0b,0x10,0x02,0x5c,0x00,0xb7,0x00,0x2d,0xc0,0x0b,0x70,0x02,0xe8,0x00 } },
+{ 16, 0xd740, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x0e,0x00,0x8c,0x80,0x31,0xe0 } },
+{ 16, 0xd750, 0, {0x0c,0xfe,0x02,0x3f,0x00,0xc5,0x80,0x2d,0xe0,0x0e,0x78,0x03,0xdf,0xa0,0xc7,0xa0 } },
+{ 16, 0xd760, 0, {0x21,0x60,0x0f,0x78,0x03,0x1e,0x80,0xf7,0x80,0x3d,0xe0,0x0f,0x78,0x03,0x2a,0x02 } },
+{ 16, 0xd770, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1d,0xac,0x00,0xf9,0x00,0x3e,0xc0 } },
+{ 16, 0xd780, 0, {0x0f,0xb0,0x03,0xec,0x00,0xfa,0x00,0x3e,0xc0,0x06,0xb0,0x03,0xec,0x80,0xfb,0x28 } },
+{ 16, 0xd790, 0, {0x36,0xd8,0x4f,0xa0,0x03,0xec,0x10,0xfa,0x00,0x3e,0x50,0x0f,0x30,0x03,0xc2,0x06 } },
+{ 16, 0xd7a0, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfa,0x00,0xcc,0x80,0xb3,0xe0 } },
+{ 16, 0xd7b0, 0, {0x0f,0xf8,0x03,0x3e,0x00,0xcf,0x90,0x3f,0x60,0x4f,0xf8,0xc3,0x3e,0x00,0xef,0x80 } },
+{ 16, 0xd7c0, 0, {0x33,0xf0,0x0c,0x7a,0x03,0x3e,0x70,0xc5,0x90,0x33,0xf1,0x0c,0x78,0x03,0x00,0x00 } },
+{ 16, 0xd7d0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xb8,0x00,0x87,0x00,0x21,0xc0 } },
+{ 16, 0xd7e0, 0, {0x0b,0x70,0x4a,0x1c,0x00,0x87,0x10,0x2d,0xc0,0x4b,0x71,0x0a,0x3c,0x44,0x8f,0x12 } },
+{ 16, 0xd7f0, 0, {0x21,0x86,0x0d,0x72,0x02,0x1e,0x00,0x87,0x00,0x23,0x40,0x08,0x70,0x0a,0x2a,0x04 } },
+{ 16, 0xd800, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0x84,0x00,0x25,0xc0 } },
+{ 16, 0xd810, 0, {0x0b,0x71,0x0a,0x0c,0x00,0xa7,0x12,0x2d,0x84,0x0b,0x70,0x0a,0x1c,0x00,0xb7,0x08 } },
+{ 16, 0xd820, 0, {0x23,0x40,0x09,0xf3,0x1a,0x5c,0x86,0x97,0x08,0x25,0x40,0x08,0x70,0x02,0x00,0x00 } },
+{ 16, 0xd830, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0xcc,0x20,0x81,0x20,0x26,0xc0 } },
+{ 16, 0xd840, 0, {0x0b,0x30,0x02,0x2c,0x00,0x82,0x42,0x2c,0x80,0x0b,0x30,0x22,0x0c,0x08,0x9b,0x80 } },
+{ 16, 0xd850, 0, {0x20,0xe0,0x09,0x20,0x02,0x4d,0x08,0x92,0x00,0x24,0xe5,0x08,0x30,0x0a,0x08,0x04 } },
+{ 16, 0xd860, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xae,0x82,0xca,0xe0,0xb7,0xc0 } },
+{ 16, 0xd870, 0, {0x0f,0xf0,0x13,0x3c,0x0a,0xc9,0xc8,0x3e,0x40,0x0f,0xf0,0x03,0x3c,0x04,0xff,0x84 } },
+{ 16, 0xd880, 0, {0x32,0xc0,0x0d,0x90,0x13,0x7c,0x00,0xd9,0x00,0xf6,0xc0,0x2c,0x10,0x03,0x2a,0x04 } },
+{ 16, 0xd890, 0, {0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xe4,0x00,0xf3,0x00,0x3a,0xc1 } },
+{ 16, 0xd8a0, 0, {0x4f,0xb0,0x03,0xec,0x00,0xf9,0x08,0x3c,0x00,0x0f,0x30,0x13,0xec,0x00,0xeb,0x04 } },
+{ 16, 0xd8b0, 0, {0xbe,0x18,0x0f,0x90,0x23,0xac,0x60,0xe9,0x02,0x3a,0x40,0x4f,0x90,0x03,0xe0,0x00 } },
+{ 16, 0xd8c0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xca,0x00,0x33,0xc0 } },
+{ 16, 0xd8d0, 0, {0x0c,0xf0,0x03,0xfc,0x00,0xcd,0x02,0x7f,0x40,0x0c,0xf0,0x42,0x3c,0x00,0xcf,0x08 } },
+{ 16, 0xd8e0, 0, {0x37,0x10,0x0f,0xd0,0x03,0xfc,0x10,0xcd,0x08,0x3f,0x66,0x2c,0xd9,0x03,0x00,0x44 } },
+{ 16, 0xd8f0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x04,0x63,0x80,0x8b,0xe0,0x22,0xc0 } },
+{ 16, 0xd900, 0, {0x08,0xb0,0x22,0xec,0x00,0xd8,0x80,0x6e,0x20,0x68,0xb0,0x1a,0x2c,0x01,0xfb,0x00 } },
+{ 16, 0xd910, 0, {0x22,0x18,0x0b,0x88,0x43,0x4c,0x00,0x88,0xa0,0x2c,0xc0,0x1d,0x90,0x02,0x20,0x40 } },
+{ 16, 0xd920, 0, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x08,0x80,0x8b,0x20,0x22,0xc0 } },
+{ 16, 0xd930, 0, {0x08,0xb0,0x22,0xec,0x00,0x88,0x88,0x2e,0x62,0x48,0xb0,0x1a,0xcc,0x00,0x8b,0x00 } },
+{ 16, 0xd940, 0, {0x26,0xc0,0x4a,0x88,0x02,0xec,0x00,0x08,0x84,0x2e,0x40,0x09,0x90,0x02,0x20,0x00 } },
+{ 16, 0xd950, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x00,0x00,0x83,0x00,0x60,0xc0 } },
+{ 16, 0xd960, 0, {0x08,0x30,0x02,0xcc,0x00,0x90,0x06,0x6c,0x00,0x08,0x30,0x02,0x8c,0x00,0xa3,0x04 } },
+{ 16, 0xd970, 0, {0x20,0x00,0x8b,0x00,0x06,0x4c,0x21,0x80,0x00,0x6c,0xc0,0x49,0x10,0x0a,0x02,0x01 } },
+{ 16, 0xd980, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xca,0x00,0xb2,0xc1 } },
+{ 16, 0xd990, 0, {0x88,0xb4,0x03,0xec,0x10,0xc8,0x00,0x2e,0x00,0x0c,0xb0,0x0b,0xbc,0x08,0x8f,0x00 } },
+{ 16, 0xd9a0, 0, {0x36,0x00,0x06,0x80,0x03,0xec,0x80,0xc8,0x02,0x3f,0xc1,0x0c,0x90,0x03,0x00,0x03 } },
+{ 16, 0xd9b0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x1d,0xf0,0x00,0xff,0x00,0x3f,0xc0 } },
+{ 16, 0xd9c0, 0, {0x0f,0x72,0x83,0xfc,0x18,0xfc,0x03,0x3f,0x00,0x8f,0x70,0x03,0x7c,0x00,0xff,0x00 } },
+{ 16, 0xd9d0, 0, {0x3d,0x00,0x0f,0xc0,0x23,0x8c,0x06,0xfc,0x00,0x3f,0x40,0x0e,0xd0,0x03,0xe8,0x06 } },
+{ 16, 0xd9e0, 0, {0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x41,0x03,0x70,0x40,0xdc,0x10 } },
+{ 16, 0xd9f0, 0, {0x37,0x04,0x0d,0xc1,0x03,0x70,0x40,0xdc,0x10,0x37,0x04,0x0d,0xc1,0x01,0x70,0x40 } },
+{ 16, 0xda00, 0, {0x9c,0x10,0x17,0x14,0x05,0xc1,0x03,0x70,0x40,0xdc,0x10,0x17,0x04,0x0d,0xc0,0x31 } },
+{ 16, 0xda10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x44,0x05,0x71,0x01,0x5c,0x40 } },
+{ 16, 0xda20, 0, {0x57,0x10,0x15,0xc4,0x05,0x21,0x01,0x5c,0x40,0x57,0x10,0x15,0xc4,0x01,0x71,0x01 } },
+{ 16, 0xda30, 0, {0x5c,0x40,0x17,0x10,0x05,0xc4,0x05,0x71,0x05,0x5c,0x41,0x57,0x10,0x15,0xc0,0x11 } },
+{ 16, 0xda40, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x01,0x20,0x80,0x48,0x20 } },
+{ 16, 0xda50, 0, {0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80 } },
+{ 16, 0xda60, 0, {0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x80,0x20 } },
+{ 16, 0xda70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x60,0x00,0x58,0x00 } },
+{ 16, 0xda80, 0, {0x16,0x00,0x05,0x80,0x01,0x60,0x00,0x58,0x00,0x16,0x00,0x05,0x80,0x05,0x60,0x00 } },
+{ 16, 0xda90, 0, {0x58,0x00,0x16,0x18,0x01,0x80,0x01,0x60,0x00,0x58,0x00,0x56,0x00,0x05,0x80,0x20 } },
+{ 16, 0xdaa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x48,0x05,0x22,0x01,0x1c,0x80 } },
+{ 16, 0xdab0, 0, {0x47,0x20,0x11,0xc8,0x04,0x72,0x01,0x5c,0x80,0x57,0x20,0x11,0xc8,0x04,0x72,0x41 } },
+{ 16, 0xdac0, 0, {0x5c,0x80,0x57,0x20,0x11,0xc8,0x04,0x72,0x01,0x1c,0x80,0x47,0x20,0x15,0xc0,0x31 } },
+{ 16, 0xdad0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x40,0x00,0x60,0x00,0x18,0x00 } },
+{ 16, 0xdae0, 0, {0x06,0x00,0x01,0x80,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x00 } },
+{ 16, 0xdaf0, 0, {0x18,0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x31 } },
+{ 16, 0xdb00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x48,0x04,0x22,0x01,0x08,0x80 } },
+{ 16, 0xdb10, 0, {0x42,0x20,0x10,0x88,0x04,0x22,0x01,0x08,0x80,0x42,0x20,0x10,0x80,0x04,0x23,0x01 } },
+{ 16, 0xdb20, 0, {0x08,0x80,0x42,0x20,0x10,0x88,0x04,0x22,0x01,0x08,0x00,0x42,0x20,0x10,0x80,0x21 } },
+{ 16, 0xdb30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x4a,0x05,0x42,0x81,0x50,0xa0 } },
+{ 16, 0xdb40, 0, {0x44,0x2c,0x11,0x0b,0x04,0x42,0x81,0x10,0xe0,0x54,0x28,0x11,0x02,0x00,0x42,0x81 } },
+{ 16, 0xdb50, 0, {0x10,0xa0,0x44,0x38,0x11,0x0b,0x05,0x42,0x81,0x10,0x21,0x14,0x28,0x15,0x00,0x31 } },
+{ 16, 0xdb60, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0c,0x01,0x57,0x00,0x54,0xc0 } },
+{ 16, 0xdb70, 0, {0x15,0x30,0x04,0x4c,0x01,0x13,0x00,0x54,0xc0,0x15,0x70,0x05,0x4c,0x01,0x53,0x00 } },
+{ 16, 0xdb80, 0, {0x54,0xc0,0x15,0x30,0x85,0x4c,0x01,0x13,0x00,0x54,0xc0,0x15,0x30,0x05,0x40,0x21 } },
+{ 16, 0xdb90, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x40,0x00,0x10,0x00 } },
+{ 16, 0xdba0, 0, {0x04,0x00,0x00,0x40,0x00,0x10,0x00,0x10,0x62,0x04,0x00,0x01,0x08,0x04,0x41,0x00 } },
+{ 16, 0xdbb0, 0, {0x10,0x00,0x44,0x18,0x11,0x00,0x00,0x10,0x00,0x10,0x80,0x04,0x00,0x01,0x01,0x20 } },
+{ 16, 0xdbc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x60,0x02,0x08,0x00,0x82,0x00 } },
+{ 16, 0xdbd0, 0, {0x20,0x80,0x08,0x60,0x02,0x18,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x00,0x08,0x20 } },
+{ 16, 0xdbe0, 0, {0x82,0x00,0x00,0x80,0x80,0x20,0x02,0x18,0x00,0x82,0x00,0x20,0x80,0x08,0x01,0x31 } },
+{ 16, 0xdbf0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x40,0x05,0x64,0x01,0x58,0x00 } },
+{ 16, 0xdc00, 0, {0x56,0x00,0x15,0x80,0x05,0x60,0x01,0x58,0x00,0x56,0x40,0x15,0x80,0x05,0x60,0x01 } },
+{ 16, 0xdc10, 0, {0x58,0x00,0x56,0x00,0x15,0x80,0x05,0x60,0x01,0x58,0x00,0x76,0x00,0x15,0x80,0x31 } },
+{ 16, 0xdc20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x40,0x03,0x60,0x00,0xd8,0x00 } },
+{ 16, 0xdc30, 0, {0x36,0x00,0x0d,0x80,0x03,0x60,0x00,0x98,0x00,0x36,0x00,0x1d,0x88,0x05,0x60,0x00 } },
+{ 16, 0xdc40, 0, {0xd8,0x00,0x16,0x00,0x0d,0x80,0x03,0x60,0x00,0xd8,0x80,0x46,0x00,0x0d,0x80,0x31 } },
+{ 16, 0xdc50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x42,0x04,0x30,0x81,0x0c,0x20 } },
+{ 16, 0xdc60, 0, {0x43,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c,0x22,0x41,0x08,0x18,0xc2,0x04,0x30,0x89 } },
+{ 16, 0xdc70, 0, {0x0c,0x20,0x03,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c,0x20,0x43,0x08,0x10,0xc0,0x10 } },
+{ 16, 0xdc80, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x30,0x00,0x0c,0x00 } },
+{ 16, 0xdc90, 0, {0x03,0x00,0x00,0xc0,0x00,0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x30,0x00 } },
+{ 16, 0xdca0, 0, {0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x01 } },
+{ 16, 0xdcb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x01,0x30,0x80,0x4c,0x20 } },
+{ 16, 0xdcc0, 0, {0x13,0x08,0x04,0xc2,0x01,0x30,0x80,0x4c,0x20,0x13,0x08,0x04,0xc3,0x01,0x30,0x80 } },
+{ 16, 0xdcd0, 0, {0x4c,0x20,0x13,0x08,0x04,0xc2,0x01,0x30,0x80,0x4c,0x30,0x13,0x08,0x04,0xc0,0x21 } },
+{ 16, 0xdce0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x42,0x05,0x60,0x81,0x58,0x20 } },
+{ 16, 0xdcf0, 0, {0x56,0x08,0x11,0x82,0x05,0x60,0x81,0x58,0x20,0x56,0x08,0x11,0x83,0x00,0x60,0x81 } },
+{ 16, 0xdd00, 0, {0x58,0x20,0x46,0x08,0x11,0x82,0x04,0x60,0x81,0x18,0x30,0x56,0x08,0x15,0x80,0x30 } },
+{ 16, 0xdd10, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x42,0x00,0x20,0x80,0x08,0x20 } },
+{ 16, 0xdd20, 0, {0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x82,0x00,0x30,0x80 } },
+{ 16, 0xdd30, 0, {0x08,0x20,0x02,0x00,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x03,0x08,0x00,0x80,0x31 } },
+{ 16, 0xdd40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x42,0x04,0x60,0x81,0x18,0x20 } },
+{ 16, 0xdd50, 0, {0x46,0x48,0x11,0x92,0x04,0x60,0x81,0x19,0x20,0x46,0x28,0x11,0x82,0x00,0x34,0x81 } },
+{ 16, 0xdd60, 0, {0x18,0x20,0x46,0x48,0x11,0x92,0x04,0x60,0x81,0x18,0x20,0x43,0x08,0x11,0x80,0x11 } },
+{ 16, 0xdd70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x60,0x04,0x58,0x01,0x56,0x00 } },
+{ 16, 0xdd80, 0, {0x55,0x80,0x15,0x60,0x04,0x58,0x01,0x16,0x00,0x55,0x80,0x01,0x60,0x04,0x18,0x01 } },
+{ 16, 0xdd90, 0, {0x56,0x00,0x45,0x80,0x11,0x60,0x04,0x58,0x01,0x16,0x00,0x41,0x80,0x11,0x40,0x31 } },
+{ 16, 0xdda0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x01,0x41,0x80,0x50,0x60 } },
+{ 16, 0xddb0, 0, {0x14,0x18,0x05,0x06,0x01,0x41,0x80,0x50,0x60,0x04,0x18,0x05,0x06,0x00,0x41,0x80 } },
+{ 16, 0xddc0, 0, {0x10,0x60,0x14,0x18,0x05,0x06,0x01,0x41,0x80,0x50,0x60,0x14,0x18,0x05,0x00,0x20 } },
+{ 16, 0xddd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00,0x80,0x40,0x20 } },
+{ 16, 0xdde0, 0, {0x10,0x48,0x04,0x12,0x01,0x00,0x80,0x41,0x20,0x10,0x08,0x04,0x02,0x01,0x04,0x80 } },
+{ 16, 0xddf0, 0, {0x40,0x20,0x50,0x48,0x04,0x12,0x01,0x00,0x84,0x40,0x20,0x10,0x08,0x04,0x00,0x20 } },
+{ 16, 0xde00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x46,0x03,0x51,0x80,0xd4,0x60 } },
+{ 16, 0xde10, 0, {0x30,0x18,0x0d,0x46,0x03,0x51,0x80,0xd5,0x60,0x35,0x18,0x0d,0x46,0x03,0x05,0x80 } },
+{ 16, 0xde20, 0, {0xd4,0x60,0x15,0x18,0x0d,0x46,0x03,0x11,0x80,0xd4,0x60,0x35,0x18,0x0d,0x40,0x31 } },
+{ 16, 0xde30, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x46,0x05,0x71,0x80,0x5c,0x60 } },
+{ 16, 0xde40, 0, {0x97,0x18,0x15,0xc6,0x05,0x71,0x81,0x5c,0x20,0x57,0x18,0x15,0xc6,0x03,0x70,0x81 } },
+{ 16, 0xde50, 0, {0x5c,0x60,0x57,0x18,0x11,0xc6,0x05,0x31,0x81,0x5c,0x60,0x77,0x18,0x15,0xc0,0x31 } },
+{ 16, 0xde60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x46,0x03,0x71,0x80,0xdc,0x60 } },
+{ 16, 0xde70, 0, {0x37,0x18,0x0d,0xc6,0x03,0x71,0x80,0xdd,0x60,0x37,0x18,0x05,0xc6,0x01,0x75,0x81 } },
+{ 16, 0xde80, 0, {0xdc,0x60,0x37,0x18,0x0d,0xc6,0x03,0x71,0x84,0x5c,0x60,0x17,0x18,0x19,0xc0,0x11 } },
+{ 16, 0xde90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x46,0x05,0x71,0x81,0x5c,0x60 } },
+{ 16, 0xdea0, 0, {0x57,0x18,0x14,0x86,0x05,0x71,0x81,0x5c,0x60,0x57,0x18,0x05,0xc6,0x04,0x31,0x81 } },
+{ 16, 0xdeb0, 0, {0x5c,0x60,0x57,0x18,0x15,0xc6,0x05,0x71,0x80,0x5c,0x60,0x43,0x18,0x15,0xc0,0x11 } },
+{ 16, 0xdec0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x20,0x80,0x48,0x20 } },
+{ 16, 0xded0, 0, {0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x70,0x80 } },
+{ 16, 0xdee0, 0, {0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x17,0x08,0x04,0x80,0x00 } },
+{ 16, 0xdef0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x01,0x61,0x80,0x58,0x60 } },
+{ 16, 0xdf00, 0, {0x16,0x18,0x41,0x86,0x01,0x61,0x80,0x18,0x60,0x06,0x3c,0x05,0x86,0x04,0x61,0x80 } },
+{ 16, 0xdf10, 0, {0x18,0x60,0x16,0x18,0x01,0x86,0x00,0x61,0x80,0x58,0x60,0x56,0x18,0x15,0x80,0x10 } },
+{ 16, 0xdf20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x40,0x05,0x70,0x01,0x5c,0x00 } },
+{ 16, 0xdf30, 0, {0x57,0x00,0x15,0xc0,0x04,0x70,0x01,0x5c,0x00,0x57,0x00,0x10,0xc0,0x04,0x70,0x00 } },
+{ 16, 0xdf40, 0, {0x1c,0x00,0x47,0x00,0x11,0xc0,0x04,0x70,0x01,0x5c,0x00,0x47,0x00,0x01,0xc0,0x11 } },
+{ 16, 0xdf50, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x42,0x00,0x60,0x80,0x18,0x20 } },
+{ 16, 0xdf60, 0, {0x06,0x08,0x01,0x82,0x00,0x60,0x80,0x18,0x20,0x06,0x08,0x00,0x82,0x00,0x60,0x80 } },
+{ 16, 0xdf70, 0, {0x18,0x20,0x06,0x08,0x01,0x82,0x00,0x60,0x80,0x18,0x20,0x06,0x08,0x01,0x80,0x11 } },
+{ 16, 0xdf80, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x42,0x04,0x20,0x81,0x08,0x20 } },
+{ 16, 0xdf90, 0, {0x42,0x08,0x10,0x82,0x04,0x20,0x81,0x08,0x20,0x42,0x08,0x11,0x82,0x04,0x20,0x80 } },
+{ 16, 0xdfa0, 0, {0x08,0x20,0x42,0x08,0x10,0x82,0x04,0x20,0x81,0x08,0x20,0x42,0x08,0x00,0x80,0x11 } },
+{ 16, 0xdfb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x42,0x05,0x40,0x81,0x50,0x20 } },
+{ 16, 0xdfc0, 0, {0x54,0x08,0x15,0x02,0x05,0x40,0x81,0x10,0x20,0x54,0x0c,0x15,0x42,0x00,0x40,0x81 } },
+{ 16, 0xdfd0, 0, {0x50,0x20,0x44,0x08,0x11,0x02,0x05,0x40,0x81,0x10,0x20,0x14,0x08,0x05,0x00,0x11 } },
+{ 16, 0xdfe0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x01,0x50,0xc0,0x54,0x30 } },
+{ 16, 0xdff0, 0, {0x15,0x08,0x05,0x42,0x01,0x50,0xc0,0x54,0x30,0x15,0x0c,0x05,0x43,0x01,0x50,0xc0 } },
+{ 16, 0xe000, 0, {0x54,0x30,0x15,0x0c,0x05,0x42,0x01,0x50,0xc0,0x54,0x30,0x15,0x0c,0x05,0x40,0x10 } },
+{ 16, 0xe010, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x42,0x00,0x10,0x80 } },
+{ 16, 0xe020, 0, {0x04,0x20,0x01,0x88,0x00,0x62,0x00,0x10,0x80,0x04,0x00,0x11,0x08,0x00,0x42,0x00 } },
+{ 16, 0xe030, 0, {0x10,0x80,0x04,0x20,0x01,0x08,0x00,0x42,0x01,0x10,0x80,0x04,0x20,0x01,0x00,0x00 } },
+{ 16, 0xe040, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x42,0x02,0x00,0x80,0x80,0x20 } },
+{ 16, 0xe050, 0, {0x20,0x08,0x08,0x02,0x02,0x20,0x80,0x80,0x20,0x20,0x28,0x00,0x02,0x02,0x00,0x80 } },
+{ 16, 0xe060, 0, {0x80,0x20,0x20,0x0a,0x08,0x02,0x02,0x00,0x80,0x00,0x20,0x20,0x08,0x08,0x00,0x11 } },
+{ 16, 0xe070, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x40,0x05,0x60,0x01,0x58,0x00 } },
+{ 16, 0xe080, 0, {0x56,0x00,0x05,0x80,0x05,0x60,0x01,0x58,0x08,0x56,0x00,0x15,0x80,0x07,0x60,0x02 } },
+{ 16, 0xe090, 0, {0x58,0x00,0x56,0x40,0x15,0x80,0x05,0x60,0x03,0x18,0x00,0x76,0x00,0x15,0x80,0x11 } },
+{ 16, 0xe0a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x40,0x03,0x60,0x00,0xd8,0x00 } },
+{ 16, 0xe0b0, 0, {0x36,0x00,0x0d,0x80,0x01,0x60,0x00,0xd8,0x0a,0x36,0x00,0x0d,0x80,0x05,0x70,0x09 } },
+{ 16, 0xe0c0, 0, {0xd8,0x01,0x36,0x00,0x0d,0x80,0x03,0x60,0x00,0xd8,0x00,0x57,0x00,0x0d,0x80,0x00 } },
+{ 16, 0xe0d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x30,0x01,0x0c,0x00 } },
+{ 16, 0xe0e0, 0, {0x43,0x00,0x10,0xc0,0x00,0x30,0x01,0x0c,0x00,0x43,0x20,0x10,0xc0,0x04,0x60,0x01 } },
+{ 16, 0xe0f0, 0, {0x0c,0x00,0x43,0x40,0x50,0xc1,0x04,0x30,0x01,0x0c,0x00,0x46,0x00,0x10,0xc0,0x00 } },
+{ 16, 0xe100, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x0c,0x00 } },
+{ 16, 0xe110, 0, {0x01,0x00,0x00,0xc0,0x00,0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xd0,0x00,0x20,0x00 } },
+{ 16, 0xe120, 0, {0x0c,0x00,0x03,0x40,0x00,0xc0,0x00,0x30,0x00,0x0d,0x00,0x02,0x00,0x00,0xc0,0x00 } },
+{ 16, 0xe130, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x31,0x40,0x4c,0x50 } },
+{ 16, 0xe140, 0, {0x13,0x10,0x04,0xc4,0x01,0x31,0x40,0x4c,0x50,0x13,0x14,0x04,0xc5,0x11,0x31,0x41 } },
+{ 16, 0xe150, 0, {0x4c,0x50,0x13,0x14,0x04,0xc5,0x01,0x31,0x40,0x4c,0x50,0x13,0x14,0x04,0xc0,0x00 } },
+{ 16, 0xe160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x05,0x68,0xc1,0x5a,0x30 } },
+{ 16, 0xe170, 0, {0x56,0x8c,0x11,0xa3,0x04,0x68,0xc1,0x1a,0x30,0x56,0x8c,0x11,0xa3,0x05,0x68,0xc0 } },
+{ 16, 0xe180, 0, {0x5a,0x30,0x46,0x8c,0x11,0xa3,0x04,0x68,0xc1,0x5a,0x30,0x16,0x8c,0x15,0x80,0x00 } },
+{ 16, 0xe190, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x08,0x00 } },
+{ 16, 0xe1a0, 0, {0x02,0x00,0x00,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x20,0x00,0x90,0x00,0x20,0x00 } },
+{ 16, 0xe1b0, 0, {0x08,0x00,0x02,0x40,0x00,0x80,0x00,0x20,0x00,0x09,0x00,0x02,0x00,0x00,0x80,0x00 } },
+{ 16, 0xe1c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x44,0x62,0x01,0x18,0x84 } },
+{ 16, 0xe1d0, 0, {0x46,0x21,0x11,0x88,0x44,0x62,0x11,0x18,0x84,0x46,0x01,0x11,0x88,0x44,0x62,0x10 } },
+{ 16, 0xe1e0, 0, {0x18,0x84,0x46,0x21,0x11,0x88,0x44,0x62,0x11,0x18,0x84,0x06,0x21,0x11,0x80,0x00 } },
+{ 16, 0xe1f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x50,0x11,0x54,0x04 } },
+{ 16, 0xe200, 0, {0x55,0x01,0x11,0x40,0x45,0x50,0x11,0x14,0x00,0x45,0x01,0x11,0x40,0x44,0x50,0x00 } },
+{ 16, 0xe210, 0, {0x14,0x04,0x45,0x00,0x15,0x40,0x44,0x50,0x11,0x14,0x04,0x55,0x01,0x11,0x40,0x00 } },
+{ 16, 0xe220, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x21,0x42,0x08,0x50,0x82 } },
+{ 16, 0xe230, 0, {0x14,0x20,0x85,0x08,0x21,0x42,0x08,0x50,0x82,0x04,0x20,0x85,0x08,0x21,0x42,0x08 } },
+{ 16, 0xe240, 0, {0x50,0x82,0x14,0x20,0x05,0x08,0x21,0x42,0x08,0x50,0x82,0x14,0x20,0x85,0x00,0x00 } },
+{ 16, 0xe250, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x01,0x02,0x80,0x40,0xa0 } },
+{ 16, 0xe260, 0, {0x10,0x28,0x04,0x0a,0x01,0x02,0x80,0x40,0xa0,0x10,0x28,0x40,0x0a,0x01,0x02,0x80 } },
+{ 16, 0xe270, 0, {0x40,0xa0,0x10,0x28,0x44,0x0a,0x01,0x02,0x80,0x40,0xa0,0x10,0x28,0x04,0x00,0x00 } },
+{ 16, 0xe280, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x03,0x53,0x00,0xd4,0xc0 } },
+{ 16, 0xe290, 0, {0x35,0x30,0x0d,0x4c,0x01,0x53,0x00,0xd4,0xc0,0x35,0x10,0x0c,0x4c,0x03,0x53,0x00 } },
+{ 16, 0xe2a0, 0, {0xd4,0xc0,0x35,0x30,0x0d,0x4c,0x03,0x53,0x00,0xd4,0xc0,0x35,0x30,0x0d,0x40,0x00 } },
+{ 16, 0xe2b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0x72,0x01,0x5c,0x80 } },
+{ 16, 0xe2c0, 0, {0x17,0x20,0x05,0xc8,0x06,0x72,0x01,0x5c,0x80,0x57,0x20,0x15,0xc8,0x02,0x72,0x01 } },
+{ 16, 0xe2d0, 0, {0x5c,0x80,0x57,0x20,0x15,0xc8,0x05,0x72,0x01,0x5c,0x80,0x37,0x20,0x11,0xc0,0x00 } },
+{ 16, 0xe2e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x18,0x40,0xc6,0x12,0x31 } },
+{ 16, 0xe2f0, 0, {0x84,0x8c,0x21,0x23,0x08,0x48,0xc6,0x12,0x30,0x84,0x0c,0x61,0x23,0x10,0x48,0xc2 } },
+{ 16, 0xe300, 0, {0x12,0x31,0x84,0x8c,0x01,0x23,0x08,0x48,0xc6,0x12,0x31,0x04,0x8c,0x61,0x00,0x00 } },
+{ 16, 0xe310, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0x4f,0xff,0xd3,0xff } },
+{ 16, 0xe320, 0, {0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff } },
+{ 16, 0xe330, 0, {0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x00,0x00 } },
+{ 16, 0xe340, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xe350, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xe360, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xe370, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xdb,0x0f,0xb6,0xc2,0xcd } },
+{ 16, 0xe380, 0, {0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x36,0xc2,0xdf,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x7e } },
+{ 16, 0xe390, 0, {0xc2,0xcd,0xb0,0xb7,0xfd,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x00,0x00 } },
+{ 16, 0xe3a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x3c,0x4f,0xcf,0x13,0x33 } },
+{ 16, 0xe3b0, 0, {0xc4,0xcc,0xf1,0x33,0x3c,0x4c,0xcf,0x13,0x3f,0xc4,0xcc,0xf1,0x33,0x3c,0x4c,0xff } },
+{ 16, 0xe3c0, 0, {0x13,0x33,0xc4,0xcf,0xfd,0x33,0x3c,0x4c,0xcf,0x13,0x33,0xc4,0xcc,0xf1,0x00,0x00 } },
+{ 16, 0xe3d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x7e,0x4e,0xdf,0x93,0xb7 } },
+{ 16, 0xe3e0, 0, {0xe4,0xec,0x79,0x3b,0x1e,0x4e,0xdf,0x93,0xbf,0xe4,0x8d,0xf9,0x3b,0x78,0x4e,0xff } },
+{ 16, 0xe3f0, 0, {0x93,0xb7,0xe4,0xed,0xfd,0x3b,0x1e,0x4e,0xdf,0x93,0xb7,0x84,0xed,0xf9,0x00,0x00 } },
+{ 16, 0xe400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x70,0x40,0x9c,0x10 } },
+{ 16, 0xe410, 0, {0x27,0x1c,0x09,0xc1,0x01,0x30,0x40,0x1c,0x10,0x67,0x04,0x09,0xc1,0x02,0x70,0x41 } },
+{ 16, 0xe420, 0, {0x9c,0x11,0x07,0x14,0x01,0xc1,0x02,0x70,0x40,0x9c,0x50,0x07,0x1c,0x01,0xc0,0x00 } },
+{ 16, 0xe430, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05,0x71,0x01,0x5c,0x40 } },
+{ 16, 0xe440, 0, {0x57,0x10,0x55,0xc4,0x01,0x31,0x00,0x5c,0x40,0x57,0x10,0x15,0xc4,0x05,0x71,0x01 } },
+{ 16, 0xe450, 0, {0xdc,0x40,0x17,0x18,0x1d,0xc4,0x05,0x71,0x05,0x5c,0x40,0x57,0x10,0x1d,0xc0,0x00 } },
+{ 16, 0xe460, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x20,0x80,0x48,0x20 } },
+{ 16, 0xe470, 0, {0x12,0x00,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80 } },
+{ 16, 0xe480, 0, {0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x60,0x12,0x08,0x04,0x80,0x00 } },
+{ 16, 0xe490, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x18,0x00 } },
+{ 16, 0xe4a0, 0, {0x06,0x00,0x41,0x80,0x00,0x60,0x00,0x18,0x00,0x46,0x00,0x01,0x80,0x00,0x60,0x00 } },
+{ 16, 0xe4b0, 0, {0x10,0x00,0x06,0x10,0x01,0x80,0x00,0x60,0x00,0x18,0x20,0x46,0x10,0x01,0x80,0x00 } },
+{ 16, 0xe4c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x72,0x01,0x1c,0x80 } },
+{ 16, 0xe4d0, 0, {0x47,0x20,0x11,0xc8,0x04,0x72,0x01,0x1c,0x80,0x07,0x20,0x11,0xc8,0x04,0x73,0x00 } },
+{ 16, 0xe4e0, 0, {0x1c,0x80,0x47,0x20,0x11,0xcc,0x04,0x72,0x01,0x1c,0x80,0x47,0x20,0x11,0xc0,0x00 } },
+{ 16, 0xe4f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x18,0x00 } },
+{ 16, 0xe500, 0, {0x06,0x00,0x01,0x84,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x40 } },
+{ 16, 0xe510, 0, {0x18,0x00,0x06,0x04,0x01,0x81,0x00,0x60,0x00,0x18,0x00,0x06,0x14,0x01,0x80,0x00 } },
+{ 16, 0xe520, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x22,0x01,0x08,0x80 } },
+{ 16, 0xe530, 0, {0x42,0x70,0x10,0x8c,0x04,0x22,0x01,0x08,0xc0,0x02,0x20,0x10,0x88,0x04,0x22,0x00 } },
+{ 16, 0xe540, 0, {0x08,0x80,0x42,0x50,0x10,0x08,0x04,0x22,0x01,0x09,0x00,0x42,0x40,0x10,0x80,0x00 } },
+{ 16, 0xe550, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2e,0x04,0x4a,0x81,0x12,0xa0 } },
+{ 16, 0xe560, 0, {0x44,0xa8,0x11,0x2a,0x04,0x4a,0x81,0x12,0xa0,0x04,0xa8,0x11,0x2a,0x04,0x4b,0x80 } },
+{ 16, 0xe570, 0, {0x12,0xa0,0x44,0x88,0x01,0x2e,0x04,0x4a,0x81,0x12,0x20,0x04,0x98,0x01,0x00,0x00 } },
+{ 16, 0xe580, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0,0x0e,0x00,0x53,0x00,0x14,0xc0 } },
+{ 16, 0xe590, 0, {0x05,0x30,0x01,0x4c,0x00,0x53,0x00,0x14,0xe0,0x05,0x30,0x01,0x4c,0x00,0x53,0x00 } },
+{ 16, 0xe5a0, 0, {0x04,0xc0,0x05,0x30,0x00,0x4c,0x00,0x03,0x00,0x14,0xc0,0x05,0x30,0x00,0x40,0x10 } },
+{ 16, 0xe5b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0,0x04,0x00,0x40,0x00,0x10,0x00 } },
+{ 16, 0xe5c0, 0, {0x04,0x58,0x01,0x04,0x00,0x40,0x00,0x10,0x00,0x04,0x00,0x01,0x00,0x00,0x41,0x00 } },
+{ 16, 0xe5d0, 0, {0x04,0x00,0x44,0x58,0x10,0x44,0x00,0x00,0x00,0x11,0x80,0x04,0x50,0x10,0x40,0x30 } },
+{ 16, 0xe5e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0,0x40,0x02,0x00,0x00,0x80,0x00 } },
+{ 16, 0xe5f0, 0, {0x20,0x00,0x08,0x00,0x40,0x00,0x00,0x00,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00 } },
+{ 16, 0xe600, 0, {0x84,0x00,0x00,0x00,0x08,0x40,0x02,0x00,0x00,0x80,0x00,0x20,0x00,0x08,0x40,0x30 } },
+{ 16, 0xe610, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0,0x40,0x00,0x60,0x01,0x18,0x00 } },
+{ 16, 0xe620, 0, {0x46,0x00,0x01,0x80,0x06,0x60,0x01,0x98,0x00,0x46,0x00,0x11,0x80,0x04,0x60,0x01 } },
+{ 16, 0xe630, 0, {0x18,0x00,0x46,0x00,0x11,0x80,0x04,0x20,0x01,0x18,0x00,0x66,0x00,0x11,0x80,0x30 } },
+{ 16, 0xe640, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x01,0x40,0x00,0x60,0x00,0x98,0x00 } },
+{ 16, 0xe650, 0, {0x26,0x00,0x09,0x80,0x02,0x60,0x01,0x98,0x00,0x06,0x00,0x0c,0x80,0x02,0x60,0x00 } },
+{ 16, 0xe660, 0, {0x18,0x00,0x06,0x00,0x01,0x80,0x02,0x60,0x00,0x98,0x80,0x06,0x00,0x01,0x82,0x00 } },
+{ 16, 0xe670, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x42,0x00,0x30,0x81,0x0c,0x20 } },
+{ 16, 0xe680, 0, {0x43,0x08,0x10,0xc2,0x24,0x30,0x81,0x8c,0x20,0x03,0x08,0x10,0xc2,0x04,0x20,0x80 } },
+{ 16, 0xe690, 0, {0x0c,0x20,0x03,0x08,0x18,0xc2,0x04,0x30,0x81,0x0c,0x20,0x43,0x08,0x18,0xc0,0x11 } },
+{ 16, 0xe6a0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x30,0x00,0x0c,0x00 } },
+{ 16, 0xe6b0, 0, {0x03,0x00,0x00,0xc0,0x40,0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0x80,0x00,0x30,0x00 } },
+{ 16, 0xe6c0, 0, {0x0c,0x00,0x03,0x20,0x00,0xc0,0x00,0x30,0x00,0x0c,0x00,0x03,0x20,0x00,0xc0,0x00 } },
+{ 16, 0xe6d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x02,0x10,0x30,0x80,0x0c,0x20 } },
+{ 16, 0xe6e0, 0, {0x03,0x08,0x00,0xc2,0x00,0x30,0x80,0x0c,0x20,0x03,0x08,0x00,0xc2,0x01,0x20,0x80 } },
+{ 16, 0xe6f0, 0, {0x0c,0x20,0x03,0x2c,0x00,0xc2,0x00,0x30,0x80,0x0c,0x30,0x43,0x2c,0x00,0xc0,0x00 } },
+{ 16, 0xe700, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x42,0x04,0x60,0x81,0x18,0x20 } },
+{ 16, 0xe710, 0, {0x46,0x08,0x11,0x82,0x04,0x60,0x80,0x18,0x20,0x46,0x08,0x11,0x82,0x04,0x60,0x81 } },
+{ 16, 0xe720, 0, {0x18,0x20,0x46,0x0c,0x11,0xc2,0x04,0x60,0x81,0x18,0x30,0x46,0x0c,0x11,0xc0,0x11 } },
+{ 16, 0xe730, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x42,0x00,0x20,0x80,0x08,0x20 } },
+{ 16, 0xe740, 0, {0x02,0x28,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80 } },
+{ 16, 0xe750, 0, {0x08,0x20,0x02,0x08,0x01,0x82,0x00,0x20,0x80,0x08,0x20,0x03,0x08,0x01,0x80,0x00 } },
+{ 16, 0xe760, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x01,0x42,0x04,0x60,0x81,0x18,0x20 } },
+{ 16, 0xe770, 0, {0x46,0x28,0x11,0x82,0x04,0x60,0x80,0x18,0x20,0x46,0x08,0x11,0x82,0x04,0x60,0x81 } },
+{ 16, 0xe780, 0, {0x18,0x20,0x46,0x08,0x10,0x82,0x04,0x60,0x81,0x18,0x20,0x43,0x08,0x10,0x80,0x00 } },
+{ 16, 0xe790, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x40,0x04,0x50,0x01,0x14,0x00 } },
+{ 16, 0xe7a0, 0, {0x45,0x00,0x11,0x40,0x25,0x00,0x00,0x14,0x00,0x45,0x00,0x11,0x40,0x04,0x50,0x01 } },
+{ 16, 0xe7b0, 0, {0x14,0x00,0x45,0x00,0x00,0x40,0x04,0x50,0x01,0x40,0x00,0x01,0x00,0x00,0x42,0x11 } },
+{ 16, 0xe7c0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x06,0x00,0x41,0x80,0x10,0x60 } },
+{ 16, 0xe7d0, 0, {0x04,0x18,0x01,0x06,0x00,0x41,0x80,0x10,0x60,0x04,0x18,0x01,0x06,0x00,0x41,0x80 } },
+{ 16, 0xe7e0, 0, {0x10,0x60,0x04,0x18,0x01,0x06,0x00,0x41,0x80,0x10,0x60,0x04,0x18,0x01,0x00,0x00 } },
+{ 16, 0xe7f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x02,0x05,0x00,0x80,0x40,0x21 } },
+{ 16, 0xe800, 0, {0x10,0x08,0x04,0x00,0x01,0x00,0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x80 } },
+{ 16, 0xe810, 0, {0x40,0x20,0x50,0x08,0x14,0x02,0x11,0x00,0x84,0x40,0x20,0x10,0x08,0x14,0x00,0x00 } },
+{ 16, 0xe820, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x46,0x01,0x51,0x80,0xd4,0x60 } },
+{ 16, 0xe830, 0, {0x35,0x18,0x0d,0x46,0x03,0x51,0x80,0xd4,0x60,0x15,0x18,0x0d,0x46,0x03,0x51,0x80 } },
+{ 16, 0xe840, 0, {0x54,0x60,0x15,0x18,0x0d,0x46,0x03,0x51,0x80,0xd4,0x60,0x35,0x18,0x0d,0x40,0x11 } },
+{ 16, 0xe850, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x46,0x04,0x71,0x81,0x1c,0x60 } },
+{ 16, 0xe860, 0, {0x45,0x18,0x11,0xd6,0x04,0x71,0x81,0x1c,0x60,0x67,0x18,0x11,0xc6,0x04,0x71,0x81 } },
+{ 16, 0xe870, 0, {0x9c,0x60,0x47,0x18,0x11,0xc6,0x04,0x71,0x81,0x1c,0x60,0x67,0x18,0x11,0xc0,0x00 } },
+{ 16, 0xe880, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x46,0x02,0x71,0x80,0x9c,0x60 } },
+{ 16, 0xe890, 0, {0x27,0x18,0x09,0xc6,0x00,0x71,0x80,0x9c,0x60,0x67,0x18,0x09,0xc6,0x02,0x71,0x80 } },
+{ 16, 0xe8a0, 0, {0x9c,0x61,0x27,0x18,0x01,0xc6,0x02,0x71,0x80,0x9c,0x60,0x07,0x18,0x01,0xc0,0x00 } },
+{ 16, 0xe8b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x45,0x46,0x05,0x71,0x81,0x5c,0x60 } },
+{ 16, 0xe8c0, 0, {0x57,0x18,0x55,0xd6,0x01,0x71,0x81,0x5c,0x60,0x57,0x18,0x15,0xc6,0x05,0x71,0x81 } },
+{ 16, 0xe8d0, 0, {0x5c,0x60,0x57,0x18,0x18,0xc6,0x05,0x71,0x81,0x5c,0x60,0x43,0x18,0x18,0x82,0x11 } },
+{ 16, 0xe8e0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x04,0x52,0x01,0x20,0x80,0x48,0x20 } },
+{ 16, 0xe8f0, 0, {0x12,0x48,0x04,0x90,0x01,0x20,0x80,0x49,0x20,0x12,0x08,0x04,0x82,0x01,0x24,0x80 } },
+{ 16, 0xe900, 0, {0x48,0x20,0x12,0x48,0x00,0x92,0x01,0x20,0x80,0x48,0x20,0x17,0x48,0x04,0x80,0x01 } },
+{ 16, 0xe910, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x06,0x00,0x61,0x80,0x18,0x60 } },
+{ 16, 0xe920, 0, {0x06,0x3c,0x01,0x86,0x00,0x61,0x80,0x18,0x60,0x46,0x18,0x01,0x86,0x00,0x61,0x80 } },
+{ 16, 0xe930, 0, {0x18,0x60,0x06,0x18,0x01,0x86,0x00,0x61,0x80,0x18,0x60,0x46,0x18,0x01,0x80,0x01 } },
+{ 16, 0xe940, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x60,0x04,0x78,0x01,0x1e,0x00 } },
+{ 16, 0xe950, 0, {0x47,0x80,0x11,0xe0,0x24,0x78,0x01,0x1e,0x00,0x07,0x80,0x11,0xe0,0x04,0x78,0x01 } },
+{ 16, 0xe960, 0, {0x1e,0x00,0x47,0x80,0x11,0xe0,0x04,0x38,0x01,0x1e,0x00,0x47,0x80,0x11,0xc0,0x11 } },
+{ 16, 0xe970, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x12,0x00,0x60,0x80,0x18,0x20 } },
+{ 16, 0xe980, 0, {0x06,0x48,0x01,0x92,0x00,0x60,0x80,0x19,0x20,0x06,0x08,0x01,0x82,0x00,0x64,0x80 } },
+{ 16, 0xe990, 0, {0x18,0x20,0x06,0x48,0x01,0x93,0x00,0x20,0x80,0x18,0x20,0x06,0x48,0x01,0x80,0x00 } },
+{ 16, 0xe9a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x42,0x04,0x20,0x81,0x08,0x20 } },
+{ 16, 0xe9b0, 0, {0x42,0x08,0x10,0x82,0x04,0x20,0x81,0x08,0x20,0x02,0x08,0x10,0x82,0x04,0x20,0x81 } },
+{ 16, 0xe9c0, 0, {0x08,0x20,0x42,0x08,0x10,0x8a,0x04,0x60,0x81,0x08,0x20,0x42,0x08,0x10,0x80,0x00 } },
+{ 16, 0xe9d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x42,0x04,0x40,0x81,0x10,0x20 } },
+{ 16, 0xe9e0, 0, {0x44,0x08,0x11,0x02,0x04,0x40,0x81,0x10,0x20,0x04,0x08,0x11,0x02,0x04,0x40,0x81 } },
+{ 16, 0xe9f0, 0, {0x10,0x21,0x44,0x08,0x01,0x02,0x04,0x50,0x81,0x10,0x20,0x04,0x08,0x01,0x00,0x11 } },
+{ 16, 0xea00, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x03,0x00,0x50,0xc0,0x14,0x30 } },
+{ 16, 0xea10, 0, {0x05,0x0c,0x01,0x43,0x00,0x50,0xc0,0x14,0x30,0x05,0x0c,0x01,0x43,0x00,0x50,0x80 } },
+{ 16, 0xea20, 0, {0x14,0x30,0x05,0x08,0x01,0x4a,0x00,0x50,0xc0,0x14,0x30,0x05,0x08,0x01,0x40,0x00 } },
+{ 16, 0xea30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x08,0x00,0x42,0x00,0x10,0x80 } },
+{ 16, 0xea40, 0, {0x04,0x20,0x01,0x08,0x00,0x42,0x00,0x10,0x80,0x04,0x20,0x01,0x08,0x00,0x42,0x00 } },
+{ 16, 0xea50, 0, {0x10,0x80,0x04,0x20,0x11,0x00,0x00,0x42,0x00,0x10,0x80,0x04,0x20,0x11,0x00,0x10 } },
+{ 16, 0xea60, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x42,0x02,0x00,0x80,0x80,0x20 } },
+{ 16, 0xea70, 0, {0x20,0x08,0x08,0x02,0x00,0x00,0x80,0x80,0x20,0x20,0x08,0x08,0x02,0x02,0x00,0x80 } },
+{ 16, 0xea80, 0, {0x80,0x20,0x20,0x08,0x08,0x02,0x02,0x00,0x80,0x80,0x20,0x20,0x08,0x08,0x00,0x11 } },
+{ 16, 0xea90, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x40,0x00,0x60,0x01,0x18,0x00 } },
+{ 16, 0xeaa0, 0, {0x46,0x00,0x11,0x80,0x06,0x60,0x01,0x18,0x00,0x46,0x00,0x11,0x80,0x04,0x60,0x01 } },
+{ 16, 0xeab0, 0, {0x18,0x00,0x46,0x00,0x11,0x80,0x04,0x60,0x01,0x18,0x00,0x66,0x00,0x11,0x80,0x10 } },
+{ 16, 0xeac0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x40,0x02,0x64,0x00,0x98,0x00 } },
+{ 16, 0xead0, 0, {0x26,0x00,0x09,0x90,0x06,0x60,0x01,0x98,0x00,0x26,0x40,0x09,0x80,0x02,0x60,0x00 } },
+{ 16, 0xeae0, 0, {0x98,0x00,0x26,0x00,0x00,0x90,0x02,0x60,0x00,0x98,0x00,0x07,0x00,0x01,0x80,0x00 } },
+{ 16, 0xeaf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x60,0x04,0x38,0x05,0x0e,0x00 } },
+{ 16, 0xeb00, 0, {0x43,0x80,0x10,0xe0,0x44,0x38,0x01,0x0e,0x00,0x43,0x80,0x10,0xe0,0x04,0x38,0x01 } },
+{ 16, 0xeb10, 0, {0x0e,0x00,0x43,0x80,0x18,0xa0,0x04,0x38,0x01,0x0e,0x00,0x46,0x80,0x18,0x80,0x11 } },
+{ 16, 0xeb20, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x01,0x00,0x30,0x40,0x0c,0x10 } },
+{ 16, 0xeb30, 0, {0x03,0x04,0x00,0xc5,0x00,0x30,0x40,0x0c,0x10,0x03,0x14,0x00,0xc1,0x00,0x30,0x40 } },
+{ 16, 0xeb40, 0, {0x0c,0x10,0x03,0x04,0x00,0x87,0x40,0x30,0x40,0x0c,0x10,0x02,0x04,0x00,0x80,0x00 } },
+{ 16, 0xeb50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x04,0x05,0x00,0x35,0x40,0x0c,0x50 } },
+{ 16, 0xeb60, 0, {0x03,0x14,0x00,0xd5,0x04,0x31,0x41,0x0c,0x50,0x03,0x5c,0x00,0xc5,0x00,0x31,0x00 } },
+{ 16, 0xeb70, 0, {0x0c,0x50,0x03,0x10,0x00,0x94,0x00,0x31,0x40,0x0c,0x50,0x43,0x10,0x00,0xc2,0x00 } },
+{ 16, 0xeb80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x43,0x05,0x20,0xc1,0x18,0x30 } },
+{ 16, 0xeb90, 0, {0x46,0x0c,0x11,0x97,0x00,0x60,0xc0,0x18,0x30,0x46,0x1c,0x11,0x83,0x04,0x60,0xc1 } },
+{ 16, 0xeba0, 0, {0x18,0x30,0x52,0x0c,0x11,0x87,0x04,0x60,0xc1,0x18,0x30,0x46,0x0c,0x11,0x80,0x11 } },
+{ 16, 0xebb0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x00,0x00,0x21,0x40,0x08,0x00 } },
+{ 16, 0xebc0, 0, {0x02,0x00,0x00,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0x00,0x20,0x00 } },
+{ 16, 0xebd0, 0, {0x08,0x00,0x02,0x00,0x00,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0x00 } },
+{ 16, 0xebe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x48,0x44,0x22,0x01,0x18,0x84 } },
+{ 16, 0xebf0, 0, {0x46,0x21,0x11,0x98,0x00,0x62,0x10,0x18,0x84,0x44,0x20,0x11,0x88,0x44,0x62,0x11 } },
+{ 16, 0xec00, 0, {0x18,0x84,0x42,0x21,0x11,0x80,0x44,0x62,0x11,0x18,0x84,0x46,0x21,0x11,0x80,0x00 } },
+{ 16, 0xec10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x40,0x04,0x50,0x11,0x14,0x04 } },
+{ 16, 0xec20, 0, {0x45,0x00,0x11,0x41,0x00,0x50,0x10,0x14,0x00,0x45,0x01,0x11,0x40,0x44,0x50,0x11 } },
+{ 16, 0xec30, 0, {0x14,0x04,0x45,0x01,0x01,0x40,0x44,0x50,0x11,0x14,0x04,0x05,0x01,0x01,0x40,0x11 } },
+{ 16, 0xec40, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x08,0x20,0x42,0x08,0x10,0x82 } },
+{ 16, 0xec50, 0, {0x04,0x20,0x01,0x08,0x20,0x42,0x08,0x10,0x82,0x04,0x20,0x81,0x08,0x20,0x42,0x08 } },
+{ 16, 0xec60, 0, {0x10,0x82,0x04,0x22,0x81,0x08,0x20,0x52,0x08,0x10,0x8a,0x04,0x22,0x81,0x00,0x00 } },
+{ 16, 0xec70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x0a,0x01,0x02,0x84,0x40,0xa1 } },
+{ 16, 0xec80, 0, {0x10,0x28,0x00,0x0a,0x01,0x02,0x80,0x40,0xa0,0x10,0x28,0x04,0x0a,0x01,0x02,0x80 } },
+{ 16, 0xec90, 0, {0x40,0xa0,0x10,0x2c,0x14,0x0a,0x00,0x02,0x80,0x40,0xb0,0x10,0x2c,0x14,0x00,0x00 } },
+{ 16, 0xeca0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x4d,0x03,0x53,0x40,0xd4,0xd0 } },
+{ 16, 0xecb0, 0, {0x35,0x30,0x0c,0x4d,0x03,0x53,0x40,0xd4,0xd0,0x35,0x34,0x0d,0x4d,0x03,0x53,0x40 } },
+{ 16, 0xecc0, 0, {0xd4,0xd0,0x35,0x34,0x0d,0x4d,0x02,0x13,0x40,0xd4,0xd0,0x35,0x34,0x0d,0x40,0x11 } },
+{ 16, 0xecd0, 0, {0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x08,0x04,0x72,0x01,0x1c,0x80 } },
+{ 16, 0xece0, 0, {0x47,0x20,0x15,0xc8,0x04,0x72,0x01,0x1c,0x80,0x47,0x20,0x11,0xc8,0x04,0x72,0x11 } },
+{ 16, 0xecf0, 0, {0x1c,0x80,0x47,0x26,0x11,0xc8,0x44,0x72,0x01,0x1c,0x90,0x67,0x26,0x11,0xc0,0x00 } },
+{ 16, 0xed00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x08,0x40,0xc6,0x12,0x31 } },
+{ 16, 0xed10, 0, {0x84,0x8c,0x01,0x03,0x08,0x48,0xc6,0x12,0x30,0x84,0x0c,0x61,0x23,0x18,0x48,0xc2 } },
+{ 16, 0xed20, 0, {0x12,0x31,0x84,0x8c,0x01,0x03,0x08,0x48,0xc6,0x12,0x31,0x04,0x8c,0x01,0x00,0x00 } },
+{ 16, 0xed30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0x4f,0xff,0xd3,0xff } },
+{ 16, 0xed40, 0, {0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff } },
+{ 16, 0xed50, 0, {0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x00,0x00 } },
+{ 16, 0xed60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xed70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xed80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xed90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0xfb,0x0f,0xb6,0xc2,0xcd } },
+{ 16, 0xeda0, 0, {0xb0,0xb7,0xfd,0x3f,0xfb,0x0b,0x36,0xc2,0xdf,0xb0,0xfb,0x6c,0x2c,0xdb,0x0b,0x7e } },
+{ 16, 0xedb0, 0, {0xc2,0xcd,0xb0,0xb7,0xfd,0x3f,0xfb,0x0b,0x36,0xc2,0xcd,0xf4,0xb7,0xfd,0x00,0x00 } },
+{ 16, 0xedc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0xfc,0x4f,0xcf,0x13,0x33 } },
+{ 16, 0xedd0, 0, {0xc4,0xcf,0xfd,0x3f,0xfc,0x4c,0xcf,0x13,0x3f,0xc4,0xfc,0xf1,0x33,0x3c,0x4c,0xff } },
+{ 16, 0xede0, 0, {0x13,0x33,0xc4,0xcf,0xfd,0x3f,0xfc,0x4c,0xcf,0x13,0x33,0xf4,0xcf,0xfd,0x00,0x00 } },
+{ 16, 0xedf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x7e,0x4e,0xdf,0x93,0xb7 } },
+{ 16, 0xee00, 0, {0xe4,0xed,0xf9,0x3f,0xfe,0x4e,0xdf,0x93,0xb7,0xe4,0xed,0xf9,0x3b,0x7e,0x4e,0xc7 } },
+{ 16, 0xee10, 0, {0x93,0xb7,0xe4,0xec,0x61,0x23,0x1e,0x4e,0xdf,0x93,0xb7,0x84,0xec,0x61,0x00,0x00 } },
+{ 16, 0xee20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x24,0xa1,0x4a,0x24 } },
+{ 16, 0xee30, 0, {0x63,0x01,0x14,0x02,0x44,0x00,0x81,0x0b,0x28,0x71,0x02,0x10,0x82,0x40,0x38,0x11 } },
+{ 16, 0xee40, 0, {0x41,0x04,0x50,0x08,0x18,0x82,0x87,0x38,0x31,0xc3,0x2c,0x52,0x0a,0x10,0x00,0x00 } },
+{ 16, 0xee50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x45,0x12,0x81,0x44,0x80 } },
+{ 16, 0xee60, 0, {0x71,0x21,0x1c,0x0a,0x07,0x1a,0x81,0x02,0xa0,0x52,0x20,0x14,0x48,0x07,0x12,0x81 } },
+{ 16, 0xee70, 0, {0xc6,0x80,0x60,0x20,0x08,0x88,0x47,0x02,0x01,0x4a,0x80,0x70,0x20,0x10,0x00,0x00 } },
+{ 16, 0xee80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xc5,0x2c,0x01,0x4a,0x00 } },
+{ 16, 0xee90, 0, {0x52,0x09,0x1c,0x80,0x07,0x24,0x21,0x08,0x08,0x71,0x02,0x10,0x80,0x45,0x20,0xa1 } },
+{ 16, 0xeea0, 0, {0x49,0x28,0x52,0x01,0x14,0xc0,0x45,0x00,0x91,0xc4,0x00,0x72,0x02,0x10,0x00,0x00 } },
+{ 16, 0xeeb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x07,0x20,0x01,0xc1,0x00 } },
+{ 16, 0xeec0, 0, {0x71,0x09,0x10,0x80,0x07,0x00,0x01,0x01,0x00,0x70,0x08,0x18,0x80,0x07,0x00,0x01 } },
+{ 16, 0xeed0, 0, {0x89,0x20,0x52,0x01,0x0c,0x80,0x46,0x30,0x81,0x45,0x04,0x60,0x00,0x10,0x00,0x00 } },
+{ 16, 0xeee0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc2,0x02,0x20,0x00,0x88 } },
+{ 16, 0xeef0, 0, {0x20,0x22,0x00,0x08,0xc2,0x22,0x80,0x40,0x88,0x02,0x22,0x00,0x08,0x82,0x0a,0xa0 } },
+{ 16, 0xef00, 0, {0x0c,0xa8,0x02,0x22,0x00,0x08,0x80,0x0a,0x00,0x80,0x8c,0x02,0x22,0x00,0x00,0x00 } },
+{ 16, 0xef10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x02,0x43,0x00,0x00,0x40,0x20 } },
+{ 16, 0xef20, 0, {0x30,0x08,0x04,0x40,0x41,0x30,0x10,0xc8,0x00,0x00,0x00,0x00,0x02,0x03,0x00,0x10 } },
+{ 16, 0xef30, 0, {0xc0,0x00,0x11,0x08,0x00,0xc2,0x43,0x10,0x80,0xc0,0x20,0x01,0x08,0x00,0x02,0x00 } },
+{ 16, 0xef40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0xc3,0x0a,0x20,0xc1,0x8c } },
+{ 16, 0xef50, 0, {0x12,0x22,0x04,0x88,0x01,0x36,0x20,0xc3,0x08,0x12,0x28,0x04,0x08,0x01,0x04,0x00 } },
+{ 16, 0xef60, 0, {0x4a,0xa8,0x22,0x01,0x04,0xc8,0x41,0x26,0x30,0xc0,0x88,0x02,0x21,0x00,0x02,0x00 } },
+{ 16, 0xef70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x0a,0x10,0xc1,0x80 } },
+{ 16, 0xef80, 0, {0x32,0x21,0x0c,0x88,0x43,0x02,0x80,0x44,0x80,0x12,0x29,0x04,0x08,0x42,0x0a,0x90 } },
+{ 16, 0xef90, 0, {0x8a,0x80,0x00,0x20,0x04,0x48,0x03,0x0a,0x10,0x82,0x80,0x00,0x20,0x00,0x02,0x00 } },
+{ 16, 0xefa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x87,0x02,0xa1,0x80,0xac } },
+{ 16, 0xefb0, 0, {0x43,0x29,0x14,0x8a,0x84,0x02,0xa1,0x00,0xac,0x41,0x20,0x10,0x08,0x06,0x26,0x31 } },
+{ 16, 0xefc0, 0, {0x80,0xa4,0x60,0x20,0x14,0x4a,0x44,0x32,0x81,0x81,0xac,0x60,0x2a,0x18,0x02,0x00 } },
+{ 16, 0xefd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x07,0x22,0x01,0xc5,0x80 } },
+{ 16, 0xefe0, 0, {0x73,0x21,0x1c,0xc8,0x07,0x2a,0x01,0x0c,0x80,0x72,0x20,0x10,0x48,0x47,0x26,0x11 } },
+{ 16, 0xeff0, 0, {0xc5,0x80,0x73,0x20,0x1c,0x88,0x07,0x2a,0x11,0x49,0x80,0x70,0x20,0x14,0x02,0x00 } },
+{ 16, 0xf000, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x45,0x10,0x31,0xc9,0x0c } },
+{ 16, 0xf010, 0, {0x73,0x02,0x1c,0xc0,0x47,0x04,0x01,0x0a,0x0c,0x51,0x0a,0x10,0x82,0x47,0x20,0x31 } },
+{ 16, 0xf020, 0, {0xc8,0x00,0x72,0x02,0x1c,0x40,0x05,0x30,0x11,0xc4,0x00,0x72,0x01,0x18,0x02,0x00 } },
+{ 16, 0xf030, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x10,0x06,0x24,0x01,0x45,0x04 } },
+{ 16, 0xf040, 0, {0x51,0x81,0x18,0x90,0x47,0x14,0x01,0x04,0x04,0x71,0x88,0x10,0x12,0x05,0x34,0x01 } },
+{ 16, 0xf050, 0, {0x44,0x04,0x51,0x40,0x18,0xd0,0x07,0x38,0x01,0xc4,0x04,0x52,0x01,0x14,0xc2,0x04 } },
+{ 16, 0xf060, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x87,0x00,0x21,0x89,0x0c } },
+{ 16, 0xf070, 0, {0x60,0x01,0x1c,0xd0,0x45,0x24,0x01,0xc1,0x0c,0x42,0x01,0x00,0x00,0xc5,0x20,0x31 } },
+{ 16, 0xf080, 0, {0x41,0x08,0x40,0x00,0x18,0x80,0x45,0x00,0x21,0x41,0x0c,0x70,0x42,0x1c,0xc2,0x00 } },
+{ 16, 0xf090, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x1c,0x80,0xc4,0x20 } },
+{ 16, 0xf0a0, 0, {0x31,0x08,0x10,0x42,0x42,0x08,0x80,0xc6,0x20,0x31,0x09,0x00,0x20,0x03,0x1c,0x90 } },
+{ 16, 0xf0b0, 0, {0xc4,0x20,0x01,0x49,0x0c,0x42,0x43,0x10,0x80,0x44,0x20,0x31,0x08,0x10,0x00,0x00 } },
+{ 16, 0xf0c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x83,0x20,0x30,0x48,0x0c } },
+{ 16, 0xf0d0, 0, {0x32,0x40,0x10,0x90,0x81,0x24,0x20,0xc8,0x04,0x32,0x40,0x10,0x20,0xc3,0x20,0x80 } },
+{ 16, 0xf0e0, 0, {0xc8,0x00,0x02,0x4a,0x0c,0xa0,0x01,0x24,0x10,0xc8,0x08,0x32,0x41,0x10,0x00,0x00 } },
+{ 16, 0xf0f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x90,0x03,0x00,0x00,0xc9,0x04 } },
+{ 16, 0xf100, 0, {0x30,0x40,0x00,0x90,0x00,0x20,0x00,0x80,0x00,0x10,0x40,0x10,0x00,0x40,0x20,0x10 } },
+{ 16, 0xf110, 0, {0xc2,0x00,0x00,0x80,0x08,0x20,0x43,0x08,0x10,0x81,0x00,0x32,0x40,0x0c,0xc0,0x04 } },
+{ 16, 0xf120, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x40,0x00,0x00,0x00 } },
+{ 16, 0xf130, 0, {0x10,0x00,0x00,0xf0,0x10,0x20,0x00,0x00,0x00,0x10,0x00,0x00,0xf0,0x10,0x80,0x40 } },
+{ 16, 0xf140, 0, {0x00,0x00,0x00,0x40,0x00,0xf0,0x10,0x90,0x80,0x00,0x00,0x00,0x00,0x00,0xc0,0x00 } },
+{ 16, 0xf150, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x3c,0x10,0x80,0x90,0x40,0x00,0x00 } },
+{ 16, 0xf160, 0, {0x00,0x80,0x10,0x90,0xa0,0x90,0x00,0x00,0x00,0x00,0x00,0x10,0x90,0x80,0x80,0x00 } },
+{ 16, 0xf170, 0, {0x00,0x00,0x00,0x00,0x10,0x90,0x80,0x90,0x00,0x00,0x00,0x00,0x40,0x10,0x8f,0x0f } },
+{ 16, 0xf180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0xc6,0xba,0x06,0xc0,0x1c } },
+{ 16, 0xf190, 0, {0x49,0x28,0x61,0x14,0x2b,0x1c,0x0e,0x40,0x3f,0xd9,0xbf,0xd9,0xaa,0xbc,0x1a,0x5f } },
+{ 16, 0xf1a0, 0, {0x00,0x10,0xa6,0x50,0x3b,0x61,0xb3,0x25,0xbc,0x40,0x19,0xbf,0xff,0xe9,0x80,0x00 } },
+{ 16, 0xf1b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x92,0x14,0x94,0x80,0x0c } },
+{ 16, 0xf1c0, 0, {0x07,0x3f,0x2b,0x94,0x86,0x14,0x84,0x80,0x28,0x00,0x00,0x49,0x14,0x04,0x86,0x12 } },
+{ 16, 0xf1d0, 0, {0x80,0x00,0x41,0x27,0x34,0xd0,0x90,0x84,0x92,0x00,0x2d,0x8a,0x21,0x1e,0x80,0x00 } },
+{ 16, 0xf1e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xa2 } },
+{ 16, 0xf1f0, 0, {0xb1,0x01,0x01,0x00,0x00,0x00,0x00,0x08,0x84,0xb1,0x78,0x28,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf200, 0, {0x08,0xb1,0x32,0x14,0x14,0x00,0x00,0x00,0x00,0x08,0xa8,0x23,0x54,0x21,0x40,0x00 } },
+{ 16, 0xf210, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf220, 0, {0x00,0x00,0x00,0x2f,0xff,0xfe,0xf7,0xc0,0x00,0x00,0x00,0x00,0x2f,0xd7,0xfe,0xef } },
+{ 16, 0xf230, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0x7f,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf240, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf250, 0, {0x00,0x00,0x00,0x0f,0xef,0x77,0xff,0xc0,0x00,0x00,0x00,0x00,0x3e,0xff,0xfe,0xef } },
+{ 16, 0xf260, 0, {0x40,0x00,0x00,0x00,0x00,0x3f,0xff,0xbf,0xff,0x40,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf270, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf280, 0, {0x00,0x00,0x00,0x3f,0xff,0xdf,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff } },
+{ 16, 0xf290, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0x7f,0x2f,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf2a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf2b0, 0, {0x00,0x00,0x00,0x1f,0xff,0xff,0xef,0xc0,0x00,0x00,0x00,0x00,0x1f,0xef,0xef,0xef } },
+{ 16, 0xf2c0, 0, {0xc0,0x00,0x00,0x00,0x00,0x2f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf2d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf2e0, 0, {0x00,0x00,0x00,0x3f,0xff,0xef,0xff,0xc0,0x00,0x00,0x00,0x00,0x2f,0xaf,0xdf,0xff } },
+{ 16, 0xf2f0, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xef,0xff,0xf7,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf300, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf310, 0, {0x00,0x00,0x00,0x3f,0xdf,0xdf,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff } },
+{ 16, 0xf320, 0, {0xc0,0x00,0x00,0x00,0x00,0x1f,0xff,0xdf,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf330, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xc4,0x24,0xa1,0x00,0x2c } },
+{ 16, 0xf340, 0, {0x52,0x0b,0x18,0xc2,0x86,0x2c,0xa1,0x80,0x38,0x62,0x0a,0x08,0x40,0xc4,0x2c,0xa1 } },
+{ 16, 0xf350, 0, {0x08,0x28,0x42,0x0b,0x14,0x00,0x85,0x14,0xa1,0x08,0x28,0x43,0x0a,0x10,0x00,0x00 } },
+{ 16, 0xf360, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x12,0x01,0x03,0x80 } },
+{ 16, 0xf370, 0, {0x61,0x20,0x10,0x08,0x07,0x12,0x41,0x42,0x80,0x70,0x20,0x1c,0x08,0x04,0x1a,0x01 } },
+{ 16, 0xf380, 0, {0x84,0x81,0x40,0x20,0x18,0x08,0x46,0x36,0x81,0x05,0x80,0x63,0x20,0x10,0x00,0x01 } },
+{ 16, 0xf390, 0, {0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x24,0x21,0x00,0x0c } },
+{ 16, 0xf3a0, 0, {0x52,0x02,0x14,0x00,0x87,0x28,0x21,0x81,0x08,0x72,0x06,0x1c,0x82,0x84,0x20,0x21 } },
+{ 16, 0xf3b0, 0, {0x48,0x18,0x42,0x03,0x54,0x80,0x45,0x30,0x25,0x4a,0x18,0x53,0x02,0x10,0x00,0x01 } },
+{ 16, 0xf3c0, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x22,0x01,0x01,0x80 } },
+{ 16, 0xf3d0, 0, {0x42,0x20,0x18,0xc8,0x44,0x22,0x01,0x80,0x84,0x42,0x20,0x1c,0x88,0x04,0x22,0x01 } },
+{ 16, 0xf3e0, 0, {0x00,0x80,0x40,0x20,0x10,0x88,0x44,0x36,0x01,0x40,0x80,0x41,0x00,0x10,0x00,0x00 } },
+{ 16, 0xf3f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x08,0x20,0x00,0x0c } },
+{ 16, 0xf400, 0, {0x22,0x03,0x04,0x40,0x81,0x00,0x20,0x84,0x08,0x03,0x00,0x00,0x80,0xc2,0x00,0x20 } },
+{ 16, 0xf410, 0, {0xc4,0x08,0x00,0x03,0x08,0x88,0x82,0x16,0xa0,0x40,0x88,0x32,0x22,0x80,0x00,0x00 } },
+{ 16, 0xf420, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x02,0x01,0x00,0x80,0x04,0x20 } },
+{ 16, 0xf430, 0, {0x10,0x08,0x0c,0xc2,0x12,0x10,0x84,0xc8,0x22,0x12,0x08,0x04,0x02,0x03,0x00,0x88 } },
+{ 16, 0xf440, 0, {0x00,0x21,0x00,0x0c,0x0c,0x40,0x41,0x30,0x00,0x84,0x20,0x10,0x08,0x00,0x02,0x00 } },
+{ 16, 0xf450, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x82,0x06,0x20,0x08,0x8c } },
+{ 16, 0xf460, 0, {0x32,0x22,0x0c,0x88,0x81,0x26,0x20,0x4d,0x88,0x23,0x22,0x80,0x88,0x83,0x06,0x20 } },
+{ 16, 0xf470, 0, {0x08,0x88,0x00,0x23,0x04,0x8a,0x81,0x36,0x20,0x4b,0x88,0x32,0x22,0x00,0x00,0x00 } },
+{ 16, 0xf480, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x02,0x02,0x00,0x09,0x80 } },
+{ 16, 0xf490, 0, {0x32,0x20,0x04,0x88,0x60,0x22,0x00,0x89,0x84,0x00,0x20,0x08,0x98,0x00,0x02,0x00 } },
+{ 16, 0xf4a0, 0, {0x00,0x80,0x00,0x20,0x00,0x08,0x02,0x3a,0x80,0x48,0x80,0x30,0x20,0x00,0x02,0x00 } },
+{ 16, 0xf4b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x0a,0xc4,0x1a,0xa1,0x80,0xa8 } },
+{ 16, 0xf4c0, 0, {0x41,0x2a,0x10,0xca,0xc7,0x1a,0xa1,0x04,0xad,0x71,0x2a,0x18,0x4a,0xd4,0x06,0xb1 } },
+{ 16, 0xf4d0, 0, {0x00,0xa8,0x71,0x2a,0x10,0x08,0x84,0x26,0x29,0x06,0xac,0x52,0x2a,0x10,0x02,0x00 } },
+{ 16, 0xf4e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x04,0x2a,0x01,0x41,0x80 } },
+{ 16, 0xf4f0, 0, {0x42,0x20,0x1c,0x00,0x04,0x0a,0x01,0x09,0x84,0x51,0x20,0x1c,0x88,0x44,0x02,0x01 } },
+{ 16, 0xf500, 0, {0x08,0x80,0x40,0x20,0x10,0x4a,0x47,0x02,0x01,0x48,0x80,0x63,0x20,0x10,0x02,0x00 } },
+{ 16, 0xf510, 0, {0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0xc4,0x10,0x21,0x81,0x0c } },
+{ 16, 0xf520, 0, {0x41,0x02,0x0c,0x00,0xc0,0x20,0x61,0x0d,0x0e,0x72,0x02,0x1c,0x40,0xc4,0x08,0x31 } },
+{ 16, 0xf530, 0, {0x04,0x18,0x42,0x02,0x10,0x80,0x87,0x20,0xb1,0xc4,0x0c,0x53,0x02,0x10,0x00,0x00 } },
+{ 16, 0xf540, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x20,0x07,0x24,0x01,0xcc,0x00 } },
+{ 16, 0xf550, 0, {0x72,0x40,0x14,0x00,0x04,0x24,0x01,0x08,0x00,0x73,0x41,0x10,0xc0,0x07,0x30,0x11 } },
+{ 16, 0xf560, 0, {0xcc,0x00,0x71,0x01,0x10,0x02,0x04,0x20,0x81,0x46,0x10,0x42,0x40,0x10,0x02,0x04 } },
+{ 16, 0xf570, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0xc5,0x10,0x21,0x00,0x08 } },
+{ 16, 0xf580, 0, {0x62,0x02,0x1c,0x90,0xc5,0x24,0x21,0x00,0x0c,0x70,0x82,0x1c,0x10,0xc4,0x20,0x31 } },
+{ 16, 0xf590, 0, {0x88,0x02,0x40,0x06,0x1c,0x00,0x85,0x00,0xa1,0x00,0x0c,0x40,0x42,0x00,0x02,0x00 } },
+{ 16, 0xf5a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x05,0x14,0x80,0x01,0x20 } },
+{ 16, 0xf5b0, 0, {0x30,0x08,0x0c,0x42,0x06,0x00,0x80,0x01,0x24,0x51,0x08,0x0c,0x02,0x41,0x00,0x80 } },
+{ 16, 0xf5c0, 0, {0x4c,0x20,0x00,0x08,0x0c,0x30,0x42,0x04,0x00,0x04,0x20,0x00,0x08,0x00,0x00,0x00 } },
+{ 16, 0xf5d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xc6,0x24,0x20,0x00,0x0c } },
+{ 16, 0xf5e0, 0, {0x32,0xc2,0x04,0x80,0xc7,0x30,0x20,0x00,0x0c,0x53,0xc2,0x04,0x10,0xc2,0x28,0x70 } },
+{ 16, 0xf5f0, 0, {0x0c,0x09,0x02,0x02,0x4c,0x80,0x81,0x04,0x30,0x09,0x0c,0x02,0x42,0x10,0x00,0x00 } },
+{ 16, 0xf600, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x80,0x01,0x38,0x00,0x02,0x00 } },
+{ 16, 0xf610, 0, {0x12,0x40,0x0c,0x20,0x07,0x34,0x04,0x02,0x00,0x63,0x01,0x08,0x10,0x00,0x24,0x10 } },
+{ 16, 0xf620, 0, {0x04,0x00,0x02,0x01,0x04,0x82,0x01,0x08,0x80,0x09,0x10,0x02,0x40,0x10,0x00,0x04 } },
+{ 16, 0xf630, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x20,0x10,0x80,0x00,0x00 } },
+{ 16, 0xf640, 0, {0x20,0x80,0x00,0xf0,0x20,0x10,0x80,0x00,0x00,0x20,0x80,0x00,0xd0,0x80,0x00,0x00 } },
+{ 16, 0xf650, 0, {0x40,0x00,0x00,0x00,0x00,0x30,0x10,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0xcc,0x40 } },
+{ 16, 0xf660, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x3c,0x10,0x80,0x80,0x00,0x00,0x00 } },
+{ 16, 0xf670, 0, {0x00,0x00,0x10,0x90,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x10,0x90,0x80,0x00,0x90 } },
+{ 16, 0xf680, 0, {0x80,0x00,0x10,0x00,0x00,0x10,0xa0,0x80,0x00,0x00,0x00,0x20,0x00,0x10,0x8c,0x08 } },
+{ 16, 0xf690, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x1a,0xbe,0x17,0x80,0x00 } },
+{ 16, 0xf6a0, 0, {0x3e,0x40,0x26,0x6f,0xba,0xe3,0x24,0x80,0x00,0x16,0x59,0xbd,0x82,0x81,0x82,0xd8 } },
+{ 16, 0xf6b0, 0, {0x80,0x00,0x00,0x19,0x99,0x86,0x80,0x64,0x80,0xc0,0x3f,0xd9,0x99,0x80,0x00,0x01 } },
+{ 16, 0xf6c0, 0, {0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x16,0x02,0x94,0x00,0x16 } },
+{ 16, 0xf6d0, 0, {0xc0,0x16,0x94,0x82,0x90,0x16,0x10,0x80,0x21,0x18,0x28,0x28,0x02,0x0a,0x02,0x08 } },
+{ 16, 0xf6e0, 0, {0x80,0x00,0x00,0x00,0x00,0x02,0x82,0x80,0x14,0x00,0x01,0x14,0x11,0xa0,0x40,0x00 } },
+{ 16, 0xf6f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x84 } },
+{ 16, 0xf700, 0, {0x02,0x84,0xa8,0x80,0x00,0x00,0x00,0x08,0x91,0x22,0x84,0x41,0xa2,0x08,0x24,0x01 } },
+{ 16, 0xf710, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x84,0x01,0x44,0x01,0x00,0x00 } },
+{ 16, 0xf720, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf730, 0, {0x00,0x00,0x00,0x3e,0xf7,0xff,0xf7,0xc0,0x00,0x00,0x00,0x00,0x2f,0xe7,0xb7,0xff } },
+{ 16, 0xf740, 0, {0xc0,0x00,0x00,0x00,0x00,0x2f,0xfe,0x7f,0xf7,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf750, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf760, 0, {0x00,0x00,0x00,0x36,0xbf,0xfe,0xdf,0xc0,0x00,0x00,0x00,0x00,0x0f,0xf7,0xdf,0xff } },
+{ 16, 0xf770, 0, {0xc0,0x00,0x00,0x00,0x00,0x3d,0xb7,0xb7,0xef,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf780, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf790, 0, {0x00,0x00,0x00,0x1f,0xdf,0xdf,0xff,0xc0,0x00,0x00,0x00,0x00,0x0f,0xdf,0xdf,0xff } },
+{ 16, 0xf7a0, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xef,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf7b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf7c0, 0, {0x00,0x00,0x00,0x3f,0xbf,0x7f,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0x7f,0xf7 } },
+{ 16, 0xf7d0, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xdf,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf7e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf7f0, 0, {0x00,0x00,0x00,0x3f,0x7e,0xff,0xff,0x40,0x00,0x00,0x00,0x00,0x3f,0xfe,0xff,0xff } },
+{ 16, 0xf800, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf810, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 } },
+{ 16, 0xf820, 0, {0x00,0x00,0x00,0x37,0xff,0x6f,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff } },
+{ 16, 0xf830, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf840, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf850, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf860, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf870, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x20,0x01,0x02,0x00,0x00,0x00 } },
+{ 16, 0xf880, 0, {0x30,0x00,0x43,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf890, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf8a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf8b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf8c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf8d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf8e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf8f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0,0x00,0x00,0x00,0x00,0x30 } },
+{ 16, 0xf900, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf910, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf920, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf930, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf940, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf950, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0,0x30,0xc0,0x00 } },
+{ 16, 0xf960, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf970, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf980, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf990, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf9a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf9b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0,0x30,0xc0,0x30,0xc0,0x30 } },
+{ 16, 0xf9c0, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf9d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf9e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xf9f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfa00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfa10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x0f } },
+{ 16, 0xfa20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfa30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfa40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfa50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfa60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfa70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xc0,0x00,0x00,0x00,0x00,0x3f } },
+{ 16, 0xfa80, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfa90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfaa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfab0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfac0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfad0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x30,0xc0,0x30,0xc0,0x0f } },
+{ 16, 0xfae0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfaf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfb00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfb10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfb20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfb30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0x6b,0x00,0xc0,0x00,0xcf,0x2c } },
+{ 16, 0xfb40, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfb50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfb60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfb70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfb80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfb90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x0f,0x00,0x00 } },
+{ 16, 0xfba0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfbb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfbc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfbd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfbe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfbf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0,0x0f,0x00,0x0f,0x00,0x30 } },
+{ 16, 0xfc00, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfc10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfc20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfc30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfc40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfc50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xc0,0x3f,0xc0,0x00 } },
+{ 16, 0xfc60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfc70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfc80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfc90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfca0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfcb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0,0x3f,0xc0,0x3f,0xc0,0x30 } },
+{ 16, 0xfcc0, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfcd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfce0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfcf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfd00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfd10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x0f,0x00,0x0f,0x00,0x0f } },
+{ 16, 0xfd20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfd30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfd40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfd50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfd60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfd70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xc0,0x0f,0x00,0x0f,0x00,0x3f } },
+{ 16, 0xfd80, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfd90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfda0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfdb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfdc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfdd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x3f,0xc0,0x3f,0xc0,0x0f } },
+{ 16, 0xfde0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfdf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfe00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfe10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfe20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfe30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x33,0x5d,0x80,0xc0,0x00,0xfd,0xac } },
+{ 16, 0xfe40, 0, {0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfe50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfe60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfe70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfe80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfe90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfea0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfeb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfec0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfed0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfee0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfef0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0,0x00,0x00,0x00,0x00,0x30 } },
+{ 16, 0xff00, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xff10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xff20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xff30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xff40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xff50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0,0x30,0xc0,0x00 } },
+{ 16, 0xff60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xff70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xff80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xff90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xffa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xffb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0,0x30,0xc0,0x30,0xc0,0x30 } },
+{ 16, 0xffc0, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xffd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xffe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0xfff0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8010, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8020, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x0f } },
+{ 16, 0x8030, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8040, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8050, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8060, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8080, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xc0,0x00,0x00,0x00,0x00,0x3f } },
+{ 16, 0x8090, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x80a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x80b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x80c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x80d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x80e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x30,0xc0,0x30,0xc0,0x0f } },
+{ 16, 0x80f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8100, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8110, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8130, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8140, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0x74,0xc0,0xc0,0x00,0xf0,0xec } },
+{ 16, 0x8150, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8170, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8190, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x81a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x0f,0x00,0x00 } },
+{ 16, 0x81b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x81c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x81d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x81e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x81f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8200, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0,0x0f,0x00,0x0f,0x00,0x30 } },
+{ 16, 0x8210, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8220, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8230, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8240, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8250, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8260, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xc0,0x3f,0xc0,0x00 } },
+{ 16, 0x8270, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8280, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8290, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x82a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x82b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x82c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x86,0x10,0x80,0x30,0x82,0x3d } },
+{ 16, 0x82d0, 0, {0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x82e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x82f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8300, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8310, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8320, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x0f,0x00,0x0f,0x00,0x0f } },
+{ 16, 0x8330, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8340, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8350, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8360, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8370, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8380, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xc0,0x0f,0x00,0x0f,0x00,0x3f } },
+{ 16, 0x8390, 0, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x83a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x83b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x83c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x83d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x83e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x3f,0xc0,0x3f,0xc0,0x0f } },
+{ 16, 0x83f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8410, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8420, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8430, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8440, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x65,0x25,0xe4,0x80,0x00,0xb0,0x88 } },
+{ 16, 0x8450, 0, {0xab,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8460, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8470, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8480, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8490, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x84a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x84b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x84c0, 0, {0x00,0x00,0x00,0x00,0x30,0x00,0x20,0x01,0x02,0x02,0x00,0x00,0x30,0x00,0x43,0x00 } },
+{ 16, 0x84d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x84e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x84f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8500, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8510, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8520, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8530, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8540, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8550, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8560, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8570, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8580, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8590, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x85a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x85b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x85c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x85d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x85e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x85f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8600, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8610, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8620, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8630, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8640, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8650, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8660, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8670, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8680, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8690, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x86a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x86b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x86c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x86d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x86e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x86f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8700, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8710, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8720, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8730, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8740, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8750, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8760, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8770, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8780, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8790, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x87a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x87b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x87c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x87d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x87e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x87f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8800, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8810, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8820, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8830, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8840, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8850, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8860, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8870, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8880, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8890, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x88a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x88b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x88c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x88d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x88e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x88f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8900, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8910, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8920, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8930, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8940, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8950, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8960, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8970, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8980, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8990, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x89a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x89b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x89c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x89d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x89e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x89f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8a90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8aa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ab0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ac0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ad0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ae0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8af0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8b90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ba0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8bb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8bc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8bd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8be0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8bf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8c90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ca0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8cb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8cc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8cd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ce0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8cf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8d90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8da0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8db0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8dc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8dd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8de0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8df0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8e90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ea0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8eb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ec0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ed0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ee0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ef0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8f90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8fa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8fb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8fc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8fd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8fe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x8ff0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9000, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9010, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9020, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9030, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9040, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9050, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9060, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9080, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9090, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x90a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x90b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x90c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x90d0, 0, {0x30,0x00,0x00,0x01,0x00,0x00,0x44,0x72,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x03 } },
+{ 16, 0x90e0, 0, {0x30,0x00,0x40,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x90f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9100, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 16, 0x9110, 0, {0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x05,0x30,0x00,0xa0,0x01 } },
+{ 16, 0x9120, 0, {0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x01,0x00,0x00,0xe1,0x5a,0x00,0x00,0x00,0x00 } },
+{ 12, 0x9130, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } },
+{ 0 , 0x0000, 1, {0 }}
+};
+// VERSION=1.1.1.131
+// DATE=2001dec06
+// PRODUCT=EMI 2|6
+/*
+ * This firmware is for the Emagic EMI 2|6 Audio Interface
+ *
+ * The firmware contained herein is Copyright (c) 1999-2002 Emagic
+ * as an unpublished work. This notice does not imply unrestricted
+ * or public access to this firmware which is a trade secret of Emagic,
+ * and which may not be reproduced, used, sold or transferred to
+ * any third party without Emagic's written consent. All Rights Reserved.
+ *
+ * This firmware may not be modified and may only be used with the
+ * Emagic EMI 2|6 Audio Interface. Distribution and/or Modification of
+ * any driver which includes this firmware, in whole or in part,
+ * requires the inclusion of this statement.
+ */
+static INTEL_HEX_RECORD g_Firmware[] = {
+{ 3,0x0000,0,{0x02,0x43,0x56} },
+{ 3,0x0003,0,{0x02,0x4b,0xcd} },
+{ 3,0x000b,0,{0x02,0x4b,0xd2} },
+{ 3,0x0013,0,{0x02,0x4b,0x92} },
+{ 3,0x001b,0,{0x02,0x4b,0xd5} },
+{ 3,0x0023,0,{0x02,0x1b,0x39} },
+{ 3,0x002b,0,{0x02,0x43,0xe2} },
+{ 3,0x0033,0,{0x02,0x3f,0xf3} },
+{ 3,0x003b,0,{0x02,0x4b,0xc0} },
+{ 3,0x0043,0,{0x02,0x47,0x00} },
+{ 3,0x004b,0,{0x02,0x3f,0xfc} },
+{ 3,0x0053,0,{0x02,0x37,0xfa} },
+{ 3,0x005b,0,{0x02,0x4b,0xc7} },
+{ 3,0x0063,0,{0x02,0x46,0xfc} },
+{ 16,0x0500,0,{0x12,0x01,0x10,0x01,0x00,0x00,0x00,0x40,0x6a,0x08,0x01,0x01,0x00,0x01,0x01,0x02} },
+{ 16,0x0510,0,{0x00,0x01,0x09,0x02,0xb8,0x01,0x03,0x01,0x00,0x80,0xa0,0x09,0x04,0x00,0x00,0x00} },
+{ 16,0x0520,0,{0x01,0x01,0x00,0x00,0x0a,0x24,0x01,0x00,0x01,0x56,0x00,0x02,0x01,0x02,0x0c,0x24} },
+{ 16,0x0530,0,{0x02,0x01,0x01,0x01,0x00,0x06,0x00,0x00,0x00,0x00,0x15,0x24,0x06,0x05,0x01,0x02} },
+{ 16,0x0540,0,{0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09} },
+{ 16,0x0550,0,{0x24,0x03,0x02,0x04,0x03,0x00,0x05,0x00,0x0c,0x24,0x02,0x03,0x01,0x02,0x00,0x02} },
+{ 16,0x0560,0,{0x00,0x00,0x00,0x00,0x0d,0x24,0x06,0x06,0x03,0x02,0x03,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x0570,0,{0x00,0x09,0x24,0x03,0x04,0x01,0x01,0x00,0x06,0x00,0x09,0x04,0x01,0x00,0x00,0x01} },
+{ 16,0x0580,0,{0x02,0x00,0x00,0x09,0x04,0x01,0x01,0x02,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x01} },
+{ 16,0x0590,0,{0x00,0x01,0x00,0x11,0x24,0x02,0x01,0x02,0x02,0x10,0x03,0x44,0xac,0x00,0x80,0xbb} },
+{ 16,0x05a0,0,{0x00,0x00,0x77,0x01,0x09,0x05,0x0a,0x05,0x84,0x01,0x01,0x00,0x8f,0x07,0x25,0x01} },
+{ 16,0x05b0,0,{0x01,0x00,0x00,0x00,0x09,0x05,0x8f,0x01,0x03,0x00,0x01,0x06,0x00,0x09,0x04,0x01} },
+{ 16,0x05c0,0,{0x02,0x02,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x01,0x00,0x01,0x00,0x0e,0x24,0x02} },
+{ 16,0x05d0,0,{0x01,0x06,0x02,0x10,0x02,0x44,0xac,0x00,0x80,0xbb,0x00,0x09,0x05,0x0a,0x05,0x4c} },
+{ 16,0x05e0,0,{0x02,0x01,0x00,0x8f,0x07,0x25,0x01,0x01,0x00,0x00,0x00,0x09,0x05,0x8f,0x01,0x03} },
+{ 16,0x05f0,0,{0x00,0x01,0x06,0x00,0x09,0x04,0x01,0x03,0x02,0x01,0x02,0x00,0x00,0x07,0x24,0x01} },
+{ 16,0x0600,0,{0x01,0x00,0x01,0x00,0x0e,0x24,0x02,0x01,0x06,0x03,0x18,0x02,0x44,0xac,0x00,0x80} },
+{ 16,0x0610,0,{0xbb,0x00,0x09,0x05,0x0a,0x05,0x72,0x03,0x01,0x00,0x8f,0x07,0x25,0x01,0x01,0x00} },
+{ 16,0x0620,0,{0x00,0x00,0x09,0x05,0x8f,0x01,0x03,0x00,0x01,0x06,0x00,0x09,0x04,0x01,0x04,0x02} },
+{ 16,0x0630,0,{0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x01,0x00,0x01,0x00,0x0b,0x24,0x02,0x01,0x02} },
+{ 16,0x0640,0,{0x03,0x18,0x01,0x00,0x77,0x01,0x09,0x05,0x0a,0x05,0x46,0x02,0x01,0x00,0x8f,0x07} },
+{ 16,0x0650,0,{0x25,0x01,0x01,0x00,0x00,0x00,0x09,0x05,0x8f,0x01,0x03,0x00,0x01,0x06,0x00,0x09} },
+{ 16,0x0660,0,{0x04,0x02,0x00,0x00,0x01,0x02,0x00,0x00,0x09,0x04,0x02,0x01,0x01,0x01,0x02,0x00} },
+{ 16,0x0670,0,{0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00,0x11,0x24,0x02,0x01,0x02,0x02,0x10,0x03} },
+{ 16,0x0680,0,{0x44,0xac,0x00,0x80,0xbb,0x00,0x00,0x77,0x01,0x09,0x05,0x8c,0x05,0x84,0x01,0x01} },
+{ 16,0x0690,0,{0x00,0x00,0x07,0x25,0x01,0x01,0x02,0x00,0x00,0x09,0x04,0x02,0x02,0x01,0x01,0x02} },
+{ 16,0x06a0,0,{0x00,0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00,0x11,0x24,0x02,0x01,0x02,0x03,0x18} },
+{ 16,0x06b0,0,{0x03,0x44,0xac,0x00,0x80,0xbb,0x00,0x00,0x77,0x01,0x09,0x05,0x8c,0x05,0x46,0x02} },
+{ 16,0x06c0,0,{0x01,0x00,0x00,0x07,0x25,0x01,0x01,0x02,0x00,0x00,0x05,0x0c,0x09,0x01,0xa1,0x01} },
+{ 16,0x06d0,0,{0x05,0x0c,0x09,0xe9,0x05,0x0c,0x09,0xea,0x15,0x00,0x25,0x01,0x95,0x02,0x75,0x01} },
+{ 16,0x06e0,0,{0x81,0x42,0x95,0x01,0x75,0x06,0x81,0x01,0x05,0x0c,0x09,0x00,0x05,0x0c,0x09,0x00} },
+{ 16,0x06f0,0,{0x15,0x00,0x25,0x01,0x95,0x02,0x75,0x01,0x91,0x06,0x95,0x01,0x75,0x06,0x91,0x03} },
+{ 16,0x0700,0,{0xc0,0x04,0x03,0x09,0x04,0x18,0x03,0x45,0x00,0x4d,0x00,0x41,0x00,0x47,0x00,0x49} },
+{ 16,0x0710,0,{0x00,0x43,0x00,0x20,0x00,0x47,0x00,0x6d,0x00,0x62,0x00,0x48,0x00,0x1e,0x03,0x45} },
+{ 16,0x0720,0,{0x00,0x6d,0x00,0x61,0x00,0x67,0x00,0x69,0x00,0x63,0x00,0x20,0x00,0x45,0x00,0x4d} },
+{ 16,0x0730,0,{0x00,0x49,0x00,0x20,0x00,0x32,0x00,0x7c,0x00,0x36,0x00,0x2a,0x03,0x43,0x00,0x6f} },
+{ 16,0x0740,0,{0x00,0x6e,0x00,0x66,0x00,0x69,0x00,0x67,0x00,0x75,0x00,0x72,0x00,0x61,0x00,0x74} },
+{ 16,0x0750,0,{0x00,0x69,0x00,0x6f,0x00,0x6e,0x00,0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00,0x69} },
+{ 16,0x0760,0,{0x00,0x6e,0x00,0x67,0x00,0x22,0x03,0x49,0x00,0x6e,0x00,0x74,0x00,0x65,0x00,0x72} },
+{ 16,0x0770,0,{0x00,0x66,0x00,0x61,0x00,0x63,0x00,0x65,0x00,0x20,0x00,0x53,0x00,0x74,0x00,0x72} },
+{ 9,0x0780,0,{0x00,0x69,0x00,0x6e,0x00,0x67,0x00,0x00,0x00} },
+{ 16,0x0789,0,{0x74,0x00,0xf5,0x86,0x90,0xfd,0xa5,0x7c,0x05,0xa3,0xe5,0x82,0x45,0x83,0x70,0xf9} },
+{ 1,0x0799,0,{0x22} },
+{ 16,0x079a,0,{0x90,0x7f,0xd6,0xe0,0x44,0x80,0xf0,0x43,0x87,0x01,0x00,0x00,0x00,0x00,0x00,0x22} },
+{ 16,0x07aa,0,{0xc0,0xd0,0xc0,0xe0,0x8f,0xe0,0xc0,0xe0,0x8e,0xe0,0xc0,0xe0,0x8d,0xe0,0xc0,0xe0} },
+{ 16,0x07ba,0,{0x8c,0xe0,0xc0,0xe0,0xc0,0x82,0xc0,0x83,0x05,0x86,0xc0,0x84,0xc0,0x85,0xe5,0x18} },
+{ 16,0x07ca,0,{0xb4,0x02,0x03,0x02,0x07,0xd9,0xb4,0x01,0x03,0x02,0x07,0xde,0x02,0x07,0xfa,0x7d} },
+{ 16,0x07da,0,{0x01,0x02,0x08,0x16,0xe5,0x19,0x14,0xf5,0x19,0xc3,0xb5,0x13,0x03,0x02,0x07,0xf5} },
+{ 16,0x07ea,0,{0x50,0x09,0xb4,0x00,0xea,0x75,0x19,0x0a,0x02,0x07,0xd9,0x7d,0x00,0x02,0x08,0x16} },
+{ 16,0x07fa,0,{0xe5,0x19,0x14,0xf5,0x19,0xc3,0xb5,0x14,0x03,0x02,0x08,0x11,0x50,0x09,0xb4,0x00} },
+{ 16,0x080a,0,{0xce,0x75,0x19,0x0a,0x02,0x07,0xd9,0x7d,0x02,0x02,0x08,0x16,0x7c,0x05,0x90,0x7f} },
+{ 16,0x081a,0,{0x99,0xe0,0x54,0x40,0xdc,0x03,0x02,0x08,0x43,0xb4,0x00,0x1d,0x90,0x7f,0xe3,0x74} },
+{ 16,0x082a,0,{0x7b,0xf0,0xa3,0x74,0x80,0xf0,0x90,0x7f,0xe2,0x74,0x40,0xf0,0x90,0x7f,0xe5,0xf0} },
+{ 16,0x083a,0,{0x90,0x7f,0xe2,0x74,0x00,0xf0,0x02,0x08,0x18,0x05,0x86,0x90,0x7f,0xe2,0x74,0x80} },
+{ 16,0x084a,0,{0xf0,0x90,0x79,0x65,0xe0,0xb4,0x01,0x03,0x02,0x08,0x9e,0xb4,0x02,0x03,0x02,0x08} },
+{ 16,0x085a,0,{0x96,0xb4,0x03,0x03,0x02,0x08,0x8e,0xb4,0x04,0x03,0x02,0x08,0x86,0xb4,0x05,0x03} },
+{ 16,0x086a,0,{0x02,0x08,0x7e,0xb4,0x06,0x03,0x02,0x08,0x76,0x02,0x08,0xf4,0x05,0x86,0x90,0x7f} },
+{ 16,0x087a,0,{0x6c,0x02,0x08,0xe9,0x05,0x86,0x90,0x7f,0x6c,0x02,0x08,0xdd,0x05,0x86,0x90,0x7f} },
+{ 16,0x088a,0,{0x6c,0x02,0x08,0xcf,0x05,0x86,0x90,0x7f,0x6c,0x02,0x08,0xc0,0x05,0x86,0x90,0x7f} },
+{ 16,0x089a,0,{0x6c,0x02,0x08,0xb2,0x05,0x86,0x90,0x7f,0x6c,0xf0,0x00,0xf0,0x00,0xf0,0x00,0xf0} },
+{ 16,0x08aa,0,{0x0d,0xed,0xb4,0x2d,0xf4,0x02,0x08,0xf4,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x0d,0xed} },
+{ 16,0x08ba,0,{0xb4,0x2d,0xf5,0x02,0x08,0xf4,0xf0,0x00,0xf0,0x00,0xf0,0x00,0xf0,0x0d,0xed,0xb4} },
+{ 16,0x08ca,0,{0x31,0xf4,0x02,0x08,0xf4,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x0d,0xed,0xb4,0x31,0xf5} },
+{ 16,0x08da,0,{0x02,0x08,0xf4,0xf0,0xf0,0xf0,0xf0,0x0d,0xed,0xb4,0x61,0xf7,0x02,0x08,0xf4,0xf0} },
+{ 16,0x08ea,0,{0xf0,0xf0,0xf0,0xf0,0xf0,0x0d,0xed,0xb4,0x61,0xf5,0x90,0x7f,0xe2,0x74,0x00,0xf0} },
+{ 16,0x08fa,0,{0xd0,0x85,0xd0,0x84,0x05,0x86,0xd0,0x83,0xd0,0x82,0xd0,0xe0,0xfc,0xd0,0xe0,0xfd} },
+{ 5,0x090a,0,{0xd0,0xe0,0xfe,0xd0,0xe0} },
+{ 6,0x090f,0,{0xff,0xd0,0xe0,0xd0,0xd0,0x22} },
+{ 16,0x0915,0,{0xc0,0xd0,0xc0,0xe0,0xc0,0x82,0xc0,0x83,0x90,0x7f,0x6f,0xe5,0x0c,0xf0,0xe5,0x0d} },
+{ 13,0x0925,0,{0xf0,0xe5,0x0e,0xf0,0xd0,0x83,0xd0,0x82,0xd0,0xe0,0xd0,0xd0,0x22} },
+{ 16,0x0932,0,{0xc0,0xd0,0xc0,0xe0,0x8f,0xe0,0xc0,0xe0,0x8e,0xe0,0xc0,0xe0,0xc0,0x82,0xc0,0x83} },
+{ 16,0x0942,0,{0x05,0x86,0xc0,0x84,0xc0,0x85,0x90,0x79,0x70,0xe0,0xff,0xbf,0x00,0x03,0x02,0x0a} },
+{ 16,0x0952,0,{0xb8,0x90,0x7f,0x96,0xe0,0x44,0x80,0xf0,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x7f} },
+{ 16,0x0962,0,{0x62,0xe0,0x05,0x86,0x90,0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f,0x96,0xe0,0x54,0x7f} },
+{ 16,0x0972,0,{0xf0,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x79,0x88,0xe0,0xb4,0x01,0x03,0x02,0x09} },
+{ 16,0x0982,0,{0xbe,0xb4,0x02,0x03,0x02,0x09,0xc3,0xb4,0x03,0x03,0x02,0x09,0xac,0xb4,0x04,0x03} },
+{ 16,0x0992,0,{0x02,0x09,0x9a,0x05,0x86,0x02,0x0a,0xb2,0xef,0x54,0x03,0xfe,0xef,0x03,0x03,0x54} },
+{ 16,0x09a2,0,{0x3f,0xff,0x90,0x7f,0x63,0x05,0x86,0x02,0x09,0xc9,0xef,0x54,0x03,0xfe,0xef,0x03} },
+{ 16,0x09b2,0,{0x03,0x54,0x3f,0xff,0x90,0x7f,0x63,0x05,0x86,0x02,0x0a,0x36,0x05,0x86,0x02,0x0a} },
+{ 16,0x09c2,0,{0xa5,0x05,0x86,0x02,0x0a,0x8e,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0} },
+{ 16,0x09d2,0,{0xe0,0x05,0x86,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0,0x05,0x86} },
+{ 16,0x09e2,0,{0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0} },
+{ 16,0x09f2,0,{0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0,0x05,0x86,0xdf,0xca,0xee,0xb4,0x00,0x03} },
+{ 16,0x0a02,0,{0x02,0x0a,0xb2,0xb4,0x01,0x03,0x02,0x0a,0x25,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0x05} },
+{ 16,0x0a12,0,{0x86,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0} },
+{ 16,0x0a22,0,{0xe0,0x05,0x86,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0,0x05,0x86} },
+{ 16,0x0a32,0,{0x02,0x0a,0xb2,0xe0,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0} },
+{ 13,0x0a42,0,{0xe0,0x05,0x86,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0,0xe0,0x05,0x86} },
+{ 16,0x0a4f,0,{0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0x05,0x86,0xdf,0xd6} },
+{ 16,0x0a5f,0,{0xee,0xb4,0x00,0x03,0x02,0x0a,0xb2,0xb4,0x01,0x03,0x02,0x0a,0x80,0xe0,0xe0,0xe0} },
+{ 16,0x0a6f,0,{0xe0,0x05,0x86,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0x05} },
+{ 16,0x0a7f,0,{0x86,0xe0,0xe0,0xe0,0xe0,0x05,0x86,0xe0,0xe0,0x05,0x86,0x02,0x0a,0xb2,0xe0,0xe0} },
+{ 16,0x0a8f,0,{0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0} },
+{ 16,0x0a9f,0,{0xdf,0xec,0x02,0x0a,0xb2,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0} },
+{ 16,0x0aaf,0,{0xe0,0xdf,0xf2,0x90,0x7f,0xe2,0x74,0x00,0xf0,0xd0,0x85,0xd0,0x84,0x05,0x86,0xd0} },
+{ 14,0x0abf,0,{0x83,0xd0,0x82,0xd0,0xe0,0xfe,0xd0,0xe0,0xff,0xd0,0xe0,0xd0,0xd0,0x22} },
+{ 16,0x0acd,0,{0xc0,0x82,0xc0,0x83,0xc0,0xe0,0xe8,0xc0,0xe0,0x78,0xd1,0xe8,0x14,0xf8,0x70,0xfb} },
+{ 10,0x0add,0,{0xd0,0xe0,0xf8,0xd0,0xe0,0xd0,0x83,0xd0,0x82,0x22} },
+{ 16,0x0ae7,0,{0xc0,0xd0,0xc0,0xe0,0x8f,0xe0,0xc0,0xe0,0x8e,0xe0,0xc0,0xe0,0x8d,0xe0,0xc0,0xe0} },
+{ 16,0x0af7,0,{0x8c,0xe0,0xc0,0xe0,0x75,0x86,0x00,0xc0,0x82,0xc0,0x83,0x05,0x86,0xc0,0x84,0xc0} },
+{ 16,0x0b07,0,{0x85,0x7e,0x00,0x90,0x79,0x8e,0xe0,0xb4,0x00,0x16,0x74,0x01,0xf0,0x90,0x06,0xca} },
+{ 16,0x0b17,0,{0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xe0,0xff,0x90,0x79,0x8d,0xf0,0x02,0x0b,0x39} },
+{ 16,0x0b27,0,{0x90,0x79,0x8d,0xe0,0xff,0x90,0x79,0x8f,0xe0,0xfd,0x90,0x79,0x90,0xe0,0xfc,0x02} },
+{ 16,0x0b37,0,{0x0b,0x46,0x90,0x06,0xca,0x05,0x86,0x90,0x7f,0x00,0x05,0x86,0x02,0x0b,0x51,0x8d} },
+{ 16,0x0b47,0,{0x84,0x8c,0x85,0x05,0x86,0x90,0x7f,0x00,0x05,0x86,0xe0,0xa3,0x05,0x86,0xf0,0xa3} },
+{ 16,0x0b57,0,{0x0e,0xee,0xb4,0x40,0x03,0x02,0x0b,0x6c,0x05,0x86,0xdf,0xee,0x90,0x79,0x8e,0x74} },
+{ 16,0x0b67,0,{0x00,0xf0,0x02,0x0b,0x82,0x05,0x86,0xad,0x84,0xac,0x85,0x90,0x79,0x8f,0xed,0xf0} },
+{ 16,0x0b77,0,{0x90,0x79,0x90,0xec,0xf0,0x90,0x79,0x8d,0x1f,0xef,0xf0,0x90,0x7f,0xb5,0xee,0xf0} },
+{ 16,0x0b87,0,{0xd0,0x85,0xd0,0x84,0x05,0x86,0xd0,0x83,0xd0,0x82,0xd0,0xe0,0xfc,0xd0,0xe0,0xfd} },
+{ 11,0x0b97,0,{0xd0,0xe0,0xfe,0xd0,0xe0,0xff,0xd0,0xe0,0xd0,0xd0,0x22} },
+{ 16,0x0ba2,0,{0xc0,0xd0,0xc0,0xe0,0xc0,0x82,0xc0,0x83,0x90,0x7f,0xae,0xe0,0x54,0xe0,0xf0,0x90} },
+{ 16,0x0bb2,0,{0x7f,0x96,0xe0,0x44,0x08,0x54,0xfb,0xf0,0x90,0x7f,0x97,0xe0,0x54,0xbf,0xf0,0x90} },
+{ 16,0x0bc2,0,{0x7f,0xe3,0x74,0x7b,0xf0,0x90,0x7f,0xe4,0x74,0x40,0xf0,0x90,0x79,0x78,0xe0,0x90} },
+{ 16,0x0bd2,0,{0x7b,0x40,0xf0,0x90,0x7f,0xe2,0x74,0x48,0xf0,0x90,0x7f,0xe5,0xe0,0x90,0x7f,0xe2} },
+{ 16,0x0be2,0,{0x74,0x00,0xf0,0x90,0x7f,0x96,0xe0,0x54,0xf7,0x44,0x04,0xf0,0x90,0x7f,0xe3,0x74} },
+{ 16,0x0bf2,0,{0x7b,0xf0,0x90,0x7f,0xe4,0x74,0x40,0xf0,0x90,0x79,0x79,0xe0,0x90,0x7b,0x40,0xf0} },
+{ 16,0x0c02,0,{0x90,0x7f,0xe2,0x74,0x48,0xf0,0x90,0x7f,0xe5,0xe0,0x90,0x7f,0xe2,0x74,0x00,0xf0} },
+{ 16,0x0c12,0,{0x90,0x7f,0x96,0xe0,0x54,0xf3,0xf0,0x90,0x7f,0xae,0xe0,0x44,0x1f,0xf0,0xd0,0x83} },
+{ 7,0x0c22,0,{0xd0,0x82,0xd0,0xe0,0xd0,0xd0,0x22} },
+{ 16,0x0c29,0,{0xc0,0xd0,0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x90,0x79,0x2f,0xe0,0x64,0xff,0xc3,0x24} },
+{ 11,0x0c39,0,{0x01,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0xd0,0xd0,0x22} },
+{ 16,0x0c44,0,{0xbb,0x01,0x06,0x89,0x82,0x8a,0x83,0xe0,0x22,0x50,0x02,0xe7,0x22,0xbb,0xfe,0x02} },
+{ 9,0x0c54,0,{0xe3,0x22,0x89,0x82,0x8a,0x83,0xe4,0x93,0x22} },
+{ 16,0x0c5d,0,{0xbb,0x01,0x0c,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe0,0x22,0x50} },
+{ 16,0x0c6d,0,{0x06,0xe9,0x25,0x82,0xf8,0xe6,0x22,0xbb,0xfe,0x06,0xe9,0x25,0x82,0xf8,0xe2,0x22} },
+{ 13,0x0c7d,0,{0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe4,0x93,0x22} },
+{ 16,0x0c8a,0,{0xbb,0x01,0x06,0x89,0x82,0x8a,0x83,0xf0,0x22,0x50,0x02,0xf7,0x22,0xbb,0xfe,0x01} },
+{ 2,0x0c9a,0,{0xf3,0x22} },
+{ 16,0x0c9c,0,{0xf8,0xbb,0x01,0x0d,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe8,0xf0} },
+{ 16,0x0cac,0,{0x22,0x50,0x06,0xe9,0x25,0x82,0xc8,0xf6,0x22,0xbb,0xfe,0x05,0xe9,0x25,0x82,0xc8} },
+{ 2,0x0cbc,0,{0xf2,0x22} },
+{ 16,0x0cbe,0,{0xc2,0xd5,0xec,0x30,0xe7,0x09,0xb2,0xd5,0xe4,0xc3,0x9d,0xfd,0xe4,0x9c,0xfc,0xee} },
+{ 16,0x0cce,0,{0x30,0xe7,0x15,0xb2,0xd5,0xe4,0xc3,0x9f,0xff,0xe4,0x9e,0xfe,0x12,0x0e,0x40,0xc3} },
+{ 16,0x0cde,0,{0xe4,0x9d,0xfd,0xe4,0x9c,0xfc,0x80,0x03,0x12,0x0e,0x40,0x30,0xd5,0x07,0xc3,0xe4} },
+{ 6,0x0cee,0,{0x9f,0xff,0xe4,0x9e,0xfe,0x22} },
+{ 16,0x0cf4,0,{0xc5,0xf0,0xf8,0xa3,0xe0,0x28,0xf0,0xc5,0xf0,0xf8,0xe5,0x82,0x15,0x82,0x70,0x02} },
+{ 6,0x0d04,0,{0x15,0x83,0xe0,0x38,0xf0,0x22} },
+{ 16,0x0d0a,0,{0xbb,0x01,0x10,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe0,0xf5,0xf0} },
+{ 16,0x0d1a,0,{0xa3,0xe0,0x22,0x50,0x09,0xe9,0x25,0x82,0xf8,0x86,0xf0,0x08,0xe6,0x22,0xbb,0xfe} },
+{ 16,0x0d2a,0,{0x0a,0xe9,0x25,0x82,0xf8,0xe2,0xf5,0xf0,0x08,0xe2,0x22,0xe5,0x83,0x2a,0xf5,0x83} },
+{ 8,0x0d3a,0,{0xe9,0x93,0xf5,0xf0,0xa3,0xe9,0x93,0x22} },
+{ 16,0x0d42,0,{0xe8,0x8f,0xf0,0xa4,0xcc,0x8b,0xf0,0xa4,0x2c,0xfc,0xe9,0x8e,0xf0,0xa4,0x2c,0xfc} },
+{ 16,0x0d52,0,{0x8a,0xf0,0xed,0xa4,0x2c,0xfc,0xea,0x8e,0xf0,0xa4,0xcd,0xa8,0xf0,0x8b,0xf0,0xa4} },
+{ 16,0x0d62,0,{0x2d,0xcc,0x38,0x25,0xf0,0xfd,0xe9,0x8f,0xf0,0xa4,0x2c,0xcd,0x35,0xf0,0xfc,0xeb} },
+{ 16,0x0d72,0,{0x8e,0xf0,0xa4,0xfe,0xa9,0xf0,0xeb,0x8f,0xf0,0xa4,0xcf,0xc5,0xf0,0x2e,0xcd,0x39} },
+{ 15,0x0d82,0,{0xfe,0xe4,0x3c,0xfc,0xea,0xa4,0x2d,0xce,0x35,0xf0,0xfd,0xe4,0x3c,0xfc,0x22} },
+{ 16,0x0d91,0,{0xeb,0x9f,0xf5,0xf0,0xea,0x9e,0x42,0xf0,0xe9,0x9d,0x42,0xf0,0xe8,0x9c,0x45,0xf0} },
+{ 1,0x0da1,0,{0x22} },
+{ 16,0x0da2,0,{0xbb,0x01,0x0d,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0x02,0x0e,0xa1} },
+{ 16,0x0db2,0,{0x50,0x07,0xe9,0x25,0x82,0xf8,0x02,0x0e,0x95,0xbb,0xfe,0x07,0xe9,0x25,0x82,0xf8} },
+{ 16,0x0dc2,0,{0x02,0x0e,0xad,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0x02,0x0e,0xb9} },
+{ 16,0x0dd2,0,{0xbb,0x01,0x0d,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0x02,0x0e,0xd5} },
+{ 16,0x0de2,0,{0x50,0x07,0xe9,0x25,0x82,0xf8,0x02,0x0e,0xc9,0xbb,0xfe,0x07,0xe9,0x25,0x82,0xf8} },
+{ 4,0x0df2,0,{0x02,0x0e,0xe1,0x22} },
+{ 16,0x0df6,0,{0xbb,0x01,0x0d,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0x02,0x0f,0x06} },
+{ 16,0x0e06,0,{0x50,0x07,0xe9,0x25,0x82,0xf8,0x02,0x0e,0xed,0xbb,0xfe,0x07,0xe9,0x25,0x82,0xf8} },
+{ 4,0x0e16,0,{0x02,0x0f,0x37,0x22} },
+{ 16,0x0e1a,0,{0xd0,0x83,0xd0,0x82,0xf8,0xe4,0x93,0x70,0x12,0x74,0x01,0x93,0x70,0x0d,0xa3,0xa3} },
+{ 16,0x0e2a,0,{0x93,0xf8,0x74,0x01,0x93,0xf5,0x82,0x88,0x83,0xe4,0x73,0x74,0x02,0x93,0x68,0x60} },
+{ 6,0x0e3a,0,{0xef,0xa3,0xa3,0xa3,0x80,0xdf} },
+{ 16,0x0e40,0,{0xbc,0x00,0x0b,0xbe,0x00,0x29,0xef,0x8d,0xf0,0x84,0xff,0xad,0xf0,0x22,0xe4,0xcc} },
+{ 16,0x0e50,0,{0xf8,0x75,0xf0,0x08,0xef,0x2f,0xff,0xee,0x33,0xfe,0xec,0x33,0xfc,0xee,0x9d,0xec} },
+{ 16,0x0e60,0,{0x98,0x40,0x05,0xfc,0xee,0x9d,0xfe,0x0f,0xd5,0xf0,0xe9,0xe4,0xce,0xfd,0x22,0xed} },
+{ 16,0x0e70,0,{0xf8,0xf5,0xf0,0xee,0x84,0x20,0xd2,0x1c,0xfe,0xad,0xf0,0x75,0xf0,0x08,0xef,0x2f} },
+{ 16,0x0e80,0,{0xff,0xed,0x33,0xfd,0x40,0x07,0x98,0x50,0x06,0xd5,0xf0,0xf2,0x22,0xc3,0x98,0xfd} },
+{ 5,0x0e90,0,{0x0f,0xd5,0xf0,0xea,0x22} },
+{ 12,0x0e95,0,{0xe6,0xfc,0x08,0xe6,0xfd,0x08,0xe6,0xfe,0x08,0xe6,0xff,0x22} },
+{ 12,0x0ea1,0,{0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x22} },
+{ 12,0x0ead,0,{0xe2,0xfc,0x08,0xe2,0xfd,0x08,0xe2,0xfe,0x08,0xe2,0xff,0x22} },
+{ 16,0x0eb9,0,{0xe4,0x93,0xfc,0xa3,0xe4,0x93,0xfd,0xa3,0xe4,0x93,0xfe,0xa3,0xe4,0x93,0xff,0x22} },
+{ 12,0x0ec9,0,{0xec,0xf6,0x08,0xed,0xf6,0x08,0xee,0xf6,0x08,0xef,0xf6,0x22} },
+{ 12,0x0ed5,0,{0xec,0xf0,0xa3,0xed,0xf0,0xa3,0xee,0xf0,0xa3,0xef,0xf0,0x22} },
+{ 12,0x0ee1,0,{0xec,0xf2,0x08,0xed,0xf2,0x08,0xee,0xf2,0x08,0xef,0xf2,0x22} },
+{ 16,0x0eed,0,{0xd0,0x83,0xd0,0x82,0xe4,0x93,0xf6,0x08,0x74,0x01,0x93,0xf6,0x08,0x74,0x02,0x93} },
+{ 9,0x0efd,0,{0xf6,0x08,0x74,0x03,0x93,0xf6,0x74,0x04,0x73} },
+{ 16,0x0f06,0,{0xa8,0x82,0x85,0x83,0xf0,0xd0,0x83,0xd0,0x82,0x12,0x0f,0x1d,0x12,0x0f,0x1d,0x12} },
+{ 16,0x0f16,0,{0x0f,0x1d,0x12,0x0f,0x1d,0xe4,0x73,0xe4,0x93,0xa3,0xc5,0x83,0xc5,0xf0,0xc5,0x83} },
+{ 16,0x0f26,0,{0xc8,0xc5,0x82,0xc8,0xf0,0xa3,0xc5,0x83,0xc5,0xf0,0xc5,0x83,0xc8,0xc5,0x82,0xc8} },
+{ 1,0x0f36,0,{0x22} },
+{ 16,0x0f37,0,{0xd0,0x83,0xd0,0x82,0xe4,0x93,0xf2,0x08,0x74,0x01,0x93,0xf2,0x08,0x74,0x02,0x93} },
+{ 9,0x0f47,0,{0xf2,0x08,0x74,0x03,0x93,0xf2,0x74,0x04,0x73} },
+{ 16,0x0f50,0,{0xc2,0xaf,0xd2,0x2c,0x90,0x7f,0x93,0x74,0x30,0xf0,0x90,0x7f,0x9c,0x74,0xbf,0xf0} },
+{ 16,0x0f60,0,{0x90,0x7f,0x96,0xe0,0x54,0x30,0xf0,0x90,0x7f,0x94,0x74,0x30,0xf0,0x90,0x7f,0x9d} },
+{ 16,0x0f70,0,{0x74,0xcf,0xf0,0x90,0x7f,0x97,0x74,0xa0,0xf0,0x90,0x7f,0x95,0x74,0xcc,0xf0,0xe4} },
+{ 16,0x0f80,0,{0x90,0x7f,0x9e,0xf0,0xc2,0x2d,0xc2,0x2a,0xc2,0x2b,0xc2,0x2e,0x90,0x79,0x74,0x04} },
+{ 16,0x0f90,0,{0xf0,0x12,0x2e,0x94,0x12,0x49,0xe2,0x12,0x4b,0xe6,0x12,0x32,0x0d,0x12,0x3b,0x0d} },
+{ 16,0x0fa0,0,{0x12,0x41,0xfd,0x12,0x3e,0x99,0xe5,0x1f,0x70,0x18,0x75,0x1f,0x01,0x12,0x17,0xff} },
+{ 16,0x0fb0,0,{0x12,0x2f,0xff,0x12,0x49,0xc8,0x12,0x4b,0xd8,0x12,0x4b,0xda,0x12,0x49,0x6f,0x12} },
+{ 16,0x0fc0,0,{0x1b,0x40,0x12,0x39,0x8d,0x90,0x7f,0xaf,0xe0,0x44,0x01,0xf0,0x90,0x7f,0xae,0xe0} },
+{ 16,0x0fd0,0,{0x44,0x1f,0xf0,0x90,0x7f,0xac,0x74,0xff,0xf0,0x90,0x7f,0xad,0xf0,0x90,0x7f,0xde} },
+{ 16,0x0fe0,0,{0xf0,0x90,0x7f,0xdf,0xf0,0x90,0x7f,0xab,0xf0,0x90,0x7f,0xa9,0xf0,0x90,0x7f,0xaa} },
+{ 16,0x0ff0,0,{0xf0,0x53,0x91,0xef,0x43,0xd8,0x20,0xd2,0xe8,0x43,0xd8,0x20,0x43,0xa8,0x80,0x22} },
+{ 16,0x1000,0,{0x90,0x79,0x63,0xe0,0x14,0x60,0x44,0x14,0x70,0x02,0x21,0xd0,0x14,0x70,0x02,0x41} },
+{ 16,0x1010,0,{0xd9,0x14,0x70,0x02,0x61,0xd7,0x24,0x04,0x60,0x02,0x81,0x56,0xe4,0x90,0x79,0x78} },
+{ 16,0x1020,0,{0xf0,0x90,0x79,0x7b,0xe0,0x90,0x79,0x79,0xf0,0x44,0x01,0xf0,0x54,0xfd,0xf0,0x90} },
+{ 16,0x1030,0,{0x79,0x7b,0xf0,0xe4,0x90,0x79,0x88,0xf0,0xa2,0xaf,0x33,0xf5,0x12,0xc2,0xaf,0x12} },
+{ 16,0x1040,0,{0x0b,0xa2,0xe5,0x12,0x70,0x02,0x81,0x56,0xd2,0xaf,0x22,0x90,0x79,0x2d,0xe0,0x64} },
+{ 16,0x1050,0,{0x01,0x70,0x79,0x90,0x7f,0xf2,0xf0,0x90,0x7f,0xf3,0x74,0x30,0xf0,0x90,0x7f,0xff} },
+{ 16,0x1060,0,{0x74,0xfc,0xf0,0xe4,0x90,0x79,0x78,0xf0,0x90,0x79,0x7b,0xe0,0x90,0x79,0x79,0xf0} },
+{ 16,0x1070,0,{0x44,0x01,0xf0,0x44,0x02,0xf0,0x90,0x79,0x7b,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12} },
+{ 16,0x1080,0,{0xc2,0xaf,0x12,0x0b,0xa2,0x90,0x79,0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0,0x90} },
+{ 16,0x1090,0,{0x79,0x79,0xf0,0x90,0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54,0xfe} },
+{ 16,0x10a0,0,{0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x54,0xfd} },
+{ 16,0x10b0,0,{0xf0,0x54,0xfb,0xf0,0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x82,0x74,0x04} },
+{ 16,0x10c0,0,{0xf0,0x90,0x79,0x88,0x14,0xf0,0xe5,0x12,0x60,0x02,0xd2,0xaf,0x90,0x79,0x2d,0xe0} },
+{ 16,0x10d0,0,{0x64,0x02,0x70,0x79,0x90,0x7f,0xf2,0xf0,0x90,0x7f,0xf3,0x74,0x34,0xf0,0x90,0x7f} },
+{ 16,0x10e0,0,{0xff,0x74,0xfc,0xf0,0xe4,0x90,0x79,0x78,0xf0,0x90,0x79,0x7b,0xe0,0x90,0x79,0x79} },
+{ 16,0x10f0,0,{0xf0,0x44,0x01,0xf0,0x44,0x02,0xf0,0x90,0x79,0x7b,0xf0,0xa2,0xaf,0xe4,0x33,0xf5} },
+{ 16,0x1100,0,{0x12,0xc2,0xaf,0x12,0x0b,0xa2,0x90,0x79,0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0} },
+{ 16,0x1110,0,{0x90,0x79,0x79,0xf0,0x90,0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54} },
+{ 16,0x1120,0,{0xfe,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x44} },
+{ 16,0x1130,0,{0x02,0xf0,0x54,0xfb,0xf0,0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x82,0x74} },
+{ 16,0x1140,0,{0x04,0xf0,0x90,0x79,0x88,0x14,0xf0,0xe5,0x12,0x60,0x02,0xd2,0xaf,0x90,0x79,0x2d} },
+{ 16,0x1150,0,{0xe0,0x64,0x03,0x60,0x02,0x81,0x56,0x90,0x7f,0xf2,0xf0,0x90,0x7f,0xf3,0x74,0x64} },
+{ 16,0x1160,0,{0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0xe4,0x90,0x79,0x78,0xf0,0x90,0x79,0x7b,0xe0} },
+{ 16,0x1170,0,{0x90,0x79,0x79,0xf0,0x44,0x01,0xf0,0x44,0x02,0xf0,0x90,0x79,0x7b,0xf0,0xa2,0xaf} },
+{ 16,0x1180,0,{0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0x90,0x79,0x78,0x74,0x02,0xf0,0x90} },
+{ 16,0x1190,0,{0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79} },
+{ 16,0x11a0,0,{0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79} },
+{ 16,0x11b0,0,{0x79,0xe0,0x44,0x04,0xf0,0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x82,0x74} },
+{ 16,0x11c0,0,{0x04,0xf0,0x90,0x79,0x88,0x14,0xf0,0xe5,0x12,0x70,0x02,0x81,0x56,0xd2,0xaf,0x22} },
+{ 16,0x11d0,0,{0x90,0x79,0x2d,0xe0,0x64,0x01,0x70,0x7a,0x90,0x7f,0xf2,0xf0,0x90,0x7f,0xf3,0x74} },
+{ 16,0x11e0,0,{0x88,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0xe4,0x90,0x79,0x78,0xf0,0x90,0x79,0x7b} },
+{ 16,0x11f0,0,{0xe0,0x90,0x79,0x79,0xf0,0x44,0x01,0xf0,0x54,0xfd,0xf0,0x90,0x79,0x7b,0xf0,0xa2} },
+{ 16,0x1200,0,{0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0x90,0x79,0x78,0x74,0x02,0xf0} },
+{ 16,0x1210,0,{0x90,0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90} },
+{ 16,0x1220,0,{0x79,0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0,0x90} },
+{ 16,0x1230,0,{0x79,0x79,0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0,0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2} },
+{ 16,0x1240,0,{0x90,0x79,0x82,0x74,0x0c,0xf0,0x90,0x79,0x88,0x74,0x01,0xf0,0xe5,0x12,0x60,0x02} },
+{ 16,0x1250,0,{0xd2,0xaf,0x90,0x79,0x2d,0xe0,0x64,0x02,0x60,0x02,0x81,0x56,0x90,0x7f,0xf2,0xf0} },
+{ 16,0x1260,0,{0x90,0x7f,0xf3,0x74,0x94,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0xe4,0x90,0x79,0x78} },
+{ 16,0x1270,0,{0xf0,0x90,0x79,0x7b,0xe0,0x90,0x79,0x79,0xf0,0x44,0x01,0xf0,0x54,0xfd,0xf0,0x90} },
+{ 16,0x1280,0,{0x79,0x7b,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0x90,0x79} },
+{ 16,0x1290,0,{0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79,0x7f,0xe0} },
+{ 16,0x12a0,0,{0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0} },
+{ 16,0x12b0,0,{0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x44,0x02,0xf0,0x54,0xfb,0xf0,0x90,0x79,0x84} },
+{ 16,0x12c0,0,{0xf0,0x12,0x0b,0xa2,0x90,0x79,0x82,0x74,0x0c,0xf0,0x90,0x79,0x88,0x74,0x01,0xf0} },
+{ 16,0x12d0,0,{0xe5,0x12,0x70,0x02,0x81,0x56,0xd2,0xaf,0x22,0x90,0x79,0x2d,0xe0,0x64,0x01,0x70} },
+{ 16,0x12e0,0,{0x77,0x90,0x7f,0xf2,0xf0,0x90,0x7f,0xf3,0x74,0xcc,0xf0,0x90,0x7f,0xff,0x74,0xfc} },
+{ 16,0x12f0,0,{0xf0,0xe4,0x90,0x79,0x78,0xf0,0x90,0x79,0x7b,0xe0,0x90,0x79,0x79,0xf0,0x54,0xfc} },
+{ 16,0x1300,0,{0xf0,0x90,0x79,0x7b,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2} },
+{ 16,0x1310,0,{0x90,0x79,0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79} },
+{ 16,0x1320,0,{0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x79} },
+{ 16,0x1330,0,{0x79,0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0,0x90} },
+{ 16,0x1340,0,{0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x82,0x74,0x12,0xf0,0x90,0x79,0x88,0x74} },
+{ 16,0x1350,0,{0x02,0xf0,0xe5,0x12,0x60,0x02,0xd2,0xaf,0x90,0x79,0x2d,0xe0,0x64,0x02,0x70,0x77} },
+{ 16,0x1360,0,{0x90,0x7f,0xf2,0xf0,0x90,0x7f,0xf3,0x74,0xe0,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0} },
+{ 16,0x1370,0,{0xe4,0x90,0x79,0x78,0xf0,0x90,0x79,0x7b,0xe0,0x90,0x79,0x79,0xf0,0x54,0xfc,0xf0} },
+{ 16,0x1380,0,{0x90,0x79,0x7b,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0x90} },
+{ 16,0x1390,0,{0x79,0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79,0x7f} },
+{ 16,0x13a0,0,{0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x79,0x79} },
+{ 16,0x13b0,0,{0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x44,0x02,0xf0,0x54,0xfb,0xf0,0x90,0x79} },
+{ 16,0x13c0,0,{0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x82,0x74,0x12,0xf0,0x90,0x79,0x88,0x74,0x02} },
+{ 16,0x13d0,0,{0xf0,0xe5,0x12,0x60,0x02,0xd2,0xaf,0x90,0x79,0x2d,0xe0,0x64,0x03,0x70,0x77,0x90} },
+{ 16,0x13e0,0,{0x7f,0xf2,0xf0,0x90,0x7f,0xf3,0x74,0x94,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0xe4} },
+{ 16,0x13f0,0,{0x90,0x79,0x78,0xf0,0x90,0x79,0x7b,0xe0,0x90,0x79,0x79,0xf0,0x54,0xfe,0xf0,0x44} },
+{ 16,0x1400,0,{0x02,0xf0,0x90,0x79,0x7b,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b} },
+{ 16,0x1410,0,{0xa2,0x90,0x79,0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90} },
+{ 16,0x1420,0,{0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90} },
+{ 16,0x1430,0,{0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x44,0x04,0xf0,0x90,0x79,0x84} },
+{ 16,0x1440,0,{0xf0,0x12,0x0b,0xa2,0x90,0x79,0x82,0x74,0x06,0xf0,0x90,0x79,0x88,0x74,0x04,0xf0} },
+{ 7,0x1450,0,{0xe5,0x12,0x60,0x02,0xd2,0xaf,0x22} },
+{ 16,0x1457,0,{0xc2,0x28,0xc2,0x29,0x90,0x7f,0xe8,0xe0,0x12,0x0e,0x1a,0x14,0x84,0x00,0x14,0xe0} },
+{ 16,0x1467,0,{0x01,0x14,0xf6,0x02,0x16,0x7c,0x21,0x16,0xbe,0x22,0x15,0x91,0x80,0x15,0xd1,0x81} },
+{ 16,0x1477,0,{0x16,0x2e,0x82,0x16,0xcf,0xa1,0x17,0x05,0xa2,0x00,0x00,0x17,0x0a,0x90,0x7f,0xe9} },
+{ 16,0x1487,0,{0xe0,0x14,0x60,0x11,0x24,0xfe,0x60,0x28,0x24,0xfe,0x60,0x3b,0x24,0xfc,0x70,0x40} },
+{ 16,0x1497,0,{0x12,0x4a,0x2a,0xe1,0x16,0x12,0x4b,0xe0,0x40,0x02,0xe1,0x16,0x90,0x7f,0xea,0xe0} },
+{ 16,0x14a7,0,{0xb4,0x01,0x04,0xc2,0x2a,0xe1,0x16,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16} },
+{ 16,0x14b7,0,{0x12,0x4b,0xe2,0x90,0x7f,0xea,0xe0,0xb4,0x01,0x04,0xd2,0x2a,0xe1,0x16,0x90,0x7f} },
+{ 16,0x14c7,0,{0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16} },
+{ 16,0x14d7,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16,0x90,0x7f,0xe9,0xe0,0x24,0xf5,0x70} },
+{ 16,0x14e7,0,{0x05,0x12,0x47,0x9c,0xe1,0x16,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16,0x90} },
+{ 16,0x14f7,0,{0x7f,0xe9,0xe0,0x24,0xfd,0x60,0x54,0x24,0x02,0x60,0x02,0xa1,0x88,0x12,0x4b,0xe0} },
+{ 16,0x1507,0,{0x40,0x02,0xe1,0x16,0x90,0x7f,0xea,0xe0,0x70,0x38,0x90,0x7f,0xec,0xe0,0xf4,0x54} },
+{ 16,0x1517,0,{0x80,0xff,0xc4,0x54,0x0f,0xff,0xe0,0x54,0x07,0x2f,0x25,0xe0,0x24,0xb4,0xf5,0x82} },
+{ 16,0x1527,0,{0xe4,0x34,0x7f,0xf5,0x83,0xe4,0xf0,0x90,0x7f,0xec,0xe0,0x54,0x80,0xff,0x13,0x13} },
+{ 16,0x1537,0,{0x13,0x54,0x1f,0xff,0xe0,0x54,0x07,0x2f,0x90,0x7f,0xd7,0xf0,0xe0,0x44,0x20,0xf0} },
+{ 16,0x1547,0,{0xe1,0x16,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16,0x12,0x4b,0xe2,0x40,0x02} },
+{ 16,0x1557,0,{0xe1,0x16,0x90,0x7f,0xea,0xe0,0x70,0x20,0x90,0x7f,0xec,0xe0,0xf4,0x54,0x80,0xff} },
+{ 16,0x1567,0,{0xc4,0x54,0x0f,0xff,0xe0,0x54,0x07,0x2f,0x25,0xe0,0x24,0xb4,0xf5,0x82,0xe4,0x34} },
+{ 16,0x1577,0,{0x7f,0xf5,0x83,0x74,0x01,0xf0,0xe1,0x16,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1} },
+{ 16,0x1587,0,{0x16,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16,0x90,0x7f,0xe9,0xe0,0x60,0x12} },
+{ 16,0x1597,0,{0x24,0xf8,0x60,0x09,0x24,0x02,0x70,0x29,0x12,0x17,0x1e,0xe1,0x16,0x12,0x4b,0xa0} },
+{ 16,0x15a7,0,{0xe1,0x16,0x12,0x4b,0xde,0xa2,0x2a,0xe4,0x33,0xff,0x25,0xe0,0xff,0xa2,0x2b,0xe4} },
+{ 16,0x15b7,0,{0x33,0x4f,0x90,0x7f,0x00,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0xe1} },
+{ 16,0x15c7,0,{0x16,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16,0x90,0x7f,0xe9,0xe0,0x60,0x37} },
+{ 16,0x15d7,0,{0x24,0xf6,0x60,0x2e,0x24,0x04,0x70,0x41,0x90,0x7f,0xeb,0xe0,0x24,0xde,0x60,0x0e} },
+{ 16,0x15e7,0,{0x04,0x70,0x16,0xd2,0x29,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16,0xd2,0x29} },
+{ 16,0x15f7,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 16,0x1607,0,{0xe1,0x16,0x12,0x44,0x63,0xe1,0x16,0x12,0x4b,0xde,0xe4,0x90,0x7f,0x00,0xf0,0xa3} },
+{ 16,0x1617,0,{0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0xe1,0x16,0x20,0x29,0x07,0x90,0x7f,0xb4,0xe0} },
+{ 16,0x1627,0,{0x44,0x01,0xf0,0xc2,0x29,0xe1,0x16,0x90,0x7f,0xe9,0xe0,0x24,0xf4,0x60,0x34,0x24} },
+{ 16,0x1637,0,{0x0c,0x70,0x39,0x12,0x4b,0xde,0x90,0x7f,0xec,0xe0,0xf4,0x54,0x80,0xff,0xc4,0x54} },
+{ 16,0x1647,0,{0x0f,0xff,0xe0,0x54,0x07,0x2f,0x25,0xe0,0x24,0xb4,0xf5,0x82,0xe4,0x34,0x7f,0xf5} },
+{ 16,0x1657,0,{0x83,0xe0,0x54,0xfd,0x90,0x7f,0x00,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x02} },
+{ 16,0x1667,0,{0xf0,0xe1,0x16,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xe1,0x16,0x90,0x7f,0xb4,0xe0} },
+{ 16,0x1677,0,{0x44,0x01,0xf0,0xe1,0x16,0x90,0x7f,0xe9,0xe0,0x24,0xf6,0x60,0x12,0x14,0x60,0x1a} },
+{ 16,0x1687,0,{0x24,0x02,0x70,0x1d,0xd2,0x28,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x12,0xd2} },
+{ 16,0x1697,0,{0x28,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01} },
+{ 16,0x16a7,0,{0xf0,0x20,0x28,0x0f,0x90,0x79,0x85,0x74,0x01,0xf0,0x12,0x49,0x6f,0x90,0x7f,0xc5} },
+{ 16,0x16b7,0,{0x74,0x02,0xf0,0xc2,0x28,0x80,0x58,0x90,0x79,0x86,0x74,0x01,0xf0,0x12,0x49,0x6f} },
+{ 16,0x16c7,0,{0x90,0x7f,0xc5,0x74,0x02,0xf0,0x80,0x47,0x90,0x7f,0xe9,0xe0,0x24,0xfe,0x60,0x12} },
+{ 16,0x16d7,0,{0x14,0x60,0x1a,0x24,0x02,0x70,0x1d,0xd2,0x28,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 16,0x16e7,0,{0x80,0x12,0xd2,0x28,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x07,0x90,0x7f,0xb4} },
+{ 16,0x16f7,0,{0xe0,0x44,0x01,0xf0,0x20,0x28,0x03,0x12,0x1a,0x7b,0xc2,0x28,0x80,0x11,0x12,0x2c} },
+{ 16,0x1707,0,{0x2b,0x80,0x0c,0x12,0x4b,0xe4,0x50,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x90} },
+{ 7,0x1717,0,{0x7f,0xb4,0xe0,0x44,0x02,0xf0,0x22} },
+{ 16,0x171e,0,{0x12,0x4b,0xdc,0x40,0x02,0xe1,0xe3,0x90,0x7f,0xeb,0xe0,0x24,0xfe,0x60,0x1e,0x14} },
+{ 16,0x172e,0,{0x60,0x46,0x14,0x60,0x6e,0x14,0x70,0x02,0xe1,0xd4,0x24,0x04,0x60,0x02,0xe1,0xdc} },
+{ 16,0x173e,0,{0x74,0x05,0x90,0x7f,0xd4,0xf0,0x74,0x00,0x90,0x7f,0xd5,0xf0,0x22,0x90,0x7f,0xea} },
+{ 16,0x174e,0,{0xe0,0xff,0x12,0x3f,0xa2,0x8b,0x33,0x8a,0x34,0x89,0x35,0xea,0x49,0x60,0x11,0xce} },
+{ 16,0x175e,0,{0xea,0xce,0xee,0x90,0x7f,0xd4,0xf0,0xcf,0xe9,0xcf,0xef,0x90,0x7f,0xd5,0xf0,0x22} },
+{ 16,0x176e,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xff,0x12,0x48,0x00} },
+{ 16,0x177e,0,{0x8b,0x33,0x8a,0x34,0x89,0x35,0xea,0x49,0x60,0x11,0xce,0xea,0xce,0xee,0x90,0x7f} },
+{ 16,0x178e,0,{0xd4,0xf0,0xcf,0xe9,0xcf,0xef,0x90,0x7f,0xd5,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44} },
+{ 16,0x179e,0,{0x01,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xff,0x90,0x7e,0xc0,0xe0,0xfd,0xa3,0xe0,0xfb} },
+{ 16,0x17ae,0,{0x12,0x44,0xd2,0x8b,0x33,0x8a,0x34,0x89,0x35,0xea,0x49,0x60,0x11,0xce,0xea,0xce} },
+{ 16,0x17be,0,{0xee,0x90,0x7f,0xd4,0xf0,0xcf,0xe9,0xcf,0xef,0x90,0x7f,0xd5,0xf0,0x22,0x90,0x7f} },
+{ 16,0x17ce,0,{0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f} },
+{ 5,0x17de,0,{0xb4,0xe0,0x44,0x01,0xf0} },
+{ 1,0x17e3,0,{0x22} },
+{ 16,0x17e4,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x90,0x7f,0xc4,0xe4,0xf0,0x53,0x91,0xef,0x90,0x7f} },
+{ 11,0x17f4,0,{0xab,0x74,0x04,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 1,0x17ff,0,{0x22} },
+{ 16,0x1800,0,{0xe4,0x90,0x78,0x15,0xf0,0x7b,0x01,0x90,0x78,0x12,0x04,0xf0,0xa3,0x74,0x78,0xf0} },
+{ 16,0x1810,0,{0xa3,0x74,0x58,0xf0,0x90,0x78,0x12,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90} },
+{ 16,0x1820,0,{0x00,0x01,0x12,0x0c,0x5d,0xff,0x90,0x79,0x9a,0xe0,0x6f,0x60,0x18,0x90,0x78,0x15} },
+{ 16,0x1830,0,{0xe0,0xc3,0x94,0x06,0x50,0x0f,0xe0,0x04,0xf0,0x90,0x78,0x13,0xe4,0x75,0xf0,0x0f} },
+{ 16,0x1840,0,{0x12,0x0c,0xf4,0x80,0xcf,0x90,0x78,0x15,0xe0,0xb4,0x06,0x08,0x90,0x7f,0xb4,0xe0} },
+{ 16,0x1850,0,{0x44,0x01,0xf0,0x22,0x90,0x78,0x12,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x12} },
+{ 16,0x1860,0,{0x0c,0x44,0xff,0x24,0xbf,0x70,0x02,0x41,0x7a,0x24,0xe0,0x70,0x02,0x41,0x4c,0x24} },
+{ 16,0x1870,0,{0x21,0x60,0x02,0x41,0x73,0x90,0x79,0x97,0xe0,0x24,0xfe,0x70,0x02,0x21,0x9a,0x14} },
+{ 16,0x1880,0,{0x70,0x02,0x21,0xef,0x24,0x02,0x60,0x02,0x41,0x44,0x90,0x79,0x2d,0xe0,0xa3,0xf0} },
+{ 16,0x1890,0,{0x90,0x79,0x23,0xe0,0xff,0xe4,0xfc,0xfd,0xfe,0xfb,0xfa,0x79,0x01,0xf8,0x12,0x0d} },
+{ 16,0x18a0,0,{0x42,0xc8,0xec,0xc8,0xc9,0xed,0xc9,0xca,0xee,0xca,0xcb,0xef,0xcb,0x90,0x79,0x22} },
+{ 16,0x18b0,0,{0xe0,0xfe,0xe4,0xfc,0xfd,0x2b,0xfb,0xea,0x3e,0xfa,0xed,0x39,0xf9,0xec,0x38,0xf8} },
+{ 16,0x18c0,0,{0x90,0x79,0x21,0xe0,0xff,0xe4,0xfe,0xeb,0x2f,0xff,0xee,0x3a,0xfe,0xed,0x39,0xfd} },
+{ 16,0x18d0,0,{0xec,0x38,0xfc,0x90,0x78,0x12,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00} },
+{ 16,0x18e0,0,{0x02,0x12,0x0d,0xd2,0x90,0x00,0x02,0x12,0x0d,0xa2,0x7b,0x44,0x7a,0xac,0x79,0x00} },
+{ 16,0x18f0,0,{0x78,0x00,0xc3,0x12,0x0d,0x91,0x70,0x05,0x90,0x79,0x2d,0x04,0xf0,0x90,0x78,0x12} },
+{ 16,0x1900,0,{0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x02,0x12,0x0d,0xa2,0x7b,0x80} },
+{ 16,0x1910,0,{0x7a,0xbb,0x79,0x00,0x78,0x00,0xc3,0x12,0x0d,0x91,0x70,0x06,0x90,0x79,0x2d,0x74} },
+{ 16,0x1920,0,{0x02,0xf0,0x90,0x78,0x12,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x02} },
+{ 16,0x1930,0,{0x12,0x0d,0xa2,0x7b,0x00,0x7a,0x77,0x79,0x01,0x78,0x00,0xc3,0x12,0x0d,0x91,0x70} },
+{ 16,0x1940,0,{0x06,0x90,0x79,0x2d,0x74,0x03,0xf0,0x90,0x79,0x2d,0xe0,0xff,0xb4,0x01,0x09,0x75} },
+{ 16,0x1950,0,{0x0c,0x67,0x75,0x0d,0x06,0x75,0x0e,0x0b,0xef,0xb4,0x02,0x08,0xe4,0xf5,0x0c,0xf5} },
+{ 16,0x1960,0,{0x0d,0x75,0x0e,0x0c,0xef,0xb4,0x03,0x08,0xe4,0xf5,0x0c,0xf5,0x0d,0x75,0x0e,0x18} },
+{ 16,0x1970,0,{0xef,0xb4,0x03,0x0d,0x90,0x79,0x2e,0xe0,0x64,0x03,0x60,0x05,0xd2,0x2f,0x12,0x3d} },
+{ 16,0x1980,0,{0x79,0x90,0x79,0x2d,0xe0,0x64,0x03,0x60,0x0a,0xa3,0xe0,0xb4,0x03,0x05,0xc2,0x2f} },
+{ 16,0x1990,0,{0x12,0x3d,0x79,0x12,0x10,0x00,0x12,0x28,0x01,0x22,0x90,0x79,0x23,0xe0,0xff,0xe4} },
+{ 16,0x19a0,0,{0xfc,0xfd,0xfe,0xfb,0xfa,0x79,0x01,0xf8,0x12,0x0d,0x42,0xc8,0xec,0xc8,0xc9,0xed} },
+{ 16,0x19b0,0,{0xc9,0xca,0xee,0xca,0xcb,0xef,0xcb,0x90,0x79,0x22,0xe0,0xfe,0xe4,0xfc,0xfd,0x2b} },
+{ 16,0x19c0,0,{0xfb,0xea,0x3e,0xfa,0xed,0x39,0xf9,0xec,0x38,0xf8,0x90,0x79,0x21,0xe0,0xff,0xe4} },
+{ 16,0x19d0,0,{0xfe,0xeb,0x2f,0xff,0xee,0x3a,0xfe,0xed,0x39,0xfd,0xec,0x38,0xfc,0x90,0x78,0x12} },
+{ 16,0x19e0,0,{0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x06,0x12,0x0d,0xd2,0x22,0x90} },
+{ 16,0x19f0,0,{0x79,0x23,0xe0,0xff,0xe4,0xfc,0xfd,0xfe,0xfb,0xfa,0x79,0x01,0xf8,0x12,0x0d,0x42} },
+{ 16,0x1a00,0,{0xc8,0xec,0xc8,0xc9,0xed,0xc9,0xca,0xee,0xca,0xcb,0xef,0xcb,0x90,0x79,0x22,0xe0} },
+{ 16,0x1a10,0,{0xfe,0xe4,0xfc,0xfd,0x2b,0xfb,0xea,0x3e,0xfa,0xed,0x39,0xf9,0xec,0x38,0xf8,0x90} },
+{ 16,0x1a20,0,{0x79,0x21,0xe0,0xff,0xe4,0xfe,0xeb,0x2f,0xff,0xee,0x3a,0xfe,0xed,0x39,0xfd,0xec} },
+{ 16,0x1a30,0,{0x38,0xfc,0x90,0x78,0x12,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x0a} },
+{ 16,0x1a40,0,{0x12,0x0d,0xd2,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x79,0x97,0xe0} },
+{ 16,0x1a50,0,{0x14,0x70,0x18,0x90,0x79,0x21,0xe0,0xff,0x90,0x78,0x12,0xe0,0xfb,0xa3,0xe0,0xfa} },
+{ 16,0x1a60,0,{0xa3,0xe0,0xf9,0x90,0x00,0x0e,0xef,0x12,0x0c,0x9c,0x22,0x90,0x7f,0xb4,0xe0,0x44} },
+{ 10,0x1a70,0,{0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 1,0x1a7a,0,{0x22} },
+{ 16,0x1a7b,0,{0xe4,0xff,0xfe,0x7b,0x01,0x90,0x78,0x0f,0x04,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74} },
+{ 16,0x1a8b,0,{0x2b,0xf0,0x90,0x78,0x0f,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x02} },
+{ 16,0x1a9b,0,{0x12,0x0c,0x5d,0xfd,0x90,0x7f,0xec,0xe0,0x6d,0x60,0x13,0xef,0xc3,0x94,0x05,0x50} },
+{ 16,0x1aab,0,{0x0d,0x0f,0x90,0x78,0x10,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x80,0xd4,0x8d,0x33} },
+{ 16,0x1abb,0,{0x90,0x78,0x0f,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x12,0x0c} },
+{ 16,0x1acb,0,{0x5d,0xfd,0x90,0x7f,0xed,0xe0,0x6d,0x60,0x13,0xee,0xc3,0x94,0x0b,0x50,0x0d,0x0e} },
+{ 16,0x1adb,0,{0x90,0x78,0x10,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x80,0xd4,0x90,0x7f,0xed,0xe0} },
+{ 16,0x1aeb,0,{0xf5,0x34,0xef,0x64,0x05,0x60,0x03,0xbe,0x0b,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01} },
+{ 16,0x1afb,0,{0xf0,0x22,0x90,0x78,0x0f,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x12,0x0c,0x44} },
+{ 16,0x1b0b,0,{0xff,0x24,0xf0,0x60,0x08,0x24,0x0f,0x70,0x0e,0x12,0x49,0x2a,0x22,0x12,0x4b,0x83} },
+{ 14,0x1b1b,0,{0x90,0x79,0x20,0xe5,0x34,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 1,0x1b29,0,{0x22} },
+{ 15,0x1b2a,0,{0x90,0x7f,0xea,0xe0,0xb4,0xff,0x04,0x12,0x34,0x16,0x22,0x12,0x38,0x00,0x22} },
+{ 7,0x1b39,0,{0x53,0x98,0xfe,0x53,0x98,0xfd,0x32} },
+{ 16,0x1b40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1b50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1b60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1b70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1b80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1b90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1ba0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1bb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1bc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1bd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1be0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1bf0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c00,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c10,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c20,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c30,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1c90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1ca0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1cb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1cc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1cd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1ce0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1cf0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d00,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d10,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d20,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d30,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1d90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1da0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1db0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1dc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1dd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1de0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1df0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e00,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e10,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e20,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e30,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1e90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1ea0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 14,0x1eb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1ebe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1ece,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1ede,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1eee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1efe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1f0e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1f1e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1f2e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 2,0x1f3e,0,{0x00,0x00} },
+{ 16,0x1f40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1f50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1f60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1f70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1f80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1f90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1fa0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1fb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1fc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1fd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1fe0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x1ff0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2000,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2010,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2020,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2030,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2040,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2050,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2060,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2070,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2080,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2090,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x20a0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x20b0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x20c0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x20d0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x20e0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x20f0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2100,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2110,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2120,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2130,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2140,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2150,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2160,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2170,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2180,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2190,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x21a0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x21b0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x21c0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x21d0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x21e0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x21f0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2200,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2210,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2220,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2230,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2240,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2250,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2260,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2270,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2280,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2290,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x22a0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x22b0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x22c0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x22d0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x22e0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x22f0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2300,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2310,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2320,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2330,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2340,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2350,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x2360,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 14,0x2370,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x237e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x238e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x239e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x23ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x23be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x23ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x23de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x23ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x23fe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x240e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x241e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x242e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x243e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x244e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x245e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x246e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x247e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x248e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x249e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x24ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x24be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x24ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x24de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x24ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x24fe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x250e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x251e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x252e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x253e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x254e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x255e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x256e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x257e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x258e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x259e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x25ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x25be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x25ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x25de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x25ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x25fe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x260e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x261e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x262e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x263e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x264e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x265e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x266e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x267e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x268e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x269e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x26ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x26be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x26ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x26de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 14,0x26ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x26fc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x270c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x271c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x272c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x273c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x274c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x275c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x276c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x277c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x278c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x279c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x27ac,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x27bc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x27cc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x27dc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 16,0x27ec,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} },
+{ 5,0x27fc,0,{0x00,0x00,0x00,0x00,0x22} },
+{ 16,0x2801,0,{0x90,0x79,0x64,0xe0,0x14,0x60,0x46,0x14,0x70,0x02,0x41,0x3c,0x24,0x02,0x60,0x02} },
+{ 16,0x2811,0,{0x81,0x2a,0x90,0x7f,0xfc,0x74,0xcc,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x79} },
+{ 16,0x2821,0,{0x78,0x74,0x01,0xf0,0x90,0x79,0x7c,0xe0,0x90,0x79,0x79,0xf0,0x54,0xfd,0xf0,0x44} },
+{ 16,0x2831,0,{0x01,0xf0,0x90,0x79,0x7c,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b} },
+{ 16,0x2841,0,{0xa2,0xe5,0x12,0x60,0x02,0xd2,0xaf,0xe4,0x90,0x79,0x7a,0xf0,0x22,0x90,0x79,0x2d} },
+{ 16,0x2851,0,{0xe0,0x64,0x01,0x60,0x02,0x01,0xf1,0x90,0x7f,0xfc,0x74,0xcc,0xf0,0x90,0x7f,0xff} },
+{ 16,0x2861,0,{0x74,0xfc,0xf0,0x90,0x79,0x78,0x74,0x01,0xf0,0x90,0x79,0x7c,0xe0,0x90,0x79,0x79} },
+{ 16,0x2871,0,{0xf0,0x44,0x01,0xf0,0x44,0x02,0xf0,0x90,0x79,0x7e,0xe0,0xb4,0x01,0x09,0x90,0x79} },
+{ 16,0x2881,0,{0x79,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x54,0xfb,0xf0,0x90,0x79} },
+{ 16,0x2891,0,{0x79,0xe0,0x90,0x79,0x7c,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b} },
+{ 16,0x28a1,0,{0xa2,0x90,0x79,0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90} },
+{ 16,0x28b1,0,{0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90} },
+{ 16,0x28c1,0,{0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0} },
+{ 16,0x28d1,0,{0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x7a,0x74,0x01,0xf0,0x90,0x79,0x65} },
+{ 16,0x28e1,0,{0xf0,0xe5,0x12,0x60,0x02,0xd2,0xaf,0xe4,0x90,0x79,0x8c,0xf0,0x90,0x79,0x8b,0xf0} },
+{ 16,0x28f1,0,{0x90,0x79,0x2d,0xe0,0x64,0x02,0x60,0x02,0x21,0x96,0x90,0x7f,0xfc,0x74,0xc8,0xf0} },
+{ 16,0x2901,0,{0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x79,0x78,0x74,0x01,0xf0,0x90,0x79,0x7c,0xe0} },
+{ 16,0x2911,0,{0x90,0x79,0x79,0xf0,0x44,0x01,0xf0,0x44,0x02,0xf0,0x90,0x79,0x7e,0xe0,0xb4,0x01} },
+{ 16,0x2921,0,{0x09,0x90,0x79,0x79,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x54,0xfb} },
+{ 16,0x2931,0,{0xf0,0x90,0x79,0x79,0xe0,0x90,0x79,0x7c,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2} },
+{ 16,0x2941,0,{0xaf,0x12,0x0b,0xa2,0x90,0x79,0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0,0x90,0x79} },
+{ 16,0x2951,0,{0x79,0xf0,0x90,0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54,0xfe,0xf0} },
+{ 16,0x2961,0,{0x80,0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x44,0x02,0xf0} },
+{ 16,0x2971,0,{0x54,0xfb,0xf0,0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x7a,0x74,0x01,0xf0} },
+{ 16,0x2981,0,{0x90,0x79,0x65,0x74,0x03,0xf0,0xe5,0x12,0x60,0x02,0xd2,0xaf,0xe4,0x90,0x79,0x8c} },
+{ 16,0x2991,0,{0xf0,0x90,0x79,0x8b,0xf0,0x90,0x79,0x2d,0xe0,0x64,0x03,0x60,0x02,0x81,0x2a,0x90} },
+{ 16,0x29a1,0,{0x7f,0xfc,0x74,0x98,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x79,0x78,0x74,0x01} },
+{ 16,0x29b1,0,{0xf0,0x90,0x79,0x7c,0xe0,0x90,0x79,0x79,0xf0,0x44,0x01,0xf0,0x44,0x02,0xf0,0x90} },
+{ 16,0x29c1,0,{0x79,0x7e,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90} },
+{ 16,0x29d1,0,{0x79,0x79,0xe0,0x54,0xfb,0xf0,0x90,0x79,0x79,0xe0,0x90,0x79,0x7c,0xf0,0xa2,0xaf} },
+{ 16,0x29e1,0,{0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0x90,0x79,0x78,0x74,0x02,0xf0,0x90} },
+{ 16,0x29f1,0,{0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79} },
+{ 16,0x2a01,0,{0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79} },
+{ 16,0x2a11,0,{0x79,0xe0,0x54,0xfd,0xf0,0x44,0x04,0xf0,0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90} },
+{ 16,0x2a21,0,{0x79,0x7a,0x74,0x01,0xf0,0x90,0x79,0x65,0x74,0x05,0xf0,0xe5,0x12,0x60,0x02,0xd2} },
+{ 16,0x2a31,0,{0xaf,0xe4,0x90,0x79,0x8c,0xf0,0x90,0x79,0x8b,0xf0,0x22,0x90,0x79,0x2d,0xe0,0x64} },
+{ 16,0x2a41,0,{0x01,0x60,0x02,0x41,0xe0,0x90,0x7f,0xfc,0x74,0xb4,0xf0,0x90,0x7f,0xff,0x74,0xfc} },
+{ 16,0x2a51,0,{0xf0,0x90,0x79,0x78,0x74,0x01,0xf0,0x90,0x79,0x7c,0xe0,0x90,0x79,0x79,0xf0,0x54} },
+{ 16,0x2a61,0,{0xfe,0xf0,0x44,0x02,0xf0,0x90,0x79,0x7e,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0} },
+{ 16,0x2a71,0,{0x44,0x04,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x54,0xfb,0xf0,0x90,0x79,0x79,0xe0} },
+{ 16,0x2a81,0,{0x90,0x79,0x7c,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0x90} },
+{ 16,0x2a91,0,{0x79,0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79,0x7f} },
+{ 16,0x2aa1,0,{0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x79,0x79} },
+{ 16,0x2ab1,0,{0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0,0x90,0x79} },
+{ 16,0x2ac1,0,{0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x7a,0x74,0x01,0xf0,0x90,0x79,0x65,0x04,0xf0} },
+{ 16,0x2ad1,0,{0xe5,0x12,0x60,0x02,0xd2,0xaf,0xe4,0x90,0x79,0x8c,0xf0,0x90,0x79,0x8b,0xf0,0x90} },
+{ 16,0x2ae1,0,{0x79,0x2d,0xe0,0x64,0x02,0x60,0x02,0x61,0x85,0x90,0x7f,0xfc,0x74,0xb0,0xf0,0x90} },
+{ 16,0x2af1,0,{0x7f,0xff,0x74,0xfc,0xf0,0x90,0x79,0x78,0x74,0x01,0xf0,0x90,0x79,0x7c,0xe0,0x90} },
+{ 16,0x2b01,0,{0x79,0x79,0xf0,0x54,0xfe,0xf0,0x44,0x02,0xf0,0x90,0x79,0x7e,0xe0,0xb4,0x01,0x09} },
+{ 16,0x2b11,0,{0x90,0x79,0x79,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x54,0xfb,0xf0} },
+{ 16,0x2b21,0,{0x90,0x79,0x79,0xe0,0x90,0x79,0x7c,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf} },
+{ 16,0x2b31,0,{0x12,0x0b,0xa2,0x90,0x79,0x78,0x74,0x02,0xf0,0x90,0x79,0x84,0xe0,0x90,0x79,0x79} },
+{ 16,0x2b41,0,{0xf0,0x90,0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x54,0xfe,0xf0,0x80} },
+{ 16,0x2b51,0,{0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x44,0x02,0xf0,0x54} },
+{ 16,0x2b61,0,{0xfb,0xf0,0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x7a,0x74,0x01,0xf0,0x90} },
+{ 16,0x2b71,0,{0x79,0x65,0x74,0x04,0xf0,0xe5,0x12,0x60,0x02,0xd2,0xaf,0xe4,0x90,0x79,0x8c,0xf0} },
+{ 16,0x2b81,0,{0x90,0x79,0x8b,0xf0,0x90,0x79,0x2d,0xe0,0x64,0x03,0x60,0x02,0x81,0x2a,0x90,0x7f} },
+{ 16,0x2b91,0,{0xfc,0x74,0x68,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x79,0x78,0x74,0x01,0xf0} },
+{ 16,0x2ba1,0,{0x90,0x79,0x7c,0xe0,0x90,0x79,0x79,0xf0,0x54,0xfe,0xf0,0x44,0x02,0xf0,0x90,0x79} },
+{ 16,0x2bb1,0,{0x7e,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x79} },
+{ 16,0x2bc1,0,{0x79,0xe0,0x54,0xfb,0xf0,0x90,0x79,0x79,0xe0,0x90,0x79,0x7c,0xf0,0xa2,0xaf,0xe4} },
+{ 16,0x2bd1,0,{0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0x90,0x79,0x78,0x74,0x02,0xf0,0x90,0x79} },
+{ 16,0x2be1,0,{0x84,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79,0x7f,0xe0,0xb4,0x01,0x09,0x90,0x79,0x79} },
+{ 16,0x2bf1,0,{0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79,0x79} },
+{ 16,0x2c01,0,{0xe0,0x54,0xfd,0xf0,0x44,0x04,0xf0,0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79} },
+{ 16,0x2c11,0,{0x7a,0x74,0x01,0xf0,0x90,0x79,0x65,0x74,0x06,0xf0,0xe5,0x12,0x60,0x02,0xd2,0xaf} },
+{ 10,0x2c21,0,{0xe4,0x90,0x79,0x8c,0xf0,0x90,0x79,0x8b,0xf0,0x22} },
+{ 16,0x2c2b,0,{0xe4,0xff,0x7b,0x01,0x90,0x78,0x16,0x04,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74,0x58} },
+{ 16,0x2c3b,0,{0xf0,0x90,0x78,0x16,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x12} },
+{ 16,0x2c4b,0,{0x0c,0x5d,0xfe,0x90,0x7f,0xec,0xe0,0x6e,0x60,0x13,0xef,0xc3,0x94,0x06,0x50,0x0d} },
+{ 16,0x2c5b,0,{0x0f,0x90,0x78,0x17,0xe4,0x75,0xf0,0x0f,0x12,0x0c,0xf4,0x80,0xd4,0xbf,0x06,0x08} },
+{ 16,0x2c6b,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x78,0x16,0xe0,0xfb,0xa3,0xe0,0xfa} },
+{ 16,0x2c7b,0,{0xa3,0xe0,0xf9,0x12,0x0c,0x44,0xff,0x24,0x9f,0x70,0x02,0xc1,0x66,0x24,0x21,0x60} },
+{ 16,0x2c8b,0,{0x02,0xc1,0x8c,0x90,0x7f,0xe9,0xe0,0x24,0x7e,0x70,0x02,0xa1,0x30,0x14,0x70,0x02} },
+{ 16,0x2c9b,0,{0xa1,0xc8,0x24,0x02,0x60,0x02,0xc1,0x5e,0x90,0x00,0x02,0x12,0x0d,0xa2,0x7b,0x44} },
+{ 16,0x2cab,0,{0x7a,0xac,0x79,0x00,0x78,0x00,0xc3,0x12,0x0d,0x91,0x70,0x13,0x90,0x7f,0x00,0x74} },
+{ 16,0x2cbb,0,{0x44,0xf0,0xa3,0x74,0xac,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90} },
+{ 16,0x2ccb,0,{0x78,0x16,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x02,0x12,0x0d,0xa2} },
+{ 16,0x2cdb,0,{0x7b,0x80,0x7a,0xbb,0x79,0x00,0x78,0x00,0xc3,0x12,0x0d,0x91,0x70,0x13,0x90,0x7f} },
+{ 16,0x2ceb,0,{0x00,0x74,0x80,0xf0,0xa3,0x74,0xbb,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03} },
+{ 16,0x2cfb,0,{0xf0,0x90,0x78,0x16,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x02,0x12} },
+{ 16,0x2d0b,0,{0x0d,0xa2,0x7b,0x00,0x7a,0x77,0x79,0x01,0x78,0x00,0xc3,0x12,0x0d,0x91,0x60,0x02} },
+{ 16,0x2d1b,0,{0xc1,0x93,0x90,0x7f,0x00,0xf0,0xa3,0x74,0x77,0xf0,0xa3,0x74,0x01,0xf0,0x90,0x7f} },
+{ 16,0x2d2b,0,{0xb5,0x74,0x03,0xf0,0x22,0x90,0x78,0x16,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9} },
+{ 16,0x2d3b,0,{0x90,0x00,0x06,0x12,0x0d,0xa2,0x7b,0x44,0x7a,0xac,0x79,0x00,0x78,0x00,0xc3,0x12} },
+{ 16,0x2d4b,0,{0x0d,0x91,0x70,0x13,0x90,0x7f,0x00,0x74,0x44,0xf0,0xa3,0x74,0xac,0xf0,0xe4,0xa3} },
+{ 16,0x2d5b,0,{0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x78,0x16,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3} },
+{ 16,0x2d6b,0,{0xe0,0xf9,0x90,0x00,0x06,0x12,0x0d,0xa2,0x7b,0x80,0x7a,0xbb,0x79,0x00,0x78,0x00} },
+{ 16,0x2d7b,0,{0xc3,0x12,0x0d,0x91,0x70,0x13,0x90,0x7f,0x00,0x74,0x80,0xf0,0xa3,0x74,0xbb,0xf0} },
+{ 16,0x2d8b,0,{0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x78,0x16,0xe0,0xfb,0xa3,0xe0} },
+{ 16,0x2d9b,0,{0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x06,0x12,0x0d,0xa2,0x7b,0x00,0x7a,0x77,0x79,0x01} },
+{ 16,0x2dab,0,{0x78,0x00,0xc3,0x12,0x0d,0x91,0x60,0x02,0xc1,0x93,0x90,0x7f,0x00,0xf0,0xa3,0x74} },
+{ 16,0x2dbb,0,{0x77,0xf0,0xa3,0x74,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x22,0x90,0x78,0x16} },
+{ 16,0x2dcb,0,{0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x0a,0x12,0x0d,0xa2,0x7b,0x44} },
+{ 16,0x2ddb,0,{0x7a,0xac,0x79,0x00,0x78,0x00,0xc3,0x12,0x0d,0x91,0x70,0x13,0x90,0x7f,0x00,0x74} },
+{ 16,0x2deb,0,{0x44,0xf0,0xa3,0x74,0xac,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90} },
+{ 16,0x2dfb,0,{0x78,0x16,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x0a,0x12,0x0d,0xa2} },
+{ 16,0x2e0b,0,{0x7b,0x80,0x7a,0xbb,0x79,0x00,0x78,0x00,0xc3,0x12,0x0d,0x91,0x70,0x13,0x90,0x7f} },
+{ 16,0x2e1b,0,{0x00,0x74,0x80,0xf0,0xa3,0x74,0xbb,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03} },
+{ 16,0x2e2b,0,{0xf0,0x90,0x78,0x16,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x0a,0x12} },
+{ 16,0x2e3b,0,{0x0d,0xa2,0x7b,0x00,0x7a,0x77,0x79,0x01,0x78,0x00,0xc3,0x12,0x0d,0x91,0x70,0x48} },
+{ 16,0x2e4b,0,{0x90,0x7f,0x00,0xf0,0xa3,0x74,0x77,0xf0,0xa3,0x74,0x01,0xf0,0x90,0x7f,0xb5,0x74} },
+{ 16,0x2e5b,0,{0x03,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x24} },
+{ 16,0x2e6b,0,{0x7f,0x70,0x16,0x90,0x78,0x16,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00} },
+{ 16,0x2e7b,0,{0x0e,0x12,0x0c,0x5d,0x90,0x7f,0x00,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 8,0x2e8b,0,{0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 1,0x2e93,0,{0x22} },
+{ 16,0x2e94,0,{0x75,0x36,0x25,0x75,0x37,0x24,0x90,0x79,0x74,0xe0,0x64,0x01,0x70,0x54,0xf0,0xf5} },
+{ 16,0x2ea4,0,{0x35,0x75,0x22,0x01,0xe5,0x22,0x64,0x01,0x70,0x48,0x90,0x7f,0xa5,0xe0,0x44,0x80} },
+{ 16,0x2eb4,0,{0xf0,0x90,0x7f,0xa6,0xe5,0x36,0xf0,0x12,0x46,0xc0,0x74,0x4f,0x25,0x35,0xf5,0x82} },
+{ 16,0x2ec4,0,{0xe4,0x34,0x79,0xf5,0x83,0xe0,0x90,0x7f,0xa6,0xf0,0x12,0x46,0xc0,0x74,0x35,0x25} },
+{ 16,0x2ed4,0,{0x35,0xf5,0x82,0xe4,0x34,0x79,0xf5,0x83,0xe0,0x90,0x7f,0xa6,0xf0,0x12,0x46,0xc0} },
+{ 16,0x2ee4,0,{0x90,0x7f,0xa5,0x74,0x40,0xf0,0x12,0x0a,0xcd,0x05,0x35,0xe5,0x35,0xc3,0x94,0x0d} },
+{ 16,0x2ef4,0,{0x40,0xb2,0x90,0x79,0x75,0xe0,0x64,0x01,0x60,0x02,0xe1,0xde,0xf0,0x90,0x79,0x20} },
+{ 16,0x2f04,0,{0xe0,0x64,0x05,0x60,0x02,0xe1,0x8d,0x7b,0x01,0x90,0x79,0x5c,0x04,0xf0,0xa3,0x74} },
+{ 16,0x2f14,0,{0x78,0xf0,0xa3,0x74,0xb2,0xf0,0x75,0x33,0x07,0x90,0x79,0x5c,0xe0,0xfb,0xa3,0xe0} },
+{ 16,0x2f24,0,{0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x12,0x0c,0x5d,0x70,0x0f,0x90,0x00,0x04,0x12} },
+{ 16,0x2f34,0,{0x0c,0x5d,0x90,0x79,0x2f,0xf0,0x12,0x0c,0x29,0x80,0x06,0x90,0x79,0x2f,0x74,0xff} },
+{ 16,0x2f44,0,{0xf0,0xe4,0xf5,0x35,0x75,0x22,0x01,0x75,0x34,0x02,0xe5,0x22,0x64,0x01,0x70,0x39} },
+{ 16,0x2f54,0,{0x90,0x7f,0xa5,0xe0,0x44,0x80,0xf0,0x90,0x7f,0xa6,0xe5,0x36,0xf0,0x12,0x46,0xc0} },
+{ 16,0x2f64,0,{0xaf,0x34,0x05,0x34,0x90,0x7f,0xa6,0xef,0xf0,0x12,0x46,0xc0,0x90,0x79,0x2f,0xe0} },
+{ 16,0x2f74,0,{0x90,0x7f,0xa6,0xf0,0x12,0x46,0xc0,0x90,0x7f,0xa5,0x74,0x40,0xf0,0x12,0x0a,0xcd} },
+{ 16,0x2f84,0,{0x05,0x35,0xe5,0x35,0xc3,0x94,0x06,0x40,0xc1,0x90,0x79,0x20,0xe0,0x64,0x06,0x70} },
+{ 16,0x2f94,0,{0x49,0x7b,0x01,0x90,0x79,0x5f,0x04,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74,0xff,0xf0} },
+{ 16,0x2fa4,0,{0x75,0x33,0x03,0x90,0x79,0x5f,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00} },
+{ 16,0x2fb4,0,{0x01,0x12,0x0c,0x5d,0x70,0x1c,0x90,0x00,0x04,0x12,0x0c,0x5d,0x90,0x79,0x33,0xf0} },
+{ 16,0x2fc4,0,{0x70,0x03,0x74,0xff,0xf0,0x90,0x79,0x33,0xe0,0x54,0x7f,0xff,0xf0,0x25,0xe0,0xf0} },
+{ 10,0x2fd4,0,{0x80,0x05,0xe4,0x90,0x79,0x33,0xf0,0x12,0x47,0xdf} },
+{ 1,0x2fde,0,{0x22} },
+{ 16,0x2fdf,0,{0x90,0x79,0x78,0x74,0x03,0xf0,0x90,0x79,0x83,0xe0,0x90,0x79,0x79,0xf0,0xa2,0xaf} },
+{ 16,0x2fef,0,{0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0xe5,0x12,0x60,0x02,0xd2,0xaf,0x22} },
+{ 1,0x2fff,0,{0x22} },
+{ 16,0x3000,0,{0xe4,0xfe,0x90,0x79,0x20,0xe0,0xfd,0xb4,0x05,0x11,0x90,0x78,0x25,0x74,0x01,0xf0} },
+{ 16,0x3010,0,{0xa3,0x74,0x78,0xf0,0xa3,0x74,0xb2,0xf0,0x75,0x35,0x07,0xed,0xb4,0x06,0x11,0x90} },
+{ 16,0x3020,0,{0x78,0x25,0x74,0x01,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74,0xff,0xf0,0x75,0x35,0x03} },
+{ 16,0x3030,0,{0x90,0x7f,0xeb,0xe0,0x14,0x60,0x11,0x14,0x60,0x5b,0x24,0x02,0x60,0x02,0x41,0x05} },
+{ 16,0x3040,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x24,0x7f,0x70,0x3d} },
+{ 16,0x3050,0,{0xe4,0xff,0xef,0xc3,0x95,0x35,0x50,0x2f,0x90,0x78,0x25,0xe0,0xfb,0xa3,0xe0,0xfa} },
+{ 16,0x3060,0,{0xa3,0xe0,0xf9,0x90,0x00,0x01,0x12,0x0c,0x5d,0xfd,0xcc,0xee,0xcc,0x0e,0x74,0x00} },
+{ 16,0x3070,0,{0x2c,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xed,0xf0,0x90,0x78,0x26,0xe4,0x75,0xf0} },
+{ 16,0x3080,0,{0x0b,0x12,0x0c,0xf4,0x0f,0x80,0xcb,0x90,0x7f,0xb5,0xee,0xf0,0x22,0x90,0x7f,0xb4} },
+{ 16,0x3090,0,{0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x24,0x7e,0x60,0x64,0x14,0x70,0x02} },
+{ 16,0x30a0,0,{0x21,0x55,0x14,0x70,0x02,0x21,0xa9,0x24,0x03,0x60,0x02,0x21,0xfd,0xe4,0xff,0xef} },
+{ 16,0x30b0,0,{0xc3,0x95,0x35,0x50,0x46,0x90,0x78,0x25,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9} },
+{ 16,0x30c0,0,{0x90,0x00,0x03,0x12,0x0c,0x5d,0xfd,0xcc,0xee,0xcc,0x0e,0x74,0x00,0x2c,0xf5,0x82} },
+{ 16,0x30d0,0,{0xe4,0x34,0x7f,0xf5,0x83,0xed,0xf0,0x90,0x00,0x04,0x12,0x0c,0x5d,0xfd,0xcc,0xee} },
+{ 16,0x30e0,0,{0xcc,0x0e,0x74,0x00,0x2c,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xed,0xf0,0x90,0x78} },
+{ 16,0x30f0,0,{0x26,0xe4,0x75,0xf0,0x0b,0x12,0x0c,0xf4,0x0f,0x80,0xb4,0x90,0x7f,0xb5,0xee,0xf0} },
+{ 16,0x3100,0,{0x22,0xe4,0xff,0xef,0xc3,0x95,0x35,0x50,0x46,0x90,0x78,0x25,0xe0,0xfb,0xa3,0xe0} },
+{ 16,0x3110,0,{0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x05,0x12,0x0c,0x5d,0xfd,0xcc,0xee,0xcc,0x0e,0x74} },
+{ 16,0x3120,0,{0x00,0x2c,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xed,0xf0,0x90,0x00,0x06,0x12,0x0c} },
+{ 16,0x3130,0,{0x5d,0xfd,0xcc,0xee,0xcc,0x0e,0x74,0x00,0x2c,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83} },
+{ 16,0x3140,0,{0xed,0xf0,0x90,0x78,0x26,0xe4,0x75,0xf0,0x0b,0x12,0x0c,0xf4,0x0f,0x80,0xb4,0x90} },
+{ 16,0x3150,0,{0x7f,0xb5,0xee,0xf0,0x22,0xe4,0xff,0xef,0xc3,0x95,0x35,0x50,0x46,0x90,0x78,0x25} },
+{ 16,0x3160,0,{0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x07,0x12,0x0c,0x5d,0xfd,0xcc} },
+{ 16,0x3170,0,{0xee,0xcc,0x0e,0x74,0x00,0x2c,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xed,0xf0,0x90} },
+{ 16,0x3180,0,{0x00,0x08,0x12,0x0c,0x5d,0xfd,0xcc,0xee,0xcc,0x0e,0x74,0x00,0x2c,0xf5,0x82,0xe4} },
+{ 16,0x3190,0,{0x34,0x7f,0xf5,0x83,0xed,0xf0,0x90,0x78,0x26,0xe4,0x75,0xf0,0x0b,0x12,0x0c,0xf4} },
+{ 16,0x31a0,0,{0x0f,0x80,0xb4,0x90,0x7f,0xb5,0xee,0xf0,0x22,0xe4,0xff,0xef,0xc3,0x95,0x35,0x50} },
+{ 16,0x31b0,0,{0x46,0x90,0x78,0x25,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x09,0x12} },
+{ 16,0x31c0,0,{0x0c,0x5d,0xfd,0xcc,0xee,0xcc,0x0e,0x74,0x00,0x2c,0xf5,0x82,0xe4,0x34,0x7f,0xf5} },
+{ 16,0x31d0,0,{0x83,0xed,0xf0,0x90,0x00,0x0a,0x12,0x0c,0x5d,0xfd,0xcc,0xee,0xcc,0x0e,0x74,0x00} },
+{ 16,0x31e0,0,{0x2c,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xed,0xf0,0x90,0x78,0x26,0xe4,0x75,0xf0} },
+{ 16,0x31f0,0,{0x0b,0x12,0x0c,0xf4,0x0f,0x80,0xb4,0x90,0x7f,0xb5,0xee,0xf0,0x22,0x90,0x7f,0xb4} },
+{ 12,0x3200,0,{0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 1,0x320c,0,{0x22} },
+{ 16,0x320d,0,{0x7b,0x01,0x7a,0x78,0x79,0x2b,0x90,0x78,0x00,0xeb,0xf0,0xa3,0xea,0xf0,0xa3,0xe9} },
+{ 16,0x321d,0,{0xf0,0x74,0x01,0x12,0x0c,0x8a,0x90,0x78,0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0} },
+{ 16,0x322d,0,{0xf9,0x90,0x00,0x01,0x74,0x01,0x12,0x0c,0x9c,0x90,0x00,0x02,0xe4,0x12,0x0c,0x9c} },
+{ 16,0x323d,0,{0x90,0x78,0x01,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x90,0x78,0x00,0xe0,0xfb,0xa3} },
+{ 16,0x324d,0,{0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x10,0x12,0x0c,0x8a,0x90,0x78,0x00,0xe0,0xfb,0xa3} },
+{ 16,0x325d,0,{0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x05,0x12,0x0c,0x9c,0x90,0x00,0x02} },
+{ 16,0x326d,0,{0xe4,0x12,0x0c,0x9c,0x90,0x78,0x01,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x90,0x78} },
+{ 16,0x327d,0,{0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x02,0x12,0x0c,0x8a,0x90,0x78} },
+{ 16,0x328d,0,{0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x02,0x12,0x0c} },
+{ 16,0x329d,0,{0x9c,0x90,0x00,0x02,0xe4,0x12,0x0c,0x9c,0x90,0x78,0x01,0xe4,0x75,0xf0,0x03,0x12} },
+{ 16,0x32ad,0,{0x0c,0xf4,0x90,0x78,0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x01,0x12} },
+{ 16,0x32bd,0,{0x0c,0x8a,0x90,0x78,0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01} },
+{ 16,0x32cd,0,{0x74,0x03,0x12,0x0c,0x9c,0x90,0x00,0x02,0xe4,0x12,0x0c,0x9c,0x90,0x78,0x01,0xe4} },
+{ 16,0x32dd,0,{0x75,0xf0,0x03,0x12,0x0c,0xf4,0x90,0x78,0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0} },
+{ 16,0x32ed,0,{0xf9,0x74,0x10,0x12,0x0c,0x8a,0x90,0x78,0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0} },
+{ 16,0x32fd,0,{0xf9,0x90,0x00,0x01,0x74,0x06,0x12,0x0c,0x9c,0x90,0x00,0x02,0xe4,0x12,0x0c,0x9c} },
+{ 16,0x330d,0,{0x90,0x78,0x01,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x90,0x78,0x00,0xe0,0xfb,0xa3} },
+{ 16,0x331d,0,{0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x02,0x12,0x0c,0x8a,0x90,0x78,0x00,0xe0,0xfb,0xa3} },
+{ 16,0x332d,0,{0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x04,0x12,0x0c,0x9c,0x90,0x00,0x02} },
+{ 16,0x333d,0,{0xe4,0x12,0x0c,0x9c,0x90,0x78,0x01,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x90,0x78} },
+{ 16,0x334d,0,{0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x02,0x12,0x0c,0x8a,0x90,0x78} },
+{ 16,0x335d,0,{0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x04,0x12,0x0c} },
+{ 16,0x336d,0,{0x9c,0x90,0x00,0x02,0x74,0x04,0x12,0x0c,0x9c,0x90,0x78,0x01,0xe4,0x75,0xf0,0x03} },
+{ 16,0x337d,0,{0x12,0x0c,0xf4,0x90,0x78,0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x02} },
+{ 16,0x338d,0,{0x12,0x0c,0x8a,0x90,0x78,0x00,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00} },
+{ 16,0x339d,0,{0x01,0x74,0x03,0x12,0x0c,0x9c,0x90,0x00,0x02,0x74,0x04,0x12,0x0c,0x9c,0x90,0x78} },
+{ 16,0x33ad,0,{0x01,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x90,0x78,0x00,0xe0,0xfb,0xa3,0xe0,0xfa} },
+{ 16,0x33bd,0,{0xa3,0xe0,0xf9,0x74,0x02,0x12,0x0c,0x8a,0x90,0x78,0x00,0xe0,0xfb,0xa3,0xe0,0xfa} },
+{ 16,0x33cd,0,{0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x02,0x12,0x0c,0x9c,0x90,0x00,0x02,0x74,0x04} },
+{ 16,0x33dd,0,{0x12,0x0c,0x9c,0x90,0x78,0x01,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x90,0x78,0x00} },
+{ 16,0x33ed,0,{0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x02,0x12,0x0c,0x8a,0x90,0x78,0x00} },
+{ 16,0x33fd,0,{0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x01,0x12,0x0c,0x9c} },
+{ 8,0x340d,0,{0x90,0x00,0x02,0x74,0x04,0x12,0x0c,0x9c} },
+{ 1,0x3415,0,{0x22} },
+{ 16,0x3416,0,{0xe4,0xfe,0x90,0x79,0x20,0xe0,0xfd,0xb4,0x05,0x11,0x90,0x78,0x1f,0x74,0x01,0xf0} },
+{ 16,0x3426,0,{0xa3,0x74,0x78,0xf0,0xa3,0x74,0xb2,0xf0,0x75,0x35,0x07,0xed,0xb4,0x06,0x11,0x90} },
+{ 16,0x3436,0,{0x78,0x1f,0x74,0x01,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74,0xff,0xf0,0x75,0x35,0x03} },
+{ 16,0x3446,0,{0x90,0x79,0x99,0xe0,0x14,0x60,0x11,0x14,0x60,0x5b,0x24,0x02,0x60,0x02,0xc1,0x06} },
+{ 16,0x3456,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x79,0x97,0xe0,0x14,0x70,0x3e,0xe4} },
+{ 16,0x3466,0,{0xff,0xef,0xc3,0x95,0x35,0x50,0x2f,0xcd,0xee,0xcd,0x0e,0x74,0x21,0x2d,0xf5,0x82} },
+{ 16,0x3476,0,{0xe4,0x34,0x79,0xf5,0x83,0xe0,0xfd,0x90,0x78,0x1f,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3} },
+{ 16,0x3486,0,{0xe0,0xf9,0x90,0x00,0x01,0xed,0x12,0x0c,0x9c,0x90,0x78,0x20,0xe4,0x75,0xf0,0x0b} },
+{ 16,0x3496,0,{0x12,0x0c,0xf4,0x0f,0x80,0xcb,0x90,0x79,0x75,0x74,0x01,0xf0,0x22,0x90,0x7f,0xb4} },
+{ 16,0x34a6,0,{0xe0,0x44,0x01,0xf0,0x22,0x90,0x79,0x97,0xe0,0x24,0xfe,0x60,0x63,0x14,0x70,0x02} },
+{ 16,0x34b6,0,{0xa1,0x64,0x14,0x70,0x02,0xa1,0xb2,0x24,0x03,0x60,0x02,0xa1,0xfe,0xe4,0xff,0xef} },
+{ 16,0x34c6,0,{0xc3,0x95,0x35,0x50,0x44,0xcd,0xee,0xcd,0x0e,0x74,0x21,0x2d,0xf5,0x82,0xe4,0x34} },
+{ 16,0x34d6,0,{0x79,0xf5,0x83,0xe0,0xfd,0x90,0x78,0x1f,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9} },
+{ 16,0x34e6,0,{0x90,0x00,0x03,0xed,0x12,0x0c,0x9c,0xcd,0xee,0xcd,0x0e,0x74,0x21,0x2d,0xf5,0x82} },
+{ 16,0x34f6,0,{0xe4,0x34,0x79,0xf5,0x83,0xe0,0x90,0x00,0x04,0x12,0x0c,0x9c,0x90,0x78,0x20,0xe4} },
+{ 16,0x3506,0,{0x75,0xf0,0x0b,0x12,0x0c,0xf4,0x0f,0x80,0xb6,0x90,0x79,0x75,0x74,0x01,0xf0,0x22} },
+{ 16,0x3516,0,{0xe4,0xff,0xef,0xc3,0x95,0x35,0x40,0x02,0xc1,0x0d,0xcd,0xee,0xcd,0x0e,0x74,0x21} },
+{ 16,0x3526,0,{0x2d,0xf5,0x82,0xe4,0x34,0x79,0xf5,0x83,0xe0,0xfd,0x90,0x78,0x1f,0xe0,0xfb,0xa3} },
+{ 16,0x3536,0,{0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x05,0xed,0x12,0x0c,0x9c,0xcd,0xee,0xcd,0x0e} },
+{ 16,0x3546,0,{0x74,0x21,0x2d,0xf5,0x82,0xe4,0x34,0x79,0xf5,0x83,0xe0,0x90,0x00,0x06,0x12,0x0c} },
+{ 16,0x3556,0,{0x9c,0x90,0x78,0x20,0xe4,0x75,0xf0,0x0b,0x12,0x0c,0xf4,0x0f,0x80,0xb4,0xe4,0xff} },
+{ 16,0x3566,0,{0xef,0xc3,0x95,0x35,0x40,0x02,0xc1,0x0d,0xcd,0xee,0xcd,0x0e,0x74,0x21,0x2d,0xf5} },
+{ 16,0x3576,0,{0x82,0xe4,0x34,0x79,0xf5,0x83,0xe0,0xfd,0x90,0x78,0x1f,0xe0,0xfb,0xa3,0xe0,0xfa} },
+{ 16,0x3586,0,{0xa3,0xe0,0xf9,0x90,0x00,0x07,0xed,0x12,0x0c,0x9c,0xcd,0xee,0xcd,0x0e,0x74,0x21} },
+{ 16,0x3596,0,{0x2d,0xf5,0x82,0xe4,0x34,0x79,0xf5,0x83,0xe0,0x90,0x00,0x08,0x12,0x0c,0x9c,0x90} },
+{ 16,0x35a6,0,{0x78,0x20,0xe4,0x75,0xf0,0x0b,0x12,0x0c,0xf4,0x0f,0x80,0xb4,0xe4,0xff,0xef,0xc3} },
+{ 16,0x35b6,0,{0x95,0x35,0x50,0x53,0xcd,0xee,0xcd,0x0e,0x74,0x21,0x2d,0xf5,0x82,0xe4,0x34,0x79} },
+{ 16,0x35c6,0,{0xf5,0x83,0xe0,0xfd,0x90,0x78,0x1f,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90} },
+{ 16,0x35d6,0,{0x00,0x09,0xed,0x12,0x0c,0x9c,0xcd,0xee,0xcd,0x0e,0x74,0x21,0x2d,0xf5,0x82,0xe4} },
+{ 16,0x35e6,0,{0x34,0x79,0xf5,0x83,0xe0,0x90,0x00,0x0a,0x12,0x0c,0x9c,0x90,0x78,0x20,0xe4,0x75} },
+{ 16,0x35f6,0,{0xf0,0x0b,0x12,0x0c,0xf4,0x0f,0x80,0xb6,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22} },
+{ 7,0x3606,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 1,0x360d,0,{0x22} },
+{ 16,0x360e,0,{0xe4,0xfe,0x90,0x79,0x20,0xe0,0xfd,0xb4,0x05,0x10,0x90,0x78,0x28,0x74,0x01,0xf0} },
+{ 16,0x361e,0,{0xa3,0x74,0x78,0xf0,0xa3,0x74,0xb2,0xf0,0x7f,0x07,0xed,0xb4,0x06,0x10,0x90,0x78} },
+{ 16,0x362e,0,{0x28,0x74,0x01,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74,0xff,0xf0,0x7f,0x03,0x90,0x78} },
+{ 16,0x363e,0,{0x28,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x12,0x0c,0x44,0xfd,0x90,0x7f,0xea} },
+{ 16,0x364e,0,{0xe0,0x6d,0x60,0x12,0xee,0xc3,0x9f,0x50,0x0d,0x90,0x78,0x29,0xe4,0x75,0xf0,0x0b} },
+{ 16,0x365e,0,{0x12,0x0c,0xf4,0x0e,0x80,0xd8,0x90,0x7f,0xeb,0xe0,0x14,0x60,0x11,0x14,0x60,0x46} },
+{ 16,0x366e,0,{0x24,0x02,0x60,0x02,0xe1,0x9a,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f} },
+{ 16,0x367e,0,{0xe9,0xe0,0x24,0x7f,0x70,0x28,0xee,0x6f,0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01} },
+{ 16,0x368e,0,{0xf0,0x22,0x90,0x78,0x28,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01} },
+{ 16,0x369e,0,{0x12,0x0c,0x5d,0x90,0x7f,0x00,0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x22,0x90,0x7f} },
+{ 16,0x36ae,0,{0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x24,0x7e,0x60,0x40,0x14,0x60} },
+{ 16,0x36be,0,{0x6f,0x14,0x70,0x02,0xe1,0x60,0x24,0x03,0x60,0x02,0xe1,0x92,0xee,0x6f,0x70,0x08} },
+{ 16,0x36ce,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x78,0x28,0xe0,0xfb,0xa3,0xe0,0xfa} },
+{ 16,0x36de,0,{0xa3,0xe0,0xf9,0x90,0x00,0x03,0x12,0x0c,0x5d,0x90,0x7f,0x00,0xf0,0x90,0x00,0x04} },
+{ 16,0x36ee,0,{0x12,0x0c,0x5d,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x22,0xee,0x6f} },
+{ 16,0x36fe,0,{0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x78,0x28,0xe0,0xfb,0xa3} },
+{ 16,0x370e,0,{0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x05,0x12,0x0c,0x5d,0x90,0x7f,0x00,0xf0,0x90} },
+{ 16,0x371e,0,{0x00,0x06,0x12,0x0c,0x5d,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x22} },
+{ 16,0x372e,0,{0xee,0x6f,0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x78,0x28,0xe0} },
+{ 16,0x373e,0,{0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x07,0x12,0x0c,0x5d,0x90,0x7f,0x00} },
+{ 16,0x374e,0,{0xf0,0x90,0x00,0x08,0x12,0x0c,0x5d,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x02} },
+{ 16,0x375e,0,{0xf0,0x22,0xee,0x6f,0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x78} },
+{ 16,0x376e,0,{0x28,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x09,0x12,0x0c,0x5d,0x90} },
+{ 16,0x377e,0,{0x7f,0x00,0xf0,0x90,0x00,0x0a,0x12,0x0c,0x5d,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5} },
+{ 16,0x378e,0,{0x74,0x02,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0} },
+{ 3,0x379e,0,{0x44,0x01,0xf0} },
+{ 1,0x37a1,0,{0x22} },
+{ 16,0x37a2,0,{0xc0,0xe0,0xc0,0xf0,0xc0,0x83,0xc0,0x82,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,0xc0,0xe0} },
+{ 16,0x37b2,0,{0xea,0xc0,0xe0,0xeb,0xc0,0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,0xe0,0xef} },
+{ 16,0x37c2,0,{0xc0,0xe0,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x10,0xf0,0x90,0x79,0x83,0xe0,0x54} },
+{ 16,0x37d2,0,{0xfd,0xf0,0x12,0x2f,0xdf,0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,0xe0,0xfd,0xd0,0xe0} },
+{ 16,0x37e2,0,{0xfc,0xd0,0xe0,0xfb,0xd0,0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,0xf8,0xd0,0xd0,0xd0} },
+{ 8,0x37f2,0,{0x82,0xd0,0x83,0xd0,0xf0,0xd0,0xe0,0x32} },
+{ 6,0x37fa,0,{0x53,0x91,0xbf,0xd2,0x26,0x32} },
+{ 16,0x3800,0,{0xe4,0xfe,0x90,0x79,0x20,0xe0,0xfd,0xb4,0x05,0x10,0x90,0x78,0x22,0x74,0x01,0xf0} },
+{ 16,0x3810,0,{0xa3,0x74,0x78,0xf0,0xa3,0x74,0xb2,0xf0,0x7f,0x07,0xed,0xb4,0x06,0x10,0x90,0x78} },
+{ 16,0x3820,0,{0x22,0x74,0x01,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74,0xff,0xf0,0x7f,0x03,0x90,0x78} },
+{ 16,0x3830,0,{0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x12,0x0c,0x44,0xfd,0x90,0x79,0x98} },
+{ 16,0x3840,0,{0xe0,0x6d,0x60,0x12,0xee,0xc3,0x9f,0x50,0x0d,0x90,0x78,0x23,0xe4,0x75,0xf0,0x0b} },
+{ 16,0x3850,0,{0x12,0x0c,0xf4,0x0e,0x80,0xd8,0x90,0x79,0x99,0xe0,0x14,0x60,0x11,0x14,0x60,0x48} },
+{ 16,0x3860,0,{0x24,0x02,0x60,0x02,0x21,0x85,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x79} },
+{ 16,0x3870,0,{0x97,0xe0,0x14,0x70,0x2b,0xee,0x6f,0x70,0x09,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 16,0x3880,0,{0x80,0x17,0x90,0x79,0x21,0xe0,0xfd,0x90,0x78,0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3} },
+{ 16,0x3890,0,{0xe0,0xf9,0x90,0x00,0x01,0xed,0x12,0x0c,0x9c,0x90,0x79,0x75,0x74,0x01,0xf0,0x22} },
+{ 16,0x38a0,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x79,0x97,0xe0,0x24,0xfe,0x60,0x43} },
+{ 16,0x38b0,0,{0x14,0x60,0x6e,0x14,0x70,0x02,0x21,0x4f,0x24,0x03,0x60,0x02,0x21,0x7d,0xee,0x6f} },
+{ 16,0x38c0,0,{0x70,0x09,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x21,0x90,0x79,0x21,0xe0,0xfd} },
+{ 16,0x38d0,0,{0x90,0x78,0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x03,0xed,0x12} },
+{ 16,0x38e0,0,{0x0c,0x9c,0x90,0x79,0x22,0xe0,0x90,0x00,0x04,0x12,0x0c,0x9c,0x90,0x79,0x75,0x74} },
+{ 16,0x38f0,0,{0x01,0xf0,0x22,0xee,0x6f,0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90} },
+{ 16,0x3900,0,{0x79,0x21,0xe0,0xfd,0x90,0x78,0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90} },
+{ 16,0x3910,0,{0x00,0x05,0xed,0x12,0x0c,0x9c,0x90,0x79,0x22,0xe0,0x90,0x00,0x06,0x12,0x0c,0x9c} },
+{ 16,0x3920,0,{0x22,0xee,0x6f,0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x79,0x21} },
+{ 16,0x3930,0,{0xe0,0xfd,0x90,0x78,0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x07} },
+{ 16,0x3940,0,{0xed,0x12,0x0c,0x9c,0x90,0x79,0x22,0xe0,0x90,0x00,0x08,0x12,0x0c,0x9c,0x22,0xee} },
+{ 16,0x3950,0,{0x6f,0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x79,0x21,0xe0,0xfe} },
+{ 16,0x3960,0,{0x90,0x78,0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x09,0xee,0x12} },
+{ 16,0x3970,0,{0x0c,0x9c,0x90,0x79,0x22,0xe0,0x90,0x00,0x0a,0x12,0x0c,0x9c,0x22,0x90,0x7f,0xb4} },
+{ 12,0x3980,0,{0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 1,0x398c,0,{0x22} },
+{ 16,0x398d,0,{0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xe4,0x90,0x79,0x83,0xf0,0x12,0x2f,0xdf,0x90,0x7f} },
+{ 16,0x399d,0,{0xe0,0x74,0x90,0xf0,0x90,0x7f,0xe1,0x74,0x04,0xf0,0xe4,0x90,0x7f,0xdd,0xf0,0x90} },
+{ 16,0x39ad,0,{0x7f,0xa1,0xf0,0x53,0x8e,0xf8,0x75,0x88,0x05,0x75,0xb8,0x20,0x75,0xf8,0x01,0x43} },
+{ 16,0x39bd,0,{0x8e,0x30,0xf5,0xc8,0x75,0xca,0x7f,0x75,0xcb,0xf8,0x43,0xa8,0x20,0x90,0x79,0x74} },
+{ 16,0x39cd,0,{0x04,0xf0,0xc2,0x22,0xe4,0xf5,0x0f,0x90,0x79,0x78,0xf0,0xa3,0xf0,0x90,0x79,0x62} },
+{ 16,0x39dd,0,{0xf0,0xa3,0xf0,0xa3,0xf0,0x90,0x79,0x66,0xf0,0xa3,0xf0,0x90,0x79,0x7b,0xf0,0xa3} },
+{ 16,0x39ed,0,{0xf0,0x90,0x79,0x84,0xf0,0x90,0x79,0x7d,0xf0,0x90,0x79,0x75,0xf0,0xa3,0xf0,0xa3} },
+{ 16,0x39fd,0,{0xf0,0xc2,0x23,0xc2,0x24,0xc2,0x25,0xc2,0x26,0xc2,0x20,0x90,0x7f,0x9b,0xe0,0xf5} },
+{ 16,0x3a0d,0,{0x0a,0x54,0x20,0xf5,0x0a,0x70,0x06,0x90,0x79,0x7e,0xf0,0x80,0x06,0x90,0x79,0x7e} },
+{ 16,0x3a1d,0,{0x74,0x01,0xf0,0x90,0x7f,0x9b,0xe0,0xf5,0x0a,0x54,0x02,0xf5,0x0a,0x70,0x06,0x90} },
+{ 16,0x3a2d,0,{0x79,0x7f,0xf0,0x80,0x06,0x90,0x79,0x7f,0x74,0x01,0xf0,0x90,0x79,0x78,0x74,0x02} },
+{ 16,0x3a3d,0,{0xf0,0x90,0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79,0x7f,0xe0,0xb4,0x01,0x09} },
+{ 16,0x3a4d,0,{0x90,0x79,0x79,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0} },
+{ 16,0x3a5d,0,{0x90,0x79,0x79,0xe0,0x90,0x79,0x84,0xf0,0x12,0x0b,0xa2,0x90,0x79,0x78,0x74,0x01} },
+{ 16,0x3a6d,0,{0xf0,0x90,0x79,0x7c,0xe0,0x90,0x79,0x79,0xf0,0x90,0x79,0x7e,0xe0,0xb4,0x01,0x09} },
+{ 16,0x3a7d,0,{0x90,0x79,0x79,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x54,0xfb,0xf0} },
+{ 16,0x3a8d,0,{0x90,0x79,0x79,0xe0,0x90,0x79,0x7c,0xf0,0x12,0x0b,0xa2,0xe4,0x90,0x79,0x78,0xf0} },
+{ 16,0x3a9d,0,{0xa3,0x04,0xf0,0xe4,0x90,0x79,0x88,0xf0,0x12,0x0b,0xa2,0x90,0x7f,0xfc,0x74,0xdd} },
+{ 16,0x3aad,0,{0xf0,0x90,0x7f,0xff,0x74,0xff,0xf0,0x90,0x79,0x78,0x74,0x01,0xf0,0xa3,0xf0,0x12} },
+{ 16,0x3abd,0,{0x0b,0xa2,0xe4,0x90,0x79,0x7a,0xf0,0x90,0x79,0x83,0x04,0xf0,0x12,0x2f,0xdf,0xe4} },
+{ 16,0x3acd,0,{0x90,0x79,0x30,0xf0,0x90,0x79,0x85,0xf0,0xa3,0xf0,0xa3,0xf0,0x12,0x2e,0x94,0x90} },
+{ 16,0x3add,0,{0x79,0x2d,0x74,0x02,0xf0,0x90,0x79,0x88,0x14,0xf0,0xc2,0x2f,0xe4,0x90,0x79,0x68} },
+{ 16,0x3aed,0,{0xf0,0x90,0x79,0x8a,0xf0,0x90,0x79,0x6a,0xf0,0xa3,0xf0,0x75,0x13,0x08,0x75,0x14} },
+{ 16,0x3afd,0,{0x08,0xf5,0x16,0xf5,0x15,0xf5,0x17,0x90,0x79,0x8c,0xf0,0x90,0x79,0x8b,0xf0,0x22} },
+{ 16,0x3b0d,0,{0x7b,0x01,0x7a,0x78,0x79,0x58,0x90,0x78,0x03,0xeb,0xf0,0xa3,0xea,0xf0,0xa3,0xe9} },
+{ 16,0x3b1d,0,{0xf0,0x74,0x40,0x12,0x0c,0x8a,0x90,0x78,0x03,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0} },
+{ 16,0x3b2d,0,{0xf9,0x90,0x00,0x01,0x74,0x0a,0x12,0x0c,0x9c,0x90,0x00,0x02,0x12,0x0d,0xf6,0x00} },
+{ 16,0x3b3d,0,{0x00,0xbb,0x80,0x90,0x00,0x06,0x12,0x0d,0xf6,0x00,0x00,0xac,0x44,0x90,0x00,0x0a} },
+{ 16,0x3b4d,0,{0x12,0x0d,0xf6,0x00,0x01,0x77,0x00,0x90,0x78,0x04,0xe4,0x75,0xf0,0x0f,0x12,0x0c} },
+{ 16,0x3b5d,0,{0xf4,0x90,0x78,0x03,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x40,0x12,0x0c} },
+{ 16,0x3b6d,0,{0x8a,0x90,0x78,0x03,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74} },
+{ 16,0x3b7d,0,{0x8c,0x12,0x0c,0x9c,0x90,0x00,0x02,0x12,0x0d,0xf6,0x00,0x00,0xbb,0x80,0x90,0x00} },
+{ 16,0x3b8d,0,{0x06,0x12,0x0d,0xf6,0x00,0x00,0xac,0x44,0x90,0x00,0x0a,0x12,0x0d,0xf6,0x00,0x01} },
+{ 16,0x3b9d,0,{0x77,0x00,0x90,0x78,0x04,0xe4,0x75,0xf0,0x0f,0x12,0x0c,0xf4,0x90,0x78,0x03,0xe0} },
+{ 16,0x3bad,0,{0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x40,0x12,0x0c,0x8a,0x90,0x78,0x03,0xe0} },
+{ 16,0x3bbd,0,{0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x8f,0x12,0x0c,0x9c,0x90} },
+{ 16,0x3bcd,0,{0x78,0x04,0xe4,0x75,0xf0,0x0f,0x12,0x0c,0xf4,0x90,0x78,0x03,0xe0,0xfb,0xa3,0xe0} },
+{ 16,0x3bdd,0,{0xfa,0xa3,0xe0,0xf9,0x74,0x41,0x12,0x0c,0x8a,0x90,0x78,0x03,0xe0,0xfb,0xa3,0xe0} },
+{ 16,0x3bed,0,{0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x84,0x12,0x0c,0x9c,0x90,0x78,0x04,0xe4} },
+{ 16,0x3bfd,0,{0x75,0xf0,0x0f,0x12,0x0c,0xf4,0x90,0x78,0x03,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0} },
+{ 16,0x3c0d,0,{0xf9,0x74,0x61,0x12,0x0c,0x8a,0x90,0x78,0x03,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0} },
+{ 16,0x3c1d,0,{0xf9,0x90,0x00,0x01,0x74,0x81,0x12,0x0c,0x9c,0x90,0x78,0x04,0xe4,0x75,0xf0,0x0f} },
+{ 16,0x3c2d,0,{0x12,0x0c,0xf4,0x90,0x78,0x03,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x74,0x61} },
+{ 16,0x3c3d,0,{0x12,0x0c,0x8a,0x90,0x78,0x03,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00} },
+{ 6,0x3c4d,0,{0x01,0x74,0x01,0x12,0x0c,0x9c} },
+{ 1,0x3c53,0,{0x22} },
+{ 16,0x3c54,0,{0xc0,0xe0,0xc0,0xf0,0xc0,0x83,0xc0,0x82,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,0xc0,0xe0} },
+{ 16,0x3c64,0,{0xea,0xc0,0xe0,0xeb,0xc0,0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,0xe0,0xef} },
+{ 2,0x3c74,0,{0xc0,0xe0} },
+{ 16,0x3c76,0,{0x90,0x7f,0xa2,0xe0,0xf5,0x0b,0x90,0x7f,0x74,0xe0,0x90,0x79,0x70,0xf0,0x90,0x7f} },
+{ 16,0x3c86,0,{0x75,0xe0,0x90,0x79,0x71,0xf0,0x90,0x79,0x83,0xe0,0xff,0xfe,0x54,0x02,0xfe,0x70} },
+{ 16,0x3c96,0,{0x0d,0xef,0x44,0x02,0xf0,0x12,0x2f,0xdf,0x90,0x79,0x74,0x74,0x01,0xf0,0xe5,0x0b} },
+{ 16,0x3ca6,0,{0x20,0xe2,0x28,0x90,0x79,0x70,0xe0,0xfe,0xa3,0xe0,0x7c,0x00,0x24,0x00,0xf5,0x11} },
+{ 16,0x3cb6,0,{0xec,0x3e,0xf5,0x10,0x90,0x79,0x82,0xe0,0xfd,0xae,0x10,0xaf,0x11,0x12,0x0c,0xbe} },
+{ 16,0x3cc6,0,{0x90,0x79,0x70,0xef,0xf0,0x90,0x79,0x89,0x74,0x01,0xf0,0x12,0x48,0x43,0x12,0x48} },
+{ 16,0x3cd6,0,{0x76,0x90,0x79,0x89,0xe0,0x64,0x01,0x70,0x32,0x12,0x41,0x08,0x90,0x79,0x89,0xe4} },
+{ 16,0x3ce6,0,{0xf0,0x90,0x7f,0x98,0xe0,0x44,0x40,0xf0,0x90,0x7f,0x9e,0xe0,0x44,0x40,0xf0,0x90} },
+{ 16,0x3cf6,0,{0x7f,0x95,0x74,0x80,0xf0,0x75,0xe8,0x01,0x12,0x09,0x32,0x75,0xe8,0x0d,0x90,0x7f} },
+{ 16,0x3d06,0,{0x95,0x74,0xc0,0xf0,0x75,0xe8,0x0d,0xd2,0x20,0x80,0x05,0x75,0xe8,0x01,0xc2,0x20} },
+{ 16,0x3d16,0,{0x20,0x20,0x2b,0x90,0x79,0x2d,0xe0,0xff,0xb4,0x01,0x09,0x75,0x0c,0x67,0x75,0x0d} },
+{ 16,0x3d26,0,{0x06,0x75,0x0e,0x0b,0xef,0xb4,0x02,0x09,0x75,0x0c,0x00,0x75,0x0d,0x00,0x75,0x0e} },
+{ 16,0x3d36,0,{0x0c,0xef,0xb4,0x03,0x09,0x75,0x0c,0x00,0x75,0x0d,0x00,0x75,0x0e,0x18,0x75,0xca} },
+{ 16,0x3d46,0,{0x6f,0x75,0xcb,0xfe,0xd2,0xca,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x02,0xf0,0xf0} },
+{ 16,0x3d56,0,{0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,0xe0,0xfd,0xd0,0xe0,0xfc,0xd0,0xe0,0xfb,0xd0} },
+{ 16,0x3d66,0,{0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,0xf8,0xd0,0xd0,0xd0,0x82,0xd0,0x83,0xd0,0xf0} },
+{ 3,0x3d76,0,{0xd0,0xe0,0x32} },
+{ 16,0x3d79,0,{0x75,0x33,0x25,0x75,0x34,0x24,0x90,0x79,0x5c,0x74,0x01,0xf0,0xa3,0x74,0x78,0xf0} },
+{ 16,0x3d89,0,{0xa3,0x74,0xb2,0xf0,0x20,0x2f,0x02,0xc1,0x17,0xe4,0xf5,0x35,0x75,0x22,0x01,0x90} },
+{ 16,0x3d99,0,{0x79,0x5c,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x04,0x12,0x0c,0x5d} },
+{ 16,0x3da9,0,{0xf5,0x36,0x75,0x35,0x06,0x74,0x42,0x25,0x35,0xf5,0x82,0xe4,0x34,0x79,0xf5,0x83} },
+{ 16,0x3db9,0,{0xe5,0x36,0xf0,0x05,0x35,0xe5,0x35,0xb4,0x0c,0xeb,0xe5,0x35,0xc3,0x94,0x0d,0x40} },
+{ 16,0x3dc9,0,{0x02,0xc1,0x98,0xe5,0x22,0x64,0x01,0x60,0x02,0xc1,0x98,0x90,0x7f,0xa5,0xe0,0x44} },
+{ 16,0x3dd9,0,{0x80,0xf0,0x90,0x7f,0xa6,0xe5,0x33,0xf0,0x12,0x46,0xc0,0x74,0x4f,0x25,0x35,0xf5} },
+{ 16,0x3de9,0,{0x82,0xe4,0x34,0x79,0xf5,0x83,0xe0,0x90,0x7f,0xa6,0xf0,0x12,0x46,0xc0,0x74,0x42} },
+{ 16,0x3df9,0,{0x25,0x35,0xf5,0x82,0xe4,0x34,0x79,0xf5,0x83,0xe0,0x90,0x7f,0xa6,0xf0,0x12,0x46} },
+{ 16,0x3e09,0,{0xc0,0x90,0x7f,0xa5,0x74,0x40,0xf0,0x12,0x0a,0xcd,0x05,0x35,0x80,0xac,0xe4,0xf5} },
+{ 16,0x3e19,0,{0x35,0x75,0x22,0x01,0x90,0x79,0x5c,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90} },
+{ 16,0x3e29,0,{0x00,0x04,0x12,0x0c,0x5d,0xf5,0x36,0x75,0x35,0x06,0x74,0x35,0x25,0x35,0xf5,0x82} },
+{ 16,0x3e39,0,{0xe4,0x34,0x79,0xf5,0x83,0xe5,0x36,0xf0,0x05,0x35,0xe5,0x35,0xb4,0x0c,0xeb,0xe5} },
+{ 16,0x3e49,0,{0x35,0xc3,0x94,0x0d,0x50,0x49,0xe5,0x22,0x64,0x01,0x70,0x43,0x90,0x7f,0xa5,0xe0} },
+{ 16,0x3e59,0,{0x44,0x80,0xf0,0x90,0x7f,0xa6,0xe5,0x33,0xf0,0x12,0x46,0xc0,0x74,0x4f,0x25,0x35} },
+{ 16,0x3e69,0,{0xf5,0x82,0xe4,0x34,0x79,0xf5,0x83,0xe0,0x90,0x7f,0xa6,0xf0,0x12,0x46,0xc0,0x74} },
+{ 16,0x3e79,0,{0x35,0x25,0x35,0xf5,0x82,0xe4,0x34,0x79,0xf5,0x83,0xe0,0x90,0x7f,0xa6,0xf0,0x12} },
+{ 15,0x3e89,0,{0x46,0xc0,0x90,0x7f,0xa5,0x74,0x40,0xf0,0x12,0x0a,0xcd,0x05,0x35,0x80,0xb0} },
+{ 1,0x3e98,0,{0x22} },
+{ 16,0x3e99,0,{0x90,0x78,0x09,0x74,0x01,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74,0xb2,0xf0,0xe4,0xff} },
+{ 16,0x3ea9,0,{0xfe,0x90,0x78,0x09,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0xef,0x12,0x0c,0x8a} },
+{ 16,0x3eb9,0,{0x90,0x78,0x09,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0xe4,0x12} },
+{ 16,0x3ec9,0,{0x0c,0x9c,0x90,0x00,0x02,0x74,0x15,0x12,0x0c,0x9c,0x90,0x00,0x03,0xe4,0x12,0x0c} },
+{ 16,0x3ed9,0,{0x9c,0x90,0x00,0x04,0x74,0xff,0x12,0x0c,0x9c,0x90,0x00,0x05,0xe4,0x12,0x0c,0x9c} },
+{ 16,0x3ee9,0,{0x90,0x00,0x06,0x74,0xc3,0x12,0x0c,0x9c,0x90,0x00,0x07,0xe4,0x12,0x0c,0x9c,0x90} },
+{ 16,0x3ef9,0,{0x00,0x08,0xe4,0x12,0x0c,0x9c,0x90,0x00,0x09,0xe4,0x12,0x0c,0x9c,0x90,0x00,0x0a} },
+{ 16,0x3f09,0,{0x74,0x01,0x12,0x0c,0x9c,0x90,0x78,0x0a,0xe4,0x75,0xf0,0x0b,0x12,0x0c,0xf4,0x0f} },
+{ 16,0x3f19,0,{0x0e,0xbe,0x07,0x8d,0x90,0x78,0x09,0x74,0x01,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74} },
+{ 16,0x3f29,0,{0xff,0xf0,0xe4,0xff,0xfe,0x90,0x78,0x09,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9} },
+{ 16,0x3f39,0,{0xef,0x12,0x0c,0x8a,0x90,0x78,0x09,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90} },
+{ 16,0x3f49,0,{0x00,0x01,0xe4,0x12,0x0c,0x9c,0x90,0x00,0x02,0x74,0x15,0x12,0x0c,0x9c,0x90,0x00} },
+{ 16,0x3f59,0,{0x03,0xe4,0x12,0x0c,0x9c,0x90,0x00,0x04,0x74,0x80,0x12,0x0c,0x9c,0x90,0x00,0x05} },
+{ 16,0x3f69,0,{0xe4,0x12,0x0c,0x9c,0x90,0x00,0x06,0x74,0xc3,0x12,0x0c,0x9c,0x90,0x00,0x07,0xe4} },
+{ 16,0x3f79,0,{0x12,0x0c,0x9c,0x90,0x00,0x08,0xe4,0x12,0x0c,0x9c,0x90,0x00,0x09,0xe4,0x12,0x0c} },
+{ 16,0x3f89,0,{0x9c,0x90,0x00,0x0a,0x74,0x01,0x12,0x0c,0x9c,0x90,0x78,0x0a,0xe4,0x75,0xf0,0x0b} },
+{ 8,0x3f99,0,{0x12,0x0c,0xf4,0x0f,0x0e,0xbe,0x03,0x8d} },
+{ 1,0x3fa1,0,{0x22} },
+{ 16,0x3fa2,0,{0xe4,0xfe,0x75,0x3d,0xff,0x75,0x3e,0x05,0x75,0x3f,0x12,0xab,0x3d,0xaa,0x3e,0xa9} },
+{ 16,0x3fb2,0,{0x3f,0x90,0x00,0x01,0x12,0x0c,0x5d,0x64,0x02,0x70,0x2f,0xcd,0xee,0xcd,0x0e,0xed} },
+{ 16,0x3fc2,0,{0x6f,0x70,0x01,0x22,0x90,0x00,0x02,0x12,0x0d,0x0a,0x85,0xf0,0x3b,0xf5,0x3c,0x62} },
+{ 16,0x3fd2,0,{0x3b,0xe5,0x3b,0x62,0x3c,0xe5,0x3c,0x62,0x3b,0x29,0xfd,0xe5,0x3b,0x3a,0xc9,0xed} },
+{ 16,0x3fe2,0,{0xc9,0x75,0x3d,0xff,0xf5,0x3e,0x89,0x3f,0x80,0xc1,0x7b,0x00,0x7a,0x00,0x79,0x00} },
+{ 1,0x3ff2,0,{0x22} },
+{ 9,0x3ff3,0,{0x53,0xd8,0xef,0x43,0xd8,0x20,0xc2,0x2d,0x32} },
+{ 4,0x3ffc,0,{0x53,0x91,0xdf,0x32} },
+{ 16,0x4000,0,{0x90,0x79,0x87,0xe0,0xb4,0x01,0x1d,0x90,0x79,0x85,0xe0,0xb4,0x01,0x03,0x12,0x42} },
+{ 16,0x4010,0,{0xaa,0x90,0x79,0x86,0xe0,0xb4,0x01,0x03,0x12,0x18,0x00,0xe4,0x90,0x79,0x85,0xf0} },
+{ 16,0x4020,0,{0xa3,0xf0,0xa3,0xf0,0x12,0x2e,0x94,0x90,0x7f,0x9b,0xe0,0xf5,0x0a,0x54,0x02,0xf5} },
+{ 16,0x4030,0,{0x0a,0x70,0x04,0x90,0x79,0x7f,0xf0,0x90,0x7f,0x9b,0xe0,0xf5,0x0a,0x54,0x02,0xff} },
+{ 16,0x4040,0,{0xf5,0x0a,0xbf,0x02,0x06,0x90,0x79,0x7f,0x74,0x01,0xf0,0x90,0x7f,0x9b,0xe0,0xf5} },
+{ 16,0x4050,0,{0x0a,0x54,0x20,0xf5,0x0a,0x70,0x04,0x90,0x79,0x7e,0xf0,0x90,0x7f,0x9b,0xe0,0xf5} },
+{ 16,0x4060,0,{0x0a,0x54,0x20,0xff,0xf5,0x0a,0xbf,0x20,0x06,0x90,0x79,0x7e,0x74,0x01,0xf0,0x90} },
+{ 16,0x4070,0,{0x79,0x7f,0xe0,0xff,0x90,0x79,0x81,0xe0,0x6f,0x60,0x38,0x90,0x79,0x78,0x74,0x02} },
+{ 16,0x4080,0,{0xf0,0x90,0x79,0x84,0xe0,0x90,0x79,0x79,0xf0,0xef,0xb4,0x01,0x06,0xe0,0x54,0xfe} },
+{ 16,0x4090,0,{0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x44,0x01,0xf0,0x90,0x79,0x79,0xe0,0x90,0x79} },
+{ 16,0x40a0,0,{0x84,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0xe5,0x12,0x60} },
+{ 16,0x40b0,0,{0x02,0xd2,0xaf,0x90,0x79,0x7e,0xe0,0xff,0x90,0x79,0x80,0xe0,0x6f,0x60,0x38,0x90} },
+{ 16,0x40c0,0,{0x79,0x78,0x74,0x01,0xf0,0x90,0x79,0x7c,0xe0,0x90,0x79,0x79,0xf0,0xef,0xb4,0x01} },
+{ 16,0x40d0,0,{0x06,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x79,0x79,0xe0,0x54,0xfb,0xf0,0x90,0x79} },
+{ 16,0x40e0,0,{0x79,0xe0,0x90,0x79,0x7c,0xf0,0xa2,0xaf,0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b} },
+{ 16,0x40f0,0,{0xa2,0xe5,0x12,0x60,0x02,0xd2,0xaf,0x90,0x79,0x7f,0xe0,0x90,0x79,0x81,0xf0,0x90} },
+{ 8,0x4100,0,{0x79,0x7e,0xe0,0x90,0x79,0x80,0xf0,0x22} },
+{ 16,0x4108,0,{0x90,0x79,0x2d,0xe0,0x64,0x01,0x70,0x35,0x90,0x79,0x70,0xe0,0xff,0xd3,0x94,0x2d} },
+{ 16,0x4118,0,{0x40,0x2b,0x90,0x79,0x69,0x74,0x01,0xf0,0x90,0x79,0x68,0xe0,0x04,0xf0,0xe0,0xd3} },
+{ 16,0x4128,0,{0x94,0x0f,0x40,0x19,0xe4,0xf0,0xef,0xd3,0x94,0x31,0x40,0x08,0x90,0x79,0x2d,0x74} },
+{ 16,0x4138,0,{0x03,0xf0,0x80,0x06,0x90,0x79,0x2d,0x74,0x02,0xf0,0x12,0x10,0x00,0x90,0x79,0x2d} },
+{ 16,0x4148,0,{0xe0,0xb4,0x02,0x2c,0x90,0x79,0x70,0xe0,0xff,0xc3,0x94,0x2f,0x50,0x22,0xef,0xd3} },
+{ 16,0x4158,0,{0x94,0x2a,0x40,0x1c,0x90,0x79,0x69,0x74,0x01,0xf0,0x90,0x79,0x68,0xe0,0x04,0xf0} },
+{ 16,0x4168,0,{0xe0,0xd3,0x94,0x0f,0x40,0x0a,0xe4,0xf0,0x90,0x79,0x2d,0x04,0xf0,0x12,0x10,0x00} },
+{ 16,0x4178,0,{0x90,0x79,0x2d,0xe0,0xb4,0x02,0x26,0x90,0x79,0x70,0xe0,0xd3,0x94,0x31,0x40,0x1d} },
+{ 16,0x4188,0,{0x90,0x79,0x69,0x74,0x01,0xf0,0x90,0x79,0x68,0xe0,0x04,0xf0,0xe0,0xd3,0x94,0x0f} },
+{ 16,0x4198,0,{0x40,0x0b,0xe4,0xf0,0x90,0x79,0x2d,0x74,0x03,0xf0,0x12,0x10,0x00,0x90,0x79,0x2d} },
+{ 16,0x41a8,0,{0xe0,0x64,0x03,0x70,0x3f,0x90,0x79,0x70,0xe0,0xff,0xc3,0x94,0x5f,0x50,0x35,0x90} },
+{ 16,0x41b8,0,{0x79,0x69,0x74,0x01,0xf0,0x90,0x79,0x68,0xe0,0x04,0xf0,0xe0,0xd3,0x94,0x0f,0x40} },
+{ 16,0x41c8,0,{0x23,0xe4,0xf0,0xef,0xc3,0x94,0x2f,0x50,0x0c,0xef,0xd3,0x94,0x2a,0x40,0x06,0x90} },
+{ 16,0x41d8,0,{0x79,0x2d,0x74,0x01,0xf0,0xef,0xd3,0x94,0x2f,0x40,0x06,0x90,0x79,0x2d,0x74,0x02} },
+{ 16,0x41e8,0,{0xf0,0x12,0x10,0x00,0x90,0x79,0x69,0xe0,0x70,0x05,0x90,0x79,0x68,0xf0,0x22,0xe4} },
+{ 5,0x41f8,0,{0x90,0x79,0x69,0xf0,0x22} },
+{ 16,0x41fd,0,{0x7b,0x01,0x7a,0x78,0x79,0x4c,0x90,0x78,0x06,0xeb,0xf0,0xa3,0xea,0xf0,0xa3,0xe9} },
+{ 16,0x420d,0,{0xf0,0xe4,0x12,0x0c,0x8a,0x90,0x78,0x06,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9} },
+{ 16,0x421d,0,{0x90,0x00,0x01,0x74,0x01,0x12,0x0c,0x9c,0x90,0x78,0x07,0xe4,0x75,0xf0,0x03,0x12} },
+{ 16,0x422d,0,{0x0c,0xf4,0x90,0x78,0x06,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0xe4,0x12,0x0c} },
+{ 16,0x423d,0,{0x8a,0x90,0x78,0x06,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74} },
+{ 16,0x424d,0,{0x02,0x12,0x0c,0x9c,0x90,0x78,0x07,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x90,0x78} },
+{ 16,0x425d,0,{0x06,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0xe4,0x12,0x0c,0x8a,0x90,0x78,0x06} },
+{ 16,0x426d,0,{0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x03,0x12,0x0c,0x9c} },
+{ 16,0x427d,0,{0x90,0x78,0x07,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x90,0x78,0x06,0xe0,0xfb,0xa3} },
+{ 16,0x428d,0,{0xe0,0xfa,0xa3,0xe0,0xf9,0xe4,0x12,0x0c,0x8a,0x90,0x78,0x06,0xe0,0xfb,0xa3,0xe0} },
+{ 12,0x429d,0,{0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x74,0x04,0x12,0x0c,0x9c} },
+{ 1,0x42a9,0,{0x22} },
+{ 16,0x42aa,0,{0xe4,0xff,0xfe,0x7b,0x01,0x90,0x78,0x0c,0x04,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74} },
+{ 16,0x42ba,0,{0x2b,0xf0,0x90,0x78,0x0c,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x02} },
+{ 16,0x42ca,0,{0x12,0x0c,0x5d,0xfd,0x90,0x79,0x9a,0xe0,0x6d,0x60,0x13,0xef,0xc3,0x94,0x05,0x50} },
+{ 16,0x42da,0,{0x0d,0x0f,0x90,0x78,0x0d,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x80,0xd4,0x8d,0x33} },
+{ 16,0x42ea,0,{0x90,0x78,0x0c,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x01,0x12,0x0c} },
+{ 16,0x42fa,0,{0x5d,0xfd,0x90,0x79,0x9b,0xe0,0xfc,0x6d,0x60,0x13,0xee,0xc3,0x94,0x0b,0x50,0x0d} },
+{ 16,0x430a,0,{0x0e,0x90,0x78,0x0d,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x80,0xd3,0x8c,0x34,0xef} },
+{ 16,0x431a,0,{0x64,0x05,0x60,0x03,0xbe,0x0b,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90} },
+{ 16,0x432a,0,{0x78,0x0c,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x12,0x0c,0x44,0xff,0x24,0xf0} },
+{ 16,0x433a,0,{0x60,0x08,0x24,0x0e,0x70,0x0e,0x12,0x49,0x4d,0x22,0x90,0x79,0x20,0xe5,0x34,0xf0} },
+{ 11,0x434a,0,{0x12,0x1b,0x2a,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0} },
+{ 1,0x4355,0,{0x22} },
+{ 12,0x4356,0,{0x78,0x7f,0xe4,0xf6,0xd8,0xfd,0x75,0x81,0x3f,0x02,0x43,0x9d} },
+{ 16,0x4362,0,{0x02,0x48,0xa9,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0x40,0x03,0xf6,0x80,0x01,0xf2} },
+{ 16,0x4372,0,{0x08,0xdf,0xf4,0x80,0x29,0xe4,0x93,0xa3,0xf8,0x54,0x07,0x24,0x0c,0xc8,0xc3,0x33} },
+{ 16,0x4382,0,{0xc4,0x54,0x0f,0x44,0x20,0xc8,0x83,0x40,0x04,0xf4,0x56,0x80,0x01,0x46,0xf6,0xdf} },
+{ 16,0x4392,0,{0xe4,0x80,0x0b,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x90,0x46,0x61,0xe4,0x7e} },
+{ 16,0x43a2,0,{0x01,0x93,0x60,0xbc,0xa3,0xff,0x54,0x3f,0x30,0xe5,0x09,0x54,0x1f,0xfe,0xe4,0x93} },
+{ 16,0x43b2,0,{0xa3,0x60,0x01,0x0e,0xcf,0x54,0xc0,0x25,0xe0,0x60,0xa8,0x40,0xb8,0xe4,0x93,0xa3} },
+{ 16,0x43c2,0,{0xfa,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca} },
+{ 16,0x43d2,0,{0xf0,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca,0xdf,0xe9,0xde,0xe7,0x80,0xbe} },
+{ 16,0x43e2,0,{0xc0,0xe0,0xc0,0xf0,0xc0,0x83,0xc0,0x82,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,0xc0,0xe0} },
+{ 16,0x43f2,0,{0xea,0xc0,0xe0,0xeb,0xc0,0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,0xe0,0xef} },
+{ 16,0x4402,0,{0xc0,0xe0,0xc2,0xca,0xc2,0xcf,0x90,0x79,0x7a,0xe0,0xb4,0x01,0x1f,0x12,0x4b,0xae} },
+{ 16,0x4412,0,{0x12,0x47,0x58,0x53,0xa8,0xa0,0x90,0x7f,0xae,0xe4,0xf0,0x12,0x07,0xaa,0x12,0x4b} },
+{ 16,0x4422,0,{0xb7,0x90,0x7f,0xae,0x74,0x1f,0xf0,0x43,0xa8,0x05,0x80,0x03,0x53,0xa8,0xa0,0x53} },
+{ 16,0x4432,0,{0xa8,0xfa,0x75,0xe8,0x01,0x12,0x09,0x15,0x75,0xe8,0x0d,0x43,0xa8,0x05,0xd0,0xe0} },
+{ 16,0x4442,0,{0xff,0xd0,0xe0,0xfe,0xd0,0xe0,0xfd,0xd0,0xe0,0xfc,0xd0,0xe0,0xfb,0xd0,0xe0,0xfa} },
+{ 16,0x4452,0,{0xd0,0xe0,0xf9,0xd0,0xe0,0xf8,0xd0,0xd0,0xd0,0x82,0xd0,0x83,0xd0,0xf0,0xd0,0xe0} },
+{ 1,0x4462,0,{0x32} },
+{ 16,0x4463,0,{0x90,0x7f,0xec,0xe0,0xf5,0x09,0x14,0x60,0x1d,0x14,0x60,0x2a,0x14,0x60,0x37,0x14} },
+{ 16,0x4473,0,{0x60,0x44,0x24,0x04,0x70,0x50,0x90,0x79,0x62,0xe0,0x90,0x7f,0x00,0xf0,0x90,0x7f} },
+{ 16,0x4483,0,{0xb5,0x74,0x01,0xf0,0x80,0x47,0x90,0x79,0x63,0xe0,0x90,0x7f,0x00,0xf0,0x90,0x7f} },
+{ 16,0x4493,0,{0xb5,0x74,0x01,0xf0,0x80,0x37,0x90,0x79,0x64,0xe0,0x90,0x7f,0x00,0xf0,0x90,0x7f} },
+{ 16,0x44a3,0,{0xb5,0x74,0x01,0xf0,0x80,0x27,0x90,0x79,0x66,0xe0,0x90,0x7f,0x00,0xf0,0x90,0x7f} },
+{ 16,0x44b3,0,{0xb5,0x74,0x01,0xf0,0x80,0x17,0x90,0x79,0x67,0xe0,0x90,0x7f,0x00,0xf0,0x90,0x7f} },
+{ 15,0x44c3,0,{0xb5,0x74,0x01,0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xd3,0x22} },
+{ 4,0x44d2,0,{0x8d,0x36,0x8b,0x37} },
+{ 16,0x44d6,0,{0x12,0x3f,0xa2,0xea,0x49,0x60,0x57,0x12,0x0c,0x44,0x7e,0x00,0x29,0xff,0xee,0x3a} },
+{ 16,0x44e6,0,{0xc9,0xef,0xc9,0x75,0x38,0xff,0xf5,0x39,0x89,0x3a,0xab,0x38,0xaa,0x39,0xa9,0x3a} },
+{ 16,0x44f6,0,{0x90,0x00,0x01,0x12,0x0c,0x5d,0xff,0x64,0x04,0x60,0x05,0xef,0x64,0x05,0x70,0x2e} },
+{ 16,0x4506,0,{0xef,0xb4,0x04,0x15,0x90,0x00,0x02,0x12,0x0c,0x5d,0x65,0x36,0x70,0x0b,0x90,0x00} },
+{ 16,0x4516,0,{0x03,0x12,0x0c,0x5d,0x65,0x37,0x70,0x01,0x22,0x12,0x0c,0x44,0x7e,0x00,0x29,0xff} },
+{ 16,0x4526,0,{0xee,0x3a,0xc9,0xef,0xc9,0x75,0x38,0xff,0xf5,0x39,0x89,0x3a,0x80,0xbc,0x7b,0x00} },
+{ 4,0x4536,0,{0x7a,0x00,0x79,0x00} },
+{ 1,0x453a,0,{0x22} },
+{ 16,0x453b,0,{0xe4,0xff,0x7b,0x01,0x90,0x78,0x1c,0x04,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74,0x4c} },
+{ 16,0x454b,0,{0xf0,0x90,0x78,0x1c,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x02,0x12} },
+{ 16,0x455b,0,{0x0c,0x5d,0xfe,0x90,0x7f,0xec,0xe0,0x6e,0x60,0x13,0xef,0xc3,0x94,0x04,0x50,0x0d} },
+{ 16,0x456b,0,{0x90,0x78,0x1d,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x0f,0x80,0xd4,0xbf,0x04,0x09} },
+{ 16,0x457b,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x14,0x90,0x79,0x21,0xe0,0xff,0x90,0x78} },
+{ 16,0x458b,0,{0x1c,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0xef,0x12,0x0c,0x8a,0x90,0x7f,0xc5} },
+{ 3,0x459b,0,{0x74,0x01,0xf0} },
+{ 1,0x459e,0,{0x22} },
+{ 14,0x459f,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xc0,0xd0,0xee,0xc0,0xe0,0xef,0xc0,0xe0} },
+{ 16,0x45ad,0,{0x90,0x79,0x85,0xe0,0x64,0x01,0x60,0x05,0xa3,0xe0,0xb4,0x01,0x2d,0x90,0x79,0x87} },
+{ 16,0x45bd,0,{0x74,0x01,0xf0,0xe4,0xff,0x90,0x7f,0xc5,0xe0,0xfe,0xef,0xc3,0x9e,0x50,0x1b,0x74} },
+{ 16,0x45cd,0,{0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xfe,0x74,0x21,0x2f,0xf5,0x82} },
+{ 16,0x45dd,0,{0xe4,0x34,0x79,0xf5,0x83,0xee,0xf0,0x0f,0x80,0xdb,0x53,0x91,0xef,0x90,0x7f,0xaa} },
+{ 4,0x45ed,0,{0xe0,0x44,0x01,0xf0} },
+{ 15,0x45f1,0,{0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,0xd0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4600,0,{0xe4,0xff,0x7b,0x01,0x90,0x78,0x19,0x04,0xf0,0xa3,0x74,0x78,0xf0,0xa3,0x74,0x4c} },
+{ 16,0x4610,0,{0xf0,0x90,0x78,0x19,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,0xf9,0x90,0x00,0x02,0x12} },
+{ 16,0x4620,0,{0x0c,0x5d,0xfe,0x90,0x7f,0xec,0xe0,0x6e,0x60,0x13,0xef,0xc3,0x94,0x04,0x50,0x0d} },
+{ 16,0x4630,0,{0x90,0x78,0x1a,0xe4,0x75,0xf0,0x03,0x12,0x0c,0xf4,0x0f,0x80,0xd4,0xbf,0x04,0x08} },
+{ 16,0x4640,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x78,0x19,0xe0,0xfb,0xa3,0xe0,0xfa} },
+{ 16,0x4650,0,{0xa3,0xe0,0xf9,0x12,0x0c,0x44,0x90,0x7f,0x00,0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0} },
+{ 1,0x4660,0,{0x22} },
+{ 16,0x4661,0,{0x01,0x18,0x02,0x01,0x19,0x0a,0x01,0x1c,0x00,0xc1,0x28,0xc1,0x29,0x01,0x1f,0x01} },
+{ 15,0x4671,0,{0x44,0x79,0x9f,0x00,0x00,0x00,0x00,0x41,0x79,0xa3,0x00,0x41,0x79,0xa4,0x00} },
+{ 4,0x4680,0,{0x41,0x79,0x89,0x00} },
+{ 16,0x4684,0,{0x01,0x22,0x01,0x41,0x79,0x31,0xff,0x41,0x79,0x34,0x00,0x4d,0x79,0x35,0x3f,0x3f} },
+{ 16,0x4694,0,{0x00,0x08,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x4d,0x79,0x42,0x3f,0x3f} },
+{ 16,0x46a4,0,{0x06,0x08,0x04,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x4d,0x79,0x4f,0x0a,0x0a} },
+{ 11,0x46b4,0,{0x09,0x00,0x01,0x09,0x02,0x03,0x04,0x05,0x06,0x07,0x08} },
+{ 1,0x46bf,0,{0x00} },
+{ 16,0x46c0,0,{0x12,0x0a,0xcd,0x90,0x7f,0xa5,0xe0,0xf5,0x21,0xe5,0x21,0x54,0x01,0xf5,0x21,0x64} },
+{ 16,0x46d0,0,{0x01,0x60,0x28,0xe5,0x22,0x64,0x01,0x70,0x22,0x90,0x7f,0xa5,0xe0,0xf5,0x21,0x54} },
+{ 16,0x46e0,0,{0x02,0xf5,0x21,0x70,0x03,0x75,0x22,0x01,0x90,0x7f,0xa5,0xe0,0xf5,0x21,0x54,0x04} },
+{ 12,0x46f0,0,{0xff,0xf5,0x21,0xbf,0x04,0xd3,0x75,0x22,0x01,0x80,0xce,0x22} },
+{ 4,0x46fc,0,{0x53,0xd8,0xf7,0x32} },
+{ 16,0x4700,0,{0x02,0x49,0xfa,0x00,0x02,0x3c,0x54,0x00,0x02,0x17,0xe4,0x00,0x02,0x4a,0x12,0x00} },
+{ 16,0x4710,0,{0x02,0x37,0xa2,0x00,0x02,0x47,0xff,0x00,0x02,0x4a,0x41,0x00,0x02,0x45,0x9f,0x00} },
+{ 16,0x4720,0,{0x02,0x49,0x8e,0x00,0x02,0x49,0xab,0x00,0x02,0x4a,0x58,0x00,0x02,0x4a,0x6f,0x00} },
+{ 16,0x4730,0,{0x02,0x4a,0x86,0x00,0x02,0x4a,0x9d,0x00,0x02,0x4a,0xb4,0x00,0x02,0x4a,0xcb,0x00} },
+{ 16,0x4740,0,{0x02,0x4a,0xe2,0x00,0x02,0x4a,0xf9,0x00,0x02,0x4b,0x10,0x00,0x02,0x4b,0x27,0x00} },
+{ 8,0x4750,0,{0x02,0x4b,0x3e,0x00,0x02,0x4b,0x55,0x00} },
+{ 16,0x4758,0,{0xe5,0x18,0x70,0x14,0x90,0x79,0x8c,0xe0,0x04,0xf0,0x90,0x79,0x8b,0xe0,0xc3,0x94} },
+{ 16,0x4768,0,{0x00,0x40,0x15,0xe0,0x14,0xf0,0x80,0x10,0x90,0x79,0x8b,0xe0,0x04,0xf0,0xa3,0xe0} },
+{ 16,0x4778,0,{0xc3,0x94,0x00,0x40,0x03,0xe0,0x14,0xf0,0x90,0x79,0x8b,0xe0,0xd3,0x94,0x14,0x40} },
+{ 16,0x4788,0,{0x04,0xe4,0xf5,0x18,0xf0,0x90,0x79,0x8c,0xe0,0xd3,0x94,0x14,0x40,0x05,0x75,0x18} },
+{ 4,0x4798,0,{0x01,0xe4,0xf0,0x22} },
+{ 16,0x479c,0,{0x90,0x7f,0xd7,0xe0,0xf5,0x33,0x90,0x7f,0xec,0xe0,0xf5,0x09,0x14,0x60,0x11,0x14} },
+{ 16,0x47ac,0,{0x60,0x1b,0x24,0x02,0x70,0x24,0x90,0x7f,0xea,0xe0,0x90,0x79,0x62,0xf0,0x80,0x21} },
+{ 16,0x47bc,0,{0x90,0x7f,0xea,0xe0,0x90,0x79,0x63,0xf0,0x12,0x10,0x00,0x80,0x14,0x90,0x7f,0xea} },
+{ 16,0x47cc,0,{0xe0,0x90,0x79,0x64,0xf0,0x12,0x28,0x01,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01} },
+{ 2,0x47dc,0,{0xf0,0xd3} },
+{ 1,0x47de,0,{0x22} },
+{ 16,0x47df,0,{0x90,0x79,0x78,0x74,0x04,0xf0,0x90,0x79,0x33,0xe0,0x90,0x79,0x79,0xf0,0xa2,0xaf} },
+{ 16,0x47ef,0,{0xe4,0x33,0xf5,0x12,0xc2,0xaf,0x12,0x0b,0xa2,0xe5,0x12,0x60,0x02,0xd2,0xaf,0x22} },
+{ 1,0x47ff,0,{0x32} },
+{ 2,0x4800,0,{0x8f,0x36} },
+{ 16,0x4802,0,{0xe4,0xf5,0x37,0x75,0x38,0xff,0x75,0x39,0x07,0x75,0x3a,0x01,0xab,0x38,0xaa,0x39} },
+{ 16,0x4812,0,{0xa9,0x3a,0x90,0x00,0x01,0x12,0x0c,0x5d,0xb4,0x03,0x1f,0xaf,0x37,0x05,0x37,0xef} },
+{ 16,0x4822,0,{0x65,0x36,0x70,0x01,0x22,0x12,0x0c,0x44,0x7e,0x00,0x29,0xff,0xee,0x3a,0xc9,0xef} },
+{ 16,0x4832,0,{0xc9,0x75,0x38,0xff,0xf5,0x39,0x89,0x3a,0x80,0xd2,0x7b,0x00,0x7a,0x00,0x79,0x00} },
+{ 1,0x4842,0,{0x22} },
+{ 16,0x4843,0,{0x30,0x26,0x2f,0xc2,0x26,0x90,0x79,0x2d,0xe0,0xff,0xb4,0x01,0x09,0xe4,0xf5,0x0c} },
+{ 16,0x4853,0,{0x75,0x0d,0xf8,0x75,0x0e,0x0a,0xef,0xb4,0x02,0x09,0xe4,0xf5,0x0c,0x75,0x0d,0xf0} },
+{ 16,0x4863,0,{0x75,0x0e,0x0b,0xef,0xb4,0x03,0x09,0xe4,0xf5,0x0c,0x75,0x0d,0xf8,0x75,0x0e,0x17} },
+{ 3,0x4873,0,{0xd2,0x22,0x22} },
+{ 16,0x4876,0,{0x30,0x25,0x2f,0xc2,0x25,0x90,0x79,0x2d,0xe0,0xff,0xb4,0x01,0x09,0x75,0x0c,0xc0} },
+{ 16,0x4886,0,{0x75,0x0d,0x14,0x75,0x0e,0x0b,0xef,0xb4,0x02,0x09,0xe4,0xf5,0x0c,0x75,0x0d,0x10} },
+{ 16,0x4896,0,{0x75,0x0e,0x0c,0xef,0xb4,0x03,0x09,0xe4,0xf5,0x0c,0x75,0x0d,0x18,0x75,0x0e,0x18} },
+{ 3,0x48a6,0,{0xd2,0x22,0x22} },
+{ 16,0x48a9,0,{0xe4,0xf5,0x32,0x12,0x0f,0x50,0x20,0x2e,0x10,0xe5,0x32,0xc3,0x94,0x02,0x50,0x09} },
+{ 16,0x48b9,0,{0x05,0x32,0xd2,0x30,0x12,0x49,0x05,0x80,0xed,0x30,0x2e,0x05,0x12,0x14,0x57,0xc2} },
+{ 15,0x48c9,0,{0x2e,0x30,0x2d,0x06,0x12,0x07,0x9a,0x12,0x48,0xd9,0x12,0x40,0x00,0x80,0xea} },
+{ 1,0x48d8,0,{0x22} },
+{ 16,0x48d9,0,{0x90,0x7f,0xd6,0xe0,0xf5,0x1d,0x54,0x80,0xf5,0x1d,0x64,0x80,0x70,0x1d,0xc2,0xaf} },
+{ 16,0x48e9,0,{0xe0,0x44,0x80,0xf0,0xe0,0x44,0x01,0xf0,0x7f,0x0c,0x7e,0x00,0x12,0x4b,0x6c,0x90} },
+{ 12,0x48f9,0,{0x7f,0xd6,0xe0,0x54,0xfe,0xf0,0x53,0x87,0xfe,0xd2,0xaf,0x22} },
+{ 16,0x4905,0,{0x90,0x7f,0xd6,0xe0,0x54,0xfb,0xf0,0xe0,0x44,0x08,0xf0,0x30,0x30,0x04,0xe0,0x44} },
+{ 16,0x4915,0,{0x02,0xf0,0x7f,0xdc,0x7e,0x05,0x12,0x4b,0x6c,0x90,0x7f,0xd6,0xe0,0x54,0xf7,0xf0} },
+{ 5,0x4925,0,{0xe0,0x44,0x04,0xf0,0x22} },
+{ 16,0x492a,0,{0x90,0x7f,0xeb,0xe0,0x14,0x70,0x14,0x90,0x7f,0xe9,0xe0,0x24,0x7f,0x70,0x04,0x12} },
+{ 16,0x493a,0,{0x46,0x00,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44} },
+{ 3,0x494a,0,{0x01,0xf0,0x22} },
+{ 16,0x494d,0,{0x90,0x7f,0xeb,0xe0,0x14,0x70,0x13,0x90,0x7f,0xe9,0xe0,0x14,0x70,0x04,0x12,0x45} },
+{ 16,0x495d,0,{0x3b,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01} },
+{ 2,0x496d,0,{0xf0,0x22} },
+{ 16,0x496f,0,{0xe4,0xff,0x74,0xe8,0x2f,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xe0,0xfe,0x74,0x96} },
+{ 14,0x497f,0,{0x2f,0xf5,0x82,0xe4,0x34,0x79,0xf5,0x83,0xee,0xf0,0x0f,0xbf,0x08,0xe4} },
+{ 1,0x498d,0,{0x22} },
+{ 16,0x498e,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x02,0xf0} },
+{ 13,0x499e,0,{0x90,0x7f,0xb7,0x74,0x03,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x49ab,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x02,0xf0} },
+{ 13,0x49bb,0,{0x90,0x7f,0xc7,0x74,0x03,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x49c8,0,{0x90,0x7f,0xd6,0xe0,0x30,0xe7,0x12,0xe0,0x44,0x01,0xf0,0x7f,0x14,0x7e,0x00,0x12} },
+{ 10,0x49d8,0,{0x4b,0x6c,0x90,0x7f,0xd6,0xe0,0x54,0xfe,0xf0,0x22} },
+{ 16,0x49e2,0,{0xe4,0xf5,0x1a,0x75,0x1b,0x01,0x90,0x79,0x91,0x04,0xf0,0xa3,0xf0,0xe4,0xa3,0xf0} },
+{ 8,0x49f2,0,{0xa3,0x74,0x0a,0xf0,0xe4,0xa3,0xf0,0x22} },
+{ 16,0x49fa,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xd2,0x2e,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x01} },
+{ 8,0x4a0a,0,{0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4a12,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xd2,0x2d,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x08} },
+{ 8,0x4a22,0,{0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4a2a,0,{0x90,0x7f,0xea,0xe0,0xf5,0x08,0xe4,0x90,0x79,0x62,0xf0,0xa3,0xf0,0xa3,0xf0,0x90} },
+{ 7,0x4a3a,0,{0x79,0x66,0xf0,0xa3,0xf0,0xd3,0x22} },
+{ 16,0x4a41,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x01,0xf0} },
+{ 7,0x4a51,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4a58,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x04,0xf0} },
+{ 7,0x4a68,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4a6f,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x04,0xf0} },
+{ 7,0x4a7f,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4a86,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x08,0xf0} },
+{ 7,0x4a96,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4a9d,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x08,0xf0} },
+{ 7,0x4aad,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4ab4,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x10,0xf0} },
+{ 7,0x4ac4,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4acb,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x10,0xf0} },
+{ 7,0x4adb,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4ae2,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x20,0xf0} },
+{ 7,0x4af2,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4af9,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x20,0xf0} },
+{ 7,0x4b09,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4b10,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x40,0xf0} },
+{ 7,0x4b20,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4b27,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x40,0xf0} },
+{ 7,0x4b37,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4b3e,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x80,0xf0} },
+{ 7,0x4b4e,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4b55,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x80,0xf0} },
+{ 7,0x4b65,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x4b6c,0,{0x8e,0x33,0x8f,0x34,0xe5,0x34,0x15,0x34,0xae,0x33,0x70,0x02,0x15,0x33,0x4e,0x60} },
+{ 7,0x4b7c,0,{0x05,0x12,0x07,0x89,0x80,0xee,0x22} },
+{ 15,0x4b83,0,{0x90,0x7f,0xea,0xe0,0xb4,0xff,0x04,0x12,0x30,0x00,0x22,0x12,0x36,0x0e,0x22} },
+{ 14,0x4b92,0,{0xc0,0xe0,0xc2,0x8b,0xd2,0x24,0x30,0x23,0x02,0xc2,0x23,0xd0,0xe0,0x32} },
+{ 14,0x4ba0,0,{0x90,0x7f,0x00,0xe5,0x08,0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0xd3,0x22} },
+{ 9,0x4bae,0,{0x30,0x24,0x05,0xc2,0x24,0x75,0x18,0x01,0x22} },
+{ 9,0x4bb7,0,{0x30,0x23,0x05,0xc2,0x23,0xe4,0xf5,0x18,0x22} },
+{ 7,0x4bc0,0,{0x53,0xc0,0xfe,0x53,0xc0,0xfd,0x32} },
+{ 6,0x4bc7,0,{0x53,0x91,0x7f,0xd2,0x25,0x32} },
+{ 5,0x4bcd,0,{0xc2,0x89,0xd2,0x23,0x32} },
+{ 3,0x4bd2,0,{0xc2,0x8d,0x32} },
+{ 3,0x4bd5,0,{0xc2,0x8f,0x32} },
+{ 2,0x4bd8,0,{0xd3,0x22} },
+{ 2,0x4bda,0,{0xd3,0x22} },
+{ 2,0x4bdc,0,{0xd3,0x22} },
+{ 2,0x4bde,0,{0xd3,0x22} },
+{ 2,0x4be0,0,{0xd3,0x22} },
+{ 2,0x4be2,0,{0xd3,0x22} },
+{ 2,0x4be4,0,{0xc3,0x22} },
+{ 1,0x4be6,0,{0x22} },
+{ 0,0x0000,1,{0 }}
+};
+/*
+VERSION=1.0.2.916
+DATE=12.02.2002
+*/
+/*
+ * This firmware is for the Emagic EMI 2|6 Audio Interface
+ *
+ * The firmware contained herein is Copyright (c) 1999-2002 Emagic
+ * as an unpublished work. This notice does not imply unrestricted
+ * or public access to this firmware which is a trade secret of Emagic,
+ * and which may not be reproduced, used, sold or transferred to
+ * any third party without Emagic's written consent. All Rights Reserved.
+ *
+ * This firmware may not be modified and may only be used with the
+ * Emagic EMI 2|6 Audio Interface. Distribution and/or Modification of
+ * any driver which includes this firmware, in whole or in part,
+ * requires the inclusion of this statement.
+ */
+static INTEL_HEX_RECORD g_Loader[] = {
+{ 3,0x0000,0,{0x02,0x03,0x1c} },
+{ 3,0x0043,0,{0x02,0x04,0x00} },
+{ 16,0x0100,0,{0x90,0x7f,0xe9,0xe0,0x24,0x5b,0x60,0x60,0x24,0x02,0x60,0x03,0x02,0x01,0xbe,0x90} },
+{ 16,0x0110,0,{0x7f,0xea,0xe0,0x75,0x0a,0x00,0xf5,0x0b,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x0a,0x90} },
+{ 16,0x0120,0,{0x7f,0xee,0xe0,0x75,0x15,0x00,0xf5,0x16,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x15,0xe5} },
+{ 16,0x0130,0,{0x16,0x45,0x15,0x70,0x03,0x02,0x01,0xbe,0xe4,0x90,0x7f,0xc5,0xf0,0x90,0x7f,0xb4} },
+{ 16,0x0140,0,{0xe0,0x20,0xe3,0xf9,0x90,0x7f,0xc5,0xe0,0xf5,0x0c,0x12,0x02,0x77,0xaf,0x0c,0x7e} },
+{ 16,0x0150,0,{0x00,0xef,0x25,0x0b,0xf5,0x0b,0xee,0x35,0x0a,0xf5,0x0a,0xc3,0xe5,0x16,0x9f,0xf5} },
+{ 16,0x0160,0,{0x16,0xe5,0x15,0x9e,0xf5,0x15,0x80,0xc7,0x90,0x7f,0xea,0xe0,0x75,0x0a,0x00,0xf5} },
+{ 16,0x0170,0,{0x0b,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x0a,0x90,0x7f,0xee,0xe0,0x75,0x15,0x00,0xf5} },
+{ 16,0x0180,0,{0x16,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x15,0xe5,0x16,0x45,0x15,0x60,0x30,0xe4,0x90} },
+{ 16,0x0190,0,{0x7f,0xc5,0xf0,0x90,0x7f,0xb4,0xe0,0x20,0xe3,0xf9,0x90,0x7f,0xc5,0xe0,0xf5,0x0c} },
+{ 16,0x01a0,0,{0x12,0x02,0x8f,0xaf,0x0c,0x7e,0x00,0xef,0x25,0x0b,0xf5,0x0b,0xee,0x35,0x0a,0xf5} },
+{ 15,0x01b0,0,{0x0a,0xc3,0xe5,0x16,0x9f,0xf5,0x16,0xe5,0x15,0x9e,0xf5,0x15,0x80,0xca,0xc3} },
+{ 1,0x01bf,0,{0x22} },
+{ 16,0x01c0,0,{0xc2,0x20,0xd2,0xe8,0x43,0xd8,0x20,0x90,0x7f,0xab,0x74,0xff,0xf0,0x90,0x7f,0xa9} },
+{ 16,0x01d0,0,{0xf0,0x90,0x7f,0xaa,0xf0,0x53,0x91,0xef,0x90,0x7f,0x95,0xe0,0x44,0xc0,0xf0,0x90} },
+{ 16,0x01e0,0,{0x7f,0x98,0xe0,0x44,0xc0,0xf0,0x90,0x7f,0x9e,0xe0,0x44,0xc0,0xf0,0xe4,0x90,0x7f} },
+{ 16,0x01f0,0,{0x94,0xf0,0x90,0x7f,0x9d,0xe0,0x44,0x0f,0xf0,0x90,0x7f,0x97,0xe0,0x54,0xf0,0xf0} },
+{ 16,0x0200,0,{0x90,0x7f,0xaf,0xe0,0x44,0x01,0xf0,0x90,0x7f,0xae,0xe0,0x44,0x0d,0xf0,0xd2,0xaf} },
+{ 16,0x0210,0,{0x90,0x7f,0x97,0xe0,0x54,0xf0,0xf0,0x20,0x20,0x42,0x75,0x14,0x00,0x75,0x13,0x00} },
+{ 16,0x0220,0,{0x75,0x12,0x00,0x75,0x11,0x00,0x7f,0x48,0x7e,0x92,0x7d,0x00,0x7c,0x00,0xab,0x14} },
+{ 16,0x0230,0,{0xaa,0x13,0xa9,0x12,0xa8,0x11,0xc3,0x12,0x04,0x9a,0x50,0xdb,0x20,0x20,0xd8,0x7a} },
+{ 16,0x0240,0,{0x00,0x79,0x00,0x78,0x00,0xe5,0x14,0x24,0x01,0xf5,0x14,0xea,0x35,0x13,0xf5,0x13} },
+{ 16,0x0250,0,{0xe9,0x35,0x12,0xf5,0x12,0xe8,0x35,0x11,0xf5,0x11,0x80,0xca,0x30,0x20,0xfd,0x12} },
+{ 16,0x0260,0,{0x01,0x00,0x50,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x90,0x7f,0xb4,0xe0,0x44} },
+{ 6,0x0270,0,{0x02,0xf0,0xc2,0x20,0x80,0xe6} },
+{ 1,0x0276,0,{0x22} },
+{ 16,0x0277,0,{0xe5,0x0c,0xff,0xe5,0x0b,0xf5,0x82,0xe5,0x0a,0xf5,0x83,0x75,0x92,0x7e,0x74,0xc0} },
+{ 8,0x0287,0,{0xf8,0xe2,0x08,0xf0,0xa3,0xdf,0xfa,0x22} },
+{ 16,0x028f,0,{0x90,0x7f,0x96,0x85,0x83,0x92,0xa8,0x82,0x79,0x02,0x90,0x00,0x00,0xe0,0xb4,0x00} },
+{ 16,0x029f,0,{0x37,0x74,0x01,0xf0,0x90,0x7f,0x93,0xe0,0x54,0xfc,0xf0,0x90,0x7f,0x96,0xe0,0x54} },
+{ 16,0x02af,0,{0xfc,0xf0,0x90,0x7f,0x9c,0xe0,0x44,0x03,0xf0,0x90,0x7f,0x94,0xe0,0x54,0x7f,0xf0} },
+{ 16,0x02bf,0,{0x90,0x7f,0x97,0xe0,0x44,0x80,0xf0,0x90,0x7f,0x9d,0xe0,0x44,0x80,0xf0,0x90,0x7f} },
+{ 16,0x02cf,0,{0x97,0xe0,0x54,0x7f,0xf0,0x44,0x80,0xf0,0xe5,0x0c,0xff,0x90,0x7e,0xc0,0xe0,0xf5} },
+{ 16,0x02df,0,{0x28,0xe4,0xa2,0x47,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x46,0x33,0xf2,0x69,0xf2,0xe4} },
+{ 16,0x02ef,0,{0xa2,0x45,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x44,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x43} },
+{ 16,0x02ff,0,{0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x42,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x41,0x33,0xf2} },
+{ 13,0x030f,0,{0x69,0xf2,0xe4,0xa2,0x40,0x33,0xf2,0x69,0xf2,0xa3,0xdf,0xc2,0x22} },
+{ 12,0x031c,0,{0x78,0x7f,0xe4,0xf6,0xd8,0xfd,0x75,0x81,0x29,0x02,0x03,0x63} },
+{ 16,0x0328,0,{0x02,0x01,0xc0,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0x40,0x03,0xf6,0x80,0x01,0xf2} },
+{ 16,0x0338,0,{0x08,0xdf,0xf4,0x80,0x29,0xe4,0x93,0xa3,0xf8,0x54,0x07,0x24,0x0c,0xc8,0xc3,0x33} },
+{ 16,0x0348,0,{0xc4,0x54,0x0f,0x44,0x20,0xc8,0x83,0x40,0x04,0xf4,0x56,0x80,0x01,0x46,0xf6,0xdf} },
+{ 16,0x0358,0,{0xe4,0x80,0x0b,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x90,0x04,0x84,0xe4,0x7e} },
+{ 16,0x0368,0,{0x01,0x93,0x60,0xbc,0xa3,0xff,0x54,0x3f,0x30,0xe5,0x09,0x54,0x1f,0xfe,0xe4,0x93} },
+{ 16,0x0378,0,{0xa3,0x60,0x01,0x0e,0xcf,0x54,0xc0,0x25,0xe0,0x60,0xa8,0x40,0xb8,0xe4,0x93,0xa3} },
+{ 16,0x0388,0,{0xfa,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca} },
+{ 16,0x0398,0,{0xf0,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca,0xdf,0xe9,0xde,0xe7,0x80,0xbe} },
+{ 16,0x03a8,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x90,0x7f,0xc4,0xe4,0xf0,0x53,0x91,0xef,0x90,0x7f} },
+{ 11,0x03b8,0,{0xab,0x74,0x04,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x03c3,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xd2,0x20,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x01} },
+{ 8,0x03d3,0,{0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x03db,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x02,0xf0,0xd0} },
+{ 6,0x03eb,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 1,0x03f1,0,{0x32} },
+{ 1,0x03f2,0,{0x32} },
+{ 1,0x03f3,0,{0x32} },
+{ 1,0x03f4,0,{0x32} },
+{ 1,0x03f5,0,{0x32} },
+{ 1,0x03f6,0,{0x32} },
+{ 1,0x03f7,0,{0x32} },
+{ 1,0x03f8,0,{0x32} },
+{ 1,0x03f9,0,{0x32} },
+{ 1,0x03fa,0,{0x32} },
+{ 1,0x03fb,0,{0x32} },
+{ 1,0x03fc,0,{0x32} },
+{ 1,0x03fd,0,{0x32} },
+{ 1,0x03fe,0,{0x32} },
+{ 1,0x03ff,0,{0x32} },
+{ 16,0x0400,0,{0x02,0x03,0xc3,0x00,0x02,0x03,0xdb,0x00,0x02,0x03,0xa8,0x00,0x02,0x04,0x6e,0x00} },
+{ 16,0x0410,0,{0x02,0x04,0x58,0x00,0x02,0x03,0xf1,0x00,0x02,0x03,0xf2,0x00,0x02,0x03,0xf3,0x00} },
+{ 16,0x0420,0,{0x02,0x03,0xf4,0x00,0x02,0x03,0xf5,0x00,0x02,0x03,0xf6,0x00,0x02,0x03,0xf7,0x00} },
+{ 16,0x0430,0,{0x02,0x03,0xf8,0x00,0x02,0x03,0xf9,0x00,0x02,0x03,0xfa,0x00,0x02,0x03,0xfb,0x00} },
+{ 16,0x0440,0,{0x02,0x03,0xfc,0x00,0x02,0x03,0xfd,0x00,0x02,0x03,0xfe,0x00,0x02,0x03,0xff,0x00} },
+{ 8,0x0450,0,{0x02,0x04,0xab,0x00,0x02,0x04,0xac,0x00} },
+{ 16,0x0458,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x10,0xf0,0xd0} },
+{ 6,0x0468,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x046e,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x08,0xf0,0xd0} },
+{ 6,0x047e,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32} },
+{ 16,0x0484,0,{0x02,0x0a,0x00,0x0f,0x01,0x0c,0x11,0x04,0x0d,0x00,0x00,0x00,0x00,0x41,0x00,0x00} },
+{ 1,0x0494,0,{0x00} },
+{ 4,0x0495,0,{0x02,0x17,0x00,0x00} },
+{ 1,0x0499,0,{0x00} },
+{ 16,0x049a,0,{0xeb,0x9f,0xf5,0xf0,0xea,0x9e,0x42,0xf0,0xe9,0x9d,0x42,0xf0,0xe8,0x9c,0x45,0xf0} },
+{ 1,0x04aa,0,{0x22} },
+{ 1,0x04ab,0,{0x32} },
+{ 1,0x04ac,0,{0x32} },
+{ 16,0x1100,0,{0x12,0x01,0x10,0x01,0x00,0x00,0x00,0x40,0x6a,0x08,0x01,0x01,0x00,0x01,0x01,0x02} },
+{ 16,0x1110,0,{0x00,0x01,0x09,0x02,0x20,0x00,0x01,0x01,0x03,0xa0,0x00,0x09,0x04,0x00,0x00,0x02} },
+{ 16,0x1120,0,{0xff,0x00,0x00,0x04,0x07,0x05,0x82,0x02,0x40,0x00,0x00,0x07,0x05,0x02,0x02,0x40} },
+{ 16,0x1130,0,{0x00,0x00,0x04,0x03,0x09,0x04,0x26,0x03,0x41,0x00,0x6e,0x00,0x63,0x00,0x68,0x00} },
+{ 16,0x1140,0,{0x6f,0x00,0x72,0x00,0x20,0x00,0x43,0x00,0x68,0x00,0x69,0x00,0x70,0x00,0x73,0x00} },
+{ 16,0x1150,0,{0x2c,0x00,0x20,0x00,0x49,0x00,0x6e,0x00,0x63,0x00,0x2e,0x00,0x28,0x03,0x46,0x00} },
+{ 16,0x1160,0,{0x69,0x00,0x72,0x00,0x6d,0x00,0x77,0x00,0x61,0x00,0x72,0x00,0x65,0x00,0x20,0x00} },
+{ 16,0x1170,0,{0x46,0x00,0x72,0x00,0x61,0x00,0x6d,0x00,0x65,0x00,0x57,0x00,0x6f,0x00,0x72,0x00} },
+{ 16,0x1180,0,{0x6b,0x00,0x73,0x00,0x2a,0x03,0x43,0x00,0x6f,0x00,0x6e,0x00,0x66,0x00,0x69,0x00} },
+{ 16,0x1190,0,{0x67,0x00,0x75,0x00,0x72,0x00,0x61,0x00,0x74,0x00,0x69,0x00,0x6f,0x00,0x6e,0x00} },
+{ 16,0x11a0,0,{0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00,0x69,0x00,0x6e,0x00,0x67,0x00,0x22,0x03} },
+{ 16,0x11b0,0,{0x49,0x00,0x6e,0x00,0x74,0x00,0x65,0x00,0x72,0x00,0x66,0x00,0x61,0x00,0x63,0x00} },
+{ 16,0x11c0,0,{0x65,0x00,0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00,0x69,0x00,0x6e,0x00,0x67,0x00} },
+{ 2,0x11d0,0,{0x00,0x00} },
+{ 0,0x0000,1,{0 }}
+};
diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c
new file mode 100644
index 000000000000..189986af2ac7
--- /dev/null
+++ b/drivers/usb/misc/emi62.c
@@ -0,0 +1,298 @@
+/*
+ * Emagic EMI 2|6 usb audio interface firmware loader.
+ * Copyright (C) 2002
+ * Tapio Laxström (tapio.laxstrom@iptime.fi)
+ *
+ * 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, version 2.
+ *
+ * $Id: emi62.c,v 1.15 2002/04/23 06:13:59 tapio Exp $
+ */
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+
+#define MAX_INTEL_HEX_RECORD_LENGTH 16
+typedef struct _INTEL_HEX_RECORD
+{
+ __u32 length;
+ __u32 address;
+ __u32 type;
+ __u8 data[MAX_INTEL_HEX_RECORD_LENGTH];
+} INTEL_HEX_RECORD, *PINTEL_HEX_RECORD;
+
+/* include firmware (variables)*/
+
+/* FIXME: This is quick and dirty solution! */
+#define SPDIF /* if you want SPDIF comment next line */
+//#undef SPDIF /* if you want MIDI uncomment this line */
+
+#ifdef SPDIF
+# include "emi62_fw_s.h" /* spdif fw */
+#else
+# include "emi62_fw_m.h" /* midi fw */
+#endif
+
+#define EMI62_VENDOR_ID 0x086a /* Emagic Soft-und Hardware GmBH */
+#define EMI62_PRODUCT_ID 0x0110 /* EMI 6|2m without firmware */
+
+#define ANCHOR_LOAD_INTERNAL 0xA0 /* Vendor specific request code for Anchor Upload/Download (This one is implemented in the core) */
+#define ANCHOR_LOAD_EXTERNAL 0xA3 /* This command is not implemented in the core. Requires firmware */
+#define ANCHOR_LOAD_FPGA 0xA5 /* This command is not implemented in the core. Requires firmware. Emagic extension */
+#define MAX_INTERNAL_ADDRESS 0x1B3F /* This is the highest internal RAM address for the AN2131Q */
+#define CPUCS_REG 0x7F92 /* EZ-USB Control and Status Register. Bit 0 controls 8051 reset */
+#define INTERNAL_RAM(address) (address <= MAX_INTERNAL_ADDRESS)
+
+static int emi62_writememory( struct usb_device *dev, int address, unsigned char *data, int length, __u8 bRequest);
+static int emi62_set_reset(struct usb_device *dev, unsigned char reset_bit);
+static int emi62_load_firmware (struct usb_device *dev);
+static int emi62_probe(struct usb_interface *intf, const struct usb_device_id *id);
+static void emi62_disconnect(struct usb_interface *intf);
+static int __init emi62_init (void);
+static void __exit emi62_exit (void);
+
+
+/* thanks to drivers/usb/serial/keyspan_pda.c code */
+static int emi62_writememory (struct usb_device *dev, int address, unsigned char *data, int length, __u8 request)
+{
+ int result;
+ unsigned char *buffer = kmalloc (length, GFP_KERNEL);
+
+ if (!buffer) {
+ err("emi62: kmalloc(%d) failed.", length);
+ return -ENOMEM;
+ }
+ memcpy (buffer, data, length);
+ /* Note: usb_control_msg returns negative value on error or length of the
+ * data that was written! */
+ result = usb_control_msg (dev, usb_sndctrlpipe(dev, 0), request, 0x40, address, 0, buffer, length, 300);
+ kfree (buffer);
+ return result;
+}
+
+/* thanks to drivers/usb/serial/keyspan_pda.c code */
+static int emi62_set_reset (struct usb_device *dev, unsigned char reset_bit)
+{
+ int response;
+ info("%s - %d", __FUNCTION__, reset_bit);
+
+ response = emi62_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
+ if (response < 0) {
+ err("emi62: set_reset (%d) failed", reset_bit);
+ }
+ return response;
+}
+
+#define FW_LOAD_SIZE 1023
+
+static int emi62_load_firmware (struct usb_device *dev)
+{
+ int err;
+ int i;
+ int pos = 0; /* Position in hex record */
+ __u32 addr; /* Address to write */
+ __u8 *buf;
+
+ dev_dbg(&dev->dev, "load_firmware\n");
+ buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL);
+ if (!buf) {
+ err( "%s - error loading firmware: error = %d", __FUNCTION__, -ENOMEM);
+ err = -ENOMEM;
+ goto wraperr;
+ }
+
+ /* Assert reset (stop the CPU in the EMI) */
+ err = emi62_set_reset(dev,1);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+ /* 1. We need to put the loader for the FPGA into the EZ-USB */
+ for (i=0; g_emi62_loader[i].type == 0; i++) {
+ err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ }
+
+ /* De-assert reset (let the CPU run) */
+ err = emi62_set_reset(dev,0);
+
+ /* 2. We upload the FPGA firmware into the EMI
+ * Note: collect up to 1023 (yes!) bytes and send them with
+ * a single request. This is _much_ faster! */
+ do {
+ i = 0;
+ addr = g_emi62bs[pos].address;
+
+ /* intel hex records are terminated with type 0 element */
+ while ((g_emi62bs[pos].type == 0) && (i + g_emi62bs[pos].length < FW_LOAD_SIZE)) {
+ memcpy(buf + i, g_emi62bs[pos].data, g_emi62bs[pos].length);
+ i += g_emi62bs[pos].length;
+ pos++;
+ }
+ err = emi62_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ } while (i > 0);
+
+ /* Assert reset (stop the CPU in the EMI) */
+ err = emi62_set_reset(dev,1);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+ /* 3. We need to put the loader for the firmware into the EZ-USB (again...) */
+ for (i=0; g_emi62_loader[i].type == 0; i++) {
+ err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ }
+
+ /* De-assert reset (let the CPU run) */
+ err = emi62_set_reset(dev,0);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+ /* 4. We put the part of the firmware that lies in the external RAM into the EZ-USB */
+
+/* FIXME: quick and dirty ifdefs */
+#ifdef SPDIF
+ for (i=0; g_HexSpdifFw62[i].type == 0; i++) {
+ if (!INTERNAL_RAM(g_HexSpdifFw62[i].address)) {
+ err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_EXTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ }
+ }
+#else /* MIDI */
+ for (i=0; g_HexMidiFw62[i].type == 0; i++) {
+ if (!INTERNAL_RAM(g_HexMidiFw62[i].address)) {
+ err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_EXTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d\n", __FUNCTION__, err);
+ goto wraperr;
+ return err;
+ }
+ }
+ }
+#endif
+ /* Assert reset (stop the CPU in the EMI) */
+ err = emi62_set_reset(dev,1);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+/* FIXME: quick and dirty ifdefs */
+#ifdef SPDIF
+ for (i=0; g_HexSpdifFw62[i].type == 0; i++) {
+ if (INTERNAL_RAM(g_HexSpdifFw62[i].address)) {
+ err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_INTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+ }
+ }
+#else /* MIDI */
+ for (i=0; g_HexMidiFw62[i].type == 0; i++) {
+ if (INTERNAL_RAM(g_HexMidiFw62[i].address)) {
+ err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_INTERNAL);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d\n", __FUNCTION__, err);
+ goto wraperr;
+ }
+ }
+ }
+#endif
+
+ /* De-assert reset (let the CPU run) */
+ err = emi62_set_reset(dev,0);
+ if (err < 0) {
+ err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+ goto wraperr;
+ }
+
+ kfree(buf);
+
+ /* return 1 to fail the driver inialization
+ * and give real driver change to load */
+ return 1;
+
+wraperr:
+ kfree(buf);
+ dev_err(&dev->dev, "Error\n");
+ return err;
+}
+
+static __devinitdata struct usb_device_id id_table [] = {
+ { USB_DEVICE(EMI62_VENDOR_ID, EMI62_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static int emi62_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ dev_dbg(&intf->dev, "emi62_probe\n");
+
+ info("%s start", __FUNCTION__);
+
+ emi62_load_firmware(dev);
+
+ /* do not return the driver context, let real audio driver do that */
+ return -EIO;
+}
+
+static void emi62_disconnect(struct usb_interface *intf)
+{
+}
+
+static struct usb_driver emi62_driver = {
+ .owner = THIS_MODULE,
+ .name = "emi62 - firmware loader",
+ .probe = emi62_probe,
+ .disconnect = emi62_disconnect,
+ .id_table = id_table,
+};
+
+static int __init emi62_init (void)
+{
+ int retval;
+ retval = usb_register (&emi62_driver);
+ if (retval)
+ printk(KERN_ERR "adi-emi: registration failed\n");
+ return retval;
+}
+
+static void __exit emi62_exit (void)
+{
+ usb_deregister (&emi62_driver);
+}
+
+module_init(emi62_init);
+module_exit(emi62_exit);
+
+MODULE_AUTHOR("tapio laxström");
+MODULE_DESCRIPTION("Emagic EMI 6|2m firmware loader.");
+MODULE_LICENSE("GPL");
+
+/* vi:ai:syntax=c:sw=8:ts=8:tw=80
+ */
diff --git a/drivers/usb/misc/emi62_fw_m.h b/drivers/usb/misc/emi62_fw_m.h
new file mode 100644
index 000000000000..3567c9001085
--- /dev/null
+++ b/drivers/usb/misc/emi62_fw_m.h
@@ -0,0 +1,8853 @@
+/*
+ * This file is generated from three different files, provided by Emagic.
+ */
+/* generated Tue Jun 3 21:36:11 EEST 2003 */
+
+static INTEL_HEX_RECORD g_emi62bs[]={
+ 16, 0x8010, 0, {0xff,0xff,0xff,0xff,0xaa,0x99,0x55,0x66,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x07 },
+ 16, 0x8020, 0, {0x30,0x01,0x60,0x01,0x00,0x00,0x00,0x0d,0x30,0x01,0x20,0x01,0x00,0x80,0x3f,0x2d },
+ 16, 0x8030, 0, {0x30,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x09 },
+ 16, 0x8040, 0, {0x30,0x00,0x20,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x01 },
+ 16, 0x8050, 0, {0x30,0x00,0x40,0x00,0x50,0x00,0x58,0x1a,0x80,0x12,0x10,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8060, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8080, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x40,0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8090, 0, {0x00,0x12,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x80a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x80b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x48 },
+ 16, 0x80c0, 0, {0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x80d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x80e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x80f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8100, 0, {0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8110, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8130, 0, {0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8140, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8150, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8170, 0, {0x80,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8190, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x81a0, 0, {0x00,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x81b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x81c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x81d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x90,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x81e0, 0, {0x7f,0x10,0x00,0x34,0x00,0x0d,0x00,0x03,0x40,0x00,0xd0,0x00,0x34,0x00,0x05,0x00 },
+ 16, 0x81f0, 0, {0x07,0x40,0x01,0xd0,0x00,0x74,0x00,0x1d,0x00,0x07,0x40,0x01,0xd0,0x00,0x74,0x00 },
+ 16, 0x8200, 0, {0x1d,0x80,0x07,0xe0,0x01,0xb8,0x00,0x6e,0x00,0x1b,0x80,0x06,0xe0,0x01,0x38,0x37 },
+ 16, 0x8210, 0, {0xc4,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,0x80,0xfb,0x30,0x36,0xc8 },
+ 16, 0x8220, 0, {0x4e,0x09,0x03,0xfc,0x84,0xff,0x10,0x3b,0xc0,0x0e,0xc8,0x07,0x22,0x80,0xff,0x22 },
+ 16, 0x8230, 0, {0x33,0xc0,0x0f,0xc8,0x33,0x6e,0x00,0xfb,0x80,0x3f,0x20,0x0d,0xc2,0x53,0xd4,0x80 },
+ 16, 0x8240, 0, {0xcc,0x3a,0x3f,0x00,0x0c,0xf1,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8250, 0, {0x80,0x00,0xed,0x60,0xbf,0x60,0x23,0xf0,0x0d,0x82,0x12,0x3c,0x60,0x8f,0x70,0x23 },
+ 16, 0x8260, 0, {0xf0,0x08,0x88,0x02,0xa5,0x40,0xbf,0xd0,0x63,0xd6,0x0b,0x88,0x02,0x2e,0x0c,0xbb },
+ 16, 0x8270, 0, {0x80,0x2e,0x20,0x88,0x8d,0x02,0xe6,0x40,0x80,0x60,0x2e,0x30,0x0a,0xb1,0x12,0x20 },
+ 16, 0x8280, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x80,0xa3,0x40,0x2c,0xc4 },
+ 16, 0x8290, 0, {0x4a,0x00,0x12,0x8c,0x88,0xa3,0x22,0x20,0xc4,0x0a,0x90,0x42,0x04,0xa9,0xa3,0x00 },
+ 16, 0x82a0, 0, {0x24,0xc8,0x8b,0x80,0x02,0xcc,0x00,0xb3,0x00,0x2e,0x01,0x09,0x08,0x02,0x84,0x00 },
+ 16, 0x82b0, 0, {0x80,0x20,0x2c,0x10,0x0a,0x32,0x42,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x82c0, 0, {0xc0,0x15,0xac,0x04,0xb3,0x00,0x2a,0xc0,0x08,0x08,0xa2,0x8c,0x00,0x8b,0x00,0xa2 },
+ 16, 0x82d0, 0, {0xc1,0x10,0x98,0x42,0xa7,0x00,0xbb,0x01,0x66,0xc1,0x0b,0x80,0x02,0xac,0x04,0xbb },
+ 16, 0x82e0, 0, {0x00,0x2e,0x00,0x0b,0xb8,0x12,0xe4,0x02,0x89,0x08,0x0e,0x40,0x0a,0xb0,0x02,0x30 },
+ 16, 0x82f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xac,0x00,0xeb,0x00,0x3e,0xc0 },
+ 16, 0x8300, 0, {0x4a,0xb8,0x23,0xec,0x18,0xeb,0x00,0x32,0xc0,0x0e,0x2c,0x12,0x22,0x10,0xeb,0x00 },
+ 16, 0x8310, 0, {0x26,0xc0,0x4f,0x00,0x43,0xed,0x00,0xfb,0x00,0x2e,0x24,0x0d,0x80,0x13,0xe4,0x00 },
+ 16, 0x8320, 0, {0xc8,0xd0,0x7c,0x12,0x0e,0xb0,0x03,0x40,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8330, 0, {0xe1,0x00,0xbc,0x00,0xff,0x00,0x35,0xc0,0x4f,0xe0,0x03,0x7c,0x08,0xff,0x01,0x17 },
+ 16, 0x8340, 0, {0xc2,0x4d,0xc0,0x03,0xf4,0x08,0xf7,0x00,0x3b,0xc0,0x07,0xc0,0x03,0x7c,0x80,0xff },
+ 16, 0x8350, 0, {0x24,0x3f,0x40,0x0c,0xf0,0x01,0xf4,0x04,0xbc,0x08,0x3f,0x28,0x0f,0xf0,0x03,0x78 },
+ 16, 0x8360, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x08,0xfb,0x04,0x3a,0xc8 },
+ 16, 0x8370, 0, {0x0f,0x94,0x03,0xec,0x10,0xf3,0x00,0x34,0xc0,0x0e,0xb0,0x03,0x61,0x04,0xfb,0x00 },
+ 16, 0x8380, 0, {0x36,0xc0,0x0e,0xa3,0x03,0x2c,0x80,0xfb,0x72,0x3e,0x02,0x0f,0x8a,0x03,0xe4,0x02 },
+ 16, 0x8390, 0, {0xc9,0x80,0x2a,0x50,0x0f,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x83a0, 0, {0xca,0x44,0x3c,0x00,0xbf,0x00,0x03,0xc0,0x08,0x80,0x03,0x7c,0x00,0xbf,0x00,0x3f },
+ 16, 0x83b0, 0, {0xe2,0x08,0x90,0x43,0x60,0x00,0xbf,0x00,0x37,0xc0,0x08,0x90,0x01,0x6d,0x00,0xbb },
+ 16, 0x83c0, 0, {0x40,0x2c,0x10,0x0b,0xb0,0x42,0xd7,0xc0,0x89,0x00,0x2a,0x7c,0x0b,0xf0,0x02,0xf2 },
+ 16, 0x83d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0x05,0x4c,0x00,0xb3,0x00,0x20,0xd5 },
+ 16, 0x83e0, 0, {0x4a,0x00,0x00,0x0c,0x04,0x93,0x00,0x0c,0xf0,0x0b,0x09,0x02,0x08,0x01,0xb3,0x20 },
+ 16, 0x83f0, 0, {0x28,0xc0,0x0a,0x0c,0x0a,0x0e,0x00,0xb3,0x00,0x24,0x30,0x09,0x00,0x02,0xc6,0x10 },
+ 16, 0x8400, 0, {0x80,0x42,0x20,0x00,0x8b,0xb0,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8410, 0, {0x22,0x01,0x1e,0x00,0xb7,0x94,0x21,0xe4,0x48,0xd9,0x12,0x5e,0x40,0xb7,0x90,0x29 },
+ 16, 0x8420, 0, {0xe0,0x8b,0x69,0x12,0xd6,0x80,0x37,0x82,0x2c,0xe8,0x08,0x4a,0x02,0x5e,0x00,0xb7 },
+ 16, 0x8430, 0, {0xa4,0x2d,0x20,0x0b,0x79,0x02,0xd6,0x08,0x86,0x90,0x29,0xa0,0x0b,0x79,0x02,0xd8 },
+ 16, 0x8440, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x0c,0x00,0xfb,0xa0,0x28,0xe8 },
+ 16, 0x8450, 0, {0x0e,0x2a,0x02,0x8c,0x00,0xd3,0x00,0x64,0xc0,0x0f,0x00,0x43,0x0e,0xc4,0xf3,0x00 },
+ 16, 0x8460, 0, {0x78,0xec,0x0e,0x0a,0x43,0x0e,0x20,0x73,0xe0,0x3c,0x02,0x4f,0x00,0x03,0xc4,0x40 },
+ 16, 0x8470, 0, {0xc3,0x00,0x38,0xc0,0x0f,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8480, 0, {0x40,0x1d,0xbc,0x00,0xff,0x00,0xbc,0xcc,0x0e,0xb0,0x03,0xec,0x20,0xfb,0x00,0x3c },
+ 16, 0x8490, 0, {0xc2,0x0c,0x20,0x03,0x6c,0x50,0xf3,0x00,0x36,0xc4,0x0f,0x40,0x03,0xfc,0x08,0xff },
+ 16, 0x84a0, 0, {0x1a,0x3f,0x80,0x0f,0xf0,0x01,0xe4,0x30,0xff,0x02,0x3f,0xc0,0x0f,0xf0,0x63,0xd0 },
+ 16, 0x84b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xec,0x40,0xfb,0x00,0xb2,0xd8 },
+ 16, 0x84c0, 0, {0x0c,0xb0,0x01,0x2d,0x20,0xdb,0x01,0x3a,0xc8,0x8c,0x38,0x03,0xa8,0x00,0xfb,0x48 },
+ 16, 0x84d0, 0, {0x3e,0xc9,0x0f,0x80,0x03,0xec,0x40,0xfb,0x01,0x3e,0x00,0x0f,0x08,0x03,0xa4,0x08 },
+ 16, 0x84e0, 0, {0xfa,0x80,0xb2,0x80,0x0f,0xb1,0x02,0x6a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x84f0, 0, {0x48,0x19,0x1c,0x80,0xbf,0x30,0x21,0xca,0x08,0xf0,0x0a,0x0c,0x80,0x8f,0x50,0x21 },
+ 16, 0x8500, 0, {0xc2,0x08,0x70,0x50,0x9c,0x00,0xb7,0x00,0x39,0xc4,0x0b,0x40,0x02,0x9c,0x04,0xb7 },
+ 16, 0x8510, 0, {0x20,0x25,0x40,0x0b,0x70,0x02,0x14,0x80,0xb6,0x00,0x21,0x80,0x0b,0xf8,0x02,0x12 },
+ 16, 0x8520, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xb7,0xb0,0x21,0xec },
+ 16, 0x8530, 0, {0x0b,0x78,0x12,0xde,0x84,0x97,0x80,0x0d,0xe0,0x28,0xf8,0x02,0xde,0x00,0xb7,0x90 },
+ 16, 0x8540, 0, {0x2d,0xe4,0x0b,0x68,0x82,0x5e,0x80,0xb7,0xa0,0x29,0x20,0x0b,0x48,0x02,0x96,0x00 },
+ 16, 0x8550, 0, {0xb7,0x80,0x21,0xe1,0x0b,0x7a,0x02,0x70,0x40,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8560, 0, {0x48,0x04,0xcc,0x00,0xb3,0x00,0x20,0xc0,0x0b,0x38,0x02,0x8c,0x04,0x83,0x00,0x28 },
+ 16, 0x8570, 0, {0xc0,0x88,0x39,0x02,0x4c,0x40,0xb3,0x04,0x28,0xc0,0x1b,0x10,0x02,0x8c,0x01,0xb3 },
+ 16, 0x8580, 0, {0x04,0x24,0x88,0x4b,0x31,0x02,0x04,0x00,0xb3,0x80,0x20,0xf2,0x0b,0x30,0x02,0x02 },
+ 16, 0x8590, 0, {0x24,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0xa8,0x00,0xfa,0x00,0x32,0x80 },
+ 16, 0x85a0, 0, {0x0f,0xe8,0x03,0xe8,0x00,0xda,0x01,0x3a,0x80,0x8c,0xed,0x03,0xfb,0x04,0xfa,0x00 },
+ 16, 0x85b0, 0, {0x3e,0x80,0x0f,0x6c,0x03,0xfb,0xc8,0xbe,0xc2,0x1f,0x80,0x0f,0xe5,0x03,0xa8,0x00 },
+ 16, 0x85c0, 0, {0xfe,0x48,0x33,0x80,0x4f,0xa0,0x03,0x7a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x85d0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x00,0x3c,0x00,0x0c,0x81,0x93,0x60,0x00,0xf8,0x01,0x36 },
+ 16, 0x85e0, 0, {0x10,0x0f,0x80,0x03,0xa0,0x20,0xf8,0x00,0x2a,0x01,0x8f,0x84,0x13,0xe1,0x00,0xf8 },
+ 16, 0x85f0, 0, {0x18,0x36,0x00,0x0f,0x80,0x13,0xe0,0x00,0xf8,0x20,0x3e,0x14,0x0f,0x80,0x03,0xd2 },
+ 16, 0x8600, 0, {0x80,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xe4,0x00,0xf1,0x00,0xaa,0x40 },
+ 16, 0x8610, 0, {0x0c,0x90,0x03,0x24,0x00,0xe1,0x00,0x38,0x40,0x1c,0x90,0x03,0xe4,0x00,0xf9,0xa0 },
+ 16, 0x8620, 0, {0x3a,0x40,0x47,0x9a,0x93,0xa2,0x80,0xf8,0x10,0x3e,0x40,0x0b,0x94,0x03,0xe6,0x40 },
+ 16, 0x8630, 0, {0xf9,0xc0,0x3e,0x68,0x0b,0x10,0x03,0x02,0x84,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8640, 0, {0x80,0x04,0xe4,0x04,0xb9,0x00,0x22,0x40,0x08,0x90,0x02,0x24,0x04,0x89,0x00,0x36 },
+ 16, 0x8650, 0, {0x40,0x08,0x90,0x02,0xe4,0x04,0xb9,0x80,0x2e,0x40,0x4f,0x94,0x03,0x61,0x10,0xe8 },
+ 16, 0x8660, 0, {0x40,0x2e,0x40,0x0b,0x90,0x42,0xe6,0x04,0xb9,0x00,0x2e,0x40,0x0b,0x90,0x02,0x20 },
+ 16, 0x8670, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x04,0x24,0x00,0xb9,0x00,0x22,0x40 },
+ 16, 0x8680, 0, {0x0a,0x10,0x52,0x04,0x04,0xa9,0x04,0x2a,0x40,0x08,0xb0,0x02,0xe4,0x01,0xb9,0x00 },
+ 16, 0x8690, 0, {0x2e,0x40,0x0b,0x90,0x02,0xa8,0x0d,0xb8,0x40,0x2e,0x40,0x09,0x94,0x02,0xe5,0x00 },
+ 16, 0x86a0, 0, {0xb9,0x04,0x2e,0x40,0x0b,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x86b0, 0, {0x08,0x04,0x04,0x80,0xb1,0x20,0x20,0xc8,0x0a,0x10,0x42,0x04,0x90,0x81,0x20,0x04 },
+ 16, 0x86c0, 0, {0xc8,0x08,0x30,0x26,0xc4,0x00,0xb1,0x20,0x2c,0x48,0x0b,0x90,0x02,0x45,0x01,0xb1 },
+ 16, 0x86d0, 0, {0x40,0x2c,0x40,0x0b,0x12,0x82,0xc4,0x00,0xb1,0x2b,0x2c,0x4a,0x0b,0x12,0x82,0x02 },
+ 16, 0x86e0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x08,0x21,0x48,0xf8,0x50,0x32,0x00 },
+ 16, 0x86f0, 0, {0x4e,0x85,0x0b,0x21,0x40,0xa8,0x52,0x2a,0x00,0x08,0x80,0x23,0xe1,0x40,0xf8,0x00 },
+ 16, 0x8700, 0, {0x3a,0x14,0x0f,0xa0,0x43,0xa8,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x82,0x03,0xe0,0x00 },
+ 16, 0x8710, 0, {0xf0,0x20,0x3e,0x88,0x4f,0x82,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8720, 0, {0x98,0x19,0xe4,0x40,0xf9,0x11,0x34,0x44,0x2d,0xd0,0x03,0xe4,0x50,0x79,0x10,0x38 },
+ 16, 0x8730, 0, {0x44,0x2f,0xd0,0x03,0xf5,0x10,0xf9,0x10,0x3e,0x45,0x06,0x50,0x03,0xe5,0x00,0xe9 },
+ 16, 0x8740, 0, {0x40,0x3f,0x40,0x0f,0xd0,0x43,0xf5,0x00,0xfd,0x28,0x3f,0x40,0x0f,0x92,0x83,0xe6 },
+ 16, 0x8750, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x01,0xe6,0x00,0xd9,0x90,0x37,0x69 },
+ 16, 0x8760, 0, {0x4d,0x90,0x23,0x67,0x80,0xd9,0xe0,0x37,0x68,0x0e,0xd0,0x07,0xa4,0x00,0x05,0x86 },
+ 16, 0x8770, 0, {0x3e,0x66,0x0d,0x50,0x23,0x26,0x00,0xc9,0x82,0x3d,0x40,0x0d,0xd8,0x07,0x36,0x02 },
+ 16, 0x8780, 0, {0xcd,0xc0,0x33,0x60,0x0c,0x9c,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8790, 0, {0x38,0x10,0xe2,0x80,0x88,0xa2,0x22,0x10,0x28,0x8a,0x82,0x23,0x84,0x88,0xa0,0x22 },
+ 16, 0x87a0, 0, {0x14,0x48,0x80,0x42,0x82,0x00,0x88,0x40,0x2e,0x30,0x08,0x80,0x02,0xa2,0x00,0xd8 },
+ 16, 0x87b0, 0, {0x90,0x26,0x00,0x08,0x84,0x0a,0x21,0x00,0xc8,0xa0,0xa2,0x14,0x28,0x8c,0x02,0x0e },
+ 16, 0x87c0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x20,0x91,0x40,0x2c,0x44 },
+ 16, 0x87d0, 0, {0x18,0x10,0x02,0x85,0x04,0xb1,0x40,0x0c,0x40,0x0a,0x10,0x06,0x84,0x30,0x81,0x40 },
+ 16, 0x87e0, 0, {0x2c,0x48,0x59,0x10,0x1a,0x04,0x60,0x81,0x09,0x2e,0x40,0x1b,0x14,0x02,0x25,0x00 },
+ 16, 0x87f0, 0, {0x91,0xe0,0x20,0x60,0x08,0x16,0x02,0x00,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8800, 0, {0x18,0x15,0xa4,0x00,0x81,0x00,0x2a,0x41,0x08,0x90,0x02,0xa4,0x00,0xa1,0x00,0x2a },
+ 16, 0x8810, 0, {0x41,0x08,0xb0,0x82,0x24,0x11,0x8b,0x00,0x2e,0x40,0x18,0x91,0x02,0xa0,0x04,0x98 },
+ 16, 0x8820, 0, {0x20,0x2e,0x54,0x1b,0x90,0x82,0x2c,0x00,0x89,0x10,0x22,0x44,0x88,0x90,0x02,0x06 },
+ 16, 0x8830, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xd9,0x00,0x3e,0x40 },
+ 16, 0x8840, 0, {0x4c,0x90,0x03,0xa4,0x10,0xf9,0x00,0x3e,0x40,0x8e,0x10,0x02,0xa4,0xc2,0xc9,0x00 },
+ 16, 0x8850, 0, {0x3e,0x40,0x0d,0x16,0x13,0x01,0x84,0xc8,0x20,0x3c,0x60,0x0f,0x90,0x12,0x04,0x00 },
+ 16, 0x8860, 0, {0xd9,0x40,0x32,0x50,0x0c,0x90,0x03,0x28,0x84,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8870, 0, {0x28,0x01,0x84,0x00,0xf9,0x00,0x36,0x40,0x4f,0x99,0x4a,0x44,0x00,0x99,0x00,0xb4 },
+ 16, 0x8880, 0, {0x40,0x0f,0x90,0x13,0xe6,0x00,0xf9,0x00,0x3c,0x40,0x0f,0x90,0x03,0xe3,0x00,0xf8 },
+ 16, 0x8890, 0, {0x01,0x36,0x40,0x0c,0x99,0x03,0xe4,0x02,0xf9,0x80,0x3e,0x60,0x4f,0x90,0x0b,0xca },
+ 16, 0x88a0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xd8,0x00,0x3c,0x00 },
+ 16, 0x88b0, 0, {0x1d,0x80,0x03,0x20,0x00,0xe8,0x00,0x32,0x00,0x0c,0x84,0x83,0xe0,0x10,0xe8,0x20 },
+ 16, 0x88c0, 0, {0x32,0x00,0x8e,0x84,0x03,0x21,0x80,0xc8,0x00,0x3a,0x19,0x0f,0x04,0x03,0xe0,0x24 },
+ 16, 0x88d0, 0, {0xf0,0x02,0x3c,0x00,0x0f,0x80,0x13,0x8a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x88e0, 0, {0x28,0x05,0x28,0x02,0x8a,0x01,0x0f,0xa2,0x68,0xa0,0x00,0x28,0x00,0x8a,0x00,0x77 },
+ 16, 0x88f0, 0, {0x80,0x68,0xe0,0x12,0xe8,0x00,0xde,0x00,0x36,0x81,0x08,0xe0,0x03,0x7a,0x08,0xae },
+ 16, 0x8900, 0, {0xc4,0x2f,0x80,0x08,0xed,0x02,0xfa,0x00,0xbe,0xa0,0x3b,0x80,0x0b,0xa0,0x42,0x0a },
+ 16, 0x8910, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x85,0x4c,0x00,0x93,0x00,0x2c,0xc0 },
+ 16, 0x8920, 0, {0x88,0xb0,0x02,0x0c,0x14,0xa3,0x04,0x20,0xc4,0x18,0x38,0x02,0xec,0x10,0x93,0x54 },
+ 16, 0x8930, 0, {0x28,0xc0,0x0a,0x00,0x02,0x4e,0x00,0x83,0x49,0x68,0xc0,0x02,0x39,0x42,0xce,0x40 },
+ 16, 0x8940, 0, {0xb3,0x00,0x2c,0xe6,0x0b,0xb0,0x02,0x8b,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8950, 0, {0x20,0x01,0x1c,0x08,0x87,0x20,0x2c,0x80,0x18,0xf2,0x22,0x1c,0x00,0x87,0x10,0x21 },
+ 16, 0x8960, 0, {0xc0,0x08,0x70,0x82,0xdc,0x80,0x96,0x80,0x2d,0xc0,0x0a,0x40,0x02,0x7d,0x40,0x27 },
+ 16, 0x8970, 0, {0x64,0x6d,0xd0,0x48,0x60,0x42,0xd8,0x05,0xb6,0x04,0x29,0xc0,0x4b,0x72,0x02,0x28 },
+ 16, 0x8980, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x3e,0x88,0xd7,0xe0,0x3d,0xe0 },
+ 16, 0x8990, 0, {0x08,0x7c,0x42,0x3e,0x00,0xe3,0x82,0x20,0xe0,0x0c,0x68,0x03,0xdf,0x04,0xd7,0x80 },
+ 16, 0x89a0, 0, {0x3b,0xe0,0x4e,0x48,0x0a,0x5e,0x80,0xc7,0xc2,0x19,0xe0,0x0e,0x78,0x03,0xd6,0x08 },
+ 16, 0x89b0, 0, {0xf7,0x80,0x3d,0xe0,0x0f,0xf8,0x03,0xaa,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x89c0, 0, {0x08,0x1d,0xac,0x40,0xfb,0x40,0x7e,0x80,0x0e,0x36,0x83,0xed,0x40,0xdb,0x60,0x3e },
+ 16, 0x89d0, 0, {0x80,0x0f,0xa0,0x03,0xed,0x28,0xda,0x00,0x32,0xc4,0x0c,0xb0,0x0b,0xcc,0x00,0xfb },
+ 16, 0x89e0, 0, {0x00,0x3e,0xc0,0x0e,0x80,0x13,0xe0,0x10,0xf8,0x00,0x3e,0x00,0x0f,0xb1,0x53,0xc2 },
+ 16, 0x89f0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x00,0xff,0xc0,0x33,0xe0 },
+ 16, 0x8a00, 0, {0x0c,0xf9,0x03,0x7f,0x04,0xcf,0xd0,0x3f,0xe4,0x0f,0xb8,0x03,0xfe,0x00,0xff,0x94 },
+ 16, 0x8a10, 0, {0x3f,0xe0,0x0f,0xc8,0x03,0x7e,0x10,0xf3,0x80,0x3b,0xe0,0x0f,0xf8,0x03,0xfe,0x48 },
+ 16, 0x8a20, 0, {0xed,0x80,0x33,0x24,0x04,0xf8,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8a30, 0, {0xa8,0x11,0x9c,0x80,0xbf,0x04,0x21,0x28,0x08,0xf8,0x02,0x1e,0xc0,0xcf,0x90,0x21 },
+ 16, 0x8a40, 0, {0x4c,0x0b,0x5a,0x42,0xde,0x00,0xb7,0x80,0x2c,0xe8,0x0b,0x04,0x02,0x1c,0x00,0xb7 },
+ 16, 0x8a50, 0, {0xa0,0x35,0x10,0x8f,0x71,0x13,0xde,0xc0,0x84,0x10,0x21,0x80,0x0d,0x71,0x02,0x2a },
+ 16, 0x8a60, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x9c,0x08,0xb7,0x00,0x25,0xc8 },
+ 16, 0x8a70, 0, {0x08,0x71,0x02,0xcc,0x80,0x97,0x00,0x29,0xc0,0x8b,0x72,0x06,0xdc,0x08,0xb5,0x00 },
+ 16, 0x8a80, 0, {0x2d,0xc8,0x0b,0x40,0x02,0x1c,0x40,0xbf,0x10,0x21,0xc0,0x0b,0x74,0x02,0xd4,0x80 },
+ 16, 0x8a90, 0, {0xa7,0x40,0x21,0x41,0x08,0x70,0x02,0x04,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8aa0, 0, {0x60,0x14,0xcc,0x00,0xb3,0x00,0x24,0x00,0x08,0x34,0x82,0xac,0x11,0x83,0x00,0x20 },
+ 16, 0x8ab0, 0, {0x00,0x4b,0x18,0x26,0xcf,0x20,0xb1,0x06,0x2c,0xc1,0x0b,0x32,0x02,0x0e,0x08,0xb3 },
+ 16, 0x8ac0, 0, {0x88,0x24,0x32,0x0a,0x30,0x12,0x84,0x08,0x80,0x00,0xa0,0x34,0x28,0x30,0x02,0x18 },
+ 16, 0x8ad0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xbc,0x00,0xff,0x00,0xb6,0x40 },
+ 16, 0x8ae0, 0, {0x2c,0xf4,0x43,0xfc,0x01,0xdf,0x00,0x3a,0x00,0x03,0x92,0x03,0xff,0x88,0xf9,0x00 },
+ 16, 0x8af0, 0, {0x2f,0xc0,0x1b,0x0e,0x4b,0x2e,0x90,0xfb,0xe0,0x30,0x32,0x0b,0x98,0x02,0xec,0x08 },
+ 16, 0x8b00, 0, {0x6b,0xc0,0x32,0xc0,0x08,0xf0,0x09,0x3e,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8b10, 0, {0x80,0x00,0xec,0x00,0xf3,0x00,0x3a,0xc0,0x0f,0xb0,0x01,0x6c,0x00,0xfb,0x00,0x3a },
+ 16, 0x8b20, 0, {0x10,0x0f,0xb4,0x03,0xec,0x00,0xf0,0x00,0x3c,0xc0,0x0f,0x80,0x0b,0xad,0x20,0xfb },
+ 16, 0x8b30, 0, {0x40,0x3e,0x10,0x07,0xa8,0x63,0xe0,0x00,0xfb,0x80,0x3e,0xd8,0x0f,0xb0,0x03,0xe0 },
+ 16, 0x8b40, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xff,0x00,0x72,0x00 },
+ 16, 0x8b50, 0, {0x0f,0xf0,0x23,0xfc,0x00,0xdf,0x00,0x3f,0x40,0x0f,0xc0,0x03,0xdc,0x00,0x8f,0x00 },
+ 16, 0x8b60, 0, {0x33,0xc1,0x0c,0xc0,0x03,0xbe,0x00,0xff,0x90,0x3b,0x28,0x0e,0x59,0x03,0x2e,0x00 },
+ 16, 0x8b70, 0, {0x7b,0x00,0x32,0xc4,0x0f,0xb0,0x03,0xd0,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8b80, 0, {0xc1,0x04,0x6c,0x00,0xbb,0x00,0x62,0xa0,0x0f,0xb0,0x02,0xec,0x09,0x8b,0x00,0x2e },
+ 16, 0x8b90, 0, {0x30,0x0b,0xa8,0x03,0xac,0x00,0xfa,0xc1,0x22,0xc1,0x08,0x8c,0x02,0x2c,0x00,0xb3 },
+ 16, 0x8ba0, 0, {0x81,0x2a,0x00,0x0d,0x88,0xb2,0x22,0x00,0xb3,0xc0,0x22,0xc8,0x0b,0xb0,0x42,0x61 },
+ 16, 0x8bb0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x6c,0x00,0xbb,0x01,0x22,0x62 },
+ 16, 0x8bc0, 0, {0x0b,0xb0,0x02,0xec,0x04,0x8b,0x00,0x2e,0xa2,0x49,0x88,0x26,0xec,0x00,0xa8,0x80 },
+ 16, 0x8bd0, 0, {0x22,0xc0,0x28,0x82,0x0a,0xac,0xa0,0xbb,0x08,0x22,0xc0,0x08,0x80,0x0a,0x28,0x84 },
+ 16, 0x8be0, 0, {0xb9,0xc0,0xa2,0x00,0x0b,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8bf0, 0, {0x08,0x04,0x0c,0x00,0xb3,0x10,0x20,0x48,0x0a,0x32,0x02,0xcc,0x80,0x83,0x01,0x24 },
+ 16, 0x8c00, 0, {0x00,0x0b,0x02,0x06,0x8c,0x60,0xa0,0x20,0x20,0xc8,0x08,0x01,0x02,0x0c,0x00,0xb3 },
+ 16, 0x8c10, 0, {0x00,0x28,0x00,0x09,0x20,0x02,0x08,0x80,0xb1,0x00,0xa0,0x80,0x0b,0x30,0x02,0x42 },
+ 16, 0x8c20, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x6c,0x00,0xff,0x00,0xa2,0x0e },
+ 16, 0x8c30, 0, {0x0b,0xf1,0x03,0xfc,0x08,0xcf,0x20,0x3e,0xc0,0x0f,0x80,0x03,0xfc,0x84,0xa8,0x20 },
+ 16, 0x8c40, 0, {0xb2,0xc8,0x8c,0x80,0x03,0xac,0x44,0xfb,0x70,0x3a,0xc0,0x0e,0x90,0x03,0x2c,0xa4 },
+ 16, 0x8c50, 0, {0xfb,0x00,0xb2,0x40,0x0f,0xb0,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8c60, 0, {0xa0,0x1d,0xfc,0x00,0xff,0x26,0x3e,0x00,0x0f,0xb6,0x13,0xed,0x00,0xfb,0x10,0x3f },
+ 16, 0x8c70, 0, {0x00,0x0f,0xc1,0x13,0xac,0x80,0xf8,0x12,0x3e,0xc6,0x4f,0x42,0x43,0xfc,0x04,0xff },
+ 16, 0x8c80, 0, {0x31,0x3f,0x00,0x0f,0xf0,0x03,0xec,0x00,0xff,0x00,0xbf,0xc0,0x8f,0xf0,0x03,0xe8 },
+ 16, 0x8c90, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,0x40,0xfc,0x80,0x36,0xc8 },
+ 16, 0x8ca0, 0, {0x0f,0x09,0x03,0xc2,0x00,0xf8,0xc0,0x33,0xcc,0x2c,0x4c,0x03,0x63,0x90,0xe0,0x90 },
+ 16, 0x8cb0, 0, {0x3a,0xc0,0x0d,0x50,0x0b,0x3c,0x04,0xdf,0x64,0x3f,0xc8,0x8d,0xf1,0x43,0x2c,0x00 },
+ 16, 0x8cc0, 0, {0xd5,0x00,0x33,0xc0,0x45,0xf2,0x23,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8cd0, 0, {0x80,0x10,0xed,0x80,0xba,0x02,0x21,0xde,0x8b,0x82,0x22,0xe0,0x20,0xb0,0x00,0x2b },
+ 16, 0x8ce0, 0, {0xec,0x09,0x80,0x02,0xe3,0x40,0xba,0x20,0x2f,0xdc,0x08,0x98,0x12,0x2c,0x00,0x8b },
+ 16, 0x8cf0, 0, {0x51,0x2a,0xd0,0x08,0x72,0x22,0x2e,0x00,0x8d,0x80,0x21,0xd0,0x08,0xb6,0x82,0x20 },
+ 16, 0x8d00, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x40,0xb9,0x28,0x24,0xc0 },
+ 16, 0x8d10, 0, {0x4a,0x12,0x12,0x88,0x85,0xa8,0x20,0x20,0xc0,0x0b,0x22,0x02,0xc0,0x91,0xa1,0x00 },
+ 16, 0x8d20, 0, {0x28,0xc2,0x0b,0x00,0x12,0x8c,0x40,0xa3,0x20,0x20,0xc4,0x0b,0x30,0x0a,0x0c,0x11 },
+ 16, 0x8d30, 0, {0x99,0x00,0x20,0xc5,0x09,0x01,0x02,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8d40, 0, {0xc0,0x11,0xac,0x00,0xb8,0x80,0x22,0xc0,0x0b,0x88,0x02,0xee,0x01,0xb8,0xc1,0x2a },
+ 16, 0x8d50, 0, {0xc0,0x1b,0xa8,0x06,0xe2,0x00,0xbb,0x80,0x2e,0xc0,0x8a,0x80,0x02,0xac,0x00,0xab },
+ 16, 0x8d60, 0, {0x00,0x2e,0xc0,0x0a,0xb0,0x02,0x2c,0x00,0x99,0x00,0x24,0xc0,0x08,0x80,0x02,0x30 },
+ 16, 0x8d70, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xb0,0x80,0x36,0xc0 },
+ 16, 0x8d80, 0, {0x0e,0xa8,0x13,0xe2,0x85,0xf3,0xc0,0x32,0xc0,0x0e,0x9c,0x23,0xe7,0x24,0xe8,0x82 },
+ 16, 0x8d90, 0, {0x3a,0xc1,0x0f,0x94,0x03,0xac,0x02,0xeb,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0x2e,0x10 },
+ 16, 0x8da0, 0, {0x51,0x00,0xb2,0xc0,0x0d,0xb0,0x03,0x50,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8db0, 0, {0xe0,0x01,0xbc,0x00,0xff,0x00,0x3f,0xc0,0x8f,0xd0,0x03,0xf0,0x04,0xfd,0x04,0x3f },
+ 16, 0x8dc0, 0, {0xc0,0x4c,0xc0,0x03,0xf0,0x10,0xfc,0x00,0x1f,0xc0,0x0d,0xd1,0x23,0x1c,0x00,0xc7 },
+ 16, 0x8dd0, 0, {0x00,0x39,0xc0,0x0d,0xf0,0x83,0xfe,0x44,0xed,0x00,0x3b,0xc0,0x0f,0x74,0x03,0xf8 },
+ 16, 0x8de0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xf9,0x01,0xba,0xc1 },
+ 16, 0x8df0, 0, {0x0c,0xb0,0x03,0xa1,0x08,0xfa,0x00,0x30,0xc8,0x8f,0x94,0x03,0x25,0x00,0xf9,0x00 },
+ 16, 0x8e00, 0, {0x3c,0xc0,0x0f,0x04,0x83,0xec,0x00,0xfb,0x00,0x3e,0xe0,0x0f,0x71,0x0b,0x2c,0x40 },
+ 16, 0x8e10, 0, {0xfd,0x08,0x37,0xc0,0x4e,0x91,0x03,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8e20, 0, {0xc8,0x05,0x3c,0x00,0xb9,0x00,0x23,0xc0,0x08,0x90,0x02,0x24,0x00,0xc8,0x00,0x37 },
+ 16, 0x8e30, 0, {0xf0,0x0b,0x80,0x01,0x64,0x00,0x49,0x02,0x33,0xc0,0x84,0x9c,0x03,0x3c,0x00,0xbf },
+ 16, 0x8e40, 0, {0x02,0x0f,0xd0,0x08,0xf4,0x02,0x0e,0x10,0xbd,0x80,0x33,0xe0,0x08,0x90,0x0a,0x32 },
+ 16, 0x8e50, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb0,0x06,0x20,0xc0 },
+ 16, 0x8e60, 0, {0x08,0x00,0x42,0x84,0x00,0xa0,0x00,0x20,0xf0,0x0b,0x00,0x22,0xcc,0x00,0x90,0x00 },
+ 16, 0x8e70, 0, {0x28,0xc0,0x02,0x3d,0x02,0x8c,0x00,0xb3,0x00,0x2c,0xc2,0x9a,0x38,0x02,0x06,0x04 },
+ 16, 0x8e80, 0, {0xb1,0x12,0x20,0xe0,0x08,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8e90, 0, {0x20,0x01,0x1e,0x00,0xb6,0x80,0x21,0xe0,0x28,0xea,0x02,0x36,0x80,0x86,0x90,0x65 },
+ 16, 0x8ea0, 0, {0xe0,0x1b,0xda,0x06,0x5e,0x01,0x9e,0x84,0x25,0xec,0x0a,0x78,0x02,0x5e,0x00,0xb7 },
+ 16, 0x8eb0, 0, {0x80,0x2d,0xe0,0x08,0x79,0x4a,0x16,0x40,0xbd,0x80,0x25,0xe0,0x08,0x38,0x02,0x08 },
+ 16, 0x8ec0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xfb,0x00,0x28,0xe0 },
+ 16, 0x8ed0, 0, {0x08,0x18,0x02,0x8a,0x88,0xa1,0xa0,0x20,0xc2,0x1f,0x2a,0x23,0xe6,0xc8,0xf0,0xc0 },
+ 16, 0x8ee0, 0, {0x3a,0xed,0x4e,0x34,0x02,0x8c,0x08,0xf3,0x81,0x1e,0xc0,0x0e,0x30,0x03,0x0e,0xc0 },
+ 16, 0x8ef0, 0, {0xf1,0x00,0xb0,0xca,0x0e,0x21,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8f00, 0, {0x40,0x1d,0xbc,0x08,0xfe,0x10,0x3f,0xd2,0x0f,0xe0,0x03,0xec,0x04,0xff,0x14,0x7e },
+ 16, 0x8f10, 0, {0xc0,0x0f,0xb1,0x23,0xfc,0x01,0xee,0x00,0x3a,0xc4,0x0d,0xb0,0x13,0xbc,0x00,0xff },
+ 16, 0x8f20, 0, {0x00,0x3f,0xc0,0x0e,0xf0,0x83,0xfc,0x0c,0xfd,0x10,0x3b,0xc0,0x2f,0xe1,0x03,0xd0 },
+ 16, 0x8f30, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x40,0xf0,0x80,0x32,0xd0 },
+ 16, 0x8f40, 0, {0x0c,0xa0,0x03,0x6c,0x00,0xf3,0x80,0x32,0xda,0x0f,0xb0,0x03,0xec,0x00,0xfb,0x00 },
+ 16, 0x8f50, 0, {0x3e,0xcc,0x4c,0x98,0x13,0x2c,0x10,0xfb,0x04,0x3e,0xc4,0x0c,0xf2,0x83,0xa6,0x10 },
+ 16, 0x8f60, 0, {0xdd,0x20,0x3f,0xd1,0x0c,0xb0,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8f70, 0, {0x48,0x11,0x9c,0x80,0xb7,0x00,0x21,0xc8,0x0c,0x70,0x02,0xdc,0x08,0xb7,0x00,0x21 },
+ 16, 0x8f80, 0, {0xc8,0x0e,0x70,0x22,0xd8,0x00,0xb7,0x00,0x2c,0xc2,0x0a,0x70,0x0a,0x1f,0x08,0xb7 },
+ 16, 0x8f90, 0, {0x00,0x39,0xc8,0x0a,0x70,0x02,0x14,0x00,0xc5,0x69,0x2c,0xca,0x2a,0x70,0x02,0xd2 },
+ 16, 0x8fa0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xbf,0x81,0x64,0xe1 },
+ 16, 0x8fb0, 0, {0x08,0x78,0x02,0x5a,0x01,0xbf,0x80,0x21,0xec,0x4b,0x78,0x46,0x9f,0x08,0x37,0x80 },
+ 16, 0x8fc0, 0, {0x2d,0xe8,0x88,0x18,0x02,0x1e,0x81,0xb7,0xb0,0x2d,0xe0,0x09,0x7a,0x02,0x8e,0x00 },
+ 16, 0x8fd0, 0, {0x95,0xa0,0x2d,0xe4,0x08,0x78,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8fe0, 0, {0x48,0x14,0xec,0x00,0xb3,0x60,0x20,0xc0,0x08,0xb6,0x02,0xcc,0x00,0xb3,0x01,0x20 },
+ 16, 0x8ff0, 0, {0xc0,0x8a,0xb0,0x86,0xcf,0x00,0xbb,0x10,0x6c,0xc1,0x0a,0x38,0x02,0x0c,0x01,0xb3 },
+ 16, 0x9000, 0, {0x02,0x28,0xc0,0x0b,0xb0,0x0a,0x0c,0x00,0x81,0x00,0x2e,0xc0,0x0a,0xb4,0x82,0xd2 },
+ 16, 0x9010, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfe,0x40,0xb6,0x80 },
+ 16, 0x9020, 0, {0x0c,0xe4,0x03,0x78,0x80,0xfe,0x74,0x32,0x80,0x0b,0xe6,0x03,0xf9,0x00,0xfe,0x00 },
+ 16, 0x9030, 0, {0x3e,0x80,0x0c,0xe0,0x03,0x28,0x00,0xfa,0x00,0x3e,0x80,0x4d,0xa0,0x03,0xa8,0x00 },
+ 16, 0x9040, 0, {0xda,0x04,0x3e,0x80,0x0c,0xe4,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9050, 0, {0x48,0x00,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x2e,0x80,0x23,0xe0,0x00,0xf8,0x01,0x3c },
+ 16, 0x9060, 0, {0x00,0x0e,0x80,0x03,0xe0,0x20,0xf8,0x20,0x3e,0x01,0x8f,0x89,0x03,0xe0,0x00,0xf8 },
+ 16, 0x9070, 0, {0x00,0x3a,0x10,0x0e,0x80,0x01,0xe0,0x00,0xe8,0x40,0x7e,0x00,0x4f,0x80,0x03,0xd2 },
+ 16, 0x9080, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x02,0xc9,0x01,0x7e,0x40 },
+ 16, 0x9090, 0, {0x2c,0x90,0x0b,0x24,0x00,0xf9,0x00,0x3e,0x68,0x05,0x90,0x13,0xa4,0x04,0xd9,0x00 },
+ 16, 0x90a0, 0, {0x32,0x41,0x0e,0x91,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x60,0x0e,0x90,0x03,0x24,0x00 },
+ 16, 0x90b0, 0, {0xf1,0x00,0x32,0x40,0x68,0x90,0x43,0x82,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x90c0, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x6e,0x40,0x08,0x90,0x42,0x24,0x00,0xb9,0x00,0x2e },
+ 16, 0x90d0, 0, {0x70,0x88,0x90,0x03,0x24,0x00,0xb9,0x00,0x22,0x40,0x08,0x98,0x12,0xe4,0x00,0xb9 },
+ 16, 0x90e0, 0, {0x00,0x2e,0x40,0x0a,0x90,0x0a,0x26,0x00,0xb9,0x80,0xa2,0x40,0x08,0x90,0x12,0x20 },
+ 16, 0x90f0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x89,0x04,0x2c,0x40 },
+ 16, 0x9100, 0, {0x08,0x90,0x02,0x24,0x01,0xb9,0x00,0x2a,0x40,0x0b,0xb0,0x02,0xa4,0x01,0xb9,0x00 },
+ 16, 0x9110, 0, {0xe0,0x40,0x0a,0x90,0x82,0xa4,0x00,0xb9,0x00,0x2c,0x48,0x0a,0x98,0x02,0x24,0x80 },
+ 16, 0x9120, 0, {0x39,0x20,0x22,0x40,0x2a,0x90,0x02,0x86,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9130, 0, {0x08,0x04,0x04,0x80,0x81,0x00,0x2c,0x48,0x08,0x10,0x12,0x04,0x10,0xb1,0x04,0x2c },
+ 16, 0x9140, 0, {0xd8,0x0a,0x10,0x02,0x04,0x00,0xb1,0x00,0x20,0x48,0x08,0x10,0x02,0xc4,0x80,0xb1 },
+ 16, 0x9150, 0, {0x22,0x2c,0x50,0x8a,0x32,0x82,0x05,0xa0,0xb1,0x2a,0x20,0x4a,0x0a,0x12,0x82,0x02 },
+ 16, 0x9160, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x50,0xc8,0x52,0x2e,0x14 },
+ 16, 0x9170, 0, {0x0c,0x85,0x03,0x21,0x40,0xf8,0x50,0x3a,0x00,0x1f,0x85,0x03,0xa1,0x40,0xf8,0x50 },
+ 16, 0x9180, 0, {0x32,0x14,0x0e,0x80,0x03,0xa1,0x40,0xf8,0x50,0x3c,0x80,0x0e,0x02,0x03,0x20,0x80 },
+ 16, 0x9190, 0, {0xfa,0x20,0x32,0x08,0x0e,0x82,0x13,0xae,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x91a0, 0, {0x98,0x1d,0xe4,0x50,0xfd,0x00,0x3e,0x44,0x0f,0xd0,0x03,0xf4,0x00,0xfd,0x00,0x3e },
+ 16, 0x91b0, 0, {0x44,0x8d,0xd0,0x01,0xbd,0x00,0xfd,0x02,0x3e,0x44,0x0f,0xd4,0x00,0xe4,0x48,0x79 },
+ 16, 0x91c0, 0, {0x14,0x3e,0x50,0x0f,0x92,0xa2,0xf4,0x08,0xfd,0x00,0x3e,0x4a,0x0d,0xd2,0x83,0xe6 },
+ 16, 0x91d0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe7,0x00,0xf9,0x10,0x3a,0x6e },
+ 16, 0x91e0, 0, {0x0c,0xb1,0x03,0xe4,0x40,0xf9,0x44,0x3b,0x61,0x8e,0x94,0x03,0xe4,0x00,0xe9,0x40 },
+ 16, 0x91f0, 0, {0x32,0x66,0x0f,0xda,0x0b,0xa7,0x28,0xc9,0xe0,0x3f,0x68,0x0c,0xda,0x83,0xb3,0x20 },
+ 16, 0x9200, 0, {0xed,0xa0,0x33,0x79,0x08,0xd8,0x03,0x46,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9210, 0, {0x38,0x10,0xe2,0x00,0xb8,0xa0,0x2e,0x38,0x08,0x8a,0x02,0xe2,0x88,0xe8,0x81,0x2e },
+ 16, 0x9220, 0, {0x14,0x09,0x0a,0x03,0xe2,0x80,0xb8,0x80,0x32,0x30,0x0b,0x85,0x02,0x21,0x01,0xa8 },
+ 16, 0x9230, 0, {0xf4,0x38,0x2a,0x08,0x0e,0xca,0x23,0x90,0xc8,0x54,0x34,0x38,0x08,0x8a,0x92,0x0e },
+ 16, 0x9240, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb1,0x00,0x28,0x40 },
+ 16, 0x9250, 0, {0x19,0x10,0x02,0xc4,0x00,0xb1,0x20,0x28,0x40,0x0b,0x10,0x06,0xc4,0x20,0xa1,0xa2 },
+ 16, 0x9260, 0, {0x6c,0x48,0x0b,0x10,0x02,0x84,0x08,0x81,0x20,0x2c,0x50,0x09,0x10,0x02,0xc4,0x04 },
+ 16, 0x9270, 0, {0xb1,0x00,0x24,0x58,0x08,0x3c,0x02,0x42,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9280, 0, {0x18,0x15,0xa4,0x01,0xb9,0x20,0x2c,0x40,0x09,0x90,0x02,0xe4,0x10,0xa9,0x40,0x2e },
+ 16, 0x9290, 0, {0x40,0x0b,0x90,0x02,0xa4,0x00,0xb1,0x01,0x2a,0x40,0x0b,0x94,0x02,0x24,0x00,0xa9 },
+ 16, 0x92a0, 0, {0x00,0x2a,0x40,0x01,0x10,0x52,0x64,0x00,0x89,0x00,0x26,0x40,0x00,0x98,0x02,0x46 },
+ 16, 0x92b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0x61,0x3a,0x40 },
+ 16, 0x92c0, 0, {0x0d,0x90,0x83,0xe5,0x20,0xf9,0x01,0x3a,0x40,0x2e,0x90,0x02,0xe4,0x40,0xe9,0x01 },
+ 16, 0x92d0, 0, {0x9e,0x40,0x0f,0x94,0x03,0xa4,0x00,0x89,0x00,0x3e,0x40,0x2d,0x90,0x02,0xe6,0x08 },
+ 16, 0x92e0, 0, {0xb9,0x01,0x36,0x40,0x2c,0x90,0x01,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x92f0, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0x3e,0x40,0x2e,0x90,0x03,0xe4,0x80,0xf9,0x00,0x3c },
+ 16, 0x9300, 0, {0x40,0x0c,0x9c,0x23,0xe4,0x00,0xf9,0x00,0x36,0x40,0x0f,0x10,0x43,0x84,0x00,0xf9 },
+ 16, 0x9310, 0, {0x02,0x3e,0x40,0x0e,0x90,0x03,0x80,0x80,0xf9,0x00,0x3c,0x40,0x2f,0x90,0x03,0x8a },
+ 16, 0x9320, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xc8,0x40,0x36,0x01 },
+ 16, 0x9330, 0, {0x0d,0x84,0x03,0xe1,0x00,0xe8,0x40,0x3e,0x08,0x0c,0x80,0x03,0xe1,0x00,0xf8,0x00 },
+ 16, 0x9340, 0, {0x32,0x00,0x8f,0x80,0x03,0xa0,0x10,0xf8,0x00,0x32,0x04,0x0e,0x80,0x83,0x60,0x00 },
+ 16, 0x9350, 0, {0xf8,0x00,0x3e,0x00,0x0c,0x00,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9360, 0, {0x28,0x05,0x28,0x00,0x8a,0x01,0x22,0x80,0x08,0xa0,0x24,0xe8,0x00,0x0a,0x00,0x2f },
+ 16, 0x9370, 0, {0x80,0x1a,0xa0,0x02,0x28,0x00,0xba,0x00,0x16,0x80,0x0b,0xe0,0x03,0x28,0x08,0xea },
+ 16, 0x9380, 0, {0x00,0x33,0x90,0x08,0xec,0x1b,0x22,0x80,0xc6,0x14,0x2f,0x91,0x08,0xa0,0x43,0x4a },
+ 16, 0x9390, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x93,0x00,0x24,0xc0 },
+ 16, 0x93a0, 0, {0x09,0x30,0x12,0xcc,0x04,0xa3,0x04,0x6c,0xc0,0x09,0x30,0x02,0x8c,0x00,0xb3,0x00 },
+ 16, 0x93b0, 0, {0x2c,0xc0,0x13,0x30,0x02,0x8c,0x00,0xb3,0x00,0xe6,0xb8,0x0a,0x38,0x02,0x44,0x08 },
+ 16, 0x93c0, 0, {0x82,0x50,0x2c,0xd2,0x3a,0x30,0x02,0x8a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x93d0, 0, {0xa0,0x01,0x0e,0x80,0x97,0xb4,0x21,0xc4,0x49,0x71,0x02,0xde,0x81,0x87,0x21,0x2d },
+ 16, 0x93e0, 0, {0xd0,0x0b,0x7b,0x02,0x1c,0x01,0xbf,0x20,0x29,0xc4,0x0b,0x30,0x02,0x5c,0x00,0xa7 },
+ 16, 0x93f0, 0, {0xa1,0x21,0xc0,0x4a,0x70,0x8a,0x0c,0x81,0x84,0x00,0x2d,0xd0,0x0a,0x50,0x02,0xe8 },
+ 16, 0x9400, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x82,0xdf,0xa0,0x34,0xec },
+ 16, 0x9410, 0, {0x0d,0x79,0x02,0xfe,0x80,0xe7,0xe8,0x2f,0xa0,0x09,0x7a,0x02,0x9e,0x00,0xf7,0xa2 },
+ 16, 0x9420, 0, {0x25,0xea,0x0b,0x48,0x03,0x9e,0x04,0xff,0xc0,0x65,0xe4,0x0e,0x68,0x03,0x5f,0x00 },
+ 16, 0x9430, 0, {0xe4,0x80,0x3d,0xe0,0x0e,0xf8,0x03,0xaa,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9440, 0, {0x08,0x1d,0xac,0x48,0xeb,0x05,0x3e,0xd9,0x0e,0xb2,0x03,0xec,0x00,0xfb,0x60,0x3e },
+ 16, 0x9450, 0, {0xc0,0x0e,0xb2,0x83,0xac,0x00,0xf3,0x50,0xa6,0xc0,0x4f,0xb0,0x03,0xac,0x00,0xfb },
+ 16, 0x9460, 0, {0x80,0x3f,0xd8,0x0d,0xa0,0x03,0xec,0x0a,0xf9,0x00,0x3e,0xc0,0x0d,0x90,0x03,0x42 },
+ 16, 0x9470, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xbb,0x90,0x3e,0xe0 },
+ 16, 0x9480, 0, {0x08,0x39,0x03,0x9e,0x20,0xcf,0x82,0x77,0xe0,0x1f,0xf8,0x03,0xee,0x00,0xff,0xc0 },
+ 16, 0x9490, 0, {0x3f,0xe5,0x0d,0xf9,0x03,0xee,0x00,0xfb,0x90,0x37,0xa0,0x08,0xf8,0x0f,0x1e,0x00 },
+ 16, 0x94a0, 0, {0xcc,0x94,0x33,0x60,0x0d,0xf8,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x94b0, 0, {0xa8,0x11,0x9c,0x00,0xb7,0x90,0x2f,0xe4,0x08,0x7a,0x02,0x1e,0x00,0x8f,0x12,0x25 },
+ 16, 0x94c0, 0, {0xd8,0x0b,0xbb,0x02,0x1e,0x00,0xb7,0x00,0x2d,0xe8,0x08,0x7d,0x82,0xde,0x40,0xbb },
+ 16, 0x94d0, 0, {0xa0,0x27,0x90,0x0a,0x76,0x02,0x5c,0x80,0x85,0x00,0x37,0xc4,0x4d,0x71,0x03,0xea },
+ 16, 0x94e0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xb7,0x20,0x2d,0xc0 },
+ 16, 0x94f0, 0, {0x29,0xf2,0x22,0xbc,0x80,0x97,0x00,0x25,0x41,0x0b,0x70,0x12,0x9c,0x00,0xb7,0x08 },
+ 16, 0x9500, 0, {0x29,0xc0,0x08,0x42,0x12,0xdc,0x40,0xb7,0x00,0x29,0xc0,0x09,0x60,0x22,0xdc,0x10 },
+ 16, 0x9510, 0, {0x80,0x00,0x21,0x40,0x09,0x70,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9520, 0, {0x20,0x14,0xcc,0x00,0xb3,0xc0,0x2e,0xc0,0x08,0x34,0x82,0x2d,0x00,0x93,0x00,0x24 },
+ 16, 0x9530, 0, {0xc0,0x0b,0x30,0x02,0x0f,0x80,0x13,0x00,0x2c,0xc0,0x0a,0x34,0xa2,0xec,0x00,0xb3 },
+ 16, 0x9540, 0, {0x00,0x28,0xc0,0x0b,0x00,0x02,0xcc,0x00,0x81,0x00,0x20,0xc0,0x09,0x30,0x02,0x89 },
+ 16, 0x9550, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xbc,0x00,0xff,0xe0,0x3f,0xc0 },
+ 16, 0x9560, 0, {0x0c,0xf4,0x83,0xbd,0x00,0xdf,0x08,0x36,0x40,0x0b,0x75,0x42,0xfc,0x20,0xff,0x80 },
+ 16, 0x9570, 0, {0x3b,0xc0,0x2c,0x3c,0x03,0xfc,0x00,0xbf,0x00,0xbe,0xc0,0x8d,0x90,0x0b,0xac,0x02 },
+ 16, 0x9580, 0, {0xca,0x00,0x22,0x80,0x0d,0xb0,0x02,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9590, 0, {0x80,0x00,0xec,0x00,0xfb,0x08,0x1e,0xc0,0x0f,0xb0,0x13,0xec,0x00,0xeb,0x00,0x3a },
+ 16, 0x95a0, 0, {0x10,0x0f,0xb0,0x23,0xac,0x01,0xfb,0x00,0x3e,0xc0,0x3c,0x84,0x03,0xec,0x00,0xfb },
+ 16, 0x95b0, 0, {0x00,0x26,0x40,0x0e,0x94,0x0b,0x2c,0x00,0xf9,0x40,0x3e,0x90,0x0e,0x90,0x13,0xe0 },
+ 16, 0x95c0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x02,0xcf,0x00,0x3f,0xc0 },
+ 16, 0x95d0, 0, {0x0d,0xf0,0x0b,0x3c,0x20,0xcf,0x00,0x3d,0x00,0x0e,0xf0,0x07,0x9c,0x01,0xcf,0x02 },
+ 16, 0x95e0, 0, {0x3e,0xc0,0x0f,0xc4,0x03,0x3c,0x00,0xcf,0x00,0x0f,0xc0,0x0e,0x44,0x03,0x1f,0x02 },
+ 16, 0x95f0, 0, {0xcc,0x00,0x3f,0x80,0x2c,0x70,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9600, 0, {0x81,0x04,0x6c,0x00,0x8b,0x02,0x2e,0xc0,0x0d,0xb0,0x02,0x2c,0x00,0xab,0x00,0x06 },
+ 16, 0x9610, 0, {0x20,0x08,0xb0,0x03,0xfc,0x00,0xab,0x00,0x2e,0xc0,0x0f,0x80,0x06,0xbc,0x00,0xab },
+ 16, 0x9620, 0, {0x04,0x3a,0xf0,0x0c,0x88,0x02,0x2c,0x00,0xc9,0x80,0x3a,0x92,0x08,0x90,0x0a,0xa0 },
+ 16, 0x9630, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xab,0x00,0x2e,0xc0 },
+ 16, 0x9640, 0, {0x09,0x30,0x02,0x2c,0x00,0x8b,0x00,0x26,0x60,0x0b,0xb0,0x02,0xac,0x00,0x8b,0x00 },
+ 16, 0x9650, 0, {0x6e,0xc0,0x0b,0xb0,0x42,0x2c,0x00,0x9b,0x00,0x4c,0xe0,0x0a,0x90,0x22,0x2c,0x00 },
+ 16, 0x9660, 0, {0x8a,0xc2,0x2c,0x40,0x08,0xb0,0x42,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9670, 0, {0x08,0x04,0x0c,0x00,0x83,0x0d,0x2c,0xc6,0x09,0x31,0x02,0x0d,0x81,0xa3,0x11,0x24 },
+ 16, 0x9680, 0, {0x00,0x8a,0xb1,0xe2,0x4c,0x80,0xa3,0x00,0x2c,0xcc,0x0b,0x02,0x02,0x8c,0x80,0xa3 },
+ 16, 0x9690, 0, {0x48,0x08,0xc0,0x08,0x00,0x0a,0x0d,0x00,0x81,0x00,0x28,0xc0,0x08,0x30,0x02,0x82 },
+ 16, 0x96a0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xcb,0x20,0x2f,0xc8 },
+ 16, 0x96b0, 0, {0x8d,0xf6,0x13,0x2d,0xb0,0x8f,0x00,0x36,0x40,0x0f,0xf0,0x02,0xad,0xa8,0x8f,0x10 },
+ 16, 0x96c0, 0, {0x3f,0xca,0x0b,0x80,0x92,0x2c,0x10,0xdb,0x40,0x3f,0xc0,0x0e,0x00,0x03,0x2d,0x04 },
+ 16, 0x96d0, 0, {0xc8,0x02,0x3e,0x40,0x0c,0xb0,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x96e0, 0, {0xa0,0x1d,0xfc,0x00,0xff,0x00,0x3f,0xc8,0x0e,0xf1,0x03,0xec,0x84,0xff,0x20,0x37 },
+ 16, 0x96f0, 0, {0x00,0x0d,0xb2,0x03,0xbc,0xa0,0xff,0x00,0x3e,0xc9,0x0e,0x80,0x03,0xfd,0x11,0xff },
+ 16, 0x9700, 0, {0x00,0x3b,0xc0,0x0e,0xc0,0x03,0xfc,0x80,0xed,0x00,0x3b,0xc0,0x0f,0xf0,0x43,0x68 },
+ 16, 0x9710, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,0x90,0xcc,0x92,0x3b,0xc8 },
+ 16, 0x9720, 0, {0x0d,0xf0,0x83,0x73,0x10,0xff,0x28,0x37,0xca,0x4f,0xb2,0x03,0xfc,0x00,0xdf,0x20 },
+ 16, 0x9730, 0, {0xb3,0xc4,0x0d,0x68,0x43,0xfe,0x14,0xcb,0x84,0x33,0xe0,0x0d,0x78,0x03,0xbe,0x00 },
+ 16, 0x9740, 0, {0xff,0x80,0x37,0xa0,0x0c,0xf3,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9750, 0, {0x80,0x00,0xfc,0x48,0x82,0x21,0x03,0xf4,0x0f,0xf6,0x42,0x20,0x04,0x8a,0x60,0x2b },
+ 16, 0x9760, 0, {0xda,0x0b,0xf9,0x02,0x3f,0x04,0x8f,0x52,0x23,0xd5,0x4d,0x88,0x02,0xae,0x00,0xdb },
+ 16, 0x9770, 0, {0x80,0x36,0xc0,0x08,0x80,0x02,0x20,0x04,0xb8,0x00,0x22,0x60,0x0d,0x74,0x03,0xe0 },
+ 16, 0x9780, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0xa0,0x80,0x01,0x08,0xc0 },
+ 16, 0x9790, 0, {0x4b,0x30,0x82,0x42,0x90,0xa3,0x08,0x2c,0xc8,0x1a,0x30,0x22,0x8d,0x00,0x93,0x00 },
+ 16, 0x97a0, 0, {0x24,0xc8,0x09,0xa0,0x12,0x0c,0x04,0xab,0x00,0x62,0xc0,0x09,0xb0,0x02,0xcc,0x00 },
+ 16, 0x97b0, 0, {0xb3,0x00,0x28,0x80,0x08,0x36,0x06,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x97c0, 0, {0xc0,0x15,0xac,0x00,0x88,0x08,0x22,0xc0,0x0a,0x30,0x1a,0x00,0x11,0x82,0x00,0x0a },
+ 16, 0x97d0, 0, {0xc0,0x0b,0xb0,0x42,0x2c,0x00,0x8b,0x00,0x26,0xc0,0x09,0x91,0x02,0xec,0x20,0xbb },
+ 16, 0x97e0, 0, {0x28,0x66,0xc0,0x08,0x80,0x02,0x60,0x00,0xb8,0x00,0x2a,0x40,0x81,0xb0,0x06,0xf8 },
+ 16, 0x97f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0xec,0x02,0xc8,0x04,0x3a,0xc0 },
+ 16, 0x9800, 0, {0x89,0xb0,0x03,0x68,0x00,0xe9,0xc1,0x1e,0xc1,0x0e,0x30,0x03,0xec,0x00,0xdb,0x00 },
+ 16, 0x9810, 0, {0x36,0xc1,0x0d,0x00,0x23,0x0e,0x00,0xeb,0x80,0x32,0xc8,0xcd,0x30,0x32,0xec,0x08 },
+ 16, 0x9820, 0, {0xf3,0x00,0x3c,0x80,0x0c,0xb0,0x06,0x80,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9830, 0, {0xe0,0x01,0x9c,0x00,0x7c,0x00,0x3f,0xc0,0x0b,0xb0,0x43,0xfd,0x00,0xbe,0xc4,0x37 },
+ 16, 0x9840, 0, {0xc0,0x1f,0xf0,0x03,0x5c,0x00,0xff,0x01,0x3b,0xc0,0x0e,0xc8,0x03,0xbf,0x20,0xdf },
+ 16, 0x9850, 0, {0x00,0x3f,0xd0,0x0f,0xc0,0x13,0xb0,0x00,0x7c,0x00,0xb7,0x40,0x0f,0xf0,0x1b,0xb0 },
+ 16, 0x9860, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x0c,0xd8,0x41,0x32,0xc0 },
+ 16, 0x9870, 0, {0x0e,0xb0,0x07,0xa8,0x01,0x69,0x40,0xb2,0xc0,0x8d,0xb0,0xa3,0xec,0x08,0xf3,0x00 },
+ 16, 0x9880, 0, {0x32,0xc0,0x0f,0x80,0x03,0xed,0x00,0xfb,0x48,0x3a,0xc0,0x0d,0xb0,0x83,0x2c,0x00 },
+ 16, 0x9890, 0, {0xfb,0x20,0x3e,0x80,0x0f,0x70,0x23,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x98a0, 0, {0xc8,0x05,0x3c,0x00,0x88,0x00,0x23,0xc0,0x08,0xf0,0x06,0x2c,0x10,0x88,0x51,0x37 },
+ 16, 0x98b0, 0, {0xc0,0x08,0xf0,0x07,0x7d,0x60,0x8f,0x02,0x37,0xc0,0x0b,0x8c,0x00,0x2d,0x00,0xb3 },
+ 16, 0x98c0, 0, {0x00,0x38,0xc0,0x08,0x80,0x82,0x20,0x00,0xb8,0x00,0x2e,0x50,0x0b,0xf0,0x00,0x32 },
+ 16, 0x98d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0x98,0x00,0x28,0xc0 },
+ 16, 0x98e0, 0, {0x0a,0x30,0x02,0x84,0x04,0xa3,0x00,0x00,0xc0,0x68,0x39,0x06,0x0c,0x10,0x93,0x20 },
+ 16, 0x98f0, 0, {0x22,0xc0,0x9b,0x01,0xa0,0x8f,0x14,0x33,0x14,0x28,0xc0,0x09,0x3c,0x02,0x0c,0x01 },
+ 16, 0x9900, 0, {0x93,0x40,0x2c,0x88,0x0b,0x30,0x02,0xb8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9910, 0, {0x60,0x01,0x1e,0x10,0x87,0x80,0x29,0xe0,0x08,0x78,0x02,0x3e,0x00,0x83,0x90,0x24 },
+ 16, 0x9920, 0, {0xe0,0x08,0x78,0x10,0xce,0x04,0x07,0x91,0x25,0xe0,0x83,0xc9,0x02,0x1e,0x04,0xb7 },
+ 16, 0x9930, 0, {0x84,0x2b,0xa4,0x08,0x48,0x42,0x12,0xcc,0xb4,0x80,0x2d,0x64,0x0b,0x78,0x02,0x19 },
+ 16, 0x9940, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x2c,0x00,0xd0,0x10,0x28,0xc8 },
+ 16, 0x9950, 0, {0x0e,0x3b,0x02,0x84,0x00,0xe3,0x40,0x30,0xc8,0x0c,0x38,0x62,0x8c,0x00,0x53,0x00 },
+ 16, 0x9960, 0, {0x30,0xc4,0x1f,0x00,0x23,0x8c,0x3c,0xf3,0x80,0x18,0xc0,0x0d,0x30,0x03,0x0e,0x80 },
+ 16, 0x9970, 0, {0xd3,0x10,0x3c,0x80,0x0f,0x30,0x03,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9980, 0, {0x40,0x1d,0xbd,0x00,0xf9,0x12,0xb4,0xc0,0x07,0xb0,0x03,0xcc,0x00,0x4a,0x00,0x77 },
+ 16, 0x9990, 0, {0xc0,0x0e,0x71,0x43,0x6c,0x00,0xf3,0x00,0x3f,0xd0,0x1f,0xd0,0x53,0xac,0x68,0xfb },
+ 16, 0x99a0, 0, {0x18,0x3d,0xc0,0x0f,0xc0,0x13,0xf0,0x50,0xfc,0x04,0x3f,0x40,0x0f,0xf4,0x03,0x90 },
+ 16, 0x99b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xed,0x40,0xf8,0x04,0x3e,0xd2 },
+ 16, 0x99c0, 0, {0x0f,0xb3,0x13,0xe0,0x10,0xf9,0x00,0xb2,0xcc,0x0e,0xba,0x03,0x6d,0x80,0xdb,0x02 },
+ 16, 0x99d0, 0, {0x32,0xdc,0x4f,0x00,0x03,0x6c,0x04,0xf3,0x02,0x36,0x40,0x0e,0xb0,0x03,0xcc,0x00 },
+ 16, 0x99e0, 0, {0x4b,0x00,0x3c,0x80,0x0c,0xf1,0x03,0x62,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x99f0, 0, {0x48,0x11,0x9c,0x00,0xb4,0x00,0x2d,0xc9,0x0b,0x70,0x82,0xdc,0x00,0xbc,0x04,0x21 },
+ 16, 0x9a00, 0, {0xc4,0x4b,0x37,0x02,0x0c,0xa0,0x8f,0x74,0x21,0xc0,0x0b,0x40,0x02,0x1c,0x81,0xb7 },
+ 16, 0x9a10, 0, {0x20,0x2b,0xc0,0x08,0x40,0x02,0xd0,0x02,0x84,0x00,0x2d,0x40,0x0a,0xf2,0x02,0x12 },
+ 16, 0x9a20, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x80,0xb4,0xc0,0x2d,0xe4 },
+ 16, 0x9a30, 0, {0x0b,0x7a,0x02,0xd2,0x00,0xb5,0x88,0x21,0xe8,0x0a,0x78,0x02,0xde,0x40,0x97,0x00 },
+ 16, 0x9a40, 0, {0x21,0xe8,0x0b,0xcc,0x46,0x5e,0x28,0xb7,0xc4,0x21,0xf0,0x0a,0x78,0x02,0xfe,0x08 },
+ 16, 0x9a50, 0, {0x97,0x84,0x2d,0xa0,0x08,0x78,0x02,0x70,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9a60, 0, {0x08,0x14,0xcc,0x00,0xb0,0xc0,0x2c,0xc0,0x9b,0xb0,0x02,0xcc,0x20,0xb3,0x60,0x22 },
+ 16, 0x9a70, 0, {0xc0,0x0b,0x30,0x02,0x8c,0x00,0x83,0x01,0x20,0xc0,0x1b,0x06,0x16,0x4f,0x00,0xb3 },
+ 16, 0x9a80, 0, {0xa0,0x2a,0xf0,0x08,0x00,0x02,0xe0,0x00,0x90,0x00,0x2c,0x40,0x0a,0x30,0x02,0x02 },
+ 16, 0x9a90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x10,0xfe,0xc0,0x3e,0x80 },
+ 16, 0x9aa0, 0, {0x0f,0xa0,0x03,0xf9,0x08,0xfe,0x40,0x22,0x80,0x0e,0xa0,0x03,0xe8,0x00,0xd2,0x00 },
+ 16, 0x9ab0, 0, {0x32,0x80,0x8f,0xe0,0x03,0x58,0x00,0xf6,0x00,0x33,0xb0,0x0e,0x20,0x02,0xe8,0x0c },
+ 16, 0x9ac0, 0, {0xd2,0x02,0x3c,0x80,0x0c,0xa0,0x03,0x7a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9ad0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x20,0x3e,0x01,0x0b,0x80,0x03,0xe0,0x00,0xf0,0x40,0x3e },
+ 16, 0x9ae0, 0, {0x00,0x57,0x80,0x23,0x00,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x84,0x03,0xa0,0x30,0x38 },
+ 16, 0x9af0, 0, {0x00,0x3a,0x08,0x0f,0xc4,0x03,0xf0,0x00,0xec,0x00,0x3f,0x10,0x0f,0x80,0x03,0xd2 },
+ 16, 0x9b00, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xd9,0x01,0x3c,0x48 },
+ 16, 0x9b10, 0, {0x4c,0x90,0x0b,0x24,0x01,0xc9,0xc0,0x32,0x40,0xac,0x90,0x03,0xe4,0x00,0xd9,0x40 },
+ 16, 0x9b20, 0, {0x30,0x40,0x0d,0x9a,0x03,0x22,0x84,0xc8,0x14,0x32,0x40,0x0e,0x90,0x03,0x24,0x00 },
+ 16, 0x9b30, 0, {0xc9,0x00,0x82,0x68,0x2c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9b40, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x2e,0x40,0x08,0x90,0x22,0x24,0x00,0x89,0x02,0x82 },
+ 16, 0x9b50, 0, {0x40,0x08,0x90,0x02,0xe7,0x40,0x89,0x80,0x36,0x41,0x8d,0x18,0x02,0xa0,0x24,0xa8 },
+ 16, 0x9b60, 0, {0x04,0x62,0x40,0x08,0x94,0x83,0x24,0x00,0x89,0x01,0x22,0x72,0x08,0x90,0x0b,0x20 },
+ 16, 0x9b70, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x04,0x00,0x99,0x00,0x2a,0x40 },
+ 16, 0x9b80, 0, {0x28,0x90,0x12,0x04,0x00,0x89,0x00,0x22,0x40,0x08,0x90,0x02,0xa4,0x20,0x99,0x00 },
+ 16, 0x9b90, 0, {0x22,0x40,0x18,0x90,0x06,0x20,0x01,0x88,0x08,0x62,0x40,0x0a,0x90,0x02,0x34,0x10 },
+ 16, 0x9ba0, 0, {0x8d,0x81,0x23,0x41,0x08,0x10,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9bb0, 0, {0x08,0x04,0x04,0x80,0x81,0x04,0x2c,0x48,0x08,0x12,0x02,0x04,0x02,0x83,0x20,0x20 },
+ 16, 0x9bc0, 0, {0x48,0x08,0x12,0x02,0xc4,0x80,0x83,0x60,0x24,0x48,0x19,0x34,0x62,0xa5,0x04,0xa1 },
+ 16, 0x9bd0, 0, {0x02,0x60,0x40,0x08,0xd0,0x02,0x54,0x00,0x8d,0x00,0x29,0x40,0x08,0x12,0x82,0x02 },
+ 16, 0x9be0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xd8,0x50,0x3a,0x80 },
+ 16, 0x9bf0, 0, {0x0c,0x85,0x02,0x21,0x44,0x88,0x50,0x32,0x14,0x4c,0x80,0x43,0xe0,0x00,0xd8,0x00 },
+ 16, 0x9c00, 0, {0x22,0x14,0x0c,0x80,0x03,0x20,0x00,0xc8,0x00,0xa2,0x00,0x0e,0x80,0x03,0x20,0x00 },
+ 16, 0x9c10, 0, {0xc8,0x00,0x33,0x00,0x0c,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9c20, 0, {0x98,0x1d,0xe4,0x44,0xfd,0x00,0x3e,0x44,0x0f,0x91,0x03,0xf4,0x10,0xff,0x10,0x3e },
+ 16, 0x9c30, 0, {0x44,0x0f,0x91,0x03,0xe4,0x40,0xf9,0x10,0x3e,0x44,0x0b,0xf0,0x13,0xe5,0x10,0xf9 },
+ 16, 0x9c40, 0, {0x40,0x3f,0x4a,0x2f,0x92,0x8a,0xa4,0xa2,0xf9,0x28,0x36,0x40,0x0f,0x92,0x83,0xa6 },
+ 16, 0x9c50, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xe6,0xc0,0xc1,0x00,0x3f,0x69 },
+ 16, 0x9c60, 0, {0x0c,0x9a,0x43,0x6c,0x00,0xfd,0xa0,0x3e,0x78,0x2c,0xd8,0x07,0xd6,0x02,0xd5,0x96 },
+ 16, 0x9c70, 0, {0x32,0x78,0x0d,0x90,0x03,0x27,0x00,0xfd,0xa0,0x35,0x50,0x06,0xd4,0x03,0xe5,0x00 },
+ 16, 0x9c80, 0, {0xfd,0x40,0xb3,0x40,0x0f,0x98,0xa3,0x46,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9c90, 0, {0x38,0x10,0xe3,0xc2,0x88,0x88,0x2e,0x14,0xa8,0x8a,0xc2,0x22,0xa0,0xb8,0xc0,0x2c },
+ 16, 0x9ca0, 0, {0x24,0x48,0x84,0x02,0xe1,0x00,0x98,0xc4,0x20,0x3c,0x08,0x8a,0x82,0x23,0x80,0xb8 },
+ 16, 0x9cb0, 0, {0x04,0x22,0x20,0x08,0x88,0x03,0xa2,0x00,0xb8,0xa0,0x22,0x00,0x0b,0x88,0x02,0x0e },
+ 16, 0x9cc0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x80,0xa1,0x20,0x6c,0x40 },
+ 16, 0x9cd0, 0, {0x0a,0x14,0x02,0x44,0x04,0xa1,0x68,0x2c,0x48,0x08,0x14,0x02,0xc5,0x00,0x81,0x60 },
+ 16, 0x9ce0, 0, {0x20,0x48,0x19,0x90,0x02,0x85,0x81,0xb1,0x40,0x24,0x68,0x0a,0x12,0x42,0xc4,0x80 },
+ 16, 0x9cf0, 0, {0xb9,0x20,0x20,0x40,0x8b,0x10,0x82,0x42,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9d00, 0, {0x18,0x05,0xa4,0x10,0xa9,0x00,0x6e,0xc0,0x0a,0x10,0x02,0x24,0x14,0xb9,0x00,0x2e },
+ 16, 0x9d10, 0, {0x40,0x08,0x90,0x12,0xe4,0x00,0x99,0x00,0x22,0x40,0x08,0x80,0x06,0xa0,0x60,0xb9 },
+ 16, 0x9d20, 0, {0x09,0x22,0x60,0x08,0x90,0x02,0xa4,0x00,0xb9,0x00,0x02,0x40,0x0b,0x10,0x06,0x06 },
+ 16, 0x9d30, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe4,0x00,0xe9,0x80,0x3e,0x41 },
+ 16, 0x9d40, 0, {0x0e,0x90,0x03,0x64,0x00,0xe9,0xc0,0x3e,0x40,0x0c,0x90,0x02,0xe4,0x00,0xc9,0x00 },
+ 16, 0x9d50, 0, {0x22,0x41,0x0d,0x80,0x02,0xa3,0x04,0xf1,0x40,0x36,0x40,0x0e,0x90,0x02,0xe4,0x00 },
+ 16, 0x9d60, 0, {0xf1,0x00,0x12,0x40,0x0f,0x90,0x03,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9d70, 0, {0x28,0x01,0xa4,0x00,0xd9,0x22,0x3e,0x42,0x0d,0x90,0x03,0xe4,0x00,0xb9,0xc4,0x3c },
+ 16, 0x9d80, 0, {0x40,0x0f,0x90,0x03,0xe4,0x00,0xe9,0x02,0xae,0x40,0x0f,0x80,0x4b,0x62,0x10,0xf9 },
+ 16, 0x9d90, 0, {0x20,0x3e,0x40,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x02,0x7e,0x41,0x0f,0x90,0x13,0xca },
+ 16, 0x9da0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0x80,0x00,0xc8,0x00,0x38,0x00 },
+ 16, 0x9db0, 0, {0x0f,0x80,0x20,0xe0,0x00,0xa8,0x20,0x32,0x00,0x0c,0x80,0x07,0xe0,0x80,0xc8,0x00 },
+ 16, 0x9dc0, 0, {0x38,0x00,0x0d,0x80,0x83,0x21,0x10,0xf8,0x60,0x32,0x00,0x8e,0x80,0xb3,0x20,0x08 },
+ 16, 0x9dd0, 0, {0xf8,0x00,0x3e,0x00,0x0c,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9de0, 0, {0x28,0x05,0x28,0x04,0x8a,0x00,0x33,0x90,0x43,0xa0,0x22,0x28,0x00,0x8e,0x80,0x76 },
+ 16, 0x9df0, 0, {0x80,0x08,0xe1,0x03,0x19,0x00,0x86,0x80,0x22,0x80,0x0d,0x60,0x01,0x78,0x00,0xbe },
+ 16, 0x9e00, 0, {0x00,0x36,0x80,0x0c,0xe4,0x02,0xa8,0x10,0xbe,0xa0,0x2f,0x80,0x0d,0xa0,0x02,0x0a },
+ 16, 0x9e10, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x11,0x4c,0x04,0x03,0x04,0x2c,0xd4 },
+ 16, 0x9e20, 0, {0x0b,0x30,0x02,0x4c,0x01,0xa3,0xc4,0x20,0xc0,0x28,0x35,0x02,0x86,0x00,0x83,0x80 },
+ 16, 0x9e30, 0, {0x28,0xc0,0x08,0x38,0x06,0x0e,0x94,0x30,0xc0,0xa2,0xc0,0x0b,0x3c,0x02,0x0c,0x00 },
+ 16, 0x9e40, 0, {0xb3,0x80,0x2c,0x48,0x08,0x30,0x02,0x8a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9e50, 0, {0xa0,0x01,0x0c,0x04,0x8f,0x80,0x21,0xc1,0x1b,0x72,0x42,0x1e,0xc0,0x83,0x88,0x21 },
+ 16, 0x9e60, 0, {0xc0,0x18,0x28,0x06,0x10,0x21,0x86,0x38,0x21,0xc0,0x19,0xf7,0x02,0x5d,0xc0,0xb4 },
+ 16, 0x9e70, 0, {0x41,0x27,0xd0,0x08,0x78,0xc6,0x9c,0x00,0xb7,0x00,0x2f,0x60,0x09,0x72,0x02,0x28 },
+ 16, 0x9e80, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x02,0xc7,0x80,0x2d,0xa0 },
+ 16, 0x9e90, 0, {0x0f,0x3e,0x03,0xfe,0x80,0xa7,0x80,0xa1,0xe0,0x0c,0x78,0x02,0x94,0x00,0x85,0xa0 },
+ 16, 0x9ea0, 0, {0x39,0xe4,0x0c,0x78,0x13,0x1e,0x90,0xb5,0x84,0x31,0xe0,0x0f,0xf8,0x87,0x1e,0x04 },
+ 16, 0x9eb0, 0, {0xf7,0x80,0x3d,0x60,0x0c,0x3b,0x03,0xaa,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9ec0, 0, {0x08,0x1d,0xad,0xe4,0xfb,0x54,0x3e,0x80,0x0f,0xb4,0x23,0xec,0x32,0xfb,0x00,0x3e },
+ 16, 0x9ed0, 0, {0xd8,0x4f,0xa0,0x03,0xe4,0x00,0xf9,0x00,0x3e,0xc0,0x0f,0x30,0x33,0xec,0x04,0xf2 },
+ 16, 0x9ee0, 0, {0x01,0x3e,0xc0,0x0f,0xb2,0x03,0xfe,0x10,0xfb,0x68,0x3c,0x41,0x0f,0xf0,0x43,0x82 },
+ 16, 0x9ef0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x00,0xcf,0xe4,0x3f,0xe4 },
+ 16, 0x9f00, 0, {0x0c,0xfc,0x03,0x7e,0x80,0xcf,0x81,0x33,0xfa,0x0f,0xf8,0x03,0xf6,0x00,0xff,0x80 },
+ 16, 0x9f10, 0, {0x3f,0xe2,0x0f,0x79,0x03,0x3e,0x40,0xf4,0x80,0x33,0x60,0x0c,0xe8,0x03,0x3e,0x00 },
+ 16, 0x9f20, 0, {0xff,0x80,0x33,0x60,0x0c,0xf8,0x83,0x50,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9f30, 0, {0xa8,0x11,0x9c,0x00,0xd7,0xa0,0x2d,0xc4,0x08,0xba,0x02,0x3c,0xa0,0x87,0x20,0x21 },
+ 16, 0x9f40, 0, {0xc0,0x0f,0x52,0x03,0xd4,0x00,0xb6,0x10,0x2d,0xc0,0x8b,0x73,0x03,0x5c,0x40,0xb4 },
+ 16, 0x9f50, 0, {0xb0,0x2b,0x48,0x28,0x41,0x02,0x0c,0x00,0xbf,0x18,0x35,0x46,0x28,0x72,0x42,0x2a },
+ 16, 0x9f60, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x9c,0x00,0x87,0x41,0x2d,0x44 },
+ 16, 0x9f70, 0, {0x0a,0x73,0x02,0x9c,0xc4,0x81,0x00,0x6d,0xc8,0x8b,0x70,0x02,0xd4,0x00,0xb7,0x00 },
+ 16, 0x9f80, 0, {0x2d,0xc0,0x0b,0xf0,0x46,0x9c,0x55,0xb4,0x20,0x25,0x40,0x18,0x60,0x82,0x1c,0x00 },
+ 16, 0x9f90, 0, {0xb7,0x00,0x23,0x40,0x08,0x70,0x46,0x44,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9fa0, 0, {0x60,0x14,0xcc,0x00,0x93,0x00,0x2c,0x40,0x0b,0xb0,0x02,0x0c,0x82,0x80,0xc0,0x20 },
+ 16, 0x9fb0, 0, {0xc0,0x0a,0x10,0x02,0x04,0x00,0xb3,0x00,0x2c,0xc0,0x1b,0x30,0x00,0xcd,0x01,0xb0 },
+ 16, 0x9fc0, 0, {0x40,0xac,0x78,0x88,0x8c,0x06,0x0d,0x60,0xb3,0x4c,0x24,0x12,0x08,0x30,0x0a,0x18 },
+ 16, 0x9fd0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x15,0xbc,0x00,0xc7,0x00,0x2e,0x40 },
+ 16, 0x9fe0, 0, {0x0e,0xf0,0x2a,0xbf,0x00,0xc8,0xc8,0xbf,0xc0,0x0b,0x90,0x02,0xe4,0x04,0xbf,0x00 },
+ 16, 0x9ff0, 0, {0x3f,0xc0,0x0f,0xb2,0x0a,0xac,0x00,0xf8,0x80,0x34,0x49,0x0c,0xb9,0x0b,0x3f,0x00 },
+ 16, 0xa000, 0, {0xfb,0xc0,0x30,0xf0,0x0c,0xf0,0x03,0x6e,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa010, 0, {0x80,0x00,0xcc,0x00,0xfb,0x80,0x3e,0x41,0x2c,0xb0,0x13,0xac,0x00,0xf8,0x00,0x3e },
+ 16, 0xa020, 0, {0xc1,0x0f,0xa0,0x03,0xe8,0x00,0xfa,0x40,0x3e,0xc0,0x0f,0xb0,0x0b,0x6d,0x40,0xf8 },
+ 16, 0xa030, 0, {0x10,0x3a,0x40,0x0f,0xb0,0x03,0xec,0x10,0xfe,0x40,0x3e,0xc0,0x0f,0xf0,0x03,0xe1 },
+ 16, 0xa040, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xec,0x0c,0xdf,0x00,0x3b,0x80 },
+ 16, 0xa050, 0, {0x0f,0xf0,0x0b,0x3c,0x08,0xe7,0x08,0x33,0xc0,0x0b,0xd0,0x23,0x74,0x00,0x54,0x00 },
+ 16, 0xa060, 0, {0x33,0xc0,0x0f,0xf0,0x83,0xbe,0x20,0xfd,0x0c,0x3b,0x60,0x2c,0xe0,0x03,0x3c,0x00 },
+ 16, 0xa070, 0, {0xcf,0x12,0x33,0x50,0x0c,0x30,0x03,0x80,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa080, 0, {0x81,0x04,0x6c,0x04,0xab,0x00,0x22,0xa0,0x0b,0xb0,0x06,0x0c,0x00,0xab,0x40,0x36 },
+ 16, 0xa090, 0, {0xc0,0x0b,0xa8,0x02,0x66,0x00,0xb8,0x00,0x36,0xc1,0x0b,0x34,0x43,0xee,0x00,0xb2 },
+ 16, 0xa0a0, 0, {0x00,0x22,0x60,0x08,0xb4,0x82,0x8c,0x04,0x8a,0x21,0x22,0x40,0x08,0xb0,0x02,0x20 },
+ 16, 0xa0b0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x9b,0x00,0x2a,0x20 },
+ 16, 0xa0c0, 0, {0x0b,0xb0,0x02,0x2c,0x00,0x88,0xc5,0x22,0xc0,0x0b,0x88,0x82,0xe6,0x01,0xbb,0x08 },
+ 16, 0xa0d0, 0, {0x22,0xc0,0x0a,0xb2,0x82,0xac,0x60,0xb8,0x02,0x4a,0xc4,0x08,0xb1,0x02,0x2c,0x00 },
+ 16, 0xa0e0, 0, {0x83,0x00,0x22,0xc0,0x08,0xb0,0x02,0xa0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa0f0, 0, {0x08,0x04,0x0c,0x00,0xab,0x20,0x20,0x01,0x0b,0x32,0x06,0x2c,0x00,0xa0,0x00,0x20 },
+ 16, 0xa100, 0, {0xc0,0x09,0x04,0x22,0xc4,0x00,0xb2,0x00,0x24,0xc1,0x8b,0xb0,0x02,0x4c,0x00,0xb0 },
+ 16, 0xa110, 0, {0x00,0x62,0xc0,0x48,0x30,0x02,0xac,0x10,0x82,0x00,0x20,0xc0,0x08,0x30,0x02,0x02 },
+ 16, 0xa120, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x08,0xdf,0x2a,0x3a,0x00 },
+ 16, 0xa130, 0, {0x0f,0xf5,0x12,0x3c,0x10,0xc9,0x00,0xa3,0xc0,0x0f,0x80,0x53,0xec,0x01,0xda,0x00 },
+ 16, 0xa140, 0, {0x33,0xc0,0x0e,0xb0,0x03,0xac,0x04,0xf8,0x70,0x3a,0xc0,0x0c,0x60,0x43,0x2c,0x42 },
+ 16, 0xa150, 0, {0xcd,0x00,0xb2,0x40,0x2c,0xf0,0x03,0x80,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa160, 0, {0xa0,0x19,0xfc,0x00,0xfb,0x01,0x3d,0x00,0x0f,0xb4,0x17,0xfc,0x00,0x3c,0x00,0x3f },
+ 16, 0xa170, 0, {0xc0,0x4f,0xc0,0x03,0x74,0x08,0xfe,0x00,0x3f,0xc0,0x4f,0xf0,0x03,0xfc,0x08,0xf8 },
+ 16, 0xa180, 0, {0x30,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x04,0xfc,0x00,0x3d,0x00,0x0f,0xf0,0x03,0xe8 },
+ 16, 0xa190, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf4,0x90,0xef,0x00,0x3f,0xd8 },
+ 16, 0xa1a0, 0, {0x0e,0xf3,0x03,0x2c,0x01,0xd4,0x80,0x37,0xcc,0x0d,0x89,0x43,0x12,0x50,0xec,0x2c },
+ 16, 0xa1b0, 0, {0x32,0x05,0x0d,0xb0,0x53,0x3c,0xd4,0xc5,0x94,0x7f,0xa0,0x8f,0xf0,0x43,0x30,0x00 },
+ 16, 0xa1c0, 0, {0xdc,0x00,0x33,0x00,0x0c,0x48,0x07,0xf0,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa1d0, 0, {0x80,0x10,0xe6,0x40,0x8b,0x70,0x2f,0xdc,0x08,0xf7,0x02,0x0c,0x80,0x8a,0x20,0x00 },
+ 16, 0xa1e0, 0, {0xc8,0x4a,0x22,0x02,0xa0,0x00,0x8a,0x48,0x22,0x58,0x88,0xfd,0x02,0xad,0x02,0xa9 },
+ 16, 0xa1f0, 0, {0x20,0x1e,0xa0,0x03,0x80,0x02,0x2c,0x04,0x8b,0x00,0x22,0xc0,0x4c,0x88,0x07,0x60 },
+ 16, 0xa200, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc0,0x00,0x23,0x2c,0x2c,0xc9 },
+ 16, 0xa210, 0, {0x02,0x30,0x02,0x0c,0x68,0xa0,0x28,0x2c,0xd0,0x09,0x12,0x02,0x84,0x00,0xa0,0x21 },
+ 16, 0xa220, 0, {0x20,0x18,0x19,0x30,0x22,0x80,0xd0,0x83,0x06,0x0c,0xa0,0x0b,0xb0,0x06,0x00,0x12 },
+ 16, 0xa230, 0, {0xa0,0x00,0x20,0x00,0x29,0x00,0x0e,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa240, 0, {0xc0,0x11,0xa8,0x30,0x8b,0x00,0x2e,0xc0,0x4a,0x30,0x0a,0x2c,0x14,0xa0,0x80,0x0a },
+ 16, 0xa250, 0, {0xc1,0x08,0x88,0x86,0x87,0x00,0x83,0x00,0x22,0x49,0x08,0xb0,0x06,0xa0,0x40,0xab },
+ 16, 0xa260, 0, {0x20,0x22,0x20,0x0b,0x80,0x0a,0x0c,0x04,0xab,0x02,0x22,0xc0,0x88,0x80,0x02,0xf0 },
+ 16, 0xa270, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xef,0x40,0xeb,0x06,0x3e,0xc0 },
+ 16, 0xa280, 0, {0x0e,0xb0,0x03,0x2c,0x02,0xf9,0xa0,0x3e,0xc0,0x0d,0x8c,0x03,0xaa,0x10,0xe9,0x40 },
+ 16, 0xa290, 0, {0xb2,0x48,0x0d,0xb0,0x43,0xad,0x00,0xcb,0x86,0x2e,0x20,0x0f,0x30,0x03,0x24,0x00 },
+ 16, 0xa2a0, 0, {0xf9,0x80,0x32,0xc0,0x0d,0x0c,0xc2,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa2b0, 0, {0xe0,0x01,0x94,0x00,0xff,0x00,0x3d,0xc0,0x0d,0xf0,0x03,0x7c,0x00,0xdf,0x00,0x37 },
+ 16, 0xa2c0, 0, {0xc0,0x0f,0xe0,0x03,0xf0,0x00,0xfe,0x20,0x3f,0x40,0x0f,0x70,0x03,0xfe,0x00,0xff },
+ 16, 0xa2d0, 0, {0x82,0x7f,0x00,0x0f,0xc0,0x03,0xf9,0x04,0xde,0x20,0xbd,0x00,0x0f,0xd9,0x0b,0x7c },
+ 16, 0xa2e0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x01,0xcb,0x00,0x3e,0xc0 },
+ 16, 0xa2f0, 0, {0x2c,0xb0,0x0b,0x2c,0x00,0xe8,0x40,0x3e,0xc0,0x0f,0x94,0x07,0x29,0x00,0xc9,0x40 },
+ 16, 0xa300, 0, {0xb2,0xc0,0x0f,0xb0,0x03,0x01,0x02,0xcb,0x00,0x32,0x04,0x4f,0xf0,0x43,0x34,0xc0 },
+ 16, 0xa310, 0, {0xb5,0x1a,0x3f,0xc1,0x0f,0x80,0x93,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa320, 0, {0xc8,0x05,0x28,0x00,0x8f,0x00,0x2f,0xc0,0x08,0xf0,0x02,0x3c,0x04,0xd8,0x00,0x2b },
+ 16, 0xa330, 0, {0xc0,0x0c,0x80,0x45,0x60,0x00,0x7b,0x58,0x22,0xc8,0x0b,0xfa,0x01,0x61,0x40,0x8b },
+ 16, 0xa340, 0, {0x00,0x32,0x04,0x4b,0xce,0x02,0x28,0x00,0x3a,0x40,0x2e,0x07,0x0b,0x90,0x02,0x26 },
+ 16, 0xa350, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0x83,0x01,0x4c,0xc0 },
+ 16, 0xa360, 0, {0x0b,0x30,0x02,0xec,0x10,0x90,0x00,0x2a,0xc0,0x0a,0x80,0x06,0xc0,0x04,0x83,0x04 },
+ 16, 0xa370, 0, {0xa2,0x89,0x19,0x30,0x06,0xcc,0x00,0x83,0x00,0x20,0x90,0x0b,0x30,0xc2,0x48,0x00 },
+ 16, 0xa380, 0, {0xb2,0x40,0x24,0x20,0x0b,0x09,0x00,0xb8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa390, 0, {0x20,0x01,0x06,0x04,0x87,0xa4,0x2d,0xe0,0x09,0x38,0x02,0xde,0x00,0x9e,0x81,0x29 },
+ 16, 0xa3a0, 0, {0xe0,0x08,0x78,0x52,0xfa,0xc0,0x96,0x80,0x01,0xa0,0x8b,0x3a,0x22,0xce,0x40,0x8f },
+ 16, 0xa3b0, 0, {0xb0,0x25,0xa0,0x0b,0x08,0x02,0x56,0x08,0xb5,0x90,0x2d,0xe4,0x4b,0xd8,0x22,0x0c },
+ 16, 0xa3c0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x08,0x02,0x83,0x80,0x2e,0xe8 },
+ 16, 0xa3d0, 0, {0x0b,0x38,0x13,0xce,0x41,0xd3,0x10,0x28,0xc0,0x0e,0x3a,0x02,0xc6,0x08,0x4b,0x40 },
+ 16, 0xa3e0, 0, {0x30,0x60,0x0d,0x3b,0x27,0xcf,0xc4,0xc3,0xa0,0x30,0x00,0x0f,0x30,0x43,0x48,0x40 },
+ 16, 0xa3f0, 0, {0xf2,0x00,0x3c,0x04,0x0f,0x02,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa400, 0, {0x40,0x1d,0xb8,0x00,0xff,0x00,0x3f,0xc4,0x0e,0xf1,0x03,0x3c,0x00,0xff,0x01,0x33 },
+ 16, 0xa410, 0, {0xc0,0x4d,0xb1,0x07,0x7c,0x90,0xff,0x00,0x3f,0x40,0x03,0xf1,0x03,0x70,0x00,0xfb },
+ 16, 0xa420, 0, {0x10,0x3b,0x00,0x0f,0xc0,0x0b,0xb4,0x00,0xfd,0x00,0x3f,0xc4,0x0f,0xd0,0x03,0x90 },
+ 16, 0xa430, 0, {0x02,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x04,0xfb,0x84,0x3a,0xc2 },
+ 16, 0xa440, 0, {0x4c,0xb4,0x93,0x2c,0x04,0xe9,0x00,0x3a,0xc4,0x8d,0x08,0x03,0x2e,0x00,0xcb,0x01 },
+ 16, 0xa450, 0, {0x32,0x80,0x8f,0xb2,0x83,0xec,0x00,0xcb,0x80,0x32,0x00,0x0f,0xf9,0x03,0x3c,0x10 },
+ 16, 0xa460, 0, {0xdf,0x81,0xb3,0xe0,0x8c,0xa0,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa470, 0, {0x48,0x11,0x94,0x08,0xb7,0x04,0x24,0xc8,0x1a,0x30,0x4a,0x1d,0x00,0xb7,0x01,0x2d },
+ 16, 0xa480, 0, {0xc0,0x88,0x70,0x06,0x1c,0x00,0x82,0x00,0x21,0x80,0x4b,0x76,0x12,0xdc,0x00,0x87 },
+ 16, 0xa490, 0, {0x00,0x29,0x40,0x8b,0x40,0x02,0x10,0x00,0xbc,0x00,0x20,0x01,0x28,0x70,0x03,0xb2 },
+ 16, 0xa4a0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9a,0x00,0xb3,0x90,0x2d,0xe4 },
+ 16, 0xa4b0, 0, {0x09,0x79,0x02,0x1e,0x80,0xa7,0x80,0x2c,0xe8,0x19,0xf8,0x12,0x5e,0x01,0x87,0x80 },
+ 16, 0xa4c0, 0, {0x25,0xe0,0x4b,0x78,0x06,0xd2,0x00,0x97,0x80,0x21,0x62,0x0b,0x3a,0x02,0x1e,0x00 },
+ 16, 0xa4d0, 0, {0xb7,0x86,0x29,0xf0,0x08,0x68,0x06,0xe0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa4e0, 0, {0x48,0x14,0xcf,0xc0,0xb3,0x00,0x24,0xc0,0x8a,0x30,0x32,0x0c,0x00,0xb3,0x08,0x2c },
+ 16, 0xa4f0, 0, {0xc0,0x08,0x30,0x12,0x0e,0x20,0x83,0x00,0x24,0xf1,0x0b,0x30,0x06,0xce,0x00,0x83 },
+ 16, 0xa500, 0, {0x90,0x28,0x60,0x0b,0x00,0x2a,0x21,0x80,0xb0,0x08,0x28,0x00,0x08,0x37,0x02,0x92 },
+ 16, 0xa510, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb9,0x00,0xfa,0x00,0x3e,0x80 },
+ 16, 0xa520, 0, {0x4d,0xa0,0x03,0x28,0x00,0xee,0x41,0x3e,0x80,0x0d,0xe0,0x03,0x78,0x00,0x8e,0x40 },
+ 16, 0xa530, 0, {0x27,0xa8,0x0b,0xa0,0x03,0xfb,0x02,0xca,0x82,0x33,0xa0,0x0f,0xa0,0x13,0x29,0x00 },
+ 16, 0xa540, 0, {0xfa,0x40,0x3a,0x80,0x0c,0x6c,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa550, 0, {0x48,0x00,0xc0,0x00,0xf8,0x00,0x3a,0x00,0x0c,0x80,0x03,0xe0,0x08,0xf8,0x00,0x3e },
+ 16, 0xa560, 0, {0x00,0x8f,0x80,0x23,0xa0,0x42,0xf8,0x09,0xba,0x10,0x4f,0x80,0x03,0xe0,0x60,0xf8 },
+ 16, 0xa570, 0, {0x00,0x3e,0x20,0x0f,0xc0,0x03,0xf0,0x00,0xfc,0x00,0x27,0x00,0x8f,0x80,0x03,0x92 },
+ 16, 0xa580, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe5,0x00,0x89,0x00,0x3e,0x40 },
+ 16, 0xa590, 0, {0x6e,0x90,0x03,0xa4,0x08,0xc9,0x00,0x3c,0x40,0x0d,0x90,0x03,0x24,0x10,0xf9,0xa0 },
+ 16, 0xa5a0, 0, {0x32,0x42,0x0c,0x90,0x13,0xc4,0x00,0xc9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xe4,0x40 },
+ 16, 0xa5b0, 0, {0xc9,0x20,0x3e,0x52,0xcf,0x90,0x09,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa5c0, 0, {0x80,0x04,0x66,0x00,0x89,0x04,0x2e,0x40,0x08,0x90,0x02,0x24,0x00,0xd9,0x00,0x3a },
+ 16, 0xa5d0, 0, {0x41,0x08,0x90,0x05,0xa4,0x00,0xb9,0x40,0xa2,0x40,0x0d,0x90,0x02,0xe5,0x46,0x89 },
+ 16, 0xa5e0, 0, {0x00,0x2e,0x40,0x0b,0x90,0x12,0xe5,0x00,0xa9,0xc8,0x2e,0x61,0x8b,0x94,0x42,0x20 },
+ 16, 0xa5f0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x00,0xa9,0x00,0x6c,0x40 },
+ 16, 0xa600, 0, {0x48,0x10,0x22,0x84,0x03,0xa9,0x00,0x2e,0x40,0x09,0x90,0x02,0xe4,0x04,0xb1,0x08 },
+ 16, 0xa610, 0, {0x28,0x40,0x18,0x98,0x02,0xe5,0x00,0x89,0x00,0x2e,0x40,0x0b,0x90,0x02,0xf4,0x20 },
+ 16, 0xa620, 0, {0x8d,0x00,0x2f,0x40,0x0b,0x94,0x42,0x86,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa630, 0, {0x08,0x04,0x04,0x80,0xa1,0x24,0x2c,0x48,0x18,0x12,0x02,0x04,0x80,0xa1,0x00,0x28 },
+ 16, 0xa640, 0, {0x48,0x08,0x10,0x02,0x84,0x00,0x91,0x20,0x20,0x48,0x09,0x12,0x02,0xc4,0x94,0x81 },
+ 16, 0xa650, 0, {0x00,0x2c,0x61,0x0b,0x5a,0x82,0xd4,0xa0,0xa5,0x28,0x2d,0x4a,0x0b,0x90,0x02,0x82 },
+ 16, 0xa660, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x02,0xe8,0x50,0x2e,0x14 },
+ 16, 0xa670, 0, {0x0e,0x85,0x03,0xa1,0x40,0xa8,0x50,0x3e,0x14,0x0d,0x85,0x01,0x81,0x40,0xf8,0x52 },
+ 16, 0xa680, 0, {0x32,0x94,0x0c,0x80,0x13,0xc1,0x42,0xc0,0x51,0x3e,0x00,0x8f,0x82,0x03,0xe0,0x80 },
+ 16, 0xa690, 0, {0xc8,0x20,0x3f,0x08,0x0f,0x80,0x03,0xae,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa6a0, 0, {0x98,0x19,0xf4,0x50,0xd9,0x11,0x3e,0x44,0x8f,0x91,0x43,0xe4,0x40,0xdd,0x00,0x3a },
+ 16, 0xa6b0, 0, {0x44,0x4f,0xd0,0x27,0xb4,0x00,0xfd,0x12,0x3f,0x44,0x4f,0x91,0x43,0xf4,0x40,0xfd },
+ 16, 0xa6c0, 0, {0x00,0x3f,0x41,0x0f,0x92,0x83,0xe4,0xa0,0xf9,0x28,0x3e,0x4a,0x0f,0xd0,0x03,0x66 },
+ 16, 0xa6d0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xf6,0x80,0xe9,0xc0,0x3e,0x78 },
+ 16, 0xa6e0, 0, {0x8f,0x9b,0x03,0xa7,0x80,0xc9,0x40,0x36,0x78,0x0f,0x10,0x23,0xe5,0x04,0xdd,0xa4 },
+ 16, 0xa6f0, 0, {0x33,0x62,0x0f,0xda,0x03,0xf6,0x60,0xc9,0x10,0x33,0x40,0x0e,0x98,0x93,0xe6,0x30 },
+ 16, 0xa700, 0, {0xc9,0xc9,0x32,0x78,0x8c,0xd0,0x0b,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa710, 0, {0x38,0x10,0xe0,0x00,0x88,0xe2,0x2e,0x30,0x0b,0x88,0x42,0x23,0x40,0xa0,0xa1,0x22 },
+ 16, 0xa720, 0, {0x38,0x0b,0x8a,0x02,0xe2,0x80,0xaa,0xe0,0x22,0x30,0x0b,0x80,0x23,0xab,0x02,0x88 },
+ 16, 0xa730, 0, {0xa0,0x2a,0x00,0x0b,0x8c,0x02,0xe3,0x00,0x88,0xe0,0x23,0x38,0x08,0x80,0x02,0x0e },
+ 16, 0xa740, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xa1,0x44,0x28,0x58 },
+ 16, 0xa750, 0, {0x43,0x16,0x22,0x84,0x81,0x81,0x20,0x2c,0x58,0x49,0x10,0x80,0xc4,0x81,0x91,0x48 },
+ 16, 0xa760, 0, {0x6c,0x4a,0x0b,0x14,0x02,0x44,0x84,0x81,0x01,0x60,0x40,0x0a,0x52,0x86,0xd4,0xa0 },
+ 16, 0xa770, 0, {0x85,0x00,0xa1,0x50,0x68,0x90,0x06,0xd2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa780, 0, {0x18,0x05,0xa6,0x00,0x89,0x00,0x2e,0x40,0x0b,0x90,0x02,0x04,0x00,0xa9,0x60,0x22 },
+ 16, 0xa790, 0, {0x40,0x0b,0x95,0x02,0xe4,0x10,0xb1,0x00,0x4e,0x40,0x0b,0x90,0x66,0xac,0x80,0x89 },
+ 16, 0xa7a0, 0, {0x00,0x2a,0x60,0x0b,0x90,0x52,0xf4,0x00,0x85,0x00,0x21,0x40,0x08,0x90,0x02,0xc6 },
+ 16, 0xa7b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe6,0x20,0xe9,0x00,0x3e,0x40 },
+ 16, 0xa7c0, 0, {0x0f,0x90,0x03,0xa4,0x10,0xc9,0x00,0x36,0x40,0x0f,0x94,0x01,0xe5,0x20,0xd9,0x40 },
+ 16, 0xa7d0, 0, {0xba,0x68,0x8f,0x90,0x07,0xe6,0x00,0xc9,0x10,0x32,0x62,0x0e,0x90,0x02,0xe4,0x18 },
+ 16, 0xa7e0, 0, {0xc9,0x00,0x32,0x40,0x0c,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa7f0, 0, {0x28,0x01,0xa4,0x00,0xf9,0x04,0x3e,0x40,0x0b,0x90,0x03,0x64,0x00,0xf9,0x00,0x3e },
+ 16, 0xa800, 0, {0x40,0x8f,0x90,0x03,0xe4,0x00,0xe9,0x02,0x72,0x68,0x0f,0x90,0x03,0xe6,0x00,0xf9 },
+ 16, 0xa810, 0, {0x01,0x3e,0x42,0x0f,0x90,0x03,0xc4,0x02,0xf9,0x04,0x3e,0x40,0x4f,0x90,0x03,0x1a },
+ 16, 0xa820, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0x80,0x02,0xc8,0x00,0x32,0x00 },
+ 16, 0xa830, 0, {0x0c,0x80,0x03,0x60,0x00,0xc8,0x40,0x36,0x00,0x0f,0x84,0x03,0xa0,0x00,0xd8,0x50 },
+ 16, 0xa840, 0, {0xb2,0x10,0x8c,0x81,0x03,0xc1,0x20,0xc8,0x00,0x3e,0x00,0x0f,0xc0,0x13,0xf0,0x04 },
+ 16, 0xa850, 0, {0x4c,0x00,0x3f,0x00,0x0f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa860, 0, {0x28,0x15,0x2a,0x00,0x8a,0x04,0x22,0x81,0x28,0xa0,0x12,0x28,0x00,0x8a,0x01,0x36 },
+ 16, 0xa870, 0, {0x80,0x0b,0xa0,0x10,0x28,0x10,0xce,0x01,0x23,0x81,0x0c,0xa8,0x12,0xfb,0x00,0x8a },
+ 16, 0xa880, 0, {0x01,0x3b,0x80,0x83,0xa0,0x42,0xe8,0x10,0x8a,0x00,0x2f,0x80,0x0b,0x60,0x42,0x0a },
+ 16, 0xa890, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x83,0x00,0xa0,0xc0 },
+ 16, 0xa8a0, 0, {0x18,0xb0,0x00,0xcc,0x00,0x9b,0x00,0x24,0xc0,0x0b,0x30,0x06,0x6c,0x00,0xa3,0x08 },
+ 16, 0xa8b0, 0, {0x28,0xc8,0x09,0x30,0x02,0xcc,0x43,0x8b,0x00,0x2c,0x80,0x0b,0x30,0x02,0xcc,0x02 },
+ 16, 0xa8c0, 0, {0x83,0x01,0x2c,0xc0,0x4b,0x30,0x00,0x4a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa8d0, 0, {0xa0,0x01,0x0c,0x24,0x87,0x94,0x21,0xe4,0x18,0x31,0x02,0xdc,0x80,0x97,0x10,0x25 },
+ 16, 0xa8e0, 0, {0xcd,0x0b,0xf2,0x02,0x7c,0x00,0xa0,0x00,0x28,0xe0,0x18,0x70,0x02,0xdc,0x01,0x87 },
+ 16, 0xa8f0, 0, {0x34,0x29,0x40,0x09,0x40,0x02,0xd0,0x04,0x84,0x04,0x2d,0x00,0x4b,0xd0,0x22,0x68 },
+ 16, 0xa900, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x16,0x00,0xcf,0xa0,0x70,0xe9 },
+ 16, 0xa910, 0, {0x18,0x7b,0x03,0xff,0x40,0x97,0xa0,0x35,0xe8,0x0f,0x74,0x02,0x5e,0x20,0xe4,0x80 },
+ 16, 0xa920, 0, {0x39,0xa0,0x2d,0x78,0x03,0xfe,0x00,0xc7,0x80,0x3d,0xe0,0x5f,0x68,0x43,0xc2,0x00 },
+ 16, 0xa930, 0, {0xc4,0x84,0x1d,0x60,0x0f,0x78,0x03,0x6a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa940, 0, {0x08,0x0d,0xa4,0x00,0x3b,0x00,0x2e,0xd8,0x0f,0xb4,0x03,0x2d,0x8a,0xeb,0x62,0x3a },
+ 16, 0xa950, 0, {0xd0,0x0f,0xb2,0x87,0x0c,0xd0,0xd8,0x00,0x32,0xc0,0x4f,0x90,0x43,0xec,0x00,0xfb },
+ 16, 0xa960, 0, {0x08,0x3e,0x40,0x8f,0x90,0x03,0xfc,0x00,0xff,0x04,0x3f,0x80,0x0f,0x00,0x2b,0x82 },
+ 16, 0xa970, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xff,0xa0,0x3e,0xf4 },
+ 16, 0xa980, 0, {0x0e,0xb8,0x03,0xee,0x08,0x4b,0xf0,0x7f,0xf4,0x0c,0xf9,0x23,0xee,0x48,0x78,0x90 },
+ 16, 0xa990, 0, {0x32,0xe4,0x0c,0xf9,0x03,0xfe,0x00,0xff,0x80,0x3f,0xe4,0x1c,0x79,0x03,0x2e,0x40 },
+ 16, 0xa9a0, 0, {0xff,0x80,0x33,0xe0,0x2c,0x78,0x07,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa9b0, 0, {0xa8,0x11,0x94,0x00,0xb3,0x00,0x0c,0xe5,0x0b,0x38,0x02,0xfe,0x80,0x8f,0x80,0x61 },
+ 16, 0xa9c0, 0, {0xc4,0x28,0x78,0x00,0x4e,0x00,0xf4,0x84,0x25,0xa8,0x0c,0x70,0x02,0xcc,0x04,0xb3 },
+ 16, 0xa9d0, 0, {0x90,0x25,0x40,0x0c,0x41,0x83,0x52,0x40,0xb4,0x10,0xa3,0x00,0x0c,0x52,0x03,0x6a },
+ 16, 0xa9e0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x00,0xb7,0x21,0x6d,0xc8 },
+ 16, 0xa9f0, 0, {0x4b,0x70,0x02,0xdc,0x42,0xa7,0x31,0x29,0xc4,0x08,0x72,0x02,0xdc,0x00,0xb7,0x28 },
+ 16, 0xaa00, 0, {0x24,0x80,0x08,0x70,0x06,0xd4,0x20,0xb7,0x01,0x2d,0xc1,0x08,0x60,0x02,0x50,0x80 },
+ 16, 0xaa10, 0, {0xb4,0x08,0x21,0x62,0x09,0x74,0x06,0x80,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaa20, 0, {0x20,0x14,0xc7,0x04,0xb3,0x00,0x2c,0xc0,0x0b,0xb0,0x02,0xcc,0x00,0xa3,0x02,0x60 },
+ 16, 0xaa30, 0, {0xc0,0x08,0x38,0x02,0x4e,0x44,0xa0,0xc0,0x24,0x91,0x08,0x30,0x02,0xc0,0x00,0xb3 },
+ 16, 0xaa40, 0, {0x00,0x24,0x60,0x08,0x1c,0x02,0x4c,0x88,0xb3,0xc0,0x20,0xa0,0x08,0x00,0x0a,0x88 },
+ 16, 0xaa50, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x00,0xff,0x00,0x2f,0xc0 },
+ 16, 0xaa60, 0, {0x4f,0xf0,0x13,0xfc,0x08,0xe7,0x8a,0x3f,0xc0,0x0c,0xf5,0xc2,0xfe,0x10,0xbb,0xc0 },
+ 16, 0xaa70, 0, {0x32,0xd4,0x0c,0x30,0x13,0xe3,0x04,0xbf,0x00,0x2e,0x62,0x08,0xb9,0x02,0x6e,0x00 },
+ 16, 0xaa80, 0, {0xfb,0x01,0x32,0xa4,0x4d,0x94,0x02,0xab,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaa90, 0, {0x80,0x00,0xec,0x60,0xfb,0x00,0x1e,0xc0,0x0f,0xb0,0x13,0xec,0x00,0x5b,0x00,0x3a },
+ 16, 0xaaa0, 0, {0xc0,0x0f,0xb0,0x41,0xec,0x00,0x7b,0x45,0xba,0x40,0x2e,0xb0,0x15,0xe0,0x01,0xfb },
+ 16, 0xaab0, 0, {0x00,0x3e,0x50,0x0e,0xc0,0x03,0xf0,0x40,0xfc,0x20,0x3f,0x50,0x8f,0x90,0x01,0x60 },
+ 16, 0xaac0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf4,0x00,0xff,0x00,0x3f,0xc0 },
+ 16, 0xaad0, 0, {0x8f,0xf0,0x03,0x1c,0x02,0xcf,0x00,0x36,0xc0,0x0d,0xf0,0x03,0x7c,0x00,0x7f,0x2a },
+ 16, 0xaae0, 0, {0x3f,0x80,0x0f,0xf8,0x13,0x90,0x21,0xcf,0x00,0x3f,0x62,0x0c,0xe0,0x03,0x30,0x00 },
+ 16, 0xaaf0, 0, {0xf8,0x00,0x3f,0x00,0x0f,0xd0,0x03,0x80,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xab00, 0, {0x81,0x04,0x64,0x11,0xbb,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0x2c,0x00,0xdb,0x04,0x32 },
+ 16, 0xab10, 0, {0xc0,0x0e,0xb0,0x02,0xec,0x00,0xbb,0x84,0x2e,0x40,0x0b,0xb9,0x42,0x22,0x42,0x8b },
+ 16, 0xab20, 0, {0x01,0x2c,0x72,0x0a,0x90,0x42,0x2c,0x00,0xbb,0x00,0x2e,0xc2,0x8f,0x88,0x06,0xe0 },
+ 16, 0xab30, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x24,0x00,0xbb,0x00,0x6e,0xc0 },
+ 16, 0xab40, 0, {0x48,0xb0,0x42,0x2c,0x00,0x8b,0x00,0x26,0xc0,0x0a,0xb0,0x12,0xec,0x00,0xbb,0x40 },
+ 16, 0xab50, 0, {0x2e,0xc8,0x0b,0xb0,0x12,0x2c,0x00,0x8b,0x00,0x2e,0x48,0x0a,0x30,0x02,0x6c,0x00 },
+ 16, 0xab60, 0, {0xbb,0x00,0x2e,0x80,0x4b,0x98,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xab70, 0, {0x08,0x04,0x04,0x00,0xb3,0x00,0x6c,0xc2,0x4b,0x31,0x02,0x0c,0x50,0x9b,0x20,0x20 },
+ 16, 0xab80, 0, {0xc0,0x0a,0x32,0x12,0xcc,0x80,0xb3,0x00,0x6c,0x0c,0x0b,0x31,0x02,0x0c,0x42,0x83 },
+ 16, 0xab90, 0, {0x08,0x2e,0x40,0x0a,0x00,0x02,0x00,0x80,0xb0,0x00,0x2c,0x41,0x0b,0x10,0x02,0x42 },
+ 16, 0xaba0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x64,0x00,0xbb,0x40,0x3f,0xcc },
+ 16, 0xabb0, 0, {0x0e,0xf0,0x83,0x3d,0xa0,0xcf,0x20,0x37,0xc0,0x0c,0xf7,0xc3,0xfd,0x48,0xf3,0x00 },
+ 16, 0xabc0, 0, {0x3e,0x88,0x0f,0xb4,0x13,0xa5,0x00,0x8f,0x30,0x3e,0x40,0x0c,0xa0,0x03,0x60,0x80 },
+ 16, 0xabd0, 0, {0xf8,0x00,0x3e,0x00,0x0f,0x90,0x23,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xabe0, 0, {0xa0,0x19,0xf4,0x00,0xff,0x29,0x3f,0xc9,0x0f,0xf0,0x13,0xfc,0x94,0xef,0x12,0x3b },
+ 16, 0xabf0, 0, {0xc0,0x8e,0xb2,0x07,0xfd,0x04,0xff,0x10,0x3f,0x0c,0x0f,0xf0,0x03,0xf0,0x00,0xfb },
+ 16, 0xac00, 0, {0x20,0x3d,0x40,0x0f,0xd0,0x43,0xfc,0x40,0xff,0x04,0x3f,0xc0,0x0e,0xc0,0x43,0xe8 },
+ 16, 0xac10, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0xa2,0xc7,0x20,0x3f,0x24 },
+ 16, 0xac20, 0, {0x0c,0xf0,0x03,0x3c,0x80,0xcc,0x09,0x33,0xd1,0x0c,0xf1,0x23,0xfc,0x20,0xdf,0x36 },
+ 16, 0xac30, 0, {0x3f,0xc0,0x0e,0x48,0x03,0xfe,0x00,0xff,0x80,0x37,0xe4,0x0d,0x78,0x03,0x11,0xa0 },
+ 16, 0xac40, 0, {0xcf,0x00,0x37,0xc8,0x0c,0xf0,0x03,0x30,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xac50, 0, {0x80,0x10,0xff,0x00,0x8f,0xd1,0x2e,0x08,0x0d,0xb6,0x12,0x3d,0x45,0xf9,0x64,0x27 },
+ 16, 0xac60, 0, {0xd0,0x88,0xba,0x14,0xcc,0x04,0x8f,0x40,0x23,0xf0,0x0b,0x88,0x02,0x2e,0x04,0xbb },
+ 16, 0xac70, 0, {0x80,0xae,0xc0,0x08,0xb8,0x0a,0x21,0x00,0x88,0xd0,0x22,0x20,0x28,0xb0,0x02,0x20 },
+ 16, 0xac80, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0x93,0x00,0x2e,0x00 },
+ 16, 0xac90, 0, {0x0a,0x34,0x82,0x8c,0xa0,0xa0,0x08,0x24,0xd8,0x09,0x31,0x02,0xcc,0x20,0xb3,0x32 },
+ 16, 0xaca0, 0, {0x28,0xd0,0x4a,0x80,0x02,0xcc,0x0c,0xbb,0x00,0x22,0x40,0x89,0xb0,0x02,0x60,0x80 },
+ 16, 0xacb0, 0, {0x93,0x00,0x24,0xd0,0x0b,0x30,0x02,0xa2,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xacc0, 0, {0xc0,0x11,0xac,0x00,0x9b,0x00,0x2e,0x20,0x09,0xb0,0x4a,0x2c,0x02,0xa0,0x00,0x06 },
+ 16, 0xacd0, 0, {0xc0,0x09,0xb0,0x00,0xec,0x00,0xab,0x00,0x2a,0xc0,0x0b,0x88,0x02,0x6c,0x00,0xbb },
+ 16, 0xace0, 0, {0x20,0x2a,0xe2,0x41,0xb8,0x2a,0x60,0x0a,0x98,0x00,0x26,0x00,0x0b,0xb0,0x02,0xb8 },
+ 16, 0xacf0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x08,0xdb,0x02,0x3e,0x20 },
+ 16, 0xad00, 0, {0x4c,0xb0,0x03,0x2c,0x02,0x8b,0x20,0x12,0xc0,0x29,0xb0,0x12,0xec,0x00,0xfb,0x00 },
+ 16, 0xad10, 0, {0x3a,0xc0,0x0e,0x88,0x03,0xed,0x20,0xfb,0xc8,0x34,0xf0,0x0d,0xba,0x03,0x47,0x60 },
+ 16, 0xad20, 0, {0xc9,0x00,0x36,0x40,0x0f,0xb0,0x0b,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xad30, 0, {0xe0,0x01,0x9c,0x00,0xef,0x00,0x0f,0x00,0x0f,0x30,0x00,0xfc,0x00,0xdf,0x90,0xbb },
+ 16, 0xad40, 0, {0xc0,0xce,0xf0,0x03,0xfc,0x04,0xcb,0x00,0x17,0xc0,0x0f,0xc0,0x03,0xbc,0x84,0xff },
+ 16, 0xad50, 0, {0x00,0x37,0xc0,0x0e,0xd0,0x63,0xb8,0x00,0xea,0x00,0x3a,0x80,0x0c,0x30,0x03,0x70 },
+ 16, 0xad60, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xfb,0x02,0x32,0x00 },
+ 16, 0xad70, 0, {0x0f,0xb0,0x53,0x2c,0x00,0xfa,0x00,0x32,0xc0,0x8f,0xb0,0x07,0x2c,0x00,0xfb,0x00 },
+ 16, 0xad80, 0, {0xb2,0xc0,0x0f,0x80,0x07,0xac,0x80,0xdb,0x24,0x7e,0xd0,0x0e,0xb0,0x23,0x74,0x04 },
+ 16, 0xad90, 0, {0xdd,0x08,0xb5,0x40,0x0c,0xb0,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xada0, 0, {0xc8,0x05,0x3c,0x00,0xbf,0xc0,0xa0,0x00,0x1b,0xf0,0x02,0x3f,0x60,0xea,0x50,0x23 },
+ 16, 0xadb0, 0, {0xc0,0x08,0xfa,0x07,0xfc,0x00,0xdf,0x00,0x63,0xc0,0x48,0x18,0x02,0x2d,0x00,0xb3 },
+ 16, 0xadc0, 0, {0x00,0x6e,0xc0,0x0d,0x3a,0x03,0x24,0x00,0x82,0x80,0x32,0x80,0x0d,0xf0,0x03,0x32 },
+ 16, 0xadd0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x14,0xb3,0x59,0x20,0x80 },
+ 16, 0xade0, 0, {0x09,0x30,0x02,0x2e,0x05,0xb0,0x44,0x2e,0xc0,0x09,0x34,0x82,0xec,0x00,0xab,0x04 },
+ 16, 0xadf0, 0, {0x20,0xc0,0x09,0x21,0xb2,0x8e,0x04,0x93,0xc0,0x24,0xc0,0x0a,0x18,0x06,0x4c,0x00 },
+ 16, 0xae00, 0, {0x92,0x50,0x20,0xc0,0x08,0x30,0x02,0x70,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xae10, 0, {0x20,0x01,0x1e,0x00,0xb7,0x80,0x61,0xe0,0x0b,0x78,0x0a,0x5e,0x01,0xb1,0xa0,0x2d },
+ 16, 0xae20, 0, {0xe0,0x0a,0x78,0x02,0x5e,0x00,0x07,0x90,0x21,0xe0,0x18,0xc8,0x02,0x1e,0x00,0xb7 },
+ 16, 0xae30, 0, {0x80,0x2d,0xe0,0x8a,0xd8,0x02,0x3e,0xc0,0x85,0x80,0x21,0x20,0x19,0x78,0x22,0x00 },
+ 16, 0xae40, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xf3,0x94,0x20,0x10 },
+ 16, 0xae50, 0, {0x4b,0x30,0x07,0x0c,0x00,0xf3,0x00,0x3e,0xc8,0x0f,0x30,0x03,0xcc,0x00,0x23,0x10 },
+ 16, 0xae60, 0, {0x00,0xcb,0x05,0x20,0x02,0x8c,0x60,0x93,0x0a,0x2e,0xc4,0x0a,0x01,0x07,0x4c,0x80 },
+ 16, 0xae70, 0, {0xd2,0x01,0x30,0xc0,0x2c,0x30,0x0b,0x5a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xae80, 0, {0x40,0x1d,0xbc,0x00,0xff,0x01,0x0f,0x40,0x0f,0xf0,0x13,0xbc,0x00,0xef,0x26,0x73 },
+ 16, 0xae90, 0, {0xc2,0x0c,0xb0,0x83,0xbc,0x40,0xff,0x18,0x3d,0xc0,0x4a,0xc1,0x03,0xfc,0x00,0xfb },
+ 16, 0xaea0, 0, {0x12,0x3f,0xc4,0x4d,0xc1,0x0b,0xfc,0x81,0xfd,0x00,0x3f,0x20,0x0f,0xf0,0x03,0xd0 },
+ 16, 0xaeb0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x20,0xcb,0x48,0x3e,0x00 },
+ 16, 0xaec0, 0, {0x0c,0xb0,0x03,0x2d,0x20,0xe9,0x80,0xfa,0xc8,0x0d,0xb0,0x03,0xee,0x00,0xdb,0x24 },
+ 16, 0xaed0, 0, {0x76,0xf3,0x8e,0x80,0x33,0xec,0x44,0xeb,0x10,0x3e,0xc0,0x0f,0x90,0x03,0xe8,0x04 },
+ 16, 0xaee0, 0, {0xdc,0x00,0xb3,0x61,0x0c,0xb0,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaef0, 0, {0x48,0x11,0x8d,0x00,0x87,0x20,0x2f,0x01,0x28,0x70,0x02,0x0c,0x84,0x8d,0x04,0x31 },
+ 16, 0xaf00, 0, {0xcc,0xc9,0x72,0x02,0xdd,0x00,0x37,0x33,0x21,0xd8,0x08,0x40,0x02,0xdc,0x00,0xb7 },
+ 16, 0xaf10, 0, {0x20,0x3d,0xc0,0x09,0x50,0x22,0xf0,0x00,0x97,0x00,0x21,0x80,0x0a,0xfc,0x02,0x92 },
+ 16, 0xaf20, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x1e,0x82,0x87,0xb0,0x2d,0x20 },
+ 16, 0xaf30, 0, {0x08,0x39,0x02,0x1e,0x41,0xa7,0x80,0x24,0xe0,0x09,0x7a,0x32,0x8e,0x82,0x07,0xa0 },
+ 16, 0xaf40, 0, {0x25,0xe0,0x8b,0x48,0x02,0x1e,0x00,0xa7,0xe1,0x2d,0xe0,0x4b,0x58,0x00,0xda,0x00 },
+ 16, 0xaf50, 0, {0xa0,0x80,0x24,0x60,0x08,0x7a,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaf60, 0, {0x48,0x14,0xcc,0x00,0x83,0x00,0x2c,0x00,0x08,0x30,0x02,0x8c,0x00,0x93,0x00,0x22 },
+ 16, 0xaf70, 0, {0xc1,0x09,0x30,0x42,0xcc,0x00,0x83,0x00,0x60,0xc0,0x08,0x1a,0x02,0xce,0x04,0xb3 },
+ 16, 0xaf80, 0, {0xe0,0x28,0xa0,0x09,0x1c,0x82,0x4b,0x08,0xa3,0x80,0x24,0xa0,0x2a,0x30,0x02,0x9a },
+ 16, 0xaf90, 0, {0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xca,0x00,0x2f,0x88 },
+ 16, 0xafa0, 0, {0x0c,0xa0,0x13,0x28,0x00,0xee,0x00,0x2e,0x80,0x2d,0xa0,0x03,0xe8,0x00,0xda,0x00 },
+ 16, 0xafb0, 0, {0x76,0x80,0x0e,0xe8,0x03,0xbb,0x80,0xee,0x40,0x2f,0xa2,0x8f,0xe6,0x03,0xeb,0x86 },
+ 16, 0xafc0, 0, {0xfa,0x80,0x37,0x82,0x0c,0x20,0x07,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xafd0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x40,0x1e,0x00,0x0f,0x80,0x0b,0x61,0x00,0xe8,0xc0,0x3a },
+ 16, 0xafe0, 0, {0x00,0x0e,0x80,0x03,0xe0,0x01,0xf8,0x00,0x7e,0x10,0x1e,0x81,0x03,0xe0,0x08,0xf8 },
+ 16, 0xaff0, 0, {0x00,0x3e,0x00,0x0d,0x80,0x03,0xc0,0x28,0xdc,0x50,0x3b,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0xb000, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc4,0x02,0xc9,0x00,0x3e,0x42 },
+ 16, 0xb010, 0, {0x0f,0x10,0x03,0xa6,0x00,0xc9,0x01,0x3a,0x40,0x0e,0x94,0x01,0xe4,0x10,0xf1,0x04 },
+ 16, 0xb020, 0, {0x32,0x40,0x0f,0x9a,0x23,0x20,0x60,0xf8,0x04,0x0a,0x42,0x0e,0x90,0x13,0x24,0x00 },
+ 16, 0xb030, 0, {0xc1,0x00,0x32,0x40,0x0f,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb040, 0, {0x80,0x04,0x67,0x08,0xa9,0x00,0x6e,0x40,0x08,0x90,0x02,0x27,0x82,0x89,0x00,0x26 },
+ 16, 0xb050, 0, {0x40,0x08,0x9c,0x03,0xa4,0x10,0xb9,0x00,0x36,0x40,0x9b,0x1c,0x1a,0x23,0x04,0xb8 },
+ 16, 0xb060, 0, {0x00,0x3a,0x40,0x0e,0x10,0x02,0x24,0x02,0xc9,0xa0,0xa2,0x40,0x0b,0x90,0x0a,0x20 },
+ 16, 0xb070, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x25,0x80,0x89,0x04,0x2c,0x40 },
+ 16, 0xb080, 0, {0x08,0x90,0x02,0x84,0x81,0x99,0x40,0x2e,0x40,0x1a,0x90,0x06,0xe4,0x01,0xb9,0x00 },
+ 16, 0xb090, 0, {0xa6,0x41,0x1b,0x90,0x82,0x21,0x00,0xb8,0x10,0x2e,0x40,0x0a,0x92,0x0a,0xa4,0x01 },
+ 16, 0xb0a0, 0, {0x8f,0x22,0x23,0x40,0x0b,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb0b0, 0, {0x08,0x04,0x04,0x80,0xa3,0x20,0x2c,0x41,0x09,0x12,0x02,0x04,0x80,0x81,0x20,0x24 },
+ 16, 0xb0c0, 0, {0x48,0x0a,0x36,0x02,0xc4,0x80,0xb1,0x20,0x04,0xc8,0x4b,0x14,0x02,0x05,0x00,0xb1 },
+ 16, 0xb0d0, 0, {0x05,0x28,0x50,0x0a,0x90,0x02,0x05,0x02,0x85,0x00,0x21,0x40,0x0b,0x12,0x02,0x02 },
+ 16, 0xb0e0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xc8,0x00,0x6e,0x14 },
+ 16, 0xb0f0, 0, {0x2c,0x85,0x02,0xa1,0x40,0xc8,0x50,0x3a,0x14,0x0e,0x80,0x02,0xe1,0x40,0xb0,0x50 },
+ 16, 0xb100, 0, {0x32,0x00,0x0b,0x80,0x03,0x20,0x00,0xfa,0x00,0x3e,0x00,0x0e,0x80,0x03,0xa0,0x02 },
+ 16, 0xb110, 0, {0xc8,0x00,0x13,0x00,0x0f,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb120, 0, {0x98,0x1d,0xe4,0x48,0xf9,0x14,0x3f,0x40,0x0c,0x91,0x03,0xe4,0x42,0xfd,0x10,0x36 },
+ 16, 0xb130, 0, {0x44,0x0d,0x91,0x23,0xa4,0x48,0xf9,0x11,0x38,0x44,0x0f,0xd0,0x03,0xe5,0x14,0x39 },
+ 16, 0xb140, 0, {0x42,0x7b,0x40,0x8e,0xd0,0x01,0xf5,0x00,0xa9,0x40,0x3e,0x50,0x07,0x96,0x83,0xe6 },
+ 16, 0xb150, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xf6,0x80,0xdd,0xae,0x3a,0x50 },
+ 16, 0xb160, 0, {0x0d,0x9a,0x0b,0x76,0x80,0xcf,0x88,0x32,0x70,0x2d,0xda,0x03,0xa7,0x01,0xe9,0x92 },
+ 16, 0xb170, 0, {0x37,0x68,0x0d,0x94,0x03,0xe7,0x00,0xed,0xa0,0x3a,0x50,0x0f,0xd0,0x03,0xe7,0x02 },
+ 16, 0xb180, 0, {0xcd,0x80,0x33,0x68,0x0c,0xd8,0x83,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb190, 0, {0x38,0x10,0xe1,0x00,0x88,0x40,0x20,0x20,0x0c,0x8c,0x02,0x23,0x00,0x88,0xe0,0x22 },
+ 16, 0xb1a0, 0, {0x30,0x08,0x84,0x02,0xe3,0x00,0xb8,0xe0,0x22,0x14,0x8d,0x88,0x02,0xe3,0x00,0xb8 },
+ 16, 0xb1b0, 0, {0x50,0x2e,0xa8,0x8b,0x80,0x22,0xe3,0x48,0x88,0x50,0x22,0x00,0x08,0x8c,0x02,0x0e },
+ 16, 0xb1c0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x40,0x91,0x00,0x2a,0x48 },
+ 16, 0xb1d0, 0, {0x09,0x14,0x82,0x05,0x20,0x81,0x08,0x20,0x58,0x09,0x11,0x02,0x85,0x88,0xb1,0x40 },
+ 16, 0xb1e0, 0, {0xa0,0x40,0x08,0x12,0x02,0xc5,0x80,0xa1,0x00,0x28,0x40,0x0b,0x18,0x02,0xc4,0x84 },
+ 16, 0xb1f0, 0, {0xa1,0x00,0x24,0x50,0x08,0x10,0x92,0x03,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb200, 0, {0x18,0x15,0xac,0x10,0x9b,0x00,0x22,0x40,0x08,0x90,0x02,0x04,0x06,0x89,0x04,0x20 },
+ 16, 0xb210, 0, {0x40,0x09,0x90,0x02,0xe4,0x01,0xb9,0x02,0x22,0x41,0x89,0xa0,0x82,0xe0,0xa0,0xb9 },
+ 16, 0xb220, 0, {0x28,0x2e,0x44,0x0b,0xb0,0x02,0xe4,0x02,0xb9,0x00,0x26,0x40,0x28,0x10,0x02,0x06 },
+ 16, 0xb230, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xd9,0x00,0x38,0x40 },
+ 16, 0xb240, 0, {0x0d,0x90,0x03,0x24,0x00,0xc9,0xa0,0xa2,0x40,0x8d,0x90,0x03,0xa4,0x00,0xf9,0x00 },
+ 16, 0xb250, 0, {0x36,0x40,0x0c,0x84,0x13,0xe2,0x00,0xe9,0x00,0x3a,0x50,0x0f,0x9c,0x02,0xe6,0x84 },
+ 16, 0xb260, 0, {0xe9,0x00,0xb6,0x40,0x0c,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb270, 0, {0x28,0x01,0xa4,0x00,0xe1,0x00,0x3e,0x68,0x0e,0x10,0x03,0xa4,0x00,0xf1,0x28,0x3a },
+ 16, 0xb280, 0, {0x40,0x0e,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x42,0x0f,0x80,0x23,0xe2,0x00,0xf9 },
+ 16, 0xb290, 0, {0x00,0x3e,0x40,0x0f,0x91,0x23,0xe4,0x40,0xc1,0x00,0x3a,0x40,0x0f,0x90,0x0b,0xca },
+ 16, 0xb2a0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0x80,0x00,0xc8,0x00,0x32,0x00 },
+ 16, 0xb2b0, 0, {0x0c,0x80,0x03,0xa0,0x20,0xc8,0x40,0x3e,0x00,0x0e,0x81,0x63,0x60,0x00,0xf0,0x04 },
+ 16, 0xb2c0, 0, {0x3c,0x01,0x0c,0x84,0x03,0xe0,0x00,0xc8,0x00,0x3e,0x00,0x0e,0x80,0x03,0xc1,0x00 },
+ 16, 0xb2d0, 0, {0xd8,0x10,0x32,0x00,0x0c,0x80,0x23,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb2e0, 0, {0x28,0x05,0x38,0x60,0x8e,0x00,0x22,0x80,0x0a,0xa0,0x02,0x38,0x80,0xbe,0x00,0x3a },
+ 16, 0xb2f0, 0, {0x80,0x08,0xe0,0x02,0x28,0x00,0xba,0x00,0x23,0x98,0x18,0xec,0x02,0xf8,0x20,0xae },
+ 16, 0xb300, 0, {0x00,0x22,0x80,0x0b,0xe4,0x82,0xe8,0x02,0xce,0x44,0x28,0x80,0x0d,0xa0,0x0a,0x0a },
+ 16, 0xb310, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x40,0x00,0x82,0x04,0xa0,0xc0 },
+ 16, 0xb320, 0, {0x09,0x30,0x02,0x8e,0x04,0x83,0x50,0x6c,0xc0,0x0a,0x30,0x86,0x0c,0x00,0xb3,0x00 },
+ 16, 0xb330, 0, {0x28,0x30,0x0a,0x36,0x12,0xcc,0x80,0x81,0x00,0x24,0xc0,0x0b,0x32,0x06,0xcc,0x00 },
+ 16, 0xb340, 0, {0x80,0x88,0x64,0x60,0x28,0x10,0x02,0x02,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb350, 0, {0xa0,0x01,0x10,0x12,0x84,0x40,0x21,0xc8,0x0a,0x72,0x02,0x10,0x00,0xb7,0x00,0x2d },
+ 16, 0xb360, 0, {0xcc,0x08,0x38,0x12,0x1c,0x00,0xb3,0x30,0x20,0x00,0x08,0x71,0x82,0xfe,0x00,0xa4 },
+ 16, 0xb370, 0, {0x80,0x21,0xc8,0x0b,0x70,0x02,0xdc,0x01,0x87,0x00,0x2c,0x42,0x09,0x51,0x02,0x20 },
+ 16, 0xb380, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x12,0x00,0xc2,0x80,0x31,0xf8 },
+ 16, 0xb390, 0, {0x4c,0xfc,0x13,0x92,0x09,0xc7,0x80,0x3c,0xed,0x1e,0x78,0x27,0x1e,0x00,0xf7,0x8c },
+ 16, 0xb3a0, 0, {0x79,0x20,0x08,0x7a,0x03,0xde,0x81,0x84,0x80,0x3d,0xe0,0x0e,0x78,0x03,0xfe,0x20 },
+ 16, 0xb3b0, 0, {0xc5,0x81,0x35,0x60,0x2c,0x58,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb3c0, 0, {0x08,0x1d,0x80,0x00,0xf8,0x04,0x3e,0xd0,0x0f,0xb0,0x13,0xe0,0x00,0xfb,0x02,0x3a },
+ 16, 0xb3d0, 0, {0xd0,0x0f,0xa0,0x0b,0xac,0x40,0xfb,0x00,0x3a,0x00,0x2f,0xb0,0x03,0xcc,0x00,0xf0 },
+ 16, 0xb3e0, 0, {0x00,0x3a,0xc4,0x0f,0xb0,0x03,0xfc,0x41,0xf3,0x00,0x3a,0x40,0x0f,0x50,0x93,0xc2 },
+ 16, 0xb3f0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xcc,0x81,0x3f,0xfc },
+ 16, 0xb400, 0, {0x1c,0xf8,0x03,0x76,0x40,0xef,0x92,0x3f,0xe4,0x8c,0xf8,0x03,0xbf,0x10,0xff,0x80 },
+ 16, 0xb410, 0, {0xb3,0x20,0x0e,0xf9,0x13,0xfe,0x24,0xfd,0x94,0x37,0xe0,0x1c,0xf9,0x03,0xee,0x00 },
+ 16, 0xb420, 0, {0xcd,0x80,0xb3,0xe0,0x0c,0x58,0x02,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb430, 0, {0xa8,0x11,0x94,0x40,0x80,0x00,0x2f,0xc4,0x08,0x72,0x02,0xdd,0x08,0xd7,0x00,0x2d },
+ 16, 0xb440, 0, {0xcc,0x08,0xde,0x03,0x5c,0x00,0xb7,0x04,0x21,0x80,0xc8,0x70,0x83,0xdc,0x00,0xb4 },
+ 16, 0xb450, 0, {0xa0,0x2f,0xc0,0x0c,0x70,0x02,0xde,0x80,0x87,0x00,0x21,0xc2,0x0a,0x51,0x42,0x2a },
+ 16, 0xb460, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x84,0x00,0x2d,0xc8 },
+ 16, 0xb470, 0, {0x48,0x70,0x02,0x54,0x0c,0xa7,0x00,0x2c,0xc0,0x89,0x72,0x02,0x5c,0x00,0xb3,0x10 },
+ 16, 0xb480, 0, {0x20,0x00,0x0a,0x70,0x06,0xdc,0x00,0xb4,0x20,0x2d,0xc0,0x08,0x70,0x02,0xdc,0x80 },
+ 16, 0xb490, 0, {0x93,0x00,0x20,0xc0,0x08,0x50,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb4a0, 0, {0x20,0x14,0xc0,0x00,0x80,0x00,0x2e,0xc0,0x08,0x30,0x02,0xc4,0x08,0xa2,0x42,0x2c },
+ 16, 0xb4b0, 0, {0xc1,0x09,0x20,0x02,0x4c,0x00,0xb3,0x00,0x20,0x80,0x08,0x3c,0x22,0x8c,0x20,0xb0 },
+ 16, 0xb4c0, 0, {0x08,0x2e,0xe0,0x08,0x38,0x10,0xcf,0x0a,0x93,0x40,0xa0,0xf0,0x0a,0x10,0x02,0x08 },
+ 16, 0xb4d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa8,0x00,0xc1,0x00,0x3f,0xc0 },
+ 16, 0xb4e0, 0, {0x2c,0xf0,0x03,0x68,0x00,0xaa,0x00,0x3f,0xc0,0x2d,0x80,0x03,0x7c,0x00,0xff,0x00 },
+ 16, 0xb4f0, 0, {0x32,0x00,0x0e,0xb0,0x12,0xed,0x24,0xfa,0x08,0x27,0xc8,0x10,0xb8,0xa2,0xff,0x60 },
+ 16, 0xb500, 0, {0x98,0xa0,0xa2,0xe0,0x0c,0x50,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb510, 0, {0x80,0x00,0xc9,0x06,0xf8,0x41,0x3e,0xc0,0x0f,0xb0,0x03,0xe9,0x10,0x5a,0x20,0x3e },
+ 16, 0xb520, 0, {0xc0,0x0e,0x80,0x03,0xec,0x00,0xf3,0x00,0x7e,0x01,0x0f,0xb0,0x93,0xed,0x00,0xf8 },
+ 16, 0xb530, 0, {0x40,0x3e,0xc0,0x0e,0xb0,0x03,0xfc,0x00,0xe3,0x08,0x3c,0xc2,0x0f,0xd0,0x13,0xe0 },
+ 16, 0xb540, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf3,0x02,0xcc,0x00,0x3b,0xc2 },
+ 16, 0xb550, 0, {0x0c,0xf0,0x23,0xae,0x40,0xdf,0x81,0x39,0xc0,0x06,0xd0,0x03,0xfc,0x00,0xff,0x04 },
+ 16, 0xb560, 0, {0x31,0x41,0x0c,0xf0,0x03,0xfc,0x00,0xcc,0xa0,0x37,0xc2,0x0c,0xf0,0x03,0x7c,0x04 },
+ 16, 0xb570, 0, {0xcd,0x00,0x33,0xf0,0x0c,0xd0,0x03,0x08,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb580, 0, {0x81,0x04,0x60,0x00,0x88,0x80,0x22,0xc0,0x0a,0xb0,0x02,0xe9,0x00,0xab,0x44,0x2e },
+ 16, 0xb590, 0, {0xc0,0x08,0x88,0x02,0xec,0x00,0xbb,0x00,0xa2,0x70,0x0a,0xb4,0x02,0xcc,0x00,0xa0 },
+ 16, 0xb5a0, 0, {0x20,0x22,0xc0,0x0f,0xbc,0x02,0xcc,0x0a,0x8b,0x80,0xa2,0xc0,0x0d,0x90,0x02,0x20 },
+ 16, 0xb5b0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x20,0x00,0x89,0x80,0x2a,0xc0 },
+ 16, 0xb5c0, 0, {0x08,0xb0,0x02,0xcc,0x06,0x88,0x60,0x2e,0xc0,0x0a,0x98,0x06,0xec,0x01,0xbb,0x00 },
+ 16, 0xb5d0, 0, {0x22,0x31,0x02,0xb2,0x02,0xec,0xa0,0x8a,0x00,0x26,0xc0,0x48,0xa8,0x02,0xec,0x04 },
+ 16, 0xb5e0, 0, {0xa9,0x80,0x22,0x40,0x08,0x90,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb5f0, 0, {0x08,0x04,0x00,0x00,0x80,0x00,0x20,0xc0,0x0a,0x30,0x42,0xcc,0x00,0x80,0x01,0x2c },
+ 16, 0xb600, 0, {0xc0,0x1a,0x12,0x02,0xcc,0x00,0xb3,0x00,0x20,0x00,0x4a,0x30,0x02,0xcc,0x00,0xa0 },
+ 16, 0xb610, 0, {0x00,0x08,0xc0,0x0b,0x20,0x06,0xec,0xa0,0xa3,0x00,0xa0,0x40,0x29,0x10,0x00,0x02 },
+ 16, 0xb620, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xc8,0x50,0x3b,0xc0 },
+ 16, 0xb630, 0, {0x0c,0xb0,0x03,0xac,0x00,0xc9,0x00,0x3b,0xc0,0x0e,0x92,0x83,0xfc,0x00,0xbf,0x00 },
+ 16, 0xb640, 0, {0x12,0x00,0x0c,0xb0,0x03,0xec,0x00,0x88,0x26,0x16,0xc0,0x0c,0x80,0x17,0x5c,0x80 },
+ 16, 0xb650, 0, {0xe9,0x01,0x32,0x40,0x2c,0xd0,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb660, 0, {0xa0,0x1d,0xd0,0x00,0xfc,0x20,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xfc,0x00,0x3f },
+ 16, 0xb670, 0, {0xc0,0x0d,0x80,0x03,0xfc,0x08,0xff,0x00,0x3f,0x00,0x0f,0xf0,0x03,0xfc,0x10,0xf8 },
+ 16, 0xb680, 0, {0x40,0x37,0xc0,0x0e,0xe0,0x21,0xfc,0x08,0xdf,0x00,0x3f,0x40,0x0f,0xd0,0x03,0xe0 },
+ 16, 0xb690, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0xc0,0xff,0x21,0x71,0x24 },
+ 16, 0xb6a0, 0, {0x0f,0xf1,0x83,0xf2,0x40,0xff,0x00,0x37,0xc4,0x9f,0xf2,0x47,0x3d,0x04,0xc7,0x20 },
+ 16, 0xb6b0, 0, {0x33,0xc0,0x0c,0x78,0x23,0xfe,0x40,0xe8,0x10,0x27,0xc4,0x0f,0xf2,0x13,0x3c,0x84 },
+ 16, 0xb6c0, 0, {0xc4,0x81,0x33,0x20,0x4c,0xf0,0x23,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb6d0, 0, {0x80,0x10,0xed,0x40,0xbf,0x54,0x62,0xc8,0x0b,0xf6,0x02,0xe0,0x00,0xbb,0xd0,0x22 },
+ 16, 0xb6e0, 0, {0xf0,0x1f,0xf9,0x12,0x3d,0x80,0x9f,0x81,0x2b,0xe0,0x0a,0xb8,0x12,0xe8,0x00,0x8f },
+ 16, 0xb6f0, 0, {0x04,0x22,0xd0,0x08,0xb3,0x8a,0xbf,0x42,0x8b,0x82,0x22,0xe0,0x28,0x8c,0x02,0x20 },
+ 16, 0xb700, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0xb3,0x28,0x28,0x08 },
+ 16, 0xb710, 0, {0x0b,0x30,0x06,0x80,0x80,0xb3,0x02,0x24,0xd1,0x0b,0x30,0x02,0x8d,0x80,0x93,0x10 },
+ 16, 0xb720, 0, {0x20,0xce,0x8b,0x30,0x02,0xcc,0x84,0xa1,0x21,0x2c,0xcc,0x0a,0x30,0x0a,0x4c,0x00 },
+ 16, 0xb730, 0, {0x93,0x00,0x28,0xc0,0x08,0x3c,0x02,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb740, 0, {0xc0,0x15,0xac,0x10,0xbb,0x02,0x6a,0xe0,0x0b,0xb0,0x02,0xe1,0x08,0xbb,0x04,0x2a },
+ 16, 0xb750, 0, {0xc0,0x0a,0xb0,0x12,0x8c,0x00,0x9b,0x00,0x2a,0xc0,0x0b,0xb1,0x06,0xc8,0x80,0x8b },
+ 16, 0xb760, 0, {0x82,0x6a,0xc1,0x0a,0x30,0x02,0xac,0x18,0x88,0x10,0x2a,0x48,0x08,0x80,0x02,0x30 },
+ 16, 0xb770, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xfb,0x00,0xaa,0x30 },
+ 16, 0xb780, 0, {0x0f,0xb0,0x03,0xa8,0x00,0xf3,0x01,0xb6,0xc1,0x0b,0xb0,0x02,0xac,0x08,0x4b,0x00 },
+ 16, 0xb790, 0, {0xb2,0xc0,0x0f,0xb8,0x02,0xec,0x10,0xa9,0x81,0x3e,0xc0,0x0f,0xb0,0x03,0x0c,0x00 },
+ 16, 0xb7a0, 0, {0xcb,0xa0,0x18,0xd0,0x0c,0xb0,0x03,0x10,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb7b0, 0, {0xe0,0x01,0xbc,0x08,0xf7,0x00,0x37,0x00,0x0f,0xf0,0x03,0xfd,0x00,0xff,0x00,0x37 },
+ 16, 0xb7c0, 0, {0xc0,0x0f,0xb0,0x07,0x7c,0x00,0xe7,0x00,0x3e,0xc0,0x0a,0xf0,0x03,0xfe,0x00,0xf7 },
+ 16, 0xb7d0, 0, {0x00,0x36,0xc0,0x0c,0xf0,0x03,0xfc,0x00,0xff,0x80,0x37,0xe0,0x0f,0xa0,0x03,0xb8 },
+ 16, 0xb7e0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xdb,0x00,0x36,0x00 },
+ 16, 0xb7f0, 0, {0x0e,0xb0,0x03,0x69,0x00,0xdb,0x09,0x3a,0xc0,0x1f,0x30,0x23,0xec,0x08,0xcb,0x20 },
+ 16, 0xb800, 0, {0x34,0xc0,0x2f,0xb0,0x03,0xec,0x40,0xeb,0x48,0x3e,0xc4,0x4d,0xb0,0x8b,0x6c,0x00 },
+ 16, 0xb810, 0, {0xcb,0x00,0x32,0x90,0x0f,0x30,0x03,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb820, 0, {0xc8,0x05,0x3c,0x00,0x8f,0x00,0x22,0x00,0x48,0xf0,0x22,0x2c,0x00,0x8f,0x00,0x23 },
+ 16, 0xb830, 0, {0xe0,0x8b,0xf5,0x10,0x3c,0x00,0x8f,0x80,0x23,0xf0,0x80,0x98,0x03,0x2d,0x44,0xdb },
+ 16, 0xb840, 0, {0x00,0x23,0xd4,0x08,0xf8,0x02,0x3c,0x00,0x83,0x00,0x22,0xc0,0x0b,0xa4,0x82,0x32 },
+ 16, 0xb850, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0x93,0x00,0x24,0x00 },
+ 16, 0xb860, 0, {0x0b,0x30,0x02,0x84,0x00,0xb3,0x01,0x28,0xf6,0x09,0x34,0x32,0x8c,0x01,0xb3,0xd0 },
+ 16, 0xb870, 0, {0x24,0xe8,0x0a,0x31,0x0a,0x86,0x00,0x83,0x00,0x2a,0xe0,0x00,0x30,0x02,0x8c,0x00 },
+ 16, 0xb880, 0, {0x83,0x00,0x28,0xc0,0x89,0x38,0xa2,0x78,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb890, 0, {0x20,0x01,0x1e,0x00,0x97,0x94,0x23,0xe0,0x09,0x38,0x02,0x32,0x00,0x97,0xa1,0x21 },
+ 16, 0xb8a0, 0, {0xe4,0x0b,0x78,0x02,0x1e,0x40,0xb7,0xa0,0x25,0xec,0x08,0xfc,0x02,0x3a,0x00,0x93 },
+ 16, 0xb8b0, 0, {0xb8,0x21,0xe0,0x08,0x78,0x82,0x9e,0x40,0x87,0xc0,0x29,0xa0,0x0b,0x58,0x02,0x48 },
+ 16, 0xb8c0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x2c,0x00,0xdb,0x00,0x34,0x20 },
+ 16, 0xb8d0, 0, {0x0f,0x3a,0x03,0x8e,0x00,0xf3,0xb0,0x28,0xc4,0x0b,0x3a,0x03,0xae,0x40,0xf3,0xa0 },
+ 16, 0xb8e0, 0, {0x34,0xee,0x0f,0x30,0x23,0x84,0x00,0xe3,0xf0,0x38,0xc0,0x0c,0xb0,0x0b,0x8e,0x42 },
+ 16, 0xb8f0, 0, {0xc3,0x00,0x38,0xc0,0x0f,0x30,0x63,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb900, 0, {0x40,0x1d,0xbc,0x00,0xeb,0x42,0x3a,0xc4,0x1e,0xb1,0x07,0x88,0xd1,0xe3,0x00,0x3f },
+ 16, 0xb910, 0, {0xc5,0x8f,0xf1,0x63,0xac,0x10,0xcb,0x50,0x3b,0xc3,0x0f,0xd1,0x03,0xc8,0x00,0xbb },
+ 16, 0xb920, 0, {0x20,0x3b,0xc0,0x2e,0xf1,0x03,0x1c,0x00,0xff,0x00,0x37,0xc0,0x4f,0xd1,0x03,0x90 },
+ 16, 0xb930, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x40,0xfb,0x44,0xb2,0xc0 },
+ 16, 0xb940, 0, {0x4f,0xb3,0x43,0x24,0x00,0xdb,0x10,0x36,0xc0,0x4c,0xbe,0x22,0x6d,0x20,0xcb,0x50 },
+ 16, 0xb950, 0, {0x3e,0xc9,0x4c,0xb0,0x13,0x24,0x00,0xcf,0x20,0x33,0xc0,0x3d,0xf0,0x23,0x2c,0xc0 },
+ 16, 0xb960, 0, {0xd8,0x00,0x3e,0x40,0x8f,0x30,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb970, 0, {0x48,0x11,0x9c,0x04,0xb7,0x60,0x21,0xc1,0x8b,0xf0,0xa2,0x14,0x10,0x87,0x00,0x0f },
+ 16, 0xb980, 0, {0xc8,0x0d,0x71,0x0a,0x1d,0x00,0x87,0x00,0x2c,0xcc,0x48,0x70,0x2a,0x9c,0x00,0x87 },
+ 16, 0xb990, 0, {0x0c,0x21,0xc0,0x0c,0x72,0x02,0x0c,0xa2,0x87,0x00,0x2d,0xc0,0x0b,0x70,0x02,0x12 },
+ 16, 0xb9a0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xb3,0x80,0x21,0xe0 },
+ 16, 0xb9b0, 0, {0x0b,0x7a,0x02,0xde,0x00,0xb7,0x81,0x05,0xe4,0x08,0x79,0x02,0x5c,0x80,0x87,0xa0 },
+ 16, 0xb9c0, 0, {0x2d,0xe0,0x08,0xf8,0x06,0xb6,0x00,0x87,0x80,0x20,0xe4,0x0a,0x7b,0x12,0x1e,0x90 },
+ 16, 0xb9d0, 0, {0x97,0x88,0x2d,0xe0,0x0b,0x78,0x0e,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb9e0, 0, {0x48,0x14,0xcc,0x00,0xb3,0x00,0x20,0xd0,0x0b,0xb0,0x02,0x6e,0x34,0xa3,0x00,0x2c },
+ 16, 0xb9f0, 0, {0xc1,0x09,0x30,0x02,0x4c,0x00,0x83,0x00,0x2c,0xc0,0x48,0x10,0x02,0x8d,0x80,0x83 },
+ 16, 0xba00, 0, {0xc0,0x00,0xc0,0x8a,0x30,0x12,0x0c,0x00,0x80,0x00,0x2c,0x16,0x0b,0x38,0x02,0x12 },
+ 16, 0xba10, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfa,0x00,0x33,0x88 },
+ 16, 0xba20, 0, {0x0f,0xa0,0x03,0x79,0x90,0xfa,0x01,0x36,0x80,0x1c,0xa0,0x03,0x68,0x00,0xca,0x00 },
+ 16, 0xba30, 0, {0x3e,0x81,0x2c,0xa0,0x0b,0xb9,0x0c,0xce,0xe2,0xb2,0x80,0x8e,0xa0,0x0b,0x28,0x00 },
+ 16, 0xba40, 0, {0xda,0x80,0x3c,0xb0,0x0f,0xe0,0x83,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xba50, 0, {0x48,0x00,0xe0,0x00,0xf0,0x00,0x3e,0x00,0x0f,0x80,0x03,0xa0,0x00,0xc8,0x00,0x2e },
+ 16, 0xba60, 0, {0x00,0x0f,0x84,0x23,0xa0,0x00,0xf0,0x40,0x3e,0x10,0x0f,0x84,0x03,0xe1,0x02,0xf8 },
+ 16, 0xba70, 0, {0x48,0x3e,0x10,0x0c,0x80,0x03,0xc0,0x10,0xf8,0x80,0x3e,0x00,0x0f,0x00,0x03,0xd2 },
+ 16, 0xba80, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xd9,0x00,0x36,0x42 },
+ 16, 0xba90, 0, {0x0f,0x90,0x03,0x24,0x18,0xf9,0x10,0x3c,0x48,0x68,0x92,0x13,0xe4,0x00,0xa9,0x11 },
+ 16, 0xbaa0, 0, {0xb2,0x60,0x0e,0x91,0x03,0x26,0x00,0xc9,0x00,0x32,0x60,0x0c,0x10,0x03,0x24,0x08 },
+ 16, 0xbab0, 0, {0xc9,0x00,0x3e,0x40,0x0c,0x90,0x23,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbac0, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x22,0x40,0x0b,0x90,0x02,0xa4,0x08,0x89,0x00,0x2e },
+ 16, 0xbad0, 0, {0x42,0x48,0x94,0x02,0xe4,0x00,0x89,0x80,0x22,0x70,0x08,0x14,0x22,0xa4,0x02,0x89 },
+ 16, 0xbae0, 0, {0x42,0x2a,0x70,0x28,0x90,0x0a,0x24,0x00,0xa9,0x00,0x2e,0x40,0x28,0x90,0x02,0xa0 },
+ 16, 0xbaf0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x04,0x00,0x99,0x00,0x26,0xc0 },
+ 16, 0xbb00, 0, {0x03,0x90,0x02,0x24,0x01,0xa9,0x00,0x0e,0x40,0x0a,0x90,0x46,0xc4,0x0a,0x89,0x00 },
+ 16, 0xbb10, 0, {0x20,0x48,0x0a,0x90,0x02,0x05,0x80,0x81,0x41,0xa0,0x58,0x88,0x90,0x02,0x24,0x08 },
+ 16, 0xbb20, 0, {0x8d,0x80,0x2f,0xc0,0x08,0x98,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbb30, 0, {0x08,0x04,0x04,0x80,0x81,0x20,0x20,0x40,0x0b,0x12,0x02,0x84,0x00,0x81,0x24,0x2c },
+ 16, 0xbb40, 0, {0x58,0x0a,0x32,0x22,0xc5,0x84,0xa1,0x00,0x20,0x50,0x08,0xb0,0x02,0x85,0x08,0x81 },
+ 16, 0xbb50, 0, {0x40,0x20,0x5a,0x08,0x16,0x82,0x04,0x00,0xa5,0x00,0x2d,0x40,0x08,0x12,0x82,0x82 },
+ 16, 0xbb60, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xd8,0x50,0x36,0x14 },
+ 16, 0xbb70, 0, {0x0f,0x85,0x23,0x01,0x40,0xe8,0x00,0x3e,0x00,0x0e,0x80,0x43,0xc0,0x08,0xca,0x00 },
+ 16, 0xbb80, 0, {0x32,0x80,0x0e,0x80,0x03,0x20,0x00,0xc0,0x00,0x32,0x08,0x2c,0x02,0x03,0x20,0x08 },
+ 16, 0xbb90, 0, {0xc8,0x00,0x3f,0x00,0x0c,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbba0, 0, {0x98,0x1d,0xe4,0x40,0xf9,0x10,0x3f,0x40,0x0f,0x91,0x43,0xf4,0x04,0xf9,0x10,0x3e },
+ 16, 0xbbb0, 0, {0x44,0x0d,0x11,0x03,0xe4,0x44,0x59,0x40,0x3e,0x50,0x4f,0x50,0x43,0xd4,0x02,0xfd },
+ 16, 0xbbc0, 0, {0x40,0x3e,0x40,0x0f,0x90,0x0b,0xe5,0x00,0xf9,0x00,0x3e,0x40,0x4f,0xd0,0x03,0xe6 },
+ 16, 0xbbd0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x66,0x60,0xc9,0xe0,0x32,0x44 },
+ 16, 0xbbe0, 0, {0x0f,0x9c,0x03,0xe4,0x00,0xdd,0x84,0x3f,0x68,0x8f,0xd8,0x42,0xe6,0xa0,0xdd,0xa4 },
+ 16, 0xbbf0, 0, {0x33,0x68,0x0d,0x70,0x03,0x25,0x00,0xc9,0xe0,0xb2,0x68,0x0c,0x9a,0xc3,0x26,0x00 },
+ 16, 0xbc00, 0, {0x99,0x00,0x3e,0x40,0x0f,0x9a,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbc10, 0, {0x38,0x10,0xe3,0x00,0x88,0x80,0xaa,0x20,0x8b,0x88,0x02,0xe2,0x88,0xb8,0x01,0x2e },
+ 16, 0xbc20, 0, {0x00,0x0b,0x84,0x02,0xe2,0xb0,0x88,0x50,0x22,0x14,0x08,0x80,0x02,0x82,0x80,0x88 },
+ 16, 0xbc30, 0, {0xe0,0xb6,0x3a,0x08,0xce,0xa2,0x21,0x08,0x88,0x00,0x2e,0x00,0x0b,0xc4,0x02,0x0e },
+ 16, 0xbc40, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x80,0x81,0x60,0x68,0x48 },
+ 16, 0xbc50, 0, {0x5b,0x16,0x02,0xc4,0x20,0xa1,0x40,0x6c,0x50,0x0b,0x14,0x02,0xc4,0x00,0xa1,0x00 },
+ 16, 0xbc60, 0, {0x24,0x40,0x0b,0x90,0x22,0x14,0x90,0x85,0x42,0x21,0x50,0x5b,0x50,0x1a,0x15,0x00 },
+ 16, 0xbc70, 0, {0x95,0x00,0x2d,0x40,0x0b,0x51,0x0a,0x82,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbc80, 0, {0x18,0x15,0xa4,0x01,0x89,0x00,0x2a,0x40,0x0b,0x90,0x46,0xe4,0x00,0xb9,0x01,0x2e },
+ 16, 0xbc90, 0, {0x40,0x0b,0x90,0x20,0xe4,0x00,0xb9,0x00,0x26,0x40,0x18,0xb8,0x02,0xa4,0x02,0x8d },
+ 16, 0xbca0, 0, {0x08,0x2f,0x40,0x8b,0xd0,0x02,0x24,0x00,0x8d,0x20,0x2f,0x48,0x0b,0xd0,0x02,0x86 },
+ 16, 0xbcb0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xc9,0x00,0x32,0x40 },
+ 16, 0xbcc0, 0, {0x0f,0x90,0x02,0xe4,0x10,0x49,0x00,0x3e,0x40,0x0f,0x90,0x02,0xe4,0x00,0xe9,0x01 },
+ 16, 0xbcd0, 0, {0x36,0x40,0x0f,0x18,0x13,0x24,0x10,0xc9,0x82,0x32,0x40,0x7f,0x90,0x23,0x24,0x00 },
+ 16, 0xbce0, 0, {0xd9,0x20,0x3e,0x72,0x0f,0x90,0x03,0xa8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbcf0, 0, {0x28,0x01,0x84,0x02,0xf1,0x01,0x16,0x40,0x4f,0x90,0x03,0xe5,0x10,0xf9,0x08,0x2e },
+ 16, 0xbd00, 0, {0x40,0x0f,0x90,0x13,0xe4,0x00,0xc9,0x01,0x3a,0x40,0x1f,0x90,0x03,0xe4,0x00,0xf9 },
+ 16, 0xbd10, 0, {0x20,0x34,0x40,0x8c,0x90,0x03,0xc4,0x08,0xf9,0x00,0x3e,0x60,0x0f,0x10,0x03,0x4a },
+ 16, 0xbd20, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x08,0xf8,0x00,0x3e,0x00 },
+ 16, 0xbd30, 0, {0x0c,0x80,0x03,0x60,0x00,0xe8,0x00,0x3e,0x02,0x4f,0x80,0x13,0xe0,0x00,0xd0,0x00 },
+ 16, 0xbd40, 0, {0x3e,0x00,0x0e,0x81,0x03,0x30,0x00,0xcc,0x40,0x33,0x00,0x0c,0xc0,0x0b,0x20,0x20 },
+ 16, 0xbd50, 0, {0xe8,0x00,0x3e,0x10,0x0f,0xc0,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbd60, 0, {0x28,0x05,0x28,0x04,0xba,0x00,0x22,0x80,0x08,0xa0,0x02,0x28,0x00,0xbe,0xc8,0x6f },
+ 16, 0xbd70, 0, {0x80,0x0b,0xe1,0x22,0xa8,0x00,0x8e,0x20,0x2f,0x80,0x0b,0xe0,0x23,0x68,0x00,0x8a },
+ 16, 0xbd80, 0, {0x00,0x22,0x80,0x08,0xe0,0x02,0x29,0x00,0x8a,0x00,0x2e,0xa8,0x0b,0xa0,0x00,0xca },
+ 16, 0xbd90, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb3,0x00,0x24,0xc0 },
+ 16, 0xbda0, 0, {0x09,0x30,0x02,0x0c,0x00,0xb3,0xc1,0x2c,0xe0,0x0b,0x38,0x56,0x2c,0x10,0x13,0x00 },
+ 16, 0xbdb0, 0, {0x2e,0xc0,0x0a,0x38,0x6a,0x20,0x00,0x88,0x00,0x20,0x00,0x09,0x80,0x22,0x4c,0x42 },
+ 16, 0xbdc0, 0, {0xa3,0x00,0x2c,0xe0,0x0b,0x24,0x80,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbdd0, 0, {0xa0,0x01,0x1c,0x08,0xb7,0x24,0x2f,0xe0,0x09,0x39,0x02,0x1c,0x01,0xb6,0x00,0x2d },
+ 16, 0xbde0, 0, {0x90,0x0b,0x60,0x92,0x8e,0x00,0x86,0x82,0x2d,0xc2,0x0b,0xf0,0x02,0x5c,0x06,0x87 },
+ 16, 0xbdf0, 0, {0x00,0x60,0xc0,0x29,0x70,0x02,0x5c,0x00,0x86,0x00,0x2d,0xc0,0x0b,0x60,0x02,0xe8 },
+ 16, 0xbe00, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1f,0x40,0xf3,0xe4,0x3d,0xe8 },
+ 16, 0xbe10, 0, {0x0d,0x79,0x0b,0x1e,0xc0,0x67,0x80,0x2d,0xe0,0x0f,0x70,0x43,0x1d,0x80,0xd5,0x00 },
+ 16, 0xbe20, 0, {0x3d,0x60,0x0e,0x78,0x03,0x1e,0x00,0xcd,0x80,0x31,0xe0,0x0d,0xc8,0x03,0x4e,0x00 },
+ 16, 0xbe30, 0, {0xe5,0x80,0x3d,0xe0,0x0f,0x48,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbe40, 0, {0x08,0x1d,0xac,0x80,0xfb,0x00,0x70,0xc0,0x6e,0xb6,0x13,0xad,0x40,0xfa,0x00,0x3e },
+ 16, 0xbe50, 0, {0xc0,0x0f,0x20,0x43,0x2d,0x18,0x59,0x00,0x3e,0x00,0x03,0xb0,0x0b,0xe0,0x00,0xfa },
+ 16, 0xbe60, 0, {0x00,0xbe,0x00,0x0e,0xb0,0x13,0xac,0x00,0xf8,0x00,0x3e,0xc0,0x0f,0x80,0x03,0xc2 },
+ 16, 0xbe70, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x40,0xff,0x80,0x3f,0xe6 },
+ 16, 0xbe80, 0, {0x0f,0xf8,0x23,0x2e,0x04,0xff,0x90,0x3f,0xe4,0x0d,0xba,0x03,0xff,0x40,0xcf,0x80 },
+ 16, 0xbe90, 0, {0x22,0xe1,0x0c,0x39,0x43,0x32,0x10,0xec,0x90,0x33,0x20,0x8e,0xc8,0x03,0xf2,0x00 },
+ 16, 0xbea0, 0, {0xdf,0x80,0x3f,0x60,0x0f,0xf8,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbeb0, 0, {0xa8,0x11,0x9c,0x40,0xb7,0x90,0x3c,0xe0,0x0b,0x3a,0x03,0x4e,0x80,0xf3,0xb1,0x2d },
+ 16, 0xbec0, 0, {0x04,0x4c,0x38,0x23,0xae,0x00,0x80,0x80,0x34,0xe8,0x4d,0x78,0x02,0x3e,0x80,0x87 },
+ 16, 0xbed0, 0, {0xa0,0x29,0xc0,0x08,0x70,0x02,0xc0,0x80,0x86,0x02,0x2d,0x41,0x0b,0x70,0x02,0xea },
+ 16, 0xbee0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x48,0x37,0x01,0x2d,0xc9 },
+ 16, 0xbef0, 0, {0x0b,0x72,0x22,0x1c,0x84,0xb5,0x16,0x0d,0xc4,0x19,0x40,0x42,0xdc,0x80,0x87,0x00 },
+ 16, 0xbf00, 0, {0x20,0xc8,0x88,0x73,0x0a,0x9c,0x80,0xb5,0x00,0x29,0xc0,0x0a,0x48,0x02,0xc0,0x02 },
+ 16, 0xbf10, 0, {0x95,0x00,0x2d,0x42,0x0b,0x58,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbf20, 0, {0x20,0x14,0xcc,0x00,0xb3,0x00,0x2a,0xe0,0x0b,0x30,0x02,0x4c,0x20,0xa1,0x01,0x24 },
+ 16, 0xbf30, 0, {0xc1,0x08,0x00,0x02,0x8c,0x00,0x81,0x00,0x24,0x80,0x09,0x38,0x0a,0x60,0x80,0x92 },
+ 16, 0xbf40, 0, {0x40,0x2a,0x00,0x0a,0x30,0x02,0xc0,0x00,0x80,0xc8,0x2c,0x72,0x0b,0x14,0x02,0xc8 },
+ 16, 0xbf50, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xff,0x00,0x2f,0xf4 },
+ 16, 0xbf60, 0, {0x8f,0xf0,0x03,0x3c,0x00,0xb9,0x00,0x3e,0x40,0x09,0x90,0x03,0xfc,0x02,0xc3,0x01 },
+ 16, 0xbf70, 0, {0x32,0xc0,0x48,0xb8,0x13,0xa1,0x00,0xba,0x00,0x2a,0x00,0x0a,0xa0,0x07,0xec,0x00 },
+ 16, 0xbf80, 0, {0xdb,0xc8,0x3e,0x90,0x0f,0xa2,0x02,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbf90, 0, {0x80,0x00,0xec,0x00,0xfb,0x02,0x3e,0xc4,0x0f,0xb0,0x63,0xec,0x01,0xf8,0x40,0x3e },
+ 16, 0xbfa0, 0, {0x40,0x0b,0x80,0x03,0xcc,0x00,0xfa,0x42,0x3e,0xc0,0x0f,0xb5,0x00,0xac,0x58,0xe9 },
+ 16, 0xbfb0, 0, {0x82,0x3e,0xc0,0x1d,0x90,0x03,0xec,0x04,0xfa,0x00,0x3e,0x80,0x0f,0xa0,0x03,0xe0 },
+ 16, 0xbfc0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x0c,0xdf,0x00,0x7f,0xc0 },
+ 16, 0xbfd0, 0, {0x2c,0xf0,0x03,0x7c,0x01,0xc7,0x00,0x33,0x40,0x8f,0xd0,0x03,0xfc,0x00,0xd8,0x00 },
+ 16, 0xbfe0, 0, {0x15,0x44,0x0c,0xe0,0x1b,0x3c,0x00,0xcb,0x0e,0x33,0xc0,0x5c,0x62,0x02,0x1c,0x02 },
+ 16, 0xbff0, 0, {0xc5,0x00,0x2b,0x80,0x0f,0xc0,0x87,0x80,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc000, 0, {0x81,0x44,0x6c,0x10,0xbb,0x00,0x2e,0xc0,0x08,0xb0,0x52,0x0c,0x01,0xfa,0xc4,0x22 },
+ 16, 0xc010, 0, {0x61,0x0b,0x88,0x03,0x6c,0x00,0x88,0x47,0x2a,0x00,0x0e,0x1c,0x02,0x20,0x02,0x88 },
+ 16, 0xc020, 0, {0x00,0xaa,0x00,0x28,0x90,0x0a,0x2c,0x04,0xa8,0x00,0x22,0x90,0x0b,0x80,0x02,0xe0 },
+ 16, 0xc030, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x2c,0x00,0xbb,0x00,0x2e,0xc1 },
+ 16, 0xc040, 0, {0x08,0x30,0x12,0x6c,0x00,0x88,0x88,0x2a,0x30,0x0b,0xb8,0x02,0xec,0x00,0x9b,0x08 },
+ 16, 0xc050, 0, {0x2a,0x40,0x08,0xb8,0x02,0x20,0x00,0x82,0x10,0x22,0x00,0x08,0xa0,0x22,0xa0,0x00 },
+ 16, 0xc060, 0, {0x8b,0x00,0x2a,0x02,0x0b,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc070, 0, {0x08,0x00,0x0c,0x00,0xb3,0x20,0x2c,0xc2,0x08,0x36,0x02,0x2c,0xc0,0xa0,0x08,0x20 },
+ 16, 0xc080, 0, {0x00,0x0b,0x33,0x46,0xcd,0x28,0x80,0x20,0x28,0xc0,0x0b,0x32,0x02,0x0c,0x20,0x81 },
+ 16, 0xc090, 0, {0x30,0x28,0xc0,0x08,0x10,0x02,0x81,0x00,0xaa,0x00,0x28,0x00,0x03,0x30,0x02,0xc2 },
+ 16, 0xc0a0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x7c,0x00,0xfb,0x28,0x2e,0xcc },
+ 16, 0xc0b0, 0, {0x0c,0x70,0x53,0x7d,0x09,0x88,0x00,0xba,0x00,0x0f,0x80,0x03,0xfd,0x80,0xda,0x60 },
+ 16, 0xc0c0, 0, {0x3a,0x50,0x8c,0xa2,0x83,0x2c,0x80,0x4b,0x20,0x30,0xc0,0x28,0xa0,0x03,0xa1,0x00 },
+ 16, 0xc0d0, 0, {0xc9,0x00,0x3a,0x00,0x0f,0x90,0x03,0xc0,0x03,0x10,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc0e0, 0, {0xa0,0x1d,0xfc,0x04,0xfb,0x00,0x7e,0xc9,0x0b,0xb6,0x03,0xfc,0xc0,0xf8,0x0c,0x3f },
+ 16, 0xc0f0, 0, {0x00,0x4f,0xc3,0x43,0x2c,0x00,0xb8,0x38,0x3f,0x8e,0x5e,0xf0,0x43,0xe0,0x10,0xf8 },
+ 16, 0xc100, 0, {0x30,0x3f,0x01,0x0f,0xd0,0x03,0x70,0x00,0xfc,0x00,0x37,0x00,0x0d,0xd0,0x07,0xe9 },
+ 16, 0xc110, 0, {0x03,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0xe0,0xcc,0x80,0x33,0xc0 },
+ 16, 0xc120, 0, {0x0d,0xf0,0x83,0xfc,0x80,0xdc,0x94,0x33,0xc0,0x1c,0xf1,0x03,0x7d,0x8c,0xff,0x30 },
+ 16, 0xc130, 0, {0x3f,0x30,0x8f,0xc8,0x03,0x7e,0x10,0xcf,0x90,0x39,0xa0,0x8d,0xf8,0x03,0xae,0x00 },
+ 16, 0xc140, 0, {0xd5,0x80,0x13,0xe0,0x0c,0x58,0x03,0xf0,0x01,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc150, 0, {0x80,0x10,0xdd,0x08,0x88,0x00,0x23,0xc4,0x08,0xfc,0x02,0xec,0xa8,0xcb,0x20,0x21 },
+ 16, 0xc160, 0, {0xc2,0x0d,0xf7,0x12,0x1c,0x40,0xdf,0x30,0x22,0xa0,0x0b,0x88,0x02,0x2e,0x04,0xdb },
+ 16, 0xc170, 0, {0x21,0x22,0xc0,0x08,0xb8,0x22,0x2e,0x00,0xb9,0x80,0x2a,0x60,0x0a,0x88,0x02,0xe0 },
+ 16, 0xc180, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x45,0xcc,0x10,0x80,0x2c,0x28,0xca },
+ 16, 0xc190, 0, {0x68,0x30,0x02,0x8d,0x00,0x9b,0x20,0x28,0xc4,0x08,0x32,0x02,0xcc,0x10,0xb3,0x00 },
+ 16, 0xc1a0, 0, {0x24,0x08,0x0b,0x80,0x42,0x6c,0x00,0x83,0x00,0x2a,0xca,0x3a,0xb0,0x02,0x8c,0x04 },
+ 16, 0xc1b0, 0, {0xb0,0x04,0x28,0xc0,0x08,0x10,0x02,0xe3,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc1c0, 0, {0xc0,0x15,0x8c,0x02,0x80,0x40,0xaa,0xc0,0x08,0xb0,0x02,0xec,0x00,0x9b,0x20,0x2a },
+ 16, 0xc1d0, 0, {0xc0,0x88,0xb0,0x02,0xac,0x00,0x9b,0x00,0x26,0xe0,0x03,0x80,0x82,0x2c,0x28,0x9b },
+ 16, 0xc1e0, 0, {0x20,0x22,0xe1,0x0b,0xb2,0x02,0xac,0x80,0xb8,0x80,0x2a,0xc1,0x0a,0x98,0x02,0xf0 },
+ 16, 0xc1f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xc8,0x50,0x3a,0xc0 },
+ 16, 0xc200, 0, {0x0d,0xb0,0x03,0xec,0x00,0xdb,0x88,0xba,0xc0,0x08,0xb0,0x03,0x6c,0x08,0xfb,0x00 },
+ 16, 0xc210, 0, {0x36,0x60,0x0f,0x8c,0x63,0x6c,0x00,0xcb,0xc0,0x3a,0x80,0x0e,0xbe,0x03,0xaf,0x84 },
+ 16, 0xc220, 0, {0x79,0x80,0x3a,0x88,0x04,0x98,0x01,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc230, 0, {0xe0,0x01,0xbc,0x00,0xfc,0x80,0x35,0xc0,0x4f,0xf0,0x03,0xdc,0x00,0xef,0x00,0x37 },
+ 16, 0xc240, 0, {0xc0,0xaf,0xf0,0x03,0x1c,0x01,0x6f,0x00,0x13,0x00,0x0f,0xc1,0x23,0xfc,0xb8,0xff },
+ 16, 0xc250, 0, {0x04,0x37,0xc0,0x0c,0xf8,0x43,0x7e,0x04,0xfd,0x00,0x3f,0x04,0x0f,0xd0,0x03,0xf8 },
+ 16, 0xc260, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xc8,0x40,0x3a,0xc0 },
+ 16, 0xc270, 0, {0x0c,0xb0,0x03,0xec,0x00,0xfb,0x40,0x38,0xc1,0x0e,0xb0,0x43,0x2c,0x08,0xc3,0x00 },
+ 16, 0xc280, 0, {0x3e,0x40,0x0e,0x82,0x03,0x6d,0x00,0xdb,0x40,0x32,0xc1,0x5f,0xb4,0xa3,0xed,0x20 },
+ 16, 0xc290, 0, {0xc9,0x40,0x32,0xe0,0x8f,0x98,0x43,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc2a0, 0, {0xc8,0x05,0x3c,0x00,0x88,0x00,0x23,0xc0,0x28,0xf5,0xc2,0xfc,0x00,0xb3,0x04,0x23 },
+ 16, 0xc2b0, 0, {0xc1,0x48,0xf0,0x22,0xbc,0x06,0xaf,0x00,0x0e,0x40,0x08,0x00,0x02,0xcd,0x00,0xbb },
+ 16, 0xc2c0, 0, {0x01,0x20,0xc0,0x08,0x30,0x02,0xee,0x00,0x81,0xe0,0x34,0xa0,0x0b,0x90,0x02,0x32 },
+ 16, 0xc2d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x02,0x80,0x00,0x28,0xc0 },
+ 16, 0xc2e0, 0, {0x09,0x3c,0x02,0x4c,0x00,0xb3,0x00,0x2c,0xc0,0x0a,0xb0,0x02,0x0c,0x00,0x83,0x01 },
+ 16, 0xc2f0, 0, {0x2c,0x00,0x0a,0x05,0x02,0xcd,0x58,0xbb,0x00,0x20,0x00,0x0a,0x3d,0x02,0xcf,0x40 },
+ 16, 0xc300, 0, {0x21,0x20,0x60,0xc0,0x09,0x10,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc310, 0, {0x20,0x01,0x1e,0x00,0x84,0x80,0x28,0xe4,0x88,0x78,0x42,0xde,0x00,0xb7,0x90,0x65 },
+ 16, 0xc320, 0, {0xe4,0x88,0x7a,0x42,0x9e,0x40,0xa7,0x90,0x2d,0xa0,0x0a,0x48,0x22,0xde,0x04,0xb7 },
+ 16, 0xc330, 0, {0x80,0x23,0x60,0x48,0x78,0x42,0xfe,0x80,0xaf,0x90,0x65,0xe0,0x0b,0xe8,0x02,0xc8 },
+ 16, 0xc340, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xc8,0x00,0x38,0xc0 },
+ 16, 0xc350, 0, {0x0c,0x30,0x03,0xcc,0x00,0xfb,0x00,0x3c,0xc0,0x0e,0xba,0x03,0x0c,0x00,0xc3,0x00 },
+ 16, 0xc360, 0, {0x3e,0x00,0x4e,0x22,0x02,0xcc,0xc0,0xfb,0x40,0x30,0xc0,0x0a,0x30,0x03,0xce,0x80 },
+ 16, 0xc370, 0, {0xe1,0x41,0x30,0xc9,0x0f,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc380, 0, {0x40,0x1d,0xbc,0x20,0xfc,0x00,0x37,0xc2,0x0e,0xf1,0x23,0xec,0x40,0xff,0x04,0x3a },
+ 16, 0xc390, 0, {0xc0,0x0f,0xb0,0x23,0xfc,0x00,0xff,0x04,0x3e,0xc0,0x0d,0xa0,0x03,0xfc,0x58,0xff },
+ 16, 0xc3a0, 0, {0x00,0xbf,0xc0,0x06,0xf0,0x83,0xdc,0x62,0xdf,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0x10 },
+ 16, 0xc3b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xed,0x80,0xc9,0x01,0x3e,0xc0 },
+ 16, 0xc3c0, 0, {0x8c,0xb2,0x07,0xae,0x04,0xcb,0x80,0x3a,0xc8,0x4c,0xb2,0x03,0x2c,0x84,0xcb,0x30 },
+ 16, 0xc3d0, 0, {0xb0,0xe0,0x0d,0x88,0x0b,0x2c,0x00,0xeb,0x00,0x30,0x00,0x0c,0xbc,0x83,0x2d,0x80 },
+ 16, 0xc3e0, 0, {0xfb,0x00,0x32,0xc0,0x0c,0x90,0x03,0xea,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc3f0, 0, {0x48,0x11,0x9c,0x40,0x87,0x00,0x2c,0xcc,0x08,0x76,0x82,0x3c,0x82,0x87,0x00,0x21 },
+ 16, 0xc400, 0, {0xc2,0x8d,0x32,0x82,0x0d,0x4c,0xa7,0x28,0x21,0x80,0x08,0x40,0x02,0x1d,0x80,0xbf },
+ 16, 0xc410, 0, {0x20,0x35,0x40,0x09,0x72,0x43,0x5c,0xa0,0xb7,0x00,0x29,0xc0,0x08,0x70,0x02,0xd2 },
+ 16, 0xc420, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x8e,0x00,0x84,0x80,0x2d,0xe0 },
+ 16, 0xc430, 0, {0x08,0x78,0x02,0xde,0xc0,0x8f,0x80,0x28,0xec,0x28,0x7b,0x0a,0x9e,0x94,0x83,0x84 },
+ 16, 0xc440, 0, {0x23,0xe0,0x09,0x58,0x50,0x9e,0x10,0xa7,0xb0,0x23,0xe0,0x0b,0x78,0x02,0x1e,0x20 },
+ 16, 0xc450, 0, {0xb7,0x80,0x21,0xe0,0x09,0x78,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc460, 0, {0x48,0x14,0xcc,0x02,0x82,0x1c,0x2c,0xc0,0x28,0x30,0x02,0x4c,0x00,0x83,0xc0,0x20 },
+ 16, 0xc470, 0, {0xc0,0x08,0x30,0x02,0x0c,0x00,0xa3,0x00,0x60,0xd2,0x08,0x1d,0x02,0x0f,0x20,0xbb },
+ 16, 0xc480, 0, {0x24,0x24,0xc0,0x0b,0x3c,0x02,0x4f,0x00,0xb3,0x80,0x28,0xd8,0x09,0x32,0x02,0xd2 },
+ 16, 0xc490, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x11,0xa8,0x00,0xce,0x84,0x3e,0x80 },
+ 16, 0xc4a0, 0, {0x0c,0xa0,0x03,0xe8,0x00,0xce,0xc0,0x3a,0x80,0x08,0xa0,0x03,0xa8,0x00,0xca,0x00 },
+ 16, 0xc4b0, 0, {0x33,0x80,0x0d,0xec,0x03,0x3b,0x80,0xee,0x82,0x33,0x80,0x0a,0xc0,0x87,0x10,0x40 },
+ 16, 0xc4c0, 0, {0xf6,0xc0,0x33,0x90,0xad,0x64,0x03,0xfa,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc4d0, 0, {0x48,0x00,0xc0,0x02,0xf8,0x00,0x3c,0x00,0x1f,0x04,0x03,0xa0,0x04,0xf8,0x30,0x3e },
+ 16, 0xc4e0, 0, {0x00,0x0f,0x80,0x03,0xe0,0x00,0xf8,0x00,0x3e,0x04,0x0f,0x80,0x93,0xe0,0x00,0xf8 },
+ 16, 0xc4f0, 0, {0x10,0x3e,0x00,0x2c,0x84,0x03,0xe0,0x00,0xf8,0x18,0x3e,0x10,0x0e,0x80,0x03,0xd2 },
+ 16, 0xc500, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xd9,0x00,0x3e,0x40 },
+ 16, 0xc510, 0, {0x0e,0x90,0x03,0xa4,0x10,0xf9,0x00,0x3e,0x40,0x04,0x90,0x03,0x24,0x00,0x41,0x00 },
+ 16, 0xc520, 0, {0x3e,0x40,0x0f,0x91,0x13,0xe1,0x08,0xf8,0x00,0x32,0x40,0x08,0x89,0x83,0xa2,0x00 },
+ 16, 0xc530, 0, {0xc9,0x80,0x32,0x40,0x0c,0x90,0x0b,0x02,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc540, 0, {0x80,0x04,0x64,0x02,0x89,0x00,0x2e,0x40,0x0d,0x90,0x02,0x24,0x00,0xb9,0x00,0x2e },
+ 16, 0xc550, 0, {0x40,0x48,0x90,0x02,0xa4,0x00,0x89,0x00,0x22,0x40,0x8b,0x94,0x42,0xe2,0x20,0xb8 },
+ 16, 0xc560, 0, {0x00,0xa2,0x40,0x08,0x94,0x02,0xe5,0x04,0xa9,0x90,0x34,0x60,0x08,0x90,0x02,0x20 },
+ 16, 0xc570, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x10,0x99,0x00,0x2e,0x40 },
+ 16, 0xc580, 0, {0x0a,0x90,0x02,0xe4,0x00,0xb9,0x00,0x24,0x40,0x0a,0x10,0x02,0x04,0x00,0xa9,0x00 },
+ 16, 0xc590, 0, {0x2a,0x40,0x0b,0x90,0x82,0xe0,0x01,0xb8,0x00,0x20,0x40,0x3a,0x90,0x02,0xa4,0x44 },
+ 16, 0xc5a0, 0, {0x89,0x04,0x22,0x62,0x08,0x98,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc5b0, 0, {0x08,0x04,0x04,0x8a,0x81,0x00,0x2c,0x48,0x09,0x32,0x06,0x44,0x80,0xb1,0x00,0x2c },
+ 16, 0xc5c0, 0, {0x48,0x0a,0x12,0x02,0x84,0x80,0xa1,0x20,0x20,0x50,0x0b,0x14,0x02,0xc5,0x00,0xb1 },
+ 16, 0xc5d0, 0, {0x40,0x20,0x50,0x0a,0x24,0x02,0xc9,0x00,0xa3,0x00,0x24,0x40,0x08,0x11,0x02,0x02 },
+ 16, 0xc5e0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xd8,0x50,0x3e,0x14 },
+ 16, 0xc5f0, 0, {0x0e,0x80,0x03,0xe1,0x40,0xf8,0x51,0x36,0x14,0x2e,0x85,0x43,0x21,0x42,0xe8,0x50 },
+ 16, 0xc600, 0, {0x3a,0x00,0x0f,0x80,0x12,0xe0,0x00,0xf8,0x00,0x32,0x00,0x1e,0x80,0x43,0xa0,0x00 },
+ 16, 0xc610, 0, {0xc8,0x01,0x32,0x00,0x0c,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc620, 0, {0x98,0x1d,0xe4,0x40,0xfd,0x00,0x3e,0x44,0x4e,0x11,0x03,0xa4,0x40,0xb5,0x00,0x3e },
+ 16, 0xc630, 0, {0x44,0x0d,0x91,0x03,0xe4,0x40,0xd9,0x10,0x3f,0x40,0x0f,0x50,0x03,0xe5,0x00,0xf9 },
+ 16, 0xc640, 0, {0x40,0x3f,0x40,0x0d,0x44,0x03,0xf1,0x00,0xf5,0x02,0x3d,0xc0,0x2f,0xd2,0x03,0xe6 },
+ 16, 0xc650, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe7,0x00,0xe9,0x00,0x36,0x60 },
+ 16, 0xc660, 0, {0x0d,0xda,0x03,0xe6,0x40,0xf9,0x40,0x3e,0x68,0x0c,0x9a,0x03,0x66,0x20,0x89,0xa0 },
+ 16, 0xc670, 0, {0x33,0x40,0x0e,0x90,0x07,0xa6,0x00,0xf9,0x80,0x3e,0x50,0x0c,0xca,0x03,0xf3,0x80 },
+ 16, 0xc680, 0, {0xc5,0x02,0x33,0x40,0x0c,0xc0,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc690, 0, {0x38,0x10,0xe3,0x04,0x88,0xa2,0x20,0x38,0x08,0x80,0x02,0xe3,0x40,0xb0,0x80,0x2e },
+ 16, 0xc6a0, 0, {0x28,0x08,0x8a,0x82,0x23,0x80,0x88,0x80,0x22,0x00,0xdb,0x88,0x02,0x62,0x04,0xb8 },
+ 16, 0xc6b0, 0, {0xb0,0x2e,0xa8,0x88,0x8e,0xa2,0xea,0x80,0x88,0x00,0x2a,0x00,0x28,0x88,0x03,0x8e },
+ 16, 0xc6c0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x82,0xa9,0x08,0x2c,0x52 },
+ 16, 0xc6d0, 0, {0x0b,0x14,0x02,0xc4,0x80,0xb1,0x21,0x0c,0x52,0x88,0x14,0x02,0x44,0x20,0x91,0x69 },
+ 16, 0xc6e0, 0, {0x20,0x40,0x0a,0x10,0x82,0xc6,0xe0,0xb1,0x0c,0x2c,0x48,0x08,0x01,0x02,0xe1,0x93 },
+ 16, 0xc6f0, 0, {0xa1,0x01,0x24,0x41,0x0a,0x10,0x02,0xc2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc700, 0, {0x18,0x15,0xa4,0x00,0x89,0x04,0x22,0x40,0x08,0x90,0x00,0xe4,0x00,0x39,0x02,0x0e },
+ 16, 0xc710, 0, {0x40,0x08,0x10,0x62,0x24,0x00,0x91,0x00,0x62,0x40,0x8b,0x80,0x02,0xe0,0x54,0xb9 },
+ 16, 0xc720, 0, {0x0c,0x2e,0x40,0x09,0xb6,0x52,0xec,0x00,0xa9,0x00,0x2a,0x40,0x0a,0x92,0x80,0x86 },
+ 16, 0xc730, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xe4,0x00,0xe1,0x60,0x36,0x40 },
+ 16, 0xc740, 0, {0x0d,0x90,0x23,0xe4,0x00,0xf9,0x30,0x3e,0x40,0x2c,0x90,0x43,0x64,0x06,0xc9,0x00 },
+ 16, 0xc750, 0, {0x32,0x49,0x0e,0x8d,0x93,0xe0,0x00,0xf9,0x00,0x2e,0x40,0x2c,0x94,0x03,0xc7,0x40 },
+ 16, 0xc760, 0, {0xe9,0x20,0x30,0x55,0x0e,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc770, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0x1e,0x40,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x80,0x3c },
+ 16, 0xc780, 0, {0x40,0x4f,0x90,0x03,0xe4,0x00,0xe9,0x04,0xbe,0x40,0x0f,0x88,0x33,0x62,0x00,0xf9 },
+ 16, 0xc790, 0, {0xc2,0x3e,0x48,0x2e,0x88,0x33,0xe2,0x00,0xd9,0x00,0x3e,0x60,0x0d,0x80,0x03,0xca },
+ 16, 0xc7a0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xc8,0x00,0x3e,0x00 },
+ 16, 0xc7b0, 0, {0x0d,0x80,0x03,0xa0,0x04,0xe8,0x40,0xba,0x00,0x0c,0x80,0x03,0xe0,0x04,0xc8,0x00 },
+ 16, 0xc7c0, 0, {0x3a,0x00,0x0e,0x8c,0x03,0xe0,0x00,0xf8,0x02,0x32,0x00,0x0e,0x80,0x03,0x61,0x20 },
+ 16, 0xc7d0, 0, {0xf8,0x00,0x32,0x16,0x0f,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc7e0, 0, {0x28,0x05,0x28,0x00,0x8a,0x00,0x2e,0x80,0x08,0xe2,0x03,0x28,0x00,0x8a,0x00,0x22 },
+ 16, 0xc7f0, 0, {0x80,0x08,0xa0,0x02,0xe8,0x04,0x8a,0x00,0x2e,0xa2,0x09,0xe8,0x02,0xfa,0x04,0xbe },
+ 16, 0xc800, 0, {0x00,0xa2,0x80,0x08,0xcd,0x82,0x33,0x20,0xb6,0xc0,0x37,0xa0,0x4b,0xc8,0x82,0xca },
+ 16, 0xc810, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x6c,0x00,0x83,0x00,0x26,0xc0 },
+ 16, 0xc820, 0, {0x09,0x38,0x02,0x4c,0x00,0xb3,0x00,0x24,0xc0,0x08,0x30,0x02,0xec,0x00,0x83,0x00 },
+ 16, 0xc830, 0, {0x28,0xe0,0x0b,0x30,0x02,0xce,0x81,0xb3,0x00,0x62,0xc0,0x08,0x3c,0x02,0x4f,0x00 },
+ 16, 0xc840, 0, {0xb3,0xa0,0x20,0xb0,0x03,0x30,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc850, 0, {0xa0,0x01,0x0c,0x41,0x87,0x34,0x2d,0xc0,0x08,0x60,0x02,0x9e,0x40,0xb7,0xa0,0x2d },
+ 16, 0xc860, 0, {0xc0,0x08,0x73,0x02,0xdc,0x00,0x87,0x20,0x2d,0xc0,0x0b,0x70,0x82,0xdd,0x85,0xbf },
+ 16, 0xc870, 0, {0x81,0x63,0xc8,0x88,0x7b,0x02,0x1c,0x00,0xb7,0x40,0x65,0x00,0x1b,0x72,0x02,0xe8 },
+ 16, 0xc880, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xc7,0x81,0x3d,0xe0 },
+ 16, 0xc890, 0, {0xdd,0x70,0x03,0xfe,0x80,0xf7,0x90,0x3f,0xe0,0x2c,0x79,0x03,0xfe,0x80,0xc7,0xa0 },
+ 16, 0xc8a0, 0, {0x39,0xe0,0x0f,0x7a,0x02,0xde,0x84,0xf7,0xc2,0x31,0xf2,0x0c,0x79,0x03,0x5e,0x04 },
+ 16, 0xc8b0, 0, {0xf7,0x84,0x31,0x60,0x0f,0x7e,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc8c0, 0, {0x08,0x1d,0xad,0x0a,0xfb,0x60,0x7e,0xd4,0x0f,0x30,0x03,0x6c,0x00,0xcb,0x00,0x32 },
+ 16, 0xc8d0, 0, {0xde,0x2f,0xb2,0x03,0xed,0x42,0x1b,0x60,0x3e,0xc1,0x0d,0xb1,0x03,0xec,0x50,0xf7 },
+ 16, 0xc8e0, 0, {0x80,0x3d,0xd8,0x2e,0x32,0x03,0xec,0x30,0xfb,0x00,0x3e,0x40,0x0f,0xb0,0x03,0xc2 },
+ 16, 0xc8f0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xff,0x00,0xcb,0xd0,0x3f,0xf0 },
+ 16, 0xc900, 0, {0x4c,0xf8,0x13,0xfe,0x00,0xcf,0x88,0x3f,0xe0,0x0c,0xf8,0x43,0x3f,0x00,0xcf,0xc8 },
+ 16, 0xc910, 0, {0x33,0xe0,0x0c,0xf8,0x03,0xfe,0x00,0xff,0x80,0x3f,0xe0,0x2c,0xf8,0x03,0xbe,0x20 },
+ 16, 0xc920, 0, {0xc7,0x80,0x33,0xe0,0x0c,0xf8,0x01,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc930, 0, {0xa8,0x01,0xbc,0x40,0x87,0x90,0x3d,0xc0,0x08,0x40,0x02,0xdc,0x80,0xd7,0x00,0x2d },
+ 16, 0xc940, 0, {0xc0,0x0c,0x30,0x03,0x7c,0x00,0x87,0x10,0x21,0xc4,0x1e,0x70,0x20,0xdc,0x44,0xb7 },
+ 16, 0xc950, 0, {0x00,0x39,0xc0,0x0c,0x71,0x02,0x1c,0x40,0xd7,0x02,0x29,0x40,0x08,0x70,0x02,0x2a },
+ 16, 0xc960, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0x87,0x32,0x2d,0xc0 },
+ 16, 0xc970, 0, {0x08,0x70,0x02,0xdc,0x01,0x87,0x00,0x2c,0xc0,0x2b,0x70,0x0a,0x5c,0x00,0x83,0x00 },
+ 16, 0xc980, 0, {0x23,0xc0,0x08,0x70,0x02,0xdd,0x00,0xb7,0x00,0x2d,0xc4,0x0b,0xf0,0x02,0x9c,0x20 },
+ 16, 0xc990, 0, {0x87,0x18,0x29,0x40,0x08,0x70,0x82,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc9a0, 0, {0x20,0x14,0xcc,0x00,0x83,0x02,0x28,0xc0,0x08,0x10,0x02,0xcc,0x08,0x83,0x40,0x2e },
+ 16, 0xc9b0, 0, {0xc0,0x2a,0x30,0x02,0x0c,0x00,0x8b,0x00,0x20,0xf2,0x0a,0x30,0x02,0xce,0x00,0xb3 },
+ 16, 0xc9c0, 0, {0x88,0x2a,0xd0,0x0a,0x30,0x06,0x0c,0x00,0x92,0x00,0x28,0x78,0x08,0x3c,0x42,0x08 },
+ 16, 0xc9d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x02,0xc7,0x00,0x2f,0xc0 },
+ 16, 0xc9e0, 0, {0x2c,0x90,0x02,0xfc,0x02,0x8f,0xd8,0x3f,0xc0,0x4b,0xf0,0x02,0x7c,0x02,0xcf,0x00 },
+ 16, 0xc9f0, 0, {0x20,0xf2,0x08,0xb0,0x13,0xee,0x80,0xff,0x00,0x3f,0xd4,0x2e,0xbd,0x83,0xac,0x00 },
+ 16, 0xca00, 0, {0xcb,0x80,0x3a,0xa0,0xac,0xb8,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xca10, 0, {0x80,0x00,0xec,0x00,0xfb,0x10,0x3e,0xc0,0x0f,0x84,0x03,0xec,0x10,0xfb,0x00,0x3e },
+ 16, 0xca20, 0, {0xc0,0x01,0xb0,0x03,0xec,0x00,0xfb,0x00,0xbe,0xc0,0x0e,0xb0,0x23,0xec,0x08,0xfb },
+ 16, 0xca30, 0, {0x10,0x3f,0xc0,0x0d,0xb4,0x03,0xed,0x04,0xf9,0x00,0x1e,0x14,0xcf,0xb0,0x83,0xe0 },
+ 16, 0xca40, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xcf,0x00,0x30,0xc0 },
+ 16, 0xca50, 0, {0x0c,0x40,0x03,0xac,0x00,0xff,0x00,0x3f,0xc0,0x2c,0xb0,0x03,0xbc,0x00,0xff,0x00 },
+ 16, 0xca60, 0, {0xb3,0xe0,0x0d,0xfa,0x03,0x7e,0x80,0xcf,0x00,0x33,0xc0,0x0c,0xfc,0x43,0xff,0x20 },
+ 16, 0xca70, 0, {0xff,0x00,0x3f,0x40,0x08,0xf8,0x03,0xc0,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xca80, 0, {0x81,0x04,0x6c,0x10,0xab,0x00,0x2a,0xc0,0x0a,0x8e,0x42,0x2c,0x04,0xbb,0x00,0x2e },
+ 16, 0xca90, 0, {0xc0,0x08,0xb0,0x02,0x6c,0x00,0xbb,0x00,0x3a,0xc0,0x0e,0x30,0x02,0x0d,0x08,0x83 },
+ 16, 0xcaa0, 0, {0x02,0x22,0xc0,0x0a,0xbc,0x02,0xef,0x00,0xbb,0xc0,0x2c,0x68,0x0a,0xb9,0x02,0xe0 },
+ 16, 0xcab0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x0c,0x00,0x8b,0x00,0x22,0xc0 },
+ 16, 0xcac0, 0, {0x08,0xb8,0x02,0xac,0x00,0xbb,0x02,0x2e,0xc0,0x08,0xb0,0x02,0xec,0x00,0xbb,0x00 },
+ 16, 0xcad0, 0, {0x26,0x48,0x19,0xb0,0x02,0x6d,0x00,0x8b,0x00,0x22,0xc0,0x0a,0xb0,0x02,0xec,0x04 },
+ 16, 0xcae0, 0, {0xbb,0x1c,0x2e,0x20,0x0a,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcaf0, 0, {0x08,0x14,0x0c,0x00,0xab,0x20,0x28,0xc0,0x0a,0x00,0x02,0x0c,0x00,0x93,0x04,0x2c },
+ 16, 0xcb00, 0, {0xc1,0x08,0x30,0x02,0x4c,0x00,0xb3,0x00,0x24,0x41,0x09,0xb8,0x02,0x0c,0x02,0x83 },
+ 16, 0xcb10, 0, {0x01,0xa0,0xc0,0x0a,0x30,0x02,0xcc,0x10,0x93,0x00,0x2c,0x00,0x0a,0x30,0x02,0xc2 },
+ 16, 0xcb20, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x7c,0x00,0xcf,0x28,0x33,0xc0 },
+ 16, 0xcb30, 0, {0x0c,0xa0,0x46,0xac,0x11,0xbf,0x00,0x3f,0xc0,0x5c,0xf0,0x43,0xfc,0x00,0xff,0x04 },
+ 16, 0xcb40, 0, {0x32,0x40,0x0d,0xb0,0x03,0x6c,0x08,0xcb,0x04,0x31,0xc0,0x0c,0xb0,0x33,0xed,0x40 },
+ 16, 0xcb50, 0, {0xfb,0x04,0x3e,0x40,0x0e,0xb0,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcb60, 0, {0xa0,0x15,0xfc,0x00,0xff,0x00,0x3f,0xc0,0x0f,0xc0,0x23,0xfc,0x01,0xff,0x00,0x3f },
+ 16, 0xcb70, 0, {0xc0,0x4f,0xf0,0x87,0x7c,0x00,0xff,0x00,0x39,0x40,0x0e,0xf0,0x03,0xfc,0x00,0xff },
+ 16, 0xcb80, 0, {0x00,0x3f,0xc0,0x0f,0x70,0x03,0xdc,0x80,0xff,0x00,0x3d,0x40,0x0f,0x70,0x03,0xe8 },
+ 16, 0xcb90, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x40,0xeb,0x48,0x3e,0xc2 },
+ 16, 0xcba0, 0, {0x0e,0x09,0x03,0xbc,0x60,0xc0,0x20,0x35,0x24,0x0e,0xd2,0x13,0x2c,0x60,0xfb,0x6a },
+ 16, 0xcbb0, 0, {0x33,0xc0,0x0f,0xca,0x03,0x22,0x20,0xc0,0x80,0x37,0xc0,0x0d,0xf0,0x03,0x7c,0x00 },
+ 16, 0xcbc0, 0, {0xef,0x00,0x33,0x24,0x0f,0xc8,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcbd0, 0, {0x80,0x10,0xdd,0x00,0x8f,0x60,0x2f,0xd8,0x08,0xa2,0x02,0xfd,0x80,0xc8,0x70,0x22 },
+ 16, 0xcbe0, 0, {0x00,0x2c,0xfd,0x07,0xdc,0x84,0xbf,0x60,0x23,0xd2,0x0b,0xbd,0x02,0x23,0x00,0x88 },
+ 16, 0xcbf0, 0, {0x80,0xa2,0x20,0x88,0xb0,0x22,0x34,0x00,0xbb,0x50,0x22,0xc8,0x0b,0xb0,0x02,0x20 },
+ 16, 0xcc00, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x40,0xa3,0x03,0x2c,0xc2 },
+ 16, 0xcc10, 0, {0x0a,0x00,0x42,0x8c,0x82,0xa3,0x0a,0x24,0x80,0x0b,0x30,0x02,0xcc,0x90,0xb3,0x00 },
+ 16, 0xcc20, 0, {0x28,0xd8,0x0b,0x10,0x02,0x8c,0x02,0x90,0x00,0x20,0xc0,0x0b,0x10,0x42,0x4c,0x00 },
+ 16, 0xcc30, 0, {0xb3,0x04,0x24,0xc0,0x0b,0x30,0x0e,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcc40, 0, {0xc0,0x15,0xac,0x10,0x9b,0x04,0x2c,0xc0,0xf8,0x98,0x06,0xec,0x00,0xab,0x80,0x26 },
+ 16, 0xcc50, 0, {0x20,0x08,0x90,0x2a,0xac,0x10,0xbb,0x00,0x0a,0xc0,0x1b,0xb0,0x22,0xad,0x00,0x98 },
+ 16, 0xcc60, 0, {0x40,0x2a,0x70,0x4b,0xb0,0x02,0x2c,0x00,0xb3,0x00,0xa6,0x86,0x1b,0xb0,0x82,0xb0 },
+ 16, 0xcc70, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xeb,0x00,0x3e,0xc0 },
+ 16, 0xcc80, 0, {0x8e,0x98,0x03,0xac,0x08,0xe8,0xc0,0x36,0x30,0x4f,0xb0,0x42,0xec,0x00,0xf9,0x80 },
+ 16, 0xcc90, 0, {0x3a,0xc0,0x8f,0x88,0x42,0x20,0x10,0xc8,0x10,0x30,0xf0,0x0f,0x30,0x13,0x6c,0x10 },
+ 16, 0xcca0, 0, {0xeb,0x00,0x36,0xf0,0x0f,0xbd,0x03,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xccb0, 0, {0xe0,0x01,0xbc,0x00,0xef,0x04,0x7f,0xc0,0x0f,0xf0,0x43,0xdc,0x00,0xc4,0x00,0x3b },
+ 16, 0xccc0, 0, {0x40,0x8b,0xdc,0x03,0x7c,0x10,0xf9,0x90,0x36,0xc2,0x4f,0xf9,0x23,0x62,0x41,0xac },
+ 16, 0xccd0, 0, {0x01,0x13,0x40,0x04,0xb0,0x03,0xe4,0x00,0xff,0x00,0x3b,0xc0,0x0f,0xc0,0x03,0x78 },
+ 16, 0xcce0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x8c,0x12,0xcb,0x00,0xf2,0xc0 },
+ 16, 0xccf0, 0, {0x0f,0x80,0x03,0xac,0x08,0xd9,0x00,0x3a,0x80,0x0f,0x12,0x03,0xac,0x00,0xe1,0x00 },
+ 16, 0xcd00, 0, {0x32,0xc0,0x0c,0x90,0x03,0xed,0x02,0xc8,0x40,0x3e,0xd0,0x0f,0x90,0x13,0x2c,0x02 },
+ 16, 0xcd10, 0, {0xdb,0x00,0x3e,0x50,0x0c,0xb4,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcd20, 0, {0xc8,0x05,0x3c,0x00,0x8f,0x00,0x17,0xc0,0x08,0x90,0x02,0x3c,0x08,0x8d,0x00,0x22 },
+ 16, 0xcd30, 0, {0x54,0x08,0xb4,0x03,0x3c,0x00,0x89,0x00,0x23,0xc0,0x40,0x35,0x02,0xcc,0x24,0x80 },
+ 16, 0xcd40, 0, {0x00,0x22,0x74,0x4c,0xb0,0x02,0x2c,0x00,0x8f,0x00,0x2e,0xd4,0x0a,0xb0,0x0a,0x32 },
+ 16, 0xcd50, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x4c,0x02,0x83,0x00,0x24,0xc0 },
+ 16, 0xcd60, 0, {0x09,0x00,0x02,0x8c,0x01,0x90,0x00,0x6a,0x41,0x0a,0x30,0x20,0x4e,0x10,0x31,0x02 },
+ 16, 0xcd70, 0, {0x2c,0xc0,0x09,0x20,0x06,0xce,0x00,0x80,0x00,0x60,0xe0,0x0a,0x30,0x82,0x0c,0x08 },
+ 16, 0xcd80, 0, {0x83,0x08,0x2c,0xd0,0x09,0xb0,0x02,0x78,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcd90, 0, {0x20,0x01,0x1e,0x04,0x87,0xb0,0x20,0xec,0x09,0xe9,0x02,0x8e,0x58,0x9d,0xb0,0x2b },
+ 16, 0xcda0, 0, {0xa5,0x40,0x5b,0x06,0xde,0x40,0x95,0x94,0x2d,0xe4,0x19,0x7b,0x06,0xde,0x00,0x84 },
+ 16, 0xcdb0, 0, {0x80,0x60,0xe0,0x0a,0x78,0x0a,0x16,0x10,0x87,0x80,0x2d,0x68,0x0b,0x79,0x02,0x48 },
+ 16, 0xcdc0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xcb,0xa0,0x24,0xe0 },
+ 16, 0xcdd0, 0, {0x0f,0x2a,0x03,0x8e,0x00,0xd2,0xd0,0x38,0xfa,0x0f,0x18,0xc3,0xce,0x24,0x31,0xb0 },
+ 16, 0xcde0, 0, {0x3c,0xe5,0x0c,0x3b,0x17,0xce,0x04,0xc0,0x82,0x38,0xc2,0x9e,0x10,0x03,0x0c,0x00 },
+ 16, 0xcdf0, 0, {0xc3,0x01,0x3e,0xc0,0x0d,0x81,0x03,0x52,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xce00, 0, {0x40,0x1d,0xbc,0x00,0xef,0x10,0x3e,0xc2,0x0e,0xb1,0x23,0x2c,0xc1,0xab,0x01,0x36 },
+ 16, 0xce10, 0, {0x80,0x0f,0xb0,0x23,0x2d,0x90,0xe9,0x84,0x72,0xc8,0x62,0xf1,0x17,0xfc,0x00,0xfc },
+ 16, 0xce20, 0, {0x00,0x3b,0xc4,0x1d,0xf0,0x03,0xec,0x00,0xef,0x08,0x3f,0xc8,0x0e,0xf1,0x03,0x90 },
+ 16, 0xce30, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x80,0xfb,0xa4,0x3a,0xc8 },
+ 16, 0xce40, 0, {0x0e,0x90,0x03,0x2c,0x04,0xca,0x00,0x30,0x60,0x2d,0x1a,0x27,0x6c,0x84,0xcb,0x60 },
+ 16, 0xce50, 0, {0x32,0xd2,0x0c,0xa0,0x13,0x2d,0x84,0xcb,0x02,0x3e,0xc0,0x0d,0xb8,0x03,0xac,0x80 },
+ 16, 0xce60, 0, {0xcb,0x81,0x32,0x80,0x0c,0xb0,0x03,0xaa,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xce70, 0, {0x48,0x11,0x9c,0xa4,0xb7,0x28,0x73,0xc2,0x08,0xf0,0x02,0x3c,0xc0,0x8f,0x00,0x31 },
+ 16, 0xce80, 0, {0xc0,0x09,0x70,0x82,0x9c,0x80,0x87,0x0c,0x20,0xd8,0x09,0x70,0x22,0x1c,0x30,0x84 },
+ 16, 0xce90, 0, {0x00,0x3d,0xc0,0x08,0x70,0x02,0x14,0x24,0x87,0xa0,0x21,0xc0,0x08,0x70,0x12,0x12 },
+ 16, 0xcea0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x40,0xb3,0x95,0x29,0xe9 },
+ 16, 0xceb0, 0, {0x0a,0x68,0x02,0x9e,0xd0,0x86,0xf0,0xa3,0xe0,0x08,0x78,0x12,0x9e,0x44,0xa3,0x82 },
+ 16, 0xcec0, 0, {0x21,0xe8,0x0b,0x38,0x02,0x0e,0x10,0x87,0x80,0x2f,0xe0,0x0b,0x18,0x02,0x8e,0x02 },
+ 16, 0xced0, 0, {0x87,0x00,0x21,0xe0,0x08,0x78,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcee0, 0, {0x48,0x14,0xcc,0x00,0xb3,0x00,0x24,0xc0,0x48,0x30,0x02,0x0c,0x04,0x83,0x80,0x20 },
+ 16, 0xcef0, 0, {0xd0,0x09,0x10,0x02,0x8c,0x06,0xa3,0x80,0x20,0xc0,0x0b,0x30,0x02,0x0c,0x02,0x80 },
+ 16, 0xcf00, 0, {0x40,0x28,0xd2,0x0a,0x30,0x02,0x0c,0x01,0x83,0x00,0x22,0x3c,0x08,0x87,0x02,0x12 },
+ 16, 0xcf10, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x18,0xfa,0x00,0x3a,0x80 },
+ 16, 0xcf20, 0, {0x8e,0xe4,0x42,0x28,0x02,0xce,0x80,0x33,0x80,0x4d,0xa0,0x83,0xe8,0x00,0xea,0xa0 },
+ 16, 0xcf30, 0, {0xb2,0x80,0x0a,0xa0,0x0a,0x28,0x00,0xce,0x18,0x2f,0x80,0x0f,0xa0,0x13,0xa8,0x00 },
+ 16, 0xcf40, 0, {0xca,0x00,0x32,0x90,0x2c,0xac,0x0b,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcf50, 0, {0x48,0x00,0xe0,0x00,0xf8,0x04,0x3a,0x00,0x0f,0x80,0x83,0xc0,0x08,0xe8,0x03,0x3a },
+ 16, 0xcf60, 0, {0x00,0x0e,0x80,0x22,0xc0,0x00,0xd0,0x00,0x7e,0x10,0xa4,0x80,0x03,0xc0,0x00,0xf8 },
+ 16, 0xcf70, 0, {0x00,0x3e,0x10,0x0d,0x84,0x03,0xc0,0x00,0xf8,0x00,0xbe,0x00,0x0f,0x80,0x01,0x52 },
+ 16, 0xcf80, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc4,0x02,0xc9,0x00,0x36,0x40 },
+ 16, 0xcf90, 0, {0x0c,0x90,0x03,0x64,0x02,0x89,0x04,0x32,0x42,0x0d,0x92,0x03,0xe6,0x42,0xc9,0x00 },
+ 16, 0xcfa0, 0, {0x32,0x70,0x0e,0x12,0x0b,0x24,0x08,0xc9,0x00,0x3e,0x45,0x0e,0x99,0x03,0xe4,0x02 },
+ 16, 0xcfb0, 0, {0xc1,0x00,0x32,0x50,0x04,0x94,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcfc0, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x6e,0x40,0x08,0x90,0x02,0x24,0x00,0x89,0x00,0x22 },
+ 16, 0xcfd0, 0, {0x54,0x0b,0x90,0x03,0xe6,0x00,0x89,0x00,0x22,0x40,0x08,0x90,0x0a,0x24,0x00,0x89 },
+ 16, 0xcfe0, 0, {0x00,0x38,0x48,0x08,0x90,0x82,0xe4,0x04,0xd9,0x00,0x22,0x40,0x08,0x90,0x02,0x20 },
+ 16, 0xcff0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x89,0x01,0x2c,0x40 },
+ 16, 0xd000, 0, {0x28,0x10,0x42,0x64,0x00,0xa1,0x04,0x22,0x50,0x01,0x90,0x42,0xe4,0x00,0x89,0x04 },
+ 16, 0xd010, 0, {0x20,0x42,0x0a,0x90,0x42,0x34,0x00,0x89,0x00,0x6e,0x40,0x0a,0x90,0x00,0xe4,0x00 },
+ 16, 0xd020, 0, {0x89,0x00,0x23,0x40,0x0a,0xd0,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd030, 0, {0x08,0x04,0x04,0x80,0x81,0x24,0x2c,0x48,0x08,0x10,0x02,0x04,0x80,0xa1,0x20,0x28 },
+ 16, 0xd040, 0, {0x40,0x0b,0x10,0x02,0x85,0x80,0x81,0x20,0x20,0x48,0x08,0x50,0x62,0x14,0x02,0x81 },
+ 16, 0xd050, 0, {0x03,0x2e,0x40,0x88,0x16,0x82,0xc4,0xa0,0x91,0x28,0x21,0x40,0x2a,0x50,0x02,0x02 },
+ 16, 0xd060, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xc8,0x50,0x2e,0x14 },
+ 16, 0xd070, 0, {0x0c,0x85,0x03,0x61,0x40,0xe8,0x50,0xb2,0x15,0x4d,0x80,0x02,0xc0,0x00,0x48,0x50 },
+ 16, 0xd080, 0, {0xb2,0x15,0x1a,0x80,0x13,0x30,0x08,0xc8,0x00,0x3e,0x00,0x0e,0x82,0x03,0xe0,0x80 },
+ 16, 0xd090, 0, {0xc0,0x20,0x30,0x00,0x0e,0x40,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd0a0, 0, {0x98,0x1d,0xe4,0x40,0xf9,0x10,0x3e,0x44,0x0f,0xd0,0x03,0xe4,0x48,0xdd,0x10,0x37 },
+ 16, 0xd0b0, 0, {0x40,0x0f,0xd4,0x07,0xe4,0x40,0xfd,0x10,0x3e,0x45,0x0f,0x94,0x03,0xe5,0x08,0xfd },
+ 16, 0xd0c0, 0, {0x02,0x39,0xd0,0x0f,0xd0,0x43,0xf4,0xa0,0xf9,0x28,0x3e,0x4b,0x0d,0x92,0x83,0xe6 },
+ 16, 0xd0d0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0x80,0xc9,0xa6,0x32,0x68 },
+ 16, 0xd0e0, 0, {0x0c,0x90,0x03,0xa6,0x81,0xe9,0xe9,0x3b,0x40,0x0e,0x58,0x03,0x36,0x20,0xc9,0xa0 },
+ 16, 0xd0f0, 0, {0x37,0x78,0x0d,0xda,0x03,0x36,0x26,0xc5,0x00,0x37,0x69,0x0e,0xde,0x03,0xa6,0x82 },
+ 16, 0xd100, 0, {0xcd,0xc0,0x33,0x50,0x0f,0xd0,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd110, 0, {0x38,0x10,0xe3,0xa4,0x88,0xa9,0x22,0x3a,0x08,0x08,0x00,0x22,0xa0,0xb8,0xe5,0x30 },
+ 16, 0xd120, 0, {0x20,0x28,0x80,0x22,0x43,0xa0,0x08,0xe8,0x2a,0x3d,0x08,0xa4,0x62,0x20,0x00,0x88 },
+ 16, 0xd130, 0, {0x00,0x2e,0x10,0x08,0x8e,0x03,0x23,0xa0,0x88,0xa0,0x20,0x28,0x0b,0x8a,0x82,0x0e },
+ 16, 0xd140, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x40,0x91,0x40,0x20,0x44 },
+ 16, 0xd150, 0, {0x08,0x90,0xa2,0x85,0x10,0xa1,0x20,0x2c,0x42,0x0b,0x14,0x12,0x8c,0x01,0x91,0x10 },
+ 16, 0xd160, 0, {0x2c,0x48,0x09,0x11,0x0a,0xc4,0x00,0x81,0x00,0x2c,0x50,0x0b,0x11,0x12,0xc5,0x01 },
+ 16, 0xd170, 0, {0xb1,0x40,0x24,0x48,0x0b,0x18,0x0e,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd180, 0, {0x18,0x15,0xa4,0x00,0x91,0x00,0x22,0x41,0x08,0x94,0x42,0x24,0x00,0xb1,0x40,0x20 },
+ 16, 0xd190, 0, {0x40,0x49,0xb2,0x62,0x24,0x00,0x99,0x00,0x0a,0x40,0x08,0x90,0x02,0xe5,0x80,0x89 },
+ 16, 0xd1a0, 0, {0x00,0x2e,0x40,0x09,0xb0,0x02,0x24,0x80,0xb9,0x00,0x26,0x50,0x4b,0x90,0x02,0x06 },
+ 16, 0xd1b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x02,0xd9,0x00,0xb2,0x40 },
+ 16, 0xd1c0, 0, {0x2c,0x95,0x13,0xa4,0x10,0xe9,0x00,0xbe,0x60,0x8f,0x90,0x0b,0xa4,0x10,0x59,0x00 },
+ 16, 0xd1d0, 0, {0x1e,0x40,0x9d,0x94,0x23,0xe4,0x02,0x89,0x00,0x34,0x40,0x0f,0x90,0x03,0xe6,0x08 },
+ 16, 0xd1e0, 0, {0x79,0x00,0xb6,0x40,0x07,0x98,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd1f0, 0, {0x28,0x01,0x84,0x00,0xe9,0x02,0x3c,0x40,0x2f,0x98,0x02,0xe4,0x00,0xf9,0x42,0x3a },
+ 16, 0xd200, 0, {0x68,0x0a,0x10,0x03,0xe4,0x10,0xe9,0x00,0x3e,0x40,0x0e,0x90,0x0f,0x26,0x00,0xf9 },
+ 16, 0xd210, 0, {0x04,0x3e,0x40,0x0e,0x1c,0x03,0xe6,0x00,0xc1,0x00,0x3a,0x50,0x0f,0x99,0x83,0xca },
+ 16, 0xd220, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xe8,0x00,0x3a,0x00 },
+ 16, 0xd230, 0, {0x0c,0x84,0x03,0x20,0x00,0xd8,0x42,0x32,0x04,0x0c,0x88,0x13,0xe0,0x00,0xc8,0x00 },
+ 16, 0xd240, 0, {0x30,0x00,0x0c,0x04,0x0b,0x00,0x00,0xd8,0x00,0x36,0x00,0x0e,0x80,0x23,0x00,0x00 },
+ 16, 0xd250, 0, {0xc8,0x80,0x32,0x00,0x0c,0x80,0x01,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd260, 0, {0x28,0x05,0x28,0x10,0x8a,0x00,0x2e,0x80,0x28,0x20,0x22,0x28,0x00,0x8a,0x00,0x23 },
+ 16, 0xd270, 0, {0xb0,0x88,0xe0,0x02,0x28,0x10,0xda,0x00,0xa3,0xb4,0x08,0xe8,0x10,0x28,0x00,0x8e },
+ 16, 0xd280, 0, {0x20,0x23,0xa0,0x48,0xed,0x1a,0x28,0x00,0xde,0x00,0x23,0x90,0x0a,0xe0,0x02,0x0a },
+ 16, 0xd290, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xa3,0x00,0x28,0xc0 },
+ 16, 0xd2a0, 0, {0x08,0x30,0x0a,0x0c,0x00,0x93,0x00,0x20,0xc2,0x2a,0x30,0x22,0xa4,0x00,0xbb,0x00 },
+ 16, 0xd2b0, 0, {0x08,0xe0,0x18,0x09,0x0a,0x4c,0x00,0x93,0x02,0x24,0xe8,0x02,0x08,0x06,0x4c,0x00 },
+ 16, 0xd2c0, 0, {0x93,0x00,0x20,0xd8,0x0a,0x90,0x02,0x4a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd2d0, 0, {0xa0,0x01,0x1c,0x80,0x87,0x04,0x2d,0xc0,0x08,0x70,0x02,0x0e,0x00,0x87,0x10,0x25 },
+ 16, 0xd2e0, 0, {0x00,0x0a,0x60,0x02,0x5e,0x00,0x97,0x00,0x29,0x82,0x08,0x50,0x12,0x54,0x00,0x8f },
+ 16, 0xd2f0, 0, {0x80,0x61,0xd0,0x08,0x04,0x02,0x5c,0x01,0xb7,0x08,0xa9,0xa0,0x0a,0x50,0x82,0x68 },
+ 16, 0xd300, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3e,0x80,0xe7,0x80,0x38,0xe4 },
+ 16, 0xd310, 0, {0x08,0x7e,0x03,0x1f,0x00,0xdf,0x80,0xb1,0x21,0x1e,0x78,0x03,0xdc,0x04,0xf3,0x80 },
+ 16, 0xd320, 0, {0x5b,0xe1,0x08,0x28,0x03,0x5e,0x00,0xd7,0x80,0x35,0x60,0x0e,0x68,0x03,0x4e,0x00 },
+ 16, 0xd330, 0, {0xdf,0x80,0x31,0xe0,0x0e,0xf8,0x0b,0x6a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd340, 0, {0x08,0x1d,0xad,0x02,0xfb,0x74,0x3e,0xd0,0x4f,0xb2,0x83,0xed,0x00,0x7b,0x68,0x3a },
+ 16, 0xd350, 0, {0x00,0x8d,0x80,0x03,0xa4,0x20,0xdb,0x01,0x36,0x80,0x6f,0xb0,0x41,0x84,0x00,0xeb },
+ 16, 0xd360, 0, {0x00,0x3c,0xc0,0x0f,0xe6,0x83,0xbc,0x40,0xdb,0x00,0xb6,0x80,0x0f,0xb0,0x03,0x82 },
+ 16, 0xd370, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xff,0x20,0xdf,0xc0,0x3b,0xe6 },
+ 16, 0xd380, 0, {0x0e,0xf8,0x13,0xff,0x44,0xc7,0x82,0x3b,0xe0,0x0f,0xf9,0x03,0xbe,0x10,0xcf,0xc8 },
+ 16, 0xd390, 0, {0x33,0x60,0x8d,0xeb,0x03,0x3e,0x00,0xdb,0x82,0x3f,0xe0,0x0c,0xd8,0x03,0x3e,0x40 },
+ 16, 0xd3a0, 0, {0xce,0x80,0x33,0xe4,0x0f,0xf8,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd3b0, 0, {0xa8,0x11,0xbc,0x40,0x87,0x00,0x21,0xe4,0x0b,0x78,0xa2,0xce,0x90,0xc7,0xb0,0x20 },
+ 16, 0xd3c0, 0, {0xe8,0x0b,0x28,0x92,0xb6,0x88,0x87,0xa0,0x20,0x64,0x0b,0x35,0x03,0x14,0x00,0x87 },
+ 16, 0xd3d0, 0, {0xb2,0x39,0xc0,0x2c,0xc0,0x03,0x5e,0x02,0xcf,0x00,0x31,0xce,0x0b,0x76,0x12,0x2a },
+ 16, 0xd3e0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xa3,0x10,0x29,0xc8 },
+ 16, 0xd3f0, 0, {0x0b,0x74,0x02,0xdc,0x80,0x8f,0x00,0x29,0xcc,0x0a,0x30,0x06,0x14,0x80,0x87,0x10 },
+ 16, 0xd400, 0, {0x21,0xc0,0x0b,0x66,0x02,0x5c,0x00,0x87,0x00,0x2d,0xc0,0x0b,0x51,0x02,0x1c,0x80 },
+ 16, 0xd410, 0, {0x96,0x00,0x21,0xc0,0x5b,0x74,0x82,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd420, 0, {0x20,0x14,0xcc,0x08,0xa3,0x00,0x20,0xc0,0x0b,0xb8,0x02,0xcc,0x00,0x8b,0x40,0xa8 },
+ 16, 0xd430, 0, {0xc0,0x8b,0x08,0x22,0x8c,0x02,0x83,0x00,0x60,0xc0,0x0b,0x30,0x42,0x04,0x00,0x83 },
+ 16, 0xd440, 0, {0x40,0x28,0xfc,0x8a,0x00,0x02,0x6e,0x00,0x83,0x00,0xa0,0xd0,0x8b,0x38,0x02,0x08 },
+ 16, 0xd450, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xbc,0x02,0xef,0x00,0x3b,0xc0 },
+ 16, 0xd460, 0, {0x4f,0xf8,0x02,0xfc,0x02,0xcf,0x00,0x38,0x12,0x0e,0x98,0x02,0x2c,0x00,0xcf,0x00 },
+ 16, 0xd470, 0, {0x32,0xc0,0x09,0x90,0x03,0x64,0x02,0x81,0xc0,0x3e,0xd0,0x0f,0x90,0x07,0x3c,0x03 },
+ 16, 0xd480, 0, {0xd9,0x00,0x32,0x60,0x0f,0x88,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd490, 0, {0x80,0x00,0xcc,0x00,0xdb,0x00,0x3e,0xc0,0x8f,0xb0,0x03,0xec,0x00,0xfb,0x02,0x36 },
+ 16, 0xd4a0, 0, {0xc0,0x4f,0x90,0x02,0xe4,0x00,0xfb,0x00,0xbe,0x90,0x0f,0x9c,0x13,0xec,0x00,0xe9 },
+ 16, 0xd4b0, 0, {0x18,0x3a,0xd0,0x04,0xd5,0x03,0xec,0x40,0xe9,0x00,0x3a,0x00,0x8f,0x80,0x03,0xe0 },
+ 16, 0xd4c0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xcf,0x00,0x3d,0xc1 },
+ 16, 0xd4d0, 0, {0x8c,0xf0,0x03,0x2c,0x00,0xef,0x0a,0xb3,0x12,0x2c,0x70,0x23,0x14,0x0a,0x4f,0x00 },
+ 16, 0xd4e0, 0, {0x35,0x60,0x0d,0xb0,0x03,0x04,0x00,0xcd,0x80,0x07,0xe8,0x0c,0xc4,0x03,0x2c,0x00 },
+ 16, 0xd4f0, 0, {0xcd,0x00,0x31,0xe2,0x2c,0xe0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd500, 0, {0x81,0x04,0x6c,0x02,0xab,0x02,0x2e,0xc0,0x0e,0xb0,0x02,0x2c,0x00,0x8b,0x00,0x32 },
+ 16, 0xd510, 0, {0x30,0x00,0x9c,0x03,0x6c,0x00,0x8b,0x04,0x22,0x36,0x08,0x34,0x4a,0x2c,0x08,0x89 },
+ 16, 0xd520, 0, {0x90,0x20,0xb8,0x0f,0x84,0x00,0xac,0x02,0x89,0x00,0x36,0xa0,0x08,0xa4,0x02,0x20 },
+ 16, 0xd530, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x8b,0x00,0x2e,0xc0 },
+ 16, 0xd540, 0, {0x08,0xb0,0x02,0x0c,0x00,0x8b,0x00,0x22,0xd1,0x08,0x88,0x12,0x26,0x00,0xa3,0x00 },
+ 16, 0xd550, 0, {0x26,0x40,0x0b,0xb0,0x02,0x26,0x00,0x8b,0x00,0x26,0xc0,0x58,0x10,0x12,0x2c,0x04 },
+ 16, 0xd560, 0, {0x82,0x80,0x2a,0x49,0x08,0x30,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd570, 0, {0x08,0x04,0x0c,0x00,0xa3,0x14,0x2c,0xc8,0x1a,0x34,0x8a,0x0c,0x84,0x83,0x40,0x22 },
+ 16, 0xd580, 0, {0xc8,0x08,0x03,0x62,0x4c,0xc0,0xa3,0x60,0x20,0x40,0x0a,0x30,0x02,0x0c,0x00,0x8b },
+ 16, 0xd590, 0, {0x45,0x08,0xc0,0x0b,0x10,0x02,0x8c,0xa0,0x83,0x00,0x26,0x40,0x08,0x30,0x0a,0x02 },
+ 16, 0xd5a0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x00,0xcf,0x40,0x2f,0xd2 },
+ 16, 0xd5b0, 0, {0x8c,0xf6,0x03,0x3c,0x22,0xcf,0x40,0x32,0xd6,0x4c,0xa6,0xc1,0x3d,0xa0,0x87,0x48 },
+ 16, 0xd5c0, 0, {0x36,0x0d,0x0f,0xb1,0x02,0x24,0x42,0xcb,0x60,0x16,0xc0,0x0c,0xd0,0x03,0x2c,0x80 },
+ 16, 0xd5d0, 0, {0xca,0x00,0x32,0xc0,0x0c,0x30,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd5e0, 0, {0xa0,0x19,0xfc,0x00,0xff,0x20,0x3e,0xca,0x0e,0xb0,0x03,0xec,0x20,0xdb,0x34,0x3a },
+ 16, 0xd5f0, 0, {0xc8,0x0f,0x80,0x03,0xe4,0x10,0xdb,0x21,0x3e,0x18,0x0d,0xf2,0x03,0xfc,0x80,0xff },
+ 16, 0xd600, 0, {0x30,0x35,0xc0,0x0f,0xc0,0x13,0xec,0x00,0xff,0x00,0x3b,0xc0,0x0f,0xf0,0x03,0xe8 },
+ 16, 0xd610, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x11,0xfc,0x00,0xfb,0x0b,0x2f,0xca },
+ 16, 0xd620, 0, {0x8d,0xf2,0x03,0xfa,0x00,0x96,0x80,0x3b,0xc4,0x0d,0xf1,0x03,0x7c,0x80,0xec,0x80 },
+ 16, 0xd630, 0, {0x3b,0x08,0x0c,0xc2,0x03,0x74,0x02,0xcc,0x80,0x3f,0x48,0x0e,0xf0,0x03,0x30,0xa0 },
+ 16, 0xd640, 0, {0xd5,0x80,0x3f,0x40,0x0c,0xf8,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd650, 0, {0x80,0x08,0xee,0x40,0xbf,0x80,0x2f,0xf0,0x0b,0xf7,0x22,0xee,0x20,0x8a,0x80,0x23 },
+ 16, 0xd660, 0, {0xfc,0x88,0x75,0x12,0x3d,0x00,0x88,0x00,0x22,0x00,0x28,0x80,0x02,0x24,0x08,0x88 },
+ 16, 0xd670, 0, {0x00,0x6f,0x50,0x00,0xf5,0x02,0x29,0x00,0x89,0x00,0x2e,0x54,0x0d,0x90,0x11,0xa0 },
+ 16, 0xd680, 0, {0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0xb3,0x00,0x2c,0xc1 },
+ 16, 0xd690, 0, {0x09,0x30,0x82,0xcc,0x82,0xbb,0x00,0x28,0xc0,0x49,0x32,0x02,0xcd,0x00,0xb8,0x00 },
+ 16, 0xd6a0, 0, {0x2c,0x50,0x09,0x01,0x02,0x0c,0x40,0x80,0x00,0x6c,0x44,0x09,0x30,0x02,0x20,0x00 },
+ 16, 0xd6b0, 0, {0xb0,0x00,0x2c,0x40,0x18,0x30,0x06,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd6c0, 0, {0xc0,0x01,0xac,0x00,0xbb,0x01,0x2e,0xc0,0x0b,0xb0,0x02,0xee,0x00,0xaa,0x00,0x4a },
+ 16, 0xd6d0, 0, {0xc0,0x08,0xb0,0x52,0xec,0x00,0x98,0x02,0x26,0x40,0x09,0x80,0x02,0x6c,0x01,0xaa },
+ 16, 0xd6e0, 0, {0x04,0x2e,0x40,0x09,0xb0,0x02,0x22,0x00,0xa9,0x80,0x2e,0x41,0x09,0x90,0x02,0xf0 },
+ 16, 0xd6f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xec,0x00,0xfb,0x00,0x3e,0xc0 },
+ 16, 0xd700, 0, {0x0d,0xb0,0x03,0xce,0x84,0xfa,0x00,0x1a,0xc0,0x8d,0xb0,0x43,0xec,0x00,0xf0,0x02 },
+ 16, 0xd710, 0, {0x3f,0x00,0x0d,0xd1,0x03,0x35,0x00,0xcb,0x48,0x2e,0x40,0x2f,0xb0,0x09,0x22,0x80 },
+ 16, 0xd720, 0, {0xf9,0xc8,0x1e,0xe0,0x08,0xb1,0xe2,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd730, 0, {0xe0,0x01,0xbc,0x00,0x7b,0x00,0x3f,0xc0,0x0f,0xf0,0x23,0xfc,0x00,0xde,0x00,0x24 },
+ 16, 0xd740, 0, {0xc0,0x4f,0xf0,0x03,0x2c,0x00,0xec,0x20,0x3b,0x00,0x0e,0x98,0x03,0x94,0x02,0xdd },
+ 16, 0xd750, 0, {0x00,0x3f,0x40,0x4e,0xf0,0x01,0xf8,0x00,0xdd,0x00,0x3c,0xe4,0x0f,0xd8,0x03,0xb8 },
+ 16, 0xd760, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xac,0xc0,0xfb,0x20,0x32,0xc8 },
+ 16, 0xd770, 0, {0x8d,0xb0,0x03,0xec,0x00,0xf9,0x00,0x3a,0xc2,0x2c,0x30,0x03,0x6c,0x04,0xd8,0x02 },
+ 16, 0xd780, 0, {0x3c,0x44,0x8d,0x10,0x03,0xad,0x03,0xea,0x00,0x3c,0x40,0x0c,0x70,0x23,0xe4,0x00 },
+ 16, 0xd790, 0, {0xc8,0x40,0x3a,0xc0,0x0d,0xbc,0x03,0x50,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd7a0, 0, {0xc8,0x01,0x3d,0x00,0xbf,0x42,0x23,0xf0,0x0d,0xf0,0x02,0xe5,0x00,0xe2,0x01,0x37 },
+ 16, 0xd7b0, 0, {0xf1,0x08,0xf0,0x0e,0x3d,0xc0,0xa8,0x00,0x2e,0x54,0x28,0x90,0x02,0x2c,0x00,0x8a },
+ 16, 0xd7c0, 0, {0x05,0x3b,0x41,0x48,0xf5,0x03,0x8c,0x00,0x89,0x00,0x22,0xd4,0x0e,0x95,0x02,0xf2 },
+ 16, 0xd7d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb3,0x04,0x20,0xc0 },
+ 16, 0xd7e0, 0, {0x89,0x30,0x02,0xcc,0x40,0xb2,0x00,0x2c,0xc4,0x48,0x30,0x02,0x2c,0x02,0xa2,0x00 },
+ 16, 0xd7f0, 0, {0x2c,0x20,0x19,0x20,0x1a,0x80,0x08,0xb0,0x00,0x6c,0x40,0x08,0x30,0x02,0xc4,0x00 },
+ 16, 0xd800, 0, {0x81,0x00,0x2c,0x40,0x08,0x30,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd810, 0, {0x20,0x01,0x1e,0x00,0xb7,0xa0,0xe1,0xe0,0x09,0x78,0x02,0xdf,0x04,0xae,0x80,0x2d },
+ 16, 0xd820, 0, {0xe0,0x08,0x79,0x02,0x1e,0x10,0x87,0x90,0x2c,0x28,0x29,0x68,0x02,0x82,0x81,0xb4 },
+ 16, 0xd830, 0, {0x80,0x2d,0x60,0x08,0x78,0x10,0xbc,0x00,0x8f,0x80,0x2d,0x60,0x0b,0x68,0x02,0xc8 },
+ 16, 0xd840, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x0c,0x05,0xf3,0x92,0x30,0xca },
+ 16, 0xd850, 0, {0x0d,0x30,0x03,0xcc,0x00,0xf3,0x00,0x3c,0xc0,0x0c,0x30,0x02,0x0c,0x80,0x70,0x00 },
+ 16, 0xd860, 0, {0x2c,0x40,0x0d,0x20,0x03,0x89,0x00,0xb1,0x00,0x3e,0x40,0x2c,0x30,0x03,0xec,0x50 },
+ 16, 0xd870, 0, {0xc3,0x20,0x3c,0x40,0x0c,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd880, 0, {0x40,0x1d,0xbc,0x00,0xff,0x00,0x3c,0xc0,0x0e,0xb0,0x83,0xec,0x40,0xea,0x00,0x36 },
+ 16, 0xd890, 0, {0xc2,0x0f,0xb0,0x83,0xac,0x00,0xf8,0x00,0x3e,0x48,0x0e,0xe0,0x0b,0x7a,0x80,0xcf },
+ 16, 0xd8a0, 0, {0x00,0x3b,0x44,0x0f,0xf0,0x03,0xec,0xc0,0xff,0x00,0x03,0x44,0x0e,0xe0,0x03,0xd0 },
+ 16, 0xd8b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xfb,0x23,0x3e,0xc8 },
+ 16, 0xd8c0, 0, {0x1d,0xb0,0x03,0xee,0x00,0xca,0x00,0x3e,0xc8,0x0c,0xb2,0x03,0x2d,0x90,0xc8,0x84 },
+ 16, 0xd8d0, 0, {0x36,0x00,0x2d,0xb0,0x03,0x60,0x18,0x9b,0x80,0x33,0x50,0x0c,0xf2,0x03,0xe2,0x00 },
+ 16, 0xd8e0, 0, {0xc9,0x80,0x32,0x40,0x0c,0xb8,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd8f0, 0, {0x48,0x11,0x9c,0x00,0xb7,0x28,0x0c,0xd2,0x28,0x73,0x02,0xfc,0x00,0x86,0x04,0x2c },
+ 16, 0xd900, 0, {0xcc,0x28,0x70,0x83,0x0c,0x20,0x95,0x01,0x20,0x00,0x09,0x30,0x12,0x10,0x04,0x85 },
+ 16, 0xd910, 0, {0x00,0x21,0x52,0x08,0x75,0x02,0xd8,0x00,0x87,0x00,0x21,0x40,0x08,0x60,0x02,0x12 },
+ 16, 0xd920, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0xd4,0xb7,0xb1,0x09,0xe1 },
+ 16, 0xd930, 0, {0x08,0x78,0x22,0xde,0x00,0x95,0x80,0x2d,0xe0,0x08,0x78,0x0a,0x5e,0x42,0x94,0xc0 },
+ 16, 0xd940, 0, {0x21,0x60,0x08,0x78,0x02,0x5a,0x00,0x87,0x80,0x2d,0x68,0x08,0x7a,0x02,0xd7,0x00 },
+ 16, 0xd950, 0, {0x97,0x80,0x20,0x60,0x09,0x78,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd960, 0, {0x48,0x10,0xcc,0x00,0xb3,0x00,0x2c,0xc0,0x08,0xb0,0x02,0xcd,0x80,0x92,0x00,0x2c },
+ 16, 0xd970, 0, {0xc0,0x08,0xb0,0x02,0xcc,0x00,0x90,0x80,0xa0,0x40,0x09,0x36,0x02,0x48,0x02,0x83 },
+ 16, 0xd980, 0, {0xa0,0xac,0x40,0x2a,0x30,0x06,0xce,0x02,0x93,0x04,0xa0,0x40,0x09,0x20,0x0a,0x12 },
+ 16, 0xd990, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfa,0x00,0x3a,0x80 },
+ 16, 0xd9a0, 0, {0x0d,0xa0,0x03,0xfb,0x02,0xde,0x80,0x3e,0x80,0x0c,0xa0,0x03,0x28,0x00,0xce,0x80 },
+ 16, 0xd9b0, 0, {0x32,0x80,0x0c,0xa4,0x03,0x78,0x00,0xce,0xa4,0x3f,0x80,0x0c,0xa0,0x07,0xf9,0x00 },
+ 16, 0xd9c0, 0, {0xde,0x00,0x32,0x80,0x2d,0xe0,0x02,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd9d0, 0, {0x48,0x00,0xe1,0x00,0xf8,0x00,0x7c,0x00,0x0f,0x80,0x03,0xe0,0x40,0xe8,0x10,0x3c },
+ 16, 0xd9e0, 0, {0x01,0xcf,0x80,0x0f,0x20,0x00,0xe8,0x00,0x3e,0x00,0x0e,0x04,0x03,0x90,0x00,0xe8 },
+ 16, 0xd9f0, 0, {0x00,0x20,0x00,0x0d,0x80,0x07,0xe0,0x00,0xe8,0x00,0x3e,0x04,0x0e,0x80,0x03,0xd2 },
+ 16, 0xda00, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x10,0x7e,0x41 },
+ 16, 0xda10, 0, {0x0e,0x90,0x03,0x24,0x00,0xf9,0x00,0x36,0x68,0x0e,0x90,0x0f,0xa4,0x08,0xc9,0x00 },
+ 16, 0xda20, 0, {0x3a,0x40,0x0c,0x90,0x0b,0x24,0x12,0xe9,0x00,0x3e,0x44,0x2c,0x90,0x03,0x64,0x24 },
+ 16, 0xda30, 0, {0xf9,0x02,0x2e,0x40,0x0c,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xda40, 0, {0x80,0x04,0x65,0x10,0xb9,0x80,0x3e,0x40,0x08,0x90,0x0a,0x26,0x00,0xb1,0x10,0x2a },
+ 16, 0xda50, 0, {0x72,0x08,0x90,0x07,0x64,0x02,0x89,0x40,0x2e,0x40,0x28,0x90,0x12,0x25,0x00,0x89 },
+ 16, 0xda60, 0, {0x45,0x3e,0x50,0x0d,0x90,0x0a,0x25,0x00,0xb9,0x40,0x2e,0x40,0x28,0x94,0x03,0xe0 },
+ 16, 0xda70, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x00,0x2e,0x40 },
+ 16, 0xda80, 0, {0x48,0x90,0x42,0x26,0x01,0xb9,0x40,0x26,0x40,0x0a,0x90,0x42,0x84,0x01,0x8b,0x08 },
+ 16, 0xda90, 0, {0x2c,0x40,0x09,0xd0,0x82,0x34,0x32,0xa9,0x08,0x6e,0x42,0x08,0x10,0x02,0x24,0x20 },
+ 16, 0xdaa0, 0, {0xb9,0x08,0x2c,0x40,0x18,0x90,0x82,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdab0, 0, {0x08,0x04,0x04,0x80,0xb3,0x20,0x28,0x48,0x08,0x12,0x02,0x04,0x01,0xb1,0x00,0x28 },
+ 16, 0xdac0, 0, {0x58,0x08,0x12,0x02,0x05,0x89,0x81,0x40,0x2c,0x58,0x08,0x56,0x06,0x15,0x80,0x81 },
+ 16, 0xdad0, 0, {0x40,0x28,0x50,0x09,0x14,0x02,0x05,0x80,0xb1,0x40,0x2c,0x5a,0x08,0x14,0x02,0xc2 },
+ 16, 0xdae0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x68,0x00,0xf8,0x00,0x2e,0x00 },
+ 16, 0xdaf0, 0, {0x2e,0x85,0x03,0x21,0x48,0xf8,0x00,0x36,0x00,0x8e,0x05,0x02,0xa0,0x08,0x80,0x00 },
+ 16, 0xdb00, 0, {0x3e,0x00,0x0d,0x80,0x0b,0x10,0x04,0xe0,0x00,0x2c,0x00,0x4c,0x80,0x03,0x40,0x00 },
+ 16, 0xdb10, 0, {0xf0,0x00,0x3e,0x08,0x0c,0x00,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdb20, 0, {0x98,0x1d,0xe4,0x40,0xf9,0x10,0x3e,0x44,0x0f,0x91,0x03,0xf4,0x00,0xfd,0x00,0x3e },
+ 16, 0xdb30, 0, {0x44,0x0f,0x91,0x03,0xe4,0x40,0xfd,0x03,0x3f,0x44,0x1f,0x91,0x1b,0xe4,0x40,0xfd },
+ 16, 0xdb40, 0, {0x01,0x3f,0x50,0x0e,0x94,0x03,0xf4,0x40,0xfd,0x00,0x3f,0x40,0x0f,0xd0,0x03,0xa6 },
+ 16, 0xdb50, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xf4,0x00,0xcd,0xa0,0x71,0x68 },
+ 16, 0xdb60, 0, {0x8d,0x98,0x03,0xd4,0x00,0xcd,0x00,0x33,0x60,0x0c,0x98,0x8f,0x27,0x20,0xc9,0x40 },
+ 16, 0xdb70, 0, {0x3e,0x78,0x0c,0x9e,0x8b,0x27,0x20,0xd1,0x11,0x30,0x60,0x8c,0x9c,0x03,0x25,0x00 },
+ 16, 0xdb80, 0, {0xf9,0x40,0x3e,0x78,0x0f,0x90,0x03,0x46,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdb90, 0, {0x38,0x10,0xe0,0x10,0x88,0x01,0x22,0x01,0x08,0x8c,0x22,0xe8,0x00,0x88,0x02,0x2a },
+ 16, 0xdba0, 0, {0x14,0x08,0x8c,0x0b,0x23,0x90,0x88,0xa0,0x2e,0xb0,0x08,0x8c,0x42,0x23,0x00,0x88 },
+ 16, 0xdbb0, 0, {0xa0,0x36,0x2a,0x18,0x8a,0x02,0x22,0x00,0xb8,0xa0,0x2e,0x34,0x0b,0xca,0x82,0x0e },
+ 16, 0xdbc0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0x81,0x40,0x24,0x50 },
+ 16, 0xdbd0, 0, {0x09,0x16,0x82,0xc4,0x00,0xa9,0x00,0x20,0x40,0x08,0x12,0x92,0x54,0x08,0x85,0x00 },
+ 16, 0xdbe0, 0, {0x2f,0x4c,0x09,0x52,0x12,0x14,0x80,0x9d,0x00,0x21,0x50,0x08,0x54,0x22,0x14,0x80 },
+ 16, 0xdbf0, 0, {0xb5,0x00,0x2d,0x48,0x0b,0xd0,0x02,0x42,0x05,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdc00, 0, {0x18,0x05,0xa4,0x02,0x89,0x01,0xa2,0x40,0x48,0x90,0x02,0xe4,0x02,0xa9,0x00,0x2a },
+ 16, 0xdc10, 0, {0x40,0x68,0x90,0x02,0x64,0x10,0xad,0x00,0x2f,0x41,0x28,0x50,0x02,0x34,0x00,0x8d },
+ 16, 0xdc20, 0, {0x44,0x27,0x40,0x39,0xd0,0x02,0x35,0x00,0xbd,0x14,0x2f,0x40,0x0b,0xd0,0x02,0x46 },
+ 16, 0xdc30, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xc4,0x00,0xc9,0x00,0x36,0x40 },
+ 16, 0xdc40, 0, {0x2d,0x90,0x03,0xe7,0x00,0xe1,0xe0,0x32,0x40,0x0c,0x90,0x0b,0x64,0x02,0xc9,0x08 },
+ 16, 0xdc50, 0, {0x3c,0x50,0x0c,0x90,0x02,0x26,0x02,0xd9,0xc0,0x32,0x40,0x0c,0x90,0x13,0x27,0x00 },
+ 16, 0xdc60, 0, {0xf9,0x20,0x3e,0x40,0x0f,0x90,0x03,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdc70, 0, {0x28,0x01,0xa4,0x02,0xf9,0x00,0x38,0x40,0x0f,0x90,0x03,0xe6,0x80,0xd9,0xa0,0x3c },
+ 16, 0xdc80, 0, {0x40,0x0f,0x10,0x03,0xa4,0x00,0xd9,0x10,0x3e,0x40,0x0f,0x90,0x03,0xc4,0x92,0xf9 },
+ 16, 0xdc90, 0, {0x21,0x3c,0x40,0x2e,0x90,0x0f,0xe6,0x80,0xf9,0x80,0x3e,0x40,0x0f,0x90,0x03,0x8a },
+ 16, 0xdca0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa0,0x40,0xe8,0x10,0x3e,0x04 },
+ 16, 0xdcb0, 0, {0x4e,0x80,0x03,0x20,0x80,0xd8,0x60,0x3a,0x02,0x0c,0x80,0x13,0x20,0x00,0xf8,0x40 },
+ 16, 0xdcc0, 0, {0x36,0x10,0x2d,0x80,0x03,0xa0,0x08,0xe8,0x40,0x32,0x00,0x0d,0x00,0x03,0x21,0x02 },
+ 16, 0xdcd0, 0, {0xc8,0x40,0xb2,0x00,0x0f,0xc0,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdce0, 0, {0x28,0x11,0x3b,0x10,0x86,0x01,0x2f,0xa0,0x0d,0xa0,0x02,0x38,0x00,0x8e,0xe0,0x23 },
+ 16, 0xdcf0, 0, {0xa2,0x08,0xa0,0x02,0x28,0x00,0xba,0x80,0x22,0x80,0x08,0xa0,0x02,0x28,0x00,0x82 },
+ 16, 0xdd00, 0, {0x00,0x2a,0x80,0x28,0xa0,0x02,0x2a,0x04,0x8a,0x80,0x22,0xa0,0x0b,0x60,0x02,0xca },
+ 16, 0xdd10, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x43,0x80,0xa2,0x00,0x2c,0xa0 },
+ 16, 0xdd20, 0, {0x08,0x30,0x02,0x2e,0x00,0x92,0x00,0x28,0xc0,0x28,0x30,0x02,0x2c,0x00,0xb3,0x80 },
+ 16, 0xdd30, 0, {0x24,0xc0,0x09,0x30,0x0a,0x8c,0x00,0xa3,0x00,0x60,0xc0,0x08,0x30,0x0a,0x4c,0x00 },
+ 16, 0xdd40, 0, {0x83,0x00,0x20,0xe0,0x0b,0x20,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdd50, 0, {0xa0,0x01,0x10,0x00,0x86,0x00,0x2d,0xc0,0x09,0x3a,0x02,0x35,0x00,0x86,0x00,0x21 },
+ 16, 0xdd60, 0, {0xc0,0x08,0x73,0x02,0x10,0x00,0xbf,0x88,0x21,0x00,0x08,0x70,0x02,0x1c,0x08,0x8f },
+ 16, 0xdd70, 0, {0x00,0x2b,0xc0,0x08,0x20,0x12,0x5e,0x20,0x87,0x88,0x21,0x83,0x0b,0x60,0x02,0xe8 },
+ 16, 0xdd80, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x12,0x00,0xe5,0x81,0x3d,0xa0 },
+ 16, 0xdd90, 0, {0x2c,0x7a,0x0b,0x1e,0x00,0xd4,0x80,0x38,0xe0,0x0c,0xfa,0x0b,0x1e,0x00,0xf6,0x80 },
+ 16, 0xdda0, 0, {0x34,0xe0,0x0d,0x28,0x03,0x8a,0x00,0xe6,0x80,0x31,0x20,0x0c,0x78,0x03,0x7a,0x04 },
+ 16, 0xddb0, 0, {0xce,0x84,0x31,0xe0,0x4f,0x78,0x43,0xea,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xddc0, 0, {0x08,0x0d,0x80,0x00,0xf8,0x00,0x3e,0xc0,0x0f,0xb5,0x23,0xe4,0x00,0xf0,0x04,0x36 },
+ 16, 0xddd0, 0, {0x40,0x0f,0xb6,0x87,0xe0,0x00,0xf2,0x00,0x3e,0x00,0x1f,0xa0,0x0b,0xe8,0x00,0xfa },
+ 16, 0xdde0, 0, {0x00,0x3e,0x00,0x0e,0xa0,0x03,0xa8,0x00,0xfa,0x00,0x3e,0x80,0x0f,0xb0,0x03,0xc2 },
+ 16, 0xddf0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xcc,0x80,0x33,0xa0 },
+ 16, 0xde00, 0, {0x0c,0xfc,0x03,0x3e,0x00,0xfc,0x80,0x37,0xe0,0x0f,0xb9,0x21,0x3e,0x00,0xfd,0x82 },
+ 16, 0xde10, 0, {0x33,0xe0,0x2c,0xf8,0x03,0x7e,0x10,0xdf,0x84,0x3d,0xe0,0x0c,0xf8,0x03,0xf6,0x00 },
+ 16, 0xde20, 0, {0xfd,0x80,0x3f,0x60,0x0c,0xe8,0x23,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xde30, 0, {0xa8,0x11,0x98,0x40,0x84,0x10,0x21,0xc0,0x08,0x70,0x02,0x10,0x80,0xb4,0x00,0x21 },
+ 16, 0xde40, 0, {0xc8,0x0b,0x7a,0x02,0x10,0x00,0xfd,0x00,0x21,0x04,0x08,0x70,0x02,0x1c,0x42,0x87 },
+ 16, 0xde50, 0, {0x00,0x2d,0xc4,0x48,0x61,0x02,0xd6,0x80,0xb5,0x00,0x2f,0x04,0x08,0x61,0x82,0x2a },
+ 16, 0xde60, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x81,0x00,0x21,0x80 },
+ 16, 0xde70, 0, {0x08,0x30,0x02,0x1c,0x10,0xbc,0x08,0x25,0x80,0x4b,0x30,0x0e,0x1c,0x00,0xb4,0x00 },
+ 16, 0xde80, 0, {0x20,0xc0,0x08,0x20,0x02,0x58,0x00,0x96,0x00,0x2f,0x00,0x0a,0x70,0x02,0xd0,0x80 },
+ 16, 0xde90, 0, {0xb4,0x18,0x2d,0x40,0x09,0xf8,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdea0, 0, {0x20,0x14,0xc8,0x02,0x80,0x00,0xa0,0xc0,0x08,0x30,0x22,0x0b,0xc0,0xb0,0xc0,0x22 },
+ 16, 0xdeb0, 0, {0x80,0x0b,0x30,0x02,0x00,0x00,0xa0,0x04,0x22,0x00,0x28,0xa0,0x02,0x2b,0x00,0x8a },
+ 16, 0xdec0, 0, {0x00,0x2c,0x00,0x08,0xa0,0x06,0xc0,0x00,0xb0,0xc2,0x2c,0x00,0x09,0xbc,0x1a,0x08 },
+ 16, 0xded0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa0,0x00,0xc8,0x00,0x32,0xc0 },
+ 16, 0xdee0, 0, {0x0c,0xf0,0x0b,0x26,0x00,0xf9,0xc0,0x36,0x00,0x0f,0xf0,0x13,0x2c,0x10,0xbb,0x40 },
+ 16, 0xdef0, 0, {0xf2,0xc0,0x08,0x90,0x03,0x67,0x00,0xd9,0x80,0x3e,0xc0,0x08,0x90,0x02,0xec,0x00 },
+ 16, 0xdf00, 0, {0xfb,0xd0,0x3e,0xc0,0x29,0x8c,0x00,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdf10, 0, {0x80,0x00,0xe0,0x00,0xf8,0x44,0x3c,0xd0,0x2f,0xb0,0x03,0xe4,0x00,0xf9,0x20,0x3e },
+ 16, 0xdf20, 0, {0x40,0x0f,0x30,0x03,0xe0,0x00,0xfb,0x08,0x3e,0x00,0x0f,0x90,0x13,0xe4,0x42,0xf9 },
+ 16, 0xdf30, 0, {0x10,0x3e,0xc0,0x0f,0x80,0x03,0xee,0x00,0xfb,0x00,0x3e,0x80,0x0e,0x82,0x03,0xe0 },
+ 16, 0xdf40, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xe0,0x08,0xfc,0x80,0x32,0xe4 },
+ 16, 0xdf50, 0, {0x0e,0xf0,0x03,0x74,0x00,0xfc,0x00,0x3f,0x40,0x0c,0xf0,0x0b,0x3c,0x00,0xfe,0x00 },
+ 16, 0xdf60, 0, {0x3f,0xc0,0x0d,0xc1,0x03,0x20,0x20,0xcc,0x10,0x33,0x00,0x0c,0xd1,0x03,0x58,0x00 },
+ 16, 0xdf70, 0, {0xce,0x00,0x2f,0xc0,0x0f,0xd1,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdf80, 0, {0x81,0x44,0x62,0x00,0xb0,0x40,0x2a,0xf1,0x08,0xb0,0x12,0x26,0x08,0xb8,0xc8,0x2e },
+ 16, 0xdf90, 0, {0x70,0x0a,0xb0,0x02,0x20,0x00,0xba,0x00,0x2e,0x00,0x28,0x80,0x03,0x22,0x40,0x88 },
+ 16, 0xdfa0, 0, {0x01,0x20,0x00,0x0a,0x80,0x02,0x28,0x00,0x8a,0x01,0x2e,0x80,0x8b,0x90,0x02,0x20 },
+ 16, 0xdfb0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x26,0x00,0xb8,0x28,0x22,0x42 },
+ 16, 0xdfc0, 0, {0x08,0x30,0x02,0x66,0x00,0xb8,0x80,0x2e,0x30,0x88,0xb0,0x02,0x2c,0x00,0xb9,0x01 },
+ 16, 0xdfd0, 0, {0x2e,0xc0,0x88,0x90,0x02,0xa4,0x00,0x89,0x00,0x22,0xc0,0x08,0x90,0x02,0x24,0x0c },
+ 16, 0xdfe0, 0, {0x89,0x01,0x2e,0x40,0x1b,0x80,0x02,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdff0, 0, {0x08,0x04,0x00,0x00,0xb0,0x00,0x28,0xc0,0x28,0x30,0x02,0x00,0x00,0xb0,0x00,0x2c },
+ 16, 0xe000, 0, {0x40,0x0a,0x30,0x02,0x00,0x00,0xb1,0x00,0x2c,0x00,0x08,0x10,0x0a,0x04,0x00,0x81 },
+ 16, 0xe010, 0, {0x01,0xa2,0xc0,0x08,0x00,0x0a,0x04,0x80,0x81,0x00,0x2c,0x00,0x1b,0x00,0x0a,0x02 },
+ 16, 0xe020, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xf8,0x00,0x32,0x40 },
+ 16, 0xe030, 0, {0x0e,0xf0,0x23,0x64,0x08,0xf8,0x00,0x2e,0x00,0x0c,0xf0,0x03,0x2c,0x00,0xf8,0x00 },
+ 16, 0xe040, 0, {0x3e,0xc0,0x0c,0x80,0x03,0x20,0x02,0xc8,0x04,0x32,0x00,0x1c,0x90,0x03,0x20,0x00 },
+ 16, 0xe050, 0, {0xc8,0x01,0x3e,0x41,0x9f,0x90,0x43,0x40,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe060, 0, {0xa0,0x1d,0xf0,0x00,0xfc,0x0c,0x3f,0xc0,0x0f,0xf0,0x03,0xf0,0x10,0xf4,0x00,0x3f },
+ 16, 0xe070, 0, {0x00,0x0f,0xf4,0x23,0xf0,0x00,0xfc,0x00,0x3f,0x00,0x0e,0xc0,0x03,0xb0,0x00,0xfc },
+ 16, 0xe080, 0, {0x00,0x3f,0x00,0x0f,0xc0,0x03,0xe1,0x00,0xfc,0x00,0x3f,0x01,0x1f,0x50,0x03,0xe8 },
+ 16, 0xe090, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x0d,0xf0,0xd0,0xff,0x20,0x3e,0xd0 },
+ 16, 0xe0a0, 0, {0x8e,0xb0,0x03,0xec,0xa0,0xdb,0x28,0x3e,0xcc,0x0c,0xb3,0x03,0xad,0x08,0xf8,0x3c },
+ 16, 0xe0b0, 0, {0x32,0x23,0x0e,0x48,0x23,0x7a,0x00,0xfd,0x94,0x3f,0xe0,0x0f,0x78,0x33,0xee,0x08 },
+ 16, 0xe0c0, 0, {0xbf,0x80,0x3f,0xe4,0x0f,0xf9,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe0d0, 0, {0xa0,0x00,0xec,0xc8,0xbf,0xd1,0x0f,0xc8,0x0c,0x26,0x82,0xfd,0x24,0x8f,0x00,0x2e },
+ 16, 0xe0e0, 0, {0x99,0x0a,0xf2,0x62,0x1d,0xd0,0x99,0x61,0x22,0x71,0x88,0x88,0x02,0xac,0x00,0xb8 },
+ 16, 0xe0f0, 0, {0x22,0x2e,0x20,0x4b,0x88,0x03,0xa0,0x00,0x80,0x00,0x2e,0x08,0x0b,0x80,0x23,0x60 },
+ 16, 0xe100, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x04,0xb3,0x03,0x0c,0xcc },
+ 16, 0xe110, 0, {0x0a,0x13,0x12,0xcc,0x14,0xa3,0x0e,0x0c,0x58,0x0a,0x33,0x02,0x8c,0x10,0xa3,0x20 },
+ 16, 0xe120, 0, {0xa0,0x0a,0x18,0x90,0x02,0x48,0xa0,0xb0,0x20,0x24,0x80,0x0a,0x20,0x02,0xcc,0x09 },
+ 16, 0xe130, 0, {0xa1,0x00,0x2c,0x80,0x0b,0x32,0x42,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe140, 0, {0xe0,0x11,0xac,0x20,0xbb,0x00,0x2e,0xc0,0x4b,0x80,0xa2,0xec,0x00,0xab,0x00,0x4e },
+ 16, 0xe150, 0, {0x46,0x2a,0xb0,0x02,0x2c,0x04,0x9b,0x80,0x2a,0x60,0x8a,0x9c,0x02,0xac,0x00,0xb9 },
+ 16, 0xe160, 0, {0x81,0x2e,0x40,0x0b,0x98,0x02,0xa3,0x00,0x8a,0x00,0x2e,0x40,0x0b,0x80,0x04,0xf0 },
+ 16, 0xe170, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe1,0x00,0xfb,0x04,0x3e,0xc0 },
+ 16, 0xe180, 0, {0x0e,0xb4,0x03,0xec,0x0a,0xdb,0x02,0x2e,0xd1,0x0e,0xb0,0x03,0xac,0x00,0xfb,0x82 },
+ 16, 0xe190, 0, {0x32,0x28,0x1e,0x0c,0x03,0x68,0x00,0xb9,0x00,0x3e,0x40,0x4f,0xb0,0x43,0xed,0x00 },
+ 16, 0xe1a0, 0, {0xea,0x00,0x3e,0x40,0x0f,0x80,0x03,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe1b0, 0, {0xc0,0x01,0xb8,0x18,0xff,0x02,0x1f,0xc0,0x0c,0xe2,0x03,0xfc,0x00,0xdf,0x03,0x2f },
+ 16, 0xe1c0, 0, {0xa1,0x0f,0x70,0x03,0xfc,0x04,0xab,0x04,0x37,0x42,0x2d,0xd0,0x02,0x7c,0x00,0xfc },
+ 16, 0xe1d0, 0, {0x00,0x3f,0x80,0x0f,0xc0,0x03,0xb0,0x00,0xfd,0x00,0x3f,0x80,0x0f,0xf0,0x03,0x78 },
+ 16, 0xe1e0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa9,0x00,0xdb,0x00,0x3c,0xc0 },
+ 16, 0xe1f0, 0, {0x2e,0x94,0x01,0x6c,0x11,0xcb,0x00,0xb8,0xc0,0x0c,0xb0,0x03,0x6c,0x00,0xeb,0x01 },
+ 16, 0xe200, 0, {0x32,0x10,0x07,0x92,0x03,0xa8,0x00,0xf8,0x00,0x3e,0x0c,0x07,0xa2,0x03,0xad,0x00 },
+ 16, 0xe210, 0, {0xd8,0x00,0x32,0x00,0x0c,0x80,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe220, 0, {0xc8,0x05,0x28,0x08,0xbf,0x00,0x2f,0xc0,0x88,0x80,0x02,0x3c,0x08,0xef,0x03,0x22 },
+ 16, 0xe230, 0, {0x00,0x0d,0xf5,0x00,0x3c,0x00,0x8b,0x82,0x22,0x60,0x03,0x9c,0x02,0x2c,0x10,0xb9 },
+ 16, 0xe240, 0, {0xb0,0x22,0xf0,0x0b,0x90,0x02,0x20,0x00,0xbb,0x00,0x22,0xe2,0x0d,0xb0,0x02,0xf2 },
+ 16, 0xe250, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x40,0x00,0xb3,0x02,0x2c,0xc0 },
+ 16, 0xe260, 0, {0x08,0x30,0x02,0x6c,0x00,0x83,0x00,0x20,0xc0,0x09,0x34,0x04,0xec,0x00,0xa8,0x00 },
+ 16, 0xe270, 0, {0x22,0xf0,0x0b,0x00,0x02,0x88,0x00,0xb3,0x00,0x28,0xe0,0x0b,0x14,0x02,0xa0,0x00 },
+ 16, 0xe280, 0, {0x93,0x00,0x20,0xc0,0x08,0xb0,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe290, 0, {0x20,0x01,0x1e,0x04,0xb7,0x80,0x2d,0xe8,0x08,0x78,0x02,0x0e,0xc8,0xa7,0x90,0x21 },
+ 16, 0xe2a0, 0, {0xa8,0x19,0x38,0x52,0x9e,0xc1,0x87,0x80,0x21,0xe2,0x0b,0xd9,0x82,0x9e,0x00,0xb6 },
+ 16, 0xe2b0, 0, {0xa0,0x2d,0x20,0x0b,0x68,0x02,0x1e,0x00,0xb4,0xc1,0x21,0x20,0x09,0x48,0x02,0xc8 },
+ 16, 0xe2c0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x0c,0x80,0xb3,0x10,0x3e,0xe0 },
+ 16, 0xe2d0, 0, {0x0e,0x3a,0x07,0x4e,0x00,0xcb,0x90,0x3a,0x61,0x0d,0x38,0x03,0xce,0xd1,0xe1,0x98 },
+ 16, 0xe2e0, 0, {0x30,0xa4,0x8f,0x10,0x03,0x88,0x00,0xba,0xa1,0x3c,0x84,0x07,0x00,0x03,0x82,0xd4 },
+ 16, 0xe2f0, 0, {0xd1,0x00,0x72,0x80,0x0c,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe300, 0, {0x40,0x15,0xbc,0x04,0xff,0x00,0x3f,0xc0,0x0f,0xc2,0x23,0xec,0xb0,0xff,0x00,0x32 },
+ 16, 0xe310, 0, {0x04,0x06,0xb4,0x23,0x7c,0x10,0xbf,0x00,0x3e,0x84,0x0f,0xb0,0x03,0x7c,0x40,0xff },
+ 16, 0xe320, 0, {0x00,0x33,0x40,0x0f,0xf0,0x03,0xfc,0x00,0xfe,0x00,0xbf,0x40,0x0f,0xc8,0x03,0xd0 },
+ 16, 0xe330, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xe4,0x00,0xcb,0x33,0x3e,0xc8 },
+ 16, 0xe340, 0, {0x4c,0xb0,0x03,0xac,0x90,0xdb,0xa0,0x36,0xc0,0x0e,0xba,0x43,0x6c,0x00,0xc9,0x00 },
+ 16, 0xe350, 0, {0x3e,0x40,0x0f,0x00,0x0f,0x28,0x00,0xfb,0x00,0x3e,0x40,0x0f,0x18,0x43,0x60,0x00 },
+ 16, 0xe360, 0, {0xfa,0x00,0x3e,0x40,0x4f,0x08,0x0b,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe370, 0, {0x48,0x11,0x9c,0x10,0x07,0x08,0x2c,0xca,0x08,0x20,0x02,0x1c,0x20,0x87,0x28,0x3f },
+ 16, 0xe380, 0, {0x80,0x8a,0xf0,0x02,0x1d,0x40,0x87,0x04,0x2d,0xc0,0x0b,0x70,0x02,0x1c,0x00,0xb6 },
+ 16, 0xe390, 0, {0x00,0x2d,0x80,0x0b,0x60,0x03,0x1c,0x00,0xb5,0x00,0x2d,0x80,0x0b,0x70,0x02,0x12 },
+ 16, 0xe3a0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x8e,0x00,0x87,0xa0,0x2d,0xe4 },
+ 16, 0xe3b0, 0, {0x0a,0x58,0x02,0x1e,0x01,0x83,0x90,0x21,0x70,0x0b,0x79,0x02,0x9e,0x01,0x85,0xc0 },
+ 16, 0xe3c0, 0, {0x2d,0xe0,0x4b,0x58,0x12,0x1a,0x00,0xb6,0x80,0x2d,0x20,0x0b,0x48,0x02,0x52,0x00 },
+ 16, 0xe3d0, 0, {0xb4,0x80,0x2d,0x20,0x0b,0x48,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe3e0, 0, {0x48,0x14,0xec,0x00,0x83,0x00,0x2c,0xc0,0x88,0x36,0x02,0x0c,0x02,0x83,0x00,0x6c },
+ 16, 0xe3f0, 0, {0xc0,0x0b,0x30,0x0a,0xac,0x00,0x9b,0xe0,0x6c,0xc8,0x0b,0x32,0x02,0x0c,0x01,0xb3 },
+ 16, 0xe400, 0, {0x00,0x2c,0xc0,0x0b,0x30,0x02,0x0c,0x10,0xb3,0x40,0x2c,0xc0,0x0b,0x3c,0x82,0x12 },
+ 16, 0xe410, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x02,0xca,0x00,0x3e,0x80 },
+ 16, 0xe420, 0, {0x0e,0xe4,0x8b,0x28,0x00,0xca,0x00,0x33,0x95,0x0f,0xa0,0x07,0xa8,0x02,0xce,0x40 },
+ 16, 0xe430, 0, {0x3f,0xb0,0x0f,0xe4,0x82,0x28,0x00,0xfa,0x00,0x3e,0x80,0x0f,0xa0,0x23,0x68,0x00 },
+ 16, 0xe440, 0, {0xfa,0x40,0x3e,0x81,0x4f,0xa4,0xe3,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe450, 0, {0x48,0x00,0xe0,0x80,0xf0,0x00,0x3c,0x00,0x2f,0x00,0x02,0x60,0x00,0xe8,0x00,0x3c },
+ 16, 0xe460, 0, {0x00,0x0e,0x80,0x01,0x20,0x00,0xe8,0x04,0x5e,0x04,0x0f,0x80,0x03,0xe0,0x00,0xfc },
+ 16, 0xe470, 0, {0x01,0x3f,0x10,0x0f,0xc4,0x03,0xb0,0x00,0xfc,0x09,0x3f,0x00,0x0f,0xc0,0x03,0xd2 },
+ 16, 0xe480, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xa9,0x20,0x36,0x40 },
+ 16, 0xe490, 0, {0x0e,0x90,0x03,0x44,0x04,0xd9,0x00,0x3e,0x40,0x0d,0x90,0x03,0xe4,0x04,0xc9,0x00 },
+ 16, 0xe4a0, 0, {0x32,0x40,0x8f,0x90,0x0b,0xe4,0x08,0xf9,0x00,0x3e,0x44,0x0e,0x98,0x03,0xe6,0x00 },
+ 16, 0xe4b0, 0, {0xf9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe4c0, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x22,0x40,0x18,0x90,0x02,0x24,0x00,0x89,0x00,0x2e },
+ 16, 0xe4d0, 0, {0x40,0x08,0x94,0x02,0xe4,0x00,0xd9,0x04,0x22,0x40,0x0b,0x1c,0x0b,0x64,0x00,0xb9 },
+ 16, 0xe4e0, 0, {0x94,0x2c,0x50,0x08,0x9c,0x02,0xe4,0x14,0xb9,0x90,0x0e,0x40,0x0b,0x90,0x02,0xe0 },
+ 16, 0xe4f0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x02,0x89,0x00,0x26,0x40 },
+ 16, 0xe500, 0, {0x4a,0x90,0x02,0x64,0x00,0x99,0x04,0x2e,0x40,0x08,0x98,0x82,0xe4,0x00,0x89,0x00 },
+ 16, 0xe510, 0, {0x6a,0x40,0x0a,0x92,0x82,0xe4,0x00,0xbd,0x01,0x2f,0x50,0x12,0xd6,0x02,0xf4,0x40 },
+ 16, 0xe520, 0, {0xbd,0x00,0x0f,0x40,0x0b,0xd0,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe530, 0, {0x08,0x04,0x04,0x80,0x81,0x20,0x20,0x48,0x08,0x12,0x02,0x04,0x80,0x81,0x22,0x2c },
+ 16, 0xe540, 0, {0x48,0xa8,0x12,0x06,0xc4,0x90,0x91,0x20,0x28,0x50,0x0b,0x90,0x02,0x45,0x00,0xb5 },
+ 16, 0xe550, 0, {0x40,0x6d,0x40,0x08,0x50,0x12,0xd4,0x04,0xb5,0x02,0x2d,0x40,0x0b,0x50,0x02,0xc2 },
+ 16, 0xe560, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xc8,0x00,0x36,0x14 },
+ 16, 0xe570, 0, {0x0a,0x85,0x03,0x41,0x40,0xd8,0x50,0x2e,0x14,0x0c,0x85,0x03,0xc1,0x40,0xc8,0x50 },
+ 16, 0xe580, 0, {0xba,0x00,0x0e,0x80,0x23,0xe0,0x00,0x78,0x00,0x3e,0x00,0x0e,0x80,0x03,0xe0,0x04 },
+ 16, 0xe590, 0, {0xf8,0x00,0x3e,0x00,0x0f,0xc0,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe5a0, 0, {0x98,0x1d,0xf4,0x40,0xd9,0x10,0x3e,0x44,0x07,0xf1,0x03,0xe4,0x40,0xf9,0x10,0x3f },
+ 16, 0xe5b0, 0, {0x44,0xaf,0x91,0x03,0xe4,0x40,0xfd,0x10,0x37,0x50,0x0f,0xd0,0x03,0xe4,0x00,0xf9 },
+ 16, 0xe5c0, 0, {0x00,0x3e,0x40,0x0f,0x90,0x03,0xe4,0xa0,0xf9,0x28,0x3e,0x4a,0x0f,0x92,0x83,0xe6 },
+ 16, 0xe5d0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0xd4,0xfd,0xa2,0x3a,0x70 },
+ 16, 0xe5e0, 0, {0x8c,0x9e,0x03,0x26,0x80,0xc9,0xa0,0x32,0x68,0x0c,0xdb,0x43,0x27,0x80,0x9d,0xa2 },
+ 16, 0xe5f0, 0, {0xb7,0x40,0x0f,0x50,0x03,0x65,0x00,0xfd,0x00,0x3f,0xc1,0x07,0xd0,0x03,0xf5,0x04 },
+ 16, 0xe600, 0, {0xfd,0x40,0x2f,0xc0,0x0c,0xd0,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe610, 0, {0x38,0x10,0xe3,0x88,0xb8,0x50,0x22,0x38,0x08,0x8e,0x00,0xa2,0xa0,0x88,0xe8,0x22 },
+ 16, 0xe620, 0, {0x38,0x48,0x88,0x03,0x62,0x10,0xa8,0xe8,0x3c,0x00,0x0b,0x80,0x03,0x62,0x80,0xb8 },
+ 16, 0xe630, 0, {0x01,0x2e,0x80,0x0b,0x80,0x21,0xa2,0x00,0xb0,0x84,0x2e,0x2a,0x28,0x8a,0x82,0xce },
+ 16, 0xe640, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x40,0xb1,0x00,0x28,0x58 },
+ 16, 0xe650, 0, {0x80,0x13,0x40,0x05,0x00,0x81,0x40,0x20,0x52,0x28,0x16,0x02,0x85,0x80,0x9b,0xc2 },
+ 16, 0xe660, 0, {0x64,0x41,0x8b,0x98,0x02,0x04,0x00,0xb1,0x09,0x2c,0x40,0x1b,0x10,0x20,0xc4,0x00 },
+ 16, 0xe670, 0, {0xb1,0x00,0x2c,0x40,0x48,0x10,0x02,0xc2,0x05,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe680, 0, {0x18,0x15,0xa5,0x84,0xb9,0x00,0x20,0x40,0x08,0x90,0x02,0x24,0x00,0x01,0x00,0x20 },
+ 16, 0xe690, 0, {0x50,0x08,0x90,0x42,0x64,0x00,0xa9,0x10,0xae,0x58,0x03,0x98,0x02,0x64,0x00,0xb9 },
+ 16, 0xe6a0, 0, {0x00,0x2e,0x40,0x0b,0x90,0x46,0xa4,0x10,0xb9,0x00,0x2e,0x41,0x08,0x90,0x02,0xc6 },
+ 16, 0xe6b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xe7,0x00,0xf9,0x00,0x2a,0x40 },
+ 16, 0xe6c0, 0, {0x2c,0x94,0x0b,0x24,0x02,0xc9,0x00,0xb2,0x44,0x0c,0x90,0x03,0x24,0x04,0xd9,0x80 },
+ 16, 0xe6d0, 0, {0xb6,0x41,0x8f,0x18,0x03,0x24,0x00,0xf9,0x60,0x3e,0x40,0x0f,0x96,0x03,0xe4,0x00 },
+ 16, 0xe6e0, 0, {0xf9,0x80,0x3e,0x42,0x8c,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe6f0, 0, {0x28,0x01,0xa6,0x00,0xf1,0x00,0x3e,0x40,0x0f,0x1c,0x03,0xc4,0x00,0xf9,0x00,0x3e },
+ 16, 0xe700, 0, {0x40,0x8f,0x90,0x23,0xc4,0x10,0xf9,0x00,0xbe,0x40,0x0f,0x90,0x0b,0xe4,0x00,0xf9 },
+ 16, 0xe710, 0, {0x00,0x3e,0x40,0x07,0x90,0x23,0xe4,0x00,0xf9,0x20,0x3e,0x40,0x8f,0x90,0x03,0xca },
+ 16, 0xe720, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x00,0xf8,0x00,0xbe,0x00 },
+ 16, 0xe730, 0, {0x0e,0x84,0x03,0x20,0x00,0xc8,0x00,0x32,0x00,0x0c,0x00,0x83,0x20,0x00,0xf8,0x00 },
+ 16, 0xe740, 0, {0x3e,0x00,0x0c,0x80,0x03,0xa0,0x00,0xf8,0x00,0x36,0x10,0x0f,0x80,0x43,0xe0,0x08 },
+ 16, 0xe750, 0, {0xf8,0x00,0x32,0x00,0x0f,0x80,0x03,0xca,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe760, 0, {0x28,0x05,0x28,0x00,0xba,0x00,0x22,0x80,0x48,0xa0,0x03,0x68,0x00,0xaa,0x00,0x2a },
+ 16, 0xe770, 0, {0x80,0x08,0xe0,0x03,0x68,0x00,0x82,0x00,0x2f,0x80,0x08,0xe6,0x02,0x28,0x04,0xbe },
+ 16, 0xe780, 0, {0x40,0x23,0x80,0x0b,0xe8,0x02,0xea,0x00,0xbe,0x01,0x22,0x80,0x0b,0xe0,0x02,0xca },
+ 16, 0xe790, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x01,0x93,0x01,0x20,0xc1 },
+ 16, 0xe7a0, 0, {0x0a,0x30,0x02,0x0c,0x00,0xa3,0x00,0x20,0xc0,0x88,0x38,0x42,0x0c,0x00,0xa3,0x00 },
+ 16, 0xe7b0, 0, {0x24,0xc0,0x0a,0x3e,0x42,0x8c,0x00,0xb2,0x4c,0x24,0xe0,0x4b,0x38,0x02,0xc4,0x41 },
+ 16, 0xe7c0, 0, {0xb3,0x00,0x22,0xc0,0x0b,0x10,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe7d0, 0, {0xa0,0x01,0x1c,0x00,0xb7,0x00,0x20,0xc9,0x48,0x70,0x02,0xdc,0x40,0xa7,0x14,0x2c },
+ 16, 0xe7e0, 0, {0xc8,0x28,0x30,0x82,0x5c,0xc1,0x85,0x00,0x2d,0xe0,0x2a,0xf0,0x12,0x1c,0x80,0xb7 },
+ 16, 0xe7f0, 0, {0xa0,0x21,0x82,0x0b,0x70,0x82,0xd4,0x11,0xb6,0x80,0x21,0x40,0x4b,0x50,0x02,0xe8 },
+ 16, 0xe800, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x80,0xd5,0x80,0x29,0xea },
+ 16, 0xe810, 0, {0x4e,0x3a,0x07,0x0e,0x80,0xe3,0xb0,0x31,0xfc,0x0c,0x48,0x03,0x0e,0x41,0xe7,0x80 },
+ 16, 0xe820, 0, {0x3d,0xe0,0x0e,0x78,0x03,0x9e,0x80,0xf4,0xc4,0x35,0xe0,0x0f,0x78,0x27,0xde,0x00 },
+ 16, 0xe830, 0, {0xf5,0x80,0xb1,0xe0,0x0f,0x58,0x03,0xea,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe840, 0, {0x08,0x1d,0xac,0x00,0x31,0x04,0x3a,0xc4,0x0f,0xb5,0x93,0x6d,0x08,0xfb,0x40,0x3a },
+ 16, 0xe850, 0, {0xc8,0x63,0x80,0x23,0xec,0x98,0xe9,0x00,0x3e,0xc0,0x0d,0xb0,0x43,0xec,0x00,0xf3 },
+ 16, 0xe860, 0, {0x80,0x3e,0x40,0x4f,0xa0,0x03,0xec,0x00,0xf8,0x68,0x3e,0x40,0x8f,0x98,0x03,0xc2 },
+ 16, 0xe870, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x60,0xeb,0x90,0x3e,0xe4 },
+ 16, 0xe880, 0, {0x0f,0xb8,0x00,0x3f,0x40,0xcb,0x80,0x7f,0xe0,0x0e,0xfb,0x03,0x2e,0x40,0xcb,0x80 },
+ 16, 0xe890, 0, {0x3f,0xe0,0x0f,0x79,0x43,0x2e,0x60,0xca,0x81,0x33,0x64,0x8f,0xd9,0x03,0xfe,0x00 },
+ 16, 0xe8a0, 0, {0xff,0x81,0x33,0xe0,0x0f,0xd9,0x8b,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe8b0, 0, {0xa8,0x01,0x9c,0x00,0x87,0x81,0x19,0xe4,0x0b,0xfa,0x13,0x5e,0x80,0x87,0xb2,0x2d },
+ 16, 0xe8c0, 0, {0xec,0x0d,0x79,0x01,0x9e,0x00,0xd5,0x90,0x2d,0xf8,0x0b,0x78,0x03,0x7e,0x08,0xab },
+ 16, 0xe8d0, 0, {0x91,0x29,0x85,0x0b,0x51,0x02,0xdc,0x48,0xb6,0x40,0x21,0x40,0x0b,0x50,0x02,0x2a },
+ 16, 0xe8e0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8c,0x14,0xb5,0x20,0x6d,0xc8 },
+ 16, 0xe8f0, 0, {0x0b,0x72,0x02,0x5c,0x80,0x87,0x20,0x69,0xc0,0x88,0x53,0x02,0xcc,0x81,0x97,0x50 },
+ 16, 0xe900, 0, {0x2d,0xc8,0x0b,0xf7,0x0a,0xdc,0xc0,0x84,0x01,0x21,0x44,0x1b,0x70,0x22,0xdc,0x00 },
+ 16, 0xe910, 0, {0xb5,0x00,0x21,0xc4,0x0b,0x50,0x86,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe920, 0, {0x20,0x14,0xcf,0x30,0x91,0x00,0x2c,0xc0,0x0b,0x34,0x02,0x4c,0x00,0x83,0x00,0x2c },
+ 16, 0xe930, 0, {0xf2,0x0b,0x10,0x22,0x0c,0x00,0x91,0x00,0x2c,0xc8,0x0b,0x18,0x0a,0xcd,0x01,0xa3 },
+ 16, 0xe940, 0, {0x00,0x28,0x60,0x0b,0x21,0x02,0xce,0x20,0xb8,0x40,0xa0,0x54,0x0b,0x18,0x02,0x08 },
+ 16, 0xe950, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xbd,0x00,0xf9,0x00,0x2f,0xc0 },
+ 16, 0xe960, 0, {0x0f,0xf4,0x02,0x7c,0x12,0xcf,0x03,0x3f,0xc2,0x0e,0xb0,0x03,0xfc,0x04,0x9b,0x02 },
+ 16, 0xe970, 0, {0x2e,0xf2,0x0f,0xa4,0x0b,0xdc,0x00,0xce,0x00,0xb0,0xc8,0x8f,0xa4,0x03,0xef,0x00 },
+ 16, 0xe980, 0, {0xf8,0x80,0x32,0xf5,0x1f,0xdd,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe990, 0, {0x80,0x00,0xec,0x40,0xe9,0x00,0x3a,0xc0,0x0f,0xb1,0x03,0xcc,0x00,0xf3,0x00,0x3e },
+ 16, 0xe9a0, 0, {0xc0,0x0d,0xb4,0x09,0xec,0x18,0xf9,0x10,0x3e,0x10,0x4f,0xb1,0x0a,0x6c,0x80,0xf9 },
+ 16, 0xe9b0, 0, {0x89,0x36,0x82,0x0b,0xa6,0x03,0xec,0x50,0xf9,0x50,0x3e,0xc0,0x1f,0x90,0x03,0x60 },
+ 16, 0xe9c0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xfd,0xa0,0x3d,0xc0 },
+ 16, 0xe9d0, 0, {0x0c,0x70,0x83,0x2c,0x00,0xef,0x02,0x35,0xc0,0x0d,0xe2,0x03,0xfc,0x04,0xff,0x02 },
+ 16, 0xe9e0, 0, {0x2d,0xe0,0x8e,0xf0,0x03,0x3c,0x10,0xdc,0x00,0x3f,0x80,0x0c,0xd8,0x03,0xfc,0x00 },
+ 16, 0xe9f0, 0, {0xde,0x18,0x33,0xf0,0x4f,0xd0,0x03,0xc0,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea00, 0, {0x81,0x00,0x6c,0x00,0xb9,0x00,0x2e,0xc0,0x4c,0xb0,0x03,0x6c,0x00,0x8b,0x02,0x36 },
+ 16, 0xea10, 0, {0xc0,0x0d,0xac,0x12,0xec,0x00,0x79,0x00,0x2e,0x30,0x0d,0x3d,0x42,0xac,0x00,0x89 },
+ 16, 0xea20, 0, {0x88,0x1a,0x10,0x0d,0x86,0x02,0xee,0x04,0xbb,0x40,0x22,0xe0,0x0b,0x90,0x02,0xe0 },
+ 16, 0xea30, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x01,0xb9,0x00,0x2e,0xc0 },
+ 16, 0xea40, 0, {0x08,0xb0,0x42,0xac,0x00,0x0b,0x05,0x26,0xc0,0x09,0x94,0x20,0xec,0x00,0xb9,0x80 },
+ 16, 0xea50, 0, {0x6e,0xc4,0x88,0xb0,0x82,0x2c,0x00,0x9b,0x82,0x2e,0x42,0x08,0x81,0x02,0xe4,0x80 },
+ 16, 0xea60, 0, {0xb8,0x00,0x22,0xc1,0x0b,0x90,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea70, 0, {0x08,0x04,0x0c,0x10,0xb1,0x25,0x2c,0xca,0x08,0x34,0x46,0xcc,0x08,0x83,0x00,0x24 },
+ 16, 0xea80, 0, {0xc2,0x0b,0x02,0x52,0xcc,0x81,0x83,0x00,0x2c,0x00,0x19,0xb2,0x42,0xac,0x80,0x81 },
+ 16, 0xea90, 0, {0x08,0x28,0x80,0x09,0x00,0x02,0xc4,0x40,0xb1,0x00,0x20,0xc0,0x0b,0x10,0x02,0xc2 },
+ 16, 0xeaa0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x6c,0x00,0xb9,0x00,0x3f,0xd0 },
+ 16, 0xeab0, 0, {0x08,0xf6,0x07,0xbc,0xc2,0xaf,0x30,0x75,0xdc,0x0d,0x16,0x02,0xfc,0xe0,0xb9,0x50 },
+ 16, 0xeac0, 0, {0x3e,0xcc,0x0c,0xb0,0x23,0x2c,0x10,0xd9,0x00,0x3e,0x00,0x0c,0x90,0x03,0xec,0x00 },
+ 16, 0xead0, 0, {0xde,0x01,0x32,0xc0,0x0f,0x90,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeae0, 0, {0xa0,0x19,0xfc,0x00,0xfd,0x10,0x3f,0xca,0x2e,0xf6,0x03,0x6d,0x94,0x9f,0x30,0x3a },
+ 16, 0xeaf0, 0, {0xc9,0x0c,0x83,0x93,0xfc,0x80,0xff,0x11,0x7e,0x19,0x0b,0xb1,0x03,0xfc,0x40,0xfd },
+ 16, 0xeb00, 0, {0x08,0x3b,0x00,0x0f,0xc0,0x03,0xfc,0x80,0x77,0x00,0xbf,0xc0,0x0f,0x50,0x03,0xe8 },
+ 16, 0xeb10, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,0x00,0xf4,0x94,0x37,0xc8 },
+ 16, 0xeb20, 0, {0x0d,0x69,0x63,0x7c,0x10,0xff,0x62,0x37,0xc0,0x0d,0xb4,0x03,0x7c,0x60,0xd4,0x80 },
+ 16, 0xeb30, 0, {0x3f,0x40,0x0f,0x48,0x23,0x32,0x00,0xce,0x00,0xbf,0x40,0x8f,0xd1,0x03,0x30,0xe0 },
+ 16, 0xeb40, 0, {0xff,0x30,0x3b,0x60,0x0f,0xd8,0x03,0xb0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb50, 0, {0x80,0x10,0xed,0x20,0xb8,0x24,0x23,0xf4,0x49,0xa2,0x02,0x3f,0x40,0x8f,0x51,0x23 },
+ 16, 0xeb60, 0, {0xda,0x08,0xf6,0x12,0x3d,0x80,0x9b,0x80,0x2e,0x49,0x4b,0x80,0x03,0x40,0x00,0xd9 },
+ 16, 0xeb70, 0, {0x01,0x22,0x74,0x0b,0xd5,0x02,0x21,0x00,0xbf,0x42,0x2e,0x49,0x0b,0x9c,0x02,0xe0 },
+ 16, 0xeb80, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcd,0x80,0xb8,0x20,0x28,0xc1 },
+ 16, 0xeb90, 0, {0x1b,0xa0,0x02,0x4c,0x00,0x93,0x20,0x2c,0xd8,0x0b,0x34,0x02,0xcc,0x00,0x90,0x01 },
+ 16, 0xeba0, 0, {0x2c,0xc6,0x1a,0xa0,0x02,0x68,0x08,0x83,0x00,0xa4,0x40,0x0b,0x10,0x02,0x00,0x00 },
+ 16, 0xebb0, 0, {0xb3,0x10,0x28,0x42,0x0b,0x14,0x02,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xebc0, 0, {0xc0,0x15,0xac,0x00,0xb8,0x60,0x2a,0xc0,0x1b,0xa0,0x8e,0xac,0x01,0x9b,0x05,0x26 },
+ 16, 0xebd0, 0, {0xc0,0x03,0xb0,0x42,0x6c,0x00,0x9b,0x80,0x2e,0xc0,0x03,0xa0,0x06,0x69,0x00,0x99 },
+ 16, 0xebe0, 0, {0x80,0xaa,0xc0,0x0b,0x90,0x02,0x63,0x00,0x3b,0x00,0x2e,0x58,0x4b,0x90,0x02,0xf0 },
+ 16, 0xebf0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0xec,0x04,0xf8,0x80,0xba,0xc0 },
+ 16, 0xec00, 0, {0x0f,0x30,0x03,0x6c,0x10,0xdb,0x03,0x36,0xc0,0x8f,0xb0,0x03,0xec,0x08,0xd8,0x80 },
+ 16, 0xec10, 0, {0x7e,0xe0,0x06,0x88,0x03,0x41,0x08,0xcb,0xa0,0x3e,0x64,0x0f,0x90,0x0b,0x2a,0x00 },
+ 16, 0xec20, 0, {0x7b,0x00,0x3a,0x01,0x0f,0x90,0x03,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec30, 0, {0xe0,0x01,0xbc,0x00,0xfc,0x84,0x32,0xc0,0x0c,0xf9,0x03,0x5c,0x10,0xef,0x00,0x3b },
+ 16, 0xec40, 0, {0xc0,0x0c,0x70,0x03,0x9c,0x00,0xec,0x01,0x3f,0xe4,0x4f,0xd1,0x03,0xf1,0x00,0xf3 },
+ 16, 0xec50, 0, {0x05,0x33,0x60,0x0f,0xd0,0x03,0xbc,0x04,0xff,0x00,0x3f,0x21,0x0f,0xd0,0x03,0xf8 },
+ 16, 0xec60, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xc8,0x40,0x3a,0xc6 },
+ 16, 0xec70, 0, {0x0d,0xb4,0x03,0x6c,0x00,0xf3,0x00,0x34,0xc0,0x0e,0xb0,0x03,0x6c,0x00,0xe9,0x10 },
+ 16, 0xec80, 0, {0x3a,0xc0,0x0f,0x84,0x03,0x2c,0x60,0xcb,0x00,0x32,0x60,0x0c,0x50,0x03,0x61,0x00 },
+ 16, 0xec90, 0, {0xcb,0x00,0x3e,0x90,0x0e,0x90,0xa3,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeca0, 0, {0xc8,0x05,0x3c,0x02,0x88,0x01,0x01,0xf0,0x20,0xb0,0x01,0x3e,0x00,0x3f,0x00,0x33 },
+ 16, 0xecb0, 0, {0xc0,0x0b,0xf0,0x32,0x3c,0x08,0x89,0x80,0x22,0xc0,0x01,0x15,0x12,0xac,0x00,0x8b },
+ 16, 0xecc0, 0, {0x00,0x22,0xc0,0x48,0xdb,0x02,0x2f,0x40,0x8f,0x00,0x2e,0x01,0x08,0xd4,0x80,0x32 },
+ 16, 0xecd0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0x08,0x00,0x08,0xf0 },
+ 16, 0xece0, 0, {0x08,0x00,0x12,0x4c,0x00,0x33,0x01,0x24,0xc0,0x4a,0x30,0x02,0x4c,0x00,0xa0,0x20 },
+ 16, 0xecf0, 0, {0x28,0xc0,0x0b,0x10,0x02,0x46,0x04,0x83,0x04,0x20,0xc0,0x29,0x18,0x02,0x04,0x40 },
+ 16, 0xed00, 0, {0xb3,0x00,0x2c,0x40,0x0a,0x1c,0x42,0xb1,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed10, 0, {0x20,0x01,0x1e,0x01,0x8d,0x80,0x21,0xe0,0x18,0xc8,0x02,0x1e,0x00,0xb3,0xa0,0x21 },
+ 16, 0xed20, 0, {0xe0,0x1b,0x38,0x02,0x0e,0x01,0xa7,0x80,0x21,0xe0,0x09,0xd8,0x40,0xd6,0x40,0x87 },
+ 16, 0xed30, 0, {0x80,0x01,0xe0,0x09,0x59,0x02,0x16,0x00,0x97,0x84,0x2d,0x60,0x08,0x58,0x40,0x00 },
+ 16, 0xed40, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x2c,0x40,0xc0,0x00,0x38,0xc4 },
+ 16, 0xed50, 0, {0x0c,0x30,0x27,0x4c,0x20,0xf3,0x01,0x34,0xc1,0x0e,0x3a,0x03,0x4c,0xc4,0xe0,0x00 },
+ 16, 0xed60, 0, {0x18,0xc8,0x0f,0x34,0x03,0x44,0x40,0xc3,0x00,0x30,0xc0,0x0d,0x90,0x03,0x2e,0x00 },
+ 16, 0xed70, 0, {0xf3,0x00,0x3e,0x40,0x0e,0x10,0x01,0x9a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed80, 0, {0x40,0x1d,0xbc,0x00,0xf9,0x00,0x0e,0xd4,0x0e,0xb0,0x03,0xec,0x20,0xfb,0x20,0x3f },
+ 16, 0xed90, 0, {0xc4,0x0f,0xf1,0x03,0xec,0x60,0xdb,0x10,0x3f,0xc0,0x4f,0xf0,0x03,0xa4,0x46,0xfb },
+ 16, 0xeda0, 0, {0x00,0xbd,0xc0,0x0e,0xd0,0x0b,0xb4,0x00,0xef,0x48,0x3f,0x40,0x0f,0x50,0x03,0xd0 },
+ 16, 0xedb0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xf8,0x00,0x32,0xd4 },
+ 16, 0xedc0, 0, {0x0f,0x80,0x03,0xad,0x00,0xeb,0x08,0x22,0xd2,0x0c,0xb6,0x03,0x6c,0x00,0xf2,0x80 },
+ 16, 0xedd0, 0, {0x36,0xc0,0x0e,0xa0,0x03,0x28,0x10,0xcb,0x00,0xb2,0xc0,0x0f,0xd6,0x03,0x28,0x10 },
+ 16, 0xede0, 0, {0xfb,0x20,0x3e,0x40,0x4f,0x99,0x13,0x2b,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xedf0, 0, {0x48,0x11,0x9d,0x10,0xb4,0x01,0x21,0xc1,0x8b,0xc0,0x02,0x1c,0xa0,0xbf,0x04,0x27 },
+ 16, 0xee00, 0, {0xc8,0x08,0x75,0x02,0x1c,0xc0,0xb6,0x00,0x21,0xc0,0x08,0xf0,0x42,0x18,0x10,0x8f },
+ 16, 0xee10, 0, {0x00,0x21,0xc0,0x0b,0x54,0xa2,0x1c,0x00,0xb7,0x04,0x2d,0x41,0x0b,0x52,0x02,0x12 },
+ 16, 0xee20, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x80,0xb6,0x88,0xa5,0xe0 },
+ 16, 0xee30, 0, {0x0b,0x78,0x12,0x9e,0x81,0xa7,0x90,0x25,0xe4,0x88,0x78,0x02,0x1e,0x80,0xbf,0x80 },
+ 16, 0xee40, 0, {0x24,0x60,0x0b,0x68,0x02,0x1e,0x00,0x87,0x84,0x61,0xe0,0x0a,0x1a,0x0a,0x1a,0x00 },
+ 16, 0xee50, 0, {0xb7,0xa0,0x2d,0xe0,0x0b,0xda,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee60, 0, {0x48,0x14,0xcc,0x00,0xba,0xc0,0xa4,0xc0,0x0b,0x34,0x02,0x0c,0x00,0xb3,0x00,0x24 },
+ 16, 0xee70, 0, {0xc0,0x08,0xb0,0x0e,0x2c,0x00,0xb3,0x98,0x20,0x60,0x09,0x33,0x02,0x2c,0x00,0xa3 },
+ 16, 0xee80, 0, {0xc8,0x20,0xc0,0x0b,0x10,0x02,0x0c,0x00,0xb3,0x00,0x2c,0xf0,0x0b,0x10,0x02,0x12 },
+ 16, 0xee90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfe,0x80,0x36,0x81 },
+ 16, 0xeea0, 0, {0x0b,0xe0,0x03,0xa8,0x00,0xea,0x00,0xb2,0x80,0x08,0xa0,0x03,0x68,0x00,0xfe,0x00 },
+ 16, 0xeeb0, 0, {0x36,0xa0,0x1f,0xe8,0x13,0x3b,0x82,0xce,0xe0,0x22,0x80,0x8e,0xa0,0x03,0x38,0x00 },
+ 16, 0xeec0, 0, {0xba,0x00,0x3f,0xa2,0x0f,0xa0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeed0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x20,0x3a,0x10,0x07,0x80,0x03,0xc1,0x00,0xf8,0x00,0x38 },
+ 16, 0xeee0, 0, {0x00,0x2f,0x80,0x03,0xa0,0x01,0xf8,0x42,0x3e,0x05,0x0e,0x80,0x0b,0xe0,0x80,0xd8 },
+ 16, 0xeef0, 0, {0x00,0x3e,0x00,0x0f,0x84,0x03,0xe1,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x84,0x0b,0xd2 },
+ 16, 0xef00, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xc9,0x00,0x3a,0x50 },
+ 16, 0xef10, 0, {0x8f,0x90,0x83,0xa4,0x02,0xd1,0x00,0xb2,0x40,0x4c,0x90,0x23,0x24,0x08,0xc9,0x01 },
+ 16, 0xef20, 0, {0x3e,0x40,0x0c,0x90,0x03,0x24,0x00,0xc1,0x00,0x32,0x40,0x0f,0x14,0x0a,0x25,0x20 },
+ 16, 0xef30, 0, {0xe9,0x00,0x3e,0x42,0x0f,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef40, 0, {0x80,0x04,0x64,0x0a,0x89,0x00,0x22,0x70,0x0b,0x90,0x12,0x25,0x80,0xc9,0x00,0x22 },
+ 16, 0xef50, 0, {0x40,0x0a,0x90,0x03,0x64,0x00,0x89,0x20,0x2c,0x40,0x0a,0x90,0x0a,0x24,0x00,0x89 },
+ 16, 0xef60, 0, {0xc1,0x32,0x40,0x0b,0x98,0x02,0x06,0x00,0x89,0x90,0x2e,0x40,0x0b,0x94,0x12,0xe0 },
+ 16, 0xef70, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x04,0x00,0x89,0x00,0x6a,0x42 },
+ 16, 0xef80, 0, {0x0a,0x10,0x02,0xa4,0x00,0x89,0x00,0xa2,0x40,0x0a,0x90,0x02,0x24,0x00,0x09,0x00 },
+ 16, 0xef90, 0, {0x2e,0x40,0x58,0x10,0x02,0x24,0x00,0x89,0x80,0xaa,0x60,0x0b,0x90,0x02,0xa4,0x04 },
+ 16, 0xefa0, 0, {0xa9,0x00,0x2e,0x40,0x0b,0x94,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xefb0, 0, {0x08,0x04,0x04,0x80,0x81,0x00,0x60,0x48,0x0b,0x10,0x02,0x04,0x81,0x81,0x20,0x60 },
+ 16, 0xefc0, 0, {0x48,0x0a,0x12,0x02,0x44,0x88,0x81,0x00,0x0e,0x59,0x0a,0x14,0x02,0x05,0x00,0x81 },
+ 16, 0xefd0, 0, {0xc0,0x28,0x50,0x49,0x30,0x02,0x8c,0x84,0x01,0x60,0x2c,0x50,0x0b,0x10,0x02,0xc2 },
+ 16, 0xefe0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xc0,0x54,0x2a,0x00 },
+ 16, 0xeff0, 0, {0x0e,0x85,0x03,0xa0,0x00,0xc8,0x50,0x32,0x15,0x1e,0x05,0x22,0x21,0x42,0xc8,0x00 },
+ 16, 0xf000, 0, {0x3e,0x00,0x0c,0x80,0x03,0x00,0x04,0xc8,0x00,0x3a,0x00,0x4f,0x85,0x03,0xa1,0x40 },
+ 16, 0xf010, 0, {0x68,0x00,0x3e,0x00,0x0f,0x80,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf020, 0, {0x98,0x1d,0xe4,0x40,0xfd,0x03,0x3e,0x44,0x0f,0xd0,0x03,0xe4,0x48,0xe9,0x10,0x3e },
+ 16, 0xf030, 0, {0x45,0x0f,0x91,0x13,0xe4,0x40,0xfd,0x00,0x3f,0x44,0x0f,0xd0,0x03,0xf4,0x02,0xfd },
+ 16, 0xf040, 0, {0x40,0x33,0x50,0x0f,0xd4,0x23,0x74,0x40,0xf9,0x10,0x3f,0x40,0x0f,0x54,0x03,0xe6 },
+ 16, 0xf050, 0, {0x02,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe4,0x00,0xf9,0x01,0x33,0x6a },
+ 16, 0xf060, 0, {0x09,0x90,0x03,0xb6,0x34,0xf9,0xc8,0x32,0x64,0x0c,0x9a,0x03,0xe6,0xa0,0xdd,0x00 },
+ 16, 0xf070, 0, {0x3c,0x70,0x0f,0x90,0x03,0xa5,0x00,0x89,0x80,0x33,0x32,0x0f,0xd8,0x13,0x3c,0x00 },
+ 16, 0xf080, 0, {0xfd,0x00,0x70,0x50,0x0f,0xd0,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf090, 0, {0x38,0x10,0xe2,0x80,0xb8,0xa8,0x22,0x10,0x08,0x88,0x02,0x21,0x00,0xb8,0xc0,0x20 },
+ 16, 0xf0a0, 0, {0x30,0x0d,0x8e,0x87,0x83,0x88,0x88,0x00,0x2e,0x34,0x0b,0x8a,0x82,0x22,0x80,0xdc },
+ 16, 0xf0b0, 0, {0xe0,0x22,0x38,0x0b,0x80,0x02,0x20,0x00,0xf8,0xa8,0x2a,0x28,0x0b,0x80,0x02,0x0e },
+ 16, 0xf0c0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x20,0xb1,0x00,0x20,0x40 },
+ 16, 0xf0d0, 0, {0x0a,0x92,0x92,0x84,0x11,0xb1,0x24,0x68,0x58,0x09,0x11,0x02,0xc4,0x20,0x91,0x01 },
+ 16, 0xf0e0, 0, {0x2c,0x48,0x1b,0x50,0x02,0x74,0x84,0x95,0x48,0xac,0x48,0x0b,0x94,0x02,0x04,0x04 },
+ 16, 0xf0f0, 0, {0xb1,0x02,0x24,0x48,0x0b,0x10,0x02,0x02,0x05,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf100, 0, {0x18,0x11,0xa4,0x00,0xb1,0x20,0x22,0x40,0x0a,0x90,0x06,0x2c,0x01,0xb9,0x00,0x2a },
+ 16, 0xf110, 0, {0x40,0x09,0x90,0x02,0xa4,0x00,0x9b,0x08,0x2e,0x48,0x0b,0x12,0x1a,0x74,0x00,0x95 },
+ 16, 0xf120, 0, {0x45,0x2e,0x60,0x03,0x90,0x02,0x24,0x00,0xb9,0x00,0x2e,0x40,0x0b,0x90,0x02,0x06 },
+ 16, 0xf130, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0x80,0x30,0x40 },
+ 16, 0xf140, 0, {0x0e,0x16,0x03,0xa4,0x00,0xb9,0x04,0x32,0x40,0x0d,0x90,0x02,0xe4,0x00,0xd9,0x40 },
+ 16, 0xf150, 0, {0x2e,0x40,0x1f,0x98,0x03,0xe5,0x80,0xd9,0x00,0xae,0x60,0x07,0x10,0x0b,0x26,0x01 },
+ 16, 0xf160, 0, {0xb9,0x00,0xa6,0x40,0x0f,0x90,0x0b,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf170, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0xbe,0x40,0xac,0x92,0x03,0xe4,0x00,0xf9,0x00,0xb4 },
+ 16, 0xf180, 0, {0x40,0x0f,0x90,0x03,0xe4,0x00,0xe9,0x00,0x3e,0x60,0x0f,0x90,0x03,0xa4,0x80,0xf9 },
+ 16, 0xf190, 0, {0x00,0x32,0x00,0x0f,0x90,0x83,0xe6,0x85,0xe1,0x00,0x32,0x44,0x0f,0x10,0x03,0xca },
+ 16, 0xf1a0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x00,0x32,0x00 },
+ 16, 0xf1b0, 0, {0x0f,0x80,0x13,0xe0,0x94,0xe0,0x00,0x32,0x00,0x0c,0x80,0x03,0x60,0x00,0xc8,0x00 },
+ 16, 0xf1c0, 0, {0x3e,0x00,0x0d,0x80,0x43,0x20,0x08,0xf8,0x00,0x32,0x00,0x0f,0x80,0x03,0xe0,0x40 },
+ 16, 0xf1d0, 0, {0xf8,0x00,0x32,0x00,0x4c,0x80,0x23,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf1e0, 0, {0x28,0x05,0x28,0x00,0xba,0x00,0x23,0x80,0x0b,0xa0,0x02,0xfb,0x04,0x6a,0x00,0x22 },
+ 16, 0xf1f0, 0, {0x80,0x0a,0xa0,0x03,0x68,0x0a,0x8e,0x88,0x3a,0x80,0x08,0xa0,0x02,0x08,0x00,0xba },
+ 16, 0xf200, 0, {0x00,0xb7,0x22,0x03,0xe4,0x02,0xfa,0x00,0x8a,0x00,0x22,0x80,0x08,0xe8,0x02,0xca },
+ 16, 0xf210, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb3,0x00,0x60,0x41 },
+ 16, 0xf220, 0, {0x03,0x30,0x02,0xcc,0x41,0xa3,0x00,0x04,0xc0,0x0b,0x30,0x02,0x2c,0x00,0xa3,0x80 },
+ 16, 0xf230, 0, {0x2c,0xc0,0x09,0x38,0x02,0x0c,0x00,0xb3,0x00,0xa0,0xc0,0x0b,0x34,0x02,0xcc,0x80 },
+ 16, 0xf240, 0, {0xa1,0x00,0x20,0xc0,0x08,0x38,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf250, 0, {0xa0,0x01,0x1c,0x40,0xb7,0x00,0x61,0x00,0x0b,0x71,0x02,0xdc,0x00,0xa3,0x00,0x25 },
+ 16, 0xf260, 0, {0xc8,0x19,0x38,0x02,0x5c,0x80,0xa7,0x00,0x0f,0xe8,0x09,0x64,0x22,0x10,0x00,0xb3 },
+ 16, 0xf270, 0, {0x00,0x25,0xc8,0x0b,0x60,0x02,0xf2,0x00,0x85,0x01,0x23,0xe8,0x08,0x70,0x82,0xe8 },
+ 16, 0xf280, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x20,0xff,0x80,0xa1,0xa0 },
+ 16, 0xf290, 0, {0x0f,0x7a,0x42,0xda,0x00,0xe7,0xe8,0x35,0xf0,0x2f,0x7b,0x62,0x1e,0x82,0xe6,0x80 },
+ 16, 0xf2a0, 0, {0x1d,0xe0,0x0d,0xf8,0x0b,0x1e,0x00,0xf7,0x80,0x31,0xf0,0x0f,0x78,0x03,0xde,0x0c },
+ 16, 0xf2b0, 0, {0xef,0x80,0x31,0xf8,0x2c,0x78,0x03,0xea,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf2c0, 0, {0x08,0x1d,0xad,0x84,0xfb,0x68,0x3e,0x00,0x0f,0xb0,0x03,0xe8,0x00,0xfb,0x00,0xfa },
+ 16, 0xf2d0, 0, {0xd8,0x0e,0xb5,0x03,0xed,0x00,0xdb,0x00,0x3a,0xc0,0x8e,0xa0,0x03,0xe0,0x00,0xfb },
+ 16, 0xf2e0, 0, {0x40,0x3e,0xc0,0x0b,0xb0,0x43,0xc4,0x04,0xef,0x02,0xbf,0xc0,0x0f,0xb0,0x03,0xc2 },
+ 16, 0xf2f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x42,0xc7,0x38,0x33,0x64 },
+ 16, 0xf300, 0, {0x0e,0x7c,0x03,0x5e,0x00,0xdf,0xa0,0x37,0xf0,0x0d,0xf8,0x03,0xff,0x20,0xcf,0x81 },
+ 16, 0xf310, 0, {0x33,0xe2,0x0c,0xd8,0x03,0xbe,0x00,0x7f,0xc0,0x33,0xe0,0x0c,0xf9,0x03,0x7e,0x00 },
+ 16, 0xf320, 0, {0xfd,0x80,0x3f,0xe0,0x0f,0xf8,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf330, 0, {0xa8,0x11,0x9c,0x00,0x87,0xa0,0x21,0x14,0x08,0x71,0x02,0x14,0x10,0xd7,0x20,0x35 },
+ 16, 0xf340, 0, {0xc0,0x0c,0x70,0x03,0xbc,0x00,0x85,0x08,0x2b,0xc0,0x4d,0x46,0x02,0xd1,0x00,0xb7 },
+ 16, 0xf350, 0, {0x00,0x21,0xc0,0x08,0x60,0x02,0x08,0x80,0xf5,0x20,0x3d,0xca,0x0f,0x54,0x03,0xea },
+ 16, 0xf360, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x11,0x8f,0x01,0x20,0x84 },
+ 16, 0xf370, 0, {0x1a,0xf0,0x02,0x18,0x00,0xa7,0x34,0x65,0xc0,0x09,0x71,0x02,0xdc,0x00,0x8e,0x00 },
+ 16, 0xf380, 0, {0x29,0xc0,0x08,0x50,0x06,0x9c,0x00,0xbf,0x88,0x2d,0xc4,0x0a,0x60,0x26,0x58,0x24 },
+ 16, 0xf390, 0, {0x97,0x00,0x6d,0xc0,0x9b,0x70,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf3a0, 0, {0x20,0x14,0xcc,0x00,0x8b,0x40,0x20,0x00,0x18,0x30,0x02,0x00,0x00,0xbb,0x02,0x24 },
+ 16, 0xf3b0, 0, {0xc0,0x08,0x30,0x20,0xcc,0x00,0x81,0xc0,0x28,0xc0,0x0b,0x04,0x82,0xe0,0x10,0xbb },
+ 16, 0xf3c0, 0, {0xa0,0x2c,0xe0,0x0a,0x20,0x06,0x00,0x00,0xb3,0x00,0x28,0xc0,0x0a,0x10,0x02,0x88 },
+ 16, 0xf3d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xcf,0x10,0x32,0x00 },
+ 16, 0xf3e0, 0, {0x0e,0xf0,0x0b,0x24,0x00,0xef,0x00,0x37,0xc0,0x0d,0xf0,0x03,0xfc,0x06,0xc1,0x50 },
+ 16, 0xf3f0, 0, {0x3b,0xc0,0x0c,0xb4,0x03,0xac,0x00,0xf8,0xc0,0xbe,0xc8,0x2e,0xb0,0x03,0x6e,0x01 },
+ 16, 0xf400, 0, {0xfb,0x00,0x2d,0xc0,0x4b,0x90,0x02,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf410, 0, {0x80,0x00,0xec,0x04,0xfb,0x00,0x3e,0x00,0x0f,0xb0,0x03,0xad,0x00,0x9b,0x00,0x3e },
+ 16, 0xf420, 0, {0xc0,0x0f,0x30,0x03,0xac,0x00,0xf8,0x00,0x2e,0xc0,0x05,0xb4,0x03,0xed,0x00,0xf8 },
+ 16, 0xf430, 0, {0x40,0x32,0xc0,0x09,0x00,0x03,0xe0,0x91,0xe3,0x00,0x3e,0xc0,0x0f,0x90,0x11,0xe0 },
+ 16, 0xf440, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xec,0x00,0xef,0x00,0x33,0x20 },
+ 16, 0xf450, 0, {0x4f,0xf0,0x03,0xb4,0x00,0xef,0x03,0x3a,0xc0,0x0f,0xf0,0x03,0x3c,0x00,0xdc,0x00 },
+ 16, 0xf460, 0, {0x31,0xc0,0x8d,0xf8,0x03,0xfe,0x04,0xcf,0x00,0x32,0xc8,0x0c,0xf0,0x0b,0x1c,0x00 },
+ 16, 0xf470, 0, {0xcf,0x93,0x33,0xc0,0x8c,0x40,0x02,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf480, 0, {0x81,0x04,0x6c,0x00,0xbb,0x00,0xa2,0x04,0x0b,0x30,0x02,0x0e,0x00,0xab,0x00,0x2a },
+ 16, 0xf490, 0, {0xc0,0x09,0xb0,0x03,0x6c,0x08,0xa8,0xc0,0x36,0xc0,0x08,0xbc,0x02,0xef,0x02,0xab },
+ 16, 0xf4a0, 0, {0xd0,0x20,0xe0,0x08,0xb8,0x22,0x26,0x10,0x8b,0x00,0x22,0xc0,0x20,0x9c,0x02,0x20 },
+ 16, 0xf4b0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xbb,0x00,0x26,0x00 },
+ 16, 0xf4c0, 0, {0x0a,0xb0,0x02,0xa2,0x08,0xab,0x00,0x6a,0xc0,0x0b,0xb0,0x0a,0x0c,0x00,0x8b,0x80 },
+ 16, 0xf4d0, 0, {0x22,0xc0,0x09,0xb1,0x02,0xec,0x40,0x88,0x08,0x22,0xc0,0x08,0xb8,0x02,0x26,0x00 },
+ 16, 0xf4e0, 0, {0x8b,0x00,0x22,0xc0,0x08,0x98,0x02,0xa0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf4f0, 0, {0x08,0x04,0x0c,0x00,0xb3,0x00,0x24,0x00,0x0b,0xb0,0x02,0x00,0x01,0x83,0x00,0x20 },
+ 16, 0xf500, 0, {0xc0,0x09,0x30,0x02,0x4c,0x00,0x00,0x04,0x24,0xc0,0x08,0x30,0x06,0x4c,0x00,0x80 },
+ 16, 0xf510, 0, {0x00,0x2c,0xc0,0x08,0x00,0x02,0x00,0x41,0x83,0x00,0xa2,0xc0,0x08,0x10,0x0a,0x82 },
+ 16, 0xf520, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x00,0xef,0x08,0x26,0x00 },
+ 16, 0xf530, 0, {0x0e,0xf0,0x02,0xa0,0x00,0xe7,0x00,0x3b,0xc0,0x0f,0xf5,0x43,0x3c,0x02,0xda,0x00 },
+ 16, 0xf540, 0, {0x32,0xc0,0x0d,0xb0,0x03,0xec,0x00,0xcb,0x00,0xb2,0xc0,0x0c,0xa0,0x03,0x28,0x10 },
+ 16, 0xf550, 0, {0xcb,0x00,0x32,0xc0,0x0c,0x80,0x03,0x80,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf560, 0, {0xa0,0x0d,0xfc,0x00,0xfb,0x00,0x3b,0x00,0x0f,0xf0,0x03,0xf0,0x00,0xff,0x02,0x3f },
+ 16, 0xf570, 0, {0xc0,0x0d,0xf2,0x03,0xbc,0x00,0xf4,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xf7 },
+ 16, 0xf580, 0, {0x00,0x33,0xc0,0x0f,0x60,0x03,0xf0,0x88,0xff,0x00,0x3f,0xc0,0x4f,0xd0,0x03,0x68 },
+ 16, 0xf590, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x40,0xfc,0x31,0x3b,0x08 },
+ 16, 0xf5a0, 0, {0x4f,0xf9,0x43,0xef,0x00,0xdf,0x30,0x32,0x21,0x0f,0x94,0x07,0x7d,0x80,0xef,0x38 },
+ 16, 0xf5b0, 0, {0x32,0x09,0x1c,0x38,0x03,0xf2,0x21,0xfd,0x00,0x33,0xc4,0x0c,0xf0,0x02,0xfc,0x00 },
+ 16, 0xf5c0, 0, {0xdf,0x00,0x33,0xc0,0x0f,0xf0,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf5d0, 0, {0x80,0x10,0xec,0x88,0x8b,0x60,0x22,0xe5,0x0e,0xb2,0x22,0xec,0x80,0xaf,0x11,0x2a },
+ 16, 0xf5e0, 0, {0x20,0x0b,0xb1,0x13,0xac,0x48,0x8b,0x45,0x34,0xcc,0x48,0xb0,0x02,0x6b,0x00,0xba },
+ 16, 0xf5f0, 0, {0x82,0x36,0x00,0x08,0x88,0x22,0xc0,0x04,0x88,0x00,0xa2,0x08,0x8b,0x88,0x62,0x20 },
+ 16, 0xf600, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0xa1,0x30,0x28,0x00 },
+ 16, 0xf610, 0, {0x0b,0x32,0x02,0xcc,0x00,0xa3,0x22,0x2c,0x00,0x8b,0x12,0x06,0xc8,0x80,0xa3,0x00 },
+ 16, 0xf620, 0, {0x20,0x02,0xca,0x30,0x06,0xc4,0x01,0xb1,0x00,0x68,0x80,0x09,0x20,0x02,0x88,0x00 },
+ 16, 0xf630, 0, {0x83,0x00,0x20,0xc2,0x0b,0x00,0x0a,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf640, 0, {0xc0,0x15,0xac,0x00,0x8b,0x61,0x62,0xc0,0x0b,0xb2,0x02,0xe8,0x00,0xab,0x02,0x2a },
+ 16, 0xf650, 0, {0x61,0x1b,0x90,0x02,0xa8,0x00,0xab,0x00,0x20,0xc0,0x0a,0xb0,0x02,0x6c,0x04,0xba },
+ 16, 0xf660, 0, {0x00,0x2e,0x40,0x89,0x90,0x02,0xe6,0x08,0x98,0x00,0x22,0x00,0x0b,0xb0,0x02,0xb0 },
+ 16, 0xf670, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xee,0x00,0xf8,0x01,0x3a,0x04 },
+ 16, 0xf680, 0, {0x0f,0xac,0x03,0xec,0x90,0xfb,0x02,0x3e,0xe0,0x0b,0x90,0x42,0x67,0x80,0xa8,0xc4 },
+ 16, 0xf690, 0, {0x22,0x48,0x22,0x86,0x03,0xe1,0x40,0xb8,0x02,0x2a,0x40,0x29,0x90,0x03,0xec,0x02 },
+ 16, 0xf6a0, 0, {0xc9,0x48,0x32,0x40,0x0f,0xb0,0x13,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf6b0, 0, {0xe0,0x01,0xac,0x40,0xfb,0x00,0x1f,0xa2,0x0e,0xf8,0x82,0xfc,0x08,0xff,0x00,0x3f },
+ 16, 0xf6c0, 0, {0xc0,0x0f,0xfa,0x43,0x96,0x44,0xd4,0x91,0x3f,0x40,0x0d,0xc0,0x03,0xfa,0x00,0xff },
+ 16, 0xf6d0, 0, {0x08,0x25,0x80,0x0e,0xe0,0x03,0xd0,0x00,0xea,0x00,0x3f,0x80,0x0f,0xc0,0x03,0x78 },
+ 16, 0xf6e0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xe1,0x20,0x3a,0x50 },
+ 16, 0xf6f0, 0, {0x0f,0x90,0x03,0x2c,0x00,0xeb,0x08,0x76,0x05,0x0e,0xb0,0x27,0xe0,0x10,0xea,0x40 },
+ 16, 0xf700, 0, {0xb2,0xc0,0x0c,0xa4,0x43,0x25,0x00,0xf8,0x00,0x32,0x08,0x0f,0x80,0x43,0xe8,0x00 },
+ 16, 0xf710, 0, {0xd1,0x08,0xee,0x40,0x0f,0x00,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf720, 0, {0xc8,0x05,0x2c,0x00,0x8b,0x00,0x22,0xd0,0x0b,0x90,0x82,0x2c,0x00,0x87,0x40,0x22 },
+ 16, 0xf730, 0, {0x60,0x8b,0xb0,0x02,0xe0,0x00,0xd8,0x50,0x22,0xd0,0x0c,0xa0,0x03,0x6c,0x00,0xb3 },
+ 16, 0xf740, 0, {0xc8,0x3e,0xd0,0x0b,0xb8,0x02,0x25,0x08,0x8a,0x20,0x2a,0x80,0x8b,0xb8,0x82,0xf2 },
+ 16, 0xf750, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x64,0x00,0xa0,0xc0,0x24,0xc0 },
+ 16, 0xf760, 0, {0x09,0x38,0x02,0x2c,0x00,0x83,0x03,0x20,0x00,0x10,0x30,0x22,0xcc,0x00,0x83,0x00 },
+ 16, 0xf770, 0, {0x60,0x08,0x0a,0x30,0x82,0x4c,0x00,0xb1,0xc0,0x00,0xd1,0x0b,0x38,0x02,0x84,0x80 },
+ 16, 0xf780, 0, {0x82,0x01,0x20,0x80,0x03,0x38,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf790, 0, {0x20,0x01,0x16,0x40,0x84,0x98,0x25,0xe0,0x0b,0x7a,0x02,0xfa,0x48,0xa3,0x20,0x61 },
+ 16, 0xf7a0, 0, {0x24,0x0b,0x79,0x00,0xce,0xc0,0x93,0xa4,0x21,0xa6,0x0b,0x78,0x12,0xde,0x80,0xb6 },
+ 16, 0xf7b0, 0, {0x80,0x2d,0x24,0x0b,0x4b,0x02,0x1a,0x40,0x85,0x81,0x21,0x60,0x0b,0x48,0x02,0xc8 },
+ 16, 0xf7c0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xe2,0xa0,0xb4,0xfe },
+ 16, 0xf7d0, 0, {0x4b,0xb8,0x0b,0x0e,0x00,0xa3,0xb0,0x24,0xa8,0x0e,0x1b,0x02,0xce,0xc1,0xc3,0xc0 },
+ 16, 0xf7e0, 0, {0x30,0x68,0x2e,0x3a,0x47,0x4e,0x80,0xf1,0x80,0x30,0x80,0x0f,0x22,0x83,0x80,0x00 },
+ 16, 0xf7f0, 0, {0xc2,0x10,0x38,0x80,0x4f,0x00,0x07,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf800, 0, {0x40,0x0d,0xbc,0x10,0xfe,0x04,0x3b,0xc1,0x07,0xf0,0x03,0x1c,0xc8,0xdf,0x2a,0x0b },
+ 16, 0xf810, 0, {0xc4,0x8f,0xd1,0x43,0xf8,0x02,0x7f,0x00,0x3f,0xc0,0x0c,0xf1,0x0f,0x3c,0x00,0xf2 },
+ 16, 0xf820, 0, {0x11,0x3f,0x41,0x1f,0x52,0x03,0xbc,0x0e,0xed,0x14,0x3f,0x40,0x0f,0xf8,0x03,0xd0 },
+ 16, 0xf830, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x00,0xe9,0x00,0x32,0x80 },
+ 16, 0xf840, 0, {0x0e,0xbe,0x4b,0x6f,0x00,0xcb,0x82,0x7a,0xc0,0x2c,0xb0,0x03,0x2c,0x00,0xc9,0x00 },
+ 16, 0xf850, 0, {0x32,0x00,0x2c,0x10,0x03,0x2c,0x08,0xc0,0x00,0x26,0x40,0x6c,0x90,0x13,0x24,0x12 },
+ 16, 0xf860, 0, {0xc8,0x01,0x3e,0x00,0x0f,0xb8,0x0b,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf870, 0, {0x48,0x11,0x94,0x00,0x8d,0x00,0x21,0x80,0x0b,0x70,0x82,0x3c,0x20,0x83,0x32,0x29 },
+ 16, 0xf880, 0, {0xc0,0x08,0xf0,0x20,0x14,0x00,0x80,0x00,0x23,0x00,0x08,0x50,0x06,0x9c,0x04,0xd7 },
+ 16, 0xf890, 0, {0x02,0x28,0x80,0x08,0x60,0x02,0x08,0x10,0x87,0x00,0x2d,0xc0,0x0b,0x40,0x02,0x12 },
+ 16, 0xf8a0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xa7,0x80,0x21,0xe0 },
+ 16, 0xf8b0, 0, {0x0b,0x5c,0x12,0x1e,0x04,0x87,0x82,0x0d,0xa0,0x09,0x78,0x16,0x02,0x00,0xb4,0x80 },
+ 16, 0xf8c0, 0, {0x25,0xe0,0x0b,0x78,0x02,0x9e,0x00,0x84,0x80,0x21,0x22,0x08,0x08,0x02,0x12,0x01 },
+ 16, 0xf8d0, 0, {0x84,0xc0,0x2d,0x20,0x0b,0x08,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf8e0, 0, {0x48,0x14,0xcc,0x00,0x83,0x42,0xa0,0xd8,0x0b,0x34,0x82,0x0c,0x00,0xa3,0x02,0x20 },
+ 16, 0xf8f0, 0, {0xe0,0x08,0xb0,0x02,0x0c,0x88,0xb3,0x21,0x24,0xd8,0x0b,0x3e,0x02,0x8c,0x00,0x93 },
+ 16, 0xf900, 0, {0x08,0x28,0xc0,0x08,0x38,0x02,0x2c,0x05,0x8b,0x01,0x2c,0xe0,0x0b,0x30,0x02,0x12 },
+ 16, 0xf910, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xee,0x00,0x33,0x90 },
+ 16, 0xf920, 0, {0x0f,0xa0,0x0b,0x68,0x00,0xca,0x01,0x7f,0xa8,0x0c,0xaa,0x03,0x3a,0x12,0xfe,0xe2 },
+ 16, 0xf930, 0, {0x37,0xb0,0x0f,0xee,0x02,0x18,0x00,0xca,0x40,0x36,0xa0,0x08,0xa0,0x8b,0x28,0x00 },
+ 16, 0xf940, 0, {0xca,0x81,0x2e,0xa0,0x0f,0xe0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf950, 0, {0x48,0x00,0xe0,0x00,0xf8,0x08,0x3e,0x00,0x0f,0x80,0x03,0xa2,0x02,0xd8,0x40,0x3e },
+ 16, 0xf960, 0, {0x08,0x0f,0x80,0x13,0xe0,0x40,0x48,0x40,0xb8,0x04,0x08,0x84,0x03,0x61,0x00,0xfc },
+ 16, 0xf970, 0, {0x00,0x3f,0x00,0x4f,0xc0,0x03,0xf1,0x00,0xfc,0x00,0x3f,0x04,0x0f,0xc0,0x03,0xd2 },
+ 16, 0xf980, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc4,0x00,0xf9,0x00,0x30,0x50 },
+ 16, 0xf990, 0, {0x4c,0xb9,0x03,0x6c,0x18,0xf9,0x00,0x36,0x40,0x0e,0x9c,0x23,0xa4,0x02,0x41,0x00 },
+ 16, 0xf9a0, 0, {0xb2,0x44,0x0e,0x9a,0x03,0xa6,0x80,0xc9,0x00,0x3a,0x60,0x0a,0x90,0x03,0xa4,0x80 },
+ 16, 0xf9b0, 0, {0xc9,0x00,0x34,0x40,0x0c,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf9c0, 0, {0x80,0x04,0x64,0x00,0x89,0x40,0x22,0x78,0x08,0x94,0x02,0xe4,0x10,0xb9,0x00,0x3c },
+ 16, 0xf9d0, 0, {0x62,0x18,0x94,0x82,0xa4,0x00,0x89,0xc8,0x22,0x70,0x48,0x1e,0x01,0x67,0x80,0xd1 },
+ 16, 0xf9e0, 0, {0x00,0xbc,0x42,0x08,0x10,0x02,0x25,0x20,0x89,0x02,0x22,0x40,0x08,0x90,0x02,0xe0 },
+ 16, 0xf9f0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb1,0x28,0x22,0x40 },
+ 16, 0xfa00, 0, {0x08,0xb0,0x82,0x64,0x04,0x39,0x41,0x2e,0x48,0x0a,0x90,0x02,0x04,0x18,0xa9,0x20 },
+ 16, 0xfa10, 0, {0x22,0x42,0x4a,0x90,0x02,0x2c,0x04,0x89,0x04,0x2b,0x48,0x02,0xd0,0x02,0xb4,0x0a },
+ 16, 0xfa20, 0, {0x8d,0x80,0x23,0xc0,0x48,0xd0,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa30, 0, {0x08,0x04,0x04,0x80,0x81,0x20,0xa0,0x48,0x28,0x10,0x02,0xc4,0x00,0xb1,0x24,0x2a },
+ 16, 0xfa40, 0, {0x40,0x08,0x12,0x42,0x85,0x80,0xa1,0x20,0xa0,0x48,0x08,0x90,0x02,0x44,0x00,0x95 },
+ 16, 0xfa50, 0, {0x2c,0x2d,0x5a,0x0a,0x72,0x82,0x14,0xa0,0x85,0xa8,0x21,0x4a,0x08,0x52,0x82,0xc2 },
+ 16, 0xfa60, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x41,0x40,0xf8,0x50,0x32,0x00 },
+ 16, 0xfa70, 0, {0x8c,0x05,0x03,0x61,0x40,0xf8,0x51,0x2e,0x00,0x0a,0x85,0x02,0x20,0x00,0xe8,0x50 },
+ 16, 0xfa80, 0, {0x32,0x14,0x06,0x85,0x17,0xa0,0x00,0xc8,0x20,0x3a,0x08,0x0e,0x82,0x03,0xa0,0x80 },
+ 16, 0xfa90, 0, {0xc8,0x20,0x32,0x08,0x2c,0xc2,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfaa0, 0, {0x98,0x19,0xf4,0x40,0xff,0x10,0x3f,0x44,0x0b,0xb0,0x03,0xe4,0x00,0xf9,0x10,0x3d },
+ 16, 0xfab0, 0, {0x40,0x0f,0xd1,0x03,0xf4,0x58,0x9d,0x10,0x3f,0x44,0x4f,0xd0,0x03,0xd5,0x00,0xf9 },
+ 16, 0xfac0, 0, {0x00,0x3e,0x40,0x8d,0x90,0x03,0xe4,0xb8,0xf9,0x28,0xba,0x6a,0x0f,0x90,0x03,0xe6 },
+ 16, 0xfad0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xe7,0x00,0xfd,0x88,0x3e,0x60 },
+ 16, 0xfae0, 0, {0x8f,0xd0,0x03,0x24,0x01,0xdd,0x80,0x73,0x40,0x0f,0xd8,0x03,0xa6,0x04,0xcd,0xa2 },
+ 16, 0xfaf0, 0, {0x33,0x78,0x1c,0xd0,0x03,0x34,0x01,0xf5,0x88,0x3b,0x68,0x0c,0xda,0x47,0x37,0x80 },
+ 16, 0xfb00, 0, {0xcd,0x88,0x32,0x62,0x0c,0xda,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb10, 0, {0x38,0x10,0xe3,0x80,0xb8,0x80,0x2e,0x14,0x0b,0x0a,0x82,0x22,0x80,0xb8,0xf8,0xa2 },
+ 16, 0xfb20, 0, {0x00,0x0b,0x8f,0xa3,0x83,0xe0,0x88,0xeb,0x22,0xa9,0x08,0x88,0x12,0xa0,0x05,0xb8 },
+ 16, 0xfb30, 0, {0x00,0x2a,0xaa,0x88,0x80,0x13,0x62,0x82,0x88,0x80,0x22,0x28,0x88,0xa4,0x02,0x0e },
+ 16, 0xfb40, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb1,0x0a,0x2c,0x41 },
+ 16, 0xfb50, 0, {0x0b,0x10,0x06,0x04,0x20,0xa1,0x00,0x00,0x40,0x8b,0x10,0x46,0xc4,0x01,0x91,0x11 },
+ 16, 0xfb60, 0, {0x24,0x58,0x68,0x90,0xc2,0x04,0x00,0xb1,0x00,0xa8,0x50,0x09,0x14,0x0a,0x05,0x95 },
+ 16, 0xfb70, 0, {0xa1,0x08,0xa0,0x42,0x28,0x11,0x0a,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb80, 0, {0x18,0x15,0xa4,0x18,0xb9,0x20,0x2e,0x50,0x0b,0x90,0x06,0x24,0x09,0xb9,0x00,0x22 },
+ 16, 0xfb90, 0, {0x40,0x8b,0x91,0x02,0x84,0x00,0x99,0x64,0x24,0x40,0x58,0x90,0x02,0xa4,0x20,0xbb },
+ 16, 0xfba0, 0, {0x00,0x2a,0x40,0x09,0xb0,0x02,0x05,0x01,0xa9,0x00,0x22,0x40,0x88,0x92,0x02,0x06 },
+ 16, 0xfbb0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe6,0x00,0xf9,0x40,0x3e,0x40 },
+ 16, 0xfbc0, 0, {0x4f,0x98,0x0b,0x24,0x80,0xd9,0x00,0x22,0x72,0x0b,0x98,0x03,0xe4,0x84,0xd9,0x00 },
+ 16, 0xfbd0, 0, {0xb6,0x70,0x08,0x99,0x02,0x24,0x00,0xb9,0x00,0x2a,0x40,0x0d,0x94,0xc2,0x25,0x00 },
+ 16, 0xfbe0, 0, {0xa9,0x00,0x22,0x40,0x0c,0x94,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfbf0, 0, {0x28,0x01,0xa6,0x80,0xf9,0x08,0x3e,0xc0,0x0f,0x91,0x43,0xe4,0x00,0xf9,0x00,0x3e },
+ 16, 0xfc00, 0, {0x50,0x0f,0x98,0x03,0xa5,0x00,0xe9,0x00,0x3a,0x64,0x0f,0x90,0x03,0xe4,0x00,0xf9 },
+ 16, 0xfc10, 0, {0x00,0x3c,0x40,0x6e,0x90,0x03,0xe4,0x20,0xd9,0x00,0x3c,0x40,0x0f,0x90,0x82,0xca },
+ 16, 0xfc20, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xe8,0x00,0x3e,0x00 },
+ 16, 0xfc30, 0, {0x4f,0x84,0x0b,0x20,0x00,0xf8,0x00,0x36,0x01,0x0e,0x80,0x03,0xe0,0x00,0xc8,0x40 },
+ 16, 0xfc40, 0, {0x32,0x10,0x2d,0x80,0x03,0xe0,0x54,0xc8,0x00,0x36,0x10,0x0f,0x04,0x83,0xe0,0x50 },
+ 16, 0xfc50, 0, {0xd8,0x04,0x12,0x00,0x0c,0x00,0x0b,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc60, 0, {0x28,0x05,0x28,0x00,0x8e,0x42,0x2e,0xa2,0x8b,0xea,0x02,0x28,0x08,0xbe,0x89,0x37 },
+ 16, 0xfc70, 0, {0x84,0x48,0xe0,0x12,0x28,0x02,0x8e,0xc0,0x23,0xb0,0x4d,0x60,0x62,0xf8,0x00,0x86 },
+ 16, 0xfc80, 0, {0x00,0x23,0x80,0x0b,0xe0,0x02,0xf8,0x00,0x0e,0x00,0x22,0x80,0x08,0xe4,0x02,0x0a },
+ 16, 0xfc90, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xa3,0x00,0x2c,0x80 },
+ 16, 0xfca0, 0, {0x1b,0xb0,0x9a,0x4c,0x10,0x9b,0x80,0x24,0xc0,0x0a,0x30,0x00,0x0c,0x04,0x9b,0x20 },
+ 16, 0xfcb0, 0, {0x20,0xd6,0x08,0x30,0x02,0x8e,0x08,0xa3,0x04,0x24,0xc0,0x19,0x34,0x02,0xc7,0x07 },
+ 16, 0xfcc0, 0, {0xaa,0xa4,0xa0,0xc0,0x48,0x34,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfcd0, 0, {0xa0,0x01,0x0e,0x00,0x87,0x00,0x2d,0xc0,0x0b,0x40,0x02,0x5c,0x40,0xb3,0x14,0x25 },
+ 16, 0xfce0, 0, {0xe0,0x08,0x7a,0x02,0x9e,0xc0,0x92,0x40,0xa0,0x00,0x49,0x60,0x02,0xce,0x02,0x8e },
+ 16, 0xfcf0, 0, {0x01,0x21,0xc0,0x8b,0x54,0x02,0xc4,0x08,0x86,0x40,0x21,0xc8,0x88,0x10,0x02,0x28 },
+ 16, 0xfd00, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0xc0,0xe4,0x80,0x3d,0xe2 },
+ 16, 0xfd10, 0, {0x0f,0x58,0x03,0x5e,0x90,0xb6,0xa2,0x35,0xe0,0x0e,0x7c,0x23,0x1c,0x00,0xd6,0x80 },
+ 16, 0xfd20, 0, {0x31,0xe0,0x84,0x78,0x03,0xde,0x00,0xc7,0x80,0x35,0xe0,0x0f,0x68,0x03,0xde,0x00 },
+ 16, 0xfd30, 0, {0xe3,0x80,0x33,0xe8,0x2c,0x78,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd40, 0, {0x08,0x1d,0xac,0x90,0xfa,0x00,0x7e,0x40,0x0f,0x90,0x03,0xac,0x01,0xfb,0x00,0x3c },
+ 16, 0xfd50, 0, {0x41,0x0f,0x30,0x0b,0x2d,0x04,0xeb,0x01,0x3e,0xc0,0x0e,0xb0,0x03,0xec,0x00,0xfa },
+ 16, 0xfd60, 0, {0x00,0x3f,0xc0,0x0f,0x80,0x03,0xec,0x00,0xe9,0x60,0x3e,0xe4,0x0f,0x90,0x03,0xc2 },
+ 16, 0xfd70, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x20,0xff,0x90,0x3e,0x20 },
+ 16, 0xfd80, 0, {0x0c,0xa9,0x07,0x2e,0x44,0xc9,0x91,0x30,0xa0,0x0c,0xb8,0x63,0x2f,0x44,0xcb,0xa1 },
+ 16, 0xfd90, 0, {0x36,0x20,0x8c,0xf8,0x03,0x36,0x00,0xcf,0x82,0x33,0xe0,0x0c,0xf8,0x23,0x2e,0x00 },
+ 16, 0xfda0, 0, {0xce,0xc0,0x3b,0xe0,0x0c,0x68,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfdb0, 0, {0xa8,0x11,0x9c,0x84,0xb3,0x54,0x2c,0xf4,0x28,0xba,0x8a,0x3e,0x40,0x81,0xa0,0x29 },
+ 16, 0xfdc0, 0, {0xb0,0x0f,0x78,0x42,0xae,0x00,0x83,0x90,0x33,0xe8,0x0d,0xe1,0x00,0x85,0x40,0x82 },
+ 16, 0xfdd0, 0, {0x24,0x23,0xc6,0x0d,0x71,0x03,0x5e,0xe0,0x87,0x00,0x2b,0xc1,0x0d,0x44,0x02,0x2a },
+ 16, 0xfde0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x08,0x35,0x14,0x6d,0xc0 },
+ 16, 0xfdf0, 0, {0x88,0x72,0x32,0x5c,0x80,0x84,0x30,0x2b,0x88,0x0a,0x70,0x42,0x5c,0xa8,0x91,0x08 },
+ 16, 0xfe00, 0, {0x25,0xc8,0x09,0x70,0x02,0x4c,0x22,0x83,0x0a,0x61,0xc0,0x09,0x20,0x02,0x04,0x00 },
+ 16, 0xfe10, 0, {0x87,0x00,0x21,0xc0,0x08,0x60,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfe20, 0, {0x20,0x14,0xcc,0x10,0xb3,0x85,0x6c,0xdc,0x08,0x34,0x02,0x4d,0x21,0x81,0x00,0x28 },
+ 16, 0xfe30, 0, {0x02,0x4a,0x31,0x12,0xef,0x0c,0x91,0xc2,0x20,0xf0,0x08,0x30,0x42,0x8e,0x00,0x82 },
+ 16, 0xfe40, 0, {0x40,0x20,0xc8,0x19,0x28,0x02,0x22,0x81,0x83,0xc0,0x28,0xd4,0x09,0x00,0x0a,0x08 },
+ 16, 0xfe50, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xfb,0xa0,0x3e,0xc0 },
+ 16, 0xfe60, 0, {0x8c,0x04,0x12,0x7d,0x10,0xcf,0x02,0x3a,0x50,0x08,0xc0,0x42,0x7d,0x52,0x58,0x01 },
+ 16, 0xfe70, 0, {0x36,0x22,0x69,0xd0,0x13,0x2a,0x00,0x88,0x82,0x32,0xf0,0x09,0xb8,0x82,0x2f,0x00 },
+ 16, 0xfe80, 0, {0xc9,0xc8,0x23,0xc0,0x0c,0x8a,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfe90, 0, {0x80,0x00,0xec,0x00,0xb9,0x40,0x3c,0x50,0x4f,0x80,0x23,0xac,0x12,0xfb,0x00,0x2a },
+ 16, 0xfea0, 0, {0xc0,0x6d,0x80,0x13,0xac,0x00,0xe8,0x04,0xba,0x10,0x0f,0x80,0x03,0xe8,0x00,0xf3 },
+ 16, 0xfeb0, 0, {0x08,0x3c,0x80,0x0f,0x90,0x83,0xec,0x04,0xf9,0x60,0x2c,0xc2,0x0f,0x80,0x83,0xe0 },
+ 16, 0xfec0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x00,0xec,0x2c,0x3f,0xf0 },
+ 16, 0xfed0, 0, {0x8c,0xfa,0x8b,0xbc,0x00,0xfe,0x00,0x3f,0x00,0x0f,0x79,0x03,0x3c,0x00,0xce,0x08 },
+ 16, 0xfee0, 0, {0x0b,0xc2,0x0c,0xf0,0x03,0xbc,0x00,0xfc,0x00,0x33,0x40,0x8c,0x7a,0x03,0x3a,0x00 },
+ 16, 0xfef0, 0, {0xc5,0x00,0x33,0xc0,0x4c,0xc8,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xff00, 0, {0x81,0x04,0x6c,0x00,0x88,0xc0,0x2e,0xe0,0x08,0x94,0x02,0x2c,0x00,0xbb,0x80,0x66 },
+ 16, 0xff10, 0, {0x30,0x16,0xb0,0x02,0x2c,0x00,0xda,0x4c,0x22,0xf0,0x08,0xf0,0x03,0xec,0x00,0xeb },
+ 16, 0xff20, 0, {0xc0,0x22,0x68,0x00,0x94,0x02,0x2c,0x02,0xa9,0x80,0x22,0xc0,0x08,0x0c,0x02,0xa0 },
+ 16, 0xff30, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xab,0x04,0x2e,0xc0 },
+ 16, 0xff40, 0, {0x08,0xa4,0x06,0x2c,0x04,0xab,0x10,0x2e,0x60,0x43,0x80,0x82,0x6c,0x01,0x81,0x80 },
+ 16, 0xff50, 0, {0x28,0x0a,0x08,0x91,0x00,0xe0,0x00,0xb8,0x80,0x02,0xe0,0x08,0x80,0x02,0x2d,0x80 },
+ 16, 0xff60, 0, {0x88,0xc0,0x22,0xc0,0x08,0x82,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xff70, 0, {0x08,0x04,0x0c,0x00,0x80,0x44,0x2c,0xc8,0x28,0xa0,0x22,0x0c,0x04,0xb3,0x26,0x2c },
+ 16, 0xff80, 0, {0xc8,0x88,0x01,0x06,0x0c,0xe0,0x91,0x20,0x20,0x0c,0x38,0x04,0x22,0xc0,0x48,0xa3 },
+ 16, 0xff90, 0, {0x42,0xa0,0x81,0x08,0x00,0x02,0x0c,0x80,0x81,0x00,0x20,0xc0,0x28,0x00,0x02,0x82 },
+ 16, 0xffa0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x00,0xa9,0x40,0x3e,0x44 },
+ 16, 0xffb0, 0, {0x08,0xb1,0x03,0x2c,0x40,0xea,0x49,0x2e,0x0d,0x0b,0xb6,0x13,0x7d,0x80,0xc9,0x40 },
+ 16, 0xffc0, 0, {0xba,0xd0,0x0c,0xb4,0x03,0xac,0x00,0xf8,0x00,0x32,0x40,0x0c,0x80,0x0b,0x20,0x00 },
+ 16, 0xffd0, 0, {0xc5,0x00,0xb2,0xc0,0x0c,0x80,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xffe0, 0, {0xa0,0x1d,0xfc,0x04,0xfc,0x00,0x3d,0xc5,0x0b,0xf1,0x00,0xfc,0xd0,0x77,0x29,0x37 },
+ 16, 0xfff0, 0, {0x0c,0x8e,0x74,0x03,0xfc,0x08,0xfd,0x69,0x3f,0xd8,0x0f,0xf0,0x03,0xbc,0x00,0xef },
+ 16, 0x8010, 0, {0x00,0x3f,0x40,0x07,0xc0,0x03,0xf0,0x40,0xfd,0x00,0x3f,0xc0,0x0f,0xc0,0x03,0xe8 },
+ 16, 0x8020, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x0d,0xfc,0xc0,0xdc,0x80,0x3f,0xc8 },
+ 16, 0x8030, 0, {0x0f,0x48,0x03,0x7c,0x20,0xff,0x68,0x37,0xe0,0x0e,0xf1,0x03,0x9c,0x00,0xbf,0x20 },
+ 16, 0x8040, 0, {0x37,0xe0,0x0c,0xc8,0x13,0x3c,0x40,0xed,0x60,0xbb,0xe4,0x2c,0x43,0x4b,0x70,0xa0 },
+ 16, 0x8050, 0, {0xcc,0x2c,0x3f,0x09,0x0f,0xd8,0x43,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8060, 0, {0x80,0x00,0xed,0xc0,0xb8,0x80,0x2f,0xf4,0x0f,0x98,0x02,0x3f,0x00,0xbf,0x42,0x22 },
+ 16, 0x8070, 0, {0xca,0x08,0xf4,0x02,0x3e,0x00,0xbf,0xd0,0x22,0x60,0x28,0x88,0x0a,0x3d,0x80,0x8d },
+ 16, 0x8080, 0, {0x40,0x22,0xc8,0x08,0x81,0x02,0x21,0x80,0xdb,0xc0,0x2e,0xa5,0x0b,0x98,0x42,0x20 },
+ 16, 0x8090, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x10,0xb0,0x00,0x2c,0xc0 },
+ 16, 0x80a0, 0, {0x0b,0x20,0x02,0xcc,0x00,0xb3,0x20,0x26,0xc0,0x8a,0x36,0x12,0x8c,0x41,0xb3,0x00 },
+ 16, 0x80b0, 0, {0x2e,0x40,0x08,0x00,0x02,0x0d,0x81,0xa1,0x30,0x22,0xc8,0x89,0xa2,0x42,0x08,0x20 },
+ 16, 0x80c0, 0, {0xb0,0x00,0x2c,0x40,0x0b,0x90,0x26,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x80d0, 0, {0xc0,0x15,0xac,0x00,0xb8,0x50,0x2e,0xc0,0x0a,0x90,0x02,0xac,0x00,0xbb,0x00,0x22 },
+ 16, 0x80e0, 0, {0xc0,0x08,0xb0,0x62,0x2c,0x10,0xbb,0x04,0x2a,0xf0,0x4a,0x88,0x02,0x0c,0x00,0x81 },
+ 16, 0x80f0, 0, {0x00,0x22,0xc0,0x09,0xb8,0x80,0x26,0x00,0xb8,0x80,0x2e,0x21,0x0b,0x90,0x02,0x30 },
+ 16, 0x8100, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x15,0xec,0x00,0xd8,0xc0,0x3e,0xc0 },
+ 16, 0x8110, 0, {0x0b,0x80,0x03,0xec,0x00,0xfb,0x00,0x36,0x80,0x0e,0xb0,0x03,0xac,0x00,0xfb,0x00 },
+ 16, 0x8120, 0, {0x3c,0xe0,0x0c,0x0c,0x03,0x2c,0x00,0xe9,0x00,0x10,0xc0,0x0c,0x8c,0x03,0x06,0x00 },
+ 16, 0x8130, 0, {0xf8,0xcd,0x3e,0x22,0x0f,0x18,0x03,0x40,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8140, 0, {0xe0,0x01,0xbc,0x00,0xff,0x00,0x3e,0xc0,0x0f,0xf0,0x03,0x7c,0x00,0xf7,0x02,0x3f },
+ 16, 0x8150, 0, {0xe4,0x0f,0x70,0x03,0x7c,0x04,0xb7,0x00,0x37,0x40,0x0d,0xc0,0x03,0xfc,0x00,0xfd },
+ 16, 0x8160, 0, {0x00,0x37,0xd0,0x0e,0xc0,0x43,0xf4,0x00,0xdf,0x00,0x3f,0x80,0x8f,0xda,0x03,0xf8 },
+ 16, 0x8170, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xf8,0x10,0x3a,0xc0 },
+ 16, 0x8180, 0, {0x6d,0xa6,0x13,0xec,0x00,0xcb,0x00,0x3a,0xd0,0x0f,0xb0,0x03,0x2c,0x10,0xdb,0x10 },
+ 16, 0x8190, 0, {0x36,0xd8,0x0d,0x84,0x03,0xec,0x06,0xc9,0x08,0x3a,0xc0,0x0e,0x86,0x03,0xa8,0x60 },
+ 16, 0x81a0, 0, {0xf8,0x20,0x3a,0x40,0x0c,0x90,0x03,0x54,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x81b0, 0, {0x98,0x05,0x3c,0x00,0xbb,0x40,0x23,0xd0,0x08,0x30,0x02,0x3e,0x10,0xaf,0x00,0x20 },
+ 16, 0x81c0, 0, {0xc0,0x0b,0xf0,0x02,0x3c,0x00,0x8f,0x50,0x2e,0xc8,0x06,0x8a,0x02,0xfc,0x00,0x8d },
+ 16, 0x81d0, 0, {0x24,0x82,0xd6,0x08,0x32,0x02,0x2d,0x08,0x3a,0x40,0x22,0x80,0x0d,0x90,0x03,0x62 },
+ 16, 0x81e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0x4c,0x00,0xb0,0x20,0x28,0xc2 },
+ 16, 0x81f0, 0, {0x08,0x04,0x02,0x8c,0x00,0x13,0x02,0x28,0xc0,0x0b,0x30,0x02,0x0c,0x30,0x93,0x80 },
+ 16, 0x8200, 0, {0x24,0xd0,0x09,0x20,0x02,0xcc,0x00,0x91,0x40,0x08,0xc0,0x2a,0x14,0x02,0x81,0x00 },
+ 16, 0x8210, 0, {0x90,0x00,0x68,0x00,0x08,0x18,0x02,0x3a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8220, 0, {0x70,0x01,0x1e,0x00,0xb4,0xa0,0x21,0xe0,0x08,0xc8,0x12,0x9e,0x00,0xb3,0x82,0x21 },
+ 16, 0x8230, 0, {0xe0,0x0b,0x7a,0x0a,0x1e,0x00,0x97,0x80,0x2d,0xe1,0x0a,0x48,0x02,0xce,0x40,0x95 },
+ 16, 0x8240, 0, {0x90,0x29,0xe4,0x08,0x58,0x02,0x9a,0x00,0xb7,0x88,0x21,0xe0,0x09,0x58,0x02,0x5c },
+ 16, 0x8250, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x4a,0x00,0x0c,0x00,0xf0,0x80,0x38,0xc4 },
+ 16, 0x8260, 0, {0x0c,0x25,0x03,0x8c,0x20,0x93,0x00,0x38,0xc4,0x0f,0xb0,0x03,0x0c,0x80,0xd3,0x00 },
+ 16, 0x8270, 0, {0x34,0xc0,0x0d,0x04,0x13,0xcc,0x08,0x99,0x00,0x2a,0xc0,0x0e,0x21,0x03,0x88,0x04 },
+ 16, 0x8280, 0, {0xf3,0x00,0x38,0xc0,0x0c,0x11,0x83,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8290, 0, {0x42,0x15,0xbc,0x00,0xf4,0x00,0x3f,0xc3,0x0e,0xc0,0x03,0x1c,0x00,0xaf,0x4a,0x7f },
+ 16, 0x82a0, 0, {0xc4,0x0f,0xb2,0x03,0xfd,0x01,0xef,0x10,0x3f,0x84,0x0f,0xc0,0x03,0xfc,0x00,0xe9 },
+ 16, 0x82b0, 0, {0x00,0x37,0xc2,0x0e,0xf1,0x47,0x7c,0x00,0xf7,0x00,0x3d,0xc0,0x0f,0x50,0x03,0xd0 },
+ 16, 0x82c0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x15,0xec,0x08,0xf8,0x00,0x3e,0xca },
+ 16, 0x82d0, 0, {0x0f,0x90,0x03,0xef,0x21,0xfb,0x80,0x7a,0x40,0x8f,0xb2,0xa1,0x2f,0x00,0xcb,0x60 },
+ 16, 0x82e0, 0, {0x3e,0xc0,0x0f,0xb0,0x03,0xed,0xa0,0xe9,0x30,0x32,0xc0,0x2d,0xb0,0x03,0xe4,0x00 },
+ 16, 0x82f0, 0, {0xf8,0x00,0x3e,0x00,0x0f,0xb0,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8300, 0, {0xc8,0x91,0x9d,0x00,0xb4,0x01,0x2d,0xc8,0x0b,0x70,0x02,0xcc,0x80,0x8f,0x20,0x21 },
+ 16, 0x8310, 0, {0xc0,0x8b,0x76,0x03,0x5d,0x00,0x87,0x0a,0x2d,0xc0,0x0b,0x40,0x22,0xfd,0x00,0x8d },
+ 16, 0x8320, 0, {0x10,0x23,0xc8,0x08,0x50,0x12,0xd4,0x00,0xb7,0x00,0x2d,0xc0,0x0b,0x70,0x02,0xf2 },
+ 16, 0x8330, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x9e,0x00,0xb4,0x80,0x2d,0xe0 },
+ 16, 0x8340, 0, {0x0b,0x7c,0x02,0xde,0x40,0xa7,0x82,0x2d,0xe0,0x0b,0x3a,0x02,0x8e,0x00,0x87,0x90 },
+ 16, 0x8350, 0, {0x2d,0xe0,0x0b,0x58,0x02,0x5e,0x00,0xa5,0xa2,0x65,0xe0,0x08,0x68,0x82,0xda,0x00 },
+ 16, 0x8360, 0, {0x95,0x80,0x2d,0x60,0x0b,0x78,0x02,0xe0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8370, 0, {0x08,0x84,0xcc,0x00,0xb0,0x09,0x2c,0xc0,0x0b,0x38,0x02,0xcc,0x00,0x83,0x00,0x2e },
+ 16, 0x8380, 0, {0xc0,0x0b,0x30,0x42,0x4c,0x00,0x83,0x00,0x2c,0xa0,0x0b,0x04,0x02,0xcc,0x00,0x81 },
+ 16, 0x8390, 0, {0x00,0xa0,0xc0,0x08,0xb0,0x06,0xcf,0x80,0xb3,0x10,0x2c,0xc4,0x0b,0x31,0x02,0xc3 },
+ 16, 0x83a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0xa8,0x00,0xfe,0x80,0x3e,0x80 },
+ 16, 0x83b0, 0, {0x0f,0xe8,0x13,0xe8,0x00,0xea,0x00,0x3f,0xb0,0x0f,0xa0,0x03,0xa8,0x02,0xc2,0x00 },
+ 16, 0x83c0, 0, {0x2f,0x88,0x0f,0xe0,0x03,0xe8,0x00,0xea,0x00,0x36,0x00,0x0c,0xe0,0x03,0xf9,0x20 },
+ 16, 0x83d0, 0, {0xde,0x80,0x3f,0xa0,0x4f,0xa8,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x83e0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x10,0x3c,0x10,0x0f,0x80,0x83,0xe1,0x00,0xe8,0x00,0x22 },
+ 16, 0x83f0, 0, {0x06,0x0f,0x00,0x13,0xe0,0x01,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x83,0xe0,0x00,0xf8 },
+ 16, 0x8400, 0, {0x00,0x3e,0x00,0x0f,0x84,0x23,0xe0,0x00,0xf8,0x00,0x3e,0x10,0x0f,0x80,0x03,0xd2 },
+ 16, 0x8410, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xe4,0x00,0xf9,0x10,0x3e,0x44 },
+ 16, 0x8420, 0, {0x0d,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x40,0x0c,0x90,0x12,0x24,0x00,0xf9,0x10 },
+ 16, 0x8430, 0, {0x32,0x40,0x8f,0x90,0x03,0xc4,0x00,0xc9,0x00,0x32,0x10,0x0c,0x9c,0x01,0x24,0x00 },
+ 16, 0x8440, 0, {0xf9,0x10,0x3e,0x70,0x0f,0x90,0x02,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8450, 0, {0x80,0x14,0x64,0x00,0xb9,0xc0,0x2e,0x48,0x08,0x91,0x02,0xe4,0x00,0xb9,0x00,0x2e },
+ 16, 0x8460, 0, {0x40,0x0d,0x90,0x03,0x67,0x00,0xb9,0x80,0x2a,0x60,0x0b,0x99,0x02,0xe4,0x00,0x81 },
+ 16, 0x8470, 0, {0x00,0x22,0x40,0x2c,0x90,0x12,0x25,0x20,0xb9,0x48,0x2e,0x52,0x0b,0x94,0x02,0xe0 },
+ 16, 0x8480, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x00,0x2e,0x40 },
+ 16, 0x8490, 0, {0x68,0x90,0x46,0xe4,0x00,0xb9,0x00,0x2e,0xc0,0x08,0x90,0x02,0xa4,0x60,0xb9,0x00 },
+ 16, 0x84a0, 0, {0x22,0x48,0x0b,0x90,0x06,0xe4,0x02,0x89,0x00,0xa0,0x40,0x08,0x90,0x02,0xa6,0x10 },
+ 16, 0x84b0, 0, {0xb9,0x00,0x0e,0x40,0x0b,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x84c0, 0, {0x08,0x04,0x04,0x80,0xb1,0x00,0x2c,0x48,0x08,0x10,0x02,0xc4,0x84,0xb1,0x20,0x2c },
+ 16, 0x84d0, 0, {0x40,0x09,0x12,0x02,0xc4,0x80,0xb1,0x20,0x28,0x40,0x0b,0x10,0x02,0xc4,0x80,0x89 },
+ 16, 0x84e0, 0, {0x20,0x20,0x40,0x4b,0x12,0x0a,0x84,0x84,0xb1,0x20,0x2c,0x48,0x8b,0x10,0x02,0xc2 },
+ 16, 0x84f0, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xba,0x00,0x2e,0x00 },
+ 16, 0x8500, 0, {0x0c,0x80,0x03,0xe8,0x08,0xf8,0x50,0x3e,0x14,0x0c,0x85,0x03,0x20,0x00,0xb8,0x00 },
+ 16, 0x8510, 0, {0x32,0x00,0x0f,0xa0,0x03,0xe1,0x40,0xc8,0x50,0x32,0x14,0x0c,0xa5,0x03,0xa1,0x40 },
+ 16, 0x8520, 0, {0xf8,0x00,0x3e,0x00,0x0f,0xa0,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8530, 0, {0x88,0x0d,0xe4,0x40,0xfd,0x00,0x3e,0x44,0x0f,0xd0,0x03,0xe4,0x40,0xb9,0x11,0x3f },
+ 16, 0x8540, 0, {0x40,0x0f,0x91,0x03,0x64,0x44,0xf9,0x10,0x3f,0x40,0x0f,0xd0,0x03,0xe4,0x40,0xfd },
+ 16, 0x8550, 0, {0x10,0x3f,0x10,0x8c,0xd1,0x03,0x74,0x40,0xff,0x10,0x3f,0x44,0x0f,0xd0,0x03,0xe6 },
+ 16, 0x8560, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0x66,0x20,0xed,0x00,0x33,0x69 },
+ 16, 0x8570, 0, {0x4d,0x50,0x43,0x56,0x00,0xf9,0xa0,0x34,0x40,0x0f,0x9a,0x0b,0x34,0x00,0xdd,0x80 },
+ 16, 0x8580, 0, {0x3b,0x40,0x0b,0x50,0x03,0xe4,0x00,0xf9,0x00,0x32,0xe0,0x0e,0xd0,0x03,0xf4,0x00 },
+ 16, 0x8590, 0, {0xfd,0x00,0x3f,0x40,0x0c,0xd0,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x85a0, 0, {0x78,0x10,0xe2,0x80,0x88,0x04,0x22,0x10,0x0b,0x80,0x02,0x20,0x09,0xb8,0xf0,0x22 },
+ 16, 0x85b0, 0, {0x00,0x0b,0x8e,0x12,0xa0,0x00,0xb8,0x52,0x2e,0x00,0x0b,0x80,0x02,0xe0,0x05,0xb8 },
+ 16, 0x85c0, 0, {0xaa,0x23,0x3e,0x0d,0x80,0x02,0xe0,0x00,0xb8,0x00,0x3a,0x00,0x08,0x80,0x02,0xce },
+ 16, 0x85d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc4,0x20,0xa9,0x00,0xa4,0x44 },
+ 16, 0x85e0, 0, {0x09,0x90,0x02,0xc5,0x00,0xa1,0x08,0x2c,0x40,0x0b,0x11,0x82,0x04,0x00,0xb1,0x00 },
+ 16, 0x85f0, 0, {0x28,0x40,0x0a,0x10,0x42,0xc4,0x00,0xb5,0x00,0xa1,0x40,0x08,0x10,0x02,0xc4,0x00 },
+ 16, 0x8600, 0, {0xb1,0x01,0x2c,0x40,0x08,0x10,0x20,0xd2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8610, 0, {0x18,0x15,0xa4,0x00,0x89,0x04,0x22,0x40,0x0b,0x90,0x00,0xac,0x00,0x39,0x00,0x2a },
+ 16, 0x8620, 0, {0x40,0x0b,0x10,0x02,0xa4,0x00,0xb9,0x00,0x2e,0x48,0x0b,0x90,0x12,0xe4,0x00,0xb9 },
+ 16, 0x8630, 0, {0x00,0x21,0x60,0x09,0x92,0x22,0xe4,0x28,0xb9,0x00,0x0a,0x50,0x08,0x90,0x06,0xc6 },
+ 16, 0x8640, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xe9,0x00,0x36,0x40 },
+ 16, 0x8650, 0, {0x0d,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x48,0x0f,0x90,0x03,0x24,0x00,0xd9,0x00 },
+ 16, 0x8660, 0, {0x3a,0x78,0x0e,0x98,0x03,0xe4,0x00,0xb9,0x00,0xb2,0x40,0x0e,0x92,0x23,0xe6,0x00 },
+ 16, 0x8670, 0, {0xb9,0x50,0x3e,0x70,0x2c,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8680, 0, {0x68,0x01,0x84,0x00,0xf9,0x00,0x3e,0x40,0x4f,0x9c,0x23,0x64,0x00,0xf9,0x04,0x36 },
+ 16, 0x8690, 0, {0x48,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x60,0x0f,0x92,0x03,0xe4,0x00,0xf9 },
+ 16, 0x86a0, 0, {0x00,0x3e,0x40,0x8f,0x90,0x83,0xe4,0x44,0xf9,0x00,0x78,0x64,0x0f,0x90,0x03,0xda },
+ 16, 0x86b0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x00,0x3e,0x00 },
+ 16, 0x86c0, 0, {0x0f,0x82,0x03,0xa0,0x40,0xe8,0x00,0x3e,0x00,0x0d,0x80,0x03,0x20,0xc0,0xc8,0x80 },
+ 16, 0x86d0, 0, {0x3e,0x12,0x0f,0x80,0x03,0x60,0x00,0x7c,0x00,0x33,0x00,0x0d,0x80,0x13,0xe0,0x10 },
+ 16, 0x86e0, 0, {0xc8,0x64,0x3e,0x08,0x0c,0x82,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x86f0, 0, {0x28,0x05,0x28,0x00,0xb6,0xe0,0x0f,0xa0,0x0b,0x60,0x82,0x38,0x00,0xaa,0x00,0x2e },
+ 16, 0x8700, 0, {0x80,0x08,0xa0,0x42,0xba,0x00,0xae,0x20,0x2f,0x88,0x0b,0xe5,0x02,0x28,0x00,0xba },
+ 16, 0x8710, 0, {0xd8,0x37,0x80,0x08,0xec,0x02,0xf8,0x04,0x8e,0x00,0x2f,0x90,0x0d,0xe0,0x02,0xca },
+ 16, 0x8720, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb0,0x24,0x2c,0x60 },
+ 16, 0x8730, 0, {0x0b,0x38,0x02,0x8e,0x80,0xab,0x00,0x2c,0xc0,0x09,0x30,0x02,0x0d,0x08,0x00,0x80 },
+ 16, 0x8740, 0, {0x6c,0xd0,0x0b,0x34,0x02,0xcc,0x00,0xb8,0xc0,0x20,0x00,0x48,0x34,0x12,0xcc,0x40 },
+ 16, 0x8750, 0, {0x83,0x00,0x2c,0xe0,0x0a,0x35,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8760, 0, {0xa0,0x01,0x1c,0x40,0xb7,0x00,0x2d,0x02,0x8b,0x60,0x02,0x9e,0x00,0x87,0x20,0x2f },
+ 16, 0x8770, 0, {0xe0,0x08,0x72,0x02,0x9e,0x00,0xa4,0x00,0x2d,0xc0,0x0b,0xf8,0x02,0x9c,0xc0,0xb3 },
+ 16, 0x8780, 0, {0x02,0xa5,0xc0,0x08,0x50,0x86,0xfe,0x00,0x87,0x00,0x2f,0xd0,0x09,0x70,0x02,0xe8 },
+ 16, 0x8790, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xf4,0x80,0x3d,0x20 },
+ 16, 0x87a0, 0, {0x0f,0x58,0x03,0x9e,0x00,0x67,0x80,0x3d,0xf8,0x0d,0x38,0x02,0x1a,0x10,0x44,0x80 },
+ 16, 0x87b0, 0, {0x3d,0xe0,0x0f,0x58,0x03,0xde,0x20,0xb4,0x80,0x33,0xa0,0x2c,0x68,0x03,0xd6,0x00 },
+ 16, 0x87c0, 0, {0xc7,0x81,0x3d,0xe0,0x0c,0x78,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x87d0, 0, {0x08,0x1d,0xac,0x08,0xf8,0x00,0x3e,0x00,0x8f,0x80,0x03,0x6c,0x00,0x3b,0x12,0x3e },
+ 16, 0x87e0, 0, {0xca,0x0f,0xb5,0x03,0xc8,0x00,0xf8,0x04,0x7e,0xc0,0x0f,0x90,0x03,0x6c,0x80,0xfb },
+ 16, 0x87f0, 0, {0x04,0x3a,0x40,0x0f,0x90,0x23,0xc8,0x00,0xf9,0x01,0x3c,0xc0,0x0f,0xb0,0x03,0xc2 },
+ 16, 0x8800, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfe,0x00,0xac,0x90,0x31,0x48 },
+ 16, 0x8810, 0, {0x08,0xf8,0x03,0xfa,0x00,0xcf,0x80,0x3f,0xe0,0x0c,0xfc,0x13,0x3e,0x04,0xfc,0x80 },
+ 16, 0x8820, 0, {0x35,0xa0,0x0c,0x78,0x03,0xbe,0x00,0xdf,0x80,0x3b,0x20,0x24,0xf8,0x03,0x2e,0x40 },
+ 16, 0x8830, 0, {0xcf,0x80,0x33,0xe0,0x03,0xf9,0x03,0xd0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8840, 0, {0xa8,0x11,0xbc,0x00,0x80,0x00,0x01,0x00,0x08,0x72,0x02,0xd0,0x00,0x87,0x00,0x2d },
+ 16, 0x8850, 0, {0xc8,0x0a,0xf0,0x02,0x98,0x40,0xf5,0x00,0x61,0x41,0x00,0x74,0x02,0x1c,0x00,0xb4 },
+ 16, 0x8860, 0, {0x00,0x21,0xc8,0x08,0x60,0x02,0x3e,0x20,0x86,0x08,0x21,0xd8,0x0f,0x50,0x02,0xea },
+ 16, 0x8870, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x9c,0x00,0xa4,0x00,0x21,0x00 },
+ 16, 0x8880, 0, {0x08,0x50,0x02,0xd8,0x00,0x97,0x00,0x2d,0xc0,0x88,0x71,0x02,0x14,0x00,0xb0,0x00 },
+ 16, 0x8890, 0, {0x25,0x90,0x08,0xc0,0x82,0x9c,0x40,0x93,0x00,0x29,0xa1,0x88,0x60,0x02,0x14,0x12 },
+ 16, 0x88a0, 0, {0x87,0x40,0x29,0x40,0x0b,0x60,0x02,0xc4,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x88b0, 0, {0x60,0x14,0xcc,0x00,0x80,0xd0,0xa0,0x00,0x08,0x1c,0x02,0xc0,0x00,0x93,0x00,0x2c },
+ 16, 0x88c0, 0, {0xd0,0x0a,0xb0,0x26,0x80,0x00,0xb3,0x00,0x24,0xe4,0x08,0x08,0x02,0x8c,0x00,0xb0 },
+ 16, 0x88d0, 0, {0x02,0x02,0x41,0x08,0x08,0x02,0x03,0x01,0x81,0x00,0x28,0x42,0x1a,0x00,0x42,0xd8 },
+ 16, 0x88e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x15,0xbc,0x00,0xe8,0xc0,0x32,0x80 },
+ 16, 0x88f0, 0, {0x0c,0xb5,0x03,0xe4,0x00,0x9f,0x00,0x3d,0xe0,0x0c,0xf0,0x0b,0x24,0x00,0xf8,0x00 },
+ 16, 0x8900, 0, {0x36,0xe0,0x0c,0x25,0x03,0xbc,0x05,0xd8,0x02,0x2a,0x00,0x08,0xba,0x02,0x2a,0x00 },
+ 16, 0x8910, 0, {0xc1,0x02,0x3a,0x50,0x8b,0x90,0x03,0xee,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8920, 0, {0x80,0x00,0xec,0x00,0xfb,0x08,0x3e,0x80,0x0f,0xa1,0x03,0xec,0x04,0xeb,0x02,0x2e },
+ 16, 0x8930, 0, {0xc6,0x0f,0xb0,0x17,0x44,0x00,0xe8,0x00,0x3a,0x40,0x0f,0x80,0x02,0x6c,0x00,0xfb },
+ 16, 0x8940, 0, {0x00,0x3e,0xe0,0x0f,0x90,0x93,0xe1,0x00,0xd9,0x00,0x26,0x70,0x8f,0x90,0x01,0xe1 },
+ 16, 0x8950, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xfc,0x00,0xfc,0x03,0x37,0x24 },
+ 16, 0x8960, 0, {0x0d,0xf8,0x03,0xe0,0x00,0xff,0x00,0x3f,0xc1,0x8d,0xf0,0x0b,0x38,0x00,0xcc,0x00 },
+ 16, 0x8970, 0, {0x3f,0xc0,0x0f,0xfa,0x03,0x3c,0x0c,0xfc,0x04,0x3b,0x80,0x0c,0xa0,0x03,0x94,0x20 },
+ 16, 0x8980, 0, {0x89,0x05,0x3b,0x00,0x4f,0xd0,0x23,0xc0,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8990, 0, {0x80,0x04,0x6c,0x00,0xb0,0x06,0x20,0x13,0x88,0xa8,0x02,0xeb,0x00,0xbb,0x00,0x2e },
+ 16, 0x89a0, 0, {0xc0,0x08,0xb0,0x02,0x2a,0x00,0xa8,0x80,0x2e,0xe0,0x0b,0x94,0x1a,0x2c,0x00,0xbb },
+ 16, 0x89b0, 0, {0x00,0xa2,0x40,0x29,0x98,0x02,0xe2,0x00,0xa9,0x84,0x22,0x20,0x0b,0x98,0x02,0xe0 },
+ 16, 0x89c0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xb8,0x00,0x22,0x00 },
+ 16, 0x89d0, 0, {0x09,0x82,0x02,0xe6,0x00,0xbb,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0x26,0x00,0x88,0x80 },
+ 16, 0x89e0, 0, {0x2e,0xa0,0x0b,0xa0,0x02,0x2c,0x00,0xb3,0x00,0x2a,0x00,0x09,0x98,0x02,0xea,0x20 },
+ 16, 0x89f0, 0, {0xa9,0x80,0x2a,0x60,0x9b,0x98,0x82,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8a00, 0, {0x08,0x04,0x0c,0x00,0xb8,0x00,0x20,0x00,0x09,0x08,0x02,0xc4,0x00,0xb3,0x00,0x26 },
+ 16, 0x8a10, 0, {0xc0,0x00,0x30,0x02,0x00,0x00,0x81,0x00,0x2c,0x41,0x0b,0x00,0x02,0x0c,0x00,0xb0 },
+ 16, 0x8a20, 0, {0x00,0x20,0xc0,0x0b,0x00,0x02,0xc8,0x80,0xa8,0x00,0x20,0x41,0x0b,0x10,0x02,0xc2 },
+ 16, 0x8a30, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x10,0xf8,0x50,0xb2,0x00 },
+ 16, 0x8a40, 0, {0x0d,0x80,0x03,0xe0,0x00,0xfb,0x00,0x3d,0xc0,0x0d,0xf0,0x13,0x24,0x02,0xc8,0x06 },
+ 16, 0x8a50, 0, {0x3e,0x80,0x0f,0xa0,0x03,0x3c,0x04,0xfb,0x00,0x78,0x80,0x0c,0xa0,0x03,0xe4,0x00 },
+ 16, 0x8a60, 0, {0xe9,0x00,0x1a,0x40,0x0f,0x90,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8a70, 0, {0xa0,0x1d,0xfc,0x00,0xf4,0x20,0x3f,0x00,0x0e,0xc0,0x02,0xf0,0x01,0xff,0x00,0x3f },
+ 16, 0x8a80, 0, {0xc0,0x0f,0xf0,0x23,0xf0,0x00,0xfd,0x00,0x3f,0xc0,0x0f,0xc0,0x03,0xfc,0x00,0xfc },
+ 16, 0x8a90, 0, {0x00,0x3f,0x40,0x9c,0xc0,0x03,0xf0,0x40,0xfd,0x00,0x3f,0x40,0x0f,0xd0,0x43,0xe8 },
+ 16, 0x8aa0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf0,0x00,0xed,0x23,0xb7,0x48 },
+ 16, 0x8ab0, 0, {0x0c,0xe1,0xc3,0x7c,0xc0,0xdd,0x80,0x37,0xe0,0x0f,0xcb,0x03,0xfe,0x08,0xfc,0x28 },
+ 16, 0x8ac0, 0, {0x3f,0xf0,0x1c,0xfb,0x23,0x7c,0x01,0xff,0x14,0x77,0xe2,0x4f,0xe8,0x23,0x7c,0x00 },
+ 16, 0x8ad0, 0, {0xc4,0x80,0x33,0x48,0x2c,0xf8,0x22,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8ae0, 0, {0x80,0x10,0xe0,0xe0,0xc9,0xc0,0x22,0x5b,0x88,0x96,0x22,0x2d,0x00,0x89,0x22,0x22 },
+ 16, 0x8af0, 0, {0xca,0x0b,0x9e,0x22,0xe2,0xa0,0xb9,0x61,0x2c,0xe0,0x88,0x9f,0x02,0x3d,0x85,0xbf },
+ 16, 0x8b00, 0, {0x60,0x26,0x50,0x48,0xa0,0x02,0x3c,0x00,0x88,0x00,0x22,0x50,0x08,0xb0,0x02,0x20 },
+ 16, 0x8b10, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc0,0x80,0xb1,0x10,0x20,0x44 },
+ 16, 0x8b20, 0, {0x0b,0xb2,0x02,0xce,0xd0,0x81,0x08,0x2c,0xc0,0x0b,0x01,0x02,0x8c,0x08,0xb3,0x08 },
+ 16, 0x8b30, 0, {0x2c,0xc9,0x08,0x10,0x62,0x8c,0x60,0xb3,0x32,0x24,0x80,0x0a,0xa0,0x02,0x6c,0x03 },
+ 16, 0x8b40, 0, {0x9a,0x01,0x26,0x44,0x48,0xb0,0x42,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8b50, 0, {0xc0,0x15,0xa4,0xa0,0x8b,0x02,0x22,0xe0,0x0b,0xb0,0x62,0xac,0x98,0x99,0x00,0x2a },
+ 16, 0x8b60, 0, {0xc2,0x0b,0x98,0x06,0xe4,0x00,0xbb,0x02,0x2e,0xc0,0x08,0x91,0x42,0x2c,0x10,0xbb },
+ 16, 0x8b70, 0, {0x00,0x6e,0x80,0x0a,0x80,0x02,0x6c,0x00,0x1b,0x00,0x06,0x40,0x48,0xb8,0x0a,0x70 },
+ 16, 0x8b80, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0xe7,0x00,0xa1,0x00,0x76,0x78 },
+ 16, 0x8b90, 0, {0x0f,0xb0,0x03,0xe8,0x10,0xd9,0x00,0x3e,0xd0,0x4b,0x9e,0x13,0xac,0x08,0xb8,0xa0 },
+ 16, 0x8ba0, 0, {0x7e,0xc6,0x08,0xa8,0x02,0x2c,0x01,0xbb,0x00,0x26,0x30,0x4e,0x20,0x03,0x4c,0x18 },
+ 16, 0x8bb0, 0, {0x99,0x80,0xb4,0x40,0x4c,0x3a,0x03,0x40,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8bc0, 0, {0xe0,0x01,0xb2,0x00,0xfd,0xc5,0x3b,0xc0,0x4c,0xd0,0x03,0x6a,0x02,0xed,0x06,0x33 },
+ 16, 0x8bd0, 0, {0xc4,0x0f,0xd0,0x53,0xf8,0x00,0xfc,0x90,0x7f,0xc1,0x0f,0x78,0x03,0xbc,0x04,0xff },
+ 16, 0x8be0, 0, {0x00,0x37,0x64,0x0c,0xf1,0x03,0xa4,0x00,0xed,0xa1,0x3b,0x40,0x0b,0xf0,0x83,0xb8 },
+ 16, 0x8bf0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x8c,0x00,0xcb,0x20,0x3e,0x71 },
+ 16, 0x8c00, 0, {0x0f,0xb3,0x03,0x98,0x02,0xfb,0x02,0x36,0x48,0x0f,0x90,0x03,0xec,0x20,0xf8,0x00 },
+ 16, 0x8c10, 0, {0x3e,0xcc,0x04,0x84,0x03,0x2c,0x00,0xdb,0x04,0x3c,0x10,0x0f,0xa0,0x03,0xec,0x00 },
+ 16, 0x8c20, 0, {0x9b,0x00,0x32,0x40,0x0c,0x90,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8c30, 0, {0x88,0x05,0x2c,0x02,0x8b,0x48,0x2e,0xe0,0x0b,0x34,0x03,0x6b,0x00,0x8b,0xf5,0x22 },
+ 16, 0x8c40, 0, {0xf2,0x0b,0x9c,0x03,0xaf,0x00,0xb8,0x50,0x2e,0xc0,0x08,0xb0,0x02,0x7c,0x00,0x8f },
+ 16, 0x8c50, 0, {0x00,0x0e,0x5d,0x0b,0x80,0x02,0xf5,0x40,0x83,0x50,0x23,0x54,0x08,0x9c,0x02,0xe6 },
+ 16, 0x8c60, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x04,0x4c,0x00,0x81,0x81,0x2e,0x40 },
+ 16, 0x8c70, 0, {0x03,0x2c,0x02,0x04,0x33,0x99,0x00,0x20,0xf0,0x4a,0x28,0x80,0xcc,0x40,0xb0,0x00 },
+ 16, 0x8c80, 0, {0x26,0x10,0x08,0x20,0x02,0x4c,0x00,0x83,0x00,0x2c,0xc0,0x09,0x20,0x02,0xcc,0x00 },
+ 16, 0x8c90, 0, {0xa0,0x02,0x28,0x40,0x08,0x08,0x02,0x7a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8ca0, 0, {0x20,0x01,0x0a,0x00,0x85,0x80,0x2d,0xf8,0x0b,0xda,0x02,0xd6,0x40,0x85,0xa0,0x21 },
+ 16, 0x8cb0, 0, {0xe0,0x0b,0x48,0x06,0x92,0x04,0xb5,0x80,0x2d,0x21,0x08,0x00,0x02,0x4e,0x00,0x87 },
+ 16, 0x8cc0, 0, {0xa4,0x2d,0x60,0x0b,0x68,0x02,0xde,0xc2,0xad,0x90,0x2b,0x60,0x28,0x58,0x82,0xdc },
+ 16, 0x8cd0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x4c,0x40,0xc3,0x10,0x2c,0x6c },
+ 16, 0x8ce0, 0, {0x0f,0x30,0x03,0x86,0xa2,0xf9,0xb0,0xb0,0xe0,0x0f,0x29,0x83,0xce,0x44,0xf3,0x80 },
+ 16, 0x8cf0, 0, {0x3c,0xac,0x0c,0x30,0x03,0x0c,0x00,0xc3,0x00,0x3c,0xd5,0x0f,0x20,0x03,0xce,0xc1 },
+ 16, 0x8d00, 0, {0xe0,0x10,0xb8,0x40,0x0c,0x00,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8d10, 0, {0xc0,0x1d,0xbc,0x00,0xeb,0x00,0x3e,0xcc,0x0f,0x32,0x03,0x64,0x08,0xf9,0x00,0x3b },
+ 16, 0x8d20, 0, {0x90,0x0f,0xf0,0x43,0xe4,0x40,0xfb,0x34,0x3f,0x81,0x07,0xd1,0x03,0xad,0x20,0xeb },
+ 16, 0x8d30, 0, {0x20,0x7f,0xc4,0x0f,0xe1,0x03,0xfc,0x50,0xcd,0x10,0x35,0x40,0x0f,0xd0,0x03,0xd0 },
+ 16, 0x8d40, 0, {0x02,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x04,0xfd,0x04,0x3d,0x40 },
+ 16, 0x8d50, 0, {0x2d,0x30,0x02,0x3c,0x00,0xc9,0x01,0x3e,0xc0,0x4f,0xb8,0x43,0xec,0x10,0xfb,0x00 },
+ 16, 0x8d60, 0, {0x32,0x40,0x0f,0xa0,0x23,0xec,0x80,0xcb,0x36,0x32,0x80,0x4d,0xa8,0x03,0x2c,0x10 },
+ 16, 0x8d70, 0, {0xcb,0x00,0x32,0x40,0x0c,0x90,0x03,0x6a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8d80, 0, {0xc8,0x11,0x90,0x08,0xb5,0x00,0x2d,0xc0,0x08,0x50,0x02,0xbc,0x02,0x85,0x04,0x2d },
+ 16, 0x8d90, 0, {0xc0,0x8e,0x60,0x06,0xd8,0x04,0xb7,0x04,0x21,0x40,0x0b,0x70,0x02,0xfc,0x80,0xaf },
+ 16, 0x8da0, 0, {0x28,0x21,0xc0,0x0b,0x70,0x02,0x06,0x40,0x87,0x00,0x21,0x50,0x08,0x50,0x02,0x32 },
+ 16, 0x8db0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x9e,0x20,0xb7,0x80,0x2b,0x70 },
+ 16, 0x8dc0, 0, {0x08,0xf8,0x06,0x1e,0x00,0x87,0x80,0x2d,0xe0,0x0b,0x70,0x32,0xde,0x04,0x37,0x84 },
+ 16, 0x8dd0, 0, {0x25,0xe0,0x0b,0x68,0x06,0xde,0x80,0x87,0x80,0x21,0xa1,0x1b,0x68,0x02,0x1e,0x40 },
+ 16, 0x8de0, 0, {0x9f,0x80,0x20,0x60,0x08,0x58,0x02,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8df0, 0, {0x48,0x14,0xcc,0x20,0xb3,0x00,0x2c,0x80,0x88,0xb4,0x22,0x8d,0x00,0x83,0x90,0x2c },
+ 16, 0x8e00, 0, {0xc0,0x0a,0x38,0x02,0xce,0x08,0xbb,0x20,0x24,0xd0,0x0b,0xb3,0x02,0xcc,0x00,0xa3 },
+ 16, 0x8e10, 0, {0x00,0x60,0xd2,0x0b,0x20,0x2a,0x04,0x08,0x93,0x50,0x20,0x40,0x08,0x17,0x0a,0x02 },
+ 16, 0x8e20, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xba,0x00,0xba,0xa0,0x3f,0x84 },
+ 16, 0x8e30, 0, {0x1c,0xe0,0x0b,0x38,0x40,0x8e,0x06,0x2e,0x80,0x0b,0xe3,0x03,0xf8,0x80,0xfe,0xe4 },
+ 16, 0x8e40, 0, {0xb7,0x90,0x0f,0xec,0x02,0xe8,0x00,0x8a,0x00,0xa3,0xa0,0x09,0xe4,0x03,0x2a,0x02 },
+ 16, 0x8e50, 0, {0xde,0xc0,0xf3,0x80,0x0c,0x6c,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8e60, 0, {0x48,0x01,0xe0,0x00,0xf8,0x40,0x3e,0x00,0x0f,0x84,0x13,0xe0,0x00,0xf8,0x00,0x2e },
+ 16, 0x8e70, 0, {0x30,0x0a,0x84,0x03,0xe0,0x04,0xf8,0x00,0x3a,0x02,0x0f,0x80,0x13,0xe0,0x00,0xf8 },
+ 16, 0x8e80, 0, {0x00,0x3e,0x04,0x0d,0x80,0x83,0xe0,0x40,0xe8,0x20,0x3e,0x00,0x2f,0x80,0x03,0xd2 },
+ 16, 0x8e90, 0, {0x10,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xa4,0x00,0xf9,0x00,0x3c,0x64 },
+ 16, 0x8ea0, 0, {0x4e,0x90,0x83,0x24,0x80,0xc9,0x00,0x32,0xe0,0x0f,0x10,0x03,0x25,0x00,0xf9,0x00 },
+ 16, 0x8eb0, 0, {0x32,0x44,0x0f,0x92,0x23,0x64,0x00,0xc1,0x00,0x32,0x40,0x0c,0x90,0x13,0xe4,0x00 },
+ 16, 0x8ec0, 0, {0xc9,0x00,0x22,0x40,0x0c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8ed0, 0, {0x80,0x04,0x64,0x00,0xb9,0x20,0x2e,0x40,0x48,0x96,0x22,0x25,0x00,0xd9,0xc0,0xa2 },
+ 16, 0x8ee0, 0, {0x70,0x0b,0x98,0x02,0x24,0x00,0xb9,0x40,0xa2,0x70,0x4b,0x90,0x02,0x24,0x00,0xd9 },
+ 16, 0x8ef0, 0, {0x00,0xa2,0x40,0x2c,0x94,0x22,0xe4,0x02,0x89,0x00,0xa2,0x40,0x28,0x94,0x13,0x20 },
+ 16, 0x8f00, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x00,0xb9,0x00,0x2e,0x40 },
+ 16, 0x8f10, 0, {0x0a,0x90,0x02,0x04,0x00,0x81,0x80,0xa2,0x44,0x0b,0x91,0x02,0x25,0x00,0x19,0x40 },
+ 16, 0x8f20, 0, {0x62,0x40,0x0b,0xb4,0x02,0x44,0x00,0x89,0x00,0x20,0x40,0x08,0x90,0x82,0xc4,0x01 },
+ 16, 0x8f30, 0, {0x83,0x02,0x28,0x40,0x48,0x90,0x82,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8f40, 0, {0x00,0x04,0x05,0x80,0xb1,0x00,0x6c,0x51,0x08,0x14,0x1a,0x05,0x00,0x93,0x00,0x20 },
+ 16, 0x8f50, 0, {0x40,0x8b,0x14,0x02,0x05,0x00,0xb1,0x20,0x20,0x50,0x0b,0x14,0x06,0x04,0x80,0x91 },
+ 16, 0x8f60, 0, {0x20,0x20,0x40,0x09,0x10,0x02,0xc4,0xa8,0x81,0x00,0x28,0x4a,0x08,0x90,0x4a,0x42 },
+ 16, 0x8f70, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xf8,0x00,0x3e,0x00 },
+ 16, 0x8f80, 0, {0x0e,0x80,0x03,0x28,0x01,0xc8,0x50,0x32,0x94,0x8b,0xa0,0x03,0x20,0x00,0xb0,0x50 },
+ 16, 0x8f90, 0, {0x32,0x80,0x0f,0x80,0x07,0x61,0x51,0xc8,0x50,0x22,0x00,0x0c,0x00,0x03,0xe0,0x84 },
+ 16, 0x8fa0, 0, {0xc8,0x04,0x3a,0x08,0x0c,0x00,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8fb0, 0, {0x98,0x9d,0xf4,0x40,0xbd,0x41,0x3f,0x50,0x0f,0xf4,0x03,0xf5,0x10,0xfd,0x00,0x3e },
+ 16, 0x8fc0, 0, {0x40,0x0f,0xd4,0x03,0xf4,0x00,0xff,0x10,0x2f,0x40,0x4f,0xd4,0x40,0xa4,0x48,0xf9 },
+ 16, 0x8fd0, 0, {0x12,0x3f,0x5a,0x8e,0xd2,0x83,0xf4,0xa8,0xf5,0x2c,0x37,0x4a,0x0f,0xd2,0x83,0xa6 },
+ 16, 0x8fe0, 0, {0x12,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0x80,0xfd,0x28,0x3f,0x4c },
+ 16, 0x8ff0, 0, {0x0f,0x50,0x03,0x3c,0x44,0xcd,0x40,0x3f,0xd0,0x0d,0xd0,0x02,0x14,0x01,0xfd,0xa0 },
+ 16, 0x9000, 0, {0x31,0x40,0x03,0xd0,0x03,0xe7,0x89,0xf9,0x90,0x7e,0x50,0x0c,0x94,0x03,0xe6,0xc0 },
+ 16, 0x9010, 0, {0xc9,0x10,0x32,0x6d,0x0f,0x91,0x02,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9020, 0, {0x38,0x10,0xe0,0x80,0xb8,0x01,0x2e,0x0c,0x8b,0x84,0x82,0x20,0x42,0x88,0xa0,0x6e },
+ 16, 0x9030, 0, {0x20,0x08,0x80,0x03,0x60,0x00,0x98,0xe8,0x22,0x00,0x09,0x80,0x02,0xe3,0xc0,0xe8 },
+ 16, 0x9040, 0, {0xd0,0x2e,0x28,0x08,0x8a,0x23,0xe2,0x84,0xd8,0xa0,0x22,0x3d,0x0b,0xc8,0x02,0xce },
+ 16, 0x9050, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc5,0xb0,0xb1,0x00,0x2c,0x48 },
+ 16, 0x9060, 0, {0x0b,0x13,0x02,0x04,0x02,0xb1,0x20,0x2e,0x40,0x88,0x10,0x22,0xc4,0x00,0xb1,0x14 },
+ 16, 0x9070, 0, {0x24,0x40,0x0b,0x10,0x52,0xc4,0x00,0xb1,0x21,0x2d,0x48,0x0a,0x52,0x02,0xd5,0x00 },
+ 16, 0x9080, 0, {0xbd,0x00,0xad,0x40,0x0b,0x52,0x02,0xd2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9090, 0, {0x18,0x55,0xa5,0x00,0xb9,0x82,0x2e,0x49,0x8b,0xb0,0x12,0x24,0x10,0x99,0x02,0x2e },
+ 16, 0x90a0, 0, {0x40,0x08,0xb2,0x00,0x65,0x00,0x99,0x80,0x26,0x44,0x09,0x91,0x02,0xe4,0x09,0xa9 },
+ 16, 0x90b0, 0, {0x04,0x2e,0x46,0x0a,0xd4,0x02,0xb4,0x00,0xbd,0x40,0x2f,0x40,0x0b,0xd0,0x02,0xc6 },
+ 16, 0x90c0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe7,0x40,0xf9,0x80,0x2e,0x62 },
+ 16, 0x90d0, 0, {0x0f,0x9c,0x42,0x24,0x00,0x99,0x01,0x2e,0x68,0x2c,0x92,0x02,0x64,0x00,0xb9,0x40 },
+ 16, 0x90e0, 0, {0xb6,0x60,0x0f,0x9a,0x03,0xe4,0x00,0xb9,0x00,0x2e,0x70,0x3e,0x99,0x06,0xe4,0x02 },
+ 16, 0x90f0, 0, {0xf9,0x00,0x3e,0x40,0x0f,0x98,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9100, 0, {0x68,0x01,0xa6,0x00,0xf9,0x00,0x3e,0x40,0x1f,0x12,0xab,0xe4,0x00,0xe9,0x90,0x3e },
+ 16, 0x9110, 0, {0x49,0x0e,0x98,0x03,0xe4,0x00,0xf1,0x00,0x3a,0x40,0x0d,0x98,0x03,0xe4,0x00,0xf9 },
+ 16, 0x9120, 0, {0x01,0x3e,0x60,0x05,0x90,0x13,0xe4,0x00,0x59,0x20,0x32,0x40,0x8f,0x91,0x03,0xda },
+ 16, 0x9130, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x10,0xa0,0x00,0xc8,0x08,0x3e,0x01 },
+ 16, 0x9140, 0, {0x0f,0x84,0x63,0x00,0x22,0xe8,0x20,0x3e,0x13,0x0f,0x84,0x03,0xe1,0xc0,0xd8,0x4c },
+ 16, 0x9150, 0, {0x32,0x00,0x0c,0x84,0x43,0xe0,0x00,0xf8,0x00,0x22,0x10,0x0f,0x84,0x03,0x00,0x00 },
+ 16, 0x9160, 0, {0xc8,0x00,0xb2,0x00,0x0c,0xc0,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9170, 0, {0x28,0x05,0x28,0x00,0x8e,0x00,0x2f,0x86,0x4b,0xe0,0x02,0x39,0x08,0x8e,0x20,0x2d },
+ 16, 0x9180, 0, {0x90,0x0b,0xed,0x92,0xf8,0x02,0x8e,0xe0,0xa3,0x98,0x08,0xe0,0x02,0xe8,0x08,0xba },
+ 16, 0x9190, 0, {0x00,0x62,0x80,0x08,0xa0,0x02,0x28,0x00,0x02,0x80,0x02,0x80,0x48,0xe0,0x03,0x4a },
+ 16, 0x91a0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x05,0x4c,0x00,0x83,0x10,0x2c,0xf0 },
+ 16, 0x91b0, 0, {0x0a,0x14,0x2a,0x0d,0x1a,0xb3,0x01,0x24,0xd0,0x0b,0xbc,0x32,0xcc,0x08,0x03,0x00 },
+ 16, 0x91c0, 0, {0x20,0xc8,0x0b,0x30,0x02,0xcc,0x00,0xb3,0x02,0x22,0xc0,0x09,0x30,0x02,0x0c,0x11 },
+ 16, 0x91d0, 0, {0x83,0x00,0x20,0xc0,0x28,0x20,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x91e0, 0, {0x20,0x01,0x1e,0x01,0x85,0x00,0x2d,0x00,0x0b,0x70,0x02,0x18,0x32,0x86,0x00,0x2d },
+ 16, 0x91f0, 0, {0xc0,0x0b,0x60,0x16,0xfe,0x04,0x86,0x00,0x27,0xa0,0x8b,0x70,0x42,0xdc,0x80,0xb7 },
+ 16, 0x9200, 0, {0x80,0x21,0x01,0x08,0xf8,0x0a,0x18,0x00,0x86,0x08,0x20,0xa0,0x08,0xe8,0x0a,0x68 },
+ 16, 0x9210, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x3e,0x02,0xc6,0x80,0x3d,0xe0 },
+ 16, 0x9220, 0, {0x0f,0x48,0x03,0x06,0x04,0xf5,0x82,0x35,0xe0,0x0f,0x78,0x03,0xda,0x00,0xd3,0x80 },
+ 16, 0x9230, 0, {0x31,0x60,0x07,0x78,0x03,0xde,0x20,0xf3,0xb0,0x81,0xe0,0x4f,0x68,0x07,0x0e,0x02 },
+ 16, 0x9240, 0, {0xcf,0x80,0x31,0xe0,0x0c,0x78,0x13,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9250, 0, {0x08,0x1d,0xad,0xa0,0xf9,0x00,0x3f,0x00,0x0f,0xb0,0x53,0xf8,0x10,0xa9,0x00,0x3e },
+ 16, 0x9260, 0, {0x00,0x0f,0x80,0x01,0xec,0x00,0xfb,0x02,0x3a,0xc0,0x0c,0xb0,0x03,0xec,0x00,0xfb },
+ 16, 0x9270, 0, {0x74,0x3c,0x00,0x0f,0x20,0x03,0xe8,0x00,0xfa,0x00,0x3e,0x80,0x0f,0x30,0x03,0xc2 },
+ 16, 0x9280, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x02,0x8f,0x80,0x35,0xe0 },
+ 16, 0x9290, 0, {0x8d,0xd9,0x03,0x2e,0xc4,0xf6,0x80,0x32,0xa4,0x0c,0xb8,0x03,0xde,0x00,0xcf,0x90 },
+ 16, 0x92a0, 0, {0x3c,0xe4,0x0c,0xb8,0x03,0xfe,0x65,0xff,0x80,0x0f,0xec,0x8f,0xf8,0x03,0xfe,0x00 },
+ 16, 0x92b0, 0, {0xc5,0x80,0x33,0xe0,0x0f,0x68,0x03,0x10,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x92c0, 0, {0xaa,0x11,0x9c,0x80,0x84,0xb0,0x20,0x20,0x29,0x73,0x0a,0x0e,0x82,0xa2,0xa0,0xa2 },
+ 16, 0x92d0, 0, {0xa0,0x4f,0x3b,0x03,0x87,0x84,0xb2,0x80,0x2c,0xa0,0x0a,0x7d,0x02,0xde,0x80,0xf7 },
+ 16, 0x92e0, 0, {0x20,0x25,0x06,0x08,0x70,0x02,0xc8,0x40,0x84,0x00,0x35,0x80,0x0b,0x60,0x03,0x6a },
+ 16, 0x92f0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x10,0x86,0x38,0x27,0xc0 },
+ 16, 0x9300, 0, {0x49,0x54,0x06,0x54,0x40,0x1d,0x20,0x21,0xca,0x09,0x61,0x40,0xf8,0x80,0xb7,0x20 },
+ 16, 0x9310, 0, {0x2f,0x00,0x89,0x70,0x12,0xdc,0x81,0xb7,0x04,0x2d,0xc9,0x0a,0x60,0x02,0xcc,0x00 },
+ 16, 0x9320, 0, {0x8d,0x00,0x2d,0xc0,0x0b,0xf8,0x02,0x04,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9330, 0, {0x60,0x14,0xcd,0x28,0x80,0x00,0x24,0x00,0x09,0xb0,0x22,0x4c,0x02,0xa1,0x01,0x20 },
+ 16, 0x9340, 0, {0x30,0x1b,0x23,0x02,0xaf,0x20,0xb3,0x08,0x2c,0x80,0x1b,0x30,0x00,0xcc,0x04,0xa3 },
+ 16, 0x9350, 0, {0x01,0x26,0x30,0x08,0xac,0x22,0xe8,0x02,0x80,0x08,0x2e,0x80,0x4b,0xb4,0x02,0x58 },
+ 16, 0x9360, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x10,0x8b,0x80,0x36,0xf0 },
+ 16, 0x9370, 0, {0x2d,0xbc,0x0b,0x6c,0x01,0xda,0x04,0x22,0x40,0x7d,0x94,0x22,0xe4,0x00,0xab,0x44 },
+ 16, 0x9380, 0, {0x2e,0xc0,0x09,0xb8,0x02,0xfc,0x00,0xbf,0x00,0x3e,0xf0,0xca,0x92,0x02,0xe4,0x02 },
+ 16, 0x9390, 0, {0xcb,0x00,0x6e,0x40,0x0f,0x84,0x01,0x2e,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x93a0, 0, {0x80,0x00,0xec,0x00,0xfb,0x00,0x3a,0xe0,0x2e,0xbc,0x03,0x98,0x08,0xea,0x40,0x36 },
+ 16, 0x93b0, 0, {0x43,0x8c,0x90,0x03,0xa4,0x44,0x2a,0x40,0x3e,0x10,0x0e,0xb5,0x83,0xec,0x14,0xfb },
+ 16, 0x93c0, 0, {0x00,0x26,0x00,0x0e,0x92,0x03,0xe0,0x40,0xfa,0x00,0x16,0x00,0x0f,0x80,0x13,0xe0 },
+ 16, 0x93d0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xec,0x02,0xfa,0x80,0x3f,0xe2 },
+ 16, 0x93e0, 0, {0x0f,0xb0,0x0b,0x24,0x00,0xef,0x92,0xbb,0xe0,0x1c,0xd0,0x03,0x74,0x00,0xcf,0x05 },
+ 16, 0x93f0, 0, {0x3b,0x40,0x0f,0xc8,0x03,0x5c,0x00,0xcf,0x00,0x32,0xc2,0x4d,0xc1,0x23,0x34,0x40 },
+ 16, 0x9400, 0, {0xcf,0x00,0x17,0x44,0x0c,0xd1,0x83,0x00,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9410, 0, {0x81,0x04,0x6c,0x00,0x8b,0x84,0x2e,0x54,0x0b,0xbc,0x0a,0x29,0x80,0x8b,0x80,0x32 },
+ 16, 0x9420, 0, {0x00,0x08,0x9c,0x03,0xa7,0x00,0xab,0x84,0x2e,0x7c,0x0b,0x80,0x02,0x2c,0x10,0xdb },
+ 16, 0x9430, 0, {0x01,0x36,0x00,0x08,0x80,0x02,0x20,0x00,0x82,0x00,0x22,0x00,0x08,0x90,0x02,0x24 },
+ 16, 0x9440, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x0c,0x00,0x89,0x10,0x66,0x90 },
+ 16, 0x9450, 0, {0x0b,0xb8,0x02,0x6e,0x12,0xa3,0x41,0x20,0x04,0x0a,0x98,0x22,0xe2,0x00,0x89,0x19 },
+ 16, 0x9460, 0, {0x2e,0xc0,0x4b,0x31,0x22,0x6c,0x08,0x83,0x00,0x22,0xc0,0x09,0x90,0x02,0x24,0x00 },
+ 16, 0x9470, 0, {0x89,0x00,0x2a,0x40,0x08,0x80,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9480, 0, {0x08,0x10,0x0c,0x00,0x80,0x20,0x2c,0x0e,0x1b,0x30,0x02,0x04,0x41,0x80,0x20,0x20 },
+ 16, 0x9490, 0, {0x12,0x18,0x16,0x42,0x00,0x50,0xa0,0x40,0x2c,0x88,0x1b,0x30,0x02,0x0c,0x81,0x93 },
+ 16, 0x94a0, 0, {0x00,0x24,0x00,0x08,0x10,0x2a,0x00,0x0a,0x88,0x00,0x28,0x00,0x28,0x00,0x0a,0x02 },
+ 16, 0x94b0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x7c,0x11,0xe8,0x00,0x26,0x98 },
+ 16, 0x94c0, 0, {0x0f,0xb0,0x13,0x21,0x0c,0xeb,0x60,0x3a,0xd8,0x28,0x84,0xa2,0xe1,0x80,0xc8,0x20 },
+ 16, 0x94d0, 0, {0x3e,0x5e,0x1f,0x82,0x03,0x7c,0x00,0xcf,0x00,0x32,0xc0,0x4d,0x80,0x07,0x25,0x00 },
+ 16, 0x94e0, 0, {0xc9,0x00,0x32,0x40,0x0c,0x90,0x03,0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x94f0, 0, {0xa1,0x11,0xfc,0x00,0xf8,0x13,0x1e,0x00,0x0b,0xf0,0x01,0xf0,0xd0,0xf9,0x19,0x1f },
+ 16, 0x9500, 0, {0x08,0x4f,0xc0,0x13,0xa1,0x00,0xf8,0x62,0x3f,0xc0,0x0b,0xc4,0x07,0xed,0x00,0xff },
+ 16, 0x9510, 0, {0x00,0x3f,0x00,0x0f,0xc0,0x23,0xf0,0xa0,0xfc,0x00,0x33,0x00,0x0f,0xd0,0x03,0xe8 },
+ 16, 0x9520, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xff,0x0c,0x3f,0x20 },
+ 16, 0x9530, 0, {0x0c,0xc9,0x03,0x32,0x00,0xcf,0x38,0x3f,0xd0,0x0f,0x48,0x03,0xfc,0xa0,0xce,0x22 },
+ 16, 0x9540, 0, {0x33,0x00,0x0f,0xc1,0x03,0x3c,0x00,0xff,0x00,0x3d,0xc4,0x4c,0xc0,0x23,0x8c,0xe4 },
+ 16, 0x9550, 0, {0xff,0x10,0x37,0x20,0x08,0xf1,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9560, 0, {0x80,0x10,0xfe,0x00,0xbf,0x80,0x2e,0x74,0x05,0x22,0x02,0xa2,0x10,0xdf,0x61,0x2f },
+ 16, 0x9570, 0, {0xd0,0x8b,0x90,0x02,0x3d,0xa4,0xaa,0x90,0x22,0xf4,0x0b,0x07,0x12,0x1d,0x20,0xbb },
+ 16, 0x9580, 0, {0xc0,0x2f,0xd8,0x88,0x97,0x82,0xfd,0x80,0xef,0x72,0x22,0x08,0x28,0xf6,0x23,0xe0 },
+ 16, 0x9590, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x40,0xb3,0x00,0x2c,0x00 },
+ 16, 0x95a0, 0, {0x08,0x82,0x02,0x22,0x00,0x83,0x01,0x08,0xcc,0x8b,0x20,0x82,0xcc,0x00,0x90,0x00 },
+ 16, 0x95b0, 0, {0x20,0x00,0x4b,0x12,0x02,0x0d,0x80,0xb3,0x40,0x2c,0xd8,0x08,0x20,0x42,0x8c,0x80 },
+ 16, 0x95c0, 0, {0xb3,0x20,0x26,0x02,0x18,0x33,0x26,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x95d0, 0, {0xc0,0x15,0xac,0x09,0xbb,0x00,0x2e,0x60,0x08,0x80,0x02,0xa2,0x00,0x9b,0x00,0x2e },
+ 16, 0x95e0, 0, {0xc0,0x0b,0xac,0x02,0x2c,0x00,0xba,0x06,0x22,0xc2,0x0b,0x94,0x02,0xac,0x10,0xbb },
+ 16, 0x95f0, 0, {0x00,0x2e,0xc1,0x08,0xa8,0x02,0xec,0x00,0xab,0x00,0x22,0x00,0x08,0xb0,0x06,0xf0 },
+ 16, 0x9600, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x15,0xec,0x00,0xfb,0x04,0x3e,0x60 },
+ 16, 0x9610, 0, {0x28,0x82,0x13,0x0e,0x08,0xcb,0x00,0x3a,0xc0,0x0f,0x8c,0x03,0xec,0x11,0xdb,0x20 },
+ 16, 0x9620, 0, {0xb2,0x90,0x4b,0xa8,0x0b,0x2c,0x00,0xbb,0x00,0x2c,0xc0,0x0c,0x88,0x13,0xac,0x00 },
+ 16, 0x9630, 0, {0xf3,0x00,0x36,0x06,0x48,0xb0,0x12,0xc4,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9640, 0, {0xe0,0x01,0xbc,0x00,0xfb,0x08,0x3d,0x40,0x8f,0xea,0x01,0xf4,0x00,0xff,0x01,0x2f },
+ 16, 0x9650, 0, {0xc0,0x0f,0xd0,0x22,0xfc,0x04,0xaf,0x00,0x3f,0xc0,0x8f,0xe9,0x03,0x7c,0x00,0xff },
+ 16, 0x9660, 0, {0x00,0x3f,0xc0,0x0f,0x90,0x43,0xfc,0x20,0xef,0x02,0x3f,0x00,0x8f,0xf0,0x03,0xb8 },
+ 16, 0x9670, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x10,0xac,0x08,0xeb,0x00,0x12,0x40 },
+ 16, 0x9680, 0, {0x0f,0x90,0x03,0x28,0x20,0xab,0x00,0x3a,0xc0,0x8f,0x85,0x83,0xac,0x10,0xf3,0x50 },
+ 16, 0x9690, 0, {0x32,0x90,0x4c,0x34,0x13,0x6c,0x00,0xfb,0x00,0x3e,0xc0,0x0c,0x98,0x03,0x2c,0x40 },
+ 16, 0x96a0, 0, {0xeb,0x80,0x32,0x12,0x0d,0xb0,0x0b,0x50,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x96b0, 0, {0x88,0x01,0x3c,0x10,0x0f,0x05,0xa2,0x50,0x0c,0x10,0x02,0x22,0x10,0x8f,0x00,0x23 },
+ 16, 0x96c0, 0, {0xc0,0x0b,0x88,0x12,0x3c,0x00,0x9b,0x82,0x22,0xc0,0x08,0xb0,0x02,0x3c,0x00,0x8f },
+ 16, 0x96d0, 0, {0xa0,0x2f,0xc0,0x08,0xb0,0x02,0x3c,0x08,0x8f,0x02,0x20,0x00,0x08,0xf0,0x03,0x26 },
+ 16, 0x96e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4d,0x20,0x93,0x00,0x20,0xb2 },
+ 16, 0x96f0, 0, {0x0b,0x10,0x02,0x01,0x00,0xa3,0x00,0x68,0xc0,0x0b,0x84,0x02,0xac,0x00,0xb3,0x80 },
+ 16, 0x9700, 0, {0x20,0x40,0x0a,0x30,0x02,0x4c,0x00,0xa3,0x04,0x2c,0xc0,0x08,0x00,0x02,0x0d,0x00 },
+ 16, 0x9710, 0, {0xa3,0x00,0x20,0x24,0x08,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9720, 0, {0x70,0x01,0x1c,0x20,0x97,0x80,0x23,0x60,0x08,0x78,0x12,0x3a,0x00,0x83,0x91,0x29 },
+ 16, 0x9730, 0, {0xe4,0x0b,0x59,0x02,0x1e,0x00,0x97,0x90,0x20,0xfc,0x0a,0x78,0x02,0x1e,0x00,0x87 },
+ 16, 0x9740, 0, {0x90,0x2d,0xe0,0x19,0x59,0x02,0x1e,0x80,0x83,0x80,0x61,0xa0,0x08,0x78,0x02,0x18 },
+ 16, 0x9750, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x40,0xd3,0x32,0x30,0x06 },
+ 16, 0x9760, 0, {0x0f,0x30,0x03,0x04,0x64,0xe3,0x01,0x38,0xc4,0x1f,0x30,0x07,0x8c,0x18,0xf1,0x00 },
+ 16, 0x9770, 0, {0x30,0x4c,0x0e,0x30,0x03,0x4c,0x00,0xe3,0x00,0x2c,0xc0,0x0c,0x20,0x03,0x0e,0x00 },
+ 16, 0x9780, 0, {0xe3,0x00,0x32,0x08,0x0c,0xb1,0x03,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9790, 0, {0x40,0x1d,0x9c,0x80,0xef,0x10,0x3d,0x44,0x4f,0xf1,0x07,0xcc,0x00,0xff,0x08,0x36 },
+ 16, 0x97a0, 0, {0xc6,0xcf,0xb0,0x03,0xfc,0x00,0x97,0x00,0xbe,0xcc,0x0d,0xb1,0x03,0xfd,0x04,0xff },
+ 16, 0x97b0, 0, {0x0c,0x3f,0xd2,0x9e,0xe0,0x4b,0xfd,0x20,0xff,0x02,0x3f,0x80,0x0e,0xf0,0x13,0xd0 },
+ 16, 0x97c0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xec,0xc0,0xcb,0x28,0x3e,0xc0 },
+ 16, 0x97d0, 0, {0x0f,0x80,0x03,0xec,0x00,0xfb,0x01,0x32,0xe9,0x0c,0x28,0x03,0x2c,0x00,0xfb,0x00 },
+ 16, 0x97e0, 0, {0x32,0xc0,0x0c,0xb4,0x83,0x2c,0x01,0xef,0x00,0xb2,0xc8,0x0c,0x20,0x03,0x6d,0x00 },
+ 16, 0x97f0, 0, {0xcb,0x10,0x3e,0x00,0x0f,0xb2,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9800, 0, {0xc8,0x91,0x9c,0xc4,0x87,0x60,0x2d,0xc0,0x0b,0x60,0x02,0xdc,0x00,0xb7,0x12,0x20 },
+ 16, 0x9810, 0, {0xcc,0x0a,0x70,0x02,0x1c,0xc0,0xb3,0x00,0xa0,0xc0,0xc8,0x70,0x22,0x1c,0x80,0xb7 },
+ 16, 0x9820, 0, {0x24,0x21,0xc8,0x48,0x50,0x02,0x0c,0x80,0x87,0x10,0x2d,0x40,0x0b,0x72,0x82,0xf2 },
+ 16, 0x9830, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x8e,0x02,0x87,0x80,0x2d,0xe0 },
+ 16, 0x9840, 0, {0x0b,0x78,0x12,0xde,0x00,0xb7,0xa0,0x21,0xe0,0x08,0xf8,0x8e,0x1e,0x40,0xb7,0x88 },
+ 16, 0x9850, 0, {0x21,0xe0,0x08,0x38,0x02,0x1e,0x40,0xb3,0xa1,0x20,0xe8,0x48,0xf8,0x82,0x5e,0x02 },
+ 16, 0x9860, 0, {0x87,0x80,0x2d,0x22,0x0b,0x79,0x02,0xe0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9870, 0, {0x08,0x04,0xcc,0x04,0x83,0x02,0x2c,0xd4,0x0b,0x30,0x02,0xcc,0x00,0xb3,0x00,0xa0 },
+ 16, 0x9880, 0, {0xc0,0x8a,0x38,0x06,0x0c,0x00,0xb3,0x80,0x20,0xe1,0x48,0x39,0x12,0x2c,0x00,0xb3 },
+ 16, 0x9890, 0, {0x00,0x22,0xc0,0x08,0xb0,0x82,0x6c,0x00,0x83,0x00,0x2c,0x48,0x0b,0x30,0x02,0xc2 },
+ 16, 0x98a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0xa8,0x00,0xca,0x00,0x3f,0xa0 },
+ 16, 0x98b0, 0, {0x0f,0xe4,0x03,0xd8,0x00,0xfa,0x00,0x32,0x80,0x0c,0xe8,0x03,0x28,0x00,0xfa,0x40 },
+ 16, 0x98c0, 0, {0x32,0xa8,0x2c,0xa0,0x09,0x28,0x08,0xf2,0x00,0x32,0x80,0x0c,0xe4,0x03,0x68,0x00 },
+ 16, 0x98d0, 0, {0xca,0x00,0x3f,0x80,0x0f,0xa0,0x03,0xfb,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x98e0, 0, {0x48,0x00,0xc0,0x00,0xf8,0x01,0x3e,0x12,0x0b,0x80,0x03,0xe0,0x40,0xf8,0x00,0x3e },
+ 16, 0x98f0, 0, {0x00,0x4f,0x84,0x03,0xe0,0x04,0xf0,0x08,0x3e,0x00,0x4f,0x00,0x03,0xe0,0x00,0xf8 },
+ 16, 0x9900, 0, {0x41,0x3e,0x00,0x2f,0x84,0x03,0xa0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0x9910, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xe6,0x00,0xc9,0x12,0x3e,0x50 },
+ 16, 0x9920, 0, {0x8f,0x90,0x83,0xe4,0x20,0xc1,0x00,0x3a,0x41,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x00 },
+ 16, 0x9930, 0, {0x30,0x68,0x0c,0x90,0x03,0x24,0x00,0xd9,0x00,0x3a,0x40,0x0e,0x98,0x03,0x24,0x00 },
+ 16, 0x9940, 0, {0xc9,0x90,0x3e,0x69,0x0c,0x10,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9950, 0, {0x80,0x04,0x67,0x4a,0x89,0x80,0x2e,0x50,0x0b,0x90,0x02,0xe4,0x80,0xa9,0x00,0x22 },
+ 16, 0x9960, 0, {0x40,0x0b,0x90,0x02,0xe4,0x00,0xb9,0x01,0x22,0x40,0x08,0x90,0x02,0x24,0x10,0x89 },
+ 16, 0x9970, 0, {0x00,0x22,0x40,0x08,0x93,0x02,0x24,0x22,0x89,0x42,0x2c,0x60,0x48,0x90,0x02,0x20 },
+ 16, 0x9980, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0x24,0x00,0x99,0x00,0x2e,0x40 },
+ 16, 0x9990, 0, {0x0b,0x90,0x02,0xe4,0x00,0x89,0x00,0x2a,0x40,0x0b,0x90,0x02,0xe4,0x00,0xb9,0x00 },
+ 16, 0x99a0, 0, {0x23,0x40,0x08,0xd0,0x02,0x24,0x00,0x99,0x00,0x2a,0x40,0x0a,0x90,0x06,0x24,0x40 },
+ 16, 0x99b0, 0, {0x89,0x41,0x2e,0x40,0x08,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x99c0, 0, {0x08,0x04,0x0c,0x80,0x91,0x20,0x2c,0x48,0x0b,0x10,0x02,0xc4,0x00,0xa1,0x20,0x20 },
+ 16, 0x99d0, 0, {0x48,0x0b,0x10,0x02,0xc4,0x80,0xb1,0x20,0xa1,0x49,0x08,0x52,0x4a,0x04,0x80,0x81 },
+ 16, 0x99e0, 0, {0x00,0x20,0x48,0x48,0x12,0x0a,0x04,0x80,0x81,0x20,0x2c,0x40,0x28,0x12,0x02,0x02 },
+ 16, 0x99f0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x08,0xd8,0x04,0x3e,0x80 },
+ 16, 0x9a00, 0, {0x0f,0x85,0x03,0xe0,0x00,0xc0,0x50,0x3a,0x14,0x0f,0xa5,0x03,0xe1,0x40,0xf8,0x02 },
+ 16, 0x9a10, 0, {0x32,0x80,0x2c,0xc5,0x03,0x21,0x40,0xda,0x00,0x3a,0x14,0x0e,0x85,0x43,0x21,0x40 },
+ 16, 0x9a20, 0, {0xc8,0x52,0x3e,0x14,0x0c,0x85,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9a30, 0, {0x88,0x1d,0xe4,0x44,0xe9,0x10,0x3f,0x44,0x4f,0xd0,0x02,0xfc,0x00,0xf9,0x12,0x3e },
+ 16, 0x9a40, 0, {0x44,0x0f,0xd0,0x03,0xe4,0x40,0xfd,0x10,0x3e,0x44,0x4f,0x91,0x03,0xe4,0x40,0xe9 },
+ 16, 0x9a50, 0, {0x40,0x3e,0x44,0x0f,0xd1,0x03,0xe4,0x40,0xf9,0x12,0x3f,0x40,0x0f,0x91,0x03,0xe6 },
+ 16, 0x9a60, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xf6,0xa0,0xfd,0x80,0xb3,0x40 },
+ 16, 0x9a70, 0, {0x0c,0x10,0x03,0x14,0x00,0xfd,0xa0,0x32,0x40,0x0f,0xd1,0x03,0xe4,0x00,0xf5,0x86 },
+ 16, 0x9a80, 0, {0x33,0x60,0x2c,0x9a,0x83,0x24,0x04,0xfd,0xa8,0x22,0x40,0x0d,0x50,0x43,0xf4,0x00 },
+ 16, 0x9a90, 0, {0xfd,0x00,0x33,0x40,0x0f,0x90,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9aa0, 0, {0x78,0x10,0xe1,0x00,0xb8,0x00,0x22,0x00,0x28,0x80,0x02,0x20,0x00,0xb8,0x00,0xa2 },
+ 16, 0x9ab0, 0, {0x00,0x0b,0x8a,0x12,0xe0,0x00,0xb8,0x04,0x22,0x14,0x08,0x84,0x02,0x20,0x00,0xb8 },
+ 16, 0x9ac0, 0, {0x40,0x20,0x00,0x88,0x80,0x02,0xe0,0x00,0xb8,0x00,0xa2,0x00,0x0b,0x80,0x02,0x0e },
+ 16, 0x9ad0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc4,0x00,0xb1,0x42,0x20,0x40 },
+ 16, 0x9ae0, 0, {0x08,0x10,0x02,0x04,0x00,0xb1,0x40,0x20,0x40,0x0b,0x10,0x06,0xc4,0x00,0xb1,0x40 },
+ 16, 0x9af0, 0, {0x24,0x40,0x08,0x10,0x02,0x44,0x04,0xb1,0x00,0x60,0x40,0x09,0x10,0x02,0xc4,0x00 },
+ 16, 0x9b00, 0, {0xb1,0x00,0x20,0x40,0x0b,0x10,0x02,0x12,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9b10, 0, {0x18,0x15,0xa4,0x00,0xb9,0x02,0x22,0x60,0x08,0x94,0x02,0x24,0x00,0xb9,0x01,0x22 },
+ 16, 0x9b20, 0, {0x40,0x0b,0x90,0x06,0xe4,0x00,0xb9,0x20,0x26,0x40,0x08,0x94,0x02,0x64,0x08,0xb9 },
+ 16, 0x9b30, 0, {0x00,0x22,0x40,0x08,0x92,0x02,0xec,0x08,0xb9,0x04,0x22,0x41,0x0b,0x10,0x02,0x06 },
+ 16, 0x9b40, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x10,0xf1,0x00,0x32,0x60 },
+ 16, 0x9b50, 0, {0x0c,0x94,0x0b,0x25,0x00,0xf9,0x00,0x32,0x40,0x8f,0x94,0xd3,0xe4,0x00,0xf9,0x00 },
+ 16, 0x9b60, 0, {0x36,0x40,0x4c,0x90,0x0b,0x64,0x00,0xf1,0x00,0x32,0x40,0x0d,0x92,0x12,0xe4,0x00 },
+ 16, 0x9b70, 0, {0xf9,0x00,0x32,0x40,0x0f,0x90,0x0b,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9b80, 0, {0x68,0x41,0xa4,0x00,0xf9,0x00,0x3c,0x40,0x8f,0x92,0x03,0xe4,0x00,0xf9,0x00,0x3e },
+ 16, 0x9b90, 0, {0x40,0x0f,0x9c,0x03,0xe4,0x00,0xf9,0x00,0xba,0x40,0x2f,0x90,0x23,0xa4,0x00,0xf9 },
+ 16, 0x9ba0, 0, {0x08,0xbe,0x40,0xcf,0x90,0x03,0xe4,0x10,0xf1,0x01,0x3e,0x41,0x0f,0x90,0x03,0xda },
+ 16, 0x9bb0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0xc8,0xf8,0x00,0x3e,0x03 },
+ 16, 0x9bc0, 0, {0x0c,0x84,0x03,0xa1,0x10,0xe8,0x00,0x32,0x00,0x8c,0x85,0x83,0xe0,0x00,0xc0,0x00 },
+ 16, 0x9bd0, 0, {0x38,0x0c,0x2c,0x00,0x03,0x60,0x00,0xc8,0x00,0x3c,0x00,0x0d,0x80,0x02,0x20,0x10 },
+ 16, 0x9be0, 0, {0xc8,0x20,0xb2,0x02,0x0f,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9bf0, 0, {0x28,0x05,0x39,0x10,0xbe,0x04,0x6f,0xa0,0x08,0xa0,0x02,0x3a,0x00,0x82,0x00,0xa2 },
+ 16, 0x9c00, 0, {0x80,0x8d,0xec,0x03,0xa8,0x00,0x8a,0x00,0x23,0x80,0x08,0xa0,0x22,0x28,0x00,0x8e },
+ 16, 0x9c10, 0, {0xcc,0x2f,0x80,0x08,0xe8,0xc2,0xb8,0x00,0x8e,0x60,0x23,0x90,0x0b,0xa0,0x02,0xca },
+ 16, 0x9c20, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4e,0x08,0xb0,0x72,0x2c,0xd0 },
+ 16, 0x9c30, 0, {0x28,0xb0,0x06,0x8c,0x01,0xa1,0x02,0x20,0xc0,0x08,0x38,0x02,0xcc,0x00,0x83,0x00 },
+ 16, 0x9c40, 0, {0x20,0xc0,0x29,0x30,0x02,0x4c,0x00,0x81,0x00,0x2c,0xc0,0x08,0x32,0x02,0x0c,0x40 },
+ 16, 0x9c50, 0, {0x83,0x00,0x20,0xf4,0x0b,0x30,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9c60, 0, {0xa0,0x01,0x1c,0x00,0xb4,0x00,0x2d,0xd0,0x48,0xf2,0x02,0x1e,0x21,0x85,0x20,0x20 },
+ 16, 0x9c70, 0, {0xe8,0x09,0x72,0x02,0x8e,0x80,0x8f,0x01,0x20,0xc0,0x09,0x72,0x02,0x0e,0x80,0x87 },
+ 16, 0x9c80, 0, {0x00,0x2d,0xcc,0x18,0x58,0x02,0x8e,0x00,0x85,0x00,0x21,0xc0,0x0b,0x72,0x02,0xe8 },
+ 16, 0x9c90, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xb4,0x80,0x2d,0xe0 },
+ 16, 0x9ca0, 0, {0x0c,0x78,0x83,0x9a,0x00,0xed,0xd0,0x31,0xf4,0x0c,0x6a,0x03,0xde,0x82,0xc7,0x80 },
+ 16, 0x9cb0, 0, {0x39,0xe0,0x0d,0xf8,0x83,0x5e,0xc2,0xc5,0x80,0x3d,0xe8,0x0c,0x68,0x03,0x12,0x00 },
+ 16, 0x9cc0, 0, {0xcf,0x80,0x31,0xe0,0x0f,0x7e,0x83,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9cd0, 0, {0x08,0x0d,0xac,0x08,0xf8,0x00,0x3c,0xc0,0x0f,0xb3,0x03,0xec,0x00,0xf9,0x02,0x3e },
+ 16, 0x9ce0, 0, {0xc8,0x0f,0xb0,0x03,0xed,0x40,0xfb,0x00,0xbe,0x80,0x0e,0xb3,0x03,0xed,0xc0,0xfb },
+ 16, 0x9cf0, 0, {0x00,0x3e,0xd2,0x2e,0x80,0x03,0xec,0x02,0xf9,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0xc2 },
+ 16, 0x9d00, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfe,0x00,0xf0,0x91,0x33,0xe0 },
+ 16, 0x9d10, 0, {0x8f,0xf8,0x03,0xfe,0x00,0xfd,0x80,0x3f,0xe0,0x0c,0x78,0x83,0x3f,0x00,0xcf,0x80 },
+ 16, 0x9d20, 0, {0x3f,0xa0,0x0c,0xf8,0x03,0x3e,0x00,0xcd,0x80,0x3f,0xe0,0x0f,0xf8,0x13,0xfe,0x10 },
+ 16, 0x9d30, 0, {0xff,0x80,0x3f,0x20,0x0f,0xf9,0x43,0xd0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9d40, 0, {0xa8,0x11,0x9c,0x00,0xb4,0xc1,0x31,0xc0,0x0b,0x70,0x02,0xd4,0x10,0xe5,0x20,0x2f },
+ 16, 0x9d50, 0, {0xc8,0x0f,0x40,0x03,0x5c,0x00,0x87,0x00,0x2d,0x80,0x08,0x70,0x02,0x1c,0x40,0x87 },
+ 16, 0x9d60, 0, {0x10,0x2d,0xc0,0x0b,0x76,0x02,0xdc,0x80,0xb7,0x00,0x2d,0xc0,0x0b,0x70,0x02,0xea },
+ 16, 0x9d70, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x9c,0x00,0xb6,0x22,0x21,0xd0 },
+ 16, 0x9d80, 0, {0x0b,0x70,0x82,0xd8,0x40,0xb5,0x02,0x2d,0xc0,0x88,0x65,0x02,0x0c,0x00,0x87,0x18 },
+ 16, 0x9d90, 0, {0x2c,0x04,0x08,0x30,0x02,0x8c,0x02,0x85,0x00,0x2d,0xc0,0x0b,0x70,0x46,0x90,0x10 },
+ 16, 0x9da0, 0, {0xb6,0x00,0x2d,0x00,0x0b,0x70,0x22,0xc4,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9db0, 0, {0x60,0x14,0xcc,0x08,0xb2,0x00,0xa4,0xc0,0x0b,0x30,0x42,0xc6,0x10,0xa1,0x00,0x2c },
+ 16, 0x9dc0, 0, {0xc0,0x0a,0x00,0x02,0x4c,0x00,0x83,0x00,0x2c,0x08,0x08,0x30,0x02,0x8c,0x00,0x83 },
+ 16, 0x9dd0, 0, {0x00,0x2c,0xc0,0x0b,0x18,0x82,0xc4,0x00,0xb0,0x00,0x2c,0x40,0x0b,0x30,0x12,0xd8 },
+ 16, 0x9de0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x15,0xac,0x00,0x38,0x00,0x32,0x50 },
+ 16, 0x9df0, 0, {0x0f,0xf0,0x03,0xe6,0x20,0xfd,0x00,0x3f,0xc0,0x08,0xd0,0x02,0x3c,0x02,0xcb,0x80 },
+ 16, 0x9e00, 0, {0x3c,0x50,0x2c,0xf0,0x0a,0xbc,0x00,0xc9,0x00,0x3f,0xc0,0x0f,0xbe,0x03,0xac,0x00 },
+ 16, 0x9e10, 0, {0xfa,0x02,0x2e,0xf7,0x4f,0xf0,0x03,0xee,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9e20, 0, {0x80,0x00,0xec,0x00,0xf1,0x00,0x3a,0xf0,0x0f,0xb0,0x03,0xe9,0x00,0xf9,0x01,0x3e },
+ 16, 0x9e30, 0, {0xc0,0x0f,0x90,0x13,0xec,0x00,0xf9,0x00,0x3e,0x55,0x0f,0xb0,0x01,0x6c,0x00,0xfb },
+ 16, 0x9e40, 0, {0x02,0x3e,0xc0,0x0f,0x90,0x73,0xe0,0x00,0xf8,0x41,0x3e,0x00,0x0f,0x30,0x01,0xe0 },
+ 16, 0x9e50, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xfc,0x00,0xfc,0x00,0x33,0xc0 },
+ 16, 0x9e60, 0, {0x1f,0xf0,0x13,0xf0,0x08,0xfd,0x02,0x3f,0xc0,0x8d,0xc0,0x03,0x3c,0x00,0xcf,0xa0 },
+ 16, 0x9e70, 0, {0x3f,0x80,0x0c,0x70,0x03,0x3c,0x10,0xfc,0x00,0x37,0xc0,0x0f,0xe0,0x03,0xb0,0x00 },
+ 16, 0x9e80, 0, {0xfe,0x00,0x3f,0xc0,0x0c,0xf0,0x03,0x04,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9e90, 0, {0x84,0x04,0x6e,0x00,0xb9,0xc2,0xa2,0xf0,0x0b,0xb0,0x42,0xeb,0x00,0xb9,0x00,0x2e },
+ 16, 0x9ea0, 0, {0xc0,0x0f,0x18,0x03,0x6c,0x00,0xd9,0x81,0x2e,0xb0,0x0a,0xb0,0x42,0x2c,0x00,0xba },
+ 16, 0x9eb0, 0, {0xc6,0x2e,0xc0,0x0b,0x8c,0x02,0xe3,0x00,0xb8,0xc0,0x3c,0xa0,0x0d,0xb0,0x02,0x20 },
+ 16, 0x9ec0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2f,0x00,0xb8,0x80,0x22,0xe2 },
+ 16, 0x9ed0, 0, {0x0b,0xb0,0x02,0xe6,0x20,0xb9,0x00,0x2c,0xc0,0x08,0xb8,0x02,0x0c,0x00,0x8b,0x00 },
+ 16, 0x9ee0, 0, {0x2e,0x30,0x48,0xb0,0x02,0x2c,0x00,0xb9,0xc0,0x2e,0xc1,0x0b,0x88,0x02,0xee,0x10 },
+ 16, 0x9ef0, 0, {0xb9,0xc0,0x2e,0x20,0x19,0xb0,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9f00, 0, {0x08,0x04,0x0c,0x00,0xb0,0x00,0x20,0xc0,0x0b,0x30,0x06,0xc0,0x00,0x91,0x00,0x2c },
+ 16, 0x9f10, 0, {0xc0,0x49,0x80,0x02,0x4c,0x04,0x91,0x00,0x2c,0x00,0x8a,0x30,0x0a,0x0c,0x04,0xb1 },
+ 16, 0x9f20, 0, {0x00,0x2c,0xc0,0x1b,0x00,0x12,0x49,0x10,0xb1,0x00,0x2e,0x20,0x09,0x30,0x02,0x02 },
+ 16, 0x9f30, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xb8,0x20,0x22,0xc0 },
+ 16, 0x9f40, 0, {0x8b,0xf0,0x03,0xe0,0x08,0xfd,0x00,0x3f,0xc0,0x0c,0xa0,0x03,0x3c,0x00,0xcb,0x00 },
+ 16, 0x9f50, 0, {0x3e,0x00,0x4c,0xf0,0x0a,0x3c,0x00,0xb9,0x00,0x37,0xc1,0x0f,0xa0,0x03,0xe0,0x00 },
+ 16, 0x9f60, 0, {0xfa,0x00,0x3e,0x00,0x0d,0xf0,0x0b,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9f70, 0, {0xa0,0x1d,0xf0,0x01,0xfc,0x40,0x3f,0x80,0x4f,0xf0,0x02,0xf0,0x00,0xfd,0x00,0x3f },
+ 16, 0x9f80, 0, {0xc1,0x0f,0xc0,0x03,0xfc,0x00,0xfd,0x00,0x3f,0x00,0x4f,0xf0,0x63,0xfc,0x00,0xfd },
+ 16, 0x9f90, 0, {0x04,0x3f,0xc0,0x0f,0xc0,0x03,0xf0,0x80,0xfc,0x00,0x7b,0x00,0x0f,0xf0,0x43,0xe8 },
+ 16, 0x9fa0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf8,0x00,0xc8,0x10,0x33,0x04 },
+ 16, 0x9fb0, 0, {0x0c,0x40,0x02,0x34,0x00,0xc8,0x85,0x1f,0xc0,0x2d,0xd9,0x03,0xfc,0xc0,0xdb,0x28 },
+ 16, 0x9fc0, 0, {0x37,0x64,0x0f,0xdb,0x03,0x3e,0x00,0xff,0x25,0x3f,0xc8,0x0e,0xf2,0x03,0xfe,0x20 },
+ 16, 0x9fd0, 0, {0xff,0xa4,0x37,0xc4,0x0c,0xc8,0x03,0x30,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9fe0, 0, {0x80,0x10,0xe8,0x00,0x88,0x20,0x22,0x00,0x08,0x88,0x12,0x26,0x04,0x89,0x82,0x2e },
+ 16, 0x9ff0, 0, {0xf4,0x48,0xb8,0x02,0xfc,0xc4,0x98,0xc2,0x22,0x7c,0x4b,0x9d,0x42,0x26,0x08,0xbf },
+ 16, 0xa000, 0, {0x18,0x77,0xe4,0x08,0xf1,0x82,0xef,0x00,0xbb,0xd0,0x22,0xd8,0x08,0x90,0x83,0x60 },
+ 16, 0xa010, 0, {0x02,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x45,0xc8,0x04,0xa0,0x00,0x24,0x00 },
+ 16, 0xa020, 0, {0x0a,0x00,0x02,0x0c,0x00,0x82,0x04,0x2c,0xe0,0x08,0x10,0x02,0xcc,0x80,0x83,0x00 },
+ 16, 0xa030, 0, {0x24,0x00,0x0b,0x10,0x06,0xc8,0x01,0xb3,0x20,0x2c,0xc0,0x29,0x32,0x02,0xc8,0x08 },
+ 16, 0xa040, 0, {0xb1,0x00,0x24,0xd0,0x08,0x82,0x02,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa050, 0, {0xc0,0x15,0xa8,0x00,0xa8,0x0c,0x26,0x00,0x0a,0x80,0x02,0x2c,0x14,0x8a,0x02,0x6e },
+ 16, 0xa060, 0, {0xe0,0x08,0xb0,0x02,0x4c,0x08,0xa8,0x00,0x26,0x20,0x0b,0x9c,0x02,0xe4,0x00,0xbb },
+ 16, 0xa070, 0, {0x04,0x22,0xc0,0x19,0xb0,0x02,0xe8,0x01,0xbb,0x11,0x02,0xc0,0x88,0x90,0x02,0xf0 },
+ 16, 0xa080, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0xec,0x02,0xea,0x40,0xb6,0x60 },
+ 16, 0xa090, 0, {0x2e,0x98,0x0b,0x20,0x02,0xc8,0x02,0x3e,0xc0,0x0d,0x98,0x03,0xec,0x02,0xdb,0x88 },
+ 16, 0xa0a0, 0, {0xb6,0x21,0x0f,0x88,0x03,0xac,0x08,0xfb,0x00,0x2c,0xc0,0x0e,0xb0,0x43,0xe5,0x80 },
+ 16, 0xa0b0, 0, {0xf0,0x60,0x36,0xc0,0x0c,0x01,0x43,0x48,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa0c0, 0, {0xe0,0x01,0xbc,0x00,0xd6,0x01,0x3b,0x64,0x85,0xd9,0x03,0xf0,0x0c,0xff,0x00,0x3e },
+ 16, 0xa0d0, 0, {0xc1,0x0f,0xfc,0x21,0xec,0x00,0xd7,0x90,0x3b,0x40,0x0f,0x50,0x03,0x3c,0x00,0xff },
+ 16, 0xa0e0, 0, {0x00,0x3f,0xc0,0x8e,0xf0,0x03,0xf4,0x40,0xfd,0x88,0x3f,0xc0,0x2f,0xd0,0x02,0x78 },
+ 16, 0xa0f0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x8c,0x00,0xda,0x40,0x3c,0x40 },
+ 16, 0xa100, 0, {0x0f,0x10,0x03,0x48,0x00,0xf9,0x22,0x3c,0xc2,0x0e,0x90,0x83,0xec,0x02,0xdb,0x04 },
+ 16, 0xa110, 0, {0x3a,0x08,0x0f,0x84,0x87,0xe8,0x00,0xcb,0x00,0x3e,0xc4,0x0e,0xb0,0x03,0xed,0x00 },
+ 16, 0xa120, 0, {0xe8,0x42,0x3a,0xc0,0x0f,0x80,0x0b,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa130, 0, {0x88,0x05,0x2c,0x08,0x8a,0x00,0x2e,0x42,0x8b,0x90,0x02,0x28,0x18,0xbb,0x49,0x22 },
+ 16, 0xa140, 0, {0xd0,0x38,0xbc,0x82,0xfc,0x00,0xe8,0x02,0x22,0x62,0xcb,0x9c,0x00,0xef,0x60,0xdf },
+ 16, 0xa150, 0, {0x00,0x2f,0xc0,0x0b,0xf0,0x02,0xec,0x00,0x09,0x40,0x37,0xc0,0x0b,0x90,0x02,0x32 },
+ 16, 0xa160, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x48,0x10,0x11,0x00,0x2c,0xa0 },
+ 16, 0xa170, 0, {0x0b,0x20,0x02,0x44,0x00,0x90,0xc0,0x64,0x34,0x28,0x34,0x02,0xcc,0x00,0x93,0x84 },
+ 16, 0xa180, 0, {0x28,0x40,0x0b,0x08,0x00,0xce,0x00,0x93,0x00,0x2c,0xc2,0x0a,0x30,0x02,0xc0,0x00 },
+ 16, 0xa190, 0, {0xb2,0x40,0x22,0xc0,0x0b,0x20,0x02,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa1a0, 0, {0x70,0x01,0x1a,0x40,0x85,0x80,0x2d,0xa0,0x0b,0x68,0x06,0x16,0x80,0xbd,0x90,0x25 },
+ 16, 0xa1b0, 0, {0x24,0x18,0x7b,0x42,0xde,0x40,0xa0,0x80,0x21,0xe0,0x0b,0x68,0x02,0xd6,0x00,0x97 },
+ 16, 0xa1c0, 0, {0x90,0x2d,0xe0,0x0b,0x78,0x02,0xce,0x40,0x92,0x80,0x6d,0xe4,0x0b,0x78,0x02,0x08 },
+ 16, 0xa1d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x28,0x00,0xd1,0x80,0x3c,0x88 },
+ 16, 0xa1e0, 0, {0x0b,0x22,0x03,0x4e,0x80,0xf2,0xa1,0x3c,0x24,0x2a,0x39,0x03,0xcc,0x40,0xd3,0xac },
+ 16, 0xa1f0, 0, {0x38,0xc5,0x0f,0x30,0x82,0xc8,0x00,0xd3,0x00,0x3c,0xc0,0x0e,0x30,0x13,0xc0,0x00 },
+ 16, 0xa200, 0, {0xf1,0x00,0x38,0xc0,0x0f,0xa0,0x03,0x1a,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa210, 0, {0x40,0x1d,0xb8,0x10,0xfd,0x34,0x3e,0x80,0x0f,0xe0,0x03,0xee,0x00,0x72,0x00,0x3a },
+ 16, 0xa220, 0, {0x00,0x0f,0xb0,0x63,0xec,0x40,0xf8,0x22,0x3e,0xc0,0x0f,0xf0,0x03,0xd4,0x40,0xff },
+ 16, 0xa230, 0, {0x00,0x3f,0xd2,0x0f,0xf0,0x03,0xec,0x00,0xcf,0x00,0x37,0xc0,0x0f,0xf0,0x03,0xd0 },
+ 16, 0xa240, 0, {0x06,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xee,0x00,0xeb,0x00,0x36,0xe0 },
+ 16, 0xa250, 0, {0x0d,0xb0,0x03,0x20,0x00,0xf0,0x80,0x33,0xc0,0x08,0xb8,0x03,0x2c,0x80,0xcb,0x00 },
+ 16, 0xa260, 0, {0x32,0x80,0x0f,0xa0,0x13,0x6e,0x08,0xcb,0x28,0x32,0xe0,0x0d,0xb4,0x83,0xe2,0x00 },
+ 16, 0xa270, 0, {0xca,0x00,0x3e,0xe0,0x0c,0xa8,0x03,0x02,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa280, 0, {0xc8,0x11,0x8c,0x04,0x83,0x00,0x21,0xc0,0x48,0x70,0x02,0x10,0x00,0xb7,0x02,0x21 },
+ 16, 0xa290, 0, {0xc0,0x4a,0x70,0x02,0x0d,0x48,0xd4,0x00,0x35,0xc0,0x0e,0x60,0x02,0xdc,0x00,0xa7 },
+ 16, 0xa2a0, 0, {0x40,0x29,0xc0,0x09,0x72,0x02,0xd4,0x10,0xa6,0x02,0x2f,0xc8,0x08,0x70,0x02,0x12 },
+ 16, 0xa2b0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x9e,0x00,0xa7,0x80,0x20,0xe0 },
+ 16, 0xa2c0, 0, {0x0a,0x38,0x02,0x1a,0x00,0xb5,0x80,0x21,0xe0,0x08,0xf8,0x22,0x5c,0x81,0x83,0x80 },
+ 16, 0xa2d0, 0, {0x21,0xa1,0x0b,0x78,0x82,0x5a,0x10,0x83,0xa0,0x20,0xe8,0x0a,0x7b,0x02,0xda,0x00 },
+ 16, 0xa2e0, 0, {0x97,0xc0,0x2d,0xe4,0x08,0xe8,0x02,0x08,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa2f0, 0, {0x08,0x14,0xcc,0x00,0x83,0x10,0x20,0xc0,0x0a,0x30,0x02,0x08,0x08,0xb3,0x70,0x20 },
+ 16, 0xa300, 0, {0xf8,0x0a,0x30,0x42,0x4c,0x04,0x93,0x14,0x26,0xc4,0x0a,0x38,0x02,0xcc,0x00,0xa3 },
+ 16, 0xa310, 0, {0x00,0x28,0xc0,0xaa,0x30,0x02,0xce,0x40,0xb3,0x88,0x2c,0xc0,0x28,0x30,0x0a,0x12 },
+ 16, 0xa320, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa9,0x00,0xea,0x80,0xb6,0x90 },
+ 16, 0xa330, 0, {0x2f,0x24,0x0b,0x39,0x04,0xbe,0xc0,0x33,0x92,0x0c,0xa0,0x0b,0x68,0x18,0xce,0xc0 },
+ 16, 0xa340, 0, {0x33,0x80,0x0f,0xe9,0x43,0x78,0x00,0xca,0x00,0x32,0x80,0x0f,0xa0,0x13,0xf8,0x48 },
+ 16, 0xa350, 0, {0xde,0x00,0x3e,0x80,0x0c,0xe0,0x02,0x3a,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa360, 0, {0x48,0x00,0xe0,0x24,0xf8,0x00,0x3e,0x12,0x0d,0x80,0x93,0xb0,0x28,0xf8,0x00,0xbc },
+ 16, 0xa370, 0, {0x00,0x0f,0x84,0x03,0xa0,0x00,0xf0,0x00,0x3e,0x02,0x0e,0x80,0x00,0xe0,0x00,0xf8 },
+ 16, 0xa380, 0, {0x01,0x3e,0x00,0x0d,0x80,0x03,0xe0,0x00,0xe8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0xa390, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x00,0xb2,0x70 },
+ 16, 0xa3a0, 0, {0x0f,0x90,0x01,0x04,0x00,0xc9,0x00,0x3e,0x40,0x0c,0x98,0x03,0xe4,0x04,0xe9,0x08 },
+ 16, 0xa3b0, 0, {0x3a,0x48,0x0c,0x9a,0x03,0xe4,0x00,0xf9,0x00,0x36,0x40,0x0b,0x10,0x0b,0x26,0x80 },
+ 16, 0xa3c0, 0, {0xf1,0x80,0x32,0x40,0x0f,0x90,0x03,0xc2,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa3d0, 0, {0x80,0x04,0x64,0x00,0xb9,0x00,0x22,0x61,0x0b,0x90,0x02,0x24,0x08,0x89,0x00,0x2e },
+ 16, 0xa3e0, 0, {0x40,0x0d,0x9a,0x02,0xe4,0x08,0xa9,0x00,0x22,0x78,0x0d,0x94,0x06,0xe4,0x10,0xb9 },
+ 16, 0xa3f0, 0, {0x00,0x22,0x50,0x0b,0x90,0x02,0x25,0x80,0xb9,0x80,0x36,0x40,0x0b,0x90,0x02,0xe0 },
+ 16, 0xa400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb5,0x00,0x23,0x42 },
+ 16, 0xa410, 0, {0x0b,0xd0,0x0e,0xb4,0x00,0x89,0x04,0x2e,0x60,0x08,0x91,0x02,0xc4,0x04,0xb9,0x04 },
+ 16, 0xa420, 0, {0x2a,0xc0,0x08,0x94,0x02,0xe4,0x10,0xb1,0x00,0x26,0x42,0x0a,0x90,0x02,0x24,0x00 },
+ 16, 0xa430, 0, {0xb9,0x21,0x62,0x40,0x0b,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa440, 0, {0x08,0x04,0x05,0x00,0xb5,0x40,0x21,0x50,0x4b,0x50,0x06,0x94,0x02,0x81,0x00,0x2c },
+ 16, 0xa450, 0, {0x60,0x29,0x14,0x06,0xc5,0x00,0xa1,0x22,0x20,0x51,0x89,0x14,0x02,0xc4,0x00,0xb1 },
+ 16, 0xa460, 0, {0x20,0x20,0x48,0x0b,0x14,0x02,0x04,0x01,0xb1,0x00,0x04,0x50,0x0b,0x10,0x02,0xc2 },
+ 16, 0xa470, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x08,0xb8,0x00,0x32,0x00 },
+ 16, 0xa480, 0, {0x8f,0x80,0x03,0xb0,0x00,0x88,0x00,0x3e,0x00,0x0c,0x80,0x03,0xe0,0x00,0xe8,0x04 },
+ 16, 0xa490, 0, {0x3a,0x00,0x0c,0x80,0x02,0xe0,0x00,0xf8,0x50,0x36,0x00,0x0f,0x80,0x03,0x20,0x04 },
+ 16, 0xa4a0, 0, {0xf8,0x01,0x12,0x00,0x4f,0x80,0x07,0xee,0x07,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa4b0, 0, {0x98,0x1d,0xe5,0x10,0xf9,0x40,0x3e,0x50,0x0f,0x94,0x02,0x65,0x01,0xfd,0x01,0x3d },
+ 16, 0xa4c0, 0, {0x50,0x4f,0x50,0x13,0xe5,0x00,0xfd,0x10,0x1f,0x50,0x07,0xd4,0x43,0xd4,0x00,0xf9 },
+ 16, 0xa4d0, 0, {0x10,0x1e,0x44,0x0f,0x94,0x03,0xd5,0x00,0xfd,0x40,0x3e,0x50,0x0f,0x52,0x83,0xee },
+ 16, 0xa4e0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xe4,0x40,0xf9,0x60,0x3f,0x44 },
+ 16, 0xa4f0, 0, {0x0f,0xd0,0xc3,0xe4,0x30,0xf9,0x01,0x3e,0x42,0x0c,0xd0,0x03,0xe7,0x80,0xdd,0xa0 },
+ 16, 0xa500, 0, {0x33,0x40,0x0c,0xd0,0x03,0xfc,0x00,0xc9,0x90,0x3f,0x68,0x1e,0x91,0x03,0x34,0x00 },
+ 16, 0xa510, 0, {0xfd,0x00,0x3e,0x68,0x0c,0x94,0x03,0x0e,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa520, 0, {0x39,0x10,0xe0,0x00,0xb8,0x42,0x2e,0x09,0x0b,0x84,0x02,0xe1,0x04,0xbe,0x00,0x2e },
+ 16, 0xa530, 0, {0x10,0x08,0x80,0x22,0xc2,0x80,0x88,0x40,0x22,0x00,0x0a,0x80,0x02,0xe0,0x00,0xa8 },
+ 16, 0xa540, 0, {0xd0,0x2e,0x10,0x4b,0x8a,0x03,0x60,0x00,0xba,0x00,0x2e,0x30,0x08,0x8a,0x02,0x86 },
+ 16, 0xa550, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xc5,0x80,0xb1,0x60,0x6c,0xd0 },
+ 16, 0xa560, 0, {0x0b,0x10,0x00,0xdc,0x0c,0xb5,0x00,0x2c,0x41,0x08,0x10,0x02,0xc5,0x80,0x91,0x10 },
+ 16, 0xa570, 0, {0x68,0xc0,0x08,0x30,0x02,0xe4,0x0c,0x81,0x22,0x2c,0x50,0x08,0x10,0x42,0x04,0x00 },
+ 16, 0xa580, 0, {0xa1,0x00,0x2c,0x5a,0x28,0x90,0x02,0x52,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa590, 0, {0x18,0x15,0xa4,0x00,0xb9,0x00,0x2e,0x41,0x0b,0x90,0x12,0xf4,0x80,0xbf,0x00,0x2e },
+ 16, 0xa5a0, 0, {0x40,0x08,0x90,0x02,0xe4,0x00,0xa9,0x60,0x60,0x42,0x0a,0x94,0x12,0xe5,0x00,0xa9 },
+ 16, 0xa5b0, 0, {0x00,0x2e,0x40,0x0b,0x90,0x02,0x64,0x20,0xb9,0x00,0x0e,0x40,0x09,0x90,0x02,0xc6 },
+ 16, 0xa5c0, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe4,0x00,0xf9,0x00,0x3e,0x41 },
+ 16, 0xa5d0, 0, {0x0f,0x90,0x23,0xe4,0x00,0xf9,0x00,0x3e,0x40,0x0c,0x90,0x03,0xe4,0x04,0xd1,0xc0 },
+ 16, 0xa5e0, 0, {0xba,0x70,0x0c,0x98,0x03,0xc4,0x00,0xc9,0x00,0x3e,0x40,0x0e,0x90,0x03,0x25,0x40 },
+ 16, 0xa5f0, 0, {0xe9,0x40,0x3e,0x40,0x0c,0x10,0x03,0x68,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa600, 0, {0x68,0x01,0xa4,0x14,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x23,0xe4,0x08,0xf9,0xa0,0x3c },
+ 16, 0xa610, 0, {0xc2,0x2f,0x90,0x03,0xc4,0x00,0xd9,0x80,0x3e,0x70,0x0f,0x91,0x43,0xe4,0x00,0xf9 },
+ 16, 0xa620, 0, {0x00,0x3e,0x40,0x1f,0x90,0x13,0xe6,0x20,0xf9,0xa0,0x3c,0x40,0x4e,0x90,0x03,0x9a },
+ 16, 0xa630, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa0,0x00,0xf8,0x00,0x3e,0x02 },
+ 16, 0xa640, 0, {0x0f,0x80,0x13,0x20,0x0c,0xfc,0x01,0x3e,0x00,0x0c,0x80,0x03,0xe0,0x00,0xc8,0x50 },
+ 16, 0xa650, 0, {0x32,0x00,0x0f,0x80,0x0b,0x20,0x08,0xf8,0x00,0x32,0x00,0x2c,0x80,0x43,0xe0,0x40 },
+ 16, 0xa660, 0, {0xf8,0x02,0x3a,0x00,0x8f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa670, 0, {0xa8,0x85,0x28,0x08,0x3a,0x00,0x0f,0x80,0x4b,0xa1,0x02,0x28,0x00,0xba,0x82,0x2e },
+ 16, 0xa680, 0, {0x88,0x48,0xe4,0x02,0xe8,0x00,0xae,0x90,0xa3,0x90,0x0b,0xe0,0x00,0x38,0x00,0xba },
+ 16, 0xa690, 0, {0x00,0x37,0xa0,0x08,0xa0,0x02,0xf8,0x00,0x9e,0xe0,0x22,0x80,0x0b,0xa0,0x23,0x42 },
+ 16, 0xa6a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x10,0x33,0x00,0x2c,0xd0 },
+ 16, 0xa6b0, 0, {0x0b,0x14,0x02,0x0c,0x00,0xb2,0x91,0x2c,0xd0,0x08,0x3e,0x02,0x4c,0x00,0x83,0x40 },
+ 16, 0xa6c0, 0, {0x24,0xc2,0x0b,0x36,0x00,0x8c,0x00,0xb3,0x00,0x20,0xc0,0x09,0xb0,0x02,0xce,0x00 },
+ 16, 0xa6d0, 0, {0xb3,0xcc,0x68,0xc0,0x0b,0x30,0x02,0x02,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa6e0, 0, {0xe0,0x01,0x1c,0x88,0xb7,0x25,0x2d,0xc0,0x8b,0x58,0x1a,0x1c,0x08,0xb6,0x00,0x2d },
+ 16, 0xa6f0, 0, {0xc0,0x08,0x74,0x02,0xdc,0x40,0xa5,0x00,0x25,0xc0,0x1b,0x78,0x02,0x94,0x08,0xb7 },
+ 16, 0xa700, 0, {0x80,0x25,0xe3,0x0a,0x71,0x02,0xdc,0x00,0x97,0x83,0x21,0xc8,0x8b,0xf1,0x02,0x48 },
+ 16, 0xa710, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1f,0x00,0xf7,0xe2,0x7d,0xe0 },
+ 16, 0xa720, 0, {0x0f,0x58,0x43,0x1e,0x18,0xf6,0x80,0x7c,0xe0,0x2c,0x68,0x02,0x5e,0x90,0xc3,0x80 },
+ 16, 0xa730, 0, {0x35,0xe0,0x0f,0xf8,0x03,0x9e,0x04,0xff,0xa1,0x20,0xa1,0x0d,0x78,0x03,0xd6,0x00 },
+ 16, 0xa740, 0, {0xf7,0x80,0x39,0xf8,0x0f,0x78,0x03,0x0a,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa750, 0, {0x48,0x1d,0xac,0x00,0xfb,0x40,0x7f,0x41,0x0f,0x10,0x03,0xec,0x04,0xfa,0x00,0x3e },
+ 16, 0xa760, 0, {0xd0,0x0f,0xa0,0x03,0xed,0x00,0xe9,0x00,0x2a,0x00,0x0f,0xb0,0x03,0x64,0x00,0xfb },
+ 16, 0xa770, 0, {0x40,0x3e,0xc0,0x0d,0xb0,0x03,0xe4,0x00,0xd3,0x00,0x36,0xc0,0x0f,0x38,0x03,0xc2 },
+ 16, 0xa780, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x48,0xcf,0xc0,0x33,0x60 },
+ 16, 0xa790, 0, {0x8c,0xc8,0x43,0xd6,0x00,0xcc,0x94,0x3f,0xb0,0x0d,0xf8,0x03,0x7f,0x00,0xdf,0x80 },
+ 16, 0xa7a0, 0, {0x3f,0x60,0x0f,0xd8,0x03,0xde,0x00,0xcf,0xca,0x3d,0x60,0x0c,0xf8,0x13,0x3a,0x44 },
+ 16, 0xa7b0, 0, {0xdd,0x80,0x3f,0xe0,0x0f,0xf8,0x43,0x18,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa7c0, 0, {0xa8,0x11,0x9c,0x00,0x8f,0x11,0x33,0xc0,0x48,0x41,0x12,0xc4,0x48,0x84,0x11,0x2c },
+ 16, 0xa7d0, 0, {0xec,0x2a,0xba,0x03,0x3c,0x40,0xd7,0x48,0x2d,0x41,0x0b,0x60,0x02,0xd4,0x00,0xd7 },
+ 16, 0xa7e0, 0, {0x01,0x3d,0xc0,0x0d,0xf0,0x03,0x5a,0x00,0x84,0x18,0x2d,0xc0,0x0b,0x70,0x03,0x6a },
+ 16, 0xa7f0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x8c,0x08,0x87,0x00,0x21,0x40 },
+ 16, 0xa800, 0, {0x09,0x40,0x02,0xd4,0x00,0xa4,0x92,0x2d,0xc8,0x09,0x62,0x82,0x5c,0x00,0x87,0x00 },
+ 16, 0xa810, 0, {0x2d,0xc0,0x0b,0x50,0x02,0xfc,0x00,0x87,0x00,0x2d,0x04,0x08,0x70,0x02,0x1c,0x80 },
+ 16, 0xa820, 0, {0xb5,0x00,0x2d,0xc0,0x0b,0xf0,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa830, 0, {0x60,0x10,0xcc,0x00,0x83,0x00,0x20,0x40,0x09,0x00,0x22,0xc7,0x00,0xa0,0x41,0x2c },
+ 16, 0xa840, 0, {0xc1,0x4b,0x08,0x02,0x2c,0x00,0x93,0x40,0x2c,0x7c,0x0b,0x38,0x02,0xc7,0x20,0x93 },
+ 16, 0xa850, 0, {0x00,0x2c,0xc0,0x09,0x30,0x02,0x4f,0x84,0xb0,0x80,0x2c,0xc0,0x0b,0x32,0x10,0x50 },
+ 16, 0xa860, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x15,0xbc,0x02,0xcf,0x00,0xb2,0x40 },
+ 16, 0xa870, 0, {0x0d,0x10,0x03,0xe8,0x24,0xeb,0xc1,0x3e,0xc0,0x2d,0x98,0x13,0x7c,0x0a,0xc2,0x43 },
+ 16, 0xa880, 0, {0x3e,0xb0,0x0f,0xa9,0x03,0xe9,0x20,0xcf,0x00,0x3e,0xc0,0x8c,0xf0,0x03,0x0d,0x20 },
+ 16, 0xa890, 0, {0xfa,0xc0,0x3f,0xc0,0x0f,0x74,0x01,0x2a,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa8a0, 0, {0x80,0x00,0xec,0x00,0xfb,0x02,0x3a,0x40,0x8e,0x90,0x03,0xe8,0x14,0x5b,0x50,0x3c },
+ 16, 0xa8b0, 0, {0x50,0x4e,0x84,0x03,0xec,0x00,0xf8,0x40,0x3e,0x80,0x07,0x81,0x03,0xec,0x08,0xf3 },
+ 16, 0xa8c0, 0, {0x00,0x3a,0xc0,0x9f,0x30,0x03,0xec,0x00,0xcb,0x20,0x3e,0xc0,0x0f,0xb0,0x23,0xe8 },
+ 16, 0xa8d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x90,0xfc,0x00,0xff,0x00,0x3f,0x40 },
+ 16, 0xa8e0, 0, {0x0f,0xd0,0x03,0x38,0x20,0xcf,0x08,0x32,0xc1,0x0e,0xd0,0x03,0xfc,0x00,0xfe,0x08 },
+ 16, 0xa8f0, 0, {0x31,0xe5,0x0e,0xe4,0x03,0x3a,0x00,0xff,0x00,0x33,0x80,0x0f,0xf0,0x2b,0x24,0x00 },
+ 16, 0xa900, 0, {0xcc,0xa0,0x3f,0xc0,0x0f,0xf0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa910, 0, {0x80,0x04,0x6c,0x00,0xbb,0x00,0x3a,0x69,0x0b,0x90,0x6e,0x08,0x00,0x83,0x41,0x36 },
+ 16, 0xa920, 0, {0x40,0xc8,0x88,0xc6,0xec,0x00,0x88,0x40,0x36,0x80,0x0d,0xa8,0x03,0x6e,0x50,0xbb },
+ 16, 0xa930, 0, {0x00,0x36,0xc0,0x0b,0xb0,0x02,0x24,0x00,0xd9,0x08,0x2e,0xc0,0x0b,0xb0,0x03,0xe0 },
+ 16, 0xa940, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xbb,0x00,0x2e,0x60 },
+ 16, 0xa950, 0, {0x03,0x80,0x02,0x20,0x00,0x89,0x01,0x22,0x58,0x08,0x98,0x22,0xec,0x01,0xab,0x00 },
+ 16, 0xa960, 0, {0x22,0x00,0x0a,0x10,0x02,0x28,0x00,0xbb,0x00,0x22,0x40,0x0b,0xb0,0x02,0x28,0x00 },
+ 16, 0xa970, 0, {0x8a,0x00,0x2e,0xc0,0x0b,0xb0,0x42,0x20,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa980, 0, {0x08,0x04,0x0c,0x00,0xb3,0x00,0x28,0x40,0x8b,0x00,0x02,0x02,0x40,0x89,0x01,0x24 },
+ 16, 0xa990, 0, {0xd2,0x28,0x10,0x02,0xcc,0x00,0x83,0x10,0x24,0x20,0x08,0x08,0x02,0x4e,0x00,0xb3 },
+ 16, 0xa9a0, 0, {0x04,0xa0,0xc0,0x0b,0x30,0x02,0x08,0x88,0x92,0x00,0x2c,0xc0,0x0b,0xb0,0x02,0xc2 },
+ 16, 0xa9b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xff,0x00,0x3e,0x00 },
+ 16, 0xa9c0, 0, {0x0f,0x80,0x02,0x20,0x10,0x89,0x50,0x22,0xd8,0x2e,0x96,0x22,0xfc,0x00,0xeb,0x40 },
+ 16, 0xa9d0, 0, {0x32,0xc0,0x0a,0x90,0x03,0x28,0x00,0xff,0x00,0x22,0x00,0x0f,0xb0,0x03,0x2c,0xa0 },
+ 16, 0xa9e0, 0, {0xc8,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0x00,0x06,0x10,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa9f0, 0, {0xa0,0x19,0xfc,0x00,0xff,0x0c,0x3b,0x00,0x0f,0xc0,0x02,0x70,0x90,0xfd,0x00,0x3e },
+ 16, 0xaa00, 0, {0xc9,0x0f,0x96,0xc3,0xfc,0x00,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x04,0xff },
+ 16, 0xaa10, 0, {0x04,0x3f,0xc0,0x0f,0xf0,0x03,0xec,0x00,0xfc,0x00,0x3f,0xc0,0x0f,0x70,0x03,0xe8 },
+ 16, 0xaa20, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xdc,0x80,0xfb,0x28,0x3f,0x00 },
+ 16, 0xaa30, 0, {0x0c,0xc1,0x0b,0xf1,0x02,0xed,0x00,0x37,0x30,0x2c,0xf1,0x03,0xb2,0x40,0xff,0x00 },
+ 16, 0xaa40, 0, {0xbb,0xc0,0x0f,0x48,0x06,0xb2,0x00,0xfc,0x80,0x3b,0xcc,0x0c,0xf0,0x03,0x70,0x80 },
+ 16, 0xaa50, 0, {0xdf,0x28,0x33,0x04,0x0f,0xf4,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaa60, 0, {0x80,0x10,0xff,0x40,0xbf,0x60,0x2e,0x21,0x08,0x82,0x02,0x20,0x00,0xa9,0x28,0x2a },
+ 16, 0xaa70, 0, {0x00,0x09,0xfa,0x02,0x20,0x00,0xbf,0x51,0x23,0xd8,0x09,0x98,0x02,0xe4,0x30,0xb0 },
+ 16, 0xaa80, 0, {0x00,0x23,0xd0,0x08,0xf5,0xa2,0x25,0xa4,0x8f,0x42,0x3c,0x10,0x0b,0xb0,0x0a,0x20 },
+ 16, 0xaa90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0xb3,0x08,0x2c,0x00 },
+ 16, 0xaaa0, 0, {0x28,0x00,0x1a,0xc0,0x84,0x20,0x00,0x24,0xc8,0x4b,0x31,0x42,0xc0,0x00,0x93,0x02 },
+ 16, 0xaab0, 0, {0x20,0xc6,0x08,0x00,0x06,0xc0,0x81,0xb3,0x00,0x2c,0xd8,0x09,0x32,0x02,0xa0,0x40 },
+ 16, 0xaac0, 0, {0x93,0x01,0x24,0x4c,0x0b,0x32,0x02,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaad0, 0, {0xc0,0x11,0xac,0x00,0xbb,0x02,0x2e,0x0a,0x08,0x80,0x82,0x60,0x00,0xa8,0x00,0x2e },
+ 16, 0xaae0, 0, {0xe0,0x1b,0xb0,0x02,0x62,0x01,0x3b,0x00,0x22,0xc1,0x09,0x90,0x02,0xe2,0x00,0xbb },
+ 16, 0xaaf0, 0, {0x60,0x26,0xc1,0x08,0xb0,0x2a,0x26,0x00,0x9b,0x04,0x2e,0x21,0x0b,0xb0,0x02,0x30 },
+ 16, 0xab00, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0xec,0x10,0xfb,0x00,0x3e,0x10 },
+ 16, 0xab10, 0, {0x08,0x84,0x13,0xec,0x02,0xa9,0x04,0x36,0x20,0x0f,0xb0,0x03,0xee,0x80,0xfb,0x00 },
+ 16, 0xab20, 0, {0x3a,0xc0,0x0c,0xa0,0x03,0xa2,0x80,0x79,0x40,0x1e,0xc0,0x8c,0xb0,0x63,0x6a,0x10 },
+ 16, 0xab30, 0, {0xd3,0x00,0x36,0xa2,0x07,0xb0,0x03,0x00,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xab40, 0, {0xe0,0x01,0xbc,0x00,0xff,0x00,0x3e,0x20,0x4d,0x41,0x03,0x9c,0x00,0xfd,0x20,0xab },
+ 16, 0xab50, 0, {0x00,0x0c,0xf0,0x03,0xb8,0x00,0xf7,0x00,0x3f,0xc0,0x4d,0xc9,0x03,0xf4,0x00,0xff },
+ 16, 0xab60, 0, {0x00,0x3b,0xc0,0x2e,0xf0,0x00,0xf0,0x00,0xef,0x00,0x3f,0x00,0x4b,0x70,0x03,0xf8 },
+ 16, 0xab70, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x80,0xeb,0x00,0x7e,0x10 },
+ 16, 0xab80, 0, {0x2e,0x84,0x03,0xec,0x00,0xe0,0x00,0x32,0x50,0x0f,0xb0,0x86,0x25,0x00,0xdb,0x20 },
+ 16, 0xab90, 0, {0x3a,0xc0,0x0d,0xb0,0x63,0xe1,0x10,0xfb,0x48,0x38,0xc1,0x0f,0x30,0x03,0x2c,0x04 },
+ 16, 0xaba0, 0, {0xfb,0x08,0x32,0xc0,0x0c,0xb0,0x0b,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xabb0, 0, {0xc8,0x05,0x3c,0x00,0x8f,0x00,0x64,0x29,0x28,0x80,0x03,0xec,0x02,0xe8,0x04,0xa8 },
+ 16, 0xabc0, 0, {0x56,0x08,0xfc,0x07,0xe0,0x00,0x0f,0xa0,0xbf,0xc0,0x0b,0x95,0x02,0xa0,0x00,0xbb },
+ 16, 0xabd0, 0, {0x05,0x37,0xc0,0x89,0xf0,0x0a,0x0d,0xc8,0xbf,0x08,0x2a,0x80,0x08,0xf0,0x02,0x32 },
+ 16, 0xabe0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x01,0xb3,0x02,0x24,0xe0 },
+ 16, 0xabf0, 0, {0x0a,0x30,0x12,0x80,0x03,0xa3,0x00,0xa8,0x00,0x02,0xb8,0x22,0xc0,0x00,0xb3,0x00 },
+ 16, 0xac00, 0, {0x28,0xc1,0x0b,0x04,0x02,0x08,0x00,0xb9,0x40,0x28,0xc0,0x0b,0x30,0x02,0x03,0x04 },
+ 16, 0xac10, 0, {0xb3,0x44,0x20,0x00,0x4a,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xac20, 0, {0x20,0x01,0x1e,0x20,0x17,0xa0,0x65,0xec,0x08,0x38,0x02,0xc2,0x41,0xb3,0x92,0x2b },
+ 16, 0xac30, 0, {0x64,0x0a,0x38,0x02,0x36,0x01,0xb7,0x90,0x2d,0xe0,0x03,0xf8,0x00,0x9a,0x00,0xb5 },
+ 16, 0xac40, 0, {0x80,0x2d,0xe0,0x89,0x78,0x12,0x1e,0x00,0xb7,0x80,0x29,0xe0,0x0a,0x78,0x02,0x08 },
+ 16, 0xac50, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x73,0xb0,0x24,0xc8 },
+ 16, 0xac60, 0, {0x4e,0x30,0x0a,0x80,0x02,0xe2,0x00,0x38,0x94,0x0e,0x31,0xa2,0xc8,0x00,0x73,0x00 },
+ 16, 0xac70, 0, {0x18,0xc4,0x05,0x00,0x03,0x00,0x00,0xf3,0x00,0x38,0xc0,0x07,0xb1,0x03,0x00,0x00 },
+ 16, 0xac80, 0, {0xf3,0x01,0x30,0x41,0x0e,0xb0,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xac90, 0, {0x40,0x1d,0xbd,0x00,0xef,0x10,0x26,0xc8,0x03,0xb1,0x03,0xe0,0x00,0xea,0x81,0x78 },
+ 16, 0xaca0, 0, {0xc5,0x0c,0xb5,0xe3,0xdc,0x00,0xc3,0x00,0x3e,0xc1,0x0f,0xf0,0x83,0xb0,0x00,0xff },
+ 16, 0xacb0, 0, {0x00,0x37,0xc0,0x0d,0xf4,0x03,0xe4,0x00,0xf7,0x00,0x3f,0x40,0x0d,0xf0,0x03,0xd0 },
+ 16, 0xacc0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xed,0x10,0xcb,0x28,0x3e,0xc0 },
+ 16, 0xacd0, 0, {0x0d,0xb0,0x13,0xac,0x10,0xfb,0x00,0x3a,0x80,0x04,0xb4,0x03,0xac,0x00,0xfb,0x04 },
+ 16, 0xace0, 0, {0x3e,0xc0,0x0f,0xa4,0xb3,0xe0,0x00,0xfb,0x80,0x32,0xc0,0x0f,0xb0,0x03,0xe8,0x00 },
+ 16, 0xacf0, 0, {0xfb,0x48,0xb2,0x80,0x0f,0xb0,0x43,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xad00, 0, {0x48,0x11,0x9c,0x02,0x87,0x44,0x38,0xc0,0x8d,0x30,0x02,0x4c,0x00,0xff,0x00,0x21 },
+ 16, 0xad10, 0, {0xc0,0x08,0x70,0x03,0x9c,0x00,0xb3,0x50,0x21,0xd4,0x4e,0x62,0x02,0xd0,0x00,0xbf },
+ 16, 0xad20, 0, {0x00,0x35,0xd4,0x09,0x70,0x22,0xd8,0x00,0xbf,0x22,0x21,0xc0,0x0b,0x72,0x02,0xd2 },
+ 16, 0xad30, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x40,0x87,0x80,0x2d,0xe0 },
+ 16, 0xad40, 0, {0x09,0x78,0x02,0xde,0x00,0xb6,0x80,0x29,0xa1,0x28,0x7a,0x32,0xde,0x00,0x37,0xa0 },
+ 16, 0xad50, 0, {0x25,0xe0,0x09,0x78,0x06,0xd2,0x00,0xb7,0x80,0x21,0xe8,0x0b,0x79,0x02,0xde,0x00 },
+ 16, 0xad60, 0, {0xb7,0x90,0x21,0xe0,0x0b,0x79,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xad70, 0, {0x48,0x14,0xcc,0x04,0x83,0x01,0x28,0xc0,0x89,0xb0,0x0a,0x4f,0x00,0xb2,0x00,0x20 },
+ 16, 0xad80, 0, {0xc4,0x88,0x30,0x16,0xcf,0x00,0xbb,0x04,0x20,0xc1,0x0a,0x32,0x06,0xc2,0x00,0xb3 },
+ 16, 0xad90, 0, {0x00,0x24,0xc0,0x09,0x30,0x42,0xef,0x10,0xb3,0x00,0x20,0xc0,0x0b,0x30,0x02,0xd2 },
+ 16, 0xada0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0x4a,0x00,0x3e,0x80 },
+ 16, 0xadb0, 0, {0x2d,0xa0,0x0b,0xaa,0x80,0xfe,0x00,0x2b,0x80,0x0c,0xa0,0x43,0xfb,0x30,0xfa,0x00 },
+ 16, 0xadc0, 0, {0x3e,0x80,0x0f,0xa0,0x83,0xfa,0x04,0xfe,0x18,0x22,0x80,0x0f,0xa0,0x03,0xfa,0x84 },
+ 16, 0xadd0, 0, {0xf2,0x00,0x33,0xa2,0x0f,0xa0,0x03,0xf2,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xade0, 0, {0x48,0x00,0xe0,0x00,0xf0,0x00,0x3e,0x00,0x2f,0x80,0x03,0xa0,0x20,0xfc,0x02,0x3e },
+ 16, 0xadf0, 0, {0x00,0x1f,0x84,0x03,0xa0,0x00,0xf8,0x40,0x3e,0x00,0x4f,0x80,0x01,0xe0,0x40,0xf8 },
+ 16, 0xae00, 0, {0x40,0x3e,0x00,0x0d,0x80,0x13,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0xae10, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc6,0x00,0xd9,0x00,0x36,0x40 },
+ 16, 0xae20, 0, {0x0f,0x90,0x0b,0x04,0x00,0xc9,0x00,0x36,0x68,0x6c,0x94,0x03,0xe4,0x20,0xb9,0x90 },
+ 16, 0xae30, 0, {0x36,0x40,0x0c,0x94,0x03,0xe4,0x00,0x29,0x80,0x3e,0x40,0x0f,0x90,0x03,0x24,0x20 },
+ 16, 0xae40, 0, {0xc9,0x00,0x36,0x40,0x0f,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xae50, 0, {0x80,0x04,0x66,0x50,0x89,0x00,0x20,0x50,0x08,0x90,0x02,0x24,0x09,0xd9,0x00,0x20 },
+ 16, 0xae60, 0, {0x48,0x48,0x90,0x06,0xe4,0x04,0x99,0xa0,0x22,0x40,0x0d,0xb8,0x22,0x64,0x00,0x09 },
+ 16, 0xae70, 0, {0x50,0x32,0x40,0x0b,0x90,0x02,0x27,0x90,0x89,0x40,0x2a,0x40,0x0b,0x90,0x02,0xe0 },
+ 16, 0xae80, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x00,0x99,0x00,0x66,0x42 },
+ 16, 0xae90, 0, {0x0a,0xd0,0x12,0x34,0x00,0x85,0x00,0x26,0x40,0x4a,0x90,0x02,0xe4,0x01,0xb9,0x01 },
+ 16, 0xaea0, 0, {0x24,0x40,0x58,0x90,0x12,0xc4,0x00,0x29,0x40,0x2e,0x40,0x0b,0x10,0x0a,0x24,0x80 },
+ 16, 0xaeb0, 0, {0x89,0x05,0x26,0x41,0x0b,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaec0, 0, {0x08,0x04,0x04,0x80,0x81,0x20,0x61,0x48,0x08,0x52,0x02,0x14,0x81,0x95,0x20,0x20 },
+ 16, 0xaed0, 0, {0x40,0x0a,0x36,0x02,0xc4,0x00,0xb1,0x20,0x00,0x48,0x41,0x10,0x42,0x44,0x01,0xa1 },
+ 16, 0xaee0, 0, {0x00,0x24,0x48,0x0b,0x12,0x12,0x04,0x80,0x81,0x20,0x28,0x48,0x0b,0x12,0x02,0xca },
+ 16, 0xaef0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xd8,0x50,0x36,0x00 },
+ 16, 0xaf00, 0, {0x0e,0x85,0x23,0x21,0x42,0x8c,0x54,0x34,0x14,0x0e,0x80,0x02,0xe1,0x40,0xf8,0x50 },
+ 16, 0xaf10, 0, {0x36,0x14,0x04,0x80,0x03,0xe1,0x44,0xe8,0x50,0x7e,0x15,0x0f,0x85,0x03,0x21,0x42 },
+ 16, 0xaf20, 0, {0x4a,0x00,0x36,0x14,0x0f,0x80,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaf30, 0, {0x98,0x1d,0xc4,0x40,0xf9,0x10,0x1e,0x44,0x4e,0x91,0x03,0xe4,0x40,0xf9,0x10,0x3f },
+ 16, 0xaf40, 0, {0xc0,0x0d,0x91,0x03,0xf4,0x00,0xd9,0x14,0x3e,0x44,0x0f,0x90,0x03,0x74,0x00,0xdd },
+ 16, 0xaf50, 0, {0x00,0x7a,0x44,0x0f,0x91,0x03,0xf4,0x40,0xf9,0x38,0x3f,0x44,0x0f,0x93,0x83,0xe7 },
+ 16, 0xaf60, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xf6,0x80,0xf9,0xa4,0x3f,0x68 },
+ 16, 0xaf70, 0, {0x0e,0x9e,0x43,0x67,0x80,0xd9,0xe4,0x3f,0x41,0x0f,0xd8,0x43,0x04,0x00,0xed,0xc0 },
+ 16, 0xaf80, 0, {0x36,0x40,0x0c,0x90,0x03,0xe4,0x00,0xd5,0x40,0x32,0x40,0x0c,0x90,0x03,0xf4,0x00 },
+ 16, 0xaf90, 0, {0xdd,0x00,0x32,0x40,0x2c,0x9a,0x03,0xc6,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xafa0, 0, {0x38,0x10,0xe0,0x00,0xe8,0xc0,0x2e,0x14,0x4d,0x8f,0x22,0x23,0xc0,0xf8,0xf0,0xaa },
+ 16, 0xafb0, 0, {0x00,0x0c,0x80,0x03,0xa2,0xa0,0xd8,0x82,0x22,0x00,0x08,0x80,0x02,0xe8,0x00,0xd8 },
+ 16, 0xafc0, 0, {0x80,0x2a,0x00,0x08,0x80,0x02,0xe8,0x08,0x88,0xa8,0x36,0x00,0x48,0x8a,0x82,0xce },
+ 16, 0xafd0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb1,0x48,0x2e,0x40 },
+ 16, 0xafe0, 0, {0x0a,0x12,0x22,0x44,0x00,0x91,0x04,0xa4,0x41,0x0a,0x94,0x06,0x24,0x00,0x91,0x42 },
+ 16, 0xaff0, 0, {0x24,0x41,0x09,0x10,0x02,0xe4,0x01,0x91,0x20,0x24,0x40,0x09,0x10,0x02,0xc4,0x01 },
+ 16, 0xb000, 0, {0x91,0x00,0x2c,0x40,0x09,0x14,0x02,0xc2,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb010, 0, {0x18,0x15,0xa4,0x00,0xa9,0x00,0x2e,0x40,0x48,0x10,0x02,0x24,0x00,0xb9,0x40,0xaa },
+ 16, 0xb020, 0, {0x40,0x18,0xb0,0x02,0xe4,0x08,0x99,0x00,0x22,0x40,0x19,0x90,0x46,0xe4,0x80,0x99 },
+ 16, 0xb030, 0, {0x04,0x2e,0x40,0x09,0x90,0x02,0xe4,0x01,0x99,0x04,0x26,0x50,0x09,0x90,0x02,0xc6 },
+ 16, 0xb040, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xe4,0x00,0xf9,0x06,0x3c,0x40 },
+ 16, 0xb050, 0, {0x0a,0x90,0x03,0x64,0x02,0xd9,0x00,0xb6,0x50,0x0e,0x90,0x23,0x26,0x01,0xf9,0x00 },
+ 16, 0xb060, 0, {0x36,0x40,0x29,0x94,0x83,0xe4,0x00,0xd9,0x48,0x36,0x40,0x0d,0x90,0x03,0xc7,0x00 },
+ 16, 0xb070, 0, {0xd1,0x07,0x3a,0x50,0xcd,0x90,0x03,0xe8,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb080, 0, {0x28,0x01,0xa4,0x08,0xe9,0x00,0x3e,0x40,0x8f,0x90,0x03,0xc4,0x08,0xf1,0x00,0x3a },
+ 16, 0xb090, 0, {0x68,0x8f,0x90,0x03,0xa4,0x41,0xf9,0x00,0xbe,0x40,0x0e,0x90,0x03,0xe4,0x00,0xf9 },
+ 16, 0xb0a0, 0, {0xc0,0x38,0x40,0x2e,0x90,0x03,0xe6,0x40,0xe9,0x00,0x3e,0x68,0x06,0x90,0x03,0xca },
+ 16, 0xb0b0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xd8,0x05,0x3e,0x00 },
+ 16, 0xb0c0, 0, {0x07,0x80,0x0b,0x20,0x00,0xe8,0x40,0x3e,0x10,0x0d,0x82,0x03,0x60,0x00,0xc8,0x00 },
+ 16, 0xb0d0, 0, {0xb2,0x00,0x8d,0x83,0x03,0xe0,0x00,0xd8,0x50,0x3a,0x00,0x1e,0x80,0x03,0xe1,0x24 },
+ 16, 0xb0e0, 0, {0xf8,0x00,0xb2,0x00,0x0f,0x80,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb0f0, 0, {0x28,0x05,0x38,0x00,0x8a,0x04,0x2f,0x84,0x6a,0xa0,0x0b,0xe8,0x08,0x8e,0x00,0x3d },
+ 16, 0xb100, 0, {0x80,0x88,0xec,0x03,0x68,0x10,0xa6,0x01,0x36,0x80,0x08,0xa8,0x00,0xc8,0x10,0x8e },
+ 16, 0xb110, 0, {0x10,0x22,0x80,0x08,0xa0,0x02,0xfb,0x20,0xbe,0x51,0x2a,0x80,0x0b,0xa0,0x02,0x82 },
+ 16, 0xb120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x41,0x21,0x93,0x00,0x2c,0xf0 },
+ 16, 0xb130, 0, {0x39,0x30,0x06,0x0c,0x00,0xa3,0x00,0x28,0x08,0x28,0xbc,0x02,0x2c,0x00,0x83,0x80 },
+ 16, 0xb140, 0, {0x2a,0xc0,0x08,0x30,0x00,0xcc,0x00,0x9a,0x80,0x28,0xc0,0x0a,0x30,0x02,0xcd,0x00 },
+ 16, 0xb150, 0, {0xb3,0x04,0x62,0xc1,0x0b,0x30,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb160, 0, {0xa0,0x01,0x1e,0x04,0x07,0x11,0x2c,0xd0,0x0a,0x32,0x22,0xdc,0xc1,0x87,0x00,0x6d },
+ 16, 0xb170, 0, {0xd0,0x08,0x34,0x02,0x7c,0x00,0xa7,0x08,0x24,0xc8,0x08,0x70,0x02,0xdc,0x80,0x0f },
+ 16, 0xb180, 0, {0x00,0x21,0xc4,0x08,0x73,0x06,0xdc,0x00,0xb2,0x00,0x61,0xc8,0x0b,0x3a,0x02,0x88 },
+ 16, 0xb190, 0, {0x04,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x0a,0x00,0x57,0x81,0x2d,0xa0 },
+ 16, 0xb1a0, 0, {0x2d,0x7c,0x02,0x3e,0x82,0xe3,0xe0,0x3b,0xe0,0x0c,0x78,0x03,0x1e,0x20,0xc7,0x80 },
+ 16, 0xb1b0, 0, {0xb9,0xe8,0x2c,0x78,0x03,0xff,0x80,0xd6,0x80,0x3b,0xec,0x02,0x7a,0x03,0xde,0x00 },
+ 16, 0xb1c0, 0, {0xf7,0x81,0x31,0xec,0x8f,0x7c,0x03,0x0a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb1d0, 0, {0x08,0x1d,0xac,0x00,0xfb,0x00,0x1e,0x80,0x23,0xb6,0x83,0xed,0xa0,0xdb,0x64,0x3e },
+ 16, 0xb1e0, 0, {0xc0,0x0e,0xb0,0x03,0xed,0xc0,0xf2,0x00,0x3e,0xd4,0x0a,0xb0,0x03,0xec,0x30,0xee },
+ 16, 0xb1f0, 0, {0x64,0x3e,0xc0,0x07,0xb0,0xc3,0xe8,0x00,0xfb,0x01,0x3e,0xc8,0x0f,0xb8,0x03,0xc2 },
+ 16, 0xb200, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xef,0x80,0x3b,0xe0 },
+ 16, 0xb210, 0, {0x0f,0xf8,0x63,0x7e,0x04,0xcf,0xc0,0xb7,0x20,0x0e,0xf8,0x03,0xfc,0x00,0xc7,0x80 },
+ 16, 0xb220, 0, {0x33,0xf0,0x0c,0xcc,0x03,0xfe,0x08,0xf7,0xc1,0x33,0xe0,0x4f,0xf8,0x03,0xb2,0x40 },
+ 16, 0xb230, 0, {0xff,0xa0,0x31,0xe6,0x0c,0xf8,0x03,0x10,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb240, 0, {0xa8,0x11,0x9c,0x00,0xef,0x02,0x21,0x40,0x2d,0x70,0x02,0x1c,0x00,0xf7,0x10,0x29 },
+ 16, 0xb250, 0, {0x40,0x08,0x70,0x22,0xfc,0xc0,0xa7,0x00,0x3d,0xc0,0x08,0x40,0x02,0xdc,0x00,0xb7 },
+ 16, 0xb260, 0, {0x40,0x21,0xc0,0x0b,0x70,0x02,0xda,0x80,0xb7,0x24,0x29,0xc6,0x48,0xf0,0x02,0x2a },
+ 16, 0xb270, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xa7,0x00,0x28,0x84 },
+ 16, 0xb280, 0, {0x0b,0x30,0x02,0x0c,0x00,0x93,0x00,0x25,0x80,0x0a,0x61,0x02,0xdc,0x01,0xa7,0x10 },
+ 16, 0xb290, 0, {0x24,0xc0,0x08,0x40,0x82,0xdc,0x00,0x9f,0x00,0x25,0xc4,0x0b,0x70,0x02,0x94,0x25 },
+ 16, 0xb2a0, 0, {0xb7,0x32,0x23,0xc4,0x1b,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb2b0, 0, {0x20,0x14,0xcc,0x0c,0xa3,0x00,0x20,0x00,0x29,0x30,0x0a,0x0c,0x00,0xa3,0x00,0x6c },
+ 16, 0xb2c0, 0, {0x00,0x08,0x10,0x42,0xcd,0x10,0xaa,0x00,0xac,0xc0,0x00,0x04,0x02,0xcd,0x00,0xbb },
+ 16, 0xb2d0, 0, {0x10,0x24,0xc0,0x03,0x30,0x42,0xc3,0x09,0xb3,0x00,0x2c,0xd0,0x0a,0x30,0x02,0x18 },
+ 16, 0xb2e0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0x80,0x00,0xef,0x00,0x3a,0x40 },
+ 16, 0xb2f0, 0, {0x07,0xf0,0x43,0x3c,0x00,0x9f,0xc0,0xb6,0x14,0x0e,0x80,0x06,0xfc,0x01,0xcb,0x01 },
+ 16, 0xb300, 0, {0x37,0xc0,0xac,0xb4,0x02,0xfc,0x00,0xd9,0x01,0x37,0xc0,0x4b,0xf0,0x13,0xae,0x08 },
+ 16, 0xb310, 0, {0xfb,0x00,0x33,0xd0,0x2e,0xf0,0x0b,0x2a,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb320, 0, {0x80,0x00,0xec,0x00,0xfb,0x05,0x3e,0x40,0x0f,0x30,0x03,0xac,0x14,0xfb,0xa0,0x3a },
+ 16, 0xb330, 0, {0xc0,0x0f,0x84,0x43,0xec,0x01,0xf9,0x40,0x3e,0xc0,0x0f,0xa2,0x03,0xec,0x21,0xf9 },
+ 16, 0xb340, 0, {0x00,0x3a,0xc0,0x0f,0xb0,0x03,0xe4,0x20,0xf0,0x00,0xba,0xc0,0x0d,0xb0,0x03,0xe0 },
+ 16, 0xb350, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf8,0x00,0xd7,0x01,0x35,0x68 },
+ 16, 0xb360, 0, {0x6d,0xf0,0x03,0x3c,0x01,0xe7,0x00,0x33,0xc0,0x0d,0xc0,0x03,0xfc,0x24,0xcf,0x02 },
+ 16, 0xb370, 0, {0x37,0xc0,0x0d,0xd2,0x02,0xfc,0x00,0xdf,0x01,0x33,0xc0,0x5e,0x70,0x33,0x1c,0x18 },
+ 16, 0xb380, 0, {0xcf,0x41,0x31,0xc2,0x0c,0xf0,0x03,0x40,0x40,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb390, 0, {0x81,0x00,0x6c,0x00,0x8b,0x00,0x22,0x52,0x2a,0xb0,0x03,0x6c,0x00,0xab,0x00,0x28 },
+ 16, 0xb3a0, 0, {0xc0,0x0a,0x8c,0x02,0xec,0x10,0x8b,0xe0,0x22,0xc0,0x0f,0x80,0x02,0xcc,0x00,0x8b },
+ 16, 0xb3b0, 0, {0x80,0x22,0xc0,0x08,0xb0,0x02,0x2a,0x10,0xd9,0x80,0x22,0xc0,0xc8,0xb0,0x02,0xe0 },
+ 16, 0xb3c0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x24,0x01,0x9b,0x00,0x26,0x80 },
+ 16, 0xb3d0, 0, {0x29,0xb0,0x62,0x0c,0x00,0xab,0x01,0x6a,0x00,0x08,0x98,0x02,0xcc,0x00,0x9b,0x83 },
+ 16, 0xb3e0, 0, {0x2e,0xc0,0xcb,0xb4,0x12,0xec,0x03,0x8b,0x80,0x28,0xc0,0x0a,0xb0,0x06,0xa2,0x00 },
+ 16, 0xb3f0, 0, {0x8b,0x02,0x62,0xc0,0x08,0xb0,0x02,0xe0,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb400, 0, {0x08,0x04,0x0c,0x01,0x83,0x14,0x20,0x00,0x0a,0x30,0x02,0x4c,0x00,0x83,0x00,0x2a },
+ 16, 0xb410, 0, {0x40,0x0a,0x10,0x00,0xcc,0x02,0x93,0x00,0x28,0xc0,0x0a,0x20,0x02,0xec,0x00,0x03 },
+ 16, 0xb420, 0, {0x00,0x20,0xc0,0x08,0x30,0x16,0x00,0x80,0x91,0x00,0x60,0xc0,0x08,0x30,0x02,0xc2 },
+ 16, 0xb430, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xdb,0x00,0x36,0x80 },
+ 16, 0xb440, 0, {0x2d,0xf0,0x03,0x3c,0x00,0xaf,0x00,0x3a,0x80,0x0d,0x80,0x03,0xfc,0x00,0x5b,0x00 },
+ 16, 0xb450, 0, {0x37,0xc0,0x09,0x90,0x03,0xfc,0x00,0xdf,0x00,0x33,0xc0,0x0a,0xf0,0x03,0xa4,0x20 },
+ 16, 0xb460, 0, {0xcb,0x00,0xb3,0xc0,0x8c,0xb0,0x03,0x40,0x02,0x10,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb470, 0, {0xa0,0x1d,0xfc,0x04,0xff,0x20,0x0f,0x00,0x27,0xf0,0x03,0xfc,0x00,0xff,0x00,0x2d },
+ 16, 0xb480, 0, {0x00,0x0b,0xd0,0x27,0xfc,0x00,0xef,0x00,0x37,0xc0,0x0f,0xc0,0x43,0xfc,0x00,0xff },
+ 16, 0xb490, 0, {0x00,0x3f,0xc0,0x0d,0xf0,0x0b,0xe0,0x00,0xf5,0x00,0x3f,0xc0,0x1f,0xf0,0x03,0xe8 },
+ 16, 0xb4a0, 0, {0x07,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xf4,0xc0,0xfc,0x22,0x7f,0xc0 },
+ 16, 0xb4b0, 0, {0x0c,0xd0,0x43,0x36,0x00,0xc4,0x81,0x34,0xc0,0x1c,0x89,0x07,0xf2,0x80,0xcf,0x80 },
+ 16, 0xb4c0, 0, {0x33,0x60,0x0f,0x79,0x03,0x3c,0xe0,0xcf,0x08,0x33,0x48,0x0d,0xc4,0x03,0xf0,0x50 },
+ 16, 0xb4d0, 0, {0xdc,0x90,0x37,0xcc,0x0f,0xf8,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb4e0, 0, {0x80,0x10,0xe9,0x90,0xb8,0x80,0x7e,0xe4,0x88,0x99,0x0a,0x26,0x08,0xa9,0x80,0x22 },
+ 16, 0xb4f0, 0, {0xf4,0x2c,0x99,0x03,0xa7,0x02,0x89,0x80,0x22,0x34,0x0b,0x9a,0x03,0x7d,0x00,0xdf },
+ 16, 0xb500, 0, {0x48,0x2b,0x60,0x08,0x05,0x02,0xe5,0x00,0x82,0x20,0x22,0xc4,0x8b,0xb0,0x02,0xe0 },
+ 16, 0xb510, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc5,0x00,0xb0,0x10,0x2c,0xc0 },
+ 16, 0xb520, 0, {0x2a,0x00,0x02,0xa4,0x08,0xa8,0x04,0xe0,0x80,0x0b,0x00,0x02,0xc4,0x41,0xb2,0x04 },
+ 16, 0xb530, 0, {0xa4,0x0a,0x0b,0xb0,0x02,0x8c,0x81,0x83,0x20,0x60,0x50,0x98,0x12,0x12,0x8b,0x80 },
+ 16, 0xb540, 0, {0x89,0x00,0x2c,0xc8,0x0b,0x30,0x02,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb550, 0, {0xc0,0x11,0xac,0x20,0xbb,0x02,0x2a,0xc0,0x0a,0x88,0x02,0xa4,0x08,0xa9,0x80,0xa2 },
+ 16, 0xb560, 0, {0xe1,0x1b,0x9c,0x22,0xe6,0x00,0xb8,0x40,0x26,0x30,0x0b,0x90,0x02,0xcc,0x01,0x93 },
+ 16, 0xb570, 0, {0x04,0x2a,0x40,0x39,0x98,0x82,0xec,0x14,0x8b,0x65,0x2a,0xc0,0x0b,0xb2,0x02,0xf8 },
+ 16, 0xb580, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe7,0x00,0xb8,0x48,0x2e,0x00 },
+ 16, 0xb590, 0, {0x0e,0x88,0x43,0x84,0x00,0xe3,0xc1,0x36,0xe8,0x0f,0x9c,0x12,0xe2,0x80,0xf3,0xc0 },
+ 16, 0xb5a0, 0, {0x36,0x70,0x5f,0xa8,0x23,0xac,0x01,0xcb,0x04,0x22,0x40,0x4d,0x84,0x03,0xe2,0x00 },
+ 16, 0xb5b0, 0, {0xd8,0x00,0x3e,0xc0,0x0f,0x90,0x03,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb5c0, 0, {0xe0,0x01,0xb3,0x09,0xfe,0x10,0x3e,0x81,0x0d,0xc0,0x03,0x74,0x0c,0xff,0x00,0x3d },
+ 16, 0xb5d0, 0, {0xc1,0x8c,0xd0,0x83,0x14,0x00,0xcd,0x20,0x3a,0x40,0x0d,0xca,0x01,0x7c,0x00,0xff },
+ 16, 0xb5e0, 0, {0x00,0x1f,0x40,0x0e,0xc0,0x23,0xf2,0x46,0xfe,0x84,0x37,0xc0,0x0f,0xd8,0x03,0xf8 },
+ 16, 0xb5f0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xdd,0x02,0x3d,0x40 },
+ 16, 0xb600, 0, {0x0e,0x90,0x03,0xac,0x00,0xeb,0x48,0x3e,0xd0,0x0c,0x80,0x63,0xa2,0x08,0xca,0x00 },
+ 16, 0xb610, 0, {0x32,0x08,0x0c,0xb0,0x03,0xac,0x08,0xeb,0x00,0x3e,0x40,0x0c,0xd4,0x83,0x58,0x20 },
+ 16, 0xb620, 0, {0xf9,0x42,0x32,0xc0,0x0c,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb630, 0, {0xc8,0x05,0x28,0x02,0xdb,0x00,0x2e,0xe0,0x28,0x3a,0x02,0x2e,0x00,0xdb,0x60,0x76 },
+ 16, 0xb640, 0, {0xe0,0x0d,0x8c,0x02,0xe0,0x00,0x88,0x02,0x36,0x58,0x68,0x15,0x83,0x7c,0x08,0xbf },
+ 16, 0xb650, 0, {0x00,0x2d,0x60,0x08,0x90,0x02,0xa9,0x00,0xb3,0x05,0x23,0xc0,0x08,0xb0,0x02,0xf2 },
+ 16, 0xb660, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x10,0x80,0x00,0x0c,0xc1 },
+ 16, 0xb670, 0, {0x08,0x1c,0x82,0x06,0x00,0x93,0xc0,0x20,0xf6,0x0a,0x20,0x02,0x08,0x00,0x93,0x00 },
+ 16, 0xb680, 0, {0x24,0x60,0x09,0x3c,0x02,0x0c,0x00,0x83,0x00,0x2c,0x60,0x09,0x01,0x12,0x00,0x40 },
+ 16, 0xb690, 0, {0xb0,0x00,0xe0,0xc0,0x08,0x30,0x02,0x70,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb6a0, 0, {0x20,0x41,0x0a,0x40,0x86,0x81,0x2d,0xe0,0x58,0x18,0x0a,0x16,0xa0,0x97,0x80,0x25 },
+ 16, 0xb6b0, 0, {0xe9,0x19,0x78,0x82,0xd6,0x00,0x97,0x80,0x25,0xa0,0x19,0xf8,0x02,0x5e,0x00,0xb7 },
+ 16, 0xb6c0, 0, {0x80,0x2d,0x60,0x28,0x48,0x12,0x96,0x00,0xb4,0x80,0x21,0xe0,0x28,0x78,0x02,0xc8 },
+ 16, 0xb6d0, 0, {0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x81,0x30,0x3c,0xc2 },
+ 16, 0xb6e0, 0, {0x0e,0x00,0x02,0x84,0x00,0xe3,0x40,0x28,0xe8,0x4c,0x29,0x03,0x0c,0x00,0xd3,0x00 },
+ 16, 0xb6f0, 0, {0x34,0xc4,0x0d,0x31,0x03,0x8c,0x08,0xe3,0x00,0x3c,0x46,0x0c,0x20,0x03,0x00,0x80 },
+ 16, 0xb700, 0, {0xf2,0x00,0x32,0xc0,0x0c,0x30,0x03,0xd2,0x02,0x10,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb710, 0, {0x40,0x19,0xb8,0x00,0xff,0x10,0x2f,0xc0,0x0f,0xc0,0x23,0xc4,0x80,0x7f,0x10,0x3e },
+ 16, 0xb720, 0, {0xc0,0x0f,0xb1,0x03,0xdc,0x00,0xe7,0x00,0x3f,0x80,0x06,0xf1,0x43,0xfc,0x00,0xff },
+ 16, 0xb730, 0, {0x08,0x7d,0x50,0x0e,0xe1,0x23,0xb4,0x08,0xfe,0x10,0x3f,0xc4,0x0f,0xf0,0x03,0xd0 },
+ 16, 0xb740, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x02,0xcc,0x00,0x3e,0x00 },
+ 16, 0xb750, 0, {0x2c,0xc0,0x03,0x04,0x01,0xcb,0x00,0x33,0x60,0x2c,0x90,0x13,0xe8,0x00,0x73,0x00 },
+ 16, 0xb760, 0, {0xb2,0xc1,0x0f,0xa0,0x03,0xec,0x80,0xfb,0x28,0x3e,0x54,0x1f,0xd0,0x03,0xfe,0x02 },
+ 16, 0xb770, 0, {0xc9,0x80,0x32,0xc0,0x0f,0xb0,0x03,0xca,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb780, 0, {0x48,0x11,0x80,0x00,0x86,0x00,0x2d,0x80,0x08,0x20,0x02,0x14,0x08,0x87,0x00,0x29 },
+ 16, 0xb790, 0, {0x40,0x08,0x70,0x02,0xdc,0x00,0xb7,0x00,0x21,0xc0,0x0b,0x60,0x02,0x5c,0xa0,0x97 },
+ 16, 0xb7a0, 0, {0x20,0x2d,0x48,0x0b,0x50,0x02,0xdc,0x10,0x8d,0x00,0x21,0xc8,0x0b,0x70,0x02,0xd2 },
+ 16, 0xb7b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9f,0x00,0x85,0x81,0x2c,0x60 },
+ 16, 0xb7c0, 0, {0x18,0x58,0x02,0xde,0x20,0xb7,0x82,0x28,0x60,0x5a,0x78,0x52,0xde,0x10,0xbf,0x80 },
+ 16, 0xb7d0, 0, {0x21,0xe0,0x4b,0x78,0x06,0xde,0x40,0xb7,0xa0,0x2d,0x69,0x9b,0x78,0x12,0xce,0x00 },
+ 16, 0xb7e0, 0, {0x87,0x80,0xe1,0xe4,0x0b,0x78,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb7f0, 0, {0x48,0x14,0xee,0x00,0x83,0x00,0x2c,0xc2,0x08,0x36,0x02,0x8c,0x08,0x83,0xf0,0x68 },
+ 16, 0xb800, 0, {0x40,0x0a,0x3e,0x02,0xcd,0x40,0xb3,0x00,0x20,0xe0,0x0b,0x32,0x06,0x4c,0x00,0x9b },
+ 16, 0xb810, 0, {0x00,0x0c,0x40,0x0b,0x30,0x02,0xcd,0x80,0x83,0x08,0x20,0xc0,0x0b,0xb1,0x02,0xda },
+ 16, 0xb820, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x00,0xce,0x08,0x3f,0xb0 },
+ 16, 0xb830, 0, {0x0c,0xe4,0x23,0xda,0x02,0xde,0x40,0xbb,0xb2,0x0e,0xe2,0x43,0xfa,0x00,0xfe,0x00 },
+ 16, 0xb840, 0, {0x33,0x90,0x0b,0xe0,0x03,0xe8,0x00,0xfa,0x00,0x3e,0x81,0x0b,0xe0,0x13,0xf9,0x08 },
+ 16, 0xb850, 0, {0xce,0x40,0x32,0x80,0x0f,0xa8,0x03,0xfa,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb860, 0, {0x48,0x00,0xe0,0x24,0x98,0x08,0x3c,0x04,0x0f,0x00,0x0b,0x60,0x00,0xf8,0x40,0x2e },
+ 16, 0xb870, 0, {0x03,0x0d,0x80,0x03,0xe0,0x00,0xf8,0x00,0x3e,0x06,0x0b,0x80,0x03,0xe0,0x00,0xd8 },
+ 16, 0xb880, 0, {0x00,0x3c,0x00,0x03,0x8c,0x23,0xe1,0x00,0xf8,0x00,0x7e,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0xb890, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x02,0xc9,0x00,0x3e,0x40 },
+ 16, 0xb8a0, 0, {0x8c,0x90,0x03,0x25,0x00,0xe9,0x80,0x32,0x44,0x0f,0x94,0x02,0xe4,0x20,0xf9,0x00 },
+ 16, 0xb8b0, 0, {0x32,0x70,0x0f,0x9a,0x43,0xe4,0x00,0xf9,0x00,0x32,0x40,0x0c,0x10,0x33,0x24,0x10 },
+ 16, 0xb8c0, 0, {0xf9,0x01,0x3e,0x40,0x0f,0x90,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb8d0, 0, {0x80,0x04,0x64,0x00,0x89,0x82,0x2e,0x40,0x28,0x90,0x02,0x24,0x82,0x81,0xc0,0xa2 },
+ 16, 0xb8e0, 0, {0x70,0x0b,0x9c,0x02,0xe4,0x00,0x31,0x42,0xa2,0x60,0x0b,0x94,0x82,0xe4,0x00,0xb9 },
+ 16, 0xb8f0, 0, {0x00,0x2a,0x40,0x08,0x94,0xa2,0x25,0x00,0xb9,0x00,0x2e,0x40,0x0b,0x90,0x0a,0x20 },
+ 16, 0xb900, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x89,0x64,0x2e,0x40 },
+ 16, 0xb910, 0, {0x08,0x90,0x42,0xa4,0x00,0x89,0x60,0x22,0x42,0x0b,0x90,0x02,0xe6,0x00,0xb9,0x80 },
+ 16, 0xb920, 0, {0x22,0x40,0x0b,0x90,0x02,0xa4,0x04,0xb9,0x00,0x22,0x40,0x28,0x90,0x02,0x24,0x04 },
+ 16, 0xb930, 0, {0xb9,0x00,0x2e,0x40,0x0b,0x90,0x02,0x0e,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb940, 0, {0x08,0x04,0x05,0x80,0x81,0x00,0x2c,0xc1,0x48,0x10,0x02,0xa4,0x02,0x81,0x00,0x20 },
+ 16, 0xb950, 0, {0x40,0x83,0x34,0x02,0xc4,0x00,0xbb,0x00,0x20,0xd0,0x0b,0x14,0x02,0xc4,0x80,0xb1 },
+ 16, 0xb960, 0, {0x20,0xa0,0x68,0x18,0x14,0x1a,0x0d,0x00,0xb1,0x40,0x2c,0x50,0x0b,0x10,0x02,0x0a },
+ 16, 0xb970, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xc8,0x00,0x3e,0x00 },
+ 16, 0xb980, 0, {0x8c,0x80,0x0b,0xa0,0x04,0xe8,0x00,0x32,0x00,0x07,0x80,0x03,0xe0,0x00,0xf8,0x00 },
+ 16, 0xb990, 0, {0x32,0x00,0x1f,0x80,0x03,0xa1,0x40,0xf8,0x50,0x32,0x00,0x0c,0x80,0x03,0x20,0x00 },
+ 16, 0xb9a0, 0, {0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb9b0, 0, {0x98,0x1d,0xf4,0x46,0xfd,0x40,0x3f,0x50,0x23,0xd4,0x13,0x74,0x04,0xf5,0x02,0x3f },
+ 16, 0xb9c0, 0, {0x50,0x0f,0xd4,0x03,0xfd,0x00,0xbd,0x00,0x2f,0x50,0x0f,0xd0,0x03,0xe4,0x40,0xf9 },
+ 16, 0xb9d0, 0, {0x10,0x3f,0x44,0x0f,0xd4,0x03,0xf5,0x08,0xfd,0x06,0x3e,0x50,0x0f,0xd2,0x83,0xe6 },
+ 16, 0xb9e0, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0x40,0xed,0x04,0x3e,0x48 },
+ 16, 0xb9f0, 0, {0x0c,0xb2,0x83,0xf4,0x00,0xc1,0x00,0x32,0x40,0x8c,0xd0,0x03,0x34,0x00,0xfd,0x00 },
+ 16, 0xba00, 0, {0x37,0x40,0x0f,0xd0,0x03,0xe6,0x20,0xf9,0x88,0x3d,0x62,0x0c,0xd8,0x03,0xfe,0x24 },
+ 16, 0xba10, 0, {0xc1,0x00,0x3e,0x78,0x0f,0xd0,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xba20, 0, {0x38,0x10,0xe1,0x00,0x88,0x40,0x2e,0x10,0x08,0xc4,0x23,0xa0,0x08,0x88,0x06,0x2a },
+ 16, 0xba30, 0, {0x14,0x08,0x80,0x03,0x60,0x04,0xb8,0x00,0x22,0x00,0x0b,0x80,0x02,0xe2,0x00,0xb8 },
+ 16, 0xba40, 0, {0x80,0x2e,0x00,0x08,0x8c,0x02,0xe3,0x80,0x88,0x02,0x2e,0x38,0x0b,0x88,0x02,0x0e },
+ 16, 0xba50, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x80,0xa1,0xc0,0x2d,0x70 },
+ 16, 0xba60, 0, {0x08,0x50,0x42,0xc4,0x00,0xa9,0x00,0x20,0xe0,0x2a,0x10,0x0a,0x04,0x10,0xb1,0x00 },
+ 16, 0xba70, 0, {0x24,0x40,0x4b,0x10,0x06,0xc4,0x20,0xb1,0x08,0x6e,0x40,0x0b,0x16,0x82,0xc4,0x20 },
+ 16, 0xba80, 0, {0x81,0x00,0x2c,0x50,0x0b,0x92,0x82,0x52,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xba90, 0, {0x18,0x11,0xa4,0x00,0xa9,0x01,0x2e,0x40,0x28,0xd0,0x20,0xa4,0x04,0xa9,0x00,0x2a },
+ 16, 0xbaa0, 0, {0x40,0x1a,0xb0,0x12,0x24,0x00,0xb9,0x0c,0x22,0x42,0x0b,0x94,0x02,0xe4,0x00,0xb9 },
+ 16, 0xbab0, 0, {0x00,0x6e,0x40,0x0b,0x96,0x02,0xe4,0x11,0x89,0x20,0x6e,0x40,0x0b,0x90,0x02,0x46 },
+ 16, 0xbac0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0xc0,0xa9,0xc0,0x3e,0x50 },
+ 16, 0xbad0, 0, {0x08,0x9c,0x83,0xe4,0x02,0xe9,0x00,0xb2,0x40,0x2a,0x92,0x12,0x26,0x40,0xf9,0x40 },
+ 16, 0xbae0, 0, {0x36,0x70,0x0f,0x94,0x03,0xe4,0x04,0xf9,0x01,0x3c,0x40,0x0f,0x98,0x03,0xe6,0x02 },
+ 16, 0xbaf0, 0, {0xc9,0x22,0x3e,0x40,0x0f,0x10,0x02,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbb00, 0, {0x28,0x01,0x86,0x04,0xd9,0x40,0x1c,0x40,0x0f,0x92,0x23,0xa4,0xb0,0xdb,0x04,0x3c },
+ 16, 0xbb10, 0, {0xc0,0x0d,0x9a,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x44,0x0f,0x90,0x03,0xe4,0x00,0xf9 },
+ 16, 0xbb20, 0, {0x00,0x3e,0x42,0x2c,0x90,0x23,0xe4,0x80,0xf9,0x00,0x3e,0x40,0x8f,0x92,0x03,0x92 },
+ 16, 0xbb30, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x00,0xc8,0x20,0x32,0x00 },
+ 16, 0xbb40, 0, {0x4c,0xc0,0x8b,0x20,0x02,0xc8,0x31,0x32,0x20,0x2d,0x84,0x03,0xe1,0x04,0xf8,0x48 },
+ 16, 0xbb50, 0, {0xba,0x00,0x0f,0x89,0x03,0xe0,0x00,0xc8,0x00,0x32,0x00,0x0d,0x81,0x13,0x20,0x10 },
+ 16, 0xbb60, 0, {0xf8,0x00,0x3a,0x00,0x0f,0x81,0x23,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbb70, 0, {0x28,0x05,0x28,0x00,0x0e,0x40,0x22,0x80,0x28,0xa4,0x02,0x19,0x00,0x52,0x80,0xa2 },
+ 16, 0xbb80, 0, {0x80,0x4d,0xed,0x82,0xe8,0x00,0xb6,0x42,0x23,0xbd,0x0b,0xe8,0x02,0xe8,0x04,0xda },
+ 16, 0xbb90, 0, {0x00,0x37,0x80,0x08,0xe0,0x02,0x3a,0x20,0xba,0x00,0x22,0x80,0x0b,0xa8,0x0a,0x0a },
+ 16, 0xbba0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x83,0x80,0x60,0xc0 },
+ 16, 0xbbb0, 0, {0x08,0x29,0x02,0x0d,0x00,0x92,0x40,0x24,0xc0,0x08,0xb4,0x02,0xcc,0x00,0xb3,0x00 },
+ 16, 0xbbc0, 0, {0x68,0xe0,0x1b,0x30,0x02,0xcc,0x00,0x93,0x01,0x24,0xc0,0x69,0x38,0x02,0x6c,0x00 },
+ 16, 0xbbd0, 0, {0xb3,0x00,0x2c,0xc0,0x0b,0x30,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbbe0, 0, {0xa0,0x01,0x1c,0x40,0x83,0xc0,0x20,0x40,0x08,0x28,0x06,0x9c,0x18,0x9c,0x02,0x24 },
+ 16, 0xbbf0, 0, {0xc0,0x09,0x70,0x02,0xd4,0x00,0xb7,0x00,0x21,0xc0,0x0b,0x70,0x02,0xce,0x40,0x97 },
+ 16, 0xbc00, 0, {0xb0,0x25,0x40,0x08,0x78,0x1a,0x58,0x00,0xbf,0xa2,0x65,0xc8,0x0b,0x78,0x02,0x20 },
+ 16, 0xbc10, 0, {0x04,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x0e,0x02,0x87,0x80,0xb1,0xa0 },
+ 16, 0xbc20, 0, {0x0c,0x68,0x03,0x1a,0x08,0xd6,0x92,0x35,0xe4,0x28,0x78,0x42,0xd6,0x10,0xf5,0x80 },
+ 16, 0xbc30, 0, {0x39,0xa0,0x0f,0x78,0x23,0xde,0x30,0xd3,0xa2,0x35,0xa0,0x4d,0xe8,0x03,0x5e,0x00 },
+ 16, 0xbc40, 0, {0xf7,0xd0,0x3d,0xf8,0x0f,0xf0,0x03,0x22,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbc50, 0, {0x08,0x1d,0xac,0x00,0xfb,0x04,0x3e,0x00,0x0b,0xa0,0x03,0x48,0x04,0xfa,0x41,0x3a },
+ 16, 0xbc60, 0, {0x50,0x0f,0xb0,0x03,0xe4,0x00,0xf1,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0xed,0x88,0xfb },
+ 16, 0xbc70, 0, {0x4d,0x3e,0x00,0x0f,0xf0,0x03,0xbc,0x08,0xfb,0x20,0x3a,0xc0,0x0f,0xb0,0x03,0xc2 },
+ 16, 0xbc80, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xdc,0x80,0xb3,0xe0 },
+ 16, 0xbc90, 0, {0x0c,0xd8,0x03,0xce,0x00,0xc8,0xa0,0x31,0xa0,0x8d,0xe9,0x03,0xbe,0x00,0xb2,0x80 },
+ 16, 0xbca0, 0, {0x33,0xe0,0x0c,0xe8,0x43,0x7e,0x04,0x0f,0x81,0x31,0xe4,0x0c,0xd8,0x03,0xf6,0x00 },
+ 16, 0xbcb0, 0, {0xff,0x80,0x3f,0xe0,0x0f,0xf8,0x03,0x00,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbcc0, 0, {0xa8,0x11,0x9c,0x00,0xb4,0x40,0x35,0x40,0x08,0x50,0x82,0xde,0x80,0xd4,0x90,0x21 },
+ 16, 0xbcd0, 0, {0xe0,0x0d,0x51,0x02,0xd4,0x40,0xb6,0xb0,0x2b,0x90,0x0e,0xe5,0x02,0x9c,0x40,0xd7 },
+ 16, 0xbce0, 0, {0x22,0x19,0x5c,0x0d,0x70,0x02,0xd8,0x00,0xb7,0x20,0x2d,0xc0,0x0b,0xf0,0x03,0x6a },
+ 16, 0xbcf0, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0x93,0x10,0x21,0x80 },
+ 16, 0xbd00, 0, {0x08,0x58,0x02,0xdc,0xc0,0x94,0x00,0x23,0xd0,0x08,0x70,0xa0,0xd4,0x20,0xb5,0x02 },
+ 16, 0xbd10, 0, {0x29,0x80,0x09,0x60,0x82,0x0c,0x00,0x87,0x02,0x25,0xc0,0x19,0x40,0x02,0xd4,0x00 },
+ 16, 0xbd20, 0, {0xb7,0x00,0x6d,0xc0,0x0b,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbd30, 0, {0x20,0x14,0xec,0x00,0xb3,0xc0,0x20,0x01,0x48,0x18,0x02,0xcc,0x02,0x81,0x44,0xa0 },
+ 16, 0xbd40, 0, {0xc0,0x89,0x38,0x02,0xc7,0x80,0xb1,0x00,0x2c,0x09,0x4a,0x00,0x62,0xac,0x09,0x93 },
+ 16, 0xbd50, 0, {0x01,0x28,0x40,0x19,0x30,0x02,0xcd,0x10,0xb3,0x90,0x2c,0xc0,0x0b,0x30,0x02,0xc8 },
+ 16, 0xbd60, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x20,0xdb,0x62,0x22,0xe0 },
+ 16, 0xbd70, 0, {0x6c,0xa0,0x03,0xe4,0x00,0x98,0x00,0x32,0xc0,0xec,0x98,0x23,0xae,0x08,0xfb,0x08 },
+ 16, 0xbd80, 0, {0x3a,0x78,0x09,0x90,0x03,0x7c,0x10,0xcf,0x00,0x26,0x40,0x0c,0xb0,0x03,0xec,0x00 },
+ 16, 0xbd90, 0, {0xff,0x80,0x3f,0xc0,0x0f,0x90,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbda0, 0, {0x80,0x00,0xec,0x20,0xfb,0x48,0x3c,0x61,0x0f,0xa0,0x43,0xed,0x00,0xf8,0x24,0x3e },
+ 16, 0xbdb0, 0, {0x50,0x0f,0x90,0x83,0xe4,0x00,0xfb,0x00,0x3a,0x50,0x0f,0x80,0x43,0xec,0x08,0xfb },
+ 16, 0xbdc0, 0, {0x00,0x3e,0x40,0x0f,0x40,0x03,0xf0,0x00,0xfb,0x00,0x3e,0xc1,0x0f,0x90,0x03,0x60 },
+ 16, 0xbdd0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xdd,0xa0,0x32,0x80 },
+ 16, 0xbde0, 0, {0x0c,0xe0,0x01,0xfc,0x00,0xdc,0x91,0x39,0xc0,0x3c,0x40,0x03,0x34,0x00,0xff,0x80 },
+ 16, 0xbdf0, 0, {0x3f,0x00,0x0f,0xd0,0x07,0xfc,0x00,0xcb,0x00,0x3d,0x40,0x0c,0xe0,0x03,0x38,0x20 },
+ 16, 0xbe00, 0, {0xcf,0x02,0x3d,0xc0,0x0c,0xd0,0x03,0x08,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbe10, 0, {0x81,0x04,0x6c,0x00,0x01,0x40,0x22,0x00,0x28,0xa0,0x02,0xce,0x86,0x83,0x64,0x22 },
+ 16, 0xbe20, 0, {0xf4,0x08,0x8c,0x0f,0x64,0x00,0xbb,0x10,0x2e,0x60,0x0b,0x9c,0x03,0xac,0x01,0xdb },
+ 16, 0xbe30, 0, {0x00,0x3e,0x60,0x08,0x8f,0x02,0x23,0x40,0x8b,0x00,0x3a,0xc0,0x0d,0x10,0x43,0x68 },
+ 16, 0xbe40, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x99,0x00,0xa2,0xc0 },
+ 16, 0xbe50, 0, {0x08,0x90,0x02,0xa6,0x07,0x98,0x00,0x02,0xc2,0x48,0x88,0x02,0x2c,0x00,0xba,0x02 },
+ 16, 0xbe60, 0, {0x6e,0x60,0x0a,0x98,0x02,0xec,0x00,0x8b,0x01,0x2e,0x60,0x08,0x90,0x02,0x05,0x00 },
+ 16, 0xbe70, 0, {0x8b,0x00,0x2e,0xc0,0x08,0xb1,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbe80, 0, {0x08,0x04,0x0c,0x10,0x81,0x00,0x20,0x40,0x28,0x10,0x26,0xcc,0x80,0x80,0x20,0xa0 },
+ 16, 0xbe90, 0, {0xcc,0x18,0x14,0x42,0x04,0x00,0xb2,0x20,0x6c,0x40,0x0b,0x00,0x02,0x8c,0x00,0x83 },
+ 16, 0xbea0, 0, {0x00,0x28,0x40,0x28,0x00,0x02,0x00,0x00,0x83,0x00,0x28,0xc0,0x09,0xb0,0x02,0x42 },
+ 16, 0xbeb0, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xd9,0x00,0x22,0x80 },
+ 16, 0xbec0, 0, {0x0c,0x90,0x03,0xac,0x80,0xda,0x29,0x2a,0xd2,0x28,0x80,0x02,0x24,0x00,0xfb,0x20 },
+ 16, 0xbed0, 0, {0x3e,0x00,0x0f,0x90,0x02,0xfc,0x00,0x8f,0x00,0x2e,0x40,0x0c,0x80,0x0b,0x20,0x02 },
+ 16, 0xbee0, 0, {0xcf,0x00,0x3e,0xc0,0x0c,0xb0,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbef0, 0, {0xa0,0x1d,0xfc,0x00,0xfd,0x00,0x3f,0x00,0x0f,0xd0,0x63,0xfc,0x49,0xf5,0x00,0x3e },
+ 16, 0xbf00, 0, {0xc0,0x0b,0xc0,0x01,0xf4,0x00,0x7f,0x40,0x3f,0x40,0x1f,0xd0,0x03,0xbc,0x00,0xff },
+ 16, 0xbf10, 0, {0x00,0x3f,0x40,0x0f,0xc0,0x03,0xf0,0x00,0xff,0x00,0x3b,0xc0,0x0f,0xf0,0x03,0xe8 },
+ 16, 0xbf20, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xf2,0x40,0xec,0xa0,0x3f,0xe0 },
+ 16, 0xbf30, 0, {0x0d,0x48,0x03,0x7d,0x80,0xf4,0x80,0x33,0x6c,0x0e,0xc8,0x03,0x32,0x00,0xdd,0x90 },
+ 16, 0xbf40, 0, {0x3b,0xa0,0x2d,0xf0,0x03,0xfc,0xc0,0xff,0x00,0x3b,0xe0,0x8e,0xf0,0x03,0x3c,0x04 },
+ 16, 0xbf50, 0, {0xec,0x60,0x31,0x00,0x0c,0xf0,0x03,0xb0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbf60, 0, {0x80,0x10,0xec,0x00,0xd9,0xc1,0x2e,0xe1,0x0d,0x88,0x02,0x3c,0x80,0xf8,0x80,0x36 },
+ 16, 0xbf70, 0, {0x7d,0x18,0xa0,0x02,0x28,0xb0,0xea,0x20,0x22,0x20,0x08,0x77,0x02,0xfd,0x50,0xbb },
+ 16, 0xbf80, 0, {0x80,0x22,0x40,0x0b,0xf4,0x42,0x3d,0x80,0x88,0x31,0x22,0x12,0x08,0xf6,0x02,0xe0 },
+ 16, 0xbf90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0x80,0x11,0x2e,0xc1 },
+ 16, 0xbfa0, 0, {0x08,0x00,0x02,0x4d,0x80,0xb8,0x00,0x20,0x00,0x0a,0x02,0x82,0x00,0x00,0x99,0x20 },
+ 16, 0xbfb0, 0, {0x22,0xc0,0x09,0x30,0x82,0xcc,0x00,0xb3,0x00,0x28,0xca,0x0b,0x34,0x82,0x0d,0x20 },
+ 16, 0xbfc0, 0, {0x80,0x00,0xa0,0x8c,0x08,0x34,0x82,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbfd0, 0, {0xc0,0x15,0xac,0x40,0x99,0x80,0x2e,0xc2,0x09,0x94,0x02,0x2c,0x00,0xa9,0x80,0x26 },
+ 16, 0xbfe0, 0, {0x60,0x08,0x38,0x42,0x22,0x20,0xba,0x41,0x62,0x46,0x3b,0xb0,0x02,0xec,0x01,0xbb },
+ 16, 0xbff0, 0, {0x80,0x22,0x40,0x0b,0xb0,0x46,0x0c,0x18,0x88,0xc0,0x22,0x22,0x08,0xb0,0x06,0xf0 },
+ 16, 0xc000, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xcc,0x00,0xc9,0x81,0x3c,0xc1 },
+ 16, 0xc010, 0, {0x0c,0xa9,0x23,0x6c,0x00,0xb2,0x80,0x32,0x78,0x0a,0x8a,0x0b,0x26,0x00,0x99,0x01 },
+ 16, 0xc020, 0, {0x30,0xe0,0x0d,0xb0,0x03,0xec,0x00,0xb9,0x00,0x3a,0xc0,0x1e,0xb0,0x03,0x2c,0x00 },
+ 16, 0xc030, 0, {0xcb,0x80,0x32,0x61,0x0c,0xb0,0x13,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc040, 0, {0xe0,0x01,0xbc,0x10,0xdd,0x00,0x3f,0xc2,0x0f,0xe8,0x03,0xac,0x00,0xfe,0x00,0x3d },
+ 16, 0xc050, 0, {0x40,0x0f,0xc0,0x43,0xf8,0x10,0xef,0x14,0xb7,0xe0,0x0c,0xf0,0x03,0xfc,0x00,0xf5 },
+ 16, 0xc060, 0, {0x02,0x3f,0x44,0x4f,0xb0,0x4b,0xfc,0x02,0xd4,0x04,0x3d,0x40,0x2f,0xf0,0x03,0xf8 },
+ 16, 0xc070, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xf9,0x08,0x3e,0x60 },
+ 16, 0xc080, 0, {0x0d,0xa0,0x03,0xac,0x00,0xe8,0x50,0x32,0x00,0x0c,0x84,0x03,0xa5,0x00,0xe9,0x00 },
+ 16, 0xc090, 0, {0x3a,0xd8,0x0f,0xb0,0x03,0x2c,0x00,0xf9,0x00,0x3a,0xc0,0x0f,0x30,0x03,0x2c,0x00 },
+ 16, 0xc0a0, 0, {0xcb,0x44,0x3e,0xd4,0x0e,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc0b0, 0, {0xc8,0x05,0x2c,0x08,0xb9,0x80,0x2e,0xc0,0x0a,0x30,0x42,0x3c,0x00,0x89,0x04,0x76 },
+ 16, 0xc0c0, 0, {0x60,0x08,0x90,0x62,0x20,0x00,0x82,0x04,0x22,0xd0,0x08,0xf0,0x43,0x7c,0x00,0xbb },
+ 16, 0xc0d0, 0, {0x82,0x22,0x40,0x0b,0xf0,0x42,0x3c,0x00,0x8a,0xc0,0x2e,0xc1,0x08,0xf0,0x02,0xf2 },
+ 16, 0xc0e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x10,0xb2,0xd0,0x2c,0xc0 },
+ 16, 0xc0f0, 0, {0x29,0x18,0x02,0x8c,0x04,0xa1,0x00,0x24,0x9c,0x08,0x10,0x02,0x80,0x00,0xa1,0x01 },
+ 16, 0xc100, 0, {0x0c,0xc1,0x2b,0x30,0x52,0x8c,0x04,0xb3,0x01,0x28,0x40,0x4b,0x30,0x02,0x4c,0x00 },
+ 16, 0xc110, 0, {0x90,0x20,0x2c,0x20,0x0a,0x30,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc120, 0, {0x20,0x41,0x1e,0x00,0xb7,0xa2,0x25,0xe8,0x8a,0x68,0x02,0x1e,0x00,0x85,0x80,0x25 },
+ 16, 0xc130, 0, {0x80,0x88,0xe8,0x02,0x3e,0x00,0x85,0x80,0x2f,0xe4,0x28,0x78,0x02,0xde,0x00,0xb7 },
+ 16, 0xc140, 0, {0x80,0x61,0xe0,0x03,0x78,0x02,0x5e,0x82,0xb7,0x82,0x2d,0xe0,0x08,0x78,0x02,0xc8 },
+ 16, 0xc150, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0d,0x00,0xf0,0x10,0x3c,0x80 },
+ 16, 0xc160, 0, {0x0d,0x10,0x83,0x8c,0x00,0xe2,0x50,0x26,0x04,0x0c,0x11,0x03,0x88,0x40,0xeb,0x00 },
+ 16, 0xc170, 0, {0x3c,0xc4,0x0f,0x30,0x03,0x8c,0x00,0xf3,0x08,0x38,0x40,0x07,0x30,0x03,0x6e,0x40 },
+ 16, 0xc180, 0, {0xd0,0x08,0x3c,0x88,0x0e,0x30,0x43,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc190, 0, {0x40,0x1d,0xbc,0x00,0xfb,0x34,0x3c,0xc9,0x4e,0xb0,0x23,0xed,0x20,0xfb,0x04,0x3f },
+ 16, 0xc1a0, 0, {0xc8,0x8f,0x70,0x53,0x4c,0x00,0xeb,0x10,0x31,0xc5,0x0e,0xf4,0x03,0x6d,0x00,0xf3 },
+ 16, 0xc1b0, 0, {0x00,0x3f,0xc0,0x0f,0xf4,0x0b,0xbc,0x00,0xcd,0x00,0x3f,0xc0,0x0f,0xf4,0x83,0xd0 },
+ 16, 0xc1c0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xce,0x04,0xc9,0x04,0xb0,0xc1 },
+ 16, 0xc1d0, 0, {0x0f,0x98,0x13,0x6c,0x90,0xcb,0x02,0x3e,0xc0,0x4f,0xb0,0x63,0xe4,0x00,0xf1,0x80 },
+ 16, 0xc1e0, 0, {0x12,0xc0,0x0c,0xb5,0x03,0xec,0xc0,0xcf,0x83,0x32,0x40,0x0f,0xb3,0x23,0x2d,0xa4 },
+ 16, 0xc1f0, 0, {0xfb,0x00,0x3e,0x00,0x0f,0xb4,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc200, 0, {0x48,0x11,0x9c,0x00,0x87,0x00,0x21,0xc0,0x2d,0x60,0x02,0x1c,0x00,0xd7,0x00,0x39 },
+ 16, 0xc210, 0, {0xc0,0x0b,0x60,0x02,0xdc,0x00,0xb5,0x00,0x21,0xc0,0x2a,0x70,0x12,0xcc,0x80,0x87 },
+ 16, 0xc220, 0, {0x00,0x35,0xc0,0x0b,0x72,0x52,0x1c,0x00,0xb7,0x00,0x2d,0x41,0x0b,0x32,0x02,0x12 },
+ 16, 0xc230, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0xbe,0x00,0x81,0xc0,0x23,0x20 },
+ 16, 0xc240, 0, {0x0b,0xd8,0x02,0x5e,0x00,0x06,0xc0,0x2d,0xa0,0x0b,0x7c,0x12,0xde,0x08,0xbf,0x80 },
+ 16, 0xc250, 0, {0xa1,0xe2,0x2a,0x7a,0x02,0xde,0x00,0x93,0x80,0x25,0x60,0x0b,0x78,0x1e,0x5e,0x50 },
+ 16, 0xc260, 0, {0xb7,0x80,0x2d,0xa0,0x0b,0x78,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc270, 0, {0x48,0x14,0xce,0x00,0x83,0x60,0x20,0xc0,0x09,0x31,0x02,0x2c,0x00,0x93,0x00,0x28 },
+ 16, 0xc280, 0, {0xc0,0x1b,0xb0,0x06,0xcc,0x80,0xb3,0x48,0x20,0xf0,0x0a,0x30,0x02,0xec,0x00,0x93 },
+ 16, 0xc290, 0, {0x80,0x24,0xc0,0x0b,0xb0,0x02,0x4c,0x10,0xb3,0xc8,0x2c,0xd2,0x8b,0x30,0x02,0x12 },
+ 16, 0xc2a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xbb,0x00,0xc6,0xc4,0x31,0x81 },
+ 16, 0xc2b0, 0, {0x0f,0xe0,0x03,0x68,0x00,0xce,0x80,0x3f,0xa2,0x0b,0xe8,0x03,0xf9,0x00,0xfe,0x40 },
+ 16, 0xc2c0, 0, {0x31,0x80,0x6e,0xa0,0x07,0xe8,0x00,0xda,0x00,0x26,0x81,0x0f,0xa0,0x02,0x68,0x01 },
+ 16, 0xc2d0, 0, {0xf6,0xe0,0x3d,0x92,0x0f,0xa0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc2e0, 0, {0x48,0x00,0xe0,0xc2,0xf8,0x04,0x3e,0x14,0x0f,0x80,0x13,0xe0,0x10,0xf8,0x01,0x3e },
+ 16, 0xc2f0, 0, {0x10,0x0f,0x80,0x43,0xe0,0x00,0xb8,0x00,0x3e,0x00,0x47,0x80,0x03,0xe0,0x02,0xe8 },
+ 16, 0xc300, 0, {0x10,0x3e,0x00,0x0f,0x80,0x07,0xa0,0x00,0xf8,0x00,0x2e,0x00,0x0f,0x80,0x0b,0xd2 },
+ 16, 0xc310, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x01,0x32,0x40 },
+ 16, 0xc320, 0, {0x8c,0x90,0x03,0xe4,0x00,0xc9,0x00,0x36,0x42,0x0f,0x90,0x03,0xa4,0x00,0xc9,0x00 },
+ 16, 0xc330, 0, {0x3e,0x42,0x0d,0x90,0x03,0x64,0x00,0xd9,0x00,0x3e,0x40,0x0f,0x90,0x0b,0x64,0x00 },
+ 16, 0xc340, 0, {0xf9,0x90,0x32,0x41,0x0c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc350, 0, {0x80,0x04,0x64,0x00,0xb9,0xc8,0xa2,0x60,0x0a,0x92,0x02,0xe4,0x00,0x89,0x40,0x2e },
+ 16, 0xc360, 0, {0x58,0x0b,0x90,0x02,0x04,0x00,0xd9,0x00,0x2e,0x42,0x08,0x90,0x02,0xe4,0x04,0x89 },
+ 16, 0xc370, 0, {0x00,0x2e,0x40,0x0b,0x90,0x06,0x24,0x04,0xb9,0x08,0x2a,0x40,0x48,0x90,0x12,0x20 },
+ 16, 0xc380, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x10,0x22,0x44 },
+ 16, 0xc390, 0, {0x08,0x90,0x02,0xe4,0x00,0x89,0x00,0x22,0x45,0x8b,0x90,0x02,0xa4,0x00,0x89,0x00 },
+ 16, 0xc3a0, 0, {0x2a,0x40,0x09,0x90,0x02,0xe4,0x00,0x99,0x80,0x2e,0x40,0x0b,0x90,0x26,0x24,0x00 },
+ 16, 0xc3b0, 0, {0xb9,0x01,0x22,0x70,0x09,0x10,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc3c0, 0, {0x08,0x04,0x04,0x08,0xb1,0x20,0x20,0x40,0x0a,0x10,0x02,0xc4,0x80,0x83,0x00,0x2c },
+ 16, 0xc3d0, 0, {0x50,0x4b,0x10,0x02,0x24,0x00,0x91,0x00,0x2e,0x40,0x08,0x12,0x02,0xc4,0x81,0x81 },
+ 16, 0xc3e0, 0, {0xa2,0x6c,0x40,0x0b,0x12,0x02,0x04,0x80,0xb9,0x20,0x2a,0x48,0x29,0x12,0x02,0x02 },
+ 16, 0xc3f0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xf8,0x00,0x32,0x80 },
+ 16, 0xc400, 0, {0x08,0x80,0x03,0xe1,0x42,0xc8,0x00,0x32,0x00,0x1f,0x85,0x03,0xa1,0x40,0xc8,0x50 },
+ 16, 0xc410, 0, {0x3a,0x00,0x8d,0x85,0x03,0x61,0x40,0xd8,0x00,0x3e,0x00,0x0f,0x05,0x03,0x21,0x40 },
+ 16, 0xc420, 0, {0xf8,0x50,0x32,0x14,0x0d,0x85,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc430, 0, {0x98,0x1d,0xf4,0x04,0xfd,0x10,0x3f,0x40,0x0f,0x50,0x03,0xc4,0x40,0xfd,0x00,0x3f },
+ 16, 0xc440, 0, {0x51,0x0f,0xd0,0x03,0xf4,0x00,0xff,0x01,0x3d,0x40,0x0f,0x91,0x03,0xe4,0x40,0xfd },
+ 16, 0xc450, 0, {0x10,0x3f,0x4a,0x0f,0x91,0x03,0xe4,0x40,0xfd,0x10,0x3f,0x44,0x0e,0x91,0x03,0xe6 },
+ 16, 0xc460, 0, {0x02,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xc5,0x00,0xcd,0x00,0x31,0x40 },
+ 16, 0xc470, 0, {0x0d,0xd0,0x43,0xe4,0x00,0xcd,0x00,0x33,0x40,0x4f,0x11,0x02,0xe4,0x04,0xc1,0x00 },
+ 16, 0xc480, 0, {0x3d,0x40,0x0c,0x90,0x03,0xe4,0x00,0xed,0xa4,0x32,0x50,0x0f,0x90,0x03,0xe4,0x00 },
+ 16, 0xc490, 0, {0xfd,0x00,0x3f,0x40,0x0f,0x90,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc4a0, 0, {0x38,0x10,0xe2,0x08,0xd8,0x00,0x32,0x01,0x00,0x80,0x12,0xc0,0x00,0x48,0x00,0x36 },
+ 16, 0xc4b0, 0, {0x80,0x0b,0x8a,0x02,0xe0,0x00,0xa8,0x00,0x2e,0x00,0x0f,0x80,0x02,0xe0,0x00,0x88 },
+ 16, 0xc4c0, 0, {0x50,0x34,0x28,0x0b,0x80,0x02,0xe0,0x00,0xb8,0x00,0x2e,0x00,0x0b,0x80,0x02,0xce },
+ 16, 0xc4d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x80,0x81,0x00,0x26,0x40 },
+ 16, 0xc4e0, 0, {0x09,0x18,0x02,0xc4,0x08,0x21,0x00,0x28,0x40,0x8b,0x10,0x02,0xc4,0x00,0xb1,0x01 },
+ 16, 0xc4f0, 0, {0x2e,0x40,0x18,0x10,0x02,0xc4,0x00,0xa1,0x01,0x20,0x48,0x1b,0x10,0x02,0xc4,0x00 },
+ 16, 0xc500, 0, {0xb1,0x00,0x6c,0x40,0x0b,0x10,0x12,0xc2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc510, 0, {0x18,0x11,0xa4,0x00,0x99,0x80,0xa2,0x42,0x48,0x90,0x02,0xe4,0x00,0xa9,0x2a,0x26 },
+ 16, 0xc520, 0, {0x44,0x0b,0x90,0x82,0xc4,0x81,0xb9,0x00,0x2e,0x40,0x0b,0x90,0x42,0xc4,0x00,0x89 },
+ 16, 0xc530, 0, {0x00,0x26,0x40,0x0b,0x90,0x02,0xe4,0x00,0xb9,0x01,0x2e,0x41,0x0b,0x90,0x02,0xc6 },
+ 16, 0xc540, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xc5,0x20,0xc9,0x84,0x30,0x70 },
+ 16, 0xc550, 0, {0x0d,0x90,0x13,0xe4,0x02,0xe9,0x00,0x32,0x70,0x0f,0x94,0x03,0xe4,0x00,0xf9,0x40 },
+ 16, 0xc560, 0, {0x3c,0x48,0x0c,0x90,0x03,0xe4,0x00,0xe1,0x00,0x32,0x40,0x0f,0x90,0x01,0xe4,0x00 },
+ 16, 0xc570, 0, {0xf9,0x90,0x3e,0x60,0x0f,0x90,0x26,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc580, 0, {0x28,0x01,0xa5,0x00,0xf1,0x04,0x3a,0x44,0x8f,0x90,0x03,0xe4,0x10,0xc9,0x04,0x3e },
+ 16, 0xc590, 0, {0x60,0x0f,0x90,0x03,0xe4,0x00,0xe9,0x20,0x3e,0x40,0x0f,0x90,0x03,0xe4,0x10,0xf9 },
+ 16, 0xc5a0, 0, {0x90,0x3e,0x40,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x80,0x3e,0x64,0x0f,0x90,0x07,0xca },
+ 16, 0xc5b0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x00,0xc8,0x04,0x3a,0x00 },
+ 16, 0xc5c0, 0, {0x1e,0x80,0x03,0x80,0x03,0xc8,0x40,0x2a,0x04,0x1f,0x80,0x03,0x20,0x00,0x88,0x00 },
+ 16, 0xc5d0, 0, {0x32,0x30,0x0c,0x80,0x03,0x20,0x00,0xf8,0x00,0x3e,0x00,0x0c,0x80,0x03,0xe0,0x00 },
+ 16, 0xc5e0, 0, {0xc8,0x80,0x3e,0x20,0x0f,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc5f0, 0, {0x28,0x05,0x38,0x00,0xae,0xd0,0x37,0x80,0x08,0xec,0x46,0x38,0x00,0xd6,0x04,0x23 },
+ 16, 0xc600, 0, {0xa0,0x0b,0xa0,0x41,0x78,0x04,0xfa,0x00,0x37,0x80,0x0d,0xa0,0x02,0xa8,0x10,0xee },
+ 16, 0xc610, 0, {0x21,0x2e,0x80,0x08,0xa0,0x02,0xe8,0x08,0x8e,0x80,0x2f,0xa0,0x8b,0xa0,0x02,0xca },
+ 16, 0xc620, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0x4c,0x02,0x83,0xc0,0xa8,0xe8 },
+ 16, 0xc630, 0, {0x4a,0x36,0x02,0x8c,0x00,0x13,0xa0,0x28,0xc2,0x0b,0x30,0x06,0x0c,0x00,0xb3,0x00 },
+ 16, 0xc640, 0, {0x24,0x84,0x09,0x30,0x02,0x0c,0x00,0xb3,0x20,0x28,0xc0,0x09,0x30,0x02,0xcc,0x00 },
+ 16, 0xc650, 0, {0x83,0x80,0x2c,0xc0,0x0b,0x30,0x02,0xca,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc660, 0, {0xa0,0x01,0x3c,0x44,0xaf,0x40,0x25,0xc2,0x48,0xf8,0x82,0x1c,0xc8,0x9f,0x08,0x21 },
+ 16, 0xc670, 0, {0xc0,0x8b,0xf8,0x02,0x5c,0x00,0xbf,0xb0,0x27,0x80,0x09,0x3a,0x02,0x9c,0x00,0xa5 },
+ 16, 0xc680, 0, {0x02,0x2d,0xe8,0x09,0x70,0x02,0xce,0x80,0x85,0x08,0x2d,0xc2,0x0b,0x73,0x02,0xe8 },
+ 16, 0xc690, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xc7,0x82,0xa9,0xe0 },
+ 16, 0xc6a0, 0, {0x0a,0x78,0x02,0x9e,0x40,0x97,0x84,0x39,0xa0,0x0b,0x7a,0x83,0x3f,0x80,0xd7,0x91 },
+ 16, 0xc6b0, 0, {0x35,0xa0,0x0d,0x7a,0x09,0x1e,0x44,0xf7,0x80,0x3d,0xe8,0x2d,0x7a,0x03,0xde,0x82 },
+ 16, 0xc6c0, 0, {0xc6,0x80,0x3d,0x20,0x4b,0x7b,0x23,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc6d0, 0, {0x08,0x1d,0xac,0x00,0xd3,0x00,0x3e,0xc1,0x0f,0x30,0x03,0xed,0x80,0xe3,0x00,0x3e },
+ 16, 0xc6e0, 0, {0x80,0x0f,0xb6,0x21,0xec,0x08,0xdb,0x21,0x3e,0x80,0x0f,0xb5,0x03,0x6c,0x40,0xf9 },
+ 16, 0xc6f0, 0, {0x00,0x3e,0xdc,0x0e,0xb2,0x03,0xed,0x40,0xf9,0x02,0x3e,0x80,0x0f,0xb0,0x03,0xc2 },
+ 16, 0xc700, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xcf,0x80,0x3d,0xe0 },
+ 16, 0xc710, 0, {0x0f,0xc8,0x43,0xfe,0x00,0xfe,0x84,0x3f,0xe0,0x0d,0xf8,0xc3,0xff,0x10,0xaf,0x90 },
+ 16, 0xc720, 0, {0x35,0xa0,0x0c,0xfc,0x03,0x3e,0x14,0xec,0x84,0x3f,0xf0,0x0e,0xfc,0xc3,0xff,0x08 },
+ 16, 0xc730, 0, {0x4f,0x80,0x33,0xe4,0x0c,0xf8,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc740, 0, {0xa8,0x11,0x9c,0x00,0xd7,0xa2,0x2d,0xc4,0x0c,0x41,0xc2,0xdc,0x00,0x74,0x00,0x25 },
+ 16, 0xc750, 0, {0x80,0x0f,0x72,0x42,0xdc,0x90,0xd7,0x38,0x2d,0x98,0x0a,0x70,0x02,0x1c,0x04,0x86 },
+ 16, 0xc760, 0, {0x00,0x3f,0xc0,0x0d,0x70,0x02,0xcc,0x00,0x86,0x08,0x37,0xc6,0x28,0x70,0x02,0x2a },
+ 16, 0xc770, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0x87,0x60,0x2d,0xc2 },
+ 16, 0xc780, 0, {0x0a,0x50,0x02,0xdc,0x00,0xb6,0x10,0x25,0xc2,0x09,0x70,0x86,0xdc,0x30,0x97,0x00 },
+ 16, 0xc790, 0, {0x25,0x80,0x08,0x30,0x02,0x5c,0x00,0x87,0x08,0x2d,0xc0,0x08,0x70,0x02,0xcc,0x40 },
+ 16, 0xc7a0, 0, {0x86,0x00,0x21,0x00,0x09,0x70,0x0a,0x00,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc7b0, 0, {0x20,0x14,0xed,0x80,0x93,0x00,0x0c,0xe1,0x28,0x18,0x02,0xcc,0x08,0xa0,0x00,0x24 },
+ 16, 0xc7c0, 0, {0x12,0x1a,0x34,0x02,0xcf,0x04,0x93,0x40,0x2c,0x80,0x0a,0xb0,0x22,0x4c,0x02,0x81 },
+ 16, 0xc7d0, 0, {0x80,0x28,0xe0,0x28,0x30,0x02,0xcc,0x00,0x88,0x82,0x24,0x20,0x08,0xb0,0x02,0x08 },
+ 16, 0xc7e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbf,0x20,0xc9,0xe0,0x2c,0xf1 },
+ 16, 0xc7f0, 0, {0x0e,0xbd,0x03,0xfc,0x00,0xb9,0x40,0x36,0x40,0x09,0xf5,0x02,0xfd,0x40,0xff,0x80 },
+ 16, 0xc800, 0, {0x36,0xa2,0x08,0xf0,0x0b,0x7c,0x00,0xeb,0x80,0x2f,0xe0,0x0a,0xf0,0x43,0xfc,0x02 },
+ 16, 0xc810, 0, {0x8b,0xd0,0x32,0xf0,0x0d,0xf0,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc820, 0, {0x80,0x00,0xec,0x10,0xfb,0x00,0x3e,0xc8,0x0f,0x94,0x13,0xec,0x00,0xf9,0x40,0x36 },
+ 16, 0xc830, 0, {0x40,0x1f,0xb0,0x03,0xec,0x10,0xfb,0x01,0x3e,0xd0,0x0f,0xb0,0x03,0xac,0x00,0xf9 },
+ 16, 0xc840, 0, {0x00,0x3e,0xc4,0x0f,0xb0,0x01,0xec,0x00,0xf9,0x04,0x3e,0x48,0x0f,0xb0,0x03,0xe0 },
+ 16, 0xc850, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xdf,0x00,0x3f,0xc0 },
+ 16, 0xc860, 0, {0x0c,0xe0,0x07,0xfc,0x00,0xfc,0x0a,0x27,0x00,0x4f,0xf0,0x03,0xfc,0x00,0xff,0x08 },
+ 16, 0xc870, 0, {0x33,0x80,0x0c,0xf0,0x00,0x2c,0x00,0x5f,0x00,0x33,0xc0,0x0c,0xf0,0x01,0xfc,0x00 },
+ 16, 0xc880, 0, {0xfe,0x00,0x23,0x40,0x0f,0xb0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc890, 0, {0x81,0x04,0x6c,0x00,0x8b,0x86,0x2e,0xe0,0x48,0x8f,0x02,0xec,0x08,0xb8,0xa0,0x36 },
+ 16, 0xc8a0, 0, {0x30,0x4b,0xb0,0x03,0xac,0x0c,0x9b,0x02,0x3c,0xa0,0x0c,0xb0,0x43,0x6c,0x00,0xb1 },
+ 16, 0xc8b0, 0, {0x00,0x28,0xc0,0x0d,0xb0,0x12,0xec,0x10,0xb9,0x80,0xa2,0x61,0x0b,0xb0,0x02,0x20 },
+ 16, 0xc8c0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x9b,0x88,0x2e,0xe0 },
+ 16, 0xc8d0, 0, {0x08,0xa0,0x02,0xec,0x01,0xbb,0x80,0x26,0x62,0x0b,0xb0,0x02,0xec,0x00,0xb3,0x01 },
+ 16, 0xc8e0, 0, {0x2a,0x21,0x08,0xb0,0x12,0x2c,0x00,0xb8,0x00,0x22,0xc0,0x08,0xb0,0x12,0xec,0x14 },
+ 16, 0xc8f0, 0, {0xb9,0x84,0x22,0xa2,0x0b,0xb0,0x02,0xa0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc900, 0, {0x08,0x04,0x0c,0x04,0x93,0x00,0x2c,0xe0,0x08,0x00,0x02,0xcc,0x09,0x91,0x00,0x20 },
+ 16, 0xc910, 0, {0x40,0x0b,0x30,0x06,0x4c,0x04,0x13,0x00,0x26,0x00,0x08,0x30,0x02,0xcc,0x04,0xb2 },
+ 16, 0xc920, 0, {0x00,0x2a,0xc0,0x01,0x30,0x00,0xcd,0x00,0xb0,0x00,0x20,0x80,0x0b,0x30,0x0a,0x02 },
+ 16, 0xc930, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xdb,0x24,0x6e,0xc0 },
+ 16, 0xc940, 0, {0x2c,0xa0,0x02,0xfc,0x00,0xba,0x04,0x26,0x40,0x4f,0xf0,0x57,0xfc,0x00,0x3f,0x01 },
+ 16, 0xc950, 0, {0x3a,0x00,0x2c,0xf0,0x01,0x3c,0x00,0xdb,0x00,0x33,0xc0,0x84,0xf0,0x03,0xfd,0x08 },
+ 16, 0xc960, 0, {0xfa,0x00,0x32,0x00,0x0f,0xf0,0x03,0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc970, 0, {0xa0,0x19,0xdc,0x00,0xea,0x40,0x3f,0x00,0x07,0xc0,0x03,0xfc,0x04,0xfc,0x00,0x3f },
+ 16, 0xc980, 0, {0x40,0x0f,0xf0,0x03,0x9c,0x00,0xff,0x00,0x3f,0x00,0x0e,0xf0,0x03,0x7c,0x00,0xfd },
+ 16, 0xc990, 0, {0x00,0x3f,0xc1,0x0f,0xf0,0x03,0xfc,0x84,0xf4,0x00,0x3f,0x00,0x0f,0xf0,0x03,0xe8 },
+ 16, 0xc9a0, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xf0,0x80,0xff,0x00,0x03,0xc2 },
+ 16, 0xc9b0, 0, {0x0f,0xc2,0x03,0x3e,0x00,0xdf,0xc0,0x3e,0xc0,0x4d,0xdb,0x02,0xb0,0xc0,0xdc,0x30 },
+ 16, 0xc9c0, 0, {0x3f,0xe0,0x0f,0xdb,0x23,0xf6,0x20,0xff,0x26,0x33,0xe0,0x0f,0x52,0x03,0x5e,0x00 },
+ 16, 0xc9d0, 0, {0xff,0x80,0x33,0xc0,0x4c,0x49,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc9e0, 0, {0x80,0x10,0xe1,0xe0,0xb7,0x08,0x23,0xf0,0x0b,0xad,0x0a,0x2e,0x00,0x9a,0x04,0x2e },
+ 16, 0xc9f0, 0, {0xb0,0x09,0x8f,0x03,0xa0,0x40,0xb9,0x30,0x2e,0xa0,0x0b,0x9f,0x03,0xa7,0x00,0xbb },
+ 16, 0xca00, 0, {0x80,0x26,0xe0,0x0b,0xdd,0x02,0x2e,0x00,0xbb,0x80,0x22,0xf4,0x0a,0x92,0x02,0xa0 },
+ 16, 0xca10, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc8,0x80,0xb3,0x10,0x24,0xc0 },
+ 16, 0xca20, 0, {0x0b,0x80,0x02,0xac,0x00,0xa3,0x24,0x2c,0xd0,0x08,0x10,0x06,0xc0,0x80,0xb2,0x01 },
+ 16, 0xca30, 0, {0x2c,0xea,0x4b,0x00,0x12,0xc2,0x04,0xb3,0x10,0x08,0xc0,0x0a,0x90,0x02,0x0c,0x00 },
+ 16, 0xca40, 0, {0x93,0x04,0x24,0xc0,0x09,0x82,0x02,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xca50, 0, {0xc0,0x15,0xa5,0x00,0xbb,0x00,0x22,0xc0,0x0b,0x80,0x02,0xac,0x08,0xbb,0x18,0x2e },
+ 16, 0xca60, 0, {0xe0,0x18,0x88,0x02,0xec,0x01,0xba,0x00,0x2e,0x80,0x0b,0x98,0x86,0xe2,0x00,0xbb },
+ 16, 0xca70, 0, {0x00,0x22,0xc4,0x0b,0x90,0x02,0x6c,0x00,0xbb,0x00,0xa6,0xc0,0x0b,0x90,0x00,0xb0 },
+ 16, 0xca80, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0xe7,0x00,0xfb,0x00,0xb2,0xc0 },
+ 16, 0xca90, 0, {0x0f,0xa8,0x03,0xac,0x02,0xeb,0x00,0x3e,0x60,0x0d,0x9e,0x03,0xec,0x00,0xd8,0x40 },
+ 16, 0xcaa0, 0, {0x3e,0x40,0x0f,0x88,0x43,0xe2,0x00,0xfb,0x20,0x32,0xc0,0x0f,0x10,0x0b,0x6f,0x90 },
+ 16, 0xcab0, 0, {0x5b,0x82,0x36,0xc0,0x2d,0x08,0x01,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcac0, 0, {0xe0,0x01,0xb7,0x08,0xf7,0x00,0x3f,0xc0,0x0f,0xf9,0x03,0x7c,0x08,0xcf,0x82,0x3c },
+ 16, 0xcad0, 0, {0x00,0xaf,0xd0,0x21,0xbc,0x08,0xfd,0x10,0x3f,0x80,0x8f,0xc0,0x03,0xa4,0x00,0xf7 },
+ 16, 0xcae0, 0, {0x01,0xbf,0xc0,0x07,0xd0,0x03,0xbd,0x30,0xff,0xa4,0x38,0xc0,0x0e,0xda,0x03,0xf8 },
+ 16, 0xcaf0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa8,0x00,0xfb,0x00,0xb2,0xc1 },
+ 16, 0xcb00, 0, {0x0e,0x81,0x03,0xec,0x40,0xfb,0x44,0x3a,0xc1,0x0e,0x95,0x03,0xe0,0x00,0xcb,0x41 },
+ 16, 0xcb10, 0, {0x32,0x4d,0x0f,0x81,0x03,0xe0,0x20,0xc9,0x00,0x72,0xe8,0x44,0x91,0x03,0x6d,0x00 },
+ 16, 0xcb20, 0, {0xcb,0x02,0x3e,0xc0,0x0c,0x80,0x03,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcb30, 0, {0xc8,0x05,0x24,0x00,0xbf,0x00,0x33,0xc4,0x08,0x1d,0x03,0x8c,0x00,0xbb,0x98,0x36 },
+ 16, 0xcb40, 0, {0x48,0x4d,0x98,0x22,0xed,0x40,0xdb,0x00,0x36,0xb0,0x0b,0x98,0x02,0xe3,0x00,0xdb },
+ 16, 0xcb50, 0, {0x00,0x32,0xe0,0x88,0xd8,0x02,0x2c,0x02,0xc3,0x80,0x2f,0xc0,0x08,0x90,0x03,0x72 },
+ 16, 0xcb60, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x44,0x00,0xb3,0x00,0x20,0xf0 },
+ 16, 0xcb70, 0, {0x18,0x08,0x02,0x4f,0x84,0xb1,0xc0,0x24,0xc0,0x89,0x06,0x02,0xc4,0x00,0x91,0x00 },
+ 16, 0xcb80, 0, {0x20,0xf0,0x1b,0x18,0x82,0xc6,0x00,0x93,0x00,0x2c,0xd1,0x08,0x1e,0x02,0x0e,0x44 },
+ 16, 0xcb90, 0, {0x93,0x94,0x2c,0xc0,0x08,0x20,0x02,0xb8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcba0, 0, {0x20,0x01,0x1e,0x04,0xb7,0x80,0x20,0xe2,0x08,0x68,0x06,0x9e,0x80,0xbf,0x84,0x25 },
+ 16, 0xcbb0, 0, {0xa8,0x09,0x68,0x02,0xc6,0x00,0x93,0xa0,0x65,0xe4,0x0b,0x78,0x12,0xde,0x00,0x93 },
+ 16, 0xcbc0, 0, {0x00,0xa1,0xe0,0x08,0xd8,0x02,0x1e,0xd0,0xa7,0x80,0x2d,0xe0,0x08,0xf8,0x02,0x48 },
+ 16, 0xcbd0, 0, {0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x08,0x00,0xb3,0x20,0x30,0xc0 },
+ 16, 0xcbe0, 0, {0x0a,0x22,0x02,0xce,0x40,0xf3,0xa0,0x3c,0xe8,0x0b,0x30,0x02,0xc1,0x00,0xd0,0xc1 },
+ 16, 0xcbf0, 0, {0x30,0xc0,0x0b,0x21,0x13,0xcc,0x21,0xd3,0x00,0x2c,0xc0,0x2c,0x10,0x0b,0x0c,0x80 },
+ 16, 0xcc00, 0, {0xd3,0x61,0x3c,0xc8,0x2c,0x20,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcc10, 0, {0x40,0x1d,0xbc,0x00,0xff,0x40,0x3b,0xc0,0x0f,0xe0,0x03,0xfc,0x00,0xf7,0x50,0x7f },
+ 16, 0xcc20, 0, {0xc4,0x2e,0xf0,0x03,0xfc,0x40,0xfe,0x00,0x3f,0xc0,0x0f,0xf0,0x47,0xfc,0x00,0xff },
+ 16, 0xcc30, 0, {0x00,0x7d,0xc2,0x0f,0xd0,0x01,0xbc,0x80,0x5f,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xd0 },
+ 16, 0xcc40, 0, {0x02,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x00,0xfb,0xc0,0x32,0xc8 },
+ 16, 0xcc50, 0, {0x0e,0xe0,0x03,0xac,0xa0,0xeb,0x20,0x32,0x40,0x8c,0xa0,0x13,0x2c,0x00,0xd9,0x00 },
+ 16, 0xcc60, 0, {0x3e,0x60,0x0c,0xb0,0x03,0xe8,0x00,0xfa,0x80,0x30,0xc0,0x3c,0x92,0x03,0xef,0x60 },
+ 16, 0xcc70, 0, {0xc3,0x20,0x31,0xc4,0x0c,0xa0,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcc80, 0, {0x48,0x11,0x9c,0x00,0x33,0x20,0x21,0xda,0x0b,0x70,0x43,0x9c,0x01,0xb5,0x00,0x21 },
+ 16, 0xcc90, 0, {0x00,0x0a,0xe0,0x02,0x1c,0x00,0xb7,0x00,0x2f,0xc0,0x0d,0x70,0x03,0x9c,0x00,0xb6 },
+ 16, 0xcca0, 0, {0x00,0x31,0xc8,0x08,0x57,0x02,0xdc,0x00,0x87,0x50,0x21,0xc0,0x0a,0x70,0x42,0x92 },
+ 16, 0xccb0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9a,0x11,0xb7,0x90,0x21,0xe0 },
+ 16, 0xccc0, 0, {0x0b,0x68,0x82,0xde,0x08,0xa7,0x80,0x24,0x60,0x08,0x70,0x12,0x12,0x08,0x95,0x80 },
+ 16, 0xccd0, 0, {0x2d,0x60,0x09,0x6c,0x02,0xde,0x00,0xb1,0x80,0x23,0xe0,0x0a,0x58,0x62,0xfe,0x00 },
+ 16, 0xcce0, 0, {0x97,0xa0,0x21,0xe8,0x09,0xe8,0x02,0x30,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xccf0, 0, {0x48,0x14,0xcd,0x00,0xb3,0x00,0x20,0xc0,0x8b,0x3c,0x02,0x8c,0x00,0xbb,0x00,0x24 },
+ 16, 0xcd00, 0, {0xc4,0x1a,0x3d,0x02,0x2f,0x88,0xb3,0x48,0x2c,0xe0,0x89,0x3e,0x02,0x8d,0x80,0x93 },
+ 16, 0xcd10, 0, {0xd9,0xa4,0x40,0x88,0x10,0x02,0xcc,0x04,0x93,0xc8,0x20,0xc0,0x0b,0x30,0x02,0x92 },
+ 16, 0xcd20, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb9,0x40,0xfa,0x00,0xb2,0x80 },
+ 16, 0xcd30, 0, {0x0f,0xe0,0x03,0xe8,0x00,0xea,0x80,0x37,0xa0,0x0c,0xe8,0x13,0x3b,0x08,0xde,0x01 },
+ 16, 0xcd40, 0, {0x3f,0x82,0x0c,0xe0,0x43,0xfa,0x80,0xfe,0x80,0x31,0x28,0x0c,0xa0,0x03,0xf0,0x02 },
+ 16, 0xcd50, 0, {0xc4,0xc0,0xb2,0x80,0x0d,0xe0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcd60, 0, {0x48,0x00,0xe0,0x00,0xf8,0x00,0x3e,0x10,0x0b,0x80,0x83,0xe0,0x00,0xf8,0x30,0x3a },
+ 16, 0xcd70, 0, {0x00,0x6d,0x80,0x83,0xe1,0x44,0xb8,0x04,0x3e,0x10,0x0f,0x80,0x13,0xe0,0x00,0xf8 },
+ 16, 0xcd80, 0, {0x00,0x3a,0x10,0x4f,0x04,0x03,0xe3,0x00,0xe8,0x10,0x3e,0x00,0x0e,0x80,0x03,0xd2 },
+ 16, 0xcd90, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xc9,0x00,0x38,0x40 },
+ 16, 0xcda0, 0, {0x0f,0x1a,0x03,0x2e,0x00,0xfb,0xa0,0x36,0x60,0x0c,0x98,0x03,0xe6,0x04,0xd1,0x00 },
+ 16, 0xcdb0, 0, {0x36,0x48,0x0e,0x91,0x02,0xe6,0x00,0xf9,0x00,0x3e,0x00,0x0c,0x99,0x03,0x62,0x40 },
+ 16, 0xcdc0, 0, {0xf8,0x00,0xa0,0x68,0x0c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcdd0, 0, {0x80,0x04,0x64,0x02,0x89,0x04,0x2e,0x64,0x88,0x94,0x02,0xa5,0x00,0xb9,0x80,0x20 },
+ 16, 0xcde0, 0, {0x64,0x0d,0x9c,0x02,0xe6,0x42,0x89,0x00,0x22,0x60,0x0b,0x9c,0x02,0xe4,0x10,0xb9 },
+ 16, 0xcdf0, 0, {0x40,0x3a,0x50,0x08,0x9c,0x02,0x27,0x20,0xb9,0x00,0x22,0x40,0x08,0x10,0x03,0x60 },
+ 16, 0xce00, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x04,0x00,0x89,0x00,0x22,0x40 },
+ 16, 0xce10, 0, {0x0a,0x90,0x82,0x25,0x4c,0xb9,0x00,0x02,0x40,0x08,0x96,0x02,0xe4,0x10,0x89,0x00 },
+ 16, 0xce20, 0, {0x26,0x50,0x13,0x94,0x02,0xe4,0x40,0xb9,0x08,0x2e,0x40,0x08,0x90,0x8a,0x24,0x00 },
+ 16, 0xce30, 0, {0xb9,0x01,0x2a,0x40,0x08,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xce40, 0, {0x08,0x04,0x05,0x80,0x81,0x40,0x2c,0xc8,0x08,0x10,0x06,0x84,0x00,0xb1,0x04,0x20 },
+ 16, 0xce50, 0, {0x49,0x09,0x14,0x42,0xcc,0x89,0x81,0x20,0x20,0x50,0x0b,0x14,0x46,0xc4,0x00,0xb1 },
+ 16, 0xce60, 0, {0x00,0x2a,0xc0,0x28,0x14,0x02,0x01,0x01,0xb0,0x04,0x28,0x40,0x38,0x94,0x02,0x42 },
+ 16, 0xce70, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0x88,0x00,0x3a,0x00 },
+ 16, 0xce80, 0, {0x0e,0x80,0x23,0x20,0x00,0xf8,0x50,0xb2,0x00,0x0c,0x80,0x12,0xe1,0x40,0xd8,0x50 },
+ 16, 0xce90, 0, {0x36,0x00,0x0e,0x80,0x03,0xe0,0x00,0xf8,0x00,0x2e,0x00,0x0c,0x80,0x53,0x60,0x04 },
+ 16, 0xcea0, 0, {0xf8,0x00,0x3a,0x00,0x0c,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xceb0, 0, {0x98,0x1d,0xf4,0x40,0xf9,0x44,0x3e,0x44,0x0f,0xd4,0x03,0xe4,0x00,0xf1,0x00,0x3f },
+ 16, 0xcec0, 0, {0x44,0x0f,0xd4,0x53,0xf4,0x44,0xfd,0x10,0x2f,0x40,0x0f,0xf4,0x03,0xfd,0x00,0xfd },
+ 16, 0xced0, 0, {0x40,0x3b,0x10,0x0f,0xd4,0x23,0xd1,0x04,0x7c,0x43,0x36,0x50,0x0f,0x50,0x03,0xe6 },
+ 16, 0xcee0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xa6,0x00,0xf9,0x10,0x2e,0x62 },
+ 16, 0xcef0, 0, {0x0f,0xd2,0x83,0xe4,0x00,0xbd,0x42,0x3e,0x61,0x0f,0xd0,0x03,0xf6,0xc0,0xc9,0xa2 },
+ 16, 0xcf00, 0, {0x2b,0x40,0x0c,0xd0,0x03,0x34,0x00,0xf9,0x81,0x3e,0x68,0x08,0xc1,0x43,0xfa,0x00 },
+ 16, 0xcf10, 0, {0xf5,0x80,0x3f,0x62,0x0c,0x14,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcf20, 0, {0x38,0x10,0xe1,0x20,0x88,0x11,0x2e,0x10,0x0b,0x80,0x02,0xe0,0x00,0xb8,0x82,0x2e },
+ 16, 0xcf30, 0, {0x10,0x0b,0x80,0x00,0xe3,0xc4,0x88,0xf0,0x22,0x00,0x0b,0x80,0x0a,0x20,0x00,0xe8 },
+ 16, 0xcf40, 0, {0x40,0x2f,0x14,0x08,0x88,0x02,0xe2,0x00,0xb8,0x00,0x2e,0x00,0x08,0x88,0x02,0x8e },
+ 16, 0xcf50, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0xc5,0x00,0xa1,0x00,0x2c,0x40 },
+ 16, 0xcf60, 0, {0x0b,0x10,0x02,0xc4,0x18,0xb1,0x22,0x6c,0xd1,0x0b,0x10,0x26,0xc4,0x00,0x81,0x08 },
+ 16, 0xcf70, 0, {0x2a,0x40,0x88,0x10,0x02,0x04,0x04,0xb5,0xc0,0x0f,0x40,0x0b,0x02,0x02,0x41,0xa0 },
+ 16, 0xcf80, 0, {0xb1,0x40,0x2c,0x40,0x08,0x12,0x02,0x02,0x11,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcf90, 0, {0x18,0x15,0xa4,0x00,0x89,0x06,0x2e,0x40,0x0b,0x90,0x12,0xe4,0x00,0xb9,0x40,0x2e },
+ 16, 0xcfa0, 0, {0x40,0x0b,0xb0,0x82,0xc4,0x02,0x89,0x44,0x22,0x40,0x0a,0x90,0x02,0x24,0x00,0xa9 },
+ 16, 0xcfb0, 0, {0x00,0x27,0x48,0x09,0xb0,0x12,0xec,0x18,0xb9,0x01,0x2e,0x40,0x40,0x90,0x02,0x86 },
+ 16, 0xcfc0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe7,0x84,0xe9,0x01,0x3e,0x40 },
+ 16, 0xcfd0, 0, {0x0f,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x72,0x0f,0x90,0x03,0xe7,0x60,0x89,0x10 },
+ 16, 0xcfe0, 0, {0x3a,0x40,0x0c,0x90,0x03,0x24,0x00,0xf9,0x44,0x3c,0x40,0x2d,0x90,0x03,0xe7,0x60 },
+ 16, 0xcff0, 0, {0xf9,0x71,0x3e,0x40,0x28,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd000, 0, {0x28,0x01,0xa4,0x48,0xa9,0x00,0x3e,0xc0,0x0f,0x9a,0x43,0xec,0x00,0xf9,0x20,0x7e },
+ 16, 0xd010, 0, {0xc8,0x0f,0x9a,0x07,0x66,0x00,0x79,0x80,0x7e,0x40,0x0f,0x1c,0x03,0xe7,0x00,0xe9 },
+ 16, 0xd020, 0, {0xa0,0x3e,0x40,0x46,0x80,0x03,0xe0,0x20,0xf9,0x00,0x3c,0x40,0x0f,0x90,0x03,0xca },
+ 16, 0xd030, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0x80,0x00,0xf8,0x00,0x3a,0x00 },
+ 16, 0xd040, 0, {0x0f,0x80,0x03,0xa0,0x08,0xe8,0x40,0x3a,0x10,0x0c,0x83,0x03,0xa1,0xc0,0xf0,0x40 },
+ 16, 0xd050, 0, {0x3e,0x06,0x0f,0x84,0x03,0xe1,0x00,0xf8,0x00,0x3b,0x00,0x0f,0x81,0x03,0x20,0x00 },
+ 16, 0xd060, 0, {0xf8,0x10,0xb2,0x00,0x4c,0x80,0x0b,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd070, 0, {0x28,0x05,0x28,0x00,0xba,0x00,0x2e,0xb0,0x0b,0xe8,0x02,0xe9,0x00,0x3e,0x90,0x02 },
+ 16, 0xd080, 0, {0x81,0x08,0xe4,0x12,0x78,0x00,0xba,0x00,0x2d,0xb0,0x89,0xe8,0x22,0xf8,0x0c,0xba },
+ 16, 0xd090, 0, {0x00,0x6e,0x80,0x03,0xc5,0x03,0x30,0x00,0xba,0x00,0x22,0xa8,0x08,0xa0,0x22,0x8a },
+ 16, 0xd0a0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb3,0x00,0x28,0xe8 },
+ 16, 0xd0b0, 0, {0x1b,0x31,0x12,0x8c,0xc4,0xa3,0x92,0x2c,0x40,0x88,0x34,0x06,0x8e,0x00,0x93,0x00 },
+ 16, 0xd0c0, 0, {0x2c,0xf0,0x19,0x31,0xa2,0xcc,0x04,0xb3,0x00,0x28,0x80,0x01,0x38,0x02,0x4c,0x00 },
+ 16, 0xd0d0, 0, {0xb3,0x80,0x20,0xe0,0x0a,0xb0,0x12,0x02,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd0e0, 0, {0xa0,0x01,0x1c,0x00,0xb7,0x14,0x2d,0x42,0x0b,0x60,0x02,0xdc,0x00,0xb7,0x81,0x27 },
+ 16, 0xd0f0, 0, {0xe0,0x18,0x60,0x02,0x58,0x18,0xb7,0x22,0x2d,0x80,0x09,0x70,0x22,0xdc,0x00,0xb7 },
+ 16, 0xd100, 0, {0x00,0x2d,0x80,0x0b,0x3b,0x02,0x1d,0xd0,0xbf,0x80,0x28,0xc0,0x8a,0xf2,0x02,0xa0 },
+ 16, 0xd110, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1f,0x80,0xf7,0xa0,0x39,0xe2 },
+ 16, 0xd120, 0, {0x0f,0x68,0x03,0x9e,0x00,0xed,0x84,0x3d,0xe2,0x44,0x78,0x03,0x9e,0x00,0xf7,0xb4 },
+ 16, 0xd130, 0, {0x2d,0xe0,0x0d,0x68,0x03,0xd6,0x00,0xf6,0x80,0x39,0xe0,0x0f,0x79,0x03,0x5e,0x90 },
+ 16, 0xd140, 0, {0xf7,0x81,0x31,0x60,0x2e,0x7c,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd150, 0, {0x08,0x1d,0xad,0x00,0xfb,0x42,0x3e,0xc8,0x0f,0xa0,0x03,0xed,0xa0,0xbb,0x00,0x38 },
+ 16, 0xd160, 0, {0xc8,0x0f,0xb0,0x03,0x68,0x00,0xfb,0x11,0x3e,0x40,0x09,0xb0,0x41,0xec,0x00,0xfa },
+ 16, 0xd170, 0, {0x02,0x3e,0xc0,0x0f,0xb2,0x0b,0xed,0x80,0x3b,0x00,0x36,0x40,0x0d,0xb0,0x23,0x42 },
+ 16, 0xd180, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xff,0x00,0xcf,0xd0,0x33,0xe4 },
+ 16, 0xd190, 0, {0x4f,0xf9,0x03,0xde,0x40,0xdc,0x80,0x36,0xe4,0x0c,0xb9,0x13,0xfe,0x00,0xcf,0x90 },
+ 16, 0xd1a0, 0, {0x37,0xe5,0x0f,0xf8,0x43,0xfe,0x00,0xcf,0x92,0x3f,0xa4,0x0f,0x78,0x03,0x1f,0x00 },
+ 16, 0xd1b0, 0, {0xc5,0x80,0x33,0x60,0x0c,0xf8,0x20,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd1c0, 0, {0xa8,0x11,0xbc,0x00,0x0f,0x10,0x21,0x81,0x0b,0x60,0x03,0x84,0x00,0x8b,0x08,0x21 },
+ 16, 0xd1d0, 0, {0x60,0x0a,0x7b,0x03,0x98,0x00,0x8b,0x10,0x29,0x84,0x0e,0x64,0x22,0xdc,0x40,0xd7 },
+ 16, 0xd1e0, 0, {0x02,0x2d,0x84,0x0b,0x70,0x02,0x1c,0x00,0x85,0x18,0x21,0x40,0x0a,0xf0,0x22,0xaa },
+ 16, 0xd1f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xa7,0x14,0x69,0xc0 },
+ 16, 0xd200, 0, {0x1a,0x60,0x12,0xfc,0x01,0xa4,0x10,0x2d,0xc0,0x0a,0x52,0x02,0x45,0x40,0x87,0x0c },
+ 16, 0xd210, 0, {0x21,0x80,0x1b,0x60,0x82,0xd4,0x00,0x86,0x03,0x25,0xe0,0x1b,0x70,0x02,0x5c,0x40 },
+ 16, 0xd220, 0, {0x9d,0x00,0x29,0x40,0x08,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd230, 0, {0x20,0x14,0xcd,0x00,0xa3,0x00,0x28,0xc0,0x1b,0x20,0x22,0x8c,0x11,0xa3,0x00,0x68 },
+ 16, 0xd240, 0, {0xf6,0x0a,0x3c,0x06,0x82,0x00,0x83,0x80,0x28,0x84,0x0a,0x8c,0x82,0xcc,0x44,0x92 },
+ 16, 0xd250, 0, {0x00,0x2c,0xc0,0x0b,0x30,0x02,0x4e,0x00,0x91,0x00,0x28,0x40,0x0a,0x30,0x02,0x88 },
+ 16, 0xd260, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbe,0x22,0xef,0x04,0xba,0xc0 },
+ 16, 0xd270, 0, {0x0f,0x14,0x93,0xec,0x02,0xf1,0xc3,0x3e,0xf0,0x0e,0x90,0x83,0x66,0x00,0xcf,0xd2 },
+ 16, 0xd280, 0, {0x32,0x50,0x0f,0x9c,0x03,0xcb,0x00,0xc9,0x80,0x3e,0x28,0x0f,0xb0,0x03,0x4f,0x00 },
+ 16, 0xd290, 0, {0xd1,0xc0,0xaa,0xc0,0x0c,0x71,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd2a0, 0, {0x80,0x00,0xec,0x20,0xdb,0x00,0x26,0x80,0x0f,0xa0,0x03,0xec,0x08,0x1b,0x00,0x36 },
+ 16, 0xd2b0, 0, {0xc0,0x0f,0x86,0x01,0xe5,0x40,0xfb,0x02,0x3a,0x48,0x0e,0x94,0x03,0xec,0x80,0xf1 },
+ 16, 0xd2c0, 0, {0x84,0x3e,0x00,0x4f,0xb0,0x03,0xad,0xc0,0xeb,0x20,0x36,0xc0,0x0f,0xb0,0x23,0xe0 },
+ 16, 0xd2d0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x00,0xcf,0x00,0x3f,0x60 },
+ 16, 0xd2e0, 0, {0x0c,0xe0,0x83,0x3e,0x80,0xed,0x08,0x33,0xd0,0x8f,0x50,0x03,0x9e,0x00,0xdf,0x00 },
+ 16, 0xd2f0, 0, {0x33,0x40,0x0c,0xc0,0x03,0x30,0x00,0xcc,0x10,0x33,0x68,0x0c,0xf0,0x03,0x3c,0x84 },
+ 16, 0xd300, 0, {0x8d,0x90,0x30,0x40,0x0c,0xf0,0x03,0x08,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd310, 0, {0x81,0x04,0x6c,0x00,0x8b,0x02,0x2c,0xf4,0x08,0xa8,0x62,0x0c,0x80,0x8b,0x80,0x2a },
+ 16, 0xd320, 0, {0x60,0x0f,0x9c,0x02,0x2e,0x00,0x8b,0x00,0x20,0x60,0x0d,0x98,0x02,0x2c,0x80,0xd8 },
+ 16, 0xd330, 0, {0x00,0x14,0x40,0x08,0x34,0x12,0x2e,0x00,0x8b,0x82,0x32,0x40,0x0d,0xb0,0x03,0x60 },
+ 16, 0xd340, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x8b,0x00,0x2e,0xd0 },
+ 16, 0xd350, 0, {0x08,0xb8,0x02,0x2c,0x00,0x8a,0x84,0x22,0xc0,0x0b,0x88,0x02,0xe4,0xa0,0x83,0x00 },
+ 16, 0xd360, 0, {0x22,0x62,0x0a,0x98,0x02,0x28,0x00,0x89,0x00,0x22,0x00,0x0a,0xb1,0x06,0x2c,0x00 },
+ 16, 0xd370, 0, {0xab,0x00,0x22,0x40,0x08,0xb0,0x02,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd380, 0, {0x08,0x04,0x0c,0x02,0xa3,0x00,0x2c,0xc1,0x08,0x20,0x02,0x0c,0x02,0x8b,0x00,0x28 },
+ 16, 0xd390, 0, {0xc2,0x0a,0x00,0x02,0x44,0x10,0x83,0x10,0x22,0x40,0x0b,0x10,0x06,0x0c,0x00,0x91 },
+ 16, 0xd3a0, 0, {0x04,0xaa,0x00,0x28,0x30,0x02,0x2c,0x00,0xa1,0x01,0x20,0x40,0x09,0xb0,0x02,0x42 },
+ 16, 0xd3b0, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x00,0x8f,0x00,0x3e,0xc0 },
+ 16, 0xd3c0, 0, {0x2c,0xa0,0x03,0x29,0x40,0xa8,0x40,0x32,0xcc,0x8b,0x80,0x02,0xe0,0x00,0xcf,0x40 },
+ 16, 0xd3d0, 0, {0x32,0x00,0x0e,0x80,0x0a,0x20,0x00,0x88,0x00,0x22,0x40,0x0c,0xb0,0x03,0x2c,0x04 },
+ 16, 0xd3e0, 0, {0xeb,0x00,0xb2,0x40,0x8c,0xb0,0x03,0x40,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd3f0, 0, {0xa0,0x1d,0xfc,0x00,0xdf,0x00,0x3f,0x40,0x0f,0xe0,0x03,0xfc,0x80,0xff,0x28,0x3d },
+ 16, 0xd400, 0, {0xc0,0x0b,0xc1,0x03,0xb0,0x14,0xff,0x00,0x3f,0x00,0x0d,0xd0,0x03,0xdc,0x00,0xfc },
+ 16, 0xd410, 0, {0x00,0x37,0x40,0x0f,0xf0,0x21,0xfc,0x00,0x1d,0x00,0x7b,0x40,0x8f,0xf0,0x03,0xe0 },
+ 16, 0xd420, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xd2,0x00,0xdf,0x00,0x31,0xa0 },
+ 16, 0xd430, 0, {0x4d,0xf0,0x43,0x32,0x00,0xce,0x14,0x1b,0x68,0x0e,0xda,0x23,0xb2,0xc0,0x2f,0x00 },
+ 16, 0xd440, 0, {0x3f,0xc2,0x2c,0xe8,0x03,0x3c,0x40,0xfd,0x08,0x3b,0xc8,0x4c,0xf0,0x83,0x3c,0xa0 },
+ 16, 0xd450, 0, {0xcf,0x00,0x33,0xc4,0x0c,0xf3,0x07,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd460, 0, {0x80,0x10,0xe2,0x00,0x8f,0xc0,0x22,0xa0,0x08,0xfd,0x42,0x2f,0x00,0x8b,0x70,0x22 },
+ 16, 0xd470, 0, {0x1e,0x48,0x89,0x02,0x27,0xc0,0x8f,0x5a,0x2e,0x50,0x48,0x30,0x02,0xbd,0xc0,0xbd },
+ 16, 0xd480, 0, {0x40,0x23,0xc5,0x48,0xf4,0x82,0x3d,0x2c,0x87,0x70,0x22,0xc0,0x08,0xf1,0x03,0xe0 },
+ 16, 0xd490, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xe0,0x00,0x93,0x10,0x26,0x81 },
+ 16, 0xd4a0, 0, {0x49,0x30,0x02,0x80,0x40,0x83,0x20,0x28,0x40,0x0a,0x10,0x02,0x80,0x00,0xa3,0x24 },
+ 16, 0xd4b0, 0, {0x2c,0xca,0x08,0x32,0x82,0x0c,0x00,0x91,0x28,0x20,0xca,0x1b,0x32,0x02,0x0c,0x88 },
+ 16, 0xd4c0, 0, {0x83,0x09,0x20,0xc8,0x09,0x32,0x02,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd4d0, 0, {0xc0,0x15,0xa3,0x14,0x8b,0x04,0x26,0x89,0x08,0xb0,0x02,0xac,0x22,0x8b,0x88,0x2a },
+ 16, 0xd4e0, 0, {0x20,0x08,0x98,0x82,0xa6,0x10,0xab,0x00,0x2e,0xca,0x08,0xb0,0x82,0xac,0x00,0xb9 },
+ 16, 0xd4f0, 0, {0x00,0x22,0xc0,0x29,0xb0,0x0a,0x2c,0x01,0x8b,0x00,0x22,0xc0,0x09,0xb0,0x22,0xf0 },
+ 16, 0xd500, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe3,0x00,0xdb,0x00,0x34,0xe2 },
+ 16, 0xd510, 0, {0x0d,0xb0,0x03,0xa3,0x00,0xca,0x80,0xba,0x70,0x0e,0x88,0x03,0xa6,0x00,0xeb,0x00 },
+ 16, 0xd520, 0, {0x3e,0x90,0x0c,0xb5,0x03,0x2c,0x00,0xfb,0x10,0xba,0xc0,0x0e,0xb0,0x03,0x2c,0x02 },
+ 16, 0xd530, 0, {0xcb,0x02,0x32,0xc0,0x09,0xb0,0x02,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd540, 0, {0xe0,0x01,0xb0,0x08,0xff,0x00,0xbb,0xe0,0x0f,0x70,0x03,0x65,0x00,0xf4,0x00,0x35 },
+ 16, 0xd550, 0, {0x40,0x0f,0x40,0x03,0x54,0x00,0xdf,0x00,0x3e,0x40,0x0f,0xf8,0x03,0xec,0x00,0xf7 },
+ 16, 0xd560, 0, {0x01,0x3d,0xc1,0x0e,0x30,0x03,0xec,0x00,0xff,0x00,0x3f,0xc0,0x8e,0xf0,0x03,0xb8 },
+ 16, 0xd570, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa0,0x40,0xeb,0x08,0x3e,0x80 },
+ 16, 0xd580, 0, {0x0d,0xb0,0x03,0xe0,0x00,0xc8,0x00,0x3a,0x51,0x0f,0x82,0x03,0x64,0x20,0xdb,0x00 },
+ 16, 0xd590, 0, {0x3d,0x82,0x0c,0xbc,0x03,0x2c,0x10,0xdb,0x00,0x72,0xc0,0x0d,0xb1,0x03,0x0c,0x20 },
+ 16, 0xd5a0, 0, {0xd3,0x00,0x32,0xc0,0x0f,0xb0,0x0b,0x50,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd5b0, 0, {0xc8,0x05,0x01,0x00,0x87,0xc0,0x2e,0xa8,0x08,0xf1,0x12,0xc5,0x40,0x88,0x00,0x22 },
+ 16, 0xd5c0, 0, {0x40,0x0b,0x84,0x02,0x27,0x00,0xaf,0x00,0x2e,0xc0,0x08,0xbc,0x12,0x3c,0x00,0x8b },
+ 16, 0xd5d0, 0, {0x01,0x23,0xc0,0x28,0xf5,0x4a,0x3d,0x28,0xdf,0x00,0x33,0xc0,0x4b,0xf0,0x03,0x32 },
+ 16, 0xd5e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x48,0x80,0xa3,0x90,0x2c,0x00 },
+ 16, 0xd5f0, 0, {0x08,0x30,0x02,0xc1,0x00,0x92,0x04,0x28,0x00,0x0b,0x14,0x12,0x43,0x00,0xb3,0x04 },
+ 16, 0xd600, 0, {0x2c,0x30,0x0a,0xb0,0x0a,0x8c,0x00,0x93,0x00,0x60,0xc0,0x08,0x3c,0x06,0x0e,0x01 },
+ 16, 0xd610, 0, {0xb3,0x00,0x2e,0xc0,0x8b,0x30,0x06,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd620, 0, {0x20,0x01,0x12,0x00,0x87,0x80,0x2d,0x24,0x08,0x78,0x02,0xd2,0x00,0x95,0x80,0x21 },
+ 16, 0xd630, 0, {0xa0,0x0b,0x68,0x02,0x5a,0x20,0x87,0x80,0x2d,0x66,0x1a,0x7c,0x02,0x9e,0x00,0x87 },
+ 16, 0xd640, 0, {0x80,0x21,0xe1,0x18,0x79,0x02,0x9e,0x40,0xb7,0x80,0xa1,0xe0,0x0b,0x78,0x02,0x48 },
+ 16, 0xd650, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x00,0x00,0xe3,0xa0,0x3c,0x40 },
+ 16, 0xd660, 0, {0x0c,0x30,0x03,0xc4,0x22,0xd9,0x00,0x38,0xd4,0x0f,0x30,0x83,0x68,0x40,0xf3,0x00 },
+ 16, 0xd670, 0, {0x3c,0x80,0x0a,0x32,0x02,0x8c,0x00,0xdb,0x00,0xa2,0xc4,0x0c,0x30,0x03,0x0c,0x00 },
+ 16, 0xd680, 0, {0xf3,0x00,0x3c,0xc0,0x0f,0xb1,0x03,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd690, 0, {0x40,0x0d,0xb0,0x00,0xff,0x10,0x3f,0x40,0x0e,0xf0,0x03,0xfc,0x00,0xed,0x00,0x3f },
+ 16, 0xd6a0, 0, {0xc0,0x0f,0x30,0x13,0xbc,0x40,0x7f,0x10,0x3f,0xc1,0x2d,0xf0,0x03,0x7c,0x00,0xfb },
+ 16, 0xd6b0, 0, {0x40,0x3f,0xc2,0x0e,0xf4,0x83,0x7c,0x00,0xdf,0x00,0x3f,0xc2,0x0f,0xf0,0x03,0x90 },
+ 16, 0xd6c0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xdb,0xa0,0x32,0xc0 },
+ 16, 0xd6d0, 0, {0x0d,0xb7,0x03,0xe0,0x00,0xca,0x04,0x3e,0x80,0x0f,0xb8,0x03,0x2c,0x10,0xfb,0x00 },
+ 16, 0xd6e0, 0, {0x33,0x00,0x8d,0xb0,0x03,0x2c,0x80,0xe9,0x40,0x3e,0xd2,0x0f,0xb4,0x03,0x2d,0x80 },
+ 16, 0xd6f0, 0, {0xeb,0x20,0xb2,0xc0,0x0f,0xb2,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd700, 0, {0x48,0x11,0x90,0x00,0xb7,0x10,0x11,0xc0,0x08,0x70,0x82,0xd8,0x0a,0x87,0x01,0x2d },
+ 16, 0xd710, 0, {0x80,0x89,0x70,0x03,0xd8,0x08,0xb7,0x0a,0x21,0x40,0x2c,0x70,0x02,0x0d,0xc0,0x85 },
+ 16, 0xd720, 0, {0x01,0x79,0xc8,0x0b,0x32,0x02,0x0d,0x20,0x8f,0x28,0x21,0xc0,0x0b,0x72,0x82,0xd2 },
+ 16, 0xd730, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x40,0x96,0x10,0x97,0x90,0x23,0xe0 },
+ 16, 0xd740, 0, {0x09,0x7a,0x02,0xd6,0x00,0x97,0x80,0x2d,0xf0,0x0b,0x78,0x82,0x1e,0x00,0xb3,0xb0 },
+ 16, 0xd750, 0, {0x21,0xa0,0x08,0x78,0x02,0x1e,0x00,0xa5,0x80,0x2d,0xe0,0x0b,0x7a,0x02,0x1e,0x80 },
+ 16, 0xd760, 0, {0xa7,0xb0,0x21,0xe8,0x0b,0x79,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd770, 0, {0x48,0x14,0xc0,0x00,0xb3,0x00,0x20,0xe2,0x08,0x30,0x02,0xc6,0x40,0x93,0x70,0x2c },
+ 16, 0xd780, 0, {0xc0,0x09,0x3c,0x02,0x8e,0x00,0xb3,0x00,0x20,0xd8,0x08,0x18,0x02,0x0c,0x00,0x81 },
+ 16, 0xd790, 0, {0x90,0x2e,0xc0,0x0b,0x30,0x2a,0x2c,0x10,0x83,0x00,0xa0,0xc0,0x0b,0x30,0x02,0xd2 },
+ 16, 0xd7a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x11,0xb9,0x00,0xda,0x02,0x33,0xb8 },
+ 16, 0xd7b0, 0, {0x0d,0xa0,0x03,0xf8,0x00,0xde,0xc0,0x3f,0xb0,0x4f,0xec,0x06,0x38,0x40,0xfa,0x00 },
+ 16, 0xd7c0, 0, {0xb3,0x90,0x0c,0x6c,0x0b,0x28,0x08,0xea,0x01,0x7e,0x80,0x0f,0xa0,0x03,0x28,0x00 },
+ 16, 0xd7d0, 0, {0xea,0x00,0x32,0x80,0x0f,0xa0,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd7e0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x40,0x3a,0x00,0x0f,0x84,0x03,0xe1,0x00,0xe8,0x02,0x3e },
+ 16, 0xd7f0, 0, {0x00,0x0f,0x84,0x03,0xe1,0x40,0xf8,0x00,0x3e,0x00,0x0f,0x81,0x03,0xe0,0x00,0xf8 },
+ 16, 0xd800, 0, {0x00,0x3a,0x00,0x0f,0x80,0x03,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0xd810, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x20,0xf9,0xc0,0x3e,0x70 },
+ 16, 0xd820, 0, {0x0e,0x90,0x02,0xe4,0x80,0xc9,0x00,0x32,0x42,0x0c,0x98,0x83,0xa4,0x84,0xf9,0x00 },
+ 16, 0xd830, 0, {0xb2,0x60,0x0c,0x90,0x83,0x24,0x00,0xc9,0x00,0x3e,0x40,0x0c,0x1a,0x02,0x24,0x00 },
+ 16, 0xd840, 0, {0xc1,0x00,0xb2,0x40,0x0f,0x90,0x01,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd850, 0, {0x80,0x04,0x65,0x00,0xb9,0x81,0x2c,0x60,0x0d,0x94,0xc2,0xc7,0x08,0x89,0x00,0x22 },
+ 16, 0xd860, 0, {0x40,0x08,0x95,0xc7,0xa4,0x00,0xb9,0x00,0x28,0x70,0xa8,0x94,0x0a,0x24,0x00,0x89 },
+ 16, 0xd870, 0, {0x04,0x2e,0x40,0x28,0x90,0x2a,0x26,0x00,0x89,0x00,0x22,0x40,0x0b,0x90,0x02,0xe0 },
+ 16, 0xd880, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x40,0x2e,0x40 },
+ 16, 0xd890, 0, {0x0a,0x90,0x02,0xe5,0x00,0x81,0x00,0xa0,0x40,0x09,0x90,0x42,0xec,0x00,0xb1,0x00 },
+ 16, 0xd8a0, 0, {0x22,0x58,0x08,0x90,0xa2,0x04,0x02,0x89,0x00,0x2e,0x40,0x08,0x90,0x02,0xa4,0xa0 },
+ 16, 0xd8b0, 0, {0x89,0x00,0x22,0x40,0x0b,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd8c0, 0, {0x08,0x04,0x04,0x00,0xb1,0x20,0x2e,0xc0,0x89,0x12,0x02,0xc4,0x80,0x81,0x20,0x20 },
+ 16, 0xd8d0, 0, {0x40,0x61,0x10,0x42,0xc5,0x00,0xb1,0x20,0x28,0x48,0x18,0x90,0x42,0x04,0x80,0x81 },
+ 16, 0xd8e0, 0, {0x28,0x2c,0x48,0x08,0x12,0x82,0x84,0xa0,0x81,0x20,0x20,0x48,0x0b,0x12,0x82,0xc2 },
+ 16, 0xd8f0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x68,0x00,0xf8,0x00,0x2e,0x00 },
+ 16, 0xd900, 0, {0x0e,0x80,0x03,0xe0,0x08,0xc8,0x50,0x32,0x14,0x0d,0x80,0x17,0xe8,0x04,0xf8,0x50 },
+ 16, 0xd910, 0, {0x32,0x14,0x4c,0x05,0x0b,0x21,0x40,0xc8,0x20,0x3e,0x00,0x0c,0x87,0x03,0xa1,0xc2 },
+ 16, 0xd920, 0, {0xc8,0x00,0x32,0x14,0x8f,0x82,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd930, 0, {0x98,0x1d,0xf4,0x00,0xf1,0x10,0x3d,0x40,0x0f,0x91,0x02,0xd4,0x42,0xfd,0x10,0x3f },
+ 16, 0xd940, 0, {0x51,0x0e,0x54,0x13,0xb5,0x00,0xf9,0x10,0x35,0x44,0x2f,0xd0,0x03,0xe4,0x50,0xfd },
+ 16, 0xd950, 0, {0x28,0x3e,0x4e,0x0f,0x90,0x03,0x64,0x00,0xf9,0x38,0x3e,0x44,0x0f,0x92,0x83,0xe6 },
+ 16, 0xd960, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xf4,0x00,0xfd,0x00,0x3d,0x40 },
+ 16, 0xd970, 0, {0x2c,0xd0,0x03,0xb6,0x00,0xf9,0x82,0x3e,0x40,0x0c,0xd0,0x03,0xf4,0x00,0xf9,0x80 },
+ 16, 0xd980, 0, {0x33,0x70,0x0c,0x50,0x03,0x34,0x00,0xc9,0xc0,0x3e,0x40,0x0c,0xda,0x03,0x16,0x80 },
+ 16, 0xd990, 0, {0xc9,0x40,0x3e,0x62,0x2c,0x98,0x83,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd9a0, 0, {0x38,0x10,0xe0,0x00,0xb8,0x00,0x2e,0x00,0x08,0x80,0x02,0x28,0x00,0xb8,0x50,0x26 },
+ 16, 0xd9b0, 0, {0x00,0x08,0xa0,0x02,0xe8,0x00,0xb8,0x00,0x2a,0x34,0x2a,0xaa,0x0a,0x20,0x00,0x88 },
+ 16, 0xd9c0, 0, {0xc0,0x2e,0x2a,0x08,0x80,0x22,0x21,0x00,0xa8,0x80,0x2e,0x00,0x08,0x80,0x02,0x0e },
+ 16, 0xd9d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0xb1,0x00,0x2e,0x40 },
+ 16, 0xd9e0, 0, {0x48,0x10,0x06,0x8d,0x00,0xb1,0x00,0x2c,0x40,0x28,0x10,0x02,0xc4,0x00,0xb1,0x40 },
+ 16, 0xd9f0, 0, {0x2c,0x48,0x08,0x10,0x82,0x44,0x00,0x81,0x60,0x2c,0x40,0x28,0x14,0x0a,0x04,0x40 },
+ 16, 0xda00, 0, {0x81,0x20,0x2c,0x40,0x08,0x10,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xda10, 0, {0x18,0x05,0xa4,0x40,0xb9,0x00,0x2e,0x40,0x08,0xb0,0x02,0x24,0x00,0xb9,0x28,0x2e },
+ 16, 0xda20, 0, {0x50,0x08,0x90,0x22,0xe4,0x00,0xb9,0x00,0x2e,0x60,0x0b,0x12,0x42,0x64,0x00,0x89 },
+ 16, 0xda30, 0, {0x00,0x2c,0x40,0x09,0x90,0x02,0x24,0x00,0xa9,0x00,0x2c,0x40,0x08,0x10,0x02,0x46 },
+ 16, 0xda40, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe6,0x00,0xf9,0x00,0x3c,0x42 },
+ 16, 0xda50, 0, {0x0c,0x90,0x03,0xa7,0x40,0xf9,0x40,0x3e,0x70,0x0c,0x98,0x02,0xe5,0x40,0xf9,0x00 },
+ 16, 0xda60, 0, {0x3e,0x40,0x0c,0x98,0x03,0x64,0x06,0xc9,0x01,0x2e,0x40,0x0c,0x90,0x03,0x24,0x04 },
+ 16, 0xda70, 0, {0xc9,0x00,0x3e,0x40,0x0c,0x90,0x0b,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xda80, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x83,0xe6,0x10,0xf9,0x00,0x36 },
+ 16, 0xda90, 0, {0x68,0x0f,0x9c,0x03,0xe6,0x00,0xf9,0x00,0x3a,0x40,0x0e,0x98,0x93,0xa4,0x00,0xf9 },
+ 16, 0xdaa0, 0, {0x00,0x3e,0x40,0x0e,0x90,0x83,0xc4,0x00,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x03,0x8a },
+ 16, 0xdab0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa0,0x00,0xf8,0x00,0x3e,0x04 },
+ 16, 0xdac0, 0, {0x0c,0x80,0x03,0x21,0x02,0xc8,0x40,0x32,0x00,0x0f,0x80,0x03,0xe1,0x00,0xf0,0x00 },
+ 16, 0xdad0, 0, {0x3e,0x02,0x0c,0x80,0x03,0x20,0x00,0xf8,0x00,0x3e,0x00,0x0c,0x00,0x03,0x20,0x00 },
+ 16, 0xdae0, 0, {0xc8,0x00,0x32,0x00,0x0f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdaf0, 0, {0x28,0x15,0x3a,0x00,0xbe,0x02,0x2f,0xb0,0x08,0x68,0x12,0x38,0x00,0x8a,0x04,0x2a },
+ 16, 0xdb00, 0, {0x80,0x0b,0xe0,0x42,0xfb,0x20,0xba,0x00,0x2f,0x91,0x08,0xe0,0x02,0x28,0x00,0xba },
+ 16, 0xdb10, 0, {0x00,0x26,0x80,0x08,0xee,0x0a,0x38,0x00,0x8a,0x00,0x22,0x80,0x0b,0xa0,0x02,0x8a },
+ 16, 0xdb20, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x42,0x00,0xb3,0x00,0x2c,0xc2 },
+ 16, 0xdb30, 0, {0x28,0x38,0x0a,0x48,0x00,0x83,0x04,0x22,0xc0,0x0b,0x10,0x02,0xcd,0x80,0xb3,0x00 },
+ 16, 0xdb40, 0, {0x2e,0xc0,0x08,0x1c,0x02,0x24,0x00,0xb3,0x00,0x2c,0xc0,0x08,0x34,0x12,0x0e,0x40 },
+ 16, 0xdb50, 0, {0x83,0x00,0x20,0xc0,0x0b,0x30,0x12,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdb60, 0, {0xa0,0x01,0x11,0x00,0xb7,0x00,0x2f,0xc0,0x08,0x70,0xa2,0x4e,0x00,0x8f,0xb0,0x21 },
+ 16, 0xdb70, 0, {0xcc,0x0b,0x60,0x12,0xdc,0x10,0xb7,0x30,0x2d,0xc0,0x08,0xd0,0x82,0x14,0x80,0xb7 },
+ 16, 0xdb80, 0, {0x12,0x25,0xc8,0x28,0x60,0x02,0x14,0x00,0x87,0xb2,0x21,0xcc,0x0b,0x31,0x02,0xa8 },
+ 16, 0xdb90, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x12,0x00,0xf7,0x80,0x3d,0xe0 },
+ 16, 0xdba0, 0, {0x0c,0x38,0x03,0x56,0x00,0xc7,0x90,0xb1,0xe4,0x0f,0x78,0x03,0xde,0x00,0xf7,0x90 },
+ 16, 0xdbb0, 0, {0x1f,0x60,0x2c,0x48,0x0b,0x16,0xa0,0xf7,0x80,0x3c,0xf4,0x0c,0x38,0x03,0x1e,0x00 },
+ 16, 0xdbc0, 0, {0xcf,0xa0,0xb1,0xe8,0x0f,0x7b,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdbd0, 0, {0x08,0x0d,0xa0,0x00,0xf8,0x00,0x3e,0xc0,0x0b,0xb0,0x03,0xac,0x00,0xf3,0x21,0x3e },
+ 16, 0xdbe0, 0, {0xc8,0x07,0xb0,0x02,0xe4,0x00,0xfb,0x20,0x3f,0x40,0x0f,0x80,0x03,0xe4,0x80,0xfb },
+ 16, 0xdbf0, 0, {0x00,0x36,0xd0,0x0f,0xa0,0x03,0xe0,0x08,0xfb,0x42,0x3e,0xd8,0x0f,0xb0,0x03,0xc2 },
+ 16, 0xdc00, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf0,0x80,0xcf,0x80,0x31,0xe1 },
+ 16, 0xdc10, 0, {0x0c,0xf8,0x03,0xda,0x10,0xef,0x80,0x3f,0xe4,0x0f,0xd8,0x03,0xfe,0x10,0xff,0x82 },
+ 16, 0xdc20, 0, {0x3f,0xe0,0x4c,0xd8,0x1b,0x16,0x20,0xcf,0x80,0x3f,0xe0,0x4c,0xd8,0x30,0xee,0x40 },
+ 16, 0xdc30, 0, {0xff,0xc0,0xb3,0xf4,0x0f,0xf8,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdc40, 0, {0xa8,0x01,0x98,0x20,0x83,0x40,0x21,0xc0,0x08,0x71,0x02,0xdc,0x84,0x87,0x20,0x2d },
+ 16, 0xdc50, 0, {0xc0,0x0b,0x60,0x02,0xd9,0x60,0xf7,0x00,0x2d,0xc0,0x08,0xf0,0x82,0x14,0x04,0x87 },
+ 16, 0xdc60, 0, {0x00,0x2d,0xc0,0x08,0xf0,0x03,0x1e,0x00,0xb7,0x20,0x21,0xc0,0x8b,0x70,0x02,0xea },
+ 16, 0xdc70, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x00,0x87,0x00,0x21,0x80 },
+ 16, 0xdc80, 0, {0x08,0x70,0x02,0xf5,0x04,0x27,0x00,0x2d,0xc0,0x8b,0x70,0x02,0xdc,0x00,0xb7,0x00 },
+ 16, 0xdc90, 0, {0x2c,0x50,0x08,0x40,0x02,0x14,0x00,0x87,0x00,0x2d,0xc0,0x08,0x50,0x02,0x5c,0x04 },
+ 16, 0xdca0, 0, {0xb7,0x00,0xa1,0xc0,0x8b,0x70,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdcb0, 0, {0x20,0x14,0xc8,0x00,0x80,0x00,0x00,0x80,0x08,0x30,0x02,0xce,0x00,0x83,0xc0,0x2c },
+ 16, 0xdcc0, 0, {0xd0,0x4b,0x30,0x02,0xce,0x00,0xab,0x02,0x2c,0x40,0x48,0xbc,0x02,0x04,0x00,0x83 },
+ 16, 0xdcd0, 0, {0x00,0x2c,0xc0,0x08,0x10,0x02,0x00,0x08,0xb3,0x00,0x20,0xc0,0x09,0x30,0x02,0xc8 },
+ 16, 0xdce0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0x83,0x40,0xc8,0x00,0x30,0xc0 },
+ 16, 0xdcf0, 0, {0x2c,0xb0,0x03,0xec,0x00,0xef,0x88,0x3f,0xe6,0x07,0xb1,0x83,0xe1,0x00,0xbf,0x00 },
+ 16, 0xdd00, 0, {0x3e,0xe0,0x0c,0xb8,0x03,0x34,0x00,0xcf,0x00,0x3f,0xc0,0x2c,0xb0,0x03,0x68,0x10 },
+ 16, 0xdd10, 0, {0xff,0x00,0x33,0xc0,0x0f,0xf0,0x03,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdd20, 0, {0x80,0x00,0xe4,0x00,0xf1,0x40,0x3e,0xc0,0x0f,0xb4,0x03,0xed,0x40,0xfb,0x08,0x3e },
+ 16, 0xdd30, 0, {0xc0,0x0f,0xa0,0x03,0xe5,0x20,0xfb,0x00,0x3e,0xe0,0x0d,0xb0,0x83,0xe4,0x00,0xf3 },
+ 16, 0xdd40, 0, {0x00,0x3e,0xc0,0x0f,0x80,0x03,0xc4,0x00,0xfb,0x00,0x3e,0xc0,0x0f,0x30,0x03,0xe0 },
+ 16, 0xdd50, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x00,0xca,0x00,0x33,0xe0 },
+ 16, 0xdd60, 0, {0x4e,0xf0,0x03,0x34,0x00,0xff,0x00,0x3f,0xc0,0x8f,0xe8,0x03,0xf0,0x00,0xff,0x00 },
+ 16, 0xdd70, 0, {0xb1,0x40,0x0c,0xe0,0x03,0x34,0x00,0xef,0x00,0xb3,0xc0,0x0c,0xf0,0x03,0x38,0x00 },
+ 16, 0xdd80, 0, {0xcf,0x00,0x3d,0xc0,0x0a,0xf0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdd90, 0, {0x81,0x04,0x62,0x22,0x88,0x90,0x22,0xe0,0x08,0x3c,0x02,0x2e,0x08,0xbb,0x01,0x2e },
+ 16, 0xdda0, 0, {0xc0,0x0b,0xa0,0x02,0x66,0x00,0xbb,0x00,0x22,0xa0,0x08,0xa9,0x02,0x24,0x00,0xbb },
+ 16, 0xddb0, 0, {0x00,0x22,0xc0,0x28,0x2c,0x02,0xa2,0x00,0xdb,0x00,0x2e,0xc0,0x0a,0xb0,0x02,0xa0 },
+ 16, 0xddc0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x22,0x00,0x98,0x00,0x22,0xc8 },
+ 16, 0xddd0, 0, {0x0a,0x98,0x02,0x27,0x04,0xbb,0x00,0x2e,0xc0,0x0b,0xb1,0x02,0xe2,0x00,0xbb,0x00 },
+ 16, 0xdde0, 0, {0x22,0xe2,0x08,0xb0,0x02,0xa4,0x00,0xab,0x00,0x20,0xc0,0x0a,0x88,0x82,0x23,0x00 },
+ 16, 0xddf0, 0, {0x8b,0x00,0x2e,0xc0,0x08,0xb0,0x02,0xa0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xde00, 0, {0x08,0x14,0x04,0x00,0x91,0x40,0x22,0xc0,0x08,0x10,0x02,0x0c,0x00,0xb3,0x00,0x2c },
+ 16, 0xde10, 0, {0xc0,0x4b,0x28,0x22,0x40,0x04,0xb3,0x00,0x20,0xc0,0x28,0x30,0x0a,0x04,0x04,0xb3 },
+ 16, 0xde20, 0, {0x00,0x60,0xc0,0x08,0x00,0x02,0x84,0x20,0x93,0x00,0x2c,0xc0,0x0a,0x30,0x02,0x82 },
+ 16, 0xde30, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x60,0x00,0xda,0x40,0xb2,0x80 },
+ 16, 0xde40, 0, {0x0e,0x90,0x03,0x24,0x00,0xff,0x00,0x3f,0xc0,0x8f,0xa0,0x03,0xe0,0x09,0xff,0x00 },
+ 16, 0xde50, 0, {0x32,0x40,0x08,0xa0,0x0b,0x34,0x00,0xeb,0x00,0x31,0xc0,0x0c,0x80,0x03,0x28,0x80 },
+ 16, 0xde60, 0, {0xc7,0x00,0x3f,0xc0,0x0c,0xf0,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xde70, 0, {0xa0,0x15,0xd0,0x00,0xec,0x20,0x3f,0x00,0x0f,0xc0,0x0b,0xfc,0x10,0xff,0x01,0x3f },
+ 16, 0xde80, 0, {0xc0,0x0f,0xe0,0x03,0xf4,0x00,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xf4,0x00,0xff },
+ 16, 0xde90, 0, {0x00,0x3f,0xc0,0x4f,0xc0,0x01,0xf0,0x08,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xe8 },
+ 16, 0xdea0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xcc,0x90,0x37,0x20 },
+ 16, 0xdeb0, 0, {0x0e,0xf0,0x13,0xbd,0x04,0xd4,0xc1,0x33,0x2c,0x4c,0xd9,0x23,0x32,0x60,0xff,0x20 },
+ 16, 0xdec0, 0, {0x3d,0xe0,0x4f,0xc1,0x03,0xb6,0x40,0xcd,0x00,0x37,0xe0,0x0c,0xe2,0x8b,0x10,0xc0 },
+ 16, 0xded0, 0, {0xcd,0x00,0x33,0xc6,0x0f,0xd8,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdee0, 0, {0x80,0x10,0xee,0x08,0x8a,0x20,0x22,0x00,0x08,0xb7,0x02,0x2d,0x00,0x8a,0x00,0xb6 },
+ 16, 0xdef0, 0, {0x3c,0x08,0x99,0x02,0x27,0x84,0xbf,0x68,0x2e,0x82,0x0b,0x01,0x02,0x24,0x40,0xd9 },
+ 16, 0xdf00, 0, {0x42,0x20,0xc0,0x8a,0xac,0x02,0x2d,0xc2,0x82,0x48,0xa2,0xd0,0x0b,0x82,0x02,0x20 },
+ 16, 0xdf10, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0x88,0x04,0x26,0x80 },
+ 16, 0xdf20, 0, {0x2a,0x30,0xc2,0xa5,0x80,0xa9,0x21,0x28,0x00,0x8a,0x00,0x02,0x00,0x00,0xa3,0x10 },
+ 16, 0xdf30, 0, {0x2c,0xc8,0x0b,0x00,0x02,0xc4,0x90,0x83,0x42,0x24,0xc1,0x08,0x00,0x02,0x40,0x88 },
+ 16, 0xdf40, 0, {0xa3,0x60,0xa8,0xc0,0x0b,0x00,0xc2,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdf50, 0, {0xc0,0x15,0xac,0x06,0x8a,0x00,0x22,0xe0,0x48,0xb0,0x02,0x2e,0x02,0xab,0x80,0x2e },
+ 16, 0xdf60, 0, {0x20,0x4a,0x8c,0x02,0x26,0x20,0xbb,0x00,0x6e,0x80,0x0b,0x30,0xc2,0x46,0x04,0x9b },
+ 16, 0xdf70, 0, {0x0a,0xa2,0xc0,0x0a,0x80,0x12,0x6c,0x40,0xa8,0x00,0x2a,0xc0,0x0b,0x8c,0x02,0x30 },
+ 16, 0xdf80, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xc1,0x09,0x36,0x61 },
+ 16, 0xdf90, 0, {0x0e,0x32,0x03,0xab,0x20,0xf8,0x84,0x3a,0x78,0x2e,0x98,0x03,0x26,0x00,0xeb,0x00 },
+ 16, 0xdfa0, 0, {0x3e,0x40,0x4f,0x90,0x03,0xe2,0x00,0xc9,0x40,0x36,0xe0,0x0c,0xb4,0x03,0x6e,0x00 },
+ 16, 0xdfb0, 0, {0xeb,0x00,0x3a,0xc0,0x0f,0x88,0x03,0x10,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdfc0, 0, {0xe0,0x01,0xbc,0x00,0xfd,0x00,0x3f,0x40,0x0f,0xfa,0x13,0xf8,0x10,0xdc,0x04,0x27 },
+ 16, 0xdfd0, 0, {0x40,0x0d,0x50,0x43,0xf4,0x00,0xff,0x00,0x3f,0x40,0x0f,0xd9,0x03,0xb0,0x00,0xf9 },
+ 16, 0xdfe0, 0, {0x01,0x3f,0xf0,0x0f,0xf0,0x23,0xb2,0x00,0xd4,0xa0,0x37,0xc0,0x0f,0xc0,0x0b,0xf8 },
+ 16, 0xdff0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x20,0xeb,0x10,0xf2,0x00 },
+ 16, 0xe000, 0, {0x0e,0xb4,0x03,0x21,0x80,0xc9,0x40,0x3a,0x48,0x0f,0x90,0x13,0xe1,0x20,0xfb,0x00 },
+ 16, 0xe010, 0, {0x3e,0xc0,0x0c,0x84,0x03,0x24,0x00,0xfb,0x01,0x36,0xe0,0x0c,0x74,0x0b,0x9c,0x00 },
+ 16, 0xe020, 0, {0xcf,0x00,0x32,0xe0,0x0f,0x84,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe030, 0, {0xc8,0x05,0x1e,0x00,0x8b,0x80,0x20,0x40,0x08,0xb8,0x02,0x83,0x80,0x81,0xa0,0x22 },
+ 16, 0xe040, 0, {0x78,0x0b,0x91,0x83,0xe3,0x00,0xbf,0x00,0x0e,0xc1,0x0a,0xb4,0x03,0x64,0x04,0xb9 },
+ 16, 0xe050, 0, {0x50,0x32,0xc0,0x0a,0xb2,0x02,0x20,0x00,0x88,0x00,0x23,0xd4,0x0b,0x88,0x02,0xf2 },
+ 16, 0xe060, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x42,0xa0,0x80,0x20,0x00 },
+ 16, 0xe070, 0, {0x48,0x00,0x02,0x0d,0x06,0x80,0x80,0x2a,0xd0,0x03,0x00,0x02,0xc8,0x00,0xb3,0x00 },
+ 16, 0xe080, 0, {0x2c,0xc0,0x08,0x36,0x02,0x40,0x00,0xb9,0x02,0x22,0xc2,0x8b,0x26,0x02,0x0c,0x10 },
+ 16, 0xe090, 0, {0x01,0x02,0x24,0xc0,0x4b,0xa1,0x02,0xf8,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe0a0, 0, {0x20,0x01,0x1e,0x08,0x8e,0x80,0x21,0x21,0x08,0x28,0xc2,0x9e,0x00,0x8e,0x80,0x21 },
+ 16, 0xe0b0, 0, {0x60,0x0b,0x78,0x02,0x9e,0x20,0xb7,0x82,0x2f,0xa1,0x0a,0x78,0x02,0x5e,0x00,0xb5 },
+ 16, 0xe0c0, 0, {0x91,0xa1,0xe0,0x0b,0x29,0x02,0x32,0x44,0x86,0x80,0xa5,0xe0,0x0b,0x4c,0x02,0xc8 },
+ 16, 0xe0d0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xe1,0x00,0x22,0x80 },
+ 16, 0xe0e0, 0, {0x0e,0x00,0x0b,0x24,0x00,0xc0,0x44,0x28,0xad,0x0f,0x20,0x02,0xc8,0x00,0xf3,0x00 },
+ 16, 0xe0f0, 0, {0x1c,0xc0,0x0c,0x01,0x03,0x48,0x4c,0xf2,0x04,0x30,0xc0,0x0f,0x15,0x03,0x80,0x40 },
+ 16, 0xe100, 0, {0xc1,0x00,0x14,0xc8,0x0f,0x00,0x03,0xda,0x02,0x10,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe110, 0, {0x40,0x1d,0x9c,0x40,0xf7,0x00,0x3f,0xc0,0x8f,0xc0,0x03,0xe4,0x00,0xfa,0x01,0x3f },
+ 16, 0xe120, 0, {0xc0,0x0f,0xf0,0x23,0xfc,0x08,0xfb,0x00,0x3f,0x80,0x0f,0xf0,0x01,0xfc,0x10,0xff },
+ 16, 0xe130, 0, {0x00,0x3f,0xc0,0x0e,0xd1,0x03,0xfc,0x42,0xfe,0x80,0x3b,0xc0,0x0f,0xc0,0x03,0xd0 },
+ 16, 0xe140, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x40,0xc8,0x00,0x3e,0xc0 },
+ 16, 0xe150, 0, {0x0f,0x90,0x03,0xee,0x08,0xcb,0x00,0x32,0xc0,0x0f,0xa0,0x23,0xe6,0x03,0xcb,0x4c },
+ 16, 0xe160, 0, {0x32,0x40,0x0f,0xb0,0x07,0xe8,0x00,0xf9,0x00,0x16,0x40,0x0c,0xa0,0x0b,0x6c,0x00 },
+ 16, 0xe170, 0, {0xcf,0x02,0x32,0xc5,0x0c,0x80,0x03,0x02,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe180, 0, {0x48,0x11,0x9c,0x80,0x84,0x04,0x2d,0xc1,0x0b,0x40,0x40,0xdc,0x00,0x87,0x04,0x21 },
+ 16, 0xe190, 0, {0xc0,0x4b,0x70,0x12,0xfc,0x01,0x8f,0x60,0x29,0x40,0x0b,0x70,0x13,0x9c,0x00,0xb5 },
+ 16, 0xe1a0, 0, {0x00,0xa3,0x40,0x0a,0x60,0x02,0x00,0x00,0x84,0x00,0x21,0xc0,0x08,0x40,0x02,0x12 },
+ 16, 0xe1b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x8e,0x00,0x87,0x80,0x2d,0xa2 },
+ 16, 0xe1c0, 0, {0x0b,0x4c,0x16,0xd6,0x08,0x97,0x88,0x21,0xa0,0x4b,0x68,0x02,0xde,0x04,0xa7,0x80 },
+ 16, 0xe1d0, 0, {0x21,0xe0,0x0b,0x48,0x02,0xda,0x04,0xb6,0x82,0x25,0x60,0x0a,0xe8,0x62,0x1e,0x00 },
+ 16, 0xe1e0, 0, {0x87,0x80,0x20,0xe8,0x08,0x48,0x02,0x08,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe1f0, 0, {0x48,0x14,0xcc,0x00,0x8b,0x80,0x6c,0xf0,0x0b,0x3c,0x02,0xce,0x46,0x9b,0xc0,0x20 },
+ 16, 0xe200, 0, {0xe4,0x0b,0x3c,0x02,0xcc,0x20,0xa3,0x00,0x28,0xe0,0x0b,0x30,0x02,0x8d,0x80,0xb1 },
+ 16, 0xe210, 0, {0x80,0x22,0x44,0x0a,0x21,0x0a,0x03,0x82,0x80,0x80,0xa0,0xc0,0x08,0x06,0x0a,0x12 },
+ 16, 0xe220, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x02,0xce,0x80,0x3f,0xa0 },
+ 16, 0xe230, 0, {0x0f,0xe0,0x03,0xfa,0x40,0xde,0xc0,0xb3,0x90,0x0f,0xea,0x13,0xf9,0x08,0xea,0x04 },
+ 16, 0xe240, 0, {0x33,0x82,0x8f,0xe4,0x03,0xfb,0x08,0xfe,0xa0,0x36,0xa0,0x0c,0xac,0x0b,0x6b,0x82 },
+ 16, 0xe250, 0, {0xc6,0xa0,0x32,0x80,0x2c,0xe4,0x03,0x3a,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe260, 0, {0x48,0x00,0xe0,0x00,0xf8,0x90,0x3e,0x02,0x0f,0x80,0x83,0xe1,0x00,0xe8,0x20,0x3e },
+ 16, 0xe270, 0, {0x03,0x0f,0x82,0x03,0xe1,0x40,0xd8,0x00,0x3e,0x20,0x0f,0x00,0x93,0xa0,0x40,0xf8 },
+ 16, 0xe280, 0, {0x00,0x3e,0x10,0x8f,0x08,0x0b,0xf0,0x00,0xfc,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0xe290, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xe9,0x00,0x36,0x40 },
+ 16, 0xe2a0, 0, {0x0f,0x94,0x07,0xe6,0x00,0xf9,0x80,0xb0,0x40,0x0c,0x94,0x03,0xe4,0x40,0xf9,0x00 },
+ 16, 0xe2b0, 0, {0x32,0x40,0x0f,0x94,0x0b,0xa4,0x00,0x71,0xc0,0x32,0x40,0x2c,0x94,0x23,0x24,0x02 },
+ 16, 0xe2c0, 0, {0xc9,0x00,0x32,0x40,0x0c,0x90,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe2d0, 0, {0x80,0x04,0x44,0x00,0x89,0x00,0x22,0x40,0x0b,0x98,0x02,0xe6,0x60,0xb9,0x00,0x22 },
+ 16, 0xe2e0, 0, {0x60,0x0a,0x9c,0x02,0xe6,0x24,0xb9,0x04,0x36,0x40,0x0b,0x98,0x00,0x24,0x00,0xb9 },
+ 16, 0xe2f0, 0, {0x80,0xa2,0x52,0x08,0x90,0x02,0x24,0x00,0x89,0x40,0x22,0x40,0x68,0x94,0x02,0x20 },
+ 16, 0xe300, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xa9,0x00,0x26,0x40 },
+ 16, 0xe310, 0, {0x03,0x94,0x02,0xe4,0x01,0xb9,0x10,0x22,0x55,0x08,0x90,0x22,0xe4,0x00,0xb1,0x00 },
+ 16, 0xe320, 0, {0x26,0x40,0x0b,0x90,0x00,0x2c,0x09,0xb9,0x00,0x22,0x60,0x08,0x90,0x0a,0x1c,0x04 },
+ 16, 0xe330, 0, {0x8d,0x08,0xa0,0x40,0x08,0x10,0x82,0x0e,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe340, 0, {0x08,0x04,0x06,0x00,0x81,0x00,0x20,0x50,0x0b,0x12,0x42,0xc4,0x80,0xb1,0x04,0x20 },
+ 16, 0xe350, 0, {0x50,0x0a,0x14,0x02,0xc5,0x00,0xb1,0x22,0x24,0x40,0x0b,0x12,0x22,0x04,0x01,0xb1 },
+ 16, 0xe360, 0, {0x40,0x20,0x50,0x08,0x10,0x0a,0x15,0x00,0x85,0x40,0x28,0x50,0x08,0x14,0x0a,0x0a },
+ 16, 0xe370, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xe8,0x50,0x36,0x00 },
+ 16, 0xe380, 0, {0x0f,0x85,0x02,0xe1,0x40,0xf8,0x50,0x32,0x00,0x0c,0xa0,0x23,0xe0,0x10,0xf8,0x50 },
+ 16, 0xe390, 0, {0xb2,0x14,0x0f,0xa5,0x03,0xa1,0x48,0xfa,0x00,0xb2,0x00,0x0c,0x80,0x03,0x20,0x04 },
+ 16, 0xe3a0, 0, {0xc4,0x02,0x32,0x00,0x0c,0x00,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe3b0, 0, {0x98,0x1d,0xe5,0x00,0xfd,0x00,0x3f,0x40,0x0f,0xd1,0x03,0xd4,0x44,0xf5,0x00,0x3f },
+ 16, 0xe3c0, 0, {0x51,0x0f,0xd4,0x03,0xf5,0x00,0xf9,0x10,0x3b,0x40,0x0f,0xd1,0x00,0xf5,0x10,0xf5 },
+ 16, 0xe3d0, 0, {0x40,0x7f,0x40,0x0f,0x54,0x2b,0xe5,0x00,0xf9,0x40,0x36,0x50,0x0f,0xd0,0x03,0xe6 },
+ 16, 0xe3e0, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x10,0xbd,0x40,0x33,0x40 },
+ 16, 0xe3f0, 0, {0x0f,0xda,0x03,0x37,0x80,0xcd,0x00,0x3f,0x40,0x0f,0xd0,0x03,0xf4,0x00,0xe9,0xa0 },
+ 16, 0xe400, 0, {0x3e,0x40,0x0c,0xde,0x17,0xa4,0x08,0xfd,0xc0,0x33,0x41,0x8d,0xda,0x13,0x26,0xa0 },
+ 16, 0xe410, 0, {0xf9,0xa8,0x32,0x78,0x0c,0xb4,0x0b,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe420, 0, {0x38,0x10,0xe1,0x00,0xb8,0xa0,0x36,0x20,0x0b,0x8a,0x82,0xa2,0x80,0x2a,0xa8,0x2e },
+ 16, 0xe430, 0, {0x00,0x0b,0x80,0x12,0xe0,0x04,0xb8,0xa1,0x2e,0x28,0x4a,0x8e,0x02,0x2a,0xa0,0xba },
+ 16, 0xe440, 0, {0xc0,0x22,0x28,0x08,0x85,0x02,0x21,0x08,0xb8,0xe8,0xa2,0x3c,0x08,0xc8,0x02,0x0e },
+ 16, 0xe450, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb9,0x00,0x20,0x4a },
+ 16, 0xe460, 0, {0x0b,0x14,0x02,0x05,0x80,0x01,0x00,0x2c,0x41,0x0b,0x10,0x02,0xc4,0x04,0xa1,0x4a },
+ 16, 0xe470, 0, {0x2e,0x42,0x08,0x14,0x02,0x84,0x10,0xb1,0x60,0xa0,0x4a,0x09,0x10,0x02,0x44,0x00 },
+ 16, 0xe480, 0, {0xb5,0x01,0x29,0x40,0x18,0xd2,0x02,0x12,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe490, 0, {0x18,0x15,0xa4,0x00,0xb9,0x21,0x26,0x40,0x0b,0x96,0x02,0xa4,0x10,0xa9,0x00,0x2e },
+ 16, 0xe4a0, 0, {0x40,0x0b,0x96,0x12,0xe4,0x20,0xb9,0x00,0x2e,0x41,0x0a,0x90,0x42,0x24,0x00,0xb9 },
+ 16, 0xe4b0, 0, {0x00,0x22,0x41,0x08,0x98,0x22,0x64,0x00,0xb9,0x20,0x2b,0x41,0x28,0xd4,0x02,0x06 },
+ 16, 0xe4c0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xe4,0x00,0xf9,0xe0,0x32,0x58 },
+ 16, 0xe4d0, 0, {0x0f,0x98,0x03,0x26,0x40,0xc9,0x40,0x3e,0x58,0x0f,0x9c,0x03,0xe4,0x00,0xe9,0x00 },
+ 16, 0xe4e0, 0, {0x6e,0x40,0x0c,0x9a,0x02,0xa6,0x00,0xf9,0x44,0x32,0x40,0x0d,0x9a,0x0b,0x64,0x84 },
+ 16, 0xe4f0, 0, {0xf9,0x00,0xba,0x40,0x0c,0x18,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe500, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0x3e,0x50,0x0f,0x90,0x03,0xe6,0x00,0xf9,0x04,0x3e },
+ 16, 0xe510, 0, {0x48,0x0f,0x90,0x03,0xe4,0x40,0xf9,0x00,0x3e,0x65,0x0f,0x99,0x81,0xe4,0x50,0xf9 },
+ 16, 0xe520, 0, {0x20,0x3e,0x40,0x8f,0x90,0x03,0xa4,0x80,0xf9,0x00,0x34,0x40,0x0f,0x92,0x03,0xd2 },
+ 16, 0xe530, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x40,0x3e,0x10 },
+ 16, 0xe540, 0, {0x0e,0x84,0x03,0x60,0x08,0xc8,0x00,0x3e,0x08,0x0f,0x80,0x83,0xe0,0x28,0xe8,0x04 },
+ 16, 0xe550, 0, {0x3e,0x00,0x0c,0x84,0x03,0x21,0x1c,0xf0,0x48,0x32,0x00,0x0b,0x00,0x03,0xe0,0x02 },
+ 16, 0xe560, 0, {0xc0,0x00,0x32,0x00,0x0c,0xc0,0x0b,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe570, 0, {0x28,0x05,0x38,0x00,0xb2,0x88,0x2e,0x80,0x08,0xe0,0x03,0x7a,0x80,0x8e,0x00,0x2f },
+ 16, 0xe580, 0, {0xa0,0x0b,0xe8,0x02,0xf9,0x10,0xba,0x00,0x2c,0x80,0x28,0xe4,0x02,0x28,0x00,0xbe },
+ 16, 0xe590, 0, {0x40,0x23,0xb8,0x08,0xe8,0x02,0xe8,0x04,0xca,0x20,0xa2,0x80,0x08,0xe8,0x02,0x0a },
+ 16, 0xe5a0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x01,0xb3,0x00,0x2c,0x40 },
+ 16, 0xe5b0, 0, {0x08,0xb8,0x42,0x6c,0x02,0x83,0x00,0x2c,0xe0,0x0b,0x38,0x00,0xcf,0x40,0xb3,0x00 },
+ 16, 0xe5c0, 0, {0x2c,0xc0,0x08,0xb4,0x0a,0x0c,0x00,0xb3,0x40,0xa2,0x82,0x0a,0x39,0x02,0xcc,0x00 },
+ 16, 0xe5d0, 0, {0x93,0x80,0xa0,0xc0,0x29,0x20,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe5e0, 0, {0xa0,0x01,0x1d,0x00,0xb7,0x00,0x2d,0x64,0x28,0x74,0x02,0x40,0x00,0x87,0x05,0x2d },
+ 16, 0xe5f0, 0, {0x90,0x0b,0x74,0x02,0xdc,0x10,0xb7,0x30,0x2d,0xc8,0x08,0x34,0x06,0x1c,0x80,0xb7 },
+ 16, 0xe600, 0, {0x00,0xa1,0xc0,0x0a,0x70,0x02,0xde,0x80,0x83,0x00,0x01,0x00,0x09,0x60,0x82,0x20 },
+ 16, 0xe610, 0, {0x04,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1a,0x00,0xf7,0x80,0x3d,0x60 },
+ 16, 0xe620, 0, {0x0e,0xd8,0x0b,0x5e,0x00,0xc7,0x80,0x3d,0xe0,0x0f,0x68,0x03,0xde,0x10,0xf7,0xa9 },
+ 16, 0xe630, 0, {0x7f,0xe8,0x48,0x78,0x03,0x1f,0x30,0xff,0x94,0x33,0xa0,0x0e,0x78,0x03,0xcf,0x24 },
+ 16, 0xe640, 0, {0xd6,0x80,0xb1,0xe0,0x0d,0xf8,0x43,0x22,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe650, 0, {0x08,0x1d,0xac,0x00,0xbb,0x00,0x0c,0x40,0x0f,0xb0,0x03,0xec,0x08,0xf9,0x00,0x3e },
+ 16, 0xe660, 0, {0x00,0x0f,0x90,0x41,0xec,0x00,0xfb,0x61,0x7e,0xd0,0x0f,0xb0,0x03,0xec,0x80,0xfb },
+ 16, 0xe670, 0, {0x40,0x3f,0x9b,0x0c,0xb0,0x03,0xed,0x90,0xfa,0x00,0x3c,0x00,0x0e,0xb0,0x03,0xc2 },
+ 16, 0xe680, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xde,0x00,0xef,0x80,0x33,0x60 },
+ 16, 0xe690, 0, {0x0d,0xd8,0x03,0x36,0x40,0xef,0x90,0x3e,0xe0,0x0f,0xf9,0x03,0xfe,0x00,0xff,0x80 },
+ 16, 0xe6a0, 0, {0x33,0xfe,0x0c,0xfa,0x03,0xfe,0x00,0xcf,0x80,0xb3,0xe0,0x0f,0xf8,0x03,0xfe,0x00 },
+ 16, 0xe6b0, 0, {0xcd,0x80,0x33,0xe0,0x0f,0xc8,0x43,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe6c0, 0, {0xa8,0x11,0x9c,0x00,0x85,0x08,0x35,0x40,0x08,0x70,0x03,0x52,0x20,0x87,0x11,0x2c },
+ 16, 0xe6d0, 0, {0xec,0x0b,0x71,0x02,0xd0,0x00,0xe7,0x00,0x35,0xc4,0x08,0x74,0x02,0xdc,0x40,0x87 },
+ 16, 0xe6e0, 0, {0x10,0x21,0xc0,0x0b,0x70,0x02,0xfc,0x80,0x85,0x08,0x21,0x00,0x0b,0x41,0x82,0xea },
+ 16, 0xe6f0, 0, {0x06,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x00,0xaf,0x00,0x23,0x50 },
+ 16, 0xe700, 0, {0x09,0x50,0x02,0x1c,0x80,0xa7,0x01,0x29,0xc0,0x1b,0x60,0x06,0xdc,0x40,0xb7,0x10 },
+ 16, 0xe710, 0, {0x21,0xc8,0x4a,0x52,0x02,0xdc,0x00,0x83,0x00,0x21,0xc0,0x0b,0x70,0x02,0xdc,0x13 },
+ 16, 0xe720, 0, {0x84,0x00,0x25,0xc0,0x0b,0x58,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe730, 0, {0x20,0x14,0xcc,0x00,0x81,0x80,0x24,0x40,0x08,0x3e,0x02,0x6e,0x00,0x89,0x00,0x2c },
+ 16, 0xe740, 0, {0xc0,0x0b,0xb4,0x02,0xca,0x80,0xa3,0x00,0x24,0xc0,0x0a,0x04,0x02,0xec,0x40,0x82 },
+ 16, 0xe750, 0, {0x0a,0x20,0xc0,0x0b,0x30,0x02,0xcd,0x10,0x80,0xc0,0xa4,0x00,0x0b,0x1c,0x02,0xc8 },
+ 16, 0xe760, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0x84,0x00,0xeb,0x80,0x33,0x40 },
+ 16, 0xe770, 0, {0x0d,0x8c,0x83,0x26,0x00,0xe9,0xa0,0x3e,0x78,0x8f,0x90,0x83,0xe1,0x00,0xff,0x00 },
+ 16, 0xe780, 0, {0x31,0xd1,0x0e,0x84,0x23,0xfc,0x00,0xcb,0x82,0x32,0xc0,0x8f,0xb0,0x02,0xfd,0x40 },
+ 16, 0xe790, 0, {0xcb,0x80,0xb6,0xc0,0x0f,0xa4,0x03,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe7a0, 0, {0x80,0x00,0xec,0x00,0xfb,0x00,0x3e,0x40,0x0f,0xa0,0x03,0xe0,0x00,0xf9,0x01,0x3e },
+ 16, 0xe7b0, 0, {0x42,0x0f,0x90,0x03,0xe5,0x54,0xe3,0x00,0x3e,0xc8,0x05,0x93,0x03,0xec,0x80,0xfb },
+ 16, 0xe7c0, 0, {0xc1,0x3e,0xc0,0x0f,0x20,0x03,0xcc,0x48,0xf3,0x08,0x3a,0x00,0x0f,0xa0,0x43,0xe0 },
+ 16, 0xe7d0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x00,0xcf,0x00,0x3f,0x40 },
+ 16, 0xe7e0, 0, {0x0f,0x30,0x01,0x2c,0x0a,0xcd,0x10,0x33,0x00,0x0f,0xd0,0x83,0x14,0x00,0xcb,0x02 },
+ 16, 0xe7f0, 0, {0x33,0xc0,0x0c,0xe1,0x03,0xec,0x10,0xcd,0x00,0x33,0xc0,0x0c,0xf0,0x33,0x3c,0x00 },
+ 16, 0xe800, 0, {0xea,0x00,0x33,0xc0,0x0c,0xf0,0x83,0xc8,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe810, 0, {0x81,0x04,0x6e,0x00,0x8b,0x00,0x2e,0x40,0x0b,0xbc,0x02,0x2e,0x00,0x0b,0x00,0x22 },
+ 16, 0xe820, 0, {0x30,0x0b,0x9c,0x02,0x27,0x80,0xab,0x00,0x2a,0xc0,0x08,0xb8,0x02,0xec,0x00,0x89 },
+ 16, 0xe830, 0, {0xc0,0x20,0xe0,0x08,0xae,0x02,0x2c,0x08,0x8a,0x00,0x22,0x00,0x08,0xb0,0x42,0xe8 },
+ 16, 0xe840, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2e,0x00,0x8b,0x04,0x2e,0x40 },
+ 16, 0xe850, 0, {0x8b,0x8c,0x02,0xae,0x10,0x89,0x00,0x22,0x70,0x0b,0x8c,0x02,0xa2,0x00,0x8b,0x01 },
+ 16, 0xe860, 0, {0x22,0xc0,0x08,0x80,0x02,0xec,0x10,0x82,0x88,0xa2,0x70,0x09,0xb8,0x02,0x2c,0x08 },
+ 16, 0xe870, 0, {0x89,0x00,0x20,0xc0,0x28,0x80,0x22,0xe0,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe880, 0, {0x08,0x04,0x0c,0x04,0x81,0x00,0x2c,0x40,0x0b,0x20,0x02,0x80,0x00,0x81,0x04,0xa0 },
+ 16, 0xe890, 0, {0x50,0x4b,0x00,0x0a,0x80,0x00,0xa3,0x01,0x2a,0xc1,0x20,0x10,0x02,0xcc,0x14,0x83 },
+ 16, 0xe8a0, 0, {0x00,0x22,0xc0,0x08,0x20,0x02,0x0c,0x00,0x81,0x00,0xe0,0x00,0x08,0x00,0x02,0xc2 },
+ 16, 0xe8b0, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x68,0x00,0xcb,0x00,0x3e,0x40 },
+ 16, 0xe8c0, 0, {0x0f,0x90,0x0b,0xac,0x80,0xc9,0x00,0x32,0x10,0x0f,0x80,0x03,0xa4,0x00,0xcf,0x02 },
+ 16, 0xe8d0, 0, {0x31,0xc0,0x0c,0x80,0x13,0xfc,0x02,0xcd,0x00,0x33,0xc0,0x2c,0x90,0x03,0x3c,0x02 },
+ 16, 0xe8e0, 0, {0xe8,0x00,0xb2,0xc0,0x0c,0x90,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe8f0, 0, {0xa0,0x1d,0xfc,0x02,0xf5,0x00,0x3d,0x40,0x8f,0xf0,0x23,0x6d,0x00,0xff,0x00,0x3f },
+ 16, 0xe900, 0, {0x04,0x0f,0xc0,0x03,0x70,0x1c,0xff,0x01,0x3f,0xc0,0x4f,0xc0,0x03,0xfc,0x00,0xfd },
+ 16, 0xe910, 0, {0x00,0x3f,0xc0,0x0f,0xe0,0x0f,0xfc,0x18,0xfc,0x00,0x3f,0x00,0x0f,0xd0,0x03,0xe8 },
+ 16, 0xe920, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfe,0x00,0xd7,0x02,0x0f,0x30 },
+ 16, 0xe930, 0, {0x0c,0xf2,0x01,0x7e,0x06,0x44,0x30,0x3f,0x20,0x0e,0xf0,0x02,0x7c,0x84,0xfd,0x20 },
+ 16, 0xe940, 0, {0x27,0x08,0x0c,0xd0,0x01,0x36,0x00,0xff,0x60,0x33,0xcc,0x0b,0xf1,0x13,0x2c,0xc4 },
+ 16, 0xe950, 0, {0xff,0x30,0x0f,0xcd,0x0c,0xf4,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe960, 0, {0x80,0x10,0xee,0x00,0x8f,0xc0,0x2e,0x00,0x08,0xfc,0x02,0x2e,0x00,0x8a,0x30,0x28 },
+ 16, 0xe970, 0, {0x52,0x08,0xf6,0x82,0x3c,0x68,0xbd,0x90,0x32,0x34,0x48,0x9c,0x12,0x26,0x00,0xcf },
+ 16, 0xe980, 0, {0x40,0x23,0xcc,0x0b,0xf6,0x02,0x3d,0x00,0xbf,0x10,0x2f,0xcc,0x88,0xf6,0x02,0xe0 },
+ 16, 0xe990, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0x93,0x10,0x2c,0x08 },
+ 16, 0xe9a0, 0, {0x09,0x31,0x02,0x4c,0x00,0x9b,0x20,0x64,0x58,0x03,0x31,0x62,0x4c,0x81,0xa1,0x00 },
+ 16, 0xe9b0, 0, {0x20,0x00,0x48,0x14,0x02,0x44,0x00,0x93,0x30,0x24,0xc0,0x0b,0x33,0x02,0x8d,0x84 },
+ 16, 0xe9c0, 0, {0xb3,0x20,0x6c,0xc0,0x2a,0x36,0x02,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe9d0, 0, {0xc0,0x15,0xac,0x10,0x9b,0x02,0x2e,0x41,0x0b,0xb0,0x02,0xa4,0x00,0x9a,0x00,0x4a },
+ 16, 0xe9e0, 0, {0x60,0x88,0xb0,0x52,0x6c,0x01,0xb9,0x00,0x26,0x00,0x08,0x91,0x22,0xec,0x08,0xbb },
+ 16, 0xe9f0, 0, {0x00,0x26,0xc0,0x0b,0xb0,0x02,0xac,0x00,0xbb,0x05,0x6e,0xc1,0x0a,0xb0,0x02,0xf0 },
+ 16, 0xea00, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xdb,0x01,0x3e,0x30 },
+ 16, 0xea10, 0, {0x2d,0x30,0x03,0x47,0x60,0xd8,0xa0,0x16,0x38,0x8f,0xb0,0x03,0x6c,0x00,0x79,0x02 },
+ 16, 0xea20, 0, {0x31,0x60,0x0c,0xc8,0x0a,0x66,0x00,0xbb,0x00,0xb6,0xc0,0x0f,0xb0,0x0b,0xac,0x00 },
+ 16, 0xea30, 0, {0xfb,0x01,0x3e,0xc1,0x0e,0xb0,0x03,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea40, 0, {0xe0,0x01,0xbc,0x10,0xef,0x08,0x3f,0x24,0x0c,0xf0,0x03,0x76,0x20,0xee,0x90,0x35 },
+ 16, 0xea50, 0, {0x40,0x0e,0x70,0x03,0xac,0x00,0xfd,0x00,0xbb,0x64,0x0f,0x88,0x13,0x34,0x80,0xcb },
+ 16, 0xea60, 0, {0x00,0x3b,0xc0,0x0f,0xb0,0x03,0x6c,0x08,0xff,0x00,0x3e,0xc0,0x0d,0xf0,0x03,0xf8 },
+ 16, 0xea70, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x01,0xfb,0x80,0x32,0x10 },
+ 16, 0xea80, 0, {0x0e,0xb0,0x03,0xed,0x00,0xcb,0x50,0x3e,0x40,0x8c,0xb0,0x43,0x2c,0x10,0xf9,0x00 },
+ 16, 0xea90, 0, {0x32,0x60,0x0c,0x40,0x0b,0x26,0x00,0xc3,0x04,0x36,0xc0,0x0c,0x30,0x03,0x2c,0x00 },
+ 16, 0xeaa0, 0, {0x9b,0x00,0xb0,0xc0,0x0c,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeab0, 0, {0xc8,0x05,0x0e,0x80,0xbf,0x04,0x2a,0x40,0x00,0xf5,0x00,0xe6,0x00,0x82,0xd2,0x22 },
+ 16, 0xeac0, 0, {0x40,0x0d,0xf0,0x22,0x3c,0x00,0x95,0x02,0x36,0x40,0x0a,0x80,0x02,0x2e,0x00,0x8f },
+ 16, 0xead0, 0, {0x00,0x37,0xc0,0x0a,0xf0,0x42,0x3c,0x00,0x8f,0x00,0x23,0xc0,0x28,0xf0,0x02,0xf2 },
+ 16, 0xeae0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4e,0x00,0xb3,0x00,0x22,0x20 },
+ 16, 0xeaf0, 0, {0x4a,0x30,0x00,0xcc,0x00,0x81,0xc0,0x28,0x00,0x08,0x30,0x02,0x0c,0x10,0xa1,0x00 },
+ 16, 0xeb00, 0, {0x28,0x80,0x18,0x30,0x22,0x04,0x04,0x83,0x00,0x24,0xc0,0x08,0x30,0x02,0xcc,0x08 },
+ 16, 0xeb10, 0, {0x93,0x00,0x20,0xc0,0x08,0x30,0x06,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb20, 0, {0x20,0x01,0x1e,0x00,0xb7,0x80,0x29,0xa0,0x08,0x78,0x02,0xfe,0x20,0x8d,0x80,0x29 },
+ 16, 0xeb30, 0, {0xe5,0x5b,0x38,0x42,0x1e,0x40,0xa1,0x81,0x25,0xa8,0x08,0x79,0x02,0x37,0x00,0x87 },
+ 16, 0xeb40, 0, {0x80,0x25,0xe0,0x0a,0x78,0x0a,0xde,0x81,0x87,0x80,0x25,0xe5,0x48,0x78,0x02,0xc8 },
+ 16, 0xeb50, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xb3,0x10,0x30,0x12 },
+ 16, 0xeb60, 0, {0x0e,0x30,0x12,0xcc,0xc0,0xc3,0x00,0x38,0x80,0x0c,0x31,0x06,0x0c,0x40,0xf1,0x00 },
+ 16, 0xeb70, 0, {0x38,0x80,0x0c,0x30,0x43,0x04,0x42,0xc3,0x00,0x36,0xc0,0x0c,0x32,0x03,0xce,0xc0 },
+ 16, 0xeb80, 0, {0xdb,0x00,0x30,0xc0,0x0c,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb90, 0, {0x40,0x1d,0xbc,0x00,0xff,0x10,0x3d,0x84,0x4f,0xf1,0x03,0xd0,0x40,0xfc,0x10,0x33 },
+ 16, 0xeba0, 0, {0x80,0x5d,0xb1,0x83,0xfc,0x50,0xdd,0x0a,0x25,0x89,0x0f,0xb8,0x03,0xd4,0x00,0xff },
+ 16, 0xebb0, 0, {0x10,0x3f,0xc0,0x0f,0xf4,0x03,0x3c,0x40,0xff,0x00,0x3b,0xc0,0x0f,0xf0,0x03,0xd0 },
+ 16, 0xebc0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xfb,0x20,0x3e,0x00 },
+ 16, 0xebd0, 0, {0x0f,0xb5,0x03,0x29,0x20,0xf9,0x00,0x32,0xa0,0x0c,0xb0,0x83,0xec,0x00,0x49,0xc8 },
+ 16, 0xebe0, 0, {0xb2,0xc0,0x8c,0xa0,0x03,0x64,0x00,0xfb,0x08,0x12,0xea,0x0c,0xb0,0x0b,0x2c,0x80 },
+ 16, 0xebf0, 0, {0xfb,0x20,0x2e,0xd2,0x6c,0xb6,0x43,0xea,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec00, 0, {0x48,0x11,0x9c,0x00,0xb7,0x49,0x2d,0x00,0x0b,0x30,0x82,0x10,0x01,0xb5,0x02,0x83 },
+ 16, 0xec10, 0, {0xc0,0x1a,0x72,0x22,0xdd,0x41,0x85,0x00,0x61,0xc0,0x18,0x20,0x20,0x14,0x00,0xbf },
+ 16, 0xec20, 0, {0x40,0x35,0xd0,0x0d,0x34,0x02,0x1d,0x20,0xb7,0x28,0x25,0xc1,0x08,0x74,0x82,0xd2 },
+ 16, 0xec30, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x04,0x37,0xa0,0x2d,0x20 },
+ 16, 0xec40, 0, {0x0b,0x7a,0x12,0x16,0x01,0xb3,0x80,0x21,0xe2,0x08,0x78,0x42,0x9e,0x00,0x85,0x80 },
+ 16, 0xec50, 0, {0x20,0xe1,0x18,0x68,0x02,0x56,0x00,0xb7,0xa0,0x25,0xe0,0x08,0x7a,0x02,0x1e,0x00 },
+ 16, 0xec60, 0, {0xb7,0x90,0x2c,0xe5,0x88,0x7a,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec70, 0, {0x48,0x14,0xcc,0x00,0xb3,0x00,0x6c,0x24,0x1b,0x30,0x02,0x00,0x00,0xb0,0x00,0x20 },
+ 16, 0xec80, 0, {0xf8,0x0a,0x30,0x02,0xcc,0x00,0x81,0x00,0x20,0xd8,0x18,0x20,0x02,0x04,0x00,0xb3 },
+ 16, 0xec90, 0, {0x00,0x24,0xc0,0x09,0x30,0x02,0x0c,0x00,0xb3,0x00,0x26,0xc0,0x08,0x30,0x02,0xd2 },
+ 16, 0xeca0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfa,0x00,0x3d,0x80 },
+ 16, 0xecb0, 0, {0x0f,0x20,0x0b,0x28,0x80,0xfe,0x00,0x33,0xa0,0x0c,0xa0,0x03,0xe8,0x02,0xca,0x02 },
+ 16, 0xecc0, 0, {0x32,0x90,0x2c,0xe4,0x03,0x78,0x00,0xfa,0x00,0x32,0x80,0x0c,0xa0,0x03,0x28,0x00 },
+ 16, 0xecd0, 0, {0xfa,0x00,0x3e,0x80,0x0c,0xa0,0x03,0xfa,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xece0, 0, {0x48,0x00,0xe1,0x00,0xf0,0x00,0x3e,0x00,0x4f,0x80,0x03,0xe0,0x80,0xf8,0x00,0x3e },
+ 16, 0xecf0, 0, {0x00,0x0f,0x80,0x23,0xc0,0x00,0xf8,0x02,0x3c,0x00,0x0f,0xc0,0x83,0x60,0x00,0xb8 },
+ 16, 0xed00, 0, {0x00,0x3e,0x00,0x0f,0x80,0x23,0xe0,0x18,0xf8,0x01,0x36,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0xed10, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe6,0x00,0xf9,0x21,0x32,0x60 },
+ 16, 0xed20, 0, {0x0c,0x90,0x03,0x2c,0x44,0xf9,0x00,0xb2,0x40,0x0f,0x90,0x1b,0x24,0x00,0xe9,0x00 },
+ 16, 0xed30, 0, {0x3e,0x40,0x0c,0x10,0x03,0xa4,0x00,0xf9,0x00,0x32,0x40,0x0f,0x10,0x33,0x24,0x10 },
+ 16, 0xed40, 0, {0xf1,0x00,0x32,0x40,0x0c,0x90,0x03,0x02,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed50, 0, {0x80,0x04,0x64,0x00,0xb9,0x40,0xa2,0x41,0x08,0x90,0x02,0x24,0x80,0xe9,0x00,0x22 },
+ 16, 0xed60, 0, {0x40,0x0b,0x90,0x12,0x24,0x00,0x89,0x00,0x6e,0x41,0x18,0x90,0x42,0x24,0x00,0xb9 },
+ 16, 0xed70, 0, {0x04,0x2a,0x41,0x0b,0x90,0x03,0x64,0x00,0xf9,0x00,0x2a,0x40,0x0a,0x90,0x0a,0x20 },
+ 16, 0xed80, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x80,0xb9,0x42,0x62,0x48 },
+ 16, 0xed90, 0, {0x28,0x90,0x0a,0x24,0x00,0xb1,0x00,0x22,0x40,0x0b,0x10,0x02,0x24,0x10,0xb9,0x02 },
+ 16, 0xeda0, 0, {0x2e,0x40,0x08,0xd0,0x02,0xa4,0x00,0xb1,0x00,0x22,0x40,0x0b,0x90,0x02,0x24,0x04 },
+ 16, 0xedb0, 0, {0xb9,0x00,0x22,0x40,0x08,0x10,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xedc0, 0, {0x08,0x04,0x0c,0x00,0xb1,0x20,0x60,0x40,0x08,0x12,0x02,0x04,0x00,0xa1,0x20,0x20 },
+ 16, 0xedd0, 0, {0x40,0x0b,0x12,0x02,0x04,0x80,0x91,0x20,0x2d,0x68,0x08,0x52,0x12,0x04,0x00,0xb1 },
+ 16, 0xede0, 0, {0x28,0x28,0x4a,0x09,0x12,0x82,0x44,0xa0,0xb1,0x2c,0x28,0x4a,0x0a,0x12,0x82,0x02 },
+ 16, 0xedf0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xf8,0x00,0x32,0x14 },
+ 16, 0xee00, 0, {0x0c,0x80,0x03,0x20,0x00,0xf8,0x50,0x32,0x14,0x0f,0x85,0x03,0x01,0x40,0xf8,0x00 },
+ 16, 0xee10, 0, {0x2e,0x00,0x28,0xc0,0x03,0xa0,0x00,0xf8,0x24,0x30,0x08,0x0f,0x82,0x23,0x20,0x80 },
+ 16, 0xee20, 0, {0xf8,0x20,0x32,0x08,0x0c,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee30, 0, {0x98,0x1d,0xe4,0x08,0xf9,0x10,0x3f,0x40,0x8f,0x91,0x13,0xe4,0x00,0xed,0x10,0x3f },
+ 16, 0xee40, 0, {0x50,0x0f,0x91,0x03,0xe4,0x40,0xa5,0x10,0x3e,0x44,0x0f,0x91,0x03,0xf4,0x04,0xf9 },
+ 16, 0xee50, 0, {0x28,0x3e,0x4b,0x0b,0x92,0xa3,0xe4,0xa0,0xe9,0x28,0x3e,0x4a,0x0f,0x92,0x83,0xe6 },
+ 16, 0xee60, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf4,0x00,0xcd,0x00,0x33,0x40 },
+ 16, 0xee70, 0, {0x80,0xd0,0x01,0xf4,0x00,0xa5,0x00,0x26,0x40,0x0f,0x90,0x03,0x26,0x00,0xf1,0x88 },
+ 16, 0xee80, 0, {0x3e,0x68,0x0d,0x98,0x83,0x44,0x00,0xc9,0xc0,0x3a,0x40,0x0c,0x98,0x03,0x24,0x08 },
+ 16, 0xee90, 0, {0xf9,0xa0,0x32,0x78,0x0f,0x9a,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeea0, 0, {0x38,0x10,0xe0,0x02,0x88,0x00,0xa2,0x00,0x08,0x80,0x02,0xe0,0x00,0x0a,0x00,0x22 },
+ 16, 0xeeb0, 0, {0x00,0x0b,0x80,0x02,0x20,0x00,0xb8,0x40,0x2e,0x14,0x08,0x80,0x43,0x30,0x00,0x88 },
+ 16, 0xeec0, 0, {0xa0,0x22,0x2a,0x0a,0x8a,0x42,0xa0,0x05,0xb8,0x42,0x32,0x38,0x0b,0x80,0x02,0x0e },
+ 16, 0xeed0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x03,0x91,0x00,0x24,0x40 },
+ 16, 0xeee0, 0, {0x0b,0x10,0x02,0xc4,0x11,0xb1,0x04,0x20,0x41,0x1b,0x10,0x22,0x45,0x00,0xb5,0x00 },
+ 16, 0xeef0, 0, {0x25,0x40,0x09,0x50,0x02,0x54,0x01,0x81,0x40,0x2c,0x40,0x09,0x14,0x92,0x44,0x00 },
+ 16, 0xef00, 0, {0xb1,0x40,0x24,0x4c,0x0b,0x14,0x0a,0x42,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef10, 0, {0x18,0x15,0xa4,0x00,0x99,0x00,0x24,0x42,0x0b,0x90,0x02,0xe4,0x01,0x99,0x20,0x26 },
+ 16, 0xef20, 0, {0x40,0xcb,0x90,0x02,0x64,0x00,0xbb,0x00,0x2f,0x41,0x0a,0xd0,0x02,0x34,0x00,0x89 },
+ 16, 0xef30, 0, {0x00,0x26,0x40,0x0b,0x10,0x02,0xe4,0x00,0x31,0x00,0x62,0x40,0x0b,0x90,0x02,0x46 },
+ 16, 0xef40, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xc4,0x00,0xd9,0x01,0x36,0x50 },
+ 16, 0xef50, 0, {0x2f,0x90,0x03,0xe6,0x60,0xf9,0x80,0x36,0x52,0x0b,0x90,0x0a,0x64,0x00,0xf9,0x00 },
+ 16, 0xef60, 0, {0x36,0x40,0x0d,0x90,0x03,0x64,0x02,0x09,0x00,0x3e,0x40,0x0d,0x90,0x03,0x64,0x00 },
+ 16, 0xef70, 0, {0xb9,0x00,0xb6,0x40,0x0f,0x90,0x03,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef80, 0, {0x28,0x01,0xa4,0x00,0xe1,0x00,0x3a,0x41,0x0c,0x90,0x23,0xe6,0x20,0xe9,0x00,0xba },
+ 16, 0xef90, 0, {0x70,0x0f,0x90,0x03,0xa4,0x00,0xf9,0x00,0x3e,0x40,0x0d,0x10,0x13,0xa7,0x00,0xf9 },
+ 16, 0xefa0, 0, {0x00,0x3a,0x40,0x0e,0x90,0x43,0xa4,0x08,0xf9,0x00,0x3a,0x40,0x0f,0x90,0x03,0x8a },
+ 16, 0xefb0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x20,0xf8,0x00,0x32,0x00 },
+ 16, 0xefc0, 0, {0x0f,0x80,0x83,0x21,0x00,0xf0,0x00,0x3a,0x11,0x09,0x80,0x03,0xe0,0x00,0xc8,0x01 },
+ 16, 0xefd0, 0, {0x30,0x01,0x0c,0x80,0x03,0xb0,0x00,0xd0,0x00,0x34,0x00,0x0d,0x80,0x03,0x20,0x00 },
+ 16, 0xefe0, 0, {0xc8,0x00,0x32,0x00,0x0c,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeff0, 0, {0x28,0x05,0x38,0x00,0xbe,0x00,0x22,0x80,0x03,0xe8,0x02,0x1a,0x08,0xbe,0x48,0x22 },
+ 16, 0xf000, 0, {0x80,0x0a,0xa0,0x03,0xb8,0x00,0xca,0x08,0x22,0x80,0x0f,0xa4,0x02,0x08,0x00,0x8a },
+ 16, 0xf010, 0, {0x00,0x22,0x80,0x8d,0xa0,0x02,0x28,0x00,0xda,0x00,0x2a,0x81,0x08,0xa0,0x02,0x8a },
+ 16, 0xf020, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x44,0x00,0xb3,0x00,0x20,0x40 },
+ 16, 0xf030, 0, {0x0b,0x30,0x02,0x08,0x00,0xb0,0x64,0x68,0xc1,0x08,0xb0,0x22,0xcc,0x0c,0x93,0x80 },
+ 16, 0xf040, 0, {0x00,0xc0,0x48,0x36,0x02,0x88,0x00,0xb3,0x00,0x24,0xc0,0x08,0x30,0x06,0x0c,0x01 },
+ 16, 0xf050, 0, {0xa3,0x02,0x2c,0xc0,0x08,0xb0,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf060, 0, {0xa0,0x01,0x14,0x08,0xb5,0x00,0x21,0x40,0x0b,0x38,0x82,0x1c,0x21,0xb7,0x00,0x23 },
+ 16, 0xf070, 0, {0xe8,0x4a,0x72,0x26,0x9e,0x40,0x8f,0x81,0xab,0x40,0x42,0x70,0x52,0x38,0x00,0xa3 },
+ 16, 0xf080, 0, {0x22,0x20,0xc4,0x49,0x31,0x02,0x1e,0x0a,0xb7,0x22,0x2d,0xe8,0x08,0x72,0x02,0xa8 },
+ 16, 0xf090, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x12,0x00,0xf6,0x80,0x21,0xe0 },
+ 16, 0xf0a0, 0, {0x0b,0x78,0x0b,0x1e,0x00,0xb4,0x82,0x3b,0xe8,0x4c,0x7c,0x13,0xfe,0x02,0x97,0x80 },
+ 16, 0xf0b0, 0, {0x33,0xa0,0x08,0x38,0x03,0x9a,0x00,0xf7,0x88,0x35,0xe2,0x0c,0x78,0xe3,0x0e,0x00 },
+ 16, 0xf0c0, 0, {0xe3,0xe8,0x34,0xf8,0x0c,0x3c,0x23,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf0d0, 0, {0x08,0x1d,0xa8,0x04,0xf1,0x00,0x3e,0x42,0x0f,0xb0,0x13,0xec,0x00,0xfb,0x00,0xbe },
+ 16, 0xf0e0, 0, {0xcc,0x1e,0xb6,0x07,0xed,0x80,0xfb,0x00,0x36,0x00,0x0f,0xb0,0x43,0x68,0x00,0xcb },
+ 16, 0xf0f0, 0, {0x30,0x3e,0xd8,0x0f,0xb6,0x0b,0xed,0x40,0xcb,0x00,0x3a,0xc0,0x2f,0xb6,0x03,0xc2 },
+ 16, 0xf100, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf2,0x40,0xfb,0x91,0x3d,0x4c },
+ 16, 0xf110, 0, {0x80,0xf8,0x03,0xde,0x40,0xc6,0x80,0x1b,0xf0,0x4f,0xfd,0x07,0xff,0x00,0xcd,0x80 },
+ 16, 0xf120, 0, {0x33,0xe0,0x0c,0x68,0x03,0xba,0x00,0xff,0x80,0x33,0xe0,0x07,0xf8,0x03,0x3f,0x10 },
+ 16, 0xf130, 0, {0xcf,0x80,0x3f,0xe0,0x0c,0xfc,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf140, 0, {0xa8,0x11,0x90,0x00,0xb5,0xc0,0x2d,0x40,0x08,0x62,0x02,0xdc,0x20,0xd6,0x02,0x21 },
+ 16, 0xf150, 0, {0xc8,0x8f,0x70,0x02,0xdc,0x81,0xb5,0x00,0x81,0x44,0x0d,0x61,0x22,0x18,0x04,0xb7 },
+ 16, 0xf160, 0, {0x00,0x35,0xc0,0x0b,0x70,0x02,0xbc,0x00,0xa7,0x01,0x2d,0xc0,0x08,0x70,0x03,0xea },
+ 16, 0xf170, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x01,0xb6,0x01,0x2f,0xc0 },
+ 16, 0xf180, 0, {0x18,0x70,0x02,0xdc,0x0a,0x96,0x10,0x29,0xc1,0x4b,0x70,0x06,0xdc,0x10,0x85,0x00 },
+ 16, 0xf190, 0, {0x25,0x80,0x08,0x60,0x82,0x1a,0x20,0xa3,0x00,0x25,0xc0,0x0b,0x31,0x02,0x5c,0x40 },
+ 16, 0xf1a0, 0, {0x87,0x00,0x2d,0xc0,0x08,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf1b0, 0, {0x20,0x14,0xc8,0x00,0xb1,0x00,0x2c,0x40,0x88,0x20,0x02,0xed,0x00,0x8a,0x60,0x20 },
+ 16, 0xf1c0, 0, {0xc0,0x0a,0x30,0x02,0xcc,0x04,0xb1,0x00,0x24,0x00,0x28,0x24,0x02,0x0a,0x00,0x33 },
+ 16, 0xf1d0, 0, {0x00,0x24,0xc0,0x0b,0xb0,0x02,0xcc,0x00,0xa3,0x00,0x2c,0xc0,0x88,0x30,0x02,0x88 },
+ 16, 0xf1e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa0,0x00,0xfb,0x00,0x3e,0xc6 },
+ 16, 0xf1f0, 0, {0x0c,0x80,0x03,0xe5,0x00,0x09,0xc8,0xab,0xe2,0x0b,0xf0,0x02,0xfc,0x00,0x4a,0x00 },
+ 16, 0xf200, 0, {0x36,0xc0,0x08,0x90,0x03,0xa6,0x00,0xff,0x00,0x33,0xc0,0x0f,0xf0,0x03,0x7c,0x00 },
+ 16, 0xf210, 0, {0x8f,0x00,0x2f,0xc0,0x28,0xf0,0x02,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf220, 0, {0x80,0x00,0xe1,0x00,0xfa,0x01,0x3e,0xc0,0x0f,0x80,0x03,0xec,0x00,0xf9,0x40,0x3e },
+ 16, 0xf230, 0, {0xc0,0x07,0xb0,0x03,0xec,0x00,0xfa,0x00,0x3a,0x40,0x0f,0x90,0x23,0xe5,0x00,0xfb },
+ 16, 0xf240, 0, {0x00,0x3e,0xc0,0x0f,0xb0,0x03,0xac,0x00,0xfb,0x00,0x3c,0xc0,0x0f,0xb0,0x23,0xe0 },
+ 16, 0xf250, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x00,0xfc,0x20,0x3f,0xc0 },
+ 16, 0xf260, 0, {0x0c,0xc8,0x03,0xfc,0x20,0xcd,0x81,0xb3,0xc2,0x4f,0xf0,0x03,0xfc,0x00,0xca,0x00 },
+ 16, 0xf270, 0, {0x3c,0x80,0x0c,0xd0,0x82,0x36,0x01,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0x3c,0x08 },
+ 16, 0xf280, 0, {0xcf,0x04,0x3a,0xc0,0x5c,0xb0,0x03,0xc0,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf290, 0, {0x81,0x04,0x62,0x04,0xb8,0x40,0x2c,0x60,0x08,0x89,0x02,0xee,0x80,0xa9,0x60,0x2a },
+ 16, 0xf2a0, 0, {0xc0,0x0b,0xb0,0x03,0x8c,0x00,0xaa,0x40,0x2e,0x00,0x08,0x10,0x02,0x26,0x81,0xeb },
+ 16, 0xf2b0, 0, {0x00,0x26,0xc0,0x8b,0xb0,0x13,0x6c,0x00,0xdb,0x00,0x2e,0xc0,0x3d,0xb0,0x02,0xe0 },
+ 16, 0xf2c0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x23,0x00,0xbb,0x03,0x2e,0xc8 },
+ 16, 0xf2d0, 0, {0x09,0xb0,0x02,0xee,0x00,0x8b,0x10,0x26,0xc0,0x0b,0xb0,0x02,0xec,0x00,0xa8,0x00 },
+ 16, 0xf2e0, 0, {0x2e,0xc0,0x08,0x88,0x22,0xa4,0x80,0xbb,0x00,0x2e,0xc0,0x4b,0xb0,0x22,0x0c,0x00 },
+ 16, 0xf2f0, 0, {0x8b,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf300, 0, {0x08,0x04,0x00,0x00,0xb2,0x00,0x2e,0xc0,0x29,0x28,0x02,0xec,0x01,0xa0,0x02,0x20 },
+ 16, 0xf310, 0, {0xc0,0x09,0x30,0x02,0xcc,0x00,0xa0,0x00,0x2c,0x40,0x08,0x00,0x42,0x84,0x00,0x93 },
+ 16, 0xf320, 0, {0x00,0x6c,0xc0,0x0b,0x30,0x06,0x4d,0x00,0x93,0x00,0x2c,0xc0,0x08,0x30,0x02,0xc2 },
+ 16, 0xf330, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xf8,0x20,0x2f,0xc0 },
+ 16, 0xf340, 0, {0x0d,0xb0,0x03,0xec,0x00,0xcb,0x00,0x33,0xc0,0x0b,0xf0,0x03,0xfc,0x18,0xe8,0x00 },
+ 16, 0xf350, 0, {0x2e,0x80,0x08,0x80,0x03,0xa4,0x00,0xbf,0x00,0x3f,0xc0,0x0f,0xf0,0x43,0x3d,0x11 },
+ 16, 0xf360, 0, {0xcf,0x03,0x3e,0xc1,0x5d,0xf0,0x23,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf370, 0, {0xa0,0x1d,0xf0,0x00,0xfc,0x10,0x3f,0x40,0x0e,0xe0,0x03,0xfc,0x00,0xfc,0x00,0x3f },
+ 16, 0xf380, 0, {0xc0,0x0f,0xf0,0x03,0xbc,0x00,0xfc,0x00,0x3f,0x00,0x2f,0xc0,0x03,0x74,0x00,0xef },
+ 16, 0xf390, 0, {0x00,0x27,0xc0,0x0f,0xf0,0x03,0xfc,0x18,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xe8 },
+ 16, 0xf3a0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xfc,0x88,0x9c,0x29,0x3f,0x08 },
+ 16, 0xf3b0, 0, {0x0f,0xd2,0x83,0xec,0x00,0xff,0x08,0x3f,0x28,0x0f,0xca,0x03,0x3c,0x41,0xcf,0x20 },
+ 16, 0xf3c0, 0, {0x73,0x2c,0x0c,0xc0,0x03,0x30,0x20,0xcf,0x60,0x33,0xd8,0x0f,0x78,0x03,0x3f,0x80 },
+ 16, 0xf3d0, 0, {0xdd,0x92,0x33,0xc8,0x0f,0x50,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf3e0, 0, {0x80,0x10,0xe5,0x40,0x88,0x40,0x2e,0x04,0x8b,0x94,0x02,0xe4,0x00,0xb9,0x00,0x0e },
+ 16, 0xf3f0, 0, {0x7f,0x8f,0x9e,0x83,0x65,0x82,0xcf,0x68,0x3e,0x50,0x8d,0x04,0x92,0x2f,0x04,0xd3 },
+ 16, 0xf400, 0, {0x40,0x74,0xdc,0x0d,0xa2,0x02,0x20,0x40,0x89,0x00,0x22,0xf0,0x0b,0x98,0x02,0x20 },
+ 16, 0xf410, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc8,0x09,0xa0,0x85,0x2c,0x01 },
+ 16, 0xf420, 0, {0x0b,0x00,0x10,0xcc,0x40,0xa2,0x08,0x2c,0x00,0xdb,0x11,0x02,0x89,0x00,0x93,0x30 },
+ 16, 0xf430, 0, {0x20,0x05,0x08,0x13,0x02,0x80,0x08,0xa3,0x60,0x60,0xc0,0x0a,0xb0,0x82,0x08,0x84 },
+ 16, 0xf440, 0, {0x81,0x20,0x20,0xd0,0x0b,0x10,0x02,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf450, 0, {0xc0,0x15,0xa4,0x12,0x88,0x80,0x6e,0x20,0x0b,0x88,0x82,0xee,0x00,0xba,0x81,0x2e },
+ 16, 0xf460, 0, {0x60,0x5a,0x98,0x02,0xa2,0x00,0x8b,0x00,0x2a,0x60,0x08,0x11,0x1a,0x2c,0x00,0xbb },
+ 16, 0xf470, 0, {0x00,0x22,0xc0,0x08,0xb8,0x0a,0x28,0x00,0x81,0x20,0x02,0xc0,0x0b,0x90,0x02,0xb0 },
+ 16, 0xf480, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xed,0x00,0xd9,0x80,0x3e,0x20 },
+ 16, 0xf490, 0, {0x4f,0x98,0x00,0xeb,0x20,0xfb,0xe0,0x2e,0x60,0x0b,0x8c,0x62,0xae,0x20,0x8b,0x00 },
+ 16, 0xf4a0, 0, {0x22,0x60,0x08,0xbc,0x03,0xa0,0x20,0xeb,0x00,0x22,0xc1,0x0a,0x18,0x0b,0x25,0x00 },
+ 16, 0xf4b0, 0, {0xd9,0x00,0xb2,0xc0,0x0f,0x90,0x0b,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf4c0, 0, {0xe0,0x01,0x94,0x88,0xff,0x00,0x3f,0x01,0x0f,0xd0,0x01,0xf0,0x08,0xdd,0x01,0x3f },
+ 16, 0xf4d0, 0, {0x42,0x07,0x40,0x03,0x5c,0x00,0xaf,0x00,0x3f,0x40,0x0f,0xf8,0x00,0xf0,0x00,0xdf },
+ 16, 0xf4e0, 0, {0x00,0x3f,0xc0,0x0f,0xc0,0x23,0xf4,0x50,0xfd,0x80,0x3f,0xc0,0x0f,0xd0,0x03,0x78 },
+ 16, 0xf4f0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xac,0x00,0xd9,0x00,0x3e,0x40 },
+ 16, 0xf500, 0, {0x0f,0x94,0x03,0xa8,0x20,0xca,0x40,0x3a,0x40,0x0f,0x94,0x03,0xea,0x08,0xfb,0x00 },
+ 16, 0xf510, 0, {0x3a,0x00,0x4c,0xf6,0x23,0x2c,0x30,0xcb,0x00,0x36,0xc0,0x0d,0x90,0x03,0xa1,0x02 },
+ 16, 0xf520, 0, {0xd9,0x00,0xba,0xc0,0x0f,0x98,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf530, 0, {0xc8,0x05,0x24,0x00,0x8a,0x00,0x2e,0x40,0x0b,0x95,0x02,0xe0,0x08,0x88,0x80,0x22 },
+ 16, 0xf540, 0, {0x70,0x8f,0x8c,0x02,0xe0,0x00,0xbf,0x02,0x20,0x00,0x08,0xb8,0x02,0x0e,0x00,0xdf },
+ 16, 0xf550, 0, {0x00,0x23,0xdd,0x08,0x98,0x82,0x2a,0x00,0x89,0x80,0x23,0xc0,0x0b,0x50,0x1a,0x32 },
+ 16, 0xf560, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x44,0x00,0x83,0x05,0x24,0x41 },
+ 16, 0xf570, 0, {0x09,0x10,0x02,0xce,0x00,0x83,0x90,0x2c,0x80,0x1b,0x24,0x82,0xcc,0x00,0xbb,0x00 },
+ 16, 0xf580, 0, {0x2c,0x80,0x08,0x04,0x08,0x04,0x01,0x8b,0x00,0x22,0xc0,0x28,0x12,0x02,0x6c,0x80 },
+ 16, 0xf590, 0, {0x81,0x48,0x24,0xc4,0x0b,0x10,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf5a0, 0, {0x20,0x01,0x3e,0x42,0x86,0x80,0x2d,0x60,0x0b,0x68,0x02,0xf6,0x90,0x8d,0x80,0x21 },
+ 16, 0xf5b0, 0, {0x22,0x0b,0x58,0x02,0xd7,0x40,0xb7,0x90,0x21,0xe0,0x08,0x49,0x92,0x1e,0x53,0x97 },
+ 16, 0xf5c0, 0, {0x81,0x21,0xe0,0x48,0xc8,0x0a,0x52,0x22,0x85,0x88,0x25,0xe0,0x0b,0x58,0x02,0x08 },
+ 16, 0xf5d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x83,0x00,0x34,0xc0 },
+ 16, 0xf5e0, 0, {0x0f,0x00,0x03,0xce,0x20,0xc3,0x30,0x7c,0x94,0x0b,0x34,0x83,0xcc,0x14,0xf3,0x02 },
+ 16, 0xf5f0, 0, {0x3c,0x80,0x0c,0x04,0x03,0x04,0x60,0xc3,0x00,0xb0,0xc0,0x0c,0x10,0x03,0xec,0x00 },
+ 16, 0xf600, 0, {0xc9,0x00,0x3c,0xc4,0x0f,0x11,0x03,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf610, 0, {0x40,0x1d,0x9c,0x00,0xee,0x01,0x3f,0xc0,0x4f,0xe1,0x03,0xd4,0x40,0xf5,0x16,0x7a },
+ 16, 0xf620, 0, {0xc0,0x4e,0xf0,0x03,0xf4,0x10,0x37,0x05,0x3d,0xc0,0x0f,0xc0,0x0b,0xdc,0x40,0xff },
+ 16, 0xf630, 0, {0x00,0x3b,0xc2,0x0e,0xd0,0x07,0xbc,0x02,0xef,0x00,0x3b,0xc6,0x0f,0xd0,0x03,0xd0 },
+ 16, 0xf640, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xf4,0x00,0xdd,0x84,0x33,0x80 },
+ 16, 0xf650, 0, {0x04,0xf0,0x03,0x6c,0x02,0xcb,0x02,0x7e,0xc0,0x1f,0xa0,0x53,0xec,0x00,0xcb,0x20 },
+ 16, 0xf660, 0, {0x34,0x40,0x0c,0xd0,0x0b,0x20,0x10,0xeb,0x00,0x1e,0xe0,0x0f,0x30,0x0b,0x2c,0x00 },
+ 16, 0xf670, 0, {0xc1,0x00,0x32,0xc0,0x0f,0x91,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf680, 0, {0x48,0x11,0x9c,0x00,0x87,0x00,0x21,0x80,0x08,0x60,0x00,0x14,0x00,0x85,0x00,0x2d },
+ 16, 0xf690, 0, {0x80,0x0b,0x70,0x52,0xd4,0x04,0x83,0x28,0x29,0xc0,0x28,0x50,0x03,0x50,0x00,0x87 },
+ 16, 0xf6a0, 0, {0x40,0x25,0xc8,0x0f,0x60,0x02,0x04,0x00,0xa7,0x00,0x3d,0xc8,0x0b,0x52,0x02,0xd2 },
+ 16, 0xf6b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x8e,0x00,0x95,0x80,0x21,0xe0 },
+ 16, 0xf6c0, 0, {0x09,0x38,0x02,0x1e,0x11,0xa7,0x80,0x2d,0xf0,0x0b,0x78,0x52,0xce,0x0a,0x97,0x95 },
+ 16, 0xf6d0, 0, {0x21,0xe0,0x19,0x5c,0x02,0x0e,0x00,0xa7,0x80,0x29,0xc8,0x0b,0xf8,0x02,0x1e,0x20 },
+ 16, 0xf6e0, 0, {0x8d,0x80,0x21,0xe0,0x0b,0x58,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf6f0, 0, {0x48,0x14,0xcc,0x00,0x82,0xe0,0xa0,0xe8,0x29,0x30,0x06,0x0e,0x50,0xab,0x80,0x2c },
+ 16, 0xf700, 0, {0xf0,0x0b,0x31,0x42,0xcc,0x00,0x93,0x00,0x28,0xc4,0x09,0x98,0x02,0x4c,0x28,0x83 },
+ 16, 0xf710, 0, {0x00,0x24,0xc0,0x0a,0xb0,0x02,0x0d,0x00,0xa2,0x58,0x28,0xc0,0x0b,0x10,0x02,0xd2 },
+ 16, 0xf720, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb9,0x00,0xde,0x80,0x31,0xa0 },
+ 16, 0xf730, 0, {0x09,0xe2,0x0b,0x78,0x04,0xee,0xa4,0x2f,0xa4,0x8b,0xec,0x02,0xd8,0x00,0xda,0x00 },
+ 16, 0xf740, 0, {0x27,0x81,0x0d,0xec,0x06,0x1b,0x00,0xea,0x04,0x3e,0x80,0x0b,0xe0,0x03,0x3b,0x00 },
+ 16, 0xf750, 0, {0xce,0xc0,0x22,0x80,0x0f,0xa0,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf760, 0, {0x48,0x00,0xe0,0x80,0xf8,0x10,0x3e,0x05,0x0e,0x88,0x03,0xe0,0x08,0x98,0x40,0x3e },
+ 16, 0xf770, 0, {0x00,0x0f,0x84,0x83,0xe1,0x40,0xe8,0x00,0x3a,0x02,0x0e,0x80,0x43,0xe1,0x40,0xf8 },
+ 16, 0xf780, 0, {0x00,0x36,0x00,0x0f,0x80,0x03,0xe0,0x20,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0xf790, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc4,0x00,0xe9,0x00,0x3e,0x40 },
+ 16, 0xf7a0, 0, {0x0c,0x90,0x03,0x04,0x20,0xe9,0x90,0x32,0x68,0x0e,0x98,0x03,0xa4,0x00,0xc1,0x00 },
+ 16, 0xf7b0, 0, {0x30,0x40,0x0c,0x94,0x83,0x24,0x08,0xc9,0x00,0x3e,0x40,0x0c,0x90,0x03,0xa4,0x00 },
+ 16, 0xf7c0, 0, {0xc9,0x00,0x30,0x50,0x0c,0x1a,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf7d0, 0, {0x80,0x04,0x64,0x00,0x89,0x40,0x2e,0x50,0x28,0x90,0x0a,0x24,0x08,0x89,0x06,0x16 },
+ 16, 0xf7e0, 0, {0x61,0x0b,0x9c,0x02,0xe4,0x20,0xa9,0x00,0x36,0x40,0x0d,0x90,0x02,0x27,0x60,0xa9 },
+ 16, 0xf7f0, 0, {0x00,0x2e,0x40,0x28,0x90,0x1a,0x24,0x00,0x89,0x00,0x36,0x40,0x28,0x98,0x02,0x20 },
+ 16, 0xf800, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x2c,0x00,0xa9,0x08,0x2e,0xc2 },
+ 16, 0xf810, 0, {0x09,0x10,0x00,0x24,0x00,0xa9,0x00,0x06,0x40,0x89,0x96,0x06,0xe6,0x00,0x89,0x00 },
+ 16, 0xf820, 0, {0x22,0xc0,0x08,0x90,0x02,0x24,0x02,0x89,0x00,0x24,0x40,0x08,0x90,0x02,0x0c,0x06 },
+ 16, 0xf830, 0, {0x83,0x00,0x22,0x40,0x08,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf840, 0, {0x08,0x04,0x05,0x00,0x81,0x44,0x2c,0x50,0x08,0x14,0x02,0x05,0x80,0x81,0x20,0x64 },
+ 16, 0xf850, 0, {0x70,0x1b,0x14,0x02,0xe4,0x80,0xa1,0x20,0x64,0x40,0x19,0x12,0x0a,0x04,0x80,0xa1 },
+ 16, 0xf860, 0, {0x00,0x2c,0x50,0x18,0x14,0x02,0x85,0x00,0x81,0x40,0x24,0x40,0x40,0x10,0x02,0x02 },
+ 16, 0xf870, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xe0,0x00,0x3c,0x00 },
+ 16, 0xf880, 0, {0x0d,0x80,0x02,0x00,0x00,0xaa,0x50,0x36,0x00,0x0f,0x80,0x03,0xe1,0x40,0xc8,0x52 },
+ 16, 0xf890, 0, {0x72,0x14,0x0c,0x05,0x16,0x20,0x08,0xc8,0x50,0x3e,0x01,0x0c,0x80,0x03,0xa0,0x04 },
+ 16, 0xf8a0, 0, {0xc8,0x00,0xb2,0x00,0x0c,0x80,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf8b0, 0, {0x98,0x19,0xf5,0x02,0xfd,0x40,0x3f,0xd0,0x0f,0xd4,0x23,0xf4,0x44,0xfd,0x14,0x7f },
+ 16, 0xf8c0, 0, {0x50,0x0f,0xd4,0x07,0xf4,0x40,0xf9,0x10,0x3f,0x50,0x07,0xd1,0x23,0xf4,0x40,0xf9 },
+ 16, 0xf8d0, 0, {0x40,0x1e,0x50,0x07,0xd0,0x0b,0x75,0x00,0xfd,0x02,0x3e,0x50,0x0f,0xd4,0x03,0xe6 },
+ 16, 0xf8e0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x00,0xc9,0xa8,0x3e,0x72 },
+ 16, 0xf8f0, 0, {0x0f,0x98,0x03,0xe6,0xc0,0xfd,0xa0,0xb3,0x40,0x0f,0xd0,0x03,0x77,0x80,0xcd,0x90 },
+ 16, 0xf900, 0, {0x7f,0x40,0x0f,0xda,0xa3,0x16,0x90,0xa9,0xc0,0x32,0x60,0x4c,0xb1,0x03,0x24,0x00 },
+ 16, 0xf910, 0, {0xc1,0x00,0x33,0x6a,0x0b,0xda,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf920, 0, {0x38,0x10,0xe3,0x40,0x88,0xe0,0x2e,0x30,0x0b,0x8d,0x02,0xf3,0x40,0xb8,0xe8,0x76 },
+ 16, 0xf930, 0, {0x00,0x4f,0x80,0x0a,0x22,0x80,0x88,0x90,0x6e,0x28,0x8f,0x8a,0x03,0x61,0x44,0xf8 },
+ 16, 0xf940, 0, {0xe1,0x3e,0x2a,0x08,0x88,0x03,0x42,0xa0,0xdc,0xa0,0x3e,0x10,0x0b,0x85,0x0a,0x0e },
+ 16, 0xf950, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0xa0,0x85,0x08,0x2d,0x48 },
+ 16, 0xf960, 0, {0x1b,0x52,0x82,0xd4,0x80,0xb1,0x14,0x20,0x40,0x0b,0x18,0x02,0x05,0x82,0x81,0x00 },
+ 16, 0xf970, 0, {0x6c,0x42,0x0b,0x12,0x82,0x04,0x00,0xa1,0x60,0x21,0x50,0x0b,0x50,0x02,0x14,0x90 },
+ 16, 0xf980, 0, {0x95,0x2c,0x28,0x40,0x0b,0x10,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf990, 0, {0x18,0x15,0xa4,0x01,0x8d,0x44,0x2f,0x40,0x0b,0xd4,0x02,0xf4,0x04,0xb9,0x08,0x22 },
+ 16, 0xf9a0, 0, {0x40,0x0a,0x92,0x02,0x2c,0x84,0x89,0x00,0x2e,0x40,0x0a,0x14,0x02,0x6c,0x80,0xa9 },
+ 16, 0xf9b0, 0, {0x01,0x2a,0x40,0x09,0x50,0x0a,0x5c,0x02,0x8d,0x60,0x2a,0x40,0x0b,0x90,0x42,0x06 },
+ 16, 0xf9c0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe6,0x62,0xc9,0x02,0x3e,0x54 },
+ 16, 0xf9d0, 0, {0x0f,0x90,0x03,0xe4,0x00,0xf9,0x40,0x22,0x46,0x0b,0x98,0x03,0x67,0x20,0xc9,0x01 },
+ 16, 0xf9e0, 0, {0x2e,0x69,0x0b,0x94,0x0b,0x25,0x20,0xa9,0x00,0x22,0x40,0x2d,0x92,0x0a,0x26,0x22 },
+ 16, 0xf9f0, 0, {0x99,0x00,0x2a,0x40,0x8f,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa00, 0, {0x28,0x01,0x86,0x02,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xe6,0x80,0xf1,0xa0,0x3e },
+ 16, 0xfa10, 0, {0x62,0x0f,0x98,0x83,0xc6,0x20,0xf9,0x00,0x3e,0x49,0x0f,0x90,0x83,0xe4,0x00,0x71 },
+ 16, 0xfa20, 0, {0x02,0x3e,0x40,0x0e,0x90,0x0b,0xe6,0x80,0xf9,0x80,0x3e,0x40,0x0f,0x90,0x03,0xca },
+ 16, 0xfa30, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x10,0xc8,0x00,0x3e,0x00 },
+ 16, 0xfa40, 0, {0x4f,0x80,0x43,0xb0,0x00,0xc8,0x41,0x32,0x00,0x0f,0x80,0x03,0x21,0x02,0xc8,0x02 },
+ 16, 0xfa50, 0, {0x3e,0x10,0x4c,0x80,0x03,0x01,0x20,0xc8,0x00,0x3b,0x00,0x0c,0xc0,0x03,0xb0,0x00 },
+ 16, 0xfa60, 0, {0xcc,0x04,0x32,0x00,0x0f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa70, 0, {0x28,0x05,0x28,0x00,0x8a,0x80,0x2e,0x80,0x0b,0xa0,0x02,0xf8,0x04,0x8e,0x00,0x23 },
+ 16, 0xfa80, 0, {0xb2,0x0e,0xe0,0x82,0xf9,0x04,0x8a,0x00,0x2e,0x81,0x0c,0xe0,0x0a,0x3a,0x80,0xda },
+ 16, 0xfa90, 0, {0x00,0x22,0xb6,0x08,0xa0,0x02,0x28,0x00,0x8e,0x00,0x2a,0x80,0x0b,0x60,0x0b,0x0a },
+ 16, 0xfaa0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x44,0x02,0x93,0x81,0x2c,0xc0 },
+ 16, 0xfab0, 0, {0x4b,0x30,0x02,0xc8,0x00,0x83,0xca,0x20,0xe0,0x19,0xb0,0x06,0x8c,0x00,0x81,0x04 },
+ 16, 0xfac0, 0, {0x44,0x40,0x08,0x34,0x02,0x0d,0x00,0x83,0x00,0x2a,0x00,0x08,0x00,0x0a,0x80,0x40 },
+ 16, 0xfad0, 0, {0x88,0x00,0x20,0xc0,0x0b,0x30,0x02,0x4b,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfae0, 0, {0xa0,0x01,0x04,0x02,0x97,0x08,0x2d,0xc0,0x0b,0x60,0x06,0xca,0x00,0x83,0x09,0x21 },
+ 16, 0xfaf0, 0, {0xc0,0x0a,0x70,0x02,0xdc,0x00,0x85,0x31,0x2d,0x68,0x09,0x30,0x02,0x1c,0x14,0x93 },
+ 16, 0xfb00, 0, {0x20,0x20,0xc0,0x08,0xf0,0x42,0x9c,0x02,0x8f,0x00,0x29,0x40,0x03,0x70,0x12,0x28 },
+ 16, 0xfb10, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x16,0x00,0x96,0x84,0x3d,0xa0 },
+ 16, 0xfb20, 0, {0x0f,0x78,0x03,0x9a,0x02,0x87,0x80,0xb1,0xe0,0x0b,0x78,0x03,0xb6,0x00,0xc5,0xa0 },
+ 16, 0xfb30, 0, {0x35,0x61,0x0c,0x78,0x13,0x1e,0x02,0xc7,0x80,0x29,0x00,0x0c,0x48,0x03,0x90,0x00 },
+ 16, 0xfb40, 0, {0xc4,0x80,0x31,0x60,0x0f,0x58,0x03,0x6a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb50, 0, {0x08,0x1d,0xa4,0x00,0xea,0x00,0x3e,0x80,0x0f,0xa0,0x03,0xe8,0x08,0xfb,0x00,0x3e },
+ 16, 0xfb60, 0, {0x80,0x0f,0x90,0x13,0xe4,0x08,0xf9,0x00,0x3c,0x50,0x2e,0xf0,0x03,0xe8,0x08,0xfb },
+ 16, 0xfb70, 0, {0x40,0x3e,0xc0,0x0b,0x30,0x13,0x6c,0x00,0xfb,0x00,0x3e,0x40,0x0f,0x30,0x03,0xc2 },
+ 16, 0xfb80, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xd6,0x00,0xcd,0x80,0x33,0xe0 },
+ 16, 0xfb90, 0, {0x0c,0xf8,0x03,0xfa,0x00,0xfd,0x80,0x3f,0xa0,0x0d,0xf8,0x03,0xfa,0x40,0xcd,0xd0 },
+ 16, 0xfba0, 0, {0x77,0x7e,0x0c,0xe8,0x43,0x1e,0x00,0xcf,0xd8,0x3f,0xe0,0x0c,0xc8,0x03,0x3a,0xc4 },
+ 16, 0xfbb0, 0, {0xcc,0x80,0x33,0xe0,0x0c,0xf8,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfbc0, 0, {0xa8,0x11,0x94,0x02,0x8d,0x00,0x21,0xc0,0x08,0x60,0x03,0xd8,0x10,0x35,0x20,0x8b },
+ 16, 0xfbd0, 0, {0xd4,0x0d,0x64,0x03,0xd8,0xc0,0x85,0x00,0x2f,0x4e,0x07,0x64,0x02,0x9c,0x02,0xd7 },
+ 16, 0xfbe0, 0, {0x30,0x2f,0x04,0x0d,0xf1,0x0b,0x54,0x40,0xaf,0x00,0x35,0x40,0x08,0x70,0x02,0x2a },
+ 16, 0xfbf0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x40,0x84,0x18,0x21,0x80 },
+ 16, 0xfc00, 0, {0x08,0x70,0x02,0xda,0x20,0xb5,0x00,0x09,0x00,0x08,0x70,0x02,0xd4,0x04,0x85,0x00 },
+ 16, 0xfc10, 0, {0x6d,0x4c,0x89,0x60,0x02,0x5c,0x40,0x97,0x00,0x6d,0xc0,0x09,0x40,0x02,0x58,0x80 },
+ 16, 0xfc20, 0, {0x84,0x88,0x25,0x40,0x08,0xd0,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc30, 0, {0x20,0x14,0xc6,0x48,0x80,0x00,0x20,0x80,0x08,0xac,0x02,0xa8,0x00,0xb1,0x00,0xa8 },
+ 16, 0xfc40, 0, {0x88,0x09,0x22,0x02,0x86,0x42,0x81,0x00,0x6c,0x52,0x0b,0x20,0x02,0xc7,0x52,0x83 },
+ 16, 0xfc50, 0, {0x00,0x2c,0x00,0x08,0x34,0x82,0x67,0x00,0xa3,0x80,0x20,0x40,0x08,0x30,0x02,0x08 },
+ 16, 0xfc60, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa3,0x00,0xcb,0xc0,0xb2,0x40 },
+ 16, 0xfc70, 0, {0x2c,0x90,0x82,0xe6,0x00,0xbb,0x80,0xbe,0x78,0x08,0x8e,0x02,0xee,0x00,0x8d,0x00 },
+ 16, 0xfc80, 0, {0x27,0x60,0x0d,0x90,0x0a,0x6f,0x00,0x9f,0x02,0x2e,0x00,0x09,0xb4,0x03,0x67,0x80 },
+ 16, 0xfc90, 0, {0xca,0x40,0xe4,0xc0,0x0c,0x30,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfca0, 0, {0x80,0x00,0xe0,0x80,0xfb,0x22,0x3e,0x40,0x0f,0x80,0x13,0xe4,0x00,0xfb,0x80,0x3e },
+ 16, 0xfcb0, 0, {0x40,0x0f,0x90,0x03,0xe5,0x00,0xf9,0x00,0x3e,0x40,0x0e,0x70,0x23,0xac,0x20,0xfb },
+ 16, 0xfcc0, 0, {0x00,0x3e,0xc0,0x8f,0x80,0x03,0xe9,0x20,0xf9,0x08,0x3e,0x40,0x0f,0xb0,0x13,0xe0 },
+ 16, 0xfcd0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x00,0xc6,0x00,0x32,0x00 },
+ 16, 0xfce0, 0, {0x0f,0xd1,0x83,0x34,0x40,0xcf,0x00,0x3d,0x40,0x0c,0xd0,0x03,0xde,0x50,0x0d,0x00 },
+ 16, 0xfcf0, 0, {0x73,0x40,0x0c,0xd1,0x03,0x7c,0x40,0x87,0x02,0xb3,0x00,0x0d,0xf4,0x03,0x24,0x00 },
+ 16, 0xfd00, 0, {0xce,0x20,0x32,0x40,0x0c,0xd0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd10, 0, {0x81,0x04,0x61,0x22,0x8a,0x00,0x22,0x00,0x0b,0x80,0x40,0x25,0x00,0x89,0xc3,0x2e },
+ 16, 0xfd20, 0, {0x20,0x0a,0x98,0x03,0xa1,0x00,0x89,0x00,0x36,0x40,0x88,0x94,0x02,0x0f,0x01,0xab },
+ 16, 0xfd30, 0, {0x00,0x32,0xc0,0x08,0x04,0x0a,0x29,0x00,0xa9,0x02,0xa2,0x40,0x0d,0xb0,0x0a,0x20 },
+ 16, 0xfd40, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x00,0x00,0x89,0x00,0x22,0x61 },
+ 16, 0xfd50, 0, {0x0b,0x90,0x02,0x25,0x01,0x9b,0x88,0x2e,0x60,0x08,0x88,0x02,0xe8,0x00,0xb1,0x02 },
+ 16, 0xfd60, 0, {0x24,0x40,0x18,0x90,0x02,0x2c,0x00,0xab,0x01,0x20,0xc1,0x08,0xb4,0x42,0x2c,0x00 },
+ 16, 0xfd70, 0, {0x82,0x00,0x22,0xc0,0x08,0xb0,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd80, 0, {0x08,0x04,0x00,0x00,0x01,0x00,0x20,0x40,0x0b,0x00,0x0a,0x04,0x46,0x83,0x01,0x2c },
+ 16, 0xfd90, 0, {0x40,0x1a,0x00,0x06,0x80,0x00,0x81,0x00,0x24,0x40,0x08,0x20,0x0a,0x0c,0x01,0xa3 },
+ 16, 0xfda0, 0, {0x00,0x24,0x00,0x08,0x80,0x02,0x00,0x00,0xa1,0x00,0x20,0x40,0x09,0x30,0x02,0x02 },
+ 16, 0xfdb0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x02,0xc8,0x00,0x22,0x00 },
+ 16, 0xfdc0, 0, {0x0f,0x90,0x02,0x25,0x00,0xda,0x00,0x3e,0x40,0x0c,0x90,0x02,0xcc,0x00,0xfd,0x00 },
+ 16, 0xfdd0, 0, {0x37,0x40,0x0c,0x10,0x13,0x2c,0x02,0xaf,0x00,0x32,0xc0,0x0d,0xb0,0x03,0x2c,0x00 },
+ 16, 0xfde0, 0, {0xca,0x00,0x32,0x40,0x4c,0x90,0x0b,0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfdf0, 0, {0xa0,0x1d,0xf0,0x00,0xfc,0x00,0x3f,0x00,0x07,0xc0,0x03,0xf4,0x1c,0xf4,0x00,0x3f },
+ 16, 0xfe00, 0, {0x00,0x1f,0xc0,0x23,0xb0,0x02,0x9d,0x01,0x3f,0x40,0x8f,0xc0,0x07,0xfc,0x02,0xff },
+ 16, 0xfe10, 0, {0x00,0x7b,0x00,0x0f,0xc0,0x03,0xf0,0x00,0xfd,0x00,0x3f,0x40,0x0f,0x70,0x03,0xe8 },
+ 16, 0xfe20, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfa,0x00,0xcb,0x80,0x3f,0x24 },
+ 16, 0xfe30, 0, {0x0a,0xc1,0x03,0xfc,0x24,0xcd,0x20,0x37,0x0a,0x0c,0xc2,0x83,0x30,0x80,0xdc,0x02 },
+ 16, 0xfe40, 0, {0x3f,0xcc,0x0d,0xd9,0x03,0x3c,0x58,0xdf,0x30,0x33,0xc8,0x0d,0xf4,0x23,0x3c,0x40 },
+ 16, 0xfe50, 0, {0xff,0x00,0x3f,0xc5,0x4f,0xf0,0x23,0xb0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfe60, 0, {0x80,0x00,0xec,0x02,0x0b,0x82,0x2e,0x08,0x0d,0xb7,0x02,0xfd,0x00,0x83,0x18,0x0a },
+ 16, 0xfe70, 0, {0x58,0x0a,0x84,0xa2,0xa5,0xa0,0x89,0x30,0x22,0x55,0x08,0x12,0x62,0xbd,0x90,0x8f },
+ 16, 0xfe80, 0, {0x62,0x21,0xd6,0x48,0xf3,0x02,0x3c,0xc5,0xbf,0x48,0x2f,0xd8,0x4b,0xb7,0x02,0xe0 },
+ 16, 0xfe90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xec,0x00,0x83,0x00,0x2e,0x89 },
+ 16, 0xfea0, 0, {0x28,0x00,0x02,0xec,0xa0,0x89,0x22,0x28,0x82,0x08,0x12,0x02,0x28,0x40,0x9a,0x08 },
+ 16, 0xfeb0, 0, {0x28,0xc8,0x88,0xb2,0x0a,0x0d,0x10,0x93,0x10,0xa0,0xc8,0x28,0x30,0x02,0x4c,0x00 },
+ 16, 0xfec0, 0, {0xb3,0x60,0x2c,0xc4,0x0b,0x30,0xc2,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfed0, 0, {0xc0,0x15,0xac,0x40,0x8b,0x00,0x2e,0x80,0x08,0xb1,0x02,0xec,0x02,0x8b,0x00,0x20 },
+ 16, 0xfee0, 0, {0xd0,0x0a,0x90,0x02,0xac,0x00,0x0b,0x01,0x26,0x40,0x08,0x94,0x02,0x8c,0x00,0x8b },
+ 16, 0xfef0, 0, {0x00,0x22,0xc0,0x08,0xb0,0x02,0x2c,0x10,0xbb,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0xf0 },
+ 16, 0xff00, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x8c,0x20,0xcb,0x02,0x3e,0x2d },
+ 16, 0xff10, 0, {0x08,0x80,0x03,0xec,0x08,0xc9,0x80,0x1e,0x04,0x0c,0xb0,0x03,0x01,0x08,0x50,0x18 },
+ 16, 0xff20, 0, {0x3e,0x40,0x0c,0x04,0x03,0x2c,0x00,0xdb,0x01,0x32,0xc0,0x0c,0xb0,0x0b,0x2c,0x08 },
+ 16, 0xff30, 0, {0xbb,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0x80,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xff40, 0, {0xe1,0x00,0xbc,0x00,0xff,0x00,0x3f,0x60,0x0f,0xc0,0x23,0xec,0x00,0xff,0xc0,0xbe },
+ 16, 0xff50, 0, {0x60,0x8f,0xc9,0x23,0xf6,0x50,0xed,0x80,0xb8,0x50,0xaf,0xc0,0x03,0xfc,0x00,0xff },
+ 16, 0xff60, 0, {0x00,0x3f,0xc1,0x0e,0xb0,0x03,0xfc,0x04,0xff,0x02,0x3f,0xc0,0x0f,0xf0,0x03,0xf8 },
+ 16, 0xff70, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xeb,0x00,0x32,0x80 },
+ 16, 0xff80, 0, {0x0d,0x90,0x03,0x2c,0x00,0x89,0x00,0x3e,0x98,0x8c,0x30,0x03,0x61,0x80,0xfa,0x40 },
+ 16, 0xff90, 0, {0x3e,0x40,0x2c,0xa5,0x03,0x2c,0x00,0xfb,0x01,0x3c,0xc0,0x2c,0x30,0x03,0x2c,0x00 },
+ 16, 0xffa0, 0, {0xdb,0x02,0x32,0xc0,0x0f,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xffb0, 0, {0xca,0x00,0x2e,0x80,0x8b,0x82,0xa0,0xc0,0x8c,0x90,0x02,0x3c,0x00,0x8b,0xf0,0x22 },
+ 16, 0xffc0, 0, {0xc2,0x0d,0x80,0x02,0x27,0x00,0x8b,0x10,0x22,0x40,0x08,0x80,0x22,0x3c,0x00,0xbf },
+ 16, 0xffd0, 0, {0x00,0x2f,0xc0,0x08,0xf0,0x02,0x3c,0x00,0xbf,0x01,0xa3,0xc0,0x0b,0xf0,0x12,0xf2 },
+ 16, 0xffe0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb3,0x1c,0x20,0x40 },
+ 16, 0xfff0, 0, {0x08,0x00,0x06,0x2c,0x00,0x9b,0x00,0x20,0xd0,0x08,0x20,0x02,0x4c,0x00,0xa3,0x00 },
+ 16, 0x8010, 0, {0x2c,0xc0,0x08,0x10,0x0a,0x0c,0x00,0xbb,0x00,0x28,0xc0,0x09,0x30,0x02,0x0c,0x00 },
+ 16, 0x8020, 0, {0xb3,0x00,0x20,0xc0,0x0b,0x30,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8030, 0, {0x22,0x11,0x1e,0x00,0x97,0xa0,0x21,0xa0,0x08,0x79,0x02,0x1e,0x00,0x97,0x90,0x21 },
+ 16, 0x8040, 0, {0x60,0x09,0xe8,0x22,0x3e,0x00,0xaf,0x84,0x21,0xe4,0x48,0x5c,0x02,0x1e,0x00,0xb7 },
+ 16, 0x8050, 0, {0x90,0x2d,0xe0,0x09,0x78,0x00,0x1e,0x09,0xb3,0x90,0x21,0xe4,0x0b,0x78,0x02,0xd8 },
+ 16, 0x8060, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x18,0x2c,0x40,0xb3,0xb0,0x32,0x40 },
+ 16, 0x8070, 0, {0x2c,0x81,0x13,0x0c,0x42,0xd1,0x00,0xb0,0xc0,0x8c,0x30,0x03,0x48,0x20,0xe3,0x01 },
+ 16, 0x8080, 0, {0x3c,0xc0,0x0c,0x30,0x03,0x0c,0x00,0xf3,0x10,0x3c,0xc0,0xcd,0x32,0x0b,0x0c,0x40 },
+ 16, 0x8090, 0, {0xd3,0x00,0x30,0xc0,0x0f,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x80a0, 0, {0x40,0x15,0xbc,0x00,0xe7,0x00,0x3f,0x80,0x0b,0xf1,0x03,0xfd,0x00,0x6d,0x00,0x32 },
+ 16, 0x80b0, 0, {0x40,0x1f,0x70,0x07,0xd8,0x41,0xc3,0x10,0x3b,0xc0,0x0f,0xd1,0x03,0xfd,0x00,0xff },
+ 16, 0x80c0, 0, {0x10,0x3f,0xc0,0x0e,0xf0,0x03,0xec,0x10,0xff,0x08,0x3f,0xc3,0x0f,0xf0,0x03,0xd0 },
+ 16, 0x80d0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xec,0x04,0xfb,0x02,0x3e,0x40 },
+ 16, 0x80e0, 0, {0x0b,0xa0,0x03,0xac,0x00,0xdb,0x00,0x36,0x80,0x0d,0xb0,0x03,0xac,0x00,0xe8,0x00 },
+ 16, 0x80f0, 0, {0x36,0xc1,0x2e,0x90,0x03,0x2c,0x00,0xcb,0xa0,0x36,0xdc,0x0f,0xb0,0x03,0x2d,0x68 },
+ 16, 0x8100, 0, {0xfb,0xa0,0x92,0xc2,0x0c,0xb1,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8110, 0, {0x48,0x11,0x9c,0x08,0x37,0x00,0x2d,0xc0,0x0b,0xe0,0x02,0x1d,0x80,0xb7,0x04,0x23 },
+ 16, 0x8120, 0, {0x00,0x0a,0x40,0x02,0x1c,0x18,0x84,0x00,0x25,0xc0,0x18,0x50,0x32,0x0d,0x80,0xa3 },
+ 16, 0x8130, 0, {0x30,0x21,0xcc,0x0b,0x34,0x82,0x1c,0x10,0xb7,0x30,0x21,0xc8,0x08,0x70,0x02,0xd2 },
+ 16, 0x8140, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x20,0xb7,0x80,0x2d,0x60 },
+ 16, 0x8150, 0, {0x0b,0xfc,0x22,0x9e,0x00,0x8d,0x80,0x25,0xa0,0x08,0xf8,0x22,0x92,0x00,0xb4,0x80 },
+ 16, 0x8160, 0, {0x25,0xe0,0x08,0xf8,0x02,0x1e,0x00,0x87,0xb0,0x21,0xe0,0x09,0x7a,0x02,0x1e,0x18 },
+ 16, 0x8170, 0, {0xb3,0x80,0x21,0xe0,0x08,0x78,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8180, 0, {0x48,0x04,0xc5,0x20,0xb3,0x01,0x2c,0xd8,0x0b,0x3c,0x02,0x2c,0x08,0xb9,0x00,0x20 },
+ 16, 0x8190, 0, {0x03,0x0a,0x00,0x82,0x22,0x08,0x90,0x0d,0x26,0xe4,0x08,0x10,0x02,0x0c,0x00,0xa3 },
+ 16, 0x81a0, 0, {0x00,0x22,0xc0,0x0b,0x30,0x02,0x6c,0x00,0xb3,0x00,0x22,0xc0,0x28,0x30,0x02,0xc2 },
+ 16, 0x81b0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0x99,0x00,0xfa,0x02,0x3f,0x90 },
+ 16, 0x81c0, 0, {0x0f,0xec,0x23,0xa8,0x00,0xda,0x00,0x35,0x80,0x0d,0xe0,0x02,0xba,0x02,0xfe,0xc2 },
+ 16, 0x81d0, 0, {0xb6,0xa0,0x0e,0xe4,0x0b,0x28,0x00,0xca,0x00,0xb2,0x80,0x0f,0xa0,0x0b,0x28,0x00 },
+ 16, 0x81e0, 0, {0xfa,0x00,0x32,0x80,0x0c,0xa0,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x81f0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x82,0x03,0xe0,0x00,0xf8,0x00,0x3e },
+ 16, 0x8200, 0, {0x00,0x0f,0x81,0x03,0xe0,0x40,0xe8,0x10,0x3a,0x00,0x4f,0x84,0x83,0xe0,0x00,0xf8 },
+ 16, 0x8210, 0, {0x00,0x3a,0x00,0x0f,0x00,0x03,0xa0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0x8220, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xe5,0x00,0xc9,0x02,0x3e,0x40 },
+ 16, 0x8230, 0, {0x0f,0x90,0x23,0x24,0x00,0xc9,0x00,0x32,0x68,0x2f,0x10,0x03,0x24,0x00,0xe9,0x14 },
+ 16, 0x8240, 0, {0x32,0x40,0x0d,0x90,0x0b,0x04,0x00,0xd9,0x00,0x1e,0x40,0x0c,0x90,0x03,0x24,0x00 },
+ 16, 0x8250, 0, {0xc9,0x00,0x36,0x40,0x0c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8260, 0, {0x80,0x14,0x64,0x00,0x89,0x01,0x2e,0x40,0x4b,0x90,0x12,0x24,0x00,0x89,0xc2,0xa2 },
+ 16, 0x8270, 0, {0x60,0x88,0x90,0x03,0x64,0x00,0x89,0xc1,0xa2,0x40,0x48,0x16,0x03,0x64,0x02,0x89 },
+ 16, 0x8280, 0, {0x00,0x2e,0x40,0x08,0x90,0x22,0x24,0x00,0x89,0x00,0x3e,0x40,0x28,0x90,0x0a,0x20 },
+ 16, 0x8290, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x04,0x24,0x00,0x89,0x02,0x2e,0x40 },
+ 16, 0x82a0, 0, {0x0b,0x10,0x02,0x24,0x00,0x89,0x10,0x22,0x40,0x89,0x90,0x02,0xac,0x00,0xa1,0x08 },
+ 16, 0x82b0, 0, {0x22,0x40,0x09,0x98,0x02,0xa4,0x00,0x89,0x00,0x2a,0x40,0x08,0x90,0x02,0x24,0x00 },
+ 16, 0x82c0, 0, {0x89,0x00,0x26,0x40,0x08,0x10,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x82d0, 0, {0x08,0x00,0x24,0x00,0x81,0x00,0x2c,0x41,0x0b,0x12,0x02,0x04,0x81,0x81,0x20,0x22 },
+ 16, 0x82e0, 0, {0x48,0x08,0x12,0x02,0xc4,0x81,0x81,0x24,0x02,0x48,0x0a,0x90,0x02,0x84,0xa0,0x81 },
+ 16, 0x82f0, 0, {0x28,0x6c,0x4a,0x08,0x12,0xd2,0x04,0xa1,0x81,0x28,0x2c,0x4a,0x08,0x12,0x82,0x02 },
+ 16, 0x8300, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x08,0x61,0x40,0xc8,0x00,0x2e,0x14 },
+ 16, 0x8310, 0, {0x0f,0x85,0x0b,0x21,0x42,0xca,0x50,0x22,0x14,0x0d,0x85,0x43,0xa1,0x40,0xe8,0x50 },
+ 16, 0x8320, 0, {0x30,0x00,0x0d,0x85,0x02,0xa1,0xc0,0xd8,0x20,0x3a,0x08,0x2c,0x82,0x0b,0x20,0x82 },
+ 16, 0x8330, 0, {0xc8,0x20,0x34,0x09,0x8c,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8340, 0, {0x98,0x0d,0xfc,0x02,0xf9,0x00,0x3f,0x40,0x4f,0xd1,0x03,0xe4,0x40,0xf5,0x14,0xbf },
+ 16, 0x8350, 0, {0x44,0x0d,0x51,0x23,0x5c,0x40,0xf5,0x10,0x1f,0x4e,0x4d,0x50,0x03,0x64,0x08,0xf9 },
+ 16, 0x8360, 0, {0x28,0x3e,0x4a,0x8f,0x92,0x83,0xe4,0xa0,0xf9,0x28,0x3a,0x4b,0x0f,0x92,0x83,0xe6 },
+ 16, 0x8370, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xf4,0x40,0xfd,0x00,0x30,0x40 },
+ 16, 0x8380, 0, {0x0c,0x90,0x03,0x24,0x00,0xdd,0x00,0x3b,0x40,0x0e,0x90,0x03,0x74,0x00,0x5d,0x00 },
+ 16, 0x8390, 0, {0x36,0x64,0x0d,0xd0,0x00,0xa6,0x00,0xf9,0x40,0x32,0x78,0x0c,0x99,0x03,0x24,0x40 },
+ 16, 0x83a0, 0, {0xc9,0x90,0x32,0x50,0x0f,0x9b,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x83b0, 0, {0x38,0x10,0xe2,0x80,0xb8,0x00,0x22,0x01,0x08,0x80,0x0a,0x20,0x00,0x88,0x00,0x2a },
+ 16, 0x83c0, 0, {0x00,0x08,0x80,0x02,0x20,0x00,0x88,0x00,0x22,0x20,0x08,0x8a,0x8b,0xe1,0x00,0xb8 },
+ 16, 0x83d0, 0, {0x80,0x22,0x30,0x28,0x0d,0x02,0x22,0x00,0xd8,0xe4,0x22,0x28,0x0b,0x8f,0x0a,0x0e },
+ 16, 0x83e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x80,0xb1,0x00,0xa0,0x40 },
+ 16, 0x83f0, 0, {0x08,0x10,0x02,0x04,0x00,0x89,0x00,0x08,0x40,0x0a,0x90,0x42,0x44,0x00,0x91,0x00 },
+ 16, 0x8400, 0, {0x20,0x58,0x28,0x90,0x02,0x85,0x00,0x81,0x20,0xa0,0x4c,0x09,0x12,0x0a,0x04,0x80 },
+ 16, 0x8410, 0, {0x91,0x40,0xa0,0x40,0x0b,0x10,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8420, 0, {0x18,0x15,0xa4,0x00,0xb9,0x02,0x20,0x40,0x08,0x90,0x02,0x04,0x00,0x89,0x01,0x22 },
+ 16, 0x8430, 0, {0x40,0x28,0x90,0x22,0x04,0x00,0x89,0x10,0x22,0x40,0x08,0x90,0x02,0xe4,0x00,0xb1 },
+ 16, 0x8440, 0, {0x00,0x22,0x40,0x81,0x90,0x02,0x04,0x00,0x91,0x00,0x22,0x40,0x0b,0x90,0x02,0x06 },
+ 16, 0x8450, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe5,0x00,0xf1,0x00,0x32,0x60 },
+ 16, 0x8460, 0, {0x2c,0x92,0x13,0x24,0x02,0xd1,0x10,0x3a,0x40,0x0e,0x12,0x03,0x66,0x04,0xd9,0x00 },
+ 16, 0x8470, 0, {0xb6,0x40,0x0d,0x19,0x03,0xa4,0x00,0xf9,0x00,0x32,0x40,0x09,0x90,0x01,0x24,0x00 },
+ 16, 0x8480, 0, {0xd9,0x02,0x22,0x40,0x0f,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8490, 0, {0x2a,0x01,0xa5,0x00,0xf9,0x00,0x3e,0x64,0x0f,0x10,0x03,0xe4,0x00,0xf9,0x81,0x3e },
+ 16, 0x84a0, 0, {0x66,0x8f,0x90,0x23,0xe4,0x80,0xf9,0x04,0x3e,0x40,0x8f,0x90,0x03,0xe4,0x04,0xf9 },
+ 16, 0x84b0, 0, {0x00,0x3c,0x40,0x0e,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x40,0x0f,0x10,0x03,0xca },
+ 16, 0x84c0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x10,0xa0,0x00,0xf8,0x24,0x3e,0x00 },
+ 16, 0x84d0, 0, {0x2c,0x84,0x03,0x20,0x00,0xb8,0x20,0x3e,0x00,0x8c,0x80,0x03,0xa0,0x00,0x70,0x82 },
+ 16, 0x84e0, 0, {0x32,0x00,0x0f,0x80,0x03,0x20,0x08,0xf8,0x00,0x32,0x00,0x2c,0x80,0x0b,0x20,0x08 },
+ 16, 0x84f0, 0, {0xc8,0x00,0x3e,0x00,0x0c,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8500, 0, {0x28,0x05,0x28,0x04,0xbe,0x80,0x3a,0x80,0x08,0xa0,0x02,0x28,0x04,0x8e,0x00,0x6d },
+ 16, 0x8510, 0, {0x90,0x0d,0xa0,0x02,0x3a,0x00,0x8e,0x80,0xa2,0x80,0x0e,0xe0,0x0b,0x68,0x00,0xba },
+ 16, 0x8520, 0, {0x00,0x22,0x80,0x08,0xa0,0x02,0x28,0x00,0xda,0x00,0x2e,0x80,0x08,0xa0,0x02,0xca },
+ 16, 0x8530, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x81,0x4c,0x00,0xb1,0x00,0x2c,0xc0 },
+ 16, 0x8540, 0, {0x08,0x30,0x02,0x0c,0x18,0xa3,0x02,0x2c,0x10,0x88,0x30,0x06,0x82,0x81,0xa0,0x00 },
+ 16, 0x8550, 0, {0x2a,0xc0,0x0b,0x30,0x0a,0x4c,0x00,0xb3,0x00,0x20,0xc0,0x1a,0xb0,0x02,0x8c,0x01 },
+ 16, 0x8560, 0, {0x83,0x00,0x2c,0xc0,0x08,0x30,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8570, 0, {0x20,0x01,0x1c,0x10,0xb4,0x0a,0x2b,0xc8,0x08,0x31,0x26,0x1c,0x00,0x86,0x00,0x2d },
+ 16, 0x8580, 0, {0xc0,0x09,0x72,0x02,0x1d,0x00,0xa5,0x40,0x29,0xc0,0x0a,0x60,0x02,0x5c,0x88,0xb3 },
+ 16, 0x8590, 0, {0x20,0x25,0xc8,0x0a,0x72,0x02,0x9c,0x80,0x97,0x20,0x2c,0xe8,0x80,0x72,0x02,0xe8 },
+ 16, 0x85a0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x16,0x00,0xb5,0x80,0x3d,0xe2 },
+ 16, 0x85b0, 0, {0x0c,0x7a,0x8b,0x0e,0xc0,0xa7,0x81,0x2c,0x20,0x0c,0xfc,0x03,0x92,0x02,0xef,0x80 },
+ 16, 0x85c0, 0, {0x39,0xe4,0x0b,0xd8,0x01,0x1f,0x00,0xf7,0x80,0xb3,0xf4,0x8e,0x79,0x03,0x8e,0x00 },
+ 16, 0x85d0, 0, {0xc7,0xc4,0x3d,0xe8,0x2c,0x7b,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x85e0, 0, {0x08,0x1d,0xac,0x00,0xf8,0x00,0x3e,0xdd,0x87,0xb6,0x03,0xed,0xcc,0xe9,0x00,0x3e },
+ 16, 0x85f0, 0, {0x40,0x0f,0xb0,0x07,0xcc,0x10,0x0b,0x00,0x36,0xd8,0x0f,0x80,0x43,0xad,0x80,0xfb },
+ 16, 0x8600, 0, {0x28,0x3a,0xc0,0x0d,0xb4,0x03,0x6c,0xe2,0xeb,0x60,0x3e,0xd4,0x0f,0xb0,0x03,0xc2 },
+ 16, 0x8610, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x00,0xfe,0x90,0x3f,0xe5 },
+ 16, 0x8620, 0, {0x0e,0xf8,0x03,0x3e,0x10,0xff,0x90,0x17,0x60,0x0f,0xfc,0x03,0x7a,0x00,0xee,0x80 },
+ 16, 0x8630, 0, {0x37,0xe2,0x0e,0x78,0x0f,0xff,0x40,0xef,0x88,0x1f,0xe0,0x0c,0xf8,0x83,0xfe,0x80 },
+ 16, 0x8640, 0, {0xcf,0xd0,0xb3,0xf0,0x0c,0xf8,0xc3,0x10,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8650, 0, {0xa8,0x11,0x9c,0x40,0xb4,0x10,0x0f,0xcc,0x00,0x72,0x02,0x1c,0x00,0xb6,0x02,0x09 },
+ 16, 0x8660, 0, {0xc0,0x28,0xf0,0x02,0x98,0x00,0xa6,0x00,0x21,0xc0,0x0b,0x60,0x03,0xfc,0x02,0x87 },
+ 16, 0x8670, 0, {0x00,0x2d,0xc0,0x08,0x70,0x02,0xde,0x00,0x8f,0x10,0x21,0xc0,0x08,0xf0,0x03,0x6a },
+ 16, 0x8680, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x94,0x00,0xb6,0x02,0x2f,0xc2 },
+ 16, 0x8690, 0, {0x1a,0x30,0x80,0x1c,0x00,0xb6,0x08,0x01,0x40,0x0a,0xf0,0x02,0x18,0x00,0x87,0x00 },
+ 16, 0x86a0, 0, {0x21,0xc0,0x0b,0xd0,0x02,0x9c,0x10,0x87,0x00,0x29,0xc0,0x08,0x70,0x02,0xdc,0x44 },
+ 16, 0x86b0, 0, {0x87,0x10,0x64,0xc0,0x08,0x70,0x02,0x06,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x86c0, 0, {0x60,0x14,0xce,0x60,0xb0,0x00,0x2c,0xc0,0x08,0x34,0x0a,0x0c,0x08,0xb0,0x04,0x00 },
+ 16, 0x86d0, 0, {0x40,0x08,0x30,0xa2,0x89,0x80,0xa2,0x62,0x20,0xe0,0x0b,0x00,0x0a,0xcc,0x08,0x83 },
+ 16, 0x86e0, 0, {0x00,0x6c,0xc0,0x08,0x30,0x52,0xcc,0x00,0x83,0x00,0x24,0xc0,0x08,0x30,0x02,0x58 },
+ 16, 0x86f0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xae,0x00,0xf8,0x00,0x3f,0xd0 },
+ 16, 0x8700, 0, {0x0e,0xfc,0x03,0x3c,0x00,0xf9,0x00,0x92,0x84,0x0f,0xfc,0x03,0x64,0x00,0x80,0x00 },
+ 16, 0x8710, 0, {0xb7,0xc3,0x0f,0xb8,0x83,0xbc,0x04,0xef,0x00,0x3f,0xc0,0x3c,0xf0,0x03,0xfc,0x02 },
+ 16, 0x8720, 0, {0xcf,0x00,0x37,0xc0,0x28,0xf0,0x13,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8730, 0, {0x80,0x00,0xec,0x00,0xf8,0x41,0x3e,0xc8,0x0f,0x32,0x03,0xec,0x00,0xf8,0x00,0x3a },
+ 16, 0x8740, 0, {0xc4,0x0f,0xb1,0x03,0xc4,0x00,0xf9,0x00,0x36,0xc0,0x0f,0xe4,0x0b,0xec,0x04,0xfb },
+ 16, 0x8750, 0, {0x00,0x3e,0xc1,0x0f,0xb0,0x43,0xec,0x04,0xfb,0x00,0x3a,0xc0,0x0f,0xb0,0x03,0xe4 },
+ 16, 0x8760, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf4,0x00,0xfc,0x80,0x3f,0xc0 },
+ 16, 0x8770, 0, {0x1f,0xf0,0x03,0x3c,0x08,0xfb,0x00,0x33,0x80,0x2e,0xf0,0x13,0xa4,0x04,0xcb,0x00 },
+ 16, 0x8780, 0, {0xb9,0xc0,0x2c,0xd8,0x0b,0x3c,0x00,0xff,0x00,0x3f,0xc0,0x09,0x70,0x00,0x2c,0x04 },
+ 16, 0x8790, 0, {0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xc0,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x87a0, 0, {0xc1,0x00,0x6c,0x00,0xb8,0x80,0x2e,0xc0,0x0b,0xb0,0x03,0x6c,0x00,0xb9,0x16,0x28 },
+ 16, 0x87b0, 0, {0x72,0x08,0xb0,0x22,0x27,0x40,0xdb,0x00,0x22,0xc0,0x08,0xbd,0x82,0x2c,0x08,0xbb },
+ 16, 0x87c0, 0, {0x00,0x2e,0xc0,0x48,0xb0,0x02,0x2c,0x00,0xbb,0x00,0x2e,0xc1,0x0b,0xb0,0x02,0xe0 },
+ 16, 0x87d0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xb8,0x60,0x2e,0xc0 },
+ 16, 0x87e0, 0, {0x0b,0xb0,0x02,0x2c,0x00,0xb1,0x00,0x2a,0x84,0x4a,0x30,0x22,0xac,0x20,0x98,0x80 },
+ 16, 0x87f0, 0, {0x2a,0xc0,0x08,0x30,0x02,0xac,0x00,0x3b,0x00,0x2c,0xc0,0x0a,0xb0,0x02,0xac,0x08 },
+ 16, 0x8800, 0, {0xbb,0x00,0x2e,0xc0,0x0b,0xb0,0x42,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8810, 0, {0x08,0x04,0x0c,0x01,0xb0,0x00,0x2c,0xc0,0x0b,0x30,0x02,0x4c,0x04,0xb0,0x00,0x2a },
+ 16, 0x8820, 0, {0x80,0x08,0x30,0x02,0x00,0x00,0x10,0x04,0x28,0xc0,0x08,0x20,0x42,0x8c,0x00,0xb3 },
+ 16, 0x8830, 0, {0x00,0x2c,0xc0,0x42,0x30,0x0a,0x8c,0x00,0xb3,0x00,0x2c,0xc0,0x8b,0x30,0x02,0xc2 },
+ 16, 0x8840, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x64,0x00,0xf8,0x50,0x3f,0xc0 },
+ 16, 0x8850, 0, {0x0b,0xf0,0x03,0x3c,0x00,0xfa,0x04,0x32,0x80,0x0e,0xf0,0x23,0xac,0x00,0xd9,0x00 },
+ 16, 0x8860, 0, {0x3b,0xc0,0x0c,0x90,0x03,0xbc,0x04,0xff,0x00,0x3d,0xc0,0x2e,0xf0,0x0b,0x3c,0x00 },
+ 16, 0x8870, 0, {0xff,0x04,0x3f,0xc0,0x0f,0xf0,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8880, 0, {0xa0,0x1d,0xfc,0x00,0xfc,0x00,0x3f,0xc0,0x07,0xf0,0x03,0xfc,0x04,0x7c,0x02,0xb5 },
+ 16, 0x8890, 0, {0x00,0x0f,0xf0,0x03,0xf0,0x00,0xfc,0x00,0x37,0xc0,0x0f,0xf0,0x13,0x7c,0x00,0xff },
+ 16, 0x88a0, 0, {0x00,0x3f,0xc0,0x0d,0xf0,0x03,0x6d,0x00,0xff,0x00,0x3f,0xc0,0x1f,0xf0,0x03,0xe8 },
+ 16, 0x88b0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xd2,0x00,0xd5,0x80,0x33,0x0a },
+ 16, 0x88c0, 0, {0x4c,0xf8,0x03,0xf2,0x00,0xfc,0x00,0x37,0x26,0x1f,0xca,0x03,0xbc,0xc4,0xcf,0x20 },
+ 16, 0x88d0, 0, {0x33,0xe4,0x0f,0x78,0x03,0x3e,0x44,0xcf,0x00,0x3b,0xce,0x9f,0x68,0x13,0xd0,0x00 },
+ 16, 0x88e0, 0, {0xcd,0x80,0xb3,0x60,0x0f,0xfa,0x83,0xf0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x88f0, 0, {0x80,0x10,0xe0,0x80,0xc9,0x28,0x22,0x30,0x08,0xb2,0x22,0xea,0x01,0xb8,0x82,0x20 },
+ 16, 0x8900, 0, {0x50,0x4f,0x9c,0x00,0xa8,0xd1,0xdb,0x10,0xa6,0xe0,0x17,0xb8,0x03,0xec,0x80,0xdb },
+ 16, 0x8910, 0, {0x08,0x1f,0xd0,0x0b,0xb8,0x02,0xf6,0x00,0xfb,0x80,0x22,0x40,0x0b,0xb0,0x02,0x60 },
+ 16, 0x8920, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc4,0x20,0x81,0x80,0x20,0x00 },
+ 16, 0x8930, 0, {0x8b,0x30,0x82,0xc0,0x00,0xb0,0x10,0x28,0x08,0x8b,0x11,0x30,0xc4,0x84,0x90,0x28 },
+ 16, 0x8940, 0, {0x24,0xc8,0x0b,0x30,0x02,0x4c,0x00,0x83,0x10,0x04,0xc8,0x0b,0x30,0x02,0xcc,0x00 },
+ 16, 0x8950, 0, {0xb3,0x00,0x24,0x40,0x0b,0x30,0x02,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8960, 0, {0xc0,0x15,0xa6,0x00,0x81,0x00,0x22,0x10,0x0b,0xb0,0x12,0xea,0x20,0xbb,0x00,0x2a },
+ 16, 0x8970, 0, {0x70,0x0a,0x9c,0x02,0x62,0x00,0x98,0x88,0x26,0xc8,0x02,0xb2,0x02,0x8e,0x08,0x8b },
+ 16, 0x8980, 0, {0x18,0x22,0xc0,0x0b,0xa0,0x02,0xee,0x20,0x3b,0x00,0x26,0x40,0x0b,0xb0,0x02,0x70 },
+ 16, 0x8990, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe0,0x00,0xcb,0x00,0x32,0x80 },
+ 16, 0x89a0, 0, {0x0f,0xb0,0x03,0xe7,0x00,0xb8,0x52,0x3e,0x20,0x4b,0x0c,0x43,0xef,0x82,0x9b,0xc0 },
+ 16, 0x89b0, 0, {0x32,0xc0,0x0b,0xb0,0x02,0x6c,0x01,0x8b,0x80,0x2e,0xc0,0x0b,0xa0,0x83,0xe6,0x00 },
+ 16, 0x89c0, 0, {0xfb,0x00,0x36,0x40,0x0f,0xf0,0x03,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x89d0, 0, {0xe0,0x01,0xb0,0x02,0xff,0x04,0x3f,0x90,0x0c,0xf1,0x01,0xf4,0x08,0x7d,0x80,0x37 },
+ 16, 0x89e0, 0, {0x00,0x0f,0xc0,0x23,0x98,0x00,0xf7,0x00,0x2b,0xe0,0x0f,0xf8,0x23,0xfc,0x06,0xfb },
+ 16, 0x89f0, 0, {0x83,0xbf,0xc0,0x87,0xd0,0x03,0xdc,0x00,0xef,0x00,0x3b,0xc0,0x0f,0xb0,0x01,0xf8 },
+ 16, 0x8a00, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa6,0x00,0xcb,0x00,0x33,0x80 },
+ 16, 0x8a10, 0, {0x0f,0xb0,0x03,0xe1,0x10,0xf2,0x40,0xb2,0x00,0x3d,0x94,0x17,0x2d,0x44,0xfa,0x41 },
+ 16, 0x8a20, 0, {0x32,0xc0,0x9f,0xb0,0x23,0x2c,0x02,0xcb,0x40,0x32,0xc0,0x4f,0x90,0x03,0x3d,0x00 },
+ 16, 0x8a30, 0, {0xcb,0x00,0x3e,0x40,0x0f,0xb0,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8a40, 0, {0x88,0x05,0x26,0x00,0x8b,0x71,0x20,0xd5,0x03,0x99,0x02,0xe0,0x00,0xbb,0x80,0x22 },
+ 16, 0x8a50, 0, {0x60,0x1c,0x80,0x03,0x60,0x00,0xb8,0x02,0x22,0xc2,0x0b,0x32,0x02,0x2c,0x01,0x8f },
+ 16, 0x8a60, 0, {0x02,0xd7,0xc0,0x0b,0xa0,0x03,0x6d,0x40,0x53,0x80,0x2e,0xc0,0x0e,0xf0,0x43,0x72 },
+ 16, 0x8a70, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x68,0x02,0x80,0x00,0x24,0x00 },
+ 16, 0x8a80, 0, {0x0b,0x35,0x26,0xc2,0x00,0xb0,0x90,0x20,0xc0,0x88,0x00,0x02,0x4f,0x20,0xb3,0x02 },
+ 16, 0x8a90, 0, {0x60,0xe2,0x1b,0x38,0x02,0x0c,0x00,0x88,0x00,0x60,0xc0,0x0b,0x34,0x82,0x4c,0x02 },
+ 16, 0x8aa0, 0, {0xa1,0x90,0x2c,0x40,0x0b,0x30,0x02,0x30,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8ab0, 0, {0x20,0x01,0x3a,0x08,0x8c,0xa0,0x2d,0x20,0x4b,0x78,0x02,0xda,0x00,0xb2,0x90,0x21 },
+ 16, 0x8ac0, 0, {0x66,0x48,0x79,0x02,0xde,0x40,0xb7,0x91,0xa1,0xe0,0xdb,0xf8,0x02,0x1e,0x40,0x84 },
+ 16, 0x8ad0, 0, {0x90,0x01,0xe0,0x8b,0xf9,0x02,0x5e,0x01,0x97,0x80,0x2d,0x60,0x0a,0x78,0x00,0x48 },
+ 16, 0x8ae0, 0, {0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x80,0x00,0x24,0x04 },
+ 16, 0x8af0, 0, {0x0f,0x32,0x03,0xc4,0xa0,0xf1,0x42,0x30,0xc4,0x2c,0x31,0x02,0x44,0x00,0xf1,0x11 },
+ 16, 0x8b00, 0, {0xa0,0xc0,0x0b,0x30,0x0b,0x0c,0x42,0x83,0x00,0x00,0xc0,0x0f,0x30,0x03,0x4c,0x02 },
+ 16, 0x8b10, 0, {0xe3,0x00,0x3c,0x40,0x0b,0x30,0x01,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8b20, 0, {0xc0,0x1d,0xbc,0x00,0xfc,0xa5,0x33,0xc0,0x0f,0xd0,0x03,0xfc,0x01,0xbf,0x00,0x3f },
+ 16, 0x8b30, 0, {0xc4,0x0e,0x71,0x03,0x74,0x00,0x75,0x10,0x3f,0xc0,0x05,0xf0,0x03,0xdc,0x40,0xff },
+ 16, 0x8b40, 0, {0x04,0x3f,0xc0,0x0f,0xf0,0x43,0xfc,0x00,0x7f,0x00,0x3f,0x40,0x0e,0xf0,0x03,0xd0 },
+ 16, 0x8b50, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x04,0xe8,0x00,0xf2,0x04,0xb3,0x80 },
+ 16, 0x8b60, 0, {0x0f,0xb8,0x0b,0x2c,0x00,0xeb,0x80,0x32,0xc0,0x0c,0x20,0x13,0x2e,0x08,0xcb,0x01 },
+ 16, 0x8b70, 0, {0x32,0xc5,0x0f,0xb1,0x03,0xec,0x48,0xc8,0x10,0x32,0xfa,0x8c,0x38,0x03,0x3c,0x90 },
+ 16, 0x8b80, 0, {0xcb,0x00,0x3e,0x40,0x0f,0xb0,0x13,0xc2,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8b90, 0, {0xc8,0x10,0x98,0x00,0xf6,0x00,0x61,0x81,0x0b,0xf0,0x02,0x1c,0x00,0xd7,0x00,0xb7 },
+ 16, 0x8ba0, 0, {0x80,0x0c,0x70,0x02,0xbc,0x10,0x8f,0x00,0x21,0xc8,0x8b,0x72,0x43,0xfc,0x88,0xdc },
+ 16, 0x8bb0, 0, {0x00,0x37,0xc8,0x0d,0x50,0x02,0x1c,0x22,0x87,0x00,0x2d,0xc0,0x0b,0x70,0x02,0xd3 },
+ 16, 0x8bc0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x9e,0x00,0xb6,0x80,0xa9,0xa0 },
+ 16, 0x8bd0, 0, {0x4b,0x7c,0x02,0x5e,0x30,0xa3,0x88,0x21,0xf0,0x08,0x78,0x02,0x16,0x00,0x85,0x80 },
+ 16, 0x8be0, 0, {0x21,0xe0,0x0b,0x78,0x02,0xde,0x00,0x87,0x80,0xa1,0xe4,0x08,0xd8,0x02,0x4e,0x00 },
+ 16, 0x8bf0, 0, {0x97,0x80,0x2d,0x70,0x0b,0x78,0x02,0xc8,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8c00, 0, {0x48,0x14,0xec,0x00,0xb2,0x00,0x28,0xc0,0x0b,0x10,0x02,0x4e,0x90,0x93,0x02,0x22 },
+ 16, 0x8c10, 0, {0xf0,0x08,0x38,0x42,0x8c,0x42,0x83,0x04,0x22,0xe4,0x4b,0x38,0x02,0x8e,0x40,0x83 },
+ 16, 0x8c20, 0, {0x00,0x20,0xc0,0x09,0x38,0x22,0x4e,0x21,0x93,0x00,0x2e,0xe0,0x0b,0x30,0x02,0xdb },
+ 16, 0x8c30, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x01,0xfa,0x00,0x3b,0x89 },
+ 16, 0x8c40, 0, {0x0f,0xa0,0x02,0x78,0x08,0xae,0x40,0x23,0x80,0x2c,0x6c,0x0b,0x3a,0x00,0x8e,0x8c },
+ 16, 0x8c50, 0, {0xb2,0x00,0x0b,0x80,0x82,0xe0,0x02,0x8e,0x00,0x22,0x80,0x0c,0xe8,0x02,0x7b,0x80 },
+ 16, 0x8c60, 0, {0x9a,0x80,0x3e,0x80,0x0f,0xa0,0x03,0xfa,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8c70, 0, {0x48,0x00,0xe0,0x09,0xec,0x00,0x36,0x21,0x0b,0x80,0x13,0xa1,0x00,0xf8,0x60,0x3e },
+ 16, 0x8c80, 0, {0x00,0x0f,0x81,0x03,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x43,0xe0,0x10,0xf8 },
+ 16, 0x8c90, 0, {0x00,0xbe,0x00,0x0f,0x85,0x0b,0x80,0x00,0xe8,0x10,0x3e,0x00,0x0f,0x80,0x03,0xd2 },
+ 16, 0x8ca0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x02,0xc9,0x02,0x30,0x48 },
+ 16, 0x8cb0, 0, {0x0c,0x99,0x13,0xa4,0x02,0xc9,0x00,0x3e,0x42,0x0c,0x90,0x8f,0x24,0x00,0xf9,0x00 },
+ 16, 0x8cc0, 0, {0x32,0x28,0x0c,0x88,0x03,0xe0,0x00,0xc9,0x00,0xb2,0x40,0x0f,0x90,0x03,0xe7,0x00 },
+ 16, 0x8cd0, 0, {0xc9,0x10,0x3e,0x40,0x0c,0x10,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8ce0, 0, {0x80,0x04,0x64,0x01,0x89,0x80,0xa2,0x48,0x28,0x92,0x42,0xc5,0x00,0x89,0x40,0x2e },
+ 16, 0x8cf0, 0, {0x40,0x2c,0x90,0x06,0x25,0x00,0xb9,0x00,0x22,0x50,0x08,0x98,0x02,0xc4,0x00,0x89 },
+ 16, 0x8d00, 0, {0x01,0x76,0x40,0x4b,0x92,0x02,0xe5,0x02,0x89,0x00,0x2e,0x40,0x0d,0x90,0x03,0x60 },
+ 16, 0x8d10, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x0c,0x85,0x20,0xa2,0x40 },
+ 16, 0x8d20, 0, {0x08,0x90,0x06,0xe5,0x00,0x89,0x40,0x2e,0x40,0x09,0x90,0x42,0xa4,0xa0,0x31,0x00 },
+ 16, 0x8d30, 0, {0x22,0x50,0x18,0x91,0x02,0xe4,0x00,0x81,0x00,0x22,0x40,0x0b,0x90,0x06,0xe4,0x00 },
+ 16, 0x8d40, 0, {0x89,0x00,0x2e,0x40,0x09,0x90,0x02,0x0e,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8d50, 0, {0x00,0x04,0x15,0x00,0x85,0x40,0x20,0x40,0x08,0x14,0x26,0xe4,0x00,0x81,0x00,0x2c },
+ 16, 0x8d60, 0, {0x40,0x18,0x10,0x02,0x84,0x80,0xb1,0x20,0xa0,0x50,0x08,0x14,0x02,0xe5,0x02,0x81 },
+ 16, 0x8d70, 0, {0x40,0x20,0x48,0x0b,0x10,0x06,0xcc,0x00,0x81,0x01,0x2c,0x50,0x09,0x14,0x02,0x4a },
+ 16, 0x8d80, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0x8c,0x00,0x32,0x00 },
+ 16, 0x8d90, 0, {0x0c,0x80,0x23,0xe0,0x00,0xc8,0x00,0x3e,0x14,0x0d,0x80,0x12,0xa1,0x44,0xf8,0x51 },
+ 16, 0x8da0, 0, {0x32,0x00,0x2c,0x80,0x03,0xe0,0x00,0x88,0x04,0x22,0x14,0x0f,0x80,0x07,0xe0,0x00 },
+ 16, 0x8db0, 0, {0xc8,0x00,0x3e,0x00,0x0d,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8dc0, 0, {0x98,0x9d,0xe4,0x00,0xf9,0x00,0x3f,0x50,0x0f,0xd0,0x03,0xdc,0x01,0xbd,0x42,0x3f },
+ 16, 0x8dd0, 0, {0x50,0x4f,0xd4,0x43,0x74,0x41,0xfd,0x10,0x3f,0x10,0x1f,0xc4,0x13,0xf1,0x00,0xfd },
+ 16, 0x8de0, 0, {0x40,0x7e,0x44,0x0f,0xd0,0x43,0xf5,0x01,0xfd,0x00,0x3f,0x40,0x0f,0x94,0x03,0xe6 },
+ 16, 0x8df0, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf4,0x00,0xdf,0x05,0x33,0x61 },
+ 16, 0x8e00, 0, {0x0f,0x50,0x53,0x34,0x10,0xfd,0x04,0x33,0x44,0x4f,0x50,0x03,0x76,0xc1,0xcd,0xe0 },
+ 16, 0x8e10, 0, {0x33,0x60,0x0c,0xce,0x03,0xf6,0xc0,0xe1,0xc0,0xb6,0x64,0x8f,0x50,0x0b,0x36,0x82 },
+ 16, 0x8e20, 0, {0xcd,0x00,0x3e,0x44,0x4c,0x9e,0xc3,0xc6,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8e30, 0, {0x38,0x10,0xea,0x28,0x80,0xa0,0xb2,0x04,0x0b,0x8a,0x83,0x60,0x00,0xfa,0x00,0x36 },
+ 16, 0x8e40, 0, {0x28,0x8b,0x80,0x03,0xe3,0xc8,0xc8,0x84,0x22,0x14,0x08,0x8a,0x02,0xe2,0x80,0xd8 },
+ 16, 0x8e50, 0, {0x82,0x34,0x34,0x1b,0x80,0x03,0x60,0x04,0x88,0x00,0x2e,0x20,0x0a,0x8e,0x42,0xce },
+ 16, 0x8e60, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc4,0x80,0x81,0x08,0x04,0x41 },
+ 16, 0x8e70, 0, {0x0b,0x92,0x02,0x04,0x00,0xb1,0x00,0x2c,0x40,0x0b,0x18,0x02,0x24,0x00,0xb1,0x60 },
+ 16, 0x8e80, 0, {0x26,0x40,0x0a,0x16,0x02,0xc5,0x00,0xa1,0xc0,0x20,0x48,0x0b,0x90,0x02,0x47,0x00 },
+ 16, 0x8e90, 0, {0x91,0x01,0x2c,0x48,0x18,0x12,0x02,0xd2,0x01,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8ea0, 0, {0x18,0x15,0xa4,0x0c,0x8b,0x04,0xa2,0x50,0x0b,0x91,0x02,0x24,0x04,0xa9,0x01,0x2e },
+ 16, 0x8eb0, 0, {0x42,0x0b,0x90,0x02,0xa4,0x00,0xa9,0x00,0x26,0x60,0x0a,0x90,0x02,0xe6,0x00,0x81 },
+ 16, 0x8ec0, 0, {0x00,0x22,0x40,0x8b,0xb0,0x02,0x24,0x08,0x99,0x10,0x2e,0x40,0x1a,0x90,0x02,0xc6 },
+ 16, 0x8ed0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe5,0x00,0xc9,0x00,0x36,0x40 },
+ 16, 0x8ee0, 0, {0x0f,0x10,0x02,0x25,0x00,0xb1,0x00,0x2e,0x60,0x0f,0x10,0x12,0x24,0x02,0xb9,0xa0 },
+ 16, 0x8ef0, 0, {0xa4,0x40,0x2e,0x91,0x03,0xe6,0x00,0xa9,0x00,0x22,0x40,0x0b,0x19,0x80,0x64,0x04 },
+ 16, 0x8f00, 0, {0xd9,0x81,0x2e,0x40,0x4c,0x90,0x03,0xe8,0x14,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8f10, 0, {0x68,0x01,0xa4,0x0a,0xe9,0x00,0xbe,0x48,0x0f,0x98,0x0b,0xe4,0x00,0xf9,0xc4,0x36 },
+ 16, 0x8f20, 0, {0x70,0x1f,0x92,0x03,0xe6,0x90,0xc1,0x90,0x3a,0x40,0x8d,0x88,0x03,0xe4,0x00,0xf9 },
+ 16, 0x8f30, 0, {0x90,0x3e,0x40,0x0b,0x98,0x03,0xe6,0x40,0xe9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xd2 },
+ 16, 0x8f40, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x10,0xa1,0x02,0xd8,0x20,0xb2,0x10 },
+ 16, 0x8f50, 0, {0x0c,0x80,0x83,0x21,0x40,0xc8,0x58,0xb2,0x10,0x4c,0x80,0x0b,0x20,0x00,0xf8,0x42 },
+ 16, 0x8f60, 0, {0x32,0x00,0x0f,0x80,0x03,0xe0,0x02,0xd8,0x00,0x72,0x00,0x1c,0x80,0x00,0x20,0x00 },
+ 16, 0x8f70, 0, {0xf8,0x04,0x3e,0x00,0x0f,0x80,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8f80, 0, {0x28,0x05,0x38,0x04,0xce,0x41,0x23,0x80,0x08,0xe0,0x02,0x39,0x10,0xae,0x40,0x22 },
+ 16, 0x8f90, 0, {0x80,0x08,0xe0,0x02,0x1a,0x00,0xba,0x00,0x2b,0xad,0x03,0x80,0x02,0xe8,0x00,0xca },
+ 16, 0x8fa0, 0, {0x00,0x2a,0x80,0x0a,0xe0,0x02,0x18,0x00,0xba,0x00,0x1a,0x80,0x0b,0xa0,0x03,0x4a },
+ 16, 0x8fb0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x05,0x6c,0x12,0x89,0x00,0xa0,0xe0 },
+ 16, 0x8fc0, 0, {0x08,0x38,0x02,0x0d,0x88,0x83,0x00,0x04,0xe0,0x08,0x38,0x32,0x0e,0x25,0x31,0x01 },
+ 16, 0x8fd0, 0, {0x24,0xe0,0x8b,0x38,0x02,0xe4,0x01,0x83,0x00,0x20,0xc0,0x08,0x30,0x02,0x8c,0x00 },
+ 16, 0x8fe0, 0, {0xb3,0x00,0x2e,0xc0,0x0b,0x30,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x8ff0, 0, {0xa0,0x01,0x14,0x20,0x86,0x20,0x29,0xb0,0x08,0xf0,0x82,0x3e,0x04,0xa7,0x00,0x21 },
+ 16, 0x9000, 0, {0x70,0x88,0x70,0x92,0x1c,0x20,0xbd,0x00,0x69,0xc0,0x0b,0x76,0x02,0xd4,0x80,0x8f },
+ 16, 0x9010, 0, {0x21,0x29,0xe0,0x0a,0x60,0x86,0x98,0x01,0xb7,0x00,0x2d,0xc8,0x0b,0x3b,0x02,0x60 },
+ 16, 0x9020, 0, {0x04,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3e,0x00,0xc7,0xa0,0xb0,0xe0 },
+ 16, 0x9030, 0, {0x2c,0x78,0x0b,0x1a,0x00,0xc3,0x80,0x37,0xe0,0x28,0x78,0x03,0x1a,0x08,0xf5,0x90 },
+ 16, 0x9040, 0, {0x35,0xe0,0x0f,0x7c,0x12,0xd6,0x82,0xc7,0x90,0x21,0xe4,0x08,0x78,0x03,0x9e,0x00 },
+ 16, 0x9050, 0, {0xf5,0x80,0x3d,0xf1,0x0f,0x78,0x03,0x22,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9060, 0, {0x08,0x19,0xa4,0x00,0xee,0x80,0x36,0xc1,0x4f,0xd0,0x03,0xc8,0x00,0xfb,0x00,0x3e },
+ 16, 0x9070, 0, {0x51,0x0f,0xb0,0x03,0xe4,0x08,0xf1,0x60,0x3e,0xc0,0x0f,0xb0,0x03,0xc5,0x00,0xeb },
+ 16, 0x9080, 0, {0x10,0x3e,0xc0,0x0f,0xb0,0x09,0x6c,0x00,0xfb,0x00,0x3a,0xc0,0x0f,0xb0,0x03,0xc2 },
+ 16, 0x9090, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xfe,0x00,0xfd,0x88,0x33,0x60 },
+ 16, 0x90a0, 0, {0x0f,0xf9,0x03,0xce,0x40,0xd7,0x84,0x37,0x70,0x0c,0xd8,0x23,0x36,0x00,0xc5,0x88 },
+ 16, 0x90b0, 0, {0x33,0xe0,0x4f,0xf8,0x13,0xf7,0x28,0xdf,0x80,0x37,0xe2,0x0c,0x58,0x03,0x3e,0x00 },
+ 16, 0x90c0, 0, {0xff,0x90,0x3f,0xe0,0x0c,0xf8,0x03,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x90d0, 0, {0xa9,0x11,0x9c,0x08,0xf6,0x00,0xa1,0x00,0x0b,0x63,0x02,0xd6,0x30,0x85,0x41,0x31 },
+ 16, 0x90e0, 0, {0xc8,0x08,0x50,0x23,0x1c,0x00,0xd5,0x20,0xb1,0x80,0x0f,0x70,0x03,0xb4,0x00,0xc7 },
+ 16, 0x90f0, 0, {0x00,0x21,0xc0,0x0f,0x40,0xa3,0x58,0x40,0xb7,0x00,0x3f,0xc4,0x0a,0xf0,0x02,0x2a },
+ 16, 0x9100, 0, {0x06,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x40,0xb7,0x10,0x21,0xd2 },
+ 16, 0x9110, 0, {0x0b,0x70,0x02,0xdc,0x42,0x86,0x00,0x25,0x61,0x08,0x51,0x02,0x50,0x00,0x95,0x00 },
+ 16, 0x9120, 0, {0x25,0xc0,0x09,0x70,0x82,0xd4,0x00,0x87,0x00,0x24,0xc0,0x08,0x50,0x02,0x5c,0x00 },
+ 16, 0x9130, 0, {0x95,0x04,0x2d,0xc0,0x08,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9140, 0, {0x20,0x14,0xcc,0x08,0xb2,0xd0,0x20,0xe0,0x4b,0x08,0x02,0xc4,0x00,0x80,0x80,0x20 },
+ 16, 0x9150, 0, {0xf0,0x08,0x1a,0x02,0x85,0x48,0x81,0x10,0x20,0x40,0x0a,0x30,0x02,0xc6,0x10,0x93 },
+ 16, 0x9160, 0, {0x00,0x20,0xc0,0x0a,0x1c,0x02,0x0d,0x40,0xb3,0x00,0x68,0xc4,0x0a,0xb0,0x02,0x09 },
+ 16, 0x9170, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x01,0xfe,0x00,0x32,0xf0 },
+ 16, 0x9180, 0, {0x0f,0x88,0x03,0xe6,0x00,0xc8,0xc8,0x36,0xf6,0x28,0xa6,0x0a,0x6d,0x00,0x9d,0x00 },
+ 16, 0x9190, 0, {0x32,0x00,0x0b,0xb0,0x03,0xf6,0x03,0xc7,0x00,0x37,0xc0,0x08,0x9c,0x0a,0x6e,0x00 },
+ 16, 0x91a0, 0, {0xbb,0x00,0x2f,0xc0,0x0c,0xf0,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x91b0, 0, {0x80,0x00,0xe4,0x01,0xeb,0x40,0x3e,0x80,0x4f,0xc1,0x03,0xe4,0x00,0xb8,0x08,0x3a },
+ 16, 0x91c0, 0, {0x40,0x8f,0xa4,0x13,0x6c,0x20,0xf9,0x00,0x3e,0x70,0x0f,0xb0,0x03,0xa4,0x40,0xeb },
+ 16, 0x91d0, 0, {0x00,0x3e,0xc0,0x0f,0x92,0x23,0xe8,0x00,0xf9,0x80,0x3e,0xc0,0x0f,0xb0,0x63,0xe0 },
+ 16, 0x91e0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x08,0xce,0x08,0x33,0xc0 },
+ 16, 0x91f0, 0, {0x0f,0xda,0x03,0x30,0x00,0xe4,0x04,0x35,0xc0,0x0d,0xa0,0x03,0x28,0x00,0xc5,0x00 },
+ 16, 0x9200, 0, {0x33,0x00,0x0b,0xfa,0x03,0xf4,0x03,0xcb,0x00,0x31,0xc0,0x0c,0xd4,0x03,0x14,0x20 },
+ 16, 0x9210, 0, {0xcd,0x80,0x23,0xc1,0x0c,0xf0,0x02,0x08,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9220, 0, {0x81,0x04,0x44,0x10,0xcb,0xd0,0x22,0xc0,0x0b,0x94,0x02,0x22,0x84,0xb8,0xc6,0x02 },
+ 16, 0x9230, 0, {0x40,0x08,0x28,0x02,0xa5,0x80,0x89,0x00,0x22,0x60,0x0b,0xb8,0x02,0x64,0x00,0x8b },
+ 16, 0x9240, 0, {0x00,0x2a,0xc0,0xc8,0x00,0x03,0x66,0x00,0x81,0x00,0x00,0xc0,0x0d,0xb0,0x0a,0xa8 },
+ 16, 0x9250, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x13,0x00,0x22,0x40 },
+ 16, 0x9260, 0, {0x8b,0x24,0x02,0x2a,0x00,0xbb,0x82,0x22,0x40,0x00,0xac,0x02,0x84,0x00,0x89,0x00 },
+ 16, 0x9270, 0, {0x22,0x22,0x0b,0xb0,0x02,0xc4,0x00,0x9b,0x00,0x2a,0xc0,0x08,0xb0,0x02,0x2e,0x00 },
+ 16, 0x9280, 0, {0x8b,0x10,0x2a,0xc0,0x08,0xb0,0x02,0xa0,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9290, 0, {0x08,0x04,0x0c,0x10,0x83,0x00,0x20,0x01,0x0b,0x20,0x02,0x00,0x80,0xb1,0x00,0x20 },
+ 16, 0x92a0, 0, {0xc1,0x08,0x20,0x02,0x88,0x01,0x81,0x00,0xa0,0x00,0x0b,0x30,0x02,0x44,0x01,0x9b },
+ 16, 0x92b0, 0, {0x00,0x28,0xc0,0x08,0xb0,0x02,0x48,0x06,0x89,0x00,0x2a,0xc0,0x09,0x30,0x02,0x82 },
+ 16, 0x92c0, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8d,0x6c,0x00,0xc3,0x00,0xb2,0xc0 },
+ 16, 0x92d0, 0, {0x0f,0xb0,0x03,0x28,0x20,0xfa,0x00,0xb1,0x40,0x0d,0xa0,0x07,0xa0,0x00,0xcd,0x00 },
+ 16, 0x92e0, 0, {0x22,0x00,0x0f,0xb0,0x03,0xf4,0x00,0x9f,0x00,0x3b,0xc0,0x2c,0xb0,0x0b,0x24,0x00 },
+ 16, 0x92f0, 0, {0xc9,0x00,0xba,0xc0,0x0c,0xb0,0x03,0x80,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9300, 0, {0xa0,0x1d,0xfc,0x06,0xff,0x02,0xaf,0xc0,0x0f,0xc0,0x03,0xf0,0x10,0xfc,0x00,0x3f },
+ 16, 0x9310, 0, {0xc0,0x9f,0xe0,0x13,0xf0,0x00,0xfd,0x04,0x3f,0x40,0x4f,0xf0,0x03,0x74,0x00,0xef },
+ 16, 0x9320, 0, {0x00,0x3f,0xc0,0x8f,0xe0,0x02,0xb4,0x01,0xfd,0x04,0x37,0xc0,0x0f,0xf0,0x43,0x68 },
+ 16, 0x9330, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xc7,0x20,0xb3,0xc8 },
+ 16, 0x9340, 0, {0x1c,0xf1,0x03,0x7c,0x20,0xcf,0x0a,0x3f,0xd0,0x0d,0xf0,0x03,0x7c,0x80,0x8f,0x32 },
+ 16, 0x9350, 0, {0x33,0xc4,0x0f,0xf1,0x83,0x3c,0xe0,0xcf,0x10,0x33,0xc4,0x0d,0xf2,0x83,0x3c,0xe2 },
+ 16, 0x9360, 0, {0xc7,0x80,0x17,0xcc,0x4c,0xf3,0x83,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9370, 0, {0x80,0x10,0xe3,0x40,0x88,0x68,0x22,0x30,0x08,0x06,0x02,0x01,0xa1,0x88,0xc4,0x0e },
+ 16, 0x9380, 0, {0x14,0x08,0x87,0x80,0x01,0xc0,0x28,0x50,0x02,0x04,0x8b,0x86,0x02,0xa1,0x98,0x88 },
+ 16, 0x9390, 0, {0x41,0x2a,0x04,0x0a,0x84,0x82,0xbd,0x80,0x8b,0x08,0x2b,0xc4,0x88,0xf4,0x03,0x60 },
+ 16, 0x93a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x08,0x82,0x40,0x20,0x10 },
+ 16, 0x93b0, 0, {0x08,0x21,0x12,0x44,0x04,0x82,0x04,0x2c,0x08,0x89,0x90,0x02,0x44,0x21,0x8b,0x00 },
+ 16, 0x93c0, 0, {0x24,0x88,0x8b,0xa0,0x00,0x40,0x84,0x89,0x30,0x22,0x48,0x88,0xb0,0x02,0xcc,0x08 },
+ 16, 0x93d0, 0, {0x88,0x20,0xa4,0xc8,0x00,0x32,0x0a,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x93e0, 0, {0xc0,0x15,0xa0,0x00,0x89,0x00,0x22,0xc1,0x88,0x90,0x62,0x28,0x08,0x89,0x08,0x2e },
+ 16, 0x93f0, 0, {0xc0,0x08,0xa0,0x02,0x28,0x08,0xa8,0x00,0x26,0x42,0x0b,0x90,0x02,0xcc,0x50,0x8a },
+ 16, 0x9400, 0, {0x22,0x2a,0x86,0x0a,0x80,0x02,0xec,0x00,0x88,0x84,0x2a,0xc1,0x08,0xb0,0x26,0x30 },
+ 16, 0x9410, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xf0,0x02,0xcf,0x00,0x33,0xc0 },
+ 16, 0x9420, 0, {0x48,0xf8,0x43,0x79,0x00,0x8d,0xc0,0x3f,0x30,0x8d,0x60,0x83,0x78,0x60,0xc4,0x58 },
+ 16, 0x9430, 0, {0x37,0x20,0x0f,0x58,0x13,0x7b,0x02,0xcc,0xc4,0x31,0x20,0x0c,0x44,0x03,0xec,0x02 },
+ 16, 0x9440, 0, {0x8b,0x80,0x36,0xc0,0x24,0xb0,0x12,0x10,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9450, 0, {0xe0,0x01,0x9c,0x00,0xf4,0x10,0x3d,0x00,0x6f,0xc9,0x13,0xd4,0x12,0xfe,0x90,0x3f },
+ 16, 0x9460, 0, {0xf0,0x0f,0xda,0x23,0xf4,0x14,0xff,0x02,0x3b,0xf0,0x0f,0xea,0x23,0xb6,0x00,0xff },
+ 16, 0x9470, 0, {0x82,0x3f,0xe1,0x8f,0xf4,0x03,0xbc,0x00,0xff,0x00,0x3f,0xc0,0xaf,0x70,0x03,0xf8 },
+ 16, 0x9480, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa0,0x00,0xca,0x00,0x32,0x08 },
+ 16, 0x9490, 0, {0x1c,0xa0,0x03,0xa5,0x20,0xcb,0x40,0xba,0x10,0x1f,0xb0,0x03,0xac,0x00,0xeb,0x00 },
+ 16, 0x94a0, 0, {0x72,0x90,0x0c,0xb4,0x03,0x29,0x04,0xc9,0x52,0x32,0x50,0x0c,0xb4,0x03,0x0c,0x00 },
+ 16, 0x94b0, 0, {0xf8,0x40,0x32,0xc1,0x0e,0xb0,0x0b,0x50,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x94c0, 0, {0xc8,0x05,0x2d,0x80,0x89,0x80,0x22,0xd9,0x08,0x90,0x22,0x2a,0x00,0x88,0x54,0x22 },
+ 16, 0x94d0, 0, {0xc0,0x8b,0x80,0x22,0x20,0x19,0xc8,0x00,0x22,0x40,0x8d,0x80,0x1a,0x24,0x10,0xd2 },
+ 16, 0x94e0, 0, {0x44,0x22,0x81,0x0d,0x80,0x03,0x7c,0x00,0xb0,0x00,0x37,0xc0,0x88,0xf0,0x02,0x32 },
+ 16, 0x94f0, 0, {0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4e,0x00,0x81,0x00,0xa0,0xf0 },
+ 16, 0x9500, 0, {0x08,0x90,0x02,0x89,0x02,0x80,0x00,0x22,0xc0,0x0b,0x00,0x22,0xa0,0x00,0xb0,0x00 },
+ 16, 0x9510, 0, {0x20,0x40,0x08,0x00,0x02,0x04,0x00,0x82,0x60,0x20,0x80,0x08,0x00,0x02,0x0c,0x08 },
+ 16, 0x9520, 0, {0xb2,0x00,0x22,0xc0,0x08,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9530, 0, {0x20,0x01,0x03,0x10,0x8e,0x90,0x23,0x24,0x08,0x6b,0x02,0x16,0x60,0x8f,0x80,0x21 },
+ 16, 0x9540, 0, {0x28,0x0b,0xf9,0x06,0x1e,0x40,0x8f,0x80,0x23,0xa4,0x49,0x79,0x02,0x3a,0x40,0x9d },
+ 16, 0x9550, 0, {0x90,0x23,0x64,0x09,0xf8,0x02,0x5e,0x40,0xbe,0x90,0x24,0xe4,0x28,0x79,0x02,0x08 },
+ 16, 0x9560, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x42,0xc0,0x09,0x30,0x00 },
+ 16, 0x9570, 0, {0x28,0x02,0x03,0x84,0x00,0x8a,0x20,0x30,0xc4,0x8b,0x11,0x03,0x84,0x50,0xb3,0x00 },
+ 16, 0x9580, 0, {0x20,0xc0,0x0c,0xa4,0x22,0x04,0x00,0xcb,0x40,0x30,0xc5,0x0c,0x30,0x03,0x0e,0x40 },
+ 16, 0x9590, 0, {0xf3,0x10,0x30,0xc4,0x0c,0xb0,0x03,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x95a0, 0, {0x40,0x1d,0xb0,0x04,0xfb,0x04,0x3d,0xc0,0x0f,0xf2,0x43,0xf8,0x04,0xfd,0x01,0x3f },
+ 16, 0x95b0, 0, {0x0c,0x0f,0x61,0x03,0xf8,0x48,0xf4,0x00,0x3d,0x01,0x0f,0xd0,0x03,0xc8,0x00,0xfc },
+ 16, 0x95c0, 0, {0x04,0xbd,0x04,0x0b,0x48,0x03,0xfc,0x18,0xff,0x14,0x3f,0xd5,0x0d,0xf0,0x03,0x90 },
+ 16, 0x95d0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe0,0x00,0xf9,0x01,0x32,0xc0 },
+ 16, 0x95e0, 0, {0x8e,0x90,0x03,0x28,0x02,0xd1,0x00,0x32,0xc0,0x0d,0xa8,0x0b,0x08,0x00,0xe8,0x00 },
+ 16, 0x95f0, 0, {0x2e,0x40,0x0c,0x98,0x0b,0x2e,0x02,0xca,0x00,0xb2,0xa0,0x6c,0x80,0x23,0x2d,0x80 },
+ 16, 0x9600, 0, {0xca,0x80,0x32,0xd0,0x0c,0xba,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9610, 0, {0x48,0x11,0x9c,0x00,0xb6,0x00,0xa3,0x00,0x08,0x60,0x02,0x04,0x00,0x86,0x04,0x29 },
+ 16, 0x9620, 0, {0x00,0x08,0x50,0x42,0x14,0x04,0xa7,0x00,0x0d,0x80,0x4a,0x60,0x02,0x00,0x00,0x81 },
+ 16, 0x9630, 0, {0x00,0x21,0x40,0x08,0x70,0x02,0x9d,0x42,0x86,0x01,0x20,0xc0,0x08,0x32,0x82,0x12 },
+ 16, 0x9640, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x92,0x00,0xbc,0x80,0x63,0x20 },
+ 16, 0x9650, 0, {0x82,0x08,0x02,0x52,0x00,0x84,0xc2,0x23,0x20,0x88,0x0c,0x02,0x33,0x00,0x84,0x80 },
+ 16, 0x9660, 0, {0x2f,0x21,0x89,0x4c,0x02,0x12,0x14,0x94,0xc5,0x64,0x21,0x08,0x4c,0x02,0x0e,0x80 },
+ 16, 0x9670, 0, {0x97,0x82,0xa1,0xec,0x08,0x79,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9680, 0, {0x48,0x14,0xcd,0x44,0xb3,0x00,0x20,0xc0,0x08,0x30,0x02,0x4d,0x80,0x03,0x88,0x28 },
+ 16, 0x9690, 0, {0xc0,0x08,0x3c,0x06,0x0f,0x00,0xa3,0x43,0x2c,0xc2,0x1b,0x38,0x02,0x0f,0x00,0x9b },
+ 16, 0x96a0, 0, {0x88,0x64,0xd0,0x08,0xb8,0x02,0x8c,0x10,0x93,0x00,0x20,0xc0,0x08,0x30,0x0a,0x12 },
+ 16, 0x96b0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xaa,0x00,0xfa,0x05,0x32,0x80 },
+ 16, 0x96c0, 0, {0x8e,0xa0,0x0b,0x69,0x00,0xca,0x40,0x32,0xa0,0x3c,0xa8,0x03,0x2a,0x00,0xea,0x26 },
+ 16, 0x96d0, 0, {0x3e,0xb0,0x0d,0xa1,0x63,0x28,0x20,0xca,0x40,0x36,0xa0,0x0c,0xe0,0x13,0x28,0x09 },
+ 16, 0x96e0, 0, {0xde,0x00,0x32,0x80,0x2c,0xa0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x96f0, 0, {0x48,0x00,0xf0,0x20,0xf4,0x00,0x3f,0x00,0x0f,0x40,0x23,0xb0,0x00,0xec,0x00,0x3f },
+ 16, 0x9700, 0, {0x06,0x1e,0xc2,0x13,0xf0,0x88,0xfc,0x20,0x3f,0x04,0x8e,0xc0,0x03,0xf0,0x80,0xec },
+ 16, 0x9710, 0, {0x40,0x3b,0x0c,0x0f,0xc0,0xa3,0xe0,0x00,0xe8,0x00,0x3e,0x00,0x4f,0x80,0x03,0xd2 },
+ 16, 0x9720, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x00,0x32,0x40 },
+ 16, 0x9730, 0, {0x0c,0x90,0x03,0x24,0x00,0xc9,0x80,0x32,0x40,0x0f,0x90,0x53,0xe4,0x10,0xc9,0x00 },
+ 16, 0x9740, 0, {0x32,0x40,0x0d,0x90,0x03,0xe4,0x00,0xf9,0x00,0x36,0x40,0x8f,0x90,0x03,0x24,0x10 },
+ 16, 0x9750, 0, {0xc9,0x01,0x3c,0x40,0x0c,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9760, 0, {0x80,0x04,0x47,0x44,0x89,0x00,0x20,0x40,0x08,0x90,0x02,0x25,0x0a,0x81,0x10,0x22 },
+ 16, 0x9770, 0, {0x40,0x48,0x90,0x03,0xc4,0x00,0x89,0x00,0x76,0x40,0x28,0x90,0x02,0xe4,0x10,0xb9 },
+ 16, 0x9780, 0, {0x40,0xb2,0x40,0x0b,0x90,0x03,0x64,0x00,0x89,0x00,0x2e,0x41,0x08,0x90,0x42,0xe0 },
+ 16, 0x9790, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x02,0xbd,0x00,0x23,0x48 },
+ 16, 0x97a0, 0, {0x08,0xd0,0x06,0x1d,0x04,0x8d,0x00,0x29,0xc0,0x4a,0xd0,0x22,0xf4,0x00,0x85,0x00 },
+ 16, 0x97b0, 0, {0x61,0x40,0x18,0xd0,0x12,0xfc,0x00,0xbd,0x40,0xa3,0x40,0x4b,0xf0,0x02,0x04,0x01 },
+ 16, 0x97c0, 0, {0x8b,0x00,0x2e,0x40,0x08,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x97d0, 0, {0x08,0x04,0x36,0x80,0x85,0x20,0xa3,0x48,0x08,0x52,0x0a,0x14,0x81,0x85,0x20,0x29 },
+ 16, 0x97e0, 0, {0x48,0x08,0x52,0x02,0xb4,0x80,0x85,0x20,0x25,0x48,0x88,0x52,0x02,0xd4,0x80,0xb5 },
+ 16, 0x97f0, 0, {0x20,0x21,0x48,0x0b,0x52,0x02,0x44,0xa2,0x81,0x00,0x2c,0x4a,0x08,0x12,0x82,0xc2 },
+ 16, 0x9800, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xf8,0x51,0x22,0x00 },
+ 16, 0x9810, 0, {0x2c,0x85,0x02,0x21,0x48,0xc8,0x00,0xba,0x14,0x0f,0x85,0x12,0xe1,0x42,0xc8,0x50 },
+ 16, 0x9820, 0, {0x22,0x00,0x0c,0x00,0x03,0xe0,0x00,0xf8,0x50,0x32,0x00,0x07,0x45,0x03,0x20,0x80 },
+ 16, 0x9830, 0, {0xc0,0x01,0x3e,0x08,0x2c,0x82,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9840, 0, {0x98,0x0d,0xe4,0x40,0xf1,0x10,0x3e,0x44,0x07,0x91,0x43,0xe4,0x58,0xf9,0x11,0x34 },
+ 16, 0x9850, 0, {0x44,0x4f,0x91,0x02,0xe4,0x50,0xf9,0x10,0x3c,0x4f,0x0f,0x93,0x83,0xe4,0xf0,0xf9 },
+ 16, 0x9860, 0, {0x11,0x3a,0x4f,0x0f,0x91,0x03,0xe4,0xa0,0xfd,0x28,0x3e,0x4a,0x0f,0x92,0x83,0xe6 },
+ 16, 0x9870, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0xa0,0xcd,0xa0,0xb3,0x68 },
+ 16, 0x9880, 0, {0x8c,0x9a,0x03,0x36,0x80,0xc5,0xa0,0x22,0x60,0x0c,0x9a,0x23,0x26,0x04,0xf9,0xa0 },
+ 16, 0x9890, 0, {0x32,0x66,0x0c,0x9a,0x83,0x06,0x20,0xc5,0xa0,0x22,0x60,0x0c,0x9b,0x03,0x26,0x48 },
+ 16, 0x98a0, 0, {0xc9,0x00,0x3e,0x78,0x0c,0x9a,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x98b0, 0, {0x38,0x00,0xe1,0x00,0x88,0x44,0x22,0x95,0x08,0x85,0x12,0xa1,0x42,0x88,0x40,0x02 },
+ 16, 0x98c0, 0, {0x90,0x08,0x84,0x02,0x23,0xa0,0xba,0x40,0x22,0xa0,0x08,0x8e,0x92,0xa3,0xa0,0xa8 },
+ 16, 0x98d0, 0, {0x40,0x2a,0x10,0x08,0xae,0x02,0x23,0x40,0x88,0x00,0x2e,0x38,0x08,0x84,0x12,0x0e },
+ 16, 0x98e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x15,0xc4,0x00,0x8b,0x12,0x22,0x40 },
+ 16, 0x98f0, 0, {0x08,0x90,0x02,0x44,0x00,0x81,0x40,0xa0,0x50,0x08,0x11,0x0a,0x05,0x00,0xb1,0x10 },
+ 16, 0x9900, 0, {0xa0,0x48,0x08,0x90,0x02,0x04,0x00,0x81,0x40,0x20,0x50,0x28,0x11,0x02,0x44,0x82 },
+ 16, 0x9910, 0, {0x81,0x00,0x2c,0x50,0x08,0x11,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9920, 0, {0x18,0x15,0xa4,0x02,0x89,0x40,0x22,0x40,0x08,0x94,0x12,0xa5,0x00,0x89,0x28,0x22 },
+ 16, 0x9930, 0, {0x49,0x08,0x94,0x02,0x24,0x48,0xb9,0x14,0x22,0x40,0x08,0x94,0x02,0xa4,0x40,0xa1 },
+ 16, 0x9940, 0, {0x50,0x2a,0x50,0x08,0x91,0x42,0x64,0x00,0x89,0x40,0x2e,0x40,0x08,0x10,0x02,0x06 },
+ 16, 0x9950, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xc9,0x00,0x30,0x70 },
+ 16, 0x9960, 0, {0x2c,0x10,0x0b,0x66,0x00,0xc9,0x40,0x32,0x50,0x0c,0x90,0x03,0x26,0x20,0xf9,0xc0 },
+ 16, 0x9970, 0, {0x32,0x70,0x0c,0x90,0x03,0x26,0x20,0xc9,0x00,0x32,0x40,0x0c,0x9c,0x03,0x64,0x00 },
+ 16, 0x9980, 0, {0xc9,0x41,0x3e,0x40,0x2c,0x90,0x0b,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9990, 0, {0x28,0x01,0xa4,0x00,0xf9,0x04,0x3e,0x48,0x0f,0x90,0x03,0xe4,0x88,0xf9,0x00,0x34 },
+ 16, 0x99a0, 0, {0x41,0x2f,0x9c,0x03,0xe4,0x10,0xf9,0x00,0x3e,0x44,0x2f,0x99,0x03,0xe4,0x10,0xf9 },
+ 16, 0x99b0, 0, {0x00,0x3e,0x50,0x0f,0x10,0x4b,0xa4,0x10,0xf9,0x20,0x3c,0x40,0x0f,0x90,0x03,0x4a },
+ 16, 0x99c0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xc8,0x00,0x3e,0x10 },
+ 16, 0x99d0, 0, {0x2c,0x80,0x03,0x20,0x02,0xc0,0x40,0x32,0x00,0x1c,0x04,0x0f,0x21,0x00,0xc0,0x04 },
+ 16, 0x99e0, 0, {0x38,0x00,0x0f,0x80,0x03,0x21,0x08,0xc8,0x60,0x30,0x10,0x0f,0x80,0x02,0x20,0x00 },
+ 16, 0x99f0, 0, {0xf8,0x00,0x32,0x00,0x0c,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9a00, 0, {0x28,0x05,0x1a,0x20,0x82,0x04,0x2f,0x80,0x08,0xa0,0x02,0x38,0x00,0x8e,0x80,0x22 },
+ 16, 0x9a10, 0, {0x80,0x08,0xe0,0x02,0x28,0x00,0x8a,0x00,0x22,0x81,0x0b,0x20,0x02,0x28,0x00,0xde },
+ 16, 0x9a20, 0, {0xe4,0x36,0x80,0x0b,0xa0,0x42,0x28,0x00,0xba,0x04,0x22,0x80,0x08,0xa0,0x02,0xca },
+ 16, 0x9a30, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x83,0x01,0x2c,0x80 },
+ 16, 0x9a40, 0, {0x08,0x30,0x02,0x2e,0x60,0x82,0x90,0xa0,0xc0,0x48,0x30,0x02,0x0c,0x02,0x83,0x00 },
+ 16, 0x9a50, 0, {0x28,0xc0,0x0b,0x30,0x0a,0x2c,0x00,0x83,0xc2,0x20,0xc0,0x0b,0x30,0x2a,0x2c,0x00 },
+ 16, 0x9a60, 0, {0xb3,0x00,0xa0,0xc0,0x08,0x30,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9a70, 0, {0xa0,0x01,0x3c,0x00,0x87,0x01,0x2d,0xc2,0x08,0xf3,0x12,0x3c,0x00,0x8f,0x01,0x21 },
+ 16, 0x9a80, 0, {0xc8,0x68,0x72,0x22,0x1e,0x04,0x87,0x20,0x21,0xc4,0x0b,0x70,0x02,0x3c,0x84,0x9f },
+ 16, 0x9a90, 0, {0x00,0x25,0xc4,0x4b,0x70,0x02,0x1c,0x04,0xb7,0x81,0x21,0xc8,0x08,0x72,0x02,0xe8 },
+ 16, 0x9aa0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x00,0x1e,0x00,0xc7,0x81,0x3c,0xa0 },
+ 16, 0x9ab0, 0, {0x4c,0x7a,0x0b,0x1a,0x00,0xc6,0x80,0x30,0xe0,0x08,0xf8,0x82,0x0e,0x40,0xcf,0xf0 },
+ 16, 0x9ac0, 0, {0x39,0xe8,0x0f,0x3a,0x03,0x1e,0x20,0xc7,0x80,0x31,0xe3,0x0f,0x38,0x23,0x1f,0x08 },
+ 16, 0x9ad0, 0, {0xff,0xc0,0x33,0xf2,0x0c,0x7e,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9ae0, 0, {0x08,0x15,0x88,0x0a,0x7b,0x00,0x3e,0xc1,0x0b,0x34,0x23,0xc8,0x10,0xfb,0x02,0x3e },
+ 16, 0x9af0, 0, {0xca,0x0f,0xb7,0x43,0xec,0x80,0xfb,0x00,0x2e,0xc2,0x0b,0xb4,0x83,0xed,0xd0,0xfa },
+ 16, 0x9b00, 0, {0x00,0x3e,0xd9,0x0f,0xb3,0x83,0xec,0x80,0xbb,0x20,0x3e,0xd8,0x2f,0xb4,0x03,0xc2 },
+ 16, 0x9b10, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xf5,0x91,0x31,0xa0 },
+ 16, 0x9b20, 0, {0x0c,0xfc,0x03,0xfe,0x00,0xc4,0x81,0x31,0xee,0x8d,0xf8,0x0a,0x3e,0x30,0xcf,0x84 },
+ 16, 0x9b30, 0, {0x33,0xe0,0x2c,0xf8,0x83,0xfe,0x10,0xfe,0x80,0x33,0xe0,0x0c,0xf9,0x19,0x3f,0x48 },
+ 16, 0x9b40, 0, {0xcf,0xc0,0x33,0xe0,0x04,0xfc,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9b50, 0, {0xa8,0x11,0x9c,0x08,0xb7,0xa1,0x21,0xc8,0x08,0x71,0x02,0xf0,0xa0,0x85,0x20,0x21 },
+ 16, 0x9b60, 0, {0xce,0x08,0x70,0x02,0x3c,0x80,0x8f,0x00,0x2b,0xc5,0x08,0x71,0x02,0xdc,0x10,0xb4 },
+ 16, 0x9b70, 0, {0x00,0x21,0xc1,0x0a,0xf3,0x82,0x0c,0x00,0x87,0x01,0x29,0xc0,0x08,0x71,0x02,0x6a },
+ 16, 0x9b80, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9d,0x00,0xbd,0x21,0x27,0x82 },
+ 16, 0x9b90, 0, {0x00,0x70,0x02,0xfc,0x04,0x8c,0x00,0xa7,0xcc,0xa8,0x70,0x02,0x3c,0x08,0xaf,0x00 },
+ 16, 0x9ba0, 0, {0x21,0xc0,0x08,0x70,0x02,0xdc,0x00,0xb7,0x00,0x21,0xc4,0x08,0x70,0x16,0x1c,0x0a },
+ 16, 0x9bb0, 0, {0x8f,0x00,0x21,0xc0,0x08,0x70,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9bc0, 0, {0x20,0x10,0xc8,0x00,0xbb,0x44,0x24,0xe2,0x08,0xb1,0x02,0xc2,0x80,0x01,0x80,0x24 },
+ 16, 0x9bd0, 0, {0xd0,0x88,0x30,0x02,0x0f,0x52,0x83,0x91,0x28,0xe4,0x88,0x3d,0x02,0xce,0xd0,0xb0 },
+ 16, 0x9be0, 0, {0xb2,0xa2,0xc0,0x0a,0x34,0x12,0x0c,0x02,0x83,0x00,0x28,0xc0,0x08,0x30,0x02,0x48 },
+ 16, 0x9bf0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x00,0xfb,0x01,0xe4,0x40 },
+ 16, 0x9c00, 0, {0x2c,0xf0,0x43,0xe5,0x00,0x8a,0x88,0x37,0xe0,0x00,0xfa,0x02,0x3d,0x00,0xef,0x00 },
+ 16, 0x9c10, 0, {0x33,0xd1,0x0c,0xf4,0x03,0xfd,0x00,0xf9,0x40,0x33,0xe8,0x0c,0xfc,0x01,0x3c,0x04 },
+ 16, 0x9c20, 0, {0xcf,0x02,0x33,0xc0,0x2c,0xf0,0x03,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9c30, 0, {0x80,0x00,0xee,0x08,0xf9,0x10,0x3a,0xd0,0x0f,0xb0,0x93,0xec,0x00,0xfb,0x0b,0x3a },
+ 16, 0x9c40, 0, {0xc0,0x8e,0xb0,0x83,0xec,0x80,0xfb,0x09,0x7e,0xc8,0x0f,0xb2,0x13,0xec,0x00,0xf9 },
+ 16, 0x9c50, 0, {0x00,0x3e,0xc2,0x8f,0xb2,0x4b,0xcc,0x04,0xfb,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0x60 },
+ 16, 0x9c60, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xff,0x08,0x33,0xc0 },
+ 16, 0x9c70, 0, {0x1c,0xf0,0x03,0x70,0x40,0xc4,0xc0,0x33,0xc2,0x0f,0xf0,0x03,0x1c,0x10,0xc7,0x00 },
+ 16, 0x9c80, 0, {0x31,0xc0,0x0c,0x70,0x03,0x1c,0x00,0xc5,0x41,0x33,0xc0,0x0c,0xf0,0x23,0x2c,0x00 },
+ 16, 0x9c90, 0, {0xcf,0x00,0xb3,0xc0,0x6c,0xf0,0x03,0x80,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9ca0, 0, {0x81,0x04,0x6a,0x00,0xb9,0x90,0x32,0xf1,0x08,0xb0,0x02,0x0a,0x10,0xd9,0x00,0x22 },
+ 16, 0x9cb0, 0, {0xc1,0x0b,0xb0,0x02,0x2c,0x00,0xcb,0x06,0x22,0xc0,0x88,0xb0,0x12,0x2c,0x00,0x88 },
+ 16, 0x9cc0, 0, {0x80,0x22,0xc1,0x0d,0xb0,0x02,0x2c,0x00,0x83,0x00,0x22,0xc1,0x08,0xb0,0x46,0xe0 },
+ 16, 0x9cd0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x2e,0x00,0xb9,0x00,0x22,0xf0 },
+ 16, 0x9ce0, 0, {0x08,0xb0,0x12,0x64,0x00,0x8a,0x00,0x22,0xc0,0x0b,0x30,0x42,0x2c,0x00,0x8b,0x00 },
+ 16, 0x9cf0, 0, {0x22,0xc0,0x08,0xb0,0x02,0x2c,0x00,0x8a,0x00,0x22,0xc0,0x88,0x30,0x0a,0x2c,0x00 },
+ 16, 0x9d00, 0, {0x8b,0x00,0x20,0xc0,0x08,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9d10, 0, {0x08,0x04,0x0c,0x04,0xb1,0x02,0xe4,0xc1,0x08,0xb0,0x22,0x20,0x02,0x93,0x00,0x20 },
+ 16, 0x9d20, 0, {0xc0,0x0b,0x30,0x12,0x0c,0x02,0x83,0x02,0xa0,0xc0,0x28,0x30,0x0e,0x0c,0x02,0x80 },
+ 16, 0x9d30, 0, {0x00,0xa0,0xc0,0x49,0x30,0x0a,0x0c,0x02,0x8b,0x00,0x20,0xc0,0x08,0x30,0x02,0xc2 },
+ 16, 0x9d40, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xf9,0x24,0x32,0xc0 },
+ 16, 0x9d50, 0, {0x08,0xf0,0x03,0x64,0x00,0xc8,0x00,0xb3,0xc0,0x1f,0xf0,0x0b,0x3c,0x00,0x8f,0x00 },
+ 16, 0x9d60, 0, {0x33,0xc0,0x4c,0xf0,0x43,0x3c,0x08,0xc3,0x00,0x31,0xc0,0x0c,0xf0,0x03,0x3d,0x48 },
+ 16, 0x9d70, 0, {0xcf,0x00,0x31,0xc0,0x0c,0xf0,0x03,0x80,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9d80, 0, {0xa0,0x1d,0xf0,0x04,0xf9,0x41,0x3b,0xc0,0x4f,0xf0,0x03,0xf0,0x11,0xfd,0x00,0x3f },
+ 16, 0x9d90, 0, {0xc0,0x87,0x70,0x27,0xfc,0x00,0xef,0x06,0x3f,0xc0,0x0f,0xf0,0x02,0xfc,0x08,0xfc },
+ 16, 0x9da0, 0, {0x00,0x3f,0xc0,0x47,0xf0,0x43,0xfc,0x00,0x77,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xe8 },
+ 16, 0x9db0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xd2,0x00,0xc7,0x01,0x37,0x0c },
+ 16, 0x9dc0, 0, {0x0f,0xe8,0x23,0x10,0x4a,0xc4,0xc0,0x31,0x30,0x0c,0xc9,0x03,0x34,0x46,0xcf,0x10 },
+ 16, 0x9dd0, 0, {0x33,0xd0,0x0c,0xf4,0x03,0x3c,0x58,0xcf,0x00,0x33,0xc0,0x2d,0xf1,0x03,0x3e,0x02 },
+ 16, 0x9de0, 0, {0xcf,0x21,0x3f,0xe4,0x0f,0xf2,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9df0, 0, {0x80,0x10,0xe4,0x84,0x0b,0x40,0x22,0x4c,0x0b,0xa8,0x02,0x2c,0xc0,0x8b,0x20,0x22 },
+ 16, 0x9e00, 0, {0xc8,0x4a,0x32,0x02,0x24,0x80,0x83,0x20,0x20,0xc0,0x08,0x30,0x02,0x20,0x00,0x8b },
+ 16, 0x9e10, 0, {0x21,0x32,0xca,0x48,0x32,0x02,0x2c,0x30,0x8f,0x90,0x2e,0x88,0x0b,0xbd,0x12,0x20 },
+ 16, 0x9e20, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xce,0x20,0xa3,0x40,0xe0,0x48 },
+ 16, 0x9e30, 0, {0x4b,0x20,0x22,0x0c,0x02,0x82,0x00,0x2a,0x00,0x08,0x20,0x02,0x04,0x80,0x80,0x20 },
+ 16, 0x9e40, 0, {0x20,0xc8,0x08,0x02,0x02,0x0c,0x00,0x80,0x0c,0x60,0x00,0x08,0x20,0x12,0x2c,0x88 },
+ 16, 0x9e50, 0, {0x83,0x00,0x2c,0xe8,0x0b,0x30,0x02,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9e60, 0, {0xc0,0x15,0xae,0x00,0xab,0x01,0xa2,0x60,0x0b,0xa0,0x02,0x20,0x01,0x81,0x00,0x22 },
+ 16, 0x9e70, 0, {0xc0,0x0a,0x90,0x12,0x04,0x20,0x8a,0x08,0x22,0xc1,0x08,0xa0,0x02,0x28,0x00,0x88 },
+ 16, 0x9e80, 0, {0x00,0x24,0x44,0x08,0xa2,0x02,0xac,0x00,0x8b,0x04,0x2e,0x88,0x03,0xb0,0x02,0x70 },
+ 16, 0x9e90, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xea,0x90,0x32,0x28 },
+ 16, 0x9ea0, 0, {0x0f,0xb6,0x03,0x20,0x08,0xc9,0x04,0x3a,0xc0,0x4c,0x90,0x22,0x24,0x00,0xcb,0x40 },
+ 16, 0x9eb0, 0, {0x32,0xa8,0x0c,0xb2,0x03,0x2c,0x00,0xcb,0x80,0xb2,0xe0,0x0c,0xb0,0x0b,0x04,0x00 },
+ 16, 0x9ec0, 0, {0xcb,0x00,0x3e,0xc0,0x4f,0xb0,0x0b,0x50,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9ed0, 0, {0xe0,0x01,0xbc,0x00,0xdf,0x80,0x3b,0x81,0x0f,0xf0,0xc3,0xfc,0x00,0xbe,0x01,0x1f },
+ 16, 0x9ee0, 0, {0x00,0x0f,0xe0,0x23,0xf4,0x00,0xff,0x00,0x3f,0xb0,0x4f,0xf0,0x43,0xd4,0x02,0xff },
+ 16, 0x9ef0, 0, {0x91,0x3a,0xe0,0x4e,0xf0,0x03,0x7c,0x0c,0xff,0x00,0x2f,0x80,0x0f,0x30,0x03,0xb8 },
+ 16, 0x9f00, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x01,0xca,0x00,0x72,0x50 },
+ 16, 0x9f10, 0, {0x04,0xb4,0x03,0x2c,0x82,0xcb,0x00,0x32,0xe0,0x0c,0xb8,0x03,0x27,0x04,0xc8,0xc8 },
+ 16, 0x9f20, 0, {0xb2,0xa2,0x0c,0x88,0x03,0x2c,0x00,0xc1,0x00,0x3e,0x00,0x2c,0x30,0x1b,0x2c,0x04 },
+ 16, 0x9f30, 0, {0xfb,0x10,0x3e,0xc0,0x0f,0xb0,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9f40, 0, {0xc8,0x05,0x2c,0x04,0x03,0x50,0xa2,0xe0,0x08,0x34,0x42,0x33,0x00,0x88,0x00,0x20 },
+ 16, 0x9f50, 0, {0x10,0x0d,0x84,0x03,0x25,0x00,0x8a,0x40,0x22,0x90,0x08,0xa5,0x02,0x2c,0x00,0x89 },
+ 16, 0x9f60, 0, {0xa4,0x3a,0x40,0x08,0xb0,0x02,0x2c,0x00,0xbf,0x84,0x2e,0x80,0x0b,0xf0,0x52,0x32 },
+ 16, 0x9f70, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x6c,0x80,0x81,0x80,0x24,0x88 },
+ 16, 0x9f80, 0, {0x89,0x3c,0x26,0x21,0x00,0x90,0x00,0x20,0x02,0x08,0x80,0x82,0x00,0x20,0x9b,0x00 },
+ 16, 0x9f90, 0, {0x22,0x40,0x88,0xb0,0x12,0x0c,0x08,0x83,0x80,0x2c,0xc0,0x08,0x10,0x02,0x0c,0x00 },
+ 16, 0x9fa0, 0, {0xb3,0x80,0x2c,0x40,0x0b,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0x9fb0, 0, {0x20,0x01,0x3e,0x0a,0x85,0xa0,0xa5,0x60,0x08,0xfb,0x82,0x3e,0x84,0x9f,0x81,0x63 },
+ 16, 0x9fc0, 0, {0xe0,0x89,0x79,0x12,0x52,0x80,0x97,0x82,0x21,0x6c,0x18,0x78,0x02,0x12,0x00,0x87 },
+ 16, 0x9fd0, 0, {0xa1,0x29,0xe0,0x08,0x5b,0x02,0x1e,0x00,0xb7,0xc0,0x2d,0x60,0x0b,0x78,0x02,0x08 },
+ 16, 0x9fe0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x81,0x08,0x26,0xc2 },
+ 16, 0x9ff0, 0, {0x2c,0x32,0x13,0x0e,0xa4,0xd2,0x00,0xb0,0x00,0x1c,0x21,0x12,0x24,0x02,0xd1,0x20 },
+ 16, 0xa000, 0, {0x30,0xc8,0x0c,0x10,0x03,0x0c,0x00,0xc2,0x10,0x3c,0x80,0x0c,0x23,0x03,0x0c,0x40 },
+ 16, 0xa010, 0, {0xf3,0x00,0x3c,0x48,0x0f,0x30,0x0b,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa020, 0, {0x40,0x1d,0xbc,0x00,0xfd,0x20,0xbb,0x40,0x07,0x72,0x02,0xf0,0x10,0xed,0x10,0x3f },
+ 16, 0xa030, 0, {0xc4,0x0f,0xd1,0x63,0xb4,0x80,0xef,0x00,0x3f,0xc8,0x0f,0xf0,0x03,0xd8,0x00,0xfe },
+ 16, 0xa040, 0, {0x34,0x3f,0xc4,0x0f,0xeb,0x43,0xfc,0x00,0xff,0x08,0x7f,0x40,0x0f,0xf1,0x83,0xd0 },
+ 16, 0xa050, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xc8,0x00,0x33,0x80 },
+ 16, 0xa060, 0, {0x8f,0x28,0x03,0x20,0x00,0x49,0x02,0x32,0xc0,0x0f,0x90,0x03,0x20,0x00,0xcb,0x00 },
+ 16, 0xa070, 0, {0x32,0x40,0x4c,0xb0,0x0b,0x2c,0x00,0xcb,0x80,0x32,0xc0,0x0e,0x9e,0x03,0x24,0x00 },
+ 16, 0xa080, 0, {0xfb,0x20,0x3e,0xc0,0x0f,0xb0,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa090, 0, {0x48,0x11,0x9c,0x00,0x8d,0x01,0x21,0xc0,0x0b,0x60,0x02,0x1d,0x00,0xd6,0x00,0x21 },
+ 16, 0xa0a0, 0, {0x00,0x0b,0xe0,0x02,0x00,0x00,0x83,0x04,0x20,0x40,0x08,0x70,0x42,0x34,0x02,0x87 },
+ 16, 0xa0b0, 0, {0x01,0x23,0xc0,0x28,0x51,0x0a,0x1c,0x04,0xb7,0x30,0x2d,0xc0,0x0b,0x72,0x03,0x92 },
+ 16, 0xa0c0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xa6,0x40,0x21,0xa0 },
+ 16, 0xa0d0, 0, {0x0b,0x68,0x02,0x0e,0x00,0x8f,0x80,0x21,0xe0,0x0b,0x78,0x02,0x16,0x10,0xa5,0x80 },
+ 16, 0xa0e0, 0, {0x21,0xe0,0x08,0x18,0x02,0x1e,0x00,0x83,0x80,0x21,0xa0,0x08,0x78,0x02,0x1f,0x00 },
+ 16, 0xa0f0, 0, {0xb7,0x80,0x2d,0xe0,0x0b,0x38,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa100, 0, {0x48,0x14,0xec,0x12,0xa1,0x64,0x20,0xe6,0x0b,0x20,0x02,0x00,0x10,0x90,0x4a,0x20 },
+ 16, 0xa110, 0, {0x20,0x4b,0x00,0x42,0x04,0x00,0x83,0x00,0x20,0xc2,0x08,0x30,0x02,0x8c,0x00,0x83 },
+ 16, 0xa120, 0, {0x04,0x20,0xc0,0x08,0x30,0x02,0x0e,0x00,0xb3,0x00,0x2c,0xe0,0x4b,0x30,0x02,0x92 },
+ 16, 0xa130, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x00,0xee,0xc0,0x33,0x90 },
+ 16, 0xa140, 0, {0x0f,0xa0,0x1b,0x08,0x00,0xca,0x40,0xb2,0x82,0x0f,0xa0,0x0b,0x28,0x02,0xca,0x00 },
+ 16, 0xa150, 0, {0xb2,0x90,0xac,0xa0,0x03,0x29,0x00,0xca,0x40,0xb2,0x80,0x8e,0xa4,0x03,0x2a,0x00 },
+ 16, 0xa160, 0, {0xfa,0x00,0x3f,0xa8,0x0f,0xa0,0x0b,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa170, 0, {0x48,0x00,0xe2,0x02,0x90,0x00,0x3e,0x00,0x0f,0x88,0x03,0xf1,0x00,0xfc,0x02,0x3f },
+ 16, 0xa180, 0, {0x20,0x0f,0xc8,0x03,0xc1,0x00,0xf0,0x00,0x3e,0x00,0x8f,0x00,0x01,0x60,0x02,0xf8 },
+ 16, 0xa190, 0, {0x08,0x3e,0x00,0x0f,0x80,0x83,0xe0,0x00,0xf8,0x00,0x2e,0x00,0x8f,0x80,0x13,0x92 },
+ 16, 0xa1a0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x02,0xc9,0x00,0xb2,0x64 },
+ 16, 0xa1b0, 0, {0x0f,0x91,0x03,0xe4,0x04,0xc9,0x00,0x32,0x40,0x6c,0x90,0x03,0x25,0x02,0xc9,0x90 },
+ 16, 0xa1c0, 0, {0xb0,0x40,0x0c,0x90,0x03,0x24,0x20,0xc9,0xa0,0x3e,0x40,0x4c,0x90,0x23,0xe4,0x00 },
+ 16, 0xa1d0, 0, {0xf1,0x00,0x92,0x40,0x0c,0x10,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa1e0, 0, {0x80,0x04,0x64,0x00,0x89,0x80,0xa2,0x40,0x0b,0x96,0x42,0xe5,0x04,0x89,0x00,0x22 },
+ 16, 0xa1f0, 0, {0x40,0x08,0x90,0x02,0x24,0x08,0x09,0x41,0x22,0x40,0x48,0x90,0x42,0x24,0x04,0x89 },
+ 16, 0xa200, 0, {0x80,0x26,0x40,0x08,0x90,0x02,0xe4,0x00,0xb9,0x00,0x22,0x40,0x08,0x94,0x02,0x20 },
+ 16, 0xa210, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x25,0x00,0x89,0x20,0x22,0x40 },
+ 16, 0xa220, 0, {0x0b,0x90,0x02,0xf4,0x84,0x85,0x00,0x21,0x40,0x48,0x50,0x02,0x24,0x20,0x8d,0x08 },
+ 16, 0xa230, 0, {0x23,0x40,0x08,0xd0,0x02,0x94,0x00,0x8d,0x00,0x29,0x40,0x0a,0xd0,0x02,0xa4,0x08 },
+ 16, 0xa240, 0, {0xb9,0x00,0x28,0x40,0x18,0x90,0xc2,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa250, 0, {0x08,0x04,0x05,0x00,0x81,0x00,0x20,0x51,0x0b,0x10,0x02,0xf5,0x80,0x85,0xc1,0xa1 },
+ 16, 0xa260, 0, {0x50,0x08,0x54,0x0a,0x05,0x06,0x85,0x40,0x21,0x50,0x88,0x54,0x02,0x95,0x00,0x85 },
+ 16, 0xa270, 0, {0x44,0x2d,0x50,0x2a,0x54,0x12,0xc5,0x01,0xb1,0x00,0x08,0x50,0x08,0x10,0x02,0x02 },
+ 16, 0xa280, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xca,0x50,0x32,0x80 },
+ 16, 0xa290, 0, {0x0f,0x80,0x03,0xe8,0x02,0xc8,0x01,0x32,0x00,0x2c,0xc0,0x03,0x20,0x00,0xc8,0x02 },
+ 16, 0xa2a0, 0, {0x32,0x00,0x2c,0x80,0x0b,0xa0,0x00,0xc8,0x00,0x3a,0x00,0x4e,0x40,0x23,0xa0,0x08 },
+ 16, 0xa2b0, 0, {0xf8,0x00,0x3a,0x00,0x2c,0x80,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa2c0, 0, {0x98,0x1d,0xdc,0x04,0xfd,0x40,0x3f,0x50,0x4f,0x90,0x63,0xe4,0x40,0xf1,0x02,0x3e },
+ 16, 0xa2d0, 0, {0x41,0x0f,0x90,0x13,0xf5,0x04,0xf9,0x41,0x3e,0x50,0x0f,0x94,0x43,0x65,0x02,0xf9 },
+ 16, 0xa2e0, 0, {0x41,0x36,0x50,0x4d,0x94,0x03,0xf4,0x00,0xf9,0x41,0x37,0x40,0x4f,0x94,0x03,0xe6 },
+ 16, 0xa2f0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xfc,0x00,0xcd,0xa8,0x33,0x70 },
+ 16, 0xa300, 0, {0x0f,0xd0,0x13,0xf6,0x88,0xcd,0x00,0x32,0x50,0x4f,0x14,0x23,0x07,0xa0,0xc9,0xc0 },
+ 16, 0xa310, 0, {0x32,0x78,0x0c,0x9e,0x03,0x37,0x02,0xcd,0xc0,0x32,0x64,0x0f,0x98,0x03,0x24,0x00 },
+ 16, 0xa320, 0, {0xcd,0x00,0x32,0x40,0x2c,0xda,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa330, 0, {0x38,0x10,0xe2,0x08,0x88,0xeb,0x22,0x30,0x0b,0x80,0x12,0xe8,0x04,0xa0,0xa0,0x2a },
+ 16, 0xa340, 0, {0x20,0x0b,0x8a,0x0a,0x23,0x00,0x88,0x80,0x22,0x28,0x00,0xc8,0x42,0x23,0x80,0x80 },
+ 16, 0xa350, 0, {0xd4,0x20,0x28,0x09,0x80,0x02,0x22,0x94,0xa8,0x00,0x2a,0x00,0x88,0x85,0x02,0x0e },
+ 16, 0xa360, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0xa0,0x83,0x00,0x24,0xd8 },
+ 16, 0xa370, 0, {0x8b,0x10,0x02,0xe5,0x14,0x89,0x0a,0x21,0x48,0x0b,0x52,0x02,0x54,0x80,0x85,0x40 },
+ 16, 0xa380, 0, {0x25,0x58,0x09,0x56,0x02,0x45,0x02,0x81,0x20,0x20,0x50,0x0b,0x14,0x02,0x04,0x30 },
+ 16, 0xa390, 0, {0x81,0x00,0x20,0x40,0x08,0x10,0x02,0x42,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa3a0, 0, {0x18,0x15,0xa4,0x12,0x89,0x00,0xa6,0x40,0x0b,0x90,0x42,0xe4,0x98,0xa9,0x80,0x2b },
+ 16, 0xa3b0, 0, {0x40,0x0b,0x51,0x02,0x55,0x00,0x9d,0x08,0x27,0x48,0x09,0xf6,0x02,0x44,0x00,0x81 },
+ 16, 0xa3c0, 0, {0x04,0x22,0x40,0x19,0x91,0x8a,0x24,0x80,0xa9,0x00,0x2a,0x40,0x08,0x90,0x02,0x46 },
+ 16, 0xa3d0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe7,0x02,0xc9,0x04,0x36,0x58 },
+ 16, 0xa3e0, 0, {0x0f,0x90,0x03,0xc5,0x00,0xc9,0x00,0x32,0x40,0x0f,0x90,0x13,0x64,0x02,0xc9,0x00 },
+ 16, 0xa3f0, 0, {0x36,0x40,0x2d,0x90,0x0b,0x66,0x04,0xc9,0xe0,0xb2,0x48,0x8f,0x98,0x47,0x24,0x00 },
+ 16, 0xa400, 0, {0xc9,0x00,0x72,0x40,0x0c,0x10,0x03,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa410, 0, {0x28,0x01,0xa5,0x08,0xf9,0x21,0x3a,0x40,0x0f,0x90,0x03,0xe6,0x04,0xf9,0x00,0x3e },
+ 16, 0xa420, 0, {0x40,0x4f,0x98,0x83,0xa4,0x00,0xe9,0x40,0xba,0x60,0x0e,0x90,0x03,0xa4,0x80,0xf9 },
+ 16, 0xa430, 0, {0xa3,0x3e,0x48,0x0f,0x98,0x0b,0xe4,0x00,0xf9,0x00,0x1e,0x40,0x0f,0x90,0x03,0x8a },
+ 16, 0xa440, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa2,0x48,0xc8,0x20,0x32,0x08 },
+ 16, 0xa450, 0, {0x1f,0x80,0x83,0xe1,0x22,0xc8,0x01,0x33,0x00,0x2c,0xc0,0x03,0x30,0x04,0xcc,0x40 },
+ 16, 0xa460, 0, {0xb1,0x00,0x0c,0x44,0x03,0x20,0x12,0xc8,0x41,0x32,0x00,0x2d,0x84,0x0b,0x60,0x00 },
+ 16, 0xa470, 0, {0xf8,0x00,0xb2,0x00,0x4c,0x80,0x0b,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa480, 0, {0x28,0x05,0x3a,0x00,0xa6,0x00,0x23,0x90,0x03,0xe4,0x92,0xf8,0x00,0x82,0x00,0x36 },
+ 16, 0xa490, 0, {0x80,0x08,0xa0,0x03,0x68,0x00,0xca,0x00,0x22,0x83,0x08,0xa0,0x02,0x28,0x03,0x8a },
+ 16, 0xa4a0, 0, {0x00,0x22,0x80,0x08,0xa0,0x02,0x28,0x00,0xb6,0x80,0x22,0x80,0x0d,0xe8,0x02,0x0a },
+ 16, 0xa4b0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x6e,0x00,0x82,0x42,0x20,0xc0 },
+ 16, 0xa4c0, 0, {0x0b,0x34,0x02,0xcd,0x09,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x02,0x98,0x00 },
+ 16, 0xa4d0, 0, {0x20,0x20,0x28,0x00,0x0a,0x04,0x10,0x81,0x80,0x20,0xc0,0x08,0xb0,0x02,0x2c,0x00 },
+ 16, 0xa4e0, 0, {0xb3,0x00,0x22,0xc0,0x18,0x31,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa4f0, 0, {0xa0,0x01,0x38,0x02,0xa3,0x00,0x21,0x40,0x1b,0x70,0x02,0xdc,0x20,0x84,0x05,0x65 },
+ 16, 0xa500, 0, {0xe0,0x08,0xf0,0x02,0x7c,0x10,0x97,0x00,0x24,0xc0,0x08,0x30,0x02,0x54,0x88,0x87 },
+ 16, 0xa510, 0, {0x09,0x21,0xe8,0x09,0x33,0x02,0x1c,0x80,0xb6,0x08,0x63,0xc8,0x09,0x38,0x12,0x28 },
+ 16, 0xa520, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xc7,0xa0,0xa1,0xe0 },
+ 16, 0xa530, 0, {0x0b,0x78,0x03,0xfe,0x00,0xc5,0x82,0x33,0x20,0x0c,0x48,0x03,0x1e,0x01,0xdf,0x80 },
+ 16, 0xa540, 0, {0x31,0x20,0x0c,0x48,0x03,0x06,0x40,0x87,0x82,0x31,0xf8,0x0d,0x7b,0x03,0x5f,0x00 },
+ 16, 0xa550, 0, {0xf3,0x80,0x31,0xf2,0x0c,0x60,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa560, 0, {0x08,0x1d,0x9c,0x00,0xfb,0x01,0x2f,0x40,0x07,0xb0,0x03,0xe8,0x04,0xf9,0x00,0x3e },
+ 16, 0xa570, 0, {0xc1,0x0f,0xb0,0x03,0xe0,0x06,0xe8,0x02,0x3a,0xc0,0x0f,0xb0,0x01,0xa4,0x10,0xf9 },
+ 16, 0xa580, 0, {0x40,0xbe,0xd0,0x06,0xb0,0x03,0xee,0x00,0xfa,0x00,0x3c,0xd8,0x0f,0xa0,0x03,0xc2 },
+ 16, 0xa590, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xcf,0x88,0x33,0x64 },
+ 16, 0xa5a0, 0, {0x2c,0xf8,0x03,0xfe,0x02,0xc4,0xb0,0x33,0x20,0x8c,0xd8,0x03,0x32,0x00,0xcc,0xb4 },
+ 16, 0xa5b0, 0, {0x33,0xa0,0x0c,0xc8,0x03,0x16,0x20,0xcf,0xc0,0x33,0xf0,0x0c,0xf8,0x03,0xfe,0x00 },
+ 16, 0xa5c0, 0, {0xcd,0x80,0x3f,0xe0,0x0f,0xd8,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa5d0, 0, {0xa8,0x11,0xb5,0x04,0x87,0x12,0xa1,0x50,0x0a,0x74,0x12,0xc4,0x40,0x84,0x11,0x23 },
+ 16, 0xa5e0, 0, {0xc0,0x28,0xe0,0x02,0x1c,0x02,0xa7,0x11,0x21,0x58,0x48,0x70,0x0a,0x14,0x00,0x8d },
+ 16, 0xa5f0, 0, {0x00,0x23,0xc0,0x0b,0x70,0x02,0xfc,0x40,0x86,0x00,0x2d,0xc0,0x0b,0x50,0x02,0x2a },
+ 16, 0xa600, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x95,0x00,0x87,0x40,0x21,0x00 },
+ 16, 0xa610, 0, {0x18,0x71,0x02,0xdc,0x00,0x95,0x28,0xe1,0x02,0x08,0x50,0x02,0x3c,0x42,0xa7,0x22 },
+ 16, 0xa620, 0, {0x21,0x80,0x88,0x41,0x02,0x14,0x00,0x85,0x00,0xa1,0xc0,0x09,0x71,0x02,0xdc,0x00 },
+ 16, 0xa630, 0, {0xb5,0x10,0x2d,0xc0,0x0b,0x40,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa640, 0, {0x20,0x14,0xc4,0x10,0x83,0x84,0x20,0x11,0x08,0x30,0x02,0xc3,0x10,0x91,0x20,0x20 },
+ 16, 0xa650, 0, {0xc0,0x08,0x28,0x12,0x00,0x00,0xa0,0x84,0x20,0x40,0x08,0x30,0x02,0x04,0x26,0x83 },
+ 16, 0xa660, 0, {0x00,0x20,0xd0,0x0b,0x30,0x02,0xcc,0x00,0xb2,0x00,0x2c,0xc0,0x0b,0x00,0x02,0x08 },
+ 16, 0xa670, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xad,0x00,0xcf,0x88,0xb2,0xe8 },
+ 16, 0xa680, 0, {0x0c,0x30,0x13,0xce,0xc2,0xd0,0x82,0x32,0x00,0x0c,0x0e,0x0b,0x20,0x00,0xc8,0x88 },
+ 16, 0xa690, 0, {0xb2,0x40,0x2c,0xba,0x43,0x37,0x02,0xcb,0x00,0xb3,0xc0,0x2c,0xf0,0x03,0xfc,0x12 },
+ 16, 0xa6a0, 0, {0xfb,0x00,0x7f,0xd1,0x0f,0x30,0x0b,0x2b,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa6b0, 0, {0x80,0x00,0xed,0x02,0xf1,0x40,0x3e,0x41,0x0f,0xb0,0x23,0xed,0x00,0xe8,0x01,0x3e },
+ 16, 0xa6c0, 0, {0xc8,0x0f,0xb0,0x13,0xec,0x04,0xdb,0x00,0x3c,0x80,0x0f,0x04,0x03,0xe4,0x40,0xf9 },
+ 16, 0xa6d0, 0, {0x00,0x3c,0xc2,0x0e,0xb0,0x03,0xee,0x00,0x4b,0x41,0x3e,0xc0,0x0f,0xb0,0x03,0xe0 },
+ 16, 0xa6e0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0x4b,0x00,0x32,0x42 },
+ 16, 0xa6f0, 0, {0x0c,0xf0,0x03,0x36,0x80,0xcd,0x00,0x33,0x00,0x4c,0xc0,0x83,0x3c,0x04,0xf7,0x00 },
+ 16, 0xa700, 0, {0x32,0x40,0x0c,0xb1,0x43,0x14,0x00,0xcd,0x80,0x33,0xc0,0x0c,0xf0,0x03,0xfc,0x00 },
+ 16, 0xa710, 0, {0xff,0x00,0xb3,0xc2,0x0c,0xa0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa720, 0, {0x81,0x04,0x4f,0x02,0x8b,0x80,0x20,0x30,0x08,0xbc,0x02,0x20,0x10,0x89,0x00,0x22 },
+ 16, 0xa730, 0, {0xc0,0x00,0xb0,0x03,0x60,0x04,0xb8,0x00,0xa2,0x90,0x28,0x8c,0x1a,0x24,0x02,0x8b },
+ 16, 0xa740, 0, {0x83,0x22,0xc1,0x08,0xb0,0x02,0xfc,0x00,0xb3,0x60,0x20,0xc0,0x0d,0xa0,0x03,0xe0 },
+ 16, 0xa750, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2e,0x00,0xab,0xc0,0x22,0x60 },
+ 16, 0xa760, 0, {0x08,0xb8,0x02,0x29,0x00,0x88,0x01,0x20,0x00,0x08,0x90,0x02,0x20,0x00,0xb8,0x00 },
+ 16, 0xa770, 0, {0x22,0xc0,0x08,0xb0,0x02,0xe4,0x00,0x81,0x24,0xa2,0xc0,0x09,0xb0,0x46,0xec,0x00 },
+ 16, 0xa780, 0, {0xb9,0x00,0x22,0xc0,0x08,0x90,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa790, 0, {0x08,0x04,0x2c,0x00,0xa1,0x00,0xa0,0x41,0x08,0xb0,0x0a,0x20,0x53,0x88,0x00,0x20 },
+ 16, 0xa7a0, 0, {0xc0,0x28,0xa0,0x02,0x4c,0x00,0xb3,0x00,0x20,0x00,0x88,0x00,0x02,0x84,0x00,0x83 },
+ 16, 0xa7b0, 0, {0x04,0x20,0xc0,0x28,0x30,0x02,0xcc,0x00,0xb3,0x02,0x62,0xc0,0x09,0x10,0x02,0xc2 },
+ 16, 0xa7c0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xe9,0x00,0x22,0x00 },
+ 16, 0xa7d0, 0, {0x0c,0xb0,0x03,0x00,0x04,0xc9,0x00,0xb2,0x00,0x0c,0x90,0x03,0x2c,0x00,0xf3,0x00 },
+ 16, 0xa7e0, 0, {0xb2,0xc0,0x8c,0xb0,0x03,0xb4,0x02,0x8f,0x00,0x23,0xc0,0x04,0xf0,0x03,0xec,0x08 },
+ 16, 0xa7f0, 0, {0xf9,0x00,0x33,0xc0,0x0c,0x80,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa800, 0, {0xa0,0x1d,0xfc,0x10,0xdd,0x04,0x3f,0x00,0x0f,0xc0,0x23,0xf0,0x90,0xfd,0x00,0x2f },
+ 16, 0xa810, 0, {0xc0,0x0f,0xe0,0x43,0xd0,0x00,0xfc,0x00,0x3f,0x00,0x8f,0xc0,0x22,0x74,0x00,0xfd },
+ 16, 0xa820, 0, {0x04,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xff,0x06,0x3f,0xc0,0x0f,0xc0,0x43,0xe8 },
+ 16, 0xa830, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x80,0xef,0x20,0x11,0xc0 },
+ 16, 0xa840, 0, {0x0e,0x72,0x03,0xbd,0xb0,0xcf,0x31,0xbf,0xcc,0x02,0xf0,0x03,0xfc,0xc6,0xcf,0x01 },
+ 16, 0xa850, 0, {0x0b,0xc5,0x0f,0xf1,0x03,0x3c,0x04,0xef,0x61,0x33,0xd8,0x07,0xf0,0x03,0x34,0x80 },
+ 16, 0xa860, 0, {0xcd,0x30,0x73,0xcc,0x0f,0xe8,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa870, 0, {0x80,0x18,0xe9,0x00,0x88,0x69,0x22,0x10,0x08,0x8c,0x00,0x21,0x84,0x88,0x41,0x22 },
+ 16, 0xa880, 0, {0x10,0x88,0x86,0x92,0x01,0x00,0x88,0x62,0x22,0x10,0x4b,0x87,0x02,0x21,0xa0,0x88 },
+ 16, 0xa890, 0, {0x60,0x20,0x10,0x0b,0x86,0xa2,0x35,0xa0,0xab,0x60,0xa1,0xc4,0x0b,0xb8,0x02,0x20 },
+ 16, 0xa8a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcd,0xa8,0x33,0x41,0x20,0xc6 },
+ 16, 0xa8b0, 0, {0x4a,0x31,0x00,0x8c,0x10,0x93,0x33,0x28,0xcc,0x29,0x34,0x12,0x8c,0x50,0x93,0x1c },
+ 16, 0xa8c0, 0, {0x28,0x84,0x01,0x20,0x4a,0x4c,0x41,0x83,0x10,0x24,0xcc,0x4b,0x31,0x42,0x4c,0x40 },
+ 16, 0xa8d0, 0, {0x91,0x10,0x24,0xc0,0x0b,0x80,0x02,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa8e0, 0, {0xc0,0x05,0xa8,0x20,0x90,0x02,0x22,0x00,0x08,0x80,0x00,0x20,0x30,0xb8,0x08,0x26 },
+ 16, 0xa8f0, 0, {0x00,0x01,0x80,0x82,0x20,0x20,0x18,0x08,0x42,0x40,0x03,0x91,0x02,0x60,0x00,0x08 },
+ 16, 0xa900, 0, {0x01,0xa6,0x00,0x0b,0x80,0x00,0x6c,0x10,0xbb,0x01,0x26,0xc0,0x4b,0x90,0x0a,0x30 },
+ 16, 0xa910, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0xfd,0x00,0xfd,0x41,0x33,0xa1 },
+ 16, 0xa920, 0, {0x0e,0xd2,0x03,0xb5,0x02,0xdf,0x42,0x3b,0x01,0x0f,0xd4,0x43,0xb5,0x00,0xcd,0x40 },
+ 16, 0xa930, 0, {0x1b,0xc4,0x0d,0x78,0x03,0x70,0x02,0xec,0x00,0x17,0xa1,0x0f,0xe8,0x0b,0x2c,0x02 },
+ 16, 0xa940, 0, {0xd9,0x90,0x26,0xc0,0x0f,0xac,0x03,0x00,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa950, 0, {0xe0,0x01,0xb8,0x00,0xee,0x00,0x1f,0x64,0x4f,0xe0,0x03,0xd8,0x10,0xc4,0x18,0x33 },
+ 16, 0xa960, 0, {0xc0,0x0c,0xa0,0xa1,0xb8,0x09,0xe6,0x09,0x36,0x22,0x0f,0x88,0x23,0xbc,0x00,0xfb },
+ 16, 0xa970, 0, {0x00,0x3b,0x64,0x0f,0xd9,0x03,0x9c,0x00,0xe3,0x04,0x3b,0xc0,0x0f,0xf4,0x03,0xf8 },
+ 16, 0xa980, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x8d,0x00,0xc9,0x40,0xb6,0x80 },
+ 16, 0xa990, 0, {0x0f,0x10,0x03,0xa7,0x20,0xfb,0x50,0xb6,0x08,0x4c,0x14,0x03,0x65,0x22,0xd9,0x40 },
+ 16, 0xa9a0, 0, {0xb6,0x80,0x0e,0xa0,0x0b,0x00,0x00,0xd8,0x00,0x76,0x82,0x28,0xa0,0x23,0x64,0x00 },
+ 16, 0xa9b0, 0, {0xc9,0x04,0x12,0xc0,0x8e,0x80,0x03,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xa9c0, 0, {0xc8,0x05,0x2b,0x60,0x8a,0x09,0x20,0x50,0x08,0xa0,0x23,0xe9,0x00,0xb8,0xc0,0x22 },
+ 16, 0xa9d0, 0, {0xf0,0x08,0xac,0x02,0x28,0x04,0x8a,0xc2,0x22,0x50,0x08,0x90,0x06,0x2c,0x00,0x8b },
+ 16, 0xa9e0, 0, {0x04,0x22,0x51,0x08,0x94,0x02,0xe4,0x04,0x8b,0x04,0x37,0xc0,0x08,0x18,0x42,0x26 },
+ 16, 0xa9f0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x04,0x4b,0x00,0x82,0xc8,0x24,0x43 },
+ 16, 0xaa00, 0, {0x0b,0x26,0x0a,0x88,0x00,0xb0,0x80,0x22,0xe4,0x0b,0x20,0x42,0x69,0x00,0xa2,0x90 },
+ 16, 0xaa10, 0, {0x28,0x40,0xe8,0x10,0x02,0x0c,0x00,0xbb,0x00,0x28,0x50,0x88,0x90,0x82,0xc4,0x01 },
+ 16, 0xaa20, 0, {0x83,0x00,0x20,0xc0,0x0a,0x10,0x02,0xba,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaa30, 0, {0x20,0x10,0x4e,0x80,0x81,0x00,0x21,0xa8,0x08,0x58,0x02,0xd6,0x01,0xb7,0x90,0x68 },
+ 16, 0xaa40, 0, {0x20,0x03,0x59,0x82,0x56,0x00,0xa5,0x84,0x2d,0xa2,0x18,0x69,0x22,0x02,0x00,0x34 },
+ 16, 0xaa50, 0, {0x80,0x29,0xa8,0x08,0x68,0x06,0xc6,0x14,0x85,0x82,0x25,0xe0,0x08,0x58,0x82,0x1c },
+ 16, 0xaa60, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x48,0x00,0xc2,0xf0,0x34,0x40 },
+ 16, 0xaa70, 0, {0x0f,0x20,0x03,0x88,0x80,0xf8,0x10,0x30,0xc0,0x27,0x21,0x0b,0x48,0x80,0xea,0x20 },
+ 16, 0xaa80, 0, {0x38,0x00,0x0c,0x00,0x12,0x0c,0x08,0x73,0x00,0xb8,0x40,0x0c,0x12,0x23,0x4c,0x02 },
+ 16, 0xaa90, 0, {0x43,0x34,0x30,0xc0,0x0e,0x11,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaaa0, 0, {0x40,0x15,0xac,0x90,0xf9,0x01,0x2e,0x88,0x4b,0x90,0x11,0x64,0x00,0xfb,0x10,0x32 },
+ 16, 0xaab0, 0, {0x00,0x00,0x91,0x03,0xa4,0x00,0xc9,0x00,0x32,0xc4,0x4d,0xb0,0x43,0xe0,0x04,0xc8 },
+ 16, 0xaac0, 0, {0x00,0x36,0x89,0x0f,0xa8,0x03,0xed,0x00,0xf9,0x14,0x3e,0xc0,0x0f,0x10,0x43,0xd0 },
+ 16, 0xaad0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xe8,0x00,0xc8,0x00,0x3a,0x00 },
+ 16, 0xaae0, 0, {0x0c,0x00,0x53,0xa0,0x00,0xe8,0x01,0x32,0x01,0x0e,0x80,0x53,0x20,0x10,0xc8,0x00 },
+ 16, 0xaaf0, 0, {0x3a,0x40,0x0c,0x90,0x03,0x20,0x10,0xe8,0x04,0xb6,0x00,0x84,0x80,0x03,0x2d,0x12 },
+ 16, 0xab00, 0, {0xcb,0x00,0x2e,0xca,0x04,0x90,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xab10, 0, {0x4c,0x19,0x8c,0x00,0x87,0x02,0x21,0xc0,0x08,0x70,0x02,0x0c,0x00,0x83,0x00,0x21 },
+ 16, 0xab20, 0, {0xc0,0x08,0x30,0x62,0x4c,0x04,0x83,0x00,0x21,0x80,0x48,0xe0,0x12,0x3c,0x00,0x87 },
+ 16, 0xab30, 0, {0x00,0x21,0xc0,0x08,0x70,0x02,0x1c,0x00,0x85,0x01,0x24,0xd0,0x0a,0x50,0x02,0xf2 },
+ 16, 0xab40, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x9a,0x00,0x80,0x80,0x28,0x20 },
+ 16, 0xab50, 0, {0x08,0x4c,0x22,0xd2,0x00,0xa4,0x80,0x24,0x30,0x0b,0x48,0x02,0x52,0x00,0x84,0xc0 },
+ 16, 0xab60, 0, {0x21,0x20,0x09,0x48,0x68,0x13,0x00,0xa4,0x80,0x60,0x20,0x09,0x08,0x02,0x56,0x00 },
+ 16, 0xab70, 0, {0x97,0x80,0x2d,0xe0,0x88,0x58,0x02,0xe0,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xab80, 0, {0x6c,0x04,0xcc,0x00,0x83,0x80,0x20,0xd8,0x08,0x30,0x02,0x4c,0x40,0x83,0x00,0x24 },
+ 16, 0xab90, 0, {0xd1,0x09,0xb9,0x42,0x4e,0x00,0x83,0x00,0x20,0xc1,0x89,0x30,0x42,0x0c,0x00,0x83 },
+ 16, 0xaba0, 0, {0xf0,0xa0,0xd9,0x19,0x36,0x22,0x66,0x06,0x91,0x00,0x0c,0xc1,0x0a,0x10,0x02,0xc2 },
+ 16, 0xabb0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xe8,0x02,0xca,0xa5,0x2a,0x91 },
+ 16, 0xabc0, 0, {0x28,0xa8,0x03,0xea,0x02,0xaa,0x00,0xb6,0xa0,0x0f,0xa0,0x0a,0x2a,0x92,0xca,0x83 },
+ 16, 0xabd0, 0, {0xba,0x80,0x29,0xa0,0x03,0x2b,0x00,0xea,0x40,0x66,0x90,0x2d,0xe4,0x0b,0x6a,0x80 },
+ 16, 0xabe0, 0, {0xda,0x00,0x3e,0x80,0x0c,0xe0,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xabf0, 0, {0x48,0x01,0x80,0x00,0xfc,0x00,0x3d,0x00,0x0f,0xc0,0x03,0xb0,0x14,0xfc,0x00,0x3b },
+ 16, 0xac00, 0, {0x12,0x0e,0xc0,0x43,0xb1,0x14,0xfc,0x00,0x3d,0x00,0x0e,0xc0,0x03,0xf0,0x20,0xf4 },
+ 16, 0xac10, 0, {0x00,0x31,0x00,0x0e,0x44,0x13,0xa0,0x00,0xe8,0x06,0x36,0x00,0x4f,0x80,0x13,0xd2 },
+ 16, 0xac20, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xa4,0x00,0xd1,0x00,0x36,0x60 },
+ 16, 0xac30, 0, {0x1c,0x18,0x0b,0x46,0x00,0xd9,0x80,0x30,0x40,0x2c,0x98,0x05,0x86,0x00,0xc1,0x80 },
+ 16, 0xac40, 0, {0x92,0x40,0x0d,0x10,0x03,0x44,0x02,0x89,0x00,0x32,0x70,0x0c,0x98,0x01,0x24,0x00 },
+ 16, 0xac50, 0, {0xc9,0x04,0x30,0x40,0x0c,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xac60, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x22,0x40,0x08,0x94,0x02,0x24,0x80,0x89,0x01,0x22 },
+ 16, 0xac70, 0, {0x40,0x48,0x91,0x02,0x24,0x00,0xd9,0x90,0x22,0x41,0x08,0x90,0x12,0x24,0x10,0x89 },
+ 16, 0xac80, 0, {0x00,0x32,0x40,0x08,0x95,0x12,0x24,0x02,0x81,0x00,0xa2,0x41,0x0d,0x90,0x42,0xe0 },
+ 16, 0xac90, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x05,0x24,0x02,0x9d,0x00,0x23,0x44 },
+ 16, 0xaca0, 0, {0x08,0xd2,0x06,0x74,0x80,0xb5,0x20,0x23,0x40,0x1a,0xd0,0x06,0x35,0x90,0x8d,0x02 },
+ 16, 0xacb0, 0, {0x2f,0x44,0x19,0xd0,0x02,0x74,0x00,0x8d,0x00,0x63,0x40,0x18,0xd4,0x02,0xa4,0x11 },
+ 16, 0xacc0, 0, {0x89,0x00,0x22,0x40,0x08,0xb0,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xacd0, 0, {0x28,0x14,0x04,0x80,0x85,0x20,0x21,0x68,0x08,0x52,0x02,0x14,0x80,0xa5,0x20,0xa1 },
+ 16, 0xace0, 0, {0x48,0x0a,0x72,0x38,0x14,0x80,0x95,0x24,0x2d,0x48,0x28,0x52,0x02,0x14,0x80,0x85 },
+ 16, 0xacf0, 0, {0x20,0x21,0x48,0x08,0x52,0x06,0x84,0x80,0x81,0x20,0x20,0x4a,0x09,0x10,0x02,0xc2 },
+ 16, 0xad00, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x0d,0x61,0x40,0xd8,0x50,0xb2,0x14 },
+ 16, 0xad10, 0, {0x28,0xa0,0x03,0x61,0x40,0xf8,0x50,0x32,0x94,0x4e,0x85,0x04,0x21,0x42,0xc8,0x50 },
+ 16, 0xad20, 0, {0x3c,0x14,0x0d,0x80,0x03,0x61,0x40,0x88,0x50,0xb2,0x14,0x2c,0xc5,0x09,0xa1,0x40 },
+ 16, 0xad30, 0, {0xc8,0x50,0x32,0x1c,0x0c,0x80,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xad40, 0, {0x98,0x15,0xe4,0x40,0xf9,0x10,0x3a,0x44,0x0f,0x91,0x03,0xe4,0x40,0xd9,0x14,0x3e },
+ 16, 0xad50, 0, {0x44,0x0d,0x91,0x43,0x64,0x40,0xe9,0x10,0x32,0x44,0x07,0x93,0xc3,0xe4,0x50,0xd1 },
+ 16, 0xad60, 0, {0x10,0x7e,0x44,0x03,0x91,0x01,0x54,0x44,0xfd,0x14,0x3e,0x40,0x0f,0xd0,0x03,0xe6 },
+ 16, 0xad70, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x80,0xdd,0xa0,0x33,0x68 },
+ 16, 0xad80, 0, {0x1e,0xda,0x03,0x36,0x90,0xcd,0xa0,0x3b,0x68,0x0a,0xd8,0x23,0x76,0x0c,0xed,0x80 },
+ 16, 0xad90, 0, {0x2b,0x62,0x0b,0x99,0x02,0xa7,0x80,0xf9,0xe1,0x37,0x68,0x0c,0xda,0x03,0x27,0x80 },
+ 16, 0xada0, 0, {0xc9,0xa2,0x22,0x68,0x4c,0x50,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xadb0, 0, {0x38,0x18,0xe1,0x40,0x88,0x50,0x22,0x14,0x08,0x80,0x22,0x60,0x00,0x88,0x04,0x22 },
+ 16, 0xadc0, 0, {0x00,0x08,0x04,0x26,0x01,0x00,0x88,0x50,0x22,0x10,0x08,0xaf,0x02,0x23,0x00,0x88 },
+ 16, 0xadd0, 0, {0xc0,0xa0,0x10,0x88,0x84,0x02,0x23,0x80,0xa0,0x40,0x2a,0x10,0x08,0x80,0x12,0x4e },
+ 16, 0xade0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x84,0x00,0x81,0x01,0x20,0x40 },
+ 16, 0xadf0, 0, {0x0a,0x14,0x02,0x45,0x00,0x81,0x41,0x2c,0x50,0x0b,0x14,0x02,0x05,0x04,0xa1,0x00 },
+ 16, 0xae00, 0, {0x28,0x40,0x82,0x10,0x02,0x84,0x40,0xa1,0x32,0x80,0x50,0x09,0x14,0x02,0x04,0xc4 },
+ 16, 0xae10, 0, {0x91,0x10,0x64,0x44,0x28,0x10,0x02,0xd2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xae20, 0, {0x18,0x04,0xac,0x02,0x81,0x00,0x22,0xc1,0x08,0x90,0x02,0x44,0x02,0x89,0x02,0x26 },
+ 16, 0xae30, 0, {0x41,0x09,0x90,0x0a,0x24,0x0c,0x89,0x04,0x22,0x50,0x08,0x90,0x26,0x24,0x00,0x89 },
+ 16, 0xae40, 0, {0x00,0x22,0x41,0x09,0x10,0x22,0x24,0x40,0xb9,0x01,0x2e,0x40,0x08,0x90,0x02,0x46 },
+ 16, 0xae50, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x10,0x89,0x00,0x32,0x40 },
+ 16, 0xae60, 0, {0x0a,0x90,0x0b,0x24,0x10,0x89,0x00,0x1e,0x40,0x9b,0x90,0x02,0x24,0x10,0x29,0x00 },
+ 16, 0xae70, 0, {0x1a,0x40,0x0e,0x94,0x41,0xa4,0x00,0x29,0x00,0x12,0x40,0x05,0x90,0x41,0x26,0x00 },
+ 16, 0xae80, 0, {0xd9,0x00,0x24,0x40,0x0c,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xae90, 0, {0x48,0x01,0xa4,0x02,0xa9,0x00,0xbc,0x40,0x0f,0x90,0x03,0xa4,0x04,0xf9,0x00,0x3a },
+ 16, 0xaea0, 0, {0x41,0x0e,0x90,0x83,0x84,0x00,0xf9,0x00,0x3c,0x40,0x0e,0x90,0x02,0xc4,0x08,0xe9 },
+ 16, 0xaeb0, 0, {0x00,0x3a,0x40,0x2e,0x90,0x0b,0xe6,0x00,0xe1,0x04,0x3a,0x40,0x0f,0x92,0x03,0x5a },
+ 16, 0xaec0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xa0,0x20,0xd8,0x00,0x36,0x02 },
+ 16, 0xaed0, 0, {0x0e,0x00,0xa3,0xe0,0x18,0xc0,0x00,0x30,0x03,0x0f,0x80,0x33,0x20,0x00,0x40,0x00 },
+ 16, 0xaee0, 0, {0x32,0x0d,0x0f,0x04,0x0b,0xa0,0x02,0xc8,0x02,0x32,0x02,0x8c,0x82,0x03,0x20,0x02 },
+ 16, 0xaef0, 0, {0xc8,0x04,0x16,0x00,0x4e,0x80,0x01,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaf00, 0, {0x28,0x05,0x3b,0x00,0x8e,0xd8,0x23,0x80,0x08,0xe0,0x02,0xf8,0x80,0x8e,0x10,0x23 },
+ 16, 0xaf10, 0, {0xa2,0x0b,0xe0,0x82,0x7a,0x20,0x8e,0x30,0x23,0xa1,0x0b,0xe0,0x02,0x28,0x00,0x8e },
+ 16, 0xaf20, 0, {0x00,0x2b,0x88,0x08,0xe4,0x42,0x38,0x00,0x8e,0x04,0x23,0x80,0x08,0xa0,0x02,0x0a },
+ 16, 0xaf30, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x6f,0x40,0x93,0xc6,0x24,0x40 },
+ 16, 0xaf40, 0, {0x0a,0x38,0x02,0xcc,0x00,0x83,0x01,0xac,0xf0,0x0b,0xb4,0x02,0x4c,0x04,0xa3,0x80 },
+ 16, 0xaf50, 0, {0x28,0xd0,0x4b,0x30,0x02,0x4c,0x00,0xab,0x04,0x2a,0xc0,0x2a,0x30,0x0a,0xac,0x10 },
+ 16, 0xaf60, 0, {0x93,0x00,0x20,0xc1,0x0a,0x31,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xaf70, 0, {0x80,0x11,0x1c,0x00,0x82,0x00,0x21,0x42,0x88,0x74,0x06,0xdc,0x0b,0x86,0x02,0x2d },
+ 16, 0xaf80, 0, {0x80,0x0b,0x70,0x2a,0x58,0x00,0xa6,0x00,0xa9,0xc0,0x0b,0x70,0x02,0x5c,0x88,0xa7 },
+ 16, 0xaf90, 0, {0x20,0x29,0xc0,0x0a,0x70,0x02,0x9c,0x10,0x97,0x20,0xa1,0xc8,0x08,0xd8,0x02,0x28 },
+ 16, 0xafa0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x08,0x0e,0x00,0xd7,0x80,0x37,0x60 },
+ 16, 0xafb0, 0, {0x0e,0x68,0x13,0xfe,0x00,0xcf,0x80,0x3d,0xe0,0x0f,0x78,0x23,0x1e,0x00,0xef,0x82 },
+ 16, 0xafc0, 0, {0x31,0xe0,0x0f,0x3c,0xc3,0x7e,0x04,0xef,0x80,0xb1,0xe0,0x0e,0xe8,0x03,0xbe,0x80 },
+ 16, 0xafd0, 0, {0xd7,0xe0,0x33,0xea,0x0e,0x78,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xafe0, 0, {0x08,0x15,0xac,0x00,0xfa,0x01,0x3e,0x00,0x0f,0xb0,0x03,0xe0,0x04,0xf8,0x00,0x32 },
+ 16, 0xaff0, 0, {0x80,0x0f,0x80,0x43,0xac,0x0a,0xd8,0x00,0x36,0x40,0x0f,0xb0,0x03,0x2c,0x0c,0xdb },
+ 16, 0xb000, 0, {0x00,0x26,0xc1,0x09,0xa0,0x13,0x6c,0x40,0xeb,0x40,0x3a,0xdc,0x0f,0x90,0x0b,0xc2 },
+ 16, 0xb010, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x04,0xbe,0x00,0xcf,0x81,0x33,0xe9 },
+ 16, 0xb020, 0, {0x1f,0xf9,0x13,0xb6,0x50,0xef,0x80,0x1f,0xe4,0x04,0xc8,0x03,0x7e,0x00,0x6d,0x81 },
+ 16, 0xb030, 0, {0x33,0x64,0x0c,0xf8,0x1b,0x3e,0x20,0x2f,0x88,0x93,0xe8,0x0f,0xfb,0x03,0x2e,0x80 },
+ 16, 0xb040, 0, {0xcf,0xc0,0x73,0xe0,0x2c,0xd9,0x03,0xd0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb050, 0, {0xa8,0x18,0x90,0x42,0x89,0x18,0x21,0xc0,0x1f,0x71,0x02,0x14,0xc0,0xf7,0x20,0x27 },
+ 16, 0xb060, 0, {0x40,0x40,0x71,0x12,0x18,0x00,0x87,0x20,0x21,0x80,0x48,0x71,0x02,0x3c,0x08,0x87 },
+ 16, 0xb070, 0, {0x20,0x21,0x82,0x0b,0x61,0xa2,0x1e,0x44,0xdf,0x01,0x31,0xc8,0x08,0x73,0x02,0xea },
+ 16, 0xb080, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x8c,0x00,0x87,0x00,0x21,0xc8 },
+ 16, 0xb090, 0, {0x0b,0x70,0x02,0x9c,0x09,0x87,0x02,0x2d,0x82,0x99,0x40,0x02,0x04,0x00,0xa5,0x09 },
+ 16, 0xb0a0, 0, {0x21,0x40,0x19,0x70,0x02,0x1c,0x00,0x87,0x05,0x25,0x48,0x4b,0x72,0x02,0x0c,0x40 },
+ 16, 0xb0b0, 0, {0x87,0x00,0xa1,0xc0,0x48,0x50,0x02,0xc4,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb0c0, 0, {0x68,0x04,0xc1,0x20,0x89,0x4c,0xa0,0xb4,0x0a,0x38,0x02,0x22,0x00,0xa1,0xd0,0x24 },
+ 16, 0xb0d0, 0, {0x30,0x09,0x80,0x02,0x27,0x44,0x81,0xc6,0x22,0x14,0x09,0x3d,0x2a,0x0f,0x02,0x8b },
+ 16, 0xb0e0, 0, {0xc0,0xa6,0x20,0x0b,0x24,0x00,0x0c,0x10,0x93,0x81,0x20,0xc0,0x48,0x30,0x06,0xd8 },
+ 16, 0xb0f0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x15,0xa1,0x00,0x89,0xc1,0x32,0xd1 },
+ 16, 0xb100, 0, {0x03,0xbc,0x03,0xa9,0x20,0x89,0x41,0x3e,0x60,0x85,0xbc,0x8b,0x25,0x40,0xeb,0x41 },
+ 16, 0xb110, 0, {0xa2,0xa0,0x0d,0xf0,0x13,0x3e,0x20,0xcf,0x90,0x36,0x30,0x4f,0xbc,0x0b,0x3c,0x00 },
+ 16, 0xb120, 0, {0xcf,0x80,0x33,0xc1,0x0c,0xb1,0x03,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb130, 0, {0x80,0x00,0xed,0x00,0xf8,0x01,0x3c,0xd0,0x0f,0xb3,0x03,0xe8,0x82,0xd8,0x20,0x36 },
+ 16, 0xb140, 0, {0x80,0x2e,0xb2,0x13,0xe1,0x00,0xfa,0x00,0x7e,0xc8,0x2e,0xb0,0x03,0xec,0x80,0xdb },
+ 16, 0xb150, 0, {0x10,0x3a,0x08,0x4f,0xb2,0x23,0xcc,0x02,0xfb,0x10,0x3a,0xc0,0x0f,0x90,0x03,0xe4 },
+ 16, 0xb160, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x10,0xf0,0x00,0xcd,0x10,0x33,0x42 },
+ 16, 0xb170, 0, {0x0c,0xca,0x23,0x7c,0x00,0xcf,0x00,0x33,0x62,0x06,0xf0,0x01,0x3a,0x00,0xcf,0x08 },
+ 16, 0xb180, 0, {0x33,0x80,0x1c,0xf0,0x81,0x3c,0x00,0xff,0x00,0x33,0xa0,0x0c,0xca,0x01,0xfc,0x04 },
+ 16, 0xb190, 0, {0xcf,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xc0,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb1a0, 0, {0xa1,0x04,0x6d,0x40,0x88,0x48,0xa2,0x31,0x08,0x10,0x02,0x20,0x10,0x88,0xb4,0x22 },
+ 16, 0xb1b0, 0, {0xa0,0x08,0x80,0x00,0x6a,0x84,0x88,0x20,0x22,0x52,0x08,0xb0,0x0a,0x2c,0x10,0xbb },
+ 16, 0xb1c0, 0, {0x00,0x32,0xb3,0x88,0x80,0x02,0xec,0x00,0xdb,0x00,0x2e,0xc0,0x0b,0x90,0x12,0xe1 },
+ 16, 0xb1d0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x10,0x8a,0x01,0x22,0xa0 },
+ 16, 0xb1e0, 0, {0x08,0xb0,0x42,0x60,0x20,0x80,0x00,0x20,0x44,0x1a,0x80,0x1a,0xe4,0x42,0xa0,0x06 },
+ 16, 0xb1f0, 0, {0x22,0x00,0x78,0x30,0x02,0xac,0x00,0xbb,0x00,0xa2,0x44,0x08,0xb0,0x12,0xec,0x00 },
+ 16, 0xb200, 0, {0x8b,0x00,0x0e,0xc0,0x0b,0x90,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb210, 0, {0x08,0x14,0x00,0x08,0x80,0x00,0x20,0x81,0x08,0x30,0x02,0x40,0x12,0x80,0x00,0xa0 },
+ 16, 0xb220, 0, {0x40,0x08,0xb0,0x02,0xc0,0x00,0x82,0x00,0x00,0x80,0x08,0x30,0x02,0x8c,0x00,0xbb },
+ 16, 0xb230, 0, {0x00,0x20,0x00,0x08,0x20,0x02,0xcc,0x80,0x93,0x00,0x2c,0xc0,0x0b,0x30,0x02,0xc2 },
+ 16, 0xb240, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xca,0x14,0x32,0x00 },
+ 16, 0xb250, 0, {0x0c,0xb0,0x03,0x4c,0x00,0xca,0x00,0x32,0x00,0x0e,0x00,0x12,0xa0,0x00,0xc0,0x00 },
+ 16, 0xb260, 0, {0x70,0x00,0x28,0xf0,0x13,0xac,0x00,0xfb,0x00,0x32,0x40,0x2c,0x10,0x43,0xec,0x00 },
+ 16, 0xb270, 0, {0xcf,0x00,0x3f,0xc0,0x0f,0x90,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb280, 0, {0x20,0x15,0xf0,0x02,0xfc,0x00,0x1f,0x00,0x67,0x70,0x03,0xb0,0x00,0xfc,0x00,0x3f },
+ 16, 0xb290, 0, {0x00,0x2d,0xc0,0x03,0x30,0x10,0xfc,0x01,0xbf,0x00,0x0f,0x70,0x03,0x7c,0x00,0xf7 },
+ 16, 0xb2a0, 0, {0x04,0x3b,0x00,0x0f,0xc0,0x13,0xfd,0x10,0xff,0x00,0x3d,0xc0,0x0f,0xf0,0x03,0xe8 },
+ 16, 0xb2b0, 0, {0x12,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf4,0xc0,0xcf,0x80,0x33,0x60 },
+ 16, 0xb2c0, 0, {0x0e,0xc9,0x13,0x36,0x50,0xce,0x86,0x3f,0x08,0x0c,0xc0,0x03,0x3e,0x02,0xd7,0x80 },
+ 16, 0xb2d0, 0, {0x39,0xe0,0x0f,0xf8,0x13,0x3e,0x40,0xc7,0x30,0x3b,0xce,0x0d,0xf6,0x03,0x3d,0x88 },
+ 16, 0xb2e0, 0, {0xcf,0x31,0x33,0xe4,0x0f,0x78,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb2f0, 0, {0x80,0x10,0xe5,0xd0,0xdb,0x80,0x72,0x60,0x88,0x92,0x02,0xe4,0x10,0x8a,0x80,0x2e },
+ 16, 0xb300, 0, {0x34,0x4a,0x8c,0x03,0x2e,0x00,0xab,0x80,0x02,0xe0,0x0b,0xb8,0x02,0x2c,0x80,0x8f },
+ 16, 0xb310, 0, {0x60,0x13,0xd8,0x4a,0x76,0x02,0x9d,0x84,0xaf,0x30,0x22,0x48,0x0b,0x88,0x12,0xa0 },
+ 16, 0xb320, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc4,0x00,0x8b,0x00,0x24,0x00 },
+ 16, 0xb330, 0, {0x4a,0x00,0x02,0xac,0x80,0x83,0x00,0x2c,0x01,0x28,0x04,0x02,0xac,0x00,0x8b,0x01 },
+ 16, 0xb340, 0, {0x20,0xc0,0x03,0xb0,0x02,0x0c,0x80,0x83,0x40,0x20,0xc1,0xa8,0x34,0x22,0x8d,0x13 },
+ 16, 0xb350, 0, {0x83,0x20,0xac,0xc8,0x0b,0xb0,0x02,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb360, 0, {0xc0,0x15,0x86,0x00,0x9b,0x04,0xae,0x00,0x0a,0x90,0x02,0xec,0x00,0x0b,0x14,0x2e },
+ 16, 0xb370, 0, {0xc6,0x02,0xb1,0x12,0x6c,0x00,0xab,0x20,0x2a,0xc1,0x0b,0xb0,0x42,0x2c,0x00,0x8b },
+ 16, 0xb380, 0, {0x02,0x26,0xc1,0x0a,0xb0,0x02,0xac,0x00,0xab,0x04,0x2a,0x40,0x0b,0x90,0x02,0xf0 },
+ 16, 0xb390, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0xe7,0x00,0xc3,0x01,0x36,0x40 },
+ 16, 0xb3a0, 0, {0x0e,0x88,0x13,0x24,0x02,0xca,0x00,0x1e,0x20,0x2c,0x8e,0x0b,0x2c,0x00,0xcb,0x00 },
+ 16, 0xb3b0, 0, {0x2a,0xc0,0x0f,0xb8,0x03,0x2e,0x06,0xcb,0x00,0x3a,0xc0,0x4c,0xb0,0x13,0xac,0x0c },
+ 16, 0xb3c0, 0, {0xcb,0x00,0x3e,0xc8,0x0f,0xb0,0x43,0x50,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb3d0, 0, {0xe0,0x01,0xb4,0x08,0xff,0x91,0x33,0x40,0x09,0xdc,0x01,0xf4,0x20,0x7e,0x02,0x2e },
+ 16, 0xb3e0, 0, {0x40,0x0d,0x98,0x01,0xbc,0x80,0xef,0x80,0xb7,0xe4,0x8f,0xf4,0x0b,0xfe,0x40,0x7f },
+ 16, 0xb3f0, 0, {0x00,0xb9,0xc0,0x4e,0xf0,0x03,0xfc,0x08,0xf7,0x00,0x37,0xc0,0x0f,0xe0,0x02,0xb8 },
+ 16, 0xb400, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa1,0x44,0xcb,0x02,0x32,0x00 },
+ 16, 0xb410, 0, {0x0d,0x80,0x0a,0x6d,0x00,0xeb,0x04,0x10,0x90,0x28,0x22,0x0b,0x2c,0xc2,0xcb,0x20 },
+ 16, 0xb420, 0, {0x76,0xc0,0x0e,0xb1,0x03,0xec,0x01,0xcb,0x06,0x32,0xc1,0x0c,0x30,0x03,0x2c,0x02 },
+ 16, 0xb430, 0, {0xcb,0x00,0x3e,0xd0,0x0c,0xb0,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb440, 0, {0xc8,0x05,0x21,0x48,0xab,0x00,0x20,0x00,0x00,0x95,0x23,0x4c,0x08,0xbb,0x01,0x22 },
+ 16, 0xb450, 0, {0xc0,0x08,0xb2,0x02,0x0c,0x08,0x83,0x88,0x92,0xd5,0x28,0x34,0x02,0xec,0x02,0x8f },
+ 16, 0xb460, 0, {0x20,0x23,0xc0,0x4d,0xf0,0x01,0x7c,0x00,0xdf,0x00,0x2e,0xc0,0x0d,0x30,0x03,0x72 },
+ 16, 0xb470, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x44,0x00,0x83,0x10,0x20,0x60 },
+ 16, 0xb480, 0, {0x09,0x25,0x02,0x00,0x08,0xa0,0x00,0x4c,0x00,0x0b,0x0c,0x22,0x4f,0x12,0x93,0x40 },
+ 16, 0xb490, 0, {0x00,0xc0,0x09,0x3e,0x02,0xec,0x00,0xab,0x80,0xa4,0xc0,0x09,0x30,0x22,0x2c,0x08 },
+ 16, 0xb4a0, 0, {0xb3,0x01,0x0c,0x81,0x08,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb4b0, 0, {0x60,0x01,0x16,0x09,0xb7,0x80,0x21,0x64,0x08,0x78,0x06,0x12,0x00,0xb4,0x82,0x2d },
+ 16, 0xb4c0, 0, {0xa4,0x1b,0x69,0x06,0x7e,0x04,0x17,0x92,0x25,0xe6,0x09,0x78,0x06,0xde,0x80,0xa7 },
+ 16, 0xb4d0, 0, {0x90,0x25,0xe0,0x09,0x79,0x50,0x5e,0x04,0xb7,0x92,0x2f,0x61,0x09,0xc8,0x02,0x48 },
+ 16, 0xb4e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x25,0x00,0xc3,0x00,0xb0,0x03 },
+ 16, 0xb4f0, 0, {0x0d,0xa3,0x42,0x09,0x40,0xe1,0x00,0xbc,0x40,0x0f,0x11,0x03,0x4c,0x00,0x13,0x00 },
+ 16, 0xb500, 0, {0x20,0xc0,0x09,0x32,0x03,0xcc,0x10,0xa3,0x00,0x26,0xc4,0x8d,0x30,0x2b,0x0c,0x80 },
+ 16, 0xb510, 0, {0xf3,0x00,0x7c,0x80,0x0c,0x30,0x01,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb520, 0, {0x40,0x1d,0xbc,0x00,0xe7,0x10,0x3d,0x01,0x2f,0xf1,0x42,0xe8,0x00,0xf5,0x90,0x03 },
+ 16, 0xb530, 0, {0xc1,0x0c,0xf1,0x43,0x9c,0x04,0xef,0x08,0x3b,0xc2,0x0c,0xf0,0x81,0xdc,0xa0,0xdf },
+ 16, 0xb540, 0, {0x00,0x3b,0xc3,0x3f,0xf0,0x83,0xfc,0x05,0xdf,0x0c,0x3d,0x40,0x0f,0xd1,0x03,0xd0 },
+ 16, 0xb550, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xf4,0x00,0xcb,0x80,0x30,0x40 },
+ 16, 0xb560, 0, {0x2c,0xa0,0x03,0xe0,0x00,0xf8,0x80,0x32,0xc0,0x2e,0xb8,0x0b,0x2c,0x46,0xd3,0x00 },
+ 16, 0xb570, 0, {0x30,0xc0,0x0c,0x30,0x03,0x0c,0x00,0xdb,0x48,0x32,0xc0,0x1f,0xb4,0x03,0x2c,0x88 },
+ 16, 0xb580, 0, {0xcb,0x48,0x32,0x80,0x0c,0x30,0x13,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb590, 0, {0x48,0x11,0xb4,0x00,0x87,0x01,0x21,0x40,0x08,0x70,0x42,0xd0,0x08,0xb4,0x00,0x29 },
+ 16, 0xb5a0, 0, {0xc0,0x08,0x70,0x02,0x1c,0x00,0x87,0x00,0x21,0xc8,0x0c,0x72,0x0a,0x1c,0x84,0x8f },
+ 16, 0xb5b0, 0, {0x40,0x09,0xc4,0x8f,0x73,0x12,0x9c,0x40,0x83,0x20,0x21,0xc0,0x08,0x60,0x02,0x92 },
+ 16, 0xb5c0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x96,0x01,0xaf,0x80,0x21,0x20 },
+ 16, 0xb5d0, 0, {0x08,0x68,0x02,0xda,0x00,0xbd,0x80,0x21,0xe0,0x09,0x78,0x02,0x1e,0x00,0x8f,0x88 },
+ 16, 0xb5e0, 0, {0x83,0xe2,0x29,0xf8,0x82,0x5f,0x80,0x87,0xa0,0x25,0xe0,0x0b,0x3a,0x12,0x0e,0x50 },
+ 16, 0xb5f0, 0, {0x97,0xa4,0x21,0xa0,0x29,0x78,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb600, 0, {0x08,0x14,0xcc,0x02,0xa1,0x81,0x00,0x00,0x48,0x70,0x02,0xc8,0x00,0xb1,0x00,0x2c },
+ 16, 0xb610, 0, {0xf8,0x09,0x31,0x42,0x0c,0x10,0x83,0x00,0x20,0xe0,0x08,0x38,0x12,0x4e,0x00,0x83 },
+ 16, 0xb620, 0, {0x00,0x6a,0xc0,0x0b,0x30,0x02,0x8c,0x04,0x93,0x00,0x20,0xe0,0x09,0x38,0x02,0x92 },
+ 16, 0xb630, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb9,0x40,0xee,0x20,0x30,0x80 },
+ 16, 0xb640, 0, {0x0c,0xa0,0x03,0xe8,0x00,0xfa,0x00,0x33,0xb0,0x0d,0xe4,0x03,0x32,0x88,0xcc,0x80 },
+ 16, 0xb650, 0, {0x23,0x00,0x0d,0xc0,0x03,0x62,0x02,0xca,0x00,0x36,0x80,0x0f,0xa0,0x43,0x28,0x06 },
+ 16, 0xb660, 0, {0xda,0x00,0x33,0xa0,0x0d,0x6a,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb670, 0, {0x48,0x00,0xe0,0x00,0x98,0x01,0xbe,0x00,0x0f,0x80,0x03,0xf0,0x00,0xbc,0x00,0x38 },
+ 16, 0xb680, 0, {0x04,0x08,0x80,0xa3,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x13,0xa0,0x00,0xe0 },
+ 16, 0xb690, 0, {0x00,0x3e,0x00,0x0e,0x00,0x03,0xc0,0x00,0xe8,0x00,0xbe,0x04,0x4e,0x80,0x07,0xd2 },
+ 16, 0xb6a0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x80,0xc9,0x00,0x3e,0x68 },
+ 16, 0xb6b0, 0, {0x0c,0x90,0x03,0x64,0x00,0xc9,0x00,0x3e,0x40,0x0c,0x90,0x43,0xe0,0x00,0xc8,0x00 },
+ 16, 0xb6c0, 0, {0x32,0x00,0x0c,0x80,0x13,0x20,0x00,0xc9,0x00,0x36,0x40,0x0c,0x90,0x03,0x64,0x00 },
+ 16, 0xb6d0, 0, {0x81,0x00,0x32,0x40,0x04,0x90,0x13,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb6e0, 0, {0x80,0x04,0x65,0x06,0x89,0x40,0x2e,0x60,0x1a,0x14,0x2a,0x05,0x20,0x89,0x00,0x2e },
+ 16, 0xb6f0, 0, {0x40,0x08,0x90,0x02,0xc4,0x08,0xc1,0x02,0x20,0x40,0x08,0x10,0x1a,0x24,0x00,0x89 },
+ 16, 0xb700, 0, {0x10,0x32,0x41,0x08,0x90,0x12,0x24,0x00,0x89,0x04,0x36,0x40,0x88,0x94,0x0a,0x20 },
+ 16, 0xb710, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x04,0x20,0x89,0x55,0x2e,0x40 },
+ 16, 0xb720, 0, {0x08,0xd5,0x02,0x34,0x00,0x8d,0x00,0x2e,0x40,0x18,0x90,0x02,0xe4,0x00,0x99,0x00 },
+ 16, 0xb730, 0, {0x26,0x40,0x08,0x90,0x02,0x04,0x0a,0x89,0x00,0x26,0x40,0x38,0x90,0x0a,0x24,0x00 },
+ 16, 0xb740, 0, {0xa9,0x00,0x20,0x40,0x0a,0x90,0x82,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb750, 0, {0x08,0x04,0x05,0x00,0x81,0x00,0x2f,0x40,0x0a,0xd4,0x02,0x34,0x00,0x85,0x01,0x2c },
+ 16, 0xb760, 0, {0x40,0x08,0x10,0x42,0xe4,0x06,0x99,0x00,0x22,0x40,0x08,0x10,0x02,0x05,0x00,0x81 },
+ 16, 0xb770, 0, {0x40,0x28,0x50,0x08,0x14,0x12,0x05,0x00,0xa1,0x40,0x24,0x50,0x5a,0x10,0x02,0x02 },
+ 16, 0xb780, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xc8,0x04,0x3e,0x00 },
+ 16, 0xb790, 0, {0x08,0x80,0x03,0x21,0x42,0xcc,0x00,0x3e,0x00,0x2c,0x80,0x02,0xe0,0x00,0xd8,0x00 },
+ 16, 0xb7a0, 0, {0xb6,0x00,0x2c,0x80,0x02,0x20,0x02,0xc8,0x00,0x36,0x00,0x0c,0x80,0x03,0x60,0x02 },
+ 16, 0xb7b0, 0, {0xe8,0x00,0x32,0x00,0x8e,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb7c0, 0, {0x98,0x1d,0xf5,0x00,0xf5,0x00,0x3e,0x40,0x87,0x90,0x03,0xe4,0x00,0xf1,0x00,0x3d },
+ 16, 0xb7d0, 0, {0x50,0x0f,0x54,0x03,0xd1,0x00,0xec,0x40,0x3f,0x10,0x0b,0xc4,0x43,0xf1,0x00,0xf9 },
+ 16, 0xb7e0, 0, {0x40,0x36,0x50,0x0f,0x94,0x13,0xe5,0x10,0xd9,0x44,0x3d,0x40,0x2d,0xd0,0x03,0xe6 },
+ 16, 0xb7f0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x60,0xcd,0x02,0x3b,0x40 },
+ 16, 0xb800, 0, {0x0c,0xd0,0x03,0xb4,0x40,0xfd,0x06,0x3e,0x40,0x0c,0x90,0x03,0x66,0x04,0xc9,0x82 },
+ 16, 0xb810, 0, {0xb6,0x62,0x0f,0x18,0x0b,0x36,0x00,0xcd,0x40,0x32,0x61,0x0c,0x90,0x23,0x24,0x0a },
+ 16, 0xb820, 0, {0xc9,0x00,0x32,0x40,0x4c,0xd0,0x43,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb830, 0, {0x39,0x10,0xe3,0x80,0xd8,0x00,0x22,0x00,0x0d,0x80,0x02,0x22,0x94,0xb8,0x00,0x2e },
+ 16, 0xb840, 0, {0x00,0x0d,0x80,0x03,0x21,0x00,0x88,0x40,0x22,0x00,0x0b,0xc4,0x22,0x21,0x50,0x88 },
+ 16, 0xb850, 0, {0x80,0x22,0x22,0x08,0x80,0x02,0x20,0x10,0x80,0x01,0x2a,0x00,0x0a,0x80,0x03,0x4e },
+ 16, 0xb860, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xc6,0x00,0x89,0x00,0x2a,0x40 },
+ 16, 0xb870, 0, {0x88,0x10,0x0a,0x84,0x08,0xb1,0x00,0x29,0x40,0x0a,0x70,0x0a,0xb5,0x00,0x8f,0x40 },
+ 16, 0xb880, 0, {0x29,0xc0,0x0b,0xf4,0x02,0x24,0x00,0x81,0x20,0x28,0x44,0x89,0x10,0x02,0x04,0x04 },
+ 16, 0xb890, 0, {0x81,0x02,0x2a,0x40,0x08,0x10,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb8a0, 0, {0x18,0x15,0xa6,0x00,0x99,0x20,0x22,0x40,0x09,0x90,0x12,0x24,0x80,0xb9,0x00,0x2f },
+ 16, 0xb8b0, 0, {0x44,0x03,0xd0,0x02,0xf4,0x00,0x8d,0x00,0x2b,0x41,0x0b,0xd0,0x02,0x26,0x10,0x89 },
+ 16, 0xb8c0, 0, {0x04,0x2a,0x40,0x09,0x90,0x6e,0x24,0x00,0x89,0x00,0x2a,0x40,0x0a,0x94,0x02,0x46 },
+ 16, 0xb8d0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0x15,0xe6,0x00,0xc9,0x00,0x38,0x42 },
+ 16, 0xb8e0, 0, {0x0c,0x10,0x13,0xa6,0x04,0x79,0x08,0x3a,0x78,0x06,0x92,0x03,0xa4,0x08,0xc9,0x00 },
+ 16, 0xb8f0, 0, {0x3a,0x60,0x8f,0x98,0x23,0x06,0x02,0xc9,0x02,0x3a,0x40,0x0d,0x90,0x03,0x04,0x00 },
+ 16, 0xb900, 0, {0xc9,0x00,0x38,0x40,0x0c,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb910, 0, {0x28,0x01,0x84,0x10,0xf9,0x80,0xbe,0x40,0x4f,0x90,0x02,0xe4,0x00,0xf9,0x00,0x3c },
+ 16, 0xb920, 0, {0x60,0x8d,0x92,0x03,0x24,0x42,0xe9,0x10,0x32,0x50,0x0f,0x94,0x03,0xe4,0x00,0xf9 },
+ 16, 0xb930, 0, {0x00,0xb6,0x41,0x2e,0x10,0x03,0xe4,0x00,0xf9,0x00,0x2e,0x40,0x0f,0x90,0x03,0xca },
+ 16, 0xb940, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x08,0xc8,0x00,0x3e,0x10 },
+ 16, 0xb950, 0, {0x0f,0x88,0x03,0x20,0x08,0xf8,0xc0,0x1e,0x10,0x2c,0x40,0x03,0xf2,0x00,0xcc,0x00 },
+ 16, 0xb960, 0, {0x3f,0x00,0x0c,0xc0,0x13,0x20,0x02,0xc0,0x00,0x30,0x00,0x0c,0x80,0x2b,0x20,0x10 },
+ 16, 0xb970, 0, {0xc0,0x04,0x32,0x00,0x0f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb980, 0, {0xa8,0x05,0x3a,0x80,0x86,0xe0,0x2f,0xa0,0x1b,0xe0,0x02,0x3a,0x80,0xba,0x04,0x2e },
+ 16, 0xb990, 0, {0x80,0x08,0xa0,0x03,0x88,0x08,0xc2,0x00,0x2e,0x81,0x08,0x60,0x02,0x28,0x10,0x8e },
+ 16, 0xb9a0, 0, {0x81,0x03,0x80,0x08,0xe0,0x01,0x78,0x00,0x8e,0x04,0x03,0x80,0x09,0x68,0x03,0xca },
+ 16, 0xb9b0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x83,0x60,0x2c,0x44 },
+ 16, 0xb9c0, 0, {0x0b,0x38,0x02,0x0f,0x80,0xb1,0x00,0x2c,0xe5,0x03,0x30,0x10,0xcc,0x10,0x83,0x00 },
+ 16, 0xb9d0, 0, {0x0c,0xc0,0x29,0x30,0x22,0x04,0x09,0x91,0x10,0x24,0xc0,0xc8,0x30,0x00,0x4c,0x04 },
+ 16, 0xb9e0, 0, {0x93,0x02,0x24,0xc0,0x0b,0x31,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xb9f0, 0, {0xe0,0x01,0x18,0x80,0x87,0x00,0x2d,0x40,0x0b,0x74,0x42,0x1c,0x01,0xb5,0x01,0x2c },
+ 16, 0xba00, 0, {0xc0,0x0b,0x60,0x02,0xb0,0x00,0x94,0x04,0x2f,0x20,0x09,0xc0,0x02,0x14,0x90,0x97 },
+ 16, 0xba10, 0, {0x00,0x25,0xc8,0x08,0x70,0x02,0x4c,0x80,0x97,0x20,0x25,0xc0,0x09,0x70,0x02,0xe8 },
+ 16, 0xba20, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3a,0x82,0xc6,0x80,0x2d,0x60 },
+ 16, 0xba30, 0, {0x0b,0xf8,0x0b,0x1a,0x00,0xf5,0x80,0x3d,0xe0,0x8f,0x78,0x03,0xde,0x02,0xc7,0x80 },
+ 16, 0xba40, 0, {0x2d,0xe0,0x0d,0x78,0x0b,0x17,0x02,0xdf,0x80,0x24,0xf8,0x2c,0xfd,0x03,0x5e,0x0c },
+ 16, 0xba50, 0, {0xd7,0xe0,0x35,0xe0,0x0f,0x68,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xba60, 0, {0x48,0x1d,0xae,0x40,0xfa,0x04,0x3e,0x40,0x0f,0x80,0x13,0xec,0x04,0xf9,0x00,0x3e },
+ 16, 0xba70, 0, {0xc1,0x0c,0xa0,0x13,0xc0,0x10,0xe8,0x00,0x3c,0x00,0x4e,0x80,0x43,0xc4,0x20,0x89 },
+ 16, 0xba80, 0, {0x00,0xba,0xc0,0x07,0xb6,0x21,0xed,0x06,0xeb,0x68,0xba,0xcc,0x0f,0x20,0x13,0xc2 },
+ 16, 0xba90, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xbe,0x00,0xc6,0x80,0x31,0x60 },
+ 16, 0xbaa0, 0, {0x2d,0x78,0x0b,0x3e,0x48,0xec,0x92,0x3d,0x60,0x0c,0x58,0x03,0x5a,0x40,0xd5,0x80 },
+ 16, 0xbab0, 0, {0x31,0x61,0x0c,0x58,0x23,0x36,0x00,0xcf,0x82,0x3f,0xe0,0x0c,0xf8,0x03,0xff,0x60 },
+ 16, 0xbac0, 0, {0xcf,0x90,0x33,0xf0,0x0c,0x52,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbad0, 0, {0xa8,0x11,0xb8,0x84,0x86,0x14,0xb5,0xc0,0x08,0x70,0x02,0x1e,0xc0,0xc4,0x00,0x2d },
+ 16, 0xbae0, 0, {0x40,0x08,0x40,0x02,0x14,0xd0,0x86,0x10,0x21,0x80,0x4c,0x62,0x42,0x34,0x40,0xa5 },
+ 16, 0xbaf0, 0, {0x00,0x35,0xc0,0x28,0x70,0x42,0xdc,0xc2,0x8f,0x30,0x23,0xc0,0x08,0x50,0x02,0x2a },
+ 16, 0xbb00, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x98,0x28,0x8e,0x00,0xa5,0x40 },
+ 16, 0xbb10, 0, {0x08,0xf1,0x02,0x18,0x64,0xb4,0x00,0x6d,0x42,0x08,0x50,0x02,0x18,0x01,0x85,0x08 },
+ 16, 0xbb20, 0, {0x21,0x40,0x09,0x58,0x22,0x54,0x00,0x85,0x10,0x2d,0xc4,0x09,0x70,0x02,0xdc,0x04 },
+ 16, 0xbb30, 0, {0x97,0x00,0x25,0xc0,0x08,0x44,0x02,0x00,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbb40, 0, {0x60,0x14,0x8c,0x00,0x82,0x80,0x24,0xc0,0x08,0x80,0x02,0x2d,0x00,0x80,0x4a,0x2c },
+ 16, 0xbb50, 0, {0x42,0x08,0x0a,0x42,0x06,0x00,0x92,0x84,0x20,0xa0,0x88,0x28,0x42,0x44,0x00,0xa3 },
+ 16, 0xbb60, 0, {0x06,0x24,0xc0,0x0b,0x30,0x02,0xcc,0x10,0x93,0x04,0x24,0xc1,0x09,0x00,0x02,0x08 },
+ 16, 0xbb70, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xcb,0x00,0x36,0x40 },
+ 16, 0xbb80, 0, {0x0c,0xb4,0x13,0x2c,0x00,0xf9,0x00,0x3e,0xa0,0x0c,0xa2,0x03,0x04,0x08,0xc2,0x80 },
+ 16, 0xbb90, 0, {0x30,0xa8,0x0d,0x2a,0x03,0x54,0x00,0xcb,0x00,0x3f,0xc0,0x0d,0xf0,0x03,0xfc,0x08 },
+ 16, 0xbba0, 0, {0xdf,0x00,0x37,0xd0,0x0c,0xb0,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbbb0, 0, {0x80,0x00,0xe0,0x00,0xfb,0x10,0x3a,0x40,0x0e,0xb0,0x03,0xed,0x90,0xf9,0x11,0x7e },
+ 16, 0xbbc0, 0, {0x80,0x4f,0xb0,0x53,0xe8,0x40,0xe9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xa6,0x08,0xf9 },
+ 16, 0xbbd0, 0, {0x01,0x3a,0xc0,0x0c,0xb0,0x13,0xcc,0x00,0xeb,0x02,0x3a,0xc6,0x8e,0xb8,0x03,0xe0 },
+ 16, 0xbbe0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x0c,0xce,0x00,0x3f,0xe0 },
+ 16, 0xbbf0, 0, {0x2c,0xf0,0x83,0x3a,0x48,0xcd,0x01,0x35,0x80,0x0c,0x60,0x12,0x34,0x0a,0xce,0x00 },
+ 16, 0xbc00, 0, {0xb3,0x80,0x2c,0xe0,0x0b,0x74,0x00,0xc9,0x10,0xb3,0xc1,0x0f,0xf0,0x1b,0x3c,0x00 },
+ 16, 0xbc10, 0, {0xcf,0x00,0xb7,0xc0,0x2c,0xe0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbc20, 0, {0x81,0x04,0x6e,0x10,0x88,0x80,0x2c,0xc0,0x18,0x98,0x02,0x2d,0x80,0x81,0x00,0x36 },
+ 16, 0xbc30, 0, {0x91,0x08,0xb0,0x03,0x68,0x00,0xc9,0x00,0x22,0x40,0x08,0x90,0x02,0x24,0x00,0x83 },
+ 16, 0xbc40, 0, {0x80,0x36,0xc0,0x0b,0x30,0x02,0x2c,0x02,0x83,0x00,0x20,0xc0,0x08,0x20,0x03,0x60 },
+ 16, 0xbc50, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x06,0x00,0x8a,0x80,0x2e,0x45 },
+ 16, 0xbc60, 0, {0x28,0x88,0x02,0x24,0x02,0x88,0x02,0x02,0x02,0x08,0x80,0x02,0xa2,0x00,0x98,0x00 },
+ 16, 0xbc70, 0, {0x22,0x00,0x08,0x80,0x12,0x24,0x00,0x89,0x01,0x22,0xc1,0x0a,0xb0,0x02,0x6c,0x00 },
+ 16, 0xbc80, 0, {0xab,0x00,0x22,0xc1,0x08,0x90,0x12,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbc90, 0, {0x08,0x04,0x00,0x00,0x80,0x00,0x2c,0xc0,0x48,0x08,0x12,0x00,0x80,0x80,0x02,0x24 },
+ 16, 0xbca0, 0, {0x00,0x08,0x18,0x42,0xac,0x02,0x8b,0x80,0x22,0xe0,0x08,0xb8,0x12,0x04,0x02,0x83 },
+ 16, 0xbcb0, 0, {0x00,0x20,0xc0,0x0b,0x30,0x42,0x0c,0x00,0xa3,0x01,0x60,0xc0,0x48,0x10,0x02,0x42 },
+ 16, 0xbcc0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x68,0x08,0xca,0x00,0x2e,0x40 },
+ 16, 0xbcd0, 0, {0x08,0x80,0x03,0x00,0x00,0xc8,0x06,0x32,0x00,0x0c,0x80,0x02,0xa0,0x00,0xd8,0x00 },
+ 16, 0xbce0, 0, {0x32,0x00,0x0c,0x80,0x03,0x74,0x00,0xcb,0x00,0x22,0xc0,0x0f,0xf0,0x03,0x3c,0x00 },
+ 16, 0xbcf0, 0, {0xef,0x00,0x37,0xc0,0x0c,0x80,0x01,0x40,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbd00, 0, {0xa0,0x19,0xfc,0x00,0xfc,0x04,0x3f,0xc0,0x0f,0xc0,0x03,0xe1,0x00,0xfc,0x00,0x3b },
+ 16, 0xbd10, 0, {0x00,0x0f,0xd0,0x03,0x7c,0x00,0xef,0x00,0x2f,0xc0,0x0f,0xf0,0x11,0xf4,0x10,0xfd },
+ 16, 0xbd20, 0, {0x02,0x3d,0xc0,0x4f,0xf0,0x03,0xdc,0x00,0xdf,0x04,0x3f,0xc0,0x0f,0xc0,0x43,0xe9 },
+ 16, 0xbd30, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x41,0x02,0x70,0x20,0xdc,0x10 },
+ 16, 0xbd40, 0, {0x67,0x04,0x0d,0xc1,0x02,0x70,0x20,0x9c,0x10,0x37,0x04,0x0d,0xc1,0x06,0x70,0x40 },
+ 16, 0xbd50, 0, {0x4c,0x10,0x37,0x14,0x15,0xc1,0x03,0x70,0x40,0xdc,0x10,0x13,0x04,0x0d,0xc1,0x07 },
+ 16, 0xbd60, 0, {0x70,0x40,0xdc,0x10,0x37,0x04,0x0d,0xc0,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbd70, 0, {0x00,0xc5,0x44,0x05,0x71,0x21,0x5c,0x40,0x57,0x10,0x15,0xc4,0x05,0x71,0x05,0x5c },
+ 16, 0xbd80, 0, {0x40,0x57,0x10,0x15,0xc4,0x06,0x71,0x01,0x4c,0x40,0x57,0x10,0x0d,0xc4,0x05,0x71 },
+ 16, 0xbd90, 0, {0x05,0x5c,0x40,0x53,0x10,0x15,0xc4,0x07,0x71,0x01,0x5c,0x40,0x57,0x10,0x15,0xc0 },
+ 16, 0xbda0, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x01,0x20,0x80,0x48,0x20 },
+ 16, 0xbdb0, 0, {0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80 },
+ 16, 0xbdc0, 0, {0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01 },
+ 16, 0xbdd0, 0, {0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbde0, 0, {0x00,0x84,0x00,0x01,0x60,0x00,0x58,0x00,0x56,0x00,0x05,0x80,0x01,0x60,0x04,0x58 },
+ 16, 0xbdf0, 0, {0x00,0x16,0x00,0x05,0x80,0x01,0x20,0x01,0x58,0x00,0x16,0x00,0x05,0x80,0x01,0x60 },
+ 16, 0xbe00, 0, {0x00,0x58,0x00,0x56,0x00,0x05,0x80,0x01,0x60,0x00,0x58,0x00,0x16,0x00,0x01,0x80 },
+ 16, 0xbe10, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x48,0x05,0x72,0x11,0x5c,0x80 },
+ 16, 0xbe20, 0, {0x17,0x20,0x15,0xd8,0x05,0x32,0x11,0x1c,0x80,0x47,0x20,0x14,0x88,0x00,0x72,0x01 },
+ 16, 0xbe30, 0, {0x1c,0x80,0x57,0x20,0x05,0xc8,0x04,0x72,0x01,0x5c,0x80,0x57,0x20,0x15,0xc8,0x01 },
+ 16, 0xbe40, 0, {0x72,0x01,0x5c,0x80,0x57,0x24,0x15,0xc0,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbe50, 0, {0x00,0xc1,0x40,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x40,0x20,0x00,0x18 },
+ 16, 0xbe60, 0, {0x00,0x06,0x00,0x01,0x90,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x41,0x80,0x00,0x60 },
+ 16, 0xbe70, 0, {0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x00,0x18,0x10,0x06,0x00,0x01,0x80 },
+ 16, 0xbe80, 0, {0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x48,0x04,0x22,0x01,0x08,0x80 },
+ 16, 0xbe90, 0, {0x02,0x20,0x10,0x88,0x04,0x62,0x01,0x08,0x80,0x42,0x20,0x10,0x88,0x00,0x20,0x01 },
+ 16, 0xbea0, 0, {0x08,0x80,0x42,0x20,0x00,0x88,0x04,0x22,0x01,0x08,0x00,0x42,0x20,0x10,0x88,0x00 },
+ 16, 0xbeb0, 0, {0x22,0x01,0x08,0x80,0x42,0x30,0x10,0x80,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbec0, 0, {0x00,0xc5,0x4a,0x05,0x42,0x81,0x50,0xa0,0x04,0x28,0x15,0x0a,0x05,0x52,0x81,0x10 },
+ 16, 0xbed0, 0, {0xa0,0x44,0x28,0x11,0x1a,0x00,0x40,0x80,0x10,0xa0,0x54,0x28,0x05,0x0a,0x05,0x42 },
+ 16, 0xbee0, 0, {0x81,0x51,0x20,0x14,0x28,0x15,0x0a,0x01,0x42,0x81,0x50,0xa0,0x54,0x28,0x15,0x00 },
+ 16, 0xbef0, 0, {0x31,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0c,0x01,0x53,0x40,0x54,0xc0 },
+ 16, 0xbf00, 0, {0x15,0x30,0x05,0x5c,0x01,0x57,0x40,0x54,0xc0,0x15,0x30,0x05,0x5c,0x01,0x53,0x00 },
+ 16, 0xbf10, 0, {0x55,0xc0,0x15,0x74,0x05,0x4c,0x01,0x53,0x00,0x55,0xc0,0x15,0x74,0x05,0x4c,0x01 },
+ 16, 0xbf20, 0, {0x53,0x00,0x54,0xc0,0x11,0x30,0x01,0x40,0x21,0x10,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbf30, 0, {0x00,0x80,0x00,0x00,0x40,0x00,0x10,0x00,0x04,0x00,0x01,0x00,0x00,0x40,0x00,0x10 },
+ 16, 0xbf40, 0, {0x00,0x04,0x00,0x01,0x00,0x00,0x42,0x00,0x10,0x00,0x04,0x00,0x11,0x00,0x00,0x40 },
+ 16, 0xbf50, 0, {0x00,0x10,0xc1,0x04,0x00,0x01,0x00,0x00,0x40,0x00,0x10,0x00,0x01,0x10,0x01,0x01 },
+ 16, 0xbf60, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x60,0x02,0x08,0x00,0x82,0x00 },
+ 16, 0xbf70, 0, {0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00 },
+ 16, 0xbf80, 0, {0x82,0x00,0x20,0x84,0x00,0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x84,0x08,0x20,0x02 },
+ 16, 0xbf90, 0, {0x08,0x00,0x82,0x00,0x21,0x80,0x08,0x01,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xbfa0, 0, {0x00,0xc5,0x40,0x05,0x60,0x01,0x58,0x00,0x96,0x00,0x15,0x90,0x05,0x64,0x02,0x58 },
+ 16, 0xbfb0, 0, {0x00,0x56,0x00,0x55,0x90,0x05,0x60,0x01,0xd9,0x00,0x16,0x40,0x15,0x80,0x05,0x60 },
+ 16, 0xbfc0, 0, {0x01,0x59,0x00,0x76,0x40,0x15,0x80,0x05,0x60,0x01,0x58,0x00,0x56,0x00,0x15,0x80 },
+ 16, 0xbfd0, 0, {0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0x40,0x03,0x60,0x00,0xd8,0x00 },
+ 16, 0xbfe0, 0, {0x36,0x00,0x4d,0x80,0x03,0x60,0x00,0xd8,0x00,0x36,0x00,0x0d,0x80,0x07,0x62,0x00 },
+ 16, 0xbff0, 0, {0x58,0x00,0x36,0x00,0x0d,0x80,0x07,0x60,0x00,0xd8,0x80,0x16,0x00,0x0d,0x80,0x03 },
+ 16, 0xc000, 0, {0x60,0x00,0xd8,0x00,0x36,0x00,0x1d,0x80,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc010, 0, {0x00,0xc5,0x42,0x04,0x30,0x81,0x0c,0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c },
+ 16, 0xc020, 0, {0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0xc1,0x0c,0x20,0x43,0x08,0x10,0xc2,0x06,0x30 },
+ 16, 0xc030, 0, {0x81,0x0c,0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c,0x20,0x43,0x08,0x18,0xc0 },
+ 16, 0xc040, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x30,0x00,0x0c,0x00 },
+ 16, 0xc050, 0, {0x03,0x00,0x00,0xc0,0x00,0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x40,0x30,0x00 },
+ 16, 0xc060, 0, {0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x00 },
+ 16, 0xc070, 0, {0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc080, 0, {0x00,0x80,0x02,0x01,0x30,0x80,0x4c,0x20,0x13,0x08,0x04,0xc2,0x01,0x30,0x80,0x4c },
+ 16, 0xc090, 0, {0x20,0x13,0x08,0x04,0xc2,0x25,0x30,0x81,0x4c,0x20,0x13,0x08,0x04,0xc2,0x01,0x30 },
+ 16, 0xc0a0, 0, {0x80,0x4c,0x32,0x53,0x08,0x04,0xc2,0x01,0x30,0x80,0x4c,0x20,0x13,0x08,0x04,0xc0 },
+ 16, 0xc0b0, 0, {0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x42,0x05,0x62,0x81,0x58,0x20 },
+ 16, 0xc0c0, 0, {0x56,0x08,0x15,0x82,0x04,0x60,0x81,0x58,0x20,0x46,0x08,0x15,0x82,0x01,0x60,0xc1 },
+ 16, 0xc0d0, 0, {0x58,0x20,0x46,0x08,0x15,0x82,0x01,0x60,0x81,0x58,0x30,0x56,0x08,0x15,0x82,0x05 },
+ 16, 0xc0e0, 0, {0x60,0x81,0x58,0x20,0x56,0x08,0x05,0x80,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc0f0, 0, {0x00,0xc5,0x42,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x08 },
+ 16, 0xc100, 0, {0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x0c,0x20,0x02,0x08,0x00,0x82,0x00,0x20 },
+ 16, 0xc110, 0, {0x80,0x08,0x20,0x03,0x08,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x80 },
+ 16, 0xc120, 0, {0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x42,0x04,0x66,0x81,0x18,0x20 },
+ 16, 0xc130, 0, {0x46,0x08,0x11,0x82,0x04,0x64,0x81,0x18,0x20,0x46,0x08,0x11,0x82,0x00,0x60,0x81 },
+ 16, 0xc140, 0, {0x0c,0x20,0x46,0x08,0x11,0x82,0x00,0x60,0x81,0x19,0x20,0x43,0x08,0x11,0x82,0x04 },
+ 16, 0xc150, 0, {0x60,0x81,0x19,0x20,0x46,0x48,0x01,0x80,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc160, 0, {0x00,0xc5,0x60,0x05,0x58,0x01,0x56,0x00,0x55,0x80,0x15,0x60,0x04,0x58,0x01,0x56 },
+ 16, 0xc170, 0, {0x00,0x45,0x80,0x11,0x60,0x00,0x58,0x00,0x06,0x00,0x45,0x80,0x15,0x60,0x01,0x58 },
+ 16, 0xc180, 0, {0x01,0x16,0x00,0x01,0x80,0x15,0x60,0x05,0x58,0x01,0x56,0x00,0x55,0x80,0x05,0x40 },
+ 16, 0xc190, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x01,0x49,0x80,0x10,0x60 },
+ 16, 0xc1a0, 0, {0x14,0x18,0x05,0x06,0x01,0x79,0x80,0x50,0x60,0x14,0x18,0x01,0x06,0x01,0x41,0x80 },
+ 16, 0xc1b0, 0, {0x50,0x60,0x04,0x18,0x05,0x06,0x01,0x41,0x80,0x10,0x60,0x14,0x18,0x05,0x06,0x01 },
+ 16, 0xc1c0, 0, {0x41,0x80,0x50,0x60,0x14,0x18,0x05,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc1d0, 0, {0x00,0x80,0x02,0x01,0x04,0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x00,0x04,0x04,0x40 },
+ 16, 0xc1e0, 0, {0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x84,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x00 },
+ 16, 0xc1f0, 0, {0x80,0x41,0x20,0x10,0x08,0x04,0x02,0x11,0x00,0x80,0x41,0x20,0x10,0x48,0x04,0x00 },
+ 16, 0xc200, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x46,0x03,0x51,0x80,0xd4,0x60 },
+ 16, 0xc210, 0, {0x35,0x18,0x0d,0x46,0x02,0x11,0x80,0xd4,0x60,0x35,0x18,0x0d,0x46,0x03,0x11,0x80 },
+ 16, 0xc220, 0, {0xd4,0x60,0x35,0x18,0x0d,0x46,0x03,0x51,0x80,0xd4,0x60,0x35,0x18,0x0d,0x46,0x03 },
+ 16, 0xc230, 0, {0x51,0x80,0xd4,0x60,0x35,0x18,0x0d,0x40,0x31,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc240, 0, {0x00,0xc5,0x46,0x05,0x70,0x81,0x5c,0x60,0x07,0x18,0x15,0xc6,0x04,0x71,0x81,0x1c },
+ 16, 0xc250, 0, {0x60,0x17,0x18,0x15,0xc6,0x05,0x31,0x81,0xdc,0x60,0x57,0x18,0x15,0xc6,0x05,0x71 },
+ 16, 0xc260, 0, {0x80,0x1c,0x60,0x77,0x18,0x15,0xce,0x05,0x71,0x81,0x5c,0x60,0x57,0x18,0x15,0xc0 },
+ 16, 0xc270, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x46,0x02,0x71,0x80,0x9c,0x61 },
+ 16, 0xc280, 0, {0x77,0x18,0x0d,0xc6,0x02,0x71,0x80,0x9c,0x60,0x37,0x18,0x0d,0xc2,0x03,0x31,0x80 },
+ 16, 0xc290, 0, {0x5c,0x60,0x27,0x18,0x0d,0xc6,0x03,0x71,0x80,0x9c,0x60,0x17,0x18,0x0d,0xce,0x03 },
+ 16, 0xc2a0, 0, {0x71,0x80,0xdc,0x60,0x37,0x18,0x0d,0xc0,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc2b0, 0, {0x00,0x45,0x46,0x05,0x75,0x81,0x5c,0x60,0x77,0x18,0x15,0xc6,0x05,0x75,0x81,0x5c },
+ 16, 0xc2c0, 0, {0x60,0x57,0x18,0x15,0xc6,0x05,0x31,0x81,0x0c,0x60,0x57,0x18,0x15,0xc6,0x05,0x71 },
+ 16, 0xc2d0, 0, {0x81,0x5c,0x60,0x43,0x18,0x15,0xc6,0x05,0x71,0x81,0x5c,0x60,0x57,0x18,0x15,0xc0 },
+ 16, 0xc2e0, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x02,0x01,0x20,0x80,0x48,0x20 },
+ 16, 0xc2f0, 0, {0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80 },
+ 16, 0xc300, 0, {0x5c,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x00,0x17,0x08,0x04,0x82,0x01 },
+ 16, 0xc310, 0, {0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc320, 0, {0x00,0x00,0x06,0x01,0x63,0x80,0x58,0x60,0x16,0x18,0x05,0x86,0x01,0x61,0x80,0x58 },
+ 16, 0xc330, 0, {0x60,0x16,0x18,0x05,0x86,0x01,0x61,0x81,0x58,0x60,0x16,0x18,0x05,0x86,0x01,0x61 },
+ 16, 0xc340, 0, {0x80,0x58,0x60,0x56,0x18,0x05,0x86,0x01,0x61,0x80,0x58,0x60,0x16,0x18,0x05,0x80 },
+ 16, 0xc350, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x40,0x05,0x70,0x01,0x5c,0x00 },
+ 16, 0xc360, 0, {0x17,0x00,0x15,0xc0,0x85,0x74,0x01,0x1c,0x00,0x47,0x00,0x11,0xc0,0x05,0x70,0x01 },
+ 16, 0xc370, 0, {0x5c,0x00,0x53,0x00,0x10,0xc0,0x05,0x70,0x01,0x5c,0x00,0x57,0x00,0x14,0xc9,0x04 },
+ 16, 0xc380, 0, {0x70,0x01,0x1c,0x00,0x57,0x00,0x15,0xc0,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc390, 0, {0x00,0x45,0x42,0x00,0x60,0xc0,0x18,0x20,0x06,0x08,0x01,0x82,0x00,0x60,0x80,0x18 },
+ 16, 0xc3a0, 0, {0x20,0x06,0x08,0x01,0x82,0x00,0x20,0x80,0x18,0x30,0x02,0x08,0x00,0x82,0x10,0x60 },
+ 16, 0xc3b0, 0, {0x80,0x18,0x20,0x06,0x08,0x00,0x82,0x00,0x60,0x80,0x18,0x20,0x06,0x08,0x01,0x80 },
+ 16, 0xc3c0, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x42,0x04,0x20,0x81,0x08,0x20 },
+ 16, 0xc3d0, 0, {0x02,0x08,0x10,0x82,0x04,0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x82,0x04,0x20,0x81 },
+ 16, 0xc3e0, 0, {0x08,0x20,0x46,0x08,0x11,0x82,0x04,0x20,0x81,0x08,0x20,0x42,0x08,0x11,0x82,0x04 },
+ 16, 0xc3f0, 0, {0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x80,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc400, 0, {0x00,0x45,0x42,0x05,0x40,0xc5,0x50,0x20,0x14,0x08,0x15,0x00,0x04,0x40,0x81,0x50 },
+ 16, 0xc410, 0, {0x20,0x54,0x08,0x11,0x02,0x05,0x00,0x80,0x10,0x20,0x45,0x0c,0x11,0x42,0x04,0x40 },
+ 16, 0xc420, 0, {0x81,0x50,0x20,0x14,0x0c,0x15,0x42,0x04,0x40,0x81,0x10,0x20,0x54,0x08,0x15,0x00 },
+ 16, 0xc430, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x03,0x01,0x50,0xc0,0x44,0x30 },
+ 16, 0xc440, 0, {0x15,0x0c,0x05,0x43,0x01,0x50,0xc0,0x4c,0x30,0x15,0x0c,0x05,0x43,0x21,0x50,0xc0 },
+ 16, 0xc450, 0, {0x54,0x30,0x15,0x0c,0x05,0x43,0x01,0x50,0xc0,0x54,0x30,0x15,0x0c,0x05,0x43,0x01 },
+ 16, 0xc460, 0, {0x50,0xc0,0x54,0x20,0x15,0x0c,0x05,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc470, 0, {0x00,0x00,0x08,0x00,0x42,0x00,0x04,0x80,0x04,0x20,0x01,0x08,0x00,0x42,0x00,0x04 },
+ 16, 0xc480, 0, {0x80,0x04,0x20,0x01,0x08,0x00,0x02,0x00,0x10,0x00,0x04,0x00,0x01,0x08,0x00,0x42 },
+ 16, 0xc490, 0, {0x00,0x10,0x80,0x04,0x00,0x01,0x08,0x00,0x42,0x00,0x10,0x80,0x04,0x20,0x01,0x00 },
+ 16, 0xc4a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x42,0x02,0x00,0x80,0x84,0x20 },
+ 16, 0xc4b0, 0, {0x20,0x08,0x08,0x02,0x02,0x00,0x80,0x84,0x20,0x20,0x08,0x08,0x02,0x02,0x00,0x80 },
+ 16, 0xc4c0, 0, {0x80,0xa0,0x20,0x28,0x08,0x02,0x02,0x00,0x80,0x80,0x20,0x20,0x28,0x08,0x02,0x02 },
+ 16, 0xc4d0, 0, {0x00,0x80,0x80,0x20,0x20,0x08,0x08,0x00,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc4e0, 0, {0x00,0x45,0x40,0x05,0x60,0x41,0x58,0x00,0x56,0x00,0x15,0x80,0x05,0x60,0x01,0x58 },
+ 16, 0xc4f0, 0, {0x00,0x56,0x00,0x15,0x80,0x05,0x20,0x01,0xd8,0x00,0x56,0x00,0x15,0x80,0x05,0x60 },
+ 16, 0xc500, 0, {0x01,0x58,0x00,0x76,0x00,0x15,0x80,0x05,0x60,0x01,0x58,0x00,0x56,0x00,0x15,0x80 },
+ 16, 0xc510, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x40,0x03,0x60,0x00,0xd8,0x00 },
+ 16, 0xc520, 0, {0x26,0x00,0x0d,0x80,0x02,0x60,0x00,0xd8,0x00,0x36,0x00,0x0d,0x80,0x07,0x60,0x01 },
+ 16, 0xc530, 0, {0x5c,0x00,0x36,0x00,0x0d,0x80,0x03,0x60,0x00,0xd8,0x00,0x57,0x00,0x0d,0x80,0x02 },
+ 16, 0xc540, 0, {0x60,0x00,0x98,0x00,0x36,0x00,0x0d,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc550, 0, {0x00,0x00,0x00,0x04,0x30,0x21,0x0c,0x00,0x43,0x00,0x10,0xc0,0x04,0x30,0x01,0x0c },
+ 16, 0xc560, 0, {0x00,0x43,0x00,0x10,0xc0,0x04,0x30,0x01,0x18,0x00,0x43,0x00,0x10,0xc0,0x04,0x30 },
+ 16, 0xc570, 0, {0x01,0x0c,0x00,0x46,0x00,0x10,0xc0,0x04,0x30,0x01,0x0c,0x00,0x43,0x00,0x10,0xc0 },
+ 16, 0xc580, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x0c,0x00 },
+ 16, 0xc590, 0, {0x03,0x00,0x00,0xc0,0x00,0x35,0x08,0x0c,0x00,0x03,0x00,0x00,0xc6,0x00,0x14,0x00 },
+ 16, 0xc5a0, 0, {0x08,0x00,0x03,0x40,0x00,0xc0,0x00,0x30,0x00,0x0d,0x40,0x02,0x00,0x00,0xc0,0x00 },
+ 16, 0xc5b0, 0, {0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc5c0, 0, {0x00,0x00,0x05,0x01,0x31,0x40,0x4c,0x50,0x13,0x14,0x04,0xc5,0x01,0x31,0xc0,0x4c },
+ 16, 0xc5d0, 0, {0x50,0x13,0x14,0x04,0xc5,0x05,0x31,0x41,0x4c,0x50,0x13,0x14,0x04,0xc5,0x01,0x31 },
+ 16, 0xc5e0, 0, {0x40,0x4c,0x70,0x53,0x14,0x04,0xc5,0x01,0x31,0x40,0x4c,0x40,0x13,0x14,0x04,0xc0 },
+ 16, 0xc5f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x05,0x68,0xc1,0x5a,0x30 },
+ 16, 0xc600, 0, {0x56,0x8c,0x15,0xa3,0x05,0x69,0xc1,0x5a,0x30,0x46,0x8c,0x11,0xa7,0x01,0x68,0xc0 },
+ 16, 0xc610, 0, {0x1a,0x30,0x56,0x8c,0x11,0xa3,0x04,0x68,0xc1,0x1a,0x30,0x16,0x8c,0x15,0xa3,0x04 },
+ 16, 0xc620, 0, {0x68,0xc1,0x5a,0x30,0x56,0x8c,0x11,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc630, 0, {0x00,0x00,0x00,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0x00,0x24,0x00,0x08 },
+ 16, 0xc640, 0, {0x01,0x02,0x00,0x00,0x80,0x00,0x24,0x00,0x08,0x80,0x02,0x60,0x00,0x80,0x00,0x20 },
+ 16, 0xc650, 0, {0x00,0x09,0x40,0x02,0x20,0x00,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80 },
+ 16, 0xc660, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x44,0x62,0x11,0x18,0x84 },
+ 16, 0xc670, 0, {0x46,0x21,0x11,0x88,0x44,0x62,0x09,0x18,0x84,0x46,0x21,0x11,0x88,0x60,0x62,0x10 },
+ 16, 0xc680, 0, {0x18,0x04,0x46,0x01,0x11,0x88,0x44,0x62,0x11,0x18,0x80,0x06,0x01,0x11,0x88,0x44 },
+ 16, 0xc690, 0, {0x62,0x11,0x18,0x84,0x46,0x21,0x11,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc6a0, 0, {0x00,0x00,0x00,0x45,0x50,0x11,0x54,0x04,0x55,0x01,0x15,0x40,0x44,0x50,0x11,0x54 },
+ 16, 0xc6b0, 0, {0x04,0x45,0x01,0x11,0x40,0x40,0x50,0x10,0x54,0x04,0x45,0x01,0x15,0x40,0x44,0x50 },
+ 16, 0xc6c0, 0, {0x11,0x14,0x00,0x15,0x01,0x15,0x40,0x44,0x50,0x11,0x54,0x04,0x55,0x00,0x11,0x40 },
+ 16, 0xc6d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x21,0x42,0x08,0x50,0x82 },
+ 16, 0xc6e0, 0, {0x14,0x20,0x85,0x08,0x21,0x42,0x00,0x50,0x82,0x14,0x20,0x85,0x08,0x20,0x42,0x08 },
+ 16, 0xc6f0, 0, {0x50,0x82,0x15,0x20,0x05,0x48,0x21,0x42,0x08,0x50,0x82,0x14,0x20,0x81,0x40,0x21 },
+ 16, 0xc700, 0, {0x42,0x08,0x50,0x82,0x14,0x20,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc710, 0, {0x00,0x00,0x0a,0x01,0x02,0x80,0x40,0xa0,0x10,0x28,0x04,0x0a,0x01,0x02,0x84,0x40 },
+ 16, 0xc720, 0, {0xa1,0x10,0x28,0x04,0x0a,0x01,0x02,0x80,0x40,0xa0,0x00,0x28,0x00,0x0a,0x01,0x02 },
+ 16, 0xc730, 0, {0x80,0x40,0xb0,0x10,0x28,0x00,0x0a,0x01,0x02,0x80,0x40,0xa0,0x10,0x28,0x04,0x00 },
+ 16, 0xc740, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x03,0x53,0x00,0xd4,0xc0 },
+ 16, 0xc750, 0, {0x35,0x30,0x0d,0x4c,0x03,0x53,0x00,0xd4,0xc0,0x35,0x30,0x0d,0x4c,0x03,0x53,0x00 },
+ 16, 0xc760, 0, {0xd4,0xc0,0x21,0x30,0x08,0x4c,0x03,0x53,0x00,0xd4,0xc0,0x35,0x30,0x08,0x4c,0x03 },
+ 16, 0xc770, 0, {0x53,0x00,0xd4,0xc0,0x35,0x30,0x0d,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc780, 0, {0x00,0x00,0x08,0x04,0x70,0x01,0x5c,0x80,0x07,0x20,0x25,0xc9,0x04,0x72,0x01,0x5c },
+ 16, 0xc790, 0, {0x80,0x47,0x20,0x15,0xc8,0x00,0x72,0x05,0xdc,0x80,0x57,0x20,0x15,0xc8,0x05,0x72 },
+ 16, 0xc7a0, 0, {0x01,0x1c,0x90,0x67,0x20,0x15,0xc8,0x05,0x72,0x01,0x1c,0x80,0x57,0x20,0x15,0xc0 },
+ 16, 0xc7b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x18,0x48,0xc2,0x12,0x31 },
+ 16, 0xc7c0, 0, {0x84,0x8c,0x61,0x03,0x18,0x40,0xc8,0x12,0x31,0x84,0x8c,0x61,0x03,0x18,0x48,0xc4 },
+ 16, 0xc7d0, 0, {0x10,0x31,0x84,0x0c,0x41,0x23,0x18,0x48,0xc6,0x10,0x30,0x04,0x0c,0x61,0x23,0x18 },
+ 16, 0xc7e0, 0, {0x48,0xc6,0x12,0x30,0x84,0x8c,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc7f0, 0, {0x00,0x00,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3 },
+ 16, 0xc800, 0, {0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f },
+ 16, 0xc810, 0, {0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xbd,0x00 },
+ 16, 0xc820, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc830, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc840, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc850, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc860, 0, {0x00,0x00,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x09,0x36,0xc2 },
+ 16, 0xc870, 0, {0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b },
+ 16, 0xc880, 0, {0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x2c,0x00 },
+ 16, 0xc890, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x3c,0x4c,0xcf,0x13,0x33 },
+ 16, 0xc8a0, 0, {0xc4,0xcc,0xf1,0x33,0x3c,0x4d,0x4e,0x93,0x33,0xc4,0xcc,0xf1,0x2b,0x3c,0x4c,0xcf },
+ 16, 0xc8b0, 0, {0x13,0x33,0xc4,0xcc,0xe9,0x33,0x3c,0x4c,0xcf,0x12,0xb5,0xc4,0xcc,0xf1,0x33,0x3c },
+ 16, 0xc8c0, 0, {0x4c,0xcf,0x13,0x33,0xc4,0xcd,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc8d0, 0, {0x00,0x00,0x3b,0x7e,0x4e,0xc7,0x93,0xb7,0xe4,0xed,0xf9,0x23,0x7e,0x4e,0x47,0x93 },
+ 16, 0xc8e0, 0, {0xb7,0xe4,0xed,0xf9,0x3f,0x7e,0x4e,0xde,0x12,0x37,0xe4,0x8d,0xf9,0x3b,0x7e,0x4e },
+ 16, 0xc8f0, 0, {0xdf,0x93,0xf7,0x84,0x8d,0xf9,0x3b,0x7e,0x4e,0xdf,0x93,0xb1,0xe4,0xed,0xb9,0x00 },
+ 16, 0xc900, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x70,0x40,0x9c,0x11 },
+ 16, 0xc910, 0, {0x67,0x04,0x19,0xc3,0x02,0x70,0x40,0x9c,0x10,0x27,0x04,0x09,0xc1,0x02,0x70,0x40 },
+ 16, 0xc920, 0, {0x1c,0x10,0x27,0x14,0x01,0xc1,0x02,0x70,0x40,0x9c,0x50,0x07,0x04,0x09,0xc1,0x02 },
+ 16, 0xc930, 0, {0x70,0x40,0x9c,0x10,0x67,0x14,0x11,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc940, 0, {0x00,0x00,0x04,0x05,0x71,0x01,0x5c,0x40,0x57,0x10,0x15,0xc4,0x05,0x71,0x01,0x5c },
+ 16, 0xc950, 0, {0x40,0x57,0x10,0x15,0xc6,0x05,0x71,0x01,0x5c,0x40,0x57,0x10,0x10,0xc4,0x05,0x71 },
+ 16, 0xc960, 0, {0x01,0x5c,0x64,0x03,0x10,0x55,0xc4,0x05,0x71,0x01,0x5c,0x40,0x57,0x10,0x15,0xc0 },
+ 16, 0xc970, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x20,0x80,0x48,0x20 },
+ 16, 0xc980, 0, {0x12,0x08,0x04,0x82,0x01,0x21,0x80,0x48,0x20,0x12,0x08,0x04,0x80,0x01,0x20,0x80 },
+ 16, 0xc990, 0, {0x48,0x20,0x12,0x08,0x05,0xc2,0x01,0x20,0x80,0x48,0x24,0x17,0x08,0x04,0x82,0x01 },
+ 16, 0xc9a0, 0, {0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xc9b0, 0, {0x00,0x00,0x00,0x00,0x60,0x00,0x18,0x00,0x46,0x00,0x11,0x84,0x00,0x60,0x00,0x18 },
+ 16, 0xc9c0, 0, {0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x01,0x18,0x00,0x06,0x10,0x91,0x80,0x00,0x60 },
+ 16, 0xc9d0, 0, {0x00,0x18,0x46,0x46,0x18,0x01,0x80,0x00,0x60,0x00,0x18,0x00,0x06,0x10,0x01,0x80 },
+ 16, 0xc9e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x73,0x01,0x1c,0x80 },
+ 16, 0xc9f0, 0, {0x07,0x20,0x01,0xc8,0x04,0x72,0x01,0x1c,0x80,0x47,0x20,0x11,0xc8,0x04,0x72,0x01 },
+ 16, 0xca00, 0, {0x1c,0x80,0x47,0x22,0x11,0xc8,0x04,0x72,0x01,0x1c,0x80,0x07,0x20,0x11,0xc8,0x04 },
+ 16, 0xca10, 0, {0x72,0x01,0x1c,0x80,0x07,0x28,0x11,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xca20, 0, {0x00,0x00,0x00,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x00,0x18 },
+ 16, 0xca30, 0, {0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x00,0x60 },
+ 16, 0xca40, 0, {0x00,0x18,0x00,0x46,0x04,0x01,0x80,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80 },
+ 16, 0xca50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x04,0x22,0x01,0x08,0x80 },
+ 16, 0xca60, 0, {0x02,0x20,0x00,0x90,0x04,0x27,0x81,0x08,0x80,0x42,0x20,0x10,0x98,0x04,0x24,0x01 },
+ 16, 0xca70, 0, {0x08,0x80,0x42,0x48,0x10,0x88,0x04,0x22,0x01,0x09,0x40,0x42,0x60,0x10,0x88,0x04 },
+ 16, 0xca80, 0, {0x22,0x01,0x08,0xc0,0x02,0x40,0x10,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xca90, 0, {0x00,0x00,0x2a,0x04,0x4b,0x81,0x12,0xa0,0x04,0xa8,0x01,0x2a,0x04,0x4a,0x81,0x12 },
+ 16, 0xcaa0, 0, {0xa0,0x44,0xa8,0x11,0x2a,0x04,0x48,0x80,0x12,0xa0,0x44,0x88,0x01,0x2a,0x04,0x4a },
+ 16, 0xcab0, 0, {0x81,0x12,0x20,0x04,0xac,0x11,0x2a,0x04,0x4a,0x81,0x12,0xb0,0x44,0x9c,0x11,0x00 },
+ 16, 0xcac0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0,0x0c,0x00,0x53,0x00,0x14,0xc0 },
+ 16, 0xcad0, 0, {0x05,0x30,0x01,0x44,0x00,0x53,0x00,0x14,0xc0,0x05,0x30,0x04,0x0c,0x00,0x53,0x00 },
+ 16, 0xcae0, 0, {0x14,0xc0,0x05,0xb0,0x01,0x4c,0x00,0x53,0x00,0x16,0xc0,0x01,0x30,0x01,0x4c,0x00 },
+ 16, 0xcaf0, 0, {0x53,0x00,0x14,0xc0,0x01,0x38,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcb00, 0, {0x08,0xc0,0x00,0x10,0x40,0x00,0x10,0x00,0x04,0x00,0x01,0x10,0x00,0x44,0x80,0x10 },
+ 16, 0xcb10, 0, {0x00,0x04,0x00,0x01,0x10,0x00,0x46,0x00,0x00,0x00,0x04,0x60,0x01,0x00,0x00,0x40 },
+ 16, 0xcb20, 0, {0x00,0x11,0x60,0x02,0x40,0x01,0x00,0x10,0x40,0x00,0x10,0x60,0x01,0x50,0x10,0x40 },
+ 16, 0xcb30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0,0x40,0x02,0x00,0x00,0x80,0x00 },
+ 16, 0xcb40, 0, {0x20,0x00,0x08,0x08,0x02,0x00,0x00,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00 },
+ 16, 0xcb50, 0, {0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0x00,0x00,0x00,0x08,0x00,0x02 },
+ 16, 0xcb60, 0, {0x00,0x00,0x80,0x00,0x21,0x00,0x08,0x40,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcb70, 0, {0x08,0xc0,0x40,0x04,0x60,0x01,0x18,0x00,0x46,0x00,0x11,0x80,0x04,0x60,0x01,0x18 },
+ 16, 0xcb80, 0, {0x00,0x46,0x00,0x11,0x80,0x04,0x60,0x01,0xc8,0x00,0x46,0x00,0x19,0x80,0x00,0x60 },
+ 16, 0xcb90, 0, {0x00,0x18,0x00,0x66,0x00,0x11,0x80,0x04,0x60,0x01,0x18,0x00,0x06,0x00,0x11,0x80 },
+ 16, 0xcba0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x01,0x00,0x02,0x60,0x00,0x98,0x00 },
+ 16, 0xcbb0, 0, {0x26,0x00,0x09,0x81,0x02,0x60,0x01,0x98,0x00,0x26,0x00,0x09,0x80,0x06,0x62,0x00 },
+ 16, 0xcbc0, 0, {0x48,0x00,0x26,0x20,0x01,0xc0,0x02,0x60,0x01,0x98,0x00,0x07,0x00,0x09,0x80,0x02 },
+ 16, 0xcbd0, 0, {0x60,0x00,0x98,0x00,0x26,0x00,0x11,0x82,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcbe0, 0, {0x40,0x45,0x42,0x04,0x30,0x81,0x0c,0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0x85,0x8c },
+ 16, 0xcbf0, 0, {0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c,0x20,0x43,0x48,0x11,0x82,0x04,0x30 },
+ 16, 0xcc00, 0, {0x81,0x8d,0x20,0x46,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c,0x20,0x43,0x0c,0x10,0xc0 },
+ 16, 0xcc10, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x04,0x00,0x00,0x30,0x00,0x0c,0x00 },
+ 16, 0xcc20, 0, {0x03,0x00,0x00,0xc0,0x00,0x10,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x30,0x00 },
+ 16, 0xcc30, 0, {0x08,0x00,0x03,0x00,0x00,0x80,0x00,0x30,0x00,0x0c,0x80,0x02,0x00,0x00,0xc0,0x00 },
+ 16, 0xcc40, 0, {0x30,0x00,0x0c,0x00,0x03,0x20,0x00,0xc0,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcc50, 0, {0x40,0x00,0x02,0x00,0x30,0x80,0x0c,0x21,0x03,0x08,0x00,0xc2,0x00,0x30,0x80,0x0c },
+ 16, 0xcc60, 0, {0x20,0x03,0x08,0x00,0xc2,0x04,0x30,0xc1,0x0c,0x20,0x03,0x0c,0x10,0xc2,0x00,0x30 },
+ 16, 0xcc70, 0, {0x80,0x0c,0xb0,0x43,0x08,0x00,0xc2,0x00,0x30,0x80,0x0c,0x20,0x03,0x28,0x10,0xc0 },
+ 16, 0xcc80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x42,0x04,0x60,0x81,0x18,0x20 },
+ 16, 0xcc90, 0, {0x46,0x08,0x11,0x82,0x04,0x60,0x80,0x18,0x20,0x46,0x08,0x11,0x82,0x00,0x60,0x81 },
+ 16, 0xcca0, 0, {0x18,0x20,0x46,0x08,0x11,0x82,0x04,0x60,0x80,0x18,0x20,0x06,0x08,0x11,0x82,0x04 },
+ 16, 0xccb0, 0, {0x60,0x81,0x18,0x20,0x46,0x0c,0x11,0xc0,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xccc0, 0, {0x40,0x01,0x42,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x08 },
+ 16, 0xccd0, 0, {0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x0c,0x20,0x02,0x08,0x00,0xc2,0x00,0x20 },
+ 16, 0xcce0, 0, {0x80,0x08,0x20,0x42,0x08,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x01,0x80 },
+ 16, 0xccf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x01,0x42,0x04,0x60,0x81,0x18,0x20 },
+ 16, 0xcd00, 0, {0x46,0x08,0x11,0x82,0x04,0x60,0x80,0x18,0x20,0x46,0x08,0x11,0x82,0x00,0x60,0xc1 },
+ 16, 0xcd10, 0, {0x0c,0x20,0x46,0x0c,0x10,0xc2,0x04,0x60,0x80,0x18,0x30,0x42,0x08,0x11,0x82,0x04 },
+ 16, 0xcd20, 0, {0x60,0x81,0x18,0x20,0x46,0x08,0x10,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcd30, 0, {0x40,0x45,0x40,0x04,0x50,0x01,0x14,0x00,0x45,0x00,0x11,0x40,0x04,0x50,0x00,0x14 },
+ 16, 0xcd40, 0, {0x00,0x45,0x00,0x11,0x40,0x00,0x50,0x00,0x04,0x00,0x45,0x00,0x00,0x40,0x04,0x50 },
+ 16, 0xcd50, 0, {0x00,0x14,0x00,0x01,0x00,0x11,0x40,0x04,0x50,0x01,0x14,0x00,0x45,0x00,0x00,0x42 },
+ 16, 0xcd60, 0, {0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x06,0x00,0x41,0x80,0x10,0x60 },
+ 16, 0xcd70, 0, {0x04,0x18,0x01,0x06,0x00,0x41,0x80,0x10,0x60,0x04,0x18,0x01,0x06,0x00,0x41,0x80 },
+ 16, 0xcd80, 0, {0x10,0x60,0x04,0x18,0x01,0x06,0x00,0x41,0x80,0x10,0x60,0x04,0x18,0x01,0x06,0x00 },
+ 16, 0xcd90, 0, {0x41,0x80,0x10,0x60,0x04,0x18,0x01,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcda0, 0, {0x48,0x00,0x02,0x01,0x00,0x80,0x40,0x21,0x10,0x08,0x04,0x02,0x01,0x00,0x80,0x40 },
+ 16, 0xcdb0, 0, {0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x80,0x40,0x21,0x10,0x08,0x04,0x02,0x01,0x00 },
+ 16, 0xcdc0, 0, {0x80,0x40,0x30,0x10,0x08,0x04,0x02,0x11,0x00,0x84,0x40,0x20,0x10,0x08,0x14,0x00 },
+ 16, 0xcdd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x46,0x03,0x51,0x80,0xd4,0x60 },
+ 16, 0xcde0, 0, {0x35,0x18,0x0d,0x46,0x03,0x51,0x80,0xd4,0x60,0x35,0x18,0x0d,0x46,0x03,0x51,0x80 },
+ 16, 0xcdf0, 0, {0xd4,0x60,0x35,0x10,0x0d,0x46,0x03,0x51,0x80,0xd4,0x40,0x35,0x18,0x0d,0x46,0x03 },
+ 16, 0xce00, 0, {0x51,0x80,0xd4,0x60,0x35,0x18,0x0d,0x40,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xce10, 0, {0x00,0x01,0x46,0x04,0x71,0x81,0x1c,0x60,0x07,0x18,0x11,0xce,0x04,0x71,0x81,0x1c },
+ 16, 0xce20, 0, {0x60,0x47,0x18,0x01,0xc6,0x04,0x71,0x81,0x9c,0x60,0x47,0x18,0x19,0xc6,0x04,0x71 },
+ 16, 0xce30, 0, {0x80,0x1c,0x60,0x67,0x18,0x11,0xc6,0x04,0x71,0x81,0x1c,0x60,0x47,0x18,0x11,0xc0 },
+ 16, 0xce40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x46,0x02,0x71,0x80,0x9c,0x60 },
+ 16, 0xce50, 0, {0x27,0x18,0x09,0xc6,0x06,0x71,0x80,0x1c,0x60,0x27,0x18,0x09,0xc6,0x01,0x31,0x80 },
+ 16, 0xce60, 0, {0x1c,0x60,0x07,0x18,0x09,0xc6,0x02,0x71,0x80,0x9c,0x60,0x07,0x18,0x09,0xc6,0x12 },
+ 16, 0xce70, 0, {0x71,0x80,0x9c,0x60,0x33,0x18,0x01,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xce80, 0, {0x50,0x45,0x46,0x05,0x71,0x81,0x5c,0x60,0x57,0x18,0x15,0xc6,0x05,0x71,0x80,0x5c },
+ 16, 0xce90, 0, {0x60,0x57,0x18,0x15,0xc6,0x01,0x31,0x81,0x0c,0x60,0x17,0x18,0x10,0xc6,0x05,0x71 },
+ 16, 0xcea0, 0, {0x81,0x5c,0x60,0x03,0x18,0x15,0xc6,0x05,0x71,0x81,0x5c,0x60,0x53,0x18,0x18,0x82 },
+ 16, 0xceb0, 0, {0x10,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x12,0x01,0x24,0x80,0x48,0x20 },
+ 16, 0xcec0, 0, {0x12,0x08,0x04,0x82,0x01,0x24,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80 },
+ 16, 0xced0, 0, {0x58,0x20,0x52,0x0c,0x05,0x82,0x01,0x20,0x80,0x49,0x20,0x02,0x08,0x04,0x82,0x01 },
+ 16, 0xcee0, 0, {0x20,0x80,0x49,0x20,0x12,0x48,0x04,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcef0, 0, {0x40,0x04,0x06,0x00,0x61,0x80,0x18,0x60,0x06,0x18,0x01,0x86,0x04,0x61,0x80,0x18 },
+ 16, 0xcf00, 0, {0x60,0x06,0x18,0x01,0x86,0x00,0x61,0x81,0x48,0x60,0x06,0x18,0x14,0x86,0x00,0x61 },
+ 16, 0xcf10, 0, {0x80,0x18,0x60,0x42,0x18,0x01,0x86,0x00,0x61,0x80,0x18,0x60,0x06,0x18,0x00,0x80 },
+ 16, 0xcf20, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x60,0x04,0x78,0x01,0x1e,0x00 },
+ 16, 0xcf30, 0, {0x47,0x80,0x11,0xe8,0x00,0x78,0x01,0x1e,0x00,0x47,0x80,0x11,0xe0,0x04,0x78,0x01 },
+ 16, 0xcf40, 0, {0x1e,0x00,0x43,0x80,0x11,0xe0,0x04,0x78,0x01,0x1e,0x00,0x03,0x80,0x15,0xe0,0x04 },
+ 16, 0xcf50, 0, {0x78,0x01,0x1e,0x00,0x47,0x80,0x11,0xc0,0x10,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcf60, 0, {0x40,0x01,0x12,0x00,0x64,0x80,0x18,0x20,0x06,0x08,0x01,0x82,0x00,0x64,0x80,0x18 },
+ 16, 0xcf70, 0, {0x20,0x06,0x08,0x01,0x82,0x00,0x60,0x80,0x18,0x30,0x02,0x08,0x01,0x82,0x00,0x60 },
+ 16, 0xcf80, 0, {0x80,0x19,0x30,0x42,0x08,0x00,0x82,0x00,0x60,0x80,0x19,0x20,0x06,0x48,0x01,0x80 },
+ 16, 0xcf90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x42,0x04,0x20,0x81,0x08,0x20 },
+ 16, 0xcfa0, 0, {0x42,0x08,0x10,0x82,0x00,0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x82,0x04,0x20,0x81 },
+ 16, 0xcfb0, 0, {0x08,0x20,0x46,0x08,0x10,0x82,0x04,0x20,0x81,0x08,0x20,0x42,0x08,0x11,0x82,0x04 },
+ 16, 0xcfc0, 0, {0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xcfd0, 0, {0x40,0x45,0x42,0x04,0x40,0x81,0x10,0x20,0x44,0x08,0x11,0x02,0x00,0x40,0x81,0x10 },
+ 16, 0xcfe0, 0, {0x20,0x44,0x08,0x11,0x02,0x04,0x40,0x80,0x10,0x20,0x45,0x08,0x01,0x02,0x04,0x40 },
+ 16, 0xcff0, 0, {0x81,0x10,0x21,0x00,0x0c,0x11,0x02,0x04,0x40,0x81,0x10,0x20,0x44,0x08,0x01,0x00 },
+ 16, 0xd000, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x03,0x00,0x50,0xc0,0x14,0x30 },
+ 16, 0xd010, 0, {0x05,0x0c,0x01,0x43,0x00,0x50,0xc0,0x14,0x30,0x05,0x0c,0x01,0x43,0x00,0x50,0xc0 },
+ 16, 0xd020, 0, {0x14,0x30,0x05,0x0c,0x01,0x43,0x00,0x50,0xc0,0x14,0x30,0x05,0x0c,0x01,0x43,0x00 },
+ 16, 0xd030, 0, {0x50,0xc0,0x14,0x30,0x05,0x0c,0x01,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd040, 0, {0x40,0x00,0x08,0x00,0x42,0x04,0x10,0x80,0x04,0x20,0x01,0x09,0x00,0x42,0x01,0x10 },
+ 16, 0xd050, 0, {0x80,0x04,0x20,0x01,0x08,0x00,0x42,0x00,0x10,0x00,0x04,0x20,0x01,0x08,0x00,0x42 },
+ 16, 0xd060, 0, {0x00,0x10,0x00,0x04,0x00,0x01,0x08,0x00,0x42,0x00,0x10,0x80,0x04,0x20,0x11,0x00 },
+ 16, 0xd070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x42,0x02,0x00,0x80,0x80,0x20 },
+ 16, 0xd080, 0, {0x20,0x08,0x08,0x02,0x02,0x00,0x80,0x00,0x20,0x20,0x08,0x08,0x02,0x00,0x00,0x80 },
+ 16, 0xd090, 0, {0x80,0xa0,0x00,0x0a,0x08,0x02,0x02,0x00,0x80,0x80,0x34,0x62,0x28,0x08,0x02,0x02 },
+ 16, 0xd0a0, 0, {0x00,0x80,0x80,0x30,0x20,0x0c,0x08,0x00,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd0b0, 0, {0x40,0x01,0x40,0x04,0x60,0x01,0x18,0x00,0x46,0x00,0x11,0x80,0x04,0x60,0x03,0x18 },
+ 16, 0xd0c0, 0, {0x00,0x46,0x00,0x11,0x80,0x06,0x60,0x01,0x98,0x00,0x46,0x00,0x11,0x80,0x04,0x60 },
+ 16, 0xd0d0, 0, {0x01,0x18,0x00,0x66,0x00,0x11,0x80,0x04,0x60,0x01,0x18,0x00,0x46,0x00,0x11,0x80 },
+ 16, 0xd0e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x00,0x02,0x60,0x00,0x98,0x00 },
+ 16, 0xd0f0, 0, {0x26,0x00,0x09,0x80,0x02,0x64,0x00,0x98,0x00,0x26,0x00,0x19,0x90,0x02,0x60,0x00 },
+ 16, 0xd100, 0, {0x1d,0x00,0x26,0x00,0x01,0xc0,0x02,0x60,0x00,0x99,0x00,0x06,0x40,0x19,0x80,0x02 },
+ 16, 0xd110, 0, {0x60,0x00,0x98,0x00,0x66,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd120, 0, {0x40,0x45,0x60,0x04,0x38,0x01,0x0e,0x00,0x43,0x80,0x10,0xe0,0x04,0x38,0x01,0x0e },
+ 16, 0xd130, 0, {0x00,0x43,0x80,0x10,0xe0,0x04,0x38,0x01,0x1a,0x00,0x43,0x80,0x11,0xa0,0x04,0x38 },
+ 16, 0xd140, 0, {0x01,0x0e,0x00,0x02,0x80,0x40,0xe0,0x04,0x38,0x01,0x0e,0x00,0x43,0x80,0x18,0x80 },
+ 16, 0xd150, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x04,0x01,0x00,0x30,0x40,0x0c,0x10 },
+ 16, 0xd160, 0, {0x03,0x04,0x00,0xc9,0x00,0x30,0x40,0x0c,0x10,0x03,0x04,0x00,0xc1,0x00,0x30,0x40 },
+ 16, 0xd170, 0, {0x08,0x10,0x03,0x04,0x00,0x81,0x00,0x30,0x40,0x0c,0x78,0x02,0x14,0x00,0xc1,0x00 },
+ 16, 0xd180, 0, {0x30,0x40,0x0c,0x10,0x03,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd190, 0, {0x40,0x00,0x05,0x00,0x31,0x40,0x0c,0x50,0x03,0x14,0x00,0xc5,0x00,0x35,0x40,0x0c },
+ 16, 0xd1a0, 0, {0x50,0x03,0x14,0x10,0xd5,0x00,0x31,0x41,0x0d,0x50,0x03,0x14,0x10,0xc5,0x00,0x31 },
+ 16, 0xd1b0, 0, {0x40,0x0d,0x48,0x43,0x54,0x10,0xc5,0x00,0x31,0x40,0x0c,0x40,0x43,0x10,0x00,0xc2 },
+ 16, 0xd1c0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x43,0x04,0x60,0xc1,0x18,0x30 },
+ 16, 0xd1d0, 0, {0x46,0x0c,0x11,0x83,0x04,0x61,0xc1,0x18,0x30,0x46,0x0c,0x01,0x87,0x04,0x60,0xc1 },
+ 16, 0xd1e0, 0, {0x18,0x30,0x46,0x08,0x11,0x83,0x04,0x60,0xc1,0x18,0x20,0x06,0x0c,0x01,0x83,0x04 },
+ 16, 0xd1f0, 0, {0x60,0xc1,0x18,0x30,0x46,0x0c,0x11,0x80,0x10,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd200, 0, {0x40,0x01,0x40,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0x00,0x20,0x00,0x08 },
+ 16, 0xd210, 0, {0x00,0x02,0x00,0x00,0x81,0x00,0x20,0x00,0x08,0x80,0x02,0x00,0x00,0xc0,0x00,0x20 },
+ 16, 0xd220, 0, {0x00,0x08,0x40,0x43,0x30,0x00,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80 },
+ 16, 0xd230, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x48,0x44,0x62,0x11,0x18,0x84 },
+ 16, 0xd240, 0, {0x46,0x21,0x11,0x88,0x44,0x63,0x01,0x18,0x84,0x46,0x21,0x01,0x88,0x04,0x62,0x11 },
+ 16, 0xd250, 0, {0x18,0x04,0x46,0x21,0x10,0xc8,0x44,0x62,0x11,0x18,0x05,0x43,0x01,0x81,0x88,0x44 },
+ 16, 0xd260, 0, {0x62,0x11,0x18,0x84,0x46,0x21,0x11,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd270, 0, {0x40,0x45,0x40,0x04,0x50,0x01,0x14,0x04,0x45,0x01,0x11,0x40,0x44,0x50,0x01,0x14 },
+ 16, 0xd280, 0, {0x04,0x45,0x01,0x01,0x40,0x45,0x00,0x10,0x14,0x04,0x45,0x03,0x00,0x40,0x44,0x50 },
+ 16, 0xd290, 0, {0x11,0x14,0x04,0x01,0x05,0x41,0x40,0x44,0x50,0x11,0x14,0x04,0x05,0x01,0x01,0x40 },
+ 16, 0xd2a0, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x08,0x20,0x42,0x08,0x10,0x82 },
+ 16, 0xd2b0, 0, {0x04,0x20,0x81,0x08,0x00,0x42,0x00,0x10,0x82,0x04,0x20,0x81,0x08,0x00,0x42,0x08 },
+ 16, 0xd2c0, 0, {0x10,0x82,0x05,0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x8a,0x05,0x20,0x05,0x08,0x20 },
+ 16, 0xd2d0, 0, {0x42,0x08,0x10,0x82,0x04,0x22,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd2e0, 0, {0x00,0x00,0x0a,0x01,0x02,0x80,0x40,0xa0,0x10,0x28,0x04,0x02,0x01,0x02,0x80,0x40 },
+ 16, 0xd2f0, 0, {0xa0,0x10,0x28,0x04,0x0a,0x01,0x02,0x80,0x40,0xa0,0x00,0x29,0x04,0x0a,0x01,0x02 },
+ 16, 0xd300, 0, {0x80,0x40,0xa4,0x00,0x28,0x04,0x0a,0x01,0x02,0x80,0x40,0xa8,0x10,0x2b,0x14,0x00 },
+ 16, 0xd310, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x4d,0x03,0x53,0x40,0xd4,0xd0 },
+ 16, 0xd320, 0, {0x35,0x34,0x0d,0x4d,0x03,0x53,0x40,0xd4,0xd0,0x35,0x34,0x0d,0x4d,0x03,0x53,0x40 },
+ 16, 0xd330, 0, {0xd4,0xd0,0x21,0x34,0x4d,0x4d,0x03,0x53,0x40,0xd4,0xd9,0x61,0x34,0x04,0x0d,0x03 },
+ 16, 0xd340, 0, {0x53,0x40,0xc0,0xd8,0x35,0x37,0x0d,0x40,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd350, 0, {0x40,0x01,0x48,0x04,0x72,0x00,0x1c,0x80,0x47,0x20,0x11,0xc8,0x04,0x72,0x01,0x1c },
+ 16, 0xd360, 0, {0x80,0x47,0x20,0x11,0xc8,0x04,0x72,0x00,0x9c,0x80,0x47,0x20,0x19,0xc8,0x00,0x72 },
+ 16, 0xd370, 0, {0x01,0x1c,0x88,0x67,0x20,0x11,0xc8,0x04,0x72,0x01,0x5c,0x82,0x47,0x22,0x11,0xc0 },
+ 16, 0xd380, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x08,0x48,0xc2,0x12,0x31 },
+ 16, 0xd390, 0, {0x84,0x8c,0x61,0x23,0x10,0x40,0xc0,0x12,0x31,0x84,0x8c,0x61,0x03,0x10,0x48,0xc4 },
+ 16, 0xd3a0, 0, {0x10,0x31,0x84,0x8c,0x41,0x23,0x18,0x48,0xc6,0x10,0x30,0x04,0x0c,0x41,0x23,0x18 },
+ 16, 0xd3b0, 0, {0x48,0xc6,0x12,0x30,0x84,0x8c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd3c0, 0, {0x00,0x00,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3 },
+ 16, 0xd3d0, 0, {0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f },
+ 16, 0xd3e0, 0, {0xff,0xd3,0xff,0xf4,0xff,0xdd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x00 },
+ 16, 0xd3f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd410, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd420, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd430, 0, {0x00,0x00,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x36,0xc2 },
+ 16, 0xd440, 0, {0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b },
+ 16, 0xd450, 0, {0x36,0xc2,0xcd,0xb0,0xb3,0x4c,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x00 },
+ 16, 0xd460, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x5c,0x4c,0xd7,0x13,0x33 },
+ 16, 0xd470, 0, {0xc4,0xcc,0xf1,0x33,0x3a,0x4a,0xd6,0x93,0x33,0xc4,0xcc,0xf1,0x2b,0x3a,0x4c,0xcf },
+ 16, 0xd480, 0, {0x13,0x33,0xc4,0xcc,0xe9,0x33,0x3c,0x4c,0xcf,0x12,0xb5,0xa4,0xac,0xc9,0x33,0x3c },
+ 16, 0xd490, 0, {0x4c,0xcf,0x13,0x35,0xc4,0xcd,0x69,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd4a0, 0, {0x00,0x00,0x3b,0x7e,0x4e,0xdf,0x93,0xb7,0xe4,0xed,0xf9,0x3b,0x7e,0x4e,0xdf,0x93 },
+ 16, 0xd4b0, 0, {0xb7,0xe4,0xed,0xf9,0x3b,0x7e,0x4e,0xde,0x12,0x37,0xe4,0xed,0xe1,0x3b,0x7e,0x4e },
+ 16, 0xd4c0, 0, {0xdf,0x92,0x31,0x84,0x8d,0xd9,0x3b,0x7e,0x4e,0xdf,0x93,0xb1,0xe4,0xec,0x61,0x00 },
+ 16, 0xd4d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x04,0xa1,0x83,0x2c },
+ 16, 0xd4e0, 0, {0x03,0x0a,0x10,0x82,0xc1,0x34,0x10,0x8f,0x00,0x40,0x09,0x14,0x02,0x03,0x14,0x91 },
+ 16, 0xd4f0, 0, {0x00,0x08,0x42,0x0b,0x18,0x82,0xc4,0x00,0x31,0xca,0x0c,0x52,0x02,0x10,0x80,0x85 },
+ 16, 0xd500, 0, {0x00,0x21,0x82,0x28,0x40,0x0a,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd510, 0, {0x00,0x00,0x0a,0x04,0x02,0x01,0x40,0x80,0x73,0x28,0x10,0x48,0x07,0x06,0x01,0x04 },
+ 16, 0xd520, 0, {0xa4,0x41,0x21,0x14,0x08,0x44,0x06,0x11,0x40,0x80,0x70,0x20,0x14,0x0a,0x04,0x02 },
+ 16, 0xd530, 0, {0x00,0xc8,0x84,0x41,0x21,0x1c,0x08,0x06,0x12,0x01,0xc0,0x80,0x60,0x20,0x14,0x00 },
+ 16, 0xd540, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x84,0x04,0x21,0x82,0x08 },
+ 16, 0xd550, 0, {0x53,0x02,0x10,0x80,0xc5,0x00,0x81,0x4a,0x04,0x42,0x02,0x14,0x00,0x04,0x20,0x21 },
+ 16, 0xd560, 0, {0x80,0xa8,0x72,0x22,0x1c,0x88,0xc4,0x06,0xa1,0x42,0x8c,0x52,0x22,0x1c,0x88,0x85 },
+ 16, 0xd570, 0, {0x26,0x21,0xc0,0x88,0x50,0x22,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd580, 0, {0x00,0x00,0x02,0x44,0x00,0x01,0x01,0x00,0x62,0x00,0x10,0x00,0x04,0x00,0x01,0x01 },
+ 16, 0xd590, 0, {0x20,0x40,0x00,0x1c,0x00,0x44,0x04,0x01,0x02,0x20,0x62,0x00,0x1c,0x80,0x04,0x04 },
+ 16, 0xd5a0, 0, {0x80,0x89,0x20,0x50,0x08,0x14,0x80,0x04,0x24,0x01,0xc1,0x00,0x50,0x00,0x18,0x00 },
+ 16, 0xd5b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x80,0x38,0x20,0x04,0x0c },
+ 16, 0xd5c0, 0, {0x31,0x0a,0x00,0x00,0x02,0x18,0x20,0x8c,0xa8,0x10,0x28,0x08,0x88,0xc1,0x14,0x10 },
+ 16, 0xd5d0, 0, {0xc6,0x00,0x22,0x03,0x08,0x02,0x01,0x08,0xb0,0x00,0x0c,0x21,0x02,0x00,0x82,0x80 },
+ 16, 0xd5e0, 0, {0x08,0x00,0x49,0x08,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd5f0, 0, {0x00,0x00,0x00,0x01,0x00,0x80,0x08,0x20,0x03,0x00,0x04,0x02,0x43,0x20,0x00,0x40 },
+ 16, 0xd600, 0, {0x00,0x20,0x00,0x04,0x42,0x01,0x10,0x80,0x84,0x20,0x11,0x08,0x04,0x00,0x00,0x00 },
+ 16, 0xd610, 0, {0x00,0x44,0x24,0x20,0x09,0x08,0x40,0x03,0x00,0x90,0xc4,0x20,0x20,0x08,0x0c,0x02 },
+ 16, 0xd620, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x81,0x08,0x20,0x04,0x88 },
+ 16, 0xd630, 0, {0x02,0x22,0x08,0x08,0xc3,0x2a,0x90,0x40,0x84,0x10,0x20,0x04,0x80,0xc2,0x26,0x20 },
+ 16, 0xd640, 0, {0x49,0x88,0x22,0x22,0x0c,0x08,0xc1,0x26,0xa0,0xc9,0x8c,0x12,0x2a,0x04,0x88,0x43 },
+ 16, 0xd650, 0, {0x0e,0xa0,0xcb,0x88,0x10,0x22,0x0c,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd660, 0, {0x08,0x00,0x0a,0x40,0x32,0x00,0x01,0x80,0x31,0x28,0x00,0x00,0x01,0x12,0x80,0x8d },
+ 16, 0xd670, 0, {0x84,0x00,0x28,0x0c,0x08,0x01,0x32,0x00,0x8c,0x80,0x02,0x20,0x0c,0x08,0x01,0x2e },
+ 16, 0xd680, 0, {0x00,0xc3,0x80,0x02,0x20,0x04,0x08,0x43,0x02,0x00,0x40,0x80,0x10,0x20,0x04,0x02 },
+ 16, 0xd690, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x87,0x0a,0x21,0x04,0x88 },
+ 16, 0xd6a0, 0, {0x11,0x2a,0x1c,0x0a,0x06,0x22,0x21,0x40,0xa0,0x42,0x2a,0x10,0x88,0x85,0x0a,0xa1 },
+ 16, 0xd6b0, 0, {0x06,0xa4,0x62,0x22,0x1c,0x0a,0xc4,0x02,0x21,0x80,0x8c,0x52,0x22,0x14,0x48,0x86 },
+ 16, 0xd6c0, 0, {0x22,0x20,0x08,0xa8,0x60,0x2a,0x14,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd6d0, 0, {0x00,0x00,0x08,0x45,0x06,0x01,0x89,0x80,0x63,0x20,0x1c,0x88,0x40,0x34,0x11,0x01 },
+ 16, 0xd6e0, 0, {0xa4,0x50,0x28,0x18,0x48,0x04,0x0e,0x01,0x4b,0x80,0x73,0x28,0x1c,0x8a,0x04,0x06 },
+ 16, 0xd6f0, 0, {0x91,0x49,0x04,0x63,0x20,0x1c,0x8a,0x06,0x26,0x01,0x85,0x80,0x70,0x20,0x18,0x02 },
+ 16, 0xd700, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x85,0x00,0xb1,0x45,0x2c },
+ 16, 0xd710, 0, {0x70,0x02,0x14,0xc0,0x07,0x08,0x21,0x49,0x00,0x42,0x01,0x14,0x82,0x05,0x00,0x11 },
+ 16, 0xd720, 0, {0x84,0x00,0x52,0x02,0x1c,0x00,0xc4,0x00,0x21,0xc4,0x2c,0x53,0x02,0x1c,0x02,0x81 },
+ 16, 0xd730, 0, {0x04,0xa1,0xcd,0x08,0x50,0x02,0x14,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd740, 0, {0x08,0x10,0x12,0x04,0x34,0x01,0xcc,0x00,0x73,0x40,0x1c,0x90,0x45,0x04,0x01,0x48 },
+ 16, 0xd750, 0, {0x04,0x60,0x41,0x18,0xc0,0x44,0x04,0x01,0x05,0x04,0x73,0x48,0x14,0x50,0x47,0x34 },
+ 16, 0xd760, 0, {0x01,0x45,0x20,0x62,0x08,0x1c,0xc2,0x04,0x0c,0x81,0xc7,0x00,0x73,0x80,0x18,0xc2 },
+ 16, 0xd770, 0, {0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x84,0x10,0x21,0xcc,0x28 },
+ 16, 0xd780, 0, {0x42,0x02,0x14,0x12,0xc5,0x10,0x21,0x84,0x04,0x40,0x00,0x1c,0x80,0x84,0x00,0x91 },
+ 16, 0xd790, 0, {0x00,0x08,0x73,0x82,0x1c,0x90,0x05,0x0c,0x01,0xcf,0x0c,0x40,0x02,0x14,0x30,0x45 },
+ 16, 0xd7a0, 0, {0x20,0xa1,0xc0,0x08,0x50,0x02,0x10,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd7b0, 0, {0x00,0x00,0x00,0x45,0x0c,0x81,0x00,0x00,0x01,0x08,0x08,0x00,0x05,0x18,0x91,0x05 },
+ 16, 0xd7c0, 0, {0x04,0x00,0x01,0x04,0x40,0x06,0x18,0x00,0x02,0x24,0x70,0x40,0x04,0x00,0x40,0x00 },
+ 16, 0xd7d0, 0, {0x01,0xc4,0x24,0x00,0x88,0x04,0x00,0x43,0x10,0x00,0x40,0x20,0x00,0x88,0x00,0x00 },
+ 16, 0xd7e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x85,0x24,0x31,0x02,0x0c },
+ 16, 0xd7f0, 0, {0x02,0xc2,0x04,0x10,0xc4,0x28,0x21,0x49,0x0c,0x02,0xc0,0x04,0xb2,0x06,0x1c,0x20 },
+ 16, 0xd800, 0, {0x03,0x08,0x50,0x42,0x0c,0x80,0x01,0x04,0xa1,0x49,0x0c,0x00,0xc2,0x0c,0x10,0x43 },
+ 16, 0xd810, 0, {0x24,0xa0,0xc1,0x08,0x10,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd820, 0, {0x00,0x10,0xa2,0x00,0x20,0x00,0xcd,0x00,0x00,0x40,0x04,0x20,0x01,0x10,0x00,0x09 },
+ 16, 0xd830, 0, {0x04,0x02,0x49,0x0c,0x92,0x07,0x30,0x00,0x00,0x00,0x33,0x08,0x0c,0x92,0x41,0x00 },
+ 16, 0xd840, 0, {0x80,0xcc,0x00,0x00,0x00,0x0c,0x00,0x43,0x28,0x80,0xc2,0x00,0x10,0x00,0x00,0x00 },
+ 16, 0xd850, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x10,0x50,0x80,0x00,0x00 },
+ 16, 0xd860, 0, {0x10,0x00,0x00,0xf0,0x00,0x10,0x80,0x00,0x00,0x00,0x80,0x00,0xd0,0x80,0x80,0x00 },
+ 16, 0xd870, 0, {0x00,0x00,0x00,0x80,0x10,0x90,0x80,0x80,0x00,0x00,0x00,0x00,0x80,0x10,0x90,0x80 },
+ 16, 0xd880, 0, {0x00,0x00,0x00,0x00,0x00,0xc0,0x10,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd890, 0, {0x3c,0x3c,0x10,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x10,0x90,0xa0,0x80,0x00,0x00 },
+ 16, 0xd8a0, 0, {0x00,0x00,0x40,0x10,0x90,0x80,0xa0,0x00,0x00,0x00,0x00,0xc0,0x10,0x90,0x80,0xa0 },
+ 16, 0xd8b0, 0, {0x00,0x00,0x00,0x20,0x80,0x10,0x90,0xa0,0xa0,0x00,0x00,0x00,0x00,0x80,0x10,0x8f },
+ 16, 0xd8c0, 0, {0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xc2,0xe4,0x81,0x80,0x3f },
+ 16, 0xd8d0, 0, {0xd9,0xbf,0xd9,0x98,0x71,0x9d,0x42,0x80,0x00,0x26,0x7f,0xe6,0x72,0xab,0x7c,0x3a },
+ 16, 0xd8e0, 0, {0x40,0x00,0x19,0x80,0x26,0x48,0xdd,0x3c,0x91,0xc0,0x26,0x40,0x26,0x40,0x38,0x31 },
+ 16, 0xd8f0, 0, {0xdb,0x61,0xc0,0x19,0x99,0xbf,0xc9,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd900, 0, {0x00,0x00,0x10,0x80,0x10,0x14,0x80,0x06,0x84,0x97,0x96,0x86,0x96,0x06,0x90,0x00 },
+ 16, 0xd910, 0, {0x3f,0xa1,0x28,0x01,0x02,0x90,0x12,0x00,0x80,0x17,0x88,0x16,0x9e,0x90,0x90,0x04 },
+ 16, 0xd920, 0, {0x10,0x00,0x36,0xbe,0xbe,0x9e,0x86,0x16,0x12,0x84,0x80,0x13,0xbe,0x97,0xae,0x80 },
+ 16, 0xd930, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x82 },
+ 16, 0xd940, 0, {0x81,0x84,0x21,0x40,0x00,0x00,0x00,0x08,0xa1,0x38,0x01,0x78,0x00,0x00,0x00,0x00 },
+ 16, 0xd950, 0, {0x08,0xb8,0x21,0x72,0x68,0x80,0x00,0x00,0x00,0x08,0x98,0x44,0x88,0x68,0x80,0x00 },
+ 16, 0xd960, 0, {0x00,0x00,0x08,0xb8,0x01,0x78,0x01,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd970, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xf7,0xaf,0xff,0xc0 },
+ 16, 0xd980, 0, {0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff },
+ 16, 0xd990, 0, {0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xbf,0xff,0xc0,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd9a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 },
+ 16, 0xd9b0, 0, {0x00,0x00,0x00,0x3f,0xff,0xff,0x7f,0x40,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff },
+ 16, 0xd9c0, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff },
+ 16, 0xd9d0, 0, {0x2f,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xd9e0, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0x7f,0xc0 },
+ 16, 0xd9f0, 0, {0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff },
+ 16, 0xda00, 0, {0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0x7f,0x80,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xda10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 },
+ 16, 0xda20, 0, {0x00,0x00,0x00,0x3f,0xff,0xbf,0xbf,0xc0,0x00,0x00,0x00,0x00,0x3f,0xdf,0xbf,0xdf },
+ 16, 0xda30, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xef,0xff,0xff,0x80,0x00,0x00,0x00,0x00,0x3f,0xdf },
+ 16, 0xda40, 0, {0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xda50, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0x3e,0xaf,0xff,0xc0 },
+ 16, 0xda60, 0, {0x00,0x00,0x00,0x00,0x1f,0xff,0xdf,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xe7,0xfe },
+ 16, 0xda70, 0, {0xef,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xdf,0xc0,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xda80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 },
+ 16, 0xda90, 0, {0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x2f,0xf7,0xff,0xff },
+ 16, 0xdaa0, 0, {0xc0,0x00,0x00,0x00,0x00,0x2f,0xff,0xff,0xdf,0xc0,0x00,0x00,0x00,0x00,0x3f,0xf7 },
+ 16, 0xdab0, 0, {0xdf,0xf7,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdac0, 0, {0x00,0x00,0x02,0xc4,0x00,0xb1,0xc3,0x2c,0x50,0x09,0x14,0x82,0xc4,0x30,0x91,0xc7 },
+ 16, 0xdad0, 0, {0x24,0x60,0x08,0x1c,0x82,0x07,0x34,0x91,0x4c,0x04,0x43,0x0a,0x10,0xc2,0x84,0x04 },
+ 16, 0xdae0, 0, {0x91,0x84,0x24,0x52,0x0b,0x18,0x02,0xc4,0x24,0xb1,0xc3,0x2c,0x40,0x0a,0x10,0x80 },
+ 16, 0xdaf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0x02,0x01,0xc4,0x80 },
+ 16, 0xdb00, 0, {0x60,0x20,0x1c,0x08,0x44,0x22,0x01,0xc0,0x84,0x50,0x01,0x9c,0x08,0x07,0x0a,0x01 },
+ 16, 0xdb10, 0, {0xc0,0x84,0x72,0x20,0x1c,0xc8,0x04,0x12,0x11,0x44,0x80,0x41,0x01,0x1c,0x80,0x07 },
+ 16, 0xdb20, 0, {0x08,0x11,0xc4,0x00,0x70,0x00,0x10,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdb30, 0, {0x00,0x00,0x00,0x86,0x2c,0x21,0x4a,0x0c,0x52,0x02,0x1c,0x80,0x04,0x20,0x21,0xca },
+ 16, 0xdb40, 0, {0x10,0x62,0x02,0x1c,0x81,0x47,0x04,0x21,0xc3,0x20,0x51,0x01,0x1c,0x80,0x04,0x2c },
+ 16, 0xdb50, 0, {0x01,0xcb,0x04,0x52,0x03,0x14,0x40,0xc7,0x20,0x31,0xc8,0x0c,0x50,0x22,0x10,0x80 },
+ 16, 0xdb60, 0, {0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x20,0x01,0x89,0x00 },
+ 16, 0xdb70, 0, {0x52,0x00,0x14,0x80,0x04,0x28,0x01,0x45,0x04,0x62,0x00,0x10,0x80,0x46,0x30,0x11 },
+ 16, 0xdb80, 0, {0x0d,0x00,0x42,0x01,0x14,0xc0,0x44,0x00,0x11,0x05,0x00,0x50,0x00,0x1c,0x00,0x44 },
+ 16, 0xdb90, 0, {0x28,0x01,0x49,0x00,0x70,0x00,0x10,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdba0, 0, {0x00,0x00,0x08,0xc0,0x02,0x30,0x0c,0x8c,0x30,0x22,0x08,0x88,0xc2,0x26,0x00,0x08 },
+ 16, 0xdbb0, 0, {0x80,0x20,0x22,0x0c,0x88,0x81,0x02,0x10,0xc4,0x80,0x10,0x22,0x0c,0x08,0x40,0x02 },
+ 16, 0xdbc0, 0, {0x10,0x48,0x88,0x01,0x23,0x04,0xc8,0x42,0x02,0x10,0x46,0x8c,0x12,0x22,0x00,0x00 },
+ 16, 0xdbd0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0xc8,0x20 },
+ 16, 0xdbe0, 0, {0x11,0x09,0x00,0x80,0x41,0x10,0x90,0x08,0x24,0x30,0x08,0x04,0x42,0x41,0x00,0x90 },
+ 16, 0xdbf0, 0, {0xc4,0x20,0x00,0x08,0x04,0x42,0x00,0x10,0x80,0x4c,0x20,0x23,0x09,0x04,0xc2,0x43 },
+ 16, 0xdc00, 0, {0x30,0x80,0x40,0x20,0x11,0x08,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdc10, 0, {0x08,0x00,0x08,0x81,0x02,0x20,0xc9,0x8c,0x12,0x20,0x04,0x48,0x41,0x22,0x00,0x09 },
+ 16, 0xdc20, 0, {0x88,0x30,0x20,0x0c,0x88,0x03,0x0e,0x00,0x49,0x8c,0x10,0x22,0x0c,0x88,0x40,0x2e },
+ 16, 0xdc30, 0, {0x00,0xc9,0x84,0x13,0x21,0x04,0xc8,0xc3,0x22,0x00,0xcb,0x8c,0x32,0x22,0x00,0x00 },
+ 16, 0xdc40, 0, {0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x01,0x02,0x00,0x4b,0x80 },
+ 16, 0xdc50, 0, {0x32,0x21,0x08,0x88,0x41,0x02,0x10,0x0f,0x80,0x10,0x21,0x8c,0x08,0x41,0x02,0x00 },
+ 16, 0xdc60, 0, {0x87,0x84,0x10,0x20,0x04,0x88,0x00,0x02,0x00,0x47,0x80,0x10,0x21,0x0c,0x88,0x41 },
+ 16, 0xdc70, 0, {0x16,0x10,0x46,0x80,0x30,0x20,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdc80, 0, {0x00,0x00,0x0a,0xc4,0x22,0xa1,0x08,0xa4,0x72,0x2a,0x14,0x0a,0x85,0x02,0x81,0x84 },
+ 16, 0xdc90, 0, {0xa0,0x42,0x28,0x1c,0x0a,0xc5,0x02,0x91,0x40,0xb8,0x73,0x29,0x10,0xca,0xc4,0x02 },
+ 16, 0xdca0, 0, {0xa1,0x80,0xa4,0x42,0x2a,0x14,0xca,0x85,0x22,0x91,0x80,0xa8,0x70,0x2a,0x18,0x02 },
+ 16, 0xdcb0, 0, {0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x04,0x1e,0x01,0xc8,0x80 },
+ 16, 0xdcc0, 0, {0x43,0x20,0x18,0x08,0x45,0x3e,0x01,0x0c,0x80,0x61,0x20,0x9c,0x48,0x06,0x12,0x81 },
+ 16, 0xdcd0, 0, {0xc0,0x80,0x73,0x00,0x10,0x88,0x06,0x02,0x01,0xc8,0x00,0x42,0x20,0x10,0xc8,0x07 },
+ 16, 0xdce0, 0, {0x02,0x11,0xcd,0x80,0x51,0x20,0x14,0x82,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdcf0, 0, {0x08,0x00,0x00,0xc4,0x24,0x21,0xc8,0x0c,0x42,0x01,0x14,0x00,0x00,0x28,0x10,0x4c },
+ 16, 0xdd00, 0, {0x08,0x52,0x02,0x14,0x80,0x45,0x24,0x29,0x40,0x04,0x72,0x00,0x10,0xc0,0x05,0x24 },
+ 16, 0xdd10, 0, {0x11,0x44,0x08,0x43,0x01,0x14,0xc0,0x47,0x24,0x20,0x48,0x08,0x72,0x02,0x10,0x00 },
+ 16, 0xdd20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x00,0x07,0x10,0x11,0x06,0x00 },
+ 16, 0xdd30, 0, {0x72,0x00,0x18,0xd0,0x46,0x20,0x01,0x4d,0x00,0x71,0x40,0x10,0x50,0x07,0x30,0x11 },
+ 16, 0xdd40, 0, {0xc3,0x00,0x71,0x41,0x10,0xb0,0x05,0x2c,0x01,0x49,0x00,0x43,0x00,0x1c,0x50,0x45 },
+ 16, 0xdd50, 0, {0x30,0x01,0x8c,0x00,0x61,0x40,0x18,0x42,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdd60, 0, {0x00,0x00,0x30,0xc5,0x00,0x21,0xc0,0x0c,0x40,0x01,0x14,0x12,0x44,0x04,0x31,0x84 },
+ 16, 0xdd70, 0, {0x24,0x40,0x80,0x14,0xa1,0xc7,0x00,0x01,0x40,0x08,0x40,0x01,0x14,0x20,0x05,0x20 },
+ 16, 0xdd80, 0, {0x11,0xc0,0x02,0x60,0x82,0x18,0x00,0x87,0x24,0x11,0x40,0x08,0x40,0x42,0x10,0x02 },
+ 16, 0xdd90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x0c,0x80,0xc4,0x24 },
+ 16, 0xdda0, 0, {0x31,0x48,0x0c,0x00,0x01,0x08,0xc1,0x41,0x00,0x00,0x49,0x00,0x42,0x03,0x08,0x10 },
+ 16, 0xddb0, 0, {0x80,0x20,0x21,0x09,0x0c,0x02,0x02,0x18,0x80,0xc1,0x24,0x30,0x08,0x0c,0x42,0x01 },
+ 16, 0xddc0, 0, {0x10,0x80,0x83,0x20,0x11,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xddd0, 0, {0x00,0x00,0x10,0xc1,0x04,0x20,0x48,0x0c,0x12,0x42,0x04,0x00,0x83,0x00,0x31,0x48 },
+ 16, 0xdde0, 0, {0x00,0x02,0x41,0x04,0xa0,0x07,0x0c,0x20,0x40,0x00,0x12,0xc2,0x0c,0x80,0xc1,0x20 },
+ 16, 0xddf0, 0, {0x20,0xc8,0x00,0x12,0xc1,0x0c,0xb0,0x41,0x20,0x00,0x49,0x08,0x02,0x42,0x00,0x00 },
+ 16, 0xde00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x80,0x01,0x00,0x10,0x81,0x00 },
+ 16, 0xde10, 0, {0x30,0x40,0x08,0x20,0x03,0x00,0x10,0xc1,0x20,0x02,0x00,0x04,0x80,0x40,0x30,0x90 },
+ 16, 0xde20, 0, {0x01,0x14,0x02,0x40,0x04,0x80,0x40,0x20,0x00,0x09,0x04,0x32,0x01,0x08,0xa0,0x03 },
+ 16, 0xde30, 0, {0x04,0x10,0x08,0x00,0x22,0x40,0x00,0x00,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xde40, 0, {0x00,0x00,0x30,0x00,0x10,0x80,0x00,0x00,0x00,0x40,0x00,0xf0,0x00,0x00,0x00,0x00 },
+ 16, 0xde50, 0, {0x00,0x10,0x80,0x00,0xf0,0x00,0x80,0x80,0x00,0x00,0x20,0x00,0x00,0xf0,0x10,0xa0 },
+ 16, 0xde60, 0, {0x00,0x00,0x00,0x20,0x00,0x00,0xf0,0x00,0x10,0x00,0x00,0x00,0x20,0x80,0x00,0xcc },
+ 16, 0xde70, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x3c,0x10,0xa0,0x80,0x00,0x00,0x00 },
+ 16, 0xde80, 0, {0x00,0x00,0x10,0x90,0x80,0xc0,0x40,0x00,0x00,0x00,0x00,0x10,0x90,0x80,0x80,0x00 },
+ 16, 0xde90, 0, {0x00,0x00,0x00,0x00,0x10,0x90,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x10,0x90,0x80 },
+ 16, 0xdea0, 0, {0xe0,0x00,0x00,0x00,0x00,0x00,0x10,0x8c,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdeb0, 0, {0x00,0x00,0x09,0x4d,0xb1,0xe9,0x00,0x26,0x40,0x2a,0x7f,0xe3,0xf2,0x54,0x98,0xc0 },
+ 16, 0xdec0, 0, {0x3f,0xe6,0x40,0x00,0x01,0x42,0x91,0xd0,0xc0,0x13,0xe5,0x87,0x63,0x83,0xb8,0xcd },
+ 16, 0xded0, 0, {0xf9,0x00,0x26,0x7f,0x00,0x00,0x35,0x2e,0xd5,0x03,0x40,0x3f,0xd9,0xbf,0xb1,0x80 },
+ 16, 0xdee0, 0, {0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x02,0x16,0x14,0x00,0x1c },
+ 16, 0xdef0, 0, {0xa8,0x3f,0x88,0x16,0x00,0x80,0x84,0x80,0x37,0x9e,0xba,0xa0,0x50,0x10,0x02,0x12 },
+ 16, 0xdf00, 0, {0x00,0x17,0x96,0x97,0x26,0x50,0x10,0x10,0x82,0x80,0x1e,0x80,0xde,0xbe,0x94,0x14 },
+ 16, 0xdf10, 0, {0x02,0x10,0x80,0x17,0xbe,0x81,0x94,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdf20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xa8,0x44,0x94,0x28,0x80,0x00,0x00,0x00,0x08 },
+ 16, 0xdf30, 0, {0x94,0x21,0x44,0x51,0x00,0x00,0x00,0x00,0x08,0x84,0x42,0x41,0x01,0x00,0x00,0x00 },
+ 16, 0xdf40, 0, {0x00,0x08,0xa1,0x72,0x23,0x41,0x40,0x00,0x00,0x00,0x08,0xb8,0x01,0x78,0x32,0x40 },
+ 16, 0xdf50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 },
+ 16, 0xdf60, 0, {0x00,0x00,0x00,0x3f,0xf7,0xfe,0xd7,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xd7,0xdf },
+ 16, 0xdf70, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0x7f,0xff,0xc0,0x00,0x00,0x00,0x00,0x37,0x7f },
+ 16, 0xdf80, 0, {0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdf90, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x1e,0xff,0xde,0x77,0xc0 },
+ 16, 0xdfa0, 0, {0x00,0x00,0x00,0x00,0x1f,0xef,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff },
+ 16, 0xdfb0, 0, {0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0x7f,0xc0,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xdfc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 },
+ 16, 0xdfd0, 0, {0x00,0x00,0x00,0x1f,0xcf,0xdf,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xbf },
+ 16, 0xdfe0, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xbf,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff },
+ 16, 0xdff0, 0, {0xff,0xbf,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe000, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0 },
+ 16, 0xe010, 0, {0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x1f,0xff,0x1f },
+ 16, 0xe020, 0, {0x7f,0xc0,0x00,0x00,0x00,0x00,0x2f,0xdf,0xff,0xcf,0xc0,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe030, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 },
+ 16, 0xe040, 0, {0x00,0x00,0x00,0x3f,0xbf,0xaf,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff },
+ 16, 0xe050, 0, {0xc0,0x00,0x00,0x00,0x00,0x3e,0xde,0x7f,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff },
+ 16, 0xe060, 0, {0xff,0xf7,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe070, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0x7f,0xff,0xff,0xc0 },
+ 16, 0xe080, 0, {0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xfe,0xbe },
+ 16, 0xe090, 0, {0x7f,0xc0,0x00,0x00,0x00,0x00,0x3e,0xff,0xd7,0x7f,0xc0,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe0a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe0b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe0c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe0d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe0e0, 0, {0x30,0x00,0x20,0x01,0x02,0x00,0x00,0x00,0x30,0x00,0x43,0x8e,0x00,0x00,0x00,0x00 },
+ 16, 0xe0f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe100, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe110, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe130, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe140, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe150, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe170, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe190, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe1a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe1b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe1c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe1d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe1e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe1f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe200, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe210, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe220, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe230, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe240, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe250, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe260, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe270, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe280, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe290, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe2a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe2b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe2c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe2d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe2e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe2f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe300, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe310, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe320, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe330, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe340, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe350, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe360, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe370, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe380, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe390, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe3a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe3b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe3c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe3d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe3e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe3f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe410, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe420, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe430, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe440, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe450, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe460, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe470, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe480, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe490, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe4a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe4b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe4c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe4d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe4e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe4f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe500, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe510, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe520, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe530, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe540, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe550, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe560, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe570, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe580, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe590, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe5a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe5b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe5c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe5d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe5e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe5f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe600, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe610, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe620, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe630, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe640, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe650, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe660, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe670, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe680, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe690, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe6a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe6b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe6c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe6d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe6e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe6f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe700, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe710, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe720, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe730, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe740, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe750, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe760, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe770, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe780, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe790, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe7a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe7b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe7c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe7d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe7e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe7f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe800, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe810, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe820, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe830, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe840, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe850, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe860, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe870, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe880, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe890, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe8a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe8b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe8c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe8d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe8e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe8f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe900, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe910, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe920, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe930, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe940, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe950, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe960, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe970, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe980, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe990, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe9a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe9b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe9c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe9d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe9e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xe9f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xea90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeaa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeab0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeac0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xead0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeae0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeaf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeb90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeba0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xebb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xebc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xebd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xebe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xebf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xec90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeca0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xecb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xecc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xecd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xece0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xecf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xed90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeda0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xedb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xedc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xedd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xede0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xedf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xee90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeea0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeeb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeec0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeed0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeee0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeef0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef20, 0, {0x00,0x00,0x00,0x00,0x30,0x00,0x20,0x01,0x02,0x02,0x00,0x00,0x30,0x00,0x43,0x80 },
+ 16, 0xef30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xef90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xefa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xefb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xefc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xefd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xefe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xeff0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf000, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf010, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf020, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf030, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf040, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf050, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf060, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf080, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf090, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf0a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf0b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf0c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf0d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf0e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf0f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf100, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf110, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf130, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf140, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf150, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf170, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf190, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf1a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf1b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf1c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf1d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf1e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf1f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf200, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf210, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf220, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf230, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf240, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf250, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf260, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf270, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf280, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf290, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf2a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf2b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf2c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf2d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf2e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf2f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf300, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf310, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf320, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf330, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf340, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf350, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf360, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf370, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf380, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf390, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf3a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf3b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf3c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf3d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf3e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf3f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf410, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf420, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf430, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf440, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf450, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf460, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf470, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf480, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf490, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf4a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf4b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf4c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf4d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf4e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf4f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf500, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf510, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf520, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf530, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf540, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf550, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf560, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf570, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf580, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf590, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf5a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf5b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf5c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf5d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf5e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf5f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf600, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf610, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf620, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf630, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf640, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf650, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf660, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf670, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf680, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf690, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf6a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf6b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf6c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf6d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf6e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf6f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf700, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf710, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf720, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf730, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf740, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf750, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf760, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf770, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf780, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf790, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf7a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf7b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf7c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf7d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf7e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf7f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf800, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf810, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf820, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf830, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf840, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf850, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf860, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf870, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf880, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf890, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf8a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf8b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf8c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf8d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf8e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf8f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf900, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf910, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf920, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf930, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf940, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf950, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf960, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf970, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf980, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf990, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf9a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf9b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf9c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf9d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf9e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xf9f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfa90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfaa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfab0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfac0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfad0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfae0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfaf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfb90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfba0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfbb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfbc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfbd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfbe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfbf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfc90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfca0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfcb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfcc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfcd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfce0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfcf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd30, 0, {0x30,0x00,0x00,0x01,0x00,0x00,0x5f,0xa7,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x03 },
+ 16, 0xfd40, 0, {0x30,0x00,0x40,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 16, 0xfd70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01 },
+ 16, 0xfd80, 0, {0x00,0x00,0x00,0x05,0x30,0x00,0xa0,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x01 },
+ 16, 0xfd90, 0, {0x00,0x00,0x6b,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ 4, 0xfda0, 0, {0x00,0x00,0x00,0x00 },
+ 0 , 0x0000, 1, {0}
+};
+// VERSION= 1.0.0.191
+// DATE= 2002oct28
+static INTEL_HEX_RECORD g_HexMidiFw62[] = {
+ 3,0x0000,0,{0x02,0x46,0xb9},
+ 3,0x0003,0,{0x02,0x0f,0xfd},
+ 3,0x000b,0,{0x02,0x4e,0x0f},
+ 3,0x0013,0,{0x02,0x17,0xfd},
+ 3,0x001b,0,{0x02,0x4e,0x12},
+ 3,0x0023,0,{0x02,0x4d,0xef},
+ 3,0x002b,0,{0x02,0x48,0x00},
+ 3,0x0033,0,{0x02,0x4d,0xe6},
+ 3,0x003b,0,{0x02,0x4d,0xf6},
+ 3,0x0043,0,{0x02,0x49,0x00},
+ 3,0x004b,0,{0x02,0x4e,0x03},
+ 3,0x0053,0,{0x02,0x48,0xfa},
+ 3,0x005b,0,{0x02,0x4d,0xfd},
+ 3,0x0063,0,{0x02,0x4e,0x07},
+ 16,0x0500,0,{0x12,0x01,0x10,0x01,0x00,0x00,0x00,0x40,0x6a,0x08,0x11,0x01,0x00,0x01,0x01,0x02},
+ 16,0x0510,0,{0x00,0x01,0x09,0x02,0x08,0x02,0x05,0x01,0x00,0x80,0x32,0x09,0x04,0x00,0x00,0x00},
+ 16,0x0520,0,{0x01,0x01,0x00,0x00,0x0a,0x24,0x01,0x00,0x01,0x56,0x00,0x02,0x01,0x02,0x0c,0x24},
+ 16,0x0530,0,{0x02,0x01,0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x0d,0x24,0x06,0x05,0x01,0x02},
+ 16,0x0540,0,{0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x24,0x03,0x02,0x04,0x03,0x00,0x05,0x00},
+ 16,0x0550,0,{0x0c,0x24,0x02,0x03,0x05,0x02,0x00,0x06,0x00,0x00,0x00,0x00,0x15,0x24,0x06,0x06},
+ 16,0x0560,0,{0x03,0x02,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00},
+ 16,0x0570,0,{0x00,0x09,0x24,0x03,0x04,0x01,0x01,0x00,0x06,0x00,0x09,0x04,0x01,0x00,0x00,0x01},
+ 16,0x0580,0,{0x02,0x00,0x00,0x09,0x04,0x01,0x01,0x02,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x01},
+ 16,0x0590,0,{0x00,0x01,0x00,0x11,0x24,0x02,0x01,0x02,0x02,0x10,0x03,0x44,0xac,0x00,0x80,0xbb},
+ 16,0x05a0,0,{0x00,0x00,0x77,0x01,0x09,0x05,0x0a,0x05,0x84,0x01,0x01,0x00,0x8f,0x07,0x25,0x01},
+ 16,0x05b0,0,{0x01,0x00,0x00,0x00,0x09,0x05,0x8f,0x01,0x03,0x00,0x01,0x05,0x00,0x09,0x04,0x01},
+ 16,0x05c0,0,{0x02,0x02,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x01,0x00,0x01,0x00,0x11,0x24,0x02},
+ 16,0x05d0,0,{0x01,0x02,0x03,0x18,0x03,0x44,0xac,0x00,0x80,0xbb,0x00,0x00,0x77,0x01,0x09,0x05},
+ 16,0x05e0,0,{0x0a,0x05,0x46,0x02,0x01,0x00,0x8f,0x07,0x25,0x01,0x01,0x00,0x00,0x00,0x09,0x05},
+ 16,0x05f0,0,{0x8f,0x01,0x03,0x00,0x01,0x05,0x00,0x09,0x04,0x02,0x00,0x00,0x01,0x02,0x00,0x00},
+ 16,0x0600,0,{0x09,0x04,0x02,0x01,0x01,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00},
+ 16,0x0610,0,{0x0e,0x24,0x02,0x01,0x06,0x02,0x10,0x02,0x44,0xac,0x00,0x80,0xbb,0x00,0x09,0x05},
+ 16,0x0620,0,{0x8c,0x05,0x4c,0x02,0x01,0x00,0x00,0x07,0x25,0x01,0x00,0x02,0x00,0x00,0x09,0x04},
+ 16,0x0630,0,{0x02,0x02,0x01,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00,0x0e,0x24},
+ 16,0x0640,0,{0x02,0x01,0x06,0x03,0x18,0x02,0x44,0xac,0x00,0x80,0xbb,0x00,0x09,0x05,0x8c,0x05},
+ 16,0x0650,0,{0x72,0x03,0x01,0x00,0x00,0x07,0x25,0x01,0x00,0x02,0x00,0x00,0x09,0x04,0x02,0x03},
+ 16,0x0660,0,{0x01,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00,0x11,0x24,0x02,0x01},
+ 16,0x0670,0,{0x02,0x02,0x10,0x03,0x44,0xac,0x00,0x80,0xbb,0x00,0x00,0x77,0x01,0x09,0x05,0x8c},
+ 16,0x0680,0,{0x05,0x84,0x01,0x01,0x00,0x00,0x07,0x25,0x01,0x00,0x02,0x00,0x00,0x09,0x04,0x02},
+ 16,0x0690,0,{0x04,0x01,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00,0x11,0x24,0x02},
+ 16,0x06a0,0,{0x01,0x02,0x03,0x18,0x03,0x44,0xac,0x00,0x80,0xbb,0x00,0x00,0x77,0x01,0x09,0x05},
+ 16,0x06b0,0,{0x8c,0x05,0x46,0x02,0x01,0x00,0x00,0x07,0x25,0x01,0x00,0x02,0x00,0x00,0x09,0x04},
+ 16,0x06c0,0,{0x03,0x00,0x00,0x01,0x01,0x00,0x00,0x09,0x24,0x01,0x00,0x01,0x09,0x00,0x01,0x04},
+ 16,0x06d0,0,{0x09,0x04,0x04,0x00,0x02,0x01,0x03,0x00,0x00,0x07,0x24,0x01,0x00,0x01,0x24,0x00},
+ 16,0x06e0,0,{0x06,0x24,0x02,0x01,0x07,0x00,0x09,0x24,0x03,0x02,0x08,0x01,0x07,0x01,0x00,0x06},
+ 16,0x06f0,0,{0x24,0x02,0x02,0x09,0x00,0x09,0x24,0x03,0x01,0x0a,0x01,0x09,0x01,0x00,0x09,0x05},
+ 16,0x0700,0,{0x01,0x02,0x04,0x00,0x00,0x00,0x00,0x05,0x25,0x01,0x01,0x07,0x09,0x05,0x81,0x02},
+ 16,0x0710,0,{0x04,0x00,0x00,0x00,0x00,0x05,0x25,0x01,0x01,0x0a,0x04,0x03,0x09,0x04,0x18,0x03},
+ 16,0x0720,0,{0x45,0x00,0x6d,0x00,0x61,0x00,0x67,0x00,0x69,0x00,0x63,0x00,0x20,0x00,0x47,0x00},
+ 16,0x0730,0,{0x6d,0x00,0x62,0x00,0x48,0x00,0x22,0x03,0x45,0x00,0x6d,0x00,0x61,0x00,0x67,0x00},
+ 16,0x0740,0,{0x69,0x00,0x63,0x00,0x20,0x00,0x45,0x00,0x4d,0x00,0x49,0x00,0x20,0x00,0x36,0x00},
+ 16,0x0750,0,{0x7c,0x00,0x32,0x00,0x20,0x00,0x6d,0x00,0x2a,0x03,0x43,0x00,0x6f,0x00,0x6e,0x00},
+ 16,0x0760,0,{0x66,0x00,0x69,0x00,0x67,0x00,0x75,0x00,0x72,0x00,0x61,0x00,0x74,0x00,0x69,0x00},
+ 16,0x0770,0,{0x6f,0x00,0x6e,0x00,0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00,0x69,0x00,0x6e,0x00},
+ 16,0x0780,0,{0x67,0x00,0x22,0x03,0x49,0x00,0x6e,0x00,0x74,0x00,0x65,0x00,0x72,0x00,0x66,0x00},
+ 16,0x0790,0,{0x61,0x00,0x63,0x00,0x65,0x00,0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00,0x69,0x00},
+ 6,0x07a0,0,{0x6e,0x00,0x67,0x00,0x00,0x00},
+ 16,0x07a6,0,{0xe4,0x90,0x76,0x66,0xf0,0x12,0x44,0xad,0x20,0x26,0x13,0x90,0x76,0x66,0xe0,0xc3},
+ 16,0x07b6,0,{0x94,0x02,0x50,0x0a,0xe0,0x04,0xf0,0xd2,0x42,0x12,0x4b,0x7f,0x80,0xea,0x30,0x26},
+ 16,0x07c6,0,{0x05,0x12,0x28,0x01,0xc2,0x26,0x30,0x25,0x2b,0x90,0x76,0x96,0xe0,0x54,0xfc,0xf0},
+ 16,0x07d6,0,{0x90,0x80,0x03,0xf0,0x12,0x14,0x96,0x90,0x76,0x96,0xe0,0x44,0x03,0xf0,0x90,0x80},
+ 16,0x07e6,0,{0x03,0xf0,0xe4,0x90,0x76,0x67,0xf0,0x90,0x76,0x67,0xe0,0x04,0xf0,0xe0,0xb4,0x4b},
+ 10,0x07f6,0,{0xf6,0x12,0x47,0xfa,0x12,0x41,0x1b,0x80,0xc5,0x22},
+ 16,0x0800,0,{0xe4,0x90,0x76,0x31,0xf0,0x90,0x76,0x31,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0f},
+ 16,0x0810,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xed,0xe0,0xfd,0xee,0x6d},
+ 16,0x0820,0,{0x60,0x0e,0xef,0xc3,0x94,0x0b,0x50,0x08,0x90,0x76,0x31,0xe0,0x04,0xf0,0x80,0xd5},
+ 16,0x0830,0,{0xef,0xb4,0x0b,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x03},
+ 16,0x0840,0,{0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x76,0x33,0xf0,0x24},
+ 16,0x0850,0,{0xf0,0x60,0x0a,0x24,0x0e,0x60,0x02,0x81,0x87,0x12,0x4b,0xc7,0x22,0x90,0x7f,0xed},
+ 16,0x0860,0,{0xe0,0x64,0x05,0x70,0x51,0x90,0x76,0x18,0x74,0x05,0xf0,0x90,0x76,0x37,0x74,0x01},
+ 16,0x0870,0,{0xf0,0x90,0x76,0x39,0x74,0x03,0xf0,0x90,0x76,0x21,0xf0,0xe4,0x90,0x76,0x20,0xf0},
+ 16,0x0880,0,{0x90,0x7f,0xea,0xe0,0xf4,0x60,0x2f,0x90,0x76,0x20,0xe0,0xff,0x75,0xf0,0x0a,0xa4},
+ 16,0x0890,0,{0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xea,0xe0,0xfd},
+ 16,0x08a0,0,{0xee,0x6d,0x60,0x12,0x90,0x76,0x21,0xe0,0xfe,0xef,0xc3,0x9e,0x50,0x08,0x90,0x76},
+ 16,0x08b0,0,{0x20,0xe0,0x04,0xf0,0x80,0xd1,0x90,0x7f,0xed,0xe0,0x64,0x06,0x70,0x52,0x90,0x76},
+ 16,0x08c0,0,{0x18,0x74,0x06,0xf0,0x90,0x76,0x37,0x74,0x04,0xf0,0x90,0x76,0x39,0x74,0x0a,0xf0},
+ 16,0x08d0,0,{0x90,0x76,0x21,0xf0,0x90,0x76,0x20,0x74,0x03,0xf0,0x90,0x7f,0xea,0xe0,0xf4,0x60},
+ 16,0x08e0,0,{0x2f,0x90,0x76,0x20,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34},
+ 16,0x08f0,0,{0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xea,0xe0,0xfd,0xee,0x6d,0x60,0x12,0x90,0x76},
+ 16,0x0900,0,{0x21,0xe0,0xfe,0xef,0xc3,0x9e,0x50,0x08,0x90,0x76,0x20,0xe0,0x04,0xf0,0x80,0xd1},
+ 16,0x0910,0,{0x90,0x76,0x20,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x0920,0,{0xf5,0x83,0xe0,0x90,0x72,0x29,0xf0,0xe4,0x90,0x76,0x3b,0xf0,0x90,0x76,0x21,0xe0},
+ 16,0x0930,0,{0xfe,0xef,0x6e,0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xeb},
+ 16,0x0940,0,{0xe0,0x14,0x60,0x13,0x14,0x70,0x02,0x21,0xe2,0x24,0x02,0x60,0x02,0x81,0x7f,0x90},
+ 16,0x0950,0,{0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x14,0x70,0x7c,0x90,0x7f},
+ 16,0x0960,0,{0xea,0xe0,0xf4,0x70,0x48,0x90,0x76,0x37,0xe0,0x90,0x76,0x20,0xf0,0x90,0x76,0x39},
+ 16,0x0970,0,{0xe0,0xfe,0x90,0x76,0x20,0xe0,0xfd,0xc3,0x9e,0x50,0x2b,0x90,0x76,0x3b,0xe0,0xfe},
+ 16,0x0980,0,{0x04,0xf0,0x74,0xc0,0x2e,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xfe,0xed,0x75},
+ 16,0x0990,0,{0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xee,0xf0,0x90,0x76},
+ 16,0x09a0,0,{0x20,0xe0,0x04,0xf0,0x80,0xc7,0x90,0x76,0x3f,0x74,0x01,0xf0,0x22,0x90,0x7e,0xc0},
+ 16,0x09b0,0,{0xe0,0xfe,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83},
+ 16,0x09c0,0,{0xee,0xf0,0xe0,0xb4,0x01,0x08,0x90,0x76,0x3e,0x74,0x01,0xf0,0x80,0x05,0xe4,0x90},
+ 16,0x09d0,0,{0x76,0x3e,0xf0,0x90,0x76,0x3f,0x74,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01},
+ 16,0x09e0,0,{0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x24,0xfe,0x70,0x02,0x41,0xa3,0x14,0x70,0x02,0x61},
+ 16,0x09f0,0,{0x3f,0x14,0x70,0x02,0x61,0xdb,0x24,0x03,0x60,0x02,0x81,0x77,0x90,0x7f,0xea,0xe0},
+ 16,0x0a00,0,{0xf4,0x70,0x6b,0x90,0x76,0x37,0xe0,0x90,0x76,0x20,0xf0,0x90,0x76,0x39,0xe0,0xff},
+ 16,0x0a10,0,{0x90,0x76,0x20,0xe0,0xfe,0xc3,0x9f,0x50,0x4e,0x90,0x76,0x3b,0xe0,0xff,0x04,0xf0},
+ 16,0x0a20,0,{0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0,0x0a},
+ 16,0x0a30,0,{0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x3b,0xe0},
+ 16,0x0a40,0,{0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff,0xee},
+ 16,0x0a50,0,{0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90},
+ 16,0x0a60,0,{0x76,0x20,0xe0,0x04,0xf0,0x80,0xa4,0x90,0x76,0x40,0x74,0x01,0xf0,0x22,0x90,0x7e},
+ 16,0x0a70,0,{0xc0,0xe0,0xff,0x90,0x76,0x20,0xe0,0xfe,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82},
+ 16,0x0a80,0,{0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x7e,0xc1,0xe0,0xff,0xee,0x75,0xf0,0x0a},
+ 16,0x0a90,0,{0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x41,0x74},
+ 16,0x0aa0,0,{0x01,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xf4,0x70,0x66,0x90,0x76,0x37,0xe0,0x90,0x76},
+ 16,0x0ab0,0,{0x20,0xf0,0x90,0x76,0x39,0xe0,0xff,0x90,0x76,0x20,0xe0,0xfe,0xc3,0x9f,0x40,0x02},
+ 16,0x0ac0,0,{0x81,0x8e,0x90,0x76,0x3b,0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34},
+ 16,0x0ad0,0,{0x7e,0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xae,0xf5,0x82,0xe4,0x34},
+ 16,0x0ae0,0,{0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x3b,0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5},
+ 16,0x0af0,0,{0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xaf,0xf5},
+ 16,0x0b00,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x20,0xe0,0x04,0xf0,0x80,0xa2},
+ 16,0x0b10,0,{0x90,0x7e,0xc0,0xe0,0xff,0x90,0x76,0x20,0xe0,0xfe,0x75,0xf0,0x0a,0xa4,0x24,0xae},
+ 16,0x0b20,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x7e,0xc1,0xe0,0xff,0xee,0x75},
+ 16,0x0b30,0,{0xf0,0x0a,0xa4,0x24,0xaf,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x22,0x90},
+ 16,0x0b40,0,{0x7f,0xea,0xe0,0xf4,0x70,0x66,0x90,0x76,0x37,0xe0,0x90,0x76,0x20,0xf0,0x90,0x76},
+ 16,0x0b50,0,{0x39,0xe0,0xff,0x90,0x76,0x20,0xe0,0xfe,0xc3,0x9f,0x40,0x02,0x81,0x8e,0x90,0x76},
+ 16,0x0b60,0,{0x3b,0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0},
+ 16,0x0b70,0,{0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef},
+ 16,0x0b80,0,{0xf0,0x90,0x76,0x3b,0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e},
+ 16,0x0b90,0,{0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x0ba0,0,{0xf5,0x83,0xef,0xf0,0x90,0x76,0x20,0xe0,0x04,0xf0,0x80,0xa2,0x90,0x7e,0xc0,0xe0},
+ 16,0x0bb0,0,{0xff,0x90,0x76,0x20,0xe0,0xfe,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82,0xe4,0x34},
+ 16,0x0bc0,0,{0x75,0xf5,0x83,0xef,0xf0,0x90,0x7e,0xc1,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24},
+ 16,0x0bd0,0,{0xb1,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xf4},
+ 16,0x0be0,0,{0x70,0x66,0x90,0x76,0x37,0xe0,0x90,0x76,0x20,0xf0,0x90,0x76,0x39,0xe0,0xff,0x90},
+ 16,0x0bf0,0,{0x76,0x20,0xe0,0xfe,0xc3,0x9f,0x40,0x02,0x81,0x8e,0x90,0x76,0x3b,0xe0,0xff,0x04},
+ 16,0x0c00,0,{0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0},
+ 16,0x0c10,0,{0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x3b},
+ 16,0x0c20,0,{0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff},
+ 16,0x0c30,0,{0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0},
+ 16,0x0c40,0,{0x90,0x76,0x20,0xe0,0x04,0xf0,0x80,0xa2,0x90,0x7e,0xc0,0xe0,0xff,0x90,0x76,0x20},
+ 16,0x0c50,0,{0xe0,0xfe,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef},
+ 16,0x0c60,0,{0xf0,0x90,0x7e,0xc1,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5,0x82,0xe4},
+ 16,0x0c70,0,{0x34,0x75,0xf5,0x83,0xef,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90},
+ 15,0x0c80,0,{0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22},
+ 16,0x0c8f,0,{0x41,0x76,0x68,0x01,0x41,0x76,0x6a,0x02,0x41,0x76,0x6b,0x0a,0xc1,0x20,0xc1,0x21},
+ 2,0x0c9f,0,{0xc1,0x2f},
+ 4,0x0ca1,0,{0x41,0x76,0x23,0x00},
+ 16,0x0ca5,0,{0x41,0x72,0x01,0x01,0x45,0x72,0x05,0x00,0x02,0xc9,0x00,0x00,0x45,0x72,0x0a,0x00},
+ 16,0x0cb5,0,{0x01,0x02,0x03,0x04,0x4d,0x72,0x0f,0xd1,0x00,0xd1,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0cc5,0,{0x28,0x28,0x09,0x00,0x4d,0x72,0x1c,0x01,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07},
+ 16,0x0cd5,0,{0x08,0x09,0x0a,0x0b,0x41,0x72,0x2e,0x22,0x41,0x72,0x2f,0x23,0x41,0x72,0x30,0x20},
+ 16,0x0ce5,0,{0x41,0x72,0x31,0x21,0x62,0xd2,0x72,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0cf5,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0d05,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0d15,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0d25,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0d35,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0d45,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0d55,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0d65,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x0d75,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01},
+ 16,0x0d85,0,{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01},
+ 16,0x0d95,0,{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01},
+ 16,0x0da5,0,{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01},
+ 16,0x0db5,0,{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02},
+ 16,0x0dc5,0,{0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02},
+ 16,0x0dd5,0,{0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02},
+ 16,0x0de5,0,{0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02},
+ 16,0x0df5,0,{0x02,0x02,0x02,0x02,0x02,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03},
+ 16,0x0e05,0,{0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03},
+ 16,0x0e15,0,{0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03},
+ 16,0x0e25,0,{0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03},
+ 16,0x0e35,0,{0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04},
+ 16,0x0e45,0,{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04},
+ 16,0x0e55,0,{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04},
+ 16,0x0e65,0,{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04},
+ 16,0x0e75,0,{0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05},
+ 16,0x0e85,0,{0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05},
+ 16,0x0e95,0,{0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05},
+ 16,0x0ea5,0,{0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x06,0x06},
+ 16,0x0eb5,0,{0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06},
+ 16,0x0ec5,0,{0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06},
+ 16,0x0ed5,0,{0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06},
+ 16,0x0ee5,0,{0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0x07,0x07,0x08,0x08},
+ 16,0x0ef5,0,{0x08,0x09,0x09,0x09,0x0a,0x0a,0x0a,0x0b,0x0b,0x0b,0x0c,0x0c,0x0c,0x0d,0x0d,0x0d},
+ 16,0x0f05,0,{0x0e,0x0e,0x0e,0x0f,0x0f,0x0f,0x10,0x10,0x10,0x11,0x11,0x11,0x12,0x12,0x12,0x13},
+ 16,0x0f15,0,{0x13,0x13,0x14,0x14,0x14,0x15,0x15,0x15,0x16,0x16,0x16,0x17,0x17,0x17,0x18,0x18},
+ 16,0x0f25,0,{0x18,0x19,0x19,0x19,0x19,0x1a,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1b,0x1c,0x1c,0x1c},
+ 16,0x0f35,0,{0x1c,0x1d,0x1d,0x1d,0x1d,0x1e,0x1e,0x1e,0x1e,0x1f,0x1f,0x1f,0x1f,0x20,0x20,0x20},
+ 16,0x0f45,0,{0x21,0x21,0x21,0x22,0x22,0x22,0x23,0x23,0x24,0x24,0x25,0x25,0x26,0x26,0x27,0x27},
+ 16,0x0f55,0,{0x28,0x28,0x29,0x29,0x2a,0x2a,0x2b,0x2b,0x2c,0x2c,0x2d,0x2d,0x2e,0x2e,0x2f,0x2f},
+ 16,0x0f65,0,{0x30,0x30,0x31,0x31,0x32,0x32,0x33,0x33,0x34,0x34,0x35,0x35,0x36,0x36,0x37,0x37},
+ 16,0x0f75,0,{0x38,0x38,0x39,0x39,0x3a,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,0x44},
+ 16,0x0f85,0,{0x45,0x46,0x47,0x48,0x49,0x49,0x4a,0x4b,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52},
+ 16,0x0f95,0,{0x53,0x54,0x55,0x55,0x56,0x56,0x57,0x57,0x58,0x5a,0x5b,0x5d,0x5e,0x5f,0x61,0x62},
+ 16,0x0fa5,0,{0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6f,0x71,0x72,0x73,0x74},
+ 16,0x0fb5,0,{0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7e,0x80,0x01,0x37,0x01,0x01,0x38,0x00},
+ 1,0x0fc5,0,{0x00},
+ 16,0x0fc6,0,{0xe4,0xff,0x74,0x46,0x2f,0xf5,0x82,0xe4,0x34,0x76,0xf5,0x83,0xe0,0xfe,0x74,0x20},
+ 16,0x0fd6,0,{0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x74,0x4e,0x2f,0xf5,0x82,0xe4},
+ 16,0x0fe6,0,{0x34,0x76,0xf5,0x83,0xe0,0xfe,0x74,0x30,0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83},
+ 6,0x0ff6,0,{0xee,0xf0,0x0f,0xbf,0x08,0xcc},
+ 1,0x0ffc,0,{0x22},
+ 3,0x0ffd,0,{0xc2,0x89,0x32},
+ 16,0x1000,0,{0xe4,0x90,0x76,0x2c,0xf0,0x90,0x76,0x2c,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0f},
+ 16,0x1010,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xed,0xe0,0xfd,0xee,0x6d},
+ 16,0x1020,0,{0x60,0x0e,0xef,0xc3,0x94,0x0b,0x50,0x08,0x90,0x76,0x2c,0xe0,0x04,0xf0,0x80,0xd5},
+ 16,0x1030,0,{0xef,0xb4,0x0b,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x03},
+ 16,0x1040,0,{0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x76,0x2e,0xf0,0x24},
+ 16,0x1050,0,{0xf0,0x60,0x0a,0x24,0x0f,0x60,0x02,0x81,0x7d,0x12,0x4b,0xa4,0x22,0x90,0x7f,0xed},
+ 16,0x1060,0,{0xe0,0x64,0x05,0x70,0x51,0x90,0x76,0x18,0x74,0x05,0xf0,0x90,0x76,0x38,0x74,0x01},
+ 16,0x1070,0,{0xf0,0x90,0x76,0x3a,0x74,0x03,0xf0,0x90,0x76,0x1c,0xf0,0xe4,0x90,0x76,0x1b,0xf0},
+ 16,0x1080,0,{0x90,0x7f,0xea,0xe0,0xf4,0x60,0x2f,0x90,0x76,0x1b,0xe0,0xff,0x75,0xf0,0x0a,0xa4},
+ 16,0x1090,0,{0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xea,0xe0,0xfd},
+ 16,0x10a0,0,{0xee,0x6d,0x60,0x12,0x90,0x76,0x1c,0xe0,0xfe,0xef,0xc3,0x9e,0x50,0x08,0x90,0x76},
+ 16,0x10b0,0,{0x1b,0xe0,0x04,0xf0,0x80,0xd1,0x90,0x7f,0xed,0xe0,0x64,0x06,0x70,0x52,0x90,0x76},
+ 16,0x10c0,0,{0x18,0x74,0x06,0xf0,0x90,0x76,0x38,0x74,0x04,0xf0,0x90,0x76,0x3a,0x74,0x0a,0xf0},
+ 16,0x10d0,0,{0x90,0x76,0x1c,0xf0,0x90,0x76,0x1b,0x74,0x03,0xf0,0x90,0x7f,0xea,0xe0,0xf4,0x60},
+ 16,0x10e0,0,{0x2f,0x90,0x76,0x1b,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34},
+ 16,0x10f0,0,{0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xea,0xe0,0xfd,0xee,0x6d,0x60,0x12,0x90,0x76},
+ 16,0x1100,0,{0x1c,0xe0,0xfe,0xef,0xc3,0x9e,0x50,0x08,0x90,0x76,0x1b,0xe0,0x04,0xf0,0x80,0xd1},
+ 16,0x1110,0,{0xe4,0x90,0x76,0x1e,0xf0,0x90,0x76,0x1c,0xe0,0xff,0x90,0x76,0x1b,0xe0,0xfe,0x6f},
+ 16,0x1120,0,{0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xeb,0xe0,0x14,0x60},
+ 16,0x1130,0,{0x13,0x14,0x70,0x02,0x21,0xbf,0x24,0x02,0x60,0x02,0x81,0x75,0x90,0x7f,0xb4,0xe0},
+ 16,0x1140,0,{0x44,0x01,0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x24,0x7f,0x70,0x6b,0x90,0x7f,0xea,0xe0},
+ 16,0x1150,0,{0xf4,0x70,0x4a,0x90,0x76,0x38,0xe0,0x90,0x76,0x1b,0xf0,0x90,0x76,0x3a,0xe0,0xff},
+ 16,0x1160,0,{0x90,0x76,0x1b,0xe0,0xfd,0xc3,0x9f,0x50,0x2b,0xed,0x75,0xf0,0x0a,0xa4,0x24,0xab},
+ 16,0x1170,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x76,0x1e,0xe0,0xfd,0x04,0xf0},
+ 16,0x1180,0,{0x74,0x00,0x2d,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xef,0xf0,0x90,0x76,0x1b,0xe0},
+ 16,0x1190,0,{0x04,0xf0,0x80,0xc7,0x90,0x76,0x1e,0xe0,0x90,0x7f,0xb5,0xf0,0x22,0xee,0x75,0xf0},
+ 16,0x11a0,0,{0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0},
+ 16,0x11b0,0,{0x90,0x7f,0xb5,0x74,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90},
+ 16,0x11c0,0,{0x7f,0xe9,0xe0,0x24,0x7e,0x70,0x02,0x41,0x7e,0x14,0x70,0x02,0x61,0x23,0x14,0x70},
+ 16,0x11d0,0,{0x02,0x61,0xc8,0x24,0x03,0x60,0x02,0x81,0x6d,0x90,0x7f,0xea,0xe0,0xf4,0x70,0x6d},
+ 16,0x11e0,0,{0x90,0x76,0x38,0xe0,0x90,0x76,0x1b,0xf0,0x90,0x76,0x3a,0xe0,0xff,0x90,0x76,0x1b},
+ 16,0x11f0,0,{0xe0,0xc3,0x9f,0x50,0x4f,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4},
+ 16,0x1200,0,{0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x76,0x1e,0xe0,0xfd,0x04,0xf0,0x74,0x00,0x2d},
+ 16,0x1210,0,{0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xee,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xad},
+ 16,0x1220,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x76,0x1e,0xe0,0xfe,0x04,0xf0},
+ 16,0x1230,0,{0x74,0x00,0x2e,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xef,0xf0,0x90,0x76,0x1b,0xe0},
+ 16,0x1240,0,{0x04,0xf0,0x80,0xa4,0x90,0x76,0x1e,0xe0,0x90,0x7f,0xb5,0xf0,0x22,0x90,0x76,0x1b},
+ 16,0x1250,0,{0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0},
+ 16,0x1260,0,{0x90,0x7f,0x00,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x1270,0,{0xf5,0x83,0xe0,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x22,0x90,0x7f},
+ 16,0x1280,0,{0xea,0xe0,0xf4,0x70,0x6d,0x90,0x76,0x38,0xe0,0x90,0x76,0x1b,0xf0,0x90,0x76,0x3a},
+ 16,0x1290,0,{0xe0,0xff,0x90,0x76,0x1b,0xe0,0xc3,0x9f,0x50,0x4f,0xe0,0xff,0x75,0xf0,0x0a,0xa4},
+ 16,0x12a0,0,{0x24,0xae,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x76,0x1e,0xe0,0xfd},
+ 16,0x12b0,0,{0x04,0xf0,0x74,0x00,0x2d,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xee,0xf0,0xef,0x75},
+ 16,0x12c0,0,{0xf0,0x0a,0xa4,0x24,0xaf,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x76},
+ 16,0x12d0,0,{0x1e,0xe0,0xfe,0x04,0xf0,0x74,0x00,0x2e,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xef},
+ 16,0x12e0,0,{0xf0,0x90,0x76,0x1b,0xe0,0x04,0xf0,0x80,0xa4,0x90,0x76,0x1e,0xe0,0x90,0x7f,0xb5},
+ 16,0x12f0,0,{0xf0,0x22,0x90,0x76,0x1b,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xae,0xf5,0x82,0xe4},
+ 16,0x1300,0,{0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xaf},
+ 16,0x1310,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5,0x74},
+ 16,0x1320,0,{0x02,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xf4,0x70,0x6d,0x90,0x76,0x38,0xe0,0x90,0x76},
+ 16,0x1330,0,{0x1b,0xf0,0x90,0x76,0x3a,0xe0,0xff,0x90,0x76,0x1b,0xe0,0xc3,0x9f,0x50,0x4f,0xe0},
+ 16,0x1340,0,{0xff,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe},
+ 16,0x1350,0,{0x90,0x76,0x1e,0xe0,0xfd,0x04,0xf0,0x74,0x00,0x2d,0xf5,0x82,0xe4,0x34,0x7f,0xf5},
+ 16,0x1360,0,{0x83,0xee,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x1370,0,{0x83,0xe0,0xff,0x90,0x76,0x1e,0xe0,0xfe,0x04,0xf0,0x74,0x00,0x2e,0xf5,0x82,0xe4},
+ 16,0x1380,0,{0x34,0x7f,0xf5,0x83,0xef,0xf0,0x90,0x76,0x1b,0xe0,0x04,0xf0,0x80,0xa4,0x90,0x76},
+ 16,0x1390,0,{0x1e,0xe0,0x90,0x7f,0xb5,0xf0,0x22,0x90,0x76,0x1b,0xe0,0xff,0x75,0xf0,0x0a,0xa4},
+ 16,0x13a0,0,{0x24,0xb0,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0,0xef,0x75},
+ 16,0x13b0,0,{0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x01},
+ 16,0x13c0,0,{0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xf4,0x70,0x6d,0x90},
+ 16,0x13d0,0,{0x76,0x38,0xe0,0x90,0x76,0x1b,0xf0,0x90,0x76,0x3a,0xe0,0xff,0x90,0x76,0x1b,0xe0},
+ 16,0x13e0,0,{0xc3,0x9f,0x50,0x4f,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34},
+ 16,0x13f0,0,{0x75,0xf5,0x83,0xe0,0xfe,0x90,0x76,0x1e,0xe0,0xfd,0x04,0xf0,0x74,0x00,0x2d,0xf5},
+ 16,0x1400,0,{0x82,0xe4,0x34,0x7f,0xf5,0x83,0xee,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5},
+ 16,0x1410,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x76,0x1e,0xe0,0xfe,0x04,0xf0,0x74},
+ 16,0x1420,0,{0x00,0x2e,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xef,0xf0,0x90,0x76,0x1b,0xe0,0x04},
+ 16,0x1430,0,{0xf0,0x80,0xa4,0x90,0x76,0x1e,0xe0,0x90,0x7f,0xb5,0xf0,0x22,0x90,0x76,0x1b,0xe0},
+ 16,0x1440,0,{0xff,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90},
+ 16,0x1450,0,{0x7f,0x00,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x1460,0,{0x83,0xe0,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x22,0x90,0x7f,0xb4},
+ 16,0x1470,0,{0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4},
+ 5,0x1480,0,{0xe0,0x44,0x01,0xf0,0x22},
+ 16,0x1485,0,{0x74,0x00,0xf5,0x86,0x90,0xfd,0xa5,0x7c,0x05,0xa3,0xe5,0x82,0x45,0x83,0x70,0xf9},
+ 1,0x1495,0,{0x22},
+ 16,0x1496,0,{0x90,0x7f,0xd6,0xe0,0x44,0x80,0xf0,0x43,0x87,0x01,0x00,0x00,0x00,0x00,0x00,0x22},
+ 16,0x14a6,0,{0xc0,0xd0,0xc0,0xe0,0x8f,0xe0,0xc0,0xe0,0x8e,0xe0,0xc0,0xe0,0x8d,0xe0,0xc0,0xe0},
+ 16,0x14b6,0,{0x8c,0xe0,0xc0,0xe0,0xc0,0x82,0xc0,0x83,0x05,0x86,0xc0,0x84,0xc0,0x85,0x7d,0x00},
+ 16,0x14c6,0,{0x90,0x7f,0xe3,0x74,0x7b,0xf0,0xa3,0x74,0x80,0xf0,0x7c,0x11,0x90,0x7f,0x99,0xe0},
+ 16,0x14d6,0,{0x54,0x40,0xdc,0x03,0x02,0x14,0xf3,0xb4,0x00,0x13,0x90,0x7f,0xe2,0x74,0x40,0xf0},
+ 16,0x14e6,0,{0x90,0x7f,0xe5,0xf0,0x90,0x7f,0xe2,0x74,0x00,0xf0,0x02,0x14,0xd2,0x90,0x76,0x90},
+ 16,0x14f6,0,{0xe0,0xb4,0x01,0x12,0x90,0x76,0x8f,0xe0,0x2d,0xfd,0x90,0x7f,0xe2,0x74,0x80,0xf0},
+ 16,0x1506,0,{0x90,0x7f,0x6c,0x02,0x15,0x57,0xb4,0x02,0x12,0x90,0x76,0x8f,0xe0,0x2d,0xfd,0x90},
+ 16,0x1516,0,{0x7f,0xe2,0x74,0x80,0xf0,0x90,0x7f,0x6c,0x02,0x15,0x96,0xb4,0x03,0x12,0x90,0x76},
+ 16,0x1526,0,{0x8f,0xe0,0x2d,0xfd,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x7f,0x6c,0x02,0x15,0xe1},
+ 16,0x1536,0,{0xb4,0x04,0x12,0x90,0x76,0x8f,0xe0,0x2d,0xfd,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90},
+ 16,0x1546,0,{0x7f,0x6c,0x02,0x16,0x10,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x7f,0x6c,0x02,0x16},
+ 16,0x1556,0,{0x40,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xdd,0xf2,0x7d},
+ 16,0x1566,0,{0x02,0x05,0x86,0x90,0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f,0x9b,0xe0,0x54,0x04,0xb4},
+ 16,0x1576,0,{0x00,0x05,0x05,0x86,0x02,0x16,0x40,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x05,0x86,0xf0},
+ 16,0x1586,0,{0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xdd,0xd4,0x02,0x16,0x40},
+ 16,0x1596,0,{0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0},
+ 16,0x15a6,0,{0xf0,0xf0,0xdd,0xec,0x7d,0x02,0x05,0x86,0x90,0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f},
+ 16,0x15b6,0,{0x9b,0xe0,0x54,0x04,0xb4,0x00,0x05,0x05,0x86,0x02,0x16,0x40,0x90,0x7f,0xe2,0x74},
+ 16,0x15c6,0,{0x80,0xf0,0x05,0x86,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0},
+ 6,0x15d6,0,{0xf0,0xf0,0xf0,0xf0,0xf0,0xf0},
+ 16,0x15dc,0,{0xdd,0xce,0x02,0x16,0x40,0xf0,0xf0,0xf0,0xf0,0xdd,0xfa,0x7d,0x02,0x05,0x86,0x90},
+ 16,0x15ec,0,{0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f,0x9b,0xe0,0x54,0x04,0xb4,0x00,0x05,0x05,0x86},
+ 16,0x15fc,0,{0x02,0x16,0x40,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x05,0x86,0xf0,0xf0,0xf0,0xf0,0xdd},
+ 16,0x160c,0,{0xdc,0x02,0x16,0x40,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xdd,0xf8,0x7d,0x02,0x05,0x86},
+ 16,0x161c,0,{0x90,0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f,0x9b,0xe0,0x54,0x04,0xb4,0x00,0x05,0x05},
+ 16,0x162c,0,{0x86,0x02,0x16,0x40,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x05,0x86,0xf0,0xf0,0xf0,0xf0},
+ 16,0x163c,0,{0xf0,0xf0,0xdd,0xda,0x90,0x7f,0xe2,0x74,0x00,0xf0,0xd0,0x85,0xd0,0x84,0x05,0x86},
+ 16,0x164c,0,{0xd0,0x83,0xd0,0x82,0xd0,0xe0,0xfc,0xd0,0xe0,0xfd,0xd0,0xe0,0xfe,0xd0,0xe0,0xff},
+ 5,0x165c,0,{0xd0,0xe0,0xd0,0xd0,0x22},
+ 16,0x1661,0,{0xc0,0xd0,0xc0,0xe0,0xc0,0x82,0xc0,0x83,0x90,0x76,0x7c,0xe0,0x90,0x7f,0x6f,0xf0},
+ 16,0x1671,0,{0x90,0x76,0x7d,0xe0,0x90,0x7f,0x6f,0xf0,0x90,0x76,0x7e,0xe0,0x90,0x7f,0x6f,0xf0},
+ 9,0x1681,0,{0xd0,0x83,0xd0,0x82,0xd0,0xe0,0xd0,0xd0,0x22},
+ 16,0x168a,0,{0xc0,0xd0,0xc0,0xe0,0x8f,0xe0,0xc0,0xe0,0x8e,0xe0,0xc0,0xe0,0xc0,0x82,0xc0,0x83},
+ 16,0x169a,0,{0x05,0x86,0xc0,0x84,0xc0,0x85,0x90,0x76,0x87,0xe0,0xff,0xbf,0x00,0x03,0x02,0x17},
+ 16,0x16aa,0,{0x01,0x90,0x7f,0x96,0xe0,0x44,0x80,0xf0,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x7f},
+ 16,0x16ba,0,{0x62,0xe0,0x05,0x86,0x90,0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f,0x96,0xe0,0x54,0x7f},
+ 16,0x16ca,0,{0xf0,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x76,0x8e,0xe0,0xb4,0x01,0x05,0x05,0x86},
+ 16,0x16da,0,{0x02,0x16,0xf6,0xb4,0x02,0x05,0x05,0x86,0x02,0x16,0xeb,0x05,0x86,0x02,0x16,0xfb},
+ 16,0x16ea,0,{0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xdf,0xf8,0x02,0x16,0xfb,0xe0,0xe0,0xe0,0xe0,0xdf},
+ 16,0x16fa,0,{0xfa,0x90,0x7f,0xe2,0x74,0x00,0xf0,0xd0,0x85,0xd0,0x84,0x05,0x86,0xd0,0x83,0xd0},
+ 12,0x170a,0,{0x82,0xd0,0xe0,0xfe,0xd0,0xe0,0xff,0xd0,0xe0,0xd0,0xd0,0x22},
+ 16,0x1716,0,{0xc0,0x82,0xc0,0x83,0xc0,0xe0,0xe8,0xc0,0xe0,0x78,0xd1,0xe8,0x14,0xf8,0x70,0xfb},
+ 10,0x1726,0,{0xd0,0xe0,0xf8,0xd0,0xe0,0xd0,0x83,0xd0,0x82,0x22},
+ 16,0x1730,0,{0xc0,0x82,0xc0,0x83,0xc0,0xe0,0xe8,0xc0,0xe0,0x78,0x78,0xe8,0x14,0xf8,0x70,0xfb},
+ 10,0x1740,0,{0xd0,0xe0,0xf8,0xd0,0xe0,0xd0,0x83,0xd0,0x82,0x22},
+ 7,0x174a,0,{0x90,0x7f,0xc5,0x74,0x02,0xf0,0x22},
+ 16,0x1751,0,{0x90,0x7e,0xc0,0xe0,0x90,0x76,0x45,0xf0,0x90,0x7e,0xc1,0xe0,0x90,0x76,0x44,0xf0},
+ 16,0x1761,0,{0x90,0x7e,0xc2,0xe0,0x90,0x76,0x43,0xf0,0xb4,0x00,0x03,0x02,0x17,0x78,0x90,0x76},
+ 16,0x1771,0,{0x19,0x74,0x03,0xf0,0x02,0x17,0x8e,0x90,0x76,0x44,0xe0,0xb4,0xbb,0x09,0x90,0x76},
+ 16,0x1781,0,{0x19,0x74,0x02,0xf0,0x02,0x17,0x8e,0x90,0x76,0x19,0x74,0x01,0xf0,0x90,0x76,0x42},
+ 3,0x1791,0,{0xe4,0xf0,0x22},
+ 4,0x1794,0,{0x8d,0x29,0x8b,0x2a},
+ 16,0x1798,0,{0x12,0x4a,0x55,0xea,0x49,0x60,0x57,0x12,0x36,0x92,0x7e,0x00,0x29,0xff,0xee,0x3a},
+ 16,0x17a8,0,{0xc9,0xef,0xc9,0x75,0x2b,0xff,0xf5,0x2c,0x89,0x2d,0xab,0x2b,0xaa,0x2c,0xa9,0x2d},
+ 16,0x17b8,0,{0x90,0x00,0x01,0x12,0x36,0xab,0xff,0x64,0x04,0x60,0x05,0xef,0x64,0x05,0x70,0x2e},
+ 16,0x17c8,0,{0xef,0xb4,0x04,0x15,0x90,0x00,0x02,0x12,0x36,0xab,0x65,0x29,0x70,0x0b,0x90,0x00},
+ 16,0x17d8,0,{0x03,0x12,0x36,0xab,0x65,0x2a,0x70,0x01,0x22,0x12,0x36,0x92,0x7e,0x00,0x29,0xff},
+ 16,0x17e8,0,{0xee,0x3a,0xc9,0xef,0xc9,0x75,0x2b,0xff,0xf5,0x2c,0x89,0x2d,0x80,0xbc,0x7b,0x00},
+ 4,0x17f8,0,{0x7a,0x00,0x79,0x00},
+ 1,0x17fc,0,{0x22},
+ 3,0x17fd,0,{0xc2,0x8b,0x32},
+ 16,0x1800,0,{0x90,0x76,0x90,0xe0,0x14,0x60,0x37,0x14,0x70,0x02,0x01,0xd8,0x14,0x70,0x02,0x21},
+ 16,0x1810,0,{0x72,0x14,0x70,0x02,0x41,0x3b,0x24,0x04,0x60,0x02,0x61,0x03,0x90,0x7f,0xfc,0x74},
+ 16,0x1820,0,{0xcc,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x95,0xe0,0x44,0x01,0xf0,0x54},
+ 16,0x1830,0,{0x05,0xf0,0x90,0x80,0x01,0xf0,0xe4,0x90,0x76,0x1a,0xf0,0xc2,0x2e,0x22,0x90,0x76},
+ 16,0x1840,0,{0x95,0xe0,0x44,0x01,0xf0,0x44,0x02,0xf0,0x30,0x3e,0x06,0xe0,0x44,0x04,0xf0,0x80},
+ 16,0x1850,0,{0x07,0x90,0x76,0x95,0xe0,0x54,0xfb,0xf0,0x90,0x76,0x1a,0xe0,0xb4,0x01,0x08,0x90},
+ 16,0x1860,0,{0x76,0x95,0xe0,0x90,0x80,0x01,0xf0,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x22,0x90},
+ 16,0x1870,0,{0x7f,0xfc,0x74,0x74,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2b},
+ 16,0x1880,0,{0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80},
+ 16,0x1890,0,{0xf0,0xef,0xb4,0x02,0x22,0x90,0x7f,0xfc,0x74,0x68,0xf0,0x90,0x7f,0xff,0x74,0xfc},
+ 16,0x18a0,0,{0xf0,0x90,0x76,0x8f,0x74,0x2f,0xf0,0x90,0x76,0x97,0xe0,0x44,0x02,0xf0,0xe4,0x90},
+ 16,0x18b0,0,{0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0x30,0x3f,0x09,0x90,0x76,0x97,0xe0,0x54,0xfe},
+ 16,0x18c0,0,{0xf0,0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfb},
+ 16,0x18d0,0,{0xf0,0x90,0x80,0x02,0xf0,0xd2,0x2e,0x22,0x90,0x76,0x95,0xe0,0x54,0xfe,0xf0,0x44},
+ 16,0x18e0,0,{0x02,0xf0,0x30,0x3e,0x06,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x76,0x95,0xe0,0x54},
+ 16,0x18f0,0,{0xfb,0xf0,0x90,0x76,0x1a,0xe0,0xb4,0x01,0x08,0x90,0x76,0x95,0xe0,0x90,0x80,0x01},
+ 16,0x1900,0,{0xf0,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x22,0x90,0x7f,0xfc,0x74,0x30,0xf0,0x90},
+ 16,0x1910,0,{0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2b,0xf0,0x90,0x76,0x97,0xe0,0x54},
+ 16,0x1920,0,{0xfd,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0xef,0xb4,0x02,0x22,0x90},
+ 16,0x1930,0,{0x7f,0xfc,0x74,0x1c,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2f},
+ 16,0x1940,0,{0xf0,0x90,0x76,0x97,0xe0,0x44,0x02,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80},
+ 16,0x1950,0,{0xf0,0x30,0x3f,0x09,0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97},
+ 16,0x1960,0,{0xe0,0x44,0x01,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfb,0xf0,0x90,0x80,0x02,0xf0,0xd2},
+ 16,0x1970,0,{0x2e,0x22,0x90,0x76,0x95,0xe0,0x44,0x01,0xf0,0x44,0x02,0xf0,0x44,0x08,0xf0,0x30},
+ 16,0x1980,0,{0x3e,0x06,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x76,0x95,0xe0,0x54,0xfb,0xf0,0x90},
+ 16,0x1990,0,{0x76,0x1a,0xe0,0xb4,0x01,0x08,0x90,0x76,0x95,0xe0,0x90,0x80,0x01,0xf0,0x90,0x76},
+ 16,0x19a0,0,{0x19,0xe0,0xff,0xb4,0x01,0x25,0x90,0x7f,0xfc,0x74,0xcc,0xf0,0x90,0x7f,0xff,0x74},
+ 16,0x19b0,0,{0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2b,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd,0xf0,0x54},
+ 16,0x19c0,0,{0xfb,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0xef,0xb4,0x02,0x25,0x90},
+ 16,0x19d0,0,{0x7f,0xfc,0x74,0xc8,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2f},
+ 16,0x19e0,0,{0xf0,0x90,0x76,0x97,0xe0,0x44,0x02,0xf0,0x54,0xfb,0xf0,0xe4,0x90,0x76,0x81,0xf0},
+ 16,0x19f0,0,{0x90,0x76,0x80,0xf0,0xef,0xb4,0x03,0x25,0x90,0x7f,0xfc,0x74,0x98,0xf0,0x90,0x7f},
+ 16,0x1a00,0,{0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x5f,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd},
+ 16,0x1a10,0,{0xf0,0x44,0x04,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0x30,0x3f,0x09},
+ 16,0x1a20,0,{0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0},
+ 16,0x1a30,0,{0x90,0x76,0x97,0xe0,0x90,0x80,0x02,0xf0,0xd2,0x2e,0x22,0x90,0x76,0x95,0xe0,0x54},
+ 16,0x1a40,0,{0xfe,0xf0,0x44,0x02,0xf0,0x44,0x08,0xf0,0x30,0x3e,0x06,0xe0,0x44,0x04,0xf0,0x80},
+ 16,0x1a50,0,{0x07,0x90,0x76,0x95,0xe0,0x54,0xfb,0xf0,0x90,0x76,0x1a,0xe0,0xb4,0x01,0x08,0x90},
+ 16,0x1a60,0,{0x76,0x95,0xe0,0x90,0x80,0x01,0xf0,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x25,0x90},
+ 16,0x1a70,0,{0x7f,0xfc,0x74,0xb4,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2b},
+ 16,0x1a80,0,{0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0,0xe4,0x90,0x76,0x81,0xf0},
+ 16,0x1a90,0,{0x90,0x76,0x80,0xf0,0xef,0xb4,0x02,0x25,0x90,0x7f,0xfc,0x74,0xb0,0xf0,0x90,0x7f},
+ 16,0x1aa0,0,{0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2f,0xf0,0x90,0x76,0x97,0xe0,0x44,0x02},
+ 16,0x1ab0,0,{0xf0,0x54,0xfb,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0xef,0xb4,0x03},
+ 16,0x1ac0,0,{0x25,0x90,0x7f,0xfc,0x74,0x68,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f},
+ 16,0x1ad0,0,{0x74,0x5f,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd,0xf0,0x44,0x04,0xf0,0xe4,0x90,0x76},
+ 16,0x1ae0,0,{0x81,0xf0,0x90,0x76,0x80,0xf0,0x30,0x3f,0x09,0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0},
+ 16,0x1af0,0,{0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0,0x90,0x76,0x97,0xe0,0x90,0x80,0x02},
+ 4,0x1b00,0,{0xf0,0xd2,0x2e,0x22},
+ 16,0x1b04,0,{0x30,0x2c,0x38,0xc2,0x2c,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x0e,0x90,0x76,0x7c},
+ 16,0x1b14,0,{0x74,0xc0,0xf0,0xa3,0x74,0x14,0xf0,0xa3,0x74,0x0b,0xf0,0xef,0xb4,0x02,0x0d,0xe4},
+ 16,0x1b24,0,{0x90,0x76,0x7c,0xf0,0xa3,0x74,0x10,0xf0,0xa3,0x74,0x0c,0xf0,0xef,0xb4,0x03,0x0b},
+ 12,0x1b34,0,{0xe4,0x90,0x76,0x7c,0xf0,0xa3,0x74,0x18,0xf0,0xa3,0xf0,0x22},
+ 16,0x1b40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1b50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1b60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1b70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1b80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1b90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1ba0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1bb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1bc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1bd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1be0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1bf0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c00,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c10,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c20,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c30,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1c90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1ca0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1cb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1cc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1cd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1ce0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1cf0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d00,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d10,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d20,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d30,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1d90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1da0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1db0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1dc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1dd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1de0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1df0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e00,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e10,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e20,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e30,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1e90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1ea0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 14,0x1eb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1ebe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1ece,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1ede,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1eee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1efe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1f0e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1f1e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1f2e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 2,0x1f3e,0,{0x00,0x00},
+ 16,0x1f40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1f50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1f60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1f70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1f80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1f90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1fa0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1fb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1fc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1fd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1fe0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x1ff0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2000,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2010,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2020,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2030,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2040,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2050,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2060,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2070,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2080,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2090,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x20a0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x20b0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x20c0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x20d0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x20e0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x20f0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2100,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2110,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2120,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2130,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2140,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2150,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2160,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2170,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2180,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2190,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x21a0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x21b0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x21c0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x21d0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x21e0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x21f0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2200,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2210,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2220,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2230,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2240,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2250,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2260,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2270,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2280,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2290,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x22a0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x22b0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x22c0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x22d0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x22e0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x22f0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2300,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2310,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2320,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2330,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2340,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2350,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x2360,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 14,0x2370,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x237e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x238e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x239e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x23ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x23be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x23ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x23de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x23ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x23fe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x240e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x241e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x242e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x243e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x244e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x245e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x246e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x247e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x248e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x249e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x24ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x24be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x24ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x24de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x24ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x24fe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x250e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x251e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x252e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x253e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x254e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x255e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x256e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x257e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x258e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x259e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x25ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x25be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x25ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x25de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x25ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x25fe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x260e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x261e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x262e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x263e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x264e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x265e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x266e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x267e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x268e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x269e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x26ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x26be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x26ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x26de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 14,0x26ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x26fc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x270c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x271c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x272c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x273c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x274c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x275c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x276c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x277c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x278c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x279c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x27ac,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x27bc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x27cc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x27dc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 16,0x27ec,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ 5,0x27fc,0,{0x00,0x00,0x00,0x00,0x22},
+ 16,0x2801,0,{0xc2,0x20,0xc2,0x21,0xc2,0x2a,0x90,0x7f,0xe8,0xe0,0x12,0x37,0xf9,0x28,0x30,0x00},
+ 16,0x2811,0,{0x28,0x8c,0x01,0x28,0xa2,0x02,0x2a,0x1f,0x21,0x2a,0x6a,0x22,0x29,0x3d,0x80,0x29},
+ 16,0x2821,0,{0x7d,0x81,0x29,0xd1,0x82,0x2a,0x84,0xa1,0x2a,0xba,0xa2,0x00,0x00,0x2a,0xbf,0x90},
+ 16,0x2831,0,{0x7f,0xe9,0xe0,0x14,0x60,0x11,0x24,0xfe,0x60,0x28,0x24,0xfe,0x60,0x3b,0x24,0xfc},
+ 16,0x2841,0,{0x70,0x40,0x12,0x3f,0xe5,0x41,0xcb,0x12,0x4e,0x1d,0x40,0x02,0x41,0xcb,0x90,0x7f},
+ 16,0x2851,0,{0xea,0xe0,0xb4,0x01,0x04,0xc2,0x22,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0},
+ 16,0x2861,0,{0x41,0xcb,0x12,0x4e,0x1f,0x90,0x7f,0xea,0xe0,0xb4,0x01,0x04,0xd2,0x22,0x41,0xcb},
+ 16,0x2871,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0},
+ 16,0x2881,0,{0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xe9,0xe0,0x24},
+ 16,0x2891,0,{0xf5,0x70,0x05,0x12,0x48,0x63,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41},
+ 16,0x28a1,0,{0xcb,0x90,0x7f,0xe9,0xe0,0x24,0xfd,0x60,0x54,0x24,0x02,0x60,0x02,0x21,0x34,0x12},
+ 16,0x28b1,0,{0x4e,0x1d,0x40,0x02,0x41,0xcb,0x90,0x7f,0xea,0xe0,0x70,0x38,0x90,0x7f,0xec,0xe0},
+ 16,0x28c1,0,{0xf4,0x54,0x80,0xff,0xc4,0x54,0x0f,0xff,0xe0,0x54,0x07,0x2f,0x25,0xe0,0x24,0xb4},
+ 16,0x28d1,0,{0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xe4,0xf0,0x90,0x7f,0xec,0xe0,0x54,0x80,0xff},
+ 16,0x28e1,0,{0x13,0x13,0x13,0x54,0x1f,0xff,0xe0,0x54,0x07,0x2f,0x90,0x7f,0xd7,0xf0,0xe0,0x44},
+ 16,0x28f1,0,{0x20,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x12,0x4e,0x1f},
+ 16,0x2901,0,{0x40,0x02,0x41,0xcb,0x90,0x7f,0xea,0xe0,0x70,0x20,0x90,0x7f,0xec,0xe0,0xf4,0x54},
+ 16,0x2911,0,{0x80,0xff,0xc4,0x54,0x0f,0xff,0xe0,0x54,0x07,0x2f,0x25,0xe0,0x24,0xb4,0xf5,0x82},
+ 16,0x2921,0,{0xe4,0x34,0x7f,0xf5,0x83,0x74,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01},
+ 16,0x2931,0,{0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xe9,0xe0},
+ 16,0x2941,0,{0x60,0x12,0x24,0xf8,0x60,0x09,0x24,0x02,0x70,0x29,0x12,0x43,0xe7,0x41,0xcb,0x12},
+ 16,0x2951,0,{0x4d,0xca,0x41,0xcb,0x12,0x4e,0x1b,0xa2,0x22,0xe4,0x33,0xff,0x25,0xe0,0xff,0xa2},
+ 16,0x2961,0,{0x23,0xe4,0x33,0x4f,0x90,0x7f,0x00,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x02},
+ 16,0x2971,0,{0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xe9,0xe0},
+ 16,0x2981,0,{0x60,0x33,0x24,0xf6,0x60,0x2a,0x24,0x04,0x70,0x3d,0x90,0x7f,0xeb,0xe0,0x24,0xde},
+ 16,0x2991,0,{0x60,0x0c,0x04,0x70,0x12,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f},
+ 16,0x29a1,0,{0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb},
+ 16,0x29b1,0,{0x12,0x47,0x45,0x41,0xcb,0x12,0x4e,0x1b,0xe4,0x90,0x7f,0x00,0xf0,0xa3,0xf0,0x90},
+ 16,0x29c1,0,{0x7f,0xb5,0x74,0x02,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb},
+ 16,0x29d1,0,{0x90,0x7f,0xe9,0xe0,0x24,0xf4,0x60,0x34,0x24,0x0c,0x70,0x39,0x12,0x4e,0x1b,0x90},
+ 16,0x29e1,0,{0x7f,0xec,0xe0,0xf4,0x54,0x80,0xff,0xc4,0x54,0x0f,0xff,0xe0,0x54,0x07,0x2f,0x25},
+ 16,0x29f1,0,{0xe0,0x24,0xb4,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xe0,0x54,0xfd,0x90,0x7f,0x00},
+ 16,0x2a01,0,{0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0},
+ 16,0x2a11,0,{0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f},
+ 16,0x2a21,0,{0xe9,0xe0,0x24,0xf6,0x60,0x12,0x14,0x60,0x1a,0x24,0x02,0x70,0x1d,0xd2,0x20,0x90},
+ 16,0x2a31,0,{0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x12,0xd2,0x20,0x90,0x7f,0xb4,0xe0,0x44,0x01},
+ 16,0x2a41,0,{0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x20,0x20,0x18,0x90,0x7f,0xee},
+ 16,0x2a51,0,{0xe0,0x70,0x04,0xa3,0xe0,0x60,0x0b,0xd2,0x29,0xd2,0x27,0x12,0x17,0x4a,0xd2,0x2a},
+ 16,0x2a61,0,{0x80,0x03,0x12,0x08,0x00,0xc2,0x20,0x80,0x61,0x90,0x7f,0xee,0xe0,0x70,0x04,0xa3},
+ 16,0x2a71,0,{0xe0,0x60,0x0b,0xd2,0x29,0xd2,0x28,0x12,0x17,0x4a,0xd2,0x2a,0x80,0x4c,0x12,0x38},
+ 16,0x2a81,0,{0x74,0x80,0x47,0x90,0x7f,0xe9,0xe0,0x24,0xfe,0x60,0x12,0x14,0x60,0x1a,0x24,0x02},
+ 16,0x2a91,0,{0x70,0x1d,0xd2,0x21,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x12,0xd2,0x21,0x90},
+ 16,0x2aa1,0,{0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x20},
+ 16,0x2ab1,0,{0x21,0x03,0x12,0x10,0x00,0xc2,0x21,0x80,0x11,0x12,0x2a,0xd6,0x80,0x0c,0x12,0x4e},
+ 16,0x2ac1,0,{0x21,0x50,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x20,0x2a,0x07,0x90,0x7f,0xb4},
+ 5,0x2ad1,0,{0xe0,0x44,0x02,0xf0,0x22},
+ 16,0x2ad6,0,{0xe4,0x90,0x76,0x27,0xf0,0x90,0x76,0x27,0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x42},
+ 16,0x2ae6,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xec,0xe0,0xfd,0xee,0x6d},
+ 16,0x2af6,0,{0x60,0x0e,0xef,0xc3,0x94,0x06,0x50,0x08,0x90,0x76,0x27,0xe0,0x04,0xf0,0x80,0xd5},
+ 16,0x2b06,0,{0xef,0xb4,0x06,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x0f},
+ 16,0x2b16,0,{0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x76,0x28,0xf0,0x24},
+ 16,0x2b26,0,{0x9f,0x70,0x02,0xa1,0x74,0x24,0x21,0x60,0x02,0xa1,0xa1,0x90,0x7f,0xe9,0xe0,0x24},
+ 16,0x2b36,0,{0x7e,0x70,0x02,0x61,0xfc,0x14,0x70,0x02,0x81,0xb5,0x24,0x02,0x60,0x02,0xa1,0x6c},
+ 16,0x2b46,0,{0xef,0x75,0xf0,0x0f,0xa4,0x24,0x43,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc},
+ 16,0x2b56,0,{0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x44,0x7a,0xac,0x79,0x00,0x78},
+ 16,0x2b66,0,{0x00,0xc3,0x12,0x37,0xab,0x70,0x13,0x90,0x7f,0x00,0x74,0x44,0xf0,0xa3,0x74,0xac},
+ 16,0x2b76,0,{0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x76,0x27,0xe0,0x75,0xf0},
+ 16,0x2b86,0,{0x0f,0xa4,0x24,0x43,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd},
+ 16,0x2b96,0,{0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x80,0x7a,0xbb,0x79,0x00,0x78,0x00,0xc3,0x12},
+ 16,0x2ba6,0,{0x37,0xab,0x70,0x13,0x90,0x7f,0x00,0x74,0x80,0xf0,0xa3,0x74,0xbb,0xf0,0xe4,0xa3},
+ 16,0x2bb6,0,{0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24},
+ 16,0x2bc6,0,{0x43,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe},
+ 16,0x2bd6,0,{0xa3,0xe0,0xff,0x7b,0x00,0x7a,0x77,0x79,0x01,0x78,0x00,0xc3,0x12,0x37,0xab,0x60},
+ 16,0x2be6,0,{0x02,0xa1,0xa8,0x90,0x7f,0x00,0xf0,0xa3,0x74,0x77,0xf0,0xa3,0x74,0x01,0xf0,0x90},
+ 16,0x2bf6,0,{0x7f,0xb5,0x74,0x03,0xf0,0x22,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x47},
+ 16,0x2c06,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3},
+ 16,0x2c16,0,{0xe0,0xff,0x7b,0x44,0x7a,0xac,0x79,0x00,0x78,0x00,0xc3,0x12,0x37,0xab,0x70,0x13},
+ 16,0x2c26,0,{0x90,0x7f,0x00,0x74,0x44,0xf0,0xa3,0x74,0xac,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5},
+ 16,0x2c36,0,{0x74,0x03,0xf0,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x47,0xf5,0x82,0xe4},
+ 16,0x2c46,0,{0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b},
+ 16,0x2c56,0,{0x80,0x7a,0xbb,0x79,0x00,0x78,0x00,0xc3,0x12,0x37,0xab,0x70,0x13,0x90,0x7f,0x00},
+ 16,0x2c66,0,{0x74,0x80,0xf0,0xa3,0x74,0xbb,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0},
+ 16,0x2c76,0,{0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x47,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x2c86,0,{0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x00,0x7a,0x77},
+ 16,0x2c96,0,{0x79,0x01,0x78,0x00,0xc3,0x12,0x37,0xab,0x60,0x02,0xa1,0xa8,0x90,0x7f,0x00,0xf0},
+ 16,0x2ca6,0,{0xa3,0x74,0x77,0xf0,0xa3,0x74,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x22,0x90},
+ 16,0x2cb6,0,{0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83},
+ 16,0x2cc6,0,{0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x44,0x7a,0xac,0x79},
+ 16,0x2cd6,0,{0x00,0x78,0x00,0xc3,0x12,0x37,0xab,0x70,0x13,0x90,0x7f,0x00,0x74,0x44,0xf0,0xa3},
+ 16,0x2ce6,0,{0x74,0xac,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x76,0x27,0xe0},
+ 16,0x2cf6,0,{0x75,0xf0,0x0f,0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3},
+ 16,0x2d06,0,{0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x80,0x7a,0xbb,0x79,0x00,0x78,0x00},
+ 16,0x2d16,0,{0xc3,0x12,0x37,0xab,0x70,0x13,0x90,0x7f,0x00,0x74,0x80,0xf0,0xa3,0x74,0xbb,0xf0},
+ 16,0x2d26,0,{0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f},
+ 16,0x2d36,0,{0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3},
+ 16,0x2d46,0,{0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x00,0x7a,0x77,0x79,0x01,0x78,0x00,0xc3,0x12,0x37},
+ 16,0x2d56,0,{0xab,0x70,0x4f,0x90,0x7f,0x00,0xf0,0xa3,0x74,0x77,0xf0,0xa3,0x74,0x01,0xf0,0x90},
+ 16,0x2d66,0,{0x7f,0xb5,0x74,0x03,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f},
+ 16,0x2d76,0,{0xe9,0xe0,0x24,0x7f,0x70,0x1e,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x4f},
+ 16,0x2d86,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0,0x90,0x7f,0xb5,0x74},
+ 16,0x2d96,0,{0x01,0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x90,0x7f,0xb4,0xe0,0x44},
+ 3,0x2da6,0,{0x01,0xf0,0x22},
+ 16,0x2da9,0,{0xe4,0x90,0x76,0x36,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4},
+ 16,0x2db9,0,{0x34,0x75,0xf5,0x83,0x74,0x01,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82},
+ 16,0x2dc9,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x01,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5},
+ 16,0x2dd9,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff},
+ 16,0x2de9,0,{0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x10,0xf0},
+ 16,0x2df9,0,{0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x05},
+ 16,0x2e09,0,{0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4},
+ 16,0x2e19,0,{0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5},
+ 16,0x2e29,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f},
+ 16,0x2e39,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24},
+ 16,0x2e49,0,{0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0},
+ 16,0x2e59,0,{0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74},
+ 16,0x2e69,0,{0x01,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83},
+ 16,0x2e79,0,{0x74,0x03,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x2e89,0,{0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24},
+ 16,0x2e99,0,{0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x10,0xf0,0xef,0x75,0xf0,0x03,0xa4},
+ 16,0x2ea9,0,{0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x06,0xf0,0xef,0x75,0xf0,0x03},
+ 16,0x2eb9,0,{0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0},
+ 16,0x2ec9,0,{0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x2ed9,0,{0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x2ee9,0,{0xf5,0x83,0x74,0x04,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34},
+ 16,0x2ef9,0,{0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03},
+ 16,0x2f09,0,{0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0},
+ 16,0x2f19,0,{0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x08,0xf0,0xef,0x75},
+ 16,0x2f29,0,{0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x04,0xf0,0x90},
+ 16,0x2f39,0,{0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4},
+ 16,0x2f49,0,{0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82},
+ 16,0x2f59,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x0a,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5},
+ 16,0x2f69,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x04,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0},
+ 16,0x2f79,0,{0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02},
+ 16,0x2f89,0,{0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74},
+ 16,0x2f99,0,{0x09,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83},
+ 16,0x2fa9,0,{0x74,0x04,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24},
+ 16,0x2fb9,0,{0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4},
+ 16,0x2fc9,0,{0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x07,0xf0,0xef,0x75,0xf0,0x03},
+ 14,0x2fd9,0,{0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x04,0xf0,0x22},
+ 16,0x2fe7,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xd2,0x26,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x01},
+ 8,0x2ff7,0,{0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 1,0x2fff,0,{0x32},
+ 16,0x3000,0,{0x90,0x7f,0xb6,0xe0,0x20,0xe1,0x02,0xc2,0x3d,0xd2,0x36,0x20,0x36,0x02,0x41,0x6e},
+ 16,0x3010,0,{0x30,0x3d,0x02,0x41,0x6e,0x90,0x80,0x07,0xe0,0x60,0x04,0xd2,0x36,0x80,0x02,0xc2},
+ 16,0x3020,0,{0x36,0x20,0x36,0x02,0x41,0x2e,0xd2,0x35,0xe4,0xf5,0x1a,0x90,0x80,0x04,0xe0,0xf5},
+ 16,0x3030,0,{0x19,0x74,0x08,0x25,0x0e,0xf8,0xa6,0x19,0x85,0x19,0x18,0xe5,0x18,0x20,0xe7,0x04},
+ 16,0x3040,0,{0xd2,0x38,0x80,0x02,0xc2,0x38,0x30,0x38,0x02,0x21,0xd4,0xe4,0xf5,0x16,0xe5,0x19},
+ 16,0x3050,0,{0xb4,0xf0,0x0c,0xd2,0x39,0x75,0x08,0x04,0x75,0x09,0xf0,0x05,0x0e,0x80,0x02,0x05},
+ 16,0x3060,0,{0x16,0xe5,0x19,0x64,0xf7,0x70,0x3d,0xc2,0x39,0xe5,0x0e,0x24,0xfe,0x60,0x17,0x14},
+ 16,0x3070,0,{0x60,0x22,0x24,0x03,0x70,0x29,0x75,0x08,0x05,0x75,0x09,0xf7,0xe4,0xf5,0x0a,0xf5},
+ 16,0x3080,0,{0x0b,0x75,0x0e,0x04,0x80,0x20,0x75,0x08,0x06,0x75,0x0a,0xf7,0xe4,0xf5,0x0b,0x75},
+ 16,0x3090,0,{0x0e,0x04,0x80,0x12,0x75,0x08,0x07,0x75,0x0b,0xf7,0x75,0x0e,0x04,0x80,0x07,0x12},
+ 16,0x30a0,0,{0x4d,0xda,0x80,0x02,0x05,0x16,0xe5,0x19,0x54,0xf8,0x64,0xf8,0x70,0x3b,0xc2,0x35},
+ 16,0x30b0,0,{0xe5,0x19,0x24,0x07,0x60,0x0c,0x24,0xfc,0x60,0x08,0x24,0x05,0x24,0xf8,0x50,0x06},
+ 16,0x30c0,0,{0x80,0x08,0xd2,0x3a,0x80,0x06,0xc2,0x3a,0x80,0x02,0xd2,0x3a,0x75,0x1a,0x01,0x20},
+ 16,0x30d0,0,{0x3a,0x19,0x90,0x7e,0x80,0x74,0x0f,0xf0,0xa3,0xe5,0x19,0xf0,0xe4,0xa3,0xf0,0xa3},
+ 16,0x30e0,0,{0xf0,0x90,0x7f,0xb7,0x74,0x04,0xf0,0x80,0x02,0x05,0x16,0x20,0x39,0x6d,0xe5,0x19},
+ 16,0x30f0,0,{0x64,0xf7,0x60,0x67,0xe5,0x1a,0x70,0x63,0xe5,0x18,0x54,0xf0,0x64,0xf0,0x70,0x59},
+ 16,0x3100,0,{0x85,0x18,0x19,0xf5,0x0e,0xe5,0x19,0x24,0x0f,0x60,0x1b,0x24,0xfe,0x60,0x17,0x24},
+ 16,0x3110,0,{0xfd,0x60,0x22,0x14,0x60,0x1f,0x24,0x05,0x70,0x2f,0x75,0x08,0x03,0x05,0x0e,0x85},
+ 16,0x3120,0,{0x18,0x09,0xd2,0x37,0x80,0x28,0x75,0x08,0x02,0x05,0x0e,0x85,0x18,0x09,0x75,0x14},
+ 16,0x3130,0,{0x01,0xd2,0x37,0x80,0x19,0x75,0x08,0x05,0x05,0x0e,0x85,0x18,0x09,0xe4,0xf5,0x0a},
+ 16,0x3140,0,{0xf5,0x0b,0x75,0x0e,0x03,0xd2,0x37,0x80,0x05,0x12,0x4d,0xda,0xc2,0x35,0x30,0x35},
+ 16,0x3150,0,{0x0a,0x85,0x08,0x13,0x85,0x18,0x12,0x80,0x02,0x05,0x16,0x85,0x18,0x19,0xe5,0x16},
+ 16,0x3160,0,{0x64,0x04,0x70,0x62,0xf5,0x0e,0xe5,0x19,0x54,0xf0,0xf5,0x19,0xf5,0x15,0x85,0x18},
+ 16,0x3170,0,{0x19,0xe5,0x15,0x24,0x70,0x60,0x18,0x24,0xf0,0x60,0x14,0x24,0xf0,0x60,0x10,0x24},
+ 16,0x3180,0,{0xf0,0x60,0x1e,0x24,0xf0,0x60,0x1a,0x24,0xf0,0x60,0x04,0x24,0x60,0x70,0x27,0xe5},
+ 16,0x3190,0,{0x15,0xc4,0x54,0x0f,0xf5,0x19,0xf5,0x08,0x05,0x0e,0x85,0x18,0x09,0xd2,0x37,0x80},
+ 16,0x31a0,0,{0x1a,0xe5,0x15,0xc4,0x54,0x0f,0xf5,0x19,0xf5,0x08,0x05,0x0e,0x85,0x18,0x09,0x75},
+ 16,0x31b0,0,{0x14,0x01,0xd2,0x37,0x80,0x05,0x12,0x4d,0xda,0xc2,0x35,0x30,0x35,0x0a,0x85,0x19},
+ 16,0x31c0,0,{0x13,0x85,0x18,0x12,0x80,0x02,0x05,0x16,0xe5,0x16,0xd3,0x94,0x05,0x40,0x57,0x12},
+ 16,0x31d0,0,{0x4d,0xda,0x80,0x52,0x30,0x39,0x17,0xe5,0x0e,0x70,0x0a,0x85,0x08,0x09,0x75,0x08},
+ 16,0x31e0,0,{0x04,0x05,0x0e,0x80,0x41,0x74,0x08,0x25,0x0e,0xf8,0xa6,0x19,0x80,0x38,0x20,0x37},
+ 16,0x31f0,0,{0x2a,0xe5,0x0e,0xb4,0x01,0x0f,0x85,0x08,0x0a,0x85,0x09,0x0b,0x85,0x13,0x08,0x85},
+ 16,0x3200,0,{0x12,0x09,0x75,0x0e,0x04,0xe5,0x14,0xb4,0x01,0x1c,0x85,0x08,0x0a,0xe4,0xf5,0x0b},
+ 16,0x3210,0,{0x85,0x13,0x08,0x85,0x12,0x09,0x75,0x0e,0x04,0x80,0x0b,0xe5,0x14,0xb4,0x01,0x06},
+ 16,0x3220,0,{0xe4,0xf5,0x0b,0x75,0x0e,0x04,0xe4,0xf5,0x1a,0x30,0x35,0x02,0x05,0x0e,0xe5,0x0e},
+ 16,0x3230,0,{0xd3,0x94,0x03,0x50,0x02,0x01,0x0b,0xc2,0x37,0xe4,0xf5,0x0e,0xf5,0x10,0xc2,0x36},
+ 16,0x3240,0,{0xd2,0x3d,0xf5,0x14,0x74,0x08,0x25,0x10,0xf8,0xe6,0xff,0x74,0x80,0x25,0x10,0xf5},
+ 16,0x3250,0,{0x82,0xe4,0x34,0x7e,0xf5,0x83,0xef,0xf0,0x74,0x08,0x25,0x10,0xf8,0xe4,0xf6,0x05},
+ 15,0x3260,0,{0x10,0xe5,0x10,0xb4,0x04,0xde,0x90,0x7f,0xb7,0x74,0x04,0xf0,0x01,0x0b,0x22},
+ 16,0x326f,0,{0x90,0x76,0x18,0xe0,0xff,0x64,0x05,0x70,0x42,0x90,0x75,0xab,0xe0,0xb4,0x01,0x19},
+ 16,0x327f,0,{0x90,0x72,0x37,0x74,0x01,0xf0,0xe4,0x90,0x80,0x20,0xf0,0x90,0x80,0x31,0xf0,0x90},
+ 16,0x328f,0,{0x80,0x28,0xf0,0x90,0x80,0x39,0xf0,0x80,0x22,0xe4,0x90,0x72,0x37,0xf0,0x90,0x75},
+ 16,0x329f,0,{0xad,0xe0,0x90,0x72,0x2b,0xf0,0xe0,0x24,0x80,0xf0,0xe0,0x90,0x80,0x20,0xf0,0x90},
+ 16,0x32af,0,{0x80,0x31,0xf0,0x90,0x80,0x28,0xf0,0x90,0x80,0x39,0xf0,0xef,0x64,0x06,0x60,0x02},
+ 16,0x32bf,0,{0x81,0x99,0x90,0x72,0x39,0x74,0x04,0xf0,0x90,0x72,0x39,0xe0,0xff,0x24,0xfe,0x90},
+ 16,0x32cf,0,{0x72,0x04,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x32df,0,{0x83,0xe0,0x64,0x01,0x70,0x54,0x90,0x72,0x36,0x04,0xf0,0x90,0x72,0x04,0xe0,0xff},
+ 16,0x32ef,0,{0x24,0xfd,0x60,0x28,0x24,0xfe,0x60,0x24,0x24,0x03,0x24,0xfb,0x50,0x04,0x60,0x1c},
+ 16,0x32ff,0,{0x81,0x8c,0x74,0x20,0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xe4,0xf0,0x74,0x28},
+ 16,0x330f,0,{0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xe4,0xf0,0x81,0x8c,0x90,0x72,0x04,0xe0},
+ 16,0x331f,0,{0xff,0x24,0x30,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xe4,0xf0,0x74,0x38,0x2f,0xf5},
+ 16,0x332f,0,{0x82,0xe4,0x34,0x80,0xf5,0x83,0xe4,0xf0,0x81,0x8c,0xe4,0x90,0x72,0x36,0xf0,0x90},
+ 16,0x333f,0,{0x72,0x39,0xe0,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83},
+ 16,0x334f,0,{0xe0,0xff,0x7e,0x00,0x90,0x75,0x0c,0xee,0xf0,0xa3,0xef,0xf0,0x70,0x06,0x90,0x72},
+ 16,0x335f,0,{0x02,0x74,0x3b,0xf0,0x90,0x75,0x0c,0xe0,0xfe,0xa3,0xe0,0xff,0x64,0x80,0x4e,0x70},
+ 16,0x336f,0,{0x04,0x90,0x72,0x02,0xf0,0xef,0x4e,0x70,0x02,0x81,0x35,0xef,0x64,0x80,0x4e,0x70},
+ 16,0x337f,0,{0x02,0x81,0x35,0xef,0xf8,0xe4,0x90,0x75,0x0d,0xf0,0xe8,0x90,0x75,0x0c,0xf0,0x90},
+ 16,0x338f,0,{0x72,0x34,0xe0,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83},
+ 16,0x339f,0,{0xe0,0xff,0x90,0x72,0x02,0xf0,0x90,0x75,0x0d,0xe0,0x2f,0xf0,0x90,0x75,0x0c,0xe0},
+ 16,0x33af,0,{0x34,0x00,0xf0,0xe0,0xfe,0xa3,0xe0,0xff,0xe4,0xfc,0xfd,0x7b,0xd6,0x7a,0xa5,0xf9},
+ 16,0x33bf,0,{0xf8,0xd3,0x12,0x37,0x95,0x40,0x0a,0x90,0x75,0x0c,0x74,0xa5,0xf0,0xa3,0x74,0xd6},
+ 16,0x33cf,0,{0xf0,0x90,0x75,0x0d,0xe0,0x24,0x2a,0xf0,0x90,0x75,0x0c,0xe0,0x34,0x5a,0xf0,0xe0},
+ 16,0x33df,0,{0xfe,0xa3,0xe0,0x78,0x05,0xce,0xa2,0xe7,0x13,0xce,0x13,0xd8,0xf8,0xff,0x90,0x75},
+ 16,0x33ef,0,{0x0c,0xee,0xf0,0xa3,0xef,0xf0,0x90,0x72,0x2c,0xee,0xf0,0xa3,0xef,0xf0,0xd3,0x94},
+ 16,0x33ff,0,{0xd2,0xee,0x64,0x80,0x94,0x82,0x40,0x0a,0x90,0x72,0x2c,0x74,0x02,0xf0,0xa3,0x74},
+ 16,0x340f,0,{0xd2,0xf0,0xc3,0x90,0x72,0x2c,0xe0,0x64,0x80,0x94,0x80,0x50,0x04,0xe4,0xf0,0xa3},
+ 16,0x341f,0,{0xf0,0x90,0x72,0x2c,0xe0,0xfe,0xa3,0xe0,0x24,0x3a,0xf5,0x82,0xee,0x34,0x72,0xf5},
+ 16,0x342f,0,{0x83,0xe0,0x90,0x72,0x02,0xf0,0x90,0x72,0x04,0xe0,0xff,0x24,0xfd,0x60,0x2d,0x24},
+ 16,0x343f,0,{0xfe,0x60,0x29,0x24,0x03,0x24,0xfb,0x50,0x04,0x60,0x21,0x80,0x40,0x90,0x72,0x02},
+ 16,0x344f,0,{0xe0,0xfe,0x74,0x20,0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x74,0x28},
+ 16,0x345f,0,{0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x80,0x21,0x90,0x72,0x02,0xe0},
+ 16,0x346f,0,{0xff,0x90,0x72,0x04,0xe0,0xfe,0x24,0x30,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xef},
+ 16,0x347f,0,{0xf0,0x74,0x38,0x2e,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xef,0xf0,0x90,0x72,0x39},
+ 11,0x348f,0,{0xe0,0x04,0xf0,0xe0,0x64,0x0a,0x60,0x02,0x41,0xc7,0x22},
+ 16,0x349a,0,{0x90,0x76,0x18,0xe0,0xff,0xb4,0x05,0x23,0x90,0x72,0x37,0xe0,0x70,0x1d,0x90,0x75},
+ 16,0x34aa,0,{0xad,0xe0,0x90,0x72,0x2b,0xf0,0xe0,0x24,0x80,0xf0,0xe0,0x90,0x80,0x20,0xf0,0x90},
+ 16,0x34ba,0,{0x80,0x31,0xf0,0x90,0x80,0x28,0xf0,0x90,0x80,0x39,0xf0,0xef,0x64,0x06,0x60,0x02},
+ 16,0x34ca,0,{0xc1,0x91,0x90,0x72,0x36,0xe0,0x60,0x02,0xc1,0x91,0x90,0x76,0x40,0xe0,0x70,0x31},
+ 16,0x34da,0,{0x90,0x72,0x03,0x74,0x03,0xf0,0x90,0x72,0x03,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24},
+ 16,0x34ea,0,{0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x72,0x29,0xe0,0xfd,0xee},
+ 16,0x34fa,0,{0x6d,0x60,0x0e,0xef,0xc3,0x94,0x0a,0x50,0x08,0x90,0x72,0x03,0xe0,0x04,0xf0,0x80},
+ 16,0x350a,0,{0xd5,0x90,0x72,0x39,0x74,0x04,0xf0,0x90,0x76,0x40,0xe0,0x70,0x08,0x90,0x72,0x03},
+ 16,0x351a,0,{0xe0,0x90,0x72,0x39,0xf0,0x90,0x72,0x39,0xe0,0xfd,0x24,0xfe,0x90,0x72,0x2a,0xf0},
+ 16,0x352a,0,{0xed,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff},
+ 16,0x353a,0,{0x7e,0x00,0x90,0x75,0x0c,0xee,0xf0,0xa3,0xef,0xf0,0x70,0x06,0x90,0x72,0x02,0x74},
+ 16,0x354a,0,{0x80,0xf0,0x90,0x75,0x0c,0xe0,0xfe,0xa3,0xe0,0xff,0x64,0x80,0x4e,0x70,0x04,0x90},
+ 16,0x355a,0,{0x72,0x02,0xf0,0xef,0x4e,0x70,0x02,0xc1,0x1b,0xef,0x64,0x80,0x4e,0x70,0x02,0xc1},
+ 16,0x356a,0,{0x1b,0xef,0xf8,0xe4,0x90,0x75,0x0d,0xf0,0xe8,0x90,0x75,0x0c,0xf0,0xed,0x75,0xf0},
+ 16,0x357a,0,{0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x72,0x02},
+ 16,0x358a,0,{0xf0,0x90,0x75,0x0d,0xe0,0x2f,0xf0,0x90,0x75,0x0c,0xe0,0x34,0x00,0xf0,0xe0,0xfe},
+ 16,0x359a,0,{0xa3,0xe0,0xff,0xe4,0xfc,0xfd,0x7b,0xd6,0x7a,0xa5,0xf9,0xf8,0xd3,0x12,0x37,0x95},
+ 16,0x35aa,0,{0x40,0x0a,0x90,0x75,0x0c,0x74,0xa5,0xf0,0xa3,0x74,0xd6,0xf0,0x90,0x75,0x0d,0xe0},
+ 16,0x35ba,0,{0x24,0x2a,0xf0,0x90,0x75,0x0c,0xe0,0x34,0x5a,0xf0,0xe0,0xfe,0xa3,0xe0,0x78,0x05},
+ 16,0x35ca,0,{0xce,0xa2,0xe7,0x13,0xce,0x13,0xd8,0xf8,0xff,0x90,0x75,0x0c,0xee,0xf0,0xa3,0xef},
+ 16,0x35da,0,{0xf0,0x90,0x72,0x2c,0xee,0xf0,0xa3,0xef,0xf0,0xd3,0x94,0xd2,0xee,0x64,0x80,0x94},
+ 16,0x35ea,0,{0x82,0x40,0x0a,0x90,0x72,0x2c,0x74,0x02,0xf0,0xa3,0x74,0xd2,0xf0,0xc3,0x90,0x72},
+ 16,0x35fa,0,{0x2c,0xe0,0x64,0x80,0x94,0x80,0x50,0x04,0xe4,0xf0,0xa3,0xf0,0x90,0x72,0x2c,0xe0},
+ 16,0x360a,0,{0xfe,0xa3,0xe0,0x24,0x3a,0xf5,0x82,0xee,0x34,0x72,0xf5,0x83,0xe0,0x90,0x72,0x02},
+ 16,0x361a,0,{0xf0,0x90,0x72,0x2a,0xe0,0xff,0x24,0xfd,0x60,0x2d,0x24,0xfe,0x60,0x29,0x24,0x03},
+ 16,0x362a,0,{0x24,0xfb,0x50,0x04,0x60,0x21,0x80,0x40,0x90,0x72,0x02,0xe0,0xfe,0x74,0x20,0x2f},
+ 16,0x363a,0,{0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x74,0x28,0x2f,0xf5,0x82,0xe4,0x34},
+ 16,0x364a,0,{0x80,0xf5,0x83,0xee,0xf0,0x80,0x21,0x90,0x72,0x02,0xe0,0xff,0x90,0x72,0x2a,0xe0},
+ 16,0x365a,0,{0xfe,0x24,0x30,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xef,0xf0,0x74,0x38,0x2e,0xf5},
+ 16,0x366a,0,{0x82,0xe4,0x34,0x80,0xf5,0x83,0xef,0xf0,0x90,0x76,0x40,0xe0,0x70,0x06,0x90,0x72},
+ 16,0x367a,0,{0x39,0x74,0x0a,0xf0,0x90,0x72,0x39,0xe0,0x04,0xf0,0xe0,0xc3,0x94,0x0a,0x50,0x02},
+ 8,0x368a,0,{0xa1,0x11,0xe4,0x90,0x76,0x40,0xf0,0x22},
+ 16,0x3692,0,{0xbb,0x01,0x06,0x89,0x82,0x8a,0x83,0xe0,0x22,0x50,0x02,0xe7,0x22,0xbb,0xfe,0x02},
+ 9,0x36a2,0,{0xe3,0x22,0x89,0x82,0x8a,0x83,0xe4,0x93,0x22},
+ 16,0x36ab,0,{0xbb,0x01,0x0c,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe0,0x22,0x50},
+ 16,0x36bb,0,{0x06,0xe9,0x25,0x82,0xf8,0xe6,0x22,0xbb,0xfe,0x06,0xe9,0x25,0x82,0xf8,0xe2,0x22},
+ 13,0x36cb,0,{0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe4,0x93,0x22},
+ 16,0x36d8,0,{0xc2,0xd5,0xec,0x30,0xe7,0x09,0xb2,0xd5,0xe4,0xc3,0x9d,0xfd,0xe4,0x9c,0xfc,0xee},
+ 16,0x36e8,0,{0x30,0xe7,0x15,0xb2,0xd5,0xe4,0xc3,0x9f,0xff,0xe4,0x9e,0xfe,0x12,0x38,0x1f,0xc3},
+ 16,0x36f8,0,{0xe4,0x9d,0xfd,0xe4,0x9c,0xfc,0x80,0x03,0x12,0x38,0x1f,0x30,0xd5,0x07,0xc3,0xe4},
+ 6,0x3708,0,{0x9f,0xff,0xe4,0x9e,0xfe,0x22},
+ 16,0x370e,0,{0xbb,0x01,0x10,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe0,0xf5,0xf0},
+ 16,0x371e,0,{0xa3,0xe0,0x22,0x50,0x09,0xe9,0x25,0x82,0xf8,0x86,0xf0,0x08,0xe6,0x22,0xbb,0xfe},
+ 16,0x372e,0,{0x0a,0xe9,0x25,0x82,0xf8,0xe2,0xf5,0xf0,0x08,0xe2,0x22,0xe5,0x83,0x2a,0xf5,0x83},
+ 8,0x373e,0,{0xe9,0x93,0xf5,0xf0,0xa3,0xe9,0x93,0x22},
+ 16,0x3746,0,{0xe8,0x8f,0xf0,0xa4,0xcc,0x8b,0xf0,0xa4,0x2c,0xfc,0xe9,0x8e,0xf0,0xa4,0x2c,0xfc},
+ 16,0x3756,0,{0x8a,0xf0,0xed,0xa4,0x2c,0xfc,0xea,0x8e,0xf0,0xa4,0xcd,0xa8,0xf0,0x8b,0xf0,0xa4},
+ 16,0x3766,0,{0x2d,0xcc,0x38,0x25,0xf0,0xfd,0xe9,0x8f,0xf0,0xa4,0x2c,0xcd,0x35,0xf0,0xfc,0xeb},
+ 16,0x3776,0,{0x8e,0xf0,0xa4,0xfe,0xa9,0xf0,0xeb,0x8f,0xf0,0xa4,0xcf,0xc5,0xf0,0x2e,0xcd,0x39},
+ 15,0x3786,0,{0xfe,0xe4,0x3c,0xfc,0xea,0xa4,0x2d,0xce,0x35,0xf0,0xfd,0xe4,0x3c,0xfc,0x22},
+ 16,0x3795,0,{0xeb,0x9f,0xf5,0xf0,0xea,0x9e,0x42,0xf0,0xe9,0x9d,0x42,0xf0,0xec,0x64,0x80,0xc8},
+ 6,0x37a5,0,{0x64,0x80,0x98,0x45,0xf0,0x22},
+ 16,0x37ab,0,{0xeb,0x9f,0xf5,0xf0,0xea,0x9e,0x42,0xf0,0xe9,0x9d,0x42,0xf0,0xe8,0x9c,0x45,0xf0},
+ 1,0x37bb,0,{0x22},
+ 12,0x37bc,0,{0xec,0xf0,0xa3,0xed,0xf0,0xa3,0xee,0xf0,0xa3,0xef,0xf0,0x22},
+ 16,0x37c8,0,{0xa8,0x82,0x85,0x83,0xf0,0xd0,0x83,0xd0,0x82,0x12,0x37,0xdf,0x12,0x37,0xdf,0x12},
+ 16,0x37d8,0,{0x37,0xdf,0x12,0x37,0xdf,0xe4,0x73,0xe4,0x93,0xa3,0xc5,0x83,0xc5,0xf0,0xc5,0x83},
+ 16,0x37e8,0,{0xc8,0xc5,0x82,0xc8,0xf0,0xa3,0xc5,0x83,0xc5,0xf0,0xc5,0x83,0xc8,0xc5,0x82,0xc8},
+ 1,0x37f8,0,{0x22},
+ 16,0x37f9,0,{0xd0,0x83,0xd0,0x82,0xf8,0xe4,0x93,0x70,0x12,0x74,0x01,0x93,0x70,0x0d,0xa3,0xa3},
+ 16,0x3809,0,{0x93,0xf8,0x74,0x01,0x93,0xf5,0x82,0x88,0x83,0xe4,0x73,0x74,0x02,0x93,0x68,0x60},
+ 6,0x3819,0,{0xef,0xa3,0xa3,0xa3,0x80,0xdf},
+ 16,0x381f,0,{0xbc,0x00,0x0b,0xbe,0x00,0x29,0xef,0x8d,0xf0,0x84,0xff,0xad,0xf0,0x22,0xe4,0xcc},
+ 16,0x382f,0,{0xf8,0x75,0xf0,0x08,0xef,0x2f,0xff,0xee,0x33,0xfe,0xec,0x33,0xfc,0xee,0x9d,0xec},
+ 16,0x383f,0,{0x98,0x40,0x05,0xfc,0xee,0x9d,0xfe,0x0f,0xd5,0xf0,0xe9,0xe4,0xce,0xfd,0x22,0xed},
+ 16,0x384f,0,{0xf8,0xf5,0xf0,0xee,0x84,0x20,0xd2,0x1c,0xfe,0xad,0xf0,0x75,0xf0,0x08,0xef,0x2f},
+ 16,0x385f,0,{0xff,0xed,0x33,0xfd,0x40,0x07,0x98,0x50,0x06,0xd5,0xf0,0xf2,0x22,0xc3,0x98,0xfd},
+ 5,0x386f,0,{0x0f,0xd5,0xf0,0xea,0x22},
+ 16,0x3874,0,{0xe4,0x90,0x76,0x29,0xf0,0x90,0x76,0x29,0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x42},
+ 16,0x3884,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xec,0xe0,0xfd,0xee,0x6d},
+ 16,0x3894,0,{0x60,0x0e,0xef,0xc3,0x94,0x06,0x50,0x08,0x90,0x76,0x29,0xe0,0x04,0xf0,0x80,0xd5},
+ 16,0x38a4,0,{0xef,0xb4,0x06,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x0f},
+ 16,0x38b4,0,{0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x76,0x2a,0xf0,0x24},
+ 16,0x38c4,0,{0xbf,0x70,0x02,0x41,0x41,0x24,0xe0,0x70,0x02,0x41,0x12,0x24,0x21,0x60,0x02,0x41},
+ 16,0x38d4,0,{0x3a,0x90,0x7f,0xe9,0xe0,0x24,0xfe,0x60,0x7d,0x14,0x70,0x02,0x21,0xb2,0x24,0x02},
+ 16,0x38e4,0,{0x60,0x02,0x41,0x0a,0x12,0x17,0x51,0x90,0x76,0x42,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3},
+ 16,0x38f4,0,{0xe0,0xfe,0xa3,0xe0,0xff,0x90,0x76,0x29,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x43,0xf5},
+ 16,0x3904,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xbc,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01},
+ 16,0x3914,0,{0x12,0x90,0x76,0x7c,0x74,0x67,0xf0,0x90,0x76,0x7d,0x74,0x06,0xf0,0x90,0x76,0x7e},
+ 16,0x3924,0,{0x74,0x0b,0xf0,0xef,0xb4,0x02,0x0f,0xe4,0x90,0x76,0x7c,0xf0,0x90,0x76,0x7d,0xf0},
+ 16,0x3934,0,{0x90,0x76,0x7e,0x74,0x0c,0xf0,0xef,0xb4,0x03,0x0f,0xe4,0x90,0x76,0x7c,0xf0,0x90},
+ 16,0x3944,0,{0x76,0x7d,0xf0,0x90,0x76,0x7e,0x74,0x18,0xf0,0x90,0x76,0x1a,0x74,0x01,0xf0,0x12},
+ 16,0x3954,0,{0x3e,0x9f,0x12,0x18,0x00,0x22,0x90,0x7e,0xc2,0xe0,0xff,0xe4,0xfc,0xfd,0xfe,0xfb},
+ 16,0x3964,0,{0xfa,0x79,0x01,0xf8,0x12,0x37,0x46,0xc8,0xec,0xc8,0xc9,0xed,0xc9,0xca,0xee,0xca},
+ 16,0x3974,0,{0xcb,0xef,0xcb,0x90,0x7e,0xc1,0xe0,0xfe,0xe4,0xfc,0xfd,0x2b,0xfb,0xea,0x3e,0xfa},
+ 16,0x3984,0,{0xed,0x39,0xf9,0xec,0x38,0xf8,0x90,0x7e,0xc0,0xe0,0xff,0xe4,0xfe,0xeb,0x2f,0xff},
+ 16,0x3994,0,{0xee,0x3a,0xfe,0xed,0x39,0xfd,0xec,0x38,0xfc,0x90,0x76,0x29,0xe0,0x75,0xf0,0x0f},
+ 16,0x39a4,0,{0xa4,0x24,0x47,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xbc,0x22,0x90,0x7e},
+ 16,0x39b4,0,{0xc2,0xe0,0xff,0xe4,0xfc,0xfd,0xfe,0xfb,0xfa,0x79,0x01,0xf8,0x12,0x37,0x46,0xc8},
+ 16,0x39c4,0,{0xec,0xc8,0xc9,0xed,0xc9,0xca,0xee,0xca,0xcb,0xef,0xcb,0x90,0x7e,0xc1,0xe0,0xfe},
+ 16,0x39d4,0,{0xe4,0xfc,0xfd,0x2b,0xfb,0xea,0x3e,0xfa,0xed,0x39,0xf9,0xec,0x38,0xf8,0x90,0x7e},
+ 16,0x39e4,0,{0xc0,0xe0,0xff,0xe4,0xfe,0xeb,0x2f,0xff,0xee,0x3a,0xfe,0xed,0x39,0xfd,0xec,0x38},
+ 16,0x39f4,0,{0xfc,0x90,0x76,0x29,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x3a04,0,{0xf5,0x83,0x12,0x37,0xbc,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f},
+ 16,0x3a14,0,{0xe9,0xe0,0x14,0x70,0x19,0x90,0x7e,0xc0,0xe0,0xff,0x90,0x76,0x29,0xe0,0x75,0xf0},
+ 16,0x3a24,0,{0x0f,0xa4,0x24,0x4f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x22,0x90,0x7f},
+ 14,0x3a34,0,{0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22},
+ 16,0x3a42,0,{0xe4,0x90,0x76,0x35,0xf0,0x90,0x76,0x35,0xe0,0xff,0xc3,0x94,0x03,0x40,0x02,0x41},
+ 16,0x3a52,0,{0xff,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef},
+ 16,0x3a62,0,{0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4},
+ 16,0x3a72,0,{0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74},
+ 16,0x3a82,0,{0xf0,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83},
+ 16,0x3a92,0,{0x74,0xff,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xae,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x3aa2,0,{0x83,0xe4,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xaf,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x3ab2,0,{0x83,0x74,0x80,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x3ac2,0,{0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x3ad2,0,{0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x3ae2,0,{0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x3af2,0,{0xf5,0x83,0x74,0x01,0xf0,0x90,0x76,0x35,0xe0,0x04,0xf0,0x41,0x47,0x90,0x76,0x3c},
+ 16,0x3b02,0,{0x74,0x0a,0xf0,0xe4,0xa3,0xf0,0x90,0x76,0x35,0x74,0x03,0xf0,0x90,0x76,0x3c,0xe0},
+ 16,0x3b12,0,{0xff,0x90,0x76,0x35,0xe0,0xfe,0xc3,0x9f,0x40,0x02,0x61,0xd2,0x90,0x76,0x3d,0xe0},
+ 16,0x3b22,0,{0xff,0x04,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x3b32,0,{0x83,0xef,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x3b42,0,{0x83,0xe4,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5},
+ 16,0x3b52,0,{0x83,0x74,0x5e,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75},
+ 16,0x3b62,0,{0xf5,0x83,0x74,0xba,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xae,0xf5,0x82,0xe4,0x34},
+ 16,0x3b72,0,{0x75,0xf5,0x83,0x74,0x05,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xaf,0xf5,0x82,0xe4},
+ 16,0x3b82,0,{0x34,0x75,0xf5,0x83,0x74,0x80,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82},
+ 16,0x3b92,0,{0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82},
+ 16,0x3ba2,0,{0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82},
+ 16,0x3bb2,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x15,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5},
+ 16,0x3bc2,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x35,0xe0,0x04,0xf0,0x61,0x0e},
+ 1,0x3bd2,0,{0x22},
+ 16,0x3bd3,0,{0xe4,0x90,0x76,0x36,0xf0,0xe0,0xfb,0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4},
+ 16,0x3be3,0,{0x34,0x75,0xf5,0x83,0x74,0x40,0xf0,0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82},
+ 16,0x3bf3,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x0a,0xf0,0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x43,0xf5},
+ 16,0x3c03,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xc8,0x00,0x00,0xac,0x44,0xeb,0x75,0xf0},
+ 16,0x3c13,0,{0x0f,0xa4,0x24,0x47,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xc8,0x00,0x00},
+ 16,0x3c23,0,{0xac,0x44,0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83},
+ 16,0x3c33,0,{0x12,0x37,0xc8,0x00,0x01,0x77,0x00,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xfb,0x75},
+ 16,0x3c43,0,{0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x40,0xf0,0xeb},
+ 16,0x3c53,0,{0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x8c,0xf0},
+ 16,0x3c63,0,{0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x43,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37},
+ 16,0x3c73,0,{0xc8,0x00,0x00,0xac,0x44,0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x47,0xf5,0x82,0xe4,0x34},
+ 16,0x3c83,0,{0x75,0xf5,0x83,0x12,0x37,0xc8,0x00,0x00,0xac,0x44,0xeb,0x75,0xf0,0x0f,0xa4,0x24},
+ 16,0x3c93,0,{0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xc8,0x00,0x01,0x77,0x00,0x90},
+ 16,0x3ca3,0,{0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4},
+ 16,0x3cb3,0,{0x34,0x75,0xf5,0x83,0x74,0x40,0xf0,0xef,0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82},
+ 16,0x3cc3,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x8f,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff},
+ 16,0x3cd3,0,{0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x41,0xf0},
+ 16,0x3ce3,0,{0xef,0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x84},
+ 16,0x3cf3,0,{0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5},
+ 16,0x3d03,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x61,0xf0,0xef,0x75,0xf0,0x0f,0xa4,0x24,0x42},
+ 16,0x3d13,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x81,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0},
+ 16,0x3d23,0,{0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74},
+ 16,0x3d33,0,{0x61,0xf0,0xef,0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83},
+ 4,0x3d43,0,{0x74,0x01,0xf0,0x22},
+ 16,0x3d47,0,{0xc0,0xe0,0xc0,0xf0,0xc0,0x83,0xc0,0x82,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,0xc0,0xe0},
+ 16,0x3d57,0,{0xea,0xc0,0xe0,0xeb,0xc0,0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,0xe0,0xef},
+ 16,0x3d67,0,{0xc0,0xe0,0x90,0x7f,0xa2,0xe0,0x90,0x76,0x7f,0xf0,0x90,0x7f,0x74,0xe0,0x90,0x76},
+ 16,0x3d77,0,{0x87,0xf0,0x90,0x7f,0x75,0xe0,0x90,0x76,0x88,0xf0,0x90,0x7f,0x98,0xe0,0x44,0x02},
+ 16,0x3d87,0,{0xf0,0x90,0x76,0x96,0xe0,0xff,0x20,0xe1,0x0c,0x44,0x02,0xf0,0x90,0x80,0x03,0xf0},
+ 16,0x3d97,0,{0xd2,0x32,0x12,0x4b,0x28,0x90,0x76,0x7f,0xe0,0x20,0xe2,0x50,0x90,0x76,0x87,0xe0},
+ 16,0x3da7,0,{0xfe,0xa3,0xe0,0x7c,0x00,0x24,0x00,0xf5,0x34,0xec,0x3e,0xf5,0x33,0x90,0x76,0x98},
+ 16,0x3db7,0,{0xe0,0xfd,0xae,0x33,0xaf,0x34,0x12,0x36,0xd8,0x90,0x76,0x87,0xef,0xf0,0xd2,0x2f},
+ 16,0x3dc7,0,{0x30,0x31,0x29,0x20,0x3f,0x26,0xc2,0x31,0x90,0x7f,0x94,0xe0,0x54,0xcf,0xf0,0x90},
+ 16,0x3dd7,0,{0x7f,0x9a,0xe0,0x30,0xe4,0x04,0xd2,0x2d,0xc2,0x2c,0x90,0x7f,0x9a,0xe0,0x20,0xe5},
+ 16,0x3de7,0,{0x04,0xc2,0x2d,0xd2,0x2c,0x90,0x7f,0x94,0xe0,0x44,0x30,0xf0,0x12,0x48,0xbd,0x12},
+ 16,0x3df7,0,{0x1b,0x04,0x30,0x2f,0x12,0x12,0x42,0x1f,0xc2,0x2f,0x75,0xe8,0x01,0x12,0x16,0x8a},
+ 16,0x3e07,0,{0x75,0xe8,0x0d,0xd2,0x2b,0x80,0x05,0x75,0xe8,0x01,0xc2,0x2b,0x20,0x2b,0x34,0x90},
+ 16,0x3e17,0,{0x76,0x19,0xe0,0xff,0xb4,0x01,0x0e,0x90,0x76,0x7c,0x74,0x67,0xf0,0xa3,0x74,0x06},
+ 16,0x3e27,0,{0xf0,0xa3,0x74,0x0b,0xf0,0xef,0xb4,0x02,0x0b,0x90,0x76,0x7c,0xe4,0xf0,0xa3,0xf0},
+ 16,0x3e37,0,{0xa3,0x74,0x0c,0xf0,0xef,0xb4,0x03,0x0b,0x90,0x76,0x7c,0xe4,0xf0,0xa3,0xf0,0xa3},
+ 16,0x3e47,0,{0x74,0x18,0xf0,0x75,0xca,0xd3,0x75,0xcb,0xfe,0xd2,0xca,0x30,0x34,0x04,0xc2,0x34},
+ 16,0x3e57,0,{0x80,0x02,0xd2,0x34,0x30,0x34,0x0d,0x90,0x76,0x89,0xe0,0xc3,0x94,0x03,0x40,0x04},
+ 16,0x3e67,0,{0xe0,0x24,0xfd,0xf0,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x02,0xf0,0xf0,0x90,0x7f},
+ 16,0x3e77,0,{0x98,0xe0,0x54,0xfd,0xf0,0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,0xe0,0xfd,0xd0,0xe0},
+ 16,0x3e87,0,{0xfc,0xd0,0xe0,0xfb,0xd0,0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,0xf8,0xd0,0xd0,0xd0},
+ 8,0x3e97,0,{0x82,0xd0,0x83,0xd0,0xf0,0xd0,0xe0,0x32},
+ 16,0x3e9f,0,{0x90,0x76,0x92,0xe0,0x14,0x60,0x1d,0x14,0x70,0x02,0xe1,0x54,0x24,0x02,0x60,0x02},
+ 16,0x3eaf,0,{0xe1,0xe4,0x90,0x76,0x94,0x74,0x01,0xf0,0x90,0x80,0x00,0xf0,0xe4,0x90,0x76,0x8e},
+ 16,0x3ebf,0,{0xf0,0xd2,0x31,0x22,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x1b,0xe4,0x90,0x7f,0xf2},
+ 16,0x3ecf,0,{0xf0,0x90,0x7f,0xf3,0x74,0x30,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97},
+ 16,0x3edf,0,{0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0,0xef,0xb4,0x02,0x1b,0xe4,0x90,0x7f,0xf2,0xf0},
+ 16,0x3eef,0,{0x90,0x7f,0xf3,0x74,0x34,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97,0xe0},
+ 16,0x3eff,0,{0x44,0x02,0xf0,0x54,0xfb,0xf0,0xef,0xb4,0x03,0x18,0xe4,0x90,0x7f,0xf2,0xf0,0x90},
+ 16,0x3f0f,0,{0x7f,0xf3,0x74,0x64,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97,0xe0,0x44},
+ 16,0x3f1f,0,{0x04,0xf0,0x90,0x76,0x94,0xe0,0x44,0x01,0xf0,0x90,0x80,0x00,0xf0,0x30,0x3f,0x09},
+ 16,0x3f2f,0,{0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0},
+ 16,0x3f3f,0,{0x90,0x76,0x97,0xe0,0x90,0x80,0x02,0xf0,0x90,0x76,0x98,0x74,0x04,0xf0,0x90,0x76},
+ 16,0x3f4f,0,{0x8e,0x74,0x01,0xf0,0x22,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x1b,0xe4,0x90,0x7f},
+ 16,0x3f5f,0,{0xf2,0xf0,0x90,0x7f,0xf3,0x74,0x44,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76},
+ 16,0x3f6f,0,{0x97,0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0,0xef,0xb4,0x02,0x1b,0xe4,0x90,0x7f,0xf2},
+ 16,0x3f7f,0,{0xf0,0x90,0x7f,0xf3,0x74,0x4c,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97},
+ 16,0x3f8f,0,{0xe0,0x44,0x02,0xf0,0x54,0xfb,0xf0,0xef,0xb4,0x03,0x18,0xe4,0x90,0x7f,0xf2,0xf0},
+ 16,0x3f9f,0,{0x90,0x7f,0xf3,0x74,0x94,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97,0xe0},
+ 16,0x3faf,0,{0x44,0x04,0xf0,0x90,0x76,0x94,0xe0,0x54,0xfe,0xf0,0x90,0x80,0x00,0xf0,0x30,0x3f},
+ 16,0x3fbf,0,{0x09,0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01},
+ 16,0x3fcf,0,{0xf0,0x90,0x76,0x97,0xe0,0x90,0x80,0x02,0xf0,0x90,0x76,0x98,0x74,0x06,0xf0,0x90},
+ 6,0x3fdf,0,{0x76,0x8e,0x74,0x02,0xf0,0x22},
+ 16,0x3fe5,0,{0x90,0x7f,0xea,0xe0,0x90,0x76,0x82,0xf0,0xe4,0x90,0x76,0x91,0xf0,0x90,0x76,0x92},
+ 11,0x3ff5,0,{0xf0,0x90,0x76,0x90,0xf0,0x90,0x76,0x93,0xf0,0xd3,0x22},
+ 16,0x4000,0,{0xe5,0x11,0xd3,0x94,0x00,0x50,0x02,0x21,0x06,0x90,0x76,0x89,0xe0,0xc3,0x94,0x08},
+ 16,0x4010,0,{0x40,0x02,0x21,0x06,0x74,0x40,0x25,0x0f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0},
+ 16,0x4020,0,{0xf5,0x17,0xe5,0x0d,0x60,0x0e,0x90,0x80,0x05,0xe5,0x17,0xf0,0x90,0x76,0x89,0xe0},
+ 16,0x4030,0,{0x04,0xf0,0x01,0xda,0xe5,0x17,0x12,0x37,0xf9,0x40,0xc1,0x02,0x40,0x67,0x05,0x40},
+ 16,0x4040,0,{0x7a,0x06,0x40,0x98,0x07,0x40,0xc1,0x0c,0x40,0xc1,0x0d,0x40,0xc7,0x0f,0x40,0xcb},
+ 16,0x4050,0,{0xf6,0x40,0xcb,0xf8,0x40,0xcb,0xfa,0x40,0xcb,0xfb,0x40,0xcb,0xfc,0x40,0xcb,0xfe},
+ 16,0x4060,0,{0x40,0xcb,0xff,0x00,0x00,0x40,0xda,0x90,0x7e,0x41,0xe0,0x90,0x80,0x05,0xf0,0x90},
+ 16,0x4070,0,{0x76,0x89,0xe0,0x04,0xf0,0x75,0x11,0x01,0x80,0x60,0x90,0x7e,0x41,0xe0,0x90,0x80},
+ 16,0x4080,0,{0x05,0xf0,0x90,0x7e,0x42,0xe0,0x90,0x80,0x05,0xf0,0x90,0x76,0x89,0xe0,0x04,0xf0},
+ 16,0x4090,0,{0xe0,0x04,0xf0,0x75,0x11,0x01,0x80,0x42,0x90,0x7e,0x41,0xe0,0x90,0x80,0x05,0xf0},
+ 16,0x40a0,0,{0x90,0x7e,0x42,0xe0,0x90,0x80,0x05,0xf0,0x90,0x7e,0x43,0xe0,0x90,0x80,0x05,0xf0},
+ 16,0x40b0,0,{0x90,0x76,0x89,0xe0,0x04,0xf0,0xe0,0x04,0xf0,0xe0,0x04,0xf0,0x75,0x11,0x01,0x80},
+ 16,0x40c0,0,{0x19,0xd2,0x3b,0xd2,0x3c,0x80,0x13,0xd2,0x3b,0x80,0x0f,0x90,0x80,0x05,0xe5,0x17},
+ 16,0x40d0,0,{0xf0,0x90,0x76,0x89,0xe0,0x04,0xf0,0x75,0x11,0x01,0x20,0x3b,0x04,0x05,0x0d,0x80},
+ 16,0x40e0,0,{0x1f,0x30,0x3c,0x1c,0x90,0x7e,0x41,0xe0,0x90,0x80,0x05,0xf0,0x90,0x7e,0x42,0xe0},
+ 16,0x40f0,0,{0x90,0x80,0x05,0xf0,0x90,0x76,0x89,0xe0,0x04,0xf0,0xe0,0x04,0xf0,0x75,0x11,0x01},
+ 16,0x4100,0,{0x05,0x0f,0x15,0x11,0x01,0x00,0xe5,0x11,0x70,0x10,0xc2,0x33,0xf5,0x0d,0xf5,0x0f},
+ 11,0x4110,0,{0x90,0x7f,0xc7,0x74,0x04,0xf0,0xc2,0x3b,0xc2,0x3c,0x22},
+ 16,0x411b,0,{0x90,0x76,0x8d,0xe0,0x64,0x01,0x70,0x27,0x30,0x27,0x08,0xc2,0x27,0x12,0x08,0x00},
+ 16,0x412b,0,{0x12,0x17,0x4a,0x30,0x28,0x08,0xc2,0x28,0x12,0x38,0x74,0x12,0x17,0x4a,0x30,0x2a},
+ 16,0x413b,0,{0x0e,0xe4,0x90,0x76,0x8d,0xf0,0xc2,0x2a,0x90,0x7f,0xb4,0xe0,0x44,0x02,0xf0,0x90},
+ 16,0x414b,0,{0x76,0x3f,0xe0,0xb4,0x01,0x05,0xe4,0xf0,0x12,0x32,0x6f,0x90,0x76,0x41,0xe0,0xb4},
+ 16,0x415b,0,{0x01,0x05,0xe4,0xf0,0x12,0x34,0x9a,0x90,0x76,0x40,0xe0,0xb4,0x01,0x03,0x12,0x34},
+ 16,0x416b,0,{0x9a,0x12,0x30,0x00,0x30,0x33,0x03,0x12,0x40,0x00,0x90,0x7f,0x9b,0xe0,0x20,0xe4},
+ 16,0x417b,0,{0x02,0xc2,0x3f,0x90,0x7f,0x9b,0xe0,0x30,0xe4,0x02,0xd2,0x3f,0x90,0x7f,0x9b,0xe0},
+ 16,0x418b,0,{0x20,0xe5,0x02,0xc2,0x3e,0x90,0x7f,0x9b,0xe0,0x30,0xe5,0x02,0xd2,0x3e,0xa2,0x41},
+ 16,0x419b,0,{0x30,0x3f,0x01,0xb3,0x50,0x1f,0xa2,0x3f,0x92,0x41,0x30,0x3f,0x09,0x90,0x76,0x97},
+ 16,0x41ab,0,{0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0,0x90,0x76,0x97},
+ 16,0x41bb,0,{0xe0,0x90,0x80,0x02,0xf0,0x30,0x3f,0x34,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x0e},
+ 16,0x41cb,0,{0x90,0x76,0x7c,0x74,0x67,0xf0,0xa3,0x74,0x06,0xf0,0xa3,0x74,0x0b,0xf0,0xef,0xb4},
+ 16,0x41db,0,{0x02,0x0b,0xe4,0x90,0x76,0x7c,0xf0,0xa3,0xf0,0xa3,0x74,0x0c,0xf0,0xef,0xb4,0x03},
+ 16,0x41eb,0,{0x0b,0xe4,0x90,0x76,0x7c,0xf0,0xa3,0xf0,0xa3,0x74,0x18,0xf0,0xa2,0x40,0x30,0x3e},
+ 16,0x41fb,0,{0x01,0xb3,0x50,0x1f,0xa2,0x3e,0x92,0x40,0x30,0x3e,0x09,0x90,0x76,0x95,0xe0,0x44},
+ 16,0x420b,0,{0x04,0xf0,0x80,0x07,0x90,0x76,0x95,0xe0,0x54,0xfb,0xf0,0x90,0x76,0x95,0xe0,0x90},
+ 4,0x421b,0,{0x80,0x01,0xf0,0x22},
+ 16,0x421f,0,{0x90,0x76,0x19,0xe0,0x64,0x01,0x70,0x35,0x90,0x76,0x87,0xe0,0xff,0xd3,0x94,0x2d},
+ 16,0x422f,0,{0x40,0x2b,0x90,0x76,0x86,0x74,0x01,0xf0,0x90,0x76,0x85,0xe0,0x04,0xf0,0xe0,0xd3},
+ 16,0x423f,0,{0x94,0x0f,0x40,0x19,0xe4,0xf0,0xef,0xd3,0x94,0x31,0x40,0x08,0x90,0x76,0x19,0x74},
+ 16,0x424f,0,{0x03,0xf0,0x80,0x06,0x90,0x76,0x19,0x74,0x02,0xf0,0x12,0x3e,0x9f,0x90,0x76,0x19},
+ 16,0x425f,0,{0xe0,0xb4,0x02,0x2c,0x90,0x76,0x87,0xe0,0xff,0xc3,0x94,0x2f,0x50,0x22,0xef,0xd3},
+ 16,0x426f,0,{0x94,0x2a,0x40,0x1c,0x90,0x76,0x86,0x74,0x01,0xf0,0x90,0x76,0x85,0xe0,0x04,0xf0},
+ 16,0x427f,0,{0xe0,0xd3,0x94,0x0f,0x40,0x0a,0xe4,0xf0,0x90,0x76,0x19,0x04,0xf0,0x12,0x3e,0x9f},
+ 16,0x428f,0,{0x90,0x76,0x19,0xe0,0xb4,0x02,0x26,0x90,0x76,0x87,0xe0,0xd3,0x94,0x31,0x40,0x1d},
+ 16,0x429f,0,{0x90,0x76,0x86,0x74,0x01,0xf0,0x90,0x76,0x85,0xe0,0x04,0xf0,0xe0,0xd3,0x94,0x0f},
+ 16,0x42af,0,{0x40,0x0b,0xe4,0xf0,0x90,0x76,0x19,0x74,0x03,0xf0,0x12,0x3e,0x9f,0x90,0x76,0x19},
+ 16,0x42bf,0,{0xe0,0x64,0x03,0x70,0x3f,0x90,0x76,0x87,0xe0,0xff,0xc3,0x94,0x5f,0x50,0x35,0x90},
+ 16,0x42cf,0,{0x76,0x86,0x74,0x01,0xf0,0x90,0x76,0x85,0xe0,0x04,0xf0,0xe0,0xd3,0x94,0x0f,0x40},
+ 16,0x42df,0,{0x23,0xe4,0xf0,0xef,0xc3,0x94,0x2f,0x50,0x0c,0xef,0xd3,0x94,0x2a,0x40,0x06,0x90},
+ 16,0x42ef,0,{0x76,0x19,0x74,0x01,0xf0,0xef,0xd3,0x94,0x2f,0x40,0x06,0x90,0x76,0x19,0x74,0x02},
+ 16,0x42ff,0,{0xf0,0x12,0x3e,0x9f,0x90,0x76,0x86,0xe0,0x70,0x05,0x90,0x76,0x85,0xf0,0x22,0xe4},
+ 5,0x430f,0,{0x90,0x76,0x86,0xf0,0x22},
+ 16,0x4314,0,{0xe4,0x90,0x76,0x96,0xf0,0x90,0x80,0x03,0xf0,0x90,0x7f,0xe0,0x74,0x90,0xf0,0x90},
+ 16,0x4324,0,{0x7f,0xe1,0x74,0x04,0xf0,0xe4,0x90,0x7f,0xdd,0xf0,0x90,0x7f,0xa1,0xf0,0x53,0x8e},
+ 16,0x4334,0,{0xf8,0x75,0x88,0x05,0x75,0xb8,0x20,0x75,0xf8,0x01,0x43,0x8e,0x30,0xf5,0xc8,0x75},
+ 16,0x4344,0,{0xca,0x7f,0x75,0xcb,0xf8,0x43,0xa8,0x20,0x12,0x45,0x65,0xc2,0x2c,0xc2,0x2d,0xc2},
+ 16,0x4354,0,{0x2b,0xc2,0x2f,0x90,0x7f,0xfc,0x74,0xdd,0xf0,0x90,0x7f,0xff,0x74,0xff,0xf0,0x90},
+ 16,0x4364,0,{0x7f,0x97,0xe0,0x44,0x01,0xf0,0x90,0x76,0x19,0x74,0x01,0xf0,0xe4,0x90,0x76,0x85},
+ 16,0x4374,0,{0xf0,0xa3,0xf0,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0x12,0x49,0xae,0x12,0x0f},
+ 16,0x4384,0,{0xc6,0x12,0x4a,0xf1,0x90,0x7f,0x97,0xe0,0x44,0x08,0xf0,0xe0,0x54,0xb9,0xf0,0xd2},
+ 16,0x4394,0,{0x30,0x20,0x30,0x18,0x12,0x4a,0xa6,0x12,0x30,0x00,0x12,0x40,0x00,0x12,0x42,0x1f},
+ 16,0x43a4,0,{0x12,0x48,0xbd,0x12,0x1b,0x04,0x12,0x16,0x61,0x12,0x42,0x1f,0x12,0x4a,0xa6,0xc2},
+ 16,0x43b4,0,{0x2f,0xc2,0x31,0xc2,0x32,0xc2,0x34,0xc2,0x33,0xc2,0x29,0xc2,0x27,0xc2,0x28,0xe4},
+ 16,0x43c4,0,{0xf5,0x11,0x90,0x76,0x89,0xf0,0x90,0x76,0x3f,0xf0,0x90,0x76,0x41,0xf0,0x90,0x76},
+ 16,0x43d4,0,{0x40,0xf0,0x90,0x76,0x8a,0xf0,0xa3,0xf0,0xa3,0x04,0xf0,0xe4,0xa3,0xf0,0x90,0x76},
+ 3,0x43e4,0,{0x99,0xf0,0x22},
+ 16,0x43e7,0,{0x12,0x4e,0x19,0x40,0x02,0x81,0xac,0x90,0x7f,0xeb,0xe0,0x24,0xfe,0x60,0x1e,0x14},
+ 16,0x43f7,0,{0x60,0x46,0x14,0x60,0x6e,0x14,0x70,0x02,0x81,0x9d,0x24,0x04,0x60,0x02,0x81,0xa5},
+ 16,0x4407,0,{0x74,0x05,0x90,0x7f,0xd4,0xf0,0x74,0x00,0x90,0x7f,0xd5,0xf0,0x22,0x90,0x7f,0xea},
+ 16,0x4417,0,{0xe0,0xff,0x12,0x4a,0x55,0x8b,0x20,0x8a,0x21,0x89,0x22,0xea,0x49,0x60,0x11,0xce},
+ 16,0x4427,0,{0xea,0xce,0xee,0x90,0x7f,0xd4,0xf0,0xcf,0xe9,0xcf,0xef,0x90,0x7f,0xd5,0xf0,0x22},
+ 16,0x4437,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xff,0x12,0x47,0xb7},
+ 16,0x4447,0,{0x8b,0x20,0x8a,0x21,0x89,0x22,0xea,0x49,0x60,0x11,0xce,0xea,0xce,0xee,0x90,0x7f},
+ 16,0x4457,0,{0xd4,0xf0,0xcf,0xe9,0xcf,0xef,0x90,0x7f,0xd5,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44},
+ 16,0x4467,0,{0x01,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xff,0x90,0x7e,0xc0,0xe0,0xfd,0xa3,0xe0,0xfb},
+ 16,0x4477,0,{0x12,0x17,0x94,0x8b,0x20,0x8a,0x21,0x89,0x22,0xea,0x49,0x60,0x11,0xce,0xea,0xce},
+ 16,0x4487,0,{0xee,0x90,0x7f,0xd4,0xf0,0xcf,0xe9,0xcf,0xef,0x90,0x7f,0xd5,0xf0,0x22,0x90,0x7f},
+ 16,0x4497,0,{0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f},
+ 5,0x44a7,0,{0xb4,0xe0,0x44,0x01,0xf0},
+ 1,0x44ac,0,{0x22},
+ 16,0x44ad,0,{0xc2,0xaf,0xd2,0x24,0x90,0x7f,0x93,0x74,0x30,0xf0,0x90,0x7f,0x9c,0x74,0xbb,0xf0},
+ 16,0x44bd,0,{0x90,0x7f,0x96,0xe0,0x44,0x30,0xf0,0xe0,0x54,0x30,0xf0,0x90,0x7f,0x94,0x74,0x30},
+ 16,0x44cd,0,{0xf0,0x90,0x7f,0x9d,0x74,0xcf,0xf0,0x90,0x7f,0x97,0x74,0xa0,0xf0,0x90,0x7f,0x95},
+ 16,0x44dd,0,{0x74,0xc0,0xf0,0x90,0x7f,0x9e,0x74,0x03,0xf0,0x90,0x7f,0x99,0xe0,0x30,0xe2,0x09},
+ 16,0x44ed,0,{0x90,0x05,0x19,0x74,0xa0,0xf0,0xe4,0xa3,0xf0,0xc2,0x25,0xc2,0x22,0xc2,0x23,0xc2},
+ 16,0x44fd,0,{0x26,0x12,0x4b,0x28,0x12,0x2d,0xa9,0x12,0x3b,0xd3,0x12,0x46,0x19,0x12,0x3a,0x42},
+ 16,0x450d,0,{0x90,0x76,0x68,0x74,0x01,0xf0,0x70,0x0f,0x12,0x4c,0x29,0x12,0x4e,0x15,0x12,0x4e},
+ 16,0x451d,0,{0x17,0x12,0x1b,0x40,0x12,0x14,0x96,0x12,0x43,0x14,0x90,0x7f,0xaf,0xe0,0x44,0x01},
+ 16,0x452d,0,{0xf0,0x90,0x7f,0xae,0xe0,0x44,0x1f,0xf0,0x90,0x7f,0xac,0x74,0xff,0xf0,0x90,0x7f},
+ 16,0x453d,0,{0xad,0xf0,0x90,0x7f,0xde,0xf0,0x90,0x7f,0xdf,0xf0,0x90,0x7f,0xab,0xf0,0x90,0x7f},
+ 16,0x454d,0,{0xa9,0xf0,0x90,0x7f,0xaa,0xf0,0x53,0x91,0xef,0x43,0xd8,0x20,0xd2,0xe8,0x43,0xd8},
+ 8,0x455d,0,{0x20,0x53,0xa8,0xa0,0x43,0xa8,0x80,0x22},
+ 16,0x4565,0,{0x90,0x76,0x9a,0x74,0x02,0xf0,0xe4,0x90,0x76,0x91,0xf0,0xa3,0xf0,0x90,0x76,0x90},
+ 16,0x4575,0,{0xf0,0x90,0x76,0x93,0xf0,0x90,0x76,0x96,0x74,0x03,0xf0,0x90,0x80,0x03,0xf0,0xe4},
+ 16,0x4585,0,{0x90,0x76,0x97,0xf0,0x90,0x80,0x02,0xf0,0x90,0x76,0x94,0x04,0xf0,0x90,0x80,0x00},
+ 16,0x4595,0,{0xf0,0xe4,0x90,0x76,0x8e,0xf0,0x90,0x76,0x1a,0xf0,0x90,0x76,0x95,0x04,0xf0,0xc2},
+ 16,0x45a5,0,{0x2e,0x90,0x7f,0x9b,0xe0,0xff,0x54,0x10,0xff,0x70,0x02,0xc2,0x3f,0x90,0x7f,0x9b},
+ 16,0x45b5,0,{0xe0,0xff,0x54,0x10,0xfe,0xff,0xbe,0x10,0x02,0xd2,0x3f,0x90,0x7f,0x9b,0xe0,0xff},
+ 16,0x45c5,0,{0x54,0x20,0xff,0x70,0x02,0xc2,0x3e,0x90,0x7f,0x9b,0xe0,0xff,0x54,0x20,0xfe,0xff},
+ 16,0x45d5,0,{0xbe,0x20,0x02,0xd2,0x3e,0x30,0x3f,0x09,0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80},
+ 16,0x45e5,0,{0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0,0x90,0x76,0x97,0xe0,0x90,0x80,0x02,0xf0},
+ 16,0x45f5,0,{0x30,0x3e,0x09,0x90,0x76,0x95,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x76,0x95,0xe0},
+ 16,0x4605,0,{0x54,0xfb,0xf0,0x90,0x76,0x95,0xe0,0x90,0x80,0x01,0xf0,0xa2,0x3e,0x92,0x40,0xa2},
+ 3,0x4615,0,{0x3f,0x92,0x41},
+ 1,0x4618,0,{0x22},
+ 16,0x4619,0,{0xe4,0x90,0x76,0x36,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4},
+ 16,0x4629,0,{0x34,0x75,0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x33,0xf5,0x82,0xe4},
+ 16,0x4639,0,{0x34,0x75,0xf5,0x83,0x74,0x01,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75},
+ 16,0x4649,0,{0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0xef,0x75},
+ 16,0x4659,0,{0xf0,0x03,0xa4,0x24,0x33,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0x90},
+ 16,0x4669,0,{0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4},
+ 16,0x4679,0,{0x34,0x75,0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x33,0xf5,0x82,0xe4},
+ 16,0x4689,0,{0x34,0x75,0xf5,0x83,0x74,0x03,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75},
+ 16,0x4699,0,{0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0xef,0x75},
+ 16,0x46a9,0,{0xf0,0x03,0xa4,0x24,0x33,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x04,0xf0,0x22},
+ 12,0x46b9,0,{0x78,0x7f,0xe4,0xf6,0xd8,0xfd,0x75,0x81,0x38,0x02,0x47,0x00},
+ 16,0x46c5,0,{0x02,0x07,0xa6,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0x40,0x03,0xf6,0x80,0x01,0xf2},
+ 16,0x46d5,0,{0x08,0xdf,0xf4,0x80,0x29,0xe4,0x93,0xa3,0xf8,0x54,0x07,0x24,0x0c,0xc8,0xc3,0x33},
+ 16,0x46e5,0,{0xc4,0x54,0x0f,0x44,0x20,0xc8,0x83,0x40,0x04,0xf4,0x56,0x80,0x01,0x46,0xf6,0xdf},
+ 16,0x46f5,0,{0xe4,0x80,0x0b,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x90,0x0c,0x8f,0xe4,0x7e},
+ 16,0x4705,0,{0x01,0x93,0x60,0xbc,0xa3,0xff,0x54,0x3f,0x30,0xe5,0x09,0x54,0x1f,0xfe,0xe4,0x93},
+ 16,0x4715,0,{0xa3,0x60,0x01,0x0e,0xcf,0x54,0xc0,0x25,0xe0,0x60,0xa8,0x40,0xb8,0xe4,0x93,0xa3},
+ 16,0x4725,0,{0xfa,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca},
+ 16,0x4735,0,{0xf0,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca,0xdf,0xe9,0xde,0xe7,0x80,0xbe},
+ 16,0x4745,0,{0x90,0x7f,0xec,0xe0,0x90,0x76,0x83,0xf0,0xe0,0x14,0x60,0x1d,0x14,0x60,0x2a,0x14},
+ 16,0x4755,0,{0x60,0x37,0x14,0x60,0x44,0x24,0x04,0x70,0x50,0x90,0x76,0x91,0xe0,0x90,0x7f,0x00},
+ 16,0x4765,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x47,0x90,0x76,0x92,0xe0,0x90,0x7f,0x00},
+ 16,0x4775,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x37,0x90,0x76,0x90,0xe0,0x90,0x7f,0x00},
+ 16,0x4785,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x27,0x90,0x76,0x84,0xe0,0x90,0x7f,0x00},
+ 16,0x4795,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x17,0x90,0x76,0x93,0xe0,0x90,0x7f,0x00},
+ 16,0x47a5,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0},
+ 2,0x47b5,0,{0xd3,0x22},
+ 2,0x47b7,0,{0x8f,0x2e},
+ 16,0x47b9,0,{0xe4,0xf5,0x2f,0x75,0x30,0xff,0x75,0x31,0x07,0x75,0x32,0x1a,0xab,0x30,0xaa,0x31},
+ 16,0x47c9,0,{0xa9,0x32,0x90,0x00,0x01,0x12,0x36,0xab,0xb4,0x03,0x1f,0xaf,0x2f,0x05,0x2f,0xef},
+ 16,0x47d9,0,{0x65,0x2e,0x70,0x01,0x22,0x12,0x36,0x92,0x7e,0x00,0x29,0xff,0xee,0x3a,0xc9,0xef},
+ 16,0x47e9,0,{0xc9,0x75,0x30,0xff,0xf5,0x31,0x89,0x32,0x80,0xd2,0x7b,0x00,0x7a,0x00,0x79,0x00},
+ 1,0x47f9,0,{0x22},
+ 6,0x47fa,0,{0x12,0x4b,0x28,0xc2,0x31,0x22},
+ 16,0x4800,0,{0xc0,0xe0,0xc0,0xf0,0xc0,0x83,0xc0,0x82,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,0xc0,0xe0},
+ 16,0x4810,0,{0xea,0xc0,0xe0,0xeb,0xc0,0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,0xe0,0xef},
+ 16,0x4820,0,{0xc0,0xe0,0xc2,0xca,0xc2,0xcf,0x90,0x7f,0x98,0xe0,0x44,0x01,0xf0,0x30,0x2e,0x03},
+ 16,0x4830,0,{0x12,0x14,0xa6,0x90,0x7f,0x98,0xe0,0x54,0xfe,0xf0,0x53,0xa8,0xfa,0x12,0x16,0x61},
+ 16,0x4840,0,{0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,0xe0,0xfd,0xd0,0xe0,0xfc,0xd0,0xe0,0xfb,0xd0},
+ 16,0x4850,0,{0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,0xf8,0xd0,0xd0,0xd0,0x82,0xd0,0x83,0xd0,0xf0},
+ 3,0x4860,0,{0xd0,0xe0,0x32},
+ 16,0x4863,0,{0x90,0x7f,0xec,0xe0,0x90,0x76,0x83,0xf0,0xe0,0x14,0x60,0x17,0x14,0x60,0x21,0x14},
+ 16,0x4873,0,{0x60,0x2b,0x14,0x60,0x32,0x24,0x04,0x70,0x38,0x90,0x7f,0xea,0xe0,0x90,0x76,0x91},
+ 16,0x4883,0,{0xf0,0x80,0x35,0x90,0x7f,0xea,0xe0,0x90,0x76,0x92,0xf0,0x12,0x3e,0x9f,0x80,0x28},
+ 16,0x4893,0,{0x90,0x7f,0xea,0xe0,0x90,0x76,0x90,0xf0,0x12,0x18,0x00,0x80,0x1b,0x90,0x7f,0xea},
+ 16,0x48a3,0,{0xe0,0x90,0x76,0x84,0xf0,0x80,0x11,0x90,0x7f,0xea,0xe0,0x90,0x76,0x93,0xf0,0x80},
+ 10,0x48b3,0,{0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xd3,0x22},
+ 16,0x48bd,0,{0x30,0x2d,0x39,0xc2,0x2d,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x0d,0xe4,0x90,0x76},
+ 16,0x48cd,0,{0x7c,0xf0,0xa3,0x74,0xf8,0xf0,0xa3,0x74,0x0a,0xf0,0xef,0xb4,0x02,0x0d,0xe4,0x90},
+ 16,0x48dd,0,{0x76,0x7c,0xf0,0xa3,0x74,0xf0,0xf0,0xa3,0x74,0x0b,0xf0,0xef,0xb4,0x03,0x0d,0xe4},
+ 13,0x48ed,0,{0x90,0x76,0x7c,0xf0,0xa3,0x74,0xf8,0xf0,0xa3,0x74,0x17,0xf0,0x22},
+ 6,0x48fa,0,{0x53,0x91,0xbf,0xd2,0x2d,0x32},
+ 16,0x4900,0,{0x02,0x2f,0xe7,0x00,0x02,0x3d,0x47,0x00,0x02,0x4d,0xb4,0x00,0x02,0x4c,0x43,0x00},
+ 16,0x4910,0,{0x02,0x4b,0xe9,0x00,0x02,0x2f,0xff,0x00,0x02,0x4c,0x5b,0x00,0x02,0x4c,0x0a,0x00},
+ 16,0x4920,0,{0x02,0x4c,0x72,0x00,0x02,0x4b,0x5a,0x00,0x02,0x4c,0x89,0x00,0x02,0x4c,0xa0,0x00},
+ 16,0x4930,0,{0x02,0x4c,0xb7,0x00,0x02,0x4c,0xce,0x00,0x02,0x4c,0xe5,0x00,0x02,0x4c,0xfc,0x00},
+ 16,0x4940,0,{0x02,0x4d,0x13,0x00,0x02,0x4d,0x2a,0x00,0x02,0x4d,0x41,0x00,0x02,0x4d,0x58,0x00},
+ 8,0x4950,0,{0x02,0x4d,0x6f,0x00,0x02,0x4d,0x86,0x00},
+ 16,0x4958,0,{0xe4,0x90,0x76,0x26,0xf0,0x90,0x76,0x26,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x34},
+ 16,0x4968,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xec,0xe0,0xfd,0xee,0x6d},
+ 16,0x4978,0,{0x60,0x0e,0xef,0xc3,0x94,0x04,0x50,0x08,0x90,0x76,0x26,0xe0,0x04,0xf0,0x80,0xd5},
+ 16,0x4988,0,{0xef,0xb4,0x04,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x03},
+ 16,0x4998,0,{0xa4,0x24,0x32,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0,0x90},
+ 6,0x49a8,0,{0x7f,0xb5,0x74,0x01,0xf0,0x22},
+ 16,0x49ae,0,{0x90,0x76,0x46,0x74,0x80,0xf0,0xe4,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3},
+ 16,0x49be,0,{0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0x74,0x80,0xf0,0xe4,0xa3,0xf0,0xa3,0xf0},
+ 16,0x49ce,0,{0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0x74,0x40,0xf0,0xe4,0xa3,0xf0,0xa3},
+ 16,0x49de,0,{0x74,0x40,0xf0,0xe4,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0},
+ 16,0x49ee,0,{0xa3,0x74,0x40,0xf0,0xe4,0xa3,0xf0,0xa3,0x74,0x40,0xf0,0xe4,0xa3,0xf0,0xa3,0xf0},
+ 5,0x49fe,0,{0xa3,0xf0,0xa3,0xf0,0x22},
+ 16,0x4a03,0,{0xe4,0x90,0x76,0x25,0xf0,0x90,0x76,0x25,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x34},
+ 16,0x4a13,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xec,0xe0,0xfd,0xee,0x6d},
+ 16,0x4a23,0,{0x60,0x0e,0xef,0xc3,0x94,0x04,0x50,0x08,0x90,0x76,0x25,0xe0,0x04,0xf0,0x80,0xd5},
+ 16,0x4a33,0,{0xef,0xb4,0x04,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7e,0xc0,0xe0},
+ 16,0x4a43,0,{0xfe,0xef,0x75,0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xee},
+ 2,0x4a53,0,{0xf0,0x22},
+ 16,0x4a55,0,{0xe4,0xfe,0x75,0x1d,0xff,0x75,0x1e,0x05,0x75,0x1f,0x12,0xab,0x1d,0xaa,0x1e,0xa9},
+ 16,0x4a65,0,{0x1f,0x90,0x00,0x01,0x12,0x36,0xab,0x64,0x02,0x70,0x2f,0xcd,0xee,0xcd,0x0e,0xed},
+ 16,0x4a75,0,{0x6f,0x70,0x01,0x22,0x90,0x00,0x02,0x12,0x37,0x0e,0x85,0xf0,0x1b,0xf5,0x1c,0x62},
+ 16,0x4a85,0,{0x1b,0xe5,0x1b,0x62,0x1c,0xe5,0x1c,0x62,0x1b,0x29,0xfd,0xe5,0x1b,0x3a,0xc9,0xed},
+ 16,0x4a95,0,{0xc9,0x75,0x1d,0xff,0xf5,0x1e,0x89,0x1f,0x80,0xc1,0x7b,0x00,0x7a,0x00,0x79,0x00},
+ 1,0x4aa5,0,{0x22},
+ 16,0x4aa6,0,{0xe4,0x90,0x76,0x9b,0xf0,0x90,0x76,0x9b,0xe0,0xff,0x04,0xf0,0xef,0x60,0x08,0xe0},
+ 16,0x4ab6,0,{0x24,0x08,0xf8,0xe4,0xf6,0x80,0xee,0x90,0x76,0x96,0xe0,0x44,0x04,0xf0,0x44,0x08},
+ 16,0x4ac6,0,{0xf0,0x90,0x80,0x03,0xf0,0xe4,0xf5,0x18,0xd2,0x35,0xf5,0x0e,0xf5,0x10,0xd2,0x36},
+ 16,0x4ad6,0,{0x75,0x12,0x11,0x75,0x13,0x22,0xc2,0x37,0xc2,0x39,0xc2,0x38,0xf5,0x16,0xf5,0x14},
+ 11,0x4ae6,0,{0xf5,0x1a,0xf5,0x0d,0xc2,0x3b,0xc2,0x3c,0xc2,0x3d,0x22},
+ 16,0x4af1,0,{0xe4,0xff,0x74,0x56,0x2f,0xf5,0x82,0xe4,0x34,0x76,0xf5,0x83,0xe0,0xfe,0x74,0x28},
+ 16,0x4b01,0,{0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x74,0x5e,0x2f,0xf5,0x82,0xe4},
+ 16,0x4b11,0,{0x34,0x76,0xf5,0x83,0xe0,0xfe,0x74,0x38,0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83},
+ 6,0x4b21,0,{0xee,0xf0,0x0f,0xbf,0x08,0xcc},
+ 1,0x4b27,0,{0x22},
+ 16,0x4b28,0,{0xe4,0x90,0x72,0x36,0xf0,0xa3,0xf0,0x90,0x7f,0x97,0xe0,0x54,0xfb,0xf0,0xe4,0x90},
+ 16,0x4b38,0,{0x72,0x33,0xf0,0x90,0x72,0x32,0xf0,0x90,0x72,0x01,0x04,0xf0,0xe4,0x90,0x72,0x33},
+ 16,0x4b48,0,{0xf0,0x90,0x72,0x32,0xf0,0x90,0x72,0x01,0x04,0xf0,0x90,0x7f,0x97,0xe0,0x44,0x04},
+ 2,0x4b58,0,{0xf0,0x22},
+ 16,0x4b5a,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x02,0xf0},
+ 16,0x4b6a,0,{0x90,0x7f,0xc7,0xe0,0xf5,0x11,0x75,0x0f,0x00,0x75,0x0d,0x00,0xd2,0x33,0xd0,0x82},
+ 5,0x4b7a,0,{0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4b7f,0,{0x90,0x7f,0xd6,0xe0,0x54,0xfb,0xf0,0xe0,0x44,0x08,0xf0,0x30,0x42,0x04,0xe0,0x44},
+ 16,0x4b8f,0,{0x02,0xf0,0x7f,0xdc,0x7e,0x05,0x12,0x4d,0x9d,0x90,0x7f,0xd6,0xe0,0x54,0xf7,0xf0},
+ 5,0x4b9f,0,{0xe0,0x44,0x04,0xf0,0x22},
+ 16,0x4ba4,0,{0x90,0x7f,0xeb,0xe0,0x14,0x70,0x14,0x90,0x7f,0xe9,0xe0,0x24,0x7f,0x70,0x04,0x12},
+ 16,0x4bb4,0,{0x49,0x58,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44},
+ 3,0x4bc4,0,{0x01,0xf0,0x22},
+ 16,0x4bc7,0,{0x90,0x7f,0xeb,0xe0,0x14,0x70,0x13,0x90,0x7f,0xe9,0xe0,0x14,0x70,0x04,0x12,0x4a},
+ 16,0x4bd7,0,{0x03,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01},
+ 2,0x4be7,0,{0xf0,0x22},
+ 16,0x4be9,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x10,0xf0,0x90},
+ 16,0x4bf9,0,{0x76,0x96,0xe0,0x54,0xfd,0xf0,0x90,0x80,0x03,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0},
+ 1,0x4c09,0,{0x32},
+ 16,0x4c0a,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x01,0xf0},
+ 15,0x4c1a,0,{0xc2,0x29,0x90,0x76,0x8d,0x74,0x01,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4c29,0,{0x90,0x7f,0xd6,0xe0,0x30,0xe7,0x12,0xe0,0x44,0x01,0xf0,0x7f,0x14,0x7e,0x00,0x12},
+ 10,0x4c39,0,{0x4d,0x9d,0x90,0x7f,0xd6,0xe0,0x54,0xfe,0xf0,0x22},
+ 16,0x4c43,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xd2,0x25,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x08},
+ 8,0x4c53,0,{0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4c5b,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x01,0xf0},
+ 7,0x4c6b,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4c72,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x02,0xf0},
+ 7,0x4c82,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4c89,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x04,0xf0},
+ 7,0x4c99,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4ca0,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x04,0xf0},
+ 7,0x4cb0,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4cb7,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x08,0xf0},
+ 7,0x4cc7,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4cce,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x08,0xf0},
+ 7,0x4cde,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4ce5,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x10,0xf0},
+ 7,0x4cf5,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4cfc,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x10,0xf0},
+ 7,0x4d0c,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4d13,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x20,0xf0},
+ 7,0x4d23,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4d2a,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x20,0xf0},
+ 7,0x4d3a,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4d41,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x40,0xf0},
+ 7,0x4d51,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4d58,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x40,0xf0},
+ 7,0x4d68,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4d6f,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x80,0xf0},
+ 7,0x4d7f,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4d86,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x80,0xf0},
+ 7,0x4d96,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4d9d,0,{0x8e,0x35,0x8f,0x36,0xe5,0x36,0x15,0x36,0xae,0x35,0x70,0x02,0x15,0x35,0x4e,0x60},
+ 7,0x4dad,0,{0x05,0x12,0x14,0x85,0x80,0xee,0x22},
+ 16,0x4db4,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x04,0xf0,0xd0},
+ 6,0x4dc4,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x4dca,0,{0x90,0x76,0x82,0xe0,0x90,0x7f,0x00,0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0xd3,0x22},
+ 12,0x4dda,0,{0xc2,0x37,0xe4,0xf5,0x0e,0xf5,0x10,0xc2,0x36,0xf5,0x14,0x22},
+ 9,0x4de6,0,{0xc2,0x25,0x53,0xd8,0xef,0x43,0xd8,0x20,0x32},
+ 7,0x4def,0,{0x53,0x98,0xfe,0x53,0x98,0xfd,0x32},
+ 7,0x4df6,0,{0x53,0xc0,0xfe,0x53,0xc0,0xfd,0x32},
+ 6,0x4dfd,0,{0x53,0x91,0x7f,0xd2,0x2c,0x32},
+ 4,0x4e03,0,{0x53,0x91,0xdf,0x32},
+ 4,0x4e07,0,{0x53,0xd8,0xf7,0x32},
+ 4,0x4e0b,0,{0x12,0x17,0x30,0x22},
+ 3,0x4e0f,0,{0xc2,0x8d,0x32},
+ 3,0x4e12,0,{0xc2,0x8f,0x32},
+ 2,0x4e15,0,{0xd3,0x22},
+ 2,0x4e17,0,{0xd3,0x22},
+ 2,0x4e19,0,{0xd3,0x22},
+ 2,0x4e1b,0,{0xd3,0x22},
+ 2,0x4e1d,0,{0xd3,0x22},
+ 2,0x4e1f,0,{0xd3,0x22},
+ 2,0x4e21,0,{0xc3,0x22},
+ 0,0x0000,1,{0}
+};
+/* Source: EMI62MFW.HEX
+:100C8F004176680141766A0241766B0AC120C12123
+:1044AD00C2AFD224907F937430F0907F9C74BBF098
+:1044BD00907F96E04430F0E05430F0907F9474306B
+:1044CD00F0907F9D74CFF0907F9774A0F0907F95C2
+:1044DD0074C0F0907F9E7403F0907F99E030E209F4
+:1044ED0090051974A0F0E4A3F0C225C222C223C224
+:1044FD0026124B28122DA9123BD3124619123A42FD
+:10450D009076687401F0700F124C29124E15124EF0
+:10451D0017121B40121496124314907FAFE0440102
+:10452D00F0907FAEE0441FF0907FAC74FFF0907F71
+:10453D00ADF0907FDEF0907FDFF0907FABF0907F5D
+:10454D00A9F0907FAAF05391EF43D820D2E843D839
+:08455D002053A8A043A880220E
+:1007A600E4907666F01244AD202613907666E0C398
+:1007B6009402500AE004F0D242124B7F80EA3026BF
+:1007C60005122801C22630252B907696E054FCF0BF
+:1007D600908003F0121496907696E04403F0908091
+:1007E60003F0E4907667F0907667E004F0E0B44BAF
+:0A07F600F61247FA12411B80C522DB
+:10280100C220C221C22A907FE8E01237F9283000A5
+:10281100288C0128A2022A1F212A6A22293D802907
+:102821007D8129D1822A84A12ABAA200002ABF90DF
+:102831007FE9E014601124FE602824FE603B24FC43
+:102841007040123FE541CB124E1D400241CB907FBB
+:10285100EAE0B40104C22241CB907FB4E04401F02C
+:1028610041CB124E1F907FEAE0B40104D22241CB4A
+:10287100907FB4E04401F041CB907FB4E04401F09B
+:1028810041CB907FB4E04401F041CB907FE9E0245B
+:10289100F5700512486341CB907FB4E04401F041EB
+:1028A100CB907FE9E024FD605424026002213412C0
+:1028B1004E1D400241CB907FEAE07038907FECE002
+:1028C100F45480FFC4540FFFE054072F25E024B4D3
+:1028D100F582E4347FF583E4F0907FECE05480FFEF
+:1028E100131313541FFFE054072F907FD7F0E044D8
+:1028F10020F041CB907FB4E04401F041CB124E1F58
+:10290100400241CB907FEAE07020907FECE0F454EC
+:1029110080FFC4540FFFE054072F25E024B4F58253
+:10292100E4347FF5837401F041CB907FB4E044013E
+:10293100F041CB907FB4E04401F041CB907FE9E0DE
+:10294100601224F86009240270291243E741CB1276
+:102951004DCA41CB124E1BA222E433FF25E0FFA258
+:1029610023E4334F907F00F0E4A3F0907FB574022D
+:10297100F041CB907FB4E04401F041CB907FE9E09E
+:10298100603324F6602A2404703D907FEBE024DE5E
+:10299100600C047012907FB4E04401F041CB907F51
+:1029A100B4E04401F041CB907FB4E04401F041CB6D
+:1029B10012474541CB124E1BE4907F00F0A3F090EB
+:1029C1007FB57402F041CB907FB4E04401F041CB7C
+:1029D100907FE9E024F46034240C7039124E1B908E
+:1029E1007FECE0F45480FFC4540FFFE054072F251F
+:1029F100E024B4F582E4347FF583E054FD907F0058
+:102A0100F0E4A3F0907FB57402F041CB907FB4E085
+:102A11004401F041CB907FB4E04401F041CB907F81
+:102A2100E9E024F6601214601A2402701DD220908D
+:102A31007FB4E04401F08012D220907FB4E04401E1
+:102A4100F08007907FB4E04401F0202018907FEEE1
+:102A5100E07004A3E0600BD229D22712174AD22AD0
+:102A61008003120800C2208061907FEEE07004A311
+:102A7100E0600BD229D22812174AD22A804C123890
+:102A8100748047907FE9E024FE601214601A2402EA
+:102A9100701DD221907FB4E04401F08012D22190C8
+:102AA1007FB4E04401F08007907FB4E04401F0205E
+:102AB1002103121000C2218011122AD6800C124E5D
+:102AC100215007907FB4E04401F0202A07907FB4A1
+:052AD100E04402F022C8
+:1043E700124E19400281AC907FEBE024FE601E1450
+:1043F700604614606E147002819D2404600281A5DA
+:104407007405907FD4F07400907FD5F022907FEAF6
+:10441700E0FF124A558B208A218922EA496011CE92
+:10442700EACEEE907FD4F0CFE9CFEF907FD5F022A0
+:10443700907FB4E04401F022907FEAE0FF1247B793
+:104447008B208A218922EA496011CEEACEEE907F3D
+:10445700D4F0CFE9CFEF907FD5F022907FB4E0443E
+:1044670001F022907FEAE0FF907EC0E0FDA3E0FB31
+:104477001217948B208A218922EA496011CEEACE4D
+:10448700EE907FD4F0CFE9CFEF907FD5F022907FE9
+:10449700B4E04401F022907FB4E04401F022907F21
+:0544A700B4E04401F047
+:0144AC0022ED
+:03003300024DE695
+:094DE600C22553D8EF43D8203256
+:020C9F00C12F63
+:0647FA00124B28C231221F
+:10431400E4907696F0908003F0907FE07490F090B3
+:104324007FE17404F0E4907FDDF0907FA1F0538E80
+:10433400F875880575B82075F801438E30F5C87591
+:10434400CA7F75CBF843A820124565C22CC22DC282
+:104354002BC22F907FFC74DDF0907FFF74FFF090F0
+:104364007F97E04401F09076197401F0E49076852B
+:10437400F0A3F0907681F0907680F01249AE120F9F
+:10438400C6124AF1907F97E04408F0E054B9F0D2A5
+:1043940030203018124AA612300012400012421F78
+:1043A4001248BD121B0412166112421F124AA6C201
+:1043B4002FC231C232C234C233C229C227C228E456
+:1043C400F511907689F090763FF0907641F09076F2
+:1043D40040F090768AF0A3F0A304F0E4A3F0907682
+:0343E40099F0222B
+:1048BD00302D39C22D907619E0FFB4010DE49076BC
+:1048CD007CF0A374F8F0A3740AF0EFB4020DE49039
+:1048DD00767CF0A374F0F0A3740BF0EFB4030DE449
+:0D48ED0090767CF0A374F8F0A37417F0220D
+:101B0400302C38C22C907619E0FFB4010E90767C0C
+:101B140074C0F0A37414F0A3740BF0EFB4020DE4DA
+:101B240090767CF0A37410F0A3740CF0EFB4030B64
+:0C1B3400E490767CF0A37418F0A3F0227B
+:10411B0090768DE064017027302708C227120800C3
+:10412B0012174A302808C22812387412174A302A3C
+:10413B000EE490768DF0C22A907FB4E04402F090AA
+:10414B00763FE0B40105E4F012326F907641E0B4B3
+:10415B000105E4F012349A907640E0B40103123476
+:10416B009A123000303303124000907F9BE020E422
+:10417B0002C23F907F9BE030E402D23F907F9BE0F6
+:10418B0020E502C23E907F9BE030E502D23EA24189
+:10419B00303F01B3501FA23F9241303F09907697B9
+:1041AB00E054FEF08007907697E04401F09076970C
+:1041BB00E0908002F0303F34907619E0FFB4010EAE
+:1041CB0090767C7467F0A37406F0A3740BF0EFB4D5
+:1041DB00020BE490767CF0A3F0A3740CF0EFB40325
+:1041EB000BE490767CF0A3F0A37418F0A240303E61
+:1041FB0001B3501FA23E9240303E09907695E044A9
+:10420B0004F08007907695E054FBF0907695E09063
+:04421B008001F0220C
+:024E1500D322A6
+:024E1700D322A4
+:024E1900D322A2
+:103FE500907FEAE0907682F0E4907691F090769278
+:0B3FF500F0907690F0907693F0D322CD
+:104DCA00907682E0907F00F0907FB57401F0D32254
+:10486300907FECE0907683F0E014601714602114DD
+:10487300602B14603224047038907FEAE0907691C4
+:10488300F08035907FEAE0907692F0123E9F802888
+:10489300907FEAE0907690F0121800801B907FEAF8
+:1048A300E0907684F08011907FEAE0907693F08038
+:0A48B30007907FB4E04401F0D32227
+:10474500907FECE0907683F0E014601D14602A14ED
+:10475500603714604424047050907691E0907F0097
+:10476500F0907FB57401F08047907692E0907F00DD
+:10477500F0907FB57401F08037907690E0907F00DF
+:10478500F0907FB57401F08027907684E0907F00EB
+:10479500F0907FB57401F08017907693E0907F00DC
+:1047A500F0907FB57401F08007907FB4E04401F08C
+:0247B500D3220D
+:024E1B00D322A0
+:024E1D00D3229E
+:024E1F00D3229C
+:024E2100C322AA
+:102FE700C0E0C083C082D2265391EF907FAB7401BB
+:082FF700F0D082D083D0E0325B
+:104DB400C0E0C083C0825391EF907FAB7404F0D005
+:064DC40082D083D0E03232
+:103D4700C0E0C0F0C083C082C0D0E8C0E0E9C0E0F6
+:103D5700EAC0E0EBC0E0ECC0E0EDC0E0EEC0E0EFB1
+:103D6700C0E0907FA2E090767FF0907F74E090763D
+:103D770087F0907F75E0907688F0907F98E0440216
+:103D8700F0907696E0FF20E10C4402F0908003F07B
+:103D9700D232124B2890767FE020E250907687E06F
+:103DA700FEA3E07C002400F534EC3EF533907698D2
+:103DB700E0FDAE33AF341236D8907687EFF0D22FCE
+:103DC700303129203F26C231907F94E054CFF090C4
+:103DD7007F9AE030E404D22DC22C907F9AE020E550
+:103DE70004C22DD22C907F94E04430F01248BD12CB
+:103DF7001B04302F1212421FC22F75E80112168AB8
+:103E070075E80DD22B800575E801C22B202B349065
+:103E17007619E0FFB4010E90767C7467F0A3740600
+:103E2700F0A3740BF0EFB4020B90767CE4F0A3F0F0
+:103E3700A3740CF0EFB4030B90767CE4F0A3F0A32B
+:103E47007418F075CAD375CBFED2CA303404C234A5
+:103E57008002D23430340D907689E0C39403400455
+:103E6700E024FDF05391EF907FAB7402F0F0907F68
+:103E770098E054FDF0D0E0FFD0E0FED0E0FDD0E0C8
+:103E8700FCD0E0FBD0E0FAD0E0F9D0E0F8D0D0D019
+:083E970082D083D0F0D0E032AC
+:104BE900C0E0C083C0825391EF907FAB7410F09006
+:104BF9007696E054FDF0908003F0D082D083D0E027
+:014C09003278
+:012FFF00329F
+:104C4300C0E0C083C082D2255391EF907FAB74083C
+:084C5300F0D082D083D0E032E2
+:104C5B00C0E0C083C0825391EF907FA9E04401F084
+:074C6B00D082D083D0E032BB
+:104C0A00C0E0C083C0825391EF907FAAE04401F0D4
+:0F4C1A00C22990768D7401F0D082D083D0E03221
+:104C7200C0E0C083C0825391EF907FA9E04402F06C
+:074C8200D082D083D0E032A4
+:104B5A00C0E0C083C0825391EF907FAAE04402F084
+:104B6A00907FC7E0F511750F00750D00D233D08222
+:054B7A00D083D0E03201
+:104C8900C0E0C083C0825391EF907FA9E04404F053
+:074C9900D082D083D0E0328D
+:104CA000C0E0C083C0825391EF907FAAE04404F03B
+:074CB000D082D083D0E03276
+:104CB700C0E0C083C0825391EF907FA9E04408F021
+:074CC700D082D083D0E0325F
+:104CCE00C0E0C083C0825391EF907FAAE04408F009
+:074CDE00D082D083D0E03248
+:104CE500C0E0C083C0825391EF907FA9E04410F0EB
+:074CF500D082D083D0E03231
+:104CFC00C0E0C083C0825391EF907FAAE04410F0D3
+:074D0C00D082D083D0E03219
+:104D1300C0E0C083C0825391EF907FA9E04420F0AC
+:074D2300D082D083D0E03202
+:104D2A00C0E0C083C0825391EF907FAAE04420F094
+:074D3A00D082D083D0E032EB
+:104D4100C0E0C083C0825391EF907FA9E04440F05E
+:074D5100D082D083D0E032D4
+:104D5800C0E0C083C0825391EF907FAAE04440F046
+:074D6800D082D083D0E032BD
+:104D6F00C0E0C083C0825391EF907FA9E04480F0F0
+:074D7F00D082D083D0E032A6
+:104D8600C0E0C083C0825391EF907FAAE04480F0D8
+:074D9600D082D083D0E0328F
+:10421F00907619E064017035907687E0FFD3942D86
+:10422F00402B9076867401F0907685E004F0E0D311
+:10423F00940F4019E4F0EFD394314008907619743D
+:10424F0003F080069076197402F0123E9F90761953
+:10425F00E0B4022C907687E0FFC3942F5022EFD367
+:10426F00942A401C9076867401F0907685E004F0D5
+:10427F00E0D3940F400AE4F090761904F0123E9FB9
+:10428F00907619E0B40226907687E0D39431401DE2
+:10429F009076867401F0907685E004F0E0D3940F69
+:1042AF00400BE4F09076197403F0123E9F9076194C
+:1042BF00E06403703F907687E0FFC3945F503590C2
+:1042CF0076867401F0907685E004F0E0D3940F4089
+:1042DF0023E4F0EFC3942F500CEFD3942A400690B1
+:1042EF0076197401F0EFD3942F400690761974026B
+:1042FF00F0123E9F907686E07005907685F022E46E
+:05430F00907686F0220B
+:1045650090769A7402F0E4907691F0A3F0907690AC
+:10457500F0907693F09076967403F0908003F0E4D3
+:10458500907697F0908002F090769404F0908000F9
+:10459500F0E490768EF090761AF090769504F0C25D
+:1045A5002E907F9BE0FF5410FF7002C23F907F9BCF
+:1045B500E0FF5410FEFFBE1002D23F907F9BE0FF4C
+:1045C5005420FF7002C23E907F9BE0FF5420FEFF07
+:1045D500BE2002D23E303F09907697E054FEF0802F
+:1045E50007907697E04401F0907697E0908002F08E
+:1045F500303E09907695E04404F08007907695E08A
+:1046050054FBF0907695E0908001F0A23E9240A296
+:034615003F924190
+:01461800227F
+:103E9F00907692E014601D147002E15424026002C7
+:103EAF00E1E49076947401F0908000F0E490768EC7
+:103EBF00F0D23122907619E0FFB4011BE4907FF22B
+:103ECF00F0907FF37430F0907FFF74FCF090769752
+:103EDF00E054FDF054FBF0EFB4021BE4907FF2F0DE
+:103EEF00907FF37434F0907FFF74FCF0907697E03E
+:103EFF004402F054FBF0EFB40318E4907FF2F0901B
+:103F0F007FF37464F0907FFF74FCF0907697E04439
+:103F1F0004F0907694E04401F0908000F0303F0977
+:103F2F00907697E054FEF08007907697E04401F08A
+:103F3F00907697E0908002F09076987404F09076E7
+:103F4F008E7401F022907619E0FFB4011BE4907F8C
+:103F5F00F2F0907FF37444F0907FFF74FCF0907652
+:103F6F0097E054FDF054FBF0EFB4021BE4907FF2A6
+:103F7F00F0907FF3744CF0907FFF74FCF090769785
+:103F8F00E04402F054FBF0EFB40318E4907FF2F03A
+:103F9F00907FF37494F0907FFF74FCF0907697E02D
+:103FAF004404F0907694E054FEF0908000F0303F9F
+:103FBF0009907697E054FEF08007907697E04401E1
+:103FCF00F0907697E0908002F09076987406F090DB
+:063FDF00768E7402F02250
+:10180000907690E014603714700201D814700221B1
+:1018100072147002413B240460026103907FFC74E7
+:10182000CCF0907FFF74FCF0907695E04401F0548A
+:1018300005F0908001F0E490761AF0C22E229076A6
+:1018400095E04401F04402F0303E06E04404F080AC
+:1018500007907695E054FBF090761AE0B40108907A
+:101860007695E0908001F0907619E0FFB401229027
+:101870007FFC7474F0907FFF74FCF090768F742B73
+:10188000F0907697E054FDF0E4907681F0907680C9
+:10189000F0EFB40222907FFC7468F0907FFF74FC3C
+:1018A000F090768F742FF0907697E04402F0E490F9
+:1018B0007681F0907680F0303F09907697E054FE84
+:1018C000F08007907697E04401F0907697E054FB23
+:1018D000F0908002F0D22E22907695E054FEF044F3
+:1018E00002F0303E06E04404F08007907695E05424
+:1018F000FBF090761AE0B40108907695E0908001B4
+:10190000F0907619E0FFB40122907FFC7430F090E3
+:101910007FFF74FCF090768F742BF0907697E054F4
+:10192000FDF0E4907681F0907680F0EFB4022290A2
+:101930007FFC741CF0907FFF74FCF090768F742F06
+:10194000F0907697E04402F0E4907681F090768013
+:10195000F0303F09907697E054FEF080079076973C
+:10196000E04401F0907697E054FBF0908002F0D2D2
+:101970002E22907695E04401F04402F04408F030C5
+:101980003E06E04404F08007907695E054FBF0902A
+:10199000761AE0B40108907695E0908001F0907698
+:1019A00019E0FFB40125907FFC74CCF0907FFF74A8
+:1019B000FCF090768F742BF0907697E054FDF05405
+:1019C000FBF0E4907681F0907680F0EFB402259001
+:1019D0007FFC74C8F0907FFF74FCF090768F742FBA
+:1019E000F0907697E04402F054FBF0E4907681F0BA
+:1019F000907680F0EFB40325907FFC7498F0907F90
+:101A0000FF74FCF090768F745FF0907697E054FD51
+:101A1000F04404F0E4907681F0907680F0303F0955
+:101A2000907697E054FEF08007907697E04401F0BE
+:101A3000907697E0908002F0D22E22907695E05436
+:101A4000FEF04402F04408F0303E06E04404F0802A
+:101A500007907695E054FBF090761AE0B401089078
+:101A60007695E0908001F0907619E0FFB401259022
+:101A70007FFC74B4F0907FFF74FCF090768F742B31
+:101A8000F0907697E054FDF054FBF0E4907681F00E
+:101A9000907680F0EFB40225907FFC74B0F0907FD8
+:101AA000FF74FCF090768F742FF0907697E04402EC
+:101AB000F054FBF0E4907681F0907680F0EFB40380
+:101AC00025907FFC7468F0907FFF74FCF090768F17
+:101AD000745FF0907697E054FDF04404F0E4907663
+:101AE00081F0907680F0303F09907697E054FEF0D8
+:101AF0008007907697E04401F0907697E09080021E
+:041B0000F0D22E22CF
+:040CA1004176230075
+:102DA900E4907636F0E0FF75F003A4240EF582E492
+:102DB9003475F5837401F0EF75F003A4240FF582DF
+:102DC900E43475F5837401F0EF75F003A42410F56C
+:102DD90082E43475F583E4F0907636E004F0E0FFA0
+:102DE90075F003A4240EF582E43475F5837410F0AC
+:102DF900EF75F003A4240FF582E43475F5837405A7
+:102E0900F0EF75F003A42410F582E43475F583E43A
+:102E1900F0907636E004F0E0FF75F003A4240EF597
+:102E290082E43475F5837402F0EF75F003A4240F7E
+:102E3900F582E43475F5837402F0EF75F003A42488
+:102E490010F582E43475F583E4F0907636E004F009
+:102E5900E0FF75F003A4240EF582E43475F583745C
+:102E690001F0EF75F003A4240FF582E43475F583BE
+:102E79007403F0EF75F003A42410F582E43475F5BA
+:102E890083E4F0907636E004F0E0FF75F003A424C3
+:102E99000EF582E43475F5837410F0EF75F003A430
+:102EA900240FF582E43475F5837406F0EF75F003A9
+:102EB900A42410F582E43475F583E4F0907636E0C5
+:102EC90004F0E0FF75F003A4240EF582E43475F5EF
+:102ED900837402F0EF75F003A4240FF582E43475CE
+:102EE900F5837404F0EF75F003A42410F582E4343B
+:102EF90075F583E4F0907636E004F0E0FF75F003B1
+:102F0900A4240EF582E43475F5837402F0EF75F0AC
+:102F190003A4240FF582E43475F5837408F0EF7582
+:102F2900F003A42410F582E43475F5837404F09059
+:102F39007636E004F0E0FF75F003A4240EF582E490
+:102F49003475F5837402F0EF75F003A4240FF5824C
+:102F5900E43475F583740AF0EF75F003A42410F5D1
+:102F690082E43475F5837404F0907636E004F0E079
+:102F7900FF75F003A4240EF582E43475F583740219
+:102F8900F0EF75F003A4240FF582E43475F583742A
+:102F990009F0EF75F003A42410F582E43475F58384
+:102FA9007404F0907636E004F0E0FF75F003A42491
+:102FB9000EF582E43475F5837402F0EF75F003A41D
+:102FC900240FF582E43475F5837407F0EF75F00387
+:0E2FD900A42410F582E43475F5837404F0220C
+:103BD300E4907636F0E0FB75F00FA42441F582E41F
+:103BE3003475F5837440F0EB75F00FA42442F5822D
+:103BF300E43475F583740AF0EB75F00FA42443F5F0
+:103C030082E43475F5831237C80000AC44EB75F0D9
+:103C13000FA42447F582E43475F5831237C80000F6
+:103C2300AC44EB75F00FA4244BF582E43475F583B3
+:103C33001237C800017700907636E004F0E0FB7598
+:103C4300F00FA42441F582E43475F5837440F0EB5E
+:103C530075F00FA42442F582E43475F583748CF077
+:103C6300EB75F00FA42443F582E43475F583123722
+:103C7300C80000AC44EB75F00FA42447F582E4348C
+:103C830075F5831237C80000AC44EB75F00FA4241C
+:103C93004BF582E43475F5831237C8000177009041
+:103CA3007636E004F0E0FF75F00FA42441F582E4DA
+:103CB3003475F5837440F0EF75F00FA42442F58258
+:103CC300E43475F583748FF0907636E004F0E0FF0A
+:103CD30075F00FA42441F582E43475F5837441F043
+:103CE300EF75F00FA42442F582E43475F5837484F0
+:103CF300F0907636E004F0E0FF75F00FA42441F570
+:103D030082E43475F5837461F0EF75F00FA42442F7
+:103D1300F582E43475F5837481F0907636E004F02F
+:103D2300E0FF75F00FA42441F582E43475F5837444
+:103D330061F0EF75F00FA42442F582E43475F58346
+:043D43007401F022F5
+:10461900E4907636F0E0FF75F003A42432F582E4E5
+:104629003475F583E4F0EF75F003A42433F582E4DF
+:104639003475F5837401F0907636E004F0E0FF7587
+:10464900F003A42432F582E43475F583E4F0EF75C0
+:10465900F003A42433F582E43475F5837402F090F1
+:104669007636E004F0E0FF75F003A42432F582E425
+:104679003475F583E4F0EF75F003A42433F582E48F
+:104689003475F5837403F0907636E004F0E0FF7535
+:10469900F003A42432F582E43475F583E4F0EF7570
+:1046A900F003A42433F582E43475F5837404F0220D
+:103A4200E4907635F0907635E0FFC394034002416E
+:103A5200FFEF75F00AA424AAF582E43475F583EF2A
+:103A6200F0EF75F00AA424ABF582E43475F583E433
+:103A7200F0EF75F00AA424ACF582E43475F5837492
+:103A8200F0F0EF75F00AA424ADF582E43475F58305
+:103A920074FFF0EF75F00AA424AEF582E43475F5F4
+:103AA20083E4F0EF75F00AA424AFF582E43475F5EF
+:103AB200837480F0EF75F00AA424B0F582E43475C3
+:103AC200F583E4F0EF75F00AA424B1F582E43475CD
+:103AD200F583E4F0EF75F00AA424B2F582E43475BC
+:103AE200F583E4F0EF75F00AA424B3F582E43475AB
+:103AF200F5837401F0907635E004F0414790763C0E
+:103B0200740AF0E4A3F09076357403F090763CE00A
+:103B1200FF907635E0FEC39F400261D290763DE091
+:103B2200FF04F0EE75F00AA424AAF582E43475F5D8
+:103B320083EFF0EE75F00AA424ABF582E43475F558
+:103B420083E4F0EE75F00AA424ACF582E43475F552
+:103B520083745EF0EE75F00AA424ADF582E4347548
+:103B6200F58374BAF0EE75F00AA424AEF582E4345B
+:103B720075F5837405F0EE75F00AA424AFF582E4BE
+:103B82003475F5837480F0EE75F00AA424B0F582E2
+:103B9200E43475F583E4F0EE75F00AA424B1F582FD
+:103BA200E43475F583E4F0EE75F00AA424B2F582EC
+:103BB200E43475F5837415F0EE75F00AA424B3F5B8
+:103BC20082E43475F583E4F0907635E004F0610E1A
+:013BD20022D0
+:10080000E4907631F0907631E0FF75F003A4240F88
+:10081000F582E43475F583E0FE907FEDE0FDEE6D4A
+:10082000600EEFC3940B5008907631E004F080D551
+:10083000EFB40B08907FB4E04401F022EF75F003B1
+:10084000A4240EF582E43475F583E0907633F02429
+:10085000F0600A240E60028187124BC722907FED60
+:10086000E0640570519076187405F0907637740145
+:10087000F09076397403F0907621F0E4907620F0D1
+:10088000907FEAE0F4602F907620E0FF75F00AA4F4
+:1008900024AAF582E43475F583E0FE907FEAE0FD5A
+:1008A000EE6D6012907621E0FEEFC39E50089076C8
+:1008B00020E004F080D1907FEDE0640670529076E5
+:1008C000187406F09076377404F0907639740AF054
+:1008D000907621F09076207403F0907FEAE0F46047
+:1008E0002F907620E0FF75F00AA424AAF582E43464
+:1008F00075F583E0FE907FEAE0FDEE6D6012907684
+:1009000021E0FEEFC39E5008907620E004F080D1F5
+:10091000907620E0FF75F00AA424AAF582E43475ED
+:10092000F583E0907229F0E490763BF0907621E038
+:10093000FEEF6E7008907FB4E04401F022907FEBF0
+:10094000E014601314700221E224026002817F909F
+:100950007FB4E04401F022907FE9E014707C907F46
+:10096000EAE0F47048907637E0907620F09076399F
+:10097000E0FE907620E0FDC39E502B90763BE0FE9B
+:1009800004F074C02EF582E4347EF583E0FEED754C
+:10099000F00AA424ABF582E43475F583EEF090768A
+:1009A00020E004F080C790763F7401F022907EC072
+:1009B000E0FEEF75F00AA424ABF582E43475F5830C
+:1009C000EEF0E0B4010890763E7401F08005E4900A
+:1009D000763EF090763F7401F022907FB4E04401BF
+:1009E000F022907FE9E024FE700241A314700261BE
+:1009F0003F14700261DB240360028177907FEAE09C
+:100A0000F4706B907637E0907620F0907639E0FFC6
+:100A1000907620E0FEC39F504E90763BE0FF04F0BE
+:100A200074C02FF582E4347EF583E0FFEE75F00AA2
+:100A3000A424ACF582E43475F583EFF090763BE0C6
+:100A4000FF04F074C02FF582E4347EF583E0FFEEFE
+:100A500075F00AA424ADF582E43475F583EFF090C7
+:100A60007620E004F080A49076407401F022907E1D
+:100A7000C0E0FF907620E0FE75F00AA424ACF58279
+:100A8000E43475F583EFF0907EC1E0FFEE75F00A77
+:100A9000A424ADF582E43475F583EFF090764174CB
+:100AA00001F022907FEAE0F47066907637E090766D
+:100AB00020F0907639E0FF907620E0FEC39F400260
+:100AC000818E90763BE0FF04F074C02FF582E43411
+:100AD0007EF583E0FFEE75F00AA424AEF582E434DF
+:100AE00075F583EFF090763BE0FF04F074C02FF5CE
+:100AF00082E4347EF583E0FFEE75F00AA424AFF5BE
+:100B000082E43475F583EFF0907620E004F080A263
+:100B1000907EC0E0FF907620E0FE75F00AA424AE3F
+:100B2000F582E43475F583EFF0907EC1E0FFEE7559
+:100B3000F00AA424AFF582E43475F583EFF0229037
+:100B40007FEAE0F47066907637E0907620F0907659
+:100B500039E0FF907620E0FEC39F4002818E9076C0
+:100B60003BE0FF04F074C02FF582E4347EF583E0AF
+:100B7000FFEE75F00AA424B0F582E43475F583EF36
+:100B8000F090763BE0FF04F074C02FF582E4347EF1
+:100B9000F583E0FFEE75F00AA424B1F582E4347524
+:100BA000F583EFF0907620E004F080A2907EC0E024
+:100BB000FF907620E0FE75F00AA424B0F582E434BC
+:100BC00075F583EFF0907EC1E0FFEE75F00AA42486
+:100BD000B1F582E43475F583EFF022907FEAE0F41A
+:100BE0007066907637E0907620F0907639E0FF904E
+:100BF0007620E0FEC39F4002818E90763BE0FF04AA
+:100C0000F074C02FF582E4347EF583E0FFEE75F0DA
+:100C10000AA424B2F582E43475F583EFF090763BB4
+:100C2000E0FF04F074C02FF582E4347EF583E0FF2A
+:100C3000EE75F00AA424B3F582E43475F583EFF081
+:100C4000907620E004F080A2907EC0E0FF907620B5
+:100C5000E0FE75F00AA424B2F582E43475F583EF62
+:100C6000F0907EC1E0FFEE75F00AA424B3F582E4B3
+:100C70003475F583EFF022907FB4E04401F02290C8
+:0F0C80007FB4E04401F022907FB4E04401F02201
+:10100000E490762CF090762CE0FF75F003A4240F8A
+:10101000F582E43475F583E0FE907FEDE0FDEE6D42
+:10102000600EEFC3940B500890762CE004F080D54E
+:10103000EFB40B08907FB4E04401F022EF75F003A9
+:10104000A4240EF582E43475F583E090762EF02426
+:10105000F0600A240F6002817D124BA422907FED84
+:10106000E0640570519076187405F090763874013C
+:10107000F090763A7403F090761CF0E490761BF0D2
+:10108000907FEAE0F4602F90761BE0FF75F00AA4F1
+:1010900024AAF582E43475F583E0FE907FEAE0FD52
+:1010A000EE6D601290761CE0FEEFC39E50089076C5
+:1010B0001BE004F080D1907FEDE0640670529076E2
+:1010C000187406F09076387404F090763A740AF04A
+:1010D00090761CF090761B7403F0907FEAE0F46049
+:1010E0002F90761BE0FF75F00AA424AAF582E43461
+:1010F00075F583E0FE907FEAE0FDEE6D601290767C
+:101100001CE0FEEFC39E500890761BE004F080D1F7
+:10111000E490761EF090761CE0FF90761BE0FE6F68
+:101120007008907FB4E04401F022907FEBE01460FF
+:101130001314700221BF240260028175907FB4E015
+:101140004401F022907FE9E0247F706B907FEAE019
+:10115000F4704A907638E090761BF090763AE0FF93
+:1011600090761BE0FDC39F502BED75F00AA424ABD5
+:10117000F582E43475F583E0FF90761EE0FD04F01F
+:1011800074002DF582E4347FF583EFF090761BE058
+:1011900004F080C790761EE0907FB5F022EE75F0E7
+:1011A0000AA424ABF582E43475F583E0907F00F067
+:1011B000907FB57401F022907FB4E04401F022905A
+:1011C0007FE9E0247E7002417E1470026123147076
+:1011D0000261C824036002816D907FEAE0F4706DC3
+:1011E000907638E090761BF090763AE0FF90761B90
+:1011F000E0C39F504FE0FF75F00AA424ACF582E4F1
+:101200003475F583E0FE90761EE0FD04F074002D49
+:10121000F582E4347FF583EEF0EF75F00AA424AD97
+:10122000F582E43475F583E0FF90761EE0FE04F06D
+:1012300074002EF582E4347FF583EFF090761BE0A6
+:1012400004F080A490761EE0907FB5F02290761B8B
+:10125000E0FF75F00AA424ACF582E43475F583E070
+:10126000907F00F0EF75F00AA424ADF582E43475A8
+:10127000F583E0907F01F0907FB57402F022907FBB
+:10128000EAE0F4706D907638E090761BF090763A54
+:10129000E0FF90761BE0C39F504FE0FF75F00AA47B
+:1012A00024AEF582E43475F583E0FE90761EE0FD11
+:1012B00004F074002DF582E4347FF583EEF0EF75D1
+:1012C000F00AA424AFF582E43475F583E0FF90764C
+:1012D0001EE0FE04F074002EF582E4347FF583EF07
+:1012E000F090761BE004F080A490761EE0907FB52D
+:1012F000F02290761BE0FF75F00AA424AEF582E49C
+:101300003475F583E0907F00F0EF75F00AA424AF08
+:10131000F582E43475F583E0907F01F0907FB57439
+:1013200002F022907FEAE0F4706D907638E09076DB
+:101330001BF090763AE0FF90761BE0C39F504FE0A1
+:10134000FF75F00AA424B0F582E43475F583E0FE5D
+:1013500090761EE0FD04F074002DF582E4347FF5F4
+:1013600083EEF0EF75F00AA424B1F582E43475F54C
+:1013700083E0FF90761EE0FE04F074002EF582E418
+:10138000347FF583EFF090761BE004F080A4907634
+:101390001EE0907FB5F02290761BE0FF75F00AA466
+:1013A00024B0F582E43475F583E0907F00F0EF75AA
+:1013B000F00AA424B1F582E43475F583E0907F014E
+:1013C000F0907FB57402F022907FEAE0F4706D90A7
+:1013D0007638E090761BF090763AE0FF90761BE04E
+:1013E000C39F504FE0FF75F00AA424B2F582E434A5
+:1013F00075F583E0FE90761EE0FD04F074002DF597
+:1014000082E4347FF583EEF0EF75F00AA424B3F59F
+:1014100082E43475F583E0FF90761EE0FE04F074FC
+:10142000002EF582E4347FF583EFF090761BE00424
+:10143000F080A490761EE0907FB5F02290761BE0BD
+:10144000FF75F00AA424B2F582E43475F583E090C8
+:101450007F00F0EF75F00AA424B3F582E43475F54B
+:1014600083E0907F01F0907FB57402F022907FB40A
+:10147000E04401F022907FB4E04401F022907FB478
+:05148000E04401F02230
+:10387400E4907629F0907629E0FF75F00FA42442B5
+:10388400F582E43475F583E0FE907FECE0FDEE6DA7
+:10389400600EEFC394065008907629E004F080D5BA
+:1038A400EFB40608907FB4E04401F022EF75F00F06
+:1038B400A42441F582E43475F583E090762AF0245B
+:1038C400BF7002414124E070024112242160024190
+:1038D4003A907FE9E024FE607D14700221B2240254
+:1038E4006002410A121751907642E0FCA3E0FDA366
+:1038F400E0FEA3E0FF907629E075F00FA42443F5E1
+:1039040082E43475F5831237BC907619E0FFB40174
+:103914001290767C7467F090767D7406F090767ED3
+:10392400740BF0EFB4020FE490767CF090767DF0A7
+:1039340090767E740CF0EFB4030FE490767CF090F4
+:10394400767DF090767E7418F090761A7401F012F9
+:103954003E9F12180022907EC2E0FFE4FCFDFEFBB5
+:10396400FA7901F8123746C8ECC8C9EDC9CAEECADB
+:10397400CBEFCB907EC1E0FEE4FCFD2BFBEA3EFAEC
+:10398400ED39F9EC38F8907EC0E0FFE4FEEB2FFF50
+:10399400EE3AFEED39FDEC38FC907629E075F00F37
+:1039A400A42447F582E43475F5831237BC22907E53
+:1039B400C2E0FFE4FCFDFEFBFA7901F8123746C8C9
+:1039C400ECC8C9EDC9CAEECACBEFCB907EC1E0FE0C
+:1039D400E4FCFD2BFBEA3EFAED39F9EC38F8907E75
+:1039E400C0E0FFE4FEEB2FFFEE3AFEED39FDEC38CC
+:1039F400FC907629E075F00FA4244BF582E434752D
+:103A0400F5831237BC22907FB4E04401F022907F0A
+:103A1400E9E0147019907EC0E0FF907629E075F01B
+:103A24000FA4244FF582E43475F583EFF022907FE0
+:0E3A3400B4E04401F022907FB4E04401F0229F
+:102AD600E4907627F0907627E0FF75F00FA4244265
+:102AE600F582E43475F583E0FE907FECE0FDEE6D53
+:102AF600600EEFC394065008907627E004F080D568
+:102B0600EFB40608907FB4E04401F022EF75F00FB1
+:102B1600A42441F582E43475F583E0907628F02408
+:102B26009F7002A17424216002A1A1907FE9E02494
+:102B36007E700261FC14700281B524026002A16CF1
+:102B4600EF75F00FA42443F582E43475F583E0FCB9
+:102B5600A3E0FDA3E0FEA3E0FF7B447AAC79007816
+:102B660000C31237AB7013907F007444F0A374ACAB
+:102B7600F0E4A3F0907FB57403F0907627E075F04B
+:102B86000FA42443F582E43475F583E0FCA3E0FD4D
+:102B9600A3E0FEA3E0FF7B807ABB79007800C31236
+:102BA60037AB7013907F007480F0A374BBF0E4A37E
+:102BB600F0907FB57403F0907627E075F00FA424AB
+:102BC60043F582E43475F583E0FCA3E0FDA3E0FE63
+:102BD600A3E0FF7B007A7779017800C31237AB60F8
+:102BE60002A1A8907F00F0A37477F0A37401F0907F
+:102BF6007FB57403F022907627E075F00FA4244782
+:102C0600F582E43475F583E0FCA3E0FDA3E0FEA3C2
+:102C1600E0FF7B447AAC79007800C31237AB7013BF
+:102C2600907F007444F0A374ACF0E4A3F0907FB5F9
+:102C36007403F0907627E075F00FA42447F582E43C
+:102C46003475F583E0FCA3E0FDA3E0FEA3E0FF7B83
+:102C5600807ABB79007800C31237AB7013907F007F
+:102C66007480F0A374BBF0E4A3F0907FB57403F016
+:102C7600907627E075F00FA42447F582E43475F5C5
+:102C860083E0FCA3E0FDA3E0FEA3E0FF7B007A77F0
+:102C960079017800C31237AB6002A1A8907F00F0DB
+:102CA600A37477F0A37401F0907FB57403F02290BB
+:102CB6007627E075F00FA4244BF582E43475F5838E
+:102CC600E0FCA3E0FDA3E0FEA3E0FF7B447AAC7941
+:102CD600007800C31237AB7013907F007444F0A3E2
+:102CE60074ACF0E4A3F0907FB57403F0907627E01F
+:102CF60075F00FA4244BF582E43475F583E0FCA34C
+:102D0600E0FDA3E0FEA3E0FF7B807ABB79007800BC
+:102D1600C31237AB7013907F007480F0A374BBF0BE
+:102D2600E4A3F0907FB57403F0907627E075F00F7A
+:102D3600A4244BF582E43475F583E0FCA3E0FDA3FF
+:102D4600E0FEA3E0FF7B007A7779017800C31237B3
+:102D5600AB704F907F00F0A37477F0A37401F090EE
+:102D66007FB57403F022907FB4E04401F022907F97
+:102D7600E9E0247F701E907627E075F00FA4244FBB
+:102D8600F582E43475F583E0907F00F0907FB574AA
+:102D960001F08007907FB4E04401F0907FB4E044F6
+:032DA60001F02217
+:104BA400907FEBE0147014907FE9E0247F7004128E
+:104BB400495822907FB4E04401F022907FB4E0444D
+:034BC40001F022DB
+:104BC700907FEBE0147013907FE9E0147004124AB1
+:104BD7000322907FB4E04401F022907FB4E04401C7
+:024BE700F022BA
+:10495800E4907626F0907626E0FF75F003A42434E0
+:10496800F582E43475F583E0FE907FECE0FDEE6DB2
+:10497800600EEFC394045008907626E004F080D5CA
+:10498800EFB40408907FB4E04401F022EF75F0031F
+:10499800A42432F582E43475F583E0907F00F0902A
+:0649A8007FB57401F0224E
+:104A0300E4907625F0907625E0FF75F003A4243436
+:104A1300F582E43475F583E0FE907FECE0FDEE6D06
+:104A2300600EEFC394045008907625E004F080D51F
+:104A3300EFB40408907FB4E04401F022907EC0E01C
+:104A4300FEEF75F003A42432F582E43475F583EEAA
+:024A5300F0224F
+:03000300020FFDEC
+:030FFD00C2893274
+:030013000217FDD4
+:0317FD00C28B326A
+:03004B00024E035F
+:044E03005391DF32B6
+:030053000248FA66
+:0648FA005391BFD22D32E4
+:03005B00024DFD56
+:064DFD0053917FD22C321D
+:03006300024E0743
+:044E070053D8F73253
+:03000B00024E0F93
+:034E0F00C28D321F
+:03001B00024E1280
+:034E1200C28F321A
+:03002300024DEF9C
+:074DEF005398FE5398FD32BA
+:03003B00024DF67D
+:074DF60053C0FE53C0FD3263
+:03002B0002480088
+:10480000C0E0C0F0C083C082C0D0E8C0E0E9C0E032
+:10481000EAC0E0EBC0E0ECC0E0EDC0E0EEC0E0EFED
+:10482000C0E0C2CAC2CF907F98E04401F0302E03AE
+:104830001214A6907F98E054FEF053A8FA12166165
+:10484000D0E0FFD0E0FED0E0FDD0E0FCD0E0FBD037
+:10485000E0FAD0E0F9D0E0F8D0D0D082D083D0F028
+:03486000D0E03273
+:104AA600E490769BF090769BE0FF04F0EF6008E0E0
+:104AB6002408F8E4F680EE907696E04404F0440884
+:104AC600F0908003F0E4F518D235F50EF510D236E5
+:104AD600751211751322C237C239C238F516F5148C
+:0B4AE600F51AF50DC23BC23CC23D2298
+:10300000907FB6E020E102C23DD236203602416E0A
+:10301000303D02416E908007E06004D2368002C2EB
+:1030200036203602412ED235E4F51A908004E0F5C0
+:10303000197408250EF8A619851918E51820E70453
+:10304000D2388002C23830380221D4E4F516E519AE
+:10305000B4F00CD2397508047509F0050E8002052C
+:1030600016E51964F7703DC239E50E24FE601714A9
+:103070006022240370297508057509F7E4F50AF53F
+:103080000B750E048020750806750AF7E4F50B75BC
+:103090000E048012750807750BF7750E0480071271
+:1030A0004DDA80020516E51954F864F8703BC23514
+:1030B000E5192407600C24FC6008240524F8500658
+:1030C0008008D23A8006C23A8002D23A751A0120AC
+:1030D0003A19907E80740FF0A3E519F0E4A3F0A3F1
+:1030E000F0907FB77404F08002051620396DE51961
+:1030F00064F76067E51A7063E51854F064F070597E
+:10310000851819F50EE519240F601B24FE6017249D
+:10311000FD602214601F2405702F750803050E85BD
+:103120001809D2378028750802050E85180975140C
+:1031300001D2378019750805050E851809E4F50ACE
+:10314000F50B750E03D2378005124DDAC2353035D6
+:103150000A85081385181280020516851819E516C8
+:1031600064047062F50EE51954F0F519F51585182B
+:1031700019E5152470601824F0601424F060102400
+:10318000F0601E24F0601A24F0600424607027E5CB
+:1031900015C4540FF519F508050E851809D23780A6
+:1031A0001AE515C4540FF519F508050E85180975AB
+:1031B0001401D2378005124DDAC23530350A85192F
+:1031C0001385181280020516E516D3940540571290
+:1031D0004DDA8052303917E50E700A8508097508F6
+:1031E00004050E80417408250EF8A6198038203792
+:1031F0002AE50EB4010F85080A85090B8513088599
+:103200001209750E04E514B4011C85080AE4F50BD7
+:10321000851308851209750E04800BE514B40106A8
+:10322000E4F50B750E04E4F51A303502050EE50ED3
+:10323000D394035002010BC237E4F50EF510C236E9
+:10324000D23DF51474082510F8E6FF74802510F5BA
+:1032500082E4347EF583EFF074082510F8E4F60577
+:0F32600010E510B404DE907FB77404F0010B2268
+:0C4DDA00C237E4F50EF510C236F51422C5
+:10400000E511D3940050022106907689E0C394080C
+:10401000400221067440250FF582E4347EF583E0EA
+:10402000F517E50D600E908005E517F0907689E0B4
+:1040300004F001DAE5171237F940C1024067054084
+:104040007A0640980740C10C40C10D40C70F40CBD5
+:10405000F640CBF840CBFA40CBFB40CBFC40CBFE4C
+:1040600040CBFF000040DA907E41E0908005F09068
+:104070007689E004F07511018060907E41E09080C7
+:1040800005F0907E42E0908005F0907689E004F0A3
+:10409000E004F07511018042907E41E0908005F0CF
+:1040A000907E42E0908005F0907E43E0908005F0A5
+:1040B000907689E004F0E004F0E004F075110180EE
+:1040C00019D23BD23C8013D23B800F908005E5177C
+:1040D000F0907689E004F0751101203B04050D8015
+:1040E0001F303C1C907E41E0908005F0907E42E0C5
+:1040F000908005F0907689E004F0E004F0751101FD
+:10410000050F15110100E5117010C233F50DF50F03
+:0B411000907FC77404F0C23BC23C2249
+:104C2900907FD6E030E712E04401F07F147E001255
+:0A4C39004D9D907FD6E054FEF0225E
+:104B7F00907FD6E054FBF0E04408F0304204E0446C
+:104B8F0002F07FDC7E05124D9D907FD6E054F7F04A
+:054B9F00E04404F022D7
+:104D9D008E358F36E5361536AE35700215354E60CB
+:074DAD000512148580EE22BF
+:104A5500E4FE751DFF751E05751F12AB1DAA1EA967
+:104A65001F9000011236AB6402702FCDEECD0EED16
+:104A75006F70012290000212370E85F01BF51C6243
+:104A85001BE51B621CE51C621B29FDE51B3AC9EDF4
+:104A9500C9751DFFF51E891F80C17B007A0079004D
+:014AA50022EE
+:041794008D298B2AE6
+:10179800124A55EA4960571236927E0029FFEE3AFE
+:1017A800C9EFC9752BFFF52C892DAB2BAA2CA92DB8
+:1017B8009000011236ABFF64046005EF6405702EDB
+:1017C800EFB404159000021236AB6529700B900037
+:1017D800031236AB652A7001221236927E0029FF69
+:1017E800EE3AC9EFC9752BFFF52C892D80BC7B001B
+:0417F8007A007900FA
+:0117FC0022CA
+:0247B7008F2E43
+:1047B900E4F52F7530FF75310775321AAB30AA3120
+:1047C900A9329000011236ABB4031FAF2F052FEFAA
+:1047D900652E7001221236927E0029FFEE3AC9EF4A
+:1047E900C97530FFF531893280D27B007A007900B2
+:0147F900229D
+:1005000012011001000000406A08110100010102FF
+:100510000001090208020501008032090400000000
+:10052000010100000A2401000156000201020C240E
+:10053000020101010002000000000D240605010275
+:10054000030000000000000924030204030005006A
+:100550000C24020305020006000000001524060614
+:100560000302000003000300030003000300030074
+:100570000009240304010100060009040100000130
+:100580000200000904010102010200000724010128
+:10059000000100112402010202100344AC0080BBE0
+:1005A0000000770109050A05840101008F07250174
+:1005B0000100000009058F01030001050009040185
+:1005C00002020102000007240101000100112402BF
+:1005D000010203180344AC0080BB00007701090549
+:1005E0000A05460201008F072501010000000905E8
+:1005F0008F01030001050009040200000102000050
+:1006000009040201010102000007240104000100A5
+:100610000E2402010602100244AC0080BB00090552
+:100620008C054C02010000072501000200000904AE
+:1006300002020101020000072401040001000E244F
+:1006400002010603180244AC0080BB0009058C05BA
+:1006500072030100000725010002000009040203E3
+:10066000010102000007240104000100112402011D
+:100670000202100344AC0080BB0000770109058C26
+:1006800005840101000007250100020000090402A1
+:1006900004010102000007240104000100112402EA
+:1006A000010203180344AC0080BB00007701090578
+:1006B0008C05460201000007250100020000090424
+:1006C00003000001010000092401000109000104E8
+:1006D00009040400020103000007240100012400B2
+:1006E000062402010700092403020801070100068D
+:1006F0002402020900092403010A01090100090575
+:10070000010204000000000525010107090581021E
+:100710000400000000052501010A04030904180370
+:1007200045006D006100670069006300200047001C
+:100730006D0062004800220345006D006100670003
+:1007400069006300200045004D004900200036008C
+:100750007C00320020006D002A0343006F006E0011
+:10076000660069006700750072006100740069002E
+:100770006F006E00200053007400720069006E006C
+:100780006700220349006E00740065007200660075
+:10079000610063006500200053007400720069006E
+:0607A0006E00670000007E
+:101485007400F58690FDA57C05A3E582458370F97A
+:011495002234
+:10149600907FD6E04480F0438701000000000022E0
+:1014A600C0D0C0E08FE0C0E08EE0C0E08DE0C0E0DC
+:1014B6008CE0C0E0C082C0830586C084C0857D0004
+:1014C600907FE3747BF0A37480F07C11907F99E0A9
+:1014D6005440DC030214F3B40013907FE27440F02E
+:1014E600907FE5F0907FE27400F00214D29076903F
+:1014F600E0B4011290768FE02DFD907FE27480F0CB
+:10150600907F6C021557B4021290768FE02DFD90F5
+:101516007FE27480F0907F6C021596B40312907689
+:101526008FE02DFD907FE27480F0907F6C0215E1D4
+:10153600B4041290768FE02DFD907FE27480F090D7
+:101546007F6C021610907FE27480F0907F6C02161A
+:1015560040F0F0F0F0F0F0F0F0F0F0F0F0DDF27DB9
+:10156600020586907FE27400F0907F9BE05404B4FD
+:1015760000050586021640907FE27480F00586F02D
+:10158600F0F0F0F0F0F0F0F0F0F0F0DDD4021640FC
+:10159600F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F045
+:1015A600F0F0DDEC7D020586907FE27400F0907F1E
+:1015B6009BE05404B400050586021640907FE27451
+:1015C60080F00586F0F0F0F0F0F0F0F0F0F0F0F0DA
+:0615D600F0F0F0F0F0F06F
+:1015DC00DDCE021640F0F0F0F0DDFA7D02058690CB
+:1015EC007FE27400F0907F9BE05404B40005058604
+:1015FC00021640907FE27480F00586F0F0F0F0DD8A
+:10160C00DC021640F0F0F0F0F0F0DDF87D0205861B
+:10161C00907FE27400F0907F9BE05404B4000505C9
+:10162C0086021640907FE27480F00586F0F0F0F0B0
+:10163C00F0F0DDDA907FE27400F0D085D08405867E
+:10164C00D083D082D0E0FCD0E0FDD0E0FED0E0FF33
+:05165C00D0E0D0D02217
+:10166100C0D0C0E0C082C08390767CE0907F6FF0F4
+:1016710090767DE0907F6FF090767EE0907F6FF0C6
+:09168100D083D082D0E0D0D02249
+:10168A00C0D0C0E08FE0C0E08EE0C0E0C082C0837E
+:10169A000586C084C085907687E0FFBF00030217E5
+:1016AA0001907F96E04480F0907FE27480F0907F12
+:1016BA0062E00586907FE27400F0907F96E0547FA6
+:1016CA00F0907FE27480F090768EE0B40105058692
+:1016DA000216F6B4020505860216EB05860216FB0B
+:1016EA00E0E0E0E0E0E0DFF80216FBE0E0E0E0DF67
+:1016FA00FA907FE27400F0D085D0840586D083D03A
+:0C170A0082D0E0FED0E0FFD0E0D0D02282
+:10171600C082C083C0E0E8C0E078D1E814F870FB6E
+:0A172600D0E0F8D0E0D083D082229A
+:100CA500417201014572050002C9000045720A0042
+:100CB500010203044D720FD100D1000000000000B5
+:100CC500282809004D721C010001020304050607CE
+:100CD50008090A0B41722E2241722F2341723020DE
+:100CE5004172312162D2723A00000000000000001A
+:100CF50000000000000000000000000000000000EF
+:100D050000000000000000000000000000000000DE
+:100D150000000000000000000000000000000000CE
+:100D250000000000000000000000000000000000BE
+:100D350000000000000000000000000000000000AE
+:100D4500000000000000000000000000000000009E
+:100D5500000000000000000000000000000000008E
+:100D6500000000000000000000000000000000007E
+:100D75000000000000000000000001010101010168
+:100D8500010101010101010101010101010101014E
+:100D9500010101010101010101010101010101013E
+:100DA500010101010101010101010101010101012E
+:100DB5000101010101010101020202020202020216
+:100DC50002020202020202020202020202020202FE
+:100DD50002020202020202020202020202020202EE
+:100DE50002020202020202020202020202020202DE
+:100DF50002020202020303030303030303030303C3
+:100E050003030303030303030303030303030303AD
+:100E1500030303030303030303030303030303039D
+:100E2500030303030303030303030303030303038D
+:100E3500030304040404040404040404040404046F
+:100E4500040404040404040404040404040404045D
+:100E5500040404040404040404040404040404044D
+:100E6500040404040404040404040404040404043D
+:100E7500050505050505050505050505050505051D
+:100E8500050505050505050505050505050505050D
+:100E950005050505050505050505050505050505FD
+:100EA50005050505050505050505050505050606EB
+:100EB50006060606060606060606060606060606CD
+:100EC50006060606060606060606060606060606BD
+:100ED50006060606060606060606060606060606AD
+:100EE5000606060606060606060606070707080896
+:100EF500080909090A0A0A0B0B0B0C0C0C0D0D0D40
+:100F05000E0E0E0F0F0F10101011111112121213D9
+:100F15001313141414151515161616171717181874
+:100F250018191919191A1A1A1A1B1B1B1B1C1C1C18
+:100F35001C1D1D1D1D1E1E1E1E1F1F1F1F202020C8
+:100F45002121212222222323242425252626272761
+:100F5500282829292A2A2B2B2C2C2D2D2E2E2F2FD4
+:100F65003030313132323333343435353636373744
+:100F7500383839393A3A3B3C3D3E3F40414243449B
+:100F85004546474849494A4B4B4C4D4E4F505152A7
+:100F95005354555556565757585A5B5D5E5F6162B7
+:100FA500636465666768696A6B6C6D6F717273748B
+:100FB50075767778797A7B7C7E80013701013800F8
+:104B2800E4907236F0A3F0907F97E054FBF0E490A5
+:104B38007233F0907232F090720104F0E4907233A4
+:104B4800F0907232F090720104F0907F97E0440484
+:024B5800F02249
+:10326F00907618E0FF640570429075ABE0B40119D9
+:10327F009072377401F0E4908020F0908031F090DC
+:10328F008028F0908039F08022E4907237F09075AA
+:10329F00ADE090722BF0E02480F0E0908020F09071
+:1032AF008031F0908028F0908039F0EF6406600252
+:1032BF0081999072397404F0907239E0FF24FE9076
+:1032CF007204F0EF75F00AA424ABF582E43475F5BF
+:1032DF0083E06401705490723604F0907204E0FF42
+:1032EF0024FD602824FE6024240324FB5004601C6A
+:1032FF00818C74202FF582E43480F583E4F07428F8
+:10330F002FF582E43480F583E4F0818C907204E031
+:10331F00FF2430F582E43480F583E4F074382FF520
+:10332F0082E43480F583E4F0818CE4907236F0907F
+:10333F007239E075F00AA424ADF582E43475F58393
+:10334F00E0FF7E0090750CEEF0A3EFF07006907228
+:10335F0002743BF090750CE0FEA3E0FF64804E70AA
+:10336F0004907202F0EF4E70028135EF64804E7060
+:10337F00028135EFF8E490750DF0E890750CF09040
+:10338F007234E075F00AA424ACF582E43475F58349
+:10339F00E0FF907202F090750DE02FF090750CE049
+:1033AF003400F0E0FEA3E0FFE4FCFD7BD67AA5F944
+:1033BF00F8D3123795400A90750C74A5F0A374D604
+:1033CF00F090750DE0242AF090750CE0345AF0E07F
+:1033DF00FEA3E07805CEA2E713CE13D8F8FF9075C1
+:1033EF000CEEF0A3EFF090722CEEF0A3EFF0D3946D
+:1033FF00D2EE64809482400A90722C7402F0A3740F
+:10340F00D2F0C390722CE0648094805004E4F0A357
+:10341F00F090722CE0FEA3E0243AF582EE3472F5C0
+:10342F0083E0907202F0907204E0FF24FD602D247F
+:10343F00FE6029240324FB50046021804090720217
+:10344F00E0FE74202FF582E43480F583EEF07428CB
+:10345F002FF582E43480F583EEF08021907202E044
+:10346F00FF907204E0FE2430F582E43480F583EFA0
+:10347F00F074382EF582E43480F583EFF0907239D2
+:0B348F00E004F0E0640A600241C72284
+:10349A00907618E0FFB40523907237E0701D90759E
+:1034AA00ADE090722BF0E02480F0E0908020F09064
+:1034BA008031F0908028F0908039F0EF6406600245
+:1034CA00C191907236E06002C191907640E070310D
+:1034DA009072037403F0907203E0FF75F00AA4245B
+:1034EA00AAF582E43475F583E0FE907229E0FDEED8
+:1034FA006D600EEFC3940A5008907203E004F080E6
+:10350A00D59072397404F0907640E0700890720396
+:10351A00E0907239F0907239E0FD24FE90722AF040
+:10352A00ED75F00AA424ADF582E43475F583E0FF65
+:10353A007E0090750CEEF0A3EFF0700690720274A4
+:10354A0080F090750CE0FEA3E0FF64804E7004905A
+:10355A007202F0EF4E7002C11BEF64804E7002C11E
+:10356A001BEFF8E490750DF0E890750CF0ED75F02E
+:10357A000AA424ACF582E43475F583E0FF90720264
+:10358A00F090750DE02FF090750CE03400F0E0FE3D
+:10359A00A3E0FFE4FCFD7BD67AA5F9F8D3123795B0
+:1035AA00400A90750C74A5F0A374D6F090750DE0DE
+:1035BA00242AF090750CE0345AF0E0FEA3E0780576
+:1035CA00CEA2E713CE13D8F8FF90750CEEF0A3EF56
+:1035DA00F090722CEEF0A3EFF0D394D2EE648094C4
+:1035EA0082400A90722C7402F0A374D2F0C39072D3
+:1035FA002CE0648094805004E4F0A3F090722CE0F4
+:10360A00FEA3E0243AF582EE3472F583E09072026A
+:10361A00F090722AE0FF24FD602D24FE6029240325
+:10362A0024FB500460218040907202E0FE74202F37
+:10363A00F582E43480F583EEF074282FF582E434C1
+:10364A0080F583EEF08021907202E0FF90722AE00A
+:10365A00FE2430F582E43480F583EFF074382EF5D9
+:10366A0082E43480F583EFF0907640E07006907241
+:10367A0039740AF0907239E004F0E0C3940A5002F7
+:08368A00A111E4907640F0224A
+:044E0B001217302228
+:1049AE009076467480F0E4A3F0A3F0A3F0A3F0A3F6
+:1049BE00F0A3F0A3F0A3F0A37480F0E4A3F0A3F0AF
+:1049CE00A3F0A3F0A3F0A3F0A37440F0E4A3F0A32C
+:1049DE007440F0E4A3F0A3F0A3F0A3F0A3F0A3F0CF
+:1049EE00A37440F0E4A3F0A37440F0E4A3F0A3F0AA
+:0549FE00A3F0A3F0226C
+:100FC600E4FF74462FF582E43476F583E0FE742060
+:100FD6002FF582E43480F583EEF0744E2FF582E42B
+:100FE6003476F583E0FE74302FF582E43480F583A1
+:060FF600EEF00FBF08CC75
+:010FFC0022D2
+:104AF100E4FF74562FF582E43476F583E0FE7428E2
+:104B01002FF582E43480F583EEF0745E2FF582E4B4
+:104B11003476F583E0FE74382FF582E43480F58332
+:064B2100EEF00FBF08CC0E
+:014B2700226B
+:10173000C082C083C0E0E8C0E07878E814F870FBAD
+:0A174000D0E0F8D0E0D083D0822280
+:030043000249006F
+:10490000022FE700023D4700024DB400024C430075
+:10491000024BE900022FFF00024C5B00024C0A0030
+:10492000024C7200024B5A00024C8900024CA0005B
+:10493000024CB700024CCE00024CE500024CFC00D9
+:10494000024D1300024D2A00024D4100024D580055
+:08495000024D6F00024D8600CC
+:101B40000000000000000000000000000000000095
+:101B50000000000000000000000000000000000085
+:101B60000000000000000000000000000000000075
+:101B70000000000000000000000000000000000065
+:101B80000000000000000000000000000000000055
+:101B90000000000000000000000000000000000045
+:101BA0000000000000000000000000000000000035
+:101BB0000000000000000000000000000000000025
+:101BC0000000000000000000000000000000000015
+:101BD0000000000000000000000000000000000005
+:101BE00000000000000000000000000000000000F5
+:101BF00000000000000000000000000000000000E5
+:101C000000000000000000000000000000000000D4
+:101C100000000000000000000000000000000000C4
+:101C200000000000000000000000000000000000B4
+:101C300000000000000000000000000000000000A4
+:101C40000000000000000000000000000000000094
+:101C50000000000000000000000000000000000084
+:101C60000000000000000000000000000000000074
+:101C70000000000000000000000000000000000064
+:101C80000000000000000000000000000000000054
+:101C90000000000000000000000000000000000044
+:101CA0000000000000000000000000000000000034
+:101CB0000000000000000000000000000000000024
+:101CC0000000000000000000000000000000000014
+:101CD0000000000000000000000000000000000004
+:101CE00000000000000000000000000000000000F4
+:101CF00000000000000000000000000000000000E4
+:101D000000000000000000000000000000000000D3
+:101D100000000000000000000000000000000000C3
+:101D200000000000000000000000000000000000B3
+:101D300000000000000000000000000000000000A3
+:101D40000000000000000000000000000000000093
+:101D50000000000000000000000000000000000083
+:101D60000000000000000000000000000000000073
+:101D70000000000000000000000000000000000063
+:101D80000000000000000000000000000000000053
+:101D90000000000000000000000000000000000043
+:101DA0000000000000000000000000000000000033
+:101DB0000000000000000000000000000000000023
+:101DC0000000000000000000000000000000000013
+:101DD0000000000000000000000000000000000003
+:101DE00000000000000000000000000000000000F3
+:101DF00000000000000000000000000000000000E3
+:101E000000000000000000000000000000000000D2
+:101E100000000000000000000000000000000000C2
+:101E200000000000000000000000000000000000B2
+:101E300000000000000000000000000000000000A2
+:101E40000000000000000000000000000000000092
+:101E50000000000000000000000000000000000082
+:101E60000000000000000000000000000000000072
+:101E70000000000000000000000000000000000062
+:101E80000000000000000000000000000000000052
+:101E90000000000000000000000000000000000042
+:101EA0000000000000000000000000000000000032
+:0E1EB000000000000000000000000000000024
+:101EBE000000000000000000000000000000000014
+:101ECE000000000000000000000000000000000004
+:101EDE0000000000000000000000000000000000F4
+:101EEE0000000000000000000000000000000000E4
+:101EFE0000000000000000000000000000000000D4
+:101F0E0000000000000000000000000000000000C3
+:101F1E0000000000000000000000000000000000B3
+:101F2E0000000000000000000000000000000000A3
+:021F3E000000A1
+:101F40000000000000000000000000000000000091
+:101F50000000000000000000000000000000000081
+:101F60000000000000000000000000000000000071
+:101F70000000000000000000000000000000000061
+:101F80000000000000000000000000000000000051
+:101F90000000000000000000000000000000000041
+:101FA0000000000000000000000000000000000031
+:101FB0000000000000000000000000000000000021
+:101FC0000000000000000000000000000000000011
+:101FD0000000000000000000000000000000000001
+:101FE00000000000000000000000000000000000F1
+:101FF00000000000000000000000000000000000E1
+:1020000000000000000000000000000000000000D0
+:1020100000000000000000000000000000000000C0
+:1020200000000000000000000000000000000000B0
+:1020300000000000000000000000000000000000A0
+:102040000000000000000000000000000000000090
+:102050000000000000000000000000000000000080
+:102060000000000000000000000000000000000070
+:102070000000000000000000000000000000000060
+:102080000000000000000000000000000000000050
+:102090000000000000000000000000000000000040
+:1020A0000000000000000000000000000000000030
+:1020B0000000000000000000000000000000000020
+:1020C0000000000000000000000000000000000010
+:1020D0000000000000000000000000000000000000
+:1020E00000000000000000000000000000000000F0
+:1020F00000000000000000000000000000000000E0
+:1021000000000000000000000000000000000000CF
+:1021100000000000000000000000000000000000BF
+:1021200000000000000000000000000000000000AF
+:10213000000000000000000000000000000000009F
+:10214000000000000000000000000000000000008F
+:10215000000000000000000000000000000000007F
+:10216000000000000000000000000000000000006F
+:10217000000000000000000000000000000000005F
+:10218000000000000000000000000000000000004F
+:10219000000000000000000000000000000000003F
+:1021A000000000000000000000000000000000002F
+:1021B000000000000000000000000000000000001F
+:1021C000000000000000000000000000000000000F
+:1021D00000000000000000000000000000000000FF
+:1021E00000000000000000000000000000000000EF
+:1021F00000000000000000000000000000000000DF
+:1022000000000000000000000000000000000000CE
+:1022100000000000000000000000000000000000BE
+:1022200000000000000000000000000000000000AE
+:10223000000000000000000000000000000000009E
+:10224000000000000000000000000000000000008E
+:10225000000000000000000000000000000000007E
+:10226000000000000000000000000000000000006E
+:10227000000000000000000000000000000000005E
+:10228000000000000000000000000000000000004E
+:10229000000000000000000000000000000000003E
+:1022A000000000000000000000000000000000002E
+:1022B000000000000000000000000000000000001E
+:1022C000000000000000000000000000000000000E
+:1022D00000000000000000000000000000000000FE
+:1022E00000000000000000000000000000000000EE
+:1022F00000000000000000000000000000000000DE
+:1023000000000000000000000000000000000000CD
+:1023100000000000000000000000000000000000BD
+:1023200000000000000000000000000000000000AD
+:10233000000000000000000000000000000000009D
+:10234000000000000000000000000000000000008D
+:10235000000000000000000000000000000000007D
+:10236000000000000000000000000000000000006D
+:0E23700000000000000000000000000000005F
+:10237E00000000000000000000000000000000004F
+:10238E00000000000000000000000000000000003F
+:10239E00000000000000000000000000000000002F
+:1023AE00000000000000000000000000000000001F
+:1023BE00000000000000000000000000000000000F
+:1023CE0000000000000000000000000000000000FF
+:1023DE0000000000000000000000000000000000EF
+:1023EE0000000000000000000000000000000000DF
+:1023FE0000000000000000000000000000000000CF
+:10240E0000000000000000000000000000000000BE
+:10241E0000000000000000000000000000000000AE
+:10242E00000000000000000000000000000000009E
+:10243E00000000000000000000000000000000008E
+:10244E00000000000000000000000000000000007E
+:10245E00000000000000000000000000000000006E
+:10246E00000000000000000000000000000000005E
+:10247E00000000000000000000000000000000004E
+:10248E00000000000000000000000000000000003E
+:10249E00000000000000000000000000000000002E
+:1024AE00000000000000000000000000000000001E
+:1024BE00000000000000000000000000000000000E
+:1024CE0000000000000000000000000000000000FE
+:1024DE0000000000000000000000000000000000EE
+:1024EE0000000000000000000000000000000000DE
+:1024FE0000000000000000000000000000000000CE
+:10250E0000000000000000000000000000000000BD
+:10251E0000000000000000000000000000000000AD
+:10252E00000000000000000000000000000000009D
+:10253E00000000000000000000000000000000008D
+:10254E00000000000000000000000000000000007D
+:10255E00000000000000000000000000000000006D
+:10256E00000000000000000000000000000000005D
+:10257E00000000000000000000000000000000004D
+:10258E00000000000000000000000000000000003D
+:10259E00000000000000000000000000000000002D
+:1025AE00000000000000000000000000000000001D
+:1025BE00000000000000000000000000000000000D
+:1025CE0000000000000000000000000000000000FD
+:1025DE0000000000000000000000000000000000ED
+:1025EE0000000000000000000000000000000000DD
+:1025FE0000000000000000000000000000000000CD
+:10260E0000000000000000000000000000000000BC
+:10261E0000000000000000000000000000000000AC
+:10262E00000000000000000000000000000000009C
+:10263E00000000000000000000000000000000008C
+:10264E00000000000000000000000000000000007C
+:10265E00000000000000000000000000000000006C
+:10266E00000000000000000000000000000000005C
+:10267E00000000000000000000000000000000004C
+:10268E00000000000000000000000000000000003C
+:10269E00000000000000000000000000000000002C
+:1026AE00000000000000000000000000000000001C
+:1026BE00000000000000000000000000000000000C
+:1026CE0000000000000000000000000000000000FC
+:1026DE0000000000000000000000000000000000EC
+:0E26EE000000000000000000000000000000DE
+:1026FC0000000000000000000000000000000000CE
+:10270C0000000000000000000000000000000000BD
+:10271C0000000000000000000000000000000000AD
+:10272C00000000000000000000000000000000009D
+:10273C00000000000000000000000000000000008D
+:10274C00000000000000000000000000000000007D
+:10275C00000000000000000000000000000000006D
+:10276C00000000000000000000000000000000005D
+:10277C00000000000000000000000000000000004D
+:10278C00000000000000000000000000000000003D
+:10279C00000000000000000000000000000000002D
+:1027AC00000000000000000000000000000000001D
+:1027BC00000000000000000000000000000000000D
+:1027CC0000000000000000000000000000000000FD
+:1027DC0000000000000000000000000000000000ED
+:1027EC0000000000000000000000000000000000DD
+:0527FC000000000022B6
+:07174A00907FC57402F0223C
+:10175100907EC0E0907645F0907EC1E0907644F0B6
+:10176100907EC2E0907643F0B40003021778907641
+:10177100197403F002178E907644E0B4BB09907699
+:10178100197402F002178E9076197401F090764266
+:03179100E4F0225F
+:030000000246B9FC
+:0C46B900787FE4F6D8FD758138024700D8
+:10369200BB010689828A83E0225002E722BBFE0236
+:0936A200E32289828A83E4932269
+:1036AB00BB010CE58229F582E5833AF583E02250D4
+:1036BB0006E92582F8E622BBFE06E92582F8E2221E
+:0D36CB00E58229F582E5833AF583E4932238
+:1036D800C2D5EC30E709B2D5E4C39DFDE49CFCEE0D
+:1036E80030E715B2D5E4C39FFFE49EFE12381FC32E
+:1036F800E49DFDE49CFC800312381F30D507C3E429
+:063708009FFFE49EFE227B
+:10370E00BB0110E58229F582E5833AF583E0F5F0F9
+:10371E00A3E0225009E92582F886F008E622BBFED6
+:10372E000AE92582F8E2F5F008E222E5832AF5831C
+:08373E00E993F5F0A3E99322E1
+:10374600E88FF0A4CC8BF0A42CFCE98EF0A42CFC22
+:103756008AF0EDA42CFCEA8EF0A4CDA8F08BF0A4A0
+:103766002DCC3825F0FDE98FF0A42CCD35F0FCEBFF
+:103776008EF0A4FEA9F0EB8FF0A4CFC5F02ECD39C4
+:0F378600FEE43CFCEAA42DCE35F0FDE43CFC2231
+:10379500EB9FF5F0EA9E42F0E99D42F0EC6480C8AB
+:0637A50064809845F0224B
+:1037AB00EB9FF5F0EA9E42F0E99D42F0E89C45F074
+:0137BB0022EB
+:0C37BC00ECF0A3EDF0A3EEF0A3EFF02280
+:1037C800A8828583F0D083D0821237DF1237DF12C8
+:1037D80037DF1237DFE473E493A3C583C5F0C583ED
+:1037E800C8C582C8F0A3C583C5F0C583C8C582C84B
+:0137F80022AE
+:1037F900D083D082F8E4937012740193700DA3A35F
+:1038090093F8740193F5828883E473740293686072
+:06381900EFA3A3A380DF72
+:1046C5000207A6E493A3F8E493A34003F68001F25E
+:1046D50008DFF48029E493A3F85407240CC8C333F6
+:1046E500C4540F4420C8834004F456800146F6DFC5
+:1046F500E4800B0102040810204080900C8FE47EBA
+:10470500019360BCA3FF543F30E509541FFEE493B9
+:10471500A360010ECF54C025E060A840B8E493A380
+:10472500FAE493A3F8E493A3C8C582C8CAC583CAAB
+:10473500F0A3C8C582C8CAC583CADFE9DEE780BE63
+:010FC500002B
+:10381F00BC000BBE0029EF8DF084FFADF022E4CC8D
+:10382F00F875F008EF2FFFEE33FEEC33FCEE9DEC56
+:10383F00984005FCEE9DFE0FD5F0E9E4CEFD22ED9C
+:10384F00F8F5F0EE8420D21CFEADF075F008EF2FE6
+:10385F00FFED33FD4007985006D5F0F222C398FDD7
+:05386F000FD5F0EA2274
+:00000001FF
+/*
+VERSION=1.04.062
+DATE=16.10.2002
+*/
+static INTEL_HEX_RECORD g_emi62_loader[] = {
+ 3,0x0000,0,{0x02,0x02,0x87},
+ 3,0x0043,0,{0x02,0x04,0x00},
+ 16,0x0100,0,{0xe4,0xff,0xfe,0xc2,0x20,0xd2,0xe8,0x43,0xd8,0x20,0x90,0x7f,0xab,0x74,0xff,0xf0},
+ 16,0x0110,0,{0x90,0x7f,0xa9,0xf0,0x90,0x7f,0xaa,0xf0,0x53,0x91,0xef,0x90,0x7f,0x95,0x74,0xc0},
+ 16,0x0120,0,{0xf0,0x90,0x7f,0x9e,0xf0,0x90,0x7f,0x98,0xf0,0xe4,0x90,0x7f,0x94,0xf0,0x90,0x7f},
+ 16,0x0130,0,{0x9d,0x74,0xff,0xf0,0x90,0x7f,0x97,0x74,0xa0,0xf0,0x90,0x7f,0x93,0xe0,0x54,0xfc},
+ 16,0x0140,0,{0xf0,0x90,0x7f,0x9c,0x74,0x03,0xf0,0xe4,0x90,0x7f,0x96,0xf0,0x90,0x7f,0xaf,0xe0},
+ 16,0x0150,0,{0x44,0x01,0xf0,0x90,0x7f,0xae,0xe0,0x44,0x0d,0xf0,0xd2,0xaf,0x0f,0xbf,0x00,0x01},
+ 16,0x0160,0,{0x0e,0xbe,0x07,0xf8,0xbf,0x08,0xf5,0x20,0x20,0x42,0x75,0x14,0x00,0x75,0x13,0x00},
+ 16,0x0170,0,{0x75,0x12,0x00,0x75,0x11,0x00,0x7f,0x48,0x7e,0x92,0x7d,0x00,0x7c,0x00,0xab,0x14},
+ 16,0x0180,0,{0xaa,0x13,0xa9,0x12,0xa8,0x11,0xc3,0x12,0x03,0xed,0x50,0xdb,0x20,0x20,0xd8,0x7a},
+ 16,0x0190,0,{0x00,0x79,0x00,0x78,0x00,0xe5,0x14,0x24,0x01,0xf5,0x14,0xea,0x35,0x13,0xf5,0x13},
+ 16,0x01a0,0,{0xe9,0x35,0x12,0xf5,0x12,0xe8,0x35,0x11,0xf5,0x11,0x80,0xca,0x30,0x20,0xfd,0x12},
+ 16,0x01b0,0,{0x01,0xc7,0x50,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x90,0x7f,0xb4,0xe0,0x44},
+ 6,0x01c0,0,{0x02,0xf0,0xc2,0x20,0x80,0xe6},
+ 1,0x01c6,0,{0x22},
+ 16,0x01c7,0,{0x90,0x7f,0xe9,0xe0,0x24,0x5b,0x60,0x60,0x24,0x02,0x60,0x03,0x02,0x02,0x85,0x90},
+ 16,0x01d7,0,{0x7f,0xea,0xe0,0x75,0x0a,0x00,0xf5,0x0b,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x0a,0x90},
+ 16,0x01e7,0,{0x7f,0xee,0xe0,0x75,0x15,0x00,0xf5,0x16,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x15,0xe5},
+ 16,0x01f7,0,{0x16,0x45,0x15,0x70,0x03,0x02,0x02,0x85,0xe4,0x90,0x7f,0xc5,0xf0,0x90,0x7f,0xb4},
+ 16,0x0207,0,{0xe0,0x20,0xe3,0xf9,0x90,0x7f,0xc5,0xe0,0xf5,0x0c,0x12,0x03,0x13,0xaf,0x0c,0x7e},
+ 16,0x0217,0,{0x00,0xef,0x25,0x0b,0xf5,0x0b,0xee,0x35,0x0a,0xf5,0x0a,0xc3,0xe5,0x16,0x9f,0xf5},
+ 16,0x0227,0,{0x16,0xe5,0x15,0x9e,0xf5,0x15,0x80,0xc7,0x90,0x7f,0xea,0xe0,0x75,0x0a,0x00,0xf5},
+ 16,0x0237,0,{0x0b,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x0a,0x90,0x7f,0xee,0xe0,0x75,0x15,0x00,0xf5},
+ 16,0x0247,0,{0x16,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x15,0xe5,0x16,0x45,0x15,0x60,0x30,0xe4,0x90},
+ 16,0x0257,0,{0x7f,0xc5,0xf0,0x90,0x7f,0xb4,0xe0,0x20,0xe3,0xf9,0x90,0x7f,0xc5,0xe0,0xf5,0x0c},
+ 16,0x0267,0,{0x12,0x03,0x2b,0xaf,0x0c,0x7e,0x00,0xef,0x25,0x0b,0xf5,0x0b,0xee,0x35,0x0a,0xf5},
+ 15,0x0277,0,{0x0a,0xc3,0xe5,0x16,0x9f,0xf5,0x16,0xe5,0x15,0x9e,0xf5,0x15,0x80,0xca,0xc3},
+ 1,0x0286,0,{0x22},
+ 12,0x0287,0,{0x78,0x7f,0xe4,0xf6,0xd8,0xfd,0x75,0x81,0x29,0x02,0x02,0xce},
+ 16,0x0293,0,{0x02,0x01,0x00,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0x40,0x03,0xf6,0x80,0x01,0xf2},
+ 16,0x02a3,0,{0x08,0xdf,0xf4,0x80,0x29,0xe4,0x93,0xa3,0xf8,0x54,0x07,0x24,0x0c,0xc8,0xc3,0x33},
+ 16,0x02b3,0,{0xc4,0x54,0x0f,0x44,0x20,0xc8,0x83,0x40,0x04,0xf4,0x56,0x80,0x01,0x46,0xf6,0xdf},
+ 16,0x02c3,0,{0xe4,0x80,0x0b,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x90,0x04,0x6e,0xe4,0x7e},
+ 16,0x02d3,0,{0x01,0x93,0x60,0xbc,0xa3,0xff,0x54,0x3f,0x30,0xe5,0x09,0x54,0x1f,0xfe,0xe4,0x93},
+ 16,0x02e3,0,{0xa3,0x60,0x01,0x0e,0xcf,0x54,0xc0,0x25,0xe0,0x60,0xa8,0x40,0xb8,0xe4,0x93,0xa3},
+ 16,0x02f3,0,{0xfa,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca},
+ 16,0x0303,0,{0xf0,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca,0xdf,0xe9,0xde,0xe7,0x80,0xbe},
+ 16,0x0313,0,{0xe5,0x0c,0xff,0xe5,0x0b,0xf5,0x82,0xe5,0x0a,0xf5,0x83,0x75,0x92,0x7e,0x74,0xc0},
+ 8,0x0323,0,{0xf8,0xe2,0x08,0xf0,0xa3,0xdf,0xfa,0x22},
+ 16,0x032b,0,{0x90,0x7f,0x96,0x85,0x83,0x92,0xa8,0x82,0x79,0x02,0x90,0x00,0x00,0xe0,0xb4,0x00},
+ 16,0x033b,0,{0x0d,0x74,0x01,0xf0,0x90,0x7f,0x97,0xe0,0x54,0x7f,0xf0,0x44,0x80,0xf0,0xe5,0x0c},
+ 16,0x034b,0,{0xff,0x90,0x7e,0xc0,0xe0,0xf5,0x28,0xe4,0xa2,0x47,0x33,0xf2,0x69,0xf2,0xe4,0xa2},
+ 16,0x035b,0,{0x46,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x45,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x44,0x33},
+ 16,0x036b,0,{0xf2,0x69,0xf2,0xe4,0xa2,0x43,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x42,0x33,0xf2,0x69},
+ 16,0x037b,0,{0xf2,0xe4,0xa2,0x41,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x40,0x33,0xf2,0x69,0xf2,0xa3},
+ 3,0x038b,0,{0xdf,0xc2,0x22},
+ 16,0x038e,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x90,0x7f,0xc4,0xe4,0xf0,0x53,0x91,0xef,0x90,0x7f},
+ 11,0x039e,0,{0xab,0x74,0x04,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x03a9,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xd2,0x20,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x01},
+ 8,0x03b9,0,{0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x03c1,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x02,0xf0,0xd0},
+ 6,0x03d1,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x03d7,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x10,0xf0,0xd0},
+ 6,0x03e7,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x03ed,0,{0xeb,0x9f,0xf5,0xf0,0xea,0x9e,0x42,0xf0,0xe9,0x9d,0x42,0xf0,0xe8,0x9c,0x45,0xf0},
+ 1,0x03fd,0,{0x22},
+ 1,0x03fe,0,{0x32},
+ 1,0x03ff,0,{0x32},
+ 16,0x0400,0,{0x02,0x03,0xa9,0x00,0x02,0x03,0xc1,0x00,0x02,0x03,0x8e,0x00,0x02,0x04,0x58,0x00},
+ 16,0x0410,0,{0x02,0x03,0xd7,0x00,0x02,0x03,0xfe,0x00,0x02,0x03,0xff,0x00,0x02,0x04,0x84,0x00},
+ 16,0x0420,0,{0x02,0x04,0x85,0x00,0x02,0x04,0x86,0x00,0x02,0x04,0x87,0x00,0x02,0x04,0x88,0x00},
+ 16,0x0430,0,{0x02,0x04,0x89,0x00,0x02,0x04,0x8a,0x00,0x02,0x04,0x8b,0x00,0x02,0x04,0x8c,0x00},
+ 16,0x0440,0,{0x02,0x04,0x8d,0x00,0x02,0x04,0x8e,0x00,0x02,0x04,0x8f,0x00,0x02,0x04,0x90,0x00},
+ 8,0x0450,0,{0x02,0x04,0x91,0x00,0x02,0x04,0x92,0x00},
+ 16,0x0458,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x08,0xf0,0xd0},
+ 6,0x0468,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32},
+ 16,0x046e,0,{0x02,0x0a,0x00,0x0f,0x01,0x0c,0x11,0x04,0x0d,0x00,0x00,0x00,0x00,0x41,0x00,0x00},
+ 1,0x047e,0,{0x00},
+ 4,0x047f,0,{0x02,0x17,0x00,0x00},
+ 1,0x0483,0,{0x00},
+ 1,0x0484,0,{0x32},
+ 1,0x0485,0,{0x32},
+ 1,0x0486,0,{0x32},
+ 1,0x0487,0,{0x32},
+ 1,0x0488,0,{0x32},
+ 1,0x0489,0,{0x32},
+ 1,0x048a,0,{0x32},
+ 1,0x048b,0,{0x32},
+ 1,0x048c,0,{0x32},
+ 1,0x048d,0,{0x32},
+ 1,0x048e,0,{0x32},
+ 1,0x048f,0,{0x32},
+ 1,0x0490,0,{0x32},
+ 1,0x0491,0,{0x32},
+ 1,0x0492,0,{0x32},
+ 16,0x1100,0,{0x12,0x01,0x10,0x01,0x00,0x00,0x00,0x40,0x6a,0x08,0x01,0x01,0x00,0x01,0x01,0x02},
+ 16,0x1110,0,{0x00,0x01,0x09,0x02,0x20,0x00,0x01,0x01,0x03,0xa0,0x00,0x09,0x04,0x00,0x00,0x02},
+ 16,0x1120,0,{0xff,0x00,0x00,0x04,0x07,0x05,0x82,0x02,0x40,0x00,0x00,0x07,0x05,0x02,0x02,0x40},
+ 16,0x1130,0,{0x00,0x00,0x04,0x03,0x09,0x04,0x26,0x03,0x41,0x00,0x6e,0x00,0x63,0x00,0x68,0x00},
+ 16,0x1140,0,{0x6f,0x00,0x72,0x00,0x20,0x00,0x43,0x00,0x68,0x00,0x69,0x00,0x70,0x00,0x73,0x00},
+ 16,0x1150,0,{0x2c,0x00,0x20,0x00,0x49,0x00,0x6e,0x00,0x63,0x00,0x2e,0x00,0x28,0x03,0x46,0x00},
+ 16,0x1160,0,{0x69,0x00,0x72,0x00,0x6d,0x00,0x77,0x00,0x61,0x00,0x72,0x00,0x65,0x00,0x20,0x00},
+ 16,0x1170,0,{0x46,0x00,0x72,0x00,0x61,0x00,0x6d,0x00,0x65,0x00,0x57,0x00,0x6f,0x00,0x72,0x00},
+ 16,0x1180,0,{0x6b,0x00,0x73,0x00,0x2a,0x03,0x43,0x00,0x6f,0x00,0x6e,0x00,0x66,0x00,0x69,0x00},
+ 16,0x1190,0,{0x67,0x00,0x75,0x00,0x72,0x00,0x61,0x00,0x74,0x00,0x69,0x00,0x6f,0x00,0x6e,0x00},
+ 16,0x11a0,0,{0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00,0x69,0x00,0x6e,0x00,0x67,0x00,0x22,0x03},
+ 16,0x11b0,0,{0x49,0x00,0x6e,0x00,0x74,0x00,0x65,0x00,0x72,0x00,0x66,0x00,0x61,0x00,0x63,0x00},
+ 16,0x11c0,0,{0x65,0x00,0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00,0x69,0x00,0x6e,0x00,0x67,0x00},
+ 2,0x11d0,0,{0x00,0x00},
+ 0,0x0000,1,{0}
+};
+/* Source: EMILOAD.HEX
+:10046E00020A000F010C11040D00000000410000F3
+:01047E00007D
+:1001C700907FE9E0245B606024026003020285906F
+:1001D7007FEAE0750A00F50BA3E0FEE4EE420A9021
+:1001E7007FEEE0751500F516A3E0FEE4EE4215E597
+:1001F7001645157003020285E4907FC5F0907FB421
+:10020700E020E3F9907FC5E0F50C120313AF0C7EF5
+:1002170000EF250BF50BEE350AF50AC3E5169FF53A
+:1002270016E5159EF51580C7907FEAE0750A00F57B
+:100237000BA3E0FEE4EE420A907FEEE0751500F5B1
+:1002470016A3E0FEE4EE4215E51645156030E4908E
+:100257007FC5F0907FB4E020E3F9907FC5E0F50C0F
+:1002670012032BAF0C7E00EF250BF50BEE350AF5CD
+:0F0277000AC3E5169FF516E5159EF51580CAC357
+:010286002255
+:1003A900C0E0C083C082D2205391EF907FAB74012B
+:0803B900F0D082D083D0E032C5
+:10038E00C0E0C083C082907FC4E4F05391EF907FB1
+:0B039E00AB7404F0D082D083D0E032BA
+:1003C100C0E0C083C0825391EF907FAB7402F0D044
+:0603D10082D083D0E0326F
+:1003D700C0E0C083C0825391EF907FAB7410F0D020
+:0603E70082D083D0E03259
+:0103FE0032CC
+:10045800C0E0C083C0825391EF907FAB7408F0D0A6
+:0604680082D083D0E032D7
+:0103FF0032CB
+:010484003245
+:010485003244
+:010486003243
+:010487003242
+:010488003241
+:010489003240
+:01048A00323F
+:01048B00323E
+:01048C00323D
+:01048D00323C
+:01048E00323B
+:01048F00323A
+:010490003239
+:010491003238
+:010492003237
+:04047F000217000060
+:10010000E4FFFEC220D2E843D820907FAB74FFF01A
+:10011000907FA9F0907FAAF05391EF907F9574C0E3
+:10012000F0907F9EF0907F98F0E4907F94F0907F25
+:100130009D74FFF0907F9774A0F0907F93E054FC43
+:10014000F0907F9C7403F0E4907F96F0907FAFE096
+:100150004401F0907FAEE0440DF0D2AF0FBF00013C
+:100160000EBE07F8BF08F520204275140075130075
+:100170007512007511007F487E927D007C00AB14E3
+:10018000AA13A912A811C31203ED50DB2020D87ABC
+:100190000079007800E5142401F514EA3513F5130D
+:1001A000E93512F512E83511F51180CA3020FD123B
+:1001B00001C75007907FB4E04401F0907FB4E04461
+:0601C00002F0C22080E6FF
+:0101C6002216
+:1011000012011001000000406A0801010001010203
+:10111000000109022000010103A0000904000002EF
+:10112000FF0000040705820240000007050202409C
+:10113000000004030904260341006E0063006800F8
+:101140006F007200200043006800690070007300A7
+:101150002C00200049006E0063002E00280346008A
+:10116000690072006D007700610072006500200068
+:101170004600720061006D00650057006F0072004C
+:101180006B0073002A0343006F006E006600690065
+:101190006700750072006100740069006F006E00E6
+:1011A000200053007400720069006E006700220383
+:1011B00049006E0074006500720066006100630003
+:1011C0006500200053007400720069006E00670023
+:0211D00000001D
+:10031300E50CFFE50BF582E50AF58375927E74C063
+:08032300F8E208F0A3DFFA2262
+:10032B00907F96858392A8827902900000E0B400BA
+:10033B000D7401F0907F97E0547FF04480F0E50C52
+:10034B00FF907EC0E0F528E4A24733F269F2E4A205
+:10035B004633F269F2E4A24533F269F2E4A2443384
+:10036B00F269F2E4A24333F269F2E4A24233F26996
+:10037B00F2E4A24133F269F2E4A24033F269F2A350
+:03038B00DFC222AC
+:03004300020400B4
+:100400000203A9000203C10002038E000204580087
+:100410000203D7000203FE000203FF00020484006F
+:10042000020485000204860002048700020488009A
+:100430000204890002048A0002048B0002048C007A
+:1004400002048D0002048E0002048F00020490005A
+:08045000020491000204920075
+:0300000002028772
+:0C028700787FE4F6D8FD7581290202CED4
+:1003ED00EB9FF5F0EA9E42F0E99D42F0E89C45F066
+:0103FD0022DD
+:10029300020100E493A3F8E493A34003F68001F280
+:1002A30008DFF48029E493A3F85407240CC8C3336C
+:1002B300C4540F4420C8834004F456800146F6DF3B
+:1002C300E4800B010204081020408090046EE47E59
+:1002D300019360BCA3FF543F30E509541FFEE49330
+:1002E300A360010ECF54C025E060A840B8E493A3F7
+:1002F300FAE493A3F8E493A3C8C582C8CAC583CA22
+:10030300F0A3C8C582C8CAC583CADFE9DEE780BED9
+:010483000078
+:00000001FF
+/*
+VERSION=1.0.2.002
+DATE=10.01.2002
+EMI26_62
+*/
diff --git a/drivers/usb/misc/emi62_fw_s.h b/drivers/usb/misc/emi62_fw_s.h
new file mode 100644
index 000000000000..cef05e8517b5
--- /dev/null
+++ b/drivers/usb/misc/emi62_fw_s.h
@@ -0,0 +1,8837 @@
+/*
+ * This file is generated from three different files, provided by Emagic.
+ */
+/* generated Tue Apr 15 21:59:42 EEST 2003 */
+
+static INTEL_HEX_RECORD g_emi62bs[]={
+ {16, 0x8010, 0, {0xff,0xff,0xff,0xff,0xaa,0x99,0x55,0x66,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x07 }},
+ {16, 0x8020, 0, {0x30,0x01,0x60,0x01,0x00,0x00,0x00,0x0d,0x30,0x01,0x20,0x01,0x00,0x80,0x3f,0x2d }},
+ {16, 0x8030, 0, {0x30,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x09 }},
+ {16, 0x8040, 0, {0x30,0x00,0x20,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x01 }},
+ {16, 0x8050, 0, {0x30,0x00,0x40,0x00,0x50,0x00,0x58,0x1a,0x80,0x12,0x10,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8060, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8080, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x40,0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8090, 0, {0x00,0x12,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x80a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x80b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x48 }},
+ {16, 0x80c0, 0, {0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x80d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x80e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x80f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8100, 0, {0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8110, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8130, 0, {0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8140, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8150, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8170, 0, {0x80,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8190, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x81a0, 0, {0x00,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x81b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x81c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x81d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x90,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x81e0, 0, {0x7f,0x10,0x00,0x34,0x00,0x0d,0x00,0x03,0x40,0x00,0xd0,0x00,0x34,0x00,0x05,0x00 }},
+ {16, 0x81f0, 0, {0x07,0x40,0x01,0xd0,0x00,0x74,0x00,0x1d,0x00,0x07,0x40,0x01,0xd0,0x00,0x74,0x00 }},
+ {16, 0x8200, 0, {0x1d,0x80,0x07,0xe0,0x01,0xb8,0x00,0x6e,0x00,0x1b,0x80,0x06,0xe0,0x01,0x38,0x37 }},
+ {16, 0x8210, 0, {0xc4,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,0x80,0xfb,0x30,0x36,0xc8 }},
+ {16, 0x8220, 0, {0x4e,0x09,0x03,0xfc,0x84,0xff,0x10,0x3b,0xc0,0x0e,0xc8,0x07,0x22,0x80,0xff,0x22 }},
+ {16, 0x8230, 0, {0x33,0xc0,0x0f,0xc8,0x33,0x6e,0x00,0xfb,0x80,0x3f,0x20,0x0d,0xc2,0x53,0xd4,0x80 }},
+ {16, 0x8240, 0, {0xcc,0x3a,0x3f,0x00,0x0c,0xf1,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8250, 0, {0x80,0x00,0xed,0x60,0xbf,0x60,0x23,0xf0,0x0d,0x82,0x12,0x3c,0x60,0x8f,0x70,0x23 }},
+ {16, 0x8260, 0, {0xf0,0x08,0x88,0x02,0xa5,0x40,0xbf,0xd0,0x63,0xd6,0x0b,0x88,0x02,0x2e,0x0c,0xbb }},
+ {16, 0x8270, 0, {0x80,0x2e,0x20,0x88,0x8d,0x02,0xe6,0x40,0x80,0x60,0x2e,0x30,0x0a,0xb1,0x12,0x20 }},
+ {16, 0x8280, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x80,0xa3,0x40,0x2c,0xc4 }},
+ {16, 0x8290, 0, {0x4a,0x00,0x12,0x8c,0x88,0xa3,0x22,0x20,0xc4,0x0a,0x90,0x42,0x04,0xa9,0xa3,0x00 }},
+ {16, 0x82a0, 0, {0x24,0xc8,0x8b,0x80,0x02,0xcc,0x00,0xb3,0x00,0x2e,0x01,0x09,0x08,0x02,0x84,0x00 }},
+ {16, 0x82b0, 0, {0x80,0x20,0x2c,0x10,0x0a,0x32,0x42,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x82c0, 0, {0xc0,0x15,0xac,0x04,0xb3,0x00,0x2a,0xc0,0x08,0x08,0xa2,0x8c,0x00,0x8b,0x00,0xa2 }},
+ {16, 0x82d0, 0, {0xc1,0x10,0x98,0x42,0xa7,0x00,0xbb,0x01,0x66,0xc1,0x0b,0x80,0x02,0xac,0x04,0xbb }},
+ {16, 0x82e0, 0, {0x00,0x2e,0x00,0x0b,0xb8,0x12,0xe4,0x02,0x89,0x08,0x0e,0x40,0x0a,0xb0,0x02,0x30 }},
+ {16, 0x82f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xac,0x00,0xeb,0x00,0x3e,0xc0 }},
+ {16, 0x8300, 0, {0x4a,0xb8,0x23,0xec,0x18,0xeb,0x00,0x32,0xc0,0x0e,0x2c,0x12,0x22,0x10,0xeb,0x00 }},
+ {16, 0x8310, 0, {0x26,0xc0,0x4f,0x00,0x43,0xed,0x00,0xfb,0x00,0x2e,0x24,0x0d,0x80,0x13,0xe4,0x00 }},
+ {16, 0x8320, 0, {0xc8,0xd0,0x7c,0x12,0x0e,0xb0,0x03,0x40,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8330, 0, {0xe1,0x00,0xbc,0x00,0xff,0x00,0x35,0xc0,0x4f,0xe0,0x03,0x7c,0x08,0xff,0x01,0x17 }},
+ {16, 0x8340, 0, {0xc2,0x4d,0xc0,0x03,0xf4,0x08,0xf7,0x00,0x3b,0xc0,0x07,0xc0,0x03,0x7c,0x80,0xff }},
+ {16, 0x8350, 0, {0x24,0x3f,0x40,0x0c,0xf0,0x01,0xf4,0x04,0xbc,0x08,0x3f,0x28,0x0f,0xf0,0x03,0x78 }},
+ {16, 0x8360, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x08,0xfb,0x04,0x3a,0xc8 }},
+ {16, 0x8370, 0, {0x0f,0x94,0x03,0xec,0x10,0xf3,0x00,0x34,0xc0,0x0e,0xb0,0x03,0x61,0x04,0xfb,0x00 }},
+ {16, 0x8380, 0, {0x36,0xc0,0x0e,0xa3,0x03,0x2c,0x80,0xfb,0x72,0x3e,0x02,0x0f,0x8a,0x03,0xe4,0x02 }},
+ {16, 0x8390, 0, {0xc9,0x80,0x2a,0x50,0x0f,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x83a0, 0, {0xca,0x44,0x3c,0x00,0xbf,0x00,0x03,0xc0,0x08,0x80,0x03,0x7c,0x00,0xbf,0x00,0x3f }},
+ {16, 0x83b0, 0, {0xe2,0x08,0x90,0x43,0x60,0x00,0xbf,0x00,0x37,0xc0,0x08,0x90,0x01,0x6d,0x00,0xbb }},
+ {16, 0x83c0, 0, {0x40,0x2c,0x10,0x0b,0xb0,0x42,0xd7,0xc0,0x89,0x00,0x2a,0x7c,0x0b,0xf0,0x02,0xf2 }},
+ {16, 0x83d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0x05,0x4c,0x00,0xb3,0x00,0x20,0xd5 }},
+ {16, 0x83e0, 0, {0x4a,0x00,0x00,0x0c,0x04,0x93,0x00,0x0c,0xf0,0x0b,0x09,0x02,0x08,0x01,0xb3,0x20 }},
+ {16, 0x83f0, 0, {0x28,0xc0,0x0a,0x0c,0x0a,0x0e,0x00,0xb3,0x00,0x24,0x30,0x09,0x00,0x02,0xc6,0x10 }},
+ {16, 0x8400, 0, {0x80,0x42,0x20,0x00,0x8b,0xb0,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8410, 0, {0x22,0x01,0x1e,0x00,0xb7,0x94,0x21,0xe4,0x48,0xd9,0x12,0x5e,0x40,0xb7,0x90,0x29 }},
+ {16, 0x8420, 0, {0xe0,0x8b,0x69,0x12,0xd6,0x80,0x37,0x82,0x2c,0xe8,0x08,0x4a,0x02,0x5e,0x00,0xb7 }},
+ {16, 0x8430, 0, {0xa4,0x2d,0x20,0x0b,0x79,0x02,0xd6,0x08,0x86,0x90,0x29,0xa0,0x0b,0x79,0x02,0xd8 }},
+ {16, 0x8440, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x0c,0x00,0xfb,0xa0,0x28,0xe8 }},
+ {16, 0x8450, 0, {0x0e,0x2a,0x02,0x8c,0x00,0xd3,0x00,0x64,0xc0,0x0f,0x00,0x43,0x0e,0xc4,0xf3,0x00 }},
+ {16, 0x8460, 0, {0x78,0xec,0x0e,0x0a,0x43,0x0e,0x20,0x73,0xe0,0x3c,0x02,0x4f,0x00,0x03,0xc4,0x40 }},
+ {16, 0x8470, 0, {0xc3,0x00,0x38,0xc0,0x0f,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8480, 0, {0x40,0x1d,0xbc,0x00,0xff,0x00,0xbc,0xcc,0x0e,0xb0,0x03,0xec,0x20,0xfb,0x00,0x3c }},
+ {16, 0x8490, 0, {0xc2,0x0c,0x20,0x03,0x6c,0x50,0xf3,0x00,0x36,0xc4,0x0f,0x40,0x03,0xfc,0x08,0xff }},
+ {16, 0x84a0, 0, {0x1a,0x3f,0x80,0x0f,0xf0,0x01,0xe4,0x30,0xff,0x02,0x3f,0xc0,0x0f,0xf0,0x63,0xd0 }},
+ {16, 0x84b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xec,0x40,0xfb,0x00,0xb2,0xd8 }},
+ {16, 0x84c0, 0, {0x0c,0xb0,0x01,0x2d,0x20,0xdb,0x01,0x3a,0xc8,0x8c,0x38,0x03,0xa8,0x00,0xfb,0x48 }},
+ {16, 0x84d0, 0, {0x3e,0xc9,0x0f,0x80,0x03,0xec,0x40,0xfb,0x01,0x3e,0x00,0x0f,0x08,0x03,0xa4,0x08 }},
+ {16, 0x84e0, 0, {0xfa,0x80,0xb2,0x80,0x0f,0xb1,0x02,0x6a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x84f0, 0, {0x48,0x19,0x1c,0x80,0xbf,0x30,0x21,0xca,0x08,0xf0,0x0a,0x0c,0x80,0x8f,0x50,0x21 }},
+ {16, 0x8500, 0, {0xc2,0x08,0x70,0x50,0x9c,0x00,0xb7,0x00,0x39,0xc4,0x0b,0x40,0x02,0x9c,0x04,0xb7 }},
+ {16, 0x8510, 0, {0x20,0x25,0x40,0x0b,0x70,0x02,0x14,0x80,0xb6,0x00,0x21,0x80,0x0b,0xf8,0x02,0x12 }},
+ {16, 0x8520, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xb7,0xb0,0x21,0xec }},
+ {16, 0x8530, 0, {0x0b,0x78,0x12,0xde,0x84,0x97,0x80,0x0d,0xe0,0x28,0xf8,0x02,0xde,0x00,0xb7,0x90 }},
+ {16, 0x8540, 0, {0x2d,0xe4,0x0b,0x68,0x82,0x5e,0x80,0xb7,0xa0,0x29,0x20,0x0b,0x48,0x02,0x96,0x00 }},
+ {16, 0x8550, 0, {0xb7,0x80,0x21,0xe1,0x0b,0x7a,0x02,0x70,0x40,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8560, 0, {0x48,0x04,0xcc,0x00,0xb3,0x00,0x20,0xc0,0x0b,0x38,0x02,0x8c,0x04,0x83,0x00,0x28 }},
+ {16, 0x8570, 0, {0xc0,0x88,0x39,0x02,0x4c,0x40,0xb3,0x04,0x28,0xc0,0x1b,0x10,0x02,0x8c,0x01,0xb3 }},
+ {16, 0x8580, 0, {0x04,0x24,0x88,0x4b,0x31,0x02,0x04,0x00,0xb3,0x80,0x20,0xf2,0x0b,0x30,0x02,0x02 }},
+ {16, 0x8590, 0, {0x24,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0xa8,0x00,0xfa,0x00,0x32,0x80 }},
+ {16, 0x85a0, 0, {0x0f,0xe8,0x03,0xe8,0x00,0xda,0x01,0x3a,0x80,0x8c,0xed,0x03,0xfb,0x04,0xfa,0x00 }},
+ {16, 0x85b0, 0, {0x3e,0x80,0x0f,0x6c,0x03,0xfb,0xc8,0xbe,0xc2,0x1f,0x80,0x0f,0xe5,0x03,0xa8,0x00 }},
+ {16, 0x85c0, 0, {0xfe,0x48,0x33,0x80,0x4f,0xa0,0x03,0x7a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x85d0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x00,0x3c,0x00,0x0c,0x81,0x93,0x60,0x00,0xf8,0x01,0x36 }},
+ {16, 0x85e0, 0, {0x10,0x0f,0x80,0x03,0xa0,0x20,0xf8,0x00,0x2a,0x01,0x8f,0x84,0x13,0xe1,0x00,0xf8 }},
+ {16, 0x85f0, 0, {0x18,0x36,0x00,0x0f,0x80,0x13,0xe0,0x00,0xf8,0x20,0x3e,0x14,0x0f,0x80,0x03,0xd2 }},
+ {16, 0x8600, 0, {0x80,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xe4,0x00,0xf1,0x00,0xaa,0x40 }},
+ {16, 0x8610, 0, {0x0c,0x90,0x03,0x24,0x00,0xe1,0x00,0x38,0x40,0x1c,0x90,0x03,0xe4,0x00,0xf9,0xa0 }},
+ {16, 0x8620, 0, {0x3a,0x40,0x47,0x9a,0x93,0xa2,0x80,0xf8,0x10,0x3e,0x40,0x0b,0x94,0x03,0xe6,0x40 }},
+ {16, 0x8630, 0, {0xf9,0xc0,0x3e,0x68,0x0b,0x10,0x03,0x02,0x84,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8640, 0, {0x80,0x04,0xe4,0x04,0xb9,0x00,0x22,0x40,0x08,0x90,0x02,0x24,0x04,0x89,0x00,0x36 }},
+ {16, 0x8650, 0, {0x40,0x08,0x90,0x02,0xe4,0x04,0xb9,0x80,0x2e,0x40,0x4f,0x94,0x03,0x61,0x10,0xe8 }},
+ {16, 0x8660, 0, {0x40,0x2e,0x40,0x0b,0x90,0x42,0xe6,0x04,0xb9,0x00,0x2e,0x40,0x0b,0x90,0x02,0x20 }},
+ {16, 0x8670, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x04,0x24,0x00,0xb9,0x00,0x22,0x40 }},
+ {16, 0x8680, 0, {0x0a,0x10,0x52,0x04,0x04,0xa9,0x04,0x2a,0x40,0x08,0xb0,0x02,0xe4,0x01,0xb9,0x00 }},
+ {16, 0x8690, 0, {0x2e,0x40,0x0b,0x90,0x02,0xa8,0x0d,0xb8,0x40,0x2e,0x40,0x09,0x94,0x02,0xe5,0x00 }},
+ {16, 0x86a0, 0, {0xb9,0x04,0x2e,0x40,0x0b,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x86b0, 0, {0x08,0x04,0x04,0x80,0xb1,0x20,0x20,0xc8,0x0a,0x10,0x42,0x04,0x90,0x81,0x20,0x04 }},
+ {16, 0x86c0, 0, {0xc8,0x08,0x30,0x26,0xc4,0x00,0xb1,0x20,0x2c,0x48,0x0b,0x90,0x02,0x45,0x01,0xb1 }},
+ {16, 0x86d0, 0, {0x40,0x2c,0x40,0x0b,0x12,0x82,0xc4,0x00,0xb1,0x2b,0x2c,0x4a,0x0b,0x12,0x82,0x02 }},
+ {16, 0x86e0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x08,0x21,0x48,0xf8,0x50,0x32,0x00 }},
+ {16, 0x86f0, 0, {0x4e,0x85,0x0b,0x21,0x40,0xa8,0x52,0x2a,0x00,0x08,0x80,0x23,0xe1,0x40,0xf8,0x00 }},
+ {16, 0x8700, 0, {0x3a,0x14,0x0f,0xa0,0x43,0xa8,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x82,0x03,0xe0,0x00 }},
+ {16, 0x8710, 0, {0xf0,0x20,0x3e,0x88,0x4f,0x82,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8720, 0, {0x98,0x19,0xe4,0x40,0xf9,0x11,0x34,0x44,0x2d,0xd0,0x03,0xe4,0x50,0x79,0x10,0x38 }},
+ {16, 0x8730, 0, {0x44,0x2f,0xd0,0x03,0xf5,0x10,0xf9,0x10,0x3e,0x45,0x06,0x50,0x03,0xe5,0x00,0xe9 }},
+ {16, 0x8740, 0, {0x40,0x3f,0x40,0x0f,0xd0,0x43,0xf5,0x00,0xfd,0x28,0x3f,0x40,0x0f,0x92,0x83,0xe6 }},
+ {16, 0x8750, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x01,0xe6,0x00,0xd9,0x90,0x37,0x69 }},
+ {16, 0x8760, 0, {0x4d,0x90,0x23,0x67,0x80,0xd9,0xe0,0x37,0x68,0x0e,0xd0,0x07,0xa4,0x00,0x05,0x86 }},
+ {16, 0x8770, 0, {0x3e,0x66,0x0d,0x50,0x23,0x26,0x00,0xc9,0x82,0x3d,0x40,0x0d,0xd8,0x07,0x36,0x02 }},
+ {16, 0x8780, 0, {0xcd,0xc0,0x33,0x60,0x0c,0x9c,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8790, 0, {0x38,0x10,0xe2,0x80,0x88,0xa2,0x22,0x10,0x28,0x8a,0x82,0x23,0x84,0x88,0xa0,0x22 }},
+ {16, 0x87a0, 0, {0x14,0x48,0x80,0x42,0x82,0x00,0x88,0x40,0x2e,0x30,0x08,0x80,0x02,0xa2,0x00,0xd8 }},
+ {16, 0x87b0, 0, {0x90,0x26,0x00,0x08,0x84,0x0a,0x21,0x00,0xc8,0xa0,0xa2,0x14,0x28,0x8c,0x02,0x0e }},
+ {16, 0x87c0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x20,0x91,0x40,0x2c,0x44 }},
+ {16, 0x87d0, 0, {0x18,0x10,0x02,0x85,0x04,0xb1,0x40,0x0c,0x40,0x0a,0x10,0x06,0x84,0x30,0x81,0x40 }},
+ {16, 0x87e0, 0, {0x2c,0x48,0x59,0x10,0x1a,0x04,0x60,0x81,0x09,0x2e,0x40,0x1b,0x14,0x02,0x25,0x00 }},
+ {16, 0x87f0, 0, {0x91,0xe0,0x20,0x60,0x08,0x16,0x02,0x00,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8800, 0, {0x18,0x15,0xa4,0x00,0x81,0x00,0x2a,0x41,0x08,0x90,0x02,0xa4,0x00,0xa1,0x00,0x2a }},
+ {16, 0x8810, 0, {0x41,0x08,0xb0,0x82,0x24,0x11,0x8b,0x00,0x2e,0x40,0x18,0x91,0x02,0xa0,0x04,0x98 }},
+ {16, 0x8820, 0, {0x20,0x2e,0x54,0x1b,0x90,0x82,0x2c,0x00,0x89,0x10,0x22,0x44,0x88,0x90,0x02,0x06 }},
+ {16, 0x8830, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xd9,0x00,0x3e,0x40 }},
+ {16, 0x8840, 0, {0x4c,0x90,0x03,0xa4,0x10,0xf9,0x00,0x3e,0x40,0x8e,0x10,0x02,0xa4,0xc2,0xc9,0x00 }},
+ {16, 0x8850, 0, {0x3e,0x40,0x0d,0x16,0x13,0x01,0x84,0xc8,0x20,0x3c,0x60,0x0f,0x90,0x12,0x04,0x00 }},
+ {16, 0x8860, 0, {0xd9,0x40,0x32,0x50,0x0c,0x90,0x03,0x28,0x84,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8870, 0, {0x28,0x01,0x84,0x00,0xf9,0x00,0x36,0x40,0x4f,0x99,0x4a,0x44,0x00,0x99,0x00,0xb4 }},
+ {16, 0x8880, 0, {0x40,0x0f,0x90,0x13,0xe6,0x00,0xf9,0x00,0x3c,0x40,0x0f,0x90,0x03,0xe3,0x00,0xf8 }},
+ {16, 0x8890, 0, {0x01,0x36,0x40,0x0c,0x99,0x03,0xe4,0x02,0xf9,0x80,0x3e,0x60,0x4f,0x90,0x0b,0xca }},
+ {16, 0x88a0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xd8,0x00,0x3c,0x00 }},
+ {16, 0x88b0, 0, {0x1d,0x80,0x03,0x20,0x00,0xe8,0x00,0x32,0x00,0x0c,0x84,0x83,0xe0,0x10,0xe8,0x20 }},
+ {16, 0x88c0, 0, {0x32,0x00,0x8e,0x84,0x03,0x21,0x80,0xc8,0x00,0x3a,0x19,0x0f,0x04,0x03,0xe0,0x24 }},
+ {16, 0x88d0, 0, {0xf0,0x02,0x3c,0x00,0x0f,0x80,0x13,0x8a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x88e0, 0, {0x28,0x05,0x28,0x02,0x8a,0x01,0x0f,0xa2,0x68,0xa0,0x00,0x28,0x00,0x8a,0x00,0x77 }},
+ {16, 0x88f0, 0, {0x80,0x68,0xe0,0x12,0xe8,0x00,0xde,0x00,0x36,0x81,0x08,0xe0,0x03,0x7a,0x08,0xae }},
+ {16, 0x8900, 0, {0xc4,0x2f,0x80,0x08,0xed,0x02,0xfa,0x00,0xbe,0xa0,0x3b,0x80,0x0b,0xa0,0x42,0x0a }},
+ {16, 0x8910, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x85,0x4c,0x00,0x93,0x00,0x2c,0xc0 }},
+ {16, 0x8920, 0, {0x88,0xb0,0x02,0x0c,0x14,0xa3,0x04,0x20,0xc4,0x18,0x38,0x02,0xec,0x10,0x93,0x54 }},
+ {16, 0x8930, 0, {0x28,0xc0,0x0a,0x00,0x02,0x4e,0x00,0x83,0x49,0x68,0xc0,0x02,0x39,0x42,0xce,0x40 }},
+ {16, 0x8940, 0, {0xb3,0x00,0x2c,0xe6,0x0b,0xb0,0x02,0x8b,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8950, 0, {0x20,0x01,0x1c,0x08,0x87,0x20,0x2c,0x80,0x18,0xf2,0x22,0x1c,0x00,0x87,0x10,0x21 }},
+ {16, 0x8960, 0, {0xc0,0x08,0x70,0x82,0xdc,0x80,0x96,0x80,0x2d,0xc0,0x0a,0x40,0x02,0x7d,0x40,0x27 }},
+ {16, 0x8970, 0, {0x64,0x6d,0xd0,0x48,0x60,0x42,0xd8,0x05,0xb6,0x04,0x29,0xc0,0x4b,0x72,0x02,0x28 }},
+ {16, 0x8980, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x3e,0x88,0xd7,0xe0,0x3d,0xe0 }},
+ {16, 0x8990, 0, {0x08,0x7c,0x42,0x3e,0x00,0xe3,0x82,0x20,0xe0,0x0c,0x68,0x03,0xdf,0x04,0xd7,0x80 }},
+ {16, 0x89a0, 0, {0x3b,0xe0,0x4e,0x48,0x0a,0x5e,0x80,0xc7,0xc2,0x19,0xe0,0x0e,0x78,0x03,0xd6,0x08 }},
+ {16, 0x89b0, 0, {0xf7,0x80,0x3d,0xe0,0x0f,0xf8,0x03,0xaa,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x89c0, 0, {0x08,0x1d,0xac,0x40,0xfb,0x40,0x7e,0x80,0x0e,0x36,0x83,0xed,0x40,0xdb,0x60,0x3e }},
+ {16, 0x89d0, 0, {0x80,0x0f,0xa0,0x03,0xed,0x28,0xda,0x00,0x32,0xc4,0x0c,0xb0,0x0b,0xcc,0x00,0xfb }},
+ {16, 0x89e0, 0, {0x00,0x3e,0xc0,0x0e,0x80,0x13,0xe0,0x10,0xf8,0x00,0x3e,0x00,0x0f,0xb1,0x53,0xc2 }},
+ {16, 0x89f0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x00,0xff,0xc0,0x33,0xe0 }},
+ {16, 0x8a00, 0, {0x0c,0xf9,0x03,0x7f,0x04,0xcf,0xd0,0x3f,0xe4,0x0f,0xb8,0x03,0xfe,0x00,0xff,0x94 }},
+ {16, 0x8a10, 0, {0x3f,0xe0,0x0f,0xc8,0x03,0x7e,0x10,0xf3,0x80,0x3b,0xe0,0x0f,0xf8,0x03,0xfe,0x48 }},
+ {16, 0x8a20, 0, {0xed,0x80,0x33,0x24,0x04,0xf8,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8a30, 0, {0xa8,0x11,0x9c,0x80,0xbf,0x04,0x21,0x28,0x08,0xf8,0x02,0x1e,0xc0,0xcf,0x90,0x21 }},
+ {16, 0x8a40, 0, {0x4c,0x0b,0x5a,0x42,0xde,0x00,0xb7,0x80,0x2c,0xe8,0x0b,0x04,0x02,0x1c,0x00,0xb7 }},
+ {16, 0x8a50, 0, {0xa0,0x35,0x10,0x8f,0x71,0x13,0xde,0xc0,0x84,0x10,0x21,0x80,0x0d,0x71,0x02,0x2a }},
+ {16, 0x8a60, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x9c,0x08,0xb7,0x00,0x25,0xc8 }},
+ {16, 0x8a70, 0, {0x08,0x71,0x02,0xcc,0x80,0x97,0x00,0x29,0xc0,0x8b,0x72,0x06,0xdc,0x08,0xb5,0x00 }},
+ {16, 0x8a80, 0, {0x2d,0xc8,0x0b,0x40,0x02,0x1c,0x40,0xbf,0x10,0x21,0xc0,0x0b,0x74,0x02,0xd4,0x80 }},
+ {16, 0x8a90, 0, {0xa7,0x40,0x21,0x41,0x08,0x70,0x02,0x04,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8aa0, 0, {0x60,0x14,0xcc,0x00,0xb3,0x00,0x24,0x00,0x08,0x34,0x82,0xac,0x11,0x83,0x00,0x20 }},
+ {16, 0x8ab0, 0, {0x00,0x4b,0x18,0x26,0xcf,0x20,0xb1,0x06,0x2c,0xc1,0x0b,0x32,0x02,0x0e,0x08,0xb3 }},
+ {16, 0x8ac0, 0, {0x88,0x24,0x32,0x0a,0x30,0x12,0x84,0x08,0x80,0x00,0xa0,0x34,0x28,0x30,0x02,0x18 }},
+ {16, 0x8ad0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xbc,0x00,0xff,0x00,0xb6,0x40 }},
+ {16, 0x8ae0, 0, {0x2c,0xf4,0x43,0xfc,0x01,0xdf,0x00,0x3a,0x00,0x03,0x92,0x03,0xff,0x88,0xf9,0x00 }},
+ {16, 0x8af0, 0, {0x2f,0xc0,0x1b,0x0e,0x4b,0x2e,0x90,0xfb,0xe0,0x30,0x32,0x0b,0x98,0x02,0xec,0x08 }},
+ {16, 0x8b00, 0, {0x6b,0xc0,0x32,0xc0,0x08,0xf0,0x09,0x3e,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8b10, 0, {0x80,0x00,0xec,0x00,0xf3,0x00,0x3a,0xc0,0x0f,0xb0,0x01,0x6c,0x00,0xfb,0x00,0x3a }},
+ {16, 0x8b20, 0, {0x10,0x0f,0xb4,0x03,0xec,0x00,0xf0,0x00,0x3c,0xc0,0x0f,0x80,0x0b,0xad,0x20,0xfb }},
+ {16, 0x8b30, 0, {0x40,0x3e,0x10,0x07,0xa8,0x63,0xe0,0x00,0xfb,0x80,0x3e,0xd8,0x0f,0xb0,0x03,0xe0 }},
+ {16, 0x8b40, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xff,0x00,0x72,0x00 }},
+ {16, 0x8b50, 0, {0x0f,0xf0,0x23,0xfc,0x00,0xdf,0x00,0x3f,0x40,0x0f,0xc0,0x03,0xdc,0x00,0x8f,0x00 }},
+ {16, 0x8b60, 0, {0x33,0xc1,0x0c,0xc0,0x03,0xbe,0x00,0xff,0x90,0x3b,0x28,0x0e,0x59,0x03,0x2e,0x00 }},
+ {16, 0x8b70, 0, {0x7b,0x00,0x32,0xc4,0x0f,0xb0,0x03,0xd0,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8b80, 0, {0xc1,0x04,0x6c,0x00,0xbb,0x00,0x62,0xa0,0x0f,0xb0,0x02,0xec,0x09,0x8b,0x00,0x2e }},
+ {16, 0x8b90, 0, {0x30,0x0b,0xa8,0x03,0xac,0x00,0xfa,0xc1,0x22,0xc1,0x08,0x8c,0x02,0x2c,0x00,0xb3 }},
+ {16, 0x8ba0, 0, {0x81,0x2a,0x00,0x0d,0x88,0xb2,0x22,0x00,0xb3,0xc0,0x22,0xc8,0x0b,0xb0,0x42,0x61 }},
+ {16, 0x8bb0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x6c,0x00,0xbb,0x01,0x22,0x62 }},
+ {16, 0x8bc0, 0, {0x0b,0xb0,0x02,0xec,0x04,0x8b,0x00,0x2e,0xa2,0x49,0x88,0x26,0xec,0x00,0xa8,0x80 }},
+ {16, 0x8bd0, 0, {0x22,0xc0,0x28,0x82,0x0a,0xac,0xa0,0xbb,0x08,0x22,0xc0,0x08,0x80,0x0a,0x28,0x84 }},
+ {16, 0x8be0, 0, {0xb9,0xc0,0xa2,0x00,0x0b,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8bf0, 0, {0x08,0x04,0x0c,0x00,0xb3,0x10,0x20,0x48,0x0a,0x32,0x02,0xcc,0x80,0x83,0x01,0x24 }},
+ {16, 0x8c00, 0, {0x00,0x0b,0x02,0x06,0x8c,0x60,0xa0,0x20,0x20,0xc8,0x08,0x01,0x02,0x0c,0x00,0xb3 }},
+ {16, 0x8c10, 0, {0x00,0x28,0x00,0x09,0x20,0x02,0x08,0x80,0xb1,0x00,0xa0,0x80,0x0b,0x30,0x02,0x42 }},
+ {16, 0x8c20, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x6c,0x00,0xff,0x00,0xa2,0x0e }},
+ {16, 0x8c30, 0, {0x0b,0xf1,0x03,0xfc,0x08,0xcf,0x20,0x3e,0xc0,0x0f,0x80,0x03,0xfc,0x84,0xa8,0x20 }},
+ {16, 0x8c40, 0, {0xb2,0xc8,0x8c,0x80,0x03,0xac,0x44,0xfb,0x70,0x3a,0xc0,0x0e,0x90,0x03,0x2c,0xa4 }},
+ {16, 0x8c50, 0, {0xfb,0x00,0xb2,0x40,0x0f,0xb0,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8c60, 0, {0xa0,0x1d,0xfc,0x00,0xff,0x26,0x3e,0x00,0x0f,0xb6,0x13,0xed,0x00,0xfb,0x10,0x3f }},
+ {16, 0x8c70, 0, {0x00,0x0f,0xc1,0x13,0xac,0x80,0xf8,0x12,0x3e,0xc6,0x4f,0x42,0x43,0xfc,0x04,0xff }},
+ {16, 0x8c80, 0, {0x31,0x3f,0x00,0x0f,0xf0,0x03,0xec,0x00,0xff,0x00,0xbf,0xc0,0x8f,0xf0,0x03,0xe8 }},
+ {16, 0x8c90, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,0x40,0xfc,0x80,0x36,0xc8 }},
+ {16, 0x8ca0, 0, {0x0f,0x09,0x03,0xc2,0x00,0xf8,0xc0,0x33,0xcc,0x2c,0x4c,0x03,0x63,0x90,0xe0,0x90 }},
+ {16, 0x8cb0, 0, {0x3a,0xc0,0x0d,0x50,0x0b,0x3c,0x04,0xdf,0x64,0x3f,0xc8,0x8d,0xf1,0x43,0x2c,0x00 }},
+ {16, 0x8cc0, 0, {0xd5,0x00,0x33,0xc0,0x45,0xf2,0x23,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8cd0, 0, {0x80,0x10,0xed,0x80,0xba,0x02,0x21,0xde,0x8b,0x82,0x22,0xe0,0x20,0xb0,0x00,0x2b }},
+ {16, 0x8ce0, 0, {0xec,0x09,0x80,0x02,0xe3,0x40,0xba,0x20,0x2f,0xdc,0x08,0x98,0x12,0x2c,0x00,0x8b }},
+ {16, 0x8cf0, 0, {0x51,0x2a,0xd0,0x08,0x72,0x22,0x2e,0x00,0x8d,0x80,0x21,0xd0,0x08,0xb6,0x82,0x20 }},
+ {16, 0x8d00, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x40,0xb9,0x28,0x24,0xc0 }},
+ {16, 0x8d10, 0, {0x4a,0x12,0x12,0x88,0x85,0xa8,0x20,0x20,0xc0,0x0b,0x22,0x02,0xc0,0x91,0xa1,0x00 }},
+ {16, 0x8d20, 0, {0x28,0xc2,0x0b,0x00,0x12,0x8c,0x40,0xa3,0x20,0x20,0xc4,0x0b,0x30,0x0a,0x0c,0x11 }},
+ {16, 0x8d30, 0, {0x99,0x00,0x20,0xc5,0x09,0x01,0x02,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8d40, 0, {0xc0,0x11,0xac,0x00,0xb8,0x80,0x22,0xc0,0x0b,0x88,0x02,0xee,0x01,0xb8,0xc1,0x2a }},
+ {16, 0x8d50, 0, {0xc0,0x1b,0xa8,0x06,0xe2,0x00,0xbb,0x80,0x2e,0xc0,0x8a,0x80,0x02,0xac,0x00,0xab }},
+ {16, 0x8d60, 0, {0x00,0x2e,0xc0,0x0a,0xb0,0x02,0x2c,0x00,0x99,0x00,0x24,0xc0,0x08,0x80,0x02,0x30 }},
+ {16, 0x8d70, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xb0,0x80,0x36,0xc0 }},
+ {16, 0x8d80, 0, {0x0e,0xa8,0x13,0xe2,0x85,0xf3,0xc0,0x32,0xc0,0x0e,0x9c,0x23,0xe7,0x24,0xe8,0x82 }},
+ {16, 0x8d90, 0, {0x3a,0xc1,0x0f,0x94,0x03,0xac,0x02,0xeb,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0x2e,0x10 }},
+ {16, 0x8da0, 0, {0x51,0x00,0xb2,0xc0,0x0d,0xb0,0x03,0x50,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8db0, 0, {0xe0,0x01,0xbc,0x00,0xff,0x00,0x3f,0xc0,0x8f,0xd0,0x03,0xf0,0x04,0xfd,0x04,0x3f }},
+ {16, 0x8dc0, 0, {0xc0,0x4c,0xc0,0x03,0xf0,0x10,0xfc,0x00,0x1f,0xc0,0x0d,0xd1,0x23,0x1c,0x00,0xc7 }},
+ {16, 0x8dd0, 0, {0x00,0x39,0xc0,0x0d,0xf0,0x83,0xfe,0x44,0xed,0x00,0x3b,0xc0,0x0f,0x74,0x03,0xf8 }},
+ {16, 0x8de0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xf9,0x01,0xba,0xc1 }},
+ {16, 0x8df0, 0, {0x0c,0xb0,0x03,0xa1,0x08,0xfa,0x00,0x30,0xc8,0x8f,0x94,0x03,0x25,0x00,0xf9,0x00 }},
+ {16, 0x8e00, 0, {0x3c,0xc0,0x0f,0x04,0x83,0xec,0x00,0xfb,0x00,0x3e,0xe0,0x0f,0x71,0x0b,0x2c,0x40 }},
+ {16, 0x8e10, 0, {0xfd,0x08,0x37,0xc0,0x4e,0x91,0x03,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8e20, 0, {0xc8,0x05,0x3c,0x00,0xb9,0x00,0x23,0xc0,0x08,0x90,0x02,0x24,0x00,0xc8,0x00,0x37 }},
+ {16, 0x8e30, 0, {0xf0,0x0b,0x80,0x01,0x64,0x00,0x49,0x02,0x33,0xc0,0x84,0x9c,0x03,0x3c,0x00,0xbf }},
+ {16, 0x8e40, 0, {0x02,0x0f,0xd0,0x08,0xf4,0x02,0x0e,0x10,0xbd,0x80,0x33,0xe0,0x08,0x90,0x0a,0x32 }},
+ {16, 0x8e50, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb0,0x06,0x20,0xc0 }},
+ {16, 0x8e60, 0, {0x08,0x00,0x42,0x84,0x00,0xa0,0x00,0x20,0xf0,0x0b,0x00,0x22,0xcc,0x00,0x90,0x00 }},
+ {16, 0x8e70, 0, {0x28,0xc0,0x02,0x3d,0x02,0x8c,0x00,0xb3,0x00,0x2c,0xc2,0x9a,0x38,0x02,0x06,0x04 }},
+ {16, 0x8e80, 0, {0xb1,0x12,0x20,0xe0,0x08,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8e90, 0, {0x20,0x01,0x1e,0x00,0xb6,0x80,0x21,0xe0,0x28,0xea,0x02,0x36,0x80,0x86,0x90,0x65 }},
+ {16, 0x8ea0, 0, {0xe0,0x1b,0xda,0x06,0x5e,0x01,0x9e,0x84,0x25,0xec,0x0a,0x78,0x02,0x5e,0x00,0xb7 }},
+ {16, 0x8eb0, 0, {0x80,0x2d,0xe0,0x08,0x79,0x4a,0x16,0x40,0xbd,0x80,0x25,0xe0,0x08,0x38,0x02,0x08 }},
+ {16, 0x8ec0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xfb,0x00,0x28,0xe0 }},
+ {16, 0x8ed0, 0, {0x08,0x18,0x02,0x8a,0x88,0xa1,0xa0,0x20,0xc2,0x1f,0x2a,0x23,0xe6,0xc8,0xf0,0xc0 }},
+ {16, 0x8ee0, 0, {0x3a,0xed,0x4e,0x34,0x02,0x8c,0x08,0xf3,0x81,0x1e,0xc0,0x0e,0x30,0x03,0x0e,0xc0 }},
+ {16, 0x8ef0, 0, {0xf1,0x00,0xb0,0xca,0x0e,0x21,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8f00, 0, {0x40,0x1d,0xbc,0x08,0xfe,0x10,0x3f,0xd2,0x0f,0xe0,0x03,0xec,0x04,0xff,0x14,0x7e }},
+ {16, 0x8f10, 0, {0xc0,0x0f,0xb1,0x23,0xfc,0x01,0xee,0x00,0x3a,0xc4,0x0d,0xb0,0x13,0xbc,0x00,0xff }},
+ {16, 0x8f20, 0, {0x00,0x3f,0xc0,0x0e,0xf0,0x83,0xfc,0x0c,0xfd,0x10,0x3b,0xc0,0x2f,0xe1,0x03,0xd0 }},
+ {16, 0x8f30, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x40,0xf0,0x80,0x32,0xd0 }},
+ {16, 0x8f40, 0, {0x0c,0xa0,0x03,0x6c,0x00,0xf3,0x80,0x32,0xda,0x0f,0xb0,0x03,0xec,0x00,0xfb,0x00 }},
+ {16, 0x8f50, 0, {0x3e,0xcc,0x4c,0x98,0x13,0x2c,0x10,0xfb,0x04,0x3e,0xc4,0x0c,0xf2,0x83,0xa6,0x10 }},
+ {16, 0x8f60, 0, {0xdd,0x20,0x3f,0xd1,0x0c,0xb0,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8f70, 0, {0x48,0x11,0x9c,0x80,0xb7,0x00,0x21,0xc8,0x0c,0x70,0x02,0xdc,0x08,0xb7,0x00,0x21 }},
+ {16, 0x8f80, 0, {0xc8,0x0e,0x70,0x22,0xd8,0x00,0xb7,0x00,0x2c,0xc2,0x0a,0x70,0x0a,0x1f,0x08,0xb7 }},
+ {16, 0x8f90, 0, {0x00,0x39,0xc8,0x0a,0x70,0x02,0x14,0x00,0xc5,0x69,0x2c,0xca,0x2a,0x70,0x02,0xd2 }},
+ {16, 0x8fa0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xbf,0x81,0x64,0xe1 }},
+ {16, 0x8fb0, 0, {0x08,0x78,0x02,0x5a,0x01,0xbf,0x80,0x21,0xec,0x4b,0x78,0x46,0x9f,0x08,0x37,0x80 }},
+ {16, 0x8fc0, 0, {0x2d,0xe8,0x88,0x18,0x02,0x1e,0x81,0xb7,0xb0,0x2d,0xe0,0x09,0x7a,0x02,0x8e,0x00 }},
+ {16, 0x8fd0, 0, {0x95,0xa0,0x2d,0xe4,0x08,0x78,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8fe0, 0, {0x48,0x14,0xec,0x00,0xb3,0x60,0x20,0xc0,0x08,0xb6,0x02,0xcc,0x00,0xb3,0x01,0x20 }},
+ {16, 0x8ff0, 0, {0xc0,0x8a,0xb0,0x86,0xcf,0x00,0xbb,0x10,0x6c,0xc1,0x0a,0x38,0x02,0x0c,0x01,0xb3 }},
+ {16, 0x9000, 0, {0x02,0x28,0xc0,0x0b,0xb0,0x0a,0x0c,0x00,0x81,0x00,0x2e,0xc0,0x0a,0xb4,0x82,0xd2 }},
+ {16, 0x9010, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfe,0x40,0xb6,0x80 }},
+ {16, 0x9020, 0, {0x0c,0xe4,0x03,0x78,0x80,0xfe,0x74,0x32,0x80,0x0b,0xe6,0x03,0xf9,0x00,0xfe,0x00 }},
+ {16, 0x9030, 0, {0x3e,0x80,0x0c,0xe0,0x03,0x28,0x00,0xfa,0x00,0x3e,0x80,0x4d,0xa0,0x03,0xa8,0x00 }},
+ {16, 0x9040, 0, {0xda,0x04,0x3e,0x80,0x0c,0xe4,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9050, 0, {0x48,0x00,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x2e,0x80,0x23,0xe0,0x00,0xf8,0x01,0x3c }},
+ {16, 0x9060, 0, {0x00,0x0e,0x80,0x03,0xe0,0x20,0xf8,0x20,0x3e,0x01,0x8f,0x89,0x03,0xe0,0x00,0xf8 }},
+ {16, 0x9070, 0, {0x00,0x3a,0x10,0x0e,0x80,0x01,0xe0,0x00,0xe8,0x40,0x7e,0x00,0x4f,0x80,0x03,0xd2 }},
+ {16, 0x9080, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x02,0xc9,0x01,0x7e,0x40 }},
+ {16, 0x9090, 0, {0x2c,0x90,0x0b,0x24,0x00,0xf9,0x00,0x3e,0x68,0x05,0x90,0x13,0xa4,0x04,0xd9,0x00 }},
+ {16, 0x90a0, 0, {0x32,0x41,0x0e,0x91,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x60,0x0e,0x90,0x03,0x24,0x00 }},
+ {16, 0x90b0, 0, {0xf1,0x00,0x32,0x40,0x68,0x90,0x43,0x82,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x90c0, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x6e,0x40,0x08,0x90,0x42,0x24,0x00,0xb9,0x00,0x2e }},
+ {16, 0x90d0, 0, {0x70,0x88,0x90,0x03,0x24,0x00,0xb9,0x00,0x22,0x40,0x08,0x98,0x12,0xe4,0x00,0xb9 }},
+ {16, 0x90e0, 0, {0x00,0x2e,0x40,0x0a,0x90,0x0a,0x26,0x00,0xb9,0x80,0xa2,0x40,0x08,0x90,0x12,0x20 }},
+ {16, 0x90f0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x89,0x04,0x2c,0x40 }},
+ {16, 0x9100, 0, {0x08,0x90,0x02,0x24,0x01,0xb9,0x00,0x2a,0x40,0x0b,0xb0,0x02,0xa4,0x01,0xb9,0x00 }},
+ {16, 0x9110, 0, {0xe0,0x40,0x0a,0x90,0x82,0xa4,0x00,0xb9,0x00,0x2c,0x48,0x0a,0x98,0x02,0x24,0x80 }},
+ {16, 0x9120, 0, {0x39,0x20,0x22,0x40,0x2a,0x90,0x02,0x86,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9130, 0, {0x08,0x04,0x04,0x80,0x81,0x00,0x2c,0x48,0x08,0x10,0x12,0x04,0x10,0xb1,0x04,0x2c }},
+ {16, 0x9140, 0, {0xd8,0x0a,0x10,0x02,0x04,0x00,0xb1,0x00,0x20,0x48,0x08,0x10,0x02,0xc4,0x80,0xb1 }},
+ {16, 0x9150, 0, {0x22,0x2c,0x50,0x8a,0x32,0x82,0x05,0xa0,0xb1,0x2a,0x20,0x4a,0x0a,0x12,0x82,0x02 }},
+ {16, 0x9160, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x50,0xc8,0x52,0x2e,0x14 }},
+ {16, 0x9170, 0, {0x0c,0x85,0x03,0x21,0x40,0xf8,0x50,0x3a,0x00,0x1f,0x85,0x03,0xa1,0x40,0xf8,0x50 }},
+ {16, 0x9180, 0, {0x32,0x14,0x0e,0x80,0x03,0xa1,0x40,0xf8,0x50,0x3c,0x80,0x0e,0x02,0x03,0x20,0x80 }},
+ {16, 0x9190, 0, {0xfa,0x20,0x32,0x08,0x0e,0x82,0x13,0xae,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x91a0, 0, {0x98,0x1d,0xe4,0x50,0xfd,0x00,0x3e,0x44,0x0f,0xd0,0x03,0xf4,0x00,0xfd,0x00,0x3e }},
+ {16, 0x91b0, 0, {0x44,0x8d,0xd0,0x01,0xbd,0x00,0xfd,0x02,0x3e,0x44,0x0f,0xd4,0x00,0xe4,0x48,0x79 }},
+ {16, 0x91c0, 0, {0x14,0x3e,0x50,0x0f,0x92,0xa2,0xf4,0x08,0xfd,0x00,0x3e,0x4a,0x0d,0xd2,0x83,0xe6 }},
+ {16, 0x91d0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe7,0x00,0xf9,0x10,0x3a,0x6e }},
+ {16, 0x91e0, 0, {0x0c,0xb1,0x03,0xe4,0x40,0xf9,0x44,0x3b,0x61,0x8e,0x94,0x03,0xe4,0x00,0xe9,0x40 }},
+ {16, 0x91f0, 0, {0x32,0x66,0x0f,0xda,0x0b,0xa7,0x28,0xc9,0xe0,0x3f,0x68,0x0c,0xda,0x83,0xb3,0x20 }},
+ {16, 0x9200, 0, {0xed,0xa0,0x33,0x79,0x08,0xd8,0x03,0x46,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9210, 0, {0x38,0x10,0xe2,0x00,0xb8,0xa0,0x2e,0x38,0x08,0x8a,0x02,0xe2,0x88,0xe8,0x81,0x2e }},
+ {16, 0x9220, 0, {0x14,0x09,0x0a,0x03,0xe2,0x80,0xb8,0x80,0x32,0x30,0x0b,0x85,0x02,0x21,0x01,0xa8 }},
+ {16, 0x9230, 0, {0xf4,0x38,0x2a,0x08,0x0e,0xca,0x23,0x90,0xc8,0x54,0x34,0x38,0x08,0x8a,0x92,0x0e }},
+ {16, 0x9240, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb1,0x00,0x28,0x40 }},
+ {16, 0x9250, 0, {0x19,0x10,0x02,0xc4,0x00,0xb1,0x20,0x28,0x40,0x0b,0x10,0x06,0xc4,0x20,0xa1,0xa2 }},
+ {16, 0x9260, 0, {0x6c,0x48,0x0b,0x10,0x02,0x84,0x08,0x81,0x20,0x2c,0x50,0x09,0x10,0x02,0xc4,0x04 }},
+ {16, 0x9270, 0, {0xb1,0x00,0x24,0x58,0x08,0x3c,0x02,0x42,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9280, 0, {0x18,0x15,0xa4,0x01,0xb9,0x20,0x2c,0x40,0x09,0x90,0x02,0xe4,0x10,0xa9,0x40,0x2e }},
+ {16, 0x9290, 0, {0x40,0x0b,0x90,0x02,0xa4,0x00,0xb1,0x01,0x2a,0x40,0x0b,0x94,0x02,0x24,0x00,0xa9 }},
+ {16, 0x92a0, 0, {0x00,0x2a,0x40,0x01,0x10,0x52,0x64,0x00,0x89,0x00,0x26,0x40,0x00,0x98,0x02,0x46 }},
+ {16, 0x92b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0x61,0x3a,0x40 }},
+ {16, 0x92c0, 0, {0x0d,0x90,0x83,0xe5,0x20,0xf9,0x01,0x3a,0x40,0x2e,0x90,0x02,0xe4,0x40,0xe9,0x01 }},
+ {16, 0x92d0, 0, {0x9e,0x40,0x0f,0x94,0x03,0xa4,0x00,0x89,0x00,0x3e,0x40,0x2d,0x90,0x02,0xe6,0x08 }},
+ {16, 0x92e0, 0, {0xb9,0x01,0x36,0x40,0x2c,0x90,0x01,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x92f0, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0x3e,0x40,0x2e,0x90,0x03,0xe4,0x80,0xf9,0x00,0x3c }},
+ {16, 0x9300, 0, {0x40,0x0c,0x9c,0x23,0xe4,0x00,0xf9,0x00,0x36,0x40,0x0f,0x10,0x43,0x84,0x00,0xf9 }},
+ {16, 0x9310, 0, {0x02,0x3e,0x40,0x0e,0x90,0x03,0x80,0x80,0xf9,0x00,0x3c,0x40,0x2f,0x90,0x03,0x8a }},
+ {16, 0x9320, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xc8,0x40,0x36,0x01 }},
+ {16, 0x9330, 0, {0x0d,0x84,0x03,0xe1,0x00,0xe8,0x40,0x3e,0x08,0x0c,0x80,0x03,0xe1,0x00,0xf8,0x00 }},
+ {16, 0x9340, 0, {0x32,0x00,0x8f,0x80,0x03,0xa0,0x10,0xf8,0x00,0x32,0x04,0x0e,0x80,0x83,0x60,0x00 }},
+ {16, 0x9350, 0, {0xf8,0x00,0x3e,0x00,0x0c,0x00,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9360, 0, {0x28,0x05,0x28,0x00,0x8a,0x01,0x22,0x80,0x08,0xa0,0x24,0xe8,0x00,0x0a,0x00,0x2f }},
+ {16, 0x9370, 0, {0x80,0x1a,0xa0,0x02,0x28,0x00,0xba,0x00,0x16,0x80,0x0b,0xe0,0x03,0x28,0x08,0xea }},
+ {16, 0x9380, 0, {0x00,0x33,0x90,0x08,0xec,0x1b,0x22,0x80,0xc6,0x14,0x2f,0x91,0x08,0xa0,0x43,0x4a }},
+ {16, 0x9390, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x93,0x00,0x24,0xc0 }},
+ {16, 0x93a0, 0, {0x09,0x30,0x12,0xcc,0x04,0xa3,0x04,0x6c,0xc0,0x09,0x30,0x02,0x8c,0x00,0xb3,0x00 }},
+ {16, 0x93b0, 0, {0x2c,0xc0,0x13,0x30,0x02,0x8c,0x00,0xb3,0x00,0xe6,0xb8,0x0a,0x38,0x02,0x44,0x08 }},
+ {16, 0x93c0, 0, {0x82,0x50,0x2c,0xd2,0x3a,0x30,0x02,0x8a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x93d0, 0, {0xa0,0x01,0x0e,0x80,0x97,0xb4,0x21,0xc4,0x49,0x71,0x02,0xde,0x81,0x87,0x21,0x2d }},
+ {16, 0x93e0, 0, {0xd0,0x0b,0x7b,0x02,0x1c,0x01,0xbf,0x20,0x29,0xc4,0x0b,0x30,0x02,0x5c,0x00,0xa7 }},
+ {16, 0x93f0, 0, {0xa1,0x21,0xc0,0x4a,0x70,0x8a,0x0c,0x81,0x84,0x00,0x2d,0xd0,0x0a,0x50,0x02,0xe8 }},
+ {16, 0x9400, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x82,0xdf,0xa0,0x34,0xec }},
+ {16, 0x9410, 0, {0x0d,0x79,0x02,0xfe,0x80,0xe7,0xe8,0x2f,0xa0,0x09,0x7a,0x02,0x9e,0x00,0xf7,0xa2 }},
+ {16, 0x9420, 0, {0x25,0xea,0x0b,0x48,0x03,0x9e,0x04,0xff,0xc0,0x65,0xe4,0x0e,0x68,0x03,0x5f,0x00 }},
+ {16, 0x9430, 0, {0xe4,0x80,0x3d,0xe0,0x0e,0xf8,0x03,0xaa,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9440, 0, {0x08,0x1d,0xac,0x48,0xeb,0x05,0x3e,0xd9,0x0e,0xb2,0x03,0xec,0x00,0xfb,0x60,0x3e }},
+ {16, 0x9450, 0, {0xc0,0x0e,0xb2,0x83,0xac,0x00,0xf3,0x50,0xa6,0xc0,0x4f,0xb0,0x03,0xac,0x00,0xfb }},
+ {16, 0x9460, 0, {0x80,0x3f,0xd8,0x0d,0xa0,0x03,0xec,0x0a,0xf9,0x00,0x3e,0xc0,0x0d,0x90,0x03,0x42 }},
+ {16, 0x9470, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xbb,0x90,0x3e,0xe0 }},
+ {16, 0x9480, 0, {0x08,0x39,0x03,0x9e,0x20,0xcf,0x82,0x77,0xe0,0x1f,0xf8,0x03,0xee,0x00,0xff,0xc0 }},
+ {16, 0x9490, 0, {0x3f,0xe5,0x0d,0xf9,0x03,0xee,0x00,0xfb,0x90,0x37,0xa0,0x08,0xf8,0x0f,0x1e,0x00 }},
+ {16, 0x94a0, 0, {0xcc,0x94,0x33,0x60,0x0d,0xf8,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x94b0, 0, {0xa8,0x11,0x9c,0x00,0xb7,0x90,0x2f,0xe4,0x08,0x7a,0x02,0x1e,0x00,0x8f,0x12,0x25 }},
+ {16, 0x94c0, 0, {0xd8,0x0b,0xbb,0x02,0x1e,0x00,0xb7,0x00,0x2d,0xe8,0x08,0x7d,0x82,0xde,0x40,0xbb }},
+ {16, 0x94d0, 0, {0xa0,0x27,0x90,0x0a,0x76,0x02,0x5c,0x80,0x85,0x00,0x37,0xc4,0x4d,0x71,0x03,0xea }},
+ {16, 0x94e0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xb7,0x20,0x2d,0xc0 }},
+ {16, 0x94f0, 0, {0x29,0xf2,0x22,0xbc,0x80,0x97,0x00,0x25,0x41,0x0b,0x70,0x12,0x9c,0x00,0xb7,0x08 }},
+ {16, 0x9500, 0, {0x29,0xc0,0x08,0x42,0x12,0xdc,0x40,0xb7,0x00,0x29,0xc0,0x09,0x60,0x22,0xdc,0x10 }},
+ {16, 0x9510, 0, {0x80,0x00,0x21,0x40,0x09,0x70,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9520, 0, {0x20,0x14,0xcc,0x00,0xb3,0xc0,0x2e,0xc0,0x08,0x34,0x82,0x2d,0x00,0x93,0x00,0x24 }},
+ {16, 0x9530, 0, {0xc0,0x0b,0x30,0x02,0x0f,0x80,0x13,0x00,0x2c,0xc0,0x0a,0x34,0xa2,0xec,0x00,0xb3 }},
+ {16, 0x9540, 0, {0x00,0x28,0xc0,0x0b,0x00,0x02,0xcc,0x00,0x81,0x00,0x20,0xc0,0x09,0x30,0x02,0x89 }},
+ {16, 0x9550, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xbc,0x00,0xff,0xe0,0x3f,0xc0 }},
+ {16, 0x9560, 0, {0x0c,0xf4,0x83,0xbd,0x00,0xdf,0x08,0x36,0x40,0x0b,0x75,0x42,0xfc,0x20,0xff,0x80 }},
+ {16, 0x9570, 0, {0x3b,0xc0,0x2c,0x3c,0x03,0xfc,0x00,0xbf,0x00,0xbe,0xc0,0x8d,0x90,0x0b,0xac,0x02 }},
+ {16, 0x9580, 0, {0xca,0x00,0x22,0x80,0x0d,0xb0,0x02,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9590, 0, {0x80,0x00,0xec,0x00,0xfb,0x08,0x1e,0xc0,0x0f,0xb0,0x13,0xec,0x00,0xeb,0x00,0x3a }},
+ {16, 0x95a0, 0, {0x10,0x0f,0xb0,0x23,0xac,0x01,0xfb,0x00,0x3e,0xc0,0x3c,0x84,0x03,0xec,0x00,0xfb }},
+ {16, 0x95b0, 0, {0x00,0x26,0x40,0x0e,0x94,0x0b,0x2c,0x00,0xf9,0x40,0x3e,0x90,0x0e,0x90,0x13,0xe0 }},
+ {16, 0x95c0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x02,0xcf,0x00,0x3f,0xc0 }},
+ {16, 0x95d0, 0, {0x0d,0xf0,0x0b,0x3c,0x20,0xcf,0x00,0x3d,0x00,0x0e,0xf0,0x07,0x9c,0x01,0xcf,0x02 }},
+ {16, 0x95e0, 0, {0x3e,0xc0,0x0f,0xc4,0x03,0x3c,0x00,0xcf,0x00,0x0f,0xc0,0x0e,0x44,0x03,0x1f,0x02 }},
+ {16, 0x95f0, 0, {0xcc,0x00,0x3f,0x80,0x2c,0x70,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9600, 0, {0x81,0x04,0x6c,0x00,0x8b,0x02,0x2e,0xc0,0x0d,0xb0,0x02,0x2c,0x00,0xab,0x00,0x06 }},
+ {16, 0x9610, 0, {0x20,0x08,0xb0,0x03,0xfc,0x00,0xab,0x00,0x2e,0xc0,0x0f,0x80,0x06,0xbc,0x00,0xab }},
+ {16, 0x9620, 0, {0x04,0x3a,0xf0,0x0c,0x88,0x02,0x2c,0x00,0xc9,0x80,0x3a,0x92,0x08,0x90,0x0a,0xa0 }},
+ {16, 0x9630, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xab,0x00,0x2e,0xc0 }},
+ {16, 0x9640, 0, {0x09,0x30,0x02,0x2c,0x00,0x8b,0x00,0x26,0x60,0x0b,0xb0,0x02,0xac,0x00,0x8b,0x00 }},
+ {16, 0x9650, 0, {0x6e,0xc0,0x0b,0xb0,0x42,0x2c,0x00,0x9b,0x00,0x4c,0xe0,0x0a,0x90,0x22,0x2c,0x00 }},
+ {16, 0x9660, 0, {0x8a,0xc2,0x2c,0x40,0x08,0xb0,0x42,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9670, 0, {0x08,0x04,0x0c,0x00,0x83,0x0d,0x2c,0xc6,0x09,0x31,0x02,0x0d,0x81,0xa3,0x11,0x24 }},
+ {16, 0x9680, 0, {0x00,0x8a,0xb1,0xe2,0x4c,0x80,0xa3,0x00,0x2c,0xcc,0x0b,0x02,0x02,0x8c,0x80,0xa3 }},
+ {16, 0x9690, 0, {0x48,0x08,0xc0,0x08,0x00,0x0a,0x0d,0x00,0x81,0x00,0x28,0xc0,0x08,0x30,0x02,0x82 }},
+ {16, 0x96a0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xcb,0x20,0x2f,0xc8 }},
+ {16, 0x96b0, 0, {0x8d,0xf6,0x13,0x2d,0xb0,0x8f,0x00,0x36,0x40,0x0f,0xf0,0x02,0xad,0xa8,0x8f,0x10 }},
+ {16, 0x96c0, 0, {0x3f,0xca,0x0b,0x80,0x92,0x2c,0x10,0xdb,0x40,0x3f,0xc0,0x0e,0x00,0x03,0x2d,0x04 }},
+ {16, 0x96d0, 0, {0xc8,0x02,0x3e,0x40,0x0c,0xb0,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x96e0, 0, {0xa0,0x1d,0xfc,0x00,0xff,0x00,0x3f,0xc8,0x0e,0xf1,0x03,0xec,0x84,0xff,0x20,0x37 }},
+ {16, 0x96f0, 0, {0x00,0x0d,0xb2,0x03,0xbc,0xa0,0xff,0x00,0x3e,0xc9,0x0e,0x80,0x03,0xfd,0x11,0xff }},
+ {16, 0x9700, 0, {0x00,0x3b,0xc0,0x0e,0xc0,0x03,0xfc,0x80,0xed,0x00,0x3b,0xc0,0x0f,0xf0,0x43,0x68 }},
+ {16, 0x9710, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,0x90,0xcc,0x92,0x3b,0xc8 }},
+ {16, 0x9720, 0, {0x0d,0xf0,0x83,0x73,0x10,0xff,0x28,0x37,0xca,0x4f,0xb2,0x03,0xfc,0x00,0xdf,0x20 }},
+ {16, 0x9730, 0, {0xb3,0xc4,0x0d,0x68,0x43,0xfe,0x14,0xcb,0x84,0x33,0xe0,0x0d,0x78,0x03,0xbe,0x00 }},
+ {16, 0x9740, 0, {0xff,0x80,0x37,0xa0,0x0c,0xf3,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9750, 0, {0x80,0x00,0xfc,0x48,0x82,0x21,0x03,0xf4,0x0f,0xf6,0x42,0x20,0x04,0x8a,0x60,0x2b }},
+ {16, 0x9760, 0, {0xda,0x0b,0xf9,0x02,0x3f,0x04,0x8f,0x52,0x23,0xd5,0x4d,0x88,0x02,0xae,0x00,0xdb }},
+ {16, 0x9770, 0, {0x80,0x36,0xc0,0x08,0x80,0x02,0x20,0x04,0xb8,0x00,0x22,0x60,0x0d,0x74,0x03,0xe0 }},
+ {16, 0x9780, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0xa0,0x80,0x01,0x08,0xc0 }},
+ {16, 0x9790, 0, {0x4b,0x30,0x82,0x42,0x90,0xa3,0x08,0x2c,0xc8,0x1a,0x30,0x22,0x8d,0x00,0x93,0x00 }},
+ {16, 0x97a0, 0, {0x24,0xc8,0x09,0xa0,0x12,0x0c,0x04,0xab,0x00,0x62,0xc0,0x09,0xb0,0x02,0xcc,0x00 }},
+ {16, 0x97b0, 0, {0xb3,0x00,0x28,0x80,0x08,0x36,0x06,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x97c0, 0, {0xc0,0x15,0xac,0x00,0x88,0x08,0x22,0xc0,0x0a,0x30,0x1a,0x00,0x11,0x82,0x00,0x0a }},
+ {16, 0x97d0, 0, {0xc0,0x0b,0xb0,0x42,0x2c,0x00,0x8b,0x00,0x26,0xc0,0x09,0x91,0x02,0xec,0x20,0xbb }},
+ {16, 0x97e0, 0, {0x28,0x66,0xc0,0x08,0x80,0x02,0x60,0x00,0xb8,0x00,0x2a,0x40,0x81,0xb0,0x06,0xf8 }},
+ {16, 0x97f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0xec,0x02,0xc8,0x04,0x3a,0xc0 }},
+ {16, 0x9800, 0, {0x89,0xb0,0x03,0x68,0x00,0xe9,0xc1,0x1e,0xc1,0x0e,0x30,0x03,0xec,0x00,0xdb,0x00 }},
+ {16, 0x9810, 0, {0x36,0xc1,0x0d,0x00,0x23,0x0e,0x00,0xeb,0x80,0x32,0xc8,0xcd,0x30,0x32,0xec,0x08 }},
+ {16, 0x9820, 0, {0xf3,0x00,0x3c,0x80,0x0c,0xb0,0x06,0x80,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9830, 0, {0xe0,0x01,0x9c,0x00,0x7c,0x00,0x3f,0xc0,0x0b,0xb0,0x43,0xfd,0x00,0xbe,0xc4,0x37 }},
+ {16, 0x9840, 0, {0xc0,0x1f,0xf0,0x03,0x5c,0x00,0xff,0x01,0x3b,0xc0,0x0e,0xc8,0x03,0xbf,0x20,0xdf }},
+ {16, 0x9850, 0, {0x00,0x3f,0xd0,0x0f,0xc0,0x13,0xb0,0x00,0x7c,0x00,0xb7,0x40,0x0f,0xf0,0x1b,0xb0 }},
+ {16, 0x9860, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x0c,0xd8,0x41,0x32,0xc0 }},
+ {16, 0x9870, 0, {0x0e,0xb0,0x07,0xa8,0x01,0x69,0x40,0xb2,0xc0,0x8d,0xb0,0xa3,0xec,0x08,0xf3,0x00 }},
+ {16, 0x9880, 0, {0x32,0xc0,0x0f,0x80,0x03,0xed,0x00,0xfb,0x48,0x3a,0xc0,0x0d,0xb0,0x83,0x2c,0x00 }},
+ {16, 0x9890, 0, {0xfb,0x20,0x3e,0x80,0x0f,0x70,0x23,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x98a0, 0, {0xc8,0x05,0x3c,0x00,0x88,0x00,0x23,0xc0,0x08,0xf0,0x06,0x2c,0x10,0x88,0x51,0x37 }},
+ {16, 0x98b0, 0, {0xc0,0x08,0xf0,0x07,0x7d,0x60,0x8f,0x02,0x37,0xc0,0x0b,0x8c,0x00,0x2d,0x00,0xb3 }},
+ {16, 0x98c0, 0, {0x00,0x38,0xc0,0x08,0x80,0x82,0x20,0x00,0xb8,0x00,0x2e,0x50,0x0b,0xf0,0x00,0x32 }},
+ {16, 0x98d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0x98,0x00,0x28,0xc0 }},
+ {16, 0x98e0, 0, {0x0a,0x30,0x02,0x84,0x04,0xa3,0x00,0x00,0xc0,0x68,0x39,0x06,0x0c,0x10,0x93,0x20 }},
+ {16, 0x98f0, 0, {0x22,0xc0,0x9b,0x01,0xa0,0x8f,0x14,0x33,0x14,0x28,0xc0,0x09,0x3c,0x02,0x0c,0x01 }},
+ {16, 0x9900, 0, {0x93,0x40,0x2c,0x88,0x0b,0x30,0x02,0xb8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9910, 0, {0x60,0x01,0x1e,0x10,0x87,0x80,0x29,0xe0,0x08,0x78,0x02,0x3e,0x00,0x83,0x90,0x24 }},
+ {16, 0x9920, 0, {0xe0,0x08,0x78,0x10,0xce,0x04,0x07,0x91,0x25,0xe0,0x83,0xc9,0x02,0x1e,0x04,0xb7 }},
+ {16, 0x9930, 0, {0x84,0x2b,0xa4,0x08,0x48,0x42,0x12,0xcc,0xb4,0x80,0x2d,0x64,0x0b,0x78,0x02,0x19 }},
+ {16, 0x9940, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x2c,0x00,0xd0,0x10,0x28,0xc8 }},
+ {16, 0x9950, 0, {0x0e,0x3b,0x02,0x84,0x00,0xe3,0x40,0x30,0xc8,0x0c,0x38,0x62,0x8c,0x00,0x53,0x00 }},
+ {16, 0x9960, 0, {0x30,0xc4,0x1f,0x00,0x23,0x8c,0x3c,0xf3,0x80,0x18,0xc0,0x0d,0x30,0x03,0x0e,0x80 }},
+ {16, 0x9970, 0, {0xd3,0x10,0x3c,0x80,0x0f,0x30,0x03,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9980, 0, {0x40,0x1d,0xbd,0x00,0xf9,0x12,0xb4,0xc0,0x07,0xb0,0x03,0xcc,0x00,0x4a,0x00,0x77 }},
+ {16, 0x9990, 0, {0xc0,0x0e,0x71,0x43,0x6c,0x00,0xf3,0x00,0x3f,0xd0,0x1f,0xd0,0x53,0xac,0x68,0xfb }},
+ {16, 0x99a0, 0, {0x18,0x3d,0xc0,0x0f,0xc0,0x13,0xf0,0x50,0xfc,0x04,0x3f,0x40,0x0f,0xf4,0x03,0x90 }},
+ {16, 0x99b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xed,0x40,0xf8,0x04,0x3e,0xd2 }},
+ {16, 0x99c0, 0, {0x0f,0xb3,0x13,0xe0,0x10,0xf9,0x00,0xb2,0xcc,0x0e,0xba,0x03,0x6d,0x80,0xdb,0x02 }},
+ {16, 0x99d0, 0, {0x32,0xdc,0x4f,0x00,0x03,0x6c,0x04,0xf3,0x02,0x36,0x40,0x0e,0xb0,0x03,0xcc,0x00 }},
+ {16, 0x99e0, 0, {0x4b,0x00,0x3c,0x80,0x0c,0xf1,0x03,0x62,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x99f0, 0, {0x48,0x11,0x9c,0x00,0xb4,0x00,0x2d,0xc9,0x0b,0x70,0x82,0xdc,0x00,0xbc,0x04,0x21 }},
+ {16, 0x9a00, 0, {0xc4,0x4b,0x37,0x02,0x0c,0xa0,0x8f,0x74,0x21,0xc0,0x0b,0x40,0x02,0x1c,0x81,0xb7 }},
+ {16, 0x9a10, 0, {0x20,0x2b,0xc0,0x08,0x40,0x02,0xd0,0x02,0x84,0x00,0x2d,0x40,0x0a,0xf2,0x02,0x12 }},
+ {16, 0x9a20, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x80,0xb4,0xc0,0x2d,0xe4 }},
+ {16, 0x9a30, 0, {0x0b,0x7a,0x02,0xd2,0x00,0xb5,0x88,0x21,0xe8,0x0a,0x78,0x02,0xde,0x40,0x97,0x00 }},
+ {16, 0x9a40, 0, {0x21,0xe8,0x0b,0xcc,0x46,0x5e,0x28,0xb7,0xc4,0x21,0xf0,0x0a,0x78,0x02,0xfe,0x08 }},
+ {16, 0x9a50, 0, {0x97,0x84,0x2d,0xa0,0x08,0x78,0x02,0x70,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9a60, 0, {0x08,0x14,0xcc,0x00,0xb0,0xc0,0x2c,0xc0,0x9b,0xb0,0x02,0xcc,0x20,0xb3,0x60,0x22 }},
+ {16, 0x9a70, 0, {0xc0,0x0b,0x30,0x02,0x8c,0x00,0x83,0x01,0x20,0xc0,0x1b,0x06,0x16,0x4f,0x00,0xb3 }},
+ {16, 0x9a80, 0, {0xa0,0x2a,0xf0,0x08,0x00,0x02,0xe0,0x00,0x90,0x00,0x2c,0x40,0x0a,0x30,0x02,0x02 }},
+ {16, 0x9a90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x10,0xfe,0xc0,0x3e,0x80 }},
+ {16, 0x9aa0, 0, {0x0f,0xa0,0x03,0xf9,0x08,0xfe,0x40,0x22,0x80,0x0e,0xa0,0x03,0xe8,0x00,0xd2,0x00 }},
+ {16, 0x9ab0, 0, {0x32,0x80,0x8f,0xe0,0x03,0x58,0x00,0xf6,0x00,0x33,0xb0,0x0e,0x20,0x02,0xe8,0x0c }},
+ {16, 0x9ac0, 0, {0xd2,0x02,0x3c,0x80,0x0c,0xa0,0x03,0x7a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9ad0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x20,0x3e,0x01,0x0b,0x80,0x03,0xe0,0x00,0xf0,0x40,0x3e }},
+ {16, 0x9ae0, 0, {0x00,0x57,0x80,0x23,0x00,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x84,0x03,0xa0,0x30,0x38 }},
+ {16, 0x9af0, 0, {0x00,0x3a,0x08,0x0f,0xc4,0x03,0xf0,0x00,0xec,0x00,0x3f,0x10,0x0f,0x80,0x03,0xd2 }},
+ {16, 0x9b00, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xd9,0x01,0x3c,0x48 }},
+ {16, 0x9b10, 0, {0x4c,0x90,0x0b,0x24,0x01,0xc9,0xc0,0x32,0x40,0xac,0x90,0x03,0xe4,0x00,0xd9,0x40 }},
+ {16, 0x9b20, 0, {0x30,0x40,0x0d,0x9a,0x03,0x22,0x84,0xc8,0x14,0x32,0x40,0x0e,0x90,0x03,0x24,0x00 }},
+ {16, 0x9b30, 0, {0xc9,0x00,0x82,0x68,0x2c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9b40, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x2e,0x40,0x08,0x90,0x22,0x24,0x00,0x89,0x02,0x82 }},
+ {16, 0x9b50, 0, {0x40,0x08,0x90,0x02,0xe7,0x40,0x89,0x80,0x36,0x41,0x8d,0x18,0x02,0xa0,0x24,0xa8 }},
+ {16, 0x9b60, 0, {0x04,0x62,0x40,0x08,0x94,0x83,0x24,0x00,0x89,0x01,0x22,0x72,0x08,0x90,0x0b,0x20 }},
+ {16, 0x9b70, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x04,0x00,0x99,0x00,0x2a,0x40 }},
+ {16, 0x9b80, 0, {0x28,0x90,0x12,0x04,0x00,0x89,0x00,0x22,0x40,0x08,0x90,0x02,0xa4,0x20,0x99,0x00 }},
+ {16, 0x9b90, 0, {0x22,0x40,0x18,0x90,0x06,0x20,0x01,0x88,0x08,0x62,0x40,0x0a,0x90,0x02,0x34,0x10 }},
+ {16, 0x9ba0, 0, {0x8d,0x81,0x23,0x41,0x08,0x10,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9bb0, 0, {0x08,0x04,0x04,0x80,0x81,0x04,0x2c,0x48,0x08,0x12,0x02,0x04,0x02,0x83,0x20,0x20 }},
+ {16, 0x9bc0, 0, {0x48,0x08,0x12,0x02,0xc4,0x80,0x83,0x60,0x24,0x48,0x19,0x34,0x62,0xa5,0x04,0xa1 }},
+ {16, 0x9bd0, 0, {0x02,0x60,0x40,0x08,0xd0,0x02,0x54,0x00,0x8d,0x00,0x29,0x40,0x08,0x12,0x82,0x02 }},
+ {16, 0x9be0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xd8,0x50,0x3a,0x80 }},
+ {16, 0x9bf0, 0, {0x0c,0x85,0x02,0x21,0x44,0x88,0x50,0x32,0x14,0x4c,0x80,0x43,0xe0,0x00,0xd8,0x00 }},
+ {16, 0x9c00, 0, {0x22,0x14,0x0c,0x80,0x03,0x20,0x00,0xc8,0x00,0xa2,0x00,0x0e,0x80,0x03,0x20,0x00 }},
+ {16, 0x9c10, 0, {0xc8,0x00,0x33,0x00,0x0c,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9c20, 0, {0x98,0x1d,0xe4,0x44,0xfd,0x00,0x3e,0x44,0x0f,0x91,0x03,0xf4,0x10,0xff,0x10,0x3e }},
+ {16, 0x9c30, 0, {0x44,0x0f,0x91,0x03,0xe4,0x40,0xf9,0x10,0x3e,0x44,0x0b,0xf0,0x13,0xe5,0x10,0xf9 }},
+ {16, 0x9c40, 0, {0x40,0x3f,0x4a,0x2f,0x92,0x8a,0xa4,0xa2,0xf9,0x28,0x36,0x40,0x0f,0x92,0x83,0xa6 }},
+ {16, 0x9c50, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xe6,0xc0,0xc1,0x00,0x3f,0x69 }},
+ {16, 0x9c60, 0, {0x0c,0x9a,0x43,0x6c,0x00,0xfd,0xa0,0x3e,0x78,0x2c,0xd8,0x07,0xd6,0x02,0xd5,0x96 }},
+ {16, 0x9c70, 0, {0x32,0x78,0x0d,0x90,0x03,0x27,0x00,0xfd,0xa0,0x35,0x50,0x06,0xd4,0x03,0xe5,0x00 }},
+ {16, 0x9c80, 0, {0xfd,0x40,0xb3,0x40,0x0f,0x98,0xa3,0x46,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9c90, 0, {0x38,0x10,0xe3,0xc2,0x88,0x88,0x2e,0x14,0xa8,0x8a,0xc2,0x22,0xa0,0xb8,0xc0,0x2c }},
+ {16, 0x9ca0, 0, {0x24,0x48,0x84,0x02,0xe1,0x00,0x98,0xc4,0x20,0x3c,0x08,0x8a,0x82,0x23,0x80,0xb8 }},
+ {16, 0x9cb0, 0, {0x04,0x22,0x20,0x08,0x88,0x03,0xa2,0x00,0xb8,0xa0,0x22,0x00,0x0b,0x88,0x02,0x0e }},
+ {16, 0x9cc0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x80,0xa1,0x20,0x6c,0x40 }},
+ {16, 0x9cd0, 0, {0x0a,0x14,0x02,0x44,0x04,0xa1,0x68,0x2c,0x48,0x08,0x14,0x02,0xc5,0x00,0x81,0x60 }},
+ {16, 0x9ce0, 0, {0x20,0x48,0x19,0x90,0x02,0x85,0x81,0xb1,0x40,0x24,0x68,0x0a,0x12,0x42,0xc4,0x80 }},
+ {16, 0x9cf0, 0, {0xb9,0x20,0x20,0x40,0x8b,0x10,0x82,0x42,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9d00, 0, {0x18,0x05,0xa4,0x10,0xa9,0x00,0x6e,0xc0,0x0a,0x10,0x02,0x24,0x14,0xb9,0x00,0x2e }},
+ {16, 0x9d10, 0, {0x40,0x08,0x90,0x12,0xe4,0x00,0x99,0x00,0x22,0x40,0x08,0x80,0x06,0xa0,0x60,0xb9 }},
+ {16, 0x9d20, 0, {0x09,0x22,0x60,0x08,0x90,0x02,0xa4,0x00,0xb9,0x00,0x02,0x40,0x0b,0x10,0x06,0x06 }},
+ {16, 0x9d30, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe4,0x00,0xe9,0x80,0x3e,0x41 }},
+ {16, 0x9d40, 0, {0x0e,0x90,0x03,0x64,0x00,0xe9,0xc0,0x3e,0x40,0x0c,0x90,0x02,0xe4,0x00,0xc9,0x00 }},
+ {16, 0x9d50, 0, {0x22,0x41,0x0d,0x80,0x02,0xa3,0x04,0xf1,0x40,0x36,0x40,0x0e,0x90,0x02,0xe4,0x00 }},
+ {16, 0x9d60, 0, {0xf1,0x00,0x12,0x40,0x0f,0x90,0x03,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9d70, 0, {0x28,0x01,0xa4,0x00,0xd9,0x22,0x3e,0x42,0x0d,0x90,0x03,0xe4,0x00,0xb9,0xc4,0x3c }},
+ {16, 0x9d80, 0, {0x40,0x0f,0x90,0x03,0xe4,0x00,0xe9,0x02,0xae,0x40,0x0f,0x80,0x4b,0x62,0x10,0xf9 }},
+ {16, 0x9d90, 0, {0x20,0x3e,0x40,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x02,0x7e,0x41,0x0f,0x90,0x13,0xca }},
+ {16, 0x9da0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0x80,0x00,0xc8,0x00,0x38,0x00 }},
+ {16, 0x9db0, 0, {0x0f,0x80,0x20,0xe0,0x00,0xa8,0x20,0x32,0x00,0x0c,0x80,0x07,0xe0,0x80,0xc8,0x00 }},
+ {16, 0x9dc0, 0, {0x38,0x00,0x0d,0x80,0x83,0x21,0x10,0xf8,0x60,0x32,0x00,0x8e,0x80,0xb3,0x20,0x08 }},
+ {16, 0x9dd0, 0, {0xf8,0x00,0x3e,0x00,0x0c,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9de0, 0, {0x28,0x05,0x28,0x04,0x8a,0x00,0x33,0x90,0x43,0xa0,0x22,0x28,0x00,0x8e,0x80,0x76 }},
+ {16, 0x9df0, 0, {0x80,0x08,0xe1,0x03,0x19,0x00,0x86,0x80,0x22,0x80,0x0d,0x60,0x01,0x78,0x00,0xbe }},
+ {16, 0x9e00, 0, {0x00,0x36,0x80,0x0c,0xe4,0x02,0xa8,0x10,0xbe,0xa0,0x2f,0x80,0x0d,0xa0,0x02,0x0a }},
+ {16, 0x9e10, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x11,0x4c,0x04,0x03,0x04,0x2c,0xd4 }},
+ {16, 0x9e20, 0, {0x0b,0x30,0x02,0x4c,0x01,0xa3,0xc4,0x20,0xc0,0x28,0x35,0x02,0x86,0x00,0x83,0x80 }},
+ {16, 0x9e30, 0, {0x28,0xc0,0x08,0x38,0x06,0x0e,0x94,0x30,0xc0,0xa2,0xc0,0x0b,0x3c,0x02,0x0c,0x00 }},
+ {16, 0x9e40, 0, {0xb3,0x80,0x2c,0x48,0x08,0x30,0x02,0x8a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9e50, 0, {0xa0,0x01,0x0c,0x04,0x8f,0x80,0x21,0xc1,0x1b,0x72,0x42,0x1e,0xc0,0x83,0x88,0x21 }},
+ {16, 0x9e60, 0, {0xc0,0x18,0x28,0x06,0x10,0x21,0x86,0x38,0x21,0xc0,0x19,0xf7,0x02,0x5d,0xc0,0xb4 }},
+ {16, 0x9e70, 0, {0x41,0x27,0xd0,0x08,0x78,0xc6,0x9c,0x00,0xb7,0x00,0x2f,0x60,0x09,0x72,0x02,0x28 }},
+ {16, 0x9e80, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x02,0xc7,0x80,0x2d,0xa0 }},
+ {16, 0x9e90, 0, {0x0f,0x3e,0x03,0xfe,0x80,0xa7,0x80,0xa1,0xe0,0x0c,0x78,0x02,0x94,0x00,0x85,0xa0 }},
+ {16, 0x9ea0, 0, {0x39,0xe4,0x0c,0x78,0x13,0x1e,0x90,0xb5,0x84,0x31,0xe0,0x0f,0xf8,0x87,0x1e,0x04 }},
+ {16, 0x9eb0, 0, {0xf7,0x80,0x3d,0x60,0x0c,0x3b,0x03,0xaa,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9ec0, 0, {0x08,0x1d,0xad,0xe4,0xfb,0x54,0x3e,0x80,0x0f,0xb4,0x23,0xec,0x32,0xfb,0x00,0x3e }},
+ {16, 0x9ed0, 0, {0xd8,0x4f,0xa0,0x03,0xe4,0x00,0xf9,0x00,0x3e,0xc0,0x0f,0x30,0x33,0xec,0x04,0xf2 }},
+ {16, 0x9ee0, 0, {0x01,0x3e,0xc0,0x0f,0xb2,0x03,0xfe,0x10,0xfb,0x68,0x3c,0x41,0x0f,0xf0,0x43,0x82 }},
+ {16, 0x9ef0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x00,0xcf,0xe4,0x3f,0xe4 }},
+ {16, 0x9f00, 0, {0x0c,0xfc,0x03,0x7e,0x80,0xcf,0x81,0x33,0xfa,0x0f,0xf8,0x03,0xf6,0x00,0xff,0x80 }},
+ {16, 0x9f10, 0, {0x3f,0xe2,0x0f,0x79,0x03,0x3e,0x40,0xf4,0x80,0x33,0x60,0x0c,0xe8,0x03,0x3e,0x00 }},
+ {16, 0x9f20, 0, {0xff,0x80,0x33,0x60,0x0c,0xf8,0x83,0x50,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9f30, 0, {0xa8,0x11,0x9c,0x00,0xd7,0xa0,0x2d,0xc4,0x08,0xba,0x02,0x3c,0xa0,0x87,0x20,0x21 }},
+ {16, 0x9f40, 0, {0xc0,0x0f,0x52,0x03,0xd4,0x00,0xb6,0x10,0x2d,0xc0,0x8b,0x73,0x03,0x5c,0x40,0xb4 }},
+ {16, 0x9f50, 0, {0xb0,0x2b,0x48,0x28,0x41,0x02,0x0c,0x00,0xbf,0x18,0x35,0x46,0x28,0x72,0x42,0x2a }},
+ {16, 0x9f60, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x9c,0x00,0x87,0x41,0x2d,0x44 }},
+ {16, 0x9f70, 0, {0x0a,0x73,0x02,0x9c,0xc4,0x81,0x00,0x6d,0xc8,0x8b,0x70,0x02,0xd4,0x00,0xb7,0x00 }},
+ {16, 0x9f80, 0, {0x2d,0xc0,0x0b,0xf0,0x46,0x9c,0x55,0xb4,0x20,0x25,0x40,0x18,0x60,0x82,0x1c,0x00 }},
+ {16, 0x9f90, 0, {0xb7,0x00,0x23,0x40,0x08,0x70,0x46,0x44,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9fa0, 0, {0x60,0x14,0xcc,0x00,0x93,0x00,0x2c,0x40,0x0b,0xb0,0x02,0x0c,0x82,0x80,0xc0,0x20 }},
+ {16, 0x9fb0, 0, {0xc0,0x0a,0x10,0x02,0x04,0x00,0xb3,0x00,0x2c,0xc0,0x1b,0x30,0x00,0xcd,0x01,0xb0 }},
+ {16, 0x9fc0, 0, {0x40,0xac,0x78,0x88,0x8c,0x06,0x0d,0x60,0xb3,0x4c,0x24,0x12,0x08,0x30,0x0a,0x18 }},
+ {16, 0x9fd0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x15,0xbc,0x00,0xc7,0x00,0x2e,0x40 }},
+ {16, 0x9fe0, 0, {0x0e,0xf0,0x2a,0xbf,0x00,0xc8,0xc8,0xbf,0xc0,0x0b,0x90,0x02,0xe4,0x04,0xbf,0x00 }},
+ {16, 0x9ff0, 0, {0x3f,0xc0,0x0f,0xb2,0x0a,0xac,0x00,0xf8,0x80,0x34,0x49,0x0c,0xb9,0x0b,0x3f,0x00 }},
+ {16, 0xa000, 0, {0xfb,0xc0,0x30,0xf0,0x0c,0xf0,0x03,0x6e,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa010, 0, {0x80,0x00,0xcc,0x00,0xfb,0x80,0x3e,0x41,0x2c,0xb0,0x13,0xac,0x00,0xf8,0x00,0x3e }},
+ {16, 0xa020, 0, {0xc1,0x0f,0xa0,0x03,0xe8,0x00,0xfa,0x40,0x3e,0xc0,0x0f,0xb0,0x0b,0x6d,0x40,0xf8 }},
+ {16, 0xa030, 0, {0x10,0x3a,0x40,0x0f,0xb0,0x03,0xec,0x10,0xfe,0x40,0x3e,0xc0,0x0f,0xf0,0x03,0xe1 }},
+ {16, 0xa040, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xec,0x0c,0xdf,0x00,0x3b,0x80 }},
+ {16, 0xa050, 0, {0x0f,0xf0,0x0b,0x3c,0x08,0xe7,0x08,0x33,0xc0,0x0b,0xd0,0x23,0x74,0x00,0x54,0x00 }},
+ {16, 0xa060, 0, {0x33,0xc0,0x0f,0xf0,0x83,0xbe,0x20,0xfd,0x0c,0x3b,0x60,0x2c,0xe0,0x03,0x3c,0x00 }},
+ {16, 0xa070, 0, {0xcf,0x12,0x33,0x50,0x0c,0x30,0x03,0x80,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa080, 0, {0x81,0x04,0x6c,0x04,0xab,0x00,0x22,0xa0,0x0b,0xb0,0x06,0x0c,0x00,0xab,0x40,0x36 }},
+ {16, 0xa090, 0, {0xc0,0x0b,0xa8,0x02,0x66,0x00,0xb8,0x00,0x36,0xc1,0x0b,0x34,0x43,0xee,0x00,0xb2 }},
+ {16, 0xa0a0, 0, {0x00,0x22,0x60,0x08,0xb4,0x82,0x8c,0x04,0x8a,0x21,0x22,0x40,0x08,0xb0,0x02,0x20 }},
+ {16, 0xa0b0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x9b,0x00,0x2a,0x20 }},
+ {16, 0xa0c0, 0, {0x0b,0xb0,0x02,0x2c,0x00,0x88,0xc5,0x22,0xc0,0x0b,0x88,0x82,0xe6,0x01,0xbb,0x08 }},
+ {16, 0xa0d0, 0, {0x22,0xc0,0x0a,0xb2,0x82,0xac,0x60,0xb8,0x02,0x4a,0xc4,0x08,0xb1,0x02,0x2c,0x00 }},
+ {16, 0xa0e0, 0, {0x83,0x00,0x22,0xc0,0x08,0xb0,0x02,0xa0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa0f0, 0, {0x08,0x04,0x0c,0x00,0xab,0x20,0x20,0x01,0x0b,0x32,0x06,0x2c,0x00,0xa0,0x00,0x20 }},
+ {16, 0xa100, 0, {0xc0,0x09,0x04,0x22,0xc4,0x00,0xb2,0x00,0x24,0xc1,0x8b,0xb0,0x02,0x4c,0x00,0xb0 }},
+ {16, 0xa110, 0, {0x00,0x62,0xc0,0x48,0x30,0x02,0xac,0x10,0x82,0x00,0x20,0xc0,0x08,0x30,0x02,0x02 }},
+ {16, 0xa120, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x08,0xdf,0x2a,0x3a,0x00 }},
+ {16, 0xa130, 0, {0x0f,0xf5,0x12,0x3c,0x10,0xc9,0x00,0xa3,0xc0,0x0f,0x80,0x53,0xec,0x01,0xda,0x00 }},
+ {16, 0xa140, 0, {0x33,0xc0,0x0e,0xb0,0x03,0xac,0x04,0xf8,0x70,0x3a,0xc0,0x0c,0x60,0x43,0x2c,0x42 }},
+ {16, 0xa150, 0, {0xcd,0x00,0xb2,0x40,0x2c,0xf0,0x03,0x80,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa160, 0, {0xa0,0x19,0xfc,0x00,0xfb,0x01,0x3d,0x00,0x0f,0xb4,0x17,0xfc,0x00,0x3c,0x00,0x3f }},
+ {16, 0xa170, 0, {0xc0,0x4f,0xc0,0x03,0x74,0x08,0xfe,0x00,0x3f,0xc0,0x4f,0xf0,0x03,0xfc,0x08,0xf8 }},
+ {16, 0xa180, 0, {0x30,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x04,0xfc,0x00,0x3d,0x00,0x0f,0xf0,0x03,0xe8 }},
+ {16, 0xa190, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf4,0x90,0xef,0x00,0x3f,0xd8 }},
+ {16, 0xa1a0, 0, {0x0e,0xf3,0x03,0x2c,0x01,0xd4,0x80,0x37,0xcc,0x0d,0x89,0x43,0x12,0x50,0xec,0x2c }},
+ {16, 0xa1b0, 0, {0x32,0x05,0x0d,0xb0,0x53,0x3c,0xd4,0xc5,0x94,0x7f,0xa0,0x8f,0xf0,0x43,0x30,0x00 }},
+ {16, 0xa1c0, 0, {0xdc,0x00,0x33,0x00,0x0c,0x48,0x07,0xf0,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa1d0, 0, {0x80,0x10,0xe6,0x40,0x8b,0x70,0x2f,0xdc,0x08,0xf7,0x02,0x0c,0x80,0x8a,0x20,0x00 }},
+ {16, 0xa1e0, 0, {0xc8,0x4a,0x22,0x02,0xa0,0x00,0x8a,0x48,0x22,0x58,0x88,0xfd,0x02,0xad,0x02,0xa9 }},
+ {16, 0xa1f0, 0, {0x20,0x1e,0xa0,0x03,0x80,0x02,0x2c,0x04,0x8b,0x00,0x22,0xc0,0x4c,0x88,0x07,0x60 }},
+ {16, 0xa200, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc0,0x00,0x23,0x2c,0x2c,0xc9 }},
+ {16, 0xa210, 0, {0x02,0x30,0x02,0x0c,0x68,0xa0,0x28,0x2c,0xd0,0x09,0x12,0x02,0x84,0x00,0xa0,0x21 }},
+ {16, 0xa220, 0, {0x20,0x18,0x19,0x30,0x22,0x80,0xd0,0x83,0x06,0x0c,0xa0,0x0b,0xb0,0x06,0x00,0x12 }},
+ {16, 0xa230, 0, {0xa0,0x00,0x20,0x00,0x29,0x00,0x0e,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa240, 0, {0xc0,0x11,0xa8,0x30,0x8b,0x00,0x2e,0xc0,0x4a,0x30,0x0a,0x2c,0x14,0xa0,0x80,0x0a }},
+ {16, 0xa250, 0, {0xc1,0x08,0x88,0x86,0x87,0x00,0x83,0x00,0x22,0x49,0x08,0xb0,0x06,0xa0,0x40,0xab }},
+ {16, 0xa260, 0, {0x20,0x22,0x20,0x0b,0x80,0x0a,0x0c,0x04,0xab,0x02,0x22,0xc0,0x88,0x80,0x02,0xf0 }},
+ {16, 0xa270, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xef,0x40,0xeb,0x06,0x3e,0xc0 }},
+ {16, 0xa280, 0, {0x0e,0xb0,0x03,0x2c,0x02,0xf9,0xa0,0x3e,0xc0,0x0d,0x8c,0x03,0xaa,0x10,0xe9,0x40 }},
+ {16, 0xa290, 0, {0xb2,0x48,0x0d,0xb0,0x43,0xad,0x00,0xcb,0x86,0x2e,0x20,0x0f,0x30,0x03,0x24,0x00 }},
+ {16, 0xa2a0, 0, {0xf9,0x80,0x32,0xc0,0x0d,0x0c,0xc2,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa2b0, 0, {0xe0,0x01,0x94,0x00,0xff,0x00,0x3d,0xc0,0x0d,0xf0,0x03,0x7c,0x00,0xdf,0x00,0x37 }},
+ {16, 0xa2c0, 0, {0xc0,0x0f,0xe0,0x03,0xf0,0x00,0xfe,0x20,0x3f,0x40,0x0f,0x70,0x03,0xfe,0x00,0xff }},
+ {16, 0xa2d0, 0, {0x82,0x7f,0x00,0x0f,0xc0,0x03,0xf9,0x04,0xde,0x20,0xbd,0x00,0x0f,0xd9,0x0b,0x7c }},
+ {16, 0xa2e0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x01,0xcb,0x00,0x3e,0xc0 }},
+ {16, 0xa2f0, 0, {0x2c,0xb0,0x0b,0x2c,0x00,0xe8,0x40,0x3e,0xc0,0x0f,0x94,0x07,0x29,0x00,0xc9,0x40 }},
+ {16, 0xa300, 0, {0xb2,0xc0,0x0f,0xb0,0x03,0x01,0x02,0xcb,0x00,0x32,0x04,0x4f,0xf0,0x43,0x34,0xc0 }},
+ {16, 0xa310, 0, {0xb5,0x1a,0x3f,0xc1,0x0f,0x80,0x93,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa320, 0, {0xc8,0x05,0x28,0x00,0x8f,0x00,0x2f,0xc0,0x08,0xf0,0x02,0x3c,0x04,0xd8,0x00,0x2b }},
+ {16, 0xa330, 0, {0xc0,0x0c,0x80,0x45,0x60,0x00,0x7b,0x58,0x22,0xc8,0x0b,0xfa,0x01,0x61,0x40,0x8b }},
+ {16, 0xa340, 0, {0x00,0x32,0x04,0x4b,0xce,0x02,0x28,0x00,0x3a,0x40,0x2e,0x07,0x0b,0x90,0x02,0x26 }},
+ {16, 0xa350, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0x83,0x01,0x4c,0xc0 }},
+ {16, 0xa360, 0, {0x0b,0x30,0x02,0xec,0x10,0x90,0x00,0x2a,0xc0,0x0a,0x80,0x06,0xc0,0x04,0x83,0x04 }},
+ {16, 0xa370, 0, {0xa2,0x89,0x19,0x30,0x06,0xcc,0x00,0x83,0x00,0x20,0x90,0x0b,0x30,0xc2,0x48,0x00 }},
+ {16, 0xa380, 0, {0xb2,0x40,0x24,0x20,0x0b,0x09,0x00,0xb8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa390, 0, {0x20,0x01,0x06,0x04,0x87,0xa4,0x2d,0xe0,0x09,0x38,0x02,0xde,0x00,0x9e,0x81,0x29 }},
+ {16, 0xa3a0, 0, {0xe0,0x08,0x78,0x52,0xfa,0xc0,0x96,0x80,0x01,0xa0,0x8b,0x3a,0x22,0xce,0x40,0x8f }},
+ {16, 0xa3b0, 0, {0xb0,0x25,0xa0,0x0b,0x08,0x02,0x56,0x08,0xb5,0x90,0x2d,0xe4,0x4b,0xd8,0x22,0x0c }},
+ {16, 0xa3c0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x08,0x02,0x83,0x80,0x2e,0xe8 }},
+ {16, 0xa3d0, 0, {0x0b,0x38,0x13,0xce,0x41,0xd3,0x10,0x28,0xc0,0x0e,0x3a,0x02,0xc6,0x08,0x4b,0x40 }},
+ {16, 0xa3e0, 0, {0x30,0x60,0x0d,0x3b,0x27,0xcf,0xc4,0xc3,0xa0,0x30,0x00,0x0f,0x30,0x43,0x48,0x40 }},
+ {16, 0xa3f0, 0, {0xf2,0x00,0x3c,0x04,0x0f,0x02,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa400, 0, {0x40,0x1d,0xb8,0x00,0xff,0x00,0x3f,0xc4,0x0e,0xf1,0x03,0x3c,0x00,0xff,0x01,0x33 }},
+ {16, 0xa410, 0, {0xc0,0x4d,0xb1,0x07,0x7c,0x90,0xff,0x00,0x3f,0x40,0x03,0xf1,0x03,0x70,0x00,0xfb }},
+ {16, 0xa420, 0, {0x10,0x3b,0x00,0x0f,0xc0,0x0b,0xb4,0x00,0xfd,0x00,0x3f,0xc4,0x0f,0xd0,0x03,0x90 }},
+ {16, 0xa430, 0, {0x02,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x04,0xfb,0x84,0x3a,0xc2 }},
+ {16, 0xa440, 0, {0x4c,0xb4,0x93,0x2c,0x04,0xe9,0x00,0x3a,0xc4,0x8d,0x08,0x03,0x2e,0x00,0xcb,0x01 }},
+ {16, 0xa450, 0, {0x32,0x80,0x8f,0xb2,0x83,0xec,0x00,0xcb,0x80,0x32,0x00,0x0f,0xf9,0x03,0x3c,0x10 }},
+ {16, 0xa460, 0, {0xdf,0x81,0xb3,0xe0,0x8c,0xa0,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa470, 0, {0x48,0x11,0x94,0x08,0xb7,0x04,0x24,0xc8,0x1a,0x30,0x4a,0x1d,0x00,0xb7,0x01,0x2d }},
+ {16, 0xa480, 0, {0xc0,0x88,0x70,0x06,0x1c,0x00,0x82,0x00,0x21,0x80,0x4b,0x76,0x12,0xdc,0x00,0x87 }},
+ {16, 0xa490, 0, {0x00,0x29,0x40,0x8b,0x40,0x02,0x10,0x00,0xbc,0x00,0x20,0x01,0x28,0x70,0x03,0xb2 }},
+ {16, 0xa4a0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9a,0x00,0xb3,0x90,0x2d,0xe4 }},
+ {16, 0xa4b0, 0, {0x09,0x79,0x02,0x1e,0x80,0xa7,0x80,0x2c,0xe8,0x19,0xf8,0x12,0x5e,0x01,0x87,0x80 }},
+ {16, 0xa4c0, 0, {0x25,0xe0,0x4b,0x78,0x06,0xd2,0x00,0x97,0x80,0x21,0x62,0x0b,0x3a,0x02,0x1e,0x00 }},
+ {16, 0xa4d0, 0, {0xb7,0x86,0x29,0xf0,0x08,0x68,0x06,0xe0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa4e0, 0, {0x48,0x14,0xcf,0xc0,0xb3,0x00,0x24,0xc0,0x8a,0x30,0x32,0x0c,0x00,0xb3,0x08,0x2c }},
+ {16, 0xa4f0, 0, {0xc0,0x08,0x30,0x12,0x0e,0x20,0x83,0x00,0x24,0xf1,0x0b,0x30,0x06,0xce,0x00,0x83 }},
+ {16, 0xa500, 0, {0x90,0x28,0x60,0x0b,0x00,0x2a,0x21,0x80,0xb0,0x08,0x28,0x00,0x08,0x37,0x02,0x92 }},
+ {16, 0xa510, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb9,0x00,0xfa,0x00,0x3e,0x80 }},
+ {16, 0xa520, 0, {0x4d,0xa0,0x03,0x28,0x00,0xee,0x41,0x3e,0x80,0x0d,0xe0,0x03,0x78,0x00,0x8e,0x40 }},
+ {16, 0xa530, 0, {0x27,0xa8,0x0b,0xa0,0x03,0xfb,0x02,0xca,0x82,0x33,0xa0,0x0f,0xa0,0x13,0x29,0x00 }},
+ {16, 0xa540, 0, {0xfa,0x40,0x3a,0x80,0x0c,0x6c,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa550, 0, {0x48,0x00,0xc0,0x00,0xf8,0x00,0x3a,0x00,0x0c,0x80,0x03,0xe0,0x08,0xf8,0x00,0x3e }},
+ {16, 0xa560, 0, {0x00,0x8f,0x80,0x23,0xa0,0x42,0xf8,0x09,0xba,0x10,0x4f,0x80,0x03,0xe0,0x60,0xf8 }},
+ {16, 0xa570, 0, {0x00,0x3e,0x20,0x0f,0xc0,0x03,0xf0,0x00,0xfc,0x00,0x27,0x00,0x8f,0x80,0x03,0x92 }},
+ {16, 0xa580, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe5,0x00,0x89,0x00,0x3e,0x40 }},
+ {16, 0xa590, 0, {0x6e,0x90,0x03,0xa4,0x08,0xc9,0x00,0x3c,0x40,0x0d,0x90,0x03,0x24,0x10,0xf9,0xa0 }},
+ {16, 0xa5a0, 0, {0x32,0x42,0x0c,0x90,0x13,0xc4,0x00,0xc9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xe4,0x40 }},
+ {16, 0xa5b0, 0, {0xc9,0x20,0x3e,0x52,0xcf,0x90,0x09,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa5c0, 0, {0x80,0x04,0x66,0x00,0x89,0x04,0x2e,0x40,0x08,0x90,0x02,0x24,0x00,0xd9,0x00,0x3a }},
+ {16, 0xa5d0, 0, {0x41,0x08,0x90,0x05,0xa4,0x00,0xb9,0x40,0xa2,0x40,0x0d,0x90,0x02,0xe5,0x46,0x89 }},
+ {16, 0xa5e0, 0, {0x00,0x2e,0x40,0x0b,0x90,0x12,0xe5,0x00,0xa9,0xc8,0x2e,0x61,0x8b,0x94,0x42,0x20 }},
+ {16, 0xa5f0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x00,0xa9,0x00,0x6c,0x40 }},
+ {16, 0xa600, 0, {0x48,0x10,0x22,0x84,0x03,0xa9,0x00,0x2e,0x40,0x09,0x90,0x02,0xe4,0x04,0xb1,0x08 }},
+ {16, 0xa610, 0, {0x28,0x40,0x18,0x98,0x02,0xe5,0x00,0x89,0x00,0x2e,0x40,0x0b,0x90,0x02,0xf4,0x20 }},
+ {16, 0xa620, 0, {0x8d,0x00,0x2f,0x40,0x0b,0x94,0x42,0x86,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa630, 0, {0x08,0x04,0x04,0x80,0xa1,0x24,0x2c,0x48,0x18,0x12,0x02,0x04,0x80,0xa1,0x00,0x28 }},
+ {16, 0xa640, 0, {0x48,0x08,0x10,0x02,0x84,0x00,0x91,0x20,0x20,0x48,0x09,0x12,0x02,0xc4,0x94,0x81 }},
+ {16, 0xa650, 0, {0x00,0x2c,0x61,0x0b,0x5a,0x82,0xd4,0xa0,0xa5,0x28,0x2d,0x4a,0x0b,0x90,0x02,0x82 }},
+ {16, 0xa660, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x02,0xe8,0x50,0x2e,0x14 }},
+ {16, 0xa670, 0, {0x0e,0x85,0x03,0xa1,0x40,0xa8,0x50,0x3e,0x14,0x0d,0x85,0x01,0x81,0x40,0xf8,0x52 }},
+ {16, 0xa680, 0, {0x32,0x94,0x0c,0x80,0x13,0xc1,0x42,0xc0,0x51,0x3e,0x00,0x8f,0x82,0x03,0xe0,0x80 }},
+ {16, 0xa690, 0, {0xc8,0x20,0x3f,0x08,0x0f,0x80,0x03,0xae,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa6a0, 0, {0x98,0x19,0xf4,0x50,0xd9,0x11,0x3e,0x44,0x8f,0x91,0x43,0xe4,0x40,0xdd,0x00,0x3a }},
+ {16, 0xa6b0, 0, {0x44,0x4f,0xd0,0x27,0xb4,0x00,0xfd,0x12,0x3f,0x44,0x4f,0x91,0x43,0xf4,0x40,0xfd }},
+ {16, 0xa6c0, 0, {0x00,0x3f,0x41,0x0f,0x92,0x83,0xe4,0xa0,0xf9,0x28,0x3e,0x4a,0x0f,0xd0,0x03,0x66 }},
+ {16, 0xa6d0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0xf6,0x80,0xe9,0xc0,0x3e,0x78 }},
+ {16, 0xa6e0, 0, {0x8f,0x9b,0x03,0xa7,0x80,0xc9,0x40,0x36,0x78,0x0f,0x10,0x23,0xe5,0x04,0xdd,0xa4 }},
+ {16, 0xa6f0, 0, {0x33,0x62,0x0f,0xda,0x03,0xf6,0x60,0xc9,0x10,0x33,0x40,0x0e,0x98,0x93,0xe6,0x30 }},
+ {16, 0xa700, 0, {0xc9,0xc9,0x32,0x78,0x8c,0xd0,0x0b,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa710, 0, {0x38,0x10,0xe0,0x00,0x88,0xe2,0x2e,0x30,0x0b,0x88,0x42,0x23,0x40,0xa0,0xa1,0x22 }},
+ {16, 0xa720, 0, {0x38,0x0b,0x8a,0x02,0xe2,0x80,0xaa,0xe0,0x22,0x30,0x0b,0x80,0x23,0xab,0x02,0x88 }},
+ {16, 0xa730, 0, {0xa0,0x2a,0x00,0x0b,0x8c,0x02,0xe3,0x00,0x88,0xe0,0x23,0x38,0x08,0x80,0x02,0x0e }},
+ {16, 0xa740, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xa1,0x44,0x28,0x58 }},
+ {16, 0xa750, 0, {0x43,0x16,0x22,0x84,0x81,0x81,0x20,0x2c,0x58,0x49,0x10,0x80,0xc4,0x81,0x91,0x48 }},
+ {16, 0xa760, 0, {0x6c,0x4a,0x0b,0x14,0x02,0x44,0x84,0x81,0x01,0x60,0x40,0x0a,0x52,0x86,0xd4,0xa0 }},
+ {16, 0xa770, 0, {0x85,0x00,0xa1,0x50,0x68,0x90,0x06,0xd2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa780, 0, {0x18,0x05,0xa6,0x00,0x89,0x00,0x2e,0x40,0x0b,0x90,0x02,0x04,0x00,0xa9,0x60,0x22 }},
+ {16, 0xa790, 0, {0x40,0x0b,0x95,0x02,0xe4,0x10,0xb1,0x00,0x4e,0x40,0x0b,0x90,0x66,0xac,0x80,0x89 }},
+ {16, 0xa7a0, 0, {0x00,0x2a,0x60,0x0b,0x90,0x52,0xf4,0x00,0x85,0x00,0x21,0x40,0x08,0x90,0x02,0xc6 }},
+ {16, 0xa7b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe6,0x20,0xe9,0x00,0x3e,0x40 }},
+ {16, 0xa7c0, 0, {0x0f,0x90,0x03,0xa4,0x10,0xc9,0x00,0x36,0x40,0x0f,0x94,0x01,0xe5,0x20,0xd9,0x40 }},
+ {16, 0xa7d0, 0, {0xba,0x68,0x8f,0x90,0x07,0xe6,0x00,0xc9,0x10,0x32,0x62,0x0e,0x90,0x02,0xe4,0x18 }},
+ {16, 0xa7e0, 0, {0xc9,0x00,0x32,0x40,0x0c,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa7f0, 0, {0x28,0x01,0xa4,0x00,0xf9,0x04,0x3e,0x40,0x0b,0x90,0x03,0x64,0x00,0xf9,0x00,0x3e }},
+ {16, 0xa800, 0, {0x40,0x8f,0x90,0x03,0xe4,0x00,0xe9,0x02,0x72,0x68,0x0f,0x90,0x03,0xe6,0x00,0xf9 }},
+ {16, 0xa810, 0, {0x01,0x3e,0x42,0x0f,0x90,0x03,0xc4,0x02,0xf9,0x04,0x3e,0x40,0x4f,0x90,0x03,0x1a }},
+ {16, 0xa820, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0x80,0x02,0xc8,0x00,0x32,0x00 }},
+ {16, 0xa830, 0, {0x0c,0x80,0x03,0x60,0x00,0xc8,0x40,0x36,0x00,0x0f,0x84,0x03,0xa0,0x00,0xd8,0x50 }},
+ {16, 0xa840, 0, {0xb2,0x10,0x8c,0x81,0x03,0xc1,0x20,0xc8,0x00,0x3e,0x00,0x0f,0xc0,0x13,0xf0,0x04 }},
+ {16, 0xa850, 0, {0x4c,0x00,0x3f,0x00,0x0f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa860, 0, {0x28,0x15,0x2a,0x00,0x8a,0x04,0x22,0x81,0x28,0xa0,0x12,0x28,0x00,0x8a,0x01,0x36 }},
+ {16, 0xa870, 0, {0x80,0x0b,0xa0,0x10,0x28,0x10,0xce,0x01,0x23,0x81,0x0c,0xa8,0x12,0xfb,0x00,0x8a }},
+ {16, 0xa880, 0, {0x01,0x3b,0x80,0x83,0xa0,0x42,0xe8,0x10,0x8a,0x00,0x2f,0x80,0x0b,0x60,0x42,0x0a }},
+ {16, 0xa890, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x83,0x00,0xa0,0xc0 }},
+ {16, 0xa8a0, 0, {0x18,0xb0,0x00,0xcc,0x00,0x9b,0x00,0x24,0xc0,0x0b,0x30,0x06,0x6c,0x00,0xa3,0x08 }},
+ {16, 0xa8b0, 0, {0x28,0xc8,0x09,0x30,0x02,0xcc,0x43,0x8b,0x00,0x2c,0x80,0x0b,0x30,0x02,0xcc,0x02 }},
+ {16, 0xa8c0, 0, {0x83,0x01,0x2c,0xc0,0x4b,0x30,0x00,0x4a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa8d0, 0, {0xa0,0x01,0x0c,0x24,0x87,0x94,0x21,0xe4,0x18,0x31,0x02,0xdc,0x80,0x97,0x10,0x25 }},
+ {16, 0xa8e0, 0, {0xcd,0x0b,0xf2,0x02,0x7c,0x00,0xa0,0x00,0x28,0xe0,0x18,0x70,0x02,0xdc,0x01,0x87 }},
+ {16, 0xa8f0, 0, {0x34,0x29,0x40,0x09,0x40,0x02,0xd0,0x04,0x84,0x04,0x2d,0x00,0x4b,0xd0,0x22,0x68 }},
+ {16, 0xa900, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x16,0x00,0xcf,0xa0,0x70,0xe9 }},
+ {16, 0xa910, 0, {0x18,0x7b,0x03,0xff,0x40,0x97,0xa0,0x35,0xe8,0x0f,0x74,0x02,0x5e,0x20,0xe4,0x80 }},
+ {16, 0xa920, 0, {0x39,0xa0,0x2d,0x78,0x03,0xfe,0x00,0xc7,0x80,0x3d,0xe0,0x5f,0x68,0x43,0xc2,0x00 }},
+ {16, 0xa930, 0, {0xc4,0x84,0x1d,0x60,0x0f,0x78,0x03,0x6a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa940, 0, {0x08,0x0d,0xa4,0x00,0x3b,0x00,0x2e,0xd8,0x0f,0xb4,0x03,0x2d,0x8a,0xeb,0x62,0x3a }},
+ {16, 0xa950, 0, {0xd0,0x0f,0xb2,0x87,0x0c,0xd0,0xd8,0x00,0x32,0xc0,0x4f,0x90,0x43,0xec,0x00,0xfb }},
+ {16, 0xa960, 0, {0x08,0x3e,0x40,0x8f,0x90,0x03,0xfc,0x00,0xff,0x04,0x3f,0x80,0x0f,0x00,0x2b,0x82 }},
+ {16, 0xa970, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xff,0xa0,0x3e,0xf4 }},
+ {16, 0xa980, 0, {0x0e,0xb8,0x03,0xee,0x08,0x4b,0xf0,0x7f,0xf4,0x0c,0xf9,0x23,0xee,0x48,0x78,0x90 }},
+ {16, 0xa990, 0, {0x32,0xe4,0x0c,0xf9,0x03,0xfe,0x00,0xff,0x80,0x3f,0xe4,0x1c,0x79,0x03,0x2e,0x40 }},
+ {16, 0xa9a0, 0, {0xff,0x80,0x33,0xe0,0x2c,0x78,0x07,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa9b0, 0, {0xa8,0x11,0x94,0x00,0xb3,0x00,0x0c,0xe5,0x0b,0x38,0x02,0xfe,0x80,0x8f,0x80,0x61 }},
+ {16, 0xa9c0, 0, {0xc4,0x28,0x78,0x00,0x4e,0x00,0xf4,0x84,0x25,0xa8,0x0c,0x70,0x02,0xcc,0x04,0xb3 }},
+ {16, 0xa9d0, 0, {0x90,0x25,0x40,0x0c,0x41,0x83,0x52,0x40,0xb4,0x10,0xa3,0x00,0x0c,0x52,0x03,0x6a }},
+ {16, 0xa9e0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x00,0xb7,0x21,0x6d,0xc8 }},
+ {16, 0xa9f0, 0, {0x4b,0x70,0x02,0xdc,0x42,0xa7,0x31,0x29,0xc4,0x08,0x72,0x02,0xdc,0x00,0xb7,0x28 }},
+ {16, 0xaa00, 0, {0x24,0x80,0x08,0x70,0x06,0xd4,0x20,0xb7,0x01,0x2d,0xc1,0x08,0x60,0x02,0x50,0x80 }},
+ {16, 0xaa10, 0, {0xb4,0x08,0x21,0x62,0x09,0x74,0x06,0x80,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaa20, 0, {0x20,0x14,0xc7,0x04,0xb3,0x00,0x2c,0xc0,0x0b,0xb0,0x02,0xcc,0x00,0xa3,0x02,0x60 }},
+ {16, 0xaa30, 0, {0xc0,0x08,0x38,0x02,0x4e,0x44,0xa0,0xc0,0x24,0x91,0x08,0x30,0x02,0xc0,0x00,0xb3 }},
+ {16, 0xaa40, 0, {0x00,0x24,0x60,0x08,0x1c,0x02,0x4c,0x88,0xb3,0xc0,0x20,0xa0,0x08,0x00,0x0a,0x88 }},
+ {16, 0xaa50, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x00,0xff,0x00,0x2f,0xc0 }},
+ {16, 0xaa60, 0, {0x4f,0xf0,0x13,0xfc,0x08,0xe7,0x8a,0x3f,0xc0,0x0c,0xf5,0xc2,0xfe,0x10,0xbb,0xc0 }},
+ {16, 0xaa70, 0, {0x32,0xd4,0x0c,0x30,0x13,0xe3,0x04,0xbf,0x00,0x2e,0x62,0x08,0xb9,0x02,0x6e,0x00 }},
+ {16, 0xaa80, 0, {0xfb,0x01,0x32,0xa4,0x4d,0x94,0x02,0xab,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaa90, 0, {0x80,0x00,0xec,0x60,0xfb,0x00,0x1e,0xc0,0x0f,0xb0,0x13,0xec,0x00,0x5b,0x00,0x3a }},
+ {16, 0xaaa0, 0, {0xc0,0x0f,0xb0,0x41,0xec,0x00,0x7b,0x45,0xba,0x40,0x2e,0xb0,0x15,0xe0,0x01,0xfb }},
+ {16, 0xaab0, 0, {0x00,0x3e,0x50,0x0e,0xc0,0x03,0xf0,0x40,0xfc,0x20,0x3f,0x50,0x8f,0x90,0x01,0x60 }},
+ {16, 0xaac0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf4,0x00,0xff,0x00,0x3f,0xc0 }},
+ {16, 0xaad0, 0, {0x8f,0xf0,0x03,0x1c,0x02,0xcf,0x00,0x36,0xc0,0x0d,0xf0,0x03,0x7c,0x00,0x7f,0x2a }},
+ {16, 0xaae0, 0, {0x3f,0x80,0x0f,0xf8,0x13,0x90,0x21,0xcf,0x00,0x3f,0x62,0x0c,0xe0,0x03,0x30,0x00 }},
+ {16, 0xaaf0, 0, {0xf8,0x00,0x3f,0x00,0x0f,0xd0,0x03,0x80,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xab00, 0, {0x81,0x04,0x64,0x11,0xbb,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0x2c,0x00,0xdb,0x04,0x32 }},
+ {16, 0xab10, 0, {0xc0,0x0e,0xb0,0x02,0xec,0x00,0xbb,0x84,0x2e,0x40,0x0b,0xb9,0x42,0x22,0x42,0x8b }},
+ {16, 0xab20, 0, {0x01,0x2c,0x72,0x0a,0x90,0x42,0x2c,0x00,0xbb,0x00,0x2e,0xc2,0x8f,0x88,0x06,0xe0 }},
+ {16, 0xab30, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x24,0x00,0xbb,0x00,0x6e,0xc0 }},
+ {16, 0xab40, 0, {0x48,0xb0,0x42,0x2c,0x00,0x8b,0x00,0x26,0xc0,0x0a,0xb0,0x12,0xec,0x00,0xbb,0x40 }},
+ {16, 0xab50, 0, {0x2e,0xc8,0x0b,0xb0,0x12,0x2c,0x00,0x8b,0x00,0x2e,0x48,0x0a,0x30,0x02,0x6c,0x00 }},
+ {16, 0xab60, 0, {0xbb,0x00,0x2e,0x80,0x4b,0x98,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xab70, 0, {0x08,0x04,0x04,0x00,0xb3,0x00,0x6c,0xc2,0x4b,0x31,0x02,0x0c,0x50,0x9b,0x20,0x20 }},
+ {16, 0xab80, 0, {0xc0,0x0a,0x32,0x12,0xcc,0x80,0xb3,0x00,0x6c,0x0c,0x0b,0x31,0x02,0x0c,0x42,0x83 }},
+ {16, 0xab90, 0, {0x08,0x2e,0x40,0x0a,0x00,0x02,0x00,0x80,0xb0,0x00,0x2c,0x41,0x0b,0x10,0x02,0x42 }},
+ {16, 0xaba0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x64,0x00,0xbb,0x40,0x3f,0xcc }},
+ {16, 0xabb0, 0, {0x0e,0xf0,0x83,0x3d,0xa0,0xcf,0x20,0x37,0xc0,0x0c,0xf7,0xc3,0xfd,0x48,0xf3,0x00 }},
+ {16, 0xabc0, 0, {0x3e,0x88,0x0f,0xb4,0x13,0xa5,0x00,0x8f,0x30,0x3e,0x40,0x0c,0xa0,0x03,0x60,0x80 }},
+ {16, 0xabd0, 0, {0xf8,0x00,0x3e,0x00,0x0f,0x90,0x23,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xabe0, 0, {0xa0,0x19,0xf4,0x00,0xff,0x29,0x3f,0xc9,0x0f,0xf0,0x13,0xfc,0x94,0xef,0x12,0x3b }},
+ {16, 0xabf0, 0, {0xc0,0x8e,0xb2,0x07,0xfd,0x04,0xff,0x10,0x3f,0x0c,0x0f,0xf0,0x03,0xf0,0x00,0xfb }},
+ {16, 0xac00, 0, {0x20,0x3d,0x40,0x0f,0xd0,0x43,0xfc,0x40,0xff,0x04,0x3f,0xc0,0x0e,0xc0,0x43,0xe8 }},
+ {16, 0xac10, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0xa2,0xc7,0x20,0x3f,0x24 }},
+ {16, 0xac20, 0, {0x0c,0xf0,0x03,0x3c,0x80,0xcc,0x09,0x33,0xd1,0x0c,0xf1,0x23,0xfc,0x20,0xdf,0x36 }},
+ {16, 0xac30, 0, {0x3f,0xc0,0x0e,0x48,0x03,0xfe,0x00,0xff,0x80,0x37,0xe4,0x0d,0x78,0x03,0x11,0xa0 }},
+ {16, 0xac40, 0, {0xcf,0x00,0x37,0xc8,0x0c,0xf0,0x03,0x30,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xac50, 0, {0x80,0x10,0xff,0x00,0x8f,0xd1,0x2e,0x08,0x0d,0xb6,0x12,0x3d,0x45,0xf9,0x64,0x27 }},
+ {16, 0xac60, 0, {0xd0,0x88,0xba,0x14,0xcc,0x04,0x8f,0x40,0x23,0xf0,0x0b,0x88,0x02,0x2e,0x04,0xbb }},
+ {16, 0xac70, 0, {0x80,0xae,0xc0,0x08,0xb8,0x0a,0x21,0x00,0x88,0xd0,0x22,0x20,0x28,0xb0,0x02,0x20 }},
+ {16, 0xac80, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0x93,0x00,0x2e,0x00 }},
+ {16, 0xac90, 0, {0x0a,0x34,0x82,0x8c,0xa0,0xa0,0x08,0x24,0xd8,0x09,0x31,0x02,0xcc,0x20,0xb3,0x32 }},
+ {16, 0xaca0, 0, {0x28,0xd0,0x4a,0x80,0x02,0xcc,0x0c,0xbb,0x00,0x22,0x40,0x89,0xb0,0x02,0x60,0x80 }},
+ {16, 0xacb0, 0, {0x93,0x00,0x24,0xd0,0x0b,0x30,0x02,0xa2,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xacc0, 0, {0xc0,0x11,0xac,0x00,0x9b,0x00,0x2e,0x20,0x09,0xb0,0x4a,0x2c,0x02,0xa0,0x00,0x06 }},
+ {16, 0xacd0, 0, {0xc0,0x09,0xb0,0x00,0xec,0x00,0xab,0x00,0x2a,0xc0,0x0b,0x88,0x02,0x6c,0x00,0xbb }},
+ {16, 0xace0, 0, {0x20,0x2a,0xe2,0x41,0xb8,0x2a,0x60,0x0a,0x98,0x00,0x26,0x00,0x0b,0xb0,0x02,0xb8 }},
+ {16, 0xacf0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x08,0xdb,0x02,0x3e,0x20 }},
+ {16, 0xad00, 0, {0x4c,0xb0,0x03,0x2c,0x02,0x8b,0x20,0x12,0xc0,0x29,0xb0,0x12,0xec,0x00,0xfb,0x00 }},
+ {16, 0xad10, 0, {0x3a,0xc0,0x0e,0x88,0x03,0xed,0x20,0xfb,0xc8,0x34,0xf0,0x0d,0xba,0x03,0x47,0x60 }},
+ {16, 0xad20, 0, {0xc9,0x00,0x36,0x40,0x0f,0xb0,0x0b,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xad30, 0, {0xe0,0x01,0x9c,0x00,0xef,0x00,0x0f,0x00,0x0f,0x30,0x00,0xfc,0x00,0xdf,0x90,0xbb }},
+ {16, 0xad40, 0, {0xc0,0xce,0xf0,0x03,0xfc,0x04,0xcb,0x00,0x17,0xc0,0x0f,0xc0,0x03,0xbc,0x84,0xff }},
+ {16, 0xad50, 0, {0x00,0x37,0xc0,0x0e,0xd0,0x63,0xb8,0x00,0xea,0x00,0x3a,0x80,0x0c,0x30,0x03,0x70 }},
+ {16, 0xad60, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xfb,0x02,0x32,0x00 }},
+ {16, 0xad70, 0, {0x0f,0xb0,0x53,0x2c,0x00,0xfa,0x00,0x32,0xc0,0x8f,0xb0,0x07,0x2c,0x00,0xfb,0x00 }},
+ {16, 0xad80, 0, {0xb2,0xc0,0x0f,0x80,0x07,0xac,0x80,0xdb,0x24,0x7e,0xd0,0x0e,0xb0,0x23,0x74,0x04 }},
+ {16, 0xad90, 0, {0xdd,0x08,0xb5,0x40,0x0c,0xb0,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xada0, 0, {0xc8,0x05,0x3c,0x00,0xbf,0xc0,0xa0,0x00,0x1b,0xf0,0x02,0x3f,0x60,0xea,0x50,0x23 }},
+ {16, 0xadb0, 0, {0xc0,0x08,0xfa,0x07,0xfc,0x00,0xdf,0x00,0x63,0xc0,0x48,0x18,0x02,0x2d,0x00,0xb3 }},
+ {16, 0xadc0, 0, {0x00,0x6e,0xc0,0x0d,0x3a,0x03,0x24,0x00,0x82,0x80,0x32,0x80,0x0d,0xf0,0x03,0x32 }},
+ {16, 0xadd0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x14,0xb3,0x59,0x20,0x80 }},
+ {16, 0xade0, 0, {0x09,0x30,0x02,0x2e,0x05,0xb0,0x44,0x2e,0xc0,0x09,0x34,0x82,0xec,0x00,0xab,0x04 }},
+ {16, 0xadf0, 0, {0x20,0xc0,0x09,0x21,0xb2,0x8e,0x04,0x93,0xc0,0x24,0xc0,0x0a,0x18,0x06,0x4c,0x00 }},
+ {16, 0xae00, 0, {0x92,0x50,0x20,0xc0,0x08,0x30,0x02,0x70,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xae10, 0, {0x20,0x01,0x1e,0x00,0xb7,0x80,0x61,0xe0,0x0b,0x78,0x0a,0x5e,0x01,0xb1,0xa0,0x2d }},
+ {16, 0xae20, 0, {0xe0,0x0a,0x78,0x02,0x5e,0x00,0x07,0x90,0x21,0xe0,0x18,0xc8,0x02,0x1e,0x00,0xb7 }},
+ {16, 0xae30, 0, {0x80,0x2d,0xe0,0x8a,0xd8,0x02,0x3e,0xc0,0x85,0x80,0x21,0x20,0x19,0x78,0x22,0x00 }},
+ {16, 0xae40, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xf3,0x94,0x20,0x10 }},
+ {16, 0xae50, 0, {0x4b,0x30,0x07,0x0c,0x00,0xf3,0x00,0x3e,0xc8,0x0f,0x30,0x03,0xcc,0x00,0x23,0x10 }},
+ {16, 0xae60, 0, {0x00,0xcb,0x05,0x20,0x02,0x8c,0x60,0x93,0x0a,0x2e,0xc4,0x0a,0x01,0x07,0x4c,0x80 }},
+ {16, 0xae70, 0, {0xd2,0x01,0x30,0xc0,0x2c,0x30,0x0b,0x5a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xae80, 0, {0x40,0x1d,0xbc,0x00,0xff,0x01,0x0f,0x40,0x0f,0xf0,0x13,0xbc,0x00,0xef,0x26,0x73 }},
+ {16, 0xae90, 0, {0xc2,0x0c,0xb0,0x83,0xbc,0x40,0xff,0x18,0x3d,0xc0,0x4a,0xc1,0x03,0xfc,0x00,0xfb }},
+ {16, 0xaea0, 0, {0x12,0x3f,0xc4,0x4d,0xc1,0x0b,0xfc,0x81,0xfd,0x00,0x3f,0x20,0x0f,0xf0,0x03,0xd0 }},
+ {16, 0xaeb0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x20,0xcb,0x48,0x3e,0x00 }},
+ {16, 0xaec0, 0, {0x0c,0xb0,0x03,0x2d,0x20,0xe9,0x80,0xfa,0xc8,0x0d,0xb0,0x03,0xee,0x00,0xdb,0x24 }},
+ {16, 0xaed0, 0, {0x76,0xf3,0x8e,0x80,0x33,0xec,0x44,0xeb,0x10,0x3e,0xc0,0x0f,0x90,0x03,0xe8,0x04 }},
+ {16, 0xaee0, 0, {0xdc,0x00,0xb3,0x61,0x0c,0xb0,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaef0, 0, {0x48,0x11,0x8d,0x00,0x87,0x20,0x2f,0x01,0x28,0x70,0x02,0x0c,0x84,0x8d,0x04,0x31 }},
+ {16, 0xaf00, 0, {0xcc,0xc9,0x72,0x02,0xdd,0x00,0x37,0x33,0x21,0xd8,0x08,0x40,0x02,0xdc,0x00,0xb7 }},
+ {16, 0xaf10, 0, {0x20,0x3d,0xc0,0x09,0x50,0x22,0xf0,0x00,0x97,0x00,0x21,0x80,0x0a,0xfc,0x02,0x92 }},
+ {16, 0xaf20, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x1e,0x82,0x87,0xb0,0x2d,0x20 }},
+ {16, 0xaf30, 0, {0x08,0x39,0x02,0x1e,0x41,0xa7,0x80,0x24,0xe0,0x09,0x7a,0x32,0x8e,0x82,0x07,0xa0 }},
+ {16, 0xaf40, 0, {0x25,0xe0,0x8b,0x48,0x02,0x1e,0x00,0xa7,0xe1,0x2d,0xe0,0x4b,0x58,0x00,0xda,0x00 }},
+ {16, 0xaf50, 0, {0xa0,0x80,0x24,0x60,0x08,0x7a,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaf60, 0, {0x48,0x14,0xcc,0x00,0x83,0x00,0x2c,0x00,0x08,0x30,0x02,0x8c,0x00,0x93,0x00,0x22 }},
+ {16, 0xaf70, 0, {0xc1,0x09,0x30,0x42,0xcc,0x00,0x83,0x00,0x60,0xc0,0x08,0x1a,0x02,0xce,0x04,0xb3 }},
+ {16, 0xaf80, 0, {0xe0,0x28,0xa0,0x09,0x1c,0x82,0x4b,0x08,0xa3,0x80,0x24,0xa0,0x2a,0x30,0x02,0x9a }},
+ {16, 0xaf90, 0, {0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xca,0x00,0x2f,0x88 }},
+ {16, 0xafa0, 0, {0x0c,0xa0,0x13,0x28,0x00,0xee,0x00,0x2e,0x80,0x2d,0xa0,0x03,0xe8,0x00,0xda,0x00 }},
+ {16, 0xafb0, 0, {0x76,0x80,0x0e,0xe8,0x03,0xbb,0x80,0xee,0x40,0x2f,0xa2,0x8f,0xe6,0x03,0xeb,0x86 }},
+ {16, 0xafc0, 0, {0xfa,0x80,0x37,0x82,0x0c,0x20,0x07,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xafd0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x40,0x1e,0x00,0x0f,0x80,0x0b,0x61,0x00,0xe8,0xc0,0x3a }},
+ {16, 0xafe0, 0, {0x00,0x0e,0x80,0x03,0xe0,0x01,0xf8,0x00,0x7e,0x10,0x1e,0x81,0x03,0xe0,0x08,0xf8 }},
+ {16, 0xaff0, 0, {0x00,0x3e,0x00,0x0d,0x80,0x03,0xc0,0x28,0xdc,0x50,0x3b,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0xb000, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc4,0x02,0xc9,0x00,0x3e,0x42 }},
+ {16, 0xb010, 0, {0x0f,0x10,0x03,0xa6,0x00,0xc9,0x01,0x3a,0x40,0x0e,0x94,0x01,0xe4,0x10,0xf1,0x04 }},
+ {16, 0xb020, 0, {0x32,0x40,0x0f,0x9a,0x23,0x20,0x60,0xf8,0x04,0x0a,0x42,0x0e,0x90,0x13,0x24,0x00 }},
+ {16, 0xb030, 0, {0xc1,0x00,0x32,0x40,0x0f,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb040, 0, {0x80,0x04,0x67,0x08,0xa9,0x00,0x6e,0x40,0x08,0x90,0x02,0x27,0x82,0x89,0x00,0x26 }},
+ {16, 0xb050, 0, {0x40,0x08,0x9c,0x03,0xa4,0x10,0xb9,0x00,0x36,0x40,0x9b,0x1c,0x1a,0x23,0x04,0xb8 }},
+ {16, 0xb060, 0, {0x00,0x3a,0x40,0x0e,0x10,0x02,0x24,0x02,0xc9,0xa0,0xa2,0x40,0x0b,0x90,0x0a,0x20 }},
+ {16, 0xb070, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x25,0x80,0x89,0x04,0x2c,0x40 }},
+ {16, 0xb080, 0, {0x08,0x90,0x02,0x84,0x81,0x99,0x40,0x2e,0x40,0x1a,0x90,0x06,0xe4,0x01,0xb9,0x00 }},
+ {16, 0xb090, 0, {0xa6,0x41,0x1b,0x90,0x82,0x21,0x00,0xb8,0x10,0x2e,0x40,0x0a,0x92,0x0a,0xa4,0x01 }},
+ {16, 0xb0a0, 0, {0x8f,0x22,0x23,0x40,0x0b,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb0b0, 0, {0x08,0x04,0x04,0x80,0xa3,0x20,0x2c,0x41,0x09,0x12,0x02,0x04,0x80,0x81,0x20,0x24 }},
+ {16, 0xb0c0, 0, {0x48,0x0a,0x36,0x02,0xc4,0x80,0xb1,0x20,0x04,0xc8,0x4b,0x14,0x02,0x05,0x00,0xb1 }},
+ {16, 0xb0d0, 0, {0x05,0x28,0x50,0x0a,0x90,0x02,0x05,0x02,0x85,0x00,0x21,0x40,0x0b,0x12,0x02,0x02 }},
+ {16, 0xb0e0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xc8,0x00,0x6e,0x14 }},
+ {16, 0xb0f0, 0, {0x2c,0x85,0x02,0xa1,0x40,0xc8,0x50,0x3a,0x14,0x0e,0x80,0x02,0xe1,0x40,0xb0,0x50 }},
+ {16, 0xb100, 0, {0x32,0x00,0x0b,0x80,0x03,0x20,0x00,0xfa,0x00,0x3e,0x00,0x0e,0x80,0x03,0xa0,0x02 }},
+ {16, 0xb110, 0, {0xc8,0x00,0x13,0x00,0x0f,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb120, 0, {0x98,0x1d,0xe4,0x48,0xf9,0x14,0x3f,0x40,0x0c,0x91,0x03,0xe4,0x42,0xfd,0x10,0x36 }},
+ {16, 0xb130, 0, {0x44,0x0d,0x91,0x23,0xa4,0x48,0xf9,0x11,0x38,0x44,0x0f,0xd0,0x03,0xe5,0x14,0x39 }},
+ {16, 0xb140, 0, {0x42,0x7b,0x40,0x8e,0xd0,0x01,0xf5,0x00,0xa9,0x40,0x3e,0x50,0x07,0x96,0x83,0xe6 }},
+ {16, 0xb150, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xf6,0x80,0xdd,0xae,0x3a,0x50 }},
+ {16, 0xb160, 0, {0x0d,0x9a,0x0b,0x76,0x80,0xcf,0x88,0x32,0x70,0x2d,0xda,0x03,0xa7,0x01,0xe9,0x92 }},
+ {16, 0xb170, 0, {0x37,0x68,0x0d,0x94,0x03,0xe7,0x00,0xed,0xa0,0x3a,0x50,0x0f,0xd0,0x03,0xe7,0x02 }},
+ {16, 0xb180, 0, {0xcd,0x80,0x33,0x68,0x0c,0xd8,0x83,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb190, 0, {0x38,0x10,0xe1,0x00,0x88,0x40,0x20,0x20,0x0c,0x8c,0x02,0x23,0x00,0x88,0xe0,0x22 }},
+ {16, 0xb1a0, 0, {0x30,0x08,0x84,0x02,0xe3,0x00,0xb8,0xe0,0x22,0x14,0x8d,0x88,0x02,0xe3,0x00,0xb8 }},
+ {16, 0xb1b0, 0, {0x50,0x2e,0xa8,0x8b,0x80,0x22,0xe3,0x48,0x88,0x50,0x22,0x00,0x08,0x8c,0x02,0x0e }},
+ {16, 0xb1c0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x40,0x91,0x00,0x2a,0x48 }},
+ {16, 0xb1d0, 0, {0x09,0x14,0x82,0x05,0x20,0x81,0x08,0x20,0x58,0x09,0x11,0x02,0x85,0x88,0xb1,0x40 }},
+ {16, 0xb1e0, 0, {0xa0,0x40,0x08,0x12,0x02,0xc5,0x80,0xa1,0x00,0x28,0x40,0x0b,0x18,0x02,0xc4,0x84 }},
+ {16, 0xb1f0, 0, {0xa1,0x00,0x24,0x50,0x08,0x10,0x92,0x03,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb200, 0, {0x18,0x15,0xac,0x10,0x9b,0x00,0x22,0x40,0x08,0x90,0x02,0x04,0x06,0x89,0x04,0x20 }},
+ {16, 0xb210, 0, {0x40,0x09,0x90,0x02,0xe4,0x01,0xb9,0x02,0x22,0x41,0x89,0xa0,0x82,0xe0,0xa0,0xb9 }},
+ {16, 0xb220, 0, {0x28,0x2e,0x44,0x0b,0xb0,0x02,0xe4,0x02,0xb9,0x00,0x26,0x40,0x28,0x10,0x02,0x06 }},
+ {16, 0xb230, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xd9,0x00,0x38,0x40 }},
+ {16, 0xb240, 0, {0x0d,0x90,0x03,0x24,0x00,0xc9,0xa0,0xa2,0x40,0x8d,0x90,0x03,0xa4,0x00,0xf9,0x00 }},
+ {16, 0xb250, 0, {0x36,0x40,0x0c,0x84,0x13,0xe2,0x00,0xe9,0x00,0x3a,0x50,0x0f,0x9c,0x02,0xe6,0x84 }},
+ {16, 0xb260, 0, {0xe9,0x00,0xb6,0x40,0x0c,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb270, 0, {0x28,0x01,0xa4,0x00,0xe1,0x00,0x3e,0x68,0x0e,0x10,0x03,0xa4,0x00,0xf1,0x28,0x3a }},
+ {16, 0xb280, 0, {0x40,0x0e,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x42,0x0f,0x80,0x23,0xe2,0x00,0xf9 }},
+ {16, 0xb290, 0, {0x00,0x3e,0x40,0x0f,0x91,0x23,0xe4,0x40,0xc1,0x00,0x3a,0x40,0x0f,0x90,0x0b,0xca }},
+ {16, 0xb2a0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0x80,0x00,0xc8,0x00,0x32,0x00 }},
+ {16, 0xb2b0, 0, {0x0c,0x80,0x03,0xa0,0x20,0xc8,0x40,0x3e,0x00,0x0e,0x81,0x63,0x60,0x00,0xf0,0x04 }},
+ {16, 0xb2c0, 0, {0x3c,0x01,0x0c,0x84,0x03,0xe0,0x00,0xc8,0x00,0x3e,0x00,0x0e,0x80,0x03,0xc1,0x00 }},
+ {16, 0xb2d0, 0, {0xd8,0x10,0x32,0x00,0x0c,0x80,0x23,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb2e0, 0, {0x28,0x05,0x38,0x60,0x8e,0x00,0x22,0x80,0x0a,0xa0,0x02,0x38,0x80,0xbe,0x00,0x3a }},
+ {16, 0xb2f0, 0, {0x80,0x08,0xe0,0x02,0x28,0x00,0xba,0x00,0x23,0x98,0x18,0xec,0x02,0xf8,0x20,0xae }},
+ {16, 0xb300, 0, {0x00,0x22,0x80,0x0b,0xe4,0x82,0xe8,0x02,0xce,0x44,0x28,0x80,0x0d,0xa0,0x0a,0x0a }},
+ {16, 0xb310, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x40,0x00,0x82,0x04,0xa0,0xc0 }},
+ {16, 0xb320, 0, {0x09,0x30,0x02,0x8e,0x04,0x83,0x50,0x6c,0xc0,0x0a,0x30,0x86,0x0c,0x00,0xb3,0x00 }},
+ {16, 0xb330, 0, {0x28,0x30,0x0a,0x36,0x12,0xcc,0x80,0x81,0x00,0x24,0xc0,0x0b,0x32,0x06,0xcc,0x00 }},
+ {16, 0xb340, 0, {0x80,0x88,0x64,0x60,0x28,0x10,0x02,0x02,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb350, 0, {0xa0,0x01,0x10,0x12,0x84,0x40,0x21,0xc8,0x0a,0x72,0x02,0x10,0x00,0xb7,0x00,0x2d }},
+ {16, 0xb360, 0, {0xcc,0x08,0x38,0x12,0x1c,0x00,0xb3,0x30,0x20,0x00,0x08,0x71,0x82,0xfe,0x00,0xa4 }},
+ {16, 0xb370, 0, {0x80,0x21,0xc8,0x0b,0x70,0x02,0xdc,0x01,0x87,0x00,0x2c,0x42,0x09,0x51,0x02,0x20 }},
+ {16, 0xb380, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x12,0x00,0xc2,0x80,0x31,0xf8 }},
+ {16, 0xb390, 0, {0x4c,0xfc,0x13,0x92,0x09,0xc7,0x80,0x3c,0xed,0x1e,0x78,0x27,0x1e,0x00,0xf7,0x8c }},
+ {16, 0xb3a0, 0, {0x79,0x20,0x08,0x7a,0x03,0xde,0x81,0x84,0x80,0x3d,0xe0,0x0e,0x78,0x03,0xfe,0x20 }},
+ {16, 0xb3b0, 0, {0xc5,0x81,0x35,0x60,0x2c,0x58,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb3c0, 0, {0x08,0x1d,0x80,0x00,0xf8,0x04,0x3e,0xd0,0x0f,0xb0,0x13,0xe0,0x00,0xfb,0x02,0x3a }},
+ {16, 0xb3d0, 0, {0xd0,0x0f,0xa0,0x0b,0xac,0x40,0xfb,0x00,0x3a,0x00,0x2f,0xb0,0x03,0xcc,0x00,0xf0 }},
+ {16, 0xb3e0, 0, {0x00,0x3a,0xc4,0x0f,0xb0,0x03,0xfc,0x41,0xf3,0x00,0x3a,0x40,0x0f,0x50,0x93,0xc2 }},
+ {16, 0xb3f0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xcc,0x81,0x3f,0xfc }},
+ {16, 0xb400, 0, {0x1c,0xf8,0x03,0x76,0x40,0xef,0x92,0x3f,0xe4,0x8c,0xf8,0x03,0xbf,0x10,0xff,0x80 }},
+ {16, 0xb410, 0, {0xb3,0x20,0x0e,0xf9,0x13,0xfe,0x24,0xfd,0x94,0x37,0xe0,0x1c,0xf9,0x03,0xee,0x00 }},
+ {16, 0xb420, 0, {0xcd,0x80,0xb3,0xe0,0x0c,0x58,0x02,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb430, 0, {0xa8,0x11,0x94,0x40,0x80,0x00,0x2f,0xc4,0x08,0x72,0x02,0xdd,0x08,0xd7,0x00,0x2d }},
+ {16, 0xb440, 0, {0xcc,0x08,0xde,0x03,0x5c,0x00,0xb7,0x04,0x21,0x80,0xc8,0x70,0x83,0xdc,0x00,0xb4 }},
+ {16, 0xb450, 0, {0xa0,0x2f,0xc0,0x0c,0x70,0x02,0xde,0x80,0x87,0x00,0x21,0xc2,0x0a,0x51,0x42,0x2a }},
+ {16, 0xb460, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x84,0x00,0x2d,0xc8 }},
+ {16, 0xb470, 0, {0x48,0x70,0x02,0x54,0x0c,0xa7,0x00,0x2c,0xc0,0x89,0x72,0x02,0x5c,0x00,0xb3,0x10 }},
+ {16, 0xb480, 0, {0x20,0x00,0x0a,0x70,0x06,0xdc,0x00,0xb4,0x20,0x2d,0xc0,0x08,0x70,0x02,0xdc,0x80 }},
+ {16, 0xb490, 0, {0x93,0x00,0x20,0xc0,0x08,0x50,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb4a0, 0, {0x20,0x14,0xc0,0x00,0x80,0x00,0x2e,0xc0,0x08,0x30,0x02,0xc4,0x08,0xa2,0x42,0x2c }},
+ {16, 0xb4b0, 0, {0xc1,0x09,0x20,0x02,0x4c,0x00,0xb3,0x00,0x20,0x80,0x08,0x3c,0x22,0x8c,0x20,0xb0 }},
+ {16, 0xb4c0, 0, {0x08,0x2e,0xe0,0x08,0x38,0x10,0xcf,0x0a,0x93,0x40,0xa0,0xf0,0x0a,0x10,0x02,0x08 }},
+ {16, 0xb4d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa8,0x00,0xc1,0x00,0x3f,0xc0 }},
+ {16, 0xb4e0, 0, {0x2c,0xf0,0x03,0x68,0x00,0xaa,0x00,0x3f,0xc0,0x2d,0x80,0x03,0x7c,0x00,0xff,0x00 }},
+ {16, 0xb4f0, 0, {0x32,0x00,0x0e,0xb0,0x12,0xed,0x24,0xfa,0x08,0x27,0xc8,0x10,0xb8,0xa2,0xff,0x60 }},
+ {16, 0xb500, 0, {0x98,0xa0,0xa2,0xe0,0x0c,0x50,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb510, 0, {0x80,0x00,0xc9,0x06,0xf8,0x41,0x3e,0xc0,0x0f,0xb0,0x03,0xe9,0x10,0x5a,0x20,0x3e }},
+ {16, 0xb520, 0, {0xc0,0x0e,0x80,0x03,0xec,0x00,0xf3,0x00,0x7e,0x01,0x0f,0xb0,0x93,0xed,0x00,0xf8 }},
+ {16, 0xb530, 0, {0x40,0x3e,0xc0,0x0e,0xb0,0x03,0xfc,0x00,0xe3,0x08,0x3c,0xc2,0x0f,0xd0,0x13,0xe0 }},
+ {16, 0xb540, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf3,0x02,0xcc,0x00,0x3b,0xc2 }},
+ {16, 0xb550, 0, {0x0c,0xf0,0x23,0xae,0x40,0xdf,0x81,0x39,0xc0,0x06,0xd0,0x03,0xfc,0x00,0xff,0x04 }},
+ {16, 0xb560, 0, {0x31,0x41,0x0c,0xf0,0x03,0xfc,0x00,0xcc,0xa0,0x37,0xc2,0x0c,0xf0,0x03,0x7c,0x04 }},
+ {16, 0xb570, 0, {0xcd,0x00,0x33,0xf0,0x0c,0xd0,0x03,0x08,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb580, 0, {0x81,0x04,0x60,0x00,0x88,0x80,0x22,0xc0,0x0a,0xb0,0x02,0xe9,0x00,0xab,0x44,0x2e }},
+ {16, 0xb590, 0, {0xc0,0x08,0x88,0x02,0xec,0x00,0xbb,0x00,0xa2,0x70,0x0a,0xb4,0x02,0xcc,0x00,0xa0 }},
+ {16, 0xb5a0, 0, {0x20,0x22,0xc0,0x0f,0xbc,0x02,0xcc,0x0a,0x8b,0x80,0xa2,0xc0,0x0d,0x90,0x02,0x20 }},
+ {16, 0xb5b0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x20,0x00,0x89,0x80,0x2a,0xc0 }},
+ {16, 0xb5c0, 0, {0x08,0xb0,0x02,0xcc,0x06,0x88,0x60,0x2e,0xc0,0x0a,0x98,0x06,0xec,0x01,0xbb,0x00 }},
+ {16, 0xb5d0, 0, {0x22,0x31,0x02,0xb2,0x02,0xec,0xa0,0x8a,0x00,0x26,0xc0,0x48,0xa8,0x02,0xec,0x04 }},
+ {16, 0xb5e0, 0, {0xa9,0x80,0x22,0x40,0x08,0x90,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb5f0, 0, {0x08,0x04,0x00,0x00,0x80,0x00,0x20,0xc0,0x0a,0x30,0x42,0xcc,0x00,0x80,0x01,0x2c }},
+ {16, 0xb600, 0, {0xc0,0x1a,0x12,0x02,0xcc,0x00,0xb3,0x00,0x20,0x00,0x4a,0x30,0x02,0xcc,0x00,0xa0 }},
+ {16, 0xb610, 0, {0x00,0x08,0xc0,0x0b,0x20,0x06,0xec,0xa0,0xa3,0x00,0xa0,0x40,0x29,0x10,0x00,0x02 }},
+ {16, 0xb620, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xc8,0x50,0x3b,0xc0 }},
+ {16, 0xb630, 0, {0x0c,0xb0,0x03,0xac,0x00,0xc9,0x00,0x3b,0xc0,0x0e,0x92,0x83,0xfc,0x00,0xbf,0x00 }},
+ {16, 0xb640, 0, {0x12,0x00,0x0c,0xb0,0x03,0xec,0x00,0x88,0x26,0x16,0xc0,0x0c,0x80,0x17,0x5c,0x80 }},
+ {16, 0xb650, 0, {0xe9,0x01,0x32,0x40,0x2c,0xd0,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb660, 0, {0xa0,0x1d,0xd0,0x00,0xfc,0x20,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xfc,0x00,0x3f }},
+ {16, 0xb670, 0, {0xc0,0x0d,0x80,0x03,0xfc,0x08,0xff,0x00,0x3f,0x00,0x0f,0xf0,0x03,0xfc,0x10,0xf8 }},
+ {16, 0xb680, 0, {0x40,0x37,0xc0,0x0e,0xe0,0x21,0xfc,0x08,0xdf,0x00,0x3f,0x40,0x0f,0xd0,0x03,0xe0 }},
+ {16, 0xb690, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0xc0,0xff,0x21,0x71,0x24 }},
+ {16, 0xb6a0, 0, {0x0f,0xf1,0x83,0xf2,0x40,0xff,0x00,0x37,0xc4,0x9f,0xf2,0x47,0x3d,0x04,0xc7,0x20 }},
+ {16, 0xb6b0, 0, {0x33,0xc0,0x0c,0x78,0x23,0xfe,0x40,0xe8,0x10,0x27,0xc4,0x0f,0xf2,0x13,0x3c,0x84 }},
+ {16, 0xb6c0, 0, {0xc4,0x81,0x33,0x20,0x4c,0xf0,0x23,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb6d0, 0, {0x80,0x10,0xed,0x40,0xbf,0x54,0x62,0xc8,0x0b,0xf6,0x02,0xe0,0x00,0xbb,0xd0,0x22 }},
+ {16, 0xb6e0, 0, {0xf0,0x1f,0xf9,0x12,0x3d,0x80,0x9f,0x81,0x2b,0xe0,0x0a,0xb8,0x12,0xe8,0x00,0x8f }},
+ {16, 0xb6f0, 0, {0x04,0x22,0xd0,0x08,0xb3,0x8a,0xbf,0x42,0x8b,0x82,0x22,0xe0,0x28,0x8c,0x02,0x20 }},
+ {16, 0xb700, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0xb3,0x28,0x28,0x08 }},
+ {16, 0xb710, 0, {0x0b,0x30,0x06,0x80,0x80,0xb3,0x02,0x24,0xd1,0x0b,0x30,0x02,0x8d,0x80,0x93,0x10 }},
+ {16, 0xb720, 0, {0x20,0xce,0x8b,0x30,0x02,0xcc,0x84,0xa1,0x21,0x2c,0xcc,0x0a,0x30,0x0a,0x4c,0x00 }},
+ {16, 0xb730, 0, {0x93,0x00,0x28,0xc0,0x08,0x3c,0x02,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb740, 0, {0xc0,0x15,0xac,0x10,0xbb,0x02,0x6a,0xe0,0x0b,0xb0,0x02,0xe1,0x08,0xbb,0x04,0x2a }},
+ {16, 0xb750, 0, {0xc0,0x0a,0xb0,0x12,0x8c,0x00,0x9b,0x00,0x2a,0xc0,0x0b,0xb1,0x06,0xc8,0x80,0x8b }},
+ {16, 0xb760, 0, {0x82,0x6a,0xc1,0x0a,0x30,0x02,0xac,0x18,0x88,0x10,0x2a,0x48,0x08,0x80,0x02,0x30 }},
+ {16, 0xb770, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xfb,0x00,0xaa,0x30 }},
+ {16, 0xb780, 0, {0x0f,0xb0,0x03,0xa8,0x00,0xf3,0x01,0xb6,0xc1,0x0b,0xb0,0x02,0xac,0x08,0x4b,0x00 }},
+ {16, 0xb790, 0, {0xb2,0xc0,0x0f,0xb8,0x02,0xec,0x10,0xa9,0x81,0x3e,0xc0,0x0f,0xb0,0x03,0x0c,0x00 }},
+ {16, 0xb7a0, 0, {0xcb,0xa0,0x18,0xd0,0x0c,0xb0,0x03,0x10,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb7b0, 0, {0xe0,0x01,0xbc,0x08,0xf7,0x00,0x37,0x00,0x0f,0xf0,0x03,0xfd,0x00,0xff,0x00,0x37 }},
+ {16, 0xb7c0, 0, {0xc0,0x0f,0xb0,0x07,0x7c,0x00,0xe7,0x00,0x3e,0xc0,0x0a,0xf0,0x03,0xfe,0x00,0xf7 }},
+ {16, 0xb7d0, 0, {0x00,0x36,0xc0,0x0c,0xf0,0x03,0xfc,0x00,0xff,0x80,0x37,0xe0,0x0f,0xa0,0x03,0xb8 }},
+ {16, 0xb7e0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xdb,0x00,0x36,0x00 }},
+ {16, 0xb7f0, 0, {0x0e,0xb0,0x03,0x69,0x00,0xdb,0x09,0x3a,0xc0,0x1f,0x30,0x23,0xec,0x08,0xcb,0x20 }},
+ {16, 0xb800, 0, {0x34,0xc0,0x2f,0xb0,0x03,0xec,0x40,0xeb,0x48,0x3e,0xc4,0x4d,0xb0,0x8b,0x6c,0x00 }},
+ {16, 0xb810, 0, {0xcb,0x00,0x32,0x90,0x0f,0x30,0x03,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb820, 0, {0xc8,0x05,0x3c,0x00,0x8f,0x00,0x22,0x00,0x48,0xf0,0x22,0x2c,0x00,0x8f,0x00,0x23 }},
+ {16, 0xb830, 0, {0xe0,0x8b,0xf5,0x10,0x3c,0x00,0x8f,0x80,0x23,0xf0,0x80,0x98,0x03,0x2d,0x44,0xdb }},
+ {16, 0xb840, 0, {0x00,0x23,0xd4,0x08,0xf8,0x02,0x3c,0x00,0x83,0x00,0x22,0xc0,0x0b,0xa4,0x82,0x32 }},
+ {16, 0xb850, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0x93,0x00,0x24,0x00 }},
+ {16, 0xb860, 0, {0x0b,0x30,0x02,0x84,0x00,0xb3,0x01,0x28,0xf6,0x09,0x34,0x32,0x8c,0x01,0xb3,0xd0 }},
+ {16, 0xb870, 0, {0x24,0xe8,0x0a,0x31,0x0a,0x86,0x00,0x83,0x00,0x2a,0xe0,0x00,0x30,0x02,0x8c,0x00 }},
+ {16, 0xb880, 0, {0x83,0x00,0x28,0xc0,0x89,0x38,0xa2,0x78,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb890, 0, {0x20,0x01,0x1e,0x00,0x97,0x94,0x23,0xe0,0x09,0x38,0x02,0x32,0x00,0x97,0xa1,0x21 }},
+ {16, 0xb8a0, 0, {0xe4,0x0b,0x78,0x02,0x1e,0x40,0xb7,0xa0,0x25,0xec,0x08,0xfc,0x02,0x3a,0x00,0x93 }},
+ {16, 0xb8b0, 0, {0xb8,0x21,0xe0,0x08,0x78,0x82,0x9e,0x40,0x87,0xc0,0x29,0xa0,0x0b,0x58,0x02,0x48 }},
+ {16, 0xb8c0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x2c,0x00,0xdb,0x00,0x34,0x20 }},
+ {16, 0xb8d0, 0, {0x0f,0x3a,0x03,0x8e,0x00,0xf3,0xb0,0x28,0xc4,0x0b,0x3a,0x03,0xae,0x40,0xf3,0xa0 }},
+ {16, 0xb8e0, 0, {0x34,0xee,0x0f,0x30,0x23,0x84,0x00,0xe3,0xf0,0x38,0xc0,0x0c,0xb0,0x0b,0x8e,0x42 }},
+ {16, 0xb8f0, 0, {0xc3,0x00,0x38,0xc0,0x0f,0x30,0x63,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb900, 0, {0x40,0x1d,0xbc,0x00,0xeb,0x42,0x3a,0xc4,0x1e,0xb1,0x07,0x88,0xd1,0xe3,0x00,0x3f }},
+ {16, 0xb910, 0, {0xc5,0x8f,0xf1,0x63,0xac,0x10,0xcb,0x50,0x3b,0xc3,0x0f,0xd1,0x03,0xc8,0x00,0xbb }},
+ {16, 0xb920, 0, {0x20,0x3b,0xc0,0x2e,0xf1,0x03,0x1c,0x00,0xff,0x00,0x37,0xc0,0x4f,0xd1,0x03,0x90 }},
+ {16, 0xb930, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x40,0xfb,0x44,0xb2,0xc0 }},
+ {16, 0xb940, 0, {0x4f,0xb3,0x43,0x24,0x00,0xdb,0x10,0x36,0xc0,0x4c,0xbe,0x22,0x6d,0x20,0xcb,0x50 }},
+ {16, 0xb950, 0, {0x3e,0xc9,0x4c,0xb0,0x13,0x24,0x00,0xcf,0x20,0x33,0xc0,0x3d,0xf0,0x23,0x2c,0xc0 }},
+ {16, 0xb960, 0, {0xd8,0x00,0x3e,0x40,0x8f,0x30,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb970, 0, {0x48,0x11,0x9c,0x04,0xb7,0x60,0x21,0xc1,0x8b,0xf0,0xa2,0x14,0x10,0x87,0x00,0x0f }},
+ {16, 0xb980, 0, {0xc8,0x0d,0x71,0x0a,0x1d,0x00,0x87,0x00,0x2c,0xcc,0x48,0x70,0x2a,0x9c,0x00,0x87 }},
+ {16, 0xb990, 0, {0x0c,0x21,0xc0,0x0c,0x72,0x02,0x0c,0xa2,0x87,0x00,0x2d,0xc0,0x0b,0x70,0x02,0x12 }},
+ {16, 0xb9a0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xb3,0x80,0x21,0xe0 }},
+ {16, 0xb9b0, 0, {0x0b,0x7a,0x02,0xde,0x00,0xb7,0x81,0x05,0xe4,0x08,0x79,0x02,0x5c,0x80,0x87,0xa0 }},
+ {16, 0xb9c0, 0, {0x2d,0xe0,0x08,0xf8,0x06,0xb6,0x00,0x87,0x80,0x20,0xe4,0x0a,0x7b,0x12,0x1e,0x90 }},
+ {16, 0xb9d0, 0, {0x97,0x88,0x2d,0xe0,0x0b,0x78,0x0e,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb9e0, 0, {0x48,0x14,0xcc,0x00,0xb3,0x00,0x20,0xd0,0x0b,0xb0,0x02,0x6e,0x34,0xa3,0x00,0x2c }},
+ {16, 0xb9f0, 0, {0xc1,0x09,0x30,0x02,0x4c,0x00,0x83,0x00,0x2c,0xc0,0x48,0x10,0x02,0x8d,0x80,0x83 }},
+ {16, 0xba00, 0, {0xc0,0x00,0xc0,0x8a,0x30,0x12,0x0c,0x00,0x80,0x00,0x2c,0x16,0x0b,0x38,0x02,0x12 }},
+ {16, 0xba10, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfa,0x00,0x33,0x88 }},
+ {16, 0xba20, 0, {0x0f,0xa0,0x03,0x79,0x90,0xfa,0x01,0x36,0x80,0x1c,0xa0,0x03,0x68,0x00,0xca,0x00 }},
+ {16, 0xba30, 0, {0x3e,0x81,0x2c,0xa0,0x0b,0xb9,0x0c,0xce,0xe2,0xb2,0x80,0x8e,0xa0,0x0b,0x28,0x00 }},
+ {16, 0xba40, 0, {0xda,0x80,0x3c,0xb0,0x0f,0xe0,0x83,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xba50, 0, {0x48,0x00,0xe0,0x00,0xf0,0x00,0x3e,0x00,0x0f,0x80,0x03,0xa0,0x00,0xc8,0x00,0x2e }},
+ {16, 0xba60, 0, {0x00,0x0f,0x84,0x23,0xa0,0x00,0xf0,0x40,0x3e,0x10,0x0f,0x84,0x03,0xe1,0x02,0xf8 }},
+ {16, 0xba70, 0, {0x48,0x3e,0x10,0x0c,0x80,0x03,0xc0,0x10,0xf8,0x80,0x3e,0x00,0x0f,0x00,0x03,0xd2 }},
+ {16, 0xba80, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xd9,0x00,0x36,0x42 }},
+ {16, 0xba90, 0, {0x0f,0x90,0x03,0x24,0x18,0xf9,0x10,0x3c,0x48,0x68,0x92,0x13,0xe4,0x00,0xa9,0x11 }},
+ {16, 0xbaa0, 0, {0xb2,0x60,0x0e,0x91,0x03,0x26,0x00,0xc9,0x00,0x32,0x60,0x0c,0x10,0x03,0x24,0x08 }},
+ {16, 0xbab0, 0, {0xc9,0x00,0x3e,0x40,0x0c,0x90,0x23,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbac0, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x22,0x40,0x0b,0x90,0x02,0xa4,0x08,0x89,0x00,0x2e }},
+ {16, 0xbad0, 0, {0x42,0x48,0x94,0x02,0xe4,0x00,0x89,0x80,0x22,0x70,0x08,0x14,0x22,0xa4,0x02,0x89 }},
+ {16, 0xbae0, 0, {0x42,0x2a,0x70,0x28,0x90,0x0a,0x24,0x00,0xa9,0x00,0x2e,0x40,0x28,0x90,0x02,0xa0 }},
+ {16, 0xbaf0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x04,0x00,0x99,0x00,0x26,0xc0 }},
+ {16, 0xbb00, 0, {0x03,0x90,0x02,0x24,0x01,0xa9,0x00,0x0e,0x40,0x0a,0x90,0x46,0xc4,0x0a,0x89,0x00 }},
+ {16, 0xbb10, 0, {0x20,0x48,0x0a,0x90,0x02,0x05,0x80,0x81,0x41,0xa0,0x58,0x88,0x90,0x02,0x24,0x08 }},
+ {16, 0xbb20, 0, {0x8d,0x80,0x2f,0xc0,0x08,0x98,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbb30, 0, {0x08,0x04,0x04,0x80,0x81,0x20,0x20,0x40,0x0b,0x12,0x02,0x84,0x00,0x81,0x24,0x2c }},
+ {16, 0xbb40, 0, {0x58,0x0a,0x32,0x22,0xc5,0x84,0xa1,0x00,0x20,0x50,0x08,0xb0,0x02,0x85,0x08,0x81 }},
+ {16, 0xbb50, 0, {0x40,0x20,0x5a,0x08,0x16,0x82,0x04,0x00,0xa5,0x00,0x2d,0x40,0x08,0x12,0x82,0x82 }},
+ {16, 0xbb60, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xd8,0x50,0x36,0x14 }},
+ {16, 0xbb70, 0, {0x0f,0x85,0x23,0x01,0x40,0xe8,0x00,0x3e,0x00,0x0e,0x80,0x43,0xc0,0x08,0xca,0x00 }},
+ {16, 0xbb80, 0, {0x32,0x80,0x0e,0x80,0x03,0x20,0x00,0xc0,0x00,0x32,0x08,0x2c,0x02,0x03,0x20,0x08 }},
+ {16, 0xbb90, 0, {0xc8,0x00,0x3f,0x00,0x0c,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbba0, 0, {0x98,0x1d,0xe4,0x40,0xf9,0x10,0x3f,0x40,0x0f,0x91,0x43,0xf4,0x04,0xf9,0x10,0x3e }},
+ {16, 0xbbb0, 0, {0x44,0x0d,0x11,0x03,0xe4,0x44,0x59,0x40,0x3e,0x50,0x4f,0x50,0x43,0xd4,0x02,0xfd }},
+ {16, 0xbbc0, 0, {0x40,0x3e,0x40,0x0f,0x90,0x0b,0xe5,0x00,0xf9,0x00,0x3e,0x40,0x4f,0xd0,0x03,0xe6 }},
+ {16, 0xbbd0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x66,0x60,0xc9,0xe0,0x32,0x44 }},
+ {16, 0xbbe0, 0, {0x0f,0x9c,0x03,0xe4,0x00,0xdd,0x84,0x3f,0x68,0x8f,0xd8,0x42,0xe6,0xa0,0xdd,0xa4 }},
+ {16, 0xbbf0, 0, {0x33,0x68,0x0d,0x70,0x03,0x25,0x00,0xc9,0xe0,0xb2,0x68,0x0c,0x9a,0xc3,0x26,0x00 }},
+ {16, 0xbc00, 0, {0x99,0x00,0x3e,0x40,0x0f,0x9a,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbc10, 0, {0x38,0x10,0xe3,0x00,0x88,0x80,0xaa,0x20,0x8b,0x88,0x02,0xe2,0x88,0xb8,0x01,0x2e }},
+ {16, 0xbc20, 0, {0x00,0x0b,0x84,0x02,0xe2,0xb0,0x88,0x50,0x22,0x14,0x08,0x80,0x02,0x82,0x80,0x88 }},
+ {16, 0xbc30, 0, {0xe0,0xb6,0x3a,0x08,0xce,0xa2,0x21,0x08,0x88,0x00,0x2e,0x00,0x0b,0xc4,0x02,0x0e }},
+ {16, 0xbc40, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x80,0x81,0x60,0x68,0x48 }},
+ {16, 0xbc50, 0, {0x5b,0x16,0x02,0xc4,0x20,0xa1,0x40,0x6c,0x50,0x0b,0x14,0x02,0xc4,0x00,0xa1,0x00 }},
+ {16, 0xbc60, 0, {0x24,0x40,0x0b,0x90,0x22,0x14,0x90,0x85,0x42,0x21,0x50,0x5b,0x50,0x1a,0x15,0x00 }},
+ {16, 0xbc70, 0, {0x95,0x00,0x2d,0x40,0x0b,0x51,0x0a,0x82,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbc80, 0, {0x18,0x15,0xa4,0x01,0x89,0x00,0x2a,0x40,0x0b,0x90,0x46,0xe4,0x00,0xb9,0x01,0x2e }},
+ {16, 0xbc90, 0, {0x40,0x0b,0x90,0x20,0xe4,0x00,0xb9,0x00,0x26,0x40,0x18,0xb8,0x02,0xa4,0x02,0x8d }},
+ {16, 0xbca0, 0, {0x08,0x2f,0x40,0x8b,0xd0,0x02,0x24,0x00,0x8d,0x20,0x2f,0x48,0x0b,0xd0,0x02,0x86 }},
+ {16, 0xbcb0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xc9,0x00,0x32,0x40 }},
+ {16, 0xbcc0, 0, {0x0f,0x90,0x02,0xe4,0x10,0x49,0x00,0x3e,0x40,0x0f,0x90,0x02,0xe4,0x00,0xe9,0x01 }},
+ {16, 0xbcd0, 0, {0x36,0x40,0x0f,0x18,0x13,0x24,0x10,0xc9,0x82,0x32,0x40,0x7f,0x90,0x23,0x24,0x00 }},
+ {16, 0xbce0, 0, {0xd9,0x20,0x3e,0x72,0x0f,0x90,0x03,0xa8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbcf0, 0, {0x28,0x01,0x84,0x02,0xf1,0x01,0x16,0x40,0x4f,0x90,0x03,0xe5,0x10,0xf9,0x08,0x2e }},
+ {16, 0xbd00, 0, {0x40,0x0f,0x90,0x13,0xe4,0x00,0xc9,0x01,0x3a,0x40,0x1f,0x90,0x03,0xe4,0x00,0xf9 }},
+ {16, 0xbd10, 0, {0x20,0x34,0x40,0x8c,0x90,0x03,0xc4,0x08,0xf9,0x00,0x3e,0x60,0x0f,0x10,0x03,0x4a }},
+ {16, 0xbd20, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x08,0xf8,0x00,0x3e,0x00 }},
+ {16, 0xbd30, 0, {0x0c,0x80,0x03,0x60,0x00,0xe8,0x00,0x3e,0x02,0x4f,0x80,0x13,0xe0,0x00,0xd0,0x00 }},
+ {16, 0xbd40, 0, {0x3e,0x00,0x0e,0x81,0x03,0x30,0x00,0xcc,0x40,0x33,0x00,0x0c,0xc0,0x0b,0x20,0x20 }},
+ {16, 0xbd50, 0, {0xe8,0x00,0x3e,0x10,0x0f,0xc0,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbd60, 0, {0x28,0x05,0x28,0x04,0xba,0x00,0x22,0x80,0x08,0xa0,0x02,0x28,0x00,0xbe,0xc8,0x6f }},
+ {16, 0xbd70, 0, {0x80,0x0b,0xe1,0x22,0xa8,0x00,0x8e,0x20,0x2f,0x80,0x0b,0xe0,0x23,0x68,0x00,0x8a }},
+ {16, 0xbd80, 0, {0x00,0x22,0x80,0x08,0xe0,0x02,0x29,0x00,0x8a,0x00,0x2e,0xa8,0x0b,0xa0,0x00,0xca }},
+ {16, 0xbd90, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb3,0x00,0x24,0xc0 }},
+ {16, 0xbda0, 0, {0x09,0x30,0x02,0x0c,0x00,0xb3,0xc1,0x2c,0xe0,0x0b,0x38,0x56,0x2c,0x10,0x13,0x00 }},
+ {16, 0xbdb0, 0, {0x2e,0xc0,0x0a,0x38,0x6a,0x20,0x00,0x88,0x00,0x20,0x00,0x09,0x80,0x22,0x4c,0x42 }},
+ {16, 0xbdc0, 0, {0xa3,0x00,0x2c,0xe0,0x0b,0x24,0x80,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbdd0, 0, {0xa0,0x01,0x1c,0x08,0xb7,0x24,0x2f,0xe0,0x09,0x39,0x02,0x1c,0x01,0xb6,0x00,0x2d }},
+ {16, 0xbde0, 0, {0x90,0x0b,0x60,0x92,0x8e,0x00,0x86,0x82,0x2d,0xc2,0x0b,0xf0,0x02,0x5c,0x06,0x87 }},
+ {16, 0xbdf0, 0, {0x00,0x60,0xc0,0x29,0x70,0x02,0x5c,0x00,0x86,0x00,0x2d,0xc0,0x0b,0x60,0x02,0xe8 }},
+ {16, 0xbe00, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1f,0x40,0xf3,0xe4,0x3d,0xe8 }},
+ {16, 0xbe10, 0, {0x0d,0x79,0x0b,0x1e,0xc0,0x67,0x80,0x2d,0xe0,0x0f,0x70,0x43,0x1d,0x80,0xd5,0x00 }},
+ {16, 0xbe20, 0, {0x3d,0x60,0x0e,0x78,0x03,0x1e,0x00,0xcd,0x80,0x31,0xe0,0x0d,0xc8,0x03,0x4e,0x00 }},
+ {16, 0xbe30, 0, {0xe5,0x80,0x3d,0xe0,0x0f,0x48,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbe40, 0, {0x08,0x1d,0xac,0x80,0xfb,0x00,0x70,0xc0,0x6e,0xb6,0x13,0xad,0x40,0xfa,0x00,0x3e }},
+ {16, 0xbe50, 0, {0xc0,0x0f,0x20,0x43,0x2d,0x18,0x59,0x00,0x3e,0x00,0x03,0xb0,0x0b,0xe0,0x00,0xfa }},
+ {16, 0xbe60, 0, {0x00,0xbe,0x00,0x0e,0xb0,0x13,0xac,0x00,0xf8,0x00,0x3e,0xc0,0x0f,0x80,0x03,0xc2 }},
+ {16, 0xbe70, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x40,0xff,0x80,0x3f,0xe6 }},
+ {16, 0xbe80, 0, {0x0f,0xf8,0x23,0x2e,0x04,0xff,0x90,0x3f,0xe4,0x0d,0xba,0x03,0xff,0x40,0xcf,0x80 }},
+ {16, 0xbe90, 0, {0x22,0xe1,0x0c,0x39,0x43,0x32,0x10,0xec,0x90,0x33,0x20,0x8e,0xc8,0x03,0xf2,0x00 }},
+ {16, 0xbea0, 0, {0xdf,0x80,0x3f,0x60,0x0f,0xf8,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbeb0, 0, {0xa8,0x11,0x9c,0x40,0xb7,0x90,0x3c,0xe0,0x0b,0x3a,0x03,0x4e,0x80,0xf3,0xb1,0x2d }},
+ {16, 0xbec0, 0, {0x04,0x4c,0x38,0x23,0xae,0x00,0x80,0x80,0x34,0xe8,0x4d,0x78,0x02,0x3e,0x80,0x87 }},
+ {16, 0xbed0, 0, {0xa0,0x29,0xc0,0x08,0x70,0x02,0xc0,0x80,0x86,0x02,0x2d,0x41,0x0b,0x70,0x02,0xea }},
+ {16, 0xbee0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x48,0x37,0x01,0x2d,0xc9 }},
+ {16, 0xbef0, 0, {0x0b,0x72,0x22,0x1c,0x84,0xb5,0x16,0x0d,0xc4,0x19,0x40,0x42,0xdc,0x80,0x87,0x00 }},
+ {16, 0xbf00, 0, {0x20,0xc8,0x88,0x73,0x0a,0x9c,0x80,0xb5,0x00,0x29,0xc0,0x0a,0x48,0x02,0xc0,0x02 }},
+ {16, 0xbf10, 0, {0x95,0x00,0x2d,0x42,0x0b,0x58,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbf20, 0, {0x20,0x14,0xcc,0x00,0xb3,0x00,0x2a,0xe0,0x0b,0x30,0x02,0x4c,0x20,0xa1,0x01,0x24 }},
+ {16, 0xbf30, 0, {0xc1,0x08,0x00,0x02,0x8c,0x00,0x81,0x00,0x24,0x80,0x09,0x38,0x0a,0x60,0x80,0x92 }},
+ {16, 0xbf40, 0, {0x40,0x2a,0x00,0x0a,0x30,0x02,0xc0,0x00,0x80,0xc8,0x2c,0x72,0x0b,0x14,0x02,0xc8 }},
+ {16, 0xbf50, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xff,0x00,0x2f,0xf4 }},
+ {16, 0xbf60, 0, {0x8f,0xf0,0x03,0x3c,0x00,0xb9,0x00,0x3e,0x40,0x09,0x90,0x03,0xfc,0x02,0xc3,0x01 }},
+ {16, 0xbf70, 0, {0x32,0xc0,0x48,0xb8,0x13,0xa1,0x00,0xba,0x00,0x2a,0x00,0x0a,0xa0,0x07,0xec,0x00 }},
+ {16, 0xbf80, 0, {0xdb,0xc8,0x3e,0x90,0x0f,0xa2,0x02,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbf90, 0, {0x80,0x00,0xec,0x00,0xfb,0x02,0x3e,0xc4,0x0f,0xb0,0x63,0xec,0x01,0xf8,0x40,0x3e }},
+ {16, 0xbfa0, 0, {0x40,0x0b,0x80,0x03,0xcc,0x00,0xfa,0x42,0x3e,0xc0,0x0f,0xb5,0x00,0xac,0x58,0xe9 }},
+ {16, 0xbfb0, 0, {0x82,0x3e,0xc0,0x1d,0x90,0x03,0xec,0x04,0xfa,0x00,0x3e,0x80,0x0f,0xa0,0x03,0xe0 }},
+ {16, 0xbfc0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x0c,0xdf,0x00,0x7f,0xc0 }},
+ {16, 0xbfd0, 0, {0x2c,0xf0,0x03,0x7c,0x01,0xc7,0x00,0x33,0x40,0x8f,0xd0,0x03,0xfc,0x00,0xd8,0x00 }},
+ {16, 0xbfe0, 0, {0x15,0x44,0x0c,0xe0,0x1b,0x3c,0x00,0xcb,0x0e,0x33,0xc0,0x5c,0x62,0x02,0x1c,0x02 }},
+ {16, 0xbff0, 0, {0xc5,0x00,0x2b,0x80,0x0f,0xc0,0x87,0x80,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc000, 0, {0x81,0x44,0x6c,0x10,0xbb,0x00,0x2e,0xc0,0x08,0xb0,0x52,0x0c,0x01,0xfa,0xc4,0x22 }},
+ {16, 0xc010, 0, {0x61,0x0b,0x88,0x03,0x6c,0x00,0x88,0x47,0x2a,0x00,0x0e,0x1c,0x02,0x20,0x02,0x88 }},
+ {16, 0xc020, 0, {0x00,0xaa,0x00,0x28,0x90,0x0a,0x2c,0x04,0xa8,0x00,0x22,0x90,0x0b,0x80,0x02,0xe0 }},
+ {16, 0xc030, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x2c,0x00,0xbb,0x00,0x2e,0xc1 }},
+ {16, 0xc040, 0, {0x08,0x30,0x12,0x6c,0x00,0x88,0x88,0x2a,0x30,0x0b,0xb8,0x02,0xec,0x00,0x9b,0x08 }},
+ {16, 0xc050, 0, {0x2a,0x40,0x08,0xb8,0x02,0x20,0x00,0x82,0x10,0x22,0x00,0x08,0xa0,0x22,0xa0,0x00 }},
+ {16, 0xc060, 0, {0x8b,0x00,0x2a,0x02,0x0b,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc070, 0, {0x08,0x00,0x0c,0x00,0xb3,0x20,0x2c,0xc2,0x08,0x36,0x02,0x2c,0xc0,0xa0,0x08,0x20 }},
+ {16, 0xc080, 0, {0x00,0x0b,0x33,0x46,0xcd,0x28,0x80,0x20,0x28,0xc0,0x0b,0x32,0x02,0x0c,0x20,0x81 }},
+ {16, 0xc090, 0, {0x30,0x28,0xc0,0x08,0x10,0x02,0x81,0x00,0xaa,0x00,0x28,0x00,0x03,0x30,0x02,0xc2 }},
+ {16, 0xc0a0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x7c,0x00,0xfb,0x28,0x2e,0xcc }},
+ {16, 0xc0b0, 0, {0x0c,0x70,0x53,0x7d,0x09,0x88,0x00,0xba,0x00,0x0f,0x80,0x03,0xfd,0x80,0xda,0x60 }},
+ {16, 0xc0c0, 0, {0x3a,0x50,0x8c,0xa2,0x83,0x2c,0x80,0x4b,0x20,0x30,0xc0,0x28,0xa0,0x03,0xa1,0x00 }},
+ {16, 0xc0d0, 0, {0xc9,0x00,0x3a,0x00,0x0f,0x90,0x03,0xc0,0x03,0x10,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc0e0, 0, {0xa0,0x1d,0xfc,0x04,0xfb,0x00,0x7e,0xc9,0x0b,0xb6,0x03,0xfc,0xc0,0xf8,0x0c,0x3f }},
+ {16, 0xc0f0, 0, {0x00,0x4f,0xc3,0x43,0x2c,0x00,0xb8,0x38,0x3f,0x8e,0x5e,0xf0,0x43,0xe0,0x10,0xf8 }},
+ {16, 0xc100, 0, {0x30,0x3f,0x01,0x0f,0xd0,0x03,0x70,0x00,0xfc,0x00,0x37,0x00,0x0d,0xd0,0x07,0xe9 }},
+ {16, 0xc110, 0, {0x03,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0xe0,0xcc,0x80,0x33,0xc0 }},
+ {16, 0xc120, 0, {0x0d,0xf0,0x83,0xfc,0x80,0xdc,0x94,0x33,0xc0,0x1c,0xf1,0x03,0x7d,0x8c,0xff,0x30 }},
+ {16, 0xc130, 0, {0x3f,0x30,0x8f,0xc8,0x03,0x7e,0x10,0xcf,0x90,0x39,0xa0,0x8d,0xf8,0x03,0xae,0x00 }},
+ {16, 0xc140, 0, {0xd5,0x80,0x13,0xe0,0x0c,0x58,0x03,0xf0,0x01,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc150, 0, {0x80,0x10,0xdd,0x08,0x88,0x00,0x23,0xc4,0x08,0xfc,0x02,0xec,0xa8,0xcb,0x20,0x21 }},
+ {16, 0xc160, 0, {0xc2,0x0d,0xf7,0x12,0x1c,0x40,0xdf,0x30,0x22,0xa0,0x0b,0x88,0x02,0x2e,0x04,0xdb }},
+ {16, 0xc170, 0, {0x21,0x22,0xc0,0x08,0xb8,0x22,0x2e,0x00,0xb9,0x80,0x2a,0x60,0x0a,0x88,0x02,0xe0 }},
+ {16, 0xc180, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x45,0xcc,0x10,0x80,0x2c,0x28,0xca }},
+ {16, 0xc190, 0, {0x68,0x30,0x02,0x8d,0x00,0x9b,0x20,0x28,0xc4,0x08,0x32,0x02,0xcc,0x10,0xb3,0x00 }},
+ {16, 0xc1a0, 0, {0x24,0x08,0x0b,0x80,0x42,0x6c,0x00,0x83,0x00,0x2a,0xca,0x3a,0xb0,0x02,0x8c,0x04 }},
+ {16, 0xc1b0, 0, {0xb0,0x04,0x28,0xc0,0x08,0x10,0x02,0xe3,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc1c0, 0, {0xc0,0x15,0x8c,0x02,0x80,0x40,0xaa,0xc0,0x08,0xb0,0x02,0xec,0x00,0x9b,0x20,0x2a }},
+ {16, 0xc1d0, 0, {0xc0,0x88,0xb0,0x02,0xac,0x00,0x9b,0x00,0x26,0xe0,0x03,0x80,0x82,0x2c,0x28,0x9b }},
+ {16, 0xc1e0, 0, {0x20,0x22,0xe1,0x0b,0xb2,0x02,0xac,0x80,0xb8,0x80,0x2a,0xc1,0x0a,0x98,0x02,0xf0 }},
+ {16, 0xc1f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xc8,0x50,0x3a,0xc0 }},
+ {16, 0xc200, 0, {0x0d,0xb0,0x03,0xec,0x00,0xdb,0x88,0xba,0xc0,0x08,0xb0,0x03,0x6c,0x08,0xfb,0x00 }},
+ {16, 0xc210, 0, {0x36,0x60,0x0f,0x8c,0x63,0x6c,0x00,0xcb,0xc0,0x3a,0x80,0x0e,0xbe,0x03,0xaf,0x84 }},
+ {16, 0xc220, 0, {0x79,0x80,0x3a,0x88,0x04,0x98,0x01,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc230, 0, {0xe0,0x01,0xbc,0x00,0xfc,0x80,0x35,0xc0,0x4f,0xf0,0x03,0xdc,0x00,0xef,0x00,0x37 }},
+ {16, 0xc240, 0, {0xc0,0xaf,0xf0,0x03,0x1c,0x01,0x6f,0x00,0x13,0x00,0x0f,0xc1,0x23,0xfc,0xb8,0xff }},
+ {16, 0xc250, 0, {0x04,0x37,0xc0,0x0c,0xf8,0x43,0x7e,0x04,0xfd,0x00,0x3f,0x04,0x0f,0xd0,0x03,0xf8 }},
+ {16, 0xc260, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xc8,0x40,0x3a,0xc0 }},
+ {16, 0xc270, 0, {0x0c,0xb0,0x03,0xec,0x00,0xfb,0x40,0x38,0xc1,0x0e,0xb0,0x43,0x2c,0x08,0xc3,0x00 }},
+ {16, 0xc280, 0, {0x3e,0x40,0x0e,0x82,0x03,0x6d,0x00,0xdb,0x40,0x32,0xc1,0x5f,0xb4,0xa3,0xed,0x20 }},
+ {16, 0xc290, 0, {0xc9,0x40,0x32,0xe0,0x8f,0x98,0x43,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc2a0, 0, {0xc8,0x05,0x3c,0x00,0x88,0x00,0x23,0xc0,0x28,0xf5,0xc2,0xfc,0x00,0xb3,0x04,0x23 }},
+ {16, 0xc2b0, 0, {0xc1,0x48,0xf0,0x22,0xbc,0x06,0xaf,0x00,0x0e,0x40,0x08,0x00,0x02,0xcd,0x00,0xbb }},
+ {16, 0xc2c0, 0, {0x01,0x20,0xc0,0x08,0x30,0x02,0xee,0x00,0x81,0xe0,0x34,0xa0,0x0b,0x90,0x02,0x32 }},
+ {16, 0xc2d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x02,0x80,0x00,0x28,0xc0 }},
+ {16, 0xc2e0, 0, {0x09,0x3c,0x02,0x4c,0x00,0xb3,0x00,0x2c,0xc0,0x0a,0xb0,0x02,0x0c,0x00,0x83,0x01 }},
+ {16, 0xc2f0, 0, {0x2c,0x00,0x0a,0x05,0x02,0xcd,0x58,0xbb,0x00,0x20,0x00,0x0a,0x3d,0x02,0xcf,0x40 }},
+ {16, 0xc300, 0, {0x21,0x20,0x60,0xc0,0x09,0x10,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc310, 0, {0x20,0x01,0x1e,0x00,0x84,0x80,0x28,0xe4,0x88,0x78,0x42,0xde,0x00,0xb7,0x90,0x65 }},
+ {16, 0xc320, 0, {0xe4,0x88,0x7a,0x42,0x9e,0x40,0xa7,0x90,0x2d,0xa0,0x0a,0x48,0x22,0xde,0x04,0xb7 }},
+ {16, 0xc330, 0, {0x80,0x23,0x60,0x48,0x78,0x42,0xfe,0x80,0xaf,0x90,0x65,0xe0,0x0b,0xe8,0x02,0xc8 }},
+ {16, 0xc340, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xc8,0x00,0x38,0xc0 }},
+ {16, 0xc350, 0, {0x0c,0x30,0x03,0xcc,0x00,0xfb,0x00,0x3c,0xc0,0x0e,0xba,0x03,0x0c,0x00,0xc3,0x00 }},
+ {16, 0xc360, 0, {0x3e,0x00,0x4e,0x22,0x02,0xcc,0xc0,0xfb,0x40,0x30,0xc0,0x0a,0x30,0x03,0xce,0x80 }},
+ {16, 0xc370, 0, {0xe1,0x41,0x30,0xc9,0x0f,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc380, 0, {0x40,0x1d,0xbc,0x20,0xfc,0x00,0x37,0xc2,0x0e,0xf1,0x23,0xec,0x40,0xff,0x04,0x3a }},
+ {16, 0xc390, 0, {0xc0,0x0f,0xb0,0x23,0xfc,0x00,0xff,0x04,0x3e,0xc0,0x0d,0xa0,0x03,0xfc,0x58,0xff }},
+ {16, 0xc3a0, 0, {0x00,0xbf,0xc0,0x06,0xf0,0x83,0xdc,0x62,0xdf,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0x10 }},
+ {16, 0xc3b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xed,0x80,0xc9,0x01,0x3e,0xc0 }},
+ {16, 0xc3c0, 0, {0x8c,0xb2,0x07,0xae,0x04,0xcb,0x80,0x3a,0xc8,0x4c,0xb2,0x03,0x2c,0x84,0xcb,0x30 }},
+ {16, 0xc3d0, 0, {0xb0,0xe0,0x0d,0x88,0x0b,0x2c,0x00,0xeb,0x00,0x30,0x00,0x0c,0xbc,0x83,0x2d,0x80 }},
+ {16, 0xc3e0, 0, {0xfb,0x00,0x32,0xc0,0x0c,0x90,0x03,0xea,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc3f0, 0, {0x48,0x11,0x9c,0x40,0x87,0x00,0x2c,0xcc,0x08,0x76,0x82,0x3c,0x82,0x87,0x00,0x21 }},
+ {16, 0xc400, 0, {0xc2,0x8d,0x32,0x82,0x0d,0x4c,0xa7,0x28,0x21,0x80,0x08,0x40,0x02,0x1d,0x80,0xbf }},
+ {16, 0xc410, 0, {0x20,0x35,0x40,0x09,0x72,0x43,0x5c,0xa0,0xb7,0x00,0x29,0xc0,0x08,0x70,0x02,0xd2 }},
+ {16, 0xc420, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x8e,0x00,0x84,0x80,0x2d,0xe0 }},
+ {16, 0xc430, 0, {0x08,0x78,0x02,0xde,0xc0,0x8f,0x80,0x28,0xec,0x28,0x7b,0x0a,0x9e,0x94,0x83,0x84 }},
+ {16, 0xc440, 0, {0x23,0xe0,0x09,0x58,0x50,0x9e,0x10,0xa7,0xb0,0x23,0xe0,0x0b,0x78,0x02,0x1e,0x20 }},
+ {16, 0xc450, 0, {0xb7,0x80,0x21,0xe0,0x09,0x78,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc460, 0, {0x48,0x14,0xcc,0x02,0x82,0x1c,0x2c,0xc0,0x28,0x30,0x02,0x4c,0x00,0x83,0xc0,0x20 }},
+ {16, 0xc470, 0, {0xc0,0x08,0x30,0x02,0x0c,0x00,0xa3,0x00,0x60,0xd2,0x08,0x1d,0x02,0x0f,0x20,0xbb }},
+ {16, 0xc480, 0, {0x24,0x24,0xc0,0x0b,0x3c,0x02,0x4f,0x00,0xb3,0x80,0x28,0xd8,0x09,0x32,0x02,0xd2 }},
+ {16, 0xc490, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x11,0xa8,0x00,0xce,0x84,0x3e,0x80 }},
+ {16, 0xc4a0, 0, {0x0c,0xa0,0x03,0xe8,0x00,0xce,0xc0,0x3a,0x80,0x08,0xa0,0x03,0xa8,0x00,0xca,0x00 }},
+ {16, 0xc4b0, 0, {0x33,0x80,0x0d,0xec,0x03,0x3b,0x80,0xee,0x82,0x33,0x80,0x0a,0xc0,0x87,0x10,0x40 }},
+ {16, 0xc4c0, 0, {0xf6,0xc0,0x33,0x90,0xad,0x64,0x03,0xfa,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc4d0, 0, {0x48,0x00,0xc0,0x02,0xf8,0x00,0x3c,0x00,0x1f,0x04,0x03,0xa0,0x04,0xf8,0x30,0x3e }},
+ {16, 0xc4e0, 0, {0x00,0x0f,0x80,0x03,0xe0,0x00,0xf8,0x00,0x3e,0x04,0x0f,0x80,0x93,0xe0,0x00,0xf8 }},
+ {16, 0xc4f0, 0, {0x10,0x3e,0x00,0x2c,0x84,0x03,0xe0,0x00,0xf8,0x18,0x3e,0x10,0x0e,0x80,0x03,0xd2 }},
+ {16, 0xc500, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xd9,0x00,0x3e,0x40 }},
+ {16, 0xc510, 0, {0x0e,0x90,0x03,0xa4,0x10,0xf9,0x00,0x3e,0x40,0x04,0x90,0x03,0x24,0x00,0x41,0x00 }},
+ {16, 0xc520, 0, {0x3e,0x40,0x0f,0x91,0x13,0xe1,0x08,0xf8,0x00,0x32,0x40,0x08,0x89,0x83,0xa2,0x00 }},
+ {16, 0xc530, 0, {0xc9,0x80,0x32,0x40,0x0c,0x90,0x0b,0x02,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc540, 0, {0x80,0x04,0x64,0x02,0x89,0x00,0x2e,0x40,0x0d,0x90,0x02,0x24,0x00,0xb9,0x00,0x2e }},
+ {16, 0xc550, 0, {0x40,0x48,0x90,0x02,0xa4,0x00,0x89,0x00,0x22,0x40,0x8b,0x94,0x42,0xe2,0x20,0xb8 }},
+ {16, 0xc560, 0, {0x00,0xa2,0x40,0x08,0x94,0x02,0xe5,0x04,0xa9,0x90,0x34,0x60,0x08,0x90,0x02,0x20 }},
+ {16, 0xc570, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x10,0x99,0x00,0x2e,0x40 }},
+ {16, 0xc580, 0, {0x0a,0x90,0x02,0xe4,0x00,0xb9,0x00,0x24,0x40,0x0a,0x10,0x02,0x04,0x00,0xa9,0x00 }},
+ {16, 0xc590, 0, {0x2a,0x40,0x0b,0x90,0x82,0xe0,0x01,0xb8,0x00,0x20,0x40,0x3a,0x90,0x02,0xa4,0x44 }},
+ {16, 0xc5a0, 0, {0x89,0x04,0x22,0x62,0x08,0x98,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc5b0, 0, {0x08,0x04,0x04,0x8a,0x81,0x00,0x2c,0x48,0x09,0x32,0x06,0x44,0x80,0xb1,0x00,0x2c }},
+ {16, 0xc5c0, 0, {0x48,0x0a,0x12,0x02,0x84,0x80,0xa1,0x20,0x20,0x50,0x0b,0x14,0x02,0xc5,0x00,0xb1 }},
+ {16, 0xc5d0, 0, {0x40,0x20,0x50,0x0a,0x24,0x02,0xc9,0x00,0xa3,0x00,0x24,0x40,0x08,0x11,0x02,0x02 }},
+ {16, 0xc5e0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xd8,0x50,0x3e,0x14 }},
+ {16, 0xc5f0, 0, {0x0e,0x80,0x03,0xe1,0x40,0xf8,0x51,0x36,0x14,0x2e,0x85,0x43,0x21,0x42,0xe8,0x50 }},
+ {16, 0xc600, 0, {0x3a,0x00,0x0f,0x80,0x12,0xe0,0x00,0xf8,0x00,0x32,0x00,0x1e,0x80,0x43,0xa0,0x00 }},
+ {16, 0xc610, 0, {0xc8,0x01,0x32,0x00,0x0c,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc620, 0, {0x98,0x1d,0xe4,0x40,0xfd,0x00,0x3e,0x44,0x4e,0x11,0x03,0xa4,0x40,0xb5,0x00,0x3e }},
+ {16, 0xc630, 0, {0x44,0x0d,0x91,0x03,0xe4,0x40,0xd9,0x10,0x3f,0x40,0x0f,0x50,0x03,0xe5,0x00,0xf9 }},
+ {16, 0xc640, 0, {0x40,0x3f,0x40,0x0d,0x44,0x03,0xf1,0x00,0xf5,0x02,0x3d,0xc0,0x2f,0xd2,0x03,0xe6 }},
+ {16, 0xc650, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe7,0x00,0xe9,0x00,0x36,0x60 }},
+ {16, 0xc660, 0, {0x0d,0xda,0x03,0xe6,0x40,0xf9,0x40,0x3e,0x68,0x0c,0x9a,0x03,0x66,0x20,0x89,0xa0 }},
+ {16, 0xc670, 0, {0x33,0x40,0x0e,0x90,0x07,0xa6,0x00,0xf9,0x80,0x3e,0x50,0x0c,0xca,0x03,0xf3,0x80 }},
+ {16, 0xc680, 0, {0xc5,0x02,0x33,0x40,0x0c,0xc0,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc690, 0, {0x38,0x10,0xe3,0x04,0x88,0xa2,0x20,0x38,0x08,0x80,0x02,0xe3,0x40,0xb0,0x80,0x2e }},
+ {16, 0xc6a0, 0, {0x28,0x08,0x8a,0x82,0x23,0x80,0x88,0x80,0x22,0x00,0xdb,0x88,0x02,0x62,0x04,0xb8 }},
+ {16, 0xc6b0, 0, {0xb0,0x2e,0xa8,0x88,0x8e,0xa2,0xea,0x80,0x88,0x00,0x2a,0x00,0x28,0x88,0x03,0x8e }},
+ {16, 0xc6c0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x82,0xa9,0x08,0x2c,0x52 }},
+ {16, 0xc6d0, 0, {0x0b,0x14,0x02,0xc4,0x80,0xb1,0x21,0x0c,0x52,0x88,0x14,0x02,0x44,0x20,0x91,0x69 }},
+ {16, 0xc6e0, 0, {0x20,0x40,0x0a,0x10,0x82,0xc6,0xe0,0xb1,0x0c,0x2c,0x48,0x08,0x01,0x02,0xe1,0x93 }},
+ {16, 0xc6f0, 0, {0xa1,0x01,0x24,0x41,0x0a,0x10,0x02,0xc2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc700, 0, {0x18,0x15,0xa4,0x00,0x89,0x04,0x22,0x40,0x08,0x90,0x00,0xe4,0x00,0x39,0x02,0x0e }},
+ {16, 0xc710, 0, {0x40,0x08,0x10,0x62,0x24,0x00,0x91,0x00,0x62,0x40,0x8b,0x80,0x02,0xe0,0x54,0xb9 }},
+ {16, 0xc720, 0, {0x0c,0x2e,0x40,0x09,0xb6,0x52,0xec,0x00,0xa9,0x00,0x2a,0x40,0x0a,0x92,0x80,0x86 }},
+ {16, 0xc730, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xe4,0x00,0xe1,0x60,0x36,0x40 }},
+ {16, 0xc740, 0, {0x0d,0x90,0x23,0xe4,0x00,0xf9,0x30,0x3e,0x40,0x2c,0x90,0x43,0x64,0x06,0xc9,0x00 }},
+ {16, 0xc750, 0, {0x32,0x49,0x0e,0x8d,0x93,0xe0,0x00,0xf9,0x00,0x2e,0x40,0x2c,0x94,0x03,0xc7,0x40 }},
+ {16, 0xc760, 0, {0xe9,0x20,0x30,0x55,0x0e,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc770, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0x1e,0x40,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x80,0x3c }},
+ {16, 0xc780, 0, {0x40,0x4f,0x90,0x03,0xe4,0x00,0xe9,0x04,0xbe,0x40,0x0f,0x88,0x33,0x62,0x00,0xf9 }},
+ {16, 0xc790, 0, {0xc2,0x3e,0x48,0x2e,0x88,0x33,0xe2,0x00,0xd9,0x00,0x3e,0x60,0x0d,0x80,0x03,0xca }},
+ {16, 0xc7a0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xc8,0x00,0x3e,0x00 }},
+ {16, 0xc7b0, 0, {0x0d,0x80,0x03,0xa0,0x04,0xe8,0x40,0xba,0x00,0x0c,0x80,0x03,0xe0,0x04,0xc8,0x00 }},
+ {16, 0xc7c0, 0, {0x3a,0x00,0x0e,0x8c,0x03,0xe0,0x00,0xf8,0x02,0x32,0x00,0x0e,0x80,0x03,0x61,0x20 }},
+ {16, 0xc7d0, 0, {0xf8,0x00,0x32,0x16,0x0f,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc7e0, 0, {0x28,0x05,0x28,0x00,0x8a,0x00,0x2e,0x80,0x08,0xe2,0x03,0x28,0x00,0x8a,0x00,0x22 }},
+ {16, 0xc7f0, 0, {0x80,0x08,0xa0,0x02,0xe8,0x04,0x8a,0x00,0x2e,0xa2,0x09,0xe8,0x02,0xfa,0x04,0xbe }},
+ {16, 0xc800, 0, {0x00,0xa2,0x80,0x08,0xcd,0x82,0x33,0x20,0xb6,0xc0,0x37,0xa0,0x4b,0xc8,0x82,0xca }},
+ {16, 0xc810, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x6c,0x00,0x83,0x00,0x26,0xc0 }},
+ {16, 0xc820, 0, {0x09,0x38,0x02,0x4c,0x00,0xb3,0x00,0x24,0xc0,0x08,0x30,0x02,0xec,0x00,0x83,0x00 }},
+ {16, 0xc830, 0, {0x28,0xe0,0x0b,0x30,0x02,0xce,0x81,0xb3,0x00,0x62,0xc0,0x08,0x3c,0x02,0x4f,0x00 }},
+ {16, 0xc840, 0, {0xb3,0xa0,0x20,0xb0,0x03,0x30,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc850, 0, {0xa0,0x01,0x0c,0x41,0x87,0x34,0x2d,0xc0,0x08,0x60,0x02,0x9e,0x40,0xb7,0xa0,0x2d }},
+ {16, 0xc860, 0, {0xc0,0x08,0x73,0x02,0xdc,0x00,0x87,0x20,0x2d,0xc0,0x0b,0x70,0x82,0xdd,0x85,0xbf }},
+ {16, 0xc870, 0, {0x81,0x63,0xc8,0x88,0x7b,0x02,0x1c,0x00,0xb7,0x40,0x65,0x00,0x1b,0x72,0x02,0xe8 }},
+ {16, 0xc880, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xc7,0x81,0x3d,0xe0 }},
+ {16, 0xc890, 0, {0xdd,0x70,0x03,0xfe,0x80,0xf7,0x90,0x3f,0xe0,0x2c,0x79,0x03,0xfe,0x80,0xc7,0xa0 }},
+ {16, 0xc8a0, 0, {0x39,0xe0,0x0f,0x7a,0x02,0xde,0x84,0xf7,0xc2,0x31,0xf2,0x0c,0x79,0x03,0x5e,0x04 }},
+ {16, 0xc8b0, 0, {0xf7,0x84,0x31,0x60,0x0f,0x7e,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc8c0, 0, {0x08,0x1d,0xad,0x0a,0xfb,0x60,0x7e,0xd4,0x0f,0x30,0x03,0x6c,0x00,0xcb,0x00,0x32 }},
+ {16, 0xc8d0, 0, {0xde,0x2f,0xb2,0x03,0xed,0x42,0x1b,0x60,0x3e,0xc1,0x0d,0xb1,0x03,0xec,0x50,0xf7 }},
+ {16, 0xc8e0, 0, {0x80,0x3d,0xd8,0x2e,0x32,0x03,0xec,0x30,0xfb,0x00,0x3e,0x40,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0xc8f0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xff,0x00,0xcb,0xd0,0x3f,0xf0 }},
+ {16, 0xc900, 0, {0x4c,0xf8,0x13,0xfe,0x00,0xcf,0x88,0x3f,0xe0,0x0c,0xf8,0x43,0x3f,0x00,0xcf,0xc8 }},
+ {16, 0xc910, 0, {0x33,0xe0,0x0c,0xf8,0x03,0xfe,0x00,0xff,0x80,0x3f,0xe0,0x2c,0xf8,0x03,0xbe,0x20 }},
+ {16, 0xc920, 0, {0xc7,0x80,0x33,0xe0,0x0c,0xf8,0x01,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc930, 0, {0xa8,0x01,0xbc,0x40,0x87,0x90,0x3d,0xc0,0x08,0x40,0x02,0xdc,0x80,0xd7,0x00,0x2d }},
+ {16, 0xc940, 0, {0xc0,0x0c,0x30,0x03,0x7c,0x00,0x87,0x10,0x21,0xc4,0x1e,0x70,0x20,0xdc,0x44,0xb7 }},
+ {16, 0xc950, 0, {0x00,0x39,0xc0,0x0c,0x71,0x02,0x1c,0x40,0xd7,0x02,0x29,0x40,0x08,0x70,0x02,0x2a }},
+ {16, 0xc960, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0x87,0x32,0x2d,0xc0 }},
+ {16, 0xc970, 0, {0x08,0x70,0x02,0xdc,0x01,0x87,0x00,0x2c,0xc0,0x2b,0x70,0x0a,0x5c,0x00,0x83,0x00 }},
+ {16, 0xc980, 0, {0x23,0xc0,0x08,0x70,0x02,0xdd,0x00,0xb7,0x00,0x2d,0xc4,0x0b,0xf0,0x02,0x9c,0x20 }},
+ {16, 0xc990, 0, {0x87,0x18,0x29,0x40,0x08,0x70,0x82,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc9a0, 0, {0x20,0x14,0xcc,0x00,0x83,0x02,0x28,0xc0,0x08,0x10,0x02,0xcc,0x08,0x83,0x40,0x2e }},
+ {16, 0xc9b0, 0, {0xc0,0x2a,0x30,0x02,0x0c,0x00,0x8b,0x00,0x20,0xf2,0x0a,0x30,0x02,0xce,0x00,0xb3 }},
+ {16, 0xc9c0, 0, {0x88,0x2a,0xd0,0x0a,0x30,0x06,0x0c,0x00,0x92,0x00,0x28,0x78,0x08,0x3c,0x42,0x08 }},
+ {16, 0xc9d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x02,0xc7,0x00,0x2f,0xc0 }},
+ {16, 0xc9e0, 0, {0x2c,0x90,0x02,0xfc,0x02,0x8f,0xd8,0x3f,0xc0,0x4b,0xf0,0x02,0x7c,0x02,0xcf,0x00 }},
+ {16, 0xc9f0, 0, {0x20,0xf2,0x08,0xb0,0x13,0xee,0x80,0xff,0x00,0x3f,0xd4,0x2e,0xbd,0x83,0xac,0x00 }},
+ {16, 0xca00, 0, {0xcb,0x80,0x3a,0xa0,0xac,0xb8,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xca10, 0, {0x80,0x00,0xec,0x00,0xfb,0x10,0x3e,0xc0,0x0f,0x84,0x03,0xec,0x10,0xfb,0x00,0x3e }},
+ {16, 0xca20, 0, {0xc0,0x01,0xb0,0x03,0xec,0x00,0xfb,0x00,0xbe,0xc0,0x0e,0xb0,0x23,0xec,0x08,0xfb }},
+ {16, 0xca30, 0, {0x10,0x3f,0xc0,0x0d,0xb4,0x03,0xed,0x04,0xf9,0x00,0x1e,0x14,0xcf,0xb0,0x83,0xe0 }},
+ {16, 0xca40, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xcf,0x00,0x30,0xc0 }},
+ {16, 0xca50, 0, {0x0c,0x40,0x03,0xac,0x00,0xff,0x00,0x3f,0xc0,0x2c,0xb0,0x03,0xbc,0x00,0xff,0x00 }},
+ {16, 0xca60, 0, {0xb3,0xe0,0x0d,0xfa,0x03,0x7e,0x80,0xcf,0x00,0x33,0xc0,0x0c,0xfc,0x43,0xff,0x20 }},
+ {16, 0xca70, 0, {0xff,0x00,0x3f,0x40,0x08,0xf8,0x03,0xc0,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xca80, 0, {0x81,0x04,0x6c,0x10,0xab,0x00,0x2a,0xc0,0x0a,0x8e,0x42,0x2c,0x04,0xbb,0x00,0x2e }},
+ {16, 0xca90, 0, {0xc0,0x08,0xb0,0x02,0x6c,0x00,0xbb,0x00,0x3a,0xc0,0x0e,0x30,0x02,0x0d,0x08,0x83 }},
+ {16, 0xcaa0, 0, {0x02,0x22,0xc0,0x0a,0xbc,0x02,0xef,0x00,0xbb,0xc0,0x2c,0x68,0x0a,0xb9,0x02,0xe0 }},
+ {16, 0xcab0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x0c,0x00,0x8b,0x00,0x22,0xc0 }},
+ {16, 0xcac0, 0, {0x08,0xb8,0x02,0xac,0x00,0xbb,0x02,0x2e,0xc0,0x08,0xb0,0x02,0xec,0x00,0xbb,0x00 }},
+ {16, 0xcad0, 0, {0x26,0x48,0x19,0xb0,0x02,0x6d,0x00,0x8b,0x00,0x22,0xc0,0x0a,0xb0,0x02,0xec,0x04 }},
+ {16, 0xcae0, 0, {0xbb,0x1c,0x2e,0x20,0x0a,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcaf0, 0, {0x08,0x14,0x0c,0x00,0xab,0x20,0x28,0xc0,0x0a,0x00,0x02,0x0c,0x00,0x93,0x04,0x2c }},
+ {16, 0xcb00, 0, {0xc1,0x08,0x30,0x02,0x4c,0x00,0xb3,0x00,0x24,0x41,0x09,0xb8,0x02,0x0c,0x02,0x83 }},
+ {16, 0xcb10, 0, {0x01,0xa0,0xc0,0x0a,0x30,0x02,0xcc,0x10,0x93,0x00,0x2c,0x00,0x0a,0x30,0x02,0xc2 }},
+ {16, 0xcb20, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x7c,0x00,0xcf,0x28,0x33,0xc0 }},
+ {16, 0xcb30, 0, {0x0c,0xa0,0x46,0xac,0x11,0xbf,0x00,0x3f,0xc0,0x5c,0xf0,0x43,0xfc,0x00,0xff,0x04 }},
+ {16, 0xcb40, 0, {0x32,0x40,0x0d,0xb0,0x03,0x6c,0x08,0xcb,0x04,0x31,0xc0,0x0c,0xb0,0x33,0xed,0x40 }},
+ {16, 0xcb50, 0, {0xfb,0x04,0x3e,0x40,0x0e,0xb0,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcb60, 0, {0xa0,0x15,0xfc,0x00,0xff,0x00,0x3f,0xc0,0x0f,0xc0,0x23,0xfc,0x01,0xff,0x00,0x3f }},
+ {16, 0xcb70, 0, {0xc0,0x4f,0xf0,0x87,0x7c,0x00,0xff,0x00,0x39,0x40,0x0e,0xf0,0x03,0xfc,0x00,0xff }},
+ {16, 0xcb80, 0, {0x00,0x3f,0xc0,0x0f,0x70,0x03,0xdc,0x80,0xff,0x00,0x3d,0x40,0x0f,0x70,0x03,0xe8 }},
+ {16, 0xcb90, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x40,0xeb,0x48,0x3e,0xc2 }},
+ {16, 0xcba0, 0, {0x0e,0x09,0x03,0xbc,0x60,0xc0,0x20,0x35,0x24,0x0e,0xd2,0x13,0x2c,0x60,0xfb,0x6a }},
+ {16, 0xcbb0, 0, {0x33,0xc0,0x0f,0xca,0x03,0x22,0x20,0xc0,0x80,0x37,0xc0,0x0d,0xf0,0x03,0x7c,0x00 }},
+ {16, 0xcbc0, 0, {0xef,0x00,0x33,0x24,0x0f,0xc8,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcbd0, 0, {0x80,0x10,0xdd,0x00,0x8f,0x60,0x2f,0xd8,0x08,0xa2,0x02,0xfd,0x80,0xc8,0x70,0x22 }},
+ {16, 0xcbe0, 0, {0x00,0x2c,0xfd,0x07,0xdc,0x84,0xbf,0x60,0x23,0xd2,0x0b,0xbd,0x02,0x23,0x00,0x88 }},
+ {16, 0xcbf0, 0, {0x80,0xa2,0x20,0x88,0xb0,0x22,0x34,0x00,0xbb,0x50,0x22,0xc8,0x0b,0xb0,0x02,0x20 }},
+ {16, 0xcc00, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x40,0xa3,0x03,0x2c,0xc2 }},
+ {16, 0xcc10, 0, {0x0a,0x00,0x42,0x8c,0x82,0xa3,0x0a,0x24,0x80,0x0b,0x30,0x02,0xcc,0x90,0xb3,0x00 }},
+ {16, 0xcc20, 0, {0x28,0xd8,0x0b,0x10,0x02,0x8c,0x02,0x90,0x00,0x20,0xc0,0x0b,0x10,0x42,0x4c,0x00 }},
+ {16, 0xcc30, 0, {0xb3,0x04,0x24,0xc0,0x0b,0x30,0x0e,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcc40, 0, {0xc0,0x15,0xac,0x10,0x9b,0x04,0x2c,0xc0,0xf8,0x98,0x06,0xec,0x00,0xab,0x80,0x26 }},
+ {16, 0xcc50, 0, {0x20,0x08,0x90,0x2a,0xac,0x10,0xbb,0x00,0x0a,0xc0,0x1b,0xb0,0x22,0xad,0x00,0x98 }},
+ {16, 0xcc60, 0, {0x40,0x2a,0x70,0x4b,0xb0,0x02,0x2c,0x00,0xb3,0x00,0xa6,0x86,0x1b,0xb0,0x82,0xb0 }},
+ {16, 0xcc70, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xeb,0x00,0x3e,0xc0 }},
+ {16, 0xcc80, 0, {0x8e,0x98,0x03,0xac,0x08,0xe8,0xc0,0x36,0x30,0x4f,0xb0,0x42,0xec,0x00,0xf9,0x80 }},
+ {16, 0xcc90, 0, {0x3a,0xc0,0x8f,0x88,0x42,0x20,0x10,0xc8,0x10,0x30,0xf0,0x0f,0x30,0x13,0x6c,0x10 }},
+ {16, 0xcca0, 0, {0xeb,0x00,0x36,0xf0,0x0f,0xbd,0x03,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xccb0, 0, {0xe0,0x01,0xbc,0x00,0xef,0x04,0x7f,0xc0,0x0f,0xf0,0x43,0xdc,0x00,0xc4,0x00,0x3b }},
+ {16, 0xccc0, 0, {0x40,0x8b,0xdc,0x03,0x7c,0x10,0xf9,0x90,0x36,0xc2,0x4f,0xf9,0x23,0x62,0x41,0xac }},
+ {16, 0xccd0, 0, {0x01,0x13,0x40,0x04,0xb0,0x03,0xe4,0x00,0xff,0x00,0x3b,0xc0,0x0f,0xc0,0x03,0x78 }},
+ {16, 0xcce0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x8c,0x12,0xcb,0x00,0xf2,0xc0 }},
+ {16, 0xccf0, 0, {0x0f,0x80,0x03,0xac,0x08,0xd9,0x00,0x3a,0x80,0x0f,0x12,0x03,0xac,0x00,0xe1,0x00 }},
+ {16, 0xcd00, 0, {0x32,0xc0,0x0c,0x90,0x03,0xed,0x02,0xc8,0x40,0x3e,0xd0,0x0f,0x90,0x13,0x2c,0x02 }},
+ {16, 0xcd10, 0, {0xdb,0x00,0x3e,0x50,0x0c,0xb4,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcd20, 0, {0xc8,0x05,0x3c,0x00,0x8f,0x00,0x17,0xc0,0x08,0x90,0x02,0x3c,0x08,0x8d,0x00,0x22 }},
+ {16, 0xcd30, 0, {0x54,0x08,0xb4,0x03,0x3c,0x00,0x89,0x00,0x23,0xc0,0x40,0x35,0x02,0xcc,0x24,0x80 }},
+ {16, 0xcd40, 0, {0x00,0x22,0x74,0x4c,0xb0,0x02,0x2c,0x00,0x8f,0x00,0x2e,0xd4,0x0a,0xb0,0x0a,0x32 }},
+ {16, 0xcd50, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x4c,0x02,0x83,0x00,0x24,0xc0 }},
+ {16, 0xcd60, 0, {0x09,0x00,0x02,0x8c,0x01,0x90,0x00,0x6a,0x41,0x0a,0x30,0x20,0x4e,0x10,0x31,0x02 }},
+ {16, 0xcd70, 0, {0x2c,0xc0,0x09,0x20,0x06,0xce,0x00,0x80,0x00,0x60,0xe0,0x0a,0x30,0x82,0x0c,0x08 }},
+ {16, 0xcd80, 0, {0x83,0x08,0x2c,0xd0,0x09,0xb0,0x02,0x78,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcd90, 0, {0x20,0x01,0x1e,0x04,0x87,0xb0,0x20,0xec,0x09,0xe9,0x02,0x8e,0x58,0x9d,0xb0,0x2b }},
+ {16, 0xcda0, 0, {0xa5,0x40,0x5b,0x06,0xde,0x40,0x95,0x94,0x2d,0xe4,0x19,0x7b,0x06,0xde,0x00,0x84 }},
+ {16, 0xcdb0, 0, {0x80,0x60,0xe0,0x0a,0x78,0x0a,0x16,0x10,0x87,0x80,0x2d,0x68,0x0b,0x79,0x02,0x48 }},
+ {16, 0xcdc0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xcb,0xa0,0x24,0xe0 }},
+ {16, 0xcdd0, 0, {0x0f,0x2a,0x03,0x8e,0x00,0xd2,0xd0,0x38,0xfa,0x0f,0x18,0xc3,0xce,0x24,0x31,0xb0 }},
+ {16, 0xcde0, 0, {0x3c,0xe5,0x0c,0x3b,0x17,0xce,0x04,0xc0,0x82,0x38,0xc2,0x9e,0x10,0x03,0x0c,0x00 }},
+ {16, 0xcdf0, 0, {0xc3,0x01,0x3e,0xc0,0x0d,0x81,0x03,0x52,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xce00, 0, {0x40,0x1d,0xbc,0x00,0xef,0x10,0x3e,0xc2,0x0e,0xb1,0x23,0x2c,0xc1,0xab,0x01,0x36 }},
+ {16, 0xce10, 0, {0x80,0x0f,0xb0,0x23,0x2d,0x90,0xe9,0x84,0x72,0xc8,0x62,0xf1,0x17,0xfc,0x00,0xfc }},
+ {16, 0xce20, 0, {0x00,0x3b,0xc4,0x1d,0xf0,0x03,0xec,0x00,0xef,0x08,0x3f,0xc8,0x0e,0xf1,0x03,0x90 }},
+ {16, 0xce30, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x80,0xfb,0xa4,0x3a,0xc8 }},
+ {16, 0xce40, 0, {0x0e,0x90,0x03,0x2c,0x04,0xca,0x00,0x30,0x60,0x2d,0x1a,0x27,0x6c,0x84,0xcb,0x60 }},
+ {16, 0xce50, 0, {0x32,0xd2,0x0c,0xa0,0x13,0x2d,0x84,0xcb,0x02,0x3e,0xc0,0x0d,0xb8,0x03,0xac,0x80 }},
+ {16, 0xce60, 0, {0xcb,0x81,0x32,0x80,0x0c,0xb0,0x03,0xaa,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xce70, 0, {0x48,0x11,0x9c,0xa4,0xb7,0x28,0x73,0xc2,0x08,0xf0,0x02,0x3c,0xc0,0x8f,0x00,0x31 }},
+ {16, 0xce80, 0, {0xc0,0x09,0x70,0x82,0x9c,0x80,0x87,0x0c,0x20,0xd8,0x09,0x70,0x22,0x1c,0x30,0x84 }},
+ {16, 0xce90, 0, {0x00,0x3d,0xc0,0x08,0x70,0x02,0x14,0x24,0x87,0xa0,0x21,0xc0,0x08,0x70,0x12,0x12 }},
+ {16, 0xcea0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x40,0xb3,0x95,0x29,0xe9 }},
+ {16, 0xceb0, 0, {0x0a,0x68,0x02,0x9e,0xd0,0x86,0xf0,0xa3,0xe0,0x08,0x78,0x12,0x9e,0x44,0xa3,0x82 }},
+ {16, 0xcec0, 0, {0x21,0xe8,0x0b,0x38,0x02,0x0e,0x10,0x87,0x80,0x2f,0xe0,0x0b,0x18,0x02,0x8e,0x02 }},
+ {16, 0xced0, 0, {0x87,0x00,0x21,0xe0,0x08,0x78,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcee0, 0, {0x48,0x14,0xcc,0x00,0xb3,0x00,0x24,0xc0,0x48,0x30,0x02,0x0c,0x04,0x83,0x80,0x20 }},
+ {16, 0xcef0, 0, {0xd0,0x09,0x10,0x02,0x8c,0x06,0xa3,0x80,0x20,0xc0,0x0b,0x30,0x02,0x0c,0x02,0x80 }},
+ {16, 0xcf00, 0, {0x40,0x28,0xd2,0x0a,0x30,0x02,0x0c,0x01,0x83,0x00,0x22,0x3c,0x08,0x87,0x02,0x12 }},
+ {16, 0xcf10, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x18,0xfa,0x00,0x3a,0x80 }},
+ {16, 0xcf20, 0, {0x8e,0xe4,0x42,0x28,0x02,0xce,0x80,0x33,0x80,0x4d,0xa0,0x83,0xe8,0x00,0xea,0xa0 }},
+ {16, 0xcf30, 0, {0xb2,0x80,0x0a,0xa0,0x0a,0x28,0x00,0xce,0x18,0x2f,0x80,0x0f,0xa0,0x13,0xa8,0x00 }},
+ {16, 0xcf40, 0, {0xca,0x00,0x32,0x90,0x2c,0xac,0x0b,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcf50, 0, {0x48,0x00,0xe0,0x00,0xf8,0x04,0x3a,0x00,0x0f,0x80,0x83,0xc0,0x08,0xe8,0x03,0x3a }},
+ {16, 0xcf60, 0, {0x00,0x0e,0x80,0x22,0xc0,0x00,0xd0,0x00,0x7e,0x10,0xa4,0x80,0x03,0xc0,0x00,0xf8 }},
+ {16, 0xcf70, 0, {0x00,0x3e,0x10,0x0d,0x84,0x03,0xc0,0x00,0xf8,0x00,0xbe,0x00,0x0f,0x80,0x01,0x52 }},
+ {16, 0xcf80, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc4,0x02,0xc9,0x00,0x36,0x40 }},
+ {16, 0xcf90, 0, {0x0c,0x90,0x03,0x64,0x02,0x89,0x04,0x32,0x42,0x0d,0x92,0x03,0xe6,0x42,0xc9,0x00 }},
+ {16, 0xcfa0, 0, {0x32,0x70,0x0e,0x12,0x0b,0x24,0x08,0xc9,0x00,0x3e,0x45,0x0e,0x99,0x03,0xe4,0x02 }},
+ {16, 0xcfb0, 0, {0xc1,0x00,0x32,0x50,0x04,0x94,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcfc0, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x6e,0x40,0x08,0x90,0x02,0x24,0x00,0x89,0x00,0x22 }},
+ {16, 0xcfd0, 0, {0x54,0x0b,0x90,0x03,0xe6,0x00,0x89,0x00,0x22,0x40,0x08,0x90,0x0a,0x24,0x00,0x89 }},
+ {16, 0xcfe0, 0, {0x00,0x38,0x48,0x08,0x90,0x82,0xe4,0x04,0xd9,0x00,0x22,0x40,0x08,0x90,0x02,0x20 }},
+ {16, 0xcff0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x89,0x01,0x2c,0x40 }},
+ {16, 0xd000, 0, {0x28,0x10,0x42,0x64,0x00,0xa1,0x04,0x22,0x50,0x01,0x90,0x42,0xe4,0x00,0x89,0x04 }},
+ {16, 0xd010, 0, {0x20,0x42,0x0a,0x90,0x42,0x34,0x00,0x89,0x00,0x6e,0x40,0x0a,0x90,0x00,0xe4,0x00 }},
+ {16, 0xd020, 0, {0x89,0x00,0x23,0x40,0x0a,0xd0,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd030, 0, {0x08,0x04,0x04,0x80,0x81,0x24,0x2c,0x48,0x08,0x10,0x02,0x04,0x80,0xa1,0x20,0x28 }},
+ {16, 0xd040, 0, {0x40,0x0b,0x10,0x02,0x85,0x80,0x81,0x20,0x20,0x48,0x08,0x50,0x62,0x14,0x02,0x81 }},
+ {16, 0xd050, 0, {0x03,0x2e,0x40,0x88,0x16,0x82,0xc4,0xa0,0x91,0x28,0x21,0x40,0x2a,0x50,0x02,0x02 }},
+ {16, 0xd060, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xc8,0x50,0x2e,0x14 }},
+ {16, 0xd070, 0, {0x0c,0x85,0x03,0x61,0x40,0xe8,0x50,0xb2,0x15,0x4d,0x80,0x02,0xc0,0x00,0x48,0x50 }},
+ {16, 0xd080, 0, {0xb2,0x15,0x1a,0x80,0x13,0x30,0x08,0xc8,0x00,0x3e,0x00,0x0e,0x82,0x03,0xe0,0x80 }},
+ {16, 0xd090, 0, {0xc0,0x20,0x30,0x00,0x0e,0x40,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd0a0, 0, {0x98,0x1d,0xe4,0x40,0xf9,0x10,0x3e,0x44,0x0f,0xd0,0x03,0xe4,0x48,0xdd,0x10,0x37 }},
+ {16, 0xd0b0, 0, {0x40,0x0f,0xd4,0x07,0xe4,0x40,0xfd,0x10,0x3e,0x45,0x0f,0x94,0x03,0xe5,0x08,0xfd }},
+ {16, 0xd0c0, 0, {0x02,0x39,0xd0,0x0f,0xd0,0x43,0xf4,0xa0,0xf9,0x28,0x3e,0x4b,0x0d,0x92,0x83,0xe6 }},
+ {16, 0xd0d0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0x80,0xc9,0xa6,0x32,0x68 }},
+ {16, 0xd0e0, 0, {0x0c,0x90,0x03,0xa6,0x81,0xe9,0xe9,0x3b,0x40,0x0e,0x58,0x03,0x36,0x20,0xc9,0xa0 }},
+ {16, 0xd0f0, 0, {0x37,0x78,0x0d,0xda,0x03,0x36,0x26,0xc5,0x00,0x37,0x69,0x0e,0xde,0x03,0xa6,0x82 }},
+ {16, 0xd100, 0, {0xcd,0xc0,0x33,0x50,0x0f,0xd0,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd110, 0, {0x38,0x10,0xe3,0xa4,0x88,0xa9,0x22,0x3a,0x08,0x08,0x00,0x22,0xa0,0xb8,0xe5,0x30 }},
+ {16, 0xd120, 0, {0x20,0x28,0x80,0x22,0x43,0xa0,0x08,0xe8,0x2a,0x3d,0x08,0xa4,0x62,0x20,0x00,0x88 }},
+ {16, 0xd130, 0, {0x00,0x2e,0x10,0x08,0x8e,0x03,0x23,0xa0,0x88,0xa0,0x20,0x28,0x0b,0x8a,0x82,0x0e }},
+ {16, 0xd140, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x40,0x91,0x40,0x20,0x44 }},
+ {16, 0xd150, 0, {0x08,0x90,0xa2,0x85,0x10,0xa1,0x20,0x2c,0x42,0x0b,0x14,0x12,0x8c,0x01,0x91,0x10 }},
+ {16, 0xd160, 0, {0x2c,0x48,0x09,0x11,0x0a,0xc4,0x00,0x81,0x00,0x2c,0x50,0x0b,0x11,0x12,0xc5,0x01 }},
+ {16, 0xd170, 0, {0xb1,0x40,0x24,0x48,0x0b,0x18,0x0e,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd180, 0, {0x18,0x15,0xa4,0x00,0x91,0x00,0x22,0x41,0x08,0x94,0x42,0x24,0x00,0xb1,0x40,0x20 }},
+ {16, 0xd190, 0, {0x40,0x49,0xb2,0x62,0x24,0x00,0x99,0x00,0x0a,0x40,0x08,0x90,0x02,0xe5,0x80,0x89 }},
+ {16, 0xd1a0, 0, {0x00,0x2e,0x40,0x09,0xb0,0x02,0x24,0x80,0xb9,0x00,0x26,0x50,0x4b,0x90,0x02,0x06 }},
+ {16, 0xd1b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x02,0xd9,0x00,0xb2,0x40 }},
+ {16, 0xd1c0, 0, {0x2c,0x95,0x13,0xa4,0x10,0xe9,0x00,0xbe,0x60,0x8f,0x90,0x0b,0xa4,0x10,0x59,0x00 }},
+ {16, 0xd1d0, 0, {0x1e,0x40,0x9d,0x94,0x23,0xe4,0x02,0x89,0x00,0x34,0x40,0x0f,0x90,0x03,0xe6,0x08 }},
+ {16, 0xd1e0, 0, {0x79,0x00,0xb6,0x40,0x07,0x98,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd1f0, 0, {0x28,0x01,0x84,0x00,0xe9,0x02,0x3c,0x40,0x2f,0x98,0x02,0xe4,0x00,0xf9,0x42,0x3a }},
+ {16, 0xd200, 0, {0x68,0x0a,0x10,0x03,0xe4,0x10,0xe9,0x00,0x3e,0x40,0x0e,0x90,0x0f,0x26,0x00,0xf9 }},
+ {16, 0xd210, 0, {0x04,0x3e,0x40,0x0e,0x1c,0x03,0xe6,0x00,0xc1,0x00,0x3a,0x50,0x0f,0x99,0x83,0xca }},
+ {16, 0xd220, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xe8,0x00,0x3a,0x00 }},
+ {16, 0xd230, 0, {0x0c,0x84,0x03,0x20,0x00,0xd8,0x42,0x32,0x04,0x0c,0x88,0x13,0xe0,0x00,0xc8,0x00 }},
+ {16, 0xd240, 0, {0x30,0x00,0x0c,0x04,0x0b,0x00,0x00,0xd8,0x00,0x36,0x00,0x0e,0x80,0x23,0x00,0x00 }},
+ {16, 0xd250, 0, {0xc8,0x80,0x32,0x00,0x0c,0x80,0x01,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd260, 0, {0x28,0x05,0x28,0x10,0x8a,0x00,0x2e,0x80,0x28,0x20,0x22,0x28,0x00,0x8a,0x00,0x23 }},
+ {16, 0xd270, 0, {0xb0,0x88,0xe0,0x02,0x28,0x10,0xda,0x00,0xa3,0xb4,0x08,0xe8,0x10,0x28,0x00,0x8e }},
+ {16, 0xd280, 0, {0x20,0x23,0xa0,0x48,0xed,0x1a,0x28,0x00,0xde,0x00,0x23,0x90,0x0a,0xe0,0x02,0x0a }},
+ {16, 0xd290, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xa3,0x00,0x28,0xc0 }},
+ {16, 0xd2a0, 0, {0x08,0x30,0x0a,0x0c,0x00,0x93,0x00,0x20,0xc2,0x2a,0x30,0x22,0xa4,0x00,0xbb,0x00 }},
+ {16, 0xd2b0, 0, {0x08,0xe0,0x18,0x09,0x0a,0x4c,0x00,0x93,0x02,0x24,0xe8,0x02,0x08,0x06,0x4c,0x00 }},
+ {16, 0xd2c0, 0, {0x93,0x00,0x20,0xd8,0x0a,0x90,0x02,0x4a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd2d0, 0, {0xa0,0x01,0x1c,0x80,0x87,0x04,0x2d,0xc0,0x08,0x70,0x02,0x0e,0x00,0x87,0x10,0x25 }},
+ {16, 0xd2e0, 0, {0x00,0x0a,0x60,0x02,0x5e,0x00,0x97,0x00,0x29,0x82,0x08,0x50,0x12,0x54,0x00,0x8f }},
+ {16, 0xd2f0, 0, {0x80,0x61,0xd0,0x08,0x04,0x02,0x5c,0x01,0xb7,0x08,0xa9,0xa0,0x0a,0x50,0x82,0x68 }},
+ {16, 0xd300, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3e,0x80,0xe7,0x80,0x38,0xe4 }},
+ {16, 0xd310, 0, {0x08,0x7e,0x03,0x1f,0x00,0xdf,0x80,0xb1,0x21,0x1e,0x78,0x03,0xdc,0x04,0xf3,0x80 }},
+ {16, 0xd320, 0, {0x5b,0xe1,0x08,0x28,0x03,0x5e,0x00,0xd7,0x80,0x35,0x60,0x0e,0x68,0x03,0x4e,0x00 }},
+ {16, 0xd330, 0, {0xdf,0x80,0x31,0xe0,0x0e,0xf8,0x0b,0x6a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd340, 0, {0x08,0x1d,0xad,0x02,0xfb,0x74,0x3e,0xd0,0x4f,0xb2,0x83,0xed,0x00,0x7b,0x68,0x3a }},
+ {16, 0xd350, 0, {0x00,0x8d,0x80,0x03,0xa4,0x20,0xdb,0x01,0x36,0x80,0x6f,0xb0,0x41,0x84,0x00,0xeb }},
+ {16, 0xd360, 0, {0x00,0x3c,0xc0,0x0f,0xe6,0x83,0xbc,0x40,0xdb,0x00,0xb6,0x80,0x0f,0xb0,0x03,0x82 }},
+ {16, 0xd370, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xff,0x20,0xdf,0xc0,0x3b,0xe6 }},
+ {16, 0xd380, 0, {0x0e,0xf8,0x13,0xff,0x44,0xc7,0x82,0x3b,0xe0,0x0f,0xf9,0x03,0xbe,0x10,0xcf,0xc8 }},
+ {16, 0xd390, 0, {0x33,0x60,0x8d,0xeb,0x03,0x3e,0x00,0xdb,0x82,0x3f,0xe0,0x0c,0xd8,0x03,0x3e,0x40 }},
+ {16, 0xd3a0, 0, {0xce,0x80,0x33,0xe4,0x0f,0xf8,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd3b0, 0, {0xa8,0x11,0xbc,0x40,0x87,0x00,0x21,0xe4,0x0b,0x78,0xa2,0xce,0x90,0xc7,0xb0,0x20 }},
+ {16, 0xd3c0, 0, {0xe8,0x0b,0x28,0x92,0xb6,0x88,0x87,0xa0,0x20,0x64,0x0b,0x35,0x03,0x14,0x00,0x87 }},
+ {16, 0xd3d0, 0, {0xb2,0x39,0xc0,0x2c,0xc0,0x03,0x5e,0x02,0xcf,0x00,0x31,0xce,0x0b,0x76,0x12,0x2a }},
+ {16, 0xd3e0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xa3,0x10,0x29,0xc8 }},
+ {16, 0xd3f0, 0, {0x0b,0x74,0x02,0xdc,0x80,0x8f,0x00,0x29,0xcc,0x0a,0x30,0x06,0x14,0x80,0x87,0x10 }},
+ {16, 0xd400, 0, {0x21,0xc0,0x0b,0x66,0x02,0x5c,0x00,0x87,0x00,0x2d,0xc0,0x0b,0x51,0x02,0x1c,0x80 }},
+ {16, 0xd410, 0, {0x96,0x00,0x21,0xc0,0x5b,0x74,0x82,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd420, 0, {0x20,0x14,0xcc,0x08,0xa3,0x00,0x20,0xc0,0x0b,0xb8,0x02,0xcc,0x00,0x8b,0x40,0xa8 }},
+ {16, 0xd430, 0, {0xc0,0x8b,0x08,0x22,0x8c,0x02,0x83,0x00,0x60,0xc0,0x0b,0x30,0x42,0x04,0x00,0x83 }},
+ {16, 0xd440, 0, {0x40,0x28,0xfc,0x8a,0x00,0x02,0x6e,0x00,0x83,0x00,0xa0,0xd0,0x8b,0x38,0x02,0x08 }},
+ {16, 0xd450, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xbc,0x02,0xef,0x00,0x3b,0xc0 }},
+ {16, 0xd460, 0, {0x4f,0xf8,0x02,0xfc,0x02,0xcf,0x00,0x38,0x12,0x0e,0x98,0x02,0x2c,0x00,0xcf,0x00 }},
+ {16, 0xd470, 0, {0x32,0xc0,0x09,0x90,0x03,0x64,0x02,0x81,0xc0,0x3e,0xd0,0x0f,0x90,0x07,0x3c,0x03 }},
+ {16, 0xd480, 0, {0xd9,0x00,0x32,0x60,0x0f,0x88,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd490, 0, {0x80,0x00,0xcc,0x00,0xdb,0x00,0x3e,0xc0,0x8f,0xb0,0x03,0xec,0x00,0xfb,0x02,0x36 }},
+ {16, 0xd4a0, 0, {0xc0,0x4f,0x90,0x02,0xe4,0x00,0xfb,0x00,0xbe,0x90,0x0f,0x9c,0x13,0xec,0x00,0xe9 }},
+ {16, 0xd4b0, 0, {0x18,0x3a,0xd0,0x04,0xd5,0x03,0xec,0x40,0xe9,0x00,0x3a,0x00,0x8f,0x80,0x03,0xe0 }},
+ {16, 0xd4c0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xcf,0x00,0x3d,0xc1 }},
+ {16, 0xd4d0, 0, {0x8c,0xf0,0x03,0x2c,0x00,0xef,0x0a,0xb3,0x12,0x2c,0x70,0x23,0x14,0x0a,0x4f,0x00 }},
+ {16, 0xd4e0, 0, {0x35,0x60,0x0d,0xb0,0x03,0x04,0x00,0xcd,0x80,0x07,0xe8,0x0c,0xc4,0x03,0x2c,0x00 }},
+ {16, 0xd4f0, 0, {0xcd,0x00,0x31,0xe2,0x2c,0xe0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd500, 0, {0x81,0x04,0x6c,0x02,0xab,0x02,0x2e,0xc0,0x0e,0xb0,0x02,0x2c,0x00,0x8b,0x00,0x32 }},
+ {16, 0xd510, 0, {0x30,0x00,0x9c,0x03,0x6c,0x00,0x8b,0x04,0x22,0x36,0x08,0x34,0x4a,0x2c,0x08,0x89 }},
+ {16, 0xd520, 0, {0x90,0x20,0xb8,0x0f,0x84,0x00,0xac,0x02,0x89,0x00,0x36,0xa0,0x08,0xa4,0x02,0x20 }},
+ {16, 0xd530, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x8b,0x00,0x2e,0xc0 }},
+ {16, 0xd540, 0, {0x08,0xb0,0x02,0x0c,0x00,0x8b,0x00,0x22,0xd1,0x08,0x88,0x12,0x26,0x00,0xa3,0x00 }},
+ {16, 0xd550, 0, {0x26,0x40,0x0b,0xb0,0x02,0x26,0x00,0x8b,0x00,0x26,0xc0,0x58,0x10,0x12,0x2c,0x04 }},
+ {16, 0xd560, 0, {0x82,0x80,0x2a,0x49,0x08,0x30,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd570, 0, {0x08,0x04,0x0c,0x00,0xa3,0x14,0x2c,0xc8,0x1a,0x34,0x8a,0x0c,0x84,0x83,0x40,0x22 }},
+ {16, 0xd580, 0, {0xc8,0x08,0x03,0x62,0x4c,0xc0,0xa3,0x60,0x20,0x40,0x0a,0x30,0x02,0x0c,0x00,0x8b }},
+ {16, 0xd590, 0, {0x45,0x08,0xc0,0x0b,0x10,0x02,0x8c,0xa0,0x83,0x00,0x26,0x40,0x08,0x30,0x0a,0x02 }},
+ {16, 0xd5a0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x00,0xcf,0x40,0x2f,0xd2 }},
+ {16, 0xd5b0, 0, {0x8c,0xf6,0x03,0x3c,0x22,0xcf,0x40,0x32,0xd6,0x4c,0xa6,0xc1,0x3d,0xa0,0x87,0x48 }},
+ {16, 0xd5c0, 0, {0x36,0x0d,0x0f,0xb1,0x02,0x24,0x42,0xcb,0x60,0x16,0xc0,0x0c,0xd0,0x03,0x2c,0x80 }},
+ {16, 0xd5d0, 0, {0xca,0x00,0x32,0xc0,0x0c,0x30,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd5e0, 0, {0xa0,0x19,0xfc,0x00,0xff,0x20,0x3e,0xca,0x0e,0xb0,0x03,0xec,0x20,0xdb,0x34,0x3a }},
+ {16, 0xd5f0, 0, {0xc8,0x0f,0x80,0x03,0xe4,0x10,0xdb,0x21,0x3e,0x18,0x0d,0xf2,0x03,0xfc,0x80,0xff }},
+ {16, 0xd600, 0, {0x30,0x35,0xc0,0x0f,0xc0,0x13,0xec,0x00,0xff,0x00,0x3b,0xc0,0x0f,0xf0,0x03,0xe8 }},
+ {16, 0xd610, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x11,0xfc,0x00,0xfb,0x0b,0x2f,0xca }},
+ {16, 0xd620, 0, {0x8d,0xf2,0x03,0xfa,0x00,0x96,0x80,0x3b,0xc4,0x0d,0xf1,0x03,0x7c,0x80,0xec,0x80 }},
+ {16, 0xd630, 0, {0x3b,0x08,0x0c,0xc2,0x03,0x74,0x02,0xcc,0x80,0x3f,0x48,0x0e,0xf0,0x03,0x30,0xa0 }},
+ {16, 0xd640, 0, {0xd5,0x80,0x3f,0x40,0x0c,0xf8,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd650, 0, {0x80,0x08,0xee,0x40,0xbf,0x80,0x2f,0xf0,0x0b,0xf7,0x22,0xee,0x20,0x8a,0x80,0x23 }},
+ {16, 0xd660, 0, {0xfc,0x88,0x75,0x12,0x3d,0x00,0x88,0x00,0x22,0x00,0x28,0x80,0x02,0x24,0x08,0x88 }},
+ {16, 0xd670, 0, {0x00,0x6f,0x50,0x00,0xf5,0x02,0x29,0x00,0x89,0x00,0x2e,0x54,0x0d,0x90,0x11,0xa0 }},
+ {16, 0xd680, 0, {0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0xb3,0x00,0x2c,0xc1 }},
+ {16, 0xd690, 0, {0x09,0x30,0x82,0xcc,0x82,0xbb,0x00,0x28,0xc0,0x49,0x32,0x02,0xcd,0x00,0xb8,0x00 }},
+ {16, 0xd6a0, 0, {0x2c,0x50,0x09,0x01,0x02,0x0c,0x40,0x80,0x00,0x6c,0x44,0x09,0x30,0x02,0x20,0x00 }},
+ {16, 0xd6b0, 0, {0xb0,0x00,0x2c,0x40,0x18,0x30,0x06,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd6c0, 0, {0xc0,0x01,0xac,0x00,0xbb,0x01,0x2e,0xc0,0x0b,0xb0,0x02,0xee,0x00,0xaa,0x00,0x4a }},
+ {16, 0xd6d0, 0, {0xc0,0x08,0xb0,0x52,0xec,0x00,0x98,0x02,0x26,0x40,0x09,0x80,0x02,0x6c,0x01,0xaa }},
+ {16, 0xd6e0, 0, {0x04,0x2e,0x40,0x09,0xb0,0x02,0x22,0x00,0xa9,0x80,0x2e,0x41,0x09,0x90,0x02,0xf0 }},
+ {16, 0xd6f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xec,0x00,0xfb,0x00,0x3e,0xc0 }},
+ {16, 0xd700, 0, {0x0d,0xb0,0x03,0xce,0x84,0xfa,0x00,0x1a,0xc0,0x8d,0xb0,0x43,0xec,0x00,0xf0,0x02 }},
+ {16, 0xd710, 0, {0x3f,0x00,0x0d,0xd1,0x03,0x35,0x00,0xcb,0x48,0x2e,0x40,0x2f,0xb0,0x09,0x22,0x80 }},
+ {16, 0xd720, 0, {0xf9,0xc8,0x1e,0xe0,0x08,0xb1,0xe2,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd730, 0, {0xe0,0x01,0xbc,0x00,0x7b,0x00,0x3f,0xc0,0x0f,0xf0,0x23,0xfc,0x00,0xde,0x00,0x24 }},
+ {16, 0xd740, 0, {0xc0,0x4f,0xf0,0x03,0x2c,0x00,0xec,0x20,0x3b,0x00,0x0e,0x98,0x03,0x94,0x02,0xdd }},
+ {16, 0xd750, 0, {0x00,0x3f,0x40,0x4e,0xf0,0x01,0xf8,0x00,0xdd,0x00,0x3c,0xe4,0x0f,0xd8,0x03,0xb8 }},
+ {16, 0xd760, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xac,0xc0,0xfb,0x20,0x32,0xc8 }},
+ {16, 0xd770, 0, {0x8d,0xb0,0x03,0xec,0x00,0xf9,0x00,0x3a,0xc2,0x2c,0x30,0x03,0x6c,0x04,0xd8,0x02 }},
+ {16, 0xd780, 0, {0x3c,0x44,0x8d,0x10,0x03,0xad,0x03,0xea,0x00,0x3c,0x40,0x0c,0x70,0x23,0xe4,0x00 }},
+ {16, 0xd790, 0, {0xc8,0x40,0x3a,0xc0,0x0d,0xbc,0x03,0x50,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd7a0, 0, {0xc8,0x01,0x3d,0x00,0xbf,0x42,0x23,0xf0,0x0d,0xf0,0x02,0xe5,0x00,0xe2,0x01,0x37 }},
+ {16, 0xd7b0, 0, {0xf1,0x08,0xf0,0x0e,0x3d,0xc0,0xa8,0x00,0x2e,0x54,0x28,0x90,0x02,0x2c,0x00,0x8a }},
+ {16, 0xd7c0, 0, {0x05,0x3b,0x41,0x48,0xf5,0x03,0x8c,0x00,0x89,0x00,0x22,0xd4,0x0e,0x95,0x02,0xf2 }},
+ {16, 0xd7d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb3,0x04,0x20,0xc0 }},
+ {16, 0xd7e0, 0, {0x89,0x30,0x02,0xcc,0x40,0xb2,0x00,0x2c,0xc4,0x48,0x30,0x02,0x2c,0x02,0xa2,0x00 }},
+ {16, 0xd7f0, 0, {0x2c,0x20,0x19,0x20,0x1a,0x80,0x08,0xb0,0x00,0x6c,0x40,0x08,0x30,0x02,0xc4,0x00 }},
+ {16, 0xd800, 0, {0x81,0x00,0x2c,0x40,0x08,0x30,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd810, 0, {0x20,0x01,0x1e,0x00,0xb7,0xa0,0xe1,0xe0,0x09,0x78,0x02,0xdf,0x04,0xae,0x80,0x2d }},
+ {16, 0xd820, 0, {0xe0,0x08,0x79,0x02,0x1e,0x10,0x87,0x90,0x2c,0x28,0x29,0x68,0x02,0x82,0x81,0xb4 }},
+ {16, 0xd830, 0, {0x80,0x2d,0x60,0x08,0x78,0x10,0xbc,0x00,0x8f,0x80,0x2d,0x60,0x0b,0x68,0x02,0xc8 }},
+ {16, 0xd840, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x0c,0x05,0xf3,0x92,0x30,0xca }},
+ {16, 0xd850, 0, {0x0d,0x30,0x03,0xcc,0x00,0xf3,0x00,0x3c,0xc0,0x0c,0x30,0x02,0x0c,0x80,0x70,0x00 }},
+ {16, 0xd860, 0, {0x2c,0x40,0x0d,0x20,0x03,0x89,0x00,0xb1,0x00,0x3e,0x40,0x2c,0x30,0x03,0xec,0x50 }},
+ {16, 0xd870, 0, {0xc3,0x20,0x3c,0x40,0x0c,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd880, 0, {0x40,0x1d,0xbc,0x00,0xff,0x00,0x3c,0xc0,0x0e,0xb0,0x83,0xec,0x40,0xea,0x00,0x36 }},
+ {16, 0xd890, 0, {0xc2,0x0f,0xb0,0x83,0xac,0x00,0xf8,0x00,0x3e,0x48,0x0e,0xe0,0x0b,0x7a,0x80,0xcf }},
+ {16, 0xd8a0, 0, {0x00,0x3b,0x44,0x0f,0xf0,0x03,0xec,0xc0,0xff,0x00,0x03,0x44,0x0e,0xe0,0x03,0xd0 }},
+ {16, 0xd8b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xfb,0x23,0x3e,0xc8 }},
+ {16, 0xd8c0, 0, {0x1d,0xb0,0x03,0xee,0x00,0xca,0x00,0x3e,0xc8,0x0c,0xb2,0x03,0x2d,0x90,0xc8,0x84 }},
+ {16, 0xd8d0, 0, {0x36,0x00,0x2d,0xb0,0x03,0x60,0x18,0x9b,0x80,0x33,0x50,0x0c,0xf2,0x03,0xe2,0x00 }},
+ {16, 0xd8e0, 0, {0xc9,0x80,0x32,0x40,0x0c,0xb8,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd8f0, 0, {0x48,0x11,0x9c,0x00,0xb7,0x28,0x0c,0xd2,0x28,0x73,0x02,0xfc,0x00,0x86,0x04,0x2c }},
+ {16, 0xd900, 0, {0xcc,0x28,0x70,0x83,0x0c,0x20,0x95,0x01,0x20,0x00,0x09,0x30,0x12,0x10,0x04,0x85 }},
+ {16, 0xd910, 0, {0x00,0x21,0x52,0x08,0x75,0x02,0xd8,0x00,0x87,0x00,0x21,0x40,0x08,0x60,0x02,0x12 }},
+ {16, 0xd920, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0xd4,0xb7,0xb1,0x09,0xe1 }},
+ {16, 0xd930, 0, {0x08,0x78,0x22,0xde,0x00,0x95,0x80,0x2d,0xe0,0x08,0x78,0x0a,0x5e,0x42,0x94,0xc0 }},
+ {16, 0xd940, 0, {0x21,0x60,0x08,0x78,0x02,0x5a,0x00,0x87,0x80,0x2d,0x68,0x08,0x7a,0x02,0xd7,0x00 }},
+ {16, 0xd950, 0, {0x97,0x80,0x20,0x60,0x09,0x78,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd960, 0, {0x48,0x10,0xcc,0x00,0xb3,0x00,0x2c,0xc0,0x08,0xb0,0x02,0xcd,0x80,0x92,0x00,0x2c }},
+ {16, 0xd970, 0, {0xc0,0x08,0xb0,0x02,0xcc,0x00,0x90,0x80,0xa0,0x40,0x09,0x36,0x02,0x48,0x02,0x83 }},
+ {16, 0xd980, 0, {0xa0,0xac,0x40,0x2a,0x30,0x06,0xce,0x02,0x93,0x04,0xa0,0x40,0x09,0x20,0x0a,0x12 }},
+ {16, 0xd990, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfa,0x00,0x3a,0x80 }},
+ {16, 0xd9a0, 0, {0x0d,0xa0,0x03,0xfb,0x02,0xde,0x80,0x3e,0x80,0x0c,0xa0,0x03,0x28,0x00,0xce,0x80 }},
+ {16, 0xd9b0, 0, {0x32,0x80,0x0c,0xa4,0x03,0x78,0x00,0xce,0xa4,0x3f,0x80,0x0c,0xa0,0x07,0xf9,0x00 }},
+ {16, 0xd9c0, 0, {0xde,0x00,0x32,0x80,0x2d,0xe0,0x02,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd9d0, 0, {0x48,0x00,0xe1,0x00,0xf8,0x00,0x7c,0x00,0x0f,0x80,0x03,0xe0,0x40,0xe8,0x10,0x3c }},
+ {16, 0xd9e0, 0, {0x01,0xcf,0x80,0x0f,0x20,0x00,0xe8,0x00,0x3e,0x00,0x0e,0x04,0x03,0x90,0x00,0xe8 }},
+ {16, 0xd9f0, 0, {0x00,0x20,0x00,0x0d,0x80,0x07,0xe0,0x00,0xe8,0x00,0x3e,0x04,0x0e,0x80,0x03,0xd2 }},
+ {16, 0xda00, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x10,0x7e,0x41 }},
+ {16, 0xda10, 0, {0x0e,0x90,0x03,0x24,0x00,0xf9,0x00,0x36,0x68,0x0e,0x90,0x0f,0xa4,0x08,0xc9,0x00 }},
+ {16, 0xda20, 0, {0x3a,0x40,0x0c,0x90,0x0b,0x24,0x12,0xe9,0x00,0x3e,0x44,0x2c,0x90,0x03,0x64,0x24 }},
+ {16, 0xda30, 0, {0xf9,0x02,0x2e,0x40,0x0c,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xda40, 0, {0x80,0x04,0x65,0x10,0xb9,0x80,0x3e,0x40,0x08,0x90,0x0a,0x26,0x00,0xb1,0x10,0x2a }},
+ {16, 0xda50, 0, {0x72,0x08,0x90,0x07,0x64,0x02,0x89,0x40,0x2e,0x40,0x28,0x90,0x12,0x25,0x00,0x89 }},
+ {16, 0xda60, 0, {0x45,0x3e,0x50,0x0d,0x90,0x0a,0x25,0x00,0xb9,0x40,0x2e,0x40,0x28,0x94,0x03,0xe0 }},
+ {16, 0xda70, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x00,0x2e,0x40 }},
+ {16, 0xda80, 0, {0x48,0x90,0x42,0x26,0x01,0xb9,0x40,0x26,0x40,0x0a,0x90,0x42,0x84,0x01,0x8b,0x08 }},
+ {16, 0xda90, 0, {0x2c,0x40,0x09,0xd0,0x82,0x34,0x32,0xa9,0x08,0x6e,0x42,0x08,0x10,0x02,0x24,0x20 }},
+ {16, 0xdaa0, 0, {0xb9,0x08,0x2c,0x40,0x18,0x90,0x82,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdab0, 0, {0x08,0x04,0x04,0x80,0xb3,0x20,0x28,0x48,0x08,0x12,0x02,0x04,0x01,0xb1,0x00,0x28 }},
+ {16, 0xdac0, 0, {0x58,0x08,0x12,0x02,0x05,0x89,0x81,0x40,0x2c,0x58,0x08,0x56,0x06,0x15,0x80,0x81 }},
+ {16, 0xdad0, 0, {0x40,0x28,0x50,0x09,0x14,0x02,0x05,0x80,0xb1,0x40,0x2c,0x5a,0x08,0x14,0x02,0xc2 }},
+ {16, 0xdae0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x68,0x00,0xf8,0x00,0x2e,0x00 }},
+ {16, 0xdaf0, 0, {0x2e,0x85,0x03,0x21,0x48,0xf8,0x00,0x36,0x00,0x8e,0x05,0x02,0xa0,0x08,0x80,0x00 }},
+ {16, 0xdb00, 0, {0x3e,0x00,0x0d,0x80,0x0b,0x10,0x04,0xe0,0x00,0x2c,0x00,0x4c,0x80,0x03,0x40,0x00 }},
+ {16, 0xdb10, 0, {0xf0,0x00,0x3e,0x08,0x0c,0x00,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdb20, 0, {0x98,0x1d,0xe4,0x40,0xf9,0x10,0x3e,0x44,0x0f,0x91,0x03,0xf4,0x00,0xfd,0x00,0x3e }},
+ {16, 0xdb30, 0, {0x44,0x0f,0x91,0x03,0xe4,0x40,0xfd,0x03,0x3f,0x44,0x1f,0x91,0x1b,0xe4,0x40,0xfd }},
+ {16, 0xdb40, 0, {0x01,0x3f,0x50,0x0e,0x94,0x03,0xf4,0x40,0xfd,0x00,0x3f,0x40,0x0f,0xd0,0x03,0xa6 }},
+ {16, 0xdb50, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xf4,0x00,0xcd,0xa0,0x71,0x68 }},
+ {16, 0xdb60, 0, {0x8d,0x98,0x03,0xd4,0x00,0xcd,0x00,0x33,0x60,0x0c,0x98,0x8f,0x27,0x20,0xc9,0x40 }},
+ {16, 0xdb70, 0, {0x3e,0x78,0x0c,0x9e,0x8b,0x27,0x20,0xd1,0x11,0x30,0x60,0x8c,0x9c,0x03,0x25,0x00 }},
+ {16, 0xdb80, 0, {0xf9,0x40,0x3e,0x78,0x0f,0x90,0x03,0x46,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdb90, 0, {0x38,0x10,0xe0,0x10,0x88,0x01,0x22,0x01,0x08,0x8c,0x22,0xe8,0x00,0x88,0x02,0x2a }},
+ {16, 0xdba0, 0, {0x14,0x08,0x8c,0x0b,0x23,0x90,0x88,0xa0,0x2e,0xb0,0x08,0x8c,0x42,0x23,0x00,0x88 }},
+ {16, 0xdbb0, 0, {0xa0,0x36,0x2a,0x18,0x8a,0x02,0x22,0x00,0xb8,0xa0,0x2e,0x34,0x0b,0xca,0x82,0x0e }},
+ {16, 0xdbc0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0x81,0x40,0x24,0x50 }},
+ {16, 0xdbd0, 0, {0x09,0x16,0x82,0xc4,0x00,0xa9,0x00,0x20,0x40,0x08,0x12,0x92,0x54,0x08,0x85,0x00 }},
+ {16, 0xdbe0, 0, {0x2f,0x4c,0x09,0x52,0x12,0x14,0x80,0x9d,0x00,0x21,0x50,0x08,0x54,0x22,0x14,0x80 }},
+ {16, 0xdbf0, 0, {0xb5,0x00,0x2d,0x48,0x0b,0xd0,0x02,0x42,0x05,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdc00, 0, {0x18,0x05,0xa4,0x02,0x89,0x01,0xa2,0x40,0x48,0x90,0x02,0xe4,0x02,0xa9,0x00,0x2a }},
+ {16, 0xdc10, 0, {0x40,0x68,0x90,0x02,0x64,0x10,0xad,0x00,0x2f,0x41,0x28,0x50,0x02,0x34,0x00,0x8d }},
+ {16, 0xdc20, 0, {0x44,0x27,0x40,0x39,0xd0,0x02,0x35,0x00,0xbd,0x14,0x2f,0x40,0x0b,0xd0,0x02,0x46 }},
+ {16, 0xdc30, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xc4,0x00,0xc9,0x00,0x36,0x40 }},
+ {16, 0xdc40, 0, {0x2d,0x90,0x03,0xe7,0x00,0xe1,0xe0,0x32,0x40,0x0c,0x90,0x0b,0x64,0x02,0xc9,0x08 }},
+ {16, 0xdc50, 0, {0x3c,0x50,0x0c,0x90,0x02,0x26,0x02,0xd9,0xc0,0x32,0x40,0x0c,0x90,0x13,0x27,0x00 }},
+ {16, 0xdc60, 0, {0xf9,0x20,0x3e,0x40,0x0f,0x90,0x03,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdc70, 0, {0x28,0x01,0xa4,0x02,0xf9,0x00,0x38,0x40,0x0f,0x90,0x03,0xe6,0x80,0xd9,0xa0,0x3c }},
+ {16, 0xdc80, 0, {0x40,0x0f,0x10,0x03,0xa4,0x00,0xd9,0x10,0x3e,0x40,0x0f,0x90,0x03,0xc4,0x92,0xf9 }},
+ {16, 0xdc90, 0, {0x21,0x3c,0x40,0x2e,0x90,0x0f,0xe6,0x80,0xf9,0x80,0x3e,0x40,0x0f,0x90,0x03,0x8a }},
+ {16, 0xdca0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa0,0x40,0xe8,0x10,0x3e,0x04 }},
+ {16, 0xdcb0, 0, {0x4e,0x80,0x03,0x20,0x80,0xd8,0x60,0x3a,0x02,0x0c,0x80,0x13,0x20,0x00,0xf8,0x40 }},
+ {16, 0xdcc0, 0, {0x36,0x10,0x2d,0x80,0x03,0xa0,0x08,0xe8,0x40,0x32,0x00,0x0d,0x00,0x03,0x21,0x02 }},
+ {16, 0xdcd0, 0, {0xc8,0x40,0xb2,0x00,0x0f,0xc0,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdce0, 0, {0x28,0x11,0x3b,0x10,0x86,0x01,0x2f,0xa0,0x0d,0xa0,0x02,0x38,0x00,0x8e,0xe0,0x23 }},
+ {16, 0xdcf0, 0, {0xa2,0x08,0xa0,0x02,0x28,0x00,0xba,0x80,0x22,0x80,0x08,0xa0,0x02,0x28,0x00,0x82 }},
+ {16, 0xdd00, 0, {0x00,0x2a,0x80,0x28,0xa0,0x02,0x2a,0x04,0x8a,0x80,0x22,0xa0,0x0b,0x60,0x02,0xca }},
+ {16, 0xdd10, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x43,0x80,0xa2,0x00,0x2c,0xa0 }},
+ {16, 0xdd20, 0, {0x08,0x30,0x02,0x2e,0x00,0x92,0x00,0x28,0xc0,0x28,0x30,0x02,0x2c,0x00,0xb3,0x80 }},
+ {16, 0xdd30, 0, {0x24,0xc0,0x09,0x30,0x0a,0x8c,0x00,0xa3,0x00,0x60,0xc0,0x08,0x30,0x0a,0x4c,0x00 }},
+ {16, 0xdd40, 0, {0x83,0x00,0x20,0xe0,0x0b,0x20,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdd50, 0, {0xa0,0x01,0x10,0x00,0x86,0x00,0x2d,0xc0,0x09,0x3a,0x02,0x35,0x00,0x86,0x00,0x21 }},
+ {16, 0xdd60, 0, {0xc0,0x08,0x73,0x02,0x10,0x00,0xbf,0x88,0x21,0x00,0x08,0x70,0x02,0x1c,0x08,0x8f }},
+ {16, 0xdd70, 0, {0x00,0x2b,0xc0,0x08,0x20,0x12,0x5e,0x20,0x87,0x88,0x21,0x83,0x0b,0x60,0x02,0xe8 }},
+ {16, 0xdd80, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x12,0x00,0xe5,0x81,0x3d,0xa0 }},
+ {16, 0xdd90, 0, {0x2c,0x7a,0x0b,0x1e,0x00,0xd4,0x80,0x38,0xe0,0x0c,0xfa,0x0b,0x1e,0x00,0xf6,0x80 }},
+ {16, 0xdda0, 0, {0x34,0xe0,0x0d,0x28,0x03,0x8a,0x00,0xe6,0x80,0x31,0x20,0x0c,0x78,0x03,0x7a,0x04 }},
+ {16, 0xddb0, 0, {0xce,0x84,0x31,0xe0,0x4f,0x78,0x43,0xea,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xddc0, 0, {0x08,0x0d,0x80,0x00,0xf8,0x00,0x3e,0xc0,0x0f,0xb5,0x23,0xe4,0x00,0xf0,0x04,0x36 }},
+ {16, 0xddd0, 0, {0x40,0x0f,0xb6,0x87,0xe0,0x00,0xf2,0x00,0x3e,0x00,0x1f,0xa0,0x0b,0xe8,0x00,0xfa }},
+ {16, 0xdde0, 0, {0x00,0x3e,0x00,0x0e,0xa0,0x03,0xa8,0x00,0xfa,0x00,0x3e,0x80,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0xddf0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xcc,0x80,0x33,0xa0 }},
+ {16, 0xde00, 0, {0x0c,0xfc,0x03,0x3e,0x00,0xfc,0x80,0x37,0xe0,0x0f,0xb9,0x21,0x3e,0x00,0xfd,0x82 }},
+ {16, 0xde10, 0, {0x33,0xe0,0x2c,0xf8,0x03,0x7e,0x10,0xdf,0x84,0x3d,0xe0,0x0c,0xf8,0x03,0xf6,0x00 }},
+ {16, 0xde20, 0, {0xfd,0x80,0x3f,0x60,0x0c,0xe8,0x23,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xde30, 0, {0xa8,0x11,0x98,0x40,0x84,0x10,0x21,0xc0,0x08,0x70,0x02,0x10,0x80,0xb4,0x00,0x21 }},
+ {16, 0xde40, 0, {0xc8,0x0b,0x7a,0x02,0x10,0x00,0xfd,0x00,0x21,0x04,0x08,0x70,0x02,0x1c,0x42,0x87 }},
+ {16, 0xde50, 0, {0x00,0x2d,0xc4,0x48,0x61,0x02,0xd6,0x80,0xb5,0x00,0x2f,0x04,0x08,0x61,0x82,0x2a }},
+ {16, 0xde60, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x81,0x00,0x21,0x80 }},
+ {16, 0xde70, 0, {0x08,0x30,0x02,0x1c,0x10,0xbc,0x08,0x25,0x80,0x4b,0x30,0x0e,0x1c,0x00,0xb4,0x00 }},
+ {16, 0xde80, 0, {0x20,0xc0,0x08,0x20,0x02,0x58,0x00,0x96,0x00,0x2f,0x00,0x0a,0x70,0x02,0xd0,0x80 }},
+ {16, 0xde90, 0, {0xb4,0x18,0x2d,0x40,0x09,0xf8,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdea0, 0, {0x20,0x14,0xc8,0x02,0x80,0x00,0xa0,0xc0,0x08,0x30,0x22,0x0b,0xc0,0xb0,0xc0,0x22 }},
+ {16, 0xdeb0, 0, {0x80,0x0b,0x30,0x02,0x00,0x00,0xa0,0x04,0x22,0x00,0x28,0xa0,0x02,0x2b,0x00,0x8a }},
+ {16, 0xdec0, 0, {0x00,0x2c,0x00,0x08,0xa0,0x06,0xc0,0x00,0xb0,0xc2,0x2c,0x00,0x09,0xbc,0x1a,0x08 }},
+ {16, 0xded0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa0,0x00,0xc8,0x00,0x32,0xc0 }},
+ {16, 0xdee0, 0, {0x0c,0xf0,0x0b,0x26,0x00,0xf9,0xc0,0x36,0x00,0x0f,0xf0,0x13,0x2c,0x10,0xbb,0x40 }},
+ {16, 0xdef0, 0, {0xf2,0xc0,0x08,0x90,0x03,0x67,0x00,0xd9,0x80,0x3e,0xc0,0x08,0x90,0x02,0xec,0x00 }},
+ {16, 0xdf00, 0, {0xfb,0xd0,0x3e,0xc0,0x29,0x8c,0x00,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdf10, 0, {0x80,0x00,0xe0,0x00,0xf8,0x44,0x3c,0xd0,0x2f,0xb0,0x03,0xe4,0x00,0xf9,0x20,0x3e }},
+ {16, 0xdf20, 0, {0x40,0x0f,0x30,0x03,0xe0,0x00,0xfb,0x08,0x3e,0x00,0x0f,0x90,0x13,0xe4,0x42,0xf9 }},
+ {16, 0xdf30, 0, {0x10,0x3e,0xc0,0x0f,0x80,0x03,0xee,0x00,0xfb,0x00,0x3e,0x80,0x0e,0x82,0x03,0xe0 }},
+ {16, 0xdf40, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xe0,0x08,0xfc,0x80,0x32,0xe4 }},
+ {16, 0xdf50, 0, {0x0e,0xf0,0x03,0x74,0x00,0xfc,0x00,0x3f,0x40,0x0c,0xf0,0x0b,0x3c,0x00,0xfe,0x00 }},
+ {16, 0xdf60, 0, {0x3f,0xc0,0x0d,0xc1,0x03,0x20,0x20,0xcc,0x10,0x33,0x00,0x0c,0xd1,0x03,0x58,0x00 }},
+ {16, 0xdf70, 0, {0xce,0x00,0x2f,0xc0,0x0f,0xd1,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdf80, 0, {0x81,0x44,0x62,0x00,0xb0,0x40,0x2a,0xf1,0x08,0xb0,0x12,0x26,0x08,0xb8,0xc8,0x2e }},
+ {16, 0xdf90, 0, {0x70,0x0a,0xb0,0x02,0x20,0x00,0xba,0x00,0x2e,0x00,0x28,0x80,0x03,0x22,0x40,0x88 }},
+ {16, 0xdfa0, 0, {0x01,0x20,0x00,0x0a,0x80,0x02,0x28,0x00,0x8a,0x01,0x2e,0x80,0x8b,0x90,0x02,0x20 }},
+ {16, 0xdfb0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x26,0x00,0xb8,0x28,0x22,0x42 }},
+ {16, 0xdfc0, 0, {0x08,0x30,0x02,0x66,0x00,0xb8,0x80,0x2e,0x30,0x88,0xb0,0x02,0x2c,0x00,0xb9,0x01 }},
+ {16, 0xdfd0, 0, {0x2e,0xc0,0x88,0x90,0x02,0xa4,0x00,0x89,0x00,0x22,0xc0,0x08,0x90,0x02,0x24,0x0c }},
+ {16, 0xdfe0, 0, {0x89,0x01,0x2e,0x40,0x1b,0x80,0x02,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdff0, 0, {0x08,0x04,0x00,0x00,0xb0,0x00,0x28,0xc0,0x28,0x30,0x02,0x00,0x00,0xb0,0x00,0x2c }},
+ {16, 0xe000, 0, {0x40,0x0a,0x30,0x02,0x00,0x00,0xb1,0x00,0x2c,0x00,0x08,0x10,0x0a,0x04,0x00,0x81 }},
+ {16, 0xe010, 0, {0x01,0xa2,0xc0,0x08,0x00,0x0a,0x04,0x80,0x81,0x00,0x2c,0x00,0x1b,0x00,0x0a,0x02 }},
+ {16, 0xe020, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xf8,0x00,0x32,0x40 }},
+ {16, 0xe030, 0, {0x0e,0xf0,0x23,0x64,0x08,0xf8,0x00,0x2e,0x00,0x0c,0xf0,0x03,0x2c,0x00,0xf8,0x00 }},
+ {16, 0xe040, 0, {0x3e,0xc0,0x0c,0x80,0x03,0x20,0x02,0xc8,0x04,0x32,0x00,0x1c,0x90,0x03,0x20,0x00 }},
+ {16, 0xe050, 0, {0xc8,0x01,0x3e,0x41,0x9f,0x90,0x43,0x40,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe060, 0, {0xa0,0x1d,0xf0,0x00,0xfc,0x0c,0x3f,0xc0,0x0f,0xf0,0x03,0xf0,0x10,0xf4,0x00,0x3f }},
+ {16, 0xe070, 0, {0x00,0x0f,0xf4,0x23,0xf0,0x00,0xfc,0x00,0x3f,0x00,0x0e,0xc0,0x03,0xb0,0x00,0xfc }},
+ {16, 0xe080, 0, {0x00,0x3f,0x00,0x0f,0xc0,0x03,0xe1,0x00,0xfc,0x00,0x3f,0x01,0x1f,0x50,0x03,0xe8 }},
+ {16, 0xe090, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x0d,0xf0,0xd0,0xff,0x20,0x3e,0xd0 }},
+ {16, 0xe0a0, 0, {0x8e,0xb0,0x03,0xec,0xa0,0xdb,0x28,0x3e,0xcc,0x0c,0xb3,0x03,0xad,0x08,0xf8,0x3c }},
+ {16, 0xe0b0, 0, {0x32,0x23,0x0e,0x48,0x23,0x7a,0x00,0xfd,0x94,0x3f,0xe0,0x0f,0x78,0x33,0xee,0x08 }},
+ {16, 0xe0c0, 0, {0xbf,0x80,0x3f,0xe4,0x0f,0xf9,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe0d0, 0, {0xa0,0x00,0xec,0xc8,0xbf,0xd1,0x0f,0xc8,0x0c,0x26,0x82,0xfd,0x24,0x8f,0x00,0x2e }},
+ {16, 0xe0e0, 0, {0x99,0x0a,0xf2,0x62,0x1d,0xd0,0x99,0x61,0x22,0x71,0x88,0x88,0x02,0xac,0x00,0xb8 }},
+ {16, 0xe0f0, 0, {0x22,0x2e,0x20,0x4b,0x88,0x03,0xa0,0x00,0x80,0x00,0x2e,0x08,0x0b,0x80,0x23,0x60 }},
+ {16, 0xe100, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x04,0xb3,0x03,0x0c,0xcc }},
+ {16, 0xe110, 0, {0x0a,0x13,0x12,0xcc,0x14,0xa3,0x0e,0x0c,0x58,0x0a,0x33,0x02,0x8c,0x10,0xa3,0x20 }},
+ {16, 0xe120, 0, {0xa0,0x0a,0x18,0x90,0x02,0x48,0xa0,0xb0,0x20,0x24,0x80,0x0a,0x20,0x02,0xcc,0x09 }},
+ {16, 0xe130, 0, {0xa1,0x00,0x2c,0x80,0x0b,0x32,0x42,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe140, 0, {0xe0,0x11,0xac,0x20,0xbb,0x00,0x2e,0xc0,0x4b,0x80,0xa2,0xec,0x00,0xab,0x00,0x4e }},
+ {16, 0xe150, 0, {0x46,0x2a,0xb0,0x02,0x2c,0x04,0x9b,0x80,0x2a,0x60,0x8a,0x9c,0x02,0xac,0x00,0xb9 }},
+ {16, 0xe160, 0, {0x81,0x2e,0x40,0x0b,0x98,0x02,0xa3,0x00,0x8a,0x00,0x2e,0x40,0x0b,0x80,0x04,0xf0 }},
+ {16, 0xe170, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe1,0x00,0xfb,0x04,0x3e,0xc0 }},
+ {16, 0xe180, 0, {0x0e,0xb4,0x03,0xec,0x0a,0xdb,0x02,0x2e,0xd1,0x0e,0xb0,0x03,0xac,0x00,0xfb,0x82 }},
+ {16, 0xe190, 0, {0x32,0x28,0x1e,0x0c,0x03,0x68,0x00,0xb9,0x00,0x3e,0x40,0x4f,0xb0,0x43,0xed,0x00 }},
+ {16, 0xe1a0, 0, {0xea,0x00,0x3e,0x40,0x0f,0x80,0x03,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe1b0, 0, {0xc0,0x01,0xb8,0x18,0xff,0x02,0x1f,0xc0,0x0c,0xe2,0x03,0xfc,0x00,0xdf,0x03,0x2f }},
+ {16, 0xe1c0, 0, {0xa1,0x0f,0x70,0x03,0xfc,0x04,0xab,0x04,0x37,0x42,0x2d,0xd0,0x02,0x7c,0x00,0xfc }},
+ {16, 0xe1d0, 0, {0x00,0x3f,0x80,0x0f,0xc0,0x03,0xb0,0x00,0xfd,0x00,0x3f,0x80,0x0f,0xf0,0x03,0x78 }},
+ {16, 0xe1e0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa9,0x00,0xdb,0x00,0x3c,0xc0 }},
+ {16, 0xe1f0, 0, {0x2e,0x94,0x01,0x6c,0x11,0xcb,0x00,0xb8,0xc0,0x0c,0xb0,0x03,0x6c,0x00,0xeb,0x01 }},
+ {16, 0xe200, 0, {0x32,0x10,0x07,0x92,0x03,0xa8,0x00,0xf8,0x00,0x3e,0x0c,0x07,0xa2,0x03,0xad,0x00 }},
+ {16, 0xe210, 0, {0xd8,0x00,0x32,0x00,0x0c,0x80,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe220, 0, {0xc8,0x05,0x28,0x08,0xbf,0x00,0x2f,0xc0,0x88,0x80,0x02,0x3c,0x08,0xef,0x03,0x22 }},
+ {16, 0xe230, 0, {0x00,0x0d,0xf5,0x00,0x3c,0x00,0x8b,0x82,0x22,0x60,0x03,0x9c,0x02,0x2c,0x10,0xb9 }},
+ {16, 0xe240, 0, {0xb0,0x22,0xf0,0x0b,0x90,0x02,0x20,0x00,0xbb,0x00,0x22,0xe2,0x0d,0xb0,0x02,0xf2 }},
+ {16, 0xe250, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x40,0x00,0xb3,0x02,0x2c,0xc0 }},
+ {16, 0xe260, 0, {0x08,0x30,0x02,0x6c,0x00,0x83,0x00,0x20,0xc0,0x09,0x34,0x04,0xec,0x00,0xa8,0x00 }},
+ {16, 0xe270, 0, {0x22,0xf0,0x0b,0x00,0x02,0x88,0x00,0xb3,0x00,0x28,0xe0,0x0b,0x14,0x02,0xa0,0x00 }},
+ {16, 0xe280, 0, {0x93,0x00,0x20,0xc0,0x08,0xb0,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe290, 0, {0x20,0x01,0x1e,0x04,0xb7,0x80,0x2d,0xe8,0x08,0x78,0x02,0x0e,0xc8,0xa7,0x90,0x21 }},
+ {16, 0xe2a0, 0, {0xa8,0x19,0x38,0x52,0x9e,0xc1,0x87,0x80,0x21,0xe2,0x0b,0xd9,0x82,0x9e,0x00,0xb6 }},
+ {16, 0xe2b0, 0, {0xa0,0x2d,0x20,0x0b,0x68,0x02,0x1e,0x00,0xb4,0xc1,0x21,0x20,0x09,0x48,0x02,0xc8 }},
+ {16, 0xe2c0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x0c,0x80,0xb3,0x10,0x3e,0xe0 }},
+ {16, 0xe2d0, 0, {0x0e,0x3a,0x07,0x4e,0x00,0xcb,0x90,0x3a,0x61,0x0d,0x38,0x03,0xce,0xd1,0xe1,0x98 }},
+ {16, 0xe2e0, 0, {0x30,0xa4,0x8f,0x10,0x03,0x88,0x00,0xba,0xa1,0x3c,0x84,0x07,0x00,0x03,0x82,0xd4 }},
+ {16, 0xe2f0, 0, {0xd1,0x00,0x72,0x80,0x0c,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe300, 0, {0x40,0x15,0xbc,0x04,0xff,0x00,0x3f,0xc0,0x0f,0xc2,0x23,0xec,0xb0,0xff,0x00,0x32 }},
+ {16, 0xe310, 0, {0x04,0x06,0xb4,0x23,0x7c,0x10,0xbf,0x00,0x3e,0x84,0x0f,0xb0,0x03,0x7c,0x40,0xff }},
+ {16, 0xe320, 0, {0x00,0x33,0x40,0x0f,0xf0,0x03,0xfc,0x00,0xfe,0x00,0xbf,0x40,0x0f,0xc8,0x03,0xd0 }},
+ {16, 0xe330, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xe4,0x00,0xcb,0x33,0x3e,0xc8 }},
+ {16, 0xe340, 0, {0x4c,0xb0,0x03,0xac,0x90,0xdb,0xa0,0x36,0xc0,0x0e,0xba,0x43,0x6c,0x00,0xc9,0x00 }},
+ {16, 0xe350, 0, {0x3e,0x40,0x0f,0x00,0x0f,0x28,0x00,0xfb,0x00,0x3e,0x40,0x0f,0x18,0x43,0x60,0x00 }},
+ {16, 0xe360, 0, {0xfa,0x00,0x3e,0x40,0x4f,0x08,0x0b,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe370, 0, {0x48,0x11,0x9c,0x10,0x07,0x08,0x2c,0xca,0x08,0x20,0x02,0x1c,0x20,0x87,0x28,0x3f }},
+ {16, 0xe380, 0, {0x80,0x8a,0xf0,0x02,0x1d,0x40,0x87,0x04,0x2d,0xc0,0x0b,0x70,0x02,0x1c,0x00,0xb6 }},
+ {16, 0xe390, 0, {0x00,0x2d,0x80,0x0b,0x60,0x03,0x1c,0x00,0xb5,0x00,0x2d,0x80,0x0b,0x70,0x02,0x12 }},
+ {16, 0xe3a0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x8e,0x00,0x87,0xa0,0x2d,0xe4 }},
+ {16, 0xe3b0, 0, {0x0a,0x58,0x02,0x1e,0x01,0x83,0x90,0x21,0x70,0x0b,0x79,0x02,0x9e,0x01,0x85,0xc0 }},
+ {16, 0xe3c0, 0, {0x2d,0xe0,0x4b,0x58,0x12,0x1a,0x00,0xb6,0x80,0x2d,0x20,0x0b,0x48,0x02,0x52,0x00 }},
+ {16, 0xe3d0, 0, {0xb4,0x80,0x2d,0x20,0x0b,0x48,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe3e0, 0, {0x48,0x14,0xec,0x00,0x83,0x00,0x2c,0xc0,0x88,0x36,0x02,0x0c,0x02,0x83,0x00,0x6c }},
+ {16, 0xe3f0, 0, {0xc0,0x0b,0x30,0x0a,0xac,0x00,0x9b,0xe0,0x6c,0xc8,0x0b,0x32,0x02,0x0c,0x01,0xb3 }},
+ {16, 0xe400, 0, {0x00,0x2c,0xc0,0x0b,0x30,0x02,0x0c,0x10,0xb3,0x40,0x2c,0xc0,0x0b,0x3c,0x82,0x12 }},
+ {16, 0xe410, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x02,0xca,0x00,0x3e,0x80 }},
+ {16, 0xe420, 0, {0x0e,0xe4,0x8b,0x28,0x00,0xca,0x00,0x33,0x95,0x0f,0xa0,0x07,0xa8,0x02,0xce,0x40 }},
+ {16, 0xe430, 0, {0x3f,0xb0,0x0f,0xe4,0x82,0x28,0x00,0xfa,0x00,0x3e,0x80,0x0f,0xa0,0x23,0x68,0x00 }},
+ {16, 0xe440, 0, {0xfa,0x40,0x3e,0x81,0x4f,0xa4,0xe3,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe450, 0, {0x48,0x00,0xe0,0x80,0xf0,0x00,0x3c,0x00,0x2f,0x00,0x02,0x60,0x00,0xe8,0x00,0x3c }},
+ {16, 0xe460, 0, {0x00,0x0e,0x80,0x01,0x20,0x00,0xe8,0x04,0x5e,0x04,0x0f,0x80,0x03,0xe0,0x00,0xfc }},
+ {16, 0xe470, 0, {0x01,0x3f,0x10,0x0f,0xc4,0x03,0xb0,0x00,0xfc,0x09,0x3f,0x00,0x0f,0xc0,0x03,0xd2 }},
+ {16, 0xe480, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xa9,0x20,0x36,0x40 }},
+ {16, 0xe490, 0, {0x0e,0x90,0x03,0x44,0x04,0xd9,0x00,0x3e,0x40,0x0d,0x90,0x03,0xe4,0x04,0xc9,0x00 }},
+ {16, 0xe4a0, 0, {0x32,0x40,0x8f,0x90,0x0b,0xe4,0x08,0xf9,0x00,0x3e,0x44,0x0e,0x98,0x03,0xe6,0x00 }},
+ {16, 0xe4b0, 0, {0xf9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe4c0, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x22,0x40,0x18,0x90,0x02,0x24,0x00,0x89,0x00,0x2e }},
+ {16, 0xe4d0, 0, {0x40,0x08,0x94,0x02,0xe4,0x00,0xd9,0x04,0x22,0x40,0x0b,0x1c,0x0b,0x64,0x00,0xb9 }},
+ {16, 0xe4e0, 0, {0x94,0x2c,0x50,0x08,0x9c,0x02,0xe4,0x14,0xb9,0x90,0x0e,0x40,0x0b,0x90,0x02,0xe0 }},
+ {16, 0xe4f0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x02,0x89,0x00,0x26,0x40 }},
+ {16, 0xe500, 0, {0x4a,0x90,0x02,0x64,0x00,0x99,0x04,0x2e,0x40,0x08,0x98,0x82,0xe4,0x00,0x89,0x00 }},
+ {16, 0xe510, 0, {0x6a,0x40,0x0a,0x92,0x82,0xe4,0x00,0xbd,0x01,0x2f,0x50,0x12,0xd6,0x02,0xf4,0x40 }},
+ {16, 0xe520, 0, {0xbd,0x00,0x0f,0x40,0x0b,0xd0,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe530, 0, {0x08,0x04,0x04,0x80,0x81,0x20,0x20,0x48,0x08,0x12,0x02,0x04,0x80,0x81,0x22,0x2c }},
+ {16, 0xe540, 0, {0x48,0xa8,0x12,0x06,0xc4,0x90,0x91,0x20,0x28,0x50,0x0b,0x90,0x02,0x45,0x00,0xb5 }},
+ {16, 0xe550, 0, {0x40,0x6d,0x40,0x08,0x50,0x12,0xd4,0x04,0xb5,0x02,0x2d,0x40,0x0b,0x50,0x02,0xc2 }},
+ {16, 0xe560, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xc8,0x00,0x36,0x14 }},
+ {16, 0xe570, 0, {0x0a,0x85,0x03,0x41,0x40,0xd8,0x50,0x2e,0x14,0x0c,0x85,0x03,0xc1,0x40,0xc8,0x50 }},
+ {16, 0xe580, 0, {0xba,0x00,0x0e,0x80,0x23,0xe0,0x00,0x78,0x00,0x3e,0x00,0x0e,0x80,0x03,0xe0,0x04 }},
+ {16, 0xe590, 0, {0xf8,0x00,0x3e,0x00,0x0f,0xc0,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe5a0, 0, {0x98,0x1d,0xf4,0x40,0xd9,0x10,0x3e,0x44,0x07,0xf1,0x03,0xe4,0x40,0xf9,0x10,0x3f }},
+ {16, 0xe5b0, 0, {0x44,0xaf,0x91,0x03,0xe4,0x40,0xfd,0x10,0x37,0x50,0x0f,0xd0,0x03,0xe4,0x00,0xf9 }},
+ {16, 0xe5c0, 0, {0x00,0x3e,0x40,0x0f,0x90,0x03,0xe4,0xa0,0xf9,0x28,0x3e,0x4a,0x0f,0x92,0x83,0xe6 }},
+ {16, 0xe5d0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0xd4,0xfd,0xa2,0x3a,0x70 }},
+ {16, 0xe5e0, 0, {0x8c,0x9e,0x03,0x26,0x80,0xc9,0xa0,0x32,0x68,0x0c,0xdb,0x43,0x27,0x80,0x9d,0xa2 }},
+ {16, 0xe5f0, 0, {0xb7,0x40,0x0f,0x50,0x03,0x65,0x00,0xfd,0x00,0x3f,0xc1,0x07,0xd0,0x03,0xf5,0x04 }},
+ {16, 0xe600, 0, {0xfd,0x40,0x2f,0xc0,0x0c,0xd0,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe610, 0, {0x38,0x10,0xe3,0x88,0xb8,0x50,0x22,0x38,0x08,0x8e,0x00,0xa2,0xa0,0x88,0xe8,0x22 }},
+ {16, 0xe620, 0, {0x38,0x48,0x88,0x03,0x62,0x10,0xa8,0xe8,0x3c,0x00,0x0b,0x80,0x03,0x62,0x80,0xb8 }},
+ {16, 0xe630, 0, {0x01,0x2e,0x80,0x0b,0x80,0x21,0xa2,0x00,0xb0,0x84,0x2e,0x2a,0x28,0x8a,0x82,0xce }},
+ {16, 0xe640, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x40,0xb1,0x00,0x28,0x58 }},
+ {16, 0xe650, 0, {0x80,0x13,0x40,0x05,0x00,0x81,0x40,0x20,0x52,0x28,0x16,0x02,0x85,0x80,0x9b,0xc2 }},
+ {16, 0xe660, 0, {0x64,0x41,0x8b,0x98,0x02,0x04,0x00,0xb1,0x09,0x2c,0x40,0x1b,0x10,0x20,0xc4,0x00 }},
+ {16, 0xe670, 0, {0xb1,0x00,0x2c,0x40,0x48,0x10,0x02,0xc2,0x05,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe680, 0, {0x18,0x15,0xa5,0x84,0xb9,0x00,0x20,0x40,0x08,0x90,0x02,0x24,0x00,0x01,0x00,0x20 }},
+ {16, 0xe690, 0, {0x50,0x08,0x90,0x42,0x64,0x00,0xa9,0x10,0xae,0x58,0x03,0x98,0x02,0x64,0x00,0xb9 }},
+ {16, 0xe6a0, 0, {0x00,0x2e,0x40,0x0b,0x90,0x46,0xa4,0x10,0xb9,0x00,0x2e,0x41,0x08,0x90,0x02,0xc6 }},
+ {16, 0xe6b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xe7,0x00,0xf9,0x00,0x2a,0x40 }},
+ {16, 0xe6c0, 0, {0x2c,0x94,0x0b,0x24,0x02,0xc9,0x00,0xb2,0x44,0x0c,0x90,0x03,0x24,0x04,0xd9,0x80 }},
+ {16, 0xe6d0, 0, {0xb6,0x41,0x8f,0x18,0x03,0x24,0x00,0xf9,0x60,0x3e,0x40,0x0f,0x96,0x03,0xe4,0x00 }},
+ {16, 0xe6e0, 0, {0xf9,0x80,0x3e,0x42,0x8c,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe6f0, 0, {0x28,0x01,0xa6,0x00,0xf1,0x00,0x3e,0x40,0x0f,0x1c,0x03,0xc4,0x00,0xf9,0x00,0x3e }},
+ {16, 0xe700, 0, {0x40,0x8f,0x90,0x23,0xc4,0x10,0xf9,0x00,0xbe,0x40,0x0f,0x90,0x0b,0xe4,0x00,0xf9 }},
+ {16, 0xe710, 0, {0x00,0x3e,0x40,0x07,0x90,0x23,0xe4,0x00,0xf9,0x20,0x3e,0x40,0x8f,0x90,0x03,0xca }},
+ {16, 0xe720, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x00,0xf8,0x00,0xbe,0x00 }},
+ {16, 0xe730, 0, {0x0e,0x84,0x03,0x20,0x00,0xc8,0x00,0x32,0x00,0x0c,0x00,0x83,0x20,0x00,0xf8,0x00 }},
+ {16, 0xe740, 0, {0x3e,0x00,0x0c,0x80,0x03,0xa0,0x00,0xf8,0x00,0x36,0x10,0x0f,0x80,0x43,0xe0,0x08 }},
+ {16, 0xe750, 0, {0xf8,0x00,0x32,0x00,0x0f,0x80,0x03,0xca,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe760, 0, {0x28,0x05,0x28,0x00,0xba,0x00,0x22,0x80,0x48,0xa0,0x03,0x68,0x00,0xaa,0x00,0x2a }},
+ {16, 0xe770, 0, {0x80,0x08,0xe0,0x03,0x68,0x00,0x82,0x00,0x2f,0x80,0x08,0xe6,0x02,0x28,0x04,0xbe }},
+ {16, 0xe780, 0, {0x40,0x23,0x80,0x0b,0xe8,0x02,0xea,0x00,0xbe,0x01,0x22,0x80,0x0b,0xe0,0x02,0xca }},
+ {16, 0xe790, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x01,0x93,0x01,0x20,0xc1 }},
+ {16, 0xe7a0, 0, {0x0a,0x30,0x02,0x0c,0x00,0xa3,0x00,0x20,0xc0,0x88,0x38,0x42,0x0c,0x00,0xa3,0x00 }},
+ {16, 0xe7b0, 0, {0x24,0xc0,0x0a,0x3e,0x42,0x8c,0x00,0xb2,0x4c,0x24,0xe0,0x4b,0x38,0x02,0xc4,0x41 }},
+ {16, 0xe7c0, 0, {0xb3,0x00,0x22,0xc0,0x0b,0x10,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe7d0, 0, {0xa0,0x01,0x1c,0x00,0xb7,0x00,0x20,0xc9,0x48,0x70,0x02,0xdc,0x40,0xa7,0x14,0x2c }},
+ {16, 0xe7e0, 0, {0xc8,0x28,0x30,0x82,0x5c,0xc1,0x85,0x00,0x2d,0xe0,0x2a,0xf0,0x12,0x1c,0x80,0xb7 }},
+ {16, 0xe7f0, 0, {0xa0,0x21,0x82,0x0b,0x70,0x82,0xd4,0x11,0xb6,0x80,0x21,0x40,0x4b,0x50,0x02,0xe8 }},
+ {16, 0xe800, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x80,0xd5,0x80,0x29,0xea }},
+ {16, 0xe810, 0, {0x4e,0x3a,0x07,0x0e,0x80,0xe3,0xb0,0x31,0xfc,0x0c,0x48,0x03,0x0e,0x41,0xe7,0x80 }},
+ {16, 0xe820, 0, {0x3d,0xe0,0x0e,0x78,0x03,0x9e,0x80,0xf4,0xc4,0x35,0xe0,0x0f,0x78,0x27,0xde,0x00 }},
+ {16, 0xe830, 0, {0xf5,0x80,0xb1,0xe0,0x0f,0x58,0x03,0xea,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe840, 0, {0x08,0x1d,0xac,0x00,0x31,0x04,0x3a,0xc4,0x0f,0xb5,0x93,0x6d,0x08,0xfb,0x40,0x3a }},
+ {16, 0xe850, 0, {0xc8,0x63,0x80,0x23,0xec,0x98,0xe9,0x00,0x3e,0xc0,0x0d,0xb0,0x43,0xec,0x00,0xf3 }},
+ {16, 0xe860, 0, {0x80,0x3e,0x40,0x4f,0xa0,0x03,0xec,0x00,0xf8,0x68,0x3e,0x40,0x8f,0x98,0x03,0xc2 }},
+ {16, 0xe870, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x60,0xeb,0x90,0x3e,0xe4 }},
+ {16, 0xe880, 0, {0x0f,0xb8,0x00,0x3f,0x40,0xcb,0x80,0x7f,0xe0,0x0e,0xfb,0x03,0x2e,0x40,0xcb,0x80 }},
+ {16, 0xe890, 0, {0x3f,0xe0,0x0f,0x79,0x43,0x2e,0x60,0xca,0x81,0x33,0x64,0x8f,0xd9,0x03,0xfe,0x00 }},
+ {16, 0xe8a0, 0, {0xff,0x81,0x33,0xe0,0x0f,0xd9,0x8b,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe8b0, 0, {0xa8,0x01,0x9c,0x00,0x87,0x81,0x19,0xe4,0x0b,0xfa,0x13,0x5e,0x80,0x87,0xb2,0x2d }},
+ {16, 0xe8c0, 0, {0xec,0x0d,0x79,0x01,0x9e,0x00,0xd5,0x90,0x2d,0xf8,0x0b,0x78,0x03,0x7e,0x08,0xab }},
+ {16, 0xe8d0, 0, {0x91,0x29,0x85,0x0b,0x51,0x02,0xdc,0x48,0xb6,0x40,0x21,0x40,0x0b,0x50,0x02,0x2a }},
+ {16, 0xe8e0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8c,0x14,0xb5,0x20,0x6d,0xc8 }},
+ {16, 0xe8f0, 0, {0x0b,0x72,0x02,0x5c,0x80,0x87,0x20,0x69,0xc0,0x88,0x53,0x02,0xcc,0x81,0x97,0x50 }},
+ {16, 0xe900, 0, {0x2d,0xc8,0x0b,0xf7,0x0a,0xdc,0xc0,0x84,0x01,0x21,0x44,0x1b,0x70,0x22,0xdc,0x00 }},
+ {16, 0xe910, 0, {0xb5,0x00,0x21,0xc4,0x0b,0x50,0x86,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe920, 0, {0x20,0x14,0xcf,0x30,0x91,0x00,0x2c,0xc0,0x0b,0x34,0x02,0x4c,0x00,0x83,0x00,0x2c }},
+ {16, 0xe930, 0, {0xf2,0x0b,0x10,0x22,0x0c,0x00,0x91,0x00,0x2c,0xc8,0x0b,0x18,0x0a,0xcd,0x01,0xa3 }},
+ {16, 0xe940, 0, {0x00,0x28,0x60,0x0b,0x21,0x02,0xce,0x20,0xb8,0x40,0xa0,0x54,0x0b,0x18,0x02,0x08 }},
+ {16, 0xe950, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x11,0xbd,0x00,0xf9,0x00,0x2f,0xc0 }},
+ {16, 0xe960, 0, {0x0f,0xf4,0x02,0x7c,0x12,0xcf,0x03,0x3f,0xc2,0x0e,0xb0,0x03,0xfc,0x04,0x9b,0x02 }},
+ {16, 0xe970, 0, {0x2e,0xf2,0x0f,0xa4,0x0b,0xdc,0x00,0xce,0x00,0xb0,0xc8,0x8f,0xa4,0x03,0xef,0x00 }},
+ {16, 0xe980, 0, {0xf8,0x80,0x32,0xf5,0x1f,0xdd,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe990, 0, {0x80,0x00,0xec,0x40,0xe9,0x00,0x3a,0xc0,0x0f,0xb1,0x03,0xcc,0x00,0xf3,0x00,0x3e }},
+ {16, 0xe9a0, 0, {0xc0,0x0d,0xb4,0x09,0xec,0x18,0xf9,0x10,0x3e,0x10,0x4f,0xb1,0x0a,0x6c,0x80,0xf9 }},
+ {16, 0xe9b0, 0, {0x89,0x36,0x82,0x0b,0xa6,0x03,0xec,0x50,0xf9,0x50,0x3e,0xc0,0x1f,0x90,0x03,0x60 }},
+ {16, 0xe9c0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xfd,0xa0,0x3d,0xc0 }},
+ {16, 0xe9d0, 0, {0x0c,0x70,0x83,0x2c,0x00,0xef,0x02,0x35,0xc0,0x0d,0xe2,0x03,0xfc,0x04,0xff,0x02 }},
+ {16, 0xe9e0, 0, {0x2d,0xe0,0x8e,0xf0,0x03,0x3c,0x10,0xdc,0x00,0x3f,0x80,0x0c,0xd8,0x03,0xfc,0x00 }},
+ {16, 0xe9f0, 0, {0xde,0x18,0x33,0xf0,0x4f,0xd0,0x03,0xc0,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea00, 0, {0x81,0x00,0x6c,0x00,0xb9,0x00,0x2e,0xc0,0x4c,0xb0,0x03,0x6c,0x00,0x8b,0x02,0x36 }},
+ {16, 0xea10, 0, {0xc0,0x0d,0xac,0x12,0xec,0x00,0x79,0x00,0x2e,0x30,0x0d,0x3d,0x42,0xac,0x00,0x89 }},
+ {16, 0xea20, 0, {0x88,0x1a,0x10,0x0d,0x86,0x02,0xee,0x04,0xbb,0x40,0x22,0xe0,0x0b,0x90,0x02,0xe0 }},
+ {16, 0xea30, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x01,0xb9,0x00,0x2e,0xc0 }},
+ {16, 0xea40, 0, {0x08,0xb0,0x42,0xac,0x00,0x0b,0x05,0x26,0xc0,0x09,0x94,0x20,0xec,0x00,0xb9,0x80 }},
+ {16, 0xea50, 0, {0x6e,0xc4,0x88,0xb0,0x82,0x2c,0x00,0x9b,0x82,0x2e,0x42,0x08,0x81,0x02,0xe4,0x80 }},
+ {16, 0xea60, 0, {0xb8,0x00,0x22,0xc1,0x0b,0x90,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea70, 0, {0x08,0x04,0x0c,0x10,0xb1,0x25,0x2c,0xca,0x08,0x34,0x46,0xcc,0x08,0x83,0x00,0x24 }},
+ {16, 0xea80, 0, {0xc2,0x0b,0x02,0x52,0xcc,0x81,0x83,0x00,0x2c,0x00,0x19,0xb2,0x42,0xac,0x80,0x81 }},
+ {16, 0xea90, 0, {0x08,0x28,0x80,0x09,0x00,0x02,0xc4,0x40,0xb1,0x00,0x20,0xc0,0x0b,0x10,0x02,0xc2 }},
+ {16, 0xeaa0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x6c,0x00,0xb9,0x00,0x3f,0xd0 }},
+ {16, 0xeab0, 0, {0x08,0xf6,0x07,0xbc,0xc2,0xaf,0x30,0x75,0xdc,0x0d,0x16,0x02,0xfc,0xe0,0xb9,0x50 }},
+ {16, 0xeac0, 0, {0x3e,0xcc,0x0c,0xb0,0x23,0x2c,0x10,0xd9,0x00,0x3e,0x00,0x0c,0x90,0x03,0xec,0x00 }},
+ {16, 0xead0, 0, {0xde,0x01,0x32,0xc0,0x0f,0x90,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeae0, 0, {0xa0,0x19,0xfc,0x00,0xfd,0x10,0x3f,0xca,0x2e,0xf6,0x03,0x6d,0x94,0x9f,0x30,0x3a }},
+ {16, 0xeaf0, 0, {0xc9,0x0c,0x83,0x93,0xfc,0x80,0xff,0x11,0x7e,0x19,0x0b,0xb1,0x03,0xfc,0x40,0xfd }},
+ {16, 0xeb00, 0, {0x08,0x3b,0x00,0x0f,0xc0,0x03,0xfc,0x80,0x77,0x00,0xbf,0xc0,0x0f,0x50,0x03,0xe8 }},
+ {16, 0xeb10, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,0x00,0xf4,0x94,0x37,0xc8 }},
+ {16, 0xeb20, 0, {0x0d,0x69,0x63,0x7c,0x10,0xff,0x62,0x37,0xc0,0x0d,0xb4,0x03,0x7c,0x60,0xd4,0x80 }},
+ {16, 0xeb30, 0, {0x3f,0x40,0x0f,0x48,0x23,0x32,0x00,0xce,0x00,0xbf,0x40,0x8f,0xd1,0x03,0x30,0xe0 }},
+ {16, 0xeb40, 0, {0xff,0x30,0x3b,0x60,0x0f,0xd8,0x03,0xb0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb50, 0, {0x80,0x10,0xed,0x20,0xb8,0x24,0x23,0xf4,0x49,0xa2,0x02,0x3f,0x40,0x8f,0x51,0x23 }},
+ {16, 0xeb60, 0, {0xda,0x08,0xf6,0x12,0x3d,0x80,0x9b,0x80,0x2e,0x49,0x4b,0x80,0x03,0x40,0x00,0xd9 }},
+ {16, 0xeb70, 0, {0x01,0x22,0x74,0x0b,0xd5,0x02,0x21,0x00,0xbf,0x42,0x2e,0x49,0x0b,0x9c,0x02,0xe0 }},
+ {16, 0xeb80, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcd,0x80,0xb8,0x20,0x28,0xc1 }},
+ {16, 0xeb90, 0, {0x1b,0xa0,0x02,0x4c,0x00,0x93,0x20,0x2c,0xd8,0x0b,0x34,0x02,0xcc,0x00,0x90,0x01 }},
+ {16, 0xeba0, 0, {0x2c,0xc6,0x1a,0xa0,0x02,0x68,0x08,0x83,0x00,0xa4,0x40,0x0b,0x10,0x02,0x00,0x00 }},
+ {16, 0xebb0, 0, {0xb3,0x10,0x28,0x42,0x0b,0x14,0x02,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xebc0, 0, {0xc0,0x15,0xac,0x00,0xb8,0x60,0x2a,0xc0,0x1b,0xa0,0x8e,0xac,0x01,0x9b,0x05,0x26 }},
+ {16, 0xebd0, 0, {0xc0,0x03,0xb0,0x42,0x6c,0x00,0x9b,0x80,0x2e,0xc0,0x03,0xa0,0x06,0x69,0x00,0x99 }},
+ {16, 0xebe0, 0, {0x80,0xaa,0xc0,0x0b,0x90,0x02,0x63,0x00,0x3b,0x00,0x2e,0x58,0x4b,0x90,0x02,0xf0 }},
+ {16, 0xebf0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0xec,0x04,0xf8,0x80,0xba,0xc0 }},
+ {16, 0xec00, 0, {0x0f,0x30,0x03,0x6c,0x10,0xdb,0x03,0x36,0xc0,0x8f,0xb0,0x03,0xec,0x08,0xd8,0x80 }},
+ {16, 0xec10, 0, {0x7e,0xe0,0x06,0x88,0x03,0x41,0x08,0xcb,0xa0,0x3e,0x64,0x0f,0x90,0x0b,0x2a,0x00 }},
+ {16, 0xec20, 0, {0x7b,0x00,0x3a,0x01,0x0f,0x90,0x03,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec30, 0, {0xe0,0x01,0xbc,0x00,0xfc,0x84,0x32,0xc0,0x0c,0xf9,0x03,0x5c,0x10,0xef,0x00,0x3b }},
+ {16, 0xec40, 0, {0xc0,0x0c,0x70,0x03,0x9c,0x00,0xec,0x01,0x3f,0xe4,0x4f,0xd1,0x03,0xf1,0x00,0xf3 }},
+ {16, 0xec50, 0, {0x05,0x33,0x60,0x0f,0xd0,0x03,0xbc,0x04,0xff,0x00,0x3f,0x21,0x0f,0xd0,0x03,0xf8 }},
+ {16, 0xec60, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xc8,0x40,0x3a,0xc6 }},
+ {16, 0xec70, 0, {0x0d,0xb4,0x03,0x6c,0x00,0xf3,0x00,0x34,0xc0,0x0e,0xb0,0x03,0x6c,0x00,0xe9,0x10 }},
+ {16, 0xec80, 0, {0x3a,0xc0,0x0f,0x84,0x03,0x2c,0x60,0xcb,0x00,0x32,0x60,0x0c,0x50,0x03,0x61,0x00 }},
+ {16, 0xec90, 0, {0xcb,0x00,0x3e,0x90,0x0e,0x90,0xa3,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeca0, 0, {0xc8,0x05,0x3c,0x02,0x88,0x01,0x01,0xf0,0x20,0xb0,0x01,0x3e,0x00,0x3f,0x00,0x33 }},
+ {16, 0xecb0, 0, {0xc0,0x0b,0xf0,0x32,0x3c,0x08,0x89,0x80,0x22,0xc0,0x01,0x15,0x12,0xac,0x00,0x8b }},
+ {16, 0xecc0, 0, {0x00,0x22,0xc0,0x48,0xdb,0x02,0x2f,0x40,0x8f,0x00,0x2e,0x01,0x08,0xd4,0x80,0x32 }},
+ {16, 0xecd0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0x08,0x00,0x08,0xf0 }},
+ {16, 0xece0, 0, {0x08,0x00,0x12,0x4c,0x00,0x33,0x01,0x24,0xc0,0x4a,0x30,0x02,0x4c,0x00,0xa0,0x20 }},
+ {16, 0xecf0, 0, {0x28,0xc0,0x0b,0x10,0x02,0x46,0x04,0x83,0x04,0x20,0xc0,0x29,0x18,0x02,0x04,0x40 }},
+ {16, 0xed00, 0, {0xb3,0x00,0x2c,0x40,0x0a,0x1c,0x42,0xb1,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed10, 0, {0x20,0x01,0x1e,0x01,0x8d,0x80,0x21,0xe0,0x18,0xc8,0x02,0x1e,0x00,0xb3,0xa0,0x21 }},
+ {16, 0xed20, 0, {0xe0,0x1b,0x38,0x02,0x0e,0x01,0xa7,0x80,0x21,0xe0,0x09,0xd8,0x40,0xd6,0x40,0x87 }},
+ {16, 0xed30, 0, {0x80,0x01,0xe0,0x09,0x59,0x02,0x16,0x00,0x97,0x84,0x2d,0x60,0x08,0x58,0x40,0x00 }},
+ {16, 0xed40, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x2c,0x40,0xc0,0x00,0x38,0xc4 }},
+ {16, 0xed50, 0, {0x0c,0x30,0x27,0x4c,0x20,0xf3,0x01,0x34,0xc1,0x0e,0x3a,0x03,0x4c,0xc4,0xe0,0x00 }},
+ {16, 0xed60, 0, {0x18,0xc8,0x0f,0x34,0x03,0x44,0x40,0xc3,0x00,0x30,0xc0,0x0d,0x90,0x03,0x2e,0x00 }},
+ {16, 0xed70, 0, {0xf3,0x00,0x3e,0x40,0x0e,0x10,0x01,0x9a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed80, 0, {0x40,0x1d,0xbc,0x00,0xf9,0x00,0x0e,0xd4,0x0e,0xb0,0x03,0xec,0x20,0xfb,0x20,0x3f }},
+ {16, 0xed90, 0, {0xc4,0x0f,0xf1,0x03,0xec,0x60,0xdb,0x10,0x3f,0xc0,0x4f,0xf0,0x03,0xa4,0x46,0xfb }},
+ {16, 0xeda0, 0, {0x00,0xbd,0xc0,0x0e,0xd0,0x0b,0xb4,0x00,0xef,0x48,0x3f,0x40,0x0f,0x50,0x03,0xd0 }},
+ {16, 0xedb0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xf8,0x00,0x32,0xd4 }},
+ {16, 0xedc0, 0, {0x0f,0x80,0x03,0xad,0x00,0xeb,0x08,0x22,0xd2,0x0c,0xb6,0x03,0x6c,0x00,0xf2,0x80 }},
+ {16, 0xedd0, 0, {0x36,0xc0,0x0e,0xa0,0x03,0x28,0x10,0xcb,0x00,0xb2,0xc0,0x0f,0xd6,0x03,0x28,0x10 }},
+ {16, 0xede0, 0, {0xfb,0x20,0x3e,0x40,0x4f,0x99,0x13,0x2b,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xedf0, 0, {0x48,0x11,0x9d,0x10,0xb4,0x01,0x21,0xc1,0x8b,0xc0,0x02,0x1c,0xa0,0xbf,0x04,0x27 }},
+ {16, 0xee00, 0, {0xc8,0x08,0x75,0x02,0x1c,0xc0,0xb6,0x00,0x21,0xc0,0x08,0xf0,0x42,0x18,0x10,0x8f }},
+ {16, 0xee10, 0, {0x00,0x21,0xc0,0x0b,0x54,0xa2,0x1c,0x00,0xb7,0x04,0x2d,0x41,0x0b,0x52,0x02,0x12 }},
+ {16, 0xee20, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x80,0xb6,0x88,0xa5,0xe0 }},
+ {16, 0xee30, 0, {0x0b,0x78,0x12,0x9e,0x81,0xa7,0x90,0x25,0xe4,0x88,0x78,0x02,0x1e,0x80,0xbf,0x80 }},
+ {16, 0xee40, 0, {0x24,0x60,0x0b,0x68,0x02,0x1e,0x00,0x87,0x84,0x61,0xe0,0x0a,0x1a,0x0a,0x1a,0x00 }},
+ {16, 0xee50, 0, {0xb7,0xa0,0x2d,0xe0,0x0b,0xda,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee60, 0, {0x48,0x14,0xcc,0x00,0xba,0xc0,0xa4,0xc0,0x0b,0x34,0x02,0x0c,0x00,0xb3,0x00,0x24 }},
+ {16, 0xee70, 0, {0xc0,0x08,0xb0,0x0e,0x2c,0x00,0xb3,0x98,0x20,0x60,0x09,0x33,0x02,0x2c,0x00,0xa3 }},
+ {16, 0xee80, 0, {0xc8,0x20,0xc0,0x0b,0x10,0x02,0x0c,0x00,0xb3,0x00,0x2c,0xf0,0x0b,0x10,0x02,0x12 }},
+ {16, 0xee90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfe,0x80,0x36,0x81 }},
+ {16, 0xeea0, 0, {0x0b,0xe0,0x03,0xa8,0x00,0xea,0x00,0xb2,0x80,0x08,0xa0,0x03,0x68,0x00,0xfe,0x00 }},
+ {16, 0xeeb0, 0, {0x36,0xa0,0x1f,0xe8,0x13,0x3b,0x82,0xce,0xe0,0x22,0x80,0x8e,0xa0,0x03,0x38,0x00 }},
+ {16, 0xeec0, 0, {0xba,0x00,0x3f,0xa2,0x0f,0xa0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeed0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x20,0x3a,0x10,0x07,0x80,0x03,0xc1,0x00,0xf8,0x00,0x38 }},
+ {16, 0xeee0, 0, {0x00,0x2f,0x80,0x03,0xa0,0x01,0xf8,0x42,0x3e,0x05,0x0e,0x80,0x0b,0xe0,0x80,0xd8 }},
+ {16, 0xeef0, 0, {0x00,0x3e,0x00,0x0f,0x84,0x03,0xe1,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x84,0x0b,0xd2 }},
+ {16, 0xef00, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xc9,0x00,0x3a,0x50 }},
+ {16, 0xef10, 0, {0x8f,0x90,0x83,0xa4,0x02,0xd1,0x00,0xb2,0x40,0x4c,0x90,0x23,0x24,0x08,0xc9,0x01 }},
+ {16, 0xef20, 0, {0x3e,0x40,0x0c,0x90,0x03,0x24,0x00,0xc1,0x00,0x32,0x40,0x0f,0x14,0x0a,0x25,0x20 }},
+ {16, 0xef30, 0, {0xe9,0x00,0x3e,0x42,0x0f,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef40, 0, {0x80,0x04,0x64,0x0a,0x89,0x00,0x22,0x70,0x0b,0x90,0x12,0x25,0x80,0xc9,0x00,0x22 }},
+ {16, 0xef50, 0, {0x40,0x0a,0x90,0x03,0x64,0x00,0x89,0x20,0x2c,0x40,0x0a,0x90,0x0a,0x24,0x00,0x89 }},
+ {16, 0xef60, 0, {0xc1,0x32,0x40,0x0b,0x98,0x02,0x06,0x00,0x89,0x90,0x2e,0x40,0x0b,0x94,0x12,0xe0 }},
+ {16, 0xef70, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x04,0x00,0x89,0x00,0x6a,0x42 }},
+ {16, 0xef80, 0, {0x0a,0x10,0x02,0xa4,0x00,0x89,0x00,0xa2,0x40,0x0a,0x90,0x02,0x24,0x00,0x09,0x00 }},
+ {16, 0xef90, 0, {0x2e,0x40,0x58,0x10,0x02,0x24,0x00,0x89,0x80,0xaa,0x60,0x0b,0x90,0x02,0xa4,0x04 }},
+ {16, 0xefa0, 0, {0xa9,0x00,0x2e,0x40,0x0b,0x94,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xefb0, 0, {0x08,0x04,0x04,0x80,0x81,0x00,0x60,0x48,0x0b,0x10,0x02,0x04,0x81,0x81,0x20,0x60 }},
+ {16, 0xefc0, 0, {0x48,0x0a,0x12,0x02,0x44,0x88,0x81,0x00,0x0e,0x59,0x0a,0x14,0x02,0x05,0x00,0x81 }},
+ {16, 0xefd0, 0, {0xc0,0x28,0x50,0x49,0x30,0x02,0x8c,0x84,0x01,0x60,0x2c,0x50,0x0b,0x10,0x02,0xc2 }},
+ {16, 0xefe0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xc0,0x54,0x2a,0x00 }},
+ {16, 0xeff0, 0, {0x0e,0x85,0x03,0xa0,0x00,0xc8,0x50,0x32,0x15,0x1e,0x05,0x22,0x21,0x42,0xc8,0x00 }},
+ {16, 0xf000, 0, {0x3e,0x00,0x0c,0x80,0x03,0x00,0x04,0xc8,0x00,0x3a,0x00,0x4f,0x85,0x03,0xa1,0x40 }},
+ {16, 0xf010, 0, {0x68,0x00,0x3e,0x00,0x0f,0x80,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf020, 0, {0x98,0x1d,0xe4,0x40,0xfd,0x03,0x3e,0x44,0x0f,0xd0,0x03,0xe4,0x48,0xe9,0x10,0x3e }},
+ {16, 0xf030, 0, {0x45,0x0f,0x91,0x13,0xe4,0x40,0xfd,0x00,0x3f,0x44,0x0f,0xd0,0x03,0xf4,0x02,0xfd }},
+ {16, 0xf040, 0, {0x40,0x33,0x50,0x0f,0xd4,0x23,0x74,0x40,0xf9,0x10,0x3f,0x40,0x0f,0x54,0x03,0xe6 }},
+ {16, 0xf050, 0, {0x02,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe4,0x00,0xf9,0x01,0x33,0x6a }},
+ {16, 0xf060, 0, {0x09,0x90,0x03,0xb6,0x34,0xf9,0xc8,0x32,0x64,0x0c,0x9a,0x03,0xe6,0xa0,0xdd,0x00 }},
+ {16, 0xf070, 0, {0x3c,0x70,0x0f,0x90,0x03,0xa5,0x00,0x89,0x80,0x33,0x32,0x0f,0xd8,0x13,0x3c,0x00 }},
+ {16, 0xf080, 0, {0xfd,0x00,0x70,0x50,0x0f,0xd0,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf090, 0, {0x38,0x10,0xe2,0x80,0xb8,0xa8,0x22,0x10,0x08,0x88,0x02,0x21,0x00,0xb8,0xc0,0x20 }},
+ {16, 0xf0a0, 0, {0x30,0x0d,0x8e,0x87,0x83,0x88,0x88,0x00,0x2e,0x34,0x0b,0x8a,0x82,0x22,0x80,0xdc }},
+ {16, 0xf0b0, 0, {0xe0,0x22,0x38,0x0b,0x80,0x02,0x20,0x00,0xf8,0xa8,0x2a,0x28,0x0b,0x80,0x02,0x0e }},
+ {16, 0xf0c0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x20,0xb1,0x00,0x20,0x40 }},
+ {16, 0xf0d0, 0, {0x0a,0x92,0x92,0x84,0x11,0xb1,0x24,0x68,0x58,0x09,0x11,0x02,0xc4,0x20,0x91,0x01 }},
+ {16, 0xf0e0, 0, {0x2c,0x48,0x1b,0x50,0x02,0x74,0x84,0x95,0x48,0xac,0x48,0x0b,0x94,0x02,0x04,0x04 }},
+ {16, 0xf0f0, 0, {0xb1,0x02,0x24,0x48,0x0b,0x10,0x02,0x02,0x05,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf100, 0, {0x18,0x11,0xa4,0x00,0xb1,0x20,0x22,0x40,0x0a,0x90,0x06,0x2c,0x01,0xb9,0x00,0x2a }},
+ {16, 0xf110, 0, {0x40,0x09,0x90,0x02,0xa4,0x00,0x9b,0x08,0x2e,0x48,0x0b,0x12,0x1a,0x74,0x00,0x95 }},
+ {16, 0xf120, 0, {0x45,0x2e,0x60,0x03,0x90,0x02,0x24,0x00,0xb9,0x00,0x2e,0x40,0x0b,0x90,0x02,0x06 }},
+ {16, 0xf130, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xf9,0x80,0x30,0x40 }},
+ {16, 0xf140, 0, {0x0e,0x16,0x03,0xa4,0x00,0xb9,0x04,0x32,0x40,0x0d,0x90,0x02,0xe4,0x00,0xd9,0x40 }},
+ {16, 0xf150, 0, {0x2e,0x40,0x1f,0x98,0x03,0xe5,0x80,0xd9,0x00,0xae,0x60,0x07,0x10,0x0b,0x26,0x01 }},
+ {16, 0xf160, 0, {0xb9,0x00,0xa6,0x40,0x0f,0x90,0x0b,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf170, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0xbe,0x40,0xac,0x92,0x03,0xe4,0x00,0xf9,0x00,0xb4 }},
+ {16, 0xf180, 0, {0x40,0x0f,0x90,0x03,0xe4,0x00,0xe9,0x00,0x3e,0x60,0x0f,0x90,0x03,0xa4,0x80,0xf9 }},
+ {16, 0xf190, 0, {0x00,0x32,0x00,0x0f,0x90,0x83,0xe6,0x85,0xe1,0x00,0x32,0x44,0x0f,0x10,0x03,0xca }},
+ {16, 0xf1a0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x00,0x32,0x00 }},
+ {16, 0xf1b0, 0, {0x0f,0x80,0x13,0xe0,0x94,0xe0,0x00,0x32,0x00,0x0c,0x80,0x03,0x60,0x00,0xc8,0x00 }},
+ {16, 0xf1c0, 0, {0x3e,0x00,0x0d,0x80,0x43,0x20,0x08,0xf8,0x00,0x32,0x00,0x0f,0x80,0x03,0xe0,0x40 }},
+ {16, 0xf1d0, 0, {0xf8,0x00,0x32,0x00,0x4c,0x80,0x23,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf1e0, 0, {0x28,0x05,0x28,0x00,0xba,0x00,0x23,0x80,0x0b,0xa0,0x02,0xfb,0x04,0x6a,0x00,0x22 }},
+ {16, 0xf1f0, 0, {0x80,0x0a,0xa0,0x03,0x68,0x0a,0x8e,0x88,0x3a,0x80,0x08,0xa0,0x02,0x08,0x00,0xba }},
+ {16, 0xf200, 0, {0x00,0xb7,0x22,0x03,0xe4,0x02,0xfa,0x00,0x8a,0x00,0x22,0x80,0x08,0xe8,0x02,0xca }},
+ {16, 0xf210, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb3,0x00,0x60,0x41 }},
+ {16, 0xf220, 0, {0x03,0x30,0x02,0xcc,0x41,0xa3,0x00,0x04,0xc0,0x0b,0x30,0x02,0x2c,0x00,0xa3,0x80 }},
+ {16, 0xf230, 0, {0x2c,0xc0,0x09,0x38,0x02,0x0c,0x00,0xb3,0x00,0xa0,0xc0,0x0b,0x34,0x02,0xcc,0x80 }},
+ {16, 0xf240, 0, {0xa1,0x00,0x20,0xc0,0x08,0x38,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf250, 0, {0xa0,0x01,0x1c,0x40,0xb7,0x00,0x61,0x00,0x0b,0x71,0x02,0xdc,0x00,0xa3,0x00,0x25 }},
+ {16, 0xf260, 0, {0xc8,0x19,0x38,0x02,0x5c,0x80,0xa7,0x00,0x0f,0xe8,0x09,0x64,0x22,0x10,0x00,0xb3 }},
+ {16, 0xf270, 0, {0x00,0x25,0xc8,0x0b,0x60,0x02,0xf2,0x00,0x85,0x01,0x23,0xe8,0x08,0x70,0x82,0xe8 }},
+ {16, 0xf280, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x20,0xff,0x80,0xa1,0xa0 }},
+ {16, 0xf290, 0, {0x0f,0x7a,0x42,0xda,0x00,0xe7,0xe8,0x35,0xf0,0x2f,0x7b,0x62,0x1e,0x82,0xe6,0x80 }},
+ {16, 0xf2a0, 0, {0x1d,0xe0,0x0d,0xf8,0x0b,0x1e,0x00,0xf7,0x80,0x31,0xf0,0x0f,0x78,0x03,0xde,0x0c }},
+ {16, 0xf2b0, 0, {0xef,0x80,0x31,0xf8,0x2c,0x78,0x03,0xea,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf2c0, 0, {0x08,0x1d,0xad,0x84,0xfb,0x68,0x3e,0x00,0x0f,0xb0,0x03,0xe8,0x00,0xfb,0x00,0xfa }},
+ {16, 0xf2d0, 0, {0xd8,0x0e,0xb5,0x03,0xed,0x00,0xdb,0x00,0x3a,0xc0,0x8e,0xa0,0x03,0xe0,0x00,0xfb }},
+ {16, 0xf2e0, 0, {0x40,0x3e,0xc0,0x0b,0xb0,0x43,0xc4,0x04,0xef,0x02,0xbf,0xc0,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0xf2f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x42,0xc7,0x38,0x33,0x64 }},
+ {16, 0xf300, 0, {0x0e,0x7c,0x03,0x5e,0x00,0xdf,0xa0,0x37,0xf0,0x0d,0xf8,0x03,0xff,0x20,0xcf,0x81 }},
+ {16, 0xf310, 0, {0x33,0xe2,0x0c,0xd8,0x03,0xbe,0x00,0x7f,0xc0,0x33,0xe0,0x0c,0xf9,0x03,0x7e,0x00 }},
+ {16, 0xf320, 0, {0xfd,0x80,0x3f,0xe0,0x0f,0xf8,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf330, 0, {0xa8,0x11,0x9c,0x00,0x87,0xa0,0x21,0x14,0x08,0x71,0x02,0x14,0x10,0xd7,0x20,0x35 }},
+ {16, 0xf340, 0, {0xc0,0x0c,0x70,0x03,0xbc,0x00,0x85,0x08,0x2b,0xc0,0x4d,0x46,0x02,0xd1,0x00,0xb7 }},
+ {16, 0xf350, 0, {0x00,0x21,0xc0,0x08,0x60,0x02,0x08,0x80,0xf5,0x20,0x3d,0xca,0x0f,0x54,0x03,0xea }},
+ {16, 0xf360, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x11,0x8f,0x01,0x20,0x84 }},
+ {16, 0xf370, 0, {0x1a,0xf0,0x02,0x18,0x00,0xa7,0x34,0x65,0xc0,0x09,0x71,0x02,0xdc,0x00,0x8e,0x00 }},
+ {16, 0xf380, 0, {0x29,0xc0,0x08,0x50,0x06,0x9c,0x00,0xbf,0x88,0x2d,0xc4,0x0a,0x60,0x26,0x58,0x24 }},
+ {16, 0xf390, 0, {0x97,0x00,0x6d,0xc0,0x9b,0x70,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf3a0, 0, {0x20,0x14,0xcc,0x00,0x8b,0x40,0x20,0x00,0x18,0x30,0x02,0x00,0x00,0xbb,0x02,0x24 }},
+ {16, 0xf3b0, 0, {0xc0,0x08,0x30,0x20,0xcc,0x00,0x81,0xc0,0x28,0xc0,0x0b,0x04,0x82,0xe0,0x10,0xbb }},
+ {16, 0xf3c0, 0, {0xa0,0x2c,0xe0,0x0a,0x20,0x06,0x00,0x00,0xb3,0x00,0x28,0xc0,0x0a,0x10,0x02,0x88 }},
+ {16, 0xf3d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xcf,0x10,0x32,0x00 }},
+ {16, 0xf3e0, 0, {0x0e,0xf0,0x0b,0x24,0x00,0xef,0x00,0x37,0xc0,0x0d,0xf0,0x03,0xfc,0x06,0xc1,0x50 }},
+ {16, 0xf3f0, 0, {0x3b,0xc0,0x0c,0xb4,0x03,0xac,0x00,0xf8,0xc0,0xbe,0xc8,0x2e,0xb0,0x03,0x6e,0x01 }},
+ {16, 0xf400, 0, {0xfb,0x00,0x2d,0xc0,0x4b,0x90,0x02,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf410, 0, {0x80,0x00,0xec,0x04,0xfb,0x00,0x3e,0x00,0x0f,0xb0,0x03,0xad,0x00,0x9b,0x00,0x3e }},
+ {16, 0xf420, 0, {0xc0,0x0f,0x30,0x03,0xac,0x00,0xf8,0x00,0x2e,0xc0,0x05,0xb4,0x03,0xed,0x00,0xf8 }},
+ {16, 0xf430, 0, {0x40,0x32,0xc0,0x09,0x00,0x03,0xe0,0x91,0xe3,0x00,0x3e,0xc0,0x0f,0x90,0x11,0xe0 }},
+ {16, 0xf440, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xec,0x00,0xef,0x00,0x33,0x20 }},
+ {16, 0xf450, 0, {0x4f,0xf0,0x03,0xb4,0x00,0xef,0x03,0x3a,0xc0,0x0f,0xf0,0x03,0x3c,0x00,0xdc,0x00 }},
+ {16, 0xf460, 0, {0x31,0xc0,0x8d,0xf8,0x03,0xfe,0x04,0xcf,0x00,0x32,0xc8,0x0c,0xf0,0x0b,0x1c,0x00 }},
+ {16, 0xf470, 0, {0xcf,0x93,0x33,0xc0,0x8c,0x40,0x02,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf480, 0, {0x81,0x04,0x6c,0x00,0xbb,0x00,0xa2,0x04,0x0b,0x30,0x02,0x0e,0x00,0xab,0x00,0x2a }},
+ {16, 0xf490, 0, {0xc0,0x09,0xb0,0x03,0x6c,0x08,0xa8,0xc0,0x36,0xc0,0x08,0xbc,0x02,0xef,0x02,0xab }},
+ {16, 0xf4a0, 0, {0xd0,0x20,0xe0,0x08,0xb8,0x22,0x26,0x10,0x8b,0x00,0x22,0xc0,0x20,0x9c,0x02,0x20 }},
+ {16, 0xf4b0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xbb,0x00,0x26,0x00 }},
+ {16, 0xf4c0, 0, {0x0a,0xb0,0x02,0xa2,0x08,0xab,0x00,0x6a,0xc0,0x0b,0xb0,0x0a,0x0c,0x00,0x8b,0x80 }},
+ {16, 0xf4d0, 0, {0x22,0xc0,0x09,0xb1,0x02,0xec,0x40,0x88,0x08,0x22,0xc0,0x08,0xb8,0x02,0x26,0x00 }},
+ {16, 0xf4e0, 0, {0x8b,0x00,0x22,0xc0,0x08,0x98,0x02,0xa0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf4f0, 0, {0x08,0x04,0x0c,0x00,0xb3,0x00,0x24,0x00,0x0b,0xb0,0x02,0x00,0x01,0x83,0x00,0x20 }},
+ {16, 0xf500, 0, {0xc0,0x09,0x30,0x02,0x4c,0x00,0x00,0x04,0x24,0xc0,0x08,0x30,0x06,0x4c,0x00,0x80 }},
+ {16, 0xf510, 0, {0x00,0x2c,0xc0,0x08,0x00,0x02,0x00,0x41,0x83,0x00,0xa2,0xc0,0x08,0x10,0x0a,0x82 }},
+ {16, 0xf520, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x00,0xef,0x08,0x26,0x00 }},
+ {16, 0xf530, 0, {0x0e,0xf0,0x02,0xa0,0x00,0xe7,0x00,0x3b,0xc0,0x0f,0xf5,0x43,0x3c,0x02,0xda,0x00 }},
+ {16, 0xf540, 0, {0x32,0xc0,0x0d,0xb0,0x03,0xec,0x00,0xcb,0x00,0xb2,0xc0,0x0c,0xa0,0x03,0x28,0x10 }},
+ {16, 0xf550, 0, {0xcb,0x00,0x32,0xc0,0x0c,0x80,0x03,0x80,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf560, 0, {0xa0,0x0d,0xfc,0x00,0xfb,0x00,0x3b,0x00,0x0f,0xf0,0x03,0xf0,0x00,0xff,0x02,0x3f }},
+ {16, 0xf570, 0, {0xc0,0x0d,0xf2,0x03,0xbc,0x00,0xf4,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xf7 }},
+ {16, 0xf580, 0, {0x00,0x33,0xc0,0x0f,0x60,0x03,0xf0,0x88,0xff,0x00,0x3f,0xc0,0x4f,0xd0,0x03,0x68 }},
+ {16, 0xf590, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x40,0xfc,0x31,0x3b,0x08 }},
+ {16, 0xf5a0, 0, {0x4f,0xf9,0x43,0xef,0x00,0xdf,0x30,0x32,0x21,0x0f,0x94,0x07,0x7d,0x80,0xef,0x38 }},
+ {16, 0xf5b0, 0, {0x32,0x09,0x1c,0x38,0x03,0xf2,0x21,0xfd,0x00,0x33,0xc4,0x0c,0xf0,0x02,0xfc,0x00 }},
+ {16, 0xf5c0, 0, {0xdf,0x00,0x33,0xc0,0x0f,0xf0,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf5d0, 0, {0x80,0x10,0xec,0x88,0x8b,0x60,0x22,0xe5,0x0e,0xb2,0x22,0xec,0x80,0xaf,0x11,0x2a }},
+ {16, 0xf5e0, 0, {0x20,0x0b,0xb1,0x13,0xac,0x48,0x8b,0x45,0x34,0xcc,0x48,0xb0,0x02,0x6b,0x00,0xba }},
+ {16, 0xf5f0, 0, {0x82,0x36,0x00,0x08,0x88,0x22,0xc0,0x04,0x88,0x00,0xa2,0x08,0x8b,0x88,0x62,0x20 }},
+ {16, 0xf600, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0xa1,0x30,0x28,0x00 }},
+ {16, 0xf610, 0, {0x0b,0x32,0x02,0xcc,0x00,0xa3,0x22,0x2c,0x00,0x8b,0x12,0x06,0xc8,0x80,0xa3,0x00 }},
+ {16, 0xf620, 0, {0x20,0x02,0xca,0x30,0x06,0xc4,0x01,0xb1,0x00,0x68,0x80,0x09,0x20,0x02,0x88,0x00 }},
+ {16, 0xf630, 0, {0x83,0x00,0x20,0xc2,0x0b,0x00,0x0a,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf640, 0, {0xc0,0x15,0xac,0x00,0x8b,0x61,0x62,0xc0,0x0b,0xb2,0x02,0xe8,0x00,0xab,0x02,0x2a }},
+ {16, 0xf650, 0, {0x61,0x1b,0x90,0x02,0xa8,0x00,0xab,0x00,0x20,0xc0,0x0a,0xb0,0x02,0x6c,0x04,0xba }},
+ {16, 0xf660, 0, {0x00,0x2e,0x40,0x89,0x90,0x02,0xe6,0x08,0x98,0x00,0x22,0x00,0x0b,0xb0,0x02,0xb0 }},
+ {16, 0xf670, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xee,0x00,0xf8,0x01,0x3a,0x04 }},
+ {16, 0xf680, 0, {0x0f,0xac,0x03,0xec,0x90,0xfb,0x02,0x3e,0xe0,0x0b,0x90,0x42,0x67,0x80,0xa8,0xc4 }},
+ {16, 0xf690, 0, {0x22,0x48,0x22,0x86,0x03,0xe1,0x40,0xb8,0x02,0x2a,0x40,0x29,0x90,0x03,0xec,0x02 }},
+ {16, 0xf6a0, 0, {0xc9,0x48,0x32,0x40,0x0f,0xb0,0x13,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf6b0, 0, {0xe0,0x01,0xac,0x40,0xfb,0x00,0x1f,0xa2,0x0e,0xf8,0x82,0xfc,0x08,0xff,0x00,0x3f }},
+ {16, 0xf6c0, 0, {0xc0,0x0f,0xfa,0x43,0x96,0x44,0xd4,0x91,0x3f,0x40,0x0d,0xc0,0x03,0xfa,0x00,0xff }},
+ {16, 0xf6d0, 0, {0x08,0x25,0x80,0x0e,0xe0,0x03,0xd0,0x00,0xea,0x00,0x3f,0x80,0x0f,0xc0,0x03,0x78 }},
+ {16, 0xf6e0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xe1,0x20,0x3a,0x50 }},
+ {16, 0xf6f0, 0, {0x0f,0x90,0x03,0x2c,0x00,0xeb,0x08,0x76,0x05,0x0e,0xb0,0x27,0xe0,0x10,0xea,0x40 }},
+ {16, 0xf700, 0, {0xb2,0xc0,0x0c,0xa4,0x43,0x25,0x00,0xf8,0x00,0x32,0x08,0x0f,0x80,0x43,0xe8,0x00 }},
+ {16, 0xf710, 0, {0xd1,0x08,0xee,0x40,0x0f,0x00,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf720, 0, {0xc8,0x05,0x2c,0x00,0x8b,0x00,0x22,0xd0,0x0b,0x90,0x82,0x2c,0x00,0x87,0x40,0x22 }},
+ {16, 0xf730, 0, {0x60,0x8b,0xb0,0x02,0xe0,0x00,0xd8,0x50,0x22,0xd0,0x0c,0xa0,0x03,0x6c,0x00,0xb3 }},
+ {16, 0xf740, 0, {0xc8,0x3e,0xd0,0x0b,0xb8,0x02,0x25,0x08,0x8a,0x20,0x2a,0x80,0x8b,0xb8,0x82,0xf2 }},
+ {16, 0xf750, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x64,0x00,0xa0,0xc0,0x24,0xc0 }},
+ {16, 0xf760, 0, {0x09,0x38,0x02,0x2c,0x00,0x83,0x03,0x20,0x00,0x10,0x30,0x22,0xcc,0x00,0x83,0x00 }},
+ {16, 0xf770, 0, {0x60,0x08,0x0a,0x30,0x82,0x4c,0x00,0xb1,0xc0,0x00,0xd1,0x0b,0x38,0x02,0x84,0x80 }},
+ {16, 0xf780, 0, {0x82,0x01,0x20,0x80,0x03,0x38,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf790, 0, {0x20,0x01,0x16,0x40,0x84,0x98,0x25,0xe0,0x0b,0x7a,0x02,0xfa,0x48,0xa3,0x20,0x61 }},
+ {16, 0xf7a0, 0, {0x24,0x0b,0x79,0x00,0xce,0xc0,0x93,0xa4,0x21,0xa6,0x0b,0x78,0x12,0xde,0x80,0xb6 }},
+ {16, 0xf7b0, 0, {0x80,0x2d,0x24,0x0b,0x4b,0x02,0x1a,0x40,0x85,0x81,0x21,0x60,0x0b,0x48,0x02,0xc8 }},
+ {16, 0xf7c0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xe2,0xa0,0xb4,0xfe }},
+ {16, 0xf7d0, 0, {0x4b,0xb8,0x0b,0x0e,0x00,0xa3,0xb0,0x24,0xa8,0x0e,0x1b,0x02,0xce,0xc1,0xc3,0xc0 }},
+ {16, 0xf7e0, 0, {0x30,0x68,0x2e,0x3a,0x47,0x4e,0x80,0xf1,0x80,0x30,0x80,0x0f,0x22,0x83,0x80,0x00 }},
+ {16, 0xf7f0, 0, {0xc2,0x10,0x38,0x80,0x4f,0x00,0x07,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf800, 0, {0x40,0x0d,0xbc,0x10,0xfe,0x04,0x3b,0xc1,0x07,0xf0,0x03,0x1c,0xc8,0xdf,0x2a,0x0b }},
+ {16, 0xf810, 0, {0xc4,0x8f,0xd1,0x43,0xf8,0x02,0x7f,0x00,0x3f,0xc0,0x0c,0xf1,0x0f,0x3c,0x00,0xf2 }},
+ {16, 0xf820, 0, {0x11,0x3f,0x41,0x1f,0x52,0x03,0xbc,0x0e,0xed,0x14,0x3f,0x40,0x0f,0xf8,0x03,0xd0 }},
+ {16, 0xf830, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x00,0xe9,0x00,0x32,0x80 }},
+ {16, 0xf840, 0, {0x0e,0xbe,0x4b,0x6f,0x00,0xcb,0x82,0x7a,0xc0,0x2c,0xb0,0x03,0x2c,0x00,0xc9,0x00 }},
+ {16, 0xf850, 0, {0x32,0x00,0x2c,0x10,0x03,0x2c,0x08,0xc0,0x00,0x26,0x40,0x6c,0x90,0x13,0x24,0x12 }},
+ {16, 0xf860, 0, {0xc8,0x01,0x3e,0x00,0x0f,0xb8,0x0b,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf870, 0, {0x48,0x11,0x94,0x00,0x8d,0x00,0x21,0x80,0x0b,0x70,0x82,0x3c,0x20,0x83,0x32,0x29 }},
+ {16, 0xf880, 0, {0xc0,0x08,0xf0,0x20,0x14,0x00,0x80,0x00,0x23,0x00,0x08,0x50,0x06,0x9c,0x04,0xd7 }},
+ {16, 0xf890, 0, {0x02,0x28,0x80,0x08,0x60,0x02,0x08,0x10,0x87,0x00,0x2d,0xc0,0x0b,0x40,0x02,0x12 }},
+ {16, 0xf8a0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xa7,0x80,0x21,0xe0 }},
+ {16, 0xf8b0, 0, {0x0b,0x5c,0x12,0x1e,0x04,0x87,0x82,0x0d,0xa0,0x09,0x78,0x16,0x02,0x00,0xb4,0x80 }},
+ {16, 0xf8c0, 0, {0x25,0xe0,0x0b,0x78,0x02,0x9e,0x00,0x84,0x80,0x21,0x22,0x08,0x08,0x02,0x12,0x01 }},
+ {16, 0xf8d0, 0, {0x84,0xc0,0x2d,0x20,0x0b,0x08,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf8e0, 0, {0x48,0x14,0xcc,0x00,0x83,0x42,0xa0,0xd8,0x0b,0x34,0x82,0x0c,0x00,0xa3,0x02,0x20 }},
+ {16, 0xf8f0, 0, {0xe0,0x08,0xb0,0x02,0x0c,0x88,0xb3,0x21,0x24,0xd8,0x0b,0x3e,0x02,0x8c,0x00,0x93 }},
+ {16, 0xf900, 0, {0x08,0x28,0xc0,0x08,0x38,0x02,0x2c,0x05,0x8b,0x01,0x2c,0xe0,0x0b,0x30,0x02,0x12 }},
+ {16, 0xf910, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xee,0x00,0x33,0x90 }},
+ {16, 0xf920, 0, {0x0f,0xa0,0x0b,0x68,0x00,0xca,0x01,0x7f,0xa8,0x0c,0xaa,0x03,0x3a,0x12,0xfe,0xe2 }},
+ {16, 0xf930, 0, {0x37,0xb0,0x0f,0xee,0x02,0x18,0x00,0xca,0x40,0x36,0xa0,0x08,0xa0,0x8b,0x28,0x00 }},
+ {16, 0xf940, 0, {0xca,0x81,0x2e,0xa0,0x0f,0xe0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf950, 0, {0x48,0x00,0xe0,0x00,0xf8,0x08,0x3e,0x00,0x0f,0x80,0x03,0xa2,0x02,0xd8,0x40,0x3e }},
+ {16, 0xf960, 0, {0x08,0x0f,0x80,0x13,0xe0,0x40,0x48,0x40,0xb8,0x04,0x08,0x84,0x03,0x61,0x00,0xfc }},
+ {16, 0xf970, 0, {0x00,0x3f,0x00,0x4f,0xc0,0x03,0xf1,0x00,0xfc,0x00,0x3f,0x04,0x0f,0xc0,0x03,0xd2 }},
+ {16, 0xf980, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc4,0x00,0xf9,0x00,0x30,0x50 }},
+ {16, 0xf990, 0, {0x4c,0xb9,0x03,0x6c,0x18,0xf9,0x00,0x36,0x40,0x0e,0x9c,0x23,0xa4,0x02,0x41,0x00 }},
+ {16, 0xf9a0, 0, {0xb2,0x44,0x0e,0x9a,0x03,0xa6,0x80,0xc9,0x00,0x3a,0x60,0x0a,0x90,0x03,0xa4,0x80 }},
+ {16, 0xf9b0, 0, {0xc9,0x00,0x34,0x40,0x0c,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf9c0, 0, {0x80,0x04,0x64,0x00,0x89,0x40,0x22,0x78,0x08,0x94,0x02,0xe4,0x10,0xb9,0x00,0x3c }},
+ {16, 0xf9d0, 0, {0x62,0x18,0x94,0x82,0xa4,0x00,0x89,0xc8,0x22,0x70,0x48,0x1e,0x01,0x67,0x80,0xd1 }},
+ {16, 0xf9e0, 0, {0x00,0xbc,0x42,0x08,0x10,0x02,0x25,0x20,0x89,0x02,0x22,0x40,0x08,0x90,0x02,0xe0 }},
+ {16, 0xf9f0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb1,0x28,0x22,0x40 }},
+ {16, 0xfa00, 0, {0x08,0xb0,0x82,0x64,0x04,0x39,0x41,0x2e,0x48,0x0a,0x90,0x02,0x04,0x18,0xa9,0x20 }},
+ {16, 0xfa10, 0, {0x22,0x42,0x4a,0x90,0x02,0x2c,0x04,0x89,0x04,0x2b,0x48,0x02,0xd0,0x02,0xb4,0x0a }},
+ {16, 0xfa20, 0, {0x8d,0x80,0x23,0xc0,0x48,0xd0,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa30, 0, {0x08,0x04,0x04,0x80,0x81,0x20,0xa0,0x48,0x28,0x10,0x02,0xc4,0x00,0xb1,0x24,0x2a }},
+ {16, 0xfa40, 0, {0x40,0x08,0x12,0x42,0x85,0x80,0xa1,0x20,0xa0,0x48,0x08,0x90,0x02,0x44,0x00,0x95 }},
+ {16, 0xfa50, 0, {0x2c,0x2d,0x5a,0x0a,0x72,0x82,0x14,0xa0,0x85,0xa8,0x21,0x4a,0x08,0x52,0x82,0xc2 }},
+ {16, 0xfa60, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x41,0x40,0xf8,0x50,0x32,0x00 }},
+ {16, 0xfa70, 0, {0x8c,0x05,0x03,0x61,0x40,0xf8,0x51,0x2e,0x00,0x0a,0x85,0x02,0x20,0x00,0xe8,0x50 }},
+ {16, 0xfa80, 0, {0x32,0x14,0x06,0x85,0x17,0xa0,0x00,0xc8,0x20,0x3a,0x08,0x0e,0x82,0x03,0xa0,0x80 }},
+ {16, 0xfa90, 0, {0xc8,0x20,0x32,0x08,0x2c,0xc2,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfaa0, 0, {0x98,0x19,0xf4,0x40,0xff,0x10,0x3f,0x44,0x0b,0xb0,0x03,0xe4,0x00,0xf9,0x10,0x3d }},
+ {16, 0xfab0, 0, {0x40,0x0f,0xd1,0x03,0xf4,0x58,0x9d,0x10,0x3f,0x44,0x4f,0xd0,0x03,0xd5,0x00,0xf9 }},
+ {16, 0xfac0, 0, {0x00,0x3e,0x40,0x8d,0x90,0x03,0xe4,0xb8,0xf9,0x28,0xba,0x6a,0x0f,0x90,0x03,0xe6 }},
+ {16, 0xfad0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xe7,0x00,0xfd,0x88,0x3e,0x60 }},
+ {16, 0xfae0, 0, {0x8f,0xd0,0x03,0x24,0x01,0xdd,0x80,0x73,0x40,0x0f,0xd8,0x03,0xa6,0x04,0xcd,0xa2 }},
+ {16, 0xfaf0, 0, {0x33,0x78,0x1c,0xd0,0x03,0x34,0x01,0xf5,0x88,0x3b,0x68,0x0c,0xda,0x47,0x37,0x80 }},
+ {16, 0xfb00, 0, {0xcd,0x88,0x32,0x62,0x0c,0xda,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb10, 0, {0x38,0x10,0xe3,0x80,0xb8,0x80,0x2e,0x14,0x0b,0x0a,0x82,0x22,0x80,0xb8,0xf8,0xa2 }},
+ {16, 0xfb20, 0, {0x00,0x0b,0x8f,0xa3,0x83,0xe0,0x88,0xeb,0x22,0xa9,0x08,0x88,0x12,0xa0,0x05,0xb8 }},
+ {16, 0xfb30, 0, {0x00,0x2a,0xaa,0x88,0x80,0x13,0x62,0x82,0x88,0x80,0x22,0x28,0x88,0xa4,0x02,0x0e }},
+ {16, 0xfb40, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb1,0x0a,0x2c,0x41 }},
+ {16, 0xfb50, 0, {0x0b,0x10,0x06,0x04,0x20,0xa1,0x00,0x00,0x40,0x8b,0x10,0x46,0xc4,0x01,0x91,0x11 }},
+ {16, 0xfb60, 0, {0x24,0x58,0x68,0x90,0xc2,0x04,0x00,0xb1,0x00,0xa8,0x50,0x09,0x14,0x0a,0x05,0x95 }},
+ {16, 0xfb70, 0, {0xa1,0x08,0xa0,0x42,0x28,0x11,0x0a,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb80, 0, {0x18,0x15,0xa4,0x18,0xb9,0x20,0x2e,0x50,0x0b,0x90,0x06,0x24,0x09,0xb9,0x00,0x22 }},
+ {16, 0xfb90, 0, {0x40,0x8b,0x91,0x02,0x84,0x00,0x99,0x64,0x24,0x40,0x58,0x90,0x02,0xa4,0x20,0xbb }},
+ {16, 0xfba0, 0, {0x00,0x2a,0x40,0x09,0xb0,0x02,0x05,0x01,0xa9,0x00,0x22,0x40,0x88,0x92,0x02,0x06 }},
+ {16, 0xfbb0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe6,0x00,0xf9,0x40,0x3e,0x40 }},
+ {16, 0xfbc0, 0, {0x4f,0x98,0x0b,0x24,0x80,0xd9,0x00,0x22,0x72,0x0b,0x98,0x03,0xe4,0x84,0xd9,0x00 }},
+ {16, 0xfbd0, 0, {0xb6,0x70,0x08,0x99,0x02,0x24,0x00,0xb9,0x00,0x2a,0x40,0x0d,0x94,0xc2,0x25,0x00 }},
+ {16, 0xfbe0, 0, {0xa9,0x00,0x22,0x40,0x0c,0x94,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfbf0, 0, {0x28,0x01,0xa6,0x80,0xf9,0x08,0x3e,0xc0,0x0f,0x91,0x43,0xe4,0x00,0xf9,0x00,0x3e }},
+ {16, 0xfc00, 0, {0x50,0x0f,0x98,0x03,0xa5,0x00,0xe9,0x00,0x3a,0x64,0x0f,0x90,0x03,0xe4,0x00,0xf9 }},
+ {16, 0xfc10, 0, {0x00,0x3c,0x40,0x6e,0x90,0x03,0xe4,0x20,0xd9,0x00,0x3c,0x40,0x0f,0x90,0x82,0xca }},
+ {16, 0xfc20, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xe8,0x00,0x3e,0x00 }},
+ {16, 0xfc30, 0, {0x4f,0x84,0x0b,0x20,0x00,0xf8,0x00,0x36,0x01,0x0e,0x80,0x03,0xe0,0x00,0xc8,0x40 }},
+ {16, 0xfc40, 0, {0x32,0x10,0x2d,0x80,0x03,0xe0,0x54,0xc8,0x00,0x36,0x10,0x0f,0x04,0x83,0xe0,0x50 }},
+ {16, 0xfc50, 0, {0xd8,0x04,0x12,0x00,0x0c,0x00,0x0b,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc60, 0, {0x28,0x05,0x28,0x00,0x8e,0x42,0x2e,0xa2,0x8b,0xea,0x02,0x28,0x08,0xbe,0x89,0x37 }},
+ {16, 0xfc70, 0, {0x84,0x48,0xe0,0x12,0x28,0x02,0x8e,0xc0,0x23,0xb0,0x4d,0x60,0x62,0xf8,0x00,0x86 }},
+ {16, 0xfc80, 0, {0x00,0x23,0x80,0x0b,0xe0,0x02,0xf8,0x00,0x0e,0x00,0x22,0x80,0x08,0xe4,0x02,0x0a }},
+ {16, 0xfc90, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xa3,0x00,0x2c,0x80 }},
+ {16, 0xfca0, 0, {0x1b,0xb0,0x9a,0x4c,0x10,0x9b,0x80,0x24,0xc0,0x0a,0x30,0x00,0x0c,0x04,0x9b,0x20 }},
+ {16, 0xfcb0, 0, {0x20,0xd6,0x08,0x30,0x02,0x8e,0x08,0xa3,0x04,0x24,0xc0,0x19,0x34,0x02,0xc7,0x07 }},
+ {16, 0xfcc0, 0, {0xaa,0xa4,0xa0,0xc0,0x48,0x34,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfcd0, 0, {0xa0,0x01,0x0e,0x00,0x87,0x00,0x2d,0xc0,0x0b,0x40,0x02,0x5c,0x40,0xb3,0x14,0x25 }},
+ {16, 0xfce0, 0, {0xe0,0x08,0x7a,0x02,0x9e,0xc0,0x92,0x40,0xa0,0x00,0x49,0x60,0x02,0xce,0x02,0x8e }},
+ {16, 0xfcf0, 0, {0x01,0x21,0xc0,0x8b,0x54,0x02,0xc4,0x08,0x86,0x40,0x21,0xc8,0x88,0x10,0x02,0x28 }},
+ {16, 0xfd00, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0xc0,0xe4,0x80,0x3d,0xe2 }},
+ {16, 0xfd10, 0, {0x0f,0x58,0x03,0x5e,0x90,0xb6,0xa2,0x35,0xe0,0x0e,0x7c,0x23,0x1c,0x00,0xd6,0x80 }},
+ {16, 0xfd20, 0, {0x31,0xe0,0x84,0x78,0x03,0xde,0x00,0xc7,0x80,0x35,0xe0,0x0f,0x68,0x03,0xde,0x00 }},
+ {16, 0xfd30, 0, {0xe3,0x80,0x33,0xe8,0x2c,0x78,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd40, 0, {0x08,0x1d,0xac,0x90,0xfa,0x00,0x7e,0x40,0x0f,0x90,0x03,0xac,0x01,0xfb,0x00,0x3c }},
+ {16, 0xfd50, 0, {0x41,0x0f,0x30,0x0b,0x2d,0x04,0xeb,0x01,0x3e,0xc0,0x0e,0xb0,0x03,0xec,0x00,0xfa }},
+ {16, 0xfd60, 0, {0x00,0x3f,0xc0,0x0f,0x80,0x03,0xec,0x00,0xe9,0x60,0x3e,0xe4,0x0f,0x90,0x03,0xc2 }},
+ {16, 0xfd70, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x20,0xff,0x90,0x3e,0x20 }},
+ {16, 0xfd80, 0, {0x0c,0xa9,0x07,0x2e,0x44,0xc9,0x91,0x30,0xa0,0x0c,0xb8,0x63,0x2f,0x44,0xcb,0xa1 }},
+ {16, 0xfd90, 0, {0x36,0x20,0x8c,0xf8,0x03,0x36,0x00,0xcf,0x82,0x33,0xe0,0x0c,0xf8,0x23,0x2e,0x00 }},
+ {16, 0xfda0, 0, {0xce,0xc0,0x3b,0xe0,0x0c,0x68,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfdb0, 0, {0xa8,0x11,0x9c,0x84,0xb3,0x54,0x2c,0xf4,0x28,0xba,0x8a,0x3e,0x40,0x81,0xa0,0x29 }},
+ {16, 0xfdc0, 0, {0xb0,0x0f,0x78,0x42,0xae,0x00,0x83,0x90,0x33,0xe8,0x0d,0xe1,0x00,0x85,0x40,0x82 }},
+ {16, 0xfdd0, 0, {0x24,0x23,0xc6,0x0d,0x71,0x03,0x5e,0xe0,0x87,0x00,0x2b,0xc1,0x0d,0x44,0x02,0x2a }},
+ {16, 0xfde0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x08,0x35,0x14,0x6d,0xc0 }},
+ {16, 0xfdf0, 0, {0x88,0x72,0x32,0x5c,0x80,0x84,0x30,0x2b,0x88,0x0a,0x70,0x42,0x5c,0xa8,0x91,0x08 }},
+ {16, 0xfe00, 0, {0x25,0xc8,0x09,0x70,0x02,0x4c,0x22,0x83,0x0a,0x61,0xc0,0x09,0x20,0x02,0x04,0x00 }},
+ {16, 0xfe10, 0, {0x87,0x00,0x21,0xc0,0x08,0x60,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfe20, 0, {0x20,0x14,0xcc,0x10,0xb3,0x85,0x6c,0xdc,0x08,0x34,0x02,0x4d,0x21,0x81,0x00,0x28 }},
+ {16, 0xfe30, 0, {0x02,0x4a,0x31,0x12,0xef,0x0c,0x91,0xc2,0x20,0xf0,0x08,0x30,0x42,0x8e,0x00,0x82 }},
+ {16, 0xfe40, 0, {0x40,0x20,0xc8,0x19,0x28,0x02,0x22,0x81,0x83,0xc0,0x28,0xd4,0x09,0x00,0x0a,0x08 }},
+ {16, 0xfe50, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xfb,0xa0,0x3e,0xc0 }},
+ {16, 0xfe60, 0, {0x8c,0x04,0x12,0x7d,0x10,0xcf,0x02,0x3a,0x50,0x08,0xc0,0x42,0x7d,0x52,0x58,0x01 }},
+ {16, 0xfe70, 0, {0x36,0x22,0x69,0xd0,0x13,0x2a,0x00,0x88,0x82,0x32,0xf0,0x09,0xb8,0x82,0x2f,0x00 }},
+ {16, 0xfe80, 0, {0xc9,0xc8,0x23,0xc0,0x0c,0x8a,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfe90, 0, {0x80,0x00,0xec,0x00,0xb9,0x40,0x3c,0x50,0x4f,0x80,0x23,0xac,0x12,0xfb,0x00,0x2a }},
+ {16, 0xfea0, 0, {0xc0,0x6d,0x80,0x13,0xac,0x00,0xe8,0x04,0xba,0x10,0x0f,0x80,0x03,0xe8,0x00,0xf3 }},
+ {16, 0xfeb0, 0, {0x08,0x3c,0x80,0x0f,0x90,0x83,0xec,0x04,0xf9,0x60,0x2c,0xc2,0x0f,0x80,0x83,0xe0 }},
+ {16, 0xfec0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x00,0xec,0x2c,0x3f,0xf0 }},
+ {16, 0xfed0, 0, {0x8c,0xfa,0x8b,0xbc,0x00,0xfe,0x00,0x3f,0x00,0x0f,0x79,0x03,0x3c,0x00,0xce,0x08 }},
+ {16, 0xfee0, 0, {0x0b,0xc2,0x0c,0xf0,0x03,0xbc,0x00,0xfc,0x00,0x33,0x40,0x8c,0x7a,0x03,0x3a,0x00 }},
+ {16, 0xfef0, 0, {0xc5,0x00,0x33,0xc0,0x4c,0xc8,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xff00, 0, {0x81,0x04,0x6c,0x00,0x88,0xc0,0x2e,0xe0,0x08,0x94,0x02,0x2c,0x00,0xbb,0x80,0x66 }},
+ {16, 0xff10, 0, {0x30,0x16,0xb0,0x02,0x2c,0x00,0xda,0x4c,0x22,0xf0,0x08,0xf0,0x03,0xec,0x00,0xeb }},
+ {16, 0xff20, 0, {0xc0,0x22,0x68,0x00,0x94,0x02,0x2c,0x02,0xa9,0x80,0x22,0xc0,0x08,0x0c,0x02,0xa0 }},
+ {16, 0xff30, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xab,0x04,0x2e,0xc0 }},
+ {16, 0xff40, 0, {0x08,0xa4,0x06,0x2c,0x04,0xab,0x10,0x2e,0x60,0x43,0x80,0x82,0x6c,0x01,0x81,0x80 }},
+ {16, 0xff50, 0, {0x28,0x0a,0x08,0x91,0x00,0xe0,0x00,0xb8,0x80,0x02,0xe0,0x08,0x80,0x02,0x2d,0x80 }},
+ {16, 0xff60, 0, {0x88,0xc0,0x22,0xc0,0x08,0x82,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xff70, 0, {0x08,0x04,0x0c,0x00,0x80,0x44,0x2c,0xc8,0x28,0xa0,0x22,0x0c,0x04,0xb3,0x26,0x2c }},
+ {16, 0xff80, 0, {0xc8,0x88,0x01,0x06,0x0c,0xe0,0x91,0x20,0x20,0x0c,0x38,0x04,0x22,0xc0,0x48,0xa3 }},
+ {16, 0xff90, 0, {0x42,0xa0,0x81,0x08,0x00,0x02,0x0c,0x80,0x81,0x00,0x20,0xc0,0x28,0x00,0x02,0x82 }},
+ {16, 0xffa0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x00,0xa9,0x40,0x3e,0x44 }},
+ {16, 0xffb0, 0, {0x08,0xb1,0x03,0x2c,0x40,0xea,0x49,0x2e,0x0d,0x0b,0xb6,0x13,0x7d,0x80,0xc9,0x40 }},
+ {16, 0xffc0, 0, {0xba,0xd0,0x0c,0xb4,0x03,0xac,0x00,0xf8,0x00,0x32,0x40,0x0c,0x80,0x0b,0x20,0x00 }},
+ {16, 0xffd0, 0, {0xc5,0x00,0xb2,0xc0,0x0c,0x80,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xffe0, 0, {0xa0,0x1d,0xfc,0x04,0xfc,0x00,0x3d,0xc5,0x0b,0xf1,0x00,0xfc,0xd0,0x77,0x29,0x37 }},
+ {16, 0xfff0, 0, {0x0c,0x8e,0x74,0x03,0xfc,0x08,0xfd,0x69,0x3f,0xd8,0x0f,0xf0,0x03,0xbc,0x00,0xef }},
+ {16, 0x8010, 0, {0x00,0x3f,0x40,0x07,0xc0,0x03,0xf0,0x40,0xfd,0x00,0x3f,0xc0,0x0f,0xc0,0x03,0xe8 }},
+ {16, 0x8020, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x0d,0xfc,0xc0,0xdc,0x80,0x3f,0xc8 }},
+ {16, 0x8030, 0, {0x0f,0x48,0x03,0x7c,0x20,0xff,0x68,0x37,0xe0,0x0e,0xf1,0x03,0x9c,0x00,0xbf,0x20 }},
+ {16, 0x8040, 0, {0x37,0xe0,0x0c,0xc8,0x13,0x3c,0x40,0xed,0x60,0xbb,0xe4,0x2c,0x43,0x4b,0x70,0xa0 }},
+ {16, 0x8050, 0, {0xcc,0x2c,0x3f,0x09,0x0f,0xd8,0x43,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8060, 0, {0x80,0x00,0xed,0xc0,0xb8,0x80,0x2f,0xf4,0x0f,0x98,0x02,0x3f,0x00,0xbf,0x42,0x22 }},
+ {16, 0x8070, 0, {0xca,0x08,0xf4,0x02,0x3e,0x00,0xbf,0xd0,0x22,0x60,0x28,0x88,0x0a,0x3d,0x80,0x8d }},
+ {16, 0x8080, 0, {0x40,0x22,0xc8,0x08,0x81,0x02,0x21,0x80,0xdb,0xc0,0x2e,0xa5,0x0b,0x98,0x42,0x20 }},
+ {16, 0x8090, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x10,0xb0,0x00,0x2c,0xc0 }},
+ {16, 0x80a0, 0, {0x0b,0x20,0x02,0xcc,0x00,0xb3,0x20,0x26,0xc0,0x8a,0x36,0x12,0x8c,0x41,0xb3,0x00 }},
+ {16, 0x80b0, 0, {0x2e,0x40,0x08,0x00,0x02,0x0d,0x81,0xa1,0x30,0x22,0xc8,0x89,0xa2,0x42,0x08,0x20 }},
+ {16, 0x80c0, 0, {0xb0,0x00,0x2c,0x40,0x0b,0x90,0x26,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x80d0, 0, {0xc0,0x15,0xac,0x00,0xb8,0x50,0x2e,0xc0,0x0a,0x90,0x02,0xac,0x00,0xbb,0x00,0x22 }},
+ {16, 0x80e0, 0, {0xc0,0x08,0xb0,0x62,0x2c,0x10,0xbb,0x04,0x2a,0xf0,0x4a,0x88,0x02,0x0c,0x00,0x81 }},
+ {16, 0x80f0, 0, {0x00,0x22,0xc0,0x09,0xb8,0x80,0x26,0x00,0xb8,0x80,0x2e,0x21,0x0b,0x90,0x02,0x30 }},
+ {16, 0x8100, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x15,0xec,0x00,0xd8,0xc0,0x3e,0xc0 }},
+ {16, 0x8110, 0, {0x0b,0x80,0x03,0xec,0x00,0xfb,0x00,0x36,0x80,0x0e,0xb0,0x03,0xac,0x00,0xfb,0x00 }},
+ {16, 0x8120, 0, {0x3c,0xe0,0x0c,0x0c,0x03,0x2c,0x00,0xe9,0x00,0x10,0xc0,0x0c,0x8c,0x03,0x06,0x00 }},
+ {16, 0x8130, 0, {0xf8,0xcd,0x3e,0x22,0x0f,0x18,0x03,0x40,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8140, 0, {0xe0,0x01,0xbc,0x00,0xff,0x00,0x3e,0xc0,0x0f,0xf0,0x03,0x7c,0x00,0xf7,0x02,0x3f }},
+ {16, 0x8150, 0, {0xe4,0x0f,0x70,0x03,0x7c,0x04,0xb7,0x00,0x37,0x40,0x0d,0xc0,0x03,0xfc,0x00,0xfd }},
+ {16, 0x8160, 0, {0x00,0x37,0xd0,0x0e,0xc0,0x43,0xf4,0x00,0xdf,0x00,0x3f,0x80,0x8f,0xda,0x03,0xf8 }},
+ {16, 0x8170, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xf8,0x10,0x3a,0xc0 }},
+ {16, 0x8180, 0, {0x6d,0xa6,0x13,0xec,0x00,0xcb,0x00,0x3a,0xd0,0x0f,0xb0,0x03,0x2c,0x10,0xdb,0x10 }},
+ {16, 0x8190, 0, {0x36,0xd8,0x0d,0x84,0x03,0xec,0x06,0xc9,0x08,0x3a,0xc0,0x0e,0x86,0x03,0xa8,0x60 }},
+ {16, 0x81a0, 0, {0xf8,0x20,0x3a,0x40,0x0c,0x90,0x03,0x54,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x81b0, 0, {0x98,0x05,0x3c,0x00,0xbb,0x40,0x23,0xd0,0x08,0x30,0x02,0x3e,0x10,0xaf,0x00,0x20 }},
+ {16, 0x81c0, 0, {0xc0,0x0b,0xf0,0x02,0x3c,0x00,0x8f,0x50,0x2e,0xc8,0x06,0x8a,0x02,0xfc,0x00,0x8d }},
+ {16, 0x81d0, 0, {0x24,0x82,0xd6,0x08,0x32,0x02,0x2d,0x08,0x3a,0x40,0x22,0x80,0x0d,0x90,0x03,0x62 }},
+ {16, 0x81e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0x4c,0x00,0xb0,0x20,0x28,0xc2 }},
+ {16, 0x81f0, 0, {0x08,0x04,0x02,0x8c,0x00,0x13,0x02,0x28,0xc0,0x0b,0x30,0x02,0x0c,0x30,0x93,0x80 }},
+ {16, 0x8200, 0, {0x24,0xd0,0x09,0x20,0x02,0xcc,0x00,0x91,0x40,0x08,0xc0,0x2a,0x14,0x02,0x81,0x00 }},
+ {16, 0x8210, 0, {0x90,0x00,0x68,0x00,0x08,0x18,0x02,0x3a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8220, 0, {0x70,0x01,0x1e,0x00,0xb4,0xa0,0x21,0xe0,0x08,0xc8,0x12,0x9e,0x00,0xb3,0x82,0x21 }},
+ {16, 0x8230, 0, {0xe0,0x0b,0x7a,0x0a,0x1e,0x00,0x97,0x80,0x2d,0xe1,0x0a,0x48,0x02,0xce,0x40,0x95 }},
+ {16, 0x8240, 0, {0x90,0x29,0xe4,0x08,0x58,0x02,0x9a,0x00,0xb7,0x88,0x21,0xe0,0x09,0x58,0x02,0x5c }},
+ {16, 0x8250, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x4a,0x00,0x0c,0x00,0xf0,0x80,0x38,0xc4 }},
+ {16, 0x8260, 0, {0x0c,0x25,0x03,0x8c,0x20,0x93,0x00,0x38,0xc4,0x0f,0xb0,0x03,0x0c,0x80,0xd3,0x00 }},
+ {16, 0x8270, 0, {0x34,0xc0,0x0d,0x04,0x13,0xcc,0x08,0x99,0x00,0x2a,0xc0,0x0e,0x21,0x03,0x88,0x04 }},
+ {16, 0x8280, 0, {0xf3,0x00,0x38,0xc0,0x0c,0x11,0x83,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8290, 0, {0x42,0x15,0xbc,0x00,0xf4,0x00,0x3f,0xc3,0x0e,0xc0,0x03,0x1c,0x00,0xaf,0x4a,0x7f }},
+ {16, 0x82a0, 0, {0xc4,0x0f,0xb2,0x03,0xfd,0x01,0xef,0x10,0x3f,0x84,0x0f,0xc0,0x03,0xfc,0x00,0xe9 }},
+ {16, 0x82b0, 0, {0x00,0x37,0xc2,0x0e,0xf1,0x47,0x7c,0x00,0xf7,0x00,0x3d,0xc0,0x0f,0x50,0x03,0xd0 }},
+ {16, 0x82c0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x15,0xec,0x08,0xf8,0x00,0x3e,0xca }},
+ {16, 0x82d0, 0, {0x0f,0x90,0x03,0xef,0x21,0xfb,0x80,0x7a,0x40,0x8f,0xb2,0xa1,0x2f,0x00,0xcb,0x60 }},
+ {16, 0x82e0, 0, {0x3e,0xc0,0x0f,0xb0,0x03,0xed,0xa0,0xe9,0x30,0x32,0xc0,0x2d,0xb0,0x03,0xe4,0x00 }},
+ {16, 0x82f0, 0, {0xf8,0x00,0x3e,0x00,0x0f,0xb0,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8300, 0, {0xc8,0x91,0x9d,0x00,0xb4,0x01,0x2d,0xc8,0x0b,0x70,0x02,0xcc,0x80,0x8f,0x20,0x21 }},
+ {16, 0x8310, 0, {0xc0,0x8b,0x76,0x03,0x5d,0x00,0x87,0x0a,0x2d,0xc0,0x0b,0x40,0x22,0xfd,0x00,0x8d }},
+ {16, 0x8320, 0, {0x10,0x23,0xc8,0x08,0x50,0x12,0xd4,0x00,0xb7,0x00,0x2d,0xc0,0x0b,0x70,0x02,0xf2 }},
+ {16, 0x8330, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x9e,0x00,0xb4,0x80,0x2d,0xe0 }},
+ {16, 0x8340, 0, {0x0b,0x7c,0x02,0xde,0x40,0xa7,0x82,0x2d,0xe0,0x0b,0x3a,0x02,0x8e,0x00,0x87,0x90 }},
+ {16, 0x8350, 0, {0x2d,0xe0,0x0b,0x58,0x02,0x5e,0x00,0xa5,0xa2,0x65,0xe0,0x08,0x68,0x82,0xda,0x00 }},
+ {16, 0x8360, 0, {0x95,0x80,0x2d,0x60,0x0b,0x78,0x02,0xe0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8370, 0, {0x08,0x84,0xcc,0x00,0xb0,0x09,0x2c,0xc0,0x0b,0x38,0x02,0xcc,0x00,0x83,0x00,0x2e }},
+ {16, 0x8380, 0, {0xc0,0x0b,0x30,0x42,0x4c,0x00,0x83,0x00,0x2c,0xa0,0x0b,0x04,0x02,0xcc,0x00,0x81 }},
+ {16, 0x8390, 0, {0x00,0xa0,0xc0,0x08,0xb0,0x06,0xcf,0x80,0xb3,0x10,0x2c,0xc4,0x0b,0x31,0x02,0xc3 }},
+ {16, 0x83a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0xa8,0x00,0xfe,0x80,0x3e,0x80 }},
+ {16, 0x83b0, 0, {0x0f,0xe8,0x13,0xe8,0x00,0xea,0x00,0x3f,0xb0,0x0f,0xa0,0x03,0xa8,0x02,0xc2,0x00 }},
+ {16, 0x83c0, 0, {0x2f,0x88,0x0f,0xe0,0x03,0xe8,0x00,0xea,0x00,0x36,0x00,0x0c,0xe0,0x03,0xf9,0x20 }},
+ {16, 0x83d0, 0, {0xde,0x80,0x3f,0xa0,0x4f,0xa8,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x83e0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x10,0x3c,0x10,0x0f,0x80,0x83,0xe1,0x00,0xe8,0x00,0x22 }},
+ {16, 0x83f0, 0, {0x06,0x0f,0x00,0x13,0xe0,0x01,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x83,0xe0,0x00,0xf8 }},
+ {16, 0x8400, 0, {0x00,0x3e,0x00,0x0f,0x84,0x23,0xe0,0x00,0xf8,0x00,0x3e,0x10,0x0f,0x80,0x03,0xd2 }},
+ {16, 0x8410, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xe4,0x00,0xf9,0x10,0x3e,0x44 }},
+ {16, 0x8420, 0, {0x0d,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x40,0x0c,0x90,0x12,0x24,0x00,0xf9,0x10 }},
+ {16, 0x8430, 0, {0x32,0x40,0x8f,0x90,0x03,0xc4,0x00,0xc9,0x00,0x32,0x10,0x0c,0x9c,0x01,0x24,0x00 }},
+ {16, 0x8440, 0, {0xf9,0x10,0x3e,0x70,0x0f,0x90,0x02,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8450, 0, {0x80,0x14,0x64,0x00,0xb9,0xc0,0x2e,0x48,0x08,0x91,0x02,0xe4,0x00,0xb9,0x00,0x2e }},
+ {16, 0x8460, 0, {0x40,0x0d,0x90,0x03,0x67,0x00,0xb9,0x80,0x2a,0x60,0x0b,0x99,0x02,0xe4,0x00,0x81 }},
+ {16, 0x8470, 0, {0x00,0x22,0x40,0x2c,0x90,0x12,0x25,0x20,0xb9,0x48,0x2e,0x52,0x0b,0x94,0x02,0xe0 }},
+ {16, 0x8480, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x00,0x2e,0x40 }},
+ {16, 0x8490, 0, {0x68,0x90,0x46,0xe4,0x00,0xb9,0x00,0x2e,0xc0,0x08,0x90,0x02,0xa4,0x60,0xb9,0x00 }},
+ {16, 0x84a0, 0, {0x22,0x48,0x0b,0x90,0x06,0xe4,0x02,0x89,0x00,0xa0,0x40,0x08,0x90,0x02,0xa6,0x10 }},
+ {16, 0x84b0, 0, {0xb9,0x00,0x0e,0x40,0x0b,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x84c0, 0, {0x08,0x04,0x04,0x80,0xb1,0x00,0x2c,0x48,0x08,0x10,0x02,0xc4,0x84,0xb1,0x20,0x2c }},
+ {16, 0x84d0, 0, {0x40,0x09,0x12,0x02,0xc4,0x80,0xb1,0x20,0x28,0x40,0x0b,0x10,0x02,0xc4,0x80,0x89 }},
+ {16, 0x84e0, 0, {0x20,0x20,0x40,0x4b,0x12,0x0a,0x84,0x84,0xb1,0x20,0x2c,0x48,0x8b,0x10,0x02,0xc2 }},
+ {16, 0x84f0, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xba,0x00,0x2e,0x00 }},
+ {16, 0x8500, 0, {0x0c,0x80,0x03,0xe8,0x08,0xf8,0x50,0x3e,0x14,0x0c,0x85,0x03,0x20,0x00,0xb8,0x00 }},
+ {16, 0x8510, 0, {0x32,0x00,0x0f,0xa0,0x03,0xe1,0x40,0xc8,0x50,0x32,0x14,0x0c,0xa5,0x03,0xa1,0x40 }},
+ {16, 0x8520, 0, {0xf8,0x00,0x3e,0x00,0x0f,0xa0,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8530, 0, {0x88,0x0d,0xe4,0x40,0xfd,0x00,0x3e,0x44,0x0f,0xd0,0x03,0xe4,0x40,0xb9,0x11,0x3f }},
+ {16, 0x8540, 0, {0x40,0x0f,0x91,0x03,0x64,0x44,0xf9,0x10,0x3f,0x40,0x0f,0xd0,0x03,0xe4,0x40,0xfd }},
+ {16, 0x8550, 0, {0x10,0x3f,0x10,0x8c,0xd1,0x03,0x74,0x40,0xff,0x10,0x3f,0x44,0x0f,0xd0,0x03,0xe6 }},
+ {16, 0x8560, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0x66,0x20,0xed,0x00,0x33,0x69 }},
+ {16, 0x8570, 0, {0x4d,0x50,0x43,0x56,0x00,0xf9,0xa0,0x34,0x40,0x0f,0x9a,0x0b,0x34,0x00,0xdd,0x80 }},
+ {16, 0x8580, 0, {0x3b,0x40,0x0b,0x50,0x03,0xe4,0x00,0xf9,0x00,0x32,0xe0,0x0e,0xd0,0x03,0xf4,0x00 }},
+ {16, 0x8590, 0, {0xfd,0x00,0x3f,0x40,0x0c,0xd0,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x85a0, 0, {0x78,0x10,0xe2,0x80,0x88,0x04,0x22,0x10,0x0b,0x80,0x02,0x20,0x09,0xb8,0xf0,0x22 }},
+ {16, 0x85b0, 0, {0x00,0x0b,0x8e,0x12,0xa0,0x00,0xb8,0x52,0x2e,0x00,0x0b,0x80,0x02,0xe0,0x05,0xb8 }},
+ {16, 0x85c0, 0, {0xaa,0x23,0x3e,0x0d,0x80,0x02,0xe0,0x00,0xb8,0x00,0x3a,0x00,0x08,0x80,0x02,0xce }},
+ {16, 0x85d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc4,0x20,0xa9,0x00,0xa4,0x44 }},
+ {16, 0x85e0, 0, {0x09,0x90,0x02,0xc5,0x00,0xa1,0x08,0x2c,0x40,0x0b,0x11,0x82,0x04,0x00,0xb1,0x00 }},
+ {16, 0x85f0, 0, {0x28,0x40,0x0a,0x10,0x42,0xc4,0x00,0xb5,0x00,0xa1,0x40,0x08,0x10,0x02,0xc4,0x00 }},
+ {16, 0x8600, 0, {0xb1,0x01,0x2c,0x40,0x08,0x10,0x20,0xd2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8610, 0, {0x18,0x15,0xa4,0x00,0x89,0x04,0x22,0x40,0x0b,0x90,0x00,0xac,0x00,0x39,0x00,0x2a }},
+ {16, 0x8620, 0, {0x40,0x0b,0x10,0x02,0xa4,0x00,0xb9,0x00,0x2e,0x48,0x0b,0x90,0x12,0xe4,0x00,0xb9 }},
+ {16, 0x8630, 0, {0x00,0x21,0x60,0x09,0x92,0x22,0xe4,0x28,0xb9,0x00,0x0a,0x50,0x08,0x90,0x06,0xc6 }},
+ {16, 0x8640, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xe9,0x00,0x36,0x40 }},
+ {16, 0x8650, 0, {0x0d,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x48,0x0f,0x90,0x03,0x24,0x00,0xd9,0x00 }},
+ {16, 0x8660, 0, {0x3a,0x78,0x0e,0x98,0x03,0xe4,0x00,0xb9,0x00,0xb2,0x40,0x0e,0x92,0x23,0xe6,0x00 }},
+ {16, 0x8670, 0, {0xb9,0x50,0x3e,0x70,0x2c,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8680, 0, {0x68,0x01,0x84,0x00,0xf9,0x00,0x3e,0x40,0x4f,0x9c,0x23,0x64,0x00,0xf9,0x04,0x36 }},
+ {16, 0x8690, 0, {0x48,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x60,0x0f,0x92,0x03,0xe4,0x00,0xf9 }},
+ {16, 0x86a0, 0, {0x00,0x3e,0x40,0x8f,0x90,0x83,0xe4,0x44,0xf9,0x00,0x78,0x64,0x0f,0x90,0x03,0xda }},
+ {16, 0x86b0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x00,0x3e,0x00 }},
+ {16, 0x86c0, 0, {0x0f,0x82,0x03,0xa0,0x40,0xe8,0x00,0x3e,0x00,0x0d,0x80,0x03,0x20,0xc0,0xc8,0x80 }},
+ {16, 0x86d0, 0, {0x3e,0x12,0x0f,0x80,0x03,0x60,0x00,0x7c,0x00,0x33,0x00,0x0d,0x80,0x13,0xe0,0x10 }},
+ {16, 0x86e0, 0, {0xc8,0x64,0x3e,0x08,0x0c,0x82,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x86f0, 0, {0x28,0x05,0x28,0x00,0xb6,0xe0,0x0f,0xa0,0x0b,0x60,0x82,0x38,0x00,0xaa,0x00,0x2e }},
+ {16, 0x8700, 0, {0x80,0x08,0xa0,0x42,0xba,0x00,0xae,0x20,0x2f,0x88,0x0b,0xe5,0x02,0x28,0x00,0xba }},
+ {16, 0x8710, 0, {0xd8,0x37,0x80,0x08,0xec,0x02,0xf8,0x04,0x8e,0x00,0x2f,0x90,0x0d,0xe0,0x02,0xca }},
+ {16, 0x8720, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb0,0x24,0x2c,0x60 }},
+ {16, 0x8730, 0, {0x0b,0x38,0x02,0x8e,0x80,0xab,0x00,0x2c,0xc0,0x09,0x30,0x02,0x0d,0x08,0x00,0x80 }},
+ {16, 0x8740, 0, {0x6c,0xd0,0x0b,0x34,0x02,0xcc,0x00,0xb8,0xc0,0x20,0x00,0x48,0x34,0x12,0xcc,0x40 }},
+ {16, 0x8750, 0, {0x83,0x00,0x2c,0xe0,0x0a,0x35,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8760, 0, {0xa0,0x01,0x1c,0x40,0xb7,0x00,0x2d,0x02,0x8b,0x60,0x02,0x9e,0x00,0x87,0x20,0x2f }},
+ {16, 0x8770, 0, {0xe0,0x08,0x72,0x02,0x9e,0x00,0xa4,0x00,0x2d,0xc0,0x0b,0xf8,0x02,0x9c,0xc0,0xb3 }},
+ {16, 0x8780, 0, {0x02,0xa5,0xc0,0x08,0x50,0x86,0xfe,0x00,0x87,0x00,0x2f,0xd0,0x09,0x70,0x02,0xe8 }},
+ {16, 0x8790, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xf4,0x80,0x3d,0x20 }},
+ {16, 0x87a0, 0, {0x0f,0x58,0x03,0x9e,0x00,0x67,0x80,0x3d,0xf8,0x0d,0x38,0x02,0x1a,0x10,0x44,0x80 }},
+ {16, 0x87b0, 0, {0x3d,0xe0,0x0f,0x58,0x03,0xde,0x20,0xb4,0x80,0x33,0xa0,0x2c,0x68,0x03,0xd6,0x00 }},
+ {16, 0x87c0, 0, {0xc7,0x81,0x3d,0xe0,0x0c,0x78,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x87d0, 0, {0x08,0x1d,0xac,0x08,0xf8,0x00,0x3e,0x00,0x8f,0x80,0x03,0x6c,0x00,0x3b,0x12,0x3e }},
+ {16, 0x87e0, 0, {0xca,0x0f,0xb5,0x03,0xc8,0x00,0xf8,0x04,0x7e,0xc0,0x0f,0x90,0x03,0x6c,0x80,0xfb }},
+ {16, 0x87f0, 0, {0x04,0x3a,0x40,0x0f,0x90,0x23,0xc8,0x00,0xf9,0x01,0x3c,0xc0,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0x8800, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfe,0x00,0xac,0x90,0x31,0x48 }},
+ {16, 0x8810, 0, {0x08,0xf8,0x03,0xfa,0x00,0xcf,0x80,0x3f,0xe0,0x0c,0xfc,0x13,0x3e,0x04,0xfc,0x80 }},
+ {16, 0x8820, 0, {0x35,0xa0,0x0c,0x78,0x03,0xbe,0x00,0xdf,0x80,0x3b,0x20,0x24,0xf8,0x03,0x2e,0x40 }},
+ {16, 0x8830, 0, {0xcf,0x80,0x33,0xe0,0x03,0xf9,0x03,0xd0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8840, 0, {0xa8,0x11,0xbc,0x00,0x80,0x00,0x01,0x00,0x08,0x72,0x02,0xd0,0x00,0x87,0x00,0x2d }},
+ {16, 0x8850, 0, {0xc8,0x0a,0xf0,0x02,0x98,0x40,0xf5,0x00,0x61,0x41,0x00,0x74,0x02,0x1c,0x00,0xb4 }},
+ {16, 0x8860, 0, {0x00,0x21,0xc8,0x08,0x60,0x02,0x3e,0x20,0x86,0x08,0x21,0xd8,0x0f,0x50,0x02,0xea }},
+ {16, 0x8870, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x9c,0x00,0xa4,0x00,0x21,0x00 }},
+ {16, 0x8880, 0, {0x08,0x50,0x02,0xd8,0x00,0x97,0x00,0x2d,0xc0,0x88,0x71,0x02,0x14,0x00,0xb0,0x00 }},
+ {16, 0x8890, 0, {0x25,0x90,0x08,0xc0,0x82,0x9c,0x40,0x93,0x00,0x29,0xa1,0x88,0x60,0x02,0x14,0x12 }},
+ {16, 0x88a0, 0, {0x87,0x40,0x29,0x40,0x0b,0x60,0x02,0xc4,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x88b0, 0, {0x60,0x14,0xcc,0x00,0x80,0xd0,0xa0,0x00,0x08,0x1c,0x02,0xc0,0x00,0x93,0x00,0x2c }},
+ {16, 0x88c0, 0, {0xd0,0x0a,0xb0,0x26,0x80,0x00,0xb3,0x00,0x24,0xe4,0x08,0x08,0x02,0x8c,0x00,0xb0 }},
+ {16, 0x88d0, 0, {0x02,0x02,0x41,0x08,0x08,0x02,0x03,0x01,0x81,0x00,0x28,0x42,0x1a,0x00,0x42,0xd8 }},
+ {16, 0x88e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x15,0xbc,0x00,0xe8,0xc0,0x32,0x80 }},
+ {16, 0x88f0, 0, {0x0c,0xb5,0x03,0xe4,0x00,0x9f,0x00,0x3d,0xe0,0x0c,0xf0,0x0b,0x24,0x00,0xf8,0x00 }},
+ {16, 0x8900, 0, {0x36,0xe0,0x0c,0x25,0x03,0xbc,0x05,0xd8,0x02,0x2a,0x00,0x08,0xba,0x02,0x2a,0x00 }},
+ {16, 0x8910, 0, {0xc1,0x02,0x3a,0x50,0x8b,0x90,0x03,0xee,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8920, 0, {0x80,0x00,0xec,0x00,0xfb,0x08,0x3e,0x80,0x0f,0xa1,0x03,0xec,0x04,0xeb,0x02,0x2e }},
+ {16, 0x8930, 0, {0xc6,0x0f,0xb0,0x17,0x44,0x00,0xe8,0x00,0x3a,0x40,0x0f,0x80,0x02,0x6c,0x00,0xfb }},
+ {16, 0x8940, 0, {0x00,0x3e,0xe0,0x0f,0x90,0x93,0xe1,0x00,0xd9,0x00,0x26,0x70,0x8f,0x90,0x01,0xe1 }},
+ {16, 0x8950, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xfc,0x00,0xfc,0x03,0x37,0x24 }},
+ {16, 0x8960, 0, {0x0d,0xf8,0x03,0xe0,0x00,0xff,0x00,0x3f,0xc1,0x8d,0xf0,0x0b,0x38,0x00,0xcc,0x00 }},
+ {16, 0x8970, 0, {0x3f,0xc0,0x0f,0xfa,0x03,0x3c,0x0c,0xfc,0x04,0x3b,0x80,0x0c,0xa0,0x03,0x94,0x20 }},
+ {16, 0x8980, 0, {0x89,0x05,0x3b,0x00,0x4f,0xd0,0x23,0xc0,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8990, 0, {0x80,0x04,0x6c,0x00,0xb0,0x06,0x20,0x13,0x88,0xa8,0x02,0xeb,0x00,0xbb,0x00,0x2e }},
+ {16, 0x89a0, 0, {0xc0,0x08,0xb0,0x02,0x2a,0x00,0xa8,0x80,0x2e,0xe0,0x0b,0x94,0x1a,0x2c,0x00,0xbb }},
+ {16, 0x89b0, 0, {0x00,0xa2,0x40,0x29,0x98,0x02,0xe2,0x00,0xa9,0x84,0x22,0x20,0x0b,0x98,0x02,0xe0 }},
+ {16, 0x89c0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xb8,0x00,0x22,0x00 }},
+ {16, 0x89d0, 0, {0x09,0x82,0x02,0xe6,0x00,0xbb,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0x26,0x00,0x88,0x80 }},
+ {16, 0x89e0, 0, {0x2e,0xa0,0x0b,0xa0,0x02,0x2c,0x00,0xb3,0x00,0x2a,0x00,0x09,0x98,0x02,0xea,0x20 }},
+ {16, 0x89f0, 0, {0xa9,0x80,0x2a,0x60,0x9b,0x98,0x82,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8a00, 0, {0x08,0x04,0x0c,0x00,0xb8,0x00,0x20,0x00,0x09,0x08,0x02,0xc4,0x00,0xb3,0x00,0x26 }},
+ {16, 0x8a10, 0, {0xc0,0x00,0x30,0x02,0x00,0x00,0x81,0x00,0x2c,0x41,0x0b,0x00,0x02,0x0c,0x00,0xb0 }},
+ {16, 0x8a20, 0, {0x00,0x20,0xc0,0x0b,0x00,0x02,0xc8,0x80,0xa8,0x00,0x20,0x41,0x0b,0x10,0x02,0xc2 }},
+ {16, 0x8a30, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x10,0xf8,0x50,0xb2,0x00 }},
+ {16, 0x8a40, 0, {0x0d,0x80,0x03,0xe0,0x00,0xfb,0x00,0x3d,0xc0,0x0d,0xf0,0x13,0x24,0x02,0xc8,0x06 }},
+ {16, 0x8a50, 0, {0x3e,0x80,0x0f,0xa0,0x03,0x3c,0x04,0xfb,0x00,0x78,0x80,0x0c,0xa0,0x03,0xe4,0x00 }},
+ {16, 0x8a60, 0, {0xe9,0x00,0x1a,0x40,0x0f,0x90,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8a70, 0, {0xa0,0x1d,0xfc,0x00,0xf4,0x20,0x3f,0x00,0x0e,0xc0,0x02,0xf0,0x01,0xff,0x00,0x3f }},
+ {16, 0x8a80, 0, {0xc0,0x0f,0xf0,0x23,0xf0,0x00,0xfd,0x00,0x3f,0xc0,0x0f,0xc0,0x03,0xfc,0x00,0xfc }},
+ {16, 0x8a90, 0, {0x00,0x3f,0x40,0x9c,0xc0,0x03,0xf0,0x40,0xfd,0x00,0x3f,0x40,0x0f,0xd0,0x43,0xe8 }},
+ {16, 0x8aa0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf0,0x00,0xed,0x23,0xb7,0x48 }},
+ {16, 0x8ab0, 0, {0x0c,0xe1,0xc3,0x7c,0xc0,0xdd,0x80,0x37,0xe0,0x0f,0xcb,0x03,0xfe,0x08,0xfc,0x28 }},
+ {16, 0x8ac0, 0, {0x3f,0xf0,0x1c,0xfb,0x23,0x7c,0x01,0xff,0x14,0x77,0xe2,0x4f,0xe8,0x23,0x7c,0x00 }},
+ {16, 0x8ad0, 0, {0xc4,0x80,0x33,0x48,0x2c,0xf8,0x22,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8ae0, 0, {0x80,0x10,0xe0,0xe0,0xc9,0xc0,0x22,0x5b,0x88,0x96,0x22,0x2d,0x00,0x89,0x22,0x22 }},
+ {16, 0x8af0, 0, {0xca,0x0b,0x9e,0x22,0xe2,0xa0,0xb9,0x61,0x2c,0xe0,0x88,0x9f,0x02,0x3d,0x85,0xbf }},
+ {16, 0x8b00, 0, {0x60,0x26,0x50,0x48,0xa0,0x02,0x3c,0x00,0x88,0x00,0x22,0x50,0x08,0xb0,0x02,0x20 }},
+ {16, 0x8b10, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc0,0x80,0xb1,0x10,0x20,0x44 }},
+ {16, 0x8b20, 0, {0x0b,0xb2,0x02,0xce,0xd0,0x81,0x08,0x2c,0xc0,0x0b,0x01,0x02,0x8c,0x08,0xb3,0x08 }},
+ {16, 0x8b30, 0, {0x2c,0xc9,0x08,0x10,0x62,0x8c,0x60,0xb3,0x32,0x24,0x80,0x0a,0xa0,0x02,0x6c,0x03 }},
+ {16, 0x8b40, 0, {0x9a,0x01,0x26,0x44,0x48,0xb0,0x42,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8b50, 0, {0xc0,0x15,0xa4,0xa0,0x8b,0x02,0x22,0xe0,0x0b,0xb0,0x62,0xac,0x98,0x99,0x00,0x2a }},
+ {16, 0x8b60, 0, {0xc2,0x0b,0x98,0x06,0xe4,0x00,0xbb,0x02,0x2e,0xc0,0x08,0x91,0x42,0x2c,0x10,0xbb }},
+ {16, 0x8b70, 0, {0x00,0x6e,0x80,0x0a,0x80,0x02,0x6c,0x00,0x1b,0x00,0x06,0x40,0x48,0xb8,0x0a,0x70 }},
+ {16, 0x8b80, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0xe7,0x00,0xa1,0x00,0x76,0x78 }},
+ {16, 0x8b90, 0, {0x0f,0xb0,0x03,0xe8,0x10,0xd9,0x00,0x3e,0xd0,0x4b,0x9e,0x13,0xac,0x08,0xb8,0xa0 }},
+ {16, 0x8ba0, 0, {0x7e,0xc6,0x08,0xa8,0x02,0x2c,0x01,0xbb,0x00,0x26,0x30,0x4e,0x20,0x03,0x4c,0x18 }},
+ {16, 0x8bb0, 0, {0x99,0x80,0xb4,0x40,0x4c,0x3a,0x03,0x40,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8bc0, 0, {0xe0,0x01,0xb2,0x00,0xfd,0xc5,0x3b,0xc0,0x4c,0xd0,0x03,0x6a,0x02,0xed,0x06,0x33 }},
+ {16, 0x8bd0, 0, {0xc4,0x0f,0xd0,0x53,0xf8,0x00,0xfc,0x90,0x7f,0xc1,0x0f,0x78,0x03,0xbc,0x04,0xff }},
+ {16, 0x8be0, 0, {0x00,0x37,0x64,0x0c,0xf1,0x03,0xa4,0x00,0xed,0xa1,0x3b,0x40,0x0b,0xf0,0x83,0xb8 }},
+ {16, 0x8bf0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x8c,0x00,0xcb,0x20,0x3e,0x71 }},
+ {16, 0x8c00, 0, {0x0f,0xb3,0x03,0x98,0x02,0xfb,0x02,0x36,0x48,0x0f,0x90,0x03,0xec,0x20,0xf8,0x00 }},
+ {16, 0x8c10, 0, {0x3e,0xcc,0x04,0x84,0x03,0x2c,0x00,0xdb,0x04,0x3c,0x10,0x0f,0xa0,0x03,0xec,0x00 }},
+ {16, 0x8c20, 0, {0x9b,0x00,0x32,0x40,0x0c,0x90,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8c30, 0, {0x88,0x05,0x2c,0x02,0x8b,0x48,0x2e,0xe0,0x0b,0x34,0x03,0x6b,0x00,0x8b,0xf5,0x22 }},
+ {16, 0x8c40, 0, {0xf2,0x0b,0x9c,0x03,0xaf,0x00,0xb8,0x50,0x2e,0xc0,0x08,0xb0,0x02,0x7c,0x00,0x8f }},
+ {16, 0x8c50, 0, {0x00,0x0e,0x5d,0x0b,0x80,0x02,0xf5,0x40,0x83,0x50,0x23,0x54,0x08,0x9c,0x02,0xe6 }},
+ {16, 0x8c60, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x04,0x4c,0x00,0x81,0x81,0x2e,0x40 }},
+ {16, 0x8c70, 0, {0x03,0x2c,0x02,0x04,0x33,0x99,0x00,0x20,0xf0,0x4a,0x28,0x80,0xcc,0x40,0xb0,0x00 }},
+ {16, 0x8c80, 0, {0x26,0x10,0x08,0x20,0x02,0x4c,0x00,0x83,0x00,0x2c,0xc0,0x09,0x20,0x02,0xcc,0x00 }},
+ {16, 0x8c90, 0, {0xa0,0x02,0x28,0x40,0x08,0x08,0x02,0x7a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8ca0, 0, {0x20,0x01,0x0a,0x00,0x85,0x80,0x2d,0xf8,0x0b,0xda,0x02,0xd6,0x40,0x85,0xa0,0x21 }},
+ {16, 0x8cb0, 0, {0xe0,0x0b,0x48,0x06,0x92,0x04,0xb5,0x80,0x2d,0x21,0x08,0x00,0x02,0x4e,0x00,0x87 }},
+ {16, 0x8cc0, 0, {0xa4,0x2d,0x60,0x0b,0x68,0x02,0xde,0xc2,0xad,0x90,0x2b,0x60,0x28,0x58,0x82,0xdc }},
+ {16, 0x8cd0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x4c,0x40,0xc3,0x10,0x2c,0x6c }},
+ {16, 0x8ce0, 0, {0x0f,0x30,0x03,0x86,0xa2,0xf9,0xb0,0xb0,0xe0,0x0f,0x29,0x83,0xce,0x44,0xf3,0x80 }},
+ {16, 0x8cf0, 0, {0x3c,0xac,0x0c,0x30,0x03,0x0c,0x00,0xc3,0x00,0x3c,0xd5,0x0f,0x20,0x03,0xce,0xc1 }},
+ {16, 0x8d00, 0, {0xe0,0x10,0xb8,0x40,0x0c,0x00,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8d10, 0, {0xc0,0x1d,0xbc,0x00,0xeb,0x00,0x3e,0xcc,0x0f,0x32,0x03,0x64,0x08,0xf9,0x00,0x3b }},
+ {16, 0x8d20, 0, {0x90,0x0f,0xf0,0x43,0xe4,0x40,0xfb,0x34,0x3f,0x81,0x07,0xd1,0x03,0xad,0x20,0xeb }},
+ {16, 0x8d30, 0, {0x20,0x7f,0xc4,0x0f,0xe1,0x03,0xfc,0x50,0xcd,0x10,0x35,0x40,0x0f,0xd0,0x03,0xd0 }},
+ {16, 0x8d40, 0, {0x02,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x04,0xfd,0x04,0x3d,0x40 }},
+ {16, 0x8d50, 0, {0x2d,0x30,0x02,0x3c,0x00,0xc9,0x01,0x3e,0xc0,0x4f,0xb8,0x43,0xec,0x10,0xfb,0x00 }},
+ {16, 0x8d60, 0, {0x32,0x40,0x0f,0xa0,0x23,0xec,0x80,0xcb,0x36,0x32,0x80,0x4d,0xa8,0x03,0x2c,0x10 }},
+ {16, 0x8d70, 0, {0xcb,0x00,0x32,0x40,0x0c,0x90,0x03,0x6a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8d80, 0, {0xc8,0x11,0x90,0x08,0xb5,0x00,0x2d,0xc0,0x08,0x50,0x02,0xbc,0x02,0x85,0x04,0x2d }},
+ {16, 0x8d90, 0, {0xc0,0x8e,0x60,0x06,0xd8,0x04,0xb7,0x04,0x21,0x40,0x0b,0x70,0x02,0xfc,0x80,0xaf }},
+ {16, 0x8da0, 0, {0x28,0x21,0xc0,0x0b,0x70,0x02,0x06,0x40,0x87,0x00,0x21,0x50,0x08,0x50,0x02,0x32 }},
+ {16, 0x8db0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x9e,0x20,0xb7,0x80,0x2b,0x70 }},
+ {16, 0x8dc0, 0, {0x08,0xf8,0x06,0x1e,0x00,0x87,0x80,0x2d,0xe0,0x0b,0x70,0x32,0xde,0x04,0x37,0x84 }},
+ {16, 0x8dd0, 0, {0x25,0xe0,0x0b,0x68,0x06,0xde,0x80,0x87,0x80,0x21,0xa1,0x1b,0x68,0x02,0x1e,0x40 }},
+ {16, 0x8de0, 0, {0x9f,0x80,0x20,0x60,0x08,0x58,0x02,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8df0, 0, {0x48,0x14,0xcc,0x20,0xb3,0x00,0x2c,0x80,0x88,0xb4,0x22,0x8d,0x00,0x83,0x90,0x2c }},
+ {16, 0x8e00, 0, {0xc0,0x0a,0x38,0x02,0xce,0x08,0xbb,0x20,0x24,0xd0,0x0b,0xb3,0x02,0xcc,0x00,0xa3 }},
+ {16, 0x8e10, 0, {0x00,0x60,0xd2,0x0b,0x20,0x2a,0x04,0x08,0x93,0x50,0x20,0x40,0x08,0x17,0x0a,0x02 }},
+ {16, 0x8e20, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xba,0x00,0xba,0xa0,0x3f,0x84 }},
+ {16, 0x8e30, 0, {0x1c,0xe0,0x0b,0x38,0x40,0x8e,0x06,0x2e,0x80,0x0b,0xe3,0x03,0xf8,0x80,0xfe,0xe4 }},
+ {16, 0x8e40, 0, {0xb7,0x90,0x0f,0xec,0x02,0xe8,0x00,0x8a,0x00,0xa3,0xa0,0x09,0xe4,0x03,0x2a,0x02 }},
+ {16, 0x8e50, 0, {0xde,0xc0,0xf3,0x80,0x0c,0x6c,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8e60, 0, {0x48,0x01,0xe0,0x00,0xf8,0x40,0x3e,0x00,0x0f,0x84,0x13,0xe0,0x00,0xf8,0x00,0x2e }},
+ {16, 0x8e70, 0, {0x30,0x0a,0x84,0x03,0xe0,0x04,0xf8,0x00,0x3a,0x02,0x0f,0x80,0x13,0xe0,0x00,0xf8 }},
+ {16, 0x8e80, 0, {0x00,0x3e,0x04,0x0d,0x80,0x83,0xe0,0x40,0xe8,0x20,0x3e,0x00,0x2f,0x80,0x03,0xd2 }},
+ {16, 0x8e90, 0, {0x10,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xa4,0x00,0xf9,0x00,0x3c,0x64 }},
+ {16, 0x8ea0, 0, {0x4e,0x90,0x83,0x24,0x80,0xc9,0x00,0x32,0xe0,0x0f,0x10,0x03,0x25,0x00,0xf9,0x00 }},
+ {16, 0x8eb0, 0, {0x32,0x44,0x0f,0x92,0x23,0x64,0x00,0xc1,0x00,0x32,0x40,0x0c,0x90,0x13,0xe4,0x00 }},
+ {16, 0x8ec0, 0, {0xc9,0x00,0x22,0x40,0x0c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8ed0, 0, {0x80,0x04,0x64,0x00,0xb9,0x20,0x2e,0x40,0x48,0x96,0x22,0x25,0x00,0xd9,0xc0,0xa2 }},
+ {16, 0x8ee0, 0, {0x70,0x0b,0x98,0x02,0x24,0x00,0xb9,0x40,0xa2,0x70,0x4b,0x90,0x02,0x24,0x00,0xd9 }},
+ {16, 0x8ef0, 0, {0x00,0xa2,0x40,0x2c,0x94,0x22,0xe4,0x02,0x89,0x00,0xa2,0x40,0x28,0x94,0x13,0x20 }},
+ {16, 0x8f00, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x00,0xb9,0x00,0x2e,0x40 }},
+ {16, 0x8f10, 0, {0x0a,0x90,0x02,0x04,0x00,0x81,0x80,0xa2,0x44,0x0b,0x91,0x02,0x25,0x00,0x19,0x40 }},
+ {16, 0x8f20, 0, {0x62,0x40,0x0b,0xb4,0x02,0x44,0x00,0x89,0x00,0x20,0x40,0x08,0x90,0x82,0xc4,0x01 }},
+ {16, 0x8f30, 0, {0x83,0x02,0x28,0x40,0x48,0x90,0x82,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8f40, 0, {0x00,0x04,0x05,0x80,0xb1,0x00,0x6c,0x51,0x08,0x14,0x1a,0x05,0x00,0x93,0x00,0x20 }},
+ {16, 0x8f50, 0, {0x40,0x8b,0x14,0x02,0x05,0x00,0xb1,0x20,0x20,0x50,0x0b,0x14,0x06,0x04,0x80,0x91 }},
+ {16, 0x8f60, 0, {0x20,0x20,0x40,0x09,0x10,0x02,0xc4,0xa8,0x81,0x00,0x28,0x4a,0x08,0x90,0x4a,0x42 }},
+ {16, 0x8f70, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xf8,0x00,0x3e,0x00 }},
+ {16, 0x8f80, 0, {0x0e,0x80,0x03,0x28,0x01,0xc8,0x50,0x32,0x94,0x8b,0xa0,0x03,0x20,0x00,0xb0,0x50 }},
+ {16, 0x8f90, 0, {0x32,0x80,0x0f,0x80,0x07,0x61,0x51,0xc8,0x50,0x22,0x00,0x0c,0x00,0x03,0xe0,0x84 }},
+ {16, 0x8fa0, 0, {0xc8,0x04,0x3a,0x08,0x0c,0x00,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8fb0, 0, {0x98,0x9d,0xf4,0x40,0xbd,0x41,0x3f,0x50,0x0f,0xf4,0x03,0xf5,0x10,0xfd,0x00,0x3e }},
+ {16, 0x8fc0, 0, {0x40,0x0f,0xd4,0x03,0xf4,0x00,0xff,0x10,0x2f,0x40,0x4f,0xd4,0x40,0xa4,0x48,0xf9 }},
+ {16, 0x8fd0, 0, {0x12,0x3f,0x5a,0x8e,0xd2,0x83,0xf4,0xa8,0xf5,0x2c,0x37,0x4a,0x0f,0xd2,0x83,0xa6 }},
+ {16, 0x8fe0, 0, {0x12,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0x80,0xfd,0x28,0x3f,0x4c }},
+ {16, 0x8ff0, 0, {0x0f,0x50,0x03,0x3c,0x44,0xcd,0x40,0x3f,0xd0,0x0d,0xd0,0x02,0x14,0x01,0xfd,0xa0 }},
+ {16, 0x9000, 0, {0x31,0x40,0x03,0xd0,0x03,0xe7,0x89,0xf9,0x90,0x7e,0x50,0x0c,0x94,0x03,0xe6,0xc0 }},
+ {16, 0x9010, 0, {0xc9,0x10,0x32,0x6d,0x0f,0x91,0x02,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9020, 0, {0x38,0x10,0xe0,0x80,0xb8,0x01,0x2e,0x0c,0x8b,0x84,0x82,0x20,0x42,0x88,0xa0,0x6e }},
+ {16, 0x9030, 0, {0x20,0x08,0x80,0x03,0x60,0x00,0x98,0xe8,0x22,0x00,0x09,0x80,0x02,0xe3,0xc0,0xe8 }},
+ {16, 0x9040, 0, {0xd0,0x2e,0x28,0x08,0x8a,0x23,0xe2,0x84,0xd8,0xa0,0x22,0x3d,0x0b,0xc8,0x02,0xce }},
+ {16, 0x9050, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc5,0xb0,0xb1,0x00,0x2c,0x48 }},
+ {16, 0x9060, 0, {0x0b,0x13,0x02,0x04,0x02,0xb1,0x20,0x2e,0x40,0x88,0x10,0x22,0xc4,0x00,0xb1,0x14 }},
+ {16, 0x9070, 0, {0x24,0x40,0x0b,0x10,0x52,0xc4,0x00,0xb1,0x21,0x2d,0x48,0x0a,0x52,0x02,0xd5,0x00 }},
+ {16, 0x9080, 0, {0xbd,0x00,0xad,0x40,0x0b,0x52,0x02,0xd2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9090, 0, {0x18,0x55,0xa5,0x00,0xb9,0x82,0x2e,0x49,0x8b,0xb0,0x12,0x24,0x10,0x99,0x02,0x2e }},
+ {16, 0x90a0, 0, {0x40,0x08,0xb2,0x00,0x65,0x00,0x99,0x80,0x26,0x44,0x09,0x91,0x02,0xe4,0x09,0xa9 }},
+ {16, 0x90b0, 0, {0x04,0x2e,0x46,0x0a,0xd4,0x02,0xb4,0x00,0xbd,0x40,0x2f,0x40,0x0b,0xd0,0x02,0xc6 }},
+ {16, 0x90c0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe7,0x40,0xf9,0x80,0x2e,0x62 }},
+ {16, 0x90d0, 0, {0x0f,0x9c,0x42,0x24,0x00,0x99,0x01,0x2e,0x68,0x2c,0x92,0x02,0x64,0x00,0xb9,0x40 }},
+ {16, 0x90e0, 0, {0xb6,0x60,0x0f,0x9a,0x03,0xe4,0x00,0xb9,0x00,0x2e,0x70,0x3e,0x99,0x06,0xe4,0x02 }},
+ {16, 0x90f0, 0, {0xf9,0x00,0x3e,0x40,0x0f,0x98,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9100, 0, {0x68,0x01,0xa6,0x00,0xf9,0x00,0x3e,0x40,0x1f,0x12,0xab,0xe4,0x00,0xe9,0x90,0x3e }},
+ {16, 0x9110, 0, {0x49,0x0e,0x98,0x03,0xe4,0x00,0xf1,0x00,0x3a,0x40,0x0d,0x98,0x03,0xe4,0x00,0xf9 }},
+ {16, 0x9120, 0, {0x01,0x3e,0x60,0x05,0x90,0x13,0xe4,0x00,0x59,0x20,0x32,0x40,0x8f,0x91,0x03,0xda }},
+ {16, 0x9130, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x10,0xa0,0x00,0xc8,0x08,0x3e,0x01 }},
+ {16, 0x9140, 0, {0x0f,0x84,0x63,0x00,0x22,0xe8,0x20,0x3e,0x13,0x0f,0x84,0x03,0xe1,0xc0,0xd8,0x4c }},
+ {16, 0x9150, 0, {0x32,0x00,0x0c,0x84,0x43,0xe0,0x00,0xf8,0x00,0x22,0x10,0x0f,0x84,0x03,0x00,0x00 }},
+ {16, 0x9160, 0, {0xc8,0x00,0xb2,0x00,0x0c,0xc0,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9170, 0, {0x28,0x05,0x28,0x00,0x8e,0x00,0x2f,0x86,0x4b,0xe0,0x02,0x39,0x08,0x8e,0x20,0x2d }},
+ {16, 0x9180, 0, {0x90,0x0b,0xed,0x92,0xf8,0x02,0x8e,0xe0,0xa3,0x98,0x08,0xe0,0x02,0xe8,0x08,0xba }},
+ {16, 0x9190, 0, {0x00,0x62,0x80,0x08,0xa0,0x02,0x28,0x00,0x02,0x80,0x02,0x80,0x48,0xe0,0x03,0x4a }},
+ {16, 0x91a0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x05,0x4c,0x00,0x83,0x10,0x2c,0xf0 }},
+ {16, 0x91b0, 0, {0x0a,0x14,0x2a,0x0d,0x1a,0xb3,0x01,0x24,0xd0,0x0b,0xbc,0x32,0xcc,0x08,0x03,0x00 }},
+ {16, 0x91c0, 0, {0x20,0xc8,0x0b,0x30,0x02,0xcc,0x00,0xb3,0x02,0x22,0xc0,0x09,0x30,0x02,0x0c,0x11 }},
+ {16, 0x91d0, 0, {0x83,0x00,0x20,0xc0,0x28,0x20,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x91e0, 0, {0x20,0x01,0x1e,0x01,0x85,0x00,0x2d,0x00,0x0b,0x70,0x02,0x18,0x32,0x86,0x00,0x2d }},
+ {16, 0x91f0, 0, {0xc0,0x0b,0x60,0x16,0xfe,0x04,0x86,0x00,0x27,0xa0,0x8b,0x70,0x42,0xdc,0x80,0xb7 }},
+ {16, 0x9200, 0, {0x80,0x21,0x01,0x08,0xf8,0x0a,0x18,0x00,0x86,0x08,0x20,0xa0,0x08,0xe8,0x0a,0x68 }},
+ {16, 0x9210, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x3e,0x02,0xc6,0x80,0x3d,0xe0 }},
+ {16, 0x9220, 0, {0x0f,0x48,0x03,0x06,0x04,0xf5,0x82,0x35,0xe0,0x0f,0x78,0x03,0xda,0x00,0xd3,0x80 }},
+ {16, 0x9230, 0, {0x31,0x60,0x07,0x78,0x03,0xde,0x20,0xf3,0xb0,0x81,0xe0,0x4f,0x68,0x07,0x0e,0x02 }},
+ {16, 0x9240, 0, {0xcf,0x80,0x31,0xe0,0x0c,0x78,0x13,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9250, 0, {0x08,0x1d,0xad,0xa0,0xf9,0x00,0x3f,0x00,0x0f,0xb0,0x53,0xf8,0x10,0xa9,0x00,0x3e }},
+ {16, 0x9260, 0, {0x00,0x0f,0x80,0x01,0xec,0x00,0xfb,0x02,0x3a,0xc0,0x0c,0xb0,0x03,0xec,0x00,0xfb }},
+ {16, 0x9270, 0, {0x74,0x3c,0x00,0x0f,0x20,0x03,0xe8,0x00,0xfa,0x00,0x3e,0x80,0x0f,0x30,0x03,0xc2 }},
+ {16, 0x9280, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x02,0x8f,0x80,0x35,0xe0 }},
+ {16, 0x9290, 0, {0x8d,0xd9,0x03,0x2e,0xc4,0xf6,0x80,0x32,0xa4,0x0c,0xb8,0x03,0xde,0x00,0xcf,0x90 }},
+ {16, 0x92a0, 0, {0x3c,0xe4,0x0c,0xb8,0x03,0xfe,0x65,0xff,0x80,0x0f,0xec,0x8f,0xf8,0x03,0xfe,0x00 }},
+ {16, 0x92b0, 0, {0xc5,0x80,0x33,0xe0,0x0f,0x68,0x03,0x10,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x92c0, 0, {0xaa,0x11,0x9c,0x80,0x84,0xb0,0x20,0x20,0x29,0x73,0x0a,0x0e,0x82,0xa2,0xa0,0xa2 }},
+ {16, 0x92d0, 0, {0xa0,0x4f,0x3b,0x03,0x87,0x84,0xb2,0x80,0x2c,0xa0,0x0a,0x7d,0x02,0xde,0x80,0xf7 }},
+ {16, 0x92e0, 0, {0x20,0x25,0x06,0x08,0x70,0x02,0xc8,0x40,0x84,0x00,0x35,0x80,0x0b,0x60,0x03,0x6a }},
+ {16, 0x92f0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x10,0x86,0x38,0x27,0xc0 }},
+ {16, 0x9300, 0, {0x49,0x54,0x06,0x54,0x40,0x1d,0x20,0x21,0xca,0x09,0x61,0x40,0xf8,0x80,0xb7,0x20 }},
+ {16, 0x9310, 0, {0x2f,0x00,0x89,0x70,0x12,0xdc,0x81,0xb7,0x04,0x2d,0xc9,0x0a,0x60,0x02,0xcc,0x00 }},
+ {16, 0x9320, 0, {0x8d,0x00,0x2d,0xc0,0x0b,0xf8,0x02,0x04,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9330, 0, {0x60,0x14,0xcd,0x28,0x80,0x00,0x24,0x00,0x09,0xb0,0x22,0x4c,0x02,0xa1,0x01,0x20 }},
+ {16, 0x9340, 0, {0x30,0x1b,0x23,0x02,0xaf,0x20,0xb3,0x08,0x2c,0x80,0x1b,0x30,0x00,0xcc,0x04,0xa3 }},
+ {16, 0x9350, 0, {0x01,0x26,0x30,0x08,0xac,0x22,0xe8,0x02,0x80,0x08,0x2e,0x80,0x4b,0xb4,0x02,0x58 }},
+ {16, 0x9360, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x10,0x8b,0x80,0x36,0xf0 }},
+ {16, 0x9370, 0, {0x2d,0xbc,0x0b,0x6c,0x01,0xda,0x04,0x22,0x40,0x7d,0x94,0x22,0xe4,0x00,0xab,0x44 }},
+ {16, 0x9380, 0, {0x2e,0xc0,0x09,0xb8,0x02,0xfc,0x00,0xbf,0x00,0x3e,0xf0,0xca,0x92,0x02,0xe4,0x02 }},
+ {16, 0x9390, 0, {0xcb,0x00,0x6e,0x40,0x0f,0x84,0x01,0x2e,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x93a0, 0, {0x80,0x00,0xec,0x00,0xfb,0x00,0x3a,0xe0,0x2e,0xbc,0x03,0x98,0x08,0xea,0x40,0x36 }},
+ {16, 0x93b0, 0, {0x43,0x8c,0x90,0x03,0xa4,0x44,0x2a,0x40,0x3e,0x10,0x0e,0xb5,0x83,0xec,0x14,0xfb }},
+ {16, 0x93c0, 0, {0x00,0x26,0x00,0x0e,0x92,0x03,0xe0,0x40,0xfa,0x00,0x16,0x00,0x0f,0x80,0x13,0xe0 }},
+ {16, 0x93d0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xec,0x02,0xfa,0x80,0x3f,0xe2 }},
+ {16, 0x93e0, 0, {0x0f,0xb0,0x0b,0x24,0x00,0xef,0x92,0xbb,0xe0,0x1c,0xd0,0x03,0x74,0x00,0xcf,0x05 }},
+ {16, 0x93f0, 0, {0x3b,0x40,0x0f,0xc8,0x03,0x5c,0x00,0xcf,0x00,0x32,0xc2,0x4d,0xc1,0x23,0x34,0x40 }},
+ {16, 0x9400, 0, {0xcf,0x00,0x17,0x44,0x0c,0xd1,0x83,0x00,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9410, 0, {0x81,0x04,0x6c,0x00,0x8b,0x84,0x2e,0x54,0x0b,0xbc,0x0a,0x29,0x80,0x8b,0x80,0x32 }},
+ {16, 0x9420, 0, {0x00,0x08,0x9c,0x03,0xa7,0x00,0xab,0x84,0x2e,0x7c,0x0b,0x80,0x02,0x2c,0x10,0xdb }},
+ {16, 0x9430, 0, {0x01,0x36,0x00,0x08,0x80,0x02,0x20,0x00,0x82,0x00,0x22,0x00,0x08,0x90,0x02,0x24 }},
+ {16, 0x9440, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x0c,0x00,0x89,0x10,0x66,0x90 }},
+ {16, 0x9450, 0, {0x0b,0xb8,0x02,0x6e,0x12,0xa3,0x41,0x20,0x04,0x0a,0x98,0x22,0xe2,0x00,0x89,0x19 }},
+ {16, 0x9460, 0, {0x2e,0xc0,0x4b,0x31,0x22,0x6c,0x08,0x83,0x00,0x22,0xc0,0x09,0x90,0x02,0x24,0x00 }},
+ {16, 0x9470, 0, {0x89,0x00,0x2a,0x40,0x08,0x80,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9480, 0, {0x08,0x10,0x0c,0x00,0x80,0x20,0x2c,0x0e,0x1b,0x30,0x02,0x04,0x41,0x80,0x20,0x20 }},
+ {16, 0x9490, 0, {0x12,0x18,0x16,0x42,0x00,0x50,0xa0,0x40,0x2c,0x88,0x1b,0x30,0x02,0x0c,0x81,0x93 }},
+ {16, 0x94a0, 0, {0x00,0x24,0x00,0x08,0x10,0x2a,0x00,0x0a,0x88,0x00,0x28,0x00,0x28,0x00,0x0a,0x02 }},
+ {16, 0x94b0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x7c,0x11,0xe8,0x00,0x26,0x98 }},
+ {16, 0x94c0, 0, {0x0f,0xb0,0x13,0x21,0x0c,0xeb,0x60,0x3a,0xd8,0x28,0x84,0xa2,0xe1,0x80,0xc8,0x20 }},
+ {16, 0x94d0, 0, {0x3e,0x5e,0x1f,0x82,0x03,0x7c,0x00,0xcf,0x00,0x32,0xc0,0x4d,0x80,0x07,0x25,0x00 }},
+ {16, 0x94e0, 0, {0xc9,0x00,0x32,0x40,0x0c,0x90,0x03,0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x94f0, 0, {0xa1,0x11,0xfc,0x00,0xf8,0x13,0x1e,0x00,0x0b,0xf0,0x01,0xf0,0xd0,0xf9,0x19,0x1f }},
+ {16, 0x9500, 0, {0x08,0x4f,0xc0,0x13,0xa1,0x00,0xf8,0x62,0x3f,0xc0,0x0b,0xc4,0x07,0xed,0x00,0xff }},
+ {16, 0x9510, 0, {0x00,0x3f,0x00,0x0f,0xc0,0x23,0xf0,0xa0,0xfc,0x00,0x33,0x00,0x0f,0xd0,0x03,0xe8 }},
+ {16, 0x9520, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xff,0x0c,0x3f,0x20 }},
+ {16, 0x9530, 0, {0x0c,0xc9,0x03,0x32,0x00,0xcf,0x38,0x3f,0xd0,0x0f,0x48,0x03,0xfc,0xa0,0xce,0x22 }},
+ {16, 0x9540, 0, {0x33,0x00,0x0f,0xc1,0x03,0x3c,0x00,0xff,0x00,0x3d,0xc4,0x4c,0xc0,0x23,0x8c,0xe4 }},
+ {16, 0x9550, 0, {0xff,0x10,0x37,0x20,0x08,0xf1,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9560, 0, {0x80,0x10,0xfe,0x00,0xbf,0x80,0x2e,0x74,0x05,0x22,0x02,0xa2,0x10,0xdf,0x61,0x2f }},
+ {16, 0x9570, 0, {0xd0,0x8b,0x90,0x02,0x3d,0xa4,0xaa,0x90,0x22,0xf4,0x0b,0x07,0x12,0x1d,0x20,0xbb }},
+ {16, 0x9580, 0, {0xc0,0x2f,0xd8,0x88,0x97,0x82,0xfd,0x80,0xef,0x72,0x22,0x08,0x28,0xf6,0x23,0xe0 }},
+ {16, 0x9590, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x40,0xb3,0x00,0x2c,0x00 }},
+ {16, 0x95a0, 0, {0x08,0x82,0x02,0x22,0x00,0x83,0x01,0x08,0xcc,0x8b,0x20,0x82,0xcc,0x00,0x90,0x00 }},
+ {16, 0x95b0, 0, {0x20,0x00,0x4b,0x12,0x02,0x0d,0x80,0xb3,0x40,0x2c,0xd8,0x08,0x20,0x42,0x8c,0x80 }},
+ {16, 0x95c0, 0, {0xb3,0x20,0x26,0x02,0x18,0x33,0x26,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x95d0, 0, {0xc0,0x15,0xac,0x09,0xbb,0x00,0x2e,0x60,0x08,0x80,0x02,0xa2,0x00,0x9b,0x00,0x2e }},
+ {16, 0x95e0, 0, {0xc0,0x0b,0xac,0x02,0x2c,0x00,0xba,0x06,0x22,0xc2,0x0b,0x94,0x02,0xac,0x10,0xbb }},
+ {16, 0x95f0, 0, {0x00,0x2e,0xc1,0x08,0xa8,0x02,0xec,0x00,0xab,0x00,0x22,0x00,0x08,0xb0,0x06,0xf0 }},
+ {16, 0x9600, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x15,0xec,0x00,0xfb,0x04,0x3e,0x60 }},
+ {16, 0x9610, 0, {0x28,0x82,0x13,0x0e,0x08,0xcb,0x00,0x3a,0xc0,0x0f,0x8c,0x03,0xec,0x11,0xdb,0x20 }},
+ {16, 0x9620, 0, {0xb2,0x90,0x4b,0xa8,0x0b,0x2c,0x00,0xbb,0x00,0x2c,0xc0,0x0c,0x88,0x13,0xac,0x00 }},
+ {16, 0x9630, 0, {0xf3,0x00,0x36,0x06,0x48,0xb0,0x12,0xc4,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9640, 0, {0xe0,0x01,0xbc,0x00,0xfb,0x08,0x3d,0x40,0x8f,0xea,0x01,0xf4,0x00,0xff,0x01,0x2f }},
+ {16, 0x9650, 0, {0xc0,0x0f,0xd0,0x22,0xfc,0x04,0xaf,0x00,0x3f,0xc0,0x8f,0xe9,0x03,0x7c,0x00,0xff }},
+ {16, 0x9660, 0, {0x00,0x3f,0xc0,0x0f,0x90,0x43,0xfc,0x20,0xef,0x02,0x3f,0x00,0x8f,0xf0,0x03,0xb8 }},
+ {16, 0x9670, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x10,0xac,0x08,0xeb,0x00,0x12,0x40 }},
+ {16, 0x9680, 0, {0x0f,0x90,0x03,0x28,0x20,0xab,0x00,0x3a,0xc0,0x8f,0x85,0x83,0xac,0x10,0xf3,0x50 }},
+ {16, 0x9690, 0, {0x32,0x90,0x4c,0x34,0x13,0x6c,0x00,0xfb,0x00,0x3e,0xc0,0x0c,0x98,0x03,0x2c,0x40 }},
+ {16, 0x96a0, 0, {0xeb,0x80,0x32,0x12,0x0d,0xb0,0x0b,0x50,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x96b0, 0, {0x88,0x01,0x3c,0x10,0x0f,0x05,0xa2,0x50,0x0c,0x10,0x02,0x22,0x10,0x8f,0x00,0x23 }},
+ {16, 0x96c0, 0, {0xc0,0x0b,0x88,0x12,0x3c,0x00,0x9b,0x82,0x22,0xc0,0x08,0xb0,0x02,0x3c,0x00,0x8f }},
+ {16, 0x96d0, 0, {0xa0,0x2f,0xc0,0x08,0xb0,0x02,0x3c,0x08,0x8f,0x02,0x20,0x00,0x08,0xf0,0x03,0x26 }},
+ {16, 0x96e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4d,0x20,0x93,0x00,0x20,0xb2 }},
+ {16, 0x96f0, 0, {0x0b,0x10,0x02,0x01,0x00,0xa3,0x00,0x68,0xc0,0x0b,0x84,0x02,0xac,0x00,0xb3,0x80 }},
+ {16, 0x9700, 0, {0x20,0x40,0x0a,0x30,0x02,0x4c,0x00,0xa3,0x04,0x2c,0xc0,0x08,0x00,0x02,0x0d,0x00 }},
+ {16, 0x9710, 0, {0xa3,0x00,0x20,0x24,0x08,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9720, 0, {0x70,0x01,0x1c,0x20,0x97,0x80,0x23,0x60,0x08,0x78,0x12,0x3a,0x00,0x83,0x91,0x29 }},
+ {16, 0x9730, 0, {0xe4,0x0b,0x59,0x02,0x1e,0x00,0x97,0x90,0x20,0xfc,0x0a,0x78,0x02,0x1e,0x00,0x87 }},
+ {16, 0x9740, 0, {0x90,0x2d,0xe0,0x19,0x59,0x02,0x1e,0x80,0x83,0x80,0x61,0xa0,0x08,0x78,0x02,0x18 }},
+ {16, 0x9750, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x40,0xd3,0x32,0x30,0x06 }},
+ {16, 0x9760, 0, {0x0f,0x30,0x03,0x04,0x64,0xe3,0x01,0x38,0xc4,0x1f,0x30,0x07,0x8c,0x18,0xf1,0x00 }},
+ {16, 0x9770, 0, {0x30,0x4c,0x0e,0x30,0x03,0x4c,0x00,0xe3,0x00,0x2c,0xc0,0x0c,0x20,0x03,0x0e,0x00 }},
+ {16, 0x9780, 0, {0xe3,0x00,0x32,0x08,0x0c,0xb1,0x03,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9790, 0, {0x40,0x1d,0x9c,0x80,0xef,0x10,0x3d,0x44,0x4f,0xf1,0x07,0xcc,0x00,0xff,0x08,0x36 }},
+ {16, 0x97a0, 0, {0xc6,0xcf,0xb0,0x03,0xfc,0x00,0x97,0x00,0xbe,0xcc,0x0d,0xb1,0x03,0xfd,0x04,0xff }},
+ {16, 0x97b0, 0, {0x0c,0x3f,0xd2,0x9e,0xe0,0x4b,0xfd,0x20,0xff,0x02,0x3f,0x80,0x0e,0xf0,0x13,0xd0 }},
+ {16, 0x97c0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xec,0xc0,0xcb,0x28,0x3e,0xc0 }},
+ {16, 0x97d0, 0, {0x0f,0x80,0x03,0xec,0x00,0xfb,0x01,0x32,0xe9,0x0c,0x28,0x03,0x2c,0x00,0xfb,0x00 }},
+ {16, 0x97e0, 0, {0x32,0xc0,0x0c,0xb4,0x83,0x2c,0x01,0xef,0x00,0xb2,0xc8,0x0c,0x20,0x03,0x6d,0x00 }},
+ {16, 0x97f0, 0, {0xcb,0x10,0x3e,0x00,0x0f,0xb2,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9800, 0, {0xc8,0x91,0x9c,0xc4,0x87,0x60,0x2d,0xc0,0x0b,0x60,0x02,0xdc,0x00,0xb7,0x12,0x20 }},
+ {16, 0x9810, 0, {0xcc,0x0a,0x70,0x02,0x1c,0xc0,0xb3,0x00,0xa0,0xc0,0xc8,0x70,0x22,0x1c,0x80,0xb7 }},
+ {16, 0x9820, 0, {0x24,0x21,0xc8,0x48,0x50,0x02,0x0c,0x80,0x87,0x10,0x2d,0x40,0x0b,0x72,0x82,0xf2 }},
+ {16, 0x9830, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x8e,0x02,0x87,0x80,0x2d,0xe0 }},
+ {16, 0x9840, 0, {0x0b,0x78,0x12,0xde,0x00,0xb7,0xa0,0x21,0xe0,0x08,0xf8,0x8e,0x1e,0x40,0xb7,0x88 }},
+ {16, 0x9850, 0, {0x21,0xe0,0x08,0x38,0x02,0x1e,0x40,0xb3,0xa1,0x20,0xe8,0x48,0xf8,0x82,0x5e,0x02 }},
+ {16, 0x9860, 0, {0x87,0x80,0x2d,0x22,0x0b,0x79,0x02,0xe0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9870, 0, {0x08,0x04,0xcc,0x04,0x83,0x02,0x2c,0xd4,0x0b,0x30,0x02,0xcc,0x00,0xb3,0x00,0xa0 }},
+ {16, 0x9880, 0, {0xc0,0x8a,0x38,0x06,0x0c,0x00,0xb3,0x80,0x20,0xe1,0x48,0x39,0x12,0x2c,0x00,0xb3 }},
+ {16, 0x9890, 0, {0x00,0x22,0xc0,0x08,0xb0,0x82,0x6c,0x00,0x83,0x00,0x2c,0x48,0x0b,0x30,0x02,0xc2 }},
+ {16, 0x98a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0xa8,0x00,0xca,0x00,0x3f,0xa0 }},
+ {16, 0x98b0, 0, {0x0f,0xe4,0x03,0xd8,0x00,0xfa,0x00,0x32,0x80,0x0c,0xe8,0x03,0x28,0x00,0xfa,0x40 }},
+ {16, 0x98c0, 0, {0x32,0xa8,0x2c,0xa0,0x09,0x28,0x08,0xf2,0x00,0x32,0x80,0x0c,0xe4,0x03,0x68,0x00 }},
+ {16, 0x98d0, 0, {0xca,0x00,0x3f,0x80,0x0f,0xa0,0x03,0xfb,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x98e0, 0, {0x48,0x00,0xc0,0x00,0xf8,0x01,0x3e,0x12,0x0b,0x80,0x03,0xe0,0x40,0xf8,0x00,0x3e }},
+ {16, 0x98f0, 0, {0x00,0x4f,0x84,0x03,0xe0,0x04,0xf0,0x08,0x3e,0x00,0x4f,0x00,0x03,0xe0,0x00,0xf8 }},
+ {16, 0x9900, 0, {0x41,0x3e,0x00,0x2f,0x84,0x03,0xa0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0x9910, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xe6,0x00,0xc9,0x12,0x3e,0x50 }},
+ {16, 0x9920, 0, {0x8f,0x90,0x83,0xe4,0x20,0xc1,0x00,0x3a,0x41,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x00 }},
+ {16, 0x9930, 0, {0x30,0x68,0x0c,0x90,0x03,0x24,0x00,0xd9,0x00,0x3a,0x40,0x0e,0x98,0x03,0x24,0x00 }},
+ {16, 0x9940, 0, {0xc9,0x90,0x3e,0x69,0x0c,0x10,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9950, 0, {0x80,0x04,0x67,0x4a,0x89,0x80,0x2e,0x50,0x0b,0x90,0x02,0xe4,0x80,0xa9,0x00,0x22 }},
+ {16, 0x9960, 0, {0x40,0x0b,0x90,0x02,0xe4,0x00,0xb9,0x01,0x22,0x40,0x08,0x90,0x02,0x24,0x10,0x89 }},
+ {16, 0x9970, 0, {0x00,0x22,0x40,0x08,0x93,0x02,0x24,0x22,0x89,0x42,0x2c,0x60,0x48,0x90,0x02,0x20 }},
+ {16, 0x9980, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0x24,0x00,0x99,0x00,0x2e,0x40 }},
+ {16, 0x9990, 0, {0x0b,0x90,0x02,0xe4,0x00,0x89,0x00,0x2a,0x40,0x0b,0x90,0x02,0xe4,0x00,0xb9,0x00 }},
+ {16, 0x99a0, 0, {0x23,0x40,0x08,0xd0,0x02,0x24,0x00,0x99,0x00,0x2a,0x40,0x0a,0x90,0x06,0x24,0x40 }},
+ {16, 0x99b0, 0, {0x89,0x41,0x2e,0x40,0x08,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x99c0, 0, {0x08,0x04,0x0c,0x80,0x91,0x20,0x2c,0x48,0x0b,0x10,0x02,0xc4,0x00,0xa1,0x20,0x20 }},
+ {16, 0x99d0, 0, {0x48,0x0b,0x10,0x02,0xc4,0x80,0xb1,0x20,0xa1,0x49,0x08,0x52,0x4a,0x04,0x80,0x81 }},
+ {16, 0x99e0, 0, {0x00,0x20,0x48,0x48,0x12,0x0a,0x04,0x80,0x81,0x20,0x2c,0x40,0x28,0x12,0x02,0x02 }},
+ {16, 0x99f0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x08,0xd8,0x04,0x3e,0x80 }},
+ {16, 0x9a00, 0, {0x0f,0x85,0x03,0xe0,0x00,0xc0,0x50,0x3a,0x14,0x0f,0xa5,0x03,0xe1,0x40,0xf8,0x02 }},
+ {16, 0x9a10, 0, {0x32,0x80,0x2c,0xc5,0x03,0x21,0x40,0xda,0x00,0x3a,0x14,0x0e,0x85,0x43,0x21,0x40 }},
+ {16, 0x9a20, 0, {0xc8,0x52,0x3e,0x14,0x0c,0x85,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9a30, 0, {0x88,0x1d,0xe4,0x44,0xe9,0x10,0x3f,0x44,0x4f,0xd0,0x02,0xfc,0x00,0xf9,0x12,0x3e }},
+ {16, 0x9a40, 0, {0x44,0x0f,0xd0,0x03,0xe4,0x40,0xfd,0x10,0x3e,0x44,0x4f,0x91,0x03,0xe4,0x40,0xe9 }},
+ {16, 0x9a50, 0, {0x40,0x3e,0x44,0x0f,0xd1,0x03,0xe4,0x40,0xf9,0x12,0x3f,0x40,0x0f,0x91,0x03,0xe6 }},
+ {16, 0x9a60, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xf6,0xa0,0xfd,0x80,0xb3,0x40 }},
+ {16, 0x9a70, 0, {0x0c,0x10,0x03,0x14,0x00,0xfd,0xa0,0x32,0x40,0x0f,0xd1,0x03,0xe4,0x00,0xf5,0x86 }},
+ {16, 0x9a80, 0, {0x33,0x60,0x2c,0x9a,0x83,0x24,0x04,0xfd,0xa8,0x22,0x40,0x0d,0x50,0x43,0xf4,0x00 }},
+ {16, 0x9a90, 0, {0xfd,0x00,0x33,0x40,0x0f,0x90,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9aa0, 0, {0x78,0x10,0xe1,0x00,0xb8,0x00,0x22,0x00,0x28,0x80,0x02,0x20,0x00,0xb8,0x00,0xa2 }},
+ {16, 0x9ab0, 0, {0x00,0x0b,0x8a,0x12,0xe0,0x00,0xb8,0x04,0x22,0x14,0x08,0x84,0x02,0x20,0x00,0xb8 }},
+ {16, 0x9ac0, 0, {0x40,0x20,0x00,0x88,0x80,0x02,0xe0,0x00,0xb8,0x00,0xa2,0x00,0x0b,0x80,0x02,0x0e }},
+ {16, 0x9ad0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc4,0x00,0xb1,0x42,0x20,0x40 }},
+ {16, 0x9ae0, 0, {0x08,0x10,0x02,0x04,0x00,0xb1,0x40,0x20,0x40,0x0b,0x10,0x06,0xc4,0x00,0xb1,0x40 }},
+ {16, 0x9af0, 0, {0x24,0x40,0x08,0x10,0x02,0x44,0x04,0xb1,0x00,0x60,0x40,0x09,0x10,0x02,0xc4,0x00 }},
+ {16, 0x9b00, 0, {0xb1,0x00,0x20,0x40,0x0b,0x10,0x02,0x12,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9b10, 0, {0x18,0x15,0xa4,0x00,0xb9,0x02,0x22,0x60,0x08,0x94,0x02,0x24,0x00,0xb9,0x01,0x22 }},
+ {16, 0x9b20, 0, {0x40,0x0b,0x90,0x06,0xe4,0x00,0xb9,0x20,0x26,0x40,0x08,0x94,0x02,0x64,0x08,0xb9 }},
+ {16, 0x9b30, 0, {0x00,0x22,0x40,0x08,0x92,0x02,0xec,0x08,0xb9,0x04,0x22,0x41,0x0b,0x10,0x02,0x06 }},
+ {16, 0x9b40, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x10,0xf1,0x00,0x32,0x60 }},
+ {16, 0x9b50, 0, {0x0c,0x94,0x0b,0x25,0x00,0xf9,0x00,0x32,0x40,0x8f,0x94,0xd3,0xe4,0x00,0xf9,0x00 }},
+ {16, 0x9b60, 0, {0x36,0x40,0x4c,0x90,0x0b,0x64,0x00,0xf1,0x00,0x32,0x40,0x0d,0x92,0x12,0xe4,0x00 }},
+ {16, 0x9b70, 0, {0xf9,0x00,0x32,0x40,0x0f,0x90,0x0b,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9b80, 0, {0x68,0x41,0xa4,0x00,0xf9,0x00,0x3c,0x40,0x8f,0x92,0x03,0xe4,0x00,0xf9,0x00,0x3e }},
+ {16, 0x9b90, 0, {0x40,0x0f,0x9c,0x03,0xe4,0x00,0xf9,0x00,0xba,0x40,0x2f,0x90,0x23,0xa4,0x00,0xf9 }},
+ {16, 0x9ba0, 0, {0x08,0xbe,0x40,0xcf,0x90,0x03,0xe4,0x10,0xf1,0x01,0x3e,0x41,0x0f,0x90,0x03,0xda }},
+ {16, 0x9bb0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0xc8,0xf8,0x00,0x3e,0x03 }},
+ {16, 0x9bc0, 0, {0x0c,0x84,0x03,0xa1,0x10,0xe8,0x00,0x32,0x00,0x8c,0x85,0x83,0xe0,0x00,0xc0,0x00 }},
+ {16, 0x9bd0, 0, {0x38,0x0c,0x2c,0x00,0x03,0x60,0x00,0xc8,0x00,0x3c,0x00,0x0d,0x80,0x02,0x20,0x10 }},
+ {16, 0x9be0, 0, {0xc8,0x20,0xb2,0x02,0x0f,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9bf0, 0, {0x28,0x05,0x39,0x10,0xbe,0x04,0x6f,0xa0,0x08,0xa0,0x02,0x3a,0x00,0x82,0x00,0xa2 }},
+ {16, 0x9c00, 0, {0x80,0x8d,0xec,0x03,0xa8,0x00,0x8a,0x00,0x23,0x80,0x08,0xa0,0x22,0x28,0x00,0x8e }},
+ {16, 0x9c10, 0, {0xcc,0x2f,0x80,0x08,0xe8,0xc2,0xb8,0x00,0x8e,0x60,0x23,0x90,0x0b,0xa0,0x02,0xca }},
+ {16, 0x9c20, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4e,0x08,0xb0,0x72,0x2c,0xd0 }},
+ {16, 0x9c30, 0, {0x28,0xb0,0x06,0x8c,0x01,0xa1,0x02,0x20,0xc0,0x08,0x38,0x02,0xcc,0x00,0x83,0x00 }},
+ {16, 0x9c40, 0, {0x20,0xc0,0x29,0x30,0x02,0x4c,0x00,0x81,0x00,0x2c,0xc0,0x08,0x32,0x02,0x0c,0x40 }},
+ {16, 0x9c50, 0, {0x83,0x00,0x20,0xf4,0x0b,0x30,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9c60, 0, {0xa0,0x01,0x1c,0x00,0xb4,0x00,0x2d,0xd0,0x48,0xf2,0x02,0x1e,0x21,0x85,0x20,0x20 }},
+ {16, 0x9c70, 0, {0xe8,0x09,0x72,0x02,0x8e,0x80,0x8f,0x01,0x20,0xc0,0x09,0x72,0x02,0x0e,0x80,0x87 }},
+ {16, 0x9c80, 0, {0x00,0x2d,0xcc,0x18,0x58,0x02,0x8e,0x00,0x85,0x00,0x21,0xc0,0x0b,0x72,0x02,0xe8 }},
+ {16, 0x9c90, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xb4,0x80,0x2d,0xe0 }},
+ {16, 0x9ca0, 0, {0x0c,0x78,0x83,0x9a,0x00,0xed,0xd0,0x31,0xf4,0x0c,0x6a,0x03,0xde,0x82,0xc7,0x80 }},
+ {16, 0x9cb0, 0, {0x39,0xe0,0x0d,0xf8,0x83,0x5e,0xc2,0xc5,0x80,0x3d,0xe8,0x0c,0x68,0x03,0x12,0x00 }},
+ {16, 0x9cc0, 0, {0xcf,0x80,0x31,0xe0,0x0f,0x7e,0x83,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9cd0, 0, {0x08,0x0d,0xac,0x08,0xf8,0x00,0x3c,0xc0,0x0f,0xb3,0x03,0xec,0x00,0xf9,0x02,0x3e }},
+ {16, 0x9ce0, 0, {0xc8,0x0f,0xb0,0x03,0xed,0x40,0xfb,0x00,0xbe,0x80,0x0e,0xb3,0x03,0xed,0xc0,0xfb }},
+ {16, 0x9cf0, 0, {0x00,0x3e,0xd2,0x2e,0x80,0x03,0xec,0x02,0xf9,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0x9d00, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfe,0x00,0xf0,0x91,0x33,0xe0 }},
+ {16, 0x9d10, 0, {0x8f,0xf8,0x03,0xfe,0x00,0xfd,0x80,0x3f,0xe0,0x0c,0x78,0x83,0x3f,0x00,0xcf,0x80 }},
+ {16, 0x9d20, 0, {0x3f,0xa0,0x0c,0xf8,0x03,0x3e,0x00,0xcd,0x80,0x3f,0xe0,0x0f,0xf8,0x13,0xfe,0x10 }},
+ {16, 0x9d30, 0, {0xff,0x80,0x3f,0x20,0x0f,0xf9,0x43,0xd0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9d40, 0, {0xa8,0x11,0x9c,0x00,0xb4,0xc1,0x31,0xc0,0x0b,0x70,0x02,0xd4,0x10,0xe5,0x20,0x2f }},
+ {16, 0x9d50, 0, {0xc8,0x0f,0x40,0x03,0x5c,0x00,0x87,0x00,0x2d,0x80,0x08,0x70,0x02,0x1c,0x40,0x87 }},
+ {16, 0x9d60, 0, {0x10,0x2d,0xc0,0x0b,0x76,0x02,0xdc,0x80,0xb7,0x00,0x2d,0xc0,0x0b,0x70,0x02,0xea }},
+ {16, 0x9d70, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x9c,0x00,0xb6,0x22,0x21,0xd0 }},
+ {16, 0x9d80, 0, {0x0b,0x70,0x82,0xd8,0x40,0xb5,0x02,0x2d,0xc0,0x88,0x65,0x02,0x0c,0x00,0x87,0x18 }},
+ {16, 0x9d90, 0, {0x2c,0x04,0x08,0x30,0x02,0x8c,0x02,0x85,0x00,0x2d,0xc0,0x0b,0x70,0x46,0x90,0x10 }},
+ {16, 0x9da0, 0, {0xb6,0x00,0x2d,0x00,0x0b,0x70,0x22,0xc4,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9db0, 0, {0x60,0x14,0xcc,0x08,0xb2,0x00,0xa4,0xc0,0x0b,0x30,0x42,0xc6,0x10,0xa1,0x00,0x2c }},
+ {16, 0x9dc0, 0, {0xc0,0x0a,0x00,0x02,0x4c,0x00,0x83,0x00,0x2c,0x08,0x08,0x30,0x02,0x8c,0x00,0x83 }},
+ {16, 0x9dd0, 0, {0x00,0x2c,0xc0,0x0b,0x18,0x82,0xc4,0x00,0xb0,0x00,0x2c,0x40,0x0b,0x30,0x12,0xd8 }},
+ {16, 0x9de0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x15,0xac,0x00,0x38,0x00,0x32,0x50 }},
+ {16, 0x9df0, 0, {0x0f,0xf0,0x03,0xe6,0x20,0xfd,0x00,0x3f,0xc0,0x08,0xd0,0x02,0x3c,0x02,0xcb,0x80 }},
+ {16, 0x9e00, 0, {0x3c,0x50,0x2c,0xf0,0x0a,0xbc,0x00,0xc9,0x00,0x3f,0xc0,0x0f,0xbe,0x03,0xac,0x00 }},
+ {16, 0x9e10, 0, {0xfa,0x02,0x2e,0xf7,0x4f,0xf0,0x03,0xee,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9e20, 0, {0x80,0x00,0xec,0x00,0xf1,0x00,0x3a,0xf0,0x0f,0xb0,0x03,0xe9,0x00,0xf9,0x01,0x3e }},
+ {16, 0x9e30, 0, {0xc0,0x0f,0x90,0x13,0xec,0x00,0xf9,0x00,0x3e,0x55,0x0f,0xb0,0x01,0x6c,0x00,0xfb }},
+ {16, 0x9e40, 0, {0x02,0x3e,0xc0,0x0f,0x90,0x73,0xe0,0x00,0xf8,0x41,0x3e,0x00,0x0f,0x30,0x01,0xe0 }},
+ {16, 0x9e50, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xfc,0x00,0xfc,0x00,0x33,0xc0 }},
+ {16, 0x9e60, 0, {0x1f,0xf0,0x13,0xf0,0x08,0xfd,0x02,0x3f,0xc0,0x8d,0xc0,0x03,0x3c,0x00,0xcf,0xa0 }},
+ {16, 0x9e70, 0, {0x3f,0x80,0x0c,0x70,0x03,0x3c,0x10,0xfc,0x00,0x37,0xc0,0x0f,0xe0,0x03,0xb0,0x00 }},
+ {16, 0x9e80, 0, {0xfe,0x00,0x3f,0xc0,0x0c,0xf0,0x03,0x04,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9e90, 0, {0x84,0x04,0x6e,0x00,0xb9,0xc2,0xa2,0xf0,0x0b,0xb0,0x42,0xeb,0x00,0xb9,0x00,0x2e }},
+ {16, 0x9ea0, 0, {0xc0,0x0f,0x18,0x03,0x6c,0x00,0xd9,0x81,0x2e,0xb0,0x0a,0xb0,0x42,0x2c,0x00,0xba }},
+ {16, 0x9eb0, 0, {0xc6,0x2e,0xc0,0x0b,0x8c,0x02,0xe3,0x00,0xb8,0xc0,0x3c,0xa0,0x0d,0xb0,0x02,0x20 }},
+ {16, 0x9ec0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2f,0x00,0xb8,0x80,0x22,0xe2 }},
+ {16, 0x9ed0, 0, {0x0b,0xb0,0x02,0xe6,0x20,0xb9,0x00,0x2c,0xc0,0x08,0xb8,0x02,0x0c,0x00,0x8b,0x00 }},
+ {16, 0x9ee0, 0, {0x2e,0x30,0x48,0xb0,0x02,0x2c,0x00,0xb9,0xc0,0x2e,0xc1,0x0b,0x88,0x02,0xee,0x10 }},
+ {16, 0x9ef0, 0, {0xb9,0xc0,0x2e,0x20,0x19,0xb0,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9f00, 0, {0x08,0x04,0x0c,0x00,0xb0,0x00,0x20,0xc0,0x0b,0x30,0x06,0xc0,0x00,0x91,0x00,0x2c }},
+ {16, 0x9f10, 0, {0xc0,0x49,0x80,0x02,0x4c,0x04,0x91,0x00,0x2c,0x00,0x8a,0x30,0x0a,0x0c,0x04,0xb1 }},
+ {16, 0x9f20, 0, {0x00,0x2c,0xc0,0x1b,0x00,0x12,0x49,0x10,0xb1,0x00,0x2e,0x20,0x09,0x30,0x02,0x02 }},
+ {16, 0x9f30, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xb8,0x20,0x22,0xc0 }},
+ {16, 0x9f40, 0, {0x8b,0xf0,0x03,0xe0,0x08,0xfd,0x00,0x3f,0xc0,0x0c,0xa0,0x03,0x3c,0x00,0xcb,0x00 }},
+ {16, 0x9f50, 0, {0x3e,0x00,0x4c,0xf0,0x0a,0x3c,0x00,0xb9,0x00,0x37,0xc1,0x0f,0xa0,0x03,0xe0,0x00 }},
+ {16, 0x9f60, 0, {0xfa,0x00,0x3e,0x00,0x0d,0xf0,0x0b,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9f70, 0, {0xa0,0x1d,0xf0,0x01,0xfc,0x40,0x3f,0x80,0x4f,0xf0,0x02,0xf0,0x00,0xfd,0x00,0x3f }},
+ {16, 0x9f80, 0, {0xc1,0x0f,0xc0,0x03,0xfc,0x00,0xfd,0x00,0x3f,0x00,0x4f,0xf0,0x63,0xfc,0x00,0xfd }},
+ {16, 0x9f90, 0, {0x04,0x3f,0xc0,0x0f,0xc0,0x03,0xf0,0x80,0xfc,0x00,0x7b,0x00,0x0f,0xf0,0x43,0xe8 }},
+ {16, 0x9fa0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf8,0x00,0xc8,0x10,0x33,0x04 }},
+ {16, 0x9fb0, 0, {0x0c,0x40,0x02,0x34,0x00,0xc8,0x85,0x1f,0xc0,0x2d,0xd9,0x03,0xfc,0xc0,0xdb,0x28 }},
+ {16, 0x9fc0, 0, {0x37,0x64,0x0f,0xdb,0x03,0x3e,0x00,0xff,0x25,0x3f,0xc8,0x0e,0xf2,0x03,0xfe,0x20 }},
+ {16, 0x9fd0, 0, {0xff,0xa4,0x37,0xc4,0x0c,0xc8,0x03,0x30,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9fe0, 0, {0x80,0x10,0xe8,0x00,0x88,0x20,0x22,0x00,0x08,0x88,0x12,0x26,0x04,0x89,0x82,0x2e }},
+ {16, 0x9ff0, 0, {0xf4,0x48,0xb8,0x02,0xfc,0xc4,0x98,0xc2,0x22,0x7c,0x4b,0x9d,0x42,0x26,0x08,0xbf }},
+ {16, 0xa000, 0, {0x18,0x77,0xe4,0x08,0xf1,0x82,0xef,0x00,0xbb,0xd0,0x22,0xd8,0x08,0x90,0x83,0x60 }},
+ {16, 0xa010, 0, {0x02,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x45,0xc8,0x04,0xa0,0x00,0x24,0x00 }},
+ {16, 0xa020, 0, {0x0a,0x00,0x02,0x0c,0x00,0x82,0x04,0x2c,0xe0,0x08,0x10,0x02,0xcc,0x80,0x83,0x00 }},
+ {16, 0xa030, 0, {0x24,0x00,0x0b,0x10,0x06,0xc8,0x01,0xb3,0x20,0x2c,0xc0,0x29,0x32,0x02,0xc8,0x08 }},
+ {16, 0xa040, 0, {0xb1,0x00,0x24,0xd0,0x08,0x82,0x02,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa050, 0, {0xc0,0x15,0xa8,0x00,0xa8,0x0c,0x26,0x00,0x0a,0x80,0x02,0x2c,0x14,0x8a,0x02,0x6e }},
+ {16, 0xa060, 0, {0xe0,0x08,0xb0,0x02,0x4c,0x08,0xa8,0x00,0x26,0x20,0x0b,0x9c,0x02,0xe4,0x00,0xbb }},
+ {16, 0xa070, 0, {0x04,0x22,0xc0,0x19,0xb0,0x02,0xe8,0x01,0xbb,0x11,0x02,0xc0,0x88,0x90,0x02,0xf0 }},
+ {16, 0xa080, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0xec,0x02,0xea,0x40,0xb6,0x60 }},
+ {16, 0xa090, 0, {0x2e,0x98,0x0b,0x20,0x02,0xc8,0x02,0x3e,0xc0,0x0d,0x98,0x03,0xec,0x02,0xdb,0x88 }},
+ {16, 0xa0a0, 0, {0xb6,0x21,0x0f,0x88,0x03,0xac,0x08,0xfb,0x00,0x2c,0xc0,0x0e,0xb0,0x43,0xe5,0x80 }},
+ {16, 0xa0b0, 0, {0xf0,0x60,0x36,0xc0,0x0c,0x01,0x43,0x48,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa0c0, 0, {0xe0,0x01,0xbc,0x00,0xd6,0x01,0x3b,0x64,0x85,0xd9,0x03,0xf0,0x0c,0xff,0x00,0x3e }},
+ {16, 0xa0d0, 0, {0xc1,0x0f,0xfc,0x21,0xec,0x00,0xd7,0x90,0x3b,0x40,0x0f,0x50,0x03,0x3c,0x00,0xff }},
+ {16, 0xa0e0, 0, {0x00,0x3f,0xc0,0x8e,0xf0,0x03,0xf4,0x40,0xfd,0x88,0x3f,0xc0,0x2f,0xd0,0x02,0x78 }},
+ {16, 0xa0f0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x8c,0x00,0xda,0x40,0x3c,0x40 }},
+ {16, 0xa100, 0, {0x0f,0x10,0x03,0x48,0x00,0xf9,0x22,0x3c,0xc2,0x0e,0x90,0x83,0xec,0x02,0xdb,0x04 }},
+ {16, 0xa110, 0, {0x3a,0x08,0x0f,0x84,0x87,0xe8,0x00,0xcb,0x00,0x3e,0xc4,0x0e,0xb0,0x03,0xed,0x00 }},
+ {16, 0xa120, 0, {0xe8,0x42,0x3a,0xc0,0x0f,0x80,0x0b,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa130, 0, {0x88,0x05,0x2c,0x08,0x8a,0x00,0x2e,0x42,0x8b,0x90,0x02,0x28,0x18,0xbb,0x49,0x22 }},
+ {16, 0xa140, 0, {0xd0,0x38,0xbc,0x82,0xfc,0x00,0xe8,0x02,0x22,0x62,0xcb,0x9c,0x00,0xef,0x60,0xdf }},
+ {16, 0xa150, 0, {0x00,0x2f,0xc0,0x0b,0xf0,0x02,0xec,0x00,0x09,0x40,0x37,0xc0,0x0b,0x90,0x02,0x32 }},
+ {16, 0xa160, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x48,0x10,0x11,0x00,0x2c,0xa0 }},
+ {16, 0xa170, 0, {0x0b,0x20,0x02,0x44,0x00,0x90,0xc0,0x64,0x34,0x28,0x34,0x02,0xcc,0x00,0x93,0x84 }},
+ {16, 0xa180, 0, {0x28,0x40,0x0b,0x08,0x00,0xce,0x00,0x93,0x00,0x2c,0xc2,0x0a,0x30,0x02,0xc0,0x00 }},
+ {16, 0xa190, 0, {0xb2,0x40,0x22,0xc0,0x0b,0x20,0x02,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa1a0, 0, {0x70,0x01,0x1a,0x40,0x85,0x80,0x2d,0xa0,0x0b,0x68,0x06,0x16,0x80,0xbd,0x90,0x25 }},
+ {16, 0xa1b0, 0, {0x24,0x18,0x7b,0x42,0xde,0x40,0xa0,0x80,0x21,0xe0,0x0b,0x68,0x02,0xd6,0x00,0x97 }},
+ {16, 0xa1c0, 0, {0x90,0x2d,0xe0,0x0b,0x78,0x02,0xce,0x40,0x92,0x80,0x6d,0xe4,0x0b,0x78,0x02,0x08 }},
+ {16, 0xa1d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x28,0x00,0xd1,0x80,0x3c,0x88 }},
+ {16, 0xa1e0, 0, {0x0b,0x22,0x03,0x4e,0x80,0xf2,0xa1,0x3c,0x24,0x2a,0x39,0x03,0xcc,0x40,0xd3,0xac }},
+ {16, 0xa1f0, 0, {0x38,0xc5,0x0f,0x30,0x82,0xc8,0x00,0xd3,0x00,0x3c,0xc0,0x0e,0x30,0x13,0xc0,0x00 }},
+ {16, 0xa200, 0, {0xf1,0x00,0x38,0xc0,0x0f,0xa0,0x03,0x1a,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa210, 0, {0x40,0x1d,0xb8,0x10,0xfd,0x34,0x3e,0x80,0x0f,0xe0,0x03,0xee,0x00,0x72,0x00,0x3a }},
+ {16, 0xa220, 0, {0x00,0x0f,0xb0,0x63,0xec,0x40,0xf8,0x22,0x3e,0xc0,0x0f,0xf0,0x03,0xd4,0x40,0xff }},
+ {16, 0xa230, 0, {0x00,0x3f,0xd2,0x0f,0xf0,0x03,0xec,0x00,0xcf,0x00,0x37,0xc0,0x0f,0xf0,0x03,0xd0 }},
+ {16, 0xa240, 0, {0x06,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xee,0x00,0xeb,0x00,0x36,0xe0 }},
+ {16, 0xa250, 0, {0x0d,0xb0,0x03,0x20,0x00,0xf0,0x80,0x33,0xc0,0x08,0xb8,0x03,0x2c,0x80,0xcb,0x00 }},
+ {16, 0xa260, 0, {0x32,0x80,0x0f,0xa0,0x13,0x6e,0x08,0xcb,0x28,0x32,0xe0,0x0d,0xb4,0x83,0xe2,0x00 }},
+ {16, 0xa270, 0, {0xca,0x00,0x3e,0xe0,0x0c,0xa8,0x03,0x02,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa280, 0, {0xc8,0x11,0x8c,0x04,0x83,0x00,0x21,0xc0,0x48,0x70,0x02,0x10,0x00,0xb7,0x02,0x21 }},
+ {16, 0xa290, 0, {0xc0,0x4a,0x70,0x02,0x0d,0x48,0xd4,0x00,0x35,0xc0,0x0e,0x60,0x02,0xdc,0x00,0xa7 }},
+ {16, 0xa2a0, 0, {0x40,0x29,0xc0,0x09,0x72,0x02,0xd4,0x10,0xa6,0x02,0x2f,0xc8,0x08,0x70,0x02,0x12 }},
+ {16, 0xa2b0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x9e,0x00,0xa7,0x80,0x20,0xe0 }},
+ {16, 0xa2c0, 0, {0x0a,0x38,0x02,0x1a,0x00,0xb5,0x80,0x21,0xe0,0x08,0xf8,0x22,0x5c,0x81,0x83,0x80 }},
+ {16, 0xa2d0, 0, {0x21,0xa1,0x0b,0x78,0x82,0x5a,0x10,0x83,0xa0,0x20,0xe8,0x0a,0x7b,0x02,0xda,0x00 }},
+ {16, 0xa2e0, 0, {0x97,0xc0,0x2d,0xe4,0x08,0xe8,0x02,0x08,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa2f0, 0, {0x08,0x14,0xcc,0x00,0x83,0x10,0x20,0xc0,0x0a,0x30,0x02,0x08,0x08,0xb3,0x70,0x20 }},
+ {16, 0xa300, 0, {0xf8,0x0a,0x30,0x42,0x4c,0x04,0x93,0x14,0x26,0xc4,0x0a,0x38,0x02,0xcc,0x00,0xa3 }},
+ {16, 0xa310, 0, {0x00,0x28,0xc0,0xaa,0x30,0x02,0xce,0x40,0xb3,0x88,0x2c,0xc0,0x28,0x30,0x0a,0x12 }},
+ {16, 0xa320, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa9,0x00,0xea,0x80,0xb6,0x90 }},
+ {16, 0xa330, 0, {0x2f,0x24,0x0b,0x39,0x04,0xbe,0xc0,0x33,0x92,0x0c,0xa0,0x0b,0x68,0x18,0xce,0xc0 }},
+ {16, 0xa340, 0, {0x33,0x80,0x0f,0xe9,0x43,0x78,0x00,0xca,0x00,0x32,0x80,0x0f,0xa0,0x13,0xf8,0x48 }},
+ {16, 0xa350, 0, {0xde,0x00,0x3e,0x80,0x0c,0xe0,0x02,0x3a,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa360, 0, {0x48,0x00,0xe0,0x24,0xf8,0x00,0x3e,0x12,0x0d,0x80,0x93,0xb0,0x28,0xf8,0x00,0xbc }},
+ {16, 0xa370, 0, {0x00,0x0f,0x84,0x03,0xa0,0x00,0xf0,0x00,0x3e,0x02,0x0e,0x80,0x00,0xe0,0x00,0xf8 }},
+ {16, 0xa380, 0, {0x01,0x3e,0x00,0x0d,0x80,0x03,0xe0,0x00,0xe8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0xa390, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x00,0xb2,0x70 }},
+ {16, 0xa3a0, 0, {0x0f,0x90,0x01,0x04,0x00,0xc9,0x00,0x3e,0x40,0x0c,0x98,0x03,0xe4,0x04,0xe9,0x08 }},
+ {16, 0xa3b0, 0, {0x3a,0x48,0x0c,0x9a,0x03,0xe4,0x00,0xf9,0x00,0x36,0x40,0x0b,0x10,0x0b,0x26,0x80 }},
+ {16, 0xa3c0, 0, {0xf1,0x80,0x32,0x40,0x0f,0x90,0x03,0xc2,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa3d0, 0, {0x80,0x04,0x64,0x00,0xb9,0x00,0x22,0x61,0x0b,0x90,0x02,0x24,0x08,0x89,0x00,0x2e }},
+ {16, 0xa3e0, 0, {0x40,0x0d,0x9a,0x02,0xe4,0x08,0xa9,0x00,0x22,0x78,0x0d,0x94,0x06,0xe4,0x10,0xb9 }},
+ {16, 0xa3f0, 0, {0x00,0x22,0x50,0x0b,0x90,0x02,0x25,0x80,0xb9,0x80,0x36,0x40,0x0b,0x90,0x02,0xe0 }},
+ {16, 0xa400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb5,0x00,0x23,0x42 }},
+ {16, 0xa410, 0, {0x0b,0xd0,0x0e,0xb4,0x00,0x89,0x04,0x2e,0x60,0x08,0x91,0x02,0xc4,0x04,0xb9,0x04 }},
+ {16, 0xa420, 0, {0x2a,0xc0,0x08,0x94,0x02,0xe4,0x10,0xb1,0x00,0x26,0x42,0x0a,0x90,0x02,0x24,0x00 }},
+ {16, 0xa430, 0, {0xb9,0x21,0x62,0x40,0x0b,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa440, 0, {0x08,0x04,0x05,0x00,0xb5,0x40,0x21,0x50,0x4b,0x50,0x06,0x94,0x02,0x81,0x00,0x2c }},
+ {16, 0xa450, 0, {0x60,0x29,0x14,0x06,0xc5,0x00,0xa1,0x22,0x20,0x51,0x89,0x14,0x02,0xc4,0x00,0xb1 }},
+ {16, 0xa460, 0, {0x20,0x20,0x48,0x0b,0x14,0x02,0x04,0x01,0xb1,0x00,0x04,0x50,0x0b,0x10,0x02,0xc2 }},
+ {16, 0xa470, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x08,0xb8,0x00,0x32,0x00 }},
+ {16, 0xa480, 0, {0x8f,0x80,0x03,0xb0,0x00,0x88,0x00,0x3e,0x00,0x0c,0x80,0x03,0xe0,0x00,0xe8,0x04 }},
+ {16, 0xa490, 0, {0x3a,0x00,0x0c,0x80,0x02,0xe0,0x00,0xf8,0x50,0x36,0x00,0x0f,0x80,0x03,0x20,0x04 }},
+ {16, 0xa4a0, 0, {0xf8,0x01,0x12,0x00,0x4f,0x80,0x07,0xee,0x07,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa4b0, 0, {0x98,0x1d,0xe5,0x10,0xf9,0x40,0x3e,0x50,0x0f,0x94,0x02,0x65,0x01,0xfd,0x01,0x3d }},
+ {16, 0xa4c0, 0, {0x50,0x4f,0x50,0x13,0xe5,0x00,0xfd,0x10,0x1f,0x50,0x07,0xd4,0x43,0xd4,0x00,0xf9 }},
+ {16, 0xa4d0, 0, {0x10,0x1e,0x44,0x0f,0x94,0x03,0xd5,0x00,0xfd,0x40,0x3e,0x50,0x0f,0x52,0x83,0xee }},
+ {16, 0xa4e0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xe4,0x40,0xf9,0x60,0x3f,0x44 }},
+ {16, 0xa4f0, 0, {0x0f,0xd0,0xc3,0xe4,0x30,0xf9,0x01,0x3e,0x42,0x0c,0xd0,0x03,0xe7,0x80,0xdd,0xa0 }},
+ {16, 0xa500, 0, {0x33,0x40,0x0c,0xd0,0x03,0xfc,0x00,0xc9,0x90,0x3f,0x68,0x1e,0x91,0x03,0x34,0x00 }},
+ {16, 0xa510, 0, {0xfd,0x00,0x3e,0x68,0x0c,0x94,0x03,0x0e,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa520, 0, {0x39,0x10,0xe0,0x00,0xb8,0x42,0x2e,0x09,0x0b,0x84,0x02,0xe1,0x04,0xbe,0x00,0x2e }},
+ {16, 0xa530, 0, {0x10,0x08,0x80,0x22,0xc2,0x80,0x88,0x40,0x22,0x00,0x0a,0x80,0x02,0xe0,0x00,0xa8 }},
+ {16, 0xa540, 0, {0xd0,0x2e,0x10,0x4b,0x8a,0x03,0x60,0x00,0xba,0x00,0x2e,0x30,0x08,0x8a,0x02,0x86 }},
+ {16, 0xa550, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xc5,0x80,0xb1,0x60,0x6c,0xd0 }},
+ {16, 0xa560, 0, {0x0b,0x10,0x00,0xdc,0x0c,0xb5,0x00,0x2c,0x41,0x08,0x10,0x02,0xc5,0x80,0x91,0x10 }},
+ {16, 0xa570, 0, {0x68,0xc0,0x08,0x30,0x02,0xe4,0x0c,0x81,0x22,0x2c,0x50,0x08,0x10,0x42,0x04,0x00 }},
+ {16, 0xa580, 0, {0xa1,0x00,0x2c,0x5a,0x28,0x90,0x02,0x52,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa590, 0, {0x18,0x15,0xa4,0x00,0xb9,0x00,0x2e,0x41,0x0b,0x90,0x12,0xf4,0x80,0xbf,0x00,0x2e }},
+ {16, 0xa5a0, 0, {0x40,0x08,0x90,0x02,0xe4,0x00,0xa9,0x60,0x60,0x42,0x0a,0x94,0x12,0xe5,0x00,0xa9 }},
+ {16, 0xa5b0, 0, {0x00,0x2e,0x40,0x0b,0x90,0x02,0x64,0x20,0xb9,0x00,0x0e,0x40,0x09,0x90,0x02,0xc6 }},
+ {16, 0xa5c0, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe4,0x00,0xf9,0x00,0x3e,0x41 }},
+ {16, 0xa5d0, 0, {0x0f,0x90,0x23,0xe4,0x00,0xf9,0x00,0x3e,0x40,0x0c,0x90,0x03,0xe4,0x04,0xd1,0xc0 }},
+ {16, 0xa5e0, 0, {0xba,0x70,0x0c,0x98,0x03,0xc4,0x00,0xc9,0x00,0x3e,0x40,0x0e,0x90,0x03,0x25,0x40 }},
+ {16, 0xa5f0, 0, {0xe9,0x40,0x3e,0x40,0x0c,0x10,0x03,0x68,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa600, 0, {0x68,0x01,0xa4,0x14,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x23,0xe4,0x08,0xf9,0xa0,0x3c }},
+ {16, 0xa610, 0, {0xc2,0x2f,0x90,0x03,0xc4,0x00,0xd9,0x80,0x3e,0x70,0x0f,0x91,0x43,0xe4,0x00,0xf9 }},
+ {16, 0xa620, 0, {0x00,0x3e,0x40,0x1f,0x90,0x13,0xe6,0x20,0xf9,0xa0,0x3c,0x40,0x4e,0x90,0x03,0x9a }},
+ {16, 0xa630, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa0,0x00,0xf8,0x00,0x3e,0x02 }},
+ {16, 0xa640, 0, {0x0f,0x80,0x13,0x20,0x0c,0xfc,0x01,0x3e,0x00,0x0c,0x80,0x03,0xe0,0x00,0xc8,0x50 }},
+ {16, 0xa650, 0, {0x32,0x00,0x0f,0x80,0x0b,0x20,0x08,0xf8,0x00,0x32,0x00,0x2c,0x80,0x43,0xe0,0x40 }},
+ {16, 0xa660, 0, {0xf8,0x02,0x3a,0x00,0x8f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa670, 0, {0xa8,0x85,0x28,0x08,0x3a,0x00,0x0f,0x80,0x4b,0xa1,0x02,0x28,0x00,0xba,0x82,0x2e }},
+ {16, 0xa680, 0, {0x88,0x48,0xe4,0x02,0xe8,0x00,0xae,0x90,0xa3,0x90,0x0b,0xe0,0x00,0x38,0x00,0xba }},
+ {16, 0xa690, 0, {0x00,0x37,0xa0,0x08,0xa0,0x02,0xf8,0x00,0x9e,0xe0,0x22,0x80,0x0b,0xa0,0x23,0x42 }},
+ {16, 0xa6a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x10,0x33,0x00,0x2c,0xd0 }},
+ {16, 0xa6b0, 0, {0x0b,0x14,0x02,0x0c,0x00,0xb2,0x91,0x2c,0xd0,0x08,0x3e,0x02,0x4c,0x00,0x83,0x40 }},
+ {16, 0xa6c0, 0, {0x24,0xc2,0x0b,0x36,0x00,0x8c,0x00,0xb3,0x00,0x20,0xc0,0x09,0xb0,0x02,0xce,0x00 }},
+ {16, 0xa6d0, 0, {0xb3,0xcc,0x68,0xc0,0x0b,0x30,0x02,0x02,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa6e0, 0, {0xe0,0x01,0x1c,0x88,0xb7,0x25,0x2d,0xc0,0x8b,0x58,0x1a,0x1c,0x08,0xb6,0x00,0x2d }},
+ {16, 0xa6f0, 0, {0xc0,0x08,0x74,0x02,0xdc,0x40,0xa5,0x00,0x25,0xc0,0x1b,0x78,0x02,0x94,0x08,0xb7 }},
+ {16, 0xa700, 0, {0x80,0x25,0xe3,0x0a,0x71,0x02,0xdc,0x00,0x97,0x83,0x21,0xc8,0x8b,0xf1,0x02,0x48 }},
+ {16, 0xa710, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1f,0x00,0xf7,0xe2,0x7d,0xe0 }},
+ {16, 0xa720, 0, {0x0f,0x58,0x43,0x1e,0x18,0xf6,0x80,0x7c,0xe0,0x2c,0x68,0x02,0x5e,0x90,0xc3,0x80 }},
+ {16, 0xa730, 0, {0x35,0xe0,0x0f,0xf8,0x03,0x9e,0x04,0xff,0xa1,0x20,0xa1,0x0d,0x78,0x03,0xd6,0x00 }},
+ {16, 0xa740, 0, {0xf7,0x80,0x39,0xf8,0x0f,0x78,0x03,0x0a,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa750, 0, {0x48,0x1d,0xac,0x00,0xfb,0x40,0x7f,0x41,0x0f,0x10,0x03,0xec,0x04,0xfa,0x00,0x3e }},
+ {16, 0xa760, 0, {0xd0,0x0f,0xa0,0x03,0xed,0x00,0xe9,0x00,0x2a,0x00,0x0f,0xb0,0x03,0x64,0x00,0xfb }},
+ {16, 0xa770, 0, {0x40,0x3e,0xc0,0x0d,0xb0,0x03,0xe4,0x00,0xd3,0x00,0x36,0xc0,0x0f,0x38,0x03,0xc2 }},
+ {16, 0xa780, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x48,0xcf,0xc0,0x33,0x60 }},
+ {16, 0xa790, 0, {0x8c,0xc8,0x43,0xd6,0x00,0xcc,0x94,0x3f,0xb0,0x0d,0xf8,0x03,0x7f,0x00,0xdf,0x80 }},
+ {16, 0xa7a0, 0, {0x3f,0x60,0x0f,0xd8,0x03,0xde,0x00,0xcf,0xca,0x3d,0x60,0x0c,0xf8,0x13,0x3a,0x44 }},
+ {16, 0xa7b0, 0, {0xdd,0x80,0x3f,0xe0,0x0f,0xf8,0x43,0x18,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa7c0, 0, {0xa8,0x11,0x9c,0x00,0x8f,0x11,0x33,0xc0,0x48,0x41,0x12,0xc4,0x48,0x84,0x11,0x2c }},
+ {16, 0xa7d0, 0, {0xec,0x2a,0xba,0x03,0x3c,0x40,0xd7,0x48,0x2d,0x41,0x0b,0x60,0x02,0xd4,0x00,0xd7 }},
+ {16, 0xa7e0, 0, {0x01,0x3d,0xc0,0x0d,0xf0,0x03,0x5a,0x00,0x84,0x18,0x2d,0xc0,0x0b,0x70,0x03,0x6a }},
+ {16, 0xa7f0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x8c,0x08,0x87,0x00,0x21,0x40 }},
+ {16, 0xa800, 0, {0x09,0x40,0x02,0xd4,0x00,0xa4,0x92,0x2d,0xc8,0x09,0x62,0x82,0x5c,0x00,0x87,0x00 }},
+ {16, 0xa810, 0, {0x2d,0xc0,0x0b,0x50,0x02,0xfc,0x00,0x87,0x00,0x2d,0x04,0x08,0x70,0x02,0x1c,0x80 }},
+ {16, 0xa820, 0, {0xb5,0x00,0x2d,0xc0,0x0b,0xf0,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa830, 0, {0x60,0x10,0xcc,0x00,0x83,0x00,0x20,0x40,0x09,0x00,0x22,0xc7,0x00,0xa0,0x41,0x2c }},
+ {16, 0xa840, 0, {0xc1,0x4b,0x08,0x02,0x2c,0x00,0x93,0x40,0x2c,0x7c,0x0b,0x38,0x02,0xc7,0x20,0x93 }},
+ {16, 0xa850, 0, {0x00,0x2c,0xc0,0x09,0x30,0x02,0x4f,0x84,0xb0,0x80,0x2c,0xc0,0x0b,0x32,0x10,0x50 }},
+ {16, 0xa860, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x15,0xbc,0x02,0xcf,0x00,0xb2,0x40 }},
+ {16, 0xa870, 0, {0x0d,0x10,0x03,0xe8,0x24,0xeb,0xc1,0x3e,0xc0,0x2d,0x98,0x13,0x7c,0x0a,0xc2,0x43 }},
+ {16, 0xa880, 0, {0x3e,0xb0,0x0f,0xa9,0x03,0xe9,0x20,0xcf,0x00,0x3e,0xc0,0x8c,0xf0,0x03,0x0d,0x20 }},
+ {16, 0xa890, 0, {0xfa,0xc0,0x3f,0xc0,0x0f,0x74,0x01,0x2a,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa8a0, 0, {0x80,0x00,0xec,0x00,0xfb,0x02,0x3a,0x40,0x8e,0x90,0x03,0xe8,0x14,0x5b,0x50,0x3c }},
+ {16, 0xa8b0, 0, {0x50,0x4e,0x84,0x03,0xec,0x00,0xf8,0x40,0x3e,0x80,0x07,0x81,0x03,0xec,0x08,0xf3 }},
+ {16, 0xa8c0, 0, {0x00,0x3a,0xc0,0x9f,0x30,0x03,0xec,0x00,0xcb,0x20,0x3e,0xc0,0x0f,0xb0,0x23,0xe8 }},
+ {16, 0xa8d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x90,0xfc,0x00,0xff,0x00,0x3f,0x40 }},
+ {16, 0xa8e0, 0, {0x0f,0xd0,0x03,0x38,0x20,0xcf,0x08,0x32,0xc1,0x0e,0xd0,0x03,0xfc,0x00,0xfe,0x08 }},
+ {16, 0xa8f0, 0, {0x31,0xe5,0x0e,0xe4,0x03,0x3a,0x00,0xff,0x00,0x33,0x80,0x0f,0xf0,0x2b,0x24,0x00 }},
+ {16, 0xa900, 0, {0xcc,0xa0,0x3f,0xc0,0x0f,0xf0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa910, 0, {0x80,0x04,0x6c,0x00,0xbb,0x00,0x3a,0x69,0x0b,0x90,0x6e,0x08,0x00,0x83,0x41,0x36 }},
+ {16, 0xa920, 0, {0x40,0xc8,0x88,0xc6,0xec,0x00,0x88,0x40,0x36,0x80,0x0d,0xa8,0x03,0x6e,0x50,0xbb }},
+ {16, 0xa930, 0, {0x00,0x36,0xc0,0x0b,0xb0,0x02,0x24,0x00,0xd9,0x08,0x2e,0xc0,0x0b,0xb0,0x03,0xe0 }},
+ {16, 0xa940, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xbb,0x00,0x2e,0x60 }},
+ {16, 0xa950, 0, {0x03,0x80,0x02,0x20,0x00,0x89,0x01,0x22,0x58,0x08,0x98,0x22,0xec,0x01,0xab,0x00 }},
+ {16, 0xa960, 0, {0x22,0x00,0x0a,0x10,0x02,0x28,0x00,0xbb,0x00,0x22,0x40,0x0b,0xb0,0x02,0x28,0x00 }},
+ {16, 0xa970, 0, {0x8a,0x00,0x2e,0xc0,0x0b,0xb0,0x42,0x20,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa980, 0, {0x08,0x04,0x0c,0x00,0xb3,0x00,0x28,0x40,0x8b,0x00,0x02,0x02,0x40,0x89,0x01,0x24 }},
+ {16, 0xa990, 0, {0xd2,0x28,0x10,0x02,0xcc,0x00,0x83,0x10,0x24,0x20,0x08,0x08,0x02,0x4e,0x00,0xb3 }},
+ {16, 0xa9a0, 0, {0x04,0xa0,0xc0,0x0b,0x30,0x02,0x08,0x88,0x92,0x00,0x2c,0xc0,0x0b,0xb0,0x02,0xc2 }},
+ {16, 0xa9b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xff,0x00,0x3e,0x00 }},
+ {16, 0xa9c0, 0, {0x0f,0x80,0x02,0x20,0x10,0x89,0x50,0x22,0xd8,0x2e,0x96,0x22,0xfc,0x00,0xeb,0x40 }},
+ {16, 0xa9d0, 0, {0x32,0xc0,0x0a,0x90,0x03,0x28,0x00,0xff,0x00,0x22,0x00,0x0f,0xb0,0x03,0x2c,0xa0 }},
+ {16, 0xa9e0, 0, {0xc8,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0x00,0x06,0x10,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa9f0, 0, {0xa0,0x19,0xfc,0x00,0xff,0x0c,0x3b,0x00,0x0f,0xc0,0x02,0x70,0x90,0xfd,0x00,0x3e }},
+ {16, 0xaa00, 0, {0xc9,0x0f,0x96,0xc3,0xfc,0x00,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x04,0xff }},
+ {16, 0xaa10, 0, {0x04,0x3f,0xc0,0x0f,0xf0,0x03,0xec,0x00,0xfc,0x00,0x3f,0xc0,0x0f,0x70,0x03,0xe8 }},
+ {16, 0xaa20, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xdc,0x80,0xfb,0x28,0x3f,0x00 }},
+ {16, 0xaa30, 0, {0x0c,0xc1,0x0b,0xf1,0x02,0xed,0x00,0x37,0x30,0x2c,0xf1,0x03,0xb2,0x40,0xff,0x00 }},
+ {16, 0xaa40, 0, {0xbb,0xc0,0x0f,0x48,0x06,0xb2,0x00,0xfc,0x80,0x3b,0xcc,0x0c,0xf0,0x03,0x70,0x80 }},
+ {16, 0xaa50, 0, {0xdf,0x28,0x33,0x04,0x0f,0xf4,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaa60, 0, {0x80,0x10,0xff,0x40,0xbf,0x60,0x2e,0x21,0x08,0x82,0x02,0x20,0x00,0xa9,0x28,0x2a }},
+ {16, 0xaa70, 0, {0x00,0x09,0xfa,0x02,0x20,0x00,0xbf,0x51,0x23,0xd8,0x09,0x98,0x02,0xe4,0x30,0xb0 }},
+ {16, 0xaa80, 0, {0x00,0x23,0xd0,0x08,0xf5,0xa2,0x25,0xa4,0x8f,0x42,0x3c,0x10,0x0b,0xb0,0x0a,0x20 }},
+ {16, 0xaa90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0xb3,0x08,0x2c,0x00 }},
+ {16, 0xaaa0, 0, {0x28,0x00,0x1a,0xc0,0x84,0x20,0x00,0x24,0xc8,0x4b,0x31,0x42,0xc0,0x00,0x93,0x02 }},
+ {16, 0xaab0, 0, {0x20,0xc6,0x08,0x00,0x06,0xc0,0x81,0xb3,0x00,0x2c,0xd8,0x09,0x32,0x02,0xa0,0x40 }},
+ {16, 0xaac0, 0, {0x93,0x01,0x24,0x4c,0x0b,0x32,0x02,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaad0, 0, {0xc0,0x11,0xac,0x00,0xbb,0x02,0x2e,0x0a,0x08,0x80,0x82,0x60,0x00,0xa8,0x00,0x2e }},
+ {16, 0xaae0, 0, {0xe0,0x1b,0xb0,0x02,0x62,0x01,0x3b,0x00,0x22,0xc1,0x09,0x90,0x02,0xe2,0x00,0xbb }},
+ {16, 0xaaf0, 0, {0x60,0x26,0xc1,0x08,0xb0,0x2a,0x26,0x00,0x9b,0x04,0x2e,0x21,0x0b,0xb0,0x02,0x30 }},
+ {16, 0xab00, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0xec,0x10,0xfb,0x00,0x3e,0x10 }},
+ {16, 0xab10, 0, {0x08,0x84,0x13,0xec,0x02,0xa9,0x04,0x36,0x20,0x0f,0xb0,0x03,0xee,0x80,0xfb,0x00 }},
+ {16, 0xab20, 0, {0x3a,0xc0,0x0c,0xa0,0x03,0xa2,0x80,0x79,0x40,0x1e,0xc0,0x8c,0xb0,0x63,0x6a,0x10 }},
+ {16, 0xab30, 0, {0xd3,0x00,0x36,0xa2,0x07,0xb0,0x03,0x00,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xab40, 0, {0xe0,0x01,0xbc,0x00,0xff,0x00,0x3e,0x20,0x4d,0x41,0x03,0x9c,0x00,0xfd,0x20,0xab }},
+ {16, 0xab50, 0, {0x00,0x0c,0xf0,0x03,0xb8,0x00,0xf7,0x00,0x3f,0xc0,0x4d,0xc9,0x03,0xf4,0x00,0xff }},
+ {16, 0xab60, 0, {0x00,0x3b,0xc0,0x2e,0xf0,0x00,0xf0,0x00,0xef,0x00,0x3f,0x00,0x4b,0x70,0x03,0xf8 }},
+ {16, 0xab70, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x80,0xeb,0x00,0x7e,0x10 }},
+ {16, 0xab80, 0, {0x2e,0x84,0x03,0xec,0x00,0xe0,0x00,0x32,0x50,0x0f,0xb0,0x86,0x25,0x00,0xdb,0x20 }},
+ {16, 0xab90, 0, {0x3a,0xc0,0x0d,0xb0,0x63,0xe1,0x10,0xfb,0x48,0x38,0xc1,0x0f,0x30,0x03,0x2c,0x04 }},
+ {16, 0xaba0, 0, {0xfb,0x08,0x32,0xc0,0x0c,0xb0,0x0b,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xabb0, 0, {0xc8,0x05,0x3c,0x00,0x8f,0x00,0x64,0x29,0x28,0x80,0x03,0xec,0x02,0xe8,0x04,0xa8 }},
+ {16, 0xabc0, 0, {0x56,0x08,0xfc,0x07,0xe0,0x00,0x0f,0xa0,0xbf,0xc0,0x0b,0x95,0x02,0xa0,0x00,0xbb }},
+ {16, 0xabd0, 0, {0x05,0x37,0xc0,0x89,0xf0,0x0a,0x0d,0xc8,0xbf,0x08,0x2a,0x80,0x08,0xf0,0x02,0x32 }},
+ {16, 0xabe0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x01,0xb3,0x02,0x24,0xe0 }},
+ {16, 0xabf0, 0, {0x0a,0x30,0x12,0x80,0x03,0xa3,0x00,0xa8,0x00,0x02,0xb8,0x22,0xc0,0x00,0xb3,0x00 }},
+ {16, 0xac00, 0, {0x28,0xc1,0x0b,0x04,0x02,0x08,0x00,0xb9,0x40,0x28,0xc0,0x0b,0x30,0x02,0x03,0x04 }},
+ {16, 0xac10, 0, {0xb3,0x44,0x20,0x00,0x4a,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xac20, 0, {0x20,0x01,0x1e,0x20,0x17,0xa0,0x65,0xec,0x08,0x38,0x02,0xc2,0x41,0xb3,0x92,0x2b }},
+ {16, 0xac30, 0, {0x64,0x0a,0x38,0x02,0x36,0x01,0xb7,0x90,0x2d,0xe0,0x03,0xf8,0x00,0x9a,0x00,0xb5 }},
+ {16, 0xac40, 0, {0x80,0x2d,0xe0,0x89,0x78,0x12,0x1e,0x00,0xb7,0x80,0x29,0xe0,0x0a,0x78,0x02,0x08 }},
+ {16, 0xac50, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x73,0xb0,0x24,0xc8 }},
+ {16, 0xac60, 0, {0x4e,0x30,0x0a,0x80,0x02,0xe2,0x00,0x38,0x94,0x0e,0x31,0xa2,0xc8,0x00,0x73,0x00 }},
+ {16, 0xac70, 0, {0x18,0xc4,0x05,0x00,0x03,0x00,0x00,0xf3,0x00,0x38,0xc0,0x07,0xb1,0x03,0x00,0x00 }},
+ {16, 0xac80, 0, {0xf3,0x01,0x30,0x41,0x0e,0xb0,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xac90, 0, {0x40,0x1d,0xbd,0x00,0xef,0x10,0x26,0xc8,0x03,0xb1,0x03,0xe0,0x00,0xea,0x81,0x78 }},
+ {16, 0xaca0, 0, {0xc5,0x0c,0xb5,0xe3,0xdc,0x00,0xc3,0x00,0x3e,0xc1,0x0f,0xf0,0x83,0xb0,0x00,0xff }},
+ {16, 0xacb0, 0, {0x00,0x37,0xc0,0x0d,0xf4,0x03,0xe4,0x00,0xf7,0x00,0x3f,0x40,0x0d,0xf0,0x03,0xd0 }},
+ {16, 0xacc0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xed,0x10,0xcb,0x28,0x3e,0xc0 }},
+ {16, 0xacd0, 0, {0x0d,0xb0,0x13,0xac,0x10,0xfb,0x00,0x3a,0x80,0x04,0xb4,0x03,0xac,0x00,0xfb,0x04 }},
+ {16, 0xace0, 0, {0x3e,0xc0,0x0f,0xa4,0xb3,0xe0,0x00,0xfb,0x80,0x32,0xc0,0x0f,0xb0,0x03,0xe8,0x00 }},
+ {16, 0xacf0, 0, {0xfb,0x48,0xb2,0x80,0x0f,0xb0,0x43,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xad00, 0, {0x48,0x11,0x9c,0x02,0x87,0x44,0x38,0xc0,0x8d,0x30,0x02,0x4c,0x00,0xff,0x00,0x21 }},
+ {16, 0xad10, 0, {0xc0,0x08,0x70,0x03,0x9c,0x00,0xb3,0x50,0x21,0xd4,0x4e,0x62,0x02,0xd0,0x00,0xbf }},
+ {16, 0xad20, 0, {0x00,0x35,0xd4,0x09,0x70,0x22,0xd8,0x00,0xbf,0x22,0x21,0xc0,0x0b,0x72,0x02,0xd2 }},
+ {16, 0xad30, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x40,0x87,0x80,0x2d,0xe0 }},
+ {16, 0xad40, 0, {0x09,0x78,0x02,0xde,0x00,0xb6,0x80,0x29,0xa1,0x28,0x7a,0x32,0xde,0x00,0x37,0xa0 }},
+ {16, 0xad50, 0, {0x25,0xe0,0x09,0x78,0x06,0xd2,0x00,0xb7,0x80,0x21,0xe8,0x0b,0x79,0x02,0xde,0x00 }},
+ {16, 0xad60, 0, {0xb7,0x90,0x21,0xe0,0x0b,0x79,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xad70, 0, {0x48,0x14,0xcc,0x04,0x83,0x01,0x28,0xc0,0x89,0xb0,0x0a,0x4f,0x00,0xb2,0x00,0x20 }},
+ {16, 0xad80, 0, {0xc4,0x88,0x30,0x16,0xcf,0x00,0xbb,0x04,0x20,0xc1,0x0a,0x32,0x06,0xc2,0x00,0xb3 }},
+ {16, 0xad90, 0, {0x00,0x24,0xc0,0x09,0x30,0x42,0xef,0x10,0xb3,0x00,0x20,0xc0,0x0b,0x30,0x02,0xd2 }},
+ {16, 0xada0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0x4a,0x00,0x3e,0x80 }},
+ {16, 0xadb0, 0, {0x2d,0xa0,0x0b,0xaa,0x80,0xfe,0x00,0x2b,0x80,0x0c,0xa0,0x43,0xfb,0x30,0xfa,0x00 }},
+ {16, 0xadc0, 0, {0x3e,0x80,0x0f,0xa0,0x83,0xfa,0x04,0xfe,0x18,0x22,0x80,0x0f,0xa0,0x03,0xfa,0x84 }},
+ {16, 0xadd0, 0, {0xf2,0x00,0x33,0xa2,0x0f,0xa0,0x03,0xf2,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xade0, 0, {0x48,0x00,0xe0,0x00,0xf0,0x00,0x3e,0x00,0x2f,0x80,0x03,0xa0,0x20,0xfc,0x02,0x3e }},
+ {16, 0xadf0, 0, {0x00,0x1f,0x84,0x03,0xa0,0x00,0xf8,0x40,0x3e,0x00,0x4f,0x80,0x01,0xe0,0x40,0xf8 }},
+ {16, 0xae00, 0, {0x40,0x3e,0x00,0x0d,0x80,0x13,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0xae10, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc6,0x00,0xd9,0x00,0x36,0x40 }},
+ {16, 0xae20, 0, {0x0f,0x90,0x0b,0x04,0x00,0xc9,0x00,0x36,0x68,0x6c,0x94,0x03,0xe4,0x20,0xb9,0x90 }},
+ {16, 0xae30, 0, {0x36,0x40,0x0c,0x94,0x03,0xe4,0x00,0x29,0x80,0x3e,0x40,0x0f,0x90,0x03,0x24,0x20 }},
+ {16, 0xae40, 0, {0xc9,0x00,0x36,0x40,0x0f,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xae50, 0, {0x80,0x04,0x66,0x50,0x89,0x00,0x20,0x50,0x08,0x90,0x02,0x24,0x09,0xd9,0x00,0x20 }},
+ {16, 0xae60, 0, {0x48,0x48,0x90,0x06,0xe4,0x04,0x99,0xa0,0x22,0x40,0x0d,0xb8,0x22,0x64,0x00,0x09 }},
+ {16, 0xae70, 0, {0x50,0x32,0x40,0x0b,0x90,0x02,0x27,0x90,0x89,0x40,0x2a,0x40,0x0b,0x90,0x02,0xe0 }},
+ {16, 0xae80, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x00,0x99,0x00,0x66,0x42 }},
+ {16, 0xae90, 0, {0x0a,0xd0,0x12,0x34,0x00,0x85,0x00,0x26,0x40,0x4a,0x90,0x02,0xe4,0x01,0xb9,0x01 }},
+ {16, 0xaea0, 0, {0x24,0x40,0x58,0x90,0x12,0xc4,0x00,0x29,0x40,0x2e,0x40,0x0b,0x10,0x0a,0x24,0x80 }},
+ {16, 0xaeb0, 0, {0x89,0x05,0x26,0x41,0x0b,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaec0, 0, {0x08,0x04,0x04,0x80,0x81,0x20,0x61,0x48,0x08,0x52,0x02,0x14,0x81,0x95,0x20,0x20 }},
+ {16, 0xaed0, 0, {0x40,0x0a,0x36,0x02,0xc4,0x00,0xb1,0x20,0x00,0x48,0x41,0x10,0x42,0x44,0x01,0xa1 }},
+ {16, 0xaee0, 0, {0x00,0x24,0x48,0x0b,0x12,0x12,0x04,0x80,0x81,0x20,0x28,0x48,0x0b,0x12,0x02,0xca }},
+ {16, 0xaef0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xd8,0x50,0x36,0x00 }},
+ {16, 0xaf00, 0, {0x0e,0x85,0x23,0x21,0x42,0x8c,0x54,0x34,0x14,0x0e,0x80,0x02,0xe1,0x40,0xf8,0x50 }},
+ {16, 0xaf10, 0, {0x36,0x14,0x04,0x80,0x03,0xe1,0x44,0xe8,0x50,0x7e,0x15,0x0f,0x85,0x03,0x21,0x42 }},
+ {16, 0xaf20, 0, {0x4a,0x00,0x36,0x14,0x0f,0x80,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaf30, 0, {0x98,0x1d,0xc4,0x40,0xf9,0x10,0x1e,0x44,0x4e,0x91,0x03,0xe4,0x40,0xf9,0x10,0x3f }},
+ {16, 0xaf40, 0, {0xc0,0x0d,0x91,0x03,0xf4,0x00,0xd9,0x14,0x3e,0x44,0x0f,0x90,0x03,0x74,0x00,0xdd }},
+ {16, 0xaf50, 0, {0x00,0x7a,0x44,0x0f,0x91,0x03,0xf4,0x40,0xf9,0x38,0x3f,0x44,0x0f,0x93,0x83,0xe7 }},
+ {16, 0xaf60, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xf6,0x80,0xf9,0xa4,0x3f,0x68 }},
+ {16, 0xaf70, 0, {0x0e,0x9e,0x43,0x67,0x80,0xd9,0xe4,0x3f,0x41,0x0f,0xd8,0x43,0x04,0x00,0xed,0xc0 }},
+ {16, 0xaf80, 0, {0x36,0x40,0x0c,0x90,0x03,0xe4,0x00,0xd5,0x40,0x32,0x40,0x0c,0x90,0x03,0xf4,0x00 }},
+ {16, 0xaf90, 0, {0xdd,0x00,0x32,0x40,0x2c,0x9a,0x03,0xc6,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xafa0, 0, {0x38,0x10,0xe0,0x00,0xe8,0xc0,0x2e,0x14,0x4d,0x8f,0x22,0x23,0xc0,0xf8,0xf0,0xaa }},
+ {16, 0xafb0, 0, {0x00,0x0c,0x80,0x03,0xa2,0xa0,0xd8,0x82,0x22,0x00,0x08,0x80,0x02,0xe8,0x00,0xd8 }},
+ {16, 0xafc0, 0, {0x80,0x2a,0x00,0x08,0x80,0x02,0xe8,0x08,0x88,0xa8,0x36,0x00,0x48,0x8a,0x82,0xce }},
+ {16, 0xafd0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb1,0x48,0x2e,0x40 }},
+ {16, 0xafe0, 0, {0x0a,0x12,0x22,0x44,0x00,0x91,0x04,0xa4,0x41,0x0a,0x94,0x06,0x24,0x00,0x91,0x42 }},
+ {16, 0xaff0, 0, {0x24,0x41,0x09,0x10,0x02,0xe4,0x01,0x91,0x20,0x24,0x40,0x09,0x10,0x02,0xc4,0x01 }},
+ {16, 0xb000, 0, {0x91,0x00,0x2c,0x40,0x09,0x14,0x02,0xc2,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb010, 0, {0x18,0x15,0xa4,0x00,0xa9,0x00,0x2e,0x40,0x48,0x10,0x02,0x24,0x00,0xb9,0x40,0xaa }},
+ {16, 0xb020, 0, {0x40,0x18,0xb0,0x02,0xe4,0x08,0x99,0x00,0x22,0x40,0x19,0x90,0x46,0xe4,0x80,0x99 }},
+ {16, 0xb030, 0, {0x04,0x2e,0x40,0x09,0x90,0x02,0xe4,0x01,0x99,0x04,0x26,0x50,0x09,0x90,0x02,0xc6 }},
+ {16, 0xb040, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xe4,0x00,0xf9,0x06,0x3c,0x40 }},
+ {16, 0xb050, 0, {0x0a,0x90,0x03,0x64,0x02,0xd9,0x00,0xb6,0x50,0x0e,0x90,0x23,0x26,0x01,0xf9,0x00 }},
+ {16, 0xb060, 0, {0x36,0x40,0x29,0x94,0x83,0xe4,0x00,0xd9,0x48,0x36,0x40,0x0d,0x90,0x03,0xc7,0x00 }},
+ {16, 0xb070, 0, {0xd1,0x07,0x3a,0x50,0xcd,0x90,0x03,0xe8,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb080, 0, {0x28,0x01,0xa4,0x08,0xe9,0x00,0x3e,0x40,0x8f,0x90,0x03,0xc4,0x08,0xf1,0x00,0x3a }},
+ {16, 0xb090, 0, {0x68,0x8f,0x90,0x03,0xa4,0x41,0xf9,0x00,0xbe,0x40,0x0e,0x90,0x03,0xe4,0x00,0xf9 }},
+ {16, 0xb0a0, 0, {0xc0,0x38,0x40,0x2e,0x90,0x03,0xe6,0x40,0xe9,0x00,0x3e,0x68,0x06,0x90,0x03,0xca }},
+ {16, 0xb0b0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xd8,0x05,0x3e,0x00 }},
+ {16, 0xb0c0, 0, {0x07,0x80,0x0b,0x20,0x00,0xe8,0x40,0x3e,0x10,0x0d,0x82,0x03,0x60,0x00,0xc8,0x00 }},
+ {16, 0xb0d0, 0, {0xb2,0x00,0x8d,0x83,0x03,0xe0,0x00,0xd8,0x50,0x3a,0x00,0x1e,0x80,0x03,0xe1,0x24 }},
+ {16, 0xb0e0, 0, {0xf8,0x00,0xb2,0x00,0x0f,0x80,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb0f0, 0, {0x28,0x05,0x38,0x00,0x8a,0x04,0x2f,0x84,0x6a,0xa0,0x0b,0xe8,0x08,0x8e,0x00,0x3d }},
+ {16, 0xb100, 0, {0x80,0x88,0xec,0x03,0x68,0x10,0xa6,0x01,0x36,0x80,0x08,0xa8,0x00,0xc8,0x10,0x8e }},
+ {16, 0xb110, 0, {0x10,0x22,0x80,0x08,0xa0,0x02,0xfb,0x20,0xbe,0x51,0x2a,0x80,0x0b,0xa0,0x02,0x82 }},
+ {16, 0xb120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x41,0x21,0x93,0x00,0x2c,0xf0 }},
+ {16, 0xb130, 0, {0x39,0x30,0x06,0x0c,0x00,0xa3,0x00,0x28,0x08,0x28,0xbc,0x02,0x2c,0x00,0x83,0x80 }},
+ {16, 0xb140, 0, {0x2a,0xc0,0x08,0x30,0x00,0xcc,0x00,0x9a,0x80,0x28,0xc0,0x0a,0x30,0x02,0xcd,0x00 }},
+ {16, 0xb150, 0, {0xb3,0x04,0x62,0xc1,0x0b,0x30,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb160, 0, {0xa0,0x01,0x1e,0x04,0x07,0x11,0x2c,0xd0,0x0a,0x32,0x22,0xdc,0xc1,0x87,0x00,0x6d }},
+ {16, 0xb170, 0, {0xd0,0x08,0x34,0x02,0x7c,0x00,0xa7,0x08,0x24,0xc8,0x08,0x70,0x02,0xdc,0x80,0x0f }},
+ {16, 0xb180, 0, {0x00,0x21,0xc4,0x08,0x73,0x06,0xdc,0x00,0xb2,0x00,0x61,0xc8,0x0b,0x3a,0x02,0x88 }},
+ {16, 0xb190, 0, {0x04,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x0a,0x00,0x57,0x81,0x2d,0xa0 }},
+ {16, 0xb1a0, 0, {0x2d,0x7c,0x02,0x3e,0x82,0xe3,0xe0,0x3b,0xe0,0x0c,0x78,0x03,0x1e,0x20,0xc7,0x80 }},
+ {16, 0xb1b0, 0, {0xb9,0xe8,0x2c,0x78,0x03,0xff,0x80,0xd6,0x80,0x3b,0xec,0x02,0x7a,0x03,0xde,0x00 }},
+ {16, 0xb1c0, 0, {0xf7,0x81,0x31,0xec,0x8f,0x7c,0x03,0x0a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb1d0, 0, {0x08,0x1d,0xac,0x00,0xfb,0x00,0x1e,0x80,0x23,0xb6,0x83,0xed,0xa0,0xdb,0x64,0x3e }},
+ {16, 0xb1e0, 0, {0xc0,0x0e,0xb0,0x03,0xed,0xc0,0xf2,0x00,0x3e,0xd4,0x0a,0xb0,0x03,0xec,0x30,0xee }},
+ {16, 0xb1f0, 0, {0x64,0x3e,0xc0,0x07,0xb0,0xc3,0xe8,0x00,0xfb,0x01,0x3e,0xc8,0x0f,0xb8,0x03,0xc2 }},
+ {16, 0xb200, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xef,0x80,0x3b,0xe0 }},
+ {16, 0xb210, 0, {0x0f,0xf8,0x63,0x7e,0x04,0xcf,0xc0,0xb7,0x20,0x0e,0xf8,0x03,0xfc,0x00,0xc7,0x80 }},
+ {16, 0xb220, 0, {0x33,0xf0,0x0c,0xcc,0x03,0xfe,0x08,0xf7,0xc1,0x33,0xe0,0x4f,0xf8,0x03,0xb2,0x40 }},
+ {16, 0xb230, 0, {0xff,0xa0,0x31,0xe6,0x0c,0xf8,0x03,0x10,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb240, 0, {0xa8,0x11,0x9c,0x00,0xef,0x02,0x21,0x40,0x2d,0x70,0x02,0x1c,0x00,0xf7,0x10,0x29 }},
+ {16, 0xb250, 0, {0x40,0x08,0x70,0x22,0xfc,0xc0,0xa7,0x00,0x3d,0xc0,0x08,0x40,0x02,0xdc,0x00,0xb7 }},
+ {16, 0xb260, 0, {0x40,0x21,0xc0,0x0b,0x70,0x02,0xda,0x80,0xb7,0x24,0x29,0xc6,0x48,0xf0,0x02,0x2a }},
+ {16, 0xb270, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xa7,0x00,0x28,0x84 }},
+ {16, 0xb280, 0, {0x0b,0x30,0x02,0x0c,0x00,0x93,0x00,0x25,0x80,0x0a,0x61,0x02,0xdc,0x01,0xa7,0x10 }},
+ {16, 0xb290, 0, {0x24,0xc0,0x08,0x40,0x82,0xdc,0x00,0x9f,0x00,0x25,0xc4,0x0b,0x70,0x02,0x94,0x25 }},
+ {16, 0xb2a0, 0, {0xb7,0x32,0x23,0xc4,0x1b,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb2b0, 0, {0x20,0x14,0xcc,0x0c,0xa3,0x00,0x20,0x00,0x29,0x30,0x0a,0x0c,0x00,0xa3,0x00,0x6c }},
+ {16, 0xb2c0, 0, {0x00,0x08,0x10,0x42,0xcd,0x10,0xaa,0x00,0xac,0xc0,0x00,0x04,0x02,0xcd,0x00,0xbb }},
+ {16, 0xb2d0, 0, {0x10,0x24,0xc0,0x03,0x30,0x42,0xc3,0x09,0xb3,0x00,0x2c,0xd0,0x0a,0x30,0x02,0x18 }},
+ {16, 0xb2e0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0x80,0x00,0xef,0x00,0x3a,0x40 }},
+ {16, 0xb2f0, 0, {0x07,0xf0,0x43,0x3c,0x00,0x9f,0xc0,0xb6,0x14,0x0e,0x80,0x06,0xfc,0x01,0xcb,0x01 }},
+ {16, 0xb300, 0, {0x37,0xc0,0xac,0xb4,0x02,0xfc,0x00,0xd9,0x01,0x37,0xc0,0x4b,0xf0,0x13,0xae,0x08 }},
+ {16, 0xb310, 0, {0xfb,0x00,0x33,0xd0,0x2e,0xf0,0x0b,0x2a,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb320, 0, {0x80,0x00,0xec,0x00,0xfb,0x05,0x3e,0x40,0x0f,0x30,0x03,0xac,0x14,0xfb,0xa0,0x3a }},
+ {16, 0xb330, 0, {0xc0,0x0f,0x84,0x43,0xec,0x01,0xf9,0x40,0x3e,0xc0,0x0f,0xa2,0x03,0xec,0x21,0xf9 }},
+ {16, 0xb340, 0, {0x00,0x3a,0xc0,0x0f,0xb0,0x03,0xe4,0x20,0xf0,0x00,0xba,0xc0,0x0d,0xb0,0x03,0xe0 }},
+ {16, 0xb350, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf8,0x00,0xd7,0x01,0x35,0x68 }},
+ {16, 0xb360, 0, {0x6d,0xf0,0x03,0x3c,0x01,0xe7,0x00,0x33,0xc0,0x0d,0xc0,0x03,0xfc,0x24,0xcf,0x02 }},
+ {16, 0xb370, 0, {0x37,0xc0,0x0d,0xd2,0x02,0xfc,0x00,0xdf,0x01,0x33,0xc0,0x5e,0x70,0x33,0x1c,0x18 }},
+ {16, 0xb380, 0, {0xcf,0x41,0x31,0xc2,0x0c,0xf0,0x03,0x40,0x40,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb390, 0, {0x81,0x00,0x6c,0x00,0x8b,0x00,0x22,0x52,0x2a,0xb0,0x03,0x6c,0x00,0xab,0x00,0x28 }},
+ {16, 0xb3a0, 0, {0xc0,0x0a,0x8c,0x02,0xec,0x10,0x8b,0xe0,0x22,0xc0,0x0f,0x80,0x02,0xcc,0x00,0x8b }},
+ {16, 0xb3b0, 0, {0x80,0x22,0xc0,0x08,0xb0,0x02,0x2a,0x10,0xd9,0x80,0x22,0xc0,0xc8,0xb0,0x02,0xe0 }},
+ {16, 0xb3c0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x24,0x01,0x9b,0x00,0x26,0x80 }},
+ {16, 0xb3d0, 0, {0x29,0xb0,0x62,0x0c,0x00,0xab,0x01,0x6a,0x00,0x08,0x98,0x02,0xcc,0x00,0x9b,0x83 }},
+ {16, 0xb3e0, 0, {0x2e,0xc0,0xcb,0xb4,0x12,0xec,0x03,0x8b,0x80,0x28,0xc0,0x0a,0xb0,0x06,0xa2,0x00 }},
+ {16, 0xb3f0, 0, {0x8b,0x02,0x62,0xc0,0x08,0xb0,0x02,0xe0,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb400, 0, {0x08,0x04,0x0c,0x01,0x83,0x14,0x20,0x00,0x0a,0x30,0x02,0x4c,0x00,0x83,0x00,0x2a }},
+ {16, 0xb410, 0, {0x40,0x0a,0x10,0x00,0xcc,0x02,0x93,0x00,0x28,0xc0,0x0a,0x20,0x02,0xec,0x00,0x03 }},
+ {16, 0xb420, 0, {0x00,0x20,0xc0,0x08,0x30,0x16,0x00,0x80,0x91,0x00,0x60,0xc0,0x08,0x30,0x02,0xc2 }},
+ {16, 0xb430, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xdb,0x00,0x36,0x80 }},
+ {16, 0xb440, 0, {0x2d,0xf0,0x03,0x3c,0x00,0xaf,0x00,0x3a,0x80,0x0d,0x80,0x03,0xfc,0x00,0x5b,0x00 }},
+ {16, 0xb450, 0, {0x37,0xc0,0x09,0x90,0x03,0xfc,0x00,0xdf,0x00,0x33,0xc0,0x0a,0xf0,0x03,0xa4,0x20 }},
+ {16, 0xb460, 0, {0xcb,0x00,0xb3,0xc0,0x8c,0xb0,0x03,0x40,0x02,0x10,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb470, 0, {0xa0,0x1d,0xfc,0x04,0xff,0x20,0x0f,0x00,0x27,0xf0,0x03,0xfc,0x00,0xff,0x00,0x2d }},
+ {16, 0xb480, 0, {0x00,0x0b,0xd0,0x27,0xfc,0x00,0xef,0x00,0x37,0xc0,0x0f,0xc0,0x43,0xfc,0x00,0xff }},
+ {16, 0xb490, 0, {0x00,0x3f,0xc0,0x0d,0xf0,0x0b,0xe0,0x00,0xf5,0x00,0x3f,0xc0,0x1f,0xf0,0x03,0xe8 }},
+ {16, 0xb4a0, 0, {0x07,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xf4,0xc0,0xfc,0x22,0x7f,0xc0 }},
+ {16, 0xb4b0, 0, {0x0c,0xd0,0x43,0x36,0x00,0xc4,0x81,0x34,0xc0,0x1c,0x89,0x07,0xf2,0x80,0xcf,0x80 }},
+ {16, 0xb4c0, 0, {0x33,0x60,0x0f,0x79,0x03,0x3c,0xe0,0xcf,0x08,0x33,0x48,0x0d,0xc4,0x03,0xf0,0x50 }},
+ {16, 0xb4d0, 0, {0xdc,0x90,0x37,0xcc,0x0f,0xf8,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb4e0, 0, {0x80,0x10,0xe9,0x90,0xb8,0x80,0x7e,0xe4,0x88,0x99,0x0a,0x26,0x08,0xa9,0x80,0x22 }},
+ {16, 0xb4f0, 0, {0xf4,0x2c,0x99,0x03,0xa7,0x02,0x89,0x80,0x22,0x34,0x0b,0x9a,0x03,0x7d,0x00,0xdf }},
+ {16, 0xb500, 0, {0x48,0x2b,0x60,0x08,0x05,0x02,0xe5,0x00,0x82,0x20,0x22,0xc4,0x8b,0xb0,0x02,0xe0 }},
+ {16, 0xb510, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc5,0x00,0xb0,0x10,0x2c,0xc0 }},
+ {16, 0xb520, 0, {0x2a,0x00,0x02,0xa4,0x08,0xa8,0x04,0xe0,0x80,0x0b,0x00,0x02,0xc4,0x41,0xb2,0x04 }},
+ {16, 0xb530, 0, {0xa4,0x0a,0x0b,0xb0,0x02,0x8c,0x81,0x83,0x20,0x60,0x50,0x98,0x12,0x12,0x8b,0x80 }},
+ {16, 0xb540, 0, {0x89,0x00,0x2c,0xc8,0x0b,0x30,0x02,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb550, 0, {0xc0,0x11,0xac,0x20,0xbb,0x02,0x2a,0xc0,0x0a,0x88,0x02,0xa4,0x08,0xa9,0x80,0xa2 }},
+ {16, 0xb560, 0, {0xe1,0x1b,0x9c,0x22,0xe6,0x00,0xb8,0x40,0x26,0x30,0x0b,0x90,0x02,0xcc,0x01,0x93 }},
+ {16, 0xb570, 0, {0x04,0x2a,0x40,0x39,0x98,0x82,0xec,0x14,0x8b,0x65,0x2a,0xc0,0x0b,0xb2,0x02,0xf8 }},
+ {16, 0xb580, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe7,0x00,0xb8,0x48,0x2e,0x00 }},
+ {16, 0xb590, 0, {0x0e,0x88,0x43,0x84,0x00,0xe3,0xc1,0x36,0xe8,0x0f,0x9c,0x12,0xe2,0x80,0xf3,0xc0 }},
+ {16, 0xb5a0, 0, {0x36,0x70,0x5f,0xa8,0x23,0xac,0x01,0xcb,0x04,0x22,0x40,0x4d,0x84,0x03,0xe2,0x00 }},
+ {16, 0xb5b0, 0, {0xd8,0x00,0x3e,0xc0,0x0f,0x90,0x03,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb5c0, 0, {0xe0,0x01,0xb3,0x09,0xfe,0x10,0x3e,0x81,0x0d,0xc0,0x03,0x74,0x0c,0xff,0x00,0x3d }},
+ {16, 0xb5d0, 0, {0xc1,0x8c,0xd0,0x83,0x14,0x00,0xcd,0x20,0x3a,0x40,0x0d,0xca,0x01,0x7c,0x00,0xff }},
+ {16, 0xb5e0, 0, {0x00,0x1f,0x40,0x0e,0xc0,0x23,0xf2,0x46,0xfe,0x84,0x37,0xc0,0x0f,0xd8,0x03,0xf8 }},
+ {16, 0xb5f0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xdd,0x02,0x3d,0x40 }},
+ {16, 0xb600, 0, {0x0e,0x90,0x03,0xac,0x00,0xeb,0x48,0x3e,0xd0,0x0c,0x80,0x63,0xa2,0x08,0xca,0x00 }},
+ {16, 0xb610, 0, {0x32,0x08,0x0c,0xb0,0x03,0xac,0x08,0xeb,0x00,0x3e,0x40,0x0c,0xd4,0x83,0x58,0x20 }},
+ {16, 0xb620, 0, {0xf9,0x42,0x32,0xc0,0x0c,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb630, 0, {0xc8,0x05,0x28,0x02,0xdb,0x00,0x2e,0xe0,0x28,0x3a,0x02,0x2e,0x00,0xdb,0x60,0x76 }},
+ {16, 0xb640, 0, {0xe0,0x0d,0x8c,0x02,0xe0,0x00,0x88,0x02,0x36,0x58,0x68,0x15,0x83,0x7c,0x08,0xbf }},
+ {16, 0xb650, 0, {0x00,0x2d,0x60,0x08,0x90,0x02,0xa9,0x00,0xb3,0x05,0x23,0xc0,0x08,0xb0,0x02,0xf2 }},
+ {16, 0xb660, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x10,0x80,0x00,0x0c,0xc1 }},
+ {16, 0xb670, 0, {0x08,0x1c,0x82,0x06,0x00,0x93,0xc0,0x20,0xf6,0x0a,0x20,0x02,0x08,0x00,0x93,0x00 }},
+ {16, 0xb680, 0, {0x24,0x60,0x09,0x3c,0x02,0x0c,0x00,0x83,0x00,0x2c,0x60,0x09,0x01,0x12,0x00,0x40 }},
+ {16, 0xb690, 0, {0xb0,0x00,0xe0,0xc0,0x08,0x30,0x02,0x70,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb6a0, 0, {0x20,0x41,0x0a,0x40,0x86,0x81,0x2d,0xe0,0x58,0x18,0x0a,0x16,0xa0,0x97,0x80,0x25 }},
+ {16, 0xb6b0, 0, {0xe9,0x19,0x78,0x82,0xd6,0x00,0x97,0x80,0x25,0xa0,0x19,0xf8,0x02,0x5e,0x00,0xb7 }},
+ {16, 0xb6c0, 0, {0x80,0x2d,0x60,0x28,0x48,0x12,0x96,0x00,0xb4,0x80,0x21,0xe0,0x28,0x78,0x02,0xc8 }},
+ {16, 0xb6d0, 0, {0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x81,0x30,0x3c,0xc2 }},
+ {16, 0xb6e0, 0, {0x0e,0x00,0x02,0x84,0x00,0xe3,0x40,0x28,0xe8,0x4c,0x29,0x03,0x0c,0x00,0xd3,0x00 }},
+ {16, 0xb6f0, 0, {0x34,0xc4,0x0d,0x31,0x03,0x8c,0x08,0xe3,0x00,0x3c,0x46,0x0c,0x20,0x03,0x00,0x80 }},
+ {16, 0xb700, 0, {0xf2,0x00,0x32,0xc0,0x0c,0x30,0x03,0xd2,0x02,0x10,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb710, 0, {0x40,0x19,0xb8,0x00,0xff,0x10,0x2f,0xc0,0x0f,0xc0,0x23,0xc4,0x80,0x7f,0x10,0x3e }},
+ {16, 0xb720, 0, {0xc0,0x0f,0xb1,0x03,0xdc,0x00,0xe7,0x00,0x3f,0x80,0x06,0xf1,0x43,0xfc,0x00,0xff }},
+ {16, 0xb730, 0, {0x08,0x7d,0x50,0x0e,0xe1,0x23,0xb4,0x08,0xfe,0x10,0x3f,0xc4,0x0f,0xf0,0x03,0xd0 }},
+ {16, 0xb740, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x02,0xcc,0x00,0x3e,0x00 }},
+ {16, 0xb750, 0, {0x2c,0xc0,0x03,0x04,0x01,0xcb,0x00,0x33,0x60,0x2c,0x90,0x13,0xe8,0x00,0x73,0x00 }},
+ {16, 0xb760, 0, {0xb2,0xc1,0x0f,0xa0,0x03,0xec,0x80,0xfb,0x28,0x3e,0x54,0x1f,0xd0,0x03,0xfe,0x02 }},
+ {16, 0xb770, 0, {0xc9,0x80,0x32,0xc0,0x0f,0xb0,0x03,0xca,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb780, 0, {0x48,0x11,0x80,0x00,0x86,0x00,0x2d,0x80,0x08,0x20,0x02,0x14,0x08,0x87,0x00,0x29 }},
+ {16, 0xb790, 0, {0x40,0x08,0x70,0x02,0xdc,0x00,0xb7,0x00,0x21,0xc0,0x0b,0x60,0x02,0x5c,0xa0,0x97 }},
+ {16, 0xb7a0, 0, {0x20,0x2d,0x48,0x0b,0x50,0x02,0xdc,0x10,0x8d,0x00,0x21,0xc8,0x0b,0x70,0x02,0xd2 }},
+ {16, 0xb7b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9f,0x00,0x85,0x81,0x2c,0x60 }},
+ {16, 0xb7c0, 0, {0x18,0x58,0x02,0xde,0x20,0xb7,0x82,0x28,0x60,0x5a,0x78,0x52,0xde,0x10,0xbf,0x80 }},
+ {16, 0xb7d0, 0, {0x21,0xe0,0x4b,0x78,0x06,0xde,0x40,0xb7,0xa0,0x2d,0x69,0x9b,0x78,0x12,0xce,0x00 }},
+ {16, 0xb7e0, 0, {0x87,0x80,0xe1,0xe4,0x0b,0x78,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb7f0, 0, {0x48,0x14,0xee,0x00,0x83,0x00,0x2c,0xc2,0x08,0x36,0x02,0x8c,0x08,0x83,0xf0,0x68 }},
+ {16, 0xb800, 0, {0x40,0x0a,0x3e,0x02,0xcd,0x40,0xb3,0x00,0x20,0xe0,0x0b,0x32,0x06,0x4c,0x00,0x9b }},
+ {16, 0xb810, 0, {0x00,0x0c,0x40,0x0b,0x30,0x02,0xcd,0x80,0x83,0x08,0x20,0xc0,0x0b,0xb1,0x02,0xda }},
+ {16, 0xb820, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x00,0xce,0x08,0x3f,0xb0 }},
+ {16, 0xb830, 0, {0x0c,0xe4,0x23,0xda,0x02,0xde,0x40,0xbb,0xb2,0x0e,0xe2,0x43,0xfa,0x00,0xfe,0x00 }},
+ {16, 0xb840, 0, {0x33,0x90,0x0b,0xe0,0x03,0xe8,0x00,0xfa,0x00,0x3e,0x81,0x0b,0xe0,0x13,0xf9,0x08 }},
+ {16, 0xb850, 0, {0xce,0x40,0x32,0x80,0x0f,0xa8,0x03,0xfa,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb860, 0, {0x48,0x00,0xe0,0x24,0x98,0x08,0x3c,0x04,0x0f,0x00,0x0b,0x60,0x00,0xf8,0x40,0x2e }},
+ {16, 0xb870, 0, {0x03,0x0d,0x80,0x03,0xe0,0x00,0xf8,0x00,0x3e,0x06,0x0b,0x80,0x03,0xe0,0x00,0xd8 }},
+ {16, 0xb880, 0, {0x00,0x3c,0x00,0x03,0x8c,0x23,0xe1,0x00,0xf8,0x00,0x7e,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0xb890, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x02,0xc9,0x00,0x3e,0x40 }},
+ {16, 0xb8a0, 0, {0x8c,0x90,0x03,0x25,0x00,0xe9,0x80,0x32,0x44,0x0f,0x94,0x02,0xe4,0x20,0xf9,0x00 }},
+ {16, 0xb8b0, 0, {0x32,0x70,0x0f,0x9a,0x43,0xe4,0x00,0xf9,0x00,0x32,0x40,0x0c,0x10,0x33,0x24,0x10 }},
+ {16, 0xb8c0, 0, {0xf9,0x01,0x3e,0x40,0x0f,0x90,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb8d0, 0, {0x80,0x04,0x64,0x00,0x89,0x82,0x2e,0x40,0x28,0x90,0x02,0x24,0x82,0x81,0xc0,0xa2 }},
+ {16, 0xb8e0, 0, {0x70,0x0b,0x9c,0x02,0xe4,0x00,0x31,0x42,0xa2,0x60,0x0b,0x94,0x82,0xe4,0x00,0xb9 }},
+ {16, 0xb8f0, 0, {0x00,0x2a,0x40,0x08,0x94,0xa2,0x25,0x00,0xb9,0x00,0x2e,0x40,0x0b,0x90,0x0a,0x20 }},
+ {16, 0xb900, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0x89,0x64,0x2e,0x40 }},
+ {16, 0xb910, 0, {0x08,0x90,0x42,0xa4,0x00,0x89,0x60,0x22,0x42,0x0b,0x90,0x02,0xe6,0x00,0xb9,0x80 }},
+ {16, 0xb920, 0, {0x22,0x40,0x0b,0x90,0x02,0xa4,0x04,0xb9,0x00,0x22,0x40,0x28,0x90,0x02,0x24,0x04 }},
+ {16, 0xb930, 0, {0xb9,0x00,0x2e,0x40,0x0b,0x90,0x02,0x0e,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb940, 0, {0x08,0x04,0x05,0x80,0x81,0x00,0x2c,0xc1,0x48,0x10,0x02,0xa4,0x02,0x81,0x00,0x20 }},
+ {16, 0xb950, 0, {0x40,0x83,0x34,0x02,0xc4,0x00,0xbb,0x00,0x20,0xd0,0x0b,0x14,0x02,0xc4,0x80,0xb1 }},
+ {16, 0xb960, 0, {0x20,0xa0,0x68,0x18,0x14,0x1a,0x0d,0x00,0xb1,0x40,0x2c,0x50,0x0b,0x10,0x02,0x0a }},
+ {16, 0xb970, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xc8,0x00,0x3e,0x00 }},
+ {16, 0xb980, 0, {0x8c,0x80,0x0b,0xa0,0x04,0xe8,0x00,0x32,0x00,0x07,0x80,0x03,0xe0,0x00,0xf8,0x00 }},
+ {16, 0xb990, 0, {0x32,0x00,0x1f,0x80,0x03,0xa1,0x40,0xf8,0x50,0x32,0x00,0x0c,0x80,0x03,0x20,0x00 }},
+ {16, 0xb9a0, 0, {0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb9b0, 0, {0x98,0x1d,0xf4,0x46,0xfd,0x40,0x3f,0x50,0x23,0xd4,0x13,0x74,0x04,0xf5,0x02,0x3f }},
+ {16, 0xb9c0, 0, {0x50,0x0f,0xd4,0x03,0xfd,0x00,0xbd,0x00,0x2f,0x50,0x0f,0xd0,0x03,0xe4,0x40,0xf9 }},
+ {16, 0xb9d0, 0, {0x10,0x3f,0x44,0x0f,0xd4,0x03,0xf5,0x08,0xfd,0x06,0x3e,0x50,0x0f,0xd2,0x83,0xe6 }},
+ {16, 0xb9e0, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xe6,0x40,0xed,0x04,0x3e,0x48 }},
+ {16, 0xb9f0, 0, {0x0c,0xb2,0x83,0xf4,0x00,0xc1,0x00,0x32,0x40,0x8c,0xd0,0x03,0x34,0x00,0xfd,0x00 }},
+ {16, 0xba00, 0, {0x37,0x40,0x0f,0xd0,0x03,0xe6,0x20,0xf9,0x88,0x3d,0x62,0x0c,0xd8,0x03,0xfe,0x24 }},
+ {16, 0xba10, 0, {0xc1,0x00,0x3e,0x78,0x0f,0xd0,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xba20, 0, {0x38,0x10,0xe1,0x00,0x88,0x40,0x2e,0x10,0x08,0xc4,0x23,0xa0,0x08,0x88,0x06,0x2a }},
+ {16, 0xba30, 0, {0x14,0x08,0x80,0x03,0x60,0x04,0xb8,0x00,0x22,0x00,0x0b,0x80,0x02,0xe2,0x00,0xb8 }},
+ {16, 0xba40, 0, {0x80,0x2e,0x00,0x08,0x8c,0x02,0xe3,0x80,0x88,0x02,0x2e,0x38,0x0b,0x88,0x02,0x0e }},
+ {16, 0xba50, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x80,0xa1,0xc0,0x2d,0x70 }},
+ {16, 0xba60, 0, {0x08,0x50,0x42,0xc4,0x00,0xa9,0x00,0x20,0xe0,0x2a,0x10,0x0a,0x04,0x10,0xb1,0x00 }},
+ {16, 0xba70, 0, {0x24,0x40,0x4b,0x10,0x06,0xc4,0x20,0xb1,0x08,0x6e,0x40,0x0b,0x16,0x82,0xc4,0x20 }},
+ {16, 0xba80, 0, {0x81,0x00,0x2c,0x50,0x0b,0x92,0x82,0x52,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xba90, 0, {0x18,0x11,0xa4,0x00,0xa9,0x01,0x2e,0x40,0x28,0xd0,0x20,0xa4,0x04,0xa9,0x00,0x2a }},
+ {16, 0xbaa0, 0, {0x40,0x1a,0xb0,0x12,0x24,0x00,0xb9,0x0c,0x22,0x42,0x0b,0x94,0x02,0xe4,0x00,0xb9 }},
+ {16, 0xbab0, 0, {0x00,0x6e,0x40,0x0b,0x96,0x02,0xe4,0x11,0x89,0x20,0x6e,0x40,0x0b,0x90,0x02,0x46 }},
+ {16, 0xbac0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0xc0,0xa9,0xc0,0x3e,0x50 }},
+ {16, 0xbad0, 0, {0x08,0x9c,0x83,0xe4,0x02,0xe9,0x00,0xb2,0x40,0x2a,0x92,0x12,0x26,0x40,0xf9,0x40 }},
+ {16, 0xbae0, 0, {0x36,0x70,0x0f,0x94,0x03,0xe4,0x04,0xf9,0x01,0x3c,0x40,0x0f,0x98,0x03,0xe6,0x02 }},
+ {16, 0xbaf0, 0, {0xc9,0x22,0x3e,0x40,0x0f,0x10,0x02,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbb00, 0, {0x28,0x01,0x86,0x04,0xd9,0x40,0x1c,0x40,0x0f,0x92,0x23,0xa4,0xb0,0xdb,0x04,0x3c }},
+ {16, 0xbb10, 0, {0xc0,0x0d,0x9a,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x44,0x0f,0x90,0x03,0xe4,0x00,0xf9 }},
+ {16, 0xbb20, 0, {0x00,0x3e,0x42,0x2c,0x90,0x23,0xe4,0x80,0xf9,0x00,0x3e,0x40,0x8f,0x92,0x03,0x92 }},
+ {16, 0xbb30, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x00,0xc8,0x20,0x32,0x00 }},
+ {16, 0xbb40, 0, {0x4c,0xc0,0x8b,0x20,0x02,0xc8,0x31,0x32,0x20,0x2d,0x84,0x03,0xe1,0x04,0xf8,0x48 }},
+ {16, 0xbb50, 0, {0xba,0x00,0x0f,0x89,0x03,0xe0,0x00,0xc8,0x00,0x32,0x00,0x0d,0x81,0x13,0x20,0x10 }},
+ {16, 0xbb60, 0, {0xf8,0x00,0x3a,0x00,0x0f,0x81,0x23,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbb70, 0, {0x28,0x05,0x28,0x00,0x0e,0x40,0x22,0x80,0x28,0xa4,0x02,0x19,0x00,0x52,0x80,0xa2 }},
+ {16, 0xbb80, 0, {0x80,0x4d,0xed,0x82,0xe8,0x00,0xb6,0x42,0x23,0xbd,0x0b,0xe8,0x02,0xe8,0x04,0xda }},
+ {16, 0xbb90, 0, {0x00,0x37,0x80,0x08,0xe0,0x02,0x3a,0x20,0xba,0x00,0x22,0x80,0x0b,0xa8,0x0a,0x0a }},
+ {16, 0xbba0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x83,0x80,0x60,0xc0 }},
+ {16, 0xbbb0, 0, {0x08,0x29,0x02,0x0d,0x00,0x92,0x40,0x24,0xc0,0x08,0xb4,0x02,0xcc,0x00,0xb3,0x00 }},
+ {16, 0xbbc0, 0, {0x68,0xe0,0x1b,0x30,0x02,0xcc,0x00,0x93,0x01,0x24,0xc0,0x69,0x38,0x02,0x6c,0x00 }},
+ {16, 0xbbd0, 0, {0xb3,0x00,0x2c,0xc0,0x0b,0x30,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbbe0, 0, {0xa0,0x01,0x1c,0x40,0x83,0xc0,0x20,0x40,0x08,0x28,0x06,0x9c,0x18,0x9c,0x02,0x24 }},
+ {16, 0xbbf0, 0, {0xc0,0x09,0x70,0x02,0xd4,0x00,0xb7,0x00,0x21,0xc0,0x0b,0x70,0x02,0xce,0x40,0x97 }},
+ {16, 0xbc00, 0, {0xb0,0x25,0x40,0x08,0x78,0x1a,0x58,0x00,0xbf,0xa2,0x65,0xc8,0x0b,0x78,0x02,0x20 }},
+ {16, 0xbc10, 0, {0x04,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x0e,0x02,0x87,0x80,0xb1,0xa0 }},
+ {16, 0xbc20, 0, {0x0c,0x68,0x03,0x1a,0x08,0xd6,0x92,0x35,0xe4,0x28,0x78,0x42,0xd6,0x10,0xf5,0x80 }},
+ {16, 0xbc30, 0, {0x39,0xa0,0x0f,0x78,0x23,0xde,0x30,0xd3,0xa2,0x35,0xa0,0x4d,0xe8,0x03,0x5e,0x00 }},
+ {16, 0xbc40, 0, {0xf7,0xd0,0x3d,0xf8,0x0f,0xf0,0x03,0x22,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbc50, 0, {0x08,0x1d,0xac,0x00,0xfb,0x04,0x3e,0x00,0x0b,0xa0,0x03,0x48,0x04,0xfa,0x41,0x3a }},
+ {16, 0xbc60, 0, {0x50,0x0f,0xb0,0x03,0xe4,0x00,0xf1,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0xed,0x88,0xfb }},
+ {16, 0xbc70, 0, {0x4d,0x3e,0x00,0x0f,0xf0,0x03,0xbc,0x08,0xfb,0x20,0x3a,0xc0,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0xbc80, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xdc,0x80,0xb3,0xe0 }},
+ {16, 0xbc90, 0, {0x0c,0xd8,0x03,0xce,0x00,0xc8,0xa0,0x31,0xa0,0x8d,0xe9,0x03,0xbe,0x00,0xb2,0x80 }},
+ {16, 0xbca0, 0, {0x33,0xe0,0x0c,0xe8,0x43,0x7e,0x04,0x0f,0x81,0x31,0xe4,0x0c,0xd8,0x03,0xf6,0x00 }},
+ {16, 0xbcb0, 0, {0xff,0x80,0x3f,0xe0,0x0f,0xf8,0x03,0x00,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbcc0, 0, {0xa8,0x11,0x9c,0x00,0xb4,0x40,0x35,0x40,0x08,0x50,0x82,0xde,0x80,0xd4,0x90,0x21 }},
+ {16, 0xbcd0, 0, {0xe0,0x0d,0x51,0x02,0xd4,0x40,0xb6,0xb0,0x2b,0x90,0x0e,0xe5,0x02,0x9c,0x40,0xd7 }},
+ {16, 0xbce0, 0, {0x22,0x19,0x5c,0x0d,0x70,0x02,0xd8,0x00,0xb7,0x20,0x2d,0xc0,0x0b,0xf0,0x03,0x6a }},
+ {16, 0xbcf0, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0x93,0x10,0x21,0x80 }},
+ {16, 0xbd00, 0, {0x08,0x58,0x02,0xdc,0xc0,0x94,0x00,0x23,0xd0,0x08,0x70,0xa0,0xd4,0x20,0xb5,0x02 }},
+ {16, 0xbd10, 0, {0x29,0x80,0x09,0x60,0x82,0x0c,0x00,0x87,0x02,0x25,0xc0,0x19,0x40,0x02,0xd4,0x00 }},
+ {16, 0xbd20, 0, {0xb7,0x00,0x6d,0xc0,0x0b,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbd30, 0, {0x20,0x14,0xec,0x00,0xb3,0xc0,0x20,0x01,0x48,0x18,0x02,0xcc,0x02,0x81,0x44,0xa0 }},
+ {16, 0xbd40, 0, {0xc0,0x89,0x38,0x02,0xc7,0x80,0xb1,0x00,0x2c,0x09,0x4a,0x00,0x62,0xac,0x09,0x93 }},
+ {16, 0xbd50, 0, {0x01,0x28,0x40,0x19,0x30,0x02,0xcd,0x10,0xb3,0x90,0x2c,0xc0,0x0b,0x30,0x02,0xc8 }},
+ {16, 0xbd60, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x20,0xdb,0x62,0x22,0xe0 }},
+ {16, 0xbd70, 0, {0x6c,0xa0,0x03,0xe4,0x00,0x98,0x00,0x32,0xc0,0xec,0x98,0x23,0xae,0x08,0xfb,0x08 }},
+ {16, 0xbd80, 0, {0x3a,0x78,0x09,0x90,0x03,0x7c,0x10,0xcf,0x00,0x26,0x40,0x0c,0xb0,0x03,0xec,0x00 }},
+ {16, 0xbd90, 0, {0xff,0x80,0x3f,0xc0,0x0f,0x90,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbda0, 0, {0x80,0x00,0xec,0x20,0xfb,0x48,0x3c,0x61,0x0f,0xa0,0x43,0xed,0x00,0xf8,0x24,0x3e }},
+ {16, 0xbdb0, 0, {0x50,0x0f,0x90,0x83,0xe4,0x00,0xfb,0x00,0x3a,0x50,0x0f,0x80,0x43,0xec,0x08,0xfb }},
+ {16, 0xbdc0, 0, {0x00,0x3e,0x40,0x0f,0x40,0x03,0xf0,0x00,0xfb,0x00,0x3e,0xc1,0x0f,0x90,0x03,0x60 }},
+ {16, 0xbdd0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xdd,0xa0,0x32,0x80 }},
+ {16, 0xbde0, 0, {0x0c,0xe0,0x01,0xfc,0x00,0xdc,0x91,0x39,0xc0,0x3c,0x40,0x03,0x34,0x00,0xff,0x80 }},
+ {16, 0xbdf0, 0, {0x3f,0x00,0x0f,0xd0,0x07,0xfc,0x00,0xcb,0x00,0x3d,0x40,0x0c,0xe0,0x03,0x38,0x20 }},
+ {16, 0xbe00, 0, {0xcf,0x02,0x3d,0xc0,0x0c,0xd0,0x03,0x08,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbe10, 0, {0x81,0x04,0x6c,0x00,0x01,0x40,0x22,0x00,0x28,0xa0,0x02,0xce,0x86,0x83,0x64,0x22 }},
+ {16, 0xbe20, 0, {0xf4,0x08,0x8c,0x0f,0x64,0x00,0xbb,0x10,0x2e,0x60,0x0b,0x9c,0x03,0xac,0x01,0xdb }},
+ {16, 0xbe30, 0, {0x00,0x3e,0x60,0x08,0x8f,0x02,0x23,0x40,0x8b,0x00,0x3a,0xc0,0x0d,0x10,0x43,0x68 }},
+ {16, 0xbe40, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x99,0x00,0xa2,0xc0 }},
+ {16, 0xbe50, 0, {0x08,0x90,0x02,0xa6,0x07,0x98,0x00,0x02,0xc2,0x48,0x88,0x02,0x2c,0x00,0xba,0x02 }},
+ {16, 0xbe60, 0, {0x6e,0x60,0x0a,0x98,0x02,0xec,0x00,0x8b,0x01,0x2e,0x60,0x08,0x90,0x02,0x05,0x00 }},
+ {16, 0xbe70, 0, {0x8b,0x00,0x2e,0xc0,0x08,0xb1,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbe80, 0, {0x08,0x04,0x0c,0x10,0x81,0x00,0x20,0x40,0x28,0x10,0x26,0xcc,0x80,0x80,0x20,0xa0 }},
+ {16, 0xbe90, 0, {0xcc,0x18,0x14,0x42,0x04,0x00,0xb2,0x20,0x6c,0x40,0x0b,0x00,0x02,0x8c,0x00,0x83 }},
+ {16, 0xbea0, 0, {0x00,0x28,0x40,0x28,0x00,0x02,0x00,0x00,0x83,0x00,0x28,0xc0,0x09,0xb0,0x02,0x42 }},
+ {16, 0xbeb0, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xd9,0x00,0x22,0x80 }},
+ {16, 0xbec0, 0, {0x0c,0x90,0x03,0xac,0x80,0xda,0x29,0x2a,0xd2,0x28,0x80,0x02,0x24,0x00,0xfb,0x20 }},
+ {16, 0xbed0, 0, {0x3e,0x00,0x0f,0x90,0x02,0xfc,0x00,0x8f,0x00,0x2e,0x40,0x0c,0x80,0x0b,0x20,0x02 }},
+ {16, 0xbee0, 0, {0xcf,0x00,0x3e,0xc0,0x0c,0xb0,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbef0, 0, {0xa0,0x1d,0xfc,0x00,0xfd,0x00,0x3f,0x00,0x0f,0xd0,0x63,0xfc,0x49,0xf5,0x00,0x3e }},
+ {16, 0xbf00, 0, {0xc0,0x0b,0xc0,0x01,0xf4,0x00,0x7f,0x40,0x3f,0x40,0x1f,0xd0,0x03,0xbc,0x00,0xff }},
+ {16, 0xbf10, 0, {0x00,0x3f,0x40,0x0f,0xc0,0x03,0xf0,0x00,0xff,0x00,0x3b,0xc0,0x0f,0xf0,0x03,0xe8 }},
+ {16, 0xbf20, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xf2,0x40,0xec,0xa0,0x3f,0xe0 }},
+ {16, 0xbf30, 0, {0x0d,0x48,0x03,0x7d,0x80,0xf4,0x80,0x33,0x6c,0x0e,0xc8,0x03,0x32,0x00,0xdd,0x90 }},
+ {16, 0xbf40, 0, {0x3b,0xa0,0x2d,0xf0,0x03,0xfc,0xc0,0xff,0x00,0x3b,0xe0,0x8e,0xf0,0x03,0x3c,0x04 }},
+ {16, 0xbf50, 0, {0xec,0x60,0x31,0x00,0x0c,0xf0,0x03,0xb0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbf60, 0, {0x80,0x10,0xec,0x00,0xd9,0xc1,0x2e,0xe1,0x0d,0x88,0x02,0x3c,0x80,0xf8,0x80,0x36 }},
+ {16, 0xbf70, 0, {0x7d,0x18,0xa0,0x02,0x28,0xb0,0xea,0x20,0x22,0x20,0x08,0x77,0x02,0xfd,0x50,0xbb }},
+ {16, 0xbf80, 0, {0x80,0x22,0x40,0x0b,0xf4,0x42,0x3d,0x80,0x88,0x31,0x22,0x12,0x08,0xf6,0x02,0xe0 }},
+ {16, 0xbf90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0x80,0x11,0x2e,0xc1 }},
+ {16, 0xbfa0, 0, {0x08,0x00,0x02,0x4d,0x80,0xb8,0x00,0x20,0x00,0x0a,0x02,0x82,0x00,0x00,0x99,0x20 }},
+ {16, 0xbfb0, 0, {0x22,0xc0,0x09,0x30,0x82,0xcc,0x00,0xb3,0x00,0x28,0xca,0x0b,0x34,0x82,0x0d,0x20 }},
+ {16, 0xbfc0, 0, {0x80,0x00,0xa0,0x8c,0x08,0x34,0x82,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbfd0, 0, {0xc0,0x15,0xac,0x40,0x99,0x80,0x2e,0xc2,0x09,0x94,0x02,0x2c,0x00,0xa9,0x80,0x26 }},
+ {16, 0xbfe0, 0, {0x60,0x08,0x38,0x42,0x22,0x20,0xba,0x41,0x62,0x46,0x3b,0xb0,0x02,0xec,0x01,0xbb }},
+ {16, 0xbff0, 0, {0x80,0x22,0x40,0x0b,0xb0,0x46,0x0c,0x18,0x88,0xc0,0x22,0x22,0x08,0xb0,0x06,0xf0 }},
+ {16, 0xc000, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xcc,0x00,0xc9,0x81,0x3c,0xc1 }},
+ {16, 0xc010, 0, {0x0c,0xa9,0x23,0x6c,0x00,0xb2,0x80,0x32,0x78,0x0a,0x8a,0x0b,0x26,0x00,0x99,0x01 }},
+ {16, 0xc020, 0, {0x30,0xe0,0x0d,0xb0,0x03,0xec,0x00,0xb9,0x00,0x3a,0xc0,0x1e,0xb0,0x03,0x2c,0x00 }},
+ {16, 0xc030, 0, {0xcb,0x80,0x32,0x61,0x0c,0xb0,0x13,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc040, 0, {0xe0,0x01,0xbc,0x10,0xdd,0x00,0x3f,0xc2,0x0f,0xe8,0x03,0xac,0x00,0xfe,0x00,0x3d }},
+ {16, 0xc050, 0, {0x40,0x0f,0xc0,0x43,0xf8,0x10,0xef,0x14,0xb7,0xe0,0x0c,0xf0,0x03,0xfc,0x00,0xf5 }},
+ {16, 0xc060, 0, {0x02,0x3f,0x44,0x4f,0xb0,0x4b,0xfc,0x02,0xd4,0x04,0x3d,0x40,0x2f,0xf0,0x03,0xf8 }},
+ {16, 0xc070, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xf9,0x08,0x3e,0x60 }},
+ {16, 0xc080, 0, {0x0d,0xa0,0x03,0xac,0x00,0xe8,0x50,0x32,0x00,0x0c,0x84,0x03,0xa5,0x00,0xe9,0x00 }},
+ {16, 0xc090, 0, {0x3a,0xd8,0x0f,0xb0,0x03,0x2c,0x00,0xf9,0x00,0x3a,0xc0,0x0f,0x30,0x03,0x2c,0x00 }},
+ {16, 0xc0a0, 0, {0xcb,0x44,0x3e,0xd4,0x0e,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc0b0, 0, {0xc8,0x05,0x2c,0x08,0xb9,0x80,0x2e,0xc0,0x0a,0x30,0x42,0x3c,0x00,0x89,0x04,0x76 }},
+ {16, 0xc0c0, 0, {0x60,0x08,0x90,0x62,0x20,0x00,0x82,0x04,0x22,0xd0,0x08,0xf0,0x43,0x7c,0x00,0xbb }},
+ {16, 0xc0d0, 0, {0x82,0x22,0x40,0x0b,0xf0,0x42,0x3c,0x00,0x8a,0xc0,0x2e,0xc1,0x08,0xf0,0x02,0xf2 }},
+ {16, 0xc0e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x10,0xb2,0xd0,0x2c,0xc0 }},
+ {16, 0xc0f0, 0, {0x29,0x18,0x02,0x8c,0x04,0xa1,0x00,0x24,0x9c,0x08,0x10,0x02,0x80,0x00,0xa1,0x01 }},
+ {16, 0xc100, 0, {0x0c,0xc1,0x2b,0x30,0x52,0x8c,0x04,0xb3,0x01,0x28,0x40,0x4b,0x30,0x02,0x4c,0x00 }},
+ {16, 0xc110, 0, {0x90,0x20,0x2c,0x20,0x0a,0x30,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc120, 0, {0x20,0x41,0x1e,0x00,0xb7,0xa2,0x25,0xe8,0x8a,0x68,0x02,0x1e,0x00,0x85,0x80,0x25 }},
+ {16, 0xc130, 0, {0x80,0x88,0xe8,0x02,0x3e,0x00,0x85,0x80,0x2f,0xe4,0x28,0x78,0x02,0xde,0x00,0xb7 }},
+ {16, 0xc140, 0, {0x80,0x61,0xe0,0x03,0x78,0x02,0x5e,0x82,0xb7,0x82,0x2d,0xe0,0x08,0x78,0x02,0xc8 }},
+ {16, 0xc150, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0d,0x00,0xf0,0x10,0x3c,0x80 }},
+ {16, 0xc160, 0, {0x0d,0x10,0x83,0x8c,0x00,0xe2,0x50,0x26,0x04,0x0c,0x11,0x03,0x88,0x40,0xeb,0x00 }},
+ {16, 0xc170, 0, {0x3c,0xc4,0x0f,0x30,0x03,0x8c,0x00,0xf3,0x08,0x38,0x40,0x07,0x30,0x03,0x6e,0x40 }},
+ {16, 0xc180, 0, {0xd0,0x08,0x3c,0x88,0x0e,0x30,0x43,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc190, 0, {0x40,0x1d,0xbc,0x00,0xfb,0x34,0x3c,0xc9,0x4e,0xb0,0x23,0xed,0x20,0xfb,0x04,0x3f }},
+ {16, 0xc1a0, 0, {0xc8,0x8f,0x70,0x53,0x4c,0x00,0xeb,0x10,0x31,0xc5,0x0e,0xf4,0x03,0x6d,0x00,0xf3 }},
+ {16, 0xc1b0, 0, {0x00,0x3f,0xc0,0x0f,0xf4,0x0b,0xbc,0x00,0xcd,0x00,0x3f,0xc0,0x0f,0xf4,0x83,0xd0 }},
+ {16, 0xc1c0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xce,0x04,0xc9,0x04,0xb0,0xc1 }},
+ {16, 0xc1d0, 0, {0x0f,0x98,0x13,0x6c,0x90,0xcb,0x02,0x3e,0xc0,0x4f,0xb0,0x63,0xe4,0x00,0xf1,0x80 }},
+ {16, 0xc1e0, 0, {0x12,0xc0,0x0c,0xb5,0x03,0xec,0xc0,0xcf,0x83,0x32,0x40,0x0f,0xb3,0x23,0x2d,0xa4 }},
+ {16, 0xc1f0, 0, {0xfb,0x00,0x3e,0x00,0x0f,0xb4,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc200, 0, {0x48,0x11,0x9c,0x00,0x87,0x00,0x21,0xc0,0x2d,0x60,0x02,0x1c,0x00,0xd7,0x00,0x39 }},
+ {16, 0xc210, 0, {0xc0,0x0b,0x60,0x02,0xdc,0x00,0xb5,0x00,0x21,0xc0,0x2a,0x70,0x12,0xcc,0x80,0x87 }},
+ {16, 0xc220, 0, {0x00,0x35,0xc0,0x0b,0x72,0x52,0x1c,0x00,0xb7,0x00,0x2d,0x41,0x0b,0x32,0x02,0x12 }},
+ {16, 0xc230, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0xbe,0x00,0x81,0xc0,0x23,0x20 }},
+ {16, 0xc240, 0, {0x0b,0xd8,0x02,0x5e,0x00,0x06,0xc0,0x2d,0xa0,0x0b,0x7c,0x12,0xde,0x08,0xbf,0x80 }},
+ {16, 0xc250, 0, {0xa1,0xe2,0x2a,0x7a,0x02,0xde,0x00,0x93,0x80,0x25,0x60,0x0b,0x78,0x1e,0x5e,0x50 }},
+ {16, 0xc260, 0, {0xb7,0x80,0x2d,0xa0,0x0b,0x78,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc270, 0, {0x48,0x14,0xce,0x00,0x83,0x60,0x20,0xc0,0x09,0x31,0x02,0x2c,0x00,0x93,0x00,0x28 }},
+ {16, 0xc280, 0, {0xc0,0x1b,0xb0,0x06,0xcc,0x80,0xb3,0x48,0x20,0xf0,0x0a,0x30,0x02,0xec,0x00,0x93 }},
+ {16, 0xc290, 0, {0x80,0x24,0xc0,0x0b,0xb0,0x02,0x4c,0x10,0xb3,0xc8,0x2c,0xd2,0x8b,0x30,0x02,0x12 }},
+ {16, 0xc2a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xbb,0x00,0xc6,0xc4,0x31,0x81 }},
+ {16, 0xc2b0, 0, {0x0f,0xe0,0x03,0x68,0x00,0xce,0x80,0x3f,0xa2,0x0b,0xe8,0x03,0xf9,0x00,0xfe,0x40 }},
+ {16, 0xc2c0, 0, {0x31,0x80,0x6e,0xa0,0x07,0xe8,0x00,0xda,0x00,0x26,0x81,0x0f,0xa0,0x02,0x68,0x01 }},
+ {16, 0xc2d0, 0, {0xf6,0xe0,0x3d,0x92,0x0f,0xa0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc2e0, 0, {0x48,0x00,0xe0,0xc2,0xf8,0x04,0x3e,0x14,0x0f,0x80,0x13,0xe0,0x10,0xf8,0x01,0x3e }},
+ {16, 0xc2f0, 0, {0x10,0x0f,0x80,0x43,0xe0,0x00,0xb8,0x00,0x3e,0x00,0x47,0x80,0x03,0xe0,0x02,0xe8 }},
+ {16, 0xc300, 0, {0x10,0x3e,0x00,0x0f,0x80,0x07,0xa0,0x00,0xf8,0x00,0x2e,0x00,0x0f,0x80,0x0b,0xd2 }},
+ {16, 0xc310, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x01,0x32,0x40 }},
+ {16, 0xc320, 0, {0x8c,0x90,0x03,0xe4,0x00,0xc9,0x00,0x36,0x42,0x0f,0x90,0x03,0xa4,0x00,0xc9,0x00 }},
+ {16, 0xc330, 0, {0x3e,0x42,0x0d,0x90,0x03,0x64,0x00,0xd9,0x00,0x3e,0x40,0x0f,0x90,0x0b,0x64,0x00 }},
+ {16, 0xc340, 0, {0xf9,0x90,0x32,0x41,0x0c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc350, 0, {0x80,0x04,0x64,0x00,0xb9,0xc8,0xa2,0x60,0x0a,0x92,0x02,0xe4,0x00,0x89,0x40,0x2e }},
+ {16, 0xc360, 0, {0x58,0x0b,0x90,0x02,0x04,0x00,0xd9,0x00,0x2e,0x42,0x08,0x90,0x02,0xe4,0x04,0x89 }},
+ {16, 0xc370, 0, {0x00,0x2e,0x40,0x0b,0x90,0x06,0x24,0x04,0xb9,0x08,0x2a,0x40,0x48,0x90,0x12,0x20 }},
+ {16, 0xc380, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x10,0x22,0x44 }},
+ {16, 0xc390, 0, {0x08,0x90,0x02,0xe4,0x00,0x89,0x00,0x22,0x45,0x8b,0x90,0x02,0xa4,0x00,0x89,0x00 }},
+ {16, 0xc3a0, 0, {0x2a,0x40,0x09,0x90,0x02,0xe4,0x00,0x99,0x80,0x2e,0x40,0x0b,0x90,0x26,0x24,0x00 }},
+ {16, 0xc3b0, 0, {0xb9,0x01,0x22,0x70,0x09,0x10,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc3c0, 0, {0x08,0x04,0x04,0x08,0xb1,0x20,0x20,0x40,0x0a,0x10,0x02,0xc4,0x80,0x83,0x00,0x2c }},
+ {16, 0xc3d0, 0, {0x50,0x4b,0x10,0x02,0x24,0x00,0x91,0x00,0x2e,0x40,0x08,0x12,0x02,0xc4,0x81,0x81 }},
+ {16, 0xc3e0, 0, {0xa2,0x6c,0x40,0x0b,0x12,0x02,0x04,0x80,0xb9,0x20,0x2a,0x48,0x29,0x12,0x02,0x02 }},
+ {16, 0xc3f0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x61,0x40,0xf8,0x00,0x32,0x80 }},
+ {16, 0xc400, 0, {0x08,0x80,0x03,0xe1,0x42,0xc8,0x00,0x32,0x00,0x1f,0x85,0x03,0xa1,0x40,0xc8,0x50 }},
+ {16, 0xc410, 0, {0x3a,0x00,0x8d,0x85,0x03,0x61,0x40,0xd8,0x00,0x3e,0x00,0x0f,0x05,0x03,0x21,0x40 }},
+ {16, 0xc420, 0, {0xf8,0x50,0x32,0x14,0x0d,0x85,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc430, 0, {0x98,0x1d,0xf4,0x04,0xfd,0x10,0x3f,0x40,0x0f,0x50,0x03,0xc4,0x40,0xfd,0x00,0x3f }},
+ {16, 0xc440, 0, {0x51,0x0f,0xd0,0x03,0xf4,0x00,0xff,0x01,0x3d,0x40,0x0f,0x91,0x03,0xe4,0x40,0xfd }},
+ {16, 0xc450, 0, {0x10,0x3f,0x4a,0x0f,0x91,0x03,0xe4,0x40,0xfd,0x10,0x3f,0x44,0x0e,0x91,0x03,0xe6 }},
+ {16, 0xc460, 0, {0x02,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xc5,0x00,0xcd,0x00,0x31,0x40 }},
+ {16, 0xc470, 0, {0x0d,0xd0,0x43,0xe4,0x00,0xcd,0x00,0x33,0x40,0x4f,0x11,0x02,0xe4,0x04,0xc1,0x00 }},
+ {16, 0xc480, 0, {0x3d,0x40,0x0c,0x90,0x03,0xe4,0x00,0xed,0xa4,0x32,0x50,0x0f,0x90,0x03,0xe4,0x00 }},
+ {16, 0xc490, 0, {0xfd,0x00,0x3f,0x40,0x0f,0x90,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc4a0, 0, {0x38,0x10,0xe2,0x08,0xd8,0x00,0x32,0x01,0x00,0x80,0x12,0xc0,0x00,0x48,0x00,0x36 }},
+ {16, 0xc4b0, 0, {0x80,0x0b,0x8a,0x02,0xe0,0x00,0xa8,0x00,0x2e,0x00,0x0f,0x80,0x02,0xe0,0x00,0x88 }},
+ {16, 0xc4c0, 0, {0x50,0x34,0x28,0x0b,0x80,0x02,0xe0,0x00,0xb8,0x00,0x2e,0x00,0x0b,0x80,0x02,0xce }},
+ {16, 0xc4d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x80,0x81,0x00,0x26,0x40 }},
+ {16, 0xc4e0, 0, {0x09,0x18,0x02,0xc4,0x08,0x21,0x00,0x28,0x40,0x8b,0x10,0x02,0xc4,0x00,0xb1,0x01 }},
+ {16, 0xc4f0, 0, {0x2e,0x40,0x18,0x10,0x02,0xc4,0x00,0xa1,0x01,0x20,0x48,0x1b,0x10,0x02,0xc4,0x00 }},
+ {16, 0xc500, 0, {0xb1,0x00,0x6c,0x40,0x0b,0x10,0x12,0xc2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc510, 0, {0x18,0x11,0xa4,0x00,0x99,0x80,0xa2,0x42,0x48,0x90,0x02,0xe4,0x00,0xa9,0x2a,0x26 }},
+ {16, 0xc520, 0, {0x44,0x0b,0x90,0x82,0xc4,0x81,0xb9,0x00,0x2e,0x40,0x0b,0x90,0x42,0xc4,0x00,0x89 }},
+ {16, 0xc530, 0, {0x00,0x26,0x40,0x0b,0x90,0x02,0xe4,0x00,0xb9,0x01,0x2e,0x41,0x0b,0x90,0x02,0xc6 }},
+ {16, 0xc540, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xc5,0x20,0xc9,0x84,0x30,0x70 }},
+ {16, 0xc550, 0, {0x0d,0x90,0x13,0xe4,0x02,0xe9,0x00,0x32,0x70,0x0f,0x94,0x03,0xe4,0x00,0xf9,0x40 }},
+ {16, 0xc560, 0, {0x3c,0x48,0x0c,0x90,0x03,0xe4,0x00,0xe1,0x00,0x32,0x40,0x0f,0x90,0x01,0xe4,0x00 }},
+ {16, 0xc570, 0, {0xf9,0x90,0x3e,0x60,0x0f,0x90,0x26,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc580, 0, {0x28,0x01,0xa5,0x00,0xf1,0x04,0x3a,0x44,0x8f,0x90,0x03,0xe4,0x10,0xc9,0x04,0x3e }},
+ {16, 0xc590, 0, {0x60,0x0f,0x90,0x03,0xe4,0x00,0xe9,0x20,0x3e,0x40,0x0f,0x90,0x03,0xe4,0x10,0xf9 }},
+ {16, 0xc5a0, 0, {0x90,0x3e,0x40,0x0f,0x90,0x03,0xe4,0x00,0xf9,0x80,0x3e,0x64,0x0f,0x90,0x07,0xca }},
+ {16, 0xc5b0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa1,0x00,0xc8,0x04,0x3a,0x00 }},
+ {16, 0xc5c0, 0, {0x1e,0x80,0x03,0x80,0x03,0xc8,0x40,0x2a,0x04,0x1f,0x80,0x03,0x20,0x00,0x88,0x00 }},
+ {16, 0xc5d0, 0, {0x32,0x30,0x0c,0x80,0x03,0x20,0x00,0xf8,0x00,0x3e,0x00,0x0c,0x80,0x03,0xe0,0x00 }},
+ {16, 0xc5e0, 0, {0xc8,0x80,0x3e,0x20,0x0f,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc5f0, 0, {0x28,0x05,0x38,0x00,0xae,0xd0,0x37,0x80,0x08,0xec,0x46,0x38,0x00,0xd6,0x04,0x23 }},
+ {16, 0xc600, 0, {0xa0,0x0b,0xa0,0x41,0x78,0x04,0xfa,0x00,0x37,0x80,0x0d,0xa0,0x02,0xa8,0x10,0xee }},
+ {16, 0xc610, 0, {0x21,0x2e,0x80,0x08,0xa0,0x02,0xe8,0x08,0x8e,0x80,0x2f,0xa0,0x8b,0xa0,0x02,0xca }},
+ {16, 0xc620, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x01,0x4c,0x02,0x83,0xc0,0xa8,0xe8 }},
+ {16, 0xc630, 0, {0x4a,0x36,0x02,0x8c,0x00,0x13,0xa0,0x28,0xc2,0x0b,0x30,0x06,0x0c,0x00,0xb3,0x00 }},
+ {16, 0xc640, 0, {0x24,0x84,0x09,0x30,0x02,0x0c,0x00,0xb3,0x20,0x28,0xc0,0x09,0x30,0x02,0xcc,0x00 }},
+ {16, 0xc650, 0, {0x83,0x80,0x2c,0xc0,0x0b,0x30,0x02,0xca,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc660, 0, {0xa0,0x01,0x3c,0x44,0xaf,0x40,0x25,0xc2,0x48,0xf8,0x82,0x1c,0xc8,0x9f,0x08,0x21 }},
+ {16, 0xc670, 0, {0xc0,0x8b,0xf8,0x02,0x5c,0x00,0xbf,0xb0,0x27,0x80,0x09,0x3a,0x02,0x9c,0x00,0xa5 }},
+ {16, 0xc680, 0, {0x02,0x2d,0xe8,0x09,0x70,0x02,0xce,0x80,0x85,0x08,0x2d,0xc2,0x0b,0x73,0x02,0xe8 }},
+ {16, 0xc690, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xc7,0x82,0xa9,0xe0 }},
+ {16, 0xc6a0, 0, {0x0a,0x78,0x02,0x9e,0x40,0x97,0x84,0x39,0xa0,0x0b,0x7a,0x83,0x3f,0x80,0xd7,0x91 }},
+ {16, 0xc6b0, 0, {0x35,0xa0,0x0d,0x7a,0x09,0x1e,0x44,0xf7,0x80,0x3d,0xe8,0x2d,0x7a,0x03,0xde,0x82 }},
+ {16, 0xc6c0, 0, {0xc6,0x80,0x3d,0x20,0x4b,0x7b,0x23,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc6d0, 0, {0x08,0x1d,0xac,0x00,0xd3,0x00,0x3e,0xc1,0x0f,0x30,0x03,0xed,0x80,0xe3,0x00,0x3e }},
+ {16, 0xc6e0, 0, {0x80,0x0f,0xb6,0x21,0xec,0x08,0xdb,0x21,0x3e,0x80,0x0f,0xb5,0x03,0x6c,0x40,0xf9 }},
+ {16, 0xc6f0, 0, {0x00,0x3e,0xdc,0x0e,0xb2,0x03,0xed,0x40,0xf9,0x02,0x3e,0x80,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0xc700, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xcf,0x80,0x3d,0xe0 }},
+ {16, 0xc710, 0, {0x0f,0xc8,0x43,0xfe,0x00,0xfe,0x84,0x3f,0xe0,0x0d,0xf8,0xc3,0xff,0x10,0xaf,0x90 }},
+ {16, 0xc720, 0, {0x35,0xa0,0x0c,0xfc,0x03,0x3e,0x14,0xec,0x84,0x3f,0xf0,0x0e,0xfc,0xc3,0xff,0x08 }},
+ {16, 0xc730, 0, {0x4f,0x80,0x33,0xe4,0x0c,0xf8,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc740, 0, {0xa8,0x11,0x9c,0x00,0xd7,0xa2,0x2d,0xc4,0x0c,0x41,0xc2,0xdc,0x00,0x74,0x00,0x25 }},
+ {16, 0xc750, 0, {0x80,0x0f,0x72,0x42,0xdc,0x90,0xd7,0x38,0x2d,0x98,0x0a,0x70,0x02,0x1c,0x04,0x86 }},
+ {16, 0xc760, 0, {0x00,0x3f,0xc0,0x0d,0x70,0x02,0xcc,0x00,0x86,0x08,0x37,0xc6,0x28,0x70,0x02,0x2a }},
+ {16, 0xc770, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0x87,0x60,0x2d,0xc2 }},
+ {16, 0xc780, 0, {0x0a,0x50,0x02,0xdc,0x00,0xb6,0x10,0x25,0xc2,0x09,0x70,0x86,0xdc,0x30,0x97,0x00 }},
+ {16, 0xc790, 0, {0x25,0x80,0x08,0x30,0x02,0x5c,0x00,0x87,0x08,0x2d,0xc0,0x08,0x70,0x02,0xcc,0x40 }},
+ {16, 0xc7a0, 0, {0x86,0x00,0x21,0x00,0x09,0x70,0x0a,0x00,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc7b0, 0, {0x20,0x14,0xed,0x80,0x93,0x00,0x0c,0xe1,0x28,0x18,0x02,0xcc,0x08,0xa0,0x00,0x24 }},
+ {16, 0xc7c0, 0, {0x12,0x1a,0x34,0x02,0xcf,0x04,0x93,0x40,0x2c,0x80,0x0a,0xb0,0x22,0x4c,0x02,0x81 }},
+ {16, 0xc7d0, 0, {0x80,0x28,0xe0,0x28,0x30,0x02,0xcc,0x00,0x88,0x82,0x24,0x20,0x08,0xb0,0x02,0x08 }},
+ {16, 0xc7e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbf,0x20,0xc9,0xe0,0x2c,0xf1 }},
+ {16, 0xc7f0, 0, {0x0e,0xbd,0x03,0xfc,0x00,0xb9,0x40,0x36,0x40,0x09,0xf5,0x02,0xfd,0x40,0xff,0x80 }},
+ {16, 0xc800, 0, {0x36,0xa2,0x08,0xf0,0x0b,0x7c,0x00,0xeb,0x80,0x2f,0xe0,0x0a,0xf0,0x43,0xfc,0x02 }},
+ {16, 0xc810, 0, {0x8b,0xd0,0x32,0xf0,0x0d,0xf0,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc820, 0, {0x80,0x00,0xec,0x10,0xfb,0x00,0x3e,0xc8,0x0f,0x94,0x13,0xec,0x00,0xf9,0x40,0x36 }},
+ {16, 0xc830, 0, {0x40,0x1f,0xb0,0x03,0xec,0x10,0xfb,0x01,0x3e,0xd0,0x0f,0xb0,0x03,0xac,0x00,0xf9 }},
+ {16, 0xc840, 0, {0x00,0x3e,0xc4,0x0f,0xb0,0x01,0xec,0x00,0xf9,0x04,0x3e,0x48,0x0f,0xb0,0x03,0xe0 }},
+ {16, 0xc850, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xdf,0x00,0x3f,0xc0 }},
+ {16, 0xc860, 0, {0x0c,0xe0,0x07,0xfc,0x00,0xfc,0x0a,0x27,0x00,0x4f,0xf0,0x03,0xfc,0x00,0xff,0x08 }},
+ {16, 0xc870, 0, {0x33,0x80,0x0c,0xf0,0x00,0x2c,0x00,0x5f,0x00,0x33,0xc0,0x0c,0xf0,0x01,0xfc,0x00 }},
+ {16, 0xc880, 0, {0xfe,0x00,0x23,0x40,0x0f,0xb0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc890, 0, {0x81,0x04,0x6c,0x00,0x8b,0x86,0x2e,0xe0,0x48,0x8f,0x02,0xec,0x08,0xb8,0xa0,0x36 }},
+ {16, 0xc8a0, 0, {0x30,0x4b,0xb0,0x03,0xac,0x0c,0x9b,0x02,0x3c,0xa0,0x0c,0xb0,0x43,0x6c,0x00,0xb1 }},
+ {16, 0xc8b0, 0, {0x00,0x28,0xc0,0x0d,0xb0,0x12,0xec,0x10,0xb9,0x80,0xa2,0x61,0x0b,0xb0,0x02,0x20 }},
+ {16, 0xc8c0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x9b,0x88,0x2e,0xe0 }},
+ {16, 0xc8d0, 0, {0x08,0xa0,0x02,0xec,0x01,0xbb,0x80,0x26,0x62,0x0b,0xb0,0x02,0xec,0x00,0xb3,0x01 }},
+ {16, 0xc8e0, 0, {0x2a,0x21,0x08,0xb0,0x12,0x2c,0x00,0xb8,0x00,0x22,0xc0,0x08,0xb0,0x12,0xec,0x14 }},
+ {16, 0xc8f0, 0, {0xb9,0x84,0x22,0xa2,0x0b,0xb0,0x02,0xa0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc900, 0, {0x08,0x04,0x0c,0x04,0x93,0x00,0x2c,0xe0,0x08,0x00,0x02,0xcc,0x09,0x91,0x00,0x20 }},
+ {16, 0xc910, 0, {0x40,0x0b,0x30,0x06,0x4c,0x04,0x13,0x00,0x26,0x00,0x08,0x30,0x02,0xcc,0x04,0xb2 }},
+ {16, 0xc920, 0, {0x00,0x2a,0xc0,0x01,0x30,0x00,0xcd,0x00,0xb0,0x00,0x20,0x80,0x0b,0x30,0x0a,0x02 }},
+ {16, 0xc930, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xdb,0x24,0x6e,0xc0 }},
+ {16, 0xc940, 0, {0x2c,0xa0,0x02,0xfc,0x00,0xba,0x04,0x26,0x40,0x4f,0xf0,0x57,0xfc,0x00,0x3f,0x01 }},
+ {16, 0xc950, 0, {0x3a,0x00,0x2c,0xf0,0x01,0x3c,0x00,0xdb,0x00,0x33,0xc0,0x84,0xf0,0x03,0xfd,0x08 }},
+ {16, 0xc960, 0, {0xfa,0x00,0x32,0x00,0x0f,0xf0,0x03,0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc970, 0, {0xa0,0x19,0xdc,0x00,0xea,0x40,0x3f,0x00,0x07,0xc0,0x03,0xfc,0x04,0xfc,0x00,0x3f }},
+ {16, 0xc980, 0, {0x40,0x0f,0xf0,0x03,0x9c,0x00,0xff,0x00,0x3f,0x00,0x0e,0xf0,0x03,0x7c,0x00,0xfd }},
+ {16, 0xc990, 0, {0x00,0x3f,0xc1,0x0f,0xf0,0x03,0xfc,0x84,0xf4,0x00,0x3f,0x00,0x0f,0xf0,0x03,0xe8 }},
+ {16, 0xc9a0, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xf0,0x80,0xff,0x00,0x03,0xc2 }},
+ {16, 0xc9b0, 0, {0x0f,0xc2,0x03,0x3e,0x00,0xdf,0xc0,0x3e,0xc0,0x4d,0xdb,0x02,0xb0,0xc0,0xdc,0x30 }},
+ {16, 0xc9c0, 0, {0x3f,0xe0,0x0f,0xdb,0x23,0xf6,0x20,0xff,0x26,0x33,0xe0,0x0f,0x52,0x03,0x5e,0x00 }},
+ {16, 0xc9d0, 0, {0xff,0x80,0x33,0xc0,0x4c,0x49,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc9e0, 0, {0x80,0x10,0xe1,0xe0,0xb7,0x08,0x23,0xf0,0x0b,0xad,0x0a,0x2e,0x00,0x9a,0x04,0x2e }},
+ {16, 0xc9f0, 0, {0xb0,0x09,0x8f,0x03,0xa0,0x40,0xb9,0x30,0x2e,0xa0,0x0b,0x9f,0x03,0xa7,0x00,0xbb }},
+ {16, 0xca00, 0, {0x80,0x26,0xe0,0x0b,0xdd,0x02,0x2e,0x00,0xbb,0x80,0x22,0xf4,0x0a,0x92,0x02,0xa0 }},
+ {16, 0xca10, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc8,0x80,0xb3,0x10,0x24,0xc0 }},
+ {16, 0xca20, 0, {0x0b,0x80,0x02,0xac,0x00,0xa3,0x24,0x2c,0xd0,0x08,0x10,0x06,0xc0,0x80,0xb2,0x01 }},
+ {16, 0xca30, 0, {0x2c,0xea,0x4b,0x00,0x12,0xc2,0x04,0xb3,0x10,0x08,0xc0,0x0a,0x90,0x02,0x0c,0x00 }},
+ {16, 0xca40, 0, {0x93,0x04,0x24,0xc0,0x09,0x82,0x02,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xca50, 0, {0xc0,0x15,0xa5,0x00,0xbb,0x00,0x22,0xc0,0x0b,0x80,0x02,0xac,0x08,0xbb,0x18,0x2e }},
+ {16, 0xca60, 0, {0xe0,0x18,0x88,0x02,0xec,0x01,0xba,0x00,0x2e,0x80,0x0b,0x98,0x86,0xe2,0x00,0xbb }},
+ {16, 0xca70, 0, {0x00,0x22,0xc4,0x0b,0x90,0x02,0x6c,0x00,0xbb,0x00,0xa6,0xc0,0x0b,0x90,0x00,0xb0 }},
+ {16, 0xca80, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0xe7,0x00,0xfb,0x00,0xb2,0xc0 }},
+ {16, 0xca90, 0, {0x0f,0xa8,0x03,0xac,0x02,0xeb,0x00,0x3e,0x60,0x0d,0x9e,0x03,0xec,0x00,0xd8,0x40 }},
+ {16, 0xcaa0, 0, {0x3e,0x40,0x0f,0x88,0x43,0xe2,0x00,0xfb,0x20,0x32,0xc0,0x0f,0x10,0x0b,0x6f,0x90 }},
+ {16, 0xcab0, 0, {0x5b,0x82,0x36,0xc0,0x2d,0x08,0x01,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcac0, 0, {0xe0,0x01,0xb7,0x08,0xf7,0x00,0x3f,0xc0,0x0f,0xf9,0x03,0x7c,0x08,0xcf,0x82,0x3c }},
+ {16, 0xcad0, 0, {0x00,0xaf,0xd0,0x21,0xbc,0x08,0xfd,0x10,0x3f,0x80,0x8f,0xc0,0x03,0xa4,0x00,0xf7 }},
+ {16, 0xcae0, 0, {0x01,0xbf,0xc0,0x07,0xd0,0x03,0xbd,0x30,0xff,0xa4,0x38,0xc0,0x0e,0xda,0x03,0xf8 }},
+ {16, 0xcaf0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa8,0x00,0xfb,0x00,0xb2,0xc1 }},
+ {16, 0xcb00, 0, {0x0e,0x81,0x03,0xec,0x40,0xfb,0x44,0x3a,0xc1,0x0e,0x95,0x03,0xe0,0x00,0xcb,0x41 }},
+ {16, 0xcb10, 0, {0x32,0x4d,0x0f,0x81,0x03,0xe0,0x20,0xc9,0x00,0x72,0xe8,0x44,0x91,0x03,0x6d,0x00 }},
+ {16, 0xcb20, 0, {0xcb,0x02,0x3e,0xc0,0x0c,0x80,0x03,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcb30, 0, {0xc8,0x05,0x24,0x00,0xbf,0x00,0x33,0xc4,0x08,0x1d,0x03,0x8c,0x00,0xbb,0x98,0x36 }},
+ {16, 0xcb40, 0, {0x48,0x4d,0x98,0x22,0xed,0x40,0xdb,0x00,0x36,0xb0,0x0b,0x98,0x02,0xe3,0x00,0xdb }},
+ {16, 0xcb50, 0, {0x00,0x32,0xe0,0x88,0xd8,0x02,0x2c,0x02,0xc3,0x80,0x2f,0xc0,0x08,0x90,0x03,0x72 }},
+ {16, 0xcb60, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x44,0x00,0xb3,0x00,0x20,0xf0 }},
+ {16, 0xcb70, 0, {0x18,0x08,0x02,0x4f,0x84,0xb1,0xc0,0x24,0xc0,0x89,0x06,0x02,0xc4,0x00,0x91,0x00 }},
+ {16, 0xcb80, 0, {0x20,0xf0,0x1b,0x18,0x82,0xc6,0x00,0x93,0x00,0x2c,0xd1,0x08,0x1e,0x02,0x0e,0x44 }},
+ {16, 0xcb90, 0, {0x93,0x94,0x2c,0xc0,0x08,0x20,0x02,0xb8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcba0, 0, {0x20,0x01,0x1e,0x04,0xb7,0x80,0x20,0xe2,0x08,0x68,0x06,0x9e,0x80,0xbf,0x84,0x25 }},
+ {16, 0xcbb0, 0, {0xa8,0x09,0x68,0x02,0xc6,0x00,0x93,0xa0,0x65,0xe4,0x0b,0x78,0x12,0xde,0x00,0x93 }},
+ {16, 0xcbc0, 0, {0x00,0xa1,0xe0,0x08,0xd8,0x02,0x1e,0xd0,0xa7,0x80,0x2d,0xe0,0x08,0xf8,0x02,0x48 }},
+ {16, 0xcbd0, 0, {0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x08,0x00,0xb3,0x20,0x30,0xc0 }},
+ {16, 0xcbe0, 0, {0x0a,0x22,0x02,0xce,0x40,0xf3,0xa0,0x3c,0xe8,0x0b,0x30,0x02,0xc1,0x00,0xd0,0xc1 }},
+ {16, 0xcbf0, 0, {0x30,0xc0,0x0b,0x21,0x13,0xcc,0x21,0xd3,0x00,0x2c,0xc0,0x2c,0x10,0x0b,0x0c,0x80 }},
+ {16, 0xcc00, 0, {0xd3,0x61,0x3c,0xc8,0x2c,0x20,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcc10, 0, {0x40,0x1d,0xbc,0x00,0xff,0x40,0x3b,0xc0,0x0f,0xe0,0x03,0xfc,0x00,0xf7,0x50,0x7f }},
+ {16, 0xcc20, 0, {0xc4,0x2e,0xf0,0x03,0xfc,0x40,0xfe,0x00,0x3f,0xc0,0x0f,0xf0,0x47,0xfc,0x00,0xff }},
+ {16, 0xcc30, 0, {0x00,0x7d,0xc2,0x0f,0xd0,0x01,0xbc,0x80,0x5f,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xd0 }},
+ {16, 0xcc40, 0, {0x02,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe4,0x00,0xfb,0xc0,0x32,0xc8 }},
+ {16, 0xcc50, 0, {0x0e,0xe0,0x03,0xac,0xa0,0xeb,0x20,0x32,0x40,0x8c,0xa0,0x13,0x2c,0x00,0xd9,0x00 }},
+ {16, 0xcc60, 0, {0x3e,0x60,0x0c,0xb0,0x03,0xe8,0x00,0xfa,0x80,0x30,0xc0,0x3c,0x92,0x03,0xef,0x60 }},
+ {16, 0xcc70, 0, {0xc3,0x20,0x31,0xc4,0x0c,0xa0,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcc80, 0, {0x48,0x11,0x9c,0x00,0x33,0x20,0x21,0xda,0x0b,0x70,0x43,0x9c,0x01,0xb5,0x00,0x21 }},
+ {16, 0xcc90, 0, {0x00,0x0a,0xe0,0x02,0x1c,0x00,0xb7,0x00,0x2f,0xc0,0x0d,0x70,0x03,0x9c,0x00,0xb6 }},
+ {16, 0xcca0, 0, {0x00,0x31,0xc8,0x08,0x57,0x02,0xdc,0x00,0x87,0x50,0x21,0xc0,0x0a,0x70,0x42,0x92 }},
+ {16, 0xccb0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9a,0x11,0xb7,0x90,0x21,0xe0 }},
+ {16, 0xccc0, 0, {0x0b,0x68,0x82,0xde,0x08,0xa7,0x80,0x24,0x60,0x08,0x70,0x12,0x12,0x08,0x95,0x80 }},
+ {16, 0xccd0, 0, {0x2d,0x60,0x09,0x6c,0x02,0xde,0x00,0xb1,0x80,0x23,0xe0,0x0a,0x58,0x62,0xfe,0x00 }},
+ {16, 0xcce0, 0, {0x97,0xa0,0x21,0xe8,0x09,0xe8,0x02,0x30,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xccf0, 0, {0x48,0x14,0xcd,0x00,0xb3,0x00,0x20,0xc0,0x8b,0x3c,0x02,0x8c,0x00,0xbb,0x00,0x24 }},
+ {16, 0xcd00, 0, {0xc4,0x1a,0x3d,0x02,0x2f,0x88,0xb3,0x48,0x2c,0xe0,0x89,0x3e,0x02,0x8d,0x80,0x93 }},
+ {16, 0xcd10, 0, {0xd9,0xa4,0x40,0x88,0x10,0x02,0xcc,0x04,0x93,0xc8,0x20,0xc0,0x0b,0x30,0x02,0x92 }},
+ {16, 0xcd20, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb9,0x40,0xfa,0x00,0xb2,0x80 }},
+ {16, 0xcd30, 0, {0x0f,0xe0,0x03,0xe8,0x00,0xea,0x80,0x37,0xa0,0x0c,0xe8,0x13,0x3b,0x08,0xde,0x01 }},
+ {16, 0xcd40, 0, {0x3f,0x82,0x0c,0xe0,0x43,0xfa,0x80,0xfe,0x80,0x31,0x28,0x0c,0xa0,0x03,0xf0,0x02 }},
+ {16, 0xcd50, 0, {0xc4,0xc0,0xb2,0x80,0x0d,0xe0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcd60, 0, {0x48,0x00,0xe0,0x00,0xf8,0x00,0x3e,0x10,0x0b,0x80,0x83,0xe0,0x00,0xf8,0x30,0x3a }},
+ {16, 0xcd70, 0, {0x00,0x6d,0x80,0x83,0xe1,0x44,0xb8,0x04,0x3e,0x10,0x0f,0x80,0x13,0xe0,0x00,0xf8 }},
+ {16, 0xcd80, 0, {0x00,0x3a,0x10,0x4f,0x04,0x03,0xe3,0x00,0xe8,0x10,0x3e,0x00,0x0e,0x80,0x03,0xd2 }},
+ {16, 0xcd90, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xc9,0x00,0x38,0x40 }},
+ {16, 0xcda0, 0, {0x0f,0x1a,0x03,0x2e,0x00,0xfb,0xa0,0x36,0x60,0x0c,0x98,0x03,0xe6,0x04,0xd1,0x00 }},
+ {16, 0xcdb0, 0, {0x36,0x48,0x0e,0x91,0x02,0xe6,0x00,0xf9,0x00,0x3e,0x00,0x0c,0x99,0x03,0x62,0x40 }},
+ {16, 0xcdc0, 0, {0xf8,0x00,0xa0,0x68,0x0c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcdd0, 0, {0x80,0x04,0x64,0x02,0x89,0x04,0x2e,0x64,0x88,0x94,0x02,0xa5,0x00,0xb9,0x80,0x20 }},
+ {16, 0xcde0, 0, {0x64,0x0d,0x9c,0x02,0xe6,0x42,0x89,0x00,0x22,0x60,0x0b,0x9c,0x02,0xe4,0x10,0xb9 }},
+ {16, 0xcdf0, 0, {0x40,0x3a,0x50,0x08,0x9c,0x02,0x27,0x20,0xb9,0x00,0x22,0x40,0x08,0x10,0x03,0x60 }},
+ {16, 0xce00, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x04,0x00,0x89,0x00,0x22,0x40 }},
+ {16, 0xce10, 0, {0x0a,0x90,0x82,0x25,0x4c,0xb9,0x00,0x02,0x40,0x08,0x96,0x02,0xe4,0x10,0x89,0x00 }},
+ {16, 0xce20, 0, {0x26,0x50,0x13,0x94,0x02,0xe4,0x40,0xb9,0x08,0x2e,0x40,0x08,0x90,0x8a,0x24,0x00 }},
+ {16, 0xce30, 0, {0xb9,0x01,0x2a,0x40,0x08,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xce40, 0, {0x08,0x04,0x05,0x80,0x81,0x40,0x2c,0xc8,0x08,0x10,0x06,0x84,0x00,0xb1,0x04,0x20 }},
+ {16, 0xce50, 0, {0x49,0x09,0x14,0x42,0xcc,0x89,0x81,0x20,0x20,0x50,0x0b,0x14,0x46,0xc4,0x00,0xb1 }},
+ {16, 0xce60, 0, {0x00,0x2a,0xc0,0x28,0x14,0x02,0x01,0x01,0xb0,0x04,0x28,0x40,0x38,0x94,0x02,0x42 }},
+ {16, 0xce70, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0x88,0x00,0x3a,0x00 }},
+ {16, 0xce80, 0, {0x0e,0x80,0x23,0x20,0x00,0xf8,0x50,0xb2,0x00,0x0c,0x80,0x12,0xe1,0x40,0xd8,0x50 }},
+ {16, 0xce90, 0, {0x36,0x00,0x0e,0x80,0x03,0xe0,0x00,0xf8,0x00,0x2e,0x00,0x0c,0x80,0x53,0x60,0x04 }},
+ {16, 0xcea0, 0, {0xf8,0x00,0x3a,0x00,0x0c,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xceb0, 0, {0x98,0x1d,0xf4,0x40,0xf9,0x44,0x3e,0x44,0x0f,0xd4,0x03,0xe4,0x00,0xf1,0x00,0x3f }},
+ {16, 0xcec0, 0, {0x44,0x0f,0xd4,0x53,0xf4,0x44,0xfd,0x10,0x2f,0x40,0x0f,0xf4,0x03,0xfd,0x00,0xfd }},
+ {16, 0xced0, 0, {0x40,0x3b,0x10,0x0f,0xd4,0x23,0xd1,0x04,0x7c,0x43,0x36,0x50,0x0f,0x50,0x03,0xe6 }},
+ {16, 0xcee0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xa6,0x00,0xf9,0x10,0x2e,0x62 }},
+ {16, 0xcef0, 0, {0x0f,0xd2,0x83,0xe4,0x00,0xbd,0x42,0x3e,0x61,0x0f,0xd0,0x03,0xf6,0xc0,0xc9,0xa2 }},
+ {16, 0xcf00, 0, {0x2b,0x40,0x0c,0xd0,0x03,0x34,0x00,0xf9,0x81,0x3e,0x68,0x08,0xc1,0x43,0xfa,0x00 }},
+ {16, 0xcf10, 0, {0xf5,0x80,0x3f,0x62,0x0c,0x14,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcf20, 0, {0x38,0x10,0xe1,0x20,0x88,0x11,0x2e,0x10,0x0b,0x80,0x02,0xe0,0x00,0xb8,0x82,0x2e }},
+ {16, 0xcf30, 0, {0x10,0x0b,0x80,0x00,0xe3,0xc4,0x88,0xf0,0x22,0x00,0x0b,0x80,0x0a,0x20,0x00,0xe8 }},
+ {16, 0xcf40, 0, {0x40,0x2f,0x14,0x08,0x88,0x02,0xe2,0x00,0xb8,0x00,0x2e,0x00,0x08,0x88,0x02,0x8e }},
+ {16, 0xcf50, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0xc5,0x00,0xa1,0x00,0x2c,0x40 }},
+ {16, 0xcf60, 0, {0x0b,0x10,0x02,0xc4,0x18,0xb1,0x22,0x6c,0xd1,0x0b,0x10,0x26,0xc4,0x00,0x81,0x08 }},
+ {16, 0xcf70, 0, {0x2a,0x40,0x88,0x10,0x02,0x04,0x04,0xb5,0xc0,0x0f,0x40,0x0b,0x02,0x02,0x41,0xa0 }},
+ {16, 0xcf80, 0, {0xb1,0x40,0x2c,0x40,0x08,0x12,0x02,0x02,0x11,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcf90, 0, {0x18,0x15,0xa4,0x00,0x89,0x06,0x2e,0x40,0x0b,0x90,0x12,0xe4,0x00,0xb9,0x40,0x2e }},
+ {16, 0xcfa0, 0, {0x40,0x0b,0xb0,0x82,0xc4,0x02,0x89,0x44,0x22,0x40,0x0a,0x90,0x02,0x24,0x00,0xa9 }},
+ {16, 0xcfb0, 0, {0x00,0x27,0x48,0x09,0xb0,0x12,0xec,0x18,0xb9,0x01,0x2e,0x40,0x40,0x90,0x02,0x86 }},
+ {16, 0xcfc0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe7,0x84,0xe9,0x01,0x3e,0x40 }},
+ {16, 0xcfd0, 0, {0x0f,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x72,0x0f,0x90,0x03,0xe7,0x60,0x89,0x10 }},
+ {16, 0xcfe0, 0, {0x3a,0x40,0x0c,0x90,0x03,0x24,0x00,0xf9,0x44,0x3c,0x40,0x2d,0x90,0x03,0xe7,0x60 }},
+ {16, 0xcff0, 0, {0xf9,0x71,0x3e,0x40,0x28,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd000, 0, {0x28,0x01,0xa4,0x48,0xa9,0x00,0x3e,0xc0,0x0f,0x9a,0x43,0xec,0x00,0xf9,0x20,0x7e }},
+ {16, 0xd010, 0, {0xc8,0x0f,0x9a,0x07,0x66,0x00,0x79,0x80,0x7e,0x40,0x0f,0x1c,0x03,0xe7,0x00,0xe9 }},
+ {16, 0xd020, 0, {0xa0,0x3e,0x40,0x46,0x80,0x03,0xe0,0x20,0xf9,0x00,0x3c,0x40,0x0f,0x90,0x03,0xca }},
+ {16, 0xd030, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0x80,0x00,0xf8,0x00,0x3a,0x00 }},
+ {16, 0xd040, 0, {0x0f,0x80,0x03,0xa0,0x08,0xe8,0x40,0x3a,0x10,0x0c,0x83,0x03,0xa1,0xc0,0xf0,0x40 }},
+ {16, 0xd050, 0, {0x3e,0x06,0x0f,0x84,0x03,0xe1,0x00,0xf8,0x00,0x3b,0x00,0x0f,0x81,0x03,0x20,0x00 }},
+ {16, 0xd060, 0, {0xf8,0x10,0xb2,0x00,0x4c,0x80,0x0b,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd070, 0, {0x28,0x05,0x28,0x00,0xba,0x00,0x2e,0xb0,0x0b,0xe8,0x02,0xe9,0x00,0x3e,0x90,0x02 }},
+ {16, 0xd080, 0, {0x81,0x08,0xe4,0x12,0x78,0x00,0xba,0x00,0x2d,0xb0,0x89,0xe8,0x22,0xf8,0x0c,0xba }},
+ {16, 0xd090, 0, {0x00,0x6e,0x80,0x03,0xc5,0x03,0x30,0x00,0xba,0x00,0x22,0xa8,0x08,0xa0,0x22,0x8a }},
+ {16, 0xd0a0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0xb3,0x00,0x28,0xe8 }},
+ {16, 0xd0b0, 0, {0x1b,0x31,0x12,0x8c,0xc4,0xa3,0x92,0x2c,0x40,0x88,0x34,0x06,0x8e,0x00,0x93,0x00 }},
+ {16, 0xd0c0, 0, {0x2c,0xf0,0x19,0x31,0xa2,0xcc,0x04,0xb3,0x00,0x28,0x80,0x01,0x38,0x02,0x4c,0x00 }},
+ {16, 0xd0d0, 0, {0xb3,0x80,0x20,0xe0,0x0a,0xb0,0x12,0x02,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd0e0, 0, {0xa0,0x01,0x1c,0x00,0xb7,0x14,0x2d,0x42,0x0b,0x60,0x02,0xdc,0x00,0xb7,0x81,0x27 }},
+ {16, 0xd0f0, 0, {0xe0,0x18,0x60,0x02,0x58,0x18,0xb7,0x22,0x2d,0x80,0x09,0x70,0x22,0xdc,0x00,0xb7 }},
+ {16, 0xd100, 0, {0x00,0x2d,0x80,0x0b,0x3b,0x02,0x1d,0xd0,0xbf,0x80,0x28,0xc0,0x8a,0xf2,0x02,0xa0 }},
+ {16, 0xd110, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1f,0x80,0xf7,0xa0,0x39,0xe2 }},
+ {16, 0xd120, 0, {0x0f,0x68,0x03,0x9e,0x00,0xed,0x84,0x3d,0xe2,0x44,0x78,0x03,0x9e,0x00,0xf7,0xb4 }},
+ {16, 0xd130, 0, {0x2d,0xe0,0x0d,0x68,0x03,0xd6,0x00,0xf6,0x80,0x39,0xe0,0x0f,0x79,0x03,0x5e,0x90 }},
+ {16, 0xd140, 0, {0xf7,0x81,0x31,0x60,0x2e,0x7c,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd150, 0, {0x08,0x1d,0xad,0x00,0xfb,0x42,0x3e,0xc8,0x0f,0xa0,0x03,0xed,0xa0,0xbb,0x00,0x38 }},
+ {16, 0xd160, 0, {0xc8,0x0f,0xb0,0x03,0x68,0x00,0xfb,0x11,0x3e,0x40,0x09,0xb0,0x41,0xec,0x00,0xfa }},
+ {16, 0xd170, 0, {0x02,0x3e,0xc0,0x0f,0xb2,0x0b,0xed,0x80,0x3b,0x00,0x36,0x40,0x0d,0xb0,0x23,0x42 }},
+ {16, 0xd180, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xff,0x00,0xcf,0xd0,0x33,0xe4 }},
+ {16, 0xd190, 0, {0x4f,0xf9,0x03,0xde,0x40,0xdc,0x80,0x36,0xe4,0x0c,0xb9,0x13,0xfe,0x00,0xcf,0x90 }},
+ {16, 0xd1a0, 0, {0x37,0xe5,0x0f,0xf8,0x43,0xfe,0x00,0xcf,0x92,0x3f,0xa4,0x0f,0x78,0x03,0x1f,0x00 }},
+ {16, 0xd1b0, 0, {0xc5,0x80,0x33,0x60,0x0c,0xf8,0x20,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd1c0, 0, {0xa8,0x11,0xbc,0x00,0x0f,0x10,0x21,0x81,0x0b,0x60,0x03,0x84,0x00,0x8b,0x08,0x21 }},
+ {16, 0xd1d0, 0, {0x60,0x0a,0x7b,0x03,0x98,0x00,0x8b,0x10,0x29,0x84,0x0e,0x64,0x22,0xdc,0x40,0xd7 }},
+ {16, 0xd1e0, 0, {0x02,0x2d,0x84,0x0b,0x70,0x02,0x1c,0x00,0x85,0x18,0x21,0x40,0x0a,0xf0,0x22,0xaa }},
+ {16, 0xd1f0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x00,0xa7,0x14,0x69,0xc0 }},
+ {16, 0xd200, 0, {0x1a,0x60,0x12,0xfc,0x01,0xa4,0x10,0x2d,0xc0,0x0a,0x52,0x02,0x45,0x40,0x87,0x0c }},
+ {16, 0xd210, 0, {0x21,0x80,0x1b,0x60,0x82,0xd4,0x00,0x86,0x03,0x25,0xe0,0x1b,0x70,0x02,0x5c,0x40 }},
+ {16, 0xd220, 0, {0x9d,0x00,0x29,0x40,0x08,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd230, 0, {0x20,0x14,0xcd,0x00,0xa3,0x00,0x28,0xc0,0x1b,0x20,0x22,0x8c,0x11,0xa3,0x00,0x68 }},
+ {16, 0xd240, 0, {0xf6,0x0a,0x3c,0x06,0x82,0x00,0x83,0x80,0x28,0x84,0x0a,0x8c,0x82,0xcc,0x44,0x92 }},
+ {16, 0xd250, 0, {0x00,0x2c,0xc0,0x0b,0x30,0x02,0x4e,0x00,0x91,0x00,0x28,0x40,0x0a,0x30,0x02,0x88 }},
+ {16, 0xd260, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbe,0x22,0xef,0x04,0xba,0xc0 }},
+ {16, 0xd270, 0, {0x0f,0x14,0x93,0xec,0x02,0xf1,0xc3,0x3e,0xf0,0x0e,0x90,0x83,0x66,0x00,0xcf,0xd2 }},
+ {16, 0xd280, 0, {0x32,0x50,0x0f,0x9c,0x03,0xcb,0x00,0xc9,0x80,0x3e,0x28,0x0f,0xb0,0x03,0x4f,0x00 }},
+ {16, 0xd290, 0, {0xd1,0xc0,0xaa,0xc0,0x0c,0x71,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd2a0, 0, {0x80,0x00,0xec,0x20,0xdb,0x00,0x26,0x80,0x0f,0xa0,0x03,0xec,0x08,0x1b,0x00,0x36 }},
+ {16, 0xd2b0, 0, {0xc0,0x0f,0x86,0x01,0xe5,0x40,0xfb,0x02,0x3a,0x48,0x0e,0x94,0x03,0xec,0x80,0xf1 }},
+ {16, 0xd2c0, 0, {0x84,0x3e,0x00,0x4f,0xb0,0x03,0xad,0xc0,0xeb,0x20,0x36,0xc0,0x0f,0xb0,0x23,0xe0 }},
+ {16, 0xd2d0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xdc,0x00,0xcf,0x00,0x3f,0x60 }},
+ {16, 0xd2e0, 0, {0x0c,0xe0,0x83,0x3e,0x80,0xed,0x08,0x33,0xd0,0x8f,0x50,0x03,0x9e,0x00,0xdf,0x00 }},
+ {16, 0xd2f0, 0, {0x33,0x40,0x0c,0xc0,0x03,0x30,0x00,0xcc,0x10,0x33,0x68,0x0c,0xf0,0x03,0x3c,0x84 }},
+ {16, 0xd300, 0, {0x8d,0x90,0x30,0x40,0x0c,0xf0,0x03,0x08,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd310, 0, {0x81,0x04,0x6c,0x00,0x8b,0x02,0x2c,0xf4,0x08,0xa8,0x62,0x0c,0x80,0x8b,0x80,0x2a }},
+ {16, 0xd320, 0, {0x60,0x0f,0x9c,0x02,0x2e,0x00,0x8b,0x00,0x20,0x60,0x0d,0x98,0x02,0x2c,0x80,0xd8 }},
+ {16, 0xd330, 0, {0x00,0x14,0x40,0x08,0x34,0x12,0x2e,0x00,0x8b,0x82,0x32,0x40,0x0d,0xb0,0x03,0x60 }},
+ {16, 0xd340, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x8b,0x00,0x2e,0xd0 }},
+ {16, 0xd350, 0, {0x08,0xb8,0x02,0x2c,0x00,0x8a,0x84,0x22,0xc0,0x0b,0x88,0x02,0xe4,0xa0,0x83,0x00 }},
+ {16, 0xd360, 0, {0x22,0x62,0x0a,0x98,0x02,0x28,0x00,0x89,0x00,0x22,0x00,0x0a,0xb1,0x06,0x2c,0x00 }},
+ {16, 0xd370, 0, {0xab,0x00,0x22,0x40,0x08,0xb0,0x02,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd380, 0, {0x08,0x04,0x0c,0x02,0xa3,0x00,0x2c,0xc1,0x08,0x20,0x02,0x0c,0x02,0x8b,0x00,0x28 }},
+ {16, 0xd390, 0, {0xc2,0x0a,0x00,0x02,0x44,0x10,0x83,0x10,0x22,0x40,0x0b,0x10,0x06,0x0c,0x00,0x91 }},
+ {16, 0xd3a0, 0, {0x04,0xaa,0x00,0x28,0x30,0x02,0x2c,0x00,0xa1,0x01,0x20,0x40,0x09,0xb0,0x02,0x42 }},
+ {16, 0xd3b0, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x7c,0x00,0x8f,0x00,0x3e,0xc0 }},
+ {16, 0xd3c0, 0, {0x2c,0xa0,0x03,0x29,0x40,0xa8,0x40,0x32,0xcc,0x8b,0x80,0x02,0xe0,0x00,0xcf,0x40 }},
+ {16, 0xd3d0, 0, {0x32,0x00,0x0e,0x80,0x0a,0x20,0x00,0x88,0x00,0x22,0x40,0x0c,0xb0,0x03,0x2c,0x04 }},
+ {16, 0xd3e0, 0, {0xeb,0x00,0xb2,0x40,0x8c,0xb0,0x03,0x40,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd3f0, 0, {0xa0,0x1d,0xfc,0x00,0xdf,0x00,0x3f,0x40,0x0f,0xe0,0x03,0xfc,0x80,0xff,0x28,0x3d }},
+ {16, 0xd400, 0, {0xc0,0x0b,0xc1,0x03,0xb0,0x14,0xff,0x00,0x3f,0x00,0x0d,0xd0,0x03,0xdc,0x00,0xfc }},
+ {16, 0xd410, 0, {0x00,0x37,0x40,0x0f,0xf0,0x21,0xfc,0x00,0x1d,0x00,0x7b,0x40,0x8f,0xf0,0x03,0xe0 }},
+ {16, 0xd420, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xd2,0x00,0xdf,0x00,0x31,0xa0 }},
+ {16, 0xd430, 0, {0x4d,0xf0,0x43,0x32,0x00,0xce,0x14,0x1b,0x68,0x0e,0xda,0x23,0xb2,0xc0,0x2f,0x00 }},
+ {16, 0xd440, 0, {0x3f,0xc2,0x2c,0xe8,0x03,0x3c,0x40,0xfd,0x08,0x3b,0xc8,0x4c,0xf0,0x83,0x3c,0xa0 }},
+ {16, 0xd450, 0, {0xcf,0x00,0x33,0xc4,0x0c,0xf3,0x07,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd460, 0, {0x80,0x10,0xe2,0x00,0x8f,0xc0,0x22,0xa0,0x08,0xfd,0x42,0x2f,0x00,0x8b,0x70,0x22 }},
+ {16, 0xd470, 0, {0x1e,0x48,0x89,0x02,0x27,0xc0,0x8f,0x5a,0x2e,0x50,0x48,0x30,0x02,0xbd,0xc0,0xbd }},
+ {16, 0xd480, 0, {0x40,0x23,0xc5,0x48,0xf4,0x82,0x3d,0x2c,0x87,0x70,0x22,0xc0,0x08,0xf1,0x03,0xe0 }},
+ {16, 0xd490, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xe0,0x00,0x93,0x10,0x26,0x81 }},
+ {16, 0xd4a0, 0, {0x49,0x30,0x02,0x80,0x40,0x83,0x20,0x28,0x40,0x0a,0x10,0x02,0x80,0x00,0xa3,0x24 }},
+ {16, 0xd4b0, 0, {0x2c,0xca,0x08,0x32,0x82,0x0c,0x00,0x91,0x28,0x20,0xca,0x1b,0x32,0x02,0x0c,0x88 }},
+ {16, 0xd4c0, 0, {0x83,0x09,0x20,0xc8,0x09,0x32,0x02,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd4d0, 0, {0xc0,0x15,0xa3,0x14,0x8b,0x04,0x26,0x89,0x08,0xb0,0x02,0xac,0x22,0x8b,0x88,0x2a }},
+ {16, 0xd4e0, 0, {0x20,0x08,0x98,0x82,0xa6,0x10,0xab,0x00,0x2e,0xca,0x08,0xb0,0x82,0xac,0x00,0xb9 }},
+ {16, 0xd4f0, 0, {0x00,0x22,0xc0,0x29,0xb0,0x0a,0x2c,0x01,0x8b,0x00,0x22,0xc0,0x09,0xb0,0x22,0xf0 }},
+ {16, 0xd500, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe3,0x00,0xdb,0x00,0x34,0xe2 }},
+ {16, 0xd510, 0, {0x0d,0xb0,0x03,0xa3,0x00,0xca,0x80,0xba,0x70,0x0e,0x88,0x03,0xa6,0x00,0xeb,0x00 }},
+ {16, 0xd520, 0, {0x3e,0x90,0x0c,0xb5,0x03,0x2c,0x00,0xfb,0x10,0xba,0xc0,0x0e,0xb0,0x03,0x2c,0x02 }},
+ {16, 0xd530, 0, {0xcb,0x02,0x32,0xc0,0x09,0xb0,0x02,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd540, 0, {0xe0,0x01,0xb0,0x08,0xff,0x00,0xbb,0xe0,0x0f,0x70,0x03,0x65,0x00,0xf4,0x00,0x35 }},
+ {16, 0xd550, 0, {0x40,0x0f,0x40,0x03,0x54,0x00,0xdf,0x00,0x3e,0x40,0x0f,0xf8,0x03,0xec,0x00,0xf7 }},
+ {16, 0xd560, 0, {0x01,0x3d,0xc1,0x0e,0x30,0x03,0xec,0x00,0xff,0x00,0x3f,0xc0,0x8e,0xf0,0x03,0xb8 }},
+ {16, 0xd570, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa0,0x40,0xeb,0x08,0x3e,0x80 }},
+ {16, 0xd580, 0, {0x0d,0xb0,0x03,0xe0,0x00,0xc8,0x00,0x3a,0x51,0x0f,0x82,0x03,0x64,0x20,0xdb,0x00 }},
+ {16, 0xd590, 0, {0x3d,0x82,0x0c,0xbc,0x03,0x2c,0x10,0xdb,0x00,0x72,0xc0,0x0d,0xb1,0x03,0x0c,0x20 }},
+ {16, 0xd5a0, 0, {0xd3,0x00,0x32,0xc0,0x0f,0xb0,0x0b,0x50,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd5b0, 0, {0xc8,0x05,0x01,0x00,0x87,0xc0,0x2e,0xa8,0x08,0xf1,0x12,0xc5,0x40,0x88,0x00,0x22 }},
+ {16, 0xd5c0, 0, {0x40,0x0b,0x84,0x02,0x27,0x00,0xaf,0x00,0x2e,0xc0,0x08,0xbc,0x12,0x3c,0x00,0x8b }},
+ {16, 0xd5d0, 0, {0x01,0x23,0xc0,0x28,0xf5,0x4a,0x3d,0x28,0xdf,0x00,0x33,0xc0,0x4b,0xf0,0x03,0x32 }},
+ {16, 0xd5e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x48,0x80,0xa3,0x90,0x2c,0x00 }},
+ {16, 0xd5f0, 0, {0x08,0x30,0x02,0xc1,0x00,0x92,0x04,0x28,0x00,0x0b,0x14,0x12,0x43,0x00,0xb3,0x04 }},
+ {16, 0xd600, 0, {0x2c,0x30,0x0a,0xb0,0x0a,0x8c,0x00,0x93,0x00,0x60,0xc0,0x08,0x3c,0x06,0x0e,0x01 }},
+ {16, 0xd610, 0, {0xb3,0x00,0x2e,0xc0,0x8b,0x30,0x06,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd620, 0, {0x20,0x01,0x12,0x00,0x87,0x80,0x2d,0x24,0x08,0x78,0x02,0xd2,0x00,0x95,0x80,0x21 }},
+ {16, 0xd630, 0, {0xa0,0x0b,0x68,0x02,0x5a,0x20,0x87,0x80,0x2d,0x66,0x1a,0x7c,0x02,0x9e,0x00,0x87 }},
+ {16, 0xd640, 0, {0x80,0x21,0xe1,0x18,0x79,0x02,0x9e,0x40,0xb7,0x80,0xa1,0xe0,0x0b,0x78,0x02,0x48 }},
+ {16, 0xd650, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x00,0x00,0xe3,0xa0,0x3c,0x40 }},
+ {16, 0xd660, 0, {0x0c,0x30,0x03,0xc4,0x22,0xd9,0x00,0x38,0xd4,0x0f,0x30,0x83,0x68,0x40,0xf3,0x00 }},
+ {16, 0xd670, 0, {0x3c,0x80,0x0a,0x32,0x02,0x8c,0x00,0xdb,0x00,0xa2,0xc4,0x0c,0x30,0x03,0x0c,0x00 }},
+ {16, 0xd680, 0, {0xf3,0x00,0x3c,0xc0,0x0f,0xb1,0x03,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd690, 0, {0x40,0x0d,0xb0,0x00,0xff,0x10,0x3f,0x40,0x0e,0xf0,0x03,0xfc,0x00,0xed,0x00,0x3f }},
+ {16, 0xd6a0, 0, {0xc0,0x0f,0x30,0x13,0xbc,0x40,0x7f,0x10,0x3f,0xc1,0x2d,0xf0,0x03,0x7c,0x00,0xfb }},
+ {16, 0xd6b0, 0, {0x40,0x3f,0xc2,0x0e,0xf4,0x83,0x7c,0x00,0xdf,0x00,0x3f,0xc2,0x0f,0xf0,0x03,0x90 }},
+ {16, 0xd6c0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xdb,0xa0,0x32,0xc0 }},
+ {16, 0xd6d0, 0, {0x0d,0xb7,0x03,0xe0,0x00,0xca,0x04,0x3e,0x80,0x0f,0xb8,0x03,0x2c,0x10,0xfb,0x00 }},
+ {16, 0xd6e0, 0, {0x33,0x00,0x8d,0xb0,0x03,0x2c,0x80,0xe9,0x40,0x3e,0xd2,0x0f,0xb4,0x03,0x2d,0x80 }},
+ {16, 0xd6f0, 0, {0xeb,0x20,0xb2,0xc0,0x0f,0xb2,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd700, 0, {0x48,0x11,0x90,0x00,0xb7,0x10,0x11,0xc0,0x08,0x70,0x82,0xd8,0x0a,0x87,0x01,0x2d }},
+ {16, 0xd710, 0, {0x80,0x89,0x70,0x03,0xd8,0x08,0xb7,0x0a,0x21,0x40,0x2c,0x70,0x02,0x0d,0xc0,0x85 }},
+ {16, 0xd720, 0, {0x01,0x79,0xc8,0x0b,0x32,0x02,0x0d,0x20,0x8f,0x28,0x21,0xc0,0x0b,0x72,0x82,0xd2 }},
+ {16, 0xd730, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x40,0x96,0x10,0x97,0x90,0x23,0xe0 }},
+ {16, 0xd740, 0, {0x09,0x7a,0x02,0xd6,0x00,0x97,0x80,0x2d,0xf0,0x0b,0x78,0x82,0x1e,0x00,0xb3,0xb0 }},
+ {16, 0xd750, 0, {0x21,0xa0,0x08,0x78,0x02,0x1e,0x00,0xa5,0x80,0x2d,0xe0,0x0b,0x7a,0x02,0x1e,0x80 }},
+ {16, 0xd760, 0, {0xa7,0xb0,0x21,0xe8,0x0b,0x79,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd770, 0, {0x48,0x14,0xc0,0x00,0xb3,0x00,0x20,0xe2,0x08,0x30,0x02,0xc6,0x40,0x93,0x70,0x2c }},
+ {16, 0xd780, 0, {0xc0,0x09,0x3c,0x02,0x8e,0x00,0xb3,0x00,0x20,0xd8,0x08,0x18,0x02,0x0c,0x00,0x81 }},
+ {16, 0xd790, 0, {0x90,0x2e,0xc0,0x0b,0x30,0x2a,0x2c,0x10,0x83,0x00,0xa0,0xc0,0x0b,0x30,0x02,0xd2 }},
+ {16, 0xd7a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x11,0xb9,0x00,0xda,0x02,0x33,0xb8 }},
+ {16, 0xd7b0, 0, {0x0d,0xa0,0x03,0xf8,0x00,0xde,0xc0,0x3f,0xb0,0x4f,0xec,0x06,0x38,0x40,0xfa,0x00 }},
+ {16, 0xd7c0, 0, {0xb3,0x90,0x0c,0x6c,0x0b,0x28,0x08,0xea,0x01,0x7e,0x80,0x0f,0xa0,0x03,0x28,0x00 }},
+ {16, 0xd7d0, 0, {0xea,0x00,0x32,0x80,0x0f,0xa0,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd7e0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x40,0x3a,0x00,0x0f,0x84,0x03,0xe1,0x00,0xe8,0x02,0x3e }},
+ {16, 0xd7f0, 0, {0x00,0x0f,0x84,0x03,0xe1,0x40,0xf8,0x00,0x3e,0x00,0x0f,0x81,0x03,0xe0,0x00,0xf8 }},
+ {16, 0xd800, 0, {0x00,0x3a,0x00,0x0f,0x80,0x03,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0xd810, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x20,0xf9,0xc0,0x3e,0x70 }},
+ {16, 0xd820, 0, {0x0e,0x90,0x02,0xe4,0x80,0xc9,0x00,0x32,0x42,0x0c,0x98,0x83,0xa4,0x84,0xf9,0x00 }},
+ {16, 0xd830, 0, {0xb2,0x60,0x0c,0x90,0x83,0x24,0x00,0xc9,0x00,0x3e,0x40,0x0c,0x1a,0x02,0x24,0x00 }},
+ {16, 0xd840, 0, {0xc1,0x00,0xb2,0x40,0x0f,0x90,0x01,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd850, 0, {0x80,0x04,0x65,0x00,0xb9,0x81,0x2c,0x60,0x0d,0x94,0xc2,0xc7,0x08,0x89,0x00,0x22 }},
+ {16, 0xd860, 0, {0x40,0x08,0x95,0xc7,0xa4,0x00,0xb9,0x00,0x28,0x70,0xa8,0x94,0x0a,0x24,0x00,0x89 }},
+ {16, 0xd870, 0, {0x04,0x2e,0x40,0x28,0x90,0x2a,0x26,0x00,0x89,0x00,0x22,0x40,0x0b,0x90,0x02,0xe0 }},
+ {16, 0xd880, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xb9,0x40,0x2e,0x40 }},
+ {16, 0xd890, 0, {0x0a,0x90,0x02,0xe5,0x00,0x81,0x00,0xa0,0x40,0x09,0x90,0x42,0xec,0x00,0xb1,0x00 }},
+ {16, 0xd8a0, 0, {0x22,0x58,0x08,0x90,0xa2,0x04,0x02,0x89,0x00,0x2e,0x40,0x08,0x90,0x02,0xa4,0xa0 }},
+ {16, 0xd8b0, 0, {0x89,0x00,0x22,0x40,0x0b,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd8c0, 0, {0x08,0x04,0x04,0x00,0xb1,0x20,0x2e,0xc0,0x89,0x12,0x02,0xc4,0x80,0x81,0x20,0x20 }},
+ {16, 0xd8d0, 0, {0x40,0x61,0x10,0x42,0xc5,0x00,0xb1,0x20,0x28,0x48,0x18,0x90,0x42,0x04,0x80,0x81 }},
+ {16, 0xd8e0, 0, {0x28,0x2c,0x48,0x08,0x12,0x82,0x84,0xa0,0x81,0x20,0x20,0x48,0x0b,0x12,0x82,0xc2 }},
+ {16, 0xd8f0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x68,0x00,0xf8,0x00,0x2e,0x00 }},
+ {16, 0xd900, 0, {0x0e,0x80,0x03,0xe0,0x08,0xc8,0x50,0x32,0x14,0x0d,0x80,0x17,0xe8,0x04,0xf8,0x50 }},
+ {16, 0xd910, 0, {0x32,0x14,0x4c,0x05,0x0b,0x21,0x40,0xc8,0x20,0x3e,0x00,0x0c,0x87,0x03,0xa1,0xc2 }},
+ {16, 0xd920, 0, {0xc8,0x00,0x32,0x14,0x8f,0x82,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd930, 0, {0x98,0x1d,0xf4,0x00,0xf1,0x10,0x3d,0x40,0x0f,0x91,0x02,0xd4,0x42,0xfd,0x10,0x3f }},
+ {16, 0xd940, 0, {0x51,0x0e,0x54,0x13,0xb5,0x00,0xf9,0x10,0x35,0x44,0x2f,0xd0,0x03,0xe4,0x50,0xfd }},
+ {16, 0xd950, 0, {0x28,0x3e,0x4e,0x0f,0x90,0x03,0x64,0x00,0xf9,0x38,0x3e,0x44,0x0f,0x92,0x83,0xe6 }},
+ {16, 0xd960, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x15,0xf4,0x00,0xfd,0x00,0x3d,0x40 }},
+ {16, 0xd970, 0, {0x2c,0xd0,0x03,0xb6,0x00,0xf9,0x82,0x3e,0x40,0x0c,0xd0,0x03,0xf4,0x00,0xf9,0x80 }},
+ {16, 0xd980, 0, {0x33,0x70,0x0c,0x50,0x03,0x34,0x00,0xc9,0xc0,0x3e,0x40,0x0c,0xda,0x03,0x16,0x80 }},
+ {16, 0xd990, 0, {0xc9,0x40,0x3e,0x62,0x2c,0x98,0x83,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd9a0, 0, {0x38,0x10,0xe0,0x00,0xb8,0x00,0x2e,0x00,0x08,0x80,0x02,0x28,0x00,0xb8,0x50,0x26 }},
+ {16, 0xd9b0, 0, {0x00,0x08,0xa0,0x02,0xe8,0x00,0xb8,0x00,0x2a,0x34,0x2a,0xaa,0x0a,0x20,0x00,0x88 }},
+ {16, 0xd9c0, 0, {0xc0,0x2e,0x2a,0x08,0x80,0x22,0x21,0x00,0xa8,0x80,0x2e,0x00,0x08,0x80,0x02,0x0e }},
+ {16, 0xd9d0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x00,0xb1,0x00,0x2e,0x40 }},
+ {16, 0xd9e0, 0, {0x48,0x10,0x06,0x8d,0x00,0xb1,0x00,0x2c,0x40,0x28,0x10,0x02,0xc4,0x00,0xb1,0x40 }},
+ {16, 0xd9f0, 0, {0x2c,0x48,0x08,0x10,0x82,0x44,0x00,0x81,0x60,0x2c,0x40,0x28,0x14,0x0a,0x04,0x40 }},
+ {16, 0xda00, 0, {0x81,0x20,0x2c,0x40,0x08,0x10,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xda10, 0, {0x18,0x05,0xa4,0x40,0xb9,0x00,0x2e,0x40,0x08,0xb0,0x02,0x24,0x00,0xb9,0x28,0x2e }},
+ {16, 0xda20, 0, {0x50,0x08,0x90,0x22,0xe4,0x00,0xb9,0x00,0x2e,0x60,0x0b,0x12,0x42,0x64,0x00,0x89 }},
+ {16, 0xda30, 0, {0x00,0x2c,0x40,0x09,0x90,0x02,0x24,0x00,0xa9,0x00,0x2c,0x40,0x08,0x10,0x02,0x46 }},
+ {16, 0xda40, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x05,0xe6,0x00,0xf9,0x00,0x3c,0x42 }},
+ {16, 0xda50, 0, {0x0c,0x90,0x03,0xa7,0x40,0xf9,0x40,0x3e,0x70,0x0c,0x98,0x02,0xe5,0x40,0xf9,0x00 }},
+ {16, 0xda60, 0, {0x3e,0x40,0x0c,0x98,0x03,0x64,0x06,0xc9,0x01,0x2e,0x40,0x0c,0x90,0x03,0x24,0x04 }},
+ {16, 0xda70, 0, {0xc9,0x00,0x3e,0x40,0x0c,0x90,0x0b,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xda80, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x83,0xe6,0x10,0xf9,0x00,0x36 }},
+ {16, 0xda90, 0, {0x68,0x0f,0x9c,0x03,0xe6,0x00,0xf9,0x00,0x3a,0x40,0x0e,0x98,0x93,0xa4,0x00,0xf9 }},
+ {16, 0xdaa0, 0, {0x00,0x3e,0x40,0x0e,0x90,0x83,0xc4,0x00,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x03,0x8a }},
+ {16, 0xdab0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0xa0,0x00,0xf8,0x00,0x3e,0x04 }},
+ {16, 0xdac0, 0, {0x0c,0x80,0x03,0x21,0x02,0xc8,0x40,0x32,0x00,0x0f,0x80,0x03,0xe1,0x00,0xf0,0x00 }},
+ {16, 0xdad0, 0, {0x3e,0x02,0x0c,0x80,0x03,0x20,0x00,0xf8,0x00,0x3e,0x00,0x0c,0x00,0x03,0x20,0x00 }},
+ {16, 0xdae0, 0, {0xc8,0x00,0x32,0x00,0x0f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdaf0, 0, {0x28,0x15,0x3a,0x00,0xbe,0x02,0x2f,0xb0,0x08,0x68,0x12,0x38,0x00,0x8a,0x04,0x2a }},
+ {16, 0xdb00, 0, {0x80,0x0b,0xe0,0x42,0xfb,0x20,0xba,0x00,0x2f,0x91,0x08,0xe0,0x02,0x28,0x00,0xba }},
+ {16, 0xdb10, 0, {0x00,0x26,0x80,0x08,0xee,0x0a,0x38,0x00,0x8a,0x00,0x22,0x80,0x0b,0xa0,0x02,0x8a }},
+ {16, 0xdb20, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x42,0x00,0xb3,0x00,0x2c,0xc2 }},
+ {16, 0xdb30, 0, {0x28,0x38,0x0a,0x48,0x00,0x83,0x04,0x22,0xc0,0x0b,0x10,0x02,0xcd,0x80,0xb3,0x00 }},
+ {16, 0xdb40, 0, {0x2e,0xc0,0x08,0x1c,0x02,0x24,0x00,0xb3,0x00,0x2c,0xc0,0x08,0x34,0x12,0x0e,0x40 }},
+ {16, 0xdb50, 0, {0x83,0x00,0x20,0xc0,0x0b,0x30,0x12,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdb60, 0, {0xa0,0x01,0x11,0x00,0xb7,0x00,0x2f,0xc0,0x08,0x70,0xa2,0x4e,0x00,0x8f,0xb0,0x21 }},
+ {16, 0xdb70, 0, {0xcc,0x0b,0x60,0x12,0xdc,0x10,0xb7,0x30,0x2d,0xc0,0x08,0xd0,0x82,0x14,0x80,0xb7 }},
+ {16, 0xdb80, 0, {0x12,0x25,0xc8,0x28,0x60,0x02,0x14,0x00,0x87,0xb2,0x21,0xcc,0x0b,0x31,0x02,0xa8 }},
+ {16, 0xdb90, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x12,0x00,0xf7,0x80,0x3d,0xe0 }},
+ {16, 0xdba0, 0, {0x0c,0x38,0x03,0x56,0x00,0xc7,0x90,0xb1,0xe4,0x0f,0x78,0x03,0xde,0x00,0xf7,0x90 }},
+ {16, 0xdbb0, 0, {0x1f,0x60,0x2c,0x48,0x0b,0x16,0xa0,0xf7,0x80,0x3c,0xf4,0x0c,0x38,0x03,0x1e,0x00 }},
+ {16, 0xdbc0, 0, {0xcf,0xa0,0xb1,0xe8,0x0f,0x7b,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdbd0, 0, {0x08,0x0d,0xa0,0x00,0xf8,0x00,0x3e,0xc0,0x0b,0xb0,0x03,0xac,0x00,0xf3,0x21,0x3e }},
+ {16, 0xdbe0, 0, {0xc8,0x07,0xb0,0x02,0xe4,0x00,0xfb,0x20,0x3f,0x40,0x0f,0x80,0x03,0xe4,0x80,0xfb }},
+ {16, 0xdbf0, 0, {0x00,0x36,0xd0,0x0f,0xa0,0x03,0xe0,0x08,0xfb,0x42,0x3e,0xd8,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0xdc00, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf0,0x80,0xcf,0x80,0x31,0xe1 }},
+ {16, 0xdc10, 0, {0x0c,0xf8,0x03,0xda,0x10,0xef,0x80,0x3f,0xe4,0x0f,0xd8,0x03,0xfe,0x10,0xff,0x82 }},
+ {16, 0xdc20, 0, {0x3f,0xe0,0x4c,0xd8,0x1b,0x16,0x20,0xcf,0x80,0x3f,0xe0,0x4c,0xd8,0x30,0xee,0x40 }},
+ {16, 0xdc30, 0, {0xff,0xc0,0xb3,0xf4,0x0f,0xf8,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdc40, 0, {0xa8,0x01,0x98,0x20,0x83,0x40,0x21,0xc0,0x08,0x71,0x02,0xdc,0x84,0x87,0x20,0x2d }},
+ {16, 0xdc50, 0, {0xc0,0x0b,0x60,0x02,0xd9,0x60,0xf7,0x00,0x2d,0xc0,0x08,0xf0,0x82,0x14,0x04,0x87 }},
+ {16, 0xdc60, 0, {0x00,0x2d,0xc0,0x08,0xf0,0x03,0x1e,0x00,0xb7,0x20,0x21,0xc0,0x8b,0x70,0x02,0xea }},
+ {16, 0xdc70, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x00,0x87,0x00,0x21,0x80 }},
+ {16, 0xdc80, 0, {0x08,0x70,0x02,0xf5,0x04,0x27,0x00,0x2d,0xc0,0x8b,0x70,0x02,0xdc,0x00,0xb7,0x00 }},
+ {16, 0xdc90, 0, {0x2c,0x50,0x08,0x40,0x02,0x14,0x00,0x87,0x00,0x2d,0xc0,0x08,0x50,0x02,0x5c,0x04 }},
+ {16, 0xdca0, 0, {0xb7,0x00,0xa1,0xc0,0x8b,0x70,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdcb0, 0, {0x20,0x14,0xc8,0x00,0x80,0x00,0x00,0x80,0x08,0x30,0x02,0xce,0x00,0x83,0xc0,0x2c }},
+ {16, 0xdcc0, 0, {0xd0,0x4b,0x30,0x02,0xce,0x00,0xab,0x02,0x2c,0x40,0x48,0xbc,0x02,0x04,0x00,0x83 }},
+ {16, 0xdcd0, 0, {0x00,0x2c,0xc0,0x08,0x10,0x02,0x00,0x08,0xb3,0x00,0x20,0xc0,0x09,0x30,0x02,0xc8 }},
+ {16, 0xdce0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0x83,0x40,0xc8,0x00,0x30,0xc0 }},
+ {16, 0xdcf0, 0, {0x2c,0xb0,0x03,0xec,0x00,0xef,0x88,0x3f,0xe6,0x07,0xb1,0x83,0xe1,0x00,0xbf,0x00 }},
+ {16, 0xdd00, 0, {0x3e,0xe0,0x0c,0xb8,0x03,0x34,0x00,0xcf,0x00,0x3f,0xc0,0x2c,0xb0,0x03,0x68,0x10 }},
+ {16, 0xdd10, 0, {0xff,0x00,0x33,0xc0,0x0f,0xf0,0x03,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdd20, 0, {0x80,0x00,0xe4,0x00,0xf1,0x40,0x3e,0xc0,0x0f,0xb4,0x03,0xed,0x40,0xfb,0x08,0x3e }},
+ {16, 0xdd30, 0, {0xc0,0x0f,0xa0,0x03,0xe5,0x20,0xfb,0x00,0x3e,0xe0,0x0d,0xb0,0x83,0xe4,0x00,0xf3 }},
+ {16, 0xdd40, 0, {0x00,0x3e,0xc0,0x0f,0x80,0x03,0xc4,0x00,0xfb,0x00,0x3e,0xc0,0x0f,0x30,0x03,0xe0 }},
+ {16, 0xdd50, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x00,0xca,0x00,0x33,0xe0 }},
+ {16, 0xdd60, 0, {0x4e,0xf0,0x03,0x34,0x00,0xff,0x00,0x3f,0xc0,0x8f,0xe8,0x03,0xf0,0x00,0xff,0x00 }},
+ {16, 0xdd70, 0, {0xb1,0x40,0x0c,0xe0,0x03,0x34,0x00,0xef,0x00,0xb3,0xc0,0x0c,0xf0,0x03,0x38,0x00 }},
+ {16, 0xdd80, 0, {0xcf,0x00,0x3d,0xc0,0x0a,0xf0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdd90, 0, {0x81,0x04,0x62,0x22,0x88,0x90,0x22,0xe0,0x08,0x3c,0x02,0x2e,0x08,0xbb,0x01,0x2e }},
+ {16, 0xdda0, 0, {0xc0,0x0b,0xa0,0x02,0x66,0x00,0xbb,0x00,0x22,0xa0,0x08,0xa9,0x02,0x24,0x00,0xbb }},
+ {16, 0xddb0, 0, {0x00,0x22,0xc0,0x28,0x2c,0x02,0xa2,0x00,0xdb,0x00,0x2e,0xc0,0x0a,0xb0,0x02,0xa0 }},
+ {16, 0xddc0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x22,0x00,0x98,0x00,0x22,0xc8 }},
+ {16, 0xddd0, 0, {0x0a,0x98,0x02,0x27,0x04,0xbb,0x00,0x2e,0xc0,0x0b,0xb1,0x02,0xe2,0x00,0xbb,0x00 }},
+ {16, 0xdde0, 0, {0x22,0xe2,0x08,0xb0,0x02,0xa4,0x00,0xab,0x00,0x20,0xc0,0x0a,0x88,0x82,0x23,0x00 }},
+ {16, 0xddf0, 0, {0x8b,0x00,0x2e,0xc0,0x08,0xb0,0x02,0xa0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xde00, 0, {0x08,0x14,0x04,0x00,0x91,0x40,0x22,0xc0,0x08,0x10,0x02,0x0c,0x00,0xb3,0x00,0x2c }},
+ {16, 0xde10, 0, {0xc0,0x4b,0x28,0x22,0x40,0x04,0xb3,0x00,0x20,0xc0,0x28,0x30,0x0a,0x04,0x04,0xb3 }},
+ {16, 0xde20, 0, {0x00,0x60,0xc0,0x08,0x00,0x02,0x84,0x20,0x93,0x00,0x2c,0xc0,0x0a,0x30,0x02,0x82 }},
+ {16, 0xde30, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x60,0x00,0xda,0x40,0xb2,0x80 }},
+ {16, 0xde40, 0, {0x0e,0x90,0x03,0x24,0x00,0xff,0x00,0x3f,0xc0,0x8f,0xa0,0x03,0xe0,0x09,0xff,0x00 }},
+ {16, 0xde50, 0, {0x32,0x40,0x08,0xa0,0x0b,0x34,0x00,0xeb,0x00,0x31,0xc0,0x0c,0x80,0x03,0x28,0x80 }},
+ {16, 0xde60, 0, {0xc7,0x00,0x3f,0xc0,0x0c,0xf0,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xde70, 0, {0xa0,0x15,0xd0,0x00,0xec,0x20,0x3f,0x00,0x0f,0xc0,0x0b,0xfc,0x10,0xff,0x01,0x3f }},
+ {16, 0xde80, 0, {0xc0,0x0f,0xe0,0x03,0xf4,0x00,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xf4,0x00,0xff }},
+ {16, 0xde90, 0, {0x00,0x3f,0xc0,0x4f,0xc0,0x01,0xf0,0x08,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xe8 }},
+ {16, 0xdea0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xcc,0x90,0x37,0x20 }},
+ {16, 0xdeb0, 0, {0x0e,0xf0,0x13,0xbd,0x04,0xd4,0xc1,0x33,0x2c,0x4c,0xd9,0x23,0x32,0x60,0xff,0x20 }},
+ {16, 0xdec0, 0, {0x3d,0xe0,0x4f,0xc1,0x03,0xb6,0x40,0xcd,0x00,0x37,0xe0,0x0c,0xe2,0x8b,0x10,0xc0 }},
+ {16, 0xded0, 0, {0xcd,0x00,0x33,0xc6,0x0f,0xd8,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdee0, 0, {0x80,0x10,0xee,0x08,0x8a,0x20,0x22,0x00,0x08,0xb7,0x02,0x2d,0x00,0x8a,0x00,0xb6 }},
+ {16, 0xdef0, 0, {0x3c,0x08,0x99,0x02,0x27,0x84,0xbf,0x68,0x2e,0x82,0x0b,0x01,0x02,0x24,0x40,0xd9 }},
+ {16, 0xdf00, 0, {0x42,0x20,0xc0,0x8a,0xac,0x02,0x2d,0xc2,0x82,0x48,0xa2,0xd0,0x0b,0x82,0x02,0x20 }},
+ {16, 0xdf10, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0x88,0x04,0x26,0x80 }},
+ {16, 0xdf20, 0, {0x2a,0x30,0xc2,0xa5,0x80,0xa9,0x21,0x28,0x00,0x8a,0x00,0x02,0x00,0x00,0xa3,0x10 }},
+ {16, 0xdf30, 0, {0x2c,0xc8,0x0b,0x00,0x02,0xc4,0x90,0x83,0x42,0x24,0xc1,0x08,0x00,0x02,0x40,0x88 }},
+ {16, 0xdf40, 0, {0xa3,0x60,0xa8,0xc0,0x0b,0x00,0xc2,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdf50, 0, {0xc0,0x15,0xac,0x06,0x8a,0x00,0x22,0xe0,0x48,0xb0,0x02,0x2e,0x02,0xab,0x80,0x2e }},
+ {16, 0xdf60, 0, {0x20,0x4a,0x8c,0x02,0x26,0x20,0xbb,0x00,0x6e,0x80,0x0b,0x30,0xc2,0x46,0x04,0x9b }},
+ {16, 0xdf70, 0, {0x0a,0xa2,0xc0,0x0a,0x80,0x12,0x6c,0x40,0xa8,0x00,0x2a,0xc0,0x0b,0x8c,0x02,0x30 }},
+ {16, 0xdf80, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xc1,0x09,0x36,0x61 }},
+ {16, 0xdf90, 0, {0x0e,0x32,0x03,0xab,0x20,0xf8,0x84,0x3a,0x78,0x2e,0x98,0x03,0x26,0x00,0xeb,0x00 }},
+ {16, 0xdfa0, 0, {0x3e,0x40,0x4f,0x90,0x03,0xe2,0x00,0xc9,0x40,0x36,0xe0,0x0c,0xb4,0x03,0x6e,0x00 }},
+ {16, 0xdfb0, 0, {0xeb,0x00,0x3a,0xc0,0x0f,0x88,0x03,0x10,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdfc0, 0, {0xe0,0x01,0xbc,0x00,0xfd,0x00,0x3f,0x40,0x0f,0xfa,0x13,0xf8,0x10,0xdc,0x04,0x27 }},
+ {16, 0xdfd0, 0, {0x40,0x0d,0x50,0x43,0xf4,0x00,0xff,0x00,0x3f,0x40,0x0f,0xd9,0x03,0xb0,0x00,0xf9 }},
+ {16, 0xdfe0, 0, {0x01,0x3f,0xf0,0x0f,0xf0,0x23,0xb2,0x00,0xd4,0xa0,0x37,0xc0,0x0f,0xc0,0x0b,0xf8 }},
+ {16, 0xdff0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x20,0xeb,0x10,0xf2,0x00 }},
+ {16, 0xe000, 0, {0x0e,0xb4,0x03,0x21,0x80,0xc9,0x40,0x3a,0x48,0x0f,0x90,0x13,0xe1,0x20,0xfb,0x00 }},
+ {16, 0xe010, 0, {0x3e,0xc0,0x0c,0x84,0x03,0x24,0x00,0xfb,0x01,0x36,0xe0,0x0c,0x74,0x0b,0x9c,0x00 }},
+ {16, 0xe020, 0, {0xcf,0x00,0x32,0xe0,0x0f,0x84,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe030, 0, {0xc8,0x05,0x1e,0x00,0x8b,0x80,0x20,0x40,0x08,0xb8,0x02,0x83,0x80,0x81,0xa0,0x22 }},
+ {16, 0xe040, 0, {0x78,0x0b,0x91,0x83,0xe3,0x00,0xbf,0x00,0x0e,0xc1,0x0a,0xb4,0x03,0x64,0x04,0xb9 }},
+ {16, 0xe050, 0, {0x50,0x32,0xc0,0x0a,0xb2,0x02,0x20,0x00,0x88,0x00,0x23,0xd4,0x0b,0x88,0x02,0xf2 }},
+ {16, 0xe060, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x42,0xa0,0x80,0x20,0x00 }},
+ {16, 0xe070, 0, {0x48,0x00,0x02,0x0d,0x06,0x80,0x80,0x2a,0xd0,0x03,0x00,0x02,0xc8,0x00,0xb3,0x00 }},
+ {16, 0xe080, 0, {0x2c,0xc0,0x08,0x36,0x02,0x40,0x00,0xb9,0x02,0x22,0xc2,0x8b,0x26,0x02,0x0c,0x10 }},
+ {16, 0xe090, 0, {0x01,0x02,0x24,0xc0,0x4b,0xa1,0x02,0xf8,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe0a0, 0, {0x20,0x01,0x1e,0x08,0x8e,0x80,0x21,0x21,0x08,0x28,0xc2,0x9e,0x00,0x8e,0x80,0x21 }},
+ {16, 0xe0b0, 0, {0x60,0x0b,0x78,0x02,0x9e,0x20,0xb7,0x82,0x2f,0xa1,0x0a,0x78,0x02,0x5e,0x00,0xb5 }},
+ {16, 0xe0c0, 0, {0x91,0xa1,0xe0,0x0b,0x29,0x02,0x32,0x44,0x86,0x80,0xa5,0xe0,0x0b,0x4c,0x02,0xc8 }},
+ {16, 0xe0d0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xe1,0x00,0x22,0x80 }},
+ {16, 0xe0e0, 0, {0x0e,0x00,0x0b,0x24,0x00,0xc0,0x44,0x28,0xad,0x0f,0x20,0x02,0xc8,0x00,0xf3,0x00 }},
+ {16, 0xe0f0, 0, {0x1c,0xc0,0x0c,0x01,0x03,0x48,0x4c,0xf2,0x04,0x30,0xc0,0x0f,0x15,0x03,0x80,0x40 }},
+ {16, 0xe100, 0, {0xc1,0x00,0x14,0xc8,0x0f,0x00,0x03,0xda,0x02,0x10,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe110, 0, {0x40,0x1d,0x9c,0x40,0xf7,0x00,0x3f,0xc0,0x8f,0xc0,0x03,0xe4,0x00,0xfa,0x01,0x3f }},
+ {16, 0xe120, 0, {0xc0,0x0f,0xf0,0x23,0xfc,0x08,0xfb,0x00,0x3f,0x80,0x0f,0xf0,0x01,0xfc,0x10,0xff }},
+ {16, 0xe130, 0, {0x00,0x3f,0xc0,0x0e,0xd1,0x03,0xfc,0x42,0xfe,0x80,0x3b,0xc0,0x0f,0xc0,0x03,0xd0 }},
+ {16, 0xe140, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x40,0xc8,0x00,0x3e,0xc0 }},
+ {16, 0xe150, 0, {0x0f,0x90,0x03,0xee,0x08,0xcb,0x00,0x32,0xc0,0x0f,0xa0,0x23,0xe6,0x03,0xcb,0x4c }},
+ {16, 0xe160, 0, {0x32,0x40,0x0f,0xb0,0x07,0xe8,0x00,0xf9,0x00,0x16,0x40,0x0c,0xa0,0x0b,0x6c,0x00 }},
+ {16, 0xe170, 0, {0xcf,0x02,0x32,0xc5,0x0c,0x80,0x03,0x02,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe180, 0, {0x48,0x11,0x9c,0x80,0x84,0x04,0x2d,0xc1,0x0b,0x40,0x40,0xdc,0x00,0x87,0x04,0x21 }},
+ {16, 0xe190, 0, {0xc0,0x4b,0x70,0x12,0xfc,0x01,0x8f,0x60,0x29,0x40,0x0b,0x70,0x13,0x9c,0x00,0xb5 }},
+ {16, 0xe1a0, 0, {0x00,0xa3,0x40,0x0a,0x60,0x02,0x00,0x00,0x84,0x00,0x21,0xc0,0x08,0x40,0x02,0x12 }},
+ {16, 0xe1b0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x8e,0x00,0x87,0x80,0x2d,0xa2 }},
+ {16, 0xe1c0, 0, {0x0b,0x4c,0x16,0xd6,0x08,0x97,0x88,0x21,0xa0,0x4b,0x68,0x02,0xde,0x04,0xa7,0x80 }},
+ {16, 0xe1d0, 0, {0x21,0xe0,0x0b,0x48,0x02,0xda,0x04,0xb6,0x82,0x25,0x60,0x0a,0xe8,0x62,0x1e,0x00 }},
+ {16, 0xe1e0, 0, {0x87,0x80,0x20,0xe8,0x08,0x48,0x02,0x08,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe1f0, 0, {0x48,0x14,0xcc,0x00,0x8b,0x80,0x6c,0xf0,0x0b,0x3c,0x02,0xce,0x46,0x9b,0xc0,0x20 }},
+ {16, 0xe200, 0, {0xe4,0x0b,0x3c,0x02,0xcc,0x20,0xa3,0x00,0x28,0xe0,0x0b,0x30,0x02,0x8d,0x80,0xb1 }},
+ {16, 0xe210, 0, {0x80,0x22,0x44,0x0a,0x21,0x0a,0x03,0x82,0x80,0x80,0xa0,0xc0,0x08,0x06,0x0a,0x12 }},
+ {16, 0xe220, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x02,0xce,0x80,0x3f,0xa0 }},
+ {16, 0xe230, 0, {0x0f,0xe0,0x03,0xfa,0x40,0xde,0xc0,0xb3,0x90,0x0f,0xea,0x13,0xf9,0x08,0xea,0x04 }},
+ {16, 0xe240, 0, {0x33,0x82,0x8f,0xe4,0x03,0xfb,0x08,0xfe,0xa0,0x36,0xa0,0x0c,0xac,0x0b,0x6b,0x82 }},
+ {16, 0xe250, 0, {0xc6,0xa0,0x32,0x80,0x2c,0xe4,0x03,0x3a,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe260, 0, {0x48,0x00,0xe0,0x00,0xf8,0x90,0x3e,0x02,0x0f,0x80,0x83,0xe1,0x00,0xe8,0x20,0x3e }},
+ {16, 0xe270, 0, {0x03,0x0f,0x82,0x03,0xe1,0x40,0xd8,0x00,0x3e,0x20,0x0f,0x00,0x93,0xa0,0x40,0xf8 }},
+ {16, 0xe280, 0, {0x00,0x3e,0x10,0x8f,0x08,0x0b,0xf0,0x00,0xfc,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0xe290, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xe9,0x00,0x36,0x40 }},
+ {16, 0xe2a0, 0, {0x0f,0x94,0x07,0xe6,0x00,0xf9,0x80,0xb0,0x40,0x0c,0x94,0x03,0xe4,0x40,0xf9,0x00 }},
+ {16, 0xe2b0, 0, {0x32,0x40,0x0f,0x94,0x0b,0xa4,0x00,0x71,0xc0,0x32,0x40,0x2c,0x94,0x23,0x24,0x02 }},
+ {16, 0xe2c0, 0, {0xc9,0x00,0x32,0x40,0x0c,0x90,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe2d0, 0, {0x80,0x04,0x44,0x00,0x89,0x00,0x22,0x40,0x0b,0x98,0x02,0xe6,0x60,0xb9,0x00,0x22 }},
+ {16, 0xe2e0, 0, {0x60,0x0a,0x9c,0x02,0xe6,0x24,0xb9,0x04,0x36,0x40,0x0b,0x98,0x00,0x24,0x00,0xb9 }},
+ {16, 0xe2f0, 0, {0x80,0xa2,0x52,0x08,0x90,0x02,0x24,0x00,0x89,0x40,0x22,0x40,0x68,0x94,0x02,0x20 }},
+ {16, 0xe300, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x00,0xa9,0x00,0x26,0x40 }},
+ {16, 0xe310, 0, {0x03,0x94,0x02,0xe4,0x01,0xb9,0x10,0x22,0x55,0x08,0x90,0x22,0xe4,0x00,0xb1,0x00 }},
+ {16, 0xe320, 0, {0x26,0x40,0x0b,0x90,0x00,0x2c,0x09,0xb9,0x00,0x22,0x60,0x08,0x90,0x0a,0x1c,0x04 }},
+ {16, 0xe330, 0, {0x8d,0x08,0xa0,0x40,0x08,0x10,0x82,0x0e,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe340, 0, {0x08,0x04,0x06,0x00,0x81,0x00,0x20,0x50,0x0b,0x12,0x42,0xc4,0x80,0xb1,0x04,0x20 }},
+ {16, 0xe350, 0, {0x50,0x0a,0x14,0x02,0xc5,0x00,0xb1,0x22,0x24,0x40,0x0b,0x12,0x22,0x04,0x01,0xb1 }},
+ {16, 0xe360, 0, {0x40,0x20,0x50,0x08,0x10,0x0a,0x15,0x00,0x85,0x40,0x28,0x50,0x08,0x14,0x0a,0x0a }},
+ {16, 0xe370, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xe8,0x50,0x36,0x00 }},
+ {16, 0xe380, 0, {0x0f,0x85,0x02,0xe1,0x40,0xf8,0x50,0x32,0x00,0x0c,0xa0,0x23,0xe0,0x10,0xf8,0x50 }},
+ {16, 0xe390, 0, {0xb2,0x14,0x0f,0xa5,0x03,0xa1,0x48,0xfa,0x00,0xb2,0x00,0x0c,0x80,0x03,0x20,0x04 }},
+ {16, 0xe3a0, 0, {0xc4,0x02,0x32,0x00,0x0c,0x00,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe3b0, 0, {0x98,0x1d,0xe5,0x00,0xfd,0x00,0x3f,0x40,0x0f,0xd1,0x03,0xd4,0x44,0xf5,0x00,0x3f }},
+ {16, 0xe3c0, 0, {0x51,0x0f,0xd4,0x03,0xf5,0x00,0xf9,0x10,0x3b,0x40,0x0f,0xd1,0x00,0xf5,0x10,0xf5 }},
+ {16, 0xe3d0, 0, {0x40,0x7f,0x40,0x0f,0x54,0x2b,0xe5,0x00,0xf9,0x40,0x36,0x50,0x0f,0xd0,0x03,0xe6 }},
+ {16, 0xe3e0, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x10,0xbd,0x40,0x33,0x40 }},
+ {16, 0xe3f0, 0, {0x0f,0xda,0x03,0x37,0x80,0xcd,0x00,0x3f,0x40,0x0f,0xd0,0x03,0xf4,0x00,0xe9,0xa0 }},
+ {16, 0xe400, 0, {0x3e,0x40,0x0c,0xde,0x17,0xa4,0x08,0xfd,0xc0,0x33,0x41,0x8d,0xda,0x13,0x26,0xa0 }},
+ {16, 0xe410, 0, {0xf9,0xa8,0x32,0x78,0x0c,0xb4,0x0b,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe420, 0, {0x38,0x10,0xe1,0x00,0xb8,0xa0,0x36,0x20,0x0b,0x8a,0x82,0xa2,0x80,0x2a,0xa8,0x2e }},
+ {16, 0xe430, 0, {0x00,0x0b,0x80,0x12,0xe0,0x04,0xb8,0xa1,0x2e,0x28,0x4a,0x8e,0x02,0x2a,0xa0,0xba }},
+ {16, 0xe440, 0, {0xc0,0x22,0x28,0x08,0x85,0x02,0x21,0x08,0xb8,0xe8,0xa2,0x3c,0x08,0xc8,0x02,0x0e }},
+ {16, 0xe450, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc5,0x00,0xb9,0x00,0x20,0x4a }},
+ {16, 0xe460, 0, {0x0b,0x14,0x02,0x05,0x80,0x01,0x00,0x2c,0x41,0x0b,0x10,0x02,0xc4,0x04,0xa1,0x4a }},
+ {16, 0xe470, 0, {0x2e,0x42,0x08,0x14,0x02,0x84,0x10,0xb1,0x60,0xa0,0x4a,0x09,0x10,0x02,0x44,0x00 }},
+ {16, 0xe480, 0, {0xb5,0x01,0x29,0x40,0x18,0xd2,0x02,0x12,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe490, 0, {0x18,0x15,0xa4,0x00,0xb9,0x21,0x26,0x40,0x0b,0x96,0x02,0xa4,0x10,0xa9,0x00,0x2e }},
+ {16, 0xe4a0, 0, {0x40,0x0b,0x96,0x12,0xe4,0x20,0xb9,0x00,0x2e,0x41,0x0a,0x90,0x42,0x24,0x00,0xb9 }},
+ {16, 0xe4b0, 0, {0x00,0x22,0x41,0x08,0x98,0x22,0x64,0x00,0xb9,0x20,0x2b,0x41,0x28,0xd4,0x02,0x06 }},
+ {16, 0xe4c0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x11,0xe4,0x00,0xf9,0xe0,0x32,0x58 }},
+ {16, 0xe4d0, 0, {0x0f,0x98,0x03,0x26,0x40,0xc9,0x40,0x3e,0x58,0x0f,0x9c,0x03,0xe4,0x00,0xe9,0x00 }},
+ {16, 0xe4e0, 0, {0x6e,0x40,0x0c,0x9a,0x02,0xa6,0x00,0xf9,0x44,0x32,0x40,0x0d,0x9a,0x0b,0x64,0x84 }},
+ {16, 0xe4f0, 0, {0xf9,0x00,0xba,0x40,0x0c,0x18,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe500, 0, {0x28,0x01,0xa4,0x00,0xf9,0x00,0x3e,0x50,0x0f,0x90,0x03,0xe6,0x00,0xf9,0x04,0x3e }},
+ {16, 0xe510, 0, {0x48,0x0f,0x90,0x03,0xe4,0x40,0xf9,0x00,0x3e,0x65,0x0f,0x99,0x81,0xe4,0x50,0xf9 }},
+ {16, 0xe520, 0, {0x20,0x3e,0x40,0x8f,0x90,0x03,0xa4,0x80,0xf9,0x00,0x34,0x40,0x0f,0x92,0x03,0xd2 }},
+ {16, 0xe530, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xf8,0x40,0x3e,0x10 }},
+ {16, 0xe540, 0, {0x0e,0x84,0x03,0x60,0x08,0xc8,0x00,0x3e,0x08,0x0f,0x80,0x83,0xe0,0x28,0xe8,0x04 }},
+ {16, 0xe550, 0, {0x3e,0x00,0x0c,0x84,0x03,0x21,0x1c,0xf0,0x48,0x32,0x00,0x0b,0x00,0x03,0xe0,0x02 }},
+ {16, 0xe560, 0, {0xc0,0x00,0x32,0x00,0x0c,0xc0,0x0b,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe570, 0, {0x28,0x05,0x38,0x00,0xb2,0x88,0x2e,0x80,0x08,0xe0,0x03,0x7a,0x80,0x8e,0x00,0x2f }},
+ {16, 0xe580, 0, {0xa0,0x0b,0xe8,0x02,0xf9,0x10,0xba,0x00,0x2c,0x80,0x28,0xe4,0x02,0x28,0x00,0xbe }},
+ {16, 0xe590, 0, {0x40,0x23,0xb8,0x08,0xe8,0x02,0xe8,0x04,0xca,0x20,0xa2,0x80,0x08,0xe8,0x02,0x0a }},
+ {16, 0xe5a0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x01,0xb3,0x00,0x2c,0x40 }},
+ {16, 0xe5b0, 0, {0x08,0xb8,0x42,0x6c,0x02,0x83,0x00,0x2c,0xe0,0x0b,0x38,0x00,0xcf,0x40,0xb3,0x00 }},
+ {16, 0xe5c0, 0, {0x2c,0xc0,0x08,0xb4,0x0a,0x0c,0x00,0xb3,0x40,0xa2,0x82,0x0a,0x39,0x02,0xcc,0x00 }},
+ {16, 0xe5d0, 0, {0x93,0x80,0xa0,0xc0,0x29,0x20,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe5e0, 0, {0xa0,0x01,0x1d,0x00,0xb7,0x00,0x2d,0x64,0x28,0x74,0x02,0x40,0x00,0x87,0x05,0x2d }},
+ {16, 0xe5f0, 0, {0x90,0x0b,0x74,0x02,0xdc,0x10,0xb7,0x30,0x2d,0xc8,0x08,0x34,0x06,0x1c,0x80,0xb7 }},
+ {16, 0xe600, 0, {0x00,0xa1,0xc0,0x0a,0x70,0x02,0xde,0x80,0x83,0x00,0x01,0x00,0x09,0x60,0x82,0x20 }},
+ {16, 0xe610, 0, {0x04,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1a,0x00,0xf7,0x80,0x3d,0x60 }},
+ {16, 0xe620, 0, {0x0e,0xd8,0x0b,0x5e,0x00,0xc7,0x80,0x3d,0xe0,0x0f,0x68,0x03,0xde,0x10,0xf7,0xa9 }},
+ {16, 0xe630, 0, {0x7f,0xe8,0x48,0x78,0x03,0x1f,0x30,0xff,0x94,0x33,0xa0,0x0e,0x78,0x03,0xcf,0x24 }},
+ {16, 0xe640, 0, {0xd6,0x80,0xb1,0xe0,0x0d,0xf8,0x43,0x22,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe650, 0, {0x08,0x1d,0xac,0x00,0xbb,0x00,0x0c,0x40,0x0f,0xb0,0x03,0xec,0x08,0xf9,0x00,0x3e }},
+ {16, 0xe660, 0, {0x00,0x0f,0x90,0x41,0xec,0x00,0xfb,0x61,0x7e,0xd0,0x0f,0xb0,0x03,0xec,0x80,0xfb }},
+ {16, 0xe670, 0, {0x40,0x3f,0x9b,0x0c,0xb0,0x03,0xed,0x90,0xfa,0x00,0x3c,0x00,0x0e,0xb0,0x03,0xc2 }},
+ {16, 0xe680, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xde,0x00,0xef,0x80,0x33,0x60 }},
+ {16, 0xe690, 0, {0x0d,0xd8,0x03,0x36,0x40,0xef,0x90,0x3e,0xe0,0x0f,0xf9,0x03,0xfe,0x00,0xff,0x80 }},
+ {16, 0xe6a0, 0, {0x33,0xfe,0x0c,0xfa,0x03,0xfe,0x00,0xcf,0x80,0xb3,0xe0,0x0f,0xf8,0x03,0xfe,0x00 }},
+ {16, 0xe6b0, 0, {0xcd,0x80,0x33,0xe0,0x0f,0xc8,0x43,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe6c0, 0, {0xa8,0x11,0x9c,0x00,0x85,0x08,0x35,0x40,0x08,0x70,0x03,0x52,0x20,0x87,0x11,0x2c }},
+ {16, 0xe6d0, 0, {0xec,0x0b,0x71,0x02,0xd0,0x00,0xe7,0x00,0x35,0xc4,0x08,0x74,0x02,0xdc,0x40,0x87 }},
+ {16, 0xe6e0, 0, {0x10,0x21,0xc0,0x0b,0x70,0x02,0xfc,0x80,0x85,0x08,0x21,0x00,0x0b,0x41,0x82,0xea }},
+ {16, 0xe6f0, 0, {0x06,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x00,0xaf,0x00,0x23,0x50 }},
+ {16, 0xe700, 0, {0x09,0x50,0x02,0x1c,0x80,0xa7,0x01,0x29,0xc0,0x1b,0x60,0x06,0xdc,0x40,0xb7,0x10 }},
+ {16, 0xe710, 0, {0x21,0xc8,0x4a,0x52,0x02,0xdc,0x00,0x83,0x00,0x21,0xc0,0x0b,0x70,0x02,0xdc,0x13 }},
+ {16, 0xe720, 0, {0x84,0x00,0x25,0xc0,0x0b,0x58,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe730, 0, {0x20,0x14,0xcc,0x00,0x81,0x80,0x24,0x40,0x08,0x3e,0x02,0x6e,0x00,0x89,0x00,0x2c }},
+ {16, 0xe740, 0, {0xc0,0x0b,0xb4,0x02,0xca,0x80,0xa3,0x00,0x24,0xc0,0x0a,0x04,0x02,0xec,0x40,0x82 }},
+ {16, 0xe750, 0, {0x0a,0x20,0xc0,0x0b,0x30,0x02,0xcd,0x10,0x80,0xc0,0xa4,0x00,0x0b,0x1c,0x02,0xc8 }},
+ {16, 0xe760, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0x84,0x00,0xeb,0x80,0x33,0x40 }},
+ {16, 0xe770, 0, {0x0d,0x8c,0x83,0x26,0x00,0xe9,0xa0,0x3e,0x78,0x8f,0x90,0x83,0xe1,0x00,0xff,0x00 }},
+ {16, 0xe780, 0, {0x31,0xd1,0x0e,0x84,0x23,0xfc,0x00,0xcb,0x82,0x32,0xc0,0x8f,0xb0,0x02,0xfd,0x40 }},
+ {16, 0xe790, 0, {0xcb,0x80,0xb6,0xc0,0x0f,0xa4,0x03,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe7a0, 0, {0x80,0x00,0xec,0x00,0xfb,0x00,0x3e,0x40,0x0f,0xa0,0x03,0xe0,0x00,0xf9,0x01,0x3e }},
+ {16, 0xe7b0, 0, {0x42,0x0f,0x90,0x03,0xe5,0x54,0xe3,0x00,0x3e,0xc8,0x05,0x93,0x03,0xec,0x80,0xfb }},
+ {16, 0xe7c0, 0, {0xc1,0x3e,0xc0,0x0f,0x20,0x03,0xcc,0x48,0xf3,0x08,0x3a,0x00,0x0f,0xa0,0x43,0xe0 }},
+ {16, 0xe7d0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x00,0xcf,0x00,0x3f,0x40 }},
+ {16, 0xe7e0, 0, {0x0f,0x30,0x01,0x2c,0x0a,0xcd,0x10,0x33,0x00,0x0f,0xd0,0x83,0x14,0x00,0xcb,0x02 }},
+ {16, 0xe7f0, 0, {0x33,0xc0,0x0c,0xe1,0x03,0xec,0x10,0xcd,0x00,0x33,0xc0,0x0c,0xf0,0x33,0x3c,0x00 }},
+ {16, 0xe800, 0, {0xea,0x00,0x33,0xc0,0x0c,0xf0,0x83,0xc8,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe810, 0, {0x81,0x04,0x6e,0x00,0x8b,0x00,0x2e,0x40,0x0b,0xbc,0x02,0x2e,0x00,0x0b,0x00,0x22 }},
+ {16, 0xe820, 0, {0x30,0x0b,0x9c,0x02,0x27,0x80,0xab,0x00,0x2a,0xc0,0x08,0xb8,0x02,0xec,0x00,0x89 }},
+ {16, 0xe830, 0, {0xc0,0x20,0xe0,0x08,0xae,0x02,0x2c,0x08,0x8a,0x00,0x22,0x00,0x08,0xb0,0x42,0xe8 }},
+ {16, 0xe840, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2e,0x00,0x8b,0x04,0x2e,0x40 }},
+ {16, 0xe850, 0, {0x8b,0x8c,0x02,0xae,0x10,0x89,0x00,0x22,0x70,0x0b,0x8c,0x02,0xa2,0x00,0x8b,0x01 }},
+ {16, 0xe860, 0, {0x22,0xc0,0x08,0x80,0x02,0xec,0x10,0x82,0x88,0xa2,0x70,0x09,0xb8,0x02,0x2c,0x08 }},
+ {16, 0xe870, 0, {0x89,0x00,0x20,0xc0,0x28,0x80,0x22,0xe0,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe880, 0, {0x08,0x04,0x0c,0x04,0x81,0x00,0x2c,0x40,0x0b,0x20,0x02,0x80,0x00,0x81,0x04,0xa0 }},
+ {16, 0xe890, 0, {0x50,0x4b,0x00,0x0a,0x80,0x00,0xa3,0x01,0x2a,0xc1,0x20,0x10,0x02,0xcc,0x14,0x83 }},
+ {16, 0xe8a0, 0, {0x00,0x22,0xc0,0x08,0x20,0x02,0x0c,0x00,0x81,0x00,0xe0,0x00,0x08,0x00,0x02,0xc2 }},
+ {16, 0xe8b0, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x68,0x00,0xcb,0x00,0x3e,0x40 }},
+ {16, 0xe8c0, 0, {0x0f,0x90,0x0b,0xac,0x80,0xc9,0x00,0x32,0x10,0x0f,0x80,0x03,0xa4,0x00,0xcf,0x02 }},
+ {16, 0xe8d0, 0, {0x31,0xc0,0x0c,0x80,0x13,0xfc,0x02,0xcd,0x00,0x33,0xc0,0x2c,0x90,0x03,0x3c,0x02 }},
+ {16, 0xe8e0, 0, {0xe8,0x00,0xb2,0xc0,0x0c,0x90,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe8f0, 0, {0xa0,0x1d,0xfc,0x02,0xf5,0x00,0x3d,0x40,0x8f,0xf0,0x23,0x6d,0x00,0xff,0x00,0x3f }},
+ {16, 0xe900, 0, {0x04,0x0f,0xc0,0x03,0x70,0x1c,0xff,0x01,0x3f,0xc0,0x4f,0xc0,0x03,0xfc,0x00,0xfd }},
+ {16, 0xe910, 0, {0x00,0x3f,0xc0,0x0f,0xe0,0x0f,0xfc,0x18,0xfc,0x00,0x3f,0x00,0x0f,0xd0,0x03,0xe8 }},
+ {16, 0xe920, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfe,0x00,0xd7,0x02,0x0f,0x30 }},
+ {16, 0xe930, 0, {0x0c,0xf2,0x01,0x7e,0x06,0x44,0x30,0x3f,0x20,0x0e,0xf0,0x02,0x7c,0x84,0xfd,0x20 }},
+ {16, 0xe940, 0, {0x27,0x08,0x0c,0xd0,0x01,0x36,0x00,0xff,0x60,0x33,0xcc,0x0b,0xf1,0x13,0x2c,0xc4 }},
+ {16, 0xe950, 0, {0xff,0x30,0x0f,0xcd,0x0c,0xf4,0x03,0xf0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe960, 0, {0x80,0x10,0xee,0x00,0x8f,0xc0,0x2e,0x00,0x08,0xfc,0x02,0x2e,0x00,0x8a,0x30,0x28 }},
+ {16, 0xe970, 0, {0x52,0x08,0xf6,0x82,0x3c,0x68,0xbd,0x90,0x32,0x34,0x48,0x9c,0x12,0x26,0x00,0xcf }},
+ {16, 0xe980, 0, {0x40,0x23,0xcc,0x0b,0xf6,0x02,0x3d,0x00,0xbf,0x10,0x2f,0xcc,0x88,0xf6,0x02,0xe0 }},
+ {16, 0xe990, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x00,0x93,0x10,0x2c,0x08 }},
+ {16, 0xe9a0, 0, {0x09,0x31,0x02,0x4c,0x00,0x9b,0x20,0x64,0x58,0x03,0x31,0x62,0x4c,0x81,0xa1,0x00 }},
+ {16, 0xe9b0, 0, {0x20,0x00,0x48,0x14,0x02,0x44,0x00,0x93,0x30,0x24,0xc0,0x0b,0x33,0x02,0x8d,0x84 }},
+ {16, 0xe9c0, 0, {0xb3,0x20,0x6c,0xc0,0x2a,0x36,0x02,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe9d0, 0, {0xc0,0x15,0xac,0x10,0x9b,0x02,0x2e,0x41,0x0b,0xb0,0x02,0xa4,0x00,0x9a,0x00,0x4a }},
+ {16, 0xe9e0, 0, {0x60,0x88,0xb0,0x52,0x6c,0x01,0xb9,0x00,0x26,0x00,0x08,0x91,0x22,0xec,0x08,0xbb }},
+ {16, 0xe9f0, 0, {0x00,0x26,0xc0,0x0b,0xb0,0x02,0xac,0x00,0xbb,0x05,0x6e,0xc1,0x0a,0xb0,0x02,0xf0 }},
+ {16, 0xea00, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xdb,0x01,0x3e,0x30 }},
+ {16, 0xea10, 0, {0x2d,0x30,0x03,0x47,0x60,0xd8,0xa0,0x16,0x38,0x8f,0xb0,0x03,0x6c,0x00,0x79,0x02 }},
+ {16, 0xea20, 0, {0x31,0x60,0x0c,0xc8,0x0a,0x66,0x00,0xbb,0x00,0xb6,0xc0,0x0f,0xb0,0x0b,0xac,0x00 }},
+ {16, 0xea30, 0, {0xfb,0x01,0x3e,0xc1,0x0e,0xb0,0x03,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea40, 0, {0xe0,0x01,0xbc,0x10,0xef,0x08,0x3f,0x24,0x0c,0xf0,0x03,0x76,0x20,0xee,0x90,0x35 }},
+ {16, 0xea50, 0, {0x40,0x0e,0x70,0x03,0xac,0x00,0xfd,0x00,0xbb,0x64,0x0f,0x88,0x13,0x34,0x80,0xcb }},
+ {16, 0xea60, 0, {0x00,0x3b,0xc0,0x0f,0xb0,0x03,0x6c,0x08,0xff,0x00,0x3e,0xc0,0x0d,0xf0,0x03,0xf8 }},
+ {16, 0xea70, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x01,0xfb,0x80,0x32,0x10 }},
+ {16, 0xea80, 0, {0x0e,0xb0,0x03,0xed,0x00,0xcb,0x50,0x3e,0x40,0x8c,0xb0,0x43,0x2c,0x10,0xf9,0x00 }},
+ {16, 0xea90, 0, {0x32,0x60,0x0c,0x40,0x0b,0x26,0x00,0xc3,0x04,0x36,0xc0,0x0c,0x30,0x03,0x2c,0x00 }},
+ {16, 0xeaa0, 0, {0x9b,0x00,0xb0,0xc0,0x0c,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeab0, 0, {0xc8,0x05,0x0e,0x80,0xbf,0x04,0x2a,0x40,0x00,0xf5,0x00,0xe6,0x00,0x82,0xd2,0x22 }},
+ {16, 0xeac0, 0, {0x40,0x0d,0xf0,0x22,0x3c,0x00,0x95,0x02,0x36,0x40,0x0a,0x80,0x02,0x2e,0x00,0x8f }},
+ {16, 0xead0, 0, {0x00,0x37,0xc0,0x0a,0xf0,0x42,0x3c,0x00,0x8f,0x00,0x23,0xc0,0x28,0xf0,0x02,0xf2 }},
+ {16, 0xeae0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4e,0x00,0xb3,0x00,0x22,0x20 }},
+ {16, 0xeaf0, 0, {0x4a,0x30,0x00,0xcc,0x00,0x81,0xc0,0x28,0x00,0x08,0x30,0x02,0x0c,0x10,0xa1,0x00 }},
+ {16, 0xeb00, 0, {0x28,0x80,0x18,0x30,0x22,0x04,0x04,0x83,0x00,0x24,0xc0,0x08,0x30,0x02,0xcc,0x08 }},
+ {16, 0xeb10, 0, {0x93,0x00,0x20,0xc0,0x08,0x30,0x06,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb20, 0, {0x20,0x01,0x1e,0x00,0xb7,0x80,0x29,0xa0,0x08,0x78,0x02,0xfe,0x20,0x8d,0x80,0x29 }},
+ {16, 0xeb30, 0, {0xe5,0x5b,0x38,0x42,0x1e,0x40,0xa1,0x81,0x25,0xa8,0x08,0x79,0x02,0x37,0x00,0x87 }},
+ {16, 0xeb40, 0, {0x80,0x25,0xe0,0x0a,0x78,0x0a,0xde,0x81,0x87,0x80,0x25,0xe5,0x48,0x78,0x02,0xc8 }},
+ {16, 0xeb50, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0xb3,0x10,0x30,0x12 }},
+ {16, 0xeb60, 0, {0x0e,0x30,0x12,0xcc,0xc0,0xc3,0x00,0x38,0x80,0x0c,0x31,0x06,0x0c,0x40,0xf1,0x00 }},
+ {16, 0xeb70, 0, {0x38,0x80,0x0c,0x30,0x43,0x04,0x42,0xc3,0x00,0x36,0xc0,0x0c,0x32,0x03,0xce,0xc0 }},
+ {16, 0xeb80, 0, {0xdb,0x00,0x30,0xc0,0x0c,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb90, 0, {0x40,0x1d,0xbc,0x00,0xff,0x10,0x3d,0x84,0x4f,0xf1,0x03,0xd0,0x40,0xfc,0x10,0x33 }},
+ {16, 0xeba0, 0, {0x80,0x5d,0xb1,0x83,0xfc,0x50,0xdd,0x0a,0x25,0x89,0x0f,0xb8,0x03,0xd4,0x00,0xff }},
+ {16, 0xebb0, 0, {0x10,0x3f,0xc0,0x0f,0xf4,0x03,0x3c,0x40,0xff,0x00,0x3b,0xc0,0x0f,0xf0,0x03,0xd0 }},
+ {16, 0xebc0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xfb,0x20,0x3e,0x00 }},
+ {16, 0xebd0, 0, {0x0f,0xb5,0x03,0x29,0x20,0xf9,0x00,0x32,0xa0,0x0c,0xb0,0x83,0xec,0x00,0x49,0xc8 }},
+ {16, 0xebe0, 0, {0xb2,0xc0,0x8c,0xa0,0x03,0x64,0x00,0xfb,0x08,0x12,0xea,0x0c,0xb0,0x0b,0x2c,0x80 }},
+ {16, 0xebf0, 0, {0xfb,0x20,0x2e,0xd2,0x6c,0xb6,0x43,0xea,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec00, 0, {0x48,0x11,0x9c,0x00,0xb7,0x49,0x2d,0x00,0x0b,0x30,0x82,0x10,0x01,0xb5,0x02,0x83 }},
+ {16, 0xec10, 0, {0xc0,0x1a,0x72,0x22,0xdd,0x41,0x85,0x00,0x61,0xc0,0x18,0x20,0x20,0x14,0x00,0xbf }},
+ {16, 0xec20, 0, {0x40,0x35,0xd0,0x0d,0x34,0x02,0x1d,0x20,0xb7,0x28,0x25,0xc1,0x08,0x74,0x82,0xd2 }},
+ {16, 0xec30, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x04,0x37,0xa0,0x2d,0x20 }},
+ {16, 0xec40, 0, {0x0b,0x7a,0x12,0x16,0x01,0xb3,0x80,0x21,0xe2,0x08,0x78,0x42,0x9e,0x00,0x85,0x80 }},
+ {16, 0xec50, 0, {0x20,0xe1,0x18,0x68,0x02,0x56,0x00,0xb7,0xa0,0x25,0xe0,0x08,0x7a,0x02,0x1e,0x00 }},
+ {16, 0xec60, 0, {0xb7,0x90,0x2c,0xe5,0x88,0x7a,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec70, 0, {0x48,0x14,0xcc,0x00,0xb3,0x00,0x6c,0x24,0x1b,0x30,0x02,0x00,0x00,0xb0,0x00,0x20 }},
+ {16, 0xec80, 0, {0xf8,0x0a,0x30,0x02,0xcc,0x00,0x81,0x00,0x20,0xd8,0x18,0x20,0x02,0x04,0x00,0xb3 }},
+ {16, 0xec90, 0, {0x00,0x24,0xc0,0x09,0x30,0x02,0x0c,0x00,0xb3,0x00,0x26,0xc0,0x08,0x30,0x02,0xd2 }},
+ {16, 0xeca0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x00,0xfa,0x00,0x3d,0x80 }},
+ {16, 0xecb0, 0, {0x0f,0x20,0x0b,0x28,0x80,0xfe,0x00,0x33,0xa0,0x0c,0xa0,0x03,0xe8,0x02,0xca,0x02 }},
+ {16, 0xecc0, 0, {0x32,0x90,0x2c,0xe4,0x03,0x78,0x00,0xfa,0x00,0x32,0x80,0x0c,0xa0,0x03,0x28,0x00 }},
+ {16, 0xecd0, 0, {0xfa,0x00,0x3e,0x80,0x0c,0xa0,0x03,0xfa,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xece0, 0, {0x48,0x00,0xe1,0x00,0xf0,0x00,0x3e,0x00,0x4f,0x80,0x03,0xe0,0x80,0xf8,0x00,0x3e }},
+ {16, 0xecf0, 0, {0x00,0x0f,0x80,0x23,0xc0,0x00,0xf8,0x02,0x3c,0x00,0x0f,0xc0,0x83,0x60,0x00,0xb8 }},
+ {16, 0xed00, 0, {0x00,0x3e,0x00,0x0f,0x80,0x23,0xe0,0x18,0xf8,0x01,0x36,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0xed10, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe6,0x00,0xf9,0x21,0x32,0x60 }},
+ {16, 0xed20, 0, {0x0c,0x90,0x03,0x2c,0x44,0xf9,0x00,0xb2,0x40,0x0f,0x90,0x1b,0x24,0x00,0xe9,0x00 }},
+ {16, 0xed30, 0, {0x3e,0x40,0x0c,0x10,0x03,0xa4,0x00,0xf9,0x00,0x32,0x40,0x0f,0x10,0x33,0x24,0x10 }},
+ {16, 0xed40, 0, {0xf1,0x00,0x32,0x40,0x0c,0x90,0x03,0x02,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed50, 0, {0x80,0x04,0x64,0x00,0xb9,0x40,0xa2,0x41,0x08,0x90,0x02,0x24,0x80,0xe9,0x00,0x22 }},
+ {16, 0xed60, 0, {0x40,0x0b,0x90,0x12,0x24,0x00,0x89,0x00,0x6e,0x41,0x18,0x90,0x42,0x24,0x00,0xb9 }},
+ {16, 0xed70, 0, {0x04,0x2a,0x41,0x0b,0x90,0x03,0x64,0x00,0xf9,0x00,0x2a,0x40,0x0a,0x90,0x0a,0x20 }},
+ {16, 0xed80, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x24,0x80,0xb9,0x42,0x62,0x48 }},
+ {16, 0xed90, 0, {0x28,0x90,0x0a,0x24,0x00,0xb1,0x00,0x22,0x40,0x0b,0x10,0x02,0x24,0x10,0xb9,0x02 }},
+ {16, 0xeda0, 0, {0x2e,0x40,0x08,0xd0,0x02,0xa4,0x00,0xb1,0x00,0x22,0x40,0x0b,0x90,0x02,0x24,0x04 }},
+ {16, 0xedb0, 0, {0xb9,0x00,0x22,0x40,0x08,0x10,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xedc0, 0, {0x08,0x04,0x0c,0x00,0xb1,0x20,0x60,0x40,0x08,0x12,0x02,0x04,0x00,0xa1,0x20,0x20 }},
+ {16, 0xedd0, 0, {0x40,0x0b,0x12,0x02,0x04,0x80,0x91,0x20,0x2d,0x68,0x08,0x52,0x12,0x04,0x00,0xb1 }},
+ {16, 0xede0, 0, {0x28,0x28,0x4a,0x09,0x12,0x82,0x44,0xa0,0xb1,0x2c,0x28,0x4a,0x0a,0x12,0x82,0x02 }},
+ {16, 0xedf0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xf8,0x00,0x32,0x14 }},
+ {16, 0xee00, 0, {0x0c,0x80,0x03,0x20,0x00,0xf8,0x50,0x32,0x14,0x0f,0x85,0x03,0x01,0x40,0xf8,0x00 }},
+ {16, 0xee10, 0, {0x2e,0x00,0x28,0xc0,0x03,0xa0,0x00,0xf8,0x24,0x30,0x08,0x0f,0x82,0x23,0x20,0x80 }},
+ {16, 0xee20, 0, {0xf8,0x20,0x32,0x08,0x0c,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee30, 0, {0x98,0x1d,0xe4,0x08,0xf9,0x10,0x3f,0x40,0x8f,0x91,0x13,0xe4,0x00,0xed,0x10,0x3f }},
+ {16, 0xee40, 0, {0x50,0x0f,0x91,0x03,0xe4,0x40,0xa5,0x10,0x3e,0x44,0x0f,0x91,0x03,0xf4,0x04,0xf9 }},
+ {16, 0xee50, 0, {0x28,0x3e,0x4b,0x0b,0x92,0xa3,0xe4,0xa0,0xe9,0x28,0x3e,0x4a,0x0f,0x92,0x83,0xe6 }},
+ {16, 0xee60, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf4,0x00,0xcd,0x00,0x33,0x40 }},
+ {16, 0xee70, 0, {0x80,0xd0,0x01,0xf4,0x00,0xa5,0x00,0x26,0x40,0x0f,0x90,0x03,0x26,0x00,0xf1,0x88 }},
+ {16, 0xee80, 0, {0x3e,0x68,0x0d,0x98,0x83,0x44,0x00,0xc9,0xc0,0x3a,0x40,0x0c,0x98,0x03,0x24,0x08 }},
+ {16, 0xee90, 0, {0xf9,0xa0,0x32,0x78,0x0f,0x9a,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeea0, 0, {0x38,0x10,0xe0,0x02,0x88,0x00,0xa2,0x00,0x08,0x80,0x02,0xe0,0x00,0x0a,0x00,0x22 }},
+ {16, 0xeeb0, 0, {0x00,0x0b,0x80,0x02,0x20,0x00,0xb8,0x40,0x2e,0x14,0x08,0x80,0x43,0x30,0x00,0x88 }},
+ {16, 0xeec0, 0, {0xa0,0x22,0x2a,0x0a,0x8a,0x42,0xa0,0x05,0xb8,0x42,0x32,0x38,0x0b,0x80,0x02,0x0e }},
+ {16, 0xeed0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x03,0x91,0x00,0x24,0x40 }},
+ {16, 0xeee0, 0, {0x0b,0x10,0x02,0xc4,0x11,0xb1,0x04,0x20,0x41,0x1b,0x10,0x22,0x45,0x00,0xb5,0x00 }},
+ {16, 0xeef0, 0, {0x25,0x40,0x09,0x50,0x02,0x54,0x01,0x81,0x40,0x2c,0x40,0x09,0x14,0x92,0x44,0x00 }},
+ {16, 0xef00, 0, {0xb1,0x40,0x24,0x4c,0x0b,0x14,0x0a,0x42,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef10, 0, {0x18,0x15,0xa4,0x00,0x99,0x00,0x24,0x42,0x0b,0x90,0x02,0xe4,0x01,0x99,0x20,0x26 }},
+ {16, 0xef20, 0, {0x40,0xcb,0x90,0x02,0x64,0x00,0xbb,0x00,0x2f,0x41,0x0a,0xd0,0x02,0x34,0x00,0x89 }},
+ {16, 0xef30, 0, {0x00,0x26,0x40,0x0b,0x10,0x02,0xe4,0x00,0x31,0x00,0x62,0x40,0x0b,0x90,0x02,0x46 }},
+ {16, 0xef40, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xc4,0x00,0xd9,0x01,0x36,0x50 }},
+ {16, 0xef50, 0, {0x2f,0x90,0x03,0xe6,0x60,0xf9,0x80,0x36,0x52,0x0b,0x90,0x0a,0x64,0x00,0xf9,0x00 }},
+ {16, 0xef60, 0, {0x36,0x40,0x0d,0x90,0x03,0x64,0x02,0x09,0x00,0x3e,0x40,0x0d,0x90,0x03,0x64,0x00 }},
+ {16, 0xef70, 0, {0xb9,0x00,0xb6,0x40,0x0f,0x90,0x03,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef80, 0, {0x28,0x01,0xa4,0x00,0xe1,0x00,0x3a,0x41,0x0c,0x90,0x23,0xe6,0x20,0xe9,0x00,0xba }},
+ {16, 0xef90, 0, {0x70,0x0f,0x90,0x03,0xa4,0x00,0xf9,0x00,0x3e,0x40,0x0d,0x10,0x13,0xa7,0x00,0xf9 }},
+ {16, 0xefa0, 0, {0x00,0x3a,0x40,0x0e,0x90,0x43,0xa4,0x08,0xf9,0x00,0x3a,0x40,0x0f,0x90,0x03,0x8a }},
+ {16, 0xefb0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x20,0xf8,0x00,0x32,0x00 }},
+ {16, 0xefc0, 0, {0x0f,0x80,0x83,0x21,0x00,0xf0,0x00,0x3a,0x11,0x09,0x80,0x03,0xe0,0x00,0xc8,0x01 }},
+ {16, 0xefd0, 0, {0x30,0x01,0x0c,0x80,0x03,0xb0,0x00,0xd0,0x00,0x34,0x00,0x0d,0x80,0x03,0x20,0x00 }},
+ {16, 0xefe0, 0, {0xc8,0x00,0x32,0x00,0x0c,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeff0, 0, {0x28,0x05,0x38,0x00,0xbe,0x00,0x22,0x80,0x03,0xe8,0x02,0x1a,0x08,0xbe,0x48,0x22 }},
+ {16, 0xf000, 0, {0x80,0x0a,0xa0,0x03,0xb8,0x00,0xca,0x08,0x22,0x80,0x0f,0xa4,0x02,0x08,0x00,0x8a }},
+ {16, 0xf010, 0, {0x00,0x22,0x80,0x8d,0xa0,0x02,0x28,0x00,0xda,0x00,0x2a,0x81,0x08,0xa0,0x02,0x8a }},
+ {16, 0xf020, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x44,0x00,0xb3,0x00,0x20,0x40 }},
+ {16, 0xf030, 0, {0x0b,0x30,0x02,0x08,0x00,0xb0,0x64,0x68,0xc1,0x08,0xb0,0x22,0xcc,0x0c,0x93,0x80 }},
+ {16, 0xf040, 0, {0x00,0xc0,0x48,0x36,0x02,0x88,0x00,0xb3,0x00,0x24,0xc0,0x08,0x30,0x06,0x0c,0x01 }},
+ {16, 0xf050, 0, {0xa3,0x02,0x2c,0xc0,0x08,0xb0,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf060, 0, {0xa0,0x01,0x14,0x08,0xb5,0x00,0x21,0x40,0x0b,0x38,0x82,0x1c,0x21,0xb7,0x00,0x23 }},
+ {16, 0xf070, 0, {0xe8,0x4a,0x72,0x26,0x9e,0x40,0x8f,0x81,0xab,0x40,0x42,0x70,0x52,0x38,0x00,0xa3 }},
+ {16, 0xf080, 0, {0x22,0x20,0xc4,0x49,0x31,0x02,0x1e,0x0a,0xb7,0x22,0x2d,0xe8,0x08,0x72,0x02,0xa8 }},
+ {16, 0xf090, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x12,0x00,0xf6,0x80,0x21,0xe0 }},
+ {16, 0xf0a0, 0, {0x0b,0x78,0x0b,0x1e,0x00,0xb4,0x82,0x3b,0xe8,0x4c,0x7c,0x13,0xfe,0x02,0x97,0x80 }},
+ {16, 0xf0b0, 0, {0x33,0xa0,0x08,0x38,0x03,0x9a,0x00,0xf7,0x88,0x35,0xe2,0x0c,0x78,0xe3,0x0e,0x00 }},
+ {16, 0xf0c0, 0, {0xe3,0xe8,0x34,0xf8,0x0c,0x3c,0x23,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf0d0, 0, {0x08,0x1d,0xa8,0x04,0xf1,0x00,0x3e,0x42,0x0f,0xb0,0x13,0xec,0x00,0xfb,0x00,0xbe }},
+ {16, 0xf0e0, 0, {0xcc,0x1e,0xb6,0x07,0xed,0x80,0xfb,0x00,0x36,0x00,0x0f,0xb0,0x43,0x68,0x00,0xcb }},
+ {16, 0xf0f0, 0, {0x30,0x3e,0xd8,0x0f,0xb6,0x0b,0xed,0x40,0xcb,0x00,0x3a,0xc0,0x2f,0xb6,0x03,0xc2 }},
+ {16, 0xf100, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf2,0x40,0xfb,0x91,0x3d,0x4c }},
+ {16, 0xf110, 0, {0x80,0xf8,0x03,0xde,0x40,0xc6,0x80,0x1b,0xf0,0x4f,0xfd,0x07,0xff,0x00,0xcd,0x80 }},
+ {16, 0xf120, 0, {0x33,0xe0,0x0c,0x68,0x03,0xba,0x00,0xff,0x80,0x33,0xe0,0x07,0xf8,0x03,0x3f,0x10 }},
+ {16, 0xf130, 0, {0xcf,0x80,0x3f,0xe0,0x0c,0xfc,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf140, 0, {0xa8,0x11,0x90,0x00,0xb5,0xc0,0x2d,0x40,0x08,0x62,0x02,0xdc,0x20,0xd6,0x02,0x21 }},
+ {16, 0xf150, 0, {0xc8,0x8f,0x70,0x02,0xdc,0x81,0xb5,0x00,0x81,0x44,0x0d,0x61,0x22,0x18,0x04,0xb7 }},
+ {16, 0xf160, 0, {0x00,0x35,0xc0,0x0b,0x70,0x02,0xbc,0x00,0xa7,0x01,0x2d,0xc0,0x08,0x70,0x03,0xea }},
+ {16, 0xf170, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x01,0xb6,0x01,0x2f,0xc0 }},
+ {16, 0xf180, 0, {0x18,0x70,0x02,0xdc,0x0a,0x96,0x10,0x29,0xc1,0x4b,0x70,0x06,0xdc,0x10,0x85,0x00 }},
+ {16, 0xf190, 0, {0x25,0x80,0x08,0x60,0x82,0x1a,0x20,0xa3,0x00,0x25,0xc0,0x0b,0x31,0x02,0x5c,0x40 }},
+ {16, 0xf1a0, 0, {0x87,0x00,0x2d,0xc0,0x08,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf1b0, 0, {0x20,0x14,0xc8,0x00,0xb1,0x00,0x2c,0x40,0x88,0x20,0x02,0xed,0x00,0x8a,0x60,0x20 }},
+ {16, 0xf1c0, 0, {0xc0,0x0a,0x30,0x02,0xcc,0x04,0xb1,0x00,0x24,0x00,0x28,0x24,0x02,0x0a,0x00,0x33 }},
+ {16, 0xf1d0, 0, {0x00,0x24,0xc0,0x0b,0xb0,0x02,0xcc,0x00,0xa3,0x00,0x2c,0xc0,0x88,0x30,0x02,0x88 }},
+ {16, 0xf1e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa0,0x00,0xfb,0x00,0x3e,0xc6 }},
+ {16, 0xf1f0, 0, {0x0c,0x80,0x03,0xe5,0x00,0x09,0xc8,0xab,0xe2,0x0b,0xf0,0x02,0xfc,0x00,0x4a,0x00 }},
+ {16, 0xf200, 0, {0x36,0xc0,0x08,0x90,0x03,0xa6,0x00,0xff,0x00,0x33,0xc0,0x0f,0xf0,0x03,0x7c,0x00 }},
+ {16, 0xf210, 0, {0x8f,0x00,0x2f,0xc0,0x28,0xf0,0x02,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf220, 0, {0x80,0x00,0xe1,0x00,0xfa,0x01,0x3e,0xc0,0x0f,0x80,0x03,0xec,0x00,0xf9,0x40,0x3e }},
+ {16, 0xf230, 0, {0xc0,0x07,0xb0,0x03,0xec,0x00,0xfa,0x00,0x3a,0x40,0x0f,0x90,0x23,0xe5,0x00,0xfb }},
+ {16, 0xf240, 0, {0x00,0x3e,0xc0,0x0f,0xb0,0x03,0xac,0x00,0xfb,0x00,0x3c,0xc0,0x0f,0xb0,0x23,0xe0 }},
+ {16, 0xf250, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x00,0xfc,0x20,0x3f,0xc0 }},
+ {16, 0xf260, 0, {0x0c,0xc8,0x03,0xfc,0x20,0xcd,0x81,0xb3,0xc2,0x4f,0xf0,0x03,0xfc,0x00,0xca,0x00 }},
+ {16, 0xf270, 0, {0x3c,0x80,0x0c,0xd0,0x82,0x36,0x01,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0x3c,0x08 }},
+ {16, 0xf280, 0, {0xcf,0x04,0x3a,0xc0,0x5c,0xb0,0x03,0xc0,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf290, 0, {0x81,0x04,0x62,0x04,0xb8,0x40,0x2c,0x60,0x08,0x89,0x02,0xee,0x80,0xa9,0x60,0x2a }},
+ {16, 0xf2a0, 0, {0xc0,0x0b,0xb0,0x03,0x8c,0x00,0xaa,0x40,0x2e,0x00,0x08,0x10,0x02,0x26,0x81,0xeb }},
+ {16, 0xf2b0, 0, {0x00,0x26,0xc0,0x8b,0xb0,0x13,0x6c,0x00,0xdb,0x00,0x2e,0xc0,0x3d,0xb0,0x02,0xe0 }},
+ {16, 0xf2c0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x23,0x00,0xbb,0x03,0x2e,0xc8 }},
+ {16, 0xf2d0, 0, {0x09,0xb0,0x02,0xee,0x00,0x8b,0x10,0x26,0xc0,0x0b,0xb0,0x02,0xec,0x00,0xa8,0x00 }},
+ {16, 0xf2e0, 0, {0x2e,0xc0,0x08,0x88,0x22,0xa4,0x80,0xbb,0x00,0x2e,0xc0,0x4b,0xb0,0x22,0x0c,0x00 }},
+ {16, 0xf2f0, 0, {0x8b,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf300, 0, {0x08,0x04,0x00,0x00,0xb2,0x00,0x2e,0xc0,0x29,0x28,0x02,0xec,0x01,0xa0,0x02,0x20 }},
+ {16, 0xf310, 0, {0xc0,0x09,0x30,0x02,0xcc,0x00,0xa0,0x00,0x2c,0x40,0x08,0x00,0x42,0x84,0x00,0x93 }},
+ {16, 0xf320, 0, {0x00,0x6c,0xc0,0x0b,0x30,0x06,0x4d,0x00,0x93,0x00,0x2c,0xc0,0x08,0x30,0x02,0xc2 }},
+ {16, 0xf330, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xf8,0x20,0x2f,0xc0 }},
+ {16, 0xf340, 0, {0x0d,0xb0,0x03,0xec,0x00,0xcb,0x00,0x33,0xc0,0x0b,0xf0,0x03,0xfc,0x18,0xe8,0x00 }},
+ {16, 0xf350, 0, {0x2e,0x80,0x08,0x80,0x03,0xa4,0x00,0xbf,0x00,0x3f,0xc0,0x0f,0xf0,0x43,0x3d,0x11 }},
+ {16, 0xf360, 0, {0xcf,0x03,0x3e,0xc1,0x5d,0xf0,0x23,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf370, 0, {0xa0,0x1d,0xf0,0x00,0xfc,0x10,0x3f,0x40,0x0e,0xe0,0x03,0xfc,0x00,0xfc,0x00,0x3f }},
+ {16, 0xf380, 0, {0xc0,0x0f,0xf0,0x03,0xbc,0x00,0xfc,0x00,0x3f,0x00,0x2f,0xc0,0x03,0x74,0x00,0xef }},
+ {16, 0xf390, 0, {0x00,0x27,0xc0,0x0f,0xf0,0x03,0xfc,0x18,0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xe8 }},
+ {16, 0xf3a0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x15,0xfc,0x88,0x9c,0x29,0x3f,0x08 }},
+ {16, 0xf3b0, 0, {0x0f,0xd2,0x83,0xec,0x00,0xff,0x08,0x3f,0x28,0x0f,0xca,0x03,0x3c,0x41,0xcf,0x20 }},
+ {16, 0xf3c0, 0, {0x73,0x2c,0x0c,0xc0,0x03,0x30,0x20,0xcf,0x60,0x33,0xd8,0x0f,0x78,0x03,0x3f,0x80 }},
+ {16, 0xf3d0, 0, {0xdd,0x92,0x33,0xc8,0x0f,0x50,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf3e0, 0, {0x80,0x10,0xe5,0x40,0x88,0x40,0x2e,0x04,0x8b,0x94,0x02,0xe4,0x00,0xb9,0x00,0x0e }},
+ {16, 0xf3f0, 0, {0x7f,0x8f,0x9e,0x83,0x65,0x82,0xcf,0x68,0x3e,0x50,0x8d,0x04,0x92,0x2f,0x04,0xd3 }},
+ {16, 0xf400, 0, {0x40,0x74,0xdc,0x0d,0xa2,0x02,0x20,0x40,0x89,0x00,0x22,0xf0,0x0b,0x98,0x02,0x20 }},
+ {16, 0xf410, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc8,0x09,0xa0,0x85,0x2c,0x01 }},
+ {16, 0xf420, 0, {0x0b,0x00,0x10,0xcc,0x40,0xa2,0x08,0x2c,0x00,0xdb,0x11,0x02,0x89,0x00,0x93,0x30 }},
+ {16, 0xf430, 0, {0x20,0x05,0x08,0x13,0x02,0x80,0x08,0xa3,0x60,0x60,0xc0,0x0a,0xb0,0x82,0x08,0x84 }},
+ {16, 0xf440, 0, {0x81,0x20,0x20,0xd0,0x0b,0x10,0x02,0xa2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf450, 0, {0xc0,0x15,0xa4,0x12,0x88,0x80,0x6e,0x20,0x0b,0x88,0x82,0xee,0x00,0xba,0x81,0x2e }},
+ {16, 0xf460, 0, {0x60,0x5a,0x98,0x02,0xa2,0x00,0x8b,0x00,0x2a,0x60,0x08,0x11,0x1a,0x2c,0x00,0xbb }},
+ {16, 0xf470, 0, {0x00,0x22,0xc0,0x08,0xb8,0x0a,0x28,0x00,0x81,0x20,0x02,0xc0,0x0b,0x90,0x02,0xb0 }},
+ {16, 0xf480, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xed,0x00,0xd9,0x80,0x3e,0x20 }},
+ {16, 0xf490, 0, {0x4f,0x98,0x00,0xeb,0x20,0xfb,0xe0,0x2e,0x60,0x0b,0x8c,0x62,0xae,0x20,0x8b,0x00 }},
+ {16, 0xf4a0, 0, {0x22,0x60,0x08,0xbc,0x03,0xa0,0x20,0xeb,0x00,0x22,0xc1,0x0a,0x18,0x0b,0x25,0x00 }},
+ {16, 0xf4b0, 0, {0xd9,0x00,0xb2,0xc0,0x0f,0x90,0x0b,0x90,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf4c0, 0, {0xe0,0x01,0x94,0x88,0xff,0x00,0x3f,0x01,0x0f,0xd0,0x01,0xf0,0x08,0xdd,0x01,0x3f }},
+ {16, 0xf4d0, 0, {0x42,0x07,0x40,0x03,0x5c,0x00,0xaf,0x00,0x3f,0x40,0x0f,0xf8,0x00,0xf0,0x00,0xdf }},
+ {16, 0xf4e0, 0, {0x00,0x3f,0xc0,0x0f,0xc0,0x23,0xf4,0x50,0xfd,0x80,0x3f,0xc0,0x0f,0xd0,0x03,0x78 }},
+ {16, 0xf4f0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xac,0x00,0xd9,0x00,0x3e,0x40 }},
+ {16, 0xf500, 0, {0x0f,0x94,0x03,0xa8,0x20,0xca,0x40,0x3a,0x40,0x0f,0x94,0x03,0xea,0x08,0xfb,0x00 }},
+ {16, 0xf510, 0, {0x3a,0x00,0x4c,0xf6,0x23,0x2c,0x30,0xcb,0x00,0x36,0xc0,0x0d,0x90,0x03,0xa1,0x02 }},
+ {16, 0xf520, 0, {0xd9,0x00,0xba,0xc0,0x0f,0x98,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf530, 0, {0xc8,0x05,0x24,0x00,0x8a,0x00,0x2e,0x40,0x0b,0x95,0x02,0xe0,0x08,0x88,0x80,0x22 }},
+ {16, 0xf540, 0, {0x70,0x8f,0x8c,0x02,0xe0,0x00,0xbf,0x02,0x20,0x00,0x08,0xb8,0x02,0x0e,0x00,0xdf }},
+ {16, 0xf550, 0, {0x00,0x23,0xdd,0x08,0x98,0x82,0x2a,0x00,0x89,0x80,0x23,0xc0,0x0b,0x50,0x1a,0x32 }},
+ {16, 0xf560, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x44,0x00,0x83,0x05,0x24,0x41 }},
+ {16, 0xf570, 0, {0x09,0x10,0x02,0xce,0x00,0x83,0x90,0x2c,0x80,0x1b,0x24,0x82,0xcc,0x00,0xbb,0x00 }},
+ {16, 0xf580, 0, {0x2c,0x80,0x08,0x04,0x08,0x04,0x01,0x8b,0x00,0x22,0xc0,0x28,0x12,0x02,0x6c,0x80 }},
+ {16, 0xf590, 0, {0x81,0x48,0x24,0xc4,0x0b,0x10,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf5a0, 0, {0x20,0x01,0x3e,0x42,0x86,0x80,0x2d,0x60,0x0b,0x68,0x02,0xf6,0x90,0x8d,0x80,0x21 }},
+ {16, 0xf5b0, 0, {0x22,0x0b,0x58,0x02,0xd7,0x40,0xb7,0x90,0x21,0xe0,0x08,0x49,0x92,0x1e,0x53,0x97 }},
+ {16, 0xf5c0, 0, {0x81,0x21,0xe0,0x48,0xc8,0x0a,0x52,0x22,0x85,0x88,0x25,0xe0,0x0b,0x58,0x02,0x08 }},
+ {16, 0xf5d0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x83,0x00,0x34,0xc0 }},
+ {16, 0xf5e0, 0, {0x0f,0x00,0x03,0xce,0x20,0xc3,0x30,0x7c,0x94,0x0b,0x34,0x83,0xcc,0x14,0xf3,0x02 }},
+ {16, 0xf5f0, 0, {0x3c,0x80,0x0c,0x04,0x03,0x04,0x60,0xc3,0x00,0xb0,0xc0,0x0c,0x10,0x03,0xec,0x00 }},
+ {16, 0xf600, 0, {0xc9,0x00,0x3c,0xc4,0x0f,0x11,0x03,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf610, 0, {0x40,0x1d,0x9c,0x00,0xee,0x01,0x3f,0xc0,0x4f,0xe1,0x03,0xd4,0x40,0xf5,0x16,0x7a }},
+ {16, 0xf620, 0, {0xc0,0x4e,0xf0,0x03,0xf4,0x10,0x37,0x05,0x3d,0xc0,0x0f,0xc0,0x0b,0xdc,0x40,0xff }},
+ {16, 0xf630, 0, {0x00,0x3b,0xc2,0x0e,0xd0,0x07,0xbc,0x02,0xef,0x00,0x3b,0xc6,0x0f,0xd0,0x03,0xd0 }},
+ {16, 0xf640, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xf4,0x00,0xdd,0x84,0x33,0x80 }},
+ {16, 0xf650, 0, {0x04,0xf0,0x03,0x6c,0x02,0xcb,0x02,0x7e,0xc0,0x1f,0xa0,0x53,0xec,0x00,0xcb,0x20 }},
+ {16, 0xf660, 0, {0x34,0x40,0x0c,0xd0,0x0b,0x20,0x10,0xeb,0x00,0x1e,0xe0,0x0f,0x30,0x0b,0x2c,0x00 }},
+ {16, 0xf670, 0, {0xc1,0x00,0x32,0xc0,0x0f,0x91,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf680, 0, {0x48,0x11,0x9c,0x00,0x87,0x00,0x21,0x80,0x08,0x60,0x00,0x14,0x00,0x85,0x00,0x2d }},
+ {16, 0xf690, 0, {0x80,0x0b,0x70,0x52,0xd4,0x04,0x83,0x28,0x29,0xc0,0x28,0x50,0x03,0x50,0x00,0x87 }},
+ {16, 0xf6a0, 0, {0x40,0x25,0xc8,0x0f,0x60,0x02,0x04,0x00,0xa7,0x00,0x3d,0xc8,0x0b,0x52,0x02,0xd2 }},
+ {16, 0xf6b0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x8e,0x00,0x95,0x80,0x21,0xe0 }},
+ {16, 0xf6c0, 0, {0x09,0x38,0x02,0x1e,0x11,0xa7,0x80,0x2d,0xf0,0x0b,0x78,0x52,0xce,0x0a,0x97,0x95 }},
+ {16, 0xf6d0, 0, {0x21,0xe0,0x19,0x5c,0x02,0x0e,0x00,0xa7,0x80,0x29,0xc8,0x0b,0xf8,0x02,0x1e,0x20 }},
+ {16, 0xf6e0, 0, {0x8d,0x80,0x21,0xe0,0x0b,0x58,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf6f0, 0, {0x48,0x14,0xcc,0x00,0x82,0xe0,0xa0,0xe8,0x29,0x30,0x06,0x0e,0x50,0xab,0x80,0x2c }},
+ {16, 0xf700, 0, {0xf0,0x0b,0x31,0x42,0xcc,0x00,0x93,0x00,0x28,0xc4,0x09,0x98,0x02,0x4c,0x28,0x83 }},
+ {16, 0xf710, 0, {0x00,0x24,0xc0,0x0a,0xb0,0x02,0x0d,0x00,0xa2,0x58,0x28,0xc0,0x0b,0x10,0x02,0xd2 }},
+ {16, 0xf720, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb9,0x00,0xde,0x80,0x31,0xa0 }},
+ {16, 0xf730, 0, {0x09,0xe2,0x0b,0x78,0x04,0xee,0xa4,0x2f,0xa4,0x8b,0xec,0x02,0xd8,0x00,0xda,0x00 }},
+ {16, 0xf740, 0, {0x27,0x81,0x0d,0xec,0x06,0x1b,0x00,0xea,0x04,0x3e,0x80,0x0b,0xe0,0x03,0x3b,0x00 }},
+ {16, 0xf750, 0, {0xce,0xc0,0x22,0x80,0x0f,0xa0,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf760, 0, {0x48,0x00,0xe0,0x80,0xf8,0x10,0x3e,0x05,0x0e,0x88,0x03,0xe0,0x08,0x98,0x40,0x3e }},
+ {16, 0xf770, 0, {0x00,0x0f,0x84,0x83,0xe1,0x40,0xe8,0x00,0x3a,0x02,0x0e,0x80,0x43,0xe1,0x40,0xf8 }},
+ {16, 0xf780, 0, {0x00,0x36,0x00,0x0f,0x80,0x03,0xe0,0x20,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0xf790, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xc4,0x00,0xe9,0x00,0x3e,0x40 }},
+ {16, 0xf7a0, 0, {0x0c,0x90,0x03,0x04,0x20,0xe9,0x90,0x32,0x68,0x0e,0x98,0x03,0xa4,0x00,0xc1,0x00 }},
+ {16, 0xf7b0, 0, {0x30,0x40,0x0c,0x94,0x83,0x24,0x08,0xc9,0x00,0x3e,0x40,0x0c,0x90,0x03,0xa4,0x00 }},
+ {16, 0xf7c0, 0, {0xc9,0x00,0x30,0x50,0x0c,0x1a,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf7d0, 0, {0x80,0x04,0x64,0x00,0x89,0x40,0x2e,0x50,0x28,0x90,0x0a,0x24,0x08,0x89,0x06,0x16 }},
+ {16, 0xf7e0, 0, {0x61,0x0b,0x9c,0x02,0xe4,0x20,0xa9,0x00,0x36,0x40,0x0d,0x90,0x02,0x27,0x60,0xa9 }},
+ {16, 0xf7f0, 0, {0x00,0x2e,0x40,0x28,0x90,0x1a,0x24,0x00,0x89,0x00,0x36,0x40,0x28,0x98,0x02,0x20 }},
+ {16, 0xf800, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x2c,0x00,0xa9,0x08,0x2e,0xc2 }},
+ {16, 0xf810, 0, {0x09,0x10,0x00,0x24,0x00,0xa9,0x00,0x06,0x40,0x89,0x96,0x06,0xe6,0x00,0x89,0x00 }},
+ {16, 0xf820, 0, {0x22,0xc0,0x08,0x90,0x02,0x24,0x02,0x89,0x00,0x24,0x40,0x08,0x90,0x02,0x0c,0x06 }},
+ {16, 0xf830, 0, {0x83,0x00,0x22,0x40,0x08,0x90,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf840, 0, {0x08,0x04,0x05,0x00,0x81,0x44,0x2c,0x50,0x08,0x14,0x02,0x05,0x80,0x81,0x20,0x64 }},
+ {16, 0xf850, 0, {0x70,0x1b,0x14,0x02,0xe4,0x80,0xa1,0x20,0x64,0x40,0x19,0x12,0x0a,0x04,0x80,0xa1 }},
+ {16, 0xf860, 0, {0x00,0x2c,0x50,0x18,0x14,0x02,0x85,0x00,0x81,0x40,0x24,0x40,0x40,0x10,0x02,0x02 }},
+ {16, 0xf870, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xe0,0x00,0x3c,0x00 }},
+ {16, 0xf880, 0, {0x0d,0x80,0x02,0x00,0x00,0xaa,0x50,0x36,0x00,0x0f,0x80,0x03,0xe1,0x40,0xc8,0x52 }},
+ {16, 0xf890, 0, {0x72,0x14,0x0c,0x05,0x16,0x20,0x08,0xc8,0x50,0x3e,0x01,0x0c,0x80,0x03,0xa0,0x04 }},
+ {16, 0xf8a0, 0, {0xc8,0x00,0xb2,0x00,0x0c,0x80,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf8b0, 0, {0x98,0x19,0xf5,0x02,0xfd,0x40,0x3f,0xd0,0x0f,0xd4,0x23,0xf4,0x44,0xfd,0x14,0x7f }},
+ {16, 0xf8c0, 0, {0x50,0x0f,0xd4,0x07,0xf4,0x40,0xf9,0x10,0x3f,0x50,0x07,0xd1,0x23,0xf4,0x40,0xf9 }},
+ {16, 0xf8d0, 0, {0x40,0x1e,0x50,0x07,0xd0,0x0b,0x75,0x00,0xfd,0x02,0x3e,0x50,0x0f,0xd4,0x03,0xe6 }},
+ {16, 0xf8e0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x00,0xc9,0xa8,0x3e,0x72 }},
+ {16, 0xf8f0, 0, {0x0f,0x98,0x03,0xe6,0xc0,0xfd,0xa0,0xb3,0x40,0x0f,0xd0,0x03,0x77,0x80,0xcd,0x90 }},
+ {16, 0xf900, 0, {0x7f,0x40,0x0f,0xda,0xa3,0x16,0x90,0xa9,0xc0,0x32,0x60,0x4c,0xb1,0x03,0x24,0x00 }},
+ {16, 0xf910, 0, {0xc1,0x00,0x33,0x6a,0x0b,0xda,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf920, 0, {0x38,0x10,0xe3,0x40,0x88,0xe0,0x2e,0x30,0x0b,0x8d,0x02,0xf3,0x40,0xb8,0xe8,0x76 }},
+ {16, 0xf930, 0, {0x00,0x4f,0x80,0x0a,0x22,0x80,0x88,0x90,0x6e,0x28,0x8f,0x8a,0x03,0x61,0x44,0xf8 }},
+ {16, 0xf940, 0, {0xe1,0x3e,0x2a,0x08,0x88,0x03,0x42,0xa0,0xdc,0xa0,0x3e,0x10,0x0b,0x85,0x0a,0x0e }},
+ {16, 0xf950, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0xa0,0x85,0x08,0x2d,0x48 }},
+ {16, 0xf960, 0, {0x1b,0x52,0x82,0xd4,0x80,0xb1,0x14,0x20,0x40,0x0b,0x18,0x02,0x05,0x82,0x81,0x00 }},
+ {16, 0xf970, 0, {0x6c,0x42,0x0b,0x12,0x82,0x04,0x00,0xa1,0x60,0x21,0x50,0x0b,0x50,0x02,0x14,0x90 }},
+ {16, 0xf980, 0, {0x95,0x2c,0x28,0x40,0x0b,0x10,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf990, 0, {0x18,0x15,0xa4,0x01,0x8d,0x44,0x2f,0x40,0x0b,0xd4,0x02,0xf4,0x04,0xb9,0x08,0x22 }},
+ {16, 0xf9a0, 0, {0x40,0x0a,0x92,0x02,0x2c,0x84,0x89,0x00,0x2e,0x40,0x0a,0x14,0x02,0x6c,0x80,0xa9 }},
+ {16, 0xf9b0, 0, {0x01,0x2a,0x40,0x09,0x50,0x0a,0x5c,0x02,0x8d,0x60,0x2a,0x40,0x0b,0x90,0x42,0x06 }},
+ {16, 0xf9c0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe6,0x62,0xc9,0x02,0x3e,0x54 }},
+ {16, 0xf9d0, 0, {0x0f,0x90,0x03,0xe4,0x00,0xf9,0x40,0x22,0x46,0x0b,0x98,0x03,0x67,0x20,0xc9,0x01 }},
+ {16, 0xf9e0, 0, {0x2e,0x69,0x0b,0x94,0x0b,0x25,0x20,0xa9,0x00,0x22,0x40,0x2d,0x92,0x0a,0x26,0x22 }},
+ {16, 0xf9f0, 0, {0x99,0x00,0x2a,0x40,0x8f,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa00, 0, {0x28,0x01,0x86,0x02,0xf9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xe6,0x80,0xf1,0xa0,0x3e }},
+ {16, 0xfa10, 0, {0x62,0x0f,0x98,0x83,0xc6,0x20,0xf9,0x00,0x3e,0x49,0x0f,0x90,0x83,0xe4,0x00,0x71 }},
+ {16, 0xfa20, 0, {0x02,0x3e,0x40,0x0e,0x90,0x0b,0xe6,0x80,0xf9,0x80,0x3e,0x40,0x0f,0x90,0x03,0xca }},
+ {16, 0xfa30, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x10,0xc8,0x00,0x3e,0x00 }},
+ {16, 0xfa40, 0, {0x4f,0x80,0x43,0xb0,0x00,0xc8,0x41,0x32,0x00,0x0f,0x80,0x03,0x21,0x02,0xc8,0x02 }},
+ {16, 0xfa50, 0, {0x3e,0x10,0x4c,0x80,0x03,0x01,0x20,0xc8,0x00,0x3b,0x00,0x0c,0xc0,0x03,0xb0,0x00 }},
+ {16, 0xfa60, 0, {0xcc,0x04,0x32,0x00,0x0f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa70, 0, {0x28,0x05,0x28,0x00,0x8a,0x80,0x2e,0x80,0x0b,0xa0,0x02,0xf8,0x04,0x8e,0x00,0x23 }},
+ {16, 0xfa80, 0, {0xb2,0x0e,0xe0,0x82,0xf9,0x04,0x8a,0x00,0x2e,0x81,0x0c,0xe0,0x0a,0x3a,0x80,0xda }},
+ {16, 0xfa90, 0, {0x00,0x22,0xb6,0x08,0xa0,0x02,0x28,0x00,0x8e,0x00,0x2a,0x80,0x0b,0x60,0x0b,0x0a }},
+ {16, 0xfaa0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x44,0x02,0x93,0x81,0x2c,0xc0 }},
+ {16, 0xfab0, 0, {0x4b,0x30,0x02,0xc8,0x00,0x83,0xca,0x20,0xe0,0x19,0xb0,0x06,0x8c,0x00,0x81,0x04 }},
+ {16, 0xfac0, 0, {0x44,0x40,0x08,0x34,0x02,0x0d,0x00,0x83,0x00,0x2a,0x00,0x08,0x00,0x0a,0x80,0x40 }},
+ {16, 0xfad0, 0, {0x88,0x00,0x20,0xc0,0x0b,0x30,0x02,0x4b,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfae0, 0, {0xa0,0x01,0x04,0x02,0x97,0x08,0x2d,0xc0,0x0b,0x60,0x06,0xca,0x00,0x83,0x09,0x21 }},
+ {16, 0xfaf0, 0, {0xc0,0x0a,0x70,0x02,0xdc,0x00,0x85,0x31,0x2d,0x68,0x09,0x30,0x02,0x1c,0x14,0x93 }},
+ {16, 0xfb00, 0, {0x20,0x20,0xc0,0x08,0xf0,0x42,0x9c,0x02,0x8f,0x00,0x29,0x40,0x03,0x70,0x12,0x28 }},
+ {16, 0xfb10, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x16,0x00,0x96,0x84,0x3d,0xa0 }},
+ {16, 0xfb20, 0, {0x0f,0x78,0x03,0x9a,0x02,0x87,0x80,0xb1,0xe0,0x0b,0x78,0x03,0xb6,0x00,0xc5,0xa0 }},
+ {16, 0xfb30, 0, {0x35,0x61,0x0c,0x78,0x13,0x1e,0x02,0xc7,0x80,0x29,0x00,0x0c,0x48,0x03,0x90,0x00 }},
+ {16, 0xfb40, 0, {0xc4,0x80,0x31,0x60,0x0f,0x58,0x03,0x6a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb50, 0, {0x08,0x1d,0xa4,0x00,0xea,0x00,0x3e,0x80,0x0f,0xa0,0x03,0xe8,0x08,0xfb,0x00,0x3e }},
+ {16, 0xfb60, 0, {0x80,0x0f,0x90,0x13,0xe4,0x08,0xf9,0x00,0x3c,0x50,0x2e,0xf0,0x03,0xe8,0x08,0xfb }},
+ {16, 0xfb70, 0, {0x40,0x3e,0xc0,0x0b,0x30,0x13,0x6c,0x00,0xfb,0x00,0x3e,0x40,0x0f,0x30,0x03,0xc2 }},
+ {16, 0xfb80, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xd6,0x00,0xcd,0x80,0x33,0xe0 }},
+ {16, 0xfb90, 0, {0x0c,0xf8,0x03,0xfa,0x00,0xfd,0x80,0x3f,0xa0,0x0d,0xf8,0x03,0xfa,0x40,0xcd,0xd0 }},
+ {16, 0xfba0, 0, {0x77,0x7e,0x0c,0xe8,0x43,0x1e,0x00,0xcf,0xd8,0x3f,0xe0,0x0c,0xc8,0x03,0x3a,0xc4 }},
+ {16, 0xfbb0, 0, {0xcc,0x80,0x33,0xe0,0x0c,0xf8,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfbc0, 0, {0xa8,0x11,0x94,0x02,0x8d,0x00,0x21,0xc0,0x08,0x60,0x03,0xd8,0x10,0x35,0x20,0x8b }},
+ {16, 0xfbd0, 0, {0xd4,0x0d,0x64,0x03,0xd8,0xc0,0x85,0x00,0x2f,0x4e,0x07,0x64,0x02,0x9c,0x02,0xd7 }},
+ {16, 0xfbe0, 0, {0x30,0x2f,0x04,0x0d,0xf1,0x0b,0x54,0x40,0xaf,0x00,0x35,0x40,0x08,0x70,0x02,0x2a }},
+ {16, 0xfbf0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x40,0x84,0x18,0x21,0x80 }},
+ {16, 0xfc00, 0, {0x08,0x70,0x02,0xda,0x20,0xb5,0x00,0x09,0x00,0x08,0x70,0x02,0xd4,0x04,0x85,0x00 }},
+ {16, 0xfc10, 0, {0x6d,0x4c,0x89,0x60,0x02,0x5c,0x40,0x97,0x00,0x6d,0xc0,0x09,0x40,0x02,0x58,0x80 }},
+ {16, 0xfc20, 0, {0x84,0x88,0x25,0x40,0x08,0xd0,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc30, 0, {0x20,0x14,0xc6,0x48,0x80,0x00,0x20,0x80,0x08,0xac,0x02,0xa8,0x00,0xb1,0x00,0xa8 }},
+ {16, 0xfc40, 0, {0x88,0x09,0x22,0x02,0x86,0x42,0x81,0x00,0x6c,0x52,0x0b,0x20,0x02,0xc7,0x52,0x83 }},
+ {16, 0xfc50, 0, {0x00,0x2c,0x00,0x08,0x34,0x82,0x67,0x00,0xa3,0x80,0x20,0x40,0x08,0x30,0x02,0x08 }},
+ {16, 0xfc60, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xa3,0x00,0xcb,0xc0,0xb2,0x40 }},
+ {16, 0xfc70, 0, {0x2c,0x90,0x82,0xe6,0x00,0xbb,0x80,0xbe,0x78,0x08,0x8e,0x02,0xee,0x00,0x8d,0x00 }},
+ {16, 0xfc80, 0, {0x27,0x60,0x0d,0x90,0x0a,0x6f,0x00,0x9f,0x02,0x2e,0x00,0x09,0xb4,0x03,0x67,0x80 }},
+ {16, 0xfc90, 0, {0xca,0x40,0xe4,0xc0,0x0c,0x30,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfca0, 0, {0x80,0x00,0xe0,0x80,0xfb,0x22,0x3e,0x40,0x0f,0x80,0x13,0xe4,0x00,0xfb,0x80,0x3e }},
+ {16, 0xfcb0, 0, {0x40,0x0f,0x90,0x03,0xe5,0x00,0xf9,0x00,0x3e,0x40,0x0e,0x70,0x23,0xac,0x20,0xfb }},
+ {16, 0xfcc0, 0, {0x00,0x3e,0xc0,0x8f,0x80,0x03,0xe9,0x20,0xf9,0x08,0x3e,0x40,0x0f,0xb0,0x13,0xe0 }},
+ {16, 0xfcd0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x00,0xc6,0x00,0x32,0x00 }},
+ {16, 0xfce0, 0, {0x0f,0xd1,0x83,0x34,0x40,0xcf,0x00,0x3d,0x40,0x0c,0xd0,0x03,0xde,0x50,0x0d,0x00 }},
+ {16, 0xfcf0, 0, {0x73,0x40,0x0c,0xd1,0x03,0x7c,0x40,0x87,0x02,0xb3,0x00,0x0d,0xf4,0x03,0x24,0x00 }},
+ {16, 0xfd00, 0, {0xce,0x20,0x32,0x40,0x0c,0xd0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd10, 0, {0x81,0x04,0x61,0x22,0x8a,0x00,0x22,0x00,0x0b,0x80,0x40,0x25,0x00,0x89,0xc3,0x2e }},
+ {16, 0xfd20, 0, {0x20,0x0a,0x98,0x03,0xa1,0x00,0x89,0x00,0x36,0x40,0x88,0x94,0x02,0x0f,0x01,0xab }},
+ {16, 0xfd30, 0, {0x00,0x32,0xc0,0x08,0x04,0x0a,0x29,0x00,0xa9,0x02,0xa2,0x40,0x0d,0xb0,0x0a,0x20 }},
+ {16, 0xfd40, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x00,0x00,0x89,0x00,0x22,0x61 }},
+ {16, 0xfd50, 0, {0x0b,0x90,0x02,0x25,0x01,0x9b,0x88,0x2e,0x60,0x08,0x88,0x02,0xe8,0x00,0xb1,0x02 }},
+ {16, 0xfd60, 0, {0x24,0x40,0x18,0x90,0x02,0x2c,0x00,0xab,0x01,0x20,0xc1,0x08,0xb4,0x42,0x2c,0x00 }},
+ {16, 0xfd70, 0, {0x82,0x00,0x22,0xc0,0x08,0xb0,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd80, 0, {0x08,0x04,0x00,0x00,0x01,0x00,0x20,0x40,0x0b,0x00,0x0a,0x04,0x46,0x83,0x01,0x2c }},
+ {16, 0xfd90, 0, {0x40,0x1a,0x00,0x06,0x80,0x00,0x81,0x00,0x24,0x40,0x08,0x20,0x0a,0x0c,0x01,0xa3 }},
+ {16, 0xfda0, 0, {0x00,0x24,0x00,0x08,0x80,0x02,0x00,0x00,0xa1,0x00,0x20,0x40,0x09,0x30,0x02,0x02 }},
+ {16, 0xfdb0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x02,0xc8,0x00,0x22,0x00 }},
+ {16, 0xfdc0, 0, {0x0f,0x90,0x02,0x25,0x00,0xda,0x00,0x3e,0x40,0x0c,0x90,0x02,0xcc,0x00,0xfd,0x00 }},
+ {16, 0xfdd0, 0, {0x37,0x40,0x0c,0x10,0x13,0x2c,0x02,0xaf,0x00,0x32,0xc0,0x0d,0xb0,0x03,0x2c,0x00 }},
+ {16, 0xfde0, 0, {0xca,0x00,0x32,0x40,0x4c,0x90,0x0b,0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfdf0, 0, {0xa0,0x1d,0xf0,0x00,0xfc,0x00,0x3f,0x00,0x07,0xc0,0x03,0xf4,0x1c,0xf4,0x00,0x3f }},
+ {16, 0xfe00, 0, {0x00,0x1f,0xc0,0x23,0xb0,0x02,0x9d,0x01,0x3f,0x40,0x8f,0xc0,0x07,0xfc,0x02,0xff }},
+ {16, 0xfe10, 0, {0x00,0x7b,0x00,0x0f,0xc0,0x03,0xf0,0x00,0xfd,0x00,0x3f,0x40,0x0f,0x70,0x03,0xe8 }},
+ {16, 0xfe20, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfa,0x00,0xcb,0x80,0x3f,0x24 }},
+ {16, 0xfe30, 0, {0x0a,0xc1,0x03,0xfc,0x24,0xcd,0x20,0x37,0x0a,0x0c,0xc2,0x83,0x30,0x80,0xdc,0x02 }},
+ {16, 0xfe40, 0, {0x3f,0xcc,0x0d,0xd9,0x03,0x3c,0x58,0xdf,0x30,0x33,0xc8,0x0d,0xf4,0x23,0x3c,0x40 }},
+ {16, 0xfe50, 0, {0xff,0x00,0x3f,0xc5,0x4f,0xf0,0x23,0xb0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfe60, 0, {0x80,0x00,0xec,0x02,0x0b,0x82,0x2e,0x08,0x0d,0xb7,0x02,0xfd,0x00,0x83,0x18,0x0a }},
+ {16, 0xfe70, 0, {0x58,0x0a,0x84,0xa2,0xa5,0xa0,0x89,0x30,0x22,0x55,0x08,0x12,0x62,0xbd,0x90,0x8f }},
+ {16, 0xfe80, 0, {0x62,0x21,0xd6,0x48,0xf3,0x02,0x3c,0xc5,0xbf,0x48,0x2f,0xd8,0x4b,0xb7,0x02,0xe0 }},
+ {16, 0xfe90, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xec,0x00,0x83,0x00,0x2e,0x89 }},
+ {16, 0xfea0, 0, {0x28,0x00,0x02,0xec,0xa0,0x89,0x22,0x28,0x82,0x08,0x12,0x02,0x28,0x40,0x9a,0x08 }},
+ {16, 0xfeb0, 0, {0x28,0xc8,0x88,0xb2,0x0a,0x0d,0x10,0x93,0x10,0xa0,0xc8,0x28,0x30,0x02,0x4c,0x00 }},
+ {16, 0xfec0, 0, {0xb3,0x60,0x2c,0xc4,0x0b,0x30,0xc2,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfed0, 0, {0xc0,0x15,0xac,0x40,0x8b,0x00,0x2e,0x80,0x08,0xb1,0x02,0xec,0x02,0x8b,0x00,0x20 }},
+ {16, 0xfee0, 0, {0xd0,0x0a,0x90,0x02,0xac,0x00,0x0b,0x01,0x26,0x40,0x08,0x94,0x02,0x8c,0x00,0x8b }},
+ {16, 0xfef0, 0, {0x00,0x22,0xc0,0x08,0xb0,0x02,0x2c,0x10,0xbb,0x00,0x2e,0xc0,0x0b,0xb0,0x02,0xf0 }},
+ {16, 0xff00, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x8c,0x20,0xcb,0x02,0x3e,0x2d }},
+ {16, 0xff10, 0, {0x08,0x80,0x03,0xec,0x08,0xc9,0x80,0x1e,0x04,0x0c,0xb0,0x03,0x01,0x08,0x50,0x18 }},
+ {16, 0xff20, 0, {0x3e,0x40,0x0c,0x04,0x03,0x2c,0x00,0xdb,0x01,0x32,0xc0,0x0c,0xb0,0x0b,0x2c,0x08 }},
+ {16, 0xff30, 0, {0xbb,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0x80,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xff40, 0, {0xe1,0x00,0xbc,0x00,0xff,0x00,0x3f,0x60,0x0f,0xc0,0x23,0xec,0x00,0xff,0xc0,0xbe }},
+ {16, 0xff50, 0, {0x60,0x8f,0xc9,0x23,0xf6,0x50,0xed,0x80,0xb8,0x50,0xaf,0xc0,0x03,0xfc,0x00,0xff }},
+ {16, 0xff60, 0, {0x00,0x3f,0xc1,0x0e,0xb0,0x03,0xfc,0x04,0xff,0x02,0x3f,0xc0,0x0f,0xf0,0x03,0xf8 }},
+ {16, 0xff70, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x00,0xeb,0x00,0x32,0x80 }},
+ {16, 0xff80, 0, {0x0d,0x90,0x03,0x2c,0x00,0x89,0x00,0x3e,0x98,0x8c,0x30,0x03,0x61,0x80,0xfa,0x40 }},
+ {16, 0xff90, 0, {0x3e,0x40,0x2c,0xa5,0x03,0x2c,0x00,0xfb,0x01,0x3c,0xc0,0x2c,0x30,0x03,0x2c,0x00 }},
+ {16, 0xffa0, 0, {0xdb,0x02,0x32,0xc0,0x0f,0xb0,0x03,0xd0,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xffb0, 0, {0xca,0x00,0x2e,0x80,0x8b,0x82,0xa0,0xc0,0x8c,0x90,0x02,0x3c,0x00,0x8b,0xf0,0x22 }},
+ {16, 0xffc0, 0, {0xc2,0x0d,0x80,0x02,0x27,0x00,0x8b,0x10,0x22,0x40,0x08,0x80,0x22,0x3c,0x00,0xbf }},
+ {16, 0xffd0, 0, {0x00,0x2f,0xc0,0x08,0xf0,0x02,0x3c,0x00,0xbf,0x01,0xa3,0xc0,0x0b,0xf0,0x12,0xf2 }},
+ {16, 0xffe0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4c,0x00,0xb3,0x1c,0x20,0x40 }},
+ {16, 0xfff0, 0, {0x08,0x00,0x06,0x2c,0x00,0x9b,0x00,0x20,0xd0,0x08,0x20,0x02,0x4c,0x00,0xa3,0x00 }},
+ {16, 0x8010, 0, {0x2c,0xc0,0x08,0x10,0x0a,0x0c,0x00,0xbb,0x00,0x28,0xc0,0x09,0x30,0x02,0x0c,0x00 }},
+ {16, 0x8020, 0, {0xb3,0x00,0x20,0xc0,0x0b,0x30,0x02,0xf8,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8030, 0, {0x22,0x11,0x1e,0x00,0x97,0xa0,0x21,0xa0,0x08,0x79,0x02,0x1e,0x00,0x97,0x90,0x21 }},
+ {16, 0x8040, 0, {0x60,0x09,0xe8,0x22,0x3e,0x00,0xaf,0x84,0x21,0xe4,0x48,0x5c,0x02,0x1e,0x00,0xb7 }},
+ {16, 0x8050, 0, {0x90,0x2d,0xe0,0x09,0x78,0x00,0x1e,0x09,0xb3,0x90,0x21,0xe4,0x0b,0x78,0x02,0xd8 }},
+ {16, 0x8060, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x18,0x2c,0x40,0xb3,0xb0,0x32,0x40 }},
+ {16, 0x8070, 0, {0x2c,0x81,0x13,0x0c,0x42,0xd1,0x00,0xb0,0xc0,0x8c,0x30,0x03,0x48,0x20,0xe3,0x01 }},
+ {16, 0x8080, 0, {0x3c,0xc0,0x0c,0x30,0x03,0x0c,0x00,0xf3,0x10,0x3c,0xc0,0xcd,0x32,0x0b,0x0c,0x40 }},
+ {16, 0x8090, 0, {0xd3,0x00,0x30,0xc0,0x0f,0x30,0x03,0xd2,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x80a0, 0, {0x40,0x15,0xbc,0x00,0xe7,0x00,0x3f,0x80,0x0b,0xf1,0x03,0xfd,0x00,0x6d,0x00,0x32 }},
+ {16, 0x80b0, 0, {0x40,0x1f,0x70,0x07,0xd8,0x41,0xc3,0x10,0x3b,0xc0,0x0f,0xd1,0x03,0xfd,0x00,0xff }},
+ {16, 0x80c0, 0, {0x10,0x3f,0xc0,0x0e,0xf0,0x03,0xec,0x10,0xff,0x08,0x3f,0xc3,0x0f,0xf0,0x03,0xd0 }},
+ {16, 0x80d0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xec,0x04,0xfb,0x02,0x3e,0x40 }},
+ {16, 0x80e0, 0, {0x0b,0xa0,0x03,0xac,0x00,0xdb,0x00,0x36,0x80,0x0d,0xb0,0x03,0xac,0x00,0xe8,0x00 }},
+ {16, 0x80f0, 0, {0x36,0xc1,0x2e,0x90,0x03,0x2c,0x00,0xcb,0xa0,0x36,0xdc,0x0f,0xb0,0x03,0x2d,0x68 }},
+ {16, 0x8100, 0, {0xfb,0xa0,0x92,0xc2,0x0c,0xb1,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8110, 0, {0x48,0x11,0x9c,0x08,0x37,0x00,0x2d,0xc0,0x0b,0xe0,0x02,0x1d,0x80,0xb7,0x04,0x23 }},
+ {16, 0x8120, 0, {0x00,0x0a,0x40,0x02,0x1c,0x18,0x84,0x00,0x25,0xc0,0x18,0x50,0x32,0x0d,0x80,0xa3 }},
+ {16, 0x8130, 0, {0x30,0x21,0xcc,0x0b,0x34,0x82,0x1c,0x10,0xb7,0x30,0x21,0xc8,0x08,0x70,0x02,0xd2 }},
+ {16, 0x8140, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x20,0xb7,0x80,0x2d,0x60 }},
+ {16, 0x8150, 0, {0x0b,0xfc,0x22,0x9e,0x00,0x8d,0x80,0x25,0xa0,0x08,0xf8,0x22,0x92,0x00,0xb4,0x80 }},
+ {16, 0x8160, 0, {0x25,0xe0,0x08,0xf8,0x02,0x1e,0x00,0x87,0xb0,0x21,0xe0,0x09,0x7a,0x02,0x1e,0x18 }},
+ {16, 0x8170, 0, {0xb3,0x80,0x21,0xe0,0x08,0x78,0x02,0xf0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8180, 0, {0x48,0x04,0xc5,0x20,0xb3,0x01,0x2c,0xd8,0x0b,0x3c,0x02,0x2c,0x08,0xb9,0x00,0x20 }},
+ {16, 0x8190, 0, {0x03,0x0a,0x00,0x82,0x22,0x08,0x90,0x0d,0x26,0xe4,0x08,0x10,0x02,0x0c,0x00,0xa3 }},
+ {16, 0x81a0, 0, {0x00,0x22,0xc0,0x0b,0x30,0x02,0x6c,0x00,0xb3,0x00,0x22,0xc0,0x28,0x30,0x02,0xc2 }},
+ {16, 0x81b0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x05,0x99,0x00,0xfa,0x02,0x3f,0x90 }},
+ {16, 0x81c0, 0, {0x0f,0xec,0x23,0xa8,0x00,0xda,0x00,0x35,0x80,0x0d,0xe0,0x02,0xba,0x02,0xfe,0xc2 }},
+ {16, 0x81d0, 0, {0xb6,0xa0,0x0e,0xe4,0x0b,0x28,0x00,0xca,0x00,0xb2,0x80,0x0f,0xa0,0x0b,0x28,0x00 }},
+ {16, 0x81e0, 0, {0xfa,0x00,0x32,0x80,0x0c,0xa0,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x81f0, 0, {0x48,0x00,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x82,0x03,0xe0,0x00,0xf8,0x00,0x3e }},
+ {16, 0x8200, 0, {0x00,0x0f,0x81,0x03,0xe0,0x40,0xe8,0x10,0x3a,0x00,0x4f,0x84,0x83,0xe0,0x00,0xf8 }},
+ {16, 0x8210, 0, {0x00,0x3a,0x00,0x0f,0x00,0x03,0xa0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0x8220, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xe5,0x00,0xc9,0x02,0x3e,0x40 }},
+ {16, 0x8230, 0, {0x0f,0x90,0x23,0x24,0x00,0xc9,0x00,0x32,0x68,0x2f,0x10,0x03,0x24,0x00,0xe9,0x14 }},
+ {16, 0x8240, 0, {0x32,0x40,0x0d,0x90,0x0b,0x04,0x00,0xd9,0x00,0x1e,0x40,0x0c,0x90,0x03,0x24,0x00 }},
+ {16, 0x8250, 0, {0xc9,0x00,0x36,0x40,0x0c,0x90,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8260, 0, {0x80,0x14,0x64,0x00,0x89,0x01,0x2e,0x40,0x4b,0x90,0x12,0x24,0x00,0x89,0xc2,0xa2 }},
+ {16, 0x8270, 0, {0x60,0x88,0x90,0x03,0x64,0x00,0x89,0xc1,0xa2,0x40,0x48,0x16,0x03,0x64,0x02,0x89 }},
+ {16, 0x8280, 0, {0x00,0x2e,0x40,0x08,0x90,0x22,0x24,0x00,0x89,0x00,0x3e,0x40,0x28,0x90,0x0a,0x20 }},
+ {16, 0x8290, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x04,0x24,0x00,0x89,0x02,0x2e,0x40 }},
+ {16, 0x82a0, 0, {0x0b,0x10,0x02,0x24,0x00,0x89,0x10,0x22,0x40,0x89,0x90,0x02,0xac,0x00,0xa1,0x08 }},
+ {16, 0x82b0, 0, {0x22,0x40,0x09,0x98,0x02,0xa4,0x00,0x89,0x00,0x2a,0x40,0x08,0x90,0x02,0x24,0x00 }},
+ {16, 0x82c0, 0, {0x89,0x00,0x26,0x40,0x08,0x10,0x02,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x82d0, 0, {0x08,0x00,0x24,0x00,0x81,0x00,0x2c,0x41,0x0b,0x12,0x02,0x04,0x81,0x81,0x20,0x22 }},
+ {16, 0x82e0, 0, {0x48,0x08,0x12,0x02,0xc4,0x81,0x81,0x24,0x02,0x48,0x0a,0x90,0x02,0x84,0xa0,0x81 }},
+ {16, 0x82f0, 0, {0x28,0x6c,0x4a,0x08,0x12,0xd2,0x04,0xa1,0x81,0x28,0x2c,0x4a,0x08,0x12,0x82,0x02 }},
+ {16, 0x8300, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x08,0x61,0x40,0xc8,0x00,0x2e,0x14 }},
+ {16, 0x8310, 0, {0x0f,0x85,0x0b,0x21,0x42,0xca,0x50,0x22,0x14,0x0d,0x85,0x43,0xa1,0x40,0xe8,0x50 }},
+ {16, 0x8320, 0, {0x30,0x00,0x0d,0x85,0x02,0xa1,0xc0,0xd8,0x20,0x3a,0x08,0x2c,0x82,0x0b,0x20,0x82 }},
+ {16, 0x8330, 0, {0xc8,0x20,0x34,0x09,0x8c,0x82,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8340, 0, {0x98,0x0d,0xfc,0x02,0xf9,0x00,0x3f,0x40,0x4f,0xd1,0x03,0xe4,0x40,0xf5,0x14,0xbf }},
+ {16, 0x8350, 0, {0x44,0x0d,0x51,0x23,0x5c,0x40,0xf5,0x10,0x1f,0x4e,0x4d,0x50,0x03,0x64,0x08,0xf9 }},
+ {16, 0x8360, 0, {0x28,0x3e,0x4a,0x8f,0x92,0x83,0xe4,0xa0,0xf9,0x28,0x3a,0x4b,0x0f,0x92,0x83,0xe6 }},
+ {16, 0x8370, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xf4,0x40,0xfd,0x00,0x30,0x40 }},
+ {16, 0x8380, 0, {0x0c,0x90,0x03,0x24,0x00,0xdd,0x00,0x3b,0x40,0x0e,0x90,0x03,0x74,0x00,0x5d,0x00 }},
+ {16, 0x8390, 0, {0x36,0x64,0x0d,0xd0,0x00,0xa6,0x00,0xf9,0x40,0x32,0x78,0x0c,0x99,0x03,0x24,0x40 }},
+ {16, 0x83a0, 0, {0xc9,0x90,0x32,0x50,0x0f,0x9b,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x83b0, 0, {0x38,0x10,0xe2,0x80,0xb8,0x00,0x22,0x01,0x08,0x80,0x0a,0x20,0x00,0x88,0x00,0x2a }},
+ {16, 0x83c0, 0, {0x00,0x08,0x80,0x02,0x20,0x00,0x88,0x00,0x22,0x20,0x08,0x8a,0x8b,0xe1,0x00,0xb8 }},
+ {16, 0x83d0, 0, {0x80,0x22,0x30,0x28,0x0d,0x02,0x22,0x00,0xd8,0xe4,0x22,0x28,0x0b,0x8f,0x0a,0x0e }},
+ {16, 0x83e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0x80,0xb1,0x00,0xa0,0x40 }},
+ {16, 0x83f0, 0, {0x08,0x10,0x02,0x04,0x00,0x89,0x00,0x08,0x40,0x0a,0x90,0x42,0x44,0x00,0x91,0x00 }},
+ {16, 0x8400, 0, {0x20,0x58,0x28,0x90,0x02,0x85,0x00,0x81,0x20,0xa0,0x4c,0x09,0x12,0x0a,0x04,0x80 }},
+ {16, 0x8410, 0, {0x91,0x40,0xa0,0x40,0x0b,0x10,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8420, 0, {0x18,0x15,0xa4,0x00,0xb9,0x02,0x20,0x40,0x08,0x90,0x02,0x04,0x00,0x89,0x01,0x22 }},
+ {16, 0x8430, 0, {0x40,0x28,0x90,0x22,0x04,0x00,0x89,0x10,0x22,0x40,0x08,0x90,0x02,0xe4,0x00,0xb1 }},
+ {16, 0x8440, 0, {0x00,0x22,0x40,0x81,0x90,0x02,0x04,0x00,0x91,0x00,0x22,0x40,0x0b,0x90,0x02,0x06 }},
+ {16, 0x8450, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe5,0x00,0xf1,0x00,0x32,0x60 }},
+ {16, 0x8460, 0, {0x2c,0x92,0x13,0x24,0x02,0xd1,0x10,0x3a,0x40,0x0e,0x12,0x03,0x66,0x04,0xd9,0x00 }},
+ {16, 0x8470, 0, {0xb6,0x40,0x0d,0x19,0x03,0xa4,0x00,0xf9,0x00,0x32,0x40,0x09,0x90,0x01,0x24,0x00 }},
+ {16, 0x8480, 0, {0xd9,0x02,0x22,0x40,0x0f,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8490, 0, {0x2a,0x01,0xa5,0x00,0xf9,0x00,0x3e,0x64,0x0f,0x10,0x03,0xe4,0x00,0xf9,0x81,0x3e }},
+ {16, 0x84a0, 0, {0x66,0x8f,0x90,0x23,0xe4,0x80,0xf9,0x04,0x3e,0x40,0x8f,0x90,0x03,0xe4,0x04,0xf9 }},
+ {16, 0x84b0, 0, {0x00,0x3c,0x40,0x0e,0x90,0x03,0xe4,0x00,0xf9,0x00,0x3e,0x40,0x0f,0x10,0x03,0xca }},
+ {16, 0x84c0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x10,0xa0,0x00,0xf8,0x24,0x3e,0x00 }},
+ {16, 0x84d0, 0, {0x2c,0x84,0x03,0x20,0x00,0xb8,0x20,0x3e,0x00,0x8c,0x80,0x03,0xa0,0x00,0x70,0x82 }},
+ {16, 0x84e0, 0, {0x32,0x00,0x0f,0x80,0x03,0x20,0x08,0xf8,0x00,0x32,0x00,0x2c,0x80,0x0b,0x20,0x08 }},
+ {16, 0x84f0, 0, {0xc8,0x00,0x3e,0x00,0x0c,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8500, 0, {0x28,0x05,0x28,0x04,0xbe,0x80,0x3a,0x80,0x08,0xa0,0x02,0x28,0x04,0x8e,0x00,0x6d }},
+ {16, 0x8510, 0, {0x90,0x0d,0xa0,0x02,0x3a,0x00,0x8e,0x80,0xa2,0x80,0x0e,0xe0,0x0b,0x68,0x00,0xba }},
+ {16, 0x8520, 0, {0x00,0x22,0x80,0x08,0xa0,0x02,0x28,0x00,0xda,0x00,0x2e,0x80,0x08,0xa0,0x02,0xca }},
+ {16, 0x8530, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x81,0x4c,0x00,0xb1,0x00,0x2c,0xc0 }},
+ {16, 0x8540, 0, {0x08,0x30,0x02,0x0c,0x18,0xa3,0x02,0x2c,0x10,0x88,0x30,0x06,0x82,0x81,0xa0,0x00 }},
+ {16, 0x8550, 0, {0x2a,0xc0,0x0b,0x30,0x0a,0x4c,0x00,0xb3,0x00,0x20,0xc0,0x1a,0xb0,0x02,0x8c,0x01 }},
+ {16, 0x8560, 0, {0x83,0x00,0x2c,0xc0,0x08,0x30,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8570, 0, {0x20,0x01,0x1c,0x10,0xb4,0x0a,0x2b,0xc8,0x08,0x31,0x26,0x1c,0x00,0x86,0x00,0x2d }},
+ {16, 0x8580, 0, {0xc0,0x09,0x72,0x02,0x1d,0x00,0xa5,0x40,0x29,0xc0,0x0a,0x60,0x02,0x5c,0x88,0xb3 }},
+ {16, 0x8590, 0, {0x20,0x25,0xc8,0x0a,0x72,0x02,0x9c,0x80,0x97,0x20,0x2c,0xe8,0x80,0x72,0x02,0xe8 }},
+ {16, 0x85a0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x16,0x00,0xb5,0x80,0x3d,0xe2 }},
+ {16, 0x85b0, 0, {0x0c,0x7a,0x8b,0x0e,0xc0,0xa7,0x81,0x2c,0x20,0x0c,0xfc,0x03,0x92,0x02,0xef,0x80 }},
+ {16, 0x85c0, 0, {0x39,0xe4,0x0b,0xd8,0x01,0x1f,0x00,0xf7,0x80,0xb3,0xf4,0x8e,0x79,0x03,0x8e,0x00 }},
+ {16, 0x85d0, 0, {0xc7,0xc4,0x3d,0xe8,0x2c,0x7b,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x85e0, 0, {0x08,0x1d,0xac,0x00,0xf8,0x00,0x3e,0xdd,0x87,0xb6,0x03,0xed,0xcc,0xe9,0x00,0x3e }},
+ {16, 0x85f0, 0, {0x40,0x0f,0xb0,0x07,0xcc,0x10,0x0b,0x00,0x36,0xd8,0x0f,0x80,0x43,0xad,0x80,0xfb }},
+ {16, 0x8600, 0, {0x28,0x3a,0xc0,0x0d,0xb4,0x03,0x6c,0xe2,0xeb,0x60,0x3e,0xd4,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0x8610, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xfe,0x00,0xfe,0x90,0x3f,0xe5 }},
+ {16, 0x8620, 0, {0x0e,0xf8,0x03,0x3e,0x10,0xff,0x90,0x17,0x60,0x0f,0xfc,0x03,0x7a,0x00,0xee,0x80 }},
+ {16, 0x8630, 0, {0x37,0xe2,0x0e,0x78,0x0f,0xff,0x40,0xef,0x88,0x1f,0xe0,0x0c,0xf8,0x83,0xfe,0x80 }},
+ {16, 0x8640, 0, {0xcf,0xd0,0xb3,0xf0,0x0c,0xf8,0xc3,0x10,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8650, 0, {0xa8,0x11,0x9c,0x40,0xb4,0x10,0x0f,0xcc,0x00,0x72,0x02,0x1c,0x00,0xb6,0x02,0x09 }},
+ {16, 0x8660, 0, {0xc0,0x28,0xf0,0x02,0x98,0x00,0xa6,0x00,0x21,0xc0,0x0b,0x60,0x03,0xfc,0x02,0x87 }},
+ {16, 0x8670, 0, {0x00,0x2d,0xc0,0x08,0x70,0x02,0xde,0x00,0x8f,0x10,0x21,0xc0,0x08,0xf0,0x03,0x6a }},
+ {16, 0x8680, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x94,0x00,0xb6,0x02,0x2f,0xc2 }},
+ {16, 0x8690, 0, {0x1a,0x30,0x80,0x1c,0x00,0xb6,0x08,0x01,0x40,0x0a,0xf0,0x02,0x18,0x00,0x87,0x00 }},
+ {16, 0x86a0, 0, {0x21,0xc0,0x0b,0xd0,0x02,0x9c,0x10,0x87,0x00,0x29,0xc0,0x08,0x70,0x02,0xdc,0x44 }},
+ {16, 0x86b0, 0, {0x87,0x10,0x64,0xc0,0x08,0x70,0x02,0x06,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x86c0, 0, {0x60,0x14,0xce,0x60,0xb0,0x00,0x2c,0xc0,0x08,0x34,0x0a,0x0c,0x08,0xb0,0x04,0x00 }},
+ {16, 0x86d0, 0, {0x40,0x08,0x30,0xa2,0x89,0x80,0xa2,0x62,0x20,0xe0,0x0b,0x00,0x0a,0xcc,0x08,0x83 }},
+ {16, 0x86e0, 0, {0x00,0x6c,0xc0,0x08,0x30,0x52,0xcc,0x00,0x83,0x00,0x24,0xc0,0x08,0x30,0x02,0x58 }},
+ {16, 0x86f0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xae,0x00,0xf8,0x00,0x3f,0xd0 }},
+ {16, 0x8700, 0, {0x0e,0xfc,0x03,0x3c,0x00,0xf9,0x00,0x92,0x84,0x0f,0xfc,0x03,0x64,0x00,0x80,0x00 }},
+ {16, 0x8710, 0, {0xb7,0xc3,0x0f,0xb8,0x83,0xbc,0x04,0xef,0x00,0x3f,0xc0,0x3c,0xf0,0x03,0xfc,0x02 }},
+ {16, 0x8720, 0, {0xcf,0x00,0x37,0xc0,0x28,0xf0,0x13,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8730, 0, {0x80,0x00,0xec,0x00,0xf8,0x41,0x3e,0xc8,0x0f,0x32,0x03,0xec,0x00,0xf8,0x00,0x3a }},
+ {16, 0x8740, 0, {0xc4,0x0f,0xb1,0x03,0xc4,0x00,0xf9,0x00,0x36,0xc0,0x0f,0xe4,0x0b,0xec,0x04,0xfb }},
+ {16, 0x8750, 0, {0x00,0x3e,0xc1,0x0f,0xb0,0x43,0xec,0x04,0xfb,0x00,0x3a,0xc0,0x0f,0xb0,0x03,0xe4 }},
+ {16, 0x8760, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf4,0x00,0xfc,0x80,0x3f,0xc0 }},
+ {16, 0x8770, 0, {0x1f,0xf0,0x03,0x3c,0x08,0xfb,0x00,0x33,0x80,0x2e,0xf0,0x13,0xa4,0x04,0xcb,0x00 }},
+ {16, 0x8780, 0, {0xb9,0xc0,0x2c,0xd8,0x0b,0x3c,0x00,0xff,0x00,0x3f,0xc0,0x09,0x70,0x00,0x2c,0x04 }},
+ {16, 0x8790, 0, {0xff,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xc0,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x87a0, 0, {0xc1,0x00,0x6c,0x00,0xb8,0x80,0x2e,0xc0,0x0b,0xb0,0x03,0x6c,0x00,0xb9,0x16,0x28 }},
+ {16, 0x87b0, 0, {0x72,0x08,0xb0,0x22,0x27,0x40,0xdb,0x00,0x22,0xc0,0x08,0xbd,0x82,0x2c,0x08,0xbb }},
+ {16, 0x87c0, 0, {0x00,0x2e,0xc0,0x48,0xb0,0x02,0x2c,0x00,0xbb,0x00,0x2e,0xc1,0x0b,0xb0,0x02,0xe0 }},
+ {16, 0x87d0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0xb8,0x60,0x2e,0xc0 }},
+ {16, 0x87e0, 0, {0x0b,0xb0,0x02,0x2c,0x00,0xb1,0x00,0x2a,0x84,0x4a,0x30,0x22,0xac,0x20,0x98,0x80 }},
+ {16, 0x87f0, 0, {0x2a,0xc0,0x08,0x30,0x02,0xac,0x00,0x3b,0x00,0x2c,0xc0,0x0a,0xb0,0x02,0xac,0x08 }},
+ {16, 0x8800, 0, {0xbb,0x00,0x2e,0xc0,0x0b,0xb0,0x42,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8810, 0, {0x08,0x04,0x0c,0x01,0xb0,0x00,0x2c,0xc0,0x0b,0x30,0x02,0x4c,0x04,0xb0,0x00,0x2a }},
+ {16, 0x8820, 0, {0x80,0x08,0x30,0x02,0x00,0x00,0x10,0x04,0x28,0xc0,0x08,0x20,0x42,0x8c,0x00,0xb3 }},
+ {16, 0x8830, 0, {0x00,0x2c,0xc0,0x42,0x30,0x0a,0x8c,0x00,0xb3,0x00,0x2c,0xc0,0x8b,0x30,0x02,0xc2 }},
+ {16, 0x8840, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x64,0x00,0xf8,0x50,0x3f,0xc0 }},
+ {16, 0x8850, 0, {0x0b,0xf0,0x03,0x3c,0x00,0xfa,0x04,0x32,0x80,0x0e,0xf0,0x23,0xac,0x00,0xd9,0x00 }},
+ {16, 0x8860, 0, {0x3b,0xc0,0x0c,0x90,0x03,0xbc,0x04,0xff,0x00,0x3d,0xc0,0x2e,0xf0,0x0b,0x3c,0x00 }},
+ {16, 0x8870, 0, {0xff,0x04,0x3f,0xc0,0x0f,0xf0,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8880, 0, {0xa0,0x1d,0xfc,0x00,0xfc,0x00,0x3f,0xc0,0x07,0xf0,0x03,0xfc,0x04,0x7c,0x02,0xb5 }},
+ {16, 0x8890, 0, {0x00,0x0f,0xf0,0x03,0xf0,0x00,0xfc,0x00,0x37,0xc0,0x0f,0xf0,0x13,0x7c,0x00,0xff }},
+ {16, 0x88a0, 0, {0x00,0x3f,0xc0,0x0d,0xf0,0x03,0x6d,0x00,0xff,0x00,0x3f,0xc0,0x1f,0xf0,0x03,0xe8 }},
+ {16, 0x88b0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xd2,0x00,0xd5,0x80,0x33,0x0a }},
+ {16, 0x88c0, 0, {0x4c,0xf8,0x03,0xf2,0x00,0xfc,0x00,0x37,0x26,0x1f,0xca,0x03,0xbc,0xc4,0xcf,0x20 }},
+ {16, 0x88d0, 0, {0x33,0xe4,0x0f,0x78,0x03,0x3e,0x44,0xcf,0x00,0x3b,0xce,0x9f,0x68,0x13,0xd0,0x00 }},
+ {16, 0x88e0, 0, {0xcd,0x80,0xb3,0x60,0x0f,0xfa,0x83,0xf0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x88f0, 0, {0x80,0x10,0xe0,0x80,0xc9,0x28,0x22,0x30,0x08,0xb2,0x22,0xea,0x01,0xb8,0x82,0x20 }},
+ {16, 0x8900, 0, {0x50,0x4f,0x9c,0x00,0xa8,0xd1,0xdb,0x10,0xa6,0xe0,0x17,0xb8,0x03,0xec,0x80,0xdb }},
+ {16, 0x8910, 0, {0x08,0x1f,0xd0,0x0b,0xb8,0x02,0xf6,0x00,0xfb,0x80,0x22,0x40,0x0b,0xb0,0x02,0x60 }},
+ {16, 0x8920, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc4,0x20,0x81,0x80,0x20,0x00 }},
+ {16, 0x8930, 0, {0x8b,0x30,0x82,0xc0,0x00,0xb0,0x10,0x28,0x08,0x8b,0x11,0x30,0xc4,0x84,0x90,0x28 }},
+ {16, 0x8940, 0, {0x24,0xc8,0x0b,0x30,0x02,0x4c,0x00,0x83,0x10,0x04,0xc8,0x0b,0x30,0x02,0xcc,0x00 }},
+ {16, 0x8950, 0, {0xb3,0x00,0x24,0x40,0x0b,0x30,0x02,0xe2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8960, 0, {0xc0,0x15,0xa6,0x00,0x81,0x00,0x22,0x10,0x0b,0xb0,0x12,0xea,0x20,0xbb,0x00,0x2a }},
+ {16, 0x8970, 0, {0x70,0x0a,0x9c,0x02,0x62,0x00,0x98,0x88,0x26,0xc8,0x02,0xb2,0x02,0x8e,0x08,0x8b }},
+ {16, 0x8980, 0, {0x18,0x22,0xc0,0x0b,0xa0,0x02,0xee,0x20,0x3b,0x00,0x26,0x40,0x0b,0xb0,0x02,0x70 }},
+ {16, 0x8990, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xe0,0x00,0xcb,0x00,0x32,0x80 }},
+ {16, 0x89a0, 0, {0x0f,0xb0,0x03,0xe7,0x00,0xb8,0x52,0x3e,0x20,0x4b,0x0c,0x43,0xef,0x82,0x9b,0xc0 }},
+ {16, 0x89b0, 0, {0x32,0xc0,0x0b,0xb0,0x02,0x6c,0x01,0x8b,0x80,0x2e,0xc0,0x0b,0xa0,0x83,0xe6,0x00 }},
+ {16, 0x89c0, 0, {0xfb,0x00,0x36,0x40,0x0f,0xf0,0x03,0xd0,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x89d0, 0, {0xe0,0x01,0xb0,0x02,0xff,0x04,0x3f,0x90,0x0c,0xf1,0x01,0xf4,0x08,0x7d,0x80,0x37 }},
+ {16, 0x89e0, 0, {0x00,0x0f,0xc0,0x23,0x98,0x00,0xf7,0x00,0x2b,0xe0,0x0f,0xf8,0x23,0xfc,0x06,0xfb }},
+ {16, 0x89f0, 0, {0x83,0xbf,0xc0,0x87,0xd0,0x03,0xdc,0x00,0xef,0x00,0x3b,0xc0,0x0f,0xb0,0x01,0xf8 }},
+ {16, 0x8a00, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa6,0x00,0xcb,0x00,0x33,0x80 }},
+ {16, 0x8a10, 0, {0x0f,0xb0,0x03,0xe1,0x10,0xf2,0x40,0xb2,0x00,0x3d,0x94,0x17,0x2d,0x44,0xfa,0x41 }},
+ {16, 0x8a20, 0, {0x32,0xc0,0x9f,0xb0,0x23,0x2c,0x02,0xcb,0x40,0x32,0xc0,0x4f,0x90,0x03,0x3d,0x00 }},
+ {16, 0x8a30, 0, {0xcb,0x00,0x3e,0x40,0x0f,0xb0,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8a40, 0, {0x88,0x05,0x26,0x00,0x8b,0x71,0x20,0xd5,0x03,0x99,0x02,0xe0,0x00,0xbb,0x80,0x22 }},
+ {16, 0x8a50, 0, {0x60,0x1c,0x80,0x03,0x60,0x00,0xb8,0x02,0x22,0xc2,0x0b,0x32,0x02,0x2c,0x01,0x8f }},
+ {16, 0x8a60, 0, {0x02,0xd7,0xc0,0x0b,0xa0,0x03,0x6d,0x40,0x53,0x80,0x2e,0xc0,0x0e,0xf0,0x43,0x72 }},
+ {16, 0x8a70, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x68,0x02,0x80,0x00,0x24,0x00 }},
+ {16, 0x8a80, 0, {0x0b,0x35,0x26,0xc2,0x00,0xb0,0x90,0x20,0xc0,0x88,0x00,0x02,0x4f,0x20,0xb3,0x02 }},
+ {16, 0x8a90, 0, {0x60,0xe2,0x1b,0x38,0x02,0x0c,0x00,0x88,0x00,0x60,0xc0,0x0b,0x34,0x82,0x4c,0x02 }},
+ {16, 0x8aa0, 0, {0xa1,0x90,0x2c,0x40,0x0b,0x30,0x02,0x30,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8ab0, 0, {0x20,0x01,0x3a,0x08,0x8c,0xa0,0x2d,0x20,0x4b,0x78,0x02,0xda,0x00,0xb2,0x90,0x21 }},
+ {16, 0x8ac0, 0, {0x66,0x48,0x79,0x02,0xde,0x40,0xb7,0x91,0xa1,0xe0,0xdb,0xf8,0x02,0x1e,0x40,0x84 }},
+ {16, 0x8ad0, 0, {0x90,0x01,0xe0,0x8b,0xf9,0x02,0x5e,0x01,0x97,0x80,0x2d,0x60,0x0a,0x78,0x00,0x48 }},
+ {16, 0x8ae0, 0, {0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x80,0x00,0x24,0x04 }},
+ {16, 0x8af0, 0, {0x0f,0x32,0x03,0xc4,0xa0,0xf1,0x42,0x30,0xc4,0x2c,0x31,0x02,0x44,0x00,0xf1,0x11 }},
+ {16, 0x8b00, 0, {0xa0,0xc0,0x0b,0x30,0x0b,0x0c,0x42,0x83,0x00,0x00,0xc0,0x0f,0x30,0x03,0x4c,0x02 }},
+ {16, 0x8b10, 0, {0xe3,0x00,0x3c,0x40,0x0b,0x30,0x01,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8b20, 0, {0xc0,0x1d,0xbc,0x00,0xfc,0xa5,0x33,0xc0,0x0f,0xd0,0x03,0xfc,0x01,0xbf,0x00,0x3f }},
+ {16, 0x8b30, 0, {0xc4,0x0e,0x71,0x03,0x74,0x00,0x75,0x10,0x3f,0xc0,0x05,0xf0,0x03,0xdc,0x40,0xff }},
+ {16, 0x8b40, 0, {0x04,0x3f,0xc0,0x0f,0xf0,0x43,0xfc,0x00,0x7f,0x00,0x3f,0x40,0x0e,0xf0,0x03,0xd0 }},
+ {16, 0x8b50, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x04,0xe8,0x00,0xf2,0x04,0xb3,0x80 }},
+ {16, 0x8b60, 0, {0x0f,0xb8,0x0b,0x2c,0x00,0xeb,0x80,0x32,0xc0,0x0c,0x20,0x13,0x2e,0x08,0xcb,0x01 }},
+ {16, 0x8b70, 0, {0x32,0xc5,0x0f,0xb1,0x03,0xec,0x48,0xc8,0x10,0x32,0xfa,0x8c,0x38,0x03,0x3c,0x90 }},
+ {16, 0x8b80, 0, {0xcb,0x00,0x3e,0x40,0x0f,0xb0,0x13,0xc2,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8b90, 0, {0xc8,0x10,0x98,0x00,0xf6,0x00,0x61,0x81,0x0b,0xf0,0x02,0x1c,0x00,0xd7,0x00,0xb7 }},
+ {16, 0x8ba0, 0, {0x80,0x0c,0x70,0x02,0xbc,0x10,0x8f,0x00,0x21,0xc8,0x8b,0x72,0x43,0xfc,0x88,0xdc }},
+ {16, 0x8bb0, 0, {0x00,0x37,0xc8,0x0d,0x50,0x02,0x1c,0x22,0x87,0x00,0x2d,0xc0,0x0b,0x70,0x02,0xd3 }},
+ {16, 0x8bc0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x9e,0x00,0xb6,0x80,0xa9,0xa0 }},
+ {16, 0x8bd0, 0, {0x4b,0x7c,0x02,0x5e,0x30,0xa3,0x88,0x21,0xf0,0x08,0x78,0x02,0x16,0x00,0x85,0x80 }},
+ {16, 0x8be0, 0, {0x21,0xe0,0x0b,0x78,0x02,0xde,0x00,0x87,0x80,0xa1,0xe4,0x08,0xd8,0x02,0x4e,0x00 }},
+ {16, 0x8bf0, 0, {0x97,0x80,0x2d,0x70,0x0b,0x78,0x02,0xc8,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8c00, 0, {0x48,0x14,0xec,0x00,0xb2,0x00,0x28,0xc0,0x0b,0x10,0x02,0x4e,0x90,0x93,0x02,0x22 }},
+ {16, 0x8c10, 0, {0xf0,0x08,0x38,0x42,0x8c,0x42,0x83,0x04,0x22,0xe4,0x4b,0x38,0x02,0x8e,0x40,0x83 }},
+ {16, 0x8c20, 0, {0x00,0x20,0xc0,0x09,0x38,0x22,0x4e,0x21,0x93,0x00,0x2e,0xe0,0x0b,0x30,0x02,0xdb }},
+ {16, 0x8c30, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xa8,0x01,0xfa,0x00,0x3b,0x89 }},
+ {16, 0x8c40, 0, {0x0f,0xa0,0x02,0x78,0x08,0xae,0x40,0x23,0x80,0x2c,0x6c,0x0b,0x3a,0x00,0x8e,0x8c }},
+ {16, 0x8c50, 0, {0xb2,0x00,0x0b,0x80,0x82,0xe0,0x02,0x8e,0x00,0x22,0x80,0x0c,0xe8,0x02,0x7b,0x80 }},
+ {16, 0x8c60, 0, {0x9a,0x80,0x3e,0x80,0x0f,0xa0,0x03,0xfa,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8c70, 0, {0x48,0x00,0xe0,0x09,0xec,0x00,0x36,0x21,0x0b,0x80,0x13,0xa1,0x00,0xf8,0x60,0x3e }},
+ {16, 0x8c80, 0, {0x00,0x0f,0x81,0x03,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x43,0xe0,0x10,0xf8 }},
+ {16, 0x8c90, 0, {0x00,0xbe,0x00,0x0f,0x85,0x0b,0x80,0x00,0xe8,0x10,0x3e,0x00,0x0f,0x80,0x03,0xd2 }},
+ {16, 0x8ca0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x02,0xc9,0x02,0x30,0x48 }},
+ {16, 0x8cb0, 0, {0x0c,0x99,0x13,0xa4,0x02,0xc9,0x00,0x3e,0x42,0x0c,0x90,0x8f,0x24,0x00,0xf9,0x00 }},
+ {16, 0x8cc0, 0, {0x32,0x28,0x0c,0x88,0x03,0xe0,0x00,0xc9,0x00,0xb2,0x40,0x0f,0x90,0x03,0xe7,0x00 }},
+ {16, 0x8cd0, 0, {0xc9,0x10,0x3e,0x40,0x0c,0x10,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8ce0, 0, {0x80,0x04,0x64,0x01,0x89,0x80,0xa2,0x48,0x28,0x92,0x42,0xc5,0x00,0x89,0x40,0x2e }},
+ {16, 0x8cf0, 0, {0x40,0x2c,0x90,0x06,0x25,0x00,0xb9,0x00,0x22,0x50,0x08,0x98,0x02,0xc4,0x00,0x89 }},
+ {16, 0x8d00, 0, {0x01,0x76,0x40,0x4b,0x92,0x02,0xe5,0x02,0x89,0x00,0x2e,0x40,0x0d,0x90,0x03,0x60 }},
+ {16, 0x8d10, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x0c,0x85,0x20,0xa2,0x40 }},
+ {16, 0x8d20, 0, {0x08,0x90,0x06,0xe5,0x00,0x89,0x40,0x2e,0x40,0x09,0x90,0x42,0xa4,0xa0,0x31,0x00 }},
+ {16, 0x8d30, 0, {0x22,0x50,0x18,0x91,0x02,0xe4,0x00,0x81,0x00,0x22,0x40,0x0b,0x90,0x06,0xe4,0x00 }},
+ {16, 0x8d40, 0, {0x89,0x00,0x2e,0x40,0x09,0x90,0x02,0x0e,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8d50, 0, {0x00,0x04,0x15,0x00,0x85,0x40,0x20,0x40,0x08,0x14,0x26,0xe4,0x00,0x81,0x00,0x2c }},
+ {16, 0x8d60, 0, {0x40,0x18,0x10,0x02,0x84,0x80,0xb1,0x20,0xa0,0x50,0x08,0x14,0x02,0xe5,0x02,0x81 }},
+ {16, 0x8d70, 0, {0x40,0x20,0x48,0x0b,0x10,0x06,0xcc,0x00,0x81,0x01,0x2c,0x50,0x09,0x14,0x02,0x4a }},
+ {16, 0x8d80, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0x8c,0x00,0x32,0x00 }},
+ {16, 0x8d90, 0, {0x0c,0x80,0x23,0xe0,0x00,0xc8,0x00,0x3e,0x14,0x0d,0x80,0x12,0xa1,0x44,0xf8,0x51 }},
+ {16, 0x8da0, 0, {0x32,0x00,0x2c,0x80,0x03,0xe0,0x00,0x88,0x04,0x22,0x14,0x0f,0x80,0x07,0xe0,0x00 }},
+ {16, 0x8db0, 0, {0xc8,0x00,0x3e,0x00,0x0d,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8dc0, 0, {0x98,0x9d,0xe4,0x00,0xf9,0x00,0x3f,0x50,0x0f,0xd0,0x03,0xdc,0x01,0xbd,0x42,0x3f }},
+ {16, 0x8dd0, 0, {0x50,0x4f,0xd4,0x43,0x74,0x41,0xfd,0x10,0x3f,0x10,0x1f,0xc4,0x13,0xf1,0x00,0xfd }},
+ {16, 0x8de0, 0, {0x40,0x7e,0x44,0x0f,0xd0,0x43,0xf5,0x01,0xfd,0x00,0x3f,0x40,0x0f,0x94,0x03,0xe6 }},
+ {16, 0x8df0, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf4,0x00,0xdf,0x05,0x33,0x61 }},
+ {16, 0x8e00, 0, {0x0f,0x50,0x53,0x34,0x10,0xfd,0x04,0x33,0x44,0x4f,0x50,0x03,0x76,0xc1,0xcd,0xe0 }},
+ {16, 0x8e10, 0, {0x33,0x60,0x0c,0xce,0x03,0xf6,0xc0,0xe1,0xc0,0xb6,0x64,0x8f,0x50,0x0b,0x36,0x82 }},
+ {16, 0x8e20, 0, {0xcd,0x00,0x3e,0x44,0x4c,0x9e,0xc3,0xc6,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8e30, 0, {0x38,0x10,0xea,0x28,0x80,0xa0,0xb2,0x04,0x0b,0x8a,0x83,0x60,0x00,0xfa,0x00,0x36 }},
+ {16, 0x8e40, 0, {0x28,0x8b,0x80,0x03,0xe3,0xc8,0xc8,0x84,0x22,0x14,0x08,0x8a,0x02,0xe2,0x80,0xd8 }},
+ {16, 0x8e50, 0, {0x82,0x34,0x34,0x1b,0x80,0x03,0x60,0x04,0x88,0x00,0x2e,0x20,0x0a,0x8e,0x42,0xce }},
+ {16, 0x8e60, 0, {0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0xc4,0x80,0x81,0x08,0x04,0x41 }},
+ {16, 0x8e70, 0, {0x0b,0x92,0x02,0x04,0x00,0xb1,0x00,0x2c,0x40,0x0b,0x18,0x02,0x24,0x00,0xb1,0x60 }},
+ {16, 0x8e80, 0, {0x26,0x40,0x0a,0x16,0x02,0xc5,0x00,0xa1,0xc0,0x20,0x48,0x0b,0x90,0x02,0x47,0x00 }},
+ {16, 0x8e90, 0, {0x91,0x01,0x2c,0x48,0x18,0x12,0x02,0xd2,0x01,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8ea0, 0, {0x18,0x15,0xa4,0x0c,0x8b,0x04,0xa2,0x50,0x0b,0x91,0x02,0x24,0x04,0xa9,0x01,0x2e }},
+ {16, 0x8eb0, 0, {0x42,0x0b,0x90,0x02,0xa4,0x00,0xa9,0x00,0x26,0x60,0x0a,0x90,0x02,0xe6,0x00,0x81 }},
+ {16, 0x8ec0, 0, {0x00,0x22,0x40,0x8b,0xb0,0x02,0x24,0x08,0x99,0x10,0x2e,0x40,0x1a,0x90,0x02,0xc6 }},
+ {16, 0x8ed0, 0, {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe5,0x00,0xc9,0x00,0x36,0x40 }},
+ {16, 0x8ee0, 0, {0x0f,0x10,0x02,0x25,0x00,0xb1,0x00,0x2e,0x60,0x0f,0x10,0x12,0x24,0x02,0xb9,0xa0 }},
+ {16, 0x8ef0, 0, {0xa4,0x40,0x2e,0x91,0x03,0xe6,0x00,0xa9,0x00,0x22,0x40,0x0b,0x19,0x80,0x64,0x04 }},
+ {16, 0x8f00, 0, {0xd9,0x81,0x2e,0x40,0x4c,0x90,0x03,0xe8,0x14,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8f10, 0, {0x68,0x01,0xa4,0x0a,0xe9,0x00,0xbe,0x48,0x0f,0x98,0x0b,0xe4,0x00,0xf9,0xc4,0x36 }},
+ {16, 0x8f20, 0, {0x70,0x1f,0x92,0x03,0xe6,0x90,0xc1,0x90,0x3a,0x40,0x8d,0x88,0x03,0xe4,0x00,0xf9 }},
+ {16, 0x8f30, 0, {0x90,0x3e,0x40,0x0b,0x98,0x03,0xe6,0x40,0xe9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xd2 }},
+ {16, 0x8f40, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x10,0xa1,0x02,0xd8,0x20,0xb2,0x10 }},
+ {16, 0x8f50, 0, {0x0c,0x80,0x83,0x21,0x40,0xc8,0x58,0xb2,0x10,0x4c,0x80,0x0b,0x20,0x00,0xf8,0x42 }},
+ {16, 0x8f60, 0, {0x32,0x00,0x0f,0x80,0x03,0xe0,0x02,0xd8,0x00,0x72,0x00,0x1c,0x80,0x00,0x20,0x00 }},
+ {16, 0x8f70, 0, {0xf8,0x04,0x3e,0x00,0x0f,0x80,0x03,0x02,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8f80, 0, {0x28,0x05,0x38,0x04,0xce,0x41,0x23,0x80,0x08,0xe0,0x02,0x39,0x10,0xae,0x40,0x22 }},
+ {16, 0x8f90, 0, {0x80,0x08,0xe0,0x02,0x1a,0x00,0xba,0x00,0x2b,0xad,0x03,0x80,0x02,0xe8,0x00,0xca }},
+ {16, 0x8fa0, 0, {0x00,0x2a,0x80,0x0a,0xe0,0x02,0x18,0x00,0xba,0x00,0x1a,0x80,0x0b,0xa0,0x03,0x4a }},
+ {16, 0x8fb0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x05,0x6c,0x12,0x89,0x00,0xa0,0xe0 }},
+ {16, 0x8fc0, 0, {0x08,0x38,0x02,0x0d,0x88,0x83,0x00,0x04,0xe0,0x08,0x38,0x32,0x0e,0x25,0x31,0x01 }},
+ {16, 0x8fd0, 0, {0x24,0xe0,0x8b,0x38,0x02,0xe4,0x01,0x83,0x00,0x20,0xc0,0x08,0x30,0x02,0x8c,0x00 }},
+ {16, 0x8fe0, 0, {0xb3,0x00,0x2e,0xc0,0x0b,0x30,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x8ff0, 0, {0xa0,0x01,0x14,0x20,0x86,0x20,0x29,0xb0,0x08,0xf0,0x82,0x3e,0x04,0xa7,0x00,0x21 }},
+ {16, 0x9000, 0, {0x70,0x88,0x70,0x92,0x1c,0x20,0xbd,0x00,0x69,0xc0,0x0b,0x76,0x02,0xd4,0x80,0x8f }},
+ {16, 0x9010, 0, {0x21,0x29,0xe0,0x0a,0x60,0x86,0x98,0x01,0xb7,0x00,0x2d,0xc8,0x0b,0x3b,0x02,0x60 }},
+ {16, 0x9020, 0, {0x04,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3e,0x00,0xc7,0xa0,0xb0,0xe0 }},
+ {16, 0x9030, 0, {0x2c,0x78,0x0b,0x1a,0x00,0xc3,0x80,0x37,0xe0,0x28,0x78,0x03,0x1a,0x08,0xf5,0x90 }},
+ {16, 0x9040, 0, {0x35,0xe0,0x0f,0x7c,0x12,0xd6,0x82,0xc7,0x90,0x21,0xe4,0x08,0x78,0x03,0x9e,0x00 }},
+ {16, 0x9050, 0, {0xf5,0x80,0x3d,0xf1,0x0f,0x78,0x03,0x22,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9060, 0, {0x08,0x19,0xa4,0x00,0xee,0x80,0x36,0xc1,0x4f,0xd0,0x03,0xc8,0x00,0xfb,0x00,0x3e }},
+ {16, 0x9070, 0, {0x51,0x0f,0xb0,0x03,0xe4,0x08,0xf1,0x60,0x3e,0xc0,0x0f,0xb0,0x03,0xc5,0x00,0xeb }},
+ {16, 0x9080, 0, {0x10,0x3e,0xc0,0x0f,0xb0,0x09,0x6c,0x00,0xfb,0x00,0x3a,0xc0,0x0f,0xb0,0x03,0xc2 }},
+ {16, 0x9090, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xfe,0x00,0xfd,0x88,0x33,0x60 }},
+ {16, 0x90a0, 0, {0x0f,0xf9,0x03,0xce,0x40,0xd7,0x84,0x37,0x70,0x0c,0xd8,0x23,0x36,0x00,0xc5,0x88 }},
+ {16, 0x90b0, 0, {0x33,0xe0,0x4f,0xf8,0x13,0xf7,0x28,0xdf,0x80,0x37,0xe2,0x0c,0x58,0x03,0x3e,0x00 }},
+ {16, 0x90c0, 0, {0xff,0x90,0x3f,0xe0,0x0c,0xf8,0x03,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x90d0, 0, {0xa9,0x11,0x9c,0x08,0xf6,0x00,0xa1,0x00,0x0b,0x63,0x02,0xd6,0x30,0x85,0x41,0x31 }},
+ {16, 0x90e0, 0, {0xc8,0x08,0x50,0x23,0x1c,0x00,0xd5,0x20,0xb1,0x80,0x0f,0x70,0x03,0xb4,0x00,0xc7 }},
+ {16, 0x90f0, 0, {0x00,0x21,0xc0,0x0f,0x40,0xa3,0x58,0x40,0xb7,0x00,0x3f,0xc4,0x0a,0xf0,0x02,0x2a }},
+ {16, 0x9100, 0, {0x06,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x40,0xb7,0x10,0x21,0xd2 }},
+ {16, 0x9110, 0, {0x0b,0x70,0x02,0xdc,0x42,0x86,0x00,0x25,0x61,0x08,0x51,0x02,0x50,0x00,0x95,0x00 }},
+ {16, 0x9120, 0, {0x25,0xc0,0x09,0x70,0x82,0xd4,0x00,0x87,0x00,0x24,0xc0,0x08,0x50,0x02,0x5c,0x00 }},
+ {16, 0x9130, 0, {0x95,0x04,0x2d,0xc0,0x08,0x70,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9140, 0, {0x20,0x14,0xcc,0x08,0xb2,0xd0,0x20,0xe0,0x4b,0x08,0x02,0xc4,0x00,0x80,0x80,0x20 }},
+ {16, 0x9150, 0, {0xf0,0x08,0x1a,0x02,0x85,0x48,0x81,0x10,0x20,0x40,0x0a,0x30,0x02,0xc6,0x10,0x93 }},
+ {16, 0x9160, 0, {0x00,0x20,0xc0,0x0a,0x1c,0x02,0x0d,0x40,0xb3,0x00,0x68,0xc4,0x0a,0xb0,0x02,0x09 }},
+ {16, 0x9170, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x01,0xfe,0x00,0x32,0xf0 }},
+ {16, 0x9180, 0, {0x0f,0x88,0x03,0xe6,0x00,0xc8,0xc8,0x36,0xf6,0x28,0xa6,0x0a,0x6d,0x00,0x9d,0x00 }},
+ {16, 0x9190, 0, {0x32,0x00,0x0b,0xb0,0x03,0xf6,0x03,0xc7,0x00,0x37,0xc0,0x08,0x9c,0x0a,0x6e,0x00 }},
+ {16, 0x91a0, 0, {0xbb,0x00,0x2f,0xc0,0x0c,0xf0,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x91b0, 0, {0x80,0x00,0xe4,0x01,0xeb,0x40,0x3e,0x80,0x4f,0xc1,0x03,0xe4,0x00,0xb8,0x08,0x3a }},
+ {16, 0x91c0, 0, {0x40,0x8f,0xa4,0x13,0x6c,0x20,0xf9,0x00,0x3e,0x70,0x0f,0xb0,0x03,0xa4,0x40,0xeb }},
+ {16, 0x91d0, 0, {0x00,0x3e,0xc0,0x0f,0x92,0x23,0xe8,0x00,0xf9,0x80,0x3e,0xc0,0x0f,0xb0,0x63,0xe0 }},
+ {16, 0x91e0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x08,0xce,0x08,0x33,0xc0 }},
+ {16, 0x91f0, 0, {0x0f,0xda,0x03,0x30,0x00,0xe4,0x04,0x35,0xc0,0x0d,0xa0,0x03,0x28,0x00,0xc5,0x00 }},
+ {16, 0x9200, 0, {0x33,0x00,0x0b,0xfa,0x03,0xf4,0x03,0xcb,0x00,0x31,0xc0,0x0c,0xd4,0x03,0x14,0x20 }},
+ {16, 0x9210, 0, {0xcd,0x80,0x23,0xc1,0x0c,0xf0,0x02,0x08,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9220, 0, {0x81,0x04,0x44,0x10,0xcb,0xd0,0x22,0xc0,0x0b,0x94,0x02,0x22,0x84,0xb8,0xc6,0x02 }},
+ {16, 0x9230, 0, {0x40,0x08,0x28,0x02,0xa5,0x80,0x89,0x00,0x22,0x60,0x0b,0xb8,0x02,0x64,0x00,0x8b }},
+ {16, 0x9240, 0, {0x00,0x2a,0xc0,0xc8,0x00,0x03,0x66,0x00,0x81,0x00,0x00,0xc0,0x0d,0xb0,0x0a,0xa8 }},
+ {16, 0x9250, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2c,0x00,0x13,0x00,0x22,0x40 }},
+ {16, 0x9260, 0, {0x8b,0x24,0x02,0x2a,0x00,0xbb,0x82,0x22,0x40,0x00,0xac,0x02,0x84,0x00,0x89,0x00 }},
+ {16, 0x9270, 0, {0x22,0x22,0x0b,0xb0,0x02,0xc4,0x00,0x9b,0x00,0x2a,0xc0,0x08,0xb0,0x02,0x2e,0x00 }},
+ {16, 0x9280, 0, {0x8b,0x10,0x2a,0xc0,0x08,0xb0,0x02,0xa0,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9290, 0, {0x08,0x04,0x0c,0x10,0x83,0x00,0x20,0x01,0x0b,0x20,0x02,0x00,0x80,0xb1,0x00,0x20 }},
+ {16, 0x92a0, 0, {0xc1,0x08,0x20,0x02,0x88,0x01,0x81,0x00,0xa0,0x00,0x0b,0x30,0x02,0x44,0x01,0x9b }},
+ {16, 0x92b0, 0, {0x00,0x28,0xc0,0x08,0xb0,0x02,0x48,0x06,0x89,0x00,0x2a,0xc0,0x09,0x30,0x02,0x82 }},
+ {16, 0x92c0, 0, {0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8d,0x6c,0x00,0xc3,0x00,0xb2,0xc0 }},
+ {16, 0x92d0, 0, {0x0f,0xb0,0x03,0x28,0x20,0xfa,0x00,0xb1,0x40,0x0d,0xa0,0x07,0xa0,0x00,0xcd,0x00 }},
+ {16, 0x92e0, 0, {0x22,0x00,0x0f,0xb0,0x03,0xf4,0x00,0x9f,0x00,0x3b,0xc0,0x2c,0xb0,0x0b,0x24,0x00 }},
+ {16, 0x92f0, 0, {0xc9,0x00,0xba,0xc0,0x0c,0xb0,0x03,0x80,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9300, 0, {0xa0,0x1d,0xfc,0x06,0xff,0x02,0xaf,0xc0,0x0f,0xc0,0x03,0xf0,0x10,0xfc,0x00,0x3f }},
+ {16, 0x9310, 0, {0xc0,0x9f,0xe0,0x13,0xf0,0x00,0xfd,0x04,0x3f,0x40,0x4f,0xf0,0x03,0x74,0x00,0xef }},
+ {16, 0x9320, 0, {0x00,0x3f,0xc0,0x8f,0xe0,0x02,0xb4,0x01,0xfd,0x04,0x37,0xc0,0x0f,0xf0,0x43,0x68 }},
+ {16, 0x9330, 0, {0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x00,0xc7,0x20,0xb3,0xc8 }},
+ {16, 0x9340, 0, {0x1c,0xf1,0x03,0x7c,0x20,0xcf,0x0a,0x3f,0xd0,0x0d,0xf0,0x03,0x7c,0x80,0x8f,0x32 }},
+ {16, 0x9350, 0, {0x33,0xc4,0x0f,0xf1,0x83,0x3c,0xe0,0xcf,0x10,0x33,0xc4,0x0d,0xf2,0x83,0x3c,0xe2 }},
+ {16, 0x9360, 0, {0xc7,0x80,0x17,0xcc,0x4c,0xf3,0x83,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9370, 0, {0x80,0x10,0xe3,0x40,0x88,0x68,0x22,0x30,0x08,0x06,0x02,0x01,0xa1,0x88,0xc4,0x0e }},
+ {16, 0x9380, 0, {0x14,0x08,0x87,0x80,0x01,0xc0,0x28,0x50,0x02,0x04,0x8b,0x86,0x02,0xa1,0x98,0x88 }},
+ {16, 0x9390, 0, {0x41,0x2a,0x04,0x0a,0x84,0x82,0xbd,0x80,0x8b,0x08,0x2b,0xc4,0x88,0xf4,0x03,0x60 }},
+ {16, 0x93a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcc,0x08,0x82,0x40,0x20,0x10 }},
+ {16, 0x93b0, 0, {0x08,0x21,0x12,0x44,0x04,0x82,0x04,0x2c,0x08,0x89,0x90,0x02,0x44,0x21,0x8b,0x00 }},
+ {16, 0x93c0, 0, {0x24,0x88,0x8b,0xa0,0x00,0x40,0x84,0x89,0x30,0x22,0x48,0x88,0xb0,0x02,0xcc,0x08 }},
+ {16, 0x93d0, 0, {0x88,0x20,0xa4,0xc8,0x00,0x32,0x0a,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x93e0, 0, {0xc0,0x15,0xa0,0x00,0x89,0x00,0x22,0xc1,0x88,0x90,0x62,0x28,0x08,0x89,0x08,0x2e }},
+ {16, 0x93f0, 0, {0xc0,0x08,0xa0,0x02,0x28,0x08,0xa8,0x00,0x26,0x42,0x0b,0x90,0x02,0xcc,0x50,0x8a }},
+ {16, 0x9400, 0, {0x22,0x2a,0x86,0x0a,0x80,0x02,0xec,0x00,0x88,0x84,0x2a,0xc1,0x08,0xb0,0x26,0x30 }},
+ {16, 0x9410, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xf0,0x02,0xcf,0x00,0x33,0xc0 }},
+ {16, 0x9420, 0, {0x48,0xf8,0x43,0x79,0x00,0x8d,0xc0,0x3f,0x30,0x8d,0x60,0x83,0x78,0x60,0xc4,0x58 }},
+ {16, 0x9430, 0, {0x37,0x20,0x0f,0x58,0x13,0x7b,0x02,0xcc,0xc4,0x31,0x20,0x0c,0x44,0x03,0xec,0x02 }},
+ {16, 0x9440, 0, {0x8b,0x80,0x36,0xc0,0x24,0xb0,0x12,0x10,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9450, 0, {0xe0,0x01,0x9c,0x00,0xf4,0x10,0x3d,0x00,0x6f,0xc9,0x13,0xd4,0x12,0xfe,0x90,0x3f }},
+ {16, 0x9460, 0, {0xf0,0x0f,0xda,0x23,0xf4,0x14,0xff,0x02,0x3b,0xf0,0x0f,0xea,0x23,0xb6,0x00,0xff }},
+ {16, 0x9470, 0, {0x82,0x3f,0xe1,0x8f,0xf4,0x03,0xbc,0x00,0xff,0x00,0x3f,0xc0,0xaf,0x70,0x03,0xf8 }},
+ {16, 0x9480, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa0,0x00,0xca,0x00,0x32,0x08 }},
+ {16, 0x9490, 0, {0x1c,0xa0,0x03,0xa5,0x20,0xcb,0x40,0xba,0x10,0x1f,0xb0,0x03,0xac,0x00,0xeb,0x00 }},
+ {16, 0x94a0, 0, {0x72,0x90,0x0c,0xb4,0x03,0x29,0x04,0xc9,0x52,0x32,0x50,0x0c,0xb4,0x03,0x0c,0x00 }},
+ {16, 0x94b0, 0, {0xf8,0x40,0x32,0xc1,0x0e,0xb0,0x0b,0x50,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x94c0, 0, {0xc8,0x05,0x2d,0x80,0x89,0x80,0x22,0xd9,0x08,0x90,0x22,0x2a,0x00,0x88,0x54,0x22 }},
+ {16, 0x94d0, 0, {0xc0,0x8b,0x80,0x22,0x20,0x19,0xc8,0x00,0x22,0x40,0x8d,0x80,0x1a,0x24,0x10,0xd2 }},
+ {16, 0x94e0, 0, {0x44,0x22,0x81,0x0d,0x80,0x03,0x7c,0x00,0xb0,0x00,0x37,0xc0,0x88,0xf0,0x02,0x32 }},
+ {16, 0x94f0, 0, {0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x4e,0x00,0x81,0x00,0xa0,0xf0 }},
+ {16, 0x9500, 0, {0x08,0x90,0x02,0x89,0x02,0x80,0x00,0x22,0xc0,0x0b,0x00,0x22,0xa0,0x00,0xb0,0x00 }},
+ {16, 0x9510, 0, {0x20,0x40,0x08,0x00,0x02,0x04,0x00,0x82,0x60,0x20,0x80,0x08,0x00,0x02,0x0c,0x08 }},
+ {16, 0x9520, 0, {0xb2,0x00,0x22,0xc0,0x08,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9530, 0, {0x20,0x01,0x03,0x10,0x8e,0x90,0x23,0x24,0x08,0x6b,0x02,0x16,0x60,0x8f,0x80,0x21 }},
+ {16, 0x9540, 0, {0x28,0x0b,0xf9,0x06,0x1e,0x40,0x8f,0x80,0x23,0xa4,0x49,0x79,0x02,0x3a,0x40,0x9d }},
+ {16, 0x9550, 0, {0x90,0x23,0x64,0x09,0xf8,0x02,0x5e,0x40,0xbe,0x90,0x24,0xe4,0x28,0x79,0x02,0x08 }},
+ {16, 0x9560, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x42,0xc0,0x09,0x30,0x00 }},
+ {16, 0x9570, 0, {0x28,0x02,0x03,0x84,0x00,0x8a,0x20,0x30,0xc4,0x8b,0x11,0x03,0x84,0x50,0xb3,0x00 }},
+ {16, 0x9580, 0, {0x20,0xc0,0x0c,0xa4,0x22,0x04,0x00,0xcb,0x40,0x30,0xc5,0x0c,0x30,0x03,0x0e,0x40 }},
+ {16, 0x9590, 0, {0xf3,0x10,0x30,0xc4,0x0c,0xb0,0x03,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x95a0, 0, {0x40,0x1d,0xb0,0x04,0xfb,0x04,0x3d,0xc0,0x0f,0xf2,0x43,0xf8,0x04,0xfd,0x01,0x3f }},
+ {16, 0x95b0, 0, {0x0c,0x0f,0x61,0x03,0xf8,0x48,0xf4,0x00,0x3d,0x01,0x0f,0xd0,0x03,0xc8,0x00,0xfc }},
+ {16, 0x95c0, 0, {0x04,0xbd,0x04,0x0b,0x48,0x03,0xfc,0x18,0xff,0x14,0x3f,0xd5,0x0d,0xf0,0x03,0x90 }},
+ {16, 0x95d0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xe0,0x00,0xf9,0x01,0x32,0xc0 }},
+ {16, 0x95e0, 0, {0x8e,0x90,0x03,0x28,0x02,0xd1,0x00,0x32,0xc0,0x0d,0xa8,0x0b,0x08,0x00,0xe8,0x00 }},
+ {16, 0x95f0, 0, {0x2e,0x40,0x0c,0x98,0x0b,0x2e,0x02,0xca,0x00,0xb2,0xa0,0x6c,0x80,0x23,0x2d,0x80 }},
+ {16, 0x9600, 0, {0xca,0x80,0x32,0xd0,0x0c,0xba,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9610, 0, {0x48,0x11,0x9c,0x00,0xb6,0x00,0xa3,0x00,0x08,0x60,0x02,0x04,0x00,0x86,0x04,0x29 }},
+ {16, 0x9620, 0, {0x00,0x08,0x50,0x42,0x14,0x04,0xa7,0x00,0x0d,0x80,0x4a,0x60,0x02,0x00,0x00,0x81 }},
+ {16, 0x9630, 0, {0x00,0x21,0x40,0x08,0x70,0x02,0x9d,0x42,0x86,0x01,0x20,0xc0,0x08,0x32,0x82,0x12 }},
+ {16, 0x9640, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x92,0x00,0xbc,0x80,0x63,0x20 }},
+ {16, 0x9650, 0, {0x82,0x08,0x02,0x52,0x00,0x84,0xc2,0x23,0x20,0x88,0x0c,0x02,0x33,0x00,0x84,0x80 }},
+ {16, 0x9660, 0, {0x2f,0x21,0x89,0x4c,0x02,0x12,0x14,0x94,0xc5,0x64,0x21,0x08,0x4c,0x02,0x0e,0x80 }},
+ {16, 0x9670, 0, {0x97,0x82,0xa1,0xec,0x08,0x79,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9680, 0, {0x48,0x14,0xcd,0x44,0xb3,0x00,0x20,0xc0,0x08,0x30,0x02,0x4d,0x80,0x03,0x88,0x28 }},
+ {16, 0x9690, 0, {0xc0,0x08,0x3c,0x06,0x0f,0x00,0xa3,0x43,0x2c,0xc2,0x1b,0x38,0x02,0x0f,0x00,0x9b }},
+ {16, 0x96a0, 0, {0x88,0x64,0xd0,0x08,0xb8,0x02,0x8c,0x10,0x93,0x00,0x20,0xc0,0x08,0x30,0x0a,0x12 }},
+ {16, 0x96b0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xaa,0x00,0xfa,0x05,0x32,0x80 }},
+ {16, 0x96c0, 0, {0x8e,0xa0,0x0b,0x69,0x00,0xca,0x40,0x32,0xa0,0x3c,0xa8,0x03,0x2a,0x00,0xea,0x26 }},
+ {16, 0x96d0, 0, {0x3e,0xb0,0x0d,0xa1,0x63,0x28,0x20,0xca,0x40,0x36,0xa0,0x0c,0xe0,0x13,0x28,0x09 }},
+ {16, 0x96e0, 0, {0xde,0x00,0x32,0x80,0x2c,0xa0,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x96f0, 0, {0x48,0x00,0xf0,0x20,0xf4,0x00,0x3f,0x00,0x0f,0x40,0x23,0xb0,0x00,0xec,0x00,0x3f }},
+ {16, 0x9700, 0, {0x06,0x1e,0xc2,0x13,0xf0,0x88,0xfc,0x20,0x3f,0x04,0x8e,0xc0,0x03,0xf0,0x80,0xec }},
+ {16, 0x9710, 0, {0x40,0x3b,0x0c,0x0f,0xc0,0xa3,0xe0,0x00,0xe8,0x00,0x3e,0x00,0x4f,0x80,0x03,0xd2 }},
+ {16, 0x9720, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x00,0xf9,0x00,0x32,0x40 }},
+ {16, 0x9730, 0, {0x0c,0x90,0x03,0x24,0x00,0xc9,0x80,0x32,0x40,0x0f,0x90,0x53,0xe4,0x10,0xc9,0x00 }},
+ {16, 0x9740, 0, {0x32,0x40,0x0d,0x90,0x03,0xe4,0x00,0xf9,0x00,0x36,0x40,0x8f,0x90,0x03,0x24,0x10 }},
+ {16, 0x9750, 0, {0xc9,0x01,0x3c,0x40,0x0c,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9760, 0, {0x80,0x04,0x47,0x44,0x89,0x00,0x20,0x40,0x08,0x90,0x02,0x25,0x0a,0x81,0x10,0x22 }},
+ {16, 0x9770, 0, {0x40,0x48,0x90,0x03,0xc4,0x00,0x89,0x00,0x76,0x40,0x28,0x90,0x02,0xe4,0x10,0xb9 }},
+ {16, 0x9780, 0, {0x40,0xb2,0x40,0x0b,0x90,0x03,0x64,0x00,0x89,0x00,0x2e,0x41,0x08,0x90,0x42,0xe0 }},
+ {16, 0x9790, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x24,0x02,0xbd,0x00,0x23,0x48 }},
+ {16, 0x97a0, 0, {0x08,0xd0,0x06,0x1d,0x04,0x8d,0x00,0x29,0xc0,0x4a,0xd0,0x22,0xf4,0x00,0x85,0x00 }},
+ {16, 0x97b0, 0, {0x61,0x40,0x18,0xd0,0x12,0xfc,0x00,0xbd,0x40,0xa3,0x40,0x4b,0xf0,0x02,0x04,0x01 }},
+ {16, 0x97c0, 0, {0x8b,0x00,0x2e,0x40,0x08,0x90,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x97d0, 0, {0x08,0x04,0x36,0x80,0x85,0x20,0xa3,0x48,0x08,0x52,0x0a,0x14,0x81,0x85,0x20,0x29 }},
+ {16, 0x97e0, 0, {0x48,0x08,0x52,0x02,0xb4,0x80,0x85,0x20,0x25,0x48,0x88,0x52,0x02,0xd4,0x80,0xb5 }},
+ {16, 0x97f0, 0, {0x20,0x21,0x48,0x0b,0x52,0x02,0x44,0xa2,0x81,0x00,0x2c,0x4a,0x08,0x12,0x82,0xc2 }},
+ {16, 0x9800, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xf8,0x51,0x22,0x00 }},
+ {16, 0x9810, 0, {0x2c,0x85,0x02,0x21,0x48,0xc8,0x00,0xba,0x14,0x0f,0x85,0x12,0xe1,0x42,0xc8,0x50 }},
+ {16, 0x9820, 0, {0x22,0x00,0x0c,0x00,0x03,0xe0,0x00,0xf8,0x50,0x32,0x00,0x07,0x45,0x03,0x20,0x80 }},
+ {16, 0x9830, 0, {0xc0,0x01,0x3e,0x08,0x2c,0x82,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9840, 0, {0x98,0x0d,0xe4,0x40,0xf1,0x10,0x3e,0x44,0x07,0x91,0x43,0xe4,0x58,0xf9,0x11,0x34 }},
+ {16, 0x9850, 0, {0x44,0x4f,0x91,0x02,0xe4,0x50,0xf9,0x10,0x3c,0x4f,0x0f,0x93,0x83,0xe4,0xf0,0xf9 }},
+ {16, 0x9860, 0, {0x11,0x3a,0x4f,0x0f,0x91,0x03,0xe4,0xa0,0xfd,0x28,0x3e,0x4a,0x0f,0x92,0x83,0xe6 }},
+ {16, 0x9870, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0xa0,0xcd,0xa0,0xb3,0x68 }},
+ {16, 0x9880, 0, {0x8c,0x9a,0x03,0x36,0x80,0xc5,0xa0,0x22,0x60,0x0c,0x9a,0x23,0x26,0x04,0xf9,0xa0 }},
+ {16, 0x9890, 0, {0x32,0x66,0x0c,0x9a,0x83,0x06,0x20,0xc5,0xa0,0x22,0x60,0x0c,0x9b,0x03,0x26,0x48 }},
+ {16, 0x98a0, 0, {0xc9,0x00,0x3e,0x78,0x0c,0x9a,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x98b0, 0, {0x38,0x00,0xe1,0x00,0x88,0x44,0x22,0x95,0x08,0x85,0x12,0xa1,0x42,0x88,0x40,0x02 }},
+ {16, 0x98c0, 0, {0x90,0x08,0x84,0x02,0x23,0xa0,0xba,0x40,0x22,0xa0,0x08,0x8e,0x92,0xa3,0xa0,0xa8 }},
+ {16, 0x98d0, 0, {0x40,0x2a,0x10,0x08,0xae,0x02,0x23,0x40,0x88,0x00,0x2e,0x38,0x08,0x84,0x12,0x0e }},
+ {16, 0x98e0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x15,0xc4,0x00,0x8b,0x12,0x22,0x40 }},
+ {16, 0x98f0, 0, {0x08,0x90,0x02,0x44,0x00,0x81,0x40,0xa0,0x50,0x08,0x11,0x0a,0x05,0x00,0xb1,0x10 }},
+ {16, 0x9900, 0, {0xa0,0x48,0x08,0x90,0x02,0x04,0x00,0x81,0x40,0x20,0x50,0x28,0x11,0x02,0x44,0x82 }},
+ {16, 0x9910, 0, {0x81,0x00,0x2c,0x50,0x08,0x11,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9920, 0, {0x18,0x15,0xa4,0x02,0x89,0x40,0x22,0x40,0x08,0x94,0x12,0xa5,0x00,0x89,0x28,0x22 }},
+ {16, 0x9930, 0, {0x49,0x08,0x94,0x02,0x24,0x48,0xb9,0x14,0x22,0x40,0x08,0x94,0x02,0xa4,0x40,0xa1 }},
+ {16, 0x9940, 0, {0x50,0x2a,0x50,0x08,0x91,0x42,0x64,0x00,0x89,0x40,0x2e,0x40,0x08,0x10,0x02,0x06 }},
+ {16, 0x9950, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x00,0xc9,0x00,0x30,0x70 }},
+ {16, 0x9960, 0, {0x2c,0x10,0x0b,0x66,0x00,0xc9,0x40,0x32,0x50,0x0c,0x90,0x03,0x26,0x20,0xf9,0xc0 }},
+ {16, 0x9970, 0, {0x32,0x70,0x0c,0x90,0x03,0x26,0x20,0xc9,0x00,0x32,0x40,0x0c,0x9c,0x03,0x64,0x00 }},
+ {16, 0x9980, 0, {0xc9,0x41,0x3e,0x40,0x2c,0x90,0x0b,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9990, 0, {0x28,0x01,0xa4,0x00,0xf9,0x04,0x3e,0x48,0x0f,0x90,0x03,0xe4,0x88,0xf9,0x00,0x34 }},
+ {16, 0x99a0, 0, {0x41,0x2f,0x9c,0x03,0xe4,0x10,0xf9,0x00,0x3e,0x44,0x2f,0x99,0x03,0xe4,0x10,0xf9 }},
+ {16, 0x99b0, 0, {0x00,0x3e,0x50,0x0f,0x10,0x4b,0xa4,0x10,0xf9,0x20,0x3c,0x40,0x0f,0x90,0x03,0x4a }},
+ {16, 0x99c0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x00,0xc8,0x00,0x3e,0x10 }},
+ {16, 0x99d0, 0, {0x2c,0x80,0x03,0x20,0x02,0xc0,0x40,0x32,0x00,0x1c,0x04,0x0f,0x21,0x00,0xc0,0x04 }},
+ {16, 0x99e0, 0, {0x38,0x00,0x0f,0x80,0x03,0x21,0x08,0xc8,0x60,0x30,0x10,0x0f,0x80,0x02,0x20,0x00 }},
+ {16, 0x99f0, 0, {0xf8,0x00,0x32,0x00,0x0c,0x80,0x03,0xca,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9a00, 0, {0x28,0x05,0x1a,0x20,0x82,0x04,0x2f,0x80,0x08,0xa0,0x02,0x38,0x00,0x8e,0x80,0x22 }},
+ {16, 0x9a10, 0, {0x80,0x08,0xe0,0x02,0x28,0x00,0x8a,0x00,0x22,0x81,0x0b,0x20,0x02,0x28,0x00,0xde }},
+ {16, 0x9a20, 0, {0xe4,0x36,0x80,0x0b,0xa0,0x42,0x28,0x00,0xba,0x04,0x22,0x80,0x08,0xa0,0x02,0xca }},
+ {16, 0x9a30, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x83,0x01,0x2c,0x80 }},
+ {16, 0x9a40, 0, {0x08,0x30,0x02,0x2e,0x60,0x82,0x90,0xa0,0xc0,0x48,0x30,0x02,0x0c,0x02,0x83,0x00 }},
+ {16, 0x9a50, 0, {0x28,0xc0,0x0b,0x30,0x0a,0x2c,0x00,0x83,0xc2,0x20,0xc0,0x0b,0x30,0x2a,0x2c,0x00 }},
+ {16, 0x9a60, 0, {0xb3,0x00,0xa0,0xc0,0x08,0x30,0x02,0xca,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9a70, 0, {0xa0,0x01,0x3c,0x00,0x87,0x01,0x2d,0xc2,0x08,0xf3,0x12,0x3c,0x00,0x8f,0x01,0x21 }},
+ {16, 0x9a80, 0, {0xc8,0x68,0x72,0x22,0x1e,0x04,0x87,0x20,0x21,0xc4,0x0b,0x70,0x02,0x3c,0x84,0x9f }},
+ {16, 0x9a90, 0, {0x00,0x25,0xc4,0x4b,0x70,0x02,0x1c,0x04,0xb7,0x81,0x21,0xc8,0x08,0x72,0x02,0xe8 }},
+ {16, 0x9aa0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x00,0x1e,0x00,0xc7,0x81,0x3c,0xa0 }},
+ {16, 0x9ab0, 0, {0x4c,0x7a,0x0b,0x1a,0x00,0xc6,0x80,0x30,0xe0,0x08,0xf8,0x82,0x0e,0x40,0xcf,0xf0 }},
+ {16, 0x9ac0, 0, {0x39,0xe8,0x0f,0x3a,0x03,0x1e,0x20,0xc7,0x80,0x31,0xe3,0x0f,0x38,0x23,0x1f,0x08 }},
+ {16, 0x9ad0, 0, {0xff,0xc0,0x33,0xf2,0x0c,0x7e,0x03,0xea,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9ae0, 0, {0x08,0x15,0x88,0x0a,0x7b,0x00,0x3e,0xc1,0x0b,0x34,0x23,0xc8,0x10,0xfb,0x02,0x3e }},
+ {16, 0x9af0, 0, {0xca,0x0f,0xb7,0x43,0xec,0x80,0xfb,0x00,0x2e,0xc2,0x0b,0xb4,0x83,0xed,0xd0,0xfa }},
+ {16, 0x9b00, 0, {0x00,0x3e,0xd9,0x0f,0xb3,0x83,0xec,0x80,0xbb,0x20,0x3e,0xd8,0x2f,0xb4,0x03,0xc2 }},
+ {16, 0x9b10, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xfe,0x00,0xf5,0x91,0x31,0xa0 }},
+ {16, 0x9b20, 0, {0x0c,0xfc,0x03,0xfe,0x00,0xc4,0x81,0x31,0xee,0x8d,0xf8,0x0a,0x3e,0x30,0xcf,0x84 }},
+ {16, 0x9b30, 0, {0x33,0xe0,0x2c,0xf8,0x83,0xfe,0x10,0xfe,0x80,0x33,0xe0,0x0c,0xf9,0x19,0x3f,0x48 }},
+ {16, 0x9b40, 0, {0xcf,0xc0,0x33,0xe0,0x04,0xfc,0x03,0xc0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9b50, 0, {0xa8,0x11,0x9c,0x08,0xb7,0xa1,0x21,0xc8,0x08,0x71,0x02,0xf0,0xa0,0x85,0x20,0x21 }},
+ {16, 0x9b60, 0, {0xce,0x08,0x70,0x02,0x3c,0x80,0x8f,0x00,0x2b,0xc5,0x08,0x71,0x02,0xdc,0x10,0xb4 }},
+ {16, 0x9b70, 0, {0x00,0x21,0xc1,0x0a,0xf3,0x82,0x0c,0x00,0x87,0x01,0x29,0xc0,0x08,0x71,0x02,0x6a }},
+ {16, 0x9b80, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9d,0x00,0xbd,0x21,0x27,0x82 }},
+ {16, 0x9b90, 0, {0x00,0x70,0x02,0xfc,0x04,0x8c,0x00,0xa7,0xcc,0xa8,0x70,0x02,0x3c,0x08,0xaf,0x00 }},
+ {16, 0x9ba0, 0, {0x21,0xc0,0x08,0x70,0x02,0xdc,0x00,0xb7,0x00,0x21,0xc4,0x08,0x70,0x16,0x1c,0x0a }},
+ {16, 0x9bb0, 0, {0x8f,0x00,0x21,0xc0,0x08,0x70,0x02,0xc0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9bc0, 0, {0x20,0x10,0xc8,0x00,0xbb,0x44,0x24,0xe2,0x08,0xb1,0x02,0xc2,0x80,0x01,0x80,0x24 }},
+ {16, 0x9bd0, 0, {0xd0,0x88,0x30,0x02,0x0f,0x52,0x83,0x91,0x28,0xe4,0x88,0x3d,0x02,0xce,0xd0,0xb0 }},
+ {16, 0x9be0, 0, {0xb2,0xa2,0xc0,0x0a,0x34,0x12,0x0c,0x02,0x83,0x00,0x28,0xc0,0x08,0x30,0x02,0x48 }},
+ {16, 0x9bf0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xac,0x00,0xfb,0x01,0xe4,0x40 }},
+ {16, 0x9c00, 0, {0x2c,0xf0,0x43,0xe5,0x00,0x8a,0x88,0x37,0xe0,0x00,0xfa,0x02,0x3d,0x00,0xef,0x00 }},
+ {16, 0x9c10, 0, {0x33,0xd1,0x0c,0xf4,0x03,0xfd,0x00,0xf9,0x40,0x33,0xe8,0x0c,0xfc,0x01,0x3c,0x04 }},
+ {16, 0x9c20, 0, {0xcf,0x02,0x33,0xc0,0x2c,0xf0,0x03,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9c30, 0, {0x80,0x00,0xee,0x08,0xf9,0x10,0x3a,0xd0,0x0f,0xb0,0x93,0xec,0x00,0xfb,0x0b,0x3a }},
+ {16, 0x9c40, 0, {0xc0,0x8e,0xb0,0x83,0xec,0x80,0xfb,0x09,0x7e,0xc8,0x0f,0xb2,0x13,0xec,0x00,0xf9 }},
+ {16, 0x9c50, 0, {0x00,0x3e,0xc2,0x8f,0xb2,0x4b,0xcc,0x04,0xfb,0x00,0x3e,0xc0,0x0f,0xb0,0x03,0x60 }},
+ {16, 0x9c60, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0xff,0x08,0x33,0xc0 }},
+ {16, 0x9c70, 0, {0x1c,0xf0,0x03,0x70,0x40,0xc4,0xc0,0x33,0xc2,0x0f,0xf0,0x03,0x1c,0x10,0xc7,0x00 }},
+ {16, 0x9c80, 0, {0x31,0xc0,0x0c,0x70,0x03,0x1c,0x00,0xc5,0x41,0x33,0xc0,0x0c,0xf0,0x23,0x2c,0x00 }},
+ {16, 0x9c90, 0, {0xcf,0x00,0xb3,0xc0,0x6c,0xf0,0x03,0x80,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9ca0, 0, {0x81,0x04,0x6a,0x00,0xb9,0x90,0x32,0xf1,0x08,0xb0,0x02,0x0a,0x10,0xd9,0x00,0x22 }},
+ {16, 0x9cb0, 0, {0xc1,0x0b,0xb0,0x02,0x2c,0x00,0xcb,0x06,0x22,0xc0,0x88,0xb0,0x12,0x2c,0x00,0x88 }},
+ {16, 0x9cc0, 0, {0x80,0x22,0xc1,0x0d,0xb0,0x02,0x2c,0x00,0x83,0x00,0x22,0xc1,0x08,0xb0,0x46,0xe0 }},
+ {16, 0x9cd0, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x2e,0x00,0xb9,0x00,0x22,0xf0 }},
+ {16, 0x9ce0, 0, {0x08,0xb0,0x12,0x64,0x00,0x8a,0x00,0x22,0xc0,0x0b,0x30,0x42,0x2c,0x00,0x8b,0x00 }},
+ {16, 0x9cf0, 0, {0x22,0xc0,0x08,0xb0,0x02,0x2c,0x00,0x8a,0x00,0x22,0xc0,0x88,0x30,0x0a,0x2c,0x00 }},
+ {16, 0x9d00, 0, {0x8b,0x00,0x20,0xc0,0x08,0xb0,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9d10, 0, {0x08,0x04,0x0c,0x04,0xb1,0x02,0xe4,0xc1,0x08,0xb0,0x22,0x20,0x02,0x93,0x00,0x20 }},
+ {16, 0x9d20, 0, {0xc0,0x0b,0x30,0x12,0x0c,0x02,0x83,0x02,0xa0,0xc0,0x28,0x30,0x0e,0x0c,0x02,0x80 }},
+ {16, 0x9d30, 0, {0x00,0xa0,0xc0,0x49,0x30,0x0a,0x0c,0x02,0x8b,0x00,0x20,0xc0,0x08,0x30,0x02,0xc2 }},
+ {16, 0x9d40, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xf9,0x24,0x32,0xc0 }},
+ {16, 0x9d50, 0, {0x08,0xf0,0x03,0x64,0x00,0xc8,0x00,0xb3,0xc0,0x1f,0xf0,0x0b,0x3c,0x00,0x8f,0x00 }},
+ {16, 0x9d60, 0, {0x33,0xc0,0x4c,0xf0,0x43,0x3c,0x08,0xc3,0x00,0x31,0xc0,0x0c,0xf0,0x03,0x3d,0x48 }},
+ {16, 0x9d70, 0, {0xcf,0x00,0x31,0xc0,0x0c,0xf0,0x03,0x80,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9d80, 0, {0xa0,0x1d,0xf0,0x04,0xf9,0x41,0x3b,0xc0,0x4f,0xf0,0x03,0xf0,0x11,0xfd,0x00,0x3f }},
+ {16, 0x9d90, 0, {0xc0,0x87,0x70,0x27,0xfc,0x00,0xef,0x06,0x3f,0xc0,0x0f,0xf0,0x02,0xfc,0x08,0xfc }},
+ {16, 0x9da0, 0, {0x00,0x3f,0xc0,0x47,0xf0,0x43,0xfc,0x00,0x77,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xe8 }},
+ {16, 0x9db0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xd2,0x00,0xc7,0x01,0x37,0x0c }},
+ {16, 0x9dc0, 0, {0x0f,0xe8,0x23,0x10,0x4a,0xc4,0xc0,0x31,0x30,0x0c,0xc9,0x03,0x34,0x46,0xcf,0x10 }},
+ {16, 0x9dd0, 0, {0x33,0xd0,0x0c,0xf4,0x03,0x3c,0x58,0xcf,0x00,0x33,0xc0,0x2d,0xf1,0x03,0x3e,0x02 }},
+ {16, 0x9de0, 0, {0xcf,0x21,0x3f,0xe4,0x0f,0xf2,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9df0, 0, {0x80,0x10,0xe4,0x84,0x0b,0x40,0x22,0x4c,0x0b,0xa8,0x02,0x2c,0xc0,0x8b,0x20,0x22 }},
+ {16, 0x9e00, 0, {0xc8,0x4a,0x32,0x02,0x24,0x80,0x83,0x20,0x20,0xc0,0x08,0x30,0x02,0x20,0x00,0x8b }},
+ {16, 0x9e10, 0, {0x21,0x32,0xca,0x48,0x32,0x02,0x2c,0x30,0x8f,0x90,0x2e,0x88,0x0b,0xbd,0x12,0x20 }},
+ {16, 0x9e20, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xce,0x20,0xa3,0x40,0xe0,0x48 }},
+ {16, 0x9e30, 0, {0x4b,0x20,0x22,0x0c,0x02,0x82,0x00,0x2a,0x00,0x08,0x20,0x02,0x04,0x80,0x80,0x20 }},
+ {16, 0x9e40, 0, {0x20,0xc8,0x08,0x02,0x02,0x0c,0x00,0x80,0x0c,0x60,0x00,0x08,0x20,0x12,0x2c,0x88 }},
+ {16, 0x9e50, 0, {0x83,0x00,0x2c,0xe8,0x0b,0x30,0x02,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9e60, 0, {0xc0,0x15,0xae,0x00,0xab,0x01,0xa2,0x60,0x0b,0xa0,0x02,0x20,0x01,0x81,0x00,0x22 }},
+ {16, 0x9e70, 0, {0xc0,0x0a,0x90,0x12,0x04,0x20,0x8a,0x08,0x22,0xc1,0x08,0xa0,0x02,0x28,0x00,0x88 }},
+ {16, 0x9e80, 0, {0x00,0x24,0x44,0x08,0xa2,0x02,0xac,0x00,0x8b,0x04,0x2e,0x88,0x03,0xb0,0x02,0x70 }},
+ {16, 0x9e90, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0xec,0x00,0xea,0x90,0x32,0x28 }},
+ {16, 0x9ea0, 0, {0x0f,0xb6,0x03,0x20,0x08,0xc9,0x04,0x3a,0xc0,0x4c,0x90,0x22,0x24,0x00,0xcb,0x40 }},
+ {16, 0x9eb0, 0, {0x32,0xa8,0x0c,0xb2,0x03,0x2c,0x00,0xcb,0x80,0xb2,0xe0,0x0c,0xb0,0x0b,0x04,0x00 }},
+ {16, 0x9ec0, 0, {0xcb,0x00,0x3e,0xc0,0x4f,0xb0,0x0b,0x50,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9ed0, 0, {0xe0,0x01,0xbc,0x00,0xdf,0x80,0x3b,0x81,0x0f,0xf0,0xc3,0xfc,0x00,0xbe,0x01,0x1f }},
+ {16, 0x9ee0, 0, {0x00,0x0f,0xe0,0x23,0xf4,0x00,0xff,0x00,0x3f,0xb0,0x4f,0xf0,0x43,0xd4,0x02,0xff }},
+ {16, 0x9ef0, 0, {0x91,0x3a,0xe0,0x4e,0xf0,0x03,0x7c,0x0c,0xff,0x00,0x2f,0x80,0x0f,0x30,0x03,0xb8 }},
+ {16, 0x9f00, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xac,0x01,0xca,0x00,0x72,0x50 }},
+ {16, 0x9f10, 0, {0x04,0xb4,0x03,0x2c,0x82,0xcb,0x00,0x32,0xe0,0x0c,0xb8,0x03,0x27,0x04,0xc8,0xc8 }},
+ {16, 0x9f20, 0, {0xb2,0xa2,0x0c,0x88,0x03,0x2c,0x00,0xc1,0x00,0x3e,0x00,0x2c,0x30,0x1b,0x2c,0x04 }},
+ {16, 0x9f30, 0, {0xfb,0x10,0x3e,0xc0,0x0f,0xb0,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9f40, 0, {0xc8,0x05,0x2c,0x04,0x03,0x50,0xa2,0xe0,0x08,0x34,0x42,0x33,0x00,0x88,0x00,0x20 }},
+ {16, 0x9f50, 0, {0x10,0x0d,0x84,0x03,0x25,0x00,0x8a,0x40,0x22,0x90,0x08,0xa5,0x02,0x2c,0x00,0x89 }},
+ {16, 0x9f60, 0, {0xa4,0x3a,0x40,0x08,0xb0,0x02,0x2c,0x00,0xbf,0x84,0x2e,0x80,0x0b,0xf0,0x52,0x32 }},
+ {16, 0x9f70, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x6c,0x80,0x81,0x80,0x24,0x88 }},
+ {16, 0x9f80, 0, {0x89,0x3c,0x26,0x21,0x00,0x90,0x00,0x20,0x02,0x08,0x80,0x82,0x00,0x20,0x9b,0x00 }},
+ {16, 0x9f90, 0, {0x22,0x40,0x88,0xb0,0x12,0x0c,0x08,0x83,0x80,0x2c,0xc0,0x08,0x10,0x02,0x0c,0x00 }},
+ {16, 0x9fa0, 0, {0xb3,0x80,0x2c,0x40,0x0b,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0x9fb0, 0, {0x20,0x01,0x3e,0x0a,0x85,0xa0,0xa5,0x60,0x08,0xfb,0x82,0x3e,0x84,0x9f,0x81,0x63 }},
+ {16, 0x9fc0, 0, {0xe0,0x89,0x79,0x12,0x52,0x80,0x97,0x82,0x21,0x6c,0x18,0x78,0x02,0x12,0x00,0x87 }},
+ {16, 0x9fd0, 0, {0xa1,0x29,0xe0,0x08,0x5b,0x02,0x1e,0x00,0xb7,0xc0,0x2d,0x60,0x0b,0x78,0x02,0x08 }},
+ {16, 0x9fe0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x0c,0x00,0x81,0x08,0x26,0xc2 }},
+ {16, 0x9ff0, 0, {0x2c,0x32,0x13,0x0e,0xa4,0xd2,0x00,0xb0,0x00,0x1c,0x21,0x12,0x24,0x02,0xd1,0x20 }},
+ {16, 0xa000, 0, {0x30,0xc8,0x0c,0x10,0x03,0x0c,0x00,0xc2,0x10,0x3c,0x80,0x0c,0x23,0x03,0x0c,0x40 }},
+ {16, 0xa010, 0, {0xf3,0x00,0x3c,0x48,0x0f,0x30,0x0b,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa020, 0, {0x40,0x1d,0xbc,0x00,0xfd,0x20,0xbb,0x40,0x07,0x72,0x02,0xf0,0x10,0xed,0x10,0x3f }},
+ {16, 0xa030, 0, {0xc4,0x0f,0xd1,0x63,0xb4,0x80,0xef,0x00,0x3f,0xc8,0x0f,0xf0,0x03,0xd8,0x00,0xfe }},
+ {16, 0xa040, 0, {0x34,0x3f,0xc4,0x0f,0xeb,0x43,0xfc,0x00,0xff,0x08,0x7f,0x40,0x0f,0xf1,0x83,0xd0 }},
+ {16, 0xa050, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xec,0x00,0xc8,0x00,0x33,0x80 }},
+ {16, 0xa060, 0, {0x8f,0x28,0x03,0x20,0x00,0x49,0x02,0x32,0xc0,0x0f,0x90,0x03,0x20,0x00,0xcb,0x00 }},
+ {16, 0xa070, 0, {0x32,0x40,0x4c,0xb0,0x0b,0x2c,0x00,0xcb,0x80,0x32,0xc0,0x0e,0x9e,0x03,0x24,0x00 }},
+ {16, 0xa080, 0, {0xfb,0x20,0x3e,0xc0,0x0f,0xb0,0x03,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa090, 0, {0x48,0x11,0x9c,0x00,0x8d,0x01,0x21,0xc0,0x0b,0x60,0x02,0x1d,0x00,0xd6,0x00,0x21 }},
+ {16, 0xa0a0, 0, {0x00,0x0b,0xe0,0x02,0x00,0x00,0x83,0x04,0x20,0x40,0x08,0x70,0x42,0x34,0x02,0x87 }},
+ {16, 0xa0b0, 0, {0x01,0x23,0xc0,0x28,0x51,0x0a,0x1c,0x04,0xb7,0x30,0x2d,0xc0,0x0b,0x72,0x03,0x92 }},
+ {16, 0xa0c0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x9e,0x00,0xa6,0x40,0x21,0xa0 }},
+ {16, 0xa0d0, 0, {0x0b,0x68,0x02,0x0e,0x00,0x8f,0x80,0x21,0xe0,0x0b,0x78,0x02,0x16,0x10,0xa5,0x80 }},
+ {16, 0xa0e0, 0, {0x21,0xe0,0x08,0x18,0x02,0x1e,0x00,0x83,0x80,0x21,0xa0,0x08,0x78,0x02,0x1f,0x00 }},
+ {16, 0xa0f0, 0, {0xb7,0x80,0x2d,0xe0,0x0b,0x38,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa100, 0, {0x48,0x14,0xec,0x12,0xa1,0x64,0x20,0xe6,0x0b,0x20,0x02,0x00,0x10,0x90,0x4a,0x20 }},
+ {16, 0xa110, 0, {0x20,0x4b,0x00,0x42,0x04,0x00,0x83,0x00,0x20,0xc2,0x08,0x30,0x02,0x8c,0x00,0x83 }},
+ {16, 0xa120, 0, {0x04,0x20,0xc0,0x08,0x30,0x02,0x0e,0x00,0xb3,0x00,0x2c,0xe0,0x4b,0x30,0x02,0x92 }},
+ {16, 0xa130, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb8,0x00,0xee,0xc0,0x33,0x90 }},
+ {16, 0xa140, 0, {0x0f,0xa0,0x1b,0x08,0x00,0xca,0x40,0xb2,0x82,0x0f,0xa0,0x0b,0x28,0x02,0xca,0x00 }},
+ {16, 0xa150, 0, {0xb2,0x90,0xac,0xa0,0x03,0x29,0x00,0xca,0x40,0xb2,0x80,0x8e,0xa4,0x03,0x2a,0x00 }},
+ {16, 0xa160, 0, {0xfa,0x00,0x3f,0xa8,0x0f,0xa0,0x0b,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa170, 0, {0x48,0x00,0xe2,0x02,0x90,0x00,0x3e,0x00,0x0f,0x88,0x03,0xf1,0x00,0xfc,0x02,0x3f }},
+ {16, 0xa180, 0, {0x20,0x0f,0xc8,0x03,0xc1,0x00,0xf0,0x00,0x3e,0x00,0x8f,0x00,0x01,0x60,0x02,0xf8 }},
+ {16, 0xa190, 0, {0x08,0x3e,0x00,0x0f,0x80,0x83,0xe0,0x00,0xf8,0x00,0x2e,0x00,0x8f,0x80,0x13,0x92 }},
+ {16, 0xa1a0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x02,0xc9,0x00,0xb2,0x64 }},
+ {16, 0xa1b0, 0, {0x0f,0x91,0x03,0xe4,0x04,0xc9,0x00,0x32,0x40,0x6c,0x90,0x03,0x25,0x02,0xc9,0x90 }},
+ {16, 0xa1c0, 0, {0xb0,0x40,0x0c,0x90,0x03,0x24,0x20,0xc9,0xa0,0x3e,0x40,0x4c,0x90,0x23,0xe4,0x00 }},
+ {16, 0xa1d0, 0, {0xf1,0x00,0x92,0x40,0x0c,0x10,0x03,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa1e0, 0, {0x80,0x04,0x64,0x00,0x89,0x80,0xa2,0x40,0x0b,0x96,0x42,0xe5,0x04,0x89,0x00,0x22 }},
+ {16, 0xa1f0, 0, {0x40,0x08,0x90,0x02,0x24,0x08,0x09,0x41,0x22,0x40,0x48,0x90,0x42,0x24,0x04,0x89 }},
+ {16, 0xa200, 0, {0x80,0x26,0x40,0x08,0x90,0x02,0xe4,0x00,0xb9,0x00,0x22,0x40,0x08,0x94,0x02,0x20 }},
+ {16, 0xa210, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x25,0x00,0x89,0x20,0x22,0x40 }},
+ {16, 0xa220, 0, {0x0b,0x90,0x02,0xf4,0x84,0x85,0x00,0x21,0x40,0x48,0x50,0x02,0x24,0x20,0x8d,0x08 }},
+ {16, 0xa230, 0, {0x23,0x40,0x08,0xd0,0x02,0x94,0x00,0x8d,0x00,0x29,0x40,0x0a,0xd0,0x02,0xa4,0x08 }},
+ {16, 0xa240, 0, {0xb9,0x00,0x28,0x40,0x18,0x90,0xc2,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa250, 0, {0x08,0x04,0x05,0x00,0x81,0x00,0x20,0x51,0x0b,0x10,0x02,0xf5,0x80,0x85,0xc1,0xa1 }},
+ {16, 0xa260, 0, {0x50,0x08,0x54,0x0a,0x05,0x06,0x85,0x40,0x21,0x50,0x88,0x54,0x02,0x95,0x00,0x85 }},
+ {16, 0xa270, 0, {0x44,0x2d,0x50,0x2a,0x54,0x12,0xc5,0x01,0xb1,0x00,0x08,0x50,0x08,0x10,0x02,0x02 }},
+ {16, 0xa280, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xca,0x50,0x32,0x80 }},
+ {16, 0xa290, 0, {0x0f,0x80,0x03,0xe8,0x02,0xc8,0x01,0x32,0x00,0x2c,0xc0,0x03,0x20,0x00,0xc8,0x02 }},
+ {16, 0xa2a0, 0, {0x32,0x00,0x2c,0x80,0x0b,0xa0,0x00,0xc8,0x00,0x3a,0x00,0x4e,0x40,0x23,0xa0,0x08 }},
+ {16, 0xa2b0, 0, {0xf8,0x00,0x3a,0x00,0x2c,0x80,0x0b,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa2c0, 0, {0x98,0x1d,0xdc,0x04,0xfd,0x40,0x3f,0x50,0x4f,0x90,0x63,0xe4,0x40,0xf1,0x02,0x3e }},
+ {16, 0xa2d0, 0, {0x41,0x0f,0x90,0x13,0xf5,0x04,0xf9,0x41,0x3e,0x50,0x0f,0x94,0x43,0x65,0x02,0xf9 }},
+ {16, 0xa2e0, 0, {0x41,0x36,0x50,0x4d,0x94,0x03,0xf4,0x00,0xf9,0x41,0x37,0x40,0x4f,0x94,0x03,0xe6 }},
+ {16, 0xa2f0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0xfc,0x00,0xcd,0xa8,0x33,0x70 }},
+ {16, 0xa300, 0, {0x0f,0xd0,0x13,0xf6,0x88,0xcd,0x00,0x32,0x50,0x4f,0x14,0x23,0x07,0xa0,0xc9,0xc0 }},
+ {16, 0xa310, 0, {0x32,0x78,0x0c,0x9e,0x03,0x37,0x02,0xcd,0xc0,0x32,0x64,0x0f,0x98,0x03,0x24,0x00 }},
+ {16, 0xa320, 0, {0xcd,0x00,0x32,0x40,0x2c,0xda,0x03,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa330, 0, {0x38,0x10,0xe2,0x08,0x88,0xeb,0x22,0x30,0x0b,0x80,0x12,0xe8,0x04,0xa0,0xa0,0x2a }},
+ {16, 0xa340, 0, {0x20,0x0b,0x8a,0x0a,0x23,0x00,0x88,0x80,0x22,0x28,0x00,0xc8,0x42,0x23,0x80,0x80 }},
+ {16, 0xa350, 0, {0xd4,0x20,0x28,0x09,0x80,0x02,0x22,0x94,0xa8,0x00,0x2a,0x00,0x88,0x85,0x02,0x0e }},
+ {16, 0xa360, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xc4,0xa0,0x83,0x00,0x24,0xd8 }},
+ {16, 0xa370, 0, {0x8b,0x10,0x02,0xe5,0x14,0x89,0x0a,0x21,0x48,0x0b,0x52,0x02,0x54,0x80,0x85,0x40 }},
+ {16, 0xa380, 0, {0x25,0x58,0x09,0x56,0x02,0x45,0x02,0x81,0x20,0x20,0x50,0x0b,0x14,0x02,0x04,0x30 }},
+ {16, 0xa390, 0, {0x81,0x00,0x20,0x40,0x08,0x10,0x02,0x42,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa3a0, 0, {0x18,0x15,0xa4,0x12,0x89,0x00,0xa6,0x40,0x0b,0x90,0x42,0xe4,0x98,0xa9,0x80,0x2b }},
+ {16, 0xa3b0, 0, {0x40,0x0b,0x51,0x02,0x55,0x00,0x9d,0x08,0x27,0x48,0x09,0xf6,0x02,0x44,0x00,0x81 }},
+ {16, 0xa3c0, 0, {0x04,0x22,0x40,0x19,0x91,0x8a,0x24,0x80,0xa9,0x00,0x2a,0x40,0x08,0x90,0x02,0x46 }},
+ {16, 0xa3d0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe7,0x02,0xc9,0x04,0x36,0x58 }},
+ {16, 0xa3e0, 0, {0x0f,0x90,0x03,0xc5,0x00,0xc9,0x00,0x32,0x40,0x0f,0x90,0x13,0x64,0x02,0xc9,0x00 }},
+ {16, 0xa3f0, 0, {0x36,0x40,0x2d,0x90,0x0b,0x66,0x04,0xc9,0xe0,0xb2,0x48,0x8f,0x98,0x47,0x24,0x00 }},
+ {16, 0xa400, 0, {0xc9,0x00,0x72,0x40,0x0c,0x10,0x03,0x68,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa410, 0, {0x28,0x01,0xa5,0x08,0xf9,0x21,0x3a,0x40,0x0f,0x90,0x03,0xe6,0x04,0xf9,0x00,0x3e }},
+ {16, 0xa420, 0, {0x40,0x4f,0x98,0x83,0xa4,0x00,0xe9,0x40,0xba,0x60,0x0e,0x90,0x03,0xa4,0x80,0xf9 }},
+ {16, 0xa430, 0, {0xa3,0x3e,0x48,0x0f,0x98,0x0b,0xe4,0x00,0xf9,0x00,0x1e,0x40,0x0f,0x90,0x03,0x8a }},
+ {16, 0xa440, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa2,0x48,0xc8,0x20,0x32,0x08 }},
+ {16, 0xa450, 0, {0x1f,0x80,0x83,0xe1,0x22,0xc8,0x01,0x33,0x00,0x2c,0xc0,0x03,0x30,0x04,0xcc,0x40 }},
+ {16, 0xa460, 0, {0xb1,0x00,0x0c,0x44,0x03,0x20,0x12,0xc8,0x41,0x32,0x00,0x2d,0x84,0x0b,0x60,0x00 }},
+ {16, 0xa470, 0, {0xf8,0x00,0xb2,0x00,0x4c,0x80,0x0b,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa480, 0, {0x28,0x05,0x3a,0x00,0xa6,0x00,0x23,0x90,0x03,0xe4,0x92,0xf8,0x00,0x82,0x00,0x36 }},
+ {16, 0xa490, 0, {0x80,0x08,0xa0,0x03,0x68,0x00,0xca,0x00,0x22,0x83,0x08,0xa0,0x02,0x28,0x03,0x8a }},
+ {16, 0xa4a0, 0, {0x00,0x22,0x80,0x08,0xa0,0x02,0x28,0x00,0xb6,0x80,0x22,0x80,0x0d,0xe8,0x02,0x0a }},
+ {16, 0xa4b0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x6e,0x00,0x82,0x42,0x20,0xc0 }},
+ {16, 0xa4c0, 0, {0x0b,0x34,0x02,0xcd,0x09,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x02,0x98,0x00 }},
+ {16, 0xa4d0, 0, {0x20,0x20,0x28,0x00,0x0a,0x04,0x10,0x81,0x80,0x20,0xc0,0x08,0xb0,0x02,0x2c,0x00 }},
+ {16, 0xa4e0, 0, {0xb3,0x00,0x22,0xc0,0x18,0x31,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa4f0, 0, {0xa0,0x01,0x38,0x02,0xa3,0x00,0x21,0x40,0x1b,0x70,0x02,0xdc,0x20,0x84,0x05,0x65 }},
+ {16, 0xa500, 0, {0xe0,0x08,0xf0,0x02,0x7c,0x10,0x97,0x00,0x24,0xc0,0x08,0x30,0x02,0x54,0x88,0x87 }},
+ {16, 0xa510, 0, {0x09,0x21,0xe8,0x09,0x33,0x02,0x1c,0x80,0xb6,0x08,0x63,0xc8,0x09,0x38,0x12,0x28 }},
+ {16, 0xa520, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x1e,0x00,0xc7,0xa0,0xa1,0xe0 }},
+ {16, 0xa530, 0, {0x0b,0x78,0x03,0xfe,0x00,0xc5,0x82,0x33,0x20,0x0c,0x48,0x03,0x1e,0x01,0xdf,0x80 }},
+ {16, 0xa540, 0, {0x31,0x20,0x0c,0x48,0x03,0x06,0x40,0x87,0x82,0x31,0xf8,0x0d,0x7b,0x03,0x5f,0x00 }},
+ {16, 0xa550, 0, {0xf3,0x80,0x31,0xf2,0x0c,0x60,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa560, 0, {0x08,0x1d,0x9c,0x00,0xfb,0x01,0x2f,0x40,0x07,0xb0,0x03,0xe8,0x04,0xf9,0x00,0x3e }},
+ {16, 0xa570, 0, {0xc1,0x0f,0xb0,0x03,0xe0,0x06,0xe8,0x02,0x3a,0xc0,0x0f,0xb0,0x01,0xa4,0x10,0xf9 }},
+ {16, 0xa580, 0, {0x40,0xbe,0xd0,0x06,0xb0,0x03,0xee,0x00,0xfa,0x00,0x3c,0xd8,0x0f,0xa0,0x03,0xc2 }},
+ {16, 0xa590, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xf6,0x00,0xcf,0x88,0x33,0x64 }},
+ {16, 0xa5a0, 0, {0x2c,0xf8,0x03,0xfe,0x02,0xc4,0xb0,0x33,0x20,0x8c,0xd8,0x03,0x32,0x00,0xcc,0xb4 }},
+ {16, 0xa5b0, 0, {0x33,0xa0,0x0c,0xc8,0x03,0x16,0x20,0xcf,0xc0,0x33,0xf0,0x0c,0xf8,0x03,0xfe,0x00 }},
+ {16, 0xa5c0, 0, {0xcd,0x80,0x3f,0xe0,0x0f,0xd8,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa5d0, 0, {0xa8,0x11,0xb5,0x04,0x87,0x12,0xa1,0x50,0x0a,0x74,0x12,0xc4,0x40,0x84,0x11,0x23 }},
+ {16, 0xa5e0, 0, {0xc0,0x28,0xe0,0x02,0x1c,0x02,0xa7,0x11,0x21,0x58,0x48,0x70,0x0a,0x14,0x00,0x8d }},
+ {16, 0xa5f0, 0, {0x00,0x23,0xc0,0x0b,0x70,0x02,0xfc,0x40,0x86,0x00,0x2d,0xc0,0x0b,0x50,0x02,0x2a }},
+ {16, 0xa600, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x95,0x00,0x87,0x40,0x21,0x00 }},
+ {16, 0xa610, 0, {0x18,0x71,0x02,0xdc,0x00,0x95,0x28,0xe1,0x02,0x08,0x50,0x02,0x3c,0x42,0xa7,0x22 }},
+ {16, 0xa620, 0, {0x21,0x80,0x88,0x41,0x02,0x14,0x00,0x85,0x00,0xa1,0xc0,0x09,0x71,0x02,0xdc,0x00 }},
+ {16, 0xa630, 0, {0xb5,0x10,0x2d,0xc0,0x0b,0x40,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa640, 0, {0x20,0x14,0xc4,0x10,0x83,0x84,0x20,0x11,0x08,0x30,0x02,0xc3,0x10,0x91,0x20,0x20 }},
+ {16, 0xa650, 0, {0xc0,0x08,0x28,0x12,0x00,0x00,0xa0,0x84,0x20,0x40,0x08,0x30,0x02,0x04,0x26,0x83 }},
+ {16, 0xa660, 0, {0x00,0x20,0xd0,0x0b,0x30,0x02,0xcc,0x00,0xb2,0x00,0x2c,0xc0,0x0b,0x00,0x02,0x08 }},
+ {16, 0xa670, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xad,0x00,0xcf,0x88,0xb2,0xe8 }},
+ {16, 0xa680, 0, {0x0c,0x30,0x13,0xce,0xc2,0xd0,0x82,0x32,0x00,0x0c,0x0e,0x0b,0x20,0x00,0xc8,0x88 }},
+ {16, 0xa690, 0, {0xb2,0x40,0x2c,0xba,0x43,0x37,0x02,0xcb,0x00,0xb3,0xc0,0x2c,0xf0,0x03,0xfc,0x12 }},
+ {16, 0xa6a0, 0, {0xfb,0x00,0x7f,0xd1,0x0f,0x30,0x0b,0x2b,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa6b0, 0, {0x80,0x00,0xed,0x02,0xf1,0x40,0x3e,0x41,0x0f,0xb0,0x23,0xed,0x00,0xe8,0x01,0x3e }},
+ {16, 0xa6c0, 0, {0xc8,0x0f,0xb0,0x13,0xec,0x04,0xdb,0x00,0x3c,0x80,0x0f,0x04,0x03,0xe4,0x40,0xf9 }},
+ {16, 0xa6d0, 0, {0x00,0x3c,0xc2,0x0e,0xb0,0x03,0xee,0x00,0x4b,0x41,0x3e,0xc0,0x0f,0xb0,0x03,0xe0 }},
+ {16, 0xa6e0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xfc,0x00,0x4b,0x00,0x32,0x42 }},
+ {16, 0xa6f0, 0, {0x0c,0xf0,0x03,0x36,0x80,0xcd,0x00,0x33,0x00,0x4c,0xc0,0x83,0x3c,0x04,0xf7,0x00 }},
+ {16, 0xa700, 0, {0x32,0x40,0x0c,0xb1,0x43,0x14,0x00,0xcd,0x80,0x33,0xc0,0x0c,0xf0,0x03,0xfc,0x00 }},
+ {16, 0xa710, 0, {0xff,0x00,0xb3,0xc2,0x0c,0xa0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa720, 0, {0x81,0x04,0x4f,0x02,0x8b,0x80,0x20,0x30,0x08,0xbc,0x02,0x20,0x10,0x89,0x00,0x22 }},
+ {16, 0xa730, 0, {0xc0,0x00,0xb0,0x03,0x60,0x04,0xb8,0x00,0xa2,0x90,0x28,0x8c,0x1a,0x24,0x02,0x8b }},
+ {16, 0xa740, 0, {0x83,0x22,0xc1,0x08,0xb0,0x02,0xfc,0x00,0xb3,0x60,0x20,0xc0,0x0d,0xa0,0x03,0xe0 }},
+ {16, 0xa750, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x2e,0x00,0xab,0xc0,0x22,0x60 }},
+ {16, 0xa760, 0, {0x08,0xb8,0x02,0x29,0x00,0x88,0x01,0x20,0x00,0x08,0x90,0x02,0x20,0x00,0xb8,0x00 }},
+ {16, 0xa770, 0, {0x22,0xc0,0x08,0xb0,0x02,0xe4,0x00,0x81,0x24,0xa2,0xc0,0x09,0xb0,0x46,0xec,0x00 }},
+ {16, 0xa780, 0, {0xb9,0x00,0x22,0xc0,0x08,0x90,0x02,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa790, 0, {0x08,0x04,0x2c,0x00,0xa1,0x00,0xa0,0x41,0x08,0xb0,0x0a,0x20,0x53,0x88,0x00,0x20 }},
+ {16, 0xa7a0, 0, {0xc0,0x28,0xa0,0x02,0x4c,0x00,0xb3,0x00,0x20,0x00,0x88,0x00,0x02,0x84,0x00,0x83 }},
+ {16, 0xa7b0, 0, {0x04,0x20,0xc0,0x28,0x30,0x02,0xcc,0x00,0xb3,0x02,0x62,0xc0,0x09,0x10,0x02,0xc2 }},
+ {16, 0xa7c0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x6c,0x00,0xe9,0x00,0x22,0x00 }},
+ {16, 0xa7d0, 0, {0x0c,0xb0,0x03,0x00,0x04,0xc9,0x00,0xb2,0x00,0x0c,0x90,0x03,0x2c,0x00,0xf3,0x00 }},
+ {16, 0xa7e0, 0, {0xb2,0xc0,0x8c,0xb0,0x03,0xb4,0x02,0x8f,0x00,0x23,0xc0,0x04,0xf0,0x03,0xec,0x08 }},
+ {16, 0xa7f0, 0, {0xf9,0x00,0x33,0xc0,0x0c,0x80,0x03,0x00,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa800, 0, {0xa0,0x1d,0xfc,0x10,0xdd,0x04,0x3f,0x00,0x0f,0xc0,0x23,0xf0,0x90,0xfd,0x00,0x2f }},
+ {16, 0xa810, 0, {0xc0,0x0f,0xe0,0x43,0xd0,0x00,0xfc,0x00,0x3f,0x00,0x8f,0xc0,0x22,0x74,0x00,0xfd }},
+ {16, 0xa820, 0, {0x04,0x3f,0xc0,0x0f,0xf0,0x03,0xfc,0x00,0xff,0x06,0x3f,0xc0,0x0f,0xc0,0x43,0xe8 }},
+ {16, 0xa830, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xfc,0x80,0xef,0x20,0x11,0xc0 }},
+ {16, 0xa840, 0, {0x0e,0x72,0x03,0xbd,0xb0,0xcf,0x31,0xbf,0xcc,0x02,0xf0,0x03,0xfc,0xc6,0xcf,0x01 }},
+ {16, 0xa850, 0, {0x0b,0xc5,0x0f,0xf1,0x03,0x3c,0x04,0xef,0x61,0x33,0xd8,0x07,0xf0,0x03,0x34,0x80 }},
+ {16, 0xa860, 0, {0xcd,0x30,0x73,0xcc,0x0f,0xe8,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa870, 0, {0x80,0x18,0xe9,0x00,0x88,0x69,0x22,0x10,0x08,0x8c,0x00,0x21,0x84,0x88,0x41,0x22 }},
+ {16, 0xa880, 0, {0x10,0x88,0x86,0x92,0x01,0x00,0x88,0x62,0x22,0x10,0x4b,0x87,0x02,0x21,0xa0,0x88 }},
+ {16, 0xa890, 0, {0x60,0x20,0x10,0x0b,0x86,0xa2,0x35,0xa0,0xab,0x60,0xa1,0xc4,0x0b,0xb8,0x02,0x20 }},
+ {16, 0xa8a0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xcd,0xa8,0x33,0x41,0x20,0xc6 }},
+ {16, 0xa8b0, 0, {0x4a,0x31,0x00,0x8c,0x10,0x93,0x33,0x28,0xcc,0x29,0x34,0x12,0x8c,0x50,0x93,0x1c }},
+ {16, 0xa8c0, 0, {0x28,0x84,0x01,0x20,0x4a,0x4c,0x41,0x83,0x10,0x24,0xcc,0x4b,0x31,0x42,0x4c,0x40 }},
+ {16, 0xa8d0, 0, {0x91,0x10,0x24,0xc0,0x0b,0x80,0x02,0x22,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa8e0, 0, {0xc0,0x05,0xa8,0x20,0x90,0x02,0x22,0x00,0x08,0x80,0x00,0x20,0x30,0xb8,0x08,0x26 }},
+ {16, 0xa8f0, 0, {0x00,0x01,0x80,0x82,0x20,0x20,0x18,0x08,0x42,0x40,0x03,0x91,0x02,0x60,0x00,0x08 }},
+ {16, 0xa900, 0, {0x01,0xa6,0x00,0x0b,0x80,0x00,0x6c,0x10,0xbb,0x01,0x26,0xc0,0x4b,0x90,0x0a,0x30 }},
+ {16, 0xa910, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0xfd,0x00,0xfd,0x41,0x33,0xa1 }},
+ {16, 0xa920, 0, {0x0e,0xd2,0x03,0xb5,0x02,0xdf,0x42,0x3b,0x01,0x0f,0xd4,0x43,0xb5,0x00,0xcd,0x40 }},
+ {16, 0xa930, 0, {0x1b,0xc4,0x0d,0x78,0x03,0x70,0x02,0xec,0x00,0x17,0xa1,0x0f,0xe8,0x0b,0x2c,0x02 }},
+ {16, 0xa940, 0, {0xd9,0x90,0x26,0xc0,0x0f,0xac,0x03,0x00,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa950, 0, {0xe0,0x01,0xb8,0x00,0xee,0x00,0x1f,0x64,0x4f,0xe0,0x03,0xd8,0x10,0xc4,0x18,0x33 }},
+ {16, 0xa960, 0, {0xc0,0x0c,0xa0,0xa1,0xb8,0x09,0xe6,0x09,0x36,0x22,0x0f,0x88,0x23,0xbc,0x00,0xfb }},
+ {16, 0xa970, 0, {0x00,0x3b,0x64,0x0f,0xd9,0x03,0x9c,0x00,0xe3,0x04,0x3b,0xc0,0x0f,0xf4,0x03,0xf8 }},
+ {16, 0xa980, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x8d,0x00,0xc9,0x40,0xb6,0x80 }},
+ {16, 0xa990, 0, {0x0f,0x10,0x03,0xa7,0x20,0xfb,0x50,0xb6,0x08,0x4c,0x14,0x03,0x65,0x22,0xd9,0x40 }},
+ {16, 0xa9a0, 0, {0xb6,0x80,0x0e,0xa0,0x0b,0x00,0x00,0xd8,0x00,0x76,0x82,0x28,0xa0,0x23,0x64,0x00 }},
+ {16, 0xa9b0, 0, {0xc9,0x04,0x12,0xc0,0x8e,0x80,0x03,0x90,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xa9c0, 0, {0xc8,0x05,0x2b,0x60,0x8a,0x09,0x20,0x50,0x08,0xa0,0x23,0xe9,0x00,0xb8,0xc0,0x22 }},
+ {16, 0xa9d0, 0, {0xf0,0x08,0xac,0x02,0x28,0x04,0x8a,0xc2,0x22,0x50,0x08,0x90,0x06,0x2c,0x00,0x8b }},
+ {16, 0xa9e0, 0, {0x04,0x22,0x51,0x08,0x94,0x02,0xe4,0x04,0x8b,0x04,0x37,0xc0,0x08,0x18,0x42,0x26 }},
+ {16, 0xa9f0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x04,0x4b,0x00,0x82,0xc8,0x24,0x43 }},
+ {16, 0xaa00, 0, {0x0b,0x26,0x0a,0x88,0x00,0xb0,0x80,0x22,0xe4,0x0b,0x20,0x42,0x69,0x00,0xa2,0x90 }},
+ {16, 0xaa10, 0, {0x28,0x40,0xe8,0x10,0x02,0x0c,0x00,0xbb,0x00,0x28,0x50,0x88,0x90,0x82,0xc4,0x01 }},
+ {16, 0xaa20, 0, {0x83,0x00,0x20,0xc0,0x0a,0x10,0x02,0xba,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaa30, 0, {0x20,0x10,0x4e,0x80,0x81,0x00,0x21,0xa8,0x08,0x58,0x02,0xd6,0x01,0xb7,0x90,0x68 }},
+ {16, 0xaa40, 0, {0x20,0x03,0x59,0x82,0x56,0x00,0xa5,0x84,0x2d,0xa2,0x18,0x69,0x22,0x02,0x00,0x34 }},
+ {16, 0xaa50, 0, {0x80,0x29,0xa8,0x08,0x68,0x06,0xc6,0x14,0x85,0x82,0x25,0xe0,0x08,0x58,0x82,0x1c }},
+ {16, 0xaa60, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x48,0x00,0xc2,0xf0,0x34,0x40 }},
+ {16, 0xaa70, 0, {0x0f,0x20,0x03,0x88,0x80,0xf8,0x10,0x30,0xc0,0x27,0x21,0x0b,0x48,0x80,0xea,0x20 }},
+ {16, 0xaa80, 0, {0x38,0x00,0x0c,0x00,0x12,0x0c,0x08,0x73,0x00,0xb8,0x40,0x0c,0x12,0x23,0x4c,0x02 }},
+ {16, 0xaa90, 0, {0x43,0x34,0x30,0xc0,0x0e,0x11,0x03,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaaa0, 0, {0x40,0x15,0xac,0x90,0xf9,0x01,0x2e,0x88,0x4b,0x90,0x11,0x64,0x00,0xfb,0x10,0x32 }},
+ {16, 0xaab0, 0, {0x00,0x00,0x91,0x03,0xa4,0x00,0xc9,0x00,0x32,0xc4,0x4d,0xb0,0x43,0xe0,0x04,0xc8 }},
+ {16, 0xaac0, 0, {0x00,0x36,0x89,0x0f,0xa8,0x03,0xed,0x00,0xf9,0x14,0x3e,0xc0,0x0f,0x10,0x43,0xd0 }},
+ {16, 0xaad0, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0xe8,0x00,0xc8,0x00,0x3a,0x00 }},
+ {16, 0xaae0, 0, {0x0c,0x00,0x53,0xa0,0x00,0xe8,0x01,0x32,0x01,0x0e,0x80,0x53,0x20,0x10,0xc8,0x00 }},
+ {16, 0xaaf0, 0, {0x3a,0x40,0x0c,0x90,0x03,0x20,0x10,0xe8,0x04,0xb6,0x00,0x84,0x80,0x03,0x2d,0x12 }},
+ {16, 0xab00, 0, {0xcb,0x00,0x2e,0xca,0x04,0x90,0x03,0xea,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xab10, 0, {0x4c,0x19,0x8c,0x00,0x87,0x02,0x21,0xc0,0x08,0x70,0x02,0x0c,0x00,0x83,0x00,0x21 }},
+ {16, 0xab20, 0, {0xc0,0x08,0x30,0x62,0x4c,0x04,0x83,0x00,0x21,0x80,0x48,0xe0,0x12,0x3c,0x00,0x87 }},
+ {16, 0xab30, 0, {0x00,0x21,0xc0,0x08,0x70,0x02,0x1c,0x00,0x85,0x01,0x24,0xd0,0x0a,0x50,0x02,0xf2 }},
+ {16, 0xab40, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x9a,0x00,0x80,0x80,0x28,0x20 }},
+ {16, 0xab50, 0, {0x08,0x4c,0x22,0xd2,0x00,0xa4,0x80,0x24,0x30,0x0b,0x48,0x02,0x52,0x00,0x84,0xc0 }},
+ {16, 0xab60, 0, {0x21,0x20,0x09,0x48,0x68,0x13,0x00,0xa4,0x80,0x60,0x20,0x09,0x08,0x02,0x56,0x00 }},
+ {16, 0xab70, 0, {0x97,0x80,0x2d,0xe0,0x88,0x58,0x02,0xe0,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xab80, 0, {0x6c,0x04,0xcc,0x00,0x83,0x80,0x20,0xd8,0x08,0x30,0x02,0x4c,0x40,0x83,0x00,0x24 }},
+ {16, 0xab90, 0, {0xd1,0x09,0xb9,0x42,0x4e,0x00,0x83,0x00,0x20,0xc1,0x89,0x30,0x42,0x0c,0x00,0x83 }},
+ {16, 0xaba0, 0, {0xf0,0xa0,0xd9,0x19,0x36,0x22,0x66,0x06,0x91,0x00,0x0c,0xc1,0x0a,0x10,0x02,0xc2 }},
+ {16, 0xabb0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xe8,0x02,0xca,0xa5,0x2a,0x91 }},
+ {16, 0xabc0, 0, {0x28,0xa8,0x03,0xea,0x02,0xaa,0x00,0xb6,0xa0,0x0f,0xa0,0x0a,0x2a,0x92,0xca,0x83 }},
+ {16, 0xabd0, 0, {0xba,0x80,0x29,0xa0,0x03,0x2b,0x00,0xea,0x40,0x66,0x90,0x2d,0xe4,0x0b,0x6a,0x80 }},
+ {16, 0xabe0, 0, {0xda,0x00,0x3e,0x80,0x0c,0xe0,0x03,0xfa,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xabf0, 0, {0x48,0x01,0x80,0x00,0xfc,0x00,0x3d,0x00,0x0f,0xc0,0x03,0xb0,0x14,0xfc,0x00,0x3b }},
+ {16, 0xac00, 0, {0x12,0x0e,0xc0,0x43,0xb1,0x14,0xfc,0x00,0x3d,0x00,0x0e,0xc0,0x03,0xf0,0x20,0xf4 }},
+ {16, 0xac10, 0, {0x00,0x31,0x00,0x0e,0x44,0x13,0xa0,0x00,0xe8,0x06,0x36,0x00,0x4f,0x80,0x13,0xd2 }},
+ {16, 0xac20, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xa4,0x00,0xd1,0x00,0x36,0x60 }},
+ {16, 0xac30, 0, {0x1c,0x18,0x0b,0x46,0x00,0xd9,0x80,0x30,0x40,0x2c,0x98,0x05,0x86,0x00,0xc1,0x80 }},
+ {16, 0xac40, 0, {0x92,0x40,0x0d,0x10,0x03,0x44,0x02,0x89,0x00,0x32,0x70,0x0c,0x98,0x01,0x24,0x00 }},
+ {16, 0xac50, 0, {0xc9,0x04,0x30,0x40,0x0c,0x90,0x03,0xc2,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xac60, 0, {0x80,0x04,0x64,0x00,0x89,0x00,0x22,0x40,0x08,0x94,0x02,0x24,0x80,0x89,0x01,0x22 }},
+ {16, 0xac70, 0, {0x40,0x48,0x91,0x02,0x24,0x00,0xd9,0x90,0x22,0x41,0x08,0x90,0x12,0x24,0x10,0x89 }},
+ {16, 0xac80, 0, {0x00,0x32,0x40,0x08,0x95,0x12,0x24,0x02,0x81,0x00,0xa2,0x41,0x0d,0x90,0x42,0xe0 }},
+ {16, 0xac90, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x05,0x24,0x02,0x9d,0x00,0x23,0x44 }},
+ {16, 0xaca0, 0, {0x08,0xd2,0x06,0x74,0x80,0xb5,0x20,0x23,0x40,0x1a,0xd0,0x06,0x35,0x90,0x8d,0x02 }},
+ {16, 0xacb0, 0, {0x2f,0x44,0x19,0xd0,0x02,0x74,0x00,0x8d,0x00,0x63,0x40,0x18,0xd4,0x02,0xa4,0x11 }},
+ {16, 0xacc0, 0, {0x89,0x00,0x22,0x40,0x08,0xb0,0x02,0xc6,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xacd0, 0, {0x28,0x14,0x04,0x80,0x85,0x20,0x21,0x68,0x08,0x52,0x02,0x14,0x80,0xa5,0x20,0xa1 }},
+ {16, 0xace0, 0, {0x48,0x0a,0x72,0x38,0x14,0x80,0x95,0x24,0x2d,0x48,0x28,0x52,0x02,0x14,0x80,0x85 }},
+ {16, 0xacf0, 0, {0x20,0x21,0x48,0x08,0x52,0x06,0x84,0x80,0x81,0x20,0x20,0x4a,0x09,0x10,0x02,0xc2 }},
+ {16, 0xad00, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x0d,0x61,0x40,0xd8,0x50,0xb2,0x14 }},
+ {16, 0xad10, 0, {0x28,0xa0,0x03,0x61,0x40,0xf8,0x50,0x32,0x94,0x4e,0x85,0x04,0x21,0x42,0xc8,0x50 }},
+ {16, 0xad20, 0, {0x3c,0x14,0x0d,0x80,0x03,0x61,0x40,0x88,0x50,0xb2,0x14,0x2c,0xc5,0x09,0xa1,0x40 }},
+ {16, 0xad30, 0, {0xc8,0x50,0x32,0x1c,0x0c,0x80,0x03,0xee,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xad40, 0, {0x98,0x15,0xe4,0x40,0xf9,0x10,0x3a,0x44,0x0f,0x91,0x03,0xe4,0x40,0xd9,0x14,0x3e }},
+ {16, 0xad50, 0, {0x44,0x0d,0x91,0x43,0x64,0x40,0xe9,0x10,0x32,0x44,0x07,0x93,0xc3,0xe4,0x50,0xd1 }},
+ {16, 0xad60, 0, {0x10,0x7e,0x44,0x03,0x91,0x01,0x54,0x44,0xfd,0x14,0x3e,0x40,0x0f,0xd0,0x03,0xe6 }},
+ {16, 0xad70, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x80,0xdd,0xa0,0x33,0x68 }},
+ {16, 0xad80, 0, {0x1e,0xda,0x03,0x36,0x90,0xcd,0xa0,0x3b,0x68,0x0a,0xd8,0x23,0x76,0x0c,0xed,0x80 }},
+ {16, 0xad90, 0, {0x2b,0x62,0x0b,0x99,0x02,0xa7,0x80,0xf9,0xe1,0x37,0x68,0x0c,0xda,0x03,0x27,0x80 }},
+ {16, 0xada0, 0, {0xc9,0xa2,0x22,0x68,0x4c,0x50,0x03,0xc6,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xadb0, 0, {0x38,0x18,0xe1,0x40,0x88,0x50,0x22,0x14,0x08,0x80,0x22,0x60,0x00,0x88,0x04,0x22 }},
+ {16, 0xadc0, 0, {0x00,0x08,0x04,0x26,0x01,0x00,0x88,0x50,0x22,0x10,0x08,0xaf,0x02,0x23,0x00,0x88 }},
+ {16, 0xadd0, 0, {0xc0,0xa0,0x10,0x88,0x84,0x02,0x23,0x80,0xa0,0x40,0x2a,0x10,0x08,0x80,0x12,0x4e }},
+ {16, 0xade0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x84,0x00,0x81,0x01,0x20,0x40 }},
+ {16, 0xadf0, 0, {0x0a,0x14,0x02,0x45,0x00,0x81,0x41,0x2c,0x50,0x0b,0x14,0x02,0x05,0x04,0xa1,0x00 }},
+ {16, 0xae00, 0, {0x28,0x40,0x82,0x10,0x02,0x84,0x40,0xa1,0x32,0x80,0x50,0x09,0x14,0x02,0x04,0xc4 }},
+ {16, 0xae10, 0, {0x91,0x10,0x64,0x44,0x28,0x10,0x02,0xd2,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xae20, 0, {0x18,0x04,0xac,0x02,0x81,0x00,0x22,0xc1,0x08,0x90,0x02,0x44,0x02,0x89,0x02,0x26 }},
+ {16, 0xae30, 0, {0x41,0x09,0x90,0x0a,0x24,0x0c,0x89,0x04,0x22,0x50,0x08,0x90,0x26,0x24,0x00,0x89 }},
+ {16, 0xae40, 0, {0x00,0x22,0x41,0x09,0x10,0x22,0x24,0x40,0xb9,0x01,0x2e,0x40,0x08,0x90,0x02,0x46 }},
+ {16, 0xae50, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x15,0xe4,0x10,0x89,0x00,0x32,0x40 }},
+ {16, 0xae60, 0, {0x0a,0x90,0x0b,0x24,0x10,0x89,0x00,0x1e,0x40,0x9b,0x90,0x02,0x24,0x10,0x29,0x00 }},
+ {16, 0xae70, 0, {0x1a,0x40,0x0e,0x94,0x41,0xa4,0x00,0x29,0x00,0x12,0x40,0x05,0x90,0x41,0x26,0x00 }},
+ {16, 0xae80, 0, {0xd9,0x00,0x24,0x40,0x0c,0x90,0x03,0xe8,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xae90, 0, {0x48,0x01,0xa4,0x02,0xa9,0x00,0xbc,0x40,0x0f,0x90,0x03,0xa4,0x04,0xf9,0x00,0x3a }},
+ {16, 0xaea0, 0, {0x41,0x0e,0x90,0x83,0x84,0x00,0xf9,0x00,0x3c,0x40,0x0e,0x90,0x02,0xc4,0x08,0xe9 }},
+ {16, 0xaeb0, 0, {0x00,0x3a,0x40,0x2e,0x90,0x0b,0xe6,0x00,0xe1,0x04,0x3a,0x40,0x0f,0x92,0x03,0x5a }},
+ {16, 0xaec0, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xa0,0x20,0xd8,0x00,0x36,0x02 }},
+ {16, 0xaed0, 0, {0x0e,0x00,0xa3,0xe0,0x18,0xc0,0x00,0x30,0x03,0x0f,0x80,0x33,0x20,0x00,0x40,0x00 }},
+ {16, 0xaee0, 0, {0x32,0x0d,0x0f,0x04,0x0b,0xa0,0x02,0xc8,0x02,0x32,0x02,0x8c,0x82,0x03,0x20,0x02 }},
+ {16, 0xaef0, 0, {0xc8,0x04,0x16,0x00,0x4e,0x80,0x01,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaf00, 0, {0x28,0x05,0x3b,0x00,0x8e,0xd8,0x23,0x80,0x08,0xe0,0x02,0xf8,0x80,0x8e,0x10,0x23 }},
+ {16, 0xaf10, 0, {0xa2,0x0b,0xe0,0x82,0x7a,0x20,0x8e,0x30,0x23,0xa1,0x0b,0xe0,0x02,0x28,0x00,0x8e }},
+ {16, 0xaf20, 0, {0x00,0x2b,0x88,0x08,0xe4,0x42,0x38,0x00,0x8e,0x04,0x23,0x80,0x08,0xa0,0x02,0x0a }},
+ {16, 0xaf30, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x6f,0x40,0x93,0xc6,0x24,0x40 }},
+ {16, 0xaf40, 0, {0x0a,0x38,0x02,0xcc,0x00,0x83,0x01,0xac,0xf0,0x0b,0xb4,0x02,0x4c,0x04,0xa3,0x80 }},
+ {16, 0xaf50, 0, {0x28,0xd0,0x4b,0x30,0x02,0x4c,0x00,0xab,0x04,0x2a,0xc0,0x2a,0x30,0x0a,0xac,0x10 }},
+ {16, 0xaf60, 0, {0x93,0x00,0x20,0xc1,0x0a,0x31,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xaf70, 0, {0x80,0x11,0x1c,0x00,0x82,0x00,0x21,0x42,0x88,0x74,0x06,0xdc,0x0b,0x86,0x02,0x2d }},
+ {16, 0xaf80, 0, {0x80,0x0b,0x70,0x2a,0x58,0x00,0xa6,0x00,0xa9,0xc0,0x0b,0x70,0x02,0x5c,0x88,0xa7 }},
+ {16, 0xaf90, 0, {0x20,0x29,0xc0,0x0a,0x70,0x02,0x9c,0x10,0x97,0x20,0xa1,0xc8,0x08,0xd8,0x02,0x28 }},
+ {16, 0xafa0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x08,0x0e,0x00,0xd7,0x80,0x37,0x60 }},
+ {16, 0xafb0, 0, {0x0e,0x68,0x13,0xfe,0x00,0xcf,0x80,0x3d,0xe0,0x0f,0x78,0x23,0x1e,0x00,0xef,0x82 }},
+ {16, 0xafc0, 0, {0x31,0xe0,0x0f,0x3c,0xc3,0x7e,0x04,0xef,0x80,0xb1,0xe0,0x0e,0xe8,0x03,0xbe,0x80 }},
+ {16, 0xafd0, 0, {0xd7,0xe0,0x33,0xea,0x0e,0x78,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xafe0, 0, {0x08,0x15,0xac,0x00,0xfa,0x01,0x3e,0x00,0x0f,0xb0,0x03,0xe0,0x04,0xf8,0x00,0x32 }},
+ {16, 0xaff0, 0, {0x80,0x0f,0x80,0x43,0xac,0x0a,0xd8,0x00,0x36,0x40,0x0f,0xb0,0x03,0x2c,0x0c,0xdb }},
+ {16, 0xb000, 0, {0x00,0x26,0xc1,0x09,0xa0,0x13,0x6c,0x40,0xeb,0x40,0x3a,0xdc,0x0f,0x90,0x0b,0xc2 }},
+ {16, 0xb010, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x04,0xbe,0x00,0xcf,0x81,0x33,0xe9 }},
+ {16, 0xb020, 0, {0x1f,0xf9,0x13,0xb6,0x50,0xef,0x80,0x1f,0xe4,0x04,0xc8,0x03,0x7e,0x00,0x6d,0x81 }},
+ {16, 0xb030, 0, {0x33,0x64,0x0c,0xf8,0x1b,0x3e,0x20,0x2f,0x88,0x93,0xe8,0x0f,0xfb,0x03,0x2e,0x80 }},
+ {16, 0xb040, 0, {0xcf,0xc0,0x73,0xe0,0x2c,0xd9,0x03,0xd0,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb050, 0, {0xa8,0x18,0x90,0x42,0x89,0x18,0x21,0xc0,0x1f,0x71,0x02,0x14,0xc0,0xf7,0x20,0x27 }},
+ {16, 0xb060, 0, {0x40,0x40,0x71,0x12,0x18,0x00,0x87,0x20,0x21,0x80,0x48,0x71,0x02,0x3c,0x08,0x87 }},
+ {16, 0xb070, 0, {0x20,0x21,0x82,0x0b,0x61,0xa2,0x1e,0x44,0xdf,0x01,0x31,0xc8,0x08,0x73,0x02,0xea }},
+ {16, 0xb080, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x8c,0x00,0x87,0x00,0x21,0xc8 }},
+ {16, 0xb090, 0, {0x0b,0x70,0x02,0x9c,0x09,0x87,0x02,0x2d,0x82,0x99,0x40,0x02,0x04,0x00,0xa5,0x09 }},
+ {16, 0xb0a0, 0, {0x21,0x40,0x19,0x70,0x02,0x1c,0x00,0x87,0x05,0x25,0x48,0x4b,0x72,0x02,0x0c,0x40 }},
+ {16, 0xb0b0, 0, {0x87,0x00,0xa1,0xc0,0x48,0x50,0x02,0xc4,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb0c0, 0, {0x68,0x04,0xc1,0x20,0x89,0x4c,0xa0,0xb4,0x0a,0x38,0x02,0x22,0x00,0xa1,0xd0,0x24 }},
+ {16, 0xb0d0, 0, {0x30,0x09,0x80,0x02,0x27,0x44,0x81,0xc6,0x22,0x14,0x09,0x3d,0x2a,0x0f,0x02,0x8b }},
+ {16, 0xb0e0, 0, {0xc0,0xa6,0x20,0x0b,0x24,0x00,0x0c,0x10,0x93,0x81,0x20,0xc0,0x48,0x30,0x06,0xd8 }},
+ {16, 0xb0f0, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x15,0xa1,0x00,0x89,0xc1,0x32,0xd1 }},
+ {16, 0xb100, 0, {0x03,0xbc,0x03,0xa9,0x20,0x89,0x41,0x3e,0x60,0x85,0xbc,0x8b,0x25,0x40,0xeb,0x41 }},
+ {16, 0xb110, 0, {0xa2,0xa0,0x0d,0xf0,0x13,0x3e,0x20,0xcf,0x90,0x36,0x30,0x4f,0xbc,0x0b,0x3c,0x00 }},
+ {16, 0xb120, 0, {0xcf,0x80,0x33,0xc1,0x0c,0xb1,0x03,0xea,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb130, 0, {0x80,0x00,0xed,0x00,0xf8,0x01,0x3c,0xd0,0x0f,0xb3,0x03,0xe8,0x82,0xd8,0x20,0x36 }},
+ {16, 0xb140, 0, {0x80,0x2e,0xb2,0x13,0xe1,0x00,0xfa,0x00,0x7e,0xc8,0x2e,0xb0,0x03,0xec,0x80,0xdb }},
+ {16, 0xb150, 0, {0x10,0x3a,0x08,0x4f,0xb2,0x23,0xcc,0x02,0xfb,0x10,0x3a,0xc0,0x0f,0x90,0x03,0xe4 }},
+ {16, 0xb160, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x10,0xf0,0x00,0xcd,0x10,0x33,0x42 }},
+ {16, 0xb170, 0, {0x0c,0xca,0x23,0x7c,0x00,0xcf,0x00,0x33,0x62,0x06,0xf0,0x01,0x3a,0x00,0xcf,0x08 }},
+ {16, 0xb180, 0, {0x33,0x80,0x1c,0xf0,0x81,0x3c,0x00,0xff,0x00,0x33,0xa0,0x0c,0xca,0x01,0xfc,0x04 }},
+ {16, 0xb190, 0, {0xcf,0x00,0x3f,0xc0,0x0f,0xf0,0x03,0xc0,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb1a0, 0, {0xa1,0x04,0x6d,0x40,0x88,0x48,0xa2,0x31,0x08,0x10,0x02,0x20,0x10,0x88,0xb4,0x22 }},
+ {16, 0xb1b0, 0, {0xa0,0x08,0x80,0x00,0x6a,0x84,0x88,0x20,0x22,0x52,0x08,0xb0,0x0a,0x2c,0x10,0xbb }},
+ {16, 0xb1c0, 0, {0x00,0x32,0xb3,0x88,0x80,0x02,0xec,0x00,0xdb,0x00,0x2e,0xc0,0x0b,0x90,0x12,0xe1 }},
+ {16, 0xb1d0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x10,0x8a,0x01,0x22,0xa0 }},
+ {16, 0xb1e0, 0, {0x08,0xb0,0x42,0x60,0x20,0x80,0x00,0x20,0x44,0x1a,0x80,0x1a,0xe4,0x42,0xa0,0x06 }},
+ {16, 0xb1f0, 0, {0x22,0x00,0x78,0x30,0x02,0xac,0x00,0xbb,0x00,0xa2,0x44,0x08,0xb0,0x12,0xec,0x00 }},
+ {16, 0xb200, 0, {0x8b,0x00,0x0e,0xc0,0x0b,0x90,0x02,0xe0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb210, 0, {0x08,0x14,0x00,0x08,0x80,0x00,0x20,0x81,0x08,0x30,0x02,0x40,0x12,0x80,0x00,0xa0 }},
+ {16, 0xb220, 0, {0x40,0x08,0xb0,0x02,0xc0,0x00,0x82,0x00,0x00,0x80,0x08,0x30,0x02,0x8c,0x00,0xbb }},
+ {16, 0xb230, 0, {0x00,0x20,0x00,0x08,0x20,0x02,0xcc,0x80,0x93,0x00,0x2c,0xc0,0x0b,0x30,0x02,0xc2 }},
+ {16, 0xb240, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x60,0x00,0xca,0x14,0x32,0x00 }},
+ {16, 0xb250, 0, {0x0c,0xb0,0x03,0x4c,0x00,0xca,0x00,0x32,0x00,0x0e,0x00,0x12,0xa0,0x00,0xc0,0x00 }},
+ {16, 0xb260, 0, {0x70,0x00,0x28,0xf0,0x13,0xac,0x00,0xfb,0x00,0x32,0x40,0x2c,0x10,0x43,0xec,0x00 }},
+ {16, 0xb270, 0, {0xcf,0x00,0x3f,0xc0,0x0f,0x90,0x03,0xc0,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb280, 0, {0x20,0x15,0xf0,0x02,0xfc,0x00,0x1f,0x00,0x67,0x70,0x03,0xb0,0x00,0xfc,0x00,0x3f }},
+ {16, 0xb290, 0, {0x00,0x2d,0xc0,0x03,0x30,0x10,0xfc,0x01,0xbf,0x00,0x0f,0x70,0x03,0x7c,0x00,0xf7 }},
+ {16, 0xb2a0, 0, {0x04,0x3b,0x00,0x0f,0xc0,0x13,0xfd,0x10,0xff,0x00,0x3d,0xc0,0x0f,0xf0,0x03,0xe8 }},
+ {16, 0xb2b0, 0, {0x12,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x05,0xf4,0xc0,0xcf,0x80,0x33,0x60 }},
+ {16, 0xb2c0, 0, {0x0e,0xc9,0x13,0x36,0x50,0xce,0x86,0x3f,0x08,0x0c,0xc0,0x03,0x3e,0x02,0xd7,0x80 }},
+ {16, 0xb2d0, 0, {0x39,0xe0,0x0f,0xf8,0x13,0x3e,0x40,0xc7,0x30,0x3b,0xce,0x0d,0xf6,0x03,0x3d,0x88 }},
+ {16, 0xb2e0, 0, {0xcf,0x31,0x33,0xe4,0x0f,0x78,0x03,0x30,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb2f0, 0, {0x80,0x10,0xe5,0xd0,0xdb,0x80,0x72,0x60,0x88,0x92,0x02,0xe4,0x10,0x8a,0x80,0x2e }},
+ {16, 0xb300, 0, {0x34,0x4a,0x8c,0x03,0x2e,0x00,0xab,0x80,0x02,0xe0,0x0b,0xb8,0x02,0x2c,0x80,0x8f }},
+ {16, 0xb310, 0, {0x60,0x13,0xd8,0x4a,0x76,0x02,0x9d,0x84,0xaf,0x30,0x22,0x48,0x0b,0x88,0x12,0xa0 }},
+ {16, 0xb320, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x05,0xc4,0x00,0x8b,0x00,0x24,0x00 }},
+ {16, 0xb330, 0, {0x4a,0x00,0x02,0xac,0x80,0x83,0x00,0x2c,0x01,0x28,0x04,0x02,0xac,0x00,0x8b,0x01 }},
+ {16, 0xb340, 0, {0x20,0xc0,0x03,0xb0,0x02,0x0c,0x80,0x83,0x40,0x20,0xc1,0xa8,0x34,0x22,0x8d,0x13 }},
+ {16, 0xb350, 0, {0x83,0x20,0xac,0xc8,0x0b,0xb0,0x02,0x62,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb360, 0, {0xc0,0x15,0x86,0x00,0x9b,0x04,0xae,0x00,0x0a,0x90,0x02,0xec,0x00,0x0b,0x14,0x2e }},
+ {16, 0xb370, 0, {0xc6,0x02,0xb1,0x12,0x6c,0x00,0xab,0x20,0x2a,0xc1,0x0b,0xb0,0x42,0x2c,0x00,0x8b }},
+ {16, 0xb380, 0, {0x02,0x26,0xc1,0x0a,0xb0,0x02,0xac,0x00,0xab,0x04,0x2a,0x40,0x0b,0x90,0x02,0xf0 }},
+ {16, 0xb390, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0xe7,0x00,0xc3,0x01,0x36,0x40 }},
+ {16, 0xb3a0, 0, {0x0e,0x88,0x13,0x24,0x02,0xca,0x00,0x1e,0x20,0x2c,0x8e,0x0b,0x2c,0x00,0xcb,0x00 }},
+ {16, 0xb3b0, 0, {0x2a,0xc0,0x0f,0xb8,0x03,0x2e,0x06,0xcb,0x00,0x3a,0xc0,0x4c,0xb0,0x13,0xac,0x0c }},
+ {16, 0xb3c0, 0, {0xcb,0x00,0x3e,0xc8,0x0f,0xb0,0x43,0x50,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb3d0, 0, {0xe0,0x01,0xb4,0x08,0xff,0x91,0x33,0x40,0x09,0xdc,0x01,0xf4,0x20,0x7e,0x02,0x2e }},
+ {16, 0xb3e0, 0, {0x40,0x0d,0x98,0x01,0xbc,0x80,0xef,0x80,0xb7,0xe4,0x8f,0xf4,0x0b,0xfe,0x40,0x7f }},
+ {16, 0xb3f0, 0, {0x00,0xb9,0xc0,0x4e,0xf0,0x03,0xfc,0x08,0xf7,0x00,0x37,0xc0,0x0f,0xe0,0x02,0xb8 }},
+ {16, 0xb400, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xa1,0x44,0xcb,0x02,0x32,0x00 }},
+ {16, 0xb410, 0, {0x0d,0x80,0x0a,0x6d,0x00,0xeb,0x04,0x10,0x90,0x28,0x22,0x0b,0x2c,0xc2,0xcb,0x20 }},
+ {16, 0xb420, 0, {0x76,0xc0,0x0e,0xb1,0x03,0xec,0x01,0xcb,0x06,0x32,0xc1,0x0c,0x30,0x03,0x2c,0x02 }},
+ {16, 0xb430, 0, {0xcb,0x00,0x3e,0xd0,0x0c,0xb0,0x03,0x10,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb440, 0, {0xc8,0x05,0x21,0x48,0xab,0x00,0x20,0x00,0x00,0x95,0x23,0x4c,0x08,0xbb,0x01,0x22 }},
+ {16, 0xb450, 0, {0xc0,0x08,0xb2,0x02,0x0c,0x08,0x83,0x88,0x92,0xd5,0x28,0x34,0x02,0xec,0x02,0x8f }},
+ {16, 0xb460, 0, {0x20,0x23,0xc0,0x4d,0xf0,0x01,0x7c,0x00,0xdf,0x00,0x2e,0xc0,0x0d,0x30,0x03,0x72 }},
+ {16, 0xb470, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x05,0x44,0x00,0x83,0x10,0x20,0x60 }},
+ {16, 0xb480, 0, {0x09,0x25,0x02,0x00,0x08,0xa0,0x00,0x4c,0x00,0x0b,0x0c,0x22,0x4f,0x12,0x93,0x40 }},
+ {16, 0xb490, 0, {0x00,0xc0,0x09,0x3e,0x02,0xec,0x00,0xab,0x80,0xa4,0xc0,0x09,0x30,0x22,0x2c,0x08 }},
+ {16, 0xb4a0, 0, {0xb3,0x01,0x0c,0x81,0x08,0x30,0x02,0x38,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb4b0, 0, {0x60,0x01,0x16,0x09,0xb7,0x80,0x21,0x64,0x08,0x78,0x06,0x12,0x00,0xb4,0x82,0x2d }},
+ {16, 0xb4c0, 0, {0xa4,0x1b,0x69,0x06,0x7e,0x04,0x17,0x92,0x25,0xe6,0x09,0x78,0x06,0xde,0x80,0xa7 }},
+ {16, 0xb4d0, 0, {0x90,0x25,0xe0,0x09,0x79,0x50,0x5e,0x04,0xb7,0x92,0x2f,0x61,0x09,0xc8,0x02,0x48 }},
+ {16, 0xb4e0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x25,0x00,0xc3,0x00,0xb0,0x03 }},
+ {16, 0xb4f0, 0, {0x0d,0xa3,0x42,0x09,0x40,0xe1,0x00,0xbc,0x40,0x0f,0x11,0x03,0x4c,0x00,0x13,0x00 }},
+ {16, 0xb500, 0, {0x20,0xc0,0x09,0x32,0x03,0xcc,0x10,0xa3,0x00,0x26,0xc4,0x8d,0x30,0x2b,0x0c,0x80 }},
+ {16, 0xb510, 0, {0xf3,0x00,0x7c,0x80,0x0c,0x30,0x01,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb520, 0, {0x40,0x1d,0xbc,0x00,0xe7,0x10,0x3d,0x01,0x2f,0xf1,0x42,0xe8,0x00,0xf5,0x90,0x03 }},
+ {16, 0xb530, 0, {0xc1,0x0c,0xf1,0x43,0x9c,0x04,0xef,0x08,0x3b,0xc2,0x0c,0xf0,0x81,0xdc,0xa0,0xdf }},
+ {16, 0xb540, 0, {0x00,0x3b,0xc3,0x3f,0xf0,0x83,0xfc,0x05,0xdf,0x0c,0x3d,0x40,0x0f,0xd1,0x03,0xd0 }},
+ {16, 0xb550, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x05,0xf4,0x00,0xcb,0x80,0x30,0x40 }},
+ {16, 0xb560, 0, {0x2c,0xa0,0x03,0xe0,0x00,0xf8,0x80,0x32,0xc0,0x2e,0xb8,0x0b,0x2c,0x46,0xd3,0x00 }},
+ {16, 0xb570, 0, {0x30,0xc0,0x0c,0x30,0x03,0x0c,0x00,0xdb,0x48,0x32,0xc0,0x1f,0xb4,0x03,0x2c,0x88 }},
+ {16, 0xb580, 0, {0xcb,0x48,0x32,0x80,0x0c,0x30,0x13,0x2a,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb590, 0, {0x48,0x11,0xb4,0x00,0x87,0x01,0x21,0x40,0x08,0x70,0x42,0xd0,0x08,0xb4,0x00,0x29 }},
+ {16, 0xb5a0, 0, {0xc0,0x08,0x70,0x02,0x1c,0x00,0x87,0x00,0x21,0xc8,0x0c,0x72,0x0a,0x1c,0x84,0x8f }},
+ {16, 0xb5b0, 0, {0x40,0x09,0xc4,0x8f,0x73,0x12,0x9c,0x40,0x83,0x20,0x21,0xc0,0x08,0x60,0x02,0x92 }},
+ {16, 0xb5c0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x96,0x01,0xaf,0x80,0x21,0x20 }},
+ {16, 0xb5d0, 0, {0x08,0x68,0x02,0xda,0x00,0xbd,0x80,0x21,0xe0,0x09,0x78,0x02,0x1e,0x00,0x8f,0x88 }},
+ {16, 0xb5e0, 0, {0x83,0xe2,0x29,0xf8,0x82,0x5f,0x80,0x87,0xa0,0x25,0xe0,0x0b,0x3a,0x12,0x0e,0x50 }},
+ {16, 0xb5f0, 0, {0x97,0xa4,0x21,0xa0,0x29,0x78,0x02,0x30,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb600, 0, {0x08,0x14,0xcc,0x02,0xa1,0x81,0x00,0x00,0x48,0x70,0x02,0xc8,0x00,0xb1,0x00,0x2c }},
+ {16, 0xb610, 0, {0xf8,0x09,0x31,0x42,0x0c,0x10,0x83,0x00,0x20,0xe0,0x08,0x38,0x12,0x4e,0x00,0x83 }},
+ {16, 0xb620, 0, {0x00,0x6a,0xc0,0x0b,0x30,0x02,0x8c,0x04,0x93,0x00,0x20,0xe0,0x09,0x38,0x02,0x92 }},
+ {16, 0xb630, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x15,0xb9,0x40,0xee,0x20,0x30,0x80 }},
+ {16, 0xb640, 0, {0x0c,0xa0,0x03,0xe8,0x00,0xfa,0x00,0x33,0xb0,0x0d,0xe4,0x03,0x32,0x88,0xcc,0x80 }},
+ {16, 0xb650, 0, {0x23,0x00,0x0d,0xc0,0x03,0x62,0x02,0xca,0x00,0x36,0x80,0x0f,0xa0,0x43,0x28,0x06 }},
+ {16, 0xb660, 0, {0xda,0x00,0x33,0xa0,0x0d,0x6a,0x03,0x3a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb670, 0, {0x48,0x00,0xe0,0x00,0x98,0x01,0xbe,0x00,0x0f,0x80,0x03,0xf0,0x00,0xbc,0x00,0x38 }},
+ {16, 0xb680, 0, {0x04,0x08,0x80,0xa3,0xe0,0x00,0xf8,0x00,0x3e,0x00,0x0f,0x80,0x13,0xa0,0x00,0xe0 }},
+ {16, 0xb690, 0, {0x00,0x3e,0x00,0x0e,0x00,0x03,0xc0,0x00,0xe8,0x00,0xbe,0x04,0x4e,0x80,0x07,0xd2 }},
+ {16, 0xb6a0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0xe4,0x80,0xc9,0x00,0x3e,0x68 }},
+ {16, 0xb6b0, 0, {0x0c,0x90,0x03,0x64,0x00,0xc9,0x00,0x3e,0x40,0x0c,0x90,0x43,0xe0,0x00,0xc8,0x00 }},
+ {16, 0xb6c0, 0, {0x32,0x00,0x0c,0x80,0x13,0x20,0x00,0xc9,0x00,0x36,0x40,0x0c,0x90,0x03,0x64,0x00 }},
+ {16, 0xb6d0, 0, {0x81,0x00,0x32,0x40,0x04,0x90,0x13,0x02,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb6e0, 0, {0x80,0x04,0x65,0x06,0x89,0x40,0x2e,0x60,0x1a,0x14,0x2a,0x05,0x20,0x89,0x00,0x2e }},
+ {16, 0xb6f0, 0, {0x40,0x08,0x90,0x02,0xc4,0x08,0xc1,0x02,0x20,0x40,0x08,0x10,0x1a,0x24,0x00,0x89 }},
+ {16, 0xb700, 0, {0x10,0x32,0x41,0x08,0x90,0x12,0x24,0x00,0x89,0x04,0x36,0x40,0x88,0x94,0x0a,0x20 }},
+ {16, 0xb710, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0x04,0x20,0x89,0x55,0x2e,0x40 }},
+ {16, 0xb720, 0, {0x08,0xd5,0x02,0x34,0x00,0x8d,0x00,0x2e,0x40,0x18,0x90,0x02,0xe4,0x00,0x99,0x00 }},
+ {16, 0xb730, 0, {0x26,0x40,0x08,0x90,0x02,0x04,0x0a,0x89,0x00,0x26,0x40,0x38,0x90,0x0a,0x24,0x00 }},
+ {16, 0xb740, 0, {0xa9,0x00,0x20,0x40,0x0a,0x90,0x82,0x06,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb750, 0, {0x08,0x04,0x05,0x00,0x81,0x00,0x2f,0x40,0x0a,0xd4,0x02,0x34,0x00,0x85,0x01,0x2c }},
+ {16, 0xb760, 0, {0x40,0x08,0x10,0x42,0xe4,0x06,0x99,0x00,0x22,0x40,0x08,0x10,0x02,0x05,0x00,0x81 }},
+ {16, 0xb770, 0, {0x40,0x28,0x50,0x08,0x14,0x12,0x05,0x00,0xa1,0x40,0x24,0x50,0x5a,0x10,0x02,0x02 }},
+ {16, 0xb780, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x0d,0x60,0x00,0xc8,0x04,0x3e,0x00 }},
+ {16, 0xb790, 0, {0x08,0x80,0x03,0x21,0x42,0xcc,0x00,0x3e,0x00,0x2c,0x80,0x02,0xe0,0x00,0xd8,0x00 }},
+ {16, 0xb7a0, 0, {0xb6,0x00,0x2c,0x80,0x02,0x20,0x02,0xc8,0x00,0x36,0x00,0x0c,0x80,0x03,0x60,0x02 }},
+ {16, 0xb7b0, 0, {0xe8,0x00,0x32,0x00,0x8e,0x80,0x03,0x2e,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb7c0, 0, {0x98,0x1d,0xf5,0x00,0xf5,0x00,0x3e,0x40,0x87,0x90,0x03,0xe4,0x00,0xf1,0x00,0x3d }},
+ {16, 0xb7d0, 0, {0x50,0x0f,0x54,0x03,0xd1,0x00,0xec,0x40,0x3f,0x10,0x0b,0xc4,0x43,0xf1,0x00,0xf9 }},
+ {16, 0xb7e0, 0, {0x40,0x36,0x50,0x0f,0x94,0x13,0xe5,0x10,0xd9,0x44,0x3d,0x40,0x2d,0xd0,0x03,0xe6 }},
+ {16, 0xb7f0, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x05,0xf6,0x60,0xcd,0x02,0x3b,0x40 }},
+ {16, 0xb800, 0, {0x0c,0xd0,0x03,0xb4,0x40,0xfd,0x06,0x3e,0x40,0x0c,0x90,0x03,0x66,0x04,0xc9,0x82 }},
+ {16, 0xb810, 0, {0xb6,0x62,0x0f,0x18,0x0b,0x36,0x00,0xcd,0x40,0x32,0x61,0x0c,0x90,0x23,0x24,0x0a }},
+ {16, 0xb820, 0, {0xc9,0x00,0x32,0x40,0x4c,0xd0,0x43,0x06,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb830, 0, {0x39,0x10,0xe3,0x80,0xd8,0x00,0x22,0x00,0x0d,0x80,0x02,0x22,0x94,0xb8,0x00,0x2e }},
+ {16, 0xb840, 0, {0x00,0x0d,0x80,0x03,0x21,0x00,0x88,0x40,0x22,0x00,0x0b,0xc4,0x22,0x21,0x50,0x88 }},
+ {16, 0xb850, 0, {0x80,0x22,0x22,0x08,0x80,0x02,0x20,0x10,0x80,0x01,0x2a,0x00,0x0a,0x80,0x03,0x4e }},
+ {16, 0xb860, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xc6,0x00,0x89,0x00,0x2a,0x40 }},
+ {16, 0xb870, 0, {0x88,0x10,0x0a,0x84,0x08,0xb1,0x00,0x29,0x40,0x0a,0x70,0x0a,0xb5,0x00,0x8f,0x40 }},
+ {16, 0xb880, 0, {0x29,0xc0,0x0b,0xf4,0x02,0x24,0x00,0x81,0x20,0x28,0x44,0x89,0x10,0x02,0x04,0x04 }},
+ {16, 0xb890, 0, {0x81,0x02,0x2a,0x40,0x08,0x10,0x02,0x02,0x01,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb8a0, 0, {0x18,0x15,0xa6,0x00,0x99,0x20,0x22,0x40,0x09,0x90,0x12,0x24,0x80,0xb9,0x00,0x2f }},
+ {16, 0xb8b0, 0, {0x44,0x03,0xd0,0x02,0xf4,0x00,0x8d,0x00,0x2b,0x41,0x0b,0xd0,0x02,0x26,0x10,0x89 }},
+ {16, 0xb8c0, 0, {0x04,0x2a,0x40,0x09,0x90,0x6e,0x24,0x00,0x89,0x00,0x2a,0x40,0x0a,0x94,0x02,0x46 }},
+ {16, 0xb8d0, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0x15,0xe6,0x00,0xc9,0x00,0x38,0x42 }},
+ {16, 0xb8e0, 0, {0x0c,0x10,0x13,0xa6,0x04,0x79,0x08,0x3a,0x78,0x06,0x92,0x03,0xa4,0x08,0xc9,0x00 }},
+ {16, 0xb8f0, 0, {0x3a,0x60,0x8f,0x98,0x23,0x06,0x02,0xc9,0x02,0x3a,0x40,0x0d,0x90,0x03,0x04,0x00 }},
+ {16, 0xb900, 0, {0xc9,0x00,0x38,0x40,0x0c,0x90,0x03,0x28,0x04,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb910, 0, {0x28,0x01,0x84,0x10,0xf9,0x80,0xbe,0x40,0x4f,0x90,0x02,0xe4,0x00,0xf9,0x00,0x3c }},
+ {16, 0xb920, 0, {0x60,0x8d,0x92,0x03,0x24,0x42,0xe9,0x10,0x32,0x50,0x0f,0x94,0x03,0xe4,0x00,0xf9 }},
+ {16, 0xb930, 0, {0x00,0xb6,0x41,0x2e,0x10,0x03,0xe4,0x00,0xf9,0x00,0x2e,0x40,0x0f,0x90,0x03,0xca }},
+ {16, 0xb940, 0, {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0xa0,0x08,0xc8,0x00,0x3e,0x10 }},
+ {16, 0xb950, 0, {0x0f,0x88,0x03,0x20,0x08,0xf8,0xc0,0x1e,0x10,0x2c,0x40,0x03,0xf2,0x00,0xcc,0x00 }},
+ {16, 0xb960, 0, {0x3f,0x00,0x0c,0xc0,0x13,0x20,0x02,0xc0,0x00,0x30,0x00,0x0c,0x80,0x2b,0x20,0x10 }},
+ {16, 0xb970, 0, {0xc0,0x04,0x32,0x00,0x0f,0x80,0x03,0x0a,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb980, 0, {0xa8,0x05,0x3a,0x80,0x86,0xe0,0x2f,0xa0,0x1b,0xe0,0x02,0x3a,0x80,0xba,0x04,0x2e }},
+ {16, 0xb990, 0, {0x80,0x08,0xa0,0x03,0x88,0x08,0xc2,0x00,0x2e,0x81,0x08,0x60,0x02,0x28,0x10,0x8e }},
+ {16, 0xb9a0, 0, {0x81,0x03,0x80,0x08,0xe0,0x01,0x78,0x00,0x8e,0x04,0x03,0x80,0x09,0x68,0x03,0xca }},
+ {16, 0xb9b0, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x4c,0x00,0x83,0x60,0x2c,0x44 }},
+ {16, 0xb9c0, 0, {0x0b,0x38,0x02,0x0f,0x80,0xb1,0x00,0x2c,0xe5,0x03,0x30,0x10,0xcc,0x10,0x83,0x00 }},
+ {16, 0xb9d0, 0, {0x0c,0xc0,0x29,0x30,0x22,0x04,0x09,0x91,0x10,0x24,0xc0,0xc8,0x30,0x00,0x4c,0x04 }},
+ {16, 0xb9e0, 0, {0x93,0x02,0x24,0xc0,0x0b,0x31,0x02,0x0a,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xb9f0, 0, {0xe0,0x01,0x18,0x80,0x87,0x00,0x2d,0x40,0x0b,0x74,0x42,0x1c,0x01,0xb5,0x01,0x2c }},
+ {16, 0xba00, 0, {0xc0,0x0b,0x60,0x02,0xb0,0x00,0x94,0x04,0x2f,0x20,0x09,0xc0,0x02,0x14,0x90,0x97 }},
+ {16, 0xba10, 0, {0x00,0x25,0xc8,0x08,0x70,0x02,0x4c,0x80,0x97,0x20,0x25,0xc0,0x09,0x70,0x02,0xe8 }},
+ {16, 0xba20, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x3a,0x82,0xc6,0x80,0x2d,0x60 }},
+ {16, 0xba30, 0, {0x0b,0xf8,0x0b,0x1a,0x00,0xf5,0x80,0x3d,0xe0,0x8f,0x78,0x03,0xde,0x02,0xc7,0x80 }},
+ {16, 0xba40, 0, {0x2d,0xe0,0x0d,0x78,0x0b,0x17,0x02,0xdf,0x80,0x24,0xf8,0x2c,0xfd,0x03,0x5e,0x0c }},
+ {16, 0xba50, 0, {0xd7,0xe0,0x35,0xe0,0x0f,0x68,0x03,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xba60, 0, {0x48,0x1d,0xae,0x40,0xfa,0x04,0x3e,0x40,0x0f,0x80,0x13,0xec,0x04,0xf9,0x00,0x3e }},
+ {16, 0xba70, 0, {0xc1,0x0c,0xa0,0x13,0xc0,0x10,0xe8,0x00,0x3c,0x00,0x4e,0x80,0x43,0xc4,0x20,0x89 }},
+ {16, 0xba80, 0, {0x00,0xba,0xc0,0x07,0xb6,0x21,0xed,0x06,0xeb,0x68,0xba,0xcc,0x0f,0x20,0x13,0xc2 }},
+ {16, 0xba90, 0, {0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xbe,0x00,0xc6,0x80,0x31,0x60 }},
+ {16, 0xbaa0, 0, {0x2d,0x78,0x0b,0x3e,0x48,0xec,0x92,0x3d,0x60,0x0c,0x58,0x03,0x5a,0x40,0xd5,0x80 }},
+ {16, 0xbab0, 0, {0x31,0x61,0x0c,0x58,0x23,0x36,0x00,0xcf,0x82,0x3f,0xe0,0x0c,0xf8,0x03,0xff,0x60 }},
+ {16, 0xbac0, 0, {0xcf,0x90,0x33,0xf0,0x0c,0x52,0x03,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbad0, 0, {0xa8,0x11,0xb8,0x84,0x86,0x14,0xb5,0xc0,0x08,0x70,0x02,0x1e,0xc0,0xc4,0x00,0x2d }},
+ {16, 0xbae0, 0, {0x40,0x08,0x40,0x02,0x14,0xd0,0x86,0x10,0x21,0x80,0x4c,0x62,0x42,0x34,0x40,0xa5 }},
+ {16, 0xbaf0, 0, {0x00,0x35,0xc0,0x28,0x70,0x42,0xdc,0xc2,0x8f,0x30,0x23,0xc0,0x08,0x50,0x02,0x2a }},
+ {16, 0xbb00, 0, {0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x98,0x28,0x8e,0x00,0xa5,0x40 }},
+ {16, 0xbb10, 0, {0x08,0xf1,0x02,0x18,0x64,0xb4,0x00,0x6d,0x42,0x08,0x50,0x02,0x18,0x01,0x85,0x08 }},
+ {16, 0xbb20, 0, {0x21,0x40,0x09,0x58,0x22,0x54,0x00,0x85,0x10,0x2d,0xc4,0x09,0x70,0x02,0xdc,0x04 }},
+ {16, 0xbb30, 0, {0x97,0x00,0x25,0xc0,0x08,0x44,0x02,0x00,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbb40, 0, {0x60,0x14,0x8c,0x00,0x82,0x80,0x24,0xc0,0x08,0x80,0x02,0x2d,0x00,0x80,0x4a,0x2c }},
+ {16, 0xbb50, 0, {0x42,0x08,0x0a,0x42,0x06,0x00,0x92,0x84,0x20,0xa0,0x88,0x28,0x42,0x44,0x00,0xa3 }},
+ {16, 0xbb60, 0, {0x06,0x24,0xc0,0x0b,0x30,0x02,0xcc,0x10,0x93,0x04,0x24,0xc1,0x09,0x00,0x02,0x08 }},
+ {16, 0xbb70, 0, {0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x15,0xbc,0x00,0xcb,0x00,0x36,0x40 }},
+ {16, 0xbb80, 0, {0x0c,0xb4,0x13,0x2c,0x00,0xf9,0x00,0x3e,0xa0,0x0c,0xa2,0x03,0x04,0x08,0xc2,0x80 }},
+ {16, 0xbb90, 0, {0x30,0xa8,0x0d,0x2a,0x03,0x54,0x00,0xcb,0x00,0x3f,0xc0,0x0d,0xf0,0x03,0xfc,0x08 }},
+ {16, 0xbba0, 0, {0xdf,0x00,0x37,0xd0,0x0c,0xb0,0x03,0x2a,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbbb0, 0, {0x80,0x00,0xe0,0x00,0xfb,0x10,0x3a,0x40,0x0e,0xb0,0x03,0xed,0x90,0xf9,0x11,0x7e }},
+ {16, 0xbbc0, 0, {0x80,0x4f,0xb0,0x53,0xe8,0x40,0xe9,0x00,0x3e,0x40,0x0f,0x90,0x03,0xa6,0x08,0xf9 }},
+ {16, 0xbbd0, 0, {0x01,0x3a,0xc0,0x0c,0xb0,0x13,0xcc,0x00,0xeb,0x02,0x3a,0xc6,0x8e,0xb8,0x03,0xe0 }},
+ {16, 0xbbe0, 0, {0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0xf0,0x0c,0xce,0x00,0x3f,0xe0 }},
+ {16, 0xbbf0, 0, {0x2c,0xf0,0x83,0x3a,0x48,0xcd,0x01,0x35,0x80,0x0c,0x60,0x12,0x34,0x0a,0xce,0x00 }},
+ {16, 0xbc00, 0, {0xb3,0x80,0x2c,0xe0,0x0b,0x74,0x00,0xc9,0x10,0xb3,0xc1,0x0f,0xf0,0x1b,0x3c,0x00 }},
+ {16, 0xbc10, 0, {0xcf,0x00,0xb7,0xc0,0x2c,0xe0,0x03,0x00,0x44,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbc20, 0, {0x81,0x04,0x6e,0x10,0x88,0x80,0x2c,0xc0,0x18,0x98,0x02,0x2d,0x80,0x81,0x00,0x36 }},
+ {16, 0xbc30, 0, {0x91,0x08,0xb0,0x03,0x68,0x00,0xc9,0x00,0x22,0x40,0x08,0x90,0x02,0x24,0x00,0x83 }},
+ {16, 0xbc40, 0, {0x80,0x36,0xc0,0x0b,0x30,0x02,0x2c,0x02,0x83,0x00,0x20,0xc0,0x08,0x20,0x03,0x60 }},
+ {16, 0xbc50, 0, {0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x06,0x00,0x8a,0x80,0x2e,0x45 }},
+ {16, 0xbc60, 0, {0x28,0x88,0x02,0x24,0x02,0x88,0x02,0x02,0x02,0x08,0x80,0x02,0xa2,0x00,0x98,0x00 }},
+ {16, 0xbc70, 0, {0x22,0x00,0x08,0x80,0x12,0x24,0x00,0x89,0x01,0x22,0xc1,0x0a,0xb0,0x02,0x6c,0x00 }},
+ {16, 0xbc80, 0, {0xab,0x00,0x22,0xc1,0x08,0x90,0x12,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbc90, 0, {0x08,0x04,0x00,0x00,0x80,0x00,0x2c,0xc0,0x48,0x08,0x12,0x00,0x80,0x80,0x02,0x24 }},
+ {16, 0xbca0, 0, {0x00,0x08,0x18,0x42,0xac,0x02,0x8b,0x80,0x22,0xe0,0x08,0xb8,0x12,0x04,0x02,0x83 }},
+ {16, 0xbcb0, 0, {0x00,0x20,0xc0,0x0b,0x30,0x42,0x0c,0x00,0xa3,0x01,0x60,0xc0,0x48,0x10,0x02,0x42 }},
+ {16, 0xbcc0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x68,0x08,0xca,0x00,0x2e,0x40 }},
+ {16, 0xbcd0, 0, {0x08,0x80,0x03,0x00,0x00,0xc8,0x06,0x32,0x00,0x0c,0x80,0x02,0xa0,0x00,0xd8,0x00 }},
+ {16, 0xbce0, 0, {0x32,0x00,0x0c,0x80,0x03,0x74,0x00,0xcb,0x00,0x22,0xc0,0x0f,0xf0,0x03,0x3c,0x00 }},
+ {16, 0xbcf0, 0, {0xef,0x00,0x37,0xc0,0x0c,0x80,0x01,0x40,0x03,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbd00, 0, {0xa0,0x19,0xfc,0x00,0xfc,0x04,0x3f,0xc0,0x0f,0xc0,0x03,0xe1,0x00,0xfc,0x00,0x3b }},
+ {16, 0xbd10, 0, {0x00,0x0f,0xd0,0x03,0x7c,0x00,0xef,0x00,0x2f,0xc0,0x0f,0xf0,0x11,0xf4,0x10,0xfd }},
+ {16, 0xbd20, 0, {0x02,0x3d,0xc0,0x4f,0xf0,0x03,0xdc,0x00,0xdf,0x04,0x3f,0xc0,0x0f,0xc0,0x43,0xe9 }},
+ {16, 0xbd30, 0, {0x06,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x41,0x02,0x70,0x20,0xdc,0x10 }},
+ {16, 0xbd40, 0, {0x67,0x04,0x0d,0xc1,0x02,0x70,0x20,0x9c,0x10,0x37,0x04,0x0d,0xc1,0x06,0x70,0x40 }},
+ {16, 0xbd50, 0, {0x4c,0x10,0x37,0x14,0x15,0xc1,0x03,0x70,0x40,0xdc,0x10,0x13,0x04,0x0d,0xc1,0x07 }},
+ {16, 0xbd60, 0, {0x70,0x40,0xdc,0x10,0x37,0x04,0x0d,0xc0,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbd70, 0, {0x00,0xc5,0x44,0x05,0x71,0x21,0x5c,0x40,0x57,0x10,0x15,0xc4,0x05,0x71,0x05,0x5c }},
+ {16, 0xbd80, 0, {0x40,0x57,0x10,0x15,0xc4,0x06,0x71,0x01,0x4c,0x40,0x57,0x10,0x0d,0xc4,0x05,0x71 }},
+ {16, 0xbd90, 0, {0x05,0x5c,0x40,0x53,0x10,0x15,0xc4,0x07,0x71,0x01,0x5c,0x40,0x57,0x10,0x15,0xc0 }},
+ {16, 0xbda0, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x01,0x20,0x80,0x48,0x20 }},
+ {16, 0xbdb0, 0, {0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80 }},
+ {16, 0xbdc0, 0, {0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01 }},
+ {16, 0xbdd0, 0, {0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbde0, 0, {0x00,0x84,0x00,0x01,0x60,0x00,0x58,0x00,0x56,0x00,0x05,0x80,0x01,0x60,0x04,0x58 }},
+ {16, 0xbdf0, 0, {0x00,0x16,0x00,0x05,0x80,0x01,0x20,0x01,0x58,0x00,0x16,0x00,0x05,0x80,0x01,0x60 }},
+ {16, 0xbe00, 0, {0x00,0x58,0x00,0x56,0x00,0x05,0x80,0x01,0x60,0x00,0x58,0x00,0x16,0x00,0x01,0x80 }},
+ {16, 0xbe10, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x48,0x05,0x72,0x11,0x5c,0x80 }},
+ {16, 0xbe20, 0, {0x17,0x20,0x15,0xd8,0x05,0x32,0x11,0x1c,0x80,0x47,0x20,0x14,0x88,0x00,0x72,0x01 }},
+ {16, 0xbe30, 0, {0x1c,0x80,0x57,0x20,0x05,0xc8,0x04,0x72,0x01,0x5c,0x80,0x57,0x20,0x15,0xc8,0x01 }},
+ {16, 0xbe40, 0, {0x72,0x01,0x5c,0x80,0x57,0x24,0x15,0xc0,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbe50, 0, {0x00,0xc1,0x40,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x40,0x20,0x00,0x18 }},
+ {16, 0xbe60, 0, {0x00,0x06,0x00,0x01,0x90,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x41,0x80,0x00,0x60 }},
+ {16, 0xbe70, 0, {0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x00,0x18,0x10,0x06,0x00,0x01,0x80 }},
+ {16, 0xbe80, 0, {0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x48,0x04,0x22,0x01,0x08,0x80 }},
+ {16, 0xbe90, 0, {0x02,0x20,0x10,0x88,0x04,0x62,0x01,0x08,0x80,0x42,0x20,0x10,0x88,0x00,0x20,0x01 }},
+ {16, 0xbea0, 0, {0x08,0x80,0x42,0x20,0x00,0x88,0x04,0x22,0x01,0x08,0x00,0x42,0x20,0x10,0x88,0x00 }},
+ {16, 0xbeb0, 0, {0x22,0x01,0x08,0x80,0x42,0x30,0x10,0x80,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbec0, 0, {0x00,0xc5,0x4a,0x05,0x42,0x81,0x50,0xa0,0x04,0x28,0x15,0x0a,0x05,0x52,0x81,0x10 }},
+ {16, 0xbed0, 0, {0xa0,0x44,0x28,0x11,0x1a,0x00,0x40,0x80,0x10,0xa0,0x54,0x28,0x05,0x0a,0x05,0x42 }},
+ {16, 0xbee0, 0, {0x81,0x51,0x20,0x14,0x28,0x15,0x0a,0x01,0x42,0x81,0x50,0xa0,0x54,0x28,0x15,0x00 }},
+ {16, 0xbef0, 0, {0x31,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0c,0x01,0x53,0x40,0x54,0xc0 }},
+ {16, 0xbf00, 0, {0x15,0x30,0x05,0x5c,0x01,0x57,0x40,0x54,0xc0,0x15,0x30,0x05,0x5c,0x01,0x53,0x00 }},
+ {16, 0xbf10, 0, {0x55,0xc0,0x15,0x74,0x05,0x4c,0x01,0x53,0x00,0x55,0xc0,0x15,0x74,0x05,0x4c,0x01 }},
+ {16, 0xbf20, 0, {0x53,0x00,0x54,0xc0,0x11,0x30,0x01,0x40,0x21,0x10,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbf30, 0, {0x00,0x80,0x00,0x00,0x40,0x00,0x10,0x00,0x04,0x00,0x01,0x00,0x00,0x40,0x00,0x10 }},
+ {16, 0xbf40, 0, {0x00,0x04,0x00,0x01,0x00,0x00,0x42,0x00,0x10,0x00,0x04,0x00,0x11,0x00,0x00,0x40 }},
+ {16, 0xbf50, 0, {0x00,0x10,0xc1,0x04,0x00,0x01,0x00,0x00,0x40,0x00,0x10,0x00,0x01,0x10,0x01,0x01 }},
+ {16, 0xbf60, 0, {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x60,0x02,0x08,0x00,0x82,0x00 }},
+ {16, 0xbf70, 0, {0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00 }},
+ {16, 0xbf80, 0, {0x82,0x00,0x20,0x84,0x00,0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x84,0x08,0x20,0x02 }},
+ {16, 0xbf90, 0, {0x08,0x00,0x82,0x00,0x21,0x80,0x08,0x01,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xbfa0, 0, {0x00,0xc5,0x40,0x05,0x60,0x01,0x58,0x00,0x96,0x00,0x15,0x90,0x05,0x64,0x02,0x58 }},
+ {16, 0xbfb0, 0, {0x00,0x56,0x00,0x55,0x90,0x05,0x60,0x01,0xd9,0x00,0x16,0x40,0x15,0x80,0x05,0x60 }},
+ {16, 0xbfc0, 0, {0x01,0x59,0x00,0x76,0x40,0x15,0x80,0x05,0x60,0x01,0x58,0x00,0x56,0x00,0x15,0x80 }},
+ {16, 0xbfd0, 0, {0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0x40,0x03,0x60,0x00,0xd8,0x00 }},
+ {16, 0xbfe0, 0, {0x36,0x00,0x4d,0x80,0x03,0x60,0x00,0xd8,0x00,0x36,0x00,0x0d,0x80,0x07,0x62,0x00 }},
+ {16, 0xbff0, 0, {0x58,0x00,0x36,0x00,0x0d,0x80,0x07,0x60,0x00,0xd8,0x80,0x16,0x00,0x0d,0x80,0x03 }},
+ {16, 0xc000, 0, {0x60,0x00,0xd8,0x00,0x36,0x00,0x1d,0x80,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc010, 0, {0x00,0xc5,0x42,0x04,0x30,0x81,0x0c,0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c }},
+ {16, 0xc020, 0, {0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0xc1,0x0c,0x20,0x43,0x08,0x10,0xc2,0x06,0x30 }},
+ {16, 0xc030, 0, {0x81,0x0c,0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c,0x20,0x43,0x08,0x18,0xc0 }},
+ {16, 0xc040, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x30,0x00,0x0c,0x00 }},
+ {16, 0xc050, 0, {0x03,0x00,0x00,0xc0,0x00,0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x40,0x30,0x00 }},
+ {16, 0xc060, 0, {0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x00 }},
+ {16, 0xc070, 0, {0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc080, 0, {0x00,0x80,0x02,0x01,0x30,0x80,0x4c,0x20,0x13,0x08,0x04,0xc2,0x01,0x30,0x80,0x4c }},
+ {16, 0xc090, 0, {0x20,0x13,0x08,0x04,0xc2,0x25,0x30,0x81,0x4c,0x20,0x13,0x08,0x04,0xc2,0x01,0x30 }},
+ {16, 0xc0a0, 0, {0x80,0x4c,0x32,0x53,0x08,0x04,0xc2,0x01,0x30,0x80,0x4c,0x20,0x13,0x08,0x04,0xc0 }},
+ {16, 0xc0b0, 0, {0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x42,0x05,0x62,0x81,0x58,0x20 }},
+ {16, 0xc0c0, 0, {0x56,0x08,0x15,0x82,0x04,0x60,0x81,0x58,0x20,0x46,0x08,0x15,0x82,0x01,0x60,0xc1 }},
+ {16, 0xc0d0, 0, {0x58,0x20,0x46,0x08,0x15,0x82,0x01,0x60,0x81,0x58,0x30,0x56,0x08,0x15,0x82,0x05 }},
+ {16, 0xc0e0, 0, {0x60,0x81,0x58,0x20,0x56,0x08,0x05,0x80,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc0f0, 0, {0x00,0xc5,0x42,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x08 }},
+ {16, 0xc100, 0, {0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x0c,0x20,0x02,0x08,0x00,0x82,0x00,0x20 }},
+ {16, 0xc110, 0, {0x80,0x08,0x20,0x03,0x08,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x80 }},
+ {16, 0xc120, 0, {0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x42,0x04,0x66,0x81,0x18,0x20 }},
+ {16, 0xc130, 0, {0x46,0x08,0x11,0x82,0x04,0x64,0x81,0x18,0x20,0x46,0x08,0x11,0x82,0x00,0x60,0x81 }},
+ {16, 0xc140, 0, {0x0c,0x20,0x46,0x08,0x11,0x82,0x00,0x60,0x81,0x19,0x20,0x43,0x08,0x11,0x82,0x04 }},
+ {16, 0xc150, 0, {0x60,0x81,0x19,0x20,0x46,0x48,0x01,0x80,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc160, 0, {0x00,0xc5,0x60,0x05,0x58,0x01,0x56,0x00,0x55,0x80,0x15,0x60,0x04,0x58,0x01,0x56 }},
+ {16, 0xc170, 0, {0x00,0x45,0x80,0x11,0x60,0x00,0x58,0x00,0x06,0x00,0x45,0x80,0x15,0x60,0x01,0x58 }},
+ {16, 0xc180, 0, {0x01,0x16,0x00,0x01,0x80,0x15,0x60,0x05,0x58,0x01,0x56,0x00,0x55,0x80,0x05,0x40 }},
+ {16, 0xc190, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x01,0x49,0x80,0x10,0x60 }},
+ {16, 0xc1a0, 0, {0x14,0x18,0x05,0x06,0x01,0x79,0x80,0x50,0x60,0x14,0x18,0x01,0x06,0x01,0x41,0x80 }},
+ {16, 0xc1b0, 0, {0x50,0x60,0x04,0x18,0x05,0x06,0x01,0x41,0x80,0x10,0x60,0x14,0x18,0x05,0x06,0x01 }},
+ {16, 0xc1c0, 0, {0x41,0x80,0x50,0x60,0x14,0x18,0x05,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc1d0, 0, {0x00,0x80,0x02,0x01,0x04,0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x00,0x04,0x04,0x40 }},
+ {16, 0xc1e0, 0, {0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x84,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x00 }},
+ {16, 0xc1f0, 0, {0x80,0x41,0x20,0x10,0x08,0x04,0x02,0x11,0x00,0x80,0x41,0x20,0x10,0x48,0x04,0x00 }},
+ {16, 0xc200, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x46,0x03,0x51,0x80,0xd4,0x60 }},
+ {16, 0xc210, 0, {0x35,0x18,0x0d,0x46,0x02,0x11,0x80,0xd4,0x60,0x35,0x18,0x0d,0x46,0x03,0x11,0x80 }},
+ {16, 0xc220, 0, {0xd4,0x60,0x35,0x18,0x0d,0x46,0x03,0x51,0x80,0xd4,0x60,0x35,0x18,0x0d,0x46,0x03 }},
+ {16, 0xc230, 0, {0x51,0x80,0xd4,0x60,0x35,0x18,0x0d,0x40,0x31,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc240, 0, {0x00,0xc5,0x46,0x05,0x70,0x81,0x5c,0x60,0x07,0x18,0x15,0xc6,0x04,0x71,0x81,0x1c }},
+ {16, 0xc250, 0, {0x60,0x17,0x18,0x15,0xc6,0x05,0x31,0x81,0xdc,0x60,0x57,0x18,0x15,0xc6,0x05,0x71 }},
+ {16, 0xc260, 0, {0x80,0x1c,0x60,0x77,0x18,0x15,0xce,0x05,0x71,0x81,0x5c,0x60,0x57,0x18,0x15,0xc0 }},
+ {16, 0xc270, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x46,0x02,0x71,0x80,0x9c,0x61 }},
+ {16, 0xc280, 0, {0x77,0x18,0x0d,0xc6,0x02,0x71,0x80,0x9c,0x60,0x37,0x18,0x0d,0xc2,0x03,0x31,0x80 }},
+ {16, 0xc290, 0, {0x5c,0x60,0x27,0x18,0x0d,0xc6,0x03,0x71,0x80,0x9c,0x60,0x17,0x18,0x0d,0xce,0x03 }},
+ {16, 0xc2a0, 0, {0x71,0x80,0xdc,0x60,0x37,0x18,0x0d,0xc0,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc2b0, 0, {0x00,0x45,0x46,0x05,0x75,0x81,0x5c,0x60,0x77,0x18,0x15,0xc6,0x05,0x75,0x81,0x5c }},
+ {16, 0xc2c0, 0, {0x60,0x57,0x18,0x15,0xc6,0x05,0x31,0x81,0x0c,0x60,0x57,0x18,0x15,0xc6,0x05,0x71 }},
+ {16, 0xc2d0, 0, {0x81,0x5c,0x60,0x43,0x18,0x15,0xc6,0x05,0x71,0x81,0x5c,0x60,0x57,0x18,0x15,0xc0 }},
+ {16, 0xc2e0, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x02,0x01,0x20,0x80,0x48,0x20 }},
+ {16, 0xc2f0, 0, {0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80 }},
+ {16, 0xc300, 0, {0x5c,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80,0x48,0x00,0x17,0x08,0x04,0x82,0x01 }},
+ {16, 0xc310, 0, {0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc320, 0, {0x00,0x00,0x06,0x01,0x63,0x80,0x58,0x60,0x16,0x18,0x05,0x86,0x01,0x61,0x80,0x58 }},
+ {16, 0xc330, 0, {0x60,0x16,0x18,0x05,0x86,0x01,0x61,0x81,0x58,0x60,0x16,0x18,0x05,0x86,0x01,0x61 }},
+ {16, 0xc340, 0, {0x80,0x58,0x60,0x56,0x18,0x05,0x86,0x01,0x61,0x80,0x58,0x60,0x16,0x18,0x05,0x80 }},
+ {16, 0xc350, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x40,0x05,0x70,0x01,0x5c,0x00 }},
+ {16, 0xc360, 0, {0x17,0x00,0x15,0xc0,0x85,0x74,0x01,0x1c,0x00,0x47,0x00,0x11,0xc0,0x05,0x70,0x01 }},
+ {16, 0xc370, 0, {0x5c,0x00,0x53,0x00,0x10,0xc0,0x05,0x70,0x01,0x5c,0x00,0x57,0x00,0x14,0xc9,0x04 }},
+ {16, 0xc380, 0, {0x70,0x01,0x1c,0x00,0x57,0x00,0x15,0xc0,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc390, 0, {0x00,0x45,0x42,0x00,0x60,0xc0,0x18,0x20,0x06,0x08,0x01,0x82,0x00,0x60,0x80,0x18 }},
+ {16, 0xc3a0, 0, {0x20,0x06,0x08,0x01,0x82,0x00,0x20,0x80,0x18,0x30,0x02,0x08,0x00,0x82,0x10,0x60 }},
+ {16, 0xc3b0, 0, {0x80,0x18,0x20,0x06,0x08,0x00,0x82,0x00,0x60,0x80,0x18,0x20,0x06,0x08,0x01,0x80 }},
+ {16, 0xc3c0, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x42,0x04,0x20,0x81,0x08,0x20 }},
+ {16, 0xc3d0, 0, {0x02,0x08,0x10,0x82,0x04,0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x82,0x04,0x20,0x81 }},
+ {16, 0xc3e0, 0, {0x08,0x20,0x46,0x08,0x11,0x82,0x04,0x20,0x81,0x08,0x20,0x42,0x08,0x11,0x82,0x04 }},
+ {16, 0xc3f0, 0, {0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x80,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc400, 0, {0x00,0x45,0x42,0x05,0x40,0xc5,0x50,0x20,0x14,0x08,0x15,0x00,0x04,0x40,0x81,0x50 }},
+ {16, 0xc410, 0, {0x20,0x54,0x08,0x11,0x02,0x05,0x00,0x80,0x10,0x20,0x45,0x0c,0x11,0x42,0x04,0x40 }},
+ {16, 0xc420, 0, {0x81,0x50,0x20,0x14,0x0c,0x15,0x42,0x04,0x40,0x81,0x10,0x20,0x54,0x08,0x15,0x00 }},
+ {16, 0xc430, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x03,0x01,0x50,0xc0,0x44,0x30 }},
+ {16, 0xc440, 0, {0x15,0x0c,0x05,0x43,0x01,0x50,0xc0,0x4c,0x30,0x15,0x0c,0x05,0x43,0x21,0x50,0xc0 }},
+ {16, 0xc450, 0, {0x54,0x30,0x15,0x0c,0x05,0x43,0x01,0x50,0xc0,0x54,0x30,0x15,0x0c,0x05,0x43,0x01 }},
+ {16, 0xc460, 0, {0x50,0xc0,0x54,0x20,0x15,0x0c,0x05,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc470, 0, {0x00,0x00,0x08,0x00,0x42,0x00,0x04,0x80,0x04,0x20,0x01,0x08,0x00,0x42,0x00,0x04 }},
+ {16, 0xc480, 0, {0x80,0x04,0x20,0x01,0x08,0x00,0x02,0x00,0x10,0x00,0x04,0x00,0x01,0x08,0x00,0x42 }},
+ {16, 0xc490, 0, {0x00,0x10,0x80,0x04,0x00,0x01,0x08,0x00,0x42,0x00,0x10,0x80,0x04,0x20,0x01,0x00 }},
+ {16, 0xc4a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x42,0x02,0x00,0x80,0x84,0x20 }},
+ {16, 0xc4b0, 0, {0x20,0x08,0x08,0x02,0x02,0x00,0x80,0x84,0x20,0x20,0x08,0x08,0x02,0x02,0x00,0x80 }},
+ {16, 0xc4c0, 0, {0x80,0xa0,0x20,0x28,0x08,0x02,0x02,0x00,0x80,0x80,0x20,0x20,0x28,0x08,0x02,0x02 }},
+ {16, 0xc4d0, 0, {0x00,0x80,0x80,0x20,0x20,0x08,0x08,0x00,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc4e0, 0, {0x00,0x45,0x40,0x05,0x60,0x41,0x58,0x00,0x56,0x00,0x15,0x80,0x05,0x60,0x01,0x58 }},
+ {16, 0xc4f0, 0, {0x00,0x56,0x00,0x15,0x80,0x05,0x20,0x01,0xd8,0x00,0x56,0x00,0x15,0x80,0x05,0x60 }},
+ {16, 0xc500, 0, {0x01,0x58,0x00,0x76,0x00,0x15,0x80,0x05,0x60,0x01,0x58,0x00,0x56,0x00,0x15,0x80 }},
+ {16, 0xc510, 0, {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc5,0x40,0x03,0x60,0x00,0xd8,0x00 }},
+ {16, 0xc520, 0, {0x26,0x00,0x0d,0x80,0x02,0x60,0x00,0xd8,0x00,0x36,0x00,0x0d,0x80,0x07,0x60,0x01 }},
+ {16, 0xc530, 0, {0x5c,0x00,0x36,0x00,0x0d,0x80,0x03,0x60,0x00,0xd8,0x00,0x57,0x00,0x0d,0x80,0x02 }},
+ {16, 0xc540, 0, {0x60,0x00,0x98,0x00,0x36,0x00,0x0d,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc550, 0, {0x00,0x00,0x00,0x04,0x30,0x21,0x0c,0x00,0x43,0x00,0x10,0xc0,0x04,0x30,0x01,0x0c }},
+ {16, 0xc560, 0, {0x00,0x43,0x00,0x10,0xc0,0x04,0x30,0x01,0x18,0x00,0x43,0x00,0x10,0xc0,0x04,0x30 }},
+ {16, 0xc570, 0, {0x01,0x0c,0x00,0x46,0x00,0x10,0xc0,0x04,0x30,0x01,0x0c,0x00,0x43,0x00,0x10,0xc0 }},
+ {16, 0xc580, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x0c,0x00 }},
+ {16, 0xc590, 0, {0x03,0x00,0x00,0xc0,0x00,0x35,0x08,0x0c,0x00,0x03,0x00,0x00,0xc6,0x00,0x14,0x00 }},
+ {16, 0xc5a0, 0, {0x08,0x00,0x03,0x40,0x00,0xc0,0x00,0x30,0x00,0x0d,0x40,0x02,0x00,0x00,0xc0,0x00 }},
+ {16, 0xc5b0, 0, {0x30,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc5c0, 0, {0x00,0x00,0x05,0x01,0x31,0x40,0x4c,0x50,0x13,0x14,0x04,0xc5,0x01,0x31,0xc0,0x4c }},
+ {16, 0xc5d0, 0, {0x50,0x13,0x14,0x04,0xc5,0x05,0x31,0x41,0x4c,0x50,0x13,0x14,0x04,0xc5,0x01,0x31 }},
+ {16, 0xc5e0, 0, {0x40,0x4c,0x70,0x53,0x14,0x04,0xc5,0x01,0x31,0x40,0x4c,0x40,0x13,0x14,0x04,0xc0 }},
+ {16, 0xc5f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x05,0x68,0xc1,0x5a,0x30 }},
+ {16, 0xc600, 0, {0x56,0x8c,0x15,0xa3,0x05,0x69,0xc1,0x5a,0x30,0x46,0x8c,0x11,0xa7,0x01,0x68,0xc0 }},
+ {16, 0xc610, 0, {0x1a,0x30,0x56,0x8c,0x11,0xa3,0x04,0x68,0xc1,0x1a,0x30,0x16,0x8c,0x15,0xa3,0x04 }},
+ {16, 0xc620, 0, {0x68,0xc1,0x5a,0x30,0x56,0x8c,0x11,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc630, 0, {0x00,0x00,0x00,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0x00,0x24,0x00,0x08 }},
+ {16, 0xc640, 0, {0x01,0x02,0x00,0x00,0x80,0x00,0x24,0x00,0x08,0x80,0x02,0x60,0x00,0x80,0x00,0x20 }},
+ {16, 0xc650, 0, {0x00,0x09,0x40,0x02,0x20,0x00,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80 }},
+ {16, 0xc660, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x44,0x62,0x11,0x18,0x84 }},
+ {16, 0xc670, 0, {0x46,0x21,0x11,0x88,0x44,0x62,0x09,0x18,0x84,0x46,0x21,0x11,0x88,0x60,0x62,0x10 }},
+ {16, 0xc680, 0, {0x18,0x04,0x46,0x01,0x11,0x88,0x44,0x62,0x11,0x18,0x80,0x06,0x01,0x11,0x88,0x44 }},
+ {16, 0xc690, 0, {0x62,0x11,0x18,0x84,0x46,0x21,0x11,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc6a0, 0, {0x00,0x00,0x00,0x45,0x50,0x11,0x54,0x04,0x55,0x01,0x15,0x40,0x44,0x50,0x11,0x54 }},
+ {16, 0xc6b0, 0, {0x04,0x45,0x01,0x11,0x40,0x40,0x50,0x10,0x54,0x04,0x45,0x01,0x15,0x40,0x44,0x50 }},
+ {16, 0xc6c0, 0, {0x11,0x14,0x00,0x15,0x01,0x15,0x40,0x44,0x50,0x11,0x54,0x04,0x55,0x00,0x11,0x40 }},
+ {16, 0xc6d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x21,0x42,0x08,0x50,0x82 }},
+ {16, 0xc6e0, 0, {0x14,0x20,0x85,0x08,0x21,0x42,0x00,0x50,0x82,0x14,0x20,0x85,0x08,0x20,0x42,0x08 }},
+ {16, 0xc6f0, 0, {0x50,0x82,0x15,0x20,0x05,0x48,0x21,0x42,0x08,0x50,0x82,0x14,0x20,0x81,0x40,0x21 }},
+ {16, 0xc700, 0, {0x42,0x08,0x50,0x82,0x14,0x20,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc710, 0, {0x00,0x00,0x0a,0x01,0x02,0x80,0x40,0xa0,0x10,0x28,0x04,0x0a,0x01,0x02,0x84,0x40 }},
+ {16, 0xc720, 0, {0xa1,0x10,0x28,0x04,0x0a,0x01,0x02,0x80,0x40,0xa0,0x00,0x28,0x00,0x0a,0x01,0x02 }},
+ {16, 0xc730, 0, {0x80,0x40,0xb0,0x10,0x28,0x00,0x0a,0x01,0x02,0x80,0x40,0xa0,0x10,0x28,0x04,0x00 }},
+ {16, 0xc740, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x03,0x53,0x00,0xd4,0xc0 }},
+ {16, 0xc750, 0, {0x35,0x30,0x0d,0x4c,0x03,0x53,0x00,0xd4,0xc0,0x35,0x30,0x0d,0x4c,0x03,0x53,0x00 }},
+ {16, 0xc760, 0, {0xd4,0xc0,0x21,0x30,0x08,0x4c,0x03,0x53,0x00,0xd4,0xc0,0x35,0x30,0x08,0x4c,0x03 }},
+ {16, 0xc770, 0, {0x53,0x00,0xd4,0xc0,0x35,0x30,0x0d,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc780, 0, {0x00,0x00,0x08,0x04,0x70,0x01,0x5c,0x80,0x07,0x20,0x25,0xc9,0x04,0x72,0x01,0x5c }},
+ {16, 0xc790, 0, {0x80,0x47,0x20,0x15,0xc8,0x00,0x72,0x05,0xdc,0x80,0x57,0x20,0x15,0xc8,0x05,0x72 }},
+ {16, 0xc7a0, 0, {0x01,0x1c,0x90,0x67,0x20,0x15,0xc8,0x05,0x72,0x01,0x1c,0x80,0x57,0x20,0x15,0xc0 }},
+ {16, 0xc7b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x18,0x48,0xc2,0x12,0x31 }},
+ {16, 0xc7c0, 0, {0x84,0x8c,0x61,0x03,0x18,0x40,0xc8,0x12,0x31,0x84,0x8c,0x61,0x03,0x18,0x48,0xc4 }},
+ {16, 0xc7d0, 0, {0x10,0x31,0x84,0x0c,0x41,0x23,0x18,0x48,0xc6,0x10,0x30,0x04,0x0c,0x61,0x23,0x18 }},
+ {16, 0xc7e0, 0, {0x48,0xc6,0x12,0x30,0x84,0x8c,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc7f0, 0, {0x00,0x00,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3 }},
+ {16, 0xc800, 0, {0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f }},
+ {16, 0xc810, 0, {0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xbd,0x00 }},
+ {16, 0xc820, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc830, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc840, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc850, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc860, 0, {0x00,0x00,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x09,0x36,0xc2 }},
+ {16, 0xc870, 0, {0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b }},
+ {16, 0xc880, 0, {0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x2c,0x00 }},
+ {16, 0xc890, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x3c,0x4c,0xcf,0x13,0x33 }},
+ {16, 0xc8a0, 0, {0xc4,0xcc,0xf1,0x33,0x3c,0x4d,0x4e,0x93,0x33,0xc4,0xcc,0xf1,0x2b,0x3c,0x4c,0xcf }},
+ {16, 0xc8b0, 0, {0x13,0x33,0xc4,0xcc,0xe9,0x33,0x3c,0x4c,0xcf,0x12,0xb5,0xc4,0xcc,0xf1,0x33,0x3c }},
+ {16, 0xc8c0, 0, {0x4c,0xcf,0x13,0x33,0xc4,0xcd,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc8d0, 0, {0x00,0x00,0x3b,0x7e,0x4e,0xc7,0x93,0xb7,0xe4,0xed,0xf9,0x23,0x7e,0x4e,0x47,0x93 }},
+ {16, 0xc8e0, 0, {0xb7,0xe4,0xed,0xf9,0x3f,0x7e,0x4e,0xde,0x12,0x37,0xe4,0x8d,0xf9,0x3b,0x7e,0x4e }},
+ {16, 0xc8f0, 0, {0xdf,0x93,0xf7,0x84,0x8d,0xf9,0x3b,0x7e,0x4e,0xdf,0x93,0xb1,0xe4,0xed,0xb9,0x00 }},
+ {16, 0xc900, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x70,0x40,0x9c,0x11 }},
+ {16, 0xc910, 0, {0x67,0x04,0x19,0xc3,0x02,0x70,0x40,0x9c,0x10,0x27,0x04,0x09,0xc1,0x02,0x70,0x40 }},
+ {16, 0xc920, 0, {0x1c,0x10,0x27,0x14,0x01,0xc1,0x02,0x70,0x40,0x9c,0x50,0x07,0x04,0x09,0xc1,0x02 }},
+ {16, 0xc930, 0, {0x70,0x40,0x9c,0x10,0x67,0x14,0x11,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc940, 0, {0x00,0x00,0x04,0x05,0x71,0x01,0x5c,0x40,0x57,0x10,0x15,0xc4,0x05,0x71,0x01,0x5c }},
+ {16, 0xc950, 0, {0x40,0x57,0x10,0x15,0xc6,0x05,0x71,0x01,0x5c,0x40,0x57,0x10,0x10,0xc4,0x05,0x71 }},
+ {16, 0xc960, 0, {0x01,0x5c,0x64,0x03,0x10,0x55,0xc4,0x05,0x71,0x01,0x5c,0x40,0x57,0x10,0x15,0xc0 }},
+ {16, 0xc970, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x20,0x80,0x48,0x20 }},
+ {16, 0xc980, 0, {0x12,0x08,0x04,0x82,0x01,0x21,0x80,0x48,0x20,0x12,0x08,0x04,0x80,0x01,0x20,0x80 }},
+ {16, 0xc990, 0, {0x48,0x20,0x12,0x08,0x05,0xc2,0x01,0x20,0x80,0x48,0x24,0x17,0x08,0x04,0x82,0x01 }},
+ {16, 0xc9a0, 0, {0x20,0x80,0x48,0x20,0x12,0x08,0x04,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xc9b0, 0, {0x00,0x00,0x00,0x00,0x60,0x00,0x18,0x00,0x46,0x00,0x11,0x84,0x00,0x60,0x00,0x18 }},
+ {16, 0xc9c0, 0, {0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x01,0x18,0x00,0x06,0x10,0x91,0x80,0x00,0x60 }},
+ {16, 0xc9d0, 0, {0x00,0x18,0x46,0x46,0x18,0x01,0x80,0x00,0x60,0x00,0x18,0x00,0x06,0x10,0x01,0x80 }},
+ {16, 0xc9e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x73,0x01,0x1c,0x80 }},
+ {16, 0xc9f0, 0, {0x07,0x20,0x01,0xc8,0x04,0x72,0x01,0x1c,0x80,0x47,0x20,0x11,0xc8,0x04,0x72,0x01 }},
+ {16, 0xca00, 0, {0x1c,0x80,0x47,0x22,0x11,0xc8,0x04,0x72,0x01,0x1c,0x80,0x07,0x20,0x11,0xc8,0x04 }},
+ {16, 0xca10, 0, {0x72,0x01,0x1c,0x80,0x07,0x28,0x11,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xca20, 0, {0x00,0x00,0x00,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x00,0x18 }},
+ {16, 0xca30, 0, {0x00,0x06,0x00,0x01,0x80,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80,0x00,0x60 }},
+ {16, 0xca40, 0, {0x00,0x18,0x00,0x46,0x04,0x01,0x80,0x00,0x60,0x00,0x18,0x00,0x06,0x00,0x01,0x80 }},
+ {16, 0xca50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x04,0x22,0x01,0x08,0x80 }},
+ {16, 0xca60, 0, {0x02,0x20,0x00,0x90,0x04,0x27,0x81,0x08,0x80,0x42,0x20,0x10,0x98,0x04,0x24,0x01 }},
+ {16, 0xca70, 0, {0x08,0x80,0x42,0x48,0x10,0x88,0x04,0x22,0x01,0x09,0x40,0x42,0x60,0x10,0x88,0x04 }},
+ {16, 0xca80, 0, {0x22,0x01,0x08,0xc0,0x02,0x40,0x10,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xca90, 0, {0x00,0x00,0x2a,0x04,0x4b,0x81,0x12,0xa0,0x04,0xa8,0x01,0x2a,0x04,0x4a,0x81,0x12 }},
+ {16, 0xcaa0, 0, {0xa0,0x44,0xa8,0x11,0x2a,0x04,0x48,0x80,0x12,0xa0,0x44,0x88,0x01,0x2a,0x04,0x4a }},
+ {16, 0xcab0, 0, {0x81,0x12,0x20,0x04,0xac,0x11,0x2a,0x04,0x4a,0x81,0x12,0xb0,0x44,0x9c,0x11,0x00 }},
+ {16, 0xcac0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0,0x0c,0x00,0x53,0x00,0x14,0xc0 }},
+ {16, 0xcad0, 0, {0x05,0x30,0x01,0x44,0x00,0x53,0x00,0x14,0xc0,0x05,0x30,0x04,0x0c,0x00,0x53,0x00 }},
+ {16, 0xcae0, 0, {0x14,0xc0,0x05,0xb0,0x01,0x4c,0x00,0x53,0x00,0x16,0xc0,0x01,0x30,0x01,0x4c,0x00 }},
+ {16, 0xcaf0, 0, {0x53,0x00,0x14,0xc0,0x01,0x38,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcb00, 0, {0x08,0xc0,0x00,0x10,0x40,0x00,0x10,0x00,0x04,0x00,0x01,0x10,0x00,0x44,0x80,0x10 }},
+ {16, 0xcb10, 0, {0x00,0x04,0x00,0x01,0x10,0x00,0x46,0x00,0x00,0x00,0x04,0x60,0x01,0x00,0x00,0x40 }},
+ {16, 0xcb20, 0, {0x00,0x11,0x60,0x02,0x40,0x01,0x00,0x10,0x40,0x00,0x10,0x60,0x01,0x50,0x10,0x40 }},
+ {16, 0xcb30, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0,0x40,0x02,0x00,0x00,0x80,0x00 }},
+ {16, 0xcb40, 0, {0x20,0x00,0x08,0x08,0x02,0x00,0x00,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00 }},
+ {16, 0xcb50, 0, {0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0x00,0x00,0x00,0x08,0x00,0x02 }},
+ {16, 0xcb60, 0, {0x00,0x00,0x80,0x00,0x21,0x00,0x08,0x40,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcb70, 0, {0x08,0xc0,0x40,0x04,0x60,0x01,0x18,0x00,0x46,0x00,0x11,0x80,0x04,0x60,0x01,0x18 }},
+ {16, 0xcb80, 0, {0x00,0x46,0x00,0x11,0x80,0x04,0x60,0x01,0xc8,0x00,0x46,0x00,0x19,0x80,0x00,0x60 }},
+ {16, 0xcb90, 0, {0x00,0x18,0x00,0x66,0x00,0x11,0x80,0x04,0x60,0x01,0x18,0x00,0x06,0x00,0x11,0x80 }},
+ {16, 0xcba0, 0, {0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x01,0x00,0x02,0x60,0x00,0x98,0x00 }},
+ {16, 0xcbb0, 0, {0x26,0x00,0x09,0x81,0x02,0x60,0x01,0x98,0x00,0x26,0x00,0x09,0x80,0x06,0x62,0x00 }},
+ {16, 0xcbc0, 0, {0x48,0x00,0x26,0x20,0x01,0xc0,0x02,0x60,0x01,0x98,0x00,0x07,0x00,0x09,0x80,0x02 }},
+ {16, 0xcbd0, 0, {0x60,0x00,0x98,0x00,0x26,0x00,0x11,0x82,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcbe0, 0, {0x40,0x45,0x42,0x04,0x30,0x81,0x0c,0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0x85,0x8c }},
+ {16, 0xcbf0, 0, {0x20,0x43,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c,0x20,0x43,0x48,0x11,0x82,0x04,0x30 }},
+ {16, 0xcc00, 0, {0x81,0x8d,0x20,0x46,0x08,0x10,0xc2,0x04,0x30,0x81,0x0c,0x20,0x43,0x0c,0x10,0xc0 }},
+ {16, 0xcc10, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x04,0x00,0x00,0x30,0x00,0x0c,0x00 }},
+ {16, 0xcc20, 0, {0x03,0x00,0x00,0xc0,0x00,0x10,0x00,0x0c,0x00,0x03,0x00,0x00,0xc0,0x00,0x30,0x00 }},
+ {16, 0xcc30, 0, {0x08,0x00,0x03,0x00,0x00,0x80,0x00,0x30,0x00,0x0c,0x80,0x02,0x00,0x00,0xc0,0x00 }},
+ {16, 0xcc40, 0, {0x30,0x00,0x0c,0x00,0x03,0x20,0x00,0xc0,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcc50, 0, {0x40,0x00,0x02,0x00,0x30,0x80,0x0c,0x21,0x03,0x08,0x00,0xc2,0x00,0x30,0x80,0x0c }},
+ {16, 0xcc60, 0, {0x20,0x03,0x08,0x00,0xc2,0x04,0x30,0xc1,0x0c,0x20,0x03,0x0c,0x10,0xc2,0x00,0x30 }},
+ {16, 0xcc70, 0, {0x80,0x0c,0xb0,0x43,0x08,0x00,0xc2,0x00,0x30,0x80,0x0c,0x20,0x03,0x28,0x10,0xc0 }},
+ {16, 0xcc80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x42,0x04,0x60,0x81,0x18,0x20 }},
+ {16, 0xcc90, 0, {0x46,0x08,0x11,0x82,0x04,0x60,0x80,0x18,0x20,0x46,0x08,0x11,0x82,0x00,0x60,0x81 }},
+ {16, 0xcca0, 0, {0x18,0x20,0x46,0x08,0x11,0x82,0x04,0x60,0x80,0x18,0x20,0x06,0x08,0x11,0x82,0x04 }},
+ {16, 0xccb0, 0, {0x60,0x81,0x18,0x20,0x46,0x0c,0x11,0xc0,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xccc0, 0, {0x40,0x01,0x42,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x08 }},
+ {16, 0xccd0, 0, {0x20,0x02,0x08,0x00,0x82,0x00,0x20,0x80,0x0c,0x20,0x02,0x08,0x00,0xc2,0x00,0x20 }},
+ {16, 0xcce0, 0, {0x80,0x08,0x20,0x42,0x08,0x00,0x82,0x00,0x20,0x80,0x08,0x20,0x02,0x08,0x01,0x80 }},
+ {16, 0xccf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x01,0x42,0x04,0x60,0x81,0x18,0x20 }},
+ {16, 0xcd00, 0, {0x46,0x08,0x11,0x82,0x04,0x60,0x80,0x18,0x20,0x46,0x08,0x11,0x82,0x00,0x60,0xc1 }},
+ {16, 0xcd10, 0, {0x0c,0x20,0x46,0x0c,0x10,0xc2,0x04,0x60,0x80,0x18,0x30,0x42,0x08,0x11,0x82,0x04 }},
+ {16, 0xcd20, 0, {0x60,0x81,0x18,0x20,0x46,0x08,0x10,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcd30, 0, {0x40,0x45,0x40,0x04,0x50,0x01,0x14,0x00,0x45,0x00,0x11,0x40,0x04,0x50,0x00,0x14 }},
+ {16, 0xcd40, 0, {0x00,0x45,0x00,0x11,0x40,0x00,0x50,0x00,0x04,0x00,0x45,0x00,0x00,0x40,0x04,0x50 }},
+ {16, 0xcd50, 0, {0x00,0x14,0x00,0x01,0x00,0x11,0x40,0x04,0x50,0x01,0x14,0x00,0x45,0x00,0x00,0x42 }},
+ {16, 0xcd60, 0, {0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x06,0x00,0x41,0x80,0x10,0x60 }},
+ {16, 0xcd70, 0, {0x04,0x18,0x01,0x06,0x00,0x41,0x80,0x10,0x60,0x04,0x18,0x01,0x06,0x00,0x41,0x80 }},
+ {16, 0xcd80, 0, {0x10,0x60,0x04,0x18,0x01,0x06,0x00,0x41,0x80,0x10,0x60,0x04,0x18,0x01,0x06,0x00 }},
+ {16, 0xcd90, 0, {0x41,0x80,0x10,0x60,0x04,0x18,0x01,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcda0, 0, {0x48,0x00,0x02,0x01,0x00,0x80,0x40,0x21,0x10,0x08,0x04,0x02,0x01,0x00,0x80,0x40 }},
+ {16, 0xcdb0, 0, {0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x80,0x40,0x21,0x10,0x08,0x04,0x02,0x01,0x00 }},
+ {16, 0xcdc0, 0, {0x80,0x40,0x30,0x10,0x08,0x04,0x02,0x11,0x00,0x84,0x40,0x20,0x10,0x08,0x14,0x00 }},
+ {16, 0xcdd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x46,0x03,0x51,0x80,0xd4,0x60 }},
+ {16, 0xcde0, 0, {0x35,0x18,0x0d,0x46,0x03,0x51,0x80,0xd4,0x60,0x35,0x18,0x0d,0x46,0x03,0x51,0x80 }},
+ {16, 0xcdf0, 0, {0xd4,0x60,0x35,0x10,0x0d,0x46,0x03,0x51,0x80,0xd4,0x40,0x35,0x18,0x0d,0x46,0x03 }},
+ {16, 0xce00, 0, {0x51,0x80,0xd4,0x60,0x35,0x18,0x0d,0x40,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xce10, 0, {0x00,0x01,0x46,0x04,0x71,0x81,0x1c,0x60,0x07,0x18,0x11,0xce,0x04,0x71,0x81,0x1c }},
+ {16, 0xce20, 0, {0x60,0x47,0x18,0x01,0xc6,0x04,0x71,0x81,0x9c,0x60,0x47,0x18,0x19,0xc6,0x04,0x71 }},
+ {16, 0xce30, 0, {0x80,0x1c,0x60,0x67,0x18,0x11,0xc6,0x04,0x71,0x81,0x1c,0x60,0x47,0x18,0x11,0xc0 }},
+ {16, 0xce40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x46,0x02,0x71,0x80,0x9c,0x60 }},
+ {16, 0xce50, 0, {0x27,0x18,0x09,0xc6,0x06,0x71,0x80,0x1c,0x60,0x27,0x18,0x09,0xc6,0x01,0x31,0x80 }},
+ {16, 0xce60, 0, {0x1c,0x60,0x07,0x18,0x09,0xc6,0x02,0x71,0x80,0x9c,0x60,0x07,0x18,0x09,0xc6,0x12 }},
+ {16, 0xce70, 0, {0x71,0x80,0x9c,0x60,0x33,0x18,0x01,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xce80, 0, {0x50,0x45,0x46,0x05,0x71,0x81,0x5c,0x60,0x57,0x18,0x15,0xc6,0x05,0x71,0x80,0x5c }},
+ {16, 0xce90, 0, {0x60,0x57,0x18,0x15,0xc6,0x01,0x31,0x81,0x0c,0x60,0x17,0x18,0x10,0xc6,0x05,0x71 }},
+ {16, 0xcea0, 0, {0x81,0x5c,0x60,0x03,0x18,0x15,0xc6,0x05,0x71,0x81,0x5c,0x60,0x53,0x18,0x18,0x82 }},
+ {16, 0xceb0, 0, {0x10,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x12,0x01,0x24,0x80,0x48,0x20 }},
+ {16, 0xcec0, 0, {0x12,0x08,0x04,0x82,0x01,0x24,0x80,0x48,0x20,0x12,0x08,0x04,0x82,0x01,0x20,0x80 }},
+ {16, 0xced0, 0, {0x58,0x20,0x52,0x0c,0x05,0x82,0x01,0x20,0x80,0x49,0x20,0x02,0x08,0x04,0x82,0x01 }},
+ {16, 0xcee0, 0, {0x20,0x80,0x49,0x20,0x12,0x48,0x04,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcef0, 0, {0x40,0x04,0x06,0x00,0x61,0x80,0x18,0x60,0x06,0x18,0x01,0x86,0x04,0x61,0x80,0x18 }},
+ {16, 0xcf00, 0, {0x60,0x06,0x18,0x01,0x86,0x00,0x61,0x81,0x48,0x60,0x06,0x18,0x14,0x86,0x00,0x61 }},
+ {16, 0xcf10, 0, {0x80,0x18,0x60,0x42,0x18,0x01,0x86,0x00,0x61,0x80,0x18,0x60,0x06,0x18,0x00,0x80 }},
+ {16, 0xcf20, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x60,0x04,0x78,0x01,0x1e,0x00 }},
+ {16, 0xcf30, 0, {0x47,0x80,0x11,0xe8,0x00,0x78,0x01,0x1e,0x00,0x47,0x80,0x11,0xe0,0x04,0x78,0x01 }},
+ {16, 0xcf40, 0, {0x1e,0x00,0x43,0x80,0x11,0xe0,0x04,0x78,0x01,0x1e,0x00,0x03,0x80,0x15,0xe0,0x04 }},
+ {16, 0xcf50, 0, {0x78,0x01,0x1e,0x00,0x47,0x80,0x11,0xc0,0x10,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcf60, 0, {0x40,0x01,0x12,0x00,0x64,0x80,0x18,0x20,0x06,0x08,0x01,0x82,0x00,0x64,0x80,0x18 }},
+ {16, 0xcf70, 0, {0x20,0x06,0x08,0x01,0x82,0x00,0x60,0x80,0x18,0x30,0x02,0x08,0x01,0x82,0x00,0x60 }},
+ {16, 0xcf80, 0, {0x80,0x19,0x30,0x42,0x08,0x00,0x82,0x00,0x60,0x80,0x19,0x20,0x06,0x48,0x01,0x80 }},
+ {16, 0xcf90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x42,0x04,0x20,0x81,0x08,0x20 }},
+ {16, 0xcfa0, 0, {0x42,0x08,0x10,0x82,0x00,0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x82,0x04,0x20,0x81 }},
+ {16, 0xcfb0, 0, {0x08,0x20,0x46,0x08,0x10,0x82,0x04,0x20,0x81,0x08,0x20,0x42,0x08,0x11,0x82,0x04 }},
+ {16, 0xcfc0, 0, {0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xcfd0, 0, {0x40,0x45,0x42,0x04,0x40,0x81,0x10,0x20,0x44,0x08,0x11,0x02,0x00,0x40,0x81,0x10 }},
+ {16, 0xcfe0, 0, {0x20,0x44,0x08,0x11,0x02,0x04,0x40,0x80,0x10,0x20,0x45,0x08,0x01,0x02,0x04,0x40 }},
+ {16, 0xcff0, 0, {0x81,0x10,0x21,0x00,0x0c,0x11,0x02,0x04,0x40,0x81,0x10,0x20,0x44,0x08,0x01,0x00 }},
+ {16, 0xd000, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x03,0x00,0x50,0xc0,0x14,0x30 }},
+ {16, 0xd010, 0, {0x05,0x0c,0x01,0x43,0x00,0x50,0xc0,0x14,0x30,0x05,0x0c,0x01,0x43,0x00,0x50,0xc0 }},
+ {16, 0xd020, 0, {0x14,0x30,0x05,0x0c,0x01,0x43,0x00,0x50,0xc0,0x14,0x30,0x05,0x0c,0x01,0x43,0x00 }},
+ {16, 0xd030, 0, {0x50,0xc0,0x14,0x30,0x05,0x0c,0x01,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd040, 0, {0x40,0x00,0x08,0x00,0x42,0x04,0x10,0x80,0x04,0x20,0x01,0x09,0x00,0x42,0x01,0x10 }},
+ {16, 0xd050, 0, {0x80,0x04,0x20,0x01,0x08,0x00,0x42,0x00,0x10,0x00,0x04,0x20,0x01,0x08,0x00,0x42 }},
+ {16, 0xd060, 0, {0x00,0x10,0x00,0x04,0x00,0x01,0x08,0x00,0x42,0x00,0x10,0x80,0x04,0x20,0x11,0x00 }},
+ {16, 0xd070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x42,0x02,0x00,0x80,0x80,0x20 }},
+ {16, 0xd080, 0, {0x20,0x08,0x08,0x02,0x02,0x00,0x80,0x00,0x20,0x20,0x08,0x08,0x02,0x00,0x00,0x80 }},
+ {16, 0xd090, 0, {0x80,0xa0,0x00,0x0a,0x08,0x02,0x02,0x00,0x80,0x80,0x34,0x62,0x28,0x08,0x02,0x02 }},
+ {16, 0xd0a0, 0, {0x00,0x80,0x80,0x30,0x20,0x0c,0x08,0x00,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd0b0, 0, {0x40,0x01,0x40,0x04,0x60,0x01,0x18,0x00,0x46,0x00,0x11,0x80,0x04,0x60,0x03,0x18 }},
+ {16, 0xd0c0, 0, {0x00,0x46,0x00,0x11,0x80,0x06,0x60,0x01,0x98,0x00,0x46,0x00,0x11,0x80,0x04,0x60 }},
+ {16, 0xd0d0, 0, {0x01,0x18,0x00,0x66,0x00,0x11,0x80,0x04,0x60,0x01,0x18,0x00,0x46,0x00,0x11,0x80 }},
+ {16, 0xd0e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x00,0x02,0x60,0x00,0x98,0x00 }},
+ {16, 0xd0f0, 0, {0x26,0x00,0x09,0x80,0x02,0x64,0x00,0x98,0x00,0x26,0x00,0x19,0x90,0x02,0x60,0x00 }},
+ {16, 0xd100, 0, {0x1d,0x00,0x26,0x00,0x01,0xc0,0x02,0x60,0x00,0x99,0x00,0x06,0x40,0x19,0x80,0x02 }},
+ {16, 0xd110, 0, {0x60,0x00,0x98,0x00,0x66,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd120, 0, {0x40,0x45,0x60,0x04,0x38,0x01,0x0e,0x00,0x43,0x80,0x10,0xe0,0x04,0x38,0x01,0x0e }},
+ {16, 0xd130, 0, {0x00,0x43,0x80,0x10,0xe0,0x04,0x38,0x01,0x1a,0x00,0x43,0x80,0x11,0xa0,0x04,0x38 }},
+ {16, 0xd140, 0, {0x01,0x0e,0x00,0x02,0x80,0x40,0xe0,0x04,0x38,0x01,0x0e,0x00,0x43,0x80,0x18,0x80 }},
+ {16, 0xd150, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x04,0x01,0x00,0x30,0x40,0x0c,0x10 }},
+ {16, 0xd160, 0, {0x03,0x04,0x00,0xc9,0x00,0x30,0x40,0x0c,0x10,0x03,0x04,0x00,0xc1,0x00,0x30,0x40 }},
+ {16, 0xd170, 0, {0x08,0x10,0x03,0x04,0x00,0x81,0x00,0x30,0x40,0x0c,0x78,0x02,0x14,0x00,0xc1,0x00 }},
+ {16, 0xd180, 0, {0x30,0x40,0x0c,0x10,0x03,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd190, 0, {0x40,0x00,0x05,0x00,0x31,0x40,0x0c,0x50,0x03,0x14,0x00,0xc5,0x00,0x35,0x40,0x0c }},
+ {16, 0xd1a0, 0, {0x50,0x03,0x14,0x10,0xd5,0x00,0x31,0x41,0x0d,0x50,0x03,0x14,0x10,0xc5,0x00,0x31 }},
+ {16, 0xd1b0, 0, {0x40,0x0d,0x48,0x43,0x54,0x10,0xc5,0x00,0x31,0x40,0x0c,0x40,0x43,0x10,0x00,0xc2 }},
+ {16, 0xd1c0, 0, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x43,0x04,0x60,0xc1,0x18,0x30 }},
+ {16, 0xd1d0, 0, {0x46,0x0c,0x11,0x83,0x04,0x61,0xc1,0x18,0x30,0x46,0x0c,0x01,0x87,0x04,0x60,0xc1 }},
+ {16, 0xd1e0, 0, {0x18,0x30,0x46,0x08,0x11,0x83,0x04,0x60,0xc1,0x18,0x20,0x06,0x0c,0x01,0x83,0x04 }},
+ {16, 0xd1f0, 0, {0x60,0xc1,0x18,0x30,0x46,0x0c,0x11,0x80,0x10,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd200, 0, {0x40,0x01,0x40,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0x00,0x20,0x00,0x08 }},
+ {16, 0xd210, 0, {0x00,0x02,0x00,0x00,0x81,0x00,0x20,0x00,0x08,0x80,0x02,0x00,0x00,0xc0,0x00,0x20 }},
+ {16, 0xd220, 0, {0x00,0x08,0x40,0x43,0x30,0x00,0x80,0x00,0x20,0x00,0x08,0x00,0x02,0x00,0x00,0x80 }},
+ {16, 0xd230, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x48,0x44,0x62,0x11,0x18,0x84 }},
+ {16, 0xd240, 0, {0x46,0x21,0x11,0x88,0x44,0x63,0x01,0x18,0x84,0x46,0x21,0x01,0x88,0x04,0x62,0x11 }},
+ {16, 0xd250, 0, {0x18,0x04,0x46,0x21,0x10,0xc8,0x44,0x62,0x11,0x18,0x05,0x43,0x01,0x81,0x88,0x44 }},
+ {16, 0xd260, 0, {0x62,0x11,0x18,0x84,0x46,0x21,0x11,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd270, 0, {0x40,0x45,0x40,0x04,0x50,0x01,0x14,0x04,0x45,0x01,0x11,0x40,0x44,0x50,0x01,0x14 }},
+ {16, 0xd280, 0, {0x04,0x45,0x01,0x01,0x40,0x45,0x00,0x10,0x14,0x04,0x45,0x03,0x00,0x40,0x44,0x50 }},
+ {16, 0xd290, 0, {0x11,0x14,0x04,0x01,0x05,0x41,0x40,0x44,0x50,0x11,0x14,0x04,0x05,0x01,0x01,0x40 }},
+ {16, 0xd2a0, 0, {0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x08,0x20,0x42,0x08,0x10,0x82 }},
+ {16, 0xd2b0, 0, {0x04,0x20,0x81,0x08,0x00,0x42,0x00,0x10,0x82,0x04,0x20,0x81,0x08,0x00,0x42,0x08 }},
+ {16, 0xd2c0, 0, {0x10,0x82,0x05,0x20,0x81,0x08,0x20,0x42,0x08,0x10,0x8a,0x05,0x20,0x05,0x08,0x20 }},
+ {16, 0xd2d0, 0, {0x42,0x08,0x10,0x82,0x04,0x22,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd2e0, 0, {0x00,0x00,0x0a,0x01,0x02,0x80,0x40,0xa0,0x10,0x28,0x04,0x02,0x01,0x02,0x80,0x40 }},
+ {16, 0xd2f0, 0, {0xa0,0x10,0x28,0x04,0x0a,0x01,0x02,0x80,0x40,0xa0,0x00,0x29,0x04,0x0a,0x01,0x02 }},
+ {16, 0xd300, 0, {0x80,0x40,0xa4,0x00,0x28,0x04,0x0a,0x01,0x02,0x80,0x40,0xa8,0x10,0x2b,0x14,0x00 }},
+ {16, 0xd310, 0, {0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x45,0x4d,0x03,0x53,0x40,0xd4,0xd0 }},
+ {16, 0xd320, 0, {0x35,0x34,0x0d,0x4d,0x03,0x53,0x40,0xd4,0xd0,0x35,0x34,0x0d,0x4d,0x03,0x53,0x40 }},
+ {16, 0xd330, 0, {0xd4,0xd0,0x21,0x34,0x4d,0x4d,0x03,0x53,0x40,0xd4,0xd9,0x61,0x34,0x04,0x0d,0x03 }},
+ {16, 0xd340, 0, {0x53,0x40,0xc0,0xd8,0x35,0x37,0x0d,0x40,0x11,0x50,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd350, 0, {0x40,0x01,0x48,0x04,0x72,0x00,0x1c,0x80,0x47,0x20,0x11,0xc8,0x04,0x72,0x01,0x1c }},
+ {16, 0xd360, 0, {0x80,0x47,0x20,0x11,0xc8,0x04,0x72,0x00,0x9c,0x80,0x47,0x20,0x19,0xc8,0x00,0x72 }},
+ {16, 0xd370, 0, {0x01,0x1c,0x88,0x67,0x20,0x11,0xc8,0x04,0x72,0x01,0x5c,0x82,0x47,0x22,0x11,0xc0 }},
+ {16, 0xd380, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x08,0x48,0xc2,0x12,0x31 }},
+ {16, 0xd390, 0, {0x84,0x8c,0x61,0x23,0x10,0x40,0xc0,0x12,0x31,0x84,0x8c,0x61,0x03,0x10,0x48,0xc4 }},
+ {16, 0xd3a0, 0, {0x10,0x31,0x84,0x8c,0x41,0x23,0x18,0x48,0xc6,0x10,0x30,0x04,0x0c,0x41,0x23,0x18 }},
+ {16, 0xd3b0, 0, {0x48,0xc6,0x12,0x30,0x84,0x8c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd3c0, 0, {0x00,0x00,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3 }},
+ {16, 0xd3d0, 0, {0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x3f,0xff,0x4f }},
+ {16, 0xd3e0, 0, {0xff,0xd3,0xff,0xf4,0xff,0xdd,0x3f,0xff,0x4f,0xff,0xd3,0xff,0xf4,0xff,0xfd,0x00 }},
+ {16, 0xd3f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd410, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd420, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd430, 0, {0x00,0x00,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x36,0xc2 }},
+ {16, 0xd440, 0, {0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x2c,0xdb,0x0b }},
+ {16, 0xd450, 0, {0x36,0xc2,0xcd,0xb0,0xb3,0x4c,0x2c,0xdb,0x0b,0x36,0xc2,0xcd,0xb0,0xb3,0x6c,0x00 }},
+ {16, 0xd460, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x5c,0x4c,0xd7,0x13,0x33 }},
+ {16, 0xd470, 0, {0xc4,0xcc,0xf1,0x33,0x3a,0x4a,0xd6,0x93,0x33,0xc4,0xcc,0xf1,0x2b,0x3a,0x4c,0xcf }},
+ {16, 0xd480, 0, {0x13,0x33,0xc4,0xcc,0xe9,0x33,0x3c,0x4c,0xcf,0x12,0xb5,0xa4,0xac,0xc9,0x33,0x3c }},
+ {16, 0xd490, 0, {0x4c,0xcf,0x13,0x35,0xc4,0xcd,0x69,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd4a0, 0, {0x00,0x00,0x3b,0x7e,0x4e,0xdf,0x93,0xb7,0xe4,0xed,0xf9,0x3b,0x7e,0x4e,0xdf,0x93 }},
+ {16, 0xd4b0, 0, {0xb7,0xe4,0xed,0xf9,0x3b,0x7e,0x4e,0xde,0x12,0x37,0xe4,0xed,0xe1,0x3b,0x7e,0x4e }},
+ {16, 0xd4c0, 0, {0xdf,0x92,0x31,0x84,0x8d,0xd9,0x3b,0x7e,0x4e,0xdf,0x93,0xb1,0xe4,0xec,0x61,0x00 }},
+ {16, 0xd4d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x04,0xa1,0x83,0x2c }},
+ {16, 0xd4e0, 0, {0x03,0x0a,0x10,0x82,0xc1,0x34,0x10,0x8f,0x00,0x40,0x09,0x14,0x02,0x03,0x14,0x91 }},
+ {16, 0xd4f0, 0, {0x00,0x08,0x42,0x0b,0x18,0x82,0xc4,0x00,0x31,0xca,0x0c,0x52,0x02,0x10,0x80,0x85 }},
+ {16, 0xd500, 0, {0x00,0x21,0x82,0x28,0x40,0x0a,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd510, 0, {0x00,0x00,0x0a,0x04,0x02,0x01,0x40,0x80,0x73,0x28,0x10,0x48,0x07,0x06,0x01,0x04 }},
+ {16, 0xd520, 0, {0xa4,0x41,0x21,0x14,0x08,0x44,0x06,0x11,0x40,0x80,0x70,0x20,0x14,0x0a,0x04,0x02 }},
+ {16, 0xd530, 0, {0x00,0xc8,0x84,0x41,0x21,0x1c,0x08,0x06,0x12,0x01,0xc0,0x80,0x60,0x20,0x14,0x00 }},
+ {16, 0xd540, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x84,0x04,0x21,0x82,0x08 }},
+ {16, 0xd550, 0, {0x53,0x02,0x10,0x80,0xc5,0x00,0x81,0x4a,0x04,0x42,0x02,0x14,0x00,0x04,0x20,0x21 }},
+ {16, 0xd560, 0, {0x80,0xa8,0x72,0x22,0x1c,0x88,0xc4,0x06,0xa1,0x42,0x8c,0x52,0x22,0x1c,0x88,0x85 }},
+ {16, 0xd570, 0, {0x26,0x21,0xc0,0x88,0x50,0x22,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd580, 0, {0x00,0x00,0x02,0x44,0x00,0x01,0x01,0x00,0x62,0x00,0x10,0x00,0x04,0x00,0x01,0x01 }},
+ {16, 0xd590, 0, {0x20,0x40,0x00,0x1c,0x00,0x44,0x04,0x01,0x02,0x20,0x62,0x00,0x1c,0x80,0x04,0x04 }},
+ {16, 0xd5a0, 0, {0x80,0x89,0x20,0x50,0x08,0x14,0x80,0x04,0x24,0x01,0xc1,0x00,0x50,0x00,0x18,0x00 }},
+ {16, 0xd5b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x80,0x38,0x20,0x04,0x0c }},
+ {16, 0xd5c0, 0, {0x31,0x0a,0x00,0x00,0x02,0x18,0x20,0x8c,0xa8,0x10,0x28,0x08,0x88,0xc1,0x14,0x10 }},
+ {16, 0xd5d0, 0, {0xc6,0x00,0x22,0x03,0x08,0x02,0x01,0x08,0xb0,0x00,0x0c,0x21,0x02,0x00,0x82,0x80 }},
+ {16, 0xd5e0, 0, {0x08,0x00,0x49,0x08,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd5f0, 0, {0x00,0x00,0x00,0x01,0x00,0x80,0x08,0x20,0x03,0x00,0x04,0x02,0x43,0x20,0x00,0x40 }},
+ {16, 0xd600, 0, {0x00,0x20,0x00,0x04,0x42,0x01,0x10,0x80,0x84,0x20,0x11,0x08,0x04,0x00,0x00,0x00 }},
+ {16, 0xd610, 0, {0x00,0x44,0x24,0x20,0x09,0x08,0x40,0x03,0x00,0x90,0xc4,0x20,0x20,0x08,0x0c,0x02 }},
+ {16, 0xd620, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x81,0x08,0x20,0x04,0x88 }},
+ {16, 0xd630, 0, {0x02,0x22,0x08,0x08,0xc3,0x2a,0x90,0x40,0x84,0x10,0x20,0x04,0x80,0xc2,0x26,0x20 }},
+ {16, 0xd640, 0, {0x49,0x88,0x22,0x22,0x0c,0x08,0xc1,0x26,0xa0,0xc9,0x8c,0x12,0x2a,0x04,0x88,0x43 }},
+ {16, 0xd650, 0, {0x0e,0xa0,0xcb,0x88,0x10,0x22,0x0c,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd660, 0, {0x08,0x00,0x0a,0x40,0x32,0x00,0x01,0x80,0x31,0x28,0x00,0x00,0x01,0x12,0x80,0x8d }},
+ {16, 0xd670, 0, {0x84,0x00,0x28,0x0c,0x08,0x01,0x32,0x00,0x8c,0x80,0x02,0x20,0x0c,0x08,0x01,0x2e }},
+ {16, 0xd680, 0, {0x00,0xc3,0x80,0x02,0x20,0x04,0x08,0x43,0x02,0x00,0x40,0x80,0x10,0x20,0x04,0x02 }},
+ {16, 0xd690, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x87,0x0a,0x21,0x04,0x88 }},
+ {16, 0xd6a0, 0, {0x11,0x2a,0x1c,0x0a,0x06,0x22,0x21,0x40,0xa0,0x42,0x2a,0x10,0x88,0x85,0x0a,0xa1 }},
+ {16, 0xd6b0, 0, {0x06,0xa4,0x62,0x22,0x1c,0x0a,0xc4,0x02,0x21,0x80,0x8c,0x52,0x22,0x14,0x48,0x86 }},
+ {16, 0xd6c0, 0, {0x22,0x20,0x08,0xa8,0x60,0x2a,0x14,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd6d0, 0, {0x00,0x00,0x08,0x45,0x06,0x01,0x89,0x80,0x63,0x20,0x1c,0x88,0x40,0x34,0x11,0x01 }},
+ {16, 0xd6e0, 0, {0xa4,0x50,0x28,0x18,0x48,0x04,0x0e,0x01,0x4b,0x80,0x73,0x28,0x1c,0x8a,0x04,0x06 }},
+ {16, 0xd6f0, 0, {0x91,0x49,0x04,0x63,0x20,0x1c,0x8a,0x06,0x26,0x01,0x85,0x80,0x70,0x20,0x18,0x02 }},
+ {16, 0xd700, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x85,0x00,0xb1,0x45,0x2c }},
+ {16, 0xd710, 0, {0x70,0x02,0x14,0xc0,0x07,0x08,0x21,0x49,0x00,0x42,0x01,0x14,0x82,0x05,0x00,0x11 }},
+ {16, 0xd720, 0, {0x84,0x00,0x52,0x02,0x1c,0x00,0xc4,0x00,0x21,0xc4,0x2c,0x53,0x02,0x1c,0x02,0x81 }},
+ {16, 0xd730, 0, {0x04,0xa1,0xcd,0x08,0x50,0x02,0x14,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd740, 0, {0x08,0x10,0x12,0x04,0x34,0x01,0xcc,0x00,0x73,0x40,0x1c,0x90,0x45,0x04,0x01,0x48 }},
+ {16, 0xd750, 0, {0x04,0x60,0x41,0x18,0xc0,0x44,0x04,0x01,0x05,0x04,0x73,0x48,0x14,0x50,0x47,0x34 }},
+ {16, 0xd760, 0, {0x01,0x45,0x20,0x62,0x08,0x1c,0xc2,0x04,0x0c,0x81,0xc7,0x00,0x73,0x80,0x18,0xc2 }},
+ {16, 0xd770, 0, {0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x84,0x10,0x21,0xcc,0x28 }},
+ {16, 0xd780, 0, {0x42,0x02,0x14,0x12,0xc5,0x10,0x21,0x84,0x04,0x40,0x00,0x1c,0x80,0x84,0x00,0x91 }},
+ {16, 0xd790, 0, {0x00,0x08,0x73,0x82,0x1c,0x90,0x05,0x0c,0x01,0xcf,0x0c,0x40,0x02,0x14,0x30,0x45 }},
+ {16, 0xd7a0, 0, {0x20,0xa1,0xc0,0x08,0x50,0x02,0x10,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd7b0, 0, {0x00,0x00,0x00,0x45,0x0c,0x81,0x00,0x00,0x01,0x08,0x08,0x00,0x05,0x18,0x91,0x05 }},
+ {16, 0xd7c0, 0, {0x04,0x00,0x01,0x04,0x40,0x06,0x18,0x00,0x02,0x24,0x70,0x40,0x04,0x00,0x40,0x00 }},
+ {16, 0xd7d0, 0, {0x01,0xc4,0x24,0x00,0x88,0x04,0x00,0x43,0x10,0x00,0x40,0x20,0x00,0x88,0x00,0x00 }},
+ {16, 0xd7e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x85,0x24,0x31,0x02,0x0c }},
+ {16, 0xd7f0, 0, {0x02,0xc2,0x04,0x10,0xc4,0x28,0x21,0x49,0x0c,0x02,0xc0,0x04,0xb2,0x06,0x1c,0x20 }},
+ {16, 0xd800, 0, {0x03,0x08,0x50,0x42,0x0c,0x80,0x01,0x04,0xa1,0x49,0x0c,0x00,0xc2,0x0c,0x10,0x43 }},
+ {16, 0xd810, 0, {0x24,0xa0,0xc1,0x08,0x10,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd820, 0, {0x00,0x10,0xa2,0x00,0x20,0x00,0xcd,0x00,0x00,0x40,0x04,0x20,0x01,0x10,0x00,0x09 }},
+ {16, 0xd830, 0, {0x04,0x02,0x49,0x0c,0x92,0x07,0x30,0x00,0x00,0x00,0x33,0x08,0x0c,0x92,0x41,0x00 }},
+ {16, 0xd840, 0, {0x80,0xcc,0x00,0x00,0x00,0x0c,0x00,0x43,0x28,0x80,0xc2,0x00,0x10,0x00,0x00,0x00 }},
+ {16, 0xd850, 0, {0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x10,0x50,0x80,0x00,0x00 }},
+ {16, 0xd860, 0, {0x10,0x00,0x00,0xf0,0x00,0x10,0x80,0x00,0x00,0x00,0x80,0x00,0xd0,0x80,0x80,0x00 }},
+ {16, 0xd870, 0, {0x00,0x00,0x00,0x80,0x10,0x90,0x80,0x80,0x00,0x00,0x00,0x00,0x80,0x10,0x90,0x80 }},
+ {16, 0xd880, 0, {0x00,0x00,0x00,0x00,0x00,0xc0,0x10,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd890, 0, {0x3c,0x3c,0x10,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x10,0x90,0xa0,0x80,0x00,0x00 }},
+ {16, 0xd8a0, 0, {0x00,0x00,0x40,0x10,0x90,0x80,0xa0,0x00,0x00,0x00,0x00,0xc0,0x10,0x90,0x80,0xa0 }},
+ {16, 0xd8b0, 0, {0x00,0x00,0x00,0x20,0x80,0x10,0x90,0xa0,0xa0,0x00,0x00,0x00,0x00,0x80,0x10,0x8f }},
+ {16, 0xd8c0, 0, {0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xc2,0xe4,0x81,0x80,0x3f }},
+ {16, 0xd8d0, 0, {0xd9,0xbf,0xd9,0x98,0x71,0x9d,0x42,0x80,0x00,0x26,0x7f,0xe6,0x72,0xab,0x7c,0x3a }},
+ {16, 0xd8e0, 0, {0x40,0x00,0x19,0x80,0x26,0x48,0xdd,0x3c,0x91,0xc0,0x26,0x40,0x26,0x40,0x38,0x31 }},
+ {16, 0xd8f0, 0, {0xdb,0x61,0xc0,0x19,0x99,0xbf,0xc9,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd900, 0, {0x00,0x00,0x10,0x80,0x10,0x14,0x80,0x06,0x84,0x97,0x96,0x86,0x96,0x06,0x90,0x00 }},
+ {16, 0xd910, 0, {0x3f,0xa1,0x28,0x01,0x02,0x90,0x12,0x00,0x80,0x17,0x88,0x16,0x9e,0x90,0x90,0x04 }},
+ {16, 0xd920, 0, {0x10,0x00,0x36,0xbe,0xbe,0x9e,0x86,0x16,0x12,0x84,0x80,0x13,0xbe,0x97,0xae,0x80 }},
+ {16, 0xd930, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x82 }},
+ {16, 0xd940, 0, {0x81,0x84,0x21,0x40,0x00,0x00,0x00,0x08,0xa1,0x38,0x01,0x78,0x00,0x00,0x00,0x00 }},
+ {16, 0xd950, 0, {0x08,0xb8,0x21,0x72,0x68,0x80,0x00,0x00,0x00,0x08,0x98,0x44,0x88,0x68,0x80,0x00 }},
+ {16, 0xd960, 0, {0x00,0x00,0x08,0xb8,0x01,0x78,0x01,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd970, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xf7,0xaf,0xff,0xc0 }},
+ {16, 0xd980, 0, {0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff }},
+ {16, 0xd990, 0, {0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xbf,0xff,0xc0,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd9a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 }},
+ {16, 0xd9b0, 0, {0x00,0x00,0x00,0x3f,0xff,0xff,0x7f,0x40,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff }},
+ {16, 0xd9c0, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff }},
+ {16, 0xd9d0, 0, {0x2f,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xd9e0, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0x7f,0xc0 }},
+ {16, 0xd9f0, 0, {0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff }},
+ {16, 0xda00, 0, {0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0x7f,0x80,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xda10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 }},
+ {16, 0xda20, 0, {0x00,0x00,0x00,0x3f,0xff,0xbf,0xbf,0xc0,0x00,0x00,0x00,0x00,0x3f,0xdf,0xbf,0xdf }},
+ {16, 0xda30, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xef,0xff,0xff,0x80,0x00,0x00,0x00,0x00,0x3f,0xdf }},
+ {16, 0xda40, 0, {0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xda50, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0x3e,0xaf,0xff,0xc0 }},
+ {16, 0xda60, 0, {0x00,0x00,0x00,0x00,0x1f,0xff,0xdf,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xe7,0xfe }},
+ {16, 0xda70, 0, {0xef,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xdf,0xc0,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xda80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 }},
+ {16, 0xda90, 0, {0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x2f,0xf7,0xff,0xff }},
+ {16, 0xdaa0, 0, {0xc0,0x00,0x00,0x00,0x00,0x2f,0xff,0xff,0xdf,0xc0,0x00,0x00,0x00,0x00,0x3f,0xf7 }},
+ {16, 0xdab0, 0, {0xdf,0xf7,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdac0, 0, {0x00,0x00,0x02,0xc4,0x00,0xb1,0xc3,0x2c,0x50,0x09,0x14,0x82,0xc4,0x30,0x91,0xc7 }},
+ {16, 0xdad0, 0, {0x24,0x60,0x08,0x1c,0x82,0x07,0x34,0x91,0x4c,0x04,0x43,0x0a,0x10,0xc2,0x84,0x04 }},
+ {16, 0xdae0, 0, {0x91,0x84,0x24,0x52,0x0b,0x18,0x02,0xc4,0x24,0xb1,0xc3,0x2c,0x40,0x0a,0x10,0x80 }},
+ {16, 0xdaf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0x02,0x01,0xc4,0x80 }},
+ {16, 0xdb00, 0, {0x60,0x20,0x1c,0x08,0x44,0x22,0x01,0xc0,0x84,0x50,0x01,0x9c,0x08,0x07,0x0a,0x01 }},
+ {16, 0xdb10, 0, {0xc0,0x84,0x72,0x20,0x1c,0xc8,0x04,0x12,0x11,0x44,0x80,0x41,0x01,0x1c,0x80,0x07 }},
+ {16, 0xdb20, 0, {0x08,0x11,0xc4,0x00,0x70,0x00,0x10,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdb30, 0, {0x00,0x00,0x00,0x86,0x2c,0x21,0x4a,0x0c,0x52,0x02,0x1c,0x80,0x04,0x20,0x21,0xca }},
+ {16, 0xdb40, 0, {0x10,0x62,0x02,0x1c,0x81,0x47,0x04,0x21,0xc3,0x20,0x51,0x01,0x1c,0x80,0x04,0x2c }},
+ {16, 0xdb50, 0, {0x01,0xcb,0x04,0x52,0x03,0x14,0x40,0xc7,0x20,0x31,0xc8,0x0c,0x50,0x22,0x10,0x80 }},
+ {16, 0xdb60, 0, {0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x20,0x01,0x89,0x00 }},
+ {16, 0xdb70, 0, {0x52,0x00,0x14,0x80,0x04,0x28,0x01,0x45,0x04,0x62,0x00,0x10,0x80,0x46,0x30,0x11 }},
+ {16, 0xdb80, 0, {0x0d,0x00,0x42,0x01,0x14,0xc0,0x44,0x00,0x11,0x05,0x00,0x50,0x00,0x1c,0x00,0x44 }},
+ {16, 0xdb90, 0, {0x28,0x01,0x49,0x00,0x70,0x00,0x10,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdba0, 0, {0x00,0x00,0x08,0xc0,0x02,0x30,0x0c,0x8c,0x30,0x22,0x08,0x88,0xc2,0x26,0x00,0x08 }},
+ {16, 0xdbb0, 0, {0x80,0x20,0x22,0x0c,0x88,0x81,0x02,0x10,0xc4,0x80,0x10,0x22,0x0c,0x08,0x40,0x02 }},
+ {16, 0xdbc0, 0, {0x10,0x48,0x88,0x01,0x23,0x04,0xc8,0x42,0x02,0x10,0x46,0x8c,0x12,0x22,0x00,0x00 }},
+ {16, 0xdbd0, 0, {0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x02,0x00,0x00,0x80,0xc8,0x20 }},
+ {16, 0xdbe0, 0, {0x11,0x09,0x00,0x80,0x41,0x10,0x90,0x08,0x24,0x30,0x08,0x04,0x42,0x41,0x00,0x90 }},
+ {16, 0xdbf0, 0, {0xc4,0x20,0x00,0x08,0x04,0x42,0x00,0x10,0x80,0x4c,0x20,0x23,0x09,0x04,0xc2,0x43 }},
+ {16, 0xdc00, 0, {0x30,0x80,0x40,0x20,0x11,0x08,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdc10, 0, {0x08,0x00,0x08,0x81,0x02,0x20,0xc9,0x8c,0x12,0x20,0x04,0x48,0x41,0x22,0x00,0x09 }},
+ {16, 0xdc20, 0, {0x88,0x30,0x20,0x0c,0x88,0x03,0x0e,0x00,0x49,0x8c,0x10,0x22,0x0c,0x88,0x40,0x2e }},
+ {16, 0xdc30, 0, {0x00,0xc9,0x84,0x13,0x21,0x04,0xc8,0xc3,0x22,0x00,0xcb,0x8c,0x32,0x22,0x00,0x00 }},
+ {16, 0xdc40, 0, {0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x01,0x02,0x00,0x4b,0x80 }},
+ {16, 0xdc50, 0, {0x32,0x21,0x08,0x88,0x41,0x02,0x10,0x0f,0x80,0x10,0x21,0x8c,0x08,0x41,0x02,0x00 }},
+ {16, 0xdc60, 0, {0x87,0x84,0x10,0x20,0x04,0x88,0x00,0x02,0x00,0x47,0x80,0x10,0x21,0x0c,0x88,0x41 }},
+ {16, 0xdc70, 0, {0x16,0x10,0x46,0x80,0x30,0x20,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdc80, 0, {0x00,0x00,0x0a,0xc4,0x22,0xa1,0x08,0xa4,0x72,0x2a,0x14,0x0a,0x85,0x02,0x81,0x84 }},
+ {16, 0xdc90, 0, {0xa0,0x42,0x28,0x1c,0x0a,0xc5,0x02,0x91,0x40,0xb8,0x73,0x29,0x10,0xca,0xc4,0x02 }},
+ {16, 0xdca0, 0, {0xa1,0x80,0xa4,0x42,0x2a,0x14,0xca,0x85,0x22,0x91,0x80,0xa8,0x70,0x2a,0x18,0x02 }},
+ {16, 0xdcb0, 0, {0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x04,0x1e,0x01,0xc8,0x80 }},
+ {16, 0xdcc0, 0, {0x43,0x20,0x18,0x08,0x45,0x3e,0x01,0x0c,0x80,0x61,0x20,0x9c,0x48,0x06,0x12,0x81 }},
+ {16, 0xdcd0, 0, {0xc0,0x80,0x73,0x00,0x10,0x88,0x06,0x02,0x01,0xc8,0x00,0x42,0x20,0x10,0xc8,0x07 }},
+ {16, 0xdce0, 0, {0x02,0x11,0xcd,0x80,0x51,0x20,0x14,0x82,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdcf0, 0, {0x08,0x00,0x00,0xc4,0x24,0x21,0xc8,0x0c,0x42,0x01,0x14,0x00,0x00,0x28,0x10,0x4c }},
+ {16, 0xdd00, 0, {0x08,0x52,0x02,0x14,0x80,0x45,0x24,0x29,0x40,0x04,0x72,0x00,0x10,0xc0,0x05,0x24 }},
+ {16, 0xdd10, 0, {0x11,0x44,0x08,0x43,0x01,0x14,0xc0,0x47,0x24,0x20,0x48,0x08,0x72,0x02,0x10,0x00 }},
+ {16, 0xdd20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x00,0x07,0x10,0x11,0x06,0x00 }},
+ {16, 0xdd30, 0, {0x72,0x00,0x18,0xd0,0x46,0x20,0x01,0x4d,0x00,0x71,0x40,0x10,0x50,0x07,0x30,0x11 }},
+ {16, 0xdd40, 0, {0xc3,0x00,0x71,0x41,0x10,0xb0,0x05,0x2c,0x01,0x49,0x00,0x43,0x00,0x1c,0x50,0x45 }},
+ {16, 0xdd50, 0, {0x30,0x01,0x8c,0x00,0x61,0x40,0x18,0x42,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdd60, 0, {0x00,0x00,0x30,0xc5,0x00,0x21,0xc0,0x0c,0x40,0x01,0x14,0x12,0x44,0x04,0x31,0x84 }},
+ {16, 0xdd70, 0, {0x24,0x40,0x80,0x14,0xa1,0xc7,0x00,0x01,0x40,0x08,0x40,0x01,0x14,0x20,0x05,0x20 }},
+ {16, 0xdd80, 0, {0x11,0xc0,0x02,0x60,0x82,0x18,0x00,0x87,0x24,0x11,0x40,0x08,0x40,0x42,0x10,0x02 }},
+ {16, 0xdd90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x0c,0x80,0xc4,0x24 }},
+ {16, 0xdda0, 0, {0x31,0x48,0x0c,0x00,0x01,0x08,0xc1,0x41,0x00,0x00,0x49,0x00,0x42,0x03,0x08,0x10 }},
+ {16, 0xddb0, 0, {0x80,0x20,0x21,0x09,0x0c,0x02,0x02,0x18,0x80,0xc1,0x24,0x30,0x08,0x0c,0x42,0x01 }},
+ {16, 0xddc0, 0, {0x10,0x80,0x83,0x20,0x11,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xddd0, 0, {0x00,0x00,0x10,0xc1,0x04,0x20,0x48,0x0c,0x12,0x42,0x04,0x00,0x83,0x00,0x31,0x48 }},
+ {16, 0xdde0, 0, {0x00,0x02,0x41,0x04,0xa0,0x07,0x0c,0x20,0x40,0x00,0x12,0xc2,0x0c,0x80,0xc1,0x20 }},
+ {16, 0xddf0, 0, {0x20,0xc8,0x00,0x12,0xc1,0x0c,0xb0,0x41,0x20,0x00,0x49,0x08,0x02,0x42,0x00,0x00 }},
+ {16, 0xde00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x80,0x01,0x00,0x10,0x81,0x00 }},
+ {16, 0xde10, 0, {0x30,0x40,0x08,0x20,0x03,0x00,0x10,0xc1,0x20,0x02,0x00,0x04,0x80,0x40,0x30,0x90 }},
+ {16, 0xde20, 0, {0x01,0x14,0x02,0x40,0x04,0x80,0x40,0x20,0x00,0x09,0x04,0x32,0x01,0x08,0xa0,0x03 }},
+ {16, 0xde30, 0, {0x04,0x10,0x08,0x00,0x22,0x40,0x00,0x00,0x04,0x30,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xde40, 0, {0x00,0x00,0x30,0x00,0x10,0x80,0x00,0x00,0x00,0x40,0x00,0xf0,0x00,0x00,0x00,0x00 }},
+ {16, 0xde50, 0, {0x00,0x10,0x80,0x00,0xf0,0x00,0x80,0x80,0x00,0x00,0x20,0x00,0x00,0xf0,0x10,0xa0 }},
+ {16, 0xde60, 0, {0x00,0x00,0x00,0x20,0x00,0x00,0xf0,0x00,0x10,0x00,0x00,0x00,0x20,0x80,0x00,0xcc }},
+ {16, 0xde70, 0, {0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x3c,0x10,0xa0,0x80,0x00,0x00,0x00 }},
+ {16, 0xde80, 0, {0x00,0x00,0x10,0x90,0x80,0xc0,0x40,0x00,0x00,0x00,0x00,0x10,0x90,0x80,0x80,0x00 }},
+ {16, 0xde90, 0, {0x00,0x00,0x00,0x00,0x10,0x90,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x10,0x90,0x80 }},
+ {16, 0xdea0, 0, {0xe0,0x00,0x00,0x00,0x00,0x00,0x10,0x8c,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdeb0, 0, {0x00,0x00,0x09,0x4d,0xb1,0xe9,0x00,0x26,0x40,0x2a,0x7f,0xe3,0xf2,0x54,0x98,0xc0 }},
+ {16, 0xdec0, 0, {0x3f,0xe6,0x40,0x00,0x01,0x42,0x91,0xd0,0xc0,0x13,0xe5,0x87,0x63,0x83,0xb8,0xcd }},
+ {16, 0xded0, 0, {0xf9,0x00,0x26,0x7f,0x00,0x00,0x35,0x2e,0xd5,0x03,0x40,0x3f,0xd9,0xbf,0xb1,0x80 }},
+ {16, 0xdee0, 0, {0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x02,0x16,0x14,0x00,0x1c }},
+ {16, 0xdef0, 0, {0xa8,0x3f,0x88,0x16,0x00,0x80,0x84,0x80,0x37,0x9e,0xba,0xa0,0x50,0x10,0x02,0x12 }},
+ {16, 0xdf00, 0, {0x00,0x17,0x96,0x97,0x26,0x50,0x10,0x10,0x82,0x80,0x1e,0x80,0xde,0xbe,0x94,0x14 }},
+ {16, 0xdf10, 0, {0x02,0x10,0x80,0x17,0xbe,0x81,0x94,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdf20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xa8,0x44,0x94,0x28,0x80,0x00,0x00,0x00,0x08 }},
+ {16, 0xdf30, 0, {0x94,0x21,0x44,0x51,0x00,0x00,0x00,0x00,0x08,0x84,0x42,0x41,0x01,0x00,0x00,0x00 }},
+ {16, 0xdf40, 0, {0x00,0x08,0xa1,0x72,0x23,0x41,0x40,0x00,0x00,0x00,0x08,0xb8,0x01,0x78,0x32,0x40 }},
+ {16, 0xdf50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 }},
+ {16, 0xdf60, 0, {0x00,0x00,0x00,0x3f,0xf7,0xfe,0xd7,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xd7,0xdf }},
+ {16, 0xdf70, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0x7f,0xff,0xc0,0x00,0x00,0x00,0x00,0x37,0x7f }},
+ {16, 0xdf80, 0, {0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdf90, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x1e,0xff,0xde,0x77,0xc0 }},
+ {16, 0xdfa0, 0, {0x00,0x00,0x00,0x00,0x1f,0xef,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff }},
+ {16, 0xdfb0, 0, {0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0x7f,0xc0,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xdfc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 }},
+ {16, 0xdfd0, 0, {0x00,0x00,0x00,0x1f,0xcf,0xdf,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xbf }},
+ {16, 0xdfe0, 0, {0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xbf,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff }},
+ {16, 0xdff0, 0, {0xff,0xbf,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe000, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0 }},
+ {16, 0xe010, 0, {0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x1f,0xff,0x1f }},
+ {16, 0xe020, 0, {0x7f,0xc0,0x00,0x00,0x00,0x00,0x2f,0xdf,0xff,0xcf,0xc0,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe030, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00 }},
+ {16, 0xe040, 0, {0x00,0x00,0x00,0x3f,0xbf,0xaf,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff }},
+ {16, 0xe050, 0, {0xc0,0x00,0x00,0x00,0x00,0x3e,0xde,0x7f,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xff }},
+ {16, 0xe060, 0, {0xff,0xf7,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe070, 0, {0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0x7f,0xff,0xff,0xc0 }},
+ {16, 0xe080, 0, {0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x3f,0xfe,0xbe }},
+ {16, 0xe090, 0, {0x7f,0xc0,0x00,0x00,0x00,0x00,0x3e,0xff,0xd7,0x7f,0xc0,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe0a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe0b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe0c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe0d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe0e0, 0, {0x30,0x00,0x20,0x01,0x02,0x00,0x00,0x00,0x30,0x00,0x43,0x8e,0x00,0x00,0x00,0x00 }},
+ {16, 0xe0f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe100, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe110, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe130, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe140, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe150, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe170, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe190, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe1a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe1b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe1c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe1d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe1e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe1f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe200, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe210, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe220, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe230, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe240, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe250, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe260, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe270, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe280, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe290, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe2a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe2b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe2c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe2d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe2e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe2f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe300, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe310, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe320, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe330, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe340, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe350, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe360, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe370, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe380, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe390, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe3a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe3b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe3c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe3d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe3e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe3f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe410, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe420, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe430, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe440, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe450, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe460, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe470, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe480, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe490, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe4a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe4b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe4c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe4d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe4e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe4f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe500, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe510, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe520, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe530, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe540, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe550, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe560, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe570, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe580, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe590, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe5a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe5b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe5c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe5d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe5e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe5f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe600, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe610, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe620, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe630, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe640, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe650, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe660, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe670, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe680, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe690, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe6a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe6b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe6c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe6d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe6e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe6f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe700, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe710, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe720, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe730, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe740, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe750, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe760, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe770, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe780, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe790, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe7a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe7b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe7c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe7d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe7e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe7f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe800, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe810, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe820, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe830, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe840, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe850, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe860, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe870, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe880, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe890, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe8a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe8b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe8c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe8d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe8e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe8f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe900, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe910, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe920, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe930, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe940, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe950, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe960, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe970, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe980, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe990, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe9a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe9b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe9c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe9d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe9e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xe9f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xea90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeaa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeab0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeac0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xead0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeae0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeaf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeb90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeba0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xebb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xebc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xebd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xebe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xebf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xec90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeca0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xecb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xecc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xecd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xece0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xecf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xed90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeda0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xedb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xedc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xedd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xede0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xedf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xee90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeea0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeeb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeec0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeed0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeee0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeef0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef20, 0, {0x00,0x00,0x00,0x00,0x30,0x00,0x20,0x01,0x02,0x02,0x00,0x00,0x30,0x00,0x43,0x80 }},
+ {16, 0xef30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xef90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xefa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xefb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xefc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xefd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xefe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xeff0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf000, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf010, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf020, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf030, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf040, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf050, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf060, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf070, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf080, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf090, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf0a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf0b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf0c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf0d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf0e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf0f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf100, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf110, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf120, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf130, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf140, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf150, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf160, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf170, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf180, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf190, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf1a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf1b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf1c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf1d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf1e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf1f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf200, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf210, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf220, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf230, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf240, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf250, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf260, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf270, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf280, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf290, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf2a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf2b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf2c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf2d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf2e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf2f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf300, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf310, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf320, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf330, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf340, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf350, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf360, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf370, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf380, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf390, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf3a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf3b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf3c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf3d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf3e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf3f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf400, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf410, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf420, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf430, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf440, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf450, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf460, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf470, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf480, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf490, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf4a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf4b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf4c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf4d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf4e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf4f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf500, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf510, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf520, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf530, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf540, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf550, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf560, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf570, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf580, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf590, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf5a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf5b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf5c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf5d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf5e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf5f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf600, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf610, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf620, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf630, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf640, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf650, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf660, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf670, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf680, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf690, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf6a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf6b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf6c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf6d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf6e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf6f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf700, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf710, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf720, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf730, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf740, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf750, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf760, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf770, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf780, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf790, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf7a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf7b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf7c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf7d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf7e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf7f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf800, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf810, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf820, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf830, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf840, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf850, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf860, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf870, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf880, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf890, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf8a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf8b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf8c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf8d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf8e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf8f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf900, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf910, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf920, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf930, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf940, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf950, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf960, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf970, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf980, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf990, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf9a0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf9b0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf9c0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf9d0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf9e0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xf9f0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfa90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfaa0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfab0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfac0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfad0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfae0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfaf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfb90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfba0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfbb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfbc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfbd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfbe0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfbf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc30, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc40, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc80, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfc90, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfca0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfcb0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfcc0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfcd0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfce0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfcf0, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd00, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd10, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd20, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd30, 0, {0x30,0x00,0x00,0x01,0x00,0x00,0x5f,0xa7,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x03 }},
+ {16, 0xfd40, 0, {0x30,0x00,0x40,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd50, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd60, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {16, 0xfd70, 0, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01 }},
+ {16, 0xfd80, 0, {0x00,0x00,0x00,0x05,0x30,0x00,0xa0,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x01 }},
+ {16, 0xfd90, 0, {0x00,0x00,0x6b,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},
+ {4, 0xfda0, 0, {0x00,0x00,0x00,0x00 }},
+ {0 , 0x0000, 1, {0}}
+};
+// VERSION= 1.0.0.191
+// DATE= 2002oct28
+static INTEL_HEX_RECORD g_HexSpdifFw62[] = {
+ {3,0x0000,0,{0x02,0x45,0xf9}},
+ { 3,0x0003,0,{0x02,0x0f,0xfd}},
+ { 3,0x000b,0,{0x02,0x4d,0x9b}},
+ { 3,0x0013,0,{0x02,0x17,0xfd}},
+ { 3,0x001b,0,{0x02,0x4d,0x9e}},
+ { 3,0x0023,0,{0x02,0x4d,0x75}},
+ { 3,0x002b,0,{0x02,0x46,0xf7}},
+ { 3,0x0033,0,{0x02,0x4d,0x6c}},
+ { 3,0x003b,0,{0x02,0x4d,0x7c}},
+ { 3,0x0043,0,{0x02,0x49,0x00}},
+ { 3,0x004b,0,{0x02,0x4d,0x8f}},
+ { 3,0x0053,0,{0x02,0x4d,0x83}},
+ { 3,0x005b,0,{0x02,0x4d,0x89}},
+ { 3,0x0063,0,{0x02,0x4d,0x93}},
+ {16,0x0500,0,{0x12,0x01,0x10,0x01,0x00,0x00,0x00,0x40,0x6a,0x08,0x11,0x01,0x00,0x01,0x01,0x02}},
+ {16,0x0510,0,{0x00,0x01,0x09,0x02,0xac,0x01,0x03,0x01,0x00,0x80,0x32,0x09,0x04,0x00,0x00,0x00}},
+ {16,0x0520,0,{0x01,0x01,0x00,0x00,0x0a,0x24,0x01,0x00,0x01,0x56,0x00,0x02,0x01,0x02,0x0c,0x24}},
+ {16,0x0530,0,{0x02,0x01,0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x0d,0x24,0x06,0x05,0x01,0x02}},
+ {16,0x0540,0,{0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x24,0x03,0x02,0x04,0x03,0x00,0x05,0x00}},
+ {16,0x0550,0,{0x0c,0x24,0x02,0x03,0x05,0x02,0x00,0x06,0x00,0x00,0x00,0x00,0x15,0x24,0x06,0x06}},
+ {16,0x0560,0,{0x03,0x02,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00}},
+ {16,0x0570,0,{0x00,0x09,0x24,0x03,0x04,0x01,0x01,0x00,0x06,0x00,0x09,0x04,0x01,0x00,0x00,0x01}},
+ {16,0x0580,0,{0x02,0x00,0x00,0x09,0x04,0x01,0x01,0x02,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x01}},
+ {16,0x0590,0,{0x00,0x01,0x00,0x11,0x24,0x02,0x01,0x02,0x02,0x10,0x03,0x44,0xac,0x00,0x80,0xbb}},
+ {16,0x05a0,0,{0x00,0x00,0x77,0x01,0x09,0x05,0x0a,0x05,0x84,0x01,0x01,0x00,0x8f,0x07,0x25,0x01}},
+ {16,0x05b0,0,{0x01,0x00,0x00,0x00,0x09,0x05,0x8f,0x01,0x03,0x00,0x01,0x05,0x00,0x09,0x04,0x01}},
+ {16,0x05c0,0,{0x02,0x02,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x01,0x00,0x01,0x00,0x11,0x24,0x02}},
+ {16,0x05d0,0,{0x01,0x02,0x03,0x18,0x03,0x44,0xac,0x00,0x80,0xbb,0x00,0x00,0x77,0x01,0x09,0x05}},
+ {16,0x05e0,0,{0x0a,0x05,0x46,0x02,0x01,0x00,0x8f,0x07,0x25,0x01,0x01,0x00,0x00,0x00,0x09,0x05}},
+ {16,0x05f0,0,{0x8f,0x01,0x03,0x00,0x01,0x05,0x00,0x09,0x04,0x02,0x00,0x00,0x01,0x02,0x00,0x00}},
+ {16,0x0600,0,{0x09,0x04,0x02,0x01,0x01,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00}},
+ {16,0x0610,0,{0x0e,0x24,0x02,0x01,0x06,0x02,0x10,0x02,0x44,0xac,0x00,0x80,0xbb,0x00,0x09,0x05}},
+ {16,0x0620,0,{0x8c,0x05,0x4c,0x02,0x01,0x00,0x00,0x07,0x25,0x01,0x00,0x02,0x00,0x00,0x09,0x04}},
+ {16,0x0630,0,{0x02,0x02,0x01,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00,0x0e,0x24}},
+ {16,0x0640,0,{0x02,0x01,0x06,0x03,0x18,0x02,0x44,0xac,0x00,0x80,0xbb,0x00,0x09,0x05,0x8c,0x05}},
+ {16,0x0650,0,{0x72,0x03,0x01,0x00,0x00,0x07,0x25,0x01,0x00,0x02,0x00,0x00,0x09,0x04,0x02,0x03}},
+ {16,0x0660,0,{0x01,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00,0x11,0x24,0x02,0x01}},
+ {16,0x0670,0,{0x02,0x02,0x10,0x03,0x44,0xac,0x00,0x80,0xbb,0x00,0x00,0x77,0x01,0x09,0x05,0x8c}},
+ {16,0x0680,0,{0x05,0x84,0x01,0x01,0x00,0x00,0x07,0x25,0x01,0x00,0x02,0x00,0x00,0x09,0x04,0x02}},
+ {16,0x0690,0,{0x04,0x01,0x01,0x02,0x00,0x00,0x07,0x24,0x01,0x04,0x00,0x01,0x00,0x11,0x24,0x02}},
+ {16,0x06a0,0,{0x01,0x02,0x03,0x18,0x03,0x44,0xac,0x00,0x80,0xbb,0x00,0x00,0x77,0x01,0x09,0x05}},
+ {16,0x06b0,0,{0x8c,0x05,0x46,0x02,0x01,0x00,0x00,0x07,0x25,0x01,0x00,0x02,0x00,0x00,0x04,0x03}},
+ {16,0x06c0,0,{0x09,0x04,0x18,0x03,0x45,0x00,0x6d,0x00,0x61,0x00,0x67,0x00,0x69,0x00,0x63,0x00}},
+ {16,0x06d0,0,{0x20,0x00,0x47,0x00,0x6d,0x00,0x62,0x00,0x48,0x00,0x22,0x03,0x45,0x00,0x6d,0x00}},
+ {16,0x06e0,0,{0x61,0x00,0x67,0x00,0x69,0x00,0x63,0x00,0x20,0x00,0x45,0x00,0x4d,0x00,0x49,0x00}},
+ {16,0x06f0,0,{0x20,0x00,0x36,0x00,0x7c,0x00,0x32,0x00,0x20,0x00,0x6d,0x00,0x2a,0x03,0x43,0x00}},
+ {16,0x0700,0,{0x6f,0x00,0x6e,0x00,0x66,0x00,0x69,0x00,0x67,0x00,0x75,0x00,0x72,0x00,0x61,0x00}},
+ {16,0x0710,0,{0x74,0x00,0x69,0x00,0x6f,0x00,0x6e,0x00,0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00}},
+ {16,0x0720,0,{0x69,0x00,0x6e,0x00,0x67,0x00,0x22,0x03,0x49,0x00,0x6e,0x00,0x74,0x00,0x65,0x00}},
+ {16,0x0730,0,{0x72,0x00,0x66,0x00,0x61,0x00,0x63,0x00,0x65,0x00,0x20,0x00,0x53,0x00,0x74,0x00}},
+ {10,0x0740,0,{0x72,0x00,0x69,0x00,0x6e,0x00,0x67,0x00,0x00,0x00}},
+ {16,0x074a,0,{0x90,0x76,0x9a,0x74,0x02,0xf0,0xe4,0x90,0x76,0x91,0xf0,0xa3,0xf0,0x90,0x76,0x90}},
+ {16,0x075a,0,{0xf0,0x90,0x76,0x93,0xf0,0x90,0x76,0x96,0x74,0x03,0xf0,0x90,0x80,0x03,0xf0,0xe4}},
+ {16,0x076a,0,{0x90,0x76,0x97,0xf0,0x90,0x80,0x02,0xf0,0x90,0x76,0x94,0x04,0xf0,0x90,0x80,0x00}},
+ {16,0x077a,0,{0xf0,0xe4,0x90,0x76,0x8e,0xf0,0x90,0x76,0x1a,0xf0,0x90,0x76,0x95,0x04,0xf0,0xc2}},
+ {16,0x078a,0,{0x2e,0x90,0x7f,0x9b,0xe0,0xff,0x54,0x10,0xff,0x70,0x02,0xc2,0x3f,0x90,0x7f,0x9b}},
+ {16,0x079a,0,{0xe0,0xff,0x54,0x10,0xfe,0xff,0xbe,0x10,0x02,0xd2,0x3f,0x90,0x7f,0x9b,0xe0,0xff}},
+ {16,0x07aa,0,{0x54,0x20,0xff,0x70,0x02,0xc2,0x3e,0x90,0x7f,0x9b,0xe0,0xff,0x54,0x20,0xfe,0xff}},
+ {16,0x07ba,0,{0xbe,0x20,0x02,0xd2,0x3e,0x30,0x3f,0x09,0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80}},
+ {16,0x07ca,0,{0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0,0x90,0x76,0x97,0xe0,0x90,0x80,0x02,0xf0}},
+ {16,0x07da,0,{0x30,0x3e,0x09,0x90,0x76,0x95,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x76,0x95,0xe0}},
+ {16,0x07ea,0,{0x54,0xfb,0xf0,0x90,0x76,0x95,0xe0,0x90,0x80,0x01,0xf0,0xa2,0x3e,0x92,0x40,0xa2}},
+ { 3,0x07fa,0,{0x3f,0x92,0x41}},
+ { 1,0x07fd,0,{0x22}},
+ { 2,0x07fe,0,{0xd3,0x22}},
+ {16,0x0800,0,{0xe4,0x90,0x76,0x31,0xf0,0x90,0x76,0x31,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0f}},
+ {16,0x0810,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xed,0xe0,0xfd,0xee,0x6d}},
+ {16,0x0820,0,{0x60,0x0e,0xef,0xc3,0x94,0x0b,0x50,0x08,0x90,0x76,0x31,0xe0,0x04,0xf0,0x80,0xd5}},
+ {16,0x0830,0,{0xef,0xb4,0x0b,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x03}},
+ {16,0x0840,0,{0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x76,0x33,0xf0,0x24}},
+ {16,0x0850,0,{0xf0,0x60,0x0a,0x24,0x0e,0x60,0x02,0x81,0x87,0x12,0x4b,0x3e,0x22,0x90,0x7f,0xed}},
+ {16,0x0860,0,{0xe0,0x64,0x05,0x70,0x51,0x90,0x76,0x18,0x74,0x05,0xf0,0x90,0x76,0x37,0x74,0x01}},
+ {16,0x0870,0,{0xf0,0x90,0x76,0x39,0x74,0x03,0xf0,0x90,0x76,0x21,0xf0,0xe4,0x90,0x76,0x20,0xf0}},
+ {16,0x0880,0,{0x90,0x7f,0xea,0xe0,0xf4,0x60,0x2f,0x90,0x76,0x20,0xe0,0xff,0x75,0xf0,0x0a,0xa4}},
+ {16,0x0890,0,{0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xea,0xe0,0xfd}},
+ {16,0x08a0,0,{0xee,0x6d,0x60,0x12,0x90,0x76,0x21,0xe0,0xfe,0xef,0xc3,0x9e,0x50,0x08,0x90,0x76}},
+ {16,0x08b0,0,{0x20,0xe0,0x04,0xf0,0x80,0xd1,0x90,0x7f,0xed,0xe0,0x64,0x06,0x70,0x52,0x90,0x76}},
+ {16,0x08c0,0,{0x18,0x74,0x06,0xf0,0x90,0x76,0x37,0x74,0x04,0xf0,0x90,0x76,0x39,0x74,0x0a,0xf0}},
+ {16,0x08d0,0,{0x90,0x76,0x21,0xf0,0x90,0x76,0x20,0x74,0x03,0xf0,0x90,0x7f,0xea,0xe0,0xf4,0x60}},
+ {16,0x08e0,0,{0x2f,0x90,0x76,0x20,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34}},
+ {16,0x08f0,0,{0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xea,0xe0,0xfd,0xee,0x6d,0x60,0x12,0x90,0x76}},
+ {16,0x0900,0,{0x21,0xe0,0xfe,0xef,0xc3,0x9e,0x50,0x08,0x90,0x76,0x20,0xe0,0x04,0xf0,0x80,0xd1}},
+ {16,0x0910,0,{0x90,0x76,0x20,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x0920,0,{0xf5,0x83,0xe0,0x90,0x72,0x29,0xf0,0xe4,0x90,0x76,0x3b,0xf0,0x90,0x76,0x21,0xe0}},
+ {16,0x0930,0,{0xfe,0xef,0x6e,0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xeb}},
+ {16,0x0940,0,{0xe0,0x14,0x60,0x13,0x14,0x70,0x02,0x21,0xe2,0x24,0x02,0x60,0x02,0x81,0x7f,0x90}},
+ {16,0x0950,0,{0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x14,0x70,0x7c,0x90,0x7f}},
+ {16,0x0960,0,{0xea,0xe0,0xf4,0x70,0x48,0x90,0x76,0x37,0xe0,0x90,0x76,0x20,0xf0,0x90,0x76,0x39}},
+ {16,0x0970,0,{0xe0,0xfe,0x90,0x76,0x20,0xe0,0xfd,0xc3,0x9e,0x50,0x2b,0x90,0x76,0x3b,0xe0,0xfe}},
+ {16,0x0980,0,{0x04,0xf0,0x74,0xc0,0x2e,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xfe,0xed,0x75}},
+ {16,0x0990,0,{0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xee,0xf0,0x90,0x76}},
+ {16,0x09a0,0,{0x20,0xe0,0x04,0xf0,0x80,0xc7,0x90,0x76,0x3f,0x74,0x01,0xf0,0x22,0x90,0x7e,0xc0}},
+ {16,0x09b0,0,{0xe0,0xfe,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83}},
+ {16,0x09c0,0,{0xee,0xf0,0xe0,0xb4,0x01,0x08,0x90,0x76,0x3e,0x74,0x01,0xf0,0x80,0x05,0xe4,0x90}},
+ {16,0x09d0,0,{0x76,0x3e,0xf0,0x90,0x76,0x3f,0x74,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01}},
+ {16,0x09e0,0,{0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x24,0xfe,0x70,0x02,0x41,0xa3,0x14,0x70,0x02,0x61}},
+ {16,0x09f0,0,{0x3f,0x14,0x70,0x02,0x61,0xdb,0x24,0x03,0x60,0x02,0x81,0x77,0x90,0x7f,0xea,0xe0}},
+ {16,0x0a00,0,{0xf4,0x70,0x6b,0x90,0x76,0x37,0xe0,0x90,0x76,0x20,0xf0,0x90,0x76,0x39,0xe0,0xff}},
+ {16,0x0a10,0,{0x90,0x76,0x20,0xe0,0xfe,0xc3,0x9f,0x50,0x4e,0x90,0x76,0x3b,0xe0,0xff,0x04,0xf0}},
+ {16,0x0a20,0,{0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0,0x0a}},
+ {16,0x0a30,0,{0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x3b,0xe0}},
+ {16,0x0a40,0,{0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff,0xee}},
+ {16,0x0a50,0,{0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90}},
+ {16,0x0a60,0,{0x76,0x20,0xe0,0x04,0xf0,0x80,0xa4,0x90,0x76,0x40,0x74,0x01,0xf0,0x22,0x90,0x7e}},
+ {16,0x0a70,0,{0xc0,0xe0,0xff,0x90,0x76,0x20,0xe0,0xfe,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82}},
+ {16,0x0a80,0,{0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x7e,0xc1,0xe0,0xff,0xee,0x75,0xf0,0x0a}},
+ {16,0x0a90,0,{0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x41,0x74}},
+ {16,0x0aa0,0,{0x01,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xf4,0x70,0x66,0x90,0x76,0x37,0xe0,0x90,0x76}},
+ {16,0x0ab0,0,{0x20,0xf0,0x90,0x76,0x39,0xe0,0xff,0x90,0x76,0x20,0xe0,0xfe,0xc3,0x9f,0x40,0x02}},
+ {16,0x0ac0,0,{0x81,0x8e,0x90,0x76,0x3b,0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34}},
+ {16,0x0ad0,0,{0x7e,0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xae,0xf5,0x82,0xe4,0x34}},
+ {16,0x0ae0,0,{0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x3b,0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5}},
+ {16,0x0af0,0,{0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xaf,0xf5}},
+ {16,0x0b00,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x20,0xe0,0x04,0xf0,0x80,0xa2}},
+ {16,0x0b10,0,{0x90,0x7e,0xc0,0xe0,0xff,0x90,0x76,0x20,0xe0,0xfe,0x75,0xf0,0x0a,0xa4,0x24,0xae}},
+ {16,0x0b20,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x7e,0xc1,0xe0,0xff,0xee,0x75}},
+ {16,0x0b30,0,{0xf0,0x0a,0xa4,0x24,0xaf,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x22,0x90}},
+ {16,0x0b40,0,{0x7f,0xea,0xe0,0xf4,0x70,0x66,0x90,0x76,0x37,0xe0,0x90,0x76,0x20,0xf0,0x90,0x76}},
+ {16,0x0b50,0,{0x39,0xe0,0xff,0x90,0x76,0x20,0xe0,0xfe,0xc3,0x9f,0x40,0x02,0x81,0x8e,0x90,0x76}},
+ {16,0x0b60,0,{0x3b,0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0}},
+ {16,0x0b70,0,{0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef}},
+ {16,0x0b80,0,{0xf0,0x90,0x76,0x3b,0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e}},
+ {16,0x0b90,0,{0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x0ba0,0,{0xf5,0x83,0xef,0xf0,0x90,0x76,0x20,0xe0,0x04,0xf0,0x80,0xa2,0x90,0x7e,0xc0,0xe0}},
+ {16,0x0bb0,0,{0xff,0x90,0x76,0x20,0xe0,0xfe,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82,0xe4,0x34}},
+ {16,0x0bc0,0,{0x75,0xf5,0x83,0xef,0xf0,0x90,0x7e,0xc1,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24}},
+ {16,0x0bd0,0,{0xb1,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xf4}},
+ {16,0x0be0,0,{0x70,0x66,0x90,0x76,0x37,0xe0,0x90,0x76,0x20,0xf0,0x90,0x76,0x39,0xe0,0xff,0x90}},
+ {16,0x0bf0,0,{0x76,0x20,0xe0,0xfe,0xc3,0x9f,0x40,0x02,0x81,0x8e,0x90,0x76,0x3b,0xe0,0xff,0x04}},
+ {16,0x0c00,0,{0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff,0xee,0x75,0xf0}},
+ {16,0x0c10,0,{0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x90,0x76,0x3b}},
+ {16,0x0c20,0,{0xe0,0xff,0x04,0xf0,0x74,0xc0,0x2f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0,0xff}},
+ {16,0x0c30,0,{0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0}},
+ {16,0x0c40,0,{0x90,0x76,0x20,0xe0,0x04,0xf0,0x80,0xa2,0x90,0x7e,0xc0,0xe0,0xff,0x90,0x76,0x20}},
+ {16,0x0c50,0,{0xe0,0xfe,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef}},
+ {16,0x0c60,0,{0xf0,0x90,0x7e,0xc1,0xe0,0xff,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5,0x82,0xe4}},
+ {16,0x0c70,0,{0x34,0x75,0xf5,0x83,0xef,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90}},
+ {15,0x0c80,0,{0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22}},
+ {16,0x0c8f,0,{0x41,0x76,0x68,0x01,0x41,0x76,0x6a,0x02,0x41,0x76,0x6b,0x0a,0xc1,0x20,0xc1,0x21}},
+ { 2,0x0c9f,0,{0xc1,0x2f}},
+ { 4,0x0ca1,0,{0x41,0x76,0x23,0x00}},
+ {16,0x0ca5,0,{0x41,0x72,0x01,0x01,0x45,0x72,0x05,0x00,0x02,0xc9,0x00,0x00,0x45,0x72,0x0a,0x00}},
+ {16,0x0cb5,0,{0x01,0x02,0x03,0x04,0x4d,0x72,0x0f,0xd1,0x00,0xd1,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0cc5,0,{0x28,0x28,0x09,0x00,0x4d,0x72,0x1c,0x01,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07}},
+ {16,0x0cd5,0,{0x08,0x09,0x0a,0x0b,0x41,0x72,0x2e,0x22,0x41,0x72,0x2f,0x23,0x41,0x72,0x30,0x20}},
+ {16,0x0ce5,0,{0x41,0x72,0x31,0x21,0x62,0xd2,0x72,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0cf5,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0d05,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0d15,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0d25,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0d35,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0d45,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0d55,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0d65,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x0d75,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01}},
+ {16,0x0d85,0,{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01}},
+ {16,0x0d95,0,{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01}},
+ {16,0x0da5,0,{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01}},
+ {16,0x0db5,0,{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02}},
+ {16,0x0dc5,0,{0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02}},
+ {16,0x0dd5,0,{0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02}},
+ {16,0x0de5,0,{0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02}},
+ {16,0x0df5,0,{0x02,0x02,0x02,0x02,0x02,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03}},
+ {16,0x0e05,0,{0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03}},
+ {16,0x0e15,0,{0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03}},
+ {16,0x0e25,0,{0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03}},
+ {16,0x0e35,0,{0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04}},
+ {16,0x0e45,0,{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04}},
+ {16,0x0e55,0,{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04}},
+ {16,0x0e65,0,{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04}},
+ {16,0x0e75,0,{0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05}},
+ {16,0x0e85,0,{0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05}},
+ {16,0x0e95,0,{0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05}},
+ {16,0x0ea5,0,{0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x06,0x06}},
+ {16,0x0eb5,0,{0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06}},
+ {16,0x0ec5,0,{0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06}},
+ {16,0x0ed5,0,{0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06}},
+ {16,0x0ee5,0,{0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0x07,0x07,0x08,0x08}},
+ {16,0x0ef5,0,{0x08,0x09,0x09,0x09,0x0a,0x0a,0x0a,0x0b,0x0b,0x0b,0x0c,0x0c,0x0c,0x0d,0x0d,0x0d}},
+ {16,0x0f05,0,{0x0e,0x0e,0x0e,0x0f,0x0f,0x0f,0x10,0x10,0x10,0x11,0x11,0x11,0x12,0x12,0x12,0x13}},
+ {16,0x0f15,0,{0x13,0x13,0x14,0x14,0x14,0x15,0x15,0x15,0x16,0x16,0x16,0x17,0x17,0x17,0x18,0x18}},
+ {16,0x0f25,0,{0x18,0x19,0x19,0x19,0x19,0x1a,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1b,0x1c,0x1c,0x1c}},
+ {16,0x0f35,0,{0x1c,0x1d,0x1d,0x1d,0x1d,0x1e,0x1e,0x1e,0x1e,0x1f,0x1f,0x1f,0x1f,0x20,0x20,0x20}},
+ {16,0x0f45,0,{0x21,0x21,0x21,0x22,0x22,0x22,0x23,0x23,0x24,0x24,0x25,0x25,0x26,0x26,0x27,0x27}},
+ {16,0x0f55,0,{0x28,0x28,0x29,0x29,0x2a,0x2a,0x2b,0x2b,0x2c,0x2c,0x2d,0x2d,0x2e,0x2e,0x2f,0x2f}},
+ {16,0x0f65,0,{0x30,0x30,0x31,0x31,0x32,0x32,0x33,0x33,0x34,0x34,0x35,0x35,0x36,0x36,0x37,0x37}},
+ {16,0x0f75,0,{0x38,0x38,0x39,0x39,0x3a,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,0x44}},
+ {16,0x0f85,0,{0x45,0x46,0x47,0x48,0x49,0x49,0x4a,0x4b,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52}},
+ {16,0x0f95,0,{0x53,0x54,0x55,0x55,0x56,0x56,0x57,0x57,0x58,0x5a,0x5b,0x5d,0x5e,0x5f,0x61,0x62}},
+ {16,0x0fa5,0,{0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6f,0x71,0x72,0x73,0x74}},
+ {16,0x0fb5,0,{0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7e,0x80,0x01,0x37,0x01,0x01,0x38,0x00}},
+ { 1,0x0fc5,0,{0x00}},
+ {16,0x0fc6,0,{0xe4,0xff,0x74,0x46,0x2f,0xf5,0x82,0xe4,0x34,0x76,0xf5,0x83,0xe0,0xfe,0x74,0x20}},
+ {16,0x0fd6,0,{0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x74,0x4e,0x2f,0xf5,0x82,0xe4}},
+ {16,0x0fe6,0,{0x34,0x76,0xf5,0x83,0xe0,0xfe,0x74,0x30,0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83}},
+ { 6,0x0ff6,0,{0xee,0xf0,0x0f,0xbf,0x08,0xcc}},
+ { 1,0x0ffc,0,{0x22}},
+ { 3,0x0ffd,0,{0xc2,0x89,0x32}},
+ {16,0x1000,0,{0xe4,0x90,0x76,0x2c,0xf0,0x90,0x76,0x2c,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0f}},
+ {16,0x1010,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xed,0xe0,0xfd,0xee,0x6d}},
+ {16,0x1020,0,{0x60,0x0e,0xef,0xc3,0x94,0x0b,0x50,0x08,0x90,0x76,0x2c,0xe0,0x04,0xf0,0x80,0xd5}},
+ {16,0x1030,0,{0xef,0xb4,0x0b,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x03}},
+ {16,0x1040,0,{0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x76,0x2e,0xf0,0x24}},
+ {16,0x1050,0,{0xf0,0x60,0x0a,0x24,0x0f,0x60,0x02,0x81,0x7d,0x12,0x4b,0x1b,0x22,0x90,0x7f,0xed}},
+ {16,0x1060,0,{0xe0,0x64,0x05,0x70,0x51,0x90,0x76,0x18,0x74,0x05,0xf0,0x90,0x76,0x38,0x74,0x01}},
+ {16,0x1070,0,{0xf0,0x90,0x76,0x3a,0x74,0x03,0xf0,0x90,0x76,0x1c,0xf0,0xe4,0x90,0x76,0x1b,0xf0}},
+ {16,0x1080,0,{0x90,0x7f,0xea,0xe0,0xf4,0x60,0x2f,0x90,0x76,0x1b,0xe0,0xff,0x75,0xf0,0x0a,0xa4}},
+ {16,0x1090,0,{0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xea,0xe0,0xfd}},
+ {16,0x10a0,0,{0xee,0x6d,0x60,0x12,0x90,0x76,0x1c,0xe0,0xfe,0xef,0xc3,0x9e,0x50,0x08,0x90,0x76}},
+ {16,0x10b0,0,{0x1b,0xe0,0x04,0xf0,0x80,0xd1,0x90,0x7f,0xed,0xe0,0x64,0x06,0x70,0x52,0x90,0x76}},
+ {16,0x10c0,0,{0x18,0x74,0x06,0xf0,0x90,0x76,0x38,0x74,0x04,0xf0,0x90,0x76,0x3a,0x74,0x0a,0xf0}},
+ {16,0x10d0,0,{0x90,0x76,0x1c,0xf0,0x90,0x76,0x1b,0x74,0x03,0xf0,0x90,0x7f,0xea,0xe0,0xf4,0x60}},
+ {16,0x10e0,0,{0x2f,0x90,0x76,0x1b,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34}},
+ {16,0x10f0,0,{0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xea,0xe0,0xfd,0xee,0x6d,0x60,0x12,0x90,0x76}},
+ {16,0x1100,0,{0x1c,0xe0,0xfe,0xef,0xc3,0x9e,0x50,0x08,0x90,0x76,0x1b,0xe0,0x04,0xf0,0x80,0xd1}},
+ {16,0x1110,0,{0xe4,0x90,0x76,0x1e,0xf0,0x90,0x76,0x1c,0xe0,0xff,0x90,0x76,0x1b,0xe0,0xfe,0x6f}},
+ {16,0x1120,0,{0x70,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xeb,0xe0,0x14,0x60}},
+ {16,0x1130,0,{0x13,0x14,0x70,0x02,0x21,0xbf,0x24,0x02,0x60,0x02,0x81,0x75,0x90,0x7f,0xb4,0xe0}},
+ {16,0x1140,0,{0x44,0x01,0xf0,0x22,0x90,0x7f,0xe9,0xe0,0x24,0x7f,0x70,0x6b,0x90,0x7f,0xea,0xe0}},
+ {16,0x1150,0,{0xf4,0x70,0x4a,0x90,0x76,0x38,0xe0,0x90,0x76,0x1b,0xf0,0x90,0x76,0x3a,0xe0,0xff}},
+ {16,0x1160,0,{0x90,0x76,0x1b,0xe0,0xfd,0xc3,0x9f,0x50,0x2b,0xed,0x75,0xf0,0x0a,0xa4,0x24,0xab}},
+ {16,0x1170,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x76,0x1e,0xe0,0xfd,0x04,0xf0}},
+ {16,0x1180,0,{0x74,0x00,0x2d,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xef,0xf0,0x90,0x76,0x1b,0xe0}},
+ {16,0x1190,0,{0x04,0xf0,0x80,0xc7,0x90,0x76,0x1e,0xe0,0x90,0x7f,0xb5,0xf0,0x22,0xee,0x75,0xf0}},
+ {16,0x11a0,0,{0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0}},
+ {16,0x11b0,0,{0x90,0x7f,0xb5,0x74,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90}},
+ {16,0x11c0,0,{0x7f,0xe9,0xe0,0x24,0x7e,0x70,0x02,0x41,0x7e,0x14,0x70,0x02,0x61,0x23,0x14,0x70}},
+ {16,0x11d0,0,{0x02,0x61,0xc8,0x24,0x03,0x60,0x02,0x81,0x6d,0x90,0x7f,0xea,0xe0,0xf4,0x70,0x6d}},
+ {16,0x11e0,0,{0x90,0x76,0x38,0xe0,0x90,0x76,0x1b,0xf0,0x90,0x76,0x3a,0xe0,0xff,0x90,0x76,0x1b}},
+ {16,0x11f0,0,{0xe0,0xc3,0x9f,0x50,0x4f,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4}},
+ {16,0x1200,0,{0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x76,0x1e,0xe0,0xfd,0x04,0xf0,0x74,0x00,0x2d}},
+ {16,0x1210,0,{0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xee,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xad}},
+ {16,0x1220,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x76,0x1e,0xe0,0xfe,0x04,0xf0}},
+ {16,0x1230,0,{0x74,0x00,0x2e,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xef,0xf0,0x90,0x76,0x1b,0xe0}},
+ {16,0x1240,0,{0x04,0xf0,0x80,0xa4,0x90,0x76,0x1e,0xe0,0x90,0x7f,0xb5,0xf0,0x22,0x90,0x76,0x1b}},
+ {16,0x1250,0,{0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0}},
+ {16,0x1260,0,{0x90,0x7f,0x00,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x1270,0,{0xf5,0x83,0xe0,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x22,0x90,0x7f}},
+ {16,0x1280,0,{0xea,0xe0,0xf4,0x70,0x6d,0x90,0x76,0x38,0xe0,0x90,0x76,0x1b,0xf0,0x90,0x76,0x3a}},
+ {16,0x1290,0,{0xe0,0xff,0x90,0x76,0x1b,0xe0,0xc3,0x9f,0x50,0x4f,0xe0,0xff,0x75,0xf0,0x0a,0xa4}},
+ {16,0x12a0,0,{0x24,0xae,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x76,0x1e,0xe0,0xfd}},
+ {16,0x12b0,0,{0x04,0xf0,0x74,0x00,0x2d,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xee,0xf0,0xef,0x75}},
+ {16,0x12c0,0,{0xf0,0x0a,0xa4,0x24,0xaf,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x76}},
+ {16,0x12d0,0,{0x1e,0xe0,0xfe,0x04,0xf0,0x74,0x00,0x2e,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xef}},
+ {16,0x12e0,0,{0xf0,0x90,0x76,0x1b,0xe0,0x04,0xf0,0x80,0xa4,0x90,0x76,0x1e,0xe0,0x90,0x7f,0xb5}},
+ {16,0x12f0,0,{0xf0,0x22,0x90,0x76,0x1b,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xae,0xf5,0x82,0xe4}},
+ {16,0x1300,0,{0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xaf}},
+ {16,0x1310,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5,0x74}},
+ {16,0x1320,0,{0x02,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xf4,0x70,0x6d,0x90,0x76,0x38,0xe0,0x90,0x76}},
+ {16,0x1330,0,{0x1b,0xf0,0x90,0x76,0x3a,0xe0,0xff,0x90,0x76,0x1b,0xe0,0xc3,0x9f,0x50,0x4f,0xe0}},
+ {16,0x1340,0,{0xff,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe}},
+ {16,0x1350,0,{0x90,0x76,0x1e,0xe0,0xfd,0x04,0xf0,0x74,0x00,0x2d,0xf5,0x82,0xe4,0x34,0x7f,0xf5}},
+ {16,0x1360,0,{0x83,0xee,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x1370,0,{0x83,0xe0,0xff,0x90,0x76,0x1e,0xe0,0xfe,0x04,0xf0,0x74,0x00,0x2e,0xf5,0x82,0xe4}},
+ {16,0x1380,0,{0x34,0x7f,0xf5,0x83,0xef,0xf0,0x90,0x76,0x1b,0xe0,0x04,0xf0,0x80,0xa4,0x90,0x76}},
+ {16,0x1390,0,{0x1e,0xe0,0x90,0x7f,0xb5,0xf0,0x22,0x90,0x76,0x1b,0xe0,0xff,0x75,0xf0,0x0a,0xa4}},
+ {16,0x13a0,0,{0x24,0xb0,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0,0xef,0x75}},
+ {16,0x13b0,0,{0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x01}},
+ {16,0x13c0,0,{0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xf4,0x70,0x6d,0x90}},
+ {16,0x13d0,0,{0x76,0x38,0xe0,0x90,0x76,0x1b,0xf0,0x90,0x76,0x3a,0xe0,0xff,0x90,0x76,0x1b,0xe0}},
+ {16,0x13e0,0,{0xc3,0x9f,0x50,0x4f,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34}},
+ {16,0x13f0,0,{0x75,0xf5,0x83,0xe0,0xfe,0x90,0x76,0x1e,0xe0,0xfd,0x04,0xf0,0x74,0x00,0x2d,0xf5}},
+ {16,0x1400,0,{0x82,0xe4,0x34,0x7f,0xf5,0x83,0xee,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5}},
+ {16,0x1410,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x76,0x1e,0xe0,0xfe,0x04,0xf0,0x74}},
+ {16,0x1420,0,{0x00,0x2e,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xef,0xf0,0x90,0x76,0x1b,0xe0,0x04}},
+ {16,0x1430,0,{0xf0,0x80,0xa4,0x90,0x76,0x1e,0xe0,0x90,0x7f,0xb5,0xf0,0x22,0x90,0x76,0x1b,0xe0}},
+ {16,0x1440,0,{0xff,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90}},
+ {16,0x1450,0,{0x7f,0x00,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x1460,0,{0x83,0xe0,0x90,0x7f,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x22,0x90,0x7f,0xb4}},
+ {16,0x1470,0,{0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4}},
+ { 5,0x1480,0,{0xe0,0x44,0x01,0xf0,0x22}},
+ {16,0x1485,0,{0x74,0x00,0xf5,0x86,0x90,0xfd,0xa5,0x7c,0x05,0xa3,0xe5,0x82,0x45,0x83,0x70,0xf9}},
+ { 1,0x1495,0,{0x22}},
+ {16,0x1496,0,{0x90,0x7f,0xd6,0xe0,0x44,0x80,0xf0,0x43,0x87,0x01,0x00,0x00,0x00,0x00,0x00,0x22}},
+ {16,0x14a6,0,{0xc0,0xd0,0xc0,0xe0,0x8f,0xe0,0xc0,0xe0,0x8e,0xe0,0xc0,0xe0,0x8d,0xe0,0xc0,0xe0}},
+ {16,0x14b6,0,{0x8c,0xe0,0xc0,0xe0,0xc0,0x82,0xc0,0x83,0x05,0x86,0xc0,0x84,0xc0,0x85,0x7d,0x00}},
+ {16,0x14c6,0,{0x90,0x7f,0xe3,0x74,0x7b,0xf0,0xa3,0x74,0x80,0xf0,0x7c,0x11,0x90,0x7f,0x99,0xe0}},
+ {16,0x14d6,0,{0x54,0x40,0xdc,0x03,0x02,0x14,0xf3,0xb4,0x00,0x13,0x90,0x7f,0xe2,0x74,0x40,0xf0}},
+ {16,0x14e6,0,{0x90,0x7f,0xe5,0xf0,0x90,0x7f,0xe2,0x74,0x00,0xf0,0x02,0x14,0xd2,0x90,0x76,0x90}},
+ {16,0x14f6,0,{0xe0,0xb4,0x01,0x12,0x90,0x76,0x8f,0xe0,0x2d,0xfd,0x90,0x7f,0xe2,0x74,0x80,0xf0}},
+ {16,0x1506,0,{0x90,0x7f,0x6c,0x02,0x15,0x57,0xb4,0x02,0x12,0x90,0x76,0x8f,0xe0,0x2d,0xfd,0x90}},
+ {16,0x1516,0,{0x7f,0xe2,0x74,0x80,0xf0,0x90,0x7f,0x6c,0x02,0x15,0x96,0xb4,0x03,0x12,0x90,0x76}},
+ {16,0x1526,0,{0x8f,0xe0,0x2d,0xfd,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x7f,0x6c,0x02,0x15,0xe1}},
+ {16,0x1536,0,{0xb4,0x04,0x12,0x90,0x76,0x8f,0xe0,0x2d,0xfd,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90}},
+ {16,0x1546,0,{0x7f,0x6c,0x02,0x16,0x10,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x7f,0x6c,0x02,0x16}},
+ {16,0x1556,0,{0x40,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xdd,0xf2,0x7d}},
+ {16,0x1566,0,{0x02,0x05,0x86,0x90,0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f,0x9b,0xe0,0x54,0x04,0xb4}},
+ {16,0x1576,0,{0x00,0x05,0x05,0x86,0x02,0x16,0x40,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x05,0x86,0xf0}},
+ {16,0x1586,0,{0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xdd,0xd4,0x02,0x16,0x40}},
+ {16,0x1596,0,{0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0}},
+ {16,0x15a6,0,{0xf0,0xf0,0xdd,0xec,0x7d,0x02,0x05,0x86,0x90,0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f}},
+ {16,0x15b6,0,{0x9b,0xe0,0x54,0x04,0xb4,0x00,0x05,0x05,0x86,0x02,0x16,0x40,0x90,0x7f,0xe2,0x74}},
+ {16,0x15c6,0,{0x80,0xf0,0x05,0x86,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0}},
+ { 6,0x15d6,0,{0xf0,0xf0,0xf0,0xf0,0xf0,0xf0}},
+ {16,0x15dc,0,{0xdd,0xce,0x02,0x16,0x40,0xf0,0xf0,0xf0,0xf0,0xdd,0xfa,0x7d,0x02,0x05,0x86,0x90}},
+ {16,0x15ec,0,{0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f,0x9b,0xe0,0x54,0x04,0xb4,0x00,0x05,0x05,0x86}},
+ {16,0x15fc,0,{0x02,0x16,0x40,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x05,0x86,0xf0,0xf0,0xf0,0xf0,0xdd}},
+ {16,0x160c,0,{0xdc,0x02,0x16,0x40,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xdd,0xf8,0x7d,0x02,0x05,0x86}},
+ {16,0x161c,0,{0x90,0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f,0x9b,0xe0,0x54,0x04,0xb4,0x00,0x05,0x05}},
+ {16,0x162c,0,{0x86,0x02,0x16,0x40,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x05,0x86,0xf0,0xf0,0xf0,0xf0}},
+ {16,0x163c,0,{0xf0,0xf0,0xdd,0xda,0x90,0x7f,0xe2,0x74,0x00,0xf0,0xd0,0x85,0xd0,0x84,0x05,0x86}},
+ {16,0x164c,0,{0xd0,0x83,0xd0,0x82,0xd0,0xe0,0xfc,0xd0,0xe0,0xfd,0xd0,0xe0,0xfe,0xd0,0xe0,0xff}},
+ { 5,0x165c,0,{0xd0,0xe0,0xd0,0xd0,0x22}},
+ {16,0x1661,0,{0xc0,0xd0,0xc0,0xe0,0xc0,0x82,0xc0,0x83,0x90,0x76,0x7c,0xe0,0x90,0x7f,0x6f,0xf0}},
+ {16,0x1671,0,{0x90,0x76,0x7d,0xe0,0x90,0x7f,0x6f,0xf0,0x90,0x76,0x7e,0xe0,0x90,0x7f,0x6f,0xf0}},
+ { 9,0x1681,0,{0xd0,0x83,0xd0,0x82,0xd0,0xe0,0xd0,0xd0,0x22}},
+ {16,0x168a,0,{0xc0,0xd0,0xc0,0xe0,0x8f,0xe0,0xc0,0xe0,0x8e,0xe0,0xc0,0xe0,0xc0,0x82,0xc0,0x83}},
+ {16,0x169a,0,{0x05,0x86,0xc0,0x84,0xc0,0x85,0x90,0x76,0x87,0xe0,0xff,0xbf,0x00,0x03,0x02,0x17}},
+ {16,0x16aa,0,{0x01,0x90,0x7f,0x96,0xe0,0x44,0x80,0xf0,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x7f}},
+ {16,0x16ba,0,{0x62,0xe0,0x05,0x86,0x90,0x7f,0xe2,0x74,0x00,0xf0,0x90,0x7f,0x96,0xe0,0x54,0x7f}},
+ {16,0x16ca,0,{0xf0,0x90,0x7f,0xe2,0x74,0x80,0xf0,0x90,0x76,0x8e,0xe0,0xb4,0x01,0x05,0x05,0x86}},
+ {16,0x16da,0,{0x02,0x16,0xf6,0xb4,0x02,0x05,0x05,0x86,0x02,0x16,0xeb,0x05,0x86,0x02,0x16,0xfb}},
+ {16,0x16ea,0,{0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xdf,0xf8,0x02,0x16,0xfb,0xe0,0xe0,0xe0,0xe0,0xdf}},
+ {16,0x16fa,0,{0xfa,0x90,0x7f,0xe2,0x74,0x00,0xf0,0xd0,0x85,0xd0,0x84,0x05,0x86,0xd0,0x83,0xd0}},
+ {12,0x170a,0,{0x82,0xd0,0xe0,0xfe,0xd0,0xe0,0xff,0xd0,0xe0,0xd0,0xd0,0x22}},
+ {16,0x1716,0,{0xc0,0x82,0xc0,0x83,0xc0,0xe0,0xe8,0xc0,0xe0,0x78,0xd1,0xe8,0x14,0xf8,0x70,0xfb}},
+ {10,0x1726,0,{0xd0,0xe0,0xf8,0xd0,0xe0,0xd0,0x83,0xd0,0x82,0x22}},
+ {16,0x1730,0,{0xc0,0x82,0xc0,0x83,0xc0,0xe0,0xe8,0xc0,0xe0,0x78,0x78,0xe8,0x14,0xf8,0x70,0xfb}},
+ {10,0x1740,0,{0xd0,0xe0,0xf8,0xd0,0xe0,0xd0,0x83,0xd0,0x82,0x22}},
+ { 7,0x174a,0,{0x90,0x7f,0xc5,0x74,0x02,0xf0,0x22}},
+ {16,0x1751,0,{0x90,0x7e,0xc0,0xe0,0x90,0x76,0x45,0xf0,0x90,0x7e,0xc1,0xe0,0x90,0x76,0x44,0xf0}},
+ {16,0x1761,0,{0x90,0x7e,0xc2,0xe0,0x90,0x76,0x43,0xf0,0xb4,0x00,0x03,0x02,0x17,0x78,0x90,0x76}},
+ {16,0x1771,0,{0x19,0x74,0x03,0xf0,0x02,0x17,0x8e,0x90,0x76,0x44,0xe0,0xb4,0xbb,0x09,0x90,0x76}},
+ {16,0x1781,0,{0x19,0x74,0x02,0xf0,0x02,0x17,0x8e,0x90,0x76,0x19,0x74,0x01,0xf0,0x90,0x76,0x42}},
+ { 3,0x1791,0,{0xe4,0xf0,0x22}},
+ { 4,0x1794,0,{0x8d,0x29,0x8b,0x2a}},
+ {16,0x1798,0,{0x12,0x49,0xff,0xea,0x49,0x60,0x57,0x12,0x36,0x92,0x7e,0x00,0x29,0xff,0xee,0x3a}},
+ {16,0x17a8,0,{0xc9,0xef,0xc9,0x75,0x2b,0xff,0xf5,0x2c,0x89,0x2d,0xab,0x2b,0xaa,0x2c,0xa9,0x2d}},
+ {16,0x17b8,0,{0x90,0x00,0x01,0x12,0x36,0xab,0xff,0x64,0x04,0x60,0x05,0xef,0x64,0x05,0x70,0x2e}},
+ {16,0x17c8,0,{0xef,0xb4,0x04,0x15,0x90,0x00,0x02,0x12,0x36,0xab,0x65,0x29,0x70,0x0b,0x90,0x00}},
+ {16,0x17d8,0,{0x03,0x12,0x36,0xab,0x65,0x2a,0x70,0x01,0x22,0x12,0x36,0x92,0x7e,0x00,0x29,0xff}},
+ {16,0x17e8,0,{0xee,0x3a,0xc9,0xef,0xc9,0x75,0x2b,0xff,0xf5,0x2c,0x89,0x2d,0x80,0xbc,0x7b,0x00}},
+ { 4,0x17f8,0,{0x7a,0x00,0x79,0x00}},
+ { 1,0x17fc,0,{0x22}},
+ { 3,0x17fd,0,{0xc2,0x8b,0x32}},
+ {16,0x1800,0,{0x90,0x76,0x90,0xe0,0x14,0x60,0x37,0x14,0x70,0x02,0x01,0xd8,0x14,0x70,0x02,0x21}},
+ {16,0x1810,0,{0x72,0x14,0x70,0x02,0x41,0x3b,0x24,0x04,0x60,0x02,0x61,0x03,0x90,0x7f,0xfc,0x74}},
+ {16,0x1820,0,{0xcc,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x95,0xe0,0x44,0x01,0xf0,0x54}},
+ {16,0x1830,0,{0x05,0xf0,0x90,0x80,0x01,0xf0,0xe4,0x90,0x76,0x1a,0xf0,0xc2,0x2e,0x22,0x90,0x76}},
+ {16,0x1840,0,{0x95,0xe0,0x44,0x01,0xf0,0x44,0x02,0xf0,0x30,0x3e,0x06,0xe0,0x44,0x04,0xf0,0x80}},
+ {16,0x1850,0,{0x07,0x90,0x76,0x95,0xe0,0x54,0xfb,0xf0,0x90,0x76,0x1a,0xe0,0xb4,0x01,0x08,0x90}},
+ {16,0x1860,0,{0x76,0x95,0xe0,0x90,0x80,0x01,0xf0,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x22,0x90}},
+ {16,0x1870,0,{0x7f,0xfc,0x74,0x74,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2b}},
+ {16,0x1880,0,{0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80}},
+ {16,0x1890,0,{0xf0,0xef,0xb4,0x02,0x22,0x90,0x7f,0xfc,0x74,0x68,0xf0,0x90,0x7f,0xff,0x74,0xfc}},
+ {16,0x18a0,0,{0xf0,0x90,0x76,0x8f,0x74,0x2f,0xf0,0x90,0x76,0x97,0xe0,0x44,0x02,0xf0,0xe4,0x90}},
+ {16,0x18b0,0,{0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0x30,0x3f,0x09,0x90,0x76,0x97,0xe0,0x54,0xfe}},
+ {16,0x18c0,0,{0xf0,0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfb}},
+ {16,0x18d0,0,{0xf0,0x90,0x80,0x02,0xf0,0xd2,0x2e,0x22,0x90,0x76,0x95,0xe0,0x54,0xfe,0xf0,0x44}},
+ {16,0x18e0,0,{0x02,0xf0,0x30,0x3e,0x06,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x76,0x95,0xe0,0x54}},
+ {16,0x18f0,0,{0xfb,0xf0,0x90,0x76,0x1a,0xe0,0xb4,0x01,0x08,0x90,0x76,0x95,0xe0,0x90,0x80,0x01}},
+ {16,0x1900,0,{0xf0,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x22,0x90,0x7f,0xfc,0x74,0x30,0xf0,0x90}},
+ {16,0x1910,0,{0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2b,0xf0,0x90,0x76,0x97,0xe0,0x54}},
+ {16,0x1920,0,{0xfd,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0xef,0xb4,0x02,0x22,0x90}},
+ {16,0x1930,0,{0x7f,0xfc,0x74,0x1c,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2f}},
+ {16,0x1940,0,{0xf0,0x90,0x76,0x97,0xe0,0x44,0x02,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80}},
+ {16,0x1950,0,{0xf0,0x30,0x3f,0x09,0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97}},
+ {16,0x1960,0,{0xe0,0x44,0x01,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfb,0xf0,0x90,0x80,0x02,0xf0,0xd2}},
+ {16,0x1970,0,{0x2e,0x22,0x90,0x76,0x95,0xe0,0x44,0x01,0xf0,0x44,0x02,0xf0,0x44,0x08,0xf0,0x30}},
+ {16,0x1980,0,{0x3e,0x06,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x76,0x95,0xe0,0x54,0xfb,0xf0,0x90}},
+ {16,0x1990,0,{0x76,0x1a,0xe0,0xb4,0x01,0x08,0x90,0x76,0x95,0xe0,0x90,0x80,0x01,0xf0,0x90,0x76}},
+ {16,0x19a0,0,{0x19,0xe0,0xff,0xb4,0x01,0x25,0x90,0x7f,0xfc,0x74,0xcc,0xf0,0x90,0x7f,0xff,0x74}},
+ {16,0x19b0,0,{0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2b,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd,0xf0,0x54}},
+ {16,0x19c0,0,{0xfb,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0xef,0xb4,0x02,0x25,0x90}},
+ {16,0x19d0,0,{0x7f,0xfc,0x74,0xc8,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2f}},
+ {16,0x19e0,0,{0xf0,0x90,0x76,0x97,0xe0,0x44,0x02,0xf0,0x54,0xfb,0xf0,0xe4,0x90,0x76,0x81,0xf0}},
+ {16,0x19f0,0,{0x90,0x76,0x80,0xf0,0xef,0xb4,0x03,0x25,0x90,0x7f,0xfc,0x74,0x98,0xf0,0x90,0x7f}},
+ {16,0x1a00,0,{0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x5f,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd}},
+ {16,0x1a10,0,{0xf0,0x44,0x04,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0x30,0x3f,0x09}},
+ {16,0x1a20,0,{0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0}},
+ {16,0x1a30,0,{0x90,0x76,0x97,0xe0,0x90,0x80,0x02,0xf0,0xd2,0x2e,0x22,0x90,0x76,0x95,0xe0,0x54}},
+ {16,0x1a40,0,{0xfe,0xf0,0x44,0x02,0xf0,0x44,0x08,0xf0,0x30,0x3e,0x06,0xe0,0x44,0x04,0xf0,0x80}},
+ {16,0x1a50,0,{0x07,0x90,0x76,0x95,0xe0,0x54,0xfb,0xf0,0x90,0x76,0x1a,0xe0,0xb4,0x01,0x08,0x90}},
+ {16,0x1a60,0,{0x76,0x95,0xe0,0x90,0x80,0x01,0xf0,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x25,0x90}},
+ {16,0x1a70,0,{0x7f,0xfc,0x74,0xb4,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2b}},
+ {16,0x1a80,0,{0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0,0xe4,0x90,0x76,0x81,0xf0}},
+ {16,0x1a90,0,{0x90,0x76,0x80,0xf0,0xef,0xb4,0x02,0x25,0x90,0x7f,0xfc,0x74,0xb0,0xf0,0x90,0x7f}},
+ {16,0x1aa0,0,{0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f,0x74,0x2f,0xf0,0x90,0x76,0x97,0xe0,0x44,0x02}},
+ {16,0x1ab0,0,{0xf0,0x54,0xfb,0xf0,0xe4,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0xef,0xb4,0x03}},
+ {16,0x1ac0,0,{0x25,0x90,0x7f,0xfc,0x74,0x68,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x8f}},
+ {16,0x1ad0,0,{0x74,0x5f,0xf0,0x90,0x76,0x97,0xe0,0x54,0xfd,0xf0,0x44,0x04,0xf0,0xe4,0x90,0x76}},
+ {16,0x1ae0,0,{0x81,0xf0,0x90,0x76,0x80,0xf0,0x30,0x3f,0x09,0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0}},
+ {16,0x1af0,0,{0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0,0x90,0x76,0x97,0xe0,0x90,0x80,0x02}},
+ { 4,0x1b00,0,{0xf0,0xd2,0x2e,0x22}},
+ {16,0x1b04,0,{0x30,0x2c,0x38,0xc2,0x2c,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x0e,0x90,0x76,0x7c}},
+ {16,0x1b14,0,{0x74,0xc0,0xf0,0xa3,0x74,0x14,0xf0,0xa3,0x74,0x0b,0xf0,0xef,0xb4,0x02,0x0d,0xe4}},
+ {16,0x1b24,0,{0x90,0x76,0x7c,0xf0,0xa3,0x74,0x10,0xf0,0xa3,0x74,0x0c,0xf0,0xef,0xb4,0x03,0x0b}},
+ {12,0x1b34,0,{0xe4,0x90,0x76,0x7c,0xf0,0xa3,0x74,0x18,0xf0,0xa3,0xf0,0x22}},
+ {16,0x1b40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1b50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1b60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1b70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1b80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1b90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1ba0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1bb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1bc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1bd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1be0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1bf0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c00,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c10,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c20,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c30,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1c90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1ca0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1cb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1cc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1cd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1ce0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1cf0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d00,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d10,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d20,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d30,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1d90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1da0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1db0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1dc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1dd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1de0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1df0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e00,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e10,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e20,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e30,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1e90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1ea0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {14,0x1eb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1ebe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1ece,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1ede,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1eee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1efe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1f0e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1f1e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1f2e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ { 2,0x1f3e,0,{0x00,0x00}},
+ {16,0x1f40,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1f50,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1f60,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1f70,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1f80,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1f90,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1fa0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1fb0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1fc0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1fd0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1fe0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x1ff0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2000,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2010,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2020,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2030,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2040,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2050,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2060,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2070,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2080,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2090,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x20a0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x20b0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x20c0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x20d0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x20e0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x20f0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2100,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2110,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2120,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2130,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2140,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2150,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2160,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2170,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2180,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2190,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x21a0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x21b0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x21c0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x21d0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x21e0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x21f0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2200,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2210,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2220,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2230,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2240,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2250,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2260,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2270,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2280,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2290,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x22a0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x22b0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x22c0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x22d0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x22e0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x22f0,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2300,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2310,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2320,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2330,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2340,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2350,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x2360,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {14,0x2370,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x237e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x238e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x239e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x23ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x23be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x23ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x23de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x23ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x23fe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x240e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x241e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x242e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x243e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x244e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x245e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x246e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x247e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x248e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x249e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x24ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x24be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x24ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x24de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x24ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x24fe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x250e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x251e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x252e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x253e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x254e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x255e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x256e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x257e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x258e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x259e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x25ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x25be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x25ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x25de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x25ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x25fe,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x260e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x261e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x262e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x263e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x264e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x265e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x266e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x267e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x268e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x269e,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x26ae,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x26be,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x26ce,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x26de,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {14,0x26ee,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x26fc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x270c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x271c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x272c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x273c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x274c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x275c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x276c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x277c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x278c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x279c,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x27ac,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x27bc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x27cc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x27dc,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ {16,0x27ec,0,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+ { 5,0x27fc,0,{0x00,0x00,0x00,0x00,0x22}},
+ {16,0x2801,0,{0xc2,0x20,0xc2,0x21,0xc2,0x2a,0x90,0x7f,0xe8,0xe0,0x12,0x37,0xf9,0x28,0x30,0x00}},
+ {16,0x2811,0,{0x28,0x8c,0x01,0x28,0xa2,0x02,0x2a,0x1f,0x21,0x2a,0x6a,0x22,0x29,0x3d,0x80,0x29}},
+ {16,0x2821,0,{0x7d,0x81,0x29,0xd1,0x82,0x2a,0x84,0xa1,0x2a,0xba,0xa2,0x00,0x00,0x2a,0xbf,0x90}},
+ {16,0x2831,0,{0x7f,0xe9,0xe0,0x14,0x60,0x11,0x24,0xfe,0x60,0x28,0x24,0xfe,0x60,0x3b,0x24,0xfc}},
+ {16,0x2841,0,{0x70,0x40,0x12,0x4b,0xa0,0x41,0xcb,0x12,0x4d,0xa7,0x40,0x02,0x41,0xcb,0x90,0x7f}},
+ {16,0x2851,0,{0xea,0xe0,0xb4,0x01,0x04,0xc2,0x22,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0}},
+ {16,0x2861,0,{0x41,0xcb,0x12,0x4d,0xa9,0x90,0x7f,0xea,0xe0,0xb4,0x01,0x04,0xd2,0x22,0x41,0xcb}},
+ {16,0x2871,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0}},
+ {16,0x2881,0,{0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xe9,0xe0,0x24}},
+ {16,0x2891,0,{0xf5,0x70,0x05,0x12,0x48,0x00,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41}},
+ {16,0x28a1,0,{0xcb,0x90,0x7f,0xe9,0xe0,0x24,0xfd,0x60,0x54,0x24,0x02,0x60,0x02,0x21,0x34,0x12}},
+ {16,0x28b1,0,{0x4d,0xa7,0x40,0x02,0x41,0xcb,0x90,0x7f,0xea,0xe0,0x70,0x38,0x90,0x7f,0xec,0xe0}},
+ {16,0x28c1,0,{0xf4,0x54,0x80,0xff,0xc4,0x54,0x0f,0xff,0xe0,0x54,0x07,0x2f,0x25,0xe0,0x24,0xb4}},
+ {16,0x28d1,0,{0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xe4,0xf0,0x90,0x7f,0xec,0xe0,0x54,0x80,0xff}},
+ {16,0x28e1,0,{0x13,0x13,0x13,0x54,0x1f,0xff,0xe0,0x54,0x07,0x2f,0x90,0x7f,0xd7,0xf0,0xe0,0x44}},
+ {16,0x28f1,0,{0x20,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x12,0x4d,0xa9}},
+ {16,0x2901,0,{0x40,0x02,0x41,0xcb,0x90,0x7f,0xea,0xe0,0x70,0x20,0x90,0x7f,0xec,0xe0,0xf4,0x54}},
+ {16,0x2911,0,{0x80,0xff,0xc4,0x54,0x0f,0xff,0xe0,0x54,0x07,0x2f,0x25,0xe0,0x24,0xb4,0xf5,0x82}},
+ {16,0x2921,0,{0xe4,0x34,0x7f,0xf5,0x83,0x74,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01}},
+ {16,0x2931,0,{0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xe9,0xe0}},
+ {16,0x2941,0,{0x60,0x12,0x24,0xf8,0x60,0x09,0x24,0x02,0x70,0x29,0x12,0x43,0xdb,0x41,0xcb,0x12}},
+ {16,0x2951,0,{0x4d,0x5c,0x41,0xcb,0x12,0x4d,0xa5,0xa2,0x22,0xe4,0x33,0xff,0x25,0xe0,0xff,0xa2}},
+ {16,0x2961,0,{0x23,0xe4,0x33,0x4f,0x90,0x7f,0x00,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x02}},
+ {16,0x2971,0,{0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xe9,0xe0}},
+ {16,0x2981,0,{0x60,0x33,0x24,0xf6,0x60,0x2a,0x24,0x04,0x70,0x3d,0x90,0x7f,0xeb,0xe0,0x24,0xde}},
+ {16,0x2991,0,{0x60,0x0c,0x04,0x70,0x12,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f}},
+ {16,0x29a1,0,{0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb}},
+ {16,0x29b1,0,{0x12,0x46,0x85,0x41,0xcb,0x12,0x4d,0xa5,0xe4,0x90,0x7f,0x00,0xf0,0xa3,0xf0,0x90}},
+ {16,0x29c1,0,{0x7f,0xb5,0x74,0x02,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb}},
+ {16,0x29d1,0,{0x90,0x7f,0xe9,0xe0,0x24,0xf4,0x60,0x34,0x24,0x0c,0x70,0x39,0x12,0x4d,0xa5,0x90}},
+ {16,0x29e1,0,{0x7f,0xec,0xe0,0xf4,0x54,0x80,0xff,0xc4,0x54,0x0f,0xff,0xe0,0x54,0x07,0x2f,0x25}},
+ {16,0x29f1,0,{0xe0,0x24,0xb4,0xf5,0x82,0xe4,0x34,0x7f,0xf5,0x83,0xe0,0x54,0xfd,0x90,0x7f,0x00}},
+ {16,0x2a01,0,{0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x02,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0}},
+ {16,0x2a11,0,{0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x41,0xcb,0x90,0x7f}},
+ {16,0x2a21,0,{0xe9,0xe0,0x24,0xf6,0x60,0x12,0x14,0x60,0x1a,0x24,0x02,0x70,0x1d,0xd2,0x20,0x90}},
+ {16,0x2a31,0,{0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x12,0xd2,0x20,0x90,0x7f,0xb4,0xe0,0x44,0x01}},
+ {16,0x2a41,0,{0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x20,0x20,0x18,0x90,0x7f,0xee}},
+ {16,0x2a51,0,{0xe0,0x70,0x04,0xa3,0xe0,0x60,0x0b,0xd2,0x29,0xd2,0x27,0x12,0x17,0x4a,0xd2,0x2a}},
+ {16,0x2a61,0,{0x80,0x03,0x12,0x08,0x00,0xc2,0x20,0x80,0x61,0x90,0x7f,0xee,0xe0,0x70,0x04,0xa3}},
+ {16,0x2a71,0,{0xe0,0x60,0x0b,0xd2,0x29,0xd2,0x28,0x12,0x17,0x4a,0xd2,0x2a,0x80,0x4c,0x12,0x38}},
+ {16,0x2a81,0,{0x74,0x80,0x47,0x90,0x7f,0xe9,0xe0,0x24,0xfe,0x60,0x12,0x14,0x60,0x1a,0x24,0x02}},
+ {16,0x2a91,0,{0x70,0x1d,0xd2,0x21,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x12,0xd2,0x21,0x90}},
+ {16,0x2aa1,0,{0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x20}},
+ {16,0x2ab1,0,{0x21,0x03,0x12,0x10,0x00,0xc2,0x21,0x80,0x11,0x12,0x2a,0xd6,0x80,0x0c,0x12,0x4d}},
+ {16,0x2ac1,0,{0xab,0x50,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x20,0x2a,0x07,0x90,0x7f,0xb4}},
+ { 5,0x2ad1,0,{0xe0,0x44,0x02,0xf0,0x22}},
+ {16,0x2ad6,0,{0xe4,0x90,0x76,0x27,0xf0,0x90,0x76,0x27,0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x42}},
+ {16,0x2ae6,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xec,0xe0,0xfd,0xee,0x6d}},
+ {16,0x2af6,0,{0x60,0x0e,0xef,0xc3,0x94,0x06,0x50,0x08,0x90,0x76,0x27,0xe0,0x04,0xf0,0x80,0xd5}},
+ {16,0x2b06,0,{0xef,0xb4,0x06,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x0f}},
+ {16,0x2b16,0,{0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x76,0x28,0xf0,0x24}},
+ {16,0x2b26,0,{0x9f,0x70,0x02,0xa1,0x74,0x24,0x21,0x60,0x02,0xa1,0xa1,0x90,0x7f,0xe9,0xe0,0x24}},
+ {16,0x2b36,0,{0x7e,0x70,0x02,0x61,0xfc,0x14,0x70,0x02,0x81,0xb5,0x24,0x02,0x60,0x02,0xa1,0x6c}},
+ {16,0x2b46,0,{0xef,0x75,0xf0,0x0f,0xa4,0x24,0x43,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc}},
+ {16,0x2b56,0,{0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x44,0x7a,0xac,0x79,0x00,0x78}},
+ {16,0x2b66,0,{0x00,0xc3,0x12,0x37,0xab,0x70,0x13,0x90,0x7f,0x00,0x74,0x44,0xf0,0xa3,0x74,0xac}},
+ {16,0x2b76,0,{0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x76,0x27,0xe0,0x75,0xf0}},
+ {16,0x2b86,0,{0x0f,0xa4,0x24,0x43,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd}},
+ {16,0x2b96,0,{0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x80,0x7a,0xbb,0x79,0x00,0x78,0x00,0xc3,0x12}},
+ {16,0x2ba6,0,{0x37,0xab,0x70,0x13,0x90,0x7f,0x00,0x74,0x80,0xf0,0xa3,0x74,0xbb,0xf0,0xe4,0xa3}},
+ {16,0x2bb6,0,{0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24}},
+ {16,0x2bc6,0,{0x43,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe}},
+ {16,0x2bd6,0,{0xa3,0xe0,0xff,0x7b,0x00,0x7a,0x77,0x79,0x01,0x78,0x00,0xc3,0x12,0x37,0xab,0x60}},
+ {16,0x2be6,0,{0x02,0xa1,0xa8,0x90,0x7f,0x00,0xf0,0xa3,0x74,0x77,0xf0,0xa3,0x74,0x01,0xf0,0x90}},
+ {16,0x2bf6,0,{0x7f,0xb5,0x74,0x03,0xf0,0x22,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x47}},
+ {16,0x2c06,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3}},
+ {16,0x2c16,0,{0xe0,0xff,0x7b,0x44,0x7a,0xac,0x79,0x00,0x78,0x00,0xc3,0x12,0x37,0xab,0x70,0x13}},
+ {16,0x2c26,0,{0x90,0x7f,0x00,0x74,0x44,0xf0,0xa3,0x74,0xac,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5}},
+ {16,0x2c36,0,{0x74,0x03,0xf0,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x47,0xf5,0x82,0xe4}},
+ {16,0x2c46,0,{0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b}},
+ {16,0x2c56,0,{0x80,0x7a,0xbb,0x79,0x00,0x78,0x00,0xc3,0x12,0x37,0xab,0x70,0x13,0x90,0x7f,0x00}},
+ {16,0x2c66,0,{0x74,0x80,0xf0,0xa3,0x74,0xbb,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0}},
+ {16,0x2c76,0,{0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x47,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x2c86,0,{0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x00,0x7a,0x77}},
+ {16,0x2c96,0,{0x79,0x01,0x78,0x00,0xc3,0x12,0x37,0xab,0x60,0x02,0xa1,0xa8,0x90,0x7f,0x00,0xf0}},
+ {16,0x2ca6,0,{0xa3,0x74,0x77,0xf0,0xa3,0x74,0x01,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x22,0x90}},
+ {16,0x2cb6,0,{0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83}},
+ {16,0x2cc6,0,{0xe0,0xfc,0xa3,0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x44,0x7a,0xac,0x79}},
+ {16,0x2cd6,0,{0x00,0x78,0x00,0xc3,0x12,0x37,0xab,0x70,0x13,0x90,0x7f,0x00,0x74,0x44,0xf0,0xa3}},
+ {16,0x2ce6,0,{0x74,0xac,0xf0,0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x76,0x27,0xe0}},
+ {16,0x2cf6,0,{0x75,0xf0,0x0f,0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3}},
+ {16,0x2d06,0,{0xe0,0xfd,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x80,0x7a,0xbb,0x79,0x00,0x78,0x00}},
+ {16,0x2d16,0,{0xc3,0x12,0x37,0xab,0x70,0x13,0x90,0x7f,0x00,0x74,0x80,0xf0,0xa3,0x74,0xbb,0xf0}},
+ {16,0x2d26,0,{0xe4,0xa3,0xf0,0x90,0x7f,0xb5,0x74,0x03,0xf0,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f}},
+ {16,0x2d36,0,{0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3}},
+ {16,0x2d46,0,{0xe0,0xfe,0xa3,0xe0,0xff,0x7b,0x00,0x7a,0x77,0x79,0x01,0x78,0x00,0xc3,0x12,0x37}},
+ {16,0x2d56,0,{0xab,0x70,0x4f,0x90,0x7f,0x00,0xf0,0xa3,0x74,0x77,0xf0,0xa3,0x74,0x01,0xf0,0x90}},
+ {16,0x2d66,0,{0x7f,0xb5,0x74,0x03,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f}},
+ {16,0x2d76,0,{0xe9,0xe0,0x24,0x7f,0x70,0x1e,0x90,0x76,0x27,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x4f}},
+ {16,0x2d86,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0,0x90,0x7f,0xb5,0x74}},
+ {16,0x2d96,0,{0x01,0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x90,0x7f,0xb4,0xe0,0x44}},
+ { 3,0x2da6,0,{0x01,0xf0,0x22}},
+ {16,0x2da9,0,{0xe4,0x90,0x76,0x36,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4}},
+ {16,0x2db9,0,{0x34,0x75,0xf5,0x83,0x74,0x01,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82}},
+ {16,0x2dc9,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x01,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5}},
+ {16,0x2dd9,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff}},
+ {16,0x2de9,0,{0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x10,0xf0}},
+ {16,0x2df9,0,{0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x05}},
+ {16,0x2e09,0,{0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4}},
+ {16,0x2e19,0,{0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5}},
+ {16,0x2e29,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f}},
+ {16,0x2e39,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24}},
+ {16,0x2e49,0,{0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0}},
+ {16,0x2e59,0,{0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74}},
+ {16,0x2e69,0,{0x01,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83}},
+ {16,0x2e79,0,{0x74,0x03,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x2e89,0,{0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24}},
+ {16,0x2e99,0,{0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x10,0xf0,0xef,0x75,0xf0,0x03,0xa4}},
+ {16,0x2ea9,0,{0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x06,0xf0,0xef,0x75,0xf0,0x03}},
+ {16,0x2eb9,0,{0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0}},
+ {16,0x2ec9,0,{0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x2ed9,0,{0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x2ee9,0,{0xf5,0x83,0x74,0x04,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34}},
+ {16,0x2ef9,0,{0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03}},
+ {16,0x2f09,0,{0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0}},
+ {16,0x2f19,0,{0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x08,0xf0,0xef,0x75}},
+ {16,0x2f29,0,{0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x04,0xf0,0x90}},
+ {16,0x2f39,0,{0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4}},
+ {16,0x2f49,0,{0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82}},
+ {16,0x2f59,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x0a,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5}},
+ {16,0x2f69,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x04,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0}},
+ {16,0x2f79,0,{0xff,0x75,0xf0,0x03,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02}},
+ {16,0x2f89,0,{0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74}},
+ {16,0x2f99,0,{0x09,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83}},
+ {16,0x2fa9,0,{0x74,0x04,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24}},
+ {16,0x2fb9,0,{0x0e,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0xef,0x75,0xf0,0x03,0xa4}},
+ {16,0x2fc9,0,{0x24,0x0f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x07,0xf0,0xef,0x75,0xf0,0x03}},
+ {14,0x2fd9,0,{0xa4,0x24,0x10,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x04,0xf0,0x22}},
+ {16,0x2fe7,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xd2,0x26,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x01}},
+ { 8,0x2ff7,0,{0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ { 1,0x2fff,0,{0x32}},
+ {16,0x3000,0,{0x90,0x7f,0xb6,0xe0,0x20,0xe1,0x02,0xc2,0x3d,0xd2,0x36,0x20,0x36,0x02,0x41,0x6e}},
+ {16,0x3010,0,{0x30,0x3d,0x02,0x41,0x6e,0x90,0x80,0x07,0xe0,0x60,0x04,0xd2,0x36,0x80,0x02,0xc2}},
+ {16,0x3020,0,{0x36,0x20,0x36,0x02,0x41,0x2e,0xd2,0x35,0xe4,0xf5,0x1a,0x90,0x80,0x04,0xe0,0xf5}},
+ {16,0x3030,0,{0x19,0x74,0x08,0x25,0x0e,0xf8,0xa6,0x19,0x85,0x19,0x18,0xe5,0x18,0x20,0xe7,0x04}},
+ {16,0x3040,0,{0xd2,0x38,0x80,0x02,0xc2,0x38,0x30,0x38,0x02,0x21,0xd4,0xe4,0xf5,0x16,0xe5,0x19}},
+ {16,0x3050,0,{0xb4,0xf0,0x0c,0xd2,0x39,0x75,0x08,0x04,0x75,0x09,0xf0,0x05,0x0e,0x80,0x02,0x05}},
+ {16,0x3060,0,{0x16,0xe5,0x19,0x64,0xf7,0x70,0x3d,0xc2,0x39,0xe5,0x0e,0x24,0xfe,0x60,0x17,0x14}},
+ {16,0x3070,0,{0x60,0x22,0x24,0x03,0x70,0x29,0x75,0x08,0x05,0x75,0x09,0xf7,0xe4,0xf5,0x0a,0xf5}},
+ {16,0x3080,0,{0x0b,0x75,0x0e,0x04,0x80,0x20,0x75,0x08,0x06,0x75,0x0a,0xf7,0xe4,0xf5,0x0b,0x75}},
+ {16,0x3090,0,{0x0e,0x04,0x80,0x12,0x75,0x08,0x07,0x75,0x0b,0xf7,0x75,0x0e,0x04,0x80,0x07,0x12}},
+ {16,0x30a0,0,{0x48,0xf3,0x80,0x02,0x05,0x16,0xe5,0x19,0x54,0xf8,0x64,0xf8,0x70,0x3b,0xc2,0x35}},
+ {16,0x30b0,0,{0xe5,0x19,0x24,0x07,0x60,0x0c,0x24,0xfc,0x60,0x08,0x24,0x05,0x24,0xf8,0x50,0x06}},
+ {16,0x30c0,0,{0x80,0x08,0xd2,0x3a,0x80,0x06,0xc2,0x3a,0x80,0x02,0xd2,0x3a,0x75,0x1a,0x01,0x20}},
+ {16,0x30d0,0,{0x3a,0x19,0x90,0x7e,0x80,0x74,0x0f,0xf0,0xa3,0xe5,0x19,0xf0,0xe4,0xa3,0xf0,0xa3}},
+ {16,0x30e0,0,{0xf0,0x90,0x7f,0xb7,0x74,0x04,0xf0,0x80,0x02,0x05,0x16,0x20,0x39,0x6d,0xe5,0x19}},
+ {16,0x30f0,0,{0x64,0xf7,0x60,0x67,0xe5,0x1a,0x70,0x63,0xe5,0x18,0x54,0xf0,0x64,0xf0,0x70,0x59}},
+ {16,0x3100,0,{0x85,0x18,0x19,0xf5,0x0e,0xe5,0x19,0x24,0x0f,0x60,0x1b,0x24,0xfe,0x60,0x17,0x24}},
+ {16,0x3110,0,{0xfd,0x60,0x22,0x14,0x60,0x1f,0x24,0x05,0x70,0x2f,0x75,0x08,0x03,0x05,0x0e,0x85}},
+ {16,0x3120,0,{0x18,0x09,0xd2,0x37,0x80,0x28,0x75,0x08,0x02,0x05,0x0e,0x85,0x18,0x09,0x75,0x14}},
+ {16,0x3130,0,{0x01,0xd2,0x37,0x80,0x19,0x75,0x08,0x05,0x05,0x0e,0x85,0x18,0x09,0xe4,0xf5,0x0a}},
+ {16,0x3140,0,{0xf5,0x0b,0x75,0x0e,0x03,0xd2,0x37,0x80,0x05,0x12,0x48,0xf3,0xc2,0x35,0x30,0x35}},
+ {16,0x3150,0,{0x0a,0x85,0x08,0x13,0x85,0x18,0x12,0x80,0x02,0x05,0x16,0x85,0x18,0x19,0xe5,0x16}},
+ {16,0x3160,0,{0x64,0x04,0x70,0x62,0xf5,0x0e,0xe5,0x19,0x54,0xf0,0xf5,0x19,0xf5,0x15,0x85,0x18}},
+ {16,0x3170,0,{0x19,0xe5,0x15,0x24,0x70,0x60,0x18,0x24,0xf0,0x60,0x14,0x24,0xf0,0x60,0x10,0x24}},
+ {16,0x3180,0,{0xf0,0x60,0x1e,0x24,0xf0,0x60,0x1a,0x24,0xf0,0x60,0x04,0x24,0x60,0x70,0x27,0xe5}},
+ {16,0x3190,0,{0x15,0xc4,0x54,0x0f,0xf5,0x19,0xf5,0x08,0x05,0x0e,0x85,0x18,0x09,0xd2,0x37,0x80}},
+ {16,0x31a0,0,{0x1a,0xe5,0x15,0xc4,0x54,0x0f,0xf5,0x19,0xf5,0x08,0x05,0x0e,0x85,0x18,0x09,0x75}},
+ {16,0x31b0,0,{0x14,0x01,0xd2,0x37,0x80,0x05,0x12,0x48,0xf3,0xc2,0x35,0x30,0x35,0x0a,0x85,0x19}},
+ {16,0x31c0,0,{0x13,0x85,0x18,0x12,0x80,0x02,0x05,0x16,0xe5,0x16,0xd3,0x94,0x05,0x40,0x57,0x12}},
+ {16,0x31d0,0,{0x48,0xf3,0x80,0x52,0x30,0x39,0x17,0xe5,0x0e,0x70,0x0a,0x85,0x08,0x09,0x75,0x08}},
+ {16,0x31e0,0,{0x04,0x05,0x0e,0x80,0x41,0x74,0x08,0x25,0x0e,0xf8,0xa6,0x19,0x80,0x38,0x20,0x37}},
+ {16,0x31f0,0,{0x2a,0xe5,0x0e,0xb4,0x01,0x0f,0x85,0x08,0x0a,0x85,0x09,0x0b,0x85,0x13,0x08,0x85}},
+ {16,0x3200,0,{0x12,0x09,0x75,0x0e,0x04,0xe5,0x14,0xb4,0x01,0x1c,0x85,0x08,0x0a,0xe4,0xf5,0x0b}},
+ {16,0x3210,0,{0x85,0x13,0x08,0x85,0x12,0x09,0x75,0x0e,0x04,0x80,0x0b,0xe5,0x14,0xb4,0x01,0x06}},
+ {16,0x3220,0,{0xe4,0xf5,0x0b,0x75,0x0e,0x04,0xe4,0xf5,0x1a,0x30,0x35,0x02,0x05,0x0e,0xe5,0x0e}},
+ {16,0x3230,0,{0xd3,0x94,0x03,0x50,0x02,0x01,0x0b,0xc2,0x37,0xe4,0xf5,0x0e,0xf5,0x10,0xc2,0x36}},
+ {16,0x3240,0,{0xd2,0x3d,0xf5,0x14,0x74,0x08,0x25,0x10,0xf8,0xe6,0xff,0x74,0x80,0x25,0x10,0xf5}},
+ {16,0x3250,0,{0x82,0xe4,0x34,0x7e,0xf5,0x83,0xef,0xf0,0x74,0x08,0x25,0x10,0xf8,0xe4,0xf6,0x05}},
+ {15,0x3260,0,{0x10,0xe5,0x10,0xb4,0x04,0xde,0x90,0x7f,0xb7,0x74,0x04,0xf0,0x01,0x0b,0x22}},
+ {16,0x326f,0,{0x90,0x76,0x18,0xe0,0xff,0x64,0x05,0x70,0x42,0x90,0x75,0xab,0xe0,0xb4,0x01,0x19}},
+ {16,0x327f,0,{0x90,0x72,0x37,0x74,0x01,0xf0,0xe4,0x90,0x80,0x20,0xf0,0x90,0x80,0x31,0xf0,0x90}},
+ {16,0x328f,0,{0x80,0x28,0xf0,0x90,0x80,0x39,0xf0,0x80,0x22,0xe4,0x90,0x72,0x37,0xf0,0x90,0x75}},
+ {16,0x329f,0,{0xad,0xe0,0x90,0x72,0x2b,0xf0,0xe0,0x24,0x80,0xf0,0xe0,0x90,0x80,0x20,0xf0,0x90}},
+ {16,0x32af,0,{0x80,0x31,0xf0,0x90,0x80,0x28,0xf0,0x90,0x80,0x39,0xf0,0xef,0x64,0x06,0x60,0x02}},
+ {16,0x32bf,0,{0x81,0x99,0x90,0x72,0x39,0x74,0x04,0xf0,0x90,0x72,0x39,0xe0,0xff,0x24,0xfe,0x90}},
+ {16,0x32cf,0,{0x72,0x04,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x32df,0,{0x83,0xe0,0x64,0x01,0x70,0x54,0x90,0x72,0x36,0x04,0xf0,0x90,0x72,0x04,0xe0,0xff}},
+ {16,0x32ef,0,{0x24,0xfd,0x60,0x28,0x24,0xfe,0x60,0x24,0x24,0x03,0x24,0xfb,0x50,0x04,0x60,0x1c}},
+ {16,0x32ff,0,{0x81,0x8c,0x74,0x20,0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xe4,0xf0,0x74,0x28}},
+ {16,0x330f,0,{0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xe4,0xf0,0x81,0x8c,0x90,0x72,0x04,0xe0}},
+ {16,0x331f,0,{0xff,0x24,0x30,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xe4,0xf0,0x74,0x38,0x2f,0xf5}},
+ {16,0x332f,0,{0x82,0xe4,0x34,0x80,0xf5,0x83,0xe4,0xf0,0x81,0x8c,0xe4,0x90,0x72,0x36,0xf0,0x90}},
+ {16,0x333f,0,{0x72,0x39,0xe0,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83}},
+ {16,0x334f,0,{0xe0,0xff,0x7e,0x00,0x90,0x75,0x0c,0xee,0xf0,0xa3,0xef,0xf0,0x70,0x06,0x90,0x72}},
+ {16,0x335f,0,{0x02,0x74,0x3b,0xf0,0x90,0x75,0x0c,0xe0,0xfe,0xa3,0xe0,0xff,0x64,0x80,0x4e,0x70}},
+ {16,0x336f,0,{0x04,0x90,0x72,0x02,0xf0,0xef,0x4e,0x70,0x02,0x81,0x35,0xef,0x64,0x80,0x4e,0x70}},
+ {16,0x337f,0,{0x02,0x81,0x35,0xef,0xf8,0xe4,0x90,0x75,0x0d,0xf0,0xe8,0x90,0x75,0x0c,0xf0,0x90}},
+ {16,0x338f,0,{0x72,0x34,0xe0,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83}},
+ {16,0x339f,0,{0xe0,0xff,0x90,0x72,0x02,0xf0,0x90,0x75,0x0d,0xe0,0x2f,0xf0,0x90,0x75,0x0c,0xe0}},
+ {16,0x33af,0,{0x34,0x00,0xf0,0xe0,0xfe,0xa3,0xe0,0xff,0xe4,0xfc,0xfd,0x7b,0xd6,0x7a,0xa5,0xf9}},
+ {16,0x33bf,0,{0xf8,0xd3,0x12,0x37,0x95,0x40,0x0a,0x90,0x75,0x0c,0x74,0xa5,0xf0,0xa3,0x74,0xd6}},
+ {16,0x33cf,0,{0xf0,0x90,0x75,0x0d,0xe0,0x24,0x2a,0xf0,0x90,0x75,0x0c,0xe0,0x34,0x5a,0xf0,0xe0}},
+ {16,0x33df,0,{0xfe,0xa3,0xe0,0x78,0x05,0xce,0xa2,0xe7,0x13,0xce,0x13,0xd8,0xf8,0xff,0x90,0x75}},
+ {16,0x33ef,0,{0x0c,0xee,0xf0,0xa3,0xef,0xf0,0x90,0x72,0x2c,0xee,0xf0,0xa3,0xef,0xf0,0xd3,0x94}},
+ {16,0x33ff,0,{0xd2,0xee,0x64,0x80,0x94,0x82,0x40,0x0a,0x90,0x72,0x2c,0x74,0x02,0xf0,0xa3,0x74}},
+ {16,0x340f,0,{0xd2,0xf0,0xc3,0x90,0x72,0x2c,0xe0,0x64,0x80,0x94,0x80,0x50,0x04,0xe4,0xf0,0xa3}},
+ {16,0x341f,0,{0xf0,0x90,0x72,0x2c,0xe0,0xfe,0xa3,0xe0,0x24,0x3a,0xf5,0x82,0xee,0x34,0x72,0xf5}},
+ {16,0x342f,0,{0x83,0xe0,0x90,0x72,0x02,0xf0,0x90,0x72,0x04,0xe0,0xff,0x24,0xfd,0x60,0x2d,0x24}},
+ {16,0x343f,0,{0xfe,0x60,0x29,0x24,0x03,0x24,0xfb,0x50,0x04,0x60,0x21,0x80,0x40,0x90,0x72,0x02}},
+ {16,0x344f,0,{0xe0,0xfe,0x74,0x20,0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x74,0x28}},
+ {16,0x345f,0,{0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x80,0x21,0x90,0x72,0x02,0xe0}},
+ {16,0x346f,0,{0xff,0x90,0x72,0x04,0xe0,0xfe,0x24,0x30,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xef}},
+ {16,0x347f,0,{0xf0,0x74,0x38,0x2e,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xef,0xf0,0x90,0x72,0x39}},
+ {11,0x348f,0,{0xe0,0x04,0xf0,0xe0,0x64,0x0a,0x60,0x02,0x41,0xc7,0x22}},
+ {16,0x349a,0,{0x90,0x76,0x18,0xe0,0xff,0xb4,0x05,0x23,0x90,0x72,0x37,0xe0,0x70,0x1d,0x90,0x75}},
+ {16,0x34aa,0,{0xad,0xe0,0x90,0x72,0x2b,0xf0,0xe0,0x24,0x80,0xf0,0xe0,0x90,0x80,0x20,0xf0,0x90}},
+ {16,0x34ba,0,{0x80,0x31,0xf0,0x90,0x80,0x28,0xf0,0x90,0x80,0x39,0xf0,0xef,0x64,0x06,0x60,0x02}},
+ {16,0x34ca,0,{0xc1,0x91,0x90,0x72,0x36,0xe0,0x60,0x02,0xc1,0x91,0x90,0x76,0x40,0xe0,0x70,0x31}},
+ {16,0x34da,0,{0x90,0x72,0x03,0x74,0x03,0xf0,0x90,0x72,0x03,0xe0,0xff,0x75,0xf0,0x0a,0xa4,0x24}},
+ {16,0x34ea,0,{0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x72,0x29,0xe0,0xfd,0xee}},
+ {16,0x34fa,0,{0x6d,0x60,0x0e,0xef,0xc3,0x94,0x0a,0x50,0x08,0x90,0x72,0x03,0xe0,0x04,0xf0,0x80}},
+ {16,0x350a,0,{0xd5,0x90,0x72,0x39,0x74,0x04,0xf0,0x90,0x76,0x40,0xe0,0x70,0x08,0x90,0x72,0x03}},
+ {16,0x351a,0,{0xe0,0x90,0x72,0x39,0xf0,0x90,0x72,0x39,0xe0,0xfd,0x24,0xfe,0x90,0x72,0x2a,0xf0}},
+ {16,0x352a,0,{0xed,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff}},
+ {16,0x353a,0,{0x7e,0x00,0x90,0x75,0x0c,0xee,0xf0,0xa3,0xef,0xf0,0x70,0x06,0x90,0x72,0x02,0x74}},
+ {16,0x354a,0,{0x80,0xf0,0x90,0x75,0x0c,0xe0,0xfe,0xa3,0xe0,0xff,0x64,0x80,0x4e,0x70,0x04,0x90}},
+ {16,0x355a,0,{0x72,0x02,0xf0,0xef,0x4e,0x70,0x02,0xc1,0x1b,0xef,0x64,0x80,0x4e,0x70,0x02,0xc1}},
+ {16,0x356a,0,{0x1b,0xef,0xf8,0xe4,0x90,0x75,0x0d,0xf0,0xe8,0x90,0x75,0x0c,0xf0,0xed,0x75,0xf0}},
+ {16,0x357a,0,{0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xff,0x90,0x72,0x02}},
+ {16,0x358a,0,{0xf0,0x90,0x75,0x0d,0xe0,0x2f,0xf0,0x90,0x75,0x0c,0xe0,0x34,0x00,0xf0,0xe0,0xfe}},
+ {16,0x359a,0,{0xa3,0xe0,0xff,0xe4,0xfc,0xfd,0x7b,0xd6,0x7a,0xa5,0xf9,0xf8,0xd3,0x12,0x37,0x95}},
+ {16,0x35aa,0,{0x40,0x0a,0x90,0x75,0x0c,0x74,0xa5,0xf0,0xa3,0x74,0xd6,0xf0,0x90,0x75,0x0d,0xe0}},
+ {16,0x35ba,0,{0x24,0x2a,0xf0,0x90,0x75,0x0c,0xe0,0x34,0x5a,0xf0,0xe0,0xfe,0xa3,0xe0,0x78,0x05}},
+ {16,0x35ca,0,{0xce,0xa2,0xe7,0x13,0xce,0x13,0xd8,0xf8,0xff,0x90,0x75,0x0c,0xee,0xf0,0xa3,0xef}},
+ {16,0x35da,0,{0xf0,0x90,0x72,0x2c,0xee,0xf0,0xa3,0xef,0xf0,0xd3,0x94,0xd2,0xee,0x64,0x80,0x94}},
+ {16,0x35ea,0,{0x82,0x40,0x0a,0x90,0x72,0x2c,0x74,0x02,0xf0,0xa3,0x74,0xd2,0xf0,0xc3,0x90,0x72}},
+ {16,0x35fa,0,{0x2c,0xe0,0x64,0x80,0x94,0x80,0x50,0x04,0xe4,0xf0,0xa3,0xf0,0x90,0x72,0x2c,0xe0}},
+ {16,0x360a,0,{0xfe,0xa3,0xe0,0x24,0x3a,0xf5,0x82,0xee,0x34,0x72,0xf5,0x83,0xe0,0x90,0x72,0x02}},
+ {16,0x361a,0,{0xf0,0x90,0x72,0x2a,0xe0,0xff,0x24,0xfd,0x60,0x2d,0x24,0xfe,0x60,0x29,0x24,0x03}},
+ {16,0x362a,0,{0x24,0xfb,0x50,0x04,0x60,0x21,0x80,0x40,0x90,0x72,0x02,0xe0,0xfe,0x74,0x20,0x2f}},
+ {16,0x363a,0,{0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x74,0x28,0x2f,0xf5,0x82,0xe4,0x34}},
+ {16,0x364a,0,{0x80,0xf5,0x83,0xee,0xf0,0x80,0x21,0x90,0x72,0x02,0xe0,0xff,0x90,0x72,0x2a,0xe0}},
+ {16,0x365a,0,{0xfe,0x24,0x30,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xef,0xf0,0x74,0x38,0x2e,0xf5}},
+ {16,0x366a,0,{0x82,0xe4,0x34,0x80,0xf5,0x83,0xef,0xf0,0x90,0x76,0x40,0xe0,0x70,0x06,0x90,0x72}},
+ {16,0x367a,0,{0x39,0x74,0x0a,0xf0,0x90,0x72,0x39,0xe0,0x04,0xf0,0xe0,0xc3,0x94,0x0a,0x50,0x02}},
+ { 8,0x368a,0,{0xa1,0x11,0xe4,0x90,0x76,0x40,0xf0,0x22}},
+ {16,0x3692,0,{0xbb,0x01,0x06,0x89,0x82,0x8a,0x83,0xe0,0x22,0x50,0x02,0xe7,0x22,0xbb,0xfe,0x02}},
+ { 9,0x36a2,0,{0xe3,0x22,0x89,0x82,0x8a,0x83,0xe4,0x93,0x22}},
+ {16,0x36ab,0,{0xbb,0x01,0x0c,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe0,0x22,0x50}},
+ {16,0x36bb,0,{0x06,0xe9,0x25,0x82,0xf8,0xe6,0x22,0xbb,0xfe,0x06,0xe9,0x25,0x82,0xf8,0xe2,0x22}},
+ {13,0x36cb,0,{0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe4,0x93,0x22}},
+ {16,0x36d8,0,{0xc2,0xd5,0xec,0x30,0xe7,0x09,0xb2,0xd5,0xe4,0xc3,0x9d,0xfd,0xe4,0x9c,0xfc,0xee}},
+ {16,0x36e8,0,{0x30,0xe7,0x15,0xb2,0xd5,0xe4,0xc3,0x9f,0xff,0xe4,0x9e,0xfe,0x12,0x38,0x1f,0xc3}},
+ {16,0x36f8,0,{0xe4,0x9d,0xfd,0xe4,0x9c,0xfc,0x80,0x03,0x12,0x38,0x1f,0x30,0xd5,0x07,0xc3,0xe4}},
+ { 6,0x3708,0,{0x9f,0xff,0xe4,0x9e,0xfe,0x22}},
+ {16,0x370e,0,{0xbb,0x01,0x10,0xe5,0x82,0x29,0xf5,0x82,0xe5,0x83,0x3a,0xf5,0x83,0xe0,0xf5,0xf0}},
+ {16,0x371e,0,{0xa3,0xe0,0x22,0x50,0x09,0xe9,0x25,0x82,0xf8,0x86,0xf0,0x08,0xe6,0x22,0xbb,0xfe}},
+ {16,0x372e,0,{0x0a,0xe9,0x25,0x82,0xf8,0xe2,0xf5,0xf0,0x08,0xe2,0x22,0xe5,0x83,0x2a,0xf5,0x83}},
+ { 8,0x373e,0,{0xe9,0x93,0xf5,0xf0,0xa3,0xe9,0x93,0x22}},
+ {16,0x3746,0,{0xe8,0x8f,0xf0,0xa4,0xcc,0x8b,0xf0,0xa4,0x2c,0xfc,0xe9,0x8e,0xf0,0xa4,0x2c,0xfc}},
+ {16,0x3756,0,{0x8a,0xf0,0xed,0xa4,0x2c,0xfc,0xea,0x8e,0xf0,0xa4,0xcd,0xa8,0xf0,0x8b,0xf0,0xa4}},
+ {16,0x3766,0,{0x2d,0xcc,0x38,0x25,0xf0,0xfd,0xe9,0x8f,0xf0,0xa4,0x2c,0xcd,0x35,0xf0,0xfc,0xeb}},
+ {16,0x3776,0,{0x8e,0xf0,0xa4,0xfe,0xa9,0xf0,0xeb,0x8f,0xf0,0xa4,0xcf,0xc5,0xf0,0x2e,0xcd,0x39}},
+ {15,0x3786,0,{0xfe,0xe4,0x3c,0xfc,0xea,0xa4,0x2d,0xce,0x35,0xf0,0xfd,0xe4,0x3c,0xfc,0x22}},
+ {16,0x3795,0,{0xeb,0x9f,0xf5,0xf0,0xea,0x9e,0x42,0xf0,0xe9,0x9d,0x42,0xf0,0xec,0x64,0x80,0xc8}},
+ { 6,0x37a5,0,{0x64,0x80,0x98,0x45,0xf0,0x22}},
+ {16,0x37ab,0,{0xeb,0x9f,0xf5,0xf0,0xea,0x9e,0x42,0xf0,0xe9,0x9d,0x42,0xf0,0xe8,0x9c,0x45,0xf0}},
+ { 1,0x37bb,0,{0x22}},
+ {12,0x37bc,0,{0xec,0xf0,0xa3,0xed,0xf0,0xa3,0xee,0xf0,0xa3,0xef,0xf0,0x22}},
+ {16,0x37c8,0,{0xa8,0x82,0x85,0x83,0xf0,0xd0,0x83,0xd0,0x82,0x12,0x37,0xdf,0x12,0x37,0xdf,0x12}},
+ {16,0x37d8,0,{0x37,0xdf,0x12,0x37,0xdf,0xe4,0x73,0xe4,0x93,0xa3,0xc5,0x83,0xc5,0xf0,0xc5,0x83}},
+ {16,0x37e8,0,{0xc8,0xc5,0x82,0xc8,0xf0,0xa3,0xc5,0x83,0xc5,0xf0,0xc5,0x83,0xc8,0xc5,0x82,0xc8}},
+ { 1,0x37f8,0,{0x22}},
+ {16,0x37f9,0,{0xd0,0x83,0xd0,0x82,0xf8,0xe4,0x93,0x70,0x12,0x74,0x01,0x93,0x70,0x0d,0xa3,0xa3}},
+ {16,0x3809,0,{0x93,0xf8,0x74,0x01,0x93,0xf5,0x82,0x88,0x83,0xe4,0x73,0x74,0x02,0x93,0x68,0x60}},
+ { 6,0x3819,0,{0xef,0xa3,0xa3,0xa3,0x80,0xdf}},
+ {16,0x381f,0,{0xbc,0x00,0x0b,0xbe,0x00,0x29,0xef,0x8d,0xf0,0x84,0xff,0xad,0xf0,0x22,0xe4,0xcc}},
+ {16,0x382f,0,{0xf8,0x75,0xf0,0x08,0xef,0x2f,0xff,0xee,0x33,0xfe,0xec,0x33,0xfc,0xee,0x9d,0xec}},
+ {16,0x383f,0,{0x98,0x40,0x05,0xfc,0xee,0x9d,0xfe,0x0f,0xd5,0xf0,0xe9,0xe4,0xce,0xfd,0x22,0xed}},
+ {16,0x384f,0,{0xf8,0xf5,0xf0,0xee,0x84,0x20,0xd2,0x1c,0xfe,0xad,0xf0,0x75,0xf0,0x08,0xef,0x2f}},
+ {16,0x385f,0,{0xff,0xed,0x33,0xfd,0x40,0x07,0x98,0x50,0x06,0xd5,0xf0,0xf2,0x22,0xc3,0x98,0xfd}},
+ { 5,0x386f,0,{0x0f,0xd5,0xf0,0xea,0x22}},
+ {16,0x3874,0,{0xe4,0x90,0x76,0x29,0xf0,0x90,0x76,0x29,0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x42}},
+ {16,0x3884,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xec,0xe0,0xfd,0xee,0x6d}},
+ {16,0x3894,0,{0x60,0x0e,0xef,0xc3,0x94,0x06,0x50,0x08,0x90,0x76,0x29,0xe0,0x04,0xf0,0x80,0xd5}},
+ {16,0x38a4,0,{0xef,0xb4,0x06,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x0f}},
+ {16,0x38b4,0,{0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x76,0x2a,0xf0,0x24}},
+ {16,0x38c4,0,{0xbf,0x70,0x02,0x41,0x41,0x24,0xe0,0x70,0x02,0x41,0x12,0x24,0x21,0x60,0x02,0x41}},
+ {16,0x38d4,0,{0x3a,0x90,0x7f,0xe9,0xe0,0x24,0xfe,0x60,0x7d,0x14,0x70,0x02,0x21,0xb2,0x24,0x02}},
+ {16,0x38e4,0,{0x60,0x02,0x41,0x0a,0x12,0x17,0x51,0x90,0x76,0x42,0xe0,0xfc,0xa3,0xe0,0xfd,0xa3}},
+ {16,0x38f4,0,{0xe0,0xfe,0xa3,0xe0,0xff,0x90,0x76,0x29,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x43,0xf5}},
+ {16,0x3904,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xbc,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01}},
+ {16,0x3914,0,{0x12,0x90,0x76,0x7c,0x74,0x67,0xf0,0x90,0x76,0x7d,0x74,0x06,0xf0,0x90,0x76,0x7e}},
+ {16,0x3924,0,{0x74,0x0b,0xf0,0xef,0xb4,0x02,0x0f,0xe4,0x90,0x76,0x7c,0xf0,0x90,0x76,0x7d,0xf0}},
+ {16,0x3934,0,{0x90,0x76,0x7e,0x74,0x0c,0xf0,0xef,0xb4,0x03,0x0f,0xe4,0x90,0x76,0x7c,0xf0,0x90}},
+ {16,0x3944,0,{0x76,0x7d,0xf0,0x90,0x76,0x7e,0x74,0x18,0xf0,0x90,0x76,0x1a,0x74,0x01,0xf0,0x12}},
+ {16,0x3954,0,{0x3e,0x8f,0x12,0x18,0x00,0x22,0x90,0x7e,0xc2,0xe0,0xff,0xe4,0xfc,0xfd,0xfe,0xfb}},
+ {16,0x3964,0,{0xfa,0x79,0x01,0xf8,0x12,0x37,0x46,0xc8,0xec,0xc8,0xc9,0xed,0xc9,0xca,0xee,0xca}},
+ {16,0x3974,0,{0xcb,0xef,0xcb,0x90,0x7e,0xc1,0xe0,0xfe,0xe4,0xfc,0xfd,0x2b,0xfb,0xea,0x3e,0xfa}},
+ {16,0x3984,0,{0xed,0x39,0xf9,0xec,0x38,0xf8,0x90,0x7e,0xc0,0xe0,0xff,0xe4,0xfe,0xeb,0x2f,0xff}},
+ {16,0x3994,0,{0xee,0x3a,0xfe,0xed,0x39,0xfd,0xec,0x38,0xfc,0x90,0x76,0x29,0xe0,0x75,0xf0,0x0f}},
+ {16,0x39a4,0,{0xa4,0x24,0x47,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xbc,0x22,0x90,0x7e}},
+ {16,0x39b4,0,{0xc2,0xe0,0xff,0xe4,0xfc,0xfd,0xfe,0xfb,0xfa,0x79,0x01,0xf8,0x12,0x37,0x46,0xc8}},
+ {16,0x39c4,0,{0xec,0xc8,0xc9,0xed,0xc9,0xca,0xee,0xca,0xcb,0xef,0xcb,0x90,0x7e,0xc1,0xe0,0xfe}},
+ {16,0x39d4,0,{0xe4,0xfc,0xfd,0x2b,0xfb,0xea,0x3e,0xfa,0xed,0x39,0xf9,0xec,0x38,0xf8,0x90,0x7e}},
+ {16,0x39e4,0,{0xc0,0xe0,0xff,0xe4,0xfe,0xeb,0x2f,0xff,0xee,0x3a,0xfe,0xed,0x39,0xfd,0xec,0x38}},
+ {16,0x39f4,0,{0xfc,0x90,0x76,0x29,0xe0,0x75,0xf0,0x0f,0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x3a04,0,{0xf5,0x83,0x12,0x37,0xbc,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f}},
+ {16,0x3a14,0,{0xe9,0xe0,0x14,0x70,0x19,0x90,0x7e,0xc0,0xe0,0xff,0x90,0x76,0x29,0xe0,0x75,0xf0}},
+ {16,0x3a24,0,{0x0f,0xa4,0x24,0x4f,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef,0xf0,0x22,0x90,0x7f}},
+ {14,0x3a34,0,{0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22}},
+ {16,0x3a42,0,{0xe4,0x90,0x76,0x35,0xf0,0x90,0x76,0x35,0xe0,0xff,0xc3,0x94,0x03,0x40,0x02,0x41}},
+ {16,0x3a52,0,{0xff,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xef}},
+ {16,0x3a62,0,{0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4}},
+ {16,0x3a72,0,{0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74}},
+ {16,0x3a82,0,{0xf0,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83}},
+ {16,0x3a92,0,{0x74,0xff,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xae,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x3aa2,0,{0x83,0xe4,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xaf,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x3ab2,0,{0x83,0x74,0x80,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x3ac2,0,{0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x3ad2,0,{0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x3ae2,0,{0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x3af2,0,{0xf5,0x83,0x74,0x01,0xf0,0x90,0x76,0x35,0xe0,0x04,0xf0,0x41,0x47,0x90,0x76,0x3c}},
+ {16,0x3b02,0,{0x74,0x0a,0xf0,0xe4,0xa3,0xf0,0x90,0x76,0x35,0x74,0x03,0xf0,0x90,0x76,0x3c,0xe0}},
+ {16,0x3b12,0,{0xff,0x90,0x76,0x35,0xe0,0xfe,0xc3,0x9f,0x40,0x02,0x61,0xd2,0x90,0x76,0x3d,0xe0}},
+ {16,0x3b22,0,{0xff,0x04,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xaa,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x3b32,0,{0x83,0xef,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xab,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x3b42,0,{0x83,0xe4,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xac,0xf5,0x82,0xe4,0x34,0x75,0xf5}},
+ {16,0x3b52,0,{0x83,0x74,0x5e,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xad,0xf5,0x82,0xe4,0x34,0x75}},
+ {16,0x3b62,0,{0xf5,0x83,0x74,0xba,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xae,0xf5,0x82,0xe4,0x34}},
+ {16,0x3b72,0,{0x75,0xf5,0x83,0x74,0x05,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xaf,0xf5,0x82,0xe4}},
+ {16,0x3b82,0,{0x34,0x75,0xf5,0x83,0x74,0x80,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb0,0xf5,0x82}},
+ {16,0x3b92,0,{0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb1,0xf5,0x82}},
+ {16,0x3ba2,0,{0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb2,0xf5,0x82}},
+ {16,0x3bb2,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x15,0xf0,0xee,0x75,0xf0,0x0a,0xa4,0x24,0xb3,0xf5}},
+ {16,0x3bc2,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0x90,0x76,0x35,0xe0,0x04,0xf0,0x61,0x0e}},
+ { 1,0x3bd2,0,{0x22}},
+ {16,0x3bd3,0,{0xe4,0x90,0x76,0x36,0xf0,0xe0,0xfb,0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4}},
+ {16,0x3be3,0,{0x34,0x75,0xf5,0x83,0x74,0x40,0xf0,0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82}},
+ {16,0x3bf3,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x0a,0xf0,0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x43,0xf5}},
+ {16,0x3c03,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xc8,0x00,0x00,0xac,0x44,0xeb,0x75,0xf0}},
+ {16,0x3c13,0,{0x0f,0xa4,0x24,0x47,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xc8,0x00,0x00}},
+ {16,0x3c23,0,{0xac,0x44,0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83}},
+ {16,0x3c33,0,{0x12,0x37,0xc8,0x00,0x01,0x77,0x00,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xfb,0x75}},
+ {16,0x3c43,0,{0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x40,0xf0,0xeb}},
+ {16,0x3c53,0,{0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x8c,0xf0}},
+ {16,0x3c63,0,{0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x43,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37}},
+ {16,0x3c73,0,{0xc8,0x00,0x00,0xac,0x44,0xeb,0x75,0xf0,0x0f,0xa4,0x24,0x47,0xf5,0x82,0xe4,0x34}},
+ {16,0x3c83,0,{0x75,0xf5,0x83,0x12,0x37,0xc8,0x00,0x00,0xac,0x44,0xeb,0x75,0xf0,0x0f,0xa4,0x24}},
+ {16,0x3c93,0,{0x4b,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x12,0x37,0xc8,0x00,0x01,0x77,0x00,0x90}},
+ {16,0x3ca3,0,{0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4}},
+ {16,0x3cb3,0,{0x34,0x75,0xf5,0x83,0x74,0x40,0xf0,0xef,0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82}},
+ {16,0x3cc3,0,{0xe4,0x34,0x75,0xf5,0x83,0x74,0x8f,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff}},
+ {16,0x3cd3,0,{0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x41,0xf0}},
+ {16,0x3ce3,0,{0xef,0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x84}},
+ {16,0x3cf3,0,{0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5}},
+ {16,0x3d03,0,{0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x61,0xf0,0xef,0x75,0xf0,0x0f,0xa4,0x24,0x42}},
+ {16,0x3d13,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x81,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0}},
+ {16,0x3d23,0,{0xe0,0xff,0x75,0xf0,0x0f,0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74}},
+ {16,0x3d33,0,{0x61,0xf0,0xef,0x75,0xf0,0x0f,0xa4,0x24,0x42,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83}},
+ { 4,0x3d43,0,{0x74,0x01,0xf0,0x22}},
+ {16,0x3d47,0,{0xc0,0xe0,0xc0,0xf0,0xc0,0x83,0xc0,0x82,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,0xc0,0xe0}},
+ {16,0x3d57,0,{0xea,0xc0,0xe0,0xeb,0xc0,0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,0xe0,0xef}},
+ {16,0x3d67,0,{0xc0,0xe0,0x90,0x7f,0xa2,0xe0,0x90,0x76,0x7f,0xf0,0x90,0x7f,0x74,0xe0,0x90,0x76}},
+ {16,0x3d77,0,{0x87,0xf0,0x90,0x7f,0x75,0xe0,0x90,0x76,0x88,0xf0,0x90,0x7f,0x98,0xe0,0x44,0x02}},
+ {16,0x3d87,0,{0xf0,0x90,0x76,0x96,0xe0,0xff,0x20,0xe1,0x0c,0x44,0x02,0xf0,0x90,0x80,0x03,0xf0}},
+ {16,0x3d97,0,{0xd2,0x32,0x12,0x4a,0xc4,0x90,0x76,0x7f,0xe0,0x20,0xe2,0x50,0x90,0x76,0x87,0xe0}},
+ {16,0x3da7,0,{0xfe,0xa3,0xe0,0x7c,0x00,0x24,0x00,0xf5,0x34,0xec,0x3e,0xf5,0x33,0x90,0x76,0x98}},
+ {16,0x3db7,0,{0xe0,0xfd,0xae,0x33,0xaf,0x34,0x12,0x36,0xd8,0x90,0x76,0x87,0xef,0xf0,0xd2,0x2f}},
+ {16,0x3dc7,0,{0x30,0x31,0x29,0x20,0x3f,0x26,0xc2,0x31,0x90,0x7f,0x94,0xe0,0x54,0xcf,0xf0,0x90}},
+ {16,0x3dd7,0,{0x7f,0x9a,0xe0,0x30,0xe4,0x04,0xd2,0x2d,0xc2,0x2c,0x90,0x7f,0x9a,0xe0,0x20,0xe5}},
+ {16,0x3de7,0,{0x04,0xc2,0x2d,0xd2,0x2c,0x90,0x7f,0x94,0xe0,0x44,0x30,0xf0,0x12,0x4a,0x50,0x12}},
+ {16,0x3df7,0,{0x1b,0x04,0x30,0x2f,0x12,0x12,0x42,0x16,0xc2,0x2f,0x75,0xe8,0x01,0x12,0x16,0x8a}},
+ {16,0x3e07,0,{0x75,0xe8,0x0d,0xd2,0x2b,0x80,0x05,0x75,0xe8,0x01,0xc2,0x2b,0x20,0x2b,0x34,0x90}},
+ {16,0x3e17,0,{0x76,0x19,0xe0,0xff,0xb4,0x01,0x0e,0x90,0x76,0x7c,0x74,0x67,0xf0,0xa3,0x74,0x06}},
+ {16,0x3e27,0,{0xf0,0xa3,0x74,0x0b,0xf0,0xef,0xb4,0x02,0x0b,0x90,0x76,0x7c,0xe4,0xf0,0xa3,0xf0}},
+ {16,0x3e37,0,{0xa3,0x74,0x0c,0xf0,0xef,0xb4,0x03,0x0b,0x90,0x76,0x7c,0xe4,0xf0,0xa3,0xf0,0xa3}},
+ {16,0x3e47,0,{0x74,0x18,0xf0,0x75,0xca,0xd3,0x75,0xcb,0xfe,0xd2,0xca,0x30,0x34,0x04,0xc2,0x34}},
+ {16,0x3e57,0,{0x80,0x02,0xd2,0x34,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x02,0xf0,0xf0,0x90,0x7f}},
+ {16,0x3e67,0,{0x98,0xe0,0x54,0xfd,0xf0,0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,0xe0,0xfd,0xd0,0xe0}},
+ {16,0x3e77,0,{0xfc,0xd0,0xe0,0xfb,0xd0,0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,0xf8,0xd0,0xd0,0xd0}},
+ { 8,0x3e87,0,{0x82,0xd0,0x83,0xd0,0xf0,0xd0,0xe0,0x32}},
+ {16,0x3e8f,0,{0x90,0x76,0x92,0xe0,0x14,0x60,0x1d,0x14,0x70,0x02,0xe1,0x44,0x24,0x02,0x60,0x02}},
+ {16,0x3e9f,0,{0xe1,0xd4,0x90,0x76,0x94,0x74,0x01,0xf0,0x90,0x80,0x00,0xf0,0xe4,0x90,0x76,0x8e}},
+ {16,0x3eaf,0,{0xf0,0xd2,0x31,0x22,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x1b,0xe4,0x90,0x7f,0xf2}},
+ {16,0x3ebf,0,{0xf0,0x90,0x7f,0xf3,0x74,0x30,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97}},
+ {16,0x3ecf,0,{0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0,0xef,0xb4,0x02,0x1b,0xe4,0x90,0x7f,0xf2,0xf0}},
+ {16,0x3edf,0,{0x90,0x7f,0xf3,0x74,0x34,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97,0xe0}},
+ {16,0x3eef,0,{0x44,0x02,0xf0,0x54,0xfb,0xf0,0xef,0xb4,0x03,0x18,0xe4,0x90,0x7f,0xf2,0xf0,0x90}},
+ {16,0x3eff,0,{0x7f,0xf3,0x74,0x64,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97,0xe0,0x44}},
+ {16,0x3f0f,0,{0x04,0xf0,0x90,0x76,0x94,0xe0,0x44,0x01,0xf0,0x90,0x80,0x00,0xf0,0x30,0x3f,0x09}},
+ {16,0x3f1f,0,{0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01,0xf0}},
+ {16,0x3f2f,0,{0x90,0x76,0x97,0xe0,0x90,0x80,0x02,0xf0,0x90,0x76,0x98,0x74,0x04,0xf0,0x90,0x76}},
+ {16,0x3f3f,0,{0x8e,0x74,0x01,0xf0,0x22,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x1b,0xe4,0x90,0x7f}},
+ {16,0x3f4f,0,{0xf2,0xf0,0x90,0x7f,0xf3,0x74,0x44,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76}},
+ {16,0x3f5f,0,{0x97,0xe0,0x54,0xfd,0xf0,0x54,0xfb,0xf0,0xef,0xb4,0x02,0x1b,0xe4,0x90,0x7f,0xf2}},
+ {16,0x3f6f,0,{0xf0,0x90,0x7f,0xf3,0x74,0x4c,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97}},
+ {16,0x3f7f,0,{0xe0,0x44,0x02,0xf0,0x54,0xfb,0xf0,0xef,0xb4,0x03,0x18,0xe4,0x90,0x7f,0xf2,0xf0}},
+ {16,0x3f8f,0,{0x90,0x7f,0xf3,0x74,0x94,0xf0,0x90,0x7f,0xff,0x74,0xfc,0xf0,0x90,0x76,0x97,0xe0}},
+ {16,0x3f9f,0,{0x44,0x04,0xf0,0x90,0x76,0x94,0xe0,0x54,0xfe,0xf0,0x90,0x80,0x00,0xf0,0x30,0x3f}},
+ {16,0x3faf,0,{0x09,0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97,0xe0,0x44,0x01}},
+ {16,0x3fbf,0,{0xf0,0x90,0x76,0x97,0xe0,0x90,0x80,0x02,0xf0,0x90,0x76,0x98,0x74,0x06,0xf0,0x90}},
+ { 6,0x3fcf,0,{0x76,0x8e,0x74,0x02,0xf0,0x22}},
+ {16,0x3fd5,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x02,0xf0}},
+ {16,0x3fe5,0,{0x90,0x7f,0xc7,0xe0,0xf5,0x11,0x75,0x0f,0x00,0x75,0x0d,0x00,0xd2,0x33,0xd0,0x82}},
+ { 5,0x3ff5,0,{0xd0,0x83,0xd0,0xe0,0x32}},
+ { 6,0x3ffa,0,{0x12,0x4a,0xc4,0xc2,0x31,0x22}},
+ {16,0x4000,0,{0xe5,0x11,0xd3,0x94,0x00,0x50,0x02,0x21,0x06,0x90,0x76,0x89,0xe0,0xc3,0x94,0x08}},
+ {16,0x4010,0,{0x40,0x02,0x21,0x06,0x74,0x40,0x25,0x0f,0xf5,0x82,0xe4,0x34,0x7e,0xf5,0x83,0xe0}},
+ {16,0x4020,0,{0xf5,0x17,0xe5,0x0d,0x60,0x0e,0x90,0x80,0x05,0xe5,0x17,0xf0,0x90,0x76,0x89,0xe0}},
+ {16,0x4030,0,{0x04,0xf0,0x01,0xda,0xe5,0x17,0x12,0x37,0xf9,0x40,0xc1,0x02,0x40,0x67,0x05,0x40}},
+ {16,0x4040,0,{0x7a,0x06,0x40,0x98,0x07,0x40,0xc1,0x0c,0x40,0xc1,0x0d,0x40,0xc7,0x0f,0x40,0xcb}},
+ {16,0x4050,0,{0xf6,0x40,0xcb,0xf8,0x40,0xcb,0xfa,0x40,0xcb,0xfb,0x40,0xcb,0xfc,0x40,0xcb,0xfe}},
+ {16,0x4060,0,{0x40,0xcb,0xff,0x00,0x00,0x40,0xda,0x90,0x7e,0x41,0xe0,0x90,0x80,0x05,0xf0,0x90}},
+ {16,0x4070,0,{0x76,0x89,0xe0,0x04,0xf0,0x75,0x11,0x01,0x80,0x60,0x90,0x7e,0x41,0xe0,0x90,0x80}},
+ {16,0x4080,0,{0x05,0xf0,0x90,0x7e,0x42,0xe0,0x90,0x80,0x05,0xf0,0x90,0x76,0x89,0xe0,0x04,0xf0}},
+ {16,0x4090,0,{0xe0,0x04,0xf0,0x75,0x11,0x01,0x80,0x42,0x90,0x7e,0x41,0xe0,0x90,0x80,0x05,0xf0}},
+ {16,0x40a0,0,{0x90,0x7e,0x42,0xe0,0x90,0x80,0x05,0xf0,0x90,0x7e,0x43,0xe0,0x90,0x80,0x05,0xf0}},
+ {16,0x40b0,0,{0x90,0x76,0x89,0xe0,0x04,0xf0,0xe0,0x04,0xf0,0xe0,0x04,0xf0,0x75,0x11,0x01,0x80}},
+ {16,0x40c0,0,{0x19,0xd2,0x3b,0xd2,0x3c,0x80,0x13,0xd2,0x3b,0x80,0x0f,0x90,0x80,0x05,0xe5,0x17}},
+ {16,0x40d0,0,{0xf0,0x90,0x76,0x89,0xe0,0x04,0xf0,0x75,0x11,0x01,0x20,0x3b,0x04,0x05,0x0d,0x80}},
+ {16,0x40e0,0,{0x1f,0x30,0x3c,0x1c,0x90,0x7e,0x41,0xe0,0x90,0x80,0x05,0xf0,0x90,0x7e,0x42,0xe0}},
+ {16,0x40f0,0,{0x90,0x80,0x05,0xf0,0x90,0x76,0x89,0xe0,0x04,0xf0,0xe0,0x04,0xf0,0x75,0x11,0x01}},
+ {16,0x4100,0,{0x05,0x0f,0x15,0x11,0x01,0x00,0xe5,0x11,0x70,0x10,0xc2,0x33,0xf5,0x0d,0xf5,0x0f}},
+ {11,0x4110,0,{0x90,0x7f,0xc7,0x74,0x04,0xf0,0xc2,0x3b,0xc2,0x3c,0x22}},
+ {16,0x411b,0,{0x90,0x76,0x8d,0xe0,0x64,0x01,0x70,0x27,0x30,0x27,0x08,0xc2,0x27,0x12,0x08,0x00}},
+ {16,0x412b,0,{0x12,0x17,0x4a,0x30,0x28,0x08,0xc2,0x28,0x12,0x38,0x74,0x12,0x17,0x4a,0x30,0x2a}},
+ {16,0x413b,0,{0x0e,0xe4,0x90,0x76,0x8d,0xf0,0xc2,0x2a,0x90,0x7f,0xb4,0xe0,0x44,0x02,0xf0,0x90}},
+ {16,0x414b,0,{0x76,0x3f,0xe0,0xb4,0x01,0x05,0xe4,0xf0,0x12,0x32,0x6f,0x90,0x76,0x41,0xe0,0xb4}},
+ {16,0x415b,0,{0x01,0x05,0xe4,0xf0,0x12,0x34,0x9a,0x90,0x76,0x40,0xe0,0xb4,0x01,0x03,0x12,0x34}},
+ {16,0x416b,0,{0x9a,0x90,0x7f,0x9b,0xe0,0x20,0xe4,0x02,0xc2,0x3f,0x90,0x7f,0x9b,0xe0,0x30,0xe4}},
+ {16,0x417b,0,{0x02,0xd2,0x3f,0x90,0x7f,0x9b,0xe0,0x20,0xe5,0x02,0xc2,0x3e,0x90,0x7f,0x9b,0xe0}},
+ {16,0x418b,0,{0x30,0xe5,0x02,0xd2,0x3e,0xa2,0x41,0x30,0x3f,0x01,0xb3,0x50,0x1f,0xa2,0x3f,0x92}},
+ {16,0x419b,0,{0x41,0x30,0x3f,0x09,0x90,0x76,0x97,0xe0,0x54,0xfe,0xf0,0x80,0x07,0x90,0x76,0x97}},
+ {16,0x41ab,0,{0xe0,0x44,0x01,0xf0,0x90,0x76,0x97,0xe0,0x90,0x80,0x02,0xf0,0x30,0x3f,0x34,0x90}},
+ {16,0x41bb,0,{0x76,0x19,0xe0,0xff,0xb4,0x01,0x0e,0x90,0x76,0x7c,0x74,0x67,0xf0,0xa3,0x74,0x06}},
+ {16,0x41cb,0,{0xf0,0xa3,0x74,0x0b,0xf0,0xef,0xb4,0x02,0x0b,0xe4,0x90,0x76,0x7c,0xf0,0xa3,0xf0}},
+ {16,0x41db,0,{0xa3,0x74,0x0c,0xf0,0xef,0xb4,0x03,0x0b,0xe4,0x90,0x76,0x7c,0xf0,0xa3,0xf0,0xa3}},
+ {16,0x41eb,0,{0x74,0x18,0xf0,0xa2,0x40,0x30,0x3e,0x01,0xb3,0x50,0x1f,0xa2,0x3e,0x92,0x40,0x30}},
+ {16,0x41fb,0,{0x3e,0x09,0x90,0x76,0x95,0xe0,0x44,0x04,0xf0,0x80,0x07,0x90,0x76,0x95,0xe0,0x54}},
+ {11,0x420b,0,{0xfb,0xf0,0x90,0x76,0x95,0xe0,0x90,0x80,0x01,0xf0,0x22}},
+ {16,0x4216,0,{0x90,0x76,0x19,0xe0,0x64,0x01,0x70,0x35,0x90,0x76,0x87,0xe0,0xff,0xd3,0x94,0x2d}},
+ {16,0x4226,0,{0x40,0x2b,0x90,0x76,0x86,0x74,0x01,0xf0,0x90,0x76,0x85,0xe0,0x04,0xf0,0xe0,0xd3}},
+ {16,0x4236,0,{0x94,0x0f,0x40,0x19,0xe4,0xf0,0xef,0xd3,0x94,0x31,0x40,0x08,0x90,0x76,0x19,0x74}},
+ {16,0x4246,0,{0x03,0xf0,0x80,0x06,0x90,0x76,0x19,0x74,0x02,0xf0,0x12,0x3e,0x8f,0x90,0x76,0x19}},
+ {16,0x4256,0,{0xe0,0xb4,0x02,0x2c,0x90,0x76,0x87,0xe0,0xff,0xc3,0x94,0x2f,0x50,0x22,0xef,0xd3}},
+ {16,0x4266,0,{0x94,0x2a,0x40,0x1c,0x90,0x76,0x86,0x74,0x01,0xf0,0x90,0x76,0x85,0xe0,0x04,0xf0}},
+ {16,0x4276,0,{0xe0,0xd3,0x94,0x0f,0x40,0x0a,0xe4,0xf0,0x90,0x76,0x19,0x04,0xf0,0x12,0x3e,0x8f}},
+ {16,0x4286,0,{0x90,0x76,0x19,0xe0,0xb4,0x02,0x26,0x90,0x76,0x87,0xe0,0xd3,0x94,0x31,0x40,0x1d}},
+ {16,0x4296,0,{0x90,0x76,0x86,0x74,0x01,0xf0,0x90,0x76,0x85,0xe0,0x04,0xf0,0xe0,0xd3,0x94,0x0f}},
+ {16,0x42a6,0,{0x40,0x0b,0xe4,0xf0,0x90,0x76,0x19,0x74,0x03,0xf0,0x12,0x3e,0x8f,0x90,0x76,0x19}},
+ {16,0x42b6,0,{0xe0,0x64,0x03,0x70,0x3f,0x90,0x76,0x87,0xe0,0xff,0xc3,0x94,0x5f,0x50,0x35,0x90}},
+ {16,0x42c6,0,{0x76,0x86,0x74,0x01,0xf0,0x90,0x76,0x85,0xe0,0x04,0xf0,0xe0,0xd3,0x94,0x0f,0x40}},
+ {16,0x42d6,0,{0x23,0xe4,0xf0,0xef,0xc3,0x94,0x2f,0x50,0x0c,0xef,0xd3,0x94,0x2a,0x40,0x06,0x90}},
+ {16,0x42e6,0,{0x76,0x19,0x74,0x01,0xf0,0xef,0xd3,0x94,0x2f,0x40,0x06,0x90,0x76,0x19,0x74,0x02}},
+ {16,0x42f6,0,{0xf0,0x12,0x3e,0x8f,0x90,0x76,0x86,0xe0,0x70,0x05,0x90,0x76,0x85,0xf0,0x22,0xe4}},
+ { 5,0x4306,0,{0x90,0x76,0x86,0xf0,0x22}},
+ {16,0x430b,0,{0xe4,0x90,0x76,0x96,0xf0,0x90,0x80,0x03,0xf0,0x90,0x7f,0xe0,0x74,0x90,0xf0,0x90}},
+ {16,0x431b,0,{0x7f,0xe1,0x74,0x04,0xf0,0xe4,0x90,0x7f,0xdd,0xf0,0x90,0x7f,0xa1,0xf0,0x53,0x8e}},
+ {16,0x432b,0,{0xf8,0x75,0x88,0x05,0x75,0xb8,0x20,0x75,0xf8,0x01,0x43,0x8e,0x30,0xf5,0xc8,0x75}},
+ {16,0x433b,0,{0xca,0x7f,0x75,0xcb,0xf8,0x43,0xa8,0x20,0x12,0x07,0x4a,0xc2,0x2c,0xc2,0x2d,0xc2}},
+ {16,0x434b,0,{0x2b,0xc2,0x2f,0x90,0x7f,0xfc,0x74,0xdd,0xf0,0x90,0x7f,0xff,0x74,0xff,0xf0,0x90}},
+ {16,0x435b,0,{0x7f,0x97,0xe0,0x44,0x01,0xf0,0x90,0x76,0x19,0x74,0x01,0xf0,0xe4,0x90,0x76,0x85}},
+ {16,0x436b,0,{0xf0,0xa3,0xf0,0x90,0x76,0x81,0xf0,0x90,0x76,0x80,0xf0,0x12,0x49,0x58,0x12,0x0f}},
+ {16,0x437b,0,{0xc6,0x12,0x4a,0x8d,0x90,0x7f,0x97,0xe0,0x44,0x08,0xf0,0xe0,0x54,0xb9,0xf0,0xd2}},
+ {16,0x438b,0,{0x30,0x20,0x30,0x18,0x12,0x47,0xb4,0x12,0x30,0x00,0x12,0x40,0x00,0x12,0x42,0x16}},
+ {16,0x439b,0,{0x12,0x4a,0x50,0x12,0x1b,0x04,0x12,0x16,0x61,0x12,0x42,0x16,0xc2,0x2f,0xc2,0x31}},
+ {16,0x43ab,0,{0xc2,0x32,0xc2,0x34,0xc2,0x33,0xc2,0x29,0xc2,0x27,0xc2,0x28,0xe4,0xf5,0x11,0x90}},
+ {16,0x43bb,0,{0x76,0x89,0xf0,0x90,0x76,0x3f,0xf0,0x90,0x76,0x41,0xf0,0x90,0x76,0x40,0xf0,0x90}},
+ {16,0x43cb,0,{0x76,0x8a,0xf0,0xa3,0xf0,0xa3,0x04,0xf0,0xe4,0xa3,0xf0,0x90,0x76,0x99,0xf0,0x22}},
+ {16,0x43db,0,{0x12,0x4d,0xa3,0x40,0x02,0x81,0xa0,0x90,0x7f,0xeb,0xe0,0x24,0xfe,0x60,0x1e,0x14}},
+ {16,0x43eb,0,{0x60,0x46,0x14,0x60,0x6e,0x14,0x70,0x02,0x81,0x91,0x24,0x04,0x60,0x02,0x81,0x99}},
+ {16,0x43fb,0,{0x74,0x05,0x90,0x7f,0xd4,0xf0,0x74,0x00,0x90,0x7f,0xd5,0xf0,0x22,0x90,0x7f,0xea}},
+ {16,0x440b,0,{0xe0,0xff,0x12,0x49,0xff,0x8b,0x20,0x8a,0x21,0x89,0x22,0xea,0x49,0x60,0x11,0xce}},
+ {16,0x441b,0,{0xea,0xce,0xee,0x90,0x7f,0xd4,0xf0,0xcf,0xe9,0xcf,0xef,0x90,0x7f,0xd5,0xf0,0x22}},
+ {16,0x442b,0,{0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xff,0x12,0x48,0xb0}},
+ {16,0x443b,0,{0x8b,0x20,0x8a,0x21,0x89,0x22,0xea,0x49,0x60,0x11,0xce,0xea,0xce,0xee,0x90,0x7f}},
+ {16,0x444b,0,{0xd4,0xf0,0xcf,0xe9,0xcf,0xef,0x90,0x7f,0xd5,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44}},
+ {16,0x445b,0,{0x01,0xf0,0x22,0x90,0x7f,0xea,0xe0,0xff,0x90,0x7e,0xc0,0xe0,0xfd,0xa3,0xe0,0xfb}},
+ {16,0x446b,0,{0x12,0x17,0x94,0x8b,0x20,0x8a,0x21,0x89,0x22,0xea,0x49,0x60,0x11,0xce,0xea,0xce}},
+ {16,0x447b,0,{0xee,0x90,0x7f,0xd4,0xf0,0xcf,0xe9,0xcf,0xef,0x90,0x7f,0xd5,0xf0,0x22,0x90,0x7f}},
+ {16,0x448b,0,{0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f}},
+ { 5,0x449b,0,{0xb4,0xe0,0x44,0x01,0xf0}},
+ { 1,0x44a0,0,{0x22}},
+ {16,0x44a1,0,{0xc2,0xaf,0xd2,0x24,0x90,0x7f,0x93,0x74,0x30,0xf0,0x90,0x7f,0x9c,0x74,0xbb,0xf0}},
+ {16,0x44b1,0,{0x90,0x7f,0x96,0xe0,0x44,0x30,0xf0,0xe0,0x54,0x30,0xf0,0x90,0x7f,0x94,0x74,0x30}},
+ {16,0x44c1,0,{0xf0,0x90,0x7f,0x9d,0x74,0xcf,0xf0,0x90,0x7f,0x97,0x74,0xa0,0xf0,0x90,0x7f,0x95}},
+ {16,0x44d1,0,{0x74,0xc0,0xf0,0x90,0x7f,0x9e,0x74,0x03,0xf0,0x90,0x7f,0x99,0xe0,0x30,0xe2,0x09}},
+ {16,0x44e1,0,{0x90,0x05,0x19,0x74,0xa0,0xf0,0xe4,0xa3,0xf0,0xc2,0x25,0xc2,0x22,0xc2,0x23,0xc2}},
+ {16,0x44f1,0,{0x26,0x12,0x4a,0xc4,0x12,0x2d,0xa9,0x12,0x3b,0xd3,0x12,0x45,0x59,0x12,0x3a,0x42}},
+ {16,0x4501,0,{0x90,0x76,0x68,0x74,0x01,0xf0,0x70,0x0f,0x12,0x4b,0xbb,0x12,0x07,0xfe,0x12,0x4d}},
+ {16,0x4511,0,{0xa1,0x12,0x1b,0x40,0x12,0x14,0x96,0x12,0x43,0x0b,0x90,0x7f,0xaf,0xe0,0x44,0x01}},
+ {16,0x4521,0,{0xf0,0x90,0x7f,0xae,0xe0,0x44,0x1f,0xf0,0x90,0x7f,0xac,0x74,0xff,0xf0,0x90,0x7f}},
+ {16,0x4531,0,{0xad,0xf0,0x90,0x7f,0xde,0xf0,0x90,0x7f,0xdf,0xf0,0x90,0x7f,0xab,0xf0,0x90,0x7f}},
+ {16,0x4541,0,{0xa9,0xf0,0x90,0x7f,0xaa,0xf0,0x53,0x91,0xef,0x43,0xd8,0x20,0xd2,0xe8,0x43,0xd8}},
+ { 8,0x4551,0,{0x20,0x53,0xa8,0xa0,0x43,0xa8,0x80,0x22}},
+ {16,0x4559,0,{0xe4,0x90,0x76,0x36,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4}},
+ {16,0x4569,0,{0x34,0x75,0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x33,0xf5,0x82,0xe4}},
+ {16,0x4579,0,{0x34,0x75,0xf5,0x83,0x74,0x01,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75}},
+ {16,0x4589,0,{0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0xef,0x75}},
+ {16,0x4599,0,{0xf0,0x03,0xa4,0x24,0x33,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x02,0xf0,0x90}},
+ {16,0x45a9,0,{0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4}},
+ {16,0x45b9,0,{0x34,0x75,0xf5,0x83,0xe4,0xf0,0xef,0x75,0xf0,0x03,0xa4,0x24,0x33,0xf5,0x82,0xe4}},
+ {16,0x45c9,0,{0x34,0x75,0xf5,0x83,0x74,0x03,0xf0,0x90,0x76,0x36,0xe0,0x04,0xf0,0xe0,0xff,0x75}},
+ {16,0x45d9,0,{0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe4,0xf0,0xef,0x75}},
+ {16,0x45e9,0,{0xf0,0x03,0xa4,0x24,0x33,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0x74,0x04,0xf0,0x22}},
+ {12,0x45f9,0,{0x78,0x7f,0xe4,0xf6,0xd8,0xfd,0x75,0x81,0x38,0x02,0x46,0x40}},
+ {16,0x4605,0,{0x02,0x47,0x5a,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0x40,0x03,0xf6,0x80,0x01,0xf2}},
+ {16,0x4615,0,{0x08,0xdf,0xf4,0x80,0x29,0xe4,0x93,0xa3,0xf8,0x54,0x07,0x24,0x0c,0xc8,0xc3,0x33}},
+ {16,0x4625,0,{0xc4,0x54,0x0f,0x44,0x20,0xc8,0x83,0x40,0x04,0xf4,0x56,0x80,0x01,0x46,0xf6,0xdf}},
+ {16,0x4635,0,{0xe4,0x80,0x0b,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x90,0x0c,0x8f,0xe4,0x7e}},
+ {16,0x4645,0,{0x01,0x93,0x60,0xbc,0xa3,0xff,0x54,0x3f,0x30,0xe5,0x09,0x54,0x1f,0xfe,0xe4,0x93}},
+ {16,0x4655,0,{0xa3,0x60,0x01,0x0e,0xcf,0x54,0xc0,0x25,0xe0,0x60,0xa8,0x40,0xb8,0xe4,0x93,0xa3}},
+ {16,0x4665,0,{0xfa,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca}},
+ {16,0x4675,0,{0xf0,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca,0xdf,0xe9,0xde,0xe7,0x80,0xbe}},
+ {16,0x4685,0,{0x90,0x7f,0xec,0xe0,0x90,0x76,0x83,0xf0,0xe0,0x14,0x60,0x1d,0x14,0x60,0x2a,0x14}},
+ {16,0x4695,0,{0x60,0x37,0x14,0x60,0x44,0x24,0x04,0x70,0x50,0x90,0x76,0x91,0xe0,0x90,0x7f,0x00}},
+ {16,0x46a5,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x47,0x90,0x76,0x92,0xe0,0x90,0x7f,0x00}},
+ {16,0x46b5,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x37,0x90,0x76,0x90,0xe0,0x90,0x7f,0x00}},
+ {16,0x46c5,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x27,0x90,0x76,0x84,0xe0,0x90,0x7f,0x00}},
+ {16,0x46d5,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x17,0x90,0x76,0x93,0xe0,0x90,0x7f,0x00}},
+ {16,0x46e5,0,{0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0x80,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0}},
+ { 2,0x46f5,0,{0xd3,0x22}},
+ {16,0x46f7,0,{0xc0,0xe0,0xc0,0xf0,0xc0,0x83,0xc0,0x82,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,0xc0,0xe0}},
+ {16,0x4707,0,{0xea,0xc0,0xe0,0xeb,0xc0,0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,0xe0,0xef}},
+ {16,0x4717,0,{0xc0,0xe0,0xc2,0xca,0xc2,0xcf,0x90,0x7f,0x98,0xe0,0x44,0x01,0xf0,0x30,0x2e,0x03}},
+ {16,0x4727,0,{0x12,0x14,0xa6,0x90,0x7f,0x98,0xe0,0x54,0xfe,0xf0,0x53,0xa8,0xfa,0x12,0x16,0x61}},
+ {16,0x4737,0,{0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,0xe0,0xfd,0xd0,0xe0,0xfc,0xd0,0xe0,0xfb,0xd0}},
+ {16,0x4747,0,{0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,0xf8,0xd0,0xd0,0xd0,0x82,0xd0,0x83,0xd0,0xf0}},
+ { 3,0x4757,0,{0xd0,0xe0,0x32}},
+ {16,0x475a,0,{0xe4,0x90,0x76,0x66,0xf0,0x12,0x44,0xa1,0x20,0x26,0x13,0x90,0x76,0x66,0xe0,0xc3}},
+ {16,0x476a,0,{0x94,0x02,0x50,0x0a,0xe0,0x04,0xf0,0xd2,0x42,0x12,0x4a,0xf6,0x80,0xea,0x30,0x26}},
+ {16,0x477a,0,{0x05,0x12,0x28,0x01,0xc2,0x26,0x30,0x25,0x2b,0x90,0x76,0x96,0xe0,0x54,0xfc,0xf0}},
+ {16,0x478a,0,{0x90,0x80,0x03,0xf0,0x12,0x14,0x96,0x90,0x76,0x96,0xe0,0x44,0x03,0xf0,0x90,0x80}},
+ {16,0x479a,0,{0x03,0xf0,0xe4,0x90,0x76,0x67,0xf0,0x90,0x76,0x67,0xe0,0x04,0xf0,0xe0,0xb4,0x4b}},
+ {10,0x47aa,0,{0xf6,0x12,0x3f,0xfa,0x12,0x41,0x1b,0x80,0xc5,0x22}},
+ {16,0x47b4,0,{0xe4,0x90,0x76,0x9b,0xf0,0x90,0x76,0x9b,0xe0,0xff,0x04,0xf0,0xef,0x60,0x08,0xe0}},
+ {16,0x47c4,0,{0x24,0x08,0xf8,0xe4,0xf6,0x80,0xee,0x90,0x76,0x96,0xe0,0x54,0xfb,0xf0,0x54,0xf7}},
+ {16,0x47d4,0,{0xf0,0x90,0x80,0x03,0xf0,0xe4,0xf5,0x18,0xd2,0x35,0xf5,0x0e,0xf5,0x10,0xd2,0x36}},
+ {16,0x47e4,0,{0x75,0x12,0x11,0x75,0x13,0x22,0xc2,0x37,0xc2,0x39,0xc2,0x38,0xf5,0x16,0xf5,0x14}},
+ {11,0x47f4,0,{0xf5,0x1a,0xf5,0x0d,0xc2,0x3b,0xc2,0x3c,0xc2,0x3d,0x22}},
+ {16,0x4800,0,{0x90,0x7f,0xec,0xe0,0x90,0x76,0x83,0xf0,0xe0,0x14,0x60,0x17,0x14,0x60,0x21,0x14}},
+ {16,0x4810,0,{0x60,0x2b,0x14,0x60,0x32,0x24,0x04,0x70,0x38,0x90,0x7f,0xea,0xe0,0x90,0x76,0x91}},
+ {16,0x4820,0,{0xf0,0x80,0x35,0x90,0x7f,0xea,0xe0,0x90,0x76,0x92,0xf0,0x12,0x3e,0x8f,0x80,0x28}},
+ {16,0x4830,0,{0x90,0x7f,0xea,0xe0,0x90,0x76,0x90,0xf0,0x12,0x18,0x00,0x80,0x1b,0x90,0x7f,0xea}},
+ {16,0x4840,0,{0xe0,0x90,0x76,0x84,0xf0,0x80,0x11,0x90,0x7f,0xea,0xe0,0x90,0x76,0x93,0xf0,0x80}},
+ {10,0x4850,0,{0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0xd3,0x22}},
+ {16,0x485a,0,{0xe4,0x90,0x76,0x26,0xf0,0x90,0x76,0x26,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x34}},
+ {16,0x486a,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xec,0xe0,0xfd,0xee,0x6d}},
+ {16,0x487a,0,{0x60,0x0e,0xef,0xc3,0x94,0x04,0x50,0x08,0x90,0x76,0x26,0xe0,0x04,0xf0,0x80,0xd5}},
+ {16,0x488a,0,{0xef,0xb4,0x04,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0xef,0x75,0xf0,0x03}},
+ {16,0x489a,0,{0xa4,0x24,0x32,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0x90,0x7f,0x00,0xf0,0x90}},
+ { 6,0x48aa,0,{0x7f,0xb5,0x74,0x01,0xf0,0x22}},
+ { 2,0x48b0,0,{0x8f,0x2e}},
+ {16,0x48b2,0,{0xe4,0xf5,0x2f,0x75,0x30,0xff,0x75,0x31,0x06,0x75,0x32,0xbe,0xab,0x30,0xaa,0x31}},
+ {16,0x48c2,0,{0xa9,0x32,0x90,0x00,0x01,0x12,0x36,0xab,0xb4,0x03,0x1f,0xaf,0x2f,0x05,0x2f,0xef}},
+ {16,0x48d2,0,{0x65,0x2e,0x70,0x01,0x22,0x12,0x36,0x92,0x7e,0x00,0x29,0xff,0xee,0x3a,0xc9,0xef}},
+ {16,0x48e2,0,{0xc9,0x75,0x30,0xff,0xf5,0x31,0x89,0x32,0x80,0xd2,0x7b,0x00,0x7a,0x00,0x79,0x00}},
+ { 1,0x48f2,0,{0x22}},
+ {12,0x48f3,0,{0xc2,0x37,0xe4,0xf5,0x0e,0xf5,0x10,0xc2,0x36,0xf5,0x14,0x22}},
+ {16,0x4900,0,{0x02,0x2f,0xe7,0x00,0x02,0x3d,0x47,0x00,0x02,0x4d,0x46,0x00,0x02,0x4b,0xd5,0x00}},
+ {16,0x4910,0,{0x02,0x4b,0x60,0x00,0x02,0x2f,0xff,0x00,0x02,0x4b,0xed,0x00,0x02,0x4b,0x81,0x00}},
+ {16,0x4920,0,{0x02,0x4c,0x04,0x00,0x02,0x3f,0xd5,0x00,0x02,0x4c,0x1b,0x00,0x02,0x4c,0x32,0x00}},
+ {16,0x4930,0,{0x02,0x4c,0x49,0x00,0x02,0x4c,0x60,0x00,0x02,0x4c,0x77,0x00,0x02,0x4c,0x8e,0x00}},
+ {16,0x4940,0,{0x02,0x4c,0xa5,0x00,0x02,0x4c,0xbc,0x00,0x02,0x4c,0xd3,0x00,0x02,0x4c,0xea,0x00}},
+ { 8,0x4950,0,{0x02,0x4d,0x01,0x00,0x02,0x4d,0x18,0x00}},
+ {16,0x4958,0,{0x90,0x76,0x46,0x74,0x80,0xf0,0xe4,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3}},
+ {16,0x4968,0,{0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0x74,0x80,0xf0,0xe4,0xa3,0xf0,0xa3,0xf0}},
+ {16,0x4978,0,{0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0x74,0x40,0xf0,0xe4,0xa3,0xf0,0xa3}},
+ {16,0x4988,0,{0x74,0x40,0xf0,0xe4,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0}},
+ {16,0x4998,0,{0xa3,0x74,0x40,0xf0,0xe4,0xa3,0xf0,0xa3,0x74,0x40,0xf0,0xe4,0xa3,0xf0,0xa3,0xf0}},
+ { 5,0x49a8,0,{0xa3,0xf0,0xa3,0xf0,0x22}},
+ {16,0x49ad,0,{0xe4,0x90,0x76,0x25,0xf0,0x90,0x76,0x25,0xe0,0xff,0x75,0xf0,0x03,0xa4,0x24,0x34}},
+ {16,0x49bd,0,{0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xe0,0xfe,0x90,0x7f,0xec,0xe0,0xfd,0xee,0x6d}},
+ {16,0x49cd,0,{0x60,0x0e,0xef,0xc3,0x94,0x04,0x50,0x08,0x90,0x76,0x25,0xe0,0x04,0xf0,0x80,0xd5}},
+ {16,0x49dd,0,{0xef,0xb4,0x04,0x08,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7e,0xc0,0xe0}},
+ {16,0x49ed,0,{0xfe,0xef,0x75,0xf0,0x03,0xa4,0x24,0x32,0xf5,0x82,0xe4,0x34,0x75,0xf5,0x83,0xee}},
+ { 2,0x49fd,0,{0xf0,0x22}},
+ {16,0x49ff,0,{0xe4,0xfe,0x75,0x1d,0xff,0x75,0x1e,0x05,0x75,0x1f,0x12,0xab,0x1d,0xaa,0x1e,0xa9}},
+ {16,0x4a0f,0,{0x1f,0x90,0x00,0x01,0x12,0x36,0xab,0x64,0x02,0x70,0x2f,0xcd,0xee,0xcd,0x0e,0xed}},
+ {16,0x4a1f,0,{0x6f,0x70,0x01,0x22,0x90,0x00,0x02,0x12,0x37,0x0e,0x85,0xf0,0x1b,0xf5,0x1c,0x62}},
+ {16,0x4a2f,0,{0x1b,0xe5,0x1b,0x62,0x1c,0xe5,0x1c,0x62,0x1b,0x29,0xfd,0xe5,0x1b,0x3a,0xc9,0xed}},
+ {16,0x4a3f,0,{0xc9,0x75,0x1d,0xff,0xf5,0x1e,0x89,0x1f,0x80,0xc1,0x7b,0x00,0x7a,0x00,0x79,0x00}},
+ { 1,0x4a4f,0,{0x22}},
+ {16,0x4a50,0,{0x30,0x2d,0x39,0xc2,0x2d,0x90,0x76,0x19,0xe0,0xff,0xb4,0x01,0x0d,0xe4,0x90,0x76}},
+ {16,0x4a60,0,{0x7c,0xf0,0xa3,0x74,0xf8,0xf0,0xa3,0x74,0x0a,0xf0,0xef,0xb4,0x02,0x0d,0xe4,0x90}},
+ {16,0x4a70,0,{0x76,0x7c,0xf0,0xa3,0x74,0xf0,0xf0,0xa3,0x74,0x0b,0xf0,0xef,0xb4,0x03,0x0d,0xe4}},
+ {13,0x4a80,0,{0x90,0x76,0x7c,0xf0,0xa3,0x74,0xf8,0xf0,0xa3,0x74,0x17,0xf0,0x22}},
+ {16,0x4a8d,0,{0xe4,0xff,0x74,0x56,0x2f,0xf5,0x82,0xe4,0x34,0x76,0xf5,0x83,0xe0,0xfe,0x74,0x28}},
+ {16,0x4a9d,0,{0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83,0xee,0xf0,0x74,0x5e,0x2f,0xf5,0x82,0xe4}},
+ {16,0x4aad,0,{0x34,0x76,0xf5,0x83,0xe0,0xfe,0x74,0x38,0x2f,0xf5,0x82,0xe4,0x34,0x80,0xf5,0x83}},
+ { 6,0x4abd,0,{0xee,0xf0,0x0f,0xbf,0x08,0xcc}},
+ { 1,0x4ac3,0,{0x22}},
+ {16,0x4ac4,0,{0xe4,0x90,0x72,0x36,0xf0,0xa3,0xf0,0x90,0x7f,0x97,0xe0,0x54,0xfb,0xf0,0xe4,0x90}},
+ {16,0x4ad4,0,{0x72,0x33,0xf0,0x90,0x72,0x32,0xf0,0x90,0x72,0x01,0x04,0xf0,0xe4,0x90,0x72,0x33}},
+ {16,0x4ae4,0,{0xf0,0x90,0x72,0x32,0xf0,0x90,0x72,0x01,0x04,0xf0,0x90,0x7f,0x97,0xe0,0x44,0x04}},
+ { 2,0x4af4,0,{0xf0,0x22}},
+ {16,0x4af6,0,{0x90,0x7f,0xd6,0xe0,0x54,0xfb,0xf0,0xe0,0x44,0x08,0xf0,0x30,0x42,0x04,0xe0,0x44}},
+ {16,0x4b06,0,{0x02,0xf0,0x7f,0xdc,0x7e,0x05,0x12,0x4d,0x2f,0x90,0x7f,0xd6,0xe0,0x54,0xf7,0xf0}},
+ { 5,0x4b16,0,{0xe0,0x44,0x04,0xf0,0x22}},
+ {16,0x4b1b,0,{0x90,0x7f,0xeb,0xe0,0x14,0x70,0x14,0x90,0x7f,0xe9,0xe0,0x24,0x7f,0x70,0x04,0x12}},
+ {16,0x4b2b,0,{0x48,0x5a,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44}},
+ { 3,0x4b3b,0,{0x01,0xf0,0x22}},
+ {16,0x4b3e,0,{0x90,0x7f,0xeb,0xe0,0x14,0x70,0x13,0x90,0x7f,0xe9,0xe0,0x14,0x70,0x04,0x12,0x49}},
+ {16,0x4b4e,0,{0xad,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x22,0x90,0x7f,0xb4,0xe0,0x44,0x01}},
+ { 2,0x4b5e,0,{0xf0,0x22}},
+ {16,0x4b60,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x10,0xf0,0x90}},
+ {16,0x4b70,0,{0x76,0x96,0xe0,0x54,0xfd,0xf0,0x90,0x80,0x03,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0}},
+ { 1,0x4b80,0,{0x32}},
+ {16,0x4b81,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x01,0xf0}},
+ {15,0x4b91,0,{0xc2,0x29,0x90,0x76,0x8d,0x74,0x01,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4ba0,0,{0x90,0x7f,0xea,0xe0,0x90,0x76,0x82,0xf0,0xe4,0x90,0x76,0x91,0xf0,0x90,0x76,0x92}},
+ {11,0x4bb0,0,{0xf0,0x90,0x76,0x90,0xf0,0x90,0x76,0x93,0xf0,0xd3,0x22}},
+ {16,0x4bbb,0,{0x90,0x7f,0xd6,0xe0,0x30,0xe7,0x12,0xe0,0x44,0x01,0xf0,0x7f,0x14,0x7e,0x00,0x12}},
+ {10,0x4bcb,0,{0x4d,0x2f,0x90,0x7f,0xd6,0xe0,0x54,0xfe,0xf0,0x22}},
+ {16,0x4bd5,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xd2,0x25,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x08}},
+ { 8,0x4be5,0,{0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4bed,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x01,0xf0}},
+ { 7,0x4bfd,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4c04,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x02,0xf0}},
+ { 7,0x4c14,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4c1b,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x04,0xf0}},
+ { 7,0x4c2b,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4c32,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x04,0xf0}},
+ { 7,0x4c42,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4c49,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x08,0xf0}},
+ { 7,0x4c59,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4c60,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x08,0xf0}},
+ { 7,0x4c70,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4c77,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x10,0xf0}},
+ { 7,0x4c87,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4c8e,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x10,0xf0}},
+ { 7,0x4c9e,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4ca5,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x20,0xf0}},
+ { 7,0x4cb5,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4cbc,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x20,0xf0}},
+ { 7,0x4ccc,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4cd3,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x40,0xf0}},
+ { 7,0x4ce3,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4cea,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x40,0xf0}},
+ { 7,0x4cfa,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4d01,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xa9,0xe0,0x44,0x80,0xf0}},
+ { 7,0x4d11,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4d18,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xaa,0xe0,0x44,0x80,0xf0}},
+ { 7,0x4d28,0,{0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4d2f,0,{0x8e,0x35,0x8f,0x36,0xe5,0x36,0x15,0x36,0xae,0x35,0x70,0x02,0x15,0x35,0x4e,0x60}},
+ { 7,0x4d3f,0,{0x05,0x12,0x14,0x85,0x80,0xee,0x22}},
+ {16,0x4d46,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x04,0xf0,0xd0}},
+ { 6,0x4d56,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x4d5c,0,{0x90,0x76,0x82,0xe0,0x90,0x7f,0x00,0xf0,0x90,0x7f,0xb5,0x74,0x01,0xf0,0xd3,0x22}},
+ { 9,0x4d6c,0,{0xc2,0x25,0x53,0xd8,0xef,0x43,0xd8,0x20,0x32}},
+ { 7,0x4d75,0,{0x53,0x98,0xfe,0x53,0x98,0xfd,0x32}},
+ { 7,0x4d7c,0,{0x53,0xc0,0xfe,0x53,0xc0,0xfd,0x32}},
+ { 6,0x4d83,0,{0x53,0x91,0xbf,0xd2,0x2d,0x32}},
+ { 6,0x4d89,0,{0x53,0x91,0x7f,0xd2,0x2c,0x32}},
+ { 4,0x4d8f,0,{0x53,0x91,0xdf,0x32}},
+ { 4,0x4d93,0,{0x53,0xd8,0xf7,0x32}},
+ { 4,0x4d97,0,{0x12,0x17,0x30,0x22}},
+ { 3,0x4d9b,0,{0xc2,0x8d,0x32}},
+ { 3,0x4d9e,0,{0xc2,0x8f,0x32}},
+ { 2,0x4da1,0,{0xd3,0x22}},
+ { 2,0x4da3,0,{0xd3,0x22}},
+ { 2,0x4da5,0,{0xd3,0x22}},
+ { 2,0x4da7,0,{0xd3,0x22}},
+ { 2,0x4da9,0,{0xd3,0x22}},
+ { 2,0x4dab,0,{0xc3,0x22}},
+ { 0,0x0000,1,{0}}
+};
+/* Source: EMI62SFW.HEX
+:100C8F004176680141766A0241766B0AC120C12123
+:1044A100C2AFD224907F937430F0907F9C74BBF0A4
+:1044B100907F96E04430F0E05430F0907F94743077
+:1044C100F0907F9D74CFF0907F9774A0F0907F95CE
+:1044D10074C0F0907F9E7403F0907F99E030E20900
+:1044E10090051974A0F0E4A3F0C225C222C223C230
+:1044F10026124AC4122DA9123BD3124559123A422F
+:104501009076687401F0700F124BBB1207FE124DCA
+:10451100A1121B4012149612430B907FAFE044018D
+:10452100F0907FAEE0441FF0907FAC74FFF0907F7D
+:10453100ADF0907FDEF0907FDFF0907FABF0907F69
+:10454100A9F0907FAAF05391EF43D820D2E843D845
+:084551002053A8A043A880221A
+:10475A00E4907666F01244A1202613907666E0C3B0
+:10476A009402500AE004F0D242124AF680EA302655
+:10477A0005122801C22630252B907696E054FCF0CB
+:10478A00908003F0121496907696E04403F090809D
+:10479A0003F0E4907667F0907667E004F0E0B44BBB
+:0A47AA00F6123FFA12411B80C522EF
+:10280100C220C221C22A907FE8E01237F9283000A5
+:10281100288C0128A2022A1F212A6A22293D802907
+:102821007D8129D1822A84A12ABAA200002ABF90DF
+:102831007FE9E014601124FE602824FE603B24FC43
+:102841007040124BA041CB124DA7400241CB907F6B
+:10285100EAE0B40104C22241CB907FB4E04401F02C
+:1028610041CB124DA9907FEAE0B40104D22241CBC1
+:10287100907FB4E04401F041CB907FB4E04401F09B
+:1028810041CB907FB4E04401F041CB907FE9E0245B
+:10289100F5700512480041CB907FB4E04401F0414E
+:1028A100CB907FE9E024FD605424026002213412C0
+:1028B1004DA7400241CB907FEAE07038907FECE079
+:1028C100F45480FFC4540FFFE054072F25E024B4D3
+:1028D100F582E4347FF583E4F0907FECE05480FFEF
+:1028E100131313541FFFE054072F907FD7F0E044D8
+:1028F10020F041CB907FB4E04401F041CB124DA9CF
+:10290100400241CB907FEAE07020907FECE0F454EC
+:1029110080FFC4540FFFE054072F25E024B4F58253
+:10292100E4347FF5837401F041CB907FB4E044013E
+:10293100F041CB907FB4E04401F041CB907FE9E0DE
+:10294100601224F86009240270291243DB41CB1282
+:102951004D5C41CB124DA5A222E433FF25E0FFA23D
+:1029610023E4334F907F00F0E4A3F0907FB574022D
+:10297100F041CB907FB4E04401F041CB907FE9E09E
+:10298100603324F6602A2404703D907FEBE024DE5E
+:10299100600C047012907FB4E04401F041CB907F51
+:1029A100B4E04401F041CB907FB4E04401F041CB6D
+:1029B10012468541CB124DA5E4907F00F0A3F09023
+:1029C1007FB57402F041CB907FB4E04401F041CB7C
+:1029D100907FE9E024F46034240C7039124DA59005
+:1029E1007FECE0F45480FFC4540FFFE054072F251F
+:1029F100E024B4F582E4347FF583E054FD907F0058
+:102A0100F0E4A3F0907FB57402F041CB907FB4E085
+:102A11004401F041CB907FB4E04401F041CB907F81
+:102A2100E9E024F6601214601A2402701DD220908D
+:102A31007FB4E04401F08012D220907FB4E04401E1
+:102A4100F08007907FB4E04401F0202018907FEEE1
+:102A5100E07004A3E0600BD229D22712174AD22AD0
+:102A61008003120800C2208061907FEEE07004A311
+:102A7100E0600BD229D22812174AD22A804C123890
+:102A8100748047907FE9E024FE601214601A2402EA
+:102A9100701DD221907FB4E04401F08012D22190C8
+:102AA1007FB4E04401F08007907FB4E04401F0205E
+:102AB1002103121000C2218011122AD6800C124D5E
+:102AC100AB5007907FB4E04401F0202A07907FB417
+:052AD100E04402F022C8
+:1043DB00124DA3400281A0907FEBE024FE601E14DF
+:1043EB00604614606E1470028191240460028199FE
+:1043FB007405907FD4F07400907FD5F022907FEA03
+:10440B00E0FF1249FF8B208A218922EA496011CEF5
+:10441B00EACEEE907FD4F0CFE9CFEF907FD5F022AC
+:10442B00907FB4E04401F022907FEAE0FF1248B0A5
+:10443B008B208A218922EA496011CEEACEEE907F49
+:10444B00D4F0CFE9CFEF907FD5F022907FB4E0444A
+:10445B0001F022907FEAE0FF907EC0E0FDA3E0FB3D
+:10446B001217948B208A218922EA496011CEEACE59
+:10447B00EE907FD4F0CFE9CFEF907FD5F022907FF5
+:10448B00B4E04401F022907FB4E04401F022907F2D
+:05449B00B4E04401F053
+:0144A00022F9
+:03003300024D6C0F
+:094D6C00C22553D8EF43D82032D0
+:020C9F00C12F63
+:063FFA00124AC4C231228C
+:10430B00E4907696F0908003F0907FE07490F090BC
+:10431B007FE17404F0E4907FDDF0907FA1F0538E89
+:10432B00F875880575B82075F801438E30F5C8759A
+:10433B00CA7F75CBF843A82012074AC22CC22DC2E4
+:10434B002BC22F907FFC74DDF0907FFF74FFF090F9
+:10435B007F97E04401F09076197401F0E490768534
+:10436B00F0A3F0907681F0907680F0124958120FFE
+:10437B00C6124A8D907F97E04408F0E054B9F0D212
+:10438B00302030181247B41230001240001242167F
+:10439B00124A50121B04121661124216C22FC2315E
+:1043AB00C232C234C233C229C227C228E4F51190EB
+:1043BB007689F090763FF0907641F0907640F090D1
+:1043CB00768AF0A3F0A304F0E4A3F0907699F022A0
+:104A5000302D39C22D907619E0FFB4010DE4907627
+:104A60007CF0A374F8F0A3740AF0EFB4020DE490A4
+:104A7000767CF0A374F0F0A3740BF0EFB4030DE4B4
+:0D4A800090767CF0A374F8F0A37417F02278
+:101B0400302C38C22C907619E0FFB4010E90767C0C
+:101B140074C0F0A37414F0A3740BF0EFB4020DE4DA
+:101B240090767CF0A37410F0A3740CF0EFB4030B64
+:0C1B3400E490767CF0A37418F0A3F0227B
+:10411B0090768DE064017027302708C227120800C3
+:10412B0012174A302808C22812387412174A302A3C
+:10413B000EE490768DF0C22A907FB4E04402F090AA
+:10414B00763FE0B40105E4F012326F907641E0B4B3
+:10415B000105E4F012349A907640E0B40103123476
+:10416B009A907F9BE020E402C23F907F9BE030E47B
+:10417B0002D23F907F9BE020E502C23E907F9BE006
+:10418B0030E502D23EA241303F01B3501FA23F9215
+:10419B0041303F09907697E054FEF0800790769778
+:1041AB00E04401F0907697E0908002F0303F34903D
+:1041BB007619E0FFB4010E90767C7467F0A3740659
+:1041CB00F0A3740BF0EFB4020BE490767CF0A3F049
+:1041DB00A3740CF0EFB4030BE490767CF0A3F0A384
+:1041EB007418F0A240303E01B3501FA23E924030F3
+:1041FB003E09907695E04404F08007907695E05464
+:0B420B00FBF0907695E0908001F0221F
+:0207FE00D32204
+:024DA100D3221B
+:024DA300D32219
+:104BA000907FEAE0907682F0E4907691F0907692B1
+:0B4BB000F0907690F0907693F0D32206
+:104D5C00907682E0907F00F0907FB57401F0D322C2
+:10480000907FECE0907683F0E01460171460211440
+:10481000602B14603224047038907FEAE090769127
+:10482000F08035907FEAE0907692F0123E8F8028FB
+:10483000907FEAE0907690F0121800801B907FEA5B
+:10484000E0907684F08011907FEAE0907693F0809B
+:0A48500007907FB4E04401F0D3228A
+:10468500907FECE0907683F0E014601D14602A14AE
+:10469500603714604424047050907691E0907F0058
+:1046A500F0907FB57401F08047907692E0907F009E
+:1046B500F0907FB57401F08037907690E0907F00A0
+:1046C500F0907FB57401F08027907684E0907F00AC
+:1046D500F0907FB57401F08017907693E0907F009D
+:1046E500F0907FB57401F08007907FB4E04401F04D
+:0246F500D322CE
+:024DA500D32217
+:024DA700D32215
+:024DA900D32213
+:024DAB00C32221
+:102FE700C0E0C083C082D2265391EF907FAB7401BB
+:082FF700F0D082D083D0E0325B
+:104D4600C0E0C083C0825391EF907FAB7404F0D073
+:064D560082D083D0E032A0
+:103D4700C0E0C0F0C083C082C0D0E8C0E0E9C0E0F6
+:103D5700EAC0E0EBC0E0ECC0E0EDC0E0EEC0E0EFB1
+:103D6700C0E0907FA2E090767FF0907F74E090763D
+:103D770087F0907F75E0907688F0907F98E0440216
+:103D8700F0907696E0FF20E10C4402F0908003F07B
+:103D9700D232124AC490767FE020E250907687E0D4
+:103DA700FEA3E07C002400F534EC3EF533907698D2
+:103DB700E0FDAE33AF341236D8907687EFF0D22FCE
+:103DC700303129203F26C231907F94E054CFF090C4
+:103DD7007F9AE030E404D22DC22C907F9AE020E550
+:103DE70004C22DD22C907F94E04430F0124A501236
+:103DF7001B04302F12124216C22F75E80112168AC1
+:103E070075E80DD22B800575E801C22B202B349065
+:103E17007619E0FFB4010E90767C7467F0A3740600
+:103E2700F0A3740BF0EFB4020B90767CE4F0A3F0F0
+:103E3700A3740CF0EFB4030B90767CE4F0A3F0A32B
+:103E47007418F075CAD375CBFED2CA303404C234A5
+:103E57008002D2345391EF907FAB7402F0F0907FE1
+:103E670098E054FDF0D0E0FFD0E0FED0E0FDD0E0D8
+:103E7700FCD0E0FBD0E0FAD0E0F9D0E0F8D0D0D029
+:083E870082D083D0F0D0E032BC
+:104B6000C0E0C083C0825391EF907FAB7410F0908F
+:104B70007696E054FDF0908003F0D082D083D0E0B0
+:014B80003202
+:012FFF00329F
+:104BD500C0E0C083C082D2255391EF907FAB7408AB
+:084BE500F0D082D083D0E03251
+:104BED00C0E0C083C0825391EF907FA9E04401F0F3
+:074BFD00D082D083D0E0322A
+:104B8100C0E0C083C0825391EF907FAAE04401F05E
+:0F4B9100C22990768D7401F0D082D083D0E032AB
+:104C0400C0E0C083C0825391EF907FA9E04402F0DA
+:074C1400D082D083D0E03212
+:103FD500C0E0C083C0825391EF907FAAE04402F015
+:103FE500907FC7E0F511750F00750D00D233D082B3
+:053FF500D083D0E03292
+:104C1B00C0E0C083C0825391EF907FA9E04404F0C1
+:074C2B00D082D083D0E032FB
+:104C3200C0E0C083C0825391EF907FAAE04404F0A9
+:074C4200D082D083D0E032E4
+:104C4900C0E0C083C0825391EF907FA9E04408F08F
+:074C5900D082D083D0E032CD
+:104C6000C0E0C083C0825391EF907FAAE04408F077
+:074C7000D082D083D0E032B6
+:104C7700C0E0C083C0825391EF907FA9E04410F059
+:074C8700D082D083D0E0329F
+:104C8E00C0E0C083C0825391EF907FAAE04410F041
+:074C9E00D082D083D0E03288
+:104CA500C0E0C083C0825391EF907FA9E04420F01B
+:074CB500D082D083D0E03271
+:104CBC00C0E0C083C0825391EF907FAAE04420F003
+:074CCC00D082D083D0E0325A
+:104CD300C0E0C083C0825391EF907FA9E04440F0CD
+:074CE300D082D083D0E03243
+:104CEA00C0E0C083C0825391EF907FAAE04440F0B5
+:074CFA00D082D083D0E0322C
+:104D0100C0E0C083C0825391EF907FA9E04480F05E
+:074D1100D082D083D0E03214
+:104D1800C0E0C083C0825391EF907FAAE04480F046
+:074D2800D082D083D0E032FD
+:10421600907619E064017035907687E0FFD3942D8F
+:10422600402B9076867401F0907685E004F0E0D31A
+:10423600940F4019E4F0EFD3943140089076197446
+:1042460003F080069076197402F0123E8F9076196C
+:10425600E0B4022C907687E0FFC3942F5022EFD370
+:10426600942A401C9076867401F0907685E004F0DE
+:10427600E0D3940F400AE4F090761904F0123E8FD2
+:10428600907619E0B40226907687E0D39431401DEB
+:104296009076867401F0907685E004F0E0D3940F72
+:1042A600400BE4F09076197403F0123E8F90761965
+:1042B600E06403703F907687E0FFC3945F503590CB
+:1042C60076867401F0907685E004F0E0D3940F4092
+:1042D60023E4F0EFC3942F500CEFD3942A400690BA
+:1042E60076197401F0EFD3942F4006907619740274
+:1042F600F0123E8F907686E07005907685F022E487
+:05430600907686F02214
+:10074A0090769A7402F0E4907691F0A3F090769005
+:10075A00F0907693F09076967403F0908003F0E42C
+:10076A00907697F0908002F090769404F090800052
+:10077A00F0E490768EF090761AF090769504F0C2B6
+:10078A002E907F9BE0FF5410FF7002C23F907F9B28
+:10079A00E0FF5410FEFFBE1002D23F907F9BE0FFA5
+:1007AA005420FF7002C23E907F9BE0FF5420FEFF60
+:1007BA00BE2002D23E303F09907697E054FEF08088
+:1007CA0007907697E04401F0907697E0908002F0E7
+:1007DA00303E09907695E04404F08007907695E0E3
+:1007EA0054FBF0907695E0908001F0A23E9240A2F0
+:0307FA003F9241EA
+:0107FD0022D9
+:103E8F00907692E014601D147002E14424026002E7
+:103E9F00E1D49076947401F0908000F0E490768EE7
+:103EAF00F0D23122907619E0FFB4011BE4907FF23B
+:103EBF00F0907FF37430F0907FFF74FCF090769762
+:103ECF00E054FDF054FBF0EFB4021BE4907FF2F0EE
+:103EDF00907FF37434F0907FFF74FCF0907697E04E
+:103EEF004402F054FBF0EFB40318E4907FF2F0902B
+:103EFF007FF37464F0907FFF74FCF0907697E0444A
+:103F0F0004F0907694E04401F0908000F0303F0987
+:103F1F00907697E054FEF08007907697E04401F09A
+:103F2F00907697E0908002F09076987404F09076F7
+:103F3F008E7401F022907619E0FFB4011BE4907F9C
+:103F4F00F2F0907FF37444F0907FFF74FCF0907662
+:103F5F0097E054FDF054FBF0EFB4021BE4907FF2B6
+:103F6F00F0907FF3744CF0907FFF74FCF090769795
+:103F7F00E04402F054FBF0EFB40318E4907FF2F04A
+:103F8F00907FF37494F0907FFF74FCF0907697E03D
+:103F9F004404F0907694E054FEF0908000F0303FAF
+:103FAF0009907697E054FEF08007907697E04401F1
+:103FBF00F0907697E0908002F09076987406F090EB
+:063FCF00768E7402F02260
+:10180000907690E014603714700201D814700221B1
+:1018100072147002413B240460026103907FFC74E7
+:10182000CCF0907FFF74FCF0907695E04401F0548A
+:1018300005F0908001F0E490761AF0C22E229076A6
+:1018400095E04401F04402F0303E06E04404F080AC
+:1018500007907695E054FBF090761AE0B40108907A
+:101860007695E0908001F0907619E0FFB401229027
+:101870007FFC7474F0907FFF74FCF090768F742B73
+:10188000F0907697E054FDF0E4907681F0907680C9
+:10189000F0EFB40222907FFC7468F0907FFF74FC3C
+:1018A000F090768F742FF0907697E04402F0E490F9
+:1018B0007681F0907680F0303F09907697E054FE84
+:1018C000F08007907697E04401F0907697E054FB23
+:1018D000F0908002F0D22E22907695E054FEF044F3
+:1018E00002F0303E06E04404F08007907695E05424
+:1018F000FBF090761AE0B40108907695E0908001B4
+:10190000F0907619E0FFB40122907FFC7430F090E3
+:101910007FFF74FCF090768F742BF0907697E054F4
+:10192000FDF0E4907681F0907680F0EFB4022290A2
+:101930007FFC741CF0907FFF74FCF090768F742F06
+:10194000F0907697E04402F0E4907681F090768013
+:10195000F0303F09907697E054FEF080079076973C
+:10196000E04401F0907697E054FBF0908002F0D2D2
+:101970002E22907695E04401F04402F04408F030C5
+:101980003E06E04404F08007907695E054FBF0902A
+:10199000761AE0B40108907695E0908001F0907698
+:1019A00019E0FFB40125907FFC74CCF0907FFF74A8
+:1019B000FCF090768F742BF0907697E054FDF05405
+:1019C000FBF0E4907681F0907680F0EFB402259001
+:1019D0007FFC74C8F0907FFF74FCF090768F742FBA
+:1019E000F0907697E04402F054FBF0E4907681F0BA
+:1019F000907680F0EFB40325907FFC7498F0907F90
+:101A0000FF74FCF090768F745FF0907697E054FD51
+:101A1000F04404F0E4907681F0907680F0303F0955
+:101A2000907697E054FEF08007907697E04401F0BE
+:101A3000907697E0908002F0D22E22907695E05436
+:101A4000FEF04402F04408F0303E06E04404F0802A
+:101A500007907695E054FBF090761AE0B401089078
+:101A60007695E0908001F0907619E0FFB401259022
+:101A70007FFC74B4F0907FFF74FCF090768F742B31
+:101A8000F0907697E054FDF054FBF0E4907681F00E
+:101A9000907680F0EFB40225907FFC74B0F0907FD8
+:101AA000FF74FCF090768F742FF0907697E04402EC
+:101AB000F054FBF0E4907681F0907680F0EFB40380
+:101AC00025907FFC7468F0907FFF74FCF090768F17
+:101AD000745FF0907697E054FDF04404F0E4907663
+:101AE00081F0907680F0303F09907697E054FEF0D8
+:101AF0008007907697E04401F0907697E09080021E
+:041B0000F0D22E22CF
+:040CA1004176230075
+:102DA900E4907636F0E0FF75F003A4240EF582E492
+:102DB9003475F5837401F0EF75F003A4240FF582DF
+:102DC900E43475F5837401F0EF75F003A42410F56C
+:102DD90082E43475F583E4F0907636E004F0E0FFA0
+:102DE90075F003A4240EF582E43475F5837410F0AC
+:102DF900EF75F003A4240FF582E43475F5837405A7
+:102E0900F0EF75F003A42410F582E43475F583E43A
+:102E1900F0907636E004F0E0FF75F003A4240EF597
+:102E290082E43475F5837402F0EF75F003A4240F7E
+:102E3900F582E43475F5837402F0EF75F003A42488
+:102E490010F582E43475F583E4F0907636E004F009
+:102E5900E0FF75F003A4240EF582E43475F583745C
+:102E690001F0EF75F003A4240FF582E43475F583BE
+:102E79007403F0EF75F003A42410F582E43475F5BA
+:102E890083E4F0907636E004F0E0FF75F003A424C3
+:102E99000EF582E43475F5837410F0EF75F003A430
+:102EA900240FF582E43475F5837406F0EF75F003A9
+:102EB900A42410F582E43475F583E4F0907636E0C5
+:102EC90004F0E0FF75F003A4240EF582E43475F5EF
+:102ED900837402F0EF75F003A4240FF582E43475CE
+:102EE900F5837404F0EF75F003A42410F582E4343B
+:102EF90075F583E4F0907636E004F0E0FF75F003B1
+:102F0900A4240EF582E43475F5837402F0EF75F0AC
+:102F190003A4240FF582E43475F5837408F0EF7582
+:102F2900F003A42410F582E43475F5837404F09059
+:102F39007636E004F0E0FF75F003A4240EF582E490
+:102F49003475F5837402F0EF75F003A4240FF5824C
+:102F5900E43475F583740AF0EF75F003A42410F5D1
+:102F690082E43475F5837404F0907636E004F0E079
+:102F7900FF75F003A4240EF582E43475F583740219
+:102F8900F0EF75F003A4240FF582E43475F583742A
+:102F990009F0EF75F003A42410F582E43475F58384
+:102FA9007404F0907636E004F0E0FF75F003A42491
+:102FB9000EF582E43475F5837402F0EF75F003A41D
+:102FC900240FF582E43475F5837407F0EF75F00387
+:0E2FD900A42410F582E43475F5837404F0220C
+:103BD300E4907636F0E0FB75F00FA42441F582E41F
+:103BE3003475F5837440F0EB75F00FA42442F5822D
+:103BF300E43475F583740AF0EB75F00FA42443F5F0
+:103C030082E43475F5831237C80000AC44EB75F0D9
+:103C13000FA42447F582E43475F5831237C80000F6
+:103C2300AC44EB75F00FA4244BF582E43475F583B3
+:103C33001237C800017700907636E004F0E0FB7598
+:103C4300F00FA42441F582E43475F5837440F0EB5E
+:103C530075F00FA42442F582E43475F583748CF077
+:103C6300EB75F00FA42443F582E43475F583123722
+:103C7300C80000AC44EB75F00FA42447F582E4348C
+:103C830075F5831237C80000AC44EB75F00FA4241C
+:103C93004BF582E43475F5831237C8000177009041
+:103CA3007636E004F0E0FF75F00FA42441F582E4DA
+:103CB3003475F5837440F0EF75F00FA42442F58258
+:103CC300E43475F583748FF0907636E004F0E0FF0A
+:103CD30075F00FA42441F582E43475F5837441F043
+:103CE300EF75F00FA42442F582E43475F5837484F0
+:103CF300F0907636E004F0E0FF75F00FA42441F570
+:103D030082E43475F5837461F0EF75F00FA42442F7
+:103D1300F582E43475F5837481F0907636E004F02F
+:103D2300E0FF75F00FA42441F582E43475F5837444
+:103D330061F0EF75F00FA42442F582E43475F58346
+:043D43007401F022F5
+:10455900E4907636F0E0FF75F003A42432F582E4A6
+:104569003475F583E4F0EF75F003A42433F582E4A0
+:104579003475F5837401F0907636E004F0E0FF7548
+:10458900F003A42432F582E43475F583E4F0EF7581
+:10459900F003A42433F582E43475F5837402F090B2
+:1045A9007636E004F0E0FF75F003A42432F582E4E6
+:1045B9003475F583E4F0EF75F003A42433F582E450
+:1045C9003475F5837403F0907636E004F0E0FF75F6
+:1045D900F003A42432F582E43475F583E4F0EF7531
+:1045E900F003A42433F582E43475F5837404F022CE
+:103A4200E4907635F0907635E0FFC394034002416E
+:103A5200FFEF75F00AA424AAF582E43475F583EF2A
+:103A6200F0EF75F00AA424ABF582E43475F583E433
+:103A7200F0EF75F00AA424ACF582E43475F5837492
+:103A8200F0F0EF75F00AA424ADF582E43475F58305
+:103A920074FFF0EF75F00AA424AEF582E43475F5F4
+:103AA20083E4F0EF75F00AA424AFF582E43475F5EF
+:103AB200837480F0EF75F00AA424B0F582E43475C3
+:103AC200F583E4F0EF75F00AA424B1F582E43475CD
+:103AD200F583E4F0EF75F00AA424B2F582E43475BC
+:103AE200F583E4F0EF75F00AA424B3F582E43475AB
+:103AF200F5837401F0907635E004F0414790763C0E
+:103B0200740AF0E4A3F09076357403F090763CE00A
+:103B1200FF907635E0FEC39F400261D290763DE091
+:103B2200FF04F0EE75F00AA424AAF582E43475F5D8
+:103B320083EFF0EE75F00AA424ABF582E43475F558
+:103B420083E4F0EE75F00AA424ACF582E43475F552
+:103B520083745EF0EE75F00AA424ADF582E4347548
+:103B6200F58374BAF0EE75F00AA424AEF582E4345B
+:103B720075F5837405F0EE75F00AA424AFF582E4BE
+:103B82003475F5837480F0EE75F00AA424B0F582E2
+:103B9200E43475F583E4F0EE75F00AA424B1F582FD
+:103BA200E43475F583E4F0EE75F00AA424B2F582EC
+:103BB200E43475F5837415F0EE75F00AA424B3F5B8
+:103BC20082E43475F583E4F0907635E004F0610E1A
+:013BD20022D0
+:10080000E4907631F0907631E0FF75F003A4240F88
+:10081000F582E43475F583E0FE907FEDE0FDEE6D4A
+:10082000600EEFC3940B5008907631E004F080D551
+:10083000EFB40B08907FB4E04401F022EF75F003B1
+:10084000A4240EF582E43475F583E0907633F02429
+:10085000F0600A240E60028187124B3E22907FEDE9
+:10086000E0640570519076187405F0907637740145
+:10087000F09076397403F0907621F0E4907620F0D1
+:10088000907FEAE0F4602F907620E0FF75F00AA4F4
+:1008900024AAF582E43475F583E0FE907FEAE0FD5A
+:1008A000EE6D6012907621E0FEEFC39E50089076C8
+:1008B00020E004F080D1907FEDE0640670529076E5
+:1008C000187406F09076377404F0907639740AF054
+:1008D000907621F09076207403F0907FEAE0F46047
+:1008E0002F907620E0FF75F00AA424AAF582E43464
+:1008F00075F583E0FE907FEAE0FDEE6D6012907684
+:1009000021E0FEEFC39E5008907620E004F080D1F5
+:10091000907620E0FF75F00AA424AAF582E43475ED
+:10092000F583E0907229F0E490763BF0907621E038
+:10093000FEEF6E7008907FB4E04401F022907FEBF0
+:10094000E014601314700221E224026002817F909F
+:100950007FB4E04401F022907FE9E014707C907F46
+:10096000EAE0F47048907637E0907620F09076399F
+:10097000E0FE907620E0FDC39E502B90763BE0FE9B
+:1009800004F074C02EF582E4347EF583E0FEED754C
+:10099000F00AA424ABF582E43475F583EEF090768A
+:1009A00020E004F080C790763F7401F022907EC072
+:1009B000E0FEEF75F00AA424ABF582E43475F5830C
+:1009C000EEF0E0B4010890763E7401F08005E4900A
+:1009D000763EF090763F7401F022907FB4E04401BF
+:1009E000F022907FE9E024FE700241A314700261BE
+:1009F0003F14700261DB240360028177907FEAE09C
+:100A0000F4706B907637E0907620F0907639E0FFC6
+:100A1000907620E0FEC39F504E90763BE0FF04F0BE
+:100A200074C02FF582E4347EF583E0FFEE75F00AA2
+:100A3000A424ACF582E43475F583EFF090763BE0C6
+:100A4000FF04F074C02FF582E4347EF583E0FFEEFE
+:100A500075F00AA424ADF582E43475F583EFF090C7
+:100A60007620E004F080A49076407401F022907E1D
+:100A7000C0E0FF907620E0FE75F00AA424ACF58279
+:100A8000E43475F583EFF0907EC1E0FFEE75F00A77
+:100A9000A424ADF582E43475F583EFF090764174CB
+:100AA00001F022907FEAE0F47066907637E090766D
+:100AB00020F0907639E0FF907620E0FEC39F400260
+:100AC000818E90763BE0FF04F074C02FF582E43411
+:100AD0007EF583E0FFEE75F00AA424AEF582E434DF
+:100AE00075F583EFF090763BE0FF04F074C02FF5CE
+:100AF00082E4347EF583E0FFEE75F00AA424AFF5BE
+:100B000082E43475F583EFF0907620E004F080A263
+:100B1000907EC0E0FF907620E0FE75F00AA424AE3F
+:100B2000F582E43475F583EFF0907EC1E0FFEE7559
+:100B3000F00AA424AFF582E43475F583EFF0229037
+:100B40007FEAE0F47066907637E0907620F0907659
+:100B500039E0FF907620E0FEC39F4002818E9076C0
+:100B60003BE0FF04F074C02FF582E4347EF583E0AF
+:100B7000FFEE75F00AA424B0F582E43475F583EF36
+:100B8000F090763BE0FF04F074C02FF582E4347EF1
+:100B9000F583E0FFEE75F00AA424B1F582E4347524
+:100BA000F583EFF0907620E004F080A2907EC0E024
+:100BB000FF907620E0FE75F00AA424B0F582E434BC
+:100BC00075F583EFF0907EC1E0FFEE75F00AA42486
+:100BD000B1F582E43475F583EFF022907FEAE0F41A
+:100BE0007066907637E0907620F0907639E0FF904E
+:100BF0007620E0FEC39F4002818E90763BE0FF04AA
+:100C0000F074C02FF582E4347EF583E0FFEE75F0DA
+:100C10000AA424B2F582E43475F583EFF090763BB4
+:100C2000E0FF04F074C02FF582E4347EF583E0FF2A
+:100C3000EE75F00AA424B3F582E43475F583EFF081
+:100C4000907620E004F080A2907EC0E0FF907620B5
+:100C5000E0FE75F00AA424B2F582E43475F583EF62
+:100C6000F0907EC1E0FFEE75F00AA424B3F582E4B3
+:100C70003475F583EFF022907FB4E04401F02290C8
+:0F0C80007FB4E04401F022907FB4E04401F02201
+:10100000E490762CF090762CE0FF75F003A4240F8A
+:10101000F582E43475F583E0FE907FEDE0FDEE6D42
+:10102000600EEFC3940B500890762CE004F080D54E
+:10103000EFB40B08907FB4E04401F022EF75F003A9
+:10104000A4240EF582E43475F583E090762EF02426
+:10105000F0600A240F6002817D124B1B22907FED0D
+:10106000E0640570519076187405F090763874013C
+:10107000F090763A7403F090761CF0E490761BF0D2
+:10108000907FEAE0F4602F90761BE0FF75F00AA4F1
+:1010900024AAF582E43475F583E0FE907FEAE0FD52
+:1010A000EE6D601290761CE0FEEFC39E50089076C5
+:1010B0001BE004F080D1907FEDE0640670529076E2
+:1010C000187406F09076387404F090763A740AF04A
+:1010D00090761CF090761B7403F0907FEAE0F46049
+:1010E0002F90761BE0FF75F00AA424AAF582E43461
+:1010F00075F583E0FE907FEAE0FDEE6D601290767C
+:101100001CE0FEEFC39E500890761BE004F080D1F7
+:10111000E490761EF090761CE0FF90761BE0FE6F68
+:101120007008907FB4E04401F022907FEBE01460FF
+:101130001314700221BF240260028175907FB4E015
+:101140004401F022907FE9E0247F706B907FEAE019
+:10115000F4704A907638E090761BF090763AE0FF93
+:1011600090761BE0FDC39F502BED75F00AA424ABD5
+:10117000F582E43475F583E0FF90761EE0FD04F01F
+:1011800074002DF582E4347FF583EFF090761BE058
+:1011900004F080C790761EE0907FB5F022EE75F0E7
+:1011A0000AA424ABF582E43475F583E0907F00F067
+:1011B000907FB57401F022907FB4E04401F022905A
+:1011C0007FE9E0247E7002417E1470026123147076
+:1011D0000261C824036002816D907FEAE0F4706DC3
+:1011E000907638E090761BF090763AE0FF90761B90
+:1011F000E0C39F504FE0FF75F00AA424ACF582E4F1
+:101200003475F583E0FE90761EE0FD04F074002D49
+:10121000F582E4347FF583EEF0EF75F00AA424AD97
+:10122000F582E43475F583E0FF90761EE0FE04F06D
+:1012300074002EF582E4347FF583EFF090761BE0A6
+:1012400004F080A490761EE0907FB5F02290761B8B
+:10125000E0FF75F00AA424ACF582E43475F583E070
+:10126000907F00F0EF75F00AA424ADF582E43475A8
+:10127000F583E0907F01F0907FB57402F022907FBB
+:10128000EAE0F4706D907638E090761BF090763A54
+:10129000E0FF90761BE0C39F504FE0FF75F00AA47B
+:1012A00024AEF582E43475F583E0FE90761EE0FD11
+:1012B00004F074002DF582E4347FF583EEF0EF75D1
+:1012C000F00AA424AFF582E43475F583E0FF90764C
+:1012D0001EE0FE04F074002EF582E4347FF583EF07
+:1012E000F090761BE004F080A490761EE0907FB52D
+:1012F000F02290761BE0FF75F00AA424AEF582E49C
+:101300003475F583E0907F00F0EF75F00AA424AF08
+:10131000F582E43475F583E0907F01F0907FB57439
+:1013200002F022907FEAE0F4706D907638E09076DB
+:101330001BF090763AE0FF90761BE0C39F504FE0A1
+:10134000FF75F00AA424B0F582E43475F583E0FE5D
+:1013500090761EE0FD04F074002DF582E4347FF5F4
+:1013600083EEF0EF75F00AA424B1F582E43475F54C
+:1013700083E0FF90761EE0FE04F074002EF582E418
+:10138000347FF583EFF090761BE004F080A4907634
+:101390001EE0907FB5F02290761BE0FF75F00AA466
+:1013A00024B0F582E43475F583E0907F00F0EF75AA
+:1013B000F00AA424B1F582E43475F583E0907F014E
+:1013C000F0907FB57402F022907FEAE0F4706D90A7
+:1013D0007638E090761BF090763AE0FF90761BE04E
+:1013E000C39F504FE0FF75F00AA424B2F582E434A5
+:1013F00075F583E0FE90761EE0FD04F074002DF597
+:1014000082E4347FF583EEF0EF75F00AA424B3F59F
+:1014100082E43475F583E0FF90761EE0FE04F074FC
+:10142000002EF582E4347FF583EFF090761BE00424
+:10143000F080A490761EE0907FB5F02290761BE0BD
+:10144000FF75F00AA424B2F582E43475F583E090C8
+:101450007F00F0EF75F00AA424B3F582E43475F54B
+:1014600083E0907F01F0907FB57402F022907FB40A
+:10147000E04401F022907FB4E04401F022907FB478
+:05148000E04401F02230
+:10387400E4907629F0907629E0FF75F00FA42442B5
+:10388400F582E43475F583E0FE907FECE0FDEE6DA7
+:10389400600EEFC394065008907629E004F080D5BA
+:1038A400EFB40608907FB4E04401F022EF75F00F06
+:1038B400A42441F582E43475F583E090762AF0245B
+:1038C400BF7002414124E070024112242160024190
+:1038D4003A907FE9E024FE607D14700221B2240254
+:1038E4006002410A121751907642E0FCA3E0FDA366
+:1038F400E0FEA3E0FF907629E075F00FA42443F5E1
+:1039040082E43475F5831237BC907619E0FFB40174
+:103914001290767C7467F090767D7406F090767ED3
+:10392400740BF0EFB4020FE490767CF090767DF0A7
+:1039340090767E740CF0EFB4030FE490767CF090F4
+:10394400767DF090767E7418F090761A7401F012F9
+:103954003E8F12180022907EC2E0FFE4FCFDFEFBC5
+:10396400FA7901F8123746C8ECC8C9EDC9CAEECADB
+:10397400CBEFCB907EC1E0FEE4FCFD2BFBEA3EFAEC
+:10398400ED39F9EC38F8907EC0E0FFE4FEEB2FFF50
+:10399400EE3AFEED39FDEC38FC907629E075F00F37
+:1039A400A42447F582E43475F5831237BC22907E53
+:1039B400C2E0FFE4FCFDFEFBFA7901F8123746C8C9
+:1039C400ECC8C9EDC9CAEECACBEFCB907EC1E0FE0C
+:1039D400E4FCFD2BFBEA3EFAED39F9EC38F8907E75
+:1039E400C0E0FFE4FEEB2FFFEE3AFEED39FDEC38CC
+:1039F400FC907629E075F00FA4244BF582E434752D
+:103A0400F5831237BC22907FB4E04401F022907F0A
+:103A1400E9E0147019907EC0E0FF907629E075F01B
+:103A24000FA4244FF582E43475F583EFF022907FE0
+:0E3A3400B4E04401F022907FB4E04401F0229F
+:102AD600E4907627F0907627E0FF75F00FA4244265
+:102AE600F582E43475F583E0FE907FECE0FDEE6D53
+:102AF600600EEFC394065008907627E004F080D568
+:102B0600EFB40608907FB4E04401F022EF75F00FB1
+:102B1600A42441F582E43475F583E0907628F02408
+:102B26009F7002A17424216002A1A1907FE9E02494
+:102B36007E700261FC14700281B524026002A16CF1
+:102B4600EF75F00FA42443F582E43475F583E0FCB9
+:102B5600A3E0FDA3E0FEA3E0FF7B447AAC79007816
+:102B660000C31237AB7013907F007444F0A374ACAB
+:102B7600F0E4A3F0907FB57403F0907627E075F04B
+:102B86000FA42443F582E43475F583E0FCA3E0FD4D
+:102B9600A3E0FEA3E0FF7B807ABB79007800C31236
+:102BA60037AB7013907F007480F0A374BBF0E4A37E
+:102BB600F0907FB57403F0907627E075F00FA424AB
+:102BC60043F582E43475F583E0FCA3E0FDA3E0FE63
+:102BD600A3E0FF7B007A7779017800C31237AB60F8
+:102BE60002A1A8907F00F0A37477F0A37401F0907F
+:102BF6007FB57403F022907627E075F00FA4244782
+:102C0600F582E43475F583E0FCA3E0FDA3E0FEA3C2
+:102C1600E0FF7B447AAC79007800C31237AB7013BF
+:102C2600907F007444F0A374ACF0E4A3F0907FB5F9
+:102C36007403F0907627E075F00FA42447F582E43C
+:102C46003475F583E0FCA3E0FDA3E0FEA3E0FF7B83
+:102C5600807ABB79007800C31237AB7013907F007F
+:102C66007480F0A374BBF0E4A3F0907FB57403F016
+:102C7600907627E075F00FA42447F582E43475F5C5
+:102C860083E0FCA3E0FDA3E0FEA3E0FF7B007A77F0
+:102C960079017800C31237AB6002A1A8907F00F0DB
+:102CA600A37477F0A37401F0907FB57403F02290BB
+:102CB6007627E075F00FA4244BF582E43475F5838E
+:102CC600E0FCA3E0FDA3E0FEA3E0FF7B447AAC7941
+:102CD600007800C31237AB7013907F007444F0A3E2
+:102CE60074ACF0E4A3F0907FB57403F0907627E01F
+:102CF60075F00FA4244BF582E43475F583E0FCA34C
+:102D0600E0FDA3E0FEA3E0FF7B807ABB79007800BC
+:102D1600C31237AB7013907F007480F0A374BBF0BE
+:102D2600E4A3F0907FB57403F0907627E075F00F7A
+:102D3600A4244BF582E43475F583E0FCA3E0FDA3FF
+:102D4600E0FEA3E0FF7B007A7779017800C31237B3
+:102D5600AB704F907F00F0A37477F0A37401F090EE
+:102D66007FB57403F022907FB4E04401F022907F97
+:102D7600E9E0247F701E907627E075F00FA4244FBB
+:102D8600F582E43475F583E0907F00F0907FB574AA
+:102D960001F08007907FB4E04401F0907FB4E044F6
+:032DA60001F02217
+:104B1B00907FEBE0147014907FE9E0247F70041217
+:104B2B00485A22907FB4E04401F022907FB4E044D5
+:034B3B0001F02264
+:104B3E00907FEBE0147013907FE9E014700412493B
+:104B4E00AD22907FB4E04401F022907FB4E04401A6
+:024B5E00F02243
+:10485A00E4907626F0907626E0FF75F003A42434DF
+:10486A00F582E43475F583E0FE907FECE0FDEE6DB1
+:10487A00600EEFC394045008907626E004F080D5C9
+:10488A00EFB40408907FB4E04401F022EF75F0031E
+:10489A00A42432F582E43475F583E0907F00F09029
+:0648AA007FB57401F0224D
+:1049AD00E4907625F0907625E0FF75F003A424348D
+:1049BD00F582E43475F583E0FE907FECE0FDEE6D5D
+:1049CD00600EEFC394045008907625E004F080D576
+:1049DD00EFB40408907FB4E04401F022907EC0E073
+:1049ED00FEEF75F003A42432F582E43475F583EE01
+:0249FD00F022A6
+:03000300020FFDEC
+:030FFD00C2893274
+:030013000217FDD4
+:0317FD00C28B326A
+:03004B00024D8FD4
+:044D8F005391DF322B
+:03005300024D83D8
+:064D83005391BFD22D3256
+:03005B00024D89CA
+:064D890053917FD22C3291
+:03006300024D93B8
+:044D930053D8F732C8
+:03000B00024D9B08
+:034D9B00C28D3294
+:03001B00024D9EF5
+:034D9E00C28F328F
+:03002300024D7516
+:074D75005398FE5398FD3234
+:03003B00024D7CF7
+:074D7C0053C0FE53C0FD32DD
+:03002B000246F793
+:1046F700C0E0C0F0C083C082C0D0E8C0E0E9C0E03D
+:10470700EAC0E0EBC0E0ECC0E0EDC0E0EEC0E0EFF7
+:10471700C0E0C2CAC2CF907F98E04401F0302E03B8
+:104727001214A6907F98E054FEF053A8FA1216616F
+:10473700D0E0FFD0E0FED0E0FDD0E0FCD0E0FBD041
+:10474700E0FAD0E0F9D0E0F8D0D0D082D083D0F032
+:03475700D0E0327D
+:1047B400E490769BF090769BE0FF04F0EF6008E0D5
+:1047C4002408F8E4F680EE907696E054FBF054F773
+:1047D400F0908003F0E4F518D235F50EF510D236DA
+:1047E400751211751322C237C239C238F516F51481
+:0B47F400F51AF50DC23BC23CC23D228D
+:10300000907FB6E020E102C23DD236203602416E0A
+:10301000303D02416E908007E06004D2368002C2EB
+:1030200036203602412ED235E4F51A908004E0F5C0
+:10303000197408250EF8A619851918E51820E70453
+:10304000D2388002C23830380221D4E4F516E519AE
+:10305000B4F00CD2397508047509F0050E8002052C
+:1030600016E51964F7703DC239E50E24FE601714A9
+:103070006022240370297508057509F7E4F50AF53F
+:103080000B750E048020750806750AF7E4F50B75BC
+:103090000E048012750807750BF7750E0480071271
+:1030A00048F380020516E51954F864F8703BC23500
+:1030B000E5192407600C24FC6008240524F8500658
+:1030C0008008D23A8006C23A8002D23A751A0120AC
+:1030D0003A19907E80740FF0A3E519F0E4A3F0A3F1
+:1030E000F0907FB77404F08002051620396DE51961
+:1030F00064F76067E51A7063E51854F064F070597E
+:10310000851819F50EE519240F601B24FE6017249D
+:10311000FD602214601F2405702F750803050E85BD
+:103120001809D2378028750802050E85180975140C
+:1031300001D2378019750805050E851809E4F50ACE
+:10314000F50B750E03D23780051248F3C2353035C2
+:103150000A85081385181280020516851819E516C8
+:1031600064047062F50EE51954F0F519F51585182B
+:1031700019E5152470601824F0601424F060102400
+:10318000F0601E24F0601A24F0600424607027E5CB
+:1031900015C4540FF519F508050E851809D23780A6
+:1031A0001AE515C4540FF519F508050E85180975AB
+:1031B0001401D23780051248F3C23530350A85191B
+:1031C0001385181280020516E516D3940540571290
+:1031D00048F38052303917E50E700A8508097508E2
+:1031E00004050E80417408250EF8A6198038203792
+:1031F0002AE50EB4010F85080A85090B8513088599
+:103200001209750E04E514B4011C85080AE4F50BD7
+:10321000851308851209750E04800BE514B40106A8
+:10322000E4F50B750E04E4F51A303502050EE50ED3
+:10323000D394035002010BC237E4F50EF510C236E9
+:10324000D23DF51474082510F8E6FF74802510F5BA
+:1032500082E4347EF583EFF074082510F8E4F60577
+:0F32600010E510B404DE907FB77404F0010B2268
+:0C48F300C237E4F50EF510C236F51422B1
+:10400000E511D3940050022106907689E0C394080C
+:10401000400221067440250FF582E4347EF583E0EA
+:10402000F517E50D600E908005E517F0907689E0B4
+:1040300004F001DAE5171237F940C1024067054084
+:104040007A0640980740C10C40C10D40C70F40CBD5
+:10405000F640CBF840CBFA40CBFB40CBFC40CBFE4C
+:1040600040CBFF000040DA907E41E0908005F09068
+:104070007689E004F07511018060907E41E09080C7
+:1040800005F0907E42E0908005F0907689E004F0A3
+:10409000E004F07511018042907E41E0908005F0CF
+:1040A000907E42E0908005F0907E43E0908005F0A5
+:1040B000907689E004F0E004F0E004F075110180EE
+:1040C00019D23BD23C8013D23B800F908005E5177C
+:1040D000F0907689E004F0751101203B04050D8015
+:1040E0001F303C1C907E41E0908005F0907E42E0C5
+:1040F000908005F0907689E004F0E004F0751101FD
+:10410000050F15110100E5117010C233F50DF50F03
+:0B411000907FC77404F0C23BC23C2249
+:104BBB00907FD6E030E712E04401F07F147E0012C4
+:0A4BCB004D2F907FD6E054FEF0223B
+:104AF600907FD6E054FBF0E04408F0304204E044F6
+:104B060002F07FDC7E05124D2F907FD6E054F7F041
+:054B1600E04404F02260
+:104D2F008E358F36E5361536AE35700215354E6039
+:074D3F000512148580EE222D
+:1049FF00E4FE751DFF751E05751F12AB1DAA1EA9BE
+:104A0F001F9000011236AB6402702FCDEECD0EED6C
+:104A1F006F70012290000212370E85F01BF51C6299
+:104A2F001BE51B621CE51C621B29FDE51B3AC9ED4A
+:104A3F00C9751DFFF51E891F80C17B007A007900A3
+:014A4F002244
+:041794008D298B2AE6
+:101798001249FFEA4960571236927E0029FFEE3A55
+:1017A800C9EFC9752BFFF52C892DAB2BAA2CA92DB8
+:1017B8009000011236ABFF64046005EF6405702EDB
+:1017C800EFB404159000021236AB6529700B900037
+:1017D800031236AB652A7001221236927E0029FF69
+:1017E800EE3AC9EFC9752BFFF52C892D80BC7B001B
+:0417F8007A007900FA
+:0117FC0022CA
+:0248B0008F2E49
+:1048B200E4F52F7530FF7531067532BEAB30AA3183
+:1048C200A9329000011236ABB4031FAF2F052FEFB0
+:1048D200652E7001221236927E0029FFEE3AC9EF50
+:1048E200C97530FFF531893280D27B007A007900B8
+:0148F20022A3
+:1005000012011001000000406A08110100010102FF
+:1005100000010902AC01030100803209040000005F
+:10052000010100000A2401000156000201020C240E
+:10053000020101010002000000000D240605010275
+:10054000030000000000000924030204030005006A
+:100550000C24020305020006000000001524060614
+:100560000302000003000300030003000300030074
+:100570000009240304010100060009040100000130
+:100580000200000904010102010200000724010128
+:10059000000100112402010202100344AC0080BBE0
+:1005A0000000770109050A05840101008F07250174
+:1005B0000100000009058F01030001050009040185
+:1005C00002020102000007240101000100112402BF
+:1005D000010203180344AC0080BB00007701090549
+:1005E0000A05460201008F072501010000000905E8
+:1005F0008F01030001050009040200000102000050
+:1006000009040201010102000007240104000100A5
+:100610000E2402010602100244AC0080BB00090552
+:100620008C054C02010000072501000200000904AE
+:1006300002020101020000072401040001000E244F
+:1006400002010603180244AC0080BB0009058C05BA
+:1006500072030100000725010002000009040203E3
+:10066000010102000007240104000100112402011D
+:100670000202100344AC0080BB0000770109058C26
+:1006800005840101000007250100020000090402A1
+:1006900004010102000007240104000100112402EA
+:1006A000010203180344AC0080BB00007701090578
+:1006B0008C0546020100000725010002000004032A
+:1006C0000904180345006D006100670069006300BC
+:1006D000200047006D0062004800220345006D00C5
+:1006E0006100670069006300200045004D0049007B
+:1006F000200036007C00320020006D002A034300F9
+:100700006F006E006600690067007500720061008E
+:10071000740069006F006E002000530074007200C6
+:1007200069006E006700220349006E0074006500D6
+:1007300072006600610063006500200053007400D1
+:0A074000720069006E0067000000FF
+:101485007400F58690FDA57C05A3E582458370F97A
+:011495002234
+:10149600907FD6E04480F0438701000000000022E0
+:1014A600C0D0C0E08FE0C0E08EE0C0E08DE0C0E0DC
+:1014B6008CE0C0E0C082C0830586C084C0857D0004
+:1014C600907FE3747BF0A37480F07C11907F99E0A9
+:1014D6005440DC030214F3B40013907FE27440F02E
+:1014E600907FE5F0907FE27400F00214D29076903F
+:1014F600E0B4011290768FE02DFD907FE27480F0CB
+:10150600907F6C021557B4021290768FE02DFD90F5
+:101516007FE27480F0907F6C021596B40312907689
+:101526008FE02DFD907FE27480F0907F6C0215E1D4
+:10153600B4041290768FE02DFD907FE27480F090D7
+:101546007F6C021610907FE27480F0907F6C02161A
+:1015560040F0F0F0F0F0F0F0F0F0F0F0F0DDF27DB9
+:10156600020586907FE27400F0907F9BE05404B4FD
+:1015760000050586021640907FE27480F00586F02D
+:10158600F0F0F0F0F0F0F0F0F0F0F0DDD4021640FC
+:10159600F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F045
+:1015A600F0F0DDEC7D020586907FE27400F0907F1E
+:1015B6009BE05404B400050586021640907FE27451
+:1015C60080F00586F0F0F0F0F0F0F0F0F0F0F0F0DA
+:0615D600F0F0F0F0F0F06F
+:1015DC00DDCE021640F0F0F0F0DDFA7D02058690CB
+:1015EC007FE27400F0907F9BE05404B40005058604
+:1015FC00021640907FE27480F00586F0F0F0F0DD8A
+:10160C00DC021640F0F0F0F0F0F0DDF87D0205861B
+:10161C00907FE27400F0907F9BE05404B4000505C9
+:10162C0086021640907FE27480F00586F0F0F0F0B0
+:10163C00F0F0DDDA907FE27400F0D085D08405867E
+:10164C00D083D082D0E0FCD0E0FDD0E0FED0E0FF33
+:05165C00D0E0D0D02217
+:10166100C0D0C0E0C082C08390767CE0907F6FF0F4
+:1016710090767DE0907F6FF090767EE0907F6FF0C6
+:09168100D083D082D0E0D0D02249
+:10168A00C0D0C0E08FE0C0E08EE0C0E0C082C0837E
+:10169A000586C084C085907687E0FFBF00030217E5
+:1016AA0001907F96E04480F0907FE27480F0907F12
+:1016BA0062E00586907FE27400F0907F96E0547FA6
+:1016CA00F0907FE27480F090768EE0B40105058692
+:1016DA000216F6B4020505860216EB05860216FB0B
+:1016EA00E0E0E0E0E0E0DFF80216FBE0E0E0E0DF67
+:1016FA00FA907FE27400F0D085D0840586D083D03A
+:0C170A0082D0E0FED0E0FFD0E0D0D02282
+:10171600C082C083C0E0E8C0E078D1E814F870FB6E
+:0A172600D0E0F8D0E0D083D082229A
+:100CA500417201014572050002C9000045720A0042
+:100CB500010203044D720FD100D1000000000000B5
+:100CC500282809004D721C010001020304050607CE
+:100CD50008090A0B41722E2241722F2341723020DE
+:100CE5004172312162D2723A00000000000000001A
+:100CF50000000000000000000000000000000000EF
+:100D050000000000000000000000000000000000DE
+:100D150000000000000000000000000000000000CE
+:100D250000000000000000000000000000000000BE
+:100D350000000000000000000000000000000000AE
+:100D4500000000000000000000000000000000009E
+:100D5500000000000000000000000000000000008E
+:100D6500000000000000000000000000000000007E
+:100D75000000000000000000000001010101010168
+:100D8500010101010101010101010101010101014E
+:100D9500010101010101010101010101010101013E
+:100DA500010101010101010101010101010101012E
+:100DB5000101010101010101020202020202020216
+:100DC50002020202020202020202020202020202FE
+:100DD50002020202020202020202020202020202EE
+:100DE50002020202020202020202020202020202DE
+:100DF50002020202020303030303030303030303C3
+:100E050003030303030303030303030303030303AD
+:100E1500030303030303030303030303030303039D
+:100E2500030303030303030303030303030303038D
+:100E3500030304040404040404040404040404046F
+:100E4500040404040404040404040404040404045D
+:100E5500040404040404040404040404040404044D
+:100E6500040404040404040404040404040404043D
+:100E7500050505050505050505050505050505051D
+:100E8500050505050505050505050505050505050D
+:100E950005050505050505050505050505050505FD
+:100EA50005050505050505050505050505050606EB
+:100EB50006060606060606060606060606060606CD
+:100EC50006060606060606060606060606060606BD
+:100ED50006060606060606060606060606060606AD
+:100EE5000606060606060606060606070707080896
+:100EF500080909090A0A0A0B0B0B0C0C0C0D0D0D40
+:100F05000E0E0E0F0F0F10101011111112121213D9
+:100F15001313141414151515161616171717181874
+:100F250018191919191A1A1A1A1B1B1B1B1C1C1C18
+:100F35001C1D1D1D1D1E1E1E1E1F1F1F1F202020C8
+:100F45002121212222222323242425252626272761
+:100F5500282829292A2A2B2B2C2C2D2D2E2E2F2FD4
+:100F65003030313132323333343435353636373744
+:100F7500383839393A3A3B3C3D3E3F40414243449B
+:100F85004546474849494A4B4B4C4D4E4F505152A7
+:100F95005354555556565757585A5B5D5E5F6162B7
+:100FA500636465666768696A6B6C6D6F717273748B
+:100FB50075767778797A7B7C7E80013701013800F8
+:104AC400E4907236F0A3F0907F97E054FBF0E4900A
+:104AD4007233F0907232F090720104F0E490723309
+:104AE400F0907232F090720104F0907F97E04404E9
+:024AF400F022AE
+:10326F00907618E0FF640570429075ABE0B40119D9
+:10327F009072377401F0E4908020F0908031F090DC
+:10328F008028F0908039F08022E4907237F09075AA
+:10329F00ADE090722BF0E02480F0E0908020F09071
+:1032AF008031F0908028F0908039F0EF6406600252
+:1032BF0081999072397404F0907239E0FF24FE9076
+:1032CF007204F0EF75F00AA424ABF582E43475F5BF
+:1032DF0083E06401705490723604F0907204E0FF42
+:1032EF0024FD602824FE6024240324FB5004601C6A
+:1032FF00818C74202FF582E43480F583E4F07428F8
+:10330F002FF582E43480F583E4F0818C907204E031
+:10331F00FF2430F582E43480F583E4F074382FF520
+:10332F0082E43480F583E4F0818CE4907236F0907F
+:10333F007239E075F00AA424ADF582E43475F58393
+:10334F00E0FF7E0090750CEEF0A3EFF07006907228
+:10335F0002743BF090750CE0FEA3E0FF64804E70AA
+:10336F0004907202F0EF4E70028135EF64804E7060
+:10337F00028135EFF8E490750DF0E890750CF09040
+:10338F007234E075F00AA424ACF582E43475F58349
+:10339F00E0FF907202F090750DE02FF090750CE049
+:1033AF003400F0E0FEA3E0FFE4FCFD7BD67AA5F944
+:1033BF00F8D3123795400A90750C74A5F0A374D604
+:1033CF00F090750DE0242AF090750CE0345AF0E07F
+:1033DF00FEA3E07805CEA2E713CE13D8F8FF9075C1
+:1033EF000CEEF0A3EFF090722CEEF0A3EFF0D3946D
+:1033FF00D2EE64809482400A90722C7402F0A3740F
+:10340F00D2F0C390722CE0648094805004E4F0A357
+:10341F00F090722CE0FEA3E0243AF582EE3472F5C0
+:10342F0083E0907202F0907204E0FF24FD602D247F
+:10343F00FE6029240324FB50046021804090720217
+:10344F00E0FE74202FF582E43480F583EEF07428CB
+:10345F002FF582E43480F583EEF08021907202E044
+:10346F00FF907204E0FE2430F582E43480F583EFA0
+:10347F00F074382EF582E43480F583EFF0907239D2
+:0B348F00E004F0E0640A600241C72284
+:10349A00907618E0FFB40523907237E0701D90759E
+:1034AA00ADE090722BF0E02480F0E0908020F09064
+:1034BA008031F0908028F0908039F0EF6406600245
+:1034CA00C191907236E06002C191907640E070310D
+:1034DA009072037403F0907203E0FF75F00AA4245B
+:1034EA00AAF582E43475F583E0FE907229E0FDEED8
+:1034FA006D600EEFC3940A5008907203E004F080E6
+:10350A00D59072397404F0907640E0700890720396
+:10351A00E0907239F0907239E0FD24FE90722AF040
+:10352A00ED75F00AA424ADF582E43475F583E0FF65
+:10353A007E0090750CEEF0A3EFF0700690720274A4
+:10354A0080F090750CE0FEA3E0FF64804E7004905A
+:10355A007202F0EF4E7002C11BEF64804E7002C11E
+:10356A001BEFF8E490750DF0E890750CF0ED75F02E
+:10357A000AA424ACF582E43475F583E0FF90720264
+:10358A00F090750DE02FF090750CE03400F0E0FE3D
+:10359A00A3E0FFE4FCFD7BD67AA5F9F8D3123795B0
+:1035AA00400A90750C74A5F0A374D6F090750DE0DE
+:1035BA00242AF090750CE0345AF0E0FEA3E0780576
+:1035CA00CEA2E713CE13D8F8FF90750CEEF0A3EF56
+:1035DA00F090722CEEF0A3EFF0D394D2EE648094C4
+:1035EA0082400A90722C7402F0A374D2F0C39072D3
+:1035FA002CE0648094805004E4F0A3F090722CE0F4
+:10360A00FEA3E0243AF582EE3472F583E09072026A
+:10361A00F090722AE0FF24FD602D24FE6029240325
+:10362A0024FB500460218040907202E0FE74202F37
+:10363A00F582E43480F583EEF074282FF582E434C1
+:10364A0080F583EEF08021907202E0FF90722AE00A
+:10365A00FE2430F582E43480F583EFF074382EF5D9
+:10366A0082E43480F583EFF0907640E07006907241
+:10367A0039740AF0907239E004F0E0C3940A5002F7
+:08368A00A111E4907640F0224A
+:044D9700121730229D
+:104958009076467480F0E4A3F0A3F0A3F0A3F0A34C
+:10496800F0A3F0A3F0A3F0A37480F0E4A3F0A3F005
+:10497800A3F0A3F0A3F0A3F0A37440F0E4A3F0A382
+:104988007440F0E4A3F0A3F0A3F0A3F0A3F0A3F025
+:10499800A37440F0E4A3F0A37440F0E4A3F0A3F000
+:0549A800A3F0A3F022C2
+:100FC600E4FF74462FF582E43476F583E0FE742060
+:100FD6002FF582E43480F583EEF0744E2FF582E42B
+:100FE6003476F583E0FE74302FF582E43480F583A1
+:060FF600EEF00FBF08CC75
+:010FFC0022D2
+:104A8D00E4FF74562FF582E43476F583E0FE742846
+:104A9D002FF582E43480F583EEF0745E2FF582E419
+:104AAD003476F583E0FE74382FF582E43480F58397
+:064ABD00EEF00FBF08CC73
+:014AC30022D0
+:10173000C082C083C0E0E8C0E07878E814F870FBAD
+:0A174000D0E0F8D0E0D083D0822280
+:030043000249006F
+:10490000022FE700023D4700024D4600024BD50052
+:10491000024B6000022FFF00024BED00024B8100B2
+:10492000024C0400023FD500024C1B00024C320036
+:10493000024C4900024C6000024C7700024C8E0091
+:10494000024CA500024CBC00024CD300024CEA0011
+:08495000024D0100024D1800A8
+:101B40000000000000000000000000000000000095
+:101B50000000000000000000000000000000000085
+:101B60000000000000000000000000000000000075
+:101B70000000000000000000000000000000000065
+:101B80000000000000000000000000000000000055
+:101B90000000000000000000000000000000000045
+:101BA0000000000000000000000000000000000035
+:101BB0000000000000000000000000000000000025
+:101BC0000000000000000000000000000000000015
+:101BD0000000000000000000000000000000000005
+:101BE00000000000000000000000000000000000F5
+:101BF00000000000000000000000000000000000E5
+:101C000000000000000000000000000000000000D4
+:101C100000000000000000000000000000000000C4
+:101C200000000000000000000000000000000000B4
+:101C300000000000000000000000000000000000A4
+:101C40000000000000000000000000000000000094
+:101C50000000000000000000000000000000000084
+:101C60000000000000000000000000000000000074
+:101C70000000000000000000000000000000000064
+:101C80000000000000000000000000000000000054
+:101C90000000000000000000000000000000000044
+:101CA0000000000000000000000000000000000034
+:101CB0000000000000000000000000000000000024
+:101CC0000000000000000000000000000000000014
+:101CD0000000000000000000000000000000000004
+:101CE00000000000000000000000000000000000F4
+:101CF00000000000000000000000000000000000E4
+:101D000000000000000000000000000000000000D3
+:101D100000000000000000000000000000000000C3
+:101D200000000000000000000000000000000000B3
+:101D300000000000000000000000000000000000A3
+:101D40000000000000000000000000000000000093
+:101D50000000000000000000000000000000000083
+:101D60000000000000000000000000000000000073
+:101D70000000000000000000000000000000000063
+:101D80000000000000000000000000000000000053
+:101D90000000000000000000000000000000000043
+:101DA0000000000000000000000000000000000033
+:101DB0000000000000000000000000000000000023
+:101DC0000000000000000000000000000000000013
+:101DD0000000000000000000000000000000000003
+:101DE00000000000000000000000000000000000F3
+:101DF00000000000000000000000000000000000E3
+:101E000000000000000000000000000000000000D2
+:101E100000000000000000000000000000000000C2
+:101E200000000000000000000000000000000000B2
+:101E300000000000000000000000000000000000A2
+:101E40000000000000000000000000000000000092
+:101E50000000000000000000000000000000000082
+:101E60000000000000000000000000000000000072
+:101E70000000000000000000000000000000000062
+:101E80000000000000000000000000000000000052
+:101E90000000000000000000000000000000000042
+:101EA0000000000000000000000000000000000032
+:0E1EB000000000000000000000000000000024
+:101EBE000000000000000000000000000000000014
+:101ECE000000000000000000000000000000000004
+:101EDE0000000000000000000000000000000000F4
+:101EEE0000000000000000000000000000000000E4
+:101EFE0000000000000000000000000000000000D4
+:101F0E0000000000000000000000000000000000C3
+:101F1E0000000000000000000000000000000000B3
+:101F2E0000000000000000000000000000000000A3
+:021F3E000000A1
+:101F40000000000000000000000000000000000091
+:101F50000000000000000000000000000000000081
+:101F60000000000000000000000000000000000071
+:101F70000000000000000000000000000000000061
+:101F80000000000000000000000000000000000051
+:101F90000000000000000000000000000000000041
+:101FA0000000000000000000000000000000000031
+:101FB0000000000000000000000000000000000021
+:101FC0000000000000000000000000000000000011
+:101FD0000000000000000000000000000000000001
+:101FE00000000000000000000000000000000000F1
+:101FF00000000000000000000000000000000000E1
+:1020000000000000000000000000000000000000D0
+:1020100000000000000000000000000000000000C0
+:1020200000000000000000000000000000000000B0
+:1020300000000000000000000000000000000000A0
+:102040000000000000000000000000000000000090
+:102050000000000000000000000000000000000080
+:102060000000000000000000000000000000000070
+:102070000000000000000000000000000000000060
+:102080000000000000000000000000000000000050
+:102090000000000000000000000000000000000040
+:1020A0000000000000000000000000000000000030
+:1020B0000000000000000000000000000000000020
+:1020C0000000000000000000000000000000000010
+:1020D0000000000000000000000000000000000000
+:1020E00000000000000000000000000000000000F0
+:1020F00000000000000000000000000000000000E0
+:1021000000000000000000000000000000000000CF
+:1021100000000000000000000000000000000000BF
+:1021200000000000000000000000000000000000AF
+:10213000000000000000000000000000000000009F
+:10214000000000000000000000000000000000008F
+:10215000000000000000000000000000000000007F
+:10216000000000000000000000000000000000006F
+:10217000000000000000000000000000000000005F
+:10218000000000000000000000000000000000004F
+:10219000000000000000000000000000000000003F
+:1021A000000000000000000000000000000000002F
+:1021B000000000000000000000000000000000001F
+:1021C000000000000000000000000000000000000F
+:1021D00000000000000000000000000000000000FF
+:1021E00000000000000000000000000000000000EF
+:1021F00000000000000000000000000000000000DF
+:1022000000000000000000000000000000000000CE
+:1022100000000000000000000000000000000000BE
+:1022200000000000000000000000000000000000AE
+:10223000000000000000000000000000000000009E
+:10224000000000000000000000000000000000008E
+:10225000000000000000000000000000000000007E
+:10226000000000000000000000000000000000006E
+:10227000000000000000000000000000000000005E
+:10228000000000000000000000000000000000004E
+:10229000000000000000000000000000000000003E
+:1022A000000000000000000000000000000000002E
+:1022B000000000000000000000000000000000001E
+:1022C000000000000000000000000000000000000E
+:1022D00000000000000000000000000000000000FE
+:1022E00000000000000000000000000000000000EE
+:1022F00000000000000000000000000000000000DE
+:1023000000000000000000000000000000000000CD
+:1023100000000000000000000000000000000000BD
+:1023200000000000000000000000000000000000AD
+:10233000000000000000000000000000000000009D
+:10234000000000000000000000000000000000008D
+:10235000000000000000000000000000000000007D
+:10236000000000000000000000000000000000006D
+:0E23700000000000000000000000000000005F
+:10237E00000000000000000000000000000000004F
+:10238E00000000000000000000000000000000003F
+:10239E00000000000000000000000000000000002F
+:1023AE00000000000000000000000000000000001F
+:1023BE00000000000000000000000000000000000F
+:1023CE0000000000000000000000000000000000FF
+:1023DE0000000000000000000000000000000000EF
+:1023EE0000000000000000000000000000000000DF
+:1023FE0000000000000000000000000000000000CF
+:10240E0000000000000000000000000000000000BE
+:10241E0000000000000000000000000000000000AE
+:10242E00000000000000000000000000000000009E
+:10243E00000000000000000000000000000000008E
+:10244E00000000000000000000000000000000007E
+:10245E00000000000000000000000000000000006E
+:10246E00000000000000000000000000000000005E
+:10247E00000000000000000000000000000000004E
+:10248E00000000000000000000000000000000003E
+:10249E00000000000000000000000000000000002E
+:1024AE00000000000000000000000000000000001E
+:1024BE00000000000000000000000000000000000E
+:1024CE0000000000000000000000000000000000FE
+:1024DE0000000000000000000000000000000000EE
+:1024EE0000000000000000000000000000000000DE
+:1024FE0000000000000000000000000000000000CE
+:10250E0000000000000000000000000000000000BD
+:10251E0000000000000000000000000000000000AD
+:10252E00000000000000000000000000000000009D
+:10253E00000000000000000000000000000000008D
+:10254E00000000000000000000000000000000007D
+:10255E00000000000000000000000000000000006D
+:10256E00000000000000000000000000000000005D
+:10257E00000000000000000000000000000000004D
+:10258E00000000000000000000000000000000003D
+:10259E00000000000000000000000000000000002D
+:1025AE00000000000000000000000000000000001D
+:1025BE00000000000000000000000000000000000D
+:1025CE0000000000000000000000000000000000FD
+:1025DE0000000000000000000000000000000000ED
+:1025EE0000000000000000000000000000000000DD
+:1025FE0000000000000000000000000000000000CD
+:10260E0000000000000000000000000000000000BC
+:10261E0000000000000000000000000000000000AC
+:10262E00000000000000000000000000000000009C
+:10263E00000000000000000000000000000000008C
+:10264E00000000000000000000000000000000007C
+:10265E00000000000000000000000000000000006C
+:10266E00000000000000000000000000000000005C
+:10267E00000000000000000000000000000000004C
+:10268E00000000000000000000000000000000003C
+:10269E00000000000000000000000000000000002C
+:1026AE00000000000000000000000000000000001C
+:1026BE00000000000000000000000000000000000C
+:1026CE0000000000000000000000000000000000FC
+:1026DE0000000000000000000000000000000000EC
+:0E26EE000000000000000000000000000000DE
+:1026FC0000000000000000000000000000000000CE
+:10270C0000000000000000000000000000000000BD
+:10271C0000000000000000000000000000000000AD
+:10272C00000000000000000000000000000000009D
+:10273C00000000000000000000000000000000008D
+:10274C00000000000000000000000000000000007D
+:10275C00000000000000000000000000000000006D
+:10276C00000000000000000000000000000000005D
+:10277C00000000000000000000000000000000004D
+:10278C00000000000000000000000000000000003D
+:10279C00000000000000000000000000000000002D
+:1027AC00000000000000000000000000000000001D
+:1027BC00000000000000000000000000000000000D
+:1027CC0000000000000000000000000000000000FD
+:1027DC0000000000000000000000000000000000ED
+:1027EC0000000000000000000000000000000000DD
+:0527FC000000000022B6
+:07174A00907FC57402F0223C
+:10175100907EC0E0907645F0907EC1E0907644F0B6
+:10176100907EC2E0907643F0B40003021778907641
+:10177100197403F002178E907644E0B4BB09907699
+:10178100197402F002178E9076197401F090764266
+:03179100E4F0225F
+:030000000245F9BD
+:0C45F900787FE4F6D8FD7581380246405A
+:10369200BB010689828A83E0225002E722BBFE0236
+:0936A200E32289828A83E4932269
+:1036AB00BB010CE58229F582E5833AF583E02250D4
+:1036BB0006E92582F8E622BBFE06E92582F8E2221E
+:0D36CB00E58229F582E5833AF583E4932238
+:1036D800C2D5EC30E709B2D5E4C39DFDE49CFCEE0D
+:1036E80030E715B2D5E4C39FFFE49EFE12381FC32E
+:1036F800E49DFDE49CFC800312381F30D507C3E429
+:063708009FFFE49EFE227B
+:10370E00BB0110E58229F582E5833AF583E0F5F0F9
+:10371E00A3E0225009E92582F886F008E622BBFED6
+:10372E000AE92582F8E2F5F008E222E5832AF5831C
+:08373E00E993F5F0A3E99322E1
+:10374600E88FF0A4CC8BF0A42CFCE98EF0A42CFC22
+:103756008AF0EDA42CFCEA8EF0A4CDA8F08BF0A4A0
+:103766002DCC3825F0FDE98FF0A42CCD35F0FCEBFF
+:103776008EF0A4FEA9F0EB8FF0A4CFC5F02ECD39C4
+:0F378600FEE43CFCEAA42DCE35F0FDE43CFC2231
+:10379500EB9FF5F0EA9E42F0E99D42F0EC6480C8AB
+:0637A50064809845F0224B
+:1037AB00EB9FF5F0EA9E42F0E99D42F0E89C45F074
+:0137BB0022EB
+:0C37BC00ECF0A3EDF0A3EEF0A3EFF02280
+:1037C800A8828583F0D083D0821237DF1237DF12C8
+:1037D80037DF1237DFE473E493A3C583C5F0C583ED
+:1037E800C8C582C8F0A3C583C5F0C583C8C582C84B
+:0137F80022AE
+:1037F900D083D082F8E4937012740193700DA3A35F
+:1038090093F8740193F5828883E473740293686072
+:06381900EFA3A3A380DF72
+:1046050002475AE493A3F8E493A34003F68001F22A
+:1046150008DFF48029E493A3F85407240CC8C333B6
+:10462500C4540F4420C8834004F456800146F6DF85
+:10463500E4800B0102040810204080900C8FE47E7A
+:10464500019360BCA3FF543F30E509541FFEE4937A
+:10465500A360010ECF54C025E060A840B8E493A341
+:10466500FAE493A3F8E493A3C8C582C8CAC583CA6C
+:10467500F0A3C8C582C8CAC583CADFE9DEE780BE24
+:010FC500002B
+:10381F00BC000BBE0029EF8DF084FFADF022E4CC8D
+:10382F00F875F008EF2FFFEE33FEEC33FCEE9DEC56
+:10383F00984005FCEE9DFE0FD5F0E9E4CEFD22ED9C
+:10384F00F8F5F0EE8420D21CFEADF075F008EF2FE6
+:10385F00FFED33FD4007985006D5F0F222C398FDD7
+:05386F000FD5F0EA2274
+:00000001FF
+*/
+/*
+VERSION=1.04.062
+DATE=16.10.2002
+*/
+static INTEL_HEX_RECORD g_emi62_loader[] = {
+ { 3,0x0000,0,{0x02,0x02,0x87}},
+ { 3,0x0043,0,{0x02,0x04,0x00}},
+ {16,0x0100,0,{0xe4,0xff,0xfe,0xc2,0x20,0xd2,0xe8,0x43,0xd8,0x20,0x90,0x7f,0xab,0x74,0xff,0xf0}},
+ {16,0x0110,0,{0x90,0x7f,0xa9,0xf0,0x90,0x7f,0xaa,0xf0,0x53,0x91,0xef,0x90,0x7f,0x95,0x74,0xc0}},
+ {16,0x0120,0,{0xf0,0x90,0x7f,0x9e,0xf0,0x90,0x7f,0x98,0xf0,0xe4,0x90,0x7f,0x94,0xf0,0x90,0x7f}},
+ {16,0x0130,0,{0x9d,0x74,0xff,0xf0,0x90,0x7f,0x97,0x74,0xa0,0xf0,0x90,0x7f,0x93,0xe0,0x54,0xfc}},
+ {16,0x0140,0,{0xf0,0x90,0x7f,0x9c,0x74,0x03,0xf0,0xe4,0x90,0x7f,0x96,0xf0,0x90,0x7f,0xaf,0xe0}},
+ {16,0x0150,0,{0x44,0x01,0xf0,0x90,0x7f,0xae,0xe0,0x44,0x0d,0xf0,0xd2,0xaf,0x0f,0xbf,0x00,0x01}},
+ {16,0x0160,0,{0x0e,0xbe,0x07,0xf8,0xbf,0x08,0xf5,0x20,0x20,0x42,0x75,0x14,0x00,0x75,0x13,0x00}},
+ {16,0x0170,0,{0x75,0x12,0x00,0x75,0x11,0x00,0x7f,0x48,0x7e,0x92,0x7d,0x00,0x7c,0x00,0xab,0x14}},
+ {16,0x0180,0,{0xaa,0x13,0xa9,0x12,0xa8,0x11,0xc3,0x12,0x03,0xed,0x50,0xdb,0x20,0x20,0xd8,0x7a}},
+ {16,0x0190,0,{0x00,0x79,0x00,0x78,0x00,0xe5,0x14,0x24,0x01,0xf5,0x14,0xea,0x35,0x13,0xf5,0x13}},
+ {16,0x01a0,0,{0xe9,0x35,0x12,0xf5,0x12,0xe8,0x35,0x11,0xf5,0x11,0x80,0xca,0x30,0x20,0xfd,0x12}},
+ {16,0x01b0,0,{0x01,0xc7,0x50,0x07,0x90,0x7f,0xb4,0xe0,0x44,0x01,0xf0,0x90,0x7f,0xb4,0xe0,0x44}},
+ { 6,0x01c0,0,{0x02,0xf0,0xc2,0x20,0x80,0xe6}},
+ { 1,0x01c6,0,{0x22}},
+ {16,0x01c7,0,{0x90,0x7f,0xe9,0xe0,0x24,0x5b,0x60,0x60,0x24,0x02,0x60,0x03,0x02,0x02,0x85,0x90}},
+ {16,0x01d7,0,{0x7f,0xea,0xe0,0x75,0x0a,0x00,0xf5,0x0b,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x0a,0x90}},
+ {16,0x01e7,0,{0x7f,0xee,0xe0,0x75,0x15,0x00,0xf5,0x16,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x15,0xe5}},
+ {16,0x01f7,0,{0x16,0x45,0x15,0x70,0x03,0x02,0x02,0x85,0xe4,0x90,0x7f,0xc5,0xf0,0x90,0x7f,0xb4}},
+ {16,0x0207,0,{0xe0,0x20,0xe3,0xf9,0x90,0x7f,0xc5,0xe0,0xf5,0x0c,0x12,0x03,0x13,0xaf,0x0c,0x7e}},
+ {16,0x0217,0,{0x00,0xef,0x25,0x0b,0xf5,0x0b,0xee,0x35,0x0a,0xf5,0x0a,0xc3,0xe5,0x16,0x9f,0xf5}},
+ {16,0x0227,0,{0x16,0xe5,0x15,0x9e,0xf5,0x15,0x80,0xc7,0x90,0x7f,0xea,0xe0,0x75,0x0a,0x00,0xf5}},
+ {16,0x0237,0,{0x0b,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x0a,0x90,0x7f,0xee,0xe0,0x75,0x15,0x00,0xf5}},
+ {16,0x0247,0,{0x16,0xa3,0xe0,0xfe,0xe4,0xee,0x42,0x15,0xe5,0x16,0x45,0x15,0x60,0x30,0xe4,0x90}},
+ {16,0x0257,0,{0x7f,0xc5,0xf0,0x90,0x7f,0xb4,0xe0,0x20,0xe3,0xf9,0x90,0x7f,0xc5,0xe0,0xf5,0x0c}},
+ {16,0x0267,0,{0x12,0x03,0x2b,0xaf,0x0c,0x7e,0x00,0xef,0x25,0x0b,0xf5,0x0b,0xee,0x35,0x0a,0xf5}},
+ {15,0x0277,0,{0x0a,0xc3,0xe5,0x16,0x9f,0xf5,0x16,0xe5,0x15,0x9e,0xf5,0x15,0x80,0xca,0xc3}},
+ { 1,0x0286,0,{0x22}},
+ {12,0x0287,0,{0x78,0x7f,0xe4,0xf6,0xd8,0xfd,0x75,0x81,0x29,0x02,0x02,0xce}},
+ {16,0x0293,0,{0x02,0x01,0x00,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0x40,0x03,0xf6,0x80,0x01,0xf2}},
+ {16,0x02a3,0,{0x08,0xdf,0xf4,0x80,0x29,0xe4,0x93,0xa3,0xf8,0x54,0x07,0x24,0x0c,0xc8,0xc3,0x33}},
+ {16,0x02b3,0,{0xc4,0x54,0x0f,0x44,0x20,0xc8,0x83,0x40,0x04,0xf4,0x56,0x80,0x01,0x46,0xf6,0xdf}},
+ {16,0x02c3,0,{0xe4,0x80,0x0b,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x90,0x04,0x6e,0xe4,0x7e}},
+ {16,0x02d3,0,{0x01,0x93,0x60,0xbc,0xa3,0xff,0x54,0x3f,0x30,0xe5,0x09,0x54,0x1f,0xfe,0xe4,0x93}},
+ {16,0x02e3,0,{0xa3,0x60,0x01,0x0e,0xcf,0x54,0xc0,0x25,0xe0,0x60,0xa8,0x40,0xb8,0xe4,0x93,0xa3}},
+ {16,0x02f3,0,{0xfa,0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca}},
+ {16,0x0303,0,{0xf0,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca,0xdf,0xe9,0xde,0xe7,0x80,0xbe}},
+ {16,0x0313,0,{0xe5,0x0c,0xff,0xe5,0x0b,0xf5,0x82,0xe5,0x0a,0xf5,0x83,0x75,0x92,0x7e,0x74,0xc0}},
+ { 8,0x0323,0,{0xf8,0xe2,0x08,0xf0,0xa3,0xdf,0xfa,0x22}},
+ {16,0x032b,0,{0x90,0x7f,0x96,0x85,0x83,0x92,0xa8,0x82,0x79,0x02,0x90,0x00,0x00,0xe0,0xb4,0x00}},
+ {16,0x033b,0,{0x0d,0x74,0x01,0xf0,0x90,0x7f,0x97,0xe0,0x54,0x7f,0xf0,0x44,0x80,0xf0,0xe5,0x0c}},
+ {16,0x034b,0,{0xff,0x90,0x7e,0xc0,0xe0,0xf5,0x28,0xe4,0xa2,0x47,0x33,0xf2,0x69,0xf2,0xe4,0xa2}},
+ {16,0x035b,0,{0x46,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x45,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x44,0x33}},
+ {16,0x036b,0,{0xf2,0x69,0xf2,0xe4,0xa2,0x43,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x42,0x33,0xf2,0x69}},
+ {16,0x037b,0,{0xf2,0xe4,0xa2,0x41,0x33,0xf2,0x69,0xf2,0xe4,0xa2,0x40,0x33,0xf2,0x69,0xf2,0xa3}},
+ { 3,0x038b,0,{0xdf,0xc2,0x22}},
+ {16,0x038e,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x90,0x7f,0xc4,0xe4,0xf0,0x53,0x91,0xef,0x90,0x7f}},
+ {11,0x039e,0,{0xab,0x74,0x04,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x03a9,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xd2,0x20,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x01}},
+ { 8,0x03b9,0,{0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x03c1,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x02,0xf0,0xd0}},
+ { 6,0x03d1,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x03d7,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x10,0xf0,0xd0}},
+ { 6,0x03e7,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x03ed,0,{0xeb,0x9f,0xf5,0xf0,0xea,0x9e,0x42,0xf0,0xe9,0x9d,0x42,0xf0,0xe8,0x9c,0x45,0xf0}},
+ { 1,0x03fd,0,{0x22}},
+ { 1,0x03fe,0,{0x32}},
+ { 1,0x03ff,0,{0x32}},
+ {16,0x0400,0,{0x02,0x03,0xa9,0x00,0x02,0x03,0xc1,0x00,0x02,0x03,0x8e,0x00,0x02,0x04,0x58,0x00}},
+ {16,0x0410,0,{0x02,0x03,0xd7,0x00,0x02,0x03,0xfe,0x00,0x02,0x03,0xff,0x00,0x02,0x04,0x84,0x00}},
+ {16,0x0420,0,{0x02,0x04,0x85,0x00,0x02,0x04,0x86,0x00,0x02,0x04,0x87,0x00,0x02,0x04,0x88,0x00}},
+ {16,0x0430,0,{0x02,0x04,0x89,0x00,0x02,0x04,0x8a,0x00,0x02,0x04,0x8b,0x00,0x02,0x04,0x8c,0x00}},
+ {16,0x0440,0,{0x02,0x04,0x8d,0x00,0x02,0x04,0x8e,0x00,0x02,0x04,0x8f,0x00,0x02,0x04,0x90,0x00}},
+ { 8,0x0450,0,{0x02,0x04,0x91,0x00,0x02,0x04,0x92,0x00}},
+ {16,0x0458,0,{0xc0,0xe0,0xc0,0x83,0xc0,0x82,0x53,0x91,0xef,0x90,0x7f,0xab,0x74,0x08,0xf0,0xd0}},
+ { 6,0x0468,0,{0x82,0xd0,0x83,0xd0,0xe0,0x32}},
+ {16,0x046e,0,{0x02,0x0a,0x00,0x0f,0x01,0x0c,0x11,0x04,0x0d,0x00,0x00,0x00,0x00,0x41,0x00,0x00}},
+ { 1,0x047e,0,{0x00}},
+ { 4,0x047f,0,{0x02,0x17,0x00,0x00}},
+ { 1,0x0483,0,{0x00}},
+ { 1,0x0484,0,{0x32}},
+ { 1,0x0485,0,{0x32}},
+ { 1,0x0486,0,{0x32}},
+ { 1,0x0487,0,{0x32}},
+ { 1,0x0488,0,{0x32}},
+ { 1,0x0489,0,{0x32}},
+ { 1,0x048a,0,{0x32}},
+ { 1,0x048b,0,{0x32}},
+ { 1,0x048c,0,{0x32}},
+ { 1,0x048d,0,{0x32}},
+ { 1,0x048e,0,{0x32}},
+ { 1,0x048f,0,{0x32}},
+ { 1,0x0490,0,{0x32}},
+ { 1,0x0491,0,{0x32}},
+ { 1,0x0492,0,{0x32}},
+ {16,0x1100,0,{0x12,0x01,0x10,0x01,0x00,0x00,0x00,0x40,0x6a,0x08,0x01,0x01,0x00,0x01,0x01,0x02}},
+ {16,0x1110,0,{0x00,0x01,0x09,0x02,0x20,0x00,0x01,0x01,0x03,0xa0,0x00,0x09,0x04,0x00,0x00,0x02}},
+ {16,0x1120,0,{0xff,0x00,0x00,0x04,0x07,0x05,0x82,0x02,0x40,0x00,0x00,0x07,0x05,0x02,0x02,0x40}},
+ {16,0x1130,0,{0x00,0x00,0x04,0x03,0x09,0x04,0x26,0x03,0x41,0x00,0x6e,0x00,0x63,0x00,0x68,0x00}},
+ {16,0x1140,0,{0x6f,0x00,0x72,0x00,0x20,0x00,0x43,0x00,0x68,0x00,0x69,0x00,0x70,0x00,0x73,0x00}},
+ {16,0x1150,0,{0x2c,0x00,0x20,0x00,0x49,0x00,0x6e,0x00,0x63,0x00,0x2e,0x00,0x28,0x03,0x46,0x00}},
+ {16,0x1160,0,{0x69,0x00,0x72,0x00,0x6d,0x00,0x77,0x00,0x61,0x00,0x72,0x00,0x65,0x00,0x20,0x00}},
+ {16,0x1170,0,{0x46,0x00,0x72,0x00,0x61,0x00,0x6d,0x00,0x65,0x00,0x57,0x00,0x6f,0x00,0x72,0x00}},
+ {16,0x1180,0,{0x6b,0x00,0x73,0x00,0x2a,0x03,0x43,0x00,0x6f,0x00,0x6e,0x00,0x66,0x00,0x69,0x00}},
+ {16,0x1190,0,{0x67,0x00,0x75,0x00,0x72,0x00,0x61,0x00,0x74,0x00,0x69,0x00,0x6f,0x00,0x6e,0x00}},
+ {16,0x11a0,0,{0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00,0x69,0x00,0x6e,0x00,0x67,0x00,0x22,0x03}},
+ {16,0x11b0,0,{0x49,0x00,0x6e,0x00,0x74,0x00,0x65,0x00,0x72,0x00,0x66,0x00,0x61,0x00,0x63,0x00}},
+ {16,0x11c0,0,{0x65,0x00,0x20,0x00,0x53,0x00,0x74,0x00,0x72,0x00,0x69,0x00,0x6e,0x00,0x67,0x00}},
+ { 2,0x11d0,0,{0x00,0x00}},
+ { 0,0x0000,1,{0}}
+};
+/* Source: EMILOAD.HEX
+:10046E00020A000F010C11040D00000000410000F3
+:01047E00007D
+:1001C700907FE9E0245B606024026003020285906F
+:1001D7007FEAE0750A00F50BA3E0FEE4EE420A9021
+:1001E7007FEEE0751500F516A3E0FEE4EE4215E597
+:1001F7001645157003020285E4907FC5F0907FB421
+:10020700E020E3F9907FC5E0F50C120313AF0C7EF5
+:1002170000EF250BF50BEE350AF50AC3E5169FF53A
+:1002270016E5159EF51580C7907FEAE0750A00F57B
+:100237000BA3E0FEE4EE420A907FEEE0751500F5B1
+:1002470016A3E0FEE4EE4215E51645156030E4908E
+:100257007FC5F0907FB4E020E3F9907FC5E0F50C0F
+:1002670012032BAF0C7E00EF250BF50BEE350AF5CD
+:0F0277000AC3E5169FF516E5159EF51580CAC357
+:010286002255
+:1003A900C0E0C083C082D2205391EF907FAB74012B
+:0803B900F0D082D083D0E032C5
+:10038E00C0E0C083C082907FC4E4F05391EF907FB1
+:0B039E00AB7404F0D082D083D0E032BA
+:1003C100C0E0C083C0825391EF907FAB7402F0D044
+:0603D10082D083D0E0326F
+:1003D700C0E0C083C0825391EF907FAB7410F0D020
+:0603E70082D083D0E03259
+:0103FE0032CC
+:10045800C0E0C083C0825391EF907FAB7408F0D0A6
+:0604680082D083D0E032D7
+:0103FF0032CB
+:010484003245
+:010485003244
+:010486003243
+:010487003242
+:010488003241
+:010489003240
+:01048A00323F
+:01048B00323E
+:01048C00323D
+:01048D00323C
+:01048E00323B
+:01048F00323A
+:010490003239
+:010491003238
+:010492003237
+:04047F000217000060
+:10010000E4FFFEC220D2E843D820907FAB74FFF01A
+:10011000907FA9F0907FAAF05391EF907F9574C0E3
+:10012000F0907F9EF0907F98F0E4907F94F0907F25
+:100130009D74FFF0907F9774A0F0907F93E054FC43
+:10014000F0907F9C7403F0E4907F96F0907FAFE096
+:100150004401F0907FAEE0440DF0D2AF0FBF00013C
+:100160000EBE07F8BF08F520204275140075130075
+:100170007512007511007F487E927D007C00AB14E3
+:10018000AA13A912A811C31203ED50DB2020D87ABC
+:100190000079007800E5142401F514EA3513F5130D
+:1001A000E93512F512E83511F51180CA3020FD123B
+:1001B00001C75007907FB4E04401F0907FB4E04461
+:0601C00002F0C22080E6FF
+:0101C6002216
+:1011000012011001000000406A0801010001010203
+:10111000000109022000010103A0000904000002EF
+:10112000FF0000040705820240000007050202409C
+:10113000000004030904260341006E0063006800F8
+:101140006F007200200043006800690070007300A7
+:101150002C00200049006E0063002E00280346008A
+:10116000690072006D007700610072006500200068
+:101170004600720061006D00650057006F0072004C
+:101180006B0073002A0343006F006E006600690065
+:101190006700750072006100740069006F006E00E6
+:1011A000200053007400720069006E006700220383
+:1011B00049006E0074006500720066006100630003
+:1011C0006500200053007400720069006E00670023
+:0211D00000001D
+:10031300E50CFFE50BF582E50AF58375927E74C063
+:08032300F8E208F0A3DFFA2262
+:10032B00907F96858392A8827902900000E0B400BA
+:10033B000D7401F0907F97E0547FF04480F0E50C52
+:10034B00FF907EC0E0F528E4A24733F269F2E4A205
+:10035B004633F269F2E4A24533F269F2E4A2443384
+:10036B00F269F2E4A24333F269F2E4A24233F26996
+:10037B00F2E4A24133F269F2E4A24033F269F2A350
+:03038B00DFC222AC
+:03004300020400B4
+:100400000203A9000203C10002038E000204580087
+:100410000203D7000203FE000203FF00020484006F
+:10042000020485000204860002048700020488009A
+:100430000204890002048A0002048B0002048C007A
+:1004400002048D0002048E0002048F00020490005A
+:08045000020491000204920075
+:0300000002028772
+:0C028700787FE4F6D8FD7581290202CED4
+:1003ED00EB9FF5F0EA9E42F0E99D42F0E89C45F066
+:0103FD0022DD
+:10029300020100E493A3F8E493A34003F68001F280
+:1002A30008DFF48029E493A3F85407240CC8C3336C
+:1002B300C4540F4420C8834004F456800146F6DF3B
+:1002C300E4800B010204081020408090046EE47E59
+:1002D300019360BCA3FF543F30E509541FFEE49330
+:1002E300A360010ECF54C025E060A840B8E493A3F7
+:1002F300FAE493A3F8E493A3C8C582C8CAC583CA22
+:10030300F0A3C8C582C8CAC583CADFE9DEE780BED9
+:010483000078
+:00000001FF
+*/
+/*
+VERSION=1.0.2.002
+DATE=10.01.2002
+EMI26_62
+*/
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c
new file mode 100644
index 000000000000..ce030d1f1c1f
--- /dev/null
+++ b/drivers/usb/misc/idmouse.c
@@ -0,0 +1,443 @@
+/* Siemens ID Mouse driver v0.5
+
+ 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.
+
+ Copyright (C) 2004-5 by Florian 'Floe' Echtler <echtler@fs.tum.de>
+ and Andreas 'ad' Deresch <aderesch@fs.tum.de>
+
+ Derived from the USB Skeleton driver 1.1,
+ Copyright (C) 2003 Greg Kroah-Hartman (greg@kroah.com)
+
+*/
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/smp_lock.h>
+#include <linux/completion.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+
+#define WIDTH 225
+#define HEIGHT 288
+#define HEADER "P5 225 288 255 "
+#define IMGSIZE ((WIDTH * HEIGHT) + sizeof(HEADER)-1)
+
+/* Version Information */
+#define DRIVER_VERSION "0.5"
+#define DRIVER_SHORT "idmouse"
+#define DRIVER_AUTHOR "Florian 'Floe' Echtler <echtler@fs.tum.de>"
+#define DRIVER_DESC "Siemens ID Mouse FingerTIP Sensor Driver"
+
+/* Siemens ID Mouse */
+#define USB_IDMOUSE_VENDOR_ID 0x0681
+#define USB_IDMOUSE_PRODUCT_ID 0x0005
+
+/* we still need a minor number */
+#define USB_IDMOUSE_MINOR_BASE 132
+
+static struct usb_device_id idmouse_table[] = {
+ {USB_DEVICE(USB_IDMOUSE_VENDOR_ID, USB_IDMOUSE_PRODUCT_ID)},
+ {} /* null entry at the end */
+};
+
+MODULE_DEVICE_TABLE(usb, idmouse_table);
+
+/* structure to hold all of our device specific stuff */
+struct usb_idmouse {
+
+ struct usb_device *udev; /* save off the usb device pointer */
+ struct usb_interface *interface; /* the interface for this device */
+
+ unsigned char *bulk_in_buffer; /* the buffer to receive data */
+ size_t bulk_in_size; /* the size of the receive buffer */
+ __u8 bulk_in_endpointAddr; /* the address of the bulk in endpoint */
+
+ int open; /* if the port is open or not */
+ int present; /* if the device is not disconnected */
+ struct semaphore sem; /* locks this structure */
+
+};
+
+/* local function prototypes */
+static ssize_t idmouse_read(struct file *file, char __user *buffer,
+ size_t count, loff_t * ppos);
+
+static int idmouse_open(struct inode *inode, struct file *file);
+static int idmouse_release(struct inode *inode, struct file *file);
+
+static int idmouse_probe(struct usb_interface *interface,
+ const struct usb_device_id *id);
+
+static void idmouse_disconnect(struct usb_interface *interface);
+
+/* file operation pointers */
+static struct file_operations idmouse_fops = {
+ .owner = THIS_MODULE,
+ .read = idmouse_read,
+ .open = idmouse_open,
+ .release = idmouse_release,
+};
+
+/* class driver information for devfs */
+static struct usb_class_driver idmouse_class = {
+ .name = "usb/idmouse%d",
+ .fops = &idmouse_fops,
+ .mode = S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH, /* filemode (char, 444) */
+ .minor_base = USB_IDMOUSE_MINOR_BASE,
+};
+
+/* usb specific object needed to register this driver with the usb subsystem */
+static struct usb_driver idmouse_driver = {
+ .owner = THIS_MODULE,
+ .name = DRIVER_SHORT,
+ .probe = idmouse_probe,
+ .disconnect = idmouse_disconnect,
+ .id_table = idmouse_table,
+};
+
+// prevent races between open() and disconnect()
+static DECLARE_MUTEX(disconnect_sem);
+
+static int idmouse_create_image(struct usb_idmouse *dev)
+{
+ int bytes_read = 0;
+ int bulk_read = 0;
+ int result = 0;
+
+ if (dev->bulk_in_size < sizeof(HEADER))
+ return -ENOMEM;
+
+ memcpy(dev->bulk_in_buffer,HEADER,sizeof(HEADER)-1);
+ bytes_read += sizeof(HEADER)-1;
+
+ /* Dump the setup packets. Yes, they are uncommented, simply
+ because they were sniffed under Windows using SnoopyPro.
+ I _guess_ that 0x22 is a kind of reset command and 0x21
+ means init..
+ */
+ result = usb_control_msg (dev->udev, usb_sndctrlpipe (dev->udev, 0),
+ 0x21, 0x42, 0x0001, 0x0002, NULL, 0, 1000);
+ if (result < 0)
+ return result;
+ result = usb_control_msg (dev->udev, usb_sndctrlpipe (dev->udev, 0),
+ 0x20, 0x42, 0x0001, 0x0002, NULL, 0, 1000);
+ if (result < 0)
+ return result;
+ result = usb_control_msg (dev->udev, usb_sndctrlpipe (dev->udev, 0),
+ 0x22, 0x42, 0x0000, 0x0002, NULL, 0, 1000);
+ if (result < 0)
+ return result;
+
+ result = usb_control_msg (dev->udev, usb_sndctrlpipe (dev->udev, 0),
+ 0x21, 0x42, 0x0001, 0x0002, NULL, 0, 1000);
+ if (result < 0)
+ return result;
+ result = usb_control_msg (dev->udev, usb_sndctrlpipe (dev->udev, 0),
+ 0x20, 0x42, 0x0001, 0x0002, NULL, 0, 1000);
+ if (result < 0)
+ return result;
+ result = usb_control_msg (dev->udev, usb_sndctrlpipe (dev->udev, 0),
+ 0x20, 0x42, 0x0000, 0x0002, NULL, 0, 1000);
+ if (result < 0)
+ return result;
+
+ /* loop over a blocking bulk read to get data from the device */
+ while (bytes_read < IMGSIZE) {
+ result = usb_bulk_msg (dev->udev,
+ usb_rcvbulkpipe (dev->udev, dev->bulk_in_endpointAddr),
+ dev->bulk_in_buffer + bytes_read,
+ dev->bulk_in_size, &bulk_read, 5000);
+ if (result < 0)
+ return result;
+ if (signal_pending(current))
+ return -EINTR;
+ bytes_read += bulk_read;
+ }
+
+ /* reset the device */
+ result = usb_control_msg (dev->udev, usb_sndctrlpipe (dev->udev, 0),
+ 0x22, 0x42, 0x0000, 0x0002, NULL, 0, 1000);
+ if (result < 0)
+ return result;
+
+ /* should be IMGSIZE == 64815 */
+ dbg("read %d bytes fingerprint data", bytes_read);
+ return 0;
+}
+
+static inline void idmouse_delete(struct usb_idmouse *dev)
+{
+ kfree(dev->bulk_in_buffer);
+ kfree(dev);
+}
+
+static int idmouse_open(struct inode *inode, struct file *file)
+{
+ struct usb_idmouse *dev = NULL;
+ struct usb_interface *interface;
+ int result = 0;
+
+ /* prevent disconnects */
+ down(&disconnect_sem);
+
+ /* get the interface from minor number and driver information */
+ interface = usb_find_interface (&idmouse_driver, iminor (inode));
+ if (!interface) {
+ up(&disconnect_sem);
+ return -ENODEV;
+ }
+ /* get the device information block from the interface */
+ dev = usb_get_intfdata(interface);
+ if (!dev) {
+ up(&disconnect_sem);
+ return -ENODEV;
+ }
+
+ /* lock this device */
+ down(&dev->sem);
+
+ /* check if already open */
+ if (dev->open) {
+
+ /* already open, so fail */
+ result = -EBUSY;
+
+ } else {
+
+ /* create a new image and check for success */
+ result = idmouse_create_image (dev);
+ if (result)
+ goto error;
+
+ /* increment our usage count for the driver */
+ ++dev->open;
+
+ /* save our object in the file's private structure */
+ file->private_data = dev;
+
+ }
+
+error:
+
+ /* unlock this device */
+ up(&dev->sem);
+
+ /* unlock the disconnect semaphore */
+ up(&disconnect_sem);
+ return result;
+}
+
+static int idmouse_release(struct inode *inode, struct file *file)
+{
+ struct usb_idmouse *dev;
+
+ /* prevent a race condition with open() */
+ down(&disconnect_sem);
+
+ dev = (struct usb_idmouse *) file->private_data;
+
+ if (dev == NULL) {
+ up(&disconnect_sem);
+ return -ENODEV;
+ }
+
+ /* lock our device */
+ down(&dev->sem);
+
+ /* are we really open? */
+ if (dev->open <= 0) {
+ up(&dev->sem);
+ up(&disconnect_sem);
+ return -ENODEV;
+ }
+
+ --dev->open;
+
+ if (!dev->present) {
+ /* the device was unplugged before the file was released */
+ up(&dev->sem);
+ idmouse_delete(dev);
+ up(&disconnect_sem);
+ return 0;
+ }
+
+ up(&dev->sem);
+ up(&disconnect_sem);
+ return 0;
+}
+
+static ssize_t idmouse_read(struct file *file, char __user *buffer, size_t count,
+ loff_t * ppos)
+{
+ struct usb_idmouse *dev;
+ int result = 0;
+
+ dev = (struct usb_idmouse *) file->private_data;
+
+ // lock this object
+ down (&dev->sem);
+
+ // verify that the device wasn't unplugged
+ if (!dev->present) {
+ up (&dev->sem);
+ return -ENODEV;
+ }
+
+ if (*ppos >= IMGSIZE) {
+ up (&dev->sem);
+ return 0;
+ }
+
+ if (count > IMGSIZE - *ppos)
+ count = IMGSIZE - *ppos;
+
+ if (copy_to_user (buffer, dev->bulk_in_buffer + *ppos, count)) {
+ result = -EFAULT;
+ } else {
+ result = count;
+ *ppos += count;
+ }
+
+ // unlock the device
+ up(&dev->sem);
+ return result;
+}
+
+static int idmouse_probe(struct usb_interface *interface,
+ const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev(interface);
+ struct usb_idmouse *dev = NULL;
+ struct usb_host_interface *iface_desc;
+ struct usb_endpoint_descriptor *endpoint;
+ size_t buffer_size;
+ int result;
+
+ /* check if we have gotten the data or the hid interface */
+ iface_desc = &interface->altsetting[0];
+ if (iface_desc->desc.bInterfaceClass != 0x0A)
+ return -ENODEV;
+
+ /* allocate memory for our device state and initialize it */
+ dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+ if (dev == NULL)
+ return -ENOMEM;
+ memset(dev, 0x00, sizeof(*dev));
+
+ init_MUTEX(&dev->sem);
+ dev->udev = udev;
+ dev->interface = interface;
+
+ /* set up the endpoint information - use only the first bulk-in endpoint */
+ endpoint = &iface_desc->endpoint[0].desc;
+ if (!dev->bulk_in_endpointAddr
+ && (endpoint->bEndpointAddress & USB_DIR_IN)
+ && ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
+ USB_ENDPOINT_XFER_BULK)) {
+
+ /* we found a bulk in endpoint */
+ buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ dev->bulk_in_size = buffer_size;
+ dev->bulk_in_endpointAddr = endpoint->bEndpointAddress;
+ dev->bulk_in_buffer =
+ kmalloc(IMGSIZE + buffer_size, GFP_KERNEL);
+
+ if (!dev->bulk_in_buffer) {
+ err("Unable to allocate input buffer.");
+ idmouse_delete(dev);
+ return -ENOMEM;
+ }
+ }
+
+ if (!(dev->bulk_in_endpointAddr)) {
+ err("Unable to find bulk-in endpoint.");
+ idmouse_delete(dev);
+ return -ENODEV;
+ }
+ /* allow device read, write and ioctl */
+ dev->present = 1;
+
+ /* we can register the device now, as it is ready */
+ usb_set_intfdata(interface, dev);
+ result = usb_register_dev(interface, &idmouse_class);
+ if (result) {
+ /* something prevented us from registering this device */
+ err("Unble to allocate minor number.");
+ usb_set_intfdata(interface, NULL);
+ idmouse_delete(dev);
+ return result;
+ }
+
+ /* be noisy */
+ dev_info(&interface->dev,"%s now attached\n",DRIVER_DESC);
+
+ return 0;
+}
+
+static void idmouse_disconnect(struct usb_interface *interface)
+{
+ struct usb_idmouse *dev;
+
+ /* prevent races with open() */
+ down(&disconnect_sem);
+
+ /* get device structure */
+ dev = usb_get_intfdata(interface);
+ usb_set_intfdata(interface, NULL);
+
+ /* lock it */
+ down(&dev->sem);
+
+ /* give back our minor */
+ usb_deregister_dev(interface, &idmouse_class);
+
+ /* prevent device read, write and ioctl */
+ dev->present = 0;
+
+ /* unlock */
+ up(&dev->sem);
+
+ /* if the device is opened, idmouse_release will clean this up */
+ if (!dev->open)
+ idmouse_delete(dev);
+
+ up(&disconnect_sem);
+
+ info("%s disconnected", DRIVER_DESC);
+}
+
+static int __init usb_idmouse_init(void)
+{
+ int result;
+
+ info(DRIVER_DESC " " DRIVER_VERSION);
+
+ /* register this driver with the USB subsystem */
+ result = usb_register(&idmouse_driver);
+ if (result)
+ err("Unable to register device (error %d).", result);
+
+ return result;
+}
+
+static void __exit usb_idmouse_exit(void)
+{
+ /* deregister this driver with the USB subsystem */
+ usb_deregister(&idmouse_driver);
+}
+
+module_init(usb_idmouse_init);
+module_exit(usb_idmouse_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
new file mode 100644
index 000000000000..dd4580cb57e0
--- /dev/null
+++ b/drivers/usb/misc/legousbtower.c
@@ -0,0 +1,1088 @@
+/*
+ * LEGO USB Tower driver
+ *
+ * Copyright (C) 2003 David Glance <davidgsf@sourceforge.net>
+ * 2001-2004 Juergen Stuber <starblue@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 as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * derived from USB Skeleton driver - 0.5
+ * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
+ *
+ * History:
+ *
+ * 2001-10-13 - 0.1 js
+ * - first version
+ * 2001-11-03 - 0.2 js
+ * - simplified buffering, one-shot URBs for writing
+ * 2001-11-10 - 0.3 js
+ * - removed IOCTL (setting power/mode is more complicated, postponed)
+ * 2001-11-28 - 0.4 js
+ * - added vendor commands for mode of operation and power level in open
+ * 2001-12-04 - 0.5 js
+ * - set IR mode by default (by oversight 0.4 set VLL mode)
+ * 2002-01-11 - 0.5? pcchan
+ * - make read buffer reusable and work around bytes_to_write issue between
+ * uhci and legusbtower
+ * 2002-09-23 - 0.52 david (david@csse.uwa.edu.au)
+ * - imported into lejos project
+ * - changed wake_up to wake_up_interruptible
+ * - changed to use lego0 rather than tower0
+ * - changed dbg() to use __func__ rather than deprecated __FUNCTION__
+ * 2003-01-12 - 0.53 david (david@csse.uwa.edu.au)
+ * - changed read and write to write everything or
+ * timeout (from a patch by Chris Riesen and Brett Thaeler driver)
+ * - added ioctl functionality to set timeouts
+ * 2003-07-18 - 0.54 davidgsf (david@csse.uwa.edu.au)
+ * - initial import into LegoUSB project
+ * - merge of existing LegoUSB.c driver
+ * 2003-07-18 - 0.56 davidgsf (david@csse.uwa.edu.au)
+ * - port to 2.6 style driver
+ * 2004-02-29 - 0.6 Juergen Stuber <starblue@users.sourceforge.net>
+ * - fix locking
+ * - unlink read URBs which are no longer needed
+ * - allow increased buffer size, eliminates need for timeout on write
+ * - have read URB running continuously
+ * - added poll
+ * - forbid seeking
+ * - added nonblocking I/O
+ * - changed back __func__ to __FUNCTION__
+ * - read and log tower firmware version
+ * - reset tower on probe, avoids failure of first write
+ * 2004-03-09 - 0.7 Juergen Stuber <starblue@users.sourceforge.net>
+ * - timeout read now only after inactivity, shorten default accordingly
+ * 2004-03-11 - 0.8 Juergen Stuber <starblue@users.sourceforge.net>
+ * - log major, minor instead of possibly confusing device filename
+ * - whitespace cleanup
+ * 2004-03-12 - 0.9 Juergen Stuber <starblue@users.sourceforge.net>
+ * - normalize whitespace in debug messages
+ * - take care about endianness in control message responses
+ * 2004-03-13 - 0.91 Juergen Stuber <starblue@users.sourceforge.net>
+ * - make default intervals longer to accommodate current EHCI driver
+ * 2004-03-19 - 0.92 Juergen Stuber <starblue@users.sourceforge.net>
+ * - replaced atomic_t by memory barriers
+ * 2004-04-21 - 0.93 Juergen Stuber <starblue@users.sourceforge.net>
+ * - wait for completion of write urb in release (needed for remotecontrol)
+ * - corrected poll for write direction (missing negation)
+ * 2004-04-22 - 0.94 Juergen Stuber <starblue@users.sourceforge.net>
+ * - make device locking interruptible
+ * 2004-04-30 - 0.95 Juergen Stuber <starblue@users.sourceforge.net>
+ * - check for valid udev on resubmitting and unlinking urbs
+ * 2004-08-03 - 0.96 Juergen Stuber <starblue@users.sourceforge.net>
+ * - move reset into open to clean out spurious data
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/smp_lock.h>
+#include <linux/completion.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include <linux/poll.h>
+
+
+#ifdef CONFIG_USB_DEBUG
+ static int debug = 4;
+#else
+ static int debug = 0;
+#endif
+
+/* Use our own dbg macro */
+#undef dbg
+#define dbg(lvl, format, arg...) do { if (debug >= lvl) printk(KERN_DEBUG __FILE__ ": " format "\n", ## arg); } while (0)
+
+
+/* Version Information */
+#define DRIVER_VERSION "v0.96"
+#define DRIVER_AUTHOR "Juergen Stuber <starblue@sourceforge.net>"
+#define DRIVER_DESC "LEGO USB Tower Driver"
+
+/* Module parameters */
+module_param(debug, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
+/* The defaults are chosen to work with the latest versions of leJOS and NQC.
+ */
+
+/* Some legacy software likes to receive packets in one piece.
+ * In this case read_buffer_size should exceed the maximal packet length
+ * (417 for datalog uploads), and packet_timeout should be set.
+ */
+static int read_buffer_size = 480;
+module_param(read_buffer_size, int, 0);
+MODULE_PARM_DESC(read_buffer_size, "Read buffer size");
+
+/* Some legacy software likes to send packets in one piece.
+ * In this case write_buffer_size should exceed the maximal packet length
+ * (417 for firmware and program downloads).
+ * A problem with long writes is that the following read may time out
+ * if the software is not prepared to wait long enough.
+ */
+static int write_buffer_size = 480;
+module_param(write_buffer_size, int, 0);
+MODULE_PARM_DESC(write_buffer_size, "Write buffer size");
+
+/* Some legacy software expects reads to contain whole LASM packets.
+ * To achieve this, characters which arrive before a packet timeout
+ * occurs will be returned in a single read operation.
+ * A problem with long reads is that the software may time out
+ * if it is not prepared to wait long enough.
+ * The packet timeout should be greater than the time between the
+ * reception of subsequent characters, which should arrive about
+ * every 5ms for the standard 2400 baud.
+ * Set it to 0 to disable.
+ */
+static int packet_timeout = 50;
+module_param(packet_timeout, int, 0);
+MODULE_PARM_DESC(packet_timeout, "Packet timeout in ms");
+
+/* Some legacy software expects blocking reads to time out.
+ * Timeout occurs after the specified time of read and write inactivity.
+ * Set it to 0 to disable.
+ */
+static int read_timeout = 200;
+module_param(read_timeout, int, 0);
+MODULE_PARM_DESC(read_timeout, "Read timeout in ms");
+
+/* As of kernel version 2.6.4 ehci-hcd uses an
+ * "only one interrupt transfer per frame" shortcut
+ * to simplify the scheduling of periodic transfers.
+ * This conflicts with our standard 1ms intervals for in and out URBs.
+ * We use default intervals of 2ms for in and 8ms for out transfers,
+ * which is fast enough for 2400 baud and allows a small additional load.
+ * Increase the interval to allow more devices that do interrupt transfers,
+ * or set to 0 to use the standard interval from the endpoint descriptors.
+ */
+static int interrupt_in_interval = 2;
+module_param(interrupt_in_interval, int, 0);
+MODULE_PARM_DESC(interrupt_in_interval, "Interrupt in interval in ms");
+
+static int interrupt_out_interval = 8;
+module_param(interrupt_out_interval, int, 0);
+MODULE_PARM_DESC(interrupt_out_interval, "Interrupt out interval in ms");
+
+/* Define these values to match your device */
+#define LEGO_USB_TOWER_VENDOR_ID 0x0694
+#define LEGO_USB_TOWER_PRODUCT_ID 0x0001
+
+/* Vendor requests */
+#define LEGO_USB_TOWER_REQUEST_RESET 0x04
+#define LEGO_USB_TOWER_REQUEST_GET_VERSION 0xFD
+
+struct tower_reset_reply {
+ __le16 size; /* little-endian */
+ __u8 err_code;
+ __u8 spare;
+} __attribute__ ((packed));
+
+struct tower_get_version_reply {
+ __le16 size; /* little-endian */
+ __u8 err_code;
+ __u8 spare;
+ __u8 major;
+ __u8 minor;
+ __le16 build_no; /* little-endian */
+} __attribute__ ((packed));
+
+
+/* table of devices that work with this driver */
+static struct usb_device_id tower_table [] = {
+ { USB_DEVICE(LEGO_USB_TOWER_VENDOR_ID, LEGO_USB_TOWER_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, tower_table);
+
+#define LEGO_USB_TOWER_MINOR_BASE 160
+
+
+/* Structure to hold all of our device specific stuff */
+struct lego_usb_tower {
+ struct semaphore sem; /* locks this structure */
+ struct usb_device* udev; /* save off the usb device pointer */
+ unsigned char minor; /* the starting minor number for this device */
+
+ int open_count; /* number of times this port has been opened */
+
+ char* read_buffer;
+ size_t read_buffer_length; /* this much came in */
+ size_t read_packet_length; /* this much will be returned on read */
+ spinlock_t read_buffer_lock;
+ int packet_timeout_jiffies;
+ unsigned long read_last_arrival;
+
+ wait_queue_head_t read_wait;
+ wait_queue_head_t write_wait;
+
+ char* interrupt_in_buffer;
+ struct usb_endpoint_descriptor* interrupt_in_endpoint;
+ struct urb* interrupt_in_urb;
+ int interrupt_in_interval;
+ int interrupt_in_running;
+ int interrupt_in_done;
+
+ char* interrupt_out_buffer;
+ struct usb_endpoint_descriptor* interrupt_out_endpoint;
+ struct urb* interrupt_out_urb;
+ int interrupt_out_interval;
+ int interrupt_out_busy;
+
+};
+
+
+/* local function prototypes */
+static ssize_t tower_read (struct file *file, char __user *buffer, size_t count, loff_t *ppos);
+static ssize_t tower_write (struct file *file, const char __user *buffer, size_t count, loff_t *ppos);
+static inline void tower_delete (struct lego_usb_tower *dev);
+static int tower_open (struct inode *inode, struct file *file);
+static int tower_release (struct inode *inode, struct file *file);
+static unsigned int tower_poll (struct file *file, poll_table *wait);
+static loff_t tower_llseek (struct file *file, loff_t off, int whence);
+
+static void tower_abort_transfers (struct lego_usb_tower *dev);
+static void tower_check_for_read_packet (struct lego_usb_tower *dev);
+static void tower_interrupt_in_callback (struct urb *urb, struct pt_regs *regs);
+static void tower_interrupt_out_callback (struct urb *urb, struct pt_regs *regs);
+
+static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id);
+static void tower_disconnect (struct usb_interface *interface);
+
+
+/* prevent races between open() and disconnect */
+static DECLARE_MUTEX (disconnect_sem);
+
+/* file operations needed when we register this driver */
+static struct file_operations tower_fops = {
+ .owner = THIS_MODULE,
+ .read = tower_read,
+ .write = tower_write,
+ .open = tower_open,
+ .release = tower_release,
+ .poll = tower_poll,
+ .llseek = tower_llseek,
+};
+
+/*
+ * usb class driver info in order to get a minor number from the usb core,
+ * and to have the device registered with devfs and the driver core
+ */
+static struct usb_class_driver tower_class = {
+ .name = "usb/legousbtower%d",
+ .fops = &tower_fops,
+ .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH,
+ .minor_base = LEGO_USB_TOWER_MINOR_BASE,
+};
+
+
+/* usb specific object needed to register this driver with the usb subsystem */
+static struct usb_driver tower_driver = {
+ .owner = THIS_MODULE,
+ .name = "legousbtower",
+ .probe = tower_probe,
+ .disconnect = tower_disconnect,
+ .id_table = tower_table,
+};
+
+
+/**
+ * lego_usb_tower_debug_data
+ */
+static inline void lego_usb_tower_debug_data (int level, const char *function, int size, const unsigned char *data)
+{
+ int i;
+
+ if (debug < level)
+ return;
+
+ printk (KERN_DEBUG __FILE__": %s - length = %d, data = ", function, size);
+ for (i = 0; i < size; ++i) {
+ printk ("%.2x ", data[i]);
+ }
+ printk ("\n");
+}
+
+
+/**
+ * tower_delete
+ */
+static inline void tower_delete (struct lego_usb_tower *dev)
+{
+ dbg(2, "%s: enter", __FUNCTION__);
+
+ tower_abort_transfers (dev);
+
+ /* free data structures */
+ if (dev->interrupt_in_urb != NULL) {
+ usb_free_urb (dev->interrupt_in_urb);
+ }
+ if (dev->interrupt_out_urb != NULL) {
+ usb_free_urb (dev->interrupt_out_urb);
+ }
+ kfree (dev->read_buffer);
+ kfree (dev->interrupt_in_buffer);
+ kfree (dev->interrupt_out_buffer);
+ kfree (dev);
+
+ dbg(2, "%s: leave", __FUNCTION__);
+}
+
+
+/**
+ * tower_open
+ */
+static int tower_open (struct inode *inode, struct file *file)
+{
+ struct lego_usb_tower *dev = NULL;
+ int subminor;
+ int retval = 0;
+ struct usb_interface *interface;
+ struct tower_reset_reply reset_reply;
+ int result;
+
+ dbg(2, "%s: enter", __FUNCTION__);
+
+ nonseekable_open(inode, file);
+ subminor = iminor(inode);
+
+ down (&disconnect_sem);
+
+ interface = usb_find_interface (&tower_driver, subminor);
+
+ if (!interface) {
+ err ("%s - error, can't find device for minor %d",
+ __FUNCTION__, subminor);
+ retval = -ENODEV;
+ goto unlock_disconnect_exit;
+ }
+
+ dev = usb_get_intfdata(interface);
+
+ if (!dev) {
+ retval = -ENODEV;
+ goto unlock_disconnect_exit;
+ }
+
+ /* lock this device */
+ if (down_interruptible (&dev->sem)) {
+ retval = -ERESTARTSYS;
+ goto unlock_disconnect_exit;
+ }
+
+ /* allow opening only once */
+ if (dev->open_count) {
+ retval = -EBUSY;
+ goto unlock_exit;
+ }
+ dev->open_count = 1;
+
+ /* reset the tower */
+ result = usb_control_msg (dev->udev,
+ usb_rcvctrlpipe(dev->udev, 0),
+ LEGO_USB_TOWER_REQUEST_RESET,
+ USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_DEVICE,
+ 0,
+ 0,
+ &reset_reply,
+ sizeof(reset_reply),
+ 1000);
+ if (result < 0) {
+ err("LEGO USB Tower reset control request failed");
+ retval = result;
+ goto unlock_exit;
+ }
+
+ /* initialize in direction */
+ dev->read_buffer_length = 0;
+ dev->read_packet_length = 0;
+ usb_fill_int_urb (dev->interrupt_in_urb,
+ dev->udev,
+ usb_rcvintpipe(dev->udev, dev->interrupt_in_endpoint->bEndpointAddress),
+ dev->interrupt_in_buffer,
+ le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize),
+ tower_interrupt_in_callback,
+ dev,
+ dev->interrupt_in_interval);
+
+ dev->interrupt_in_running = 1;
+ dev->interrupt_in_done = 0;
+ mb();
+
+ retval = usb_submit_urb (dev->interrupt_in_urb, GFP_KERNEL);
+ if (retval) {
+ err("Couldn't submit interrupt_in_urb %d", retval);
+ dev->interrupt_in_running = 0;
+ dev->open_count = 0;
+ goto unlock_exit;
+ }
+
+ /* save device in the file's private structure */
+ file->private_data = dev;
+
+unlock_exit:
+ up (&dev->sem);
+
+unlock_disconnect_exit:
+ up (&disconnect_sem);
+
+ dbg(2, "%s: leave, return value %d ", __FUNCTION__, retval);
+
+ return retval;
+}
+
+/**
+ * tower_release
+ */
+static int tower_release (struct inode *inode, struct file *file)
+{
+ struct lego_usb_tower *dev;
+ int retval = 0;
+
+ dbg(2, "%s: enter", __FUNCTION__);
+
+ dev = (struct lego_usb_tower *)file->private_data;
+
+ if (dev == NULL) {
+ dbg(1, "%s: object is NULL", __FUNCTION__);
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ if (down_interruptible (&dev->sem)) {
+ retval = -ERESTARTSYS;
+ goto exit;
+ }
+
+ if (dev->open_count != 1) {
+ dbg(1, "%s: device not opened exactly once", __FUNCTION__);
+ retval = -ENODEV;
+ goto unlock_exit;
+ }
+ if (dev->udev == NULL) {
+ /* the device was unplugged before the file was released */
+ up (&dev->sem); /* unlock here as tower_delete frees dev */
+ tower_delete (dev);
+ goto exit;
+ }
+
+ /* wait until write transfer is finished */
+ if (dev->interrupt_out_busy) {
+ wait_event_interruptible_timeout (dev->write_wait, !dev->interrupt_out_busy, 2 * HZ);
+ }
+ tower_abort_transfers (dev);
+ dev->open_count = 0;
+
+unlock_exit:
+ up (&dev->sem);
+
+exit:
+ dbg(2, "%s: leave, return value %d", __FUNCTION__, retval);
+ return retval;
+}
+
+
+/**
+ * tower_abort_transfers
+ * aborts transfers and frees associated data structures
+ */
+static void tower_abort_transfers (struct lego_usb_tower *dev)
+{
+ dbg(2, "%s: enter", __FUNCTION__);
+
+ if (dev == NULL) {
+ dbg(1, "%s: dev is null", __FUNCTION__);
+ goto exit;
+ }
+
+ /* shutdown transfer */
+ if (dev->interrupt_in_running) {
+ dev->interrupt_in_running = 0;
+ mb();
+ if (dev->interrupt_in_urb != NULL && dev->udev) {
+ usb_kill_urb (dev->interrupt_in_urb);
+ }
+ }
+ if (dev->interrupt_out_busy) {
+ if (dev->interrupt_out_urb != NULL && dev->udev) {
+ usb_kill_urb (dev->interrupt_out_urb);
+ }
+ }
+
+exit:
+ dbg(2, "%s: leave", __FUNCTION__);
+}
+
+
+/**
+ * tower_check_for_read_packet
+ *
+ * To get correct semantics for signals and non-blocking I/O
+ * with packetizing we pretend not to see any data in the read buffer
+ * until it has been there unchanged for at least
+ * dev->packet_timeout_jiffies, or until the buffer is full.
+ */
+static void tower_check_for_read_packet (struct lego_usb_tower *dev)
+{
+ spin_lock_irq (&dev->read_buffer_lock);
+ if (!packet_timeout
+ || time_after(jiffies, dev->read_last_arrival + dev->packet_timeout_jiffies)
+ || dev->read_buffer_length == read_buffer_size) {
+ dev->read_packet_length = dev->read_buffer_length;
+ }
+ dev->interrupt_in_done = 0;
+ spin_unlock_irq (&dev->read_buffer_lock);
+}
+
+
+/**
+ * tower_poll
+ */
+static unsigned int tower_poll (struct file *file, poll_table *wait)
+{
+ struct lego_usb_tower *dev;
+ unsigned int mask = 0;
+
+ dbg(2, "%s: enter", __FUNCTION__);
+
+ dev = file->private_data;
+
+ poll_wait(file, &dev->read_wait, wait);
+ poll_wait(file, &dev->write_wait, wait);
+
+ tower_check_for_read_packet(dev);
+ if (dev->read_packet_length > 0) {
+ mask |= POLLIN | POLLRDNORM;
+ }
+ if (!dev->interrupt_out_busy) {
+ mask |= POLLOUT | POLLWRNORM;
+ }
+
+ dbg(2, "%s: leave, mask = %d", __FUNCTION__, mask);
+
+ return mask;
+}
+
+
+/**
+ * tower_llseek
+ */
+static loff_t tower_llseek (struct file *file, loff_t off, int whence)
+{
+ return -ESPIPE; /* unseekable */
+}
+
+
+/**
+ * tower_read
+ */
+static ssize_t tower_read (struct file *file, char __user *buffer, size_t count, loff_t *ppos)
+{
+ struct lego_usb_tower *dev;
+ size_t bytes_to_read;
+ int i;
+ int retval = 0;
+ unsigned long timeout = 0;
+
+ dbg(2, "%s: enter, count = %Zd", __FUNCTION__, count);
+
+ dev = (struct lego_usb_tower *)file->private_data;
+
+ /* lock this object */
+ if (down_interruptible (&dev->sem)) {
+ retval = -ERESTARTSYS;
+ goto exit;
+ }
+
+ /* verify that the device wasn't unplugged */
+ if (dev->udev == NULL) {
+ retval = -ENODEV;
+ err("No device or device unplugged %d", retval);
+ goto unlock_exit;
+ }
+
+ /* verify that we actually have some data to read */
+ if (count == 0) {
+ dbg(1, "%s: read request of 0 bytes", __FUNCTION__);
+ goto unlock_exit;
+ }
+
+ if (read_timeout) {
+ timeout = jiffies + read_timeout * HZ / 1000;
+ }
+
+ /* wait for data */
+ tower_check_for_read_packet (dev);
+ while (dev->read_packet_length == 0) {
+ if (file->f_flags & O_NONBLOCK) {
+ retval = -EAGAIN;
+ goto unlock_exit;
+ }
+ retval = wait_event_interruptible_timeout(dev->read_wait, dev->interrupt_in_done, dev->packet_timeout_jiffies);
+ if (retval < 0) {
+ goto unlock_exit;
+ }
+
+ /* reset read timeout during read or write activity */
+ if (read_timeout
+ && (dev->read_buffer_length || dev->interrupt_out_busy)) {
+ timeout = jiffies + read_timeout * HZ / 1000;
+ }
+ /* check for read timeout */
+ if (read_timeout && time_after (jiffies, timeout)) {
+ retval = -ETIMEDOUT;
+ goto unlock_exit;
+ }
+ tower_check_for_read_packet (dev);
+ }
+
+ /* copy the data from read_buffer into userspace */
+ bytes_to_read = min(count, dev->read_packet_length);
+
+ if (copy_to_user (buffer, dev->read_buffer, bytes_to_read)) {
+ retval = -EFAULT;
+ goto unlock_exit;
+ }
+
+ spin_lock_irq (&dev->read_buffer_lock);
+ dev->read_buffer_length -= bytes_to_read;
+ dev->read_packet_length -= bytes_to_read;
+ for (i=0; i<dev->read_buffer_length; i++) {
+ dev->read_buffer[i] = dev->read_buffer[i+bytes_to_read];
+ }
+ spin_unlock_irq (&dev->read_buffer_lock);
+
+ retval = bytes_to_read;
+
+unlock_exit:
+ /* unlock the device */
+ up (&dev->sem);
+
+exit:
+ dbg(2, "%s: leave, return value %d", __FUNCTION__, retval);
+ return retval;
+}
+
+
+/**
+ * tower_write
+ */
+static ssize_t tower_write (struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
+{
+ struct lego_usb_tower *dev;
+ size_t bytes_to_write;
+ int retval = 0;
+
+ dbg(2, "%s: enter, count = %Zd", __FUNCTION__, count);
+
+ dev = (struct lego_usb_tower *)file->private_data;
+
+ /* lock this object */
+ if (down_interruptible (&dev->sem)) {
+ retval = -ERESTARTSYS;
+ goto exit;
+ }
+
+ /* verify that the device wasn't unplugged */
+ if (dev->udev == NULL) {
+ retval = -ENODEV;
+ err("No device or device unplugged %d", retval);
+ goto unlock_exit;
+ }
+
+ /* verify that we actually have some data to write */
+ if (count == 0) {
+ dbg(1, "%s: write request of 0 bytes", __FUNCTION__);
+ goto unlock_exit;
+ }
+
+ /* wait until previous transfer is finished */
+ while (dev->interrupt_out_busy) {
+ if (file->f_flags & O_NONBLOCK) {
+ retval = -EAGAIN;
+ goto unlock_exit;
+ }
+ retval = wait_event_interruptible (dev->write_wait, !dev->interrupt_out_busy);
+ if (retval) {
+ goto unlock_exit;
+ }
+ }
+
+ /* write the data into interrupt_out_buffer from userspace */
+ bytes_to_write = min_t(int, count, write_buffer_size);
+ dbg(4, "%s: count = %Zd, bytes_to_write = %Zd", __FUNCTION__, count, bytes_to_write);
+
+ if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) {
+ retval = -EFAULT;
+ goto unlock_exit;
+ }
+
+ /* send off the urb */
+ usb_fill_int_urb(dev->interrupt_out_urb,
+ dev->udev,
+ usb_sndintpipe(dev->udev, dev->interrupt_out_endpoint->bEndpointAddress),
+ dev->interrupt_out_buffer,
+ bytes_to_write,
+ tower_interrupt_out_callback,
+ dev,
+ dev->interrupt_out_interval);
+
+ dev->interrupt_out_busy = 1;
+ wmb();
+
+ retval = usb_submit_urb (dev->interrupt_out_urb, GFP_KERNEL);
+ if (retval) {
+ dev->interrupt_out_busy = 0;
+ err("Couldn't submit interrupt_out_urb %d", retval);
+ goto unlock_exit;
+ }
+ retval = bytes_to_write;
+
+unlock_exit:
+ /* unlock the device */
+ up (&dev->sem);
+
+exit:
+ dbg(2, "%s: leave, return value %d", __FUNCTION__, retval);
+
+ return retval;
+}
+
+
+/**
+ * tower_interrupt_in_callback
+ */
+static void tower_interrupt_in_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
+ int retval;
+
+ dbg(4, "%s: enter, status %d", __FUNCTION__, urb->status);
+
+ lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
+
+ if (urb->status) {
+ if (urb->status == -ENOENT ||
+ urb->status == -ECONNRESET ||
+ urb->status == -ESHUTDOWN) {
+ goto exit;
+ } else {
+ dbg(1, "%s: nonzero status received: %d", __FUNCTION__, urb->status);
+ goto resubmit; /* maybe we can recover */
+ }
+ }
+
+ if (urb->actual_length > 0) {
+ spin_lock (&dev->read_buffer_lock);
+ if (dev->read_buffer_length + urb->actual_length < read_buffer_size) {
+ memcpy (dev->read_buffer + dev->read_buffer_length,
+ dev->interrupt_in_buffer,
+ urb->actual_length);
+ dev->read_buffer_length += urb->actual_length;
+ dev->read_last_arrival = jiffies;
+ dbg(3, "%s: received %d bytes", __FUNCTION__, urb->actual_length);
+ } else {
+ printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __FUNCTION__, urb->actual_length);
+ }
+ spin_unlock (&dev->read_buffer_lock);
+ }
+
+resubmit:
+ /* resubmit if we're still running */
+ if (dev->interrupt_in_running && dev->udev) {
+ retval = usb_submit_urb (dev->interrupt_in_urb, GFP_ATOMIC);
+ if (retval) {
+ err("%s: usb_submit_urb failed (%d)", __FUNCTION__, retval);
+ }
+ }
+
+exit:
+ dev->interrupt_in_done = 1;
+ wake_up_interruptible (&dev->read_wait);
+
+ lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
+ dbg(4, "%s: leave, status %d", __FUNCTION__, urb->status);
+}
+
+
+/**
+ * tower_interrupt_out_callback
+ */
+static void tower_interrupt_out_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
+
+ dbg(4, "%s: enter, status %d", __FUNCTION__, urb->status);
+ lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
+
+ /* sync/async unlink faults aren't errors */
+ if (urb->status && !(urb->status == -ENOENT ||
+ urb->status == -ECONNRESET ||
+ urb->status == -ESHUTDOWN)) {
+ dbg(1, "%s - nonzero write bulk status received: %d",
+ __FUNCTION__, urb->status);
+ }
+
+ dev->interrupt_out_busy = 0;
+ wake_up_interruptible(&dev->write_wait);
+
+ lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
+ dbg(4, "%s: leave, status %d", __FUNCTION__, urb->status);
+}
+
+
+/**
+ * tower_probe
+ *
+ * Called by the usb core when a new device is connected that it thinks
+ * this driver might be interested in.
+ */
+static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev(interface);
+ struct lego_usb_tower *dev = NULL;
+ struct usb_host_interface *iface_desc;
+ struct usb_endpoint_descriptor* endpoint;
+ struct tower_get_version_reply get_version_reply;
+ int i;
+ int retval = -ENOMEM;
+ int result;
+
+ dbg(2, "%s: enter", __FUNCTION__);
+
+ if (udev == NULL) {
+ info ("udev is NULL.");
+ }
+
+ /* allocate memory for our device state and intialize it */
+
+ dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
+
+ if (dev == NULL) {
+ err ("Out of memory");
+ goto exit;
+ }
+
+ init_MUTEX (&dev->sem);
+
+ dev->udev = udev;
+ dev->open_count = 0;
+
+ dev->read_buffer = NULL;
+ dev->read_buffer_length = 0;
+ dev->read_packet_length = 0;
+ spin_lock_init (&dev->read_buffer_lock);
+ dev->packet_timeout_jiffies = packet_timeout * HZ / 1000;
+ dev->read_last_arrival = jiffies;
+
+ init_waitqueue_head (&dev->read_wait);
+ init_waitqueue_head (&dev->write_wait);
+
+ dev->interrupt_in_buffer = NULL;
+ dev->interrupt_in_endpoint = NULL;
+ dev->interrupt_in_urb = NULL;
+ dev->interrupt_in_running = 0;
+ dev->interrupt_in_done = 0;
+
+ dev->interrupt_out_buffer = NULL;
+ dev->interrupt_out_endpoint = NULL;
+ dev->interrupt_out_urb = NULL;
+ dev->interrupt_out_busy = 0;
+
+ iface_desc = interface->cur_altsetting;
+
+ /* set up the endpoint information */
+ for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
+ endpoint = &iface_desc->endpoint[i].desc;
+
+ if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) &&
+ ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
+ dev->interrupt_in_endpoint = endpoint;
+ }
+
+ if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) &&
+ ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
+ dev->interrupt_out_endpoint = endpoint;
+ }
+ }
+ if(dev->interrupt_in_endpoint == NULL) {
+ err("interrupt in endpoint not found");
+ goto error;
+ }
+ if (dev->interrupt_out_endpoint == NULL) {
+ err("interrupt out endpoint not found");
+ goto error;
+ }
+
+ dev->read_buffer = kmalloc (read_buffer_size, GFP_KERNEL);
+ if (!dev->read_buffer) {
+ err("Couldn't allocate read_buffer");
+ goto error;
+ }
+ dev->interrupt_in_buffer = kmalloc (le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), GFP_KERNEL);
+ if (!dev->interrupt_in_buffer) {
+ err("Couldn't allocate interrupt_in_buffer");
+ goto error;
+ }
+ dev->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!dev->interrupt_in_urb) {
+ err("Couldn't allocate interrupt_in_urb");
+ goto error;
+ }
+ dev->interrupt_out_buffer = kmalloc (write_buffer_size, GFP_KERNEL);
+ if (!dev->interrupt_out_buffer) {
+ err("Couldn't allocate interrupt_out_buffer");
+ goto error;
+ }
+ dev->interrupt_out_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!dev->interrupt_out_urb) {
+ err("Couldn't allocate interrupt_out_urb");
+ goto error;
+ }
+ dev->interrupt_in_interval = interrupt_in_interval ? interrupt_in_interval : dev->interrupt_in_endpoint->bInterval;
+ dev->interrupt_out_interval = interrupt_out_interval ? interrupt_out_interval : dev->interrupt_out_endpoint->bInterval;
+
+ /* we can register the device now, as it is ready */
+ usb_set_intfdata (interface, dev);
+
+ retval = usb_register_dev (interface, &tower_class);
+
+ if (retval) {
+ /* something prevented us from registering this driver */
+ err ("Not able to get a minor for this device.");
+ usb_set_intfdata (interface, NULL);
+ goto error;
+ }
+ dev->minor = interface->minor;
+
+ /* let the user know what node this device is now attached to */
+ info ("LEGO USB Tower #%d now attached to major %d minor %d", (dev->minor - LEGO_USB_TOWER_MINOR_BASE), USB_MAJOR, dev->minor);
+
+ /* get the firmware version and log it */
+ result = usb_control_msg (udev,
+ usb_rcvctrlpipe(udev, 0),
+ LEGO_USB_TOWER_REQUEST_GET_VERSION,
+ USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_DEVICE,
+ 0,
+ 0,
+ &get_version_reply,
+ sizeof(get_version_reply),
+ 1000);
+ if (result < 0) {
+ err("LEGO USB Tower get version control request failed");
+ retval = result;
+ goto error;
+ }
+ info("LEGO USB Tower firmware version is %d.%d build %d",
+ get_version_reply.major,
+ get_version_reply.minor,
+ le16_to_cpu(get_version_reply.build_no));
+
+
+exit:
+ dbg(2, "%s: leave, return value 0x%.8lx (dev)", __FUNCTION__, (long) dev);
+
+ return retval;
+
+error:
+ tower_delete(dev);
+ return retval;
+}
+
+
+/**
+ * tower_disconnect
+ *
+ * Called by the usb core when the device is removed from the system.
+ */
+static void tower_disconnect (struct usb_interface *interface)
+{
+ struct lego_usb_tower *dev;
+ int minor;
+
+ dbg(2, "%s: enter", __FUNCTION__);
+
+ down (&disconnect_sem);
+
+ dev = usb_get_intfdata (interface);
+ usb_set_intfdata (interface, NULL);
+
+
+ down (&dev->sem);
+
+ minor = dev->minor;
+
+ /* give back our minor */
+ usb_deregister_dev (interface, &tower_class);
+
+ /* if the device is not opened, then we clean up right now */
+ if (!dev->open_count) {
+ up (&dev->sem);
+ tower_delete (dev);
+ } else {
+ dev->udev = NULL;
+ up (&dev->sem);
+ }
+
+ up (&disconnect_sem);
+
+ info("LEGO USB Tower #%d now disconnected", (minor - LEGO_USB_TOWER_MINOR_BASE));
+
+ dbg(2, "%s: leave", __FUNCTION__);
+}
+
+
+
+/**
+ * lego_usb_tower_init
+ */
+static int __init lego_usb_tower_init(void)
+{
+ int result;
+ int retval = 0;
+
+ dbg(2, "%s: enter", __FUNCTION__);
+
+ /* register this driver with the USB subsystem */
+ result = usb_register(&tower_driver);
+ if (result < 0) {
+ err("usb_register failed for the "__FILE__" driver. Error number %d", result);
+ retval = -1;
+ goto exit;
+ }
+
+ info(DRIVER_DESC " " DRIVER_VERSION);
+
+exit:
+ dbg(2, "%s: leave, return value %d", __FUNCTION__, retval);
+
+ return retval;
+}
+
+
+/**
+ * lego_usb_tower_exit
+ */
+static void __exit lego_usb_tower_exit(void)
+{
+ dbg(2, "%s: enter", __FUNCTION__);
+
+ /* deregister this driver with the USB subsystem */
+ usb_deregister (&tower_driver);
+
+ dbg(2, "%s: leave", __FUNCTION__);
+}
+
+module_init (lego_usb_tower_init);
+module_exit (lego_usb_tower_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c
new file mode 100644
index 000000000000..ddbf8e992368
--- /dev/null
+++ b/drivers/usb/misc/phidgetkit.c
@@ -0,0 +1,586 @@
+/*
+ * USB PhidgetInterfaceKit driver 1.0
+ *
+ * Copyright (C) 2004 Sean Young <sean@mess.org>
+ * Copyright (C) 2004 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This is a driver for the USB PhidgetInterfaceKit.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+
+#define DRIVER_AUTHOR "Sean Young <sean@mess.org>"
+#define DRIVER_DESC "USB PhidgetInterfaceKit Driver"
+
+#define USB_VENDOR_ID_GLAB 0x06c2
+#define USB_DEVICE_ID_INTERFACEKIT004 0x0040
+#define USB_DEVICE_ID_INTERFACEKIT888 0x0045
+#define USB_DEVICE_ID_INTERFACEKIT047 0x0051
+#define USB_DEVICE_ID_INTERFACEKIT088 0x0053
+
+#define USB_VENDOR_ID_WISEGROUP 0x0925
+#define USB_DEVICE_ID_INTERFACEKIT884 0x8201
+
+#define MAX_INTERFACES 8
+
+struct driver_interfacekit {
+ int sensors;
+ int inputs;
+ int outputs;
+ int has_lcd;
+};
+#define ifkit(_sensors, _inputs, _outputs, _lcd) \
+static struct driver_interfacekit ph_##_sensors##_inputs##_outputs = { \
+ .sensors = _sensors, \
+ .inputs = _inputs, \
+ .outputs = _outputs, \
+ .has_lcd = _lcd, \
+};
+ifkit(0, 0, 4, 0);
+ifkit(8, 8, 8, 0);
+ifkit(0, 4, 7, 1);
+ifkit(8, 8, 4, 0);
+ifkit(0, 8, 8, 1);
+
+struct phidget_interfacekit {
+ struct usb_device *udev;
+ struct usb_interface *intf;
+ struct driver_interfacekit *ifkit;
+ int outputs[MAX_INTERFACES];
+ int inputs[MAX_INTERFACES];
+ int sensors[MAX_INTERFACES];
+ u8 lcd_files_on;
+
+ struct urb *irq;
+ unsigned char *data;
+ dma_addr_t data_dma;
+};
+
+static struct usb_device_id id_table[] = {
+ {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT004),
+ .driver_info = (kernel_ulong_t)&ph_004},
+ {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT888),
+ .driver_info = (kernel_ulong_t)&ph_888},
+ {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT047),
+ .driver_info = (kernel_ulong_t)&ph_047},
+ {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT088),
+ .driver_info = (kernel_ulong_t)&ph_088},
+ {USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_INTERFACEKIT884),
+ .driver_info = (kernel_ulong_t)&ph_884},
+ {}
+};
+MODULE_DEVICE_TABLE(usb, id_table);
+
+static int change_outputs(struct phidget_interfacekit *kit, int output_num, int enable)
+{
+ unsigned char *buffer;
+ int retval;
+ int n;
+
+ buffer = kmalloc(4, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&kit->udev->dev, "%s - out of memory\n",
+ __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ kit->outputs[output_num] = enable;
+ memset(buffer, 0, 4);
+ for (n=0; n<8; n++) {
+ if (kit->outputs[n]) {
+ buffer[0] |= 1 << n;
+ }
+ }
+
+ dev_dbg(&kit->udev->dev, "sending data: %02x\n", buffer[0]);
+
+ retval = usb_control_msg(kit->udev,
+ usb_sndctrlpipe(kit->udev, 0),
+ 0x09, 0x21, 0x0200, 0x0000, buffer, 4, 2000);
+
+ if (retval != 4)
+ dev_err(&kit->udev->dev, "usb_control_msg returned %d\n",
+ retval);
+ kfree(buffer);
+
+ return retval < 0 ? retval : 0;
+}
+
+static int change_string(struct phidget_interfacekit *kit, const char *display, unsigned char row)
+{
+ unsigned char *buffer;
+ unsigned char *form_buffer;
+ int retval = -ENOMEM;
+ int i,j, len, buf_ptr;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ form_buffer = kmalloc(30, GFP_KERNEL);
+ if ((!buffer) || (!form_buffer)) {
+ dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__);
+ goto exit;
+ }
+
+ len = strlen(display);
+ if (len > 20)
+ len = 20;
+
+ dev_dbg(&kit->udev->dev, "Setting LCD line %d to %s\n", row, display);
+
+ form_buffer[0] = row * 0x40 + 0x80;
+ form_buffer[1] = 0x02;
+ buf_ptr = 2;
+ for (i = 0; i<len; i++)
+ form_buffer[buf_ptr++] = display[i];
+
+ for (i = 0; i < (20 - len); i++)
+ form_buffer[buf_ptr++] = 0x20;
+ form_buffer[buf_ptr++] = 0x01;
+ form_buffer[buf_ptr++] = row * 0x40 + 0x80 + strlen(display);
+
+ for (i = 0; i < buf_ptr; i += 7) {
+ if ((buf_ptr - i) > 7)
+ len = 7;
+ else
+ len = (buf_ptr - i);
+ for (j = 0; j < len; j++)
+ buffer[j] = form_buffer[i + j];
+ buffer[7] = len;
+
+ retval = usb_control_msg(kit->udev,
+ usb_sndctrlpipe(kit->udev, 0),
+ 0x09, 0x21, 0x0200, 0x0000, buffer, 8, 2000);
+ if (retval < 0)
+ goto exit;
+ }
+
+ retval = 0;
+exit:
+ kfree(buffer);
+ kfree(form_buffer);
+
+ return retval;
+}
+
+#define set_lcd_line(number) \
+static ssize_t lcd_line_##number(struct device *dev, const char *buf, size_t count) \
+{ \
+ struct usb_interface *intf = to_usb_interface(dev); \
+ struct phidget_interfacekit *kit = usb_get_intfdata(intf); \
+ change_string(kit, buf, number - 1); \
+ return count; \
+} \
+static DEVICE_ATTR(lcd_line_##number, S_IWUGO, NULL, lcd_line_##number);
+set_lcd_line(1);
+set_lcd_line(2);
+
+static ssize_t set_backlight(struct device *dev, const char *buf, size_t count)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct phidget_interfacekit *kit = usb_get_intfdata(intf);
+ int enabled;
+ unsigned char *buffer;
+ int retval = -ENOMEM;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__);
+ goto exit;
+ }
+
+ if (sscanf(buf, "%d", &enabled) < 1) {
+ retval = -EINVAL;
+ goto exit;
+ }
+ memset(buffer, 0x00, 8);
+ if (enabled)
+ buffer[0] = 0x01;
+ buffer[7] = 0x11;
+
+ dev_dbg(&kit->udev->dev, "Setting backlight to %s\n", enabled ? "on" : "off");
+
+ retval = usb_control_msg(kit->udev,
+ usb_sndctrlpipe(kit->udev, 0),
+ 0x09, 0x21, 0x0200, 0x0000, buffer, 8, 2000);
+ if (retval < 0)
+ goto exit;
+
+ retval = count;
+exit:
+ kfree(buffer);
+ return retval;
+}
+static DEVICE_ATTR(backlight, S_IWUGO, NULL, set_backlight);
+
+static void remove_lcd_files(struct phidget_interfacekit *kit)
+{
+ if (kit->lcd_files_on) {
+ dev_dbg(&kit->udev->dev, "Removing lcd files\n");
+ device_remove_file(&kit->intf->dev, &dev_attr_lcd_line_1);
+ device_remove_file(&kit->intf->dev, &dev_attr_lcd_line_2);
+ device_remove_file(&kit->intf->dev, &dev_attr_backlight);
+ }
+}
+
+static ssize_t enable_lcd_files(struct device *dev, const char *buf, size_t count)
+{
+ struct usb_interface *intf = to_usb_interface(dev);
+ struct phidget_interfacekit *kit = usb_get_intfdata(intf);
+ int enable;
+
+ if (kit->ifkit->has_lcd == 0)
+ return -ENODEV;
+
+ if (sscanf(buf, "%d", &enable) < 1)
+ return -EINVAL;
+
+ if (enable) {
+ if (!kit->lcd_files_on) {
+ dev_dbg(&kit->udev->dev, "Adding lcd files\n");
+ device_create_file(&kit->intf->dev, &dev_attr_lcd_line_1);
+ device_create_file(&kit->intf->dev, &dev_attr_lcd_line_2);
+ device_create_file(&kit->intf->dev, &dev_attr_backlight);
+ kit->lcd_files_on = 1;
+ }
+ } else {
+ if (kit->lcd_files_on) {
+ remove_lcd_files(kit);
+ kit->lcd_files_on = 0;
+ }
+ }
+
+ return count;
+}
+static DEVICE_ATTR(lcd, S_IWUGO, NULL, enable_lcd_files);
+
+static void interfacekit_irq(struct urb *urb, struct pt_regs *regs)
+{
+ struct phidget_interfacekit *kit = urb->context;
+ unsigned char *buffer = kit->data;
+ int status;
+ int n;
+
+ switch (urb->status) {
+ case 0: /* success */
+ break;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -ESHUTDOWN:
+ return;
+ /* -EPIPE: should clear the halt */
+ default: /* error */
+ goto resubmit;
+ }
+
+ for (n=0; n<8; n++) {
+ kit->inputs[n] = buffer[1] & (1 << n) ? 1 : 0;
+ }
+
+ if (buffer[0] & 1) {
+ kit->sensors[4] = buffer[2] + (buffer[3] & 0x0f) * 256;
+ kit->sensors[5] = buffer[4] + (buffer[3] & 0xf0) * 16;
+ kit->sensors[6] = buffer[5] + (buffer[6] & 0x0f) * 256;
+ kit->sensors[7] = buffer[7] + (buffer[6] & 0xf0) * 16;
+ } else {
+ kit->sensors[0] = buffer[2] + (buffer[3] & 0x0f) * 256;
+ kit->sensors[1] = buffer[4] + (buffer[3] & 0xf0) * 16;
+ kit->sensors[2] = buffer[5] + (buffer[6] & 0x0f) * 256;
+ kit->sensors[3] = buffer[7] + (buffer[6] & 0xf0) * 16;
+ }
+
+resubmit:
+ status = usb_submit_urb(urb, SLAB_ATOMIC);
+ if (status)
+ err("can't resubmit intr, %s-%s/interfacekit0, status %d",
+ kit->udev->bus->bus_name,
+ kit->udev->devpath, status);
+}
+
+#define show_set_output(value) \
+static ssize_t set_output##value(struct device *dev, const char *buf, \
+ size_t count) \
+{ \
+ struct usb_interface *intf = to_usb_interface(dev); \
+ struct phidget_interfacekit *kit = usb_get_intfdata(intf); \
+ int enabled; \
+ int retval; \
+ \
+ if (sscanf(buf, "%d", &enabled) < 1) { \
+ return -EINVAL; \
+ } \
+ \
+ retval = change_outputs(kit, value - 1, enabled ? 1 : 0); \
+ \
+ return retval ? retval : count; \
+} \
+ \
+static ssize_t show_output##value(struct device *dev, char *buf) \
+{ \
+ struct usb_interface *intf = to_usb_interface(dev); \
+ struct phidget_interfacekit *kit = usb_get_intfdata(intf); \
+ \
+ return sprintf(buf, "%d\n", kit->outputs[value - 1]); \
+} \
+static DEVICE_ATTR(output##value, S_IWUGO | S_IRUGO, \
+ show_output##value, set_output##value);
+show_set_output(1);
+show_set_output(2);
+show_set_output(3);
+show_set_output(4);
+show_set_output(5);
+show_set_output(6);
+show_set_output(7);
+show_set_output(8); /* should be MAX_INTERFACES - 1 */
+
+#define show_input(value) \
+static ssize_t show_input##value(struct device *dev, char *buf) \
+{ \
+ struct usb_interface *intf = to_usb_interface(dev); \
+ struct phidget_interfacekit *kit = usb_get_intfdata(intf); \
+ \
+ return sprintf(buf, "%d\n", kit->inputs[value - 1]); \
+} \
+static DEVICE_ATTR(input##value, S_IRUGO, show_input##value, NULL);
+
+show_input(1);
+show_input(2);
+show_input(3);
+show_input(4);
+show_input(5);
+show_input(6);
+show_input(7);
+show_input(8); /* should be MAX_INTERFACES - 1 */
+
+#define show_sensor(value) \
+static ssize_t show_sensor##value(struct device *dev, char *buf) \
+{ \
+ struct usb_interface *intf = to_usb_interface(dev); \
+ struct phidget_interfacekit *kit = usb_get_intfdata(intf); \
+ \
+ return sprintf(buf, "%d\n", kit->sensors[value - 1]); \
+} \
+static DEVICE_ATTR(sensor##value, S_IRUGO, show_sensor##value, NULL);
+
+show_sensor(1);
+show_sensor(2);
+show_sensor(3);
+show_sensor(4);
+show_sensor(5);
+show_sensor(6);
+show_sensor(7);
+show_sensor(8); /* should be MAX_INTERFACES - 1 */
+
+static int interfacekit_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct usb_host_interface *interface;
+ struct usb_endpoint_descriptor *endpoint;
+ struct phidget_interfacekit *kit;
+ struct driver_interfacekit *ifkit;
+ int pipe, maxp;
+
+ ifkit = (struct driver_interfacekit *)id->driver_info;
+ if (!ifkit)
+ return -ENODEV;
+
+ interface = intf->cur_altsetting;
+ if (interface->desc.bNumEndpoints != 1)
+ return -ENODEV;
+
+ endpoint = &interface->endpoint[0].desc;
+ if (!(endpoint->bEndpointAddress & 0x80))
+ return -ENODEV;
+ /*
+ * bmAttributes
+ */
+ pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
+ maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+
+ kit = kmalloc(sizeof(*kit), GFP_KERNEL);
+ if (kit == NULL) {
+ dev_err(&intf->dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ memset(kit, 0, sizeof(*kit));
+ kit->ifkit = ifkit;
+
+ kit->data = usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &kit->data_dma);
+ if (!kit->data) {
+ kfree(kit);
+ return -ENOMEM;
+ }
+
+ kit->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!kit->irq) {
+ usb_buffer_free(dev, 8, kit->data, kit->data_dma);
+ kfree(kit);
+ return -ENOMEM;
+ }
+
+ kit->udev = usb_get_dev(dev);
+ kit->intf = intf;
+ usb_fill_int_urb(kit->irq, kit->udev, pipe, kit->data,
+ (maxp > 8 ? 8 : maxp),
+ interfacekit_irq, kit, endpoint->bInterval);
+ kit->irq->transfer_dma = kit->data_dma;
+ kit->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ usb_set_intfdata(intf, kit);
+
+ if (usb_submit_urb(kit->irq, GFP_KERNEL)) {
+ return -EIO;
+ }
+
+ if (ifkit->outputs >= 4) {
+ device_create_file(&intf->dev, &dev_attr_output1);
+ device_create_file(&intf->dev, &dev_attr_output2);
+ device_create_file(&intf->dev, &dev_attr_output3);
+ device_create_file(&intf->dev, &dev_attr_output4);
+ }
+ if (ifkit->outputs == 8) {
+ device_create_file(&intf->dev, &dev_attr_output5);
+ device_create_file(&intf->dev, &dev_attr_output6);
+ device_create_file(&intf->dev, &dev_attr_output7);
+ device_create_file(&intf->dev, &dev_attr_output8);
+ }
+
+ if (ifkit->inputs >= 4) {
+ device_create_file(&intf->dev, &dev_attr_input1);
+ device_create_file(&intf->dev, &dev_attr_input2);
+ device_create_file(&intf->dev, &dev_attr_input3);
+ device_create_file(&intf->dev, &dev_attr_input4);
+ }
+ if (ifkit->inputs == 8) {
+ device_create_file(&intf->dev, &dev_attr_input5);
+ device_create_file(&intf->dev, &dev_attr_input6);
+ device_create_file(&intf->dev, &dev_attr_input7);
+ device_create_file(&intf->dev, &dev_attr_input8);
+ }
+
+ if (ifkit->sensors >= 4) {
+ device_create_file(&intf->dev, &dev_attr_sensor1);
+ device_create_file(&intf->dev, &dev_attr_sensor2);
+ device_create_file(&intf->dev, &dev_attr_sensor3);
+ device_create_file(&intf->dev, &dev_attr_sensor4);
+ }
+ if (ifkit->sensors >= 7) {
+ device_create_file(&intf->dev, &dev_attr_sensor5);
+ device_create_file(&intf->dev, &dev_attr_sensor6);
+ device_create_file(&intf->dev, &dev_attr_sensor7);
+ }
+ if (ifkit->sensors == 8) {
+ device_create_file(&intf->dev, &dev_attr_sensor8);
+ }
+
+ if (ifkit->has_lcd)
+ device_create_file(&intf->dev, &dev_attr_lcd);
+
+ dev_info(&intf->dev, "USB PhidgetInterfaceKit %d/%d/%d attached\n",
+ ifkit->sensors, ifkit->inputs, ifkit->outputs);
+
+ return 0;
+}
+
+static void interfacekit_disconnect(struct usb_interface *interface)
+{
+ struct phidget_interfacekit *kit;
+
+ kit = usb_get_intfdata(interface);
+ usb_set_intfdata(interface, NULL);
+ if (!kit)
+ return;
+
+ if (kit->ifkit->outputs >= 4) {
+ device_remove_file(&interface->dev, &dev_attr_output1);
+ device_remove_file(&interface->dev, &dev_attr_output2);
+ device_remove_file(&interface->dev, &dev_attr_output3);
+ device_remove_file(&interface->dev, &dev_attr_output4);
+ }
+ if (kit->ifkit->outputs == 8) {
+ device_remove_file(&interface->dev, &dev_attr_output5);
+ device_remove_file(&interface->dev, &dev_attr_output6);
+ device_remove_file(&interface->dev, &dev_attr_output7);
+ device_remove_file(&interface->dev, &dev_attr_output8);
+ }
+
+ if (kit->ifkit->inputs >= 4) {
+ device_remove_file(&interface->dev, &dev_attr_input1);
+ device_remove_file(&interface->dev, &dev_attr_input2);
+ device_remove_file(&interface->dev, &dev_attr_input3);
+ device_remove_file(&interface->dev, &dev_attr_input4);
+ }
+ if (kit->ifkit->inputs == 8) {
+ device_remove_file(&interface->dev, &dev_attr_input5);
+ device_remove_file(&interface->dev, &dev_attr_input6);
+ device_remove_file(&interface->dev, &dev_attr_input7);
+ device_remove_file(&interface->dev, &dev_attr_input8);
+ }
+
+ if (kit->ifkit->sensors >= 4) {
+ device_remove_file(&interface->dev, &dev_attr_sensor1);
+ device_remove_file(&interface->dev, &dev_attr_sensor2);
+ device_remove_file(&interface->dev, &dev_attr_sensor3);
+ device_remove_file(&interface->dev, &dev_attr_sensor4);
+ }
+ if (kit->ifkit->sensors >= 7) {
+ device_remove_file(&interface->dev, &dev_attr_sensor5);
+ device_remove_file(&interface->dev, &dev_attr_sensor6);
+ device_remove_file(&interface->dev, &dev_attr_sensor7);
+ }
+ if (kit->ifkit->sensors == 8) {
+ device_remove_file(&interface->dev, &dev_attr_sensor8);
+ }
+ if (kit->ifkit->has_lcd)
+ device_remove_file(&interface->dev, &dev_attr_lcd);
+
+ dev_info(&interface->dev, "USB PhidgetInterfaceKit %d/%d/%d detached\n",
+ kit->ifkit->sensors, kit->ifkit->inputs, kit->ifkit->outputs);
+
+ usb_kill_urb(kit->irq);
+ usb_free_urb(kit->irq);
+ usb_buffer_free(kit->udev, 8, kit->data, kit->data_dma);
+
+ usb_put_dev(kit->udev);
+ kfree(kit);
+}
+
+static struct usb_driver interfacekit_driver = {
+ .owner = THIS_MODULE,
+ .name = "phidgetkit",
+ .probe = interfacekit_probe,
+ .disconnect = interfacekit_disconnect,
+ .id_table = id_table
+};
+
+static int __init interfacekit_init(void)
+{
+ int retval = 0;
+
+ retval = usb_register(&interfacekit_driver);
+ if (retval)
+ err("usb_register failed. Error number %d", retval);
+
+ return retval;
+}
+
+static void __exit interfacekit_exit(void)
+{
+ usb_deregister(&interfacekit_driver);
+}
+
+module_init(interfacekit_init);
+module_exit(interfacekit_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c
new file mode 100644
index 000000000000..4bd291502a3c
--- /dev/null
+++ b/drivers/usb/misc/phidgetservo.c
@@ -0,0 +1,342 @@
+/*
+ * USB PhidgetServo driver 1.0
+ *
+ * Copyright (C) 2004 Sean Young <sean@mess.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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This is a driver for the USB PhidgetServo version 2.0 and 3.0 servo
+ * controllers available at: http://www.phidgets.com/
+ *
+ * Note that the driver takes input as: degrees.minutes
+ *
+ * CAUTION: Generally you should use 0 < degrees < 180 as anything else
+ * is probably beyond the range of your servo and may damage it.
+ *
+ * Jun 16, 2004: Sean Young <sean@mess.org>
+ * - cleanups
+ * - was using memory after kfree()
+ * Aug 8, 2004: Sean Young <sean@mess.org>
+ * - set the highest angle as high as the hardware allows, there are
+ * some odd servos out there
+ *
+ */
+
+#include <linux/config.h>
+#ifdef CONFIG_USB_DEBUG
+#define DEBUG 1
+#endif
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+
+#define DRIVER_AUTHOR "Sean Young <sean@mess.org>"
+#define DRIVER_DESC "USB PhidgetServo Driver"
+
+#define VENDOR_ID_GLAB 0x06c2
+#define DEVICE_ID_GLAB_PHIDGETSERVO_QUAD 0x0038
+#define DEVICE_ID_GLAB_PHIDGETSERVO_UNI 0x0039
+
+#define VENDOR_ID_WISEGROUP 0x0925
+#define VENDOR_ID_WISEGROUP_PHIDGETSERVO_QUAD 0x8101
+#define VENDOR_ID_WISEGROUP_PHIDGETSERVO_UNI 0x8104
+
+#define SERVO_VERSION_30 0x01
+#define SERVO_COUNT_QUAD 0x02
+
+static struct usb_device_id id_table[] = {
+ {
+ USB_DEVICE(VENDOR_ID_GLAB, DEVICE_ID_GLAB_PHIDGETSERVO_QUAD),
+ .driver_info = SERVO_VERSION_30 | SERVO_COUNT_QUAD
+ },
+ {
+ USB_DEVICE(VENDOR_ID_GLAB, DEVICE_ID_GLAB_PHIDGETSERVO_UNI),
+ .driver_info = SERVO_VERSION_30
+ },
+ {
+ USB_DEVICE(VENDOR_ID_WISEGROUP,
+ VENDOR_ID_WISEGROUP_PHIDGETSERVO_QUAD),
+ .driver_info = SERVO_COUNT_QUAD
+ },
+ {
+ USB_DEVICE(VENDOR_ID_WISEGROUP,
+ VENDOR_ID_WISEGROUP_PHIDGETSERVO_UNI),
+ .driver_info = 0
+ },
+ {}
+};
+
+MODULE_DEVICE_TABLE(usb, id_table);
+
+struct phidget_servo {
+ struct usb_device *udev;
+ ulong type;
+ int pulse[4];
+ int degrees[4];
+ int minutes[4];
+};
+
+static int
+change_position_v30(struct phidget_servo *servo, int servo_no, int degrees,
+ int minutes)
+{
+ int retval;
+ unsigned char *buffer;
+
+ if (degrees < -23 || degrees > 362)
+ return -EINVAL;
+
+ buffer = kmalloc(6, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&servo->udev->dev, "%s - out of memory\n",
+ __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ /*
+ * pulse = 0 - 4095
+ * angle = 0 - 180 degrees
+ *
+ * pulse = angle * 10.6 + 243.8
+ */
+ servo->pulse[servo_no] = ((degrees*60 + minutes)*106 + 2438*60)/600;
+ servo->degrees[servo_no]= degrees;
+ servo->minutes[servo_no]= minutes;
+
+ /*
+ * The PhidgetServo v3.0 is controlled by sending 6 bytes,
+ * 4 * 12 bits for each servo.
+ *
+ * low = lower 8 bits pulse
+ * high = higher 4 bits pulse
+ *
+ * offset bits
+ * +---+-----------------+
+ * | 0 | low 0 |
+ * +---+--------+--------+
+ * | 1 | high 1 | high 0 |
+ * +---+--------+--------+
+ * | 2 | low 1 |
+ * +---+-----------------+
+ * | 3 | low 2 |
+ * +---+--------+--------+
+ * | 4 | high 3 | high 2 |
+ * +---+--------+--------+
+ * | 5 | low 3 |
+ * +---+-----------------+
+ */
+
+ buffer[0] = servo->pulse[0] & 0xff;
+ buffer[1] = (servo->pulse[0] >> 8 & 0x0f)
+ | (servo->pulse[1] >> 4 & 0xf0);
+ buffer[2] = servo->pulse[1] & 0xff;
+ buffer[3] = servo->pulse[2] & 0xff;
+ buffer[4] = (servo->pulse[2] >> 8 & 0x0f)
+ | (servo->pulse[3] >> 4 & 0xf0);
+ buffer[5] = servo->pulse[3] & 0xff;
+
+ dev_dbg(&servo->udev->dev,
+ "data: %02x %02x %02x %02x %02x %02x\n",
+ buffer[0], buffer[1], buffer[2],
+ buffer[3], buffer[4], buffer[5]);
+
+ retval = usb_control_msg(servo->udev,
+ usb_sndctrlpipe(servo->udev, 0),
+ 0x09, 0x21, 0x0200, 0x0000, buffer, 6, 2000);
+
+ kfree(buffer);
+
+ return retval;
+}
+
+static int
+change_position_v20(struct phidget_servo *servo, int servo_no, int degrees,
+ int minutes)
+{
+ int retval;
+ unsigned char *buffer;
+
+ if (degrees < -23 || degrees > 278)
+ return -EINVAL;
+
+ buffer = kmalloc(2, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&servo->udev->dev, "%s - out of memory\n",
+ __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ /*
+ * angle = 0 - 180 degrees
+ * pulse = angle + 23
+ */
+ servo->pulse[servo_no]= degrees + 23;
+ servo->degrees[servo_no]= degrees;
+ servo->minutes[servo_no]= 0;
+
+ /*
+ * The PhidgetServo v2.0 is controlled by sending two bytes. The
+ * first byte is the servo number xor'ed with 2:
+ *
+ * servo 0 = 2
+ * servo 1 = 3
+ * servo 2 = 0
+ * servo 3 = 1
+ *
+ * The second byte is the position.
+ */
+
+ buffer[0] = servo_no ^ 2;
+ buffer[1] = servo->pulse[servo_no];
+
+ dev_dbg(&servo->udev->dev, "data: %02x %02x\n", buffer[0], buffer[1]);
+
+ retval = usb_control_msg(servo->udev,
+ usb_sndctrlpipe(servo->udev, 0),
+ 0x09, 0x21, 0x0200, 0x0000, buffer, 2, 2000);
+
+ kfree(buffer);
+
+ return retval;
+}
+
+#define show_set(value) \
+static ssize_t set_servo##value (struct device *dev, \
+ const char *buf, size_t count) \
+{ \
+ int degrees, minutes, retval; \
+ struct usb_interface *intf = to_usb_interface (dev); \
+ struct phidget_servo *servo = usb_get_intfdata (intf); \
+ \
+ minutes = 0; \
+ /* must at least convert degrees */ \
+ if (sscanf (buf, "%d.%d", &degrees, &minutes) < 1) { \
+ return -EINVAL; \
+ } \
+ \
+ if (minutes < 0 || minutes > 59) \
+ return -EINVAL; \
+ \
+ if (servo->type & SERVO_VERSION_30) \
+ retval = change_position_v30 (servo, value, degrees, \
+ minutes); \
+ else \
+ retval = change_position_v20 (servo, value, degrees, \
+ minutes); \
+ \
+ return retval < 0 ? retval : count; \
+} \
+ \
+static ssize_t show_servo##value (struct device *dev, char *buf) \
+{ \
+ struct usb_interface *intf = to_usb_interface (dev); \
+ struct phidget_servo *servo = usb_get_intfdata (intf); \
+ \
+ return sprintf (buf, "%d.%02d\n", servo->degrees[value], \
+ servo->minutes[value]); \
+} \
+static DEVICE_ATTR(servo##value, S_IWUGO | S_IRUGO, \
+ show_servo##value, set_servo##value);
+
+show_set(0);
+show_set(1);
+show_set(2);
+show_set(3);
+
+static int
+servo_probe(struct usb_interface *interface, const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev(interface);
+ struct phidget_servo *dev;
+
+ dev = kmalloc(sizeof (struct phidget_servo), GFP_KERNEL);
+ if (dev == NULL) {
+ dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ memset(dev, 0x00, sizeof (*dev));
+
+ dev->udev = usb_get_dev(udev);
+ dev->type = id->driver_info;
+ usb_set_intfdata(interface, dev);
+
+ device_create_file(&interface->dev, &dev_attr_servo0);
+ if (dev->type & SERVO_COUNT_QUAD) {
+ device_create_file(&interface->dev, &dev_attr_servo1);
+ device_create_file(&interface->dev, &dev_attr_servo2);
+ device_create_file(&interface->dev, &dev_attr_servo3);
+ }
+
+ dev_info(&interface->dev, "USB %d-Motor PhidgetServo v%d.0 attached\n",
+ dev->type & SERVO_COUNT_QUAD ? 4 : 1,
+ dev->type & SERVO_VERSION_30 ? 3 : 2);
+
+ if(!(dev->type & SERVO_VERSION_30))
+ dev_info(&interface->dev,
+ "WARNING: v2.0 not tested! Please report if it works.\n");
+
+ return 0;
+}
+
+static void
+servo_disconnect(struct usb_interface *interface)
+{
+ struct phidget_servo *dev;
+
+ dev = usb_get_intfdata(interface);
+ usb_set_intfdata(interface, NULL);
+
+ device_remove_file(&interface->dev, &dev_attr_servo0);
+ if (dev->type & SERVO_COUNT_QUAD) {
+ device_remove_file(&interface->dev, &dev_attr_servo1);
+ device_remove_file(&interface->dev, &dev_attr_servo2);
+ device_remove_file(&interface->dev, &dev_attr_servo3);
+ }
+
+ usb_put_dev(dev->udev);
+
+ dev_info(&interface->dev, "USB %d-Motor PhidgetServo v%d.0 detached\n",
+ dev->type & SERVO_COUNT_QUAD ? 4 : 1,
+ dev->type & SERVO_VERSION_30 ? 3 : 2);
+
+ kfree(dev);
+}
+
+static struct usb_driver servo_driver = {
+ .owner = THIS_MODULE,
+ .name = "phidgetservo",
+ .probe = servo_probe,
+ .disconnect = servo_disconnect,
+ .id_table = id_table
+};
+
+static int __init
+phidget_servo_init(void)
+{
+ int retval;
+
+ retval = usb_register(&servo_driver);
+ if (retval)
+ err("usb_register failed. Error number %d", retval);
+
+ return retval;
+}
+
+static void __exit
+phidget_servo_exit(void)
+{
+ usb_deregister(&servo_driver);
+}
+
+module_init(phidget_servo_init);
+module_exit(phidget_servo_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
new file mode 100644
index 000000000000..26f77e29c7a6
--- /dev/null
+++ b/drivers/usb/misc/rio500.c
@@ -0,0 +1,563 @@
+/* -*- linux-c -*- */
+
+/*
+ * Driver for USB Rio 500
+ *
+ * Cesar Miquel (miquel@df.uba.ar)
+ *
+ * based on hp_scanner.c by 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
+ * 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.
+ *
+ * Based upon mouse.c (Brad Keryan) and printer.c (Michael Gee).
+ *
+ * Changelog:
+ * 30/05/2003 replaced lock/unlock kernel with up/down
+ * Daniele Bellucci bellucda@tiscali.it
+ * */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/random.h>
+#include <linux/poll.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/usb.h>
+#include <linux/smp_lock.h>
+#include <linux/wait.h>
+
+#include "rio500_usb.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.1"
+#define DRIVER_AUTHOR "Cesar Miquel <miquel@df.uba.ar>"
+#define DRIVER_DESC "USB Rio 500 driver"
+
+#define RIO_MINOR 64
+
+/* stall/wait timeout for rio */
+#define NAK_TIMEOUT (HZ)
+
+#define IBUF_SIZE 0x1000
+
+/* Size of the rio buffer */
+#define OBUF_SIZE 0x10000
+
+struct rio_usb_data {
+ struct usb_device *rio_dev; /* init: probe_rio */
+ unsigned int ifnum; /* Interface number of the USB device */
+ int isopen; /* nz if open */
+ int present; /* Device is present on the bus */
+ char *obuf, *ibuf; /* transfer buffers */
+ char bulk_in_ep, bulk_out_ep; /* Endpoint assignments */
+ wait_queue_head_t wait_q; /* for timeouts */
+ struct semaphore lock; /* general race avoidance */
+};
+
+static struct rio_usb_data rio_instance;
+
+static int open_rio(struct inode *inode, struct file *file)
+{
+ struct rio_usb_data *rio = &rio_instance;
+
+ down(&(rio->lock));
+
+ if (rio->isopen || !rio->present) {
+ up(&(rio->lock));
+ return -EBUSY;
+ }
+ rio->isopen = 1;
+
+ init_waitqueue_head(&rio->wait_q);
+
+ up(&(rio->lock));
+
+ info("Rio opened.");
+
+ return 0;
+}
+
+static int close_rio(struct inode *inode, struct file *file)
+{
+ struct rio_usb_data *rio = &rio_instance;
+
+ rio->isopen = 0;
+
+ info("Rio closed.");
+ return 0;
+}
+
+static int
+ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd,
+ unsigned long arg)
+{
+ struct RioCommand rio_cmd;
+ struct rio_usb_data *rio = &rio_instance;
+ void __user *data;
+ unsigned char *buffer;
+ int result, requesttype;
+ int retries;
+ int retval=0;
+
+ down(&(rio->lock));
+ /* Sanity check to make sure rio is connected, powered, etc */
+ if ( rio == NULL ||
+ rio->present == 0 ||
+ rio->rio_dev == NULL )
+ {
+ retval = -ENODEV;
+ goto err_out;
+ }
+
+ switch (cmd) {
+ case RIO_RECV_COMMAND:
+ data = (void __user *) arg;
+ if (data == NULL)
+ break;
+ if (copy_from_user(&rio_cmd, data, sizeof(struct RioCommand))) {
+ retval = -EFAULT;
+ goto err_out;
+ }
+ if (rio_cmd.length < 0 || rio_cmd.length > PAGE_SIZE) {
+ retval = -EINVAL;
+ goto err_out;
+ }
+ buffer = (unsigned char *) __get_free_page(GFP_KERNEL);
+ if (buffer == NULL) {
+ retval = -ENOMEM;
+ goto err_out;
+ }
+ if (copy_from_user(buffer, rio_cmd.buffer, rio_cmd.length)) {
+ retval = -EFAULT;
+ free_page((unsigned long) buffer);
+ goto err_out;
+ }
+
+ requesttype = rio_cmd.requesttype | USB_DIR_IN |
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE;
+ dbg
+ ("sending command:reqtype=%0x req=%0x value=%0x index=%0x len=%0x",
+ requesttype, rio_cmd.request, rio_cmd.value,
+ rio_cmd.index, rio_cmd.length);
+ /* Send rio control message */
+ retries = 3;
+ while (retries) {
+ result = usb_control_msg(rio->rio_dev,
+ usb_rcvctrlpipe(rio-> rio_dev, 0),
+ rio_cmd.request,
+ requesttype,
+ rio_cmd.value,
+ rio_cmd.index, buffer,
+ rio_cmd.length,
+ jiffies_to_msecs(rio_cmd.timeout));
+ if (result == -ETIMEDOUT)
+ retries--;
+ else if (result < 0) {
+ err("Error executing ioctrl. code = %d", result);
+ retries = 0;
+ } else {
+ dbg("Executed ioctl. Result = %d (data=%02x)",
+ result, buffer[0]);
+ if (copy_to_user(rio_cmd.buffer, buffer,
+ rio_cmd.length)) {
+ free_page((unsigned long) buffer);
+ retval = -EFAULT;
+ goto err_out;
+ }
+ retries = 0;
+ }
+
+ /* rio_cmd.buffer contains a raw stream of single byte
+ data which has been returned from rio. Data is
+ interpreted at application level. For data that
+ will be cast to data types longer than 1 byte, data
+ will be little_endian and will potentially need to
+ be swapped at the app level */
+
+ }
+ free_page((unsigned long) buffer);
+ break;
+
+ case RIO_SEND_COMMAND:
+ data = (void __user *) arg;
+ if (data == NULL)
+ break;
+ if (copy_from_user(&rio_cmd, data, sizeof(struct RioCommand))) {
+ retval = -EFAULT;
+ goto err_out;
+ }
+ if (rio_cmd.length < 0 || rio_cmd.length > PAGE_SIZE) {
+ retval = -EINVAL;
+ goto err_out;
+ }
+ buffer = (unsigned char *) __get_free_page(GFP_KERNEL);
+ if (buffer == NULL) {
+ retval = -ENOMEM;
+ goto err_out;
+ }
+ if (copy_from_user(buffer, rio_cmd.buffer, rio_cmd.length)) {
+ free_page((unsigned long)buffer);
+ retval = -EFAULT;
+ goto err_out;
+ }
+
+ requesttype = rio_cmd.requesttype | USB_DIR_OUT |
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE;
+ dbg("sending command: reqtype=%0x req=%0x value=%0x index=%0x len=%0x",
+ requesttype, rio_cmd.request, rio_cmd.value,
+ rio_cmd.index, rio_cmd.length);
+ /* Send rio control message */
+ retries = 3;
+ while (retries) {
+ result = usb_control_msg(rio->rio_dev,
+ usb_sndctrlpipe(rio-> rio_dev, 0),
+ rio_cmd.request,
+ requesttype,
+ rio_cmd.value,
+ rio_cmd.index, buffer,
+ rio_cmd.length,
+ jiffies_to_msecs(rio_cmd.timeout));
+ if (result == -ETIMEDOUT)
+ retries--;
+ else if (result < 0) {
+ err("Error executing ioctrl. code = %d", result);
+ retries = 0;
+ } else {
+ dbg("Executed ioctl. Result = %d", result);
+ retries = 0;
+
+ }
+
+ }
+ free_page((unsigned long) buffer);
+ break;
+
+ default:
+ retval = -ENOTTY;
+ break;
+ }
+
+
+err_out:
+ up(&(rio->lock));
+ return retval;
+}
+
+static ssize_t
+write_rio(struct file *file, const char __user *buffer,
+ size_t count, loff_t * ppos)
+{
+ DEFINE_WAIT(wait);
+ struct rio_usb_data *rio = &rio_instance;
+
+ unsigned long copy_size;
+ unsigned long bytes_written = 0;
+ unsigned int partial;
+
+ int result = 0;
+ int maxretry;
+ int errn = 0;
+
+ down(&(rio->lock));
+ /* Sanity check to make sure rio is connected, powered, etc */
+ if ( rio == NULL ||
+ rio->present == 0 ||
+ rio->rio_dev == NULL )
+ {
+ up(&(rio->lock));
+ return -ENODEV;
+ }
+
+
+
+ do {
+ unsigned long thistime;
+ char *obuf = rio->obuf;
+
+ thistime = copy_size =
+ (count >= OBUF_SIZE) ? OBUF_SIZE : count;
+ if (copy_from_user(rio->obuf, buffer, copy_size)) {
+ errn = -EFAULT;
+ goto error;
+ }
+ maxretry = 5;
+ while (thistime) {
+ if (!rio->rio_dev) {
+ errn = -ENODEV;
+ goto error;
+ }
+ if (signal_pending(current)) {
+ up(&(rio->lock));
+ return bytes_written ? bytes_written : -EINTR;
+ }
+
+ result = usb_bulk_msg(rio->rio_dev,
+ usb_sndbulkpipe(rio->rio_dev, 2),
+ obuf, thistime, &partial, 5000);
+
+ dbg("write stats: result:%d thistime:%lu partial:%u",
+ result, thistime, partial);
+
+ if (result == -ETIMEDOUT) { /* NAK - so hold for a while */
+ if (!maxretry--) {
+ errn = -ETIME;
+ goto error;
+ }
+ prepare_to_wait(&rio->wait_q, &wait, TASK_INTERRUPTIBLE);
+ schedule_timeout(NAK_TIMEOUT);
+ finish_wait(&rio->wait_q, &wait);
+ continue;
+ } else if (!result && partial) {
+ obuf += partial;
+ thistime -= partial;
+ } else
+ break;
+ };
+ if (result) {
+ err("Write Whoops - %x", result);
+ errn = -EIO;
+ goto error;
+ }
+ bytes_written += copy_size;
+ count -= copy_size;
+ buffer += copy_size;
+ } while (count > 0);
+
+ up(&(rio->lock));
+
+ return bytes_written ? bytes_written : -EIO;
+
+error:
+ up(&(rio->lock));
+ return errn;
+}
+
+static ssize_t
+read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos)
+{
+ DEFINE_WAIT(wait);
+ struct rio_usb_data *rio = &rio_instance;
+ ssize_t read_count;
+ unsigned int partial;
+ int this_read;
+ int result;
+ int maxretry = 10;
+ char *ibuf;
+
+ down(&(rio->lock));
+ /* Sanity check to make sure rio is connected, powered, etc */
+ if ( rio == NULL ||
+ rio->present == 0 ||
+ rio->rio_dev == NULL )
+ {
+ up(&(rio->lock));
+ return -ENODEV;
+ }
+
+ ibuf = rio->ibuf;
+
+ read_count = 0;
+
+
+ while (count > 0) {
+ if (signal_pending(current)) {
+ up(&(rio->lock));
+ return read_count ? read_count : -EINTR;
+ }
+ if (!rio->rio_dev) {
+ up(&(rio->lock));
+ return -ENODEV;
+ }
+ this_read = (count >= IBUF_SIZE) ? IBUF_SIZE : count;
+
+ result = usb_bulk_msg(rio->rio_dev,
+ usb_rcvbulkpipe(rio->rio_dev, 1),
+ ibuf, this_read, &partial,
+ 8000);
+
+ dbg(KERN_DEBUG "read stats: result:%d this_read:%u partial:%u",
+ result, this_read, partial);
+
+ if (partial) {
+ count = this_read = partial;
+ } else if (result == -ETIMEDOUT || result == 15) { /* FIXME: 15 ??? */
+ if (!maxretry--) {
+ up(&(rio->lock));
+ err("read_rio: maxretry timeout");
+ return -ETIME;
+ }
+ prepare_to_wait(&rio->wait_q, &wait, TASK_INTERRUPTIBLE);
+ schedule_timeout(NAK_TIMEOUT);
+ finish_wait(&rio->wait_q, &wait);
+ continue;
+ } else if (result != -EREMOTEIO) {
+ up(&(rio->lock));
+ err("Read Whoops - result:%u partial:%u this_read:%u",
+ result, partial, this_read);
+ return -EIO;
+ } else {
+ up(&(rio->lock));
+ return (0);
+ }
+
+ if (this_read) {
+ if (copy_to_user(buffer, ibuf, this_read)) {
+ up(&(rio->lock));
+ return -EFAULT;
+ }
+ count -= this_read;
+ read_count += this_read;
+ buffer += this_read;
+ }
+ }
+ up(&(rio->lock));
+ return read_count;
+}
+
+static struct
+file_operations usb_rio_fops = {
+ .owner = THIS_MODULE,
+ .read = read_rio,
+ .write = write_rio,
+ .ioctl = ioctl_rio,
+ .open = open_rio,
+ .release = close_rio,
+};
+
+static struct usb_class_driver usb_rio_class = {
+ .name = "usb/rio500%d",
+ .fops = &usb_rio_fops,
+ .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP,
+ .minor_base = RIO_MINOR,
+};
+
+static int probe_rio(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct rio_usb_data *rio = &rio_instance;
+ int retval;
+
+ info("USB Rio found at address %d", dev->devnum);
+
+ retval = usb_register_dev(intf, &usb_rio_class);
+ if (retval) {
+ err("Not able to get a minor for this device.");
+ return -ENOMEM;
+ }
+
+ rio->rio_dev = dev;
+
+ if (!(rio->obuf = (char *) kmalloc(OBUF_SIZE, GFP_KERNEL))) {
+ err("probe_rio: Not enough memory for the output buffer");
+ usb_deregister_dev(intf, &usb_rio_class);
+ return -ENOMEM;
+ }
+ dbg("probe_rio: obuf address:%p", rio->obuf);
+
+ if (!(rio->ibuf = (char *) kmalloc(IBUF_SIZE, GFP_KERNEL))) {
+ err("probe_rio: Not enough memory for the input buffer");
+ usb_deregister_dev(intf, &usb_rio_class);
+ kfree(rio->obuf);
+ return -ENOMEM;
+ }
+ dbg("probe_rio: ibuf address:%p", rio->ibuf);
+
+ init_MUTEX(&(rio->lock));
+
+ usb_set_intfdata (intf, rio);
+ rio->present = 1;
+
+ return 0;
+}
+
+static void disconnect_rio(struct usb_interface *intf)
+{
+ struct rio_usb_data *rio = usb_get_intfdata (intf);
+
+ usb_set_intfdata (intf, NULL);
+ if (rio) {
+ usb_deregister_dev(intf, &usb_rio_class);
+
+ down(&(rio->lock));
+ if (rio->isopen) {
+ rio->isopen = 0;
+ /* better let it finish - the release will do whats needed */
+ rio->rio_dev = NULL;
+ up(&(rio->lock));
+ return;
+ }
+ kfree(rio->ibuf);
+ kfree(rio->obuf);
+
+ info("USB Rio disconnected.");
+
+ rio->present = 0;
+ up(&(rio->lock));
+ }
+}
+
+static struct usb_device_id rio_table [] = {
+ { USB_DEVICE(0x0841, 1) }, /* Rio 500 */
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, rio_table);
+
+static struct usb_driver rio_driver = {
+ .owner = THIS_MODULE,
+ .name = "rio500",
+ .probe = probe_rio,
+ .disconnect = disconnect_rio,
+ .id_table = rio_table,
+};
+
+static int __init usb_rio_init(void)
+{
+ int retval;
+ retval = usb_register(&rio_driver);
+ if (retval)
+ goto out;
+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+
+out:
+ return retval;
+}
+
+
+static void __exit usb_rio_cleanup(void)
+{
+ struct rio_usb_data *rio = &rio_instance;
+
+ rio->present = 0;
+ usb_deregister(&rio_driver);
+
+
+}
+
+module_init(usb_rio_init);
+module_exit(usb_rio_cleanup);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/usb/misc/rio500_usb.h b/drivers/usb/misc/rio500_usb.h
new file mode 100644
index 000000000000..359abc98e706
--- /dev/null
+++ b/drivers/usb/misc/rio500_usb.h
@@ -0,0 +1,37 @@
+/* ----------------------------------------------------------------------
+
+ Copyright (C) 2000 Cesar Miquel (miquel@df.uba.ar)
+
+ 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.
+
+ ---------------------------------------------------------------------- */
+
+
+
+#define RIO_SEND_COMMAND 0x1
+#define RIO_RECV_COMMAND 0x2
+
+#define RIO_DIR_OUT 0x0
+#define RIO_DIR_IN 0x1
+
+struct RioCommand {
+ short length;
+ int request;
+ int requesttype;
+ int value;
+ int index;
+ void __user *buffer;
+ int timeout;
+};
diff --git a/drivers/usb/misc/sisusbvga/Kconfig b/drivers/usb/misc/sisusbvga/Kconfig
new file mode 100644
index 000000000000..3957e144caf7
--- /dev/null
+++ b/drivers/usb/misc/sisusbvga/Kconfig
@@ -0,0 +1,14 @@
+
+config USB_SISUSBVGA
+ tristate "USB 2.0 SVGA dongle support (Net2280/SiS315)"
+ depends on USB && USB_EHCI_HCD
+ ---help---
+ Say Y here if you intend to attach a USB2VGA dongle based on a
+ Net2280 and a SiS315 chip.
+
+ Note that this device requires a USB 2.0 host controller. It will not
+ work with USB 1.x controllers.
+
+ To compile this driver as a module, choose M here: the module will be
+ called sisusb. If unsure, say N.
+
diff --git a/drivers/usb/misc/sisusbvga/Makefile b/drivers/usb/misc/sisusbvga/Makefile
new file mode 100644
index 000000000000..76f1643ceaf8
--- /dev/null
+++ b/drivers/usb/misc/sisusbvga/Makefile
@@ -0,0 +1,6 @@
+#
+# Makefile for the sisusb driver (if driver is inside kernel tree).
+#
+
+obj-$(CONFIG_USB_SISUSBVGA) += sisusb.o
+
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
new file mode 100644
index 000000000000..be163b330167
--- /dev/null
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -0,0 +1,3145 @@
+/*
+ * sisusb - usb kernel driver for SiS315(E) based USB2VGA dongles
+ *
+ * Copyright (C) 2005 by Thomas Winischhofer, Vienna, Austria
+ *
+ * If distributed as part of the Linux kernel, this code is licensed under the
+ * terms of the GPL v2.
+ *
+ * Otherwise, the following license terms apply:
+ *
+ * * Redistribution and use in source and binary forms, with or without
+ * * modification, are permitted provided that the following conditions
+ * * are met:
+ * * 1) Redistributions of source code must retain the above copyright
+ * * notice, this list of conditions and the following disclaimer.
+ * * 2) Redistributions in binary form must reproduce the above copyright
+ * * notice, this list of conditions and the following disclaimer in the
+ * * documentation and/or other materials provided with the distribution.
+ * * 3) The name of the author may not be used to endorse or promote products
+ * * derived from this software without specific psisusbr written permission.
+ * *
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Thomas Winischhofer <thomas@winischhofer.net>
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/poll.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/kref.h>
+#include <linux/usb.h>
+#include <linux/smp_lock.h>
+
+#include "sisusb.h"
+
+#define SISUSB_DONTSYNC
+
+/* Forward declarations / clean-up routines */
+
+static struct usb_driver sisusb_driver;
+
+static DECLARE_MUTEX(disconnect_sem);
+
+static void
+sisusb_free_buffers(struct sisusb_usb_data *sisusb)
+{
+ int i;
+
+ for (i = 0; i < NUMOBUFS; i++) {
+ if (sisusb->obuf[i]) {
+ usb_buffer_free(sisusb->sisusb_dev, sisusb->obufsize,
+ sisusb->obuf[i], sisusb->transfer_dma_out[i]);
+ sisusb->obuf[i] = NULL;
+ }
+ }
+ if (sisusb->ibuf) {
+ usb_buffer_free(sisusb->sisusb_dev, sisusb->ibufsize,
+ sisusb->ibuf, sisusb->transfer_dma_in);
+ sisusb->ibuf = NULL;
+ }
+}
+
+static void
+sisusb_free_urbs(struct sisusb_usb_data *sisusb)
+{
+ int i;
+
+ for (i = 0; i < NUMOBUFS; i++) {
+ usb_free_urb(sisusb->sisurbout[i]);
+ sisusb->sisurbout[i] = NULL;
+ }
+ usb_free_urb(sisusb->sisurbin);
+ sisusb->sisurbin = NULL;
+}
+
+/* Level 0: USB transport layer */
+
+/* 1. out-bulks */
+
+/* out-urb management */
+
+/* Return 1 if all free, 0 otherwise */
+static int
+sisusb_all_free(struct sisusb_usb_data *sisusb)
+{
+ int i;
+
+ for (i = 0; i < sisusb->numobufs; i++) {
+
+ if (sisusb->urbstatus[i] & SU_URB_BUSY)
+ return 0;
+
+ }
+
+ return 1;
+}
+
+/* Kill all busy URBs */
+static void
+sisusb_kill_all_busy(struct sisusb_usb_data *sisusb)
+{
+ int i;
+
+ if (sisusb_all_free(sisusb))
+ return;
+
+ for (i = 0; i < sisusb->numobufs; i++) {
+
+ if (sisusb->urbstatus[i] & SU_URB_BUSY)
+ usb_kill_urb(sisusb->sisurbout[i]);
+
+ }
+}
+
+/* Return 1 if ok, 0 if error (not all complete within timeout) */
+static int
+sisusb_wait_all_out_complete(struct sisusb_usb_data *sisusb)
+{
+ int timeout = 5 * HZ, i = 1;
+
+ wait_event_timeout(sisusb->wait_q,
+ (i = sisusb_all_free(sisusb)),
+ timeout);
+
+ return i;
+}
+
+static int
+sisusb_outurb_available(struct sisusb_usb_data *sisusb)
+{
+ int i;
+
+ for (i = 0; i < sisusb->numobufs; i++) {
+
+ if ((sisusb->urbstatus[i] & (SU_URB_BUSY|SU_URB_ALLOC)) == 0)
+ return i;
+
+ }
+
+ return -1;
+}
+
+static int
+sisusb_get_free_outbuf(struct sisusb_usb_data *sisusb)
+{
+ int i, timeout = 5 * HZ;
+
+ wait_event_timeout(sisusb->wait_q,
+ ((i = sisusb_outurb_available(sisusb)) >= 0),
+ timeout);
+
+ return i;
+}
+
+static int
+sisusb_alloc_outbuf(struct sisusb_usb_data *sisusb)
+{
+ int i;
+
+ i = sisusb_outurb_available(sisusb);
+
+ if (i >= 0)
+ sisusb->urbstatus[i] |= SU_URB_ALLOC;
+
+ return i;
+}
+
+static void
+sisusb_free_outbuf(struct sisusb_usb_data *sisusb, int index)
+{
+ if ((index >= 0) && (index < sisusb->numobufs))
+ sisusb->urbstatus[index] &= ~SU_URB_ALLOC;
+}
+
+/* completion callback */
+
+static void
+sisusb_bulk_completeout(struct urb *urb, struct pt_regs *regs)
+{
+ struct sisusb_urb_context *context = urb->context;
+ struct sisusb_usb_data *sisusb;
+
+ if (!context)
+ return;
+
+ sisusb = context->sisusb;
+
+ if (!sisusb || !sisusb->sisusb_dev || !sisusb->present)
+ return;
+
+#ifndef SISUSB_DONTSYNC
+ if (context->actual_length)
+ *(context->actual_length) += urb->actual_length;
+#endif
+
+ sisusb->urbstatus[context->urbindex] &= ~SU_URB_BUSY;
+ wake_up(&sisusb->wait_q);
+}
+
+static int
+sisusb_bulkout_msg(struct sisusb_usb_data *sisusb, int index, unsigned int pipe, void *data,
+ int len, int *actual_length, int timeout, unsigned int tflags,
+ dma_addr_t transfer_dma)
+{
+ struct urb *urb = sisusb->sisurbout[index];
+ int retval, byteswritten = 0;
+
+ /* Set up URB */
+ urb->transfer_flags = 0;
+
+ usb_fill_bulk_urb(urb, sisusb->sisusb_dev, pipe, data, len,
+ sisusb_bulk_completeout, &sisusb->urbout_context[index]);
+
+ urb->transfer_flags |= (tflags | URB_ASYNC_UNLINK);
+ urb->actual_length = 0;
+
+ if ((urb->transfer_dma = transfer_dma))
+ urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ /* Set up context */
+ sisusb->urbout_context[index].actual_length = (timeout) ?
+ NULL : actual_length;
+
+ /* Declare this urb/buffer in use */
+ sisusb->urbstatus[index] |= SU_URB_BUSY;
+
+ /* Submit URB */
+ retval = usb_submit_urb(urb, GFP_ATOMIC);
+
+ /* If OK, and if timeout > 0, wait for completion */
+ if ((retval == 0) && timeout) {
+ wait_event_timeout(sisusb->wait_q,
+ (!(sisusb->urbstatus[index] & SU_URB_BUSY)),
+ timeout);
+ if (sisusb->urbstatus[index] & SU_URB_BUSY) {
+ /* URB timed out... kill it and report error */
+ usb_kill_urb(urb);
+ retval = -ETIMEDOUT;
+ } else {
+ /* Otherwise, report urb status */
+ retval = urb->status;
+ byteswritten = urb->actual_length;
+ }
+ }
+
+ if (actual_length)
+ *actual_length = byteswritten;
+
+ return retval;
+}
+
+/* 2. in-bulks */
+
+/* completion callback */
+
+static void
+sisusb_bulk_completein(struct urb *urb, struct pt_regs *regs)
+{
+ struct sisusb_usb_data *sisusb = urb->context;
+
+ if (!sisusb || !sisusb->sisusb_dev || !sisusb->present)
+ return;
+
+ sisusb->completein = 1;
+ wake_up(&sisusb->wait_q);
+}
+
+static int
+sisusb_bulkin_msg(struct sisusb_usb_data *sisusb, unsigned int pipe, void *data, int len,
+ int *actual_length, int timeout, unsigned int tflags, dma_addr_t transfer_dma)
+{
+ struct urb *urb = sisusb->sisurbin;
+ int retval, readbytes = 0;
+
+ urb->transfer_flags = 0;
+
+ usb_fill_bulk_urb(urb, sisusb->sisusb_dev, pipe, data, len,
+ sisusb_bulk_completein, sisusb);
+
+ urb->transfer_flags |= (tflags | URB_ASYNC_UNLINK);
+ urb->actual_length = 0;
+
+ if ((urb->transfer_dma = transfer_dma))
+ urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ sisusb->completein = 0;
+ retval = usb_submit_urb(urb, GFP_ATOMIC);
+ if (retval == 0) {
+ wait_event_timeout(sisusb->wait_q, sisusb->completein, timeout);
+ if (!sisusb->completein) {
+ /* URB timed out... kill it and report error */
+ usb_kill_urb(urb);
+ retval = -ETIMEDOUT;
+ } else {
+ /* URB completed within timout */
+ retval = urb->status;
+ readbytes = urb->actual_length;
+ }
+ }
+
+ if (actual_length)
+ *actual_length = readbytes;
+
+ return retval;
+}
+
+
+/* Level 1: */
+
+/* Send a bulk message of variable size
+ *
+ * To copy the data from userspace, give pointer to "userbuffer",
+ * to copy from (non-DMA) kernel memory, give "kernbuffer". If
+ * both of these are NULL, it is assumed, that the transfer
+ * buffer "sisusb->obuf[index]" is set up with the data to send.
+ * Index is ignored if either kernbuffer or userbuffer is set.
+ * If async is nonzero, URBs will be sent without waiting for
+ * completion of the previous URB.
+ *
+ * (return 0 on success)
+ */
+
+static int sisusb_send_bulk_msg(struct sisusb_usb_data *sisusb, int ep, int len,
+ char *kernbuffer, const char __user *userbuffer, int index,
+ ssize_t *bytes_written, unsigned int tflags, int async)
+{
+ int result = 0, retry, count = len;
+ int passsize, thispass, transferred_len = 0;
+ int fromuser = (userbuffer != NULL) ? 1 : 0;
+ int fromkern = (kernbuffer != NULL) ? 1 : 0;
+ unsigned int pipe;
+ char *buffer;
+
+ (*bytes_written) = 0;
+
+ /* Sanity check */
+ if (!sisusb || !sisusb->present || !sisusb->sisusb_dev)
+ return -ENODEV;
+
+ /* If we copy data from kernel or userspace, force the
+ * allocation of a buffer/urb. If we have the data in
+ * the transfer buffer[index] already, reuse the buffer/URB
+ * if the length is > buffer size. (So, transmitting
+ * large data amounts directly from the transfer buffer
+ * treats the buffer as a ring buffer. However, we need
+ * to sync in this case.)
+ */
+ if (fromuser || fromkern)
+ index = -1;
+ else if (len > sisusb->obufsize)
+ async = 0;
+
+ pipe = usb_sndbulkpipe(sisusb->sisusb_dev, ep);
+
+ do {
+ passsize = thispass = (sisusb->obufsize < count) ?
+ sisusb->obufsize : count;
+
+ if (index < 0)
+ index = sisusb_get_free_outbuf(sisusb);
+
+ if (index < 0)
+ return -EIO;
+
+ buffer = sisusb->obuf[index];
+
+ if (fromuser) {
+
+ if (copy_from_user(buffer, userbuffer, passsize))
+ return -EFAULT;
+
+ userbuffer += passsize;
+
+ } else if (fromkern) {
+
+ memcpy(buffer, kernbuffer, passsize);
+ kernbuffer += passsize;
+
+ }
+
+ retry = 5;
+ while (thispass) {
+
+ if (!sisusb->sisusb_dev)
+ return -ENODEV;
+
+ result = sisusb_bulkout_msg(sisusb,
+ index,
+ pipe,
+ buffer,
+ thispass,
+ &transferred_len,
+ async ? 0 : 5 * HZ,
+ tflags,
+ sisusb->transfer_dma_out[index]);
+
+ if (result == -ETIMEDOUT) {
+
+ /* Will not happen if async */
+ if (!retry--)
+ return -ETIME;
+
+ continue;
+
+ } else if ((result == 0) && !async && transferred_len) {
+
+ thispass -= transferred_len;
+ if (thispass) {
+ if (sisusb->transfer_dma_out) {
+ /* If DMA, copy remaining
+ * to beginning of buffer
+ */
+ memcpy(buffer,
+ buffer + transferred_len,
+ thispass);
+ } else {
+ /* If not DMA, simply increase
+ * the pointer
+ */
+ buffer += transferred_len;
+ }
+ }
+
+ } else
+ break;
+ };
+
+ if (result)
+ return result;
+
+ (*bytes_written) += passsize;
+ count -= passsize;
+
+ /* Force new allocation in next iteration */
+ if (fromuser || fromkern)
+ index = -1;
+
+ } while (count > 0);
+
+ if (async) {
+#ifdef SISUSB_DONTSYNC
+ (*bytes_written) = len;
+ /* Some URBs/buffers might be busy */
+#else
+ sisusb_wait_all_out_complete(sisusb);
+ (*bytes_written) = transferred_len;
+ /* All URBs and all buffers are available */
+#endif
+ }
+
+ return ((*bytes_written) == len) ? 0 : -EIO;
+}
+
+/* Receive a bulk message of variable size
+ *
+ * To copy the data to userspace, give pointer to "userbuffer",
+ * to copy to kernel memory, give "kernbuffer". One of them
+ * MUST be set. (There is no technique for letting the caller
+ * read directly from the ibuf.)
+ *
+ */
+
+static int sisusb_recv_bulk_msg(struct sisusb_usb_data *sisusb, int ep, int len,
+ void *kernbuffer, char __user *userbuffer, ssize_t *bytes_read,
+ unsigned int tflags)
+{
+ int result = 0, retry, count = len;
+ int bufsize, thispass, transferred_len;
+ unsigned int pipe;
+ char *buffer;
+
+ (*bytes_read) = 0;
+
+ /* Sanity check */
+ if (!sisusb || !sisusb->present || !sisusb->sisusb_dev)
+ return -ENODEV;
+
+ pipe = usb_rcvbulkpipe(sisusb->sisusb_dev, ep);
+ buffer = sisusb->ibuf;
+ bufsize = sisusb->ibufsize;
+
+ retry = 5;
+
+#ifdef SISUSB_DONTSYNC
+ if (!(sisusb_wait_all_out_complete(sisusb)))
+ return -EIO;
+#endif
+
+ while (count > 0) {
+
+ if (!sisusb->sisusb_dev)
+ return -ENODEV;
+
+ thispass = (bufsize < count) ? bufsize : count;
+
+ result = sisusb_bulkin_msg(sisusb,
+ pipe,
+ buffer,
+ thispass,
+ &transferred_len,
+ 5 * HZ,
+ tflags,
+ sisusb->transfer_dma_in);
+
+ if (transferred_len)
+ thispass = transferred_len;
+
+ else if (result == -ETIMEDOUT) {
+
+ if (!retry--)
+ return -ETIME;
+
+ continue;
+
+ } else
+ return -EIO;
+
+
+ if (thispass) {
+
+ (*bytes_read) += thispass;
+ count -= thispass;
+
+ if (userbuffer) {
+
+ if (copy_to_user(userbuffer, buffer, thispass))
+ return -EFAULT;
+
+ userbuffer += thispass;
+
+ } else {
+
+ memcpy(kernbuffer, buffer, thispass);
+ kernbuffer += thispass;
+
+ }
+
+ }
+
+ }
+
+ return ((*bytes_read) == len) ? 0 : -EIO;
+}
+
+static int sisusb_send_packet(struct sisusb_usb_data *sisusb, int len,
+ struct sisusb_packet *packet)
+{
+ int ret;
+ ssize_t bytes_transferred = 0;
+ __le32 tmp;
+
+ if (len == 6)
+ packet->data = 0;
+
+#ifdef SISUSB_DONTSYNC
+ if (!(sisusb_wait_all_out_complete(sisusb)))
+ return 1;
+#endif
+
+ /* Eventually correct endianness */
+ SISUSB_CORRECT_ENDIANNESS_PACKET(packet);
+
+ /* 1. send the packet */
+ ret = sisusb_send_bulk_msg(sisusb, SISUSB_EP_GFX_OUT, len,
+ (char *)packet, NULL, 0, &bytes_transferred, 0, 0);
+
+ if ((ret == 0) && (len == 6)) {
+
+ /* 2. if packet len == 6, it means we read, so wait for 32bit
+ * return value and write it to packet->data
+ */
+ ret = sisusb_recv_bulk_msg(sisusb, SISUSB_EP_GFX_IN, 4,
+ (char *)&tmp, NULL, &bytes_transferred, 0);
+
+ packet->data = le32_to_cpu(tmp);
+ }
+
+ return ret;
+}
+
+static int sisusb_send_bridge_packet(struct sisusb_usb_data *sisusb, int len,
+ struct sisusb_packet *packet,
+ unsigned int tflags)
+{
+ int ret;
+ ssize_t bytes_transferred = 0;
+ __le32 tmp;
+
+ if (len == 6)
+ packet->data = 0;
+
+#ifdef SISUSB_DONTSYNC
+ if (!(sisusb_wait_all_out_complete(sisusb)))
+ return 1;
+#endif
+
+ /* Eventually correct endianness */
+ SISUSB_CORRECT_ENDIANNESS_PACKET(packet);
+
+ /* 1. send the packet */
+ ret = sisusb_send_bulk_msg(sisusb, SISUSB_EP_BRIDGE_OUT, len,
+ (char *)packet, NULL, 0, &bytes_transferred, tflags, 0);
+
+ if ((ret == 0) && (len == 6)) {
+
+ /* 2. if packet len == 6, it means we read, so wait for 32bit
+ * return value and write it to packet->data
+ */
+ ret = sisusb_recv_bulk_msg(sisusb, SISUSB_EP_BRIDGE_IN, 4,
+ (char *)&tmp, NULL, &bytes_transferred, 0);
+
+ packet->data = le32_to_cpu(tmp);
+ }
+
+ return ret;
+}
+
+/* access video memory and mmio (return 0 on success) */
+
+/* Low level */
+
+/* The following routines assume being used to transfer byte, word,
+ * long etc.
+ * This means that they assume "data" in machine endianness format.
+ */
+
+static int sisusb_write_memio_byte(struct sisusb_usb_data *sisusb, int type,
+ u32 addr, u8 data)
+{
+ struct sisusb_packet packet;
+ int ret;
+
+ packet.header = (1 << (addr & 3)) | (type << 6);
+ packet.address = addr & ~3;
+ packet.data = data << ((addr & 3) << 3);
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ return ret;
+}
+
+static int sisusb_write_memio_word(struct sisusb_usb_data *sisusb, int type,
+ u32 addr, u16 data)
+{
+ struct sisusb_packet packet;
+ int ret = 0;
+
+ packet.address = addr & ~3;
+
+ switch (addr & 3) {
+ case 0:
+ packet.header = (type << 6) | 0x0003;
+ packet.data = (u32)data;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ break;
+ case 1:
+ packet.header = (type << 6) | 0x0006;
+ packet.data = (u32)data << 8;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ break;
+ case 2:
+ packet.header = (type << 6) | 0x000c;
+ packet.data = (u32)data << 16;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ break;
+ case 3:
+ packet.header = (type << 6) | 0x0008;
+ packet.data = (u32)data << 24;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ packet.header = (type << 6) | 0x0001;
+ packet.address = (addr & ~3) + 4;
+ packet.data = (u32)data >> 8;
+ ret |= sisusb_send_packet(sisusb, 10, &packet);
+ }
+
+ return ret;
+}
+
+static int sisusb_write_memio_24bit(struct sisusb_usb_data *sisusb, int type,
+ u32 addr, u32 data)
+{
+ struct sisusb_packet packet;
+ int ret = 0;
+
+ packet.address = addr & ~3;
+
+ switch (addr & 3) {
+ case 0:
+ packet.header = (type << 6) | 0x0007;
+ packet.data = data & 0x00ffffff;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ break;
+ case 1:
+ packet.header = (type << 6) | 0x000e;
+ packet.data = data << 8;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ break;
+ case 2:
+ packet.header = (type << 6) | 0x000c;
+ packet.data = data << 16;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ packet.header = (type << 6) | 0x0001;
+ packet.address = (addr & ~3) + 4;
+ packet.data = (data >> 16) & 0x00ff;
+ ret |= sisusb_send_packet(sisusb, 10, &packet);
+ break;
+ case 3:
+ packet.header = (type << 6) | 0x0008;
+ packet.data = data << 24;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ packet.header = (type << 6) | 0x0003;
+ packet.address = (addr & ~3) + 4;
+ packet.data = (data >> 8) & 0xffff;
+ ret |= sisusb_send_packet(sisusb, 10, &packet);
+ }
+
+ return ret;
+}
+
+static int sisusb_write_memio_long(struct sisusb_usb_data *sisusb, int type,
+ u32 addr, u32 data)
+{
+ struct sisusb_packet packet;
+ int ret = 0;
+
+ packet.address = addr & ~3;
+
+ switch (addr & 3) {
+ case 0:
+ packet.header = (type << 6) | 0x000f;
+ packet.data = data;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ break;
+ case 1:
+ packet.header = (type << 6) | 0x000e;
+ packet.data = data << 8;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ packet.header = (type << 6) | 0x0001;
+ packet.address = (addr & ~3) + 4;
+ packet.data = data >> 24;
+ ret |= sisusb_send_packet(sisusb, 10, &packet);
+ break;
+ case 2:
+ packet.header = (type << 6) | 0x000c;
+ packet.data = data << 16;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ packet.header = (type << 6) | 0x0003;
+ packet.address = (addr & ~3) + 4;
+ packet.data = data >> 16;
+ ret |= sisusb_send_packet(sisusb, 10, &packet);
+ break;
+ case 3:
+ packet.header = (type << 6) | 0x0008;
+ packet.data = data << 24;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ packet.header = (type << 6) | 0x0007;
+ packet.address = (addr & ~3) + 4;
+ packet.data = data >> 8;
+ ret |= sisusb_send_packet(sisusb, 10, &packet);
+ }
+
+ return ret;
+}
+
+/* The xxx_bulk routines copy a buffer of variable size. They treat the
+ * buffer as chars, therefore lsb/msb has to be corrected if using the
+ * byte/word/long/etc routines for speed-up
+ *
+ * If data is from userland, set "userbuffer" (and clear "kernbuffer"),
+ * if data is in kernel space, set "kernbuffer" (and clear "userbuffer");
+ * if neither "kernbuffer" nor "userbuffer" are given, it is assumed
+ * that the data already is in the transfer buffer "sisusb->obuf[index]".
+ */
+
+static int sisusb_write_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
+ char *kernbuffer, int length,
+ const char __user *userbuffer, int index,
+ ssize_t *bytes_written)
+{
+ struct sisusb_packet packet;
+ int ret = 0;
+ static int msgcount = 0;
+ u8 swap8, fromkern = kernbuffer ? 1 : 0;
+ u16 swap16;
+ u32 swap32, flag = (length >> 28) & 1;
+ char buf[4];
+
+ /* if neither kernbuffer not userbuffer are given, assume
+ * data in obuf
+ */
+ if (!fromkern && !userbuffer)
+ kernbuffer = sisusb->obuf[index];
+
+ (*bytes_written = 0);
+
+ length &= 0x00ffffff;
+
+ while (length) {
+
+ switch (length) {
+
+ case 0:
+ return ret;
+
+ case 1:
+ if (userbuffer) {
+ if (get_user(swap8, (u8 __user *)userbuffer))
+ return -EFAULT;
+ } else
+ swap8 = kernbuffer[0];
+
+ ret = sisusb_write_memio_byte(sisusb,
+ SISUSB_TYPE_MEM,
+ addr, swap8);
+
+ if (!ret)
+ (*bytes_written)++;
+
+ return ret;
+
+ case 2:
+ if (userbuffer) {
+ if (get_user(swap16, (u16 __user *)userbuffer))
+ return -EFAULT;
+ } else
+ swap16 = (kernbuffer[0] << 8) | kernbuffer[1];
+
+ ret = sisusb_write_memio_word(sisusb,
+ SISUSB_TYPE_MEM,
+ addr,
+ swap16);
+
+ if (!ret)
+ (*bytes_written) += 2;
+
+ return ret;
+
+ case 3:
+ if (userbuffer) {
+ if (copy_from_user(&buf, userbuffer, 3))
+ return -EFAULT;
+
+ swap32 = (buf[0] << 16) |
+ (buf[1] << 8) |
+ buf[2];
+ } else
+ swap32 = (kernbuffer[0] << 16) |
+ (kernbuffer[1] << 8) |
+ kernbuffer[2];
+
+ ret = sisusb_write_memio_24bit(sisusb,
+ SISUSB_TYPE_MEM,
+ addr,
+ swap32);
+
+ if (!ret)
+ (*bytes_written) += 3;
+
+ return ret;
+
+ case 4:
+ if (userbuffer) {
+ if (get_user(swap32, (u32 __user *)userbuffer))
+ return -EFAULT;
+ } else
+ swap32 = (kernbuffer[0] << 24) |
+ (kernbuffer[1] << 16) |
+ (kernbuffer[2] << 8) |
+ kernbuffer[3];
+
+ ret = sisusb_write_memio_long(sisusb,
+ SISUSB_TYPE_MEM,
+ addr,
+ swap32);
+ if (!ret)
+ (*bytes_written) += 4;
+
+ return ret;
+
+ default:
+ if ((length & ~3) > 0x10000) {
+
+ packet.header = 0x001f;
+ packet.address = 0x000001d4;
+ packet.data = addr;
+ ret = sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ packet.header = 0x001f;
+ packet.address = 0x000001d0;
+ packet.data = (length & ~3);
+ ret |= sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ packet.header = 0x001f;
+ packet.address = 0x000001c0;
+ packet.data = flag | 0x16;
+ ret |= sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ if (userbuffer) {
+ ret |= sisusb_send_bulk_msg(sisusb,
+ SISUSB_EP_GFX_LBULK_OUT,
+ (length & ~3),
+ NULL, userbuffer, 0,
+ bytes_written, 0, 1);
+ userbuffer += (*bytes_written);
+ } else if (fromkern) {
+ ret |= sisusb_send_bulk_msg(sisusb,
+ SISUSB_EP_GFX_LBULK_OUT,
+ (length & ~3),
+ kernbuffer, NULL, 0,
+ bytes_written, 0, 1);
+ kernbuffer += (*bytes_written);
+ } else {
+ ret |= sisusb_send_bulk_msg(sisusb,
+ SISUSB_EP_GFX_LBULK_OUT,
+ (length & ~3),
+ NULL, NULL, index,
+ bytes_written, 0, 1);
+ kernbuffer += ((*bytes_written) &
+ (sisusb->obufsize-1));
+ }
+
+ } else {
+
+ packet.header = 0x001f;
+ packet.address = 0x00000194;
+ packet.data = addr;
+ ret = sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ packet.header = 0x001f;
+ packet.address = 0x00000190;
+ packet.data = (length & ~3);
+ ret |= sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ if (sisusb->flagb0 != 0x16) {
+ packet.header = 0x001f;
+ packet.address = 0x00000180;
+ packet.data = flag | 0x16;
+ ret |= sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ sisusb->flagb0 = 0x16;
+ }
+ if (userbuffer) {
+ ret |= sisusb_send_bulk_msg(sisusb,
+ SISUSB_EP_GFX_BULK_OUT,
+ (length & ~3),
+ NULL, userbuffer, 0,
+ bytes_written, 0, 1);
+ userbuffer += (*bytes_written);
+ } else if (fromkern) {
+ ret |= sisusb_send_bulk_msg(sisusb,
+ SISUSB_EP_GFX_BULK_OUT,
+ (length & ~3),
+ kernbuffer, NULL, 0,
+ bytes_written, 0, 1);
+ kernbuffer += (*bytes_written);
+ } else {
+ ret |= sisusb_send_bulk_msg(sisusb,
+ SISUSB_EP_GFX_BULK_OUT,
+ (length & ~3),
+ NULL, NULL, index,
+ bytes_written, 0, 1);
+ kernbuffer += ((*bytes_written) &
+ (sisusb->obufsize-1));
+ }
+ }
+ if (ret) {
+ msgcount++;
+ if (msgcount < 500)
+ printk(KERN_ERR
+ "sisusbvga[%d]: Wrote %Zd of "
+ "%d bytes, error %d\n",
+ sisusb->minor, *bytes_written,
+ length, ret);
+ else if (msgcount == 500)
+ printk(KERN_ERR
+ "sisusbvga[%d]: Too many errors"
+ ", logging stopped\n",
+ sisusb->minor);
+ }
+ addr += (*bytes_written);
+ length -= (*bytes_written);
+ }
+
+ if (ret)
+ break;
+
+ }
+
+ return ret ? -EIO : 0;
+}
+
+static int sisusb_read_memio_byte(struct sisusb_usb_data *sisusb, int type,
+ u32 addr, u8 *data)
+{
+ struct sisusb_packet packet;
+ int ret;
+
+ CLEARPACKET(&packet);
+ packet.header = (1 << (addr & 3)) | (type << 6);
+ packet.address = addr & ~3;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = (u8)(packet.data >> ((addr & 3) << 3));
+ return ret;
+}
+
+static int sisusb_read_memio_word(struct sisusb_usb_data *sisusb, int type,
+ u32 addr, u16 *data)
+{
+ struct sisusb_packet packet;
+ int ret = 0;
+
+ CLEARPACKET(&packet);
+
+ packet.address = addr & ~3;
+
+ switch (addr & 3) {
+ case 0:
+ packet.header = (type << 6) | 0x0003;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = (u16)(packet.data);
+ break;
+ case 1:
+ packet.header = (type << 6) | 0x0006;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = (u16)(packet.data >> 8);
+ break;
+ case 2:
+ packet.header = (type << 6) | 0x000c;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = (u16)(packet.data >> 16);
+ break;
+ case 3:
+ packet.header = (type << 6) | 0x0008;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = (u16)(packet.data >> 24);
+ packet.header = (type << 6) | 0x0001;
+ packet.address = (addr & ~3) + 4;
+ ret |= sisusb_send_packet(sisusb, 6, &packet);
+ *data |= (u16)(packet.data << 8);
+ }
+
+ return ret;
+}
+
+static int sisusb_read_memio_24bit(struct sisusb_usb_data *sisusb, int type,
+ u32 addr, u32 *data)
+{
+ struct sisusb_packet packet;
+ int ret = 0;
+
+ packet.address = addr & ~3;
+
+ switch (addr & 3) {
+ case 0:
+ packet.header = (type << 6) | 0x0007;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = packet.data & 0x00ffffff;
+ break;
+ case 1:
+ packet.header = (type << 6) | 0x000e;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = packet.data >> 8;
+ break;
+ case 2:
+ packet.header = (type << 6) | 0x000c;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = packet.data >> 16;
+ packet.header = (type << 6) | 0x0001;
+ packet.address = (addr & ~3) + 4;
+ ret |= sisusb_send_packet(sisusb, 6, &packet);
+ *data |= ((packet.data & 0xff) << 16);
+ break;
+ case 3:
+ packet.header = (type << 6) | 0x0008;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = packet.data >> 24;
+ packet.header = (type << 6) | 0x0003;
+ packet.address = (addr & ~3) + 4;
+ ret |= sisusb_send_packet(sisusb, 6, &packet);
+ *data |= ((packet.data & 0xffff) << 8);
+ }
+
+ return ret;
+}
+
+static int sisusb_read_memio_long(struct sisusb_usb_data *sisusb, int type,
+ u32 addr, u32 *data)
+{
+ struct sisusb_packet packet;
+ int ret = 0;
+
+ packet.address = addr & ~3;
+
+ switch (addr & 3) {
+ case 0:
+ packet.header = (type << 6) | 0x000f;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = packet.data;
+ break;
+ case 1:
+ packet.header = (type << 6) | 0x000e;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = packet.data >> 8;
+ packet.header = (type << 6) | 0x0001;
+ packet.address = (addr & ~3) + 4;
+ ret |= sisusb_send_packet(sisusb, 6, &packet);
+ *data |= (packet.data << 24);
+ break;
+ case 2:
+ packet.header = (type << 6) | 0x000c;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = packet.data >> 16;
+ packet.header = (type << 6) | 0x0003;
+ packet.address = (addr & ~3) + 4;
+ ret |= sisusb_send_packet(sisusb, 6, &packet);
+ *data |= (packet.data << 16);
+ break;
+ case 3:
+ packet.header = (type << 6) | 0x0008;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = packet.data >> 24;
+ packet.header = (type << 6) | 0x0007;
+ packet.address = (addr & ~3) + 4;
+ ret |= sisusb_send_packet(sisusb, 6, &packet);
+ *data |= (packet.data << 8);
+ }
+
+ return ret;
+}
+
+static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
+ char *kernbuffer, int length,
+ char __user *userbuffer, ssize_t *bytes_read)
+{
+ int ret = 0;
+ char buf[4];
+ u16 swap16;
+ u32 swap32;
+
+ (*bytes_read = 0);
+
+ length &= 0x00ffffff;
+
+ while (length) {
+
+ switch (length) {
+
+ case 0:
+ return ret;
+
+ case 1:
+
+ ret |= sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM,
+ addr, &buf[0]);
+ if (!ret) {
+ (*bytes_read)++;
+ if (userbuffer) {
+ if (put_user(buf[0],
+ (u8 __user *)userbuffer)) {
+ return -EFAULT;
+ }
+ } else {
+ kernbuffer[0] = buf[0];
+ }
+ }
+ return ret;
+
+ case 2:
+ ret |= sisusb_read_memio_word(sisusb, SISUSB_TYPE_MEM,
+ addr, &swap16);
+ if (!ret) {
+ (*bytes_read) += 2;
+ if (userbuffer) {
+ if (put_user(swap16,
+ (u16 __user *)userbuffer))
+ return -EFAULT;
+ } else {
+ kernbuffer[0] = swap16 >> 8;
+ kernbuffer[1] = swap16 & 0xff;
+ }
+ }
+ return ret;
+
+ case 3:
+ ret |= sisusb_read_memio_24bit(sisusb, SISUSB_TYPE_MEM,
+ addr, &swap32);
+ if (!ret) {
+ (*bytes_read) += 3;
+ buf[0] = (swap32 >> 16) & 0xff;
+ buf[1] = (swap32 >> 8) & 0xff;
+ buf[2] = swap32 & 0xff;
+ if (userbuffer) {
+ if (copy_to_user(userbuffer, &buf[0], 3))
+ return -EFAULT;
+ } else {
+ kernbuffer[0] = buf[0];
+ kernbuffer[1] = buf[1];
+ kernbuffer[2] = buf[2];
+ }
+ }
+ return ret;
+
+ default:
+ ret |= sisusb_read_memio_long(sisusb, SISUSB_TYPE_MEM,
+ addr, &swap32);
+ if (!ret) {
+ (*bytes_read) += 4;
+ if (userbuffer) {
+ if (put_user(swap32,
+ (u32 __user *)userbuffer))
+ return -EFAULT;
+
+ userbuffer += 4;
+ } else {
+ kernbuffer[0] = (swap32 >> 24) & 0xff;
+ kernbuffer[1] = (swap32 >> 16) & 0xff;
+ kernbuffer[2] = (swap32 >> 8) & 0xff;
+ kernbuffer[3] = swap32 & 0xff;
+ kernbuffer += 4;
+ }
+ addr += 4;
+ length -= 4;
+ }
+#if 0 /* That does not work, as EP 2 is an OUT EP! */
+ default:
+ CLEARPACKET(&packet);
+ packet.header = 0x001f;
+ packet.address = 0x000001a0;
+ packet.data = 0x00000006;
+ ret |= sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ packet.header = 0x001f;
+ packet.address = 0x000001b0;
+ packet.data = (length & ~3) | 0x40000000;
+ ret |= sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ packet.header = 0x001f;
+ packet.address = 0x000001b4;
+ packet.data = addr;
+ ret |= sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ packet.header = 0x001f;
+ packet.address = 0x000001a4;
+ packet.data = 0x00000001;
+ ret |= sisusb_send_bridge_packet(sisusb, 10,
+ &packet, 0);
+ if (userbuffer) {
+ ret |= sisusb_recv_bulk_msg(sisusb,
+ SISUSB_EP_GFX_BULK_IN,
+ (length & ~3),
+ NULL, userbuffer,
+ bytes_read, 0);
+ if (!ret) userbuffer += (*bytes_read);
+ } else {
+ ret |= sisusb_recv_bulk_msg(sisusb,
+ SISUSB_EP_GFX_BULK_IN,
+ (length & ~3),
+ kernbuffer, NULL,
+ bytes_read, 0);
+ if (!ret) kernbuffer += (*bytes_read);
+ }
+ addr += (*bytes_read);
+ length -= (*bytes_read);
+#endif
+ }
+
+ if (ret)
+ break;
+ }
+
+ return ret;
+}
+
+/* High level: Gfx (indexed) register access */
+
+static int
+sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data)
+{
+ int ret;
+ ret = sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port, index);
+ ret |= sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port + 1, data);
+ return ret;
+}
+
+static int
+sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data)
+{
+ int ret;
+ ret = sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port, index);
+ ret |= sisusb_read_memio_byte(sisusb, SISUSB_TYPE_IO, port + 1, data);
+ return ret;
+}
+
+static int
+sisusb_setidxregandor(struct sisusb_usb_data *sisusb, int port, u8 idx,
+ u8 myand, u8 myor)
+{
+ int ret;
+ u8 tmp;
+
+ ret = sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port, idx);
+ ret |= sisusb_read_memio_byte(sisusb, SISUSB_TYPE_IO, port + 1, &tmp);
+ tmp &= myand;
+ tmp |= myor;
+ ret |= sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port + 1, tmp);
+ return ret;
+}
+
+static int
+sisusb_setidxregmask(struct sisusb_usb_data *sisusb, int port, u8 idx,
+ u8 data, u8 mask)
+{
+ int ret;
+ u8 tmp;
+ ret = sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port, idx);
+ ret |= sisusb_read_memio_byte(sisusb, SISUSB_TYPE_IO, port + 1, &tmp);
+ tmp &= ~(mask);
+ tmp |= (data & mask);
+ ret |= sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port + 1, tmp);
+ return ret;
+}
+
+static int
+sisusb_setidxregor(struct sisusb_usb_data *sisusb, int port, u8 index, u8 myor)
+{
+ return(sisusb_setidxregandor(sisusb, port, index, 0xff, myor));
+}
+
+static int
+sisusb_setidxregand(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand)
+{
+ return(sisusb_setidxregandor(sisusb, port, idx, myand, 0x00));
+}
+
+/* access pci config registers (reg numbers 0, 4, 8, etc) */
+
+static int
+sisusb_write_pci_config(struct sisusb_usb_data *sisusb, int regnum, u32 data)
+{
+ struct sisusb_packet packet;
+ int ret;
+
+ packet.header = 0x008f;
+ packet.address = regnum | 0x10000;
+ packet.data = data;
+ ret = sisusb_send_packet(sisusb, 10, &packet);
+ return ret;
+}
+
+static int
+sisusb_read_pci_config(struct sisusb_usb_data *sisusb, int regnum, u32 *data)
+{
+ struct sisusb_packet packet;
+ int ret;
+
+ packet.header = 0x008f;
+ packet.address = (u32)regnum | 0x10000;
+ ret = sisusb_send_packet(sisusb, 6, &packet);
+ *data = packet.data;
+ return ret;
+}
+
+/* Clear video RAM */
+
+static int
+sisusb_clear_vram(struct sisusb_usb_data *sisusb, u32 address, int length)
+{
+ int ret, i;
+ ssize_t j;
+
+ if (address < sisusb->vrambase)
+ return 1;
+
+ if (address >= sisusb->vrambase + sisusb->vramsize)
+ return 1;
+
+ if (address + length > sisusb->vrambase + sisusb->vramsize)
+ length = sisusb->vrambase + sisusb->vramsize - address;
+
+ if (length <= 0)
+ return 0;
+
+ /* allocate free buffer/urb and clear the buffer */
+ if ((i = sisusb_alloc_outbuf(sisusb)) < 0)
+ return -EBUSY;
+
+ memset(sisusb->obuf[i], 0, sisusb->obufsize);
+
+ /* We can write a length > buffer size here. The buffer
+ * data will simply be re-used (like a ring-buffer).
+ */
+ ret = sisusb_write_mem_bulk(sisusb, address, NULL, length, NULL, i, &j);
+
+ /* Free the buffer/urb */
+ sisusb_free_outbuf(sisusb, i);
+
+ return ret;
+}
+
+/* Initialize the graphics core (return 0 on success)
+ * This resets the graphics hardware and puts it into
+ * a defined mode (640x480@60Hz)
+ */
+
+#define GETREG(r,d) sisusb_read_memio_byte(sisusb, SISUSB_TYPE_IO, r, d)
+#define SETREG(r,d) sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, r, d)
+#define SETIREG(r,i,d) sisusb_setidxreg(sisusb, r, i, d)
+#define GETIREG(r,i,d) sisusb_getidxreg(sisusb, r, i, d)
+#define SETIREGOR(r,i,o) sisusb_setidxregor(sisusb, r, i, o)
+#define SETIREGAND(r,i,a) sisusb_setidxregand(sisusb, r, i, a)
+#define SETIREGANDOR(r,i,a,o) sisusb_setidxregandor(sisusb, r, i, a, o)
+#define READL(a,d) sisusb_read_memio_long(sisusb, SISUSB_TYPE_MEM, a, d)
+#define WRITEL(a,d) sisusb_write_memio_long(sisusb, SISUSB_TYPE_MEM, a, d)
+#define READB(a,d) sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, a, d)
+#define WRITEB(a,d) sisusb_write_memio_byte(sisusb, SISUSB_TYPE_MEM, a, d)
+
+static int
+sisusb_triggersr16(struct sisusb_usb_data *sisusb, u8 ramtype)
+{
+ int ret;
+ u8 tmp8;
+
+ ret = GETIREG(SISSR, 0x16, &tmp8);
+ if (ramtype <= 1) {
+ tmp8 &= 0x3f;
+ ret |= SETIREG(SISSR, 0x16, tmp8);
+ tmp8 |= 0x80;
+ ret |= SETIREG(SISSR, 0x16, tmp8);
+ } else {
+ tmp8 |= 0xc0;
+ ret |= SETIREG(SISSR, 0x16, tmp8);
+ tmp8 &= 0x0f;
+ ret |= SETIREG(SISSR, 0x16, tmp8);
+ tmp8 |= 0x80;
+ ret |= SETIREG(SISSR, 0x16, tmp8);
+ tmp8 &= 0x0f;
+ ret |= SETIREG(SISSR, 0x16, tmp8);
+ tmp8 |= 0xd0;
+ ret |= SETIREG(SISSR, 0x16, tmp8);
+ tmp8 &= 0x0f;
+ ret |= SETIREG(SISSR, 0x16, tmp8);
+ tmp8 |= 0xa0;
+ ret |= SETIREG(SISSR, 0x16, tmp8);
+ }
+ return ret;
+}
+
+static int
+sisusb_getbuswidth(struct sisusb_usb_data *sisusb, int *bw, int *chab)
+{
+ int ret;
+ u8 ramtype, done = 0;
+ u32 t0, t1, t2, t3;
+ u32 ramptr = SISUSB_PCI_MEMBASE;
+
+ ret = GETIREG(SISSR, 0x3a, &ramtype);
+ ramtype &= 3;
+
+ ret |= SETIREG(SISSR, 0x13, 0x00);
+
+ if (ramtype <= 1) {
+ ret |= SETIREG(SISSR, 0x14, 0x12);
+ ret |= SETIREGAND(SISSR, 0x15, 0xef);
+ } else {
+ ret |= SETIREG(SISSR, 0x14, 0x02);
+ }
+
+ ret |= sisusb_triggersr16(sisusb, ramtype);
+ ret |= WRITEL(ramptr + 0, 0x01234567);
+ ret |= WRITEL(ramptr + 4, 0x456789ab);
+ ret |= WRITEL(ramptr + 8, 0x89abcdef);
+ ret |= WRITEL(ramptr + 12, 0xcdef0123);
+ ret |= WRITEL(ramptr + 16, 0x55555555);
+ ret |= WRITEL(ramptr + 20, 0x55555555);
+ ret |= WRITEL(ramptr + 24, 0xffffffff);
+ ret |= WRITEL(ramptr + 28, 0xffffffff);
+ ret |= READL(ramptr + 0, &t0);
+ ret |= READL(ramptr + 4, &t1);
+ ret |= READL(ramptr + 8, &t2);
+ ret |= READL(ramptr + 12, &t3);
+
+ if (ramtype <= 1) {
+
+ *chab = 0; *bw = 64;
+
+ if ((t3 != 0xcdef0123) || (t2 != 0x89abcdef)) {
+ if ((t1 == 0x456789ab) && (t0 == 0x01234567)) {
+ *chab = 0; *bw = 64;
+ ret |= SETIREGAND(SISSR, 0x14, 0xfd);
+ }
+ }
+ if ((t1 != 0x456789ab) || (t0 != 0x01234567)) {
+ *chab = 1; *bw = 64;
+ ret |= SETIREGANDOR(SISSR, 0x14, 0xfc,0x01);
+
+ ret |= sisusb_triggersr16(sisusb, ramtype);
+ ret |= WRITEL(ramptr + 0, 0x89abcdef);
+ ret |= WRITEL(ramptr + 4, 0xcdef0123);
+ ret |= WRITEL(ramptr + 8, 0x55555555);
+ ret |= WRITEL(ramptr + 12, 0x55555555);
+ ret |= WRITEL(ramptr + 16, 0xaaaaaaaa);
+ ret |= WRITEL(ramptr + 20, 0xaaaaaaaa);
+ ret |= READL(ramptr + 4, &t1);
+
+ if (t1 != 0xcdef0123) {
+ *bw = 32;
+ ret |= SETIREGOR(SISSR, 0x15, 0x10);
+ }
+ }
+
+ } else {
+
+ *chab = 0; *bw = 64; /* default: cha, bw = 64 */
+
+ done = 0;
+
+ if (t1 == 0x456789ab) {
+ if (t0 == 0x01234567) {
+ *chab = 0; *bw = 64;
+ done = 1;
+ }
+ } else {
+ if (t0 == 0x01234567) {
+ *chab = 0; *bw = 32;
+ ret |= SETIREG(SISSR, 0x14, 0x00);
+ done = 1;
+ }
+ }
+
+ if (!done) {
+ ret |= SETIREG(SISSR, 0x14, 0x03);
+ ret |= sisusb_triggersr16(sisusb, ramtype);
+
+ ret |= WRITEL(ramptr + 0, 0x01234567);
+ ret |= WRITEL(ramptr + 4, 0x456789ab);
+ ret |= WRITEL(ramptr + 8, 0x89abcdef);
+ ret |= WRITEL(ramptr + 12, 0xcdef0123);
+ ret |= WRITEL(ramptr + 16, 0x55555555);
+ ret |= WRITEL(ramptr + 20, 0x55555555);
+ ret |= WRITEL(ramptr + 24, 0xffffffff);
+ ret |= WRITEL(ramptr + 28, 0xffffffff);
+ ret |= READL(ramptr + 0, &t0);
+ ret |= READL(ramptr + 4, &t1);
+
+ if (t1 == 0x456789ab) {
+ if (t0 == 0x01234567) {
+ *chab = 1; *bw = 64;
+ return ret;
+ } /* else error */
+ } else {
+ if (t0 == 0x01234567) {
+ *chab = 1; *bw = 32;
+ ret |= SETIREG(SISSR, 0x14, 0x01);
+ } /* else error */
+ }
+ }
+ }
+ return ret;
+}
+
+static int
+sisusb_verify_mclk(struct sisusb_usb_data *sisusb)
+{
+ int ret = 0;
+ u32 ramptr = SISUSB_PCI_MEMBASE;
+ u8 tmp1, tmp2, i, j;
+
+ ret |= WRITEB(ramptr, 0xaa);
+ ret |= WRITEB(ramptr + 16, 0x55);
+ ret |= READB(ramptr, &tmp1);
+ ret |= READB(ramptr + 16, &tmp2);
+ if ((tmp1 != 0xaa) || (tmp2 != 0x55)) {
+ for (i = 0, j = 16; i < 2; i++, j += 16) {
+ ret |= GETIREG(SISSR, 0x21, &tmp1);
+ ret |= SETIREGAND(SISSR, 0x21, (tmp1 & 0xfb));
+ ret |= SETIREGOR(SISSR, 0x3c, 0x01); /* not on 330 */
+ ret |= SETIREGAND(SISSR, 0x3c, 0xfe); /* not on 330 */
+ ret |= SETIREG(SISSR, 0x21, tmp1);
+ ret |= WRITEB(ramptr + 16 + j, j);
+ ret |= READB(ramptr + 16 + j, &tmp1);
+ if (tmp1 == j) {
+ ret |= WRITEB(ramptr + j, j);
+ break;
+ }
+ }
+ }
+ return ret;
+}
+
+static int
+sisusb_set_rank(struct sisusb_usb_data *sisusb, int *iret, int index,
+ u8 rankno, u8 chab, const u8 dramtype[][5],
+ int bw)
+{
+ int ret = 0, ranksize;
+ u8 tmp;
+
+ *iret = 0;
+
+ if ((rankno == 2) && (dramtype[index][0] == 2))
+ return ret;
+
+ ranksize = dramtype[index][3] / 2 * bw / 32;
+
+ if ((ranksize * rankno) > 128)
+ return ret;
+
+ tmp = 0;
+ while ((ranksize >>= 1) > 0) tmp += 0x10;
+ tmp |= ((rankno - 1) << 2);
+ tmp |= ((bw / 64) & 0x02);
+ tmp |= (chab & 0x01);
+
+ ret = SETIREG(SISSR, 0x14, tmp);
+ ret |= sisusb_triggersr16(sisusb, 0); /* sic! */
+
+ *iret = 1;
+
+ return ret;
+}
+
+static int
+sisusb_check_rbc(struct sisusb_usb_data *sisusb, int *iret, u32 inc, int testn)
+{
+ int ret = 0, i;
+ u32 j, tmp;
+
+ *iret = 0;
+
+ for (i = 0, j = 0; i < testn; i++) {
+ ret |= WRITEL(sisusb->vrambase + j, j);
+ j += inc;
+ }
+
+ for (i = 0, j = 0; i < testn; i++) {
+ ret |= READL(sisusb->vrambase + j, &tmp);
+ if (tmp != j) return ret;
+ j += inc;
+ }
+
+ *iret = 1;
+ return ret;
+}
+
+static int
+sisusb_check_ranks(struct sisusb_usb_data *sisusb, int *iret, int rankno,
+ int idx, int bw, const u8 rtype[][5])
+{
+ int ret = 0, i, i2ret;
+ u32 inc;
+
+ *iret = 0;
+
+ for (i = rankno; i >= 1; i--) {
+ inc = 1 << (rtype[idx][2] +
+ rtype[idx][1] +
+ rtype[idx][0] +
+ bw / 64 + i);
+ ret |= sisusb_check_rbc(sisusb, &i2ret, inc, 2);
+ if (!i2ret)
+ return ret;
+ }
+
+ inc = 1 << (rtype[idx][2] + bw / 64 + 2);
+ ret |= sisusb_check_rbc(sisusb, &i2ret, inc, 4);
+ if (!i2ret)
+ return ret;
+
+ inc = 1 << (10 + bw / 64);
+ ret |= sisusb_check_rbc(sisusb, &i2ret, inc, 2);
+ if (!i2ret)
+ return ret;
+
+ *iret = 1;
+ return ret;
+}
+
+static int
+sisusb_get_sdram_size(struct sisusb_usb_data *sisusb, int *iret, int bw,
+ int chab)
+{
+ int ret = 0, i2ret = 0, i, j;
+ static const u8 sdramtype[13][5] = {
+ { 2, 12, 9, 64, 0x35 },
+ { 1, 13, 9, 64, 0x44 },
+ { 2, 12, 8, 32, 0x31 },
+ { 2, 11, 9, 32, 0x25 },
+ { 1, 12, 9, 32, 0x34 },
+ { 1, 13, 8, 32, 0x40 },
+ { 2, 11, 8, 16, 0x21 },
+ { 1, 12, 8, 16, 0x30 },
+ { 1, 11, 9, 16, 0x24 },
+ { 1, 11, 8, 8, 0x20 },
+ { 2, 9, 8, 4, 0x01 },
+ { 1, 10, 8, 4, 0x10 },
+ { 1, 9, 8, 2, 0x00 }
+ };
+
+ *iret = 1; /* error */
+
+ for (i = 0; i < 13; i++) {
+ ret |= SETIREGANDOR(SISSR, 0x13, 0x80, sdramtype[i][4]);
+ for (j = 2; j > 0; j--) {
+ ret |= sisusb_set_rank(sisusb, &i2ret, i, j,
+ chab, sdramtype, bw);
+ if (!i2ret)
+ continue;
+
+ ret |= sisusb_check_ranks(sisusb, &i2ret, j, i,
+ bw, sdramtype);
+ if (i2ret) {
+ *iret = 0; /* ram size found */
+ return ret;
+ }
+ }
+ }
+
+ return ret;
+}
+
+static int
+sisusb_setup_screen(struct sisusb_usb_data *sisusb, int clrall, int drwfr)
+{
+ int ret = 0;
+ u32 address;
+ int i, length, modex, modey, bpp;
+
+ modex = 640; modey = 480; bpp = 2;
+
+ address = sisusb->vrambase; /* Clear video ram */
+
+ if (clrall)
+ length = sisusb->vramsize;
+ else
+ length = modex * bpp * modey;
+
+ ret = sisusb_clear_vram(sisusb, address, length);
+
+ if (!ret && drwfr) {
+ for (i = 0; i < modex; i++) {
+ address = sisusb->vrambase + (i * bpp);
+ ret |= sisusb_write_memio_word(sisusb, SISUSB_TYPE_MEM,
+ address, 0xf100);
+ address += (modex * (modey-1) * bpp);
+ ret |= sisusb_write_memio_word(sisusb, SISUSB_TYPE_MEM,
+ address, 0xf100);
+ }
+ for (i = 0; i < modey; i++) {
+ address = sisusb->vrambase + ((i * modex) * bpp);
+ ret |= sisusb_write_memio_word(sisusb, SISUSB_TYPE_MEM,
+ address, 0xf100);
+ address += ((modex - 1) * bpp);
+ ret |= sisusb_write_memio_word(sisusb, SISUSB_TYPE_MEM,
+ address, 0xf100);
+ }
+ }
+
+ return ret;
+}
+
+static int
+sisusb_set_default_mode(struct sisusb_usb_data *sisusb, int touchengines)
+{
+ int ret = 0, i, j, modex, modey, bpp, du;
+ u8 sr31, cr63, tmp8;
+ static const char attrdata[] = {
+ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
+ 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
+ 0x01,0x00,0x00,0x00
+ };
+ static const char crtcrdata[] = {
+ 0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e,
+ 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3,
+ 0xff
+ };
+ static const char grcdata[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
+ 0xff
+ };
+ static const char crtcdata[] = {
+ 0x5f,0x4f,0x4f,0x83,0x55,0x81,0x0b,0x3e,
+ 0xe9,0x8b,0xdf,0xe8,0x0c,0x00,0x00,0x05,
+ 0x00
+ };
+
+ modex = 640; modey = 480; bpp = 2;
+
+ GETIREG(SISSR, 0x31, &sr31);
+ GETIREG(SISCR, 0x63, &cr63);
+ SETIREGOR(SISSR, 0x01, 0x20);
+ SETIREG(SISCR, 0x63, cr63 & 0xbf);
+ SETIREGOR(SISCR, 0x17, 0x80);
+ SETIREGOR(SISSR, 0x1f, 0x04);
+ SETIREGAND(SISSR, 0x07, 0xfb);
+ SETIREG(SISSR, 0x00, 0x03); /* seq */
+ SETIREG(SISSR, 0x01, 0x21);
+ SETIREG(SISSR, 0x02, 0x0f);
+ SETIREG(SISSR, 0x03, 0x00);
+ SETIREG(SISSR, 0x04, 0x0e);
+ SETREG(SISMISCW, 0x23); /* misc */
+ for (i = 0; i <= 0x18; i++) { /* crtc */
+ SETIREG(SISCR, i, crtcrdata[i]);
+ }
+ for (i = 0; i <= 0x13; i++) { /* att */
+ GETREG(SISINPSTAT, &tmp8);
+ SETREG(SISAR, i);
+ SETREG(SISAR, attrdata[i]);
+ }
+ GETREG(SISINPSTAT, &tmp8);
+ SETREG(SISAR, 0x14);
+ SETREG(SISAR, 0x00);
+ GETREG(SISINPSTAT, &tmp8);
+ SETREG(SISAR, 0x20);
+ GETREG(SISINPSTAT, &tmp8);
+ for (i = 0; i <= 0x08; i++) { /* grc */
+ SETIREG(SISGR, i, grcdata[i]);
+ }
+ SETIREGAND(SISGR, 0x05, 0xbf);
+ for (i = 0x0A; i <= 0x0E; i++) { /* clr ext */
+ SETIREG(SISSR, i, 0x00);
+ }
+ SETIREGAND(SISSR, 0x37, 0xfe);
+ SETREG(SISMISCW, 0xef); /* sync */
+ SETIREG(SISCR, 0x11, 0x00); /* crtc */
+ for (j = 0x00, i = 0; i <= 7; i++, j++) {
+ SETIREG(SISCR, j, crtcdata[i]);
+ }
+ for (j = 0x10; i <= 10; i++, j++) {
+ SETIREG(SISCR, j, crtcdata[i]);
+ }
+ for (j = 0x15; i <= 12; i++, j++) {
+ SETIREG(SISCR, j, crtcdata[i]);
+ }
+ for (j = 0x0A; i <= 15; i++, j++) {
+ SETIREG(SISSR, j, crtcdata[i]);
+ }
+ SETIREG(SISSR, 0x0E, (crtcdata[16] & 0xE0));
+ SETIREGANDOR(SISCR, 0x09, 0x5f, ((crtcdata[16] & 0x01) << 5));
+ SETIREG(SISCR, 0x14, 0x4f);
+ du = (modex / 16) * (bpp * 2); /* offset/pitch */
+ if (modex % 16) du += bpp;
+ SETIREGANDOR(SISSR, 0x0e, 0xf0, ((du >> 8) & 0x0f));
+ SETIREG(SISCR, 0x13, (du & 0xff));
+ du <<= 5;
+ tmp8 = du >> 8;
+ if (du & 0xff) tmp8++;
+ SETIREG(SISSR, 0x10, tmp8);
+ SETIREG(SISSR, 0x31, 0x00); /* VCLK */
+ SETIREG(SISSR, 0x2b, 0x1b);
+ SETIREG(SISSR, 0x2c, 0xe1);
+ SETIREG(SISSR, 0x2d, 0x01);
+ SETIREGAND(SISSR, 0x3d, 0xfe); /* FIFO */
+ SETIREG(SISSR, 0x08, 0xae);
+ SETIREGAND(SISSR, 0x09, 0xf0);
+ SETIREG(SISSR, 0x08, 0x34);
+ SETIREGOR(SISSR, 0x3d, 0x01);
+ SETIREGAND(SISSR, 0x1f, 0x3f); /* mode regs */
+ SETIREGANDOR(SISSR, 0x06, 0xc0, 0x0a);
+ SETIREG(SISCR, 0x19, 0x00);
+ SETIREGAND(SISCR, 0x1a, 0xfc);
+ SETIREGAND(SISSR, 0x0f, 0xb7);
+ SETIREGAND(SISSR, 0x31, 0xfb);
+ SETIREGANDOR(SISSR, 0x21, 0x1f, 0xa0);
+ SETIREGAND(SISSR, 0x32, 0xf3);
+ SETIREGANDOR(SISSR, 0x07, 0xf8, 0x03);
+ SETIREG(SISCR, 0x52, 0x6c);
+
+ SETIREG(SISCR, 0x0d, 0x00); /* adjust frame */
+ SETIREG(SISCR, 0x0c, 0x00);
+ SETIREG(SISSR, 0x0d, 0x00);
+ SETIREGAND(SISSR, 0x37, 0xfe);
+
+ SETIREG(SISCR, 0x32, 0x20);
+ SETIREGAND(SISSR, 0x01, 0xdf); /* enable display */
+ SETIREG(SISCR, 0x63, (cr63 & 0xbf));
+ SETIREG(SISSR, 0x31, (sr31 & 0xfb));
+
+ if (touchengines) {
+ SETIREG(SISSR, 0x20, 0xa1); /* enable engines */
+ SETIREGOR(SISSR, 0x1e, 0x5a);
+
+ SETIREG(SISSR, 0x26, 0x01); /* disable cmdqueue */
+ SETIREG(SISSR, 0x27, 0x1f);
+ SETIREG(SISSR, 0x26, 0x00);
+ }
+
+ SETIREG(SISCR, 0x34, 0x44); /* we just set std mode #44 */
+
+ return ret;
+}
+
+static int
+sisusb_init_gfxcore(struct sisusb_usb_data *sisusb)
+{
+ int ret = 0, i, j, bw, chab, iret, retry = 3;
+ u8 tmp8, ramtype;
+ u32 tmp32;
+ static const char mclktable[] = {
+ 0x3b, 0x22, 0x01, 143,
+ 0x3b, 0x22, 0x01, 143,
+ 0x3b, 0x22, 0x01, 143,
+ 0x3b, 0x22, 0x01, 143
+ };
+ static const char eclktable[] = {
+ 0x3b, 0x22, 0x01, 143,
+ 0x3b, 0x22, 0x01, 143,
+ 0x3b, 0x22, 0x01, 143,
+ 0x3b, 0x22, 0x01, 143
+ };
+ static const char ramtypetable1[] = {
+ 0x00, 0x04, 0x60, 0x60,
+ 0x0f, 0x0f, 0x1f, 0x1f,
+ 0xba, 0xba, 0xba, 0xba,
+ 0xa9, 0xa9, 0xac, 0xac,
+ 0xa0, 0xa0, 0xa0, 0xa8,
+ 0x00, 0x00, 0x02, 0x02,
+ 0x30, 0x30, 0x40, 0x40
+ };
+ static const char ramtypetable2[] = {
+ 0x77, 0x77, 0x44, 0x44,
+ 0x77, 0x77, 0x44, 0x44,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x5b, 0x5b, 0xab, 0xab,
+ 0x00, 0x00, 0xf0, 0xf8
+ };
+
+ while (retry--) {
+
+ /* Enable VGA */
+ ret = GETREG(SISVGAEN, &tmp8);
+ ret |= SETREG(SISVGAEN, (tmp8 | 0x01));
+
+ /* Enable GPU access to VRAM */
+ ret |= GETREG(SISMISCR, &tmp8);
+ ret |= SETREG(SISMISCW, (tmp8 | 0x01));
+
+ if (ret) continue;
+
+ /* Reset registers */
+ ret |= SETIREGAND(SISCR, 0x5b, 0xdf);
+ ret |= SETIREG(SISSR, 0x05, 0x86);
+ ret |= SETIREGOR(SISSR, 0x20, 0x01);
+
+ ret |= SETREG(SISMISCW, 0x67);
+
+ for (i = 0x06; i <= 0x1f; i++) {
+ ret |= SETIREG(SISSR, i, 0x00);
+ }
+ for (i = 0x21; i <= 0x27; i++) {
+ ret |= SETIREG(SISSR, i, 0x00);
+ }
+ for (i = 0x31; i <= 0x3d; i++) {
+ ret |= SETIREG(SISSR, i, 0x00);
+ }
+ for (i = 0x12; i <= 0x1b; i++) {
+ ret |= SETIREG(SISSR, i, 0x00);
+ }
+ for (i = 0x79; i <= 0x7c; i++) {
+ ret |= SETIREG(SISCR, i, 0x00);
+ }
+
+ if (ret) continue;
+
+ ret |= SETIREG(SISCR, 0x63, 0x80);
+
+ ret |= GETIREG(SISSR, 0x3a, &ramtype);
+ ramtype &= 0x03;
+
+ ret |= SETIREG(SISSR, 0x28, mclktable[ramtype * 4]);
+ ret |= SETIREG(SISSR, 0x29, mclktable[(ramtype * 4) + 1]);
+ ret |= SETIREG(SISSR, 0x2a, mclktable[(ramtype * 4) + 2]);
+
+ ret |= SETIREG(SISSR, 0x2e, eclktable[ramtype * 4]);
+ ret |= SETIREG(SISSR, 0x2f, eclktable[(ramtype * 4) + 1]);
+ ret |= SETIREG(SISSR, 0x30, eclktable[(ramtype * 4) + 2]);
+
+ ret |= SETIREG(SISSR, 0x07, 0x18);
+ ret |= SETIREG(SISSR, 0x11, 0x0f);
+
+ if (ret) continue;
+
+ for (i = 0x15, j = 0; i <= 0x1b; i++, j++) {
+ ret |= SETIREG(SISSR, i, ramtypetable1[(j*4) + ramtype]);
+ }
+ for (i = 0x40, j = 0; i <= 0x44; i++, j++) {
+ ret |= SETIREG(SISCR, i, ramtypetable2[(j*4) + ramtype]);
+ }
+
+ ret |= SETIREG(SISCR, 0x49, 0xaa);
+
+ ret |= SETIREG(SISSR, 0x1f, 0x00);
+ ret |= SETIREG(SISSR, 0x20, 0xa0);
+ ret |= SETIREG(SISSR, 0x23, 0xf6);
+ ret |= SETIREG(SISSR, 0x24, 0x0d);
+ ret |= SETIREG(SISSR, 0x25, 0x33);
+
+ ret |= SETIREG(SISSR, 0x11, 0x0f);
+
+ ret |= SETIREGOR(SISPART1, 0x2f, 0x01);
+
+ ret |= SETIREGAND(SISCAP, 0x3f, 0xef);
+
+ if (ret) continue;
+
+ ret |= SETIREG(SISPART1, 0x00, 0x00);
+
+ ret |= GETIREG(SISSR, 0x13, &tmp8);
+ tmp8 >>= 4;
+
+ ret |= SETIREG(SISPART1, 0x02, 0x00);
+ ret |= SETIREG(SISPART1, 0x2e, 0x08);
+
+ ret |= sisusb_read_pci_config(sisusb, 0x50, &tmp32);
+ tmp32 &= 0x00f00000;
+ tmp8 = (tmp32 == 0x100000) ? 0x33 : 0x03;
+ ret |= SETIREG(SISSR, 0x25, tmp8);
+ tmp8 = (tmp32 == 0x100000) ? 0xaa : 0x88;
+ ret |= SETIREG(SISCR, 0x49, tmp8);
+
+ ret |= SETIREG(SISSR, 0x27, 0x1f);
+ ret |= SETIREG(SISSR, 0x31, 0x00);
+ ret |= SETIREG(SISSR, 0x32, 0x11);
+ ret |= SETIREG(SISSR, 0x33, 0x00);
+
+ if (ret) continue;
+
+ ret |= SETIREG(SISCR, 0x83, 0x00);
+
+ ret |= sisusb_set_default_mode(sisusb, 0);
+
+ ret |= SETIREGAND(SISSR, 0x21, 0xdf);
+ ret |= SETIREGOR(SISSR, 0x01, 0x20);
+ ret |= SETIREGOR(SISSR, 0x16, 0x0f);
+
+ ret |= sisusb_triggersr16(sisusb, ramtype);
+
+ /* Disable refresh */
+ ret |= SETIREGAND(SISSR, 0x17, 0xf8);
+ ret |= SETIREGOR(SISSR, 0x19, 0x03);
+
+ ret |= sisusb_getbuswidth(sisusb, &bw, &chab);
+ ret |= sisusb_verify_mclk(sisusb);
+
+ if (ramtype <= 1) {
+ ret |= sisusb_get_sdram_size(sisusb, &iret, bw, chab);
+ if (iret) {
+ printk(KERN_ERR "sisusbvga[%d]: RAM size "
+ "detection failed, "
+ "assuming 8MB video RAM\n",
+ sisusb->minor);
+ ret |= SETIREG(SISSR,0x14,0x31);
+ /* TODO */
+ }
+ } else {
+ printk(KERN_ERR "sisusbvga[%d]: DDR RAM device found, "
+ "assuming 8MB video RAM\n",
+ sisusb->minor);
+ ret |= SETIREG(SISSR,0x14,0x31);
+ /* *** TODO *** */
+ }
+
+ /* Enable refresh */
+ ret |= SETIREG(SISSR, 0x16, ramtypetable1[4 + ramtype]);
+ ret |= SETIREG(SISSR, 0x17, ramtypetable1[8 + ramtype]);
+ ret |= SETIREG(SISSR, 0x19, ramtypetable1[16 + ramtype]);
+
+ ret |= SETIREGOR(SISSR, 0x21, 0x20);
+
+ ret |= SETIREG(SISSR, 0x22, 0xfb);
+ ret |= SETIREG(SISSR, 0x21, 0xa5);
+
+ if (ret == 0)
+ break;
+ }
+
+ return ret;
+}
+
+#undef SETREG
+#undef GETREG
+#undef SETIREG
+#undef GETIREG
+#undef SETIREGOR
+#undef SETIREGAND
+#undef SETIREGANDOR
+#undef READL
+#undef WRITEL
+
+static void
+sisusb_get_ramconfig(struct sisusb_usb_data *sisusb)
+{
+ u8 tmp8, tmp82, ramtype;
+ int bw = 0;
+ char *ramtypetext1 = NULL;
+ const char *ramtypetext2[] = { "SDR SDRAM", "SDR SGRAM",
+ "DDR SDRAM", "DDR SGRAM" };
+ static const int busSDR[4] = {64, 64, 128, 128};
+ static const int busDDR[4] = {32, 32, 64, 64};
+ static const int busDDRA[4] = {64+32, 64+32 , (64+32)*2, (64+32)*2};
+
+ sisusb_getidxreg(sisusb, SISSR, 0x14, &tmp8);
+ sisusb_getidxreg(sisusb, SISSR, 0x15, &tmp82);
+ sisusb_getidxreg(sisusb, SISSR, 0x3a, &ramtype);
+ sisusb->vramsize = (1 << ((tmp8 & 0xf0) >> 4)) * 1024 * 1024;
+ ramtype &= 0x03;
+ switch ((tmp8 >> 2) & 0x03) {
+ case 0: ramtypetext1 = "1 ch/1 r";
+ if (tmp82 & 0x10) {
+ bw = 32;
+ } else {
+ bw = busSDR[(tmp8 & 0x03)];
+ }
+ break;
+ case 1: ramtypetext1 = "1 ch/2 r";
+ sisusb->vramsize <<= 1;
+ bw = busSDR[(tmp8 & 0x03)];
+ break;
+ case 2: ramtypetext1 = "asymmeric";
+ sisusb->vramsize += sisusb->vramsize/2;
+ bw = busDDRA[(tmp8 & 0x03)];
+ break;
+ case 3: ramtypetext1 = "2 channel";
+ sisusb->vramsize <<= 1;
+ bw = busDDR[(tmp8 & 0x03)];
+ break;
+ }
+
+ printk(KERN_INFO "sisusbvga[%d]: %dMB %s %s, bus width %d\n",
+ sisusb->minor, (sisusb->vramsize >> 20), ramtypetext1,
+ ramtypetext2[ramtype], bw);
+}
+
+static int
+sisusb_do_init_gfxdevice(struct sisusb_usb_data *sisusb)
+{
+ struct sisusb_packet packet;
+ int ret;
+ u32 tmp32;
+
+ /* Do some magic */
+ packet.header = 0x001f;
+ packet.address = 0x00000324;
+ packet.data = 0x00000004;
+ ret = sisusb_send_bridge_packet(sisusb, 10, &packet, 0);
+
+ packet.header = 0x001f;
+ packet.address = 0x00000364;
+ packet.data = 0x00000004;
+ ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0);
+
+ packet.header = 0x001f;
+ packet.address = 0x00000384;
+ packet.data = 0x00000004;
+ ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0);
+
+ packet.header = 0x001f;
+ packet.address = 0x00000100;
+ packet.data = 0x00000700;
+ ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0);
+
+ packet.header = 0x000f;
+ packet.address = 0x00000004;
+ ret |= sisusb_send_bridge_packet(sisusb, 6, &packet, 0);
+ packet.data |= 0x17;
+ ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0);
+
+ /* Init BAR 0 (VRAM) */
+ ret |= sisusb_read_pci_config(sisusb, 0x10, &tmp32);
+ ret |= sisusb_write_pci_config(sisusb, 0x10, 0xfffffff0);
+ ret |= sisusb_read_pci_config(sisusb, 0x10, &tmp32);
+ tmp32 &= 0x0f;
+ tmp32 |= SISUSB_PCI_MEMBASE;
+ ret |= sisusb_write_pci_config(sisusb, 0x10, tmp32);
+
+ /* Init BAR 1 (MMIO) */
+ ret |= sisusb_read_pci_config(sisusb, 0x14, &tmp32);
+ ret |= sisusb_write_pci_config(sisusb, 0x14, 0xfffffff0);
+ ret |= sisusb_read_pci_config(sisusb, 0x14, &tmp32);
+ tmp32 &= 0x0f;
+ tmp32 |= SISUSB_PCI_MMIOBASE;
+ ret |= sisusb_write_pci_config(sisusb, 0x14, tmp32);
+
+ /* Init BAR 2 (i/o ports) */
+ ret |= sisusb_read_pci_config(sisusb, 0x18, &tmp32);
+ ret |= sisusb_write_pci_config(sisusb, 0x18, 0xfffffff0);
+ ret |= sisusb_read_pci_config(sisusb, 0x18, &tmp32);
+ tmp32 &= 0x0f;
+ tmp32 |= SISUSB_PCI_IOPORTBASE;
+ ret |= sisusb_write_pci_config(sisusb, 0x18, tmp32);
+
+ /* Enable memory and i/o access */
+ ret |= sisusb_read_pci_config(sisusb, 0x04, &tmp32);
+ tmp32 |= 0x3;
+ ret |= sisusb_write_pci_config(sisusb, 0x04, tmp32);
+
+ if (ret == 0) {
+ /* Some further magic */
+ packet.header = 0x001f;
+ packet.address = 0x00000050;
+ packet.data = 0x000000ff;
+ ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0);
+ }
+
+ return ret;
+}
+
+/* Initialize the graphics device (return 0 on success)
+ * This initializes the net2280 as well as the PCI registers
+ * of the graphics board.
+ */
+
+static int
+sisusb_init_gfxdevice(struct sisusb_usb_data *sisusb, int initscreen)
+{
+ int ret = 0, test = 0;
+ u32 tmp32;
+
+ if (sisusb->devinit == 1) {
+ /* Read PCI BARs and see if they have been set up */
+ ret |= sisusb_read_pci_config(sisusb, 0x10, &tmp32);
+ if (ret) return ret;
+ if ((tmp32 & 0xfffffff0) == SISUSB_PCI_MEMBASE) test++;
+
+ ret |= sisusb_read_pci_config(sisusb, 0x14, &tmp32);
+ if (ret) return ret;
+ if ((tmp32 & 0xfffffff0) == SISUSB_PCI_MMIOBASE) test++;
+
+ ret |= sisusb_read_pci_config(sisusb, 0x18, &tmp32);
+ if (ret) return ret;
+ if ((tmp32 & 0xfffffff0) == SISUSB_PCI_IOPORTBASE) test++;
+ }
+
+ /* No? So reset the device */
+ if ((sisusb->devinit == 0) || (test != 3)) {
+
+ ret |= sisusb_do_init_gfxdevice(sisusb);
+
+ if (ret == 0)
+ sisusb->devinit = 1;
+
+ }
+
+ if (sisusb->devinit) {
+ /* Initialize the graphics core */
+ if (sisusb_init_gfxcore(sisusb) == 0) {
+ sisusb->gfxinit = 1;
+ sisusb_get_ramconfig(sisusb);
+ ret |= sisusb_set_default_mode(sisusb, 1);
+ ret |= sisusb_setup_screen(sisusb, 1, initscreen);
+ }
+ }
+
+ return ret;
+}
+
+/* fops */
+
+static int
+sisusb_open(struct inode *inode, struct file *file)
+{
+ struct sisusb_usb_data *sisusb;
+ struct usb_interface *interface;
+ int subminor = iminor(inode);
+
+ down(&disconnect_sem);
+
+ if (!(interface = usb_find_interface(&sisusb_driver, subminor))) {
+ printk(KERN_ERR "sisusb[%d]: Failed to find interface\n",
+ subminor);
+ up(&disconnect_sem);
+ return -ENODEV;
+ }
+
+ if (!(sisusb = usb_get_intfdata(interface))) {
+ up(&disconnect_sem);
+ return -ENODEV;
+ }
+
+ down(&sisusb->lock);
+
+ if (!sisusb->present || !sisusb->ready) {
+ up(&sisusb->lock);
+ up(&disconnect_sem);
+ return -ENODEV;
+ }
+
+ if (sisusb->isopen) {
+ up(&sisusb->lock);
+ up(&disconnect_sem);
+ return -EBUSY;
+ }
+
+ if (!sisusb->devinit) {
+ if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH) {
+ if (sisusb_init_gfxdevice(sisusb, 0)) {
+ up(&sisusb->lock);
+ up(&disconnect_sem);
+ printk(KERN_ERR
+ "sisusbvga[%d]: Failed to initialize "
+ "device\n",
+ sisusb->minor);
+ return -EIO;
+ }
+ } else {
+ up(&sisusb->lock);
+ up(&disconnect_sem);
+ printk(KERN_ERR
+ "sisusbvga[%d]: Device not attached to "
+ "USB 2.0 hub\n",
+ sisusb->minor);
+ return -EIO;
+ }
+ }
+
+ /* increment usage count for the device */
+ kref_get(&sisusb->kref);
+
+ sisusb->isopen = 1;
+
+ file->private_data = sisusb;
+
+ up(&sisusb->lock);
+
+ up(&disconnect_sem);
+
+ printk(KERN_DEBUG "sisusbvga[%d]: opened", sisusb->minor);
+
+ return 0;
+}
+
+static void
+sisusb_delete(struct kref *kref)
+{
+ struct sisusb_usb_data *sisusb = to_sisusb_dev(kref);
+
+ if (!sisusb)
+ return;
+
+ if (sisusb->sisusb_dev)
+ usb_put_dev(sisusb->sisusb_dev);
+
+ sisusb->sisusb_dev = NULL;
+ sisusb_free_buffers(sisusb);
+ sisusb_free_urbs(sisusb);
+ kfree(sisusb);
+}
+
+static int
+sisusb_release(struct inode *inode, struct file *file)
+{
+ struct sisusb_usb_data *sisusb;
+ int myminor;
+
+ down(&disconnect_sem);
+
+ if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) {
+ up(&disconnect_sem);
+ return -ENODEV;
+ }
+
+ down(&sisusb->lock);
+
+ if (sisusb->present) {
+ /* Wait for all URBs to finish if device still present */
+ if (!sisusb_wait_all_out_complete(sisusb))
+ sisusb_kill_all_busy(sisusb);
+ }
+
+ myminor = sisusb->minor;
+
+ sisusb->isopen = 0;
+ file->private_data = NULL;
+
+ up(&sisusb->lock);
+
+ /* decrement the usage count on our device */
+ kref_put(&sisusb->kref, sisusb_delete);
+
+ up(&disconnect_sem);
+
+ printk(KERN_DEBUG "sisusbvga[%d]: released", myminor);
+
+ return 0;
+}
+
+static ssize_t
+sisusb_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
+{
+ struct sisusb_usb_data *sisusb;
+ ssize_t bytes_read = 0;
+ int errno = 0;
+ u8 buf8;
+ u16 buf16;
+ u32 buf32, address;
+
+ if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
+ return -ENODEV;
+
+ down(&sisusb->lock);
+
+ /* Sanity check */
+ if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) {
+ up(&sisusb->lock);
+ return -ENODEV;
+ }
+
+ if ((*ppos) >= SISUSB_PCI_PSEUDO_IOPORTBASE &&
+ (*ppos) < SISUSB_PCI_PSEUDO_IOPORTBASE + 128) {
+
+ address = (*ppos) -
+ SISUSB_PCI_PSEUDO_IOPORTBASE +
+ SISUSB_PCI_IOPORTBASE;
+
+ /* Read i/o ports
+ * Byte, word and long(32) can be read. As this
+ * emulates inX instructions, the data returned is
+ * in machine-endianness.
+ */
+ switch (count) {
+
+ case 1:
+ if (sisusb_read_memio_byte(sisusb,
+ SISUSB_TYPE_IO,
+ address, &buf8))
+ errno = -EIO;
+ else if (put_user(buf8, (u8 __user *)buffer))
+ errno = -EFAULT;
+ else
+ bytes_read = 1;
+
+ break;
+
+ case 2:
+ if (sisusb_read_memio_word(sisusb,
+ SISUSB_TYPE_IO,
+ address, &buf16))
+ errno = -EIO;
+ else if (put_user(buf16, (u16 __user *)buffer))
+ errno = -EFAULT;
+ else
+ bytes_read = 2;
+
+ break;
+
+ case 4:
+ if (sisusb_read_memio_long(sisusb,
+ SISUSB_TYPE_IO,
+ address, &buf32))
+ errno = -EIO;
+ else if (put_user(buf32, (u32 __user *)buffer))
+ errno = -EFAULT;
+ else
+ bytes_read = 4;
+
+ break;
+
+ default:
+ errno = -EIO;
+
+ }
+
+ } else if ((*ppos) >= SISUSB_PCI_PSEUDO_MEMBASE &&
+ (*ppos) < SISUSB_PCI_PSEUDO_MEMBASE + sisusb->vramsize) {
+
+ address = (*ppos) -
+ SISUSB_PCI_PSEUDO_MEMBASE +
+ SISUSB_PCI_MEMBASE;
+
+ /* Read video ram
+ * Remember: Data delivered is never endian-corrected
+ */
+ errno = sisusb_read_mem_bulk(sisusb, address,
+ NULL, count, buffer, &bytes_read);
+
+ if (bytes_read)
+ errno = bytes_read;
+
+ } else if ((*ppos) >= SISUSB_PCI_PSEUDO_MMIOBASE &&
+ (*ppos) < SISUSB_PCI_PSEUDO_MMIOBASE + SISUSB_PCI_MMIOSIZE) {
+
+ address = (*ppos) -
+ SISUSB_PCI_PSEUDO_MMIOBASE +
+ SISUSB_PCI_MMIOBASE;
+
+ /* Read MMIO
+ * Remember: Data delivered is never endian-corrected
+ */
+ errno = sisusb_read_mem_bulk(sisusb, address,
+ NULL, count, buffer, &bytes_read);
+
+ if (bytes_read)
+ errno = bytes_read;
+
+ } else if ((*ppos) >= SISUSB_PCI_PSEUDO_PCIBASE &&
+ (*ppos) <= SISUSB_PCI_PSEUDO_PCIBASE + 0x5c) {
+
+ if (count != 4) {
+ up(&sisusb->lock);
+ return -EINVAL;
+ }
+
+ address = (*ppos) - SISUSB_PCI_PSEUDO_PCIBASE;
+
+ /* Read PCI config register
+ * Return value delivered in machine endianness.
+ */
+ if (sisusb_read_pci_config(sisusb, address, &buf32))
+ errno = -EIO;
+ else if (put_user(buf32, (u32 __user *)buffer))
+ errno = -EFAULT;
+ else
+ bytes_read = 4;
+
+ } else {
+
+ errno = -EBADFD;
+
+ }
+
+ (*ppos) += bytes_read;
+
+ up(&sisusb->lock);
+
+ return errno ? errno : bytes_read;
+}
+
+static ssize_t
+sisusb_write(struct file *file, const char __user *buffer, size_t count,
+ loff_t *ppos)
+{
+ struct sisusb_usb_data *sisusb;
+ int errno = 0;
+ ssize_t bytes_written = 0;
+ u8 buf8;
+ u16 buf16;
+ u32 buf32, address;
+
+ if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
+ return -ENODEV;
+
+ down(&sisusb->lock);
+
+ /* Sanity check */
+ if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) {
+ up(&sisusb->lock);
+ return -ENODEV;
+ }
+
+ if ((*ppos) >= SISUSB_PCI_PSEUDO_IOPORTBASE &&
+ (*ppos) < SISUSB_PCI_PSEUDO_IOPORTBASE + 128) {
+
+ address = (*ppos) -
+ SISUSB_PCI_PSEUDO_IOPORTBASE +
+ SISUSB_PCI_IOPORTBASE;
+
+ /* Write i/o ports
+ * Byte, word and long(32) can be written. As this
+ * emulates outX instructions, the data is expected
+ * in machine-endianness.
+ */
+ switch (count) {
+
+ case 1:
+ if (get_user(buf8, (u8 __user *)buffer))
+ errno = -EFAULT;
+ else if (sisusb_write_memio_byte(sisusb,
+ SISUSB_TYPE_IO,
+ address, buf8))
+ errno = -EIO;
+ else
+ bytes_written = 1;
+
+ break;
+
+ case 2:
+ if (get_user(buf16, (u16 __user *)buffer))
+ errno = -EFAULT;
+ else if (sisusb_write_memio_word(sisusb,
+ SISUSB_TYPE_IO,
+ address, buf16))
+ errno = -EIO;
+ else
+ bytes_written = 2;
+
+ break;
+
+ case 4:
+ if (get_user(buf32, (u32 __user *)buffer))
+ errno = -EFAULT;
+ else if (sisusb_write_memio_long(sisusb,
+ SISUSB_TYPE_IO,
+ address, buf32))
+ errno = -EIO;
+ else
+ bytes_written = 4;
+
+ break;
+
+ default:
+ errno = -EIO;
+ }
+
+ } else if ((*ppos) >= SISUSB_PCI_PSEUDO_MEMBASE &&
+ (*ppos) < SISUSB_PCI_PSEUDO_MEMBASE + sisusb->vramsize) {
+
+ address = (*ppos) -
+ SISUSB_PCI_PSEUDO_MEMBASE +
+ SISUSB_PCI_MEMBASE;
+
+ /* Write video ram.
+ * Buffer is copied 1:1, therefore, on big-endian
+ * machines, the data must be swapped by userland
+ * in advance (if applicable; no swapping in 8bpp
+ * mode or if YUV data is being transferred).
+ */
+ errno = sisusb_write_mem_bulk(sisusb, address, NULL,
+ count, buffer, 0, &bytes_written);
+
+ if (bytes_written)
+ errno = bytes_written;
+
+ } else if ((*ppos) >= SISUSB_PCI_PSEUDO_MMIOBASE &&
+ (*ppos) < SISUSB_PCI_PSEUDO_MMIOBASE + SISUSB_PCI_MMIOSIZE) {
+
+ address = (*ppos) -
+ SISUSB_PCI_PSEUDO_MMIOBASE +
+ SISUSB_PCI_MMIOBASE;
+
+ /* Write MMIO.
+ * Buffer is copied 1:1, therefore, on big-endian
+ * machines, the data must be swapped by userland
+ * in advance.
+ */
+ errno = sisusb_write_mem_bulk(sisusb, address, NULL,
+ count, buffer, 0, &bytes_written);
+
+ if (bytes_written)
+ errno = bytes_written;
+
+ } else if ((*ppos) >= SISUSB_PCI_PSEUDO_PCIBASE &&
+ (*ppos) <= SISUSB_PCI_PSEUDO_PCIBASE + SISUSB_PCI_PCONFSIZE) {
+
+ if (count != 4) {
+ up(&sisusb->lock);
+ return -EINVAL;
+ }
+
+ address = (*ppos) - SISUSB_PCI_PSEUDO_PCIBASE;
+
+ /* Write PCI config register.
+ * Given value expected in machine endianness.
+ */
+ if (get_user(buf32, (u32 __user *)buffer))
+ errno = -EFAULT;
+ else if (sisusb_write_pci_config(sisusb, address, buf32))
+ errno = -EIO;
+ else
+ bytes_written = 4;
+
+
+ } else {
+
+ /* Error */
+ errno = -EBADFD;
+
+ }
+
+ (*ppos) += bytes_written;
+
+ up(&sisusb->lock);
+
+ return errno ? errno : bytes_written;
+}
+
+static loff_t
+sisusb_lseek(struct file *file, loff_t offset, int orig)
+{
+ struct sisusb_usb_data *sisusb;
+ loff_t ret;
+
+ if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
+ return -ENODEV;
+
+ down(&sisusb->lock);
+
+ /* Sanity check */
+ if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) {
+ up(&sisusb->lock);
+ return -ENODEV;
+ }
+
+ switch (orig) {
+ case 0:
+ file->f_pos = offset;
+ ret = file->f_pos;
+ /* never negative, no force_successful_syscall needed */
+ break;
+ case 1:
+ file->f_pos += offset;
+ ret = file->f_pos;
+ /* never negative, no force_successful_syscall needed */
+ break;
+ default:
+ /* seeking relative to "end of file" is not supported */
+ ret = -EINVAL;
+ }
+
+ up(&sisusb->lock);
+ return ret;
+}
+
+static int
+sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y,
+ unsigned long arg)
+{
+ int retval, port, length;
+ u32 address;
+
+ port = y->data3 -
+ SISUSB_PCI_PSEUDO_IOPORTBASE +
+ SISUSB_PCI_IOPORTBASE;
+
+ switch (y->operation) {
+ case SUCMD_GET:
+ retval = sisusb_getidxreg(sisusb, port,
+ y->data0, &y->data1);
+ if (!retval) {
+ if (copy_to_user((void __user *)arg, y,
+ sizeof(*y)))
+ retval = -EFAULT;
+ }
+ break;
+
+ case SUCMD_SET:
+ retval = sisusb_setidxreg(sisusb, port,
+ y->data0, y->data1);
+ break;
+
+ case SUCMD_SETOR:
+ retval = sisusb_setidxregor(sisusb, port,
+ y->data0, y->data1);
+ break;
+
+ case SUCMD_SETAND:
+ retval = sisusb_setidxregand(sisusb, port,
+ y->data0, y->data1);
+ break;
+
+ case SUCMD_SETANDOR:
+ retval = sisusb_setidxregandor(sisusb, port,
+ y->data0, y->data1, y->data2);
+ break;
+
+ case SUCMD_SETMASK:
+ retval = sisusb_setidxregmask(sisusb, port,
+ y->data0, y->data1, y->data2);
+ break;
+
+ case SUCMD_CLRSCR:
+ length = (y->data0 << 16) | (y->data1 << 8) | y->data2;
+ address = y->data3 -
+ SISUSB_PCI_PSEUDO_MEMBASE +
+ SISUSB_PCI_MEMBASE;
+ retval = sisusb_clear_vram(sisusb, address, length);
+ break;
+
+ default:
+ retval = -EINVAL;
+ }
+
+ if(retval > 0)
+ retval = -EIO;
+
+ return retval;
+}
+
+static int
+sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+ unsigned long arg)
+{
+ struct sisusb_usb_data *sisusb;
+ struct sisusb_info x;
+ struct sisusb_command y;
+ int retval = 0;
+ u32 __user *argp = (u32 __user *)arg;
+
+ if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
+ return -ENODEV;
+
+ down(&sisusb->lock);
+
+ /* Sanity check */
+ if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) {
+ retval = -ENODEV;
+ goto err_out;
+ }
+
+ switch (cmd) {
+
+ case SISUSB_GET_CONFIG_SIZE:
+
+ if (put_user(sizeof(x), argp))
+ retval = -EFAULT;
+
+ break;
+
+ case SISUSB_GET_CONFIG:
+
+ x.sisusb_id = SISUSB_ID;
+ x.sisusb_version = SISUSB_VERSION;
+ x.sisusb_revision = SISUSB_REVISION;
+ x.sisusb_patchlevel = SISUSB_PATCHLEVEL;
+ x.sisusb_gfxinit = sisusb->gfxinit;
+ x.sisusb_vrambase = SISUSB_PCI_PSEUDO_MEMBASE;
+ x.sisusb_mmiobase = SISUSB_PCI_PSEUDO_MMIOBASE;
+ x.sisusb_iobase = SISUSB_PCI_PSEUDO_IOPORTBASE;
+ x.sisusb_pcibase = SISUSB_PCI_PSEUDO_PCIBASE;
+ x.sisusb_vramsize = sisusb->vramsize;
+ x.sisusb_minor = sisusb->minor;
+ x.sisusb_fbdevactive= 0;
+
+ if (copy_to_user((void __user *)arg, &x, sizeof(x)))
+ retval = -EFAULT;
+
+ break;
+
+ case SISUSB_COMMAND:
+
+ if (copy_from_user(&y, (void __user *)arg, sizeof(y)))
+ retval = -EFAULT;
+ else
+ retval = sisusb_handle_command(sisusb, &y, arg);
+
+ break;
+
+ default:
+ retval = -EINVAL;
+ break;
+ }
+
+err_out:
+ up(&sisusb->lock);
+ return retval;
+}
+
+#ifdef SISUSB_NEW_CONFIG_COMPAT
+static long
+sisusb_compat_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
+{
+ long retval;
+
+ switch (cmd) {
+ case SISUSB_GET_CONFIG_SIZE:
+ case SISUSB_GET_CONFIG:
+ case SISUSB_COMMAND:
+ lock_kernel();
+ retval = sisusb_ioctl(f->f_dentry->d_inode, f, cmd, arg);
+ unlock_kernel();
+ return retval;
+
+ default:
+ return -ENOIOCTLCMD;
+ }
+}
+#endif
+
+static struct file_operations usb_sisusb_fops = {
+ .owner = THIS_MODULE,
+ .open = sisusb_open,
+ .release = sisusb_release,
+ .read = sisusb_read,
+ .write = sisusb_write,
+ .llseek = sisusb_lseek,
+#ifdef SISUSB_NEW_CONFIG_COMPAT
+ .compat_ioctl = sisusb_compat_ioctl,
+#endif
+ .ioctl = sisusb_ioctl
+};
+
+static struct usb_class_driver usb_sisusb_class = {
+ .name = "usb/sisusbvga%d",
+ .fops = &usb_sisusb_fops,
+ .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP,
+ .minor_base = SISUSB_MINOR
+};
+
+static int sisusb_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct sisusb_usb_data *sisusb;
+ int retval = 0, i;
+ const char *memfail =
+ KERN_ERR
+ "sisusbvga[%d]: Failed to allocate memory for %s buffer\n";
+
+ printk(KERN_INFO "sisusb: USB2VGA dongle found at address %d\n",
+ dev->devnum);
+
+ /* Allocate memory for our private */
+ if (!(sisusb = kmalloc(sizeof(*sisusb), GFP_KERNEL))) {
+ printk(KERN_ERR
+ "sisusb: Failed to allocate memory for private data\n");
+ return -ENOMEM;
+ }
+ memset(sisusb, 0, sizeof(*sisusb));
+ kref_init(&sisusb->kref);
+
+ init_MUTEX(&(sisusb->lock));
+
+ /* Register device */
+ if ((retval = usb_register_dev(intf, &usb_sisusb_class))) {
+ printk(KERN_ERR
+ "sisusb: Failed to get a minor for device %d\n",
+ dev->devnum);
+ retval = -ENODEV;
+ goto error_1;
+ }
+
+ sisusb->sisusb_dev = dev;
+ sisusb->minor = intf->minor;
+ sisusb->vrambase = SISUSB_PCI_MEMBASE;
+ sisusb->mmiobase = SISUSB_PCI_MMIOBASE;
+ sisusb->mmiosize = SISUSB_PCI_MMIOSIZE;
+ sisusb->ioportbase = SISUSB_PCI_IOPORTBASE;
+ /* Everything else is zero */
+
+ /* Allocate buffers */
+ sisusb->ibufsize = SISUSB_IBUF_SIZE;
+ if (!(sisusb->ibuf = usb_buffer_alloc(dev, SISUSB_IBUF_SIZE,
+ GFP_KERNEL, &sisusb->transfer_dma_in))) {
+ printk(memfail, "input", sisusb->minor);
+ retval = -ENOMEM;
+ goto error_2;
+ }
+
+ sisusb->numobufs = 0;
+ sisusb->obufsize = SISUSB_OBUF_SIZE;
+ for (i = 0; i < NUMOBUFS; i++) {
+ if (!(sisusb->obuf[i] = usb_buffer_alloc(dev, SISUSB_OBUF_SIZE,
+ GFP_KERNEL,
+ &sisusb->transfer_dma_out[i]))) {
+ if (i == 0) {
+ printk(memfail, "output", sisusb->minor);
+ retval = -ENOMEM;
+ goto error_3;
+ }
+ break;
+ } else
+ sisusb->numobufs++;
+
+ }
+
+ /* Allocate URBs */
+ if (!(sisusb->sisurbin = usb_alloc_urb(0, GFP_KERNEL))) {
+ printk(KERN_ERR
+ "sisusbvga[%d]: Failed to allocate URBs\n",
+ sisusb->minor);
+ retval = -ENOMEM;
+ goto error_3;
+ }
+ sisusb->completein = 1;
+
+ for (i = 0; i < sisusb->numobufs; i++) {
+ if (!(sisusb->sisurbout[i] = usb_alloc_urb(0, GFP_KERNEL))) {
+ printk(KERN_ERR
+ "sisusbvga[%d]: Failed to allocate URBs\n",
+ sisusb->minor);
+ retval = -ENOMEM;
+ goto error_4;
+ }
+ sisusb->urbout_context[i].sisusb = (void *)sisusb;
+ sisusb->urbout_context[i].urbindex = i;
+ sisusb->urbstatus[i] = 0;
+ }
+
+ printk(KERN_INFO "sisusbvga[%d]: Allocated %d output buffers\n",
+ sisusb->minor, sisusb->numobufs);
+
+ /* Do remaining init stuff */
+
+ init_waitqueue_head(&sisusb->wait_q);
+
+ usb_set_intfdata(intf, sisusb);
+
+#ifdef SISUSB_OLD_CONFIG_COMPAT
+ {
+ int ret;
+ /* Our ioctls are all "32/64bit compatible" */
+ ret = register_ioctl32_conversion(SISUSB_GET_CONFIG_SIZE, NULL);
+ ret |= register_ioctl32_conversion(SISUSB_GET_CONFIG, NULL);
+ ret |= register_ioctl32_conversion(SISUSB_COMMAND, NULL);
+ if (ret)
+ printk(KERN_ERR
+ "sisusbvga[%d]: Error registering ioctl32 "
+ "translations\n",
+ sisusb->minor);
+ else
+ sisusb->ioctl32registered = 1;
+
+ }
+#endif
+
+ sisusb->present = 1;
+
+ if (dev->speed == USB_SPEED_HIGH) {
+ if (sisusb_init_gfxdevice(sisusb, 1))
+ printk(KERN_ERR
+ "sisusbvga[%d]: Failed to early "
+ "initialize device\n",
+ sisusb->minor);
+
+ } else
+ printk(KERN_INFO
+ "sisusbvga[%d]: Not attached to USB 2.0 hub, "
+ "deferring init\n",
+ sisusb->minor);
+
+ sisusb->ready = 1;
+
+ return 0;
+
+error_4:
+ sisusb_free_urbs(sisusb);
+error_3:
+ sisusb_free_buffers(sisusb);
+error_2:
+ usb_deregister_dev(intf, &usb_sisusb_class);
+error_1:
+ kfree(sisusb);
+ return retval;
+}
+
+static void sisusb_disconnect(struct usb_interface *intf)
+{
+ struct sisusb_usb_data *sisusb;
+ int minor;
+
+ down(&disconnect_sem);
+
+ /* This should *not* happen */
+ if (!(sisusb = usb_get_intfdata(intf))) {
+ up(&disconnect_sem);
+ return;
+ }
+
+ down(&sisusb->lock);
+
+ /* Wait for all URBs to complete and kill them in case (MUST do) */
+ if (!sisusb_wait_all_out_complete(sisusb))
+ sisusb_kill_all_busy(sisusb);
+
+ minor = sisusb->minor;
+
+ usb_set_intfdata(intf, NULL);
+
+ usb_deregister_dev(intf, &usb_sisusb_class);
+
+#ifdef SISUSB_OLD_CONFIG_COMPAT
+ if (sisusb->ioctl32registered) {
+ int ret;
+ sisusb->ioctl32registered = 0;
+ ret = unregister_ioctl32_conversion(SISUSB_GET_CONFIG_SIZE);
+ ret |= unregister_ioctl32_conversion(SISUSB_GET_CONFIG);
+ ret |= unregister_ioctl32_conversion(SISUSB_COMMAND);
+ if (ret) {
+ printk(KERN_ERR
+ "sisusbvga[%d]: Error unregistering "
+ "ioctl32 translations\n",
+ minor);
+ }
+ }
+#endif
+
+ sisusb->present = 0;
+ sisusb->ready = 0;
+
+ up(&sisusb->lock);
+
+ /* decrement our usage count */
+ kref_put(&sisusb->kref, sisusb_delete);
+
+ up(&disconnect_sem);
+
+ printk(KERN_INFO "sisusbvga[%d]: Disconnected\n", minor);
+}
+
+static struct usb_device_id sisusb_table [] = {
+ { USB_DEVICE(0x0711, 0x0900) },
+ { }
+};
+
+MODULE_DEVICE_TABLE (usb, sisusb_table);
+
+static struct usb_driver sisusb_driver = {
+ .owner = THIS_MODULE,
+ .name = "sisusb",
+ .probe = sisusb_probe,
+ .disconnect = sisusb_disconnect,
+ .id_table = sisusb_table
+};
+
+static int __init usb_sisusb_init(void)
+{
+ int retval;
+
+ if (!(retval = usb_register(&sisusb_driver))) {
+ printk(KERN_INFO "sisusb: Driver version %d.%d.%d\n",
+ SISUSB_VERSION, SISUSB_REVISION, SISUSB_PATCHLEVEL);
+ printk(KERN_INFO
+ "sisusb: Copyright (C) 2005 Thomas Winischhofer\n");
+ }
+
+ return retval;
+}
+
+static void __exit usb_sisusb_exit(void)
+{
+ usb_deregister(&sisusb_driver);
+}
+
+module_init(usb_sisusb_init);
+module_exit(usb_sisusb_exit);
+
+MODULE_AUTHOR("Thomas Winischhofer <thomas@winischhofer.net>");
+MODULE_DESCRIPTION("sisusb - Driver for Net2280/SiS315-based USB2VGA dongles");
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h
new file mode 100644
index 000000000000..1306d006a25a
--- /dev/null
+++ b/drivers/usb/misc/sisusbvga/sisusb.h
@@ -0,0 +1,278 @@
+/*
+ * sisusb - usb kernel driver for Net2280/SiS315 based USB2VGA dongles
+ *
+ * Copyright (C) 2005 by Thomas Winischhofer, Vienna, Austria
+ *
+ * If distributed as part of the Linux kernel, this code is licensed under the
+ * terms of the GPL v2.
+ *
+ * Otherwise, the following license terms apply:
+ *
+ * * Redistribution and use in source and binary forms, with or without
+ * * modification, are permitted provided that the following conditions
+ * * are met:
+ * * 1) Redistributions of source code must retain the above copyright
+ * * notice, this list of conditions and the following disclaimer.
+ * * 2) Redistributions in binary form must reproduce the above copyright
+ * * notice, this list of conditions and the following disclaimer in the
+ * * documentation and/or other materials provided with the distribution.
+ * * 3) The name of the author may not be used to endorse or promote products
+ * * derived from this software without specific prior written permission.
+ * *
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Thomas Winischhofer <thomas@winischhofer.net>
+ *
+ */
+
+#ifndef _SISUSB_H_
+#define _SISUSB_H_
+
+#ifdef CONFIG_COMPAT
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,10)
+#include <linux/ioctl32.h>
+#define SISUSB_OLD_CONFIG_COMPAT
+#else
+#define SISUSB_NEW_CONFIG_COMPAT
+#endif
+#endif
+
+/* Version Information */
+
+#define SISUSB_VERSION 0
+#define SISUSB_REVISION 0
+#define SISUSB_PATCHLEVEL 7
+
+/* USB related */
+
+#define SISUSB_MINOR 133 /* FIXME */
+
+/* Size of the sisusb input/output buffers */
+#define SISUSB_IBUF_SIZE 0x01000
+#define SISUSB_OBUF_SIZE 0x10000 /* fixed */
+
+#define NUMOBUFS 8 /* max number of output buffers/output URBs */
+
+/* About endianness:
+ *
+ * 1) I/O ports, PCI config registers. The read/write()
+ * calls emulate inX/outX. Hence, the data is
+ * expected/delivered in machine endiannes by this
+ * driver.
+ * 2) Video memory. The data is copied 1:1. There is
+ * no swapping. Ever. This means for userland that
+ * the data has to be prepared properly. (Hint:
+ * think graphics data format, command queue,
+ * hardware cursor.)
+ * 3) MMIO. Data is copied 1:1. MMIO must be swapped
+ * properly by userland.
+ *
+ */
+
+#ifdef __BIG_ENDIAN
+#define SISUSB_CORRECT_ENDIANNESS_PACKET(p) \
+ do { \
+ p->header = cpu_to_le16(p->header); \
+ p->address = cpu_to_le32(p->address); \
+ p->data = cpu_to_le32(p->data); \
+ } while(0)
+#else
+#define SISUSB_CORRECT_ENDIANNESS_PACKET(p)
+#endif
+
+struct sisusb_usb_data;
+
+struct sisusb_urb_context { /* urb->context for outbound bulk URBs */
+ struct sisusb_usb_data *sisusb;
+ int urbindex;
+ int *actual_length;
+};
+
+struct sisusb_usb_data {
+ struct usb_device *sisusb_dev;
+ struct usb_interface *interface;
+ struct kref kref;
+ wait_queue_head_t wait_q; /* for syncind and timeouts */
+ struct semaphore lock; /* general race avoidance */
+ unsigned int ifnum; /* interface number of the USB device */
+ int minor; /* minor (for logging clarity) */
+ int isopen; /* !=0 if open */
+ int present; /* !=0 if device is present on the bus */
+ int ready; /* !=0 if device is ready for userland */
+#ifdef SISUSB_OLD_CONFIG_COMPAT
+ int ioctl32registered;
+#endif
+ int numobufs; /* number of obufs = number of out urbs */
+ char *obuf[NUMOBUFS], *ibuf; /* transfer buffers */
+ int obufsize, ibufsize;
+ dma_addr_t transfer_dma_out[NUMOBUFS];
+ dma_addr_t transfer_dma_in;
+ struct urb *sisurbout[NUMOBUFS];
+ struct urb *sisurbin;
+ unsigned char urbstatus[NUMOBUFS];
+ unsigned char completein;
+ struct sisusb_urb_context urbout_context[NUMOBUFS];
+ unsigned long flagb0;
+ unsigned long vrambase; /* framebuffer base */
+ unsigned int vramsize; /* framebuffer size (bytes) */
+ unsigned long mmiobase;
+ unsigned int mmiosize;
+ unsigned long ioportbase;
+ unsigned char devinit; /* device initialized? */
+ unsigned char gfxinit; /* graphics core initialized? */
+ unsigned short chipid, chipvendor;
+ unsigned short chiprevision;
+};
+
+#define to_sisusb_dev(d) container_of(d, struct sisusb_usb_data, kref)
+
+/* USB transport related */
+
+/* urbstatus */
+#define SU_URB_BUSY 1
+#define SU_URB_ALLOC 2
+
+/* Endpoints */
+
+#define SISUSB_EP_GFX_IN 0x0e /* gfx std packet out(0e)/in(8e) */
+#define SISUSB_EP_GFX_OUT 0x0e
+
+#define SISUSB_EP_GFX_BULK_OUT 0x01 /* gfx mem bulk out/in */
+#define SISUSB_EP_GFX_BULK_IN 0x02 /* ? 2 is "OUT" ? */
+
+#define SISUSB_EP_GFX_LBULK_OUT 0x03 /* gfx large mem bulk out */
+
+#define SISUSB_EP_UNKNOWN_04 0x04 /* ? 4 is "OUT" ? - unused */
+
+#define SISUSB_EP_BRIDGE_IN 0x0d /* Net2280 out(0d)/in(8d) */
+#define SISUSB_EP_BRIDGE_OUT 0x0d
+
+#define SISUSB_TYPE_MEM 0
+#define SISUSB_TYPE_IO 1
+
+struct sisusb_packet {
+ unsigned short header;
+ u32 address;
+ u32 data;
+} __attribute__((__packed__));
+
+#define CLEARPACKET(packet) memset(packet, 0, 10)
+
+/* PCI bridge related */
+
+#define SISUSB_PCI_MEMBASE 0xd0000000
+#define SISUSB_PCI_MMIOBASE 0xe4000000
+#define SISUSB_PCI_IOPORTBASE 0x0000d000
+
+#define SISUSB_PCI_PSEUDO_MEMBASE 0x10000000
+#define SISUSB_PCI_PSEUDO_MMIOBASE 0x20000000
+#define SISUSB_PCI_PSEUDO_IOPORTBASE 0x0000d000
+#define SISUSB_PCI_PSEUDO_PCIBASE 0x00010000
+
+#define SISUSB_PCI_MMIOSIZE (128*1024)
+#define SISUSB_PCI_PCONFSIZE 0x5c
+
+/* graphics core related */
+
+#define AROFFSET 0x40
+#define ARROFFSET 0x41
+#define GROFFSET 0x4e
+#define SROFFSET 0x44
+#define CROFFSET 0x54
+#define MISCROFFSET 0x4c
+#define MISCWOFFSET 0x42
+#define INPUTSTATOFFSET 0x5A
+#define PART1OFFSET 0x04
+#define PART2OFFSET 0x10
+#define PART3OFFSET 0x12
+#define PART4OFFSET 0x14
+#define PART5OFFSET 0x16
+#define CAPTUREOFFSET 0x00
+#define VIDEOOFFSET 0x02
+#define COLREGOFFSET 0x48
+#define PELMASKOFFSET 0x46
+#define VGAENABLE 0x43
+
+#define SISAR SISUSB_PCI_IOPORTBASE + AROFFSET
+#define SISARR SISUSB_PCI_IOPORTBASE + ARROFFSET
+#define SISGR SISUSB_PCI_IOPORTBASE + GROFFSET
+#define SISSR SISUSB_PCI_IOPORTBASE + SROFFSET
+#define SISCR SISUSB_PCI_IOPORTBASE + CROFFSET
+#define SISMISCR SISUSB_PCI_IOPORTBASE + MISCROFFSET
+#define SISMISCW SISUSB_PCI_IOPORTBASE + MISCWOFFSET
+#define SISINPSTAT SISUSB_PCI_IOPORTBASE + INPUTSTATOFFSET
+#define SISPART1 SISUSB_PCI_IOPORTBASE + PART1OFFSET
+#define SISPART2 SISUSB_PCI_IOPORTBASE + PART2OFFSET
+#define SISPART3 SISUSB_PCI_IOPORTBASE + PART3OFFSET
+#define SISPART4 SISUSB_PCI_IOPORTBASE + PART4OFFSET
+#define SISPART5 SISUSB_PCI_IOPORTBASE + PART5OFFSET
+#define SISCAP SISUSB_PCI_IOPORTBASE + CAPTUREOFFSET
+#define SISVID SISUSB_PCI_IOPORTBASE + VIDEOOFFSET
+#define SISCOLIDXR SISUSB_PCI_IOPORTBASE + COLREGOFFSET - 1
+#define SISCOLIDX SISUSB_PCI_IOPORTBASE + COLREGOFFSET
+#define SISCOLDATA SISUSB_PCI_IOPORTBASE + COLREGOFFSET + 1
+#define SISCOL2IDX SISPART5
+#define SISCOL2DATA SISPART5 + 1
+#define SISPEL SISUSB_PCI_IOPORTBASE + PELMASKOFFSET
+#define SISVGAEN SISUSB_PCI_IOPORTBASE + VGAENABLE
+#define SISDACA SISCOLIDX
+#define SISDACD SISCOLDATA
+
+/* ioctl related */
+
+/* Structure argument for SISUSB_GET_INFO ioctl */
+struct sisusb_info {
+ __u32 sisusb_id; /* for identifying sisusb */
+#define SISUSB_ID 0x53495355 /* Identify myself with 'SISU' */
+ __u8 sisusb_version;
+ __u8 sisusb_revision;
+ __u8 sisusb_patchlevel;
+ __u8 sisusb_gfxinit; /* graphics core initialized? */
+
+ __u32 sisusb_vrambase;
+ __u32 sisusb_mmiobase;
+ __u32 sisusb_iobase;
+ __u32 sisusb_pcibase;
+
+ __u32 sisusb_vramsize; /* framebuffer size in bytes */
+
+ __u32 sisusb_minor;
+
+ __u32 sisusb_fbdevactive; /* != 0 if framebuffer device active */
+
+ __u8 sisusb_reserved[32]; /* for future use */
+};
+
+struct sisusb_command {
+ __u8 operation; /* see below */
+ __u8 data0; /* operation dependent */
+ __u8 data1; /* operation dependent */
+ __u8 data2; /* operation dependent */
+ __u32 data3; /* operation dependent */
+ __u32 data4; /* for future use */
+};
+
+#define SUCMD_GET 0x01 /* for all: data0 = index, data3 = port */
+#define SUCMD_SET 0x02 /* data1 = value */
+#define SUCMD_SETOR 0x03 /* data1 = or */
+#define SUCMD_SETAND 0x04 /* data1 = and */
+#define SUCMD_SETANDOR 0x05 /* data1 = and, data2 = or */
+#define SUCMD_SETMASK 0x06 /* data1 = data, data2 = mask */
+
+#define SUCMD_CLRSCR 0x07 /* data0:1:2 = length, data3 = address */
+
+#define SISUSB_COMMAND _IOWR(0xF3,0x3D,struct sisusb_command)
+#define SISUSB_GET_CONFIG_SIZE _IOR(0xF3,0x3E,__u32)
+#define SISUSB_GET_CONFIG _IOR(0xF3,0x3F,struct sisusb_info)
+
+#endif /* SISUSB_H */
+
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
new file mode 100644
index 000000000000..096ab3029676
--- /dev/null
+++ b/drivers/usb/misc/usblcd.c
@@ -0,0 +1,404 @@
+/*****************************************************************************
+ * USBLCD Kernel Driver *
+ * Version 1.05 *
+ * (C) 2005 Georges Toth <g.toth@e-biz.lu> *
+ * *
+ * This file is licensed under the GPL. See COPYING in the package. *
+ * Based on usb-skeleton.c 2.0 by Greg Kroah-Hartman (greg@kroah.com) *
+ * *
+ * *
+ * 28.02.05 Complete rewrite of the original usblcd.c driver, *
+ * based on usb_skeleton.c. *
+ * This new driver allows more than one USB-LCD to be connected *
+ * and controlled, at once *
+ *****************************************************************************/
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/errno.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+
+#define DRIVER_VERSION "USBLCD Driver Version 1.05"
+
+#define USBLCD_MINOR 144
+
+#define IOCTL_GET_HARD_VERSION 1
+#define IOCTL_GET_DRV_VERSION 2
+
+
+static struct usb_device_id id_table [] = {
+ { .idVendor = 0x10D2, .match_flags = USB_DEVICE_ID_MATCH_VENDOR, },
+ { },
+};
+MODULE_DEVICE_TABLE (usb, id_table);
+
+
+struct usb_lcd {
+ struct usb_device * udev; /* init: probe_lcd */
+ struct usb_interface * interface; /* the interface for this device */
+ unsigned char * bulk_in_buffer; /* the buffer to receive data */
+ size_t bulk_in_size; /* the size of the receive buffer */
+ __u8 bulk_in_endpointAddr; /* the address of the bulk in endpoint */
+ __u8 bulk_out_endpointAddr; /* the address of the bulk out endpoint */
+ struct kref kref;
+};
+#define to_lcd_dev(d) container_of(d, struct usb_lcd, kref)
+
+static struct usb_driver lcd_driver;
+
+
+static void lcd_delete(struct kref *kref)
+{
+ struct usb_lcd *dev = to_lcd_dev(kref);
+
+ usb_put_dev(dev->udev);
+ kfree (dev->bulk_in_buffer);
+ kfree (dev);
+}
+
+
+static int lcd_open(struct inode *inode, struct file *file)
+{
+ struct usb_lcd *dev;
+ struct usb_interface *interface;
+ int subminor;
+ int retval = 0;
+
+ subminor = iminor(inode);
+
+ interface = usb_find_interface(&lcd_driver, subminor);
+ if (!interface) {
+ err ("USBLCD: %s - error, can't find device for minor %d",
+ __FUNCTION__, subminor);
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ dev = usb_get_intfdata(interface);
+ if (!dev) {
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ /* increment our usage count for the device */
+ kref_get(&dev->kref);
+
+ /* save our object in the file's private structure */
+ file->private_data = dev;
+
+exit:
+ return retval;
+}
+
+static int lcd_release(struct inode *inode, struct file *file)
+{
+ struct usb_lcd *dev;
+
+ dev = (struct usb_lcd *)file->private_data;
+ if (dev == NULL)
+ return -ENODEV;
+
+ /* decrement the count on our device */
+ kref_put(&dev->kref, lcd_delete);
+ return 0;
+}
+
+static ssize_t lcd_read(struct file *file, char __user * buffer, size_t count, loff_t *ppos)
+{
+ struct usb_lcd *dev;
+ int retval = 0;
+ int bytes_read;
+
+ dev = (struct usb_lcd *)file->private_data;
+
+ /* do a blocking bulk read to get data from the device */
+ retval = usb_bulk_msg(dev->udev,
+ usb_rcvbulkpipe(dev->udev, dev->bulk_in_endpointAddr),
+ dev->bulk_in_buffer,
+ min(dev->bulk_in_size, count),
+ &bytes_read, 10000);
+
+ /* if the read was successful, copy the data to userspace */
+ if (!retval) {
+ if (copy_to_user(buffer, dev->bulk_in_buffer, bytes_read))
+ retval = -EFAULT;
+ else
+ retval = bytes_read;
+ }
+
+ return retval;
+}
+
+static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct usb_lcd *dev;
+ u16 bcdDevice;
+ char buf[30];
+
+ dev = (struct usb_lcd *)file->private_data;
+ if (dev == NULL)
+ return -ENODEV;
+
+ switch (cmd) {
+ case IOCTL_GET_HARD_VERSION:
+ bcdDevice = le16_to_cpu((dev->udev)->descriptor.bcdDevice);
+ sprintf(buf,"%1d%1d.%1d%1d",
+ (bcdDevice & 0xF000)>>12,
+ (bcdDevice & 0xF00)>>8,
+ (bcdDevice & 0xF0)>>4,
+ (bcdDevice & 0xF));
+ if (copy_to_user((void __user *)arg,buf,strlen(buf))!=0)
+ return -EFAULT;
+ break;
+ case IOCTL_GET_DRV_VERSION:
+ sprintf(buf,DRIVER_VERSION);
+ if (copy_to_user((void __user *)arg,buf,strlen(buf))!=0)
+ return -EFAULT;
+ break;
+ default:
+ return -ENOTTY;
+ break;
+ }
+
+ return 0;
+}
+
+static void lcd_write_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_lcd *dev;
+
+ dev = (struct usb_lcd *)urb->context;
+
+ /* sync/async unlink faults aren't errors */
+ if (urb->status &&
+ !(urb->status == -ENOENT ||
+ urb->status == -ECONNRESET ||
+ urb->status == -ESHUTDOWN)) {
+ dbg("USBLCD: %s - nonzero write bulk status received: %d",
+ __FUNCTION__, urb->status);
+ }
+
+ /* free up our allocated buffer */
+ usb_buffer_free(urb->dev, urb->transfer_buffer_length,
+ urb->transfer_buffer, urb->transfer_dma);
+}
+
+static ssize_t lcd_write(struct file *file, const char __user * user_buffer, size_t count, loff_t *ppos)
+{
+ struct usb_lcd *dev;
+ int retval = 0;
+ struct urb *urb = NULL;
+ char *buf = NULL;
+
+ dev = (struct usb_lcd *)file->private_data;
+
+ /* verify that we actually have some data to write */
+ if (count == 0)
+ goto exit;
+
+ /* create a urb, and a buffer for it, and copy the data to the urb */
+ urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!urb) {
+ retval = -ENOMEM;
+ goto error;
+ }
+
+ buf = usb_buffer_alloc(dev->udev, count, GFP_KERNEL, &urb->transfer_dma);
+ if (!buf) {
+ retval = -ENOMEM;
+ goto error;
+ }
+
+ if (copy_from_user(buf, user_buffer, count)) {
+ retval = -EFAULT;
+ goto error;
+ }
+
+ /* initialize the urb properly */
+ usb_fill_bulk_urb(urb, dev->udev,
+ usb_sndbulkpipe(dev->udev, dev->bulk_out_endpointAddr),
+ buf, count, lcd_write_bulk_callback, dev);
+ urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ /* send the data out the bulk port */
+ retval = usb_submit_urb(urb, GFP_KERNEL);
+ if (retval) {
+ err("USBLCD: %s - failed submitting write urb, error %d", __FUNCTION__, retval);
+ goto error;
+ }
+
+ /* release our reference to this urb, the USB core will eventually free it entirely */
+ usb_free_urb(urb);
+
+exit:
+ return count;
+
+error:
+ usb_buffer_free(dev->udev, count, buf, urb->transfer_dma);
+ usb_free_urb(urb);
+ return retval;
+}
+
+static struct file_operations lcd_fops = {
+ .owner = THIS_MODULE,
+ .read = lcd_read,
+ .write = lcd_write,
+ .open = lcd_open,
+ .ioctl = lcd_ioctl,
+ .release = lcd_release,
+};
+
+/*
+ * * usb class driver info in order to get a minor number from the usb core,
+ * * and to have the device registered with devfs and the driver core
+ * */
+static struct usb_class_driver lcd_class = {
+ .name = "usb/lcd%d",
+ .fops = &lcd_fops,
+ .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH,
+ .minor_base = USBLCD_MINOR,
+};
+
+static int lcd_probe(struct usb_interface *interface, const struct usb_device_id *id)
+{
+ struct usb_lcd *dev = NULL;
+ struct usb_host_interface *iface_desc;
+ struct usb_endpoint_descriptor *endpoint;
+ size_t buffer_size;
+ int i;
+ int retval = -ENOMEM;
+
+ /* allocate memory for our device state and initialize it */
+ dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+ if (dev == NULL) {
+ err("Out of memory");
+ goto error;
+ }
+ memset(dev, 0x00, sizeof(*dev));
+ kref_init(&dev->kref);
+
+ dev->udev = usb_get_dev(interface_to_usbdev(interface));
+ dev->interface = interface;
+
+ if (le16_to_cpu(dev->udev->descriptor.idProduct) != 0x0001) {
+ warn(KERN_INFO "USBLCD model not supported.");
+ return -ENODEV;
+ }
+
+ /* set up the endpoint information */
+ /* use only the first bulk-in and bulk-out endpoints */
+ iface_desc = interface->cur_altsetting;
+ for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
+ endpoint = &iface_desc->endpoint[i].desc;
+
+ if (!dev->bulk_in_endpointAddr &&
+ (endpoint->bEndpointAddress & USB_DIR_IN) &&
+ ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ == USB_ENDPOINT_XFER_BULK)) {
+ /* we found a bulk in endpoint */
+ buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ dev->bulk_in_size = buffer_size;
+ dev->bulk_in_endpointAddr = endpoint->bEndpointAddress;
+ dev->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
+ if (!dev->bulk_in_buffer) {
+ err("Could not allocate bulk_in_buffer");
+ goto error;
+ }
+ }
+
+ if (!dev->bulk_out_endpointAddr &&
+ !(endpoint->bEndpointAddress & USB_DIR_IN) &&
+ ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ == USB_ENDPOINT_XFER_BULK)) {
+ /* we found a bulk out endpoint */
+ dev->bulk_out_endpointAddr = endpoint->bEndpointAddress;
+ }
+ }
+ if (!(dev->bulk_in_endpointAddr && dev->bulk_out_endpointAddr)) {
+ err("Could not find both bulk-in and bulk-out endpoints");
+ goto error;
+ }
+
+ /* save our data pointer in this interface device */
+ usb_set_intfdata(interface, dev);
+
+ /* we can register the device now, as it is ready */
+ retval = usb_register_dev(interface, &lcd_class);
+ if (retval) {
+ /* something prevented us from registering this driver */
+ err("Not able to get a minor for this device.");
+ usb_set_intfdata(interface, NULL);
+ goto error;
+ }
+
+ i = le16_to_cpu(dev->udev->descriptor.bcdDevice);
+
+ info("USBLCD Version %1d%1d.%1d%1d found at address %d",
+ (i & 0xF000)>>12,(i & 0xF00)>>8,(i & 0xF0)>>4,(i & 0xF),
+ dev->udev->devnum);
+
+ /* let the user know what node this device is now attached to */
+ info("USB LCD device now attached to USBLCD-%d", interface->minor);
+ return 0;
+
+error:
+ if (dev)
+ kref_put(&dev->kref, lcd_delete);
+ return retval;
+}
+
+static void lcd_disconnect(struct usb_interface *interface)
+{
+ struct usb_lcd *dev;
+ int minor = interface->minor;
+
+ /* prevent skel_open() from racing skel_disconnect() */
+ lock_kernel();
+
+ dev = usb_get_intfdata(interface);
+ usb_set_intfdata(interface, NULL);
+
+ /* give back our minor */
+ usb_deregister_dev(interface, &lcd_class);
+
+ unlock_kernel();
+
+ /* decrement our usage count */
+ kref_put(&dev->kref, lcd_delete);
+
+ info("USB LCD #%d now disconnected", minor);
+}
+
+static struct usb_driver lcd_driver = {
+ .owner = THIS_MODULE,
+ .name = "usblcd",
+ .probe = lcd_probe,
+ .disconnect = lcd_disconnect,
+ .id_table = id_table,
+};
+
+static int __init usb_lcd_init(void)
+{
+ int result;
+
+ result = usb_register(&lcd_driver);
+ if (result)
+ err("usb_register failed. Error number %d", result);
+
+ return result;
+}
+
+
+static void __exit usb_lcd_exit(void)
+{
+ usb_deregister(&lcd_driver);
+}
+
+module_init(usb_lcd_init);
+module_exit(usb_lcd_exit);
+
+MODULE_AUTHOR("Georges Toth <g.toth@e-biz.lu>");
+MODULE_DESCRIPTION(DRIVER_VERSION);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c
new file mode 100644
index 000000000000..ee329d5e1c5e
--- /dev/null
+++ b/drivers/usb/misc/usbled.c
@@ -0,0 +1,181 @@
+/*
+ * USB LED driver - 1.1
+ *
+ * Copyright (C) 2004 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 the Free Software Foundation, version 2.
+ *
+ */
+
+#include <linux/config.h>
+#ifdef CONFIG_USB_DEBUG
+ #define DEBUG 1
+#endif
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+
+
+#define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com"
+#define DRIVER_DESC "USB LED Driver"
+
+#define VENDOR_ID 0x0fc5
+#define PRODUCT_ID 0x1223
+
+/* table of devices that work with this driver */
+static struct usb_device_id id_table [] = {
+ { USB_DEVICE(VENDOR_ID, PRODUCT_ID) },
+ { },
+};
+MODULE_DEVICE_TABLE (usb, id_table);
+
+struct usb_led {
+ struct usb_device * udev;
+ unsigned char blue;
+ unsigned char red;
+ unsigned char green;
+};
+
+#define BLUE 0x04
+#define RED 0x02
+#define GREEN 0x01
+static void change_color(struct usb_led *led)
+{
+ int retval;
+ unsigned char color = 0x07;
+ unsigned char *buffer;
+
+ buffer = kmalloc(8, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&led->udev->dev, "out of memory\n");
+ return;
+ }
+
+ if (led->blue)
+ color &= ~(BLUE);
+ if (led->red)
+ color &= ~(RED);
+ if (led->green)
+ color &= ~(GREEN);
+ dev_dbg(&led->udev->dev,
+ "blue = %d, red = %d, green = %d, color = %.2x\n",
+ led->blue, led->red, led->green, color);
+
+ retval = usb_control_msg(led->udev,
+ usb_sndctrlpipe(led->udev, 0),
+ 0x12,
+ 0xc8,
+ (0x02 * 0x100) + 0x0a,
+ (0x00 * 0x100) + color,
+ buffer,
+ 8,
+ 2000);
+ if (retval)
+ dev_dbg(&led->udev->dev, "retval = %d\n", retval);
+ kfree(buffer);
+}
+
+#define show_set(value) \
+static ssize_t show_##value(struct device *dev, char *buf) \
+{ \
+ struct usb_interface *intf = to_usb_interface(dev); \
+ struct usb_led *led = usb_get_intfdata(intf); \
+ \
+ return sprintf(buf, "%d\n", led->value); \
+} \
+static ssize_t set_##value(struct device *dev, const char *buf, size_t count) \
+{ \
+ struct usb_interface *intf = to_usb_interface(dev); \
+ struct usb_led *led = usb_get_intfdata(intf); \
+ int temp = simple_strtoul(buf, NULL, 10); \
+ \
+ led->value = temp; \
+ change_color(led); \
+ return count; \
+} \
+static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value);
+show_set(blue);
+show_set(red);
+show_set(green);
+
+static int led_probe(struct usb_interface *interface, const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev(interface);
+ struct usb_led *dev = NULL;
+ int retval = -ENOMEM;
+
+ dev = kmalloc(sizeof(struct usb_led), GFP_KERNEL);
+ if (dev == NULL) {
+ dev_err(&interface->dev, "Out of memory\n");
+ goto error;
+ }
+ memset (dev, 0x00, sizeof (*dev));
+
+ dev->udev = usb_get_dev(udev);
+
+ usb_set_intfdata (interface, dev);
+
+ device_create_file(&interface->dev, &dev_attr_blue);
+ device_create_file(&interface->dev, &dev_attr_red);
+ device_create_file(&interface->dev, &dev_attr_green);
+
+ dev_info(&interface->dev, "USB LED device now attached\n");
+ return 0;
+
+error:
+ kfree(dev);
+ return retval;
+}
+
+static void led_disconnect(struct usb_interface *interface)
+{
+ struct usb_led *dev;
+
+ dev = usb_get_intfdata (interface);
+ usb_set_intfdata (interface, NULL);
+
+ device_remove_file(&interface->dev, &dev_attr_blue);
+ device_remove_file(&interface->dev, &dev_attr_red);
+ device_remove_file(&interface->dev, &dev_attr_green);
+
+ usb_put_dev(dev->udev);
+
+ kfree(dev);
+
+ dev_info(&interface->dev, "USB LED now disconnected\n");
+}
+
+static struct usb_driver led_driver = {
+ .owner = THIS_MODULE,
+ .name = "usbled",
+ .probe = led_probe,
+ .disconnect = led_disconnect,
+ .id_table = id_table,
+};
+
+static int __init usb_led_init(void)
+{
+ int retval = 0;
+
+ retval = usb_register(&led_driver);
+ if (retval)
+ err("usb_register failed. Error number %d", retval);
+ return retval;
+}
+
+static void __exit usb_led_exit(void)
+{
+ usb_deregister(&led_driver);
+}
+
+module_init (usb_led_init);
+module_exit (usb_led_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
new file mode 100644
index 000000000000..3104f28f6aa8
--- /dev/null
+++ b/drivers/usb/misc/usbtest.c
@@ -0,0 +1,2140 @@
+#include <linux/config.h>
+#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
+# define DEBUG
+#endif
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <asm/scatterlist.h>
+
+#include <linux/usb.h>
+
+
+/*-------------------------------------------------------------------------*/
+
+// FIXME make these public somewhere; usbdevfs.h?
+//
+struct usbtest_param {
+ // inputs
+ unsigned test_num; /* 0..(TEST_CASES-1) */
+ unsigned iterations;
+ unsigned length;
+ unsigned vary;
+ unsigned sglen;
+
+ // outputs
+ struct timeval duration;
+};
+#define USBTEST_REQUEST _IOWR('U', 100, struct usbtest_param)
+
+/*-------------------------------------------------------------------------*/
+
+#define GENERIC /* let probe() bind using module params */
+
+/* Some devices that can be used for testing will have "real" drivers.
+ * Entries for those need to be enabled here by hand, after disabling
+ * that "real" driver.
+ */
+//#define IBOT2 /* grab iBOT2 webcams */
+//#define KEYSPAN_19Qi /* grab un-renumerated serial adapter */
+
+/*-------------------------------------------------------------------------*/
+
+struct usbtest_info {
+ const char *name;
+ u8 ep_in; /* bulk/intr source */
+ u8 ep_out; /* bulk/intr sink */
+ unsigned autoconf : 1;
+ unsigned ctrl_out : 1;
+ unsigned iso : 1; /* try iso in/out */
+ int alt;
+};
+
+/* this is accessed only through usbfs ioctl calls.
+ * one ioctl to issue a test ... one lock per device.
+ * tests create other threads if they need them.
+ * urbs and buffers are allocated dynamically,
+ * and data generated deterministically.
+ */
+struct usbtest_dev {
+ struct usb_interface *intf;
+ struct usbtest_info *info;
+ int in_pipe;
+ int out_pipe;
+ int in_iso_pipe;
+ int out_iso_pipe;
+ struct usb_endpoint_descriptor *iso_in, *iso_out;
+ struct semaphore sem;
+
+#define TBUF_SIZE 256
+ u8 *buf;
+};
+
+static struct usb_device *testdev_to_usbdev (struct usbtest_dev *test)
+{
+ return interface_to_usbdev (test->intf);
+}
+
+/* set up all urbs so they can be used with either bulk or interrupt */
+#define INTERRUPT_RATE 1 /* msec/transfer */
+
+#define xprintk(tdev,level,fmt,args...) \
+ dev_printk(level , &(tdev)->intf->dev , fmt , ## args)
+
+#ifdef DEBUG
+#define DBG(dev,fmt,args...) \
+ xprintk(dev , KERN_DEBUG , fmt , ## args)
+#else
+#define DBG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* DEBUG */
+
+#ifdef VERBOSE
+#define VDBG DBG
+#else
+#define VDBG(dev,fmt,args...) \
+ do { } while (0)
+#endif /* VERBOSE */
+
+#define ERROR(dev,fmt,args...) \
+ xprintk(dev , KERN_ERR , fmt , ## args)
+#define WARN(dev,fmt,args...) \
+ xprintk(dev , KERN_WARNING , fmt , ## args)
+#define INFO(dev,fmt,args...) \
+ xprintk(dev , KERN_INFO , fmt , ## args)
+
+/*-------------------------------------------------------------------------*/
+
+static int
+get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf)
+{
+ int tmp;
+ struct usb_host_interface *alt;
+ struct usb_host_endpoint *in, *out;
+ struct usb_host_endpoint *iso_in, *iso_out;
+ struct usb_device *udev;
+
+ for (tmp = 0; tmp < intf->num_altsetting; tmp++) {
+ unsigned ep;
+
+ in = out = NULL;
+ iso_in = iso_out = NULL;
+ alt = intf->altsetting + tmp;
+
+ /* take the first altsetting with in-bulk + out-bulk;
+ * ignore other endpoints and altsetttings.
+ */
+ for (ep = 0; ep < alt->desc.bNumEndpoints; ep++) {
+ struct usb_host_endpoint *e;
+
+ e = alt->endpoint + ep;
+ switch (e->desc.bmAttributes) {
+ case USB_ENDPOINT_XFER_BULK:
+ break;
+ case USB_ENDPOINT_XFER_ISOC:
+ if (dev->info->iso)
+ goto try_iso;
+ // FALLTHROUGH
+ default:
+ continue;
+ }
+ if (e->desc.bEndpointAddress & USB_DIR_IN) {
+ if (!in)
+ in = e;
+ } else {
+ if (!out)
+ out = e;
+ }
+ continue;
+try_iso:
+ if (e->desc.bEndpointAddress & USB_DIR_IN) {
+ if (!iso_in)
+ iso_in = e;
+ } else {
+ if (!iso_out)
+ iso_out = e;
+ }
+ }
+ if ((in && out) || (iso_in && iso_out))
+ goto found;
+ }
+ return -EINVAL;
+
+found:
+ udev = testdev_to_usbdev (dev);
+ if (alt->desc.bAlternateSetting != 0) {
+ tmp = usb_set_interface (udev,
+ alt->desc.bInterfaceNumber,
+ alt->desc.bAlternateSetting);
+ if (tmp < 0)
+ return tmp;
+ }
+
+ if (in) {
+ dev->in_pipe = usb_rcvbulkpipe (udev,
+ in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ dev->out_pipe = usb_sndbulkpipe (udev,
+ out->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ }
+ if (iso_in) {
+ dev->iso_in = &iso_in->desc;
+ dev->in_iso_pipe = usb_rcvisocpipe (udev,
+ iso_in->desc.bEndpointAddress
+ & USB_ENDPOINT_NUMBER_MASK);
+ dev->iso_out = &iso_out->desc;
+ dev->out_iso_pipe = usb_sndisocpipe (udev,
+ iso_out->desc.bEndpointAddress
+ & USB_ENDPOINT_NUMBER_MASK);
+ }
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* Support for testing basic non-queued I/O streams.
+ *
+ * These just package urbs as requests that can be easily canceled.
+ * Each urb's data buffer is dynamically allocated; callers can fill
+ * them with non-zero test data (or test for it) when appropriate.
+ */
+
+static void simple_callback (struct urb *urb, struct pt_regs *regs)
+{
+ complete ((struct completion *) urb->context);
+}
+
+static struct urb *simple_alloc_urb (
+ struct usb_device *udev,
+ int pipe,
+ unsigned long bytes
+)
+{
+ struct urb *urb;
+
+ if (bytes < 0)
+ return NULL;
+ urb = usb_alloc_urb (0, SLAB_KERNEL);
+ if (!urb)
+ return urb;
+ usb_fill_bulk_urb (urb, udev, pipe, NULL, bytes, simple_callback, NULL);
+ urb->interval = (udev->speed == USB_SPEED_HIGH)
+ ? (INTERRUPT_RATE << 3)
+ : INTERRUPT_RATE;
+ urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
+ if (usb_pipein (pipe))
+ urb->transfer_flags |= URB_SHORT_NOT_OK;
+ urb->transfer_buffer = usb_buffer_alloc (udev, bytes, SLAB_KERNEL,
+ &urb->transfer_dma);
+ if (!urb->transfer_buffer) {
+ usb_free_urb (urb);
+ urb = NULL;
+ } else
+ memset (urb->transfer_buffer, 0, bytes);
+ return urb;
+}
+
+static unsigned pattern = 0;
+module_param (pattern, uint, S_IRUGO);
+// MODULE_PARM_DESC (pattern, "i/o pattern (0 == zeroes)");
+
+static inline void simple_fill_buf (struct urb *urb)
+{
+ unsigned i;
+ u8 *buf = urb->transfer_buffer;
+ unsigned len = urb->transfer_buffer_length;
+
+ switch (pattern) {
+ default:
+ // FALLTHROUGH
+ case 0:
+ memset (buf, 0, len);
+ break;
+ case 1: /* mod63 */
+ for (i = 0; i < len; i++)
+ *buf++ = (u8) (i % 63);
+ break;
+ }
+}
+
+static inline int simple_check_buf (struct urb *urb)
+{
+ unsigned i;
+ u8 expected;
+ u8 *buf = urb->transfer_buffer;
+ unsigned len = urb->actual_length;
+
+ for (i = 0; i < len; i++, buf++) {
+ switch (pattern) {
+ /* all-zeroes has no synchronization issues */
+ case 0:
+ expected = 0;
+ break;
+ /* mod63 stays in sync with short-terminated transfers,
+ * or otherwise when host and gadget agree on how large
+ * each usb transfer request should be. resync is done
+ * with set_interface or set_config.
+ */
+ case 1: /* mod63 */
+ expected = i % 63;
+ break;
+ /* always fail unsupported patterns */
+ default:
+ expected = !*buf;
+ break;
+ }
+ if (*buf == expected)
+ continue;
+ dbg ("buf[%d] = %d (not %d)", i, *buf, expected);
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static void simple_free_urb (struct urb *urb)
+{
+ usb_buffer_free (urb->dev, urb->transfer_buffer_length,
+ urb->transfer_buffer, urb->transfer_dma);
+ usb_free_urb (urb);
+}
+
+static int simple_io (
+ struct urb *urb,
+ int iterations,
+ int vary,
+ int expected,
+ const char *label
+)
+{
+ struct usb_device *udev = urb->dev;
+ int max = urb->transfer_buffer_length;
+ struct completion completion;
+ int retval = 0;
+
+ urb->context = &completion;
+ while (retval == 0 && iterations-- > 0) {
+ init_completion (&completion);
+ if (usb_pipeout (urb->pipe))
+ simple_fill_buf (urb);
+ if ((retval = usb_submit_urb (urb, SLAB_KERNEL)) != 0)
+ break;
+
+ /* NOTE: no timeouts; can't be broken out of by interrupt */
+ wait_for_completion (&completion);
+ retval = urb->status;
+ urb->dev = udev;
+ if (retval == 0 && usb_pipein (urb->pipe))
+ retval = simple_check_buf (urb);
+
+ if (vary) {
+ int len = urb->transfer_buffer_length;
+
+ len += vary;
+ len %= max;
+ if (len == 0)
+ len = (vary < max) ? vary : max;
+ urb->transfer_buffer_length = len;
+ }
+
+ /* FIXME if endpoint halted, clear halt (and log) */
+ }
+ urb->transfer_buffer_length = max;
+
+ if (expected != retval)
+ dev_dbg (&udev->dev,
+ "%s failed, iterations left %d, status %d (not %d)\n",
+ label, iterations, retval, expected);
+ return retval;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* We use scatterlist primitives to test queued I/O.
+ * Yes, this also tests the scatterlist primitives.
+ */
+
+static void free_sglist (struct scatterlist *sg, int nents)
+{
+ unsigned i;
+
+ if (!sg)
+ return;
+ for (i = 0; i < nents; i++) {
+ if (!sg [i].page)
+ continue;
+ kfree (page_address (sg [i].page) + sg [i].offset);
+ }
+ kfree (sg);
+}
+
+static struct scatterlist *
+alloc_sglist (int nents, int max, int vary)
+{
+ struct scatterlist *sg;
+ unsigned i;
+ unsigned size = max;
+
+ sg = kmalloc (nents * sizeof *sg, SLAB_KERNEL);
+ if (!sg)
+ return NULL;
+ memset (sg, 0, nents * sizeof *sg);
+
+ for (i = 0; i < nents; i++) {
+ char *buf;
+
+ buf = kmalloc (size, SLAB_KERNEL);
+ if (!buf) {
+ free_sglist (sg, i);
+ return NULL;
+ }
+ memset (buf, 0, size);
+
+ /* kmalloc pages are always physically contiguous! */
+ sg [i].page = virt_to_page (buf);
+ sg [i].offset = offset_in_page (buf);
+ sg [i].length = size;
+
+ if (vary) {
+ size += vary;
+ size %= max;
+ if (size == 0)
+ size = (vary < max) ? vary : max;
+ }
+ }
+
+ return sg;
+}
+
+static int perform_sglist (
+ struct usb_device *udev,
+ unsigned iterations,
+ int pipe,
+ struct usb_sg_request *req,
+ struct scatterlist *sg,
+ int nents
+)
+{
+ int retval = 0;
+
+ while (retval == 0 && iterations-- > 0) {
+ retval = usb_sg_init (req, udev, pipe,
+ (udev->speed == USB_SPEED_HIGH)
+ ? (INTERRUPT_RATE << 3)
+ : INTERRUPT_RATE,
+ sg, nents, 0, SLAB_KERNEL);
+
+ if (retval)
+ break;
+ usb_sg_wait (req);
+ retval = req->status;
+
+ /* FIXME if endpoint halted, clear halt (and log) */
+ }
+
+ // FIXME for unlink or fault handling tests, don't report
+ // failure if retval is as we expected ...
+
+ if (retval)
+ dbg ("perform_sglist failed, iterations left %d, status %d",
+ iterations, retval);
+ return retval;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* unqueued control message testing
+ *
+ * there's a nice set of device functional requirements in chapter 9 of the
+ * usb 2.0 spec, which we can apply to ANY device, even ones that don't use
+ * special test firmware.
+ *
+ * we know the device is configured (or suspended) by the time it's visible
+ * through usbfs. we can't change that, so we won't test enumeration (which
+ * worked 'well enough' to get here, this time), power management (ditto),
+ * or remote wakeup (which needs human interaction).
+ */
+
+static unsigned realworld = 1;
+module_param (realworld, uint, 0);
+MODULE_PARM_DESC (realworld, "clear to demand stricter ch9 compliance");
+
+static int get_altsetting (struct usbtest_dev *dev)
+{
+ struct usb_interface *iface = dev->intf;
+ struct usb_device *udev = interface_to_usbdev (iface);
+ int retval;
+
+ retval = usb_control_msg (udev, usb_rcvctrlpipe (udev, 0),
+ USB_REQ_GET_INTERFACE, USB_DIR_IN|USB_RECIP_INTERFACE,
+ 0, iface->altsetting [0].desc.bInterfaceNumber,
+ dev->buf, 1, USB_CTRL_GET_TIMEOUT);
+ switch (retval) {
+ case 1:
+ return dev->buf [0];
+ case 0:
+ retval = -ERANGE;
+ // FALLTHROUGH
+ default:
+ return retval;
+ }
+}
+
+static int set_altsetting (struct usbtest_dev *dev, int alternate)
+{
+ struct usb_interface *iface = dev->intf;
+ struct usb_device *udev;
+
+ if (alternate < 0 || alternate >= 256)
+ return -EINVAL;
+
+ udev = interface_to_usbdev (iface);
+ return usb_set_interface (udev,
+ iface->altsetting [0].desc.bInterfaceNumber,
+ alternate);
+}
+
+static int is_good_config (char *buf, int len)
+{
+ struct usb_config_descriptor *config;
+
+ if (len < sizeof *config)
+ return 0;
+ config = (struct usb_config_descriptor *) buf;
+
+ switch (config->bDescriptorType) {
+ case USB_DT_CONFIG:
+ case USB_DT_OTHER_SPEED_CONFIG:
+ if (config->bLength != 9) {
+ dbg ("bogus config descriptor length");
+ return 0;
+ }
+ /* this bit 'must be 1' but often isn't */
+ if (!realworld && !(config->bmAttributes & 0x80)) {
+ dbg ("high bit of config attributes not set");
+ return 0;
+ }
+ if (config->bmAttributes & 0x1f) { /* reserved == 0 */
+ dbg ("reserved config bits set");
+ return 0;
+ }
+ break;
+ default:
+ return 0;
+ }
+
+ if (le16_to_cpu(config->wTotalLength) == len) /* read it all */
+ return 1;
+ if (le16_to_cpu(config->wTotalLength) >= TBUF_SIZE) /* max partial read */
+ return 1;
+ dbg ("bogus config descriptor read size");
+ return 0;
+}
+
+/* sanity test for standard requests working with usb_control_mesg() and some
+ * of the utility functions which use it.
+ *
+ * this doesn't test how endpoint halts behave or data toggles get set, since
+ * we won't do I/O to bulk/interrupt endpoints here (which is how to change
+ * halt or toggle). toggle testing is impractical without support from hcds.
+ *
+ * this avoids failing devices linux would normally work with, by not testing
+ * config/altsetting operations for devices that only support their defaults.
+ * such devices rarely support those needless operations.
+ *
+ * NOTE that since this is a sanity test, it's not examining boundary cases
+ * to see if usbcore, hcd, and device all behave right. such testing would
+ * involve varied read sizes and other operation sequences.
+ */
+static int ch9_postconfig (struct usbtest_dev *dev)
+{
+ struct usb_interface *iface = dev->intf;
+ struct usb_device *udev = interface_to_usbdev (iface);
+ int i, alt, retval;
+
+ /* [9.2.3] if there's more than one altsetting, we need to be able to
+ * set and get each one. mostly trusts the descriptors from usbcore.
+ */
+ for (i = 0; i < iface->num_altsetting; i++) {
+
+ /* 9.2.3 constrains the range here */
+ alt = iface->altsetting [i].desc.bAlternateSetting;
+ if (alt < 0 || alt >= iface->num_altsetting) {
+ dev_dbg (&iface->dev,
+ "invalid alt [%d].bAltSetting = %d\n",
+ i, alt);
+ }
+
+ /* [real world] get/set unimplemented if there's only one */
+ if (realworld && iface->num_altsetting == 1)
+ continue;
+
+ /* [9.4.10] set_interface */
+ retval = set_altsetting (dev, alt);
+ if (retval) {
+ dev_dbg (&iface->dev, "can't set_interface = %d, %d\n",
+ alt, retval);
+ return retval;
+ }
+
+ /* [9.4.4] get_interface always works */
+ retval = get_altsetting (dev);
+ if (retval != alt) {
+ dev_dbg (&iface->dev, "get alt should be %d, was %d\n",
+ alt, retval);
+ return (retval < 0) ? retval : -EDOM;
+ }
+
+ }
+
+ /* [real world] get_config unimplemented if there's only one */
+ if (!realworld || udev->descriptor.bNumConfigurations != 1) {
+ int expected = udev->actconfig->desc.bConfigurationValue;
+
+ /* [9.4.2] get_configuration always works
+ * ... although some cheap devices (like one TI Hub I've got)
+ * won't return config descriptors except before set_config.
+ */
+ retval = usb_control_msg (udev, usb_rcvctrlpipe (udev, 0),
+ USB_REQ_GET_CONFIGURATION,
+ USB_DIR_IN | USB_RECIP_DEVICE,
+ 0, 0, dev->buf, 1, USB_CTRL_GET_TIMEOUT);
+ if (retval != 1 || dev->buf [0] != expected) {
+ dev_dbg (&iface->dev,
+ "get config --> %d (%d)\n", retval,
+ expected);
+ return (retval < 0) ? retval : -EDOM;
+ }
+ }
+
+ /* there's always [9.4.3] a device descriptor [9.6.1] */
+ retval = usb_get_descriptor (udev, USB_DT_DEVICE, 0,
+ dev->buf, sizeof udev->descriptor);
+ if (retval != sizeof udev->descriptor) {
+ dev_dbg (&iface->dev, "dev descriptor --> %d\n", retval);
+ return (retval < 0) ? retval : -EDOM;
+ }
+
+ /* there's always [9.4.3] at least one config descriptor [9.6.3] */
+ for (i = 0; i < udev->descriptor.bNumConfigurations; i++) {
+ retval = usb_get_descriptor (udev, USB_DT_CONFIG, i,
+ dev->buf, TBUF_SIZE);
+ if (!is_good_config (dev->buf, retval)) {
+ dev_dbg (&iface->dev,
+ "config [%d] descriptor --> %d\n",
+ i, retval);
+ return (retval < 0) ? retval : -EDOM;
+ }
+
+ // FIXME cross-checking udev->config[i] to make sure usbcore
+ // parsed it right (etc) would be good testing paranoia
+ }
+
+ /* and sometimes [9.2.6.6] speed dependent descriptors */
+ if (le16_to_cpu(udev->descriptor.bcdUSB) == 0x0200) {
+ struct usb_qualifier_descriptor *d = NULL;
+
+ /* device qualifier [9.6.2] */
+ retval = usb_get_descriptor (udev,
+ USB_DT_DEVICE_QUALIFIER, 0, dev->buf,
+ sizeof (struct usb_qualifier_descriptor));
+ if (retval == -EPIPE) {
+ if (udev->speed == USB_SPEED_HIGH) {
+ dev_dbg (&iface->dev,
+ "hs dev qualifier --> %d\n",
+ retval);
+ return (retval < 0) ? retval : -EDOM;
+ }
+ /* usb2.0 but not high-speed capable; fine */
+ } else if (retval != sizeof (struct usb_qualifier_descriptor)) {
+ dev_dbg (&iface->dev, "dev qualifier --> %d\n", retval);
+ return (retval < 0) ? retval : -EDOM;
+ } else
+ d = (struct usb_qualifier_descriptor *) dev->buf;
+
+ /* might not have [9.6.2] any other-speed configs [9.6.4] */
+ if (d) {
+ unsigned max = d->bNumConfigurations;
+ for (i = 0; i < max; i++) {
+ retval = usb_get_descriptor (udev,
+ USB_DT_OTHER_SPEED_CONFIG, i,
+ dev->buf, TBUF_SIZE);
+ if (!is_good_config (dev->buf, retval)) {
+ dev_dbg (&iface->dev,
+ "other speed config --> %d\n",
+ retval);
+ return (retval < 0) ? retval : -EDOM;
+ }
+ }
+ }
+ }
+ // FIXME fetch strings from at least the device descriptor
+
+ /* [9.4.5] get_status always works */
+ retval = usb_get_status (udev, USB_RECIP_DEVICE, 0, dev->buf);
+ if (retval != 2) {
+ dev_dbg (&iface->dev, "get dev status --> %d\n", retval);
+ return (retval < 0) ? retval : -EDOM;
+ }
+
+ // FIXME configuration.bmAttributes says if we could try to set/clear
+ // the device's remote wakeup feature ... if we can, test that here
+
+ retval = usb_get_status (udev, USB_RECIP_INTERFACE,
+ iface->altsetting [0].desc.bInterfaceNumber, dev->buf);
+ if (retval != 2) {
+ dev_dbg (&iface->dev, "get interface status --> %d\n", retval);
+ return (retval < 0) ? retval : -EDOM;
+ }
+ // FIXME get status for each endpoint in the interface
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* use ch9 requests to test whether:
+ * (a) queues work for control, keeping N subtests queued and
+ * active (auto-resubmit) for M loops through the queue.
+ * (b) protocol stalls (control-only) will autorecover.
+ * it's not like bulk/intr; no halt clearing.
+ * (c) short control reads are reported and handled.
+ * (d) queues are always processed in-order
+ */
+
+struct ctrl_ctx {
+ spinlock_t lock;
+ struct usbtest_dev *dev;
+ struct completion complete;
+ unsigned count;
+ unsigned pending;
+ int status;
+ struct urb **urb;
+ struct usbtest_param *param;
+ int last;
+};
+
+#define NUM_SUBCASES 15 /* how many test subcases here? */
+
+struct subcase {
+ struct usb_ctrlrequest setup;
+ int number;
+ int expected;
+};
+
+static void ctrl_complete (struct urb *urb, struct pt_regs *regs)
+{
+ struct ctrl_ctx *ctx = urb->context;
+ struct usb_ctrlrequest *reqp;
+ struct subcase *subcase;
+ int status = urb->status;
+
+ reqp = (struct usb_ctrlrequest *)urb->setup_packet;
+ subcase = container_of (reqp, struct subcase, setup);
+
+ spin_lock (&ctx->lock);
+ ctx->count--;
+ ctx->pending--;
+
+ /* queue must transfer and complete in fifo order, unless
+ * usb_unlink_urb() is used to unlink something not at the
+ * physical queue head (not tested).
+ */
+ if (subcase->number > 0) {
+ if ((subcase->number - ctx->last) != 1) {
+ dbg ("subcase %d completed out of order, last %d",
+ subcase->number, ctx->last);
+ status = -EDOM;
+ ctx->last = subcase->number;
+ goto error;
+ }
+ }
+ ctx->last = subcase->number;
+
+ /* succeed or fault in only one way? */
+ if (status == subcase->expected)
+ status = 0;
+
+ /* async unlink for cleanup? */
+ else if (status != -ECONNRESET) {
+
+ /* some faults are allowed, not required */
+ if (subcase->expected > 0 && (
+ ((urb->status == -subcase->expected /* happened */
+ || urb->status == 0)))) /* didn't */
+ status = 0;
+ /* sometimes more than one fault is allowed */
+ else if (subcase->number == 12 && status == -EPIPE)
+ status = 0;
+ else
+ dbg ("subtest %d error, status %d",
+ subcase->number, status);
+ }
+
+ /* unexpected status codes mean errors; ideally, in hardware */
+ if (status) {
+error:
+ if (ctx->status == 0) {
+ int i;
+
+ ctx->status = status;
+ info ("control queue %02x.%02x, err %d, %d left",
+ reqp->bRequestType, reqp->bRequest,
+ status, ctx->count);
+
+ /* FIXME this "unlink everything" exit route should
+ * be a separate test case.
+ */
+
+ /* unlink whatever's still pending */
+ for (i = 1; i < ctx->param->sglen; i++) {
+ struct urb *u = ctx->urb [
+ (i + subcase->number) % ctx->param->sglen];
+
+ if (u == urb || !u->dev)
+ continue;
+ status = usb_unlink_urb (u);
+ switch (status) {
+ case -EINPROGRESS:
+ case -EBUSY:
+ case -EIDRM:
+ continue;
+ default:
+ dbg ("urb unlink --> %d", status);
+ }
+ }
+ status = ctx->status;
+ }
+ }
+
+ /* resubmit if we need to, else mark this as done */
+ if ((status == 0) && (ctx->pending < ctx->count)) {
+ if ((status = usb_submit_urb (urb, SLAB_ATOMIC)) != 0) {
+ dbg ("can't resubmit ctrl %02x.%02x, err %d",
+ reqp->bRequestType, reqp->bRequest, status);
+ urb->dev = NULL;
+ } else
+ ctx->pending++;
+ } else
+ urb->dev = NULL;
+
+ /* signal completion when nothing's queued */
+ if (ctx->pending == 0)
+ complete (&ctx->complete);
+ spin_unlock (&ctx->lock);
+}
+
+static int
+test_ctrl_queue (struct usbtest_dev *dev, struct usbtest_param *param)
+{
+ struct usb_device *udev = testdev_to_usbdev (dev);
+ struct urb **urb;
+ struct ctrl_ctx context;
+ int i;
+
+ spin_lock_init (&context.lock);
+ context.dev = dev;
+ init_completion (&context.complete);
+ context.count = param->sglen * param->iterations;
+ context.pending = 0;
+ context.status = -ENOMEM;
+ context.param = param;
+ context.last = -1;
+
+ /* allocate and init the urbs we'll queue.
+ * as with bulk/intr sglists, sglen is the queue depth; it also
+ * controls which subtests run (more tests than sglen) or rerun.
+ */
+ urb = kmalloc (param->sglen * sizeof (struct urb *), SLAB_KERNEL);
+ if (!urb)
+ return -ENOMEM;
+ memset (urb, 0, param->sglen * sizeof (struct urb *));
+ for (i = 0; i < param->sglen; i++) {
+ int pipe = usb_rcvctrlpipe (udev, 0);
+ unsigned len;
+ struct urb *u;
+ struct usb_ctrlrequest req;
+ struct subcase *reqp;
+ int expected = 0;
+
+ /* requests here are mostly expected to succeed on any
+ * device, but some are chosen to trigger protocol stalls
+ * or short reads.
+ */
+ memset (&req, 0, sizeof req);
+ req.bRequest = USB_REQ_GET_DESCRIPTOR;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_DEVICE;
+
+ switch (i % NUM_SUBCASES) {
+ case 0: // get device descriptor
+ req.wValue = cpu_to_le16 (USB_DT_DEVICE << 8);
+ len = sizeof (struct usb_device_descriptor);
+ break;
+ case 1: // get first config descriptor (only)
+ req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+ len = sizeof (struct usb_config_descriptor);
+ break;
+ case 2: // get altsetting (OFTEN STALLS)
+ req.bRequest = USB_REQ_GET_INTERFACE;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_INTERFACE;
+ // index = 0 means first interface
+ len = 1;
+ expected = EPIPE;
+ break;
+ case 3: // get interface status
+ req.bRequest = USB_REQ_GET_STATUS;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_INTERFACE;
+ // interface 0
+ len = 2;
+ break;
+ case 4: // get device status
+ req.bRequest = USB_REQ_GET_STATUS;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_DEVICE;
+ len = 2;
+ break;
+ case 5: // get device qualifier (MAY STALL)
+ req.wValue = cpu_to_le16 (USB_DT_DEVICE_QUALIFIER << 8);
+ len = sizeof (struct usb_qualifier_descriptor);
+ if (udev->speed != USB_SPEED_HIGH)
+ expected = EPIPE;
+ break;
+ case 6: // get first config descriptor, plus interface
+ req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+ len = sizeof (struct usb_config_descriptor);
+ len += sizeof (struct usb_interface_descriptor);
+ break;
+ case 7: // get interface descriptor (ALWAYS STALLS)
+ req.wValue = cpu_to_le16 (USB_DT_INTERFACE << 8);
+ // interface == 0
+ len = sizeof (struct usb_interface_descriptor);
+ expected = EPIPE;
+ break;
+ // NOTE: two consecutive stalls in the queue here.
+ // that tests fault recovery a bit more aggressively.
+ case 8: // clear endpoint halt (USUALLY STALLS)
+ req.bRequest = USB_REQ_CLEAR_FEATURE;
+ req.bRequestType = USB_RECIP_ENDPOINT;
+ // wValue 0 == ep halt
+ // wIndex 0 == ep0 (shouldn't halt!)
+ len = 0;
+ pipe = usb_sndctrlpipe (udev, 0);
+ expected = EPIPE;
+ break;
+ case 9: // get endpoint status
+ req.bRequest = USB_REQ_GET_STATUS;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_ENDPOINT;
+ // endpoint 0
+ len = 2;
+ break;
+ case 10: // trigger short read (EREMOTEIO)
+ req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+ len = 1024;
+ expected = -EREMOTEIO;
+ break;
+ // NOTE: two consecutive _different_ faults in the queue.
+ case 11: // get endpoint descriptor (ALWAYS STALLS)
+ req.wValue = cpu_to_le16 (USB_DT_ENDPOINT << 8);
+ // endpoint == 0
+ len = sizeof (struct usb_interface_descriptor);
+ expected = EPIPE;
+ break;
+ // NOTE: sometimes even a third fault in the queue!
+ case 12: // get string 0 descriptor (MAY STALL)
+ req.wValue = cpu_to_le16 (USB_DT_STRING << 8);
+ // string == 0, for language IDs
+ len = sizeof (struct usb_interface_descriptor);
+ // may succeed when > 4 languages
+ expected = EREMOTEIO; // or EPIPE, if no strings
+ break;
+ case 13: // short read, resembling case 10
+ req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+ // last data packet "should" be DATA1, not DATA0
+ len = 1024 - udev->descriptor.bMaxPacketSize0;
+ expected = -EREMOTEIO;
+ break;
+ case 14: // short read; try to fill the last packet
+ req.wValue = cpu_to_le16 ((USB_DT_DEVICE << 8) | 0);
+ // device descriptor size == 18 bytes
+ len = udev->descriptor.bMaxPacketSize0;
+ switch (len) {
+ case 8: len = 24; break;
+ case 16: len = 32; break;
+ }
+ expected = -EREMOTEIO;
+ break;
+ default:
+ err ("bogus number of ctrl queue testcases!");
+ context.status = -EINVAL;
+ goto cleanup;
+ }
+ req.wLength = cpu_to_le16 (len);
+ urb [i] = u = simple_alloc_urb (udev, pipe, len);
+ if (!u)
+ goto cleanup;
+
+ reqp = usb_buffer_alloc (udev, sizeof *reqp, SLAB_KERNEL,
+ &u->setup_dma);
+ if (!reqp)
+ goto cleanup;
+ reqp->setup = req;
+ reqp->number = i % NUM_SUBCASES;
+ reqp->expected = expected;
+ u->setup_packet = (char *) &reqp->setup;
+
+ u->context = &context;
+ u->complete = ctrl_complete;
+ u->transfer_flags |= URB_ASYNC_UNLINK;
+ }
+
+ /* queue the urbs */
+ context.urb = urb;
+ spin_lock_irq (&context.lock);
+ for (i = 0; i < param->sglen; i++) {
+ context.status = usb_submit_urb (urb [i], SLAB_ATOMIC);
+ if (context.status != 0) {
+ dbg ("can't submit urb[%d], status %d",
+ i, context.status);
+ context.count = context.pending;
+ break;
+ }
+ context.pending++;
+ }
+ spin_unlock_irq (&context.lock);
+
+ /* FIXME set timer and time out; provide a disconnect hook */
+
+ /* wait for the last one to complete */
+ if (context.pending > 0)
+ wait_for_completion (&context.complete);
+
+cleanup:
+ for (i = 0; i < param->sglen; i++) {
+ if (!urb [i])
+ continue;
+ urb [i]->dev = udev;
+ if (urb [i]->setup_packet)
+ usb_buffer_free (udev, sizeof (struct usb_ctrlrequest),
+ urb [i]->setup_packet,
+ urb [i]->setup_dma);
+ simple_free_urb (urb [i]);
+ }
+ kfree (urb);
+ return context.status;
+}
+#undef NUM_SUBCASES
+
+
+/*-------------------------------------------------------------------------*/
+
+static void unlink1_callback (struct urb *urb, struct pt_regs *regs)
+{
+ int status = urb->status;
+
+ // we "know" -EPIPE (stall) never happens
+ if (!status)
+ status = usb_submit_urb (urb, SLAB_ATOMIC);
+ if (status) {
+ urb->status = status;
+ complete ((struct completion *) urb->context);
+ }
+}
+
+static int unlink1 (struct usbtest_dev *dev, int pipe, int size, int async)
+{
+ struct urb *urb;
+ struct completion completion;
+ int retval = 0;
+
+ init_completion (&completion);
+ urb = simple_alloc_urb (testdev_to_usbdev (dev), pipe, size);
+ if (!urb)
+ return -ENOMEM;
+ urb->transfer_flags |= URB_ASYNC_UNLINK;
+ urb->context = &completion;
+ urb->complete = unlink1_callback;
+
+ /* keep the endpoint busy. there are lots of hc/hcd-internal
+ * states, and testing should get to all of them over time.
+ *
+ * FIXME want additional tests for when endpoint is STALLing
+ * due to errors, or is just NAKing requests.
+ */
+ if ((retval = usb_submit_urb (urb, SLAB_KERNEL)) != 0) {
+ dev_dbg (&dev->intf->dev, "submit fail %d\n", retval);
+ return retval;
+ }
+
+ /* unlinking that should always work. variable delay tests more
+ * hcd states and code paths, even with little other system load.
+ */
+ msleep (jiffies % (2 * INTERRUPT_RATE));
+ if (async) {
+retry:
+ retval = usb_unlink_urb (urb);
+ if (retval == -EBUSY || retval == -EIDRM) {
+ /* we can't unlink urbs while they're completing.
+ * or if they've completed, and we haven't resubmitted.
+ * "normal" drivers would prevent resubmission, but
+ * since we're testing unlink paths, we can't.
+ */
+ dev_dbg (&dev->intf->dev, "unlink retry\n");
+ goto retry;
+ }
+ } else
+ usb_kill_urb (urb);
+ if (!(retval == 0 || retval == -EINPROGRESS)) {
+ dev_dbg (&dev->intf->dev, "unlink fail %d\n", retval);
+ return retval;
+ }
+
+ wait_for_completion (&completion);
+ retval = urb->status;
+ simple_free_urb (urb);
+
+ if (async)
+ return (retval == -ECONNRESET) ? 0 : retval - 1000;
+ else
+ return (retval == -ENOENT || retval == -EPERM) ?
+ 0 : retval - 2000;
+}
+
+static int unlink_simple (struct usbtest_dev *dev, int pipe, int len)
+{
+ int retval = 0;
+
+ /* test sync and async paths */
+ retval = unlink1 (dev, pipe, len, 1);
+ if (!retval)
+ retval = unlink1 (dev, pipe, len, 0);
+ return retval;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int verify_not_halted (int ep, struct urb *urb)
+{
+ int retval;
+ u16 status;
+
+ /* shouldn't look or act halted */
+ retval = usb_get_status (urb->dev, USB_RECIP_ENDPOINT, ep, &status);
+ if (retval < 0) {
+ dbg ("ep %02x couldn't get no-halt status, %d", ep, retval);
+ return retval;
+ }
+ if (status != 0) {
+ dbg ("ep %02x bogus status: %04x != 0", ep, status);
+ return -EINVAL;
+ }
+ retval = simple_io (urb, 1, 0, 0, __FUNCTION__);
+ if (retval != 0)
+ return -EINVAL;
+ return 0;
+}
+
+static int verify_halted (int ep, struct urb *urb)
+{
+ int retval;
+ u16 status;
+
+ /* should look and act halted */
+ retval = usb_get_status (urb->dev, USB_RECIP_ENDPOINT, ep, &status);
+ if (retval < 0) {
+ dbg ("ep %02x couldn't get halt status, %d", ep, retval);
+ return retval;
+ }
+ if (status != 1) {
+ dbg ("ep %02x bogus status: %04x != 1", ep, status);
+ return -EINVAL;
+ }
+ retval = simple_io (urb, 1, 0, -EPIPE, __FUNCTION__);
+ if (retval != -EPIPE)
+ return -EINVAL;
+ retval = simple_io (urb, 1, 0, -EPIPE, "verify_still_halted");
+ if (retval != -EPIPE)
+ return -EINVAL;
+ return 0;
+}
+
+static int test_halt (int ep, struct urb *urb)
+{
+ int retval;
+
+ /* shouldn't look or act halted now */
+ retval = verify_not_halted (ep, urb);
+ if (retval < 0)
+ return retval;
+
+ /* set halt (protocol test only), verify it worked */
+ retval = usb_control_msg (urb->dev, usb_sndctrlpipe (urb->dev, 0),
+ USB_REQ_SET_FEATURE, USB_RECIP_ENDPOINT,
+ USB_ENDPOINT_HALT, ep,
+ NULL, 0, USB_CTRL_SET_TIMEOUT);
+ if (retval < 0) {
+ dbg ("ep %02x couldn't set halt, %d", ep, retval);
+ return retval;
+ }
+ retval = verify_halted (ep, urb);
+ if (retval < 0)
+ return retval;
+
+ /* clear halt (tests API + protocol), verify it worked */
+ retval = usb_clear_halt (urb->dev, urb->pipe);
+ if (retval < 0) {
+ dbg ("ep %02x couldn't clear halt, %d", ep, retval);
+ return retval;
+ }
+ retval = verify_not_halted (ep, urb);
+ if (retval < 0)
+ return retval;
+
+ /* NOTE: could also verify SET_INTERFACE clear halts ... */
+
+ return 0;
+}
+
+static int halt_simple (struct usbtest_dev *dev)
+{
+ int ep;
+ int retval = 0;
+ struct urb *urb;
+
+ urb = simple_alloc_urb (testdev_to_usbdev (dev), 0, 512);
+ if (urb == NULL)
+ return -ENOMEM;
+
+ if (dev->in_pipe) {
+ ep = usb_pipeendpoint (dev->in_pipe) | USB_DIR_IN;
+ urb->pipe = dev->in_pipe;
+ retval = test_halt (ep, urb);
+ if (retval < 0)
+ goto done;
+ }
+
+ if (dev->out_pipe) {
+ ep = usb_pipeendpoint (dev->out_pipe);
+ urb->pipe = dev->out_pipe;
+ retval = test_halt (ep, urb);
+ }
+done:
+ simple_free_urb (urb);
+ return retval;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* Control OUT tests use the vendor control requests from Intel's
+ * USB 2.0 compliance test device: write a buffer, read it back.
+ *
+ * Intel's spec only _requires_ that it work for one packet, which
+ * is pretty weak. Some HCDs place limits here; most devices will
+ * need to be able to handle more than one OUT data packet. We'll
+ * try whatever we're told to try.
+ */
+static int ctrl_out (struct usbtest_dev *dev,
+ unsigned count, unsigned length, unsigned vary)
+{
+ unsigned i, j, len, retval;
+ u8 *buf;
+ char *what = "?";
+ struct usb_device *udev;
+
+ if (length > 0xffff || vary >= length)
+ return -EINVAL;
+
+ buf = kmalloc(length, SLAB_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+
+ udev = testdev_to_usbdev (dev);
+ len = length;
+ retval = 0;
+
+ /* NOTE: hardware might well act differently if we pushed it
+ * with lots back-to-back queued requests.
+ */
+ for (i = 0; i < count; i++) {
+ /* write patterned data */
+ for (j = 0; j < len; j++)
+ buf [j] = i + j;
+ retval = usb_control_msg (udev, usb_sndctrlpipe (udev,0),
+ 0x5b, USB_DIR_OUT|USB_TYPE_VENDOR,
+ 0, 0, buf, len, USB_CTRL_SET_TIMEOUT);
+ if (retval != len) {
+ what = "write";
+ break;
+ }
+
+ /* read it back -- assuming nothing intervened!! */
+ retval = usb_control_msg (udev, usb_rcvctrlpipe (udev,0),
+ 0x5c, USB_DIR_IN|USB_TYPE_VENDOR,
+ 0, 0, buf, len, USB_CTRL_GET_TIMEOUT);
+ if (retval != len) {
+ what = "read";
+ break;
+ }
+
+ /* fail if we can't verify */
+ for (j = 0; j < len; j++) {
+ if (buf [j] != (u8) (i + j)) {
+ INFO (dev, "ctrl_out, byte %d is %d not %d\n",
+ j, buf [j], (u8) i + j);
+ retval = -EBADMSG;
+ break;
+ }
+ }
+ if (retval < 0) {
+ what = "verify";
+ break;
+ }
+
+ len += vary;
+ if (len > length)
+ len = 0;
+ }
+
+ if (retval < 0)
+ INFO (dev, "ctrl_out %s failed, code %d, count %d\n",
+ what, retval, i);
+
+ kfree (buf);
+ return retval;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* ISO tests ... mimics common usage
+ * - buffer length is split into N packets (mostly maxpacket sized)
+ * - multi-buffers according to sglen
+ */
+
+struct iso_context {
+ unsigned count;
+ unsigned pending;
+ spinlock_t lock;
+ struct completion done;
+ unsigned long errors;
+ struct usbtest_dev *dev;
+};
+
+static void iso_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct iso_context *ctx = urb->context;
+
+ spin_lock(&ctx->lock);
+ ctx->count--;
+
+ if (urb->error_count > 0)
+ ctx->errors += urb->error_count;
+
+ if (urb->status == 0 && ctx->count > (ctx->pending - 1)) {
+ int status = usb_submit_urb (urb, GFP_ATOMIC);
+ switch (status) {
+ case 0:
+ goto done;
+ default:
+ dev_dbg (&ctx->dev->intf->dev,
+ "iso resubmit err %d\n",
+ status);
+ /* FALLTHROUGH */
+ case -ENODEV: /* disconnected */
+ break;
+ }
+ }
+ simple_free_urb (urb);
+
+ ctx->pending--;
+ if (ctx->pending == 0) {
+ if (ctx->errors)
+ dev_dbg (&ctx->dev->intf->dev,
+ "iso test, %lu errors\n",
+ ctx->errors);
+ complete (&ctx->done);
+ }
+done:
+ spin_unlock(&ctx->lock);
+}
+
+static struct urb *iso_alloc_urb (
+ struct usb_device *udev,
+ int pipe,
+ struct usb_endpoint_descriptor *desc,
+ long bytes
+)
+{
+ struct urb *urb;
+ unsigned i, maxp, packets;
+
+ if (bytes < 0 || !desc)
+ return NULL;
+ maxp = 0x7ff & le16_to_cpu(desc->wMaxPacketSize);
+ maxp *= 1 + (0x3 & (le16_to_cpu(desc->wMaxPacketSize) >> 11));
+ packets = (bytes + maxp - 1) / maxp;
+
+ urb = usb_alloc_urb (packets, SLAB_KERNEL);
+ if (!urb)
+ return urb;
+ urb->dev = udev;
+ urb->pipe = pipe;
+
+ urb->number_of_packets = packets;
+ urb->transfer_buffer_length = bytes;
+ urb->transfer_buffer = usb_buffer_alloc (udev, bytes, SLAB_KERNEL,
+ &urb->transfer_dma);
+ if (!urb->transfer_buffer) {
+ usb_free_urb (urb);
+ return NULL;
+ }
+ memset (urb->transfer_buffer, 0, bytes);
+ for (i = 0; i < packets; i++) {
+ /* here, only the last packet will be short */
+ urb->iso_frame_desc[i].length = min ((unsigned) bytes, maxp);
+ bytes -= urb->iso_frame_desc[i].length;
+
+ urb->iso_frame_desc[i].offset = maxp * i;
+ }
+
+ urb->complete = iso_callback;
+ // urb->context = SET BY CALLER
+ urb->interval = 1 << (desc->bInterval - 1);
+ urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
+ return urb;
+}
+
+static int
+test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param,
+ int pipe, struct usb_endpoint_descriptor *desc)
+{
+ struct iso_context context;
+ struct usb_device *udev;
+ unsigned i;
+ unsigned long packets = 0;
+ int status;
+ struct urb *urbs[10]; /* FIXME no limit */
+
+ if (param->sglen > 10)
+ return -EDOM;
+
+ context.count = param->iterations * param->sglen;
+ context.pending = param->sglen;
+ context.errors = 0;
+ context.dev = dev;
+ init_completion (&context.done);
+ spin_lock_init (&context.lock);
+
+ memset (urbs, 0, sizeof urbs);
+ udev = testdev_to_usbdev (dev);
+ dev_dbg (&dev->intf->dev,
+ "... iso period %d %sframes, wMaxPacket %04x\n",
+ 1 << (desc->bInterval - 1),
+ (udev->speed == USB_SPEED_HIGH) ? "micro" : "",
+ le16_to_cpu(desc->wMaxPacketSize));
+
+ for (i = 0; i < param->sglen; i++) {
+ urbs [i] = iso_alloc_urb (udev, pipe, desc,
+ param->length);
+ if (!urbs [i]) {
+ status = -ENOMEM;
+ goto fail;
+ }
+ packets += urbs[i]->number_of_packets;
+ urbs [i]->context = &context;
+ }
+ packets *= param->iterations;
+ dev_dbg (&dev->intf->dev,
+ "... total %lu msec (%lu packets)\n",
+ (packets * (1 << (desc->bInterval - 1)))
+ / ((udev->speed == USB_SPEED_HIGH) ? 8 : 1),
+ packets);
+
+ spin_lock_irq (&context.lock);
+ for (i = 0; i < param->sglen; i++) {
+ status = usb_submit_urb (urbs [i], SLAB_ATOMIC);
+ if (status < 0) {
+ ERROR (dev, "submit iso[%d], error %d\n", i, status);
+ if (i == 0) {
+ spin_unlock_irq (&context.lock);
+ goto fail;
+ }
+
+ simple_free_urb (urbs [i]);
+ context.pending--;
+ }
+ }
+ spin_unlock_irq (&context.lock);
+
+ wait_for_completion (&context.done);
+ return 0;
+
+fail:
+ for (i = 0; i < param->sglen; i++) {
+ if (urbs [i])
+ simple_free_urb (urbs [i]);
+ }
+ return status;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* We only have this one interface to user space, through usbfs.
+ * User mode code can scan usbfs to find N different devices (maybe on
+ * different busses) to use when testing, and allocate one thread per
+ * test. So discovery is simplified, and we have no device naming issues.
+ *
+ * Don't use these only as stress/load tests. Use them along with with
+ * other USB bus activity: plugging, unplugging, mousing, mp3 playback,
+ * video capture, and so on. Run different tests at different times, in
+ * different sequences. Nothing here should interact with other devices,
+ * except indirectly by consuming USB bandwidth and CPU resources for test
+ * threads and request completion. But the only way to know that for sure
+ * is to test when HC queues are in use by many devices.
+ */
+
+static int
+usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf)
+{
+ struct usbtest_dev *dev = usb_get_intfdata (intf);
+ struct usb_device *udev = testdev_to_usbdev (dev);
+ struct usbtest_param *param = buf;
+ int retval = -EOPNOTSUPP;
+ struct urb *urb;
+ struct scatterlist *sg;
+ struct usb_sg_request req;
+ struct timeval start;
+ unsigned i;
+
+ // FIXME USBDEVFS_CONNECTINFO doesn't say how fast the device is.
+
+ if (code != USBTEST_REQUEST)
+ return -EOPNOTSUPP;
+
+ if (param->iterations <= 0 || param->length < 0
+ || param->sglen < 0 || param->vary < 0)
+ return -EINVAL;
+
+ if (down_interruptible (&dev->sem))
+ return -ERESTARTSYS;
+
+ /* some devices, like ez-usb default devices, need a non-default
+ * altsetting to have any active endpoints. some tests change
+ * altsettings; force a default so most tests don't need to check.
+ */
+ if (dev->info->alt >= 0) {
+ int res;
+
+ if (intf->altsetting->desc.bInterfaceNumber) {
+ up (&dev->sem);
+ return -ENODEV;
+ }
+ res = set_altsetting (dev, dev->info->alt);
+ if (res) {
+ dev_err (&intf->dev,
+ "set altsetting to %d failed, %d\n",
+ dev->info->alt, res);
+ up (&dev->sem);
+ return res;
+ }
+ }
+
+ /*
+ * Just a bunch of test cases that every HCD is expected to handle.
+ *
+ * Some may need specific firmware, though it'd be good to have
+ * one firmware image to handle all the test cases.
+ *
+ * FIXME add more tests! cancel requests, verify the data, control
+ * queueing, concurrent read+write threads, and so on.
+ */
+ do_gettimeofday (&start);
+ switch (param->test_num) {
+
+ case 0:
+ dev_dbg (&intf->dev, "TEST 0: NOP\n");
+ retval = 0;
+ break;
+
+ /* Simple non-queued bulk I/O tests */
+ case 1:
+ if (dev->out_pipe == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 1: write %d bytes %u times\n",
+ param->length, param->iterations);
+ urb = simple_alloc_urb (udev, dev->out_pipe, param->length);
+ if (!urb) {
+ retval = -ENOMEM;
+ break;
+ }
+ // FIRMWARE: bulk sink (maybe accepts short writes)
+ retval = simple_io (urb, param->iterations, 0, 0, "test1");
+ simple_free_urb (urb);
+ break;
+ case 2:
+ if (dev->in_pipe == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 2: read %d bytes %u times\n",
+ param->length, param->iterations);
+ urb = simple_alloc_urb (udev, dev->in_pipe, param->length);
+ if (!urb) {
+ retval = -ENOMEM;
+ break;
+ }
+ // FIRMWARE: bulk source (maybe generates short writes)
+ retval = simple_io (urb, param->iterations, 0, 0, "test2");
+ simple_free_urb (urb);
+ break;
+ case 3:
+ if (dev->out_pipe == 0 || param->vary == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 3: write/%d 0..%d bytes %u times\n",
+ param->vary, param->length, param->iterations);
+ urb = simple_alloc_urb (udev, dev->out_pipe, param->length);
+ if (!urb) {
+ retval = -ENOMEM;
+ break;
+ }
+ // FIRMWARE: bulk sink (maybe accepts short writes)
+ retval = simple_io (urb, param->iterations, param->vary,
+ 0, "test3");
+ simple_free_urb (urb);
+ break;
+ case 4:
+ if (dev->in_pipe == 0 || param->vary == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 4: read/%d 0..%d bytes %u times\n",
+ param->vary, param->length, param->iterations);
+ urb = simple_alloc_urb (udev, dev->in_pipe, param->length);
+ if (!urb) {
+ retval = -ENOMEM;
+ break;
+ }
+ // FIRMWARE: bulk source (maybe generates short writes)
+ retval = simple_io (urb, param->iterations, param->vary,
+ 0, "test4");
+ simple_free_urb (urb);
+ break;
+
+ /* Queued bulk I/O tests */
+ case 5:
+ if (dev->out_pipe == 0 || param->sglen == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 5: write %d sglists %d entries of %d bytes\n",
+ param->iterations,
+ param->sglen, param->length);
+ sg = alloc_sglist (param->sglen, param->length, 0);
+ if (!sg) {
+ retval = -ENOMEM;
+ break;
+ }
+ // FIRMWARE: bulk sink (maybe accepts short writes)
+ retval = perform_sglist (udev, param->iterations, dev->out_pipe,
+ &req, sg, param->sglen);
+ free_sglist (sg, param->sglen);
+ break;
+
+ case 6:
+ if (dev->in_pipe == 0 || param->sglen == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 6: read %d sglists %d entries of %d bytes\n",
+ param->iterations,
+ param->sglen, param->length);
+ sg = alloc_sglist (param->sglen, param->length, 0);
+ if (!sg) {
+ retval = -ENOMEM;
+ break;
+ }
+ // FIRMWARE: bulk source (maybe generates short writes)
+ retval = perform_sglist (udev, param->iterations, dev->in_pipe,
+ &req, sg, param->sglen);
+ free_sglist (sg, param->sglen);
+ break;
+ case 7:
+ if (dev->out_pipe == 0 || param->sglen == 0 || param->vary == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 7: write/%d %d sglists %d entries 0..%d bytes\n",
+ param->vary, param->iterations,
+ param->sglen, param->length);
+ sg = alloc_sglist (param->sglen, param->length, param->vary);
+ if (!sg) {
+ retval = -ENOMEM;
+ break;
+ }
+ // FIRMWARE: bulk sink (maybe accepts short writes)
+ retval = perform_sglist (udev, param->iterations, dev->out_pipe,
+ &req, sg, param->sglen);
+ free_sglist (sg, param->sglen);
+ break;
+ case 8:
+ if (dev->in_pipe == 0 || param->sglen == 0 || param->vary == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 8: read/%d %d sglists %d entries 0..%d bytes\n",
+ param->vary, param->iterations,
+ param->sglen, param->length);
+ sg = alloc_sglist (param->sglen, param->length, param->vary);
+ if (!sg) {
+ retval = -ENOMEM;
+ break;
+ }
+ // FIRMWARE: bulk source (maybe generates short writes)
+ retval = perform_sglist (udev, param->iterations, dev->in_pipe,
+ &req, sg, param->sglen);
+ free_sglist (sg, param->sglen);
+ break;
+
+ /* non-queued sanity tests for control (chapter 9 subset) */
+ case 9:
+ retval = 0;
+ dev_dbg (&intf->dev,
+ "TEST 9: ch9 (subset) control tests, %d times\n",
+ param->iterations);
+ for (i = param->iterations; retval == 0 && i--; /* NOP */)
+ retval = ch9_postconfig (dev);
+ if (retval)
+ dbg ("ch9 subset failed, iterations left %d", i);
+ break;
+
+ /* queued control messaging */
+ case 10:
+ if (param->sglen == 0)
+ break;
+ retval = 0;
+ dev_dbg (&intf->dev,
+ "TEST 10: queue %d control calls, %d times\n",
+ param->sglen,
+ param->iterations);
+ retval = test_ctrl_queue (dev, param);
+ break;
+
+ /* simple non-queued unlinks (ring with one urb) */
+ case 11:
+ if (dev->in_pipe == 0 || !param->length)
+ break;
+ retval = 0;
+ dev_dbg (&intf->dev, "TEST 11: unlink %d reads of %d\n",
+ param->iterations, param->length);
+ for (i = param->iterations; retval == 0 && i--; /* NOP */)
+ retval = unlink_simple (dev, dev->in_pipe,
+ param->length);
+ if (retval)
+ dev_dbg (&intf->dev, "unlink reads failed %d, "
+ "iterations left %d\n", retval, i);
+ break;
+ case 12:
+ if (dev->out_pipe == 0 || !param->length)
+ break;
+ retval = 0;
+ dev_dbg (&intf->dev, "TEST 12: unlink %d writes of %d\n",
+ param->iterations, param->length);
+ for (i = param->iterations; retval == 0 && i--; /* NOP */)
+ retval = unlink_simple (dev, dev->out_pipe,
+ param->length);
+ if (retval)
+ dev_dbg (&intf->dev, "unlink writes failed %d, "
+ "iterations left %d\n", retval, i);
+ break;
+
+ /* ep halt tests */
+ case 13:
+ if (dev->out_pipe == 0 && dev->in_pipe == 0)
+ break;
+ retval = 0;
+ dev_dbg (&intf->dev, "TEST 13: set/clear %d halts\n",
+ param->iterations);
+ for (i = param->iterations; retval == 0 && i--; /* NOP */)
+ retval = halt_simple (dev);
+
+ if (retval)
+ DBG (dev, "halts failed, iterations left %d\n", i);
+ break;
+
+ /* control write tests */
+ case 14:
+ if (!dev->info->ctrl_out)
+ break;
+ dev_dbg (&intf->dev, "TEST 14: %d ep0out, 0..%d vary %d\n",
+ param->iterations, param->length, param->vary);
+ retval = ctrl_out (dev, param->iterations,
+ param->length, param->vary);
+ break;
+
+ /* iso write tests */
+ case 15:
+ if (dev->out_iso_pipe == 0 || param->sglen == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 15: write %d iso, %d entries of %d bytes\n",
+ param->iterations,
+ param->sglen, param->length);
+ // FIRMWARE: iso sink
+ retval = test_iso_queue (dev, param,
+ dev->out_iso_pipe, dev->iso_out);
+ break;
+
+ /* iso read tests */
+ case 16:
+ if (dev->in_iso_pipe == 0 || param->sglen == 0)
+ break;
+ dev_dbg (&intf->dev,
+ "TEST 16: read %d iso, %d entries of %d bytes\n",
+ param->iterations,
+ param->sglen, param->length);
+ // FIRMWARE: iso source
+ retval = test_iso_queue (dev, param,
+ dev->in_iso_pipe, dev->iso_in);
+ break;
+
+ // FIXME unlink from queue (ring with N urbs)
+
+ // FIXME scatterlist cancel (needs helper thread)
+
+ }
+ do_gettimeofday (&param->duration);
+ param->duration.tv_sec -= start.tv_sec;
+ param->duration.tv_usec -= start.tv_usec;
+ if (param->duration.tv_usec < 0) {
+ param->duration.tv_usec += 1000 * 1000;
+ param->duration.tv_sec -= 1;
+ }
+ up (&dev->sem);
+ return retval;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static unsigned force_interrupt = 0;
+module_param (force_interrupt, uint, 0);
+MODULE_PARM_DESC (force_interrupt, "0 = test default; else interrupt");
+
+#ifdef GENERIC
+static unsigned short vendor;
+module_param(vendor, ushort, 0);
+MODULE_PARM_DESC (vendor, "vendor code (from usb-if)");
+
+static unsigned short product;
+module_param(product, ushort, 0);
+MODULE_PARM_DESC (product, "product code (from vendor)");
+#endif
+
+static int
+usbtest_probe (struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *udev;
+ struct usbtest_dev *dev;
+ struct usbtest_info *info;
+ char *rtest, *wtest;
+ char *irtest, *iwtest;
+
+ udev = interface_to_usbdev (intf);
+
+#ifdef GENERIC
+ /* specify devices by module parameters? */
+ if (id->match_flags == 0) {
+ /* vendor match required, product match optional */
+ if (!vendor || le16_to_cpu(udev->descriptor.idVendor) != (u16)vendor)
+ return -ENODEV;
+ if (product && le16_to_cpu(udev->descriptor.idProduct) != (u16)product)
+ return -ENODEV;
+ dbg ("matched module params, vend=0x%04x prod=0x%04x",
+ le16_to_cpu(udev->descriptor.idVendor),
+ le16_to_cpu(udev->descriptor.idProduct));
+ }
+#endif
+
+ dev = kmalloc (sizeof *dev, SLAB_KERNEL);
+ if (!dev)
+ return -ENOMEM;
+ memset (dev, 0, sizeof *dev);
+ info = (struct usbtest_info *) id->driver_info;
+ dev->info = info;
+ init_MUTEX (&dev->sem);
+
+ dev->intf = intf;
+
+ /* cacheline-aligned scratch for i/o */
+ if ((dev->buf = kmalloc (TBUF_SIZE, SLAB_KERNEL)) == NULL) {
+ kfree (dev);
+ return -ENOMEM;
+ }
+
+ /* NOTE this doesn't yet test the handful of difference that are
+ * visible with high speed interrupts: bigger maxpacket (1K) and
+ * "high bandwidth" modes (up to 3 packets/uframe).
+ */
+ rtest = wtest = "";
+ irtest = iwtest = "";
+ if (force_interrupt || udev->speed == USB_SPEED_LOW) {
+ if (info->ep_in) {
+ dev->in_pipe = usb_rcvintpipe (udev, info->ep_in);
+ rtest = " intr-in";
+ }
+ if (info->ep_out) {
+ dev->out_pipe = usb_sndintpipe (udev, info->ep_out);
+ wtest = " intr-out";
+ }
+ } else {
+ if (info->autoconf) {
+ int status;
+
+ status = get_endpoints (dev, intf);
+ if (status < 0) {
+ dbg ("couldn't get endpoints, %d\n", status);
+ return status;
+ }
+ /* may find bulk or ISO pipes */
+ } else {
+ if (info->ep_in)
+ dev->in_pipe = usb_rcvbulkpipe (udev,
+ info->ep_in);
+ if (info->ep_out)
+ dev->out_pipe = usb_sndbulkpipe (udev,
+ info->ep_out);
+ }
+ if (dev->in_pipe)
+ rtest = " bulk-in";
+ if (dev->out_pipe)
+ wtest = " bulk-out";
+ if (dev->in_iso_pipe)
+ irtest = " iso-in";
+ if (dev->out_iso_pipe)
+ iwtest = " iso-out";
+ }
+
+ usb_set_intfdata (intf, dev);
+ dev_info (&intf->dev, "%s\n", info->name);
+ dev_info (&intf->dev, "%s speed {control%s%s%s%s%s} tests%s\n",
+ ({ char *tmp;
+ switch (udev->speed) {
+ case USB_SPEED_LOW: tmp = "low"; break;
+ case USB_SPEED_FULL: tmp = "full"; break;
+ case USB_SPEED_HIGH: tmp = "high"; break;
+ default: tmp = "unknown"; break;
+ }; tmp; }),
+ info->ctrl_out ? " in/out" : "",
+ rtest, wtest,
+ irtest, iwtest,
+ info->alt >= 0 ? " (+alt)" : "");
+ return 0;
+}
+
+static void usbtest_disconnect (struct usb_interface *intf)
+{
+ struct usbtest_dev *dev = usb_get_intfdata (intf);
+
+ down (&dev->sem);
+
+ usb_set_intfdata (intf, NULL);
+ dev_dbg (&intf->dev, "disconnect\n");
+ kfree (dev);
+}
+
+/* Basic testing only needs a device that can source or sink bulk traffic.
+ * Any device can test control transfers (default with GENERIC binding).
+ *
+ * Several entries work with the default EP0 implementation that's built
+ * into EZ-USB chips. There's a default vendor ID which can be overridden
+ * by (very) small config EEPROMS, but otherwise all these devices act
+ * identically until firmware is loaded: only EP0 works. It turns out
+ * to be easy to make other endpoints work, without modifying that EP0
+ * behavior. For now, we expect that kind of firmware.
+ */
+
+/* an21xx or fx versions of ez-usb */
+static struct usbtest_info ez1_info = {
+ .name = "EZ-USB device",
+ .ep_in = 2,
+ .ep_out = 2,
+ .alt = 1,
+};
+
+/* fx2 version of ez-usb */
+static struct usbtest_info ez2_info = {
+ .name = "FX2 device",
+ .ep_in = 6,
+ .ep_out = 2,
+ .alt = 1,
+};
+
+/* ezusb family device with dedicated usb test firmware,
+ */
+static struct usbtest_info fw_info = {
+ .name = "usb test device",
+ .ep_in = 2,
+ .ep_out = 2,
+ .alt = 1,
+ .autoconf = 1, // iso and ctrl_out need autoconf
+ .ctrl_out = 1,
+ .iso = 1, // iso_ep's are #8 in/out
+};
+
+/* peripheral running Linux and 'zero.c' test firmware, or
+ * its user-mode cousin. different versions of this use
+ * different hardware with the same vendor/product codes.
+ * host side MUST rely on the endpoint descriptors.
+ */
+static struct usbtest_info gz_info = {
+ .name = "Linux gadget zero",
+ .autoconf = 1,
+ .ctrl_out = 1,
+ .alt = 0,
+};
+
+static struct usbtest_info um_info = {
+ .name = "Linux user mode test driver",
+ .autoconf = 1,
+ .alt = -1,
+};
+
+static struct usbtest_info um2_info = {
+ .name = "Linux user mode ISO test driver",
+ .autoconf = 1,
+ .iso = 1,
+ .alt = -1,
+};
+
+#ifdef IBOT2
+/* this is a nice source of high speed bulk data;
+ * uses an FX2, with firmware provided in the device
+ */
+static struct usbtest_info ibot2_info = {
+ .name = "iBOT2 webcam",
+ .ep_in = 2,
+ .alt = -1,
+};
+#endif
+
+#ifdef GENERIC
+/* we can use any device to test control traffic */
+static struct usbtest_info generic_info = {
+ .name = "Generic USB device",
+ .alt = -1,
+};
+#endif
+
+// FIXME remove this
+static struct usbtest_info hact_info = {
+ .name = "FX2/hact",
+ //.ep_in = 6,
+ .ep_out = 2,
+ .alt = -1,
+};
+
+
+static struct usb_device_id id_table [] = {
+
+ { USB_DEVICE (0x0547, 0x1002),
+ .driver_info = (unsigned long) &hact_info,
+ },
+
+ /*-------------------------------------------------------------*/
+
+ /* EZ-USB devices which download firmware to replace (or in our
+ * case augment) the default device implementation.
+ */
+
+ /* generic EZ-USB FX controller */
+ { USB_DEVICE (0x0547, 0x2235),
+ .driver_info = (unsigned long) &ez1_info,
+ },
+
+ /* CY3671 development board with EZ-USB FX */
+ { USB_DEVICE (0x0547, 0x0080),
+ .driver_info = (unsigned long) &ez1_info,
+ },
+
+ /* generic EZ-USB FX2 controller (or development board) */
+ { USB_DEVICE (0x04b4, 0x8613),
+ .driver_info = (unsigned long) &ez2_info,
+ },
+
+ /* re-enumerated usb test device firmware */
+ { USB_DEVICE (0xfff0, 0xfff0),
+ .driver_info = (unsigned long) &fw_info,
+ },
+
+ /* "Gadget Zero" firmware runs under Linux */
+ { USB_DEVICE (0x0525, 0xa4a0),
+ .driver_info = (unsigned long) &gz_info,
+ },
+
+ /* so does a user-mode variant */
+ { USB_DEVICE (0x0525, 0xa4a4),
+ .driver_info = (unsigned long) &um_info,
+ },
+
+ /* ... and a user-mode variant that talks iso */
+ { USB_DEVICE (0x0525, 0xa4a3),
+ .driver_info = (unsigned long) &um2_info,
+ },
+
+#ifdef KEYSPAN_19Qi
+ /* Keyspan 19qi uses an21xx (original EZ-USB) */
+ // this does not coexist with the real Keyspan 19qi driver!
+ { USB_DEVICE (0x06cd, 0x010b),
+ .driver_info = (unsigned long) &ez1_info,
+ },
+#endif
+
+ /*-------------------------------------------------------------*/
+
+#ifdef IBOT2
+ /* iBOT2 makes a nice source of high speed bulk-in data */
+ // this does not coexist with a real iBOT2 driver!
+ { USB_DEVICE (0x0b62, 0x0059),
+ .driver_info = (unsigned long) &ibot2_info,
+ },
+#endif
+
+ /*-------------------------------------------------------------*/
+
+#ifdef GENERIC
+ /* module params can specify devices to use for control tests */
+ { .driver_info = (unsigned long) &generic_info, },
+#endif
+
+ /*-------------------------------------------------------------*/
+
+ { }
+};
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver usbtest_driver = {
+ .owner = THIS_MODULE,
+ .name = "usbtest",
+ .id_table = id_table,
+ .probe = usbtest_probe,
+ .ioctl = usbtest_ioctl,
+ .disconnect = usbtest_disconnect,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int __init usbtest_init (void)
+{
+#ifdef GENERIC
+ if (vendor)
+ dbg ("params: vend=0x%04x prod=0x%04x", vendor, product);
+#endif
+ return usb_register (&usbtest_driver);
+}
+module_init (usbtest_init);
+
+static void __exit usbtest_exit (void)
+{
+ usb_deregister (&usbtest_driver);
+}
+module_exit (usbtest_exit);
+
+MODULE_DESCRIPTION ("USB Core/HCD Testing Driver");
+MODULE_LICENSE ("GPL");
+
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
new file mode 100644
index 000000000000..faa74436de52
--- /dev/null
+++ b/drivers/usb/misc/uss720.c
@@ -0,0 +1,674 @@
+/*****************************************************************************/
+
+/*
+ * uss720.c -- USS720 USB Parport Cable.
+ *
+ * Copyright (C) 1999
+ * Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *
+ * 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.
+ *
+ * Based on parport_pc.c
+ *
+ * History:
+ * 0.1 04.08.99 Created
+ * 0.2 07.08.99 Some fixes mainly suggested by Tim Waugh
+ * Interrupt handling currently disabled because
+ * usb_request_irq crashes somewhere within ohci.c
+ * for no apparent reason (that is for me, anyway)
+ * ECP currently untested
+ * 0.3 10.08.99 fixing merge errors
+ * 0.4 13.08.99 Added Vendor/Product ID of Brad Hard's cable
+ * 0.5 20.09.99 usb_control_msg wrapper used
+ * Nov01.00 usb_device_table support by Adam J. Richter
+ * 08.04.01 Identify version on module load. gb
+ *
+ */
+
+/*****************************************************************************/
+
+#include <linux/module.h>
+#include <linux/socket.h>
+#include <linux/parport.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+#include <linux/delay.h>
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.5"
+#define DRIVER_AUTHOR "Thomas M. Sailer, sailer@ife.ee.ethz.ch"
+#define DRIVER_DESC "USB Parport Cable driver for Cables using the Lucent Technologies USS720 Chip"
+
+/* --------------------------------------------------------------------- */
+
+struct parport_uss720_private {
+ struct usb_device *usbdev;
+ void *irqhandle;
+ unsigned int irqpipe;
+ unsigned char reg[7]; /* USB registers */
+};
+
+/* --------------------------------------------------------------------- */
+
+static int get_1284_register(struct parport *pp, unsigned char reg, unsigned char *val)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ struct usb_device *usbdev = priv->usbdev;
+ static const unsigned char regindex[9] = {
+ 4, 0, 1, 5, 5, 0, 2, 3, 6
+ };
+ int ret;
+
+ if (!usbdev)
+ return -1;
+ ret = usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev,0), 3, 0xc0, ((unsigned int)reg) << 8, 0, priv->reg, 7, 1000);
+ if (ret != 7) {
+ printk(KERN_DEBUG "uss720: get_1284_register(%d) failed, status 0x%x expected 7\n",
+ (unsigned int)reg, ret);
+ ret = -1;
+ } else {
+#if 0
+ printk(KERN_DEBUG "uss720: get_1284_register(%d) return %02x %02x %02x %02x %02x %02x %02x\n",
+ (unsigned int)reg, (unsigned int)priv->reg[0], (unsigned int)priv->reg[1],
+ (unsigned int)priv->reg[2], (unsigned int)priv->reg[3], (unsigned int)priv->reg[4],
+ (unsigned int)priv->reg[5], (unsigned int)priv->reg[6]);
+#endif
+ /* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */
+ if (priv->reg[2] & priv->reg[1] & 0x10)
+ parport_generic_irq(0, pp, NULL);
+ ret = 0;
+ }
+ if (val)
+ *val = priv->reg[(reg >= 9) ? 0 : regindex[reg]];
+ return ret;
+}
+
+static int set_1284_register(struct parport *pp, unsigned char reg, unsigned char val)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ struct usb_device *usbdev = priv->usbdev;
+ int ret;
+
+ if (!usbdev)
+ return -1;
+ ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev,0), 4, 0x40, (((unsigned int)reg) << 8) | val, 0, NULL, 0, 1000);
+ if (ret) {
+ printk(KERN_DEBUG "uss720: set_1284_register(%u,0x%02x) failed, status 0x%x\n",
+ (unsigned int)reg, (unsigned int)val, ret);
+ } else {
+#if 0
+ printk(KERN_DEBUG "uss720: set_1284_register(%u,0x%02x)\n",
+ (unsigned int)reg, (unsigned int)val);
+#endif
+ }
+ return ret;
+}
+
+/* --------------------------------------------------------------------- */
+
+/* ECR modes */
+#define ECR_SPP 00
+#define ECR_PS2 01
+#define ECR_PPF 02
+#define ECR_ECP 03
+#define ECR_EPP 04
+
+/* Safely change the mode bits in the ECR */
+static int change_mode(struct parport *pp, int m)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ int mode;
+
+ if (get_1284_register(pp, 6, NULL))
+ return -EIO;
+ /* Bits <7:5> contain the mode. */
+ mode = (priv->reg[2] >> 5) & 0x7;
+ if (mode == m)
+ return 0;
+ /* We have to go through mode 000 or 001 */
+ if (mode > ECR_PS2 && m > ECR_PS2)
+ if (change_mode(pp, ECR_PS2))
+ return -EIO;
+
+ if (m <= ECR_PS2 && !(priv->reg[1] & 0x20)) {
+ /* This mode resets the FIFO, so we may
+ * have to wait for it to drain first. */
+ unsigned long expire = jiffies + pp->physport->cad->timeout;
+ switch (mode) {
+ case ECR_PPF: /* Parallel Port FIFO mode */
+ case ECR_ECP: /* ECP Parallel Port mode */
+ /* Poll slowly. */
+ for (;;) {
+ if (get_1284_register(pp, 6, NULL))
+ return -EIO;
+ if (priv->reg[2] & 0x01)
+ break;
+ if (time_after_eq (jiffies, expire))
+ /* The FIFO is stuck. */
+ return -EBUSY;
+ msleep_interruptible(10);
+ if (signal_pending (current))
+ break;
+ }
+ }
+ }
+ /* Set the mode. */
+ if (set_1284_register(pp, 6, m << 5))
+ return -EIO;
+ return 0;
+}
+
+/*
+ * Clear TIMEOUT BIT in EPP MODE
+ */
+static int clear_epp_timeout(struct parport *pp)
+{
+ unsigned char stat;
+
+ if (get_1284_register(pp, 1, &stat))
+ return 1;
+ return stat & 1;
+}
+
+/*
+ * Access functions.
+ */
+#if 0
+static int uss720_irq(int usbstatus, void *buffer, int len, void *dev_id)
+{
+ struct parport *pp = (struct parport *)dev_id;
+ struct parport_uss720_private *priv = pp->private_data;
+
+ if (usbstatus != 0 || len < 4 || !buffer)
+ return 1;
+ memcpy(priv->reg, buffer, 4);
+ /* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */
+ if (priv->reg[2] & priv->reg[1] & 0x10)
+ parport_generic_irq(0, pp, NULL);
+ return 1;
+}
+#endif
+
+static void parport_uss720_write_data(struct parport *pp, unsigned char d)
+{
+ set_1284_register(pp, 0, d);
+}
+
+static unsigned char parport_uss720_read_data(struct parport *pp)
+{
+ unsigned char ret;
+
+ if (get_1284_register(pp, 0, &ret))
+ return 0;
+ return ret;
+}
+
+static void parport_uss720_write_control(struct parport *pp, unsigned char d)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+
+ d = (d & 0xf) | (priv->reg[1] & 0xf0);
+ if (set_1284_register(pp, 2, d))
+ return;
+ priv->reg[1] = d;
+}
+
+static unsigned char parport_uss720_read_control(struct parport *pp)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ return priv->reg[1] & 0xf; /* Use soft copy */
+}
+
+static unsigned char parport_uss720_frob_control(struct parport *pp, unsigned char mask, unsigned char val)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ unsigned char d;
+
+ mask &= 0x0f;
+ val &= 0x0f;
+ d = (priv->reg[1] & (~mask)) ^ val;
+ if (set_1284_register(pp, 2, d))
+ return 0;
+ priv->reg[1] = d;
+ return d & 0xf;
+}
+
+static unsigned char parport_uss720_read_status(struct parport *pp)
+{
+ unsigned char ret;
+
+ if (get_1284_register(pp, 1, &ret))
+ return 0;
+ return ret & 0xf8;
+}
+
+static void parport_uss720_disable_irq(struct parport *pp)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ unsigned char d;
+
+ d = priv->reg[1] & ~0x10;
+ if (set_1284_register(pp, 2, d))
+ return;
+ priv->reg[1] = d;
+}
+
+static void parport_uss720_enable_irq(struct parport *pp)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ unsigned char d;
+
+ d = priv->reg[1] | 0x10;
+ if (set_1284_register(pp, 2, d))
+ return;
+ priv->reg[1] = d;
+}
+
+static void parport_uss720_data_forward (struct parport *pp)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ unsigned char d;
+
+ d = priv->reg[1] & ~0x20;
+ if (set_1284_register(pp, 2, d))
+ return;
+ priv->reg[1] = d;
+}
+
+static void parport_uss720_data_reverse (struct parport *pp)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ unsigned char d;
+
+ d = priv->reg[1] | 0x20;
+ if (set_1284_register(pp, 2, d))
+ return;
+ priv->reg[1] = d;
+}
+
+static void parport_uss720_init_state(struct pardevice *dev, struct parport_state *s)
+{
+ s->u.pc.ctr = 0xc | (dev->irq_func ? 0x10 : 0x0);
+ s->u.pc.ecr = 0x24;
+}
+
+static void parport_uss720_save_state(struct parport *pp, struct parport_state *s)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+
+ if (get_1284_register(pp, 2, NULL))
+ return;
+ s->u.pc.ctr = priv->reg[1];
+ s->u.pc.ecr = priv->reg[2];
+}
+
+static void parport_uss720_restore_state(struct parport *pp, struct parport_state *s)
+{
+ set_1284_register(pp, 2, s->u.pc.ctr);
+ set_1284_register(pp, 6, s->u.pc.ecr);
+ get_1284_register(pp, 2, NULL);
+}
+
+static size_t parport_uss720_epp_read_data(struct parport *pp, void *buf, size_t length, int flags)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ size_t got = 0;
+
+ if (change_mode(pp, ECR_EPP))
+ return 0;
+ for (; got < length; got++) {
+ if (get_1284_register(pp, 4, (char *)buf))
+ break;
+ buf++;
+ if (priv->reg[0] & 0x01) {
+ clear_epp_timeout(pp);
+ break;
+ }
+ }
+ change_mode(pp, ECR_PS2);
+ return got;
+}
+
+static size_t parport_uss720_epp_write_data(struct parport *pp, const void *buf, size_t length, int flags)
+{
+#if 0
+ struct parport_uss720_private *priv = pp->private_data;
+ size_t written = 0;
+
+ if (change_mode(pp, ECR_EPP))
+ return 0;
+ for (; written < length; written++) {
+ if (set_1284_register(pp, 4, (char *)buf))
+ break;
+ ((char*)buf)++;
+ if (get_1284_register(pp, 1, NULL))
+ break;
+ if (priv->reg[0] & 0x01) {
+ clear_epp_timeout(pp);
+ break;
+ }
+ }
+ change_mode(pp, ECR_PS2);
+ return written;
+#else
+ struct parport_uss720_private *priv = pp->private_data;
+ struct usb_device *usbdev = priv->usbdev;
+ int rlen;
+ int i;
+
+ if (!usbdev)
+ return 0;
+ if (change_mode(pp, ECR_EPP))
+ return 0;
+ i = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 1), (void *)buf, length, &rlen, 20000);
+ if (i)
+ printk(KERN_ERR "uss720: sendbulk ep 1 buf %p len %Zu rlen %u\n", buf, length, rlen);
+ change_mode(pp, ECR_PS2);
+ return rlen;
+#endif
+}
+
+static size_t parport_uss720_epp_read_addr(struct parport *pp, void *buf, size_t length, int flags)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ size_t got = 0;
+
+ if (change_mode(pp, ECR_EPP))
+ return 0;
+ for (; got < length; got++) {
+ if (get_1284_register(pp, 3, (char *)buf))
+ break;
+ buf++;
+ if (priv->reg[0] & 0x01) {
+ clear_epp_timeout(pp);
+ break;
+ }
+ }
+ change_mode(pp, ECR_PS2);
+ return got;
+}
+
+static size_t parport_uss720_epp_write_addr(struct parport *pp, const void *buf, size_t length, int flags)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ size_t written = 0;
+
+ if (change_mode(pp, ECR_EPP))
+ return 0;
+ for (; written < length; written++) {
+ if (set_1284_register(pp, 3, *(char *)buf))
+ break;
+ buf++;
+ if (get_1284_register(pp, 1, NULL))
+ break;
+ if (priv->reg[0] & 0x01) {
+ clear_epp_timeout(pp);
+ break;
+ }
+ }
+ change_mode(pp, ECR_PS2);
+ return written;
+}
+
+static size_t parport_uss720_ecp_write_data(struct parport *pp, const void *buffer, size_t len, int flags)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ struct usb_device *usbdev = priv->usbdev;
+ int rlen;
+ int i;
+
+ if (!usbdev)
+ return 0;
+ if (change_mode(pp, ECR_ECP))
+ return 0;
+ i = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 1), (void *)buffer, len, &rlen, 20000);
+ if (i)
+ printk(KERN_ERR "uss720: sendbulk ep 1 buf %p len %Zu rlen %u\n", buffer, len, rlen);
+ change_mode(pp, ECR_PS2);
+ return rlen;
+}
+
+static size_t parport_uss720_ecp_read_data(struct parport *pp, void *buffer, size_t len, int flags)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ struct usb_device *usbdev = priv->usbdev;
+ int rlen;
+ int i;
+
+ if (!usbdev)
+ return 0;
+ if (change_mode(pp, ECR_ECP))
+ return 0;
+ i = usb_bulk_msg(usbdev, usb_rcvbulkpipe(usbdev, 2), buffer, len, &rlen, 20000);
+ if (i)
+ printk(KERN_ERR "uss720: recvbulk ep 2 buf %p len %Zu rlen %u\n", buffer, len, rlen);
+ change_mode(pp, ECR_PS2);
+ return rlen;
+}
+
+static size_t parport_uss720_ecp_write_addr(struct parport *pp, const void *buffer, size_t len, int flags)
+{
+ size_t written = 0;
+
+ if (change_mode(pp, ECR_ECP))
+ return 0;
+ for (; written < len; written++) {
+ if (set_1284_register(pp, 5, *(char *)buffer))
+ break;
+ buffer++;
+ }
+ change_mode(pp, ECR_PS2);
+ return written;
+}
+
+static size_t parport_uss720_write_compat(struct parport *pp, const void *buffer, size_t len, int flags)
+{
+ struct parport_uss720_private *priv = pp->private_data;
+ struct usb_device *usbdev = priv->usbdev;
+ int rlen;
+ int i;
+
+ if (!usbdev)
+ return 0;
+ if (change_mode(pp, ECR_PPF))
+ return 0;
+ i = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 1), (void *)buffer, len, &rlen, 20000);
+ if (i)
+ printk(KERN_ERR "uss720: sendbulk ep 1 buf %p len %Zu rlen %u\n", buffer, len, rlen);
+ change_mode(pp, ECR_PS2);
+ return rlen;
+}
+
+/* --------------------------------------------------------------------- */
+
+static struct parport_operations parport_uss720_ops =
+{
+ .owner = THIS_MODULE,
+ .write_data = parport_uss720_write_data,
+ .read_data = parport_uss720_read_data,
+
+ .write_control = parport_uss720_write_control,
+ .read_control = parport_uss720_read_control,
+ .frob_control = parport_uss720_frob_control,
+
+ .read_status = parport_uss720_read_status,
+
+ .enable_irq = parport_uss720_enable_irq,
+ .disable_irq = parport_uss720_disable_irq,
+
+ .data_forward = parport_uss720_data_forward,
+ .data_reverse = parport_uss720_data_reverse,
+
+ .init_state = parport_uss720_init_state,
+ .save_state = parport_uss720_save_state,
+ .restore_state = parport_uss720_restore_state,
+
+ .epp_write_data = parport_uss720_epp_write_data,
+ .epp_read_data = parport_uss720_epp_read_data,
+ .epp_write_addr = parport_uss720_epp_write_addr,
+ .epp_read_addr = parport_uss720_epp_read_addr,
+
+ .ecp_write_data = parport_uss720_ecp_write_data,
+ .ecp_read_data = parport_uss720_ecp_read_data,
+ .ecp_write_addr = parport_uss720_ecp_write_addr,
+
+ .compat_write_data = parport_uss720_write_compat,
+ .nibble_read_data = parport_ieee1284_read_nibble,
+ .byte_read_data = parport_ieee1284_read_byte,
+};
+
+/* --------------------------------------------------------------------- */
+
+static int uss720_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *usbdev = interface_to_usbdev(intf);
+ struct usb_host_interface *interface;
+ struct usb_host_endpoint *endpoint;
+ struct parport_uss720_private *priv;
+ struct parport *pp;
+ int i;
+
+ printk(KERN_DEBUG "uss720: probe: vendor id 0x%x, device id 0x%x\n",
+ le16_to_cpu(usbdev->descriptor.idVendor),
+ le16_to_cpu(usbdev->descriptor.idProduct));
+
+ /* our known interfaces have 3 alternate settings */
+ if (intf->num_altsetting != 3)
+ return -ENODEV;
+
+ i = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2);
+ printk(KERN_DEBUG "uss720: set inteface result %d\n", i);
+
+ interface = intf->cur_altsetting;
+
+ /*
+ * Allocate parport interface
+ */
+ printk(KERN_INFO "uss720: (C) 1999 by Thomas Sailer, <sailer@ife.ee.ethz.ch>\n");
+
+ if (!(priv = kmalloc(sizeof(struct parport_uss720_private), GFP_KERNEL)))
+ return -ENOMEM;
+ if (!(pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops))) {
+ printk(KERN_WARNING "usb-uss720: could not register parport\n");
+ goto probe_abort;
+ }
+
+ pp->private_data = priv;
+ priv->usbdev = usbdev;
+ pp->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP | PARPORT_MODE_ECP | PARPORT_MODE_COMPAT;
+
+ /* set the USS720 control register to manual mode, no ECP compression, enable all ints */
+ set_1284_register(pp, 7, 0x00);
+ set_1284_register(pp, 6, 0x30); /* PS/2 mode */
+ set_1284_register(pp, 2, 0x0c);
+ /* debugging */
+ get_1284_register(pp, 0, NULL);
+ printk("uss720: reg: %02x %02x %02x %02x %02x %02x %02x\n",
+ priv->reg[0], priv->reg[1], priv->reg[2], priv->reg[3], priv->reg[4], priv->reg[5], priv->reg[6]);
+
+ endpoint = &interface->endpoint[2];
+ printk(KERN_DEBUG "uss720: epaddr %d interval %d\n", endpoint->desc.bEndpointAddress, endpoint->desc.bInterval);
+#if 0
+ priv->irqpipe = usb_rcvctrlpipe(usbdev, endpoint->bEndpointAddress);
+ i = usb_request_irq(usbdev, priv->irqpipe,
+ uss720_irq, endpoint->bInterval,
+ pp, &priv->irqhandle);
+ if (i) {
+ printk (KERN_WARNING "usb-uss720: usb_request_irq failed (0x%x)\n", i);
+ goto probe_abort_port;
+ }
+#endif
+ parport_announce_port(pp);
+
+ usb_set_intfdata (intf, pp);
+ return 0;
+
+#if 0
+probe_abort_port:
+ parport_put_port(pp);
+#endif
+probe_abort:
+ kfree(priv);
+ return -ENODEV;
+}
+
+static void uss720_disconnect(struct usb_interface *intf)
+{
+ struct parport *pp = usb_get_intfdata (intf);
+ struct parport_uss720_private *priv;
+
+ usb_set_intfdata (intf, NULL);
+ if (pp) {
+ priv = pp->private_data;
+ parport_remove_port(pp);
+#if 0
+ usb_release_irq(usbdev, priv->irqhandle, priv->irqpipe);
+#endif
+ priv->usbdev = NULL;
+ parport_put_port(pp);
+ kfree(priv);
+ }
+}
+
+/* table of cables that work through this driver */
+static struct usb_device_id uss720_table [] = {
+ { USB_DEVICE(0x047e, 0x1001) },
+ { USB_DEVICE(0x0557, 0x2001) },
+ { USB_DEVICE(0x0729, 0x1284) },
+ { USB_DEVICE(0x1293, 0x0002) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, uss720_table);
+
+
+static struct usb_driver uss720_driver = {
+ .owner = THIS_MODULE,
+ .name = "uss720",
+ .probe = uss720_probe,
+ .disconnect = uss720_disconnect,
+ .id_table = uss720_table,
+};
+
+/* --------------------------------------------------------------------- */
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+static int __init uss720_init(void)
+{
+ int retval;
+ retval = usb_register(&uss720_driver);
+ if (retval)
+ goto out;
+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+out:
+ return retval;
+}
+
+static void __exit uss720_cleanup(void)
+{
+ usb_deregister(&uss720_driver);
+}
+
+module_init(uss720_init);
+module_exit(uss720_cleanup);
+
+/* --------------------------------------------------------------------- */
diff --git a/drivers/usb/mon/Kconfig b/drivers/usb/mon/Kconfig
new file mode 100644
index 000000000000..4e6152aa5f19
--- /dev/null
+++ b/drivers/usb/mon/Kconfig
@@ -0,0 +1,22 @@
+#
+# USB Monitor configuration
+#
+
+# In normal life, it makes little sense to have usbmon as a module, and in fact
+# it is harmful, because there is no way to autoload the module.
+# The 'm' option is allowed for hackers who debug the usbmon itself,
+# and for those who have usbcore as a module.
+config USB_MON
+ tristate "USB Monitor"
+ depends on USB
+ default y
+ help
+ If you say Y here, a component which captures the USB traffic
+ between peripheral-specific drivers and HC drivers will be built.
+ The USB_MON is similar in spirit and may be compatible with Dave
+ Harding's USBMon.
+
+ This is somewhat experimental at this time, but it should be safe,
+ as long as you aren't building this as a module and then removing it.
+
+ If unsure, say Y. Do not say M.
diff --git a/drivers/usb/mon/Makefile b/drivers/usb/mon/Makefile
new file mode 100644
index 000000000000..3cff8d444bb1
--- /dev/null
+++ b/drivers/usb/mon/Makefile
@@ -0,0 +1,7 @@
+#
+# Makefile for USB Core files and filesystem
+#
+
+usbmon-objs := mon_main.o mon_stat.o mon_text.o
+
+obj-$(CONFIG_USB_MON) += usbmon.o
diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c
new file mode 100644
index 000000000000..aa9d00808e4e
--- /dev/null
+++ b/drivers/usb/mon/mon_main.c
@@ -0,0 +1,377 @@
+/*
+ * The USB Monitor, inspired by Dave Harding's USBMon.
+ *
+ * mon_main.c: Main file, module initiation and exit, registrations, etc.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include <linux/debugfs.h>
+#include <linux/smp_lock.h>
+
+#include "usb_mon.h"
+#include "../core/hcd.h"
+
+static void mon_submit(struct usb_bus *ubus, struct urb *urb);
+static void mon_complete(struct usb_bus *ubus, struct urb *urb);
+static void mon_stop(struct mon_bus *mbus);
+static void mon_dissolve(struct mon_bus *mbus, struct usb_bus *ubus);
+static void mon_bus_drop(struct kref *r);
+static void mon_bus_init(struct dentry *mondir, struct usb_bus *ubus);
+
+DECLARE_MUTEX(mon_lock);
+
+static struct dentry *mon_dir; /* /dbg/usbmon */
+static LIST_HEAD(mon_buses); /* All buses we know: struct mon_bus */
+
+/*
+ * Link a reader into the bus.
+ *
+ * This must be called with mon_lock taken because of mbus->ref.
+ */
+void mon_reader_add(struct mon_bus *mbus, struct mon_reader *r)
+{
+ unsigned long flags;
+ struct usb_bus *ubus;
+
+ spin_lock_irqsave(&mbus->lock, flags);
+ if (mbus->nreaders == 0) {
+ ubus = mbus->u_bus;
+ if (ubus->monitored) {
+ /*
+ * Something is really broken, refuse to go on and
+ * possibly corrupt ops pointers or worse.
+ */
+ printk(KERN_ERR TAG ": bus %d is already monitored\n",
+ ubus->busnum);
+ spin_unlock_irqrestore(&mbus->lock, flags);
+ return;
+ }
+ ubus->monitored = 1;
+ }
+ mbus->nreaders++;
+ list_add_tail(&r->r_link, &mbus->r_list);
+ spin_unlock_irqrestore(&mbus->lock, flags);
+
+ kref_get(&mbus->ref);
+}
+
+/*
+ * Unlink reader from the bus.
+ *
+ * This is called with mon_lock taken, so we can decrement mbus->ref.
+ */
+void mon_reader_del(struct mon_bus *mbus, struct mon_reader *r)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&mbus->lock, flags);
+ list_del(&r->r_link);
+ --mbus->nreaders;
+ if (mbus->nreaders == 0)
+ mon_stop(mbus);
+ spin_unlock_irqrestore(&mbus->lock, flags);
+
+ kref_put(&mbus->ref, mon_bus_drop);
+}
+
+/*
+ */
+static void mon_submit(struct usb_bus *ubus, struct urb *urb)
+{
+ struct mon_bus *mbus;
+ unsigned long flags;
+ struct list_head *pos;
+ struct mon_reader *r;
+
+ mbus = ubus->mon_bus;
+ if (mbus == NULL)
+ goto out_unlocked;
+
+ spin_lock_irqsave(&mbus->lock, flags);
+ if (mbus->nreaders == 0)
+ goto out_locked;
+
+ list_for_each (pos, &mbus->r_list) {
+ r = list_entry(pos, struct mon_reader, r_link);
+ r->rnf_submit(r->r_data, urb);
+ }
+
+ spin_unlock_irqrestore(&mbus->lock, flags);
+ return;
+
+out_locked:
+ spin_unlock_irqrestore(&mbus->lock, flags);
+out_unlocked:
+ return;
+}
+
+/*
+ */
+static void mon_submit_error(struct usb_bus *ubus, struct urb *urb, int err)
+{
+ struct mon_bus *mbus;
+
+ mbus = ubus->mon_bus;
+ if (mbus == NULL)
+ goto out_unlocked;
+
+ /*
+ * XXX Capture the error code and the 'E' event.
+ */
+
+ return;
+
+out_unlocked:
+ return;
+}
+
+/*
+ */
+static void mon_complete(struct usb_bus *ubus, struct urb *urb)
+{
+ struct mon_bus *mbus;
+ unsigned long flags;
+ struct list_head *pos;
+ struct mon_reader *r;
+
+ mbus = ubus->mon_bus;
+ if (mbus == NULL) {
+ /*
+ * This should not happen.
+ * At this point we do not even know the bus number...
+ */
+ printk(KERN_ERR TAG ": Null mon bus in URB, pipe 0x%x\n",
+ urb->pipe);
+ return;
+ }
+
+ spin_lock_irqsave(&mbus->lock, flags);
+ list_for_each (pos, &mbus->r_list) {
+ r = list_entry(pos, struct mon_reader, r_link);
+ r->rnf_complete(r->r_data, urb);
+ }
+ spin_unlock_irqrestore(&mbus->lock, flags);
+}
+
+/* int (*unlink_urb) (struct urb *urb, int status); */
+
+/*
+ * Stop monitoring.
+ * Obviously this must be well locked, so no need to play with mb's.
+ */
+static void mon_stop(struct mon_bus *mbus)
+{
+ struct usb_bus *ubus = mbus->u_bus;
+
+ /*
+ * A stop can be called for a dissolved mon_bus in case of
+ * a reader staying across an rmmod foo_hcd.
+ */
+ if (ubus != NULL) {
+ ubus->monitored = 0;
+ mb();
+ }
+}
+
+/*
+ * Add a USB bus (usually by a modprobe foo-hcd)
+ *
+ * This does not return an error code because the core cannot care less
+ * if monitoring is not established.
+ */
+static void mon_bus_add(struct usb_bus *ubus)
+{
+ mon_bus_init(mon_dir, ubus);
+}
+
+/*
+ * Remove a USB bus (either from rmmod foo-hcd or from a hot-remove event).
+ */
+static void mon_bus_remove(struct usb_bus *ubus)
+{
+ struct mon_bus *mbus = ubus->mon_bus;
+
+ down(&mon_lock);
+ list_del(&mbus->bus_link);
+ debugfs_remove(mbus->dent_t);
+ debugfs_remove(mbus->dent_s);
+
+ mon_dissolve(mbus, ubus);
+ kref_put(&mbus->ref, mon_bus_drop);
+ up(&mon_lock);
+}
+
+/*
+ * Ops
+ */
+static struct usb_mon_operations mon_ops_0 = {
+ .urb_submit = mon_submit,
+ .urb_submit_error = mon_submit_error,
+ .urb_complete = mon_complete,
+ .bus_add = mon_bus_add,
+ .bus_remove = mon_bus_remove,
+};
+
+/*
+ * Tear usb_bus and mon_bus apart.
+ */
+static void mon_dissolve(struct mon_bus *mbus, struct usb_bus *ubus)
+{
+
+ /*
+ * Never happens, but...
+ */
+ if (ubus->monitored) {
+ printk(KERN_ERR TAG ": bus %d is dissolved while monitored\n",
+ ubus->busnum);
+ ubus->monitored = 0;
+ mb();
+ }
+
+ ubus->mon_bus = NULL;
+ mbus->u_bus = NULL;
+ mb();
+ // usb_bus_put(ubus);
+}
+
+/*
+ */
+static void mon_bus_drop(struct kref *r)
+{
+ struct mon_bus *mbus = container_of(r, struct mon_bus, ref);
+ kfree(mbus);
+}
+
+/*
+ * Initialize a bus for us:
+ * - allocate mon_bus
+ * - refcount USB bus struct
+ * - link
+ */
+static void mon_bus_init(struct dentry *mondir, struct usb_bus *ubus)
+{
+ struct dentry *d;
+ struct mon_bus *mbus;
+ enum { NAMESZ = 10 };
+ char name[NAMESZ];
+ int rc;
+
+ if ((mbus = kmalloc(sizeof(struct mon_bus), GFP_KERNEL)) == NULL)
+ goto err_alloc;
+ memset(mbus, 0, sizeof(struct mon_bus));
+ kref_init(&mbus->ref);
+ spin_lock_init(&mbus->lock);
+ INIT_LIST_HEAD(&mbus->r_list);
+
+ /*
+ * This usb_bus_get here is superfluous, because we receive
+ * a notification if usb_bus is about to be removed.
+ */
+ // usb_bus_get(ubus);
+ mbus->u_bus = ubus;
+ ubus->mon_bus = mbus;
+
+ rc = snprintf(name, NAMESZ, "%dt", ubus->busnum);
+ if (rc <= 0 || rc >= NAMESZ)
+ goto err_print_t;
+ d = debugfs_create_file(name, 0600, mondir, mbus, &mon_fops_text);
+ if (d == NULL)
+ goto err_create_t;
+ mbus->dent_t = d;
+
+ rc = snprintf(name, NAMESZ, "%ds", ubus->busnum);
+ if (rc <= 0 || rc >= NAMESZ)
+ goto err_print_s;
+ d = debugfs_create_file(name, 0600, mondir, mbus, &mon_fops_stat);
+ if (d == NULL)
+ goto err_create_s;
+ mbus->dent_s = d;
+
+ down(&mon_lock);
+ list_add_tail(&mbus->bus_link, &mon_buses);
+ up(&mon_lock);
+ return;
+
+err_create_s:
+err_print_s:
+ debugfs_remove(mbus->dent_t);
+err_create_t:
+err_print_t:
+ kfree(mbus);
+err_alloc:
+ return;
+}
+
+static int __init mon_init(void)
+{
+ struct usb_bus *ubus;
+ struct dentry *mondir;
+
+ mondir = debugfs_create_dir("usbmon", NULL);
+ if (IS_ERR(mondir)) {
+ printk(KERN_NOTICE TAG ": debugs is not available\n");
+ return -ENODEV;
+ }
+ if (mondir == NULL) {
+ printk(KERN_NOTICE TAG ": unable to create usbmon directory\n");
+ return -ENODEV;
+ }
+ mon_dir = mondir;
+
+ if (usb_mon_register(&mon_ops_0) != 0) {
+ printk(KERN_NOTICE TAG ": unable to register with the core\n");
+ debugfs_remove(mondir);
+ return -ENODEV;
+ }
+ // MOD_INC_USE_COUNT(which_module?);
+
+ down(&usb_bus_list_lock);
+ list_for_each_entry (ubus, &usb_bus_list, bus_list) {
+ mon_bus_init(mondir, ubus);
+ }
+ up(&usb_bus_list_lock);
+ return 0;
+}
+
+static void __exit mon_exit(void)
+{
+ struct mon_bus *mbus;
+ struct list_head *p;
+
+ usb_mon_deregister();
+
+ down(&mon_lock);
+ while (!list_empty(&mon_buses)) {
+ p = mon_buses.next;
+ mbus = list_entry(p, struct mon_bus, bus_link);
+ list_del(p);
+
+ debugfs_remove(mbus->dent_t);
+ debugfs_remove(mbus->dent_s);
+
+ /*
+ * This never happens, because the open/close paths in
+ * file level maintain module use counters and so rmmod fails
+ * before reaching here. However, better be safe...
+ */
+ if (mbus->nreaders) {
+ printk(KERN_ERR TAG
+ ": Outstanding opens (%d) on usb%d, leaking...\n",
+ mbus->nreaders, mbus->u_bus->busnum);
+ atomic_set(&mbus->ref.refcount, 2); /* Force leak */
+ }
+
+ mon_dissolve(mbus, mbus->u_bus);
+ kref_put(&mbus->ref, mon_bus_drop);
+ }
+ up(&mon_lock);
+
+ debugfs_remove(mon_dir);
+}
+
+module_init(mon_init);
+module_exit(mon_exit);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c
new file mode 100644
index 000000000000..6e4b165d070a
--- /dev/null
+++ b/drivers/usb/mon/mon_stat.c
@@ -0,0 +1,74 @@
+/*
+ * The USB Monitor, inspired by Dave Harding's USBMon.
+ *
+ * This is the 's' or 'stat' reader which debugs usbmon itself.
+ * Note that this code blows through locks, so make sure that
+ * /dbg/usbmon/0s is well protected from non-root users.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/usb.h>
+#include <asm/uaccess.h>
+
+#include "usb_mon.h"
+
+#define STAT_BUF_SIZE 80
+
+struct snap {
+ int slen;
+ char str[STAT_BUF_SIZE];
+};
+
+static int mon_stat_open(struct inode *inode, struct file *file)
+{
+ struct mon_bus *mbus;
+ struct snap *sp;
+
+ if ((sp = kmalloc(sizeof(struct snap), GFP_KERNEL)) == NULL)
+ return -ENOMEM;
+
+ mbus = inode->u.generic_ip;
+
+ sp->slen = snprintf(sp->str, STAT_BUF_SIZE,
+ "nreaders %d text_lost %u\n",
+ mbus->nreaders, mbus->cnt_text_lost);
+
+ file->private_data = sp;
+ return 0;
+}
+
+static ssize_t mon_stat_read(struct file *file, char __user *buf,
+ size_t nbytes, loff_t *ppos)
+{
+ struct snap *sp = file->private_data;
+ loff_t pos = *ppos;
+ int cnt;
+
+ if (pos < 0 || pos >= sp->slen)
+ return 0;
+ if (nbytes == 0)
+ return 0;
+ if ((cnt = sp->slen - pos) > nbytes)
+ cnt = nbytes;
+ if (copy_to_user(buf, sp->str + pos, cnt))
+ return -EFAULT;
+ *ppos = pos + cnt;
+ return cnt;
+}
+
+static int mon_stat_release(struct inode *inode, struct file *file)
+{
+ return 0;
+}
+
+struct file_operations mon_fops_stat = {
+ .owner = THIS_MODULE,
+ .open = mon_stat_open,
+ .llseek = no_llseek,
+ .read = mon_stat_read,
+ /* .write = mon_stat_write, */
+ /* .poll = mon_stat_poll, */
+ /* .ioctl = mon_stat_ioctl, */
+ .release = mon_stat_release,
+};
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c
new file mode 100644
index 000000000000..755a4570477f
--- /dev/null
+++ b/drivers/usb/mon/mon_text.c
@@ -0,0 +1,405 @@
+/*
+ * The USB Monitor, inspired by Dave Harding's USBMon.
+ *
+ * This is a text format reader.
+ */
+
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/usb.h>
+#include <linux/time.h>
+#include <asm/uaccess.h>
+
+#include "usb_mon.h"
+
+/*
+ * No, we do not want arbitrarily long data strings.
+ * Use the binary interface if you want to capture bulk data!
+ */
+#define DATA_MAX 32
+
+/*
+ * This limit exists to prevent OOMs when the user process stops reading.
+ */
+#define EVENT_MAX 25
+
+#define PRINTF_DFL 120
+
+struct mon_event_text {
+ struct list_head e_link;
+ int type; /* submit, complete, etc. */
+ unsigned int pipe; /* Pipe */
+ unsigned long id; /* From pointer, most of the time */
+ unsigned int tstamp;
+ int length; /* Depends on type: xfer length or act length */
+ int status;
+ char data_flag;
+ unsigned char data[DATA_MAX];
+};
+
+#define SLAB_NAME_SZ 30
+struct mon_reader_text {
+ kmem_cache_t *e_slab;
+ int nevents;
+ struct list_head e_list;
+ struct mon_reader r; /* In C, parent class can be placed anywhere */
+
+ wait_queue_head_t wait;
+ int printf_size;
+ char *printf_buf;
+ struct semaphore printf_lock;
+
+ char slab_name[SLAB_NAME_SZ];
+};
+
+static void mon_text_ctor(void *, kmem_cache_t *, unsigned long);
+static void mon_text_dtor(void *, kmem_cache_t *, unsigned long);
+
+/*
+ * mon_text_submit
+ * mon_text_complete
+ *
+ * May be called from an interrupt.
+ *
+ * This is called with the whole mon_bus locked, so no additional lock.
+ */
+
+static inline char mon_text_get_data(struct mon_event_text *ep, struct urb *urb,
+ int len, char ev_type)
+{
+ int pipe = urb->pipe;
+ unsigned char *data;
+
+ /*
+ * The check to see if it's safe to poke at data has an enormous
+ * number of corner cases, but it seems that the following is
+ * more or less safe.
+ *
+ * We do not even try to look transfer_buffer, because it can
+ * contain non-NULL garbage in case the upper level promised to
+ * set DMA for the HCD.
+ */
+ if (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)
+ return 'D';
+
+ if (len <= 0)
+ return 'L';
+
+ if ((data = urb->transfer_buffer) == NULL)
+ return 'Z'; /* '0' would be not as pretty. */
+
+ /*
+ * Bulk is easy to shortcut reliably.
+ * XXX Control needs setup packet taken.
+ * XXX Other pipe types need consideration. Currently, we overdo it
+ * and collect garbage for them: better more than less.
+ */
+ if (usb_pipebulk(pipe) || usb_pipecontrol(pipe)) {
+ if (usb_pipein(pipe)) {
+ if (ev_type == 'S')
+ return '<';
+ } else {
+ if (ev_type == 'C')
+ return '>';
+ }
+ }
+
+ if (len >= DATA_MAX)
+ len = DATA_MAX;
+ memcpy(ep->data, urb->transfer_buffer, len);
+ return 0;
+}
+
+static inline unsigned int mon_get_timestamp(void)
+{
+ struct timeval tval;
+ unsigned int stamp;
+
+ do_gettimeofday(&tval);
+ stamp = tval.tv_sec & 0xFFFF; /* 2^32 = 4294967296. Limit to 4096s. */
+ stamp = stamp * 1000000 + tval.tv_usec;
+ return stamp;
+}
+
+static void mon_text_event(struct mon_reader_text *rp, struct urb *urb,
+ char ev_type)
+{
+ struct mon_event_text *ep;
+ unsigned int stamp;
+
+ stamp = mon_get_timestamp();
+
+ if (rp->nevents >= EVENT_MAX ||
+ (ep = kmem_cache_alloc(rp->e_slab, SLAB_ATOMIC)) == NULL) {
+ rp->r.m_bus->cnt_text_lost++;
+ return;
+ }
+
+ ep->type = ev_type;
+ ep->pipe = urb->pipe;
+ ep->id = (unsigned long) urb;
+ ep->tstamp = stamp;
+ ep->length = (ev_type == 'S') ?
+ urb->transfer_buffer_length : urb->actual_length;
+ /* Collecting status makes debugging sense for submits, too */
+ ep->status = urb->status;
+
+ ep->data_flag = mon_text_get_data(ep, urb, ep->length, ev_type);
+
+ rp->nevents++;
+ list_add_tail(&ep->e_link, &rp->e_list);
+ wake_up(&rp->wait);
+}
+
+static void mon_text_submit(void *data, struct urb *urb)
+{
+ struct mon_reader_text *rp = data;
+ mon_text_event(rp, urb, 'S');
+}
+
+static void mon_text_complete(void *data, struct urb *urb)
+{
+ struct mon_reader_text *rp = data;
+ mon_text_event(rp, urb, 'C');
+}
+
+/*
+ * Fetch next event from the circular buffer.
+ */
+static struct mon_event_text *mon_text_fetch(struct mon_reader_text *rp,
+ struct mon_bus *mbus)
+{
+ struct list_head *p;
+ unsigned long flags;
+
+ spin_lock_irqsave(&mbus->lock, flags);
+ if (list_empty(&rp->e_list)) {
+ spin_unlock_irqrestore(&mbus->lock, flags);
+ return NULL;
+ }
+ p = rp->e_list.next;
+ list_del(p);
+ --rp->nevents;
+ spin_unlock_irqrestore(&mbus->lock, flags);
+ return list_entry(p, struct mon_event_text, e_link);
+}
+
+/*
+ */
+static int mon_text_open(struct inode *inode, struct file *file)
+{
+ struct mon_bus *mbus;
+ struct usb_bus *ubus;
+ struct mon_reader_text *rp;
+ int rc;
+
+ down(&mon_lock);
+ mbus = inode->u.generic_ip;
+ ubus = mbus->u_bus;
+
+ rp = kmalloc(sizeof(struct mon_reader_text), GFP_KERNEL);
+ if (rp == NULL) {
+ rc = -ENOMEM;
+ goto err_alloc;
+ }
+ memset(rp, 0, sizeof(struct mon_reader_text));
+ INIT_LIST_HEAD(&rp->e_list);
+ init_waitqueue_head(&rp->wait);
+ init_MUTEX(&rp->printf_lock);
+
+ rp->printf_size = PRINTF_DFL;
+ rp->printf_buf = kmalloc(rp->printf_size, GFP_KERNEL);
+ if (rp->printf_buf == NULL) {
+ rc = -ENOMEM;
+ goto err_alloc_pr;
+ }
+
+ rp->r.m_bus = mbus;
+ rp->r.r_data = rp;
+ rp->r.rnf_submit = mon_text_submit;
+ rp->r.rnf_complete = mon_text_complete;
+
+ snprintf(rp->slab_name, SLAB_NAME_SZ, "mon%dt_%lx", ubus->busnum,
+ (long)rp);
+ rp->e_slab = kmem_cache_create(rp->slab_name,
+ sizeof(struct mon_event_text), sizeof(long), 0,
+ mon_text_ctor, mon_text_dtor);
+ if (rp->e_slab == NULL) {
+ rc = -ENOMEM;
+ goto err_slab;
+ }
+
+ mon_reader_add(mbus, &rp->r);
+
+ file->private_data = rp;
+ up(&mon_lock);
+ return 0;
+
+// err_busy:
+// kmem_cache_destroy(rp->e_slab);
+err_slab:
+ kfree(rp->printf_buf);
+err_alloc_pr:
+ kfree(rp);
+err_alloc:
+ up(&mon_lock);
+ return rc;
+}
+
+/*
+ * For simplicity, we read one record in one system call and throw out
+ * what does not fit. This means that the following does not work:
+ * dd if=/dbg/usbmon/0t bs=10
+ * Also, we do not allow seeks and do not bother advancing the offset.
+ */
+static ssize_t mon_text_read(struct file *file, char __user *buf,
+ size_t nbytes, loff_t *ppos)
+{
+ struct mon_reader_text *rp = file->private_data;
+ struct mon_bus *mbus = rp->r.m_bus;
+ DECLARE_WAITQUEUE(waita, current);
+ struct mon_event_text *ep;
+ int cnt, limit;
+ char *pbuf;
+ char udir, utype;
+ int data_len, i;
+
+ add_wait_queue(&rp->wait, &waita);
+ set_current_state(TASK_INTERRUPTIBLE);
+ while ((ep = mon_text_fetch(rp, mbus)) == NULL) {
+ if (file->f_flags & O_NONBLOCK) {
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&rp->wait, &waita);
+ return -EWOULDBLOCK; /* Same as EAGAIN in Linux */
+ }
+ /*
+ * We do not count nwaiters, because ->release is supposed
+ * to be called when all openers are gone only.
+ */
+ schedule();
+ if (signal_pending(current)) {
+ remove_wait_queue(&rp->wait, &waita);
+ return -EINTR;
+ }
+ set_current_state(TASK_INTERRUPTIBLE);
+ }
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&rp->wait, &waita);
+
+ down(&rp->printf_lock);
+ cnt = 0;
+ pbuf = rp->printf_buf;
+ limit = rp->printf_size;
+
+ udir = usb_pipein(ep->pipe) ? 'i' : 'o';
+ switch (usb_pipetype(ep->pipe)) {
+ case PIPE_ISOCHRONOUS: utype = 'Z'; break;
+ case PIPE_INTERRUPT: utype = 'I'; break;
+ case PIPE_CONTROL: utype = 'C'; break;
+ default: /* PIPE_BULK */ utype = 'B';
+ }
+ cnt += snprintf(pbuf + cnt, limit - cnt,
+ "%lx %u %c %c%c:%03u:%02u %d %d",
+ ep->id, ep->tstamp, ep->type,
+ utype, udir, usb_pipedevice(ep->pipe), usb_pipeendpoint(ep->pipe),
+ ep->status, ep->length);
+
+ if ((data_len = ep->length) > 0) {
+ if (ep->data_flag == 0) {
+ cnt += snprintf(pbuf + cnt, limit - cnt, " =");
+ if (data_len >= DATA_MAX)
+ data_len = DATA_MAX;
+ for (i = 0; i < data_len; i++) {
+ if (i % 4 == 0) {
+ cnt += snprintf(pbuf + cnt, limit - cnt,
+ " ");
+ }
+ cnt += snprintf(pbuf + cnt, limit - cnt,
+ "%02x", ep->data[i]);
+ }
+ cnt += snprintf(pbuf + cnt, limit - cnt, "\n");
+ } else {
+ cnt += snprintf(pbuf + cnt, limit - cnt,
+ " %c\n", ep->data_flag);
+ }
+ } else {
+ cnt += snprintf(pbuf + cnt, limit - cnt, "\n");
+ }
+
+ if (copy_to_user(buf, rp->printf_buf, cnt))
+ cnt = -EFAULT;
+ up(&rp->printf_lock);
+ kmem_cache_free(rp->e_slab, ep);
+ return cnt;
+}
+
+static int mon_text_release(struct inode *inode, struct file *file)
+{
+ struct mon_reader_text *rp = file->private_data;
+ struct mon_bus *mbus;
+ /* unsigned long flags; */
+ struct list_head *p;
+ struct mon_event_text *ep;
+
+ down(&mon_lock);
+ mbus = inode->u.generic_ip;
+
+ if (mbus->nreaders <= 0) {
+ printk(KERN_ERR TAG ": consistency error on close\n");
+ up(&mon_lock);
+ return 0;
+ }
+ mon_reader_del(mbus, &rp->r);
+
+ /*
+ * In theory, e_list is protected by mbus->lock. However,
+ * after mon_reader_del has finished, the following is the case:
+ * - we are not on reader list anymore, so new events won't be added;
+ * - whole mbus may be dropped if it was orphaned.
+ * So, we better not touch mbus.
+ */
+ /* spin_lock_irqsave(&mbus->lock, flags); */
+ while (!list_empty(&rp->e_list)) {
+ p = rp->e_list.next;
+ ep = list_entry(p, struct mon_event_text, e_link);
+ list_del(p);
+ --rp->nevents;
+ kmem_cache_free(rp->e_slab, ep);
+ }
+ /* spin_unlock_irqrestore(&mbus->lock, flags); */
+
+ kmem_cache_destroy(rp->e_slab);
+ kfree(rp->printf_buf);
+ kfree(rp);
+
+ up(&mon_lock);
+ return 0;
+}
+
+struct file_operations mon_fops_text = {
+ .owner = THIS_MODULE,
+ .open = mon_text_open,
+ .llseek = no_llseek,
+ .read = mon_text_read,
+ /* .write = mon_text_write, */
+ /* .poll = mon_text_poll, */
+ /* .ioctl = mon_text_ioctl, */
+ .release = mon_text_release,
+};
+
+/*
+ * Slab interface: constructor.
+ */
+static void mon_text_ctor(void *mem, kmem_cache_t *slab, unsigned long sflags)
+{
+ /*
+ * Nothing to initialize. No, really!
+ * So, we fill it with garbage to emulate a reused object.
+ */
+ memset(mem, 0xe5, sizeof(struct mon_event_text));
+}
+
+static void mon_text_dtor(void *mem, kmem_cache_t *slab, unsigned long sflags)
+{
+ ;
+}
diff --git a/drivers/usb/mon/usb_mon.h b/drivers/usb/mon/usb_mon.h
new file mode 100644
index 000000000000..ed35c18a5c44
--- /dev/null
+++ b/drivers/usb/mon/usb_mon.h
@@ -0,0 +1,51 @@
+/*
+ * The USB Monitor, inspired by Dave Harding's USBMon.
+ */
+
+#ifndef __USB_MON_H
+#define __USB_MON_H
+
+#include <linux/list.h>
+#include <linux/slab.h>
+#include <linux/kref.h>
+/* #include <linux/usb.h> */ /* We use struct pointers only in this header */
+
+#define TAG "usbmon"
+
+struct mon_bus {
+ struct list_head bus_link;
+ spinlock_t lock;
+ struct dentry *dent_s; /* Debugging file */
+ struct dentry *dent_t; /* Text interface file */
+ struct usb_bus *u_bus;
+
+ /* Ref */
+ int nreaders; /* Under mon_lock AND mbus->lock */
+ struct list_head r_list; /* Chain of readers (usually one) */
+ struct kref ref; /* Under mon_lock */
+
+ /* Stats */
+ unsigned int cnt_text_lost;
+};
+
+/*
+ * An instance of a process which opened a file (but can fork later)
+ */
+struct mon_reader {
+ struct list_head r_link;
+ struct mon_bus *m_bus;
+ void *r_data; /* Use container_of instead? */
+
+ void (*rnf_submit)(void *data, struct urb *urb);
+ void (*rnf_complete)(void *data, struct urb *urb);
+};
+
+void mon_reader_add(struct mon_bus *mbus, struct mon_reader *r);
+void mon_reader_del(struct mon_bus *mbus, struct mon_reader *r);
+
+extern struct semaphore mon_lock;
+
+extern struct file_operations mon_fops_text;
+extern struct file_operations mon_fops_stat;
+
+#endif /* __USB_MON_H */
diff --git a/drivers/usb/net/Kconfig b/drivers/usb/net/Kconfig
new file mode 100644
index 000000000000..db64c908d4a7
--- /dev/null
+++ b/drivers/usb/net/Kconfig
@@ -0,0 +1,307 @@
+#
+# USB Network devices configuration
+#
+comment "Networking support is needed for USB Network Adapter support"
+ depends on USB && !NET
+
+menu "USB Network Adapters"
+ depends on USB && NET
+
+config USB_CATC
+ tristate "USB CATC NetMate-based Ethernet device support (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ select CRC32
+ ---help---
+ Say Y if you want to use one of the following 10Mbps USB Ethernet
+ device based on the EL1210A chip. Supported devices are:
+ Belkin F5U011
+ Belkin F5U111
+ CATC NetMate
+ CATC NetMate II
+ smartBridges smartNIC
+
+ This driver makes the adapter appear as a normal Ethernet interface,
+ typically on eth0, if it is the only ethernet device, or perhaps on
+ eth1, if you have a PCI or ISA ethernet card installed.
+
+ To compile this driver as a module, choose M here: the
+ module will be called catc.
+
+config USB_KAWETH
+ tristate "USB KLSI KL5USB101-based ethernet device support"
+ ---help---
+ Say Y here if you want to use one of the following 10Mbps only
+ USB Ethernet adapters based on the KLSI KL5KUSB101B chipset:
+ 3Com 3C19250
+ ADS USB-10BT
+ ATEN USB Ethernet
+ ASANTE USB To Ethernet Adapter
+ AOX Endpoints USB Ethernet
+ Correga K.K.
+ D-Link DSB-650C and DU-E10
+ Entrega / Portgear E45
+ I-O DATA USB-ET/T
+ Jaton USB Ethernet Device Adapter
+ Kingston Technology USB Ethernet Adapter
+ Linksys USB10T
+ Mobility USB-Ethernet Adapter
+ NetGear EA-101
+ Peracom Enet and Enet2
+ Portsmith Express Ethernet Adapter
+ Shark Pocket Adapter
+ SMC 2202USB
+ Sony Vaio port extender
+
+ This driver is likely to work with most 10Mbps only USB Ethernet
+ adapters, including some "no brand" devices. It does NOT work on
+ SmartBridges smartNIC or on Belkin F5U111 devices - you should use
+ the CATC NetMate driver for those. If you are not sure which one
+ you need, select both, and the correct one should be selected for
+ you.
+
+ This driver makes the adapter appear as a normal Ethernet interface,
+ typically on eth0, if it is the only ethernet device, or perhaps on
+ eth1, if you have a PCI or ISA ethernet card installed.
+
+ To compile this driver as a module, choose M here: the
+ module will be called kaweth.
+
+config USB_PEGASUS
+ tristate "USB Pegasus/Pegasus-II based ethernet device support"
+ select MII
+ ---help---
+ Say Y here if you know you have Pegasus or Pegasus-II based adapter.
+ If in doubt then look at <file:drivers/usb/net/pegasus.h> for the
+ complete list of supported devices.
+
+ If your particular adapter is not in the list and you are _sure_ it
+ is Pegasus or Pegasus II based then send me
+ <petkan@users.sourceforge.net> vendor and device IDs.
+
+ To compile this driver as a module, choose M here: the
+ module will be called pegasus.
+
+config USB_RTL8150
+ tristate "USB RTL8150 based ethernet device support (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ Say Y here if you have RTL8150 based usb-ethernet adapter.
+ Send me <petkan@users.sourceforge.net> any comments you may have.
+ You can also check for updates at <http://pegasus2.sourceforge.net/>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called rtl8150.
+
+config USB_USBNET
+ tristate "Multi-purpose USB Networking Framework"
+ ---help---
+ This driver supports several kinds of network links over USB,
+ with "minidrivers" built around a common network driver core
+ that supports deep queues for efficient transfers. (This gives
+ better performance with small packets and at high speeds).
+
+ The USB host runs "usbnet", and the other end of the link might be:
+
+ - Another USB host, when using USB "network" or "data transfer"
+ cables. These are often used to network laptops to PCs, like
+ "Laplink" parallel cables or some motherboards. These rely
+ on specialized chips from many suppliers.
+
+ - An intelligent USB gadget, perhaps embedding a Linux system.
+ These include PDAs running Linux (iPaq, Yopy, Zaurus, and
+ others), and devices that interoperate using the standard
+ CDC-Ethernet specification (including many cable modems).
+
+ - Network adapter hardware (like those for 10/100 Ethernet) which
+ uses this driver framework.
+
+ The link will appear with a name like "usb0", when the link is
+ a two-node link, or "eth0" for most CDC-Ethernet devices. Those
+ two-node links are most easily managed with Ethernet Bridging
+ (CONFIG_BRIDGE) instead of routing.
+
+ For more information see <http://www.linux-usb.org/usbnet/>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usbnet.
+
+comment "USB Host-to-Host Cables"
+ depends on USB_USBNET
+
+config USB_ALI_M5632
+ boolean "ALi M5632 based 'USB 2.0 Data Link' cables"
+ depends on USB_USBNET
+ default y
+ help
+ Choose this option if you're using a host-to-host cable
+ based on this design, which supports USB 2.0 high speed.
+
+config USB_AN2720
+ boolean "AnchorChips 2720 based cables (Xircom PGUNET, ...)"
+ depends on USB_USBNET
+ default y
+ help
+ Choose this option if you're using a host-to-host cable
+ based on this design. Note that AnchorChips is now a
+ Cypress brand.
+
+config USB_BELKIN
+ boolean "eTEK based host-to-host cables (Advance, Belkin, ...)"
+ depends on USB_USBNET
+ default y
+ help
+ Choose this option if you're using a host-to-host cable
+ based on this design: two NetChip 2890 chips and an Atmel
+ microcontroller, with LEDs that indicate traffic.
+
+config USB_GENESYS
+ boolean "GeneSys GL620USB-A based cables"
+ default y
+ depends on USB_USBNET
+ help
+ Choose this option if you're using a host-to-host cable,
+ or PC2PC motherboard, with this chip.
+
+ Note that the half-duplex "GL620USB" is not supported.
+
+config USB_NET1080
+ boolean "NetChip 1080 based cables (Laplink, ...)"
+ default y
+ depends on USB_USBNET
+ help
+ Choose this option if you're using a host-to-host cable based
+ on this design: one NetChip 1080 chips and supporting logic,
+ supporting LEDs that indicate traffic
+
+config USB_PL2301
+ boolean "Prolific PL-2301/2302 based cables"
+ default y
+ # handshake/init/reset problems, from original 'plusb' driver
+ depends on USB_USBNET && EXPERIMENTAL
+ help
+ Choose this option if you're using a host-to-host cable
+ with one of these chips.
+
+config USB_KC2190
+ boolean "KT Technology KC2190 based cables (InstaNet)"
+ default y
+ depends on USB_USBNET && EXPERIMENTAL
+ help
+ Choose this option if you're using a host-to-host cable
+ with one of these chips.
+
+comment "Intelligent USB Devices/Gadgets"
+ depends on USB_USBNET
+
+config USB_ARMLINUX
+ boolean "Embedded ARM Linux links (iPaq, ...)"
+ depends on USB_USBNET
+ default y
+ help
+ Choose this option to support the "usb-eth" networking driver
+ used by most of the ARM Linux community with device controllers
+ such as the SA-11x0 and PXA-25x UDCs, or the tftp capabilities
+ in some PXA versions of the "blob" boot loader.
+
+ Linux-based "Gumstix" PXA-25x based systems use this protocol
+ to talk with other Linux systems.
+
+ Although the ROMs shipped with Sharp Zaurus products use a
+ different link level framing protocol, you can have them use
+ this simpler protocol by installing a different kernel.
+
+config USB_EPSON2888
+ boolean "Epson 2888 based firmware (DEVELOPMENT)"
+ depends on USB_USBNET
+ default y
+ help
+ Choose this option to support the usb networking links used
+ by some sample firmware from Epson.
+
+config USB_ZAURUS
+ boolean "Sharp Zaurus (stock ROMs)"
+ depends on USB_USBNET
+ select CRC32
+ default y
+ help
+ Choose this option to support the usb networking links used by
+ Zaurus models like the SL-5000D, SL-5500, SL-5600, A-300, B-500.
+
+ If you install an alternate ROM image, you may no longer need
+ to support this protocol. Only the "eth-fd" driver really needs
+ this non-conformant variant of CDC Ethernet protocol.
+
+config USB_CDCETHER
+ boolean "CDC Ethernet support (smart devices such as cable modems)"
+ depends on USB_USBNET
+ default y
+ help
+ This option supports devices conforming to the Communication Device
+ Class (CDC) Ethernet Control Model, a specification that's easy to
+ implement in device firmware. The CDC specifications are available
+ from <http://www.usb.org/>.
+
+ CDC Ethernet is an implementation option for DOCSIS cable modems
+ that support USB connectivity, used for non-Microsoft USB hosts.
+ This driver should work with at least the following devices:
+
+ * Ericsson PipeRider (all variants)
+ * Motorola (DM100 and SB4100)
+ * Broadcom Cable Modem (reference design)
+ * Toshiba PCX1100U
+ * ...
+
+ This driver creates an interface named "ethX", where X depends on
+ what other networking devices you have in use. However, if the
+ IEEE 802 "local assignment" bit is set in the address, a "usbX"
+ name is used instead.
+
+comment "USB Network Adapters"
+ depends on USB_USBNET
+
+config USB_AX8817X
+ boolean "ASIX AX88xxx Based USB 2.0 Ethernet Devices"
+ depends on USB_USBNET && NET_ETHERNET
+ select CRC32
+ select MII
+ default y
+ help
+ This option adds support for ASIX AX88xxx based USB 2.0
+ 10/100 Ethernet devices.
+
+ This driver should work with at least the following devices:
+ * Aten UC210T
+ * ASIX AX88172
+ * Billionton Systems, USB2AR
+ * Buffalo LUA-U2-KTX
+ * Corega FEther USB2-TX
+ * D-Link DUB-E100
+ * Hawking UF200
+ * Linksys USB200M
+ * Netgear FA120
+ * Sitecom LN-029
+ * Intellinet USB 2.0 Ethernet
+ * ST Lab USB 2.0 Ethernet
+ * TrendNet TU2-ET100
+
+ This driver creates an interface named "ethX", where X depends on
+ what other networking devices you have in use.
+
+config USB_ZD1201
+ tristate "USB ZD1201 based Wireless device support"
+ depends on NET_RADIO
+ select FW_LOADER
+ ---help---
+ Say Y if you want to use wireless LAN adapters based on the ZyDAS
+ ZD1201 chip.
+
+ This driver makes the adapter appear as a normal Ethernet interface,
+ typically on wlan0.
+
+ The zd1201 device requires external firmware to be loaded.
+ This can be found at http://linux-lc100020.sourceforge.net/
+
+ To compile this driver as a module, choose M here: the
+ module will be called zd1201.
+
+endmenu
diff --git a/drivers/usb/net/Makefile b/drivers/usb/net/Makefile
new file mode 100644
index 000000000000..16f352195512
--- /dev/null
+++ b/drivers/usb/net/Makefile
@@ -0,0 +1,12 @@
+#
+# Makefile for USB Network drivers
+#
+
+obj-$(CONFIG_USB_CATC) += catc.o
+obj-$(CONFIG_USB_KAWETH) += kaweth.o
+obj-$(CONFIG_USB_PEGASUS) += pegasus.o
+obj-$(CONFIG_USB_RTL8150) += rtl8150.o
+obj-$(CONFIG_USB_USBNET) += usbnet.o
+obj-$(CONFIG_USB_ZD1201) += zd1201.o
+
+CFLAGS_zd1201.o = -Idrivers/net/wireless/
diff --git a/drivers/usb/net/catc.c b/drivers/usb/net/catc.c
new file mode 100644
index 000000000000..c8be912f24e1
--- /dev/null
+++ b/drivers/usb/net/catc.c
@@ -0,0 +1,960 @@
+/*
+ * Copyright (c) 2001 Vojtech Pavlik
+ *
+ * CATC EL1210A NetMate USB Ethernet driver
+ *
+ * Sponsored by SuSE
+ *
+ * Based on the work of
+ * Donald Becker
+ *
+ * Old chipset support added by Simon Evans <spse@secret.org.uk> 2002
+ * - adds support for Belkin F5U011
+ */
+
+/*
+ * 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
+ *
+ * Should you need to contact me, the author, you can do so either by
+ * e-mail - mail your message to <vojtech@suse.cz>, or by paper mail:
+ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+#include <linux/spinlock.h>
+#include <linux/ethtool.h>
+#include <linux/crc32.h>
+#include <linux/bitops.h>
+#include <asm/uaccess.h>
+
+#undef DEBUG
+
+#include <linux/usb.h>
+
+/*
+ * Version information.
+ */
+
+#define DRIVER_VERSION "v2.8"
+#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@suse.cz>"
+#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);
+MODULE_LICENSE("GPL");
+
+static const char driver_name[] = "catc";
+
+/*
+ * Some defines.
+ */
+
+#define STATS_UPDATE (HZ) /* Time between stats updates */
+#define TX_TIMEOUT (5*HZ) /* Max time the queue can be stopped */
+#define PKT_SZ 1536 /* Max Ethernet packet size */
+#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.
+ */
+
+enum control_requests {
+ ReadMem = 0xf1,
+ GetMac = 0xf2,
+ Reset = 0xf4,
+ SetMac = 0xf5,
+ SetRxMode = 0xf5, /* F5U011 only */
+ WriteROM = 0xf8,
+ SetReg = 0xfa,
+ GetReg = 0xfb,
+ WriteMem = 0xfc,
+ ReadROM = 0xfd,
+};
+
+/*
+ * Registers.
+ */
+
+enum register_offsets {
+ TxBufCount = 0x20,
+ RxBufCount = 0x21,
+ OpModes = 0x22,
+ TxQed = 0x23,
+ RxQed = 0x24,
+ MaxBurst = 0x25,
+ RxUnit = 0x60,
+ EthStatus = 0x61,
+ StationAddr0 = 0x67,
+ EthStats = 0x69,
+ LEDCtrl = 0x81,
+};
+
+enum eth_stats {
+ TxSingleColl = 0x00,
+ TxMultiColl = 0x02,
+ TxExcessColl = 0x04,
+ RxFramErr = 0x06,
+};
+
+enum op_mode_bits {
+ Op3MemWaits = 0x03,
+ OpLenInclude = 0x08,
+ OpRxMerge = 0x10,
+ OpTxMerge = 0x20,
+ OpWin95bugfix = 0x40,
+ OpLoopback = 0x80,
+};
+
+enum rx_filter_bits {
+ RxEnable = 0x01,
+ RxPolarity = 0x02,
+ RxForceOK = 0x04,
+ RxMultiCast = 0x08,
+ RxPromisc = 0x10,
+ AltRxPromisc = 0x20, /* F5U011 uses different bit */
+};
+
+enum led_values {
+ LEDFast = 0x01,
+ LEDSlow = 0x02,
+ LEDFlash = 0x03,
+ LEDPulse = 0x04,
+ LEDLink = 0x08,
+};
+
+enum link_status {
+ LinkNoChange = 0,
+ LinkGood = 1,
+ LinkBad = 2
+};
+
+/*
+ * The catc struct.
+ */
+
+#define CTRL_RUNNING 0
+#define RX_RUNNING 1
+#define TX_RUNNING 2
+
+struct catc {
+ struct net_device *netdev;
+ struct usb_device *usbdev;
+
+ struct net_device_stats stats;
+ unsigned long flags;
+
+ unsigned int tx_ptr, tx_idx;
+ unsigned int ctrl_head, ctrl_tail;
+ spinlock_t tx_lock, ctrl_lock;
+
+ u8 tx_buf[2][TX_MAX_BURST * (PKT_SZ + 2)];
+ 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];
+ u16 stats_vals[4];
+ unsigned long last_stats;
+
+ u8 multicast[64];
+
+ struct ctrl_queue {
+ u8 dir;
+ u8 request;
+ u16 value;
+ u16 index;
+ void *buf;
+ int len;
+ void (*callback)(struct catc *catc, struct ctrl_queue *q);
+ } 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 */
+};
+
+/*
+ * Useful macros.
+ */
+
+#define catc_get_mac(catc, mac) catc_ctrl_msg(catc, USB_DIR_IN, GetMac, 0, 0, mac, 6)
+#define catc_reset(catc) catc_ctrl_msg(catc, USB_DIR_OUT, Reset, 0, 0, NULL, 0)
+#define catc_set_reg(catc, reg, val) catc_ctrl_msg(catc, USB_DIR_OUT, SetReg, val, reg, NULL, 0)
+#define catc_get_reg(catc, reg, buf) catc_ctrl_msg(catc, USB_DIR_IN, GetReg, 0, reg, buf, 1)
+#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)
+
+/*
+ * Receive routines.
+ */
+
+static void catc_rx_done(struct urb *urb, struct pt_regs *regs)
+{
+ 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);
+ return;
+ }
+
+ do {
+ if(!catc->is_f5u011) {
+ pkt_len = le16_to_cpup((__le16*)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);
+ netif_rx(skb);
+
+ 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, GFP_ATOMIC)) < 0) {
+ dbg("submit(rx_urb) status %d", status);
+ }
+ } else {
+ clear_bit(RX_RUNNING, &catc->flags);
+ }
+ }
+}
+
+static void catc_irq_done(struct urb *urb, struct pt_regs *regs)
+{
+ 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((__be16*)data) & 0x0fff);
+ if (data[0] == 0x90)
+ linksts = LinkGood;
+ else if (data[0] == 0xA0)
+ linksts = LinkBad;
+ }
+
+ switch (urb->status) {
+ case 0: /* success */
+ break;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -ESHUTDOWN:
+ return;
+ /* -EPIPE: should clear the halt */
+ default: /* error */
+ dbg("irq_done, status %d, data %02x %02x.", urb->status, data[0], data[1]);
+ goto resubmit;
+ }
+
+ 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, GFP_ATOMIC)) < 0) {
+ err("submit(rx_urb) status %d", status);
+ }
+ }
+ }
+resubmit:
+ status = usb_submit_urb (urb, SLAB_ATOMIC);
+ if (status)
+ err ("can't resubmit intr, %s-%s, status %d",
+ catc->usbdev->bus->bus_name,
+ catc->usbdev->devpath, status);
+}
+
+/*
+ * Transmit routines.
+ */
+
+static void catc_tx_run(struct catc *catc)
+{
+ 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;
+
+ if ((status = usb_submit_urb(catc->tx_urb, GFP_ATOMIC)) < 0)
+ err("submit(tx_urb), status %d", status);
+
+ catc->tx_idx = !catc->tx_idx;
+ catc->tx_ptr = 0;
+
+ catc->netdev->trans_start = jiffies;
+}
+
+static void catc_tx_done(struct urb *urb, struct pt_regs *regs)
+{
+ struct catc *catc = urb->context;
+ unsigned long flags;
+
+ if (urb->status == -ECONNRESET) {
+ dbg("Tx Reset.");
+ urb->transfer_flags &= ~URB_ASYNC_UNLINK;
+ urb->status = 0;
+ catc->netdev->trans_start = jiffies;
+ catc->stats.tx_errors++;
+ clear_bit(TX_RUNNING, &catc->flags);
+ netif_wake_queue(catc->netdev);
+ return;
+ }
+
+ if (urb->status) {
+ dbg("tx_done, status %d, length %d", urb->status, urb->actual_length);
+ return;
+ }
+
+ spin_lock_irqsave(&catc->tx_lock, flags);
+
+ if (catc->tx_ptr)
+ catc_tx_run(catc);
+ else
+ clear_bit(TX_RUNNING, &catc->flags);
+
+ netif_wake_queue(catc->netdev);
+
+ spin_unlock_irqrestore(&catc->tx_lock, flags);
+}
+
+static int catc_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+{
+ struct catc *catc = netdev_priv(netdev);
+ unsigned long flags;
+ char *tx_buf;
+
+ spin_lock_irqsave(&catc->tx_lock, flags);
+
+ 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);
+
+ catc->stats.tx_bytes += skb->len;
+ catc->stats.tx_packets++;
+
+ dev_kfree_skb(skb);
+
+ return 0;
+}
+
+static void catc_tx_timeout(struct net_device *netdev)
+{
+ struct catc *catc = netdev_priv(netdev);
+
+ warn("Transmit timed out.");
+ catc->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ usb_unlink_urb(catc->tx_urb);
+}
+
+/*
+ * Control messages.
+ */
+
+static int catc_ctrl_msg(struct catc *catc, u8 dir, u8 request, u16 value, u16 index, void *buf, int len)
+{
+ int retval = usb_control_msg(catc->usbdev,
+ dir ? usb_rcvctrlpipe(catc->usbdev, 0) : usb_sndctrlpipe(catc->usbdev, 0),
+ request, 0x40 | dir, value, index, buf, len, 1000);
+ return retval < 0 ? retval : 0;
+}
+
+static void catc_ctrl_run(struct catc *catc)
+{
+ 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;
+ urb->transfer_buffer = catc->ctrl_buf;
+ urb->setup_packet = (void *) dr;
+ urb->dev = usbdev;
+
+ if (!q->dir && q->buf && q->len)
+ memcpy(catc->ctrl_buf, q->buf, q->len);
+
+ if ((status = usb_submit_urb(catc->ctrl_urb, GFP_KERNEL)))
+ err("submit(ctrl_urb) status %d", status);
+}
+
+static void catc_ctrl_done(struct urb *urb, struct pt_regs *regs)
+{
+ 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);
+
+ spin_lock_irqsave(&catc->ctrl_lock, flags);
+
+ q = catc->ctrl_queue + catc->ctrl_tail;
+
+ if (q->dir) {
+ if (q->buf && q->len)
+ memcpy(q->buf, catc->ctrl_buf, q->len);
+ else
+ q->buf = catc->ctrl_buf;
+ }
+
+ if (q->callback)
+ q->callback(catc, q);
+
+ catc->ctrl_tail = (catc->ctrl_tail + 1) & (CTRL_QUEUE - 1);
+
+ if (catc->ctrl_head != catc->ctrl_tail)
+ catc_ctrl_run(catc);
+ else
+ clear_bit(CTRL_RUNNING, &catc->flags);
+
+ spin_unlock_irqrestore(&catc->ctrl_lock, flags);
+}
+
+static int catc_ctrl_async(struct catc *catc, u8 dir, u8 request, u16 value,
+ u16 index, void *buf, int len, void (*callback)(struct catc *catc, struct ctrl_queue *q))
+{
+ struct ctrl_queue *q;
+ int retval = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave(&catc->ctrl_lock, flags);
+
+ q = catc->ctrl_queue + catc->ctrl_head;
+
+ q->dir = dir;
+ q->request = request;
+ q->value = value;
+ q->index = index;
+ q->buf = buf;
+ q->len = len;
+ q->callback = callback;
+
+ catc->ctrl_head = (catc->ctrl_head + 1) & (CTRL_QUEUE - 1);
+
+ if (catc->ctrl_head == catc->ctrl_tail) {
+ err("ctrl queue full");
+ catc->ctrl_tail = (catc->ctrl_tail + 1) & (CTRL_QUEUE - 1);
+ retval = -1;
+ }
+
+ if (!test_and_set_bit(CTRL_RUNNING, &catc->flags))
+ catc_ctrl_run(catc);
+
+ spin_unlock_irqrestore(&catc->ctrl_lock, flags);
+
+ return retval;
+}
+
+/*
+ * Statistics.
+ */
+
+static void catc_stats_done(struct catc *catc, struct ctrl_queue *q)
+{
+ int index = q->index - EthStats;
+ u16 data, last;
+
+ catc->stats_buf[index] = *((char *)q->buf);
+
+ if (index & 1)
+ return;
+
+ data = ((u16)catc->stats_buf[index] << 8) | catc->stats_buf[index + 1];
+ last = catc->stats_vals[index >> 1];
+
+ switch (index) {
+ case TxSingleColl:
+ case TxMultiColl:
+ catc->stats.collisions += data - last;
+ break;
+ case TxExcessColl:
+ catc->stats.tx_aborted_errors += data - last;
+ catc->stats.tx_errors += data - last;
+ break;
+ case RxFramErr:
+ catc->stats.rx_frame_errors += data - last;
+ catc->stats.rx_errors += data - last;
+ break;
+ }
+
+ catc->stats_vals[index >> 1] = data;
+}
+
+static void catc_stats_timer(unsigned long data)
+{
+ struct catc *catc = (void *) data;
+ int i;
+
+ for (i = 0; i < 8; i++)
+ catc_get_reg_async(catc, EthStats + 7 - i, catc_stats_done);
+
+ mod_timer(&catc->timer, jiffies + STATS_UPDATE);
+}
+
+static struct net_device_stats *catc_get_stats(struct net_device *netdev)
+{
+ struct catc *catc = netdev_priv(netdev);
+ return &catc->stats;
+}
+
+/*
+ * Receive modes. Broadcast, Multicast, Promisc.
+ */
+
+static void catc_multicast(unsigned char *addr, u8 *multicast)
+{
+ u32 crc;
+
+ crc = ether_crc_le(6, addr);
+ multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7);
+}
+
+static void catc_set_multicast_list(struct net_device *netdev)
+{
+ struct catc *catc = netdev_priv(netdev);
+ struct dev_mc_list *mc;
+ u8 broadcast[6];
+ u8 rx = RxEnable | RxPolarity | RxMultiCast;
+ int i;
+
+ memset(broadcast, 0xff, 6);
+ memset(catc->multicast, 0, 64);
+
+ catc_multicast(broadcast, catc->multicast);
+ catc_multicast(netdev->dev_addr, catc->multicast);
+
+ 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);
+ }
+ }
+}
+
+static void catc_get_drvinfo(struct net_device *dev,
+ struct ethtool_drvinfo *info)
+{
+ struct catc *catc = netdev_priv(dev);
+ strncpy(info->driver, driver_name, ETHTOOL_BUSINFO_LEN);
+ strncpy(info->version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
+ usb_make_path (catc->usbdev, info->bus_info, sizeof info->bus_info);
+}
+
+static int catc_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+ struct catc *catc = netdev_priv(dev);
+ if (!catc->is_f5u011)
+ return -EOPNOTSUPP;
+
+ cmd->supported = SUPPORTED_10baseT_Half | SUPPORTED_TP;
+ cmd->advertising = ADVERTISED_10baseT_Half | ADVERTISED_TP;
+ cmd->speed = SPEED_10;
+ cmd->duplex = DUPLEX_HALF;
+ cmd->port = PORT_TP;
+ cmd->phy_address = 0;
+ cmd->transceiver = XCVR_INTERNAL;
+ cmd->autoneg = AUTONEG_DISABLE;
+ cmd->maxtxpkt = 1;
+ cmd->maxrxpkt = 1;
+ return 0;
+}
+
+static struct ethtool_ops ops = {
+ .get_drvinfo = catc_get_drvinfo,
+ .get_settings = catc_get_settings,
+ .get_link = ethtool_op_get_link
+};
+
+/*
+ * Open, close.
+ */
+
+static int catc_open(struct net_device *netdev)
+{
+ struct catc *catc = netdev_priv(netdev);
+ int status;
+
+ catc->irq_urb->dev = catc->usbdev;
+ if ((status = usb_submit_urb(catc->irq_urb, GFP_KERNEL)) < 0) {
+ err("submit(irq_urb) status %d", status);
+ return -1;
+ }
+
+ netif_start_queue(netdev);
+
+ if (!catc->is_f5u011)
+ mod_timer(&catc->timer, jiffies + STATS_UPDATE);
+
+ return 0;
+}
+
+static int catc_stop(struct net_device *netdev)
+{
+ struct catc *catc = netdev_priv(netdev);
+
+ netif_stop_queue(netdev);
+
+ if (!catc->is_f5u011)
+ del_timer_sync(&catc->timer);
+
+ usb_kill_urb(catc->rx_urb);
+ usb_kill_urb(catc->tx_urb);
+ usb_kill_urb(catc->irq_urb);
+ usb_kill_urb(catc->ctrl_urb);
+
+ return 0;
+}
+
+/*
+ * USB probe, disconnect.
+ */
+
+static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id)
+{
+ struct usb_device *usbdev = interface_to_usbdev(intf);
+ struct net_device *netdev;
+ struct catc *catc;
+ u8 broadcast[6];
+ int i, pktsz;
+
+ if (usb_set_interface(usbdev,
+ intf->altsetting->desc.bInterfaceNumber, 1)) {
+ err("Can't set altsetting 1.");
+ return -EIO;
+ }
+
+ netdev = alloc_etherdev(sizeof(struct catc));
+ if (!netdev)
+ return -ENOMEM;
+
+ catc = netdev_priv(netdev);
+
+ netdev->open = catc_open;
+ netdev->hard_start_xmit = catc_hard_start_xmit;
+ netdev->stop = catc_stop;
+ netdev->get_stats = catc_get_stats;
+ netdev->tx_timeout = catc_tx_timeout;
+ netdev->watchdog_timeo = TX_TIMEOUT;
+ netdev->set_multicast_list = catc_set_multicast_list;
+ SET_ETHTOOL_OPS(netdev, &ops);
+
+ catc->usbdev = usbdev;
+ catc->netdev = netdev;
+
+ spin_lock_init(&catc->tx_lock);
+ spin_lock_init(&catc->ctrl_lock);
+
+ init_timer(&catc->timer);
+ catc->timer.data = (long) catc;
+ catc->timer.function = catc_stats_timer;
+
+ catc->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
+ catc->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ catc->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ catc->irq_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if ((!catc->ctrl_urb) || (!catc->tx_urb) ||
+ (!catc->rx_urb) || (!catc->irq_urb)) {
+ err("No free urbs available.");
+ if (catc->ctrl_urb)
+ usb_free_urb(catc->ctrl_urb);
+ if (catc->tx_urb)
+ usb_free_urb(catc->tx_urb);
+ if (catc->rx_urb)
+ usb_free_urb(catc->rx_urb);
+ if (catc->irq_urb)
+ usb_free_urb(catc->irq_urb);
+ free_netdev(netdev);
+ return -ENOMEM;
+ }
+
+ /* The F5U011 has the same vendor/product as the netmate but a device version of 0x130 */
+ if (le16_to_cpu(usbdev->descriptor.idVendor) == 0x0423 &&
+ le16_to_cpu(usbdev->descriptor.idProduct) == 0xa &&
+ le16_to_cpu(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);
+ }
+
+ usb_fill_control_urb(catc->ctrl_urb, usbdev, usb_sndctrlpipe(usbdev, 0),
+ NULL, NULL, 0, catc_ctrl_done, catc);
+
+ usb_fill_bulk_urb(catc->tx_urb, usbdev, usb_sndbulkpipe(usbdev, 1),
+ NULL, 0, catc_tx_done, catc);
+
+ usb_fill_bulk_urb(catc->rx_urb, usbdev, usb_rcvbulkpipe(usbdev, 1),
+ catc->rx_buf, pktsz, catc_rx_done, catc);
+
+ usb_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);
+ dbg("64k Memory\n");
+ break;
+ default:
+ warn("Couldn't detect memory size, assuming 32k");
+ case 0x87654321:
+ catc_set_reg(catc, TxBufCount, 4);
+ 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-%s-%s, ",
+ netdev->name, (catc->is_f5u011) ? "Belkin F5U011" : "CATC EL1210A NetMate",
+ usbdev->bus->bus_name, usbdev->devpath);
+ for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]);
+ printk("%2.2x.\n", netdev->dev_addr[i]);
+ usb_set_intfdata(intf, catc);
+
+ SET_NETDEV_DEV(netdev, &intf->dev);
+ if (register_netdev(netdev) != 0) {
+ usb_set_intfdata(intf, NULL);
+ usb_free_urb(catc->ctrl_urb);
+ usb_free_urb(catc->tx_urb);
+ usb_free_urb(catc->rx_urb);
+ usb_free_urb(catc->irq_urb);
+ free_netdev(netdev);
+ return -EIO;
+ }
+ return 0;
+}
+
+static void catc_disconnect(struct usb_interface *intf)
+{
+ struct catc *catc = usb_get_intfdata(intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (catc) {
+ unregister_netdev(catc->netdev);
+ usb_free_urb(catc->ctrl_urb);
+ usb_free_urb(catc->tx_urb);
+ usb_free_urb(catc->rx_urb);
+ usb_free_urb(catc->irq_urb);
+ free_netdev(catc->netdev);
+ }
+}
+
+/*
+ * Module functions and tables.
+ */
+
+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 */
+ { }
+};
+
+MODULE_DEVICE_TABLE(usb, catc_id_table);
+
+static struct usb_driver catc_driver = {
+ .owner = THIS_MODULE,
+ .name = driver_name,
+ .probe = catc_probe,
+ .disconnect = catc_disconnect,
+ .id_table = catc_id_table,
+};
+
+static int __init catc_init(void)
+{
+ int result = usb_register(&catc_driver);
+ if (result == 0)
+ info(DRIVER_VERSION " " DRIVER_DESC);
+ return result;
+}
+
+static void __exit catc_exit(void)
+{
+ usb_deregister(&catc_driver);
+}
+
+module_init(catc_init);
+module_exit(catc_exit);
diff --git a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c
new file mode 100644
index 000000000000..a9a7cf4a38eb
--- /dev/null
+++ b/drivers/usb/net/kaweth.c
@@ -0,0 +1,1271 @@
+/****************************************************************
+ *
+ * kaweth.c - driver for KL5KUSB101 based USB->Ethernet
+ *
+ * (c) 2000 Interlan Communications
+ * (c) 2000 Stephane Alnet
+ * (C) 2001 Brad Hards
+ * (C) 2002 Oliver Neukum
+ *
+ * Original author: The Zapman <zapman@interlan.net>
+ * Inspired by, and much credit goes to Michael Rothwell
+ * <rothwell@interlan.net> 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,
+ * 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.
+ *
+ ****************************************************************/
+
+/* TODO:
+ * Fix in_interrupt() problem
+ * Develop test procedures for USB net interfaces
+ * Run test procedures
+ * 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
+ * Code formatting improvements
+ */
+
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/usb.h>
+#include <linux/types.h>
+#include <linux/ethtool.h>
+#include <linux/pci.h>
+#include <linux/dma-mapping.h>
+#include <linux/wait.h>
+#include <asm/uaccess.h>
+#include <asm/semaphore.h>
+#include <asm/byteorder.h>
+
+#undef DEBUG
+
+#ifdef DEBUG
+#define kaweth_dbg(format, arg...) printk(KERN_DEBUG __FILE__ ": " format "\n" ,##arg)
+#else
+#define kaweth_dbg(format, arg...) do {} while (0)
+#endif
+#define kaweth_err(format, arg...) printk(KERN_ERR __FILE__ ": " format "\n" ,##arg)
+#define kaweth_info(format, arg...) printk(KERN_INFO __FILE__ ": " format "\n" , ##arg)
+#define kaweth_warn(format, arg...) printk(KERN_WARNING __FILE__ ": " format "\n" , ##arg)
+
+
+#include "kawethfw.h"
+
+#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)
+
+#define KAWETH_STATUS_BROKEN 0x0000001
+#define KAWETH_STATUS_CLOSING 0x0000002
+
+#define KAWETH_PACKET_FILTER_PROMISCUOUS 0x01
+#define KAWETH_PACKET_FILTER_ALL_MULTICAST 0x02
+#define KAWETH_PACKET_FILTER_DIRECTED 0x04
+#define KAWETH_PACKET_FILTER_BROADCAST 0x08
+#define KAWETH_PACKET_FILTER_MULTICAST 0x10
+
+/* Table 7 */
+#define KAWETH_COMMAND_GET_ETHERNET_DESC 0x00
+#define KAWETH_COMMAND_MULTICAST_FILTERS 0x01
+#define KAWETH_COMMAND_SET_PACKET_FILTER 0x02
+#define KAWETH_COMMAND_STATISTICS 0x03
+#define KAWETH_COMMAND_SET_TEMP_MAC 0x06
+#define KAWETH_COMMAND_GET_TEMP_MAC 0x07
+#define KAWETH_COMMAND_SET_URB_SIZE 0x08
+#define KAWETH_COMMAND_SET_SOFS_WAIT 0x09
+#define KAWETH_COMMAND_SCAN 0xFF
+
+#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 <zapman@interlan.net>, Stephane Alnet <stephane@u-picardie.fr>, Brad Hards <bhards@bigpond.net.au> and Oliver Neukum <oliver@neukum.org>");
+MODULE_DESCRIPTION("KL5USB101 USB Ethernet driver");
+MODULE_LICENSE("GPL");
+
+static const char driver_name[] = "kaweth";
+
+static int kaweth_probe(
+ struct usb_interface *intf,
+ const struct usb_device_id *id /* from id_table */
+ );
+static void kaweth_disconnect(struct usb_interface *intf);
+static 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(0x0506, 0x11f8) }, /* 3Com 3C460 */
+ { 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 */
+ { USB_DEVICE(0x085a, 0x0008) }, /* PortGear Ethernet Adapter */
+ { USB_DEVICE(0x085a, 0x0009) }, /* PortGear Ethernet Adapter */
+ { USB_DEVICE(0x087d, 0x5704) }, /* Jaton USB Ethernet Device Adapter */
+ { USB_DEVICE(0x0951, 0x0008) }, /* Kingston Technology USB Ethernet Adapter */
+ { USB_DEVICE(0x095a, 0x3003) }, /* Portsmith Express Ethernet Adapter */
+ { 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(0x1485, 0x0002) }, /* Psion Dacom Gold Port Ethernet */
+ { 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 */
+};
+
+MODULE_DEVICE_TABLE (usb, usb_klsi_table);
+
+/****************************************************************
+ * kaweth_driver
+ ****************************************************************/
+static struct usb_driver kaweth_driver = {
+ .owner = THIS_MODULE,
+ .name = driver_name,
+ .probe = kaweth_probe,
+ .disconnect = kaweth_disconnect,
+ .id_table = usb_klsi_table,
+};
+
+typedef __u8 eth_addr_t[6];
+
+/****************************************************************
+ * usb_eth_dev
+ ****************************************************************/
+struct usb_eth_dev {
+ char *name;
+ __u16 vendor;
+ __u16 device;
+ void *pdata;
+};
+
+/****************************************************************
+ * kaweth_ethernet_configuration
+ * Refer Table 8
+ ****************************************************************/
+struct kaweth_ethernet_configuration
+{
+ __u8 size;
+ __u8 reserved1;
+ __u8 reserved2;
+ eth_addr_t hw_addr;
+ __u32 statistics_mask;
+ __le16 segment_size;
+ __u16 max_multicast_filters;
+ __u8 reserved3;
+} __attribute__ ((packed));
+
+/****************************************************************
+ * kaweth_device
+ ****************************************************************/
+struct kaweth_device
+{
+ spinlock_t device_lock;
+
+ __u32 status;
+ int end;
+ int removed;
+ int suspend_lowmem_rx;
+ int suspend_lowmem_ctrl;
+ int linkstate;
+ struct work_struct lowmem_work;
+
+ 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;
+
+ dma_addr_t intbufferhandle;
+ __u8 *intbuffer;
+ dma_addr_t rxbufferhandle;
+ __u8 *rx_buf;
+
+
+ struct sk_buff *tx_skb;
+
+ __u8 *firmware_buf;
+ __u8 scratch[KAWETH_SCRATCH_SIZE];
+ __u16 packet_filter_bitmap;
+
+ struct kaweth_ethernet_configuration configuration;
+
+ struct net_device_stats stats;
+};
+
+
+/****************************************************************
+ * 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()");
+
+ if(in_interrupt()) {
+ kaweth_dbg("in_interrupt()");
+ 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,
+ dr,
+ data,
+ size,
+ timeout);
+}
+
+/****************************************************************
+ * kaweth_read_configuration
+ ****************************************************************/
+static int kaweth_read_configuration(struct kaweth_device *kaweth)
+{
+ int retval;
+
+ kaweth_dbg("Reading kaweth configuration");
+
+ retval = kaweth_control(kaweth,
+ usb_rcvctrlpipe(kaweth->dev, 0),
+ KAWETH_COMMAND_GET_ETHERNET_DESC,
+ USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_DEVICE,
+ 0,
+ 0,
+ (void *)&kaweth->configuration,
+ sizeof(kaweth->configuration),
+ KAWETH_CONTROL_TIMEOUT);
+
+ return retval;
+}
+
+/****************************************************************
+ * kaweth_set_urb_size
+ ****************************************************************/
+static int kaweth_set_urb_size(struct kaweth_device *kaweth, __u16 urb_size)
+{
+ int retval;
+
+ kaweth_dbg("Setting URB size to %d", (unsigned)urb_size);
+
+ retval = kaweth_control(kaweth,
+ usb_sndctrlpipe(kaweth->dev, 0),
+ KAWETH_COMMAND_SET_URB_SIZE,
+ USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
+ urb_size,
+ 0,
+ (void *)&kaweth->scratch,
+ 0,
+ KAWETH_CONTROL_TIMEOUT);
+
+ return retval;
+}
+
+/****************************************************************
+ * kaweth_set_sofs_wait
+ ****************************************************************/
+static int kaweth_set_sofs_wait(struct kaweth_device *kaweth, __u16 sofs_wait)
+{
+ int retval;
+
+ kaweth_dbg("Set SOFS wait to %d", (unsigned)sofs_wait);
+
+ retval = kaweth_control(kaweth,
+ usb_sndctrlpipe(kaweth->dev, 0),
+ KAWETH_COMMAND_SET_SOFS_WAIT,
+ USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
+ sofs_wait,
+ 0,
+ (void *)&kaweth->scratch,
+ 0,
+ KAWETH_CONTROL_TIMEOUT);
+
+ return retval;
+}
+
+/****************************************************************
+ * kaweth_set_receive_filter
+ ****************************************************************/
+static int kaweth_set_receive_filter(struct kaweth_device *kaweth,
+ __u16 receive_filter)
+{
+ int retval;
+
+ kaweth_dbg("Set receive filter to %d", (unsigned)receive_filter);
+
+ retval = kaweth_control(kaweth,
+ usb_sndctrlpipe(kaweth->dev, 0),
+ KAWETH_COMMAND_SET_PACKET_FILTER,
+ USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
+ receive_filter,
+ 0,
+ (void *)&kaweth->scratch,
+ 0,
+ KAWETH_CONTROL_TIMEOUT);
+
+ return retval;
+}
+
+/****************************************************************
+ * 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;
+ kaweth->firmware_buf[5] = interrupt;
+
+ 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);
+
+ return kaweth_control(kaweth,
+ usb_sndctrlpipe(kaweth->dev, 0),
+ KAWETH_COMMAND_SCAN,
+ USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
+ 0,
+ 0,
+ (void *)kaweth->firmware_buf,
+ data_len,
+ KAWETH_CONTROL_TIMEOUT);
+}
+
+/****************************************************************
+ * kaweth_trigger_firmware
+ ****************************************************************/
+static int kaweth_trigger_firmware(struct kaweth_device *kaweth,
+ __u8 interrupt)
+{
+ kaweth->firmware_buf[0] = 0xB6;
+ kaweth->firmware_buf[1] = 0xC3;
+ kaweth->firmware_buf[2] = 0x01;
+ kaweth->firmware_buf[3] = 0x00;
+ kaweth->firmware_buf[4] = 0x06;
+ kaweth->firmware_buf[5] = interrupt;
+ kaweth->firmware_buf[6] = 0x00;
+ kaweth->firmware_buf[7] = 0x00;
+
+ kaweth_dbg("Triggering firmware");
+
+ return kaweth_control(kaweth,
+ usb_sndctrlpipe(kaweth->dev, 0),
+ KAWETH_COMMAND_SCAN,
+ USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
+ 0,
+ 0,
+ (void *)kaweth->firmware_buf,
+ 8,
+ KAWETH_CONTROL_TIMEOUT);
+}
+
+/****************************************************************
+ * kaweth_reset
+ ****************************************************************/
+static int kaweth_reset(struct kaweth_device *kaweth)
+{
+ int result;
+
+ kaweth_dbg("kaweth_reset(%p)", kaweth);
+ result = kaweth_control(kaweth,
+ usb_sndctrlpipe(kaweth->dev, 0),
+ USB_REQ_SET_CONFIGURATION,
+ 0,
+ kaweth->dev->config[0].desc.bConfigurationValue,
+ 0,
+ NULL,
+ 0,
+ KAWETH_CONTROL_TIMEOUT);
+
+ udelay(10000);
+
+ kaweth_dbg("kaweth_reset() returns %d.",result);
+
+ return result;
+}
+
+static void kaweth_usb_receive(struct urb *, struct pt_regs *regs);
+static int kaweth_resubmit_rx_urb(struct kaweth_device *, int);
+
+/****************************************************************
+ int_callback
+*****************************************************************/
+
+static void kaweth_resubmit_int_urb(struct kaweth_device *kaweth, int mf)
+{
+ int status;
+
+ status = usb_submit_urb (kaweth->irq_urb, mf);
+ if (unlikely(status == -ENOMEM)) {
+ kaweth->suspend_lowmem_ctrl = 1;
+ schedule_delayed_work(&kaweth->lowmem_work, HZ/4);
+ } else {
+ kaweth->suspend_lowmem_ctrl = 0;
+ }
+
+ if (status)
+ err ("can't resubmit intr, %s-%s, status %d",
+ kaweth->dev->bus->bus_name,
+ kaweth->dev->devpath, status);
+}
+
+static void int_callback(struct urb *u, struct pt_regs *regs)
+{
+ struct kaweth_device *kaweth = u->context;
+ int act_state;
+
+ switch (u->status) {
+ case 0: /* success */
+ break;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -ESHUTDOWN:
+ return;
+ /* -EPIPE: should clear the halt */
+ default: /* error */
+ goto resubmit;
+ }
+
+ /* 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;
+ }
+resubmit:
+ kaweth_resubmit_int_urb(kaweth, GFP_ATOMIC);
+}
+
+static void kaweth_resubmit_tl(void *d)
+{
+ struct kaweth_device *kaweth = (struct kaweth_device *)d;
+
+ if (kaweth->status | KAWETH_STATUS_CLOSING)
+ return;
+
+ if (kaweth->suspend_lowmem_rx)
+ kaweth_resubmit_rx_urb(kaweth, GFP_NOIO);
+
+ if (kaweth->suspend_lowmem_ctrl)
+ kaweth_resubmit_int_urb(kaweth, GFP_NOIO);
+}
+
+
+/****************************************************************
+ * kaweth_resubmit_rx_urb
+ ****************************************************************/
+static int kaweth_resubmit_rx_urb(struct kaweth_device *kaweth,
+ int mem_flags)
+{
+ int result;
+
+ usb_fill_bulk_urb(kaweth->rx_urb,
+ kaweth->dev,
+ usb_rcvbulkpipe(kaweth->dev, 1),
+ kaweth->rx_buf,
+ KAWETH_BUF_SIZE,
+ kaweth_usb_receive,
+ kaweth);
+ kaweth->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+ kaweth->rx_urb->transfer_dma = kaweth->rxbufferhandle;
+
+ if((result = usb_submit_urb(kaweth->rx_urb, mem_flags))) {
+ if (result == -ENOMEM) {
+ kaweth->suspend_lowmem_rx = 1;
+ schedule_delayed_work(&kaweth->lowmem_work, HZ/4);
+ }
+ kaweth_err("resubmitting rx_urb %d failed", result);
+ } else {
+ kaweth->suspend_lowmem_rx = 0;
+ }
+
+ return result;
+}
+
+static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth);
+
+/****************************************************************
+ * kaweth_usb_receive
+ ****************************************************************/
+static void kaweth_usb_receive(struct urb *urb, struct pt_regs *regs)
+{
+ 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((__le16 *)kaweth->rx_buf);
+
+ struct sk_buff *skb;
+
+ if(unlikely(urb->status == -ECONNRESET || urb->status == -ESHUTDOWN))
+ /* 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, GFP_ATOMIC);
+ return;
+ }
+
+ if(kaweth->net && (count > 2)) {
+ if(pkt_len > (count - 2)) {
+ kaweth_err("Packet length too long for USB frame (pkt_len: %x, count: %x)",pkt_len, count);
+ kaweth_err("Packet len & 2047: %x", pkt_len & 2047);
+ kaweth_err("Count 2: %x", count2);
+ kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
+ return;
+ }
+
+ if(!(skb = dev_alloc_skb(pkt_len+2))) {
+ kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
+ 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;
+ }
+
+ kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
+}
+
+/****************************************************************
+ * kaweth_open
+ ****************************************************************/
+static int kaweth_open(struct net_device *net)
+{
+ struct kaweth_device *kaweth = netdev_priv(net);
+ int res;
+
+ kaweth_dbg("Opening network device.");
+
+ res = kaweth_resubmit_rx_urb(kaweth, GFP_KERNEL);
+ if (res)
+ return -EIO;
+
+ usb_fill_int_urb(
+ kaweth->irq_urb,
+ kaweth->dev,
+ usb_rcvintpipe(kaweth->dev, 3),
+ kaweth->intbuffer,
+ INTBUFFERSIZE,
+ int_callback,
+ kaweth,
+ 250); /* overriding the descriptor */
+ kaweth->irq_urb->transfer_dma = kaweth->intbufferhandle;
+ kaweth->irq_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ res = usb_submit_urb(kaweth->irq_urb, GFP_KERNEL);
+ if (res) {
+ usb_kill_urb(kaweth->rx_urb);
+ return -EIO;
+ }
+
+ netif_start_queue(net);
+
+ kaweth_async_set_rx_mode(kaweth);
+ return 0;
+}
+
+/****************************************************************
+ * kaweth_close
+ ****************************************************************/
+static int kaweth_close(struct net_device *net)
+{
+ struct kaweth_device *kaweth = netdev_priv(net);
+
+ netif_stop_queue(net);
+
+ kaweth->status |= KAWETH_STATUS_CLOSING;
+
+ usb_kill_urb(kaweth->irq_urb);
+ usb_kill_urb(kaweth->rx_urb);
+
+ flush_scheduled_work();
+
+ /* a scheduled work may have resubmitted,
+ we hit them again */
+ usb_kill_urb(kaweth->irq_urb);
+ usb_kill_urb(kaweth->rx_urb);
+
+ kaweth->status &= ~KAWETH_STATUS_CLOSING;
+
+ return 0;
+}
+
+static void kaweth_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
+{
+
+ strlcpy(info->driver, driver_name, sizeof(info->driver));
+}
+
+static struct ethtool_ops ops = {
+ .get_drvinfo = kaweth_get_drvinfo
+};
+
+/****************************************************************
+ * kaweth_usb_transmit_complete
+ ****************************************************************/
+static void kaweth_usb_transmit_complete(struct urb *urb, struct pt_regs *regs)
+{
+ struct kaweth_device *kaweth = urb->context;
+ struct sk_buff *skb = kaweth->tx_skb;
+
+ if (unlikely(urb->status != 0))
+ if (urb->status != -ENOENT)
+ kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
+
+ netif_wake_queue(kaweth->net);
+ dev_kfree_skb_irq(skb);
+}
+
+/****************************************************************
+ * kaweth_start_xmit
+ ****************************************************************/
+static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
+{
+ struct kaweth_device *kaweth = netdev_priv(net);
+ __le16 *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_irq(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_irq(skb);
+ skb = copied_skb;
+ if (!copied_skb) {
+ kaweth->stats.tx_errors++;
+ netif_start_queue(net);
+ spin_unlock(&kaweth->device_lock);
+ return 0;
+ }
+ }
+
+ private_header = (__le16 *)__skb_push(skb, 2);
+ *private_header = cpu_to_le16(skb->len-2);
+ kaweth->tx_skb = skb;
+
+ usb_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 |= URB_ASYNC_UNLINK;
+
+ if((res = usb_submit_urb(kaweth->tx_urb, GFP_ATOMIC)))
+ {
+ kaweth_warn("kaweth failed tx_urb %d", res);
+ kaweth->stats.tx_errors++;
+
+ netif_start_queue(net);
+ dev_kfree_skb_irq(skb);
+ }
+ else
+ {
+ kaweth->stats.tx_packets++;
+ kaweth->stats.tx_bytes += skb->len;
+ net->trans_start = jiffies;
+ }
+
+ spin_unlock(&kaweth->device_lock);
+
+ return 0;
+}
+
+/****************************************************************
+ * kaweth_set_rx_mode
+ ****************************************************************/
+static void kaweth_set_rx_mode(struct net_device *net)
+{
+ struct kaweth_device *kaweth = netdev_priv(net);
+
+ __u16 packet_filter_bitmap = KAWETH_PACKET_FILTER_DIRECTED |
+ KAWETH_PACKET_FILTER_BROADCAST |
+ KAWETH_PACKET_FILTER_MULTICAST;
+
+ kaweth_dbg("Setting Rx mode to %d", packet_filter_bitmap);
+
+ netif_stop_queue(net);
+
+ 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;
+ }
+
+ kaweth->packet_filter_bitmap = packet_filter_bitmap;
+ netif_wake_queue(net);
+}
+
+/****************************************************************
+ * kaweth_async_set_rx_mode
+ ****************************************************************/
+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;
+
+ {
+ int result;
+ result = kaweth_control(kaweth,
+ usb_sndctrlpipe(kaweth->dev, 0),
+ KAWETH_COMMAND_SET_PACKET_FILTER,
+ USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
+ packet_filter_bitmap,
+ 0,
+ (void *)&kaweth->scratch,
+ 0,
+ KAWETH_CONTROL_TIMEOUT);
+
+ if(result < 0) {
+ kaweth_err("Failed to set Rx mode: %d", result);
+ }
+ else {
+ kaweth_dbg("Set Rx mode to %d", packet_filter_bitmap);
+ }
+ }
+}
+
+/****************************************************************
+ * kaweth_netdev_stats
+ ****************************************************************/
+static struct net_device_stats *kaweth_netdev_stats(struct net_device *dev)
+{
+ struct kaweth_device *kaweth = netdev_priv(dev);
+ return &kaweth->stats;
+}
+
+/****************************************************************
+ * kaweth_tx_timeout
+ ****************************************************************/
+static void kaweth_tx_timeout(struct net_device *net)
+{
+ struct kaweth_device *kaweth = netdev_priv(net);
+
+ kaweth_warn("%s: Tx timed out. Resetting.", net->name);
+ kaweth->stats.tx_errors++;
+ net->trans_start = jiffies;
+
+ usb_unlink_urb(kaweth->tx_urb);
+}
+
+/****************************************************************
+ * kaweth_probe
+ ****************************************************************/
+static int kaweth_probe(
+ struct usb_interface *intf,
+ const struct usb_device_id *id /* from id_table */
+ )
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct kaweth_device *kaweth;
+ struct net_device *netdev;
+ const eth_addr_t bcast_addr = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+ int result = 0;
+
+ kaweth_dbg("Kawasaki Device Probe (Device number:%d): 0x%4.4x:0x%4.4x:0x%4.4x",
+ dev->devnum,
+ le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(dev->descriptor.idProduct),
+ le16_to_cpu(dev->descriptor.bcdDevice));
+
+ kaweth_dbg("Device at %p", dev);
+
+ kaweth_dbg("Descriptor length: %x type: %x",
+ (int)dev->descriptor.bLength,
+ (int)dev->descriptor.bDescriptorType);
+
+ netdev = alloc_etherdev(sizeof(*kaweth));
+ if (!netdev)
+ return -ENOMEM;
+
+ kaweth = netdev_priv(netdev);
+ kaweth->dev = dev;
+ kaweth->net = netdev;
+
+ spin_lock_init(&kaweth->device_lock);
+ init_waitqueue_head(&kaweth->term_wait);
+
+ kaweth_dbg("Resetting.");
+
+ kaweth_reset(kaweth);
+
+ /*
+ * If high byte of bcdDevice is nonzero, firmware is already
+ * downloaded. Don't try to do it again, or we'll hang the device.
+ */
+
+ if (le16_to_cpu(dev->descriptor.bcdDevice) >> 8) {
+ kaweth_info("Firmware present in device.");
+ } 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);
+ goto err_fw;
+ }
+
+ 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);
+ goto err_fw;
+ }
+
+ if ((result = kaweth_download_firmware(kaweth,
+ kaweth_trigger_code,
+ len_kaweth_trigger_code,
+ 126,
+ 2)) < 0) {
+ kaweth_err("Error downloading trigger code (%d)", result);
+ goto err_fw;
+
+ }
+
+ if ((result = kaweth_download_firmware(kaweth,
+ kaweth_trigger_code_fix,
+ len_kaweth_trigger_code_fix,
+ 126,
+ 3)) < 0) {
+ kaweth_err("Error downloading trigger code fix (%d)", result);
+ goto err_fw;
+ }
+
+
+ if ((result = kaweth_trigger_firmware(kaweth, 126)) < 0) {
+ kaweth_err("Error triggering firmware (%d)", result);
+ goto err_fw;
+ }
+
+ /* Device will now disappear for a moment... */
+ kaweth_info("Firmware loaded. I'll be back...");
+err_fw:
+ free_page((unsigned long)kaweth->firmware_buf);
+ free_netdev(netdev);
+ return -EIO;
+ }
+
+ result = kaweth_read_configuration(kaweth);
+
+ if(result < 0) {
+ kaweth_err("Error reading configuration (%d), no net device created", result);
+ goto err_free_netdev;
+ }
+
+ kaweth_info("Statistics collection: %x", kaweth->configuration.statistics_mask);
+ kaweth_info("Multicast filter limit: %x", kaweth->configuration.max_multicast_filters & ((1 << 15) - 1));
+ kaweth_info("MTU: %d", le16_to_cpu(kaweth->configuration.segment_size));
+ kaweth_info("Read MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x",
+ (int)kaweth->configuration.hw_addr[0],
+ (int)kaweth->configuration.hw_addr[1],
+ (int)kaweth->configuration.hw_addr[2],
+ (int)kaweth->configuration.hw_addr[3],
+ (int)kaweth->configuration.hw_addr[4],
+ (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");
+ goto err_free_netdev;
+ }
+
+ if(kaweth_set_urb_size(kaweth, KAWETH_BUF_SIZE) < 0) {
+ kaweth_dbg("Error setting URB size");
+ goto err_free_netdev;
+ }
+
+ if(kaweth_set_sofs_wait(kaweth, KAWETH_SOFS_TO_WAIT) < 0) {
+ kaweth_err("Error setting SOFS wait");
+ goto err_free_netdev;
+ }
+
+ result = kaweth_set_receive_filter(kaweth,
+ KAWETH_PACKET_FILTER_DIRECTED |
+ KAWETH_PACKET_FILTER_BROADCAST |
+ KAWETH_PACKET_FILTER_MULTICAST);
+
+ if(result < 0) {
+ kaweth_err("Error setting receive filter");
+ goto err_free_netdev;
+ }
+
+ kaweth_dbg("Initializing net device.");
+
+ kaweth->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!kaweth->tx_urb)
+ goto err_free_netdev;
+ kaweth->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!kaweth->rx_urb)
+ goto err_only_tx;
+ kaweth->irq_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!kaweth->irq_urb)
+ goto err_tx_and_rx;
+
+ kaweth->intbuffer = usb_buffer_alloc( kaweth->dev,
+ INTBUFFERSIZE,
+ GFP_KERNEL,
+ &kaweth->intbufferhandle);
+ if (!kaweth->intbuffer)
+ goto err_tx_and_rx_and_irq;
+ kaweth->rx_buf = usb_buffer_alloc( kaweth->dev,
+ KAWETH_BUF_SIZE,
+ GFP_KERNEL,
+ &kaweth->rxbufferhandle);
+ if (!kaweth->rx_buf)
+ goto err_all_but_rxbuf;
+
+ memcpy(netdev->broadcast, &bcast_addr, sizeof(bcast_addr));
+ memcpy(netdev->dev_addr, &kaweth->configuration.hw_addr,
+ sizeof(kaweth->configuration.hw_addr));
+
+ netdev->open = kaweth_open;
+ netdev->stop = kaweth_close;
+
+ netdev->watchdog_timeo = KAWETH_TX_TIMEOUT;
+ netdev->tx_timeout = kaweth_tx_timeout;
+
+ netdev->hard_start_xmit = kaweth_start_xmit;
+ netdev->set_multicast_list = kaweth_set_rx_mode;
+ netdev->get_stats = kaweth_netdev_stats;
+ netdev->mtu = le16_to_cpu(kaweth->configuration.segment_size);
+ SET_ETHTOOL_OPS(netdev, &ops);
+
+ /* kaweth is zeroed as part of alloc_netdev */
+
+ INIT_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl, (void *)kaweth);
+
+ SET_MODULE_OWNER(netdev);
+
+ usb_set_intfdata(intf, kaweth);
+
+#if 0
+// dma_supported() is deeply broken on almost all architectures
+ if (dma_supported (&intf->dev, 0xffffffffffffffffULL))
+ kaweth->net->features |= NETIF_F_HIGHDMA;
+#endif
+
+ SET_NETDEV_DEV(netdev, &intf->dev);
+ if (register_netdev(netdev) != 0) {
+ kaweth_err("Error registering netdev.");
+ goto err_intfdata;
+ }
+
+ kaweth_info("kaweth interface created at %s", kaweth->net->name);
+
+ kaweth_dbg("Kaweth probe returning.");
+
+ return 0;
+
+err_intfdata:
+ usb_set_intfdata(intf, NULL);
+ usb_buffer_free(kaweth->dev, KAWETH_BUF_SIZE, (void *)kaweth->rx_buf, kaweth->rxbufferhandle);
+err_all_but_rxbuf:
+ usb_buffer_free(kaweth->dev, INTBUFFERSIZE, (void *)kaweth->intbuffer, kaweth->intbufferhandle);
+err_tx_and_rx_and_irq:
+ usb_free_urb(kaweth->irq_urb);
+err_tx_and_rx:
+ usb_free_urb(kaweth->rx_urb);
+err_only_tx:
+ usb_free_urb(kaweth->tx_urb);
+err_free_netdev:
+ free_netdev(netdev);
+
+ return -EIO;
+}
+
+/****************************************************************
+ * kaweth_disconnect
+ ****************************************************************/
+static void kaweth_disconnect(struct usb_interface *intf)
+{
+ struct kaweth_device *kaweth = usb_get_intfdata(intf);
+ struct net_device *netdev;
+
+ kaweth_info("Unregistering");
+
+ usb_set_intfdata(intf, NULL);
+ if (!kaweth) {
+ kaweth_warn("unregistering non-existant device");
+ return;
+ }
+ netdev = kaweth->net;
+ kaweth->removed = 1;
+ usb_kill_urb(kaweth->irq_urb);
+ usb_kill_urb(kaweth->rx_urb);
+ usb_kill_urb(kaweth->tx_urb);
+
+ kaweth_dbg("Unregistering net device");
+ unregister_netdev(netdev);
+
+ usb_free_urb(kaweth->rx_urb);
+ usb_free_urb(kaweth->tx_urb);
+ usb_free_urb(kaweth->irq_urb);
+
+ usb_buffer_free(kaweth->dev, KAWETH_BUF_SIZE, (void *)kaweth->rx_buf, kaweth->rxbufferhandle);
+ usb_buffer_free(kaweth->dev, INTBUFFERSIZE, (void *)kaweth->intbuffer, kaweth->intbufferhandle);
+
+ free_netdev(netdev);
+}
+
+
+// FIXME this completion stuff is a modified clone of
+// an OLD version of some stuff in usb.c ...
+struct usb_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 pt_regs *regs)
+{
+ struct usb_api_data *awd = (struct usb_api_data *)urb->context;
+
+ awd->done=1;
+ wake_up(&awd->wqh);
+}
+
+/*-------------------------------------------------------------------*
+ * COMPATIBILITY STUFF *
+ *-------------------------------------------------------------------*/
+
+// Starts urb and waits for completion or timeout
+static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
+{
+ struct usb_api_data awd;
+ int status;
+
+ init_waitqueue_head(&awd.wqh);
+ awd.done = 0;
+
+ urb->context = &awd;
+ status = usb_submit_urb(urb, GFP_NOIO);
+ if (status) {
+ // something went wrong
+ usb_free_urb(urb);
+ return status;
+ }
+
+ if (!wait_event_timeout(awd.wqh, awd.done, timeout)) {
+ // timeout
+ kaweth_warn("usb_control/bulk_msg: timeout");
+ usb_kill_urb(urb); // remove urb safely
+ status = -ETIMEDOUT;
+ }
+ else {
+ status = urb->status;
+ }
+
+ if (actual_length) {
+ *actual_length = urb->actual_length;
+ }
+
+ usb_free_urb(urb);
+ return status;
+}
+
+/*-------------------------------------------------------------------*/
+// returns status (negative) or length (positive)
+static 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;
+
+ urb = usb_alloc_urb(0, GFP_NOIO);
+ if (!urb)
+ return -ENOMEM;
+
+ usb_fill_control_urb(urb, usb_dev, pipe, (unsigned char*)cmd, data,
+ len, usb_api_blocking_completion, NULL);
+
+ retv = usb_start_wait_urb(urb, timeout, &length);
+ if (retv < 0) {
+ return retv;
+ }
+ else {
+ return length;
+ }
+}
+
+
+/****************************************************************
+ * kaweth_init
+ ****************************************************************/
+static int __init kaweth_init(void)
+{
+ kaweth_dbg("Driver loading");
+ return usb_register(&kaweth_driver);
+}
+
+/****************************************************************
+ * kaweth_exit
+ ****************************************************************/
+static void __exit kaweth_exit(void)
+{
+ usb_deregister(&kaweth_driver);
+}
+
+module_init(kaweth_init);
+module_exit(kaweth_exit);
+
+
+
+
+
+
+
+
+
diff --git a/drivers/usb/net/kawethfw.h b/drivers/usb/net/kawethfw.h
new file mode 100644
index 000000000000..cf85fcb0d1a6
--- /dev/null
+++ b/drivers/usb/net/kawethfw.h
@@ -0,0 +1,557 @@
+/******************************************/
+/* NOTE: B6/C3 is data header signature */
+/* 0xAA/0xBB is data length = total */
+/* bytes - 7, 0xCC is type, 0xDD is */
+/* interrupt to use. */
+/******************************************/
+
+/****************************************************************
+ * kaweth_trigger_code
+ ****************************************************************/
+static __u8 kaweth_trigger_code[] =
+{
+ 0xB6, 0xC3, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xc8, 0x07, 0xa0, 0x00, 0xf0, 0x07, 0x5e, 0x00,
+ 0x06, 0x00, 0xf0, 0x07, 0x0a, 0x00, 0x08, 0x00,
+ 0xf0, 0x09, 0x00, 0x00, 0x02, 0x00, 0xe7, 0x07,
+ 0x36, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00,
+ 0x04, 0x00, 0xe7, 0x07, 0x50, 0xc3, 0x10, 0xc0,
+ 0xf0, 0x09, 0x0e, 0xc0, 0x00, 0x00, 0xe7, 0x87,
+ 0x01, 0x00, 0x0e, 0xc0, 0x97, 0xcf, 0xd7, 0x09,
+ 0x00, 0xc0, 0x17, 0x02, 0xc8, 0x07, 0xa0, 0x00,
+ 0xe7, 0x17, 0x50, 0xc3, 0x10, 0xc0, 0x30, 0xd8,
+ 0x04, 0x00, 0x30, 0x5c, 0x08, 0x00, 0x04, 0x00,
+ 0xb0, 0xc0, 0x06, 0x00, 0xc8, 0x05, 0xe7, 0x05,
+ 0x00, 0xc0, 0xc0, 0xdf, 0x97, 0xcf, 0x49, 0xaf,
+ 0xc0, 0x07, 0x00, 0x00, 0x60, 0xaf, 0x4a, 0xaf,
+ 0x00, 0x0c, 0x0c, 0x00, 0x40, 0xd2, 0x00, 0x1c,
+ 0x0c, 0x00, 0x40, 0xd2, 0x30, 0x00, 0x08, 0x00,
+ 0xf0, 0x07, 0x00, 0x00, 0x04, 0x00, 0xf0, 0x07,
+ 0x86, 0x00, 0x06, 0x00, 0x67, 0xcf, 0x27, 0x0c,
+ 0x02, 0x00, 0x00, 0x00, 0x27, 0x0c, 0x00, 0x00,
+ 0x0e, 0xc0, 0x49, 0xaf, 0x64, 0xaf, 0xc0, 0x07,
+ 0x00, 0x00, 0x4b, 0xaf, 0x4a, 0xaf, 0x5a, 0xcf,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x94, 0x00, 0x05, 0x00,
+ 0x00, 0x00
+};
+/****************************************************************
+ * kaweth_trigger_code_fix
+ ****************************************************************/
+static __u8 kaweth_trigger_code_fix[] =
+{
+ 0xB6, 0xC3, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0x02, 0x00, 0x06, 0x00, 0x18, 0x00, 0x3e, 0x00,
+ 0x80, 0x00, 0x98, 0x00, 0xaa, 0x00,
+ 0x00, 0x00
+};
+
+/****************************************************************
+ * kaweth_new_code
+ ****************************************************************/
+static __u8 kaweth_new_code[] =
+{
+ 0xB6, 0xC3, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0x9f, 0xcf, 0xde, 0x06, 0xe7, 0x57, 0x00, 0x00,
+ 0xc4, 0x06, 0x97, 0xc1, 0xe7, 0x67, 0xff, 0x1f,
+ 0x28, 0xc0, 0xe7, 0x87, 0x00, 0x04, 0x24, 0xc0,
+ 0xe7, 0x67, 0xff, 0xf9, 0x22, 0xc0, 0x97, 0xcf,
+ 0xd7, 0x09, 0x00, 0xc0, 0xe7, 0x09, 0xa2, 0xc0,
+ 0xbe, 0x06, 0x9f, 0xaf, 0x36, 0x00, 0xe7, 0x05,
+ 0x00, 0xc0, 0xa7, 0xcf, 0xbc, 0x06, 0x97, 0xcf,
+ 0xe7, 0x57, 0x00, 0x00, 0xb8, 0x06, 0xa7, 0xa1,
+ 0xb8, 0x06, 0x97, 0xcf, 0xe7, 0x57, 0x00, 0x00,
+ 0x14, 0x08, 0x0a, 0xc0, 0xe7, 0x57, 0x00, 0x00,
+ 0xa4, 0xc0, 0xa7, 0xc0, 0x7a, 0x06, 0x9f, 0xaf,
+ 0x92, 0x07, 0xe7, 0x07, 0x00, 0x00, 0x14, 0x08,
+ 0xe7, 0x57, 0xff, 0xff, 0xba, 0x06, 0x9f, 0xa0,
+ 0x38, 0x00, 0xe7, 0x59, 0xba, 0x06, 0xbe, 0x06,
+ 0x9f, 0xa0, 0x38, 0x00, 0xc8, 0x09, 0xca, 0x06,
+ 0x08, 0x62, 0x9f, 0xa1, 0x36, 0x08, 0xc0, 0x09,
+ 0x76, 0x06, 0x00, 0x60, 0xa7, 0xc0, 0x7a, 0x06,
+ 0x9f, 0xaf, 0xcc, 0x02, 0xe7, 0x57, 0x00, 0x00,
+ 0xb8, 0x06, 0xa7, 0xc1, 0x7a, 0x06, 0x9f, 0xaf,
+ 0x04, 0x00, 0xe7, 0x57, 0x00, 0x00, 0x8e, 0x06,
+ 0x0a, 0xc1, 0xe7, 0x09, 0x20, 0xc0, 0x10, 0x08,
+ 0xe7, 0xd0, 0x10, 0x08, 0xe7, 0x67, 0x40, 0x00,
+ 0x10, 0x08, 0x9f, 0xaf, 0x92, 0x0c, 0xc0, 0x09,
+ 0xd0, 0x06, 0x00, 0x60, 0x05, 0xc4, 0xc0, 0x59,
+ 0xbe, 0x06, 0x02, 0xc0, 0x9f, 0xaf, 0xec, 0x00,
+ 0x9f, 0xaf, 0x34, 0x02, 0xe7, 0x57, 0x00, 0x00,
+ 0xa6, 0x06, 0x9f, 0xa0, 0x7a, 0x02, 0xa7, 0xcf,
+ 0x7a, 0x06, 0x48, 0x02, 0xe7, 0x09, 0xbe, 0x06,
+ 0xd0, 0x06, 0xc8, 0x37, 0x04, 0x00, 0x9f, 0xaf,
+ 0x08, 0x03, 0x97, 0xcf, 0xe7, 0x57, 0x00, 0x00,
+ 0xce, 0x06, 0x97, 0xc0, 0xd7, 0x09, 0x00, 0xc0,
+ 0xc1, 0xdf, 0xc8, 0x09, 0xc6, 0x06, 0x08, 0x62,
+ 0x14, 0xc0, 0x27, 0x04, 0xc6, 0x06, 0x10, 0x94,
+ 0xf0, 0x07, 0x10, 0x08, 0x02, 0x00, 0xc1, 0x07,
+ 0x01, 0x00, 0x70, 0x00, 0x04, 0x00, 0xf0, 0x07,
+ 0x30, 0x01, 0x06, 0x00, 0x50, 0xaf, 0xe7, 0x07,
+ 0xff, 0xff, 0xd0, 0x06, 0xe7, 0x07, 0x00, 0x00,
+ 0xce, 0x06, 0xe7, 0x05, 0x00, 0xc0, 0x97, 0xcf,
+ 0xd7, 0x09, 0x00, 0xc0, 0xc1, 0xdf, 0x48, 0x02,
+ 0xd0, 0x09, 0xc6, 0x06, 0x27, 0x02, 0xc6, 0x06,
+ 0xe7, 0x05, 0x00, 0xc0, 0x97, 0xcf, 0x48, 0x02,
+ 0xc8, 0x37, 0x04, 0x00, 0x00, 0x0c, 0x0c, 0x00,
+ 0x00, 0x60, 0x21, 0xc0, 0xc0, 0x37, 0x3e, 0x00,
+ 0x23, 0xc9, 0xc0, 0x57, 0xb4, 0x05, 0x1b, 0xc8,
+ 0xc0, 0x17, 0x3f, 0x00, 0xc0, 0x67, 0xc0, 0xff,
+ 0x30, 0x00, 0x08, 0x00, 0xf0, 0x07, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x02, 0xc0, 0x17, 0x4c, 0x00,
+ 0x30, 0x00, 0x06, 0x00, 0xf0, 0x07, 0xa0, 0x01,
+ 0x0a, 0x00, 0x48, 0x02, 0xc1, 0x07, 0x02, 0x00,
+ 0xd7, 0x09, 0x00, 0xc0, 0xc1, 0xdf, 0x51, 0xaf,
+ 0xe7, 0x05, 0x00, 0xc0, 0x97, 0xcf, 0x9f, 0xaf,
+ 0x08, 0x03, 0x9f, 0xaf, 0x7a, 0x02, 0x97, 0xcf,
+ 0x9f, 0xaf, 0x7a, 0x02, 0xc9, 0x37, 0x04, 0x00,
+ 0xc1, 0xdf, 0xc8, 0x09, 0xa2, 0x06, 0x50, 0x02,
+ 0x67, 0x02, 0xa2, 0x06, 0xd1, 0x07, 0x00, 0x00,
+ 0x27, 0xd8, 0xaa, 0x06, 0xc0, 0xdf, 0x9f, 0xaf,
+ 0xc4, 0x01, 0x97, 0xcf, 0xe7, 0x57, 0x00, 0x00,
+ 0xd2, 0x06, 0x97, 0xc1, 0xe7, 0x57, 0x01, 0x00,
+ 0xa8, 0x06, 0x97, 0xc0, 0xc8, 0x09, 0xa0, 0x06,
+ 0x08, 0x62, 0x97, 0xc0, 0x00, 0x02, 0xc0, 0x17,
+ 0x0e, 0x00, 0x27, 0x00, 0x34, 0x01, 0x27, 0x0c,
+ 0x0c, 0x00, 0x36, 0x01, 0xe7, 0x07, 0x50, 0xc3,
+ 0x12, 0xc0, 0xe7, 0x07, 0xcc, 0x0b, 0x02, 0x00,
+ 0xe7, 0x07, 0x01, 0x00, 0xa8, 0x06, 0xe7, 0x07,
+ 0x05, 0x00, 0x90, 0xc0, 0x97, 0xcf, 0xc8, 0x09,
+ 0xa4, 0x06, 0x08, 0x62, 0x02, 0xc0, 0x10, 0x64,
+ 0x07, 0xc1, 0xe7, 0x07, 0x00, 0x00, 0x9e, 0x06,
+ 0xe7, 0x07, 0x72, 0x04, 0x24, 0x00, 0x97, 0xcf,
+ 0x27, 0x04, 0xa4, 0x06, 0xc8, 0x17, 0x0e, 0x00,
+ 0x27, 0x02, 0x9e, 0x06, 0xe7, 0x07, 0x80, 0x04,
+ 0x24, 0x00, 0x97, 0xcf, 0xd7, 0x09, 0x00, 0xc0,
+ 0xc1, 0xdf, 0xe7, 0x57, 0x00, 0x00, 0x90, 0x06,
+ 0x13, 0xc1, 0x9f, 0xaf, 0x06, 0x02, 0xe7, 0x57,
+ 0x00, 0x00, 0x9e, 0x06, 0x13, 0xc0, 0xe7, 0x09,
+ 0x9e, 0x06, 0x30, 0x01, 0xe7, 0x07, 0xf2, 0x05,
+ 0x32, 0x01, 0xe7, 0x07, 0x10, 0x00, 0x96, 0xc0,
+ 0xe7, 0x09, 0x9e, 0x06, 0x90, 0x06, 0x04, 0xcf,
+ 0xe7, 0x57, 0x00, 0x00, 0x9e, 0x06, 0x02, 0xc1,
+ 0x9f, 0xaf, 0x06, 0x02, 0xe7, 0x05, 0x00, 0xc0,
+ 0x97, 0xcf, 0xd7, 0x09, 0x00, 0xc0, 0xc1, 0xdf,
+ 0x08, 0x92, 0xe7, 0x57, 0x02, 0x00, 0xaa, 0x06,
+ 0x02, 0xc3, 0xc8, 0x09, 0xa4, 0x06, 0x27, 0x02,
+ 0xa6, 0x06, 0x08, 0x62, 0x03, 0xc1, 0xe7, 0x05,
+ 0x00, 0xc0, 0x97, 0xcf, 0x27, 0x04, 0xa4, 0x06,
+ 0xe7, 0x05, 0x00, 0xc0, 0xf0, 0x07, 0x40, 0x00,
+ 0x08, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x04, 0x00,
+ 0x00, 0x02, 0xc0, 0x17, 0x0c, 0x00, 0x30, 0x00,
+ 0x06, 0x00, 0xf0, 0x07, 0x46, 0x01, 0x0a, 0x00,
+ 0xc8, 0x17, 0x04, 0x00, 0xc1, 0x07, 0x02, 0x00,
+ 0x51, 0xaf, 0x97, 0xcf, 0xe7, 0x57, 0x00, 0x00,
+ 0x96, 0x06, 0x97, 0xc0, 0xc1, 0xdf, 0xc8, 0x09,
+ 0x96, 0x06, 0x27, 0x04, 0x96, 0x06, 0x27, 0x52,
+ 0x98, 0x06, 0x03, 0xc1, 0xe7, 0x07, 0x96, 0x06,
+ 0x98, 0x06, 0xc0, 0xdf, 0x17, 0x02, 0xc8, 0x17,
+ 0x0e, 0x00, 0x9f, 0xaf, 0xba, 0x03, 0xc8, 0x05,
+ 0x00, 0x60, 0x03, 0xc0, 0x9f, 0xaf, 0x24, 0x03,
+ 0x97, 0xcf, 0x9f, 0xaf, 0x08, 0x03, 0x97, 0xcf,
+ 0x57, 0x02, 0xc9, 0x07, 0xa4, 0x06, 0xd7, 0x09,
+ 0x00, 0xc0, 0xc1, 0xdf, 0x08, 0x62, 0x1b, 0xc0,
+ 0x50, 0x04, 0x11, 0x02, 0xe7, 0x05, 0x00, 0xc0,
+ 0xc9, 0x05, 0x97, 0xcf, 0x97, 0x02, 0xca, 0x09,
+ 0xd6, 0x06, 0xf2, 0x17, 0x01, 0x00, 0x04, 0x00,
+ 0xf2, 0x27, 0x00, 0x00, 0x06, 0x00, 0xca, 0x17,
+ 0x2c, 0x00, 0xf8, 0x77, 0x01, 0x00, 0x0e, 0x00,
+ 0x06, 0xc0, 0xca, 0xd9, 0xf8, 0x57, 0xff, 0x00,
+ 0x0e, 0x00, 0x01, 0xc1, 0xca, 0xd9, 0x22, 0x1c,
+ 0x0c, 0x00, 0xe2, 0x27, 0x00, 0x00, 0xe2, 0x17,
+ 0x01, 0x00, 0xe2, 0x27, 0x00, 0x00, 0xca, 0x05,
+ 0x00, 0x0c, 0x0c, 0x00, 0xc0, 0x17, 0x41, 0x00,
+ 0xc0, 0x67, 0xc0, 0xff, 0x30, 0x00, 0x08, 0x00,
+ 0x00, 0x02, 0xc0, 0x17, 0x0c, 0x00, 0x30, 0x00,
+ 0x06, 0x00, 0xf0, 0x07, 0xda, 0x00, 0x0a, 0x00,
+ 0xf0, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0c,
+ 0x08, 0x00, 0x40, 0xd1, 0x01, 0x00, 0xc0, 0x19,
+ 0xce, 0x06, 0xc0, 0x59, 0xc2, 0x06, 0x04, 0xc9,
+ 0x49, 0xaf, 0x9f, 0xaf, 0xec, 0x00, 0x4a, 0xaf,
+ 0x67, 0x10, 0xce, 0x06, 0xc8, 0x17, 0x04, 0x00,
+ 0xc1, 0x07, 0x01, 0x00, 0xd7, 0x09, 0x00, 0xc0,
+ 0xc1, 0xdf, 0x50, 0xaf, 0xe7, 0x05, 0x00, 0xc0,
+ 0x97, 0xcf, 0xc0, 0x07, 0x01, 0x00, 0xc1, 0x09,
+ 0xac, 0x06, 0xc1, 0x77, 0x01, 0x00, 0x97, 0xc1,
+ 0xd8, 0x77, 0x01, 0x00, 0x12, 0xc0, 0xc9, 0x07,
+ 0x6a, 0x06, 0x9f, 0xaf, 0x08, 0x04, 0x04, 0xc1,
+ 0xc1, 0x77, 0x08, 0x00, 0x13, 0xc0, 0x97, 0xcf,
+ 0xc1, 0x77, 0x02, 0x00, 0x97, 0xc1, 0xc1, 0x77,
+ 0x10, 0x00, 0x0c, 0xc0, 0x9f, 0xaf, 0x2c, 0x04,
+ 0x97, 0xcf, 0xc1, 0x77, 0x04, 0x00, 0x06, 0xc0,
+ 0xc9, 0x07, 0x70, 0x06, 0x9f, 0xaf, 0x08, 0x04,
+ 0x97, 0xc0, 0x00, 0xcf, 0x00, 0x90, 0x97, 0xcf,
+ 0x50, 0x54, 0x97, 0xc1, 0x70, 0x5c, 0x02, 0x00,
+ 0x02, 0x00, 0x97, 0xc1, 0x70, 0x5c, 0x04, 0x00,
+ 0x04, 0x00, 0x97, 0xcf, 0x80, 0x01, 0xc0, 0x00,
+ 0x60, 0x00, 0x30, 0x00, 0x18, 0x00, 0x0c, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0xcb, 0x09, 0xb2, 0x06,
+ 0xcc, 0x09, 0xb4, 0x06, 0x0b, 0x53, 0x11, 0xc0,
+ 0xc9, 0x02, 0xca, 0x07, 0x1c, 0x04, 0x9f, 0xaf,
+ 0x08, 0x04, 0x97, 0xc0, 0x0a, 0xc8, 0x82, 0x08,
+ 0x0a, 0xcf, 0x82, 0x08, 0x9f, 0xaf, 0x08, 0x04,
+ 0x97, 0xc0, 0x05, 0xc2, 0x89, 0x30, 0x82, 0x60,
+ 0x78, 0xc1, 0x00, 0x90, 0x97, 0xcf, 0x89, 0x10,
+ 0x09, 0x53, 0x79, 0xc2, 0x89, 0x30, 0x82, 0x08,
+ 0x7a, 0xcf, 0xc0, 0xdf, 0x97, 0xcf, 0xc0, 0xdf,
+ 0x97, 0xcf, 0xe7, 0x09, 0x96, 0xc0, 0x92, 0x06,
+ 0xe7, 0x09, 0x98, 0xc0, 0x94, 0x06, 0x0f, 0xcf,
+ 0xe7, 0x09, 0x96, 0xc0, 0x92, 0x06, 0xe7, 0x09,
+ 0x98, 0xc0, 0x94, 0x06, 0xe7, 0x09, 0x9e, 0x06,
+ 0x30, 0x01, 0xe7, 0x07, 0xf2, 0x05, 0x32, 0x01,
+ 0xe7, 0x07, 0x10, 0x00, 0x96, 0xc0, 0xd7, 0x09,
+ 0x00, 0xc0, 0x17, 0x02, 0xc8, 0x09, 0x90, 0x06,
+ 0xc8, 0x37, 0x0e, 0x00, 0xe7, 0x77, 0x2a, 0x00,
+ 0x92, 0x06, 0x30, 0xc0, 0x97, 0x02, 0xca, 0x09,
+ 0xd6, 0x06, 0xe7, 0x77, 0x20, 0x00, 0x92, 0x06,
+ 0x0e, 0xc0, 0xf2, 0x17, 0x01, 0x00, 0x10, 0x00,
+ 0xf2, 0x27, 0x00, 0x00, 0x12, 0x00, 0xe7, 0x77,
+ 0x0a, 0x00, 0x92, 0x06, 0xca, 0x05, 0x1e, 0xc0,
+ 0x97, 0x02, 0xca, 0x09, 0xd6, 0x06, 0xf2, 0x17,
+ 0x01, 0x00, 0x0c, 0x00, 0xf2, 0x27, 0x00, 0x00,
+ 0x0e, 0x00, 0xe7, 0x77, 0x02, 0x00, 0x92, 0x06,
+ 0x07, 0xc0, 0xf2, 0x17, 0x01, 0x00, 0x44, 0x00,
+ 0xf2, 0x27, 0x00, 0x00, 0x46, 0x00, 0x06, 0xcf,
+ 0xf2, 0x17, 0x01, 0x00, 0x60, 0x00, 0xf2, 0x27,
+ 0x00, 0x00, 0x62, 0x00, 0xca, 0x05, 0x9f, 0xaf,
+ 0x08, 0x03, 0x0f, 0xcf, 0x57, 0x02, 0x09, 0x02,
+ 0xf1, 0x09, 0x94, 0x06, 0x0c, 0x00, 0xf1, 0xda,
+ 0x0c, 0x00, 0xc8, 0x09, 0x98, 0x06, 0x50, 0x02,
+ 0x67, 0x02, 0x98, 0x06, 0xd1, 0x07, 0x00, 0x00,
+ 0xc9, 0x05, 0xe7, 0x09, 0x9e, 0x06, 0x90, 0x06,
+ 0xe7, 0x57, 0x00, 0x00, 0x90, 0x06, 0x02, 0xc0,
+ 0x9f, 0xaf, 0x06, 0x02, 0xc8, 0x05, 0xe7, 0x05,
+ 0x00, 0xc0, 0xc0, 0xdf, 0x97, 0xcf, 0xd7, 0x09,
+ 0x00, 0xc0, 0x17, 0x00, 0x17, 0x02, 0x97, 0x02,
+ 0xc0, 0x09, 0x92, 0xc0, 0xe7, 0x07, 0x04, 0x00,
+ 0x90, 0xc0, 0xca, 0x09, 0xd6, 0x06, 0xe7, 0x07,
+ 0x00, 0x00, 0xa8, 0x06, 0xe7, 0x07, 0x6a, 0x04,
+ 0x02, 0x00, 0xc0, 0x77, 0x02, 0x00, 0x08, 0xc0,
+ 0xf2, 0x17, 0x01, 0x00, 0x50, 0x00, 0xf2, 0x27,
+ 0x00, 0x00, 0x52, 0x00, 0x9f, 0xcf, 0x24, 0x06,
+ 0xc0, 0x77, 0x10, 0x00, 0x06, 0xc0, 0xf2, 0x17,
+ 0x01, 0x00, 0x58, 0x00, 0xf2, 0x27, 0x00, 0x00,
+ 0x5a, 0x00, 0xc0, 0x77, 0x80, 0x00, 0x06, 0xc0,
+ 0xf2, 0x17, 0x01, 0x00, 0x70, 0x00, 0xf2, 0x27,
+ 0x00, 0x00, 0x72, 0x00, 0xc0, 0x77, 0x08, 0x00,
+ 0x1d, 0xc1, 0xf2, 0x17, 0x01, 0x00, 0x08, 0x00,
+ 0xf2, 0x27, 0x00, 0x00, 0x0a, 0x00, 0xc0, 0x77,
+ 0x00, 0x02, 0x06, 0xc0, 0xf2, 0x17, 0x01, 0x00,
+ 0x64, 0x00, 0xf2, 0x27, 0x00, 0x00, 0x66, 0x00,
+ 0xc0, 0x77, 0x40, 0x00, 0x06, 0xc0, 0xf2, 0x17,
+ 0x01, 0x00, 0x5c, 0x00, 0xf2, 0x27, 0x00, 0x00,
+ 0x5e, 0x00, 0xc0, 0x77, 0x01, 0x00, 0x01, 0xc0,
+ 0x1b, 0xcf, 0x1a, 0xcf, 0xf2, 0x17, 0x01, 0x00,
+ 0x00, 0x00, 0xf2, 0x27, 0x00, 0x00, 0x02, 0x00,
+ 0xc8, 0x09, 0x34, 0x01, 0xca, 0x17, 0x14, 0x00,
+ 0xd8, 0x77, 0x01, 0x00, 0x05, 0xc0, 0xca, 0xd9,
+ 0xd8, 0x57, 0xff, 0x00, 0x01, 0xc0, 0xca, 0xd9,
+ 0xe2, 0x19, 0x94, 0xc0, 0xe2, 0x27, 0x00, 0x00,
+ 0xe2, 0x17, 0x01, 0x00, 0xe2, 0x27, 0x00, 0x00,
+ 0x9f, 0xaf, 0x40, 0x06, 0x9f, 0xaf, 0xc4, 0x01,
+ 0xe7, 0x57, 0x00, 0x00, 0xd2, 0x06, 0x9f, 0xa1,
+ 0x0e, 0x0a, 0xca, 0x05, 0xc8, 0x05, 0xc0, 0x05,
+ 0xe7, 0x05, 0x00, 0xc0, 0xc0, 0xdf, 0x97, 0xcf,
+ 0xc8, 0x09, 0xa0, 0x06, 0x08, 0x62, 0x97, 0xc0,
+ 0x27, 0x04, 0xa0, 0x06, 0x27, 0x52, 0xa2, 0x06,
+ 0x03, 0xc1, 0xe7, 0x07, 0xa0, 0x06, 0xa2, 0x06,
+ 0x9f, 0xaf, 0x08, 0x03, 0xe7, 0x57, 0x00, 0x00,
+ 0xaa, 0x06, 0x02, 0xc0, 0x27, 0xda, 0xaa, 0x06,
+ 0x97, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xfb, 0x13, 0xe7, 0x57,
+ 0x00, 0x80, 0xb2, 0x00, 0x06, 0xc2, 0xe7, 0x07,
+ 0xee, 0x0b, 0x12, 0x00, 0xe7, 0x07, 0x34, 0x0c,
+ 0xb2, 0x00, 0xe7, 0x07, 0xc6, 0x07, 0xf2, 0x02,
+ 0xc8, 0x09, 0xb4, 0x00, 0xf8, 0x07, 0x02, 0x00,
+ 0x0d, 0x00, 0xd7, 0x09, 0x0e, 0xc0, 0xe7, 0x07,
+ 0x00, 0x00, 0x0e, 0xc0, 0xc8, 0x09, 0xde, 0x00,
+ 0xc8, 0x17, 0x09, 0x00, 0xc9, 0x07, 0xda, 0x06,
+ 0xc0, 0x07, 0x04, 0x00, 0x68, 0x0a, 0x00, 0xda,
+ 0x7d, 0xc1, 0xe7, 0x09, 0xc0, 0x00, 0x7c, 0x06,
+ 0xe7, 0x09, 0xbe, 0x00, 0x78, 0x06, 0xe7, 0x09,
+ 0x10, 0x00, 0xbc, 0x06, 0xc8, 0x07, 0xd6, 0x07,
+ 0x9f, 0xaf, 0xae, 0x07, 0x9f, 0xaf, 0x00, 0x0a,
+ 0xc8, 0x09, 0xde, 0x00, 0x00, 0x0e, 0x0f, 0x00,
+ 0x41, 0x90, 0x9f, 0xde, 0x06, 0x00, 0x44, 0xaf,
+ 0x27, 0x00, 0xb2, 0x06, 0x27, 0x00, 0xb4, 0x06,
+ 0x27, 0x00, 0xb6, 0x06, 0xc0, 0x07, 0x74, 0x00,
+ 0x44, 0xaf, 0x27, 0x00, 0xd6, 0x06, 0x08, 0x00,
+ 0x00, 0x90, 0xc1, 0x07, 0x3a, 0x00, 0x20, 0x00,
+ 0x01, 0xda, 0x7d, 0xc1, 0x9f, 0xaf, 0xba, 0x09,
+ 0xc0, 0x07, 0x44, 0x00, 0x48, 0xaf, 0x27, 0x00,
+ 0x7a, 0x06, 0x9f, 0xaf, 0x96, 0x0a, 0xe7, 0x07,
+ 0x01, 0x00, 0xc0, 0x06, 0xe7, 0x05, 0x0e, 0xc0,
+ 0x97, 0xcf, 0x49, 0xaf, 0xe7, 0x87, 0x43, 0x00,
+ 0x0e, 0xc0, 0xe7, 0x07, 0xff, 0xff, 0xbe, 0x06,
+ 0x9f, 0xaf, 0xae, 0x0a, 0xc0, 0x07, 0x01, 0x00,
+ 0x60, 0xaf, 0x4a, 0xaf, 0x97, 0xcf, 0x00, 0x08,
+ 0x09, 0x08, 0x11, 0x08, 0x00, 0xda, 0x7c, 0xc1,
+ 0x97, 0xcf, 0x67, 0x04, 0xcc, 0x02, 0xc0, 0xdf,
+ 0x51, 0x94, 0xb1, 0xaf, 0x06, 0x00, 0xc1, 0xdf,
+ 0xc9, 0x09, 0xcc, 0x02, 0x49, 0x62, 0x75, 0xc1,
+ 0xc0, 0xdf, 0xa7, 0xcf, 0xd6, 0x02, 0x0e, 0x00,
+ 0x24, 0x00, 0x80, 0x04, 0x22, 0x00, 0x4e, 0x05,
+ 0xd0, 0x00, 0x0e, 0x0a, 0xaa, 0x00, 0x30, 0x08,
+ 0xbe, 0x00, 0x4a, 0x0a, 0x10, 0x00, 0x20, 0x00,
+ 0x04, 0x00, 0x6e, 0x04, 0x02, 0x00, 0x6a, 0x04,
+ 0x06, 0x00, 0x00, 0x00, 0x24, 0xc0, 0x04, 0x04,
+ 0x28, 0xc0, 0xfe, 0xfb, 0x1e, 0xc0, 0x00, 0x04,
+ 0x22, 0xc0, 0xff, 0xf4, 0xc0, 0x00, 0x90, 0x09,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 0x08,
+ 0x60, 0x08, 0xd0, 0x08, 0xda, 0x08, 0x00, 0x09,
+ 0x04, 0x09, 0x08, 0x09, 0x32, 0x09, 0x42, 0x09,
+ 0x50, 0x09, 0x52, 0x09, 0x5a, 0x09, 0x5a, 0x09,
+ 0x27, 0x02, 0xca, 0x06, 0x97, 0xcf, 0xe7, 0x07,
+ 0x00, 0x00, 0xca, 0x06, 0x0a, 0x0e, 0x01, 0x00,
+ 0xca, 0x57, 0x0e, 0x00, 0x9f, 0xc3, 0x5a, 0x09,
+ 0xca, 0x37, 0x00, 0x00, 0x9f, 0xc2, 0x5a, 0x09,
+ 0x0a, 0xd2, 0xb2, 0xcf, 0x16, 0x08, 0xc8, 0x09,
+ 0xde, 0x00, 0x07, 0x06, 0x9f, 0xcf, 0x6c, 0x09,
+ 0x17, 0x02, 0xc8, 0x09, 0xde, 0x00, 0x00, 0x0e,
+ 0x0f, 0x00, 0x41, 0x90, 0x9f, 0xde, 0x06, 0x00,
+ 0xc8, 0x05, 0x30, 0x50, 0x06, 0x00, 0x9f, 0xc8,
+ 0x5a, 0x09, 0x27, 0x0c, 0x02, 0x00, 0xb0, 0x06,
+ 0xc0, 0x09, 0xb2, 0x06, 0x27, 0x00, 0xb4, 0x06,
+ 0xe7, 0x07, 0x00, 0x00, 0xae, 0x06, 0x27, 0x00,
+ 0x80, 0x06, 0x00, 0x1c, 0x06, 0x00, 0x27, 0x00,
+ 0xb6, 0x06, 0x41, 0x90, 0x67, 0x50, 0xb0, 0x06,
+ 0x0d, 0xc0, 0x67, 0x00, 0x7e, 0x06, 0x27, 0x0c,
+ 0x06, 0x00, 0x82, 0x06, 0xe7, 0x07, 0xbc, 0x08,
+ 0x84, 0x06, 0xc8, 0x07, 0x7e, 0x06, 0x41, 0x90,
+ 0x51, 0xaf, 0x97, 0xcf, 0x9f, 0xaf, 0x48, 0x0c,
+ 0xe7, 0x09, 0xb6, 0x06, 0xb4, 0x06, 0xe7, 0x09,
+ 0xb0, 0x06, 0xae, 0x06, 0x59, 0xaf, 0x97, 0xcf,
+ 0x27, 0x0c, 0x02, 0x00, 0xac, 0x06, 0x59, 0xaf,
+ 0x97, 0xcf, 0x09, 0x0c, 0x02, 0x00, 0x09, 0xda,
+ 0x49, 0xd2, 0xc9, 0x19, 0xd6, 0x06, 0xc8, 0x07,
+ 0x7e, 0x06, 0xe0, 0x07, 0x00, 0x00, 0x60, 0x02,
+ 0xe0, 0x07, 0x04, 0x00, 0xd0, 0x07, 0xcc, 0x08,
+ 0x48, 0xdb, 0x41, 0x90, 0x50, 0xaf, 0x97, 0xcf,
+ 0x59, 0xaf, 0x97, 0xcf, 0x59, 0xaf, 0x97, 0xcf,
+ 0xf0, 0x57, 0x06, 0x00, 0x06, 0x00, 0x25, 0xc1,
+ 0xe7, 0x07, 0x70, 0x06, 0x80, 0x06, 0x41, 0x90,
+ 0x67, 0x00, 0x7e, 0x06, 0x27, 0x0c, 0x06, 0x00,
+ 0x82, 0x06, 0xe7, 0x07, 0x8c, 0x09, 0x84, 0x06,
+ 0xc8, 0x07, 0x7e, 0x06, 0x41, 0x90, 0x51, 0xaf,
+ 0x97, 0xcf, 0x07, 0x0c, 0x06, 0x00, 0xc7, 0x57,
+ 0x06, 0x00, 0x0f, 0xc1, 0xc8, 0x07, 0x70, 0x06,
+ 0x15, 0xcf, 0x00, 0x0c, 0x02, 0x00, 0x00, 0xda,
+ 0x40, 0xd1, 0x27, 0x00, 0xc2, 0x06, 0x1e, 0xcf,
+ 0x1d, 0xcf, 0x27, 0x0c, 0x02, 0x00, 0xcc, 0x06,
+ 0x19, 0xcf, 0x27, 0x02, 0x20, 0x01, 0xe7, 0x07,
+ 0x08, 0x00, 0x22, 0x01, 0xe7, 0x07, 0x13, 0x00,
+ 0xb0, 0xc0, 0x97, 0xcf, 0x41, 0x90, 0x67, 0x00,
+ 0x7e, 0x06, 0xe7, 0x01, 0x82, 0x06, 0x27, 0x02,
+ 0x80, 0x06, 0xe7, 0x07, 0x8c, 0x09, 0x84, 0x06,
+ 0xc8, 0x07, 0x7e, 0x06, 0xc1, 0x07, 0x00, 0x80,
+ 0x50, 0xaf, 0x97, 0xcf, 0x59, 0xaf, 0x97, 0xcf,
+ 0x00, 0x60, 0x05, 0xc0, 0xe7, 0x07, 0x00, 0x00,
+ 0xc4, 0x06, 0xa7, 0xcf, 0x7c, 0x06, 0x9f, 0xaf,
+ 0x00, 0x0a, 0xe7, 0x07, 0x01, 0x00, 0xc4, 0x06,
+ 0x49, 0xaf, 0xd7, 0x09, 0x00, 0xc0, 0x07, 0xaf,
+ 0xe7, 0x05, 0x00, 0xc0, 0x4a, 0xaf, 0xa7, 0xcf,
+ 0x7c, 0x06, 0xc0, 0x07, 0xfe, 0x7f, 0x44, 0xaf,
+ 0x40, 0x00, 0xc0, 0x37, 0x00, 0x01, 0x41, 0x90,
+ 0xc0, 0x37, 0x08, 0x00, 0xdf, 0xde, 0x50, 0x06,
+ 0xc0, 0x57, 0x10, 0x00, 0x02, 0xc2, 0xc0, 0x07,
+ 0x10, 0x00, 0x27, 0x00, 0x9a, 0x06, 0x41, 0x90,
+ 0x9f, 0xde, 0x40, 0x06, 0x44, 0xaf, 0x27, 0x00,
+ 0x9c, 0x06, 0xc0, 0x09, 0x9a, 0x06, 0x41, 0x90,
+ 0x00, 0xd2, 0x00, 0xd8, 0x9f, 0xde, 0x08, 0x00,
+ 0x44, 0xaf, 0x27, 0x00, 0xc8, 0x06, 0x97, 0xcf,
+ 0xe7, 0x87, 0x00, 0x84, 0x28, 0xc0, 0xe7, 0x67,
+ 0xff, 0xfb, 0x24, 0xc0, 0x97, 0xcf, 0xe7, 0x87,
+ 0x01, 0x00, 0xd2, 0x06, 0xe7, 0x57, 0x00, 0x00,
+ 0xa8, 0x06, 0x97, 0xc1, 0x9f, 0xaf, 0x00, 0x0a,
+ 0xe7, 0x87, 0x00, 0x06, 0x22, 0xc0, 0xe7, 0x07,
+ 0x00, 0x00, 0x90, 0xc0, 0xe7, 0x67, 0xfe, 0xff,
+ 0x3e, 0xc0, 0xe7, 0x07, 0x26, 0x00, 0x0a, 0xc0,
+ 0xe7, 0x87, 0x01, 0x00, 0x3e, 0xc0, 0xe7, 0x07,
+ 0xff, 0xff, 0xbe, 0x06, 0x9f, 0xaf, 0x10, 0x0b,
+ 0x97, 0xcf, 0x17, 0x00, 0xa7, 0xaf, 0x78, 0x06,
+ 0xc0, 0x05, 0x27, 0x00, 0x76, 0x06, 0xe7, 0x87,
+ 0x01, 0x00, 0xd2, 0x06, 0x9f, 0xaf, 0x00, 0x0a,
+ 0xe7, 0x07, 0x0c, 0x00, 0x40, 0xc0, 0x9f, 0xaf,
+ 0x10, 0x0b, 0x00, 0x90, 0x27, 0x00, 0xa6, 0x06,
+ 0x27, 0x00, 0xaa, 0x06, 0xe7, 0x09, 0xb2, 0x06,
+ 0xb4, 0x06, 0x27, 0x00, 0xae, 0x06, 0x27, 0x00,
+ 0xac, 0x06, 0x9f, 0xaf, 0xae, 0x0a, 0xc0, 0x07,
+ 0x00, 0x00, 0x27, 0x00, 0xb2, 0x02, 0x27, 0x00,
+ 0xb4, 0x02, 0x27, 0x00, 0x8e, 0x06, 0xc0, 0x07,
+ 0x06, 0x00, 0xc8, 0x09, 0xde, 0x00, 0xc8, 0x17,
+ 0x03, 0x00, 0xc9, 0x07, 0x70, 0x06, 0x29, 0x0a,
+ 0x00, 0xda, 0x7d, 0xc1, 0x97, 0xcf, 0xd7, 0x09,
+ 0x00, 0xc0, 0xc1, 0xdf, 0x00, 0x90, 0x27, 0x00,
+ 0x96, 0x06, 0xe7, 0x07, 0x96, 0x06, 0x98, 0x06,
+ 0x27, 0x00, 0xa0, 0x06, 0xe7, 0x07, 0xa0, 0x06,
+ 0xa2, 0x06, 0x27, 0x00, 0xa6, 0x06, 0x27, 0x00,
+ 0x90, 0x06, 0x27, 0x00, 0x9e, 0x06, 0xc8, 0x09,
+ 0x9c, 0x06, 0xc1, 0x09, 0x9a, 0x06, 0xc9, 0x07,
+ 0xa4, 0x06, 0x11, 0x02, 0x09, 0x02, 0xc8, 0x17,
+ 0x40, 0x06, 0x01, 0xda, 0x7a, 0xc1, 0x51, 0x94,
+ 0xc8, 0x09, 0xc8, 0x06, 0xc9, 0x07, 0xc6, 0x06,
+ 0xc1, 0x09, 0x9a, 0x06, 0x11, 0x02, 0x09, 0x02,
+ 0xc8, 0x17, 0x08, 0x00, 0x01, 0xda, 0x7a, 0xc1,
+ 0x51, 0x94, 0xe7, 0x05, 0x00, 0xc0, 0x97, 0xcf,
+ 0xe7, 0x57, 0x00, 0x00, 0x76, 0x06, 0x97, 0xc0,
+ 0x9f, 0xaf, 0x04, 0x00, 0xe7, 0x09, 0xbe, 0x06,
+ 0xba, 0x06, 0xe7, 0x57, 0xff, 0xff, 0xba, 0x06,
+ 0x04, 0xc1, 0xe7, 0x07, 0x10, 0x0b, 0xb8, 0x06,
+ 0x97, 0xcf, 0xe7, 0x17, 0x32, 0x00, 0xba, 0x06,
+ 0xe7, 0x67, 0xff, 0x07, 0xba, 0x06, 0xe7, 0x07,
+ 0x46, 0x0b, 0xb8, 0x06, 0x97, 0xcf, 0xe7, 0x57,
+ 0x00, 0x00, 0xc0, 0x06, 0x23, 0xc0, 0xe7, 0x07,
+ 0x04, 0x00, 0x90, 0xc0, 0xe7, 0x07, 0x00, 0x80,
+ 0x80, 0xc0, 0xe7, 0x07, 0x00, 0x00, 0x80, 0xc0,
+ 0xe7, 0x07, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0x07,
+ 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0xc0, 0x07,
+ 0x00, 0x00, 0xe7, 0x07, 0x00, 0x00, 0x80, 0xc0,
+ 0xe7, 0x07, 0x00, 0x80, 0x80, 0xc0, 0xe7, 0x07,
+ 0x00, 0x80, 0x40, 0xc0, 0xc0, 0x07, 0x00, 0x00,
+ 0xe7, 0x07, 0x00, 0x00, 0x40, 0xc0, 0xe7, 0x07,
+ 0x00, 0x00, 0x80, 0xc0, 0xe7, 0x07, 0x04, 0x00,
+ 0x90, 0xc0, 0xe7, 0x07, 0x00, 0x02, 0x40, 0xc0,
+ 0xe7, 0x07, 0x0c, 0x02, 0x40, 0xc0, 0xe7, 0x07,
+ 0x00, 0x00, 0xc0, 0x06, 0xe7, 0x07, 0x00, 0x00,
+ 0xb8, 0x06, 0xe7, 0x07, 0x00, 0x00, 0xd2, 0x06,
+ 0xd7, 0x09, 0x00, 0xc0, 0xc1, 0xdf, 0x9f, 0xaf,
+ 0x34, 0x02, 0xe7, 0x05, 0x00, 0xc0, 0x9f, 0xaf,
+ 0xc4, 0x01, 0x97, 0xcf, 0xd7, 0x09, 0x00, 0xc0,
+ 0x17, 0x00, 0x17, 0x02, 0x97, 0x02, 0xe7, 0x57,
+ 0x00, 0x00, 0xa8, 0x06, 0x06, 0xc0, 0xc0, 0x09,
+ 0x92, 0xc0, 0xc0, 0x77, 0x09, 0x02, 0x9f, 0xc1,
+ 0x5c, 0x05, 0x9f, 0xcf, 0x32, 0x06, 0xd7, 0x09,
+ 0x0e, 0xc0, 0xe7, 0x07, 0x00, 0x00, 0x0e, 0xc0,
+ 0x9f, 0xaf, 0x02, 0x0c, 0xe7, 0x05, 0x0e, 0xc0,
+ 0x97, 0xcf, 0xd7, 0x09, 0x00, 0xc0, 0x17, 0x02,
+ 0xc8, 0x09, 0xb0, 0xc0, 0xe7, 0x67, 0xfe, 0x7f,
+ 0xb0, 0xc0, 0xc8, 0x77, 0x00, 0x20, 0x9f, 0xc1,
+ 0x64, 0xeb, 0xe7, 0x57, 0x00, 0x00, 0xc8, 0x02,
+ 0x9f, 0xc1, 0x80, 0xeb, 0xc8, 0x99, 0xca, 0x02,
+ 0xc8, 0x67, 0x04, 0x00, 0x9f, 0xc1, 0x96, 0xeb,
+ 0x9f, 0xcf, 0x4c, 0xeb, 0xe7, 0x07, 0x00, 0x00,
+ 0xa6, 0xc0, 0xe7, 0x09, 0xb0, 0xc0, 0xc8, 0x02,
+ 0xe7, 0x07, 0x03, 0x00, 0xb0, 0xc0, 0x97, 0xcf,
+ 0xc0, 0x09, 0xb0, 0x06, 0xc0, 0x37, 0x01, 0x00,
+ 0x97, 0xc9, 0xc9, 0x09, 0xb2, 0x06, 0x02, 0x00,
+ 0x41, 0x90, 0x48, 0x02, 0xc9, 0x17, 0x06, 0x00,
+ 0x9f, 0xaf, 0x08, 0x04, 0x9f, 0xa2, 0x72, 0x0c,
+ 0x02, 0xda, 0x77, 0xc1, 0x41, 0x60, 0x71, 0xc1,
+ 0x97, 0xcf, 0x17, 0x02, 0x57, 0x02, 0x43, 0x04,
+ 0x21, 0x04, 0xe0, 0x00, 0x43, 0x04, 0x21, 0x04,
+ 0xe0, 0x00, 0x43, 0x04, 0x21, 0x04, 0xe0, 0x00,
+ 0xc1, 0x07, 0x01, 0x00, 0xc9, 0x05, 0xc8, 0x05,
+ 0x97, 0xcf, 0xe7, 0x07, 0x01, 0x00, 0x8e, 0x06,
+ 0xc8, 0x07, 0x86, 0x06, 0xe7, 0x07, 0x00, 0x00,
+ 0x86, 0x06, 0xe7, 0x07, 0x10, 0x08, 0x88, 0x06,
+ 0xe7, 0x07, 0x04, 0x00, 0x8a, 0x06, 0xe7, 0x07,
+ 0xbc, 0x0c, 0x8c, 0x06, 0xc1, 0x07, 0x03, 0x80,
+ 0x50, 0xaf, 0x97, 0xcf, 0xe7, 0x07, 0x00, 0x00,
+ 0x8e, 0x06, 0x97, 0xcf,
+ 0x00, 0x00
+};
+
+/****************************************************************
+ * kaweth_new_code_fix
+ ****************************************************************/
+static __u8 kaweth_new_code_fix[] =
+{
+ 0xB6, 0xC3, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0x02, 0x00, 0x08, 0x00, 0x28, 0x00, 0x2c, 0x00,
+ 0x34, 0x00, 0x3c, 0x00, 0x40, 0x00, 0x48, 0x00,
+ 0x54, 0x00, 0x58, 0x00, 0x5e, 0x00, 0x64, 0x00,
+ 0x68, 0x00, 0x6e, 0x00, 0x6c, 0x00, 0x72, 0x00,
+ 0x76, 0x00, 0x7c, 0x00, 0x80, 0x00, 0x86, 0x00,
+ 0x8a, 0x00, 0x90, 0x00, 0x94, 0x00, 0x98, 0x00,
+ 0x9e, 0x00, 0xa6, 0x00, 0xaa, 0x00, 0xb0, 0x00,
+ 0xb4, 0x00, 0xb8, 0x00, 0xc0, 0x00, 0xc6, 0x00,
+ 0xca, 0x00, 0xd0, 0x00, 0xd4, 0x00, 0xd8, 0x00,
+ 0xe0, 0x00, 0xde, 0x00, 0xe8, 0x00, 0xf0, 0x00,
+ 0xfc, 0x00, 0x04, 0x01, 0x0a, 0x01, 0x18, 0x01,
+ 0x22, 0x01, 0x28, 0x01, 0x3a, 0x01, 0x3e, 0x01,
+ 0x7e, 0x01, 0x98, 0x01, 0x9c, 0x01, 0xa2, 0x01,
+ 0xac, 0x01, 0xb2, 0x01, 0xba, 0x01, 0xc0, 0x01,
+ 0xc8, 0x01, 0xd0, 0x01, 0xd6, 0x01, 0xf4, 0x01,
+ 0xfc, 0x01, 0x08, 0x02, 0x16, 0x02, 0x1a, 0x02,
+ 0x22, 0x02, 0x2a, 0x02, 0x2e, 0x02, 0x3e, 0x02,
+ 0x44, 0x02, 0x4a, 0x02, 0x50, 0x02, 0x64, 0x02,
+ 0x62, 0x02, 0x6c, 0x02, 0x72, 0x02, 0x86, 0x02,
+ 0x8c, 0x02, 0x90, 0x02, 0x9e, 0x02, 0xbc, 0x02,
+ 0xd0, 0x02, 0xd8, 0x02, 0xdc, 0x02, 0xe0, 0x02,
+ 0xe8, 0x02, 0xe6, 0x02, 0xf4, 0x02, 0xfe, 0x02,
+ 0x04, 0x03, 0x0c, 0x03, 0x28, 0x03, 0x7c, 0x03,
+ 0x90, 0x03, 0x94, 0x03, 0x9c, 0x03, 0xa2, 0x03,
+ 0xc0, 0x03, 0xd0, 0x03, 0xd4, 0x03, 0xee, 0x03,
+ 0xfa, 0x03, 0xfe, 0x03, 0x2e, 0x04, 0x32, 0x04,
+ 0x3c, 0x04, 0x40, 0x04, 0x4e, 0x04, 0x76, 0x04,
+ 0x7c, 0x04, 0x84, 0x04, 0x8a, 0x04, 0x8e, 0x04,
+ 0xa6, 0x04, 0xb0, 0x04, 0xb8, 0x04, 0xbe, 0x04,
+ 0xd2, 0x04, 0xdc, 0x04, 0xee, 0x04, 0x10, 0x05,
+ 0x1a, 0x05, 0x24, 0x05, 0x2a, 0x05, 0x36, 0x05,
+ 0x34, 0x05, 0x3c, 0x05, 0x42, 0x05, 0x64, 0x05,
+ 0x6a, 0x05, 0x6e, 0x05, 0x86, 0x05, 0x22, 0x06,
+ 0x26, 0x06, 0x2c, 0x06, 0x30, 0x06, 0x42, 0x06,
+ 0x4a, 0x06, 0x4e, 0x06, 0x56, 0x06, 0x54, 0x06,
+ 0x5a, 0x06, 0x60, 0x06, 0x66, 0x06, 0xe8, 0x06,
+ 0xee, 0x06, 0xf4, 0x06, 0x16, 0x07, 0x26, 0x07,
+ 0x2c, 0x07, 0x32, 0x07, 0x36, 0x07, 0x3a, 0x07,
+ 0x3e, 0x07, 0x52, 0x07, 0x56, 0x07, 0x5a, 0x07,
+ 0x64, 0x07, 0x76, 0x07, 0x7a, 0x07, 0x80, 0x07,
+ 0x84, 0x07, 0x8a, 0x07, 0x9e, 0x07, 0xa2, 0x07,
+ 0xda, 0x07, 0xde, 0x07, 0xe2, 0x07, 0xe6, 0x07,
+ 0xea, 0x07, 0xee, 0x07, 0xf2, 0x07, 0xf6, 0x07,
+ 0x0e, 0x08, 0x16, 0x08, 0x18, 0x08, 0x1a, 0x08,
+ 0x1c, 0x08, 0x1e, 0x08, 0x20, 0x08, 0x22, 0x08,
+ 0x24, 0x08, 0x26, 0x08, 0x28, 0x08, 0x2a, 0x08,
+ 0x2c, 0x08, 0x2e, 0x08, 0x32, 0x08, 0x3a, 0x08,
+ 0x46, 0x08, 0x4e, 0x08, 0x54, 0x08, 0x5e, 0x08,
+ 0x78, 0x08, 0x7e, 0x08, 0x82, 0x08, 0x86, 0x08,
+ 0x8c, 0x08, 0x90, 0x08, 0x98, 0x08, 0x9e, 0x08,
+ 0xa4, 0x08, 0xaa, 0x08, 0xb0, 0x08, 0xae, 0x08,
+ 0xb4, 0x08, 0xbe, 0x08, 0xc4, 0x08, 0xc2, 0x08,
+ 0xca, 0x08, 0xc8, 0x08, 0xd4, 0x08, 0xe4, 0x08,
+ 0xe8, 0x08, 0xf6, 0x08, 0x14, 0x09, 0x12, 0x09,
+ 0x1a, 0x09, 0x20, 0x09, 0x26, 0x09, 0x24, 0x09,
+ 0x2a, 0x09, 0x3e, 0x09, 0x4c, 0x09, 0x56, 0x09,
+ 0x70, 0x09, 0x74, 0x09, 0x78, 0x09, 0x7e, 0x09,
+ 0x7c, 0x09, 0x82, 0x09, 0x98, 0x09, 0x9c, 0x09,
+ 0xa0, 0x09, 0xa6, 0x09, 0xb8, 0x09, 0xdc, 0x09,
+ 0xe8, 0x09, 0xec, 0x09, 0xfc, 0x09, 0x12, 0x0a,
+ 0x18, 0x0a, 0x1e, 0x0a, 0x42, 0x0a, 0x46, 0x0a,
+ 0x4e, 0x0a, 0x54, 0x0a, 0x5a, 0x0a, 0x5e, 0x0a,
+ 0x68, 0x0a, 0x6e, 0x0a, 0x72, 0x0a, 0x78, 0x0a,
+ 0x76, 0x0a, 0x7c, 0x0a, 0x80, 0x0a, 0x84, 0x0a,
+ 0x94, 0x0a, 0xa4, 0x0a, 0xb8, 0x0a, 0xbe, 0x0a,
+ 0xbc, 0x0a, 0xc2, 0x0a, 0xc8, 0x0a, 0xc6, 0x0a,
+ 0xcc, 0x0a, 0xd0, 0x0a, 0xd4, 0x0a, 0xd8, 0x0a,
+ 0xdc, 0x0a, 0xe0, 0x0a, 0xf2, 0x0a, 0xf6, 0x0a,
+ 0xfa, 0x0a, 0x14, 0x0b, 0x1a, 0x0b, 0x20, 0x0b,
+ 0x1e, 0x0b, 0x26, 0x0b, 0x2e, 0x0b, 0x2c, 0x0b,
+ 0x36, 0x0b, 0x3c, 0x0b, 0x42, 0x0b, 0x40, 0x0b,
+ 0x4a, 0x0b, 0xaa, 0x0b, 0xb0, 0x0b, 0xb6, 0x0b,
+ 0xc0, 0x0b, 0xc8, 0x0b, 0xda, 0x0b, 0xe8, 0x0b,
+ 0xec, 0x0b, 0xfa, 0x0b, 0x4a, 0x0c, 0x54, 0x0c,
+ 0x62, 0x0c, 0x66, 0x0c, 0x96, 0x0c, 0x9a, 0x0c,
+ 0xa0, 0x0c, 0xa6, 0x0c, 0xa4, 0x0c, 0xac, 0x0c,
+ 0xb2, 0x0c, 0xb0, 0x0c, 0xc0, 0x0c,
+ 0x00, 0x00
+};
+
+
+static const int len_kaweth_trigger_code = sizeof(kaweth_trigger_code);
+static const int len_kaweth_trigger_code_fix = sizeof(kaweth_trigger_code_fix);
+static const int len_kaweth_new_code = sizeof(kaweth_new_code);
+static const int len_kaweth_new_code_fix = sizeof(kaweth_new_code_fix);
diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
new file mode 100644
index 000000000000..f6c19d73b7da
--- /dev/null
+++ b/drivers/usb/net/pegasus.c
@@ -0,0 +1,1408 @@
+/*
+ * Copyright (c) 1999-2005 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 spent on 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.5.0 branch to 2.5.x kernels
+ * v0.5.1 ethtool support added
+ * v0.5.5 rx socket buffers are in a pool and the their allocation
+ * is out of the interrupt routine.
+ */
+
+#undef DEBUG
+
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/ethtool.h>
+#include <linux/mii.h>
+#include <linux/usb.h>
+#include <linux/module.h>
+#include <asm/byteorder.h>
+#include <asm/uaccess.h>
+#include "pegasus.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.6.12 (2005/01/13)"
+#define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
+#define DRIVER_DESC "Pegasus/Pegasus II USB Ethernet driver"
+
+static const char driver_name[] = "pegasus";
+
+#undef PEGASUS_WRITE_EEPROM
+#define BMSR_MEDIA (BMSR_10HALF | BMSR_10FULL | BMSR_100HALF | \
+ BMSR_100FULL | BMSR_ANEGCAPABLE)
+
+static int loopback = 0;
+static int mii_mode = 0;
+static int multicast_filter_limit = 32;
+
+static struct usb_eth_dev usb_dev_id[] = {
+#define PEGASUS_DEV(pn, vid, pid, flags) \
+ {.name = pn, .vendor = vid, .device = pid, .private = flags},
+#include "pegasus.h"
+#undef PEGASUS_DEV
+ {NULL, 0, 0, 0}
+};
+
+static struct usb_device_id pegasus_ids[] = {
+#define PEGASUS_DEV(pn, vid, pid, flags) \
+ {.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_param(loopback, bool, 0);
+module_param(mii_mode, bool, 0);
+MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)");
+MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0");
+
+/* use ethtool to change the level for any given device */
+static int msg_level = -1;
+module_param (msg_level, int, 0);
+MODULE_PARM_DESC (msg_level, "Override default message level");
+
+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, struct pt_regs *regs)
+{
+ 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:
+ if (netif_msg_drv(pegasus))
+ dev_err(&pegasus->intf->dev, "%s, status %d\n",
+ __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;
+ char *buffer;
+ DECLARE_WAITQUEUE(wait, current);
+
+ buffer = kmalloc(size, GFP_KERNEL);
+ if (!buffer) {
+ if (netif_msg_drv(pegasus))
+ dev_warn(&pegasus->intf->dev, "out of memory in %s\n",
+ __FUNCTION__);
+ return -ENOMEM;
+ }
+ 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;
+
+ usb_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);
+
+ /* using ATOMIC, we'd never wake up if we slept */
+ if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
+ if (netif_msg_drv(pegasus))
+ dev_err(&pegasus->intf->dev, "%s, status %d\n",
+ __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;
+ char *buffer;
+ DECLARE_WAITQUEUE(wait, current);
+
+ buffer = kmalloc(size, GFP_KERNEL);
+ if (!buffer) {
+ if (netif_msg_drv(pegasus))
+ dev_warn(&pegasus->intf->dev, "out of memory in %s\n",
+ __FUNCTION__);
+ return -ENOMEM;
+ }
+ 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_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;
+
+ usb_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, GFP_ATOMIC))) {
+ if (netif_msg_drv(pegasus))
+ dev_err(&pegasus->intf->dev, "%s, status %d\n",
+ __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;
+ char *tmp;
+ DECLARE_WAITQUEUE(wait, current);
+
+ tmp = kmalloc(1, GFP_KERNEL);
+ if (!tmp) {
+ if (netif_msg_drv(pegasus))
+ dev_warn(&pegasus->intf->dev, "out of memory in %s\n",
+ __FUNCTION__);
+ return -ENOMEM;
+ }
+ memcpy(tmp, &data, 1);
+ 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_le16(data);
+ pegasus->dr.wIndex = cpu_to_le16p(&indx);
+ pegasus->dr.wLength = cpu_to_le16(1);
+ pegasus->ctrl_urb->transfer_buffer_length = 1;
+
+ usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb,
+ usb_sndctrlpipe(pegasus->usb, 0),
+ (char *) &pegasus->dr,
+ &tmp, 1, ctrl_callback, pegasus);
+
+ add_wait_queue(&pegasus->ctrl_wait, &wait);
+ set_current_state(TASK_UNINTERRUPTIBLE);
+
+ if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
+ if (netif_msg_drv(pegasus))
+ dev_err(&pegasus->intf->dev, "%s, status %d\n",
+ __FUNCTION__, ret);
+ goto out;
+ }
+
+ schedule();
+out:
+ remove_wait_queue(&pegasus->ctrl_wait, &wait);
+ kfree(tmp);
+
+ 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;
+
+ usb_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, GFP_ATOMIC)))
+ if (netif_msg_drv(pegasus))
+ dev_err(&pegasus->intf->dev, "%s, status %d\n",
+ __FUNCTION__, ret);
+
+ 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 };
+ __le16 regdi;
+ int ret;
+
+ ret = set_register(pegasus, PhyCtrl, 0);
+ ret = set_registers(pegasus, PhyAddr, sizeof (data), data);
+ ret = set_register(pegasus, PhyCtrl, (indx | PHY_READ));
+ for (i = 0; i < REG_TIMEOUT; i++) {
+ ret = get_registers(pegasus, PhyCtrl, 1, data);
+ if (data[0] & PHY_DONE)
+ break;
+ }
+ if (i < REG_TIMEOUT) {
+ ret = get_registers(pegasus, PhyData, 2, &regdi);
+ *regd = le16_to_cpu(regdi);
+ return 1;
+ }
+ if (netif_msg_drv(pegasus))
+ dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__);
+
+ return 0;
+}
+
+static int mdio_read(struct net_device *dev, int phy_id, int loc)
+{
+ pegasus_t *pegasus = (pegasus_t *) netdev_priv(dev);
+ u16 res;
+
+ read_mii_word(pegasus, phy_id, loc, &res);
+ return (int)res;
+}
+
+static int write_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 regd)
+{
+ int i;
+ __u8 data[4] = { phy, 0, 0, indx };
+ int ret;
+
+ data[1] = (u8) regd;
+ data[2] = (u8) (regd >> 8);
+ ret = set_register(pegasus, PhyCtrl, 0);
+ ret = set_registers(pegasus, PhyAddr, sizeof(data), data);
+ ret = set_register(pegasus, PhyCtrl, (indx | PHY_WRITE));
+ for (i = 0; i < REG_TIMEOUT; i++) {
+ ret = get_registers(pegasus, PhyCtrl, 1, data);
+ if (data[0] & PHY_DONE)
+ break;
+ }
+ if (i < REG_TIMEOUT)
+ return 0;
+
+ if (netif_msg_drv(pegasus))
+ dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__);
+ return 1;
+}
+
+static void mdio_write(struct net_device *dev, int phy_id, int loc, int val)
+{
+ pegasus_t *pegasus = (pegasus_t *) netdev_priv(dev);
+
+ write_mii_word(pegasus, phy_id, loc, val);
+}
+
+static int read_eprom_word(pegasus_t * pegasus, __u8 index, __u16 * retdata)
+{
+ int i;
+ __u8 tmp;
+ __le16 retdatai;
+ int ret;
+
+ ret = set_register(pegasus, EpromCtrl, 0);
+ ret = set_register(pegasus, EpromOffset, index);
+ ret = set_register(pegasus, EpromCtrl, EPROM_READ);
+
+ for (i = 0; i < REG_TIMEOUT; i++) {
+ ret = get_registers(pegasus, EpromCtrl, 1, &tmp);
+ if (tmp & EPROM_DONE)
+ break;
+ }
+ if (i < REG_TIMEOUT) {
+ ret = get_registers(pegasus, EpromData, 2, &retdatai);
+ *retdata = le16_to_cpu(retdatai);
+ return 0;
+ }
+
+ if (netif_msg_drv(pegasus))
+ dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__);
+ return -1;
+}
+
+#ifdef PEGASUS_WRITE_EEPROM
+static inline void enable_eprom_write(pegasus_t * pegasus)
+{
+ __u8 tmp;
+ int ret;
+
+ ret = get_registers(pegasus, EthCtrl2, 1, &tmp);
+ ret = set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE);
+}
+
+static inline void disable_eprom_write(pegasus_t * pegasus)
+{
+ __u8 tmp;
+ int ret;
+
+ ret = get_registers(pegasus, EthCtrl2, 1, &tmp);
+ ret = set_register(pegasus, EpromCtrl, 0);
+ ret = set_register(pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE);
+}
+
+static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data)
+{
+ int i;
+ __u8 tmp, d[4] = { 0x3f, 0, 0, EPROM_WRITE };
+ int ret;
+
+ ret = set_registers(pegasus, EpromOffset, 4, d);
+ enable_eprom_write(pegasus);
+ ret = set_register(pegasus, EpromOffset, index);
+ ret = set_registers(pegasus, EpromData, 2, &data);
+ ret = set_register(pegasus, EpromCtrl, EPROM_WRITE);
+
+ for (i = 0; i < REG_TIMEOUT; i++) {
+ ret = get_registers(pegasus, EpromCtrl, 1, &tmp);
+ if (tmp & EPROM_DONE)
+ break;
+ }
+ disable_eprom_write(pegasus);
+ if (i < REG_TIMEOUT)
+ return 0;
+ if (netif_msg_drv(pegasus))
+ dev_warn(&pegasus->intf->dev, "fail %s\n", __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);
+ ((__le16 *) id)[i] = cpu_to_le16p(&w16);
+ }
+}
+
+static void set_ethernet_addr(pegasus_t * pegasus)
+{
+ __u8 node_id[6];
+ int ret;
+
+ get_node_id(pegasus, node_id);
+ ret = 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;
+ int ret;
+
+ ret = set_register(pegasus, EthCtrl1, data);
+ for (i = 0; i < REG_TIMEOUT; i++) {
+ ret = get_registers(pegasus, EthCtrl1, 1, &data);
+ if (~data & 0x08) {
+ if (loopback & 1)
+ break;
+ if (mii_mode && (pegasus->features & HAS_HOME_PNA))
+ ret = set_register(pegasus, Gpio1, 0x34);
+ else
+ ret = set_register(pegasus, Gpio1, 0x26);
+ ret = set_register(pegasus, Gpio0, pegasus->features);
+ ret = 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) {
+ ret = set_register(pegasus, Gpio0, 0x24);
+ ret = set_register(pegasus, Gpio0, 0x26);
+ }
+ 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;
+ __u8 data[4];
+ pegasus_t *pegasus = netdev_priv(dev);
+ int ret;
+
+ read_mii_word(pegasus, pegasus->phy, MII_LPA, &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));
+ ret = set_registers(pegasus, EthCtrl0, 3, data);
+
+ 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 void fill_skb_pool(pegasus_t * pegasus)
+{
+ int i;
+
+ for (i = 0; i < RX_SKBS; i++) {
+ if (pegasus->rx_pool[i])
+ continue;
+ pegasus->rx_pool[i] = dev_alloc_skb(PEGASUS_MTU + 2);
+ /*
+ ** we give up if the allocation fail. the tasklet will be
+ ** rescheduled again anyway...
+ */
+ if (pegasus->rx_pool[i] == NULL)
+ return;
+ pegasus->rx_pool[i]->dev = pegasus->net;
+ skb_reserve(pegasus->rx_pool[i], 2);
+ }
+}
+
+static void free_skb_pool(pegasus_t * pegasus)
+{
+ int i;
+
+ for (i = 0; i < RX_SKBS; i++) {
+ if (pegasus->rx_pool[i]) {
+ dev_kfree_skb(pegasus->rx_pool[i]);
+ pegasus->rx_pool[i] = NULL;
+ }
+ }
+}
+
+static inline struct sk_buff *pull_skb(pegasus_t * pegasus)
+{
+ int i;
+ struct sk_buff *skb;
+
+ for (i = 0; i < RX_SKBS; i++) {
+ if (likely(pegasus->rx_pool[i] != NULL)) {
+ skb = pegasus->rx_pool[i];
+ pegasus->rx_pool[i] = NULL;
+ return skb;
+ }
+ }
+ return NULL;
+}
+
+static void read_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ pegasus_t *pegasus = urb->context;
+ struct net_device *net;
+ int rx_status, count = urb->actual_length;
+ u8 *buf = urb->transfer_buffer;
+ __u16 pkt_len;
+
+ if (!pegasus)
+ return;
+
+ net = pegasus->net;
+ if (!netif_device_present(net) || !netif_running(net))
+ return;
+
+ switch (urb->status) {
+ case 0:
+ break;
+ case -ETIMEDOUT:
+ if (netif_msg_rx_err(pegasus))
+ pr_debug("%s: reset MAC\n", net->name);
+ pegasus->flags &= ~PEGASUS_RX_BUSY;
+ break;
+ case -EPIPE: /* stall, or disconnect from TT */
+ /* FIXME schedule work to clear the halt */
+ if (netif_msg_rx_err(pegasus))
+ printk(KERN_WARNING "%s: no rx stall recovery\n",
+ net->name);
+ return;
+ case -ENOENT:
+ case -ECONNRESET:
+ case -ESHUTDOWN:
+ if (netif_msg_ifdown(pegasus))
+ pr_debug("%s: rx unlink, %d\n", net->name, urb->status);
+ return;
+ default:
+ if (netif_msg_rx_err(pegasus))
+ pr_debug("%s: RX status %d\n", net->name, urb->status);
+ goto goon;
+ }
+
+ if (!count || count < 4)
+ goto goon;
+
+ rx_status = buf[count - 2];
+ if (rx_status & 0x1e) {
+ if (netif_msg_rx_err(pegasus))
+ pr_debug("%s: RX packet error %x\n",
+ net->name, rx_status);
+ pegasus->stats.rx_errors++;
+ if (rx_status & 0x06) // long or runt
+ pegasus->stats.rx_length_errors++;
+ if (rx_status & 0x08)
+ pegasus->stats.rx_crc_errors++;
+ if (rx_status & 0x10) // extra bits
+ pegasus->stats.rx_frame_errors++;
+ goto goon;
+ }
+ if (pegasus->chip == 0x8513) {
+ pkt_len = le32_to_cpu(*(__le32 *)urb->transfer_buffer);
+ pkt_len &= 0x0fff;
+ pegasus->rx_skb->data += 2;
+ } else {
+ pkt_len = buf[count - 3] << 8;
+ pkt_len += buf[count - 4];
+ pkt_len &= 0xfff;
+ pkt_len -= 8;
+ }
+
+ /*
+ * at this point we are sure pegasus->rx_skb != NULL
+ * so we go ahead and pass up the packet.
+ */
+ skb_put(pegasus->rx_skb, pkt_len);
+ pegasus->rx_skb->protocol = eth_type_trans(pegasus->rx_skb, net);
+ netif_rx(pegasus->rx_skb);
+ pegasus->stats.rx_packets++;
+ pegasus->stats.rx_bytes += pkt_len;
+
+ if (pegasus->flags & PEGASUS_UNPLUG)
+ return;
+
+ spin_lock(&pegasus->rx_pool_lock);
+ pegasus->rx_skb = pull_skb(pegasus);
+ spin_unlock(&pegasus->rx_pool_lock);
+
+ if (pegasus->rx_skb == NULL)
+ goto tl_sched;
+goon:
+ usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
+ usb_rcvbulkpipe(pegasus->usb, 1),
+ pegasus->rx_skb->data, PEGASUS_MTU + 8,
+ read_bulk_callback, pegasus);
+ if (usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) {
+ pegasus->flags |= PEGASUS_RX_URB_FAIL;
+ goto tl_sched;
+ } else {
+ pegasus->flags &= ~PEGASUS_RX_URB_FAIL;
+ }
+
+ return;
+
+tl_sched:
+ tasklet_schedule(&pegasus->rx_tl);
+}
+
+static void rx_fixup(unsigned long data)
+{
+ pegasus_t *pegasus;
+ unsigned long flags;
+
+ pegasus = (pegasus_t *) data;
+ if (pegasus->flags & PEGASUS_UNPLUG)
+ return;
+
+ spin_lock_irqsave(&pegasus->rx_pool_lock, flags);
+ fill_skb_pool(pegasus);
+ if (pegasus->flags & PEGASUS_RX_URB_FAIL)
+ if (pegasus->rx_skb)
+ goto try_again;
+ if (pegasus->rx_skb == NULL) {
+ pegasus->rx_skb = pull_skb(pegasus);
+ }
+ if (pegasus->rx_skb == NULL) {
+ if (netif_msg_rx_err(pegasus))
+ printk(KERN_WARNING "%s: low on memory\n",
+ pegasus->net->name);
+ tasklet_schedule(&pegasus->rx_tl);
+ goto done;
+ }
+ usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
+ usb_rcvbulkpipe(pegasus->usb, 1),
+ pegasus->rx_skb->data, PEGASUS_MTU + 8,
+ read_bulk_callback, pegasus);
+try_again:
+ if (usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) {
+ pegasus->flags |= PEGASUS_RX_URB_FAIL;
+ tasklet_schedule(&pegasus->rx_tl);
+ } else {
+ pegasus->flags &= ~PEGASUS_RX_URB_FAIL;
+ }
+done:
+ spin_unlock_irqrestore(&pegasus->rx_pool_lock, flags);
+}
+
+static void write_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ pegasus_t *pegasus = urb->context;
+ struct net_device *net = pegasus->net;
+
+ if (!pegasus)
+ return;
+
+ if (!netif_device_present(net) || !netif_running(net))
+ return;
+
+ switch (urb->status) {
+ case -EPIPE:
+ /* FIXME schedule_work() to clear the tx halt */
+ netif_stop_queue(net);
+ if (netif_msg_tx_err(pegasus))
+ printk(KERN_WARNING "%s: no tx stall recovery\n",
+ net->name);
+ return;
+ case -ENOENT:
+ case -ECONNRESET:
+ case -ESHUTDOWN:
+ if (netif_msg_ifdown(pegasus))
+ pr_debug("%s: tx unlink, %d\n", net->name, urb->status);
+ return;
+ default:
+ if (netif_msg_tx_err(pegasus))
+ pr_info("%s: TX status %d\n", net->name, urb->status);
+ /* FALL THROUGH */
+ case 0:
+ break;
+ }
+
+ net->trans_start = jiffies;
+ netif_wake_queue(net);
+}
+
+static void intr_callback(struct urb *urb, struct pt_regs *regs)
+{
+ pegasus_t *pegasus = urb->context;
+ struct net_device *net;
+ int status;
+
+ if (!pegasus)
+ return;
+ net = pegasus->net;
+
+ switch (urb->status) {
+ case 0:
+ break;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -ESHUTDOWN:
+ return;
+ default:
+ /* some Pegasus-I products report LOTS of data
+ * toggle errors... avoid log spamming
+ */
+ if (netif_msg_timer(pegasus))
+ pr_debug("%s: intr status %d\n", net->name,
+ urb->status);
+ }
+
+ if (urb->actual_length >= 6) {
+ u8 * d = urb->transfer_buffer;
+
+ /* byte 0 == tx_status1, reg 2B */
+ if (d[0] & (TX_UNDERRUN|EXCESSIVE_COL
+ |LATE_COL|JABBER_TIMEOUT)) {
+ 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++;
+ }
+
+ /* d[5].LINK_STATUS lies on some adapters.
+ * d[0].NO_CARRIER kicks in only with failed TX.
+ * ... so monitoring with MII may be safest.
+ */
+ if (d[0] & NO_CARRIER)
+ netif_carrier_off(net);
+ else
+ netif_carrier_on(net);
+
+ /* bytes 3-4 == rx_lostpkt, reg 2E/2F */
+ pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4];
+ }
+
+ status = usb_submit_urb(urb, SLAB_ATOMIC);
+ if (status && netif_msg_timer(pegasus))
+ printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n",
+ net->name, status);
+}
+
+static void pegasus_tx_timeout(struct net_device *net)
+{
+ pegasus_t *pegasus = netdev_priv(net);
+ if (netif_msg_timer(pegasus))
+ printk(KERN_WARNING "%s: tx timeout\n", net->name);
+ pegasus->tx_urb->transfer_flags |= URB_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 = netdev_priv(net);
+ int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3;
+ int res;
+ __u16 l16 = skb->len;
+
+ netif_stop_queue(net);
+
+ ((__le16 *) pegasus->tx_buff)[0] = cpu_to_le16(l16);
+ memcpy(pegasus->tx_buff + 2, skb->data, skb->len);
+ usb_fill_bulk_urb(pegasus->tx_urb, pegasus->usb,
+ usb_sndbulkpipe(pegasus->usb, 2),
+ pegasus->tx_buff, count,
+ write_bulk_callback, pegasus);
+ if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) {
+ if (netif_msg_tx_err(pegasus))
+ printk(KERN_WARNING "%s: fail tx, %d\n",
+ net->name, res);
+ switch (res) {
+ case -EPIPE: /* stall, or disconnect from TT */
+ /* cleanup should already have been scheduled */
+ break;
+ case -ENODEV: /* disconnect() upcoming */
+ break;
+ default:
+ pegasus->stats.tx_errors++;
+ netif_start_queue(net);
+ }
+ } else {
+ pegasus->stats.tx_packets++;
+ pegasus->stats.tx_bytes += skb->len;
+ net->trans_start = jiffies;
+ }
+ dev_kfree_skb(skb);
+
+ return 0;
+}
+
+static struct net_device_stats *pegasus_netdev_stats(struct net_device *dev)
+{
+ return &((pegasus_t *) netdev_priv(dev))->stats;
+}
+
+static inline void disable_net_traffic(pegasus_t * pegasus)
+{
+ int tmp = 0;
+ int ret;
+
+ ret = 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) {
+ if (netif_msg_timer(pegasus))
+ dev_info(&pegasus->intf->dev,
+ "intr interval changed from %ums to %ums\n",
+ 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 = netdev_priv(net);
+ u16 tmp;
+
+ if (read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp))
+ return;
+ if (tmp & BMSR_LSTATUS)
+ netif_carrier_on(net);
+ else
+ netif_carrier_off(net);
+}
+
+static void free_all_urbs(pegasus_t * pegasus)
+{
+ usb_free_urb(pegasus->intr_urb);
+ usb_free_urb(pegasus->tx_urb);
+ usb_free_urb(pegasus->rx_urb);
+ usb_free_urb(pegasus->ctrl_urb);
+}
+
+static void unlink_all_urbs(pegasus_t * pegasus)
+{
+ usb_kill_urb(pegasus->intr_urb);
+ usb_kill_urb(pegasus->tx_urb);
+ usb_kill_urb(pegasus->rx_urb);
+ usb_kill_urb(pegasus->ctrl_urb);
+}
+
+static int alloc_urbs(pegasus_t * pegasus)
+{
+ pegasus->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!pegasus->ctrl_urb) {
+ return 0;
+ }
+ pegasus->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!pegasus->rx_urb) {
+ usb_free_urb(pegasus->ctrl_urb);
+ return 0;
+ }
+ pegasus->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!pegasus->tx_urb) {
+ usb_free_urb(pegasus->rx_urb);
+ usb_free_urb(pegasus->ctrl_urb);
+ return 0;
+ }
+ pegasus->intr_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!pegasus->intr_urb) {
+ usb_free_urb(pegasus->tx_urb);
+ usb_free_urb(pegasus->rx_urb);
+ usb_free_urb(pegasus->ctrl_urb);
+ return 0;
+ }
+
+ return 1;
+}
+
+static int pegasus_open(struct net_device *net)
+{
+ pegasus_t *pegasus = netdev_priv(net);
+ int res;
+
+ if (pegasus->rx_skb == NULL)
+ pegasus->rx_skb = pull_skb(pegasus);
+ /*
+ ** Note: no point to free the pool. it is empty :-)
+ */
+ if (!pegasus->rx_skb)
+ return -ENOMEM;
+
+ res = set_registers(pegasus, EthID, 6, net->dev_addr);
+
+ usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
+ usb_rcvbulkpipe(pegasus->usb, 1),
+ pegasus->rx_skb->data, PEGASUS_MTU + 8,
+ read_bulk_callback, pegasus);
+ if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) {
+ if (netif_msg_ifup(pegasus))
+ pr_debug("%s: failed rx_urb, %d", net->name, res);
+ goto exit;
+ }
+
+ usb_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, GFP_KERNEL))) {
+ if (netif_msg_ifup(pegasus))
+ pr_debug("%s: failed intr_urb, %d\n", net->name, res);
+ usb_kill_urb(pegasus->rx_urb);
+ goto exit;
+ }
+ if ((res = enable_net_traffic(net, pegasus->usb))) {
+ if (netif_msg_ifup(pegasus))
+ pr_debug("%s: can't enable_net_traffic() - %d\n",
+ net->name, res);
+ res = -EIO;
+ usb_kill_urb(pegasus->rx_urb);
+ usb_kill_urb(pegasus->intr_urb);
+ free_skb_pool(pegasus);
+ goto exit;
+ }
+ set_carrier(net);
+ netif_start_queue(net);
+ if (netif_msg_ifup(pegasus))
+ pr_debug("%s: open\n", net->name);
+ res = 0;
+exit:
+ return res;
+}
+
+static int pegasus_close(struct net_device *net)
+{
+ pegasus_t *pegasus = netdev_priv(net);
+
+ netif_stop_queue(net);
+ if (!(pegasus->flags & PEGASUS_UNPLUG))
+ disable_net_traffic(pegasus);
+ tasklet_kill(&pegasus->rx_tl);
+ unlink_all_urbs(pegasus);
+
+ return 0;
+}
+
+static void pegasus_get_drvinfo(struct net_device *dev,
+ struct ethtool_drvinfo *info)
+{
+ pegasus_t *pegasus = netdev_priv(dev);
+ strncpy(info->driver, driver_name, sizeof (info->driver) - 1);
+ strncpy(info->version, DRIVER_VERSION, sizeof (info->version) - 1);
+ usb_make_path(pegasus->usb, info->bus_info, sizeof (info->bus_info));
+}
+
+/* also handles three patterns of some kind in hardware */
+#define WOL_SUPPORTED (WAKE_MAGIC|WAKE_PHY)
+
+static void
+pegasus_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
+{
+ pegasus_t *pegasus = netdev_priv(dev);
+
+ wol->supported = WAKE_MAGIC | WAKE_PHY;
+ wol->wolopts = pegasus->wolopts;
+}
+
+static int
+pegasus_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
+{
+ pegasus_t *pegasus = netdev_priv(dev);
+ u8 reg78 = 0x04;
+
+ if (wol->wolopts & ~WOL_SUPPORTED)
+ return -EINVAL;
+
+ if (wol->wolopts & WAKE_MAGIC)
+ reg78 |= 0x80;
+ if (wol->wolopts & WAKE_PHY)
+ reg78 |= 0x40;
+ /* FIXME this 0x10 bit still needs to get set in the chip... */
+ if (wol->wolopts)
+ pegasus->eth_regs[0] |= 0x10;
+ else
+ pegasus->eth_regs[0] &= ~0x10;
+ pegasus->wolopts = wol->wolopts;
+ return set_register(pegasus, WakeupControl, reg78);
+}
+
+static inline void pegasus_reset_wol(struct net_device *dev)
+{
+ struct ethtool_wolinfo wol;
+
+ memset(&wol, 0, sizeof wol);
+ (void) pegasus_set_wol(dev, &wol);
+}
+
+static int
+pegasus_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
+{
+ pegasus_t *pegasus;
+
+ if (in_atomic())
+ return 0;
+
+ pegasus = netdev_priv(dev);
+ mii_ethtool_gset(&pegasus->mii, ecmd);
+
+ return 0;
+}
+
+static int
+pegasus_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
+{
+ pegasus_t *pegasus = netdev_priv(dev);
+ return mii_ethtool_sset(&pegasus->mii, ecmd);
+}
+
+static int pegasus_nway_reset(struct net_device *dev)
+{
+ pegasus_t *pegasus = netdev_priv(dev);
+ return mii_nway_restart(&pegasus->mii);
+}
+
+static u32 pegasus_get_link(struct net_device *dev)
+{
+ pegasus_t *pegasus = netdev_priv(dev);
+ return mii_link_ok(&pegasus->mii);
+}
+
+static u32 pegasus_get_msglevel(struct net_device *dev)
+{
+ pegasus_t *pegasus = netdev_priv(dev);
+ return pegasus->msg_enable;
+}
+
+static void pegasus_set_msglevel(struct net_device *dev, u32 v)
+{
+ pegasus_t *pegasus = netdev_priv(dev);
+ pegasus->msg_enable = v;
+}
+
+static struct ethtool_ops ops = {
+ .get_drvinfo = pegasus_get_drvinfo,
+ .get_settings = pegasus_get_settings,
+ .set_settings = pegasus_set_settings,
+ .nway_reset = pegasus_nway_reset,
+ .get_link = pegasus_get_link,
+ .get_msglevel = pegasus_get_msglevel,
+ .set_msglevel = pegasus_set_msglevel,
+ .get_wol = pegasus_get_wol,
+ .set_wol = pegasus_set_wol,
+};
+
+static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
+{
+ __u16 *data = (__u16 *) & rq->ifr_ifru;
+ pegasus_t *pegasus = netdev_priv(net);
+ int res;
+
+ switch (cmd) {
+ 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))
+ return -EPERM;
+ write_mii_word(pegasus, pegasus->phy, data[1] & 0x1f, data[2]);
+ res = 0;
+ break;
+ default:
+ res = -EOPNOTSUPP;
+ }
+ return res;
+}
+
+static void pegasus_set_multicast(struct net_device *net)
+{
+ pegasus_t *pegasus = netdev_priv(net);
+
+ if (net->flags & IFF_PROMISC) {
+ pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS;
+ if (netif_msg_link(pegasus))
+ pr_info("%s: Promiscuous mode enabled.\n", 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;
+ if (netif_msg_link(pegasus))
+ pr_info("%s: set allmulti\n", net->name);
+ } else {
+ pegasus->eth_regs[EthCtrl0] &= ~RX_MULTICAST;
+ pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS;
+ }
+
+ pegasus->flags |= ETH_REGS_CHANGE;
+ ctrl_callback(pegasus->ctrl_urb, NULL);
+}
+
+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)
+{
+ __u8 data = 0xa5;
+ int ret;
+
+ ret = set_register(pegasus, Reg1d, 0);
+ ret = set_register(pegasus, Reg7b, 1);
+ mdelay(100);
+ if ((pegasus->features & HAS_HOME_PNA) && mii_mode)
+ ret = set_register(pegasus, Reg7b, 0);
+ else
+ ret = set_register(pegasus, Reg7b, 2);
+
+ ret = set_register(pegasus, 0x83, data);
+ ret = get_registers(pegasus, 0x83, 1, &data);
+
+ if (data == 0xa5) {
+ pegasus->chip = 0x8513;
+ } else {
+ pegasus->chip = 0;
+ }
+
+ ret = set_register(pegasus, 0x80, 0xc0);
+ ret = set_register(pegasus, 0x83, 0xff);
+ ret = set_register(pegasus, 0x84, 0x01);
+
+ if (pegasus->features & HAS_HOME_PNA && mii_mode)
+ ret = set_register(pegasus, Reg81, 6);
+ else
+ ret = set_register(pegasus, Reg81, 2);
+}
+
+
+static struct workqueue_struct *pegasus_workqueue = NULL;
+#define CARRIER_CHECK_DELAY (2 * HZ)
+
+static void check_carrier(void *data)
+{
+ pegasus_t *pegasus = data;
+ set_carrier(pegasus->net);
+ if (!(pegasus->flags & PEGASUS_UNPLUG)) {
+ queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check,
+ CARRIER_CHECK_DELAY);
+ }
+}
+
+static int pegasus_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct net_device *net;
+ pegasus_t *pegasus;
+ int dev_index = id - pegasus_ids;
+ int res = -ENOMEM;
+
+ usb_get_dev(dev);
+ net = alloc_etherdev(sizeof(struct pegasus));
+ if (!net) {
+ dev_err(&intf->dev, "can't allocate %s\n", "device");
+ goto out;
+ }
+
+ pegasus = netdev_priv(net);
+ memset(pegasus, 0, sizeof (struct pegasus));
+ pegasus->dev_index = dev_index;
+ init_waitqueue_head(&pegasus->ctrl_wait);
+
+ if (!alloc_urbs(pegasus)) {
+ dev_err(&intf->dev, "can't allocate %s\n", "urbs");
+ goto out1;
+ }
+
+ tasklet_init(&pegasus->rx_tl, rx_fixup, (unsigned long) pegasus);
+
+ INIT_WORK(&pegasus->carrier_check, check_carrier, pegasus);
+
+ pegasus->intf = intf;
+ pegasus->usb = dev;
+ pegasus->net = net;
+ SET_MODULE_OWNER(net);
+ net->open = pegasus_open;
+ net->stop = pegasus_close;
+ net->watchdog_timeo = PEGASUS_TX_TIMEOUT;
+ net->tx_timeout = pegasus_tx_timeout;
+ net->do_ioctl = pegasus_ioctl;
+ net->hard_start_xmit = pegasus_start_xmit;
+ net->set_multicast_list = pegasus_set_multicast;
+ net->get_stats = pegasus_netdev_stats;
+ SET_ETHTOOL_OPS(net, &ops);
+ pegasus->mii.dev = net;
+ pegasus->mii.mdio_read = mdio_read;
+ pegasus->mii.mdio_write = mdio_write;
+ pegasus->mii.phy_id_mask = 0x1f;
+ pegasus->mii.reg_num_mask = 0x1f;
+ spin_lock_init(&pegasus->rx_pool_lock);
+ pegasus->msg_enable = netif_msg_init (msg_level, NETIF_MSG_DRV
+ | NETIF_MSG_PROBE | NETIF_MSG_LINK);
+
+ pegasus->features = usb_dev_id[dev_index].private;
+ get_interrupt_interval(pegasus);
+ if (reset_mac(pegasus)) {
+ dev_err(&intf->dev, "can't reset MAC\n");
+ res = -EIO;
+ goto out2;
+ }
+ set_ethernet_addr(pegasus);
+ fill_skb_pool(pegasus);
+ if (pegasus->features & PEGASUS_II) {
+ dev_info(&intf->dev, "setup Pegasus II specific registers\n");
+ setup_pegasus_II(pegasus);
+ }
+ pegasus->phy = mii_phy_probe(pegasus);
+ if (pegasus->phy == 0xff) {
+ dev_warn(&intf->dev, "can't locate MII phy, using default\n");
+ pegasus->phy = 1;
+ }
+ pegasus->mii.phy_id = pegasus->phy;
+ usb_set_intfdata(intf, pegasus);
+ SET_NETDEV_DEV(net, &intf->dev);
+ pegasus_reset_wol(net);
+ res = register_netdev(net);
+ if (res)
+ goto out3;
+ queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check,
+ CARRIER_CHECK_DELAY);
+
+ dev_info(&intf->dev, "%s, %s, %02x:%02x:%02x:%02x:%02x:%02x\n",
+ net->name,
+ usb_dev_id[dev_index].name,
+ net->dev_addr [0], net->dev_addr [1],
+ net->dev_addr [2], net->dev_addr [3],
+ net->dev_addr [4], net->dev_addr [5]);
+ return 0;
+
+out3:
+ usb_set_intfdata(intf, NULL);
+ free_skb_pool(pegasus);
+out2:
+ free_all_urbs(pegasus);
+out1:
+ free_netdev(net);
+out:
+ usb_put_dev(dev);
+ return res;
+}
+
+static void pegasus_disconnect(struct usb_interface *intf)
+{
+ struct pegasus *pegasus = usb_get_intfdata(intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (!pegasus) {
+ dev_dbg(&intf->dev, "unregistering non-bound device?\n");
+ return;
+ }
+
+ pegasus->flags |= PEGASUS_UNPLUG;
+ cancel_delayed_work(&pegasus->carrier_check);
+ unregister_netdev(pegasus->net);
+ usb_put_dev(interface_to_usbdev(intf));
+ free_all_urbs(pegasus);
+ free_skb_pool(pegasus);
+ if (pegasus->rx_skb)
+ dev_kfree_skb(pegasus->rx_skb);
+ free_netdev(pegasus->net);
+}
+
+static int pegasus_suspend (struct usb_interface *intf, pm_message_t state)
+{
+ struct pegasus *pegasus = usb_get_intfdata(intf);
+
+ netif_device_detach (pegasus->net);
+ return 0;
+}
+
+static int pegasus_resume (struct usb_interface *intf)
+{
+ struct pegasus *pegasus = usb_get_intfdata(intf);
+
+ netif_device_attach (pegasus->net);
+ return 0;
+}
+
+static struct usb_driver pegasus_driver = {
+ .name = driver_name,
+ .probe = pegasus_probe,
+ .disconnect = pegasus_disconnect,
+ .id_table = pegasus_ids,
+ .suspend = pegasus_suspend,
+ .resume = pegasus_resume,
+};
+
+static int __init pegasus_init(void)
+{
+ pr_info("%s: %s, " DRIVER_DESC "\n", driver_name, DRIVER_VERSION);
+ pegasus_workqueue = create_singlethread_workqueue("pegasus");
+ if (!pegasus_workqueue)
+ return -ENOMEM;
+ return usb_register(&pegasus_driver);
+}
+
+static void __exit pegasus_exit(void)
+{
+ destroy_workqueue(pegasus_workqueue);
+ usb_deregister(&pegasus_driver);
+}
+
+module_init(pegasus_init);
+module_exit(pegasus_exit);
diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h
new file mode 100644
index 000000000000..13ccedef5c7e
--- /dev/null
+++ b/drivers/usb/net/pegasus.h
@@ -0,0 +1,298 @@
+/*
+ * Copyright (c) 1999-2003 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.
+ */
+
+
+#ifndef PEGASUS_DEV
+
+#define PEGASUS_II 0x80000000
+#define HAS_HOME_PNA 0x40000000
+
+#define PEGASUS_MTU 1536
+#define RX_SKBS 4
+
+#define EPROM_WRITE 0x01
+#define EPROM_READ 0x02
+#define EPROM_DONE 0x04
+#define EPROM_WR_ENABLE 0x10
+#define EPROM_LOAD 0x20
+
+#define PHY_DONE 0x80
+#define PHY_READ 0x40
+#define PHY_WRITE 0x20
+#define DEFAULT_GPIO_RESET 0x24
+#define LINKSYS_GPIO_RESET 0x24
+#define DEFAULT_GPIO_SET 0x26
+
+#define PEGASUS_PRESENT 0x00000001
+#define PEGASUS_TX_BUSY 0x00000004
+#define PEGASUS_RX_BUSY 0x00000008
+#define CTRL_URB_RUNNING 0x00000010
+#define CTRL_URB_SLEEP 0x00000020
+#define PEGASUS_UNPLUG 0x00000040
+#define PEGASUS_RX_URB_FAIL 0x00000080
+#define ETH_REGS_CHANGE 0x40000000
+#define ETH_REGS_CHANGED 0x80000000
+
+#define RX_MULTICAST 2
+#define RX_PROMISCUOUS 4
+
+#define REG_TIMEOUT (HZ)
+#define PEGASUS_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
+
+#define LINK_STATUS 0x01
+
+#define PEGASUS_REQT_READ 0xc0
+#define PEGASUS_REQT_WRITE 0x40
+#define PEGASUS_REQ_GET_REGS 0xf0
+#define PEGASUS_REQ_SET_REGS 0xf1
+#define PEGASUS_REQ_SET_REG PEGASUS_REQ_SET_REGS
+
+enum pegasus_registers {
+ EthCtrl0 = 0,
+ EthCtrl1 = 1,
+ EthCtrl2 = 2,
+ EthID = 0x10,
+ Reg1d = 0x1d,
+ EpromOffset = 0x20,
+ EpromData = 0x21, /* 0x21 low, 0x22 high byte */
+ EpromCtrl = 0x23,
+ PhyAddr = 0x25,
+ PhyData = 0x26, /* 0x26 low, 0x27 high byte */
+ PhyCtrl = 0x28,
+ UsbStst = 0x2a,
+ EthTxStat0 = 0x2b,
+ EthTxStat1 = 0x2c,
+ EthRxStat = 0x2d,
+ WakeupControl = 0x78,
+ Reg7b = 0x7b,
+ Gpio0 = 0x7e,
+ Gpio1 = 0x7f,
+ Reg81 = 0x81,
+};
+
+
+typedef struct pegasus {
+ struct usb_device *usb;
+ struct usb_interface *intf;
+ struct net_device *net;
+ struct net_device_stats stats;
+ struct mii_if_info mii;
+ unsigned flags;
+ unsigned features;
+ u32 msg_enable;
+ u32 wolopts;
+ int dev_index;
+ int intr_interval;
+ struct tasklet_struct rx_tl;
+ struct work_struct carrier_check;
+ struct urb *ctrl_urb, *rx_urb, *tx_urb, *intr_urb;
+ struct sk_buff *rx_pool[RX_SKBS];
+ struct sk_buff *rx_skb;
+ struct usb_ctrlrequest dr;
+ wait_queue_head_t ctrl_wait;
+ spinlock_t rx_pool_lock;
+ int chip;
+ unsigned char intr_buff[8];
+ __u8 tx_buff[PEGASUS_MTU];
+ __u8 eth_regs[4];
+ __u8 phy;
+ __u8 gpio_res;
+} pegasus_t;
+
+
+struct usb_eth_dev {
+ char *name;
+ __u16 vendor;
+ __u16 device;
+ __u32 private; /* LSB is gpio reset value */
+};
+
+#define VENDOR_3COM 0x0506
+#define VENDOR_ABOCOM 0x07b8
+#define VENDOR_ACCTON 0x083a
+#define VENDOR_ADMTEK 0x07a6
+#define VENDOR_AEILAB 0x3334
+#define VENDOR_ALLIEDTEL 0x07c9
+#define VENDOR_ATEN 0x0557
+#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_GIGABYTE 0x1044
+#define VENDOR_HAWKING 0x0e66
+#define VENDOR_HP 0x03f0
+#define VENDOR_IODATA 0x04bb
+#define VENDOR_KINGSTON 0x0951
+#define VENDOR_LANEED 0x056e
+#define VENDOR_LINKSYS 0x066b
+#define VENDOR_MELCO 0x0411
+#define VENDOR_MICROSOFT 0x045e
+#define VENDOR_MOBILITY 0x1342
+#define VENDOR_NETGEAR 0x0846
+#define VENDOR_OCT 0x0b39
+#define VENDOR_SMARTBRIDGES 0x08d1
+#define VENDOR_SMC 0x0707
+#define VENDOR_SOHOWARE 0x15e8
+#define VENDOR_SIEMENS 0x067c
+
+
+#else /* PEGASUS_DEV */
+
+PEGASUS_DEV( "3Com USB Ethernet 3C460B", VENDOR_3COM, 0x4601,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "ATEN USB Ethernet UC-110T", VENDOR_ATEN, 0x2007,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "USB HPNA/Ethernet", VENDOR_ABOCOM, 0x110c,
+ DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA )
+PEGASUS_DEV( "USB HPNA/Ethernet", VENDOR_ABOCOM, 0x4104,
+ DEFAULT_GPIO_RESET | HAS_HOME_PNA )
+PEGASUS_DEV( "USB HPNA/Ethernet", VENDOR_ABOCOM, 0x4004,
+ DEFAULT_GPIO_RESET | HAS_HOME_PNA )
+PEGASUS_DEV( "USB HPNA/Ethernet", VENDOR_ABOCOM, 0x4007,
+ DEFAULT_GPIO_RESET | HAS_HOME_PNA )
+PEGASUS_DEV( "USB 10/100 Fast Ethernet", VENDOR_ABOCOM, 0x4102,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "USB 10/100 Fast Ethernet", VENDOR_ABOCOM, 0x4002,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "USB 10/100 Fast Ethernet", VENDOR_ABOCOM, 0x400b,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "USB 10/100 Fast Ethernet", VENDOR_ABOCOM, 0x400c,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "USB 10/100 Fast Ethernet", VENDOR_ABOCOM, 0xabc1,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "USB 10/100 Fast Ethernet", VENDOR_ABOCOM, 0x200c,
+ 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_II )
+PEGASUS_DEV( "ADMtek ADM8511 \"Pegasus II\" USB Ethernet",
+ VENDOR_ADMTEK, 0x8511,
+ DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA )
+PEGASUS_DEV( "ADMtek ADM8513 \"Pegasus II\" USB Ethernet",
+ VENDOR_ADMTEK, 0x8513,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "ADMtek ADM8515 \"Pegasus II\" USB-2.0 Ethernet",
+ VENDOR_ADMTEK, 0x8515,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "ADMtek AN986 \"Pegasus\" USB Ethernet (evaluation board)",
+ VENDOR_ADMTEK, 0x0986,
+ DEFAULT_GPIO_RESET | HAS_HOME_PNA )
+PEGASUS_DEV( "AN986A USB MAC", VENDOR_ADMTEK, 1986,
+ 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,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986,
+ 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 USB-TXS", 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,
+ LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4102,
+ LINKSYS_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x400b,
+ LINKSYS_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x200c,
+ LINKSYS_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "D-Link DSB-650TX(PNA)", VENDOR_DLINK, 0x4003,
+ 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( "EasiDock Ethernet", VENDOR_MOBILITY, 0x0304,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "GIGABYTE GN-BR402W Wireless Router", VENDOR_GIGABYTE, 0x8002,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "Hawking UF100 10/100 Ethernet", VENDOR_HAWKING, 0x400c,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "HP hn210c Ethernet USB", VENDOR_HP, 0x811c,
+ 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,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x400b,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "LANEED USB Ethernet LD-USB/T", VENDOR_LANEED, 0xabc1,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x200c,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x2202,
+ LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2203,
+ LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2204,
+ LINKSYS_GPIO_RESET | HAS_HOME_PNA )
+PEGASUS_DEV( "Linksys USB10T Ethernet Adapter", VENDOR_LINKSYS, 0x2206,
+ LINKSYS_GPIO_RESET | PEGASUS_II)
+PEGASUS_DEV( "Linksys USB USB100TX", VENDOR_LINKSYS, 0x400b,
+ LINKSYS_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x200c,
+ LINKSYS_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0001,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0005,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "MELCO/BUFFALO LUA2-TX", VENDOR_MELCO, 0x0009,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "Microsoft MN-110", VENDOR_MICROSOFT, 0x007a,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "NETGEAR FA101", VENDOR_NETGEAR, 0x1020,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "OCT Inc.", VENDOR_OCT, 0x0109,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "OCT USB TO Ethernet", VENDOR_OCT, 0x0901,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "smartNIC 2 PnP Adapter", VENDOR_SMARTBRIDGES, 0x0003,
+ 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 */
diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
new file mode 100644
index 000000000000..8fb223385f2f
--- /dev/null
+++ b/drivers/usb/net/rtl8150.c
@@ -0,0 +1,942 @@
+/*
+ * Copyright (c) 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.
+ */
+
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/signal.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/mii.h>
+#include <linux/ethtool.h>
+#include <linux/usb.h>
+#include <asm/uaccess.h>
+
+/* Version Information */
+#define DRIVER_VERSION "v0.6.2 (2004/08/27)"
+#define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
+#define DRIVER_DESC "rtl8150 based usb-ethernet driver"
+
+#define IDR 0x0120
+#define MAR 0x0126
+#define CR 0x012e
+#define TCR 0x012f
+#define RCR 0x0130
+#define TSR 0x0132
+#define RSR 0x0133
+#define CON0 0x0135
+#define CON1 0x0136
+#define MSR 0x0137
+#define PHYADD 0x0138
+#define PHYDAT 0x0139
+#define PHYCNT 0x013b
+#define GPPC 0x013d
+#define BMCR 0x0140
+#define BMSR 0x0142
+#define ANAR 0x0144
+#define ANLP 0x0146
+#define AER 0x0148
+#define CSCR 0x014C /* This one has the link status */
+#define CSCR_LINK_STATUS (1 << 3)
+
+#define IDR_EEPROM 0x1202
+
+#define PHY_READ 0
+#define PHY_WRITE 0x20
+#define PHY_GO 0x40
+
+#define MII_TIMEOUT 10
+#define INTBUFSIZE 8
+
+#define RTL8150_REQT_READ 0xc0
+#define RTL8150_REQT_WRITE 0x40
+#define RTL8150_REQ_GET_REGS 0x05
+#define RTL8150_REQ_SET_REGS 0x05
+
+
+/* Transmit status register errors */
+#define TSR_ECOL (1<<5)
+#define TSR_LCOL (1<<4)
+#define TSR_LOSS_CRS (1<<3)
+#define TSR_JBR (1<<2)
+#define TSR_ERRORS (TSR_ECOL | TSR_LCOL | TSR_LOSS_CRS | TSR_JBR)
+/* Receive status register errors */
+#define RSR_CRC (1<<2)
+#define RSR_FAE (1<<1)
+#define RSR_ERRORS (RSR_CRC | RSR_FAE)
+
+/* Media status register definitions */
+#define MSR_DUPLEX (1<<4)
+#define MSR_SPEED (1<<3)
+#define MSR_LINK (1<<2)
+
+/* Interrupt pipe data */
+#define INT_TSR 0x00
+#define INT_RSR 0x01
+#define INT_MSR 0x02
+#define INT_WAKSR 0x03
+#define INT_TXOK_CNT 0x04
+#define INT_RXLOST_CNT 0x05
+#define INT_CRERR_CNT 0x06
+#define INT_COL_CNT 0x07
+
+/* Transmit status register errors */
+#define TSR_ECOL (1<<5)
+#define TSR_LCOL (1<<4)
+#define TSR_LOSS_CRS (1<<3)
+#define TSR_JBR (1<<2)
+#define TSR_ERRORS (TSR_ECOL | TSR_LCOL | TSR_LOSS_CRS | TSR_JBR)
+/* Receive status register errors */
+#define RSR_CRC (1<<2)
+#define RSR_FAE (1<<1)
+#define RSR_ERRORS (RSR_CRC | RSR_FAE)
+
+/* Media status register definitions */
+#define MSR_DUPLEX (1<<4)
+#define MSR_SPEED (1<<3)
+#define MSR_LINK (1<<2)
+
+/* Interrupt pipe data */
+#define INT_TSR 0x00
+#define INT_RSR 0x01
+#define INT_MSR 0x02
+#define INT_WAKSR 0x03
+#define INT_TXOK_CNT 0x04
+#define INT_RXLOST_CNT 0x05
+#define INT_CRERR_CNT 0x06
+#define INT_COL_CNT 0x07
+
+
+#define RTL8150_MTU 1540
+#define RTL8150_TX_TIMEOUT (HZ)
+#define RX_SKB_POOL_SIZE 4
+
+/* rtl8150 flags */
+#define RTL8150_HW_CRC 0
+#define RX_REG_SET 1
+#define RTL8150_UNPLUG 2
+#define RX_URB_FAIL 3
+
+/* Define these values to match your device */
+#define VENDOR_ID_REALTEK 0x0bda
+#define VENDOR_ID_MELCO 0x0411
+#define VENDOR_ID_MICRONET 0x3980
+#define VENDOR_ID_LONGSHINE 0x07b8
+
+#define PRODUCT_ID_RTL8150 0x8150
+#define PRODUCT_ID_LUAKTX 0x0012
+#define PRODUCT_ID_LCS8138TX 0x401a
+#define PRODUCT_ID_SP128AR 0x0003
+
+#undef EEPROM_WRITE
+
+/* table of devices that work with this driver */
+static struct usb_device_id rtl8150_table[] = {
+ {USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8150)},
+ {USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)},
+ {USB_DEVICE(VENDOR_ID_MICRONET, PRODUCT_ID_SP128AR)},
+ {USB_DEVICE(VENDOR_ID_LONGSHINE, PRODUCT_ID_LCS8138TX)},
+ {}
+};
+
+MODULE_DEVICE_TABLE(usb, rtl8150_table);
+
+struct rtl8150 {
+ unsigned long flags;
+ struct usb_device *udev;
+ struct tasklet_struct tl;
+ struct net_device_stats stats;
+ struct net_device *netdev;
+ struct urb *rx_urb, *tx_urb, *intr_urb, *ctrl_urb;
+ struct sk_buff *tx_skb, *rx_skb;
+ struct sk_buff *rx_skb_pool[RX_SKB_POOL_SIZE];
+ spinlock_t rx_pool_lock;
+ struct usb_ctrlrequest dr;
+ int intr_interval;
+ __le16 rx_creg;
+ u8 *intr_buff;
+ u8 phy;
+};
+
+typedef struct rtl8150 rtl8150_t;
+
+static unsigned long multicast_filter_limit = 32;
+
+static void fill_skb_pool(rtl8150_t *);
+static void free_skb_pool(rtl8150_t *);
+static inline struct sk_buff *pull_skb(rtl8150_t *);
+static void rtl8150_disconnect(struct usb_interface *intf);
+static int rtl8150_probe(struct usb_interface *intf,
+ const struct usb_device_id *id);
+
+static const char driver_name [] = "rtl8150";
+
+static struct usb_driver rtl8150_driver = {
+ .owner = THIS_MODULE,
+ .name = driver_name,
+ .probe = rtl8150_probe,
+ .disconnect = rtl8150_disconnect,
+ .id_table = rtl8150_table,
+};
+
+/*
+**
+** device related part of the code
+**
+*/
+static int get_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
+{
+ return usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0),
+ RTL8150_REQ_GET_REGS, RTL8150_REQT_READ,
+ indx, 0, data, size, 500);
+}
+
+static int set_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
+{
+ return usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
+ RTL8150_REQ_SET_REGS, RTL8150_REQT_WRITE,
+ indx, 0, data, size, 500);
+}
+
+static void ctrl_callback(struct urb *urb, struct pt_regs *regs)
+{
+ rtl8150_t *dev;
+
+ switch (urb->status) {
+ case 0:
+ break;
+ case -EINPROGRESS:
+ break;
+ case -ENOENT:
+ break;
+ default:
+ warn("ctrl urb status %d", urb->status);
+ }
+ dev = urb->context;
+ clear_bit(RX_REG_SET, &dev->flags);
+}
+
+static int async_set_registers(rtl8150_t * dev, u16 indx, u16 size)
+{
+ int ret;
+
+ if (test_bit(RX_REG_SET, &dev->flags))
+ return -EAGAIN;
+
+ dev->dr.bRequestType = RTL8150_REQT_WRITE;
+ dev->dr.bRequest = RTL8150_REQ_SET_REGS;
+ dev->dr.wValue = cpu_to_le16(indx);
+ dev->dr.wIndex = 0;
+ dev->dr.wLength = cpu_to_le16(size);
+ dev->ctrl_urb->transfer_buffer_length = size;
+ usb_fill_control_urb(dev->ctrl_urb, dev->udev,
+ usb_sndctrlpipe(dev->udev, 0), (char *) &dev->dr,
+ &dev->rx_creg, size, ctrl_callback, dev);
+ if ((ret = usb_submit_urb(dev->ctrl_urb, GFP_ATOMIC)))
+ err("control request submission failed: %d", ret);
+ else
+ set_bit(RX_REG_SET, &dev->flags);
+
+ return ret;
+}
+
+static int read_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 * reg)
+{
+ int i;
+ u8 data[3], tmp;
+
+ data[0] = phy;
+ data[1] = data[2] = 0;
+ tmp = indx | PHY_READ | PHY_GO;
+ i = 0;
+
+ set_registers(dev, PHYADD, sizeof(data), data);
+ set_registers(dev, PHYCNT, 1, &tmp);
+ do {
+ get_registers(dev, PHYCNT, 1, data);
+ } while ((data[0] & PHY_GO) && (i++ < MII_TIMEOUT));
+
+ if (i < MII_TIMEOUT) {
+ get_registers(dev, PHYDAT, 2, data);
+ *reg = data[0] | (data[1] << 8);
+ return 0;
+ } else
+ return 1;
+}
+
+static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg)
+{
+ int i;
+ u8 data[3], tmp;
+
+ data[0] = phy;
+ *(data + 1) = cpu_to_le16p(&reg);
+ tmp = indx | PHY_WRITE | PHY_GO;
+ i = 0;
+
+ set_registers(dev, PHYADD, sizeof(data), data);
+ set_registers(dev, PHYCNT, 1, &tmp);
+ do {
+ get_registers(dev, PHYCNT, 1, data);
+ } while ((data[0] & PHY_GO) && (i++ < MII_TIMEOUT));
+
+ if (i < MII_TIMEOUT)
+ return 0;
+ else
+ return 1;
+}
+
+static inline void set_ethernet_addr(rtl8150_t * dev)
+{
+ u8 node_id[6];
+
+ get_registers(dev, IDR, sizeof(node_id), node_id);
+ memcpy(dev->netdev->dev_addr, node_id, sizeof(node_id));
+}
+
+static int rtl8150_set_mac_address(struct net_device *netdev, void *p)
+{
+ struct sockaddr *addr = p;
+ rtl8150_t *dev = netdev_priv(netdev);
+ int i;
+
+ if (netif_running(netdev))
+ return -EBUSY;
+
+ memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
+ dbg("%s: Setting MAC address to ", netdev->name);
+ for (i = 0; i < 5; i++)
+ dbg("%02X:", netdev->dev_addr[i]);
+ dbg("%02X\n", netdev->dev_addr[i]);
+ /* Set the IDR registers. */
+ set_registers(dev, IDR, sizeof(netdev->dev_addr), netdev->dev_addr);
+#ifdef EEPROM_WRITE
+ {
+ u8 cr;
+ /* Get the CR contents. */
+ get_registers(dev, CR, 1, &cr);
+ /* Set the WEPROM bit (eeprom write enable). */
+ cr |= 0x20;
+ set_registers(dev, CR, 1, &cr);
+ /* Write the MAC address into eeprom. Eeprom writes must be word-sized,
+ so we need to split them up. */
+ for (i = 0; i * 2 < netdev->addr_len; i++) {
+ set_registers(dev, IDR_EEPROM + (i * 2), 2,
+ netdev->dev_addr + (i * 2));
+ }
+ /* Clear the WEPROM bit (preventing accidental eeprom writes). */
+ cr &= 0xdf;
+ set_registers(dev, CR, 1, &cr);
+ }
+#endif
+ return 0;
+}
+
+static int rtl8150_reset(rtl8150_t * dev)
+{
+ u8 data = 0x10;
+ int i = HZ;
+
+ set_registers(dev, CR, 1, &data);
+ do {
+ get_registers(dev, CR, 1, &data);
+ } while ((data & 0x10) && --i);
+
+ return (i > 0) ? 1 : 0;
+}
+
+static int alloc_all_urbs(rtl8150_t * dev)
+{
+ dev->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!dev->rx_urb)
+ return 0;
+ dev->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!dev->tx_urb) {
+ usb_free_urb(dev->rx_urb);
+ return 0;
+ }
+ dev->intr_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!dev->intr_urb) {
+ usb_free_urb(dev->rx_urb);
+ usb_free_urb(dev->tx_urb);
+ return 0;
+ }
+ dev->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!dev->intr_urb) {
+ usb_free_urb(dev->rx_urb);
+ usb_free_urb(dev->tx_urb);
+ usb_free_urb(dev->intr_urb);
+ return 0;
+ }
+
+ return 1;
+}
+
+static void free_all_urbs(rtl8150_t * dev)
+{
+ usb_free_urb(dev->rx_urb);
+ usb_free_urb(dev->tx_urb);
+ usb_free_urb(dev->intr_urb);
+ usb_free_urb(dev->ctrl_urb);
+}
+
+static void unlink_all_urbs(rtl8150_t * dev)
+{
+ usb_kill_urb(dev->rx_urb);
+ usb_kill_urb(dev->tx_urb);
+ usb_kill_urb(dev->intr_urb);
+ usb_kill_urb(dev->ctrl_urb);
+}
+
+static inline struct sk_buff *pull_skb(rtl8150_t *dev)
+{
+ struct sk_buff *skb;
+ int i;
+
+ for (i = 0; i < RX_SKB_POOL_SIZE; i++) {
+ if (dev->rx_skb_pool[i]) {
+ skb = dev->rx_skb_pool[i];
+ dev->rx_skb_pool[i] = NULL;
+ return skb;
+ }
+ }
+ return NULL;
+}
+
+static void read_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ rtl8150_t *dev;
+ unsigned pkt_len, res;
+ struct sk_buff *skb;
+ struct net_device *netdev;
+ u16 rx_stat;
+
+ dev = urb->context;
+ if (!dev)
+ return;
+ if (test_bit(RTL8150_UNPLUG, &dev->flags))
+ return;
+ netdev = dev->netdev;
+ if (!netif_device_present(netdev))
+ return;
+
+ switch (urb->status) {
+ case 0:
+ break;
+ case -ENOENT:
+ return; /* the urb is in unlink state */
+ case -ETIMEDOUT:
+ warn("may be reset is needed?..");
+ goto goon;
+ default:
+ warn("Rx status %d", urb->status);
+ goto goon;
+ }
+
+ if (!dev->rx_skb)
+ goto resched;
+ /* protect against short packets (tell me why we got some?!?) */
+ if (urb->actual_length < 4)
+ goto goon;
+
+ res = urb->actual_length;
+ rx_stat = le16_to_cpu(*(__le16 *)(urb->transfer_buffer + res - 4));
+ pkt_len = res - 4;
+
+ skb_put(dev->rx_skb, pkt_len);
+ dev->rx_skb->protocol = eth_type_trans(dev->rx_skb, netdev);
+ netif_rx(dev->rx_skb);
+ dev->stats.rx_packets++;
+ dev->stats.rx_bytes += pkt_len;
+
+ spin_lock(&dev->rx_pool_lock);
+ skb = pull_skb(dev);
+ spin_unlock(&dev->rx_pool_lock);
+ if (!skb)
+ goto resched;
+
+ dev->rx_skb = skb;
+goon:
+ usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
+ dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev);
+ if (usb_submit_urb(dev->rx_urb, GFP_ATOMIC)) {
+ set_bit(RX_URB_FAIL, &dev->flags);
+ goto resched;
+ } else {
+ clear_bit(RX_URB_FAIL, &dev->flags);
+ }
+
+ return;
+resched:
+ tasklet_schedule(&dev->tl);
+}
+
+static void rx_fixup(unsigned long data)
+{
+ rtl8150_t *dev;
+ struct sk_buff *skb;
+
+ dev = (rtl8150_t *)data;
+
+ spin_lock_irq(&dev->rx_pool_lock);
+ fill_skb_pool(dev);
+ spin_unlock_irq(&dev->rx_pool_lock);
+ if (test_bit(RX_URB_FAIL, &dev->flags))
+ if (dev->rx_skb)
+ goto try_again;
+ spin_lock_irq(&dev->rx_pool_lock);
+ skb = pull_skb(dev);
+ spin_unlock_irq(&dev->rx_pool_lock);
+ if (skb == NULL)
+ goto tlsched;
+ dev->rx_skb = skb;
+ usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
+ dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev);
+try_again:
+ if (usb_submit_urb(dev->rx_urb, GFP_ATOMIC)) {
+ set_bit(RX_URB_FAIL, &dev->flags);
+ goto tlsched;
+ } else {
+ clear_bit(RX_URB_FAIL, &dev->flags);
+ }
+
+ return;
+tlsched:
+ tasklet_schedule(&dev->tl);
+}
+
+static void write_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ rtl8150_t *dev;
+
+ dev = urb->context;
+ if (!dev)
+ return;
+ dev_kfree_skb_irq(dev->tx_skb);
+ if (!netif_device_present(dev->netdev))
+ return;
+ if (urb->status)
+ info("%s: Tx status %d", dev->netdev->name, urb->status);
+ dev->netdev->trans_start = jiffies;
+ netif_wake_queue(dev->netdev);
+}
+
+static void intr_callback(struct urb *urb, struct pt_regs *regs)
+{
+ rtl8150_t *dev;
+ __u8 *d;
+ int status;
+
+ dev = urb->context;
+ if (!dev)
+ return;
+ switch (urb->status) {
+ case 0: /* success */
+ break;
+ case -ECONNRESET: /* unlink */
+ case -ENOENT:
+ case -ESHUTDOWN:
+ return;
+ /* -EPIPE: should clear the halt */
+ default:
+ info("%s: intr status %d", dev->netdev->name, urb->status);
+ goto resubmit;
+ }
+
+ d = urb->transfer_buffer;
+ if (d[0] & TSR_ERRORS) {
+ dev->stats.tx_errors++;
+ if (d[INT_TSR] & (TSR_ECOL | TSR_JBR))
+ dev->stats.tx_aborted_errors++;
+ if (d[INT_TSR] & TSR_LCOL)
+ dev->stats.tx_window_errors++;
+ if (d[INT_TSR] & TSR_LOSS_CRS)
+ dev->stats.tx_carrier_errors++;
+ }
+ /* Report link status changes to the network stack */
+ if ((d[INT_MSR] & MSR_LINK) == 0) {
+ if (netif_carrier_ok(dev->netdev)) {
+ netif_carrier_off(dev->netdev);
+ dbg("%s: LINK LOST\n", __func__);
+ }
+ } else {
+ if (!netif_carrier_ok(dev->netdev)) {
+ netif_carrier_on(dev->netdev);
+ dbg("%s: LINK CAME BACK\n", __func__);
+ }
+ }
+
+resubmit:
+ status = usb_submit_urb (urb, SLAB_ATOMIC);
+ if (status)
+ err ("can't resubmit intr, %s-%s/input0, status %d",
+ dev->udev->bus->bus_name,
+ dev->udev->devpath, status);
+}
+
+
+/*
+**
+** network related part of the code
+**
+*/
+
+static void fill_skb_pool(rtl8150_t *dev)
+{
+ struct sk_buff *skb;
+ int i;
+
+ for (i = 0; i < RX_SKB_POOL_SIZE; i++) {
+ if (dev->rx_skb_pool[i])
+ continue;
+ skb = dev_alloc_skb(RTL8150_MTU + 2);
+ if (!skb) {
+ return;
+ }
+ skb->dev = dev->netdev;
+ skb_reserve(skb, 2);
+ dev->rx_skb_pool[i] = skb;
+ }
+}
+
+static void free_skb_pool(rtl8150_t *dev)
+{
+ int i;
+
+ for (i = 0; i < RX_SKB_POOL_SIZE; i++)
+ if (dev->rx_skb_pool[i])
+ dev_kfree_skb(dev->rx_skb_pool[i]);
+}
+
+static int enable_net_traffic(rtl8150_t * dev)
+{
+ u8 cr, tcr, rcr, msr;
+
+ if (!rtl8150_reset(dev)) {
+ warn("%s - device reset failed", __FUNCTION__);
+ }
+ /* RCR bit7=1 attach Rx info at the end; =0 HW CRC (which is broken) */
+ rcr = 0x9e;
+ dev->rx_creg = cpu_to_le16(rcr);
+ tcr = 0xd8;
+ cr = 0x0c;
+ if (!(rcr & 0x80))
+ set_bit(RTL8150_HW_CRC, &dev->flags);
+ set_registers(dev, RCR, 1, &rcr);
+ set_registers(dev, TCR, 1, &tcr);
+ set_registers(dev, CR, 1, &cr);
+ get_registers(dev, MSR, 1, &msr);
+
+ return 0;
+}
+
+static void disable_net_traffic(rtl8150_t * dev)
+{
+ u8 cr;
+
+ get_registers(dev, CR, 1, &cr);
+ cr &= 0xf3;
+ set_registers(dev, CR, 1, &cr);
+}
+
+static struct net_device_stats *rtl8150_netdev_stats(struct net_device *dev)
+{
+ return &((rtl8150_t *)netdev_priv(dev))->stats;
+}
+
+static void rtl8150_tx_timeout(struct net_device *netdev)
+{
+ rtl8150_t *dev = netdev_priv(netdev);
+ warn("%s: Tx timeout.", netdev->name);
+ dev->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ usb_unlink_urb(dev->tx_urb);
+ dev->stats.tx_errors++;
+}
+
+static void rtl8150_set_multicast(struct net_device *netdev)
+{
+ rtl8150_t *dev = netdev_priv(netdev);
+ netif_stop_queue(netdev);
+ if (netdev->flags & IFF_PROMISC) {
+ dev->rx_creg |= cpu_to_le16(0x0001);
+ info("%s: promiscuous mode", netdev->name);
+ } else if ((netdev->mc_count > multicast_filter_limit) ||
+ (netdev->flags & IFF_ALLMULTI)) {
+ dev->rx_creg &= cpu_to_le16(0xfffe);
+ dev->rx_creg |= cpu_to_le16(0x0002);
+ info("%s: allmulti set", netdev->name);
+ } else {
+ /* ~RX_MULTICAST, ~RX_PROMISCUOUS */
+ dev->rx_creg &= cpu_to_le16(0x00fc);
+ }
+ async_set_registers(dev, RCR, 2);
+ netif_wake_queue(netdev);
+}
+
+static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+{
+ rtl8150_t *dev = netdev_priv(netdev);
+ int count, res;
+
+ netif_stop_queue(netdev);
+ count = (skb->len < 60) ? 60 : skb->len;
+ count = (count & 0x3f) ? count : count + 1;
+ dev->tx_skb = skb;
+ usb_fill_bulk_urb(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev, 2),
+ skb->data, count, write_bulk_callback, dev);
+ if ((res = usb_submit_urb(dev->tx_urb, GFP_ATOMIC))) {
+ warn("failed tx_urb %d\n", res);
+ dev->stats.tx_errors++;
+ netif_start_queue(netdev);
+ } else {
+ dev->stats.tx_packets++;
+ dev->stats.tx_bytes += skb->len;
+ netdev->trans_start = jiffies;
+ }
+
+ return 0;
+}
+
+
+static void set_carrier(struct net_device *netdev)
+{
+ rtl8150_t *dev = netdev_priv(netdev);
+ short tmp;
+
+ get_registers(dev, CSCR, 2, &tmp);
+ if (tmp & CSCR_LINK_STATUS)
+ netif_carrier_on(netdev);
+ else
+ netif_carrier_off(netdev);
+}
+
+static int rtl8150_open(struct net_device *netdev)
+{
+ rtl8150_t *dev = netdev_priv(netdev);
+ int res;
+
+ if (dev->rx_skb == NULL)
+ dev->rx_skb = pull_skb(dev);
+ if (!dev->rx_skb)
+ return -ENOMEM;
+
+ set_registers(dev, IDR, 6, netdev->dev_addr);
+
+ usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
+ dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev);
+ if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL)))
+ warn("%s: rx_urb submit failed: %d", __FUNCTION__, res);
+ usb_fill_int_urb(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3),
+ dev->intr_buff, INTBUFSIZE, intr_callback,
+ dev, dev->intr_interval);
+ if ((res = usb_submit_urb(dev->intr_urb, GFP_KERNEL)))
+ warn("%s: intr_urb submit failed: %d", __FUNCTION__, res);
+ netif_start_queue(netdev);
+ enable_net_traffic(dev);
+ set_carrier(netdev);
+
+ return res;
+}
+
+static int rtl8150_close(struct net_device *netdev)
+{
+ rtl8150_t *dev = netdev_priv(netdev);
+ int res = 0;
+
+ netif_stop_queue(netdev);
+ if (!test_bit(RTL8150_UNPLUG, &dev->flags))
+ disable_net_traffic(dev);
+ unlink_all_urbs(dev);
+
+ return res;
+}
+
+static void rtl8150_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *info)
+{
+ rtl8150_t *dev = netdev_priv(netdev);
+
+ strncpy(info->driver, driver_name, ETHTOOL_BUSINFO_LEN);
+ strncpy(info->version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
+ usb_make_path(dev->udev, info->bus_info, sizeof info->bus_info);
+}
+
+static int rtl8150_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+{
+ rtl8150_t *dev = netdev_priv(netdev);
+ short lpa, bmcr;
+
+ 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 = dev->phy;
+ get_registers(dev, BMCR, 2, &bmcr);
+ get_registers(dev, ANLP, 2, &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;
+ }
+ return 0;
+}
+
+static struct ethtool_ops ops = {
+ .get_drvinfo = rtl8150_get_drvinfo,
+ .get_settings = rtl8150_get_settings,
+ .get_link = ethtool_op_get_link
+};
+
+static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
+{
+ rtl8150_t *dev = netdev_priv(netdev);
+ u16 *data = (u16 *) & rq->ifr_ifru;
+ int res = 0;
+
+ switch (cmd) {
+ case SIOCDEVPRIVATE:
+ data[0] = dev->phy;
+ case SIOCDEVPRIVATE + 1:
+ read_mii_word(dev, dev->phy, (data[1] & 0x1f), &data[3]);
+ break;
+ case SIOCDEVPRIVATE + 2:
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
+ write_mii_word(dev, dev->phy, (data[1] & 0x1f), data[2]);
+ break;
+ default:
+ res = -EOPNOTSUPP;
+ }
+
+ return res;
+}
+
+static int rtl8150_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *udev = interface_to_usbdev(intf);
+ rtl8150_t *dev;
+ struct net_device *netdev;
+
+ netdev = alloc_etherdev(sizeof(rtl8150_t));
+ if (!netdev) {
+ err("Out of memory");
+ return -ENOMEM;
+ }
+
+ dev = netdev_priv(netdev);
+ memset(dev, 0, sizeof(rtl8150_t));
+
+ dev->intr_buff = kmalloc(INTBUFSIZE, GFP_KERNEL);
+ if (!dev->intr_buff) {
+ free_netdev(netdev);
+ return -ENOMEM;
+ }
+
+ tasklet_init(&dev->tl, rx_fixup, (unsigned long)dev);
+ spin_lock_init(&dev->rx_pool_lock);
+
+ dev->udev = udev;
+ dev->netdev = netdev;
+ SET_MODULE_OWNER(netdev);
+ netdev->open = rtl8150_open;
+ netdev->stop = rtl8150_close;
+ netdev->do_ioctl = rtl8150_ioctl;
+ netdev->watchdog_timeo = RTL8150_TX_TIMEOUT;
+ netdev->tx_timeout = rtl8150_tx_timeout;
+ netdev->hard_start_xmit = rtl8150_start_xmit;
+ netdev->set_multicast_list = rtl8150_set_multicast;
+ netdev->set_mac_address = rtl8150_set_mac_address;
+ netdev->get_stats = rtl8150_netdev_stats;
+ netdev->mtu = RTL8150_MTU;
+ SET_ETHTOOL_OPS(netdev, &ops);
+ dev->intr_interval = 100; /* 100ms */
+
+ if (!alloc_all_urbs(dev)) {
+ err("out of memory");
+ goto out;
+ }
+ if (!rtl8150_reset(dev)) {
+ err("couldn't reset the device");
+ goto out1;
+ }
+ fill_skb_pool(dev);
+ set_ethernet_addr(dev);
+ info("%s: rtl8150 is detected", netdev->name);
+
+ usb_set_intfdata(intf, dev);
+ SET_NETDEV_DEV(netdev, &intf->dev);
+ if (register_netdev(netdev) != 0) {
+ err("couldn't register the device");
+ goto out2;
+ }
+ return 0;
+
+out2:
+ usb_set_intfdata(intf, NULL);
+ free_skb_pool(dev);
+out1:
+ free_all_urbs(dev);
+out:
+ kfree(dev->intr_buff);
+ free_netdev(netdev);
+ return -EIO;
+}
+
+static void rtl8150_disconnect(struct usb_interface *intf)
+{
+ rtl8150_t *dev = usb_get_intfdata(intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (dev) {
+ set_bit(RTL8150_UNPLUG, &dev->flags);
+ unregister_netdev(dev->netdev);
+ unlink_all_urbs(dev);
+ free_all_urbs(dev);
+ free_skb_pool(dev);
+ if (dev->rx_skb)
+ dev_kfree_skb(dev->rx_skb);
+ kfree(dev->intr_buff);
+ free_netdev(dev->netdev);
+ }
+}
+
+static int __init usb_rtl8150_init(void)
+{
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return usb_register(&rtl8150_driver);
+}
+
+static void __exit usb_rtl8150_exit(void)
+{
+ usb_deregister(&rtl8150_driver);
+}
+
+module_init(usb_rtl8150_init);
+module_exit(usb_rtl8150_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
new file mode 100644
index 000000000000..dd8b4456ea35
--- /dev/null
+++ b/drivers/usb/net/usbnet.c
@@ -0,0 +1,4106 @@
+/*
+ * USB Networking Links
+ * Copyright (C) 2000-2003 by David Brownell <dbrownell@users.sourceforge.net>
+ * Copyright (C) 2002 Pavel Machek <pavel@ucw.cz>
+ * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com>
+ * Copyright (C) 2005 Phil Chang <pchang23@sbcglobal.net>
+ * Copyright (c) 2002-2003 TiVo Inc.
+ *
+ * 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
+ */
+
+/*
+ * This is a generic "USB networking" framework that works with several
+ * kinds of full and high speed networking devices:
+ *
+ * + USB host-to-host "network cables", used for IP-over-USB links.
+ * These are often used for Laplink style connectivity products.
+ * - AnchorChip 2720
+ * - Belkin, eTEK (interops with Win32 drivers)
+ * - GeneSys GL620USB-A
+ * - NetChip 1080 (interoperates with NetChip Win32 drivers)
+ * - Prolific PL-2301/2302 (replaces "plusb" driver)
+ * - KC Technology KC2190
+ *
+ * + Smart USB devices can support such links directly, using Internet
+ * standard protocols instead of proprietary host-to-device links.
+ * - Linux PDAs like iPaq, Yopy, and Zaurus
+ * - The BLOB boot loader (for diskless booting)
+ * - Linux "gadgets", perhaps using PXA-2xx or Net2280 controllers
+ * - Devices using EPSON's sample USB firmware
+ * - CDC-Ethernet class devices, such as many cable modems
+ *
+ * + Adapters to networks such as Ethernet.
+ * - AX8817X based USB 2.0 products
+ *
+ * Links to these devices can be bridged using Linux Ethernet bridging.
+ * With minor exceptions, these all use similar USB framing for network
+ * traffic, but need different protocols for control traffic.
+ *
+ * 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 SA1110, Zaurus, or EPSON device/client support in this driver;
+ * slave/target drivers such as "usb-eth" (on most SA-1100 PDAs) or
+ * "g_ether" (in the Linux "gadget" framework) implement that behavior
+ * within devices.
+ *
+ *
+ * CHANGELOG:
+ *
+ * 13-sep-2000 experimental, new
+ * 10-oct-2000 usb_device_id table created.
+ * 28-oct-2000 misc fixes; mostly, discard more TTL-mangled rx packets.
+ * 01-nov-2000 usb_device_id table and probing api update by
+ * Adam J. Richter <adam@yggdrasil.com>.
+ * 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;
+ * fix bit-ordering problem with ethernet multicast addr
+ * 19-feb-2001 Support for clearing halt conditions. SA1100 UDC support
+ * updates. Oleg Drokin (green@iXcelerator.com)
+ * 25-mar-2001 More SA-1100 updates, including workaround for ip problem
+ * expecting cleared skb->cb and framing change to match latest
+ * handhelds.org version (Oleg). Enable device IDs from the
+ * Win32 Belkin driver; other cleanups (db).
+ * 16-jul-2001 Bugfixes for uhci oops-on-unplug, Belkin support, various
+ * cleanups for problems not yet seen in the field. (db)
+ * 17-oct-2001 Handle "Advance USBNET" product, like Belkin/eTEK devices,
+ * from Ioannis Mavroukakis <i.mavroukakis@btinternet.com>;
+ * rx unlinks somehow weren't async; minor cleanup.
+ * 03-nov-2001 Merged GeneSys driver; original code from Jiun-Jie Huang
+ * <huangjj@genesyslogic.com.tw>, updated by Stanislav Brabec
+ * <utx@penguin.cz>. Made framing options (NetChip/GeneSys)
+ * 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)
+ * 18-oct-2002 Support for Zaurus (Pavel Machek), related cleanup (db).
+ * 14-dec-2002 Remove Zaurus-private crc32 code (Pavel); 2.5 oops fix,
+ * cleanups and stubbed PXA-250 support (db), fix for framing
+ * issues on Z, net1080, and gl620a (Toby Milne)
+ *
+ * 31-mar-2003 Use endpoint descriptors: high speed support, simpler sa1100
+ * vs pxa25x, and CDC Ethernet. Throttle down log floods on
+ * disconnect; other cleanups. (db) Flush net1080 fifos
+ * after several sequential framing errors. (Johannes Erdfelt)
+ * 22-aug-2003 AX8817X support (Dave Hollis).
+ * 14-jun-2004 Trivial patch for AX8817X based Buffalo LUA-U2-KTX in Japan
+ * (Neil Bortnak)
+ * 03-nov-2004 Trivial patch for KC2190 (KC-190) chip. (Jonathan McDowell)
+ *
+ * 01-feb-2005 AX88772 support (Phil Chang & Dave Hollis)
+ *-------------------------------------------------------------------------*/
+
+// #define DEBUG // error path messages, extra info
+// #define VERBOSE // more; success messages
+
+#include <linux/config.h>
+#ifdef CONFIG_USB_DEBUG
+# define DEBUG
+#endif
+#include <linux/module.h>
+#include <linux/kmod.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/random.h>
+#include <linux/ethtool.h>
+#include <linux/workqueue.h>
+#include <linux/mii.h>
+#include <asm/uaccess.h>
+#include <asm/unaligned.h>
+#include <linux/usb.h>
+#include <asm/io.h>
+#include <asm/scatterlist.h>
+#include <linux/mm.h>
+#include <linux/dma-mapping.h>
+
+#define DRIVER_VERSION "03-Nov-2004"
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Nineteen USB 1.1 max size bulk transactions per frame (ms), max.
+ * Several dozen bytes of IPv4 data can fit in two such transactions.
+ * One maximum size Ethernet packet takes twenty four of them.
+ * For high speed, each frame comfortably fits almost 36 max size
+ * Ethernet packets (so queues should be bigger).
+ */
+#define RX_QLEN(dev) (((dev)->udev->speed == USB_SPEED_HIGH) ? 60 : 4)
+#define TX_QLEN(dev) (((dev)->udev->speed == USB_SPEED_HIGH) ? 60 : 4)
+
+// packets are always ethernet inside
+// ... except they can be bigger (limit of 64K with NetChip framing)
+#define MIN_PACKET sizeof(struct ethhdr)
+#define MAX_PACKET 32768
+
+// reawaken network queue this soon after stopping; else watchdog barks
+#define TX_TIMEOUT_JIFFIES (5*HZ)
+
+// throttle rx/tx briefly after some faults, so khubd might disconnect()
+// us (it polls at HZ/4 usually) before we report too many false errors.
+#define THROTTLE_JIFFIES (HZ/8)
+
+// for vendor-specific control operations
+#define CONTROL_TIMEOUT_MS 500
+
+// between wakeups
+#define UNLINK_TIMEOUT_MS 3
+
+/*-------------------------------------------------------------------------*/
+
+// randomly generated ethernet address
+static u8 node_id [ETH_ALEN];
+
+// state we keep for each device we handle
+struct usbnet {
+ // housekeeping
+ struct usb_device *udev;
+ struct driver_info *driver_info;
+ wait_queue_head_t *wait;
+
+ // i/o info: pipes etc
+ unsigned in, out;
+ struct usb_host_endpoint *status;
+ unsigned maxpacket;
+ struct timer_list delay;
+
+ // protocol/interface state
+ struct net_device *net;
+ struct net_device_stats stats;
+ int msg_enable;
+ unsigned long data [5];
+
+ struct mii_if_info mii;
+
+ // various kinds of pending driver work
+ struct sk_buff_head rxq;
+ struct sk_buff_head txq;
+ struct sk_buff_head done;
+ struct urb *interrupt;
+ struct tasklet_struct bh;
+
+ struct work_struct kevent;
+ unsigned long flags;
+# define EVENT_TX_HALT 0
+# define EVENT_RX_HALT 1
+# define EVENT_RX_MEMORY 2
+# define EVENT_STS_SPLIT 3
+};
+
+// device-specific info used by the driver
+struct driver_info {
+ char *description;
+
+ int flags;
+/* framing is CDC Ethernet, not writing ZLPs (hw issues), or optionally: */
+#define FLAG_FRAMING_NC 0x0001 /* guard against device dropouts */
+#define FLAG_FRAMING_GL 0x0002 /* genelink batches packets */
+#define FLAG_FRAMING_Z 0x0004 /* zaurus adds a trailer */
+#define FLAG_FRAMING_RN 0x0008 /* RNDIS batches, plus huge header */
+
+#define FLAG_NO_SETINT 0x0010 /* device can't set_interface() */
+#define FLAG_ETHER 0x0020 /* maybe use "eth%d" names */
+
+#define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */
+
+ /* init device ... can sleep, or cause probe() failure */
+ int (*bind)(struct usbnet *, struct usb_interface *);
+
+ /* cleanup device ... can sleep, but can't fail */
+ void (*unbind)(struct usbnet *, struct usb_interface *);
+
+ /* reset device ... can sleep */
+ int (*reset)(struct usbnet *);
+
+ /* see if peer is connected ... can sleep */
+ int (*check_connect)(struct usbnet *);
+
+ /* for status polling */
+ void (*status)(struct usbnet *, struct urb *);
+
+ /* fixup rx packet (strip framing) */
+ int (*rx_fixup)(struct usbnet *dev, struct sk_buff *skb);
+
+ /* fixup tx packet (add framing) */
+ struct sk_buff *(*tx_fixup)(struct usbnet *dev,
+ struct sk_buff *skb, int flags);
+
+ // FIXME -- also an interrupt mechanism
+ // useful for at least PL2301/2302 and GL620USB-A
+ // and CDC use them to report 'is it connected' changes
+
+ /* for new devices, use the descriptor-reading code instead */
+ int in; /* rx endpoint */
+ int out; /* tx endpoint */
+
+ unsigned long data; /* Misc driver specific data */
+};
+
+// we record the state for each of our queued skbs
+enum skb_state {
+ illegal = 0,
+ tx_start, tx_done,
+ rx_start, rx_done, rx_cleanup
+};
+
+struct skb_data { // skb->cb is one of these
+ struct urb *urb;
+ struct usbnet *dev;
+ enum skb_state state;
+ 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_param (msg_level, int, 0);
+MODULE_PARM_DESC (msg_level, "Override default message level");
+
+
+#ifdef DEBUG
+#define devdbg(usbnet, fmt, arg...) \
+ printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
+#else
+#define devdbg(usbnet, fmt, arg...) do {} while(0)
+#endif
+
+#define deverr(usbnet, fmt, arg...) \
+ printk(KERN_ERR "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
+#define devwarn(usbnet, fmt, arg...) \
+ printk(KERN_WARNING "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
+
+#define devinfo(usbnet, fmt, arg...) \
+ printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \
+
+/*-------------------------------------------------------------------------*/
+
+static void usbnet_get_drvinfo (struct net_device *, struct ethtool_drvinfo *);
+static u32 usbnet_get_link (struct net_device *);
+static u32 usbnet_get_msglevel (struct net_device *);
+static void usbnet_set_msglevel (struct net_device *, u32);
+
+/* mostly for PDA style devices, which are always connected if present */
+static int always_connected (struct usbnet *dev)
+{
+ return 0;
+}
+
+/* handles CDC Ethernet and many other network "bulk data" interfaces */
+static int
+get_endpoints (struct usbnet *dev, struct usb_interface *intf)
+{
+ int tmp;
+ struct usb_host_interface *alt = NULL;
+ struct usb_host_endpoint *in = NULL, *out = NULL;
+ struct usb_host_endpoint *status = NULL;
+
+ for (tmp = 0; tmp < intf->num_altsetting; tmp++) {
+ unsigned ep;
+
+ in = out = status = NULL;
+ alt = intf->altsetting + tmp;
+
+ /* take the first altsetting with in-bulk + out-bulk;
+ * remember any status endpoint, just in case;
+ * ignore other endpoints and altsetttings.
+ */
+ for (ep = 0; ep < alt->desc.bNumEndpoints; ep++) {
+ struct usb_host_endpoint *e;
+ int intr = 0;
+
+ e = alt->endpoint + ep;
+ switch (e->desc.bmAttributes) {
+ case USB_ENDPOINT_XFER_INT:
+ if (!(e->desc.bEndpointAddress & USB_DIR_IN))
+ continue;
+ intr = 1;
+ /* FALLTHROUGH */
+ case USB_ENDPOINT_XFER_BULK:
+ break;
+ default:
+ continue;
+ }
+ if (e->desc.bEndpointAddress & USB_DIR_IN) {
+ if (!intr && !in)
+ in = e;
+ else if (intr && !status)
+ status = e;
+ } else {
+ if (!out)
+ out = e;
+ }
+ }
+ if (in && out)
+ break;
+ }
+ if (!alt || !in || !out)
+ return -EINVAL;
+
+ if (alt->desc.bAlternateSetting != 0
+ || !(dev->driver_info->flags & FLAG_NO_SETINT)) {
+ tmp = usb_set_interface (dev->udev, alt->desc.bInterfaceNumber,
+ alt->desc.bAlternateSetting);
+ if (tmp < 0)
+ return tmp;
+ }
+
+ dev->in = usb_rcvbulkpipe (dev->udev,
+ in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ dev->out = usb_sndbulkpipe (dev->udev,
+ out->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ dev->status = status;
+ return 0;
+}
+
+static void intr_complete (struct urb *urb, struct pt_regs *regs);
+
+static int init_status (struct usbnet *dev, struct usb_interface *intf)
+{
+ char *buf = NULL;
+ unsigned pipe = 0;
+ unsigned maxp;
+ unsigned period;
+
+ if (!dev->driver_info->status)
+ return 0;
+
+ pipe = usb_rcvintpipe (dev->udev,
+ dev->status->desc.bEndpointAddress
+ & USB_ENDPOINT_NUMBER_MASK);
+ maxp = usb_maxpacket (dev->udev, pipe, 0);
+
+ /* avoid 1 msec chatter: min 8 msec poll rate */
+ period = max ((int) dev->status->desc.bInterval,
+ (dev->udev->speed == USB_SPEED_HIGH) ? 7 : 3);
+
+ buf = kmalloc (maxp, SLAB_KERNEL);
+ if (buf) {
+ dev->interrupt = usb_alloc_urb (0, SLAB_KERNEL);
+ if (!dev->interrupt) {
+ kfree (buf);
+ return -ENOMEM;
+ } else {
+ usb_fill_int_urb(dev->interrupt, dev->udev, pipe,
+ buf, maxp, intr_complete, dev, period);
+ dev_dbg(&intf->dev,
+ "status ep%din, %d bytes period %d\n",
+ usb_pipeendpoint(pipe), maxp, period);
+ }
+ }
+ return 0;
+}
+
+static void skb_return (struct usbnet *dev, struct sk_buff *skb)
+{
+ int status;
+
+ skb->dev = dev->net;
+ skb->protocol = eth_type_trans (skb, dev->net);
+ dev->stats.rx_packets++;
+ dev->stats.rx_bytes += skb->len;
+
+ if (netif_msg_rx_status (dev))
+ devdbg (dev, "< rx, len %d, type 0x%x",
+ skb->len + sizeof (struct ethhdr), skb->protocol);
+ memset (skb->cb, 0, sizeof (struct skb_data));
+ status = netif_rx (skb);
+ if (status != NET_RX_SUCCESS && netif_msg_rx_err (dev))
+ devdbg (dev, "netif_rx status %d", status);
+}
+
+
+#ifdef CONFIG_USB_ALI_M5632
+#define HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * ALi M5632 driver ... does high speed
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info ali_m5632_info = {
+ .description = "ALi M5632",
+};
+
+
+#endif
+
+
+#ifdef CONFIG_USB_AN2720
+#define HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * AnchorChips 2720 driver ... http://www.cypress.com
+ *
+ * This doesn't seem to have a way to detect whether the peer is
+ * connected, or need any reset handshaking. It's got pretty big
+ * internal buffers (handles most of a frame's worth of data).
+ * Chip data sheets don't describe any vendor control messages.
+ *
+ *-------------------------------------------------------------------------*/
+
+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
+};
+
+#endif /* CONFIG_USB_AN2720 */
+
+
+#ifdef CONFIG_USB_AX8817X
+/* ASIX AX8817X based USB 2.0 Ethernet Devices */
+
+#define HAVE_HARDWARE
+#define NEED_MII
+
+#include <linux/crc32.h>
+
+#define AX_CMD_SET_SW_MII 0x06
+#define AX_CMD_READ_MII_REG 0x07
+#define AX_CMD_WRITE_MII_REG 0x08
+#define AX_CMD_SET_HW_MII 0x0a
+#define AX_CMD_READ_EEPROM 0x0b
+#define AX_CMD_WRITE_EEPROM 0x0c
+#define AX_CMD_WRITE_ENABLE 0x0d
+#define AX_CMD_WRITE_DISABLE 0x0e
+#define AX_CMD_WRITE_RX_CTL 0x10
+#define AX_CMD_READ_IPG012 0x11
+#define AX_CMD_WRITE_IPG0 0x12
+#define AX_CMD_WRITE_IPG1 0x13
+#define AX_CMD_WRITE_IPG2 0x14
+#define AX_CMD_WRITE_MULTI_FILTER 0x16
+#define AX_CMD_READ_NODE_ID 0x17
+#define AX_CMD_READ_PHY_ID 0x19
+#define AX_CMD_WRITE_MEDIUM_MODE 0x1b
+#define AX_CMD_READ_MONITOR_MODE 0x1c
+#define AX_CMD_WRITE_MONITOR_MODE 0x1d
+#define AX_CMD_WRITE_GPIOS 0x1f
+#define AX_CMD_SW_RESET 0x20
+#define AX_CMD_SW_PHY_STATUS 0x21
+#define AX_CMD_SW_PHY_SELECT 0x22
+#define AX88772_CMD_READ_NODE_ID 0x13
+
+#define AX_MONITOR_MODE 0x01
+#define AX_MONITOR_LINK 0x02
+#define AX_MONITOR_MAGIC 0x04
+#define AX_MONITOR_HSFS 0x10
+
+#define AX_MCAST_FILTER_SIZE 8
+#define AX_MAX_MCAST 64
+
+#define AX_INTERRUPT_BUFSIZE 8
+
+#define AX_EEPROM_LEN 0x40
+
+#define AX_SWRESET_CLEAR 0x00
+#define AX_SWRESET_RR 0x01
+#define AX_SWRESET_RT 0x02
+#define AX_SWRESET_PRTE 0x04
+#define AX_SWRESET_PRL 0x08
+#define AX_SWRESET_BZ 0x10
+#define AX_SWRESET_IPRL 0x20
+#define AX_SWRESET_IPPD 0x40
+
+#define AX88772_IPG0_DEFAULT 0x15
+#define AX88772_IPG1_DEFAULT 0x0c
+#define AX88772_IPG2_DEFAULT 0x12
+
+#define AX_EEPROM_MAGIC 0xdeadbeef
+
+/* This structure cannot exceed sizeof(unsigned long [5]) AKA 20 bytes */
+struct ax8817x_data {
+ u8 multi_filter[AX_MCAST_FILTER_SIZE];
+ struct urb *int_urb;
+ u8 *int_buf;
+};
+
+static int ax8817x_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
+ u16 size, void *data)
+{
+ return usb_control_msg(
+ dev->udev,
+ usb_rcvctrlpipe(dev->udev, 0),
+ cmd,
+ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ value,
+ index,
+ data,
+ size,
+ CONTROL_TIMEOUT_MS);
+}
+
+static int ax8817x_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
+ u16 size, void *data)
+{
+ return usb_control_msg(
+ dev->udev,
+ usb_sndctrlpipe(dev->udev, 0),
+ cmd,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ value,
+ index,
+ data,
+ size,
+ CONTROL_TIMEOUT_MS);
+}
+
+static void ax8817x_async_cmd_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context;
+
+ if (urb->status < 0)
+ printk(KERN_DEBUG "ax8817x_async_cmd_callback() failed with %d",
+ urb->status);
+
+ kfree(req);
+ usb_free_urb(urb);
+}
+
+static void ax8817x_interrupt_complete(struct urb *urb, struct pt_regs *regs)
+{
+ struct usbnet *dev = (struct usbnet *)urb->context;
+ struct ax8817x_data *data = (struct ax8817x_data *)&dev->data;
+ int link;
+
+ if (urb->status < 0) {
+ devdbg(dev,"ax8817x_interrupt_complete() failed with %d",
+ urb->status);
+ } else {
+ link = data->int_buf[2] & 0x01;
+ if (netif_carrier_ok(dev->net) != link) {
+ if (link)
+ netif_carrier_on(dev->net);
+ else
+ netif_carrier_off(dev->net);
+ devdbg(dev, "ax8817x - Link Status is: %d", link);
+ }
+ usb_submit_urb(data->int_urb, GFP_ATOMIC);
+ }
+}
+
+static void ax8817x_write_cmd_async(struct usbnet *dev, u8 cmd, u16 value, u16 index,
+ u16 size, void *data)
+{
+ struct usb_ctrlrequest *req;
+ int status;
+ struct urb *urb;
+
+ if ((urb = usb_alloc_urb(0, GFP_ATOMIC)) == NULL) {
+ devdbg(dev, "Error allocating URB in write_cmd_async!");
+ return;
+ }
+
+ if ((req = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC)) == NULL) {
+ deverr(dev, "Failed to allocate memory for control request");
+ usb_free_urb(urb);
+ return;
+ }
+
+ req->bRequestType = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE;
+ req->bRequest = cmd;
+ req->wValue = cpu_to_le16(value);
+ req->wIndex = cpu_to_le16(index);
+ req->wLength = cpu_to_le16(size);
+
+ usb_fill_control_urb(urb, dev->udev,
+ usb_sndctrlpipe(dev->udev, 0),
+ (void *)req, data, size,
+ ax8817x_async_cmd_callback, req);
+
+ if((status = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
+ deverr(dev, "Error submitting the control message: status=%d", status);
+ kfree(req);
+ usb_free_urb(urb);
+ }
+}
+
+static void ax8817x_set_multicast(struct net_device *net)
+{
+ struct usbnet *dev = netdev_priv(net);
+ struct ax8817x_data *data = (struct ax8817x_data *)&dev->data;
+ u8 rx_ctl = 0x8c;
+
+ if (net->flags & IFF_PROMISC) {
+ rx_ctl |= 0x01;
+ } else if (net->flags & IFF_ALLMULTI
+ || net->mc_count > AX_MAX_MCAST) {
+ rx_ctl |= 0x02;
+ } else if (net->mc_count == 0) {
+ /* just broadcast and directed */
+ } else {
+ /* We use the 20 byte dev->data
+ * for our 8 byte filter buffer
+ * to avoid allocating memory that
+ * is tricky to free later */
+ struct dev_mc_list *mc_list = net->mc_list;
+ u32 crc_bits;
+ int i;
+
+ memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE);
+
+ /* Build the multicast hash filter. */
+ for (i = 0; i < net->mc_count; i++) {
+ crc_bits =
+ ether_crc(ETH_ALEN,
+ mc_list->dmi_addr) >> 26;
+ data->multi_filter[crc_bits >> 3] |=
+ 1 << (crc_bits & 7);
+ mc_list = mc_list->next;
+ }
+
+ ax8817x_write_cmd_async(dev, AX_CMD_WRITE_MULTI_FILTER, 0, 0,
+ AX_MCAST_FILTER_SIZE, data->multi_filter);
+
+ rx_ctl |= 0x10;
+ }
+
+ ax8817x_write_cmd_async(dev, AX_CMD_WRITE_RX_CTL, rx_ctl, 0, 0, NULL);
+}
+
+static int ax8817x_mdio_read(struct net_device *netdev, int phy_id, int loc)
+{
+ struct usbnet *dev = netdev_priv(netdev);
+ u16 res;
+ u8 buf[1];
+
+ ax8817x_write_cmd(dev, AX_CMD_SET_SW_MII, 0, 0, 0, &buf);
+ ax8817x_read_cmd(dev, AX_CMD_READ_MII_REG, phy_id, (__u16)loc, 2, (u16 *)&res);
+ ax8817x_write_cmd(dev, AX_CMD_SET_HW_MII, 0, 0, 0, &buf);
+
+ return res & 0xffff;
+}
+
+static void ax8817x_mdio_write(struct net_device *netdev, int phy_id, int loc, int val)
+{
+ struct usbnet *dev = netdev_priv(netdev);
+ u16 res = val;
+ u8 buf[1];
+
+ ax8817x_write_cmd(dev, AX_CMD_SET_SW_MII, 0, 0, 0, &buf);
+ ax8817x_write_cmd(dev, AX_CMD_WRITE_MII_REG, phy_id, (__u16)loc, 2, (u16 *)&res);
+ ax8817x_write_cmd(dev, AX_CMD_SET_HW_MII, 0, 0, 0, &buf);
+}
+
+static void ax8817x_get_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)
+{
+ struct usbnet *dev = netdev_priv(net);
+ u8 opt;
+
+ if (ax8817x_read_cmd(dev, AX_CMD_READ_MONITOR_MODE, 0, 0, 1, &opt) < 0) {
+ wolinfo->supported = 0;
+ wolinfo->wolopts = 0;
+ return;
+ }
+ wolinfo->supported = WAKE_PHY | WAKE_MAGIC;
+ wolinfo->wolopts = 0;
+ if (opt & AX_MONITOR_MODE) {
+ if (opt & AX_MONITOR_LINK)
+ wolinfo->wolopts |= WAKE_PHY;
+ if (opt & AX_MONITOR_MAGIC)
+ wolinfo->wolopts |= WAKE_MAGIC;
+ }
+}
+
+static int ax8817x_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)
+{
+ struct usbnet *dev = netdev_priv(net);
+ u8 opt = 0;
+ u8 buf[1];
+
+ if (wolinfo->wolopts & WAKE_PHY)
+ opt |= AX_MONITOR_LINK;
+ if (wolinfo->wolopts & WAKE_MAGIC)
+ opt |= AX_MONITOR_MAGIC;
+ if (opt != 0)
+ opt |= AX_MONITOR_MODE;
+
+ if (ax8817x_write_cmd(dev, AX_CMD_WRITE_MONITOR_MODE,
+ opt, 0, 0, &buf) < 0)
+ return -EINVAL;
+
+ return 0;
+}
+
+static int ax8817x_get_eeprom_len(struct net_device *net)
+{
+ return AX_EEPROM_LEN;
+}
+
+static int ax8817x_get_eeprom(struct net_device *net,
+ struct ethtool_eeprom *eeprom, u8 *data)
+{
+ struct usbnet *dev = netdev_priv(net);
+ u16 *ebuf = (u16 *)data;
+ int i;
+
+ /* Crude hack to ensure that we don't overwrite memory
+ * if an odd length is supplied
+ */
+ if (eeprom->len % 2)
+ return -EINVAL;
+
+ eeprom->magic = AX_EEPROM_MAGIC;
+
+ /* ax8817x returns 2 bytes from eeprom on read */
+ for (i=0; i < eeprom->len / 2; i++) {
+ if (ax8817x_read_cmd(dev, AX_CMD_READ_EEPROM,
+ eeprom->offset + i, 0, 2, &ebuf[i]) < 0)
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static void ax8817x_get_drvinfo (struct net_device *net,
+ struct ethtool_drvinfo *info)
+{
+ /* Inherit standard device info */
+ usbnet_get_drvinfo(net, info);
+ info->eedump_len = 0x3e;
+}
+
+static int ax8817x_get_settings(struct net_device *net, struct ethtool_cmd *cmd)
+{
+ struct usbnet *dev = netdev_priv(net);
+
+ return mii_ethtool_gset(&dev->mii,cmd);
+}
+
+static int ax8817x_set_settings(struct net_device *net, struct ethtool_cmd *cmd)
+{
+ struct usbnet *dev = netdev_priv(net);
+
+ return mii_ethtool_sset(&dev->mii,cmd);
+}
+
+/* We need to override some ethtool_ops so we require our
+ own structure so we don't interfere with other usbnet
+ devices that may be connected at the same time. */
+static struct ethtool_ops ax8817x_ethtool_ops = {
+ .get_drvinfo = ax8817x_get_drvinfo,
+ .get_link = ethtool_op_get_link,
+ .get_msglevel = usbnet_get_msglevel,
+ .set_msglevel = usbnet_set_msglevel,
+ .get_wol = ax8817x_get_wol,
+ .set_wol = ax8817x_set_wol,
+ .get_eeprom_len = ax8817x_get_eeprom_len,
+ .get_eeprom = ax8817x_get_eeprom,
+ .get_settings = ax8817x_get_settings,
+ .set_settings = ax8817x_set_settings,
+};
+
+static int ax8817x_bind(struct usbnet *dev, struct usb_interface *intf)
+{
+ int ret = 0;
+ void *buf;
+ int i;
+ unsigned long gpio_bits = dev->driver_info->data;
+ struct ax8817x_data *data = (struct ax8817x_data *)dev->data;
+
+ get_endpoints(dev,intf);
+
+ if ((data->int_urb = usb_alloc_urb (0, GFP_KERNEL)) == NULL) {
+ dbg ("%s: cannot allocate interrupt URB",
+ dev->net->name);
+ ret = -ENOMEM;
+ goto out1;
+ }
+
+ if ((data->int_buf = kmalloc(AX_INTERRUPT_BUFSIZE, GFP_KERNEL)) == NULL) {
+ dbg ("%s: cannot allocate memory for interrupt buffer",
+ dev->net->name);
+ ret = -ENOMEM;
+ goto out1;
+ }
+ memset(data->int_buf, 0, AX_INTERRUPT_BUFSIZE);
+
+ usb_fill_int_urb (data->int_urb, dev->udev,
+ usb_rcvintpipe (dev->udev, 1),
+ data->int_buf, AX_INTERRUPT_BUFSIZE,
+ ax8817x_interrupt_complete, dev,
+ dev->udev->speed == USB_SPEED_HIGH ? 8 : 100);
+
+ buf = kmalloc(ETH_ALEN, GFP_KERNEL);
+ if(!buf) {
+ ret = -ENOMEM;
+ goto out2;
+ }
+
+ /* Toggle the GPIOs in a manufacturer/model specific way */
+ for (i = 2; i >= 0; i--) {
+ if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_GPIOS,
+ (gpio_bits >> (i * 8)) & 0xff, 0, 0,
+ buf)) < 0)
+ goto out3;
+ msleep(5);
+ }
+
+ if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_RX_CTL, 0x80, 0, 0, buf)) < 0) {
+ dbg("send AX_CMD_WRITE_RX_CTL failed: %d", ret);
+ goto out3;
+ }
+
+ /* Get the MAC address */
+ memset(buf, 0, ETH_ALEN);
+ if ((ret = ax8817x_read_cmd(dev, AX_CMD_READ_NODE_ID, 0, 0, 6, buf)) < 0) {
+ dbg("read AX_CMD_READ_NODE_ID failed: %d", ret);
+ goto out3;
+ }
+ memcpy(dev->net->dev_addr, buf, ETH_ALEN);
+
+ /* Get the PHY id */
+ if ((ret = ax8817x_read_cmd(dev, AX_CMD_READ_PHY_ID, 0, 0, 2, buf)) < 0) {
+ dbg("error on read AX_CMD_READ_PHY_ID: %02x", ret);
+ goto out3;
+ } else if (ret < 2) {
+ /* this should always return 2 bytes */
+ dbg("AX_CMD_READ_PHY_ID returned less than 2 bytes: ret=%02x", ret);
+ ret = -EIO;
+ goto out3;
+ }
+
+ /* Initialize MII structure */
+ dev->mii.dev = dev->net;
+ dev->mii.mdio_read = ax8817x_mdio_read;
+ dev->mii.mdio_write = ax8817x_mdio_write;
+ dev->mii.phy_id_mask = 0x3f;
+ dev->mii.reg_num_mask = 0x1f;
+ dev->mii.phy_id = *((u8 *)buf + 1);
+
+ dev->net->set_multicast_list = ax8817x_set_multicast;
+ dev->net->ethtool_ops = &ax8817x_ethtool_ops;
+
+ ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR,
+ cpu_to_le16(BMCR_RESET));
+ ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
+ cpu_to_le16(ADVERTISE_ALL | ADVERTISE_CSMA | 0x0400));
+ mii_nway_restart(&dev->mii);
+
+ if((ret = usb_submit_urb(data->int_urb, GFP_KERNEL)) < 0) {
+ dbg("Failed to submit interrupt URB: %02x", ret);
+ goto out2;
+ }
+
+ return 0;
+out3:
+ kfree(buf);
+out2:
+ kfree(data->int_buf);
+out1:
+ usb_free_urb(data->int_urb);
+ return ret;
+}
+
+static void ax8817x_unbind(struct usbnet *dev, struct usb_interface *intf)
+{
+ struct ax8817x_data *data = (struct ax8817x_data *)dev->data;
+
+ usb_kill_urb(data->int_urb);
+ usb_free_urb(data->int_urb);
+ kfree(data->int_buf);
+}
+
+static struct ethtool_ops ax88772_ethtool_ops = {
+ .get_drvinfo = ax8817x_get_drvinfo,
+ .get_link = ethtool_op_get_link,
+ .get_msglevel = usbnet_get_msglevel,
+ .set_msglevel = usbnet_set_msglevel,
+ .get_wol = ax8817x_get_wol,
+ .set_wol = ax8817x_set_wol,
+ .get_eeprom_len = ax8817x_get_eeprom_len,
+ .get_eeprom = ax8817x_get_eeprom,
+ .get_settings = ax8817x_get_settings,
+ .set_settings = ax8817x_set_settings,
+};
+
+static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
+{
+ int ret;
+ void *buf;
+ struct ax8817x_data *data = (struct ax8817x_data *)dev->data;
+
+ get_endpoints(dev,intf);
+
+ if ((data->int_urb = usb_alloc_urb (0, GFP_KERNEL)) == 0) {
+ dbg ("Cannot allocate interrupt URB");
+ ret = -ENOMEM;
+ goto out1;
+ }
+
+ if ((data->int_buf = kmalloc(AX_INTERRUPT_BUFSIZE, GFP_KERNEL)) == NULL) {
+ dbg ("Cannot allocate memory for interrupt buffer");
+ ret = -ENOMEM;
+ goto out1;
+ }
+ memset(data->int_buf, 0, AX_INTERRUPT_BUFSIZE);
+
+ usb_fill_int_urb (data->int_urb, dev->udev,
+ usb_rcvintpipe (dev->udev, 1),
+ data->int_buf, AX_INTERRUPT_BUFSIZE,
+ ax8817x_interrupt_complete, dev,
+ dev->udev->speed == USB_SPEED_HIGH ? 8 : 100);
+
+ buf = kmalloc(6, GFP_KERNEL);
+ if(!buf) {
+ dbg ("Cannot allocate memory for buffer");
+ ret = -ENOMEM;
+ goto out2;
+ }
+
+ if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_GPIOS,
+ 0x00B0, 0, 0, buf)) < 0)
+ goto out3;
+
+ msleep(5);
+ if ((ret = ax8817x_write_cmd(dev, AX_CMD_SW_PHY_SELECT, 0x0001, 0, 0, buf)) < 0) {
+ dbg("Select PHY #1 failed: %d", ret);
+ goto out3;
+ }
+
+ if ((ret =
+ ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_IPPD, 0, 0, buf)) < 0) {
+ dbg("Failed to power down internal PHY: %d", ret);
+ goto out3;
+ }
+
+ msleep(150);
+ if ((ret =
+ ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_CLEAR, 0, 0, buf)) < 0) {
+ dbg("Failed to perform software reset: %d", ret);
+ goto out3;
+ }
+
+ msleep(150);
+ if ((ret =
+ ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_IPRL | AX_SWRESET_PRL, 0, 0, buf)) < 0) {
+ dbg("Failed to set Internal/External PHY reset control: %d", ret);
+ goto out3;
+ }
+
+ msleep(150);
+ if ((ret =
+ ax8817x_write_cmd(dev, AX_CMD_WRITE_RX_CTL, 0x0000, 0, 0,
+ buf)) < 0) {
+ dbg("Failed to reset RX_CTL: %d", ret);
+ goto out3;
+ }
+
+ /* Get the MAC address */
+ memset(buf, 0, ETH_ALEN);
+ if ((ret = ax8817x_read_cmd(dev, AX88772_CMD_READ_NODE_ID, 0, 0, ETH_ALEN, buf)) < 0) {
+ dbg("Failed to read MAC address: %d", ret);
+ goto out3;
+ }
+ memcpy(dev->net->dev_addr, buf, ETH_ALEN);
+
+ if ((ret = ax8817x_write_cmd(dev, AX_CMD_SET_SW_MII, 0, 0, 0, buf)) < 0) {
+ dbg("Enabling software MII failed: %d", ret);
+ goto out3;
+ }
+
+ if (((ret =
+ ax8817x_read_cmd(dev, AX_CMD_READ_MII_REG, 0x0010, 2, 2, buf)) < 0)
+ || (*((u16 *)buf) != 0x003b)) {
+ dbg("Read PHY register 2 must be 0x3b00: %d", ret);
+ goto out3;
+ }
+
+ /* Initialize MII structure */
+ dev->mii.dev = dev->net;
+ dev->mii.mdio_read = ax8817x_mdio_read;
+ dev->mii.mdio_write = ax8817x_mdio_write;
+ dev->mii.phy_id_mask = 0xff;
+ dev->mii.reg_num_mask = 0xff;
+
+ /* Get the PHY id */
+ if ((ret = ax8817x_read_cmd(dev, AX_CMD_READ_PHY_ID, 0, 0, 2, buf)) < 0) {
+ dbg("Error reading PHY ID: %02x", ret);
+ goto out3;
+ } else if (ret < 2) {
+ /* this should always return 2 bytes */
+ dbg("AX_CMD_READ_PHY_ID returned less than 2 bytes: ret=%02x",
+ ret);
+ ret = -EIO;
+ goto out3;
+ }
+ dev->mii.phy_id = *((u8 *)buf + 1);
+
+ if ((ret =
+ ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_PRL, 0, 0, buf)) < 0) {
+ dbg("Set external PHY reset pin level: %d", ret);
+ goto out3;
+ }
+ msleep(150);
+ if ((ret =
+ ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_IPRL | AX_SWRESET_PRL, 0, 0, buf)) < 0) {
+ dbg("Set Internal/External PHY reset control: %d", ret);
+ goto out3;
+ }
+ msleep(150);
+
+
+ dev->net->set_multicast_list = ax8817x_set_multicast;
+ dev->net->ethtool_ops = &ax88772_ethtool_ops;
+
+ ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR,
+ cpu_to_le16(BMCR_RESET));
+ ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
+ cpu_to_le16(ADVERTISE_ALL | ADVERTISE_CSMA));
+ mii_nway_restart(&dev->mii);
+
+ if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_MEDIUM_MODE, 0x0336, 0, 0, buf)) < 0) {
+ dbg("Write medium mode register: %d", ret);
+ goto out3;
+ }
+
+ if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_IPG0, AX88772_IPG0_DEFAULT | AX88772_IPG1_DEFAULT,AX88772_IPG2_DEFAULT, 0, buf)) < 0) {
+ dbg("Write IPG,IPG1,IPG2 failed: %d", ret);
+ goto out3;
+ }
+ if ((ret =
+ ax8817x_write_cmd(dev, AX_CMD_SET_HW_MII, 0, 0, 0, &buf)) < 0) {
+ dbg("Failed to set hardware MII: %02x", ret);
+ goto out3;
+ }
+
+ /* Set RX_CTL to default values with 2k buffer, and enable cactus */
+ if ((ret =
+ ax8817x_write_cmd(dev, AX_CMD_WRITE_RX_CTL, 0x0088, 0, 0,
+ buf)) < 0) {
+ dbg("Reset RX_CTL failed: %d", ret);
+ goto out3;
+ }
+
+ if((ret = usb_submit_urb(data->int_urb, GFP_KERNEL)) < 0) {
+ dbg("Failed to submit interrupt URB: %02x", ret);
+ goto out3;
+ }
+
+ kfree(buf);
+
+ return 0;
+
+out3:
+ kfree(buf);
+out2:
+ kfree(data->int_buf);
+out1:
+ usb_free_urb(data->int_urb);
+
+ return ret;
+}
+
+static int ax88772_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+{
+ u32 *header;
+ char *packet;
+ struct sk_buff *ax_skb;
+ u16 size;
+
+ header = (u32 *) skb->data;
+ le32_to_cpus(header);
+ packet = (char *)(header + 1);
+
+ skb_pull(skb, 4);
+
+ while (skb->len > 0) {
+ if ((short)(*header & 0x0000ffff) !=
+ ~((short)((*header & 0xffff0000) >> 16))) {
+ devdbg(dev,"header length data is error");
+ }
+ /* get the packet length */
+ size = (u16) (*header & 0x0000ffff);
+
+ if ((skb->len) - ((size + 1) & 0xfffe) == 0)
+ return 2;
+ if (size > ETH_FRAME_LEN) {
+ devdbg(dev,"invalid rx length %d", size);
+ return 0;
+ }
+ ax_skb = skb_clone(skb, GFP_ATOMIC);
+ if (ax_skb) {
+ ax_skb->len = size;
+ ax_skb->data = packet;
+ ax_skb->tail = packet + size;
+ skb_return(dev, ax_skb);
+ } else {
+ return 0;
+ }
+
+ skb_pull(skb, (size + 1) & 0xfffe);
+
+ if (skb->len == 0)
+ break;
+
+ header = (u32 *) skb->data;
+ le32_to_cpus(header);
+ packet = (char *)(header + 1);
+ skb_pull(skb, 4);
+ }
+
+ if (skb->len < 0) {
+ devdbg(dev,"invalid rx length %d", skb->len);
+ return 0;
+ }
+ return 1;
+}
+
+static struct sk_buff *ax88772_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
+ int flags)
+{
+ int padlen;
+ int headroom = skb_headroom(skb);
+ int tailroom = skb_tailroom(skb);
+ u32 *packet_len;
+ u32 *padbytes_ptr;
+
+ padlen = ((skb->len + 4) % 512) ? 0 : 4;
+
+ if ((!skb_cloned(skb))
+ && ((headroom + tailroom) >= (4 + padlen))) {
+ if ((headroom < 4) || (tailroom < padlen)) {
+ skb->data = memmove(skb->head + 4, skb->data, skb->len);
+ skb->tail = skb->data + skb->len;
+ }
+ } else {
+ struct sk_buff *skb2;
+ skb2 = skb_copy_expand(skb, 4, padlen, flags);
+ dev_kfree_skb_any(skb);
+ skb = skb2;
+ if (!skb)
+ return NULL;
+ }
+
+ packet_len = (u32 *) skb_push(skb, 4);
+
+ packet_len = (u32 *) skb->data;
+ *packet_len = (((skb->len - 4) ^ 0x0000ffff) << 16) + (skb->len - 4);
+
+ if ((skb->len % 512) == 0) {
+ padbytes_ptr = (u32 *) skb->tail;
+ *padbytes_ptr = 0xffff0000;
+ skb_put(skb, padlen);
+ }
+ return skb;
+}
+
+static const struct driver_info ax8817x_info = {
+ .description = "ASIX AX8817x USB 2.0 Ethernet",
+ .bind = ax8817x_bind,
+ .unbind = ax8817x_unbind,
+ .flags = FLAG_ETHER,
+ .data = 0x00130103,
+};
+
+static const struct driver_info dlink_dub_e100_info = {
+ .description = "DLink DUB-E100 USB Ethernet",
+ .bind = ax8817x_bind,
+ .unbind = ax8817x_unbind,
+ .flags = FLAG_ETHER,
+ .data = 0x009f9d9f,
+};
+
+static const struct driver_info netgear_fa120_info = {
+ .description = "Netgear FA-120 USB Ethernet",
+ .bind = ax8817x_bind,
+ .unbind = ax8817x_unbind,
+ .flags = FLAG_ETHER,
+ .data = 0x00130103,
+};
+
+static const struct driver_info hawking_uf200_info = {
+ .description = "Hawking UF200 USB Ethernet",
+ .bind = ax8817x_bind,
+ .unbind = ax8817x_unbind,
+ .flags = FLAG_ETHER,
+ .data = 0x001f1d1f,
+};
+
+static const struct driver_info ax88772_info = {
+ .description = "ASIX AX88772 USB 2.0 Ethernet",
+ .bind = ax88772_bind,
+ .unbind = ax8817x_unbind,
+ .flags = FLAG_ETHER | FLAG_FRAMING_AX,
+ .rx_fixup = ax88772_rx_fixup,
+ .tx_fixup = ax88772_tx_fixup,
+ .data = 0x00130103,
+};
+
+#endif /* CONFIG_USB_AX8817X */
+
+
+
+#ifdef CONFIG_USB_BELKIN
+#define HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Belkin F5U104 ... two NetChip 2280 devices + Atmel microcontroller
+ *
+ * ... also two eTEK designs, including one sold as "Advance USBNET"
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info belkin_info = {
+ .description = "Belkin, eTEK, or compatible",
+};
+
+#endif /* CONFIG_USB_BELKIN */
+
+
+
+/*-------------------------------------------------------------------------
+ *
+ * Communications Device Class declarations.
+ * Used by CDC Ethernet, and some CDC variants
+ *
+ *-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_USB_CDCETHER
+#define NEED_GENERIC_CDC
+#endif
+
+#ifdef CONFIG_USB_ZAURUS
+/* Ethernet variant uses funky framing, broken ethernet addressing */
+#define NEED_GENERIC_CDC
+#endif
+
+#ifdef CONFIG_USB_RNDIS
+/* ACM variant uses even funkier framing, complex control RPC scheme */
+#define NEED_GENERIC_CDC
+#endif
+
+
+#ifdef NEED_GENERIC_CDC
+
+#include <linux/usb_cdc.h>
+
+struct cdc_state {
+ struct usb_cdc_header_desc *header;
+ struct usb_cdc_union_desc *u;
+ struct usb_cdc_ether_desc *ether;
+ struct usb_interface *control;
+ struct usb_interface *data;
+};
+
+static struct usb_driver usbnet_driver;
+
+/*
+ * probes control interface, claims data interface, collects the bulk
+ * endpoints, activates data interface (if needed), maybe sets MTU.
+ * all pure cdc, except for certain firmware workarounds.
+ */
+static int generic_cdc_bind (struct usbnet *dev, struct usb_interface *intf)
+{
+ u8 *buf = intf->cur_altsetting->extra;
+ int len = intf->cur_altsetting->extralen;
+ struct usb_interface_descriptor *d;
+ struct cdc_state *info = (void *) &dev->data;
+ int status;
+ int rndis;
+
+ if (sizeof dev->data < sizeof *info)
+ return -EDOM;
+
+ /* expect strict spec conformance for the descriptors, but
+ * cope with firmware which stores them in the wrong place
+ */
+ if (len == 0 && dev->udev->actconfig->extralen) {
+ /* Motorola SB4100 (and others: Brad Hards says it's
+ * from a Broadcom design) put CDC descriptors here
+ */
+ buf = dev->udev->actconfig->extra;
+ len = dev->udev->actconfig->extralen;
+ if (len)
+ dev_dbg (&intf->dev,
+ "CDC descriptors on config\n");
+ }
+
+ /* this assumes that if there's a non-RNDIS vendor variant
+ * of cdc-acm, it'll fail RNDIS requests cleanly.
+ */
+ rndis = (intf->cur_altsetting->desc.bInterfaceProtocol == 0xff);
+
+ memset (info, 0, sizeof *info);
+ info->control = intf;
+ while (len > 3) {
+ if (buf [1] != USB_DT_CS_INTERFACE)
+ goto next_desc;
+
+ /* use bDescriptorSubType to identify the CDC descriptors.
+ * We expect devices with CDC header and union descriptors.
+ * For CDC Ethernet we need the ethernet descriptor.
+ * For RNDIS, ignore two (pointless) CDC modem descriptors
+ * in favor of a complicated OID-based RPC scheme doing what
+ * CDC Ethernet achieves with a simple descriptor.
+ */
+ switch (buf [2]) {
+ case USB_CDC_HEADER_TYPE:
+ if (info->header) {
+ dev_dbg (&intf->dev, "extra CDC header\n");
+ goto bad_desc;
+ }
+ info->header = (void *) buf;
+ if (info->header->bLength != sizeof *info->header) {
+ dev_dbg (&intf->dev, "CDC header len %u\n",
+ info->header->bLength);
+ goto bad_desc;
+ }
+ break;
+ case USB_CDC_UNION_TYPE:
+ if (info->u) {
+ dev_dbg (&intf->dev, "extra CDC union\n");
+ goto bad_desc;
+ }
+ info->u = (void *) buf;
+ if (info->u->bLength != sizeof *info->u) {
+ dev_dbg (&intf->dev, "CDC union len %u\n",
+ info->u->bLength);
+ goto bad_desc;
+ }
+
+ /* we need a master/control interface (what we're
+ * probed with) and a slave/data interface; union
+ * descriptors sort this all out.
+ */
+ info->control = usb_ifnum_to_if(dev->udev,
+ info->u->bMasterInterface0);
+ info->data = usb_ifnum_to_if(dev->udev,
+ info->u->bSlaveInterface0);
+ if (!info->control || !info->data) {
+ dev_dbg (&intf->dev,
+ "master #%u/%p slave #%u/%p\n",
+ info->u->bMasterInterface0,
+ info->control,
+ info->u->bSlaveInterface0,
+ info->data);
+ goto bad_desc;
+ }
+ if (info->control != intf) {
+ dev_dbg (&intf->dev, "bogus CDC Union\n");
+ /* Ambit USB Cable Modem (and maybe others)
+ * interchanges master and slave interface.
+ */
+ if (info->data == intf) {
+ info->data = info->control;
+ info->control = intf;
+ } else
+ goto bad_desc;
+ }
+
+ /* a data interface altsetting does the real i/o */
+ d = &info->data->cur_altsetting->desc;
+ if (d->bInterfaceClass != USB_CLASS_CDC_DATA) {
+ dev_dbg (&intf->dev, "slave class %u\n",
+ d->bInterfaceClass);
+ goto bad_desc;
+ }
+ break;
+ case USB_CDC_ETHERNET_TYPE:
+ if (info->ether) {
+ dev_dbg (&intf->dev, "extra CDC ether\n");
+ goto bad_desc;
+ }
+ info->ether = (void *) buf;
+ if (info->ether->bLength != sizeof *info->ether) {
+ dev_dbg (&intf->dev, "CDC ether len %u\n",
+ info->u->bLength);
+ goto bad_desc;
+ }
+ dev->net->mtu = le16_to_cpup (
+ &info->ether->wMaxSegmentSize)
+ - ETH_HLEN;
+ /* because of Zaurus, we may be ignoring the host
+ * side link address we were given.
+ */
+ break;
+ }
+next_desc:
+ len -= buf [0]; /* bLength */
+ buf += buf [0];
+ }
+
+ if (!info->header || !info->u || (!rndis && !info->ether)) {
+ dev_dbg (&intf->dev, "missing cdc %s%s%sdescriptor\n",
+ info->header ? "" : "header ",
+ info->u ? "" : "union ",
+ info->ether ? "" : "ether ");
+ goto bad_desc;
+ }
+
+ /* claim data interface and set it up ... with side effects.
+ * network traffic can't flow until an altsetting is enabled.
+ */
+ status = usb_driver_claim_interface (&usbnet_driver, info->data, dev);
+ if (status < 0)
+ return status;
+ status = get_endpoints (dev, info->data);
+ if (status < 0) {
+ /* ensure immediate exit from usbnet_disconnect */
+ usb_set_intfdata(info->data, NULL);
+ usb_driver_release_interface (&usbnet_driver, info->data);
+ return status;
+ }
+
+ /* status endpoint: optional for CDC Ethernet, not RNDIS (or ACM) */
+ dev->status = NULL;
+ if (info->control->cur_altsetting->desc.bNumEndpoints == 1) {
+ struct usb_endpoint_descriptor *desc;
+
+ dev->status = &info->control->cur_altsetting->endpoint [0];
+ desc = &dev->status->desc;
+ if (desc->bmAttributes != USB_ENDPOINT_XFER_INT
+ || !(desc->bEndpointAddress & USB_DIR_IN)
+ || (le16_to_cpu(desc->wMaxPacketSize)
+ < sizeof (struct usb_cdc_notification))
+ || !desc->bInterval) {
+ dev_dbg (&intf->dev, "bad notification endpoint\n");
+ dev->status = NULL;
+ }
+ }
+ if (rndis && !dev->status) {
+ dev_dbg (&intf->dev, "missing RNDIS status endpoint\n");
+ usb_set_intfdata(info->data, NULL);
+ usb_driver_release_interface (&usbnet_driver, info->data);
+ return -ENODEV;
+ }
+ return 0;
+
+bad_desc:
+ dev_info (&dev->udev->dev, "bad CDC descriptors\n");
+ return -ENODEV;
+}
+
+static void cdc_unbind (struct usbnet *dev, struct usb_interface *intf)
+{
+ struct cdc_state *info = (void *) &dev->data;
+
+ /* disconnect master --> disconnect slave */
+ if (intf == info->control && info->data) {
+ /* ensure immediate exit from usbnet_disconnect */
+ usb_set_intfdata(info->data, NULL);
+ usb_driver_release_interface (&usbnet_driver, info->data);
+ info->data = NULL;
+ }
+
+ /* and vice versa (just in case) */
+ else if (intf == info->data && info->control) {
+ /* ensure immediate exit from usbnet_disconnect */
+ usb_set_intfdata(info->control, NULL);
+ usb_driver_release_interface (&usbnet_driver, info->control);
+ info->control = NULL;
+ }
+}
+
+
+static void dumpspeed (struct usbnet *dev, __le32 *speeds)
+{
+ if (netif_msg_timer (dev))
+ devinfo (dev, "link speeds: %u kbps up, %u kbps down",
+ __le32_to_cpu(speeds[0]) / 1000,
+ __le32_to_cpu(speeds[1]) / 1000);
+}
+
+static void cdc_status (struct usbnet *dev, struct urb *urb)
+{
+ struct usb_cdc_notification *event;
+
+ if (urb->actual_length < sizeof *event)
+ return;
+
+ /* SPEED_CHANGE can get split into two 8-byte packets */
+ if (test_and_clear_bit (EVENT_STS_SPLIT, &dev->flags)) {
+ dumpspeed (dev, (__le32 *) urb->transfer_buffer);
+ return;
+ }
+
+ event = urb->transfer_buffer;
+ switch (event->bNotificationType) {
+ case USB_CDC_NOTIFY_NETWORK_CONNECTION:
+ if (netif_msg_timer (dev))
+ devdbg (dev, "CDC: carrier %s",
+ event->wValue ? "on" : "off");
+ if (event->wValue)
+ netif_carrier_on(dev->net);
+ else
+ netif_carrier_off(dev->net);
+ break;
+ case USB_CDC_NOTIFY_SPEED_CHANGE: /* tx/rx rates */
+ if (netif_msg_timer (dev))
+ devdbg (dev, "CDC: speed change (len %d)",
+ urb->actual_length);
+ if (urb->actual_length != (sizeof *event + 8))
+ set_bit (EVENT_STS_SPLIT, &dev->flags);
+ else
+ dumpspeed (dev, (__le32 *) &event[1]);
+ break;
+ // case USB_CDC_NOTIFY_RESPONSE_AVAILABLE: /* RNDIS; or unsolicited */
+ default:
+ deverr (dev, "CDC: unexpected notification %02x!",
+ event->bNotificationType);
+ break;
+ }
+}
+
+#endif /* NEED_GENERIC_CDC */
+
+
+#ifdef CONFIG_USB_CDCETHER
+#define HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Communications Device Class, Ethernet Control model
+ *
+ * Takes two interfaces. The DATA interface is inactive till an altsetting
+ * is selected. Configuration data includes class descriptors.
+ *
+ * This should interop with whatever the 2.4 "CDCEther.c" driver
+ * (by Brad Hards) talked with.
+ *
+ *-------------------------------------------------------------------------*/
+
+#include <linux/ctype.h>
+
+static u8 nibble (unsigned char c)
+{
+ if (likely (isdigit (c)))
+ return c - '0';
+ c = toupper (c);
+ if (likely (isxdigit (c)))
+ return 10 + c - 'A';
+ return 0;
+}
+
+static inline int
+get_ethernet_addr (struct usbnet *dev, struct usb_cdc_ether_desc *e)
+{
+ int tmp, i;
+ unsigned char buf [13];
+
+ tmp = usb_string (dev->udev, e->iMACAddress, buf, sizeof buf);
+ if (tmp != 12) {
+ dev_dbg (&dev->udev->dev,
+ "bad MAC string %d fetch, %d\n", e->iMACAddress, tmp);
+ if (tmp >= 0)
+ tmp = -EINVAL;
+ return tmp;
+ }
+ for (i = tmp = 0; i < 6; i++, tmp += 2)
+ dev->net->dev_addr [i] =
+ (nibble (buf [tmp]) << 4) + nibble (buf [tmp + 1]);
+ return 0;
+}
+
+static int cdc_bind (struct usbnet *dev, struct usb_interface *intf)
+{
+ int status;
+ struct cdc_state *info = (void *) &dev->data;
+
+ status = generic_cdc_bind (dev, intf);
+ if (status < 0)
+ return status;
+
+ status = get_ethernet_addr (dev, info->ether);
+ if (status < 0) {
+ usb_set_intfdata(info->data, NULL);
+ usb_driver_release_interface (&usbnet_driver, info->data);
+ return status;
+ }
+
+ /* FIXME cdc-ether has some multicast code too, though it complains
+ * in routine cases. info->ether describes the multicast support.
+ */
+ return 0;
+}
+
+static const struct driver_info cdc_info = {
+ .description = "CDC Ethernet Device",
+ .flags = FLAG_ETHER,
+ // .check_connect = cdc_check_connect,
+ .bind = cdc_bind,
+ .unbind = cdc_unbind,
+ .status = cdc_status,
+};
+
+#endif /* CONFIG_USB_CDCETHER */
+
+
+
+#ifdef CONFIG_USB_EPSON2888
+#define HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * EPSON USB clients
+ *
+ * This is the same idea as Linux PDAs (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.
+ *
+ * Support was from Juro Bystricky <bystricky.juro@erd.epson.com>
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info epson2888_info = {
+ .description = "Epson USB Device",
+ .check_connect = always_connected,
+
+ .in = 4, .out = 3,
+};
+
+#endif /* CONFIG_USB_EPSON2888 */
+
+
+#ifdef CONFIG_USB_GENESYS
+#define HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * GeneSys GL620USB-A (www.genesyslogic.com.tw)
+ *
+ * ... 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.
+ *
+ * Original code from Jiun-Jie Huang <huangjj@genesyslogic.com.tw>
+ * and merged into "usbnet" by Stanislav Brabec <utx@penguin.cz>.
+ *
+ *-------------------------------------------------------------------------*/
+
+// control msg write command
+#define GENELINK_CONNECT_WRITE 0xF0
+// interrupt pipe index
+#define GENELINK_INTERRUPT_PIPE 0x03
+// interrupt read buffer size
+#define INTERRUPT_BUFSIZE 0x08
+// interrupt pipe interval value
+#define GENELINK_INTERRUPT_INTERVAL 0x10
+// max transmit packet number per transmit
+#define GL_MAX_TRANSMIT_PACKETS 32
+// max packet length
+#define GL_MAX_PACKET_LEN 1514
+// max receive buffer size
+#define GL_RCV_BUF_SIZE \
+ (((GL_MAX_PACKET_LEN + 4) * GL_MAX_TRANSMIT_PACKETS) + 4)
+
+struct gl_packet {
+ u32 packet_length;
+ char packet_data [1];
+};
+
+struct gl_header {
+ u32 packet_count;
+ struct gl_packet packets;
+};
+
+#ifdef GENELINK_ACK
+
+// FIXME: this code is incomplete, not debugged; it doesn't
+// handle interrupts correctly. interrupts should be generic
+// code like all other device I/O, anyway.
+
+struct gl_priv {
+ struct urb *irq_urb;
+ char irq_buf [INTERRUPT_BUFSIZE];
+};
+
+static inline int gl_control_write (struct usbnet *dev, u8 request, u16 value)
+{
+ int retval;
+
+ retval = usb_control_msg (dev->udev,
+ usb_sndctrlpipe (dev->udev, 0),
+ request,
+ USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ value,
+ 0, // index
+ 0, // data buffer
+ 0, // size
+ CONTROL_TIMEOUT_MS);
+ return retval;
+}
+
+static void gl_interrupt_complete (struct urb *urb, struct pt_regs *regs)
+{
+ int status = urb->status;
+
+ switch (status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d",
+ __FUNCTION__, status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d",
+ __FUNCTION__, urb->status);
+ }
+
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, status);
+}
+
+static int gl_interrupt_read (struct usbnet *dev)
+{
+ struct gl_priv *priv = dev->priv_data;
+ int retval;
+
+ // issue usb interrupt read
+ if (priv && priv->irq_urb) {
+ // submit urb
+ if ((retval = usb_submit_urb (priv->irq_urb, GFP_KERNEL)) != 0)
+ dbg ("gl_interrupt_read: submit fail - %X...", retval);
+ else
+ dbg ("gl_interrupt_read: submit success...");
+ }
+
+ return 0;
+}
+
+// check whether another side is connected
+static int genelink_check_connect (struct usbnet *dev)
+{
+ int retval;
+
+ dbg ("genelink_check_connect...");
+
+ // detect whether another side is connected
+ if ((retval = gl_control_write (dev, GENELINK_CONNECT_WRITE, 0)) != 0) {
+ dbg ("%s: genelink_check_connect write fail - %X",
+ dev->net->name, retval);
+ return retval;
+ }
+
+ // usb interrupt read to ack another side
+ if ((retval = gl_interrupt_read (dev)) != 0) {
+ dbg ("%s: genelink_check_connect read fail - %X",
+ dev->net->name, retval);
+ return retval;
+ }
+
+ dbg ("%s: genelink_check_connect read success", dev->net->name);
+ return 0;
+}
+
+// allocate and initialize the private data for genelink
+static int genelink_init (struct usbnet *dev)
+{
+ struct gl_priv *priv;
+
+ // allocate the private data structure
+ if ((priv = kmalloc (sizeof *priv, GFP_KERNEL)) == 0) {
+ dbg ("%s: cannot allocate private data per device",
+ dev->net->name);
+ return -ENOMEM;
+ }
+
+ // allocate irq urb
+ if ((priv->irq_urb = usb_alloc_urb (0, GFP_KERNEL)) == 0) {
+ dbg ("%s: cannot allocate private irq urb per device",
+ dev->net->name);
+ kfree (priv);
+ return -ENOMEM;
+ }
+
+ // fill irq urb
+ usb_fill_int_urb (priv->irq_urb, dev->udev,
+ usb_rcvintpipe (dev->udev, GENELINK_INTERRUPT_PIPE),
+ priv->irq_buf, INTERRUPT_BUFSIZE,
+ gl_interrupt_complete, 0,
+ GENELINK_INTERRUPT_INTERVAL);
+
+ // set private data pointer
+ dev->priv_data = priv;
+
+ return 0;
+}
+
+// release the private data
+static int genelink_free (struct usbnet *dev)
+{
+ struct gl_priv *priv = dev->priv_data;
+
+ if (!priv)
+ return 0;
+
+// FIXME: can't cancel here; it's synchronous, and
+// should have happened earlier in any case (interrupt
+// handling needs to be generic)
+
+ // cancel irq urb first
+ usb_kill_urb (priv->irq_urb);
+
+ // free irq urb
+ usb_free_urb (priv->irq_urb);
+
+ // free the private data structure
+ kfree (priv);
+
+ return 0;
+}
+
+#endif
+
+static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
+{
+ struct gl_header *header;
+ struct gl_packet *packet;
+ struct sk_buff *gl_skb;
+ u32 size;
+
+ header = (struct gl_header *) skb->data;
+
+ // get the packet count of the received skb
+ le32_to_cpus (&header->packet_count);
+ if ((header->packet_count > GL_MAX_TRANSMIT_PACKETS)
+ || (header->packet_count < 0)) {
+ dbg ("genelink: invalid received packet count %d",
+ header->packet_count);
+ return 0;
+ }
+
+ // set the current packet pointer to the first packet
+ packet = &header->packets;
+
+ // decrement the length for the packet count size 4 bytes
+ skb_pull (skb, 4);
+
+ while (header->packet_count > 1) {
+ // get the packet length
+ size = packet->packet_length;
+
+ // this may be a broken packet
+ if (size > GL_MAX_PACKET_LEN) {
+ dbg ("genelink: invalid rx length %d", size);
+ return 0;
+ }
+
+ // 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(skb_put(gl_skb, size), packet->packet_data, size);
+ skb_return (dev, skb);
+ }
+
+ // advance to the next packet
+ packet = (struct gl_packet *)
+ &packet->packet_data [size];
+ header->packet_count--;
+
+ // shift the data pointer to the next gl_packet
+ skb_pull (skb, size + 4);
+ }
+
+ // skip the packet length field 4 bytes
+ skb_pull (skb, 4);
+
+ if (skb->len > GL_MAX_PACKET_LEN) {
+ dbg ("genelink: invalid rx length %d", skb->len);
+ return 0;
+ }
+ return 1;
+}
+
+static struct sk_buff *
+genelink_tx_fixup (struct usbnet *dev, struct sk_buff *skb, int flags)
+{
+ int padlen;
+ int length = skb->len;
+ int headroom = skb_headroom (skb);
+ int tailroom = skb_tailroom (skb);
+ u32 *packet_count;
+ u32 *packet_len;
+
+ // FIXME: magic numbers, bleech
+ padlen = ((skb->len + (4 + 4*1)) % 64) ? 0 : 1;
+
+ if ((!skb_cloned (skb))
+ && ((headroom + tailroom) >= (padlen + (4 + 4*1)))) {
+ if ((headroom < (4 + 4*1)) || (tailroom < padlen)) {
+ skb->data = memmove (skb->head + (4 + 4*1),
+ skb->data, skb->len);
+ skb->tail = skb->data + skb->len;
+ }
+ } else {
+ struct sk_buff *skb2;
+ skb2 = skb_copy_expand (skb, (4 + 4*1) , padlen, flags);
+ dev_kfree_skb_any (skb);
+ skb = skb2;
+ if (!skb)
+ return NULL;
+ }
+
+ // attach the packet count to the header
+ packet_count = (u32 *) skb_push (skb, (4 + 4*1));
+ packet_len = packet_count + 1;
+
+ // FIXME little endian?
+ *packet_count = 1;
+ *packet_len = length;
+
+ // add padding byte
+ if ((skb->len % dev->maxpacket) == 0)
+ skb_put (skb, 1);
+
+ return skb;
+}
+
+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,
+
+#ifdef GENELINK_ACK
+ .check_connect =genelink_check_connect,
+#endif
+};
+
+#endif /* CONFIG_USB_GENESYS */
+
+
+
+#ifdef CONFIG_USB_NET1080
+#define HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Netchip 1080 driver ... http://www.netchip.com
+ * Used in LapLink cables
+ *
+ *-------------------------------------------------------------------------*/
+
+#define dev_packet_id data[0]
+#define frame_errors data[1]
+
+/*
+ * NetChip framing of ethernet packets, supporting additional error
+ * checks for links that may drop bulk packets from inside messages.
+ * Odd USB length == always short read for last usb packet.
+ * - nc_header
+ * - Ethernet header (14 bytes)
+ * - payload
+ * - (optional padding byte, if needed so length becomes odd)
+ * - nc_trailer
+ *
+ * This framing is to be avoided for non-NetChip devices.
+ */
+
+struct nc_header { // packed:
+ __le16 hdr_len; // sizeof nc_header (LE, all)
+ __le16 packet_len; // payload size (including ethhdr)
+ __le16 packet_id; // detects dropped packets
+#define MIN_HEADER 6
+
+ // all else is optional, and must start with:
+ // u16 vendorId; // from usb-if
+ // u16 productId;
+} __attribute__((__packed__));
+
+#define PAD_BYTE ((unsigned char)0xAC)
+
+struct nc_trailer {
+ __le16 packet_id;
+} __attribute__((__packed__));
+
+// packets may use FLAG_FRAMING_NC and optional pad
+#define FRAMED_SIZE(mtu) (sizeof (struct nc_header) \
+ + sizeof (struct ethhdr) \
+ + (mtu) \
+ + 1 \
+ + sizeof (struct nc_trailer))
+
+#define MIN_FRAMED FRAMED_SIZE(0)
+
+
+/*
+ * Zero means no timeout; else, how long a 64 byte bulk packet may be queued
+ * before the hardware drops it. If that's done, the driver will need to
+ * frame network packets to guard against the dropped USB packets. The win32
+ * driver sets this for both sides of the link.
+ */
+#define NC_READ_TTL_MS ((u8)255) // ms
+
+/*
+ * We ignore most registers and EEPROM contents.
+ */
+#define REG_USBCTL ((u8)0x04)
+#define REG_TTL ((u8)0x10)
+#define REG_STATUS ((u8)0x11)
+
+/*
+ * Vendor specific requests to read/write data
+ */
+#define REQUEST_REGISTER ((u8)0x10)
+#define REQUEST_EEPROM ((u8)0x11)
+
+static int
+nc_vendor_read (struct usbnet *dev, u8 req, u8 regnum, u16 *retval_ptr)
+{
+ int status = usb_control_msg (dev->udev,
+ usb_rcvctrlpipe (dev->udev, 0),
+ req,
+ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ 0, regnum,
+ retval_ptr, sizeof *retval_ptr,
+ CONTROL_TIMEOUT_MS);
+ if (status > 0)
+ status = 0;
+ if (!status)
+ le16_to_cpus (retval_ptr);
+ return status;
+}
+
+static inline int
+nc_register_read (struct usbnet *dev, u8 regnum, u16 *retval_ptr)
+{
+ return nc_vendor_read (dev, REQUEST_REGISTER, regnum, retval_ptr);
+}
+
+// no retval ... can become async, usable in_interrupt()
+static void
+nc_vendor_write (struct usbnet *dev, u8 req, u8 regnum, u16 value)
+{
+ usb_control_msg (dev->udev,
+ usb_sndctrlpipe (dev->udev, 0),
+ req,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ value, regnum,
+ NULL, 0, // data is in setup packet
+ CONTROL_TIMEOUT_MS);
+}
+
+static inline void
+nc_register_write (struct usbnet *dev, u8 regnum, u16 value)
+{
+ nc_vendor_write (dev, REQUEST_REGISTER, regnum, value);
+}
+
+
+#if 0
+static void nc_dump_registers (struct usbnet *dev)
+{
+ u8 reg;
+ u16 *vp = kmalloc (sizeof (u16));
+
+ if (!vp) {
+ dbg ("no memory?");
+ return;
+ }
+
+ dbg ("%s registers:", dev->net->name);
+ for (reg = 0; reg < 0x20; reg++) {
+ int retval;
+
+ // reading some registers is trouble
+ if (reg >= 0x08 && reg <= 0xf)
+ continue;
+ if (reg >= 0x12 && reg <= 0x1e)
+ continue;
+
+ retval = nc_register_read (dev, reg, vp);
+ if (retval < 0)
+ dbg ("%s reg [0x%x] ==> error %d",
+ dev->net->name, reg, retval);
+ else
+ dbg ("%s reg [0x%x] = 0x%x",
+ dev->net->name, reg, *vp);
+ }
+ kfree (vp);
+}
+#endif
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Control register
+ */
+
+#define USBCTL_WRITABLE_MASK 0x1f0f
+// bits 15-13 reserved, r/o
+#define USBCTL_ENABLE_LANG (1 << 12)
+#define USBCTL_ENABLE_MFGR (1 << 11)
+#define USBCTL_ENABLE_PROD (1 << 10)
+#define USBCTL_ENABLE_SERIAL (1 << 9)
+#define USBCTL_ENABLE_DEFAULTS (1 << 8)
+// bits 7-4 reserved, r/o
+#define USBCTL_FLUSH_OTHER (1 << 3)
+#define USBCTL_FLUSH_THIS (1 << 2)
+#define USBCTL_DISCONN_OTHER (1 << 1)
+#define USBCTL_DISCONN_THIS (1 << 0)
+
+static inline void nc_dump_usbctl (struct usbnet *dev, u16 usbctl)
+{
+ if (!netif_msg_link (dev))
+ return;
+ 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" : "",
+ (usbctl & USBCTL_ENABLE_PROD) ? " prod" : "",
+ (usbctl & USBCTL_ENABLE_SERIAL) ? " serial" : "",
+ (usbctl & USBCTL_ENABLE_DEFAULTS) ? " defaults" : "",
+
+ (usbctl & USBCTL_FLUSH_OTHER) ? " FLUSH" : "",
+ (usbctl & USBCTL_DISCONN_OTHER) ? " DIS" : "",
+ (usbctl & USBCTL_FLUSH_THIS) ? " FLUSH" : "",
+ (usbctl & USBCTL_DISCONN_THIS) ? " DIS" : "",
+ usbctl & ~USBCTL_WRITABLE_MASK
+ );
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Status register
+ */
+
+#define STATUS_PORT_A (1 << 15)
+
+#define STATUS_CONN_OTHER (1 << 14)
+#define STATUS_SUSPEND_OTHER (1 << 13)
+#define STATUS_MAILBOX_OTHER (1 << 12)
+#define STATUS_PACKETS_OTHER(n) (((n) >> 8) && 0x03)
+
+#define STATUS_CONN_THIS (1 << 6)
+#define STATUS_SUSPEND_THIS (1 << 5)
+#define STATUS_MAILBOX_THIS (1 << 4)
+#define STATUS_PACKETS_THIS(n) (((n) >> 0) && 0x03)
+
+#define STATUS_UNSPEC_MASK 0x0c8c
+#define STATUS_NOISE_MASK ((u16)~(0x0303|STATUS_UNSPEC_MASK))
+
+
+static inline void nc_dump_status (struct usbnet *dev, u16 status)
+{
+ if (!netif_msg_link (dev))
+ return;
+ 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
+ // (1 at reset, not 0); maybe UNSPEC too
+
+ (status & STATUS_PORT_A) ? 'A' : 'B',
+ STATUS_PACKETS_THIS (status),
+ (status & STATUS_CONN_THIS) ? " CON" : "",
+ (status & STATUS_SUSPEND_THIS) ? " SUS" : "",
+ (status & STATUS_MAILBOX_THIS) ? " MBOX" : "",
+
+ STATUS_PACKETS_OTHER (status),
+ (status & STATUS_CONN_OTHER) ? " CON" : "",
+ (status & STATUS_SUSPEND_OTHER) ? " SUS" : "",
+ (status & STATUS_MAILBOX_OTHER) ? " MBOX" : "",
+
+ status & STATUS_UNSPEC_MASK
+ );
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * TTL register
+ */
+
+#define TTL_THIS(ttl) (0x00ff & ttl)
+#define TTL_OTHER(ttl) (0x00ff & (ttl >> 8))
+#define MK_TTL(this,other) ((u16)(((other)<<8)|(0x00ff&(this))))
+
+static inline void nc_dump_ttl (struct usbnet *dev, u16 ttl)
+{
+ if (netif_msg_link (dev))
+ devdbg (dev, "net1080 %s-%s ttl 0x%x this = %d, other = %d",
+ dev->udev->bus->bus_name, dev->udev->devpath,
+ ttl, TTL_THIS (ttl), TTL_OTHER (ttl));
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int net1080_reset (struct usbnet *dev)
+{
+ u16 usbctl, status, ttl;
+ u16 *vp = kmalloc (sizeof (u16), GFP_KERNEL);
+ int retval;
+
+ if (!vp)
+ return -ENOMEM;
+
+ // 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;
+ nc_dump_status (dev, status);
+
+ if ((retval = nc_register_read (dev, REG_USBCTL, vp)) < 0) {
+ dbg ("can't read USBCTL, %d", retval);
+ goto done;
+ }
+ usbctl = *vp;
+ nc_dump_usbctl (dev, usbctl);
+
+ nc_register_write (dev, REG_USBCTL,
+ USBCTL_FLUSH_THIS | USBCTL_FLUSH_OTHER);
+
+ if ((retval = nc_register_read (dev, REG_TTL, vp)) < 0) {
+ dbg ("can't read TTL, %d", retval);
+ goto done;
+ }
+ ttl = *vp;
+ // nc_dump_ttl (dev, ttl);
+
+ nc_register_write (dev, REG_TTL,
+ MK_TTL (NC_READ_TTL_MS, TTL_OTHER (ttl)) );
+ dbg ("%s: assigned TTL, %d ms", dev->net->name, NC_READ_TTL_MS);
+
+ if (netif_msg_link (dev))
+ devinfo (dev, "port %c, peer %sconnected",
+ (status & STATUS_PORT_A) ? 'A' : 'B',
+ (status & STATUS_CONN_OTHER) ? "" : "dis"
+ );
+ retval = 0;
+
+done:
+ kfree (vp);
+ return retval;
+}
+
+static int net1080_check_connect (struct usbnet *dev)
+{
+ int retval;
+ u16 status;
+ u16 *vp = kmalloc (sizeof (u16), GFP_KERNEL);
+
+ if (!vp)
+ return -ENOMEM;
+ retval = nc_register_read (dev, REG_STATUS, vp);
+ status = *vp;
+ kfree (vp);
+ if (retval != 0) {
+ dbg ("%s net1080_check_conn read - %d", dev->net->name, retval);
+ return retval;
+ }
+ if ((status & STATUS_CONN_OTHER) != STATUS_CONN_OTHER)
+ return -ENOLINK;
+ return 0;
+}
+
+static void nc_flush_complete (struct urb *urb, struct pt_regs *regs)
+{
+ kfree (urb->context);
+ usb_free_urb(urb);
+}
+
+static void nc_ensure_sync (struct usbnet *dev)
+{
+ dev->frame_errors++;
+ if (dev->frame_errors > 5) {
+ struct urb *urb;
+ struct usb_ctrlrequest *req;
+ int status;
+
+ /* Send a flush */
+ urb = usb_alloc_urb (0, SLAB_ATOMIC);
+ if (!urb)
+ return;
+
+ req = kmalloc (sizeof *req, GFP_ATOMIC);
+ if (!req) {
+ usb_free_urb (urb);
+ return;
+ }
+
+ req->bRequestType = USB_DIR_OUT
+ | USB_TYPE_VENDOR
+ | USB_RECIP_DEVICE;
+ req->bRequest = REQUEST_REGISTER;
+ req->wValue = cpu_to_le16 (USBCTL_FLUSH_THIS
+ | USBCTL_FLUSH_OTHER);
+ req->wIndex = cpu_to_le16 (REG_USBCTL);
+ req->wLength = cpu_to_le16 (0);
+
+ /* queue an async control request, we don't need
+ * to do anything when it finishes except clean up.
+ */
+ usb_fill_control_urb (urb, dev->udev,
+ usb_sndctrlpipe (dev->udev, 0),
+ (unsigned char *) req,
+ NULL, 0,
+ nc_flush_complete, req);
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status) {
+ kfree (req);
+ usb_free_urb (urb);
+ return;
+ }
+
+ if (netif_msg_rx_err (dev))
+ devdbg (dev, "flush net1080; too many framing errors");
+ dev->frame_errors = 0;
+ }
+}
+
+static int net1080_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
+{
+ struct nc_header *header;
+ struct nc_trailer *trailer;
+ u16 hdr_len, packet_len;
+
+ if (!(skb->len & 0x01)
+ || MIN_FRAMED > skb->len
+ || 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);
+ nc_ensure_sync (dev);
+ return 0;
+ }
+
+ header = (struct nc_header *) skb->data;
+ hdr_len = le16_to_cpup (&header->hdr_len);
+ packet_len = le16_to_cpup (&header->packet_len);
+ if (FRAMED_SIZE (packet_len) > MAX_PACKET) {
+ dev->stats.rx_frame_errors++;
+ dbg ("packet too big, %d", packet_len);
+ nc_ensure_sync (dev);
+ return 0;
+ } else if (hdr_len < MIN_HEADER) {
+ dev->stats.rx_frame_errors++;
+ dbg ("header too short, %d", hdr_len);
+ nc_ensure_sync (dev);
+ return 0;
+ } else if (hdr_len > MIN_HEADER) {
+ // out of band data for us?
+ dbg ("header OOB, %d bytes", hdr_len - MIN_HEADER);
+ nc_ensure_sync (dev);
+ // switch (vendor/product ids) { ... }
+ }
+ skb_pull (skb, hdr_len);
+
+ trailer = (struct nc_trailer *)
+ (skb->data + skb->len - sizeof *trailer);
+ skb_trim (skb, skb->len - sizeof *trailer);
+
+ if ((packet_len & 0x01) == 0) {
+ if (skb->data [packet_len] != PAD_BYTE) {
+ dev->stats.rx_frame_errors++;
+ dbg ("bad pad");
+ return 0;
+ }
+ skb_trim (skb, skb->len - 1);
+ }
+ if (skb->len != packet_len) {
+ dev->stats.rx_frame_errors++;
+ dbg ("bad packet len %d (expected %d)",
+ skb->len, packet_len);
+ nc_ensure_sync (dev);
+ return 0;
+ }
+ if (header->packet_id != get_unaligned (&trailer->packet_id)) {
+ dev->stats.rx_fifo_errors++;
+ dbg ("(2+ dropped) rx packet_id mismatch 0x%x 0x%x",
+ le16_to_cpu (header->packet_id),
+ le16_to_cpu (trailer->packet_id));
+ return 0;
+ }
+#if 0
+ devdbg (dev, "frame <rx h %d p %d id %d", header->hdr_len,
+ header->packet_len, header->packet_id);
+#endif
+ dev->frame_errors = 0;
+ return 1;
+}
+
+static struct sk_buff *
+net1080_tx_fixup (struct usbnet *dev, struct sk_buff *skb, int flags)
+{
+ int padlen;
+ struct sk_buff *skb2;
+
+ padlen = ((skb->len + sizeof (struct nc_header)
+ + sizeof (struct nc_trailer)) & 0x01) ? 0 : 1;
+ if (!skb_cloned (skb)) {
+ int headroom = skb_headroom (skb);
+ int tailroom = skb_tailroom (skb);
+
+ if ((padlen + sizeof (struct nc_trailer)) <= tailroom
+ && sizeof (struct nc_header) <= headroom)
+ /* There's enough head and tail room */
+ return skb;
+
+ if ((sizeof (struct nc_header) + padlen
+ + sizeof (struct nc_trailer)) <
+ (headroom + tailroom)) {
+ /* There's enough total room, so just readjust */
+ skb->data = memmove (skb->head
+ + sizeof (struct nc_header),
+ skb->data, skb->len);
+ skb->tail = skb->data + skb->len;
+ return skb;
+ }
+ }
+
+ /* Create a new skb to use with the correct size */
+ skb2 = skb_copy_expand (skb,
+ sizeof (struct nc_header),
+ sizeof (struct nc_trailer) + padlen,
+ flags);
+ dev_kfree_skb_any (skb);
+ return skb2;
+}
+
+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,
+};
+
+#endif /* CONFIG_USB_NET1080 */
+
+
+
+#ifdef CONFIG_USB_PL2301
+#define HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Prolific PL-2301/PL-2302 driver ... http://www.prolifictech.com
+ *
+ * The protocol and handshaking used here should be bug-compatible
+ * with the Linux 2.2 "plusb" driver, by Deti Fliegl.
+ *
+ *-------------------------------------------------------------------------*/
+
+/*
+ * Bits 0-4 can be used for software handshaking; they're set from
+ * one end, cleared from the other, "read" with the interrupt byte.
+ */
+#define PL_S_EN (1<<7) /* (feature only) suspend enable */
+/* reserved bit -- rx ready (6) ? */
+#define PL_TX_READY (1<<5) /* (interrupt only) transmit ready */
+#define PL_RESET_OUT (1<<4) /* reset output pipe */
+#define PL_RESET_IN (1<<3) /* reset input pipe */
+#define PL_TX_C (1<<2) /* transmission complete */
+#define PL_TX_REQ (1<<1) /* transmission received */
+#define PL_PEER_E (1<<0) /* peer exists */
+
+static inline int
+pl_vendor_req (struct usbnet *dev, u8 req, u8 val, u8 index)
+{
+ return usb_control_msg (dev->udev,
+ usb_rcvctrlpipe (dev->udev, 0),
+ req,
+ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ val, index,
+ NULL, 0,
+ CONTROL_TIMEOUT_MS);
+}
+
+static inline int
+pl_clear_QuickLink_features (struct usbnet *dev, int val)
+{
+ return pl_vendor_req (dev, 1, (u8) val, 0);
+}
+
+static inline int
+pl_set_QuickLink_features (struct usbnet *dev, int val)
+{
+ return pl_vendor_req (dev, 3, (u8) val, 0);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int pl_reset (struct usbnet *dev)
+{
+ /* some units seem to need this reset, others reject it utterly.
+ * FIXME be more like "naplink" or windows drivers.
+ */
+ (void) pl_set_QuickLink_features (dev,
+ PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);
+ 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,
+};
+
+#endif /* CONFIG_USB_PL2301 */
+
+
+#ifdef CONFIG_USB_KC2190
+#define HAVE_HARDWARE
+static const struct driver_info kc2190_info = {
+ .description = "KC Technology KC-190",
+};
+#endif /* CONFIG_USB_KC2190 */
+
+
+#ifdef CONFIG_USB_ARMLINUX
+#define HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Intel's SA-1100 chip integrates basic USB support, and is used
+ * in PDAs like some iPaqs, the Yopy, some Zaurus models, and more.
+ * When they run Linux, arch/arm/mach-sa1100/usb-eth.c may be used to
+ * network using minimal USB framing data.
+ *
+ * This describes the driver currently in standard ARM Linux kernels.
+ * The Zaurus uses a different driver (see later).
+ *
+ * PXA25x and PXA210 use XScale cores (ARM v5TE) with better USB support
+ * and different USB endpoint numbering than the SA1100 devices. The
+ * mach-pxa/usb-eth.c driver re-uses the device ids from mach-sa1100
+ * so we rely on the endpoint descriptors.
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info linuxdev_info = {
+ .description = "Linux Device",
+ .check_connect = always_connected,
+};
+
+static const struct driver_info yopy_info = {
+ .description = "Yopy",
+ .check_connect = always_connected,
+};
+
+static const struct driver_info blob_info = {
+ .description = "Boot Loader OBject",
+ .check_connect = always_connected,
+};
+
+#endif /* CONFIG_USB_ARMLINUX */
+
+
+#ifdef CONFIG_USB_ZAURUS
+#define HAVE_HARDWARE
+
+#include <linux/crc32.h>
+
+/*-------------------------------------------------------------------------
+ *
+ * Zaurus is also a SA-1110 based PDA, but one using a different driver
+ * (and framing) for its USB slave/gadget controller than the case above.
+ *
+ * For the current version of that driver, the main way that framing is
+ * nonstandard (also from perspective of the CDC ethernet model!) is a
+ * crc32, added to help detect when some sa1100 usb-to-memory DMA errata
+ * haven't been fully worked around. Also, all Zaurii use the same
+ * default Ethernet address.
+ *
+ * PXA based models use the same framing, and also can't implement
+ * set_interface properly.
+ *
+ * All known Zaurii lie about their standards conformance. Most lie by
+ * saying they support CDC Ethernet. Some lie and say they support CDC
+ * MDLM (as if for access to cell phone modems). Someone, please beat
+ * on Sharp for a while with a cluestick.
+ *
+ *-------------------------------------------------------------------------*/
+
+static struct sk_buff *
+zaurus_tx_fixup (struct usbnet *dev, struct sk_buff *skb, int flags)
+{
+ int padlen;
+ struct sk_buff *skb2;
+
+ padlen = 2;
+ if (!skb_cloned (skb)) {
+ int tailroom = skb_tailroom (skb);
+ if ((padlen + 4) <= tailroom)
+ goto done;
+ }
+ skb2 = skb_copy_expand (skb, 0, 4 + padlen, flags);
+ dev_kfree_skb_any (skb);
+ skb = skb2;
+ if (skb) {
+ u32 fcs;
+done:
+ fcs = crc32_le (~0, skb->data, skb->len);
+ fcs = ~fcs;
+
+ *skb_put (skb, 1) = fcs & 0xff;
+ *skb_put (skb, 1) = (fcs>> 8) & 0xff;
+ *skb_put (skb, 1) = (fcs>>16) & 0xff;
+ *skb_put (skb, 1) = (fcs>>24) & 0xff;
+ }
+ return skb;
+}
+
+static const struct driver_info zaurus_sl5x00_info = {
+ .description = "Sharp Zaurus SL-5x00",
+ .flags = FLAG_FRAMING_Z,
+ .check_connect = always_connected,
+ .bind = generic_cdc_bind,
+ .unbind = cdc_unbind,
+ .tx_fixup = zaurus_tx_fixup,
+};
+#define ZAURUS_STRONGARM_INFO ((unsigned long)&zaurus_sl5x00_info)
+
+static const struct driver_info zaurus_pxa_info = {
+ .description = "Sharp Zaurus, PXA-2xx based",
+ .flags = FLAG_FRAMING_Z,
+ .check_connect = always_connected,
+ .bind = generic_cdc_bind,
+ .unbind = cdc_unbind,
+ .tx_fixup = zaurus_tx_fixup,
+};
+#define ZAURUS_PXA_INFO ((unsigned long)&zaurus_pxa_info)
+
+static const struct driver_info zaurus_pxa_mdlm_info = {
+ .description = "Sharp Zaurus, PXA-255 based",
+ .flags = FLAG_FRAMING_Z,
+ .check_connect = always_connected,
+ .tx_fixup = zaurus_tx_fixup,
+};
+
+static const struct driver_info olympus_mxl_info = {
+ .description = "Olympus R1000",
+ .flags = FLAG_FRAMING_Z,
+ .check_connect = always_connected,
+ .bind = generic_cdc_bind,
+ .unbind = cdc_unbind,
+ .tx_fixup = zaurus_tx_fixup,
+};
+#define OLYMPUS_MXL_INFO ((unsigned long)&olympus_mxl_info)
+
+#else
+
+/* blacklist all those devices */
+#define ZAURUS_STRONGARM_INFO 0
+#define ZAURUS_PXA_INFO 0
+#define OLYMPUS_MXL_INFO 0
+
+#endif
+
+
+/*-------------------------------------------------------------------------
+ *
+ * Network Device Driver (peer link to "Host Device", from USB host)
+ *
+ *-------------------------------------------------------------------------*/
+
+static int usbnet_change_mtu (struct net_device *net, int new_mtu)
+{
+ struct usbnet *dev = netdev_priv(net);
+
+ if (new_mtu <= MIN_PACKET || new_mtu > MAX_PACKET)
+ return -EINVAL;
+#ifdef CONFIG_USB_NET1080
+ if (((dev->driver_info->flags) & FLAG_FRAMING_NC)) {
+ if (FRAMED_SIZE (new_mtu) > MAX_PACKET)
+ return -EINVAL;
+ }
+#endif
+#ifdef CONFIG_USB_GENESYS
+ if (((dev->driver_info->flags) & FLAG_FRAMING_GL)
+ && new_mtu > GL_MAX_PACKET_LEN)
+ return -EINVAL;
+#endif
+ // no second zero-length packet read wanted after mtu-sized packets
+ if (((new_mtu + sizeof (struct ethhdr)) % dev->maxpacket) == 0)
+ return -EDOM;
+ net->mtu = new_mtu;
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static struct net_device_stats *usbnet_get_stats (struct net_device *net)
+{
+ struct usbnet *dev = netdev_priv(net);
+ return &dev->stats;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* some LK 2.4 HCDs oopsed if we freed or resubmitted urbs from
+ * completion callbacks. 2.5 should have fixed those bugs...
+ */
+
+static void defer_bh (struct usbnet *dev, struct sk_buff *skb)
+{
+ struct sk_buff_head *list = skb->list;
+ unsigned long flags;
+
+ spin_lock_irqsave (&list->lock, flags);
+ __skb_unlink (skb, list);
+ spin_unlock (&list->lock);
+ spin_lock (&dev->done.lock);
+ __skb_queue_tail (&dev->done, skb);
+ if (dev->done.qlen == 1)
+ tasklet_schedule (&dev->bh);
+ 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_work() 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_work (&dev->kevent))
+ deverr (dev, "kevent %d may have been dropped", work);
+ else
+ devdbg (dev, "kevent %d scheduled", work);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void rx_complete (struct urb *urb, struct pt_regs *regs);
+
+static void rx_submit (struct usbnet *dev, struct urb *urb, int flags)
+{
+ struct sk_buff *skb;
+ struct skb_data *entry;
+ int retval = 0;
+ unsigned long lockflags;
+ size_t size;
+
+#ifdef CONFIG_USB_NET1080
+ if (dev->driver_info->flags & FLAG_FRAMING_NC)
+ size = FRAMED_SIZE (dev->net->mtu);
+ else
+#endif
+#ifdef CONFIG_USB_GENESYS
+ if (dev->driver_info->flags & FLAG_FRAMING_GL)
+ size = GL_RCV_BUF_SIZE;
+ else
+#endif
+#ifdef CONFIG_USB_ZAURUS
+ if (dev->driver_info->flags & FLAG_FRAMING_Z)
+ size = 6 + (sizeof (struct ethhdr) + dev->net->mtu);
+ else
+#endif
+#ifdef CONFIG_USB_RNDIS
+ if (dev->driver_info->flags & FLAG_FRAMING_RN)
+ size = RNDIS_MAX_TRANSFER;
+ else
+#endif
+#ifdef CONFIG_USB_AX8817X
+ if (dev->driver_info->flags & FLAG_FRAMING_AX)
+ size = 2048;
+ else
+#endif
+ size = (sizeof (struct ethhdr) + dev->net->mtu);
+
+ if ((skb = alloc_skb (size + NET_IP_ALIGN, flags)) == NULL) {
+ if (netif_msg_rx_err (dev))
+ devdbg (dev, "no rx skb");
+ defer_kevent (dev, EVENT_RX_MEMORY);
+ usb_free_urb (urb);
+ return;
+ }
+ skb_reserve (skb, NET_IP_ALIGN);
+
+ entry = (struct skb_data *) skb->cb;
+ entry->urb = urb;
+ entry->dev = dev;
+ entry->state = rx_start;
+ entry->length = 0;
+
+ usb_fill_bulk_urb (urb, dev->udev, dev->in,
+ skb->data, size, rx_complete, skb);
+ urb->transfer_flags |= URB_ASYNC_UNLINK;
+
+ spin_lock_irqsave (&dev->rxq.lock, lockflags);
+
+ if (netif_running (dev->net)
+ && netif_device_present (dev->net)
+ && !test_bit (EVENT_RX_HALT, &dev->flags)) {
+ switch (retval = usb_submit_urb (urb, GFP_ATOMIC)){
+ case -EPIPE:
+ defer_kevent (dev, EVENT_RX_HALT);
+ break;
+ case -ENOMEM:
+ defer_kevent (dev, EVENT_RX_MEMORY);
+ break;
+ case -ENODEV:
+ if (netif_msg_ifdown (dev))
+ devdbg (dev, "device gone");
+ netif_device_detach (dev->net);
+ break;
+ default:
+ if (netif_msg_rx_err (dev))
+ devdbg (dev, "rx submit, %d", retval);
+ tasklet_schedule (&dev->bh);
+ break;
+ case 0:
+ __skb_queue_tail (&dev->rxq, skb);
+ }
+ } else {
+ if (netif_msg_ifdown (dev))
+ devdbg (dev, "rx: stopped");
+ retval = -ENOLINK;
+ }
+ spin_unlock_irqrestore (&dev->rxq.lock, lockflags);
+ if (retval) {
+ dev_kfree_skb_any (skb);
+ usb_free_urb (urb);
+ }
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static inline void rx_process (struct usbnet *dev, struct sk_buff *skb)
+{
+ if (dev->driver_info->rx_fixup
+ && !dev->driver_info->rx_fixup (dev, skb))
+ goto error;
+ // else network stack removes extra byte if we forced a short packet
+
+ if (skb->len)
+ skb_return (dev, skb);
+ else {
+ if (netif_msg_rx_err (dev))
+ devdbg (dev, "drop");
+error:
+ dev->stats.rx_errors++;
+ skb_queue_tail (&dev->done, skb);
+ }
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void rx_complete (struct urb *urb, struct pt_regs *regs)
+{
+ struct sk_buff *skb = (struct sk_buff *) urb->context;
+ struct skb_data *entry = (struct skb_data *) skb->cb;
+ struct usbnet *dev = entry->dev;
+ int urb_status = urb->status;
+
+ skb_put (skb, urb->actual_length);
+ entry->state = rx_done;
+ entry->urb = NULL;
+
+ switch (urb_status) {
+ // success
+ case 0:
+ if (MIN_PACKET > skb->len || skb->len > MAX_PACKET) {
+ entry->state = rx_cleanup;
+ dev->stats.rx_errors++;
+ dev->stats.rx_length_errors++;
+ if (netif_msg_rx_err (dev))
+ devdbg (dev, "rx length %d", skb->len);
+ }
+ 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:
+ dev->stats.rx_errors++;
+ defer_kevent (dev, EVENT_RX_HALT);
+ // FALLTHROUGH
+
+ // software-driven interface shutdown
+ case -ECONNRESET: // async unlink
+ case -ESHUTDOWN: // hardware gone
+ if (netif_msg_ifdown (dev))
+ devdbg (dev, "rx shutdown, code %d", urb_status);
+ goto block;
+
+ // we get controller i/o faults during khubd disconnect() delays.
+ // throttle down resubmits, to avoid log floods; just temporarily,
+ // so we still recover when the fault isn't a khubd delay.
+ case -EPROTO: // ehci
+ case -ETIMEDOUT: // ohci
+ case -EILSEQ: // uhci
+ dev->stats.rx_errors++;
+ if (!timer_pending (&dev->delay)) {
+ mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES);
+ if (netif_msg_link (dev))
+ devdbg (dev, "rx throttle %d", urb_status);
+ }
+block:
+ entry->state = rx_cleanup;
+ entry->urb = urb;
+ urb = NULL;
+ break;
+
+ // data overrun ... flush fifo?
+ case -EOVERFLOW:
+ dev->stats.rx_over_errors++;
+ // FALLTHROUGH
+
+ default:
+ entry->state = rx_cleanup;
+ dev->stats.rx_errors++;
+ if (netif_msg_rx_err (dev))
+ devdbg (dev, "rx status %d", urb_status);
+ break;
+ }
+
+ 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);
+ }
+ if (netif_msg_rx_err (dev))
+ devdbg (dev, "no read resubmitted");
+}
+
+static void intr_complete (struct urb *urb, struct pt_regs *regs)
+{
+ struct usbnet *dev = urb->context;
+ int status = urb->status;
+
+ switch (status) {
+ /* success */
+ case 0:
+ dev->driver_info->status(dev, urb);
+ break;
+
+ /* software-driven interface shutdown */
+ case -ENOENT: // urb killed
+ case -ESHUTDOWN: // hardware gone
+ if (netif_msg_ifdown (dev))
+ devdbg (dev, "intr shutdown, code %d", status);
+ return;
+
+ /* NOTE: not throttling like RX/TX, since this endpoint
+ * already polls infrequently
+ */
+ default:
+ devdbg (dev, "intr status %d", status);
+ break;
+ }
+
+ if (!netif_running (dev->net))
+ return;
+
+ memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status != 0 && netif_msg_timer (dev))
+ deverr(dev, "intr resubmit --> %d", status);
+}
+
+/*-------------------------------------------------------------------------*/
+
+// unlink pending rx/tx; completion handlers do all other cleanup
+
+static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
+{
+ unsigned long flags;
+ struct sk_buff *skb, *skbnext;
+ int count = 0;
+
+ spin_lock_irqsave (&q->lock, flags);
+ for (skb = q->next; skb != (struct sk_buff *) q; skb = skbnext) {
+ struct skb_data *entry;
+ struct urb *urb;
+ int retval;
+
+ entry = (struct skb_data *) skb->cb;
+ urb = entry->urb;
+ skbnext = skb->next;
+
+ // during some PM-driven resume scenarios,
+ // these (async) unlinks complete immediately
+ retval = usb_unlink_urb (urb);
+ if (retval != -EINPROGRESS && retval != 0)
+ devdbg (dev, "unlink urb err, %d", retval);
+ else
+ count++;
+ }
+ spin_unlock_irqrestore (&q->lock, flags);
+ return count;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+// precondition: never called in_interrupt
+
+static int usbnet_stop (struct net_device *net)
+{
+ struct usbnet *dev = netdev_priv(net);
+ int temp;
+ DECLARE_WAIT_QUEUE_HEAD (unlink_wakeup);
+ DECLARE_WAITQUEUE (wait, current);
+
+ netif_stop_queue (net);
+
+ if (netif_msg_ifdown (dev))
+ 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);
+ dev->wait = &unlink_wakeup;
+ temp = unlink_urbs (dev, &dev->txq) + unlink_urbs (dev, &dev->rxq);
+
+ // maybe wait for deletions to finish.
+ while (skb_queue_len (&dev->rxq)
+ && skb_queue_len (&dev->txq)
+ && skb_queue_len (&dev->done)) {
+ msleep(UNLINK_TIMEOUT_MS);
+ if (netif_msg_ifdown (dev))
+ devdbg (dev, "waited for %d urb completions", temp);
+ }
+ dev->wait = NULL;
+ remove_wait_queue (&unlink_wakeup, &wait);
+
+ usb_kill_urb(dev->interrupt);
+
+ /* deferred work (task, timer, softirq) must also stop.
+ * can't flush_scheduled_work() until we drop rtnl (later),
+ * else workers could deadlock; so make workers a NOP.
+ */
+ dev->flags = 0;
+ del_timer_sync (&dev->delay);
+ tasklet_kill (&dev->bh);
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+// posts reads, and enables write queuing
+
+// precondition: never called in_interrupt
+
+static int usbnet_open (struct net_device *net)
+{
+ struct usbnet *dev = netdev_priv(net);
+ int retval = 0;
+ struct driver_info *info = dev->driver_info;
+
+ // put into "known safe" state
+ if (info->reset && (retval = info->reset (dev)) < 0) {
+ if (netif_msg_ifup (dev))
+ devinfo (dev,
+ "open reset fail (%d) usbnet usb-%s-%s, %s",
+ retval,
+ dev->udev->bus->bus_name, dev->udev->devpath,
+ info->description);
+ goto done;
+ }
+
+ // insist peer be connected
+ if (info->check_connect && (retval = info->check_connect (dev)) < 0) {
+ if (netif_msg_ifup (dev))
+ devdbg (dev, "can't open; %d", retval);
+ goto done;
+ }
+
+ /* start any status interrupt transfer */
+ if (dev->interrupt) {
+ retval = usb_submit_urb (dev->interrupt, GFP_KERNEL);
+ if (retval < 0) {
+ if (netif_msg_ifup (dev))
+ deverr (dev, "intr submit %d", retval);
+ goto done;
+ }
+ }
+
+ netif_start_queue (net);
+ if (netif_msg_ifup (dev)) {
+ char *framing;
+
+ if (dev->driver_info->flags & FLAG_FRAMING_NC)
+ framing = "NetChip";
+ else if (dev->driver_info->flags & FLAG_FRAMING_GL)
+ framing = "GeneSys";
+ else if (dev->driver_info->flags & FLAG_FRAMING_Z)
+ framing = "Zaurus";
+ else if (dev->driver_info->flags & FLAG_FRAMING_RN)
+ framing = "RNDIS";
+ else if (dev->driver_info->flags & FLAG_FRAMING_AX)
+ framing = "ASIX";
+ else
+ framing = "simple";
+
+ devinfo (dev, "open: enable queueing "
+ "(rx %d, tx %d) mtu %d %s framing",
+ RX_QLEN (dev), TX_QLEN (dev), dev->net->mtu,
+ framing);
+ }
+
+ // delay posting reads until we're fully open
+ tasklet_schedule (&dev->bh);
+done:
+ return retval;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
+{
+ struct usbnet *dev = netdev_priv(net);
+
+ 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);
+}
+
+static u32 usbnet_get_link (struct net_device *net)
+{
+ struct usbnet *dev = netdev_priv(net);
+
+ /* If a check_connect is defined, return it's results */
+ if (dev->driver_info->check_connect)
+ return dev->driver_info->check_connect (dev) == 0;
+
+ /* Otherwise, we're up to avoid breaking scripts */
+ return 1;
+}
+
+static u32 usbnet_get_msglevel (struct net_device *net)
+{
+ struct usbnet *dev = netdev_priv(net);
+
+ return dev->msg_enable;
+}
+
+static void usbnet_set_msglevel (struct net_device *net, u32 level)
+{
+ struct usbnet *dev = netdev_priv(net);
+
+ dev->msg_enable = level;
+}
+
+static int usbnet_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
+{
+#ifdef NEED_MII
+ {
+ struct usbnet *dev = netdev_priv(net);
+
+ if (dev->mii.mdio_read != NULL && dev->mii.mdio_write != NULL)
+ return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
+ }
+#endif
+ return -EOPNOTSUPP;
+}
+
+/*-------------------------------------------------------------------------*/
+
+/* work that cannot be done in interrupt context uses keventd.
+ *
+ * NOTE: with 2.5 we could do more of this using completion callbacks,
+ * especially now that control transfers can be queued.
+ */
+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, &dev->txq);
+ status = usb_clear_halt (dev->udev, dev->out);
+ if (status < 0 && status != -EPIPE) {
+ if (netif_msg_tx_err (dev))
+ deverr (dev, "can't clear tx halt, status %d",
+ 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, &dev->rxq);
+ status = usb_clear_halt (dev->udev, dev->in);
+ if (status < 0 && status != -EPIPE) {
+ if (netif_msg_rx_err (dev))
+ deverr (dev, "can't clear rx halt, status %d",
+ 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 = NULL;
+
+ if (netif_running (dev->net))
+ urb = usb_alloc_urb (0, GFP_KERNEL);
+ else
+ clear_bit (EVENT_RX_MEMORY, &dev->flags);
+ if (urb != NULL) {
+ clear_bit (EVENT_RX_MEMORY, &dev->flags);
+ rx_submit (dev, urb, GFP_KERNEL);
+ tasklet_schedule (&dev->bh);
+ }
+ }
+
+ if (dev->flags)
+ devdbg (dev, "kevent done, flags = 0x%lx",
+ dev->flags);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void tx_complete (struct urb *urb, struct pt_regs *regs)
+{
+ struct sk_buff *skb = (struct sk_buff *) urb->context;
+ struct skb_data *entry = (struct skb_data *) skb->cb;
+ struct usbnet *dev = entry->dev;
+
+ if (urb->status == 0) {
+ dev->stats.tx_packets++;
+ dev->stats.tx_bytes += entry->length;
+ } else {
+ dev->stats.tx_errors++;
+
+ switch (urb->status) {
+ case -EPIPE:
+ defer_kevent (dev, EVENT_TX_HALT);
+ break;
+
+ /* software-driven interface shutdown */
+ case -ECONNRESET: // async unlink
+ case -ESHUTDOWN: // hardware gone
+ break;
+
+ // like rx, tx gets controller i/o faults during khubd delays
+ // and so it uses the same throttling mechanism.
+ case -EPROTO: // ehci
+ case -ETIMEDOUT: // ohci
+ case -EILSEQ: // uhci
+ if (!timer_pending (&dev->delay)) {
+ mod_timer (&dev->delay,
+ jiffies + THROTTLE_JIFFIES);
+ if (netif_msg_link (dev))
+ devdbg (dev, "tx throttle %d",
+ urb->status);
+ }
+ netif_stop_queue (dev->net);
+ break;
+ default:
+ if (netif_msg_tx_err (dev))
+ devdbg (dev, "tx err %d", entry->urb->status);
+ break;
+ }
+ }
+
+ urb->dev = NULL;
+ entry->state = tx_done;
+ defer_bh (dev, skb);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static void usbnet_tx_timeout (struct net_device *net)
+{
+ struct usbnet *dev = netdev_priv(net);
+
+ unlink_urbs (dev, &dev->txq);
+ tasklet_schedule (&dev->bh);
+
+ // FIXME: device recovery -- reset?
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
+{
+ struct usbnet *dev = netdev_priv(net);
+ int length;
+ int retval = NET_XMIT_SUCCESS;
+ struct urb *urb = NULL;
+ struct skb_data *entry;
+ struct driver_info *info = dev->driver_info;
+ unsigned long flags;
+#ifdef CONFIG_USB_NET1080
+ struct nc_header *header = NULL;
+ struct nc_trailer *trailer = NULL;
+#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) {
+ if (netif_msg_tx_err (dev))
+ devdbg (dev, "can't tx_fixup skb");
+ goto drop;
+ }
+ }
+ length = skb->len;
+
+ if (!(urb = usb_alloc_urb (0, GFP_ATOMIC))) {
+ if (netif_msg_tx_err (dev))
+ devdbg (dev, "no urb");
+ goto drop;
+ }
+
+ entry = (struct skb_data *) skb->cb;
+ entry->urb = urb;
+ entry->dev = dev;
+ entry->state = tx_start;
+ entry->length = length;
+
+ // FIXME: reorganize a bit, so that fixup() fills out NetChip
+ // framing too. (Packet ID update needs the spinlock...)
+ // [ BETTER: we already own net->xmit_lock, that's enough ]
+
+#ifdef CONFIG_USB_NET1080
+ if (info->flags & FLAG_FRAMING_NC) {
+ header = (struct nc_header *) skb_push (skb, sizeof *header);
+ header->hdr_len = cpu_to_le16 (sizeof (*header));
+ header->packet_len = cpu_to_le16 (length);
+ if (!((skb->len + sizeof *trailer) & 0x01))
+ *skb_put (skb, 1) = PAD_BYTE;
+ trailer = (struct nc_trailer *) skb_put (skb, sizeof *trailer);
+ }
+#endif /* CONFIG_USB_NET1080 */
+
+ usb_fill_bulk_urb (urb, dev->udev, dev->out,
+ skb->data, skb->len, tx_complete, skb);
+ urb->transfer_flags |= URB_ASYNC_UNLINK;
+
+ /* don't assume the hardware handles USB_ZERO_PACKET
+ * NOTE: strictly conforming cdc-ether devices should expect
+ * the ZLP here, but ignore the one-byte packet.
+ *
+ * FIXME zero that byte, if it doesn't require a new skb.
+ */
+ if ((length % dev->maxpacket) == 0)
+ urb->transfer_buffer_length++;
+
+ spin_lock_irqsave (&dev->txq.lock, flags);
+
+#ifdef CONFIG_USB_NET1080
+ if (info->flags & FLAG_FRAMING_NC) {
+ header->packet_id = cpu_to_le16 ((u16)dev->dev_packet_id++);
+ put_unaligned (header->packet_id, &trailer->packet_id);
+#if 0
+ devdbg (dev, "frame >tx h %d p %d id %d",
+ header->hdr_len, header->packet_len,
+ header->packet_id);
+#endif
+ }
+#endif /* CONFIG_USB_NET1080 */
+
+ switch ((retval = usb_submit_urb (urb, GFP_ATOMIC))) {
+ case -EPIPE:
+ netif_stop_queue (net);
+ defer_kevent (dev, EVENT_TX_HALT);
+ break;
+ default:
+ if (netif_msg_tx_err (dev))
+ devdbg (dev, "tx: submit urb err %d", retval);
+ break;
+ case 0:
+ net->trans_start = jiffies;
+ __skb_queue_tail (&dev->txq, skb);
+ if (dev->txq.qlen >= TX_QLEN (dev))
+ netif_stop_queue (net);
+ }
+ spin_unlock_irqrestore (&dev->txq.lock, flags);
+
+ if (retval) {
+ if (netif_msg_tx_err (dev))
+ devdbg (dev, "drop, code %d", retval);
+drop:
+ retval = NET_XMIT_SUCCESS;
+ dev->stats.tx_dropped++;
+ if (skb)
+ dev_kfree_skb_any (skb);
+ usb_free_urb (urb);
+ } else if (netif_msg_tx_queued (dev)) {
+ devdbg (dev, "> tx, len %d, type 0x%x",
+ length, skb->protocol);
+ }
+ return retval;
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+// tasklet (work deferred from completions, in_irq) or timer
+
+static void usbnet_bh (unsigned long param)
+{
+ struct usbnet *dev = (struct usbnet *) param;
+ struct sk_buff *skb;
+ struct skb_data *entry;
+
+ while ((skb = skb_dequeue (&dev->done))) {
+ entry = (struct skb_data *) skb->cb;
+ switch (entry->state) {
+ case rx_done:
+ entry->state = rx_cleanup;
+ rx_process (dev, skb);
+ continue;
+ case tx_done:
+ case rx_cleanup:
+ usb_free_urb (entry->urb);
+ dev_kfree_skb (skb);
+ continue;
+ default:
+ devdbg (dev, "bogus skb state %d", entry->state);
+ }
+ }
+
+ // waiting for all pending urbs to complete?
+ if (dev->wait) {
+ if ((dev->txq.qlen + dev->rxq.qlen + dev->done.qlen) == 0) {
+ wake_up (dev->wait);
+ }
+
+ // or are we maybe short a few urbs?
+ } else if (netif_running (dev->net)
+ && netif_device_present (dev->net)
+ && !timer_pending (&dev->delay)
+ && !test_bit (EVENT_RX_HALT, &dev->flags)) {
+ int temp = dev->rxq.qlen;
+ int qlen = RX_QLEN (dev);
+
+ if (temp < qlen) {
+ struct urb *urb;
+ int i;
+
+ // don't refill the queue all at once
+ for (i = 0; i < 10 && dev->rxq.qlen < qlen; i++) {
+ urb = usb_alloc_urb (0, GFP_ATOMIC);
+ if (urb != NULL)
+ rx_submit (dev, urb, GFP_ATOMIC);
+ }
+ if (temp != dev->rxq.qlen && netif_msg_link (dev))
+ devdbg (dev, "rxqlen %d --> %d",
+ temp, dev->rxq.qlen);
+ if (dev->rxq.qlen < qlen)
+ tasklet_schedule (&dev->bh);
+ }
+ if (dev->txq.qlen < TX_QLEN (dev))
+ netif_wake_queue (dev->net);
+ }
+}
+
+
+
+/*-------------------------------------------------------------------------
+ *
+ * USB Device Driver support
+ *
+ *-------------------------------------------------------------------------*/
+
+// precondition: never called in_interrupt
+
+static void usbnet_disconnect (struct usb_interface *intf)
+{
+ struct usbnet *dev;
+ struct usb_device *xdev;
+ struct net_device *net;
+
+ dev = usb_get_intfdata(intf);
+ usb_set_intfdata(intf, NULL);
+ if (!dev)
+ return;
+
+ xdev = interface_to_usbdev (intf);
+
+ if (netif_msg_probe (dev))
+ devinfo (dev, "unregister usbnet usb-%s-%s, %s",
+ xdev->bus->bus_name, xdev->devpath,
+ dev->driver_info->description);
+
+ net = dev->net;
+ unregister_netdev (net);
+
+ /* we don't hold rtnl here ... */
+ flush_scheduled_work ();
+
+ if (dev->driver_info->unbind)
+ dev->driver_info->unbind (dev, intf);
+
+ free_netdev(net);
+ usb_put_dev (xdev);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+static struct ethtool_ops usbnet_ethtool_ops;
+
+// precondition: never called in_interrupt
+
+static int
+usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
+{
+ struct usbnet *dev;
+ struct net_device *net;
+ struct usb_host_interface *interface;
+ struct driver_info *info;
+ struct usb_device *xdev;
+ int status;
+
+ info = (struct driver_info *) prod->driver_info;
+ if (!info) {
+ dev_dbg (&udev->dev, "blacklisted by %s\n", driver_name);
+ return -ENODEV;
+ }
+ xdev = interface_to_usbdev (udev);
+ interface = udev->cur_altsetting;
+
+ usb_get_dev (xdev);
+
+ status = -ENOMEM;
+
+ // set up our own records
+ net = alloc_etherdev(sizeof(*dev));
+ if (!net) {
+ dbg ("can't kmalloc dev");
+ goto out;
+ }
+
+ dev = netdev_priv(net);
+ dev->udev = xdev;
+ dev->driver_info = info;
+ dev->msg_enable = netif_msg_init (msg_level, NETIF_MSG_DRV
+ | NETIF_MSG_PROBE | NETIF_MSG_LINK);
+ 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_WORK (&dev->kevent, kevent, dev);
+ dev->delay.function = usbnet_bh;
+ dev->delay.data = (unsigned long) dev;
+ init_timer (&dev->delay);
+
+ SET_MODULE_OWNER (net);
+ dev->net = net;
+ strcpy (net->name, "usb%d");
+ memcpy (net->dev_addr, node_id, sizeof node_id);
+
+#if 0
+// dma_supported() is deeply broken on almost all architectures
+ // possible with some EHCI controllers
+ if (dma_supported (&udev->dev, DMA_64BIT_MASK))
+ net->features |= NETIF_F_HIGHDMA;
+#endif
+
+ net->change_mtu = usbnet_change_mtu;
+ net->get_stats = usbnet_get_stats;
+ net->hard_start_xmit = usbnet_start_xmit;
+ net->open = usbnet_open;
+ net->stop = usbnet_stop;
+ net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
+ net->tx_timeout = usbnet_tx_timeout;
+ net->do_ioctl = usbnet_ioctl;
+ net->ethtool_ops = &usbnet_ethtool_ops;
+
+ // allow device-specific bind/init procedures
+ // NOTE net->name still not usable ...
+ if (info->bind) {
+ status = info->bind (dev, udev);
+ // heuristic: "usb%d" for links we know are two-host,
+ // else "eth%d" when there's reasonable doubt. userspace
+ // can rename the link if it knows better.
+ if ((dev->driver_info->flags & FLAG_ETHER) != 0
+ && (net->dev_addr [0] & 0x02) == 0)
+ strcpy (net->name, "eth%d");
+ } else if (!info->in || info->out)
+ status = get_endpoints (dev, udev);
+ else {
+ dev->in = usb_rcvbulkpipe (xdev, info->in);
+ dev->out = usb_sndbulkpipe (xdev, info->out);
+ if (!(info->flags & FLAG_NO_SETINT))
+ status = usb_set_interface (xdev,
+ interface->desc.bInterfaceNumber,
+ interface->desc.bAlternateSetting);
+ else
+ status = 0;
+
+ }
+
+ if (status == 0 && dev->status)
+ status = init_status (dev, udev);
+ if (status < 0)
+ goto out1;
+
+ dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
+
+ SET_NETDEV_DEV(net, &udev->dev);
+ status = register_netdev (net);
+ if (status)
+ goto out3;
+ if (netif_msg_probe (dev))
+ devinfo (dev, "register usbnet at usb-%s-%s, %s, "
+ "%02x:%02x:%02x:%02x:%02x:%02x",
+ xdev->bus->bus_name, xdev->devpath,
+ dev->driver_info->description,
+ net->dev_addr [0], net->dev_addr [1],
+ net->dev_addr [2], net->dev_addr [3],
+ net->dev_addr [4], net->dev_addr [5]);
+
+ // ok, it's ready to go.
+ usb_set_intfdata (udev, dev);
+
+ // start as if the link is up
+ netif_device_attach (net);
+
+ return 0;
+
+out3:
+ if (info->unbind)
+ info->unbind (dev, udev);
+out1:
+ free_netdev(net);
+out:
+ usb_put_dev(xdev);
+ return status;
+}
+
+/*-------------------------------------------------------------------------*/
+
+#ifdef CONFIG_PM
+
+static int usbnet_suspend (struct usb_interface *intf, u32 state)
+{
+ struct usbnet *dev = usb_get_intfdata(intf);
+
+ netif_device_detach (dev->net);
+ return 0;
+}
+
+static int usbnet_resume (struct usb_interface *intf)
+{
+ struct usbnet *dev = usb_get_intfdata(intf);
+
+ netif_device_attach (dev->net);
+ return 0;
+}
+
+#else /* !CONFIG_PM */
+
+#define usbnet_suspend NULL
+#define usbnet_resume NULL
+
+#endif /* CONFIG_PM */
+
+/*-------------------------------------------------------------------------*/
+
+#ifndef HAVE_HARDWARE
+#error You need to configure some hardware for this driver
+#endif
+
+/*
+ * chip vendor names won't normally be on the cables, and
+ * may not be on the device.
+ */
+
+static const struct usb_device_id products [] = {
+
+#ifdef CONFIG_USB_ALI_M5632
+{
+ USB_DEVICE (0x0402, 0x5632), // ALi defaults
+ .driver_info = (unsigned long) &ali_m5632_info,
+},
+#endif
+
+#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_AX8817X
+{
+ // Linksys USB200M
+ USB_DEVICE (0x077b, 0x2226),
+ .driver_info = (unsigned long) &ax8817x_info,
+}, {
+ // Netgear FA120
+ USB_DEVICE (0x0846, 0x1040),
+ .driver_info = (unsigned long) &netgear_fa120_info,
+}, {
+ // DLink DUB-E100
+ USB_DEVICE (0x2001, 0x1a00),
+ .driver_info = (unsigned long) &dlink_dub_e100_info,
+}, {
+ // Intellinet, ST Lab USB Ethernet
+ USB_DEVICE (0x0b95, 0x1720),
+ .driver_info = (unsigned long) &ax8817x_info,
+}, {
+ // Hawking UF200, TrendNet TU2-ET100
+ USB_DEVICE (0x07b8, 0x420a),
+ .driver_info = (unsigned long) &hawking_uf200_info,
+}, {
+ // Billionton Systems, USB2AR
+ USB_DEVICE (0x08dd, 0x90ff),
+ .driver_info = (unsigned long) &ax8817x_info,
+}, {
+ // ATEN UC210T
+ USB_DEVICE (0x0557, 0x2009),
+ .driver_info = (unsigned long) &ax8817x_info,
+}, {
+ // Buffalo LUA-U2-KTX
+ USB_DEVICE (0x0411, 0x003d),
+ .driver_info = (unsigned long) &ax8817x_info,
+}, {
+ // Sitecom LN-029 "USB 2.0 10/100 Ethernet adapter"
+ USB_DEVICE (0x6189, 0x182d),
+ .driver_info = (unsigned long) &ax8817x_info,
+}, {
+ // corega FEther USB2-TX
+ USB_DEVICE (0x07aa, 0x0017),
+ .driver_info = (unsigned long) &ax8817x_info,
+}, {
+ // Surecom EP-1427X-2
+ USB_DEVICE (0x1189, 0x0893),
+ .driver_info = (unsigned long) &ax8817x_info,
+}, {
+ // goodway corp usb gwusb2e
+ USB_DEVICE (0x1631, 0x6200),
+ .driver_info = (unsigned long) &ax8817x_info,
+}, {
+ // ASIX AX88772 10/100
+ USB_DEVICE (0x0b95, 0x7720),
+ .driver_info = (unsigned long) &ax88772_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_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
+
+#ifdef CONFIG_USB_KC2190
+{
+ USB_DEVICE (0x050f, 0x0190), // KC-190
+ .driver_info = (unsigned long) &kc2190_info,
+},
+#endif
+
+#ifdef CONFIG_USB_RNDIS
+{
+ /* RNDIS is MSFT's un-official variant of CDC ACM */
+ USB_INTERFACE_INFO (USB_CLASS_COMM, 2 /* ACM */, 0x0ff),
+ .driver_info = (unsigned long) &rndis_info,
+},
+#endif
+
+#ifdef CONFIG_USB_ARMLINUX
+/*
+ * SA-1100 using standard ARM Linux kernels, or compatible.
+ * Often used when talking to Linux PDAs (iPaq, Yopy, etc).
+ * The sa-1100 "usb-eth" driver handles the basic framing.
+ *
+ * PXA25x or PXA210 ... these use a "usb-eth" driver much like
+ * the sa1100 one, but hardware uses different endpoint numbers.
+ *
+ * Or the Linux "Ethernet" gadget on hardware that can't talk
+ * CDC Ethernet (e.g., no altsettings), in either of two modes:
+ * - acting just like the old "usb-eth" firmware, though
+ * the implementation is different
+ * - supporting RNDIS as the first/default configuration for
+ * MS-Windows interop; Linux needs to use the other config
+ */
+{
+ // 1183 = 0x049F, both used as hex values?
+ // Compaq "Itsy" vendor/product id
+ USB_DEVICE (0x049F, 0x505A), // usb-eth, or compatible
+ .driver_info = (unsigned long) &linuxdev_info,
+}, {
+ USB_DEVICE (0x0E7E, 0x1001), // G.Mate "Yopy"
+ .driver_info = (unsigned long) &yopy_info,
+}, {
+ USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader
+ .driver_info = (unsigned long) &blob_info,
+}, {
+ // Linux Ethernet/RNDIS gadget on pxa210/25x/26x
+ // e.g. Gumstix, current OpenZaurus, ...
+ USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203),
+ .driver_info = (unsigned long) &linuxdev_info,
+},
+#endif
+
+#if defined(CONFIG_USB_ZAURUS) || defined(CONFIG_USB_CDCETHER)
+/*
+ * SA-1100 based Sharp Zaurus ("collie"), or compatible.
+ * Same idea as above, but different framing.
+ *
+ * PXA-2xx based models are also lying-about-cdc.
+ * Some models don't even tell the same lies ...
+ *
+ * NOTE: OpenZaurus versions with 2.6 kernels won't use these entries,
+ * unlike the older ones with 2.4 "embedix" kernels.
+ *
+ * NOTE: These entries do double-duty, serving as blacklist entries
+ * whenever Zaurus support isn't enabled, but CDC Ethernet is.
+ */
+#define ZAURUS_MASTER_INTERFACE \
+ .bInterfaceClass = USB_CLASS_COMM, \
+ .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, \
+ .bInterfaceProtocol = USB_CDC_PROTO_NONE
+{
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x04DD,
+ .idProduct = 0x8004,
+ ZAURUS_MASTER_INTERFACE,
+ .driver_info = ZAURUS_STRONGARM_INFO,
+}, {
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x04DD,
+ .idProduct = 0x8005, /* A-300 */
+ ZAURUS_MASTER_INTERFACE,
+ .driver_info = ZAURUS_PXA_INFO,
+}, {
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x04DD,
+ .idProduct = 0x8006, /* B-500/SL-5600 */
+ ZAURUS_MASTER_INTERFACE,
+ .driver_info = ZAURUS_PXA_INFO,
+}, {
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x04DD,
+ .idProduct = 0x8007, /* C-700 */
+ ZAURUS_MASTER_INTERFACE,
+ .driver_info = ZAURUS_PXA_INFO,
+}, {
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x04DD,
+ .idProduct = 0x9031, /* C-750 C-760 */
+ ZAURUS_MASTER_INTERFACE,
+ .driver_info = ZAURUS_PXA_INFO,
+}, {
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x04DD,
+ .idProduct = 0x9032, /* SL-6000 */
+ ZAURUS_MASTER_INTERFACE,
+ .driver_info = ZAURUS_PXA_INFO,
+}, {
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x04DD,
+ /* reported with some C860 units */
+ .idProduct = 0x9050, /* C-860 */
+ ZAURUS_MASTER_INTERFACE,
+ .driver_info = ZAURUS_PXA_INFO,
+#ifdef CONFIG_USB_ZAURUS
+ /* at least some (reports vary) C-860 units have very different
+ * lies about their standards support.
+ */
+}, {
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x04DD,
+ /* reported with some C860 units */
+ .idProduct = 0x9031, /* C-860 */
+ .bInterfaceClass = USB_CLASS_COMM,
+ .bInterfaceSubClass = USB_CDC_SUBCLASS_MDLM,
+ .bInterfaceProtocol = USB_CDC_PROTO_NONE,
+ .driver_info = (unsigned long) &zaurus_pxa_mdlm_info,
+#endif
+},
+
+/* Olympus has some models with a Zaurus-compatible option.
+ * R-1000 uses a FreeScale i.MXL cpu (ARMv4T)
+ */
+{
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x07B4,
+ .idProduct = 0x0F02, /* R-1000 */
+ ZAURUS_MASTER_INTERFACE,
+ .driver_info = OLYMPUS_MXL_INFO,
+},
+#endif
+
+#ifdef CONFIG_USB_CDCETHER
+{
+ /* CDC Ether uses two interfaces, not necessarily consecutive.
+ * We match the main interface, ignoring the optional device
+ * class so we could handle devices that aren't exclusively
+ * CDC ether.
+ *
+ * NOTE: this match must come AFTER entries working around
+ * bugs/quirks in a given product (like Zaurus, above).
+ */
+ USB_INTERFACE_INFO (USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET,
+ USB_CDC_PROTO_NONE),
+ .driver_info = (unsigned long) &cdc_info,
+},
+#endif
+
+ { }, // END
+};
+MODULE_DEVICE_TABLE (usb, products);
+
+static struct usb_driver usbnet_driver = {
+ .owner = THIS_MODULE,
+ .name = driver_name,
+ .id_table = products,
+ .probe = usbnet_probe,
+ .disconnect = usbnet_disconnect,
+ .suspend = usbnet_suspend,
+ .resume = usbnet_resume,
+};
+
+/* Default ethtool_ops assigned. Devices can override in their bind() routine */
+static struct ethtool_ops usbnet_ethtool_ops = {
+ .get_drvinfo = usbnet_get_drvinfo,
+ .get_link = usbnet_get_link,
+ .get_msglevel = usbnet_get_msglevel,
+ .set_msglevel = usbnet_set_msglevel,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int __init usbnet_init (void)
+{
+ // compiler should optimize these out
+ BUG_ON (sizeof (((struct sk_buff *)0)->cb)
+ < sizeof (struct skb_data));
+#ifdef CONFIG_USB_CDCETHER
+ BUG_ON ((sizeof (((struct usbnet *)0)->data)
+ < sizeof (struct cdc_state)));
+#endif
+
+ random_ether_addr(node_id);
+
+ return usb_register(&usbnet_driver);
+}
+module_init (usbnet_init);
+
+static void __exit usbnet_exit (void)
+{
+ usb_deregister (&usbnet_driver);
+}
+module_exit (usbnet_exit);
+
+MODULE_AUTHOR ("David Brownell <dbrownell@users.sourceforge.net>");
+MODULE_DESCRIPTION ("USB Host-to-Host Link Drivers (numerous vendors)");
+MODULE_LICENSE ("GPL");
diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c
new file mode 100644
index 000000000000..938025e2c646
--- /dev/null
+++ b/drivers/usb/net/zd1201.c
@@ -0,0 +1,1905 @@
+/*
+ * Driver for ZyDAS zd1201 based wireless USB devices.
+ *
+ * Copyright (c) 2004, 2005 Jeroen Vreeken (pe1rxq@amsat.org)
+ *
+ * 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.
+ *
+ * Parts of this driver have been derived from a wlan-ng version
+ * modified by ZyDAS. They also made documentation available, thanks!
+ * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
+ */
+
+#include <linux/module.h>
+#include <linux/usb.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/wireless.h>
+#include <net/iw_handler.h>
+#include <linux/string.h>
+#include <linux/if_arp.h>
+#include <linux/firmware.h>
+#include <ieee802_11.h>
+#include "zd1201.h"
+
+static struct usb_device_id zd1201_table[] = {
+ {USB_DEVICE(0x0586, 0x3400)}, /* Peabird Wireless USB Adapter */
+ {USB_DEVICE(0x0ace, 0x1201)}, /* ZyDAS ZD1201 Wireless USB Adapter */
+ {USB_DEVICE(0x050d, 0x6051)}, /* Belkin F5D6051 usb adapter */
+ {USB_DEVICE(0x0db0, 0x6823)}, /* MSI UB11B usb adapter */
+ {}
+};
+
+static int ap = 0; /* Are we an AP or a normal station? */
+
+#define ZD1201_VERSION "0.15"
+
+MODULE_AUTHOR("Jeroen Vreeken <pe1rxq@amsat.org>");
+MODULE_DESCRIPTION("Driver for ZyDAS ZD1201 based USB Wireless adapters");
+MODULE_VERSION(ZD1201_VERSION);
+MODULE_LICENSE("GPL");
+module_param(ap, int, 0);
+MODULE_PARM_DESC(ap, "If non-zero Access Point firmware will be loaded");
+MODULE_DEVICE_TABLE(usb, zd1201_table);
+
+
+int zd1201_fw_upload(struct usb_device *dev, int apfw)
+{
+ const struct firmware *fw_entry;
+ char* data;
+ unsigned long len;
+ int err;
+ unsigned char ret;
+ char *buf;
+ char *fwfile;
+
+ if (apfw)
+ fwfile = "zd1201-ap.fw";
+ else
+ fwfile = "zd1201.fw";
+
+ err = request_firmware(&fw_entry, fwfile, &dev->dev);
+ if (err) {
+ dev_err(&dev->dev, "Failed to load %s firmware file!\n", fwfile);
+ dev_err(&dev->dev, "Make sure the hotplug firmware loader is installed.\n");
+ dev_err(&dev->dev, "Goto http://linux-lc100020.sourceforge.net for more info\n");
+ return err;
+ }
+
+ data = fw_entry->data;
+ len = fw_entry->size;
+
+ buf = kmalloc(1024, GFP_ATOMIC);
+ if (!buf)
+ goto exit;
+
+ while (len > 0) {
+ int translen = (len > 1024) ? 1024 : len;
+ memcpy(buf, data, translen);
+
+ err = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 0,
+ USB_DIR_OUT | 0x40, 0, 0, buf, translen,
+ ZD1201_FW_TIMEOUT);
+ if (err < 0)
+ goto exit;
+
+ len -= translen;
+ data += translen;
+ }
+
+ err = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 0x2,
+ USB_DIR_OUT | 0x40, 0, 0, NULL, 0, ZD1201_FW_TIMEOUT);
+ if (err < 0)
+ goto exit;
+
+ err = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 0x4,
+ USB_DIR_IN | 0x40, 0,0, &ret, sizeof(ret), ZD1201_FW_TIMEOUT);
+ if (err < 0)
+ goto exit;
+
+ if (ret & 0x80) {
+ err = -EIO;
+ goto exit;
+ }
+
+ err = 0;
+exit:
+ if (buf)
+ kfree(buf);
+ release_firmware(fw_entry);
+ return err;
+}
+
+void zd1201_usbfree(struct urb *urb, struct pt_regs *regs)
+{
+ struct zd1201 *zd = urb->context;
+
+ switch(urb->status) {
+ case -EILSEQ:
+ case -ENODEV:
+ case -ETIMEDOUT:
+ case -ENOENT:
+ case -EPIPE:
+ case -EOVERFLOW:
+ case -ESHUTDOWN:
+ dev_warn(&zd->usb->dev, "%s: urb failed: %d\n",
+ zd->dev->name, urb->status);
+ }
+
+ kfree(urb->transfer_buffer);
+ usb_free_urb(urb);
+ return;
+}
+
+/* cmdreq message:
+ u32 type
+ u16 cmd
+ u16 parm0
+ u16 parm1
+ u16 parm2
+ u8 pad[4]
+
+ total: 4 + 2 + 2 + 2 + 2 + 4 = 16
+*/
+int zd1201_docmd(struct zd1201 *zd, int cmd, int parm0, int parm1, int parm2)
+{
+ unsigned char *command;
+ int ret;
+ struct urb *urb;
+
+ command = kmalloc(16, GFP_ATOMIC);
+ if (!command)
+ return -ENOMEM;
+
+ *((__le32*)command) = cpu_to_le32(ZD1201_USB_CMDREQ);
+ *((__le16*)&command[4]) = cpu_to_le16(cmd);
+ *((__le16*)&command[6]) = cpu_to_le16(parm0);
+ *((__le16*)&command[8]) = cpu_to_le16(parm1);
+ *((__le16*)&command[10])= cpu_to_le16(parm2);
+
+ urb = usb_alloc_urb(0, GFP_ATOMIC);
+ if (!urb) {
+ kfree(command);
+ return -ENOMEM;
+ }
+ usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb, zd->endp_out2),
+ command, 16, zd1201_usbfree, zd);
+ ret = usb_submit_urb(urb, GFP_ATOMIC);
+ if (ret) {
+ kfree(command);
+ usb_free_urb(urb);
+ }
+
+ return ret;
+}
+
+/* Callback after sending out a packet */
+void zd1201_usbtx(struct urb *urb, struct pt_regs *regs)
+{
+ struct zd1201 *zd = urb->context;
+ netif_wake_queue(zd->dev);
+ return;
+}
+
+/* Incomming data */
+void zd1201_usbrx(struct urb *urb, struct pt_regs *regs)
+{
+ struct zd1201 *zd = urb->context;
+ int free = 0;
+ unsigned char *data = urb->transfer_buffer;
+ struct sk_buff *skb;
+ unsigned char type;
+
+ if (!zd) {
+ free = 1;
+ goto exit;
+ }
+
+ switch(urb->status) {
+ case -EILSEQ:
+ case -ENODEV:
+ case -ETIMEDOUT:
+ case -ENOENT:
+ case -EPIPE:
+ case -EOVERFLOW:
+ case -ESHUTDOWN:
+ dev_warn(&zd->usb->dev, "%s: rx urb failed: %d\n",
+ zd->dev->name, urb->status);
+ free = 1;
+ goto exit;
+ }
+
+ if (urb->status != 0 || urb->actual_length == 0)
+ goto resubmit;
+
+ type = data[0];
+ if (type == ZD1201_PACKET_EVENTSTAT || type == ZD1201_PACKET_RESOURCE) {
+ memcpy(zd->rxdata, data, urb->actual_length);
+ zd->rxlen = urb->actual_length;
+ zd->rxdatas = 1;
+ wake_up(&zd->rxdataq);
+ }
+ /* Info frame */
+ if (type == ZD1201_PACKET_INQUIRE) {
+ int i = 0;
+ unsigned short infotype, framelen, copylen;
+ framelen = le16_to_cpu(*(__le16*)&data[4]);
+ infotype = le16_to_cpu(*(__le16*)&data[6]);
+
+ if (infotype == ZD1201_INF_LINKSTATUS) {
+ short linkstatus;
+
+ linkstatus = le16_to_cpu(*(__le16*)&data[8]);
+ switch(linkstatus) {
+ case 1:
+ netif_carrier_on(zd->dev);
+ break;
+ case 2:
+ netif_carrier_off(zd->dev);
+ break;
+ case 3:
+ netif_carrier_off(zd->dev);
+ break;
+ case 4:
+ netif_carrier_on(zd->dev);
+ break;
+ default:
+ netif_carrier_off(zd->dev);
+ }
+ goto resubmit;
+ }
+ if (infotype == ZD1201_INF_ASSOCSTATUS) {
+ short status = le16_to_cpu(*(__le16*)(data+8));
+ int event;
+ union iwreq_data wrqu;
+
+ switch (status) {
+ case ZD1201_ASSOCSTATUS_STAASSOC:
+ case ZD1201_ASSOCSTATUS_REASSOC:
+ event = IWEVREGISTERED;
+ break;
+ case ZD1201_ASSOCSTATUS_DISASSOC:
+ case ZD1201_ASSOCSTATUS_ASSOCFAIL:
+ case ZD1201_ASSOCSTATUS_AUTHFAIL:
+ default:
+ event = IWEVEXPIRED;
+ }
+ memcpy(wrqu.addr.sa_data, data+10, ETH_ALEN);
+ wrqu.addr.sa_family = ARPHRD_ETHER;
+
+ /* Send event to user space */
+ wireless_send_event(zd->dev, event, &wrqu, NULL);
+
+ goto resubmit;
+ }
+ if (infotype == ZD1201_INF_AUTHREQ) {
+ union iwreq_data wrqu;
+
+ memcpy(wrqu.addr.sa_data, data+8, ETH_ALEN);
+ wrqu.addr.sa_family = ARPHRD_ETHER;
+ /* There isn't a event that trully fits this request.
+ We assume that userspace will be smart enough to
+ see a new station being expired and sends back a
+ authstation ioctl to authorize it. */
+ wireless_send_event(zd->dev, IWEVEXPIRED, &wrqu, NULL);
+ goto resubmit;
+ }
+ /* Other infotypes are handled outside this handler */
+ zd->rxlen = 0;
+ while (i < urb->actual_length) {
+ copylen = le16_to_cpu(*(__le16*)&data[i+2]);
+ /* Sanity check, sometimes we get junk */
+ if (copylen+zd->rxlen > sizeof(zd->rxdata))
+ break;
+ memcpy(zd->rxdata+zd->rxlen, data+i+4, copylen);
+ zd->rxlen += copylen;
+ i += 64;
+ }
+ if (i >= urb->actual_length) {
+ zd->rxdatas = 1;
+ wake_up(&zd->rxdataq);
+ }
+ goto resubmit;
+ }
+ /* Actual data */
+ if (data[urb->actual_length-1] == ZD1201_PACKET_RXDATA) {
+ int datalen = urb->actual_length-1;
+ unsigned short len, fc, seq;
+ struct hlist_node *node;
+
+ len = ntohs(*(__be16 *)&data[datalen-2]);
+ if (len>datalen)
+ len=datalen;
+ fc = le16_to_cpu(*(__le16 *)&data[datalen-16]);
+ seq = le16_to_cpu(*(__le16 *)&data[datalen-24]);
+
+ if(zd->monitor) {
+ if (datalen < 24)
+ goto resubmit;
+ if (!(skb = dev_alloc_skb(datalen+24)))
+ goto resubmit;
+
+ memcpy(skb_put(skb, 2), &data[datalen-16], 2);
+ memcpy(skb_put(skb, 2), &data[datalen-2], 2);
+ memcpy(skb_put(skb, 6), &data[datalen-14], 6);
+ memcpy(skb_put(skb, 6), &data[datalen-22], 6);
+ memcpy(skb_put(skb, 6), &data[datalen-8], 6);
+ memcpy(skb_put(skb, 2), &data[datalen-24], 2);
+ memcpy(skb_put(skb, len), data, len);
+ skb->dev = zd->dev;
+ skb->dev->last_rx = jiffies;
+ skb->protocol = eth_type_trans(skb, zd->dev);
+ zd->stats.rx_packets++;
+ zd->stats.rx_bytes += skb->len;
+ netif_rx(skb);
+ goto resubmit;
+ }
+
+ if ((seq & IEEE802_11_SCTL_FRAG) ||
+ (fc & IEEE802_11_FCTL_MOREFRAGS)) {
+ struct zd1201_frag *frag = NULL;
+ char *ptr;
+
+ if (datalen<14)
+ goto resubmit;
+ if ((seq & IEEE802_11_SCTL_FRAG) == 0) {
+ frag = kmalloc(sizeof(struct zd1201_frag*),
+ GFP_ATOMIC);
+ if (!frag)
+ goto resubmit;
+ skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2);
+ if (!skb) {
+ kfree(frag);
+ goto resubmit;
+ }
+ frag->skb = skb;
+ frag->seq = seq & IEEE802_11_SCTL_SEQ;
+ skb_reserve(skb, 2);
+ memcpy(skb_put(skb, 12), &data[datalen-14], 12);
+ memcpy(skb_put(skb, 2), &data[6], 2);
+ memcpy(skb_put(skb, len), data+8, len);
+ hlist_add_head(&frag->fnode, &zd->fraglist);
+ goto resubmit;
+ }
+ hlist_for_each_entry(frag, node, &zd->fraglist, fnode)
+ if(frag->seq == (seq&IEEE802_11_SCTL_SEQ))
+ break;
+ if (!frag)
+ goto resubmit;
+ skb = frag->skb;
+ ptr = skb_put(skb, len);
+ if (ptr)
+ memcpy(ptr, data+8, len);
+ if (fc & IEEE802_11_FCTL_MOREFRAGS)
+ goto resubmit;
+ hlist_del_init(&frag->fnode);
+ kfree(frag);
+ /* Fallthrough */
+ } else {
+ if (datalen<14)
+ goto resubmit;
+ skb = dev_alloc_skb(len + 14 + 2);
+ if (!skb)
+ goto resubmit;
+ skb_reserve(skb, 2);
+ memcpy(skb_put(skb, 12), &data[datalen-14], 12);
+ memcpy(skb_put(skb, 2), &data[6], 2);
+ memcpy(skb_put(skb, len), data+8, len);
+ }
+ skb->dev = zd->dev;
+ skb->dev->last_rx = jiffies;
+ skb->protocol = eth_type_trans(skb, zd->dev);
+ zd->stats.rx_packets++;
+ zd->stats.rx_bytes += skb->len;
+ netif_rx(skb);
+ }
+resubmit:
+ memset(data, 0, ZD1201_RXSIZE);
+
+ urb->status = 0;
+ urb->dev = zd->usb;
+ if(usb_submit_urb(urb, GFP_ATOMIC))
+ free = 1;
+
+exit:
+ if (free) {
+ zd->rxlen = 0;
+ zd->rxdatas = 1;
+ wake_up(&zd->rxdataq);
+ kfree(urb->transfer_buffer);
+ }
+ return;
+}
+
+static int zd1201_getconfig(struct zd1201 *zd, int rid, void *riddata,
+ unsigned int riddatalen)
+{
+ int err;
+ int i = 0;
+ int code;
+ int rid_fid;
+ int length;
+ unsigned char *pdata;
+
+ zd->rxdatas = 0;
+ err = zd1201_docmd(zd, ZD1201_CMDCODE_ACCESS, rid, 0, 0);
+ if (err)
+ return err;
+
+ wait_event_interruptible(zd->rxdataq, zd->rxdatas);
+ if (!zd->rxlen)
+ return -EIO;
+
+ code = le16_to_cpu(*(__le16*)(&zd->rxdata[4]));
+ rid_fid = le16_to_cpu(*(__le16*)(&zd->rxdata[6]));
+ length = le16_to_cpu(*(__le16*)(&zd->rxdata[8]));
+ if (length > zd->rxlen)
+ length = zd->rxlen-6;
+
+ /* If access bit is not on, then error */
+ if ((code & ZD1201_ACCESSBIT) != ZD1201_ACCESSBIT || rid_fid != rid )
+ return -EINVAL;
+
+ /* Not enough buffer for allocating data */
+ if (riddatalen != (length - 4)) {
+ dev_dbg(&zd->usb->dev, "riddatalen mismatches, expected=%u, (packet=%u) length=%u, rid=0x%04X, rid_fid=0x%04X\n",
+ riddatalen, zd->rxlen, length, rid, rid_fid);
+ return -ENODATA;
+ }
+
+ zd->rxdatas = 0;
+ /* Issue SetRxRid commnd */
+ err = zd1201_docmd(zd, ZD1201_CMDCODE_SETRXRID, rid, 0, length);
+ if (err)
+ return err;
+
+ /* Receive RID record from resource packets */
+ wait_event_interruptible(zd->rxdataq, zd->rxdatas);
+ if (!zd->rxlen)
+ return -EIO;
+
+ if (zd->rxdata[zd->rxlen - 1] != ZD1201_PACKET_RESOURCE) {
+ dev_dbg(&zd->usb->dev, "Packet type mismatch: 0x%x not 0x3\n",
+ zd->rxdata[zd->rxlen-1]);
+ return -EINVAL;
+ }
+
+ /* Set the data pointer and received data length */
+ pdata = zd->rxdata;
+ length = zd->rxlen;
+
+ do {
+ int actual_length;
+
+ actual_length = (length > 64) ? 64 : length;
+
+ if(pdata[0] != 0x3) {
+ dev_dbg(&zd->usb->dev, "Rx Resource packet type error: %02X\n",
+ pdata[0]);
+ return -EINVAL;
+ }
+
+ if (actual_length != 64) {
+ /* Trim the last packet type byte */
+ actual_length--;
+ }
+
+ /* Skip the 4 bytes header (RID length and RID) */
+ if(i == 0) {
+ pdata += 8;
+ actual_length -= 8;
+ }
+ else {
+ pdata += 4;
+ actual_length -= 4;
+ }
+
+ memcpy(riddata, pdata, actual_length);
+ riddata += actual_length;
+ pdata += actual_length;
+ length -= 64;
+ i++;
+ } while (length > 0);
+
+ return 0;
+}
+
+/*
+ * resreq:
+ * byte type
+ * byte sequence
+ * u16 reserved
+ * byte data[12]
+ * total: 16
+ */
+static int zd1201_setconfig(struct zd1201 *zd, int rid, void *buf, int len, int wait)
+{
+ int err;
+ unsigned char *request;
+ int reqlen;
+ char seq=0;
+ struct urb *urb;
+ unsigned int gfp_mask = wait ? GFP_NOIO : GFP_ATOMIC;
+
+ len += 4; /* first 4 are for header */
+
+ zd->rxdatas = 0;
+ zd->rxlen = 0;
+ for (seq=0; len > 0; seq++) {
+ request = kmalloc(16, gfp_mask);
+ if (!request)
+ return -ENOMEM;
+ urb = usb_alloc_urb(0, gfp_mask);
+ if (!urb) {
+ kfree(request);
+ return -ENOMEM;
+ }
+ memset(request, 0, 16);
+ reqlen = len>12 ? 12 : len;
+ request[0] = ZD1201_USB_RESREQ;
+ request[1] = seq;
+ request[2] = 0;
+ request[3] = 0;
+ if (request[1] == 0) {
+ /* add header */
+ *(__le16*)&request[4] = cpu_to_le16((len-2+1)/2);
+ *(__le16*)&request[6] = cpu_to_le16(rid);
+ memcpy(request+8, buf, reqlen-4);
+ buf += reqlen-4;
+ } else {
+ memcpy(request+4, buf, reqlen);
+ buf += reqlen;
+ }
+
+ len -= reqlen;
+
+ usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb,
+ zd->endp_out2), request, 16, zd1201_usbfree, zd);
+ err = usb_submit_urb(urb, gfp_mask);
+ if (err)
+ goto err;
+ }
+
+ request = kmalloc(16, gfp_mask);
+ if (!request)
+ return -ENOMEM;
+ urb = usb_alloc_urb(0, gfp_mask);
+ if (!urb) {
+ kfree(request);
+ return -ENOMEM;
+ }
+ *((__le32*)request) = cpu_to_le32(ZD1201_USB_CMDREQ);
+ *((__le16*)&request[4]) =
+ cpu_to_le16(ZD1201_CMDCODE_ACCESS|ZD1201_ACCESSBIT);
+ *((__le16*)&request[6]) = cpu_to_le16(rid);
+ *((__le16*)&request[8]) = cpu_to_le16(0);
+ *((__le16*)&request[10]) = cpu_to_le16(0);
+ usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb, zd->endp_out2),
+ request, 16, zd1201_usbfree, zd);
+ err = usb_submit_urb(urb, gfp_mask);
+ if (err)
+ goto err;
+
+ if (wait) {
+ wait_event_interruptible(zd->rxdataq, zd->rxdatas);
+ if (!zd->rxlen || le16_to_cpu(*(__le16*)&zd->rxdata[6]) != rid) {
+ dev_dbg(&zd->usb->dev, "wrong or no RID received\n");
+ }
+ }
+
+ return 0;
+err:
+ kfree(request);
+ usb_free_urb(urb);
+ return err;
+}
+
+static inline int zd1201_getconfig16(struct zd1201 *zd, int rid, short *val)
+{
+ int err;
+ __le16 zdval;
+
+ err = zd1201_getconfig(zd, rid, &zdval, sizeof(__le16));
+ if (err)
+ return err;
+ *val = le16_to_cpu(zdval);
+ return 0;
+}
+
+static inline int zd1201_setconfig16(struct zd1201 *zd, int rid, short val)
+{
+ __le16 zdval = cpu_to_le16(val);
+ return (zd1201_setconfig(zd, rid, &zdval, sizeof(__le16), 1));
+}
+
+int zd1201_drvr_start(struct zd1201 *zd)
+{
+ int err, i;
+ short max;
+ __le16 zdmax;
+ unsigned char *buffer;
+
+ buffer = kmalloc(ZD1201_RXSIZE, GFP_KERNEL);
+ if (!buffer)
+ return -ENOMEM;
+ memset(buffer, 0, ZD1201_RXSIZE);
+
+ usb_fill_bulk_urb(zd->rx_urb, zd->usb,
+ usb_rcvbulkpipe(zd->usb, zd->endp_in), buffer, ZD1201_RXSIZE,
+ zd1201_usbrx, zd);
+
+ err = usb_submit_urb(zd->rx_urb, GFP_KERNEL);
+ if (err)
+ goto err_buffer;
+
+ err = zd1201_docmd(zd, ZD1201_CMDCODE_INIT, 0, 0, 0);
+ if (err)
+ goto err_urb;
+
+ err = zd1201_getconfig(zd, ZD1201_RID_CNFMAXTXBUFFERNUMBER, &zdmax,
+ sizeof(__le16));
+ if (err)
+ goto err_urb;
+
+ max = le16_to_cpu(zdmax);
+ for (i=0; i<max; i++) {
+ err = zd1201_docmd(zd, ZD1201_CMDCODE_ALLOC, 1514, 0, 0);
+ if (err)
+ goto err_urb;
+ }
+
+ return 0;
+
+err_urb:
+ usb_kill_urb(zd->rx_urb);
+ return err;
+err_buffer:
+ kfree(buffer);
+ return err;
+}
+
+/* Magic alert: The firmware doesn't seem to like the MAC state being
+ * toggled in promisc (aka monitor) mode.
+ * (It works a number of times, but will halt eventually)
+ * So we turn it of before disabling and on after enabling if needed.
+ */
+static int zd1201_enable(struct zd1201 *zd)
+{
+ int err;
+
+ if (zd->mac_enabled)
+ return 0;
+
+ err = zd1201_docmd(zd, ZD1201_CMDCODE_ENABLE, 0, 0, 0);
+ if (!err)
+ zd->mac_enabled = 1;
+
+ if (zd->monitor)
+ err = zd1201_setconfig16(zd, ZD1201_RID_PROMISCUOUSMODE, 1);
+
+ return err;
+}
+
+static int zd1201_disable(struct zd1201 *zd)
+{
+ int err;
+
+ if (!zd->mac_enabled)
+ return 0;
+ if (zd->monitor) {
+ err = zd1201_setconfig16(zd, ZD1201_RID_PROMISCUOUSMODE, 0);
+ if (err)
+ return err;
+ }
+
+ err = zd1201_docmd(zd, ZD1201_CMDCODE_DISABLE, 0, 0, 0);
+ if (!err)
+ zd->mac_enabled = 0;
+ return err;
+}
+
+static int zd1201_mac_reset(struct zd1201 *zd)
+{
+ if (!zd->mac_enabled)
+ return 0;
+ zd1201_disable(zd);
+ return zd1201_enable(zd);
+}
+
+static int zd1201_join(struct zd1201 *zd, char *essid, int essidlen)
+{
+ int err, val;
+ char buf[IW_ESSID_MAX_SIZE+2];
+
+ err = zd1201_disable(zd);
+ if (err)
+ return err;
+
+ val = ZD1201_CNFAUTHENTICATION_OPENSYSTEM;
+ val |= ZD1201_CNFAUTHENTICATION_SHAREDKEY;
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFAUTHENTICATION, val);
+ if (err)
+ return err;
+
+ *(__le16 *)buf = cpu_to_le16(essidlen);
+ memcpy(buf+2, essid, essidlen);
+ if (!zd->ap) { /* Normal station */
+ err = zd1201_setconfig(zd, ZD1201_RID_CNFDESIREDSSID, buf,
+ IW_ESSID_MAX_SIZE+2, 1);
+ if (err)
+ return err;
+ } else { /* AP */
+ err = zd1201_setconfig(zd, ZD1201_RID_CNFOWNSSID, buf,
+ IW_ESSID_MAX_SIZE+2, 1);
+ if (err)
+ return err;
+ }
+
+ err = zd1201_setconfig(zd, ZD1201_RID_CNFOWNMACADDR,
+ zd->dev->dev_addr, zd->dev->addr_len, 1);
+ if (err)
+ return err;
+
+ err = zd1201_enable(zd);
+ if (err)
+ return err;
+
+ msleep(100);
+ return 0;
+}
+
+static int zd1201_net_open(struct net_device *dev)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+
+ /* Start MAC with wildcard if no essid set */
+ if (!zd->mac_enabled)
+ zd1201_join(zd, zd->essid, zd->essidlen);
+ netif_start_queue(dev);
+
+ return 0;
+}
+
+static int zd1201_net_stop(struct net_device *dev)
+{
+ netif_stop_queue(dev);
+
+ return 0;
+}
+
+/*
+ RFC 1042 encapsulates Ethernet frames in 802.11 frames
+ by prefixing them with 0xaa, 0xaa, 0x03) followed by a SNAP OID of 0
+ (0x00, 0x00, 0x00). Zd requires an additionnal padding, copy
+ of ethernet addresses, length of the standard RFC 1042 packet
+ and a command byte (which is nul for tx).
+
+ tx frame (from Wlan NG):
+ RFC 1042:
+ llc 0xAA 0xAA 0x03 (802.2 LLC)
+ snap 0x00 0x00 0x00 (Ethernet encapsulated)
+ type 2 bytes, Ethernet type field
+ payload (minus eth header)
+ Zydas specific:
+ padding 1B if (skb->len+8+1)%64==0
+ Eth MAC addr 12 bytes, Ethernet MAC addresses
+ length 2 bytes, RFC 1042 packet length
+ (llc+snap+type+payload)
+ zd 1 null byte, zd1201 packet type
+ */
+static int zd1201_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ unsigned char *txbuf = zd->txdata;
+ int txbuflen, pad = 0, err;
+ struct urb *urb = zd->tx_urb;
+
+ if (!zd->mac_enabled || zd->monitor) {
+ zd->stats.tx_dropped++;
+ kfree_skb(skb);
+ return 0;
+ }
+ netif_stop_queue(dev);
+
+ txbuflen = skb->len + 8 + 1;
+ if (txbuflen%64 == 0) {
+ pad = 1;
+ txbuflen++;
+ }
+ txbuf[0] = 0xAA;
+ txbuf[1] = 0xAA;
+ txbuf[2] = 0x03;
+ txbuf[3] = 0x00; /* rfc1042 */
+ txbuf[4] = 0x00;
+ txbuf[5] = 0x00;
+
+ memcpy(txbuf+6, skb->data+12, skb->len-12);
+ if (pad)
+ txbuf[skb->len-12+6]=0;
+ memcpy(txbuf+skb->len-12+6+pad, skb->data, 12);
+ *(__be16*)&txbuf[skb->len+6+pad] = htons(skb->len-12+6);
+ txbuf[txbuflen-1] = 0;
+
+ usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb, zd->endp_out),
+ txbuf, txbuflen, zd1201_usbtx, zd);
+
+ err = usb_submit_urb(zd->tx_urb, GFP_ATOMIC);
+ if (err) {
+ zd->stats.tx_errors++;
+ netif_start_queue(dev);
+ return err;
+ }
+ zd->stats.tx_packets++;
+ zd->stats.tx_bytes += skb->len;
+ dev->trans_start = jiffies;
+ kfree_skb(skb);
+
+ return 0;
+}
+
+static void zd1201_tx_timeout(struct net_device *dev)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+
+ if (!zd)
+ return;
+ dev_warn(&zd->usb->dev, "%s: TX timeout, shooting down urb\n",
+ dev->name);
+ zd->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ usb_unlink_urb(zd->tx_urb);
+ zd->stats.tx_errors++;
+ /* Restart the timeout to quiet the watchdog: */
+ dev->trans_start = jiffies;
+}
+
+static int zd1201_set_mac_address(struct net_device *dev, void *p)
+{
+ struct sockaddr *addr = p;
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ int err;
+
+ if (!zd)
+ return -ENODEV;
+
+ err = zd1201_setconfig(zd, ZD1201_RID_CNFOWNMACADDR,
+ addr->sa_data, dev->addr_len, 1);
+ if (err)
+ return err;
+ memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+
+ return zd1201_mac_reset(zd);
+}
+
+static struct net_device_stats *zd1201_get_stats(struct net_device *dev)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+
+ return &zd->stats;
+}
+
+static struct iw_statistics *zd1201_get_wireless_stats(struct net_device *dev)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+
+ return &zd->iwstats;
+}
+
+static void zd1201_set_multicast(struct net_device *dev)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ struct dev_mc_list *mc = dev->mc_list;
+ unsigned char reqbuf[ETH_ALEN*ZD1201_MAXMULTI];
+ int i;
+
+ if (dev->mc_count > ZD1201_MAXMULTI)
+ return;
+
+ for (i=0; i<dev->mc_count; i++) {
+ memcpy(reqbuf+i*ETH_ALEN, mc->dmi_addr, ETH_ALEN);
+ mc = mc->next;
+ }
+ zd1201_setconfig(zd, ZD1201_RID_CNFGROUPADDRESS, reqbuf,
+ dev->mc_count*ETH_ALEN, 0);
+
+}
+
+static int zd1201_config_commit(struct net_device *dev,
+ struct iw_request_info *info, struct iw_point *data, char *essid)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+
+ return zd1201_mac_reset(zd);
+}
+
+static int zd1201_get_name(struct net_device *dev,
+ struct iw_request_info *info, char *name, char *extra)
+{
+ strcpy(name, "IEEE 802.11b");
+
+ return 0;
+}
+
+static int zd1201_set_freq(struct net_device *dev,
+ struct iw_request_info *info, struct iw_freq *freq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short channel = 0;
+ int err;
+
+ if (freq->e == 0)
+ channel = freq->m;
+ else {
+ if (freq->m >= 2482)
+ channel = 14;
+ if (freq->m >= 2407)
+ channel = (freq->m-2407)/5;
+ }
+
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFOWNCHANNEL, channel);
+ if (err)
+ return err;
+
+ zd1201_mac_reset(zd);
+
+ return 0;
+}
+
+static int zd1201_get_freq(struct net_device *dev,
+ struct iw_request_info *info, struct iw_freq *freq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short channel;
+ int err;
+
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFOWNCHANNEL, &channel);
+ if (err)
+ return err;
+ freq->e = 0;
+ freq->m = channel;
+
+ return 0;
+}
+
+static int zd1201_set_mode(struct net_device *dev,
+ struct iw_request_info *info, __u32 *mode, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short porttype, monitor = 0;
+ unsigned char buffer[IW_ESSID_MAX_SIZE+2];
+ int err;
+
+ if (zd->ap) {
+ if (*mode != IW_MODE_MASTER)
+ return -EINVAL;
+ return 0;
+ }
+
+ err = zd1201_setconfig16(zd, ZD1201_RID_PROMISCUOUSMODE, 0);
+ if (err)
+ return err;
+ zd->dev->type = ARPHRD_ETHER;
+ switch(*mode) {
+ case IW_MODE_MONITOR:
+ monitor = 1;
+ zd->dev->type = ARPHRD_IEEE80211;
+ /* Make sure we are no longer associated with by
+ setting an 'impossible' essid.
+ (otherwise we mess up firmware)
+ */
+ zd1201_join(zd, "\0-*#\0", 5);
+ /* Put port in pIBSS */
+ case 8: /* No pseudo-IBSS in wireless extensions (yet) */
+ porttype = ZD1201_PORTTYPE_PSEUDOIBSS;
+ break;
+ case IW_MODE_ADHOC:
+ porttype = ZD1201_PORTTYPE_IBSS;
+ break;
+ case IW_MODE_INFRA:
+ porttype = ZD1201_PORTTYPE_BSS;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFPORTTYPE, porttype);
+ if (err)
+ return err;
+ if (zd->monitor && !monitor) {
+ zd1201_disable(zd);
+ *(__le16 *)buffer = cpu_to_le16(zd->essidlen);
+ memcpy(buffer+2, zd->essid, zd->essidlen);
+ err = zd1201_setconfig(zd, ZD1201_RID_CNFDESIREDSSID,
+ buffer, IW_ESSID_MAX_SIZE+2, 1);
+ if (err)
+ return err;
+ }
+ zd->monitor=monitor;
+ /* If monitor mode is set we don't actually turn it on here since it
+ * is done during mac reset anyway (see zd1201_mac_enable).
+ */
+
+ zd1201_mac_reset(zd);
+
+ return 0;
+}
+
+static int zd1201_get_mode(struct net_device *dev,
+ struct iw_request_info *info, __u32 *mode, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short porttype;
+ int err;
+
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFPORTTYPE, &porttype);
+ if (err)
+ return err;
+ switch(porttype) {
+ case ZD1201_PORTTYPE_IBSS:
+ *mode = IW_MODE_ADHOC;
+ break;
+ case ZD1201_PORTTYPE_BSS:
+ *mode = IW_MODE_INFRA;
+ break;
+ case ZD1201_PORTTYPE_WDS:
+ *mode = IW_MODE_REPEAT;
+ break;
+ case ZD1201_PORTTYPE_PSEUDOIBSS:
+ *mode = 8;/* No Pseudo-IBSS... */
+ break;
+ case ZD1201_PORTTYPE_AP:
+ *mode = IW_MODE_MASTER;
+ break;
+ default:
+ dev_dbg(&zd->usb->dev, "Unknown porttype: %d\n",
+ porttype);
+ *mode = IW_MODE_AUTO;
+ }
+ if (zd->monitor)
+ *mode = IW_MODE_MONITOR;
+
+ return 0;
+}
+
+static int zd1201_get_range(struct net_device *dev,
+ struct iw_request_info *info, struct iw_point *wrq, char *extra)
+{
+ struct iw_range *range = (struct iw_range *)extra;
+
+ wrq->length = sizeof(struct iw_range);
+ memset(range, 0, sizeof(struct iw_range));
+ range->we_version_compiled = WIRELESS_EXT;
+ range->we_version_source = WIRELESS_EXT;
+
+ range->max_qual.qual = 128;
+ range->max_qual.level = 128;
+ range->max_qual.noise = 128;
+ range->max_qual.updated = 7;
+
+ range->encoding_size[0] = 5;
+ range->encoding_size[1] = 13;
+ range->num_encoding_sizes = 2;
+ range->max_encoding_tokens = ZD1201_NUMKEYS;
+
+ range->num_bitrates = 4;
+ range->bitrate[0] = 1000000;
+ range->bitrate[1] = 2000000;
+ range->bitrate[2] = 5500000;
+ range->bitrate[3] = 11000000;
+
+ range->min_rts = 0;
+ range->min_frag = ZD1201_FRAGMIN;
+ range->max_rts = ZD1201_RTSMAX;
+ range->min_frag = ZD1201_FRAGMAX;
+
+ return 0;
+}
+
+/* Little bit of magic here: we only get the quality if we poll
+ * for it, and we never get an actual request to trigger such
+ * a poll. Therefore we 'asume' that the user will soon ask for
+ * the stats after asking the bssid.
+ */
+static int zd1201_get_wap(struct net_device *dev,
+ struct iw_request_info *info, struct sockaddr *ap_addr, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ unsigned char buffer[6];
+
+ if (!zd1201_getconfig(zd, ZD1201_RID_COMMSQUALITY, buffer, 6)) {
+ /* Unfortunatly the quality and noise reported is useless.
+ they seem to be accumulators that increase until you
+ read them, unless we poll on a fixed interval we can't
+ use them
+ */
+ /*zd->iwstats.qual.qual = le16_to_cpu(((__le16 *)buffer)[0]);*/
+ zd->iwstats.qual.level = le16_to_cpu(((__le16 *)buffer)[1]);
+ /*zd->iwstats.qual.noise = le16_to_cpu(((__le16 *)buffer)[2]);*/
+ zd->iwstats.qual.updated = 2;
+ }
+
+ return zd1201_getconfig(zd,ZD1201_RID_CURRENTBSSID,ap_addr->sa_data,6);
+}
+
+static int zd1201_set_scan(struct net_device *dev,
+ struct iw_request_info *info, struct iw_point *srq, char *extra)
+{
+ /* We do everything in get_scan */
+ return 0;
+}
+
+static int zd1201_get_scan(struct net_device *dev,
+ struct iw_request_info *info, struct iw_point *srq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ int err, i, j, enabled_save;
+ struct iw_event iwe;
+ char *cev = extra;
+ char *end_buf = extra + IW_SCAN_MAX_DATA;
+
+ /* No scanning in AP mode */
+ if (zd->ap)
+ return -EOPNOTSUPP;
+
+ /* Scan doesn't seem to work if disabled */
+ enabled_save = zd->mac_enabled;
+ zd1201_enable(zd);
+
+ zd->rxdatas = 0;
+ err = zd1201_docmd(zd, ZD1201_CMDCODE_INQUIRE,
+ ZD1201_INQ_SCANRESULTS, 0, 0);
+ if (err)
+ return err;
+
+ wait_event_interruptible(zd->rxdataq, zd->rxdatas);
+ if (!zd->rxlen)
+ return -EIO;
+
+ if (le16_to_cpu(*(__le16*)&zd->rxdata[2]) != ZD1201_INQ_SCANRESULTS)
+ return -EIO;
+
+ for(i=8; i<zd->rxlen; i+=62) {
+ iwe.cmd = SIOCGIWAP;
+ iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
+ memcpy(iwe.u.ap_addr.sa_data, zd->rxdata+i+6, 6);
+ cev = iwe_stream_add_event(cev, end_buf, &iwe, IW_EV_ADDR_LEN);
+
+ iwe.cmd = SIOCGIWESSID;
+ iwe.u.data.length = zd->rxdata[i+16];
+ iwe.u.data.flags = 1;
+ cev = iwe_stream_add_point(cev, end_buf, &iwe, zd->rxdata+i+18);
+
+ iwe.cmd = SIOCGIWMODE;
+ if (zd->rxdata[i+14]&0x01)
+ iwe.u.mode = IW_MODE_MASTER;
+ else
+ iwe.u.mode = IW_MODE_ADHOC;
+ cev = iwe_stream_add_event(cev, end_buf, &iwe, IW_EV_UINT_LEN);
+
+ iwe.cmd = SIOCGIWFREQ;
+ iwe.u.freq.m = zd->rxdata[i+0];
+ iwe.u.freq.e = 0;
+ cev = iwe_stream_add_event(cev, end_buf, &iwe, IW_EV_FREQ_LEN);
+
+ iwe.cmd = SIOCGIWRATE;
+ iwe.u.bitrate.fixed = 0;
+ iwe.u.bitrate.disabled = 0;
+ for (j=0; j<10; j++) if (zd->rxdata[i+50+j]) {
+ iwe.u.bitrate.value = (zd->rxdata[i+50+j]&0x7f)*500000;
+ cev=iwe_stream_add_event(cev, end_buf, &iwe,
+ IW_EV_PARAM_LEN);
+ }
+
+ iwe.cmd = SIOCGIWENCODE;
+ iwe.u.data.length = 0;
+ if (zd->rxdata[i+14]&0x10)
+ iwe.u.data.flags = IW_ENCODE_ENABLED;
+ else
+ iwe.u.data.flags = IW_ENCODE_DISABLED;
+ cev = iwe_stream_add_point(cev, end_buf, &iwe, NULL);
+
+ iwe.cmd = IWEVQUAL;
+ iwe.u.qual.qual = zd->rxdata[i+4];
+ iwe.u.qual.noise= zd->rxdata[i+2]/10-100;
+ iwe.u.qual.level = (256+zd->rxdata[i+4]*100)/255-100;
+ iwe.u.qual.updated = 7;
+ cev = iwe_stream_add_event(cev, end_buf, &iwe, IW_EV_QUAL_LEN);
+ }
+
+ if (!enabled_save)
+ zd1201_disable(zd);
+
+ srq->length = cev - extra;
+ srq->flags = 0;
+
+ return 0;
+}
+
+static int zd1201_set_essid(struct net_device *dev,
+ struct iw_request_info *info, struct iw_point *data, char *essid)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+
+ if (data->length > IW_ESSID_MAX_SIZE)
+ return -EINVAL;
+ if (data->length < 1)
+ data->length = 1;
+ zd->essidlen = data->length-1;
+ memset(zd->essid, 0, IW_ESSID_MAX_SIZE+1);
+ memcpy(zd->essid, essid, data->length);
+ return zd1201_join(zd, zd->essid, zd->essidlen);
+}
+
+static int zd1201_get_essid(struct net_device *dev,
+ struct iw_request_info *info, struct iw_point *data, char *essid)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+
+ memcpy(essid, zd->essid, zd->essidlen);
+ data->flags = 1;
+ data->length = zd->essidlen;
+
+ return 0;
+}
+
+static int zd1201_get_nick(struct net_device *dev, struct iw_request_info *info,
+ struct iw_point *data, char *nick)
+{
+ strcpy(nick, "zd1201");
+ data->flags = 1;
+ data->length = strlen(nick);
+ return 0;
+}
+
+static int zd1201_set_rate(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *rrq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short rate;
+ int err;
+
+ switch (rrq->value) {
+ case 1000000:
+ rate = ZD1201_RATEB1;
+ break;
+ case 2000000:
+ rate = ZD1201_RATEB2;
+ break;
+ case 5500000:
+ rate = ZD1201_RATEB5;
+ break;
+ case 11000000:
+ default:
+ rate = ZD1201_RATEB11;
+ break;
+ }
+ if (!rrq->fixed) { /* Also enable all lower bitrates */
+ rate |= rate-1;
+ }
+
+ err = zd1201_setconfig16(zd, ZD1201_RID_TXRATECNTL, rate);
+ if (err)
+ return err;
+
+ return zd1201_mac_reset(zd);
+}
+
+static int zd1201_get_rate(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *rrq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short rate;
+ int err;
+
+ err = zd1201_getconfig16(zd, ZD1201_RID_CURRENTTXRATE, &rate);
+ if (err)
+ return err;
+
+ switch(rate) {
+ case 1:
+ rrq->value = 1000000;
+ break;
+ case 2:
+ rrq->value = 2000000;
+ break;
+ case 5:
+ rrq->value = 5500000;
+ break;
+ case 11:
+ rrq->value = 11000000;
+ break;
+ default:
+ rrq->value = 0;
+ }
+ rrq->fixed = 0;
+ rrq->disabled = 0;
+
+ return 0;
+}
+
+static int zd1201_set_rts(struct net_device *dev, struct iw_request_info *info,
+ struct iw_param *rts, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ int err;
+ short val = rts->value;
+
+ if (rts->disabled || !rts->fixed)
+ val = ZD1201_RTSMAX;
+ if (val > ZD1201_RTSMAX)
+ return -EINVAL;
+ if (val < 0)
+ return -EINVAL;
+
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFRTSTHRESHOLD, val);
+ if (err)
+ return err;
+ return zd1201_mac_reset(zd);
+}
+
+static int zd1201_get_rts(struct net_device *dev, struct iw_request_info *info,
+ struct iw_param *rts, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short rtst;
+ int err;
+
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFRTSTHRESHOLD, &rtst);
+ if (err)
+ return err;
+ rts->value = rtst;
+ rts->disabled = (rts->value == ZD1201_RTSMAX);
+ rts->fixed = 1;
+
+ return 0;
+}
+
+static int zd1201_set_frag(struct net_device *dev, struct iw_request_info *info,
+ struct iw_param *frag, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ int err;
+ short val = frag->value;
+
+ if (frag->disabled || !frag->fixed)
+ val = ZD1201_FRAGMAX;
+ if (val > ZD1201_FRAGMAX)
+ return -EINVAL;
+ if (val < ZD1201_FRAGMIN)
+ return -EINVAL;
+ if (val & 1)
+ return -EINVAL;
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFFRAGTHRESHOLD, val);
+ if (err)
+ return err;
+ return zd1201_mac_reset(zd);
+}
+
+static int zd1201_get_frag(struct net_device *dev, struct iw_request_info *info,
+ struct iw_param *frag, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short fragt;
+ int err;
+
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFFRAGTHRESHOLD, &fragt);
+ if (err)
+ return err;
+ frag->value = fragt;
+ frag->disabled = (frag->value == ZD1201_FRAGMAX);
+ frag->fixed = 1;
+
+ return 0;
+}
+
+static int zd1201_set_retry(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *rrq, char *extra)
+{
+ return 0;
+}
+
+static int zd1201_get_retry(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *rrq, char *extra)
+{
+ return 0;
+}
+
+static int zd1201_set_encode(struct net_device *dev,
+ struct iw_request_info *info, struct iw_point *erq, char *key)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short i;
+ int err, rid;
+
+ if (erq->length > ZD1201_MAXKEYLEN)
+ return -EINVAL;
+
+ i = (erq->flags & IW_ENCODE_INDEX)-1;
+ if (i == -1) {
+ err = zd1201_getconfig16(zd,ZD1201_RID_CNFDEFAULTKEYID,&i);
+ if (err)
+ return err;
+ } else {
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFDEFAULTKEYID, i);
+ if (err)
+ return err;
+ }
+
+ if (i < 0 || i >= ZD1201_NUMKEYS)
+ return -EINVAL;
+
+ rid = ZD1201_RID_CNFDEFAULTKEY0 + i;
+ err = zd1201_setconfig(zd, rid, key, erq->length, 1);
+ if (err)
+ return err;
+ zd->encode_keylen[i] = erq->length;
+ memcpy(zd->encode_keys[i], key, erq->length);
+
+ i=0;
+ if (!(erq->flags & IW_ENCODE_DISABLED & IW_ENCODE_MODE)) {
+ i |= 0x01;
+ zd->encode_enabled = 1;
+ } else
+ zd->encode_enabled = 0;
+ if (erq->flags & IW_ENCODE_RESTRICTED & IW_ENCODE_MODE) {
+ i |= 0x02;
+ zd->encode_restricted = 1;
+ } else
+ zd->encode_restricted = 0;
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFWEBFLAGS, i);
+ if (err)
+ return err;
+
+ if (zd->encode_enabled)
+ i = ZD1201_CNFAUTHENTICATION_SHAREDKEY;
+ else
+ i = ZD1201_CNFAUTHENTICATION_OPENSYSTEM;
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFAUTHENTICATION, i);
+ if (err)
+ return err;
+
+ return zd1201_mac_reset(zd);
+}
+
+static int zd1201_get_encode(struct net_device *dev,
+ struct iw_request_info *info, struct iw_point *erq, char *key)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short i;
+ int err;
+
+ if (zd->encode_enabled)
+ erq->flags = IW_ENCODE_ENABLED;
+ else
+ erq->flags = IW_ENCODE_DISABLED;
+ if (zd->encode_restricted)
+ erq->flags |= IW_ENCODE_RESTRICTED;
+ else
+ erq->flags |= IW_ENCODE_OPEN;
+
+ i = (erq->flags & IW_ENCODE_INDEX) -1;
+ if (i == -1) {
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFDEFAULTKEYID, &i);
+ if (err)
+ return err;
+ }
+ if (i<0 || i>= ZD1201_NUMKEYS)
+ return -EINVAL;
+
+ erq->flags |= i+1;
+
+ erq->length = zd->encode_keylen[i];
+ memcpy(key, zd->encode_keys[i], erq->length);
+
+ return 0;
+}
+
+static int zd1201_set_power(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *vwrq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short enabled, duration, level;
+ int err;
+
+ enabled = vwrq->disabled ? 0 : 1;
+ if (enabled) {
+ if (vwrq->flags & IW_POWER_PERIOD) {
+ duration = vwrq->value;
+ err = zd1201_setconfig16(zd,
+ ZD1201_RID_CNFMAXSLEEPDURATION, duration);
+ if (err)
+ return err;
+ goto out;
+ }
+ if (vwrq->flags & IW_POWER_TIMEOUT) {
+ err = zd1201_getconfig16(zd,
+ ZD1201_RID_CNFMAXSLEEPDURATION, &duration);
+ if (err)
+ return err;
+ level = vwrq->value * 4 / duration;
+ if (level > 4)
+ level = 4;
+ if (level < 0)
+ level = 0;
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFPMEPS,
+ level);
+ if (err)
+ return err;
+ goto out;
+ }
+ return -EINVAL;
+ }
+out:
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFPMENABLED, enabled);
+ if (err)
+ return err;
+
+ return 0;
+}
+
+static int zd1201_get_power(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *vwrq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short enabled, level, duration;
+ int err;
+
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFPMENABLED, &enabled);
+ if (err)
+ return err;
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFPMEPS, &level);
+ if (err)
+ return err;
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFMAXSLEEPDURATION, &duration);
+ if (err)
+ return err;
+ vwrq->disabled = enabled ? 0 : 1;
+ if (vwrq->flags & IW_POWER_TYPE) {
+ if (vwrq->flags & IW_POWER_PERIOD) {
+ vwrq->value = duration;
+ vwrq->flags = IW_POWER_PERIOD;
+ } else {
+ vwrq->value = duration * level / 4;
+ vwrq->flags = IW_POWER_TIMEOUT;
+ }
+ }
+ if (vwrq->flags & IW_POWER_MODE) {
+ if (enabled && level)
+ vwrq->flags = IW_POWER_UNICAST_R;
+ else
+ vwrq->flags = IW_POWER_ALL_R;
+ }
+
+ return 0;
+}
+
+
+static const iw_handler zd1201_iw_handler[] =
+{
+ (iw_handler) zd1201_config_commit, /* SIOCSIWCOMMIT */
+ (iw_handler) zd1201_get_name, /* SIOCGIWNAME */
+ (iw_handler) NULL, /* SIOCSIWNWID */
+ (iw_handler) NULL, /* SIOCGIWNWID */
+ (iw_handler) zd1201_set_freq, /* SIOCSIWFREQ */
+ (iw_handler) zd1201_get_freq, /* SIOCGIWFREQ */
+ (iw_handler) zd1201_set_mode, /* SIOCSIWMODE */
+ (iw_handler) zd1201_get_mode, /* SIOCGIWMODE */
+ (iw_handler) NULL, /* SIOCSIWSENS */
+ (iw_handler) NULL, /* SIOCGIWSENS */
+ (iw_handler) NULL, /* SIOCSIWRANGE */
+ (iw_handler) zd1201_get_range, /* SIOCGIWRANGE */
+ (iw_handler) NULL, /* SIOCSIWPRIV */
+ (iw_handler) NULL, /* SIOCGIWPRIV */
+ (iw_handler) NULL, /* SIOCSIWSTATS */
+ (iw_handler) NULL, /* SIOCGIWSTATS */
+ (iw_handler) NULL, /* SIOCSIWSPY */
+ (iw_handler) NULL, /* SIOCGIWSPY */
+ (iw_handler) NULL, /* -- hole -- */
+ (iw_handler) NULL, /* -- hole -- */
+ (iw_handler) NULL/*zd1201_set_wap*/, /* SIOCSIWAP */
+ (iw_handler) zd1201_get_wap, /* SIOCGIWAP */
+ (iw_handler) NULL, /* -- hole -- */
+ (iw_handler) NULL, /* SIOCGIWAPLIST */
+ (iw_handler) zd1201_set_scan, /* SIOCSIWSCAN */
+ (iw_handler) zd1201_get_scan, /* SIOCGIWSCAN */
+ (iw_handler) zd1201_set_essid, /* SIOCSIWESSID */
+ (iw_handler) zd1201_get_essid, /* SIOCGIWESSID */
+ (iw_handler) NULL, /* SIOCSIWNICKN */
+ (iw_handler) zd1201_get_nick, /* SIOCGIWNICKN */
+ (iw_handler) NULL, /* -- hole -- */
+ (iw_handler) NULL, /* -- hole -- */
+ (iw_handler) zd1201_set_rate, /* SIOCSIWRATE */
+ (iw_handler) zd1201_get_rate, /* SIOCGIWRATE */
+ (iw_handler) zd1201_set_rts, /* SIOCSIWRTS */
+ (iw_handler) zd1201_get_rts, /* SIOCGIWRTS */
+ (iw_handler) zd1201_set_frag, /* SIOCSIWFRAG */
+ (iw_handler) zd1201_get_frag, /* SIOCGIWFRAG */
+ (iw_handler) NULL, /* SIOCSIWTXPOW */
+ (iw_handler) NULL, /* SIOCGIWTXPOW */
+ (iw_handler) zd1201_set_retry, /* SIOCSIWRETRY */
+ (iw_handler) zd1201_get_retry, /* SIOCGIWRETRY */
+ (iw_handler) zd1201_set_encode, /* SIOCSIWENCODE */
+ (iw_handler) zd1201_get_encode, /* SIOCGIWENCODE */
+ (iw_handler) zd1201_set_power, /* SIOCSIWPOWER */
+ (iw_handler) zd1201_get_power, /* SIOCGIWPOWER */
+};
+
+static int zd1201_set_hostauth(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *rrq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ int err;
+
+ if (!zd->ap)
+ return -EOPNOTSUPP;
+
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFHOSTAUTH, rrq->value);
+ if (err)
+ return err;
+ return 0;
+}
+
+static int zd1201_get_hostauth(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *rrq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short hostauth;
+ int err;
+
+ if (!zd->ap)
+ return -EOPNOTSUPP;
+
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFHOSTAUTH, &hostauth);
+ if (err)
+ return err;
+ rrq->value = hostauth;
+ rrq->fixed = 1;
+
+ return 0;
+}
+
+static int zd1201_auth_sta(struct net_device *dev,
+ struct iw_request_info *info, struct sockaddr *sta, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ unsigned char buffer[10];
+
+ if (!zd->ap)
+ return -EOPNOTSUPP;
+
+ memcpy(buffer, sta->sa_data, ETH_ALEN);
+ *(short*)(buffer+6) = 0; /* 0==success, 1==failure */
+ *(short*)(buffer+8) = 0;
+
+ return zd1201_setconfig(zd, ZD1201_RID_AUTHENTICATESTA, buffer, 10, 1);
+}
+
+static int zd1201_set_maxassoc(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *rrq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ int err;
+
+ if (!zd->ap)
+ return -EOPNOTSUPP;
+
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, rrq->value);
+ if (err)
+ return err;
+ return 0;
+}
+
+static int zd1201_get_maxassoc(struct net_device *dev,
+ struct iw_request_info *info, struct iw_param *rrq, char *extra)
+{
+ struct zd1201 *zd = (struct zd1201 *)dev->priv;
+ short maxassoc;
+ int err;
+
+ if (!zd->ap)
+ return -EOPNOTSUPP;
+
+ err = zd1201_getconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, &maxassoc);
+ if (err)
+ return err;
+ rrq->value = maxassoc;
+ rrq->fixed = 1;
+
+ return 0;
+}
+
+static const iw_handler zd1201_private_handler[] = {
+ (iw_handler) zd1201_set_hostauth, /* ZD1201SIWHOSTAUTH */
+ (iw_handler) zd1201_get_hostauth, /* ZD1201GIWHOSTAUTH */
+ (iw_handler) zd1201_auth_sta, /* ZD1201SIWAUTHSTA */
+ (iw_handler) NULL, /* nothing to get */
+ (iw_handler) zd1201_set_maxassoc, /* ZD1201SIMAXASSOC */
+ (iw_handler) zd1201_get_maxassoc, /* ZD1201GIMAXASSOC */
+};
+
+static const struct iw_priv_args zd1201_private_args[] = {
+ { ZD1201SIWHOSTAUTH, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ IW_PRIV_TYPE_NONE, "sethostauth" },
+ { ZD1201GIWHOSTAUTH, IW_PRIV_TYPE_NONE,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gethostauth" },
+ { ZD1201SIWAUTHSTA, IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1,
+ IW_PRIV_TYPE_NONE, "authstation" },
+ { ZD1201SIWMAXASSOC, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ IW_PRIV_TYPE_NONE, "setmaxassoc" },
+ { ZD1201GIWMAXASSOC, IW_PRIV_TYPE_NONE,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getmaxassoc" },
+};
+
+static const struct iw_handler_def zd1201_iw_handlers = {
+ .num_standard = sizeof(zd1201_iw_handler)/sizeof(iw_handler),
+ .num_private = sizeof(zd1201_private_handler)/sizeof(iw_handler),
+ .num_private_args = sizeof(zd1201_private_args)/sizeof(struct iw_priv_args),
+ .standard = (iw_handler *)zd1201_iw_handler,
+ .private = (iw_handler *)zd1201_private_handler,
+ .private_args = (struct iw_priv_args *) zd1201_private_args,
+};
+
+int zd1201_probe(struct usb_interface *interface, const struct usb_device_id *id)
+{
+ struct zd1201 *zd;
+ struct usb_device *usb;
+ int i, err;
+ short porttype;
+ char buf[IW_ESSID_MAX_SIZE+2];
+
+ usb = interface_to_usbdev(interface);
+
+ zd = kmalloc(sizeof(struct zd1201), GFP_KERNEL);
+ if (!zd) {
+ return -ENOMEM;
+ }
+ memset(zd, 0, sizeof(struct zd1201));
+ zd->ap = ap;
+ zd->usb = usb;
+ zd->removed = 0;
+ init_waitqueue_head(&zd->rxdataq);
+ INIT_HLIST_HEAD(&zd->fraglist);
+
+ err = zd1201_fw_upload(usb, zd->ap);
+ if (err) {
+ dev_err(&usb->dev, "zd1201 firmware upload failed: %d\n", err);
+ goto err_zd;
+ }
+
+ zd->endp_in = 1;
+ zd->endp_out = 1;
+ zd->endp_out2 = 2;
+ zd->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ zd->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!zd->rx_urb || !zd->tx_urb)
+ goto err_zd;
+
+ for(i = 0; i<100; i++)
+ udelay(1000);
+
+ err = zd1201_drvr_start(zd);
+ if (err)
+ goto err_zd;
+
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFMAXDATALEN, 2312);
+ if (err)
+ goto err_start;
+
+ err = zd1201_setconfig16(zd, ZD1201_RID_TXRATECNTL,
+ ZD1201_RATEB1 | ZD1201_RATEB2 | ZD1201_RATEB5 | ZD1201_RATEB11);
+ if (err)
+ goto err_start;
+
+ zd->dev = alloc_etherdev(0);
+ if (!zd->dev)
+ goto err_start;
+
+ zd->dev->priv = zd;
+ zd->dev->open = zd1201_net_open;
+ zd->dev->stop = zd1201_net_stop;
+ zd->dev->get_stats = zd1201_get_stats;
+ zd->dev->get_wireless_stats = zd1201_get_wireless_stats;
+ zd->dev->wireless_handlers =
+ (struct iw_handler_def *)&zd1201_iw_handlers;
+ zd->dev->hard_start_xmit = zd1201_hard_start_xmit;
+ zd->dev->watchdog_timeo = ZD1201_TX_TIMEOUT;
+ zd->dev->tx_timeout = zd1201_tx_timeout;
+ zd->dev->set_multicast_list = zd1201_set_multicast;
+ zd->dev->set_mac_address = zd1201_set_mac_address;
+ strcpy(zd->dev->name, "wlan%d");
+
+ err = zd1201_getconfig(zd, ZD1201_RID_CNFOWNMACADDR,
+ zd->dev->dev_addr, zd->dev->addr_len);
+ if (err)
+ goto err_net;
+
+ /* Set wildcard essid to match zd->essid */
+ *(__le16 *)buf = cpu_to_le16(0);
+ err = zd1201_setconfig(zd, ZD1201_RID_CNFDESIREDSSID, buf,
+ IW_ESSID_MAX_SIZE+2, 1);
+ if (err)
+ goto err_net;
+
+ if (zd->ap)
+ porttype = ZD1201_PORTTYPE_AP;
+ else
+ porttype = ZD1201_PORTTYPE_BSS;
+ err = zd1201_setconfig16(zd, ZD1201_RID_CNFPORTTYPE, porttype);
+ if (err)
+ goto err_net;
+
+ err = register_netdev(zd->dev);
+ if (err)
+ goto err_net;
+ dev_info(&usb->dev, "%s: ZD1201 USB Wireless interface\n",
+ zd->dev->name);
+
+ usb_set_intfdata(interface, zd);
+ return 0;
+
+err_net:
+ free_netdev(zd->dev);
+err_start:
+ /* Leave the device in reset state */
+ zd1201_docmd(zd, ZD1201_CMDCODE_INIT, 0, 0, 0);
+err_zd:
+ if (zd->tx_urb)
+ usb_free_urb(zd->tx_urb);
+ if (zd->rx_urb)
+ usb_free_urb(zd->rx_urb);
+ kfree(zd);
+ return err;
+}
+
+void zd1201_disconnect(struct usb_interface *interface)
+{
+ struct zd1201 *zd=(struct zd1201 *)usb_get_intfdata(interface);
+ struct hlist_node *node, *node2;
+ struct zd1201_frag *frag;
+
+ if (!zd)
+ return;
+ usb_set_intfdata(interface, NULL);
+ if (zd->dev) {
+ unregister_netdev(zd->dev);
+ free_netdev(zd->dev);
+ }
+
+ hlist_for_each_entry_safe(frag, node, node2, &zd->fraglist, fnode) {
+ hlist_del_init(&frag->fnode);
+ kfree_skb(frag->skb);
+ kfree(frag);
+ }
+
+ if (zd->tx_urb) {
+ usb_kill_urb(zd->tx_urb);
+ usb_free_urb(zd->tx_urb);
+ }
+ if (zd->rx_urb) {
+ usb_kill_urb(zd->rx_urb);
+ usb_free_urb(zd->rx_urb);
+ }
+ kfree(zd);
+}
+
+struct usb_driver zd1201_usb = {
+ .owner = THIS_MODULE,
+ .name = "zd1201",
+ .probe = zd1201_probe,
+ .disconnect = zd1201_disconnect,
+ .id_table = zd1201_table,
+};
+
+static int __init zd1201_init(void)
+{
+ return usb_register(&zd1201_usb);
+}
+
+static void __exit zd1201_cleanup(void)
+{
+ usb_deregister(&zd1201_usb);
+}
+
+module_init(zd1201_init);
+module_exit(zd1201_cleanup);
diff --git a/drivers/usb/net/zd1201.h b/drivers/usb/net/zd1201.h
new file mode 100644
index 000000000000..1627c71e8052
--- /dev/null
+++ b/drivers/usb/net/zd1201.h
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2004, 2005 Jeroen Vreeken (pe1rxq@amsat.org)
+ *
+ * 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.
+ *
+ * Parts of this driver have been derived from a wlan-ng version
+ * modified by ZyDAS.
+ * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
+ */
+
+#ifndef _INCLUDE_ZD1201_H_
+#define _INCLUDE_ZD1201_H_
+
+#define ZD1201_NUMKEYS 4
+#define ZD1201_MAXKEYLEN 13
+#define ZD1201_MAXMULTI 16
+#define ZD1201_FRAGMAX 2500
+#define ZD1201_FRAGMIN 256
+#define ZD1201_RTSMAX 2500
+
+#define ZD1201_RXSIZE 3000
+
+struct zd1201 {
+ struct usb_device *usb;
+ int removed;
+ struct net_device *dev;
+ struct net_device_stats stats;
+ struct iw_statistics iwstats;
+
+ int endp_in;
+ int endp_out;
+ int endp_out2;
+ struct urb *rx_urb;
+ struct urb *tx_urb;
+
+ unsigned char rxdata[ZD1201_RXSIZE];
+ int rxlen;
+ wait_queue_head_t rxdataq;
+ int rxdatas;
+ struct hlist_head fraglist;
+ unsigned char txdata[ZD1201_RXSIZE];
+
+ int ap;
+ char essid[IW_ESSID_MAX_SIZE+1];
+ int essidlen;
+ int mac_enabled;
+ int monitor;
+ int encode_enabled;
+ int encode_restricted;
+ unsigned char encode_keys[ZD1201_NUMKEYS][ZD1201_MAXKEYLEN];
+ int encode_keylen[ZD1201_NUMKEYS];
+};
+
+struct zd1201_frag {
+ struct hlist_node fnode;
+ int seq;
+ struct sk_buff *skb;
+};
+
+#define ZD1201SIWHOSTAUTH SIOCIWFIRSTPRIV
+#define ZD1201GIWHOSTAUTH ZD1201SIWHOSTAUTH+1
+#define ZD1201SIWAUTHSTA SIOCIWFIRSTPRIV+2
+#define ZD1201SIWMAXASSOC SIOCIWFIRSTPRIV+4
+#define ZD1201GIWMAXASSOC ZD1201SIWMAXASSOC+1
+
+#define ZD1201_FW_TIMEOUT (1000)
+
+#define ZD1201_TX_TIMEOUT (2000)
+
+#define ZD1201_USB_CMDREQ 0
+#define ZD1201_USB_RESREQ 1
+
+#define ZD1201_CMDCODE_INIT 0x00
+#define ZD1201_CMDCODE_ENABLE 0x01
+#define ZD1201_CMDCODE_DISABLE 0x02
+#define ZD1201_CMDCODE_ALLOC 0x0a
+#define ZD1201_CMDCODE_INQUIRE 0x11
+#define ZD1201_CMDCODE_SETRXRID 0x17
+#define ZD1201_CMDCODE_ACCESS 0x21
+
+#define ZD1201_PACKET_EVENTSTAT 0x0
+#define ZD1201_PACKET_RXDATA 0x1
+#define ZD1201_PACKET_INQUIRE 0x2
+#define ZD1201_PACKET_RESOURCE 0x3
+
+#define ZD1201_ACCESSBIT 0x0100
+
+#define ZD1201_RID_CNFPORTTYPE 0xfc00
+#define ZD1201_RID_CNFOWNMACADDR 0xfc01
+#define ZD1201_RID_CNFDESIREDSSID 0xfc02
+#define ZD1201_RID_CNFOWNCHANNEL 0xfc03
+#define ZD1201_RID_CNFOWNSSID 0xfc04
+#define ZD1201_RID_CNFMAXDATALEN 0xfc07
+#define ZD1201_RID_CNFPMENABLED 0xfc09
+#define ZD1201_RID_CNFPMEPS 0xfc0a
+#define ZD1201_RID_CNFMAXSLEEPDURATION 0xfc0c
+#define ZD1201_RID_CNFDEFAULTKEYID 0xfc23
+#define ZD1201_RID_CNFDEFAULTKEY0 0xfc24
+#define ZD1201_RID_CNFDEFAULTKEY1 0xfc25
+#define ZD1201_RID_CNFDEFAULTKEY2 0xfc26
+#define ZD1201_RID_CNFDEFAULTKEY3 0xfc27
+#define ZD1201_RID_CNFWEBFLAGS 0xfc28
+#define ZD1201_RID_CNFAUTHENTICATION 0xfc2a
+#define ZD1201_RID_CNFMAXASSOCSTATIONS 0xfc2b
+#define ZD1201_RID_CNFHOSTAUTH 0xfc2e
+#define ZD1201_RID_CNFGROUPADDRESS 0xfc80
+#define ZD1201_RID_CNFFRAGTHRESHOLD 0xfc82
+#define ZD1201_RID_CNFRTSTHRESHOLD 0xfc83
+#define ZD1201_RID_TXRATECNTL 0xfc84
+#define ZD1201_RID_PROMISCUOUSMODE 0xfc85
+#define ZD1201_RID_CNFBASICRATES 0xfcb3
+#define ZD1201_RID_AUTHENTICATESTA 0xfce3
+#define ZD1201_RID_CURRENTBSSID 0xfd42
+#define ZD1201_RID_COMMSQUALITY 0xfd43
+#define ZD1201_RID_CURRENTTXRATE 0xfd44
+#define ZD1201_RID_CNFMAXTXBUFFERNUMBER 0xfda0
+#define ZD1201_RID_CURRENTCHANNEL 0xfdc1
+
+#define ZD1201_INQ_SCANRESULTS 0xf101
+
+#define ZD1201_INF_LINKSTATUS 0xf200
+#define ZD1201_INF_ASSOCSTATUS 0xf201
+#define ZD1201_INF_AUTHREQ 0xf202
+
+#define ZD1201_ASSOCSTATUS_STAASSOC 0x1
+#define ZD1201_ASSOCSTATUS_REASSOC 0x2
+#define ZD1201_ASSOCSTATUS_DISASSOC 0x3
+#define ZD1201_ASSOCSTATUS_ASSOCFAIL 0x4
+#define ZD1201_ASSOCSTATUS_AUTHFAIL 0x5
+
+#define ZD1201_PORTTYPE_IBSS 0
+#define ZD1201_PORTTYPE_BSS 1
+#define ZD1201_PORTTYPE_WDS 2
+#define ZD1201_PORTTYPE_PSEUDOIBSS 3
+#define ZD1201_PORTTYPE_AP 6
+
+#define ZD1201_RATEB1 1
+#define ZD1201_RATEB2 2
+#define ZD1201_RATEB5 4 /* 5.5 really, but 5 is shorter :) */
+#define ZD1201_RATEB11 8
+
+#define ZD1201_CNFAUTHENTICATION_OPENSYSTEM 0x0001
+#define ZD1201_CNFAUTHENTICATION_SHAREDKEY 0x0002
+
+#endif /* _INCLUDE_ZD1201_H_ */
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
new file mode 100644
index 000000000000..b869076d9c7c
--- /dev/null
+++ b/drivers/usb/serial/Kconfig
@@ -0,0 +1,455 @@
+#
+# USB Serial device configuration
+#
+
+menu "USB Serial Converter support"
+ depends on USB!=n
+
+config USB_SERIAL
+ tristate "USB Serial Converter support"
+ depends on USB
+ ---help---
+ Say Y here if you have a USB device that provides normal serial
+ ports, or acts like a serial device, and you want to connect it to
+ your USB bus.
+
+ Please read <file:Documentation/usb/usb-serial.txt> for more
+ information on the specifics of the different devices that are
+ supported, and on how to use them.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usbserial.
+
+config USB_SERIAL_CONSOLE
+ bool "USB Serial Console device support (EXPERIMENTAL)"
+ depends on USB_SERIAL=y && EXPERIMENTAL
+ ---help---
+ If you say Y here, it will be possible to use a USB to serial
+ converter port as the system console (the system console is the
+ device which receives all kernel messages and warnings and which
+ allows logins in single user mode). This could be useful if some
+ terminal or printer is connected to that serial port.
+
+ Even if you say Y here, the currently visible virtual console
+ (/dev/tty0) will still be used as the system console by default, but
+ you can alter that using a kernel command line option such as
+ "console=ttyUSB0". (Try "man bootparam" or see the documentation of
+ your boot loader (lilo or loadlin) about how to pass options to the
+ kernel at boot time.)
+
+ If you don't have a VGA card installed and you say Y here, the
+ kernel will automatically use the first USB to serial converter
+ port, /dev/ttyUSB0, as system console.
+
+ If unsure, say N.
+
+config USB_SERIAL_GENERIC
+ bool "USB Generic Serial Driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to use the generic USB serial driver. Please
+ read <file:Documentation/usb/usb-serial.txt> for more information on
+ using this driver. It is recommended that the "USB Serial converter
+ support" be compiled as a module for this driver to be used
+ properly.
+
+config USB_SERIAL_BELKIN
+ tristate "USB Belkin and Peracom Single Port Serial Driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to use a Belkin USB Serial single port
+ adaptor (F5U103 is one of the model numbers) or the Peracom single
+ port USB to serial adapter.
+
+ To compile this driver as a module, choose M here: the
+ module will be called belkin_sa.
+
+config USB_SERIAL_WHITEHEAT
+ tristate "USB ConnectTech WhiteHEAT Serial Driver"
+ depends on USB_SERIAL && BROKEN_ON_SMP
+ help
+ Say Y here if you want to use a ConnectTech WhiteHEAT 4 port
+ USB to serial converter device.
+
+ To compile this driver as a module, choose M here: the
+ module will be called whiteheat.
+
+config USB_SERIAL_DIGI_ACCELEPORT
+ tristate "USB Digi International AccelePort USB Serial Driver"
+ depends on USB_SERIAL
+ ---help---
+ Say Y here if you want to use Digi AccelePort USB 2 or 4 devices,
+ 2 port (plus parallel port) and 4 port USB serial converters. The
+ parallel port on the USB 2 appears as a third serial port on Linux.
+ The Digi Acceleport USB 8 is not yet supported by this driver.
+
+ This driver works under SMP with the usb-uhci driver. It does not
+ work under SMP with the uhci driver.
+
+ To compile this driver as a module, choose M here: the
+ module will be called digi_acceleport.
+
+config USB_SERIAL_CP2101
+ tristate "USB CP2101 UART Bridge Controller"
+ depends on USB_SERIAL && EXPERIMENTAL
+ help
+ Say Y here if you want to use a CP2101/CP2102 based USB to RS232
+ converter.
+
+ To compile this driver as a module, choose M here: the
+ module will be called cp2101.
+
+config USB_SERIAL_CYPRESS_M8
+ tristate "USB Cypress M8 USB Serial Driver"
+ depends on USB_SERIAL && EXPERIMENTAL
+ help
+ Say Y here if you want to use a device that contains the Cypress
+ USB to Serial microcontroller, such as the DeLorme Earthmate GPS.
+
+ Attempted SMP support... send bug reports!
+
+ Supported microcontrollers in the CY4601 family are:
+ CY7C63741 CY7C63742 CY7C63743 CY7C64013
+
+ To compile this driver as a module, choose M here: the
+ module will be called cypress_m8.
+
+config USB_SERIAL_EMPEG
+ tristate "USB Empeg empeg-car Mark I/II Driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to connect to your Empeg empeg-car Mark I/II
+ mp3 player via USB. The driver uses a single ttyUSB{0,1,2,...}
+ device node. See <file:Documentation/usb/usb-serial.txt> for more
+ tidbits of information.
+
+ To compile this driver as a module, choose M here: the
+ module will be called empeg.
+
+config USB_SERIAL_FTDI_SIO
+ tristate "USB FTDI Single Port Serial Driver (EXPERIMENTAL)"
+ depends on USB_SERIAL && EXPERIMENTAL
+ ---help---
+ Say Y here if you want to use a FTDI SIO single port USB to serial
+ converter device. The implementation I have is called the USC-1000.
+ This driver has also be tested with the 245 and 232 devices.
+
+ See <http://ftdi-usb-sio.sourceforge.net/> for more
+ information on this driver and the device.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ftdi_sio.
+
+config USB_SERIAL_VISOR
+ tristate "USB Handspring Visor / Palm m50x / Sony Clie Driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to connect to your HandSpring Visor, Palm
+ m500 or m505 through its USB docking station. See
+ <http://usbvisor.sourceforge.net/> for more information on using this
+ driver.
+
+ To compile this driver as a module, choose M here: the
+ module will be called visor.
+
+config USB_SERIAL_IPAQ
+ tristate "USB PocketPC PDA Driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to connect to your Compaq iPAQ, HP Jornada
+ or any other PDA running Windows CE 3.0 or PocketPC 2002
+ using a USB cradle/cable. For information on using the driver,
+ read <file:Documentation/usb/usb-serial.txt>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ipaq.
+
+config USB_SERIAL_IR
+ tristate "USB IR Dongle Serial Driver (EXPERIMENTAL)"
+ depends on USB_SERIAL && EXPERIMENTAL
+ help
+ Say Y here if you want to enable simple serial support for USB IrDA
+ devices. This is useful if you do not want to use the full IrDA
+ stack.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ir-usb.
+
+config USB_SERIAL_EDGEPORT
+ tristate "USB Inside Out Edgeport Serial Driver"
+ depends on USB_SERIAL
+ ---help---
+ Say Y here if you want to use any of the following devices from
+ Inside Out Networks (Digi):
+ Edgeport/4
+ Rapidport/4
+ Edgeport/4t
+ Edgeport/2
+ Edgeport/4i
+ Edgeport/2i
+ Edgeport/421
+ Edgeport/21
+ Edgeport/8
+ Edgeport/8 Dual
+ Edgeport/2D8
+ Edgeport/4D8
+ Edgeport/8i
+ Edgeport/2 DIN
+ Edgeport/4 DIN
+ Edgeport/16 Dual
+
+ To compile this driver as a module, choose M here: the
+ module will be called io_edgeport.
+
+config USB_SERIAL_EDGEPORT_TI
+ tristate "USB Inside Out Edgeport Serial Driver (TI devices)"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to use any of the devices from Inside Out
+ Networks (Digi) that are not supported by the io_edgeport driver.
+ This includes the Edgeport/1 device.
+
+ To compile this driver as a module, choose M here: the
+ module will be called io_ti.
+
+config USB_SERIAL_GARMIN
+ tristate "USB Garmin GPS driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to connect to your Garmin GPS.
+ Should work with most Garmin GPS devices which have a native USB port.
+
+ See <http://sourceforge.net/projects/garmin-gps> for the latest
+ version of the driver.
+
+ To compile this driver as a module, choose M here: the
+ module will be called garmin_gps.
+
+config USB_SERIAL_IPW
+ tristate "USB IPWireless (3G UMTS TDD) Driver (EXPERIMENTAL)"
+ depends on USB_SERIAL && EXPERIMENTAL
+ help
+ Say Y here if you want to use a IPWireless USB modem such as
+ the ones supplied by Axity3G/Sentech South Africa.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ipw.
+
+config USB_SERIAL_KEYSPAN_PDA
+ tristate "USB Keyspan PDA Single Port Serial Driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to use a Keyspan PDA single port USB to
+ serial converter device. This driver makes use of firmware
+ developed from scratch by Brian Warner.
+
+ To compile this driver as a module, choose M here: the
+ module will be called keyspan_pda.
+
+config USB_SERIAL_KEYSPAN
+ tristate "USB Keyspan USA-xxx Serial Driver"
+ depends on USB_SERIAL
+ ---help---
+ Say Y here if you want to use Keyspan USB to serial converter
+ devices. This driver makes use of Keyspan's official firmware
+ and was developed with their support. You must also include
+ firmware to support your particular device(s).
+
+ See <http://misc.nu/hugh/keyspan.html> for more information.
+
+ To compile this driver as a module, choose M here: the
+ module will be called keyspan.
+
+config USB_SERIAL_KEYSPAN_MPR
+ bool "USB Keyspan MPR Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the Keyspan MPR converter.
+
+config USB_SERIAL_KEYSPAN_USA28
+ bool "USB Keyspan USA-28 Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-28 converter.
+
+config USB_SERIAL_KEYSPAN_USA28X
+ bool "USB Keyspan USA-28X Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-28X converter.
+ Be sure you have a USA-28X, there are also 28XA and 28XB
+ models, the label underneath has the actual part number.
+
+config USB_SERIAL_KEYSPAN_USA28XA
+ bool "USB Keyspan USA-28XA Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-28XA converter.
+ Be sure you have a USA-28XA, there are also 28X and 28XB
+ models, the label underneath has the actual part number.
+
+config USB_SERIAL_KEYSPAN_USA28XB
+ bool "USB Keyspan USA-28XB Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-28XB converter.
+ Be sure you have a USA-28XB, there are also 28X and 28XA
+ models, the label underneath has the actual part number.
+
+config USB_SERIAL_KEYSPAN_USA19
+ bool "USB Keyspan USA-19 Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-19 converter.
+
+config USB_SERIAL_KEYSPAN_USA18X
+ bool "USB Keyspan USA-18X Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-18X converter.
+
+config USB_SERIAL_KEYSPAN_USA19W
+ bool "USB Keyspan USA-19W Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-19W converter.
+
+config USB_SERIAL_KEYSPAN_USA19QW
+ bool "USB Keyspan USA-19QW Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-19QW converter.
+
+config USB_SERIAL_KEYSPAN_USA19QI
+ bool "USB Keyspan USA-19QI Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-19QI converter.
+
+config USB_SERIAL_KEYSPAN_USA49W
+ bool "USB Keyspan USA-49W Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-49W converter.
+
+config USB_SERIAL_KEYSPAN_USA49WLC
+ bool "USB Keyspan USA-49WLC Firmware"
+ depends on USB_SERIAL_KEYSPAN
+ help
+ Say Y here to include firmware for the USA-49WLC converter.
+
+config USB_SERIAL_KLSI
+ tristate "USB KL5KUSB105 (Palmconnect) Driver (EXPERIMENTAL)"
+ depends on USB_SERIAL && EXPERIMENTAL
+ ---help---
+ Say Y here if you want to use a KL5KUSB105 - based single port
+ serial adapter. The most widely known -- and currently the only
+ tested -- device in this category is the PalmConnect USB Serial
+ adapter sold by Palm Inc. for use with their Palm III and Palm V
+ series PDAs.
+
+ Please read <file:Documentation/usb/usb-serial.txt> for more
+ information.
+
+ To compile this driver as a module, choose M here: the
+ module will be called kl5kusb105.
+
+config USB_SERIAL_KOBIL_SCT
+ tristate "USB KOBIL chipcard reader"
+ depends on USB_SERIAL
+ ---help---
+ Say Y here if you want to use one of the following KOBIL USB chipcard
+ readers:
+
+ - USB TWIN
+ - KAAN Standard Plus
+ - KAAN SIM
+ - SecOVID Reader Plus
+ - B1 Professional
+ - KAAN Professional
+
+ Note that you need a current CT-API.
+ To compile this driver as a module, choose M here: the
+ module will be called kobil_sct.
+
+config USB_SERIAL_MCT_U232
+ tristate "USB MCT Single Port Serial Driver"
+ depends on USB_SERIAL
+ ---help---
+ Say Y here if you want to use a USB Serial single port adapter from
+ Magic Control Technology Corp. (U232 is one of the model numbers).
+
+ This driver also works with Sitecom U232-P25 and D-Link DU-H3SP USB
+ BAY devices.
+
+ To compile this driver as a module, choose M here: the
+ module will be called mct_u232.
+
+config USB_SERIAL_PL2303
+ tristate "USB Prolific 2303 Single Port Serial Driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to use the PL2303 USB Serial single port
+ adapter from Prolific.
+
+ To compile this driver as a module, choose M here: the
+ module will be called pl2303.
+
+config USB_SERIAL_SAFE
+ tristate "USB Safe Serial (Encapsulated) Driver (EXPERIMENTAL)"
+ depends on USB_SERIAL && EXPERIMENTAL
+
+config USB_SERIAL_SAFE_PADDED
+ bool "USB Secure Encapsulated Driver - Padded"
+ depends on USB_SERIAL_SAFE
+
+config USB_SERIAL_TI
+ tristate "USB TI 3410/5052 Serial Driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to use the TI USB 3410 or 5052
+ serial devices.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ti_usb_3410_5052.
+
+config USB_SERIAL_CYBERJACK
+ tristate "USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)"
+ depends on USB_SERIAL && EXPERIMENTAL
+ ---help---
+ Say Y here if you want to use a cyberJack pinpad/e-com USB chipcard
+ reader. This is an interface to ISO 7816 compatible contactbased
+ chipcards, e.g. GSM SIMs.
+
+ To compile this driver as a module, choose M here: the
+ module will be called cyberjack.
+
+ If unsure, say N.
+
+config USB_SERIAL_XIRCOM
+ tristate "USB Xircom / Entregra Single Port Serial Driver"
+ depends on USB_SERIAL
+ help
+ Say Y here if you want to use a Xircom or Entregra single port USB to
+ serial converter device. This driver makes use of firmware
+ developed from scratch by Brian Warner.
+
+ To compile this driver as a module, choose M here: the
+ module will be called keyspan_pda.
+
+config USB_SERIAL_OMNINET
+ tristate "USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)"
+ depends on USB_SERIAL && EXPERIMENTAL
+ help
+ Say Y here if you want to use a ZyXEL omni.net LCD ISDN TA.
+
+ To compile this driver as a module, choose M here: the
+ module will be called omninet.
+
+config USB_EZUSB
+ bool
+ depends on USB_SERIAL_KEYSPAN_PDA || USB_SERIAL_XIRCOM || USB_SERIAL_KEYSPAN || USB_SERIAL_WHITEHEAT
+ default y
+
+endmenu
+
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile
new file mode 100644
index 000000000000..351b81855b18
--- /dev/null
+++ b/drivers/usb/serial/Makefile
@@ -0,0 +1,39 @@
+#
+# Makefile for the USB serial device drivers.
+#
+
+# Object file lists.
+
+obj-$(CONFIG_USB_SERIAL) += usbserial.o
+
+usbserial-obj-$(CONFIG_USB_SERIAL_CONSOLE) += console.o
+usbserial-obj-$(CONFIG_USB_EZUSB) += ezusb.o
+
+usbserial-objs := usb-serial.o generic.o bus.o $(usbserial-obj-y)
+
+obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o
+obj-$(CONFIG_USB_SERIAL_CP2101) += cp2101.o
+obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o
+obj-$(CONFIG_USB_SERIAL_CYPRESS_M8) += cypress_m8.o
+obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT) += digi_acceleport.o
+obj-$(CONFIG_USB_SERIAL_EDGEPORT) += io_edgeport.o
+obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI) += io_ti.o
+obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o
+obj-$(CONFIG_USB_SERIAL_FTDI_SIO) += ftdi_sio.o
+obj-$(CONFIG_USB_SERIAL_GARMIN) += garmin_gps.o
+obj-$(CONFIG_USB_SERIAL_IPAQ) += ipaq.o
+obj-$(CONFIG_USB_SERIAL_IPW) += ipw.o
+obj-$(CONFIG_USB_SERIAL_IR) += ir-usb.o
+obj-$(CONFIG_USB_SERIAL_KEYSPAN) += keyspan.o
+obj-$(CONFIG_USB_SERIAL_KEYSPAN_PDA) += keyspan_pda.o
+obj-$(CONFIG_USB_SERIAL_KLSI) += kl5kusb105.o
+obj-$(CONFIG_USB_SERIAL_KOBIL_SCT) += kobil_sct.o
+obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o
+obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o
+obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o
+obj-$(CONFIG_USB_SERIAL_SAFE) += safe_serial.o
+obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o
+obj-$(CONFIG_USB_SERIAL_VISOR) += visor.o
+obj-$(CONFIG_USB_SERIAL_WHITEHEAT) += whiteheat.o
+obj-$(CONFIG_USB_SERIAL_XIRCOM) += keyspan_pda.o
+
diff --git a/drivers/usb/serial/Makefile-keyspan_pda_fw b/drivers/usb/serial/Makefile-keyspan_pda_fw
new file mode 100644
index 000000000000..c20baf728011
--- /dev/null
+++ b/drivers/usb/serial/Makefile-keyspan_pda_fw
@@ -0,0 +1,16 @@
+
+# some rules to handle the quirks of the 'as31' assembler, like
+# insisting upon fixed suffixes for the input and output files,
+# and its lack of preprocessor support
+
+all: keyspan_pda_fw.h
+
+%.asm: %.S
+ gcc -x assembler-with-cpp -P -E -o $@ $<
+
+%.hex: %.asm
+ as31 -l $<
+ mv $*.obj $@
+
+%_fw.h: %.hex ezusb_convert.pl
+ perl ezusb_convert.pl $* < $< > $@
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
new file mode 100644
index 000000000000..86994d117c44
--- /dev/null
+++ b/drivers/usb/serial/belkin_sa.c
@@ -0,0 +1,614 @@
+/*
+ * 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
+ * individual credits and copyrights.
+ *
+ * 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.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * TODO:
+ * -- Add true modem contol line query capability. Currently we track the
+ * states reported by the interrupt and the states we request.
+ * -- Add error reporting back to application for UART error conditions.
+ * Just point me at how to implement this and I'll do it. I've put the
+ * framework in, but haven't analyzed the "tty_flip" interface yet.
+ * -- 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.
+ *
+ * 08-Apr-2001 gb
+ * - Identify version on module load.
+ *
+ * 12-Mar-2001 gkh
+ * - Added support for the GoHubs GO-COM232 device which is the same as the
+ * Peracom device.
+ *
+ * 06-Nov-2000 gkh
+ * - Added support for the old Belkin and Peracom devices.
+ * - Made the port able to be opened multiple times.
+ * - Added some defaults incase the line settings are things these devices
+ * can't support.
+ *
+ * 18-Oct-2000 William Greathouse
+ * Released into the wild (linux-usb-devel)
+ *
+ * 17-Oct-2000 William Greathouse
+ * Add code to recognize firmware version and set hardware flow control
+ * appropriately. Belkin states that firmware prior to 3.05 does not
+ * operate correctly in hardware handshake mode. I have verified this
+ * on firmware 2.05 -- for both RTS and DTR input flow control, the control
+ * line is not reset. The test performed by the Belkin Win* driver is
+ * to enable hardware flow control for firmware 2.06 or greater and
+ * for 1.00 or prior. I am only enabling for 2.06 or greater.
+ *
+ * 12-Oct-2000 William Greathouse
+ * First cut at supporting Belkin USB Serial Adapter F5U103
+ * I did not have a copy of the original work to support this
+ * adapter, so pardon any stupid mistakes. All of the information
+ * I am using to write this driver was acquired by using a modified
+ * UsbSnoop on Windows2000 and from examining the other USB drivers.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+#include "belkin_sa.h"
+
+static int debug;
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.2"
+#define DRIVER_AUTHOR "William Greathouse <wgreathouse@smva.com>"
+#define DRIVER_DESC "USB Belkin Serial converter driver"
+
+/* function prototypes for a Belkin USB Serial Adapter F5U103 */
+static int belkin_sa_startup (struct usb_serial *serial);
+static void belkin_sa_shutdown (struct usb_serial *serial);
+static int belkin_sa_open (struct usb_serial_port *port, struct file *filp);
+static void belkin_sa_close (struct usb_serial_port *port, struct file *filp);
+static void belkin_sa_read_int_callback (struct urb *urb, struct pt_regs *regs);
+static void belkin_sa_set_termios (struct usb_serial_port *port, struct termios * old);
+static int belkin_sa_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
+static void belkin_sa_break_ctl (struct usb_serial_port *port, int break_state );
+static int belkin_sa_tiocmget (struct usb_serial_port *port, struct file *file);
+static int belkin_sa_tiocmset (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
+
+
+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);
+
+static struct usb_driver belkin_driver = {
+ .owner = THIS_MODULE,
+ .name = "belkin",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = 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",
+ .short_name = "belkin",
+ .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,
+ .tiocmget = belkin_sa_tiocmget,
+ .tiocmset = belkin_sa_tiocmset,
+ .attach = belkin_sa_startup,
+ .shutdown = belkin_sa_shutdown,
+};
+
+
+struct belkin_sa_private {
+ spinlock_t lock;
+ unsigned long control_state;
+ unsigned char last_lsr;
+ unsigned char last_msr;
+ int bad_flow_control;
+};
+
+
+/*
+ * ***************************************************************************
+ * Belkin USB Serial Adapter F5U103 specific driver functions
+ * ***************************************************************************
+ */
+
+#define WDR_TIMEOUT 5000 /* default urb timeout */
+
+/* assumes that struct usb_serial *serial is available */
+#define BSA_USB_CMD(c,v) usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), \
+ (c), BELKIN_SA_SET_REQUEST_TYPE, \
+ (v), 0, NULL, 0, WDR_TIMEOUT)
+
+/* do some startup allocations not currently performed by usb_serial_probe() */
+static int belkin_sa_startup (struct usb_serial *serial)
+{
+ struct usb_device *dev = serial->dev;
+ struct belkin_sa_private *priv;
+
+ /* allocate the private data structure */
+ priv = kmalloc(sizeof(struct belkin_sa_private), GFP_KERNEL);
+ if (!priv)
+ return (-1); /* error */
+ /* set initial values for control structures */
+ spin_lock_init(&priv->lock);
+ priv->control_state = 0;
+ priv->last_lsr = 0;
+ priv->last_msr = 0;
+ /* see comments at top of file */
+ priv->bad_flow_control = (le16_to_cpu(dev->descriptor.bcdDevice) <= 0x0206) ? 1 : 0;
+ info("bcdDevice: %04x, bfc: %d", le16_to_cpu(dev->descriptor.bcdDevice), priv->bad_flow_control);
+
+ init_waitqueue_head(&serial->port[0]->write_wait);
+ usb_set_serial_port_data(serial->port[0], priv);
+
+ return (0);
+}
+
+
+static void belkin_sa_shutdown (struct usb_serial *serial)
+{
+ struct belkin_sa_private *priv;
+ 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 */
+ priv = usb_get_serial_port_data(serial->port[i]);
+ if (priv)
+ kfree(priv);
+ }
+}
+
+
+static int belkin_sa_open (struct usb_serial_port *port, struct file *filp)
+{
+ int retval = 0;
+
+ dbg("%s port %d", __FUNCTION__, port->number);
+
+ /*Start reading from the device*/
+ /* TODO: Look at possibility of submitting multiple 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, GFP_KERNEL);
+ 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, GFP_KERNEL);
+ if (retval) {
+ usb_kill_urb(port->read_urb);
+ err(" usb_submit_urb(read int) failed");
+ }
+
+exit:
+ return retval;
+} /* belkin_sa_open */
+
+
+static void belkin_sa_close (struct usb_serial_port *port, struct file *filp)
+{
+ dbg("%s port %d", __FUNCTION__, port->number);
+
+ /* shutdown our bulk reads and writes */
+ usb_kill_urb(port->write_urb);
+ usb_kill_urb(port->read_urb);
+ usb_kill_urb(port->interrupt_in_urb);
+} /* belkin_sa_close */
+
+
+static void belkin_sa_read_int_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct belkin_sa_private *priv;
+ unsigned char *data = urb->transfer_buffer;
+ int retval;
+ unsigned long flags;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+
+ /* Handle known interrupt data */
+ /* ignore data[0] and data[1] */
+
+ priv = usb_get_serial_port_data(port);
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->last_msr = data[BELKIN_SA_MSR_INDEX];
+
+ /* Record Control Line states */
+ if (priv->last_msr & BELKIN_SA_MSR_DSR)
+ priv->control_state |= TIOCM_DSR;
+ else
+ priv->control_state &= ~TIOCM_DSR;
+
+ if (priv->last_msr & BELKIN_SA_MSR_CTS)
+ priv->control_state |= TIOCM_CTS;
+ else
+ priv->control_state &= ~TIOCM_CTS;
+
+ if (priv->last_msr & BELKIN_SA_MSR_RI)
+ priv->control_state |= TIOCM_RI;
+ else
+ priv->control_state &= ~TIOCM_RI;
+
+ if (priv->last_msr & BELKIN_SA_MSR_CD)
+ priv->control_state |= TIOCM_CD;
+ else
+ priv->control_state &= ~TIOCM_CD;
+
+ /* Now to report any errors */
+ priv->last_lsr = data[BELKIN_SA_LSR_INDEX];
+#if 0
+ /*
+ * fill in the flip buffer here, but I do not know the relation
+ * to the current/next receive buffer or characters. I need
+ * to look in to this before committing any code.
+ */
+ if (priv->last_lsr & BELKIN_SA_LSR_ERR) {
+ tty = port->tty;
+ /* Overrun Error */
+ if (priv->last_lsr & BELKIN_SA_LSR_OE) {
+ }
+ /* Parity Error */
+ if (priv->last_lsr & BELKIN_SA_LSR_PE) {
+ }
+ /* Framing Error */
+ if (priv->last_lsr & BELKIN_SA_LSR_FE) {
+ }
+ /* Break Indicator */
+ if (priv->last_lsr & BELKIN_SA_LSR_BI) {
+ }
+ }
+#endif
+ spin_unlock_irqrestore(&priv->lock, flags);
+exit:
+ retval = usb_submit_urb (urb, GFP_ATOMIC);
+ if (retval)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+}
+
+static void belkin_sa_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+{
+ struct usb_serial *serial = port->serial;
+ struct belkin_sa_private *priv = usb_get_serial_port_data(port);
+ 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 */
+ unsigned long flags;
+ unsigned long control_state;
+ int bad_flow_control;
+
+ 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;
+
+ /* get a local copy of the current port settings */
+ spin_lock_irqsave(&priv->lock, flags);
+ control_state = priv->control_state;
+ bad_flow_control = priv->bad_flow_control;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /* 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 */
+ if( (old_cflag&CBAUD) == B0 ) {
+ control_state |= (TIOCM_DTR|TIOCM_RTS);
+ if (BSA_USB_CMD(BELKIN_SA_SET_DTR_REQUEST, 1) < 0)
+ err("Set DTR error");
+ /* don't set RTS if using hardware flow control */
+ if (!(old_cflag&CRTSCTS) )
+ if (BSA_USB_CMD(BELKIN_SA_SET_RTS_REQUEST, 1) < 0)
+ err("Set RTS error");
+ }
+
+ switch(cflag & CBAUD) {
+ case B0: /* handled below */ break;
+ case B300: urb_value = BELKIN_SA_BAUD(300); break;
+ case B600: urb_value = BELKIN_SA_BAUD(600); break;
+ case B1200: urb_value = BELKIN_SA_BAUD(1200); break;
+ case B2400: urb_value = BELKIN_SA_BAUD(2400); break;
+ case B4800: urb_value = BELKIN_SA_BAUD(4800); break;
+ case B9600: urb_value = BELKIN_SA_BAUD(9600); break;
+ case B19200: urb_value = BELKIN_SA_BAUD(19200); break;
+ case B38400: urb_value = BELKIN_SA_BAUD(38400); break;
+ case B57600: urb_value = BELKIN_SA_BAUD(57600); break;
+ case B115200: urb_value = BELKIN_SA_BAUD(115200); break;
+ case B230400: urb_value = BELKIN_SA_BAUD(230400); break;
+ default: err("BELKIN USB Serial Adapter: unsupported baudrate request, using default of 9600");
+ urb_value = BELKIN_SA_BAUD(9600); break;
+ }
+ if ((cflag & CBAUD) != B0 ) {
+ if (BSA_USB_CMD(BELKIN_SA_SET_BAUDRATE_REQUEST, urb_value) < 0)
+ err("Set baudrate error");
+ } else {
+ /* Disable flow control */
+ if (BSA_USB_CMD(BELKIN_SA_SET_FLOW_CTRL_REQUEST, BELKIN_SA_FLOW_NONE) < 0)
+ err("Disable flowcontrol error");
+
+ /* Drop RTS and DTR */
+ control_state &= ~(TIOCM_DTR | TIOCM_RTS);
+ if (BSA_USB_CMD(BELKIN_SA_SET_DTR_REQUEST, 0) < 0)
+ err("DTR LOW error");
+ if (BSA_USB_CMD(BELKIN_SA_SET_RTS_REQUEST, 0) < 0)
+ err("RTS LOW error");
+ }
+ }
+
+ /* set the parity */
+ if( (cflag&(PARENB|PARODD)) != (old_cflag&(PARENB|PARODD)) ) {
+ if (cflag & PARENB)
+ urb_value = (cflag & PARODD) ? BELKIN_SA_PARITY_ODD : BELKIN_SA_PARITY_EVEN;
+ else
+ urb_value = BELKIN_SA_PARITY_NONE;
+ if (BSA_USB_CMD(BELKIN_SA_SET_PARITY_REQUEST, urb_value) < 0)
+ err("Set parity error");
+ }
+
+ /* set the number of data bits */
+ if( (cflag&CSIZE) != (old_cflag&CSIZE) ) {
+ switch (cflag & CSIZE) {
+ case CS5: urb_value = BELKIN_SA_DATA_BITS(5); break;
+ case CS6: urb_value = BELKIN_SA_DATA_BITS(6); break;
+ case CS7: urb_value = BELKIN_SA_DATA_BITS(7); break;
+ case CS8: urb_value = BELKIN_SA_DATA_BITS(8); break;
+ default: err("CSIZE was not CS5-CS8, using default of 8");
+ urb_value = BELKIN_SA_DATA_BITS(8);
+ break;
+ }
+ if (BSA_USB_CMD(BELKIN_SA_SET_DATA_BITS_REQUEST, urb_value) < 0)
+ err("Set data bits error");
+ }
+
+ /* set the number of stop bits */
+ if( (cflag&CSTOPB) != (old_cflag&CSTOPB) ) {
+ urb_value = (cflag & CSTOPB) ? BELKIN_SA_STOP_BITS(2) : BELKIN_SA_STOP_BITS(1);
+ if (BSA_USB_CMD(BELKIN_SA_SET_STOP_BITS_REQUEST, urb_value) < 0)
+ err("Set stop bits error");
+ }
+
+ /* Set flow control */
+ if( (iflag&IXOFF) != (old_iflag&IXOFF)
+ || (iflag&IXON) != (old_iflag&IXON)
+ || (cflag&CRTSCTS) != (old_cflag&CRTSCTS) ) {
+ urb_value = 0;
+ if ((iflag & IXOFF) || (iflag & IXON))
+ urb_value |= (BELKIN_SA_FLOW_OXON | BELKIN_SA_FLOW_IXON);
+ else
+ urb_value &= ~(BELKIN_SA_FLOW_OXON | BELKIN_SA_FLOW_IXON);
+
+ if (cflag & CRTSCTS)
+ urb_value |= (BELKIN_SA_FLOW_OCTS | BELKIN_SA_FLOW_IRTS);
+ else
+ urb_value &= ~(BELKIN_SA_FLOW_OCTS | BELKIN_SA_FLOW_IRTS);
+
+ if (bad_flow_control)
+ urb_value &= ~(BELKIN_SA_FLOW_IRTS);
+
+ if (BSA_USB_CMD(BELKIN_SA_SET_FLOW_CTRL_REQUEST, urb_value) < 0)
+ err("Set flow control error");
+ }
+
+ /* save off the modified port settings */
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->control_state = control_state;
+ spin_unlock_irqrestore(&priv->lock, flags);
+} /* belkin_sa_set_termios */
+
+
+static void belkin_sa_break_ctl( struct usb_serial_port *port, int break_state )
+{
+ struct usb_serial *serial = port->serial;
+
+ if (BSA_USB_CMD(BELKIN_SA_SET_BREAK_REQUEST, break_state ? 1 : 0) < 0)
+ err("Set break_ctl %d", break_state);
+}
+
+
+static int belkin_sa_tiocmget (struct usb_serial_port *port, struct file *file)
+{
+ struct belkin_sa_private *priv = usb_get_serial_port_data(port);
+ unsigned long control_state;
+ unsigned long flags;
+
+ dbg("%s", __FUNCTION__);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ control_state = priv->control_state;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ return control_state;
+}
+
+
+static int belkin_sa_tiocmset (struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct usb_serial *serial = port->serial;
+ struct belkin_sa_private *priv = usb_get_serial_port_data(port);
+ unsigned long control_state;
+ unsigned long flags;
+ int retval;
+ int rts = 0;
+ int dtr = 0;
+
+ dbg("%s", __FUNCTION__);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ control_state = priv->control_state;
+
+ if (set & TIOCM_RTS) {
+ control_state |= TIOCM_RTS;
+ rts = 1;
+ }
+ if (set & TIOCM_DTR) {
+ control_state |= TIOCM_DTR;
+ dtr = 1;
+ }
+ if (clear & TIOCM_RTS) {
+ control_state &= ~TIOCM_RTS;
+ rts = 0;
+ }
+ if (clear & TIOCM_DTR) {
+ control_state &= ~TIOCM_DTR;
+ dtr = 0;
+ }
+
+ priv->control_state = control_state;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ retval = BSA_USB_CMD(BELKIN_SA_SET_RTS_REQUEST, rts);
+ if (retval < 0) {
+ err("Set RTS error %d", retval);
+ goto exit;
+ }
+
+ retval = BSA_USB_CMD(BELKIN_SA_SET_DTR_REQUEST, dtr);
+ if (retval < 0) {
+ err("Set DTR error %d", retval);
+ goto exit;
+ }
+exit:
+ return retval;
+}
+
+
+static int belkin_sa_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
+{
+ switch (cmd) {
+ case TIOCMIWAIT:
+ /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
+ /* TODO */
+ return( 0 );
+
+ case TIOCGICOUNT:
+ /* return count of modemline transitions */
+ /* TODO */
+ return 0;
+
+ default:
+ dbg("belkin_sa_ioctl arg not supported - 0x%04x",cmd);
+ return(-ENOIOCTLCMD);
+ break;
+ }
+ return 0;
+} /* belkin_sa_ioctl */
+
+
+static int __init belkin_sa_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&belkin_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&belkin_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&belkin_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+
+static void __exit belkin_sa_exit (void)
+{
+ usb_deregister (&belkin_driver);
+ usb_serial_deregister (&belkin_device);
+}
+
+
+module_init (belkin_sa_init);
+module_exit (belkin_sa_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_VERSION( DRIVER_VERSION );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/belkin_sa.h b/drivers/usb/serial/belkin_sa.h
new file mode 100644
index 000000000000..9116b92f4622
--- /dev/null
+++ b/drivers/usb/serial/belkin_sa.h
@@ -0,0 +1,123 @@
+/*
+ * Definitions for 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
+ * individual credits and copyrights.
+ *
+ * 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.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * 12-Mar-2001 gkh
+ * Added GoHubs GO-COM232 device id.
+ *
+ * 06-Nov-2000 gkh
+ * Added old Belkin and Peracom device ids, which this driver supports
+ *
+ * 12-Oct-2000 William Greathouse
+ * First cut at supporting Belkin USB Serial Adapter F5U103
+ * I did not have a copy of the original work to support this
+ * adapter, so pardon any stupid mistakes. All of the information
+ * I am using to write this driver was acquired by using a modified
+ * UsbSnoop on Windows2000.
+ *
+ */
+
+#ifndef __LINUX_USB_SERIAL_BSA_H
+#define __LINUX_USB_SERIAL_BSA_H
+
+#define BELKIN_DOCKSTATION_VID 0x050d /* Vendor Id */
+#define BELKIN_DOCKSTATION_PID 0x1203 /* Product Id */
+
+#define BELKIN_SA_VID 0x050d /* Vendor Id */
+#define BELKIN_SA_PID 0x0103 /* Product Id */
+
+#define BELKIN_OLD_VID 0x056c /* Belkin's "old" vendor id */
+#define BELKIN_OLD_PID 0x8007 /* Belkin's "old" single port serial converter's id */
+
+#define PERACOM_VID 0x0565 /* Peracom's vendor id */
+#define PERACOM_PID 0x0001 /* Peracom's single port serial converter's id */
+
+#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 */
+#define BELKIN_SA_SET_STOP_BITS_REQUEST 1 /* Set stop bits (1,2) */
+#define BELKIN_SA_SET_DATA_BITS_REQUEST 2 /* Set data bits (5,6,7,8) */
+#define BELKIN_SA_SET_PARITY_REQUEST 3 /* Set parity (None, Even, Odd) */
+
+#define BELKIN_SA_SET_DTR_REQUEST 10 /* Set DTR state */
+#define BELKIN_SA_SET_RTS_REQUEST 11 /* Set RTS state */
+#define BELKIN_SA_SET_BREAK_REQUEST 12 /* Set BREAK state */
+
+#define BELKIN_SA_SET_FLOW_CTRL_REQUEST 16 /* Set flow control mode */
+
+
+#ifdef WHEN_I_LEARN_THIS
+#define BELKIN_SA_SET_MAGIC_REQUEST 17 /* I don't know, possibly flush */
+ /* (always in Wininit sequence before flow control) */
+#define BELKIN_SA_RESET xx /* Reset the port */
+#define BELKIN_SA_GET_MODEM_STATUS xx /* Force return of modem status register */
+#endif
+
+#define BELKIN_SA_SET_REQUEST_TYPE 0x40
+
+#define BELKIN_SA_BAUD(b) (230400/b)
+
+#define BELKIN_SA_STOP_BITS(b) (b-1)
+
+#define BELKIN_SA_DATA_BITS(b) (b-5)
+
+#define BELKIN_SA_PARITY_NONE 0
+#define BELKIN_SA_PARITY_EVEN 1
+#define BELKIN_SA_PARITY_ODD 2
+#define BELKIN_SA_PARITY_MARK 3
+#define BELKIN_SA_PARITY_SPACE 4
+
+#define BELKIN_SA_FLOW_NONE 0x0000 /* No flow control */
+#define BELKIN_SA_FLOW_OCTS 0x0001 /* use CTS input to throttle output */
+#define BELKIN_SA_FLOW_ODSR 0x0002 /* use DSR input to throttle output */
+#define BELKIN_SA_FLOW_IDSR 0x0004 /* use DSR input to enable receive */
+#define BELKIN_SA_FLOW_IDTR 0x0008 /* use DTR output for input flow control */
+#define BELKIN_SA_FLOW_IRTS 0x0010 /* use RTS output for input flow control */
+#define BELKIN_SA_FLOW_ORTS 0x0020 /* use RTS to indicate data available to send */
+#define BELKIN_SA_FLOW_ERRSUB 0x0040 /* ???? guess ???? substitute inline errors */
+#define BELKIN_SA_FLOW_OXON 0x0080 /* use XON/XOFF for output flow control */
+#define BELKIN_SA_FLOW_IXON 0x0100 /* use XON/XOFF for input flow control */
+
+/*
+ * It seems that the interrupt pipe is closely modelled after the
+ * 16550 register layout. This is probably because the adapter can
+ * be used in a "DOS" environment to simulate a standard hardware port.
+ */
+#define BELKIN_SA_LSR_INDEX 2 /* Line Status Register */
+#define BELKIN_SA_LSR_RDR 0x01 /* receive data ready */
+#define BELKIN_SA_LSR_OE 0x02 /* overrun error */
+#define BELKIN_SA_LSR_PE 0x04 /* parity error */
+#define BELKIN_SA_LSR_FE 0x08 /* framing error */
+#define BELKIN_SA_LSR_BI 0x10 /* break indicator */
+#define BELKIN_SA_LSR_THE 0x20 /* transmit holding register empty */
+#define BELKIN_SA_LSR_TE 0x40 /* transmit register empty */
+#define BELKIN_SA_LSR_ERR 0x80 /* OE | PE | FE | BI */
+
+#define BELKIN_SA_MSR_INDEX 3 /* Modem Status Register */
+#define BELKIN_SA_MSR_DCTS 0x01 /* Delta CTS */
+#define BELKIN_SA_MSR_DDSR 0x02 /* Delta DSR */
+#define BELKIN_SA_MSR_DRI 0x04 /* Delta RI */
+#define BELKIN_SA_MSR_DCD 0x08 /* Delta CD */
+#define BELKIN_SA_MSR_CTS 0x10 /* Current CTS */
+#define BELKIN_SA_MSR_DSR 0x20 /* Current DSR */
+#define BELKIN_SA_MSR_RI 0x40 /* Current RI */
+#define BELKIN_SA_MSR_CD 0x80 /* Current CD */
+
+#endif /* __LINUX_USB_SERIAL_BSA_H */
+
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
new file mode 100644
index 000000000000..2f612c2d894b
--- /dev/null
+++ b/drivers/usb/serial/bus.c
@@ -0,0 +1,134 @@
+/*
+ * USB Serial Converter Bus specific functions
+ *
+ * Copyright (C) 2002 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 version
+ * 2 as published by the Free Software Foundation.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/tty.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+
+static int usb_serial_device_match (struct device *dev, struct device_driver *drv)
+{
+ struct usb_serial_device_type *driver;
+ const struct usb_serial_port *port;
+
+ /*
+ * drivers are already assigned to ports in serial_probe so it's
+ * a simple check here.
+ */
+ port = to_usb_serial_port(dev);
+ if (!port)
+ return 0;
+
+ driver = to_usb_serial_driver(drv);
+
+ if (driver == port->serial->type)
+ return 1;
+
+ return 0;
+}
+
+struct bus_type usb_serial_bus_type = {
+ .name = "usb-serial",
+ .match = usb_serial_device_match,
+};
+
+static int usb_serial_device_probe (struct device *dev)
+{
+ struct usb_serial_device_type *driver;
+ struct usb_serial_port *port;
+ int retval = 0;
+ int minor;
+
+ port = to_usb_serial_port(dev);
+ if (!port) {
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ driver = port->serial->type;
+ if (driver->port_probe) {
+ if (!try_module_get(driver->owner)) {
+ dev_err(dev, "module get failed, exiting\n");
+ retval = -EIO;
+ goto exit;
+ }
+ retval = driver->port_probe (port);
+ module_put(driver->owner);
+ if (retval)
+ goto exit;
+ }
+
+ minor = port->number;
+ tty_register_device (usb_serial_tty_driver, minor, dev);
+ dev_info(&port->serial->dev->dev,
+ "%s converter now attached to ttyUSB%d\n",
+ driver->name, minor);
+
+exit:
+ return retval;
+}
+
+static int usb_serial_device_remove (struct device *dev)
+{
+ struct usb_serial_device_type *driver;
+ struct usb_serial_port *port;
+ int retval = 0;
+ int minor;
+
+ port = to_usb_serial_port(dev);
+ if (!port) {
+ return -ENODEV;
+ }
+
+ driver = port->serial->type;
+ if (driver->port_remove) {
+ if (!try_module_get(driver->owner)) {
+ dev_err(dev, "module get failed, exiting\n");
+ retval = -EIO;
+ goto exit;
+ }
+ retval = driver->port_remove (port);
+ module_put(driver->owner);
+ }
+exit:
+ minor = port->number;
+ tty_unregister_device (usb_serial_tty_driver, minor);
+ dev_info(dev, "%s converter now disconnected from ttyUSB%d\n",
+ driver->name, minor);
+
+ return retval;
+}
+
+int usb_serial_bus_register(struct usb_serial_device_type *device)
+{
+ int retval;
+
+ if (device->short_name)
+ device->driver.name = (char *)device->short_name;
+ else
+ device->driver.name = (char *)device->name;
+ device->driver.bus = &usb_serial_bus_type;
+ device->driver.probe = usb_serial_device_probe;
+ device->driver.remove = usb_serial_device_remove;
+ device->driver.owner = device->owner;
+
+ retval = driver_register(&device->driver);
+
+ return retval;
+}
+
+void usb_serial_bus_deregister(struct usb_serial_device_type *device)
+{
+ driver_unregister (&device->driver);
+}
+
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
new file mode 100644
index 000000000000..167f8ec56131
--- /dev/null
+++ b/drivers/usb/serial/console.c
@@ -0,0 +1,264 @@
+/*
+ * USB Serial Console driver
+ *
+ * Copyright (C) 2001 - 2002 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 version
+ * 2 as published by the Free Software Foundation.
+ *
+ * Thanks to Randy Dunlap for the original version of this code.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/usb.h>
+
+static int debug;
+
+#include "usb-serial.h"
+
+struct usbcons_info {
+ int magic;
+ int break_flag;
+ struct usb_serial_port *port;
+};
+
+static struct usbcons_info usbcons_info;
+static struct console usbcons;
+
+/*
+ * ------------------------------------------------------------
+ * USB Serial console driver
+ *
+ * Much of the code here is copied from drivers/char/serial.c
+ * and implements a phony serial console in the same way that
+ * serial.c does so that in case some software queries it,
+ * it will get the same results.
+ *
+ * Things that are different from the way the serial port code
+ * does things, is that we call the lower level usb-serial
+ * driver code to initialize the device, and we set the initial
+ * console speeds based on the command line arguments.
+ * ------------------------------------------------------------
+ */
+
+
+/*
+ * The parsing of the command line works exactly like the
+ * serial.c code, except that the specifier is "ttyUSB" instead
+ * of "ttyS".
+ */
+static int __init usb_console_setup(struct console *co, char *options)
+{
+ struct usbcons_info *info = &usbcons_info;
+ int baud = 9600;
+ int bits = 8;
+ int parity = 'n';
+ int doflow = 0;
+ int cflag = CREAD | HUPCL | CLOCAL;
+ char *s;
+ struct usb_serial *serial;
+ struct usb_serial_port *port;
+ int retval = 0;
+ struct tty_struct *tty;
+ struct termios *termios;
+
+ dbg ("%s", __FUNCTION__);
+
+ if (options) {
+ baud = simple_strtoul(options, NULL, 10);
+ s = options;
+ while (*s >= '0' && *s <= '9')
+ s++;
+ if (*s)
+ parity = *s++;
+ if (*s)
+ bits = *s++ - '0';
+ if (*s)
+ doflow = (*s++ == 'r');
+ }
+
+ /* build a cflag setting */
+ switch (baud) {
+ case 1200:
+ cflag |= B1200;
+ break;
+ case 2400:
+ cflag |= B2400;
+ break;
+ case 4800:
+ cflag |= B4800;
+ break;
+ case 19200:
+ cflag |= B19200;
+ break;
+ case 38400:
+ cflag |= B38400;
+ break;
+ case 57600:
+ cflag |= B57600;
+ break;
+ case 115200:
+ cflag |= B115200;
+ break;
+ case 9600:
+ default:
+ cflag |= B9600;
+ /*
+ * Set this to a sane value to prevent a divide error
+ */
+ baud = 9600;
+ break;
+ }
+ switch (bits) {
+ case 7:
+ cflag |= CS7;
+ break;
+ default:
+ case 8:
+ cflag |= CS8;
+ break;
+ }
+ switch (parity) {
+ case 'o': case 'O':
+ cflag |= PARODD;
+ break;
+ case 'e': case 'E':
+ cflag |= PARENB;
+ break;
+ }
+ co->cflag = cflag;
+
+ /* grab the first serial port that happens to be connected */
+ serial = usb_serial_get_by_index(0);
+ if (serial == NULL) {
+ /* no device is connected yet, sorry :( */
+ err ("No USB device connected to ttyUSB0");
+ return -ENODEV;
+ }
+
+ port = serial->port[0];
+ port->tty = NULL;
+
+ info->port = port;
+
+ ++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, NULL);
+ else
+ retval = usb_serial_generic_open(port, NULL);
+ if (retval)
+ port->open_count = 0;
+ }
+
+ if (retval) {
+ err ("could not open USB console port");
+ return retval;
+ }
+
+ if (serial->type->set_termios) {
+ /* build up a fake tty structure so that the open call has something
+ * to look at to get the cflag value */
+ tty = kmalloc (sizeof (*tty), GFP_KERNEL);
+ if (!tty) {
+ err ("no more memory");
+ return -ENOMEM;
+ }
+ termios = kmalloc (sizeof (*termios), GFP_KERNEL);
+ if (!termios) {
+ err ("no more memory");
+ kfree (tty);
+ return -ENOMEM;
+ }
+ memset (tty, 0x00, sizeof(*tty));
+ memset (termios, 0x00, sizeof(*termios));
+ termios->c_cflag = cflag;
+ tty->termios = termios;
+ port->tty = tty;
+
+ /* set up the initial termios settings */
+ serial->type->set_termios(port, NULL);
+ port->tty = NULL;
+ kfree (termios);
+ kfree (tty);
+ }
+
+ return retval;
+}
+
+static void usb_console_write(struct console *co, const char *buf, unsigned count)
+{
+ static struct usbcons_info *info = &usbcons_info;
+ struct usb_serial_port *port = info->port;
+ struct usb_serial *serial;
+ int retval = -ENODEV;
+
+ if (!port)
+ return;
+ serial = port->serial;
+
+ if (count == 0)
+ return;
+
+ 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, buf, count);
+ else
+ retval = usb_serial_generic_write(port, buf, count);
+
+exit:
+ dbg("%s - return value (if we had one): %d", __FUNCTION__, retval);
+}
+
+static struct console usbcons = {
+ .name = "ttyUSB",
+ .write = usb_console_write,
+ .setup = usb_console_setup,
+ .flags = CON_PRINTBUFFER,
+ .index = -1,
+};
+
+void usb_serial_console_init (int serial_debug, int minor)
+{
+ debug = serial_debug;
+
+ if (minor == 0) {
+ /*
+ * Call register_console() if this is the first device plugged
+ * in. If we call it earlier, then the callback to
+ * console_setup() will fail, as there is not a device seen by
+ * the USB subsystem yet.
+ */
+ /*
+ * Register console.
+ * NOTES:
+ * console_setup() is called (back) immediately (from register_console).
+ * console_write() is called immediately from register_console iff
+ * CON_PRINTBUFFER is set in flags.
+ */
+ dbg ("registering the USB serial console.");
+ register_console(&usbcons);
+ }
+}
+
+void usb_serial_console_exit (void)
+{
+ unregister_console(&usbcons);
+}
+
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c
new file mode 100644
index 000000000000..7e9bb63eb466
--- /dev/null
+++ b/drivers/usb/serial/cp2101.c
@@ -0,0 +1,591 @@
+/*
+ * Silicon Laboratories CP2101/CP2102 USB to RS232 serial adaptor driver
+ *
+ * Copyright (C) 2005 Craig Shelley (craig@microtron.org.uk)
+ *
+ * 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.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/usb.h>
+#include <asm/uaccess.h>
+#include "usb-serial.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.03"
+#define DRIVER_DESC "Silicon Labs CP2101/CP2102 RS232 serial adaptor driver"
+
+/*
+ * Function Prototypes
+ */
+static int cp2101_open(struct usb_serial_port*, struct file*);
+static void cp2101_cleanup(struct usb_serial_port*);
+static void cp2101_close(struct usb_serial_port*, struct file*);
+static void cp2101_get_termios(struct usb_serial_port*);
+static void cp2101_set_termios(struct usb_serial_port*, struct termios*);
+static void cp2101_break_ctl(struct usb_serial_port*, int);
+static int cp2101_startup (struct usb_serial *);
+static void cp2101_shutdown(struct usb_serial*);
+
+
+static int debug;
+
+static struct usb_device_id id_table [] = {
+ {USB_DEVICE(0x10c4, 0xea60) }, /*Silicon labs factory default*/
+ {USB_DEVICE(0x10ab, 0x10c5) }, /*Siemens MC60 Cable*/
+ { } /* Terminating Entry*/
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver cp2101_driver = {
+ .owner = THIS_MODULE,
+ .name = "CP2101",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table,
+};
+
+static struct usb_serial_device_type cp2101_device = {
+ .owner = THIS_MODULE,
+ .name = "CP2101",
+ .id_table = id_table,
+ .num_interrupt_in = 0,
+ .num_bulk_in = 0,
+ .num_bulk_out = 0,
+ .num_ports = 1,
+ .open = cp2101_open,
+ .close = cp2101_close,
+ .break_ctl = cp2101_break_ctl,
+ .set_termios = cp2101_set_termios,
+ .attach = cp2101_startup,
+ .shutdown = cp2101_shutdown,
+};
+
+/*Config request types*/
+#define REQTYPE_HOST_TO_DEVICE 0x41
+#define REQTYPE_DEVICE_TO_HOST 0xc1
+
+/*Config SET requests. To GET, add 1 to the request number*/
+#define CP2101_UART 0x00 /*Enable / Disable*/
+#define CP2101_BAUDRATE 0x01 /*(BAUD_RATE_GEN_FREQ / baudrate)*/
+#define CP2101_BITS 0x03 /*0x(0)(data bits)(parity)(stop bits)*/
+#define CP2101_BREAK 0x05 /*On / Off*/
+#define CP2101_DTRRTS 0x07 /*101 / 202 ???*/
+#define CP2101_CONFIG_16 0x13 /*16 bytes of config data ???*/
+#define CP2101_CONFIG_6 0x19 /*6 bytes of config data ???*/
+
+/*CP2101_UART*/
+#define UART_ENABLE 0x0001
+#define UART_DISABLE 0x0000
+
+/*CP2101_BAUDRATE*/
+#define BAUD_RATE_GEN_FREQ 0x384000
+
+/*CP2101_BITS*/
+#define BITS_DATA_MASK 0X0f00
+#define BITS_DATA_6 0X0600
+#define BITS_DATA_7 0X0700
+#define BITS_DATA_8 0X0800
+#define BITS_DATA_9 0X0900
+
+#define BITS_PARITY_MASK 0x00f0
+#define BITS_PARITY_NONE 0x0000
+#define BITS_PARITY_ODD 0x0010
+#define BITS_PARITY_EVEN 0x0020
+#define BITS_PARITY_MARK 0x0030
+#define BITS_PARITY_SPACE 0x0040
+
+#define BITS_STOP_MASK 0x000f
+#define BITS_STOP_1 0x0000
+#define BITS_STOP_1_5 0x0001
+#define BITS_STOP_2 0x0002
+#define BREAK_ON 0x0000
+#define BREAK_OFF 0x0001
+
+
+static int cp2101_get_config(struct usb_serial_port* port, u8 request)
+{
+ struct usb_serial *serial = port->serial;
+ unsigned char buf[4];
+ unsigned int value;
+ int result, i;
+
+ /*For get requests, the request number must be incremented*/
+ request++;
+
+ /*Issue the request, attempting to read 4 bytes*/
+ result = usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev, 0),
+ request, REQTYPE_DEVICE_TO_HOST, 0x0000,
+ 0, buf, 4, 300);
+
+ if (result < 0) {
+ dev_err(&port->dev, "%s - Unable to send config request, "
+ "request=0x%x result=%d\n",
+ __FUNCTION__, request, result);
+ return result;
+ }
+
+ /*Assemble each byte read into an integer value*/
+ value = 0;
+ for (i=0; i<4 && i<result; i++)
+ value |= (buf[i] << (i * 8));
+
+ dbg( " %s - request=0x%x result=%d value=0x%x",
+ __FUNCTION__, request, result, value);
+
+ return value;
+}
+
+static int cp2101_set_config(struct usb_serial_port* port, u8 request, u16 value)
+{
+ struct usb_serial *serial = port->serial;
+ int result;
+ result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ request, REQTYPE_HOST_TO_DEVICE, value,
+ 0, NULL, 0, 300);
+
+ if (result <0) {
+ dev_err(&port->dev, "%s - Unable to send config request, "
+ "request=0x%x value=0x%x result=%d\n",
+ __FUNCTION__, request, value, result);
+ return result;
+ }
+
+ dbg(" %s - request=0x%x value=0x%x result=%d",
+ __FUNCTION__, request, value, result);
+
+ return 0;
+}
+
+static int cp2101_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct usb_serial *serial = port->serial;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (cp2101_set_config(port, CP2101_UART, UART_ENABLE)) {
+ dev_err(&port->dev, "%s - Unable to enable UART\n",
+ __FUNCTION__);
+ return -EPROTO;
+ }
+
+ /* 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,
+ port);
+ result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ if (result) {
+ dev_err(&port->dev, "%s - failed resubmitting read urb, "
+ "error %d\n", __FUNCTION__, result);
+ return result;
+ }
+
+ /*Configure the termios structure*/
+ cp2101_get_termios(port);
+
+ return 0;
+}
+
+static void cp2101_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_kill_urb(port->write_urb);
+ if (serial->num_bulk_in)
+ usb_kill_urb(port->read_urb);
+ }
+}
+
+static void cp2101_close (struct usb_serial_port *port, struct file * filp)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /* shutdown our urbs */
+ dbg("%s - shutting down urbs", __FUNCTION__);
+ usb_kill_urb(port->write_urb);
+ usb_kill_urb(port->read_urb);
+
+ cp2101_set_config(port, CP2101_UART, UART_DISABLE);
+}
+
+/* cp2101_get_termios*/
+/* Reads the baud rate, data bits, parity and stop bits from the device*/
+/* Corrects any unsupported values*/
+/* Configures the termios structure to reflect the state of the device*/
+static void cp2101_get_termios (struct usb_serial_port *port)
+{
+ unsigned int cflag;
+ int baud;
+ int bits;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if ((!port->tty) || (!port->tty->termios)) {
+ dbg("%s - no tty structures", __FUNCTION__);
+ return;
+ }
+ cflag = port->tty->termios->c_cflag;
+
+ baud = cp2101_get_config(port, CP2101_BAUDRATE);
+ /*Convert to baudrate*/
+ if (baud)
+ baud = BAUD_RATE_GEN_FREQ / baud;
+
+ dbg("%s - baud rate = %d", __FUNCTION__, baud);
+ cflag &= ~CBAUD;
+ switch (baud) {
+ /* The baud rates which are commented out below
+ * appear to be supported by the device
+ * but are non-standard
+ */
+ case 600: cflag |= B600; break;
+ case 1200: cflag |= B1200; break;
+ case 1800: cflag |= B1800; break;
+ case 2400: cflag |= B2400; break;
+ case 4800: cflag |= B4800; break;
+ /*case 7200: cflag |= B7200; break;*/
+ case 9600: cflag |= B9600; break;
+ /*case 14400: cflag |= B14400; break;*/
+ case 19200: cflag |= B19200; break;
+ /*case 28800: cflag |= B28800; break;*/
+ case 38400: cflag |= B38400; break;
+ /*case 55854: cflag |= B55054; break;*/
+ case 57600: cflag |= B57600; break;
+ case 115200: cflag |= B115200; break;
+ /*case 127117: cflag |= B127117; break;*/
+ case 230400: cflag |= B230400; break;
+ case 460800: cflag |= B460800; break;
+ case 921600: cflag |= B921600; break;
+ /*case 3686400: cflag |= B3686400; break;*/
+ default:
+ dbg("%s - Baud rate is not supported, "
+ "using 9600 baud", __FUNCTION__);
+ cflag |= B9600;
+ cp2101_set_config(port, CP2101_BAUDRATE,
+ (BAUD_RATE_GEN_FREQ/9600));
+ break;
+ }
+
+ bits = cp2101_get_config(port, CP2101_BITS);
+ cflag &= ~CSIZE;
+ switch(bits & BITS_DATA_MASK) {
+ case BITS_DATA_6:
+ dbg("%s - data bits = 6", __FUNCTION__);
+ cflag |= CS6;
+ break;
+ case BITS_DATA_7:
+ dbg("%s - data bits = 7", __FUNCTION__);
+ cflag |= CS7;
+ break;
+ case BITS_DATA_8:
+ dbg("%s - data bits = 8", __FUNCTION__);
+ cflag |= CS8;
+ break;
+ case BITS_DATA_9:
+ dbg("%s - data bits = 9 (not supported, "
+ "using 8 data bits)", __FUNCTION__);
+ cflag |= CS8;
+ bits &= ~BITS_DATA_MASK;
+ bits |= BITS_DATA_8;
+ cp2101_set_config(port, CP2101_BITS, bits);
+ break;
+ default:
+ dbg("%s - Unknown number of data bits, "
+ "using 8", __FUNCTION__);
+ cflag |= CS8;
+ bits &= ~BITS_DATA_MASK;
+ bits |= BITS_DATA_8;
+ cp2101_set_config(port, CP2101_BITS, bits);
+ break;
+ }
+
+ switch(bits & BITS_PARITY_MASK) {
+ case BITS_PARITY_NONE:
+ dbg("%s - parity = NONE", __FUNCTION__);
+ cflag &= ~PARENB;
+ break;
+ case BITS_PARITY_ODD:
+ dbg("%s - parity = ODD", __FUNCTION__);
+ cflag |= (PARENB|PARODD);
+ break;
+ case BITS_PARITY_EVEN:
+ dbg("%s - parity = EVEN", __FUNCTION__);
+ cflag &= ~PARODD;
+ cflag |= PARENB;
+ break;
+ case BITS_PARITY_MARK:
+ dbg("%s - parity = MARK (not supported, "
+ "disabling parity)", __FUNCTION__);
+ cflag &= ~PARENB;
+ bits &= ~BITS_PARITY_MASK;
+ cp2101_set_config(port, CP2101_BITS, bits);
+ break;
+ case BITS_PARITY_SPACE:
+ dbg("%s - parity = SPACE (not supported, "
+ "disabling parity)", __FUNCTION__);
+ cflag &= ~PARENB;
+ bits &= ~BITS_PARITY_MASK;
+ cp2101_set_config(port, CP2101_BITS, bits);
+ break;
+ default:
+ dbg("%s - Unknown parity mode, "
+ "disabling parity", __FUNCTION__);
+ cflag &= ~PARENB;
+ bits &= ~BITS_PARITY_MASK;
+ cp2101_set_config(port, CP2101_BITS, bits);
+ break;
+ }
+
+ cflag &= ~CSTOPB;
+ switch(bits & BITS_STOP_MASK) {
+ case BITS_STOP_1:
+ dbg("%s - stop bits = 1", __FUNCTION__);
+ break;
+ case BITS_STOP_1_5:
+ dbg("%s - stop bits = 1.5 (not supported, "
+ "using 1 stop bit", __FUNCTION__);
+ bits &= ~BITS_STOP_MASK;
+ cp2101_set_config(port, CP2101_BITS, bits);
+ break;
+ case BITS_STOP_2:
+ dbg("%s - stop bits = 2", __FUNCTION__);
+ cflag |= CSTOPB;
+ break;
+ default:
+ dbg("%s - Unknown number of stop bits, "
+ "using 1 stop bit", __FUNCTION__);
+ bits &= ~BITS_STOP_MASK;
+ cp2101_set_config(port, CP2101_BITS, bits);
+ break;
+ }
+
+ port->tty->termios->c_cflag = cflag;
+}
+
+static void cp2101_set_termios (struct usb_serial_port *port,
+ struct termios *old_termios)
+{
+ unsigned int cflag, old_cflag=0;
+ int baud=0;
+ int bits;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if ((!port->tty) || (!port->tty->termios)) {
+ dbg("%s - no tty structures", __FUNCTION__);
+ 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("%s - nothing to change...", __FUNCTION__);
+ return;
+ }
+
+ old_cflag = old_termios->c_cflag;
+ }
+
+ /* If the baud rate is to be updated*/
+ if ((cflag & CBAUD) != (old_cflag & CBAUD)) {
+ switch (cflag & CBAUD) {
+ /* The baud rates which are commented out below
+ * appear to be supported by the device
+ * but are non-standard
+ */
+ case B0: baud = 0; break;
+ case B600: baud = 600; break;
+ case B1200: baud = 1200; break;
+ case B1800: baud = 1800; break;
+ case B2400: baud = 2400; break;
+ case B4800: baud = 4800; break;
+ /*case B7200: baud = 7200; break;*/
+ case B9600: baud = 9600; break;
+ /*ase B14400: baud = 14400; break;*/
+ case B19200: baud = 19200; break;
+ /*case B28800: baud = 28800; break;*/
+ case B38400: baud = 38400; break;
+ /*case B55854: baud = 55054; break;*/
+ case B57600: baud = 57600; break;
+ case B115200: baud = 115200; break;
+ /*case B127117: baud = 127117; break;*/
+ case B230400: baud = 230400; break;
+ case B460800: baud = 460800; break;
+ case B921600: baud = 921600; break;
+ /*case B3686400: baud = 3686400; break;*/
+ default:
+ dev_err(&port->dev, "cp2101 driver does not "
+ "support the baudrate requested\n");
+ break;
+ }
+
+ if (baud) {
+ dbg("%s - Setting baud rate to %d baud", __FUNCTION__,
+ baud);
+ if (cp2101_set_config(port, CP2101_BAUDRATE,
+ (BAUD_RATE_GEN_FREQ / baud)))
+ dev_err(&port->dev, "Baud rate requested not "
+ "supported by device\n");
+ }
+ }
+
+ /*If the number of data bits is to be updated*/
+ if ((cflag & CSIZE) != (old_cflag & CSIZE)) {
+ bits = cp2101_get_config(port, CP2101_BITS);
+ bits &= ~BITS_DATA_MASK;
+ switch (cflag & CSIZE) {
+ case CS6:
+ bits |= BITS_DATA_6;
+ dbg("%s - data bits = 6", __FUNCTION__);
+ break;
+ case CS7:
+ bits |= BITS_DATA_7;
+ dbg("%s - data bits = 7", __FUNCTION__);
+ break;
+ case CS8:
+ bits |= BITS_DATA_8;
+ dbg("%s - data bits = 8", __FUNCTION__);
+ break;
+ /*case CS9:
+ bits |= BITS_DATA_9;
+ dbg("%s - data bits = 9", __FUNCTION__);
+ break;*/
+ default:
+ dev_err(&port->dev, "cp2101 driver does not "
+ "support the number of bits requested,"
+ " using 8 bit mode\n");
+ bits |= BITS_DATA_8;
+ break;
+ }
+ if (cp2101_set_config(port, CP2101_BITS, bits))
+ dev_err(&port->dev, "Number of data bits requested "
+ "not supported by device\n");
+ }
+
+ if ((cflag & (PARENB|PARODD)) != (old_cflag & (PARENB|PARODD))) {
+ bits = cp2101_get_config(port, CP2101_BITS);
+ bits &= ~BITS_PARITY_MASK;
+ if (cflag & PARENB) {
+ if (cflag & PARODD) {
+ bits |= BITS_PARITY_ODD;
+ dbg("%s - parity = ODD", __FUNCTION__);
+ } else {
+ bits |= BITS_PARITY_EVEN;
+ dbg("%s - parity = EVEN", __FUNCTION__);
+ }
+ }
+ if (cp2101_set_config(port, CP2101_BITS, bits))
+ dev_err(&port->dev, "Parity mode not supported "
+ "by device\n");
+ }
+
+ if ((cflag & CSTOPB) != (old_cflag & CSTOPB)) {
+ bits = cp2101_get_config(port, CP2101_BITS);
+ bits &= ~BITS_STOP_MASK;
+ if (cflag & CSTOPB) {
+ bits |= BITS_STOP_2;
+ dbg("%s - stop bits = 2", __FUNCTION__);
+ } else {
+ bits |= BITS_STOP_1;
+ dbg("%s - stop bits = 1", __FUNCTION__);
+ }
+ if (cp2101_set_config(port, CP2101_BITS, bits))
+ dev_err(&port->dev, "Number of stop bits requested "
+ "not supported by device\n");
+ }
+}
+
+static void cp2101_break_ctl (struct usb_serial_port *port, int break_state)
+{
+ u16 state;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ if (break_state == 0)
+ state = BREAK_OFF;
+ else
+ state = BREAK_ON;
+ dbg("%s - turning break %s", __FUNCTION__,
+ state==BREAK_OFF ? "off" : "on");
+ cp2101_set_config(port, CP2101_BREAK, state);
+}
+
+static int cp2101_startup (struct usb_serial *serial)
+{
+ /*CP2101 buffers behave strangely unless device is reset*/
+ usb_reset_device(serial->dev);
+ return 0;
+}
+
+static void cp2101_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) {
+ cp2101_cleanup(serial->port[i]);
+ }
+}
+
+static int __init cp2101_init (void)
+{
+ int retval;
+
+ retval = usb_serial_register(&cp2101_device);
+ if (retval)
+ return retval; /*Failed to register*/
+
+ retval = usb_register(&cp2101_driver);
+ if (retval) {
+ /*Failed to register*/
+ usb_serial_deregister(&cp2101_device);
+ return retval;
+ }
+
+ /*Success*/
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+}
+
+static void __exit cp2101_exit (void)
+{
+ usb_deregister (&cp2101_driver);
+ usb_serial_deregister (&cp2101_device);
+}
+
+module_init(cp2101_init);
+module_exit(cp2101_exit);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_VERSION(DRIVER_VERSION);
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Enable verbose debugging messages");
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
new file mode 100644
index 000000000000..46a204cd40e1
--- /dev/null
+++ b/drivers/usb/serial/cyberjack.c
@@ -0,0 +1,514 @@
+/*
+ * REINER SCT cyberJack pinpad/e-com USB Chipcard Reader Driver
+ *
+ * Copyright (C) 2001 REINER SCT
+ * Author: Matthias Bruestle
+ *
+ * Contact: support@reiner-sct.com (see MAINTAINERS)
+ *
+ * This program is largely derived from work by the linux-usb group
+ * and associated source files. Please see the usb/serial files for
+ * individual credits and copyrights.
+ *
+ * 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.
+ *
+ * Thanks to Greg Kroah-Hartman (greg@kroah.com) for his help and
+ * patience.
+ *
+ * In case of problems, please write to the contact e-mail address
+ * mentioned above.
+ *
+ * Please note that later models of the cyberjack reader family are
+ * supported by a libusb-based userspace device driver.
+ *
+ * Homepage: http://www.reiner-sct.de/support/treiber_cyberjack.php#linux
+ */
+
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+
+#define CYBERJACK_LOCAL_BUF_SIZE 32
+
+static int debug;
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.01"
+#define DRIVER_AUTHOR "Matthias Bruestle"
+#define DRIVER_DESC "REINER SCT cyberJack pinpad/e-com USB Chipcard Reader Driver"
+
+
+#define CYBERJACK_VENDOR_ID 0x0C4B
+#define CYBERJACK_PRODUCT_ID 0x0100
+
+/* Function prototypes */
+static int cyberjack_startup (struct usb_serial *serial);
+static void cyberjack_shutdown (struct usb_serial *serial);
+static int cyberjack_open (struct usb_serial_port *port, struct file *filp);
+static void cyberjack_close (struct usb_serial_port *port, struct file *filp);
+static int cyberjack_write (struct usb_serial_port *port, const unsigned char *buf, int count);
+static int cyberjack_write_room( struct usb_serial_port *port );
+static void cyberjack_read_int_callback (struct urb *urb, struct pt_regs *regs);
+static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void cyberjack_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+
+static struct usb_device_id id_table [] = {
+ { USB_DEVICE(CYBERJACK_VENDOR_ID, CYBERJACK_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver cyberjack_driver = {
+ .owner = THIS_MODULE,
+ .name = "cyberjack",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table,
+};
+
+static struct usb_serial_device_type cyberjack_device = {
+ .owner = THIS_MODULE,
+ .name = "Reiner SCT Cyberjack USB card reader",
+ .short_name = "cyberjack",
+ .id_table = id_table,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .attach = cyberjack_startup,
+ .shutdown = cyberjack_shutdown,
+ .open = cyberjack_open,
+ .close = cyberjack_close,
+ .write = cyberjack_write,
+ .write_room = cyberjack_write_room,
+ .read_int_callback = cyberjack_read_int_callback,
+ .read_bulk_callback = cyberjack_read_bulk_callback,
+ .write_bulk_callback = cyberjack_write_bulk_callback,
+};
+
+struct cyberjack_private {
+ spinlock_t lock; /* Lock for SMP */
+ short rdtodo; /* Bytes still to read */
+ unsigned char wrbuf[5*64]; /* Buffer for collecting data to write */
+ short wrfilled; /* Overall data size we already got */
+ short wrsent; /* Data already sent */
+};
+
+/* do some startup allocations not currently performed by usb_serial_probe() */
+static int cyberjack_startup (struct usb_serial *serial)
+{
+ struct cyberjack_private *priv;
+ int i;
+
+ dbg("%s", __FUNCTION__);
+
+ /* allocate the private data structure */
+ priv = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ /* set initial values */
+ spin_lock_init(&priv->lock);
+ priv->rdtodo = 0;
+ priv->wrfilled = 0;
+ priv->wrsent = 0;
+ usb_set_serial_port_data(serial->port[0], priv);
+
+ init_waitqueue_head(&serial->port[0]->write_wait);
+
+ for (i = 0; i < serial->num_ports; ++i) {
+ int result;
+ serial->port[i]->interrupt_in_urb->dev = serial->dev;
+ result = usb_submit_urb(serial->port[i]->interrupt_in_urb,
+ GFP_KERNEL);
+ if (result)
+ err(" usb_submit_urb(read int) failed");
+ dbg("%s - usb_submit_urb(int urb)", __FUNCTION__);
+ }
+
+ return( 0 );
+}
+
+static void cyberjack_shutdown (struct usb_serial *serial)
+{
+ int i;
+
+ dbg("%s", __FUNCTION__);
+
+ for (i=0; i < serial->num_ports; ++i) {
+ usb_kill_urb(serial->port[i]->interrupt_in_urb);
+ /* My special items, the standard routines free my urbs */
+ kfree(usb_get_serial_port_data(serial->port[i]));
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+}
+
+static int cyberjack_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct cyberjack_private *priv;
+ unsigned long flags;
+ int result = 0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ dbg("%s - usb_clear_halt", __FUNCTION__ );
+ usb_clear_halt(port->serial->dev, port->write_urb->pipe);
+
+ /* 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 = usb_get_serial_port_data(port);
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->rdtodo = 0;
+ priv->wrfilled = 0;
+ priv->wrsent = 0;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ 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_kill_urb(port->write_urb);
+ usb_kill_urb(port->read_urb);
+ }
+}
+
+static int cyberjack_write (struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ struct usb_serial *serial = port->serial;
+ struct cyberjack_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ int result;
+ int wrexpected;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ 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);
+ }
+
+ spin_lock_irqsave(&priv->lock, flags);
+
+ if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
+ /* To much data for buffer. Reset buffer. */
+ priv->wrfilled=0;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ return (0);
+ }
+
+ /* Copy data */
+ memcpy (priv->wrbuf+priv->wrfilled, buf, count);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count,
+ priv->wrbuf+priv->wrfilled);
+ priv->wrfilled += count;
+
+ 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);
+ }
+
+ if( priv->wrfilled >= wrexpected ) {
+ /* 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 );
+ priv->wrsent=length;
+
+ /* 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, length,
+ ((serial->type->write_bulk_callback) ?
+ serial->type->write_bulk_callback :
+ cyberjack_write_bulk_callback),
+ port);
+
+ /* send the data out the bulk port */
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+ 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;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ 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;
+ }
+ }
+
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ return (count);
+}
+
+static int cyberjack_write_room( struct usb_serial_port *port )
+{
+ return CYBERJACK_LOCAL_BUF_SIZE;
+}
+
+static void cyberjack_read_int_callback( struct urb *urb, struct pt_regs *regs )
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct cyberjack_private *priv = usb_get_serial_port_data(port);
+ unsigned char *data = urb->transfer_buffer;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /* the urb might have been killed. */
+ if (urb->status)
+ return;
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+
+ /* React only to interrupts signaling a bulk_in transfer */
+ if( (urb->actual_length==4) && (data[0]==0x01) ) {
+ short old_rdtodo;
+ int result;
+
+ /* This is a announcement of coming bulk_ins. */
+ unsigned short size = ((unsigned short)data[3]<<8)+data[2]+3;
+
+ spin_lock(&priv->lock);
+
+ old_rdtodo = priv->rdtodo;
+
+ if( (old_rdtodo+size)<(old_rdtodo) ) {
+ dbg( "To many bulk_in urbs to do." );
+ spin_unlock(&priv->lock);
+ goto resubmit;
+ }
+
+ /* "+=" is probably more fault tollerant than "=" */
+ priv->rdtodo += size;
+
+ dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo);
+
+ spin_unlock(&priv->lock);
+
+ if( !old_rdtodo ) {
+ port->read_urb->dev = port->serial->dev;
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+ if( result )
+ err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+ dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
+ }
+ }
+
+resubmit:
+ port->interrupt_in_urb->dev = port->serial->dev;
+ result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
+ if (result)
+ err(" usb_submit_urb(read int) failed");
+ dbg("%s - usb_submit_urb(int urb)", __FUNCTION__);
+}
+
+static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct cyberjack_private *priv = usb_get_serial_port_data(port);
+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+ short todo;
+ int i;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+ if (urb->status) {
+ dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ tty = port->tty;
+ if (!tty) {
+ dbg("%s - ignoring since device not open\n", __FUNCTION__);
+ return;
+ }
+ 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) {
+ tty_flip_buffer_push(tty);
+ }
+ /* this doesn't actually push the data through unless tty->low_latency is set */
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+
+ spin_lock(&priv->lock);
+
+ /* Reduce urbs to do by one. */
+ priv->rdtodo-=urb->actual_length;
+ /* Just to be sure */
+ if ( priv->rdtodo<0 ) priv->rdtodo = 0;
+ todo = priv->rdtodo;
+
+ spin_unlock(&priv->lock);
+
+ dbg("%s - rdtodo: %d", __FUNCTION__, todo);
+
+ /* Continue to read if we have still urbs to do. */
+ if( todo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) {
+ port->read_urb->dev = port->serial->dev;
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+ if (result)
+ err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+ dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
+ }
+}
+
+static void cyberjack_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct cyberjack_private *priv = usb_get_serial_port_data(port);
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ spin_lock(&priv->lock);
+
+ /* only do something if we have more data to send */
+ if( priv->wrfilled ) {
+ int length, blksize, result;
+
+ if (port->write_urb->status == -EINPROGRESS) {
+ dbg("%s - already writing", __FUNCTION__);
+ spin_unlock(&priv->lock);
+ 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);
+
+ memcpy (port->write_urb->transfer_buffer, priv->wrbuf + priv->wrsent,
+ length );
+ priv->wrsent+=length;
+
+ /* set up our urb */
+ usb_fill_bulk_urb(port->write_urb, port->serial->dev,
+ usb_sndbulkpipe(port->serial->dev, port->bulk_out_endpointAddress),
+ port->write_urb->transfer_buffer, length,
+ ((port->serial->type->write_bulk_callback) ?
+ port->serial->type->write_bulk_callback :
+ cyberjack_write_bulk_callback),
+ port);
+
+ /* send the data out the bulk port */
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+ 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;
+ goto exit;
+ }
+
+ 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;
+ }
+ }
+
+exit:
+ spin_unlock(&priv->lock);
+ schedule_work(&port->work);
+}
+
+static int __init cyberjack_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&cyberjack_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&cyberjack_driver);
+ if (retval)
+ goto failed_usb_register;
+
+ info(DRIVER_VERSION " " DRIVER_AUTHOR);
+ info(DRIVER_DESC);
+
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&cyberjack_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+static void __exit cyberjack_exit (void)
+{
+ usb_deregister (&cyberjack_driver);
+ usb_serial_deregister (&cyberjack_device);
+}
+
+module_init(cyberjack_init);
+module_exit(cyberjack_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_VERSION( DRIVER_VERSION );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
new file mode 100644
index 000000000000..db8f472d9e3f
--- /dev/null
+++ b/drivers/usb/serial/cypress_m8.c
@@ -0,0 +1,1538 @@
+/*
+ * USB Cypress M8 driver
+ *
+ * Copyright (C) 2004
+ * Lonnie Mendez (dignome@gmail.com)
+ * Copyright (C) 2003,2004
+ * Neil Whelchel (koyama@firstlight.net)
+ *
+ * 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.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * See http://geocities.com/i0xox0i for information on this driver and the
+ * earthmate usb device.
+ *
+ *
+ * Lonnie Mendez <dignome@gmail.com>
+ * 12-15-2004
+ * Incorporated write buffering from pl2303 driver. Fixed bug with line
+ * handling so both lines are raised in cypress_open. (was dropping rts)
+ * Various code cleanups made as well along with other misc bug fixes.
+ *
+ * Lonnie Mendez <dignome@gmail.com>
+ * 04-10-2004
+ * Driver modified to support dynamic line settings. Various improvments
+ * and features.
+ *
+ * Neil Whelchel
+ * 10-2003
+ * Driver first released.
+ *
+ *
+ * Long Term TODO:
+ * Improve transfer speeds - both read/write are somewhat slow
+ * at this point.
+ * Improve debugging. Show modem line status with debug output and
+ * implement filtering for certain data as a module parameter.
+ */
+
+/* Thanks to Neil Whelchel for writing the first cypress m8 implementation for linux. */
+/* Thanks to cypress for providing references for the hid reports. */
+/* Thanks to Jiang Zhang for providing links and for general help. */
+/* Code originates and was built up from ftdi_sio, belkin, pl2303 and others. */
+
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/spinlock.h>
+#include <linux/usb.h>
+#include <linux/serial.h>
+#include <linux/delay.h>
+#include <asm/uaccess.h>
+
+#include "usb-serial.h"
+#include "cypress_m8.h"
+
+
+#ifdef CONFIG_USB_SERIAL_DEBUG
+ static int debug = 1;
+#else
+ static int debug;
+#endif
+static int stats;
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.08"
+#define DRIVER_AUTHOR "Lonnie Mendez <dignome@gmail.com>, Neil Whelchel <koyama@firstlight.net>"
+#define DRIVER_DESC "Cypress USB to Serial Driver"
+
+/* write buffer size defines */
+#define CYPRESS_BUF_SIZE 1024
+#define CYPRESS_CLOSING_WAIT (30*HZ)
+
+static struct usb_device_id id_table_earthmate [] = {
+ { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) },
+ { } /* Terminating entry */
+};
+
+static struct usb_device_id id_table_cyphidcomrs232 [] = {
+ { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
+ { } /* Terminating entry */
+};
+
+static struct usb_device_id id_table_combined [] = {
+ { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) },
+ { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
+static struct usb_driver cypress_driver = {
+ .name = "cypress",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table_combined,
+};
+
+struct cypress_private {
+ spinlock_t lock; /* private lock */
+ int chiptype; /* identifier of device, for quirks/etc */
+ int bytes_in; /* used for statistics */
+ int bytes_out; /* used for statistics */
+ int cmd_count; /* used for statistics */
+ int cmd_ctrl; /* always set this to 1 before issuing a command */
+ struct cypress_buf *buf; /* write buffer */
+ int write_urb_in_use; /* write urb in use indicator */
+ int termios_initialized;
+ __u8 line_control; /* holds dtr / rts value */
+ __u8 current_status; /* received from last read - info on dsr,cts,cd,ri,etc */
+ __u8 current_config; /* stores the current configuration byte */
+ __u8 rx_flags; /* throttling - used from whiteheat/ftdi_sio */
+ int baud_rate; /* stores current baud rate in integer form */
+ int cbr_mask; /* stores current baud rate in masked form */
+ int isthrottled; /* if throttled, discard reads */
+ wait_queue_head_t delta_msr_wait; /* used for TIOCMIWAIT */
+ char prev_status, diff_status; /* used for TIOCMIWAIT */
+ /* we pass a pointer to this as the arguement sent to cypress_set_termios old_termios */
+ struct termios tmp_termios; /* stores the old termios settings */
+ char calledfromopen; /* used when issuing lines on open - fixes rts drop bug */
+};
+
+/* write buffer structure */
+struct cypress_buf {
+ unsigned int buf_size;
+ char *buf_buf;
+ char *buf_get;
+ char *buf_put;
+};
+
+/* function prototypes for the Cypress USB to serial device */
+static int cypress_earthmate_startup (struct usb_serial *serial);
+static int cypress_hidcom_startup (struct usb_serial *serial);
+static void cypress_shutdown (struct usb_serial *serial);
+static int cypress_open (struct usb_serial_port *port, struct file *filp);
+static void cypress_close (struct usb_serial_port *port, struct file *filp);
+static int cypress_write (struct usb_serial_port *port, const unsigned char *buf, int count);
+static void cypress_send (struct usb_serial_port *port);
+static int cypress_write_room (struct usb_serial_port *port);
+static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
+static void cypress_set_termios (struct usb_serial_port *port, struct termios * old);
+static int cypress_tiocmget (struct usb_serial_port *port, struct file *file);
+static int cypress_tiocmset (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
+static int cypress_chars_in_buffer (struct usb_serial_port *port);
+static void cypress_throttle (struct usb_serial_port *port);
+static void cypress_unthrottle (struct usb_serial_port *port);
+static void cypress_read_int_callback (struct urb *urb, struct pt_regs *regs);
+static void cypress_write_int_callback (struct urb *urb, struct pt_regs *regs);
+/* baud helper functions */
+static int mask_to_rate (unsigned mask);
+static unsigned rate_to_mask (int rate);
+/* write buffer functions */
+static struct cypress_buf *cypress_buf_alloc(unsigned int size);
+static void cypress_buf_free(struct cypress_buf *cb);
+static void cypress_buf_clear(struct cypress_buf *cb);
+static unsigned int cypress_buf_data_avail(struct cypress_buf *cb);
+static unsigned int cypress_buf_space_avail(struct cypress_buf *cb);
+static unsigned int cypress_buf_put(struct cypress_buf *cb, const char *buf,
+ unsigned int count);
+static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf,
+ unsigned int count);
+
+
+static struct usb_serial_device_type cypress_earthmate_device = {
+ .owner = THIS_MODULE,
+ .name = "DeLorme Earthmate USB",
+ .short_name = "earthmate",
+ .id_table = id_table_earthmate,
+ .num_interrupt_in = 1,
+ .num_interrupt_out = 1,
+ .num_bulk_in = NUM_DONT_CARE,
+ .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .attach = cypress_earthmate_startup,
+ .shutdown = cypress_shutdown,
+ .open = cypress_open,
+ .close = cypress_close,
+ .write = cypress_write,
+ .write_room = cypress_write_room,
+ .ioctl = cypress_ioctl,
+ .set_termios = cypress_set_termios,
+ .tiocmget = cypress_tiocmget,
+ .tiocmset = cypress_tiocmset,
+ .chars_in_buffer = cypress_chars_in_buffer,
+ .throttle = cypress_throttle,
+ .unthrottle = cypress_unthrottle,
+ .read_int_callback = cypress_read_int_callback,
+ .write_int_callback = cypress_write_int_callback,
+};
+
+static struct usb_serial_device_type cypress_hidcom_device = {
+ .owner = THIS_MODULE,
+ .name = "HID->COM RS232 Adapter",
+ .short_name = "cyphidcom",
+ .id_table = id_table_cyphidcomrs232,
+ .num_interrupt_in = 1,
+ .num_interrupt_out = 1,
+ .num_bulk_in = NUM_DONT_CARE,
+ .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .attach = cypress_hidcom_startup,
+ .shutdown = cypress_shutdown,
+ .open = cypress_open,
+ .close = cypress_close,
+ .write = cypress_write,
+ .write_room = cypress_write_room,
+ .ioctl = cypress_ioctl,
+ .set_termios = cypress_set_termios,
+ .tiocmget = cypress_tiocmget,
+ .tiocmset = cypress_tiocmset,
+ .chars_in_buffer = cypress_chars_in_buffer,
+ .throttle = cypress_throttle,
+ .unthrottle = cypress_unthrottle,
+ .read_int_callback = cypress_read_int_callback,
+ .write_int_callback = cypress_write_int_callback,
+};
+
+
+/*****************************************************************************
+ * Cypress serial helper functions
+ *****************************************************************************/
+
+
+/* This function can either set or retreive the current serial line settings */
+static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_mask, int data_bits, int stop_bits,
+ int parity_enable, int parity_type, int reset, int cypress_request_type)
+{
+ int i, n_baud_rate = 0, retval = 0;
+ struct cypress_private *priv;
+ __u8 feature_buffer[5];
+ __u8 config;
+ unsigned long flags;
+
+ dbg("%s", __FUNCTION__);
+
+ priv = usb_get_serial_port_data(port);
+
+ switch(cypress_request_type) {
+ case CYPRESS_SET_CONFIG:
+
+ /*
+ * The general purpose firmware for the Cypress M8 allows for a maximum speed
+ * of 57600bps (I have no idea whether DeLorme chose to use the general purpose
+ * firmware or not), if you need to modify this speed setting for your own
+ * project please add your own chiptype and modify the code likewise. The
+ * Cypress HID->COM device will work successfully up to 115200bps.
+ */
+ if (baud_mask != priv->cbr_mask) {
+ dbg("%s - baud rate is changing", __FUNCTION__);
+ if ( priv->chiptype == CT_EARTHMATE ) {
+ /* 300 and 600 baud rates are supported under the generic firmware,
+ * but are not used with NMEA and SiRF protocols */
+
+ if ( (baud_mask == B300) || (baud_mask == B600) ) {
+ err("%s - failed setting baud rate, unsupported speed (default to 4800)",
+ __FUNCTION__);
+ n_baud_rate = 4800;
+ } else if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) {
+ err("%s - failed setting baud rate, unsupported speed (default to 4800)",
+ __FUNCTION__);
+ n_baud_rate = 4800;
+ }
+ } else if (priv->chiptype == CT_CYPHIDCOM) {
+ if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) {
+ err("%s - failed setting baud rate, unsupported speed (default to 4800)",
+ __FUNCTION__);
+ n_baud_rate = 4800;
+ }
+ } else if (priv->chiptype == CT_GENERIC) {
+ if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) {
+ err("%s - failed setting baud rate, unsupported speed (default to 4800)",
+ __FUNCTION__);
+ n_baud_rate = 4800;
+ }
+ } else {
+ info("%s - please define your chiptype, using 4800bps default", __FUNCTION__);
+ n_baud_rate = 4800;
+ }
+ } else { /* baud rate not changing, keep the old */
+ n_baud_rate = priv->baud_rate;
+ }
+ dbg("%s - baud rate is being sent as %d", __FUNCTION__, n_baud_rate);
+
+
+ /*
+ * This algorithm accredited to Jiang Jay Zhang... thanks for all the help!
+ */
+ for (i = 0; i < 4; ++i) {
+ feature_buffer[i] = ( n_baud_rate >> (i*8) & 0xFF );
+ }
+
+ config = 0; // reset config byte
+ config |= data_bits; // assign data bits in 2 bit space ( max 3 )
+ /* 1 bit gap */
+ config |= (stop_bits << 3); // assign stop bits in 1 bit space
+ config |= (parity_enable << 4); // assign parity flag in 1 bit space
+ config |= (parity_type << 5); // assign parity type in 1 bit space
+ /* 1 bit gap */
+ config |= (reset << 7); // assign reset at end of byte, 1 bit space
+
+ feature_buffer[4] = config;
+
+ dbg("%s - device is being sent this feature report:", __FUNCTION__);
+ dbg("%s - %02X - %02X - %02X - %02X - %02X", __FUNCTION__, feature_buffer[0], feature_buffer[1],
+ feature_buffer[2], feature_buffer[3], feature_buffer[4]);
+
+ retval = usb_control_msg (port->serial->dev, usb_sndctrlpipe(port->serial->dev, 0),
+ HID_REQ_SET_REPORT, USB_DIR_OUT | USB_RECIP_INTERFACE | USB_TYPE_CLASS,
+ 0x0300, 0, feature_buffer, 5, 500);
+
+ if (retval != 5)
+ err("%s - failed sending serial line settings - %d", __FUNCTION__, retval);
+ else {
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->baud_rate = n_baud_rate;
+ priv->cbr_mask = baud_mask;
+ priv->current_config = config;
+ ++priv->cmd_count;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ }
+ break;
+ case CYPRESS_GET_CONFIG:
+ dbg("%s - retreiving serial line settings", __FUNCTION__);
+ /* reset values in feature buffer */
+ memset(feature_buffer, 0, 5);
+
+ retval = usb_control_msg (port->serial->dev, usb_rcvctrlpipe(port->serial->dev, 0),
+ HID_REQ_GET_REPORT, USB_DIR_IN | USB_RECIP_INTERFACE | USB_TYPE_CLASS,
+ 0x0300, 0, feature_buffer, 5, 500);
+ if (retval != 5) {
+ err("%s - failed to retreive serial line settings - %d", __FUNCTION__, retval);
+ return retval;
+ } else {
+ spin_lock_irqsave(&priv->lock, flags);
+ /* store the config in one byte, and later use bit masks to check values */
+ priv->current_config = feature_buffer[4];
+ /* reverse the process above to get the baud_mask value */
+ n_baud_rate = 0; // reset bits
+ for (i = 0; i < 4; ++i) {
+ n_baud_rate |= ( feature_buffer[i] << (i*8) );
+ }
+
+ priv->baud_rate = n_baud_rate;
+ if ( (priv->cbr_mask = rate_to_mask(n_baud_rate)) == 0x40)
+ dbg("%s - failed setting the baud mask (not defined)", __FUNCTION__);
+ ++priv->cmd_count;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ }
+ break;
+ default:
+ err("%s - unsupported serial control command issued", __FUNCTION__);
+ }
+ return retval;
+} /* cypress_serial_control */
+
+
+/* given a baud mask, it will return speed on success */
+static int mask_to_rate (unsigned mask)
+{
+ int rate;
+
+ switch (mask) {
+ case B0: rate = 0; break;
+ case B300: rate = 300; break;
+ case B600: rate = 600; break;
+ case B1200: rate = 1200; break;
+ case B2400: rate = 2400; break;
+ case B4800: rate = 4800; break;
+ case B9600: rate = 9600; break;
+ case B19200: rate = 19200; break;
+ case B38400: rate = 38400; break;
+ case B57600: rate = 57600; break;
+ case B115200: rate = 115200; break;
+ default: rate = -1;
+ }
+
+ return rate;
+}
+
+
+static unsigned rate_to_mask (int rate)
+{
+ unsigned mask;
+
+ switch (rate) {
+ case 0: mask = B0; break;
+ case 300: mask = B300; break;
+ case 600: mask = B600; break;
+ case 1200: mask = B1200; break;
+ case 2400: mask = B2400; break;
+ case 4800: mask = B4800; break;
+ case 9600: mask = B9600; break;
+ case 19200: mask = B19200; break;
+ case 38400: mask = B38400; break;
+ case 57600: mask = B57600; break;
+ case 115200: mask = B115200; break;
+ default: mask = 0x40;
+ }
+
+ return mask;
+}
+/*****************************************************************************
+ * Cypress serial driver functions
+ *****************************************************************************/
+
+
+static int generic_startup (struct usb_serial *serial)
+{
+ struct cypress_private *priv;
+
+ dbg("%s - port %d", __FUNCTION__, serial->port[0]->number);
+
+ priv = kmalloc(sizeof (struct cypress_private), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ memset(priv, 0x00, sizeof (struct cypress_private));
+ spin_lock_init(&priv->lock);
+ priv->buf = cypress_buf_alloc(CYPRESS_BUF_SIZE);
+ if (priv->buf == NULL) {
+ kfree(priv);
+ return -ENOMEM;
+ }
+ init_waitqueue_head(&priv->delta_msr_wait);
+
+ usb_reset_configuration (serial->dev);
+
+ priv->cmd_ctrl = 0;
+ priv->line_control = 0;
+ priv->termios_initialized = 0;
+ priv->calledfromopen = 0;
+ priv->rx_flags = 0;
+ usb_set_serial_port_data(serial->port[0], priv);
+
+ return (0);
+}
+
+
+static int cypress_earthmate_startup (struct usb_serial *serial)
+{
+ struct cypress_private *priv;
+
+ dbg("%s", __FUNCTION__);
+
+ if (generic_startup(serial)) {
+ dbg("%s - Failed setting up port %d", __FUNCTION__, serial->port[0]->number);
+ return 1;
+ }
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ priv->chiptype = CT_EARTHMATE;
+
+ return (0);
+} /* cypress_earthmate_startup */
+
+
+static int cypress_hidcom_startup (struct usb_serial *serial)
+{
+ struct cypress_private *priv;
+
+ dbg("%s", __FUNCTION__);
+
+ if (generic_startup(serial)) {
+ dbg("%s - Failed setting up port %d", __FUNCTION__, serial->port[0]->number);
+ return 1;
+ }
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ priv->chiptype = CT_CYPHIDCOM;
+
+ return (0);
+} /* cypress_hidcom_startup */
+
+
+static void cypress_shutdown (struct usb_serial *serial)
+{
+ struct cypress_private *priv;
+
+ dbg ("%s - port %d", __FUNCTION__, serial->port[0]->number);
+
+ /* all open ports are closed at this point */
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+
+ if (priv) {
+ cypress_buf_free(priv->buf);
+ kfree(priv);
+ usb_set_serial_port_data(serial->port[0], NULL);
+ }
+}
+
+
+static int cypress_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ struct usb_serial *serial = port->serial;
+ unsigned long flags;
+ int result = 0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /* clear halts before open */
+ usb_clear_halt(serial->dev, 0x00);
+ usb_clear_halt(serial->dev, 0x81);
+ usb_clear_halt(serial->dev, 0x02);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ /* reset read/write statistics */
+ priv->bytes_in = 0;
+ priv->bytes_out = 0;
+ priv->cmd_count = 0;
+ priv->rx_flags = 0;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /* setting to zero could cause data loss */
+ port->tty->low_latency = 1;
+
+ /* raise both lines and set termios */
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->line_control = CONTROL_DTR | CONTROL_RTS;
+ priv->calledfromopen = 1;
+ priv->cmd_ctrl = 1;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ result = cypress_write(port, NULL, 0);
+
+ if (result) {
+ dev_err(&port->dev, "%s - failed setting the control lines - error %d\n", __FUNCTION__, result);
+ return result;
+ } else
+ dbg("%s - success setting the control lines", __FUNCTION__);
+
+ cypress_set_termios(port, &priv->tmp_termios);
+
+ /* setup the port and start reading from the device */
+ if(!port->interrupt_in_urb){
+ err("%s - interrupt_in_urb is empty!", __FUNCTION__);
+ return(-1);
+ }
+
+ usb_fill_int_urb(port->interrupt_in_urb, serial->dev,
+ usb_rcvintpipe(serial->dev, port->interrupt_in_endpointAddress),
+ port->interrupt_in_urb->transfer_buffer, port->interrupt_in_urb->transfer_buffer_length,
+ cypress_read_int_callback, port, port->interrupt_in_urb->interval);
+ result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
+
+ if (result){
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+ }
+
+ return result;
+} /* cypress_open */
+
+
+static void cypress_close(struct usb_serial_port *port, struct file * filp)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ unsigned int c_cflag;
+ unsigned long flags;
+ int bps;
+ long timeout;
+ wait_queue_t wait;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /* wait for data to drain from buffer */
+ spin_lock_irqsave(&priv->lock, flags);
+ timeout = CYPRESS_CLOSING_WAIT;
+ init_waitqueue_entry(&wait, current);
+ add_wait_queue(&port->tty->write_wait, &wait);
+ for (;;) {
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (cypress_buf_data_avail(priv->buf) == 0
+ || timeout == 0 || signal_pending(current)
+ || !usb_get_intfdata(port->serial->interface))
+ break;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ timeout = schedule_timeout(timeout);
+ spin_lock_irqsave(&priv->lock, flags);
+ }
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&port->tty->write_wait, &wait);
+ /* clear out any remaining data in the buffer */
+ cypress_buf_clear(priv->buf);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /* wait for characters to drain from device */
+ bps = tty_get_baud_rate(port->tty);
+ if (bps > 1200)
+ timeout = max((HZ*2560)/bps,HZ/10);
+ else
+ timeout = 2*HZ;
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(timeout);
+
+ dbg("%s - stopping urbs", __FUNCTION__);
+ usb_kill_urb (port->interrupt_in_urb);
+ usb_kill_urb (port->interrupt_out_urb);
+
+ if (port->tty) {
+ c_cflag = port->tty->termios->c_cflag;
+ if (c_cflag & HUPCL) {
+ /* drop dtr and rts */
+ priv = usb_get_serial_port_data(port);
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->line_control = 0;
+ priv->cmd_ctrl = 1;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ cypress_write(port, NULL, 0);
+ }
+ }
+
+ if (stats)
+ dev_info (&port->dev, "Statistics: %d Bytes In | %d Bytes Out | %d Commands Issued\n",
+ priv->bytes_in, priv->bytes_out, priv->cmd_count);
+} /* cypress_close */
+
+
+static int cypress_write(struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count);
+
+ /* line control commands, which need to be executed immediately,
+ are not put into the buffer for obvious reasons.
+ */
+ if (priv->cmd_ctrl) {
+ count = 0;
+ goto finish;
+ }
+
+ if (!count)
+ return count;
+
+ spin_lock_irqsave(&priv->lock, flags);
+ count = cypress_buf_put(priv->buf, buf, count);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+finish:
+ cypress_send(port);
+
+ return count;
+} /* cypress_write */
+
+
+static void cypress_send(struct usb_serial_port *port)
+{
+ int count = 0, result, offset, actual_size;
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ dbg("%s - interrupt out size is %d", __FUNCTION__, port->interrupt_out_size);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ if (priv->write_urb_in_use) {
+ dbg("%s - can't write, urb in use", __FUNCTION__);
+ spin_unlock_irqrestore(&priv->lock, flags);
+ return;
+ }
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /* clear buffer */
+ memset(port->interrupt_out_urb->transfer_buffer, 0, port->interrupt_out_size);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ switch (port->interrupt_out_size) {
+ case 32:
+ // this is for the CY7C64013...
+ offset = 2;
+ port->interrupt_out_buffer[0] = priv->line_control;
+ break;
+ case 8:
+ // this is for the CY7C63743...
+ offset = 1;
+ port->interrupt_out_buffer[0] = priv->line_control;
+ break;
+ default:
+ dbg("%s - wrong packet size", __FUNCTION__);
+ spin_unlock_irqrestore(&priv->lock, flags);
+ return;
+ }
+
+ if (priv->line_control & CONTROL_RESET)
+ priv->line_control &= ~CONTROL_RESET;
+
+ if (priv->cmd_ctrl) {
+ priv->cmd_count++;
+ dbg("%s - line control command being issued", __FUNCTION__);
+ spin_unlock_irqrestore(&priv->lock, flags);
+ goto send;
+ } else
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ count = cypress_buf_get(priv->buf, &port->interrupt_out_buffer[offset],
+ port->interrupt_out_size-offset);
+
+ if (count == 0) {
+ return;
+ }
+
+ switch (port->interrupt_out_size) {
+ case 32:
+ port->interrupt_out_buffer[1] = count;
+ break;
+ case 8:
+ port->interrupt_out_buffer[0] |= count;
+ }
+
+ dbg("%s - count is %d", __FUNCTION__, count);
+
+send:
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->write_urb_in_use = 1;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ if (priv->cmd_ctrl)
+ actual_size = 1;
+ else
+ actual_size = count + (port->interrupt_out_size == 32 ? 2 : 1);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, port->interrupt_out_size,
+ port->interrupt_out_urb->transfer_buffer);
+
+ port->interrupt_out_urb->transfer_buffer_length = actual_size;
+ port->interrupt_out_urb->dev = port->serial->dev;
+ result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC);
+ if (result) {
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__,
+ result);
+ priv->write_urb_in_use = 0;
+ }
+
+ spin_lock_irqsave(&priv->lock, flags);
+ if (priv->cmd_ctrl) {
+ priv->cmd_ctrl = 0;
+ }
+ priv->bytes_out += count; /* do not count the line control and size bytes */
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ schedule_work(&port->work);
+} /* cypress_send */
+
+
+/* returns how much space is available in the soft buffer */
+static int cypress_write_room(struct usb_serial_port *port)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ int room = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ room = cypress_buf_space_avail(priv->buf);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, room);
+ return room;
+}
+
+
+static int cypress_tiocmget (struct usb_serial_port *port, struct file *file)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ __u8 status, control;
+ unsigned int result = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ control = priv->line_control;
+ status = priv->current_status;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0)
+ | ((control & CONTROL_RTS) ? TIOCM_RTS : 0)
+ | ((status & UART_CTS) ? TIOCM_CTS : 0)
+ | ((status & UART_DSR) ? TIOCM_DSR : 0)
+ | ((status & UART_RI) ? TIOCM_RI : 0)
+ | ((status & UART_CD) ? TIOCM_CD : 0);
+
+ dbg("%s - result = %x", __FUNCTION__, result);
+
+ return result;
+}
+
+
+static int cypress_tiocmset (struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ if (set & TIOCM_RTS)
+ priv->line_control |= CONTROL_RTS;
+ if (set & TIOCM_DTR)
+ priv->line_control |= CONTROL_DTR;
+ if (clear & TIOCM_RTS)
+ priv->line_control &= ~CONTROL_RTS;
+ if (clear & TIOCM_DTR)
+ priv->line_control &= ~CONTROL_DTR;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ priv->cmd_ctrl = 1;
+ return cypress_write(port, NULL, 0);
+}
+
+
+static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+
+ dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
+
+ switch (cmd) {
+ case TIOCGSERIAL:
+ if (copy_to_user((void __user *)arg, port->tty->termios, sizeof(struct termios))) {
+ return -EFAULT;
+ }
+ return (0);
+ break;
+ case TIOCSSERIAL:
+ if (copy_from_user(port->tty->termios, (void __user *)arg, sizeof(struct termios))) {
+ return -EFAULT;
+ }
+ /* here we need to call cypress_set_termios to invoke the new settings */
+ cypress_set_termios(port, &priv->tmp_termios);
+ return (0);
+ break;
+ /* these are called when setting baud rate from gpsd */
+ case TCGETS:
+ if (copy_to_user((void __user *)arg, port->tty->termios, sizeof(struct termios))) {
+ return -EFAULT;
+ }
+ return (0);
+ break;
+ case TCSETS:
+ if (copy_from_user(port->tty->termios, (void __user *)arg, sizeof(struct termios))) {
+ return -EFAULT;
+ }
+ /* here we need to call cypress_set_termios to invoke the new settings */
+ cypress_set_termios(port, &priv->tmp_termios);
+ return (0);
+ break;
+ /* This code comes from drivers/char/serial.c and ftdi_sio.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 & UART_RI)) ||
+ ((arg & TIOCM_DSR) && (diff & UART_DSR)) ||
+ ((arg & TIOCM_CD) && (diff & UART_CD)) ||
+ ((arg & TIOCM_CTS) && (diff & UART_CTS)) ) {
+ return 0;
+ }
+ /* otherwise caller can't care less about what happened,
+ * and so we continue to wait for more events.
+ */
+ }
+ }
+ return 0;
+ break;
+ default:
+ break;
+ }
+
+ dbg("%s - arg not supported - it was 0x%04x - check include/asm/ioctls.h", __FUNCTION__, cmd);
+
+ return -ENOIOCTLCMD;
+} /* cypress_ioctl */
+
+
+static void cypress_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ struct tty_struct *tty;
+ int data_bits, stop_bits, parity_type, parity_enable;
+ unsigned cflag, iflag, baud_mask;
+ unsigned long flags;
+ __u8 oldlines;
+ int linechange;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ tty = port->tty;
+ if ((!tty) || (!tty->termios)) {
+ dbg("%s - no tty structures", __FUNCTION__);
+ return;
+ }
+
+ spin_lock_irqsave(&priv->lock, flags);
+ if (!priv->termios_initialized) {
+ if (priv->chiptype == CT_EARTHMATE) {
+ *(tty->termios) = tty_std_termios;
+ tty->termios->c_cflag = B4800 | CS8 | CREAD | HUPCL | CLOCAL;
+ } else if (priv->chiptype == CT_CYPHIDCOM) {
+ *(tty->termios) = tty_std_termios;
+ tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+ }
+ priv->termios_initialized = 1;
+ }
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ cflag = tty->termios->c_cflag;
+ iflag = tty->termios->c_iflag;
+
+ /* check if there are new settings */
+ if (old_termios) {
+ if ((cflag != old_termios->c_cflag) ||
+ (RELEVANT_IFLAG(iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) {
+ dbg("%s - attempting to set new termios settings", __FUNCTION__);
+ /* should make a copy of this in case something goes wrong in the function, we can restore it */
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->tmp_termios = *(tty->termios);
+ spin_unlock_irqrestore(&priv->lock, flags);
+ } else {
+ dbg("%s - nothing to do, exiting", __FUNCTION__);
+ return;
+ }
+ } else
+ return;
+
+ /* set number of data bits, parity, stop bits */
+ /* when parity is disabled the parity type bit is ignored */
+
+ stop_bits = cflag & CSTOPB ? 1 : 0; /* 1 means 2 stop bits, 0 means 1 stop bit */
+
+ if (cflag & PARENB) {
+ parity_enable = 1;
+ parity_type = cflag & PARODD ? 1 : 0; /* 1 means odd parity, 0 means even parity */
+ } else
+ parity_enable = parity_type = 0;
+
+ if (cflag & CSIZE) {
+ switch (cflag & CSIZE) {
+ case CS5: data_bits = 0; break;
+ case CS6: data_bits = 1; break;
+ case CS7: data_bits = 2; break;
+ case CS8: data_bits = 3; break;
+ default: err("%s - CSIZE was set, but not CS5-CS8", __FUNCTION__); data_bits = 3;
+ }
+ } else
+ data_bits = 3;
+
+ spin_lock_irqsave(&priv->lock, flags);
+ oldlines = priv->line_control;
+ if ((cflag & CBAUD) == B0) {
+ /* drop dtr and rts */
+ dbg("%s - dropping the lines, baud rate 0bps", __FUNCTION__);
+ baud_mask = B0;
+ priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
+ } else {
+ baud_mask = (cflag & CBAUD);
+ switch(baud_mask) {
+ case B300: dbg("%s - setting baud 300bps", __FUNCTION__); break;
+ case B600: dbg("%s - setting baud 600bps", __FUNCTION__); break;
+ case B1200: dbg("%s - setting baud 1200bps", __FUNCTION__); break;
+ case B2400: dbg("%s - setting baud 2400bps", __FUNCTION__); break;
+ case B4800: dbg("%s - setting baud 4800bps", __FUNCTION__); break;
+ case B9600: dbg("%s - setting baud 9600bps", __FUNCTION__); break;
+ case B19200: dbg("%s - setting baud 19200bps", __FUNCTION__); break;
+ case B38400: dbg("%s - setting baud 38400bps", __FUNCTION__); break;
+ case B57600: dbg("%s - setting baud 57600bps", __FUNCTION__); break;
+ case B115200: dbg("%s - setting baud 115200bps", __FUNCTION__); break;
+ default: dbg("%s - unknown masked baud rate", __FUNCTION__);
+ }
+ priv->line_control |= CONTROL_DTR;
+
+ /* toggle CRTSCTS? - don't do this if being called from cypress_open */
+ if (!priv->calledfromopen) {
+ if (cflag & CRTSCTS)
+ priv->line_control |= CONTROL_RTS;
+ else
+ priv->line_control &= ~CONTROL_RTS;
+ }
+ }
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ dbg("%s - sending %d stop_bits, %d parity_enable, %d parity_type, %d data_bits (+5)", __FUNCTION__,
+ stop_bits, parity_enable, parity_type, data_bits);
+
+ cypress_serial_control(port, baud_mask, data_bits, stop_bits, parity_enable,
+ parity_type, 0, CYPRESS_SET_CONFIG);
+
+ msleep(50); /* give some time between change and read (50ms) */
+
+ /* we perform a CYPRESS_GET_CONFIG so that the current settings are filled into the private structure
+ * this should confirm that all is working if it returns what we just set */
+ cypress_serial_control(port, 0, 0, 0, 0, 0, 0, CYPRESS_GET_CONFIG);
+
+ /* Here we can define custom tty settings for devices
+ *
+ * the main tty termios flag base comes from empeg.c
+ */
+
+ spin_lock_irqsave(&priv->lock, flags);
+ if ( (priv->chiptype == CT_EARTHMATE) && (priv->baud_rate == 4800) ) {
+
+ dbg("Using custom termios settings for a baud rate of 4800bps.");
+ /* define custom termios settings for NMEA protocol */
+
+
+ tty->termios->c_iflag /* input modes - */
+ &= ~(IGNBRK /* disable ignore break */
+ | BRKINT /* disable break causes interrupt */
+ | PARMRK /* disable mark parity errors */
+ | ISTRIP /* disable clear high bit of input characters */
+ | INLCR /* disable translate NL to CR */
+ | IGNCR /* disable ignore CR */
+ | ICRNL /* disable translate CR to NL */
+ | IXON); /* disable enable XON/XOFF flow control */
+
+ tty->termios->c_oflag /* output modes */
+ &= ~OPOST; /* disable postprocess output characters */
+
+ tty->termios->c_lflag /* line discipline modes */
+ &= ~(ECHO /* disable echo input characters */
+ | ECHONL /* disable echo new line */
+ | ICANON /* disable erase, kill, werase, and rprnt special characters */
+ | ISIG /* disable interrupt, quit, and suspend special characters */
+ | IEXTEN); /* disable non-POSIX special characters */
+
+ } else if (priv->chiptype == CT_CYPHIDCOM) {
+
+ // Software app handling it for device...
+
+ }
+ linechange = (priv->line_control != oldlines);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /* if necessary, set lines */
+ if (!priv->calledfromopen && linechange) {
+ priv->cmd_ctrl = 1;
+ cypress_write(port, NULL, 0);
+ }
+
+ if (priv->calledfromopen)
+ priv->calledfromopen = 0;
+
+} /* cypress_set_termios */
+
+
+/* returns amount of data still left in soft buffer */
+static int cypress_chars_in_buffer(struct usb_serial_port *port)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ int chars = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ chars = cypress_buf_data_avail(priv->buf);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, chars);
+ return chars;
+}
+
+
+static void cypress_throttle (struct usb_serial_port *port)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->rx_flags = THROTTLED;
+ spin_unlock_irqrestore(&priv->lock, flags);
+}
+
+
+static void cypress_unthrottle (struct usb_serial_port *port)
+{
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ int actually_throttled, result;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
+ priv->rx_flags = 0;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ if (actually_throttled) {
+ port->interrupt_in_urb->dev = port->serial->dev;
+
+ result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+ }
+}
+
+
+static void cypress_read_int_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+ unsigned long flags;
+ char tty_flag = TTY_NORMAL;
+ int havedata = 0;
+ int bytes = 0;
+ int result;
+ int i = 0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero read status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ spin_lock_irqsave(&priv->lock, flags);
+ if (priv->rx_flags & THROTTLED) {
+ dbg("%s - now throttling", __FUNCTION__);
+ priv->rx_flags |= ACTUALLY_THROTTLED;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ return;
+ }
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ tty = port->tty;
+ if (!tty) {
+ dbg("%s - bad tty pointer - exiting", __FUNCTION__);
+ return;
+ }
+
+ spin_lock_irqsave(&priv->lock, flags);
+ switch(urb->actual_length) {
+ case 32:
+ // This is for the CY7C64013...
+ priv->current_status = data[0] & 0xF8;
+ bytes = data[1]+2;
+ i=2;
+ if (bytes > 2)
+ havedata = 1;
+ break;
+ case 8:
+ // This is for the CY7C63743...
+ priv->current_status = data[0] & 0xF8;
+ bytes = (data[0] & 0x07)+1;
+ i=1;
+ if (bytes > 1)
+ havedata = 1;
+ break;
+ default:
+ dbg("%s - wrong packet size - received %d bytes", __FUNCTION__, urb->actual_length);
+ spin_unlock_irqrestore(&priv->lock, flags);
+ goto continue_read;
+ }
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ usb_serial_debug_data (debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ /* check to see if status has changed */
+ if (priv != NULL) {
+ if (priv->current_status != priv->prev_status) {
+ priv->diff_status |= priv->current_status ^ priv->prev_status;
+ wake_up_interruptible(&priv->delta_msr_wait);
+ priv->prev_status = priv->current_status;
+ }
+ }
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /* hangup, as defined in acm.c... this might be a bad place for it though */
+ if (tty && !(tty->termios->c_cflag & CLOCAL) && !(priv->current_status & UART_CD)) {
+ dbg("%s - calling hangup", __FUNCTION__);
+ tty_hangup(tty);
+ goto continue_read;
+ }
+
+ /* There is one error bit... I'm assuming it is a parity error indicator
+ * as the generic firmware will set this bit to 1 if a parity error occurs.
+ * I can not find reference to any other error events.
+ *
+ */
+ spin_lock_irqsave(&priv->lock, flags);
+ if (priv->current_status & CYP_ERROR) {
+ spin_unlock_irqrestore(&priv->lock, flags);
+ tty_flag = TTY_PARITY;
+ dbg("%s - Parity Error detected", __FUNCTION__);
+ } else
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /* process read if there is data other than line status */
+ if (tty && (bytes > i)) {
+ for (; i < bytes ; ++i) {
+ dbg("pushing byte number %d - %d - %c",i,data[i],data[i]);
+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ tty_insert_flip_char(tty, data[i], tty_flag);
+ }
+ tty_flip_buffer_push(port->tty);
+ }
+
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->bytes_in += bytes; /* control and status byte(s) are also counted */
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+continue_read:
+
+ /* Continue trying to always read... unless the port has closed. */
+
+ if (port->open_count > 0) {
+ usb_fill_int_urb(port->interrupt_in_urb, port->serial->dev,
+ usb_rcvintpipe(port->serial->dev, port->interrupt_in_endpointAddress),
+ port->interrupt_in_urb->transfer_buffer,
+ port->interrupt_in_urb->transfer_buffer_length,
+ cypress_read_int_callback, port,
+ port->interrupt_in_urb->interval);
+ result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ }
+
+ return;
+} /* cypress_read_int_callback */
+
+
+static void cypress_write_int_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct cypress_private *priv = usb_get_serial_port_data(port);
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ priv->write_urb_in_use = 0;
+ return;
+ default:
+ /* error in the urb, so we have to resubmit it */
+ dbg("%s - Overflow in write", __FUNCTION__);
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+ port->interrupt_out_urb->transfer_buffer_length = 1;
+ port->interrupt_out_urb->dev = port->serial->dev;
+ result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n",
+ __FUNCTION__, result);
+ else
+ return;
+ }
+
+ priv->write_urb_in_use = 0;
+
+ /* send any buffered data */
+ cypress_send(port);
+}
+
+
+/*****************************************************************************
+ * Write buffer functions - buffering code from pl2303 used
+ *****************************************************************************/
+
+/*
+ * cypress_buf_alloc
+ *
+ * Allocate a circular buffer and all associated memory.
+ */
+
+static struct cypress_buf *cypress_buf_alloc(unsigned int size)
+{
+
+ struct cypress_buf *cb;
+
+
+ if (size == 0)
+ return NULL;
+
+ cb = (struct cypress_buf *)kmalloc(sizeof(struct cypress_buf), GFP_KERNEL);
+ if (cb == NULL)
+ return NULL;
+
+ cb->buf_buf = kmalloc(size, GFP_KERNEL);
+ if (cb->buf_buf == NULL) {
+ kfree(cb);
+ return NULL;
+ }
+
+ cb->buf_size = size;
+ cb->buf_get = cb->buf_put = cb->buf_buf;
+
+ return cb;
+
+}
+
+
+/*
+ * cypress_buf_free
+ *
+ * Free the buffer and all associated memory.
+ */
+
+static void cypress_buf_free(struct cypress_buf *cb)
+{
+ if (cb != NULL) {
+ if (cb->buf_buf != NULL)
+ kfree(cb->buf_buf);
+ kfree(cb);
+ }
+}
+
+
+/*
+ * cypress_buf_clear
+ *
+ * Clear out all data in the circular buffer.
+ */
+
+static void cypress_buf_clear(struct cypress_buf *cb)
+{
+ if (cb != NULL)
+ cb->buf_get = cb->buf_put;
+ /* equivalent to a get of all data available */
+}
+
+
+/*
+ * cypress_buf_data_avail
+ *
+ * Return the number of bytes of data available in the circular
+ * buffer.
+ */
+
+static unsigned int cypress_buf_data_avail(struct cypress_buf *cb)
+{
+ if (cb != NULL)
+ return ((cb->buf_size + cb->buf_put - cb->buf_get) % cb->buf_size);
+ else
+ return 0;
+}
+
+
+/*
+ * cypress_buf_space_avail
+ *
+ * Return the number of bytes of space available in the circular
+ * buffer.
+ */
+
+static unsigned int cypress_buf_space_avail(struct cypress_buf *cb)
+{
+ if (cb != NULL)
+ return ((cb->buf_size + cb->buf_get - cb->buf_put - 1) % cb->buf_size);
+ else
+ return 0;
+}
+
+
+/*
+ * cypress_buf_put
+ *
+ * Copy data data from a user buffer and put it into the circular buffer.
+ * Restrict to the amount of space available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static unsigned int cypress_buf_put(struct cypress_buf *cb, const char *buf,
+ unsigned int count)
+{
+
+ unsigned int len;
+
+
+ if (cb == NULL)
+ return 0;
+
+ len = cypress_buf_space_avail(cb);
+ if (count > len)
+ count = len;
+
+ if (count == 0)
+ return 0;
+
+ len = cb->buf_buf + cb->buf_size - cb->buf_put;
+ if (count > len) {
+ memcpy(cb->buf_put, buf, len);
+ memcpy(cb->buf_buf, buf+len, count - len);
+ cb->buf_put = cb->buf_buf + count - len;
+ } else {
+ memcpy(cb->buf_put, buf, count);
+ if (count < len)
+ cb->buf_put += count;
+ else /* count == len */
+ cb->buf_put = cb->buf_buf;
+ }
+
+ return count;
+
+}
+
+
+/*
+ * cypress_buf_get
+ *
+ * Get data from the circular buffer and copy to the given buffer.
+ * Restrict to the amount of data available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf,
+ unsigned int count)
+{
+
+ unsigned int len;
+
+
+ if (cb == NULL)
+ return 0;
+
+ len = cypress_buf_data_avail(cb);
+ if (count > len)
+ count = len;
+
+ if (count == 0)
+ return 0;
+
+ len = cb->buf_buf + cb->buf_size - cb->buf_get;
+ if (count > len) {
+ memcpy(buf, cb->buf_get, len);
+ memcpy(buf+len, cb->buf_buf, count - len);
+ cb->buf_get = cb->buf_buf + count - len;
+ } else {
+ memcpy(buf, cb->buf_get, count);
+ if (count < len)
+ cb->buf_get += count;
+ else /* count == len */
+ cb->buf_get = cb->buf_buf;
+ }
+
+ return count;
+
+}
+
+/*****************************************************************************
+ * Module functions
+ *****************************************************************************/
+
+static int __init cypress_init(void)
+{
+ int retval;
+
+ dbg("%s", __FUNCTION__);
+
+ retval = usb_serial_register(&cypress_earthmate_device);
+ if (retval)
+ goto failed_em_register;
+ retval = usb_serial_register(&cypress_hidcom_device);
+ if (retval)
+ goto failed_hidcom_register;
+ retval = usb_register(&cypress_driver);
+ if (retval)
+ goto failed_usb_register;
+
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+failed_usb_register:
+ usb_deregister(&cypress_driver);
+failed_hidcom_register:
+ usb_serial_deregister(&cypress_hidcom_device);
+failed_em_register:
+ usb_serial_deregister(&cypress_earthmate_device);
+
+ return retval;
+}
+
+
+static void __exit cypress_exit (void)
+{
+ dbg("%s", __FUNCTION__);
+
+ usb_deregister (&cypress_driver);
+ usb_serial_deregister (&cypress_earthmate_device);
+ usb_serial_deregister (&cypress_hidcom_device);
+}
+
+
+module_init(cypress_init);
+module_exit(cypress_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_VERSION( DRIVER_VERSION );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+module_param(stats, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(stats, "Enable statistics or not");
diff --git a/drivers/usb/serial/cypress_m8.h b/drivers/usb/serial/cypress_m8.h
new file mode 100644
index 000000000000..1012ee6b19ce
--- /dev/null
+++ b/drivers/usb/serial/cypress_m8.h
@@ -0,0 +1,55 @@
+#ifndef CYPRESS_M8_H
+#define CYPRESS_M8_H
+
+/* definitions and function prototypes used for the cypress USB to Serial controller */
+
+/* For sending our feature buffer - controlling serial communication states */
+/* Linux HID has no support for serial devices so we do this through the driver */
+#define HID_REQ_GET_REPORT 0x01
+#define HID_REQ_SET_REPORT 0x09
+
+/* List other cypress USB to Serial devices here, and add them to the id_table */
+
+/* DeLorme Earthmate USB - a GPS device */
+#define VENDOR_ID_DELORME 0x1163
+#define PRODUCT_ID_EARTHMATEUSB 0x0100
+
+/* Cypress HID->COM RS232 Adapter */
+#define VENDOR_ID_CYPRESS 0x04b4
+#define PRODUCT_ID_CYPHIDCOM 0x5500
+/* End of device listing */
+
+/* Used for setting / requesting serial line settings */
+#define CYPRESS_SET_CONFIG 0x01
+#define CYPRESS_GET_CONFIG 0x02
+
+/* Used for throttle control */
+#define THROTTLED 0x1
+#define ACTUALLY_THROTTLED 0x2
+
+/* chiptypes - used in case firmware differs from the generic form ... offering
+ * different baud speeds/etc.
+ */
+
+#define CT_EARTHMATE 0x01
+#define CT_CYPHIDCOM 0x02
+#define CT_GENERIC 0x0F
+/* End of chiptype definitions */
+
+/* RS-232 serial data communication protocol definitions */
+/* these are sent / read at byte 0 of the input/output hid reports */
+/* You can find these values defined in the CY4601 USB to Serial design notes */
+
+#define CONTROL_DTR 0x20 /* data terminal ready - flow control - host to device */
+#define UART_DSR 0x20 /* data set ready - flow control - device to host */
+#define CONTROL_RTS 0x10 /* request to send - flow control - host to device */
+#define UART_CTS 0x10 /* clear to send - flow control - device to host */
+#define UART_RI 0x10 /* ring indicator - modem - device to host */
+#define UART_CD 0x40 /* carrier detect - modem - device to host */
+#define CYP_ERROR 0x08 /* received from input report - device to host */
+/* Note - the below has nothing to to with the "feature report" reset */
+#define CONTROL_RESET 0x08 /* sent with output report - host to device */
+
+/* End of RS-232 protocol definitions */
+
+#endif /* CYPRESS_M8_H */
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
new file mode 100644
index 000000000000..25f92788a6d4
--- /dev/null
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -0,0 +1,2049 @@
+/*
+* Digi AccelePort USB-4 and USB-2 Serial Converters
+*
+* Copyright 2000 by Digi International
+*
+* 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.
+*
+* Shamelessly based on Brian Warner's keyspan_pda.c and Greg Kroah-Hartman's
+* usb-serial driver.
+*
+* 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.
+*
+* (11/01/2000) Adam J. Richter
+* usb_device_id table support
+*
+* (11/01/2000) pberger and borchers
+* -- Turned off the USB_DISABLE_SPD flag for write bulk urbs--it caused
+* USB 4 ports to hang on startup.
+* -- Serialized access to write urbs by adding the dp_write_urb_in_use
+* flag; otherwise, the driver caused SMP system hangs. Watching the
+* urb status is not sufficient.
+*
+* (10/05/2000) gkh
+* -- Fixed bug with urb->dev not being set properly, now that the usb
+* core needs it.
+*
+* (8/8/2000) pberger and borchers
+* -- Fixed close so that
+* - it can timeout while waiting for transmit idle, if needed;
+* - it ignores interrupts when flushing the port, turning
+* of modem signalling, and so on;
+* - it waits for the flush to really complete before returning.
+* -- Read_bulk_callback and write_bulk_callback check for a closed
+* port before using the tty struct or writing to the port.
+* -- The two changes above fix the oops caused by interrupted closes.
+* -- Added interruptible args to write_oob_command and set_modem_signals
+* and added a timeout arg to transmit_idle; needed for fixes to
+* close.
+* -- Added code for rx_throttle and rx_unthrottle so that input flow
+* control works.
+* -- Added code to set overrun, parity, framing, and break errors
+* (untested).
+* -- Set USB_DISABLE_SPD flag for write bulk urbs, so no 0 length
+* bulk writes are done. These hung the Digi USB device. The
+* 0 length bulk writes were a new feature of usb-uhci added in
+* the 2.4.0-test6 kernels.
+* -- Fixed mod inc race in open; do mod inc before sleeping to wait
+* for a close to finish.
+*
+* (7/31/2000) pberger
+* -- Fixed bugs with hardware handshaking:
+* - Added code to set/clear tty->hw_stopped in digi_read_oob_callback()
+* and digi_set_termios()
+* -- Added code in digi_set_termios() to
+* - add conditional in code handling transition from B0 to only
+* set RTS if RTS/CTS flow control is either not in use or if
+* the port is not currently throttled.
+* - handle turning off CRTSCTS.
+*
+* (7/30/2000) borchers
+* -- Added support for more than one Digi USB device by moving
+* globals to a private structure in the pointed to from the
+* usb_serial structure.
+* -- Moved the modem change and transmit idle wait queues into
+* the port private structure, so each port has its own queue
+* rather than sharing global queues.
+* -- Added support for break signals.
+*
+* (7/25/2000) pberger
+* -- Added USB-2 support. Note: the USB-2 supports 3 devices: two
+* serial and a parallel port. The parallel port is implemented
+* as a serial-to-parallel converter. That is, the driver actually
+* presents all three USB-2 interfaces as serial ports, but the third
+* one physically connects to a parallel device. Thus, for example,
+* one could plug a parallel printer into the USB-2's third port,
+* but from the kernel's (and userland's) point of view what's
+* actually out there is a serial device.
+*
+* (7/15/2000) borchers
+* -- Fixed race in open when a close is in progress.
+* -- Keep count of opens and dec the module use count for each
+* outstanding open when shutdown is called (on disconnect).
+* -- Fixed sanity checks in read_bulk_callback and write_bulk_callback
+* so pointers are checked before use.
+* -- Split read bulk callback into in band and out of band
+* callbacks, and no longer restart read chains if there is
+* a status error or a sanity error. This fixed the seg
+* faults and other errors we used to get on disconnect.
+* -- Port->active is once again a flag as usb-serial intended it
+* to be, not a count. Since it was only a char it would
+* have been limited to 256 simultaneous opens. Now the open
+* count is kept in the port private structure in dp_open_count.
+* -- Added code for modularization of the digi_acceleport driver.
+*
+* (6/27/2000) pberger and borchers
+* -- Zeroed out sync field in the wakeup_task before first use;
+* otherwise the uninitialized value might prevent the task from
+* being scheduled.
+* -- Initialized ret value to 0 in write_bulk_callback, otherwise
+* the uninitialized value could cause a spurious debugging message.
+*
+* (6/22/2000) pberger and borchers
+* -- Made cond_wait_... inline--apparently on SPARC the flags arg
+* to spin_lock_irqsave cannot be passed to another function
+* to call spin_unlock_irqrestore. Thanks to Pauline Middelink.
+* -- In digi_set_modem_signals the inner nested spin locks use just
+* spin_lock() rather than spin_lock_irqsave(). The old code
+* mistakenly left interrupts off. Thanks to Pauline Middelink.
+* -- copy_from_user (which can sleep) is no longer called while a
+* spinlock is held. We copy to a local buffer before getting
+* the spinlock--don't like the extra copy but the code is simpler.
+* -- Printk and dbg are no longer called while a spin lock is held.
+*
+* (6/4/2000) pberger and borchers
+* -- Replaced separate calls to spin_unlock_irqrestore and
+* interruptible_sleep_on_timeout with a new function
+* cond_wait_interruptible_timeout_irqrestore. This eliminates
+* the race condition where the wake up could happen after
+* the unlock and before the sleep.
+* -- Close now waits for output to drain.
+* -- Open waits until any close in progress is finished.
+* -- All out of band responses are now processed, not just the
+* first in a USB packet.
+* -- Fixed a bug that prevented the driver from working when the
+* first Digi port was not the first USB serial port--the driver
+* was mistakenly using the external USB serial port number to
+* try to index into its internal ports.
+* -- Fixed an SMP bug -- write_bulk_callback is called directly from
+* an interrupt, so spin_lock_irqsave/spin_unlock_irqrestore are
+* needed for locks outside write_bulk_callback that are also
+* acquired by write_bulk_callback to prevent deadlocks.
+* -- Fixed support for select() by making digi_chars_in_buffer()
+* return 256 when -EINPROGRESS is set, as the line discipline
+* code in n_tty.c expects.
+* -- Fixed an include file ordering problem that prevented debugging
+* messages from working.
+* -- Fixed an intermittent timeout problem that caused writes to
+* sometimes get stuck on some machines on some kernels. It turns
+* out in these circumstances write_chan() (in n_tty.c) was
+* asleep waiting for our wakeup call. Even though we call
+* wake_up_interruptible() in digi_write_bulk_callback(), there is
+* a race condition that could cause the wakeup to fail: if our
+* wake_up_interruptible() call occurs between the time that our
+* driver write routine finishes and write_chan() sets current->state
+* to TASK_INTERRUPTIBLE, the effect of our wakeup setting the state
+* to TASK_RUNNING will be lost and write_chan's subsequent call to
+* schedule() will never return (unless it catches a signal).
+* This race condition occurs because write_bulk_callback() (and thus
+* the wakeup) are called asynchonously from an interrupt, rather than
+* from the scheduler. We can avoid the race by calling the wakeup
+* from the scheduler queue and that's our fix: Now, at the end of
+* write_bulk_callback() we queue up a wakeup call on the scheduler
+* task queue. We still also invoke the wakeup directly since that
+* squeezes a bit more performance out of the driver, and any lost
+* race conditions will get cleaned up at the next scheduler run.
+*
+* NOTE: The problem also goes away if you comment out
+* the two code lines in write_chan() where current->state
+* is set to TASK_RUNNING just before calling driver.write() and to
+* TASK_INTERRUPTIBLE immediately afterwards. This is why the
+* problem did not show up with the 2.2 kernels -- they do not
+* include that code.
+*
+* (5/16/2000) pberger and borchers
+* -- Added timeouts to sleeps, to defend against lost wake ups.
+* -- Handle transition to/from B0 baud rate in digi_set_termios.
+*
+* (5/13/2000) pberger and borchers
+* -- All commands now sent on out of band port, using
+* digi_write_oob_command.
+* -- Get modem control signals whenever they change, support TIOCMGET/
+* SET/BIS/BIC ioctls.
+* -- digi_set_termios now supports parity, word size, stop bits, and
+* receive enable.
+* -- Cleaned up open and close, use digi_set_termios and
+* digi_write_oob_command to set port parameters.
+* -- Added digi_startup_device to start read chains on all ports.
+* -- Write buffer is only used when count==1, to be sure put_char can
+* write a char (unless the buffer is full).
+*
+* (5/10/2000) pberger and borchers
+* -- Added MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT calls on open/close.
+* -- Fixed problem where the first incoming character is lost on
+* port opens after the first close on that port. Now we keep
+* the read_urb chain open until shutdown.
+* -- Added more port conditioning calls in digi_open and digi_close.
+* -- Convert port->active to a use count so that we can deal with multiple
+* opens and closes properly.
+* -- Fixed some problems with the locking code.
+*
+* (5/3/2000) pberger and borchers
+* -- First alpha version of the driver--many known limitations and bugs.
+*
+*
+* Locking and SMP
+*
+* - Each port, including the out-of-band port, has a lock used to
+* serialize all access to the port's private structure.
+* - The port lock is also used to serialize all writes and access to
+* the port's URB.
+* - The port lock is also used for the port write_wait condition
+* variable. Holding the port lock will prevent a wake up on the
+* port's write_wait; this can be used with cond_wait_... to be sure
+* the wake up is not lost in a race when dropping the lock and
+* sleeping waiting for the wakeup.
+* - digi_write() does not sleep, since it is sometimes called on
+* interrupt time.
+* - digi_write_bulk_callback() and digi_read_bulk_callback() are
+* called directly from interrupts. Hence spin_lock_irqsave()
+* and spin_unlock_irqrestore() are used in the rest of the code
+* for any locks they acquire.
+* - digi_write_bulk_callback() gets the port lock before waking up
+* processes sleeping on the port write_wait. It also schedules
+* wake ups so they happen from the scheduler, because the tty
+* system can miss wake ups from interrupts.
+* - All sleeps use a timeout of DIGI_RETRY_TIMEOUT before looping to
+* recheck the condition they are sleeping on. This is defensive,
+* in case a wake up is lost.
+* - Following Documentation/DocBook/kernel-locking.pdf no spin locks
+* are held when calling copy_to/from_user or printk.
+*
+* $Id: digi_acceleport.c,v 1.80.1.2 2000/11/02 05:45:08 root Exp $
+*/
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/workqueue.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include <linux/wait.h>
+#include "usb-serial.h"
+
+/* Defines */
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.80.1.2"
+#define DRIVER_AUTHOR "Peter Berger <pberger@brimson.com>, Al Borchers <borchers@steinerpoint.com>"
+#define DRIVER_DESC "Digi AccelePort USB-2/USB-4 Serial Converter driver"
+
+/* port output buffer length -- must be <= transfer buffer length - 2 */
+/* so we can be sure to send the full buffer in one urb */
+#define DIGI_OUT_BUF_SIZE 8
+
+/* port input buffer length -- must be >= transfer buffer length - 3 */
+/* so we can be sure to hold at least one full buffer from one urb */
+#define DIGI_IN_BUF_SIZE 64
+
+/* retry timeout while sleeping */
+#define DIGI_RETRY_TIMEOUT (HZ/10)
+
+/* timeout while waiting for tty output to drain in close */
+/* this delay is used twice in close, so the total delay could */
+/* be twice this value */
+#define DIGI_CLOSE_TIMEOUT (5*HZ)
+
+
+/* AccelePort USB Defines */
+
+/* ids */
+#define DIGI_VENDOR_ID 0x05c5
+#define DIGI_2_ID 0x0002 /* USB-2 */
+#define DIGI_4_ID 0x0004 /* USB-4 */
+
+/* commands
+ * "INB": can be used on the in-band endpoint
+ * "OOB": can be used on the out-of-band endpoint
+ */
+#define DIGI_CMD_SET_BAUD_RATE 0 /* INB, OOB */
+#define DIGI_CMD_SET_WORD_SIZE 1 /* INB, OOB */
+#define DIGI_CMD_SET_PARITY 2 /* INB, OOB */
+#define DIGI_CMD_SET_STOP_BITS 3 /* INB, OOB */
+#define DIGI_CMD_SET_INPUT_FLOW_CONTROL 4 /* INB, OOB */
+#define DIGI_CMD_SET_OUTPUT_FLOW_CONTROL 5 /* INB, OOB */
+#define DIGI_CMD_SET_DTR_SIGNAL 6 /* INB, OOB */
+#define DIGI_CMD_SET_RTS_SIGNAL 7 /* INB, OOB */
+#define DIGI_CMD_READ_INPUT_SIGNALS 8 /* OOB */
+#define DIGI_CMD_IFLUSH_FIFO 9 /* OOB */
+#define DIGI_CMD_RECEIVE_ENABLE 10 /* INB, OOB */
+#define DIGI_CMD_BREAK_CONTROL 11 /* INB, OOB */
+#define DIGI_CMD_LOCAL_LOOPBACK 12 /* INB, OOB */
+#define DIGI_CMD_TRANSMIT_IDLE 13 /* INB, OOB */
+#define DIGI_CMD_READ_UART_REGISTER 14 /* OOB */
+#define DIGI_CMD_WRITE_UART_REGISTER 15 /* INB, OOB */
+#define DIGI_CMD_AND_UART_REGISTER 16 /* INB, OOB */
+#define DIGI_CMD_OR_UART_REGISTER 17 /* INB, OOB */
+#define DIGI_CMD_SEND_DATA 18 /* INB */
+#define DIGI_CMD_RECEIVE_DATA 19 /* INB */
+#define DIGI_CMD_RECEIVE_DISABLE 20 /* INB */
+#define DIGI_CMD_GET_PORT_TYPE 21 /* OOB */
+
+/* baud rates */
+#define DIGI_BAUD_50 0
+#define DIGI_BAUD_75 1
+#define DIGI_BAUD_110 2
+#define DIGI_BAUD_150 3
+#define DIGI_BAUD_200 4
+#define DIGI_BAUD_300 5
+#define DIGI_BAUD_600 6
+#define DIGI_BAUD_1200 7
+#define DIGI_BAUD_1800 8
+#define DIGI_BAUD_2400 9
+#define DIGI_BAUD_4800 10
+#define DIGI_BAUD_7200 11
+#define DIGI_BAUD_9600 12
+#define DIGI_BAUD_14400 13
+#define DIGI_BAUD_19200 14
+#define DIGI_BAUD_28800 15
+#define DIGI_BAUD_38400 16
+#define DIGI_BAUD_57600 17
+#define DIGI_BAUD_76800 18
+#define DIGI_BAUD_115200 19
+#define DIGI_BAUD_153600 20
+#define DIGI_BAUD_230400 21
+#define DIGI_BAUD_460800 22
+
+/* arguments */
+#define DIGI_WORD_SIZE_5 0
+#define DIGI_WORD_SIZE_6 1
+#define DIGI_WORD_SIZE_7 2
+#define DIGI_WORD_SIZE_8 3
+
+#define DIGI_PARITY_NONE 0
+#define DIGI_PARITY_ODD 1
+#define DIGI_PARITY_EVEN 2
+#define DIGI_PARITY_MARK 3
+#define DIGI_PARITY_SPACE 4
+
+#define DIGI_STOP_BITS_1 0
+#define DIGI_STOP_BITS_2 1
+
+#define DIGI_INPUT_FLOW_CONTROL_XON_XOFF 1
+#define DIGI_INPUT_FLOW_CONTROL_RTS 2
+#define DIGI_INPUT_FLOW_CONTROL_DTR 4
+
+#define DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF 1
+#define DIGI_OUTPUT_FLOW_CONTROL_CTS 2
+#define DIGI_OUTPUT_FLOW_CONTROL_DSR 4
+
+#define DIGI_DTR_INACTIVE 0
+#define DIGI_DTR_ACTIVE 1
+#define DIGI_DTR_INPUT_FLOW_CONTROL 2
+
+#define DIGI_RTS_INACTIVE 0
+#define DIGI_RTS_ACTIVE 1
+#define DIGI_RTS_INPUT_FLOW_CONTROL 2
+#define DIGI_RTS_TOGGLE 3
+
+#define DIGI_FLUSH_TX 1
+#define DIGI_FLUSH_RX 2
+#define DIGI_RESUME_TX 4 /* clears xoff condition */
+
+#define DIGI_TRANSMIT_NOT_IDLE 0
+#define DIGI_TRANSMIT_IDLE 1
+
+#define DIGI_DISABLE 0
+#define DIGI_ENABLE 1
+
+#define DIGI_DEASSERT 0
+#define DIGI_ASSERT 1
+
+/* in band status codes */
+#define DIGI_OVERRUN_ERROR 4
+#define DIGI_PARITY_ERROR 8
+#define DIGI_FRAMING_ERROR 16
+#define DIGI_BREAK_ERROR 32
+
+/* out of band status */
+#define DIGI_NO_ERROR 0
+#define DIGI_BAD_FIRST_PARAMETER 1
+#define DIGI_BAD_SECOND_PARAMETER 2
+#define DIGI_INVALID_LINE 3
+#define DIGI_INVALID_OPCODE 4
+
+/* input signals */
+#define DIGI_READ_INPUT_SIGNALS_SLOT 1
+#define DIGI_READ_INPUT_SIGNALS_ERR 2
+#define DIGI_READ_INPUT_SIGNALS_BUSY 4
+#define DIGI_READ_INPUT_SIGNALS_PE 8
+#define DIGI_READ_INPUT_SIGNALS_CTS 16
+#define DIGI_READ_INPUT_SIGNALS_DSR 32
+#define DIGI_READ_INPUT_SIGNALS_RI 64
+#define DIGI_READ_INPUT_SIGNALS_DCD 128
+
+
+/* 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;
+ unsigned char dp_out_buf[DIGI_OUT_BUF_SIZE];
+ int dp_in_buf_len;
+ unsigned char dp_in_buf[DIGI_IN_BUF_SIZE];
+ unsigned char dp_in_flag_buf[DIGI_IN_BUF_SIZE];
+ int dp_write_urb_in_use;
+ unsigned int dp_modem_signals;
+ wait_queue_head_t dp_modem_change_wait;
+ int dp_transmit_idle;
+ wait_queue_head_t dp_transmit_idle_wait;
+ int dp_throttled;
+ int dp_throttle_restart;
+ wait_queue_head_t dp_flush_wait;
+ int dp_in_close; /* close in progress */
+ wait_queue_head_t dp_close_wait; /* wait queue for close */
+ struct work_struct dp_wakeup_work;
+};
+
+
+/* Local Function Declarations */
+
+static void digi_wakeup_write( struct usb_serial_port *port );
+static void digi_wakeup_write_lock(void *);
+static int digi_write_oob_command( struct usb_serial_port *port,
+ unsigned char *buf, int count, int interruptible );
+static int digi_write_inb_command( struct usb_serial_port *port,
+ unsigned char *buf, int count, unsigned long timeout );
+static int digi_set_modem_signals( struct usb_serial_port *port,
+ unsigned int modem_signals, int interruptible );
+static int digi_transmit_idle( struct usb_serial_port *port,
+ unsigned long timeout );
+static void digi_rx_throttle (struct usb_serial_port *port);
+static void digi_rx_unthrottle (struct usb_serial_port *port);
+static void digi_set_termios( struct usb_serial_port *port,
+ struct termios *old_termios );
+static void digi_break_ctl( struct usb_serial_port *port, int break_state );
+static int digi_ioctl( struct usb_serial_port *port, struct file *file,
+ unsigned int cmd, unsigned long arg );
+static int digi_tiocmget( struct usb_serial_port *port, struct file *file );
+static int digi_tiocmset( struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear );
+static int digi_write( struct usb_serial_port *port, const unsigned char *buf, int count );
+static void digi_write_bulk_callback( struct urb *urb, struct pt_regs *regs );
+static int digi_write_room( struct usb_serial_port *port );
+static int digi_chars_in_buffer( struct usb_serial_port *port );
+static int digi_open( struct usb_serial_port *port, struct file *filp );
+static void digi_close( struct usb_serial_port *port, struct file *filp );
+static int digi_startup_device( struct usb_serial *serial );
+static int digi_startup( struct usb_serial *serial );
+static void digi_shutdown( struct usb_serial *serial );
+static void digi_read_bulk_callback( struct urb *urb, struct pt_regs *regs );
+static int digi_read_inb_callback( struct urb *urb );
+static int digi_read_oob_callback( struct urb *urb );
+
+
+/* Statics */
+
+static int debug;
+
+static struct usb_device_id id_table_combined [] = {
+ { USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) },
+ { USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) },
+ { } /* 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 */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
+static struct usb_driver digi_driver = {
+ .owner = THIS_MODULE,
+ .name = "digi_acceleport",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table_combined,
+};
+
+
+/* device info needed for the Digi serial converter */
+
+static struct usb_serial_device_type digi_acceleport_2_device = {
+ .owner = THIS_MODULE,
+ .name = "Digi 2 port USB adapter",
+ .short_name = "digi_2",
+ .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,
+ .tiocmget = digi_tiocmget,
+ .tiocmset = digi_tiocmset,
+ .attach = digi_startup,
+ .shutdown = digi_shutdown,
+};
+
+static struct usb_serial_device_type digi_acceleport_4_device = {
+ .owner = THIS_MODULE,
+ .name = "Digi 4 port USB adapter",
+ .short_name = "digi_4",
+ .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,
+ .tiocmget = digi_tiocmget,
+ .tiocmset = digi_tiocmset,
+ .attach = digi_startup,
+ .shutdown = digi_shutdown,
+};
+
+
+/* Functions */
+
+/*
+* Cond Wait Interruptible Timeout Irqrestore
+*
+* Do spin_unlock_irqrestore and interruptible_sleep_on_timeout
+* so that wake ups are not lost if they occur between the unlock
+* and the sleep. In other words, spin_unlock_irqrestore and
+* interruptible_sleep_on_timeout are "atomic" with respect to
+* wake ups. This is used to implement condition variables.
+*/
+
+static inline long cond_wait_interruptible_timeout_irqrestore(
+ wait_queue_head_t *q, long timeout,
+ spinlock_t *lock, unsigned long flags )
+{
+ DEFINE_WAIT(wait);
+
+ prepare_to_wait(q, &wait, TASK_UNINTERRUPTIBLE);
+ spin_unlock_irqrestore(lock, flags);
+ timeout = schedule_timeout(timeout);
+ finish_wait(q, &wait);
+
+ return timeout;
+
+}
+
+
+/*
+* Digi Wakeup Write
+*
+* Wake up port, line discipline, and tty processes sleeping
+* on writes.
+*/
+
+static void digi_wakeup_write_lock(void *arg)
+{
+ struct usb_serial_port *port = arg;
+ unsigned long flags;
+ struct digi_port *priv = usb_get_serial_port_data(port);
+
+
+ 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 )
+{
+
+ struct tty_struct *tty = port->tty;
+
+
+ /* wake up port processes */
+ wake_up_interruptible( &port->write_wait );
+
+ /* wake up line discipline */
+ tty_wakeup(tty);
+}
+
+
+/*
+* Digi Write OOB Command
+*
+* Write commands on the out of band port. Commands are 4
+* bytes each, multiple commands can be sent at once, and
+* no command will be split across USB packets. Returns 0
+* if successful, -EINTR if interrupted while sleeping and
+* the interruptible flag is true, or a negative error
+* returned by usb_submit_urb.
+*/
+
+static int digi_write_oob_command( struct usb_serial_port *port,
+ unsigned char *buf, int count, int interruptible )
+{
+
+ int ret = 0;
+ int len;
+ struct usb_serial_port *oob_port = (struct usb_serial_port *)((struct digi_serial *)(usb_get_serial_data(port->serial)))->ds_oob_port;
+ struct digi_port *oob_priv = usb_get_serial_port_data(oob_port);
+ unsigned long flags = 0;
+
+
+dbg( "digi_write_oob_command: TOP: port=%d, count=%d", oob_priv->dp_port_num, count );
+
+ spin_lock_irqsave( &oob_priv->dp_port_lock, flags );
+
+ while( count > 0 ) {
+
+ while( oob_port->write_urb->status == -EINPROGRESS
+ || oob_priv->dp_write_urb_in_use ) {
+ cond_wait_interruptible_timeout_irqrestore(
+ &oob_port->write_wait, DIGI_RETRY_TIMEOUT,
+ &oob_priv->dp_port_lock, flags );
+ if( interruptible && signal_pending(current) ) {
+ return( -EINTR );
+ }
+ spin_lock_irqsave( &oob_priv->dp_port_lock, flags );
+ }
+
+ /* len must be a multiple of 4, so commands are not split */
+ len = min(count, oob_port->bulk_out_size );
+ if( len > 4 )
+ len &= ~3;
+
+ memcpy( oob_port->write_urb->transfer_buffer, buf, len );
+ oob_port->write_urb->transfer_buffer_length = len;
+ oob_port->write_urb->dev = port->serial->dev;
+
+ if( (ret=usb_submit_urb(oob_port->write_urb, GFP_ATOMIC)) == 0 ) {
+ oob_priv->dp_write_urb_in_use = 1;
+ count -= len;
+ buf += len;
+ }
+
+ }
+
+ spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
+
+ if( ret ) {
+ err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__,
+ ret );
+ }
+
+ return( ret );
+
+}
+
+
+/*
+* Digi Write In Band Command
+*
+* Write commands on the given port. Commands are 4
+* bytes each, multiple commands can be sent at once, and
+* no command will be split across USB packets. If timeout
+* is non-zero, write in band command will return after
+* waiting unsuccessfully for the URB status to clear for
+* timeout ticks. Returns 0 if successful, or a negative
+* error returned by digi_write.
+*/
+
+static int digi_write_inb_command( struct usb_serial_port *port,
+ unsigned char *buf, int count, unsigned long timeout )
+{
+
+ int ret = 0;
+ int len;
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ unsigned char *data = port->write_urb->transfer_buffer;
+ unsigned long flags = 0;
+
+
+dbg( "digi_write_inb_command: TOP: port=%d, count=%d", priv->dp_port_num,
+count );
+
+ if( timeout )
+ timeout += jiffies;
+ else
+ timeout = ULONG_MAX;
+
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+
+ 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 );
+ if( signal_pending(current) ) {
+ return( -EINTR );
+ }
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+ }
+
+ /* len must be a multiple of 4 and small enough to */
+ /* guarantee the write will send buffered data first, */
+ /* so commands are in order with data and not split */
+ len = min(count, port->bulk_out_size-2-priv->dp_out_buf_len );
+ if( len > 4 )
+ len &= ~3;
+
+ /* write any buffered data first */
+ if( priv->dp_out_buf_len > 0 ) {
+ data[0] = DIGI_CMD_SEND_DATA;
+ data[1] = priv->dp_out_buf_len;
+ memcpy( data+2, priv->dp_out_buf,
+ priv->dp_out_buf_len );
+ memcpy( data+2+priv->dp_out_buf_len, buf, len );
+ port->write_urb->transfer_buffer_length
+ = priv->dp_out_buf_len+2+len;
+ } else {
+ memcpy( data, buf, len );
+ port->write_urb->transfer_buffer_length = len;
+ }
+ port->write_urb->dev = port->serial->dev;
+
+ if( (ret=usb_submit_urb(port->write_urb, GFP_ATOMIC)) == 0 ) {
+ priv->dp_write_urb_in_use = 1;
+ priv->dp_out_buf_len = 0;
+ count -= len;
+ buf += len;
+ }
+
+ }
+
+ 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 );
+ }
+
+ return( ret );
+
+}
+
+
+/*
+* Digi Set Modem Signals
+*
+* Sets or clears DTR and RTS on the port, according to the
+* modem_signals argument. Use TIOCM_DTR and TIOCM_RTS flags
+* for the modem_signals argument. Returns 0 if successful,
+* -EINTR if interrupted while sleeping, or a non-zero error
+* returned by usb_submit_urb.
+*/
+
+static int digi_set_modem_signals( struct usb_serial_port *port,
+ unsigned int modem_signals, int interruptible )
+{
+
+ int ret;
+ struct digi_port *port_priv = usb_get_serial_port_data(port);
+ struct usb_serial_port *oob_port = (struct usb_serial_port *)((struct digi_serial *)(usb_get_serial_data(port->serial)))->ds_oob_port;
+ struct digi_port *oob_priv = usb_get_serial_port_data(oob_port);
+ unsigned char *data = oob_port->write_urb->transfer_buffer;
+ unsigned long flags = 0;
+
+
+dbg( "digi_set_modem_signals: TOP: port=%d, modem_signals=0x%x",
+port_priv->dp_port_num, modem_signals );
+
+ spin_lock_irqsave( &oob_priv->dp_port_lock, flags );
+ spin_lock( &port_priv->dp_port_lock );
+
+ while( oob_port->write_urb->status == -EINPROGRESS
+ || oob_priv->dp_write_urb_in_use ) {
+ spin_unlock( &port_priv->dp_port_lock );
+ cond_wait_interruptible_timeout_irqrestore(
+ &oob_port->write_wait, DIGI_RETRY_TIMEOUT,
+ &oob_priv->dp_port_lock, flags );
+ if( interruptible && signal_pending(current) ) {
+ return( -EINTR );
+ }
+ spin_lock_irqsave( &oob_priv->dp_port_lock, flags );
+ spin_lock( &port_priv->dp_port_lock );
+ }
+
+ data[0] = DIGI_CMD_SET_DTR_SIGNAL;
+ data[1] = port_priv->dp_port_num;
+ data[2] = (modem_signals&TIOCM_DTR) ?
+ DIGI_DTR_ACTIVE : DIGI_DTR_INACTIVE;
+ data[3] = 0;
+
+ data[4] = DIGI_CMD_SET_RTS_SIGNAL;
+ data[5] = port_priv->dp_port_num;
+ data[6] = (modem_signals&TIOCM_RTS) ?
+ DIGI_RTS_ACTIVE : DIGI_RTS_INACTIVE;
+ data[7] = 0;
+
+ oob_port->write_urb->transfer_buffer_length = 8;
+ oob_port->write_urb->dev = port->serial->dev;
+
+ if( (ret=usb_submit_urb(oob_port->write_urb, GFP_ATOMIC)) == 0 ) {
+ oob_priv->dp_write_urb_in_use = 1;
+ port_priv->dp_modem_signals =
+ (port_priv->dp_modem_signals&~(TIOCM_DTR|TIOCM_RTS))
+ | (modem_signals&(TIOCM_DTR|TIOCM_RTS));
+ }
+
+ spin_unlock( &port_priv->dp_port_lock );
+ spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
+
+ if( ret ) {
+ err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__,
+ ret );
+ }
+
+ return( ret );
+
+}
+
+
+/*
+* Digi Transmit Idle
+*
+* Digi transmit idle waits, up to timeout ticks, for the transmitter
+* to go idle. It returns 0 if successful or a negative error.
+*
+* There are race conditions here if more than one process is calling
+* digi_transmit_idle on the same port at the same time. However, this
+* is only called from close, and only one process can be in close on a
+* port at a time, so its ok.
+*/
+
+static int digi_transmit_idle( struct usb_serial_port *port,
+ unsigned long timeout )
+{
+
+ int ret;
+ unsigned char buf[2];
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ unsigned long flags = 0;
+
+
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+ priv->dp_transmit_idle = 0;
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+
+ buf[0] = DIGI_CMD_TRANSMIT_IDLE;
+ buf[1] = 0;
+
+ timeout += jiffies;
+
+ if( (ret=digi_write_inb_command( port, buf, 2, timeout-jiffies )) != 0 )
+ return( ret );
+
+ 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 );
+ if( signal_pending(current) ) {
+ return( -EINTR );
+ }
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+ }
+
+ priv->dp_transmit_idle = 0;
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+
+ return( 0 );
+
+}
+
+
+static void digi_rx_throttle( struct usb_serial_port *port )
+{
+
+ unsigned long flags;
+ struct digi_port *priv = usb_get_serial_port_data(port);
+
+
+dbg( "digi_rx_throttle: TOP: port=%d", priv->dp_port_num );
+
+ /* stop receiving characters by not resubmitting the read urb */
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+ priv->dp_throttled = 1;
+ priv->dp_throttle_restart = 0;
+ priv->dp_in_buf_len = 0;
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+
+}
+
+
+static void digi_rx_unthrottle( struct usb_serial_port *port )
+{
+
+ int ret = 0;
+ int len;
+ unsigned long flags;
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ struct tty_struct *tty = port->tty;
+
+
+dbg( "digi_rx_unthrottle: TOP: port=%d", priv->dp_port_num );
+
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+
+ /* send any buffered chars from throttle time on to tty subsystem */
+ len = min(priv->dp_in_buf_len, TTY_FLIPBUF_SIZE - tty->flip.count );
+ if( len > 0 ) {
+ memcpy( tty->flip.char_buf_ptr, priv->dp_in_buf, len );
+ memcpy( tty->flip.flag_buf_ptr, priv->dp_in_flag_buf, len );
+ tty->flip.char_buf_ptr += len;
+ tty->flip.flag_buf_ptr += len;
+ tty->flip.count += len;
+ tty_flip_buffer_push( tty );
+ }
+
+ /* restart read chain */
+ if( priv->dp_throttle_restart ) {
+ port->read_urb->dev = port->serial->dev;
+ ret = usb_submit_urb( port->read_urb, GFP_ATOMIC );
+ }
+
+ /* turn throttle off */
+ priv->dp_throttled = 0;
+ priv->dp_in_buf_len = 0;
+ priv->dp_throttle_restart = 0;
+
+ 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 );
+ }
+
+}
+
+
+static void digi_set_termios( struct usb_serial_port *port,
+ struct termios *old_termios )
+{
+
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ 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;
+ unsigned char buf[32];
+ unsigned int modem_signals;
+ int arg,ret;
+ int i = 0;
+
+
+dbg( "digi_set_termios: TOP: port=%d, iflag=0x%x, old_iflag=0x%x, cflag=0x%x, old_cflag=0x%x", priv->dp_port_num, iflag, old_iflag, cflag, old_cflag );
+
+ /* set baud rate */
+ if( (cflag&CBAUD) != (old_cflag&CBAUD) ) {
+
+ arg = -1;
+
+ /* reassert DTR and (maybe) RTS on transition from B0 */
+ if( (old_cflag&CBAUD) == B0 ) {
+ /* don't set RTS if using hardware flow control */
+ /* and throttling input */
+ modem_signals = TIOCM_DTR;
+ if( !(port->tty->termios->c_cflag & CRTSCTS) ||
+ !test_bit(TTY_THROTTLED, &port->tty->flags) ) {
+ modem_signals |= TIOCM_RTS;
+ }
+ digi_set_modem_signals( port, modem_signals, 1 );
+ }
+
+ switch( (cflag&CBAUD) ) {
+ /* drop DTR and RTS on transition to B0 */
+ case B0: digi_set_modem_signals( port, 0, 1 ); break;
+ case B50: arg = DIGI_BAUD_50; break;
+ case B75: arg = DIGI_BAUD_75; break;
+ case B110: arg = DIGI_BAUD_110; break;
+ case B150: arg = DIGI_BAUD_150; break;
+ case B200: arg = DIGI_BAUD_200; break;
+ case B300: arg = DIGI_BAUD_300; break;
+ case B600: arg = DIGI_BAUD_600; break;
+ case B1200: arg = DIGI_BAUD_1200; break;
+ case B1800: arg = DIGI_BAUD_1800; break;
+ case B2400: arg = DIGI_BAUD_2400; break;
+ case B4800: arg = DIGI_BAUD_4800; break;
+ case B9600: arg = DIGI_BAUD_9600; break;
+ case B19200: arg = DIGI_BAUD_19200; break;
+ case B38400: arg = DIGI_BAUD_38400; break;
+ case B57600: arg = DIGI_BAUD_57600; break;
+ case B115200: arg = DIGI_BAUD_115200; break;
+ case B230400: arg = DIGI_BAUD_230400; break;
+ case B460800: arg = DIGI_BAUD_460800; break;
+ default:
+ dbg( "digi_set_termios: can't handle baud rate 0x%x",
+ (cflag&CBAUD) );
+ break;
+ }
+
+ if( arg != -1 ) {
+ buf[i++] = DIGI_CMD_SET_BAUD_RATE;
+ buf[i++] = priv->dp_port_num;
+ buf[i++] = arg;
+ buf[i++] = 0;
+ }
+
+ }
+
+ /* set parity */
+ if( (cflag&(PARENB|PARODD)) != (old_cflag&(PARENB|PARODD)) ) {
+
+ if( (cflag&PARENB) ) {
+ if( (cflag&PARODD) )
+ arg = DIGI_PARITY_ODD;
+ else
+ arg = DIGI_PARITY_EVEN;
+ } else {
+ arg = DIGI_PARITY_NONE;
+ }
+
+ buf[i++] = DIGI_CMD_SET_PARITY;
+ buf[i++] = priv->dp_port_num;
+ buf[i++] = arg;
+ buf[i++] = 0;
+
+ }
+
+ /* set word size */
+ if( (cflag&CSIZE) != (old_cflag&CSIZE) ) {
+
+ arg = -1;
+
+ switch( (cflag&CSIZE) ) {
+ case CS5: arg = DIGI_WORD_SIZE_5; break;
+ case CS6: arg = DIGI_WORD_SIZE_6; break;
+ case CS7: arg = DIGI_WORD_SIZE_7; break;
+ case CS8: arg = DIGI_WORD_SIZE_8; break;
+ default:
+ dbg( "digi_set_termios: can't handle word size %d",
+ (cflag&CSIZE) );
+ break;
+ }
+
+ if( arg != -1 ) {
+ buf[i++] = DIGI_CMD_SET_WORD_SIZE;
+ buf[i++] = priv->dp_port_num;
+ buf[i++] = arg;
+ buf[i++] = 0;
+ }
+
+ }
+
+ /* set stop bits */
+ if( (cflag&CSTOPB) != (old_cflag&CSTOPB) ) {
+
+ if( (cflag&CSTOPB) )
+ arg = DIGI_STOP_BITS_2;
+ else
+ arg = DIGI_STOP_BITS_1;
+
+ buf[i++] = DIGI_CMD_SET_STOP_BITS;
+ buf[i++] = priv->dp_port_num;
+ buf[i++] = arg;
+ buf[i++] = 0;
+
+ }
+
+ /* set input flow control */
+ if( (iflag&IXOFF) != (old_iflag&IXOFF)
+ || (cflag&CRTSCTS) != (old_cflag&CRTSCTS) ) {
+
+ arg = 0;
+
+ if( (iflag&IXOFF) )
+ arg |= DIGI_INPUT_FLOW_CONTROL_XON_XOFF;
+ else
+ arg &= ~DIGI_INPUT_FLOW_CONTROL_XON_XOFF;
+
+ if( (cflag&CRTSCTS) ) {
+
+ arg |= DIGI_INPUT_FLOW_CONTROL_RTS;
+
+ /* On USB-4 it is necessary to assert RTS prior */
+ /* to selecting RTS input flow control. */
+ buf[i++] = DIGI_CMD_SET_RTS_SIGNAL;
+ buf[i++] = priv->dp_port_num;
+ buf[i++] = DIGI_RTS_ACTIVE;
+ buf[i++] = 0;
+
+ } else {
+ arg &= ~DIGI_INPUT_FLOW_CONTROL_RTS;
+ }
+
+ buf[i++] = DIGI_CMD_SET_INPUT_FLOW_CONTROL;
+ buf[i++] = priv->dp_port_num;
+ buf[i++] = arg;
+ buf[i++] = 0;
+
+ }
+
+ /* set output flow control */
+ if( (iflag&IXON) != (old_iflag&IXON)
+ || (cflag&CRTSCTS) != (old_cflag&CRTSCTS) ) {
+
+ arg = 0;
+
+ if( (iflag&IXON) )
+ arg |= DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF;
+ else
+ arg &= ~DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF;
+
+ if( (cflag&CRTSCTS) ) {
+ arg |= DIGI_OUTPUT_FLOW_CONTROL_CTS;
+ } else {
+ arg &= ~DIGI_OUTPUT_FLOW_CONTROL_CTS;
+ port->tty->hw_stopped = 0;
+ }
+
+ buf[i++] = DIGI_CMD_SET_OUTPUT_FLOW_CONTROL;
+ buf[i++] = priv->dp_port_num;
+ buf[i++] = arg;
+ buf[i++] = 0;
+
+ }
+
+ /* set receive enable/disable */
+ if( (cflag&CREAD) != (old_cflag&CREAD) ) {
+
+ if( (cflag&CREAD) )
+ arg = DIGI_ENABLE;
+ else
+ arg = DIGI_DISABLE;
+
+ buf[i++] = DIGI_CMD_RECEIVE_ENABLE;
+ buf[i++] = priv->dp_port_num;
+ buf[i++] = arg;
+ buf[i++] = 0;
+
+ }
+
+ if( (ret=digi_write_oob_command( port, buf, i, 1 )) != 0 )
+ dbg( "digi_set_termios: write oob failed, ret=%d", ret );
+
+}
+
+
+static void digi_break_ctl( struct usb_serial_port *port, int break_state )
+{
+
+ unsigned char buf[4];
+
+
+ buf[0] = DIGI_CMD_BREAK_CONTROL;
+ buf[1] = 2; /* length */
+ buf[2] = break_state ? 1 : 0;
+ buf[3] = 0; /* pad */
+
+ digi_write_inb_command( port, buf, 4, 0 );
+
+}
+
+
+static int digi_tiocmget( struct usb_serial_port *port, struct file *file )
+{
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ unsigned int val;
+ unsigned long flags;
+
+ dbg("%s: TOP: port=%d", __FUNCTION__, priv->dp_port_num);
+
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+ val = priv->dp_modem_signals;
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+ return val;
+}
+
+
+static int digi_tiocmset( struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear )
+{
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ unsigned int val;
+ unsigned long flags;
+
+ dbg("%s: TOP: port=%d", __FUNCTION__, priv->dp_port_num);
+
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+ val = (priv->dp_modem_signals & ~clear) | set;
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+ return digi_set_modem_signals( port, val, 1 );
+}
+
+
+static int digi_ioctl( struct usb_serial_port *port, struct file *file,
+ unsigned int cmd, unsigned long arg )
+{
+
+ struct digi_port *priv = usb_get_serial_port_data(port);
+
+dbg( "digi_ioctl: TOP: port=%d, cmd=0x%x", priv->dp_port_num, cmd );
+
+ switch (cmd) {
+
+ case TIOCMIWAIT:
+ /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
+ /* TODO */
+ return( 0 );
+
+ case TIOCGICOUNT:
+ /* return count of modemline transitions */
+ /* TODO */
+ return 0;
+
+ }
+
+ return( -ENOIOCTLCMD );
+
+}
+
+
+static int digi_write( struct usb_serial_port *port, const unsigned char *buf, int count )
+{
+
+ int ret,data_len,new_len;
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ unsigned char *data = port->write_urb->transfer_buffer;
+ unsigned long flags = 0;
+
+
+dbg( "digi_write: TOP: port=%d, count=%d, in_interrupt=%ld",
+priv->dp_port_num, count, in_interrupt() );
+
+ /* copy user data (which can sleep) before getting spin lock */
+ count = min( count, port->bulk_out_size-2 );
+ count = min( 64, count);
+
+ /* be sure only one write proceeds at a time */
+ /* there are races on the port private buffer */
+ /* and races to check write_urb->status */
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+
+ /* wait for urb status clear to submit another urb */
+ if( port->write_urb->status == -EINPROGRESS
+ || priv->dp_write_urb_in_use ) {
+
+ /* buffer data if count is 1 (probably put_char) if possible */
+ if( count == 1 && priv->dp_out_buf_len < DIGI_OUT_BUF_SIZE ) {
+ priv->dp_out_buf[priv->dp_out_buf_len++] = *buf;
+ new_len = 1;
+ } else {
+ new_len = 0;
+ }
+
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+
+ return( new_len );
+
+ }
+
+ /* allow space for any buffered data and for new data, up to */
+ /* transfer buffer size - 2 (for command and length bytes) */
+ new_len = min(count, port->bulk_out_size-2-priv->dp_out_buf_len);
+ data_len = new_len + priv->dp_out_buf_len;
+
+ if( data_len == 0 ) {
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+ return( 0 );
+ }
+
+ port->write_urb->transfer_buffer_length = data_len+2;
+ port->write_urb->dev = port->serial->dev;
+
+ *data++ = DIGI_CMD_SEND_DATA;
+ *data++ = data_len;
+
+ /* copy in buffered data first */
+ memcpy( data, priv->dp_out_buf, priv->dp_out_buf_len );
+ data += priv->dp_out_buf_len;
+
+ /* copy in new data */
+ memcpy( data, buf, new_len );
+
+ if( (ret=usb_submit_urb(port->write_urb, GFP_ATOMIC)) == 0 ) {
+ priv->dp_write_urb_in_use = 1;
+ ret = new_len;
+ priv->dp_out_buf_len = 0;
+ }
+
+ /* 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 );
+ }
+
+dbg( "digi_write: returning %d", ret );
+ return( ret );
+
+}
+
+
+static void digi_write_bulk_callback( struct urb *urb, struct pt_regs *regs )
+{
+
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct usb_serial *serial;
+ struct digi_port *priv;
+ struct digi_serial *serial_priv;
+ int ret = 0;
+
+
+dbg( "digi_write_bulk_callback: TOP, urb->status=%d", urb->status );
+
+ /* port and serial sanity check */
+ if( port == NULL || (priv=usb_get_serial_port_data(port)) == NULL ) {
+ err("%s: port or port->private is NULL, status=%d", __FUNCTION__,
+ urb->status );
+ return;
+ }
+ serial = port->serial;
+ if( serial == NULL || (serial_priv=usb_get_serial_data(serial)) == NULL ) {
+ err("%s: serial or serial->private is NULL, status=%d", __FUNCTION__, urb->status );
+ return;
+ }
+
+ /* handle oob callback */
+ if( priv->dp_port_num == serial_priv->ds_oob_port_num ) {
+ dbg( "digi_write_bulk_callback: oob callback" );
+ spin_lock( &priv->dp_port_lock );
+ priv->dp_write_urb_in_use = 0;
+ wake_up_interruptible( &port->write_wait );
+ spin_unlock( &priv->dp_port_lock );
+ return;
+ }
+
+ /* 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))
+ = (unsigned char)DIGI_CMD_SEND_DATA;
+ *((unsigned char *)(port->write_urb->transfer_buffer)+1)
+ = (unsigned char)priv->dp_out_buf_len;
+
+ port->write_urb->transfer_buffer_length
+ = priv->dp_out_buf_len+2;
+ port->write_urb->dev = serial->dev;
+
+ memcpy( port->write_urb->transfer_buffer+2, priv->dp_out_buf,
+ priv->dp_out_buf_len );
+
+ if( (ret=usb_submit_urb(port->write_urb, GFP_ATOMIC)) == 0 ) {
+ priv->dp_write_urb_in_use = 1;
+ priv->dp_out_buf_len = 0;
+ }
+
+ }
+
+ /* wake up processes sleeping on writes immediately */
+ digi_wakeup_write( port );
+
+ /* also queue up a wakeup at scheduler time, in case we */
+ /* lost the race in write_chan(). */
+ schedule_work(&priv->dp_wakeup_work);
+
+ spin_unlock( &priv->dp_port_lock );
+
+ if( ret ) {
+ err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
+ ret, priv->dp_port_num );
+ }
+
+}
+
+
+static int digi_write_room( struct usb_serial_port *port )
+{
+
+ int room;
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ unsigned long flags = 0;
+
+
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+
+ if( port->write_urb->status == -EINPROGRESS
+ || priv->dp_write_urb_in_use )
+ room = 0;
+ else
+ room = port->bulk_out_size - 2 - priv->dp_out_buf_len;
+
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+
+dbg( "digi_write_room: port=%d, room=%d", priv->dp_port_num, room );
+ return( room );
+
+}
+
+
+static int digi_chars_in_buffer( struct usb_serial_port *port )
+{
+
+ struct digi_port *priv = usb_get_serial_port_data(port);
+
+
+ if( port->write_urb->status == -EINPROGRESS
+ || priv->dp_write_urb_in_use ) {
+dbg( "digi_chars_in_buffer: port=%d, chars=%d", priv->dp_port_num, port->bulk_out_size - 2 );
+ /* return( port->bulk_out_size - 2 ); */
+ return( 256 );
+ } else {
+dbg( "digi_chars_in_buffer: port=%d, chars=%d", priv->dp_port_num, priv->dp_out_buf_len );
+ return( priv->dp_out_buf_len );
+ }
+
+}
+
+
+static int digi_open( struct usb_serial_port *port, struct file *filp )
+{
+
+ int ret;
+ unsigned char buf[32];
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ 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 )
+ return( -ENXIO );
+
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+
+ /* don't wait on a close in progress for non-blocking opens */
+ if( priv->dp_in_close && (filp->f_flags&(O_NDELAY|O_NONBLOCK)) == 0 ) {
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+ return( -EAGAIN );
+ }
+
+ /* 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) ) {
+ return( -EINTR );
+ }
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+ }
+
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+
+ /* read modem signals automatically whenever they change */
+ buf[0] = DIGI_CMD_READ_INPUT_SIGNALS;
+ buf[1] = priv->dp_port_num;
+ buf[2] = DIGI_ENABLE;
+ buf[3] = 0;
+
+ /* flush fifos */
+ buf[4] = DIGI_CMD_IFLUSH_FIFO;
+ buf[5] = priv->dp_port_num;
+ buf[6] = DIGI_FLUSH_TX | DIGI_FLUSH_RX;
+ buf[7] = 0;
+
+ if( (ret=digi_write_oob_command( port, buf, 8, 1 )) != 0 )
+ dbg( "digi_open: write oob failed, ret=%d", ret );
+
+ /* set termios settings */
+ not_termios.c_cflag = ~port->tty->termios->c_cflag;
+ not_termios.c_iflag = ~port->tty->termios->c_iflag;
+ digi_set_termios( port, &not_termios );
+
+ /* set DTR and RTS */
+ digi_set_modem_signals( port, TIOCM_DTR|TIOCM_RTS, 1 );
+
+ return( 0 );
+
+}
+
+
+static void digi_close( struct usb_serial_port *port, struct file *filp )
+{
+ DEFINE_WAIT(wait);
+ int ret;
+ unsigned char buf[32];
+ struct tty_struct *tty = port->tty;
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ unsigned long flags = 0;
+
+
+dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count );
+
+
+ /* if disconnected, just clear flags */
+ if (!usb_get_intfdata(port->serial->interface))
+ goto exit;
+
+ /* 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 );
+
+ /* tell line discipline to process only XON/XOFF */
+ tty->closing = 1;
+
+ /* wait for output to drain */
+ if( (filp->f_flags&(O_NDELAY|O_NONBLOCK)) == 0 ) {
+ tty_wait_until_sent( tty, DIGI_CLOSE_TIMEOUT );
+ }
+
+ /* flush driver and line discipline buffers */
+ if( tty->driver->flush_buffer )
+ tty->driver->flush_buffer( tty );
+ tty_ldisc_flush(tty);
+
+ if (port->serial->dev) {
+ /* wait for transmit idle */
+ if( (filp->f_flags&(O_NDELAY|O_NONBLOCK)) == 0 ) {
+ digi_transmit_idle( port, DIGI_CLOSE_TIMEOUT );
+ }
+
+ /* drop DTR and RTS */
+ digi_set_modem_signals( port, 0, 0 );
+
+ /* disable input flow control */
+ buf[0] = DIGI_CMD_SET_INPUT_FLOW_CONTROL;
+ buf[1] = priv->dp_port_num;
+ buf[2] = DIGI_DISABLE;
+ buf[3] = 0;
+
+ /* disable output flow control */
+ buf[4] = DIGI_CMD_SET_OUTPUT_FLOW_CONTROL;
+ buf[5] = priv->dp_port_num;
+ buf[6] = DIGI_DISABLE;
+ buf[7] = 0;
+
+ /* disable reading modem signals automatically */
+ buf[8] = DIGI_CMD_READ_INPUT_SIGNALS;
+ buf[9] = priv->dp_port_num;
+ buf[10] = DIGI_DISABLE;
+ buf[11] = 0;
+
+ /* disable receive */
+ buf[12] = DIGI_CMD_RECEIVE_ENABLE;
+ buf[13] = priv->dp_port_num;
+ buf[14] = DIGI_DISABLE;
+ buf[15] = 0;
+
+ /* flush fifos */
+ buf[16] = DIGI_CMD_IFLUSH_FIFO;
+ buf[17] = priv->dp_port_num;
+ buf[18] = DIGI_FLUSH_TX | DIGI_FLUSH_RX;
+ buf[19] = 0;
+
+ if( (ret=digi_write_oob_command( port, buf, 20, 0 )) != 0 )
+ dbg( "digi_close: write oob failed, ret=%d", ret );
+
+ /* wait for final commands on oob port to complete */
+ prepare_to_wait(&priv->dp_flush_wait, &wait, TASK_UNINTERRUPTIBLE);
+ schedule_timeout(DIGI_CLOSE_TIMEOUT);
+ finish_wait(&priv->dp_flush_wait, &wait);
+
+ /* shutdown any outstanding bulk writes */
+ usb_kill_urb(port->write_urb);
+ }
+
+ tty->closing = 0;
+
+exit:
+ spin_lock_irqsave( &priv->dp_port_lock, flags );
+ priv->dp_write_urb_in_use = 0;
+ priv->dp_in_close = 0;
+ wake_up_interruptible( &priv->dp_close_wait );
+ spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+
+dbg( "digi_close: done" );
+}
+
+
+/*
+* Digi Startup Device
+*
+* Starts reads on all ports. Must be called AFTER startup, with
+* urbs initialized. Returns 0 if successful, non-zero error otherwise.
+*/
+
+static int digi_startup_device( struct usb_serial *serial )
+{
+
+ int i,ret = 0;
+ struct digi_serial *serial_priv = usb_get_serial_data(serial);
+ struct usb_serial_port *port;
+
+
+ /* be sure this happens exactly once */
+ spin_lock( &serial_priv->ds_serial_lock );
+ if( serial_priv->ds_device_started ) {
+ spin_unlock( &serial_priv->ds_serial_lock );
+ return( 0 );
+ }
+ serial_priv->ds_device_started = 1;
+ spin_unlock( &serial_priv->ds_serial_lock );
+
+ /* start reading from each bulk in endpoint for the device */
+ /* set USB_DISABLE_SPD flag for write bulk urbs */
+ for( i=0; i<serial->type->num_ports+1; i++ ) {
+
+ port = serial->port[i];
+
+ port->write_urb->dev = port->serial->dev;
+
+ if( (ret=usb_submit_urb(port->read_urb, GFP_KERNEL)) != 0 ) {
+ err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
+ ret, i );
+ break;
+ }
+
+ }
+
+ return( ret );
+
+}
+
+
+static int digi_startup( struct usb_serial *serial )
+{
+
+ int i;
+ struct digi_port *priv;
+ struct digi_serial *serial_priv;
+
+
+dbg( "digi_startup: TOP" );
+
+ /* allocate the private data structures for all ports */
+ /* number of regular ports + 1 for the out-of-band port */
+ for( i=0; i<serial->type->num_ports+1; i++ ) {
+
+ /* allocate port private structure */
+ priv = (struct digi_port *)kmalloc( sizeof(struct digi_port),
+ GFP_KERNEL );
+ if( priv == (struct digi_port *)0 ) {
+ while( --i >= 0 )
+ kfree( usb_get_serial_port_data(serial->port[i]) );
+ return( 1 ); /* error */
+ }
+
+ /* initialize port private structure */
+ spin_lock_init( &priv->dp_port_lock );
+ priv->dp_port_num = i;
+ priv->dp_out_buf_len = 0;
+ priv->dp_in_buf_len = 0;
+ priv->dp_write_urb_in_use = 0;
+ priv->dp_modem_signals = 0;
+ init_waitqueue_head( &priv->dp_modem_change_wait );
+ priv->dp_transmit_idle = 0;
+ init_waitqueue_head( &priv->dp_transmit_idle_wait );
+ priv->dp_throttled = 0;
+ priv->dp_throttle_restart = 0;
+ init_waitqueue_head( &priv->dp_flush_wait );
+ priv->dp_in_close = 0;
+ init_waitqueue_head( &priv->dp_close_wait );
+ INIT_WORK(&priv->dp_wakeup_work,
+ digi_wakeup_write_lock, serial->port[i]);
+
+ /* initialize write wait queue for this port */
+ init_waitqueue_head( &serial->port[i]->write_wait );
+
+ usb_set_serial_port_data(serial->port[i], priv);
+ }
+
+ /* allocate serial private structure */
+ serial_priv = (struct digi_serial *)kmalloc( sizeof(struct digi_serial),
+ GFP_KERNEL );
+ if( serial_priv == (struct digi_serial *)0 ) {
+ for( i=0; i<serial->type->num_ports+1; i++ )
+ kfree( usb_get_serial_port_data(serial->port[i]) );
+ return( 1 ); /* error */
+ }
+
+ /* initialize serial private structure */
+ spin_lock_init( &serial_priv->ds_serial_lock );
+ serial_priv->ds_oob_port_num = serial->type->num_ports;
+ serial_priv->ds_oob_port = serial->port[serial_priv->ds_oob_port_num];
+ serial_priv->ds_device_started = 0;
+ usb_set_serial_data(serial, serial_priv);
+
+ return( 0 );
+
+}
+
+
+static void digi_shutdown( struct usb_serial *serial )
+{
+
+ int i;
+
+
+dbg( "digi_shutdown: TOP, in_interrupt()=%ld", in_interrupt() );
+
+ /* stop reads and writes on all ports */
+ for( i=0; i<serial->type->num_ports+1; i++ ) {
+ usb_kill_urb(serial->port[i]->read_urb);
+ usb_kill_urb(serial->port[i]->write_urb);
+ }
+
+ /* free the private data structures for all ports */
+ /* number of regular ports + 1 for the out-of-band port */
+ for( i=0; i<serial->type->num_ports+1; i++ )
+ kfree( usb_get_serial_port_data(serial->port[i]) );
+ kfree( usb_get_serial_data(serial) );
+}
+
+
+static void digi_read_bulk_callback( struct urb *urb, struct pt_regs *regs )
+{
+
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct digi_port *priv;
+ struct digi_serial *serial_priv;
+ int ret;
+
+
+dbg( "digi_read_bulk_callback: TOP" );
+
+ /* port sanity check, do not resubmit if port is not valid */
+ if( port == NULL || (priv=usb_get_serial_port_data(port)) == NULL ) {
+ err("%s: port or port->private is NULL, status=%d", __FUNCTION__,
+ urb->status );
+ return;
+ }
+ if( port->serial == NULL
+ || (serial_priv=usb_get_serial_data(port->serial)) == 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 == serial_priv->ds_oob_port_num ) {
+ if( digi_read_oob_callback( urb ) != 0 )
+ return;
+ } else {
+ if( digi_read_inb_callback( urb ) != 0 )
+ return;
+ }
+
+ /* continue read */
+ urb->dev = port->serial->dev;
+ if( (ret=usb_submit_urb(urb, GFP_ATOMIC)) != 0 ) {
+ err("%s: failed resubmitting urb, ret=%d, port=%d", __FUNCTION__,
+ ret, priv->dp_port_num );
+ }
+
+}
+
+
+/*
+* Digi Read INB Callback
+*
+* Digi Read INB Callback handles reads on the in band ports, sending
+* the data on to the tty subsystem. When called we know port and
+* port->private are not NULL and port->serial has been validated.
+* It returns 0 if successful, 1 if successful but the port is
+* throttled, and -1 if the sanity checks failed.
+*/
+
+static int digi_read_inb_callback( struct urb *urb )
+{
+
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct tty_struct *tty = port->tty;
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ int opcode = ((unsigned char *)urb->transfer_buffer)[0];
+ int len = ((unsigned char *)urb->transfer_buffer)[1];
+ int status = ((unsigned char *)urb->transfer_buffer)[2];
+ unsigned char *data = ((unsigned char *)urb->transfer_buffer)+3;
+ int flag,throttled;
+
+ /* 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 );
+ }
+
+ spin_lock( &priv->dp_port_lock );
+
+ /* check for throttle; if set, do not resubmit read urb */
+ /* indicate the read chain needs to be restarted on unthrottle */
+ throttled = priv->dp_throttled;
+ if( throttled )
+ priv->dp_throttle_restart = 1;
+
+ /* receive data */
+ if( opcode == DIGI_CMD_RECEIVE_DATA ) {
+
+ /* get flag from status */
+ flag = 0;
+
+ /* overrun is special, not associated with a char */
+ if( status & DIGI_OVERRUN_ERROR ) {
+ tty_insert_flip_char( tty, 0, TTY_OVERRUN );
+ }
+
+ /* break takes precedence over parity, */
+ /* which takes precedence over framing errors */
+ if( status & DIGI_BREAK_ERROR ) {
+ flag = TTY_BREAK;
+ } else if( status & DIGI_PARITY_ERROR ) {
+ flag = TTY_PARITY;
+ } else if( status & DIGI_FRAMING_ERROR ) {
+ flag = TTY_FRAME;
+ }
+
+ /* data length is len-1 (one byte of len is status) */
+ --len;
+
+ if( throttled ) {
+
+ len = min( len,
+ DIGI_IN_BUF_SIZE - priv->dp_in_buf_len );
+
+ if( len > 0 ) {
+ memcpy( priv->dp_in_buf + priv->dp_in_buf_len,
+ data, len );
+ memset( priv->dp_in_flag_buf
+ + priv->dp_in_buf_len, flag, len );
+ priv->dp_in_buf_len += len;
+ }
+
+ } else {
+
+ len = min( len, TTY_FLIPBUF_SIZE - tty->flip.count );
+
+ if( len > 0 ) {
+ memcpy( tty->flip.char_buf_ptr, data, len );
+ memset( tty->flip.flag_buf_ptr, flag, len );
+ tty->flip.char_buf_ptr += len;
+ tty->flip.flag_buf_ptr += len;
+ tty->flip.count += len;
+ tty_flip_buffer_push( tty );
+ }
+
+ }
+
+ }
+
+ 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 );
+
+}
+
+
+/*
+* Digi Read OOB Callback
+*
+* Digi Read OOB Callback handles reads on the out of band port.
+* When called we know port and port->private are not NULL and
+* the port->serial is valid. It returns 0 if successful, and
+* -1 if the sanity checks failed.
+*/
+
+static int digi_read_oob_callback( struct urb *urb )
+{
+
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct usb_serial *serial = port->serial;
+ struct digi_port *priv = usb_get_serial_port_data(port);
+ int opcode, line, status, val;
+ int i;
+
+
+dbg( "digi_read_oob_callback: port=%d, len=%d", priv->dp_port_num,
+urb->actual_length );
+
+ /* handle each oob command */
+ for( i=0; i<urb->actual_length-3; ) {
+
+ opcode = ((unsigned char *)urb->transfer_buffer)[i++];
+ line = ((unsigned char *)urb->transfer_buffer)[i++];
+ status = ((unsigned char *)urb->transfer_buffer)[i++];
+ val = ((unsigned char *)urb->transfer_buffer)[i++];
+
+dbg( "digi_read_oob_callback: opcode=%d, line=%d, status=%d, val=%d",
+opcode, line, status, val );
+
+ if( status != 0 || line >= serial->type->num_ports )
+ continue;
+
+ port = serial->port[line];
+
+ if ((priv=usb_get_serial_port_data(port)) == NULL )
+ return -1;
+
+ if( opcode == DIGI_CMD_READ_INPUT_SIGNALS ) {
+
+ spin_lock( &priv->dp_port_lock );
+
+ /* convert from digi flags to termiox flags */
+ 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 );
+ }
+ } 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;
+ }
+ }
+ if( val & DIGI_READ_INPUT_SIGNALS_DSR )
+ priv->dp_modem_signals |= TIOCM_DSR;
+ else
+ priv->dp_modem_signals &= ~TIOCM_DSR;
+ if( val & DIGI_READ_INPUT_SIGNALS_RI )
+ priv->dp_modem_signals |= TIOCM_RI;
+ else
+ priv->dp_modem_signals &= ~TIOCM_RI;
+ if( val & DIGI_READ_INPUT_SIGNALS_DCD )
+ priv->dp_modem_signals |= TIOCM_CD;
+ else
+ priv->dp_modem_signals &= ~TIOCM_CD;
+
+ wake_up_interruptible( &priv->dp_modem_change_wait );
+ spin_unlock( &priv->dp_port_lock );
+
+ } else if( opcode == DIGI_CMD_TRANSMIT_IDLE ) {
+
+ spin_lock( &priv->dp_port_lock );
+ priv->dp_transmit_idle = 1;
+ wake_up_interruptible( &priv->dp_transmit_idle_wait );
+ spin_unlock( &priv->dp_port_lock );
+
+ } else if( opcode == DIGI_CMD_IFLUSH_FIFO ) {
+
+ wake_up( &priv->dp_flush_wait );
+
+ }
+
+ }
+
+ return( 0 );
+
+}
+
+
+static int __init digi_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&digi_acceleport_2_device);
+ if (retval)
+ goto failed_acceleport_2_device;
+ retval = usb_serial_register(&digi_acceleport_4_device);
+ if (retval)
+ goto failed_acceleport_4_device;
+ retval = usb_register(&digi_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&digi_acceleport_4_device);
+failed_acceleport_4_device:
+ usb_serial_deregister(&digi_acceleport_2_device);
+failed_acceleport_2_device:
+ return retval;
+}
+
+
+static void __exit digi_exit (void)
+{
+ usb_deregister (&digi_driver);
+ usb_serial_deregister (&digi_acceleport_2_device);
+ usb_serial_deregister (&digi_acceleport_4_device);
+}
+
+
+module_init(digi_init);
+module_exit(digi_exit);
+
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
new file mode 100644
index 000000000000..4d46394f351b
--- /dev/null
+++ b/drivers/usb/serial/empeg.c
@@ -0,0 +1,596 @@
+/*
+ * USB Empeg empeg-car player driver
+ *
+ * Copyright (C) 2000, 2001
+ * Gary Brubaker (xavyer@ix.netcom.com)
+ *
+ * Copyright (C) 1999 - 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
+ * the Free Software Foundation, version 2.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * (07/16/2001) gb
+ * remove unused code in empeg_close() (thanks to Oliver Neukum for pointing this
+ * out) and rewrote empeg_set_termios().
+ *
+ * (05/30/2001) gkh
+ * switched from using spinlock to a semaphore, which fixes lots of problems.
+ *
+ * (04/08/2001) gb
+ * Identify version on module load.
+ *
+ * (01/22/2001) gb
+ * Added write_room() and chars_in_buffer() support.
+ *
+ * (12/21/2000) gb
+ * Moved termio stuff inside the port->active check.
+ * Moved MOD_DEC_USE_COUNT to end of empeg_close().
+ *
+ * (12/03/2000) gb
+ * Added port->tty->ldisc.set_termios(port->tty, NULL) to empeg_open()
+ * This notifies the tty driver that the termios have changed.
+ *
+ * (11/13/2000) gb
+ * Moved tty->low_latency = 1 from empeg_read_bulk_callback() to empeg_open()
+ * (It only needs to be set once - Doh!)
+ *
+ * (11/11/2000) gb
+ * Updated to work with id_table structure.
+ *
+ * (11/04/2000) gb
+ * Forked this from visor.c, and hacked it up to work with an
+ * Empeg ltd. empeg-car player. Constructive criticism welcomed.
+ * I would like to say, 'Thank You' to Greg Kroah-Hartman for the
+ * use of his code, and for his guidance, advice and patience. :)
+ * A 'Thank You' is in order for John Ripley of Empeg ltd for his
+ * advice, and patience too.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+
+static int debug;
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.2"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Gary Brubaker <xavyer@ix.netcom.com>"
+#define DRIVER_DESC "USB Empeg Mark I/II Driver"
+
+#define EMPEG_VENDOR_ID 0x084f
+#define EMPEG_PRODUCT_ID 0x0001
+
+/* function prototypes for an empeg-car player */
+static int empeg_open (struct usb_serial_port *port, struct file *filp);
+static void empeg_close (struct usb_serial_port *port, struct file *filp);
+static int empeg_write (struct usb_serial_port *port,
+ const unsigned char *buf,
+ int count);
+static int empeg_write_room (struct usb_serial_port *port);
+static int empeg_chars_in_buffer (struct usb_serial_port *port);
+static void empeg_throttle (struct usb_serial_port *port);
+static void empeg_unthrottle (struct usb_serial_port *port);
+static int empeg_startup (struct usb_serial *serial);
+static void empeg_shutdown (struct usb_serial *serial);
+static int empeg_ioctl (struct usb_serial_port *port,
+ struct file * file,
+ unsigned int cmd,
+ unsigned long arg);
+static void empeg_set_termios (struct usb_serial_port *port, struct termios *old_termios);
+static void empeg_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+
+static struct usb_device_id id_table [] = {
+ { USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver empeg_driver = {
+ .owner = THIS_MODULE,
+ .name = "empeg",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = 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,
+ .attach = 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
+#define URB_TRANSFER_BUFFER_SIZE 4096
+
+static struct urb *write_urb_pool[NUM_URBS];
+static spinlock_t write_urb_pool_lock;
+static int bytes_in;
+static int bytes_out;
+
+/******************************************************************************
+ * Empeg specific driver functions
+ ******************************************************************************/
+static int empeg_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct usb_serial *serial = port->serial;
+ int result = 0;
+
+ 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 */
+ 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,
+ empeg_read_bulk_callback,
+ port);
+
+ result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+
+ if (result)
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+
+ return result;
+}
+
+
+static void empeg_close (struct usb_serial_port *port, struct file * filp)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /* shutdown our bulk read */
+ usb_kill_urb(port->read_urb);
+ /* Uncomment the following line if you want to see some statistics in your syslog */
+ /* dev_info (&port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
+}
+
+
+static int empeg_write (struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ struct usb_serial *serial = port->serial;
+ struct urb *urb;
+ const unsigned char *current_position = buf;
+ unsigned long flags;
+ int status;
+ int i;
+ 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 */
+ urb = NULL;
+
+ spin_lock_irqsave (&write_urb_pool_lock, flags);
+
+ for (i = 0; i < NUM_URBS; ++i) {
+ if (write_urb_pool[i]->status != -EINPROGRESS) {
+ urb = write_urb_pool[i];
+ break;
+ }
+ }
+
+ 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) {
+ dev_err(&port->dev, "%s no more kernel memory...\n", __FUNCTION__);
+ goto exit;
+ }
+ }
+
+ transfer_size = min (count, URB_TRANSFER_BUFFER_SIZE);
+
+ memcpy (urb->transfer_buffer, current_position, transfer_size);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size, urb->transfer_buffer);
+
+ /* build up our urb */
+ usb_fill_bulk_urb (
+ urb,
+ serial->dev,
+ usb_sndbulkpipe(serial->dev,
+ port->bulk_out_endpointAddress),
+ urb->transfer_buffer,
+ transfer_size,
+ empeg_write_bulk_callback,
+ port);
+
+ /* send it down the pipe */
+ status = usb_submit_urb(urb, GFP_ATOMIC);
+ if (status) {
+ dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status);
+ bytes_sent = status;
+ break;
+ }
+
+ current_position += transfer_size;
+ bytes_sent += transfer_size;
+ count -= transfer_size;
+ bytes_out += transfer_size;
+
+ }
+
+exit:
+ return bytes_sent;
+
+}
+
+
+static int empeg_write_room (struct usb_serial_port *port)
+{
+ unsigned long flags;
+ int i;
+ int room = 0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave (&write_urb_pool_lock, flags);
+
+ /* tally up the number of bytes available */
+ for (i = 0; i < NUM_URBS; ++i) {
+ if (write_urb_pool[i]->status != -EINPROGRESS) {
+ room += URB_TRANSFER_BUFFER_SIZE;
+ }
+ }
+
+ spin_unlock_irqrestore (&write_urb_pool_lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, room);
+
+ return (room);
+
+}
+
+
+static int empeg_chars_in_buffer (struct usb_serial_port *port)
+{
+ unsigned long flags;
+ int i;
+ int chars = 0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave (&write_urb_pool_lock, flags);
+
+ /* tally up the number of bytes waiting */
+ for (i = 0; i < NUM_URBS; ++i) {
+ if (write_urb_pool[i]->status == -EINPROGRESS) {
+ chars += URB_TRANSFER_BUFFER_SIZE;
+ }
+ }
+
+ spin_unlock_irqrestore (&write_urb_pool_lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, chars);
+
+ return (chars);
+
+}
+
+
+static void empeg_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ schedule_work(&port->work);
+}
+
+
+static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+ int i;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+
+ tty = port->tty;
+
+ if (urb->actual_length) {
+ for (i = 0; i < urb->actual_length ; ++i) {
+ /* gb - 2000/11/13
+ * If we insert too many characters we'll overflow the buffer.
+ * This means we'll lose bytes - Decidedly bad.
+ */
+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ /* gb - 2000/11/13
+ * Goes straight through instead of scheduling - if tty->low_latency is set.
+ */
+ tty_flip_buffer_push(tty);
+ bytes_in += urb->actual_length;
+ }
+
+ /* Continue trying to always read */
+ usb_fill_bulk_urb(
+ port->read_urb,
+ port->serial->dev,
+ usb_rcvbulkpipe(port->serial->dev,
+ port->bulk_in_endpointAddress),
+ port->read_urb->transfer_buffer,
+ port->read_urb->transfer_buffer_length,
+ empeg_read_bulk_callback,
+ port);
+
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+
+ if (result)
+ dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+
+ return;
+
+}
+
+
+static void empeg_throttle (struct usb_serial_port *port)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ usb_kill_urb(port->read_urb);
+}
+
+
+static void empeg_unthrottle (struct usb_serial_port *port)
+{
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ port->read_urb->dev = port->serial->dev;
+
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+
+ if (result)
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+
+ return;
+}
+
+
+static int empeg_startup (struct usb_serial *serial)
+{
+ int r;
+
+ dbg("%s", __FUNCTION__);
+
+ if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
+ err("active config #%d != 1 ??",
+ serial->dev->actconfig->desc.bConfigurationValue);
+ return -ENODEV;
+ }
+ dbg("%s - reset config", __FUNCTION__);
+ r = usb_reset_configuration (serial->dev);
+
+ /* continue on with initialization */
+ return r;
+
+}
+
+
+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;
+}
+
+
+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;
+ }
+
+ /*
+ * The empeg-car player wants these particular tty settings.
+ * You could, for example, change the baud rate, however the
+ * player only supports 115200 (currently), so there is really
+ * no point in support for changes to the tty settings.
+ * (at least for now)
+ *
+ * The default requirements for this device are:
+ */
+ port->tty->termios->c_iflag
+ &= ~(IGNBRK /* disable ignore break */
+ | BRKINT /* disable break causes interrupt */
+ | PARMRK /* disable mark parity errors */
+ | ISTRIP /* disable clear high bit of input characters */
+ | INLCR /* disable translate NL to CR */
+ | IGNCR /* disable ignore CR */
+ | ICRNL /* disable translate CR to NL */
+ | IXON); /* disable enable XON/XOFF flow control */
+
+ port->tty->termios->c_oflag
+ &= ~OPOST; /* disable postprocess output characters */
+
+ port->tty->termios->c_lflag
+ &= ~(ECHO /* disable echo input characters */
+ | ECHONL /* disable echo new line */
+ | ICANON /* disable erase, kill, werase, and rprnt special characters */
+ | ISIG /* disable interrupt, quit, and suspend special characters */
+ | IEXTEN); /* disable non-POSIX special characters */
+
+ port->tty->termios->c_cflag
+ &= ~(CSIZE /* no size */
+ | PARENB /* disable parity bit */
+ | CBAUD); /* clear current baud rate */
+
+ port->tty->termios->c_cflag
+ |= (CS8 /* character size 8 bits */
+ | B115200); /* baud rate 115200 */
+
+ /*
+ * Force low_latency on; otherwise the pushes are scheduled;
+ * this is bad as it opens up the possibility of dropping bytes
+ * on the floor. We don't want to drop bytes on the floor. :)
+ */
+ port->tty->low_latency = 1;
+
+ return;
+}
+
+
+static int __init empeg_init (void)
+{
+ struct urb *urb;
+ int i, retval;
+
+ /* create our write urb pool and transfer buffers */
+ spin_lock_init (&write_urb_pool_lock);
+ for (i = 0; i < NUM_URBS; ++i) {
+ urb = usb_alloc_urb(0, GFP_KERNEL);
+ write_urb_pool[i] = urb;
+ if (urb == NULL) {
+ err("No more urbs???");
+ continue;
+ }
+
+ urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
+ if (!urb->transfer_buffer) {
+ err("%s - out of memory for urb buffers.",
+ __FUNCTION__);
+ continue;
+ }
+ }
+
+ retval = usb_serial_register(&empeg_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&empeg_driver);
+ if (retval)
+ goto failed_usb_register;
+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&empeg_device);
+failed_usb_serial_register:
+ for (i = 0; i < NUM_URBS; ++i) {
+ if (write_urb_pool[i]) {
+ if (write_urb_pool[i]->transfer_buffer)
+ kfree(write_urb_pool[i]->transfer_buffer);
+ usb_free_urb(write_urb_pool[i]);
+ }
+ }
+ return retval;
+}
+
+
+static void __exit empeg_exit (void)
+{
+ int i;
+ unsigned long flags;
+
+ usb_deregister(&empeg_driver);
+ usb_serial_deregister (&empeg_device);
+
+ spin_lock_irqsave (&write_urb_pool_lock, flags);
+
+ for (i = 0; i < NUM_URBS; ++i) {
+ if (write_urb_pool[i]) {
+ /* FIXME - uncomment the following usb_kill_urb call when
+ * the host controllers get fixed to set urb->dev = NULL after
+ * the urb is finished. Otherwise this call oopses. */
+ /* usb_kill_urb(write_urb_pool[i]); */
+ if (write_urb_pool[i]->transfer_buffer)
+ kfree(write_urb_pool[i]->transfer_buffer);
+ usb_free_urb (write_urb_pool[i]);
+ }
+ }
+
+ spin_unlock_irqrestore (&write_urb_pool_lock, flags);
+}
+
+
+module_init(empeg_init);
+module_exit(empeg_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c
new file mode 100644
index 000000000000..1e419c8d7392
--- /dev/null
+++ b/drivers/usb/serial/ezusb.c
@@ -0,0 +1,60 @@
+/*
+ * EZ-USB specific functions used by some of the USB to Serial drivers.
+ *
+ * Copyright (C) 1999 - 2002 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 version
+ * 2 as published by the Free Software Foundation.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+
+/* EZ-USB Control and Status Register. Bit 0 controls 8051 reset */
+#define CPUCS_REG 0x7F92
+
+int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest)
+{
+ int result;
+ unsigned char *transfer_buffer;
+
+ /* dbg("ezusb_writememory %x, %d", address, length); */
+ if (!serial->dev) {
+ err("%s - no physical device present, failing.", __FUNCTION__);
+ return -ENODEV;
+ }
+
+ transfer_buffer = kmalloc (length, GFP_KERNEL);
+ if (!transfer_buffer) {
+ dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __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, 3000);
+ 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)
+ dev_err(&serial->dev->dev, "%s- %d failed\n", __FUNCTION__, reset_bit);
+ return response;
+}
+
+
+EXPORT_SYMBOL(ezusb_writememory);
+EXPORT_SYMBOL(ezusb_set_reset);
+
diff --git a/drivers/usb/serial/ezusb_convert.pl b/drivers/usb/serial/ezusb_convert.pl
new file mode 100644
index 000000000000..13f11469116e
--- /dev/null
+++ b/drivers/usb/serial/ezusb_convert.pl
@@ -0,0 +1,50 @@
+#! /usr/bin/perl -w
+
+
+# convert an Intel HEX file into a set of C records usable by the firmware
+# loading code in usb-serial.c (or others)
+
+# accepts the .hex file(s) on stdin, a basename (to name the initialized
+# array) as an argument, and prints the .h file to stdout. Typical usage:
+# perl ezusb_convert.pl foo <foo.hex >fw_foo.h
+
+
+my $basename = $ARGV[0];
+die "no base name specified" unless $basename;
+
+while (<STDIN>) {
+ # ':' <len> <addr> <type> <len-data> <crc> '\r'
+ # len, type, crc are 2-char hex, addr is 4-char hex. type is 00 for
+ # normal records, 01 for EOF
+ my($lenstring, $addrstring, $typestring, $reststring, $doscrap) =
+ /^:(\w\w)(\w\w\w\w)(\w\w)(\w+)(\r?)$/;
+ die "malformed line: $_" unless $reststring;
+ last if $typestring eq '01';
+ my($len) = hex($lenstring);
+ my($addr) = hex($addrstring);
+ my(@bytes) = unpack("C*", pack("H".(2*$len), $reststring));
+ #pop(@bytes); # last byte is a CRC
+ push(@records, [$addr, \@bytes]);
+}
+
+@sorted_records = sort { $a->[0] <=> $b->[0] } @records;
+
+print <<"EOF";
+/*
+ * ${basename}_fw.h
+ *
+ * Generated from ${basename}.s by ezusb_convert.pl
+ * This file is presumed to be under the same copyright as the source file
+ * from which it was derived.
+ */
+
+EOF
+
+print "static const struct ezusb_hex_record ${basename}_firmware[] = {\n";
+foreach $r (@sorted_records) {
+ printf("{ 0x%04x,\t%d,\t{", $r->[0], scalar(@{$r->[1]}));
+ print join(", ", map {sprintf('0x%02x', $_);} @{$r->[1]});
+ print "} },\n";
+}
+print "{ 0xffff,\t0,\t{0x00} }\n";
+print "};\n";
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
new file mode 100644
index 000000000000..4afd905fe2fe
--- /dev/null
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -0,0 +1,2496 @@
+/*
+ * USB FTDI SIO driver
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ *
+ * (21/Jul/2004) Ian Abbott
+ * Incorporated Steven Turner's code to add support for the FT2232C chip.
+ * The prelimilary port to the 2.6 kernel was by Rus V. Brushkoff. I have
+ * fixed a couple of things.
+ *
+ * (27/May/2004) Ian Abbott
+ * Improved throttling code, mostly stolen from the WhiteHEAT driver.
+ *
+ * (26/Mar/2004) Jan Capek
+ * Added PID's for ICD-U20/ICD-U40 - incircuit PIC debuggers from CCS Inc.
+ *
+ * (09/Feb/2004) Ian Abbott
+ * Changed full name of USB-UIRT device to avoid "/" character.
+ * Added FTDI's alternate PID (0x6006) for FT232/245 devices.
+ * Added PID for "ELV USB Module UO100" from Stefan Frings.
+ *
+ * (21/Oct/2003) Ian Abbott
+ * Renamed some VID/PID macros for Matrix Orbital and Perle Systems
+ * devices. Removed Matrix Orbital and Perle Systems devices from the
+ * 8U232AM device table, but left them in the FT232BM table, as they are
+ * known to use only FT232BM.
+ *
+ * (17/Oct/2003) Scott Allen
+ * Added vid/pid for Perle Systems UltraPort USB serial converters
+ *
+ * (21/Sep/2003) Ian Abbott
+ * Added VID/PID for Omnidirectional Control Technology US101 USB to
+ * RS-232 adapter (also rebadged as Dick Smith Electronics XH6381).
+ * VID/PID supplied by Donald Gordon.
+ *
+ * (19/Aug/2003) Ian Abbott
+ * Freed urb's transfer buffer in write bulk callback.
+ * Omitted some paranoid checks in write bulk callback that don't matter.
+ * Scheduled work in write bulk callback regardless of port's open count.
+ *
+ * (05/Aug/2003) Ian Abbott
+ * Added VID/PID for ID TECH IDT1221U USB to RS-232 adapter.
+ * VID/PID provided by Steve Briggs.
+ *
+ * (23/Jul/2003) Ian Abbott
+ * Added PIDs for CrystalFontz 547, 633, 631, 635, 640 and 640 from
+ * Wayne Wylupski.
+ *
+ * (10/Jul/2003) David Glance
+ * Added PID for DSS-20 SyncStation cradle for Sony-Ericsson P800.
+ *
+ * (27/Jun/2003) Ian Abbott
+ * Reworked the urb handling logic. We have no more pool, but dynamically
+ * allocate the urb and the transfer buffer on the fly. In testing this
+ * does not incure any measurable overhead. This also relies on the fact
+ * that we have proper reference counting logic for urbs. I nicked this
+ * from Greg KH's Visor driver.
+ *
+ * (23/Jun/2003) Ian Abbott
+ * Reduced flip buffer pushes and corrected a data length test in
+ * ftdi_read_bulk_callback.
+ * Defererence pointers after any paranoid checks, not before.
+ *
+ * (21/Jun/2003) Erik Nygren
+ * Added support for Home Electronics Tira-1 IR tranceiver using FT232BM chip.
+ * See <http://www.home-electro.com/tira1.htm>. Only operates properly
+ * at 100000 and RTS-CTS, so set custom divisor mode on startup.
+ * Also force the Tira-1 and USB-UIRT to only use their custom baud rates.
+ *
+ * (18/Jun/2003) Ian Abbott
+ * Added Device ID of the USB relais from Rudolf Gugler (backported from
+ * Philipp Gühring's patch for 2.5.x kernel).
+ * Moved read transfer buffer reallocation into startup function.
+ * Free existing write urb and transfer buffer in startup function.
+ * Only use urbs in write urb pool that were successfully allocated.
+ * Moved some constant macros out of functions.
+ * Minor whitespace and comment changes.
+ *
+ * (12/Jun/2003) David Norwood
+ * Added support for USB-UIRT IR tranceiver using 8U232AM chip.
+ * See <http://home.earthlink.net/~jrhees/USBUIRT/index.htm>. Only
+ * operates properly at 312500, so set custom divisor mode on startup.
+ *
+ * (12/Jun/2003) Ian Abbott
+ * Added Sealevel SeaLINK+ 210x, 220x, 240x, 280x vid/pids from Tuan Hoang
+ * - I've eliminated some that don't seem to exist!
+ * Added Home Electronics Tira-1 IR transceiver pid from Chris Horn
+ * Some whitespace/coding-style cleanups
+ *
+ * (11/Jun/2003) Ian Abbott
+ * Fixed unsafe spinlock usage in ftdi_write
+ *
+ * (24/Feb/2003) Richard Shooter
+ * Increase read buffer size to improve read speeds at higher baud rates
+ * (specifically tested with up to 1Mb/sec at 1.5M baud)
+ *
+ * (23/Feb/2003) John Wilkins
+ * Added Xon/xoff flow control (activating support in the ftdi device)
+ * Added vid/pid for Videonetworks/Homechoice (UK ISP)
+ *
+ * (23/Feb/2003) Bill Ryder
+ * Added matrix orb device vid/pids from Wayne Wylupski
+ *
+ * (19/Feb/2003) Ian Abbott
+ * For TIOCSSERIAL, set alt_speed to 0 when ASYNC_SPD_MASK value has
+ * changed to something other than ASYNC_SPD_HI, ASYNC_SPD_VHI,
+ * ASYNC_SPD_SHI or ASYNC_SPD_WARP. Also, unless ASYNC_SPD_CUST is in
+ * force, don't bother changing baud rate when custom_divisor has changed.
+ *
+ * (18/Feb/2003) Ian Abbott
+ * Fixed TIOCMGET handling to include state of DTR and RTS, the state
+ * of which are now saved by set_dtr() and set_rts().
+ * Fixed improper storage class for buf in set_dtr() and set_rts().
+ * Added FT232BM chip type and support for its extra baud rates (compared
+ * to FT8U232AM).
+ * Took account of special case divisor values for highest baud rates of
+ * FT8U232AM and FT232BM.
+ * For TIOCSSERIAL, forced alt_speed to 0 when ASYNC_SPD_CUST kludge used,
+ * as previous alt_speed setting is now stale.
+ * Moved startup code common between the startup routines for the
+ * different chip types into a common subroutine.
+ *
+ * (17/Feb/2003) Bill Ryder
+ * Added write urb buffer pool on a per device basis
+ * Added more checking for open file on callbacks (fixed OOPS)
+ * Added CrystalFontz 632 and 634 PIDs
+ * (thanx to CrystalFontz for the sample devices - they flushed out
+ * some driver bugs)
+ * Minor debugging message changes
+ * Added throttle, unthrottle and chars_in_buffer functions
+ * Fixed FTDI_SIO (the original device) bug
+ * Fixed some shutdown handling
+ *
+ *
+ *
+ *
+ * (07/Jun/2002) Kuba Ober
+ * Changed FTDI_SIO_BASE_BAUD_TO_DIVISOR macro into ftdi_baud_to_divisor
+ * function. It was getting too complex.
+ * Fix the divisor calculation logic which was setting divisor of 0.125
+ * instead of 0.5 for fractional parts of divisor equal to 5/8, 6/8, 7/8.
+ * Also make it bump up the divisor to next integer in case of 7/8 - it's
+ * a better approximation.
+ *
+ * (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
+ *
+ * (10/05/2000) gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.
+ *
+ * (09/11/2000) gkh
+ * Removed DEBUG #ifdefs with call to usb_serial_debug_data
+ *
+ * (07/19/2000) gkh
+ * Added module_init and module_exit functions to handle the fact that this
+ * 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.
+ *
+ */
+
+/* Bill Ryder - bryder@sgi.com - wrote the FTDI_SIO implementation */
+/* Thanx to FTDI for so kindly providing details of the protocol required */
+/* to talk to the device */
+/* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include <linux/serial.h>
+#include "usb-serial.h"
+#include "ftdi_sio.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.4.1"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>"
+#define DRIVER_DESC "USB FTDI Serial Converters Driver"
+
+static int debug;
+
+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)
+ *
+ * the bcdDevice value is used to differentiate FT232BM and FT245BM from
+ * the earlier FT8U232AM and FT8U232BM. For now, include all known VID/PID
+ * combinations in both tables.
+ * FIXME: perhaps bcdDevice can also identify 12MHz devices, but I don't know
+ * if those ever went into mass production. [Ian Abbott]
+ */
+
+
+static struct usb_device_id id_table_8U232AM [] = {
+ { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0, 0x3ff) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
+ { USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_634_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_547_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_633_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_631_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_635_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_640_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_642_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_VNHCPCUSB_D_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_DSS20_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2101_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2102_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2103_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2104_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2201_1_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2201_2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2202_1_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2202_2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2203_1_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2203_2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2401_1_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2401_2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2401_3_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2401_4_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2402_1_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2402_2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2402_3_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2402_4_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2403_1_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2403_2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2403_3_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2403_4_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_1_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_3_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_4_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_5_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_6_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_7_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_8_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_1_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_3_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_4_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_5_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_6_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_7_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_8_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_1_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_3_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_4_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_5_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_6_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_7_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_8_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(IDTECH_VID, IDTECH_IDT1221U_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(OCT_VID, OCT_US101_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_1, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, PROTEGO_R2X0, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_3, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_4, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_ELV_UO100_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, INSIDE_ACCESSO, 0, 0x3ff) },
+ { USB_DEVICE_VER(INTREPID_VID, INTREPID_VALUECAN_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_RM_VID, FTDI_RMCANVIEW_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0, 0x3ff) },
+ { } /* Terminating entry */
+};
+
+
+static struct usb_device_id id_table_FT232BM [] = {
+ { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_634_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_547_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_633_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_631_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_635_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_640_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_XF_642_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_VNHCPCUSB_D_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_DSS20_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_0_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_3_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_5_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_6_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_PIEGROUP_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2101_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2102_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2103_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2104_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2201_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2201_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2202_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2202_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2203_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2203_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2401_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2401_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2401_3_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2401_4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2402_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2402_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2402_3_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2402_4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2403_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2403_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2403_3_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2403_4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_3_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_5_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_6_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_7_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2801_8_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_3_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_5_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_6_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_7_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2802_8_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_3_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_5_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_6_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_7_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_8_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(IDTECH_VID, IDTECH_IDT1221U_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(OCT_VID, OCT_US101_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_1, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, PROTEGO_R2X0, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_3, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_4, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E808_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E809_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80A_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80B_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80C_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80D_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80E_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80F_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E888_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E889_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88A_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88B_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88C_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88D_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88E_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88F_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_ELV_UO100_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_SDMUSBQSS_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_MASTERDEVEL2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_FUTURE_0_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_FUTURE_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_FUTURE_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE(FTDI_VID, FTDI_CCSICDU20_0_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_CCSICDU40_1_PID) },
+ { USB_DEVICE_VER(FTDI_VID, INSIDE_ACCESSO, 0x400, 0xffff) },
+ { USB_DEVICE_VER(INTREPID_VID, INTREPID_VALUECAN_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_RM_VID, FTDI_RMCANVIEW_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0x400, 0xffff) },
+ { } /* Terminating entry */
+};
+
+
+static struct usb_device_id id_table_USB_UIRT [] = {
+ { USB_DEVICE(FTDI_VID, FTDI_USB_UIRT_PID) },
+ { } /* Terminating entry */
+};
+
+
+static struct usb_device_id id_table_HE_TIRA1 [] = {
+ { USB_DEVICE_VER(FTDI_VID, FTDI_HE_TIRA1_PID, 0x400, 0xffff) },
+ { } /* Terminating entry */
+};
+
+
+static struct usb_device_id id_table_FT2232C[] = {
+ { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
+ { } /* Terminating entry */
+};
+
+
+static struct usb_device_id id_table_combined [] = {
+ { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_633_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_631_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_635_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_640_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_642_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_DSS20_PID) },
+ { USB_DEVICE(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_VNHCPCUSB_D_PID) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_0_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_3_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_4_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_5_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_6_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID, 0x400, 0xffff) },
+ { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2101_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2102_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2103_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2104_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2201_1_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2201_2_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2202_1_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2202_2_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2203_1_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2203_2_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2401_1_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2401_2_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2401_3_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2401_4_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2402_1_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2402_2_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2402_3_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2402_4_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2403_1_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2403_2_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2403_3_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2403_4_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2801_1_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2801_2_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2801_3_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2801_4_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2801_5_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2801_6_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2801_7_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2801_8_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2802_1_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2802_2_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2802_3_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2802_4_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2802_5_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2802_6_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2802_7_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2802_8_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_1_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_2_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_3_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_4_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_5_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_6_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_7_PID) },
+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_8_PID) },
+ { USB_DEVICE(IDTECH_VID, IDTECH_IDT1221U_PID) },
+ { USB_DEVICE(OCT_VID, OCT_US101_PID) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_HE_TIRA1_PID, 0x400, 0xffff) },
+ { USB_DEVICE(FTDI_VID, FTDI_USB_UIRT_PID) },
+ { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_1) },
+ { USB_DEVICE(FTDI_VID, PROTEGO_R2X0) },
+ { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_3) },
+ { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_4) },
+ { USB_DEVICE(FTDI_VID, FTDI_ELV_UO100_PID) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_SDMUSBQSS_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_MASTERDEVEL2_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_FUTURE_0_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_FUTURE_1_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, LINX_FUTURE_2_PID, 0x400, 0xffff) },
+ { USB_DEVICE(FTDI_VID, FTDI_CCSICDU20_0_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_CCSICDU40_1_PID) },
+ { USB_DEVICE(FTDI_VID, INSIDE_ACCESSO) },
+ { USB_DEVICE(INTREPID_VID, INTREPID_VALUECAN_PID) },
+ { USB_DEVICE(INTREPID_VID, INTREPID_NEOVI_PID) },
+ { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) },
+ { USB_DEVICE(FTDI_RM_VID, FTDI_RMCANVIEW_PID) },
+ { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) },
+ { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) },
+ { USB_DEVICE(BANDB_VID, BANDB_USO9ML2_PID) },
+ { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
+static struct usb_driver ftdi_driver = {
+ .name = "ftdi_sio",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table_combined,
+};
+
+static char *ftdi_chip_name[] = {
+ [SIO] = "SIO", /* the serial part of FT8U100AX */
+ [FT8U232AM] = "FT8U232AM",
+ [FT232BM] = "FT232BM",
+ [FT2232C] = "FT2232C",
+};
+
+
+/* Constants for read urb and write urb */
+#define BUFSZ 512
+#define PKTSZ 64
+
+/* rx_flags */
+#define THROTTLED 0x01
+#define ACTUALLY_THROTTLED 0x02
+
+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 */
+ unsigned long last_dtr_rts; /* saved modem control outputs */
+ wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */
+ char prev_status, diff_status; /* Used for TIOCMIWAIT */
+ __u8 rx_flags; /* receive state flags (throttling) */
+ spinlock_t rx_lock; /* spinlock for receive state */
+
+ __u16 interface; /* FT2232C port interface (0 for FT232/245) */
+
+ int force_baud; /* if non-zero, force the baud rate to this value */
+ int force_rtscts; /* if non-zero, force RTS-CTS to always be enabled */
+};
+
+/* 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 int ftdi_FT232BM_startup (struct usb_serial *serial);
+static int ftdi_FT2232C_startup (struct usb_serial *serial);
+static int ftdi_USB_UIRT_startup (struct usb_serial *serial);
+static int ftdi_HE_TIRA1_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, const unsigned char *buf, int count);
+static int ftdi_write_room (struct usb_serial_port *port);
+static int ftdi_chars_in_buffer (struct usb_serial_port *port);
+static void ftdi_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void ftdi_process_read (struct usb_serial_port *port);
+static void ftdi_set_termios (struct usb_serial_port *port, struct termios * old);
+static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file);
+static int ftdi_tiocmset (struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear);
+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 void ftdi_throttle (struct usb_serial_port *port);
+static void ftdi_unthrottle (struct usb_serial_port *port);
+
+static unsigned short int ftdi_232am_baud_base_to_divisor (int baud, int base);
+static unsigned short int ftdi_232am_baud_to_divisor (int baud);
+static __u32 ftdi_232bm_baud_base_to_divisor (int baud, int base);
+static __u32 ftdi_232bm_baud_to_divisor (int baud);
+
+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,
+ .throttle = ftdi_throttle,
+ .unthrottle = ftdi_unthrottle,
+ .write = ftdi_write,
+ .write_room = ftdi_write_room,
+ .chars_in_buffer = ftdi_chars_in_buffer,
+ .read_bulk_callback = ftdi_read_bulk_callback,
+ .write_bulk_callback = ftdi_write_bulk_callback,
+ .tiocmget = ftdi_tiocmget,
+ .tiocmset = ftdi_tiocmset,
+ .ioctl = ftdi_ioctl,
+ .set_termios = ftdi_set_termios,
+ .break_ctl = ftdi_break_ctl,
+ .attach = ftdi_SIO_startup,
+ .shutdown = ftdi_shutdown,
+};
+
+static struct usb_serial_device_type ftdi_8U232AM_device = {
+ .owner = THIS_MODULE,
+ .name = "FTDI 8U232AM Compatible",
+ .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,
+ .throttle = ftdi_throttle,
+ .unthrottle = ftdi_unthrottle,
+ .write = ftdi_write,
+ .write_room = ftdi_write_room,
+ .chars_in_buffer = ftdi_chars_in_buffer,
+ .read_bulk_callback = ftdi_read_bulk_callback,
+ .write_bulk_callback = ftdi_write_bulk_callback,
+ .tiocmget = ftdi_tiocmget,
+ .tiocmset = ftdi_tiocmset,
+ .ioctl = ftdi_ioctl,
+ .set_termios = ftdi_set_termios,
+ .break_ctl = ftdi_break_ctl,
+ .attach = ftdi_8U232AM_startup,
+ .shutdown = ftdi_shutdown,
+};
+
+static struct usb_serial_device_type ftdi_FT232BM_device = {
+ .owner = THIS_MODULE,
+ .name = "FTDI FT232BM Compatible",
+ .id_table = id_table_FT232BM,
+ .num_interrupt_in = 0,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = ftdi_open,
+ .close = ftdi_close,
+ .throttle = ftdi_throttle,
+ .unthrottle = ftdi_unthrottle,
+ .write = ftdi_write,
+ .write_room = ftdi_write_room,
+ .chars_in_buffer = ftdi_chars_in_buffer,
+ .read_bulk_callback = ftdi_read_bulk_callback,
+ .write_bulk_callback = ftdi_write_bulk_callback,
+ .tiocmget = ftdi_tiocmget,
+ .tiocmset = ftdi_tiocmset,
+ .ioctl = ftdi_ioctl,
+ .set_termios = ftdi_set_termios,
+ .break_ctl = ftdi_break_ctl,
+ .attach = ftdi_FT232BM_startup,
+ .shutdown = ftdi_shutdown,
+};
+
+static struct usb_serial_device_type ftdi_FT2232C_device = {
+ .owner = THIS_MODULE,
+ .name = "FTDI FT2232C Compatible",
+ .id_table = id_table_FT2232C,
+ .num_interrupt_in = 0,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = ftdi_open,
+ .close = ftdi_close,
+ .throttle = ftdi_throttle,
+ .unthrottle = ftdi_unthrottle,
+ .write = ftdi_write,
+ .write_room = ftdi_write_room,
+ .chars_in_buffer = ftdi_chars_in_buffer,
+ .read_bulk_callback = ftdi_read_bulk_callback,
+ .write_bulk_callback = ftdi_write_bulk_callback,
+ .tiocmget = ftdi_tiocmget,
+ .tiocmset = ftdi_tiocmset,
+ .ioctl = ftdi_ioctl,
+ .set_termios = ftdi_set_termios,
+ .break_ctl = ftdi_break_ctl,
+ .attach = ftdi_FT2232C_startup,
+ .shutdown = ftdi_shutdown,
+};
+
+static struct usb_serial_device_type ftdi_USB_UIRT_device = {
+ .owner = THIS_MODULE,
+ .name = "USB-UIRT Infrared Tranceiver",
+ .id_table = id_table_USB_UIRT,
+ .num_interrupt_in = 0,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = ftdi_open,
+ .close = ftdi_close,
+ .throttle = ftdi_throttle,
+ .unthrottle = ftdi_unthrottle,
+ .write = ftdi_write,
+ .write_room = ftdi_write_room,
+ .chars_in_buffer = ftdi_chars_in_buffer,
+ .read_bulk_callback = ftdi_read_bulk_callback,
+ .write_bulk_callback = ftdi_write_bulk_callback,
+ .tiocmget = ftdi_tiocmget,
+ .tiocmset = ftdi_tiocmset,
+ .ioctl = ftdi_ioctl,
+ .set_termios = ftdi_set_termios,
+ .break_ctl = ftdi_break_ctl,
+ .attach = ftdi_USB_UIRT_startup,
+ .shutdown = ftdi_shutdown,
+};
+
+/* The TIRA1 is based on a FT232BM which requires a fixed baud rate of 100000
+ * and which requires RTS-CTS to be enabled. */
+static struct usb_serial_device_type ftdi_HE_TIRA1_device = {
+ .owner = THIS_MODULE,
+ .name = "Home-Electronics TIRA-1 IR Transceiver",
+ .id_table = id_table_HE_TIRA1,
+ .num_interrupt_in = 0,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = ftdi_open,
+ .close = ftdi_close,
+ .throttle = ftdi_throttle,
+ .unthrottle = ftdi_unthrottle,
+ .write = ftdi_write,
+ .write_room = ftdi_write_room,
+ .chars_in_buffer = ftdi_chars_in_buffer,
+ .read_bulk_callback = ftdi_read_bulk_callback,
+ .write_bulk_callback = ftdi_write_bulk_callback,
+ .tiocmget = ftdi_tiocmget,
+ .tiocmset = ftdi_tiocmset,
+ .ioctl = ftdi_ioctl,
+ .set_termios = ftdi_set_termios,
+ .break_ctl = ftdi_break_ctl,
+ .attach = ftdi_HE_TIRA1_startup,
+ .shutdown = ftdi_shutdown,
+};
+
+
+
+#define WDR_TIMEOUT 5000 /* default urb timeout */
+
+/* High and low are for DTR, RTS etc etc */
+#define HIGH 1
+#define LOW 0
+
+/*
+ * ***************************************************************************
+ * Utlity functions
+ * ***************************************************************************
+ */
+
+static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base)
+{
+ unsigned short int divisor;
+ int divisor3 = base / 2 / baud; // divisor shifted 3 bits to the left
+ if ((divisor3 & 0x7) == 7) divisor3 ++; // round x.7/8 up to x+1
+ divisor = divisor3 >> 3;
+ divisor3 &= 0x7;
+ if (divisor3 == 1) divisor |= 0xc000; else // 0.125
+ if (divisor3 >= 4) divisor |= 0x4000; else // 0.5
+ if (divisor3 != 0) divisor |= 0x8000; // 0.25
+ if (divisor == 1) divisor = 0; /* special case for maximum baud rate */
+ return divisor;
+}
+
+static unsigned short int ftdi_232am_baud_to_divisor(int baud)
+{
+ return(ftdi_232am_baud_base_to_divisor(baud, 48000000));
+}
+
+static __u32 ftdi_232bm_baud_base_to_divisor(int baud, int base)
+{
+ static const unsigned char divfrac[8] = { 0, 3, 2, 4, 1, 5, 6, 7 };
+ __u32 divisor;
+ int divisor3 = base / 2 / baud; // divisor shifted 3 bits to the left
+ divisor = divisor3 >> 3;
+ divisor |= (__u32)divfrac[divisor3 & 0x7] << 14;
+ /* Deal with special cases for highest baud rates. */
+ if (divisor == 1) divisor = 0; else // 1.0
+ if (divisor == 0x4001) divisor = 1; // 1.5
+ return divisor;
+}
+
+static __u32 ftdi_232bm_baud_to_divisor(int baud)
+{
+ return(ftdi_232bm_baud_base_to_divisor(baud, 48000000));
+}
+
+static int set_rts(struct usb_serial_port *port, int high_or_low)
+{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ char *buf;
+ unsigned ftdi_high_or_low;
+ int rv;
+
+ buf = kmalloc(1, GFP_NOIO);
+ if (!buf)
+ return -ENOMEM;
+
+ if (high_or_low) {
+ ftdi_high_or_low = FTDI_SIO_SET_RTS_HIGH;
+ priv->last_dtr_rts |= TIOCM_RTS;
+ } else {
+ ftdi_high_or_low = FTDI_SIO_SET_RTS_LOW;
+ priv->last_dtr_rts &= ~TIOCM_RTS;
+ }
+ rv = usb_control_msg(port->serial->dev,
+ usb_sndctrlpipe(port->serial->dev, 0),
+ FTDI_SIO_SET_MODEM_CTRL_REQUEST,
+ FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
+ ftdi_high_or_low, priv->interface,
+ buf, 0, WDR_TIMEOUT);
+
+ kfree(buf);
+ return rv;
+}
+
+
+static int set_dtr(struct usb_serial_port *port, int high_or_low)
+{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ char *buf;
+ unsigned ftdi_high_or_low;
+ int rv;
+
+ buf = kmalloc(1, GFP_NOIO);
+ if (!buf)
+ return -ENOMEM;
+
+ if (high_or_low) {
+ ftdi_high_or_low = FTDI_SIO_SET_DTR_HIGH;
+ priv->last_dtr_rts |= TIOCM_DTR;
+ } else {
+ ftdi_high_or_low = FTDI_SIO_SET_DTR_LOW;
+ priv->last_dtr_rts &= ~TIOCM_DTR;
+ }
+ rv = usb_control_msg(port->serial->dev,
+ usb_sndctrlpipe(port->serial->dev, 0),
+ FTDI_SIO_SET_MODEM_CTRL_REQUEST,
+ FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
+ ftdi_high_or_low, priv->interface,
+ buf, 0, WDR_TIMEOUT);
+
+ kfree(buf);
+ return rv;
+}
+
+
+static __u32 get_ftdi_divisor(struct usb_serial_port * port);
+
+
+static int change_speed(struct usb_serial_port *port)
+{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ char *buf;
+ __u16 urb_value;
+ __u16 urb_index;
+ __u32 urb_index_value;
+ int rv;
+
+ buf = kmalloc(1, GFP_NOIO);
+ if (!buf)
+ return -ENOMEM;
+
+ urb_index_value = get_ftdi_divisor(port);
+ urb_value = (__u16)urb_index_value;
+ urb_index = (__u16)(urb_index_value >> 16);
+ if (priv->interface) { /* FT2232C */
+ urb_index = (__u16)((urb_index << 8) | priv->interface);
+ }
+
+ rv = 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, urb_index,
+ buf, 0, 100);
+
+ kfree(buf);
+ return rv;
+}
+
+
+static __u32 get_ftdi_divisor(struct usb_serial_port * port)
+{ /* get_ftdi_divisor */
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ __u32 div_value = 0;
+ int div_okay = 1;
+ 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: div_value = ftdi_sio_b300; break;
+ case 600: div_value = ftdi_sio_b600; break;
+ case 1200: div_value = ftdi_sio_b1200; break;
+ case 2400: div_value = ftdi_sio_b2400; break;
+ case 4800: div_value = ftdi_sio_b4800; break;
+ case 9600: div_value = ftdi_sio_b9600; break;
+ case 19200: div_value = ftdi_sio_b19200; break;
+ case 38400: div_value = ftdi_sio_b38400; break;
+ case 57600: div_value = ftdi_sio_b57600; break;
+ case 115200: div_value = ftdi_sio_b115200; break;
+ } /* baud */
+ if (div_value == 0) {
+ dbg("%s - Baudrate (%d) requested is not supported", __FUNCTION__, baud);
+ div_value = ftdi_sio_b9600;
+ div_okay = 0;
+ }
+ break;
+ case FT8U232AM: /* 8U232AM chip */
+ if (baud <= 3000000) {
+ div_value = ftdi_232am_baud_to_divisor(baud);
+ } else {
+ dbg("%s - Baud rate too high!", __FUNCTION__);
+ div_value = ftdi_232am_baud_to_divisor(9600);
+ div_okay = 0;
+ }
+ break;
+ case FT232BM: /* FT232BM chip */
+ case FT2232C: /* FT2232C chip */
+ if (baud <= 3000000) {
+ div_value = ftdi_232bm_baud_to_divisor(baud);
+ } else {
+ dbg("%s - Baud rate too high!", __FUNCTION__);
+ div_value = ftdi_232bm_baud_to_divisor(9600);
+ div_okay = 0;
+ }
+ break;
+ } /* priv->chip_type */
+
+ if (div_okay) {
+ dbg("%s - Baud rate set to %d (divisor 0x%lX) on chip %s",
+ __FUNCTION__, baud, (unsigned long)div_value,
+ ftdi_chip_name[priv->chip_type]);
+ }
+
+ return(div_value);
+}
+
+
+static int get_serial_info(struct usb_serial_port * port, struct serial_struct __user * retinfo)
+{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ 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 __user * newinfo)
+{ /* set_serial_info */
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ 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)) {
+ if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
+ port->tty->alt_speed = 57600;
+ else if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
+ port->tty->alt_speed = 115200;
+ else if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
+ port->tty->alt_speed = 230400;
+ else if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
+ port->tty->alt_speed = 460800;
+ else
+ port->tty->alt_speed = 0;
+ }
+ if (((old_priv.flags & ASYNC_SPD_MASK) !=
+ (priv->flags & ASYNC_SPD_MASK)) ||
+ (((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
+ (old_priv.custom_divisor != priv->custom_divisor))) {
+ change_speed(port);
+ }
+
+ return (0);
+
+} /* set_serial_info */
+
+
+/*
+ * ***************************************************************************
+ * Sysfs Attribute
+ * ***************************************************************************
+ */
+
+static ssize_t show_latency_timer(struct device *dev, char *buf)
+{
+ struct usb_serial_port *port = to_usb_serial_port(dev);
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ struct usb_device *udev;
+ unsigned short latency = 0;
+ int rv = 0;
+
+ udev = to_usb_device(dev);
+
+ dbg("%s",__FUNCTION__);
+
+ rv = usb_control_msg(udev,
+ usb_rcvctrlpipe(udev, 0),
+ FTDI_SIO_GET_LATENCY_TIMER_REQUEST,
+ FTDI_SIO_GET_LATENCY_TIMER_REQUEST_TYPE,
+ 0, priv->interface,
+ (char*) &latency, 1, WDR_TIMEOUT);
+
+ if (rv < 0) {
+ dev_err(dev, "Unable to read latency timer: %i", rv);
+ return -EIO;
+ }
+ return sprintf(buf, "%i\n", latency);
+}
+
+/* Write a new value of the latency timer, in units of milliseconds. */
+static ssize_t store_latency_timer(struct device *dev, const char *valbuf,
+ size_t count)
+{
+ struct usb_serial_port *port = to_usb_serial_port(dev);
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ struct usb_device *udev;
+ char buf[1];
+ int v = simple_strtoul(valbuf, NULL, 10);
+ int rv = 0;
+
+ udev = to_usb_device(dev);
+
+ dbg("%s: setting latency timer = %i", __FUNCTION__, v);
+
+ rv = usb_control_msg(udev,
+ usb_sndctrlpipe(udev, 0),
+ FTDI_SIO_SET_LATENCY_TIMER_REQUEST,
+ FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE,
+ v, priv->interface,
+ buf, 0, WDR_TIMEOUT);
+
+ if (rv < 0) {
+ dev_err(dev, "Unable to write latency timer: %i", rv);
+ return -EIO;
+ }
+
+ return count;
+}
+
+/* Write an event character directly to the FTDI register. The ASCII
+ value is in the low 8 bits, with the enable bit in the 9th bit. */
+static ssize_t store_event_char(struct device *dev, const char *valbuf,
+ size_t count)
+{
+ struct usb_serial_port *port = to_usb_serial_port(dev);
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ struct usb_device *udev;
+ char buf[1];
+ int v = simple_strtoul(valbuf, NULL, 10);
+ int rv = 0;
+
+ udev = to_usb_device(dev);
+
+ dbg("%s: setting event char = %i", __FUNCTION__, v);
+
+ rv = usb_control_msg(udev,
+ usb_sndctrlpipe(udev, 0),
+ FTDI_SIO_SET_EVENT_CHAR_REQUEST,
+ FTDI_SIO_SET_EVENT_CHAR_REQUEST_TYPE,
+ v, priv->interface,
+ buf, 0, WDR_TIMEOUT);
+
+ if (rv < 0) {
+ dbg("Unable to write event character: %i", rv);
+ return -EIO;
+ }
+
+ return count;
+}
+
+static DEVICE_ATTR(latency_timer, S_IWUSR | S_IRUGO, show_latency_timer, store_latency_timer);
+static DEVICE_ATTR(event_char, S_IWUSR, NULL, store_event_char);
+
+static void create_sysfs_attrs(struct usb_serial *serial)
+{
+ struct ftdi_private *priv;
+ struct usb_device *udev;
+
+ dbg("%s",__FUNCTION__);
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ udev = serial->dev;
+
+ /* XXX I've no idea if the original SIO supports the event_char
+ * sysfs parameter, so I'm playing it safe. */
+ if (priv->chip_type != SIO) {
+ dbg("sysfs attributes for %s", ftdi_chip_name[priv->chip_type]);
+ device_create_file(&udev->dev, &dev_attr_event_char);
+ if (priv->chip_type == FT232BM || priv->chip_type == FT2232C) {
+ device_create_file(&udev->dev, &dev_attr_latency_timer);
+ }
+ }
+}
+
+static void remove_sysfs_attrs(struct usb_serial *serial)
+{
+ struct ftdi_private *priv;
+ struct usb_device *udev;
+
+ dbg("%s",__FUNCTION__);
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ udev = serial->dev;
+
+ /* XXX see create_sysfs_attrs */
+ if (priv->chip_type != SIO) {
+ device_remove_file(&udev->dev, &dev_attr_event_char);
+ if (priv->chip_type == FT232BM || priv->chip_type == FT2232C) {
+ device_remove_file(&udev->dev, &dev_attr_latency_timer);
+ }
+ }
+
+}
+
+/*
+ * ***************************************************************************
+ * FTDI driver specific functions
+ * ***************************************************************************
+ */
+
+/* Common startup subroutine */
+/* Called from ftdi_SIO_startup, etc. */
+static int ftdi_common_startup (struct usb_serial *serial)
+{
+ struct usb_serial_port *port = serial->port[0];
+ struct ftdi_private *priv;
+
+ dbg("%s",__FUNCTION__);
+
+ priv = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
+ if (!priv){
+ err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private));
+ return -ENOMEM;
+ }
+ memset(priv, 0, sizeof(*priv));
+
+ spin_lock_init(&priv->rx_lock);
+ 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;
+
+ /* Increase the size of read buffers */
+ if (port->bulk_in_buffer) {
+ kfree (port->bulk_in_buffer);
+ }
+ port->bulk_in_buffer = kmalloc (BUFSZ, GFP_KERNEL);
+ if (!port->bulk_in_buffer) {
+ kfree (priv);
+ return -ENOMEM;
+ }
+ if (port->read_urb) {
+ port->read_urb->transfer_buffer = port->bulk_in_buffer;
+ port->read_urb->transfer_buffer_length = BUFSZ;
+ }
+
+ /* Free port's existing write urb and transfer buffer. */
+ if (port->write_urb) {
+ usb_free_urb (port->write_urb);
+ port->write_urb = NULL;
+ }
+ if (port->bulk_out_buffer) {
+ kfree (port->bulk_out_buffer);
+ port->bulk_out_buffer = NULL;
+ }
+
+ usb_set_serial_port_data(serial->port[0], priv);
+
+ return (0);
+}
+
+
+/* Startup for the SIO chip */
+/* Called from usbserial:serial_probe */
+static int ftdi_SIO_startup (struct usb_serial *serial)
+{
+ struct ftdi_private *priv;
+ int err;
+
+ dbg("%s",__FUNCTION__);
+
+ err = ftdi_common_startup(serial);
+ if (err){
+ return (err);
+ }
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ priv->chip_type = SIO;
+ priv->baud_base = 12000000 / 16;
+ priv->write_offset = 1;
+
+ return (0);
+}
+
+/* Startup for the 8U232AM chip */
+/* Called from usbserial:serial_probe */
+static int ftdi_8U232AM_startup (struct usb_serial *serial)
+{ /* ftdi_8U232AM_startup */
+ struct ftdi_private *priv;
+ int err;
+
+ dbg("%s",__FUNCTION__);
+ err = ftdi_common_startup(serial);
+ if (err){
+ return (err);
+ }
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ priv->chip_type = FT8U232AM;
+ priv->baud_base = 48000000 / 2; /* Would be / 16, but FTDI supports 0.125, 0.25 and 0.5 divisor fractions! */
+
+ create_sysfs_attrs(serial);
+
+ return (0);
+} /* ftdi_8U232AM_startup */
+
+/* Startup for the FT232BM chip */
+/* Called from usbserial:serial_probe */
+static int ftdi_FT232BM_startup (struct usb_serial *serial)
+{ /* ftdi_FT232BM_startup */
+ struct ftdi_private *priv;
+ int err;
+
+ dbg("%s",__FUNCTION__);
+ err = ftdi_common_startup(serial);
+ if (err){
+ return (err);
+ }
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ priv->chip_type = FT232BM;
+ priv->baud_base = 48000000 / 2; /* Would be / 16, but FT232BM supports multiple of 0.125 divisor fractions! */
+
+ create_sysfs_attrs(serial);
+
+ return (0);
+} /* ftdi_FT232BM_startup */
+
+/* Startup for the FT2232C chip */
+/* Called from usbserial:serial_probe */
+static int ftdi_FT2232C_startup (struct usb_serial *serial)
+{ /* ftdi_FT2232C_startup */
+ struct ftdi_private *priv;
+ int err;
+ int inter;
+
+ dbg("%s",__FUNCTION__);
+ err = ftdi_common_startup(serial);
+ if (err){
+ return (err);
+ }
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ priv->chip_type = FT2232C;
+ inter = serial->interface->altsetting->desc.bInterfaceNumber;
+
+ if (inter) {
+ priv->interface = INTERFACE_B;
+ }
+ else {
+ priv->interface = INTERFACE_A;
+ }
+ priv->baud_base = 48000000 / 2; /* Would be / 16, but FT2232C supports multiple of 0.125 divisor fractions! */
+
+ create_sysfs_attrs(serial);
+
+ return (0);
+} /* ftdi_FT2232C_startup */
+
+/* Startup for the USB-UIRT device, which requires hardwired baudrate (38400 gets mapped to 312500) */
+/* Called from usbserial:serial_probe */
+static int ftdi_USB_UIRT_startup (struct usb_serial *serial)
+{ /* ftdi_USB_UIRT_startup */
+ struct ftdi_private *priv;
+ int err;
+
+ dbg("%s",__FUNCTION__);
+ err = ftdi_8U232AM_startup(serial);
+ if (err){
+ return (err);
+ }
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ priv->flags |= ASYNC_SPD_CUST;
+ priv->custom_divisor = 77;
+ priv->force_baud = B38400;
+
+ return (0);
+} /* ftdi_USB_UIRT_startup */
+
+/* Startup for the HE-TIRA1 device, which requires hardwired
+ * baudrate (38400 gets mapped to 100000) */
+static int ftdi_HE_TIRA1_startup (struct usb_serial *serial)
+{ /* ftdi_HE_TIRA1_startup */
+ struct ftdi_private *priv;
+ int err;
+
+ dbg("%s",__FUNCTION__);
+ err = ftdi_FT232BM_startup(serial);
+ if (err){
+ return (err);
+ }
+
+ priv = usb_get_serial_port_data(serial->port[0]);
+ priv->flags |= ASYNC_SPD_CUST;
+ priv->custom_divisor = 240;
+ priv->force_baud = B38400;
+ priv->force_rtscts = 1;
+
+ return (0);
+} /* ftdi_HE_TIRA1_startup */
+
+
+/* ftdi_shutdown is called from usbserial:usb_serial_disconnect
+ * it is called when the usb device is disconnected
+ *
+ * usbserial:usb_serial_disconnect
+ * calls __serial_close for each open of the port
+ * shutdown is called then (ie ftdi_shutdown)
+ */
+
+
+static void ftdi_shutdown (struct usb_serial *serial)
+{ /* ftdi_shutdown */
+
+ struct usb_serial_port *port = serial->port[0];
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+
+ dbg("%s", __FUNCTION__);
+
+ remove_sysfs_attrs(serial);
+
+ /* all open ports are closed at this point
+ * (by usbserial.c:__serial_close, which calls ftdi_close)
+ */
+
+ if (priv) {
+ usb_set_serial_port_data(port, NULL);
+ kfree(priv);
+ }
+} /* ftdi_shutdown */
+
+
+static int ftdi_open (struct usb_serial_port *port, struct file *filp)
+{ /* ftdi_open */
+ struct termios tmp_termios;
+ struct usb_device *dev = port->serial->dev;
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ 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(dev, usb_sndctrlpipe(dev, 0),
+ FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE,
+ FTDI_SIO_RESET_SIO,
+ priv->interface, 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(port, HIGH) < 0) {
+ err("%s Error from DTR HIGH urb", __FUNCTION__);
+ }
+ if (set_rts(port, HIGH) < 0){
+ err("%s Error from RTS HIGH urb", __FUNCTION__);
+ }
+
+ /* Not throttled */
+ spin_lock_irqsave(&priv->rx_lock, flags);
+ priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED);
+ spin_unlock_irqrestore(&priv->rx_lock, flags);
+
+ /* Start reading from the device */
+ usb_fill_bulk_urb(port->read_urb, dev,
+ usb_rcvbulkpipe(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, GFP_KERNEL);
+ if (result)
+ err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
+
+
+ return result;
+} /* ftdi_open */
+
+
+
+/*
+ * usbserial:__serial_close only calls ftdi_close if the point is open
+ *
+ * This only gets called when it is the last close
+ *
+ *
+ */
+
+static void ftdi_close (struct usb_serial_port *port, struct file *filp)
+{ /* ftdi_close */
+ unsigned int c_cflag = port->tty->termios->c_cflag;
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ char buf[1];
+
+ dbg("%s", __FUNCTION__);
+
+ if (c_cflag & HUPCL){
+ /* Disable flow control */
+ if (usb_control_msg(port->serial->dev,
+ usb_sndctrlpipe(port->serial->dev, 0),
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST,
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
+ 0, priv->interface, buf, 0,
+ WDR_TIMEOUT) < 0) {
+ err("error from flowcontrol urb");
+ }
+
+ /* drop DTR */
+ if (set_dtr(port, LOW) < 0){
+ err("Error from DTR LOW urb");
+ }
+ /* drop RTS */
+ if (set_rts(port, LOW) < 0) {
+ err("Error from RTS LOW urb");
+ }
+ } /* Note change no line if hupcl is off */
+
+ /* shutdown our bulk read */
+ if (port->read_urb)
+ usb_kill_urb(port->read_urb);
+} /* ftdi_close */
+
+
+
+/* The SIO requires the first byte to have:
+ * B0 1
+ * B1 0
+ * B2..7 length of message excluding byte 0
+ *
+ * The new devices do not require this byte
+ */
+static int ftdi_write (struct usb_serial_port *port,
+ const unsigned char *buf, int count)
+{ /* ftdi_write */
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ struct urb *urb;
+ unsigned char *buffer;
+ int data_offset ; /* will be 1 for the SIO and 0 otherwise */
+ int status;
+ int transfer_size;
+
+ dbg("%s port %d, %d bytes", __FUNCTION__, port->number, count);
+
+ if (count == 0) {
+ dbg("write request of 0 bytes");
+ return 0;
+ }
+
+ data_offset = priv->write_offset;
+ dbg("data_offset set to %d",data_offset);
+
+ /* Determine total transfer size */
+ transfer_size = count;
+ if (data_offset > 0) {
+ /* Original sio needs control bytes too... */
+ transfer_size += (data_offset *
+ ((count + (PKTSZ - 1 - data_offset)) /
+ (PKTSZ - data_offset)));
+ }
+
+ buffer = kmalloc (transfer_size, GFP_ATOMIC);
+ if (!buffer) {
+ err("%s ran out of kernel memory for urb ...", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ urb = usb_alloc_urb(0, GFP_ATOMIC);
+ if (!urb) {
+ err("%s - no more free urbs", __FUNCTION__);
+ kfree (buffer);
+ return -ENOMEM;
+ }
+
+ /* Copy data */
+ if (data_offset > 0) {
+ /* Original sio requires control byte at start of each packet. */
+ int user_pktsz = PKTSZ - data_offset;
+ int todo = count;
+ unsigned char *first_byte = buffer;
+ const unsigned char *current_position = buf;
+
+ while (todo > 0) {
+ if (user_pktsz > todo) {
+ user_pktsz = todo;
+ }
+ /* Write the control byte at the front of the packet*/
+ *first_byte = 1 | ((user_pktsz) << 2);
+ /* Copy data for packet */
+ memcpy (first_byte + data_offset,
+ current_position, user_pktsz);
+ first_byte += user_pktsz + data_offset;
+ current_position += user_pktsz;
+ todo -= user_pktsz;
+ }
+ } else {
+ /* No control byte required. */
+ /* Copy in the data to send */
+ memcpy (buffer, buf, count);
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size, buffer);
+
+ /* fill the buffer and send it */
+ usb_fill_bulk_urb(urb, port->serial->dev,
+ usb_sndbulkpipe(port->serial->dev, port->bulk_out_endpointAddress),
+ buffer, transfer_size,
+ ftdi_write_bulk_callback, port);
+
+ status = usb_submit_urb(urb, GFP_ATOMIC);
+ if (status) {
+ err("%s - failed submitting write urb, error %d", __FUNCTION__, status);
+ count = status;
+ kfree (buffer);
+ }
+
+ /* we are done with this urb, so let the host driver
+ * really free it when it is finished with it */
+ usb_free_urb (urb);
+
+ dbg("%s write returning: %d", __FUNCTION__, count);
+ return count;
+} /* ftdi_write */
+
+
+/* This function may get called when the device is closed */
+
+static void ftdi_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+
+ /* free up the transfer buffer, as usb_free_urb() does not do this */
+ kfree (urb->transfer_buffer);
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("nonzero write bulk status received: %d", urb->status);
+ return;
+ }
+
+ schedule_work(&port->work);
+} /* ftdi_write_bulk_callback */
+
+
+static int ftdi_write_room( struct usb_serial_port *port )
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /*
+ * We really can take anything the user throws at us
+ * but let's pick a nice big number to tell the tty
+ * layer that we have lots of free space
+ */
+ return 2048;
+} /* ftdi_write_room */
+
+
+static int ftdi_chars_in_buffer (struct usb_serial_port *port)
+{ /* ftdi_chars_in_buffer */
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /*
+ * We can't really account for how much data we
+ * have sent out, but hasn't made it through to the
+ * device, so just tell the tty layer that everything
+ * is flushed.
+ */
+ return 0;
+} /* ftdi_chars_in_buffer */
+
+
+
+static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{ /* ftdi_read_bulk_callback */
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct tty_struct *tty;
+ struct ftdi_private *priv;
+
+ if (urb->number_of_packets > 0) {
+ err("%s transfer_buffer_length %d actual_length %d number of packets %d",__FUNCTION__,
+ urb->transfer_buffer_length, urb->actual_length, urb->number_of_packets );
+ err("%s transfer_flags %x ", __FUNCTION__,urb->transfer_flags );
+ }
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (port->open_count <= 0)
+ return;
+
+ tty = port->tty;
+ if (!tty) {
+ dbg("%s - bad tty pointer - exiting",__FUNCTION__);
+ return;
+ }
+
+ priv = usb_get_serial_port_data(port);
+ if (!priv) {
+ dbg("%s - bad port private data pointer - exiting", __FUNCTION__);
+ return;
+ }
+
+ if (urb != port->read_urb) {
+ err("%s - Not my urb!", __FUNCTION__);
+ }
+
+ if (urb->status) {
+ /* This will happen at close every time so it is a dbg not an err */
+ dbg("(this is ok on close) nonzero read bulk status received: %d", urb->status);
+ return;
+ }
+
+ /* If throttled, delay receive processing until unthrottled. */
+ spin_lock(&priv->rx_lock);
+ if (priv->rx_flags & THROTTLED) {
+ dbg("Deferring read urb processing until unthrottled");
+ priv->rx_flags |= ACTUALLY_THROTTLED;
+ spin_unlock(&priv->rx_lock);
+ return;
+ }
+ spin_unlock(&priv->rx_lock);
+
+ ftdi_process_read(port);
+
+} /* ftdi_read_bulk_callback */
+
+
+static void ftdi_process_read (struct usb_serial_port *port)
+{ /* ftdi_process_read */
+ struct urb *urb;
+ struct tty_struct *tty;
+ struct ftdi_private *priv;
+ char error_flag;
+ unsigned char *data;
+
+ int i;
+ int result;
+ int need_flip;
+ int packet_offset;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (port->open_count <= 0)
+ return;
+
+ tty = port->tty;
+ if (!tty) {
+ dbg("%s - bad tty pointer - exiting",__FUNCTION__);
+ return;
+ }
+
+ priv = usb_get_serial_port_data(port);
+ if (!priv) {
+ dbg("%s - bad port private data pointer - exiting", __FUNCTION__);
+ return;
+ }
+
+ urb = port->read_urb;
+ if (!urb) {
+ dbg("%s - bad read_urb pointer - exiting", __FUNCTION__);
+ return;
+ }
+
+ data = urb->transfer_buffer;
+
+ /* The first two bytes of every read packet are status */
+ if (urb->actual_length > 2) {
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+ } else {
+ dbg("Status only: %03oo %03oo",data[0],data[1]);
+ }
+
+
+ /* TO DO -- check for hung up line and handle appropriately: */
+ /* send hangup */
+ /* 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 */
+
+ need_flip = 0;
+ for (packet_offset=0; packet_offset < urb->actual_length; packet_offset += PKTSZ) {
+ /* Compare new line status to the old one, signal if different */
+ if (priv != NULL) {
+ char new_status = data[packet_offset+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 */
+ /* errors on a packet - the order here sets the priority the */
+ /* error is returned to the tty layer */
+
+ if ( data[packet_offset+1] & FTDI_RS_OE ) {
+ error_flag = TTY_OVERRUN;
+ dbg("OVERRRUN error");
+ }
+ if ( data[packet_offset+1] & FTDI_RS_BI ) {
+ error_flag = TTY_BREAK;
+ dbg("BREAK received");
+ }
+ if ( data[packet_offset+1] & FTDI_RS_PE ) {
+ error_flag = TTY_PARITY;
+ dbg("PARITY error");
+ }
+ if ( data[packet_offset+1] & FTDI_RS_FE ) {
+ error_flag = TTY_FRAME;
+ dbg("FRAMING error");
+ }
+ if (urb->actual_length > packet_offset + 2) {
+ for (i = 2; (i < PKTSZ) && ((i+packet_offset) < urb->actual_length); ++i) {
+ /* have to make sure we don't overflow the buffer
+ with tty_insert_flip_char's */
+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ /* Note that the error flag is duplicated for
+ every character received since we don't know
+ which character it applied to */
+ tty_insert_flip_char(tty, data[packet_offset+i], error_flag);
+ }
+ need_flip = 1;
+ }
+
+#ifdef NOT_CORRECT_BUT_KEEPING_IT_FOR_NOW
+ /* if a parity error is detected you get status packets forever
+ until a character is sent without a parity error.
+ This doesn't work well since the application receives a never
+ ending stream of bad data - even though new data hasn't been sent.
+ Therefore I (bill) have taken this out.
+ However - this might make sense for framing errors and so on
+ so I am leaving the code in for now.
+ */
+ else {
+ if (error_flag != TTY_NORMAL){
+ dbg("error_flag is not normal");
+ /* In this case it is just status - if that is an error send a bad character */
+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ tty_insert_flip_char(tty, 0xff, error_flag);
+ need_flip = 1;
+ }
+ }
+#endif
+ } /* "for(packet_offset=0..." */
+
+ /* Low latency */
+ if (need_flip) {
+ tty_flip_buffer_push(tty);
+ }
+
+ /* if the port is closed stop trying to read */
+ if (port->open_count > 0){
+ /* Continue trying to always read */
+ usb_fill_bulk_urb(port->read_urb, port->serial->dev,
+ usb_rcvbulkpipe(port->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, GFP_ATOMIC);
+ if (result)
+ err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+ }
+
+ return;
+} /* ftdi_process_read */
+
+
+static void ftdi_break_ctl( struct usb_serial_port *port, int break_state )
+{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ __u16 urb_value = 0;
+ char buf[1];
+
+ /* break_state = -1 to turn on break, and 0 to turn off break */
+ /* see drivers/char/tty_io.c to see it used */
+ /* last_set_data_urb_value NEVER has the break bit set in it */
+
+ if (break_state) {
+ urb_value = priv->last_set_data_urb_value | FTDI_SIO_SET_BREAK;
+ } else {
+ urb_value = priv->last_set_data_urb_value;
+ }
+
+
+ if (usb_control_msg(port->serial->dev, usb_sndctrlpipe(port->serial->dev, 0),
+ FTDI_SIO_SET_DATA_REQUEST,
+ FTDI_SIO_SET_DATA_REQUEST_TYPE,
+ urb_value , priv->interface,
+ 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_device *dev = port->serial->dev;
+ unsigned int cflag = port->tty->termios->c_cflag;
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ __u16 urb_value; /* will hold the new flags */
+ char buf[1]; /* Perhaps I should dynamically alloc this? */
+
+ // Added for xon/xoff support
+ unsigned int iflag = port->tty->termios->c_iflag;
+ unsigned char vstop;
+ unsigned char vstart;
+
+ dbg("%s", __FUNCTION__);
+
+ /* Force baud rate if this device requires it, unless it is set to B0. */
+ if (priv->force_baud && ((port->tty->termios->c_cflag & CBAUD) != B0)) {
+ dbg("%s: forcing baud rate for this device", __FUNCTION__);
+ port->tty->termios->c_cflag &= ~CBAUD;
+ port->tty->termios->c_cflag |= priv->force_baud;
+ }
+
+ /* Force RTS-CTS if this device requires it. */
+ if (priv->force_rtscts) {
+ dbg("%s: forcing rtscts for this device", __FUNCTION__);
+ port->tty->termios->c_cflag |= CRTSCTS;
+ }
+
+ cflag = port->tty->termios->c_cflag;
+
+ /* FIXME -For this cut I don't care if the line is really changing or
+ not - so just do the change regardless - should be able to
+ compare old_termios and tty->termios */
+ /* NOTE These routines can get interrupted by
+ ftdi_sio_read_bulk_callback - need to examine what this
+ means - don't see any problems yet */
+
+ /* Set number of data bits, parity, stop bits */
+
+ urb_value = 0;
+ urb_value |= (cflag & CSTOPB ? FTDI_SIO_SET_DATA_STOP_BITS_2 :
+ FTDI_SIO_SET_DATA_STOP_BITS_1);
+ urb_value |= (cflag & PARENB ?
+ (cflag & PARODD ? FTDI_SIO_SET_DATA_PARITY_ODD :
+ FTDI_SIO_SET_DATA_PARITY_EVEN) :
+ FTDI_SIO_SET_DATA_PARITY_NONE);
+ if (cflag & CSIZE) {
+ switch (cflag & CSIZE) {
+ case CS5: urb_value |= 5; dbg("Setting CS5"); break;
+ case CS6: urb_value |= 6; dbg("Setting CS6"); break;
+ case CS7: urb_value |= 7; dbg("Setting CS7"); break;
+ case CS8: urb_value |= 8; dbg("Setting CS8"); break;
+ default:
+ err("CSIZE was set but not CS5-CS8");
+ }
+ }
+
+ /* This is needed by the break command since it uses the same command - but is
+ * or'ed with this value */
+ priv->last_set_data_urb_value = urb_value;
+
+ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ FTDI_SIO_SET_DATA_REQUEST,
+ FTDI_SIO_SET_DATA_REQUEST_TYPE,
+ urb_value , priv->interface,
+ 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(dev, usb_sndctrlpipe(dev, 0),
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST,
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
+ 0, priv->interface,
+ buf, 0, WDR_TIMEOUT) < 0) {
+ err("%s error from disable flowcontrol urb", __FUNCTION__);
+ }
+ /* Drop RTS and DTR */
+ if (set_dtr(port, LOW) < 0){
+ err("%s Error from DTR LOW urb", __FUNCTION__);
+ }
+ if (set_rts(port, 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__);
+ }
+ /* Ensure RTS and DTR are raised */
+ else if (set_dtr(port, HIGH) < 0){
+ err("%s Error from DTR HIGH urb", __FUNCTION__);
+ }
+ else if (set_rts(port, HIGH) < 0){
+ err("%s Error from RTS HIGH urb", __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(dev,
+ usb_sndctrlpipe(dev, 0),
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST,
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
+ 0 , (FTDI_SIO_RTS_CTS_HS | priv->interface),
+ buf, 0, WDR_TIMEOUT) < 0) {
+ err("urb failed to set to rts/cts flow control");
+ }
+
+ } else {
+ /*
+ * Xon/Xoff code
+ *
+ * Check the IXOFF status in the iflag component of the termios structure
+ * if IXOFF is not set, the pre-xon/xoff code is executed.
+ */
+ if (iflag & IXOFF) {
+ dbg("%s request to enable xonxoff iflag=%04x",__FUNCTION__,iflag);
+ // Try to enable the XON/XOFF on the ftdi_sio
+ // Set the vstart and vstop -- could have been done up above where
+ // a lot of other dereferencing is done but that would be very
+ // inefficient as vstart and vstop are not always needed
+ vstart=port->tty->termios->c_cc[VSTART];
+ vstop=port->tty->termios->c_cc[VSTOP];
+ urb_value=(vstop << 8) | (vstart);
+
+ if (usb_control_msg(dev,
+ usb_sndctrlpipe(dev, 0),
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST,
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
+ urb_value , (FTDI_SIO_XON_XOFF_HS
+ | priv->interface),
+ buf, 0, WDR_TIMEOUT) < 0) {
+ err("urb failed to set to xon/xoff flow control");
+ }
+ } else {
+ /* else clause to only run if cfag ! CRTSCTS and iflag ! XOFF */
+ /* CHECKME Assuming XON/XOFF handled by tty stack - not by device */
+ dbg("%s Turning off hardware flow control", __FUNCTION__);
+ if (usb_control_msg(dev,
+ usb_sndctrlpipe(dev, 0),
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST,
+ FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
+ 0, priv->interface,
+ buf, 0, WDR_TIMEOUT) < 0) {
+ err("urb failed to clear flow control");
+ }
+ }
+
+ }
+ return;
+} /* ftdi_termios */
+
+
+static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file)
+{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ unsigned char buf[2];
+ int ret;
+
+ dbg("%s TIOCMGET", __FUNCTION__);
+ switch (priv->chip_type) {
+ case SIO:
+ /* Request the status from the device */
+ if ((ret = usb_control_msg(port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0),
+ FTDI_SIO_GET_MODEM_STATUS_REQUEST,
+ 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:
+ case FT232BM:
+ case FT2232C:
+ /* 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(port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0),
+ FTDI_SIO_GET_MODEM_STATUS_REQUEST,
+ FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
+ 0, priv->interface,
+ 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 (buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
+ (buf[0] & FTDI_SIO_CTS_MASK ? TIOCM_CTS : 0) |
+ (buf[0] & FTDI_SIO_RI_MASK ? TIOCM_RI : 0) |
+ (buf[0] & FTDI_SIO_RLSD_MASK ? TIOCM_CD : 0) |
+ priv->last_dtr_rts;
+}
+
+static int ftdi_tiocmset(struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear)
+{
+ int ret;
+
+ dbg("%s TIOCMSET", __FUNCTION__);
+ if (set & TIOCM_DTR){
+ if ((ret = set_dtr(port, HIGH)) < 0) {
+ err("Urb to set DTR failed");
+ return(ret);
+ }
+ }
+ if (set & TIOCM_RTS) {
+ if ((ret = set_rts(port, HIGH)) < 0){
+ err("Urb to set RTS failed");
+ return(ret);
+ }
+ }
+
+ if (clear & TIOCM_DTR){
+ if ((ret = set_dtr(port, LOW)) < 0){
+ err("Urb to unset DTR failed");
+ return(ret);
+ }
+ }
+ if (clear & TIOCM_RTS) {
+ if ((ret = set_rts(port, LOW)) < 0){
+ err("Urb to unset RTS failed");
+ return(ret);
+ }
+ }
+ return(0);
+}
+
+
+static int ftdi_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
+{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+
+ int ret, mask;
+
+ dbg("%s cmd 0x%04x", __FUNCTION__, cmd);
+
+ /* Based on code from acm.c and others */
+ switch (cmd) {
+
+ case TIOCMBIS: /* turns on (Sets) the lines as specified by the mask */
+ dbg("%s TIOCMBIS", __FUNCTION__);
+ if (get_user(mask, (unsigned long __user *) arg))
+ return -EFAULT;
+ if (mask & TIOCM_DTR){
+ if ((ret = set_dtr(port, HIGH)) < 0) {
+ err("Urb to set DTR failed");
+ return(ret);
+ }
+ }
+ if (mask & TIOCM_RTS) {
+ if ((ret = set_rts(port, HIGH)) < 0){
+ err("Urb to set RTS failed");
+ return(ret);
+ }
+ }
+ return(0);
+ break;
+
+ case TIOCMBIC: /* turns off (Clears) the lines as specified by the mask */
+ dbg("%s TIOCMBIC", __FUNCTION__);
+ if (get_user(mask, (unsigned long __user *) arg))
+ return -EFAULT;
+ if (mask & TIOCM_DTR){
+ if ((ret = set_dtr(port, LOW)) < 0){
+ err("Urb to unset DTR failed");
+ return(ret);
+ }
+ }
+ if (mask & TIOCM_RTS) {
+ if ((ret = set_rts(port, LOW)) < 0){
+ err("Urb to unset RTS failed");
+ return(ret);
+ }
+ }
+ return(0);
+ break;
+
+ /*
+ * I had originally implemented TCSET{A,S}{,F,W} and
+ * TCGET{A,S} here separately, however when testing I
+ * found that the higher layers actually do the termios
+ * conversions themselves and pass the call onto
+ * ftdi_sio_set_termios.
+ *
+ */
+
+ case TIOCGSERIAL: /* gets serial port data */
+ return get_serial_info(port, (struct serial_struct __user *) arg);
+
+ case TIOCSSERIAL: /* sets serial port data */
+ return set_serial_info(port, (struct serial_struct __user *) 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.
+ */
+ }
+ }
+ return(0);
+ break;
+ default:
+ break;
+
+ }
+
+
+ /* This is not necessarily an error - turns out the higher layers will do
+ * some ioctls itself (see comment above)
+ */
+ dbg("%s arg not supported - it was 0x%04x - check /usr/include/asm/ioctls.h", __FUNCTION__, cmd);
+
+ return(-ENOIOCTLCMD);
+} /* ftdi_ioctl */
+
+
+static void ftdi_throttle (struct usb_serial_port *port)
+{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->rx_lock, flags);
+ priv->rx_flags |= THROTTLED;
+ spin_unlock_irqrestore(&priv->rx_lock, flags);
+}
+
+
+static void ftdi_unthrottle (struct usb_serial_port *port)
+{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+ int actually_throttled;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->rx_lock, flags);
+ actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
+ priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED);
+ spin_unlock_irqrestore(&priv->rx_lock, flags);
+
+ if (actually_throttled)
+ ftdi_process_read(port);
+}
+
+static int __init ftdi_init (void)
+{
+ int retval;
+
+ dbg("%s", __FUNCTION__);
+ retval = usb_serial_register(&ftdi_SIO_device);
+ if (retval)
+ goto failed_SIO_register;
+ retval = usb_serial_register(&ftdi_8U232AM_device);
+ if (retval)
+ goto failed_8U232AM_register;
+ retval = usb_serial_register(&ftdi_FT232BM_device);
+ if (retval)
+ goto failed_FT232BM_register;
+ retval = usb_serial_register(&ftdi_FT2232C_device);
+ if (retval)
+ goto failed_FT2232C_register;
+ retval = usb_serial_register(&ftdi_USB_UIRT_device);
+ if (retval)
+ goto failed_USB_UIRT_register;
+ retval = usb_serial_register(&ftdi_HE_TIRA1_device);
+ if (retval)
+ goto failed_HE_TIRA1_register;
+ retval = usb_register(&ftdi_driver);
+ if (retval)
+ goto failed_usb_register;
+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&ftdi_HE_TIRA1_device);
+failed_HE_TIRA1_register:
+ usb_serial_deregister(&ftdi_USB_UIRT_device);
+failed_USB_UIRT_register:
+ usb_serial_deregister(&ftdi_FT2232C_device);
+failed_FT2232C_register:
+ usb_serial_deregister(&ftdi_FT232BM_device);
+failed_FT232BM_register:
+ usb_serial_deregister(&ftdi_8U232AM_device);
+failed_8U232AM_register:
+ usb_serial_deregister(&ftdi_SIO_device);
+failed_SIO_register:
+ return retval;
+}
+
+
+static void __exit ftdi_exit (void)
+{
+
+ dbg("%s", __FUNCTION__);
+
+ usb_deregister (&ftdi_driver);
+ usb_serial_deregister (&ftdi_HE_TIRA1_device);
+ usb_serial_deregister (&ftdi_USB_UIRT_device);
+ usb_serial_deregister (&ftdi_FT2232C_device);
+ usb_serial_deregister (&ftdi_FT232BM_device);
+ usb_serial_deregister (&ftdi_8U232AM_device);
+ usb_serial_deregister (&ftdi_SIO_device);
+
+}
+
+
+module_init(ftdi_init);
+module_exit(ftdi_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
new file mode 100644
index 000000000000..be5d60bf90b9
--- /dev/null
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -0,0 +1,777 @@
+/*
+ * Definitions for the FTDI USB Single Port Serial Converter -
+ * known as FTDI_SIO (Serial Input/Output application of the chipset)
+ *
+ * The example I have is known as the USC-1000 which is available from
+ * http://www.dse.co.nz - cat no XH4214 It looks similar to this:
+ * http://www.dansdata.com/usbser.htm but I can't be sure There are other
+ * USC-1000s which don't look like my device though so beware!
+ *
+ * The device is based on the FTDI FT8U100AX chip. It has a DB25 on one side,
+ * USB on the other.
+ *
+ * Thanx to FTDI (http://www.ftdi.co.uk) for so kindly providing details
+ * of the protocol required to talk to the device and ongoing assistence
+ * during development.
+ *
+ * Bill Ryder - bryder@sgi.com formerly of Silicon Graphics, Inc.- wrote the
+ * FTDI_SIO implementation.
+ *
+ * Philipp Gühring - pg@futureware.at - added the Device ID of the USB relais
+ * from Rudolf Gugler
+ *
+ */
+
+#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_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */
+#define FTDI_8U232AM_ALT_ALT_PID 0xf3c0 /* FTDI's second alternate PID for above */
+#define FTDI_8U2232C_PID 0x6010 /* Dual channel device */
+#define FTDI_RELAIS_PID 0xFA10 /* Relais device from Rudolf Gugler */
+#define FTDI_NF_RIC_VID 0x0DCD /* Vendor Id */
+#define FTDI_NF_RIC_PID 0x0001 /* Product Id */
+
+/* www.irtrans.de device */
+#define FTDI_IRTRANS_PID 0xFC60 /* Product Id */
+
+/* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */
+/* they use the ftdi chipset for the USB interface and the vendor id is the same */
+#define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */
+#define FTDI_XF_634_PID 0xFC09 /* 634: 20x4 Character Display */
+#define FTDI_XF_547_PID 0xFC0A /* 547: Two line Display */
+#define FTDI_XF_633_PID 0xFC0B /* 633: 16x2 Character Display with Keys */
+#define FTDI_XF_631_PID 0xFC0C /* 631: 20x2 Character Display */
+#define FTDI_XF_635_PID 0xFC0D /* 635: 20x4 Character Display */
+#define FTDI_XF_640_PID 0xFC0E /* 640: Two line Display */
+#define FTDI_XF_642_PID 0xFC0F /* 642: Two line Display */
+
+/* Video Networks Limited / Homechoice in the UK use an ftdi-based device for their 1Mb */
+/* broadband internet service. The following PID is exhibited by the usb device supplied */
+/* (the VID is the standard ftdi vid (FTDI_VID) */
+#define FTDI_VNHCPCUSB_D_PID 0xfe38 /* Product Id */
+
+/*
+ * The following are the values for the Matrix Orbital LCD displays,
+ * which are the FT232BM ( similar to the 8U232AM )
+ */
+#define FTDI_MTXORB_0_PID 0xFA00 /* Matrix Orbital Product Id */
+#define FTDI_MTXORB_1_PID 0xFA01 /* Matrix Orbital Product Id */
+#define FTDI_MTXORB_2_PID 0xFA02 /* Matrix Orbital Product Id */
+#define FTDI_MTXORB_3_PID 0xFA03 /* Matrix Orbital Product Id */
+#define FTDI_MTXORB_4_PID 0xFA04 /* Matrix Orbital Product Id */
+#define FTDI_MTXORB_5_PID 0xFA05 /* Matrix Orbital Product Id */
+#define FTDI_MTXORB_6_PID 0xFA06 /* Matrix Orbital Product Id */
+
+/* Interbiometrics USB I/O Board */
+/* Developed for Interbiometrics by Rudolf Gugler */
+#define INTERBIOMETRICS_VID 0x1209
+#define INTERBIOMETRICS_IOBOARD_PID 0x1002
+#define INTERBIOMETRICS_MINI_IOBOARD_PID 0x1006
+
+/*
+ * The following are the values for the Perle Systems
+ * UltraPort USB serial converters
+ */
+#define FTDI_PERLE_ULTRAPORT_PID 0xF0C0 /* Perle UltraPort Product Id */
+
+/*
+ * The following are the values for the Sealevel SeaLINK+ adapters.
+ * (Original list sent by Tuan Hoang. Ian Abbott renamed the macros and
+ * removed some PIDs that don't seem to match any existing products.)
+ */
+#define SEALEVEL_VID 0x0c52 /* Sealevel Vendor ID */
+#define SEALEVEL_2101_PID 0x2101 /* SeaLINK+232 (2101/2105) */
+#define SEALEVEL_2102_PID 0x2102 /* SeaLINK+485 (2102) */
+#define SEALEVEL_2103_PID 0x2103 /* SeaLINK+232I (2103) */
+#define SEALEVEL_2104_PID 0x2104 /* SeaLINK+485I (2104) */
+#define SEALEVEL_2201_1_PID 0x2211 /* SeaPORT+2/232 (2201) Port 1 */
+#define SEALEVEL_2201_2_PID 0x2221 /* SeaPORT+2/232 (2201) Port 2 */
+#define SEALEVEL_2202_1_PID 0x2212 /* SeaPORT+2/485 (2202) Port 1 */
+#define SEALEVEL_2202_2_PID 0x2222 /* SeaPORT+2/485 (2202) Port 2 */
+#define SEALEVEL_2203_1_PID 0x2213 /* SeaPORT+2 (2203) Port 1 */
+#define SEALEVEL_2203_2_PID 0x2223 /* SeaPORT+2 (2203) Port 2 */
+#define SEALEVEL_2401_1_PID 0x2411 /* SeaPORT+4/232 (2401) Port 1 */
+#define SEALEVEL_2401_2_PID 0x2421 /* SeaPORT+4/232 (2401) Port 2 */
+#define SEALEVEL_2401_3_PID 0x2431 /* SeaPORT+4/232 (2401) Port 3 */
+#define SEALEVEL_2401_4_PID 0x2441 /* SeaPORT+4/232 (2401) Port 4 */
+#define SEALEVEL_2402_1_PID 0x2412 /* SeaPORT+4/485 (2402) Port 1 */
+#define SEALEVEL_2402_2_PID 0x2422 /* SeaPORT+4/485 (2402) Port 2 */
+#define SEALEVEL_2402_3_PID 0x2432 /* SeaPORT+4/485 (2402) Port 3 */
+#define SEALEVEL_2402_4_PID 0x2442 /* SeaPORT+4/485 (2402) Port 4 */
+#define SEALEVEL_2403_1_PID 0x2413 /* SeaPORT+4 (2403) Port 1 */
+#define SEALEVEL_2403_2_PID 0x2423 /* SeaPORT+4 (2403) Port 2 */
+#define SEALEVEL_2403_3_PID 0x2433 /* SeaPORT+4 (2403) Port 3 */
+#define SEALEVEL_2403_4_PID 0x2443 /* SeaPORT+4 (2403) Port 4 */
+#define SEALEVEL_2801_1_PID 0X2811 /* SeaLINK+8/232 (2801) Port 1 */
+#define SEALEVEL_2801_2_PID 0X2821 /* SeaLINK+8/232 (2801) Port 2 */
+#define SEALEVEL_2801_3_PID 0X2831 /* SeaLINK+8/232 (2801) Port 3 */
+#define SEALEVEL_2801_4_PID 0X2841 /* SeaLINK+8/232 (2801) Port 4 */
+#define SEALEVEL_2801_5_PID 0X2851 /* SeaLINK+8/232 (2801) Port 5 */
+#define SEALEVEL_2801_6_PID 0X2861 /* SeaLINK+8/232 (2801) Port 6 */
+#define SEALEVEL_2801_7_PID 0X2871 /* SeaLINK+8/232 (2801) Port 7 */
+#define SEALEVEL_2801_8_PID 0X2881 /* SeaLINK+8/232 (2801) Port 8 */
+#define SEALEVEL_2802_1_PID 0X2812 /* SeaLINK+8/485 (2802) Port 1 */
+#define SEALEVEL_2802_2_PID 0X2822 /* SeaLINK+8/485 (2802) Port 2 */
+#define SEALEVEL_2802_3_PID 0X2832 /* SeaLINK+8/485 (2802) Port 3 */
+#define SEALEVEL_2802_4_PID 0X2842 /* SeaLINK+8/485 (2802) Port 4 */
+#define SEALEVEL_2802_5_PID 0X2852 /* SeaLINK+8/485 (2802) Port 5 */
+#define SEALEVEL_2802_6_PID 0X2862 /* SeaLINK+8/485 (2802) Port 6 */
+#define SEALEVEL_2802_7_PID 0X2872 /* SeaLINK+8/485 (2802) Port 7 */
+#define SEALEVEL_2802_8_PID 0X2882 /* SeaLINK+8/485 (2802) Port 8 */
+#define SEALEVEL_2803_1_PID 0X2813 /* SeaLINK+8 (2803) Port 1 */
+#define SEALEVEL_2803_2_PID 0X2823 /* SeaLINK+8 (2803) Port 2 */
+#define SEALEVEL_2803_3_PID 0X2833 /* SeaLINK+8 (2803) Port 3 */
+#define SEALEVEL_2803_4_PID 0X2843 /* SeaLINK+8 (2803) Port 4 */
+#define SEALEVEL_2803_5_PID 0X2853 /* SeaLINK+8 (2803) Port 5 */
+#define SEALEVEL_2803_6_PID 0X2863 /* SeaLINK+8 (2803) Port 6 */
+#define SEALEVEL_2803_7_PID 0X2873 /* SeaLINK+8 (2803) Port 7 */
+#define SEALEVEL_2803_8_PID 0X2883 /* SeaLINK+8 (2803) Port 8 */
+
+/*
+ * DSS-20 Sync Station for Sony Ericsson P800
+ */
+
+#define FTDI_DSS20_PID 0xFC82
+
+/*
+ * Home Electronics (www.home-electro.com) USB gadgets
+ */
+#define FTDI_HE_TIRA1_PID 0xFA78 /* Tira-1 IR tranceiver */
+
+/* USB-UIRT - An infrared receiver and transmitter using the 8U232AM chip */
+/* http://home.earthlink.net/~jrhees/USBUIRT/index.htm */
+#define FTDI_USB_UIRT_PID 0xF850 /* Product Id */
+
+/* ELV USB Module UO100 (PID sent by Stefan Frings) */
+#define FTDI_ELV_UO100_PID 0xFB58 /* Product Id */
+
+/*
+ * Definitions for ID TECH (www.idt-net.com) devices
+ */
+#define IDTECH_VID 0x0ACD /* ID TECH Vendor ID */
+#define IDTECH_IDT1221U_PID 0x0300 /* IDT1221U USB to RS-232 adapter */
+
+/*
+ * Definitions for Omnidirectional Control Technology, Inc. devices
+ */
+#define OCT_VID 0x0B39 /* OCT vendor ID */
+/* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */
+/* Also rebadged as SIIG Inc. model US2308 */
+#define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */
+
+/* an infrared receiver for user access control with IR tags */
+#define FTDI_PIEGROUP_PID 0xF208 /* Product Id */
+
+/*
+ * Protego product ids
+ */
+#define PROTEGO_SPECIAL_1 0xFC70 /* special/unknown device */
+#define PROTEGO_R2X0 0xFC71 /* R200-USB TRNG unit (R210, R220, and R230) */
+#define PROTEGO_SPECIAL_3 0xFC72 /* special/unknown device */
+#define PROTEGO_SPECIAL_4 0xFC73 /* special/unknown device */
+
+/*
+ * Gude Analog- und Digitalsysteme GmbH
+ */
+#define FTDI_GUDEADS_E808_PID 0xE808
+#define FTDI_GUDEADS_E809_PID 0xE809
+#define FTDI_GUDEADS_E80A_PID 0xE80A
+#define FTDI_GUDEADS_E80B_PID 0xE80B
+#define FTDI_GUDEADS_E80C_PID 0xE80C
+#define FTDI_GUDEADS_E80D_PID 0xE80D
+#define FTDI_GUDEADS_E80E_PID 0xE80E
+#define FTDI_GUDEADS_E80F_PID 0xE80F
+#define FTDI_GUDEADS_E888_PID 0xE888 /* Expert ISDN Control USB */
+#define FTDI_GUDEADS_E889_PID 0xE889 /* USB RS-232 OptoBridge */
+#define FTDI_GUDEADS_E88A_PID 0xE88A
+#define FTDI_GUDEADS_E88B_PID 0xE88B
+#define FTDI_GUDEADS_E88C_PID 0xE88C
+#define FTDI_GUDEADS_E88D_PID 0xE88D
+#define FTDI_GUDEADS_E88E_PID 0xE88E
+#define FTDI_GUDEADS_E88F_PID 0xE88F
+
+/*
+ * Linx Technologies product ids
+ */
+#define LINX_SDMUSBQSS_PID 0xF448 /* Linx SDM-USB-QS-S */
+#define LINX_MASTERDEVEL2_PID 0xF449 /* Linx Master Development 2.0 */
+#define LINX_FUTURE_0_PID 0xF44A /* Linx future device */
+#define LINX_FUTURE_1_PID 0xF44B /* Linx future device */
+#define LINX_FUTURE_2_PID 0xF44C /* Linx future device */
+
+/* CCS Inc. ICDU/ICDU40 product ID - the FT232BM is used in an in-circuit-debugger */
+/* unit for PIC16's/PIC18's */
+#define FTDI_CCSICDU20_0_PID 0xF9D0
+#define FTDI_CCSICDU40_1_PID 0xF9D1
+
+/* Inside Accesso contactless reader (http://www.insidefr.com) */
+#define INSIDE_ACCESSO 0xFAD0
+
+/*
+ * Intrepid Control Systems (http://www.intrepidcs.com/) ValueCAN and NeoVI
+ */
+#define INTREPID_VID 0x093C
+#define INTREPID_VALUECAN_PID 0x0601
+#define INTREPID_NEOVI_PID 0x0701
+
+/*
+ * Falcom Wireless Communications GmbH
+ */
+#define FALCOM_VID 0x0F94 /* Vendor Id */
+#define FALCOM_TWIST_PID 0x0001 /* Falcom Twist USB GPRS modem */
+
+/*
+ * SUUNTO product ids
+ */
+#define FTDI_SUUNTO_SPORTS_PID 0xF680 /* Suunto Sports instrument */
+
+/*
+ * Definitions for B&B Electronics products.
+ */
+#define BANDB_VID 0x0856 /* B&B Electronics Vendor ID */
+#define BANDB_USOTL4_PID 0xAC01 /* USOTL4 Isolated RS-485 Converter */
+#define BANDB_USTL4_PID 0xAC02 /* USTL4 RS-485 Converter */
+#define BANDB_USO9ML2_PID 0xAC03 /* USO9ML2 Isolated RS-232 Converter */
+
+/*
+ * RM Michaelides CANview USB (http://www.rmcan.com)
+ * CAN filedbus interface adapter, addad by port GmbH www.port.de)
+ */
+#define FTDI_RM_VID 0x0403 /* Vendor Id */
+#define FTDI_RMCANVIEW_PID 0xfd60 /* Product Id */
+
+/*
+ * EVER Eco Pro UPS (http://www.ever.com.pl/)
+ */
+
+#define EVER_ECO_PRO_CDS 0xe520 /* RS-232 converter */
+
+/* Commands */
+#define FTDI_SIO_RESET 0 /* Reset the port */
+#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
+#define FTDI_SIO_SET_FLOW_CTRL 2 /* Set flow control register */
+#define FTDI_SIO_SET_BAUD_RATE 3 /* Set baud rate */
+#define FTDI_SIO_SET_DATA 4 /* Set the data characteristics of the port */
+#define FTDI_SIO_GET_MODEM_STATUS 5 /* Retrieve current value of modern status register */
+#define FTDI_SIO_SET_EVENT_CHAR 6 /* Set the event character */
+#define FTDI_SIO_SET_ERROR_CHAR 7 /* Set the error character */
+#define FTDI_SIO_SET_LATENCY_TIMER 9 /* Set the latency timer */
+#define FTDI_SIO_GET_LATENCY_TIMER 10 /* Get the latency timer */
+
+/* Port interface code for FT2232C */
+#define INTERFACE_A 1
+#define INTERFACE_B 2
+
+
+/*
+ * BmRequestType: 1100 0000b
+ * bRequest: FTDI_E2_READ
+ * wValue: 0
+ * wIndex: Address of word to read
+ * wLength: 2
+ * Data: Will return a word of data from E2Address
+ *
+ */
+
+/* Port Identifier Table */
+#define PIT_DEFAULT 0 /* SIOA */
+#define PIT_SIOA 1 /* SIOA */
+/* The device this driver is tested with one has only one port */
+#define PIT_SIOB 2 /* SIOB */
+#define PIT_PARALLEL 3 /* Parallel */
+
+/* FTDI_SIO_RESET */
+#define FTDI_SIO_RESET_REQUEST FTDI_SIO_RESET
+#define FTDI_SIO_RESET_REQUEST_TYPE 0x40
+#define FTDI_SIO_RESET_SIO 0
+#define FTDI_SIO_RESET_PURGE_RX 1
+#define FTDI_SIO_RESET_PURGE_TX 2
+
+/*
+ * BmRequestType: 0100 0000B
+ * bRequest: FTDI_SIO_RESET
+ * wValue: Control Value
+ * 0 = Reset SIO
+ * 1 = Purge RX buffer
+ * 2 = Purge TX buffer
+ * wIndex: Port
+ * wLength: 0
+ * Data: None
+ *
+ * The Reset SIO command has this effect:
+ *
+ * Sets flow control set to 'none'
+ * Event char = $0D
+ * Event trigger = disabled
+ * Purge RX buffer
+ * Purge TX buffer
+ * Clear DTR
+ * Clear RTS
+ * baud and data format not reset
+ *
+ * The Purge RX and TX buffer commands affect nothing except the buffers
+ *
+ */
+
+/* FTDI_SIO_SET_BAUDRATE */
+#define FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE 0x40
+#define FTDI_SIO_SET_BAUDRATE_REQUEST 3
+
+/*
+ * 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) & 4) ? 0x4000 // 0.5
+ * : ((BaseClock / 2 / BaudRate) & 2) ? 0x8000 // 0.25
+ * : ((BaseClock / 2 / BaudRate) & 1) ? 0xc000 // 0.125
+ * : 0)
+ *
+ * For the FT232BM, a 17th divisor bit was introduced to encode the multiples
+ * of 0.125 missing from the FT8U232AM. Bits 16 to 14 are coded as follows
+ * (the first four codes are the same as for the FT8U232AM, where bit 16 is
+ * always 0):
+ * 000 - add .000 to divisor
+ * 001 - add .500 to divisor
+ * 010 - add .250 to divisor
+ * 011 - add .125 to divisor
+ * 100 - add .375 to divisor
+ * 101 - add .625 to divisor
+ * 110 - add .750 to divisor
+ * 111 - add .875 to divisor
+ * Bits 15 to 0 of the 17-bit divisor are placed in the urb value. Bit 16 is
+ * placed in bit 0 of the urb index.
+ *
+ * Note that there are a couple of special cases to support the highest baud
+ * rates. If the calculated divisor value is 1, this needs to be replaced with
+ * 0. Additionally for the FT232BM, if the calculated divisor value is 0x4001
+ * (1.5), this needs to be replaced with 0x0001 (1) (but this divisor value is
+ * not supported by the FT8U232AM).
+ */
+
+typedef enum {
+ SIO = 1,
+ FT8U232AM = 2,
+ FT232BM = 3,
+ FT2232C = 4,
+} ftdi_chip_type_t;
+
+typedef enum {
+ ftdi_sio_b300 = 0,
+ ftdi_sio_b600 = 1,
+ ftdi_sio_b1200 = 2,
+ ftdi_sio_b2400 = 3,
+ ftdi_sio_b4800 = 4,
+ ftdi_sio_b9600 = 5,
+ ftdi_sio_b19200 = 6,
+ ftdi_sio_b38400 = 7,
+ ftdi_sio_b57600 = 8,
+ ftdi_sio_b115200 = 9
+} FTDI_SIO_baudrate_t ;
+
+/*
+ * The ftdi_8U232AM_xxMHz_byyy constants have been removed. The encoded divisor values
+ * are calculated internally.
+ */
+
+#define FTDI_SIO_SET_DATA_REQUEST FTDI_SIO_SET_DATA
+#define FTDI_SIO_SET_DATA_REQUEST_TYPE 0x40
+#define FTDI_SIO_SET_DATA_PARITY_NONE (0x0 << 8 )
+#define FTDI_SIO_SET_DATA_PARITY_ODD (0x1 << 8 )
+#define FTDI_SIO_SET_DATA_PARITY_EVEN (0x2 << 8 )
+#define FTDI_SIO_SET_DATA_PARITY_MARK (0x3 << 8 )
+#define FTDI_SIO_SET_DATA_PARITY_SPACE (0x4 << 8 )
+#define FTDI_SIO_SET_DATA_STOP_BITS_1 (0x0 << 11 )
+#define FTDI_SIO_SET_DATA_STOP_BITS_15 (0x1 << 11 )
+#define FTDI_SIO_SET_DATA_STOP_BITS_2 (0x2 << 11 )
+#define FTDI_SIO_SET_BREAK (0x1 << 14)
+/* FTDI_SIO_SET_DATA */
+
+/*
+ * BmRequestType: 0100 0000B
+ * bRequest: FTDI_SIO_SET_DATA
+ * wValue: Data characteristics (see below)
+ * wIndex: Port
+ * wLength: 0
+ * Data: No
+ *
+ * Data characteristics
+ *
+ * B0..7 Number of data bits
+ * B8..10 Parity
+ * 0 = None
+ * 1 = Odd
+ * 2 = Even
+ * 3 = Mark
+ * 4 = Space
+ * B11..13 Stop Bits
+ * 0 = 1
+ * 1 = 1.5
+ * 2 = 2
+ * B14
+ * 1 = TX ON (break)
+ * 0 = TX OFF (normal state)
+ * B15 Reserved
+ *
+ */
+
+
+
+/* FTDI_SIO_MODEM_CTRL */
+#define FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE 0x40
+#define FTDI_SIO_SET_MODEM_CTRL_REQUEST FTDI_SIO_MODEM_CTRL
+
+/*
+ * BmRequestType: 0100 0000B
+ * bRequest: FTDI_SIO_MODEM_CTRL
+ * wValue: ControlValue (see below)
+ * wIndex: Port
+ * wLength: 0
+ * Data: None
+ *
+ * NOTE: If the device is in RTS/CTS flow control, the RTS set by this
+ * command will be IGNORED without an error being returned
+ * Also - you can not set DTR and RTS with one control message
+ */
+
+#define FTDI_SIO_SET_DTR_MASK 0x1
+#define FTDI_SIO_SET_DTR_HIGH ( 1 | ( FTDI_SIO_SET_DTR_MASK << 8))
+#define FTDI_SIO_SET_DTR_LOW ( 0 | ( FTDI_SIO_SET_DTR_MASK << 8))
+#define FTDI_SIO_SET_RTS_MASK 0x2
+#define FTDI_SIO_SET_RTS_HIGH ( 2 | ( FTDI_SIO_SET_RTS_MASK << 8 ))
+#define FTDI_SIO_SET_RTS_LOW ( 0 | ( FTDI_SIO_SET_RTS_MASK << 8 ))
+
+/*
+ * ControlValue
+ * B0 DTR state
+ * 0 = reset
+ * 1 = set
+ * B1 RTS state
+ * 0 = reset
+ * 1 = set
+ * B2..7 Reserved
+ * B8 DTR state enable
+ * 0 = ignore
+ * 1 = use DTR state
+ * B9 RTS state enable
+ * 0 = ignore
+ * 1 = use RTS state
+ * B10..15 Reserved
+ */
+
+/* FTDI_SIO_SET_FLOW_CTRL */
+#define FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE 0x40
+#define FTDI_SIO_SET_FLOW_CTRL_REQUEST FTDI_SIO_SET_FLOW_CTRL
+#define FTDI_SIO_DISABLE_FLOW_CTRL 0x0
+#define FTDI_SIO_RTS_CTS_HS (0x1 << 8)
+#define FTDI_SIO_DTR_DSR_HS (0x2 << 8)
+#define FTDI_SIO_XON_XOFF_HS (0x4 << 8)
+/*
+ * BmRequestType: 0100 0000b
+ * bRequest: FTDI_SIO_SET_FLOW_CTRL
+ * wValue: Xoff/Xon
+ * wIndex: Protocol/Port - hIndex is protocl / lIndex is port
+ * wLength: 0
+ * Data: None
+ *
+ * hIndex protocol is:
+ * B0 Output handshaking using RTS/CTS
+ * 0 = disabled
+ * 1 = enabled
+ * B1 Output handshaking using DTR/DSR
+ * 0 = disabled
+ * 1 = enabled
+ * B2 Xon/Xoff handshaking
+ * 0 = disabled
+ * 1 = enabled
+ *
+ * A value of zero in the hIndex field disables handshaking
+ *
+ * If Xon/Xoff handshaking is specified, the hValue field should contain the XOFF character
+ * and the lValue field contains the XON character.
+ */
+
+/*
+ * FTDI_SIO_GET_LATENCY_TIMER
+ *
+ * Set the timeout interval. The FTDI collects data from the slave
+ * device, transmitting it to the host when either A) 62 bytes are
+ * received, or B) the timeout interval has elapsed and the buffer
+ * contains at least 1 byte. Setting this value to a small number
+ * can dramatically improve performance for applications which send
+ * small packets, since the default value is 16ms.
+ */
+#define FTDI_SIO_GET_LATENCY_TIMER_REQUEST FTDI_SIO_GET_LATENCY_TIMER
+#define FTDI_SIO_GET_LATENCY_TIMER_REQUEST_TYPE 0xC0
+
+/*
+ * BmRequestType: 1100 0000b
+ * bRequest: FTDI_SIO_GET_LATENCY_TIMER
+ * wValue: 0
+ * wIndex: Port
+ * wLength: 0
+ * Data: latency (on return)
+ */
+
+/*
+ * FTDI_SIO_SET_LATENCY_TIMER
+ *
+ * Set the timeout interval. The FTDI collects data from the slave
+ * device, transmitting it to the host when either A) 62 bytes are
+ * received, or B) the timeout interval has elapsed and the buffer
+ * contains at least 1 byte. Setting this value to a small number
+ * can dramatically improve performance for applications which send
+ * small packets, since the default value is 16ms.
+ */
+#define FTDI_SIO_SET_LATENCY_TIMER_REQUEST FTDI_SIO_SET_LATENCY_TIMER
+#define FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE 0x40
+
+/*
+ * BmRequestType: 0100 0000b
+ * bRequest: FTDI_SIO_SET_LATENCY_TIMER
+ * wValue: Latency (milliseconds)
+ * wIndex: Port
+ * wLength: 0
+ * Data: None
+ *
+ * wValue:
+ * B0..7 Latency timer
+ * B8..15 0
+ *
+ */
+
+/*
+ * FTDI_SIO_SET_EVENT_CHAR
+ *
+ * Set the special event character for the specified communications port.
+ * If the device sees this character it will immediately return the
+ * data read so far - rather than wait 40ms or until 62 bytes are read
+ * which is what normally happens.
+ */
+
+
+#define FTDI_SIO_SET_EVENT_CHAR_REQUEST FTDI_SIO_SET_EVENT_CHAR
+#define FTDI_SIO_SET_EVENT_CHAR_REQUEST_TYPE 0x40
+
+
+/*
+ * BmRequestType: 0100 0000b
+ * bRequest: FTDI_SIO_SET_EVENT_CHAR
+ * wValue: EventChar
+ * wIndex: Port
+ * wLength: 0
+ * Data: None
+ *
+ * wValue:
+ * B0..7 Event Character
+ * B8 Event Character Processing
+ * 0 = disabled
+ * 1 = enabled
+ * B9..15 Reserved
+ *
+ */
+
+/* FTDI_SIO_SET_ERROR_CHAR */
+
+/* Set the parity error replacement character for the specified communications port */
+
+/*
+ * BmRequestType: 0100 0000b
+ * bRequest: FTDI_SIO_SET_EVENT_CHAR
+ * wValue: Error Char
+ * wIndex: Port
+ * wLength: 0
+ * Data: None
+ *
+ *Error Char
+ * B0..7 Error Character
+ * B8 Error Character Processing
+ * 0 = disabled
+ * 1 = enabled
+ * B9..15 Reserved
+ *
+ */
+
+/* FTDI_SIO_GET_MODEM_STATUS */
+/* Retreive the current value of the modem status register */
+
+#define FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE 0xc0
+#define FTDI_SIO_GET_MODEM_STATUS_REQUEST FTDI_SIO_GET_MODEM_STATUS
+#define FTDI_SIO_CTS_MASK 0x10
+#define FTDI_SIO_DSR_MASK 0x20
+#define FTDI_SIO_RI_MASK 0x40
+#define FTDI_SIO_RLSD_MASK 0x80
+/*
+ * BmRequestType: 1100 0000b
+ * bRequest: FTDI_SIO_GET_MODEM_STATUS
+ * wValue: zero
+ * wIndex: Port
+ * wLength: 1
+ * Data: Status
+ *
+ * One byte of data is returned
+ * B0..3 0
+ * B4 CTS
+ * 0 = inactive
+ * 1 = active
+ * B5 DSR
+ * 0 = inactive
+ * 1 = active
+ * B6 Ring Indicator (RI)
+ * 0 = inactive
+ * 1 = active
+ * B7 Receive Line Signal Detect (RLSD)
+ * 0 = inactive
+ * 1 = active
+ */
+
+
+
+/* Descriptors returned by the device
+ *
+ * Device Descriptor
+ *
+ * Offset Field Size Value Description
+ * 0 bLength 1 0x12 Size of descriptor in bytes
+ * 1 bDescriptorType 1 0x01 DEVICE Descriptor Type
+ * 2 bcdUSB 2 0x0110 USB Spec Release Number
+ * 4 bDeviceClass 1 0x00 Class Code
+ * 5 bDeviceSubClass 1 0x00 SubClass Code
+ * 6 bDeviceProtocol 1 0x00 Protocol Code
+ * 7 bMaxPacketSize0 1 0x08 Maximum packet size for endpoint 0
+ * 8 idVendor 2 0x0403 Vendor ID
+ * 10 idProduct 2 0x8372 Product ID (FTDI_SIO_PID)
+ * 12 bcdDevice 2 0x0001 Device release number
+ * 14 iManufacturer 1 0x01 Index of man. string desc
+ * 15 iProduct 1 0x02 Index of prod string desc
+ * 16 iSerialNumber 1 0x02 Index of serial nmr string desc
+ * 17 bNumConfigurations 1 0x01 Number of possible configurations
+ *
+ * Configuration Descriptor
+ *
+ * Offset Field Size Value
+ * 0 bLength 1 0x09 Size of descriptor in bytes
+ * 1 bDescriptorType 1 0x02 CONFIGURATION Descriptor Type
+ * 2 wTotalLength 2 0x0020 Total length of data
+ * 4 bNumInterfaces 1 0x01 Number of interfaces supported
+ * 5 bConfigurationValue 1 0x01 Argument for SetCOnfiguration() req
+ * 6 iConfiguration 1 0x02 Index of config string descriptor
+ * 7 bmAttributes 1 0x20 Config characteristics Remote Wakeup
+ * 8 MaxPower 1 0x1E Max power consumption
+ *
+ * Interface Descriptor
+ *
+ * Offset Field Size Value
+ * 0 bLength 1 0x09 Size of descriptor in bytes
+ * 1 bDescriptorType 1 0x04 INTERFACE Descriptor Type
+ * 2 bInterfaceNumber 1 0x00 Number of interface
+ * 3 bAlternateSetting 1 0x00 Value used to select alternate
+ * 4 bNumEndpoints 1 0x02 Number of endpoints
+ * 5 bInterfaceClass 1 0xFF Class Code
+ * 6 bInterfaceSubClass 1 0xFF Subclass Code
+ * 7 bInterfaceProtocol 1 0xFF Protocol Code
+ * 8 iInterface 1 0x02 Index of interface string description
+ *
+ * IN Endpoint Descriptor
+ *
+ * Offset Field Size Value
+ * 0 bLength 1 0x07 Size of descriptor in bytes
+ * 1 bDescriptorType 1 0x05 ENDPOINT descriptor type
+ * 2 bEndpointAddress 1 0x82 Address of endpoint
+ * 3 bmAttributes 1 0x02 Endpoint attributes - Bulk
+ * 4 bNumEndpoints 2 0x0040 maximum packet size
+ * 5 bInterval 1 0x00 Interval for polling endpoint
+ *
+ * OUT Endpoint Descriptor
+ *
+ * Offset Field Size Value
+ * 0 bLength 1 0x07 Size of descriptor in bytes
+ * 1 bDescriptorType 1 0x05 ENDPOINT descriptor type
+ * 2 bEndpointAddress 1 0x02 Address of endpoint
+ * 3 bmAttributes 1 0x02 Endpoint attributes - Bulk
+ * 4 bNumEndpoints 2 0x0040 maximum packet size
+ * 5 bInterval 1 0x00 Interval for polling endpoint
+ *
+ * DATA FORMAT
+ *
+ * IN Endpoint
+ *
+ * The device reserves the first two bytes of data on this endpoint to contain the current
+ * values of the modem and line status registers. In the absence of data, the device
+ * generates a message consisting of these two status bytes every 40 ms
+ *
+ * Byte 0: Modem Status
+ *
+ * Offset Description
+ * B0 Reserved - must be 1
+ * B1 Reserved - must be 0
+ * B2 Reserved - must be 0
+ * B3 Reserved - must be 0
+ * B4 Clear to Send (CTS)
+ * B5 Data Set Ready (DSR)
+ * B6 Ring Indicator (RI)
+ * B7 Receive Line Signal Detect (RLSD)
+ *
+ * Byte 1: Line Status
+ *
+ * Offset Description
+ * B0 Data Ready (DR)
+ * B1 Overrun Error (OE)
+ * B2 Parity Error (PE)
+ * B3 Framing Error (FE)
+ * B4 Break Interrupt (BI)
+ * B5 Transmitter Holding Register (THRE)
+ * B6 Transmitter Empty (TEMT)
+ * 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)
+#define FTDI_RS_FE (1<<3)
+#define FTDI_RS_BI (1<<4)
+#define FTDI_RS_THRE (1<<5)
+#define FTDI_RS_TEMT (1<<6)
+#define FTDI_RS_FIFO (1<<7)
+
+/*
+ * OUT Endpoint
+ *
+ * This device reserves the first bytes of data on this endpoint contain the length
+ * and port identifier of the message. For the FTDI USB Serial converter the port
+ * identifier is always 1.
+ *
+ * Byte 0: Line Status
+ *
+ * Offset Description
+ * B0 Reserved - must be 1
+ * B1 Reserved - must be 0
+ * B2..7 Length of message - (not including Byte 0)
+ *
+ */
+
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
new file mode 100644
index 000000000000..2ef614d5c8f2
--- /dev/null
+++ b/drivers/usb/serial/garmin_gps.c
@@ -0,0 +1,1541 @@
+/*
+ * Garmin GPS driver
+ *
+ * Copyright (C) 2004 Hermann Kneissel herkne@users.sourceforge.net
+ *
+ * The latest version of the driver can be found at
+ * http://sourceforge.net/projects/garmin-gps/
+ *
+ * This driver has been derived from v2.1 of the visor driver.
+ *
+ * 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 USA
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/timer.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+
+/* the mode to be set when the port ist opened */
+static int initial_mode = 1;
+
+/* debug flag */
+static int debug = 0;
+
+#include "usb-serial.h"
+
+#define GARMIN_VENDOR_ID 0x091E
+
+/*
+ * Version Information
+ */
+
+#define VERSION_MAJOR 0
+#define VERSION_MINOR 23
+
+#define _STR(s) #s
+#define _DRIVER_VERSION(a,b) "v" _STR(a) "." _STR(b)
+#define DRIVER_VERSION _DRIVER_VERSION(VERSION_MAJOR, VERSION_MINOR)
+#define DRIVER_AUTHOR "hermann kneissel"
+#define DRIVER_DESC "garmin gps driver"
+
+/* error codes returned by the driver */
+#define EINVPKT 1000 /* invalid packet structure */
+
+
+// size of the header of a packet using the usb protocol
+#define GARMIN_PKTHDR_LENGTH 12
+
+// max. possible size of a packet using the serial protocol
+#define MAX_SERIAL_PKT_SIZ (3+255+3)
+
+// max. possible size of a packet with worst case stuffing
+#define MAX_SERIAL_PKT_SIZ_STUFFED MAX_SERIAL_PKT_SIZ+256
+
+// size of a buffer able to hold a complete (no stuffing) packet
+// (the document protocol does not contain packets with a larger
+// size, but in theory a packet may be 64k+12 bytes - if in
+// later protocol versions larger packet sizes occur, this value
+// should be increased accordingly, so the input buffer is always
+// large enough the store a complete packet inclusive header)
+#define GPS_IN_BUFSIZ (GARMIN_PKTHDR_LENGTH+MAX_SERIAL_PKT_SIZ)
+
+// size of a buffer able to hold a complete (incl. stuffing) packet
+#define GPS_OUT_BUFSIZ (GARMIN_PKTHDR_LENGTH+MAX_SERIAL_PKT_SIZ_STUFFED)
+
+// where to place the packet id of a serial packet, so we can
+// prepend the usb-packet header without the need to move the
+// packets data
+#define GSP_INITIAL_OFFSET (GARMIN_PKTHDR_LENGTH-2)
+
+// max. size of incoming private packets (header+1 param)
+#define PRIVPKTSIZ (GARMIN_PKTHDR_LENGTH+4)
+
+#define GARMIN_LAYERID_TRANSPORT 0
+#define GARMIN_LAYERID_APPL 20
+// our own layer-id to use for some control mechanisms
+#define GARMIN_LAYERID_PRIVATE 0x01106E4B
+
+#define GARMIN_PKTID_PVT_DATA 51
+#define GARMIN_PKTID_L001_COMMAND_DATA 10
+
+#define CMND_ABORT_TRANSFER 0
+
+// packet ids used in private layer
+#define PRIV_PKTID_SET_DEBUG 1
+#define PRIV_PKTID_SET_MODE 2
+#define PRIV_PKTID_INFO_REQ 3
+#define PRIV_PKTID_INFO_RESP 4
+#define PRIV_PKTID_RESET_REQ 5
+#define PRIV_PKTID_SET_DEF_MODE 6
+
+
+#define ETX 0x03
+#define DLE 0x10
+#define ACK 0x06
+#define NAK 0x15
+
+/* structure used to queue incoming packets */
+struct garmin_packet {
+ struct list_head list;
+ int seq;
+ int size; // the real size of the data array, always > 0
+ __u8 data[1];
+};
+
+/* structure used to keep the current state of the driver */
+struct garmin_data {
+ __u8 state;
+ __u16 flags;
+ __u8 mode;
+ __u8 ignorePkts;
+ __u8 count;
+ __u8 pkt_id;
+ __u32 serial_num;
+ struct timer_list timer;
+ struct usb_serial_port *port;
+ int seq_counter;
+ int insize;
+ int outsize;
+ __u8 inbuffer [GPS_IN_BUFSIZ]; /* tty -> usb */
+ __u8 outbuffer[GPS_OUT_BUFSIZ]; /* usb -> tty */
+ __u8 privpkt[4*6];
+ spinlock_t lock;
+ struct list_head pktlist;
+};
+
+
+#define STATE_NEW 0
+#define STATE_INITIAL_DELAY 1
+#define STATE_TIMEOUT 2
+#define STATE_SESSION_REQ1 3
+#define STATE_SESSION_REQ2 4
+#define STATE_ACTIVE 5
+
+#define STATE_RESET 8
+#define STATE_DISCONNECTED 9
+#define STATE_WAIT_TTY_ACK 10
+#define STATE_GSP_WAIT_DATA 11
+
+#define MODE_NATIVE 0
+#define MODE_GARMIN_SERIAL 1
+
+// Flags used in garmin_data.flags:
+#define FLAGS_SESSION_REPLY_MASK 0x00C0
+#define FLAGS_SESSION_REPLY1_SEEN 0x0080
+#define FLAGS_SESSION_REPLY2_SEEN 0x0040
+#define FLAGS_BULK_IN_ACTIVE 0x0020
+#define FLAGS_THROTTLED 0x0010
+#define CLEAR_HALT_REQUIRED 0x0001
+
+#define FLAGS_QUEUING 0x0100
+#define FLAGS_APP_RESP_SEEN 0x0200
+#define FLAGS_APP_REQ_SEEN 0x0400
+#define FLAGS_DROP_DATA 0x0800
+
+#define FLAGS_GSP_SKIP 0x1000
+#define FLAGS_GSP_DLESEEN 0x2000
+
+
+
+
+
+
+/* function prototypes */
+static void gsp_next_packet(struct garmin_data * garmin_data_p);
+static int garmin_write_bulk(struct usb_serial_port *port,
+ const unsigned char *buf, int count);
+
+/* some special packets to be send or received */
+static unsigned char const GARMIN_START_SESSION_REQ[]
+ = { 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0 };
+static unsigned char const GARMIN_START_SESSION_REQ2[]
+ = { 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0 };
+static unsigned char const GARMIN_START_SESSION_REPLY[]
+ = { 0, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0 };
+static unsigned char const GARMIN_SESSION_ACTIVE_REPLY[]
+ = { 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 0, 16, 0, 0 };
+static unsigned char const GARMIN_BULK_IN_AVAIL_REPLY[]
+ = { 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 };
+static unsigned char const GARMIN_APP_LAYER_REPLY[]
+ = { 0x14, 0, 0, 0 };
+static unsigned char const GARMIN_START_PVT_REQ[]
+ = { 20, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 49, 0 };
+static unsigned char const GARMIN_STOP_PVT_REQ[]
+ = { 20, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 50, 0 };
+static unsigned char const GARMIN_STOP_TRANSFER_REQ[]
+ = { 20, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 0, 0 };
+static unsigned char const GARMIN_STOP_TRANSFER_REQ_V2[]
+ = { 20, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0 };
+static unsigned char const PRIVATE_REQ[]
+ = { 0x4B, 0x6E, 0x10, 0x01, 0xFF, 0, 0, 0, 0xFF, 0, 0, 0 };
+
+
+
+static struct usb_device_id id_table [] = {
+ /* the same device id seems to be used by all usb enabled gps devices */
+ { USB_DEVICE(GARMIN_VENDOR_ID, 3 ) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver garmin_driver = {
+ .owner = THIS_MODULE,
+ .name = "garmin_gps",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table,
+};
+
+
+static inline int noResponseFromAppLayer(struct garmin_data * garmin_data_p)
+{
+ return ((garmin_data_p->flags
+ & (FLAGS_APP_REQ_SEEN|FLAGS_APP_RESP_SEEN))
+ == FLAGS_APP_REQ_SEEN);
+}
+
+
+static inline int getLayerId(const __u8 *usbPacket)
+{
+ return __le32_to_cpup((__le32 *)(usbPacket));
+}
+
+static inline int getPacketId(const __u8 *usbPacket)
+{
+ return __le32_to_cpup((__le32 *)(usbPacket+4));
+}
+
+static inline int getDataLength(const __u8 *usbPacket)
+{
+ return __le32_to_cpup((__le32 *)(usbPacket+8));
+}
+
+
+/*
+ * check if the usb-packet in buf contains an abort-transfer command.
+ * (if yes, all queued data will be dropped)
+ */
+static inline int isAbortTrfCmnd(const unsigned char *buf)
+{
+ if (0 == memcmp(buf, GARMIN_STOP_TRANSFER_REQ,
+ sizeof(GARMIN_STOP_TRANSFER_REQ)) ||
+ 0 == memcmp(buf, GARMIN_STOP_TRANSFER_REQ_V2,
+ sizeof(GARMIN_STOP_TRANSFER_REQ_V2)))
+ return 1;
+ else
+ return 0;
+}
+
+
+
+static void send_to_tty(struct usb_serial_port *port,
+ char *data, unsigned int actual_length)
+{
+ struct tty_struct *tty = port->tty;
+ int i;
+
+ if (tty && actual_length) {
+
+ usb_serial_debug_data(debug, &port->dev,
+ __FUNCTION__, actual_length, data);
+
+ for (i = 0; i < actual_length ; ++i) {
+ /* if we insert more than TTY_FLIPBUF_SIZE characters,
+ we drop them. */
+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ /* this doesn't actually push the data through unless
+ tty->low_latency is set */
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+}
+
+
+/******************************************************************************
+ * packet queue handling
+ ******************************************************************************/
+
+/*
+ * queue a received (usb-)packet for later processing
+ */
+static int pkt_add(struct garmin_data * garmin_data_p,
+ unsigned char *data, unsigned int data_length)
+{
+ int result = 0;
+ unsigned long flags;
+ struct garmin_packet *pkt;
+
+ /* process only packets containg data ... */
+ if (data_length) {
+ garmin_data_p->flags |= FLAGS_QUEUING;
+ pkt = kmalloc(sizeof(struct garmin_packet)+data_length,
+ GFP_ATOMIC);
+ if (pkt == NULL) {
+ dev_err(&garmin_data_p->port->dev, "out of memory\n");
+ return 0;
+ }
+ pkt->size = data_length;
+ memcpy(pkt->data, data, data_length);
+
+ spin_lock_irqsave(&garmin_data_p->lock, flags);
+ result = list_empty(&garmin_data_p->pktlist);
+ pkt->seq = garmin_data_p->seq_counter++;
+ list_add_tail(&pkt->list, &garmin_data_p->pktlist);
+ spin_unlock_irqrestore(&garmin_data_p->lock, flags);
+
+ /* in serial mode, if someone is waiting for data from
+ the device, iconvert and send the next packet to tty. */
+ if (result && (garmin_data_p->state == STATE_GSP_WAIT_DATA)) {
+ gsp_next_packet(garmin_data_p);
+ }
+ }
+ return result;
+}
+
+
+/* get the next pending packet */
+static struct garmin_packet *pkt_pop(struct garmin_data * garmin_data_p)
+{
+ unsigned long flags;
+ struct garmin_packet *result = NULL;
+
+ spin_lock_irqsave(&garmin_data_p->lock, flags);
+ if (!list_empty(&garmin_data_p->pktlist)) {
+ result = (struct garmin_packet *)garmin_data_p->pktlist.next;
+ list_del(&result->list);
+ }
+ spin_unlock_irqrestore(&garmin_data_p->lock, flags);
+ return result;
+}
+
+
+/* free up all queued data */
+static void pkt_clear(struct garmin_data * garmin_data_p)
+{
+ unsigned long flags;
+ struct garmin_packet *result = NULL;
+
+ dbg("%s", __FUNCTION__);
+
+ spin_lock_irqsave(&garmin_data_p->lock, flags);
+ while (!list_empty(&garmin_data_p->pktlist)) {
+ result = (struct garmin_packet *)garmin_data_p->pktlist.next;
+ list_del(&result->list);
+ kfree(result);
+ }
+ spin_unlock_irqrestore(&garmin_data_p->lock, flags);
+}
+
+
+/******************************************************************************
+ * garmin serial protocol handling handling
+ ******************************************************************************/
+
+/* send an ack packet back to the tty */
+static int gsp_send_ack(struct garmin_data * garmin_data_p, __u8 pkt_id)
+{
+ __u8 pkt[10];
+ __u8 cksum = 0;
+ __u8 *ptr = pkt;
+ unsigned l = 0;
+
+ dbg("%s - pkt-id: 0x%X.", __FUNCTION__, 0xFF & pkt_id);
+
+ *ptr++ = DLE;
+ *ptr++ = ACK;
+ cksum += ACK;
+
+ *ptr++ = 2;
+ cksum += 2;
+
+ *ptr++ = pkt_id;
+ cksum += pkt_id;
+
+ if (pkt_id == DLE) {
+ *ptr++ = DLE;
+ }
+
+ *ptr++ = 0;
+ *ptr++ = 0xFF & (-cksum);
+ *ptr++ = DLE;
+ *ptr++ = ETX;
+
+ l = ptr-pkt;
+
+ send_to_tty(garmin_data_p->port, pkt, l);
+ return 0;
+}
+
+
+
+/*
+ * called for a complete packet received from tty layer
+ *
+ * the complete packet (pkzid ... cksum) is in garmin_data_p->inbuf starting
+ * at GSP_INITIAL_OFFSET.
+ *
+ * count - number of bytes in the input buffer including space reserved for
+ * the usb header: GSP_INITIAL_OFFSET + number of bytes in packet
+ * (including pkt-id, data-length a. cksum)
+ */
+static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
+{
+ const __u8* recpkt = garmin_data_p->inbuffer+GSP_INITIAL_OFFSET;
+ __le32 *usbdata = (__le32 *) garmin_data_p->inbuffer;
+
+ int cksum = 0;
+ int n = 0;
+ int pktid = recpkt[0];
+ int size = recpkt[1];
+
+ usb_serial_debug_data(debug, &garmin_data_p->port->dev,
+ __FUNCTION__, count-GSP_INITIAL_OFFSET, recpkt);
+
+ if (size != (count-GSP_INITIAL_OFFSET-3)) {
+ dbg("%s - invalid size, expected %d bytes, got %d",
+ __FUNCTION__, size, (count-GSP_INITIAL_OFFSET-3));
+ return -EINVPKT;
+ }
+
+ cksum += *recpkt++;
+ cksum += *recpkt++;
+
+ // sanity check, remove after test ...
+ if ((__u8*)&(usbdata[3]) != recpkt) {
+ dbg("%s - ptr mismatch %p - %p",
+ __FUNCTION__, &(usbdata[4]), recpkt);
+ return -EINVPKT;
+ }
+
+ while (n < size) {
+ cksum += *recpkt++;
+ n++;
+ }
+
+ if ((0xff & (cksum + *recpkt)) != 0) {
+ dbg("%s - invalid checksum, expected %02x, got %02x",
+ __FUNCTION__, 0xff & -cksum, 0xff & *recpkt);
+ return -EINVPKT;
+ }
+
+ usbdata[0] = __cpu_to_le32(GARMIN_LAYERID_APPL);
+ usbdata[1] = __cpu_to_le32(pktid);
+ usbdata[2] = __cpu_to_le32(size);
+
+ garmin_write_bulk (garmin_data_p->port, garmin_data_p->inbuffer,
+ GARMIN_PKTHDR_LENGTH+size);
+
+ /* if this was an abort-transfer command, flush all
+ queued data. */
+ if (isAbortTrfCmnd(garmin_data_p->inbuffer)) {
+ garmin_data_p->flags |= FLAGS_DROP_DATA;
+ pkt_clear(garmin_data_p);
+ }
+
+ return count;
+}
+
+
+
+/*
+ * Called for data received from tty
+ *
+ * buf contains the data read, it may span more than one packet or even
+ * incomplete packets
+ *
+ * input record should be a serial-record, but it may not be complete.
+ * Copy it into our local buffer, until an etx is seen (or an error
+ * occurs).
+ * Once the record is complete, convert into a usb packet and send it
+ * to the bulk pipe, send an ack back to the tty.
+ *
+ * If the input is an ack, just send the last queued packet to the
+ * tty layer.
+ *
+ * if the input is an abort command, drop all queued data.
+ */
+
+static int gsp_receive(struct garmin_data * garmin_data_p,
+ const unsigned char *buf, int count)
+{
+ int offs = 0;
+ int ack_or_nak_seen = 0;
+ int i = 0;
+ __u8 *dest = garmin_data_p->inbuffer;
+ int size = garmin_data_p->insize;
+ // dleSeen: set if last byte read was a DLE
+ int dleSeen = garmin_data_p->flags & FLAGS_GSP_DLESEEN;
+ // skip: if set, skip incoming data until possible start of
+ // new packet
+ int skip = garmin_data_p->flags & FLAGS_GSP_SKIP;
+ __u8 data;
+
+ dbg("%s - dle=%d skip=%d size=%d count=%d",
+ __FUNCTION__, dleSeen, skip, size, count);
+
+ if (size == 0) {
+ size = GSP_INITIAL_OFFSET;
+ }
+
+ while (offs < count) {
+
+ data = *(buf+offs);
+ offs ++;
+
+ if (data == DLE) {
+ if (skip) { /* start of a new pkt */
+ skip = 0;
+ size = GSP_INITIAL_OFFSET;
+ dleSeen = 1;
+ } else if (dleSeen) {
+ dest[size++] = data;
+ dleSeen = 0;
+ } else {
+ dleSeen = 1;
+ }
+ } else if (data == ETX) {
+ if (dleSeen) {
+ /* packet complete */
+
+ data = dest[GSP_INITIAL_OFFSET];
+
+ if (data == ACK) {
+ ack_or_nak_seen = ACK;
+ dbg("ACK packet complete.");
+ } else if (data == NAK) {
+ ack_or_nak_seen = NAK;
+ dbg("NAK packet complete.");
+ } else {
+ dbg("packet complete "
+ "- id=0x%X.",
+ 0xFF & data);
+ gsp_rec_packet(garmin_data_p, size);
+ }
+
+ skip = 1;
+ size = GSP_INITIAL_OFFSET;
+ dleSeen = 0;
+ } else {
+ dest[size++] = data;
+ }
+ } else if (!skip) {
+
+ if (dleSeen) {
+ dbg("non-masked DLE at %d - restarting", i);
+ size = GSP_INITIAL_OFFSET;
+ dleSeen = 0;
+ }
+
+ dest[size++] = data;
+ }
+
+ if (size >= GPS_IN_BUFSIZ) {
+ dbg("%s - packet too large.", __FUNCTION__);
+ skip = 1;
+ size = GSP_INITIAL_OFFSET;
+ dleSeen = 0;
+ }
+ }
+
+ garmin_data_p->insize = size;
+
+ // copy flags back to structure
+ if (skip)
+ garmin_data_p->flags |= FLAGS_GSP_SKIP;
+ else
+ garmin_data_p->flags &= ~FLAGS_GSP_SKIP;
+
+ if (dleSeen)
+ garmin_data_p->flags |= FLAGS_GSP_DLESEEN;
+ else
+ garmin_data_p->flags &= ~FLAGS_GSP_DLESEEN;
+
+ if (ack_or_nak_seen) {
+ garmin_data_p->state = STATE_GSP_WAIT_DATA;
+ gsp_next_packet(garmin_data_p);
+ }
+
+ return count;
+}
+
+
+
+
+/*
+ * Sends a usb packet to the tty
+ *
+ * Assumes, that all packages and at an usb-packet boundary.
+ *
+ * return <0 on error, 0 if packet is incomplete or > 0 if packet was sent
+ */
+static int gsp_send(struct garmin_data * garmin_data_p,
+ const unsigned char *buf, int count)
+{
+ const unsigned char *src;
+ unsigned char *dst;
+ int pktid = 0;
+ int datalen = 0;
+ int cksum = 0;
+ int i=0;
+ int k;
+
+ dbg("%s - state %d - %d bytes.", __FUNCTION__,
+ garmin_data_p->state, count);
+
+ k = garmin_data_p->outsize;
+ if ((k+count) > GPS_OUT_BUFSIZ) {
+ dbg("packet too large");
+ garmin_data_p->outsize = 0;
+ return -4;
+ }
+
+ memcpy(garmin_data_p->outbuffer+k, buf, count);
+ k += count;
+ garmin_data_p->outsize = k;
+
+ if (k >= GARMIN_PKTHDR_LENGTH) {
+ pktid = getPacketId(garmin_data_p->outbuffer);
+ datalen= getDataLength(garmin_data_p->outbuffer);
+ i = GARMIN_PKTHDR_LENGTH + datalen;
+ if (k < i)
+ return 0;
+ } else {
+ return 0;
+ }
+
+ dbg("%s - %d bytes in buffer, %d bytes in pkt.", __FUNCTION__,
+ k, i);
+
+ /* garmin_data_p->outbuffer now contains a complete packet */
+
+ usb_serial_debug_data(debug, &garmin_data_p->port->dev,
+ __FUNCTION__, k, garmin_data_p->outbuffer);
+
+ garmin_data_p->outsize = 0;
+
+ if (GARMIN_LAYERID_APPL != getLayerId(garmin_data_p->outbuffer)) {
+ dbg("not an application packet (%d)",
+ getLayerId(garmin_data_p->outbuffer));
+ return -1;
+ }
+
+ if (pktid > 255) {
+ dbg("packet-id %d too large", pktid);
+ return -2;
+ }
+
+ if (datalen > 255) {
+ dbg("packet-size %d too large", datalen);
+ return -3;
+ }
+
+ /* the serial protocol should be able to handle this packet */
+
+ k = 0;
+ src = garmin_data_p->outbuffer+GARMIN_PKTHDR_LENGTH;
+ for (i=0; i<datalen; i++) {
+ if (*src++ == DLE)
+ k++;
+ }
+
+ src = garmin_data_p->outbuffer+GARMIN_PKTHDR_LENGTH;
+ if (k > (GARMIN_PKTHDR_LENGTH-2)) {
+ /* can't add stuffing DLEs in place, move data to end
+ of buffer ... */
+ dst = garmin_data_p->outbuffer+GPS_OUT_BUFSIZ-datalen;
+ memcpy(dst, src, datalen);
+ src = dst;
+ }
+
+ dst = garmin_data_p->outbuffer;
+
+ *dst++ = DLE;
+ *dst++ = pktid;
+ cksum += pktid;
+ *dst++ = datalen;
+ cksum += datalen;
+ if (datalen == DLE)
+ *dst++ = DLE;
+
+ for (i=0; i<datalen; i++) {
+ __u8 c = *src++;
+ *dst++ = c;
+ cksum += c;
+ if (c == DLE)
+ *dst++ = DLE;
+ }
+
+ cksum = 0xFF & -cksum;
+ *dst++ = cksum;
+ if (cksum == DLE)
+ *dst++ = DLE;
+ *dst++ = DLE;
+ *dst++ = ETX;
+
+ i = dst-garmin_data_p->outbuffer;
+
+ send_to_tty(garmin_data_p->port, garmin_data_p->outbuffer, i);
+
+ garmin_data_p->pkt_id = pktid;
+ garmin_data_p->state = STATE_WAIT_TTY_ACK;
+
+ return i;
+}
+
+
+
+
+
+/*
+ * Process the next pending data packet - if there is one
+ */
+static void gsp_next_packet(struct garmin_data * garmin_data_p)
+{
+ struct garmin_packet *pkt = NULL;
+
+ while ((pkt = pkt_pop(garmin_data_p)) != NULL) {
+ dbg("%s - next pkt: %d", __FUNCTION__, pkt->seq);
+ if (gsp_send(garmin_data_p, pkt->data, pkt->size) > 0) {
+ kfree(pkt);
+ return;
+ }
+ kfree(pkt);
+ }
+}
+
+
+
+
+/******************************************************************************
+ * garmin native mode
+ ******************************************************************************/
+
+
+/*
+ * Called for data received from tty
+ *
+ * The input data is expected to be in garmin usb-packet format.
+ *
+ * buf contains the data read, it may span more than one packet
+ * or even incomplete packets
+ */
+static int nat_receive(struct garmin_data * garmin_data_p,
+ const unsigned char *buf, int count)
+{
+ __u8 * dest;
+ int offs = 0;
+ int result = count;
+ int len;
+
+ while (offs < count) {
+ // if buffer contains header, copy rest of data
+ if (garmin_data_p->insize >= GARMIN_PKTHDR_LENGTH)
+ len = GARMIN_PKTHDR_LENGTH
+ +getDataLength(garmin_data_p->inbuffer);
+ else
+ len = GARMIN_PKTHDR_LENGTH;
+
+ if (len >= GPS_IN_BUFSIZ) {
+ /* seem to be an invalid packet, ignore rest of input */
+ dbg("%s - packet size too large: %d",
+ __FUNCTION__, len);
+ garmin_data_p->insize = 0;
+ count = 0;
+ result = -EINVPKT;
+ } else {
+ len -= garmin_data_p->insize;
+ if (len > (count-offs))
+ len = (count-offs);
+ if (len > 0) {
+ dest = garmin_data_p->inbuffer
+ +garmin_data_p->insize;
+ memcpy(dest, buf+offs, len);
+ garmin_data_p->insize += len;
+ offs += len;
+ }
+ }
+
+ /* do we have a complete packet ? */
+ if (garmin_data_p->insize >= GARMIN_PKTHDR_LENGTH) {
+ len = GARMIN_PKTHDR_LENGTH+
+ getDataLength(garmin_data_p->inbuffer);
+ if (garmin_data_p->insize >= len) {
+ garmin_write_bulk (garmin_data_p->port,
+ garmin_data_p->inbuffer,
+ len);
+ garmin_data_p->insize = 0;
+
+ /* if this was an abort-transfer command,
+ flush all queued data. */
+ if (isAbortTrfCmnd(garmin_data_p->inbuffer)) {
+ garmin_data_p->flags |= FLAGS_DROP_DATA;
+ pkt_clear(garmin_data_p);
+ }
+ }
+ }
+ }
+ return result;
+}
+
+
+/******************************************************************************
+ * private packets
+ ******************************************************************************/
+
+static void priv_status_resp(struct usb_serial_port *port)
+{
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+ __le32 *pkt = (__le32 *)garmin_data_p->privpkt;
+
+ pkt[0] = __cpu_to_le32(GARMIN_LAYERID_PRIVATE);
+ pkt[1] = __cpu_to_le32(PRIV_PKTID_INFO_RESP);
+ pkt[2] = __cpu_to_le32(12);
+ pkt[3] = __cpu_to_le32(VERSION_MAJOR << 16 | VERSION_MINOR);
+ pkt[4] = __cpu_to_le32(garmin_data_p->mode);
+ pkt[5] = __cpu_to_le32(garmin_data_p->serial_num);
+
+ send_to_tty(port, (__u8*)pkt, 6*4);
+}
+
+
+/******************************************************************************
+ * Garmin specific driver functions
+ ******************************************************************************/
+
+static int process_resetdev_request(struct usb_serial_port *port)
+{
+ int status;
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+ garmin_data_p->flags &= ~(CLEAR_HALT_REQUIRED);
+ garmin_data_p->state = STATE_RESET;
+ garmin_data_p->serial_num = 0;
+
+ usb_kill_urb (port->interrupt_in_urb);
+ dbg("%s - usb_reset_device", __FUNCTION__ );
+ status = usb_reset_device(port->serial->dev);
+ if (status)
+ dbg("%s - usb_reset_device failed: %d",
+ __FUNCTION__, status);
+ return status;
+}
+
+
+
+/*
+ * clear all cached data
+ */
+static int garmin_clear(struct garmin_data * garmin_data_p)
+{
+ int status = 0;
+
+ struct usb_serial_port *port = garmin_data_p->port;
+
+ if (port != NULL && garmin_data_p->flags & FLAGS_APP_RESP_SEEN) {
+ /* send a terminate command */
+ status = garmin_write_bulk(port, GARMIN_STOP_TRANSFER_REQ,
+ sizeof(GARMIN_STOP_TRANSFER_REQ));
+ }
+
+ /* flush all queued data */
+ pkt_clear(garmin_data_p);
+
+ garmin_data_p->insize = 0;
+ garmin_data_p->outsize = 0;
+
+ return status;
+}
+
+
+
+
+
+
+static int garmin_init_session(struct usb_serial_port *port)
+{
+ struct usb_serial *serial = port->serial;
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+ int status = 0;
+
+ if (status == 0) {
+ usb_kill_urb (port->interrupt_in_urb);
+
+ dbg("%s - adding interrupt input", __FUNCTION__);
+ port->interrupt_in_urb->dev = serial->dev;
+ status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
+ if (status)
+ dev_err(&serial->dev->dev,
+ "%s - failed submitting interrupt urb,"
+ " error %d\n",
+ __FUNCTION__, status);
+ }
+
+ if (status == 0) {
+ dbg("%s - starting session ...", __FUNCTION__);
+ garmin_data_p->state = STATE_ACTIVE;
+ status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ,
+ sizeof(GARMIN_START_SESSION_REQ));
+
+ if (status >= 0) {
+
+ garmin_data_p->ignorePkts++;
+
+ /* not needed, but the win32 driver does it too ... */
+ status = garmin_write_bulk(port,
+ GARMIN_START_SESSION_REQ2,
+ sizeof(GARMIN_START_SESSION_REQ2));
+ if (status >= 0) {
+ status = 0;
+ garmin_data_p->ignorePkts++;
+ }
+ }
+ }
+
+ return status;
+}
+
+
+
+
+
+static int garmin_open (struct usb_serial_port *port, struct file *filp)
+{
+ int status = 0;
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+ 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;
+
+ garmin_data_p->mode = initial_mode;
+ garmin_data_p->count = 0;
+ garmin_data_p->flags = 0;
+
+ /* shutdown any bulk reads that might be going on */
+ usb_kill_urb (port->write_urb);
+ usb_kill_urb (port->read_urb);
+
+ if (garmin_data_p->state == STATE_RESET) {
+ status = garmin_init_session(port);
+ }
+
+ garmin_data_p->state = STATE_ACTIVE;
+
+ return status;
+}
+
+
+static void garmin_close (struct usb_serial_port *port, struct file * filp)
+{
+ struct usb_serial *serial = port->serial;
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+ dbg("%s - port %d - mode=%d state=%d flags=0x%X", __FUNCTION__,
+ port->number, garmin_data_p->mode,
+ garmin_data_p->state, garmin_data_p->flags);
+
+ if (!serial)
+ return;
+
+ garmin_clear(garmin_data_p);
+
+ /* shutdown our urbs */
+ usb_kill_urb (port->read_urb);
+ usb_kill_urb (port->write_urb);
+
+ if (noResponseFromAppLayer(garmin_data_p) ||
+ ((garmin_data_p->flags & CLEAR_HALT_REQUIRED) != 0)) {
+ process_resetdev_request(port);
+ garmin_data_p->state = STATE_RESET;
+ } else {
+ garmin_data_p->state = STATE_DISCONNECTED;
+ }
+}
+
+
+static void garmin_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+ /* free up the transfer buffer, as usb_free_urb() does not do this */
+ kfree (urb->transfer_buffer);
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero write bulk status received: %d",
+ __FUNCTION__, urb->status);
+ garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
+ }
+
+ schedule_work(&port->work);
+}
+
+
+static int garmin_write_bulk (struct usb_serial_port *port,
+ const unsigned char *buf, int count)
+{
+ struct usb_serial *serial = port->serial;
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+ struct urb *urb;
+ unsigned char *buffer;
+ int status;
+
+ dbg("%s - port %d, state %d", __FUNCTION__, port->number,
+ garmin_data_p->state);
+
+ garmin_data_p->flags &= ~FLAGS_DROP_DATA;
+
+ buffer = kmalloc (count, GFP_ATOMIC);
+ if (!buffer) {
+ dev_err(&port->dev, "out of memory\n");
+ return -ENOMEM;
+ }
+
+ urb = usb_alloc_urb(0, GFP_ATOMIC);
+ if (!urb) {
+ dev_err(&port->dev, "no more free urbs\n");
+ kfree (buffer);
+ return -ENOMEM;
+ }
+
+ memcpy (buffer, buf, count);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer);
+
+ usb_fill_bulk_urb (urb, serial->dev,
+ usb_sndbulkpipe (serial->dev,
+ port->bulk_out_endpointAddress),
+ buffer, count,
+ garmin_write_bulk_callback, port);
+ urb->transfer_flags |= URB_ZERO_PACKET;
+
+ if (GARMIN_LAYERID_APPL == getLayerId(buffer)) {
+ garmin_data_p->flags |= FLAGS_APP_REQ_SEEN;
+ if (garmin_data_p->mode == MODE_GARMIN_SERIAL) {
+ pkt_clear(garmin_data_p);
+ garmin_data_p->state = STATE_GSP_WAIT_DATA;
+ }
+ }
+
+ /* send it down the pipe */
+ status = usb_submit_urb(urb, GFP_ATOMIC);
+ if (status) {
+ dev_err(&port->dev,
+ "%s - usb_submit_urb(write bulk) "
+ "failed with status = %d\n",
+ __FUNCTION__, status);
+ count = status;
+ } else {
+
+ if (GARMIN_LAYERID_APPL == getLayerId(buffer)
+ && (garmin_data_p->mode == MODE_GARMIN_SERIAL)) {
+
+ gsp_send_ack(garmin_data_p, buffer[4]);
+ }
+ }
+
+ /* we are done with this urb, so let the host driver
+ * really free it when it is finished with it */
+ usb_free_urb (urb);
+
+ return count;
+}
+
+
+
+static int garmin_write (struct usb_serial_port *port,
+ const unsigned char *buf, int count)
+{
+ int pktid, pktsiz, len;
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+ __le32 *privpkt = (__le32 *)garmin_data_p->privpkt;
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buf);
+
+ /* check for our private packets */
+ if (count >= GARMIN_PKTHDR_LENGTH) {
+
+ len = PRIVPKTSIZ;
+ if (count < len)
+ len = count;
+
+ memcpy(garmin_data_p->privpkt, buf, len);
+
+ pktsiz = getDataLength(garmin_data_p->privpkt);
+ pktid = getPacketId(garmin_data_p->privpkt);
+
+ if (count == (GARMIN_PKTHDR_LENGTH+pktsiz)
+ && GARMIN_LAYERID_PRIVATE == getLayerId(garmin_data_p->privpkt)) {
+
+ dbg("%s - processing private request %d",
+ __FUNCTION__, pktid);
+
+ // drop all unfinished transfers
+ garmin_clear(garmin_data_p);
+
+ switch(pktid) {
+
+ case PRIV_PKTID_SET_DEBUG:
+ if (pktsiz != 4)
+ return -EINVPKT;
+ debug = __le32_to_cpu(privpkt[3]);
+ dbg("%s - debug level set to 0x%X",
+ __FUNCTION__, debug);
+ break;
+
+ case PRIV_PKTID_SET_MODE:
+ if (pktsiz != 4)
+ return -EINVPKT;
+ garmin_data_p->mode = __le32_to_cpu(privpkt[3]);
+ dbg("%s - mode set to %d",
+ __FUNCTION__, garmin_data_p->mode);
+ break;
+
+ case PRIV_PKTID_INFO_REQ:
+ priv_status_resp(port);
+ break;
+
+ case PRIV_PKTID_RESET_REQ:
+ garmin_data_p->flags |= FLAGS_APP_REQ_SEEN;
+ break;
+
+ case PRIV_PKTID_SET_DEF_MODE:
+ if (pktsiz != 4)
+ return -EINVPKT;
+ initial_mode = __le32_to_cpu(privpkt[3]);
+ dbg("%s - initial_mode set to %d",
+ __FUNCTION__,
+ garmin_data_p->mode);
+ break;
+ }
+ return count;
+ }
+ }
+
+ if (garmin_data_p->mode == MODE_GARMIN_SERIAL) {
+ return gsp_receive(garmin_data_p, buf, count);
+ } else { /* MODE_NATIVE */
+ return nat_receive(garmin_data_p, buf, count);
+ }
+}
+
+
+static int garmin_write_room (struct usb_serial_port *port)
+{
+ /*
+ * Report back the bytes currently available in the output buffer.
+ */
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+ return GPS_OUT_BUFSIZ-garmin_data_p->outsize;
+}
+
+
+static int garmin_chars_in_buffer (struct usb_serial_port *port)
+{
+ /*
+ * Report back the number of bytes currently in our input buffer.
+ * Will this lock up the driver - the buffer contains an incomplete
+ * package which will not be written to the device until it
+ * has been completed ?
+ */
+ //struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+ //return garmin_data_p->insize;
+ return 0;
+}
+
+
+static void garmin_read_process(struct garmin_data * garmin_data_p,
+ unsigned char *data, unsigned data_length)
+{
+ if (garmin_data_p->flags & FLAGS_DROP_DATA) {
+ /* abort-transfer cmd is actice */
+ dbg("%s - pkt dropped", __FUNCTION__);
+ } else if (garmin_data_p->state != STATE_DISCONNECTED &&
+ garmin_data_p->state != STATE_RESET ) {
+
+ /* remember any appl.layer packets, so we know
+ if a reset is required or not when closing
+ the device */
+ if (0 == memcmp(data, GARMIN_APP_LAYER_REPLY,
+ sizeof(GARMIN_APP_LAYER_REPLY)))
+ garmin_data_p->flags |= FLAGS_APP_RESP_SEEN;
+
+ /* if throttling is active or postprecessing is required
+ put the received data in th input queue, otherwise
+ send it directly to the tty port */
+ if (garmin_data_p->flags & FLAGS_QUEUING) {
+ pkt_add(garmin_data_p, data, data_length);
+ } else if (garmin_data_p->mode == MODE_GARMIN_SERIAL) {
+ if (getLayerId(data) == GARMIN_LAYERID_APPL) {
+ pkt_add(garmin_data_p, data, data_length);
+ }
+ } else {
+ send_to_tty(garmin_data_p->port, data, data_length);
+ }
+ }
+}
+
+
+static void garmin_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct usb_serial *serial = port->serial;
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+ unsigned char *data = urb->transfer_buffer;
+ int status;
+
+ 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(debug, &port->dev,
+ __FUNCTION__, urb->actual_length, data);
+
+ garmin_read_process(garmin_data_p, data, urb->actual_length);
+
+ /* Continue trying to read until nothing more is received */
+ if (urb->actual_length > 0) {
+ 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,
+ garmin_read_bulk_callback, port);
+ status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+ if (status)
+ dev_err(&port->dev,
+ "%s - failed resubmitting read urb, error %d\n",
+ __FUNCTION__, status);
+ }
+ return;
+}
+
+
+static void garmin_read_int_callback (struct urb *urb, struct pt_regs *regs)
+{
+ int status;
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct usb_serial *serial = port->serial;
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+ unsigned char *data = urb->transfer_buffer;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d",
+ __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d",
+ __FUNCTION__, urb->status);
+ return;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+ urb->actual_length, urb->transfer_buffer);
+
+ if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) &&
+ 0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY,
+ sizeof(GARMIN_BULK_IN_AVAIL_REPLY))) {
+
+ dbg("%s - bulk data available.", __FUNCTION__);
+
+ /* bulk data available */
+ 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,
+ garmin_read_bulk_callback, port);
+ status = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ if (status) {
+ dev_err(&port->dev,
+ "%s - failed submitting read urb, error %d\n",
+ __FUNCTION__, status);
+ }
+
+ } else if (urb->actual_length == (4+sizeof(GARMIN_START_SESSION_REPLY))
+ && 0 == memcmp(data, GARMIN_START_SESSION_REPLY,
+ sizeof(GARMIN_START_SESSION_REPLY))) {
+
+ garmin_data_p->flags |= FLAGS_SESSION_REPLY1_SEEN;
+
+ /* save the serial number */
+ garmin_data_p->serial_num
+ = __le32_to_cpup((__le32*)(data+GARMIN_PKTHDR_LENGTH));
+
+ dbg("%s - start-of-session reply seen - serial %u.",
+ __FUNCTION__, garmin_data_p->serial_num);
+ }
+
+ if (garmin_data_p->ignorePkts) {
+ /* this reply belongs to a request generated by the driver,
+ ignore it. */
+ dbg("%s - pkt ignored (%d)",
+ __FUNCTION__, garmin_data_p->ignorePkts);
+ garmin_data_p->ignorePkts--;
+ } else {
+ garmin_read_process(garmin_data_p, data, urb->actual_length);
+ }
+
+ port->interrupt_in_urb->dev = port->serial->dev;
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status)
+ dev_err(&urb->dev->dev,
+ "%s - Error %d submitting interrupt urb\n",
+ __FUNCTION__, status);
+}
+
+
+/*
+ * Sends the next queued packt to the tty port (garmin native mode only)
+ * and then sets a timer to call itself again until all queued data
+ * is sent.
+ */
+static int garmin_flush_queue(struct garmin_data * garmin_data_p)
+{
+ struct garmin_packet *pkt;
+
+ if ((garmin_data_p->flags & FLAGS_THROTTLED) == 0) {
+ pkt = pkt_pop(garmin_data_p);
+ if (pkt != NULL) {
+
+ send_to_tty(garmin_data_p->port, pkt->data, pkt->size);
+ kfree(pkt);
+ mod_timer(&garmin_data_p->timer, (1)+jiffies);
+
+ } else {
+ garmin_data_p->flags &= ~FLAGS_QUEUING;
+ }
+ }
+ return 0;
+}
+
+
+static void garmin_throttle (struct usb_serial_port *port)
+{
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ /* set flag, data received will be put into a queue
+ for later processing */
+ garmin_data_p->flags |= FLAGS_QUEUING|FLAGS_THROTTLED;
+}
+
+
+static void garmin_unthrottle (struct usb_serial_port *port)
+{
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ garmin_data_p->flags &= ~FLAGS_THROTTLED;
+
+ /* in native mode send queued data to tty, in
+ serial mode nothing needs to be done here */
+ if (garmin_data_p->mode == MODE_NATIVE)
+ garmin_flush_queue(garmin_data_p);
+}
+
+
+
+/*
+ * The timer is currently only used to send queued packets to
+ * the tty in cases where the protocol provides no own handshaking
+ * to initiate the transfer.
+ */
+static void timeout_handler(unsigned long data)
+{
+ struct garmin_data *garmin_data_p = (struct garmin_data *) data;
+
+ /* send the next queued packet to the tty port */
+ if (garmin_data_p->mode == MODE_NATIVE)
+ if (garmin_data_p->flags & FLAGS_QUEUING)
+ garmin_flush_queue(garmin_data_p);
+}
+
+
+
+static int garmin_attach (struct usb_serial *serial)
+{
+ int status = 0;
+ struct usb_serial_port *port = serial->port[0];
+ struct garmin_data * garmin_data_p = NULL;
+
+ dbg("%s", __FUNCTION__);
+
+ garmin_data_p = kmalloc (sizeof(struct garmin_data), GFP_KERNEL);
+ if (garmin_data_p == NULL) {
+ dev_err(&port->dev, "%s - Out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ memset (garmin_data_p, 0, sizeof(struct garmin_data));
+ init_timer(&garmin_data_p->timer);
+ spin_lock_init(&garmin_data_p->lock);
+ INIT_LIST_HEAD(&garmin_data_p->pktlist);
+ //garmin_data_p->timer.expires = jiffies + session_timeout;
+ garmin_data_p->timer.data = (unsigned long)garmin_data_p;
+ garmin_data_p->timer.function = timeout_handler;
+ garmin_data_p->port = port;
+ garmin_data_p->state = 0;
+ garmin_data_p->count = 0;
+ usb_set_serial_port_data(port, garmin_data_p);
+
+ status = garmin_init_session(port);
+
+ return status;
+}
+
+
+static void garmin_shutdown (struct usb_serial *serial)
+{
+ struct usb_serial_port *port = serial->port[0];
+ struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+ dbg("%s", __FUNCTION__);
+
+ usb_kill_urb (port->interrupt_in_urb);
+ del_timer_sync(&garmin_data_p->timer);
+ kfree (garmin_data_p);
+ usb_set_serial_port_data(port, NULL);
+}
+
+
+
+
+
+
+
+/* All of the device info needed */
+static struct usb_serial_device_type garmin_device = {
+ .owner = THIS_MODULE,
+ .name = "Garmin GPS usb/tty",
+ .short_name = "garmin_gps",
+ .id_table = id_table,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = garmin_open,
+ .close = garmin_close,
+ .throttle = garmin_throttle,
+ .unthrottle = garmin_unthrottle,
+ .attach = garmin_attach,
+ .shutdown = garmin_shutdown,
+ .write = garmin_write,
+ .write_room = garmin_write_room,
+ .chars_in_buffer = garmin_chars_in_buffer,
+ .write_bulk_callback = garmin_write_bulk_callback,
+ .read_bulk_callback = garmin_read_bulk_callback,
+ .read_int_callback = garmin_read_int_callback,
+};
+
+
+static int __init garmin_init (void)
+{
+ int retval;
+
+ retval = usb_serial_register(&garmin_device);
+ if (retval)
+ goto failed_garmin_register;
+ retval = usb_register(&garmin_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&garmin_device);
+failed_garmin_register:
+ return retval;
+}
+
+
+static void __exit garmin_exit (void)
+{
+ usb_deregister (&garmin_driver);
+ usb_serial_deregister (&garmin_device);
+}
+
+
+
+
+module_init(garmin_init);
+module_exit(garmin_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IWUSR | S_IRUGO);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+module_param(initial_mode, int, S_IRUGO);
+MODULE_PARM_DESC(initial_mode, "Initial mode");
+
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
new file mode 100644
index 000000000000..99214aa3cd19
--- /dev/null
+++ b/drivers/usb/serial/generic.c
@@ -0,0 +1,315 @@
+/*
+ * USB Serial Converter Generic functions
+ *
+ * Copyright (C) 1999 - 2002 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 version
+ * 2 as published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/usb.h>
+#include <asm/uaccess.h>
+#include "usb-serial.h"
+
+static int debug;
+
+#ifdef CONFIG_USB_SERIAL_GENERIC
+static __u16 vendor = 0x05f9;
+static __u16 product = 0xffff;
+
+module_param(vendor, ushort, 0);
+MODULE_PARM_DESC(vendor, "User specified USB idVendor");
+
+module_param(product, ushort, 0);
+MODULE_PARM_DESC(product, "User specified USB idProduct");
+
+static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
+
+/* All of the device info needed for the Generic Serial Converter */
+struct usb_serial_device_type usb_serial_generic_device = {
+ .owner = THIS_MODULE,
+ .name = "Generic",
+ .short_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 = usb_serial_generic_shutdown,
+};
+
+/* we want to look at all devices, as the vendor/product id can change
+ * depending on the command line argument */
+static struct usb_device_id generic_serial_ids[] = {
+ {.driver_info = 42},
+ {}
+};
+
+static int generic_probe(struct usb_interface *interface,
+ const struct usb_device_id *id)
+{
+ const struct usb_device_id *id_pattern;
+
+ id_pattern = usb_match_id(interface, generic_device_ids);
+ if (id_pattern != NULL)
+ return usb_serial_probe(interface, id);
+ return -ENODEV;
+}
+
+static struct usb_driver generic_driver = {
+ .owner = THIS_MODULE,
+ .name = "usbserial_generic",
+ .probe = generic_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = generic_serial_ids,
+};
+#endif
+
+int usb_serial_generic_register (int _debug)
+{
+ int retval = 0;
+
+ debug = _debug;
+#ifdef CONFIG_USB_SERIAL_GENERIC
+ generic_device_ids[0].idVendor = vendor;
+ generic_device_ids[0].idProduct = product;
+ generic_device_ids[0].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
+
+ /* register our generic driver with ourselves */
+ retval = usb_serial_register (&usb_serial_generic_device);
+ if (retval)
+ goto exit;
+ retval = usb_register(&generic_driver);
+ if (retval)
+ usb_serial_deregister(&usb_serial_generic_device);
+exit:
+#endif
+ return retval;
+}
+
+void usb_serial_generic_deregister (void)
+{
+#ifdef CONFIG_USB_SERIAL_GENERIC
+ /* remove our generic driver */
+ usb_deregister(&generic_driver);
+ usb_serial_deregister (&usb_serial_generic_device);
+#endif
+}
+
+int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct usb_serial *serial = port->serial;
+ int result = 0;
+
+ 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 :
+ usb_serial_generic_read_bulk_callback),
+ port);
+ result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ if (result)
+ dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __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_kill_urb(port->write_urb);
+ if (serial->num_bulk_in)
+ usb_kill_urb(port->read_urb);
+ }
+}
+
+void usb_serial_generic_close (struct usb_serial_port *port, struct file * filp)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ generic_cleanup (port);
+}
+
+int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ struct usb_serial *serial = port->serial;
+ int result;
+ unsigned char *data;
+
+ 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);
+ }
+
+ count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
+
+ memcpy (port->write_urb->transfer_buffer, buf, count);
+ data = port->write_urb->transfer_buffer;
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, data);
+
+ /* 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 :
+ usb_serial_generic_write_bulk_callback), port);
+
+ /* send the data out the bulk port */
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ else
+ result = count;
+
+ return result;
+ }
+
+ /* no bulk out, so return 0 bytes written */
+ return (0);
+}
+
+int usb_serial_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);
+}
+
+int usb_serial_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);
+}
+
+void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct usb_serial *serial = port->serial;
+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+ int i;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __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) {
+ tty_flip_buffer_push(tty);
+ }
+ /* this doesn't actually push the data through unless tty->low_latency is set */
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+
+ /* 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 :
+ usb_serial_generic_read_bulk_callback), port);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+}
+
+void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ usb_serial_port_softint((void *)port);
+
+ schedule_work(&port->work);
+}
+
+void usb_serial_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]);
+ }
+}
+
diff --git a/drivers/usb/serial/io_16654.h b/drivers/usb/serial/io_16654.h
new file mode 100644
index 000000000000..a53abc9530ff
--- /dev/null
+++ b/drivers/usb/serial/io_16654.h
@@ -0,0 +1,195 @@
+/************************************************************************
+ *
+ * 16654.H Definitions for 16C654 UART used on EdgePorts
+ *
+ * Copyright (C) 1998 Inside Out Networks, Inc.
+ * 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.
+ *
+ ************************************************************************/
+
+#if !defined(_16654_H)
+#define _16654_H
+
+/************************************************************************
+ *
+ * D e f i n e s / T y p e d e f s
+ *
+ ************************************************************************/
+
+ //
+ // UART register numbers
+ // Numbers 0-7 are passed to the Edgeport directly. Numbers 8 and
+ // above are used internally to indicate that we must enable access
+ // to them via LCR bit 0x80 or LCR = 0xBF.
+ // The register number sent to the Edgeport is then (x & 0x7).
+ //
+ // Driver must not access registers that affect operation of the
+ // the EdgePort firmware -- that includes THR, RHR, IER, FCR.
+
+
+#define THR 0 // ! Transmit Holding Register (Write)
+#define RDR 0 // ! Receive Holding Register (Read)
+#define IER 1 // ! Interrupt Enable Register
+#define FCR 2 // ! Fifo Control Register (Write)
+#define ISR 2 // Interrupt Status Register (Read)
+#define LCR 3 // Line Control Register
+#define MCR 4 // Modem Control Register
+#define LSR 5 // Line Status Register
+#define MSR 6 // Modem Status Register
+#define SPR 7 // ScratchPad Register
+#define DLL 8 // Bank2[ 0 ] Divisor Latch LSB
+#define DLM 9 // Bank2[ 1 ] Divisor Latch MSB
+#define EFR 10 // Bank2[ 2 ] Extended Function Register
+//efine unused 11 // Bank2[ 3 ]
+#define XON1 12 // Bank2[ 4 ] Xon-1
+#define XON2 13 // Bank2[ 5 ] Xon-2
+#define XOFF1 14 // Bank2[ 6 ] Xoff-1
+#define XOFF2 15 // Bank2[ 7 ] Xoff-2
+
+#define NUM_16654_REGS 16
+
+#define IS_REG_2ND_BANK(x) ((x) >= 8)
+
+ //
+ // Bit definitions for each register
+ //
+
+#define IER_RX 0x01 // Enable receive interrupt
+#define IER_TX 0x02 // Enable transmit interrupt
+#define IER_RXS 0x04 // Enable receive status interrupt
+#define IER_MDM 0x08 // Enable modem status interrupt
+#define IER_SLEEP 0x10 // Enable sleep mode
+#define IER_XOFF 0x20 // Enable s/w flow control (XOFF) interrupt
+#define IER_RTS 0x40 // Enable RTS interrupt
+#define IER_CTS 0x80 // Enable CTS interrupt
+#define IER_ENABLE_ALL 0xFF // Enable all ints
+
+
+#define FCR_FIFO_EN 0x01 // Enable FIFOs
+#define FCR_RXCLR 0x02 // Reset Rx FIFO
+#define FCR_TXCLR 0x04 // Reset Tx FIFO
+#define FCR_DMA_BLK 0x08 // Enable DMA block mode
+#define FCR_TX_LEVEL_MASK 0x30 // Mask for Tx FIFO Level
+#define FCR_TX_LEVEL_8 0x00 // Tx FIFO Level = 8 bytes
+#define FCR_TX_LEVEL_16 0x10 // Tx FIFO Level = 16 bytes
+#define FCR_TX_LEVEL_32 0x20 // Tx FIFO Level = 32 bytes
+#define FCR_TX_LEVEL_56 0x30 // Tx FIFO Level = 56 bytes
+#define FCR_RX_LEVEL_MASK 0xC0 // Mask for Rx FIFO Level
+#define FCR_RX_LEVEL_8 0x00 // Rx FIFO Level = 8 bytes
+#define FCR_RX_LEVEL_16 0x40 // Rx FIFO Level = 16 bytes
+#define FCR_RX_LEVEL_56 0x80 // Rx FIFO Level = 56 bytes
+#define FCR_RX_LEVEL_60 0xC0 // Rx FIFO Level = 60 bytes
+
+
+#define ISR_INT_MDM_STATUS 0x00 // Modem status int pending
+#define ISR_INT_NONE 0x01 // No interrupt pending
+#define ISR_INT_TXRDY 0x02 // Tx ready int pending
+#define ISR_INT_RXRDY 0x04 // Rx ready int pending
+#define ISR_INT_LINE_STATUS 0x06 // Line status int pending
+#define ISR_INT_RX_TIMEOUT 0x0C // Rx timeout int pending
+#define ISR_INT_RX_XOFF 0x10 // Rx Xoff int pending
+#define ISR_INT_RTS_CTS 0x20 // RTS/CTS change int pending
+#define ISR_FIFO_ENABLED 0xC0 // Bits set if FIFOs enabled
+#define ISR_INT_BITS_MASK 0x3E // Mask to isolate valid int causes
+
+
+#define LCR_BITS_5 0x00 // 5 bits/char
+#define LCR_BITS_6 0x01 // 6 bits/char
+#define LCR_BITS_7 0x02 // 7 bits/char
+#define LCR_BITS_8 0x03 // 8 bits/char
+#define LCR_BITS_MASK 0x03 // Mask for bits/char field
+
+#define LCR_STOP_1 0x00 // 1 stop bit
+#define LCR_STOP_1_5 0x04 // 1.5 stop bits (if 5 bits/char)
+#define LCR_STOP_2 0x04 // 2 stop bits (if 6-8 bits/char)
+#define LCR_STOP_MASK 0x04 // Mask for stop bits field
+
+#define LCR_PAR_NONE 0x00 // No parity
+#define LCR_PAR_ODD 0x08 // Odd parity
+#define LCR_PAR_EVEN 0x18 // Even parity
+#define LCR_PAR_MARK 0x28 // Force parity bit to 1
+#define LCR_PAR_SPACE 0x38 // Force parity bit to 0
+#define LCR_PAR_MASK 0x38 // Mask for parity field
+
+#define LCR_SET_BREAK 0x40 // Set Break condition
+#define LCR_DL_ENABLE 0x80 // Enable access to divisor latch
+
+#define LCR_ACCESS_EFR 0xBF // Load this value to access DLL,DLM,
+ // and also the '654-only registers
+ // EFR, XON1, XON2, XOFF1, XOFF2
+
+
+#define MCR_DTR 0x01 // Assert DTR
+#define MCR_RTS 0x02 // Assert RTS
+#define MCR_OUT1 0x04 // Loopback only: Sets state of RI
+#define MCR_MASTER_IE 0x08 // Enable interrupt outputs
+#define MCR_LOOPBACK 0x10 // Set internal (digital) loopback mode
+#define MCR_XON_ANY 0x20 // Enable any char to exit XOFF mode
+#define MCR_IR_ENABLE 0x40 // Enable IrDA functions
+#define MCR_BRG_DIV_4 0x80 // Divide baud rate clk by /4 instead of /1
+
+
+#define LSR_RX_AVAIL 0x01 // Rx data available
+#define LSR_OVER_ERR 0x02 // Rx overrun
+#define LSR_PAR_ERR 0x04 // Rx parity error
+#define LSR_FRM_ERR 0x08 // Rx framing error
+#define LSR_BREAK 0x10 // Rx break condition detected
+#define LSR_TX_EMPTY 0x20 // Tx Fifo empty
+#define LSR_TX_ALL_EMPTY 0x40 // Tx Fifo and shift register empty
+#define LSR_FIFO_ERR 0x80 // Rx Fifo contains at least 1 erred char
+
+
+#define EDGEPORT_MSR_DELTA_CTS 0x01 // CTS changed from last read
+#define EDGEPORT_MSR_DELTA_DSR 0x02 // DSR changed from last read
+#define EDGEPORT_MSR_DELTA_RI 0x04 // RI changed from 0 -> 1
+#define EDGEPORT_MSR_DELTA_CD 0x08 // CD changed from last read
+#define EDGEPORT_MSR_CTS 0x10 // Current state of CTS
+#define EDGEPORT_MSR_DSR 0x20 // Current state of DSR
+#define EDGEPORT_MSR_RI 0x40 // Current state of RI
+#define EDGEPORT_MSR_CD 0x80 // Current state of CD
+
+
+
+ // Tx Rx
+ //-------------------------------
+#define EFR_SWFC_NONE 0x00 // None None
+#define EFR_SWFC_RX1 0x02 // None XOFF1
+#define EFR_SWFC_RX2 0x01 // None XOFF2
+#define EFR_SWFC_RX12 0x03 // None XOFF1 & XOFF2
+#define EFR_SWFC_TX1 0x08 // XOFF1 None
+#define EFR_SWFC_TX1_RX1 0x0a // XOFF1 XOFF1
+#define EFR_SWFC_TX1_RX2 0x09 // XOFF1 XOFF2
+#define EFR_SWFC_TX1_RX12 0x0b // XOFF1 XOFF1 & XOFF2
+#define EFR_SWFC_TX2 0x04 // XOFF2 None
+#define EFR_SWFC_TX2_RX1 0x06 // XOFF2 XOFF1
+#define EFR_SWFC_TX2_RX2 0x05 // XOFF2 XOFF2
+#define EFR_SWFC_TX2_RX12 0x07 // XOFF2 XOFF1 & XOFF2
+#define EFR_SWFC_TX12 0x0c // XOFF1 & XOFF2 None
+#define EFR_SWFC_TX12_RX1 0x0e // XOFF1 & XOFF2 XOFF1
+#define EFR_SWFC_TX12_RX2 0x0d // XOFF1 & XOFF2 XOFF2
+#define EFR_SWFC_TX12_RX12 0x0f // XOFF1 & XOFF2 XOFF1 & XOFF2
+
+#define EFR_TX_FC_MASK 0x0c // Mask to isolate Rx flow control
+#define EFR_TX_FC_NONE 0x00 // No Tx Xon/Xoff flow control
+#define EFR_TX_FC_X1 0x08 // Transmit Xon1/Xoff1
+#define EFR_TX_FC_X2 0x04 // Transmit Xon2/Xoff2
+#define EFR_TX_FC_X1_2 0x0c // Transmit Xon1&2/Xoff1&2
+
+#define EFR_RX_FC_MASK 0x03 // Mask to isolate Rx flow control
+#define EFR_RX_FC_NONE 0x00 // No Rx Xon/Xoff flow control
+#define EFR_RX_FC_X1 0x02 // Receiver compares Xon1/Xoff1
+#define EFR_RX_FC_X2 0x01 // Receiver compares Xon2/Xoff2
+#define EFR_RX_FC_X1_2 0x03 // Receiver compares Xon1&2/Xoff1&2
+
+
+#define EFR_SWFC_MASK 0x0F // Mask for software flow control field
+#define EFR_ENABLE_16654 0x10 // Enable 16C654 features
+#define EFR_SPEC_DETECT 0x20 // Enable special character detect interrupt
+#define EFR_AUTO_RTS 0x40 // Use RTS for Rx flow control
+#define EFR_AUTO_CTS 0x80 // Use CTS for Tx flow control
+
+#endif // if !defined(_16654_H)
+
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
new file mode 100644
index 000000000000..e35b5adcd5fe
--- /dev/null
+++ b/drivers/usb/serial/io_edgeport.c
@@ -0,0 +1,3113 @@
+/*
+ * Edgeport USB Serial Converter driver
+ *
+ * Copyright (C) 2000 Inside Out Networks, All rights reserved.
+ * Copyright (C) 2001-2002 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Supports the following devices:
+ * Edgeport/4
+ * Edgeport/4t
+ * Edgeport/2
+ * Edgeport/4i
+ * Edgeport/2i
+ * Edgeport/421
+ * Edgeport/21
+ * Rapidport/4
+ * Edgeport/8
+ * Edgeport/2D8
+ * Edgeport/4D8
+ * Edgeport/8i
+ *
+ * For questions or problems with this driver, contact Inside Out
+ * Networks technical support, or Peter Berger <pberger@brimson.com>,
+ * or Al Borchers <alborchers@steinerpoint.com>.
+ *
+ * Version history:
+ *
+ * 2003_04_03 al borchers
+ * - fixed a bug (that shows up with dosemu) where the tty struct is
+ * used in a callback after it has been freed
+ *
+ * 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.
+ * - fixed memory leak on device removal.
+ * - fixed potential double free of memory when command urb submitting
+ * failed.
+ * - other small cleanups when the device is removed
+ *
+ * 2.1 2001_07_09 greg kroah-hartman
+ * - added support for TIOCMBIS and TIOCMBIC.
+ *
+ * (04/08/2001) gb
+ * - Identify version on module load.
+ *
+ * 2.0 2001_03_05 greg kroah-hartman
+ * - reworked entire driver to fit properly in with the other usb-serial
+ * drivers. Occasional oopses still happen, but it's a good start.
+ *
+ * 1.2.3 (02/23/2001) greg kroah-hartman
+ * - changed device table to work properly for 2.4.x final format.
+ * - fixed problem with dropping data at high data rates.
+ *
+ * 1.2.2 (11/27/2000) greg kroah-hartman
+ * - cleaned up more NTisms.
+ * - Added device table for 2.4.0-test11
+ *
+ * 1.2.1 (11/08/2000) greg kroah-hartman
+ * - Started to clean up NTisms.
+ * - Fixed problem with dev field of urb for kernels >= 2.4.0-test9
+ *
+ * 1.2 (10/17/2000) David Iacovelli
+ * Remove all EPIC code and GPL source
+ * Fix RELEVANT_IFLAG macro to include flow control
+ * changes port configuration changes.
+ * Fix redefinition of SERIAL_MAGIC
+ * Change all timeout values to 5 seconds
+ * Tried to fix the UHCI multiple urb submission, but failed miserably.
+ * it seems to work fine with OHCI.
+ * ( Greg take a look at the #if 0 at end of WriteCmdUsb() we must
+ * find a way to work arount this UHCI bug )
+ *
+ * 1.1 (10/11/2000) David Iacovelli
+ * Fix XON/XOFF flow control to support both IXON and IXOFF
+ *
+ * 0.9.27 (06/30/2000) David Iacovelli
+ * Added transmit queue and now allocate urb for command writes.
+ *
+ * 0.9.26 (06/29/2000) David Iacovelli
+ * Add support for 80251 based edgeport
+ *
+ * 0.9.25 (06/27/2000) David Iacovelli
+ * Do not close the port if it has multiple opens.
+ *
+ * 0.9.24 (05/26/2000) David Iacovelli
+ * Add IOCTLs to support RXTX and JAVA POS
+ * and first cut at running BlackBox Demo
+ *
+ * 0.9.23 (05/24/2000) David Iacovelli
+ * Add IOCTLs to support RXTX and JAVA POS
+ *
+ * 0.9.22 (05/23/2000) David Iacovelli
+ * fixed bug in enumeration. If epconfig turns on mapping by
+ * path after a device is already plugged in, we now update
+ * the mapping correctly
+ *
+ * 0.9.21 (05/16/2000) David Iacovelli
+ * Added BlockUntilChaseResp() to also wait for txcredits
+ * Updated the way we allocate and handle write URBs
+ * Add debug code to dump buffers
+ *
+ * 0.9.20 (05/01/2000) David Iacovelli
+ * change driver to use usb/tts/
+ *
+ * 0.9.19 (05/01/2000) David Iacovelli
+ * Update code to compile if DEBUG is off
+ *
+ * 0.9.18 (04/28/2000) David Iacovelli
+ * cleanup and test tty_register with devfs
+ *
+ * 0.9.17 (04/27/2000) greg kroah-hartman
+ * changed tty_register around to be like the way it
+ * was before, but now it works properly with devfs.
+ *
+ * 0.9.16 (04/26/2000) david iacovelli
+ * Fixed bug in GetProductInfo()
+ *
+ * 0.9.15 (04/25/2000) david iacovelli
+ * Updated enumeration
+ *
+ * 0.9.14 (04/24/2000) david iacovelli
+ * Removed all config/status IOCTLS and
+ * converted to using /proc/edgeport
+ * still playing with devfs
+ *
+ * 0.9.13 (04/24/2000) david iacovelli
+ * Removed configuration based on ttyUSB0
+ * Added support for configuration using /prod/edgeport
+ * first attempt at using devfs (not working yet!)
+ * Added IOCTL to GetProductInfo()
+ * Added support for custom baud rates
+ * Add support for random port numbers
+ *
+ * 0.9.12 (04/18/2000) david iacovelli
+ * added additional configuration IOCTLs
+ * use ttyUSB0 for configuration
+ *
+ * 0.9.11 (04/17/2000) greg kroah-hartman
+ * fixed module initialization race conditions.
+ * made all urbs dynamically allocated.
+ * made driver devfs compatible. now it only registers the tty device
+ * when the device is actually plugged in.
+ *
+ * 0.9.10 (04/13/2000) greg kroah-hartman
+ * added proc interface framework.
+ *
+ * 0.9.9 (04/13/2000) david iacovelli
+ * added enumeration code and ioctls to configure the device
+ *
+ * 0.9.8 (04/12/2000) david iacovelli
+ * Change interrupt read start when device is plugged in
+ * and stop when device is removed
+ * process interrupt reads when all ports are closed
+ * (keep value of rxBytesAvail consistent with the edgeport)
+ * set the USB_BULK_QUEUE flag so that we can shove a bunch
+ * of urbs at once down the pipe
+ *
+ * 0.9.7 (04/10/2000) david iacovelli
+ * start to add enumeration code.
+ * generate serial number for epic devices
+ * add support for kdb
+ *
+ * 0.9.6 (03/30/2000) david iacovelli
+ * add IOCTL to get string, manufacture, and boot descriptors
+ *
+ * 0.9.5 (03/14/2000) greg kroah-hartman
+ * more error checking added to SerialOpen to try to fix UHCI open problem
+ *
+ * 0.9.4 (03/09/2000) greg kroah-hartman
+ * added more error checking to handle oops when data is hanging
+ * around and tty is abruptly closed.
+ *
+ * 0.9.3 (03/09/2000) david iacovelli
+ * Add epic support for xon/xoff chars
+ * play with performance
+ *
+ * 0.9.2 (03/08/2000) greg kroah-hartman
+ * changed most "info" calls to "dbg"
+ * implemented flow control properly in the termios call
+ *
+ * 0.9.1 (03/08/2000) david iacovelli
+ * added EPIC support
+ * enabled bootloader update
+ *
+ * 0.9 (03/08/2000) greg kroah-hartman
+ * Release to IO networks.
+ * Integrated changes that David made
+ * made getting urbs for writing SMP safe
+ *
+ * 0.8 (03/07/2000) greg kroah-hartman
+ * Release to IO networks.
+ * Fixed problems that were seen in code by David.
+ * Now both Edgeport/4 and Edgeport/2 works properly.
+ * Changed most of the functions to use port instead of serial.
+ *
+ * 0.7 (02/27/2000) greg kroah-hartman
+ * Milestone 3 release.
+ * Release to IO Networks
+ * ioctl for waiting on line change implemented.
+ * ioctl for getting statistics implemented.
+ * multiport support working.
+ * lsr and msr registers are now handled properly.
+ * change break now hooked up and working.
+ * support for all known Edgeport devices.
+ *
+ * 0.6 (02/22/2000) greg kroah-hartman
+ * Release to IO networks.
+ * CHASE is implemented correctly when port is closed.
+ * SerialOpen now blocks correctly until port is fully opened.
+ *
+ * 0.5 (02/20/2000) greg kroah-hartman
+ * Release to IO networks.
+ * Known problems:
+ * modem status register changes are not sent on to the user
+ * CHASE is not implemented when the port is closed.
+ *
+ * 0.4 (02/16/2000) greg kroah-hartman
+ * Second cut at the CeBit demo.
+ * Doesn't leak memory on every write to the port
+ * Still small leaks on startup.
+ * Added support for Edgeport/2 and Edgeport/8
+ *
+ * 0.3 (02/15/2000) greg kroah-hartman
+ * CeBit demo release.
+ * Force the line settings to 4800, 8, 1, e for the demo.
+ * Warning! This version leaks memory like crazy!
+ *
+ * 0.2 (01/30/2000) greg kroah-hartman
+ * Milestone 1 release.
+ * Device is found by USB subsystem, enumerated, fimware is downloaded
+ * and the descriptors are printed to the debug log, config is set, and
+ * green light starts to blink. Open port works, and data can be sent
+ * and received at the default settings of the UART. Loopback connector
+ * and debug log confirms this.
+ *
+ * 0.1 (01/23/2000) greg kroah-hartman
+ * Initial release to help IO Networks try to set up their test system.
+ * Edgeport4 is recognized, firmware is downloaded, config is set so
+ * device blinks green light every 3 sec. Port is bound, but opening,
+ * closing, and sending data do not work properly.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/jiffies.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/serial.h>
+#include <linux/ioctl.h>
+#include <linux/wait.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+#include "io_edgeport.h"
+#include "io_ionsp.h" /* info for the iosp messages */
+#include "io_16654.h" /* 16654 UART defines */
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v2.7"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com> and David Iacovelli"
+#define DRIVER_DESC "Edgeport USB Serial Driver"
+
+/* First, the latest boot code - for first generation edgeports */
+#define IMAGE_ARRAY_NAME BootCodeImage_GEN1
+#define IMAGE_VERSION_NAME BootCodeImageVersion_GEN1
+#include "io_fw_boot.h" /* the bootloader firmware to download to a device, if it needs it */
+
+/* for second generation edgeports */
+#define IMAGE_ARRAY_NAME BootCodeImage_GEN2
+#define IMAGE_VERSION_NAME BootCodeImageVersion_GEN2
+#include "io_fw_boot2.h" /* the bootloader firmware to download to a device, if it needs it */
+
+/* Then finally the main run-time operational code - for first generation edgeports */
+#define IMAGE_ARRAY_NAME OperationalCodeImage_GEN1
+#define IMAGE_VERSION_NAME OperationalCodeImageVersion_GEN1
+#include "io_fw_down.h" /* Define array OperationalCodeImage[] */
+
+/* for second generation edgeports */
+#define IMAGE_ARRAY_NAME OperationalCodeImage_GEN2
+#define IMAGE_VERSION_NAME OperationalCodeImageVersion_GEN2
+#include "io_fw_down2.h" /* Define array OperationalCodeImage[] */
+
+#define MAX_NAME_LEN 64
+
+#define CHASE_TIMEOUT (5*HZ) /* 5 seconds */
+#define OPEN_TIMEOUT (5*HZ) /* 5 seconds */
+#define COMMAND_TIMEOUT (5*HZ) /* 5 seconds */
+
+/* receive port state */
+enum RXSTATE {
+ EXPECT_HDR1 = 0, /* Expect header byte 1 */
+ EXPECT_HDR2 = 1, /* Expect header byte 2 */
+ EXPECT_DATA = 2, /* Expect 'RxBytesRemaining' data */
+ EXPECT_HDR3 = 3, /* Expect header byte 3 (for status hdrs only) */
+};
+
+
+/* Transmit Fifo
+ * This Transmit queue is an extension of the edgeport Rx buffer.
+ * The maximum amount of data buffered in both the edgeport
+ * Rx buffer (maxTxCredits) and this buffer will never exceed maxTxCredits.
+ */
+struct TxFifo {
+ unsigned int head; /* index to head pointer (write) */
+ unsigned int tail; /* index to tail pointer (read) */
+ unsigned int count; /* Bytes in queue */
+ unsigned int size; /* Max size of queue (equal to Max number of TxCredits) */
+ unsigned char *fifo; /* allocated Buffer */
+};
+
+/* This structure holds all of the local port information */
+struct edgeport_port {
+ __u16 txCredits; /* our current credits for this port */
+ __u16 maxTxCredits; /* the max size of the port */
+
+ struct TxFifo txfifo; /* transmit fifo -- size will be maxTxCredits */
+ struct urb *write_urb; /* write URB for this port */
+ char write_in_progress; /* TRUE while a write URB is outstanding */
+ spinlock_t ep_lock;
+
+ __u8 shadowLCR; /* last LCR value received */
+ __u8 shadowMCR; /* last MCR value received */
+ __u8 shadowMSR; /* last MSR value received */
+ __u8 shadowLSR; /* last LSR value received */
+ __u8 shadowXonChar; /* last value set as XON char in Edgeport */
+ __u8 shadowXoffChar; /* last value set as XOFF char in Edgeport */
+ __u8 validDataMask;
+ __u32 baudRate;
+
+ char open;
+ char openPending;
+ char commandPending;
+ char closePending;
+ char chaseResponsePending;
+
+ wait_queue_head_t wait_chase; /* for handling sleeping while waiting for chase to finish */
+ wait_queue_head_t wait_open; /* for handling sleeping while waiting for open to finish */
+ wait_queue_head_t wait_command; /* for handling sleeping while waiting for command to finish */
+ wait_queue_head_t delta_msr_wait; /* for handling sleeping while waiting for msr change to happen */
+
+ struct async_icount icount;
+ struct usb_serial_port *port; /* loop back to the owner of this object */
+};
+
+
+/* This structure holds all of the individual device information */
+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 */
+ unsigned char * interrupt_in_buffer; /* the buffer we use for the interrupt endpoint */
+ struct urb * interrupt_read_urb; /* our interrupt urb */
+
+ __u8 bulk_in_endpoint; /* the bulk in endpoint handle */
+ unsigned char * bulk_in_buffer; /* the buffer we use for the bulk in endpoint */
+ struct urb * read_urb; /* our bulk read urb */
+ int read_in_progress;
+ spinlock_t es_lock;
+
+ __u8 bulk_out_endpoint; /* the bulk out endpoint handle */
+
+ __s16 rxBytesAvail; /* the number of bytes that we need to read from this device */
+
+ enum RXSTATE rxState; /* the current state of the bulk receive processor */
+ __u8 rxHeader1; /* receive header byte 1 */
+ __u8 rxHeader2; /* receive header byte 2 */
+ __u8 rxHeader3; /* receive header byte 3 */
+ __u8 rxPort; /* the port that we are currently receiving data for */
+ __u8 rxStatusCode; /* the receive status code */
+ __u8 rxStatusParam; /* the receive status paramater */
+ __s16 rxBytesRemaining; /* the number of port bytes left to read */
+ struct usb_serial *serial; /* loop back to the owner of this object */
+};
+
+/* 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[] = {
+ { 50, 4608},
+ { 75, 3072},
+ { 110, 2095}, /* 2094.545455 => 230450 => .0217 % over */
+ { 134, 1713}, /* 1713.011152 => 230398.5 => .00065% under */
+ { 150, 1536},
+ { 300, 768},
+ { 600, 384},
+ { 1200, 192},
+ { 1800, 128},
+ { 2400, 96},
+ { 4800, 48},
+ { 7200, 32},
+ { 9600, 24},
+ { 14400, 16},
+ { 19200, 12},
+ { 38400, 6},
+ { 57600, 4},
+ { 115200, 2},
+ { 230400, 1},
+};
+
+/* local variables */
+static int debug;
+
+static int low_latency = 1; /* tty low latency flag, on by default */
+
+static int CmdUrbs = 0; /* Number of outstanding Command Write Urbs */
+
+
+/* local function prototypes */
+
+/* function prototypes for all URB callbacks */
+static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs);
+static void edge_bulk_in_callback (struct urb *urb, struct pt_regs *regs);
+static void edge_bulk_out_data_callback (struct urb *urb, struct pt_regs *regs);
+static void edge_bulk_out_cmd_callback (struct urb *urb, struct pt_regs *regs);
+
+/* function prototypes for the usbserial callbacks */
+static int edge_open (struct usb_serial_port *port, struct file *filp);
+static void edge_close (struct usb_serial_port *port, struct file *filp);
+static int edge_write (struct usb_serial_port *port, const unsigned char *buf, int count);
+static int edge_write_room (struct usb_serial_port *port);
+static int edge_chars_in_buffer (struct usb_serial_port *port);
+static void edge_throttle (struct usb_serial_port *port);
+static void edge_unthrottle (struct usb_serial_port *port);
+static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios);
+static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg);
+static void edge_break (struct usb_serial_port *port, int break_state);
+static int edge_tiocmget (struct usb_serial_port *port, struct file *file);
+static int edge_tiocmset (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
+static int edge_startup (struct usb_serial *serial);
+static void edge_shutdown (struct usb_serial *serial);
+
+
+#include "io_tables.h" /* all of the devices that this driver supports */
+
+static struct usb_driver io_driver = {
+ .owner = THIS_MODULE,
+ .name = "io_edgeport",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table_combined,
+};
+
+/* function prototypes for all of our local functions */
+static void process_rcvd_data (struct edgeport_serial *edge_serial, unsigned char *buffer, __u16 bufferLength);
+static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2, __u8 byte3);
+static void edge_tty_recv (struct device *dev, struct tty_struct *tty, unsigned char *data, int length);
+static void handle_new_msr (struct edgeport_port *edge_port, __u8 newMsr);
+static void handle_new_lsr (struct edgeport_port *edge_port, __u8 lsrData, __u8 lsr, __u8 data);
+static int send_iosp_ext_cmd (struct edgeport_port *edge_port, __u8 command, __u8 param);
+static int calc_baud_rate_divisor (int baud_rate, int *divisor);
+static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRate);
+static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios);
+static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 regNum, __u8 regValue);
+static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer, int writeLength);
+static void send_more_port_data (struct edgeport_serial *edge_serial, struct edgeport_port *edge_port);
+
+static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data);
+static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data);
+static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data);
+static void get_manufacturing_desc (struct edgeport_serial *edge_serial);
+static void get_boot_desc (struct edgeport_serial *edge_serial);
+static void load_application_firmware (struct edgeport_serial *edge_serial);
+
+static void unicode_to_ascii (char *string, __le16 *unicode, int unicode_size);
+
+
+// ************************************************************************
+// ************************************************************************
+// ************************************************************************
+// ************************************************************************
+
+/************************************************************************
+ * *
+ * update_edgeport_E2PROM() Compare current versions of *
+ * Boot ROM and Manufacture *
+ * Descriptors with versions *
+ * embedded in this driver *
+ * *
+ ************************************************************************/
+static void update_edgeport_E2PROM (struct edgeport_serial *edge_serial)
+{
+ __u32 BootCurVer;
+ __u32 BootNewVer;
+ __u8 BootMajorVersion;
+ __u8 BootMinorVersion;
+ __le16 BootBuildNumber;
+ __u8 *BootImage;
+ __u32 BootSize;
+ struct edge_firmware_image_record *record;
+ unsigned char *firmware;
+ int response;
+
+
+ switch (edge_serial->product_info.iDownloadFile) {
+ case EDGE_DOWNLOAD_FILE_I930:
+ BootMajorVersion = BootCodeImageVersion_GEN1.MajorVersion;
+ BootMinorVersion = BootCodeImageVersion_GEN1.MinorVersion;
+ BootBuildNumber = cpu_to_le16(BootCodeImageVersion_GEN1.BuildNumber);
+ BootImage = &BootCodeImage_GEN1[0];
+ BootSize = sizeof( BootCodeImage_GEN1 );
+ break;
+
+ case EDGE_DOWNLOAD_FILE_80251:
+ BootMajorVersion = BootCodeImageVersion_GEN2.MajorVersion;
+ BootMinorVersion = BootCodeImageVersion_GEN2.MinorVersion;
+ BootBuildNumber = cpu_to_le16(BootCodeImageVersion_GEN2.BuildNumber);
+ BootImage = &BootCodeImage_GEN2[0];
+ BootSize = sizeof( BootCodeImage_GEN2 );
+ break;
+
+ default:
+ return;
+ }
+
+ // Check Boot Image Version
+ BootCurVer = (edge_serial->boot_descriptor.MajorVersion << 24) +
+ (edge_serial->boot_descriptor.MinorVersion << 16) +
+ le16_to_cpu(edge_serial->boot_descriptor.BuildNumber);
+
+ BootNewVer = (BootMajorVersion << 24) +
+ (BootMinorVersion << 16) +
+ le16_to_cpu(BootBuildNumber);
+
+ dbg("Current Boot Image version %d.%d.%d",
+ edge_serial->boot_descriptor.MajorVersion,
+ edge_serial->boot_descriptor.MinorVersion,
+ le16_to_cpu(edge_serial->boot_descriptor.BuildNumber));
+
+
+ if (BootNewVer > BootCurVer) {
+ dbg("**Update Boot Image from %d.%d.%d to %d.%d.%d",
+ edge_serial->boot_descriptor.MajorVersion,
+ edge_serial->boot_descriptor.MinorVersion,
+ le16_to_cpu(edge_serial->boot_descriptor.BuildNumber),
+ BootMajorVersion,
+ BootMinorVersion,
+ le16_to_cpu(BootBuildNumber));
+
+
+ dbg("Downloading new Boot Image");
+
+ firmware = BootImage;
+
+ for (;;) {
+ record = (struct edge_firmware_image_record *)firmware;
+ response = rom_write (edge_serial->serial, le16_to_cpu(record->ExtAddr), le16_to_cpu(record->Addr), le16_to_cpu(record->Len), &record->Data[0]);
+ if (response < 0) {
+ dev_err(&edge_serial->serial->dev->dev, "rom_write failed (%x, %x, %d)\n", le16_to_cpu(record->ExtAddr), le16_to_cpu(record->Addr), le16_to_cpu(record->Len));
+ break;
+ }
+ firmware += sizeof (struct edge_firmware_image_record) + le16_to_cpu(record->Len);
+ if (firmware >= &BootImage[BootSize]) {
+ break;
+ }
+ }
+ } else {
+ dbg("Boot Image -- already up to date");
+ }
+}
+
+
+/************************************************************************
+ * *
+ * Get string descriptor from device *
+ * *
+ ************************************************************************/
+static int get_string (struct usb_device *dev, int Id, char *string)
+{
+ 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;
+ }
+
+ pStringDesc = kmalloc (StringDesc.bLength, GFP_KERNEL);
+
+ if (!pStringDesc) {
+ return 0;
+ }
+
+ if (!usb_get_descriptor(dev, USB_DT_STRING, Id, pStringDesc, StringDesc.bLength )) {
+ kfree(pStringDesc);
+ return 0;
+ }
+
+ unicode_to_ascii(string, pStringDesc->wData, pStringDesc->bLength/2-1);
+
+ kfree(pStringDesc);
+ return strlen(string);
+}
+
+
+#if 0
+/************************************************************************
+ *
+ * Get string descriptor from device
+ *
+ ************************************************************************/
+static int get_string_desc (struct usb_device *dev, int Id, struct usb_string_descriptor **pRetDesc)
+{
+ 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;
+ }
+
+ pStringDesc = kmalloc (StringDesc.bLength, GFP_KERNEL);
+
+ if (!pStringDesc) {
+ return -1;
+ }
+
+ if (!usb_get_descriptor(dev, USB_DT_STRING, Id, pStringDesc, StringDesc.bLength )) {
+ kfree(pStringDesc);
+ return -1;
+ }
+
+ *pRetDesc = pStringDesc;
+ return 0;
+}
+#endif
+
+static void get_product_info(struct edgeport_serial *edge_serial)
+{
+ struct edgeport_product_info *product_info = &edge_serial->product_info;
+
+ memset (product_info, 0, sizeof(struct edgeport_product_info));
+
+ product_info->ProductId = (__u16)(le16_to_cpu(edge_serial->serial->dev->descriptor.idProduct) & ~ION_DEVICE_ID_80251_NETCHIP);
+ product_info->NumPorts = edge_serial->manuf_descriptor.NumPorts;
+ product_info->ProdInfoVer = 0;
+
+ product_info->RomSize = edge_serial->manuf_descriptor.RomSize;
+ product_info->RamSize = edge_serial->manuf_descriptor.RamSize;
+ product_info->CpuRev = edge_serial->manuf_descriptor.CpuRev;
+ product_info->BoardRev = edge_serial->manuf_descriptor.BoardRev;
+
+ product_info->BootMajorVersion = edge_serial->boot_descriptor.MajorVersion;
+ product_info->BootMinorVersion = edge_serial->boot_descriptor.MinorVersion;
+ product_info->BootBuildNumber = edge_serial->boot_descriptor.BuildNumber;
+
+ memcpy(product_info->ManufactureDescDate, edge_serial->manuf_descriptor.DescDate, sizeof(edge_serial->manuf_descriptor.DescDate));
+
+ // check if this is 2nd generation hardware
+ if (le16_to_cpu(edge_serial->serial->dev->descriptor.idProduct) & ION_DEVICE_ID_80251_NETCHIP) {
+ product_info->FirmwareMajorVersion = OperationalCodeImageVersion_GEN2.MajorVersion;
+ product_info->FirmwareMinorVersion = OperationalCodeImageVersion_GEN2.MinorVersion;
+ product_info->FirmwareBuildNumber = cpu_to_le16(OperationalCodeImageVersion_GEN2.BuildNumber);
+ product_info->iDownloadFile = EDGE_DOWNLOAD_FILE_80251;
+ } else {
+ product_info->FirmwareMajorVersion = OperationalCodeImageVersion_GEN1.MajorVersion;
+ product_info->FirmwareMinorVersion = OperationalCodeImageVersion_GEN1.MinorVersion;
+ product_info->FirmwareBuildNumber = cpu_to_le16(OperationalCodeImageVersion_GEN1.BuildNumber);
+ product_info->iDownloadFile = EDGE_DOWNLOAD_FILE_I930;
+ }
+
+ // Determine Product type and set appropriate flags
+ switch (DEVICE_ID_FROM_USB_PRODUCT_ID(product_info->ProductId)) {
+ case ION_DEVICE_ID_EDGEPORT_COMPATIBLE:
+ case ION_DEVICE_ID_EDGEPORT_4T:
+ case ION_DEVICE_ID_EDGEPORT_4:
+ case ION_DEVICE_ID_EDGEPORT_2:
+ case ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU:
+ case ION_DEVICE_ID_EDGEPORT_8:
+ case ION_DEVICE_ID_EDGEPORT_421:
+ case ION_DEVICE_ID_EDGEPORT_21:
+ case ION_DEVICE_ID_EDGEPORT_2_DIN:
+ case ION_DEVICE_ID_EDGEPORT_4_DIN:
+ case ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU:
+ product_info->IsRS232 = 1;
+ break;
+
+ case ION_DEVICE_ID_EDGEPORT_2I: // Edgeport/2 RS422/RS485
+ product_info->IsRS422 = 1;
+ product_info->IsRS485 = 1;
+ break;
+
+ case ION_DEVICE_ID_EDGEPORT_8I: // Edgeport/4 RS422
+ case ION_DEVICE_ID_EDGEPORT_4I: // Edgeport/4 RS422
+ product_info->IsRS422 = 1;
+ break;
+ }
+
+ // Dump Product Info structure
+ dbg("**Product Information:");
+ dbg(" ProductId %x", product_info->ProductId );
+ dbg(" NumPorts %d", product_info->NumPorts );
+ dbg(" ProdInfoVer %d", product_info->ProdInfoVer );
+ dbg(" IsServer %d", product_info->IsServer);
+ dbg(" IsRS232 %d", product_info->IsRS232 );
+ dbg(" IsRS422 %d", product_info->IsRS422 );
+ dbg(" IsRS485 %d", product_info->IsRS485 );
+ dbg(" RomSize %d", product_info->RomSize );
+ dbg(" RamSize %d", product_info->RamSize );
+ dbg(" CpuRev %x", product_info->CpuRev );
+ dbg(" BoardRev %x", product_info->BoardRev);
+ dbg(" BootMajorVersion %d.%d.%d", product_info->BootMajorVersion,
+ product_info->BootMinorVersion,
+ le16_to_cpu(product_info->BootBuildNumber));
+ dbg(" FirmwareMajorVersion %d.%d.%d", product_info->FirmwareMajorVersion,
+ product_info->FirmwareMinorVersion,
+ le16_to_cpu(product_info->FirmwareBuildNumber));
+ dbg(" ManufactureDescDate %d/%d/%d", product_info->ManufactureDescDate[0],
+ product_info->ManufactureDescDate[1],
+ product_info->ManufactureDescDate[2]+1900);
+ dbg(" iDownloadFile 0x%x", product_info->iDownloadFile);
+
+}
+
+
+/************************************************************************/
+/************************************************************************/
+/* U S B C A L L B A C K F U N C T I O N S */
+/* U S B C A L L B A C K F U N C T I O N S */
+/************************************************************************/
+/************************************************************************/
+
+/*****************************************************************************
+ * edge_interrupt_callback
+ * this is the callback function for when we have received data on the
+ * interrupt endpoint.
+ *****************************************************************************/
+static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context;
+ struct edgeport_port *edge_port;
+ struct usb_serial_port *port;
+ unsigned char *data = urb->transfer_buffer;
+ int length = urb->actual_length;
+ int bytes_avail;
+ int position;
+ int txCredits;
+ int portNumber;
+ int result;
+
+ dbg("%s", __FUNCTION__);
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ // process this interrupt-read even if there are no ports open
+ if (length) {
+ usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __FUNCTION__, length, data);
+
+ if (length > 1) {
+ bytes_avail = data[0] | (data[1] << 8);
+ if (bytes_avail) {
+ spin_lock(&edge_serial->es_lock);
+ edge_serial->rxBytesAvail += bytes_avail;
+ dbg("%s - bytes_avail=%d, rxBytesAvail=%d, read_in_progress=%d", __FUNCTION__, bytes_avail, edge_serial->rxBytesAvail, edge_serial->read_in_progress);
+
+ if (edge_serial->rxBytesAvail > 0 &&
+ !edge_serial->read_in_progress) {
+ dbg("%s - posting a read", __FUNCTION__);
+ edge_serial->read_in_progress = TRUE;
+
+ /* we have pending bytes on the bulk in pipe, send a request */
+ edge_serial->read_urb->dev = edge_serial->serial->dev;
+ result = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
+ if (result) {
+ dev_err(&edge_serial->serial->dev->dev, "%s - usb_submit_urb(read bulk) failed with result = %d\n", __FUNCTION__, result);
+ edge_serial->read_in_progress = FALSE;
+ }
+ }
+ spin_unlock(&edge_serial->es_lock);
+ }
+ }
+ /* grab the txcredits for the ports if available */
+ position = 2;
+ portNumber = 0;
+ while ((position < length) && (portNumber < edge_serial->serial->num_ports)) {
+ txCredits = data[position] | (data[position+1] << 8);
+ if (txCredits) {
+ port = edge_serial->serial->port[portNumber];
+ edge_port = usb_get_serial_port_data(port);
+ if (edge_port->open) {
+ spin_lock(&edge_port->ep_lock);
+ edge_port->txCredits += txCredits;
+ spin_unlock(&edge_port->ep_lock);
+ 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)
+ tty_wakeup(edge_port->port->tty);
+
+ // Since we have more credit, check if more data can be sent
+ send_more_port_data(edge_serial, edge_port);
+ }
+ }
+ position += 2;
+ ++portNumber;
+ }
+ }
+
+exit:
+ result = usb_submit_urb (urb, GFP_ATOMIC);
+ if (result) {
+ dev_err(&urb->dev->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, result);
+ }
+}
+
+
+/*****************************************************************************
+ * edge_bulk_in_callback
+ * this is the callback function for when we have received data on the
+ * bulk in endpoint.
+ *****************************************************************************/
+static void edge_bulk_in_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context;
+ unsigned char *data = urb->transfer_buffer;
+ int status;
+ __u16 raw_data_length;
+
+ dbg("%s", __FUNCTION__);
+
+ if (urb->status) {
+ dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ edge_serial->read_in_progress = FALSE;
+ return;
+ }
+
+ if (urb->actual_length == 0) {
+ dbg("%s - read bulk callback with no data", __FUNCTION__);
+ edge_serial->read_in_progress = FALSE;
+ return;
+ }
+
+ raw_data_length = urb->actual_length;
+
+ usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __FUNCTION__, raw_data_length, data);
+
+ spin_lock(&edge_serial->es_lock);
+
+ /* 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);
+
+ /* check to see if there's any more data for us to read */
+ if (edge_serial->rxBytesAvail > 0) {
+ dbg("%s - posting a read", __FUNCTION__);
+ edge_serial->read_urb->dev = edge_serial->serial->dev;
+ status = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
+ if (status) {
+ dev_err(&urb->dev->dev, "%s - usb_submit_urb(read bulk) failed, status = %d\n", __FUNCTION__, status);
+ edge_serial->read_in_progress = FALSE;
+ }
+ } else {
+ edge_serial->read_in_progress = FALSE;
+ }
+
+ spin_unlock(&edge_serial->es_lock);
+}
+
+
+/*****************************************************************************
+ * edge_bulk_out_data_callback
+ * this is the callback function for when we have finished sending serial data
+ * on the bulk out endpoint.
+ *****************************************************************************/
+static void edge_bulk_out_data_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
+ struct tty_struct *tty;
+
+ dbg("%s", __FUNCTION__);
+
+ if (urb->status) {
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+ }
+
+ tty = edge_port->port->tty;
+
+ if (tty && edge_port->open) {
+ /* let the tty driver wakeup if it has a special write_wakeup function */
+ tty_wakeup(tty);
+ }
+
+ // Release the Write URB
+ edge_port->write_in_progress = FALSE;
+
+ // Check if more data needs to be sent
+ send_more_port_data((struct edgeport_serial *)(usb_get_serial_data(edge_port->port->serial)), edge_port);
+}
+
+
+/*****************************************************************************
+ * BulkOutCmdCallback
+ * this is the callback function for when we have finished sending a command
+ * on the bulk out endpoint.
+ *****************************************************************************/
+static void edge_bulk_out_cmd_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
+ 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 */
+ if (urb->transfer_buffer != NULL) {
+ kfree(urb->transfer_buffer);
+ }
+
+ /* Free the command urb */
+ usb_free_urb (urb);
+
+ if (status) {
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, status);
+ return;
+ }
+
+ /* Get pointer to tty */
+ tty = edge_port->port->tty;
+
+ /* tell the tty driver that something has changed */
+ if (tty && edge_port->open)
+ tty_wakeup(tty);
+
+ /* we have completed the command */
+ edge_port->commandPending = FALSE;
+ wake_up(&edge_port->wait_command);
+}
+
+
+/*****************************************************************************
+ * Driver tty interface functions
+ *****************************************************************************/
+
+/*****************************************************************************
+ * SerialOpen
+ * this function is called by the tty driver when a port is opened
+ * If successful, we return 0
+ * Otherwise we return a negative error number.
+ *****************************************************************************/
+static int edge_open (struct usb_serial_port *port, struct file * filp)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ struct usb_serial *serial;
+ struct edgeport_serial *edge_serial;
+ int response;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (edge_port == NULL)
+ return -ENODEV;
+
+ if (port->tty)
+ port->tty->low_latency = low_latency;
+
+ /* 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 = usb_get_serial_data(serial);
+ 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 */
+ usb_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 */
+ usb_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);
+ edge_serial->read_in_progress = FALSE;
+
+ /* 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, GFP_KERNEL);
+ if (response) {
+ dev_err(&port->dev, "%s - Error %d submitting control urb\n", __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) {
+ dev_err(&port->dev, "%s - error sending open port command\n", __FUNCTION__);
+ edge_port->openPending = FALSE;
+ return -ENODEV;
+ }
+
+ /* now wait for the port to be completely opened */
+ wait_event_timeout(edge_port->wait_open, (edge_port->openPending != TRUE), 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, GFP_KERNEL);
+ edge_port->write_in_progress = FALSE;
+
+ 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;
+}
+
+
+/************************************************************************
+ *
+ * block_until_chase_response
+ *
+ * This function will block the close until one of the following:
+ * 1. Response to our Chase comes from Edgeport
+ * 2. A timout of 10 seconds without activity has expired
+ * (1K of Edgeport data @ 2400 baud ==> 4 sec to empty)
+ *
+ ************************************************************************/
+static void block_until_chase_response(struct edgeport_port *edge_port)
+{
+ DEFINE_WAIT(wait);
+ __u16 lastCredits;
+ int timeout = 1*HZ;
+ int loop = 10;
+
+ while (1) {
+ // Save Last credits
+ lastCredits = edge_port->txCredits;
+
+ // 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;
+ }
+ }
+
+ // Block the thread for a while
+ prepare_to_wait(&edge_port->wait_chase, &wait, TASK_UNINTERRUPTIBLE);
+ schedule_timeout(timeout);
+ finish_wait(&edge_port->wait_chase, &wait);
+
+ if (lastCredits == edge_port->txCredits) {
+ // No activity.. count down.
+ loop--;
+ if (loop == 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);
+ loop = 10;
+ }
+ }
+}
+
+
+/************************************************************************
+ *
+ * block_until_tx_empty
+ *
+ * This function will block the close until one of the following:
+ * 1. TX count are 0
+ * 2. The edgeport has stopped
+ * 3. A timout of 3 seconds without activity has expired
+ *
+ ************************************************************************/
+static void block_until_tx_empty (struct edgeport_port *edge_port)
+{
+ DEFINE_WAIT(wait);
+ struct TxFifo *fifo = &edge_port->txfifo;
+ __u32 lastCount;
+ int timeout = HZ/10;
+ int loop = 30;
+
+ while (1) {
+ // Save Last count
+ lastCount = fifo->count;
+
+ // Is the Edgeport Buffer empty?
+ if (lastCount == 0) {
+ dbg("%s - TX Buffer Empty", __FUNCTION__);
+ return;
+ }
+
+ // Block the thread for a while
+ prepare_to_wait (&edge_port->wait_chase, &wait, TASK_UNINTERRUPTIBLE);
+ schedule_timeout(timeout);
+ finish_wait(&edge_port->wait_chase, &wait);
+
+ dbg("%s wait", __FUNCTION__);
+
+ if (lastCount == fifo->count) {
+ // No activity.. count down.
+ loop--;
+ if (loop == 0) {
+ dbg("%s - TIMEOUT", __FUNCTION__);
+ return;
+ }
+ } else {
+ // Reset timout value back to seconds
+ loop = 30;
+ }
+ }
+}
+
+
+/*****************************************************************************
+ * edge_close
+ * this function is called by the tty driver when a port is closed
+ *****************************************************************************/
+static void edge_close (struct usb_serial_port *port, struct file * filp)
+{
+ struct edgeport_serial *edge_serial;
+ struct edgeport_port *edge_port;
+ int status;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ edge_serial = usb_get_serial_data(port->serial);
+ edge_port = usb_get_serial_port_data(port);
+ if ((edge_serial == NULL) || (edge_port == NULL))
+ return;
+
+ // 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_kill_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);
+ edge_port->write_urb = NULL;
+ }
+ if (edge_port->txfifo.fifo) {
+ kfree(edge_port->txfifo.fifo);
+ edge_port->txfifo.fifo = NULL;
+ }
+
+ dbg("%s exited", __FUNCTION__);
+}
+
+/*****************************************************************************
+ * SerialWrite
+ * this function is called by the tty driver when data should be written to
+ * the port.
+ * If successful, we return the number of bytes written, otherwise we return
+ * a negative error number.
+ *****************************************************************************/
+static int edge_write (struct usb_serial_port *port, const unsigned char *data, int count)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ struct TxFifo *fifo;
+ int copySize;
+ int bytesleft;
+ int firsthalf;
+ int secondhalf;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (edge_port == NULL)
+ return -ENODEV;
+
+ // get a pointer to the Tx fifo
+ fifo = &edge_port->txfifo;
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+
+ // 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__);
+ goto finish_write;
+ }
+
+ // queue the data
+ // since we can never overflow the buffer we do not have to check for full condition
+
+ // the copy is done is two parts -- first fill to the end of the buffer
+ // then copy the reset from the start of the buffer
+
+ 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 */
+ memcpy(&fifo->fifo[fifo->head], data, firsthalf);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, firsthalf, &fifo->fifo[fifo->head]);
+
+ // update the index and size
+ fifo->head += firsthalf;
+ fifo->count += firsthalf;
+
+ // wrap the index
+ if (fifo->head == fifo->size) {
+ fifo->head = 0;
+ }
+
+ secondhalf = copySize-firsthalf;
+
+ if (secondhalf) {
+ dbg("%s - copy rest of data %d", __FUNCTION__, secondhalf);
+ memcpy(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, secondhalf, &fifo->fifo[fifo->head]);
+ // update the index and size
+ fifo->count += secondhalf;
+ fifo->head += secondhalf;
+ // No need to check for wrap since we can not get to end of fifo in this part
+ }
+
+finish_write:
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+
+ send_more_port_data((struct edgeport_serial *)usb_get_serial_data(port->serial), edge_port);
+
+ dbg("%s wrote %d byte(s) TxCredits %d, Fifo %d", __FUNCTION__, copySize, edge_port->txCredits, fifo->count);
+
+ return copySize;
+}
+
+
+/************************************************************************
+ *
+ * send_more_port_data()
+ *
+ * This routine attempts to write additional UART transmit data
+ * to a port over the USB bulk pipe. It is called (1) when new
+ * data has been written to a port's TxBuffer from higher layers
+ * (2) when the peripheral sends us additional TxCredits indicating
+ * that it can accept more Tx data for a given port; and (3) when
+ * a bulk write completes successfully and we want to see if we
+ * can transmit more.
+ *
+ ************************************************************************/
+static void send_more_port_data(struct edgeport_serial *edge_serial, struct edgeport_port *edge_port)
+{
+ struct TxFifo *fifo = &edge_port->txfifo;
+ struct urb *urb;
+ unsigned char *buffer;
+ int status;
+ int count;
+ int bytesleft;
+ int firsthalf;
+ int secondhalf;
+ unsigned long flags;
+
+ dbg("%s(%d)", __FUNCTION__, edge_port->port->number);
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+
+ 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);
+ goto exit_send;
+ }
+
+ // since the amount of data in the fifo will always fit into the
+ // edgeport buffer we do not need to check the write length
+
+ // Do we have enough credits for this port to make it worthwhile
+ // to bother queueing a write. If it's too small, say a few bytes,
+ // 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,EDGE_FW_BULK_MAX_PACKET_SIZE)) {
+ dbg("%s(%d) Not enough credit - fifo %d TxCredit %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->txCredits );
+ goto exit_send;
+ }
+
+ // lock this write
+ edge_port->write_in_progress = TRUE;
+
+ // get a pointer to the write_urb
+ urb = edge_port->write_urb;
+
+ /* if this urb had a transfer buffer already (old transfer) free it */
+ if (urb->transfer_buffer != NULL) {
+ kfree(urb->transfer_buffer);
+ urb->transfer_buffer = NULL;
+ }
+
+ /* 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) {
+ dev_err(&edge_port->port->dev, "%s - no more kernel memory...\n", __FUNCTION__);
+ edge_port->write_in_progress = FALSE;
+ goto exit_send;
+ }
+ 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;
+ firsthalf = min (bytesleft, count);
+ memcpy(&buffer[2], &fifo->fifo[fifo->tail], firsthalf);
+ fifo->tail += firsthalf;
+ fifo->count -= firsthalf;
+ if (fifo->tail == fifo->size) {
+ fifo->tail = 0;
+ }
+
+ secondhalf = count-firsthalf;
+ if (secondhalf) {
+ memcpy(&buffer[2+firsthalf], &fifo->fifo[fifo->tail], secondhalf);
+ fifo->tail += secondhalf;
+ fifo->count -= secondhalf;
+ }
+
+ if (count)
+ usb_serial_debug_data(debug, &edge_port->port->dev, __FUNCTION__, count, &buffer[2]);
+
+ /* fill up the urb with all of our data and submit it */
+ usb_fill_bulk_urb (urb, edge_serial->serial->dev,
+ usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
+ buffer, count+2, edge_bulk_out_data_callback, edge_port);
+
+ /* decrement the number of credits we have by the number we just sent */
+ edge_port->txCredits -= count;
+ edge_port->icount.tx += count;
+
+ urb->dev = edge_serial->serial->dev;
+ status = usb_submit_urb(urb, GFP_ATOMIC);
+ if (status) {
+ /* something went wrong */
+ dev_err(&edge_port->port->dev, "%s - usb_submit_urb(write bulk) failed, status = %d, data lost\n", __FUNCTION__, status);
+ edge_port->write_in_progress = FALSE;
+
+ /* revert the credits as something bad happened. */
+ 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);
+
+exit_send:
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+}
+
+
+/*****************************************************************************
+ * edge_write_room
+ * this function is called by the tty driver when it wants to know how many
+ * bytes of data we can accept for a specific port.
+ * If successful, we return the amount of room that we have for this port
+ * (the txCredits),
+ * Otherwise we return a negative error number.
+ *****************************************************************************/
+static int edge_write_room (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ int room;
+ unsigned long flags;
+
+ 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
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+ room = edge_port->txCredits - edge_port->txfifo.count;
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, room);
+ return room;
+}
+
+
+/*****************************************************************************
+ * edge_chars_in_buffer
+ * this function is called by the tty driver when it wants to know how many
+ * bytes of data we currently have outstanding in the port (data that has
+ * been written, but hasn't made it out the port yet)
+ * If successful, we return the number of bytes left to be written in the
+ * system,
+ * Otherwise we return a negative error number.
+ *****************************************************************************/
+static int edge_chars_in_buffer (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ int num_chars;
+ unsigned long flags;
+
+ dbg("%s", __FUNCTION__);
+
+ if (edge_port == NULL)
+ return -ENODEV;
+ if (edge_port->closePending == TRUE)
+ return -ENODEV;
+
+ if (!edge_port->open) {
+ dbg("%s - port not opened", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+ num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count;
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+ if (num_chars) {
+ dbg("%s(port %d) - returns %d", __FUNCTION__, port->number, num_chars);
+ }
+
+ return num_chars;
+}
+
+
+/*****************************************************************************
+ * SerialThrottle
+ * this function is called by the tty driver when it wants to stop the data
+ * being read from the port.
+ *****************************************************************************/
+static void edge_throttle (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ 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)) {
+ unsigned char stop_char = STOP_CHAR(tty);
+ status = edge_write (port, &stop_char, 1);
+ if (status <= 0) {
+ return;
+ }
+ }
+
+ /* if we are implementing RTS/CTS, toggle that line */
+ if (tty->termios->c_cflag & CRTSCTS) {
+ edge_port->shadowMCR &= ~MCR_RTS;
+ status = send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR);
+ if (status != 0) {
+ return;
+ }
+ }
+
+ return;
+}
+
+
+/*****************************************************************************
+ * edge_unthrottle
+ * this function is called by the tty driver when it wants to resume the data
+ * being read from the port (called after SerialThrottle is called)
+ *****************************************************************************/
+static void edge_unthrottle (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ 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)) {
+ unsigned char start_char = START_CHAR(tty);
+ status = edge_write (port, &start_char, 1);
+ if (status <= 0) {
+ return;
+ }
+ }
+
+ /* if we are implementing RTS/CTS, toggle that line */
+ if (tty->termios->c_cflag & CRTSCTS) {
+ edge_port->shadowMCR |= MCR_RTS;
+ status = send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR);
+ if (status != 0) {
+ return;
+ }
+ }
+
+ return;
+}
+
+
+/*****************************************************************************
+ * SerialSetTermios
+ * this function is called by the tty driver when it wants to change the termios structure
+ *****************************************************************************/
+static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ 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 &&
+ tty->termios->c_iflag == old_termios->c_iflag) {
+ dbg("%s - nothing to change", __FUNCTION__);
+ return;
+ }
+ }
+
+ dbg("%s - clfag %08x iflag %08x", __FUNCTION__,
+ tty->termios->c_cflag, tty->termios->c_iflag);
+ if (old_termios) {
+ dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
+ old_termios->c_cflag, 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;
+ }
+
+ /* change the port settings to the new ones specified */
+ change_port_settings (edge_port, old_termios);
+
+ return;
+}
+
+
+/*****************************************************************************
+ * get_lsr_info - get line status register info
+ *
+ * Purpose: Let user call ioctl() to get info when the UART physically
+ * is emptied. On bus types like RS485, the transmitter must
+ * release the bus after transmitting. This must be done when
+ * the transmit shift register is empty, not be done when the
+ * transmit holding register is empty. This functionality
+ * allows an RS485 driver to be written in user space.
+ *****************************************************************************/
+static int get_lsr_info(struct edgeport_port *edge_port, unsigned int __user *value)
+{
+ unsigned int result = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+ if (edge_port->maxTxCredits == edge_port->txCredits &&
+ edge_port->txfifo.count == 0) {
+ dbg("%s -- Empty", __FUNCTION__);
+ result = TIOCSER_TEMT;
+ }
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+
+ if (copy_to_user(value, &result, sizeof(int)))
+ return -EFAULT;
+ return 0;
+}
+
+static int get_number_bytes_avail(struct edgeport_port *edge_port, unsigned int __user *value)
+{
+ 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;
+ return -ENOIOCTLCMD;
+}
+
+static int edge_tiocmset (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ unsigned int mcr;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ mcr = edge_port->shadowMCR;
+ if (set & TIOCM_RTS)
+ mcr |= MCR_RTS;
+ if (set & TIOCM_DTR)
+ mcr |= MCR_DTR;
+ if (set & TIOCM_LOOP)
+ mcr |= MCR_LOOPBACK;
+
+ if (clear & TIOCM_RTS)
+ mcr &= ~MCR_RTS;
+ if (clear & TIOCM_DTR)
+ mcr &= ~MCR_DTR;
+ if (clear & TIOCM_LOOP)
+ mcr &= ~MCR_LOOPBACK;
+
+ edge_port->shadowMCR = mcr;
+
+ send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR);
+
+ return 0;
+}
+
+static int edge_tiocmget(struct usb_serial_port *port, struct file *file)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ unsigned int result = 0;
+ unsigned int msr;
+ unsigned int mcr;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ msr = edge_port->shadowMSR;
+ mcr = edge_port->shadowMCR;
+ result = ((mcr & MCR_DTR) ? TIOCM_DTR: 0) /* 0x002 */
+ | ((mcr & MCR_RTS) ? TIOCM_RTS: 0) /* 0x004 */
+ | ((msr & EDGEPORT_MSR_CTS) ? TIOCM_CTS: 0) /* 0x020 */
+ | ((msr & EDGEPORT_MSR_CD) ? TIOCM_CAR: 0) /* 0x040 */
+ | ((msr & EDGEPORT_MSR_RI) ? TIOCM_RI: 0) /* 0x080 */
+ | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
+
+
+ dbg("%s -- %x", __FUNCTION__, result);
+
+ return result;
+}
+
+static int get_serial_info(struct edgeport_port *edge_port, struct serial_struct __user *retinfo)
+{
+ struct serial_struct tmp;
+
+ if (!retinfo)
+ return -EFAULT;
+
+ memset(&tmp, 0, sizeof(tmp));
+
+ tmp.type = PORT_16550A;
+ tmp.line = edge_port->port->serial->minor;
+ tmp.port = edge_port->port->number;
+ tmp.irq = 0;
+ tmp.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
+ tmp.xmit_fifo_size = edge_port->maxTxCredits;
+ tmp.baud_base = 9600;
+ tmp.close_delay = 5*HZ;
+ tmp.closing_wait = 30*HZ;
+// tmp.custom_divisor = state->custom_divisor;
+// tmp.hub6 = state->hub6;
+// tmp.io_type = state->io_type;
+
+ if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
+ return -EFAULT;
+ return 0;
+}
+
+
+
+/*****************************************************************************
+ * SerialIoctl
+ * this function handles any ioctl calls to the driver
+ *****************************************************************************/
+static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ DEFINE_WAIT(wait);
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ struct async_icount cnow;
+ struct async_icount cprev;
+ 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 __user *) arg);
+ break;
+
+ case TIOCSERGETLSR:
+ dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number);
+ return get_lsr_info(edge_port, (unsigned int __user *) arg);
+ return 0;
+
+ case TIOCGSERIAL:
+ dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number);
+ return get_serial_info(edge_port, (struct serial_struct __user *) 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) {
+ prepare_to_wait(&edge_port->delta_msr_wait, &wait, TASK_INTERRUPTIBLE);
+ schedule();
+ finish_wait(&edge_port->delta_msr_wait, &wait);
+ /* see if a signal did it */
+ if (signal_pending(current))
+ return -ERESTARTSYS;
+ cnow = edge_port->icount;
+ if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
+ cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
+ return -EIO; /* no change => error */
+ if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+ ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+ ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
+ ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) {
+ return 0;
+ }
+ cprev = cnow;
+ }
+ /* NOTREACHED */
+ break;
+
+ case TIOCGICOUNT:
+ cnow = edge_port->icount;
+ memset(&icount, 0, sizeof(icount));
+ icount.cts = cnow.cts;
+ icount.dsr = cnow.dsr;
+ icount.rng = cnow.rng;
+ icount.dcd = cnow.dcd;
+ icount.rx = cnow.rx;
+ icount.tx = cnow.tx;
+ icount.frame = cnow.frame;
+ icount.overrun = cnow.overrun;
+ icount.parity = cnow.parity;
+ 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 __user *)arg, &icount, sizeof(icount)))
+ return -EFAULT;
+ return 0;
+ }
+
+ return -ENOIOCTLCMD;
+}
+
+
+/*****************************************************************************
+ * SerialBreak
+ * this function sends a break to the port
+ *****************************************************************************/
+static void edge_break (struct usb_serial_port *port, int break_state)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ int status;
+
+ /* 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;
+ }
+
+ 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;
+}
+
+
+/*****************************************************************************
+ * process_rcvd_data
+ * this function handles the data received on the bulk in pipe.
+ *****************************************************************************/
+static void process_rcvd_data (struct edgeport_serial *edge_serial, unsigned char * buffer, __u16 bufferLength)
+{
+ struct usb_serial_port *port;
+ struct edgeport_port *edge_port;
+ struct tty_struct *tty;
+ __u16 lastBufferLength;
+ __u16 rxLen;
+
+ 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;
+
+ switch (edge_serial->rxState) {
+ case EXPECT_HDR1:
+ edge_serial->rxHeader1 = *buffer;
+ ++buffer;
+ --bufferLength;
+
+ if (bufferLength == 0) {
+ edge_serial->rxState = EXPECT_HDR2;
+ break;
+ }
+ /* otherwise, drop on through */
+
+ case EXPECT_HDR2:
+ edge_serial->rxHeader2 = *buffer;
+ ++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
+
+ if (IS_CMD_STAT_HDR(edge_serial->rxHeader1)) {
+ // Decode this status header and goto EXPECT_HDR1 (if we
+ // can process the status with only 2 bytes), or goto
+ // EXPECT_HDR3 to get the third byte.
+
+ edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1);
+ edge_serial->rxStatusCode = IOSP_GET_STATUS_CODE(edge_serial->rxHeader1);
+
+ if (!IOSP_STATUS_IS_2BYTE(edge_serial->rxStatusCode)) {
+ // This status needs additional bytes. Save what we have
+ // and then wait for more data.
+ edge_serial->rxStatusParam = edge_serial->rxHeader2;
+
+ edge_serial->rxState = EXPECT_HDR3;
+ break;
+ }
+
+ // We have all the header bytes, process the status now
+ process_rcvd_status (edge_serial, edge_serial->rxHeader2, 0);
+ edge_serial->rxState = EXPECT_HDR1;
+ break;
+ } else {
+ 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 );
+
+ if (bufferLength == 0 ) {
+ edge_serial->rxState = EXPECT_DATA;
+ break;
+ }
+ // Else, drop through
+ }
+
+ case EXPECT_DATA: // Expect data
+
+ if (bufferLength < edge_serial->rxBytesRemaining) {
+ rxLen = bufferLength;
+ edge_serial->rxState = EXPECT_DATA; // Expect data to start next buffer
+ } else {
+ // BufLen >= RxBytesRemaining
+ rxLen = edge_serial->rxBytesRemaining;
+ edge_serial->rxState = EXPECT_HDR1; // Start another header next time
+ }
+
+ bufferLength -= rxLen;
+ edge_serial->rxBytesRemaining -= rxLen;
+
+ /* spit this data back into the tty driver if this port is open */
+ if (rxLen) {
+ port = edge_serial->serial->port[edge_serial->rxPort];
+ edge_port = usb_get_serial_port_data(port);
+ 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);
+ edge_tty_recv(&edge_serial->serial->dev->dev, tty, buffer, rxLen);
+ }
+ edge_port->icount.rx += rxLen;
+ }
+ buffer += rxLen;
+ }
+
+ break;
+
+ case EXPECT_HDR3: // Expect 3rd byte of status header
+ edge_serial->rxHeader3 = *buffer;
+ ++buffer;
+ --bufferLength;
+
+ // We have all the header bytes, process the status now
+ process_rcvd_status (edge_serial, edge_serial->rxStatusParam, edge_serial->rxHeader3);
+ edge_serial->rxState = EXPECT_HDR1;
+ break;
+
+ }
+ }
+}
+
+
+/*****************************************************************************
+ * process_rcvd_status
+ * this function handles the any status messages received on the bulk in pipe.
+ *****************************************************************************/
+static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2, __u8 byte3)
+{
+ struct usb_serial_port *port;
+ struct edgeport_port *edge_port;
+ __u8 code = edge_serial->rxStatusCode;
+
+ /* switch the port pointer to the one being currently talked about */
+ port = edge_serial->serial->port[edge_serial->rxPort];
+ edge_port = usb_get_serial_port_data(port);
+ if (edge_port == NULL) {
+ dev_err(&edge_serial->serial->dev->dev, "%s - edge_port == NULL for port %d\n", __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.
+ // We could choose to do something else when Byte3 says Timeout on Chase from Edgeport,
+ // like wait longer in block_until_chase_response, but for now we don't.
+ edge_port->chaseResponsePending = FALSE;
+ wake_up (&edge_port->wait_chase);
+ 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;
+ }
+ }
+
+ 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;
+ edge_port->open = TRUE;
+ wake_up(&edge_port->wait_open);
+ return;
+ }
+
+ // If port is closed, silently discard all rcvd status. We can
+ // have cases where buffered status is received AFTER the close
+ // port command is sent to the Edgeport.
+ if ((!edge_port->open ) || (edge_port->closePending)) {
+ return;
+ }
+
+ 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
+ // also saves the MSR in Port->ShadowMsr.
+ handle_new_msr(edge_port, byte2);
+ break;
+
+ default:
+ dbg("%s - Unrecognized IOSP status code %u\n", __FUNCTION__, code);
+ break;
+ }
+
+ return;
+}
+
+
+/*****************************************************************************
+ * edge_tty_recv
+ * this function passes data on to the tty flip buffer
+ *****************************************************************************/
+static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned char *data, int length)
+{
+ int cnt;
+
+ do {
+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ dev_err(dev, "%s - dropping data, %d bytes lost\n",
+ __FUNCTION__, length);
+ return;
+ }
+ }
+ cnt = min(length, TTY_FLIPBUF_SIZE - tty->flip.count);
+ memcpy(tty->flip.char_buf_ptr, data, cnt);
+ memset(tty->flip.flag_buf_ptr, 0, cnt);
+ tty->flip.char_buf_ptr += cnt;
+ tty->flip.flag_buf_ptr += cnt;
+ tty->flip.count += cnt;
+ data += cnt;
+ length -= cnt;
+ } while (length > 0);
+
+ tty_flip_buffer_push(tty);
+}
+
+
+/*****************************************************************************
+ * handle_new_msr
+ * this function handles any change to the msr register for a port.
+ *****************************************************************************/
+static void handle_new_msr(struct edgeport_port *edge_port, __u8 newMsr)
+{
+ struct async_icount *icount;
+
+ dbg("%s %02x", __FUNCTION__, newMsr);
+
+ if (newMsr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) {
+ icount = &edge_port->icount;
+
+ /* update input line counters */
+ if (newMsr & EDGEPORT_MSR_DELTA_CTS) {
+ icount->cts++;
+ }
+ if (newMsr & EDGEPORT_MSR_DELTA_DSR) {
+ icount->dsr++;
+ }
+ if (newMsr & EDGEPORT_MSR_DELTA_CD) {
+ icount->dcd++;
+ }
+ if (newMsr & EDGEPORT_MSR_DELTA_RI) {
+ icount->rng++;
+ }
+ wake_up_interruptible(&edge_port->delta_msr_wait);
+ }
+
+ /* Save the new modem status */
+ edge_port->shadowMSR = newMsr & 0xf0;
+
+ return;
+}
+
+
+/*****************************************************************************
+ * handle_new_lsr
+ * this function handles any change to the lsr register for a port.
+ *****************************************************************************/
+static void handle_new_lsr(struct edgeport_port *edge_port, __u8 lsrData, __u8 lsr, __u8 data)
+{
+ __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;
+
+ if (newLsr & LSR_BREAK) {
+ //
+ // Parity and Framing errors only count if they
+ // occur exclusive of a break being
+ // received.
+ //
+ newLsr &= (__u8)(LSR_OVER_ERR | LSR_BREAK);
+ }
+
+ /* Place LSR data byte into Rx buffer */
+ if (lsrData && edge_port->port->tty)
+ edge_tty_recv(&edge_port->port->dev, edge_port->port->tty, &data, 1);
+
+ /* update input line counters */
+ icount = &edge_port->icount;
+ if (newLsr & LSR_BREAK) {
+ icount->brk++;
+ }
+ if (newLsr & LSR_OVER_ERR) {
+ icount->overrun++;
+ }
+ if (newLsr & LSR_PAR_ERR) {
+ icount->parity++;
+ }
+ if (newLsr & LSR_FRM_ERR) {
+ icount->frame++;
+ }
+
+ return;
+}
+
+
+/****************************************************************************
+ * sram_write
+ * writes a number of bytes to the Edgeport device's sram starting at the
+ * given address.
+ * If successful returns the number of bytes written, otherwise it returns
+ * a negative error number of the problem.
+ ****************************************************************************/
+static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data)
+{
+ int result;
+ __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) {
+ dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
+ return -ENOMEM;
+ }
+
+ /* need to split these writes up into 64 byte chunks */
+ result = 0;
+ while (length > 0) {
+ if (length > 64) {
+ current_length = 64;
+ } 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);
+ if (result < 0)
+ break;
+ length -= current_length;
+ addr += current_length;
+ data += current_length;
+ }
+
+ kfree (transfer_buffer);
+ return result;
+}
+
+
+/****************************************************************************
+ * rom_write
+ * writes a number of bytes to the Edgeport device's ROM starting at the
+ * given address.
+ * If successful returns the number of bytes written, otherwise it returns
+ * a negative error number of the problem.
+ ****************************************************************************/
+static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data)
+{
+ int result;
+ __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) {
+ dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
+ return -ENOMEM;
+ }
+
+ /* need to split these writes up into 64 byte chunks */
+ result = 0;
+ while (length > 0) {
+ if (length > 64) {
+ current_length = 64;
+ } 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);
+ if (result < 0)
+ break;
+ length -= current_length;
+ addr += current_length;
+ data += current_length;
+ }
+
+ kfree (transfer_buffer);
+ return result;
+}
+
+
+/****************************************************************************
+ * rom_read
+ * reads a number of bytes from the Edgeport device starting at the given
+ * address.
+ * If successful returns the number of bytes read, otherwise it returns
+ * a negative error number of the problem.
+ ****************************************************************************/
+static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data)
+{
+ int result;
+ __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) {
+ dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
+ return -ENOMEM;
+ }
+
+ /* need to split these reads up into 64 byte chunks */
+ result = 0;
+ while (length > 0) {
+ if (length > 64) {
+ current_length = 64;
+ } 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)
+ break;
+ memcpy (data, transfer_buffer, current_length);
+ length -= current_length;
+ addr += current_length;
+ data += current_length;
+ }
+
+ kfree (transfer_buffer);
+ return result;
+}
+
+
+/****************************************************************************
+ * send_iosp_ext_cmd
+ * Is used to send a IOSP message to the Edgeport device
+ ****************************************************************************/
+static int send_iosp_ext_cmd (struct edgeport_port *edge_port, __u8 command, __u8 param)
+{
+ unsigned char *buffer;
+ unsigned char *currentCommand;
+ int length = 0;
+ int status = 0;
+
+ dbg("%s - %d, %d", __FUNCTION__, command, param);
+
+ buffer = kmalloc (10, GFP_ATOMIC);
+ if (!buffer) {
+ dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
+ return -ENOMEM;
+ }
+
+ currentCommand = buffer;
+
+ MAKE_CMD_EXT_CMD (&currentCommand, &length,
+ edge_port->port->number - edge_port->port->serial->minor,
+ command, param);
+
+ status = write_cmd_usb (edge_port, buffer, length);
+ if (status) {
+ /* something bad happened, let's free up the memory */
+ kfree(buffer);
+ }
+
+ return status;
+}
+
+
+/*****************************************************************************
+ * write_cmd_usb
+ * this function writes the given buffer out to the bulk write endpoint.
+ *****************************************************************************/
+static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer, int length)
+{
+ struct edgeport_serial *edge_serial = usb_get_serial_data(edge_port->port->serial);
+ int status = 0;
+ struct urb *urb;
+ int timeout;
+
+ usb_serial_debug_data(debug, &edge_port->port->dev, __FUNCTION__, length, buffer);
+
+ /* Allocate our next urb */
+ urb = usb_alloc_urb (0, GFP_ATOMIC);
+ if (!urb)
+ return -ENOMEM;
+
+ CmdUrbs++;
+ dbg("%s - ALLOCATE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs);
+
+ usb_fill_bulk_urb (urb, edge_serial->serial->dev,
+ usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
+ buffer, length, edge_bulk_out_cmd_callback, edge_port);
+
+ edge_port->commandPending = TRUE;
+ status = usb_submit_urb(urb, GFP_ATOMIC);
+
+ if (status) {
+ /* something went wrong */
+ dev_err(&edge_port->port->dev, "%s - usb_submit_urb(write command) failed, status = %d\n", __FUNCTION__, status);
+ usb_kill_urb(urb);
+ usb_free_urb(urb);
+ CmdUrbs--;
+ return status;
+ }
+
+ // wait for command to finish
+ timeout = COMMAND_TIMEOUT;
+#if 0
+ wait_event (&edge_port->wait_command, (edge_port->commandPending == FALSE));
+
+ if (edge_port->commandPending == TRUE) {
+ /* command timed out */
+ dbg("%s - command timed out", __FUNCTION__);
+ status = -EINVAL;
+ }
+#endif
+ return status;
+}
+
+
+/*****************************************************************************
+ * send_cmd_write_baud_rate
+ * this function sends the proper command to change the baud rate of the
+ * specified port.
+ *****************************************************************************/
+static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRate)
+{
+ unsigned char *cmdBuffer;
+ unsigned char *currCmd;
+ 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) {
+ dev_err(&edge_port->port->dev, "%s - bad baud rate\n", __FUNCTION__);
+ return status;
+ }
+
+ // Alloc memory for the string of commands.
+ cmdBuffer = kmalloc (0x100, GFP_ATOMIC);
+ if (!cmdBuffer) {
+ dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
+ return -ENOMEM;
+ }
+ currCmd = cmdBuffer;
+
+ // Enable access to divisor latch
+ MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, LCR, LCR_DL_ENABLE );
+
+ // Write the divisor itself
+ MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, DLL, LOW8 (divisor) );
+ MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, DLM, HIGH8(divisor) );
+
+ // Restore original value to disable access to divisor latch
+ MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, LCR, edge_port->shadowLCR);
+
+ status = write_cmd_usb(edge_port, cmdBuffer, cmdLen );
+ if (status) {
+ /* something bad happened, let's free up the memory */
+ kfree (cmdBuffer);
+ }
+
+ return status;
+}
+
+
+/*****************************************************************************
+ * calc_baud_rate_divisor
+ * this function calculates the proper baud rate divisor for the specified
+ * baud rate.
+ *****************************************************************************/
+static int calc_baud_rate_divisor (int baudrate, int *divisor)
+{
+ int i;
+ __u16 custom;
+
+
+ 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;
+ }
+ }
+
+ // We have tried all of the standard baud rates
+ // lets try to calculate the divisor for this baud rate
+ // Make sure the baud rate is reasonable
+ if (baudrate > 50 && baudrate < 230400) {
+ // get divisor
+ custom = (__u16)((230400L + baudrate/2) / baudrate);
+
+ *divisor = custom;
+
+ dbg("%s - Baud %d = %d\n", __FUNCTION__, baudrate, custom);
+ return 0;
+ }
+
+ return -1;
+}
+
+
+/*****************************************************************************
+ * send_cmd_write_uart_register
+ * this function builds up a uart register message and sends to to the device.
+ *****************************************************************************/
+static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 regNum, __u8 regValue)
+{
+ unsigned char *cmdBuffer;
+ unsigned char *currCmd;
+ 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;
+ }
+
+ 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) {
+ /* something bad happened, let's free up the memory */
+ kfree (cmdBuffer);
+ }
+
+ return status;
+}
+
+
+/*****************************************************************************
+ * change_port_settings
+ * This routine is called to set the UART on the device to match the specified
+ * new settings.
+ *****************************************************************************/
+#ifndef CMSPAR
+#define CMSPAR 0
+#endif
+static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios)
+{
+ struct tty_struct *tty;
+ int baud;
+ unsigned cflag;
+ __u8 mask = 0xff;
+ __u8 lData;
+ __u8 lParity;
+ __u8 lStop;
+ __u8 rxFlow;
+ __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 & CMSPAR) {
+ if (cflag & PARODD) {
+ lParity = LCR_PAR_MARK;
+ dbg("%s - parity = mark", __FUNCTION__);
+ } else {
+ lParity = LCR_PAR_SPACE;
+ dbg("%s - parity = space", __FUNCTION__);
+ }
+ } else 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 */
+ rxFlow = txFlow = 0x00;
+ 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 */
+ if (I_IXOFF(tty) || I_IXON(tty)) {
+ unsigned char stop_char = STOP_CHAR(tty);
+ unsigned char start_char = START_CHAR(tty);
+
+ send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_XON_CHAR, start_char);
+ send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_XOFF_CHAR, stop_char);
+
+ /* 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__);
+ }
+ }
+
+ /* Set flow control to the configured value */
+ send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_RX_FLOW, rxFlow);
+ send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_TX_FLOW, txFlow);
+
+
+ edge_port->shadowLCR &= ~(LCR_BITS_MASK | LCR_STOP_MASK | LCR_PAR_MASK);
+ edge_port->shadowLCR |= (lData | lParity | lStop);
+
+ edge_port->validDataMask = mask;
+
+ /* Send the updated LCR value to the EdgePort */
+ status = send_cmd_write_uart_register(edge_port, LCR, edge_port->shadowLCR);
+ if (status != 0) {
+ return;
+ }
+
+ /* set up the MCR register and send it to the EdgePort */
+ edge_port->shadowMCR = MCR_MASTER_IE;
+ if (cflag & CBAUD) {
+ edge_port->shadowMCR |= (MCR_DTR | MCR_RTS);
+ }
+ status = send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR);
+ if (status != 0) {
+ return;
+ }
+
+ /* Determine divisor based on baud rate */
+ baud = tty_get_baud_rate(tty);
+ if (!baud) {
+ /* pick a default, any default... */
+ baud = 9600;
+ }
+
+ dbg("%s - baud rate = %d", __FUNCTION__, baud);
+ status = send_cmd_write_baud_rate (edge_port, baud);
+
+ return;
+}
+
+
+/****************************************************************************
+ * unicode_to_ascii
+ * Turns a string from Unicode into ASCII.
+ * Doesn't do a good job with any characters that are outside the normal
+ * ASCII range, but it's only for debugging...
+ * NOTE: expects the unicode in LE format
+ ****************************************************************************/
+static void unicode_to_ascii (char *string, __le16 *unicode, int unicode_size)
+{
+ int i;
+
+ if (unicode_size <= 0)
+ return;
+
+ for (i = 0; i < unicode_size; ++i)
+ string[i] = (char)(le16_to_cpu(unicode[i]));
+ string[unicode_size] = 0x00;
+}
+
+
+/****************************************************************************
+ * get_manufacturing_desc
+ * reads in the manufacturing descriptor and stores it into the serial
+ * structure.
+ ****************************************************************************/
+static void get_manufacturing_desc (struct edgeport_serial *edge_serial)
+{
+ int response;
+
+ dbg("getting manufacturer descriptor");
+
+ response = rom_read (edge_serial->serial, (EDGE_MANUF_DESC_ADDR & 0xffff0000) >> 16,
+ (__u16)(EDGE_MANUF_DESC_ADDR & 0x0000ffff), EDGE_MANUF_DESC_LEN,
+ (__u8 *)(&edge_serial->manuf_descriptor));
+
+ if (response < 1) {
+ dev_err(&edge_serial->serial->dev->dev, "error in getting manufacturer descriptor\n");
+ } else {
+ char string[30];
+ dbg("**Manufacturer Descriptor");
+ dbg(" RomSize: %dK", edge_serial->manuf_descriptor.RomSize);
+ dbg(" RamSize: %dK", edge_serial->manuf_descriptor.RamSize);
+ dbg(" CpuRev: %d", edge_serial->manuf_descriptor.CpuRev);
+ dbg(" BoardRev: %d", edge_serial->manuf_descriptor.BoardRev);
+ dbg(" NumPorts: %d", edge_serial->manuf_descriptor.NumPorts);
+ dbg(" DescDate: %d/%d/%d", edge_serial->manuf_descriptor.DescDate[0], edge_serial->manuf_descriptor.DescDate[1], edge_serial->manuf_descriptor.DescDate[2]+1900);
+ unicode_to_ascii (string, edge_serial->manuf_descriptor.SerialNumber, edge_serial->manuf_descriptor.SerNumLength/2-1);
+ dbg(" SerialNumber: %s", string);
+ unicode_to_ascii (string, edge_serial->manuf_descriptor.AssemblyNumber, edge_serial->manuf_descriptor.AssemblyNumLength/2-1);
+ dbg(" AssemblyNumber: %s", string);
+ unicode_to_ascii (string, edge_serial->manuf_descriptor.OemAssyNumber, edge_serial->manuf_descriptor.OemAssyNumLength/2-1);
+ dbg(" OemAssyNumber: %s", string);
+ dbg(" UartType: %d", edge_serial->manuf_descriptor.UartType);
+ dbg(" IonPid: %d", edge_serial->manuf_descriptor.IonPid);
+ dbg(" IonConfig: %d", edge_serial->manuf_descriptor.IonConfig);
+ }
+}
+
+
+/****************************************************************************
+ * get_boot_desc
+ * reads in the bootloader descriptor and stores it into the serial
+ * structure.
+ ****************************************************************************/
+static void get_boot_desc (struct edgeport_serial *edge_serial)
+{
+ int response;
+
+ dbg("getting boot descriptor");
+
+ response = rom_read (edge_serial->serial, (EDGE_BOOT_DESC_ADDR & 0xffff0000) >> 16,
+ (__u16)(EDGE_BOOT_DESC_ADDR & 0x0000ffff), EDGE_BOOT_DESC_LEN,
+ (__u8 *)(&edge_serial->boot_descriptor));
+
+ if (response < 1) {
+ dev_err(&edge_serial->serial->dev->dev, "error in getting boot descriptor\n");
+ } else {
+ dbg("**Boot Descriptor:");
+ dbg(" BootCodeLength: %d", le16_to_cpu(edge_serial->boot_descriptor.BootCodeLength));
+ dbg(" MajorVersion: %d", edge_serial->boot_descriptor.MajorVersion);
+ dbg(" MinorVersion: %d", edge_serial->boot_descriptor.MinorVersion);
+ dbg(" BuildNumber: %d", le16_to_cpu(edge_serial->boot_descriptor.BuildNumber));
+ dbg(" Capabilities: 0x%x", le16_to_cpu(edge_serial->boot_descriptor.Capabilities));
+ dbg(" UConfig0: %d", edge_serial->boot_descriptor.UConfig0);
+ dbg(" UConfig1: %d", edge_serial->boot_descriptor.UConfig1);
+ }
+}
+
+
+/****************************************************************************
+ * load_application_firmware
+ * This is called to load the application firmware to the device
+ ****************************************************************************/
+static void load_application_firmware (struct edgeport_serial *edge_serial)
+{
+ struct edge_firmware_image_record *record;
+ unsigned char *firmware;
+ unsigned char *FirmwareImage;
+ int ImageSize;
+ int response;
+
+
+ switch (edge_serial->product_info.iDownloadFile) {
+ case EDGE_DOWNLOAD_FILE_I930:
+ dbg("downloading firmware version (930) %d.%d.%d",
+ OperationalCodeImageVersion_GEN1.MajorVersion,
+ OperationalCodeImageVersion_GEN1.MinorVersion,
+ OperationalCodeImageVersion_GEN1.BuildNumber);
+ firmware = &OperationalCodeImage_GEN1[0];
+ FirmwareImage = &OperationalCodeImage_GEN1[0];
+ ImageSize = sizeof(OperationalCodeImage_GEN1);
+ break;
+
+ case EDGE_DOWNLOAD_FILE_80251:
+ dbg("downloading firmware version (80251) %d.%d.%d",
+ OperationalCodeImageVersion_GEN2.MajorVersion,
+ OperationalCodeImageVersion_GEN2.MinorVersion,
+ OperationalCodeImageVersion_GEN2.BuildNumber);
+ firmware = &OperationalCodeImage_GEN2[0];
+ FirmwareImage = &OperationalCodeImage_GEN2[0];
+ ImageSize = sizeof(OperationalCodeImage_GEN2);
+ break;
+
+ case EDGE_DOWNLOAD_FILE_NONE:
+ dbg ("No download file specified, skipping download\n");
+ return;
+
+ default:
+ return;
+ }
+
+
+ for (;;) {
+ record = (struct edge_firmware_image_record *)firmware;
+ response = sram_write (edge_serial->serial, le16_to_cpu(record->ExtAddr), le16_to_cpu(record->Addr), le16_to_cpu(record->Len), &record->Data[0]);
+ if (response < 0) {
+ dev_err(&edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", le16_to_cpu(record->ExtAddr), le16_to_cpu(record->Addr), le16_to_cpu(record->Len));
+ break;
+ }
+ firmware += sizeof (struct edge_firmware_image_record) + le16_to_cpu(record->Len);
+ if (firmware >= &FirmwareImage[ImageSize]) {
+ break;
+ }
+ }
+
+ dbg("sending exec_dl_code");
+ response = usb_control_msg (edge_serial->serial->dev,
+ usb_sndctrlpipe(edge_serial->serial->dev, 0),
+ USB_REQUEST_ION_EXEC_DL_CODE,
+ 0x40, 0x4000, 0x0001, NULL, 0, 3000);
+
+ return;
+}
+
+
+/****************************************************************************
+ * edge_startup
+ ****************************************************************************/
+static int edge_startup (struct usb_serial *serial)
+{
+ struct edgeport_serial *edge_serial;
+ struct edgeport_port *edge_port;
+ struct usb_device *dev;
+ int i;
+
+ dev = serial->dev;
+
+ /* create our private serial structure */
+ edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
+ if (edge_serial == NULL) {
+ dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ memset (edge_serial, 0, sizeof(struct edgeport_serial));
+ spin_lock_init(&edge_serial->es_lock);
+ edge_serial->serial = serial;
+ usb_set_serial_data(serial, edge_serial);
+
+ /* get the name for the device from the device */
+ if ( (i = get_string(dev, dev->descriptor.iManufacturer, &edge_serial->name[0])) != 0) {
+ edge_serial->name[i-1] = ' ';
+ }
+
+ get_string(dev, dev->descriptor.iProduct, &edge_serial->name[i]);
+
+ dev_info(&serial->dev->dev, "%s detected\n", edge_serial->name);
+
+ /* get the manufacturing descriptor for this device */
+ get_manufacturing_desc (edge_serial);
+
+ /* get the boot descriptor */
+ get_boot_desc (edge_serial);
+
+ get_product_info(edge_serial);
+
+ /* 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");
+// usb_set_configuration (dev, 1);
+
+ /* we set up the pointers to the endpoints in the edge_open function,
+ * as the structures aren't created yet. */
+
+ /* set up our port private structures */
+ for (i = 0; i < serial->num_ports; ++i) {
+ edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
+ if (edge_port == NULL) {
+ dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
+ usb_set_serial_data(serial, NULL);
+ kfree(edge_serial);
+ return -ENOMEM;
+ }
+ memset (edge_port, 0, sizeof(struct edgeport_port));
+ spin_lock_init(&edge_port->ep_lock);
+ edge_port->port = serial->port[i];
+ usb_set_serial_port_data(serial->port[i], edge_port);
+ }
+
+ return 0;
+}
+
+
+/****************************************************************************
+ * edge_shutdown
+ * This function is called whenever the device is removed from the usb bus.
+ ****************************************************************************/
+static void edge_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) {
+ kfree (usb_get_serial_port_data(serial->port[i]));
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+ kfree (usb_get_serial_data(serial));
+ usb_set_serial_data(serial, NULL);
+}
+
+
+/****************************************************************************
+ * edgeport_init
+ * This is called by the module subsystem, or on startup to initialize us
+ ****************************************************************************/
+static int __init edgeport_init(void)
+{
+ int retval;
+
+ retval = usb_serial_register(&edgeport_2port_device);
+ if (retval)
+ goto failed_2port_device_register;
+ retval = usb_serial_register(&edgeport_4port_device);
+ if (retval)
+ goto failed_4port_device_register;
+ retval = usb_serial_register(&edgeport_8port_device);
+ if (retval)
+ goto failed_8port_device_register;
+ retval = usb_register(&io_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+
+failed_usb_register:
+ usb_serial_deregister(&edgeport_8port_device);
+failed_8port_device_register:
+ usb_serial_deregister(&edgeport_4port_device);
+failed_4port_device_register:
+ usb_serial_deregister(&edgeport_2port_device);
+failed_2port_device_register:
+ return retval;
+}
+
+
+/****************************************************************************
+ * edgeport_exit
+ * Called when the driver is about to be unloaded.
+ ****************************************************************************/
+static void __exit edgeport_exit (void)
+{
+ usb_deregister (&io_driver);
+ usb_serial_deregister (&edgeport_2port_device);
+ usb_serial_deregister (&edgeport_4port_device);
+ usb_serial_deregister (&edgeport_8port_device);
+}
+
+module_init(edgeport_init);
+module_exit(edgeport_exit);
+
+/* Module information */
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
+module_param(low_latency, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(low_latency, "Low latency enabled or not");
diff --git a/drivers/usb/serial/io_edgeport.h b/drivers/usb/serial/io_edgeport.h
new file mode 100644
index 000000000000..5112d7aac055
--- /dev/null
+++ b/drivers/usb/serial/io_edgeport.h
@@ -0,0 +1,141 @@
+/************************************************************************
+ *
+ * io_edgeport.h Edgeport Linux Interface definitions
+ *
+ * Copyright (C) 2000 Inside Out Networks, Inc.
+ *
+ * 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.
+ *
+ *
+ ************************************************************************/
+
+#if !defined(_IO_EDGEPORT_H_)
+#define _IO_EDGEPORT_H_
+
+
+#define MAX_RS232_PORTS 8 /* Max # of RS-232 ports per device */
+
+/* typedefs that the insideout headers need */
+#ifndef TRUE
+ #define TRUE (1)
+#endif
+#ifndef FALSE
+ #define FALSE (0)
+#endif
+#ifndef LOW8
+ #define LOW8(a) ((unsigned char)(a & 0xff))
+#endif
+#ifndef HIGH8
+ #define HIGH8(a) ((unsigned char)((a & 0xff00) >> 8))
+#endif
+#ifndef NUM_ENTRIES
+ #define NUM_ENTRIES(x) (sizeof(x)/sizeof((x)[0]))
+#endif
+
+#ifndef __KERNEL__
+#define __KERNEL__
+#endif
+
+#include "io_usbvend.h"
+
+
+
+/* The following table is used to map the USBx port number to
+ * the device serial number (or physical USB path), */
+#define MAX_EDGEPORTS 64
+
+struct comMapper {
+ char SerialNumber[MAX_SERIALNUMBER_LEN+1]; /* Serial number/usb path */
+ int numPorts; /* Number of ports */
+ int Original[MAX_RS232_PORTS]; /* Port numbers set by IOCTL */
+ int Port[MAX_RS232_PORTS]; /* Actual used port numbers */
+};
+
+
+#define EDGEPORT_CONFIG_DEVICE "/proc/edgeport"
+
+/* /proc/edgeport Interface
+ * This interface uses read/write/lseek interface to talk to the edgeport driver
+ * the following read functions are supported: */
+#define PROC_GET_MAPPING_TO_PATH 1
+#define PROC_GET_COM_ENTRY 2
+#define PROC_GET_EDGE_MANUF_DESCRIPTOR 3
+#define PROC_GET_BOOT_DESCRIPTOR 4
+#define PROC_GET_PRODUCT_INFO 5
+#define PROC_GET_STRINGS 6
+#define PROC_GET_CURRENT_COM_MAPPING 7
+
+/* The parameters to the lseek() for the read is: */
+#define PROC_READ_SETUP(Command, Argument) ((Command) + ((Argument)<<8))
+
+
+/* the following write functions are supported: */
+#define PROC_SET_COM_MAPPING 1
+#define PROC_SET_COM_ENTRY 2
+
+
+/* The following sturcture is passed to the write */
+struct procWrite {
+ int Command;
+ union {
+ struct comMapper Entry;
+ int ComMappingBasedOnUSBPort; /* Boolean value */
+ } u;
+};
+
+/*
+ * Product information read from the Edgeport
+ */
+struct edgeport_product_info {
+ __u16 ProductId; /* Product Identifier */
+ __u8 NumPorts; /* Number of ports on edgeport */
+ __u8 ProdInfoVer; /* What version of structure is this? */
+
+ __u32 IsServer :1; /* Set if Server */
+ __u32 IsRS232 :1; /* Set if RS-232 ports exist */
+ __u32 IsRS422 :1; /* Set if RS-422 ports exist */
+ __u32 IsRS485 :1; /* Set if RS-485 ports exist */
+ __u32 IsReserved :28; /* Reserved for later expansion */
+
+ __u8 RomSize; /* Size of ROM/E2PROM in K */
+ __u8 RamSize; /* Size of external RAM in K */
+ __u8 CpuRev; /* CPU revision level (chg only if s/w visible) */
+ __u8 BoardRev; /* PCB revision level (chg only if s/w visible) */
+
+ __u8 BootMajorVersion; /* Boot Firmware version: xx. */
+ __u8 BootMinorVersion; /* yy. */
+ __le16 BootBuildNumber; /* zzzz (LE format) */
+
+ __u8 FirmwareMajorVersion; /* Operational Firmware version:xx. */
+ __u8 FirmwareMinorVersion; /* yy. */
+ __le16 FirmwareBuildNumber; /* zzzz (LE format) */
+
+ __u8 ManufactureDescDate[3]; /* MM/DD/YY when descriptor template was compiled */
+ __u8 Unused1[1]; /* Available */
+
+ __u8 iDownloadFile; /* What to download to EPiC device */
+ __u8 Unused2[2]; /* Available */
+};
+
+/*
+ * Edgeport Stringblock String locations
+ */
+#define EDGESTRING_MANUFNAME 1 /* Manufacture Name */
+#define EDGESTRING_PRODNAME 2 /* Product Name */
+#define EDGESTRING_SERIALNUM 3 /* Serial Number */
+#define EDGESTRING_ASSEMNUM 4 /* Assembly Number */
+#define EDGESTRING_OEMASSEMNUM 5 /* OEM Assembly Number */
+#define EDGESTRING_MANUFDATE 6 /* Manufacture Date */
+#define EDGESTRING_ORIGSERIALNUM 7 /* Serial Number */
+
+struct string_block {
+ __u16 NumStrings; /* Number of strings in block */
+ __u16 Strings[1]; /* Start of string block */
+};
+
+
+
+#endif
diff --git a/drivers/usb/serial/io_fw_boot.h b/drivers/usb/serial/io_fw_boot.h
new file mode 100644
index 000000000000..099fafaf52bb
--- /dev/null
+++ b/drivers/usb/serial/io_fw_boot.h
@@ -0,0 +1,556 @@
+//**************************************************************
+//* Edgeport/4 Binary Image
+//* Generated by HEX2C v1.06
+//* Copyright (C) 1998 Inside Out Networks, All rights reserved.
+//* 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.
+//**************************************************************
+
+
+//Image structure definition
+#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
+#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
+ struct edge_firmware_image_record {
+ __le16 ExtAddr;
+ __le16 Addr;
+ __le16 Len;
+ unsigned char Data[0];
+ } __attribute__ ((packed));
+
+ struct edge_firmware_version_info {
+ unsigned char MajorVersion;
+ unsigned char MinorVersion;
+ unsigned short BuildNumber;
+ };
+
+#endif
+
+#if !defined(IMAGE_ARRAY_NAME)
+#define IMAGE_ARRAY_NAME FirmwareImage
+#define IMAGE_VERSION_NAME FirmwareImageVersion
+#endif
+
+static unsigned char IMAGE_ARRAY_NAME[] = {
+
+// Segment #1, Start Address 00ff0000, Length 6
+0xff,0x00,0x00,0x00,0x06,0x00,
+ 0x02, 0x00, 0x80, 0x02, 0x00, 0x03,
+
+// Segment #2, Start Address 00ff000b, Length 3
+0xff,0x00,0x0b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x0b,
+
+// Segment #3, Start Address 00ff0013, Length 3
+0xff,0x00,0x13,0x00,0x03,0x00,
+ 0x02, 0x01, 0xb8,
+
+// Segment #4, Start Address 00ff001b, Length 3
+0xff,0x00,0x1b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x1b,
+
+// Segment #5, Start Address 00ff0023, Length 3
+0xff,0x00,0x23,0x00,0x03,0x00,
+ 0x02, 0x00, 0x23,
+
+// Segment #6, Start Address 00ff002b, Length 3
+0xff,0x00,0x2b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x2b,
+
+// Segment #7, Start Address 00ff0033, Length 3
+0xff,0x00,0x33,0x00,0x03,0x00,
+ 0x02, 0x00, 0x33,
+
+// Segment #8, Start Address 00ff003b, Length 3
+0xff,0x00,0x3b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x3b,
+
+// Segment #9, Start Address 00ff0043, Length 3
+0xff,0x00,0x43,0x00,0x03,0x00,
+ 0x02, 0x01, 0xbd,
+
+// Segment #10, Start Address 00ff004b, Length 3
+0xff,0x00,0x4b,0x00,0x03,0x00,
+ 0x02, 0x01, 0xd0,
+
+// Segment #11, Start Address 00ff0053, Length 3
+0xff,0x00,0x53,0x00,0x03,0x00,
+ 0x02, 0x01, 0x21,
+
+// Segment #12, Start Address 00ff007b, Length 3
+0xff,0x00,0x7b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x7b,
+
+// Segment #13, Start Address 00ff0080, Length 358
+0xff,0x00,0x80,0x00,0x66,0x01,
+ 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x3f, 0xf2, 0x7e, 0xf8, 0x00, 0x23, 0x7e, 0x00, 0x01, 0x7e, 0x10,
+ 0x00, 0x12, 0x07, 0x5f, 0x69, 0x20, 0x00, 0x0a, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x05, 0x75, 0x90,
+ 0x0d, 0x80, 0x03, 0x75, 0x90, 0x1d, 0xd2, 0xb5, 0x7e, 0x00, 0x00, 0xa5, 0xd8, 0xfd, 0x75, 0xa8,
+ 0x00, 0x75, 0xb1, 0x00, 0xa9, 0xd5, 0x87, 0xca, 0x29, 0x12, 0x09, 0xcc, 0x12, 0x09, 0xa0, 0xf5,
+ 0x09, 0x7a, 0xa1, 0x20, 0x12, 0x01, 0xe6, 0xda, 0x29, 0xa9, 0xd0, 0xc7, 0x7e, 0x00, 0x05, 0x7a,
+ 0x01, 0xf1, 0x75, 0xe1, 0x10, 0xa9, 0xd7, 0xf4, 0xa9, 0xd7, 0xe4, 0xa5, 0xd8, 0xf1, 0x75, 0xf1,
+ 0x00, 0x75, 0xe1, 0x3f, 0x75, 0xa2, 0x03, 0x75, 0xa3, 0x00, 0x75, 0xc0, 0x00, 0x75, 0xc1, 0x00,
+ 0xa9, 0xd1, 0xb1, 0xa9, 0xd0, 0xb1, 0xa9, 0xd5, 0xd3, 0xd2, 0xaf, 0xe4, 0x7e, 0x04, 0x28, 0x00,
+ 0x8d, 0xef, 0x1b, 0x04, 0x78, 0xfa, 0x04, 0xa9, 0x34, 0xd3, 0x03, 0x30, 0xe0, 0xee, 0xbe, 0x24,
+ 0x00, 0x00, 0x78, 0x05, 0x63, 0x90, 0x30, 0x80, 0xe3, 0xb2, 0x95, 0x80, 0xdf, 0xbe, 0xb0, 0x02,
+ 0x22, 0xc0, 0xd0, 0xa9, 0x20, 0xdf, 0x0f, 0xa9, 0x31, 0xdf, 0x03, 0x02, 0x01, 0xb5, 0x75, 0x08,
+ 0x01, 0x12, 0x08, 0x33, 0x80, 0xfe, 0x75, 0x08, 0xfe, 0x12, 0x08, 0x33, 0x75, 0xa8, 0x00, 0x7e,
+ 0xb3, 0x3f, 0xf2, 0x30, 0xe0, 0x4b, 0x30, 0x01, 0x46, 0xc2, 0x92, 0x7e, 0x24, 0x80, 0x00, 0x7e,
+ 0x11, 0x09, 0x74, 0x08, 0x19, 0xb2, 0x00, 0x10, 0x74, 0x0e, 0x19, 0xb2, 0x00, 0x04, 0x2e, 0x24,
+ 0x01, 0x00, 0xa5, 0xd9, 0xed, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0xe4, 0xd5, 0xe0, 0xfd,
+ 0x09, 0xb2, 0x00, 0x08, 0x20, 0xe0, 0x0a, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x18, 0x80,
+ 0xeb, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xe4, 0x43, 0x90, 0x30, 0xd2, 0xaa, 0x80, 0x05, 0xd2,
+ 0xaa, 0x43, 0x90, 0x34, 0xd2, 0xaf, 0xa9, 0xd1, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x11,
+ 0xdf, 0x03, 0xa9, 0xd2, 0xdf, 0x75, 0x08, 0xff, 0x12, 0x08, 0x33, 0xc0, 0xd1, 0xca, 0x02, 0xff,
+ 0xca, 0x06, 0x83, 0x00, 0x32, 0xd0, 0xd0, 0x32, 0xc2, 0x8b, 0xc2, 0xaa, 0x32, 0x75, 0x08, 0x08,
+ 0x12, 0x08, 0x33, 0xa9, 0xc0, 0xb1, 0xa9, 0xc5, 0xd3, 0xa9, 0xc6, 0xd3, 0xa9, 0xd2, 0xb1, 0x32,
+ 0xca, 0xb8, 0x75, 0x08, 0x02, 0x12, 0x08, 0x33, 0xe5, 0xc0, 0x54, 0x03, 0x68, 0x05, 0x12, 0x01,
+ 0xee, 0x80, 0xf5, 0xda, 0xb8, 0x32,
+
+// Segment #14, Start Address 00ff1bca, Length 1
+0xff,0x00,0xca,0x1b,0x01,0x00,
+ 0x00,
+
+// Segment #15, Start Address 00ff01e6, Length 1613
+0xff,0x00,0xe6,0x01,0x4d,0x06,
+ 0xe4, 0x7a, 0xb3, 0x3f, 0xf1, 0x02, 0x02, 0x63, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xca, 0x3b,
+ 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0xc0, 0xf1, 0x7e, 0xb3, 0x01, 0x2b,
+ 0xb4, 0x00, 0x02, 0x80, 0x19, 0xb4, 0x01, 0x16, 0x30, 0xc0, 0x08, 0x75, 0xf1, 0x00, 0x12, 0x02,
+ 0x4d, 0x80, 0x1f, 0x30, 0xc1, 0x1c, 0x75, 0xf1, 0x00, 0x12, 0x02, 0xde, 0x80, 0x14, 0x30, 0xc1,
+ 0x08, 0x75, 0xf1, 0x00, 0x12, 0x02, 0xde, 0x80, 0x09, 0x30, 0xc0, 0x06, 0x75, 0xf1, 0x00, 0x12,
+ 0x02, 0x4d, 0xd0, 0xf1, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda, 0x5b, 0xda, 0x4b, 0xda, 0x3b,
+ 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0xc2, 0xc0, 0x7e, 0xb3, 0x01, 0x2b, 0xb4, 0x02, 0x07,
+ 0x12, 0x02, 0x6f, 0x02, 0x02, 0x63, 0x22, 0xb4, 0x01, 0xfc, 0x02, 0x02, 0xa9, 0x7e, 0x00, 0x00,
+ 0x7a, 0x03, 0x01, 0x2b, 0x7a, 0x03, 0x01, 0x2c, 0x22, 0x7e, 0xb3, 0x01, 0x23, 0x54, 0x60, 0x60,
+ 0x05, 0xb4, 0x40, 0x15, 0x80, 0x13, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x05, 0x0c, 0x75, 0x08, 0x71,
+ 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x26, 0xf5, 0x8f, 0x22, 0x75, 0xf6, 0x00, 0x22, 0xbe, 0x57,
+ 0x01, 0x29, 0x28, 0x04, 0x7e, 0x57, 0x01, 0x29, 0x7a, 0x0f, 0x01, 0x2e, 0x7a, 0x57, 0x01, 0x32,
+ 0x02, 0x02, 0xa9, 0x7e, 0xef, 0x01, 0x2e, 0x7e, 0xf7, 0x01, 0x32, 0x7e, 0x07, 0x01, 0x32, 0x4d,
+ 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0x7e, 0xeb, 0xb0, 0xf5, 0xf3, 0xa3, 0xa5, 0x08, 0x1b, 0xf4,
+ 0x68, 0x04, 0xa5, 0xb8, 0x08, 0xf0, 0x7a, 0xef, 0x01, 0x2e, 0x7a, 0xf7, 0x01, 0x32, 0x75, 0x08,
+ 0x06, 0x12, 0x08, 0x33, 0x7a, 0x01, 0xf6, 0x22, 0xc2, 0xc1, 0x75, 0x08, 0x03, 0x12, 0x08, 0x33,
+ 0xa9, 0x36, 0xe2, 0x16, 0xe5, 0xf5, 0x54, 0xc0, 0x68, 0x07, 0xa9, 0xd7, 0xf4, 0xa9, 0x27, 0xf4,
+ 0xfc, 0x53, 0xe1, 0x3f, 0x43, 0xf2, 0x88, 0x02, 0x03, 0x55, 0x7e, 0xb3, 0x01, 0x2c, 0xb4, 0x02,
+ 0x0f, 0xa9, 0xd4, 0xe4, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x01, 0x2c, 0x7a, 0xb3, 0x01, 0x2b, 0x22,
+ 0xb4, 0x01, 0x39, 0x7e, 0x21, 0xe6, 0x7c, 0x32, 0x7e, 0x13, 0x01, 0x2d, 0x2c, 0x21, 0x7a, 0x23,
+ 0x01, 0x2d, 0x7e, 0x00, 0x00, 0x2e, 0x04, 0x01, 0x34, 0xe5, 0xe3, 0x7a, 0x09, 0xb0, 0x0b, 0x04,
+ 0xa5, 0xdb, 0xf6, 0xa9, 0xd4, 0xe4, 0x75, 0x08, 0x70, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x2d,
+ 0x7e, 0xa3, 0x01, 0x2a, 0xbc, 0xab, 0x78, 0x03, 0x12, 0x03, 0xec, 0x22, 0x02, 0x07, 0x55, 0xe5,
+ 0xe6, 0xb4, 0x08, 0x65, 0xa9, 0xc4, 0xe2, 0x7e, 0x01, 0xe3, 0x7e, 0x11, 0xe3, 0x7e, 0x31, 0xe3,
+ 0x7e, 0x21, 0xe3, 0x7e, 0x51, 0xe3, 0x7e, 0x41, 0xe3, 0x7e, 0x71, 0xe3, 0x7e, 0x61, 0xe3, 0x7a,
+ 0x0f, 0x01, 0x23, 0x7a, 0x1f, 0x01, 0x27, 0x75, 0x08, 0x04, 0x12, 0x08, 0x33, 0x7a, 0x01, 0x08,
+ 0x12, 0x08, 0x33, 0x7a, 0x11, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x21, 0x08, 0x12, 0x08, 0x33, 0x7a,
+ 0x31, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x41, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x51, 0x08, 0x12, 0x08,
+ 0x33, 0x7a, 0x61, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x71, 0x08, 0x12, 0x08, 0x33, 0xa9, 0xd4, 0xe4,
+ 0xa9, 0xd7, 0xf4, 0xa9, 0xc6, 0xe2, 0x12, 0x03, 0xc0, 0x22, 0x6d, 0x00, 0x7e, 0x14, 0x01, 0x02,
+ 0x7a, 0x07, 0x01, 0x32, 0x7a, 0x03, 0x01, 0x2d, 0x7e, 0xb3, 0x01, 0x23, 0x20, 0xe7, 0x0f, 0x7a,
+ 0x23, 0x01, 0x2c, 0x7a, 0x33, 0x01, 0x2b, 0xbe, 0x07, 0x01, 0x29, 0x68, 0x09, 0x22, 0x7a, 0x33,
+ 0x01, 0x2c, 0x7a, 0x23, 0x01, 0x2b, 0x7e, 0xb3, 0x01, 0x23, 0x54, 0xe3, 0x23, 0x23, 0x30, 0xe0,
+ 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5, 0x06, 0x30, 0xe4, 0x03, 0x02, 0x07,
+ 0x55, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25, 0xf0, 0x90, 0x04, 0x18, 0x75, 0x84,
+ 0xff, 0x73, 0x02, 0x05, 0x6c, 0x02, 0x04, 0x60, 0x02, 0x06, 0x09, 0x02, 0x06, 0x24, 0x02, 0x05,
+ 0x05, 0x02, 0x04, 0xc6, 0x02, 0x06, 0x3d, 0x02, 0x06, 0x3d, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40,
+ 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02,
+ 0x06, 0x40, 0x02, 0x06, 0x46, 0x02, 0x06, 0xfa, 0x02, 0x06, 0x43, 0x02, 0x06, 0x43, 0x02, 0x06,
+ 0x43, 0x02, 0x06, 0x43, 0x02, 0x06, 0x43, 0x02, 0x06, 0x43, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x06,
+ 0x2a, 0x7e, 0xb3, 0x01, 0x25, 0x60, 0x56, 0x7c, 0x0b, 0x7e, 0x13, 0x01, 0x26, 0x7e, 0x17, 0x01,
+ 0x27, 0x75, 0x08, 0x72, 0x12, 0x08, 0x33, 0x7a, 0x01, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x11, 0x08,
+ 0x12, 0x08, 0x33, 0x12, 0x07, 0x5f, 0x40, 0x35, 0x02, 0x02, 0x94, 0xb4, 0x08, 0x10, 0x75, 0x08,
+ 0x74, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x3f, 0xf1, 0xf5, 0xf3, 0x75, 0xf6, 0x01, 0x22, 0xb4, 0x00,
+ 0x1c, 0x75, 0x08, 0x75, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x3f, 0xf2, 0x30, 0xe0, 0x05, 0x75, 0xf3,
+ 0x02, 0x80, 0x03, 0x75, 0xf3, 0x00, 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x07, 0x55,
+ 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x00, 0x35, 0x75, 0x08, 0x76, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01,
+ 0x28, 0x54, 0x0f, 0xf5, 0xf1, 0x7e, 0xb3, 0x01, 0x28, 0x20, 0xe7, 0x09, 0xe5, 0xe1, 0x30, 0xe7,
+ 0x0d, 0x74, 0x01, 0x80, 0x0b, 0xe5, 0xe1, 0x30, 0xe6, 0x04, 0x74, 0x01, 0x80, 0x02, 0x74, 0x00,
+ 0x53, 0xf1, 0x80, 0xf5, 0xf3, 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x07, 0x55, 0xc0,
+ 0xf1, 0x7e, 0xb3, 0x01, 0x28, 0x54, 0x0f, 0x42, 0xf1, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x00, 0x45,
+ 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x01, 0x24, 0x75, 0x08, 0x77, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01,
+ 0x28, 0x54, 0x0f, 0x78, 0x05, 0x53, 0xe1, 0x3f, 0x80, 0x37, 0x7e, 0xb3, 0x01, 0x28, 0x20, 0xe7,
+ 0x05, 0x53, 0xe1, 0x7f, 0x80, 0x2b, 0x53, 0xe1, 0xbf, 0x80, 0x26, 0xb4, 0x03, 0x17, 0x75, 0x08,
+ 0x78, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x28, 0x20, 0xe7, 0x05, 0x43, 0xe1, 0x80, 0x80, 0x11,
+ 0x43, 0xe1, 0x40, 0x80, 0x0c, 0x43, 0xe1, 0xc0, 0xd0, 0xf1, 0x75, 0x08, 0x07, 0x12, 0x08, 0x33,
+ 0x22, 0xd0, 0xf1, 0x02, 0x02, 0x90, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x09, 0x23, 0x75, 0x08, 0x79,
+ 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x26, 0xbe, 0xb3, 0x3f, 0xf1, 0x68, 0x11, 0xca, 0xb8, 0xc0,
+ 0xf1, 0x12, 0x01, 0x1d, 0xd0, 0xf1, 0xda, 0xb8, 0x50, 0x76, 0x7a, 0xb3, 0x3f, 0xf1, 0x80, 0x6d,
+ 0xb4, 0x05, 0x08, 0x75, 0x08, 0x7a, 0x12, 0x08, 0x33, 0x80, 0x62, 0xb4, 0x03, 0x19, 0x75, 0x08,
+ 0x7b, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x01, 0x55, 0x7e, 0xb3, 0x3f, 0xf2, 0x44,
+ 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x46, 0xb4, 0x01, 0x19, 0x75, 0x08, 0x7c, 0x12, 0x08, 0x33,
+ 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x01, 0x39, 0x7e, 0xb3, 0x3f, 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f,
+ 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a, 0x7e, 0xb3, 0x01, 0x25, 0x60, 0x24, 0x7c, 0x0b, 0x7e, 0x13,
+ 0x01, 0x26, 0x7e, 0x17, 0x01, 0x27, 0x75, 0x08, 0x73, 0x12, 0x08, 0x33, 0x7a, 0x01, 0x08, 0x12,
+ 0x08, 0x33, 0x7a, 0x11, 0x08, 0x12, 0x08, 0x33, 0x12, 0x07, 0x8b, 0x40, 0x03, 0x02, 0x02, 0x90,
+ 0x02, 0x07, 0x55, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x0b, 0xf6, 0x75, 0x08, 0x7d, 0x12, 0x08, 0x33,
+ 0x7e, 0xb3, 0x01, 0x26, 0x7e, 0xa3, 0x01, 0x28, 0x4c, 0xab, 0x78, 0xe4, 0x80, 0xdf, 0x7e, 0xb3,
+ 0x01, 0x24, 0xb4, 0x0a, 0xdb, 0x75, 0x08, 0x7e, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x26, 0x70,
+ 0xcf, 0xf5, 0xf3, 0x75, 0xf6, 0x01, 0x22, 0x02, 0x07, 0x55, 0x02, 0x07, 0x55, 0x02, 0x07, 0x55,
+ 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x04, 0x20, 0x75, 0x08, 0xc3, 0x12, 0x08, 0x33, 0x7e, 0x04, 0x00,
+ 0x01, 0x7e, 0x17, 0x01, 0x25, 0x7e, 0x18, 0x01, 0x34, 0x7a, 0x1c, 0x00, 0x00, 0x7e, 0x47, 0x01,
+ 0x29, 0x12, 0x08, 0x3f, 0x02, 0x06, 0xf4, 0xb4, 0x06, 0x3a, 0x75, 0x08, 0xc1, 0x12, 0x08, 0x33,
+ 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7d, 0xca, 0x7e, 0xd7, 0x01, 0x25, 0x7e, 0x78,
+ 0x01, 0x34, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x01, 0x29, 0x75, 0x08, 0xc1, 0x12, 0x08, 0x33,
+ 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x08, 0xd6, 0xd0, 0x87, 0xd0, 0xa8,
+ 0x40, 0x4f, 0x80, 0x4a, 0xb4, 0x00, 0x1c, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x02, 0x90, 0xe4,
+ 0x8d, 0xef, 0x8d, 0xef, 0x8d, 0xef, 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, 0xca, 0x02, 0xff, 0xca, 0x06,
+ 0x00, 0x00, 0x32, 0xb4, 0x09, 0x12, 0x7e, 0x57, 0x01, 0x25, 0x4d, 0x55, 0x68, 0x05, 0xa9, 0xd2,
+ 0xb1, 0x80, 0x03, 0xa9, 0xc2, 0xb1, 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x01,
+ 0x27, 0x7e, 0x17, 0x01, 0x25, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x02,
+ 0x90, 0x02, 0x07, 0x55, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x03, 0x15, 0x75, 0x08, 0xc2, 0x12, 0x08,
+ 0x33, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x01, 0x25, 0x7e, 0x57, 0x01, 0x29, 0x02, 0x02, 0x94,
+ 0xb4, 0x05, 0x39, 0x75, 0x08, 0xc0, 0x12, 0x08, 0x33, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9,
+ 0xd5, 0x87, 0x7e, 0x08, 0x01, 0x34, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37,
+ 0x01, 0x25, 0x7e, 0x47, 0x01, 0x29, 0x12, 0x08, 0x3f, 0xd0, 0x87, 0xd0, 0xa8, 0x7e, 0x08, 0x01,
+ 0x34, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x01, 0x29, 0x02, 0x02, 0x94, 0x02, 0x07, 0x55, 0x75,
+ 0x08, 0x07, 0x12, 0x08, 0x33, 0x43, 0xe1, 0xc0, 0x22, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9,
+ 0xd5, 0x87, 0x12, 0x07, 0xca, 0x40, 0x19, 0x7e, 0x08, 0x01, 0x34, 0x7a, 0x0c, 0x00, 0x00, 0xca,
+ 0x0b, 0xca, 0x49, 0x12, 0x08, 0x3f, 0xda, 0x59, 0xda, 0x0b, 0xd0, 0x87, 0xd0, 0xa8, 0xc3, 0x22,
+ 0xd0, 0x87, 0xd0, 0xa8, 0x22, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x07,
+ 0xca, 0x40, 0x2b, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7f, 0x61, 0x7e, 0x78, 0x01,
+ 0x34, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x01, 0x29, 0xbd, 0x74, 0x78, 0x11, 0x75, 0x08, 0xc1,
+ 0x12, 0x08, 0x33, 0x12, 0x08, 0xd6, 0x40, 0x06, 0xd0, 0x87, 0xd0, 0xa8, 0xc3, 0x22, 0xd0, 0x87,
+ 0xd0, 0xa8, 0xd3, 0x22, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5,
+ 0xf0, 0x7d, 0x62, 0x7d, 0x75, 0x7d, 0x87, 0x7e, 0x34, 0x7f, 0x03, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b,
+ 0x50, 0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50, 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00,
+ 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc, 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a,
+ 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b, 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38,
+ 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b, 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe,
+ 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00, 0xff, 0xc3, 0x22, 0xd3, 0x22,
+
+// Segment #16, EXCLUDED Start Address 00ff7c00, Length 199
+
+
+// Segment #17, EXCLUDED Start Address 00ff7f00, Length 192
+
+
+// Segment #17, Start Address 00ff7fc0, Length 64
+0xff,0x00,0xc0,0x7f,0x40,0x00,
+ 0x40, 0x01, 0x02, 0x00, 0xca, 0x1b, 0x01, 0x0c, 0x02, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+// Segment #18, Start Address 00ff0833, Length 5015
+0xff,0x00,0x33,0x08,0x97,0x13,
+ 0xca, 0x08, 0x7e, 0x01, 0x08, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x80, 0x50, 0x0b, 0x1a,
+ 0x60, 0x0b, 0x35, 0x0b, 0x1a, 0x70, 0x0b, 0x35, 0x0b, 0x1a, 0x80, 0x0b, 0x35, 0x0b, 0x1a, 0x90,
+ 0x0b, 0x35, 0x0b, 0x1a, 0xa0, 0x0b, 0x35, 0x0b, 0x1a, 0xb0, 0x0b, 0x35, 0x0b, 0x1a, 0xc0, 0x0b,
+ 0x35, 0x0b, 0x1a, 0xd0, 0x0b, 0x35, 0x1b, 0x0a, 0x60, 0x0b, 0x15, 0x1b, 0x0a, 0x70, 0x0b, 0x15,
+ 0x1b, 0x0a, 0x80, 0x0b, 0x15, 0x1b, 0x0a, 0x90, 0x0b, 0x15, 0x1b, 0x0a, 0xa0, 0x0b, 0x15, 0x1b,
+ 0x0a, 0xb0, 0x0b, 0x15, 0x1b, 0x0a, 0xc0, 0x0b, 0x15, 0x1b, 0x0a, 0xd0, 0x0b, 0x15, 0x9e, 0x44,
+ 0x00, 0x10, 0x50, 0xaa, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x0e, 0x7e, 0x1b, 0xc0, 0x7a, 0x0b, 0xc0,
+ 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b, 0xfc, 0x7c,
+ 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e, 0x44, 0x00,
+ 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78, 0xfa, 0x7f,
+ 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00, 0x40, 0x9d,
+ 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x09, 0x00, 0xda, 0x79,
+ 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x43, 0x90, 0x30,
+ 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb5, 0x2a, 0xaa, 0x74, 0xa0, 0x39, 0xb5,
+ 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d, 0x70, 0x50, 0x06, 0x2d, 0x70, 0x7d, 0x07, 0x6d, 0x77,
+ 0x7c, 0x31, 0x7e, 0x7b, 0x00, 0x7a, 0x6b, 0x00, 0x0b, 0x7c, 0x0b, 0x6c, 0xa5, 0xd9, 0xf3, 0x7f,
+ 0x16, 0x1b, 0x1c, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x1b, 0x10, 0xbc, 0x10, 0x68, 0x06, 0x1b, 0x54,
+ 0x78, 0xf5, 0x80, 0x2c, 0x6d, 0x00, 0x7c, 0x20, 0x7f, 0x16, 0x9f, 0x10, 0x7f, 0x27, 0x9f, 0x20,
+ 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc, 0x01, 0x78, 0x16, 0x0b, 0x2c, 0x0b, 0x1c, 0xa5, 0xdb,
+ 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x03, 0x63, 0x90, 0x30, 0x4d, 0x77, 0x78, 0x93, 0xc2, 0xd7, 0x22,
+ 0xd2, 0xd7, 0x22, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00, 0x02, 0x01,
+ 0x04, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x04, 0x00, 0x08, 0x10, 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e, 0x18, 0x7f,
+ 0xbd, 0x7a, 0x1c, 0x00, 0xff, 0x0b, 0x1a, 0x00, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a, 0x51, 0x23,
+ 0x7e, 0x18, 0x09, 0x76, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, 0x08, 0xa5,
+ 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 0x7e, 0xe8, 0x7f, 0xbf, 0x7a, 0xec, 0x00,
+ 0xff, 0xe0, 0xf5, 0x22, 0x54, 0xc0, 0x68, 0x16, 0x7e, 0xe8, 0x7f, 0xbe, 0x7a, 0xec, 0x00, 0xff,
+ 0xe0, 0x60, 0x0c, 0x12, 0x09, 0xa0, 0xf5, 0x09, 0x7a, 0xa1, 0x20, 0x02, 0x0f, 0x0a, 0x22, 0xc2,
+ 0x95, 0xd2, 0x94, 0x12, 0x19, 0xfb, 0x53, 0x90, 0xcf, 0x12, 0x19, 0xfb, 0x80, 0xf1, 0x0d, 0x0a,
+ 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0d,
+ 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
+ 0x45, 0x64, 0x67, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x34, 0x20, 0x2d, 0x20, 0x48, 0x61, 0x72,
+ 0x64, 0x77, 0x61, 0x72, 0x65, 0x20, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63,
+ 0x73, 0x2c, 0x20, 0x52, 0x65, 0x76, 0x20, 0x31, 0x2e, 0x30, 0x30, 0x3b, 0x20, 0x43, 0x6f, 0x70,
+ 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x31, 0x39, 0x39, 0x38, 0x20, 0x49, 0x6e, 0x73, 0x69,
+ 0x64, 0x65, 0x20, 0x4f, 0x75, 0x74, 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x0d,
+ 0x0a, 0x00, 0x50, 0x61, 0x73, 0x73, 0x00, 0x46, 0x41, 0x49, 0x4c, 0x20, 0x21, 0x21, 0x00, 0x50,
+ 0x61, 0x73, 0x73, 0x20, 0x20, 0x20, 0x20, 0x00, 0x46, 0x41, 0x49, 0x4c, 0x20, 0x21, 0x21, 0x20,
+ 0x00, 0x0d, 0x0a, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x20, 0x52, 0x61, 0x6d, 0x3a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x61, 0x6d, 0x20, 0x54, 0x65, 0x73, 0x74, 0x3a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x62,
+ 0x69, 0x74, 0x20, 0x30, 0x2d, 0x31, 0x34, 0x20, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x57, 0x72, 0x6f, 0x74, 0x65, 0x20, 0x41,
+ 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x20, 0x30, 0x30, 0x3a, 0x00, 0x20, 0x20, 0x77, 0x69,
+ 0x74, 0x68, 0x20, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x20, 0x00, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20,
+ 0x72, 0x65, 0x61, 0x64, 0x3a, 0x20, 0x00, 0x0d, 0x0a, 0x4f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20,
+ 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c,
+ 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x62, 0x69,
+ 0x74, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x68,
+ 0x6f, 0x72, 0x74, 0x65, 0x64, 0x0d, 0x0a, 0x74, 0x6f, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68,
+ 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x00, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x00, 0x0d, 0x0a, 0x44, 0x65,
+ 0x74, 0x65, 0x63, 0x74, 0x20, 0x55, 0x61, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a,
+ 0x53, 0x63, 0x72, 0x61, 0x74, 0x63, 0x68, 0x20, 0x50, 0x61, 0x64, 0x2c, 0x46, 0x69, 0x46, 0x6f,
+ 0x20, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x26, 0x20, 0x52, 0x53, 0x54, 0x3a, 0x20, 0x00,
+ 0x0d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x55, 0x61, 0x72, 0x74, 0x20, 0x54, 0x65, 0x73, 0x74, 0x73,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x31, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74,
+ 0x32, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x33, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74,
+ 0x34, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
+ 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
+ 0x2d, 0x00, 0x0d, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x20, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x72,
+ 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x20,
+ 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x41, 0x6e, 0x61, 0x6c,
+ 0x6f, 0x67, 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a,
+ 0x52, 0x58, 0x44, 0x2c, 0x54, 0x58, 0x44, 0x20, 0x74, 0x6f, 0x20, 0x52, 0x54, 0x53, 0x2c, 0x43,
+ 0x54, 0x53, 0x2c, 0x52, 0x49, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x58, 0x44, 0x2c, 0x54, 0x58, 0x44, 0x20, 0x74, 0x6f, 0x20, 0x44,
+ 0x54, 0x52, 0x2c, 0x44, 0x53, 0x52, 0x2c, 0x43, 0x44, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x5b, 0x43, 0x54, 0x53, 0x2c,
+ 0x52, 0x49, 0x5d, 0x20, 0x74, 0x6f, 0x20, 0x44, 0x54, 0x52, 0x2c, 0x44, 0x53, 0x52, 0x2c, 0x43,
+ 0x44, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x5b,
+ 0x43, 0x54, 0x53, 0x2c, 0x43, 0x44, 0x5d, 0x20, 0x74, 0x6f, 0x20, 0x44, 0x53, 0x52, 0x2c, 0x52,
+ 0x49, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a,
+ 0x44, 0x54, 0x52, 0x5b, 0x44, 0x53, 0x52, 0x2c, 0x43, 0x44, 0x5d, 0x20, 0x74, 0x6f, 0x20, 0x52,
+ 0x54, 0x53, 0x2c, 0x43, 0x54, 0x53, 0x2c, 0x52, 0x49, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a,
+ 0x20, 0x00, 0x0d, 0x0a, 0x44, 0x54, 0x52, 0x20, 0x74, 0x6f, 0x20, 0x43, 0x54, 0x53, 0x2c, 0x43,
+ 0x44, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x20, 0x74, 0x6f, 0x20, 0x43,
+ 0x54, 0x53, 0x2c, 0x52, 0x49, 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x20,
+ 0x74, 0x6f, 0x20, 0x43, 0x54, 0x53, 0x2c, 0x43, 0x44, 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61,
+ 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a,
+ 0x44, 0x54, 0x52, 0x20, 0x74, 0x6f, 0x20, 0x44, 0x53, 0x52, 0x2c, 0x43, 0x44, 0x20, 0x4c, 0x6f,
+ 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x00, 0x0d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x45, 0x20, 0x52, 0x20, 0x52, 0x20, 0x4f, 0x20,
+ 0x52, 0x20, 0x21, 0x21, 0x21, 0x2c, 0x20, 0x45, 0x20, 0x52, 0x20, 0x52, 0x20, 0x4f, 0x20, 0x52,
+ 0x20, 0x21, 0x21, 0x21, 0x20, 0x2c, 0x20, 0x45, 0x20, 0x52, 0x20, 0x52, 0x20, 0x4f, 0x20, 0x52,
+ 0x20, 0x21, 0x21, 0x21, 0x0d, 0x0a, 0x0a, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
+ 0x63, 0x73, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x65, 0x6e, 0x74, 0x65,
+ 0x72, 0x20, 0x61, 0x20, 0x64, 0x65, 0x62, 0x75, 0x67, 0x20, 0x6c, 0x6f, 0x6f, 0x70, 0x20, 0x6f,
+ 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x64, 0x65, 0x74, 0x65,
+ 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x00, 0x0d, 0x0a, 0x0a, 0x4e,
+ 0x6f, 0x20, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72,
+ 0x73, 0x20, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2e, 0x0d, 0x0a, 0x00, 0x43, 0x6f,
+ 0x70, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20,
+ 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x53, 0x6c, 0x61, 0x76, 0x65, 0x27,
+ 0x73, 0x20, 0x45, 0x45, 0x70, 0x72, 0x6f, 0x6d, 0x20, 0x2e, 0x2e, 0x2e, 0x00, 0x44, 0x6f, 0x6e,
+ 0x65, 0x0d, 0x0a, 0x0a, 0x2d, 0x3e, 0x20, 0x54, 0x75, 0x72, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x74,
+ 0x20, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x20, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x73,
+ 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x20, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f,
+ 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x00, 0xc2, 0xaf, 0xc2, 0x09, 0xc2, 0x0a, 0x75, 0x90, 0x0d,
+ 0x20, 0x17, 0x02, 0xd2, 0xb5, 0x43, 0x90, 0x30, 0x6c, 0x00, 0x7e, 0x10, 0x03, 0x12, 0x0f, 0x38,
+ 0x7e, 0x68, 0x0a, 0x01, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0b, 0x00, 0x30, 0xb4, 0x02,
+ 0x80, 0x24, 0x02, 0x1b, 0x3c, 0x20, 0x09, 0x1d, 0xc2, 0x94, 0xd2, 0x95, 0x12, 0x19, 0xfb, 0x53,
+ 0x90, 0xcf, 0x12, 0x19, 0xfb, 0xc2, 0x95, 0xd2, 0x94, 0x12, 0x19, 0xfb, 0xa5, 0xd9, 0xe6, 0x43,
+ 0x90, 0x30, 0x12, 0x19, 0xfb, 0x22, 0x7e, 0x68, 0x0a, 0x94, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a,
+ 0x93, 0x7e, 0xe4, 0x10, 0x00, 0x7e, 0x40, 0x55, 0x7a, 0xe9, 0x40, 0x0b, 0xe4, 0x7e, 0x50, 0xaa,
+ 0x7a, 0xe9, 0x50, 0x1b, 0xe4, 0xbe, 0xe9, 0x40, 0x68, 0x19, 0x7e, 0x68, 0x0a, 0x7a, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x13, 0x7a, 0xe9, 0x40, 0x7e, 0xe9,
+ 0x10, 0x80, 0xf8, 0x7e, 0x68, 0x0a, 0x75, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0b, 0x00,
+ 0x7e, 0x68, 0x0a, 0xd8, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x78, 0x00, 0x00, 0x7e,
+ 0x70, 0x0e, 0x7e, 0xa4, 0xff, 0xff, 0x7e, 0xb4, 0xbf, 0xff, 0x7d, 0xcb, 0x0e, 0xc4, 0x7d, 0xdc,
+ 0x5d, 0xdb, 0x6c, 0xbb, 0x7d, 0xfa, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d,
+ 0xfb, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff,
+ 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x6c, 0xbb,
+ 0x7d, 0xfa, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x41, 0x0b, 0xb0, 0x7d, 0xfb, 0x5e,
+ 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x34, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff,
+ 0xbe, 0x7b, 0xb0, 0x78, 0x27, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0,
+ 0x78, 0x1a, 0x0b, 0xb0, 0xbe, 0xc4, 0xff, 0xfe, 0x78, 0x92, 0x0e, 0xb4, 0xa5, 0xdf, 0x8b, 0x7e,
+ 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x77, 0xca, 0x5b, 0xca, 0x6b,
+ 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x68, 0x0b, 0x2a, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0a, 0x47, 0x12, 0x1a, 0xc9, 0x7e, 0x68, 0x0b, 0x79, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x6c, 0x77, 0xda, 0x6b, 0xca, 0x6b, 0x0b, 0x70, 0x0e, 0xc4,
+ 0xbe, 0xc4, 0xff, 0xff, 0x78, 0xf6, 0x1b, 0x70, 0x0a, 0x47, 0x12, 0x1a, 0xc9, 0x12, 0x1a, 0x08,
+ 0x30, 0x09, 0x30, 0xda, 0x6b, 0xda, 0x5b, 0x6c, 0xbb, 0x7e, 0x78, 0x00, 0x00, 0x7d, 0xfa, 0x5e,
+ 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfb, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d,
+ 0xfc, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b,
+ 0xb0, 0x80, 0xd4, 0x7e, 0x68, 0x0a, 0xb6, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x30, 0x17,
+ 0x0e, 0x7e, 0x78, 0x04, 0x20, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x44, 0x7b, 0xe0, 0x80, 0x0c, 0x7e,
+ 0x78, 0x00, 0x00, 0x7a, 0x7c, 0x00, 0x01, 0x7e, 0x44, 0x80, 0x00, 0x0b, 0x00, 0x7e, 0x40, 0x3a,
+ 0x7c, 0x54, 0x7f, 0x57, 0x7d, 0x84, 0x6c, 0x66, 0x7a, 0x5b, 0x50, 0x0b, 0x5c, 0x0b, 0x50, 0xa5,
+ 0xde, 0x02, 0x0b, 0x50, 0x1b, 0x84, 0x78, 0xf0, 0x7c, 0x54, 0x7f, 0x57, 0x7d, 0x84, 0x6c, 0x66,
+ 0xbe, 0x5b, 0x50, 0x78, 0x1a, 0x0b, 0x5c, 0x0b, 0x50, 0xa5, 0xde, 0x02, 0x0b, 0x50, 0x1b, 0x84,
+ 0x78, 0xee, 0x7e, 0x68, 0x0a, 0x75, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x4b, 0x7f,
+ 0x45, 0x7e, 0x68, 0x0a, 0x7a, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x68, 0x0a, 0xfa,
+ 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7d, 0x4b, 0x12, 0x1a, 0xc9, 0x7e, 0x68, 0x0b, 0x0f,
+ 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x6c, 0x88, 0x7c, 0x95, 0x12, 0x1a, 0xc9, 0x7e, 0x68,
+ 0x0b, 0x1d, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x4b, 0x90, 0x12, 0x1a, 0xc9, 0x12,
+ 0x1a, 0x08, 0x30, 0x09, 0x05, 0x7e, 0x4b, 0x90, 0x80, 0xfb, 0x7e, 0x68, 0x0b, 0x7f, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0b, 0x00, 0xd2, 0x92, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00,
+ 0x08, 0xbe, 0xb0, 0x01, 0x78, 0x0b, 0x09, 0xb2, 0x00, 0x14, 0xbe, 0xb0, 0x60, 0x78, 0x02, 0x80,
+ 0x17, 0x7e, 0x68, 0x0a, 0x7a, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30,
+ 0x09, 0x11, 0x09, 0xb2, 0x00, 0x08, 0x80, 0xfa, 0x7e, 0x68, 0x0a, 0x75, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x1a, 0x93, 0x7e, 0x68, 0x0b, 0xa1, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0b, 0x00,
+ 0xc2, 0x92, 0x12, 0x19, 0xee, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x1c,
+ 0x7e, 0xb0, 0x01, 0x19, 0xb2, 0x00, 0x08, 0x09, 0xb2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x37, 0x09,
+ 0xb2, 0x00, 0x08, 0x5e, 0xb0, 0xc0, 0xbe, 0xb0, 0xc0, 0x78, 0x2b, 0x7e, 0xa0, 0xaa, 0x19, 0xa2,
+ 0x00, 0x1c, 0x6c, 0xbb, 0x19, 0xb2, 0x00, 0x08, 0x09, 0xb2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x16,
+ 0x09, 0xb2, 0x00, 0x08, 0x5e, 0xb0, 0xc0, 0x78, 0x0d, 0x7e, 0x68, 0x0a, 0x75, 0x7a, 0x6c, 0x00,
+ 0xff, 0x12, 0x1a, 0x93, 0x80, 0x1b, 0x7e, 0x68, 0x0a, 0x7a, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a,
+ 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x0a, 0x19, 0xa2, 0x00, 0x1c, 0x09, 0xb2, 0x00, 0x1c, 0x80,
+ 0xf6, 0x7e, 0x68, 0x0b, 0xc3, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x68, 0x0c, 0x45,
+ 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x7e, 0xb0,
+ 0x01, 0x19, 0xb2, 0x00, 0x1c, 0x2e, 0x24, 0x01, 0x00, 0x0b, 0xb0, 0xa5, 0xd9, 0xf3, 0x7e, 0x24,
+ 0x80, 0x00, 0x7e, 0x11, 0x09, 0x7e, 0xb0, 0x01, 0x0b, 0x00, 0x09, 0xa2, 0x00, 0x1c, 0xbc, 0xab,
+ 0x78, 0x16, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01,
+ 0x00, 0x0b, 0xb0, 0xa5, 0xd9, 0xe2, 0x80, 0x25, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0xe4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09,
+ 0x09, 0xa2, 0x00, 0x1c, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf5, 0x80, 0xec, 0x7e, 0x68, 0x0c,
+ 0x69, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x13, 0x8a, 0x7e, 0x24, 0x80, 0x00, 0x7e,
+ 0x11, 0x09, 0x0b, 0x00, 0x74, 0x10, 0x19, 0xb2, 0x00, 0x10, 0x12, 0x13, 0x03, 0x2e, 0x24, 0x01,
+ 0x00, 0xa5, 0xd9, 0xee, 0x7e, 0x68, 0x0c, 0x8d, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e,
+ 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0xe4, 0x19, 0xb2, 0x00, 0x10, 0x12, 0x13, 0x03,
+ 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xef, 0x30, 0x00, 0x03, 0x02, 0x18, 0xb7, 0x02, 0x13, 0xbb,
+ 0x74, 0x07, 0x19, 0xb2, 0x00, 0x08, 0x12, 0x19, 0xfb, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00,
+ 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00,
+ 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xc2, 0x0b, 0x7e, 0xb0, 0x55, 0x12, 0x13,
+ 0x64, 0x7e, 0xb0, 0xaa, 0x12, 0x13, 0x64, 0x7e, 0xb0, 0x00, 0x12, 0x13, 0x64, 0x7e, 0xb0, 0xff,
+ 0x12, 0x13, 0x64, 0x30, 0x0b, 0x0f, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a,
+ 0x93, 0x12, 0x1a, 0x08, 0x22, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93,
+ 0x22, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x09, 0xa2, 0x00, 0x00, 0xbc, 0xab, 0x78, 0x01,
+ 0x22, 0x20, 0x09, 0x03, 0xd2, 0x0b, 0x22, 0x12, 0x1a, 0x08, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19,
+ 0xee, 0x09, 0xa2, 0x00, 0x00, 0x80, 0xf3, 0xd2, 0x92, 0x12, 0x19, 0xee, 0xc2, 0x92, 0x12, 0x19,
+ 0xee, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x74, 0x80, 0x19, 0xb2, 0x00, 0x0c, 0x7e, 0x54,
+ 0x00, 0x02, 0x19, 0xa2, 0x00, 0x04, 0x19, 0xb2, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb2, 0x00, 0x0c,
+ 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xe1, 0x22, 0x7e, 0x68, 0x0c, 0xb1, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x12, 0x19, 0xee, 0x09,
+ 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00,
+ 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x0d, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a,
+ 0x93, 0x80, 0x1a, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a,
+ 0x08, 0x30, 0x09, 0x09, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x80, 0xf7, 0x2e, 0x24, 0x01,
+ 0x00, 0xa5, 0xd9, 0xb6, 0x7e, 0x68, 0x0c, 0xd5, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e,
+ 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e,
+ 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a,
+ 0x78, 0x0d, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x1a, 0x7e,
+ 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x09,
+ 0x19, 0xa2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x80, 0xf7, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xb6,
+ 0x30, 0x04, 0x03, 0x02, 0x16, 0x8c, 0x7e, 0x68, 0x0c, 0xf9, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a,
+ 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10,
+ 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa,
+ 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a, 0x78, 0x3c,
+ 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0,
+ 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09,
+ 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a, 0x78, 0x14, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x0a, 0x8b,
+ 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0xe6, 0x7e, 0xa0, 0x02,
+ 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x0d, 0x41,
+ 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00,
+ 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x01,
+ 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00,
+ 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x3c, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee,
+ 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x02, 0x19, 0xa2,
+ 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x14, 0x7e, 0x68,
+ 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e,
+ 0x80, 0x20, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08,
+ 0x30, 0x09, 0xe6, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10,
+ 0x80, 0xf1, 0x7e, 0x68, 0x0d, 0x89, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80,
+ 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee,
+ 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x50, 0xbe, 0xb0, 0x50, 0x78, 0x1f, 0x6c, 0xaa, 0x19, 0xa2,
+ 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x50, 0x78, 0x0d, 0x7e, 0x68,
+ 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x20, 0x7e, 0x68, 0x0a, 0x8b, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x0f, 0x7e, 0xa0, 0x02, 0x19,
+ 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, 0x01, 0x00, 0xa5,
+ 0xd9, 0xa2, 0x7e, 0x68, 0x0d, 0xd1, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80,
+ 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00,
+ 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0xa0, 0xbe, 0xb0, 0xa0, 0x78, 0x1f,
+ 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0xa0,
+ 0x78, 0x0d, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x20, 0x7e,
+ 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x0f,
+ 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e,
+ 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x02, 0x18, 0x2b, 0x7e, 0x68, 0x0d, 0x1d, 0x7a, 0x6c, 0x00,
+ 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x6c, 0xaa, 0x19,
+ 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00,
+ 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0,
+ 0x06, 0x78, 0x3c, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00,
+ 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12,
+ 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x06, 0x78, 0x14, 0x7e, 0x68, 0x0a, 0x82, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e,
+ 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0xe6,
+ 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e,
+ 0x68, 0x0d, 0x65, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11,
+ 0x09, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18,
+ 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee,
+ 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x09, 0x78, 0x3c, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10,
+ 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0,
+ 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x09, 0x78,
+ 0x14, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01, 0x00,
+ 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93,
+ 0x12, 0x1a, 0x08, 0x30, 0x09, 0xe6, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19,
+ 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x0d, 0xad, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93,
+ 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10,
+ 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x90, 0xbe, 0xb0, 0x90, 0x78, 0x1f, 0x6c,
+ 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x90, 0x78,
+ 0x0d, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x20, 0x7e, 0x68,
+ 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x0f, 0x7e,
+ 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24,
+ 0x01, 0x00, 0xa5, 0xd9, 0xa2, 0x02, 0x18, 0xb7, 0x30, 0x17, 0x03, 0x02, 0x19, 0x3b, 0xc2, 0x8a,
+ 0x12, 0x19, 0x22, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x04,
+ 0x12, 0x19, 0xee, 0x0b, 0x00, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x20,
+ 0x8b, 0x3e, 0x20, 0x89, 0x3b, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x04, 0x09, 0xa2, 0x00, 0x10,
+ 0x4e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x30, 0x8b, 0x23, 0x30, 0x89, 0x20,
+ 0x09, 0xa2, 0x00, 0x10, 0x5e, 0xa0, 0xfd, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x7e, 0xa0,
+ 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x19, 0xee, 0x20, 0x8b, 0x05, 0x20, 0x89, 0x02, 0x80, 0x1a,
+ 0x12, 0x1a, 0x08, 0x30, 0x09, 0x14, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x00, 0x00, 0x5e,
+ 0xa0, 0xfd, 0x19, 0xa2, 0x00, 0x10, 0x00, 0x00, 0x80, 0xec, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9,
+ 0x89, 0x02, 0x19, 0x3b, 0x20, 0x17, 0xfa, 0x12, 0x13, 0x8a, 0x12, 0x19, 0x22, 0x7e, 0x24, 0x80,
+ 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x20, 0x89, 0x26, 0x7e, 0xa0, 0xff, 0x19, 0xa2, 0x00, 0x04,
+ 0x12, 0x19, 0xee, 0x7e, 0xb0, 0x55, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x30, 0x89, 0x0f,
+ 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x19, 0xee, 0x20, 0x89, 0x02, 0x80, 0x26, 0x12,
+ 0x1a, 0x08, 0x30, 0x09, 0x20, 0x7e, 0xa0, 0xff, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x19, 0xee, 0x7e,
+ 0xb0, 0x55, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04,
+ 0x12, 0x19, 0xee, 0x80, 0xe0, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xa8, 0x02, 0x19, 0x3b, 0x7e,
+ 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee,
+ 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xef, 0x22, 0x30, 0x0a, 0x19, 0x7e, 0x68, 0x0d, 0xf5, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0xd2, 0x09, 0x12, 0x19, 0xee, 0x12, 0x19, 0xee, 0x12, 0x19,
+ 0xee, 0x02, 0x0f, 0x10, 0x30, 0x17, 0x1c, 0x7e, 0x68, 0x0e, 0x6f, 0x7a, 0x6c, 0x00, 0xff, 0x12,
+ 0x1a, 0x93, 0x7e, 0x68, 0x0e, 0x91, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1b, 0x3c,
+ 0x02, 0x19, 0xe6, 0x0b, 0x00, 0x7e, 0x78, 0x19, 0xa0, 0x7a, 0x7c, 0x00, 0xff, 0x7f, 0x67, 0x7a,
+ 0x6c, 0x00, 0x00, 0x7e, 0x70, 0x3e, 0x7e, 0x7b, 0xb0, 0x7a, 0x6b, 0xb0, 0x0b, 0x7c, 0x0b, 0x6c,
+ 0xa5, 0xdf, 0xf3, 0x7e, 0x78, 0x19, 0xa0, 0x7a, 0x7c, 0x00, 0x00, 0x89, 0x78, 0x7e, 0x78, 0x00,
+ 0x00, 0x7a, 0x7c, 0x00, 0xfe, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00, 0xfe, 0x74, 0xaa, 0x39,
+ 0xb7, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb7, 0x2a, 0xaa, 0x74, 0xa0, 0x39, 0xb7, 0x55, 0x55, 0x6c,
+ 0x99, 0x7a, 0x6b, 0x90, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x6b, 0x80, 0xbc, 0x89, 0x68, 0x08, 0x1b,
+ 0x54, 0x78, 0xf5, 0x8a, 0xff, 0x19, 0xde, 0x8a, 0xff, 0x19, 0xe6, 0x12, 0x1a, 0x08, 0x7e, 0x6b,
+ 0x80, 0x80, 0xfb, 0x7e, 0x10, 0xff, 0x12, 0x1a, 0x85, 0x80, 0xf8, 0xca, 0xf9, 0x7e, 0xf4, 0x00,
+ 0xff, 0x1b, 0xf4, 0x78, 0xfc, 0xda, 0xf9, 0x22, 0xca, 0xf9, 0x7e, 0xf4, 0x00, 0x00, 0x1b, 0xf4,
+ 0x78, 0xfc, 0xda, 0xf9, 0x22, 0x20, 0x09, 0x19, 0xd2, 0x0a, 0x12, 0x19, 0xfb, 0xc2, 0x95, 0xd2,
+ 0x94, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x43, 0x90, 0x30,
+ 0x22, 0xca, 0x0b, 0x7e, 0x10, 0x03, 0x7c, 0x30, 0x6c, 0x22, 0x0b, 0x20, 0x9e, 0x30, 0x0a, 0x50,
+ 0xf9, 0x2e, 0x30, 0x0b, 0x1b, 0x20, 0x68, 0x18, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x53, 0x90,
+ 0xcf, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x43, 0x90, 0x30, 0xa5, 0xda, 0xe8,
+ 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x1b, 0x30, 0x68, 0x19, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb,
+ 0xc2, 0x95, 0xd2, 0x94, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x43, 0x90, 0x30,
+ 0xa5, 0xdb, 0xe7, 0x7e, 0x20, 0x0a, 0x12, 0x19, 0xfb, 0xa5, 0xda, 0xfa, 0xa5, 0xd9, 0xa7, 0xda,
+ 0x0b, 0x22, 0x20, 0x09, 0x0a, 0x12, 0x19, 0xfb, 0xb2, 0x94, 0x12, 0x19, 0xfb, 0xb2, 0x94, 0x22,
+ 0x30, 0x17, 0x32, 0x20, 0x09, 0x2f, 0xca, 0x2b, 0xca, 0x7b, 0x7e, 0x78, 0x80, 0x00, 0x7a, 0x7c,
+ 0x00, 0xfe, 0x12, 0x1b, 0x1c, 0x7e, 0x6b, 0xa0, 0x5c, 0xaa, 0x68, 0x10, 0x29, 0xb7, 0x00, 0x14,
+ 0x54, 0x60, 0x68, 0xf8, 0x39, 0xa7, 0x00, 0x00, 0x0b, 0x6c, 0x80, 0xe9, 0x12, 0x19, 0xee, 0xd2,
+ 0xb5, 0xda, 0x7b, 0xda, 0x2b, 0x22, 0x12, 0x1a, 0xd4, 0x7e, 0x68, 0x00, 0x0b, 0x12, 0x1a, 0x93,
+ 0x22, 0xca, 0x59, 0xca, 0x5b, 0x7e, 0xb4, 0x00, 0x0b, 0x7c, 0xb8, 0xc4, 0x12, 0x1b, 0x04, 0x7c,
+ 0xb8, 0x12, 0x1b, 0x04, 0x7c, 0xb9, 0xc4, 0x12, 0x1b, 0x04, 0x7c, 0xb9, 0x12, 0x1b, 0x04, 0x7e,
+ 0xb0, 0x68, 0x7a, 0xb9, 0xb0, 0x0b, 0xb4, 0x6c, 0xbb, 0x7a, 0xb9, 0xb0, 0xda, 0x59, 0xda, 0x5b,
+ 0x22, 0x5e, 0xb0, 0x0f, 0x7c, 0xab, 0x9e, 0xa0, 0x0a, 0x40, 0x05, 0x2e, 0xb0, 0x37, 0x80, 0x03,
+ 0x2e, 0xb0, 0x30, 0x7a, 0xb9, 0xb0, 0x0b, 0xb4, 0x22, 0xc2, 0xb5, 0xc2, 0x92, 0x12, 0x19, 0xee,
+ 0x74, 0x80, 0x39, 0xb7, 0x00, 0x0c, 0x7e, 0x54, 0x00, 0x06, 0x39, 0xa7, 0x00, 0x04, 0x39, 0xb7,
+ 0x00, 0x00, 0x74, 0x03, 0x39, 0xb7, 0x00, 0x0c, 0x22, 0x7e, 0x78, 0x00, 0x00, 0x7a, 0x7c, 0x00,
+ 0xff, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0x01, 0x7f, 0x65, 0x7e, 0x74, 0x20, 0x00, 0x12,
+ 0x08, 0xd6, 0x40, 0x54, 0x7e, 0x78, 0x7c, 0x00, 0x7a, 0x7c, 0x00, 0xff, 0x7e, 0x58, 0x00, 0x00,
+ 0x7a, 0x5c, 0x00, 0x01, 0x7e, 0x68, 0x7c, 0x00, 0x7a, 0x6c, 0x00, 0x01, 0x7e, 0x74, 0x04, 0x00,
+ 0x12, 0x08, 0xd6, 0x40, 0x33, 0x74, 0x80, 0x12, 0x1b, 0xb1, 0x40, 0x2c, 0x53, 0x90, 0xcf, 0xd2,
+ 0x08, 0x7e, 0x04, 0x00, 0x08, 0x7e, 0x14, 0x00, 0x00, 0x84, 0xa5, 0xdb, 0xfc, 0xa5, 0xda, 0xf9,
+ 0xa5, 0xd9, 0xf6, 0x74, 0x40, 0x12, 0x1b, 0xb1, 0x40, 0x0e, 0x7e, 0x68, 0x0e, 0xc0, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x1a, 0x93, 0x02, 0x19, 0xe6, 0xc2, 0x95, 0xd2, 0x94, 0x80, 0xfe, 0xf5, 0x0a,
+ 0x7e, 0x78, 0x00, 0x0a, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00, 0x01,
+ 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
+
+#undef IMAGE_ARRAY_NAME
+
diff --git a/drivers/usb/serial/io_fw_boot2.h b/drivers/usb/serial/io_fw_boot2.h
new file mode 100644
index 000000000000..c7c3a3c305fe
--- /dev/null
+++ b/drivers/usb/serial/io_fw_boot2.h
@@ -0,0 +1,546 @@
+//**************************************************************
+//* Edgeport/4 Binary Image
+//* Generated by HEX2C v1.06
+//* Copyright (C) 1998 Inside Out Networks, All rights reserved.
+//* 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.
+//**************************************************************
+
+
+//Image structure definition
+#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
+#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
+ struct edge_firmware_image_record {
+ __le16 ExtAddr;
+ __le16 Addr;
+ __le16 Len;
+ unsigned char Data[0];
+ } __attribute__ ((packed));
+
+ struct edge_firmware_version_info {
+ unsigned char MajorVersion;
+ unsigned char MinorVersion;
+ unsigned short BuildNumber;
+ };
+
+#endif
+
+#if !defined(IMAGE_ARRAY_NAME)
+#define IMAGE_ARRAY_NAME FirmwareImage
+#define IMAGE_VERSION_NAME FirmwareImageVersion
+#endif
+
+static unsigned char IMAGE_ARRAY_NAME[] = {
+
+// Segment #1, Start Address 00ff0000, Length 6
+0xff,0x00,0x00,0x00,0x06,0x00,
+ 0x02, 0x00, 0x80, 0x02, 0x00, 0x03,
+
+// Segment #2, Start Address 00ff000b, Length 3
+0xff,0x00,0x0b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x0b,
+
+// Segment #3, Start Address 00ff0013, Length 3
+0xff,0x00,0x13,0x00,0x03,0x00,
+ 0x02, 0x02, 0x56,
+
+// Segment #4, Start Address 00ff001b, Length 3
+0xff,0x00,0x1b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x1b,
+
+// Segment #5, Start Address 00ff0023, Length 3
+0xff,0x00,0x23,0x00,0x03,0x00,
+ 0x02, 0x00, 0x23,
+
+// Segment #6, Start Address 00ff002b, Length 3
+0xff,0x00,0x2b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x2b,
+
+// Segment #7, Start Address 00ff0033, Length 3
+0xff,0x00,0x33,0x00,0x03,0x00,
+ 0x02, 0x00, 0x33,
+
+// Segment #8, Start Address 00ff003b, Length 3
+0xff,0x00,0x3b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x3b,
+
+// Segment #9, Start Address 00ff0043, Length 3
+0xff,0x00,0x43,0x00,0x03,0x00,
+ 0x02, 0x00, 0x43,
+
+// Segment #10, Start Address 00ff004b, Length 3
+0xff,0x00,0x4b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x4b,
+
+// Segment #11, Start Address 00ff0053, Length 3
+0xff,0x00,0x53,0x00,0x03,0x00,
+ 0x02, 0x01, 0xf5,
+
+// Segment #12, Start Address 00ff007b, Length 3
+0xff,0x00,0x7b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x7b,
+
+// Segment #13, Start Address 00ff0080, Length 534
+0xff,0x00,0x80,0x00,0x16,0x02,
+ 0x7e, 0xb3, 0x91, 0x01, 0x20, 0xe3, 0x0c, 0x7e, 0xb3, 0x3f, 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f,
+ 0xf2, 0x80, 0x0a, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x74, 0x00, 0x7a,
+ 0xb3, 0x91, 0x00, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x7e, 0xf8, 0x00, 0x24, 0x7e, 0x00, 0x01,
+ 0x7e, 0x10, 0x00, 0x12, 0x09, 0xd0, 0x69, 0x20, 0x00, 0x0a, 0x5e, 0x40, 0x1f, 0xbe, 0x24, 0x00,
+ 0x00, 0x78, 0x09, 0x7e, 0x00, 0x03, 0x7a, 0x03, 0x90, 0x00, 0x80, 0x07, 0x7e, 0x00, 0x02, 0x7a,
+ 0x03, 0x90, 0x00, 0x75, 0xb0, 0xdf, 0x7e, 0x00, 0x01, 0x7a, 0x03, 0x94, 0x00, 0x7a, 0x03, 0x01,
+ 0x24, 0x7e, 0x00, 0x01, 0x7a, 0x03, 0x93, 0x00, 0x7e, 0x00, 0x00, 0xa5, 0xd8, 0xfd, 0x75, 0xa8,
+ 0x00, 0x75, 0xb1, 0x00, 0xca, 0x29, 0x12, 0x0c, 0x66, 0x12, 0x0c, 0x37, 0xf5, 0x21, 0x7a, 0xa1,
+ 0x20, 0x20, 0x09, 0x08, 0x20, 0x0a, 0x0a, 0x7e, 0xb0, 0x0c, 0x80, 0x08, 0x7e, 0xb0, 0x00, 0x80,
+ 0x03, 0x7e, 0xb0, 0x08, 0x7a, 0xb3, 0x92, 0x00, 0x12, 0x02, 0x96, 0xda, 0x29, 0x74, 0x10, 0x7a,
+ 0xb3, 0x91, 0x01, 0x7e, 0x20, 0x04, 0x7c, 0xb2, 0xc2, 0xd7, 0x13, 0x13, 0x13, 0x13, 0x7a, 0xb3,
+ 0x91, 0x00, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x10, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x74, 0x02,
+ 0x7a, 0xb3, 0x91, 0x12, 0xa5, 0xda, 0xdf, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a,
+ 0xb3, 0x91, 0x1c, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x07, 0x74,
+ 0x34, 0x7a, 0xb3, 0x91, 0x13, 0x74, 0x3f, 0x7a, 0xb3, 0x91, 0x14, 0x74, 0x02, 0x7a, 0xb3, 0x91,
+ 0x06, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x07, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x44, 0x7a,
+ 0xb3, 0x91, 0x07, 0x74, 0xef, 0x7a, 0xb3, 0x91, 0x04, 0x74, 0x07, 0x7a, 0xb3, 0x91, 0x06, 0x7e,
+ 0xb3, 0x91, 0x07, 0x7a, 0xb1, 0x0a, 0x75, 0x09, 0x01, 0xd2, 0xaa, 0xd2, 0xaf, 0xe4, 0x7e, 0x60,
+ 0x02, 0x4d, 0x22, 0x78, 0x03, 0x7e, 0x60, 0x03, 0x7c, 0x76, 0x7e, 0x04, 0x28, 0x00, 0x8d, 0xef,
+ 0x1b, 0x04, 0x78, 0xfa, 0x04, 0x7e, 0x20, 0x07, 0x7a, 0x23, 0x91, 0x06, 0x7e, 0x23, 0x91, 0x07,
+ 0x7e, 0x31, 0x0a, 0xbc, 0x32, 0x68, 0x22, 0x7a, 0x21, 0x0a, 0x7e, 0x21, 0x09, 0x68, 0x17, 0xca,
+ 0xb8, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07, 0x44, 0x02, 0x7a, 0xb3, 0x91,
+ 0x07, 0xda, 0xb8, 0x75, 0x09, 0x00, 0x30, 0xe0, 0xc1, 0x6c, 0x67, 0x7a, 0x63, 0x90, 0x00, 0x80,
+ 0xb9, 0xbe, 0xb0, 0x02, 0x22, 0xc0, 0xd0, 0x75, 0x08, 0xfe, 0x12, 0x0a, 0xc0, 0x74, 0x02, 0x7a,
+ 0xb3, 0x91, 0x06, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x07, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74,
+ 0x00, 0x7a, 0xb3, 0x91, 0x07, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x04, 0x7e, 0xb3, 0x3f, 0xf2, 0x30,
+ 0xe0, 0x08, 0x74, 0x18, 0x7a, 0xb3, 0x91, 0x01, 0x80, 0x06, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x01,
+ 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x04, 0x02, 0x02, 0x36, 0x75, 0x08, 0xff, 0x12, 0x0a, 0xc0, 0x74,
+ 0x01, 0x7a, 0xb3, 0x91, 0x04, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07, 0x54,
+ 0xfc, 0x7a, 0xb3, 0x91, 0x07, 0x32, 0xca, 0xb8, 0x75, 0x08, 0x02, 0x12, 0x0a, 0xc0, 0x7e, 0xb3,
+ 0x91, 0x03, 0x20, 0xe5, 0x08, 0x30, 0xe0, 0x2b, 0x12, 0x02, 0x9e, 0x80, 0xf1, 0x7e, 0xb3, 0x91,
+ 0x04, 0x30, 0xe0, 0x05, 0xda, 0xb8, 0x02, 0x02, 0x39, 0x30, 0xe1, 0x05, 0xda, 0xb8, 0x02, 0x01,
+ 0xf5, 0x30, 0xe6, 0x05, 0x12, 0x04, 0x03, 0x80, 0xd5, 0x30, 0xe2, 0x05, 0xda, 0xb8, 0x02, 0x00,
+ 0x80, 0x80, 0xcb, 0xda, 0xb8, 0x32,
+
+// Segment #14, EXCLUDED Start Address 00ff31d7, Length 1
+
+
+// Segment #15, Start Address 00ff0296, Length 2090
+0xff,0x00,0x96,0x02,0x2a,0x08,
+ 0xe4, 0x7a, 0xb3, 0x3f, 0xf1, 0x02, 0x03, 0x41, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xca, 0x3b,
+ 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00,
+ 0x7e, 0xb3, 0x01, 0x2e, 0xb4, 0x00, 0x02, 0x80, 0x1c, 0xb4, 0x01, 0x19, 0x7e, 0xb3, 0x91, 0x14,
+ 0x54, 0x14, 0x68, 0x05, 0x12, 0x03, 0x05, 0x80, 0x23, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x1c,
+ 0x12, 0x04, 0x43, 0x80, 0x17, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x05, 0x12, 0x04, 0x43, 0x80,
+ 0x0b, 0x7e, 0xb3, 0x91, 0x14, 0x54, 0x14, 0x68, 0x03, 0x12, 0x03, 0x05, 0xda, 0xeb, 0xda, 0x7b,
+ 0xda, 0x6b, 0xda, 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x20,
+ 0xe4, 0x19, 0x75, 0x08, 0x0a, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x2d, 0x70, 0x0a, 0x7e, 0xb3,
+ 0x01, 0x2e, 0xb4, 0x01, 0x1f, 0x02, 0x03, 0x9d, 0x02, 0x09, 0x8b, 0x75, 0x08, 0x0b, 0x12, 0x0a,
+ 0xc0, 0x74, 0x14, 0x7a, 0xb3, 0x91, 0x14, 0x7e, 0xb3, 0x01, 0x2e, 0xb4, 0x02, 0x0c, 0x12, 0x03,
+ 0x4d, 0x02, 0x03, 0x41, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0x7e, 0x00, 0x00, 0x7a, 0x03,
+ 0x01, 0x2e, 0x7a, 0x03, 0x01, 0x2f, 0x22, 0x7e, 0xb3, 0x01, 0x25, 0x54, 0x60, 0x60, 0x05, 0xb4,
+ 0x40, 0x1e, 0x80, 0x1c, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x05, 0x15, 0x75, 0x08, 0x71, 0x12, 0x0a,
+ 0xc0, 0x7e, 0xb3, 0x01, 0x28, 0x7e, 0xa0, 0x01, 0x7a, 0xa3, 0x91, 0x06, 0x7a, 0xb3, 0x91, 0x07,
+ 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x12, 0x22, 0xbe, 0x57,
+ 0x01, 0x2b, 0x28, 0x04, 0x7e, 0x57, 0x01, 0x2b, 0x7a, 0x0f, 0x01, 0x31, 0x7a, 0x57, 0x01, 0x35,
+ 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x12, 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91,
+ 0x1a, 0x70, 0x53, 0x7e, 0xb3, 0x91, 0x14, 0x20, 0xe4, 0x4c, 0x7e, 0xef, 0x01, 0x31, 0x7e, 0xf7,
+ 0x01, 0x35, 0x7e, 0x07, 0x01, 0x35, 0x4d, 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0xe0, 0x7a, 0xb3,
+ 0x91, 0x17, 0xa3, 0xa5, 0x08, 0x1b, 0xf4, 0x68, 0x06, 0xa5, 0xb8, 0x10, 0xf0, 0x80, 0x19, 0x7e,
+ 0xb0, 0x00, 0x7a, 0xb3, 0x01, 0x2e, 0xbe, 0x00, 0x10, 0x68, 0x0d, 0x7e, 0xb0, 0x00, 0x7a, 0xb3,
+ 0x01, 0x2e, 0x74, 0x80, 0x7a, 0xb3, 0x91, 0x1e, 0x7a, 0xef, 0x01, 0x31, 0x7a, 0xf7, 0x01, 0x35,
+ 0x75, 0x08, 0x06, 0x12, 0x0a, 0xc0, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0xca, 0x0b, 0xca,
+ 0x1b, 0xca, 0x2b, 0xca, 0x3b, 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0x75,
+ 0x08, 0x03, 0x12, 0x0a, 0xc0, 0x74, 0x00, 0x7a, 0xb3, 0x01, 0x2d, 0x74, 0x00, 0x7a, 0xb3, 0x91,
+ 0x00, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x12, 0x04, 0xb2, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b,
+ 0xda, 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x75, 0x08, 0x03,
+ 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x2f, 0xb4, 0x02, 0x11, 0x74, 0x00, 0x7a, 0xb3, 0x01, 0x2f,
+ 0x7a, 0xb3, 0x01, 0x2e, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0xb4, 0x01, 0x46, 0x7e, 0xb3,
+ 0x91, 0x04, 0x20, 0xe6, 0x42, 0x7e, 0x23, 0x91, 0x1a, 0x7c, 0x32, 0x7e, 0x13, 0x01, 0x30, 0x2c,
+ 0x21, 0x7a, 0x23, 0x01, 0x30, 0x7e, 0x00, 0x00, 0x2e, 0x04, 0x01, 0x37, 0x7e, 0xb3, 0x91, 0x16,
+ 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0xa5, 0xdb, 0xf4, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x75, 0x08,
+ 0x70, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x30, 0x7e, 0xa3, 0x01, 0x2c, 0xbc, 0xab, 0x78, 0x03,
+ 0x12, 0x05, 0x52, 0x22, 0x02, 0x09, 0x8b, 0xda, 0x59, 0x02, 0x04, 0x15, 0x74, 0xe0, 0x7a, 0xb3,
+ 0x91, 0x00, 0x7e, 0x03, 0x91, 0x10, 0x7e, 0x13, 0x91, 0x11, 0x7e, 0x33, 0x91, 0x12, 0x7e, 0x23,
+ 0x91, 0x13, 0x7e, 0x53, 0x91, 0x14, 0x7e, 0x43, 0x91, 0x15, 0x7e, 0x73, 0x91, 0x16, 0x7e, 0x63,
+ 0x91, 0x17, 0x7a, 0x0f, 0x01, 0x25, 0x7a, 0x1f, 0x01, 0x29, 0x75, 0x08, 0x04, 0x12, 0x0a, 0xc0,
+ 0x7a, 0x01, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x11, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x21, 0x08, 0x12,
+ 0x0a, 0xc0, 0x7a, 0x31, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x41, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x51,
+ 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x61, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x71, 0x08, 0x12, 0x0a, 0xc0,
+ 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x04, 0x12, 0x05, 0x26, 0x22,
+ 0x6d, 0x00, 0x7e, 0x14, 0x01, 0x02, 0x7a, 0x07, 0x01, 0x35, 0x7a, 0x03, 0x01, 0x30, 0x7e, 0xb3,
+ 0x01, 0x25, 0x20, 0xe7, 0x0f, 0x7a, 0x23, 0x01, 0x2f, 0x7a, 0x33, 0x01, 0x2e, 0xbe, 0x07, 0x01,
+ 0x2b, 0x68, 0x09, 0x22, 0x7a, 0x33, 0x01, 0x2f, 0x7a, 0x23, 0x01, 0x2e, 0x7e, 0xb3, 0x01, 0x25,
+ 0x54, 0xe3, 0x23, 0x23, 0x30, 0xe0, 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5,
+ 0x06, 0x30, 0xe4, 0x03, 0x02, 0x09, 0x8b, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25,
+ 0xf0, 0x90, 0x05, 0x7e, 0x75, 0x84, 0xff, 0x73, 0x02, 0x07, 0x39, 0x02, 0x05, 0xc6, 0x02, 0x07,
+ 0xd2, 0x02, 0x07, 0xed, 0x02, 0x06, 0xd0, 0x02, 0x06, 0x5b, 0x02, 0x08, 0x1e, 0x02, 0x08, 0x1e,
+ 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02,
+ 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x27, 0x02, 0x08, 0xf9, 0x02, 0x08,
+ 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24,
+ 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x01, 0x26,
+ 0xb4, 0x06, 0x2a, 0x7e, 0xb3, 0x01, 0x27, 0x60, 0x79, 0x7c, 0x0b, 0x7e, 0x13, 0x01, 0x28, 0x7e,
+ 0x17, 0x01, 0x29, 0x75, 0x08, 0x72, 0x12, 0x0a, 0xc0, 0x7a, 0x01, 0x08, 0x12, 0x0a, 0xc0, 0x7a,
+ 0x11, 0x08, 0x12, 0x0a, 0xc0, 0x12, 0x09, 0xd0, 0x40, 0x58, 0x02, 0x03, 0x84, 0xb4, 0x08, 0x1c,
+ 0x75, 0x08, 0x74, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x3f, 0xf1, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c,
+ 0x00, 0x00, 0x7a, 0x0b, 0xb0, 0x7e, 0x54, 0x00, 0x01, 0x02, 0x03, 0x84, 0xb4, 0x00, 0x33, 0x75,
+ 0x08, 0x75, 0x12, 0x0a, 0xc0, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0x7e,
+ 0xb3, 0x3f, 0xf2, 0x30, 0xe0, 0x07, 0x74, 0x02, 0x7a, 0x0b, 0xb0, 0x80, 0x05, 0x74, 0x00, 0x7a,
+ 0x0b, 0xb0, 0x0b, 0x14, 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x7e, 0x54, 0x00, 0x02, 0xda, 0x0b, 0x02,
+ 0x03, 0x84, 0x02, 0x09, 0x8b, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91,
+ 0x1c, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x00, 0x5f, 0x75, 0x08, 0x76, 0x12, 0x0a, 0xc0, 0x7e, 0xb3,
+ 0x01, 0x2a, 0x54, 0x0f, 0xb4, 0x02, 0x05, 0x7e, 0xb0, 0x60, 0x80, 0x17, 0xb4, 0x00, 0x05, 0x7e,
+ 0xb0, 0x00, 0x80, 0x0f, 0x7e, 0xb3, 0x01, 0x2a, 0x20, 0xe7, 0x05, 0x7e, 0xb0, 0x40, 0x80, 0x03,
+ 0x7e, 0xb0, 0x20, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x11, 0x30, 0xe0, 0x04, 0x74, 0x01,
+ 0x80, 0x02, 0x74, 0x00, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0x7a, 0x0b,
+ 0xb0, 0x0b, 0x14, 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0x54,
+ 0x00, 0x02, 0xda, 0x0b, 0x02, 0x03, 0x84, 0x02, 0x09, 0x8b, 0x7e, 0xb3, 0x01, 0x2a, 0x54, 0x0f,
+ 0xb4, 0x02, 0x05, 0x7e, 0xb0, 0x60, 0x80, 0x17, 0xb4, 0x00, 0x05, 0x7e, 0xb0, 0x00, 0x80, 0x0f,
+ 0x7e, 0xb3, 0x01, 0x2a, 0x20, 0xe7, 0x05, 0x7e, 0xb0, 0x40, 0x80, 0x03, 0x7e, 0xb0, 0x20, 0x7a,
+ 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x01, 0x28, 0xb4, 0x00, 0x26, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x01,
+ 0x0e, 0x75, 0x08, 0x77, 0x12, 0x0a, 0xc0, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x80, 0x1b, 0xb4,
+ 0x03, 0x0e, 0x75, 0x08, 0x78, 0x12, 0x0a, 0xc0, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x11, 0x80, 0x0a,
+ 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x12, 0x09, 0x8b, 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00,
+ 0x02, 0x03, 0x77, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x09, 0x1f, 0x75, 0x08, 0x79, 0x12, 0x0a, 0xc0,
+ 0x7e, 0xb3, 0x01, 0x28, 0xbe, 0xb3, 0x3f, 0xf1, 0x68, 0x0d, 0xca, 0xb8, 0x12, 0x01, 0xf1, 0xda,
+ 0xb8, 0x50, 0x76, 0x7a, 0xb3, 0x3f, 0xf1, 0x80, 0x6d, 0xb4, 0x05, 0x08, 0x75, 0x08, 0x7a, 0x12,
+ 0x0a, 0xc0, 0x80, 0x62, 0xb4, 0x03, 0x19, 0x75, 0x08, 0x7b, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01,
+ 0x28, 0xb4, 0x01, 0x55, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x46,
+ 0xb4, 0x01, 0x19, 0x75, 0x08, 0x7c, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x28, 0xb4, 0x01, 0x39,
+ 0x7e, 0xb3, 0x3f, 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a, 0x7e,
+ 0xb3, 0x01, 0x27, 0x60, 0x24, 0x7c, 0x0b, 0x7e, 0x13, 0x01, 0x28, 0x7e, 0x17, 0x01, 0x29, 0x75,
+ 0x08, 0x73, 0x12, 0x0a, 0xc0, 0x7a, 0x01, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x11, 0x08, 0x12, 0x0a,
+ 0xc0, 0x12, 0x0a, 0x0a, 0x40, 0x03, 0x02, 0x03, 0x77, 0x02, 0x09, 0x8b, 0x7e, 0xb3, 0x01, 0x26,
+ 0xb4, 0x0b, 0xf6, 0x75, 0x08, 0x7d, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x28, 0x7e, 0xa3, 0x01,
+ 0x2a, 0x4c, 0xab, 0x78, 0xe4, 0x80, 0xdf, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a,
+ 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x0a, 0xcf, 0x75, 0x08, 0x7e, 0x12, 0x0a, 0xc0,
+ 0x7e, 0xb3, 0x01, 0x28, 0x70, 0xc3, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0x7a, 0x0b,
+ 0xb0, 0x7e, 0x54, 0x00, 0x01, 0x02, 0x03, 0x84, 0x02, 0x09, 0x8b, 0x02, 0x09, 0x8b, 0x02, 0x09,
+ 0x8b, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x04, 0x20, 0x75, 0x08, 0xc3, 0x12, 0x0a, 0xc0, 0x7e, 0x04,
+ 0x00, 0x01, 0x7e, 0x17, 0x01, 0x27, 0x7e, 0x18, 0x01, 0x37, 0x7a, 0x1c, 0x00, 0x00, 0x7e, 0x47,
+ 0x01, 0x2b, 0x12, 0x0a, 0xcc, 0x02, 0x08, 0xf3, 0xb4, 0x06, 0x42, 0x75, 0x08, 0xc1, 0x12, 0x0a,
+ 0xc0, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7d, 0xca, 0x7e, 0xd7, 0x01, 0x27, 0x7e,
+ 0x78, 0x01, 0x37, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x01, 0x2b, 0x75, 0x08, 0xc1, 0x12, 0x0a,
+ 0xc0, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12, 0x0b, 0x63, 0x7e,
+ 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0x40, 0x65, 0x80, 0x60, 0xb4, 0x00, 0x24,
+ 0xc2, 0xaf, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x94, 0x00, 0x7a, 0xb3, 0x01, 0x24, 0x12, 0x03, 0x77,
+ 0xe4, 0x8d, 0xef, 0x8d, 0xef, 0x8d, 0xef, 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, 0xca, 0x02, 0xff, 0xca,
+ 0x06, 0x00, 0x00, 0x32, 0xb4, 0x09, 0x20, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0x23, 0x91,
+ 0x07, 0x7e, 0x57, 0x01, 0x27, 0x4d, 0x55, 0x68, 0x05, 0x4e, 0x20, 0x02, 0x80, 0x03, 0x5e, 0x20,
+ 0xfd, 0x7a, 0x23, 0x91, 0x07, 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x01, 0x29,
+ 0x7e, 0x17, 0x01, 0x27, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x03, 0x77,
+ 0x02, 0x09, 0x8b, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e,
+ 0xb3, 0x01, 0x26, 0xb4, 0x03, 0x15, 0x75, 0x08, 0xc2, 0x12, 0x0a, 0xc0, 0x7e, 0x04, 0x00, 0x01,
+ 0x7e, 0x17, 0x01, 0x27, 0x7e, 0x57, 0x01, 0x2b, 0x02, 0x03, 0x84, 0xb4, 0x05, 0x41, 0x75, 0x08,
+ 0xc0, 0x12, 0x0a, 0xc0, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x7e,
+ 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37, 0x01, 0x27, 0x7e,
+ 0x47, 0x01, 0x2b, 0x12, 0x0a, 0xcc, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8,
+ 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x01, 0x2b, 0x02, 0x03, 0x84, 0xb4,
+ 0x01, 0x20, 0x7e, 0x00, 0x00, 0x7e, 0x10, 0x01, 0x75, 0x08, 0x72, 0x12, 0x0a, 0xc0, 0x7a, 0x01,
+ 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x11, 0x08, 0x12, 0x0a, 0xc0, 0x12, 0x09, 0xd0, 0x40, 0x03, 0x02,
+ 0x03, 0x84, 0x02, 0x09, 0x8b, 0x75, 0x08, 0x07, 0x12, 0x0a, 0xc0, 0x7e, 0xb0, 0x02, 0x7a, 0xb3,
+ 0x90, 0x00, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x15, 0x74, 0x01,
+ 0x7a, 0xb3, 0x91, 0x11, 0x7e, 0xb3, 0x91, 0x15, 0x54, 0x60, 0xbe, 0xb0, 0x40, 0x68, 0x08, 0x74,
+ 0x20, 0x7a, 0xb3, 0x91, 0x15, 0x80, 0xed, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x74, 0x04, 0x7a,
+ 0xb3, 0x91, 0x14, 0x74, 0xff, 0x7a, 0xb3, 0x01, 0x2d, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40,
+ 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12, 0x0a, 0x57, 0x40, 0x1f, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c,
+ 0x00, 0x00, 0xca, 0x0b, 0xca, 0x49, 0x12, 0x0a, 0xcc, 0xda, 0x59, 0xda, 0x0b, 0x7e, 0x43, 0x01,
+ 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0xc3, 0x22, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94,
+ 0x00, 0xd0, 0xa8, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12,
+ 0x0a, 0x57, 0x40, 0x31, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7f, 0x61, 0x7e, 0x78,
+ 0x01, 0x37, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x01, 0x2b, 0xbd, 0x74, 0x78, 0x17, 0x75, 0x08,
+ 0xc1, 0x12, 0x0a, 0xc0, 0x12, 0x0b, 0x63, 0x40, 0x0c, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94,
+ 0x00, 0xd0, 0xa8, 0xc3, 0x22, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0xd3,
+ 0x22, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62,
+ 0x7d, 0x75, 0x7d, 0x87, 0x7e, 0x34, 0x7f, 0x03, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e,
+ 0x00, 0x3e, 0x00, 0x0a, 0x50, 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38,
+ 0x50, 0x02, 0x2d, 0x38, 0xbc, 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35,
+ 0x69, 0x41, 0x00, 0x02, 0x0b, 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff,
+ 0xff, 0x78, 0x05, 0x7e, 0x1b, 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff,
+ 0x28, 0x04, 0x7e, 0x44, 0x00, 0xff, 0xc3, 0x22, 0xd3, 0x22,
+
+// Segment #16, EXCLUDED Start Address 00ff7c00, Length 227
+
+
+// Segment #17, EXCLUDED Start Address 00ff7f00, Length 192
+
+
+// Segment #17, Start Address 00ff7fc0, Length 64
+0xff,0x00,0xc0,0x7f,0x40,0x00,
+ 0x40, 0x01, 0x02, 0x00, 0xd7, 0x31, 0x02, 0x00, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+// Segment #18, Start Address 00ff0ac0, Length 4163
+0xff,0x00,0xc0,0x0a,0x43,0x10,
+ 0xca, 0x08, 0x7e, 0x01, 0x08, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x80, 0x50, 0x0b, 0x1a,
+ 0x60, 0x0b, 0x35, 0x0b, 0x1a, 0x70, 0x0b, 0x35, 0x0b, 0x1a, 0x80, 0x0b, 0x35, 0x0b, 0x1a, 0x90,
+ 0x0b, 0x35, 0x0b, 0x1a, 0xa0, 0x0b, 0x35, 0x0b, 0x1a, 0xb0, 0x0b, 0x35, 0x0b, 0x1a, 0xc0, 0x0b,
+ 0x35, 0x0b, 0x1a, 0xd0, 0x0b, 0x35, 0x1b, 0x0a, 0x60, 0x0b, 0x15, 0x1b, 0x0a, 0x70, 0x0b, 0x15,
+ 0x1b, 0x0a, 0x80, 0x0b, 0x15, 0x1b, 0x0a, 0x90, 0x0b, 0x15, 0x1b, 0x0a, 0xa0, 0x0b, 0x15, 0x1b,
+ 0x0a, 0xb0, 0x0b, 0x15, 0x1b, 0x0a, 0xc0, 0x0b, 0x15, 0x1b, 0x0a, 0xd0, 0x0b, 0x15, 0x9e, 0x44,
+ 0x00, 0x10, 0x50, 0xaa, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x0e, 0x7e, 0x1b, 0xc0, 0x7a, 0x0b, 0xc0,
+ 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b, 0xfc, 0x7c,
+ 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e, 0x44, 0x00,
+ 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78, 0xfa, 0x7f,
+ 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00, 0x40, 0x9d,
+ 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x0b, 0x8d, 0xda, 0x79,
+ 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x7e, 0xc0, 0x03,
+ 0x7e, 0xd0, 0x00, 0x7a, 0xd3, 0x90, 0x00, 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74, 0x55, 0x39,
+ 0xb5, 0x2a, 0xaa, 0x74, 0xa0, 0x39, 0xb5, 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d, 0x70, 0x50,
+ 0x06, 0x2d, 0x70, 0x7d, 0x07, 0x6d, 0x77, 0x7c, 0x31, 0x7e, 0x7b, 0x00, 0x7a, 0x6b, 0x00, 0x0b,
+ 0x7c, 0x0b, 0x6c, 0xa5, 0xd9, 0xf3, 0x7f, 0x16, 0x1b, 0x1c, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x1b,
+ 0x10, 0xbc, 0x10, 0x68, 0x06, 0x1b, 0x54, 0x78, 0xf5, 0x80, 0x2f, 0x6d, 0x00, 0x7c, 0x20, 0x7f,
+ 0x16, 0x9f, 0x10, 0x7f, 0x27, 0x9f, 0x20, 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc, 0x01, 0x78,
+ 0x19, 0x0b, 0x2c, 0x0b, 0x1c, 0xa5, 0xdb, 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x06, 0x6c, 0xdc, 0x7a,
+ 0xd3, 0x90, 0x00, 0x4d, 0x77, 0x78, 0x90, 0xc2, 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00, 0x04, 0x00,
+ 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00, 0x02, 0x01, 0x04, 0x01, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x00, 0x08, 0x10, 0x02, 0x10,
+ 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e, 0x18, 0x7f, 0xbd, 0x7a, 0x1c, 0x00, 0xff, 0x0b,
+ 0x1a, 0x00, 0x5e, 0x10, 0x1f, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a, 0x51, 0x23, 0x7e, 0x18, 0x0c,
+ 0x0d, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, 0x08, 0xa5, 0xb8, 0x02, 0x03,
+ 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 0x7e, 0xe8, 0x7f, 0xbf, 0x7a, 0xec, 0x00, 0xff, 0xe0, 0xf5,
+ 0x23, 0x54, 0xc0, 0x68, 0x38, 0x7e, 0xe8, 0x7f, 0xbe, 0x7a, 0xec, 0x00, 0xff, 0xe0, 0x60, 0x2e,
+ 0x12, 0x0c, 0x37, 0xf5, 0x21, 0x7a, 0xa1, 0x20, 0x20, 0x09, 0x0c, 0x20, 0x0a, 0x12, 0x7e, 0xb0,
+ 0x0e, 0x7a, 0xb3, 0x92, 0x00, 0x80, 0x10, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x92, 0x00, 0x80, 0x07,
+ 0x7e, 0xb0, 0x0a, 0x7a, 0xb3, 0x92, 0x00, 0x7a, 0xb1, 0x0d, 0x02, 0x0c, 0xc4, 0x22, 0x7e, 0xb0,
+ 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x03, 0x7a, 0xb3, 0x90, 0x00, 0x12,
+ 0x19, 0x0c, 0x80, 0xea, 0xc2, 0xaf, 0xc2, 0x11, 0xc2, 0x12, 0x75, 0xb0, 0xdf, 0x7e, 0x00, 0x01,
+ 0x7a, 0x03, 0x93, 0x00, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x90, 0x00, 0x6c, 0x00, 0x7e, 0x10, 0x03,
+ 0x12, 0x0c, 0xf5, 0x7e, 0x68, 0x2c, 0x66, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x0b, 0x00,
+ 0x80, 0x32, 0x02, 0x1a, 0x6e, 0x20, 0x11, 0x2b, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x90, 0x00, 0x12,
+ 0x19, 0x0c, 0x7e, 0xb0, 0x03, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x02, 0x7a,
+ 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0xa5, 0xd9, 0xdc, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x90, 0x00,
+ 0x12, 0x19, 0x0c, 0x22, 0x7e, 0x68, 0x2c, 0xf9, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e,
+ 0xe4, 0x10, 0x00, 0x7e, 0x40, 0x55, 0x7a, 0xe9, 0x40, 0x0b, 0xe4, 0x7e, 0x50, 0xaa, 0x7a, 0xe9,
+ 0x50, 0x1b, 0xe4, 0xbe, 0xe9, 0x40, 0x68, 0x19, 0x7e, 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0x13, 0x7a, 0xe9, 0x40, 0x7e, 0xe9, 0x10, 0x80,
+ 0xf8, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x0b, 0x00, 0x7e, 0x68,
+ 0x2d, 0x3d, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x78, 0x00, 0x00, 0x7e, 0x70, 0x0e,
+ 0x7e, 0xa4, 0xff, 0xff, 0x7e, 0xb4, 0xbf, 0xff, 0x7d, 0xcb, 0x0e, 0xc4, 0x7d, 0xdc, 0x5d, 0xdb,
+ 0x6c, 0xbb, 0x7d, 0xfa, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfb, 0x5e,
+ 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b,
+ 0xb0, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x6c, 0xbb, 0x7d, 0xfa,
+ 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x41, 0x0b, 0xb0, 0x7d, 0xfb, 0x5e, 0xf4, 0x7f,
+ 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x34, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b,
+ 0xb0, 0x78, 0x27, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x1a,
+ 0x0b, 0xb0, 0xbe, 0xc4, 0xff, 0xfe, 0x78, 0x92, 0x0e, 0xb4, 0xa5, 0xdf, 0x8b, 0x7e, 0x68, 0x2c,
+ 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x77, 0xca, 0x5b, 0xca, 0x6b, 0x7e, 0x68,
+ 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x2d, 0x8f, 0x7a, 0x6c, 0x00,
+ 0xff, 0x12, 0x19, 0xc4, 0x0a, 0x47, 0x12, 0x19, 0xfa, 0x7e, 0x68, 0x2d, 0xde, 0x7a, 0x6c, 0x00,
+ 0xff, 0x12, 0x19, 0xc4, 0x6c, 0x77, 0xda, 0x6b, 0xca, 0x6b, 0x0b, 0x70, 0x0e, 0xc4, 0xbe, 0xc4,
+ 0xff, 0xff, 0x78, 0xf6, 0x1b, 0x70, 0x0a, 0x47, 0x12, 0x19, 0xfa, 0x12, 0x19, 0x19, 0x30, 0x11,
+ 0x30, 0xda, 0x6b, 0xda, 0x5b, 0x6c, 0xbb, 0x7e, 0x78, 0x00, 0x00, 0x7d, 0xfa, 0x5e, 0xf4, 0x7f,
+ 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfb, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfc, 0x5e,
+ 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x80,
+ 0xd4, 0x7e, 0x68, 0x2d, 0x1b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x30, 0x1f, 0x0e, 0x7e,
+ 0x78, 0x04, 0x20, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x44, 0x7b, 0xe0, 0x80, 0x0c, 0x7e, 0x78, 0x00,
+ 0x00, 0x7a, 0x7c, 0x00, 0x01, 0x7e, 0x44, 0x80, 0x00, 0x0b, 0x00, 0x7e, 0x40, 0x3a, 0x7c, 0x54,
+ 0x7f, 0x57, 0x7d, 0x84, 0x6c, 0x66, 0x7a, 0x5b, 0x50, 0x0b, 0x5c, 0x0b, 0x50, 0xa5, 0xde, 0x02,
+ 0x0b, 0x50, 0x1b, 0x84, 0x78, 0xf0, 0x7c, 0x54, 0x7f, 0x57, 0x7d, 0x84, 0x6c, 0x66, 0xbe, 0x5b,
+ 0x50, 0x78, 0x1a, 0x0b, 0x5c, 0x0b, 0x50, 0xa5, 0xde, 0x02, 0x0b, 0x50, 0x1b, 0x84, 0x78, 0xee,
+ 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x4b, 0x7f, 0x45, 0x7e,
+ 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x2d, 0x5f, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7d, 0x4b, 0x12, 0x19, 0xfa, 0x7e, 0x68, 0x2d, 0x74, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x19, 0xc4, 0x6c, 0x88, 0x7c, 0x95, 0x12, 0x19, 0xfa, 0x7e, 0x68, 0x2d, 0x82,
+ 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x4b, 0x90, 0x12, 0x19, 0xfa, 0x12, 0x19, 0x19,
+ 0x30, 0x11, 0x05, 0x7e, 0x4b, 0x90, 0x80, 0xfb, 0x7e, 0x68, 0x2e, 0x28, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x19, 0xc4, 0x0b, 0x00, 0x7e, 0xb0, 0x80, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xa0, 0x55, 0x7a,
+ 0xa3, 0x91, 0x10, 0x7e, 0xb3, 0x91, 0x07, 0x7e, 0xb3, 0x91, 0x10, 0xbc, 0xab, 0x78, 0x20, 0x7e,
+ 0xa0, 0xaa, 0x7a, 0xa3, 0x91, 0x10, 0x7e, 0xb3, 0x91, 0x07, 0x7e, 0xb3, 0x91, 0x10, 0xbc, 0xab,
+ 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x1b, 0x7e,
+ 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0x0a,
+ 0x7a, 0xa3, 0x91, 0x10, 0x7e, 0xb3, 0x91, 0x10, 0x80, 0xf6, 0x7e, 0x68, 0x2e, 0x4a, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x12, 0x31, 0x0b, 0x00, 0x7e, 0xe4, 0x10, 0x00, 0x7e, 0xa0,
+ 0xa5, 0xca, 0xa8, 0x7a, 0xe9, 0xa0, 0x7e, 0xb0, 0x30, 0x7a, 0xb3, 0x95, 0x00, 0x7e, 0xe9, 0xa0,
+ 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x95, 0x00, 0x12, 0x19, 0x0c, 0x0b, 0xe5, 0x7e, 0xb0, 0x20, 0x7a,
+ 0xb3, 0x95, 0x00, 0x7e, 0xe9, 0xb0, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x95, 0x00, 0x7e, 0xe9, 0xb0,
+ 0xda, 0xa8, 0xbc, 0xab, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19,
+ 0xc4, 0x80, 0x1d, 0x7e, 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19,
+ 0x19, 0x30, 0x11, 0x0c, 0x7e, 0xb0, 0x38, 0x7a, 0xb3, 0x95, 0x00, 0x7e, 0xe9, 0xb0, 0x80, 0xfb,
+ 0x80, 0x00, 0x7e, 0x68, 0x2d, 0xe4, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x0b, 0x00, 0x75,
+ 0xb0, 0xdf, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, 0x08, 0xbe, 0xb0, 0x01, 0x78, 0x0b, 0x09,
+ 0xb2, 0x00, 0x14, 0xbe, 0xb0, 0x60, 0x78, 0x02, 0x80, 0x17, 0x7e, 0x68, 0x2c, 0xdf, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0x11, 0x09, 0xb2, 0x00, 0x08, 0x80,
+ 0xfa, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x2e, 0x06,
+ 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x0b, 0x00, 0x75, 0xb0, 0xef, 0x12, 0x18, 0xff, 0x7e,
+ 0x24, 0x80, 0x00, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x1c, 0x7e, 0xb0, 0x01, 0x19, 0xb2, 0x00,
+ 0x08, 0x09, 0xb2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x37, 0x09, 0xb2, 0x00, 0x08, 0x5e, 0xb0, 0xc0,
+ 0xbe, 0xb0, 0xc0, 0x78, 0x2b, 0x7e, 0xa0, 0xaa, 0x19, 0xa2, 0x00, 0x1c, 0x6c, 0xbb, 0x19, 0xb2,
+ 0x00, 0x08, 0x09, 0xb2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x16, 0x09, 0xb2, 0x00, 0x08, 0x5e, 0xb0,
+ 0xc0, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x1b,
+ 0x7e, 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11,
+ 0x0a, 0x19, 0xa2, 0x00, 0x1c, 0x09, 0xb2, 0x00, 0x1c, 0x80, 0xf6, 0x7e, 0x68, 0x2e, 0x6c, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x2e, 0xee, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19,
+ 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x7e, 0xb0, 0x01, 0x19, 0xb2, 0x00, 0x1c, 0x2e,
+ 0x24, 0x01, 0x00, 0x0b, 0xb0, 0xa5, 0xd9, 0xf3, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x7e,
+ 0xb0, 0x01, 0x0b, 0x00, 0x09, 0xa2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x16, 0x7e, 0x68, 0x2c, 0xe7,
+ 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00, 0x0b, 0xb0, 0xa5, 0xd9, 0xe2,
+ 0x80, 0x25, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19,
+ 0x30, 0x11, 0xe4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x09, 0xa2, 0x00, 0x1c, 0x2e, 0x24,
+ 0x01, 0x00, 0xa5, 0xd9, 0xf5, 0x80, 0xec, 0x7e, 0x68, 0x2f, 0x12, 0x7a, 0x6c, 0x00, 0xff, 0x12,
+ 0x19, 0xc4, 0x12, 0x12, 0x31, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x74, 0x10,
+ 0x19, 0xb2, 0x00, 0x10, 0x12, 0x11, 0xaa, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xee, 0x7e, 0x68,
+ 0x2f, 0x36, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21,
+ 0x0b, 0x00, 0xe4, 0x19, 0xb2, 0x00, 0x10, 0x12, 0x11, 0xaa, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9,
+ 0xef, 0x30, 0x00, 0x03, 0x02, 0x17, 0x3b, 0x02, 0x12, 0x6a, 0x74, 0x07, 0x19, 0xb2, 0x00, 0x08,
+ 0x12, 0x19, 0x0c, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09,
+ 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09,
+ 0xb2, 0x00, 0x14, 0xc2, 0x13, 0x7e, 0xb0, 0x55, 0x12, 0x12, 0x0b, 0x7e, 0xb0, 0xaa, 0x12, 0x12,
+ 0x0b, 0x7e, 0xb0, 0x00, 0x12, 0x12, 0x0b, 0x7e, 0xb0, 0xff, 0x12, 0x12, 0x0b, 0x30, 0x13, 0x0f,
+ 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x22, 0x7e,
+ 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x22, 0x19, 0xb2, 0x00, 0x00, 0x12,
+ 0x18, 0xff, 0x09, 0xa2, 0x00, 0x00, 0xbc, 0xab, 0x78, 0x01, 0x22, 0x20, 0x11, 0x03, 0xd2, 0x13,
+ 0x22, 0x12, 0x19, 0x19, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x09, 0xa2, 0x00, 0x00, 0x80,
+ 0xf3, 0x75, 0xb0, 0xdf, 0x12, 0x18, 0xff, 0x75, 0xb0, 0xef, 0x12, 0x18, 0xff, 0x7e, 0x24, 0x80,
+ 0x00, 0x7e, 0x11, 0x21, 0x74, 0x80, 0x19, 0xb2, 0x00, 0x0c, 0x7e, 0x54, 0x00, 0x02, 0x19, 0xa2,
+ 0x00, 0x04, 0x19, 0xb2, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb2, 0x00, 0x0c, 0x74, 0x06, 0x19, 0xb2,
+ 0x00, 0x08, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xdb, 0x22, 0x7e, 0x68, 0x2f, 0x5a, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x12, 0x18,
+ 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x09,
+ 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x19, 0xc4, 0x80, 0x1a, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4,
+ 0x12, 0x19, 0x19, 0x30, 0x11, 0x09, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x80, 0xf7, 0x2e,
+ 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xb6, 0x7e, 0x68, 0x2f, 0x7e, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19,
+ 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00,
+ 0x18, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e,
+ 0xb0, 0x0a, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80,
+ 0x1a, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30,
+ 0x11, 0x09, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x80, 0xf7, 0x2e, 0x24, 0x01, 0x00, 0xa5,
+ 0xd9, 0xb6, 0x30, 0x04, 0x03, 0x02, 0x15, 0x9f, 0x7e, 0x68, 0x2f, 0xa2, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2,
+ 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10,
+ 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a,
+ 0x78, 0x3c, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18,
+ 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18,
+ 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a, 0x78, 0x14, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68,
+ 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0xe6, 0x7e,
+ 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68,
+ 0x2f, 0xea, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21,
+ 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e,
+ 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09,
+ 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x3c, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12,
+ 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x02,
+ 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x14,
+ 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00, 0xa5,
+ 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12,
+ 0x19, 0x19, 0x30, 0x11, 0xe6, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2,
+ 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x30, 0x32, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e,
+ 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12,
+ 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x50, 0xbe, 0xb0, 0x50, 0x78, 0x1f, 0x6c, 0xaa,
+ 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x50, 0x78, 0x0d,
+ 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x20, 0x7e, 0x68, 0x2c,
+ 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0x0f, 0x7e, 0xa0,
+ 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, 0x01,
+ 0x00, 0xa5, 0xd9, 0xa2, 0x7e, 0x68, 0x30, 0x7a, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e,
+ 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x01, 0x19,
+ 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0xa0, 0xbe, 0xb0, 0xa0,
+ 0x78, 0x1f, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e,
+ 0xb0, 0xa0, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80,
+ 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30,
+ 0x11, 0x0f, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80,
+ 0xf1, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x7e, 0x68, 0x30, 0x9e, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x20, 0xb1, 0x26, 0x7e,
+ 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x30, 0xb1, 0x19, 0x6c, 0xaa, 0x19, 0xa2,
+ 0x00, 0x10, 0x12, 0x18, 0xff, 0x20, 0xb1, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x19, 0xc4, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4,
+ 0x12, 0x19, 0x19, 0x30, 0x11, 0x0f, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19,
+ 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xae, 0x02, 0x17, 0x3b, 0x7e,
+ 0x68, 0x2f, 0xc6, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11,
+ 0x21, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18,
+ 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff,
+ 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x06, 0x78, 0x3c, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10,
+ 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0,
+ 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x06, 0x78,
+ 0x14, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00,
+ 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4,
+ 0x12, 0x19, 0x19, 0x30, 0x11, 0xe6, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19,
+ 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x30, 0x0e, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4,
+ 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12,
+ 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19,
+ 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x09, 0x78, 0x3c, 0x7e,
+ 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03,
+ 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2,
+ 0x00, 0x18, 0x5e, 0xb0, 0x09, 0x78, 0x14, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12,
+ 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0xe6, 0x7e, 0xa0, 0x01, 0x19,
+ 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x30, 0x56, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x7e,
+ 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x90,
+ 0xbe, 0xb0, 0x90, 0x78, 0x1f, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2,
+ 0x00, 0x18, 0x5e, 0xb0, 0x90, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12,
+ 0x19, 0xc4, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12,
+ 0x19, 0x19, 0x30, 0x11, 0x0f, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2,
+ 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xa2, 0x20, 0x1f, 0x68, 0x12, 0x12,
+ 0x31, 0x12, 0x17, 0xa9, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x20, 0x89, 0x26,
+ 0x7e, 0xa0, 0xff, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x18, 0xff, 0x7e, 0xb0, 0x55, 0x19, 0xb2, 0x00,
+ 0x00, 0x12, 0x18, 0xff, 0x30, 0x89, 0x0f, 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x18,
+ 0xff, 0x20, 0x89, 0x02, 0x80, 0x26, 0x12, 0x19, 0x19, 0x30, 0x11, 0x20, 0x7e, 0xa0, 0xff, 0x19,
+ 0xa2, 0x00, 0x04, 0x12, 0x18, 0xff, 0x7e, 0xb0, 0x55, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x18, 0xff,
+ 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x18, 0xff, 0x80, 0xe0, 0x2e, 0x24, 0x01, 0x00,
+ 0xa5, 0xd9, 0xa8, 0x02, 0x17, 0xc2, 0x02, 0x18, 0x4c, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21,
+ 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9,
+ 0xef, 0x22, 0x30, 0x1f, 0x03, 0x02, 0x18, 0x4c, 0xc2, 0x8a, 0x12, 0x17, 0xa9, 0x0b, 0x00, 0x12,
+ 0x18, 0x16, 0x20, 0x8b, 0x24, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x02, 0x7a, 0xb3, 0x91,
+ 0x07, 0x74, 0x0c, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x07, 0x12, 0x19, 0x0c,
+ 0x30, 0x8b, 0x06, 0x12, 0x18, 0x16, 0x30, 0x8b, 0xad, 0x12, 0x19, 0x19, 0x30, 0x11, 0xa7, 0x12,
+ 0x18, 0x16, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x07, 0x12, 0x19,
+ 0x0c, 0x12, 0x18, 0x16, 0x80, 0xe9, 0x7e, 0xa0, 0x00, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x06, 0x7a,
+ 0xa3, 0x91, 0x07, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7a, 0xa3, 0x91, 0x07, 0x12, 0x18, 0xff,
+ 0x74, 0xef, 0x7a, 0xb3, 0x91, 0x04, 0x74, 0x80, 0x7a, 0xb3, 0x91, 0x03, 0x74, 0x0c, 0x7a, 0xb3,
+ 0x91, 0x06, 0x74, 0x08, 0x7a, 0xb3, 0x91, 0x07, 0x12, 0x19, 0x0c, 0x22, 0x30, 0x12, 0x19, 0x7e,
+ 0x68, 0x30, 0xc2, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0xd2, 0x11, 0x12, 0x18, 0xff, 0x12,
+ 0x18, 0xff, 0x12, 0x18, 0xff, 0x02, 0x0c, 0xca, 0x30, 0x1f, 0x1c, 0x7e, 0x68, 0x31, 0x3c, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x31, 0x5e, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19,
+ 0xc4, 0x12, 0x1a, 0x6e, 0x02, 0x18, 0xf7, 0x0b, 0x00, 0x7e, 0x78, 0x18, 0xb1, 0x7a, 0x7c, 0x00,
+ 0xff, 0x7f, 0x67, 0x7a, 0x6c, 0x00, 0x00, 0x7e, 0x70, 0x3e, 0x7e, 0x7b, 0xb0, 0x7a, 0x6b, 0xb0,
+ 0x0b, 0x7c, 0x0b, 0x6c, 0xa5, 0xdf, 0xf3, 0x7e, 0x78, 0x18, 0xb1, 0x7a, 0x7c, 0x00, 0x00, 0x89,
+ 0x78, 0x7e, 0x78, 0x00, 0x00, 0x7a, 0x7c, 0x00, 0xfe, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00,
+ 0xfe, 0x74, 0xaa, 0x39, 0xb7, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb7, 0x2a, 0xaa, 0x74, 0xa0, 0x39,
+ 0xb7, 0x55, 0x55, 0x6c, 0x99, 0x7a, 0x6b, 0x90, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x6b, 0x80, 0xbc,
+ 0x89, 0x68, 0x08, 0x1b, 0x54, 0x78, 0xf5, 0x8a, 0xff, 0x18, 0xef, 0x8a, 0xff, 0x18, 0xf7, 0x12,
+ 0x19, 0x19, 0x7e, 0x6b, 0x80, 0x80, 0xfb, 0x7e, 0x10, 0xff, 0x12, 0x19, 0xac, 0x80, 0xf8, 0xca,
+ 0xf9, 0x7e, 0xf4, 0x00, 0xff, 0x1b, 0xf4, 0x78, 0xfc, 0xda, 0xf9, 0x22, 0xca, 0xf9, 0x7e, 0xf4,
+ 0x00, 0x00, 0x1b, 0xf4, 0x78, 0xfc, 0xda, 0xf9, 0x22, 0x20, 0x11, 0x20, 0xd2, 0x12, 0x12, 0x19,
+ 0x0c, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x12, 0x19,
+ 0x0c, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x90, 0x00, 0x22, 0xca, 0x0b, 0x7e, 0x10,
+ 0x03, 0x7c, 0x30, 0x6c, 0x22, 0x0b, 0x20, 0x9e, 0x30, 0x0a, 0x50, 0xf9, 0x2e, 0x30, 0x0b, 0x1b,
+ 0x20, 0x68, 0x20, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x03, 0x7a, 0xb3, 0x90, 0x00,
+ 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x90, 0x00,
+ 0xa5, 0xda, 0xe0, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x1b, 0x30, 0x68, 0x20, 0x12, 0x19, 0x0c,
+ 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c,
+ 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x90, 0x00, 0xa5, 0xdb, 0xe0, 0x7e, 0x20, 0x0a,
+ 0x12, 0x19, 0x0c, 0xa5, 0xda, 0xfa, 0xa5, 0xd9, 0x98, 0xda, 0x0b, 0x22, 0x20, 0x11, 0x14, 0x12,
+ 0x19, 0x0c, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x00, 0x7a,
+ 0xb3, 0x90, 0x00, 0x22, 0x30, 0x1f, 0x32, 0x20, 0x11, 0x2f, 0xca, 0x2b, 0xca, 0x7b, 0x7e, 0x78,
+ 0x80, 0x00, 0x7a, 0x7c, 0x00, 0xfe, 0x12, 0x1a, 0x4d, 0x7e, 0x6b, 0xa0, 0x5c, 0xaa, 0x68, 0x10,
+ 0x29, 0xb7, 0x00, 0x14, 0x54, 0x60, 0x68, 0xf8, 0x39, 0xa7, 0x00, 0x00, 0x0b, 0x6c, 0x80, 0xe9,
+ 0x12, 0x18, 0xff, 0xd2, 0xb5, 0xda, 0x7b, 0xda, 0x2b, 0x22, 0x12, 0x1a, 0x05, 0x7e, 0x68, 0x00,
+ 0x0c, 0x12, 0x19, 0xc4, 0x22, 0xca, 0x59, 0xca, 0x5b, 0x7e, 0xb4, 0x00, 0x0c, 0x7c, 0xb8, 0xc4,
+ 0x12, 0x1a, 0x35, 0x7c, 0xb8, 0x12, 0x1a, 0x35, 0x7c, 0xb9, 0xc4, 0x12, 0x1a, 0x35, 0x7c, 0xb9,
+ 0x12, 0x1a, 0x35, 0x7e, 0xb0, 0x68, 0x7a, 0xb9, 0xb0, 0x0b, 0xb4, 0x6c, 0xbb, 0x7a, 0xb9, 0xb0,
+ 0xda, 0x59, 0xda, 0x5b, 0x22, 0x5e, 0xb0, 0x0f, 0x7c, 0xab, 0x9e, 0xa0, 0x0a, 0x40, 0x05, 0x2e,
+ 0xb0, 0x37, 0x80, 0x03, 0x2e, 0xb0, 0x30, 0x7a, 0xb9, 0xb0, 0x0b, 0xb4, 0x22, 0xc2, 0xb5, 0x75,
+ 0xb0, 0xef, 0x12, 0x18, 0xff, 0x74, 0x80, 0x39, 0xb7, 0x00, 0x0c, 0x7e, 0x54, 0x00, 0x06, 0x39,
+ 0xa7, 0x00, 0x04, 0x39, 0xb7, 0x00, 0x00, 0x74, 0x03, 0x39, 0xb7, 0x00, 0x0c, 0x22, 0x7e, 0x78,
+ 0x00, 0x00, 0x7a, 0x7c, 0x00, 0xff, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0x01, 0x7f, 0x65,
+ 0x7e, 0x74, 0x20, 0x00, 0x12, 0x0b, 0x63, 0x40, 0x58, 0x7e, 0x78, 0x7c, 0x00, 0x7a, 0x7c, 0x00,
+ 0xff, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0x01, 0x7e, 0x68, 0x7c, 0x00, 0x7a, 0x6c, 0x00,
+ 0x01, 0x7e, 0x74, 0x04, 0x00, 0x12, 0x0b, 0x63, 0x40, 0x37, 0x74, 0x80, 0x12, 0x1a, 0xea, 0x40,
+ 0x30, 0x7e, 0x00, 0x03, 0x7a, 0x03, 0x90, 0x00, 0xd2, 0x10, 0x7e, 0x04, 0x00, 0x08, 0x7e, 0x14,
+ 0x00, 0x00, 0x84, 0xa5, 0xdb, 0xfc, 0xa5, 0xda, 0xf9, 0xa5, 0xd9, 0xf6, 0x74, 0x40, 0x12, 0x1a,
+ 0xea, 0x40, 0x0e, 0x7e, 0x68, 0x31, 0x8d, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x02, 0x18,
+ 0xf7, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x80, 0xfe, 0xf5, 0x0b, 0x7e, 0x78, 0x00, 0x0b,
+ 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00, 0x01, 0x7e, 0x74, 0x00, 0x01,
+ 0x02, 0x0b, 0x63,
+
+// Segment #19, EXCLUDED Start Address 00ff2c66, Length 1393
+
+};
+
+static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
+ 2, 0, 3 }; // Major, Minor, Build
+
+#undef IMAGE_VERSION_NAME
+
+#undef IMAGE_ARRAY_NAME
+
diff --git a/drivers/usb/serial/io_fw_down.h b/drivers/usb/serial/io_fw_down.h
new file mode 100644
index 000000000000..5a61d809a46e
--- /dev/null
+++ b/drivers/usb/serial/io_fw_down.h
@@ -0,0 +1,1229 @@
+//**************************************************************
+//* Edgeport/4 Binary Image
+//* Generated by HEX2C v1.06
+//* Copyright (C) 1998 Inside Out Networks, All rights reserved.
+//* 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.
+//**************************************************************
+
+
+//Image structure definition
+#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
+ #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
+ struct edge_firmware_image_record {
+ __le16 ExtAddr;
+ __le16 Addr;
+ __le16 Len;
+ unsigned char Data[0];
+ } __attribute__ ((packed));
+
+ struct edge_firmware_version_info {
+ unsigned char MajorVersion;
+ unsigned char MinorVersion;
+ unsigned short BuildNumber;
+ };
+
+#endif
+
+#if !defined(IMAGE_ARRAY_NAME)
+ #define IMAGE_ARRAY_NAME FirmwareImage
+ #define IMAGE_VERSION_NAME FirmwareImageVersion
+#endif
+
+static unsigned char IMAGE_ARRAY_NAME[] = {
+
+// Segment #1, Start Address 00ff0000, Length 6
+0xff,0x00,0x00,0x00,0x06,0x00,
+ 0x02, 0x00, 0x80, 0x02, 0x44, 0xb0,
+
+// Segment #2, Start Address 00ff000b, Length 3
+0xff,0x00,0x0b,0x00,0x03,0x00,
+ 0x02, 0x44, 0x72,
+
+// Segment #3, Start Address 00ff0013, Length 3
+0xff,0x00,0x13,0x00,0x03,0x00,
+ 0x02, 0x00, 0x13,
+
+// Segment #4, Start Address 00ff001b, Length 3
+0xff,0x00,0x1b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x1b,
+
+// Segment #5, Start Address 00ff0023, Length 3
+0xff,0x00,0x23,0x00,0x03,0x00,
+ 0x02, 0x00, 0x23,
+
+// Segment #6, Start Address 00ff002b, Length 3
+0xff,0x00,0x2b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x2b,
+
+// Segment #7, Start Address 00ff0033, Length 3
+0xff,0x00,0x33,0x00,0x03,0x00,
+ 0x02, 0x00, 0x33,
+
+// Segment #8, Start Address 00ff003b, Length 3
+0xff,0x00,0x3b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x3b,
+
+// Segment #9, Start Address 00ff0043, Length 3
+0xff,0x00,0x43,0x00,0x03,0x00,
+ 0x02, 0x00, 0x43,
+
+// Segment #10, Start Address 00ff004b, Length 3
+0xff,0x00,0x4b,0x00,0x03,0x00,
+ 0x02, 0x6e, 0xc4,
+
+// Segment #11, Start Address 00ff0053, Length 3
+0xff,0x00,0x53,0x00,0x03,0x00,
+ 0x02, 0x75, 0x8d,
+
+// Segment #12, Start Address 00ff007b, Length 3
+0xff,0x00,0x7b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x7b,
+
+// Segment #13, Start Address 00ff0080, Length 7
+0xff,0x00,0x80,0x00,0x07,0x00,
+ 0x7e, 0x14, 0x00, 0x00, 0x02, 0x40, 0x51,
+
+// Segment #14, Start Address 00ff3000, Length 2178
+0xff,0x00,0x00,0x30,0x82,0x08,
+ 0x12, 0x37, 0x28, 0x12, 0x30, 0x3e, 0x12, 0x30, 0x54, 0x12, 0x30, 0xe5, 0x12, 0x31, 0x68, 0x12,
+ 0x35, 0x20, 0x12, 0x38, 0x58, 0x12, 0x31, 0x15, 0x12, 0x31, 0x40, 0x12, 0x30, 0xa0, 0x80, 0xe0,
+ 0xe5, 0x23, 0x60, 0x19, 0x7e, 0x14, 0x00, 0x00, 0x09, 0xb1, 0x01, 0xcf, 0xb4, 0x00, 0x02, 0x80,
+ 0x05, 0x14, 0x19, 0xb1, 0x01, 0xcf, 0xa5, 0x0b, 0xbe, 0x31, 0x2f, 0x78, 0xeb, 0x22, 0xc2, 0xaf,
+ 0x7e, 0xb3, 0x3f, 0xf1, 0xb4, 0x01, 0x0a, 0xc0, 0xf1, 0x75, 0xf1, 0x02, 0x12, 0x70, 0xef, 0xd0,
+ 0xf1, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0xe5, 0x22, 0x60, 0x43, 0x7e, 0x07, 0x01, 0xe1, 0xbe, 0x04,
+ 0x03, 0x80, 0x38, 0x39, 0x7e, 0x04, 0x80, 0x00, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x21, 0x09, 0xa0,
+ 0x00, 0x04, 0x4e, 0xa0, 0x05, 0x19, 0xa0, 0x00, 0x04, 0x0a, 0x32, 0x09, 0x53, 0x67, 0x8e, 0x5e,
+ 0x51, 0x27, 0x68, 0x0b, 0x09, 0xa0, 0x00, 0x10, 0x4e, 0xa0, 0x01, 0x19, 0xa0, 0x00, 0x10, 0x2e,
+ 0x04, 0x01, 0x00, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xd1, 0x75, 0x22, 0x00, 0xd2, 0xaf, 0x22,
+ 0xc2, 0xaf, 0x7e, 0x20, 0x00, 0x7e, 0x30, 0x01, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x32, 0x01,
+ 0x8f, 0xbe, 0x34, 0x00, 0x00, 0x68, 0x12, 0x7e, 0xb1, 0x21, 0xa5, 0x4b, 0x7a, 0xb1, 0x21, 0xca,
+ 0x19, 0x49, 0x22, 0x30, 0xd5, 0x99, 0x24, 0xda, 0x19, 0x3e, 0x30, 0xa5, 0x0a, 0xbe, 0x21, 0x2f,
+ 0x78, 0xd6, 0xd2, 0xaf, 0x22, 0x46, 0x0f, 0x49, 0x67, 0x4c, 0xbf, 0x50, 0x17, 0x53, 0x6f, 0x56,
+ 0xc7, 0x5a, 0x1f, 0x5d, 0x77, 0xc2, 0xaf, 0xe5, 0x32, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50,
+ 0x07, 0xca, 0xb8, 0x12, 0x31, 0x02, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xef, 0xd2,
+ 0xaf, 0x22, 0xca, 0x28, 0x12, 0x67, 0xab, 0xda, 0x28, 0x40, 0x09, 0x0a, 0x22, 0x09, 0xb2, 0x67,
+ 0x8e, 0xf4, 0x52, 0x32, 0x22, 0xc2, 0xaf, 0xe5, 0x34, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50,
+ 0x07, 0xca, 0xb8, 0x12, 0x31, 0x32, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xef, 0xd2,
+ 0xaf, 0x22, 0xca, 0x28, 0x0a, 0x22, 0x09, 0x42, 0x00, 0x3e, 0x12, 0x69, 0xc2, 0xda, 0x28, 0x22,
+ 0xc2, 0xaf, 0xe5, 0x35, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x31,
+ 0x5d, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xef, 0xd2, 0xaf, 0x22, 0xca, 0x28, 0x7e,
+ 0x40, 0x00, 0x12, 0x6c, 0x5b, 0xda, 0x28, 0x22, 0xc2, 0xaf, 0xe5, 0x23, 0x60, 0x14, 0x7e, 0x20,
+ 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x31, 0x85, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f,
+ 0x78, 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x31, 0x90, 0x89, 0x24,
+ 0x31, 0xa0, 0x32, 0x10, 0x32, 0x80, 0x32, 0xf0, 0x33, 0x60, 0x33, 0xd0, 0x34, 0x40, 0x34, 0xb0,
+ 0x7e, 0x27, 0x01, 0x8f, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x49, 0x30, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0x9f, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x9f, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xcf, 0x80,
+ 0x2e, 0x7e, 0x63, 0x01, 0xcf, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e,
+ 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x18, 0x6c,
+ 0x00, 0x7a, 0x03, 0x01, 0xcf, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22,
+ 0x7e, 0x27, 0x01, 0x91, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x81, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x4c, 0x88, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0xa1, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa1, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd0, 0x80,
+ 0x2e, 0x7e, 0x63, 0x01, 0xd0, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e,
+ 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x19, 0x6c,
+ 0x00, 0x7a, 0x03, 0x01, 0xd0, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22,
+ 0x7e, 0x27, 0x01, 0x93, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x82, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x4f, 0xe0, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0xa3, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa3, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd1, 0x80,
+ 0x2e, 0x7e, 0x63, 0x01, 0xd1, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e,
+ 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1a, 0x6c,
+ 0x00, 0x7a, 0x03, 0x01, 0xd1, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22,
+ 0x7e, 0x27, 0x01, 0x95, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x83, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x53, 0x38, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0xa5, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa5, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd2, 0x80,
+ 0x2e, 0x7e, 0x63, 0x01, 0xd2, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e,
+ 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1b, 0x6c,
+ 0x00, 0x7a, 0x03, 0x01, 0xd2, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22,
+ 0x7e, 0x27, 0x01, 0x97, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x84, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x56, 0x90, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0xa7, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa7, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd3, 0x80,
+ 0x2e, 0x7e, 0x63, 0x01, 0xd3, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e,
+ 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1c, 0x6c,
+ 0x00, 0x7a, 0x03, 0x01, 0xd3, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22,
+ 0x7e, 0x27, 0x01, 0x99, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x85, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x59, 0xe8, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0xa9, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa9, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd4, 0x80,
+ 0x2e, 0x7e, 0x63, 0x01, 0xd4, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e,
+ 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1d, 0x6c,
+ 0x00, 0x7a, 0x03, 0x01, 0xd4, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22,
+ 0x7e, 0x27, 0x01, 0x9b, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x86, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x5d, 0x40, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0xab, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xab, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd5, 0x80,
+ 0x2e, 0x7e, 0x63, 0x01, 0xd5, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e,
+ 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1e, 0x6c,
+ 0x00, 0x7a, 0x03, 0x01, 0xd5, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22,
+ 0x7e, 0x27, 0x01, 0x9d, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x87, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x60, 0x98, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0xad, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xad, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd6, 0x80,
+ 0x2e, 0x7e, 0x63, 0x01, 0xd6, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e,
+ 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1f, 0x6c,
+ 0x00, 0x7a, 0x03, 0x01, 0xd6, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22,
+ 0xc2, 0xaf, 0xe5, 0x24, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x35,
+ 0x3d, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23,
+ 0x0a, 0x2b, 0x49, 0x22, 0x35, 0x48, 0x89, 0x24, 0x35, 0x58, 0x35, 0x92, 0x35, 0xcc, 0x36, 0x06,
+ 0x36, 0x40, 0x36, 0x7a, 0x36, 0xb4, 0x36, 0xee, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, 0x14,
+ 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x49, 0x30,
+ 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75,
+ 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x20, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0,
+ 0xf1, 0x22, 0x7e, 0x24, 0x81, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda,
+ 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4c, 0x88, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0,
+ 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2,
+ 0x21, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x82, 0x00,
+ 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d,
+ 0x12, 0x12, 0x4f, 0xe0, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62,
+ 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x22, 0xc0, 0xf1, 0x75, 0xf1, 0x01,
+ 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x83, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8,
+ 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x53, 0x38, 0x7d, 0x21,
+ 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8,
+ 0x12, 0x7c, 0x15, 0xc2, 0x23, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22,
+ 0x7e, 0x24, 0x84, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68,
+ 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x56, 0x90, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e,
+ 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x24, 0xc0,
+ 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x85, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x59, 0xe8, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40,
+ 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x25, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f,
+ 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x86, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0,
+ 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5d, 0x40, 0x7d, 0x21, 0xda, 0x19,
+ 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c,
+ 0x15, 0xc2, 0x26, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24,
+ 0x87, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca,
+ 0x19, 0x7d, 0x12, 0x12, 0x60, 0x98, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90,
+ 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x27, 0xc0, 0xf1, 0x75,
+ 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0xc2, 0xaf, 0xe5, 0x33, 0x60, 0x14, 0x7e, 0x20,
+ 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x37, 0x45, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f,
+ 0x78, 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x37, 0x50, 0x89, 0x24,
+ 0x37, 0x60, 0x37, 0x7f, 0x37, 0x9e, 0x37, 0xbd, 0x37, 0xdc, 0x37, 0xfb, 0x38, 0x1a, 0x38, 0x39,
+ 0x7e, 0x24, 0x80, 0x00, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x48, 0x1b, 0xda, 0x19, 0x10, 0x04, 0x02,
+ 0x80, 0x0c, 0xd2, 0x01, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e,
+ 0x24, 0x81, 0x00, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4b, 0x73, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80,
+ 0x0c, 0xd2, 0x01, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24,
+ 0x82, 0x00, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4e, 0xcb, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c,
+ 0xd2, 0x01, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x83,
+ 0x00, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x52, 0x23, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2,
+ 0x01, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x84, 0x00,
+ 0xca, 0x19, 0x7d, 0x12, 0x12, 0x55, 0x7b, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2, 0x01,
+ 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x85, 0x00, 0xca,
+ 0x19, 0x7d, 0x12, 0x12, 0x58, 0xd3, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2, 0x01, 0xc0,
+ 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x86, 0x00, 0xca, 0x19,
+ 0x7d, 0x12, 0x12, 0x5c, 0x2b, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2, 0x01, 0xc0, 0xf1,
+ 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x87, 0x00, 0xca, 0x19, 0x7d,
+ 0x12, 0x12, 0x5f, 0x83, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2, 0x01, 0xc0, 0xf1, 0x75,
+ 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0xc2, 0xaf, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0xa9,
+ 0x32, 0xf2, 0x1a, 0x7e, 0x07, 0x01, 0xe1, 0xbe, 0x04, 0x00, 0x00, 0x78, 0x10, 0xe5, 0xf5, 0x33,
+ 0x82, 0xe7, 0x40, 0x09, 0x85, 0x31, 0x31, 0x12, 0x7c, 0x15, 0x75, 0xf6, 0x00, 0xd0, 0xf1, 0xd2,
+ 0xaf, 0x22,
+
+// Segment #15, Start Address 00ff4000, Length 15381
+0xff,0x00,0x00,0x40,0x15,0x3c,
+ 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x14, 0x7f, 0xf8, 0x7e, 0x24, 0x00, 0xfe, 0x7d, 0x31, 0x0b, 0x1a,
+ 0x50, 0x1b, 0x0a, 0x50, 0x7e, 0x14, 0x40, 0x1b, 0x02, 0x40, 0x6a, 0x7e, 0xf8, 0x00, 0x6f, 0xd2,
+ 0x04, 0xc2, 0x94, 0xd2, 0x95, 0x7e, 0xf4, 0x40, 0x2c, 0x02, 0x40, 0x7c, 0x12, 0x7d, 0x30, 0xf5,
+ 0x2f, 0x7a, 0xa1, 0x30, 0x7a, 0x11, 0x6e, 0x12, 0x75, 0xca, 0x12, 0x40, 0xdc, 0x7e, 0xb3, 0x3f,
+ 0xf1, 0x60, 0x03, 0x12, 0x43, 0xd4, 0x75, 0xf1, 0x00, 0x12, 0x76, 0x6f, 0xd2, 0xaf, 0x02, 0x30,
+ 0x00, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, 0x40, 0x5f, 0x7a, 0x1c, 0x00, 0x01, 0x89, 0x18, 0xa9,
+ 0x25, 0x87, 0x03, 0xa9, 0xd5, 0x87, 0xd2, 0x93, 0x89, 0x08, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18,
+ 0x40, 0x78, 0x7a, 0x1c, 0x00, 0x01, 0x89, 0x18, 0xc2, 0x93, 0x89, 0x08, 0x7e, 0x08, 0x00, 0x20,
+ 0x7e, 0x44, 0x04, 0x00, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0x8e, 0x02, 0x7c, 0x30, 0x7e, 0x08,
+ 0x01, 0x6f, 0x7e, 0x44, 0x28, 0x7c, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0xa0, 0x02, 0x7c, 0x30,
+ 0x7e, 0x08, 0x00, 0x6f, 0x7e, 0x44, 0x01, 0x00, 0x7e, 0x40, 0x53, 0x7e, 0xe4, 0x40, 0xb2, 0x02,
+ 0x7c, 0x30, 0x75, 0x6d, 0x20, 0x75, 0x6c, 0x30, 0x7e, 0x04, 0x00, 0x08, 0x75, 0x6a, 0x58, 0x75,
+ 0x6b, 0x08, 0x75, 0x67, 0x08, 0x75, 0x69, 0x01, 0x75, 0x89, 0x01, 0x75, 0x8a, 0x01, 0x75, 0x8c,
+ 0x00, 0xd2, 0x8c, 0x7e, 0x04, 0x00, 0x02, 0x7a, 0x05, 0x58, 0x89, 0xf4, 0x75, 0xb7, 0x7f, 0x75,
+ 0xb8, 0x7f, 0x75, 0xb3, 0x07, 0x75, 0xb2, 0x07, 0xd2, 0xa9, 0x22, 0xd2, 0x92, 0xe4, 0xd5, 0xe0,
+ 0xfd, 0xc2, 0x92, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x2f, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00,
+ 0x10, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf2, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x7e, 0x0b, 0x20,
+ 0xbe, 0x21, 0x2f, 0x78, 0xf6, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x74, 0xbf, 0x19, 0xb0,
+ 0x00, 0x0c, 0x74, 0x10, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x80, 0x19, 0xb0, 0x00, 0x0c, 0x7e, 0x54,
+ 0x00, 0x02, 0x19, 0xa0, 0x00, 0x04, 0x19, 0xb0, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb0, 0x00, 0x0c,
+ 0x74, 0x07, 0xa9, 0x20, 0x30, 0x0b, 0xa9, 0x35, 0x30, 0x05, 0xbe, 0x20, 0x01, 0x28, 0x02, 0x74,
+ 0x0f, 0x19, 0xb0, 0x00, 0x04, 0xa9, 0x33, 0x30, 0x18, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x74,
+ 0x28, 0xa9, 0x20, 0x30, 0x02, 0x74, 0x20, 0x19, 0xb0, 0x00, 0x04, 0x74, 0x03, 0x19, 0xb0, 0x00,
+ 0x0c, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x0c, 0x19, 0xb0, 0x00, 0x10, 0x22, 0x7e, 0x04,
+ 0x80, 0x00, 0x4c, 0x02, 0xe4, 0x19, 0xb0, 0x00, 0x04, 0x09, 0xb0, 0x00, 0x10, 0x54, 0x08, 0x19,
+ 0xb0, 0x00, 0x10, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49,
+ 0x22, 0x41, 0xa5, 0x89, 0x24, 0x41, 0xb5, 0x41, 0xd4, 0x41, 0xf3, 0x42, 0x12, 0x42, 0x31, 0x42,
+ 0x50, 0x42, 0x6f, 0x42, 0x8e, 0xc2, 0x10, 0xc2, 0x18, 0xc2, 0x20, 0xc2, 0x08, 0x7e, 0x04, 0x09,
+ 0xe3, 0x7a, 0x07, 0x01, 0x6f, 0x7a, 0x07, 0x01, 0x7f, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x8f, 0x7a,
+ 0x07, 0x01, 0x9f, 0x22, 0xc2, 0x11, 0xc2, 0x19, 0xc2, 0x21, 0xc2, 0x09, 0x7e, 0x04, 0x0d, 0xe3,
+ 0x7a, 0x07, 0x01, 0x71, 0x7a, 0x07, 0x01, 0x81, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x91, 0x7a, 0x07,
+ 0x01, 0xa1, 0x22, 0xc2, 0x12, 0xc2, 0x1a, 0xc2, 0x22, 0xc2, 0x0a, 0x7e, 0x04, 0x11, 0xe3, 0x7a,
+ 0x07, 0x01, 0x73, 0x7a, 0x07, 0x01, 0x83, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x93, 0x7a, 0x07, 0x01,
+ 0xa3, 0x22, 0xc2, 0x13, 0xc2, 0x1b, 0xc2, 0x23, 0xc2, 0x0b, 0x7e, 0x04, 0x15, 0xe3, 0x7a, 0x07,
+ 0x01, 0x75, 0x7a, 0x07, 0x01, 0x85, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x95, 0x7a, 0x07, 0x01, 0xa5,
+ 0x22, 0xc2, 0x14, 0xc2, 0x1c, 0xc2, 0x24, 0xc2, 0x0c, 0x7e, 0x04, 0x19, 0xe3, 0x7a, 0x07, 0x01,
+ 0x77, 0x7a, 0x07, 0x01, 0x87, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x97, 0x7a, 0x07, 0x01, 0xa7, 0x22,
+ 0xc2, 0x15, 0xc2, 0x1d, 0xc2, 0x25, 0xc2, 0x0d, 0x7e, 0x04, 0x1d, 0xe3, 0x7a, 0x07, 0x01, 0x79,
+ 0x7a, 0x07, 0x01, 0x89, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x99, 0x7a, 0x07, 0x01, 0xa9, 0x22, 0xc2,
+ 0x16, 0xc2, 0x1e, 0xc2, 0x26, 0xc2, 0x0e, 0x7e, 0x04, 0x21, 0xe3, 0x7a, 0x07, 0x01, 0x7b, 0x7a,
+ 0x07, 0x01, 0x8b, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x9b, 0x7a, 0x07, 0x01, 0xab, 0x22, 0xc2, 0x17,
+ 0xc2, 0x1f, 0xc2, 0x27, 0xc2, 0x0f, 0x7e, 0x04, 0x25, 0xe3, 0x7a, 0x07, 0x01, 0x7d, 0x7a, 0x07,
+ 0x01, 0x8d, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x9d, 0x7a, 0x07, 0x01, 0xad, 0x22, 0x7c, 0xb2, 0x23,
+ 0x0a, 0x2b, 0x49, 0x22, 0x42, 0xb8, 0x89, 0x24, 0x42, 0xc8, 0x42, 0xe9, 0x43, 0x0a, 0x43, 0x2b,
+ 0x43, 0x4c, 0x43, 0x6d, 0x43, 0x8e, 0x43, 0xaf, 0x30, 0x50, 0x07, 0x20, 0x68, 0x04, 0xc2, 0x28,
+ 0x80, 0x16, 0x30, 0x40, 0x07, 0x20, 0x60, 0x04, 0xc2, 0x28, 0x80, 0x0c, 0x30, 0x48, 0x07, 0x20,
+ 0x58, 0x04, 0xc2, 0x28, 0x80, 0x02, 0xd2, 0x28, 0x22, 0x30, 0x51, 0x07, 0x20, 0x69, 0x04, 0xc2,
+ 0x29, 0x80, 0x16, 0x30, 0x41, 0x07, 0x20, 0x61, 0x04, 0xc2, 0x29, 0x80, 0x0c, 0x30, 0x49, 0x07,
+ 0x20, 0x59, 0x04, 0xc2, 0x29, 0x80, 0x02, 0xd2, 0x29, 0x22, 0x30, 0x52, 0x07, 0x20, 0x6a, 0x04,
+ 0xc2, 0x2a, 0x80, 0x16, 0x30, 0x42, 0x07, 0x20, 0x62, 0x04, 0xc2, 0x2a, 0x80, 0x0c, 0x30, 0x4a,
+ 0x07, 0x20, 0x5a, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2, 0x2a, 0x22, 0x30, 0x53, 0x07, 0x20, 0x6b,
+ 0x04, 0xc2, 0x2b, 0x80, 0x16, 0x30, 0x43, 0x07, 0x20, 0x63, 0x04, 0xc2, 0x2b, 0x80, 0x0c, 0x30,
+ 0x4b, 0x07, 0x20, 0x5b, 0x04, 0xc2, 0x2b, 0x80, 0x02, 0xd2, 0x2b, 0x22, 0x30, 0x54, 0x07, 0x20,
+ 0x6c, 0x04, 0xc2, 0x2c, 0x80, 0x16, 0x30, 0x44, 0x07, 0x20, 0x64, 0x04, 0xc2, 0x2c, 0x80, 0x0c,
+ 0x30, 0x4c, 0x07, 0x20, 0x5c, 0x04, 0xc2, 0x2c, 0x80, 0x02, 0xd2, 0x2c, 0x22, 0x30, 0x55, 0x07,
+ 0x20, 0x6d, 0x04, 0xc2, 0x2d, 0x80, 0x16, 0x30, 0x45, 0x07, 0x20, 0x65, 0x04, 0xc2, 0x2d, 0x80,
+ 0x0c, 0x30, 0x4d, 0x07, 0x20, 0x5d, 0x04, 0xc2, 0x2d, 0x80, 0x02, 0xd2, 0x2d, 0x22, 0x30, 0x56,
+ 0x07, 0x20, 0x6e, 0x04, 0xc2, 0x2e, 0x80, 0x16, 0x30, 0x46, 0x07, 0x20, 0x66, 0x04, 0xc2, 0x2e,
+ 0x80, 0x0c, 0x30, 0x4e, 0x07, 0x20, 0x5e, 0x04, 0xc2, 0x2e, 0x80, 0x02, 0xd2, 0x2e, 0x22, 0x30,
+ 0x57, 0x07, 0x20, 0x6f, 0x04, 0xc2, 0x2f, 0x80, 0x16, 0x30, 0x47, 0x07, 0x20, 0x67, 0x04, 0xc2,
+ 0x2f, 0x80, 0x0c, 0x30, 0x4f, 0x07, 0x20, 0x5f, 0x04, 0xc2, 0x2f, 0x80, 0x02, 0xd2, 0x2f, 0x22,
+ 0x44, 0x38, 0x43, 0xe5, 0xbe, 0xb0, 0x02, 0x40, 0x01, 0x22, 0x23, 0x0a, 0x5b, 0x49, 0x55, 0x43,
+ 0xd0, 0x99, 0x54, 0xd3, 0x22, 0xa9, 0xc5, 0x87, 0x12, 0x44, 0x43, 0x7e, 0x04, 0x05, 0xe3, 0x7a,
+ 0x07, 0x01, 0xd7, 0x7a, 0x07, 0x01, 0xd9, 0x7e, 0x04, 0x01, 0xe3, 0x7a, 0x07, 0x01, 0xdd, 0x7a,
+ 0x07, 0x01, 0xdf, 0x7e, 0x04, 0x74, 0xad, 0x7a, 0x05, 0x61, 0x75, 0xf1, 0x01, 0x75, 0xe1, 0x1f,
+ 0x75, 0xe4, 0x04, 0x75, 0xf4, 0x04, 0x75, 0xf1, 0x02, 0x75, 0xe1, 0x03, 0x75, 0xe4, 0x04, 0x75,
+ 0xf4, 0x04, 0x43, 0xa2, 0x1c, 0x12, 0x40, 0xeb, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x9a, 0x0b, 0x20,
+ 0xbe, 0x21, 0x2f, 0x78, 0xf6, 0xd2, 0xa8, 0x22, 0xa9, 0xd5, 0x87, 0x12, 0x44, 0x43, 0xd2, 0x92,
+ 0xc2, 0xa8, 0x22, 0x75, 0xa3, 0x00, 0x53, 0xa2, 0x03, 0x75, 0xc1, 0x00, 0x53, 0xc0, 0x03, 0x7e,
+ 0x00, 0x05, 0x7a, 0x01, 0xf1, 0x43, 0xf4, 0x80, 0x43, 0xe4, 0x80, 0xe5, 0xf2, 0x54, 0x7f, 0x44,
+ 0x08, 0xf5, 0xf2, 0xe5, 0xe2, 0x54, 0x7f, 0x44, 0x08, 0xf5, 0xe2, 0x75, 0xe1, 0x10, 0xa5, 0xd8,
+ 0xe1, 0x22, 0xca, 0x09, 0x12, 0x30, 0x20, 0x10, 0x01, 0x12, 0xd5, 0x67, 0x1e, 0x63, 0x69, 0x01,
+ 0x7e, 0x00, 0x6a, 0x2e, 0x01, 0x69, 0xa5, 0xe6, 0xf5, 0x67, 0x80, 0x12, 0x20, 0x02, 0x1e, 0x75,
+ 0x69, 0x00, 0x85, 0x6a, 0x67, 0xd2, 0x02, 0x74, 0x00, 0x80, 0x0d, 0x30, 0x02, 0x0f, 0xc2, 0x02,
+ 0x7e, 0x00, 0x6c, 0x2e, 0x01, 0x69, 0xa5, 0xe6, 0x53, 0x90, 0xcf, 0x42, 0x90, 0xda, 0x09, 0x32,
+ 0xc0, 0xd0, 0xc0, 0xd1, 0xc0, 0xe0, 0xc0, 0xf0, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xd2, 0x01,
+ 0x75, 0x31, 0x89, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x80, 0x00, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0,
+ 0x03, 0x02, 0x45, 0x4f, 0x20, 0x78, 0x5a, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03,
+ 0x02, 0x45, 0x67, 0x20, 0x79, 0x4b, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02,
+ 0x45, 0x7f, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x45, 0x97, 0x20, 0x7a,
+ 0x30, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x45, 0xaf, 0xa5, 0x0a, 0x09,
+ 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x45, 0xc7, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20,
+ 0xe0, 0x03, 0x02, 0x45, 0xdf, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x45,
+ 0xf7, 0x30, 0x04, 0x0c, 0xc2, 0x04, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1,
+ 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0xd0, 0xf0, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, 0x32, 0x75,
+ 0x31, 0x80, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63,
+ 0x2b, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, 0x31, 0x81, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a,
+ 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0x6b, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75,
+ 0x31, 0x82, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63,
+ 0xab, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, 0x31, 0x83, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a,
+ 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0xeb, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75,
+ 0x31, 0x84, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x64,
+ 0x2b, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, 0x31, 0x85, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a,
+ 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x64, 0x6b, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75,
+ 0x31, 0x86, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x64,
+ 0xab, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, 0x31, 0x87, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a,
+ 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x64, 0xeb, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x10,
+ 0x08, 0x01, 0x22, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x75, 0x31, 0xa0, 0x12, 0x7c, 0x15, 0x7e,
+ 0x14, 0x80, 0x00, 0x80, 0x06, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca,
+ 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x49, 0x30, 0x20, 0xe6, 0x03, 0xd2, 0x08,
+ 0x22, 0x30, 0x30, 0x49, 0xd2, 0x70, 0x7e, 0x37, 0x01, 0x8f, 0x7e, 0x27, 0x01, 0xaf, 0x9d, 0x32,
+ 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x48, 0x7a, 0x05, 0x48, 0x7a, 0x37, 0x01, 0x8f, 0x7e, 0x37,
+ 0x01, 0x6f, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x6f,
+ 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10,
+ 0x70, 0xc4, 0x22, 0xc2, 0x70, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01,
+ 0x8f, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xaf, 0x28, 0x04, 0x7e, 0x27, 0x01,
+ 0xaf, 0x7e, 0x37, 0x01, 0x8f, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x48, 0x7a, 0x05, 0x48, 0x7a,
+ 0x37, 0x01, 0x8f, 0x7e, 0x37, 0x01, 0x6f, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xe2, 0x38,
+ 0x13, 0x7a, 0x47, 0x01, 0x6f, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c,
+ 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15,
+ 0x9e, 0x44, 0x0d, 0xe3, 0x9d, 0x24, 0x12, 0x65, 0x2b, 0x7e, 0x34, 0x09, 0xe3, 0x7d, 0x24, 0x2d,
+ 0x43, 0x7a, 0x47, 0x01, 0x6f, 0x12, 0x65, 0x2b, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x46, 0x7f,
+ 0x22, 0xd2, 0x08, 0x7e, 0x04, 0x09, 0xe3, 0x7a, 0x07, 0x01, 0x6f, 0x7a, 0x07, 0x01, 0x7f, 0x75,
+ 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12,
+ 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70,
+ 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xbf, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34,
+ 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1,
+ 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47,
+ 0x01, 0xdf, 0x7e, 0x24, 0x00, 0x00, 0x2e, 0x27, 0x01, 0xbf, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a,
+ 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb,
+ 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04,
+ 0x30, 0x38, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22,
+ 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64,
+ 0x00, 0x00, 0x2e, 0x67, 0x01, 0xbf, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b,
+ 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf,
+ 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b,
+ 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x00, 0x7a, 0x69,
+ 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12,
+ 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43,
+ 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20,
+ 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e,
+ 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d,
+ 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd,
+ 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd,
+ 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4,
+ 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7,
+ 0x02, 0x47, 0xe3, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19,
+ 0xb1, 0x00, 0x04, 0x30, 0x38, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10,
+ 0xd2, 0x10, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x47,
+ 0xe3, 0xda, 0xb8, 0x02, 0x49, 0x30, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90,
+ 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09,
+ 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c,
+ 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2,
+ 0x68, 0x80, 0x02, 0xc2, 0x68, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x60, 0x80, 0x02,
+ 0xc2, 0x60, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, 0x12,
+ 0x42, 0xc8, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a,
+ 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93,
+ 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c,
+ 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1,
+ 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x48, 0x35, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22,
+ 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, 0x09, 0x01, 0x22, 0x20, 0x29, 0x03, 0xd2, 0x09,
+ 0x22, 0x75, 0x31, 0xa1, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x81, 0x00, 0x80, 0x06, 0x20, 0x29, 0x03,
+ 0xd2, 0x09, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03,
+ 0x12, 0x4c, 0x88, 0x20, 0xe6, 0x03, 0xd2, 0x09, 0x22, 0x30, 0x31, 0x49, 0xd2, 0x71, 0x7e, 0x37,
+ 0x01, 0x91, 0x7e, 0x27, 0x01, 0xb1, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x4a, 0x7a,
+ 0x05, 0x4a, 0x7a, 0x37, 0x01, 0x91, 0x7e, 0x37, 0x01, 0x71, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44,
+ 0x11, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x71, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51,
+ 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, 0x71, 0xc4, 0x22, 0xc2, 0x71, 0x2d, 0x23, 0x68,
+ 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x91, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe,
+ 0x27, 0x01, 0xb1, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xb1, 0x7e, 0x37, 0x01, 0x91, 0x9d, 0x32, 0x7d,
+ 0x02, 0x2e, 0x05, 0x4a, 0x7a, 0x05, 0x4a, 0x7a, 0x37, 0x01, 0x91, 0x7e, 0x37, 0x01, 0x71, 0x7d,
+ 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x11, 0xe2, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x71, 0x75, 0x31, 0x94,
+ 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12,
+ 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x11, 0xe3, 0x9d, 0x24, 0x12, 0x65,
+ 0x2b, 0x7e, 0x34, 0x0d, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x71, 0x12, 0x65, 0x2b,
+ 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x49, 0xd7, 0x22, 0xd2, 0x09, 0x7e, 0x04, 0x0d, 0xe3, 0x7a,
+ 0x07, 0x01, 0x71, 0x7a, 0x07, 0x01, 0x81, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00,
+ 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14,
+ 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc1,
+ 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05,
+ 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42,
+ 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xdf, 0x7e, 0x24, 0x01, 0x00, 0x2e, 0x27,
+ 0x01, 0xc1, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38,
+ 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1,
+ 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54,
+ 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, 0x22, 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15,
+ 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, 0x01, 0x00, 0x2e, 0x67, 0x01, 0xc1, 0x9e, 0x24,
+ 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3,
+ 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34,
+ 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54,
+ 0x0f, 0x23, 0x23, 0x23, 0x44, 0x01, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31,
+ 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07,
+ 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a,
+ 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80,
+ 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e,
+ 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e,
+ 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd,
+ 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09,
+ 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a,
+ 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x4b, 0x3b, 0x75, 0x31, 0x99, 0x12, 0x7c,
+ 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1,
+ 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8,
+ 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x4b, 0x3b, 0xda, 0xb8, 0x02, 0x4c, 0x88, 0x09, 0xb1,
+ 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15,
+ 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0,
+ 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x69, 0x80, 0x02, 0xc2, 0x69, 0xa5, 0xfd, 0x5e,
+ 0x50, 0x20, 0x68, 0x04, 0xd2, 0x61, 0x80, 0x02, 0xc2, 0x61, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68,
+ 0x04, 0xd2, 0x59, 0x80, 0x02, 0xc2, 0x59, 0x12, 0x42, 0xe9, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91,
+ 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08,
+ 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80,
+ 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09,
+ 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4b,
+ 0x8d, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10,
+ 0x0a, 0x01, 0x22, 0x20, 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x75, 0x31, 0xa2, 0x12, 0x7c, 0x15, 0x7e,
+ 0x14, 0x82, 0x00, 0x80, 0x06, 0x20, 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca,
+ 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x4f, 0xe0, 0x20, 0xe6, 0x03, 0xd2, 0x0a,
+ 0x22, 0x30, 0x32, 0x49, 0xd2, 0x72, 0x7e, 0x37, 0x01, 0x93, 0x7e, 0x27, 0x01, 0xb3, 0x9d, 0x32,
+ 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x4c, 0x7a, 0x05, 0x4c, 0x7a, 0x37, 0x01, 0x93, 0x7e, 0x37,
+ 0x01, 0x73, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x15, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x73,
+ 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10,
+ 0x72, 0xc4, 0x22, 0xc2, 0x72, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01,
+ 0x93, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xb3, 0x28, 0x04, 0x7e, 0x27, 0x01,
+ 0xb3, 0x7e, 0x37, 0x01, 0x93, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x4c, 0x7a, 0x05, 0x4c, 0x7a,
+ 0x37, 0x01, 0x93, 0x7e, 0x37, 0x01, 0x73, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x15, 0xe2, 0x38,
+ 0x13, 0x7a, 0x47, 0x01, 0x73, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c,
+ 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15,
+ 0x9e, 0x44, 0x15, 0xe3, 0x9d, 0x24, 0x12, 0x65, 0x2b, 0x7e, 0x34, 0x11, 0xe3, 0x7d, 0x24, 0x2d,
+ 0x43, 0x7a, 0x47, 0x01, 0x73, 0x12, 0x65, 0x2b, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x4d, 0x2f,
+ 0x22, 0xd2, 0x0a, 0x7e, 0x04, 0x11, 0xe3, 0x7a, 0x07, 0x01, 0x73, 0x7a, 0x07, 0x01, 0x83, 0x75,
+ 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12,
+ 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70,
+ 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc3, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34,
+ 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1,
+ 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47,
+ 0x01, 0xdf, 0x7e, 0x24, 0x02, 0x00, 0x2e, 0x27, 0x01, 0xc3, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a,
+ 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb,
+ 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04,
+ 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x12, 0x22,
+ 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64,
+ 0x02, 0x00, 0x2e, 0x67, 0x01, 0xc3, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b,
+ 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf,
+ 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b,
+ 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x02, 0x7a, 0x69,
+ 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12,
+ 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43,
+ 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20,
+ 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e,
+ 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d,
+ 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd,
+ 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd,
+ 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4,
+ 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7,
+ 0x02, 0x4e, 0x93, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19,
+ 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10,
+ 0xd2, 0x12, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x4e,
+ 0x93, 0xda, 0xb8, 0x02, 0x4f, 0xe0, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90,
+ 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09,
+ 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c,
+ 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2,
+ 0x6a, 0x80, 0x02, 0xc2, 0x6a, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x62, 0x80, 0x02,
+ 0xc2, 0x62, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, 0xc2, 0x5a, 0x12,
+ 0x43, 0x0a, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a,
+ 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93,
+ 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c,
+ 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1,
+ 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4e, 0xe5, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22,
+ 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, 0x0b, 0x01, 0x22, 0x20, 0x2b, 0x03, 0xd2, 0x0b,
+ 0x22, 0x75, 0x31, 0xa3, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x83, 0x00, 0x80, 0x06, 0x20, 0x2b, 0x03,
+ 0xd2, 0x0b, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03,
+ 0x12, 0x53, 0x38, 0x20, 0xe6, 0x03, 0xd2, 0x0b, 0x22, 0x30, 0x33, 0x49, 0xd2, 0x73, 0x7e, 0x37,
+ 0x01, 0x95, 0x7e, 0x27, 0x01, 0xb5, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x4e, 0x7a,
+ 0x05, 0x4e, 0x7a, 0x37, 0x01, 0x95, 0x7e, 0x37, 0x01, 0x75, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44,
+ 0x19, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x75, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51,
+ 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, 0x73, 0xc4, 0x22, 0xc2, 0x73, 0x2d, 0x23, 0x68,
+ 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x95, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe,
+ 0x27, 0x01, 0xb5, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xb5, 0x7e, 0x37, 0x01, 0x95, 0x9d, 0x32, 0x7d,
+ 0x02, 0x2e, 0x05, 0x4e, 0x7a, 0x05, 0x4e, 0x7a, 0x37, 0x01, 0x95, 0x7e, 0x37, 0x01, 0x75, 0x7d,
+ 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x19, 0xe2, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x75, 0x75, 0x31, 0x94,
+ 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12,
+ 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x19, 0xe3, 0x9d, 0x24, 0x12, 0x65,
+ 0x2b, 0x7e, 0x34, 0x15, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x75, 0x12, 0x65, 0x2b,
+ 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x50, 0x87, 0x22, 0xd2, 0x0b, 0x7e, 0x04, 0x15, 0xe3, 0x7a,
+ 0x07, 0x01, 0x75, 0x7a, 0x07, 0x01, 0x85, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00,
+ 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14,
+ 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc5,
+ 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05,
+ 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42,
+ 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xdf, 0x7e, 0x24, 0x03, 0x00, 0x2e, 0x27,
+ 0x01, 0xc5, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38,
+ 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1,
+ 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54,
+ 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x13, 0x22, 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15,
+ 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, 0x03, 0x00, 0x2e, 0x67, 0x01, 0xc5, 0x9e, 0x24,
+ 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3,
+ 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34,
+ 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54,
+ 0x0f, 0x23, 0x23, 0x23, 0x44, 0x03, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31,
+ 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07,
+ 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a,
+ 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80,
+ 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e,
+ 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e,
+ 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd,
+ 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09,
+ 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a,
+ 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x51, 0xeb, 0x75, 0x31, 0x99, 0x12, 0x7c,
+ 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1,
+ 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x13, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8,
+ 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x51, 0xeb, 0xda, 0xb8, 0x02, 0x53, 0x38, 0x09, 0xb1,
+ 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15,
+ 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0,
+ 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6b, 0x80, 0x02, 0xc2, 0x6b, 0xa5, 0xfd, 0x5e,
+ 0x50, 0x20, 0x68, 0x04, 0xd2, 0x63, 0x80, 0x02, 0xc2, 0x63, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68,
+ 0x04, 0xd2, 0x5b, 0x80, 0x02, 0xc2, 0x5b, 0x12, 0x43, 0x2b, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91,
+ 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08,
+ 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80,
+ 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09,
+ 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x52,
+ 0x3d, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10,
+ 0x0c, 0x01, 0x22, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x75, 0x31, 0xa4, 0x12, 0x7c, 0x15, 0x7e,
+ 0x14, 0x84, 0x00, 0x80, 0x06, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca,
+ 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x56, 0x90, 0x20, 0xe6, 0x03, 0xd2, 0x0c,
+ 0x22, 0x30, 0x34, 0x49, 0xd2, 0x74, 0x7e, 0x37, 0x01, 0x97, 0x7e, 0x27, 0x01, 0xb7, 0x9d, 0x32,
+ 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x50, 0x7a, 0x05, 0x50, 0x7a, 0x37, 0x01, 0x97, 0x7e, 0x37,
+ 0x01, 0x77, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x77,
+ 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10,
+ 0x74, 0xc4, 0x22, 0xc2, 0x74, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01,
+ 0x97, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xb7, 0x28, 0x04, 0x7e, 0x27, 0x01,
+ 0xb7, 0x7e, 0x37, 0x01, 0x97, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x50, 0x7a, 0x05, 0x50, 0x7a,
+ 0x37, 0x01, 0x97, 0x7e, 0x37, 0x01, 0x77, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xe2, 0x38,
+ 0x13, 0x7a, 0x47, 0x01, 0x77, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c,
+ 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15,
+ 0x9e, 0x44, 0x1d, 0xe3, 0x9d, 0x24, 0x12, 0x65, 0x2b, 0x7e, 0x34, 0x19, 0xe3, 0x7d, 0x24, 0x2d,
+ 0x43, 0x7a, 0x47, 0x01, 0x77, 0x12, 0x65, 0x2b, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x53, 0xdf,
+ 0x22, 0xd2, 0x0c, 0x7e, 0x04, 0x19, 0xe3, 0x7a, 0x07, 0x01, 0x77, 0x7a, 0x07, 0x01, 0x87, 0x75,
+ 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12,
+ 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70,
+ 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc7, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34,
+ 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1,
+ 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47,
+ 0x01, 0xdf, 0x7e, 0x24, 0x04, 0x00, 0x2e, 0x27, 0x01, 0xc7, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a,
+ 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb,
+ 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04,
+ 0x30, 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x14, 0x22,
+ 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64,
+ 0x04, 0x00, 0x2e, 0x67, 0x01, 0xc7, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b,
+ 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf,
+ 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b,
+ 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x04, 0x7a, 0x69,
+ 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12,
+ 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43,
+ 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20,
+ 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e,
+ 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d,
+ 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd,
+ 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd,
+ 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4,
+ 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7,
+ 0x02, 0x55, 0x43, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19,
+ 0xb1, 0x00, 0x04, 0x30, 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10,
+ 0xd2, 0x14, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x55,
+ 0x43, 0xda, 0xb8, 0x02, 0x56, 0x90, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90,
+ 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09,
+ 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c,
+ 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2,
+ 0x6c, 0x80, 0x02, 0xc2, 0x6c, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x64, 0x80, 0x02,
+ 0xc2, 0x64, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0x12,
+ 0x43, 0x4c, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a,
+ 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93,
+ 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c,
+ 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1,
+ 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x55, 0x95, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22,
+ 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, 0x0d, 0x01, 0x22, 0x20, 0x2d, 0x03, 0xd2, 0x0d,
+ 0x22, 0x75, 0x31, 0xa5, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x85, 0x00, 0x80, 0x06, 0x20, 0x2d, 0x03,
+ 0xd2, 0x0d, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03,
+ 0x12, 0x59, 0xe8, 0x20, 0xe6, 0x03, 0xd2, 0x0d, 0x22, 0x30, 0x35, 0x49, 0xd2, 0x75, 0x7e, 0x37,
+ 0x01, 0x99, 0x7e, 0x27, 0x01, 0xb9, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x52, 0x7a,
+ 0x05, 0x52, 0x7a, 0x37, 0x01, 0x99, 0x7e, 0x37, 0x01, 0x79, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44,
+ 0x21, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x79, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51,
+ 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, 0x75, 0xc4, 0x22, 0xc2, 0x75, 0x2d, 0x23, 0x68,
+ 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x99, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe,
+ 0x27, 0x01, 0xb9, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xb9, 0x7e, 0x37, 0x01, 0x99, 0x9d, 0x32, 0x7d,
+ 0x02, 0x2e, 0x05, 0x52, 0x7a, 0x05, 0x52, 0x7a, 0x37, 0x01, 0x99, 0x7e, 0x37, 0x01, 0x79, 0x7d,
+ 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x21, 0xe2, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x79, 0x75, 0x31, 0x94,
+ 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12,
+ 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x21, 0xe3, 0x9d, 0x24, 0x12, 0x65,
+ 0x2b, 0x7e, 0x34, 0x1d, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x79, 0x12, 0x65, 0x2b,
+ 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x57, 0x37, 0x22, 0xd2, 0x0d, 0x7e, 0x04, 0x1d, 0xe3, 0x7a,
+ 0x07, 0x01, 0x79, 0x7a, 0x07, 0x01, 0x89, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00,
+ 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14,
+ 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc9,
+ 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05,
+ 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42,
+ 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xdf, 0x7e, 0x24, 0x05, 0x00, 0x2e, 0x27,
+ 0x01, 0xc9, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38,
+ 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1,
+ 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54,
+ 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15,
+ 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, 0x05, 0x00, 0x2e, 0x67, 0x01, 0xc9, 0x9e, 0x24,
+ 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3,
+ 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34,
+ 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54,
+ 0x0f, 0x23, 0x23, 0x23, 0x44, 0x05, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31,
+ 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07,
+ 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a,
+ 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80,
+ 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e,
+ 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e,
+ 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd,
+ 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09,
+ 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a,
+ 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x58, 0x9b, 0x75, 0x31, 0x99, 0x12, 0x7c,
+ 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09, 0xb1,
+ 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8,
+ 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x58, 0x9b, 0xda, 0xb8, 0x02, 0x59, 0xe8, 0x09, 0xb1,
+ 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15,
+ 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0,
+ 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6d, 0x80, 0x02, 0xc2, 0x6d, 0xa5, 0xfd, 0x5e,
+ 0x50, 0x20, 0x68, 0x04, 0xd2, 0x65, 0x80, 0x02, 0xc2, 0x65, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68,
+ 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0x12, 0x43, 0x6d, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91,
+ 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08,
+ 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80,
+ 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09,
+ 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x58,
+ 0xed, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10,
+ 0x0e, 0x01, 0x22, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x75, 0x31, 0xa6, 0x12, 0x7c, 0x15, 0x7e,
+ 0x14, 0x86, 0x00, 0x80, 0x06, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca,
+ 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5d, 0x40, 0x20, 0xe6, 0x03, 0xd2, 0x0e,
+ 0x22, 0x30, 0x36, 0x49, 0xd2, 0x76, 0x7e, 0x37, 0x01, 0x9b, 0x7e, 0x27, 0x01, 0xbb, 0x9d, 0x32,
+ 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x54, 0x7a, 0x05, 0x54, 0x7a, 0x37, 0x01, 0x9b, 0x7e, 0x37,
+ 0x01, 0x7b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x25, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x7b,
+ 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10,
+ 0x76, 0xc4, 0x22, 0xc2, 0x76, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01,
+ 0x9b, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xbb, 0x28, 0x04, 0x7e, 0x27, 0x01,
+ 0xbb, 0x7e, 0x37, 0x01, 0x9b, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x54, 0x7a, 0x05, 0x54, 0x7a,
+ 0x37, 0x01, 0x9b, 0x7e, 0x37, 0x01, 0x7b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x25, 0xe2, 0x38,
+ 0x13, 0x7a, 0x47, 0x01, 0x7b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c,
+ 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15,
+ 0x9e, 0x44, 0x25, 0xe3, 0x9d, 0x24, 0x12, 0x65, 0x2b, 0x7e, 0x34, 0x21, 0xe3, 0x7d, 0x24, 0x2d,
+ 0x43, 0x7a, 0x47, 0x01, 0x7b, 0x12, 0x65, 0x2b, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5a, 0x8f,
+ 0x22, 0xd2, 0x0e, 0x7e, 0x04, 0x21, 0xe3, 0x7a, 0x07, 0x01, 0x7b, 0x7a, 0x07, 0x01, 0x8b, 0x75,
+ 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12,
+ 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70,
+ 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xcb, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34,
+ 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1,
+ 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47,
+ 0x01, 0xdf, 0x7e, 0x24, 0x06, 0x00, 0x2e, 0x27, 0x01, 0xcb, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a,
+ 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb,
+ 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04,
+ 0x30, 0x3e, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22,
+ 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64,
+ 0x06, 0x00, 0x2e, 0x67, 0x01, 0xcb, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b,
+ 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf,
+ 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b,
+ 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x06, 0x7a, 0x69,
+ 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12,
+ 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43,
+ 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20,
+ 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e,
+ 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d,
+ 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd,
+ 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd,
+ 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4,
+ 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7,
+ 0x02, 0x5b, 0xf3, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19,
+ 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10,
+ 0xd2, 0x16, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5b,
+ 0xf3, 0xda, 0xb8, 0x02, 0x5d, 0x40, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90,
+ 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09,
+ 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c,
+ 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2,
+ 0x6e, 0x80, 0x02, 0xc2, 0x6e, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x66, 0x80, 0x02,
+ 0xc2, 0x66, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0x12,
+ 0x43, 0x8e, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a,
+ 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93,
+ 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c,
+ 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1,
+ 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5c, 0x45, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22,
+ 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, 0x0f, 0x01, 0x22, 0x20, 0x2f, 0x03, 0xd2, 0x0f,
+ 0x22, 0x75, 0x31, 0xa7, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x87, 0x00, 0x80, 0x06, 0x20, 0x2f, 0x03,
+ 0xd2, 0x0f, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03,
+ 0x12, 0x60, 0x98, 0x20, 0xe6, 0x03, 0xd2, 0x0f, 0x22, 0x30, 0x37, 0x49, 0xd2, 0x77, 0x7e, 0x37,
+ 0x01, 0x9d, 0x7e, 0x27, 0x01, 0xbd, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x56, 0x7a,
+ 0x05, 0x56, 0x7a, 0x37, 0x01, 0x9d, 0x7e, 0x37, 0x01, 0x7d, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44,
+ 0x29, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x7d, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51,
+ 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, 0x77, 0xc4, 0x22, 0xc2, 0x77, 0x2d, 0x23, 0x68,
+ 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x9d, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe,
+ 0x27, 0x01, 0xbd, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xbd, 0x7e, 0x37, 0x01, 0x9d, 0x9d, 0x32, 0x7d,
+ 0x02, 0x2e, 0x05, 0x56, 0x7a, 0x05, 0x56, 0x7a, 0x37, 0x01, 0x9d, 0x7e, 0x37, 0x01, 0x7d, 0x7d,
+ 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x29, 0xe2, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x7d, 0x75, 0x31, 0x94,
+ 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12,
+ 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x29, 0xe3, 0x9d, 0x24, 0x12, 0x65,
+ 0x2b, 0x7e, 0x34, 0x25, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x7d, 0x12, 0x65, 0x2b,
+ 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5d, 0xe7, 0x22, 0xd2, 0x0f, 0x7e, 0x04, 0x25, 0xe3, 0x7a,
+ 0x07, 0x01, 0x7d, 0x7a, 0x07, 0x01, 0x8d, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00,
+ 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14,
+ 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xcd,
+ 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05,
+ 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42,
+ 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xdf, 0x7e, 0x24, 0x07, 0x00, 0x2e, 0x27,
+ 0x01, 0xcd, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38,
+ 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1,
+ 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54,
+ 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15,
+ 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, 0x07, 0x00, 0x2e, 0x67, 0x01, 0xcd, 0x9e, 0x24,
+ 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3,
+ 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34,
+ 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54,
+ 0x0f, 0x23, 0x23, 0x23, 0x44, 0x07, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31,
+ 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07,
+ 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a,
+ 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80,
+ 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e,
+ 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e,
+ 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd,
+ 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09,
+ 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a,
+ 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5f, 0x4b, 0x75, 0x31, 0x99, 0x12, 0x7c,
+ 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1,
+ 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8,
+ 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5f, 0x4b, 0xda, 0xb8, 0x02, 0x60, 0x98, 0x09, 0xb1,
+ 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15,
+ 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0,
+ 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6f, 0x80, 0x02, 0xc2, 0x6f, 0xa5, 0xfd, 0x5e,
+ 0x50, 0x20, 0x68, 0x04, 0xd2, 0x67, 0x80, 0x02, 0xc2, 0x67, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68,
+ 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0x12, 0x43, 0xaf, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91,
+ 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08,
+ 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80,
+ 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09,
+ 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5f,
+ 0x9d, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x7c,
+ 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10,
+ 0x68, 0x04, 0xd2, 0x68, 0x80, 0x02, 0xc2, 0x68, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2,
+ 0x60, 0x80, 0x02, 0xc2, 0x60, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02,
+ 0xc2, 0x58, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00,
+ 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x69, 0x80, 0x02, 0xc2, 0x69, 0xa5, 0xfd,
+ 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x61, 0x80, 0x02, 0xc2, 0x61, 0xa5, 0xfd, 0x5e, 0x50, 0x80,
+ 0x68, 0x04, 0xd2, 0x59, 0x80, 0x02, 0xc2, 0x59, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80,
+ 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6a,
+ 0x80, 0x02, 0xc2, 0x6a, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x62, 0x80, 0x02, 0xc2,
+ 0x62, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, 0xc2, 0x5a, 0x02, 0x62,
+ 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e,
+ 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6b, 0x80, 0x02, 0xc2, 0x6b, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68,
+ 0x04, 0xd2, 0x63, 0x80, 0x02, 0xc2, 0x63, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5b,
+ 0x80, 0x02, 0xc2, 0x5b, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09,
+ 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6c, 0x80, 0x02, 0xc2, 0x6c,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x64, 0x80, 0x02, 0xc2, 0x64, 0xa5, 0xfd, 0x5e,
+ 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e,
+ 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04,
+ 0xd2, 0x6d, 0x80, 0x02, 0xc2, 0x6d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x65, 0x80,
+ 0x02, 0xc2, 0x65, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d,
+ 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5,
+ 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6e, 0x80, 0x02, 0xc2, 0x6e, 0xa5, 0xfd, 0x5e, 0x50,
+ 0x20, 0x68, 0x04, 0xd2, 0x66, 0x80, 0x02, 0xc2, 0x66, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04,
+ 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c,
+ 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6f, 0x80, 0x02,
+ 0xc2, 0x6f, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x67, 0x80, 0x02, 0xc2, 0x67, 0xa5,
+ 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0x02, 0x62, 0x7f, 0x54,
+ 0xf0, 0xc4, 0xa5, 0xff, 0xc4, 0xa5, 0x4f, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12,
+ 0x7c, 0x15, 0x22, 0xca, 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x29, 0xe3, 0xca, 0x79,
+ 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x02, 0x7e,
+ 0x64, 0x00, 0x02, 0x02, 0x62, 0xde, 0xca, 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x29,
+ 0xe3, 0xca, 0x79, 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0x7a, 0x79, 0x60,
+ 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x03, 0x7e, 0x64, 0x00, 0x03, 0x02, 0x62, 0xde, 0xd2, 0x04,
+ 0x7e, 0x27, 0x01, 0xe1, 0x2d, 0x26, 0xbe, 0x24, 0x04, 0x00, 0x38, 0x2e, 0x7e, 0x07, 0x01, 0xdf,
+ 0x7e, 0x44, 0x05, 0xe3, 0x7e, 0x79, 0xa0, 0x7a, 0x09, 0xa0, 0x0b, 0x04, 0x0b, 0x74, 0xbd, 0x04,
+ 0x68, 0x23, 0xa5, 0xdb, 0xef, 0x7a, 0x27, 0x01, 0xe1, 0x7e, 0x25, 0x46, 0x2d, 0x26, 0x7a, 0x25,
+ 0x46, 0x7a, 0x07, 0x01, 0xdf, 0xda, 0x19, 0xc2, 0xd7, 0x22, 0x75, 0x31, 0x9a, 0x12, 0x7c, 0x15,
+ 0xda, 0x19, 0xd2, 0xd7, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd7, 0x48, 0xb6, 0x46, 0x25, 0x47,
+ 0x1c, 0x49, 0x15, 0x44, 0xc6, 0x44, 0xc6, 0x48, 0x1b, 0x44, 0xc6, 0x49, 0x59, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x49, 0x60, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x4c, 0x0e, 0x49, 0x7d, 0x4a,
+ 0x74, 0x4c, 0x6d, 0x44, 0xc6, 0x44, 0xc6, 0x4b, 0x73, 0x44, 0xc6, 0x4c, 0xb1, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x4c, 0xb8, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x4f, 0x66, 0x4c, 0xd5, 0x4d,
+ 0xcc, 0x4f, 0xc5, 0x44, 0xc6, 0x44, 0xc6, 0x4e, 0xcb, 0x44, 0xc6, 0x50, 0x09, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x50, 0x10, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x52, 0xbe, 0x50, 0x2d, 0x51,
+ 0x24, 0x53, 0x1d, 0x44, 0xc6, 0x44, 0xc6, 0x52, 0x23, 0x44, 0xc6, 0x53, 0x61, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x53, 0x68, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x56, 0x16, 0x53, 0x85, 0x54,
+ 0x7c, 0x56, 0x75, 0x44, 0xc6, 0x44, 0xc6, 0x55, 0x7b, 0x44, 0xc6, 0x56, 0xb9, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x56, 0xc0, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x59, 0x6e, 0x56, 0xdd, 0x57,
+ 0xd4, 0x59, 0xcd, 0x44, 0xc6, 0x44, 0xc6, 0x58, 0xd3, 0x44, 0xc6, 0x5a, 0x11, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x5a, 0x18, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x5c, 0xc6, 0x5a, 0x35, 0x5b,
+ 0x2c, 0x5d, 0x25, 0x44, 0xc6, 0x44, 0xc6, 0x5c, 0x2b, 0x44, 0xc6, 0x5d, 0x69, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x5d, 0x70, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x60, 0x1e, 0x5d, 0x8d, 0x5e,
+ 0x84, 0x60, 0x7d, 0x44, 0xc6, 0x44, 0xc6, 0x5f, 0x83, 0x44, 0xc6, 0x60, 0xc1, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x60, 0xc8, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44,
+ 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0xca, 0x29, 0x1e, 0x50, 0x40,
+ 0x0d, 0x7e, 0x54, 0x0b, 0x10, 0x9c, 0xb5, 0xa4, 0x2e, 0x54, 0x65, 0x48, 0x89, 0x54, 0x7e, 0x39,
+ 0x00, 0x7a, 0x19, 0x00, 0x0b, 0x34, 0x80, 0xe9, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19,
+ 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38,
+ 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a,
+ 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b,
+ 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00,
+ 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35,
+ 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19,
+ 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b,
+ 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a,
+ 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10,
+ 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00,
+ 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0xda, 0x29, 0x22, 0x1e, 0x50, 0x40, 0x0d, 0x7e,
+ 0x54, 0x0b, 0x1c, 0x9c, 0xb5, 0xa4, 0x2e, 0x54, 0x66, 0x16, 0x89, 0x54, 0x7e, 0x19, 0x00, 0x7a,
+ 0x39, 0x00, 0x0b, 0x34, 0x80, 0xe9, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b,
+ 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e,
+ 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00,
+ 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00,
+ 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38,
+ 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19,
+ 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b,
+ 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e,
+ 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10,
+ 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35,
+ 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19,
+ 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b,
+ 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e,
+ 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00,
+ 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00,
+ 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38,
+ 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19,
+ 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b,
+ 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e,
+ 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x22, 0x67, 0x96, 0x69, 0x63, 0x69,
+ 0x7b, 0x6a, 0x49, 0x6a, 0xe4, 0x6b, 0x8e, 0x6b, 0xa9, 0x6c, 0x3b, 0x6b, 0xc4, 0x6c, 0x05, 0x69,
+ 0x96, 0x69, 0xaa, 0x7c, 0xb3, 0xbe, 0xb0, 0x0b, 0x28, 0x14, 0x75, 0x31, 0x09, 0x12, 0x7c, 0x15,
+ 0x75, 0x6d, 0x10, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x43, 0xe1, 0xc0, 0xd0, 0xf1, 0x22, 0xc0, 0xa8,
+ 0xc2, 0xaf, 0x23, 0x6c, 0xaa, 0x2e, 0x54, 0x67, 0x4b, 0x0b, 0x58, 0x50, 0x89, 0x54, 0x01, 0x02,
+ 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x75, 0x31, 0xb0, 0x12, 0x7c, 0x15, 0x0a, 0x32, 0x09, 0xb3,
+ 0x67, 0x8e, 0x42, 0x32, 0x19, 0x43, 0x00, 0x36, 0xd0, 0xa8, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x3b,
+ 0x49, 0x33, 0x67, 0xcb, 0x0a, 0x22, 0x09, 0x32, 0x00, 0x36, 0x09, 0xb2, 0x67, 0x8e, 0xa5, 0xbb,
+ 0x00, 0x05, 0xf4, 0x52, 0x33, 0x80, 0x02, 0x42, 0x33, 0x89, 0x34, 0x67, 0xdb, 0x68, 0x09, 0x68,
+ 0x37, 0x68, 0x65, 0x68, 0x93, 0x68, 0xc1, 0x68, 0xef, 0x69, 0x1d, 0x12, 0x41, 0xb5, 0xd2, 0x28,
+ 0xd2, 0x08, 0xc2, 0x40, 0xc2, 0x48, 0xc2, 0x38, 0xc2, 0x30, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xcf,
+ 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xaf, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xbf,
+ 0x12, 0x41, 0x16, 0x12, 0x60, 0xcf, 0x02, 0x69, 0x4b, 0x12, 0x41, 0xd4, 0xd2, 0x29, 0xd2, 0x09,
+ 0xc2, 0x41, 0xc2, 0x49, 0xc2, 0x39, 0xc2, 0x31, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd0, 0x7e, 0x04,
+ 0x00, 0x20, 0x7a, 0x07, 0x01, 0xb1, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc1, 0x12, 0x41,
+ 0x16, 0x12, 0x61, 0x05, 0x02, 0x69, 0x4b, 0x12, 0x41, 0xf3, 0xd2, 0x2a, 0xd2, 0x0a, 0xc2, 0x42,
+ 0xc2, 0x4a, 0xc2, 0x3a, 0xc2, 0x32, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd1, 0x7e, 0x04, 0x00, 0x20,
+ 0x7a, 0x07, 0x01, 0xb3, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc3, 0x12, 0x41, 0x16, 0x12,
+ 0x61, 0x3b, 0x02, 0x69, 0x4b, 0x12, 0x42, 0x12, 0xd2, 0x2b, 0xd2, 0x0b, 0xc2, 0x43, 0xc2, 0x4b,
+ 0xc2, 0x3b, 0xc2, 0x33, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd2, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07,
+ 0x01, 0xb5, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc5, 0x12, 0x41, 0x16, 0x12, 0x61, 0x71,
+ 0x02, 0x69, 0x4b, 0x12, 0x42, 0x31, 0xd2, 0x2c, 0xd2, 0x0c, 0xc2, 0x44, 0xc2, 0x4c, 0xc2, 0x3c,
+ 0xc2, 0x34, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd3, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xb7,
+ 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc7, 0x12, 0x41, 0x16, 0x12, 0x61, 0xa7, 0x02, 0x69,
+ 0x4b, 0x12, 0x42, 0x50, 0xd2, 0x2d, 0xd2, 0x0d, 0xc2, 0x45, 0xc2, 0x4d, 0xc2, 0x3d, 0xc2, 0x35,
+ 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd4, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xb9, 0x7e, 0x04,
+ 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc9, 0x12, 0x41, 0x16, 0x12, 0x61, 0xdd, 0x02, 0x69, 0x4b, 0x12,
+ 0x42, 0x6f, 0xd2, 0x2e, 0xd2, 0x0e, 0xc2, 0x46, 0xc2, 0x4e, 0xc2, 0x3e, 0xc2, 0x36, 0x6d, 0x00,
+ 0x7a, 0x03, 0x01, 0xd5, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xbb, 0x7e, 0x04, 0x00, 0x38,
+ 0x7a, 0x07, 0x01, 0xcb, 0x12, 0x41, 0x16, 0x12, 0x62, 0x13, 0x02, 0x69, 0x4b, 0x12, 0x42, 0x8e,
+ 0xd2, 0x2f, 0xd2, 0x0f, 0xc2, 0x47, 0xc2, 0x4f, 0xc2, 0x3f, 0xc2, 0x37, 0x6d, 0x00, 0x7a, 0x03,
+ 0x01, 0xd6, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xbd, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07,
+ 0x01, 0xcd, 0x12, 0x41, 0x16, 0x12, 0x62, 0x49, 0x02, 0x69, 0x4b, 0x7e, 0xa0, 0xd0, 0x7e, 0x60,
+ 0x0f, 0x12, 0x62, 0xb6, 0x40, 0x0c, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1,
+ 0xc2, 0xd7, 0x22, 0x75, 0x31, 0xb1, 0x12, 0x7c, 0x15, 0x0a, 0x52, 0x23, 0x6d, 0x00, 0x59, 0x05,
+ 0x00, 0x48, 0x12, 0x41, 0x7e, 0x12, 0x41, 0x9a, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb2, 0x12, 0x7c,
+ 0x15, 0x0a, 0x22, 0x09, 0xb2, 0x67, 0x8e, 0x42, 0x23, 0x7e, 0xb0, 0x9c, 0x19, 0xb2, 0x01, 0xcf,
+ 0x12, 0x31, 0x85, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb7, 0x12, 0x7c, 0x15, 0x0a, 0x22, 0x09, 0xb2,
+ 0x67, 0x8e, 0x42, 0x24, 0x12, 0x35, 0x3d, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb9, 0x12, 0x7c, 0x15,
+ 0x0a, 0x32, 0x09, 0xb3, 0x67, 0x8e, 0x42, 0x34, 0x19, 0x43, 0x00, 0x3e, 0x12, 0x69, 0xc2, 0xd0,
+ 0xa8, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x0b, 0x7c, 0xb4, 0x20, 0xe0, 0x04, 0x6d, 0x33, 0x80, 0x04,
+ 0x49, 0x30, 0x01, 0x8f, 0x7e, 0xa0, 0xd8, 0xa5, 0xef, 0xca, 0x0b, 0xca, 0x29, 0x12, 0x62, 0xb6,
+ 0xda, 0x29, 0xda, 0x0b, 0x40, 0x62, 0x75, 0x31, 0xba, 0x12, 0x7c, 0x15, 0x7c, 0xb4, 0x30, 0xe0,
+ 0x1e, 0x6d, 0x33, 0x59, 0x30, 0x01, 0x8f, 0x7e, 0x34, 0x09, 0xe3, 0x0a, 0x82, 0x7e, 0x94, 0x04,
+ 0x00, 0xad, 0x89, 0x2d, 0x39, 0x59, 0x30, 0x01, 0x6f, 0x59, 0x30, 0x01, 0x7f, 0x7c, 0xb4, 0x30,
+ 0xe1, 0x10, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0xb0, 0x00, 0x08, 0x44, 0x04, 0x19, 0xb0,
+ 0x00, 0x08, 0x0a, 0x02, 0x09, 0xb0, 0x67, 0x8e, 0x42, 0x21, 0xf4, 0x52, 0x34, 0x7c, 0xb2, 0x23,
+ 0x0a, 0x0b, 0xca, 0x19, 0x49, 0x00, 0x30, 0xd5, 0x99, 0x04, 0xda, 0x19, 0xc0, 0xf1, 0x75, 0xf1,
+ 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0xc2, 0xd7, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09,
+ 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00,
+ 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x12, 0x44, 0x40, 0xca, 0xb8, 0x09, 0xb0, 0x00, 0x10,
+ 0x44, 0x02, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x02, 0x54, 0xbf, 0x7c, 0x74, 0x5e, 0x70,
+ 0x08, 0x68, 0x04, 0x44, 0x08, 0x80, 0x02, 0x54, 0xf7, 0x09, 0x30, 0x00, 0x0c, 0xca, 0xb8, 0x74,
+ 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xda, 0xb8, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a,
+ 0x62, 0x09, 0xb6, 0x67, 0x8e, 0x3e, 0x20, 0x0a, 0x62, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x20,
+ 0x42, 0x27, 0xca, 0xb8, 0x74, 0x61, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x10, 0x59, 0x46,
+ 0x01, 0xbf, 0x09, 0xb0, 0x00, 0x10, 0x44, 0x01, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x11,
+ 0xf4, 0x52, 0x27, 0x74, 0xa1, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x38, 0x59, 0x46, 0x01,
+ 0xbf, 0xd0, 0xa8, 0x22, 0x7c, 0x74, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x0a, 0x62, 0x09, 0xb6,
+ 0x67, 0x8e, 0xa5, 0xfd, 0xf4, 0xa5, 0xfe, 0xca, 0x28, 0x3e, 0x20, 0x0a, 0x62, 0xa5, 0xee, 0x52,
+ 0x26, 0x7e, 0x44, 0x00, 0x20, 0x59, 0x46, 0x01, 0xaf, 0xda, 0x28, 0x09, 0x30, 0x00, 0x0c, 0x74,
+ 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x0c,
+ 0x44, 0x80, 0xca, 0xb8, 0xa5, 0xed, 0x42, 0x2a, 0xda, 0xb8, 0x80, 0x0a, 0x54, 0x7f, 0xca, 0xb8,
+ 0xa5, 0xee, 0x52, 0x2a, 0xda, 0xb8, 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x02, 0x80,
+ 0x02, 0x54, 0xfd, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x02,
+ 0x68, 0x10, 0xa5, 0xed, 0x42, 0x28, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0xaf,
+ 0x80, 0x04, 0xa5, 0xee, 0x52, 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x04, 0x68, 0x10, 0xa5, 0xed, 0x42,
+ 0x29, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0xaf, 0x80, 0x0b, 0xa5, 0xee, 0x52,
+ 0x29, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x78, 0x00, 0x12, 0x42, 0xad, 0xd0, 0xa8, 0x22, 0x7e, 0x04,
+ 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40,
+ 0x00, 0x10, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09,
+ 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, 0x00, 0x18, 0x19, 0x30, 0x00,
+ 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb5, 0x12, 0x7c, 0x15, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02,
+ 0x09, 0xb0, 0x00, 0x0c, 0x44, 0x40, 0x19, 0xb0, 0x00, 0x0c, 0xe5, 0x6e, 0xb4, 0x07, 0x23, 0x09,
+ 0xb0, 0x00, 0x10, 0x4e, 0xb0, 0x02, 0x19, 0xb0, 0x00, 0x10, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf,
+ 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x04, 0x54, 0xf7, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30,
+ 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb6, 0x12, 0x7c, 0x15, 0x7e, 0x04, 0x80, 0x00, 0x4c,
+ 0x02, 0xe5, 0x6e, 0xb4, 0x07, 0x18, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c,
+ 0x09, 0xb0, 0x00, 0x04, 0x44, 0x08, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30, 0x00, 0x0c, 0x09, 0xb0,
+ 0x00, 0x0c, 0x54, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb4, 0x12, 0x7c,
+ 0x15, 0x7a, 0x21, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x41, 0x31, 0x12, 0x7c, 0x15, 0x0a, 0x32, 0x09,
+ 0xb3, 0x67, 0x8e, 0x42, 0x35, 0x12, 0x6c, 0x5b, 0xd0, 0xa8, 0x22, 0x7e, 0xb0, 0x01, 0x7e, 0xa0,
+ 0xc8, 0x7c, 0x64, 0x12, 0x62, 0xb6, 0x40, 0x13, 0x0a, 0x32, 0x09, 0xb3, 0x67, 0x8e, 0xf4, 0x52,
+ 0x35, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x6c, 0x8c, 0x6c, 0xd3,
+ 0x6d, 0x1a, 0x6d, 0x61, 0x6d, 0xa8, 0x6d, 0xef, 0x6e, 0x36, 0x6e, 0x7d, 0x75, 0x31, 0x55, 0x12,
+ 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71,
+ 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x7f, 0x7e, 0x27, 0x01, 0x8f, 0x2d, 0x23, 0x7e, 0x09,
+ 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x0d, 0xe2, 0x38, 0x0f, 0x1b, 0x34,
+ 0x78, 0xec, 0x7a, 0x17, 0x01, 0x7f, 0x7a, 0x27, 0x01, 0x8f, 0x02, 0x46, 0x0f, 0x7e, 0x14, 0x09,
+ 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x01, 0x12, 0x7c, 0x15, 0x7a,
+ 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x81, 0x7e,
+ 0x27, 0x01, 0x91, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe,
+ 0x14, 0x11, 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x81, 0x7a, 0x27, 0x01,
+ 0x91, 0x02, 0x49, 0x67, 0x7e, 0x14, 0x0d, 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15,
+ 0x75, 0x31, 0x02, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12,
+ 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x83, 0x7e, 0x27, 0x01, 0x93, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b,
+ 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x15, 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec,
+ 0x7a, 0x17, 0x01, 0x83, 0x7a, 0x27, 0x01, 0x93, 0x02, 0x4c, 0xbf, 0x7e, 0x14, 0x11, 0xe3, 0x80,
+ 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x03, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31,
+ 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x85, 0x7e, 0x27, 0x01,
+ 0x95, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x19,
+ 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x85, 0x7a, 0x27, 0x01, 0x95, 0x02,
+ 0x50, 0x17, 0x7e, 0x14, 0x15, 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31,
+ 0x04, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15,
+ 0x7e, 0x17, 0x01, 0x87, 0x7e, 0x27, 0x01, 0x97, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a,
+ 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x1d, 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17,
+ 0x01, 0x87, 0x7a, 0x27, 0x01, 0x97, 0x02, 0x53, 0x6f, 0x7e, 0x14, 0x19, 0xe3, 0x80, 0xeb, 0x75,
+ 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x05, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c,
+ 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x89, 0x7e, 0x27, 0x01, 0x99, 0x2d,
+ 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x21, 0xe2, 0x38,
+ 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x89, 0x7a, 0x27, 0x01, 0x99, 0x02, 0x56, 0xc7,
+ 0x7e, 0x14, 0x1d, 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x06, 0x12,
+ 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17,
+ 0x01, 0x8b, 0x7e, 0x27, 0x01, 0x9b, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0,
+ 0x0b, 0x14, 0xbe, 0x14, 0x25, 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x8b,
+ 0x7a, 0x27, 0x01, 0x9b, 0x02, 0x5a, 0x1f, 0x7e, 0x14, 0x21, 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55,
+ 0x12, 0x7c, 0x15, 0x75, 0x31, 0x07, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a,
+ 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x8d, 0x7e, 0x27, 0x01, 0x9d, 0x2d, 0x23, 0x7e,
+ 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x29, 0xe2, 0x38, 0x0f, 0x1b,
+ 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x8d, 0x7a, 0x27, 0x01, 0x9d, 0x02, 0x5d, 0x77, 0x7e, 0x14,
+ 0x25, 0xe3, 0x80, 0xeb, 0xca, 0xb8, 0xc0, 0xf1, 0x75, 0x31, 0x02, 0x12, 0x7c, 0x15, 0xe5, 0xc0,
+ 0x54, 0x03, 0x68, 0x05, 0x12, 0x75, 0xcd, 0x80, 0xf5, 0x30, 0xc2, 0x08, 0x75, 0xf1, 0x01, 0x12,
+ 0x6f, 0xd9, 0x80, 0x14, 0x30, 0xc3, 0x08, 0x75, 0xf1, 0x01, 0x12, 0x6e, 0xfd, 0x80, 0x09, 0x30,
+ 0xc4, 0x06, 0x75, 0xf1, 0x02, 0x12, 0x70, 0xe9, 0xd0, 0xf1, 0xda, 0xb8, 0x32, 0x75, 0x31, 0x10,
+ 0x12, 0x7c, 0x15, 0xca, 0x0b, 0xca, 0x39, 0xca, 0x59, 0xc2, 0xc3, 0xa9, 0x21, 0xe2, 0x5c, 0xe5,
+ 0xe5, 0x54, 0xc0, 0x68, 0x4f, 0xe5, 0xe6, 0x6c, 0xaa, 0x7e, 0x37, 0x01, 0xdb, 0x2d, 0x35, 0xbe,
+ 0x34, 0x04, 0x00, 0x38, 0x4a, 0x7a, 0x37, 0x01, 0xdb, 0x7e, 0x37, 0x01, 0xd9, 0x7d, 0x43, 0x2d,
+ 0x45, 0xbe, 0x44, 0x09, 0xe2, 0x38, 0x40, 0x7a, 0x47, 0x01, 0xd9, 0x75, 0x31, 0x11, 0x12, 0x7c,
+ 0x15, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x71, 0xb8, 0xa9, 0x21, 0xe5, 0x1f, 0xa9, 0xd4,
+ 0xe4, 0xa9, 0x24, 0xe4, 0xfc, 0xc2, 0xc3, 0xa9, 0x21, 0xe2, 0x3b, 0xe5, 0xe5, 0x54, 0xc0, 0x78,
+ 0xb4, 0x12, 0x74, 0x5a, 0xda, 0x59, 0xda, 0x39, 0xda, 0x0b, 0x22, 0x80, 0x29, 0x80, 0x58, 0x75,
+ 0x31, 0x16, 0x12, 0x7c, 0x15, 0x80, 0xed, 0x75, 0x31, 0x12, 0x12, 0x7c, 0x15, 0x7a, 0xb1, 0x31,
+ 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x09, 0xe3, 0x9d, 0x54, 0x12, 0x71, 0xb8, 0x7e, 0x34, 0x05, 0xe3,
+ 0x7d, 0x54, 0x2d, 0x43, 0x80, 0xa1, 0xe5, 0xe5, 0x54, 0x03, 0x78, 0x12, 0x75, 0x31, 0x13, 0x12,
+ 0x7c, 0x15, 0x7e, 0x0f, 0x29, 0xff, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xff, 0x80, 0xa7, 0x75, 0x31,
+ 0x14, 0x12, 0x7c, 0x15, 0x7e, 0x0f, 0x2a, 0x03, 0x0b, 0x0c, 0x7a, 0x0f, 0x2a, 0x03, 0xa9, 0xd7,
+ 0xe4, 0xa9, 0x27, 0xe4, 0xfc, 0x80, 0x9d, 0x75, 0x31, 0x15, 0x12, 0x7c, 0x15, 0x7e, 0x0f, 0x2a,
+ 0x07, 0x0b, 0x0c, 0x7a, 0x0f, 0x2a, 0x07, 0x80, 0xe5, 0x75, 0x31, 0x18, 0x12, 0x7c, 0x15, 0xca,
+ 0x09, 0xca, 0x39, 0xca, 0x2b, 0xc2, 0xc2, 0xa9, 0x21, 0xf2, 0x52, 0xe5, 0xf5, 0x33, 0x82, 0xe7,
+ 0x40, 0x44, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x54, 0x00, 0x40, 0x9d, 0x35, 0x40, 0x43, 0x7a, 0x37,
+ 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdd, 0x7d, 0x43, 0x2d, 0x45, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x52,
+ 0x7a, 0x47, 0x01, 0xdd, 0x7d, 0x45, 0x12, 0x73, 0x16, 0xa9, 0x20, 0xf5, 0x22, 0x75, 0x31, 0x19,
+ 0x12, 0x7c, 0x15, 0x7a, 0x91, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x81, 0xf7, 0x7a, 0x91, 0xf6, 0xe5,
+ 0xf5, 0x33, 0x82, 0xe7, 0x50, 0xbc, 0xda, 0x2b, 0xda, 0x39, 0xda, 0x09, 0x22, 0x80, 0x41, 0x80,
+ 0x64, 0x2d, 0x53, 0x6d, 0x33, 0x70, 0xb7, 0x7e, 0x04, 0x01, 0xe3, 0x7a, 0x07, 0x01, 0xdf, 0x7a,
+ 0x07, 0x01, 0xdd, 0xa9, 0x32, 0xf2, 0xdf, 0x85, 0x30, 0x31, 0x12, 0x7c, 0x15, 0x75, 0xf6, 0x00,
+ 0x80, 0xd4, 0xca, 0x59, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x54, 0x12, 0x73, 0x16, 0x7e, 0x34, 0x01,
+ 0xe3, 0x7d, 0x54, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdd, 0x12, 0x73, 0x16, 0xda, 0x49, 0x80, 0x99,
+ 0xe5, 0xf5, 0x54, 0x03, 0x78, 0x1f, 0x7e, 0x0f, 0x29, 0xef, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xef,
+ 0x80, 0x9d, 0x7e, 0x0f, 0x29, 0xf7, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xf7, 0xa9, 0xd7, 0xf4, 0xa9,
+ 0x27, 0xf4, 0xfc, 0x80, 0x8a, 0x7e, 0x0f, 0x29, 0xf3, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xf3, 0x80,
+ 0xeb, 0xe5, 0xf5, 0x54, 0x03, 0x78, 0x1f, 0x7e, 0x2f, 0x2a, 0x0f, 0x0b, 0x2c, 0x7a, 0x2f, 0x2a,
+ 0x0f, 0x80, 0x34, 0x7e, 0x2f, 0x2a, 0x17, 0x0b, 0x2c, 0x7a, 0x2f, 0x2a, 0x17, 0xa9, 0xd7, 0xf4,
+ 0xa9, 0x27, 0xf4, 0xfc, 0x80, 0x21, 0x7e, 0x2f, 0x2a, 0x13, 0x0b, 0x2c, 0x7a, 0x2f, 0x2a, 0x13,
+ 0x80, 0xeb, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x75, 0x31, 0x28, 0x12, 0x7c, 0x15, 0xca,
+ 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xc2, 0xc4, 0xa9, 0x21, 0xf2, 0xb6, 0xe5, 0xf5, 0x33, 0x72, 0xe7,
+ 0x40, 0xe0, 0x7e, 0x0d, 0x46, 0x7e, 0x1d, 0x4a, 0x7e, 0x2d, 0x4e, 0x7e, 0x3d, 0x52, 0x7e, 0x85,
+ 0x56, 0x7d, 0x90, 0x4d, 0x91, 0x4d, 0x92, 0x4d, 0x93, 0x4d, 0x94, 0x4d, 0x95, 0x4d, 0x96, 0x4d,
+ 0x97, 0x4d, 0x98, 0x68, 0x72, 0x7a, 0x11, 0xf3, 0x7a, 0x01, 0xf3, 0x7a, 0x31, 0xf3, 0x7a, 0x21,
+ 0xf3, 0x7a, 0x51, 0xf3, 0x7a, 0x41, 0xf3, 0x7a, 0x71, 0xf3, 0x7a, 0x61, 0xf3, 0x7a, 0x91, 0xf3,
+ 0x7a, 0x81, 0xf3, 0x30, 0x7b, 0x1a, 0x7a, 0xb1, 0xf3, 0x7a, 0xa1, 0xf3, 0x7a, 0xd1, 0xf3, 0x7a,
+ 0xc1, 0xf3, 0x7a, 0xf1, 0xf3, 0x7a, 0xe1, 0xf3, 0x7d, 0x78, 0x7a, 0xf1, 0xf3, 0x7a, 0xe1, 0xf3,
+ 0xa9, 0x30, 0xf5, 0x03, 0x02, 0x70, 0xd6, 0x75, 0x31, 0x29, 0x12, 0x7c, 0x15, 0x20, 0x7b, 0x0b,
+ 0x75, 0x31, 0x0a, 0x12, 0x7c, 0x15, 0x75, 0xf6, 0x0a, 0x80, 0x09, 0x75, 0x31, 0x12, 0x12, 0x7c,
+ 0x15, 0x75, 0xf6, 0x12, 0x6d, 0x00, 0x7d, 0x10, 0x7a, 0x0d, 0x46, 0x7a, 0x0d, 0x4a, 0x7a, 0x0d,
+ 0x4e, 0x7a, 0x0d, 0x52, 0x7a, 0x05, 0x56, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x1e, 0xb0,
+ 0x40, 0x0c, 0x7e, 0xa0, 0x0a, 0xa4, 0x7e, 0x04, 0x72, 0xfb, 0x9d, 0x05, 0x89, 0x04, 0x7e, 0xa1,
+ 0xe3, 0x7a, 0x39, 0xa0, 0x0b, 0x34, 0x80, 0xea, 0xb4, 0x40, 0xe3, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3,
+ 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e,
+ 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38,
+ 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3,
+ 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b,
+ 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3,
+ 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e,
+ 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38,
+ 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3,
+ 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b,
+ 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3,
+ 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e,
+ 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38,
+ 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3,
+ 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b,
+ 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3,
+ 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e,
+ 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38,
+ 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3,
+ 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b,
+ 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x22, 0x1e, 0xb0, 0x40, 0x0c,
+ 0x7e, 0xa0, 0x0a, 0xa4, 0x7e, 0x04, 0x74, 0x59, 0x9d, 0x05, 0x89, 0x04, 0x7e, 0x39, 0xa0, 0x7a,
+ 0xa1, 0xf3, 0x0b, 0x34, 0x80, 0xea, 0xb4, 0x40, 0xe3, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5,
+ 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50,
+ 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b,
+ 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1,
+ 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b,
+ 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5,
+ 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50,
+ 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b,
+ 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1,
+ 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b,
+ 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5,
+ 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50,
+ 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b,
+ 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1,
+ 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b,
+ 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5,
+ 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50,
+ 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b,
+ 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1,
+ 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b,
+ 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x22, 0xc2, 0xaf, 0x7e, 0x37, 0x01, 0xdb,
+ 0x4d, 0x33, 0x68, 0x3b, 0x7e, 0x07, 0x01, 0xd7, 0x7e, 0x54, 0x09, 0xe3, 0x9d, 0x50, 0xbd, 0x35,
+ 0x40, 0x02, 0x7d, 0x35, 0xca, 0x39, 0x7e, 0x65, 0x61, 0x99, 0x64, 0xda, 0x39, 0x7e, 0x07, 0x01,
+ 0xdb, 0x9d, 0x03, 0x7a, 0x07, 0x01, 0xdb, 0x2e, 0x37, 0x01, 0xd7, 0x7a, 0x37, 0x01, 0xd7, 0xbe,
+ 0x34, 0x09, 0xe2, 0x28, 0xc7, 0x7e, 0x34, 0x05, 0xe3, 0x7a, 0x37, 0x01, 0xd7, 0x80, 0xbd, 0xd2,
+ 0xaf, 0x22, 0x75, 0x31, 0x53, 0x12, 0x7c, 0x15, 0x7e, 0x15, 0x63, 0x80, 0x11, 0x75, 0x31, 0x51,
+ 0x12, 0x7c, 0x15, 0x0b, 0x08, 0x10, 0x0b, 0x05, 0x9e, 0x34, 0x00, 0x02, 0x28, 0x4d, 0x7c, 0xb2,
+ 0x20, 0xe7, 0x27, 0x54, 0x07, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x6c, 0x7c, 0x7c, 0xb2, 0x54, 0x78,
+ 0x03, 0x03, 0x03, 0x7c, 0x2b, 0x9d, 0x13, 0x40, 0x1a, 0x68, 0x12, 0x7a, 0x15, 0x63, 0x7a, 0x25,
+ 0x65, 0x7e, 0x64, 0x75, 0x37, 0x7a, 0x65, 0x61, 0x89, 0x24, 0x02, 0x75, 0x45, 0x7e, 0x64, 0x74,
+ 0xad, 0x80, 0xf2, 0x2d, 0x13, 0x9d, 0x31, 0xca, 0x39, 0x7d, 0x31, 0x2d, 0x10, 0xca, 0x19, 0xca,
+ 0x29, 0x99, 0x24, 0xda, 0x29, 0xda, 0x09, 0xda, 0x39, 0x80, 0xa2, 0x7a, 0x15, 0x63, 0x7e, 0x64,
+ 0x75, 0x23, 0x4d, 0x33, 0x78, 0x09, 0x7c, 0xb2, 0x20, 0xe7, 0x2a, 0x7e, 0x64, 0x74, 0xa2, 0x7a,
+ 0x65, 0x61, 0x22, 0x75, 0x31, 0x52, 0x12, 0x7c, 0x15, 0x7e, 0x21, 0x63, 0x7e, 0x09, 0x30, 0x0b,
+ 0x04, 0x1b, 0x34, 0x78, 0x89, 0x80, 0xd4, 0x75, 0x31, 0x54, 0x12, 0x7c, 0x15, 0x7e, 0x15, 0x63,
+ 0x7e, 0x25, 0x65, 0x80, 0x90, 0x5e, 0x20, 0x07, 0x54, 0x78, 0x7e, 0x44, 0x75, 0xc1, 0x30, 0xe6,
+ 0x16, 0x4d, 0x33, 0x68, 0x26, 0x1b, 0x34, 0x7e, 0x09, 0x40, 0x0b, 0x04, 0x7e, 0x44, 0x67, 0x63,
+ 0x20, 0xe3, 0x04, 0x7e, 0x44, 0x75, 0xc9, 0xca, 0x09, 0xca, 0x39, 0x99, 0x44, 0xda, 0x39, 0xda,
+ 0x09, 0x7e, 0x64, 0x74, 0xad, 0x4d, 0x33, 0x68, 0xa6, 0x89, 0x64, 0x7a, 0x15, 0x63, 0xf5, 0x65,
+ 0x7e, 0x64, 0x75, 0x86, 0x80, 0x99, 0x7e, 0x15, 0x63, 0xe5, 0x65, 0x80, 0xc4, 0xc0, 0xd0, 0xc0,
+ 0xd1, 0xc0, 0xe0, 0xca, 0x19, 0xa9, 0x20, 0xdf, 0x12, 0xa9, 0x21, 0xdf, 0x1b, 0x75, 0x31, 0x01,
+ 0x12, 0x7c, 0x15, 0x53, 0xdf, 0xf7, 0x12, 0x40, 0xdc, 0x80, 0x0d, 0x75, 0x31, 0xfe, 0x12, 0x7c,
+ 0x15, 0x7e, 0x14, 0x00, 0x53, 0x02, 0x40, 0x51, 0xda, 0x19, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0,
+ 0x32, 0x03, 0xa5, 0xcb, 0x19, 0xb1, 0x80, 0x00, 0x22, 0x22, 0x02, 0x76, 0x42, 0xca, 0x0b, 0xca,
+ 0x1b, 0xca, 0x2b, 0xca, 0x3b, 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0xc0,
+ 0xf1, 0x7e, 0xb3, 0x2a, 0x33, 0xb4, 0x00, 0x02, 0x80, 0x19, 0xb4, 0x01, 0x16, 0x30, 0xc0, 0x08,
+ 0x75, 0xf1, 0x00, 0x12, 0x76, 0x2c, 0x80, 0x1f, 0x30, 0xc1, 0x1c, 0x75, 0xf1, 0x00, 0x12, 0x76,
+ 0xbd, 0x80, 0x14, 0x30, 0xc1, 0x08, 0x75, 0xf1, 0x00, 0x12, 0x76, 0xbd, 0x80, 0x09, 0x30, 0xc0,
+ 0x06, 0x75, 0xf1, 0x00, 0x12, 0x76, 0x2c, 0xd0, 0xf1, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda,
+ 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0xc2, 0xc0, 0x7e, 0xb3,
+ 0x2a, 0x33, 0xb4, 0x02, 0x07, 0x12, 0x76, 0x4e, 0x02, 0x76, 0x42, 0x22, 0xb4, 0x01, 0xfc, 0x02,
+ 0x76, 0x88, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x2a, 0x33, 0x7a, 0x03, 0x2a, 0x34, 0x22, 0x7e, 0xb3,
+ 0x2a, 0x2b, 0x54, 0x60, 0x60, 0x05, 0xb4, 0x40, 0x15, 0x80, 0x13, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4,
+ 0x05, 0x0c, 0x75, 0x31, 0x71, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x2e, 0xf5, 0x8f, 0x22, 0x75,
+ 0xf6, 0x00, 0x22, 0xbe, 0x57, 0x2a, 0x31, 0x28, 0x04, 0x7e, 0x57, 0x2a, 0x31, 0x7a, 0x0f, 0x2a,
+ 0x36, 0x7a, 0x57, 0x2a, 0x3a, 0x02, 0x76, 0x88, 0x7e, 0xef, 0x2a, 0x36, 0x7e, 0xf7, 0x2a, 0x3a,
+ 0x7e, 0x07, 0x2a, 0x3a, 0x4d, 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0x7e, 0xeb, 0xb0, 0xf5, 0xf3,
+ 0xa3, 0xa5, 0x08, 0x1b, 0xf4, 0x68, 0x04, 0xa5, 0xb8, 0x08, 0xf0, 0x7a, 0xef, 0x2a, 0x36, 0x7a,
+ 0xf7, 0x2a, 0x3a, 0x75, 0x31, 0x06, 0x12, 0x7c, 0x15, 0x7a, 0x01, 0xf6, 0x22, 0xc2, 0xc1, 0x75,
+ 0x31, 0x03, 0x12, 0x7c, 0x15, 0xa9, 0x36, 0xe2, 0x16, 0xe5, 0xf5, 0x54, 0xc0, 0x68, 0x07, 0xa9,
+ 0xd7, 0xf4, 0xa9, 0x27, 0xf4, 0xfc, 0x53, 0xe1, 0x3f, 0x43, 0xf2, 0x88, 0x02, 0x77, 0x29, 0x7e,
+ 0xb3, 0x2a, 0x34, 0xb4, 0x02, 0x04, 0xa9, 0xd4, 0xe4, 0x22, 0xb4, 0x01, 0x39, 0x7e, 0x21, 0xe6,
+ 0x7c, 0x32, 0x7e, 0x13, 0x2a, 0x35, 0x2c, 0x21, 0x7a, 0x23, 0x2a, 0x35, 0x7e, 0x00, 0x00, 0x2e,
+ 0x04, 0x2a, 0x3c, 0xe5, 0xe3, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0xa5, 0xdb, 0xf6, 0xa9, 0xd4, 0xe4,
+ 0x75, 0x31, 0x70, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x35, 0x7e, 0xa3, 0x2a, 0x32, 0xbc, 0xab,
+ 0x78, 0x03, 0x12, 0x77, 0xc0, 0x22, 0x02, 0x7b, 0x29, 0xe5, 0xe6, 0xb4, 0x08, 0x65, 0xa9, 0xc4,
+ 0xe2, 0x7e, 0x01, 0xe3, 0x7e, 0x11, 0xe3, 0x7e, 0x31, 0xe3, 0x7e, 0x21, 0xe3, 0x7e, 0x51, 0xe3,
+ 0x7e, 0x41, 0xe3, 0x7e, 0x71, 0xe3, 0x7e, 0x61, 0xe3, 0x7a, 0x0f, 0x2a, 0x2b, 0x7a, 0x1f, 0x2a,
+ 0x2f, 0x75, 0x31, 0x04, 0x12, 0x7c, 0x15, 0x7a, 0x01, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x11, 0x31,
+ 0x12, 0x7c, 0x15, 0x7a, 0x21, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x31, 0x31, 0x12, 0x7c, 0x15, 0x7a,
+ 0x41, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c,
+ 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xa9, 0xd4, 0xe4, 0xa9, 0xd7, 0xf4, 0xa9, 0xc6, 0xe2,
+ 0x12, 0x77, 0x94, 0x22, 0x6d, 0x00, 0x7e, 0x14, 0x01, 0x02, 0x7a, 0x07, 0x2a, 0x3a, 0x7a, 0x03,
+ 0x2a, 0x35, 0x7e, 0xb3, 0x2a, 0x2b, 0x20, 0xe7, 0x0f, 0x7a, 0x23, 0x2a, 0x34, 0x7a, 0x33, 0x2a,
+ 0x33, 0xbe, 0x07, 0x2a, 0x31, 0x68, 0x09, 0x22, 0x7a, 0x33, 0x2a, 0x34, 0x7a, 0x23, 0x2a, 0x33,
+ 0x7e, 0xb3, 0x2a, 0x2b, 0x54, 0xe3, 0x23, 0x23, 0x30, 0xe0, 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02,
+ 0xd2, 0xe4, 0x30, 0xe5, 0x06, 0x30, 0xe4, 0x03, 0x02, 0x7b, 0x29, 0x54, 0x3e, 0xf5, 0xf0, 0x03,
+ 0x54, 0x1f, 0xc3, 0x25, 0xf0, 0x90, 0x77, 0xec, 0x75, 0x84, 0xff, 0x73, 0x02, 0x79, 0x40, 0x02,
+ 0x78, 0x34, 0x02, 0x79, 0xdd, 0x02, 0x79, 0xf8, 0x02, 0x78, 0xd9, 0x02, 0x78, 0x9a, 0x02, 0x7a,
+ 0x11, 0x02, 0x7a, 0x11, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14,
+ 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x1a, 0x02,
+ 0x7a, 0xce, 0x02, 0x7a, 0x17, 0x02, 0x7a, 0x17, 0x02, 0x7a, 0x17, 0x02, 0x7a, 0x17, 0x02, 0x7a,
+ 0x17, 0x02, 0x7a, 0x17, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x06, 0x2a, 0x7e, 0xb3, 0x2a, 0x2d, 0x60,
+ 0x56, 0x7c, 0x0b, 0x7e, 0x13, 0x2a, 0x2e, 0x7e, 0x17, 0x2a, 0x2f, 0x75, 0x31, 0x72, 0x12, 0x7c,
+ 0x15, 0x7a, 0x01, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x11, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x7b, 0x33,
+ 0x40, 0x35, 0x02, 0x76, 0x73, 0xb4, 0x08, 0x10, 0x75, 0x31, 0x74, 0x12, 0x7c, 0x15, 0x7e, 0xb3,
+ 0x3f, 0xf1, 0xf5, 0xf3, 0x75, 0xf6, 0x01, 0x22, 0xb4, 0x00, 0x1c, 0x75, 0x31, 0x75, 0x12, 0x7c,
+ 0x15, 0x7e, 0xb3, 0x3f, 0xf2, 0x30, 0xe0, 0x05, 0x75, 0xf3, 0x02, 0x80, 0x03, 0x75, 0xf3, 0x00,
+ 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x7b, 0x29, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x00,
+ 0x35, 0x75, 0x31, 0x76, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x30, 0x54, 0x0f, 0xf5, 0xf1, 0x7e,
+ 0xb3, 0x2a, 0x30, 0x20, 0xe7, 0x09, 0xe5, 0xe1, 0x30, 0xe7, 0x0d, 0x74, 0x01, 0x80, 0x0b, 0xe5,
+ 0xe1, 0x30, 0xe6, 0x04, 0x74, 0x01, 0x80, 0x02, 0x74, 0x00, 0x53, 0xf1, 0x80, 0xf5, 0xf3, 0x75,
+ 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x7b, 0x29, 0xc0, 0xf1, 0x7e, 0xb3, 0x2a, 0x30, 0x54,
+ 0x0f, 0x42, 0xf1, 0x7e, 0xb3, 0x2a, 0x2e, 0xb4, 0x00, 0x45, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x01,
+ 0x24, 0x75, 0x31, 0x77, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x30, 0x54, 0x0f, 0x78, 0x05, 0x53,
+ 0xe1, 0x3f, 0x80, 0x37, 0x7e, 0xb3, 0x2a, 0x30, 0x20, 0xe7, 0x05, 0x53, 0xe1, 0x7f, 0x80, 0x2b,
+ 0x53, 0xe1, 0xbf, 0x80, 0x26, 0xb4, 0x03, 0x17, 0x75, 0x31, 0x78, 0x12, 0x7c, 0x15, 0x7e, 0xb3,
+ 0x2a, 0x30, 0x20, 0xe7, 0x05, 0x43, 0xe1, 0x80, 0x80, 0x11, 0x43, 0xe1, 0x40, 0x80, 0x0c, 0x43,
+ 0xe1, 0xc0, 0xd0, 0xf1, 0x75, 0x31, 0x07, 0x12, 0x7c, 0x15, 0x22, 0xd0, 0xf1, 0x02, 0x76, 0x6f,
+ 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x09, 0x23, 0x75, 0x31, 0x79, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a,
+ 0x2e, 0xbe, 0xb3, 0x3f, 0xf1, 0x68, 0x11, 0xca, 0xb8, 0xc0, 0xf1, 0x12, 0x43, 0xd4, 0xd0, 0xf1,
+ 0xda, 0xb8, 0x50, 0x76, 0x7a, 0xb3, 0x3f, 0xf1, 0x80, 0x6d, 0xb4, 0x05, 0x08, 0x75, 0x31, 0x7a,
+ 0x12, 0x7c, 0x15, 0x80, 0x62, 0xb4, 0x03, 0x19, 0x75, 0x31, 0x7b, 0x12, 0x7c, 0x15, 0x7e, 0xb3,
+ 0x2a, 0x2e, 0xb4, 0x01, 0x55, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80,
+ 0x46, 0xb4, 0x01, 0x19, 0x75, 0x31, 0x7c, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x2e, 0xb4, 0x01,
+ 0x39, 0x7e, 0xb3, 0x3f, 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a,
+ 0x7e, 0xb3, 0x2a, 0x2d, 0x60, 0x24, 0x7c, 0x0b, 0x7e, 0x13, 0x2a, 0x2e, 0x7e, 0x17, 0x2a, 0x2f,
+ 0x75, 0x31, 0x73, 0x12, 0x7c, 0x15, 0x7a, 0x01, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x11, 0x31, 0x12,
+ 0x7c, 0x15, 0x12, 0x7b, 0x5f, 0x40, 0x03, 0x02, 0x76, 0x6f, 0x02, 0x7b, 0x29, 0x7e, 0xb3, 0x2a,
+ 0x2c, 0xb4, 0x0b, 0xf6, 0x75, 0x31, 0x7d, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x2e, 0x7e, 0xa3,
+ 0x2a, 0x30, 0x4c, 0xab, 0x78, 0xe4, 0x80, 0xdf, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x0a, 0xdb, 0x75,
+ 0x31, 0x7e, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x2e, 0x70, 0xcf, 0xf5, 0xf3, 0x75, 0xf6, 0x01,
+ 0x22, 0x02, 0x7b, 0x29, 0x02, 0x7b, 0x29, 0x02, 0x7b, 0x29, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x04,
+ 0x20, 0x75, 0x31, 0xc3, 0x12, 0x7c, 0x15, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x2a, 0x2d, 0x7e,
+ 0x18, 0x2a, 0x3c, 0x7a, 0x1c, 0x00, 0x00, 0x7e, 0x47, 0x2a, 0x31, 0x12, 0x7c, 0x21, 0x02, 0x7a,
+ 0xc8, 0xb4, 0x06, 0x3a, 0x75, 0x31, 0xc1, 0x12, 0x7c, 0x15, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c,
+ 0x00, 0xfe, 0x7d, 0xca, 0x7e, 0xd7, 0x2a, 0x2d, 0x7e, 0x78, 0x2a, 0x3c, 0x7a, 0x7c, 0x00, 0x00,
+ 0x7e, 0x77, 0x2a, 0x31, 0x75, 0x31, 0xc1, 0x12, 0x7c, 0x15, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf,
+ 0xa9, 0xd5, 0x87, 0x12, 0x7c, 0x5a, 0xd0, 0x87, 0xd0, 0xa8, 0x40, 0x4f, 0x80, 0x4a, 0xb4, 0x00,
+ 0x1c, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x76, 0x6f, 0xe4, 0x8d, 0xef, 0x8d, 0xef, 0x8d, 0xef,
+ 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, 0xca, 0x02, 0xff, 0xca, 0x06, 0x00, 0x00, 0x32, 0xb4, 0x09, 0x12,
+ 0x7e, 0x57, 0x2a, 0x2d, 0x4d, 0x55, 0x68, 0x05, 0xa9, 0xd2, 0xb1, 0x80, 0x03, 0xa9, 0xc2, 0xb1,
+ 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x2a, 0x2f, 0x7e, 0x17, 0x2a, 0x2d, 0xc0,
+ 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x76, 0x6f, 0x02, 0x7b, 0x29, 0x7e, 0xb3,
+ 0x2a, 0x2c, 0xb4, 0x03, 0x15, 0x75, 0x31, 0xc2, 0x12, 0x7c, 0x15, 0x7e, 0x04, 0x00, 0x01, 0x7e,
+ 0x17, 0x2a, 0x2d, 0x7e, 0x57, 0x2a, 0x31, 0x02, 0x76, 0x73, 0xb4, 0x05, 0x39, 0x75, 0x31, 0xc0,
+ 0x12, 0x7c, 0x15, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x7e, 0x08, 0x2a, 0x3c,
+ 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37, 0x2a, 0x2d, 0x7e, 0x47, 0x2a, 0x31,
+ 0x12, 0x7c, 0x21, 0xd0, 0x87, 0xd0, 0xa8, 0x7e, 0x08, 0x2a, 0x3c, 0x7a, 0x0c, 0x00, 0x00, 0x7e,
+ 0x57, 0x2a, 0x31, 0x02, 0x76, 0x73, 0x02, 0x7b, 0x29, 0x75, 0x31, 0x07, 0x12, 0x7c, 0x15, 0x43,
+ 0xe1, 0xc0, 0x22, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x7b, 0x9e, 0x40,
+ 0x19, 0x7e, 0x08, 0x2a, 0x3c, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0xca, 0x49, 0x12, 0x7c, 0x21,
+ 0xda, 0x59, 0xda, 0x0b, 0xd0, 0x87, 0xd0, 0xa8, 0xc3, 0x22, 0xd0, 0x87, 0xd0, 0xa8, 0x22, 0xc0,
+ 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x7b, 0x9e, 0x40, 0x2b, 0x7e, 0x58, 0x00,
+ 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7f, 0x61, 0x7e, 0x78, 0x2a, 0x3c, 0x7a, 0x7c, 0x00, 0x00, 0x7e,
+ 0x77, 0x2a, 0x31, 0xbd, 0x74, 0x78, 0x11, 0x75, 0x31, 0xc1, 0x12, 0x7c, 0x15, 0x12, 0x7c, 0x5a,
+ 0x40, 0x06, 0xd0, 0x87, 0xd0, 0xa8, 0xc3, 0x22, 0xd0, 0x87, 0xd0, 0xa8, 0xd3, 0x22, 0x7e, 0x24,
+ 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62, 0x7d, 0x75, 0x7d,
+ 0x87, 0x7e, 0x34, 0x7f, 0xc2, 0x7e, 0x1b, 0xb0, 0x7e, 0x34, 0x7f, 0x03, 0xb4, 0x01, 0x04, 0x7e,
+ 0x34, 0x7f, 0xcc, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50,
+ 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc,
+ 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b,
+ 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b,
+ 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00,
+ 0xff, 0xc3, 0x22, 0xd3, 0x22,
+
+// Segment #16, Start Address 00ff7fc6, Length 4
+0xff,0x00,0xc6,0x7f,0x04,0x00,
+ 0x01, 0x10, 0x04, 0x00,
+
+// Segment #17, Start Address 00ff7c15, Length 330
+0xff,0x00,0x15,0x7c,0x4a,0x01,
+ 0xca, 0x08, 0x7e, 0x01, 0x31, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x7e, 0x1b, 0xc0, 0x7a,
+ 0x0b, 0xc0, 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b,
+ 0xfc, 0x7c, 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e,
+ 0x44, 0x00, 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78,
+ 0xfa, 0x7f, 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00,
+ 0x40, 0x9d, 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x7c, 0x84,
+ 0xda, 0x79, 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x43,
+ 0x90, 0x30, 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb5, 0x2a, 0xaa, 0x74, 0xa0,
+ 0x39, 0xb5, 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d, 0x70, 0x50, 0x06, 0x2d, 0x70, 0x7d, 0x07,
+ 0x6d, 0x77, 0x7c, 0x31, 0x7e, 0x7b, 0x00, 0x7a, 0x6b, 0x00, 0x0b, 0x7c, 0x0b, 0x6c, 0xa5, 0xd9,
+ 0xf3, 0x7f, 0x16, 0x1b, 0x1c, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x1b, 0x10, 0xbc, 0x10, 0x68, 0x06,
+ 0x1b, 0x54, 0x78, 0xf5, 0x80, 0x2c, 0x6d, 0x00, 0x7c, 0x20, 0x7f, 0x16, 0x9f, 0x10, 0x7f, 0x27,
+ 0x9f, 0x20, 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc, 0x01, 0x78, 0x16, 0x0b, 0x2c, 0x0b, 0x1c,
+ 0xa5, 0xdb, 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x03, 0x63, 0x90, 0x30, 0x4d, 0x77, 0x78, 0x93, 0xc2,
+ 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00, 0x04, 0x00, 0x04, 0x42, 0x08, 0x06, 0x04, 0x02, 0x04, 0x00,
+ 0x02, 0x01, 0x04, 0x01, 0x02, 0x82, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x04, 0x02, 0x08, 0x10, 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x00,
+ 0x01, 0x00, 0x02, 0x00, 0x02, 0x02, 0x08, 0x02, 0x04, 0x20, 0x04, 0x7e, 0x18, 0x7f, 0xbd, 0x7a,
+ 0x1c, 0x00, 0xfe, 0x0b, 0x1a, 0x00, 0x5e, 0x10, 0x1f, 0xbe, 0x10, 0x1a, 0x38, 0x1a, 0x0a, 0x51,
+ 0x23, 0x7e, 0x18, 0x7c, 0xfa, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, 0x08,
+ 0xa5, 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe,
+};
+
+static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
+ 1, 16, 4 }; // Major, Minor, Build
+
+#undef IMAGE_VERSION_NAME
+
+#undef IMAGE_ARRAY_NAME
+
diff --git a/drivers/usb/serial/io_fw_down2.h b/drivers/usb/serial/io_fw_down2.h
new file mode 100644
index 000000000000..067277efd3b2
--- /dev/null
+++ b/drivers/usb/serial/io_fw_down2.h
@@ -0,0 +1,1133 @@
+//**************************************************************
+//* Edgeport/4 Binary Image
+//* Generated by HEX2C v1.06
+//* Copyright (C) 1998 Inside Out Networks, All rights reserved.
+//* 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.
+//**************************************************************
+
+
+//Image structure definition
+#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
+ #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
+ struct edge_firmware_image_record {
+ __le16 ExtAddr;
+ __le16 Addr;
+ __le16 Len;
+ unsigned char Data[0];
+ } __attribute__ ((packed));
+
+ struct edge_firmware_version_info {
+ unsigned char MajorVersion;
+ unsigned char MinorVersion;
+ unsigned short BuildNumber;
+ };
+
+#endif
+
+#if !defined(IMAGE_ARRAY_NAME)
+ #define IMAGE_ARRAY_NAME FirmwareImage
+ #define IMAGE_VERSION_NAME FirmwareImageVersion
+#endif
+
+static unsigned char IMAGE_ARRAY_NAME[] = {
+
+// Segment #1, Start Address 00ff0000, Length 6
+0xff,0x00,0x00,0x00,0x06,0x00,
+ 0x02, 0x00, 0x80, 0x02, 0x45, 0x14,
+
+// Segment #2, Start Address 00ff000b, Length 3
+0xff,0x00,0x0b,0x00,0x03,0x00,
+ 0x02, 0x44, 0xa5,
+
+// Segment #3, Start Address 00ff0013, Length 3
+0xff,0x00,0x13,0x00,0x03,0x00,
+ 0x02, 0x63, 0xab,
+
+// Segment #4, Start Address 00ff001b, Length 3
+0xff,0x00,0x1b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x1b,
+
+// Segment #5, Start Address 00ff0023, Length 3
+0xff,0x00,0x23,0x00,0x03,0x00,
+ 0x02, 0x00, 0x23,
+
+// Segment #6, Start Address 00ff002b, Length 3
+0xff,0x00,0x2b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x2b,
+
+// Segment #7, Start Address 00ff0033, Length 3
+0xff,0x00,0x33,0x00,0x03,0x00,
+ 0x02, 0x00, 0x33,
+
+// Segment #8, Start Address 00ff003b, Length 3
+0xff,0x00,0x3b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x3b,
+
+// Segment #9, Start Address 00ff0043, Length 3
+0xff,0x00,0x43,0x00,0x03,0x00,
+ 0x02, 0x00, 0x43,
+
+// Segment #10, Start Address 00ff004b, Length 3
+0xff,0x00,0x4b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x4b,
+
+// Segment #11, Start Address 00ff0053, Length 3
+0xff,0x00,0x53,0x00,0x03,0x00,
+ 0x02, 0x67, 0x5f,
+
+// Segment #12, Start Address 00ff007b, Length 3
+0xff,0x00,0x7b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x7b,
+
+// Segment #13, Start Address 00ff0080, Length 7
+0xff,0x00,0x80,0x00,0x07,0x00,
+ 0x7e, 0x14, 0x00, 0x00, 0x02, 0x40, 0x52,
+
+// Segment #14, Start Address 00ff3000, Length 2918
+0xff,0x00,0x00,0x30,0x66,0x0b,
+ 0x12, 0x30, 0x64, 0x12, 0x30, 0xff, 0x12, 0x31, 0x2f, 0x12, 0x30, 0xb0, 0x80, 0xf2, 0xe5, 0x23,
+ 0x60, 0x19, 0x7e, 0x14, 0x00, 0x00, 0x09, 0xb1, 0x01, 0xb9, 0xb4, 0x00, 0x02, 0x80, 0x05, 0x14,
+ 0x19, 0xb1, 0x01, 0xb9, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xeb, 0x22, 0xc2, 0xaf, 0x7e, 0xb3,
+ 0x3f, 0xf1, 0xb4, 0x01, 0x03, 0x12, 0x65, 0x67, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x7e, 0xb3, 0x3f,
+ 0xf1, 0xb4, 0x01, 0x1d, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x1a, 0x6c, 0xaa,
+ 0x60, 0x0f, 0xca, 0x0b, 0xca, 0x39, 0xca, 0x59, 0x12, 0x64, 0x24, 0xda, 0x59, 0xda, 0x39, 0xda,
+ 0x0b, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0xe5, 0x22, 0x60, 0x43, 0x7e, 0x07, 0x01, 0xcb, 0xbe, 0x04,
+ 0x03, 0x80, 0x38, 0x39, 0x7e, 0x04, 0x80, 0x00, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x21, 0x09, 0xa0,
+ 0x00, 0x04, 0x4e, 0xa0, 0x05, 0x19, 0xa0, 0x00, 0x04, 0x0a, 0x32, 0x09, 0x53, 0x35, 0x33, 0x5e,
+ 0x51, 0x27, 0x68, 0x0b, 0x09, 0xa0, 0x00, 0x10, 0x4e, 0xa0, 0x01, 0x19, 0xa0, 0x00, 0x10, 0x2e,
+ 0x04, 0x01, 0x00, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xd1, 0x75, 0x22, 0x00, 0xd2, 0xaf, 0x22,
+ 0xc2, 0xaf, 0xe5, 0x26, 0x60, 0x36, 0x7e, 0x20, 0x00, 0x7e, 0x30, 0x01, 0xe5, 0x26, 0xa5, 0x5b,
+ 0x68, 0x21, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x32, 0x01, 0x79, 0xbe, 0x34, 0x00, 0x00, 0x68,
+ 0x12, 0x7e, 0xb1, 0x21, 0xa5, 0x4b, 0x7a, 0xb1, 0x21, 0xca, 0x19, 0x49, 0x22, 0x30, 0xef, 0x99,
+ 0x24, 0xda, 0x19, 0x3e, 0x30, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xd0, 0xd2, 0xaf, 0x22, 0x46,
+ 0x4f, 0x49, 0x7c, 0x4c, 0xa9, 0x4f, 0xd6, 0x53, 0x03, 0x56, 0x30, 0x59, 0x5d, 0x5c, 0x8a, 0xc2,
+ 0xaf, 0xe5, 0x24, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x31, 0x1c,
+ 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xef, 0xd2, 0xaf, 0x22, 0xca, 0x28, 0x12, 0x35,
+ 0x4c, 0xda, 0x28, 0x40, 0x09, 0x0a, 0x22, 0x09, 0xb2, 0x35, 0x33, 0xf4, 0x52, 0x24, 0x22, 0xc2,
+ 0xaf, 0xe5, 0x23, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x31, 0x4c,
+ 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23, 0x0a,
+ 0x2b, 0x49, 0x22, 0x31, 0x57, 0x89, 0x24, 0x31, 0x67, 0x31, 0xd0, 0x32, 0x39, 0x32, 0xa2, 0x33,
+ 0x0b, 0x33, 0x74, 0x33, 0xdd, 0x34, 0x46, 0x7e, 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, 0x00, 0x78,
+ 0x24, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8,
+ 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x49, 0x45, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18,
+ 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x89, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x89, 0x7e,
+ 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xb9, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xb9, 0xa5, 0xbe, 0x00, 0x1f,
+ 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f,
+ 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x18, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xb9, 0x12, 0x64, 0x86, 0x22,
+ 0x7e, 0x27, 0x01, 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x81, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x4c, 0x72, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0x8b, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8b, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xba, 0x80,
+ 0x27, 0x7e, 0x63, 0x01, 0xba, 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e,
+ 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x19, 0x6c,
+ 0x00, 0x7a, 0x03, 0x01, 0xba, 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01, 0x7d, 0xbe, 0x24, 0x00,
+ 0x00, 0x78, 0x24, 0x7e, 0x24, 0x82, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e,
+ 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4f, 0x9f, 0x7d, 0x21, 0xda, 0x19, 0x30,
+ 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x8d, 0x68, 0x0d, 0x7a, 0x27, 0x01,
+ 0x8d, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbb, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xbb, 0xa5, 0xbe,
+ 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11,
+ 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x1a, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xbb, 0x12, 0x64,
+ 0x86, 0x22, 0x7e, 0x27, 0x01, 0x7f, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x83, 0x00,
+ 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d,
+ 0x12, 0x12, 0x52, 0xcc, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e,
+ 0xbe, 0x27, 0x01, 0x8f, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8f, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01,
+ 0xbc, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xbc, 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0,
+ 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2,
+ 0x1b, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xbc, 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01, 0x81, 0xbe,
+ 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x84, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e,
+ 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x55, 0xf9, 0x7d, 0x21, 0xda,
+ 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x91, 0x68, 0x0d, 0x7a,
+ 0x27, 0x01, 0x91, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbd, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xbd,
+ 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36,
+ 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x1c, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xbd,
+ 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24,
+ 0x85, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca,
+ 0x19, 0x7d, 0x12, 0x12, 0x59, 0x26, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00,
+ 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x93, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x93, 0x7e, 0x60, 0x9c, 0x7a,
+ 0x63, 0x01, 0xbe, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xbe, 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01,
+ 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73,
+ 0x35, 0xc2, 0x1d, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xbe, 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01,
+ 0x85, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x86, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca,
+ 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5c, 0x53, 0x7d,
+ 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x95, 0x68,
+ 0x0d, 0x7a, 0x27, 0x01, 0x95, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbf, 0x80, 0x27, 0x7e, 0x63,
+ 0x01, 0xbf, 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12,
+ 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x1e, 0x6c, 0x00, 0x7a, 0x03,
+ 0x01, 0xbf, 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01, 0x87, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24,
+ 0x7e, 0x24, 0x87, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68,
+ 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5f, 0x80, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e,
+ 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x97, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x97, 0x7e, 0x60,
+ 0x9c, 0x7a, 0x63, 0x01, 0xc0, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xc0, 0xa5, 0xbe, 0x00, 0x1f, 0x7e,
+ 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3,
+ 0x12, 0x73, 0x35, 0xc2, 0x1f, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xc0, 0x12, 0x64, 0x86, 0x22, 0xc2,
+ 0xaf, 0x7e, 0x07, 0x01, 0xcb, 0xbe, 0x04, 0x00, 0x00, 0x78, 0x28, 0x74, 0x20, 0x7a, 0xb3, 0x91,
+ 0x00, 0x7e, 0xb3, 0x91, 0x15, 0x30, 0xe5, 0x1b, 0x7e, 0xb3, 0x91, 0x1a, 0xbe, 0xb0, 0x3f, 0x38,
+ 0x0c, 0x85, 0x31, 0x2f, 0x12, 0x73, 0x35, 0x74, 0x80, 0x7a, 0xb3, 0x91, 0x1e, 0x74, 0x20, 0x7a,
+ 0xb3, 0x91, 0x15, 0xd2, 0xaf, 0x22, 0x35, 0x3b, 0x36, 0xe8, 0x37, 0x00, 0x37, 0x1b, 0x37, 0xb6,
+ 0x38, 0x4e, 0x38, 0x69, 0x38, 0xfb, 0x38, 0x84, 0x38, 0xc5, 0x7c, 0xb3, 0xbe, 0xb0, 0x09, 0x28,
+ 0x22, 0x75, 0x2f, 0x09, 0x12, 0x73, 0x35, 0x75, 0x57, 0x02, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x00,
+ 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x11, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x01, 0x7a, 0xb3,
+ 0x91, 0x11, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x23, 0x6c, 0xaa, 0x2e, 0x54, 0x34, 0xe6, 0x0b, 0x58,
+ 0x50, 0x89, 0x54, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x75, 0x2f, 0xb0, 0x12, 0x73,
+ 0x35, 0x0a, 0x22, 0x09, 0xb2, 0x35, 0x33, 0x42, 0x24, 0xd0, 0xa8, 0x22, 0x7c, 0xb2, 0x23, 0x0a,
+ 0x3b, 0x49, 0x33, 0x35, 0x57, 0x89, 0x34, 0x35, 0x67, 0x35, 0x95, 0x35, 0xc3, 0x35, 0xf1, 0x36,
+ 0x1f, 0x36, 0x4d, 0x36, 0x7b, 0x36, 0xa9, 0x12, 0x41, 0xba, 0xd2, 0x28, 0xd2, 0x08, 0xc2, 0x40,
+ 0xc2, 0x48, 0xc2, 0x38, 0xc2, 0x30, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xb9, 0x7e, 0x04, 0x00, 0x20,
+ 0x7a, 0x07, 0x01, 0x99, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xa9, 0x12, 0x41, 0x27, 0x12,
+ 0x5f, 0xb7, 0x02, 0x36, 0xd7, 0x12, 0x41, 0xd7, 0xd2, 0x29, 0xd2, 0x09, 0xc2, 0x41, 0xc2, 0x49,
+ 0xc2, 0x39, 0xc2, 0x31, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xba, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07,
+ 0x01, 0x9b, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xab, 0x12, 0x41, 0x27, 0x12, 0x5f, 0xe0,
+ 0x02, 0x36, 0xd7, 0x12, 0x41, 0xf4, 0xd2, 0x2a, 0xd2, 0x0a, 0xc2, 0x42, 0xc2, 0x4a, 0xc2, 0x3a,
+ 0xc2, 0x32, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbb, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0x9d,
+ 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xad, 0x12, 0x41, 0x27, 0x12, 0x60, 0x09, 0x02, 0x36,
+ 0xd7, 0x12, 0x42, 0x11, 0xd2, 0x2b, 0xd2, 0x0b, 0xc2, 0x43, 0xc2, 0x4b, 0xc2, 0x3b, 0xc2, 0x33,
+ 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbc, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0x9f, 0x7e, 0x04,
+ 0x00, 0x38, 0x7a, 0x07, 0x01, 0xaf, 0x12, 0x41, 0x27, 0x12, 0x60, 0x32, 0x02, 0x36, 0xd7, 0x12,
+ 0x42, 0x2e, 0xd2, 0x2c, 0xd2, 0x0c, 0xc2, 0x44, 0xc2, 0x4c, 0xc2, 0x3c, 0xc2, 0x34, 0x6d, 0x00,
+ 0x7a, 0x03, 0x01, 0xbd, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa1, 0x7e, 0x04, 0x00, 0x38,
+ 0x7a, 0x07, 0x01, 0xb1, 0x12, 0x41, 0x27, 0x12, 0x60, 0x5b, 0x02, 0x36, 0xd7, 0x12, 0x42, 0x4b,
+ 0xd2, 0x2d, 0xd2, 0x0d, 0xc2, 0x45, 0xc2, 0x4d, 0xc2, 0x3d, 0xc2, 0x35, 0x6d, 0x00, 0x7a, 0x03,
+ 0x01, 0xbe, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa3, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07,
+ 0x01, 0xb3, 0x12, 0x41, 0x27, 0x12, 0x60, 0x84, 0x02, 0x36, 0xd7, 0x12, 0x42, 0x68, 0xd2, 0x2e,
+ 0xd2, 0x0e, 0xc2, 0x46, 0xc2, 0x4e, 0xc2, 0x3e, 0xc2, 0x36, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbf,
+ 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa5, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xb5,
+ 0x12, 0x41, 0x27, 0x12, 0x60, 0xad, 0x02, 0x36, 0xd7, 0x12, 0x42, 0x85, 0xd2, 0x2f, 0xd2, 0x0f,
+ 0xc2, 0x47, 0xc2, 0x4f, 0xc2, 0x3f, 0xc2, 0x37, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xc0, 0x7e, 0x04,
+ 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa7, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xb7, 0x12, 0x41,
+ 0x27, 0x12, 0x60, 0xd6, 0x02, 0x36, 0xd7, 0x7e, 0xa0, 0xd0, 0x7e, 0x60, 0x0f, 0x12, 0x61, 0x36,
+ 0x40, 0x05, 0x12, 0x64, 0x86, 0xc2, 0xd7, 0x22, 0x75, 0x2f, 0xb1, 0x12, 0x73, 0x35, 0x0a, 0x52,
+ 0x23, 0x6d, 0x00, 0x59, 0x05, 0x00, 0x32, 0x12, 0x41, 0x83, 0x12, 0x41, 0x9f, 0xd0, 0xa8, 0x22,
+ 0x75, 0x2f, 0xb2, 0x12, 0x73, 0x35, 0x0a, 0x22, 0x09, 0xb2, 0x35, 0x33, 0x42, 0x23, 0x7e, 0xb0,
+ 0x9c, 0x19, 0xb2, 0x01, 0xb9, 0x12, 0x31, 0x4c, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c,
+ 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x19,
+ 0x30, 0x00, 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x12, 0x44, 0x40, 0xca, 0xb8, 0x09, 0xb0,
+ 0x00, 0x10, 0x44, 0x02, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x02, 0x54, 0xbf, 0x7c, 0x74,
+ 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x08, 0x80, 0x02, 0x54, 0xf7, 0x09, 0x30, 0x00, 0x0c, 0xca,
+ 0xb8, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xda, 0xb8, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00,
+ 0x0c, 0x0a, 0x62, 0x09, 0xb6, 0x35, 0x33, 0x3e, 0x20, 0x0a, 0x62, 0x7c, 0x74, 0x5e, 0x70, 0x02,
+ 0x68, 0x20, 0x42, 0x27, 0xca, 0xb8, 0x74, 0x61, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x10,
+ 0x59, 0x46, 0x01, 0xa9, 0x09, 0xb0, 0x00, 0x10, 0x44, 0x01, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8,
+ 0x80, 0x11, 0xf4, 0x52, 0x27, 0x74, 0xa1, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x38, 0x59,
+ 0x46, 0x01, 0xa9, 0xd0, 0xa8, 0x22, 0x7c, 0x74, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30,
+ 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x7c, 0x74, 0x5e, 0x70,
+ 0x01, 0x68, 0x04, 0x44, 0x80, 0x80, 0x02, 0x54, 0x7f, 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04,
+ 0x44, 0x02, 0x80, 0x02, 0x54, 0xfd, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, 0x62,
+ 0x09, 0xb6, 0x35, 0x33, 0xa5, 0xfd, 0xf4, 0xa5, 0xfe, 0xca, 0x28, 0x3e, 0x20, 0x0a, 0x62, 0xda,
+ 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x10, 0xa5, 0xed, 0x42, 0x28, 0x42, 0x26, 0x7e, 0x44,
+ 0x00, 0x08, 0x59, 0x46, 0x01, 0x99, 0x80, 0x04, 0xa5, 0xee, 0x52, 0x28, 0x7c, 0x74, 0x5e, 0x70,
+ 0x04, 0x68, 0x10, 0xa5, 0xed, 0x42, 0x29, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01,
+ 0x99, 0x80, 0x15, 0xa5, 0xee, 0x52, 0x29, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x78, 0x0a, 0x52, 0x26,
+ 0x7e, 0x44, 0x00, 0x20, 0x59, 0x46, 0x01, 0x99, 0x12, 0x42, 0xa2, 0xd0, 0xa8, 0x22, 0x7e, 0x04,
+ 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40,
+ 0x00, 0x10, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09,
+ 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, 0x00, 0x18, 0x19, 0x30, 0x00,
+ 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb5, 0x12, 0x73, 0x35, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02,
+ 0x09, 0xb0, 0x00, 0x0c, 0x44, 0x40, 0x19, 0xb0, 0x00, 0x0c, 0xe5, 0x58, 0xb4, 0x07, 0x23, 0x09,
+ 0xb0, 0x00, 0x10, 0x4e, 0xb0, 0x02, 0x19, 0xb0, 0x00, 0x10, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf,
+ 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x04, 0x54, 0xf7, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30,
+ 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb6, 0x12, 0x73, 0x35, 0x7e, 0x04, 0x80, 0x00, 0x4c,
+ 0x02, 0xe5, 0x58, 0xb4, 0x07, 0x18, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c,
+ 0x09, 0xb0, 0x00, 0x04, 0x44, 0x08, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30, 0x00, 0x0c, 0x09, 0xb0,
+ 0x00, 0x0c, 0x54, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb4, 0x12, 0x73,
+ 0x35, 0x7a, 0x21, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x41, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0xb0, 0x01,
+ 0x7e, 0xa0, 0xc8, 0x7c, 0x64, 0x12, 0x61, 0x36, 0x12, 0x64, 0x86, 0xd0, 0xa8, 0x22, 0x39, 0x2e,
+ 0x39, 0x75, 0x39, 0xbc, 0x3a, 0x03, 0x3a, 0x4a, 0x3a, 0x91, 0x3a, 0xd8, 0x3b, 0x1f, 0x75, 0x2f,
+ 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35,
+ 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x69, 0x7e, 0x27, 0x01, 0x79, 0x2d, 0x23,
+ 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x08, 0x2c, 0x38, 0x0f,
+ 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x69, 0x7a, 0x27, 0x01, 0x79, 0x02, 0x46, 0x4f, 0x7e,
+ 0x14, 0x04, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x01, 0x12, 0x73,
+ 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01,
+ 0x6b, 0x7e, 0x27, 0x01, 0x7b, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b,
+ 0x14, 0xbe, 0x14, 0x0c, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6b, 0x7a,
+ 0x27, 0x01, 0x7b, 0x02, 0x49, 0x7c, 0x7e, 0x14, 0x08, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12,
+ 0x73, 0x35, 0x75, 0x2f, 0x02, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71,
+ 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x6d, 0x7e, 0x27, 0x01, 0x7d, 0x2d, 0x23, 0x7e, 0x09,
+ 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x10, 0x2c, 0x38, 0x0f, 0x1b, 0x34,
+ 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6d, 0x7a, 0x27, 0x01, 0x7d, 0x02, 0x4c, 0xa9, 0x7e, 0x14, 0x0c,
+ 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x03, 0x12, 0x73, 0x35, 0x7a,
+ 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x6f, 0x7e,
+ 0x27, 0x01, 0x7f, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe,
+ 0x14, 0x14, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6f, 0x7a, 0x27, 0x01,
+ 0x7f, 0x02, 0x4f, 0xd6, 0x7e, 0x14, 0x10, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35,
+ 0x75, 0x2f, 0x04, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12,
+ 0x73, 0x35, 0x7e, 0x17, 0x01, 0x71, 0x7e, 0x27, 0x01, 0x81, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b,
+ 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x18, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec,
+ 0x7a, 0x17, 0x01, 0x71, 0x7a, 0x27, 0x01, 0x81, 0x02, 0x53, 0x03, 0x7e, 0x14, 0x14, 0x2d, 0x80,
+ 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x05, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f,
+ 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x73, 0x7e, 0x27, 0x01,
+ 0x83, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x1c,
+ 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x73, 0x7a, 0x27, 0x01, 0x83, 0x02,
+ 0x56, 0x30, 0x7e, 0x14, 0x18, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f,
+ 0x06, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35,
+ 0x7e, 0x17, 0x01, 0x75, 0x7e, 0x27, 0x01, 0x85, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a,
+ 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x20, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17,
+ 0x01, 0x75, 0x7a, 0x27, 0x01, 0x85, 0x02, 0x59, 0x5d, 0x7e, 0x14, 0x1c, 0x2d, 0x80, 0xeb, 0x75,
+ 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x07, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73,
+ 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x77, 0x7e, 0x27, 0x01, 0x87, 0x2d,
+ 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x24, 0x2c, 0x38,
+ 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x77, 0x7a, 0x27, 0x01, 0x87, 0x02, 0x5c, 0x8a,
+ 0x7e, 0x14, 0x20, 0x2d, 0x80, 0xeb,
+
+// Segment #15, Start Address 00ff4000, Length 13109
+0xff,0x00,0x00,0x40,0x35,0x33,
+ 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x14, 0x7f, 0xf8, 0x7e, 0x24, 0x00, 0xfe, 0x7d, 0x31, 0x0b, 0x1a,
+ 0x50, 0x1b, 0x0a, 0x50, 0x7e, 0x14, 0x40, 0x1b, 0x02, 0x40, 0x74, 0x7e, 0xf8, 0x00, 0x59, 0x75,
+ 0xb0, 0xdf, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x90, 0x00, 0x7e, 0xf4, 0x40, 0x30, 0x02, 0x40, 0x8b,
+ 0x12, 0x74, 0x4e, 0xf5, 0x2e, 0x7a, 0xa1, 0x2d, 0x7a, 0x11, 0x58, 0x12, 0x6b, 0x02, 0x12, 0x40,
+ 0xeb, 0x7e, 0xb3, 0x3f, 0xf1, 0x60, 0x03, 0x12, 0x43, 0x79, 0x12, 0x6b, 0xde, 0xd2, 0xaf, 0x02,
+ 0x30, 0x00, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, 0x40, 0x60, 0x7a, 0x1c, 0x00, 0x01, 0x89, 0x18,
+ 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x94, 0x00, 0x7a, 0xb3, 0x2c, 0x35, 0x7e, 0xb0, 0x01, 0x7a, 0xb3,
+ 0x93, 0x00, 0x89, 0x08, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, 0x40, 0x82, 0x7a, 0x1c, 0x00, 0x01,
+ 0x89, 0x18, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x93, 0x00, 0x89, 0x08, 0x7e, 0x08, 0x00, 0x20, 0x7e,
+ 0x44, 0x04, 0x00, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0x9d, 0x02, 0x73, 0x50, 0x7e, 0x08, 0x01,
+ 0x59, 0x7e, 0x44, 0x2a, 0xdd, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0xaf, 0x02, 0x73, 0x50, 0x7e,
+ 0x08, 0x00, 0x59, 0x7e, 0x44, 0x01, 0x00, 0x7e, 0x40, 0x53, 0x7e, 0xe4, 0x40, 0xc1, 0x02, 0x73,
+ 0x50, 0x75, 0x57, 0x01, 0x75, 0x56, 0x00, 0x7e, 0x04, 0x00, 0x08, 0x75, 0x54, 0x58, 0x75, 0x55,
+ 0x08, 0x75, 0x51, 0x08, 0x75, 0x53, 0x01, 0x75, 0x89, 0x01, 0x75, 0x8a, 0x01, 0x75, 0x8c, 0x00,
+ 0xd2, 0x8c, 0x7e, 0x04, 0x00, 0x02, 0x7a, 0x05, 0x42, 0x89, 0xf4, 0x75, 0xb7, 0x7f, 0x75, 0xb8,
+ 0x7f, 0x75, 0xb3, 0x01, 0x75, 0xb2, 0x01, 0xd2, 0xa9, 0x22, 0x75, 0xb0, 0xdf, 0xe4, 0xd5, 0xe0,
+ 0xfd, 0x75, 0xb0, 0xef, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x2e, 0x7e, 0xa0, 0x08, 0x19, 0xa2,
+ 0x00, 0x10, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf2, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x83, 0x0b,
+ 0x20, 0xbe, 0x21, 0x2e, 0x78, 0xf6, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x74, 0xbf, 0x19,
+ 0xb0, 0x00, 0x0c, 0x74, 0x10, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x80, 0x19, 0xb0, 0x00, 0x0c, 0x7e,
+ 0x54, 0x00, 0x02, 0x19, 0xa0, 0x00, 0x04, 0x19, 0xb0, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb0, 0x00,
+ 0x0c, 0x74, 0x07, 0x20, 0x68, 0x02, 0x74, 0x0f, 0x19, 0xb0, 0x00, 0x04, 0x30, 0x6b, 0x17, 0x74,
+ 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x74, 0x28, 0x20, 0x68, 0x02, 0x74, 0x20, 0x19, 0xb0, 0x00, 0x04,
+ 0x74, 0x03, 0x19, 0xb0, 0x00, 0x0c, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x0c, 0x19, 0xb0,
+ 0x00, 0x10, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0xe4, 0x19, 0xb0, 0x00, 0x04, 0x09, 0xb0,
+ 0x00, 0x10, 0x54, 0x08, 0x19, 0xb0, 0x00, 0x10, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x22, 0x7c,
+ 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x41, 0xaa, 0x89, 0x24, 0x41, 0xba, 0x41, 0xd7, 0x41, 0xf4,
+ 0x42, 0x11, 0x42, 0x2e, 0x42, 0x4b, 0x42, 0x68, 0x42, 0x85, 0xc2, 0x10, 0xc2, 0x18, 0xc2, 0x08,
+ 0x7e, 0x04, 0x04, 0x2d, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07, 0x01, 0x69, 0x6d, 0x00, 0x7a, 0x07,
+ 0x01, 0x79, 0x7a, 0x07, 0x01, 0x89, 0x22, 0xc2, 0x11, 0xc2, 0x19, 0xc2, 0x09, 0x7e, 0x04, 0x08,
+ 0x2d, 0x7a, 0x07, 0x01, 0x5b, 0x7a, 0x07, 0x01, 0x6b, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7b, 0x7a,
+ 0x07, 0x01, 0x8b, 0x22, 0xc2, 0x12, 0xc2, 0x1a, 0xc2, 0x0a, 0x7e, 0x04, 0x0c, 0x2d, 0x7a, 0x07,
+ 0x01, 0x5d, 0x7a, 0x07, 0x01, 0x6d, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7d, 0x7a, 0x07, 0x01, 0x8d,
+ 0x22, 0xc2, 0x13, 0xc2, 0x1b, 0xc2, 0x0b, 0x7e, 0x04, 0x10, 0x2d, 0x7a, 0x07, 0x01, 0x5f, 0x7a,
+ 0x07, 0x01, 0x6f, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7f, 0x7a, 0x07, 0x01, 0x8f, 0x22, 0xc2, 0x14,
+ 0xc2, 0x1c, 0xc2, 0x0c, 0x7e, 0x04, 0x14, 0x2d, 0x7a, 0x07, 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71,
+ 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x81, 0x7a, 0x07, 0x01, 0x91, 0x22, 0xc2, 0x15, 0xc2, 0x1d, 0xc2,
+ 0x0d, 0x7e, 0x04, 0x18, 0x2d, 0x7a, 0x07, 0x01, 0x63, 0x7a, 0x07, 0x01, 0x73, 0x6d, 0x00, 0x7a,
+ 0x07, 0x01, 0x83, 0x7a, 0x07, 0x01, 0x93, 0x22, 0xc2, 0x16, 0xc2, 0x1e, 0xc2, 0x0e, 0x7e, 0x04,
+ 0x1c, 0x2d, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x85,
+ 0x7a, 0x07, 0x01, 0x95, 0x22, 0xc2, 0x17, 0xc2, 0x1f, 0xc2, 0x0f, 0x7e, 0x04, 0x20, 0x2d, 0x7a,
+ 0x07, 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x87, 0x7a, 0x07, 0x01,
+ 0x97, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x42, 0xad, 0x89, 0x24, 0x42, 0xbd, 0x42,
+ 0xd4, 0x42, 0xeb, 0x43, 0x02, 0x43, 0x19, 0x43, 0x30, 0x43, 0x47, 0x43, 0x5e, 0x30, 0x40, 0x07,
+ 0x20, 0x58, 0x04, 0xc2, 0x28, 0x80, 0x0c, 0x30, 0x48, 0x07, 0x20, 0x50, 0x04, 0xc2, 0x28, 0x80,
+ 0x02, 0xd2, 0x28, 0x22, 0x30, 0x41, 0x07, 0x20, 0x59, 0x04, 0xc2, 0x29, 0x80, 0x0c, 0x30, 0x49,
+ 0x07, 0x20, 0x51, 0x04, 0xc2, 0x29, 0x80, 0x02, 0xd2, 0x29, 0x22, 0x30, 0x42, 0x07, 0x20, 0x5a,
+ 0x04, 0xc2, 0x2a, 0x80, 0x0c, 0x30, 0x4a, 0x07, 0x20, 0x52, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2,
+ 0x2a, 0x22, 0x30, 0x43, 0x07, 0x20, 0x5b, 0x04, 0xc2, 0x2b, 0x80, 0x0c, 0x30, 0x4b, 0x07, 0x20,
+ 0x53, 0x04, 0xc2, 0x2b, 0x80, 0x02, 0xd2, 0x2b, 0x22, 0x30, 0x44, 0x07, 0x20, 0x5c, 0x04, 0xc2,
+ 0x2c, 0x80, 0x0c, 0x30, 0x4c, 0x07, 0x20, 0x54, 0x04, 0xc2, 0x2c, 0x80, 0x02, 0xd2, 0x2c, 0x22,
+ 0x30, 0x45, 0x07, 0x20, 0x5d, 0x04, 0xc2, 0x2d, 0x80, 0x0c, 0x30, 0x4d, 0x07, 0x20, 0x55, 0x04,
+ 0xc2, 0x2d, 0x80, 0x02, 0xd2, 0x2d, 0x22, 0x30, 0x46, 0x07, 0x20, 0x5e, 0x04, 0xc2, 0x2e, 0x80,
+ 0x0c, 0x30, 0x4e, 0x07, 0x20, 0x56, 0x04, 0xc2, 0x2e, 0x80, 0x02, 0xd2, 0x2e, 0x22, 0x30, 0x47,
+ 0x07, 0x20, 0x5f, 0x04, 0xc2, 0x2f, 0x80, 0x0c, 0x30, 0x4f, 0x07, 0x20, 0x57, 0x04, 0xc2, 0x2f,
+ 0x80, 0x02, 0xd2, 0x2f, 0x22, 0x44, 0x66, 0x43, 0x8a, 0xbe, 0xb0, 0x02, 0x40, 0x01, 0x22, 0x23,
+ 0x0a, 0x5b, 0x49, 0x55, 0x43, 0x75, 0x99, 0x54, 0xd3, 0x22, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x94,
+ 0x00, 0x7a, 0xb3, 0x2c, 0x35, 0x12, 0x44, 0x7a, 0x7e, 0x04, 0x28, 0x2d, 0x7a, 0x07, 0x01, 0xc1,
+ 0x7a, 0x07, 0x01, 0xc3, 0x7e, 0x04, 0x24, 0x2d, 0x7a, 0x07, 0x01, 0xc7, 0x7a, 0x07, 0x01, 0xc9,
+ 0x7e, 0x04, 0x66, 0x7f, 0x7a, 0x05, 0x4b, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a,
+ 0xb3, 0x91, 0x1c, 0x74, 0x12, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x07, 0x74,
+ 0x1e, 0x7a, 0xb3, 0x91, 0x10, 0x74, 0x48, 0x7a, 0xb3, 0x91, 0x12, 0x74, 0x10, 0x7a, 0xb3, 0x91,
+ 0x13, 0x74, 0x3f, 0x7a, 0xb3, 0x91, 0x14, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a,
+ 0xb3, 0x91, 0x1c, 0x74, 0x14, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x07, 0x74,
+ 0x16, 0x7a, 0xb3, 0x91, 0x10, 0x74, 0x08, 0x7a, 0xb3, 0x91, 0x11, 0x74, 0x20, 0x7a, 0xb3, 0x91,
+ 0x13, 0x74, 0x3f, 0x7a, 0xb3, 0x91, 0x14, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a,
+ 0xb3, 0x91, 0x1c, 0x74, 0x16, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x07, 0x74,
+ 0x2f, 0x7a, 0xb3, 0x91, 0x10, 0x74, 0x48, 0x7a, 0xb3, 0x91, 0x12, 0x74, 0x10, 0x7a, 0xb3, 0x91,
+ 0x13, 0x74, 0x3f, 0x7a, 0xb3, 0x91, 0x14, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x0f, 0x7a,
+ 0xb3, 0x91, 0x07, 0x12, 0x40, 0xfa, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x9f, 0x0b, 0x20, 0xbe, 0x21,
+ 0x2e, 0x78, 0xf6, 0xd2, 0xa8, 0x22, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x94, 0x00, 0x7a, 0xb3, 0x2c,
+ 0x35, 0x12, 0x44, 0x7a, 0x75, 0xb0, 0xdf, 0xc2, 0xa8, 0x22, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x06,
+ 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x07, 0x7e, 0x20, 0x04, 0x7c, 0xb2, 0xc2, 0xd7, 0x13, 0x13, 0x13,
+ 0x13, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x74, 0x02, 0x7a, 0xb3, 0x91,
+ 0x12, 0xa5, 0xda, 0xe5, 0x22, 0xca, 0x09, 0x12, 0x30, 0x0e, 0x10, 0x01, 0x34, 0xd5, 0x51, 0x40,
+ 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07,
+ 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07, 0x7e, 0xb3, 0x91, 0x14, 0x7e, 0xb3,
+ 0x91, 0x04, 0x63, 0x53, 0x01, 0x7e, 0x00, 0x54, 0x2e, 0x01, 0x53, 0xa5, 0xe6, 0xf5, 0x51, 0x80,
+ 0x12, 0x20, 0x02, 0x1d, 0x75, 0x53, 0x00, 0x85, 0x54, 0x51, 0xd2, 0x02, 0x74, 0x03, 0x80, 0x0d,
+ 0x30, 0x02, 0x0e, 0xc2, 0x02, 0x7e, 0x00, 0x56, 0x2e, 0x01, 0x53, 0xa5, 0xe6, 0x7a, 0xb3, 0x90,
+ 0x00, 0xda, 0x09, 0x32, 0x45, 0x6f, 0x45, 0x8b, 0x45, 0xa7, 0x45, 0xc3, 0x45, 0xdf, 0x45, 0xfb,
+ 0x46, 0x17, 0x46, 0x33, 0xc0, 0xd0, 0xc0, 0xd1, 0xc0, 0xe0, 0xc0, 0xf0, 0xca, 0x0b, 0xca, 0x1b,
+ 0xca, 0x2b, 0xd2, 0x01, 0x75, 0x2f, 0x89, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x90, 0x00, 0x60, 0x28,
+ 0x7e, 0x14, 0x80, 0x00, 0x7e, 0x00, 0x00, 0x13, 0x50, 0x13, 0xca, 0x0b, 0xca, 0x59, 0x7c, 0xb0,
+ 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x45, 0x04, 0x99, 0x24, 0xda, 0x59, 0xda, 0x0b, 0xa5, 0x0a, 0xa5,
+ 0x08, 0xbe, 0x01, 0x2e, 0x78, 0xe1, 0x80, 0xd2, 0x30, 0x04, 0x05, 0xc2, 0x04, 0x12, 0x64, 0x86,
+ 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0xd0, 0xf0, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, 0x32, 0x09,
+ 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x80, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b,
+ 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x61, 0xab, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20,
+ 0xe0, 0x14, 0x75, 0x2f, 0x81, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff,
+ 0x69, 0x52, 0x61, 0xeb, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f,
+ 0x82, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x62, 0x2b,
+ 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x83, 0x12, 0x73, 0x35,
+ 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x62, 0x6b, 0x89, 0x54, 0x22, 0x09,
+ 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x84, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b,
+ 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x62, 0xab, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20,
+ 0xe0, 0x14, 0x75, 0x2f, 0x85, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff,
+ 0x69, 0x52, 0x62, 0xeb, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f,
+ 0x86, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0x2b,
+ 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x87, 0x12, 0x73, 0x35,
+ 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0x6b, 0x89, 0x54, 0x22, 0x10,
+ 0x08, 0x01, 0x22, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x75, 0x2f, 0xa0, 0x12, 0x73, 0x35, 0x7e,
+ 0x14, 0x80, 0x00, 0x80, 0x06, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca,
+ 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x49, 0x45, 0x30, 0x30, 0x06, 0x20, 0xe6,
+ 0x4f, 0xd2, 0x08, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x60, 0x7e, 0x37, 0x01, 0x79, 0x7e, 0x27, 0x01,
+ 0x99, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x32, 0x7a, 0x05, 0x32, 0x7a, 0x37, 0x01,
+ 0x79, 0x7e, 0x37, 0x01, 0x59, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x08, 0x2c, 0x38, 0x68, 0x7a,
+ 0x47, 0x01, 0x59, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12,
+ 0x69, 0xf0, 0x10, 0x60, 0xc4, 0x22, 0xc2, 0x60, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a,
+ 0x7e, 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x99, 0x28, 0x04,
+ 0x7e, 0x27, 0x01, 0x99, 0x7e, 0x37, 0x01, 0x79, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x32, 0x7a,
+ 0x05, 0x32, 0x7a, 0x37, 0x01, 0x79, 0x7e, 0x37, 0x01, 0x59, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44,
+ 0x08, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x59, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51,
+ 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f,
+ 0x12, 0x73, 0x35, 0x9e, 0x44, 0x08, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x04, 0x2d,
+ 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x59, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03,
+ 0x02, 0x46, 0xc2, 0x22, 0xd2, 0x08, 0x7e, 0x04, 0x04, 0x2d, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07,
+ 0x01, 0x69, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75,
+ 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda,
+ 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xa9, 0x2e, 0x24, 0x00, 0x02, 0x2d,
+ 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a,
+ 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38,
+ 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x00, 0x00, 0x2e, 0x27, 0x01, 0xa9, 0x1b, 0x38, 0x20,
+ 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73,
+ 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x38, 0x0a, 0x09, 0xb1,
+ 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f,
+ 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x00, 0x00, 0x2e, 0x67, 0x01,
+ 0xa9, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e,
+ 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39,
+ 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32,
+ 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x00, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b,
+ 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68,
+ 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e,
+ 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22,
+ 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d,
+ 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07,
+ 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70,
+ 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25,
+ 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e,
+ 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x48, 0x1e, 0x75, 0x2f,
+ 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x38,
+ 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0xda, 0xb8,
+ 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x48, 0x1e, 0xda, 0xb8, 0x02, 0x49,
+ 0x45, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f,
+ 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68,
+ 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x50,
+ 0x80, 0x02, 0xc2, 0x50, 0x12, 0x42, 0xbd, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35,
+ 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e,
+ 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13,
+ 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00,
+ 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x48, 0x72, 0x75, 0x2f,
+ 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x09, 0x01, 0x22,
+ 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x75, 0x2f, 0xa1, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x81, 0x00,
+ 0x80, 0x06, 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0,
+ 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x4c, 0x72, 0x30, 0x31, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x09,
+ 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x61, 0x7e, 0x37, 0x01, 0x7b, 0x7e, 0x27, 0x01, 0x9b, 0x9d, 0x32,
+ 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, 0x7a, 0x37, 0x01, 0x7b, 0x7e, 0x37,
+ 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0c, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5b,
+ 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10,
+ 0x61, 0xc4, 0x22, 0xc2, 0x61, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01,
+ 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x9b, 0x28, 0x04, 0x7e, 0x27, 0x01,
+ 0x9b, 0x7e, 0x37, 0x01, 0x7b, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, 0x7a,
+ 0x37, 0x01, 0x7b, 0x7e, 0x37, 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0c, 0x2c, 0x38,
+ 0x13, 0x7a, 0x47, 0x01, 0x5b, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73,
+ 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35,
+ 0x9e, 0x44, 0x0c, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x08, 0x2d, 0x7d, 0x24, 0x2d,
+ 0x43, 0x7a, 0x47, 0x01, 0x5b, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x49, 0xef,
+ 0x22, 0xd2, 0x09, 0x7e, 0x04, 0x08, 0x2d, 0x7a, 0x07, 0x01, 0x5b, 0x7a, 0x07, 0x01, 0x6b, 0x75,
+ 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12,
+ 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68,
+ 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xab, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34,
+ 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb,
+ 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47,
+ 0x01, 0xc9, 0x7e, 0x24, 0x01, 0x00, 0x2e, 0x27, 0x01, 0xab, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a,
+ 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1,
+ 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54,
+ 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35,
+ 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x01, 0x00, 0x2e, 0x67, 0x01, 0xab, 0x9e, 0x24,
+ 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d,
+ 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34,
+ 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54,
+ 0x0f, 0x23, 0x23, 0x23, 0x44, 0x01, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f,
+ 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07,
+ 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a,
+ 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24,
+ 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e,
+ 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e,
+ 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd,
+ 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09,
+ 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a,
+ 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x4b, 0x4b, 0x75, 0x2f, 0x99, 0x12, 0x73,
+ 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1,
+ 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8,
+ 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x4b, 0x4b, 0xda, 0xb8, 0x02, 0x4c, 0x72, 0x09, 0xb1,
+ 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x59,
+ 0x80, 0x02, 0xc2, 0x59, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x51, 0x80, 0x02, 0xc2,
+ 0x51, 0x12, 0x42, 0xd4, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00,
+ 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02,
+ 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e,
+ 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36,
+ 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4b, 0x9f, 0x75, 0x2f, 0x95, 0x12, 0x73,
+ 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0a, 0x01, 0x22, 0x20, 0x2a, 0x03,
+ 0xd2, 0x0a, 0x22, 0x75, 0x2f, 0xa2, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x82, 0x00, 0x80, 0x06, 0x20,
+ 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8,
+ 0x68, 0x03, 0x12, 0x4f, 0x9f, 0x30, 0x32, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0a, 0x22, 0x30, 0xe6,
+ 0x02, 0xd2, 0x62, 0x7e, 0x37, 0x01, 0x7d, 0x7e, 0x27, 0x01, 0x9d, 0x9d, 0x32, 0x40, 0x31, 0x7d,
+ 0x02, 0x2e, 0x05, 0x36, 0x7a, 0x05, 0x36, 0x7a, 0x37, 0x01, 0x7d, 0x7e, 0x37, 0x01, 0x5d, 0x7d,
+ 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x10, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5d, 0x75, 0x2f, 0x94,
+ 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x62, 0xc4, 0x22,
+ 0xc2, 0x62, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x7d, 0xbe, 0x24,
+ 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x9d, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x9d, 0x7e, 0x37,
+ 0x01, 0x7d, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x36, 0x7a, 0x05, 0x36, 0x7a, 0x37, 0x01, 0x7d,
+ 0x7e, 0x37, 0x01, 0x5d, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x10, 0x2c, 0x38, 0x13, 0x7a, 0x47,
+ 0x01, 0x5d, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69,
+ 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x10,
+ 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x0c, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47,
+ 0x01, 0x5d, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x4d, 0x1c, 0x22, 0xd2, 0x0a,
+ 0x7e, 0x04, 0x0c, 0x2d, 0x7a, 0x07, 0x01, 0x5d, 0x7a, 0x07, 0x01, 0x6d, 0x75, 0x2f, 0x94, 0x12,
+ 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2,
+ 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01,
+ 0xcb, 0x7e, 0x27, 0x01, 0xad, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38,
+ 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01,
+ 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e,
+ 0x24, 0x02, 0x00, 0x2e, 0x27, 0x01, 0xad, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12,
+ 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54,
+ 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1,
+ 0x00, 0x10, 0xd2, 0x12, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28,
+ 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x02, 0x00, 0x2e, 0x67, 0x01, 0xad, 0x9e, 0x24, 0x00, 0x02, 0x40,
+ 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d,
+ 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a,
+ 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23,
+ 0x23, 0x44, 0x02, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73,
+ 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e,
+ 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22,
+ 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28,
+ 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb,
+ 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d,
+ 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0,
+ 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14,
+ 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b,
+ 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x4e, 0x78, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1,
+ 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54,
+ 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x12, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68,
+ 0x07, 0xca, 0xb8, 0x12, 0x4e, 0x78, 0xda, 0xb8, 0x02, 0x4f, 0x9f, 0x09, 0xb1, 0x00, 0x18, 0x7e,
+ 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e,
+ 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, 0xc2,
+ 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x12, 0x42,
+ 0xeb, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1,
+ 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2,
+ 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda,
+ 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00,
+ 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4e, 0xcc, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75,
+ 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0b, 0x01, 0x22, 0x20, 0x2b, 0x03, 0xd2, 0x0b, 0x22,
+ 0x75, 0x2f, 0xa3, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x83, 0x00, 0x80, 0x06, 0x20, 0x2b, 0x03, 0xd2,
+ 0x0b, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12,
+ 0x52, 0xcc, 0x30, 0x33, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0b, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x63,
+ 0x7e, 0x37, 0x01, 0x7f, 0x7e, 0x27, 0x01, 0x9f, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05,
+ 0x38, 0x7a, 0x05, 0x38, 0x7a, 0x37, 0x01, 0x7f, 0x7e, 0x37, 0x01, 0x5f, 0x7d, 0x43, 0x2d, 0x42,
+ 0xbe, 0x44, 0x14, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5f, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35,
+ 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x63, 0xc4, 0x22, 0xc2, 0x63, 0x2d,
+ 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x7f, 0xbe, 0x24, 0x00, 0x00, 0x68,
+ 0x6a, 0xbe, 0x27, 0x01, 0x9f, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x9f, 0x7e, 0x37, 0x01, 0x7f, 0x9d,
+ 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x38, 0x7a, 0x05, 0x38, 0x7a, 0x37, 0x01, 0x7f, 0x7e, 0x37, 0x01,
+ 0x5f, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x14, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x5f, 0x75,
+ 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f,
+ 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x14, 0x2d, 0x9d, 0x24,
+ 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x10, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x5f, 0x12,
+ 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x50, 0x49, 0x22, 0xd2, 0x0b, 0x7e, 0x04, 0x10,
+ 0x2d, 0x7a, 0x07, 0x01, 0x5f, 0x7a, 0x07, 0x01, 0x6f, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75,
+ 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1,
+ 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27,
+ 0x01, 0xaf, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02,
+ 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43,
+ 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x03, 0x00,
+ 0x2e, 0x27, 0x01, 0xaf, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02,
+ 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1,
+ 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2,
+ 0x13, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24,
+ 0x7e, 0x64, 0x03, 0x00, 0x2e, 0x67, 0x01, 0xaf, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38,
+ 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47,
+ 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b,
+ 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x03,
+ 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71,
+ 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb,
+ 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09,
+ 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24,
+ 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03,
+ 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b,
+ 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d,
+ 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54,
+ 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24,
+ 0x78, 0xe7, 0x02, 0x51, 0xa5, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54,
+ 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1,
+ 0x00, 0x10, 0xd2, 0x13, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8,
+ 0x12, 0x51, 0xa5, 0xda, 0xb8, 0x02, 0x52, 0xcc, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75,
+ 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68,
+ 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5b, 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd,
+ 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x53, 0x80, 0x02, 0xc2, 0x53, 0x12, 0x43, 0x02, 0x02, 0x61,
+ 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73,
+ 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1,
+ 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12,
+ 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0,
+ 0xdb, 0x22, 0x02, 0x51, 0xf9, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12,
+ 0x73, 0x35, 0x22, 0x10, 0x0c, 0x01, 0x22, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x75, 0x2f, 0xa4,
+ 0x12, 0x73, 0x35, 0x7e, 0x14, 0x84, 0x00, 0x80, 0x06, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x09,
+ 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x55, 0xf9, 0x30,
+ 0x34, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0c, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x64, 0x7e, 0x37, 0x01,
+ 0x81, 0x7e, 0x27, 0x01, 0xa1, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3a, 0x7a, 0x05,
+ 0x3a, 0x7a, 0x37, 0x01, 0x81, 0x7e, 0x37, 0x01, 0x61, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x18,
+ 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x61, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f,
+ 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x64, 0xc4, 0x22, 0xc2, 0x64, 0x2d, 0x23, 0x68, 0x78,
+ 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x81, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27,
+ 0x01, 0xa1, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa1, 0x7e, 0x37, 0x01, 0x81, 0x9d, 0x32, 0x7d, 0x02,
+ 0x2e, 0x05, 0x3a, 0x7a, 0x05, 0x3a, 0x7a, 0x37, 0x01, 0x81, 0x7e, 0x37, 0x01, 0x61, 0x7d, 0x43,
+ 0x2d, 0x42, 0xbe, 0x44, 0x18, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x61, 0x75, 0x2f, 0x94, 0x12,
+ 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73,
+ 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x18, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0,
+ 0x7e, 0x34, 0x14, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x61, 0x12, 0x69, 0xf0, 0xbe,
+ 0x25, 0x20, 0x78, 0x03, 0x02, 0x53, 0x76, 0x22, 0xd2, 0x0c, 0x7e, 0x04, 0x14, 0x2d, 0x7a, 0x07,
+ 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12,
+ 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca,
+ 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb1, 0x2e,
+ 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30,
+ 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe,
+ 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x04, 0x00, 0x2e, 0x27, 0x01,
+ 0xb1, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75,
+ 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30,
+ 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x14, 0x22, 0x80,
+ 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x04,
+ 0x00, 0x2e, 0x67, 0x01, 0xb1, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35,
+ 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02,
+ 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44,
+ 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x04, 0x7a, 0x69, 0xb0,
+ 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73,
+ 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a,
+ 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14,
+ 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a,
+ 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20,
+ 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04,
+ 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25,
+ 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01,
+ 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02,
+ 0x54, 0xd2, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1,
+ 0x00, 0x04, 0x30, 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2,
+ 0x14, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x54, 0xd2,
+ 0xda, 0xb8, 0x02, 0x55, 0xf9, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12,
+ 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd,
+ 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, 0x50, 0x80,
+ 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2, 0x54, 0x12, 0x43, 0x19, 0x02, 0x61, 0x13, 0x75, 0x2f,
+ 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0,
+ 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0,
+ 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0,
+ 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02,
+ 0x55, 0x26, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22,
+ 0x10, 0x0d, 0x01, 0x22, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x75, 0x2f, 0xa5, 0x12, 0x73, 0x35,
+ 0x7e, 0x14, 0x85, 0x00, 0x80, 0x06, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x09, 0xb1, 0x00, 0x14,
+ 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x59, 0x26, 0x30, 0x35, 0x06, 0x20,
+ 0xe6, 0x4f, 0xd2, 0x0d, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x65, 0x7e, 0x37, 0x01, 0x83, 0x7e, 0x27,
+ 0x01, 0xa3, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3c, 0x7a, 0x05, 0x3c, 0x7a, 0x37,
+ 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1c, 0x2c, 0x38, 0x68,
+ 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35,
+ 0x12, 0x69, 0xf0, 0x10, 0x65, 0xc4, 0x22, 0xc2, 0x65, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80,
+ 0x1a, 0x7e, 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa3, 0x28,
+ 0x04, 0x7e, 0x27, 0x01, 0xa3, 0x7e, 0x37, 0x01, 0x83, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3c,
+ 0x7a, 0x05, 0x3c, 0x7a, 0x37, 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, 0xbe,
+ 0x44, 0x1c, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a,
+ 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51,
+ 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x1c, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x18,
+ 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x63, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78,
+ 0x03, 0x02, 0x56, 0xa3, 0x22, 0xd2, 0x0d, 0x7e, 0x04, 0x18, 0x2d, 0x7a, 0x07, 0x01, 0x63, 0x7a,
+ 0x07, 0x01, 0x73, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22,
+ 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82,
+ 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb3, 0x2e, 0x24, 0x00, 0x02,
+ 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30,
+ 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c,
+ 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x05, 0x00, 0x2e, 0x27, 0x01, 0xb3, 0x1b, 0x38,
+ 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12,
+ 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09,
+ 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0x80, 0x7f, 0x7a, 0x51,
+ 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x05, 0x00, 0x2e, 0x67,
+ 0x01, 0xb3, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63,
+ 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a,
+ 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d,
+ 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x05, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70,
+ 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04,
+ 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb,
+ 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13,
+ 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24,
+ 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e,
+ 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d,
+ 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d,
+ 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8,
+ 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x57, 0xff, 0x75,
+ 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30,
+ 0x3d, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0xda,
+ 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x57, 0xff, 0xda, 0xb8, 0x02,
+ 0x59, 0x26, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5,
+ 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20,
+ 0x68, 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2,
+ 0x55, 0x80, 0x02, 0xc2, 0x55, 0x12, 0x43, 0x30, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73,
+ 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04,
+ 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61,
+ 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00,
+ 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x58, 0x53, 0x75,
+ 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0e, 0x01,
+ 0x22, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x75, 0x2f, 0xa6, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x86,
+ 0x00, 0x80, 0x06, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e,
+ 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5c, 0x53, 0x30, 0x36, 0x06, 0x20, 0xe6, 0x4f, 0xd2,
+ 0x0e, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x66, 0x7e, 0x37, 0x01, 0x85, 0x7e, 0x27, 0x01, 0xa5, 0x9d,
+ 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3e, 0x7a, 0x05, 0x3e, 0x7a, 0x37, 0x01, 0x85, 0x7e,
+ 0x37, 0x01, 0x65, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x20, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01,
+ 0x65, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0,
+ 0x10, 0x66, 0xc4, 0x22, 0xc2, 0x66, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27,
+ 0x01, 0x85, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa5, 0x28, 0x04, 0x7e, 0x27,
+ 0x01, 0xa5, 0x7e, 0x37, 0x01, 0x85, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3e, 0x7a, 0x05, 0x3e,
+ 0x7a, 0x37, 0x01, 0x85, 0x7e, 0x37, 0x01, 0x65, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x20, 0x2c,
+ 0x38, 0x13, 0x7a, 0x47, 0x01, 0x65, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12,
+ 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73,
+ 0x35, 0x9e, 0x44, 0x20, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x1c, 0x2d, 0x7d, 0x24,
+ 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x65, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x59,
+ 0xd0, 0x22, 0xd2, 0x0e, 0x7e, 0x04, 0x1c, 0x2d, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75,
+ 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92,
+ 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78,
+ 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb5, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe,
+ 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01,
+ 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a,
+ 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x06, 0x00, 0x2e, 0x27, 0x01, 0xb5, 0x1b, 0x38, 0x20, 0x0b, 0x35,
+ 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09,
+ 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, 0x09, 0xb1, 0x00, 0x10,
+ 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73,
+ 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x06, 0x00, 0x2e, 0x67, 0x01, 0xb5, 0x9e,
+ 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24,
+ 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e,
+ 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6,
+ 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x06, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75,
+ 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a,
+ 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30,
+ 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04,
+ 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf,
+ 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9,
+ 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04,
+ 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32,
+ 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0,
+ 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5b, 0x2c, 0x75, 0x2f, 0x99, 0x12,
+ 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, 0x09,
+ 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, 0xda, 0xb8, 0x30, 0xe0,
+ 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5b, 0x2c, 0xda, 0xb8, 0x02, 0x5c, 0x53, 0x09,
+ 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73,
+ 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2,
+ 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x56, 0x80, 0x02,
+ 0xc2, 0x56, 0x12, 0x43, 0x47, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1,
+ 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80,
+ 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8,
+ 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61,
+ 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5b, 0x80, 0x75, 0x2f, 0x95, 0x12,
+ 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0f, 0x01, 0x22, 0x20, 0x2f,
+ 0x03, 0xd2, 0x0f, 0x22, 0x75, 0x2f, 0xa7, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x87, 0x00, 0x80, 0x06,
+ 0x20, 0x2f, 0x03, 0xd2, 0x0f, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda,
+ 0xb8, 0x68, 0x03, 0x12, 0x5f, 0x80, 0x30, 0x37, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0f, 0x22, 0x30,
+ 0xe6, 0x02, 0xd2, 0x67, 0x7e, 0x37, 0x01, 0x87, 0x7e, 0x27, 0x01, 0xa7, 0x9d, 0x32, 0x40, 0x31,
+ 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, 0x01, 0x87, 0x7e, 0x37, 0x01, 0x67,
+ 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x24, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x67, 0x75, 0x2f,
+ 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x67, 0xc4,
+ 0x22, 0xc2, 0x67, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x87, 0xbe,
+ 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa7, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa7, 0x7e,
+ 0x37, 0x01, 0x87, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, 0x01,
+ 0x87, 0x7e, 0x37, 0x01, 0x67, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x24, 0x2c, 0x38, 0x13, 0x7a,
+ 0x47, 0x01, 0x67, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02,
+ 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44,
+ 0x24, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x20, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a,
+ 0x47, 0x01, 0x67, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5c, 0xfd, 0x22, 0xd2,
+ 0x0f, 0x7e, 0x04, 0x20, 0x2d, 0x7a, 0x07, 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x75, 0x2f, 0x94,
+ 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35,
+ 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37,
+ 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb7, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00,
+ 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37,
+ 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9,
+ 0x7e, 0x24, 0x07, 0x00, 0x2e, 0x27, 0x01, 0xb7, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f,
+ 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04,
+ 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19,
+ 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44,
+ 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x07, 0x00, 0x2e, 0x67, 0x01, 0xb7, 0x9e, 0x24, 0x00, 0x02,
+ 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24,
+ 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d,
+ 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23,
+ 0x23, 0x23, 0x44, 0x07, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12,
+ 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9,
+ 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30,
+ 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80,
+ 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01,
+ 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28,
+ 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68,
+ 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00,
+ 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0,
+ 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5e, 0x59, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09,
+ 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10,
+ 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32,
+ 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5e, 0x59, 0xda, 0xb8, 0x02, 0x5f, 0x80, 0x09, 0xb1, 0x00, 0x18,
+ 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd,
+ 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02,
+ 0xc2, 0x5f, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x57, 0x80, 0x02, 0xc2, 0x57, 0x12,
+ 0x43, 0x5e, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a,
+ 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13,
+ 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c,
+ 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1,
+ 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5e, 0xad, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22,
+ 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09,
+ 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x50, 0x80, 0x02, 0xc2, 0x50, 0x02, 0x60, 0xff,
+ 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50,
+ 0x20, 0x68, 0x04, 0xd2, 0x59, 0x80, 0x02, 0xc2, 0x59, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04,
+ 0xd2, 0x51, 0x80, 0x02, 0xc2, 0x51, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c,
+ 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02,
+ 0xc2, 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x02,
+ 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd,
+ 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5b, 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd, 0x5e, 0x50, 0x80,
+ 0x68, 0x04, 0xd2, 0x53, 0x80, 0x02, 0xc2, 0x53, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80,
+ 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c,
+ 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2,
+ 0x54, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0xa5, 0xfd, 0x5e,
+ 0x50, 0x80, 0x68, 0x04, 0xd2, 0x55, 0x80, 0x02, 0xc2, 0x55, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e,
+ 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04,
+ 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x56, 0x80,
+ 0x02, 0xc2, 0x56, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1,
+ 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0xa5,
+ 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x57, 0x80, 0x02, 0xc2, 0x57, 0x02, 0x60, 0xff, 0x54,
+ 0xf0, 0xc4, 0xa5, 0xff, 0xc4, 0xa5, 0x4f, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12,
+ 0x73, 0x35, 0x22, 0xca, 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x2c, 0x2d, 0xca, 0x79,
+ 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x02, 0x7e,
+ 0x64, 0x00, 0x02, 0x02, 0x61, 0x5e, 0xca, 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x2c,
+ 0x2d, 0xca, 0x79, 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0x7a, 0x79, 0x60,
+ 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x03, 0x7e, 0x64, 0x00, 0x03, 0x02, 0x61, 0x5e, 0xd2, 0x04,
+ 0x7e, 0x27, 0x01, 0xcb, 0x2d, 0x26, 0xbe, 0x24, 0x04, 0x00, 0x38, 0x2e, 0x7e, 0x07, 0x01, 0xc9,
+ 0x7e, 0x44, 0x28, 0x2d, 0x7e, 0x79, 0xa0, 0x7a, 0x09, 0xa0, 0x0b, 0x04, 0x0b, 0x74, 0xbd, 0x04,
+ 0x68, 0x23, 0xa5, 0xdb, 0xef, 0x7a, 0x27, 0x01, 0xcb, 0x7e, 0x25, 0x30, 0x2d, 0x26, 0x7a, 0x25,
+ 0x30, 0x7a, 0x07, 0x01, 0xc9, 0xda, 0x19, 0xc2, 0xd7, 0x22, 0x75, 0x2f, 0x9a, 0x12, 0x73, 0x35,
+ 0xda, 0x19, 0xd2, 0xd7, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xd7, 0x48, 0xf1, 0x46, 0x65, 0x47,
+ 0x5f, 0x49, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x48, 0x56, 0x45, 0x2a, 0x49, 0x6e, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x49, 0x75, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x4c, 0x1e, 0x49, 0x92, 0x4a,
+ 0x8c, 0x4c, 0x57, 0x45, 0x2a, 0x45, 0x2a, 0x4b, 0x83, 0x45, 0x2a, 0x4c, 0x9b, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x4c, 0xa2, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x4f, 0x4b, 0x4c, 0xbf, 0x4d,
+ 0xb9, 0x4f, 0x84, 0x45, 0x2a, 0x45, 0x2a, 0x4e, 0xb0, 0x45, 0x2a, 0x4f, 0xc8, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x4f, 0xcf, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x52, 0x78, 0x4f, 0xec, 0x50,
+ 0xe6, 0x52, 0xb1, 0x45, 0x2a, 0x45, 0x2a, 0x51, 0xdd, 0x45, 0x2a, 0x52, 0xf5, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x52, 0xfc, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x55, 0xa5, 0x53, 0x19, 0x54,
+ 0x13, 0x55, 0xde, 0x45, 0x2a, 0x45, 0x2a, 0x55, 0x0a, 0x45, 0x2a, 0x56, 0x22, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x56, 0x29, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x58, 0xd2, 0x56, 0x46, 0x57,
+ 0x40, 0x59, 0x0b, 0x45, 0x2a, 0x45, 0x2a, 0x58, 0x37, 0x45, 0x2a, 0x59, 0x4f, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x59, 0x56, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x5b, 0xff, 0x59, 0x73, 0x5a,
+ 0x6d, 0x5c, 0x38, 0x45, 0x2a, 0x45, 0x2a, 0x5b, 0x64, 0x45, 0x2a, 0x5c, 0x7c, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x5c, 0x83, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x5f, 0x2c, 0x5c, 0xa0, 0x5d,
+ 0x9a, 0x5f, 0x65, 0x45, 0x2a, 0x45, 0x2a, 0x5e, 0x91, 0x45, 0x2a, 0x5f, 0xa9, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x5f, 0xb0, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45,
+ 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0xca, 0xb8, 0x75, 0x2f, 0x02,
+ 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x91, 0x03, 0x20, 0xe5, 0x20, 0x30, 0xe0, 0x05, 0x12, 0x6b, 0x05,
+ 0x80, 0x30, 0x30, 0xe1, 0x05, 0x12, 0x64, 0x86, 0x80, 0x28, 0x30, 0xe2, 0x05, 0x12, 0x63, 0xf5,
+ 0x80, 0x20, 0x30, 0xe3, 0x1d, 0x12, 0x65, 0x61, 0x80, 0x18, 0x7e, 0xb3, 0x91, 0x04, 0x30, 0xe1,
+ 0x03, 0x02, 0x67, 0x5f, 0x30, 0xe6, 0x05, 0x12, 0x6c, 0x6a, 0x80, 0x06, 0x20, 0xe2, 0x03, 0x02,
+ 0x00, 0x80, 0xda, 0xb8, 0x32, 0x75, 0x2f, 0x10, 0x12, 0x73, 0x35, 0xca, 0x0b, 0xca, 0x39, 0xca,
+ 0x59, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x1a, 0x6c, 0xaa, 0xbe, 0xb0, 0x40,
+ 0x28, 0x0a, 0x12, 0x64, 0x24, 0xda, 0x59, 0xda, 0x39, 0xda, 0x0b, 0x22, 0x74, 0x20, 0x7a, 0xb3,
+ 0x91, 0x14, 0x80, 0xf1, 0x7e, 0x37, 0x01, 0xc5, 0x2d, 0x35, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x2f,
+ 0x7a, 0x37, 0x01, 0xc5, 0x7e, 0x37, 0x01, 0xc3, 0x7d, 0x43, 0x2d, 0x45, 0xbe, 0x44, 0x2c, 0x2c,
+ 0x38, 0x25, 0x7a, 0x47, 0x01, 0xc3, 0x75, 0x2f, 0x11, 0x12, 0x73, 0x35, 0x7a, 0xb1, 0x2f, 0x12,
+ 0x73, 0x35, 0x12, 0x67, 0x9f, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x12, 0x66, 0x30, 0x22, 0x75,
+ 0x2f, 0x16, 0x12, 0x73, 0x35, 0x80, 0xf4, 0x75, 0x2f, 0x12, 0x12, 0x73, 0x35, 0x7a, 0xb1, 0x2f,
+ 0x12, 0x73, 0x35, 0x9e, 0x44, 0x2c, 0x2d, 0x9d, 0x54, 0x12, 0x67, 0x9f, 0x7e, 0x34, 0x28, 0x2d,
+ 0x7d, 0x54, 0x2d, 0x43, 0x80, 0xbc, 0x75, 0x2f, 0x18, 0x12, 0x73, 0x35, 0xca, 0x09, 0xca, 0x39,
+ 0xca, 0x2b, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0x63, 0x91, 0x1a, 0x74, 0x10, 0x7a, 0xb3,
+ 0x91, 0x14, 0x7e, 0xb0, 0x80, 0x9c, 0xb6, 0x60, 0x38, 0x6c, 0xaa, 0x7e, 0x37, 0x01, 0xcb, 0x9d,
+ 0x35, 0x40, 0x37, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc7, 0x7d, 0x43, 0x2d, 0x45, 0xbe,
+ 0x44, 0x28, 0x2c, 0x38, 0x3b, 0x7a, 0x47, 0x01, 0xc7, 0x7d, 0x45, 0x12, 0x68, 0xd4, 0x7e, 0xb3,
+ 0x91, 0x1e, 0x20, 0xe5, 0x13, 0x75, 0x2f, 0x19, 0x12, 0x73, 0x35, 0x7a, 0x91, 0x2f, 0x12, 0x73,
+ 0x35, 0xda, 0x2b, 0xda, 0x39, 0xda, 0x09, 0x22, 0x80, 0x34, 0x2d, 0x53, 0x6d, 0x33, 0x60, 0x02,
+ 0x80, 0xc1, 0x7e, 0x04, 0x24, 0x2d, 0x7a, 0x07, 0x01, 0xc9, 0x7a, 0x07, 0x01, 0xc7, 0x80, 0xe1,
+ 0xca, 0x59, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x54, 0x12, 0x68, 0xd4, 0x7e, 0x34, 0x24, 0x2d, 0x7d,
+ 0x54, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc7, 0x12, 0x68, 0xd4, 0xda, 0x49, 0x80, 0xb0, 0x7e, 0x0f,
+ 0x2c, 0x3e, 0x0b, 0x0c, 0x7a, 0x0f, 0x2c, 0x3e, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x1e, 0x74, 0x60,
+ 0x7a, 0xb3, 0x91, 0x1c, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x12, 0x80, 0xa5, 0x7e, 0x2f, 0x2c, 0x5e,
+ 0x0b, 0x2c, 0x7a, 0x2f, 0x2c, 0x5e, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x1e, 0x74, 0x60, 0x7a, 0xb3,
+ 0x91, 0x1c, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x12, 0x80, 0x1f, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b,
+ 0x22, 0x75, 0x2f, 0x28, 0x12, 0x73, 0x35, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0x74, 0x60, 0x7a,
+ 0xb3, 0x91, 0x00, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x14, 0x7e, 0xb3, 0x91, 0x1a, 0x70, 0xdb, 0x7e,
+ 0x0d, 0x30, 0x7e, 0x1d, 0x34, 0x7e, 0x2d, 0x38, 0x7e, 0x3d, 0x3c, 0x7e, 0x85, 0x40, 0x7d, 0x90,
+ 0x4d, 0x91, 0x4d, 0x92, 0x4d, 0x93, 0x4d, 0x94, 0x4d, 0x95, 0x4d, 0x96, 0x4d, 0x97, 0x4d, 0x98,
+ 0x68, 0xb8, 0x7a, 0x13, 0x91, 0x17, 0x7a, 0x03, 0x91, 0x17, 0x7a, 0x33, 0x91, 0x17, 0x7a, 0x23,
+ 0x91, 0x17, 0x7a, 0x53, 0x91, 0x17, 0x7a, 0x43, 0x91, 0x17, 0x7a, 0x73, 0x91, 0x17, 0x7a, 0x63,
+ 0x91, 0x17, 0x7a, 0x93, 0x91, 0x17, 0x7a, 0x83, 0x91, 0x17, 0x30, 0x73, 0x22, 0x7a, 0xb3, 0x91,
+ 0x17, 0x7a, 0xa3, 0x91, 0x17, 0x7a, 0xd3, 0x91, 0x17, 0x7a, 0xc3, 0x91, 0x17, 0x7a, 0xf3, 0x91,
+ 0x17, 0x7a, 0xe3, 0x91, 0x17, 0x7d, 0x78, 0x7a, 0xf3, 0x91, 0x17, 0x7a, 0xe3, 0x91, 0x17, 0x7e,
+ 0xb3, 0x91, 0x1e, 0x30, 0xe5, 0x03, 0x02, 0x65, 0x3c, 0x75, 0x2f, 0x29, 0x12, 0x73, 0x35, 0x20,
+ 0x73, 0x08, 0x75, 0x2f, 0x0a, 0x12, 0x73, 0x35, 0x80, 0x06, 0x75, 0x2f, 0x12, 0x12, 0x73, 0x35,
+ 0x74, 0x80, 0x7a, 0xb3, 0x91, 0x1e, 0x6d, 0x00, 0x7d, 0x10, 0x7a, 0x0d, 0x30, 0x7a, 0x0d, 0x34,
+ 0x7a, 0x0d, 0x38, 0x7a, 0x0d, 0x3c, 0x7a, 0x05, 0x40, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22,
+ 0x7e, 0x37, 0x01, 0xc5, 0x4d, 0x33, 0x68, 0x3b, 0x7e, 0x07, 0x01, 0xc1, 0x7e, 0x54, 0x2c, 0x2d,
+ 0x9d, 0x50, 0xbd, 0x35, 0x40, 0x02, 0x7d, 0x35, 0xca, 0x39, 0x7e, 0x65, 0x4b, 0x99, 0x64, 0xda,
+ 0x39, 0x7e, 0x07, 0x01, 0xc5, 0x9d, 0x03, 0x7a, 0x07, 0x01, 0xc5, 0x2e, 0x37, 0x01, 0xc1, 0x7a,
+ 0x37, 0x01, 0xc1, 0xbe, 0x34, 0x2c, 0x2c, 0x28, 0xc7, 0x7e, 0x34, 0x28, 0x2d, 0x7a, 0x37, 0x01,
+ 0xc1, 0x80, 0xbd, 0x22, 0x75, 0x2f, 0x53, 0x12, 0x73, 0x35, 0x7e, 0x15, 0x4d, 0x80, 0x11, 0x75,
+ 0x2f, 0x51, 0x12, 0x73, 0x35, 0x0b, 0x08, 0x10, 0x0b, 0x05, 0x9e, 0x34, 0x00, 0x02, 0x28, 0x4d,
+ 0x7c, 0xb2, 0x20, 0xe7, 0x27, 0x54, 0x07, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x39, 0x1e, 0x7c, 0xb2,
+ 0x54, 0x78, 0x03, 0x03, 0x03, 0x7c, 0x2b, 0x9d, 0x13, 0x40, 0x1a, 0x68, 0x12, 0x7a, 0x15, 0x4d,
+ 0x7a, 0x25, 0x4f, 0x7e, 0x64, 0x67, 0x09, 0x7a, 0x65, 0x4b, 0x89, 0x24, 0x02, 0x67, 0x17, 0x7e,
+ 0x64, 0x66, 0x7f, 0x80, 0xf2, 0x2d, 0x13, 0x9d, 0x31, 0xca, 0x39, 0x7d, 0x31, 0x2d, 0x10, 0xca,
+ 0x19, 0xca, 0x29, 0x99, 0x24, 0xda, 0x29, 0xda, 0x09, 0xda, 0x39, 0x80, 0xa2, 0x7a, 0x15, 0x4d,
+ 0x7e, 0x64, 0x66, 0xf5, 0x4d, 0x33, 0x78, 0x09, 0x7c, 0xb2, 0x20, 0xe7, 0x2a, 0x7e, 0x64, 0x66,
+ 0x74, 0x7a, 0x65, 0x4b, 0x22, 0x75, 0x2f, 0x52, 0x12, 0x73, 0x35, 0x7e, 0x21, 0x4d, 0x7e, 0x09,
+ 0x30, 0x0b, 0x04, 0x1b, 0x34, 0x78, 0x89, 0x80, 0xd4, 0x75, 0x2f, 0x54, 0x12, 0x73, 0x35, 0x7e,
+ 0x15, 0x4d, 0x7e, 0x25, 0x4f, 0x80, 0x90, 0x5e, 0x20, 0x07, 0x54, 0x78, 0x7e, 0x44, 0x67, 0x7d,
+ 0x30, 0xe6, 0x16, 0x4d, 0x33, 0x68, 0x26, 0x1b, 0x34, 0x7e, 0x09, 0x40, 0x0b, 0x04, 0x7e, 0x44,
+ 0x34, 0xfa, 0x20, 0xe3, 0x04, 0x7e, 0x44, 0x67, 0x85, 0xca, 0x09, 0xca, 0x39, 0x99, 0x44, 0xda,
+ 0x39, 0xda, 0x09, 0x7e, 0x64, 0x66, 0x7f, 0x4d, 0x33, 0x68, 0xa6, 0x89, 0x64, 0x7a, 0x15, 0x4d,
+ 0xf5, 0x4f, 0x7e, 0x64, 0x67, 0x58, 0x80, 0x99, 0x7e, 0x15, 0x4d, 0xe5, 0x4f, 0x80, 0xc4, 0xc0,
+ 0xd0, 0xc0, 0xd1, 0xc0, 0xe0, 0xca, 0x19, 0x75, 0x2f, 0xfe, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x00,
+ 0x53, 0x02, 0x40, 0x52, 0xda, 0x19, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, 0x32, 0x03, 0xa5, 0xcb,
+ 0x19, 0xb1, 0x80, 0x00, 0x22, 0x22, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0x7e, 0xa0, 0x02, 0xa4,
+ 0x7e, 0x04, 0x68, 0xb1, 0x9d, 0x05, 0x7e, 0xb0, 0x28, 0x7a, 0xb3, 0x95, 0x00, 0x89, 0x04, 0xca,
+ 0x29, 0xb4, 0x80, 0xe2, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0x7e, 0x00, 0x28, 0x7a, 0x03, 0x95,
+ 0x00, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x95, 0x00, 0xda, 0x29, 0x22, 0x7e, 0x24, 0x00, 0x00, 0x7f,
+ 0xe1, 0x7e, 0xa0, 0x02, 0xa4, 0x7e, 0x04, 0x69, 0xe6, 0x9d, 0x05, 0x7e, 0xb0, 0x38, 0x7a, 0xb3,
+ 0x95, 0x00, 0x89, 0x04, 0xca, 0x29, 0xb4, 0x80, 0xe2, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0x7e,
+ 0x00, 0x38, 0x7a, 0x03, 0x95, 0x00, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x95, 0x00, 0xda, 0x29, 0x22,
+ 0xca, 0x29, 0xca, 0x19, 0xca, 0x58, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0xda, 0x58, 0x7e, 0x54,
+ 0x02, 0x20, 0x9c, 0xb5, 0xa4, 0x7e, 0x50, 0x30, 0x5e, 0x20, 0x07, 0x2c, 0x52, 0x7a, 0x53, 0x95,
+ 0x00, 0x2e, 0x54, 0x6a, 0x17, 0x89, 0x54, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0,
+ 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x95, 0x00, 0xda, 0x19,
+ 0xda, 0x29, 0x22, 0xca, 0x19, 0xca, 0x58, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0xda, 0x58, 0x7e,
+ 0x54, 0x02, 0x38, 0x9c, 0xb5, 0xa4, 0x7e, 0x50, 0x20, 0x5e, 0x20, 0x07, 0x2c, 0x52, 0x7a, 0x53,
+ 0x95, 0x00, 0x2e, 0x54, 0x6a, 0x88, 0x89, 0x54, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3,
+ 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x95, 0x00, 0xda,
+ 0x19, 0x22, 0x02, 0x6b, 0xa8, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xca, 0x3b, 0xca, 0x4b, 0xca,
+ 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x2c,
+ 0x7f, 0xb4, 0x00, 0x02, 0x80, 0x1c, 0xb4, 0x01, 0x19, 0x7e, 0xb3, 0x91, 0x14, 0x54, 0x14, 0x68,
+ 0x05, 0x12, 0x6b, 0x6c, 0x80, 0x23, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x1c, 0x12, 0x6c, 0xaa,
+ 0x80, 0x17, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x05, 0x12, 0x6c, 0xaa, 0x80, 0x0b, 0x7e, 0xb3,
+ 0x91, 0x14, 0x54, 0x14, 0x68, 0x03, 0x12, 0x6b, 0x6c, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda,
+ 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x20, 0xe4, 0x19, 0x75,
+ 0x2f, 0x0a, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x7e, 0x70, 0x0a, 0x7e, 0xb3, 0x2c, 0x7f, 0xb4,
+ 0x01, 0x1f, 0x02, 0x6c, 0x04, 0x02, 0x71, 0xf2, 0x75, 0x2f, 0x0b, 0x12, 0x73, 0x35, 0x74, 0x14,
+ 0x7a, 0xb3, 0x91, 0x14, 0x7e, 0xb3, 0x2c, 0x7f, 0xb4, 0x02, 0x0c, 0x12, 0x6b, 0xb4, 0x02, 0x6b,
+ 0xa8, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x2c, 0x7f, 0x7a,
+ 0x03, 0x2c, 0x80, 0x22, 0x7e, 0xb3, 0x2c, 0x76, 0x54, 0x60, 0x60, 0x05, 0xb4, 0x40, 0x1e, 0x80,
+ 0x1c, 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x05, 0x15, 0x75, 0x2f, 0x71, 0x12, 0x73, 0x35, 0x7e, 0xb3,
+ 0x2c, 0x79, 0x7e, 0xa0, 0x01, 0x7a, 0xa3, 0x91, 0x06, 0x7a, 0xb3, 0x91, 0x07, 0x22, 0x74, 0x00,
+ 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x12, 0x22, 0xbe, 0x57, 0x2c, 0x7c, 0x28,
+ 0x04, 0x7e, 0x57, 0x2c, 0x7c, 0x7a, 0x0f, 0x2c, 0x82, 0x7a, 0x57, 0x2c, 0x86, 0x74, 0x10, 0x7a,
+ 0xb3, 0x91, 0x12, 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x1a, 0x70, 0x53,
+ 0x7e, 0xb3, 0x91, 0x14, 0x20, 0xe4, 0x4c, 0x7e, 0xef, 0x2c, 0x82, 0x7e, 0xf7, 0x2c, 0x86, 0x7e,
+ 0x07, 0x2c, 0x86, 0x4d, 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0xe0, 0x7a, 0xb3, 0x91, 0x17, 0xa3,
+ 0xa5, 0x08, 0x1b, 0xf4, 0x68, 0x06, 0xa5, 0xb8, 0x10, 0xf0, 0x80, 0x19, 0x7e, 0xb0, 0x00, 0x7a,
+ 0xb3, 0x2c, 0x7f, 0xbe, 0x00, 0x10, 0x68, 0x0d, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x2c, 0x7f, 0x74,
+ 0x80, 0x7a, 0xb3, 0x91, 0x1e, 0x7a, 0xef, 0x2c, 0x82, 0x7a, 0xf7, 0x2c, 0x86, 0x75, 0x2f, 0x06,
+ 0x12, 0x73, 0x35, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b,
+ 0xca, 0x3b, 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0x75, 0x2f, 0x03, 0x12,
+ 0x73, 0x35, 0x74, 0x00, 0x7a, 0xb3, 0x2c, 0x7e, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x01,
+ 0x7a, 0xb3, 0x91, 0x12, 0x12, 0x6d, 0x19, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda, 0x5b, 0xda,
+ 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x75, 0x2f, 0x03, 0x12, 0x73, 0x35,
+ 0x7e, 0xb3, 0x2c, 0x80, 0xb4, 0x02, 0x11, 0x74, 0x00, 0x7a, 0xb3, 0x2c, 0x80, 0x7a, 0xb3, 0x2c,
+ 0x7f, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0xb4, 0x01, 0x46, 0x7e, 0xb3, 0x91, 0x04, 0x20,
+ 0xe6, 0x42, 0x7e, 0x23, 0x91, 0x1a, 0x7c, 0x32, 0x7e, 0x13, 0x2c, 0x81, 0x2c, 0x21, 0x7a, 0x23,
+ 0x2c, 0x81, 0x7e, 0x00, 0x00, 0x2e, 0x04, 0x2c, 0x88, 0x7e, 0xb3, 0x91, 0x16, 0x7a, 0x09, 0xb0,
+ 0x0b, 0x04, 0xa5, 0xdb, 0xf4, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x75, 0x2f, 0x70, 0x12, 0x73,
+ 0x35, 0x7e, 0xb3, 0x2c, 0x81, 0x7e, 0xa3, 0x2c, 0x7d, 0xbc, 0xab, 0x78, 0x03, 0x12, 0x6d, 0xb9,
+ 0x22, 0x02, 0x71, 0xf2, 0xda, 0x59, 0x02, 0x6c, 0x7c, 0x74, 0xe0, 0x7a, 0xb3, 0x91, 0x00, 0x7e,
+ 0x03, 0x91, 0x10, 0x7e, 0x13, 0x91, 0x11, 0x7e, 0x33, 0x91, 0x12, 0x7e, 0x23, 0x91, 0x13, 0x7e,
+ 0x53, 0x91, 0x14, 0x7e, 0x43, 0x91, 0x15, 0x7e, 0x73, 0x91, 0x16, 0x7e, 0x63, 0x91, 0x17, 0x7a,
+ 0x0f, 0x2c, 0x76, 0x7a, 0x1f, 0x2c, 0x7a, 0x75, 0x2f, 0x04, 0x12, 0x73, 0x35, 0x7a, 0x01, 0x2f,
+ 0x12, 0x73, 0x35, 0x7a, 0x11, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x21, 0x2f, 0x12, 0x73, 0x35, 0x7a,
+ 0x31, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x41, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73,
+ 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x74, 0x00, 0x7a,
+ 0xb3, 0x91, 0x00, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x04, 0x12, 0x6d, 0x8d, 0x22, 0x6d, 0x00, 0x7e,
+ 0x14, 0x01, 0x02, 0x7a, 0x07, 0x2c, 0x86, 0x7a, 0x03, 0x2c, 0x81, 0x7e, 0xb3, 0x2c, 0x76, 0x20,
+ 0xe7, 0x0f, 0x7a, 0x23, 0x2c, 0x80, 0x7a, 0x33, 0x2c, 0x7f, 0xbe, 0x07, 0x2c, 0x7c, 0x68, 0x09,
+ 0x22, 0x7a, 0x33, 0x2c, 0x80, 0x7a, 0x23, 0x2c, 0x7f, 0x7e, 0xb3, 0x2c, 0x76, 0x54, 0xe3, 0x23,
+ 0x23, 0x30, 0xe0, 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5, 0x06, 0x30, 0xe4,
+ 0x03, 0x02, 0x71, 0xf2, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25, 0xf0, 0x90, 0x6d,
+ 0xe5, 0x75, 0x84, 0xff, 0x73, 0x02, 0x6f, 0xa0, 0x02, 0x6e, 0x2d, 0x02, 0x70, 0x39, 0x02, 0x70,
+ 0x54, 0x02, 0x6f, 0x37, 0x02, 0x6e, 0xc2, 0x02, 0x70, 0x85, 0x02, 0x70, 0x85, 0x02, 0x70, 0x88,
+ 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02,
+ 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x8e, 0x02, 0x71, 0x60, 0x02, 0x70, 0x8b, 0x02, 0x70,
+ 0x8b, 0x02, 0x70, 0x8b, 0x02, 0x70, 0x8b, 0x02, 0x70, 0x8b, 0x02, 0x70, 0x8b, 0x74, 0x00, 0x7a,
+ 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x06, 0x2a,
+ 0x7e, 0xb3, 0x2c, 0x78, 0x60, 0x79, 0x7c, 0x0b, 0x7e, 0x13, 0x2c, 0x79, 0x7e, 0x17, 0x2c, 0x7a,
+ 0x75, 0x2f, 0x72, 0x12, 0x73, 0x35, 0x7a, 0x01, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x11, 0x2f, 0x12,
+ 0x73, 0x35, 0x12, 0x72, 0x37, 0x40, 0x58, 0x02, 0x6b, 0xeb, 0xb4, 0x08, 0x1c, 0x75, 0x2f, 0x74,
+ 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x3f, 0xf1, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0x7a,
+ 0x0b, 0xb0, 0x7e, 0x54, 0x00, 0x01, 0x02, 0x6b, 0xeb, 0xb4, 0x00, 0x33, 0x75, 0x2f, 0x75, 0x12,
+ 0x73, 0x35, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0x7e, 0xb3, 0x3f, 0xf2,
+ 0x30, 0xe0, 0x07, 0x74, 0x02, 0x7a, 0x0b, 0xb0, 0x80, 0x05, 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x0b,
+ 0x14, 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x7e, 0x54, 0x00, 0x02, 0xda, 0x0b, 0x02, 0x6b, 0xeb, 0x02,
+ 0x71, 0xf2, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3,
+ 0x2c, 0x77, 0xb4, 0x00, 0x5f, 0x75, 0x2f, 0x76, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x7b, 0x54,
+ 0x0f, 0xb4, 0x02, 0x05, 0x7e, 0xb0, 0x60, 0x80, 0x17, 0xb4, 0x00, 0x05, 0x7e, 0xb0, 0x00, 0x80,
+ 0x0f, 0x7e, 0xb3, 0x2c, 0x7b, 0x20, 0xe7, 0x05, 0x7e, 0xb0, 0x40, 0x80, 0x03, 0x7e, 0xb0, 0x20,
+ 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x11, 0x30, 0xe0, 0x04, 0x74, 0x01, 0x80, 0x02, 0x74,
+ 0x00, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0x7a, 0x0b, 0xb0, 0x0b, 0x14,
+ 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0x54, 0x00, 0x02, 0xda,
+ 0x0b, 0x02, 0x6b, 0xeb, 0x02, 0x71, 0xf2, 0x7e, 0xb3, 0x2c, 0x7b, 0x54, 0x0f, 0xb4, 0x02, 0x05,
+ 0x7e, 0xb0, 0x60, 0x80, 0x17, 0xb4, 0x00, 0x05, 0x7e, 0xb0, 0x00, 0x80, 0x0f, 0x7e, 0xb3, 0x2c,
+ 0x7b, 0x20, 0xe7, 0x05, 0x7e, 0xb0, 0x40, 0x80, 0x03, 0x7e, 0xb0, 0x20, 0x7a, 0xb3, 0x91, 0x00,
+ 0x7e, 0xb3, 0x2c, 0x79, 0xb4, 0x00, 0x26, 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x01, 0x0e, 0x75, 0x2f,
+ 0x77, 0x12, 0x73, 0x35, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x80, 0x1b, 0xb4, 0x03, 0x0e, 0x75,
+ 0x2f, 0x78, 0x12, 0x73, 0x35, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x11, 0x80, 0x0a, 0x74, 0x00, 0x7a,
+ 0xb3, 0x91, 0x00, 0x12, 0x71, 0xf2, 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x02, 0x6b, 0xde,
+ 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x09, 0x1f, 0x75, 0x2f, 0x79, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c,
+ 0x79, 0xbe, 0xb3, 0x3f, 0xf1, 0x68, 0x0d, 0xca, 0xb8, 0x12, 0x43, 0x79, 0xda, 0xb8, 0x50, 0x76,
+ 0x7a, 0xb3, 0x3f, 0xf1, 0x80, 0x6d, 0xb4, 0x05, 0x08, 0x75, 0x2f, 0x7a, 0x12, 0x73, 0x35, 0x80,
+ 0x62, 0xb4, 0x03, 0x19, 0x75, 0x2f, 0x7b, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x79, 0xb4, 0x01,
+ 0x55, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x46, 0xb4, 0x01, 0x19,
+ 0x75, 0x2f, 0x7c, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x79, 0xb4, 0x01, 0x39, 0x7e, 0xb3, 0x3f,
+ 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a, 0x7e, 0xb3, 0x2c, 0x78,
+ 0x60, 0x24, 0x7c, 0x0b, 0x7e, 0x13, 0x2c, 0x79, 0x7e, 0x17, 0x2c, 0x7a, 0x75, 0x2f, 0x73, 0x12,
+ 0x73, 0x35, 0x7a, 0x01, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x11, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x72,
+ 0x71, 0x40, 0x03, 0x02, 0x6b, 0xde, 0x02, 0x71, 0xf2, 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x0b, 0xf6,
+ 0x75, 0x2f, 0x7d, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x79, 0x7e, 0xa3, 0x2c, 0x7b, 0x4c, 0xab,
+ 0x78, 0xe4, 0x80, 0xdf, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c,
+ 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x0a, 0xcf, 0x75, 0x2f, 0x7e, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c,
+ 0x79, 0x70, 0xc3, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0x7a, 0x0b, 0xb0, 0x7e, 0x54,
+ 0x00, 0x01, 0x02, 0x6b, 0xeb, 0x02, 0x71, 0xf2, 0x02, 0x71, 0xf2, 0x02, 0x71, 0xf2, 0x7e, 0xb3,
+ 0x2c, 0x77, 0xb4, 0x04, 0x20, 0x75, 0x2f, 0xc3, 0x12, 0x73, 0x35, 0x7e, 0x04, 0x00, 0x01, 0x7e,
+ 0x17, 0x2c, 0x78, 0x7e, 0x18, 0x2c, 0x88, 0x7a, 0x1c, 0x00, 0x00, 0x7e, 0x47, 0x2c, 0x7c, 0x12,
+ 0x73, 0x41, 0x02, 0x71, 0x5a, 0xb4, 0x06, 0x42, 0x75, 0x2f, 0xc1, 0x12, 0x73, 0x35, 0x7e, 0x58,
+ 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7d, 0xca, 0x7e, 0xd7, 0x2c, 0x78, 0x7e, 0x78, 0x2c, 0x88,
+ 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x2c, 0x7c, 0x75, 0x2f, 0xc1, 0x12, 0x73, 0x35, 0xc0, 0xa8,
+ 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12, 0x73, 0x7a, 0x7e, 0x43, 0x2c, 0x35,
+ 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0x40, 0x65, 0x80, 0x60, 0xb4, 0x00, 0x24, 0xc2, 0xaf, 0x7e,
+ 0xb0, 0x01, 0x7a, 0xb3, 0x94, 0x00, 0x7a, 0xb3, 0x2c, 0x35, 0x12, 0x6b, 0xde, 0xe4, 0x8d, 0xef,
+ 0x8d, 0xef, 0x8d, 0xef, 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, 0xca, 0x02, 0xff, 0xca, 0x06, 0x00, 0x00,
+ 0x32, 0xb4, 0x09, 0x20, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0x23, 0x91, 0x07, 0x7e, 0x57,
+ 0x2c, 0x78, 0x4d, 0x55, 0x68, 0x05, 0x4e, 0x20, 0x02, 0x80, 0x03, 0x5e, 0x20, 0xfd, 0x7a, 0x23,
+ 0x91, 0x07, 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x2c, 0x7a, 0x7e, 0x17, 0x2c,
+ 0x78, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x6b, 0xde, 0x02, 0x71, 0xf2,
+ 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x2c, 0x77,
+ 0xb4, 0x03, 0x15, 0x75, 0x2f, 0xc2, 0x12, 0x73, 0x35, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x2c,
+ 0x78, 0x7e, 0x57, 0x2c, 0x7c, 0x02, 0x6b, 0xeb, 0xb4, 0x05, 0x41, 0x75, 0x2f, 0xc0, 0x12, 0x73,
+ 0x35, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x7e, 0x08, 0x2c, 0x88,
+ 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37, 0x2c, 0x78, 0x7e, 0x47, 0x2c, 0x7c,
+ 0x12, 0x73, 0x41, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0x7e, 0x08, 0x2c,
+ 0x88, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x2c, 0x7c, 0x02, 0x6b, 0xeb, 0xb4, 0x01, 0x20, 0x7e,
+ 0x00, 0x00, 0x7e, 0x10, 0x01, 0x75, 0x2f, 0x72, 0x12, 0x73, 0x35, 0x7a, 0x01, 0x2f, 0x12, 0x73,
+ 0x35, 0x7a, 0x11, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x72, 0x37, 0x40, 0x03, 0x02, 0x6b, 0xeb, 0x02,
+ 0x71, 0xf2, 0x75, 0x2f, 0x07, 0x12, 0x73, 0x35, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x74,
+ 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x15, 0x74, 0x01, 0x7a, 0xb3, 0x91,
+ 0x11, 0x7e, 0xb3, 0x91, 0x15, 0x54, 0x60, 0xbe, 0xb0, 0x40, 0x68, 0x08, 0x74, 0x20, 0x7a, 0xb3,
+ 0x91, 0x15, 0x80, 0xed, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14,
+ 0x74, 0xff, 0x7a, 0xb3, 0x2c, 0x7e, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43,
+ 0x94, 0x00, 0x12, 0x72, 0xbe, 0x40, 0x1f, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0xca,
+ 0x0b, 0xca, 0x49, 0x12, 0x73, 0x41, 0xda, 0x59, 0xda, 0x0b, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43,
+ 0x94, 0x00, 0xd0, 0xa8, 0xc3, 0x22, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8,
+ 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12, 0x72, 0xbe, 0x40,
+ 0x31, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7f, 0x61, 0x7e, 0x78, 0x2c, 0x88, 0x7a,
+ 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x2c, 0x7c, 0xbd, 0x74, 0x78, 0x17, 0x75, 0x2f, 0xc1, 0x12, 0x73,
+ 0x35, 0x12, 0x73, 0x7a, 0x40, 0x0c, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8,
+ 0xc3, 0x22, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0xd3, 0x22, 0x7e, 0x24,
+ 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62, 0x7d, 0x75, 0x7d,
+ 0x87, 0x7e, 0x34, 0x7f, 0xc2, 0x7e, 0x1b, 0xb0, 0x7e, 0x34, 0x7f, 0x03, 0xb4, 0x01, 0x04, 0x7e,
+ 0x34, 0x7f, 0xcc, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50,
+ 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc,
+ 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b,
+ 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b,
+ 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00,
+ 0xff, 0xc3, 0x22, 0xd3, 0x22,
+
+// Segment #16, Start Address 00ff7fc6, Length 4
+0xff,0x00,0xc6,0x7f,0x04,0x00,
+ 0x02, 0x00, 0x03, 0x00,
+
+// Segment #17, Start Address 00ff7335, Length 328
+0xff,0x00,0x35,0x73,0x48,0x01,
+ 0xca, 0x08, 0x7e, 0x01, 0x2f, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x7e, 0x1b, 0xc0, 0x7a,
+ 0x0b, 0xc0, 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b,
+ 0xfc, 0x7c, 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e,
+ 0x44, 0x00, 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78,
+ 0xfa, 0x7f, 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00,
+ 0x40, 0x9d, 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x73, 0xa4,
+ 0xda, 0x79, 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x7e,
+ 0xc0, 0x03, 0x7e, 0xd0, 0x00, 0x7a, 0xd3, 0x90, 0x00, 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74,
+ 0x55, 0x39, 0xb5, 0x2a, 0xaa, 0x74, 0xa0, 0x39, 0xb5, 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d,
+ 0x70, 0x50, 0x06, 0x2d, 0x70, 0x7d, 0x07, 0x6d, 0x77, 0x7c, 0x31, 0x7e, 0x7b, 0x00, 0x7a, 0x6b,
+ 0x00, 0x0b, 0x7c, 0x0b, 0x6c, 0xa5, 0xd9, 0xf3, 0x7f, 0x16, 0x1b, 0x1c, 0x7e, 0x54, 0x27, 0x10,
+ 0x7e, 0x1b, 0x10, 0xbc, 0x10, 0x68, 0x06, 0x1b, 0x54, 0x78, 0xf5, 0x80, 0x2f, 0x6d, 0x00, 0x7c,
+ 0x20, 0x7f, 0x16, 0x9f, 0x10, 0x7f, 0x27, 0x9f, 0x20, 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc,
+ 0x01, 0x78, 0x19, 0x0b, 0x2c, 0x0b, 0x1c, 0xa5, 0xdb, 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x06, 0x6c,
+ 0xdc, 0x7a, 0xd3, 0x90, 0x00, 0x4d, 0x77, 0x78, 0x90, 0xc2, 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00,
+ 0x04, 0x00, 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00, 0x02, 0x01, 0x04, 0x01, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x00, 0x08, 0x10,
+ 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e, 0x18, 0x7f, 0xbd, 0x7a, 0x1c, 0x00,
+ 0xfe, 0x0b, 0x1a, 0x00, 0x5e, 0x10, 0x1f, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a, 0x51, 0x23, 0x7e,
+ 0x18, 0x74, 0x24, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, 0x08, 0xa5, 0xb8,
+ 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
+
+#undef IMAGE_ARRAY_NAME
+
diff --git a/drivers/usb/serial/io_fw_down3.h b/drivers/usb/serial/io_fw_down3.h
new file mode 100644
index 000000000000..93b56d68a27b
--- /dev/null
+++ b/drivers/usb/serial/io_fw_down3.h
@@ -0,0 +1,835 @@
+//**************************************************************
+//* Edgeport Binary Image (for TI based products)
+//* Generated by TIBin2C v2.00 (watchport)
+//* Copyright (C) 2001 Inside Out Networks, All rights reserved.
+//**************************************************************
+
+
+static int IMAGE_SIZE = 12749;
+
+struct EDGE_FIRMWARE_VERSION_INFO
+{
+ unsigned char MajorVersion;
+ unsigned char MinorVersion;
+ unsigned short BuildNumber;
+};
+
+static struct EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME =
+{
+ 4, 10, 0 // Major, Minor, Build
+
+};
+
+static unsigned char IMAGE_ARRAY_NAME[] =
+{
+// struct ImageHdr
+// {
+// WORD Length;
+// BYTE CheckSum;
+// };
+0xca, 0x31,
+0xa8,
+
+0x02, 0x26, 0xfe, 0x02, 0x21, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1e, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x1a, 0x85, 0x3f,
+0x8c, 0x85, 0x40, 0x8a, 0xc0, 0xe0, 0xc0, 0xd0, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00,
+0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xe5, 0x3e,
+0x24, 0x08, 0xf8, 0xe6, 0x60, 0x2b, 0xe5, 0x3e, 0x24, 0x10, 0xf8, 0xa6, 0x81, 0xe5, 0x3e, 0x75,
+0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 0x78, 0x8c, 0xe5, 0x81,
+0x04, 0xc3, 0x98, 0xf9, 0x94, 0x22, 0x40, 0x03, 0x02, 0x11, 0x94, 0xe6, 0xf0, 0x08, 0xa3, 0xd9,
+0xfa, 0x74, 0x08, 0x25, 0x3e, 0xf8, 0x05, 0x3e, 0x08, 0xe6, 0x54, 0x80, 0x70, 0x0c, 0xe5, 0x3e,
+0xb4, 0x07, 0xf3, 0x78, 0x08, 0x75, 0x3e, 0x00, 0x80, 0xef, 0xe5, 0x3e, 0x24, 0x10, 0xf8, 0x86,
+0x81, 0xe5, 0x3e, 0x75, 0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83,
+0x78, 0x8c, 0xe5, 0x81, 0x04, 0xc3, 0x98, 0xf9, 0xe0, 0xf6, 0x08, 0xa3, 0xd9, 0xfa, 0xd0, 0x07,
+0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0x83,
+0xd0, 0x82, 0xd0, 0xf0, 0xd0, 0xd0, 0xd0, 0xe0, 0x32, 0x30, 0x01, 0x4d, 0x30, 0xb4, 0x48, 0x10,
+0x00, 0x45, 0x90, 0xff, 0x08, 0xe0, 0x54, 0x20, 0xf8, 0x90, 0xff, 0x48, 0xe0, 0x54, 0x20, 0xf9,
+0x90, 0xff, 0x10, 0xe0, 0x54, 0x20, 0xfa, 0x90, 0xff, 0x50, 0xe0, 0x54, 0x20, 0xfb, 0x74, 0x00,
+0xf5, 0x82, 0x74, 0xf8, 0xf5, 0x83, 0xe0, 0xc8, 0xf0, 0x68, 0x60, 0x02, 0x7e, 0x04, 0xa3, 0xe0,
+0xc9, 0xf0, 0x69, 0x60, 0x02, 0x7e, 0x04, 0xa3, 0xe0, 0xca, 0xf0, 0x6a, 0x60, 0x02, 0x7e, 0x04,
+0xa3, 0xe0, 0xcb, 0xf0, 0x6b, 0x60, 0x02, 0x7e, 0x04, 0x22, 0xc0, 0xe0, 0xc0, 0xd0, 0xc0, 0xf0,
+0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05,
+0xc0, 0x06, 0xc0, 0x07, 0x90, 0xff, 0x93, 0x74, 0x01, 0xf0, 0xe5, 0x81, 0x94, 0xfd, 0x40, 0x03,
+0x02, 0x11, 0x94, 0x85, 0x41, 0x8d, 0x85, 0x42, 0x8b, 0x74, 0xaf, 0xf5, 0x82, 0x74, 0xfa, 0xf5,
+0x83, 0xe0, 0xb4, 0x01, 0x1b, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x4a, 0xe0, 0x30, 0xe7, 0x2c,
+0x90, 0xff, 0x4e, 0xe0, 0x30, 0xe7, 0x25, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x02, 0xf0, 0x80, 0x20,
+0xb4, 0x02, 0x1d, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x27,
+0x8d, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x04, 0xd0, 0x83, 0xd0, 0x82,
+0xa3, 0xe0, 0xb4, 0x01, 0x1b, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x52, 0xe0, 0x30, 0xe7, 0x2c,
+0x90, 0xff, 0x56, 0xe0, 0x30, 0xe7, 0x25, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x02, 0xf0, 0x80, 0x25,
+0xb4, 0x02, 0x22, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x27,
+0x8d, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82,
+0x80, 0x03, 0x02, 0x02, 0x62, 0x74, 0x15, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xe0, 0x20, 0x04,
+0xf1, 0x20, 0x02, 0x03, 0x30, 0x01, 0xeb, 0x74, 0x18, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xe0,
+0x14, 0xfc, 0xf0, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0x64, 0x04, 0x70, 0x0f, 0xec, 0x70, 0x62,
+0x7e, 0x01, 0x12, 0x00, 0xc9, 0x7c, 0x0a, 0x7d, 0xfa, 0x02, 0x02, 0x33, 0x12, 0x00, 0xc9, 0xee,
+0x64, 0x04, 0x60, 0x1d, 0xec, 0x70, 0x4b, 0x7c, 0x0a, 0xed, 0x14, 0xfd, 0x70, 0x15, 0xee, 0x64,
+0x02, 0x60, 0x07, 0x7e, 0x02, 0x7d, 0x32, 0x02, 0x02, 0x33, 0x7e, 0x01, 0x7d, 0xfa, 0x02, 0x02,
+0x33, 0x7c, 0x0a, 0x74, 0x18, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0,
+0xa3, 0xee, 0xf0, 0x14, 0x60, 0x18, 0x20, 0xe1, 0x0f, 0x20, 0x01, 0x06, 0xd2, 0xb1, 0xc2, 0xb0,
+0x80, 0x10, 0xc2, 0xb1, 0xd2, 0xb0, 0x80, 0x0a, 0xc2, 0xb1, 0xc2, 0xb0, 0x80, 0x04, 0xd2, 0xb0,
+0xd2, 0xb1, 0x78, 0x19, 0x79, 0x09, 0x7a, 0x07, 0xe7, 0x70, 0x04, 0xa6, 0x00, 0x80, 0x0b, 0xe6,
+0x60, 0x08, 0x16, 0xe6, 0x70, 0x04, 0xe7, 0x44, 0x80, 0xf7, 0x08, 0x09, 0xda, 0xea, 0xe5, 0x3d,
+0x60, 0x13, 0x14, 0xf5, 0x3d, 0x70, 0x0e, 0xe5, 0x3e, 0x24, 0x08, 0xf8, 0x76, 0x00, 0x12, 0x11,
+0x0f, 0xd2, 0x8c, 0xd2, 0x8d, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0,
+0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0xd0, 0xd0, 0xd0, 0xe0, 0x32,
+0x90, 0xff, 0x04, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x90, 0xff, 0x06, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa,
+0xec, 0xff, 0xea, 0xfe, 0xef, 0xc3, 0x94, 0x08, 0xee, 0x94, 0x01, 0x50, 0x02, 0x80, 0x04, 0x7e,
+0x01, 0x7f, 0x08, 0x8e, 0x3b, 0x8f, 0x3c, 0x90, 0xff, 0x02, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa, 0xec,
+0xff, 0xea, 0x90, 0xfa, 0xba, 0xf0, 0xef, 0xa3, 0xf0, 0x12, 0x1c, 0x30, 0xe4, 0xf5, 0x4d, 0xe5,
+0x4d, 0xc3, 0x94, 0x02, 0x50, 0x0f, 0x12, 0x1c, 0x11, 0xe4, 0x12, 0x1a, 0x38, 0x05, 0x4d, 0x04,
+0x12, 0x1c, 0x02, 0x80, 0xea, 0x12, 0x1c, 0x30, 0x90, 0xff, 0x00, 0xe0, 0xff, 0x54, 0x60, 0x24,
+0xc0, 0x70, 0x03, 0x02, 0x08, 0xc5, 0x24, 0x40, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6,
+0xe0, 0xfe, 0x54, 0x0f, 0xf5, 0x4d, 0xee, 0x30, 0xe7, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x0a,
+0x90, 0xff, 0x01, 0xe0, 0x12, 0x1b, 0x4c, 0x03, 0x56, 0x00, 0x04, 0x29, 0x01, 0x05, 0x3c, 0x03,
+0x06, 0x03, 0x05, 0x06, 0x45, 0x06, 0x07, 0xa7, 0x08, 0x07, 0xef, 0x09, 0x08, 0x4b, 0x0a, 0x08,
+0x8b, 0x0b, 0x00, 0x00, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa,
+0xba, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x64, 0x02, 0x45,
+0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xef, 0x54, 0x1f, 0x14, 0x60, 0x2b, 0x14, 0x60, 0x47, 0x24,
+0x02, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xee, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0x11, 0x74,
+0x01, 0x12, 0x1a, 0x38, 0x78, 0x67, 0xe6, 0x30, 0xe0, 0x08, 0x12, 0x1c, 0x11, 0x74, 0x02, 0x12,
+0x1a, 0x38, 0x7f, 0x02, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20, 0xe1, 0x09, 0x90, 0xfa, 0xb6, 0xe0,
+0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0xd3, 0x94, 0x01, 0x40, 0x03, 0x02, 0x0f,
+0x26, 0x7f, 0x02, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20, 0xe1, 0x0e, 0x90, 0xfa, 0xb6, 0xe0, 0xff,
+0x60, 0x07, 0x64, 0x80, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x0f, 0xb2, 0x40, 0x03, 0x02, 0x0f,
+0x26, 0xe5, 0x4d, 0x70, 0x19, 0x30, 0x0a, 0x0b, 0x90, 0xff, 0x80, 0x12, 0x1c, 0x0e, 0x12, 0x1a,
+0x38, 0x80, 0x24, 0x90, 0xff, 0x82, 0x12, 0x1c, 0x0e, 0x12, 0x1a, 0x38, 0x80, 0x19, 0x15, 0x4d,
+0x30, 0x0a, 0x0b, 0x12, 0x1c, 0xa5, 0x12, 0x1c, 0x0c, 0x12, 0x1a, 0x38, 0x80, 0x09, 0x12, 0x1c,
+0xb3, 0x12, 0x1c, 0x0c, 0x12, 0x1a, 0x38, 0x12, 0x1c, 0x11, 0x12, 0x19, 0xf2, 0x60, 0x05, 0x74,
+0x01, 0x12, 0x1a, 0x38, 0x7f, 0x02, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f,
+0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, 0x14, 0x60, 0x2d,
+0x14, 0x60, 0x59, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xba, 0xe0, 0x70, 0x04,
+0xa3, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x03, 0x02,
+0x0f, 0x26, 0x78, 0x67, 0xe6, 0x54, 0xfe, 0xf6, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20,
+0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe0, 0x09, 0x90, 0xfa, 0xb6,
+0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe1, 0x0c, 0x90, 0xfa, 0xb6, 0xe0, 0xd3,
+0x94, 0x01, 0x40, 0x03, 0x02, 0x0f, 0x26, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0x90, 0xfa, 0xba, 0xe0,
+0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x0f, 0xb2, 0x40, 0x03, 0x02, 0x0f,
+0x26, 0xe5, 0x35, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe0,
+0x07, 0xe5, 0x4d, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x4d, 0x70, 0x0f, 0x90, 0xff, 0x82, 0xe0,
+0x54, 0xf7, 0xf0, 0x90, 0xff, 0x80, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0xe5, 0x4d, 0x24, 0xfe, 0x60,
+0x20, 0x24, 0xfb, 0x60, 0x34, 0x24, 0x06, 0x70, 0x35, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, 0xe4, 0x33,
+0xfd, 0x7f, 0x03, 0x12, 0x2d, 0xa8, 0x80, 0x26, 0xe4, 0xfd, 0x7f, 0x03, 0x12, 0x2d, 0xa8, 0x80,
+0x1d, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, 0xe4, 0x33, 0xfd, 0x7f, 0x04, 0x12, 0x2d, 0xa8, 0x80, 0x0e,
+0xe4, 0xfd, 0x7f, 0x04, 0x12, 0x2d, 0xa8, 0x80, 0x05, 0x7f, 0x87, 0x12, 0x31, 0x32, 0x15, 0x4d,
+0x30, 0x0a, 0x0b, 0x12, 0x1c, 0xa5, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0x80, 0x09, 0x12, 0x1c,
+0xb3, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x30, 0xe7,
+0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9,
+0x14, 0x60, 0x2d, 0x14, 0x60, 0x55, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xba,
+0xe0, 0x70, 0x04, 0xa3, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0,
+0x60, 0x03, 0x02, 0x0f, 0x26, 0x78, 0x67, 0xe6, 0x44, 0x01, 0xf6, 0xe4, 0xff, 0x02, 0x31, 0xb1,
+0xe5, 0x35, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe0, 0x07,
+0xe5, 0x4d, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe1, 0x0a, 0xe5, 0x4d, 0xd3, 0x94,
+0x01, 0x40, 0x03, 0x02, 0x0f, 0x26, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0x90, 0xfa, 0xba, 0xe0, 0x70,
+0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0xff, 0x12, 0x31, 0x82,
+0x40, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0f, 0x26,
+0xe5, 0x4d, 0x70, 0x09, 0x30, 0x0a, 0x03, 0x02, 0x1d, 0x64, 0x02, 0x1d, 0x2f, 0xe5, 0x35, 0x20,
+0xe1, 0x03, 0x02, 0x0f, 0x26, 0x15, 0x4d, 0x30, 0x0a, 0x0b, 0x12, 0x1c, 0xa5, 0xf5, 0x83, 0xe0,
+0x44, 0x08, 0xf0, 0x80, 0x09, 0x12, 0x1c, 0xb3, 0xf5, 0x83, 0xe0, 0x44, 0x08, 0xf0, 0xe4, 0xff,
+0x02, 0x31, 0xb1, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60,
+0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9,
+0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe1, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xbb,
+0xe0, 0x90, 0xff, 0xff, 0xf0, 0xe0, 0x60, 0x05, 0x43, 0x35, 0x01, 0x80, 0x03, 0x53, 0x35, 0xfe,
+0xe4, 0xff, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45,
+0x3b, 0x70, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa,
+0xba, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xec, 0x24, 0xfe, 0x60, 0x3a, 0x14, 0x60, 0x75, 0x24, 0x02,
+0x60, 0x03, 0x02, 0x0f, 0x26, 0xed, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0x30, 0x12, 0x1d,
+0x5d, 0x7d, 0x03, 0x12, 0x0f, 0x6d, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x0f, 0x2a, 0x90, 0xfa,
+0xb3, 0xe0, 0xfd, 0xa3, 0x12, 0x1c, 0x7b, 0x12, 0x0f, 0x89, 0x50, 0x02, 0x80, 0x04, 0xae, 0x3b,
+0xaf, 0x3c, 0x02, 0x0f, 0xba, 0x12, 0x1c, 0x30, 0x90, 0xf9, 0x15, 0xe0, 0x30, 0xe4, 0x0d, 0x12,
+0x1d, 0x5d, 0x7d, 0x14, 0x12, 0x0f, 0x6d, 0x60, 0x10, 0x02, 0x0f, 0x26, 0x12, 0x1d, 0x5d, 0x7d,
+0x04, 0x12, 0x0f, 0xc1, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x0f, 0x2a, 0x90, 0xfa, 0xb3, 0xe0,
+0xfd, 0xa3, 0x12, 0x1c, 0x7b, 0x12, 0x0f, 0x89, 0x50, 0x02, 0x80, 0x04, 0xae, 0x3b, 0xaf, 0x3c,
+0x02, 0x0f, 0xba, 0x12, 0x1d, 0x5d, 0x7d, 0x05, 0x12, 0x0f, 0xc1, 0x60, 0x03, 0x02, 0x0f, 0x26,
+0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb3, 0x12, 0x1c, 0x78, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90, 0xfa,
+0xb4, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x1a, 0x6c, 0x90, 0xfa, 0xbb, 0xe0, 0x90, 0xfa, 0xb2, 0xf0,
+0xe4, 0xf5, 0x4c, 0x90, 0xfa, 0xb2, 0xe0, 0xff, 0xe5, 0x4c, 0xc3, 0x9f, 0x50, 0x24, 0x12, 0x1c,
+0x72, 0x12, 0x0f, 0xcc, 0xff, 0xfd, 0x90, 0xfa, 0xb4, 0xe4, 0x8d, 0xf0, 0x12, 0x1a, 0x6c, 0x90,
+0xfa, 0xb3, 0xe0, 0xc3, 0x9f, 0xf0, 0xd3, 0x94, 0x00, 0x50, 0x03, 0x02, 0x0f, 0x26, 0x05, 0x4c,
+0x80, 0xd1, 0x12, 0x1c, 0x72, 0x12, 0x0f, 0xcc, 0x24, 0xfe, 0xff, 0x90, 0xfa, 0xb3, 0xf0, 0xfd,
+0xa3, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x1a, 0x6c, 0x7a, 0xf9, 0x79, 0x6f, 0x7b, 0x01, 0x8b, 0x36,
+0x8a, 0x37, 0x89, 0x38, 0xe9, 0x24, 0x02, 0xf9, 0xe4, 0x3a, 0xfa, 0x12, 0x1c, 0x78, 0x12, 0x25,
+0xd7, 0x8f, 0x4c, 0x05, 0x4c, 0x05, 0x4c, 0x12, 0x1c, 0x11, 0xe5, 0x4c, 0x12, 0x1a, 0x38, 0x12,
+0x1c, 0x11, 0x90, 0x00, 0x01, 0x74, 0x03, 0x12, 0x1a, 0x4a, 0xaf, 0x4c, 0x7e, 0x00, 0xc3, 0xef,
+0x95, 0x3c, 0xee, 0x95, 0x3b, 0x50, 0x02, 0x80, 0x04, 0xae, 0x3b, 0xaf, 0x3c, 0x8e, 0x39, 0x8f,
+0x3a, 0x02, 0x2c, 0x07, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0xe5,
+0x3c, 0x64, 0x01, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x03,
+0x02, 0x0f, 0x26, 0x90, 0xfa, 0xba, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26,
+0x12, 0x1c, 0xc9, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe0, 0x06, 0x20, 0xe1, 0x03,
+0x02, 0x0f, 0x26, 0x75, 0x36, 0x00, 0x75, 0x37, 0x00, 0x75, 0x38, 0x32, 0x02, 0x0f, 0xa9, 0xe5,
+0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26,
+0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xd3, 0x90, 0xfa, 0xbb, 0xe0, 0x94, 0x01,
+0x90, 0xfa, 0xba, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, 0x60, 0x03,
+0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe0, 0x06, 0x20, 0xe1, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa,
+0xbb, 0xe0, 0xf5, 0x32, 0xe5, 0x32, 0x70, 0x08, 0x43, 0x35, 0x01, 0x53, 0x35, 0xfd, 0x80, 0x06,
+0x53, 0x35, 0xfe, 0x43, 0x35, 0x02, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20, 0xe7, 0x03,
+0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x64, 0x01, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa,
+0xb6, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xba, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60,
+0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35,
+0x20, 0xe1, 0x03, 0x02, 0x0f, 0x26, 0x7f, 0x01, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x30, 0xe7, 0x03,
+0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xd3, 0x90, 0xfa, 0xbb,
+0xe0, 0x94, 0x00, 0x90, 0xfa, 0xba, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c,
+0xc9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe1, 0x03, 0x02, 0x0f, 0x26,
+0xe4, 0xff, 0x02, 0x31, 0xb1, 0x90, 0xff, 0x01, 0x12, 0x1d, 0x74, 0xef, 0x12, 0x1a, 0x38, 0x90,
+0xfa, 0xb6, 0x12, 0x1d, 0x74, 0x90, 0x00, 0x01, 0xef, 0x12, 0x1a, 0x4a, 0x90, 0x00, 0x02, 0xe4,
+0x12, 0x1a, 0x4a, 0x74, 0x03, 0x12, 0x1c, 0x02, 0x90, 0xfa, 0xba, 0xe0, 0xff, 0xa3, 0xe0, 0x85,
+0x38, 0x82, 0x85, 0x37, 0x83, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0xff, 0x01, 0xe0, 0x12, 0x1b,
+0x4c, 0x09, 0x4a, 0x02, 0x09, 0x6c, 0x04, 0x09, 0x8e, 0x05, 0x09, 0xba, 0x06, 0x09, 0xd8, 0x07,
+0x09, 0xf6, 0x08, 0x0a, 0x14, 0x09, 0x0a, 0x32, 0x0b, 0x0a, 0xe7, 0x80, 0x0d, 0x6f, 0x81, 0x0d,
+0xa0, 0x82, 0x0b, 0x2e, 0x83, 0x0b, 0x77, 0x84, 0x0b, 0x96, 0x85, 0x0b, 0xdb, 0x86, 0x0c, 0x26,
+0x87, 0x0c, 0xb7, 0x88, 0x0d, 0x42, 0x89, 0x0a, 0x50, 0x92, 0x0a, 0x50, 0x93, 0x0e, 0x53, 0xc0,
+0x0e, 0x7f, 0xc1, 0x0e, 0x90, 0xc2, 0x00, 0x00, 0x0f, 0x15, 0xe5, 0x35, 0x20, 0xe7, 0x05, 0x7f,
+0x05, 0x02, 0x30, 0xec, 0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00,
+0x7f, 0x07, 0x02, 0x11, 0x16, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2f, 0x18, 0xe5, 0x35, 0x20, 0xe7,
+0x05, 0x7f, 0x05, 0x02, 0x30, 0xec, 0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd,
+0x7c, 0x00, 0x7f, 0x0c, 0x02, 0x11, 0x16, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2f, 0x18, 0xe5, 0x35,
+0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29, 0x12, 0x1d, 0x92, 0x50, 0x06, 0xe5, 0x3c, 0x45, 0x3b, 0x70,
+0x05, 0x7f, 0x02, 0x02, 0x30, 0xec, 0x90, 0xfa, 0xb6, 0xe0, 0x24, 0xfe, 0x24, 0xfd, 0x50, 0x02,
+0x80, 0x03, 0x02, 0x31, 0x6f, 0x7f, 0x07, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02,
+0x0f, 0x29, 0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x08,
+0x02, 0x11, 0x16, 0x7f, 0x07, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29,
+0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x09, 0x02, 0x11,
+0x16, 0x7f, 0x07, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29, 0x12, 0x1c,
+0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0a, 0x02, 0x11, 0x16, 0x7f,
+0x07, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29, 0x12, 0x1c, 0xc1, 0x60,
+0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0b, 0x02, 0x11, 0x16, 0x7f, 0x07, 0x02,
+0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29, 0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04,
+0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0e, 0x02, 0x11, 0x16, 0x7f, 0x07, 0x02, 0x30, 0xec,
+0xe5, 0x35, 0x30, 0xe7, 0x56, 0x12, 0x1c, 0xc9, 0x70, 0x4a, 0x90, 0xff, 0x02, 0xe0, 0xf5, 0x4c,
+0xe5, 0x4c, 0xb4, 0x82, 0x05, 0x75, 0x4c, 0x61, 0x80, 0x12, 0xe5, 0x4c, 0xb4, 0x83, 0x05, 0x75,
+0x4c, 0x62, 0x80, 0x08, 0xe5, 0x4c, 0xc4, 0x54, 0xf0, 0x04, 0xf5, 0x4c, 0x12, 0x1b, 0x72, 0x12,
+0x1d, 0x8b, 0x12, 0x25, 0x39, 0x12, 0x1c, 0xd9, 0x12, 0x1a, 0x0b, 0x60, 0x05, 0x12, 0x31, 0xbd,
+0x80, 0x06, 0x85, 0x33, 0x39, 0x85, 0x34, 0x3a, 0x75, 0x36, 0x01, 0x75, 0x37, 0xf9, 0x75, 0x38,
+0x72, 0x02, 0x2c, 0x07, 0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2f, 0x18, 0x12, 0x1c, 0xc9, 0x60, 0x05,
+0x7f, 0x05, 0x02, 0x30, 0xec, 0x12, 0x1d, 0x92, 0x40, 0x05, 0x7f, 0x03, 0x02, 0x30, 0xec, 0x90,
+0xff, 0x02, 0xe0, 0xf5, 0x4c, 0xe5, 0x4c, 0xb4, 0x82, 0x05, 0x75, 0x4c, 0x61, 0x80, 0x12, 0xe5,
+0x4c, 0xb4, 0x83, 0x05, 0x75, 0x4c, 0x62, 0x80, 0x08, 0xe5, 0x4c, 0xc4, 0x54, 0xf0, 0x04, 0xf5,
+0x4c, 0x12, 0x1b, 0x72, 0x02, 0x31, 0x6f, 0x12, 0x1d, 0x9c, 0x12, 0x2a, 0x06, 0x12, 0x1c, 0x83,
+0xe0, 0x54, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x78, 0x68, 0x12, 0x1b,
+0x28, 0x90, 0x00, 0x02, 0x12, 0x1a, 0x0b, 0x30, 0xe7, 0xf2, 0x90, 0x00, 0x02, 0xe4, 0x12, 0x1a,
+0x4a, 0x90, 0xfa, 0xb7, 0xe0, 0x44, 0x80, 0xff, 0xf0, 0x78, 0x7c, 0xe6, 0xfc, 0x08, 0xe6, 0x8c,
+0x83, 0x12, 0x1c, 0x8b, 0xef, 0xf0, 0x12, 0x31, 0xc7, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x90, 0xfa,
+0xb6, 0xe0, 0x64, 0x01, 0x70, 0x1f, 0x90, 0xfa, 0xba, 0xe0, 0xff, 0x7e, 0x00, 0x70, 0x06, 0xa3,
+0xe0, 0xf5, 0x90, 0x80, 0x2d, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0x90, 0x90, 0xfa, 0xbb, 0xe0, 0x42,
+0x90, 0xd2, 0xaf, 0x80, 0x1d, 0x90, 0xfa, 0xba, 0xe0, 0xff, 0x7e, 0x00, 0x70, 0x06, 0xa3, 0xe0,
+0xf5, 0xb0, 0x80, 0x0e, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0xb0, 0x90, 0xfa, 0xbb, 0xe0, 0x42, 0xb0,
+0xd2, 0xaf, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x12, 0x1c, 0x30, 0x90, 0xfa, 0xb6, 0xe0, 0xb4, 0x01,
+0x0a, 0x12, 0x1c, 0x11, 0xe5, 0x90, 0x12, 0x1a, 0x38, 0x80, 0x08, 0x12, 0x1c, 0x11, 0xe5, 0xb0,
+0x12, 0x1a, 0x38, 0x02, 0x0f, 0xa9, 0x90, 0xfa, 0xb6, 0xe0, 0xff, 0x24, 0x12, 0x12, 0x1c, 0x41,
+0x20, 0xe1, 0x33, 0x12, 0x1c, 0xd0, 0xef, 0x24, 0xfc, 0x60, 0x18, 0x04, 0x70, 0x28, 0x90, 0xfa,
+0xb7, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x19, 0x12, 0x1d, 0xa6,
+0xf0, 0x80, 0x13, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x10, 0xf0,
+0x80, 0x04, 0x12, 0x1d, 0xad, 0xf0, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x90, 0xfa, 0xb6, 0xe0, 0xff,
+0x24, 0x12, 0x12, 0x1c, 0x41, 0x20, 0xe1, 0x39, 0x12, 0x1c, 0xd0, 0xef, 0x24, 0xfc, 0x60, 0x1b,
+0x04, 0x70, 0x2e, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, 0xf0,
+0x80, 0x1f, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x16, 0x90, 0xfa, 0xb7, 0xe0, 0x60,
+0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xdf,
+0xf0, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x12, 0x1c, 0xd0, 0x12, 0x1c, 0xc1, 0x60, 0x4d, 0x04, 0x60,
+0x03, 0x02, 0x0c, 0xb2, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x0f, 0x90, 0xff, 0xa4, 0x12, 0x1c, 0x3a,
+0x30, 0xe1, 0x6f, 0x12, 0x1d, 0x7c, 0x02, 0x0c, 0xb2, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xfb, 0x12,
+0x1c, 0x3d, 0xfe, 0x30, 0xe1, 0x5c, 0x30, 0xe2, 0x11, 0x30, 0xb4, 0x05, 0x12, 0x1d, 0x7c, 0x80,
+0x51, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xfd, 0xf0, 0x80, 0x48, 0x30, 0x95, 0x05, 0x12, 0x1d, 0x7c,
+0x80, 0x40, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xfd, 0xf0, 0x80, 0x37, 0x90, 0xfa, 0xb7, 0xe0, 0x60,
+0x12, 0x90, 0xff, 0xb4, 0x12, 0x1c, 0x3a, 0x30, 0xe1, 0x28, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02,
+0xf0, 0x80, 0x1f, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xfb, 0x12, 0x1c, 0x3d, 0x30, 0xe1, 0x13, 0x30,
+0x93, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54,
+0xfd, 0xf0, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x12, 0x1c, 0xd0, 0x90, 0xfa, 0xb6, 0xe0, 0x24, 0xfc,
+0x60, 0x40, 0x04, 0x70, 0x78, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x1d, 0x90, 0xff, 0xa2, 0xe0, 0x44,
+0x40, 0xf0, 0xa3, 0xe0, 0xff, 0x30, 0xe7, 0x65, 0xd2, 0x03, 0xa3, 0xe0, 0x54, 0xdf, 0xf0, 0x90,
+0xff, 0xa3, 0xef, 0x54, 0x7f, 0xf0, 0x80, 0x55, 0x30, 0x03, 0x0e, 0x90, 0xff, 0xa3, 0xe0, 0x44,
+0x80, 0xf0, 0xc2, 0x03, 0xa3, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xff, 0xa2, 0xe0, 0x54, 0xbf, 0xf0,
+0x80, 0x3b, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x1d, 0x90, 0xff, 0xb2, 0xe0, 0x44, 0x40, 0xf0, 0xa3,
+0xe0, 0xff, 0x30, 0xe7, 0x28, 0xd2, 0x04, 0xa3, 0xe0, 0x54, 0xdf, 0xf0, 0x90, 0xff, 0xb3, 0xef,
+0x54, 0x7f, 0xf0, 0x80, 0x18, 0x30, 0x04, 0x0e, 0x90, 0xff, 0xb3, 0xe0, 0x44, 0x80, 0xf0, 0xc2,
+0x04, 0xa3, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xff, 0xb2, 0xe0, 0x54, 0xbf, 0xf0, 0xe4, 0xff, 0x02,
+0x30, 0xec, 0x12, 0x1c, 0x30, 0x90, 0xfa, 0xb6, 0xe0, 0x24, 0xfc, 0x60, 0x0f, 0x04, 0x70, 0x16,
+0x90, 0xff, 0xa6, 0xe0, 0x12, 0x1c, 0x11, 0x12, 0x1a, 0x38, 0x80, 0x0a, 0x90, 0xff, 0xb6, 0xe0,
+0x12, 0x1c, 0x11, 0x12, 0x1a, 0x38, 0x75, 0x39, 0x00, 0x75, 0x3a, 0x01, 0x02, 0x2c, 0x07, 0xe4,
+0xff, 0x12, 0x30, 0xec, 0x12, 0x1d, 0x37, 0x7f, 0x03, 0x12, 0x12, 0x19, 0x90, 0xf9, 0x15, 0xe0,
+0x30, 0xe4, 0x08, 0x90, 0xff, 0x93, 0x74, 0x80, 0xf0, 0x80, 0x10, 0x90, 0xff, 0xfc, 0xe0, 0x54,
+0x7f, 0xf0, 0x7f, 0xff, 0x7e, 0x00, 0x12, 0x30, 0x16, 0xc2, 0x90, 0xc2, 0xaf, 0x00, 0x80, 0xfd,
+0xe4, 0xf5, 0x4e, 0xf5, 0x4f, 0x90, 0xfa, 0xbc, 0x74, 0x3e, 0xf0, 0xa3, 0xe4, 0xf0, 0x90, 0xfa,
+0xb4, 0xf0, 0xa3, 0x74, 0x15, 0xf0, 0xe0, 0x54, 0x3f, 0xff, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0xfa,
+0xb9, 0xf0, 0xd3, 0x94, 0x00, 0xe4, 0x94, 0x3e, 0x40, 0x08, 0x90, 0xfa, 0xbd, 0xe0, 0x90, 0xfa,
+0xb9, 0xf0, 0x12, 0x0f, 0x50, 0xe5, 0x31, 0x45, 0x30, 0x70, 0x73, 0x12, 0x1c, 0x4a, 0x90, 0xfa,
+0xbc, 0x12, 0x1d, 0x56, 0x60, 0x27, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x00, 0x40, 0x08, 0x90,
+0xfa, 0xb9, 0x74, 0x40, 0xf0, 0x80, 0x08, 0x90, 0xfa, 0xbd, 0xe0, 0x90, 0xfa, 0xb9, 0xf0, 0x12,
+0x0f, 0x50, 0xe5, 0x31, 0x45, 0x30, 0x70, 0x46, 0x12, 0x1c, 0x4a, 0x80, 0xd1, 0x75, 0x4c, 0x02,
+0x90, 0xfa, 0xbc, 0xe4, 0xf0, 0xa3, 0x04, 0xf0, 0x90, 0xfa, 0xb4, 0xe4, 0xf0, 0xa3, 0x74, 0x0f,
+0xf0, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x4c, 0x90, 0xfa, 0xbd, 0xe0, 0xf5, 0x4a, 0x7d, 0x0f, 0x7c,
+0x00, 0x12, 0x28, 0x9f, 0x75, 0x30, 0x00, 0x8f, 0x31, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x4c, 0xe4,
+0xf5, 0x2d, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0xe4, 0xf5, 0x30, 0xf5, 0x31, 0xaf, 0x31,
+0x02, 0x30, 0xec, 0x12, 0x1c, 0xd0, 0x30, 0xe7, 0x10, 0xe0, 0x54, 0x0f, 0x90, 0xf9, 0x64, 0xf0,
+0xd3, 0x94, 0x00, 0x40, 0x15, 0xc2, 0x95, 0x80, 0x11, 0x90, 0xfa, 0xb7, 0xe0, 0x54, 0x0f, 0x90,
+0xf9, 0x63, 0xf0, 0xd3, 0x94, 0x00, 0x40, 0x02, 0xc2, 0x94, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x12,
+0x1d, 0x9c, 0xbf, 0x01, 0x04, 0xd2, 0x93, 0x80, 0x02, 0xc2, 0x93, 0xe4, 0xff, 0x02, 0x30, 0xec,
+0x12, 0x1c, 0xd0, 0x54, 0x03, 0x14, 0x60, 0x0a, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x08, 0x24, 0x03,
+0x70, 0x2b, 0xd2, 0x91, 0x80, 0x27, 0xc2, 0x91, 0x80, 0x23, 0x12, 0x1d, 0xa6, 0x12, 0x0f, 0x78,
+0x60, 0x04, 0xd2, 0x91, 0x80, 0x17, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x10, 0x12, 0x0f, 0x78, 0xff,
+0xbf, 0xa0, 0x04, 0xc2, 0x91, 0x80, 0x02, 0xd2, 0x91, 0x12, 0x1d, 0xa6, 0xf0, 0x90, 0xfa, 0xb7,
+0xe0, 0x54, 0x0c, 0xff, 0x13, 0x13, 0x54, 0x3f, 0x14, 0x60, 0x0a, 0x14, 0x60, 0x0f, 0x14, 0x60,
+0x08, 0x24, 0x03, 0x70, 0x2b, 0xd2, 0x92, 0x80, 0x27, 0xc2, 0x92, 0x80, 0x23, 0x12, 0x1d, 0xad,
+0x12, 0x0f, 0x98, 0x60, 0x04, 0xd2, 0x92, 0x80, 0x17, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x10, 0x12,
+0x0f, 0x98, 0xff, 0xbf, 0xa0, 0x04, 0xc2, 0x92, 0x80, 0x02, 0xd2, 0x92, 0x12, 0x1d, 0xad, 0xf0,
+0xe4, 0xff, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x07, 0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2f,
+0x18, 0x7f, 0x05, 0x02, 0x30, 0xec, 0x12, 0x31, 0xbd, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb3,
+0x90, 0xfa, 0xb4, 0xe0, 0xf5, 0x2d, 0xa3, 0xe0, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90,
+0xfa, 0xb4, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x1a, 0x6c, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0x22,
+0xaa, 0x4e, 0xa9, 0x4f, 0x7b, 0xff, 0x90, 0xfa, 0xb4, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa,
+0xb9, 0xe0, 0xf5, 0x4a, 0x12, 0x28, 0x9f, 0x75, 0x30, 0x00, 0x8f, 0x31, 0x22, 0x12, 0x22, 0xa0,
+0x7e, 0x00, 0x8e, 0x30, 0x8f, 0x31, 0xef, 0x22, 0xf0, 0x7f, 0x01, 0x12, 0x12, 0x19, 0x90, 0xff,
+0xa6, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x54, 0xa0, 0x22, 0x12, 0x25, 0xd7, 0x8f, 0x4c, 0x7e, 0x00,
+0xc3, 0xef, 0x95, 0x3c, 0xee, 0x95, 0x3b, 0x22, 0xf0, 0x7f, 0x01, 0x12, 0x12, 0x19, 0x90, 0xff,
+0xb6, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x54, 0xa0, 0x22, 0x75, 0x39, 0x00, 0x75, 0x3a, 0x01, 0x02,
+0x2c, 0x07, 0x90, 0xfa, 0xb6, 0xe0, 0xff, 0x02, 0x31, 0x82, 0x8e, 0x39, 0x8f, 0x3a, 0x02, 0x2c,
+0x07, 0x12, 0x22, 0xa0, 0x7e, 0x00, 0x8e, 0x30, 0x8f, 0x31, 0xef, 0x22, 0x7d, 0x01, 0x12, 0x25,
+0xd7, 0x90, 0xfa, 0xb1, 0xe0, 0x22, 0xef, 0x90, 0xf8, 0x04, 0xf0, 0x22, 0xc0, 0xa8, 0xc2, 0xaf,
+0xee, 0x60, 0x0a, 0xc0, 0x05, 0x7d, 0x7f, 0xdd, 0xfe, 0xde, 0xfa, 0xd0, 0x05, 0xef, 0xc3, 0x94,
+0x15, 0x50, 0x03, 0xd0, 0xa8, 0x22, 0x13, 0x70, 0x03, 0xd0, 0xa8, 0x22, 0xff, 0xd5, 0x07, 0xfd,
+0xd0, 0xa8, 0x22, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x04, 0xc0, 0x05, 0xe5, 0x3e, 0x24,
+0x08, 0xf8, 0x86, 0x05, 0x53, 0x05, 0x7f, 0x7c, 0xff, 0x12, 0x10, 0x78, 0x7f, 0x00, 0x7e, 0x00,
+0xe5, 0x43, 0x60, 0x46, 0xfc, 0x90, 0xf9, 0x1b, 0xe0, 0x54, 0x7f, 0x6d, 0x70, 0x0f, 0xc0, 0x83,
+0xc0, 0x82, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xa3, 0x15, 0x43, 0x80, 0x07, 0xa3, 0xa3, 0xa3,
+0xdc, 0xe6, 0x80, 0x26, 0xdc, 0x06, 0xd0, 0x82, 0xd0, 0x83, 0x80, 0x1e, 0xe0, 0xf8, 0xa3, 0xe0,
+0xf9, 0xa3, 0xe0, 0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, 0xa3, 0xe9, 0xf0, 0xa3, 0xea, 0xf0,
+0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, 0x12, 0x11, 0x0f, 0xd0, 0x05, 0xd0,
+0x04, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0x22, 0x85, 0xa8, 0x44, 0x75, 0xa8, 0x88, 0xec, 0x70,
+0x02, 0x7c, 0x3f, 0x8c, 0x3d, 0x22, 0xe5, 0x3e, 0x24, 0x08, 0xf8, 0x76, 0x00, 0x12, 0x11, 0x66,
+0x80, 0xfb, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x04, 0xc0, 0x06, 0x7c, 0xff, 0x12, 0x10,
+0x78, 0xe5, 0x43, 0x60, 0x42, 0xfe, 0x90, 0xf9, 0x1b, 0xe0, 0x54, 0x7f, 0x6f, 0x70, 0x0b, 0xc0,
+0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x15, 0x43, 0x80, 0x07, 0xa3, 0xa3, 0xa3, 0xde, 0xea, 0x80,
+0x26, 0xde, 0x06, 0xd0, 0x82, 0xd0, 0x83, 0x80, 0xd8, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0,
+0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, 0xa3, 0xe9, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xc0, 0x83,
+0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, 0x78, 0x08, 0x08, 0x79, 0x18, 0x09, 0x7c, 0x01, 0xe6,
+0x54, 0x7f, 0x6f, 0x70, 0x06, 0x76, 0x00, 0x77, 0x00, 0x80, 0x06, 0x08, 0x09, 0x0c, 0xbc, 0x08,
+0xee, 0x12, 0x11, 0x0f, 0xd0, 0x06, 0xd0, 0x04, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0x22, 0x75,
+0x3d, 0x00, 0x85, 0x44, 0xa8, 0x22, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc3, 0xe5, 0x43, 0x24,
+0xe8, 0x50, 0x05, 0x12, 0x11, 0x66, 0x80, 0xf4, 0xef, 0x60, 0x31, 0x90, 0x30, 0x54, 0xe4, 0x93,
+0xc3, 0x9f, 0x40, 0x2f, 0xc0, 0x04, 0x7c, 0xff, 0x12, 0x10, 0x78, 0xd0, 0x04, 0x43, 0x07, 0x80,
+0xe5, 0x43, 0x75, 0xf0, 0x03, 0xa4, 0x24, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0xf9, 0xf5, 0x83, 0xef,
+0xf0, 0xec, 0xa3, 0xf0, 0xed, 0xa3, 0xf0, 0x05, 0x43, 0x12, 0x11, 0x0f, 0xd0, 0x83, 0xd0, 0x82,
+0xd0, 0xf0, 0x22, 0x02, 0x11, 0x94, 0xc0, 0x04, 0x7c, 0x20, 0xd2, 0x8c, 0xd2, 0x8d, 0xd5, 0x04,
+0xfd, 0xd0, 0x04, 0x22, 0x75, 0xa8, 0x00, 0x75, 0x88, 0x00, 0x75, 0xb8, 0x00, 0x75, 0xf0, 0x00,
+0x75, 0xd0, 0x00, 0xe4, 0xf8, 0x90, 0xf8, 0x04, 0xf0, 0x90, 0x00, 0x00, 0xf6, 0x08, 0xb8, 0x00,
+0xfb, 0x02, 0x00, 0x00, 0xc2, 0xaf, 0xe4, 0x90, 0xff, 0x48, 0xf0, 0x90, 0xff, 0x50, 0xf0, 0x90,
+0xff, 0x08, 0xf0, 0x90, 0xff, 0x10, 0xf0, 0x90, 0xff, 0x80, 0xf0, 0xa3, 0xa3, 0xf0, 0xd2, 0xb1,
+0xc2, 0xb0, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc,
+0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc, 0xd2, 0xb0, 0xd2, 0xb1, 0x7e, 0xff, 0x7f, 0xff, 0x12,
+0x0f, 0xdc, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc,
+0x80, 0xcc, 0xc3, 0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x03, 0x7f, 0xe8, 0xef, 0xf4, 0xff, 0xee,
+0xf4, 0xfe, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x42, 0x8e, 0x41, 0x22, 0xc3, 0xef, 0x94, 0xbc,
+0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x07, 0x7f, 0xd0, 0xef, 0xf4, 0xff, 0xee, 0xf4, 0xfe, 0x0f,
+0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x40, 0x8e, 0x3f, 0x22, 0xef, 0x70, 0x01, 0x22, 0xc0, 0x00, 0xc0,
+0xa8, 0xc2, 0xaf, 0xe5, 0x3e, 0x24, 0x18, 0xf8, 0xa6, 0x07, 0xe5, 0x3e, 0x24, 0x08, 0xf8, 0xc6,
+0x54, 0x7f, 0xf6, 0xd0, 0xa8, 0xe6, 0x30, 0xe7, 0x03, 0xd0, 0x00, 0x22, 0x12, 0x11, 0x66, 0x80,
+0xf4, 0xc0, 0x00, 0x7f, 0x01, 0xef, 0x24, 0x08, 0xf8, 0xe6, 0x60, 0x09, 0x0f, 0xbf, 0x08, 0xf5,
+0x12, 0x11, 0x66, 0x80, 0xee, 0xd0, 0x00, 0x22, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00,
+0xc0, 0x06, 0xc0, 0x04, 0xed, 0x24, 0x10, 0xf8, 0x76, 0x9a, 0xed, 0x75, 0xf0, 0x21, 0xa4, 0x24,
+0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 0xc0, 0x82, 0xc0, 0x83, 0xa3, 0xa3, 0xe4, 0x78,
+0x0d, 0xf0, 0xa3, 0xd8, 0xfc, 0xef, 0x54, 0x7f, 0x75, 0xf0, 0x02, 0xa4, 0x24, 0x36, 0xf5, 0x82,
+0xe5, 0xf0, 0x34, 0x30, 0xf5, 0x83, 0xe4, 0x93, 0xfe, 0x74, 0x01, 0x93, 0xfc, 0xd0, 0x83, 0xd0,
+0x82, 0xec, 0xf0, 0xa3, 0xee, 0xf0, 0xed, 0x24, 0x08, 0xf8, 0xef, 0x44, 0x80, 0xf6, 0xd0, 0x04,
+0xd0, 0x06, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0x22, 0x75, 0x3e, 0x00, 0x75, 0x43,
+0x00, 0x7a, 0x08, 0x79, 0x18, 0x78, 0x08, 0x76, 0x00, 0x77, 0x00, 0x08, 0x09, 0xda, 0xf8, 0x90,
+0xf8, 0x04, 0xe0, 0xfc, 0x90, 0x30, 0x54, 0xe4, 0x93, 0xc3, 0x9c, 0x50, 0x05, 0xe4, 0x90, 0xf8,
+0x04, 0xf0, 0x78, 0x08, 0x74, 0x80, 0x44, 0x7f, 0xf6, 0x74, 0x01, 0x44, 0x10, 0xf5, 0x89, 0x75,
+0xb8, 0x00, 0xd2, 0xab, 0xd2, 0xa9, 0x22, 0x75, 0x81, 0x8b, 0xd2, 0x8e, 0xd2, 0x8c, 0xd2, 0xaf,
+0xe5, 0x43, 0x60, 0x36, 0xff, 0x90, 0xf9, 0x1b, 0xe0, 0x54, 0x80, 0x60, 0x28, 0x78, 0x08, 0x79,
+0x08, 0xe0, 0x54, 0x7f, 0xfa, 0x7b, 0x00, 0xe6, 0x54, 0x7f, 0xb5, 0x02, 0x02, 0x7b, 0xff, 0x08,
+0xd9, 0xf5, 0xeb, 0x70, 0x10, 0xea, 0xf0, 0xc0, 0x07, 0x12, 0x12, 0x41, 0xad, 0x07, 0xaf, 0x02,
+0x12, 0x12, 0x58, 0xd0, 0x07, 0xa3, 0xa3, 0xa3, 0xdf, 0xce, 0x12, 0x11, 0x66, 0x80, 0xc1, 0x8f,
+0x24, 0x12, 0x2a, 0x06, 0x78, 0x80, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, 0x08, 0x12,
+0x21, 0xf3, 0xe0, 0xfd, 0x12, 0x22, 0x8a, 0x8a, 0x83, 0x24, 0x0a, 0x12, 0x21, 0xf3, 0xed, 0xf0,
+0x12, 0x22, 0x56, 0x24, 0x07, 0x12, 0x21, 0xf3, 0xe0, 0xff, 0x12, 0x22, 0x99, 0x24, 0x09, 0x12,
+0x21, 0xf3, 0xef, 0xf0, 0x90, 0xf9, 0x15, 0xe0, 0x30, 0xe4, 0x20, 0x08, 0x12, 0x22, 0x09, 0xc0,
+0x83, 0xc0, 0x82, 0xa3, 0xe0, 0x25, 0xe0, 0xff, 0x05, 0x82, 0xd5, 0x82, 0x02, 0x15, 0x83, 0x15,
+0x82, 0xe0, 0x33, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0xa3, 0xef, 0xf0, 0x78, 0x80, 0x12, 0x22, 0x09,
+0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xec, 0xff, 0x12, 0x22, 0x8a, 0x8a, 0x83, 0x24, 0x08, 0x12, 0x21,
+0xf3, 0xef, 0xf0, 0xed, 0x12, 0x22, 0x99, 0x24, 0x07, 0x12, 0x21, 0xf3, 0xed, 0xf0, 0x12, 0x21,
+0xfb, 0xe0, 0xff, 0x30, 0xe7, 0x19, 0x12, 0x22, 0x6e, 0x12, 0x21, 0xf3, 0xe0, 0x60, 0x09, 0x12,
+0x21, 0xfb, 0xef, 0x44, 0x02, 0xf0, 0x80, 0x07, 0x12, 0x21, 0xfb, 0xef, 0x54, 0xfd, 0xf0, 0x78,
+0x7e, 0x12, 0x22, 0x09, 0xa3, 0xa3, 0xe0, 0xff, 0x53, 0x07, 0xc7, 0x08, 0xe6, 0xfc, 0x08, 0xe6,
+0xfd, 0x12, 0x22, 0x43, 0xa3, 0xe0, 0x30, 0xe3, 0x12, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24,
+0x05, 0x12, 0x21, 0xf3, 0xe0, 0x90, 0x31, 0x94, 0x93, 0x42, 0x07, 0x53, 0x07, 0xfb, 0x78, 0x80,
+0xe6, 0xfc, 0x08, 0xe6, 0x8c, 0x83, 0x24, 0x06, 0x12, 0x21, 0xf3, 0xe0, 0x60, 0x03, 0x43, 0x07,
+0x04, 0x53, 0x07, 0xfc, 0x78, 0x80, 0x12, 0x22, 0x7a, 0x24, 0x04, 0x12, 0x21, 0xf3, 0xe0, 0x42,
+0x07, 0x43, 0x07, 0x80, 0x12, 0x22, 0x8a, 0xf5, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xef, 0xf0, 0x12,
+0x22, 0x99, 0x24, 0x04, 0x12, 0x21, 0xf3, 0xe0, 0xff, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xe0,
+0xfc, 0xa3, 0xe0, 0xfd, 0x30, 0xe1, 0x05, 0x53, 0x07, 0xdf, 0x80, 0x03, 0x43, 0x07, 0x20, 0xec,
+0x30, 0xe4, 0x05, 0x53, 0x07, 0xef, 0x80, 0x03, 0x43, 0x07, 0x10, 0x12, 0x21, 0xfb, 0xe0, 0xfe,
+0x54, 0x03, 0x60, 0x73, 0x53, 0x07, 0xdf, 0xee, 0x30, 0xe1, 0x69, 0x78, 0x80, 0x12, 0x22, 0x6f,
+0x12, 0x21, 0xf3, 0xe0, 0x12, 0x1b, 0x4c, 0x14, 0xa6, 0x00, 0x14, 0xda, 0x01, 0x14, 0xdf, 0x03,
+0x14, 0xda, 0x05, 0x14, 0xdf, 0x07, 0x14, 0xda, 0x09, 0x14, 0xdf, 0x0b, 0x14, 0xda, 0x0d, 0x14,
+0xdf, 0x0f, 0x00, 0x00, 0x14, 0xe7, 0xe5, 0x24, 0x64, 0x03, 0x70, 0x21, 0x90, 0xf9, 0x15, 0xe0,
+0x30, 0xe2, 0x0d, 0x30, 0xb4, 0x05, 0x43, 0x07, 0x02, 0x80, 0x2c, 0x53, 0x07, 0xfd, 0x80, 0x27,
+0x30, 0x95, 0x05, 0x43, 0x07, 0x02, 0x80, 0x1f, 0x53, 0x07, 0xfd, 0x80, 0x1a, 0x30, 0x93, 0x05,
+0x43, 0x07, 0x02, 0x80, 0x12, 0x53, 0x07, 0xfd, 0x80, 0x0d, 0x43, 0x07, 0x02, 0x80, 0x08, 0x53,
+0x07, 0xfd, 0x80, 0x03, 0x53, 0x07, 0xfd, 0x12, 0x22, 0x78, 0x24, 0x04, 0x12, 0x21, 0xf3, 0xef,
+0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xff, 0x12, 0x21, 0xfb, 0xe0, 0xfe, 0x54,
+0x03, 0x70, 0x03, 0x02, 0x15, 0xd7, 0xee, 0x20, 0xe1, 0x03, 0x02, 0x15, 0xd4, 0x12, 0x22, 0x6e,
+0x12, 0x21, 0xf3, 0xe0, 0x12, 0x1b, 0x4c, 0x15, 0x36, 0x00, 0x15, 0x6c, 0x01, 0x15, 0x6c, 0x03,
+0x15, 0xa0, 0x05, 0x15, 0xa0, 0x07, 0x15, 0x86, 0x09, 0x15, 0x86, 0x0b, 0x15, 0xba, 0x0d, 0x15,
+0xba, 0x0f, 0x00, 0x00, 0x15, 0xd7, 0xe5, 0x24, 0x64, 0x03, 0x70, 0x23, 0x90, 0xf9, 0x15, 0xe0,
+0x30, 0xe2, 0x0f, 0x30, 0xb1, 0x06, 0x53, 0x07, 0x7f, 0x02, 0x15, 0xd7, 0x43, 0x07, 0x80, 0x02,
+0x15, 0xd7, 0x30, 0x94, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x7d, 0x43, 0x07, 0x80, 0x80, 0x78, 0x30,
+0x92, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x70, 0x43, 0x07, 0x80, 0x80, 0x6b, 0xe5, 0x24, 0xb4, 0x03,
+0x09, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xdf,
+0xf0, 0x53, 0x07, 0x7f, 0x80, 0x51, 0xe5, 0x24, 0xb4, 0x03, 0x09, 0x90, 0xff, 0x9e, 0xe0, 0x44,
+0x10, 0xf0, 0x80, 0x07, 0x90, 0xff, 0x9e, 0xe0, 0x44, 0x20, 0xf0, 0x53, 0x07, 0x7f, 0x80, 0x37,
+0xe5, 0x24, 0xb4, 0x03, 0x09, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0xff,
+0x9e, 0xe0, 0x54, 0xdf, 0xf0, 0x43, 0x07, 0x80, 0x80, 0x1d, 0xe5, 0x24, 0xb4, 0x03, 0x09, 0x90,
+0xff, 0x9e, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x07, 0x90, 0xff, 0x9e, 0xe0, 0x44, 0x20, 0xf0, 0x43,
+0x07, 0x80, 0x80, 0x03, 0x53, 0x07, 0x7f, 0x78, 0x80, 0x12, 0x22, 0x3f, 0xe0, 0xfc, 0xa3, 0xe0,
+0xfd, 0x30, 0xe0, 0x05, 0x43, 0x07, 0x20, 0x80, 0x03, 0x53, 0x07, 0xdf, 0xec, 0x30, 0xe3, 0x05,
+0x43, 0x07, 0x40, 0x80, 0x03, 0x53, 0x07, 0xbf, 0xec, 0x30, 0xe0, 0x05, 0x43, 0x07, 0x10, 0x80,
+0x03, 0x53, 0x07, 0xef, 0xed, 0x30, 0xe4, 0x05, 0x43, 0x07, 0x08, 0x80, 0x03, 0x53, 0x07, 0xf7,
+0xed, 0x30, 0xe5, 0x05, 0x43, 0x07, 0x04, 0x80, 0x03, 0x53, 0x07, 0xfb, 0xed, 0x30, 0xe6, 0x05,
+0x43, 0x07, 0x01, 0x80, 0x03, 0x53, 0x07, 0xfe, 0xed, 0x30, 0xe7, 0x05, 0x43, 0x07, 0x02, 0x80,
+0x03, 0x53, 0x07, 0xfd, 0x78, 0x7e, 0x12, 0x22, 0x3f, 0xa3, 0xef, 0xf0, 0x12, 0x31, 0xc7, 0x7f,
+0x00, 0x22, 0x90, 0xff, 0xfa, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x16, 0xf0, 0x90, 0xff, 0xf9, 0x74,
+0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcc, 0xe4, 0xfd, 0x12, 0x22, 0xa0, 0x90, 0xfa, 0xcc,
+0xe4, 0x75, 0xf0, 0x03, 0x12, 0x1a, 0x6c, 0x12, 0x18, 0xe2, 0xe5, 0x23, 0x30, 0xe7, 0x02, 0xd2,
+0x02, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x24, 0x90, 0xfa, 0xcc, 0xe0, 0xf5, 0x2d, 0xa3, 0xe0, 0xf5,
+0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90, 0xfa, 0xcc, 0xe4, 0xf0, 0xa3, 0x74, 0x0b, 0xf0, 0x7b,
+0x00, 0x7a, 0x00, 0x79, 0x23, 0x75, 0x2d, 0x00, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0xe5,
+0x23, 0x24, 0x80, 0x90, 0xff, 0xf8, 0xf0, 0xe5, 0x23, 0x64, 0x07, 0x60, 0x1e, 0xe5, 0x23, 0x64,
+0x06, 0x60, 0x18, 0xe5, 0x23, 0x64, 0x14, 0x60, 0x12, 0xe5, 0x23, 0x64, 0x41, 0x60, 0x0c, 0xe5,
+0x23, 0x64, 0x1a, 0x70, 0x46, 0xe5, 0x24, 0x64, 0x02, 0x70, 0x40, 0xe5, 0x23, 0xb4, 0x07, 0x16,
+0xd2, 0x94, 0xd2, 0x95, 0xd2, 0x92, 0xd2, 0x93, 0x90, 0xf9, 0x15, 0xe0, 0x44, 0x02, 0xf0, 0xa3,
+0xe0, 0x44, 0x02, 0xf0, 0x80, 0x1e, 0xe5, 0x23, 0xb4, 0x41, 0x12, 0x90, 0xf9, 0x15, 0xe0, 0x44,
+0x06, 0xf0, 0xa3, 0xe0, 0x44, 0x06, 0xf0, 0xd2, 0xb1, 0xd2, 0xb4, 0x80, 0x07, 0x90, 0xf9, 0x15,
+0xe0, 0x44, 0x01, 0xf0, 0x90, 0xf9, 0x16, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x23, 0x64, 0x42, 0x60,
+0x05, 0xe5, 0x23, 0xb4, 0x43, 0x0c, 0x90, 0xf9, 0x15, 0xe0, 0x44, 0x80, 0xf0, 0xa3, 0xe0, 0x44,
+0x80, 0xf0, 0x90, 0xfa, 0xcc, 0xe4, 0xf0, 0xa3, 0x74, 0x0d, 0xf0, 0x12, 0x18, 0xe2, 0x90, 0xff,
+0xf5, 0xe5, 0x23, 0xf0, 0xe4, 0xf5, 0x35, 0xf5, 0x33, 0xf5, 0x34, 0xf5, 0x32, 0x12, 0x1d, 0x84,
+0x12, 0x1c, 0x30, 0x12, 0x1d, 0x8b, 0x90, 0xf9, 0x67, 0x12, 0x1b, 0x43, 0x90, 0xf9, 0x6c, 0x12,
+0x1b, 0x43, 0x90, 0xff, 0xff, 0xe4, 0xf0, 0x90, 0xff, 0x83, 0xe0, 0xe4, 0xf0, 0x90, 0xff, 0x81,
+0x74, 0x80, 0xf0, 0xa3, 0x74, 0x84, 0xf0, 0x90, 0xff, 0x80, 0xf0, 0xe4, 0xf5, 0x23, 0xe5, 0x23,
+0x12, 0x1c, 0xa7, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x23, 0x12, 0x1c, 0xb5, 0xf5, 0x83, 0xe4, 0xf0,
+0x05, 0x23, 0xe5, 0x23, 0xb4, 0x07, 0xe7, 0x78, 0x7a, 0x76, 0xfe, 0x08, 0x76, 0xf0, 0x90, 0x31,
+0x4d, 0xe4, 0x93, 0xff, 0x78, 0x78, 0xf6, 0xfd, 0xad, 0x07, 0x90, 0x31, 0x5a, 0xe4, 0x93, 0xff,
+0x08, 0xf6, 0xff, 0xed, 0x54, 0x0f, 0xfd, 0x12, 0x1c, 0x97, 0x74, 0x84, 0xf0, 0xed, 0x75, 0xf0,
+0x08, 0xa4, 0x24, 0x47, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xc3, 0x74, 0xf0,
+0x9f, 0x78, 0x7b, 0xf6, 0x74, 0xfe, 0x94, 0x00, 0x18, 0x12, 0x1c, 0x28, 0xce, 0xc3, 0x13, 0xce,
+0x13, 0xd8, 0xf9, 0xff, 0xed, 0x12, 0x1c, 0xf8, 0xef, 0xf0, 0xed, 0x12, 0x1d, 0x1e, 0xe4, 0xf5,
+0x23, 0xe5, 0x23, 0x90, 0x31, 0x47, 0x93, 0xff, 0x78, 0x78, 0xf6, 0xfd, 0xe5, 0x23, 0x25, 0xe0,
+0x24, 0x4e, 0xf5, 0x82, 0xe4, 0x34, 0x31, 0xf5, 0x83, 0xe4, 0x93, 0x08, 0xf6, 0xed, 0x30, 0xe7,
+0x53, 0x18, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x1c, 0x97, 0x12, 0x1d, 0x06, 0x24, 0x47, 0xf5, 0x82,
+0xe4, 0x34, 0xff, 0x12, 0x1c, 0x18, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0xe9, 0x12,
+0x1c, 0xf8, 0xef, 0xf0, 0x12, 0x1c, 0x1f, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x1d,
+0x0b, 0x24, 0x45, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x12, 0x1d, 0x1e,
+0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x46, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80,
+0xf0, 0x02, 0x18, 0xb7, 0x78, 0x78, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x1c, 0xea, 0x12, 0x1d, 0x06,
+0x24, 0x07, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x12, 0x1c, 0x18, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8,
+0xf9, 0x12, 0x1d, 0x0b, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0x12,
+0x1c, 0x1f, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x1d, 0x0b, 0x24, 0x05, 0xf5, 0x82,
+0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82,
+0xe4, 0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82,
+0xe4, 0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 0x23, 0xe5, 0x23, 0x64, 0x04, 0x60, 0x03, 0x02,
+0x17, 0xe1, 0x90, 0x31, 0x4c, 0xe4, 0x93, 0xff, 0x78, 0x78, 0xf6, 0x12, 0x1c, 0xe8, 0xe4, 0xf0,
+0x90, 0x31, 0x4b, 0x93, 0xff, 0xf6, 0x12, 0x1c, 0x95, 0xe4, 0xf0, 0x90, 0xff, 0xfd, 0x74, 0x05,
+0xf0, 0x22, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x23, 0x90, 0xfa, 0xcc, 0xe4, 0x75, 0xf0, 0x01, 0x12,
+0x1a, 0x82, 0x85, 0xf0, 0x2e, 0xf5, 0x2d, 0x7d, 0x01, 0x02, 0x25, 0xd7, 0xe7, 0x09, 0xf6, 0x08,
+0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e, 0x88, 0x82, 0x8c, 0x83,
+0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x78,
+0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83, 0xe3, 0x09, 0xf0, 0xa3,
+0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x58,
+0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c, 0x80, 0xd2, 0x80, 0xfa,
+0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10, 0x80, 0xa6, 0x80, 0xea,
+0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33, 0x89, 0x82, 0x8a, 0x83,
+0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8,
+0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0x0d, 0x89, 0x82, 0x8a,
+0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0, 0xed, 0xfb, 0x22, 0x89,
+0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xf0,
+0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde, 0xe8, 0x80, 0xdb, 0x89,
+0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc, 0x88, 0xf0, 0xef, 0x60,
+0x01, 0x0e, 0x4e, 0x60, 0xc3, 0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xb9, 0xf5,
+0x82, 0xeb, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xaf, 0x23, 0x23, 0x45, 0x82, 0x23, 0x90, 0x19,
+0x4c, 0x73, 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, 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, 0xf8, 0xbb, 0x01, 0x0d, 0xe5, 0x82,
+0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82,
+0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0x22, 0xc5, 0xf0, 0xf8, 0xa3,
+0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83, 0xe0, 0x38,
+0xf0, 0x22, 0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02,
+0x15, 0x83, 0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22, 0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82,
+0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0, 0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82,
+0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe, 0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0,
+0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83, 0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22,
+0xbb, 0x01, 0x0a, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0xe5, 0xf0, 0xa3, 0xf0, 0x22, 0x50, 0x06, 0xf7,
+0x09, 0xa7, 0xf0, 0x19, 0x22, 0xbb, 0xfe, 0x06, 0xf3, 0xe5, 0xf0, 0x09, 0xf3, 0x19, 0x22, 0xf8,
+0xbb, 0x01, 0x11, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0, 0xe5,
+0xf0, 0xa3, 0xf0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x08, 0xa6, 0xf0, 0x22, 0xbb,
+0xfe, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0xe5, 0xf0, 0x08, 0xf2, 0x22, 0xa4, 0x25, 0x82, 0xf5,
+0x82, 0xe5, 0xf0, 0x35, 0x83, 0xf5, 0x83, 0x22, 0xe6, 0xfb, 0x08, 0xe6, 0xfa, 0x08, 0xe6, 0xf9,
+0x22, 0xeb, 0xf6, 0x08, 0xea, 0xf6, 0x08, 0xe9, 0xf6, 0x22, 0xe0, 0xfb, 0xa3, 0xe0, 0xfa, 0xa3,
+0xe0, 0xf9, 0x22, 0xeb, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xe9, 0xf0, 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, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0xe5, 0x4c, 0x12, 0x1a, 0x38, 0x74, 0x01, 0x25,
+0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0xab, 0x36, 0xfa, 0xa9, 0x38, 0x74, 0x11, 0x12,
+0x1a, 0x38, 0x74, 0x01, 0x25, 0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0x90, 0xff, 0x06,
+0xe0, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0x12, 0x1a, 0x38, 0x74, 0x01, 0x25, 0x38, 0xf5, 0x38,
+0xe4, 0x35, 0x37, 0xf5, 0x37, 0xab, 0x36, 0xfa, 0xa9, 0x38, 0xe4, 0x12, 0x1a, 0x38, 0x04, 0x25,
+0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0xab, 0x36, 0xfa, 0xa9, 0x38, 0xe4, 0x12, 0x1a,
+0x38, 0x04, 0x25, 0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0x90, 0xff, 0x04, 0xe0, 0xab,
+0x36, 0xaa, 0x37, 0xa9, 0x38, 0x12, 0x1a, 0x38, 0x74, 0x01, 0x25, 0x38, 0xf5, 0x38, 0xe4, 0x35,
+0x37, 0xf5, 0x37, 0x90, 0xff, 0x05, 0xe0, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0x12, 0x1a, 0x38,
+0x74, 0x01, 0x25, 0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0x22, 0xf5, 0x83, 0xe0, 0x54,
+0x08, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0x22, 0xf5, 0x83, 0xef, 0xf0, 0xfd, 0x7c, 0x00, 0xc3,
+0x78, 0x7b, 0xe6, 0x9d, 0xf6, 0x18, 0xe6, 0x9c, 0xf6, 0xe6, 0xfe, 0x08, 0xe6, 0x78, 0x03, 0x22,
+0x75, 0x36, 0x01, 0x75, 0x37, 0xf9, 0x75, 0x38, 0x6f, 0x22, 0xe0, 0x44, 0x04, 0xf0, 0x74, 0x12,
+0x2f, 0xf5, 0x82, 0xe4, 0x34, 0xf9, 0xf5, 0x83, 0xe0, 0x22, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 0x7e,
+0x00, 0xc3, 0x90, 0xfa, 0xbd, 0xe0, 0x9f, 0xf0, 0x90, 0xfa, 0xbc, 0xe0, 0x9e, 0xf0, 0x90, 0xfa,
+0xb4, 0xee, 0x8f, 0xf0, 0x12, 0x1a, 0x6c, 0xef, 0x25, 0x4f, 0xf5, 0x4f, 0xee, 0x35, 0x4e, 0xf5,
+0x4e, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb1, 0x90, 0xfa, 0xb4, 0xe0, 0xf5, 0x2d, 0xa3, 0xe0,
+0xf5, 0x2e, 0x22, 0x78, 0x7c, 0xe6, 0xfe, 0x08, 0xe6, 0x8e, 0x83, 0x24, 0x04, 0xf5, 0x82, 0xe4,
+0x35, 0x83, 0xf5, 0x83, 0x22, 0x54, 0x0f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe4,
+0x34, 0xff, 0xf5, 0x83, 0x22, 0xe5, 0x4d, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x48, 0xf5, 0x82, 0xe4,
+0x34, 0xff, 0x22, 0xe5, 0x4d, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x34, 0xff,
+0x22, 0x90, 0xfa, 0xb6, 0xe0, 0xff, 0x24, 0xfc, 0x22, 0x90, 0xff, 0x00, 0xe0, 0x54, 0x1f, 0x22,
+0x90, 0xfa, 0xbb, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x22, 0x75, 0x33, 0x00, 0x8f, 0x34, 0x90, 0xf9,
+0x6c, 0x12, 0x1b, 0x3a, 0x90, 0x00, 0x02, 0x22, 0x54, 0x0f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00,
+0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x41, 0xf5, 0x82,
+0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0x74, 0x80, 0xf0, 0x08, 0xe6, 0xff, 0xe9, 0x75, 0xf0, 0x08,
+0xa4, 0x22, 0x74, 0xaf, 0x25, 0x22, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83, 0x22, 0x75, 0xf0,
+0x08, 0xa4, 0x24, 0x42, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80, 0xf0, 0x22, 0x90,
+0xff, 0x82, 0xe0, 0x44, 0x08, 0xf0, 0x22, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x03, 0xf0, 0x90, 0xff,
+0xfc, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x78, 0x67, 0xe6, 0x54, 0xfd, 0xf6, 0x90, 0xff, 0xfd, 0x74,
+0x65, 0xf0, 0x22, 0x12, 0x1b, 0x1c, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x22, 0x7b, 0x01, 0x7a,
+0xfa, 0x79, 0xb4, 0x22, 0x90, 0xff, 0x80, 0xe0, 0x44, 0x08, 0xf0, 0x22, 0x90, 0xff, 0x83, 0xe0,
+0x54, 0x7f, 0xf0, 0x22, 0xe0, 0xff, 0x90, 0xf9, 0x67, 0x02, 0x1b, 0x3a, 0x90, 0xff, 0xa4, 0xe0,
+0x44, 0x02, 0xf0, 0x22, 0x75, 0x39, 0x01, 0x75, 0x3a, 0x09, 0x22, 0x7b, 0x01, 0x7a, 0xf9, 0x79,
+0x6f, 0x22, 0xd3, 0xe5, 0x3c, 0x94, 0x08, 0xe5, 0x3b, 0x94, 0x01, 0x22, 0x90, 0xfa, 0xbb, 0xe0,
+0xff, 0x90, 0xfa, 0xb7, 0xf0, 0x22, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xef, 0x22, 0x90, 0xff, 0xb4,
+0xe0, 0x54, 0xef, 0x22, 0x12, 0x10, 0x03, 0x78, 0x88, 0xef, 0xf6, 0x12, 0x2a, 0x06, 0x12, 0x22,
+0x4a, 0x8e, 0x83, 0x24, 0x09, 0x12, 0x21, 0xf3, 0xe0, 0xfd, 0x12, 0x22, 0x2d, 0x90, 0x00, 0x0a,
+0x12, 0x22, 0x52, 0x24, 0x0a, 0x12, 0x21, 0xf3, 0xe0, 0x90, 0x00, 0x0b, 0x12, 0x1a, 0x4a, 0x12,
+0x22, 0x4a, 0xf5, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x53, 0x12, 0x22, 0x56, 0x24,
+0x04, 0x12, 0x21, 0xf3, 0xe0, 0xf5, 0x54, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xf5, 0x55,
+0xe5, 0x53, 0xc4, 0x13, 0x13, 0x13, 0x54, 0x01, 0x78, 0x88, 0xf6, 0xd3, 0x94, 0x00, 0x40, 0x06,
+0xe5, 0x54, 0x30, 0xe1, 0x01, 0x06, 0x78, 0x88, 0xe6, 0x12, 0x22, 0x2c, 0x90, 0x00, 0x0c, 0xef,
+0x12, 0x1a, 0x4a, 0x78, 0x80, 0x12, 0x22, 0x09, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x53,
+0x07, 0x0c, 0x53, 0x06, 0xe6, 0xe5, 0x53, 0x30, 0xe5, 0x03, 0x43, 0x07, 0x01, 0xe5, 0x54, 0x20,
+0xe5, 0x0e, 0xe5, 0x53, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x53, 0x20, 0xe7, 0x03, 0x43, 0x07, 0x02,
+0xe5, 0x53, 0x30, 0xe3, 0x03, 0x43, 0x07, 0x10, 0xe5, 0x53, 0x30, 0xe2, 0x03, 0x43, 0x07, 0x20,
+0xe5, 0x53, 0x54, 0x03, 0x60, 0x03, 0x43, 0x07, 0x40, 0xe5, 0x53, 0x30, 0xe1, 0x03, 0x43, 0x07,
+0x80, 0xe5, 0x53, 0x30, 0xe4, 0x03, 0x43, 0x06, 0x01, 0xe5, 0x53, 0x30, 0xe6, 0x03, 0x43, 0x06,
+0x08, 0xe5, 0x54, 0x20, 0xe4, 0x0e, 0xe5, 0x53, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x53, 0x20, 0xe7,
+0x03, 0x43, 0x06, 0x10, 0x53, 0x07, 0xfb, 0x53, 0x06, 0x79, 0x90, 0x00, 0x05, 0xee, 0x8f, 0xf0,
+0x12, 0x1a, 0xef, 0xe5, 0x55, 0x30, 0xe3, 0x12, 0x54, 0x30, 0xff, 0xc4, 0x54, 0x0f, 0x12, 0x22,
+0x2c, 0x90, 0x00, 0x08, 0xef, 0x12, 0x1a, 0x4a, 0x80, 0x0a, 0x12, 0x22, 0x2d, 0x90, 0x00, 0x08,
+0xe4, 0x12, 0x1a, 0x4a, 0xe5, 0x55, 0x54, 0x03, 0x12, 0x22, 0x2c, 0x90, 0x00, 0x07, 0xef, 0x12,
+0x1a, 0x4a, 0xe5, 0x55, 0x54, 0x04, 0xff, 0xc3, 0x13, 0x90, 0x00, 0x09, 0x12, 0x1a, 0x4a, 0x90,
+0x00, 0x07, 0x12, 0x1a, 0x0b, 0x70, 0x13, 0x12, 0x22, 0x2d, 0xe9, 0x24, 0x09, 0xf9, 0xe4, 0x3a,
+0xfa, 0x12, 0x19, 0xf2, 0xff, 0xc3, 0x13, 0x12, 0x1a, 0x38, 0x12, 0x22, 0x78, 0x24, 0x08, 0x12,
+0x21, 0xf3, 0xe0, 0xfe, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x07, 0x12, 0x21, 0xf3, 0xe0,
+0xfd, 0xee, 0xed, 0x12, 0x22, 0x2c, 0x90, 0x00, 0x03, 0xee, 0x8f, 0xf0, 0x12, 0x1a, 0xef, 0x12,
+0x31, 0xc7, 0x7d, 0x0a, 0xe4, 0xff, 0x12, 0x2f, 0x18, 0x02, 0x10, 0x86, 0x90, 0xfa, 0xe3, 0xe0,
+0xb4, 0x03, 0x06, 0x7e, 0x00, 0x7f, 0x40, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x08, 0x90, 0xfa, 0xd7,
+0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x05, 0x12, 0x1a, 0x0b, 0xff, 0x7e, 0x00, 0x90, 0xfa,
+0xd3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x70, 0x03, 0x7f, 0x08, 0x22, 0x90, 0x00, 0x08, 0x12, 0x1a,
+0x98, 0xff, 0x90, 0xfa, 0xd5, 0xe5, 0xf0, 0xf0, 0xa3, 0xef, 0xf0, 0xae, 0x02, 0xaf, 0x01, 0x8e,
+0x50, 0x8f, 0x51, 0x74, 0x0a, 0x25, 0x51, 0xf5, 0x51, 0xe4, 0x35, 0x50, 0xf5, 0x50, 0x90, 0xfa,
+0xd8, 0xe0, 0xff, 0x14, 0xfe, 0x90, 0xfa, 0xd6, 0xe0, 0x5e, 0xfe, 0xc3, 0xef, 0x9e, 0xff, 0x90,
+0xfa, 0xda, 0xf0, 0xc3, 0x90, 0xfa, 0xd4, 0xe0, 0x9f, 0x90, 0xfa, 0xd3, 0xe0, 0x94, 0x00, 0x50,
+0x06, 0xa3, 0xe0, 0x90, 0xfa, 0xda, 0xf0, 0x12, 0x1f, 0xfb, 0x60, 0x03, 0xe0, 0xff, 0x22, 0x12,
+0x2d, 0x5a, 0x90, 0xfa, 0xd3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x60, 0x2b, 0x90, 0xfa, 0xd7,
+0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xd3, 0xef, 0x9d, 0xee, 0x9c, 0x40, 0x07, 0xe0, 0x90, 0xfa, 0xda,
+0xf0, 0x80, 0x08, 0x90, 0xfa, 0xd4, 0xe0, 0x90, 0xfa, 0xda, 0xf0, 0x12, 0x1f, 0xfb, 0x60, 0x03,
+0xe0, 0xff, 0x22, 0x12, 0x2d, 0x5a, 0x80, 0xca, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x52, 0xe4, 0xf5,
+0x2d, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x7f, 0x00, 0x22, 0xaa, 0x50, 0xa9, 0x51, 0x7b,
+0x01, 0x90, 0xfa, 0xd5, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa, 0xda, 0xe0, 0xf5, 0x4a, 0x12,
+0x28, 0x9f, 0x90, 0xfa, 0xd9, 0xef, 0xf0, 0x22, 0xef, 0x24, 0xae, 0x60, 0x52, 0x24, 0xfe, 0x60,
+0x2e, 0x24, 0xfe, 0x70, 0x03, 0x02, 0x20, 0xbb, 0x24, 0x06, 0x60, 0x03, 0x02, 0x21, 0x03, 0x78,
+0x71, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xa5, 0xe0, 0xf5, 0x22, 0x44, 0x0f, 0xf0, 0x74, 0x33,
+0x90, 0xfa, 0x91, 0xf0, 0xe5, 0x22, 0xa3, 0xf0, 0x90, 0xfa, 0xaf, 0x74, 0x01, 0xf0, 0x22, 0x78,
+0x72, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xb5, 0xe0, 0xf5, 0x22, 0x44, 0x0f, 0xf0, 0x74, 0x43,
+0x90, 0xfa, 0x93, 0xf0, 0xe5, 0x22, 0xa3, 0xf0, 0x90, 0xfa, 0xb0, 0x74, 0x01, 0xf0, 0x22, 0x90,
+0xfa, 0x9d, 0xe0, 0xa3, 0x20, 0xe5, 0x03, 0x02, 0x21, 0x03, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa,
+0xca, 0xf0, 0xa3, 0xf0, 0x90, 0xfa, 0xca, 0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, 0x90, 0xff,
+0xa6, 0x12, 0x22, 0x5d, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa, 0xca, 0xf0, 0x80, 0xe6, 0x90, 0xfa,
+0xcb, 0xe0, 0xff, 0x74, 0x34, 0xfe, 0x12, 0x2c, 0xb4, 0xef, 0x70, 0x57, 0x90, 0xfa, 0xcb, 0xe0,
+0xff, 0x74, 0x34, 0x90, 0xfa, 0x95, 0xf0, 0xef, 0xa3, 0xf0, 0x22, 0x90, 0xfa, 0xa7, 0xe0, 0xa3,
+0x30, 0xe5, 0x40, 0x90, 0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xca, 0xf0, 0xa3, 0xf0, 0x90, 0xfa, 0xca,
+0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, 0x90, 0xff, 0xb6, 0x12, 0x22, 0x5d, 0x90, 0xff, 0xb6,
+0xe0, 0x90, 0xfa, 0xca, 0xf0, 0x80, 0xe6, 0x90, 0xfa, 0xcb, 0xe0, 0xff, 0x74, 0x44, 0xfe, 0x12,
+0x2c, 0xb4, 0xef, 0x70, 0x0e, 0x90, 0xfa, 0xcb, 0xe0, 0xff, 0x74, 0x44, 0x90, 0xfa, 0x97, 0xf0,
+0xef, 0xa3, 0xf0, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0,
+0x00, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0,
+0x07, 0x90, 0xff, 0x92, 0xe0, 0xff, 0x90, 0xfa, 0xc9, 0xf0, 0x90, 0xff, 0x92, 0xe4, 0xf0, 0xef,
+0x12, 0x1b, 0x4c, 0x21, 0xbb, 0x26, 0x21, 0xbb, 0x2e, 0x21, 0x5e, 0x30, 0x21, 0x5e, 0x32, 0x21,
+0x6c, 0x38, 0x21, 0x7e, 0x3a, 0x21, 0xb0, 0x3e, 0x21, 0x9b, 0x44, 0x21, 0x90, 0x46, 0x21, 0xa6,
+0x50, 0x21, 0xa6, 0x52, 0x21, 0xa6, 0x54, 0x21, 0xa6, 0x56, 0x00, 0x00, 0x21, 0xc0, 0x90, 0xfa,
+0xc9, 0xe0, 0xfd, 0x7c, 0x00, 0x7f, 0x01, 0x12, 0x11, 0x16, 0x80, 0x62, 0x7c, 0x00, 0x7d, 0x01,
+0x7f, 0x03, 0x12, 0x11, 0x16, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x50, 0x7c, 0x00,
+0x7d, 0x01, 0x7f, 0x02, 0x12, 0x11, 0x16, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x40, 0xf0, 0x80, 0x3e,
+0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x05, 0x12, 0x11, 0x16, 0x80, 0x33, 0x7c, 0x00, 0x7d, 0x01, 0x7f,
+0x06, 0x12, 0x11, 0x16, 0x80, 0x28, 0x90, 0xfa, 0xc9, 0xe0, 0xff, 0x12, 0x20, 0x18, 0x80, 0x1e,
+0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x04, 0x12, 0x11, 0x16, 0x80, 0x13, 0x12, 0x27, 0x8d, 0x80, 0x0e,
+0x90, 0xfa, 0xc9, 0xe0, 0x24, 0x00, 0xff, 0xe4, 0x34, 0xff, 0xfe, 0x12, 0x2c, 0xb4, 0xd0, 0x07,
+0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0xd0,
+0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x78, 0x7c, 0xe6, 0xfe, 0x08, 0xe6, 0x24,
+0x04, 0x8e, 0x83, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x22, 0x74, 0x12, 0x25, 0x24, 0xf5,
+0x82, 0xe4, 0x34, 0xf9, 0xf5, 0x83, 0x22, 0x78, 0x7c, 0xe6, 0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e,
+0x83, 0x22, 0x78, 0x80, 0xe6, 0xfe, 0x08, 0xe6, 0xaa, 0x06, 0xf8, 0xac, 0x02, 0x7d, 0x01, 0x7b,
+0xff, 0x7a, 0x31, 0x79, 0x99, 0x7e, 0x00, 0x7f, 0x0a, 0x02, 0x19, 0xcc, 0xff, 0x90, 0xf9, 0x6c,
+0x02, 0x1b, 0x3a, 0x90, 0xf9, 0x67, 0x12, 0x1b, 0x3a, 0x90, 0x00, 0x04, 0x02, 0x1a, 0x0b, 0xe6,
+0xfc, 0x08, 0xe6, 0xf5, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0x22, 0x78, 0x7e, 0xe6, 0xfe, 0x08, 0xe6,
+0xff, 0x22, 0xed, 0x12, 0x1a, 0x4a, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x22, 0xef, 0xf0, 0x90,
+0xfa, 0xcb, 0xe0, 0x54, 0x0f, 0x4e, 0xfe, 0xf0, 0xef, 0x54, 0xf0, 0x4e, 0xf0, 0x22, 0x08, 0xe6,
+0xfc, 0x08, 0xe6, 0x8c, 0x83, 0x24, 0x09, 0x22, 0x78, 0x7e, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x8c,
+0x83, 0x22, 0xa6, 0x07, 0xe6, 0x24, 0x6e, 0xf8, 0xe6, 0x22, 0x78, 0x7e, 0xe6, 0xfa, 0x08, 0xe6,
+0xfb, 0x22, 0x26, 0xf6, 0x18, 0xee, 0x36, 0xf6, 0x22, 0x8b, 0x82, 0x8a, 0x83, 0xe5, 0x82, 0x22,
+0x8b, 0x25, 0x8a, 0x26, 0x89, 0x27, 0x8d, 0x28, 0x90, 0xfa, 0xcf, 0xe4, 0xf0, 0xa3, 0x74, 0x02,
+0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xce, 0x90, 0xfa, 0xcf, 0xe0, 0xf5, 0x2d, 0xa3, 0xe0, 0xf5,
+0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90, 0xfa, 0xce, 0xe0, 0x65, 0x28, 0x60, 0x46, 0xa3, 0xe0,
+0xff, 0xa3, 0xe0, 0xa3, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x12, 0x23, 0x2f, 0x90, 0xfa, 0xce, 0xe0,
+0xff, 0x90, 0xfa, 0xd1, 0xe4, 0x8f, 0xf0, 0x12, 0x1a, 0x6c, 0x12, 0x23, 0x2f, 0x90, 0xfa, 0xd1,
+0xe0, 0xff, 0xa3, 0xe0, 0x90, 0xfa, 0xcf, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0xfa, 0xce, 0xe0,
+0xa3, 0x75, 0xf0, 0x00, 0x12, 0x1a, 0x6c, 0x90, 0xfa, 0xcf, 0xe4, 0x75, 0xf0, 0x04, 0x12, 0x1a,
+0x6c, 0x02, 0x22, 0xb1, 0x90, 0xfa, 0xd0, 0xe0, 0x24, 0x01, 0xff, 0x90, 0xfa, 0xcf, 0xe0, 0x34,
+0x00, 0xab, 0x25, 0xaa, 0x26, 0xa9, 0x27, 0x8f, 0xf0, 0x12, 0x1a, 0xd0, 0x7f, 0x00, 0x22, 0x7b,
+0x01, 0x7a, 0xfa, 0x79, 0xce, 0x90, 0xfa, 0xcf, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x1a, 0x6c, 0x85,
+0xf0, 0x2e, 0xf5, 0x2d, 0x7d, 0x01, 0x02, 0x25, 0xd7, 0x8f, 0x62, 0x12, 0x2a, 0x06, 0x12, 0x22,
+0x4a, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x21, 0xf3, 0xe0, 0x54, 0xfb, 0xf0, 0x44, 0x02, 0xf0, 0x08,
+0x12, 0x22, 0x3f, 0xe0, 0xa3, 0x30, 0xe5, 0x0c, 0x12, 0x22, 0x56, 0x24, 0x0b, 0x12, 0x21, 0xf3,
+0xe0, 0x44, 0x01, 0xf0, 0x78, 0x7c, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0xf5, 0x82, 0x8e, 0x83, 0xe0,
+0x54, 0xb8, 0xfd, 0xf0, 0xe5, 0x62, 0x24, 0xfe, 0x44, 0x20, 0xfc, 0x4d, 0xf0, 0xe5, 0x82, 0x24,
+0x04, 0x12, 0x21, 0xf3, 0xe0, 0x54, 0xb8, 0xf0, 0x4c, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0x74,
+0x03, 0xf0, 0x18, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, 0x05, 0x12, 0x21, 0xf3, 0xc0,
+0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x74, 0x96, 0x25, 0x62, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83,
+0xe0, 0x54, 0xfc, 0x44, 0x03, 0xfc, 0xed, 0x4c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e,
+0x83, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x21, 0xf3, 0xe0, 0x44, 0x80, 0xf0,
+0x12, 0x31, 0xc7, 0x74, 0x6e, 0x25, 0x62, 0xf8, 0x74, 0x04, 0x46, 0xf6, 0x7f, 0x00, 0x22, 0x12,
+0x10, 0x03, 0x7f, 0x02, 0x12, 0x12, 0x19, 0x78, 0x67, 0xe6, 0x44, 0x02, 0xf6, 0xd2, 0xb0, 0xd2,
+0xb1, 0x90, 0xf9, 0x15, 0xe0, 0x30, 0xe7, 0x07, 0x90, 0xff, 0x9e, 0xe4, 0xf0, 0x80, 0x36, 0xd2,
+0xb3, 0x90, 0xff, 0xa4, 0xe0, 0x90, 0xfa, 0x7b, 0xf0, 0x90, 0xff, 0xb4, 0xe0, 0x90, 0xfa, 0x7c,
+0xf0, 0x90, 0xff, 0xa2, 0xe0, 0x90, 0xfa, 0x79, 0xf0, 0x90, 0xff, 0xb2, 0xe0, 0x90, 0xfa, 0x7a,
+0xf0, 0x90, 0xff, 0xa4, 0x74, 0x30, 0xf0, 0x90, 0xff, 0xb4, 0xf0, 0x90, 0xff, 0xa2, 0x74, 0x40,
+0xf0, 0x90, 0xff, 0xb2, 0xf0, 0x90, 0xfa, 0xe4, 0xe5, 0xa8, 0xf0, 0x75, 0xa8, 0x81, 0x90, 0xff,
+0x92, 0xe0, 0x60, 0x04, 0xe4, 0xf0, 0x80, 0xf6, 0x90, 0xff, 0xfd, 0x74, 0x3a, 0xf0, 0x43, 0x87,
+0x01, 0x00, 0x00, 0x00, 0x90, 0xfa, 0x7b, 0xe0, 0x90, 0xff, 0xa4, 0xf0, 0x90, 0xfa, 0x7c, 0xe0,
+0x90, 0xff, 0xb4, 0xf0, 0x90, 0xfa, 0x79, 0xe0, 0x90, 0xff, 0xa2, 0xf0, 0x90, 0xfa, 0x7a, 0xe0,
+0x90, 0xff, 0xb2, 0xf0, 0x90, 0xf9, 0x17, 0xe0, 0x60, 0x02, 0xc2, 0xb3, 0x90, 0xfa, 0xe4, 0xe0,
+0xf5, 0xa8, 0x02, 0x10, 0x86, 0x8b, 0x5c, 0x8a, 0x5d, 0x89, 0x5e, 0x12, 0x2d, 0x3c, 0x90, 0xfa,
+0xc0, 0x12, 0x1b, 0x43, 0xaa, 0x5d, 0xa9, 0x5e, 0x90, 0xfa, 0xc3, 0x12, 0x1b, 0x43, 0x90, 0xfa,
+0xc4, 0xe4, 0x75, 0xf0, 0x0a, 0x12, 0x1a, 0x6c, 0x90, 0xfa, 0xc3, 0x12, 0x1b, 0x3a, 0xe9, 0x24,
+0x01, 0xf9, 0xe4, 0x3a, 0xfa, 0x90, 0xfa, 0xc6, 0x12, 0x1b, 0x43, 0xab, 0x5c, 0xaa, 0x5d, 0xa9,
+0x5e, 0x12, 0x2d, 0x48, 0xe0, 0xff, 0xc3, 0x13, 0xf0, 0xe4, 0x78, 0x82, 0xf6, 0x90, 0xfa, 0xbe,
+0xe0, 0xff, 0x78, 0x82, 0xe6, 0xc3, 0x9f, 0x50, 0x4a, 0x90, 0xfa, 0xc0, 0x12, 0x2d, 0x1d, 0xff,
+0x78, 0x83, 0xf6, 0x90, 0xfa, 0xc3, 0x12, 0x2d, 0x1d, 0xfe, 0xf4, 0x5f, 0xff, 0x78, 0x83, 0xf6,
+0x12, 0x2d, 0x1a, 0x5e, 0x4f, 0xff, 0x78, 0x83, 0xf6, 0x12, 0x2d, 0x23, 0x75, 0xf0, 0x02, 0x12,
+0x1a, 0x6c, 0x90, 0xfa, 0xc4, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x1a, 0x6c, 0xab, 0x5c, 0xaa, 0x5d,
+0xa9, 0x5e, 0x90, 0x00, 0x04, 0x12, 0x1a, 0x0b, 0x30, 0xe4, 0x03, 0x12, 0x2d, 0x32, 0x78, 0x82,
+0x06, 0x80, 0xaa, 0xe4, 0x90, 0xfa, 0xbf, 0xf0, 0x22, 0x8b, 0x56, 0x8a, 0x57, 0x89, 0x58, 0x90,
+0xfa, 0xbf, 0x74, 0x06, 0xf0, 0xe4, 0x90, 0xfa, 0xbe, 0xf0, 0x12, 0x19, 0xf2, 0x24, 0x6e, 0x60,
+0x26, 0x14, 0x70, 0x70, 0x12, 0x2d, 0x09, 0x60, 0x09, 0x24, 0x30, 0x70, 0x12, 0x12, 0x24, 0x95,
+0x80, 0x62, 0x12, 0x2d, 0x53, 0x12, 0x1f, 0x2c, 0x90, 0xfa, 0xbf, 0xef, 0xf0, 0x80, 0x55, 0x90,
+0xfa, 0xbf, 0x74, 0x81, 0xf0, 0x80, 0x4d, 0x12, 0x2d, 0x09, 0x60, 0x09, 0x24, 0x30, 0x70, 0x3e,
+0x12, 0x2c, 0x5f, 0x80, 0x3f, 0xe5, 0x58, 0x24, 0x03, 0xf9, 0xe4, 0x35, 0x57, 0xfa, 0x7b, 0x01,
+0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0x12, 0x2d, 0x53, 0x90, 0x00, 0x05, 0x12, 0x1a, 0x0b, 0xfd,
+0x90, 0x00, 0x08, 0x12, 0x1a, 0x98, 0xf5, 0x2e, 0x85, 0xf0, 0x2d, 0xd0, 0x01, 0xd0, 0x02, 0xd0,
+0x03, 0x12, 0x25, 0xd7, 0x90, 0xfa, 0xbe, 0xef, 0xf0, 0xe4, 0xa3, 0xf0, 0x80, 0x06, 0x90, 0xfa,
+0xbf, 0x74, 0x81, 0xf0, 0x90, 0xfa, 0xbf, 0xe0, 0x12, 0x2d, 0x53, 0x90, 0x00, 0x02, 0x12, 0x1a,
+0x4a, 0x90, 0xfa, 0xbe, 0xe0, 0xff, 0x22, 0x8b, 0x29, 0x8a, 0x2a, 0x89, 0x2b, 0x8d, 0x2c, 0xe5,
+0x2c, 0x70, 0x03, 0xaf, 0x2c, 0x22, 0x12, 0x2d, 0x82, 0x70, 0x16, 0x12, 0x2d, 0xa1, 0xe5, 0x2d,
+0x90, 0xff, 0xf1, 0xf0, 0x12, 0x31, 0x1b, 0x50, 0xf2, 0x12, 0x26, 0x64, 0x40, 0x0b, 0x7f, 0x00,
+0x22, 0x12, 0x2d, 0xa1, 0x12, 0x26, 0x64, 0x50, 0xf8, 0x90, 0xff, 0xf3, 0x74, 0xa1, 0xf0, 0xe5,
+0x2c, 0xb4, 0x01, 0x07, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0xff, 0xf1, 0xe4, 0xf0,
+0xf5, 0x2f, 0xe5, 0x2c, 0x14, 0xff, 0xe5, 0x2f, 0xc3, 0x9f, 0x50, 0x2a, 0x12, 0x31, 0x04, 0x40,
+0x03, 0xaf, 0x2f, 0x22, 0xc3, 0xe5, 0x2c, 0x95, 0x2f, 0xff, 0xbf, 0x02, 0x07, 0x90, 0xff, 0xf0,
+0xe0, 0x44, 0x02, 0xf0, 0x12, 0x2d, 0x94, 0x05, 0x2f, 0x74, 0x01, 0x25, 0x2b, 0xf5, 0x2b, 0xe4,
+0x35, 0x2a, 0xf5, 0x2a, 0x80, 0xcc, 0x12, 0x31, 0x04, 0x40, 0x03, 0x7f, 0x18, 0x22, 0x12, 0x2d,
+0x94, 0xaf, 0x2c, 0x22, 0x90, 0xff, 0xf1, 0xe5, 0x2e, 0xf0, 0x02, 0x31, 0x1b, 0x12, 0x10, 0x03,
+0x78, 0x84, 0x12, 0x22, 0x82, 0x30, 0xe1, 0x08, 0x7f, 0x13, 0x12, 0x30, 0xec, 0x02, 0x26, 0xfb,
+0x78, 0x84, 0xe6, 0xf9, 0x24, 0x12, 0x12, 0x21, 0xff, 0xe0, 0xff, 0x30, 0xe7, 0x40, 0x54, 0x03,
+0x60, 0x1e, 0xe9, 0xb4, 0x03, 0x0d, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, 0x44, 0x04,
+0xf0, 0x80, 0x46, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x80, 0x39,
+0xe9, 0xb4, 0x03, 0x0d, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x01, 0xf0, 0x80,
+0x28, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x1b, 0xef, 0x54,
+0x03, 0x60, 0x14, 0xe9, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x07,
+0x90, 0xff, 0xb4, 0xe0, 0x54, 0xdf, 0xf0, 0xc2, 0xb3, 0x90, 0xf9, 0x17, 0xe0, 0x04, 0xf0, 0xaf,
+0x01, 0x12, 0x22, 0x33, 0xfd, 0x12, 0x2f, 0x49, 0x12, 0x30, 0xec, 0x02, 0x10, 0x86, 0x75, 0xa8,
+0x40, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x8b, 0x02, 0x27, 0x48, 0x02, 0x30, 0xcf,
+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, 0x2b, 0x4c, 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, 0xe7, 0x80, 0xbe, 0xe4, 0xf5, 0x22,
+0x12, 0x1d, 0x12, 0xe0, 0xb4, 0x04, 0x0d, 0xe5, 0x22, 0x24, 0x03, 0xff, 0x12, 0x2f, 0x77, 0x12,
+0x1d, 0x12, 0xe4, 0xf0, 0x05, 0x22, 0xe5, 0x22, 0xc3, 0x94, 0x02, 0x40, 0xe3, 0xe4, 0xf5, 0x22,
+0x75, 0xf0, 0x02, 0xe5, 0x22, 0x90, 0xfa, 0x91, 0x12, 0x1d, 0x53, 0x60, 0x2c, 0x12, 0x2c, 0xb4,
+0xef, 0x60, 0x52, 0x75, 0xf0, 0x02, 0xe5, 0x22, 0x90, 0xfa, 0x91, 0x12, 0x1b, 0x1c, 0xe4, 0xf0,
+0xa3, 0xf0, 0x75, 0xf0, 0x0a, 0xe5, 0x22, 0x90, 0xfa, 0x9d, 0x12, 0x1b, 0x1c, 0xe0, 0xa3, 0x30,
+0xe6, 0x33, 0x12, 0x1d, 0x12, 0x74, 0x04, 0xf0, 0x22, 0x75, 0xf0, 0x02, 0xe5, 0x22, 0x90, 0xfa,
+0x95, 0x12, 0x1d, 0x53, 0x60, 0x16, 0x12, 0x2c, 0xb4, 0xef, 0x60, 0x19, 0x75, 0xf0, 0x02, 0xe5,
+0x22, 0x90, 0xfa, 0x95, 0x12, 0x1b, 0x1c, 0xe4, 0xf0, 0xa3, 0xf0, 0x22, 0x05, 0x22, 0xe5, 0x22,
+0xc3, 0x94, 0x02, 0x40, 0x9b, 0x22, 0xe4, 0xff, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x0f, 0xfe, 0xef,
+0xc3, 0x9e, 0x50, 0x17, 0x74, 0xf0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0xfe, 0xf5, 0x83, 0xe0, 0x12,
+0x1c, 0x11, 0x12, 0x1a, 0x38, 0x0f, 0x12, 0x1c, 0x00, 0x80, 0xdd, 0xef, 0xfd, 0xc3, 0xe5, 0x3a,
+0x9d, 0xf5, 0x3a, 0xe5, 0x39, 0x94, 0x00, 0xf5, 0x39, 0xd3, 0xe5, 0x3a, 0x94, 0x00, 0xe5, 0x39,
+0x94, 0x00, 0x40, 0x06, 0xe4, 0x90, 0xff, 0x83, 0xf0, 0x22, 0x12, 0x1d, 0x2f, 0x12, 0x1d, 0x84,
+0x12, 0x1d, 0x76, 0x12, 0x19, 0xf2, 0x24, 0x6e, 0x60, 0x1e, 0x14, 0x60, 0x1b, 0x24, 0x8e, 0x70,
+0x2d, 0x90, 0x00, 0x01, 0x12, 0x1a, 0x0b, 0xff, 0x24, 0xfc, 0x60, 0x03, 0x04, 0x70, 0x1f, 0xef,
+0xfd, 0x7c, 0x00, 0x7f, 0x0d, 0x02, 0x11, 0x16, 0x12, 0x1d, 0x8b, 0x12, 0x25, 0x39, 0x12, 0x1c,
+0xd9, 0x12, 0x1a, 0x0b, 0x60, 0x03, 0x02, 0x31, 0xbd, 0xe4, 0xff, 0x12, 0x31, 0xb1, 0x22, 0x8b,
+0x45, 0x8a, 0x46, 0x89, 0x47, 0x8c, 0x48, 0x8d, 0x49, 0xd2, 0x00, 0x12, 0x2d, 0x82, 0x70, 0x16,
+0x12, 0x2d, 0xa1, 0xe5, 0x48, 0x90, 0xff, 0xf1, 0xf0, 0x12, 0x31, 0x1b, 0x50, 0xf2, 0x12, 0x29,
+0x14, 0x40, 0x0b, 0x7f, 0x18, 0x22, 0x12, 0x2d, 0xa1, 0x12, 0x29, 0x14, 0x50, 0xf8, 0xe4, 0xf5,
+0x4b, 0xe5, 0x4a, 0x14, 0xff, 0xe5, 0x4b, 0xc3, 0x9f, 0x50, 0x17, 0x12, 0x29, 0x04, 0x40, 0x03,
+0x7f, 0x18, 0x22, 0x05, 0x4b, 0x74, 0x01, 0x25, 0x47, 0xf5, 0x47, 0xe4, 0x35, 0x46, 0xf5, 0x46,
+0x80, 0xdf, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x01, 0xf0, 0x12, 0x29, 0x04, 0x40, 0x03, 0x7f, 0x18,
+0x22, 0x7f, 0x00, 0x22, 0xab, 0x45, 0xaa, 0x46, 0xa9, 0x47, 0x12, 0x19, 0xf2, 0x90, 0xff, 0xf1,
+0xf0, 0x02, 0x31, 0x1b, 0x90, 0xff, 0xf1, 0xe5, 0x49, 0xf0, 0x02, 0x31, 0x1b, 0x7b, 0x01, 0x7a,
+0xfa, 0x79, 0xcc, 0xe4, 0xfd, 0x12, 0x22, 0xa0, 0x90, 0xfa, 0xcc, 0xe4, 0x75, 0xf0, 0x09, 0x12,
+0x1a, 0x6c, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x23, 0x90, 0xfa, 0xcc, 0xe4, 0x75, 0xf0, 0x01, 0x12,
+0x1a, 0x82, 0x85, 0xf0, 0x2e, 0xf5, 0x2d, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90, 0xff, 0xf7, 0xe5,
+0x23, 0x12, 0x29, 0x78, 0x90, 0xff, 0xf6, 0xe5, 0x23, 0xf0, 0x90, 0xfa, 0xcc, 0xe4, 0xf0, 0xa3,
+0x74, 0x06, 0x12, 0x29, 0x78, 0xe5, 0x23, 0x30, 0xe0, 0x07, 0x90, 0xff, 0xfc, 0x74, 0x94, 0xf0,
+0x22, 0x90, 0xff, 0xfc, 0x74, 0x90, 0xf0, 0x22, 0xf0, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x23, 0x90,
+0xfa, 0xcc, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x1a, 0x82, 0x85, 0xf0, 0x2e, 0xf5, 0x2d, 0x7d, 0x01,
+0x02, 0x25, 0xd7, 0x90, 0xff, 0x93, 0x74, 0x2a, 0xf0, 0x90, 0xff, 0xff, 0xe0, 0x60, 0x06, 0x90,
+0xff, 0xfc, 0x74, 0x10, 0xf0, 0x90, 0xff, 0x91, 0xe0, 0x44, 0x90, 0xf0, 0xe4, 0x90, 0xf9, 0x15,
+0xf0, 0xa3, 0xf0, 0x12, 0x2a, 0x78, 0x12, 0x16, 0x42, 0x12, 0x2f, 0xcd, 0x7e, 0x07, 0x7f, 0xd0,
+0x12, 0x11, 0xe2, 0x7e, 0x0f, 0x7f, 0xa0, 0x12, 0x11, 0xfc, 0xe4, 0x78, 0x77, 0xf6, 0x78, 0x77,
+0xe6, 0xff, 0xc3, 0x94, 0x06, 0x50, 0x0b, 0x74, 0x6e, 0x2f, 0xf8, 0xe4, 0xf6, 0x78, 0x77, 0x06,
+0x80, 0xec, 0x7f, 0x03, 0x12, 0x2e, 0xb3, 0x90, 0xf9, 0x15, 0xe0, 0x20, 0xe4, 0x05, 0x7f, 0x04,
+0x12, 0x2e, 0xb3, 0x90, 0xff, 0x9b, 0xe4, 0xf0, 0x90, 0xff, 0x9a, 0xf0, 0x90, 0xff, 0xe8, 0xe0,
+0x54, 0x1f, 0xf0, 0xd2, 0xa8, 0x22, 0x15, 0x65, 0xa8, 0x65, 0xa6, 0x07, 0x30, 0x08, 0x05, 0x12,
+0x11, 0x66, 0x80, 0xf8, 0xd2, 0x08, 0xa8, 0x65, 0xe6, 0xff, 0xb4, 0x03, 0x0f, 0x78, 0x7c, 0x76,
+0xff, 0x08, 0x76, 0xe0, 0x08, 0x76, 0xff, 0x08, 0x76, 0xa0, 0x80, 0x0d, 0x78, 0x7c, 0x76, 0xff,
+0x08, 0x76, 0xe2, 0x08, 0x76, 0xff, 0x08, 0x76, 0xb0, 0x78, 0x80, 0x76, 0xfa, 0x08, 0x76, 0x9b,
+0xef, 0x24, 0xfd, 0x75, 0xf0, 0x0a, 0xa4, 0xae, 0xf0, 0x12, 0x22, 0x92, 0x7b, 0x01, 0x7a, 0xff,
+0x79, 0x48, 0x78, 0x68, 0x12, 0x1b, 0x31, 0xa8, 0x65, 0xe6, 0x24, 0xfd, 0x75, 0xf0, 0x08, 0xa4,
+0xff, 0xae, 0xf0, 0x78, 0x6a, 0x12, 0x22, 0x92, 0x79, 0x08, 0x78, 0x6b, 0x12, 0x1b, 0x31, 0x78,
+0x6d, 0xef, 0x12, 0x22, 0x92, 0x05, 0x65, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0xab, 0xf0, 0xe0,
+0x44, 0x20, 0xf0, 0x90, 0xfa, 0xe3, 0x74, 0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcc, 0xe4,
+0xf5, 0x2d, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x7e, 0x00, 0x90, 0xfa, 0xe1, 0xee, 0xf0,
+0xa3, 0xef, 0xf0, 0x64, 0x01, 0x70, 0x10, 0x90, 0xfa, 0xcc, 0xe0, 0xb4, 0x52, 0x09, 0x90, 0xf9,
+0x15, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x29, 0x90, 0xfa, 0xe1, 0xe0, 0x70, 0x04, 0xa3, 0xe0, 0x64,
+0x01, 0x70, 0x10, 0x90, 0xfa, 0xcc, 0xe0, 0xb4, 0x10, 0x09, 0x90, 0xf9, 0x15, 0xe0, 0x44, 0x10,
+0xf0, 0x80, 0x0d, 0x90, 0xfa, 0xe3, 0x74, 0x03, 0xf0, 0x90, 0xf9, 0x15, 0xe0, 0x54, 0xef, 0xf0,
+0x90, 0xff, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x22, 0x12, 0x10, 0x03, 0x78, 0x8a, 0xef, 0xf6, 0x12,
+0x2a, 0x06, 0x12, 0x22, 0x33, 0x30, 0xe0, 0x25, 0x12, 0x22, 0x07, 0xe0, 0x54, 0x7f, 0xf0, 0x78,
+0x6b, 0x12, 0x1b, 0x28, 0x90, 0x00, 0x02, 0x12, 0x1a, 0x0b, 0x30, 0xe7, 0x09, 0x90, 0x00, 0x02,
+0xe4, 0x12, 0x1a, 0x4a, 0x80, 0xe9, 0x12, 0x22, 0x07, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x22, 0x33,
+0x30, 0xe1, 0x1e, 0x12, 0x21, 0xe9, 0xe0, 0x54, 0x7f, 0xf0, 0x12, 0x31, 0x5c, 0x78, 0x68, 0x12,
+0x1b, 0x28, 0x90, 0x00, 0x02, 0x74, 0x80, 0x12, 0x1a, 0x4a, 0x12, 0x21, 0xe9, 0xe0, 0x44, 0x80,
+0xf0, 0x12, 0x31, 0xc7, 0xe4, 0xff, 0x12, 0x30, 0xec, 0x02, 0x10, 0x86, 0x03, 0x68, 0x01, 0xff,
+0x48, 0x03, 0x6b, 0x01, 0xff, 0x08, 0x02, 0x66, 0x00, 0x00, 0x44, 0xfa, 0x95, 0x00, 0x00, 0x00,
+0x00, 0x44, 0xfa, 0x91, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfa, 0xaf, 0x00, 0x00, 0x42, 0xfa, 0x7b,
+0x00, 0x00, 0x42, 0xfa, 0x79, 0x00, 0x00, 0x42, 0xf9, 0x6a, 0xff, 0xff, 0x42, 0xfa, 0x77, 0x00,
+0x00, 0x43, 0xf9, 0x18, 0x0a, 0x32, 0x02, 0x41, 0xf9, 0x65, 0x20, 0x41, 0xf9, 0x66, 0x20, 0x41,
+0xf9, 0x63, 0x00, 0x41, 0xf9, 0x64, 0x00, 0x44, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xf9,
+0x15, 0x00, 0x00, 0x41, 0xf9, 0x17, 0x00, 0x01, 0x20, 0x00, 0x41, 0xf8, 0x04, 0x00, 0x00, 0x12,
+0x10, 0x03, 0x78, 0x85, 0xef, 0xf6, 0x12, 0x30, 0x93, 0x12, 0x30, 0xec, 0x78, 0x85, 0xe6, 0xff,
+0x24, 0x12, 0x12, 0x21, 0xff, 0xe0, 0xfe, 0x30, 0xe7, 0x16, 0xef, 0xb4, 0x03, 0x09, 0x90, 0xff,
+0x9e, 0xe0, 0x54, 0xfa, 0xf0, 0x80, 0x22, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xf5, 0xf0, 0x80, 0x19,
+0xee, 0x54, 0x03, 0x60, 0x14, 0xef, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, 0xf0,
+0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xf9, 0x17, 0xe0, 0x14, 0xf0, 0xe0,
+0x70, 0x02, 0xd2, 0xb3, 0x02, 0x10, 0x86, 0x12, 0x1d, 0x6c, 0xe5, 0x3a, 0x64, 0x09, 0x70, 0x04,
+0xe5, 0x39, 0x64, 0x01, 0x60, 0x48, 0xc3, 0xe5, 0x3a, 0x94, 0x08, 0xe5, 0x39, 0x94, 0x00, 0x40,
+0x11, 0x7f, 0x08, 0xef, 0xe5, 0x3a, 0x94, 0x08, 0xf5, 0x3a, 0xe5, 0x39, 0x94, 0x00, 0xf5, 0x39,
+0x80, 0x05, 0xaf, 0x3a, 0x12, 0x1d, 0x84, 0xe4, 0xfe, 0xee, 0xc3, 0x9f, 0x50, 0x19, 0x12, 0x1c,
+0x11, 0x12, 0x19, 0xf2, 0xfd, 0x74, 0xf8, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0xfe, 0xf5, 0x83, 0xed,
+0xf0, 0x0e, 0x12, 0x1c, 0x00, 0x80, 0xe2, 0xef, 0x54, 0x7f, 0x90, 0xff, 0x81, 0xf0, 0x22, 0x8b,
+0x59, 0x8a, 0x5a, 0x89, 0x5b, 0x12, 0x2d, 0x48, 0x70, 0x05, 0xa3, 0x74, 0x08, 0xf0, 0x22, 0xab,
+0x59, 0xaa, 0x5a, 0xa9, 0x5b, 0x12, 0x2d, 0x3c, 0x90, 0xfa, 0xc6, 0x12, 0x1b, 0x43, 0xe5, 0x5b,
+0x24, 0x03, 0xf9, 0xe4, 0x35, 0x5a, 0xfa, 0x90, 0xfa, 0xc0, 0x12, 0x1b, 0x43, 0xe4, 0x90, 0xfa,
+0xbf, 0xf0, 0x78, 0x8b, 0xf6, 0x90, 0xfa, 0xbe, 0xe0, 0xff, 0x78, 0x8b, 0xe6, 0xc3, 0x9f, 0x50,
+0x12, 0x12, 0x2d, 0x1a, 0xff, 0x12, 0x2d, 0x23, 0x12, 0x2d, 0x36, 0x78, 0x8b, 0x06, 0x12, 0x2d,
+0x32, 0x80, 0xe2, 0x22, 0xad, 0x07, 0xac, 0x06, 0x90, 0x31, 0x4d, 0xe4, 0x93, 0xff, 0x78, 0x74,
+0xf6, 0x54, 0x0f, 0x12, 0x1c, 0xf8, 0xe0, 0x08, 0x76, 0x00, 0x08, 0xf6, 0x18, 0x12, 0x1c, 0x29,
+0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0x78, 0x75, 0xee, 0xf6, 0x08, 0xef, 0xf6, 0xee,
+0x44, 0xf8, 0x18, 0xf6, 0xef, 0x08, 0xf6, 0x90, 0xff, 0x7a, 0xe0, 0x20, 0xe7, 0x03, 0x7f, 0x00,
+0x22, 0x78, 0x75, 0xe6, 0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e, 0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0,
+0x90, 0xff, 0x7a, 0x74, 0x02, 0xf0, 0x7f, 0x01, 0x22, 0xab, 0x56, 0xaa, 0x57, 0xa9, 0x58, 0x90,
+0x00, 0x03, 0x12, 0x1a, 0x0b, 0x54, 0xf0, 0x24, 0xa0, 0x22, 0x90, 0xfa, 0xc6, 0x12, 0x1b, 0x3a,
+0x02, 0x19, 0xf2, 0x90, 0xfa, 0xc0, 0x12, 0x1b, 0x3a, 0xef, 0x12, 0x1a, 0x38, 0x90, 0xfa, 0xc7,
+0xe4, 0x22, 0x90, 0xfa, 0xc1, 0xe4, 0x75, 0xf0, 0x01, 0x02, 0x1a, 0x6c, 0x90, 0x00, 0x08, 0x12,
+0x1a, 0x98, 0xaa, 0xf0, 0xf9, 0x7b, 0x01, 0x22, 0x90, 0x00, 0x05, 0x12, 0x1a, 0x0b, 0x90, 0xfa,
+0xbe, 0xf0, 0x22, 0xab, 0x56, 0xaa, 0x57, 0xa9, 0x58, 0x22, 0x90, 0xfa, 0xda, 0xe0, 0xff, 0x7e,
+0x00, 0xc3, 0x90, 0xfa, 0xd4, 0xe0, 0x9f, 0xf0, 0x90, 0xfa, 0xd3, 0xe0, 0x9e, 0xf0, 0x90, 0xfa,
+0xd5, 0xee, 0x8f, 0xf0, 0x12, 0x1a, 0x6c, 0xef, 0x25, 0x51, 0xf5, 0x51, 0xee, 0x35, 0x50, 0xf5,
+0x50, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0xfa, 0xe3,
+0xe0, 0x64, 0x03, 0x22, 0x90, 0xff, 0xf2, 0xe0, 0xab, 0x29, 0xaa, 0x2a, 0xa9, 0x2b, 0x02, 0x1a,
+0x38, 0x90, 0xff, 0xf3, 0x74, 0xa0, 0xf0, 0x22, 0x8f, 0x64, 0xed, 0x70, 0x0f, 0xe5, 0x64, 0xb4,
+0x03, 0x05, 0x7f, 0x01, 0x02, 0x31, 0x32, 0x7f, 0x02, 0x02, 0x31, 0x32, 0xaf, 0x64, 0x12, 0x2a,
+0x06, 0x74, 0x6e, 0x25, 0x64, 0xf8, 0xe6, 0x30, 0xe2, 0x0b, 0xd2, 0x09, 0x12, 0x1c, 0x83, 0xe0,
+0x54, 0x7f, 0xf0, 0x80, 0x02, 0xc2, 0x09, 0xe5, 0x64, 0xb4, 0x03, 0x07, 0x7f, 0x81, 0x12, 0x31,
+0x32, 0x80, 0x05, 0x7f, 0x82, 0x12, 0x31, 0x32, 0x30, 0x09, 0x07, 0x12, 0x1c, 0x83, 0xe0, 0x44,
+0x80, 0xf0, 0x12, 0x31, 0xc7, 0x22, 0x12, 0x10, 0x03, 0x90, 0xff, 0xfd, 0xe0, 0x44, 0x60, 0xf0,
+0xd2, 0x01, 0x90, 0xff, 0xfc, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0xff, 0x00, 0xe0, 0x30, 0xe7, 0x13,
+0x90, 0xff, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x35, 0x80, 0x90, 0xff, 0xfc, 0xe0, 0x44, 0x01,
+0xf0, 0x80, 0x0d, 0x12, 0x1d, 0x2f, 0x53, 0x35, 0x7f, 0x90, 0xff, 0xfc, 0xe0, 0x54, 0xfe, 0xf0,
+0x90, 0xff, 0x81, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x02, 0xb0, 0x12, 0x1d, 0x37, 0x02, 0x10, 0x86,
+0x12, 0x10, 0x03, 0x78, 0x89, 0xef, 0xf6, 0xd2, 0x00, 0x12, 0x2a, 0x06, 0x90, 0xf9, 0x67, 0x12,
+0x1b, 0x3a, 0xe9, 0x24, 0x03, 0xf9, 0xe4, 0x3a, 0xfa, 0xc0, 0x02, 0x78, 0x80, 0xe6, 0xfe, 0x08,
+0xe6, 0xaa, 0x06, 0xf8, 0xac, 0x02, 0x7d, 0x01, 0xd0, 0x02, 0x12, 0x22, 0x25, 0x12, 0x31, 0xc7,
+0x78, 0x89, 0xe6, 0xff, 0x12, 0x13, 0x3f, 0x12, 0x30, 0xec, 0x02, 0x10, 0x86, 0x8f, 0x63, 0x12,
+0x2a, 0x06, 0x12, 0x22, 0x07, 0xe0, 0x54, 0x3f, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x21, 0xf3,
+0xe0, 0x54, 0x3f, 0xf0, 0x08, 0xe6, 0xfe, 0x08, 0xe6, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x21, 0xf3,
+0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x31, 0xc7, 0x74, 0x6e, 0x25, 0x63, 0xf8, 0x74, 0xfb, 0x56, 0xf6,
+0x7f, 0x00, 0x22, 0x8f, 0x23, 0xc2, 0x08, 0x12, 0x2a, 0x06, 0x12, 0x22, 0x12, 0x78, 0x7e, 0x12,
+0x21, 0xeb, 0xe0, 0x44, 0x01, 0xf0, 0x12, 0x22, 0x4a, 0x12, 0x21, 0xef, 0xe0, 0x20, 0xe0, 0xf6,
+0xef, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x31, 0xc7,
+0xaf, 0x23, 0x12, 0x13, 0x3f, 0x22, 0x12, 0x10, 0x03, 0x12, 0x2a, 0x06, 0x12, 0x22, 0x4a, 0x24,
+0x06, 0x12, 0x21, 0xf1, 0xe0, 0xfd, 0x12, 0x22, 0x2d, 0x90, 0x00, 0x03, 0x12, 0x22, 0x52, 0x24,
+0x05, 0x12, 0x21, 0xf3, 0xe0, 0x90, 0x00, 0x04, 0x12, 0x1a, 0x4a, 0x12, 0x31, 0xc7, 0x7d, 0x02,
+0xe4, 0xff, 0x12, 0x2f, 0x18, 0x02, 0x10, 0x86, 0xae, 0x05, 0x12, 0x1c, 0xde, 0xef, 0x12, 0x1a,
+0x4a, 0x0e, 0x0e, 0x0e, 0xee, 0xd3, 0x95, 0x3c, 0xe4, 0x95, 0x3b, 0x40, 0x02, 0xae, 0x3c, 0xee,
+0xd3, 0x94, 0x08, 0x74, 0x80, 0x94, 0x81, 0x40, 0x0a, 0x7e, 0x03, 0x90, 0x00, 0x02, 0x74, 0x02,
+0x12, 0x1a, 0x4a, 0xaf, 0x06, 0x12, 0x31, 0xb1, 0x22, 0xae, 0x07, 0xed, 0x54, 0x03, 0x64, 0x01,
+0x60, 0x03, 0x7f, 0x10, 0x22, 0xed, 0x54, 0x7c, 0xc3, 0x94, 0x04, 0x50, 0x03, 0x7f, 0x0b, 0x22,
+0x74, 0x6e, 0x2e, 0xf8, 0x74, 0x02, 0x46, 0xf6, 0x74, 0x96, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0xfa,
+0xf5, 0x83, 0xed, 0xf0, 0x7f, 0x00, 0x22, 0xbf, 0x03, 0x06, 0x7c, 0xff, 0x7d, 0xe0, 0x80, 0x04,
+0x7c, 0xff, 0x7d, 0xe2, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04,
+0x12, 0x21, 0xf3, 0xe0, 0x44, 0x80, 0xf0, 0x74, 0x6e, 0x2f, 0xf8, 0x74, 0x04, 0x46, 0xf6, 0x7f,
+0x00, 0x22, 0x12, 0x10, 0x03, 0xe5, 0x3a, 0x64, 0x09, 0x70, 0x04, 0xe5, 0x39, 0x64, 0x01, 0x60,
+0x16, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x0f, 0xff, 0xc3, 0xe5, 0x3a, 0x9f, 0xe5, 0x39, 0x94, 0x00,
+0x40, 0x05, 0x12, 0x28, 0x16, 0x80, 0x03, 0x12, 0x31, 0xbd, 0x02, 0x10, 0x86, 0x90, 0xff, 0xfc,
+0xe0, 0x20, 0xe7, 0x1f, 0xc2, 0xaf, 0x7d, 0xff, 0xac, 0x05, 0x1d, 0xec, 0x60, 0x15, 0x7e, 0x04,
+0x7f, 0x00, 0xef, 0x1f, 0xaa, 0x06, 0x70, 0x01, 0x1e, 0x4a, 0x60, 0xec, 0x90, 0xff, 0x92, 0xe4,
+0xf0, 0x80, 0xef, 0x22, 0x12, 0x10, 0x03, 0x78, 0x66, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x30, 0xe0,
+0x12, 0x30, 0xe1, 0x0f, 0x90, 0xff, 0xfc, 0xe0, 0x44, 0x20, 0xf0, 0x7f, 0x04, 0x12, 0x12, 0x19,
+0x12, 0x1d, 0x46, 0x02, 0x10, 0x86, 0x8e, 0x5f, 0x8f, 0x60, 0xe5, 0x60, 0x15, 0x60, 0xae, 0x5f,
+0x70, 0x02, 0x15, 0x5f, 0xd3, 0x94, 0x00, 0xee, 0x94, 0x00, 0x40, 0x09, 0x7e, 0x07, 0x7f, 0xd0,
+0x12, 0x0f, 0xdc, 0x80, 0xe5, 0x22, 0x11, 0x94, 0x2d, 0xf6, 0x23, 0xef, 0x31, 0xa3, 0x2f, 0xf4,
+0x2f, 0xa2, 0x30, 0xb2, 0x2e, 0xe6, 0x26, 0x6d, 0x2b, 0xaf, 0x30, 0x55, 0x30, 0x74, 0x1d, 0xb4,
+0x2e, 0x40, 0x2a, 0xe8, 0x0e, 0x12, 0x10, 0x03, 0x78, 0x86, 0x12, 0x22, 0x82, 0x20, 0xe1, 0x07,
+0x7f, 0x12, 0x12, 0x30, 0xec, 0x80, 0x0a, 0x78, 0x86, 0xe6, 0xff, 0x12, 0x23, 0x49, 0x12, 0x30,
+0xec, 0x02, 0x10, 0x86, 0x12, 0x10, 0x03, 0x78, 0x87, 0x12, 0x22, 0x82, 0x20, 0xe2, 0x07, 0x7f,
+0x11, 0x12, 0x30, 0xec, 0x80, 0x0a, 0x78, 0x87, 0xe6, 0xff, 0x12, 0x2e, 0x7d, 0x12, 0x30, 0xec,
+0x02, 0x10, 0x86, 0x8f, 0x61, 0x12, 0x2e, 0x7d, 0xaf, 0x61, 0x12, 0x2a, 0x06, 0x12, 0x22, 0x12,
+0x12, 0x31, 0xc7, 0x74, 0x6e, 0x25, 0x61, 0xf8, 0x74, 0xfd, 0x56, 0xf6, 0xaf, 0x61, 0x12, 0x13,
+0x3f, 0x22, 0x12, 0x10, 0x03, 0xe5, 0x3a, 0x64, 0x09, 0x70, 0x04, 0xe5, 0x39, 0x64, 0x01, 0x60,
+0x05, 0x12, 0x2c, 0x07, 0x80, 0x06, 0x12, 0x1d, 0x64, 0x12, 0x1d, 0x6c, 0x02, 0x10, 0x86, 0x12,
+0x29, 0x93, 0x12, 0x12, 0xbb, 0x90, 0xf8, 0x04, 0xe0, 0xff, 0x60, 0x05, 0x7d, 0x01, 0x12, 0x12,
+0x58, 0x12, 0x29, 0x1d, 0x12, 0x12, 0xf7, 0x12, 0x11, 0x74, 0x80, 0xe3, 0x12, 0x1c, 0xde, 0xef,
+0x12, 0x1a, 0x4a, 0xe4, 0xf5, 0x33, 0xf5, 0x34, 0xef, 0x60, 0x03, 0x02, 0x31, 0xbd, 0xe4, 0xff,
+0x12, 0x31, 0xb1, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0xff, 0x54, 0xa0, 0x60, 0xf7, 0xef, 0x30, 0xe5,
+0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, 0xc3, 0x22, 0xd3, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0xff,
+0x54, 0x28, 0x60, 0xf7, 0xef, 0x30, 0xe5, 0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, 0xc3, 0x22,
+0xd3, 0x22, 0xef, 0x30, 0xe7, 0x08, 0x12, 0x1c, 0x95, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 0xef, 0x12,
+0x1c, 0xe8, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 0x81, 0x01, 0x82, 0x02, 0x83, 0x03, 0x87, 0x40, 0x00,
+0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x08, 0x00, 0x78, 0x7e, 0x12, 0x22,
+0x09, 0xa3, 0xa3, 0xe0, 0xff, 0x30, 0xe7, 0x06, 0x54, 0x7f, 0xf0, 0x44, 0x80, 0xf0, 0x22, 0x85,
+0x3b, 0x39, 0x85, 0x3c, 0x3a, 0x90, 0xff, 0x82, 0xe0, 0x54, 0xf7, 0xf0, 0xa3, 0xe0, 0x54, 0x7f,
+0xf0, 0x22, 0xe4, 0xfe, 0xee, 0x90, 0x31, 0x47, 0x93, 0xb5, 0x07, 0x02, 0xd3, 0x22, 0x0e, 0xbe,
+0x07, 0xf2, 0xc3, 0x22, 0x00, 0x08, 0x18, 0x28, 0x38, 0x01, 0x81, 0x10, 0x0a, 0x02, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x12, 0x10, 0x03, 0x7f, 0x02, 0x12, 0x10, 0x92, 0x12, 0x1d, 0x46, 0x02, 0x10,
+0x86, 0x75, 0x39, 0x00, 0x8f, 0x3a, 0x12, 0x1c, 0x30, 0x12, 0x2c, 0x07, 0x22, 0x12, 0x1d, 0x6c,
+0x12, 0x1d, 0x2f, 0x12, 0x1d, 0x64, 0x22, 0xc2, 0x08, 0x22,
+};
+
+#undef IMAGE_VERSION_NAME
+
+#undef IMAGE_ARRAY_NAME
+
diff --git a/drivers/usb/serial/io_ionsp.h b/drivers/usb/serial/io_ionsp.h
new file mode 100644
index 000000000000..092e03d2dfc4
--- /dev/null
+++ b/drivers/usb/serial/io_ionsp.h
@@ -0,0 +1,454 @@
+/************************************************************************
+ *
+ * IONSP.H Definitions for I/O Networks Serial Protocol
+ *
+ * Copyright (C) 1997-1998 Inside Out Networks, Inc.
+ *
+ * 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.
+ *
+ * These definitions are used by both kernel-mode driver and the
+ * peripheral firmware and MUST be kept in sync.
+ *
+ ************************************************************************/
+
+/************************************************************************
+
+The data to and from all ports on the peripheral is multiplexed
+through a single endpoint pair (EP1 since it supports 64-byte
+MaxPacketSize). Therefore, the data, commands, and status for
+each port must be preceded by a short header identifying the
+destination port. The header also identifies the bytes that follow
+as data or as command/status info.
+
+Header format, first byte:
+
+ CLLLLPPP
+ --------
+ | | |------ Port Number: 0-7
+ | |--------- Length: MSB bits of length
+ |----------- Data/Command: 0 = Data header
+ 1 = Cmd / Status (Cmd if OUT, Status if IN)
+
+This gives 2 possible formats:
+
+
+ Data header: 0LLLLPPP LLLLLLLL
+ ============
+
+ Where (LLLL,LLLLLLL) is 12-bit length of data that follows for
+ port number (PPP). The length is 0-based (0-FFF means 0-4095
+ bytes). The ~4K limit allows the host driver (which deals in
+ transfer requests instead of individual packets) to write a
+ large chunk of data in a single request. Note, however, that
+ the length must always be <= the current TxCredits for a given
+ port due to buffering limitations on the peripheral.
+
+
+ Cmd/Status header: 1ccccPPP [ CCCCCCCC, Params ]...
+ ==================
+
+ Where (cccc) or (cccc,CCCCCCCC) is the cmd or status identifier.
+ Frequently-used values are encoded as (cccc), longer ones using
+ (cccc,CCCCCCCC). Subsequent bytes are optional parameters and are
+ specific to the cmd or status code. This may include a length
+ for command and status codes that need variable-length parameters.
+
+
+In addition, we use another interrupt pipe (endpoint) which the host polls
+periodically for flow control information. The peripheral, when there has
+been a change, sends the following 10-byte packet:
+
+ RRRRRRRRRRRRRRRR
+ T0T0T0T0T0T0T0T0
+ T1T1T1T1T1T1T1T1
+ T2T2T2T2T2T2T2T2
+ T3T3T3T3T3T3T3T3
+
+The first field is the 16-bit RxBytesAvail field, which indicates the
+number of bytes which may be read by the host from EP1. This is necessary:
+(a) because OSR2.1 has a bug which causes data loss if the peripheral returns
+fewer bytes than the host expects to read, and (b) because, on Microsoft
+platforms at least, an outstanding read posted on EP1 consumes about 35% of
+the CPU just polling the device for data.
+
+The next 4 fields are the 16-bit TxCredits for each port, which indicate how
+many bytes the host is allowed to send on EP1 for transmit to a given port.
+After an OPEN_PORT command, the Edgeport sends the initial TxCredits for that
+port.
+
+All 16-bit fields are sent in little-endian (Intel) format.
+
+************************************************************************/
+
+//
+// Define format of InterruptStatus packet returned from the
+// 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)))
+
+
+
+//
+// Define cmd/status header values and macros to extract them.
+//
+// Data: 0LLLLPPP LLLLLLLL
+// Cmd/Stat: 1ccccPPP CCCCCCCC
+
+#define IOSP_DATA_HDR_SIZE 2
+#define IOSP_CMD_HDR_SIZE 2
+
+#define IOSP_MAX_DATA_LENGTH 0x0FFF // 12 bits -> 4K
+
+#define IOSP_PORT_MASK 0x07 // Mask to isolate port number
+#define IOSP_CMD_STAT_BIT 0x80 // If set, this is command/status header
+
+#define IS_CMD_STAT_HDR(Byte1) ((Byte1) & IOSP_CMD_STAT_BIT)
+#define IS_DATA_HDR(Byte1) (! IS_CMD_STAT_HDR(Byte1))
+
+#define IOSP_GET_HDR_PORT(Byte1) ((__u8) ((Byte1) & IOSP_PORT_MASK))
+#define IOSP_GET_HDR_DATA_LEN(Byte1, Byte2) ((__u16) ( ((__u16)((Byte1) & 0x78)) << 5) | (Byte2))
+#define IOSP_GET_STATUS_CODE(Byte1) ((__u8) (((Byte1) & 0x78) >> 3))
+
+
+//
+// These macros build the 1st and 2nd bytes for a data header
+//
+#define IOSP_BUILD_DATA_HDR1(Port, Len) ((__u8) (((Port) | ((__u8) (((__u16) (Len)) >> 5) & 0x78 ))))
+#define IOSP_BUILD_DATA_HDR2(Port, Len) ((__u8) (Len))
+
+
+//
+// These macros build the 1st and 2nd bytes for a command header
+//
+#define IOSP_BUILD_CMD_HDR1(Port, Cmd) ((__u8) ( IOSP_CMD_STAT_BIT | (Port) | ((__u8) ((Cmd) << 3)) ))
+
+
+//--------------------------------------------------------------
+//
+// Define values for commands and command parameters
+// (sent from Host to Edgeport)
+//
+// 1ccccPPP P1P1P1P1 [ P2P2P2P2P2 ]...
+//
+// cccc: 00-07 2-byte commands. Write UART register 0-7 with
+// value in P1. See 16650.H for definitions of
+// UART register numbers and contents.
+//
+// 08-0B 3-byte commands: ==== P1 ==== ==== P2 ====
+// 08 available for expansion
+// 09 1-param commands Command Code Param
+// 0A available for expansion
+// 0B available for expansion
+//
+// 0C-0D 4-byte commands. P1 = extended cmd and P2,P3 = params
+// Currently unimplemented.
+//
+// 0E-0F N-byte commands: P1 = num bytes after P1 (ie, TotalLen - 2)
+// P2 = extended cmd, P3..Pn = parameters.
+// Currently unimplemented.
+//
+
+#define IOSP_WRITE_UART_REG(n) ((n) & 0x07) // UartReg[ n ] := P1
+
+// Register numbers and contents
+// defined in 16554.H.
+
+// 0x08 // Available for expansion.
+#define IOSP_EXT_CMD 0x09 // P1 = Command code (defined below)
+
+// P2 = Parameter
+
+//
+// Extended Command values, used with IOSP_EXT_CMD, may
+// or may not use parameter P2.
+//
+
+#define IOSP_CMD_OPEN_PORT 0x00 // Enable ints, init UART. (NO PARAM)
+#define IOSP_CMD_CLOSE_PORT 0x01 // Disable ints, flush buffers. (NO PARAM)
+#define IOSP_CMD_CHASE_PORT 0x02 // Wait for Edgeport TX buffers to empty. (NO PARAM)
+#define IOSP_CMD_SET_RX_FLOW 0x03 // Set Rx Flow Control in Edgeport
+#define IOSP_CMD_SET_TX_FLOW 0x04 // Set Tx Flow Control in Edgeport
+#define IOSP_CMD_SET_XON_CHAR 0x05 // Set XON Character in Edgeport
+#define IOSP_CMD_SET_XOFF_CHAR 0x06 // Set XOFF Character in Edgeport
+#define IOSP_CMD_RX_CHECK_REQ 0x07 // Request Edgeport to insert a Checkpoint into
+
+// the receive data stream (Parameter = 1 byte sequence number)
+
+#define IOSP_CMD_SET_BREAK 0x08 // Turn on the BREAK (LCR bit 6)
+#define IOSP_CMD_CLEAR_BREAK 0x09 // Turn off the BREAK (LCR bit 6)
+
+
+//
+// Define macros to simplify building of IOSP cmds
+//
+
+#define MAKE_CMD_WRITE_REG(ppBuf, pLen, Port, Reg, Val) \
+ do { \
+ (*(ppBuf))[0] = IOSP_BUILD_CMD_HDR1( (Port), IOSP_WRITE_UART_REG(Reg) ); \
+ (*(ppBuf))[1] = (Val); \
+ \
+ *ppBuf += 2; \
+ *pLen += 2; \
+ } while (0)
+
+#define MAKE_CMD_EXT_CMD(ppBuf, pLen, Port, ExtCmd, Param) \
+ do { \
+ (*(ppBuf))[0] = IOSP_BUILD_CMD_HDR1( (Port), IOSP_EXT_CMD ); \
+ (*(ppBuf))[1] = (ExtCmd); \
+ (*(ppBuf))[2] = (Param); \
+ \
+ *ppBuf += 3; \
+ *pLen += 3; \
+ } while (0)
+
+
+
+//--------------------------------------------------------------
+//
+// Define format of flow control commands
+// (sent from Host to Edgeport)
+//
+// 11001PPP FlowCmd FlowTypes
+//
+// Note that the 'FlowTypes' parameter is a bit mask; that is,
+// more than one flow control type can be active at the same time.
+// FlowTypes = 0 means 'no flow control'.
+//
+
+//
+// IOSP_CMD_SET_RX_FLOW
+//
+// Tells Edgeport how it can stop incoming UART data
+//
+// Example for Port 0
+// P0 = 11001000
+// P1 = IOSP_CMD_SET_RX_FLOW
+// P2 = Bit mask as follows:
+
+#define IOSP_RX_FLOW_RTS 0x01 // Edgeport drops RTS to stop incoming data
+#define IOSP_RX_FLOW_DTR 0x02 // Edgeport drops DTR to stop incoming data
+#define IOSP_RX_FLOW_DSR_SENSITIVITY 0x04 // Ignores Rx data unless DSR high
+
+// Not currently implemented by firmware.
+#define IOSP_RX_FLOW_XON_XOFF 0x08 // Edgeport sends XOFF char to stop incoming data.
+
+// Host must have previously programmed the
+// XON/XOFF values with SET_XON/SET_XOFF
+// before enabling this bit.
+
+//
+// IOSP_CMD_SET_TX_FLOW
+//
+// Tells Edgeport what signal(s) will stop it from transmitting UART data
+//
+// Example for Port 0
+// P0 = 11001000
+// P1 = IOSP_CMD_SET_TX_FLOW
+// P2 = Bit mask as follows:
+
+#define IOSP_TX_FLOW_CTS 0x01 // Edgeport stops Tx if CTS low
+#define IOSP_TX_FLOW_DSR 0x02 // Edgeport stops Tx if DSR low
+#define IOSP_TX_FLOW_DCD 0x04 // Edgeport stops Tx if DCD low
+#define IOSP_TX_FLOW_XON_XOFF 0x08 // Edgeport stops Tx upon receiving XOFF char.
+
+// Host must have previously programmed the
+// XON/XOFF values with SET_XON/SET_XOFF
+// before enabling this bit.
+#define IOSP_TX_FLOW_XOFF_CONTINUE 0x10 // If not set, Edgeport stops Tx when
+
+// sending XOFF in order to fix broken
+// systems that interpret the next
+// received char as XON.
+// If set, Edgeport continues Tx
+// normally after transmitting XOFF.
+// Not currently implemented by firmware.
+#define IOSP_TX_TOGGLE_RTS 0x20 // Edgeport drives RTS as a true half-duplex
+
+// Request-to-Send signal: it is raised before
+// beginning transmission and lowered after
+// the last Tx char leaves the UART.
+// Not currently implemented by firmware.
+
+//
+// IOSP_CMD_SET_XON_CHAR
+//
+// Sets the character which Edgeport transmits/interprets as XON.
+// Note: This command MUST be sent before sending a SET_RX_FLOW or
+// SET_TX_FLOW with the XON_XOFF bit set.
+//
+// Example for Port 0
+// P0 = 11001000
+// P1 = IOSP_CMD_SET_XON_CHAR
+// P2 = 0x11
+
+
+//
+// IOSP_CMD_SET_XOFF_CHAR
+//
+// Sets the character which Edgeport transmits/interprets as XOFF.
+// Note: This command must be sent before sending a SET_RX_FLOW or
+// SET_TX_FLOW with the XON_XOFF bit set.
+//
+// Example for Port 0
+// P0 = 11001000
+// P1 = IOSP_CMD_SET_XOFF_CHAR
+// P2 = 0x13
+
+
+//
+// IOSP_CMD_RX_CHECK_REQ
+//
+// This command is used to assist in the implementation of the
+// IOCTL_SERIAL_PURGE Windows IOCTL.
+// This IOSP command tries to place a marker at the end of the RX
+// queue in the Edgeport. If the Edgeport RX queue is full then
+// the Check will be discarded.
+// It is up to the device driver to timeout waiting for the
+// RX_CHECK_RSP. If a RX_CHECK_RSP is received, the driver is
+// sure that all data has been received from the edgeport and
+// may now purge any internal RX buffers.
+// Note tat the sequence numbers may be used to detect lost
+// CHECK_REQs.
+
+// Example for Port 0
+// P0 = 11001000
+// P1 = IOSP_CMD_RX_CHECK_REQ
+// P2 = Sequence number
+
+
+// Response will be:
+// P1 = IOSP_EXT_RX_CHECK_RSP
+// P2 = Request Sequence number
+
+
+
+//--------------------------------------------------------------
+//
+// Define values for status and status parameters
+// (received by Host from Edgeport)
+//
+// 1ssssPPP P1P1P1P1 [ P2P2P2P2P2 ]...
+//
+// ssss: 00-07 2-byte status. ssss identifies which UART register
+// has changed value, and the new value is in P1.
+// Note that the ssss values do not correspond to the
+// 16554 register numbers given in 16554.H. Instead,
+// see below for definitions of the ssss numbers
+// used in this status message.
+//
+// 08-0B 3-byte status: ==== P1 ==== ==== P2 ====
+// 08 LSR_DATA: New LSR Errored byte
+// 09 1-param responses Response Code Param
+// 0A OPEN_RSP: InitialMsr TxBufferSize
+// 0B available for expansion
+//
+// 0C-0D 4-byte status. P1 = extended status code and P2,P3 = params
+// Not currently implemented.
+//
+// 0E-0F N-byte status: P1 = num bytes after P1 (ie, TotalLen - 2)
+// P2 = extended status, P3..Pn = parameters.
+// Not currently implemented.
+//
+
+/****************************************************
+ * SSSS values for 2-byte status messages (0-8)
+ ****************************************************/
+
+#define IOSP_STATUS_LSR 0x00 // P1 is new value of LSR register.
+
+// Bits defined in 16554.H. Edgeport
+// returns this in order to report
+// line status errors (overrun,
+// parity, framing, break). This form
+// is used when a errored receive data
+// character was NOT present in the
+// UART when the LSR error occurred
+// (ie, when LSR bit 0 = 0).
+
+#define IOSP_STATUS_MSR 0x01 // P1 is new value of MSR register.
+
+// Bits defined in 16554.H. Edgeport
+// returns this in order to report
+// changes in modem status lines
+// (CTS, DSR, RI, CD)
+//
+
+// 0x02 // Available for future expansion
+// 0x03 //
+// 0x04 //
+// 0x05 //
+// 0x06 //
+// 0x07 //
+
+
+/****************************************************
+ * SSSS values for 3-byte status messages (8-A)
+ ****************************************************/
+
+#define IOSP_STATUS_LSR_DATA 0x08 // P1 is new value of LSR register (same as STATUS_LSR)
+
+// P2 is errored character read from
+// RxFIFO after LSR reported an error.
+
+#define IOSP_EXT_STATUS 0x09 // P1 is status/response code, param in P2.
+
+
+// Response Codes (P1 values) for 3-byte status messages
+
+#define IOSP_EXT_STATUS_CHASE_RSP 0 // Reply to CHASE_PORT cmd. P2 is outcome:
+#define IOSP_EXT_STATUS_CHASE_PASS 0 // P2 = 0: All Tx data drained successfully
+#define IOSP_EXT_STATUS_CHASE_FAIL 1 // P2 = 1: Timed out (stuck due to flow
+
+// control from remote device).
+
+#define IOSP_EXT_STATUS_RX_CHECK_RSP 1 // Reply to RX_CHECK cmd. P2 is sequence number
+
+
+#define IOSP_STATUS_OPEN_RSP 0x0A // Reply to OPEN_PORT cmd.
+
+// P1 is Initial MSR value
+// P2 is encoded TxBuffer Size:
+// TxBufferSize = (P2 + 1) * 64
+
+// 0x0B // Available for future expansion
+
+#define GET_TX_BUFFER_SIZE(P2) (((P2) + 1) * 64)
+
+
+
+
+/****************************************************
+ * SSSS values for 4-byte status messages
+ ****************************************************/
+
+#define IOSP_EXT4_STATUS 0x0C // Extended status code in P1,
+
+// Params in P2, P3
+// Currently unimplemented.
+
+// 0x0D // Currently unused, available.
+
+
+
+//
+// Macros to parse status messages
+//
+
+#define IOSP_GET_STATUS_LEN(code) ( (code) < 8 ? 2 : ((code) < 0x0A ? 3 : 4) )
+
+#define IOSP_STATUS_IS_2BYTE(code) ( (code) < 0x08 )
+#define IOSP_STATUS_IS_3BYTE(code) ( ((code) >= 0x08) && ((code) <= 0x0B) )
+#define IOSP_STATUS_IS_4BYTE(code) ( ((code) >= 0x0C) && ((code) <= 0x0D) )
+
diff --git a/drivers/usb/serial/io_tables.h b/drivers/usb/serial/io_tables.h
new file mode 100644
index 000000000000..e7ffe02408bd
--- /dev/null
+++ b/drivers/usb/serial/io_tables.h
@@ -0,0 +1,163 @@
+/*
+ * IO Edgeport Driver tables
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#ifndef IO_TABLES_H
+#define IO_TABLES_H
+
+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) },
+ { }
+};
+
+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) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) },
+ { 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_22I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_4) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
+ { }
+};
+
+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_EDGEPORT_8R) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8RR) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_8) },
+ { }
+};
+
+/* Devices that this driver supports */
+static struct usb_device_id id_table_combined [] = {
+ { 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) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) },
+ { 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_8_DUAL_CPU) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_22I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_4) },
+ { 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_EDGEPORT_8R) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8RR) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_8) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
+static struct usb_serial_device_type edgeport_2port_device = {
+ .owner = THIS_MODULE,
+ .name = "Edgeport 2 port adapter",
+ .short_name = "edgeport_2",
+ .id_table = edgeport_2port_id_table,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 2,
+ .open = edge_open,
+ .close = edge_close,
+ .throttle = edge_throttle,
+ .unthrottle = edge_unthrottle,
+ .attach = edge_startup,
+ .shutdown = edge_shutdown,
+ .ioctl = edge_ioctl,
+ .set_termios = edge_set_termios,
+ .tiocmget = edge_tiocmget,
+ .tiocmset = edge_tiocmset,
+ .write = edge_write,
+ .write_room = edge_write_room,
+ .chars_in_buffer = edge_chars_in_buffer,
+ .break_ctl = edge_break,
+ .read_int_callback = edge_interrupt_callback,
+ .read_bulk_callback = edge_bulk_in_callback,
+ .write_bulk_callback = edge_bulk_out_data_callback,
+};
+
+static struct usb_serial_device_type edgeport_4port_device = {
+ .owner = THIS_MODULE,
+ .name = "Edgeport 4 port adapter",
+ .short_name = "edgeport_4",
+ .id_table = edgeport_4port_id_table,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 4,
+ .open = edge_open,
+ .close = edge_close,
+ .throttle = edge_throttle,
+ .unthrottle = edge_unthrottle,
+ .attach = edge_startup,
+ .shutdown = edge_shutdown,
+ .ioctl = edge_ioctl,
+ .set_termios = edge_set_termios,
+ .tiocmget = edge_tiocmget,
+ .tiocmset = edge_tiocmset,
+ .write = edge_write,
+ .write_room = edge_write_room,
+ .chars_in_buffer = edge_chars_in_buffer,
+ .break_ctl = edge_break,
+ .read_int_callback = edge_interrupt_callback,
+ .read_bulk_callback = edge_bulk_in_callback,
+ .write_bulk_callback = edge_bulk_out_data_callback,
+};
+
+static struct usb_serial_device_type edgeport_8port_device = {
+ .owner = THIS_MODULE,
+ .name = "Edgeport 8 port adapter",
+ .short_name = "edgeport_8",
+ .id_table = edgeport_8port_id_table,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 8,
+ .open = edge_open,
+ .close = edge_close,
+ .throttle = edge_throttle,
+ .unthrottle = edge_unthrottle,
+ .attach = edge_startup,
+ .shutdown = edge_shutdown,
+ .ioctl = edge_ioctl,
+ .set_termios = edge_set_termios,
+ .tiocmget = edge_tiocmget,
+ .tiocmset = edge_tiocmset,
+ .write = edge_write,
+ .write_room = edge_write_room,
+ .chars_in_buffer = edge_chars_in_buffer,
+ .break_ctl = edge_break,
+ .read_int_callback = edge_interrupt_callback,
+ .read_bulk_callback = edge_bulk_in_callback,
+ .write_bulk_callback = edge_bulk_out_data_callback,
+};
+
+#endif
+
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
new file mode 100644
index 000000000000..6c96fdaec36e
--- /dev/null
+++ b/drivers/usb/serial/io_ti.c
@@ -0,0 +1,3091 @@
+/*
+ * Edgeport USB Serial Converter driver
+ *
+ * Copyright (C) 2000-2002 Inside Out Networks, All rights reserved.
+ * Copyright (C) 2001-2002 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Supports the following devices:
+ * EP/1 EP/2 EP/4 EP/21 EP/22 EP/221 EP/42 EP/421 WATCHPORT
+ *
+ * For questions or problems with this driver, contact Inside Out
+ * Networks technical support, or Peter Berger <pberger@brimson.com>,
+ * or Al Borchers <alborchers@steinerpoint.com>.
+ *
+ * Version history:
+ *
+ * July 11, 2002 Removed 4 port device structure since all TI UMP
+ * chips have only 2 ports
+ * David Iacovelli (davidi@ionetworks.com)
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/jiffies.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/serial.h>
+#include <linux/ioctl.h>
+#include <asm/uaccess.h>
+#include <asm/semaphore.h>
+#include <linux/usb.h>
+
+#include "usb-serial.h"
+#include "io_16654.h"
+#include "io_usbvend.h"
+#include "io_ti.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.7"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com> and David Iacovelli"
+#define DRIVER_DESC "Edgeport USB Serial Driver"
+
+
+/* firmware image code */
+#define IMAGE_VERSION_NAME PagableOperationalCodeImageVersion
+#define IMAGE_ARRAY_NAME PagableOperationalCodeImage
+#define IMAGE_SIZE PagableOperationalCodeSize
+#include "io_fw_down3.h" /* Define array OperationalCodeImage[] */
+
+#define EPROM_PAGE_SIZE 64
+
+
+struct edgeport_uart_buf_desc {
+ __u32 count; // Number of bytes currently in buffer
+};
+
+/* different hardware types */
+#define HARDWARE_TYPE_930 0
+#define HARDWARE_TYPE_TIUMP 1
+
+// IOCTL_PRIVATE_TI_GET_MODE Definitions
+#define TI_MODE_CONFIGURING 0 // Device has not entered start device
+#define TI_MODE_BOOT 1 // Staying in boot mode
+#define TI_MODE_DOWNLOAD 2 // Made it to download mode
+#define TI_MODE_TRANSITIONING 3 // Currently in boot mode but transitioning to download mode
+
+/* read urb state */
+#define EDGE_READ_URB_RUNNING 0
+#define EDGE_READ_URB_STOPPING 1
+#define EDGE_READ_URB_STOPPED 2
+
+#define EDGE_LOW_LATENCY 1
+#define EDGE_CLOSING_WAIT 4000 /* in .01 sec */
+
+#define EDGE_OUT_BUF_SIZE 1024
+
+
+/* Product information read from the Edgeport */
+struct product_info
+{
+ int TiMode; // Current TI Mode
+ __u8 hardware_type; // Type of hardware
+} __attribute__((packed));
+
+/* circular buffer */
+struct edge_buf {
+ unsigned int buf_size;
+ char *buf_buf;
+ char *buf_get;
+ char *buf_put;
+};
+
+struct edgeport_port {
+ __u16 uart_base;
+ __u16 dma_address;
+ __u8 shadow_msr;
+ __u8 shadow_mcr;
+ __u8 shadow_lsr;
+ __u8 lsr_mask;
+ __u32 ump_read_timeout; /* Number of miliseconds the UMP will
+ wait without data before completing
+ a read short */
+ int baud_rate;
+ int close_pending;
+ int lsr_event;
+ struct edgeport_uart_buf_desc tx;
+ struct async_icount icount;
+ wait_queue_head_t delta_msr_wait; /* for handling sleeping while
+ waiting for msr change to
+ happen */
+ struct edgeport_serial *edge_serial;
+ struct usb_serial_port *port;
+ __u8 bUartMode; /* Port type, 0: RS232, etc. */
+ spinlock_t ep_lock;
+ int ep_read_urb_state;
+ int ep_write_urb_in_use;
+ struct edge_buf *ep_out_buf;
+};
+
+struct edgeport_serial {
+ struct product_info product_info;
+ u8 TI_I2C_Type; // Type of I2C in UMP
+ u8 TiReadI2C; // Set to TRUE if we have read the I2c in Boot Mode
+ struct semaphore es_sem;
+ int num_ports_open;
+ struct usb_serial *serial;
+};
+
+
+/* Devices that this driver supports */
+static struct usb_device_id edgeport_1port_id_table [] = {
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_PROXIMITY) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_MOTION) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_MOISTURE) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_TEMPERATURE) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_HUMIDITY) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_POWER) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_LIGHT) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_RADIATION) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_DISTANCE) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_ACCELERATION) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_PROX_DIST) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_PLUS_PWR_HP4CD) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_PLUS_PWR_PCI) },
+ { }
+};
+
+static struct usb_device_id edgeport_2port_id_table [] = {
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2C) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_221C) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22C) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21C) },
+// The 4-port shows up as two 2-port devices
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4S) },
+ { }
+};
+
+/* Devices that this driver supports */
+static struct usb_device_id id_table_combined [] = {
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_PROXIMITY) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_MOTION) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_MOISTURE) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_TEMPERATURE) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_HUMIDITY) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_POWER) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_LIGHT) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_RADIATION) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_DISTANCE) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_ACCELERATION) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_PROX_DIST) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_PLUS_PWR_HP4CD) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_PLUS_PWR_PCI) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2C) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22I) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_221C) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22C) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21C) },
+ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4S) },
+ { }
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
+static struct usb_driver io_driver = {
+ .owner = THIS_MODULE,
+ .name = "io_ti",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table_combined,
+};
+
+
+static struct EDGE_FIRMWARE_VERSION_INFO OperationalCodeImageVersion;
+
+static int debug;
+
+static int TIStayInBootMode = 0;
+static int low_latency = EDGE_LOW_LATENCY;
+static int closing_wait = EDGE_CLOSING_WAIT;
+static int ignore_cpu_rev = 0;
+
+
+static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned char *data, int length);
+
+static void stop_read(struct edgeport_port *edge_port);
+static int restart_read(struct edgeport_port *edge_port);
+
+static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios);
+static void edge_send(struct usb_serial_port *port);
+
+/* circular buffer */
+static struct edge_buf *edge_buf_alloc(unsigned int size);
+static void edge_buf_free(struct edge_buf *eb);
+static void edge_buf_clear(struct edge_buf *eb);
+static unsigned int edge_buf_data_avail(struct edge_buf *eb);
+static unsigned int edge_buf_space_avail(struct edge_buf *eb);
+static unsigned int edge_buf_put(struct edge_buf *eb, const char *buf,
+ unsigned int count);
+static unsigned int edge_buf_get(struct edge_buf *eb, char *buf,
+ unsigned int count);
+
+
+static int TIReadVendorRequestSync (struct usb_device *dev,
+ __u8 request,
+ __u16 value,
+ __u16 index,
+ u8 *data,
+ int size)
+{
+ int status;
+
+ status = usb_control_msg (dev,
+ usb_rcvctrlpipe(dev, 0),
+ request,
+ (USB_TYPE_VENDOR |
+ USB_RECIP_DEVICE |
+ USB_DIR_IN),
+ value,
+ index,
+ data,
+ size,
+ 1000);
+ if (status < 0)
+ return status;
+ if (status != size) {
+ dbg ("%s - wanted to write %d, but only wrote %d",
+ __FUNCTION__, size, status);
+ return -ECOMM;
+ }
+ return 0;
+}
+
+static int TISendVendorRequestSync (struct usb_device *dev,
+ __u8 request,
+ __u16 value,
+ __u16 index,
+ u8 *data,
+ int size)
+{
+ int status;
+
+ status = usb_control_msg (dev,
+ usb_sndctrlpipe(dev, 0),
+ request,
+ (USB_TYPE_VENDOR |
+ USB_RECIP_DEVICE |
+ USB_DIR_OUT),
+ value,
+ index,
+ data,
+ size,
+ 1000);
+ if (status < 0)
+ return status;
+ if (status != size) {
+ dbg ("%s - wanted to write %d, but only wrote %d",
+ __FUNCTION__, size, status);
+ return -ECOMM;
+ }
+ return 0;
+}
+
+static int TIWriteCommandSync (struct usb_device *dev, __u8 command,
+ __u8 moduleid, __u16 value, u8 *data,
+ int size)
+{
+ return TISendVendorRequestSync (dev,
+ command, // Request
+ value, // wValue
+ moduleid, // wIndex
+ data, // TransferBuffer
+ size); // TransferBufferLength
+
+}
+
+/* clear tx/rx buffers and fifo in TI UMP */
+static int TIPurgeDataSync (struct usb_serial_port *port, __u16 mask)
+{
+ int port_number = port->number - port->serial->minor;
+
+ dbg ("%s - port %d, mask %x", __FUNCTION__, port_number, mask);
+
+ return TIWriteCommandSync (port->serial->dev,
+ UMPC_PURGE_PORT,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ mask,
+ NULL,
+ 0);
+}
+
+/**
+ * TIReadDownloadMemory - Read edgeport memory from TI chip
+ * @dev: usb device pointer
+ * @start_address: Device CPU address at which to read
+ * @length: Length of above data
+ * @address_type: Can read both XDATA and I2C
+ * @buffer: pointer to input data buffer
+ */
+static int TIReadDownloadMemory(struct usb_device *dev, int start_address,
+ int length, __u8 address_type, __u8 *buffer)
+{
+ int status = 0;
+ __u8 read_length;
+ __be16 be_start_address;
+
+ dbg ("%s - @ %x for %d", __FUNCTION__, start_address, length);
+
+ /* Read in blocks of 64 bytes
+ * (TI firmware can't handle more than 64 byte reads)
+ */
+ while (length) {
+ if (length > 64)
+ read_length= 64;
+ else
+ read_length = (__u8)length;
+
+ if (read_length > 1) {
+ dbg ("%s - @ %x for %d", __FUNCTION__,
+ start_address, read_length);
+ }
+ be_start_address = cpu_to_be16 (start_address);
+ status = TIReadVendorRequestSync (dev,
+ UMPC_MEMORY_READ, // Request
+ (__u16)address_type, // wValue (Address type)
+ (__force __u16)be_start_address, // wIndex (Address to read)
+ buffer, // TransferBuffer
+ read_length); // TransferBufferLength
+
+ if (status) {
+ dbg ("%s - ERROR %x", __FUNCTION__, status);
+ return status;
+ }
+
+ if (read_length > 1) {
+ usb_serial_debug_data(debug, &dev->dev, __FUNCTION__,
+ read_length, buffer);
+ }
+
+ /* Update pointers/length */
+ start_address += read_length;
+ buffer += read_length;
+ length -= read_length;
+ }
+
+ return status;
+}
+
+static int TIReadRam (struct usb_device *dev, int start_address, int length, __u8 *buffer)
+{
+ return TIReadDownloadMemory (dev,
+ start_address,
+ length,
+ DTK_ADDR_SPACE_XDATA,
+ buffer);
+}
+
+/* Read edgeport memory to a given block */
+static int TIReadBootMemory (struct edgeport_serial *serial, int start_address, int length, __u8 * buffer)
+{
+ int status = 0;
+ int i;
+
+ for (i=0; i< length; i++) {
+ status = TIReadVendorRequestSync (serial->serial->dev,
+ UMPC_MEMORY_READ, // Request
+ serial->TI_I2C_Type, // wValue (Address type)
+ (__u16)(start_address+i), // wIndex
+ &buffer[i], // TransferBuffer
+ 0x01); // TransferBufferLength
+ if (status) {
+ dbg ("%s - ERROR %x", __FUNCTION__, status);
+ return status;
+ }
+ }
+
+ dbg ("%s - start_address = %x, length = %d", __FUNCTION__, start_address, length);
+ usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, length, buffer);
+
+ serial->TiReadI2C = 1;
+
+ return status;
+}
+
+/* Write given block to TI EPROM memory */
+static int TIWriteBootMemory (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer)
+{
+ int status = 0;
+ int i;
+ __u8 temp;
+
+ /* Must do a read before write */
+ if (!serial->TiReadI2C) {
+ status = TIReadBootMemory(serial, 0, 1, &temp);
+ if (status)
+ return status;
+ }
+
+ for (i=0; i < length; ++i) {
+ status = TISendVendorRequestSync (serial->serial->dev,
+ UMPC_MEMORY_WRITE, // Request
+ buffer[i], // wValue
+ (__u16)(i+start_address), // wIndex
+ NULL, // TransferBuffer
+ 0); // TransferBufferLength
+ if (status)
+ return status;
+ }
+
+ dbg ("%s - start_sddr = %x, length = %d", __FUNCTION__, start_address, length);
+ usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, length, buffer);
+
+ return status;
+}
+
+
+/* Write edgeport I2C memory to TI chip */
+static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address, int length, __u8 address_type, __u8 *buffer)
+{
+ int status = 0;
+ int write_length;
+ __be16 be_start_address;
+
+ /* We can only send a maximum of 1 aligned byte page at a time */
+
+ /* calulate the number of bytes left in the first page */
+ write_length = EPROM_PAGE_SIZE - (start_address & (EPROM_PAGE_SIZE - 1));
+
+ if (write_length > length)
+ write_length = length;
+
+ dbg ("%s - BytesInFirstPage Addr = %x, length = %d", __FUNCTION__, start_address, write_length);
+ usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, write_length, buffer);
+
+ /* Write first page */
+ be_start_address = cpu_to_be16 (start_address);
+ status = TISendVendorRequestSync (serial->serial->dev,
+ UMPC_MEMORY_WRITE, // Request
+ (__u16)address_type, // wValue
+ (__force __u16)be_start_address, // wIndex
+ buffer, // TransferBuffer
+ write_length);
+ if (status) {
+ dbg ("%s - ERROR %d", __FUNCTION__, status);
+ return status;
+ }
+
+ length -= write_length;
+ start_address += write_length;
+ buffer += write_length;
+
+ /* We should be aligned now -- can write max page size bytes at a time */
+ while (length) {
+ if (length > EPROM_PAGE_SIZE)
+ write_length = EPROM_PAGE_SIZE;
+ else
+ write_length = length;
+
+ dbg ("%s - Page Write Addr = %x, length = %d", __FUNCTION__, start_address, write_length);
+ usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, write_length, buffer);
+
+ /* Write next page */
+ be_start_address = cpu_to_be16 (start_address);
+ status = TISendVendorRequestSync (serial->serial->dev,
+ UMPC_MEMORY_WRITE, // Request
+ (__u16)address_type, // wValue
+ (__force __u16)be_start_address, // wIndex
+ buffer, // TransferBuffer
+ write_length); // TransferBufferLength
+ if (status) {
+ dev_err (&serial->serial->dev->dev, "%s - ERROR %d\n", __FUNCTION__, status);
+ return status;
+ }
+
+ length -= write_length;
+ start_address += write_length;
+ buffer += write_length;
+ }
+ return status;
+}
+
+/* Examine the UMP DMA registers and LSR
+ *
+ * Check the MSBit of the X and Y DMA byte count registers.
+ * A zero in this bit indicates that the TX DMA buffers are empty
+ * then check the TX Empty bit in the UART.
+ */
+static int TIIsTxActive (struct edgeport_port *port)
+{
+ int status;
+ struct out_endpoint_desc_block *oedb;
+ __u8 *lsr;
+ int bytes_left = 0;
+
+ oedb = kmalloc (sizeof (* oedb), GFP_KERNEL);
+ if (!oedb) {
+ dev_err (&port->port->dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ lsr = kmalloc (1, GFP_KERNEL); /* Sigh, that's right, just one byte,
+ as not all platforms can do DMA
+ from stack */
+ if (!lsr) {
+ kfree(oedb);
+ return -ENOMEM;
+ }
+ /* Read the DMA Count Registers */
+ status = TIReadRam (port->port->serial->dev,
+ port->dma_address,
+ sizeof( *oedb),
+ (void *)oedb);
+
+ if (status)
+ goto exit_is_tx_active;
+
+ dbg ("%s - XByteCount 0x%X", __FUNCTION__, oedb->XByteCount);
+
+ /* and the LSR */
+ status = TIReadRam (port->port->serial->dev,
+ port->uart_base + UMPMEM_OFFS_UART_LSR,
+ 1,
+ lsr);
+
+ if (status)
+ goto exit_is_tx_active;
+ dbg ("%s - LSR = 0x%X", __FUNCTION__, *lsr);
+
+ /* If either buffer has data or we are transmitting then return TRUE */
+ if ((oedb->XByteCount & 0x80 ) != 0 )
+ bytes_left += 64;
+
+ if ((*lsr & UMP_UART_LSR_TX_MASK ) == 0 )
+ bytes_left += 1;
+
+ /* We return Not Active if we get any kind of error */
+exit_is_tx_active:
+ dbg ("%s - return %d", __FUNCTION__, bytes_left );
+
+ kfree(lsr);
+ kfree(oedb);
+ return bytes_left;
+}
+
+static void TIChasePort(struct edgeport_port *port, unsigned long timeout, int flush)
+{
+ int baud_rate;
+ struct tty_struct *tty = port->port->tty;
+ wait_queue_t wait;
+ unsigned long flags;
+
+ if (!timeout)
+ timeout = (HZ*EDGE_CLOSING_WAIT)/100;
+
+ /* wait for data to drain from the buffer */
+ spin_lock_irqsave(&port->ep_lock, flags);
+ init_waitqueue_entry(&wait, current);
+ add_wait_queue(&tty->write_wait, &wait);
+ for (;;) {
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (edge_buf_data_avail(port->ep_out_buf) == 0
+ || timeout == 0 || signal_pending(current)
+ || !usb_get_intfdata(port->port->serial->interface)) /* disconnect */
+ break;
+ spin_unlock_irqrestore(&port->ep_lock, flags);
+ timeout = schedule_timeout(timeout);
+ spin_lock_irqsave(&port->ep_lock, flags);
+ }
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&tty->write_wait, &wait);
+ if (flush)
+ edge_buf_clear(port->ep_out_buf);
+ spin_unlock_irqrestore(&port->ep_lock, flags);
+
+ /* wait for data to drain from the device */
+ timeout += jiffies;
+ while ((long)(jiffies - timeout) < 0 && !signal_pending(current)
+ && usb_get_intfdata(port->port->serial->interface)) { /* not disconnected */
+ if (!TIIsTxActive(port))
+ break;
+ msleep(10);
+ }
+
+ /* disconnected */
+ if (!usb_get_intfdata(port->port->serial->interface))
+ return;
+
+ /* wait one more character time, based on baud rate */
+ /* (TIIsTxActive doesn't seem to wait for the last byte) */
+ if ((baud_rate=port->baud_rate) == 0)
+ baud_rate = 50;
+ msleep(max(1,(10000+baud_rate-1)/baud_rate));
+}
+
+static int TIChooseConfiguration (struct usb_device *dev)
+{
+ // There may be multiple configurations on this device, in which case
+ // we would need to read and parse all of them to find out which one
+ // we want. However, we just support one config at this point,
+ // configuration # 1, which is Config Descriptor 0.
+
+ dbg ("%s - Number of Interfaces = %d", __FUNCTION__, dev->config->desc.bNumInterfaces);
+ dbg ("%s - MAX Power = %d", __FUNCTION__, dev->config->desc.bMaxPower*2);
+
+ if (dev->config->desc.bNumInterfaces != 1) {
+ dev_err (&dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __FUNCTION__);
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+static int TIReadRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer)
+{
+ int status;
+
+ if (serial->product_info.TiMode == TI_MODE_DOWNLOAD) {
+ status = TIReadDownloadMemory (serial->serial->dev,
+ start_address,
+ length,
+ serial->TI_I2C_Type,
+ buffer);
+ } else {
+ status = TIReadBootMemory (serial,
+ start_address,
+ length,
+ buffer);
+ }
+
+ return status;
+}
+
+static int TIWriteRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer)
+{
+ if (serial->product_info.TiMode == TI_MODE_BOOT)
+ return TIWriteBootMemory (serial,
+ start_address,
+ length,
+ buffer);
+
+ if (serial->product_info.TiMode == TI_MODE_DOWNLOAD)
+ return TIWriteDownloadI2C (serial,
+ start_address,
+ length,
+ serial->TI_I2C_Type,
+ buffer);
+
+ return -EINVAL;
+}
+
+
+
+/* Read a descriptor header from I2C based on type */
+static int TIGetDescriptorAddress (struct edgeport_serial *serial, int desc_type, struct ti_i2c_desc *rom_desc)
+{
+ int start_address;
+ int status;
+
+ /* Search for requested descriptor in I2C */
+ start_address = 2;
+ do {
+ status = TIReadRom (serial,
+ start_address,
+ sizeof(struct ti_i2c_desc),
+ (__u8 *)rom_desc );
+ if (status)
+ return 0;
+
+ if (rom_desc->Type == desc_type)
+ return start_address;
+
+ start_address = start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size;
+
+ } while ((start_address < TI_MAX_I2C_SIZE) && rom_desc->Type);
+
+ return 0;
+}
+
+/* Validate descriptor checksum */
+static int ValidChecksum(struct ti_i2c_desc *rom_desc, __u8 *buffer)
+{
+ __u16 i;
+ __u8 cs = 0;
+
+ for (i=0; i < rom_desc->Size; i++) {
+ cs = (__u8)(cs + buffer[i]);
+ }
+ if (cs != rom_desc->CheckSum) {
+ dbg ("%s - Mismatch %x - %x", __FUNCTION__, rom_desc->CheckSum, cs);
+ return -EINVAL;
+ }
+ return 0;
+}
+
+/* Make sure that the I2C image is good */
+static int TiValidateI2cImage (struct edgeport_serial *serial)
+{
+ struct device *dev = &serial->serial->dev->dev;
+ int status = 0;
+ struct ti_i2c_desc *rom_desc;
+ int start_address = 2;
+ __u8 *buffer;
+ __u16 ttype;
+
+ rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
+ if (!rom_desc) {
+ dev_err (dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL);
+ if (!buffer) {
+ dev_err (dev, "%s - out of memory when allocating buffer\n", __FUNCTION__);
+ kfree (rom_desc);
+ return -ENOMEM;
+ }
+
+ // Read the first byte (Signature0) must be 0x52 or 0x10
+ status = TIReadRom (serial, 0, 1, buffer);
+ if (status)
+ goto ExitTiValidateI2cImage;
+
+ if (*buffer != UMP5152 && *buffer != UMP3410) {
+ dev_err (dev, "%s - invalid buffer signature\n", __FUNCTION__);
+ status = -ENODEV;
+ goto ExitTiValidateI2cImage;
+ }
+
+ do {
+ // Validate the I2C
+ status = TIReadRom (serial,
+ start_address,
+ sizeof(struct ti_i2c_desc),
+ (__u8 *)rom_desc);
+ if (status)
+ break;
+
+ if ((start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size) > TI_MAX_I2C_SIZE) {
+ status = -ENODEV;
+ dbg ("%s - structure too big, erroring out.", __FUNCTION__);
+ break;
+ }
+
+ dbg ("%s Type = 0x%x", __FUNCTION__, rom_desc->Type);
+
+ // Skip type 2 record
+ ttype = rom_desc->Type & 0x0f;
+ if ( ttype != I2C_DESC_TYPE_FIRMWARE_BASIC
+ && ttype != I2C_DESC_TYPE_FIRMWARE_AUTO ) {
+ // Read the descriptor data
+ status = TIReadRom(serial,
+ start_address+sizeof(struct ti_i2c_desc),
+ rom_desc->Size,
+ buffer);
+ if (status)
+ break;
+
+ status = ValidChecksum(rom_desc, buffer);
+ if (status)
+ break;
+ }
+ start_address = start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size;
+
+ } while ((rom_desc->Type != I2C_DESC_TYPE_ION) && (start_address < TI_MAX_I2C_SIZE));
+
+ if ((rom_desc->Type != I2C_DESC_TYPE_ION) || (start_address > TI_MAX_I2C_SIZE))
+ status = -ENODEV;
+
+ExitTiValidateI2cImage:
+ kfree (buffer);
+ kfree (rom_desc);
+ return status;
+}
+
+static int TIReadManufDescriptor (struct edgeport_serial *serial, __u8 *buffer)
+{
+ int status;
+ int start_address;
+ struct ti_i2c_desc *rom_desc;
+ struct edge_ti_manuf_descriptor *desc;
+
+ rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
+ if (!rom_desc) {
+ dev_err (&serial->serial->dev->dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc);
+
+ if (!start_address) {
+ dbg ("%s - Edge Descriptor not found in I2C", __FUNCTION__);
+ status = -ENODEV;
+ goto exit;
+ }
+
+ // Read the descriptor data
+ status = TIReadRom (serial,
+ start_address+sizeof(struct ti_i2c_desc),
+ rom_desc->Size,
+ buffer);
+ if (status)
+ goto exit;
+
+ status = ValidChecksum(rom_desc, buffer);
+
+ desc = (struct edge_ti_manuf_descriptor *)buffer;
+ dbg ( "%s - IonConfig 0x%x", __FUNCTION__, desc->IonConfig );
+ dbg ( "%s - Version %d", __FUNCTION__, desc->Version );
+ dbg ( "%s - Cpu/Board 0x%x", __FUNCTION__, desc->CpuRev_BoardRev );
+ dbg ( "%s - NumPorts %d", __FUNCTION__, desc->NumPorts );
+ dbg ( "%s - NumVirtualPorts %d", __FUNCTION__, desc->NumVirtualPorts );
+ dbg ( "%s - TotalPorts %d", __FUNCTION__, desc->TotalPorts );
+
+exit:
+ kfree (rom_desc);
+ return status;
+}
+
+/* Build firmware header used for firmware update */
+static int BuildI2CFirmwareHeader (__u8 *header, struct device *dev)
+{
+ __u8 *buffer;
+ int buffer_size;
+ int i;
+ __u8 cs = 0;
+ struct ti_i2c_desc *i2c_header;
+ struct ti_i2c_image_header *img_header;
+ struct ti_i2c_firmware_rec *firmware_rec;
+
+ // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
+ // This will force the UMP to come up in Boot Mode. Then while in boot mode, the driver
+ // will download the latest firmware (padded to 15.5k) into the UMP ram.
+ // And finally when the device comes back up in download mode the driver will cause
+ // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
+ // the record type from 0xf2 to 0x02.
+
+ // Allocate a 15.5k buffer + 2 bytes for version number (Firmware Record)
+ buffer_size = (((1024 * 16) - 512 )+ sizeof(struct ti_i2c_firmware_rec));
+
+ buffer = kmalloc (buffer_size, GFP_KERNEL);
+ if (!buffer) {
+ dev_err (dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ // Set entire image of 0xffs
+ memset (buffer, 0xff, buffer_size);
+
+ // Copy version number into firmware record
+ firmware_rec = (struct ti_i2c_firmware_rec *)buffer;
+
+ firmware_rec->Ver_Major = OperationalCodeImageVersion.MajorVersion;
+ firmware_rec->Ver_Minor = OperationalCodeImageVersion.MinorVersion;
+
+ // Pointer to fw_down memory image
+ img_header = (struct ti_i2c_image_header *)&PagableOperationalCodeImage[0];
+
+ memcpy (buffer + sizeof(struct ti_i2c_firmware_rec),
+ &PagableOperationalCodeImage[sizeof(struct ti_i2c_image_header)],
+ le16_to_cpu(img_header->Length));
+
+ for (i=0; i < buffer_size; i++) {
+ cs = (__u8)(cs + buffer[i]);
+ }
+
+ kfree (buffer);
+
+ // Build new header
+ i2c_header = (struct ti_i2c_desc *)header;
+ firmware_rec = (struct ti_i2c_firmware_rec*)i2c_header->Data;
+
+ i2c_header->Type = I2C_DESC_TYPE_FIRMWARE_BLANK;
+ i2c_header->Size = (__u16)buffer_size;
+ i2c_header->CheckSum = cs;
+ firmware_rec->Ver_Major = OperationalCodeImageVersion.MajorVersion;
+ firmware_rec->Ver_Minor = OperationalCodeImageVersion.MinorVersion;
+
+ return 0;
+}
+
+/* Try to figure out what type of I2c we have */
+static int TIGetI2cTypeInBootMode (struct edgeport_serial *serial)
+{
+ int status;
+ __u8 data;
+
+ // Try to read type 2
+ status = TIReadVendorRequestSync (serial->serial->dev,
+ UMPC_MEMORY_READ, // Request
+ DTK_ADDR_SPACE_I2C_TYPE_II, // wValue (Address type)
+ 0, // wIndex
+ &data, // TransferBuffer
+ 0x01); // TransferBufferLength
+ if (status)
+ dbg ("%s - read 2 status error = %d", __FUNCTION__, status);
+ else
+ dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data);
+ if ((!status) && (data == UMP5152 || data == UMP3410)) {
+ dbg ("%s - ROM_TYPE_II", __FUNCTION__);
+ serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
+ return 0;
+ }
+
+ // Try to read type 3
+ status = TIReadVendorRequestSync (serial->serial->dev,
+ UMPC_MEMORY_READ, // Request
+ DTK_ADDR_SPACE_I2C_TYPE_III, // wValue (Address type)
+ 0, // wIndex
+ &data, // TransferBuffer
+ 0x01); // TransferBufferLength
+ if (status)
+ dbg ("%s - read 3 status error = %d", __FUNCTION__, status);
+ else
+ dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data);
+ if ((!status) && (data == UMP5152 || data == UMP3410)) {
+ dbg ("%s - ROM_TYPE_III", __FUNCTION__);
+ serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_III;
+ return 0;
+ }
+
+ dbg ("%s - Unknown", __FUNCTION__);
+ serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
+ return -ENODEV;
+}
+
+static int TISendBulkTransferSync (struct usb_serial *serial, void *buffer, int length, int *num_sent)
+{
+ int status;
+
+ status = usb_bulk_msg (serial->dev,
+ usb_sndbulkpipe(serial->dev,
+ serial->port[0]->bulk_out_endpointAddress),
+ buffer,
+ length,
+ num_sent,
+ 1000);
+ return status;
+}
+
+/* Download given firmware image to the device (IN BOOT MODE) */
+static int TIDownloadCodeImage (struct edgeport_serial *serial, __u8 *image, int image_length)
+{
+ int status = 0;
+ int pos;
+ int transfer;
+ int done;
+
+ // Transfer firmware image
+ for (pos = 0; pos < image_length; ) {
+ // Read the next buffer from file
+ transfer = image_length - pos;
+ if (transfer > EDGE_FW_BULK_MAX_PACKET_SIZE)
+ transfer = EDGE_FW_BULK_MAX_PACKET_SIZE;
+
+ // Transfer data
+ status = TISendBulkTransferSync (serial->serial, &image[pos], transfer, &done);
+ if (status)
+ break;
+ // Advance buffer pointer
+ pos += done;
+ }
+
+ return status;
+}
+
+// FIXME!!!
+static int TIConfigureBootDevice (struct usb_device *dev)
+{
+ return 0;
+}
+
+/**
+ * DownloadTIFirmware - Download run-time operating firmware to the TI5052
+ *
+ * This routine downloads the main operating code into the TI5052, using the
+ * boot code already burned into E2PROM or ROM.
+ */
+static int TIDownloadFirmware (struct edgeport_serial *serial)
+{
+ struct device *dev = &serial->serial->dev->dev;
+ int status = 0;
+ int start_address;
+ struct edge_ti_manuf_descriptor *ti_manuf_desc;
+ struct usb_interface_descriptor *interface;
+ int download_cur_ver;
+ int download_new_ver;
+
+ /* This routine is entered by both the BOOT mode and the Download mode
+ * We can determine which code is running by the reading the config
+ * descriptor and if we have only one bulk pipe it is in boot mode
+ */
+ serial->product_info.hardware_type = HARDWARE_TYPE_TIUMP;
+
+ /* Default to type 2 i2c */
+ serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
+
+ status = TIChooseConfiguration (serial->serial->dev);
+ if (status)
+ return status;
+
+ interface = &serial->serial->interface->cur_altsetting->desc;
+ if (!interface) {
+ dev_err (dev, "%s - no interface set, error!\n", __FUNCTION__);
+ return -ENODEV;
+ }
+
+ // Setup initial mode -- the default mode 0 is TI_MODE_CONFIGURING
+ // if we have more than one endpoint we are definitely in download mode
+ if (interface->bNumEndpoints > 1)
+ serial->product_info.TiMode = TI_MODE_DOWNLOAD;
+ else
+ // Otherwise we will remain in configuring mode
+ serial->product_info.TiMode = TI_MODE_CONFIGURING;
+
+ // Save Download Version Number
+ OperationalCodeImageVersion.MajorVersion = PagableOperationalCodeImageVersion.MajorVersion;
+ OperationalCodeImageVersion.MinorVersion = PagableOperationalCodeImageVersion.MinorVersion;
+ OperationalCodeImageVersion.BuildNumber = PagableOperationalCodeImageVersion.BuildNumber;
+
+ /********************************************************************/
+ /* Download Mode */
+ /********************************************************************/
+ if (serial->product_info.TiMode == TI_MODE_DOWNLOAD) {
+ struct ti_i2c_desc *rom_desc;
+
+ dbg ("%s - <<<<<<<<<<<<<<<RUNNING IN DOWNLOAD MODE>>>>>>>>>>", __FUNCTION__);
+
+ status = TiValidateI2cImage (serial);
+ if (status) {
+ dbg ("%s - <<<<<<<<<<<<<<<DOWNLOAD MODE -- BAD I2C >>>>>>>>>>",
+ __FUNCTION__);
+ return status;
+ }
+
+ /* Validate Hardware version number
+ * Read Manufacturing Descriptor from TI Based Edgeport
+ */
+ ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
+ if (!ti_manuf_desc) {
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
+ if (status) {
+ kfree (ti_manuf_desc);
+ return status;
+ }
+
+ // Check version number of ION descriptor
+ if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) {
+ dbg ( "%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__,
+ TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev));
+ kfree (ti_manuf_desc);
+ return -EINVAL;
+ }
+
+ rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
+ if (!rom_desc) {
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
+ kfree (ti_manuf_desc);
+ return -ENOMEM;
+ }
+
+ // Search for type 2 record (firmware record)
+ if ((start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_FIRMWARE_BASIC, rom_desc)) != 0) {
+ struct ti_i2c_firmware_rec *firmware_version;
+ __u8 record;
+
+ dbg ("%s - Found Type FIRMWARE (Type 2) record", __FUNCTION__);
+
+ firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL);
+ if (!firmware_version) {
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return -ENOMEM;
+ }
+
+ // Validate version number
+ // Read the descriptor data
+ status = TIReadRom (serial,
+ start_address+sizeof(struct ti_i2c_desc),
+ sizeof(struct ti_i2c_firmware_rec),
+ (__u8 *)firmware_version);
+ if (status) {
+ kfree (firmware_version);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return status;
+ }
+
+ // Check version number of download with current version in I2c
+ download_cur_ver = (firmware_version->Ver_Major << 8) +
+ (firmware_version->Ver_Minor);
+ download_new_ver = (OperationalCodeImageVersion.MajorVersion << 8) +
+ (OperationalCodeImageVersion.MinorVersion);
+
+ dbg ("%s - >>>Firmware Versions Device %d.%d Driver %d.%d",
+ __FUNCTION__,
+ firmware_version->Ver_Major,
+ firmware_version->Ver_Minor,
+ OperationalCodeImageVersion.MajorVersion,
+ OperationalCodeImageVersion.MinorVersion);
+
+ // Check if we have an old version in the I2C and update if necessary
+ if (download_cur_ver != download_new_ver) {
+ dbg ("%s - Update I2C Download from %d.%d to %d.%d",
+ __FUNCTION__,
+ firmware_version->Ver_Major,
+ firmware_version->Ver_Minor,
+ OperationalCodeImageVersion.MajorVersion,
+ OperationalCodeImageVersion.MinorVersion);
+
+ // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
+ // This will force the UMP to come up in Boot Mode. Then while in boot mode, the driver
+ // will download the latest firmware (padded to 15.5k) into the UMP ram.
+ // And finally when the device comes back up in download mode the driver will cause
+ // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
+ // the record type from 0xf2 to 0x02.
+
+ record = I2C_DESC_TYPE_FIRMWARE_BLANK;
+
+ // Change the I2C Firmware record type to 0xf2 to trigger an update
+ status = TIWriteRom (serial,
+ start_address,
+ sizeof(record),
+ &record);
+ if (status) {
+ kfree (firmware_version);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return status;
+ }
+
+ // verify the write -- must do this in order for write to
+ // complete before we do the hardware reset
+ status = TIReadRom (serial,
+ start_address,
+ sizeof(record),
+ &record);
+
+ if (status) {
+ kfree (firmware_version);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return status;
+ }
+
+ if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) {
+ dev_err (dev, "%s - error resetting device\n", __FUNCTION__);
+ kfree (firmware_version);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return -ENODEV;
+ }
+
+ dbg ("%s - HARDWARE RESET", __FUNCTION__);
+
+ // Reset UMP -- Back to BOOT MODE
+ status = TISendVendorRequestSync (serial->serial->dev,
+ UMPC_HARDWARE_RESET, // Request
+ 0, // wValue
+ 0, // wIndex
+ NULL, // TransferBuffer
+ 0); // TransferBufferLength
+
+ dbg ( "%s - HARDWARE RESET return %d", __FUNCTION__, status);
+
+ /* return an error on purpose. */
+ kfree (firmware_version);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return -ENODEV;
+ }
+ kfree (firmware_version);
+ }
+ // Search for type 0xF2 record (firmware blank record)
+ else if ((start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_FIRMWARE_BLANK, rom_desc)) != 0) {
+ #define HEADER_SIZE (sizeof(struct ti_i2c_desc) + sizeof(struct ti_i2c_firmware_rec))
+ __u8 *header;
+ __u8 *vheader;
+
+ header = kmalloc (HEADER_SIZE, GFP_KERNEL);
+ if (!header) {
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return -ENOMEM;
+ }
+
+ vheader = kmalloc (HEADER_SIZE, GFP_KERNEL);
+ if (!vheader) {
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
+ kfree (header);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return -ENOMEM;
+ }
+
+ dbg ("%s - Found Type BLANK FIRMWARE (Type F2) record", __FUNCTION__);
+
+ // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
+ // This will force the UMP to come up in Boot Mode. Then while in boot mode, the driver
+ // will download the latest firmware (padded to 15.5k) into the UMP ram.
+ // And finally when the device comes back up in download mode the driver will cause
+ // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
+ // the record type from 0xf2 to 0x02.
+ status = BuildI2CFirmwareHeader(header, dev);
+ if (status) {
+ kfree (vheader);
+ kfree (header);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return status;
+ }
+
+ // Update I2C with type 0xf2 record with correct size and checksum
+ status = TIWriteRom (serial,
+ start_address,
+ HEADER_SIZE,
+ header);
+ if (status) {
+ kfree (vheader);
+ kfree (header);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return status;
+ }
+
+ // verify the write -- must do this in order for write to
+ // complete before we do the hardware reset
+ status = TIReadRom (serial,
+ start_address,
+ HEADER_SIZE,
+ vheader);
+
+ if (status) {
+ dbg ("%s - can't read header back", __FUNCTION__);
+ kfree (vheader);
+ kfree (header);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return status;
+ }
+ if (memcmp(vheader, header, HEADER_SIZE)) {
+ dbg ("%s - write download record failed", __FUNCTION__);
+ kfree (vheader);
+ kfree (header);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return status;
+ }
+
+ kfree (vheader);
+ kfree (header);
+
+ dbg ("%s - Start firmware update", __FUNCTION__);
+
+ // Tell firmware to copy download image into I2C
+ status = TISendVendorRequestSync (serial->serial->dev,
+ UMPC_COPY_DNLD_TO_I2C, // Request
+ 0, // wValue
+ 0, // wIndex
+ NULL, // TransferBuffer
+ 0); // TransferBufferLength
+
+ dbg ("%s - Update complete 0x%x", __FUNCTION__, status);
+ if (status) {
+ dev_err (dev, "%s - UMPC_COPY_DNLD_TO_I2C failed\n", __FUNCTION__);
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return status;
+ }
+ }
+
+ // The device is running the download code
+ kfree (rom_desc);
+ kfree (ti_manuf_desc);
+ return 0;
+ }
+
+ /********************************************************************/
+ /* Boot Mode */
+ /********************************************************************/
+ dbg ("%s - <<<<<<<<<<<<<<<RUNNING IN BOOT MODE>>>>>>>>>>>>>>>",
+ __FUNCTION__);
+
+ // Configure the TI device so we can use the BULK pipes for download
+ status = TIConfigureBootDevice (serial->serial->dev);
+ if (status)
+ return status;
+
+ if (le16_to_cpu(serial->serial->dev->descriptor.idVendor) != USB_VENDOR_ID_ION) {
+ dbg ("%s - VID = 0x%x", __FUNCTION__,
+ le16_to_cpu(serial->serial->dev->descriptor.idVendor));
+ serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
+ goto StayInBootMode;
+ }
+
+ // We have an ION device (I2c Must be programmed)
+ // Determine I2C image type
+ if (TIGetI2cTypeInBootMode(serial)) {
+ goto StayInBootMode;
+ }
+
+ // Registry variable set?
+ if (TIStayInBootMode) {
+ dbg ("%s - TIStayInBootMode", __FUNCTION__);
+ goto StayInBootMode;
+ }
+
+ // Check for ION Vendor ID and that the I2C is valid
+ if (!TiValidateI2cImage(serial)) {
+ struct ti_i2c_image_header *header;
+ int i;
+ __u8 cs = 0;
+ __u8 *buffer;
+ int buffer_size;
+
+ /* Validate Hardware version number
+ * Read Manufacturing Descriptor from TI Based Edgeport
+ */
+ ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
+ if (!ti_manuf_desc) {
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
+ if (status) {
+ kfree (ti_manuf_desc);
+ goto StayInBootMode;
+ }
+
+ // Check for version 2
+ if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) {
+ dbg ("%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__,
+ TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev));
+ kfree (ti_manuf_desc);
+ goto StayInBootMode;
+ }
+
+ kfree (ti_manuf_desc);
+
+ // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
+ // This will force the UMP to come up in Boot Mode. Then while in boot mode, the driver
+ // will download the latest firmware (padded to 15.5k) into the UMP ram.
+ // And finally when the device comes back up in download mode the driver will cause
+ // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
+ // the record type from 0xf2 to 0x02.
+
+ /*
+ * Do we really have to copy the whole firmware image,
+ * or could we do this in place!
+ */
+
+ // Allocate a 15.5k buffer + 3 byte header
+ buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header));
+ buffer = kmalloc (buffer_size, GFP_KERNEL);
+ if (!buffer) {
+ dev_err (dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ // Initialize the buffer to 0xff (pad the buffer)
+ memset (buffer, 0xff, buffer_size);
+
+ memcpy (buffer, &PagableOperationalCodeImage[0], PagableOperationalCodeSize);
+
+ for(i = sizeof(struct ti_i2c_image_header); i < buffer_size; i++) {
+ cs = (__u8)(cs + buffer[i]);
+ }
+
+ header = (struct ti_i2c_image_header *)buffer;
+
+ // update length and checksum after padding
+ header->Length = cpu_to_le16((__u16)(buffer_size - sizeof(struct ti_i2c_image_header)));
+ header->CheckSum = cs;
+
+ // Download the operational code
+ dbg ("%s - Downloading operational code image (TI UMP)", __FUNCTION__);
+ status = TIDownloadCodeImage (serial, buffer, buffer_size);
+
+ kfree (buffer);
+
+ if (status) {
+ dbg ("%s - Error downloading operational code image", __FUNCTION__);
+ return status;
+ }
+
+ // Device will reboot
+ serial->product_info.TiMode = TI_MODE_TRANSITIONING;
+
+ dbg ("%s - Download successful -- Device rebooting...", __FUNCTION__);
+
+ /* return an error on purpose */
+ return -ENODEV;
+ }
+
+StayInBootMode:
+ // Eprom is invalid or blank stay in boot mode
+ dbg ("%s - <<<<<<<<<<<<<<<STAYING IN BOOT MODE>>>>>>>>>>>>", __FUNCTION__);
+ serial->product_info.TiMode = TI_MODE_BOOT;
+
+ return 0;
+}
+
+
+static int TISetDtr (struct edgeport_port *port)
+{
+ int port_number = port->port->number - port->port->serial->minor;
+
+ dbg ("%s", __FUNCTION__);
+ port->shadow_mcr |= MCR_DTR;
+
+ return TIWriteCommandSync (port->port->serial->dev,
+ UMPC_SET_CLR_DTR,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 1, /* set */
+ NULL,
+ 0);
+}
+
+static int TIClearDtr (struct edgeport_port *port)
+{
+ int port_number = port->port->number - port->port->serial->minor;
+
+ dbg ("%s", __FUNCTION__);
+ port->shadow_mcr &= ~MCR_DTR;
+
+ return TIWriteCommandSync (port->port->serial->dev,
+ UMPC_SET_CLR_DTR,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 0, /* clear */
+ NULL,
+ 0);
+}
+
+static int TISetRts (struct edgeport_port *port)
+{
+ int port_number = port->port->number - port->port->serial->minor;
+
+ dbg ("%s", __FUNCTION__);
+ port->shadow_mcr |= MCR_RTS;
+
+ return TIWriteCommandSync (port->port->serial->dev,
+ UMPC_SET_CLR_RTS,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 1, /* set */
+ NULL,
+ 0);
+}
+
+static int TIClearRts (struct edgeport_port *port)
+{
+ int port_number = port->port->number - port->port->serial->minor;
+
+ dbg ("%s", __FUNCTION__);
+ port->shadow_mcr &= ~MCR_RTS;
+
+ return TIWriteCommandSync (port->port->serial->dev,
+ UMPC_SET_CLR_RTS,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 0, /* clear */
+ NULL,
+ 0);
+}
+
+static int TISetLoopBack (struct edgeport_port *port)
+{
+ int port_number = port->port->number - port->port->serial->minor;
+
+ dbg ("%s", __FUNCTION__);
+
+ return TIWriteCommandSync (port->port->serial->dev,
+ UMPC_SET_CLR_LOOPBACK,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 1, /* set */
+ NULL,
+ 0);
+}
+
+static int TIClearLoopBack (struct edgeport_port *port)
+{
+ int port_number = port->port->number - port->port->serial->minor;
+
+ dbg ("%s", __FUNCTION__);
+
+ return TIWriteCommandSync (port->port->serial->dev,
+ UMPC_SET_CLR_LOOPBACK,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 0, /* clear */
+ NULL,
+ 0);
+}
+
+static int TISetBreak (struct edgeport_port *port)
+{
+ int port_number = port->port->number - port->port->serial->minor;
+
+ dbg ("%s", __FUNCTION__);
+
+ return TIWriteCommandSync (port->port->serial->dev,
+ UMPC_SET_CLR_BREAK,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 1, /* set */
+ NULL,
+ 0);
+}
+
+static int TIClearBreak (struct edgeport_port *port)
+{
+ int port_number = port->port->number - port->port->serial->minor;
+
+ dbg ("%s", __FUNCTION__);
+
+ return TIWriteCommandSync (port->port->serial->dev,
+ UMPC_SET_CLR_BREAK,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 0, /* clear */
+ NULL,
+ 0);
+}
+
+static int TIRestoreMCR (struct edgeport_port *port, __u8 mcr)
+{
+ int status = 0;
+
+ dbg ("%s - %x", __FUNCTION__, mcr);
+
+ if (mcr & MCR_DTR)
+ status = TISetDtr (port);
+ else
+ status = TIClearDtr (port);
+
+ if (status)
+ return status;
+
+ if (mcr & MCR_RTS)
+ status = TISetRts (port);
+ else
+ status = TIClearRts (port);
+
+ if (status)
+ return status;
+
+ if (mcr & MCR_LOOPBACK)
+ status = TISetLoopBack (port);
+ else
+ status = TIClearLoopBack (port);
+
+ return status;
+}
+
+
+
+/* Convert TI LSR to standard UART flags */
+static __u8 MapLineStatus (__u8 ti_lsr)
+{
+ __u8 lsr = 0;
+
+#define MAP_FLAG(flagUmp, flagUart) \
+ if (ti_lsr & flagUmp) \
+ lsr |= flagUart;
+
+ MAP_FLAG(UMP_UART_LSR_OV_MASK, LSR_OVER_ERR) /* overrun */
+ MAP_FLAG(UMP_UART_LSR_PE_MASK, LSR_PAR_ERR) /* parity error */
+ MAP_FLAG(UMP_UART_LSR_FE_MASK, LSR_FRM_ERR) /* framing error */
+ MAP_FLAG(UMP_UART_LSR_BR_MASK, LSR_BREAK) /* break detected */
+ MAP_FLAG(UMP_UART_LSR_RX_MASK, LSR_RX_AVAIL) /* receive data available */
+ MAP_FLAG(UMP_UART_LSR_TX_MASK, LSR_TX_EMPTY) /* transmit holding register empty */
+
+#undef MAP_FLAG
+
+ return lsr;
+}
+
+static void handle_new_msr (struct edgeport_port *edge_port, __u8 msr)
+{
+ struct async_icount *icount;
+ struct tty_struct *tty;
+
+ dbg ("%s - %02x", __FUNCTION__, msr);
+
+ if (msr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) {
+ icount = &edge_port->icount;
+
+ /* update input line counters */
+ if (msr & EDGEPORT_MSR_DELTA_CTS)
+ icount->cts++;
+ if (msr & EDGEPORT_MSR_DELTA_DSR)
+ icount->dsr++;
+ if (msr & EDGEPORT_MSR_DELTA_CD)
+ icount->dcd++;
+ if (msr & EDGEPORT_MSR_DELTA_RI)
+ icount->rng++;
+ wake_up_interruptible (&edge_port->delta_msr_wait);
+ }
+
+ /* Save the new modem status */
+ edge_port->shadow_msr = msr & 0xf0;
+
+ tty = edge_port->port->tty;
+ /* handle CTS flow control */
+ if (tty && C_CRTSCTS(tty)) {
+ if (msr & EDGEPORT_MSR_CTS) {
+ tty->hw_stopped = 0;
+ tty_wakeup(tty);
+ } else {
+ tty->hw_stopped = 1;
+ }
+ }
+
+ return;
+}
+
+static void handle_new_lsr (struct edgeport_port *edge_port, int lsr_data, __u8 lsr, __u8 data)
+{
+ struct async_icount *icount;
+ __u8 new_lsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
+
+ dbg ("%s - %02x", __FUNCTION__, new_lsr);
+
+ edge_port->shadow_lsr = lsr;
+
+ if (new_lsr & LSR_BREAK) {
+ /*
+ * Parity and Framing errors only count if they
+ * occur exclusive of a break being received.
+ */
+ new_lsr &= (__u8)(LSR_OVER_ERR | LSR_BREAK);
+ }
+
+ /* Place LSR data byte into Rx buffer */
+ if (lsr_data && edge_port->port->tty)
+ edge_tty_recv(&edge_port->port->dev, edge_port->port->tty, &data, 1);
+
+ /* update input line counters */
+ icount = &edge_port->icount;
+ if (new_lsr & LSR_BREAK)
+ icount->brk++;
+ if (new_lsr & LSR_OVER_ERR)
+ icount->overrun++;
+ if (new_lsr & LSR_PAR_ERR)
+ icount->parity++;
+ if (new_lsr & LSR_FRM_ERR)
+ icount->frame++;
+}
+
+
+static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context;
+ struct usb_serial_port *port;
+ struct edgeport_port *edge_port;
+ unsigned char *data = urb->transfer_buffer;
+ int length = urb->actual_length;
+ int port_number;
+ int function;
+ int status;
+ __u8 lsr;
+ __u8 msr;
+
+ dbg("%s", __FUNCTION__);
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dev_err(&urb->dev->dev, "%s - nonzero urb status received: %d\n", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (!length) {
+ dbg ("%s - no data in urb", __FUNCTION__);
+ goto exit;
+ }
+
+ usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __FUNCTION__, length, data);
+
+ if (length != 2) {
+ dbg ("%s - expecting packet of size 2, got %d", __FUNCTION__, length);
+ goto exit;
+ }
+
+ port_number = TIUMP_GET_PORT_FROM_CODE (data[0]);
+ function = TIUMP_GET_FUNC_FROM_CODE (data[0]);
+ dbg ("%s - port_number %d, function %d, info 0x%x",
+ __FUNCTION__, port_number, function, data[1]);
+ port = edge_serial->serial->port[port_number];
+ edge_port = usb_get_serial_port_data(port);
+ if (!edge_port) {
+ dbg ("%s - edge_port not found", __FUNCTION__);
+ return;
+ }
+ switch (function) {
+ case TIUMP_INTERRUPT_CODE_LSR:
+ lsr = MapLineStatus(data[1]);
+ if (lsr & UMP_UART_LSR_DATA_MASK) {
+ /* Save the LSR event for bulk read completion routine */
+ dbg ("%s - LSR Event Port %u LSR Status = %02x",
+ __FUNCTION__, port_number, lsr);
+ edge_port->lsr_event = 1;
+ edge_port->lsr_mask = lsr;
+ } else {
+ dbg ("%s - ===== Port %d LSR Status = %02x ======",
+ __FUNCTION__, port_number, lsr);
+ handle_new_lsr (edge_port, 0, lsr, 0);
+ }
+ break;
+
+ case TIUMP_INTERRUPT_CODE_MSR: // MSR
+ /* Copy MSR from UMP */
+ msr = data[1];
+ dbg ("%s - ===== Port %u MSR Status = %02x ======\n",
+ __FUNCTION__, port_number, msr);
+ handle_new_msr (edge_port, msr);
+ break;
+
+ default:
+ dev_err (&urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n",
+ __FUNCTION__, data[1]);
+ break;
+
+ }
+
+exit:
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status)
+ dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
+ __FUNCTION__, status);
+}
+
+static void edge_bulk_in_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
+ unsigned char *data = urb->transfer_buffer;
+ struct tty_struct *tty;
+ int status = 0;
+ int port_number;
+
+ dbg("%s", __FUNCTION__);
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dev_err (&urb->dev->dev,"%s - nonzero read bulk status received: %d\n",
+ __FUNCTION__, urb->status );
+ }
+
+ if (urb->status == -EPIPE)
+ goto exit;
+
+ if (urb->status) {
+ dev_err(&urb->dev->dev,"%s - stopping read!\n", __FUNCTION__);
+ return;
+ }
+
+ port_number = edge_port->port->number - edge_port->port->serial->minor;
+
+ if (edge_port->lsr_event) {
+ edge_port->lsr_event = 0;
+ dbg ("%s ===== Port %u LSR Status = %02x, Data = %02x ======",
+ __FUNCTION__, port_number, edge_port->lsr_mask, *data);
+ handle_new_lsr (edge_port, 1, edge_port->lsr_mask, *data);
+ /* Adjust buffer length/pointer */
+ --urb->actual_length;
+ ++data;
+ }
+
+ tty = edge_port->port->tty;
+ if (tty && urb->actual_length) {
+ usb_serial_debug_data(debug, &edge_port->port->dev, __FUNCTION__, urb->actual_length, data);
+
+ if (edge_port->close_pending) {
+ dbg ("%s - close is pending, dropping data on the floor.", __FUNCTION__);
+ } else {
+ edge_tty_recv(&edge_port->port->dev, tty, data, urb->actual_length);
+ }
+ edge_port->icount.rx += urb->actual_length;
+ }
+
+exit:
+ /* continue read unless stopped */
+ spin_lock(&edge_port->ep_lock);
+ if (edge_port->ep_read_urb_state == EDGE_READ_URB_RUNNING) {
+ urb->dev = edge_port->port->serial->dev;
+ status = usb_submit_urb(urb, GFP_ATOMIC);
+ } else if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPING) {
+ edge_port->ep_read_urb_state = EDGE_READ_URB_STOPPED;
+ }
+ spin_unlock(&edge_port->ep_lock);
+ if (status)
+ dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
+ __FUNCTION__, status);
+}
+
+static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned char *data, int length)
+{
+ int cnt;
+
+ do {
+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ dev_err(dev, "%s - dropping data, %d bytes lost\n",
+ __FUNCTION__, length);
+ return;
+ }
+ }
+ cnt = min(length, TTY_FLIPBUF_SIZE - tty->flip.count);
+ memcpy(tty->flip.char_buf_ptr, data, cnt);
+ memset(tty->flip.flag_buf_ptr, 0, cnt);
+ tty->flip.char_buf_ptr += cnt;
+ tty->flip.flag_buf_ptr += cnt;
+ tty->flip.count += cnt;
+ data += cnt;
+ length -= cnt;
+ } while (length > 0);
+
+ tty_flip_buffer_push(tty);
+}
+
+static void edge_bulk_out_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+
+ dbg ("%s - port %d", __FUNCTION__, port->number);
+
+ edge_port->ep_write_urb_in_use = 0;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dev_err (&urb->dev->dev,"%s - nonzero write bulk status received: %d\n",
+ __FUNCTION__, urb->status);
+ }
+
+ /* send any buffered data */
+ edge_send(port);
+}
+
+static int edge_open (struct usb_serial_port *port, struct file * filp)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ struct edgeport_serial *edge_serial;
+ struct usb_device *dev;
+ struct urb *urb;
+ int port_number;
+ int status;
+ u16 open_settings;
+ u8 transaction_timeout;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (edge_port == NULL)
+ return -ENODEV;
+
+ if (port->tty)
+ port->tty->low_latency = low_latency;
+
+ port_number = port->number - port->serial->minor;
+ switch (port_number) {
+ case 0:
+ edge_port->uart_base = UMPMEM_BASE_UART1;
+ edge_port->dma_address = UMPD_OEDB1_ADDRESS;
+ break;
+ case 1:
+ edge_port->uart_base = UMPMEM_BASE_UART2;
+ edge_port->dma_address = UMPD_OEDB2_ADDRESS;
+ break;
+ default:
+ dev_err (&port->dev, "Unknown port number!!!\n");
+ return -ENODEV;
+ }
+
+ dbg ("%s - port_number = %d, uart_base = %04x, dma_address = %04x",
+ __FUNCTION__, port_number, edge_port->uart_base, edge_port->dma_address);
+
+ dev = port->serial->dev;
+
+ memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
+ init_waitqueue_head (&edge_port->delta_msr_wait);
+
+ /* turn off loopback */
+ status = TIClearLoopBack (edge_port);
+ if (status) {
+ dev_err(&port->dev,"%s - cannot send clear loopback command, %d\n",
+ __FUNCTION__, status);
+ return status;
+ }
+
+ /* set up the port settings */
+ edge_set_termios (port, NULL);
+
+ /* open up the port */
+
+ /* milliseconds to timeout for DMA transfer */
+ transaction_timeout = 2;
+
+ edge_port->ump_read_timeout = max (20, ((transaction_timeout * 3) / 2) );
+
+ // milliseconds to timeout for DMA transfer
+ open_settings = (u8)(UMP_DMA_MODE_CONTINOUS |
+ UMP_PIPE_TRANS_TIMEOUT_ENA |
+ (transaction_timeout << 2));
+
+ dbg ("%s - Sending UMPC_OPEN_PORT", __FUNCTION__);
+
+ /* Tell TI to open and start the port */
+ status = TIWriteCommandSync (dev,
+ UMPC_OPEN_PORT,
+ (u8)(UMPM_UART1_PORT + port_number),
+ open_settings,
+ NULL,
+ 0);
+ if (status) {
+ dev_err(&port->dev,"%s - cannot send open command, %d\n", __FUNCTION__, status);
+ return status;
+ }
+
+ /* Start the DMA? */
+ status = TIWriteCommandSync (dev,
+ UMPC_START_PORT,
+ (u8)(UMPM_UART1_PORT + port_number),
+ 0,
+ NULL,
+ 0);
+ if (status) {
+ dev_err(&port->dev,"%s - cannot send start DMA command, %d\n", __FUNCTION__, status);
+ return status;
+ }
+
+ /* Clear TX and RX buffers in UMP */
+ status = TIPurgeDataSync (port, UMP_PORT_DIR_OUT | UMP_PORT_DIR_IN);
+ if (status) {
+ dev_err(&port->dev,"%s - cannot send clear buffers command, %d\n", __FUNCTION__, status);
+ return status;
+ }
+
+ /* Read Initial MSR */
+ status = TIReadVendorRequestSync (dev,
+ UMPC_READ_MSR, // Request
+ 0, // wValue
+ (__u16)(UMPM_UART1_PORT + port_number), // wIndex (Address)
+ &edge_port->shadow_msr, // TransferBuffer
+ 1); // TransferBufferLength
+ if (status) {
+ dev_err(&port->dev,"%s - cannot send read MSR command, %d\n", __FUNCTION__, status);
+ return status;
+ }
+
+ dbg ("ShadowMSR 0x%X", edge_port->shadow_msr);
+
+ /* Set Initial MCR */
+ edge_port->shadow_mcr = MCR_RTS | MCR_DTR;
+ dbg ("ShadowMCR 0x%X", edge_port->shadow_mcr);
+
+ edge_serial = edge_port->edge_serial;
+ if (down_interruptible(&edge_serial->es_sem))
+ return -ERESTARTSYS;
+ if (edge_serial->num_ports_open == 0) {
+ /* we are the first port to be opened, let's post the interrupt urb */
+ urb = edge_serial->serial->port[0]->interrupt_in_urb;
+ if (!urb) {
+ dev_err (&port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__);
+ status = -EINVAL;
+ goto up_es_sem;
+ }
+ urb->complete = edge_interrupt_callback;
+ urb->context = edge_serial;
+ urb->dev = dev;
+ status = usb_submit_urb (urb, GFP_KERNEL);
+ if (status) {
+ dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status);
+ goto up_es_sem;
+ }
+ }
+
+ /*
+ * reset the data toggle on the bulk endpoints to work around bug in
+ * host controllers where things get out of sync some times
+ */
+ usb_clear_halt (dev, port->write_urb->pipe);
+ usb_clear_halt (dev, port->read_urb->pipe);
+
+ /* start up our bulk read urb */
+ urb = port->read_urb;
+ if (!urb) {
+ dev_err (&port->dev, "%s - no read urb present, exiting\n", __FUNCTION__);
+ status = -EINVAL;
+ goto unlink_int_urb;
+ }
+ edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
+ urb->complete = edge_bulk_in_callback;
+ urb->context = edge_port;
+ urb->dev = dev;
+ status = usb_submit_urb (urb, GFP_KERNEL);
+ if (status) {
+ dev_err (&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status);
+ goto unlink_int_urb;
+ }
+
+ ++edge_serial->num_ports_open;
+
+ dbg("%s - exited", __FUNCTION__);
+
+ goto up_es_sem;
+
+unlink_int_urb:
+ if (edge_port->edge_serial->num_ports_open == 0)
+ usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
+up_es_sem:
+ up(&edge_serial->es_sem);
+ return status;
+}
+
+static void edge_close (struct usb_serial_port *port, struct file *filp)
+{
+ struct edgeport_serial *edge_serial;
+ struct edgeport_port *edge_port;
+ int port_number;
+ int status;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ edge_serial = usb_get_serial_data(port->serial);
+ edge_port = usb_get_serial_port_data(port);
+ if ((edge_serial == NULL) || (edge_port == NULL))
+ return;
+
+ /* The bulkreadcompletion routine will check
+ * this flag and dump add read data */
+ edge_port->close_pending = 1;
+
+ /* chase the port close and flush */
+ TIChasePort (edge_port, (HZ*closing_wait)/100, 1);
+
+ usb_kill_urb(port->read_urb);
+ usb_kill_urb(port->write_urb);
+ edge_port->ep_write_urb_in_use = 0;
+
+ /* assuming we can still talk to the device,
+ * send a close port command to it */
+ dbg("%s - send umpc_close_port", __FUNCTION__);
+ port_number = port->number - port->serial->minor;
+ status = TIWriteCommandSync (port->serial->dev,
+ UMPC_CLOSE_PORT,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 0,
+ NULL,
+ 0);
+ down(&edge_serial->es_sem);
+ --edge_port->edge_serial->num_ports_open;
+ if (edge_port->edge_serial->num_ports_open <= 0) {
+ /* last port is now closed, let's shut down our interrupt urb */
+ usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
+ edge_port->edge_serial->num_ports_open = 0;
+ }
+ up(&edge_serial->es_sem);
+ edge_port->close_pending = 0;
+
+ dbg("%s - exited", __FUNCTION__);
+}
+
+static int edge_write (struct usb_serial_port *port, const unsigned char *data, int count)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (count == 0) {
+ dbg("%s - write request of 0 bytes", __FUNCTION__);
+ return 0;
+ }
+
+ if (edge_port == NULL)
+ return -ENODEV;
+ if (edge_port->close_pending == 1)
+ return -ENODEV;
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+ count = edge_buf_put(edge_port->ep_out_buf, data, count);
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+
+ edge_send(port);
+
+ return count;
+}
+
+static void edge_send(struct usb_serial_port *port)
+{
+ int count, result;
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ struct tty_struct *tty = port->tty;
+ unsigned long flags;
+
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+
+ if (edge_port->ep_write_urb_in_use) {
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+ return;
+ }
+
+ count = edge_buf_get(edge_port->ep_out_buf,
+ port->write_urb->transfer_buffer,
+ port->bulk_out_size);
+
+ if (count == 0) {
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+ return;
+ }
+
+ edge_port->ep_write_urb_in_use = 1;
+
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer);
+
+ /* set up our urb */
+ usb_fill_bulk_urb (port->write_urb, port->serial->dev,
+ usb_sndbulkpipe (port->serial->dev,
+ port->bulk_out_endpointAddress),
+ port->write_urb->transfer_buffer, count,
+ edge_bulk_out_callback,
+ port);
+
+ /* send the data out the bulk port */
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+ if (result) {
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ edge_port->ep_write_urb_in_use = 0;
+ // TODO: reschedule edge_send
+ } else {
+ edge_port->icount.tx += count;
+ }
+
+ /* wakeup any process waiting for writes to complete */
+ /* there is now more room in the buffer for new writes */
+ if (tty) {
+ /* let the tty driver wakeup if it has a special write_wakeup function */
+ tty_wakeup(tty);
+ }
+}
+
+static int edge_write_room (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ int room = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (edge_port == NULL)
+ return -ENODEV;
+ if (edge_port->close_pending == 1)
+ return -ENODEV;
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+ room = edge_buf_space_avail(edge_port->ep_out_buf);
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, room);
+ return room;
+}
+
+static int edge_chars_in_buffer (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ int chars = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (edge_port == NULL)
+ return -ENODEV;
+ if (edge_port->close_pending == 1)
+ return -ENODEV;
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+ chars = edge_buf_data_avail(edge_port->ep_out_buf);
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+
+ dbg ("%s - returns %d", __FUNCTION__, chars);
+ return chars;
+}
+
+static void edge_throttle (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ struct tty_struct *tty;
+ int status;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (edge_port == NULL)
+ 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)) {
+ unsigned char stop_char = STOP_CHAR(tty);
+ status = edge_write (port, &stop_char, 1);
+ if (status <= 0) {
+ dev_err(&port->dev, "%s - failed to write stop character, %d\n", __FUNCTION__, status);
+ }
+ }
+
+ /* if we are implementing RTS/CTS, stop reads */
+ /* and the Edgeport will clear the RTS line */
+ if (C_CRTSCTS(tty))
+ stop_read(edge_port);
+
+}
+
+static void edge_unthrottle (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ struct tty_struct *tty;
+ int status;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (edge_port == NULL)
+ 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)) {
+ unsigned char start_char = START_CHAR(tty);
+ status = edge_write (port, &start_char, 1);
+ if (status <= 0) {
+ dev_err(&port->dev, "%s - failed to write start character, %d\n", __FUNCTION__, status);
+ }
+ }
+
+ /* if we are implementing RTS/CTS, restart reads */
+ /* are the Edgeport will assert the RTS line */
+ if (C_CRTSCTS(tty)) {
+ status = restart_read(edge_port);
+ if (status)
+ dev_err(&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status);
+ }
+
+}
+
+static void stop_read(struct edgeport_port *edge_port)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+
+ if (edge_port->ep_read_urb_state == EDGE_READ_URB_RUNNING)
+ edge_port->ep_read_urb_state = EDGE_READ_URB_STOPPING;
+ edge_port->shadow_mcr &= ~MCR_RTS;
+
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+}
+
+static int restart_read(struct edgeport_port *edge_port)
+{
+ struct urb *urb;
+ int status = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave(&edge_port->ep_lock, flags);
+
+ if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPED) {
+ urb = edge_port->port->read_urb;
+ urb->complete = edge_bulk_in_callback;
+ urb->context = edge_port;
+ urb->dev = edge_port->port->serial->dev;
+ status = usb_submit_urb(urb, GFP_KERNEL);
+ }
+ edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
+ edge_port->shadow_mcr |= MCR_RTS;
+
+ spin_unlock_irqrestore(&edge_port->ep_lock, flags);
+
+ return status;
+}
+
+static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios)
+{
+ struct ump_uart_config *config;
+ struct tty_struct *tty;
+ int baud;
+ unsigned cflag;
+ int status;
+ int port_number = edge_port->port->number - edge_port->port->serial->minor;
+
+ dbg("%s - port %d", __FUNCTION__, edge_port->port->number);
+
+ tty = edge_port->port->tty;
+ if ((!tty) ||
+ (!tty->termios)) {
+ dbg("%s - no tty structures", __FUNCTION__);
+ return;
+ }
+
+ config = kmalloc (sizeof (*config), GFP_KERNEL);
+ if (!config) {
+ dev_err (&edge_port->port->dev, "%s - out of memory\n", __FUNCTION__);
+ return;
+ }
+
+ cflag = tty->termios->c_cflag;
+
+ config->wFlags = 0;
+
+ /* These flags must be set */
+ config->wFlags |= UMP_MASK_UART_FLAGS_RECEIVE_MS_INT;
+ config->wFlags |= UMP_MASK_UART_FLAGS_AUTO_START_ON_ERR;
+ config->bUartMode = (__u8)(edge_port->bUartMode);
+
+ switch (cflag & CSIZE) {
+ case CS5:
+ config->bDataBits = UMP_UART_CHAR5BITS;
+ dbg ("%s - data bits = 5", __FUNCTION__);
+ break;
+ case CS6:
+ config->bDataBits = UMP_UART_CHAR6BITS;
+ dbg ("%s - data bits = 6", __FUNCTION__);
+ break;
+ case CS7:
+ config->bDataBits = UMP_UART_CHAR7BITS;
+ dbg ("%s - data bits = 7", __FUNCTION__);
+ break;
+ default:
+ case CS8:
+ config->bDataBits = UMP_UART_CHAR8BITS;
+ dbg ("%s - data bits = 8", __FUNCTION__);
+ break;
+ }
+
+ if (cflag & PARENB) {
+ if (cflag & PARODD) {
+ config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
+ config->bParity = UMP_UART_ODDPARITY;
+ dbg("%s - parity = odd", __FUNCTION__);
+ } else {
+ config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
+ config->bParity = UMP_UART_EVENPARITY;
+ dbg("%s - parity = even", __FUNCTION__);
+ }
+ } else {
+ config->bParity = UMP_UART_NOPARITY;
+ dbg("%s - parity = none", __FUNCTION__);
+ }
+
+ if (cflag & CSTOPB) {
+ config->bStopBits = UMP_UART_STOPBIT2;
+ dbg("%s - stop bits = 2", __FUNCTION__);
+ } else {
+ config->bStopBits = UMP_UART_STOPBIT1;
+ dbg("%s - stop bits = 1", __FUNCTION__);
+ }
+
+ /* figure out the flow control settings */
+ if (cflag & CRTSCTS) {
+ config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW;
+ config->wFlags |= UMP_MASK_UART_FLAGS_RTS_FLOW;
+ dbg("%s - RTS/CTS is enabled", __FUNCTION__);
+ } else {
+ dbg("%s - RTS/CTS is disabled", __FUNCTION__);
+ tty->hw_stopped = 0;
+ restart_read(edge_port);
+ }
+
+ /* if we are implementing XON/XOFF, set the start and stop character in the device */
+ if (I_IXOFF(tty) || I_IXON(tty)) {
+ config->cXon = START_CHAR(tty);
+ config->cXoff = STOP_CHAR(tty);
+
+ /* if we are implementing INBOUND XON/XOFF */
+ if (I_IXOFF(tty)) {
+ config->wFlags |= UMP_MASK_UART_FLAGS_IN_X;
+ dbg ("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x",
+ __FUNCTION__, config->cXon, config->cXoff);
+ } else {
+ dbg ("%s - INBOUND XON/XOFF is disabled", __FUNCTION__);
+ }
+
+ /* if we are implementing OUTBOUND XON/XOFF */
+ if (I_IXON(tty)) {
+ config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X;
+ dbg ("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x",
+ __FUNCTION__, config->cXon, config->cXoff);
+ } else {
+ dbg ("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__);
+ }
+ }
+
+ /* Round the baud rate */
+ baud = tty_get_baud_rate(tty);
+ if (!baud) {
+ /* pick a default, any default... */
+ baud = 9600;
+ }
+ edge_port->baud_rate = baud;
+ config->wBaudRate = (__u16)((461550L + baud/2) / baud);
+
+ dbg ("%s - baud rate = %d, wBaudRate = %d", __FUNCTION__, baud, config->wBaudRate);
+
+ dbg ("wBaudRate: %d", (int)(461550L / config->wBaudRate));
+ dbg ("wFlags: 0x%x", config->wFlags);
+ dbg ("bDataBits: %d", config->bDataBits);
+ dbg ("bParity: %d", config->bParity);
+ dbg ("bStopBits: %d", config->bStopBits);
+ dbg ("cXon: %d", config->cXon);
+ dbg ("cXoff: %d", config->cXoff);
+ dbg ("bUartMode: %d", config->bUartMode);
+
+ /* move the word values into big endian mode */
+ cpu_to_be16s (&config->wFlags);
+ cpu_to_be16s (&config->wBaudRate);
+
+ status = TIWriteCommandSync (edge_port->port->serial->dev,
+ UMPC_SET_CONFIG,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 0,
+ (__u8 *)config,
+ sizeof(*config));
+ if (status) {
+ dbg ("%s - error %d when trying to write config to device",
+ __FUNCTION__, status);
+ }
+
+ kfree (config);
+
+ return;
+}
+
+static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ 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 &&
+ tty->termios->c_iflag == old_termios->c_iflag) {
+ dbg ("%s - nothing to change", __FUNCTION__);
+ return;
+ }
+ }
+
+ dbg("%s - clfag %08x iflag %08x", __FUNCTION__,
+ tty->termios->c_cflag, tty->termios->c_iflag);
+ if (old_termios) {
+ dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
+ old_termios->c_cflag, old_termios->c_iflag);
+ }
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (edge_port == NULL)
+ return;
+
+ /* change the port settings to the new ones specified */
+ change_port_settings (edge_port, old_termios);
+
+ return;
+}
+
+static int edge_tiocmset (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ unsigned int mcr;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ mcr = edge_port->shadow_mcr;
+ if (set & TIOCM_RTS)
+ mcr |= MCR_RTS;
+ if (set & TIOCM_DTR)
+ mcr |= MCR_DTR;
+ if (set & TIOCM_LOOP)
+ mcr |= MCR_LOOPBACK;
+
+ if (clear & TIOCM_RTS)
+ mcr &= ~MCR_RTS;
+ if (clear & TIOCM_DTR)
+ mcr &= ~MCR_DTR;
+ if (clear & TIOCM_LOOP)
+ mcr &= ~MCR_LOOPBACK;
+
+ edge_port->shadow_mcr = mcr;
+
+ TIRestoreMCR (edge_port, mcr);
+
+ return 0;
+}
+
+static int edge_tiocmget(struct usb_serial_port *port, struct file *file)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ unsigned int result = 0;
+ unsigned int msr;
+ unsigned int mcr;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ msr = edge_port->shadow_msr;
+ mcr = edge_port->shadow_mcr;
+ result = ((mcr & MCR_DTR) ? TIOCM_DTR: 0) /* 0x002 */
+ | ((mcr & MCR_RTS) ? TIOCM_RTS: 0) /* 0x004 */
+ | ((msr & EDGEPORT_MSR_CTS) ? TIOCM_CTS: 0) /* 0x020 */
+ | ((msr & EDGEPORT_MSR_CD) ? TIOCM_CAR: 0) /* 0x040 */
+ | ((msr & EDGEPORT_MSR_RI) ? TIOCM_RI: 0) /* 0x080 */
+ | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
+
+
+ dbg("%s -- %x", __FUNCTION__, result);
+
+ return result;
+}
+
+static int get_serial_info (struct edgeport_port *edge_port, struct serial_struct __user *retinfo)
+{
+ struct serial_struct tmp;
+
+ if (!retinfo)
+ return -EFAULT;
+
+ memset(&tmp, 0, sizeof(tmp));
+
+ tmp.type = PORT_16550A;
+ tmp.line = edge_port->port->serial->minor;
+ tmp.port = edge_port->port->number;
+ tmp.irq = 0;
+ tmp.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
+ tmp.xmit_fifo_size = edge_port->port->bulk_out_size;
+ tmp.baud_base = 9600;
+ tmp.close_delay = 5*HZ;
+ tmp.closing_wait = closing_wait;
+// tmp.custom_divisor = state->custom_divisor;
+// tmp.hub6 = state->hub6;
+// tmp.io_type = state->io_type;
+
+
+ if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
+ return -EFAULT;
+ return 0;
+}
+
+static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ struct async_icount cnow;
+ struct async_icount cprev;
+
+ dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
+
+ switch (cmd) {
+ 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);
+ break;
+
+ case TIOCGSERIAL:
+ dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number);
+ return get_serial_info(edge_port, (struct serial_struct __user *) arg);
+ break;
+
+ 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);
+ /* see if a signal did it */
+ if (signal_pending(current))
+ return -ERESTARTSYS;
+ cnow = edge_port->icount;
+ if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
+ cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
+ return -EIO; /* no change => error */
+ if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+ ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+ ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
+ ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) {
+ return 0;
+ }
+ cprev = cnow;
+ }
+ /* not reached */
+ break;
+
+ case TIOCGICOUNT:
+ dbg ("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,
+ port->number, edge_port->icount.rx, edge_port->icount.tx);
+ if (copy_to_user((void __user *)arg, &edge_port->icount, sizeof(edge_port->icount)))
+ return -EFAULT;
+ return 0;
+ }
+
+ return -ENOIOCTLCMD;
+}
+
+static void edge_break (struct usb_serial_port *port, int break_state)
+{
+ struct edgeport_port *edge_port = usb_get_serial_port_data(port);
+ int status;
+
+ dbg ("%s - state = %d", __FUNCTION__, break_state);
+
+ /* chase the port close */
+ TIChasePort (edge_port, 0, 0);
+
+ if (break_state == -1) {
+ status = TISetBreak (edge_port);
+ } else {
+ status = TIClearBreak (edge_port);
+ }
+ if (status) {
+ dbg ("%s - error %d sending break set/clear command.",
+ __FUNCTION__, status);
+ }
+}
+
+static int edge_startup (struct usb_serial *serial)
+{
+ struct edgeport_serial *edge_serial;
+ struct edgeport_port *edge_port;
+ struct usb_device *dev;
+ int status;
+ int i;
+
+ dev = serial->dev;
+
+ /* create our private serial structure */
+ edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
+ if (edge_serial == NULL) {
+ dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ memset (edge_serial, 0, sizeof(struct edgeport_serial));
+ sema_init(&edge_serial->es_sem, 1);
+ edge_serial->serial = serial;
+ usb_set_serial_data(serial, edge_serial);
+
+ status = TIDownloadFirmware (edge_serial);
+ if (status) {
+ kfree (edge_serial);
+ return status;
+ }
+
+ /* set up our port private structures */
+ for (i = 0; i < serial->num_ports; ++i) {
+ edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
+ if (edge_port == NULL) {
+ dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
+ goto cleanup;
+ }
+ memset (edge_port, 0, sizeof(struct edgeport_port));
+ spin_lock_init(&edge_port->ep_lock);
+ edge_port->ep_out_buf = edge_buf_alloc(EDGE_OUT_BUF_SIZE);
+ if (edge_port->ep_out_buf == NULL) {
+ dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
+ kfree(edge_port);
+ goto cleanup;
+ }
+ edge_port->port = serial->port[i];
+ edge_port->edge_serial = edge_serial;
+ usb_set_serial_port_data(serial->port[i], edge_port);
+ edge_port->bUartMode = 0; /* Default is RS232 */
+ }
+
+ return 0;
+
+cleanup:
+ for (--i; i>=0; --i) {
+ edge_port = usb_get_serial_port_data(serial->port[i]);
+ edge_buf_free(edge_port->ep_out_buf);
+ kfree(edge_port);
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+ kfree (edge_serial);
+ usb_set_serial_data(serial, NULL);
+ return -ENOMEM;
+}
+
+static void edge_shutdown (struct usb_serial *serial)
+{
+ int i;
+ struct edgeport_port *edge_port;
+
+ dbg ("%s", __FUNCTION__);
+
+ for (i=0; i < serial->num_ports; ++i) {
+ edge_port = usb_get_serial_port_data(serial->port[i]);
+ if (edge_port) {
+ edge_buf_free(edge_port->ep_out_buf);
+ kfree(edge_port);
+ }
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+ kfree (usb_get_serial_data(serial));
+ usb_set_serial_data(serial, NULL);
+}
+
+
+/* Circular Buffer */
+
+/*
+ * edge_buf_alloc
+ *
+ * Allocate a circular buffer and all associated memory.
+ */
+
+static struct edge_buf *edge_buf_alloc(unsigned int size)
+{
+ struct edge_buf *eb;
+
+
+ if (size == 0)
+ return NULL;
+
+ eb = (struct edge_buf *)kmalloc(sizeof(struct edge_buf), GFP_KERNEL);
+ if (eb == NULL)
+ return NULL;
+
+ eb->buf_buf = kmalloc(size, GFP_KERNEL);
+ if (eb->buf_buf == NULL) {
+ kfree(eb);
+ return NULL;
+ }
+
+ eb->buf_size = size;
+ eb->buf_get = eb->buf_put = eb->buf_buf;
+
+ return eb;
+}
+
+
+/*
+ * edge_buf_free
+ *
+ * Free the buffer and all associated memory.
+ */
+
+void edge_buf_free(struct edge_buf *eb)
+{
+ if (eb != NULL) {
+ if (eb->buf_buf != NULL)
+ kfree(eb->buf_buf);
+ kfree(eb);
+ }
+}
+
+
+/*
+ * edge_buf_clear
+ *
+ * Clear out all data in the circular buffer.
+ */
+
+static void edge_buf_clear(struct edge_buf *eb)
+{
+ if (eb != NULL)
+ eb->buf_get = eb->buf_put;
+ /* equivalent to a get of all data available */
+}
+
+
+/*
+ * edge_buf_data_avail
+ *
+ * Return the number of bytes of data available in the circular
+ * buffer.
+ */
+
+static unsigned int edge_buf_data_avail(struct edge_buf *eb)
+{
+ if (eb != NULL)
+ return ((eb->buf_size + eb->buf_put - eb->buf_get) % eb->buf_size);
+ else
+ return 0;
+}
+
+
+/*
+ * edge_buf_space_avail
+ *
+ * Return the number of bytes of space available in the circular
+ * buffer.
+ */
+
+static unsigned int edge_buf_space_avail(struct edge_buf *eb)
+{
+ if (eb != NULL)
+ return ((eb->buf_size + eb->buf_get - eb->buf_put - 1) % eb->buf_size);
+ else
+ return 0;
+}
+
+
+/*
+ * edge_buf_put
+ *
+ * Copy data data from a user buffer and put it into the circular buffer.
+ * Restrict to the amount of space available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static unsigned int edge_buf_put(struct edge_buf *eb, const char *buf,
+ unsigned int count)
+{
+ unsigned int len;
+
+
+ if (eb == NULL)
+ return 0;
+
+ len = edge_buf_space_avail(eb);
+ if (count > len)
+ count = len;
+
+ if (count == 0)
+ return 0;
+
+ len = eb->buf_buf + eb->buf_size - eb->buf_put;
+ if (count > len) {
+ memcpy(eb->buf_put, buf, len);
+ memcpy(eb->buf_buf, buf+len, count - len);
+ eb->buf_put = eb->buf_buf + count - len;
+ } else {
+ memcpy(eb->buf_put, buf, count);
+ if (count < len)
+ eb->buf_put += count;
+ else /* count == len */
+ eb->buf_put = eb->buf_buf;
+ }
+
+ return count;
+}
+
+
+/*
+ * edge_buf_get
+ *
+ * Get data from the circular buffer and copy to the given buffer.
+ * Restrict to the amount of data available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static unsigned int edge_buf_get(struct edge_buf *eb, char *buf,
+ unsigned int count)
+{
+ unsigned int len;
+
+
+ if (eb == NULL)
+ return 0;
+
+ len = edge_buf_data_avail(eb);
+ if (count > len)
+ count = len;
+
+ if (count == 0)
+ return 0;
+
+ len = eb->buf_buf + eb->buf_size - eb->buf_get;
+ if (count > len) {
+ memcpy(buf, eb->buf_get, len);
+ memcpy(buf+len, eb->buf_buf, count - len);
+ eb->buf_get = eb->buf_buf + count - len;
+ } else {
+ memcpy(buf, eb->buf_get, count);
+ if (count < len)
+ eb->buf_get += count;
+ else /* count == len */
+ eb->buf_get = eb->buf_buf;
+ }
+
+ return count;
+}
+
+
+static struct usb_serial_device_type edgeport_1port_device = {
+ .owner = THIS_MODULE,
+ .name = "Edgeport TI 1 port adapter",
+ .short_name = "edgeport_ti_1",
+ .id_table = edgeport_1port_id_table,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = edge_open,
+ .close = edge_close,
+ .throttle = edge_throttle,
+ .unthrottle = edge_unthrottle,
+ .attach = edge_startup,
+ .shutdown = edge_shutdown,
+ .ioctl = edge_ioctl,
+ .set_termios = edge_set_termios,
+ .tiocmget = edge_tiocmget,
+ .tiocmset = edge_tiocmset,
+ .write = edge_write,
+ .write_room = edge_write_room,
+ .chars_in_buffer = edge_chars_in_buffer,
+ .break_ctl = edge_break,
+ .read_int_callback = edge_interrupt_callback,
+ .read_bulk_callback = edge_bulk_in_callback,
+ .write_bulk_callback = edge_bulk_out_callback,
+};
+
+static struct usb_serial_device_type edgeport_2port_device = {
+ .owner = THIS_MODULE,
+ .name = "Edgeport TI 2 port adapter",
+ .short_name = "edgeport_ti_2",
+ .id_table = edgeport_2port_id_table,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 2,
+ .num_bulk_out = 2,
+ .num_ports = 2,
+ .open = edge_open,
+ .close = edge_close,
+ .throttle = edge_throttle,
+ .unthrottle = edge_unthrottle,
+ .attach = edge_startup,
+ .shutdown = edge_shutdown,
+ .ioctl = edge_ioctl,
+ .set_termios = edge_set_termios,
+ .tiocmget = edge_tiocmget,
+ .tiocmset = edge_tiocmset,
+ .write = edge_write,
+ .write_room = edge_write_room,
+ .chars_in_buffer = edge_chars_in_buffer,
+ .break_ctl = edge_break,
+ .read_int_callback = edge_interrupt_callback,
+ .read_bulk_callback = edge_bulk_in_callback,
+ .write_bulk_callback = edge_bulk_out_callback,
+};
+
+
+static int __init edgeport_init(void)
+{
+ int retval;
+ retval = usb_serial_register(&edgeport_1port_device);
+ if (retval)
+ goto failed_1port_device_register;
+ retval = usb_serial_register(&edgeport_2port_device);
+ if (retval)
+ goto failed_2port_device_register;
+ retval = usb_register(&io_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&edgeport_2port_device);
+failed_2port_device_register:
+ usb_serial_deregister(&edgeport_1port_device);
+failed_1port_device_register:
+ return retval;
+}
+
+static void __exit edgeport_exit (void)
+{
+ usb_deregister (&io_driver);
+ usb_serial_deregister (&edgeport_1port_device);
+ usb_serial_deregister (&edgeport_2port_device);
+}
+
+module_init(edgeport_init);
+module_exit(edgeport_exit);
+
+/* Module information */
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
+module_param(low_latency, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(low_latency, "Low latency enabled or not");
+
+module_param(closing_wait, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(closing_wait, "Maximum wait for data to drain, in .01 secs");
+
+module_param(ignore_cpu_rev, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(ignore_cpu_rev, "Ignore the cpu revision when connecting to a device");
+
diff --git a/drivers/usb/serial/io_ti.h b/drivers/usb/serial/io_ti.h
new file mode 100644
index 000000000000..cab84f2256b9
--- /dev/null
+++ b/drivers/usb/serial/io_ti.h
@@ -0,0 +1,180 @@
+/*****************************************************************************
+ *
+ * Copyright (C) 1997-2002 Inside Out Networks, Inc.
+ *
+ * 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.
+ *
+ *
+ * Feb-16-2001 DMI Added I2C structure definitions
+ * May-29-2002 gkh Ported to Linux
+ *
+ *
+ ******************************************************************************/
+
+#ifndef _IO_TI_H_
+#define _IO_TI_H_
+
+/* Address Space */
+#define DTK_ADDR_SPACE_XDATA 0x03 /* Addr is placed in XDATA space */
+#define DTK_ADDR_SPACE_I2C_TYPE_II 0x82 /* Addr is placed in I2C area */
+#define DTK_ADDR_SPACE_I2C_TYPE_III 0x83 /* Addr is placed in I2C area */
+
+// UART Defines
+#define UMPMEM_BASE_UART1 0xFFA0 /* UMP UART1 base address */
+#define UMPMEM_BASE_UART2 0xFFB0 /* UMP UART2 base address */
+#define UMPMEM_OFFS_UART_LSR 0x05 /* UMP UART LSR register offset */
+
+/* Bits per character */
+#define UMP_UART_CHAR5BITS 0x00
+#define UMP_UART_CHAR6BITS 0x01
+#define UMP_UART_CHAR7BITS 0x02
+#define UMP_UART_CHAR8BITS 0x03
+
+/* Parity */
+#define UMP_UART_NOPARITY 0x00
+#define UMP_UART_ODDPARITY 0x01
+#define UMP_UART_EVENPARITY 0x02
+#define UMP_UART_MARKPARITY 0x03
+#define UMP_UART_SPACEPARITY 0x04
+
+/* Stop bits */
+#define UMP_UART_STOPBIT1 0x00
+#define UMP_UART_STOPBIT15 0x01
+#define UMP_UART_STOPBIT2 0x02
+
+/* Line status register masks */
+#define UMP_UART_LSR_OV_MASK 0x01
+#define UMP_UART_LSR_PE_MASK 0x02
+#define UMP_UART_LSR_FE_MASK 0x04
+#define UMP_UART_LSR_BR_MASK 0x08
+#define UMP_UART_LSR_ER_MASK 0x0F
+#define UMP_UART_LSR_RX_MASK 0x10
+#define UMP_UART_LSR_TX_MASK 0x20
+
+#define UMP_UART_LSR_DATA_MASK ( LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK )
+
+/* Port Settings Constants) */
+#define UMP_MASK_UART_FLAGS_RTS_FLOW 0x0001
+#define UMP_MASK_UART_FLAGS_RTS_DISABLE 0x0002
+#define UMP_MASK_UART_FLAGS_PARITY 0x0008
+#define UMP_MASK_UART_FLAGS_OUT_X_DSR_FLOW 0x0010
+#define UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW 0x0020
+#define UMP_MASK_UART_FLAGS_OUT_X 0x0040
+#define UMP_MASK_UART_FLAGS_OUT_XA 0x0080
+#define UMP_MASK_UART_FLAGS_IN_X 0x0100
+#define UMP_MASK_UART_FLAGS_DTR_FLOW 0x0800
+#define UMP_MASK_UART_FLAGS_DTR_DISABLE 0x1000
+#define UMP_MASK_UART_FLAGS_RECEIVE_MS_INT 0x2000
+#define UMP_MASK_UART_FLAGS_AUTO_START_ON_ERR 0x4000
+
+#define UMP_DMA_MODE_CONTINOUS 0x01
+#define UMP_PIPE_TRANS_TIMEOUT_ENA 0x80
+#define UMP_PIPE_TRANSFER_MODE_MASK 0x03
+#define UMP_PIPE_TRANS_TIMEOUT_MASK 0x7C
+
+/* Purge port Direction Mask Bits */
+#define UMP_PORT_DIR_OUT 0x01
+#define UMP_PORT_DIR_IN 0x02
+
+// Address of Port 0
+#define UMPM_UART1_PORT 0x03
+
+// Commands
+#define UMPC_SET_CONFIG 0x05
+#define UMPC_OPEN_PORT 0x06
+#define UMPC_CLOSE_PORT 0x07
+#define UMPC_START_PORT 0x08
+#define UMPC_STOP_PORT 0x09
+#define UMPC_TEST_PORT 0x0A
+#define UMPC_PURGE_PORT 0x0B
+
+#define UMPC_COMPLETE_READ 0x80 // Force the Firmware to complete the current Read
+#define UMPC_HARDWARE_RESET 0x81 // Force UMP back into BOOT Mode
+#define UMPC_COPY_DNLD_TO_I2C 0x82 // Copy current download image to type 0xf2 record in 16k I2C
+ // firmware will change 0xff record to type 2 record when complete
+
+ // Special function register commands
+ // wIndex is register address
+ // wValue is MSB/LSB mask/data
+#define UMPC_WRITE_SFR 0x83 // Write SFR Register
+
+ // wIndex is register address
+#define UMPC_READ_SFR 0x84 // Read SRF Register
+
+ // Set or Clear DTR (wValue bit 0 Set/Clear) wIndex ModuleID (port)
+#define UMPC_SET_CLR_DTR 0x85
+
+ // Set or Clear RTS (wValue bit 0 Set/Clear) wIndex ModuleID (port)
+#define UMPC_SET_CLR_RTS 0x86
+
+ // Set or Clear LOOPBACK (wValue bit 0 Set/Clear) wIndex ModuleID (port)
+#define UMPC_SET_CLR_LOOPBACK 0x87
+
+ // Set or Clear BREAK (wValue bit 0 Set/Clear) wIndex ModuleID (port)
+#define UMPC_SET_CLR_BREAK 0x88
+
+ // Read MSR wIndex ModuleID (port)
+#define UMPC_READ_MSR 0x89
+
+ /* Toolkit commands */
+ /* Read-write group */
+#define UMPC_MEMORY_READ 0x92
+#define UMPC_MEMORY_WRITE 0x93
+
+/*
+ * UMP DMA Definitions
+ */
+#define UMPD_OEDB1_ADDRESS 0xFF08
+#define UMPD_OEDB2_ADDRESS 0xFF10
+
+struct out_endpoint_desc_block
+{
+ __u8 Configuration;
+ __u8 XBufAddr;
+ __u8 XByteCount;
+ __u8 Unused1;
+ __u8 Unused2;
+ __u8 YBufAddr;
+ __u8 YByteCount;
+ __u8 BufferSize;
+} __attribute__((packed));
+
+
+/*
+ * TYPE DEFINITIONS
+ * Structures for Firmware commands
+ */
+struct ump_uart_config /* UART settings */
+{
+ __u16 wBaudRate; /* Baud rate */
+ __u16 wFlags; /* Bitmap mask of flags */
+ __u8 bDataBits; /* 5..8 - data bits per character */
+ __u8 bParity; /* Parity settings */
+ __u8 bStopBits; /* Stop bits settings */
+ char cXon; /* XON character */
+ char cXoff; /* XOFF character */
+ __u8 bUartMode; /* Will be updated when a user */
+ /* interface is defined */
+} __attribute__((packed));
+
+
+/*
+ * TYPE DEFINITIONS
+ * Structures for USB interrupts
+ */
+struct ump_interrupt /* Interrupt packet structure */
+{
+ __u8 bICode; /* Interrupt code (interrupt num) */
+ __u8 bIInfo; /* Interrupt information */
+} __attribute__((packed));
+
+
+#define TIUMP_GET_PORT_FROM_CODE(c) (((c) >> 4) - 3)
+#define TIUMP_GET_FUNC_FROM_CODE(c) ((c) & 0x0f)
+#define TIUMP_INTERRUPT_CODE_LSR 0x03
+#define TIUMP_INTERRUPT_CODE_MSR 0x04
+
+#endif
diff --git a/drivers/usb/serial/io_usbvend.h b/drivers/usb/serial/io_usbvend.h
new file mode 100644
index 000000000000..8c1fa5e722b1
--- /dev/null
+++ b/drivers/usb/serial/io_usbvend.h
@@ -0,0 +1,687 @@
+/************************************************************************
+ *
+ * USBVEND.H Vendor-specific USB definitions
+ *
+ * NOTE: This must be kept in sync with the Edgeport firmware and
+ * must be kept backward-compatible with older firmware.
+ *
+ ************************************************************************
+ *
+ * Copyright (C) 1998 Inside Out Networks, Inc.
+ * 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.
+ *
+ ************************************************************************/
+
+#if !defined(_USBVEND_H)
+#define _USBVEND_H
+
+/************************************************************************
+ *
+ * D e f i n e s / T y p e d e f s
+ *
+ ************************************************************************/
+
+//
+// Definitions of USB product IDs
+//
+
+#define USB_VENDOR_ID_ION 0x1608 // Our VID
+#define USB_VENDOR_ID_TI 0x0451 // TI VID
+
+//
+// Definitions of USB product IDs (PID)
+// We break the USB-defined PID into an OEM Id field (upper 6 bits)
+// and a Device Id (bottom 10 bits). The Device Id defines what
+// device this actually is regardless of what the OEM wants to
+// call it.
+//
+
+// ION-device OEM IDs
+#define ION_OEM_ID_ION 0 // 00h Inside Out Networks
+#define ION_OEM_ID_NLYNX 1 // 01h NLynx Systems
+#define ION_OEM_ID_GENERIC 2 // 02h Generic OEM
+#define ION_OEM_ID_MAC 3 // 03h Mac Version
+#define ION_OEM_ID_MEGAWOLF 4 // 04h Lupusb OEM Mac version (MegaWolf)
+#define ION_OEM_ID_MULTITECH 5 // 05h Multitech Rapidports
+#define ION_OEM_ID_AGILENT 6 // 06h AGILENT board
+
+
+// ION-device Device IDs
+// Product IDs - assigned to match middle digit of serial number (No longer true)
+
+#define ION_DEVICE_ID_80251_NETCHIP 0x020 // This bit is set in the PID if this edgeport hardware$
+ // is based on the 80251+Netchip.
+
+#define ION_DEVICE_ID_GENERATION_1 0x00 // Value for 930 based edgeports
+#define ION_DEVICE_ID_GENERATION_2 0x01 // Value for 80251+Netchip.
+#define ION_DEVICE_ID_GENERATION_3 0x02 // Value for Texas Instruments TUSB5052 chip
+#define ION_DEVICE_ID_GENERATION_4 0x03 // Watchport Family of products
+#define ION_GENERATION_MASK 0x03
+
+#define ION_DEVICE_ID_HUB_MASK 0x0080 // This bit in the PID designates a HUB device
+ // for example 8C would be a 421 4 port hub
+ // and 8D would be a 2 port embedded hub
+
+#define EDGEPORT_DEVICE_ID_MASK 0x0ff // Not including OEM or GENERATION fields
+
+#define ION_DEVICE_ID_UNCONFIGURED_EDGE_DEVICE 0x000 // In manufacturing only
+#define ION_DEVICE_ID_EDGEPORT_4 0x001 // Edgeport/4 RS232
+#define ION_DEVICE_ID_EDGEPORT_8R 0x002 // Edgeport with RJ45 no Ring
+#define ION_DEVICE_ID_RAPIDPORT_4 0x003 // Rapidport/4
+#define ION_DEVICE_ID_EDGEPORT_4T 0x004 // Edgeport/4 RS232 for Telxon (aka "Fleetport")
+#define ION_DEVICE_ID_EDGEPORT_2 0x005 // Edgeport/2 RS232
+#define ION_DEVICE_ID_EDGEPORT_4I 0x006 // Edgeport/4 RS422
+#define ION_DEVICE_ID_EDGEPORT_2I 0x007 // Edgeport/2 RS422/RS485
+#define ION_DEVICE_ID_EDGEPORT_8RR 0x008 // Edgeport with RJ45 with Data and RTS/CTS only
+// ION_DEVICE_ID_EDGEPORT_8_HANDBUILT 0x009 // Hand-built Edgeport/8 (Placeholder, used in middle digit of serial number only!)
+// ION_DEVICE_ID_MULTIMODEM_4X56 0x00A // MultiTech version of RP/4 (Placeholder, used in middle digit of serial number only!)
+#define ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT 0x00B // Edgeport/(4)21 Parallel port (USS720)
+#define ION_DEVICE_ID_EDGEPORT_421 0x00C // Edgeport/421 Hub+RS232+Parallel
+#define ION_DEVICE_ID_EDGEPORT_21 0x00D // Edgeport/21 RS232+Parallel
+#define ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU 0x00E // Half of an Edgeport/8 (the kind with 2 EP/4s on 1 PCB)
+#define ION_DEVICE_ID_EDGEPORT_8 0x00F // Edgeport/8 (single-CPU)
+#define ION_DEVICE_ID_EDGEPORT_2_DIN 0x010 // Edgeport/2 RS232 with Apple DIN connector
+#define ION_DEVICE_ID_EDGEPORT_4_DIN 0x011 // Edgeport/4 RS232 with Apple DIN connector
+#define ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU 0x012 // Half of an Edgeport/16 (the kind with 2 EP/8s)
+#define ION_DEVICE_ID_EDGEPORT_COMPATIBLE 0x013 // Edgeport Compatible, for NCR, Axiohm etc. testing
+#define ION_DEVICE_ID_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU)
+#define ION_DEVICE_ID_EDGEPORT_1 0x015 // Edgeport/1 RS232
+#define ION_DEVICE_ID_EPOS44 0x016 // Half of an EPOS/44 (TIUMP BASED)
+#define ION_DEVICE_ID_EDGEPORT_42 0x017 // Edgeport/42
+#define ION_DEVICE_ID_EDGEPORT_412_8 0x018 // Edgeport/412 8 port part
+#define ION_DEVICE_ID_EDGEPORT_412_4 0x019 // Edgeport/412 4 port part
+#define ION_DEVICE_ID_EDGEPORT_22I 0x01A // Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232
+
+// Compact Form factor TI based devices 2c, 21c, 22c, 221c
+#define ION_DEVICE_ID_EDGEPORT_2C 0x01B // Edgeport/2c is a TI based Edgeport/2 - Small I2c
+#define ION_DEVICE_ID_EDGEPORT_221C 0x01C // Edgeport/221c is a TI based Edgeport/2 with lucent chip and
+ // 2 external hub ports - Large I2C
+#define ION_DEVICE_ID_EDGEPORT_22C 0x01D // Edgeport/22c is a TI based Edgeport/2 with
+ // 2 external hub ports - Large I2C
+#define ION_DEVICE_ID_EDGEPORT_21C 0x01E // Edgeport/21c is a TI based Edgeport/2 with lucent chip
+ // Small I2C
+
+
+/*
+ * DANGER DANGER The 0x20 bit was used to indicate a 8251/netchip GEN 2 device.
+ * Since the MAC, Linux, and Optimal drivers still used the old code
+ * I suggest that you skip the 0x20 bit when creating new PIDs
+ */
+
+
+// Generation 3 devices -- 3410 based edgport/1 (256 byte I2C)
+#define ION_DEVICE_ID_TI3410_EDGEPORT_1 0x040 // Edgeport/1 RS232
+#define ION_DEVICE_ID_TI3410_EDGEPORT_1I 0x041 // Edgeport/1i- RS422 model
+
+// Ti based software switchable RS232/RS422/RS485 devices
+#define ION_DEVICE_ID_EDGEPORT_4S 0x042 // Edgeport/4s - software switchable model
+#define ION_DEVICE_ID_EDGEPORT_8S 0x043 // Edgeport/8s - software switchable model
+
+// Usb to Ethernet dongle
+#define ION_DEVICE_ID_EDGEPORT_E 0x0E0 // Edgeport/E Usb to Ethernet
+
+// 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_8 0x020F // Edgeport/8 (single-CPU)
+#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_22I 0x021A // Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232
+#define ION_DEVICE_ID_TI_EDGEPORT_2C 0x021B // Edgeport/2c RS232
+#define ION_DEVICE_ID_TI_EDGEPORT_221C 0x021C // Edgeport/221c is a TI based Edgeport/2 with lucent chip and
+ // 2 external hub ports - Large I2C
+#define ION_DEVICE_ID_TI_EDGEPORT_22C 0x021D // Edgeport/22c is a TI based Edgeport/2 with
+ // 2 external hub ports - Large I2C
+#define ION_DEVICE_ID_TI_EDGEPORT_21C 0x021E // Edgeport/21c is a TI based Edgeport/2 with lucent chip
+
+// Generation 3 devices -- 3410 based edgport/1 (256 byte I2C)
+#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1 0x240 // Edgeport/1 RS232
+#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I 0x241 // Edgeport/1i- RS422 model
+
+// Ti based software switchable RS232/RS422/RS485 devices
+#define ION_DEVICE_ID_TI_EDGEPORT_4S 0x242 // Edgeport/4s - software switchable model
+#define ION_DEVICE_ID_IT_EDGEPORT_8S 0x243 // Edgeport/8s - software switchable model
+
+
+/************************************************************************
+ *
+ * Generation 4 devices
+ *
+ ************************************************************************/
+
+// Watchport based on 3410 both 1-wire and binary products (16K I2C)
+#define ION_DEVICE_ID_WP_UNSERIALIZED 0x300 // Watchport based on 3410 both 1-wire and binary products
+#define ION_DEVICE_ID_WP_PROXIMITY 0x301 // Watchport/P Discontinued
+#define ION_DEVICE_ID_WP_MOTION 0x302 // Watchport/M
+#define ION_DEVICE_ID_WP_MOISTURE 0x303 // Watchport/W
+#define ION_DEVICE_ID_WP_TEMPERATURE 0x304 // Watchport/T
+#define ION_DEVICE_ID_WP_HUMIDITY 0x305 // Watchport/H
+
+#define ION_DEVICE_ID_WP_POWER 0x306 // Watchport
+#define ION_DEVICE_ID_WP_LIGHT 0x307 // Watchport
+#define ION_DEVICE_ID_WP_RADIATION 0x308 // Watchport
+#define ION_DEVICE_ID_WP_ACCELERATION 0x309 // Watchport/A
+#define ION_DEVICE_ID_WP_DISTANCE 0x30A // Watchport/D Discontinued
+#define ION_DEVICE_ID_WP_PROX_DIST 0x30B // Watchport/D uses distance sensor
+ // Default to /P function
+
+#define ION_DEVICE_ID_PLUS_PWR_HP4CD 0x30C // 5052 Plus Power HubPort/4CD+ (for Dell)
+#define ION_DEVICE_ID_PLUS_PWR_HP4C 0x30D // 5052 Plus Power HubPort/4C+
+#define ION_DEVICE_ID_PLUS_PWR_PCI 0x30E // 3410 Plus Power PCI Host Controller 4 port
+
+
+//
+// Definitions for AXIOHM USB product IDs
+//
+#define USB_VENDOR_ID_AXIOHM 0x05D9 // Axiohm VID
+
+#define AXIOHM_DEVICE_ID_MASK 0xffff
+#define AXIOHM_DEVICE_ID_EPIC_A758 0xA758
+#define AXIOHM_DEVICE_ID_EPIC_A794 0xA794
+#define AXIOHM_DEVICE_ID_EPIC_A225 0xA225
+
+
+//
+// Definitions for NCR USB product IDs
+//
+#define USB_VENDOR_ID_NCR 0x0404 // NCR VID
+
+#define NCR_DEVICE_ID_MASK 0xffff
+#define NCR_DEVICE_ID_EPIC_0202 0x0202
+#define NCR_DEVICE_ID_EPIC_0203 0x0203
+#define NCR_DEVICE_ID_EPIC_0310 0x0310
+#define NCR_DEVICE_ID_EPIC_0311 0x0311
+#define NCR_DEVICE_ID_EPIC_0312 0x0312
+
+
+//
+// Definitions for SYMBOL USB product IDs
+//
+#define USB_VENDOR_ID_SYMBOL 0x05E0 // Symbol VID
+#define SYMBOL_DEVICE_ID_MASK 0xffff
+#define SYMBOL_DEVICE_ID_KEYFOB 0x0700
+
+
+//
+// Definitions for other product IDs
+#define ION_DEVICE_ID_MT4X56USB 0x1403 // OEM device
+
+
+#define GENERATION_ID_FROM_USB_PRODUCT_ID( ProductId ) \
+ ( (__u16) ((ProductId >> 8) & (ION_GENERATION_MASK)) )
+
+#define MAKE_USB_PRODUCT_ID( OemId, DeviceId ) \
+ ( (__u16) (((OemId) << 10) || (DeviceId)) )
+
+#define DEVICE_ID_FROM_USB_PRODUCT_ID( ProductId ) \
+ ( (__u16) ((ProductId) & (EDGEPORT_DEVICE_ID_MASK)) )
+
+#define OEM_ID_FROM_USB_PRODUCT_ID( ProductId ) \
+ ( (__u16) (((ProductId) >> 10) & 0x3F) )
+
+//
+// Definitions of parameters for download code. Note that these are
+// specific to a given version of download code and must change if the
+// corresponding download code changes.
+//
+
+// TxCredits value below which driver won't bother sending (to prevent too many small writes).
+// Send only if above 25%
+#define EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(InitialCredit, MaxPacketSize) (max( ((InitialCredit) / 4), (MaxPacketSize) ))
+
+#define EDGE_FW_BULK_MAX_PACKET_SIZE 64 // Max Packet Size for Bulk In Endpoint (EP1)
+#define EDGE_FW_BULK_READ_BUFFER_SIZE 1024 // Size to use for Bulk reads
+
+#define EDGE_FW_INT_MAX_PACKET_SIZE 32 // Max Packet Size for Interrupt In Endpoint
+ // Note that many units were shipped with MPS=16, we
+ // force an upgrade to this value).
+#define EDGE_FW_INT_INTERVAL 2 // 2ms polling on IntPipe
+
+
+//
+// Definitions of I/O Networks vendor-specific requests
+// for default endpoint
+//
+// bmRequestType = 01000000 Set vendor-specific, to device
+// bmRequestType = 11000000 Get vendor-specific, to device
+//
+// These are the definitions for the bRequest field for the
+// above bmRequestTypes.
+//
+// For the read/write Edgeport memory commands, the parameters
+// are as follows:
+// wValue = 16-bit address
+// wIndex = unused (though we could put segment 00: or FF: here)
+// wLength = # bytes to read/write (max 64)
+//
+
+#define USB_REQUEST_ION_RESET_DEVICE 0 // Warm reboot Edgeport, retaining USB address
+#define USB_REQUEST_ION_GET_EPIC_DESC 1 // Get Edgeport Compatibility Descriptor
+// unused 2 // Unused, available
+#define USB_REQUEST_ION_READ_RAM 3 // Read EdgePort RAM at specified addr
+#define USB_REQUEST_ION_WRITE_RAM 4 // Write EdgePort RAM at specified addr
+#define USB_REQUEST_ION_READ_ROM 5 // Read EdgePort ROM at specified addr
+#define USB_REQUEST_ION_WRITE_ROM 6 // Write EdgePort ROM at specified addr
+#define USB_REQUEST_ION_EXEC_DL_CODE 7 // Begin execution of RAM-based download
+ // code by jumping to address in wIndex:wValue
+// 8 // Unused, available
+#define USB_REQUEST_ION_ENABLE_SUSPEND 9 // Enable/Disable suspend feature
+ // (wValue != 0: Enable; wValue = 0: Disable)
+
+#define USB_REQUEST_ION_SEND_IOSP 10 // Send an IOSP command to the edgeport over the control pipe
+#define USB_REQUEST_ION_RECV_IOSP 11 // Receive an IOSP command from the edgeport over the control pipe
+
+
+#define USB_REQUEST_ION_DIS_INT_TIMER 0x80 // Sent to Axiohm to enable/ disable
+ // interrupt token timer
+ // wValue = 1, enable (default)
+ // wValue = 0, disable
+
+//
+// Define parameter values for our vendor-specific commands
+//
+
+//
+// Edgeport Compatiblity Descriptor
+//
+// This descriptor is only returned by Edgeport-compatible devices
+// supporting the EPiC spec. True ION devices do not return this
+// descriptor, but instead return STALL on receipt of the
+// GET_EPIC_DESC command. The driver interprets a STALL to mean that
+// this is a "real" Edgeport.
+//
+
+struct edge_compatibility_bits
+{
+ // This __u32 defines which Vendor-specific commands/functionality
+ // the device supports on the default EP0 pipe.
+
+ __u32 VendEnableSuspend : 1; // 0001 Set if device supports ION_ENABLE_SUSPEND
+ __u32 VendUnused : 31; // Available for future expansion, must be 0
+
+ // This __u32 defines which IOSP commands are supported over the
+ // bulk pipe EP1.
+
+ // xxxx Set if device supports:
+ __u32 IOSPOpen : 1; // 0001 OPEN / OPEN_RSP (Currently must be 1)
+ __u32 IOSPClose : 1; // 0002 CLOSE
+ __u32 IOSPChase : 1; // 0004 CHASE / CHASE_RSP
+ __u32 IOSPSetRxFlow : 1; // 0008 SET_RX_FLOW
+ __u32 IOSPSetTxFlow : 1; // 0010 SET_TX_FLOW
+ __u32 IOSPSetXChar : 1; // 0020 SET_XON_CHAR/SET_XOFF_CHAR
+ __u32 IOSPRxCheck : 1; // 0040 RX_CHECK_REQ/RX_CHECK_RSP
+ __u32 IOSPSetClrBreak : 1; // 0080 SET_BREAK/CLEAR_BREAK
+ __u32 IOSPWriteMCR : 1; // 0100 MCR register writes (set/clr DTR/RTS)
+ __u32 IOSPWriteLCR : 1; // 0200 LCR register writes (wordlen/stop/parity)
+ __u32 IOSPSetBaudRate : 1; // 0400 setting Baud rate (writes to LCR.80h and DLL/DLM register)
+ __u32 IOSPDisableIntPipe : 1; // 0800 Do not use the interrupt pipe for TxCredits or RxButesAvailable
+ __u32 IOSPRxDataAvail : 1; // 1000 Return status of RX Fifo (Data available in Fifo)
+ __u32 IOSPTxPurge : 1; // 2000 Purge TXBuffer and/or Fifo in Edgeport hardware
+ __u32 IOSPUnused : 18; // Available for future expansion, must be 0
+
+ // This __u32 defines which 'general' features are supported
+
+ __u32 TrueEdgeport : 1; // 0001 Set if device is a 'real' Edgeport
+ // (Used only by driver, NEVER set by an EPiC device)
+ __u32 GenUnused : 31; // Available for future expansion, must be 0
+
+};
+
+struct edge_compatibility_descriptor
+{
+ __u8 Length; // Descriptor Length (per USB spec)
+ __u8 DescType; // Descriptor Type (per USB spec, =DEVICE type)
+ __u8 EpicVer; // Version of EPiC spec supported
+ // (Currently must be 1)
+ __u8 NumPorts; // Number of serial ports supported
+ __u8 iDownloadFile; // Index of string containing download code filename
+ // 0=no download, FF=download compiled into driver.
+ __u8 Unused[ 3 ]; // Available for future expansion, must be 0
+ // (Currently must be 0).
+ __u8 MajorVersion; // Firmware version: xx.
+ __u8 MinorVersion; // yy.
+ __le16 BuildNumber; // zzzz (LE format)
+
+ // The following structure contains __u32s, with each bit
+ // specifying whether the EPiC device supports the given
+ // command or functionality.
+
+ struct edge_compatibility_bits Supports;
+
+};
+
+// Values for iDownloadFile
+#define EDGE_DOWNLOAD_FILE_NONE 0 // No download requested
+#define EDGE_DOWNLOAD_FILE_INTERNAL 0xFF // Download the file compiled into driver (930 version)
+#define EDGE_DOWNLOAD_FILE_I930 0xFF // Download the file compiled into driver (930 version)
+#define EDGE_DOWNLOAD_FILE_80251 0xFE // Download the file compiled into driver (80251 version)
+
+
+
+/*
+ * Special addresses for READ/WRITE_RAM/ROM
+ */
+
+// Version 1 (original) format of DeviceParams
+#define EDGE_MANUF_DESC_ADDR_V1 0x00FF7F00
+#define EDGE_MANUF_DESC_LEN_V1 sizeof(EDGE_MANUF_DESCRIPTOR_V1)
+
+// 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.
+#define MAX_SIZE_REQ_ION_READ_MEM ( (__u16) 64 )
+#define MAX_SIZE_REQ_ION_WRITE_MEM ( (__u16) 64 )
+
+
+//
+// Notes for the following two ION vendor-specific param descriptors:
+//
+// 1. These have a standard USB descriptor header so they look like a
+// normal descriptor.
+// 2. Any strings in the structures are in USB-defined string
+// 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.
+//
+
+// This structure is ver 2 format. It contains ALL USB descriptors as
+// well as the configuration parameters that were in the original V1
+// structure. It is NOT modified when new boot code is downloaded; rather,
+// these values are set or modified by manufacturing. It is located at
+// xC00-xFBF (length 3C0h) in the ROM.
+// This structure is a superset of the v1 structure and is arranged so
+// that all of the v1 fields remain at the same address. We are just
+// adding more room to the front of the structure to hold the descriptors.
+//
+// The actual contents of this structure are defined in a 930 assembly
+// file, converted to a binary image, and then written by the serialization
+// program. The C definition of this structure just defines a dummy
+// area for general USB descriptors and the descriptor tables (the root
+// descriptor starts at xC00). At the bottom of the structure are the
+// fields inherited from the v1 structure.
+
+#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)
+
+ // Start of v1-compatible section
+ __u8 Length; // F00 Desc length for what follows, per USB (= C0h )
+ __u8 DescType; // F01 Desc type, per USB (=DEVICE type)
+ __u8 DescVer; // F02 Desc version/format (currently 2)
+ __u8 NumRootDescEntries; // F03 # entries in RootDescTable
+
+ __u8 RomSize; // F04 Size of ROM/E2PROM in K
+ __u8 RamSize; // F05 Size of external RAM in K
+ __u8 CpuRev; // F06 CPU revision level (chg only if s/w visible)
+ __u8 BoardRev; // F07 PCB revision level (chg only if s/w visible)
+
+ __u8 NumPorts; // F08 Number of ports
+ __u8 DescDate[3]; // F09 MM/DD/YY when descriptor template was compiler,
+ // so host can track changes to USB-only descriptors.
+
+ __u8 SerNumLength; // F0C USB string descriptor len
+ __u8 SerNumDescType; // F0D USB descriptor type (=STRING type)
+ __le16 SerialNumber[MAX_SERIALNUMBER_LEN]; // F0E "01-01-000100" Unicode Serial Number
+
+ __u8 AssemblyNumLength; // F26 USB string descriptor len
+ __u8 AssemblyNumDescType; // F27 USB descriptor type (=STRING type)
+ __le16 AssemblyNumber[MAX_ASSEMBLYNUMBER_LEN]; // F28 "350-1000-01-A " assembly number
+
+ __u8 OemAssyNumLength; // F44 USB string descriptor len
+ __u8 OemAssyNumDescType; // F45 USB descriptor type (=STRING type)
+ __le16 OemAssyNumber[MAX_ASSEMBLYNUMBER_LEN]; // F46 "xxxxxxxxxxxxxx" OEM assembly number
+
+ __u8 ManufDateLength; // F62 USB string descriptor len
+ __u8 ManufDateDescType; // F63 USB descriptor type (=STRING type)
+ __le16 ManufDate[6]; // F64 "MMDDYY" manufacturing date
+
+ __u8 Reserved3[0x4D]; // F70 -- unused, set to 0 --
+
+ __u8 UartType; // FBD Uart Type
+ __u8 IonPid; // FBE Product ID, == LSB of USB DevDesc.PID
+ // (Note: Edgeport/4s before 11/98 will have
+ // 00 here instead of 01)
+ __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
+#define MANUF_DESC_VER_2 2 // Ver 2, starts at xC00h len 3C0h
+
+
+// Uart Types
+// Note: Since this field was added only recently, all Edgeport/4 units
+// shipped before 11/98 will have 00 in this field. Therefore,
+// both 00 and 01 values mean '654.
+#define MANUF_UART_EXAR_654_EARLY 0 // Exar 16C654 in Edgeport/4s before 11/98
+#define MANUF_UART_EXAR_654 1 // Exar 16C654
+#define MANUF_UART_EXAR_2852 2 // Exar 16C2852
+
+//
+// Note: The CpuRev and BoardRev values do not conform to manufacturing
+// revisions; they are to be incremented only when the CPU or hardware
+// changes in a software-visible way, such that the 930 software or
+// the host driver needs to handle the hardware differently.
+//
+
+// Values of bottom 5 bits of CpuRev & BoardRev for
+// Implementation 0 (ie, 930-based)
+#define MANUF_CPU_REV_AD4 1 // 930 AD4, with EP1 Rx bug (needs RXSPM)
+#define MANUF_CPU_REV_AD5 2 // 930 AD5, with above bug (supposedly) fixed
+#define MANUF_CPU_80251 0x20 // Intel 80251
+
+
+#define MANUF_BOARD_REV_A 1 // Original version, == Manuf Rev A
+#define MANUF_BOARD_REV_B 2 // Manuf Rev B, wakeup interrupt works
+#define MANUF_BOARD_REV_C 3 // Manuf Rev C, 2/4 ports, rs232/rs422
+#define MANUF_BOARD_REV_GENERATION_2 0x20 // Second generaiton edgeport
+
+
+// Values of bottom 5 bits of CpuRev & BoardRev for
+// Implementation 1 (ie, 251+Netchip-based)
+#define MANUF_CPU_REV_1 1 // C251TB Rev 1 (Need actual Intel rev here)
+
+#define MANUF_BOARD_REV_A 1 // First rev of 251+Netchip design
+
+#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_DIAG_NO_LOOP 0x20 // As below but no ext loopback test
+#define MANUF_ION_CONFIG_DIAG 0x40 // 930 based device: 1=Run h/w diags, 0=norm
+ // TIUMP Device : 1=IONSERIAL needs to run Final Test
+#define MANUF_ION_CONFIG_MASTER 0x80 // 930 based device: 1=Master mode, 0=Normal
+ // TIUMP Device : 1=First device on a multi TIUMP Device
+
+//
+// This structure describes parameters for the boot code, and
+// is programmed along with new boot code. These are values
+// which are specific to a given build of the boot code. It
+// is exactly 64 bytes long and is fixed at address FF:xFC0
+// - 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
+ __u8 Reserved1; // C3 -- unused, set to 0 --
+
+ __le16 BootCodeLength; // C4 Boot code goes from FF:0000 to FF:(len-1)
+ // (LE format)
+
+ __u8 MajorVersion; // C6 Firmware version: xx.
+ __u8 MinorVersion; // C7 yy.
+ __le16 BuildNumber; // C8 zzzz (LE format)
+
+ __u16 EnumRootDescTable; // CA Root of ROM-based descriptor table
+ __u8 NumDescTypes; // CC Number of supported descriptor types
+
+ __u8 Reserved4; // CD Fix Compiler Packing
+
+ __le16 Capabilities; // CE-CF Capabilities flags (LE format)
+ __u8 Reserved2[0x28]; // D0 -- unused, set to 0 --
+ __u8 UConfig0; // F8 930-defined CPU configuration byte 0
+ __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
+#define BOOT_DESC_VER_2 2 // 2nd definition, descriptors not included in boot
+
+
+ // Capabilities flags
+
+#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
+ ***********************************************************************/
+
+// Chip definitions in I2C
+#define UMP5152 0x52
+#define UMP3410 0x10
+
+
+//************************************************************************
+// TI I2C Format Definitions
+//************************************************************************
+#define I2C_DESC_TYPE_INFO_BASIC 0x01
+#define I2C_DESC_TYPE_FIRMWARE_BASIC 0x02
+#define I2C_DESC_TYPE_DEVICE 0x03
+#define I2C_DESC_TYPE_CONFIG 0x04
+#define I2C_DESC_TYPE_STRING 0x05
+#define I2C_DESC_TYPE_FIRMWARE_AUTO 0x07 // for 3410 download
+#define I2C_DESC_TYPE_CONFIG_KLUDGE 0x14 // for 3410
+#define I2C_DESC_TYPE_WATCHPORT_VERSION 0x15 // firmware version number for watchport
+#define I2C_DESC_TYPE_WATCHPORT_CALIBRATION_DATA 0x16 // Watchport Calibration Data
+
+#define I2C_DESC_TYPE_FIRMWARE_BLANK 0xf2
+
+// 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));
+
+// for 5152 devices only (type 2 record)
+// for 3410 the version is stored in the WATCHPORT_FIRMWARE_VERSION descriptor
+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));
+
+
+struct watchport_firmware_version
+{
+// Added 2 bytes for version number
+ __u8 Version_Major; // Download Version (for Watchport)
+ __u8 Version_Minor;
+}__attribute__((packed));
+
+
+// Structure of header of download image in fw_down.h
+struct ti_i2c_image_header
+{
+ __le16 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));
+
+
+// CPU / Board Rev Definitions
+#define TI_CPU_REV_5052 2 // 5052 based edgeports
+#define TI_CPU_REV_3410 3 // 3410 based edgeports
+
+#define TI_BOARD_REV_TI_EP 0 // Basic ti based edgeport
+#define TI_BOARD_REV_COMPACT 1 // Compact board
+#define TI_BOARD_REV_WATCHPORT 2 // Watchport
+
+
+#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 )
+
+#define TI_MANUF_VERSION_0 0
+
+// IonConig2 flags
+#define TI_CONFIG2_RS232 0x01
+#define TI_CONFIG2_RS422 0x02
+#define TI_CONFIG2_RS485 0x04
+#define TI_CONFIG2_SWITCHABLE 0x08
+
+#define TI_CONFIG2_WATCHPORT 0x10
+
+
+struct edge_ti_manuf_descriptor
+{
+ __u8 IonConfig; // Config byte for ION manufacturing use
+ __u8 IonConfig2; // Expansion
+ __u8 Version; // Version
+ __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; // Reserved
+}__attribute__((packed));
+
+
+#endif // if !defined(_USBVEND_H)
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
new file mode 100644
index 000000000000..3bd69c4ef24b
--- /dev/null
+++ b/drivers/usb/serial/ipaq.c
@@ -0,0 +1,973 @@
+/*
+ * USB Compaq iPAQ driver
+ *
+ * Copyright (C) 2001 - 2002
+ * Ganesh Varadarajan <ganesh@veritas.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.
+ *
+ * (12/12/2002) ganesh
+ * Added support for practically all devices supported by ActiveSync
+ * on Windows. Thanks to Wes Cilldhaire <billybobjoehenrybob@hotmail.com>.
+ *
+ * (26/11/2002) ganesh
+ * Added insmod options to specify product and vendor id.
+ * Use modprobe ipaq vendor=0xfoo product=0xbar
+ *
+ * (26/7/2002) ganesh
+ * Fixed up broken error handling in ipaq_open. Retry the "kickstart"
+ * packet much harder - this drastically reduces connection failures.
+ *
+ * (30/4/2002) ganesh
+ * Added support for the Casio EM500. Completely untested. Thanks
+ * to info from Nathan <wfilardo@fuse.net>
+ *
+ * (19/3/2002) ganesh
+ * Don't submit urbs while holding spinlocks. Not strictly necessary
+ * in 2.5.x.
+ *
+ * (8/3/2002) ganesh
+ * The ipaq sometimes emits a '\0' before the CLIENT string. At this
+ * point of time, the ppp ldisc is not yet attached to the tty, so
+ * n_tty echoes "^ " to the ipaq, which messes up the chat. In 2.5.6-pre2
+ * this causes a panic because echo_char() tries to sleep in interrupt
+ * context.
+ * The fix is to tell the upper layers that this is a raw device so that
+ * echoing is suppressed. Thanks to Lyle Lindholm for a detailed bug
+ * report.
+ *
+ * (25/2/2002) ganesh
+ * Added support for the HP Jornada 548 and 568. Completely untested.
+ * Thanks to info from Heath Robinson and Arieh Davidoff.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+#include "ipaq.h"
+
+#define KP_RETRIES 100
+
+/*
+ * Version Information
+ */
+
+#define DRIVER_VERSION "v0.5"
+#define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>"
+#define DRIVER_DESC "USB PocketPC PDA driver"
+
+static __u16 product, vendor;
+static int debug;
+
+/* Function prototypes for an ipaq */
+static int ipaq_open (struct usb_serial_port *port, struct file *filp);
+static void ipaq_close (struct usb_serial_port *port, struct file *filp);
+static int ipaq_startup (struct usb_serial *serial);
+static void ipaq_shutdown (struct usb_serial *serial);
+static int ipaq_write(struct usb_serial_port *port, const unsigned char *buf,
+ int count);
+static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *buf,
+ int count);
+static void ipaq_write_gather(struct usb_serial_port *port);
+static void ipaq_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void ipaq_write_bulk_callback(struct urb *urb, struct pt_regs *regs);
+static int ipaq_write_room(struct usb_serial_port *port);
+static int ipaq_chars_in_buffer(struct usb_serial_port *port);
+static void ipaq_destroy_lists(struct usb_serial_port *port);
+
+
+static struct usb_device_id ipaq_id_table [] = {
+ /* The first entry is a placeholder for the insmod-specified device */
+ { USB_DEVICE(0x049F, 0x0003) },
+ { USB_DEVICE(0x1690, 0x0601) }, /* Askey USB Sync */
+ { USB_DEVICE(0x0960, 0x0065) }, /* BCOM USB Sync 0065 */
+ { USB_DEVICE(0x0960, 0x0066) }, /* BCOM USB Sync 0066 */
+ { USB_DEVICE(0x0960, 0x0067) }, /* BCOM USB Sync 0067 */
+ { USB_DEVICE(0x07CF, 0x2001) }, /* CASIO USB Sync 2001 */
+ { USB_DEVICE(0x07CF, 0x2002) }, /* CASIO USB Sync 2002 */
+ { USB_DEVICE(0x07CF, 0x2003) }, /* CASIO USB Sync 2003 */
+ { USB_DEVICE(0x049F, 0x0003) }, /* Compaq iPAQ USB Sync */
+ { USB_DEVICE(0x049F, 0x0032) }, /* Compaq iPAQ USB Sync */
+ { USB_DEVICE(0x413C, 0x4001) }, /* Dell Axim USB Sync */
+ { USB_DEVICE(0x413C, 0x4002) }, /* Dell Axim USB Sync */
+ { USB_DEVICE(0x413C, 0x4003) }, /* Dell Axim USB Sync */
+ { USB_DEVICE(0x413C, 0x4004) }, /* Dell Axim USB Sync */
+ { USB_DEVICE(0x413C, 0x4005) }, /* Dell Axim USB Sync */
+ { USB_DEVICE(0x413C, 0x4006) }, /* Dell Axim USB Sync */
+ { USB_DEVICE(0x413C, 0x4007) }, /* Dell Axim USB Sync */
+ { USB_DEVICE(0x413C, 0x4008) }, /* Dell Axim USB Sync */
+ { USB_DEVICE(0x413C, 0x4009) }, /* Dell Axim USB Sync */
+ { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */
+ { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */
+ { USB_DEVICE(0x03F0, 0x1216) }, /* HP USB Sync 1612 */
+ { USB_DEVICE(0x03F0, 0x2016) }, /* HP USB Sync 1620 */
+ { USB_DEVICE(0x03F0, 0x2116) }, /* HP USB Sync 1621 */
+ { USB_DEVICE(0x03F0, 0x2216) }, /* HP USB Sync 1622 */
+ { USB_DEVICE(0x03F0, 0x3016) }, /* HP USB Sync 1630 */
+ { USB_DEVICE(0x03F0, 0x3116) }, /* HP USB Sync 1631 */
+ { USB_DEVICE(0x03F0, 0x3216) }, /* HP USB Sync 1632 */
+ { USB_DEVICE(0x03F0, 0x4016) }, /* HP USB Sync 1640 */
+ { USB_DEVICE(0x03F0, 0x4116) }, /* HP USB Sync 1641 */
+ { USB_DEVICE(0x03F0, 0x4216) }, /* HP USB Sync 1642 */
+ { USB_DEVICE(0x03F0, 0x5016) }, /* HP USB Sync 1650 */
+ { USB_DEVICE(0x03F0, 0x5116) }, /* HP USB Sync 1651 */
+ { USB_DEVICE(0x03F0, 0x5216) }, /* HP USB Sync 1652 */
+ { USB_DEVICE(0x094B, 0x0001) }, /* Linkup Systems USB Sync */
+ { USB_DEVICE(0x045E, 0x0400) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0401) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0402) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0403) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0404) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0405) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0406) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0407) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0408) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0409) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x040A) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x040B) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x040C) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x040D) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x040E) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x040F) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0410) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0411) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0412) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0413) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0414) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0415) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0416) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0417) }, /* Windows Powered Pocket PC 2002 */
+ { USB_DEVICE(0x045E, 0x0432) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0433) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0434) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0435) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0436) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0437) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0438) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0439) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x043A) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x043B) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x043C) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x043D) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x043E) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x043F) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0440) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0441) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0442) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0443) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0444) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0445) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0446) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0447) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0448) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0449) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x044A) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x044B) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x044C) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x044D) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x044E) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x044F) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0450) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0451) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0452) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0453) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0454) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0455) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0456) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0457) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0458) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0459) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x045A) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x045B) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x045C) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x045D) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x045E) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x045F) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0460) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0461) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0462) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0463) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0464) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0465) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0466) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0467) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0468) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0469) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x046A) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x046B) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x046C) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x046D) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x046E) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x046F) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0470) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0471) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0472) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0473) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0474) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0475) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0476) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0477) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0478) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x0479) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x047A) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x047B) }, /* Windows Powered Pocket PC 2003 */
+ { USB_DEVICE(0x045E, 0x04C8) }, /* Windows Powered Smartphone 2002 */
+ { USB_DEVICE(0x045E, 0x04C9) }, /* Windows Powered Smartphone 2002 */
+ { USB_DEVICE(0x045E, 0x04CA) }, /* Windows Powered Smartphone 2002 */
+ { USB_DEVICE(0x045E, 0x04CB) }, /* Windows Powered Smartphone 2002 */
+ { USB_DEVICE(0x045E, 0x04CC) }, /* Windows Powered Smartphone 2002 */
+ { USB_DEVICE(0x045E, 0x04CD) }, /* Windows Powered Smartphone 2002 */
+ { USB_DEVICE(0x045E, 0x04CE) }, /* Windows Powered Smartphone 2002 */
+ { USB_DEVICE(0x045E, 0x04D7) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04D8) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04D9) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04DA) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04DB) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04DC) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04DD) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04DE) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04DF) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E0) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E1) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E2) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E3) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E4) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E5) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E6) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E7) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E8) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04E9) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x045E, 0x04EA) }, /* Windows Powered Smartphone 2003 */
+ { USB_DEVICE(0x0961, 0x0010) }, /* Portatec USB Sync */
+ { USB_DEVICE(0x5E04, 0xCE00) }, /* SAGEM Wireless Assistant */
+ { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */
+ { USB_DEVICE(0x0930, 0x0700) }, /* TOSHIBA USB Sync 0700 */
+ { USB_DEVICE(0x0930, 0x0705) }, /* TOSHIBA Pocket PC e310 */
+ { USB_DEVICE(0x0930, 0x0707) }, /* TOSHIBA Pocket PC e330 Series */
+ { USB_DEVICE(0x0930, 0x0708) }, /* TOSHIBA Pocket PC e350 Series */
+ { USB_DEVICE(0x0930, 0x0706) }, /* TOSHIBA Pocket PC e740 */
+ { USB_DEVICE(0x0930, 0x0709) }, /* TOSHIBA Pocket PC e750 Series */
+ { USB_DEVICE(0x0930, 0x070A) }, /* TOSHIBA Pocket PC e400 Series */
+ { USB_DEVICE(0x0930, 0x070B) }, /* TOSHIBA Pocket PC e800 Series */
+ { USB_DEVICE(0x0BB4, 0x00CE) }, /* HTC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A01) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A02) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A03) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A04) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A05) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A06) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A07) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A08) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A09) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A0A) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A0B) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A0C) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A0D) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A0E) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A0F) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A10) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A11) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A12) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A13) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A14) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A15) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A16) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A17) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A18) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A19) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A1A) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A1B) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A1C) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A1D) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A1E) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A1F) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A20) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A21) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A22) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A23) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A24) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A25) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A26) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A27) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A28) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A29) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A2A) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A2B) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A2C) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A2D) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A2E) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A2F) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A30) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A31) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A32) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A33) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A34) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A35) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A36) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A37) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A38) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A39) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A3A) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A3B) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A3C) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A3D) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A3E) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A3F) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A40) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A41) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A42) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A43) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A44) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A45) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A46) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A47) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A48) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A49) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A4A) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A4B) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A4C) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A4D) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A4E) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A4F) }, /* PocketPC USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A50) }, /* HTC SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A51) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A52) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A53) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A54) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A55) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A56) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A57) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A58) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A59) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A5A) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A5B) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A5C) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A5D) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A5E) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A5F) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A60) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A61) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A62) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A63) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A64) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A65) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A66) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A67) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A68) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A69) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A6A) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A6B) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A6C) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A6D) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A6E) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A6F) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A70) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A71) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A72) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A73) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A74) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A75) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A76) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A77) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A78) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A79) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A7A) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A7B) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A7C) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A7D) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A7E) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A7F) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A80) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A81) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A82) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A83) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A84) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A85) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A86) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A87) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A88) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A89) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A8A) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A8B) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A8C) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A8D) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A8E) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A8F) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A90) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A91) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A92) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A93) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A94) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A95) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A96) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A97) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A98) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A99) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A9A) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A9B) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A9C) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A9D) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A9E) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0BB4, 0x0A9F) }, /* SmartPhone USB Sync */
+ { USB_DEVICE(0x0409, 0x00D5) }, /* NEC USB Sync */
+ { USB_DEVICE(0x0409, 0x00D6) }, /* NEC USB Sync */
+ { USB_DEVICE(0x0409, 0x00D7) }, /* NEC USB Sync */
+ { USB_DEVICE(0x0409, 0x8024) }, /* NEC USB Sync */
+ { USB_DEVICE(0x0409, 0x8025) }, /* NEC USB Sync */
+ { USB_DEVICE(0x04A4, 0x0014) }, /* Hitachi USB Sync */
+ { USB_DEVICE(0x0BF8, 0x1001) }, /* Fujitsu Siemens Computers USB Sync */
+ { USB_DEVICE(0x0F98, 0x0201) }, /* Cyberbank USB Sync */
+ { USB_DEVICE(0x0502, 0x16E1) }, /* Acer n10 Handheld USB Sync */
+ { USB_DEVICE(0x0502, 0x16E3) }, /* Acer n30 Handheld USB Sync */
+ { USB_DEVICE(0x0502, 0x16E2) }, /* Acer n20 Handheld USB Sync */
+ { USB_DEVICE(0x0502, 0x1631) }, /* c10 Series */
+ { USB_DEVICE(0x0502, 0x1632) }, /* c20 Series */
+ { USB_DEVICE(0x0B05, 0x9202) }, /* ASUS USB Sync */
+ { USB_DEVICE(0x0B05, 0x420F) }, /* ASUS USB Sync */
+ { USB_DEVICE(0x0B05, 0x4200) }, /* ASUS USB Sync */
+ { USB_DEVICE(0x0B05, 0x4201) }, /* ASUS USB Sync */
+ { USB_DEVICE(0x0B05, 0x4202) }, /* ASUS USB Sync */
+ { USB_DEVICE(0x0B05, 0x9200) }, /* ASUS USB Sync */
+ { USB_DEVICE(0x0C8E, 0x6000) }, /* Cesscom Luxian Series */
+ { USB_DEVICE(0x04AD, 0x0301) }, /* USB Sync 0301 */
+ { USB_DEVICE(0x04AD, 0x0302) }, /* USB Sync 0302 */
+ { USB_DEVICE(0x04AD, 0x0303) }, /* USB Sync 0303 */
+ { USB_DEVICE(0x1066, 0x0300) }, /* E-TEN P3XX Pocket PC */
+ { USB_DEVICE(0x1066, 0x0500) }, /* E-TEN P5XX Pocket PC */
+ { USB_DEVICE(0x1066, 0x0600) }, /* E-TEN P6XX Pocket PC */
+ { USB_DEVICE(0x1066, 0x0700) }, /* E-TEN P7XX Pocket PC */
+ { USB_DEVICE(0x1066, 0x00CE) }, /* E-TEN USB Sync */
+ { USB_DEVICE(0x0F4E, 0x0200) }, /* Freedom Scientific USB Sync */
+ { USB_DEVICE(0x04C5, 0x1058) }, /* FUJITSU USB Sync */
+ { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */
+ { USB_DEVICE(0x067E, 0x1001) }, /* Intermec Mobile Computer */
+ { USB_DEVICE(0x04f1, 0x3011) }, /* JVC USB Sync */
+ { USB_DEVICE(0x04F1, 0x3012) }, /* JVC USB Sync */
+ { USB_DEVICE(0x3708, 0x20CE) }, /* Legend USB Sync */
+ { USB_DEVICE(0x3708, 0x21CE) }, /* Lenovo USB Sync */
+ { USB_DEVICE(0x043E, 0x9C01) }, /* LGE USB Sync */
+ { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */
+ { USB_DEVICE(0x3340, 0x0B1C) }, /* Generic PPC StrongARM */
+ { USB_DEVICE(0x3340, 0x0E3A) }, /* Generic PPC USB Sync */
+ { USB_DEVICE(0x3340, 0x0F3A) }, /* Generic SmartPhone USB Sync */
+ { USB_DEVICE(0x3340, 0x0F1C) }, /* Itautec USB Sync */
+ { USB_DEVICE(0x3340, 0x1326) }, /* Itautec USB Sync */
+ { USB_DEVICE(0x3340, 0x3326) }, /* MEDION Winodws Moble USB Sync */
+ { USB_DEVICE(0x3340, 0x0326) }, /* Mio DigiWalker 338 */
+ { USB_DEVICE(0x3340, 0x0426) }, /* Mio DigiWalker 338 */
+ { USB_DEVICE(0x3340, 0x011C) }, /* Mio DigiWalker PPC StrongARM */
+ { USB_DEVICE(0x3340, 0x053A) }, /* Mio DigiWalker SmartPhone USB Sync */
+ { USB_DEVICE(0x3340, 0x043A) }, /* Mio DigiWalker USB Sync */
+ { USB_DEVICE(0x3340, 0x071C) }, /* MiTAC USB Sync */
+ { USB_DEVICE(0x3340, 0x051C) }, /* MiTAC USB Sync 528 */
+ { USB_DEVICE(0x3340, 0x2326) }, /* Vobis USB Sync */
+ { USB_DEVICE(0x3340, 0x191C) }, /* YAKUMO USB Sync */
+ { USB_DEVICE(0x4113, 0x0210) }, /* Mobile Media Technology USB Sync */
+ { USB_DEVICE(0x4113, 0x0211) }, /* Mobile Media Technology USB Sync */
+ { USB_DEVICE(0x4113, 0x0400) }, /* Mobile Media Technology USB Sync */
+ { USB_DEVICE(0x4113, 0x0410) }, /* Mobile Media Technology USB Sync */
+ { USB_DEVICE(0x0CAD, 0x9001) }, /* Motorola PowerPad Pocket PC Device */
+ { USB_DEVICE(0x0C44, 0x03A2) }, /* Motorola iDEN Smartphone */
+ { USB_DEVICE(0x04E8, 0x6611) }, /* Samsung MITs USB Sync */
+ { USB_DEVICE(0x04E8, 0x6613) }, /* Samsung MITs USB Sync */
+ { USB_DEVICE(0x04E8, 0x6615) }, /* Samsung MITs USB Sync */
+ { USB_DEVICE(0x04E8, 0x6617) }, /* Samsung MITs USB Sync */
+ { USB_DEVICE(0x04E8, 0x6619) }, /* Samsung MITs USB Sync */
+ { USB_DEVICE(0x04E8, 0x661B) }, /* Samsung MITs USB Sync */
+ { USB_DEVICE(0x04E8, 0x5F00) }, /* Samsung NEXiO USB Sync */
+ { USB_DEVICE(0x04E8, 0x5F01) }, /* Samsung NEXiO USB Sync */
+ { USB_DEVICE(0x04E8, 0x5F02) }, /* Samsung NEXiO USB Sync */
+ { USB_DEVICE(0x04E8, 0x5F03) }, /* Samsung NEXiO USB Sync */
+ { USB_DEVICE(0x04E8, 0x5F04) }, /* Samsung NEXiO USB Sync */
+ { USB_DEVICE(0x04E8, 0x662E) }, /* Samsung MITs USB Sync */
+ { USB_DEVICE(0x04E8, 0x6630) }, /* Samsung MITs USB Sync */
+ { USB_DEVICE(0x04E8, 0x6632) }, /* Samsung MITs USB Sync */
+ { USB_DEVICE(0x4505, 0x0010) }, /* Smartphone */
+ { USB_DEVICE(0x05E0, 0x2000) }, /* Symbol USB Sync */
+ { USB_DEVICE(0x05E0, 0x2001) }, /* Symbol USB Sync 0x2001 */
+ { USB_DEVICE(0x05E0, 0x2002) }, /* Symbol USB Sync 0x2002 */
+ { USB_DEVICE(0x05E0, 0x2003) }, /* Symbol USB Sync 0x2003 */
+ { USB_DEVICE(0x05E0, 0x2004) }, /* Symbol USB Sync 0x2004 */
+ { USB_DEVICE(0x05E0, 0x2005) }, /* Symbol USB Sync 0x2005 */
+ { USB_DEVICE(0x05E0, 0x2006) }, /* Symbol USB Sync 0x2006 */
+ { USB_DEVICE(0x05E0, 0x2007) }, /* Symbol USB Sync 0x2007 */
+ { USB_DEVICE(0x05E0, 0x2008) }, /* Symbol USB Sync 0x2008 */
+ { USB_DEVICE(0x05E0, 0x2009) }, /* Symbol USB Sync 0x2009 */
+ { USB_DEVICE(0x05E0, 0x200A) }, /* Symbol USB Sync 0x200A */
+ { USB_DEVICE(0x1182, 0x1388) }, /* VES USB Sync */
+ { USB_DEVICE(0x0543, 0x0ED9) }, /* ViewSonic Color Pocket PC V35 */
+ { USB_DEVICE(0x0543, 0x1527) }, /* ViewSonic Color Pocket PC V36 */
+ { USB_DEVICE(0x0543, 0x1529) }, /* ViewSonic Color Pocket PC V37 */
+ { USB_DEVICE(0x0543, 0x152B) }, /* ViewSonic Color Pocket PC V38 */
+ { USB_DEVICE(0x0543, 0x152E) }, /* ViewSonic Pocket PC */
+ { USB_DEVICE(0x0543, 0x1921) }, /* ViewSonic Communicator Pocket PC */
+ { USB_DEVICE(0x0543, 0x1922) }, /* ViewSonic Smartphone */
+ { USB_DEVICE(0x0543, 0x1923) }, /* ViewSonic Pocket PC V30 */
+ { USB_DEVICE(0x0536, 0x01A0) }, /* HHP PDT */
+ { USB_DEVICE(0x099E, 0x0052) }, /* Trimble GeoExplorer */
+ { USB_DEVICE(0x099E, 0x4000) }, /* TDS Data Collector */
+ { USB_DEVICE(0x0FB8, 0x3001) }, /* Wistron USB Sync */
+ { USB_DEVICE(0x0FB8, 0x3002) }, /* Wistron USB Sync */
+ { USB_DEVICE(0x0FB8, 0x3003) }, /* Wistron USB Sync */
+ { USB_DEVICE(0x0FB8, 0x4001) }, /* Wistron USB Sync */
+ { USB_DEVICE(0x11D9, 0x1003) }, /* Rugged Pocket PC 2003 */
+ { USB_DEVICE(0x11D9, 0x1002) }, /* Rugged Pocket PC 2003 */
+ { USB_DEVICE(0x22B8, 0x4204) }, /* Motorola MPx200 Smartphone */
+ { USB_DEVICE(0x22B8, 0x4214) }, /* Motorola MPc GSM */
+ { USB_DEVICE(0x22B8, 0x4224) }, /* Motorola MPx220 Smartphone */
+ { USB_DEVICE(0x22B8, 0x4234) }, /* Motorola MPc CDMA */
+ { USB_DEVICE(0x22B8, 0x4244) }, /* Motorola MPx100 Smartphone */
+ { USB_DEVICE(0x1231, 0xCE01) }, /* USB Sync 03 */
+ { USB_DEVICE(0x1231, 0xCE02) }, /* USB Sync 03 */
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, ipaq_id_table);
+
+static struct usb_driver ipaq_driver = {
+ .owner = THIS_MODULE,
+ .name = "ipaq",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = ipaq_id_table,
+};
+
+
+/* All of the device info needed for the Compaq iPAQ */
+static struct usb_serial_device_type ipaq_device = {
+ .owner = THIS_MODULE,
+ .name = "PocketPC PDA",
+ .id_table = ipaq_id_table,
+ .num_interrupt_in = NUM_DONT_CARE,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = ipaq_open,
+ .close = ipaq_close,
+ .attach = ipaq_startup,
+ .shutdown = ipaq_shutdown,
+ .write = ipaq_write,
+ .write_room = ipaq_write_room,
+ .chars_in_buffer = ipaq_chars_in_buffer,
+ .read_bulk_callback = ipaq_read_bulk_callback,
+ .write_bulk_callback = ipaq_write_bulk_callback,
+};
+
+static spinlock_t write_list_lock;
+static int bytes_in;
+static int bytes_out;
+
+static int ipaq_open(struct usb_serial_port *port, struct file *filp)
+{
+ struct usb_serial *serial = port->serial;
+ struct ipaq_private *priv;
+ struct ipaq_packet *pkt;
+ int i, result = 0;
+ int retries = KP_RETRIES;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ bytes_in = 0;
+ bytes_out = 0;
+ priv = (struct ipaq_private *)kmalloc(sizeof(struct ipaq_private), GFP_KERNEL);
+ if (priv == NULL) {
+ err("%s - Out of memory", __FUNCTION__);
+ return -ENOMEM;
+ }
+ usb_set_serial_port_data(port, priv);
+ priv->active = 0;
+ priv->queue_len = 0;
+ priv->free_len = 0;
+ INIT_LIST_HEAD(&priv->queue);
+ INIT_LIST_HEAD(&priv->freelist);
+
+ for (i = 0; i < URBDATA_QUEUE_MAX / PACKET_SIZE; i++) {
+ pkt = kmalloc(sizeof(struct ipaq_packet), GFP_KERNEL);
+ if (pkt == NULL) {
+ goto enomem;
+ }
+ pkt->data = kmalloc(PACKET_SIZE, GFP_KERNEL);
+ if (pkt->data == NULL) {
+ kfree(pkt);
+ goto enomem;
+ }
+ pkt->len = 0;
+ pkt->written = 0;
+ INIT_LIST_HEAD(&pkt->list);
+ list_add(&pkt->list, &priv->freelist);
+ priv->free_len += PACKET_SIZE;
+ }
+
+ /*
+ * Force low latency on. This will immediately push data to the line
+ * discipline instead of queueing.
+ */
+
+ port->tty->low_latency = 1;
+ port->tty->raw = 1;
+ port->tty->real_raw = 1;
+
+ /*
+ * Lose the small buffers usbserial provides. Make larger ones.
+ */
+
+ kfree(port->bulk_in_buffer);
+ kfree(port->bulk_out_buffer);
+ port->bulk_in_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
+ if (port->bulk_in_buffer == NULL) {
+ goto enomem;
+ }
+ port->bulk_out_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
+ if (port->bulk_out_buffer == NULL) {
+ kfree(port->bulk_in_buffer);
+ goto enomem;
+ }
+ port->read_urb->transfer_buffer = port->bulk_in_buffer;
+ port->write_urb->transfer_buffer = port->bulk_out_buffer;
+ port->read_urb->transfer_buffer_length = URBDATA_SIZE;
+ port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_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,
+ ipaq_read_bulk_callback, port);
+ result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ if (result) {
+ err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
+ goto error;
+ }
+
+ /*
+ * Send out control message observed in win98 sniffs. Not sure what
+ * it does, but from empirical observations, it seems that the device
+ * will start the chat sequence once one of these messages gets
+ * through. Since this has a reasonably high failure rate, we retry
+ * several times.
+ */
+
+ while (retries--) {
+ result = usb_control_msg(serial->dev,
+ usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
+ 0x1, 0, NULL, 0, 100);
+ if (result == 0) {
+ return 0;
+ }
+ }
+ err("%s - failed doing control urb, error %d", __FUNCTION__, result);
+ goto error;
+
+enomem:
+ result = -ENOMEM;
+ err("%s - Out of memory", __FUNCTION__);
+error:
+ ipaq_destroy_lists(port);
+ kfree(priv);
+ return result;
+}
+
+
+static void ipaq_close(struct usb_serial_port *port, struct file *filp)
+{
+ struct ipaq_private *priv = usb_get_serial_port_data(port);
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /*
+ * shut down bulk read and write
+ */
+ usb_kill_urb(port->write_urb);
+ usb_kill_urb(port->read_urb);
+ ipaq_destroy_lists(port);
+ kfree(priv);
+ usb_set_serial_port_data(port, NULL);
+
+ /* 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); */
+}
+
+static void ipaq_read_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+ int i, result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __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) {
+ tty_flip_buffer_push(tty);
+ }
+ /* this doesn't actually push the data through unless tty->low_latency is set */
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ bytes_in += urb->actual_length;
+ }
+
+ /* Continue trying to always read */
+ usb_fill_bulk_urb(port->read_urb, port->serial->dev,
+ usb_rcvbulkpipe(port->serial->dev, port->bulk_in_endpointAddress),
+ port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
+ ipaq_read_bulk_callback, port);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+ if (result)
+ err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+ return;
+}
+
+static int ipaq_write(struct usb_serial_port *port, const unsigned char *buf,
+ int count)
+{
+ const unsigned char *current_position = buf;
+ int bytes_sent = 0;
+ int transfer_size;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ while (count > 0) {
+ transfer_size = min(count, PACKET_SIZE);
+ if (ipaq_write_bulk(port, current_position, transfer_size)) {
+ break;
+ }
+ current_position += transfer_size;
+ bytes_sent += transfer_size;
+ count -= transfer_size;
+ bytes_out += transfer_size;
+ }
+
+ return bytes_sent;
+}
+
+static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *buf,
+ int count)
+{
+ struct ipaq_private *priv = usb_get_serial_port_data(port);
+ struct ipaq_packet *pkt = NULL;
+ int result = 0;
+ unsigned long flags;
+
+ if (priv->free_len <= 0) {
+ dbg("%s - we're stuffed", __FUNCTION__);
+ return -EAGAIN;
+ }
+
+ spin_lock_irqsave(&write_list_lock, flags);
+ if (!list_empty(&priv->freelist)) {
+ pkt = list_entry(priv->freelist.next, struct ipaq_packet, list);
+ list_del(&pkt->list);
+ priv->free_len -= PACKET_SIZE;
+ }
+ spin_unlock_irqrestore(&write_list_lock, flags);
+ if (pkt == NULL) {
+ dbg("%s - we're stuffed", __FUNCTION__);
+ return -EAGAIN;
+ }
+
+ memcpy(pkt->data, buf, count);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, pkt->data);
+
+ pkt->len = count;
+ pkt->written = 0;
+ spin_lock_irqsave(&write_list_lock, flags);
+ list_add_tail(&pkt->list, &priv->queue);
+ priv->queue_len += count;
+ if (priv->active == 0) {
+ priv->active = 1;
+ ipaq_write_gather(port);
+ spin_unlock_irqrestore(&write_list_lock, flags);
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+ if (result) {
+ err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+ }
+ } else {
+ spin_unlock_irqrestore(&write_list_lock, flags);
+ }
+ return result;
+}
+
+static void ipaq_write_gather(struct usb_serial_port *port)
+{
+ struct ipaq_private *priv = usb_get_serial_port_data(port);
+ struct usb_serial *serial = port->serial;
+ int count, room;
+ struct ipaq_packet *pkt, *tmp;
+ struct urb *urb = port->write_urb;
+
+ if (urb->status == -EINPROGRESS) {
+ /* Should never happen */
+ err("%s - flushing while urb is active !", __FUNCTION__);
+ return;
+ }
+ room = URBDATA_SIZE;
+ list_for_each_entry_safe(pkt, tmp, &priv->queue, list) {
+ count = min(room, (int)(pkt->len - pkt->written));
+ memcpy(urb->transfer_buffer + (URBDATA_SIZE - room),
+ pkt->data + pkt->written, count);
+ room -= count;
+ pkt->written += count;
+ priv->queue_len -= count;
+ if (pkt->written == pkt->len) {
+ list_move(&pkt->list, &priv->freelist);
+ priv->free_len += PACKET_SIZE;
+ }
+ if (room == 0) {
+ break;
+ }
+ }
+
+ count = URBDATA_SIZE - room;
+ usb_fill_bulk_urb(port->write_urb, serial->dev,
+ usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
+ port->write_urb->transfer_buffer, count, ipaq_write_bulk_callback,
+ port);
+ return;
+}
+
+static void ipaq_write_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct ipaq_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+ }
+
+ spin_lock_irqsave(&write_list_lock, flags);
+ if (!list_empty(&priv->queue)) {
+ ipaq_write_gather(port);
+ spin_unlock_irqrestore(&write_list_lock, flags);
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+ if (result) {
+ err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+ }
+ } else {
+ priv->active = 0;
+ spin_unlock_irqrestore(&write_list_lock, flags);
+ }
+
+ schedule_work(&port->work);
+}
+
+static int ipaq_write_room(struct usb_serial_port *port)
+{
+ struct ipaq_private *priv = usb_get_serial_port_data(port);
+
+ dbg("%s - freelen %d", __FUNCTION__, priv->free_len);
+ return priv->free_len;
+}
+
+static int ipaq_chars_in_buffer(struct usb_serial_port *port)
+{
+ struct ipaq_private *priv = usb_get_serial_port_data(port);
+
+ dbg("%s - queuelen %d", __FUNCTION__, priv->queue_len);
+ return priv->queue_len;
+}
+
+static void ipaq_destroy_lists(struct usb_serial_port *port)
+{
+ struct ipaq_private *priv = usb_get_serial_port_data(port);
+ struct ipaq_packet *pkt, *tmp;
+
+ list_for_each_entry_safe(pkt, tmp, &priv->queue, list) {
+ kfree(pkt->data);
+ kfree(pkt);
+ }
+ list_for_each_entry_safe(pkt, tmp, &priv->freelist, list) {
+ kfree(pkt->data);
+ kfree(pkt);
+ }
+}
+
+
+static int ipaq_startup(struct usb_serial *serial)
+{
+ dbg("%s", __FUNCTION__);
+ if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
+ err("active config #%d != 1 ??",
+ serial->dev->actconfig->desc.bConfigurationValue);
+ return -ENODEV;
+ }
+ return usb_reset_configuration (serial->dev);
+}
+
+static void ipaq_shutdown(struct usb_serial *serial)
+{
+ dbg("%s", __FUNCTION__);
+}
+
+static int __init ipaq_init(void)
+{
+ int retval;
+ spin_lock_init(&write_list_lock);
+ retval = usb_serial_register(&ipaq_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ if (vendor) {
+ ipaq_id_table[0].idVendor = vendor;
+ ipaq_id_table[0].idProduct = product;
+ }
+ retval = usb_register(&ipaq_driver);
+ if (retval)
+ goto failed_usb_register;
+
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&ipaq_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+
+static void __exit ipaq_exit(void)
+{
+ usb_deregister(&ipaq_driver);
+ usb_serial_deregister(&ipaq_device);
+}
+
+
+module_init(ipaq_init);
+module_exit(ipaq_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
+module_param(vendor, ushort, 0);
+MODULE_PARM_DESC(vendor, "User specified USB idVendor");
+
+module_param(product, ushort, 0);
+MODULE_PARM_DESC(product, "User specified USB idProduct");
diff --git a/drivers/usb/serial/ipaq.h b/drivers/usb/serial/ipaq.h
new file mode 100644
index 000000000000..2b9035918b85
--- /dev/null
+++ b/drivers/usb/serial/ipaq.h
@@ -0,0 +1,54 @@
+/*
+ * USB Compaq iPAQ driver
+ *
+ * Copyright (C) 2001 - 2002
+ * Ganesh Varadarajan <ganesh@veritas.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.
+ *
+ */
+
+#ifndef __LINUX_USB_SERIAL_IPAQ_H
+#define __LINUX_USB_SERIAL_IPAQ_H
+
+/*
+ * Since we can't queue our bulk write urbs (don't know why - it just
+ * doesn't work), we can send down only one write urb at a time. The simplistic
+ * approach taken by the generic usbserial driver will work, but it's not good
+ * for performance. Therefore, we buffer upto URBDATA_QUEUE_MAX bytes of write
+ * requests coming from the line discipline. This is done by chaining them
+ * in lists of struct ipaq_packet, each packet holding a maximum of
+ * PACKET_SIZE bytes.
+ *
+ * ipaq_write() can be called from bottom half context; hence we can't
+ * allocate memory for packets there. So we initialize a pool of packets at
+ * the first open and maintain a freelist.
+ *
+ * The value of PACKET_SIZE was empirically determined by
+ * checking the maximum write sizes sent down by the ppp ldisc.
+ * URBDATA_QUEUE_MAX is set to 64K, which is the maximum TCP window size.
+ */
+
+struct ipaq_packet {
+ char *data;
+ size_t len;
+ size_t written;
+ struct list_head list;
+};
+
+struct ipaq_private {
+ int active;
+ int queue_len;
+ int free_len;
+ struct list_head queue;
+ struct list_head freelist;
+};
+
+#define URBDATA_SIZE 4096
+#define URBDATA_QUEUE_MAX (64 * 1024)
+#define PACKET_SIZE 256
+
+#endif
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c
new file mode 100644
index 000000000000..11105d74f461
--- /dev/null
+++ b/drivers/usb/serial/ipw.c
@@ -0,0 +1,491 @@
+/*
+ * IPWireless 3G UMTS TDD Modem driver (USB connected)
+ *
+ * Copyright (C) 2004 Roelf Diedericks <roelfd@inet.co.za>
+ * Copyright (C) 2004 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * All information about the device was acquired using SnoopyPro
+ * on MSFT's O/S, and examing the MSFT drivers' debug output
+ * (insanely left _on_ in the enduser version)
+ *
+ * It was written out of frustration with the IPWireless USB modem
+ * supplied by Axity3G/Sentech South Africa not supporting
+ * Linux whatsoever.
+ *
+ * Nobody provided any proprietary information that was not already
+ * available for this device.
+ *
+ * The modem adheres to the "3GPP TS 27.007 AT command set for 3G
+ * User Equipment (UE)" standard, available from
+ * http://www.3gpp.org/ftp/Specs/html-info/27007.htm
+ *
+ * The code was only tested the IPWireless handheld modem distributed
+ * in South Africa by Sentech.
+ *
+ * It may work for Woosh Inc in .nz too, as it appears they use the
+ * same kit.
+ *
+ * There is still some work to be done in terms of handling
+ * DCD, DTR, RTS, CTS which are currently faked.
+ * It's good enough for PPP at this point. It's based off all kinds of
+ * code found in usb/serial and usb/class
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/usb.h>
+#include <linux/usb.h>
+#include <asm/uaccess.h>
+#include "usb-serial.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.3"
+#define DRIVER_AUTHOR "Roelf Diedericks"
+#define DRIVER_DESC "IPWireless tty driver"
+
+#define IPW_TTY_MAJOR 240 /* real device node major id, experimental range */
+#define IPW_TTY_MINORS 256 /* we support 256 devices, dunno why, it'd be insane :) */
+
+#define USB_IPW_MAGIC 0x6d02 /* magic number for ipw struct */
+
+
+/* Message sizes */
+#define EVENT_BUFFER_SIZE 0xFF
+#define CHAR2INT16(c1,c0) (((u32)((c1) & 0xff) << 8) + (u32)((c0) & 0xff))
+#define NUM_BULK_URBS 24
+#define NUM_CONTROL_URBS 16
+
+/* vendor/product pairs that are known work with this driver*/
+#define IPW_VID 0x0bc3
+#define IPW_PID 0x0001
+
+
+/* Vendor commands: */
+
+/* baud rates */
+enum {
+ ipw_sio_b256000 = 0x000e,
+ ipw_sio_b128000 = 0x001d,
+ ipw_sio_b115200 = 0x0020,
+ ipw_sio_b57600 = 0x0040,
+ ipw_sio_b56000 = 0x0042,
+ ipw_sio_b38400 = 0x0060,
+ ipw_sio_b19200 = 0x00c0,
+ ipw_sio_b14400 = 0x0100,
+ ipw_sio_b9600 = 0x0180,
+ ipw_sio_b4800 = 0x0300,
+ ipw_sio_b2400 = 0x0600,
+ ipw_sio_b1200 = 0x0c00,
+ ipw_sio_b600 = 0x1800
+};
+
+/* data bits */
+#define ipw_dtb_7 0x700
+#define ipw_dtb_8 0x810 // ok so the define is misleading, I know, but forces 8,n,1
+ // I mean, is there a point to any other setting these days? :)
+
+/* usb control request types : */
+#define IPW_SIO_RXCTL 0x00 // control bulk rx channel transmissions, value=1/0 (on/off)
+#define IPW_SIO_SET_BAUD 0x01 // set baud, value=requested ipw_sio_bxxxx
+#define IPW_SIO_SET_LINE 0x03 // set databits, parity. value=ipw_dtb_x
+#define IPW_SIO_SET_PIN 0x03 // set/clear dtr/rts value=ipw_pin_xxx
+#define IPW_SIO_POLL 0x08 // get serial port status byte, call with value=0
+#define IPW_SIO_INIT 0x11 // initializes ? value=0 (appears as first thing todo on open)
+#define IPW_SIO_PURGE 0x12 // purge all transmissions?, call with value=numchar_to_purge
+#define IPW_SIO_HANDFLOW 0x13 // set xon/xoff limits value=0, and a buffer of 0x10 bytes
+#define IPW_SIO_SETCHARS 0x13 // set the flowcontrol special chars, value=0, buf=6 bytes,
+ // last 2 bytes contain flowcontrol chars e.g. 00 00 00 00 11 13
+
+/* values used for request IPW_SIO_SET_PIN */
+#define IPW_PIN_SETDTR 0x101
+#define IPW_PIN_SETRTS 0x202
+#define IPW_PIN_CLRDTR 0x100
+#define IPW_PIN_CLRRTS 0x200 // unconfirmed
+
+/* values used for request IPW_SIO_RXCTL */
+#define IPW_RXBULK_ON 1
+#define IPW_RXBULK_OFF 0
+
+/* various 16 byte hardcoded transferbuffers used by flow control */
+#define IPW_BYTES_FLOWINIT { 0x01, 0, 0, 0, 0x40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+
+/* Interpretation of modem status lines */
+/* These need sorting out by individually connecting pins and checking
+ * results. FIXME!
+ * When data is being sent we see 0x30 in the lower byte; this must
+ * contain DSR and CTS ...
+ */
+#define IPW_DSR ((1<<4) | (1<<5))
+#define IPW_CTS ((1<<5) | (1<<4))
+
+#define IPW_WANTS_TO_SEND 0x30
+//#define IPW_DTR /* Data Terminal Ready */
+//#define IPW_CTS /* Clear To Send */
+//#define IPW_CD /* Carrier Detect */
+//#define IPW_DSR /* Data Set Ready */
+//#define IPW_RxD /* Receive pin */
+
+//#define IPW_LE
+//#define IPW_RTS
+//#define IPW_ST
+//#define IPW_SR
+//#define IPW_RI /* Ring Indicator */
+
+static struct usb_device_id usb_ipw_ids[] = {
+ { USB_DEVICE(IPW_VID, IPW_PID) },
+ { },
+};
+
+MODULE_DEVICE_TABLE(usb, usb_ipw_ids);
+
+static struct usb_driver usb_ipw_driver = {
+ .owner = THIS_MODULE,
+ .name = "ipwtty",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = usb_ipw_ids,
+};
+
+static int debug;
+
+static void ipw_read_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = urb->context;
+ unsigned char *data = urb->transfer_buffer;
+ struct tty_struct *tty;
+ int i;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __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) {
+ tty_flip_buffer_push(tty);
+ }
+ /* this doesn't actually push the data through unless tty->low_latency is set */
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+
+ /* Continue trying to always read */
+ usb_fill_bulk_urb (port->read_urb, port->serial->dev,
+ usb_rcvbulkpipe(port->serial->dev,
+ port->bulk_in_endpointAddress),
+ port->read_urb->transfer_buffer,
+ port->read_urb->transfer_buffer_length,
+ ipw_read_bulk_callback, port);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ return;
+}
+
+static int ipw_open(struct usb_serial_port *port, struct file *filp)
+{
+ struct usb_device *dev = port->serial->dev;
+ u8 buf_flow_static[16] = IPW_BYTES_FLOWINIT;
+ u8 *buf_flow_init;
+ int result;
+
+ dbg("%s", __FUNCTION__);
+
+ buf_flow_init = kmalloc(16, GFP_KERNEL);
+ if (!buf_flow_init)
+ return -ENOMEM;
+ memcpy(buf_flow_init, buf_flow_static, 16);
+
+ if (port->tty)
+ port->tty->low_latency = 1;
+
+ /* --1: Tell the modem to initialize (we think) From sniffs this is always the
+ * first thing that gets sent to the modem during opening of the device */
+ dbg("%s: Sending SIO_INIT (we guess)",__FUNCTION__);
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev,0),
+ IPW_SIO_INIT,
+ USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+ 0,
+ 0, /* index */
+ NULL,
+ 0,
+ 100000);
+ if (result < 0)
+ dev_err(&port->dev, "Init of modem failed (error = %d)", result);
+
+ /* reset the bulk pipes */
+ usb_clear_halt(dev, usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress));
+ usb_clear_halt(dev, usb_sndbulkpipe(dev, port->bulk_out_endpointAddress));
+
+ /*--2: Start reading from the device */
+ dbg("%s: setting up bulk read callback",__FUNCTION__);
+ usb_fill_bulk_urb(port->read_urb, dev,
+ usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress),
+ port->bulk_in_buffer,
+ port->bulk_in_size,
+ ipw_read_bulk_callback, port);
+ result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ if (result < 0)
+ dbg("%s - usb_submit_urb(read bulk) failed with status %d", __FUNCTION__, result);
+
+ /*--3: Tell the modem to open the floodgates on the rx bulk channel */
+ dbg("%s:asking modem for RxRead (RXBULK_ON)",__FUNCTION__);
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ IPW_SIO_RXCTL,
+ USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+ IPW_RXBULK_ON,
+ 0, /* index */
+ NULL,
+ 0,
+ 100000);
+ if (result < 0)
+ dev_err(&port->dev, "Enabling bulk RxRead failed (error = %d)", result);
+
+ /*--4: setup the initial flowcontrol */
+ dbg("%s:setting init flowcontrol (%s)",__FUNCTION__,buf_flow_init);
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ IPW_SIO_HANDFLOW,
+ USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+ 0,
+ 0,
+ buf_flow_init,
+ 0x10,
+ 200000);
+ if (result < 0)
+ dev_err(&port->dev, "initial flowcontrol failed (error = %d)", result);
+
+
+ /*--5: raise the dtr */
+ dbg("%s:raising dtr",__FUNCTION__);
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ IPW_SIO_SET_PIN,
+ USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+ IPW_PIN_SETDTR,
+ 0,
+ NULL,
+ 0,
+ 200000);
+ if (result < 0)
+ dev_err(&port->dev, "setting dtr failed (error = %d)", result);
+
+ /*--6: raise the rts */
+ dbg("%s:raising rts",__FUNCTION__);
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ IPW_SIO_SET_PIN,
+ USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+ IPW_PIN_SETRTS,
+ 0,
+ NULL,
+ 0,
+ 200000);
+ if (result < 0)
+ dev_err(&port->dev, "setting dtr failed (error = %d)", result);
+
+ kfree(buf_flow_init);
+ return 0;
+}
+
+static void ipw_close(struct usb_serial_port *port, struct file * filp)
+{
+ struct usb_device *dev = port->serial->dev;
+ int result;
+
+ if (tty_hung_up_p(filp)) {
+ dbg("%s: tty_hung_up_p ...", __FUNCTION__);
+ return;
+ }
+
+ /*--1: drop the dtr */
+ dbg("%s:dropping dtr",__FUNCTION__);
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ IPW_SIO_SET_PIN,
+ USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+ IPW_PIN_CLRDTR,
+ 0,
+ NULL,
+ 0,
+ 200000);
+ if (result < 0)
+ dev_err(&port->dev, "dropping dtr failed (error = %d)", result);
+
+ /*--2: drop the rts */
+ dbg("%s:dropping rts",__FUNCTION__);
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ IPW_SIO_SET_PIN, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+ IPW_PIN_CLRRTS,
+ 0,
+ NULL,
+ 0,
+ 200000);
+ if (result < 0)
+ dev_err(&port->dev, "dropping rts failed (error = %d)", result);
+
+
+ /*--3: purge */
+ dbg("%s:sending purge",__FUNCTION__);
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ IPW_SIO_PURGE, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+ 0x03,
+ 0,
+ NULL,
+ 0,
+ 200000);
+ if (result < 0)
+ dev_err(&port->dev, "purge failed (error = %d)", result);
+
+
+ /* send RXBULK_off (tell modem to stop transmitting bulk data on rx chan) */
+ result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ IPW_SIO_RXCTL,
+ USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+ IPW_RXBULK_OFF,
+ 0, /* index */
+ NULL,
+ 0,
+ 100000);
+
+ if (result < 0)
+ dev_err(&port->dev, "Disabling bulk RxRead failed (error = %d)", result);
+
+ /* shutdown any in-flight urbs that we know about */
+ usb_kill_urb(port->read_urb);
+ usb_kill_urb(port->write_urb);
+}
+
+static void ipw_write_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = urb->context;
+
+ dbg("%s", __FUNCTION__);
+
+ if (urb->status)
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+
+ schedule_work(&port->work);
+}
+
+static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ struct usb_device *dev = port->serial->dev;
+ int ret;
+
+ dbg("%s: TOP: count=%d, in_interrupt=%ld", __FUNCTION__,
+ count, in_interrupt() );
+
+ if (count == 0) {
+ dbg("%s - write request of 0 bytes", __FUNCTION__);
+ return 0;
+ }
+
+ /* Racy and broken, FIXME properly! */
+ if (port->write_urb->status == -EINPROGRESS)
+ return 0;
+
+ count = min(count, port->bulk_out_size);
+ memcpy(port->bulk_out_buffer, buf, count);
+
+ dbg("%s count now:%d", __FUNCTION__, count);
+
+ usb_fill_bulk_urb(port->write_urb, dev,
+ usb_sndbulkpipe(dev, port->bulk_out_endpointAddress),
+ port->write_urb->transfer_buffer,
+ count,
+ ipw_write_bulk_callback,
+ port);
+
+ ret = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+ if (ret != 0) {
+ dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __FUNCTION__, ret);
+ return ret;
+ }
+
+ dbg("%s returning %d", __FUNCTION__, count);
+ return count;
+}
+
+static int ipw_probe(struct usb_serial_port *port)
+{
+ return 0;
+}
+
+static int ipw_disconnect(struct usb_serial_port *port)
+{
+ usb_set_serial_port_data(port, NULL);
+ return 0;
+}
+
+static struct usb_serial_device_type ipw_device = {
+ .owner = THIS_MODULE,
+ .name = "IPWireless converter",
+ .short_name = "ipw",
+ .id_table = usb_ipw_ids,
+ .num_interrupt_in = NUM_DONT_CARE,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = ipw_open,
+ .close = ipw_close,
+ .port_probe = ipw_probe,
+ .port_remove = ipw_disconnect,
+ .write = ipw_write,
+ .write_bulk_callback = ipw_write_bulk_callback,
+ .read_bulk_callback = ipw_read_bulk_callback,
+};
+
+
+
+static int usb_ipw_init(void)
+{
+ int retval;
+
+ retval = usb_serial_register(&ipw_device);
+ if (retval)
+ return retval;
+ retval = usb_register(&usb_ipw_driver);
+ if (retval) {
+ usb_serial_deregister(&ipw_device);
+ return retval;
+ }
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+}
+
+static void usb_ipw_exit(void)
+{
+ usb_deregister(&usb_ipw_driver);
+ usb_serial_deregister(&ipw_device);
+}
+
+module_init(usb_ipw_init);
+module_exit(usb_ipw_exit);
+
+/* Module information */
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
new file mode 100644
index 000000000000..59f234df5f89
--- /dev/null
+++ b/drivers/usb/serial/ir-usb.c
@@ -0,0 +1,619 @@
+/*
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This driver allows a USB IrDA device to be used as a "dumb" serial device.
+ * This can be useful if you do not have access to a full IrDA stack on the
+ * other side of the connection. If you do have an IrDA stack on both devices,
+ * please use the usb-irda driver, as it contains the proper error checking and
+ * other goodness of a full IrDA stack.
+ *
+ * Portions of this driver were taken from drivers/net/irda/irda-usb.c, which
+ * was written by Roman Weissgaerber <weissg@vienna.at>, Dag Brattli
+ * <dag@brattli.net>, and Jean Tourrilhes <jt@hpl.hp.com>
+ *
+ * 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.
+ *
+ * 2001_Nov_01 greg kh
+ * Added support for more IrDA USB devices.
+ * Added support for zero packet. Added buffer override paramater, so
+ * users can transfer larger packets at once if they wish. Both patches
+ * came from Dag Brattli <dag@obexcode.com>.
+ *
+ * 2001_Oct_07 greg kh
+ * initial version released.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.4"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>"
+#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));
+
+static int debug;
+
+/* if overridden by the user, then use their value for the size of the read and
+ * write urbs */
+static int buffer_size;
+/* 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);
+static void ir_close (struct usb_serial_port *port, struct file *filep);
+static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int count);
+static void ir_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+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 */
+ { USB_INTERFACE_INFO (USB_CLASS_APP_SPEC, USB_CLASS_IRDA, 0) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver ir_driver = {
+ .owner = THIS_MODULE,
+ .name = "ir-usb",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table,
+};
+
+
+static 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,
+ .attach = 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)
+{
+ dbg("bLength=%x", desc->bLength);
+ dbg("bDescriptorType=%x", desc->bDescriptorType);
+ dbg("bcdSpecRevision=%x", desc->bcdSpecRevision);
+ dbg("bmDataSize=%x", desc->bmDataSize);
+ dbg("bmWindowSize=%x", desc->bmWindowSize);
+ dbg("bmMinTurnaroundTime=%d", desc->bmMinTurnaroundTime);
+ dbg("wBaudRate=%x", desc->wBaudRate);
+ dbg("bmAdditionalBOFs=%x", desc->bmAdditionalBOFs);
+ dbg("bIrdaRateSniff=%x", desc->bIrdaRateSniff);
+ dbg("bMaxUnicastList=%x", desc->bMaxUnicastList);
+}
+
+/*------------------------------------------------------------------*/
+/*
+ * Function irda_usb_find_class_desc(dev, ifnum)
+ *
+ * Returns instance of IrDA class descriptor, or NULL if not found
+ *
+ * The class descriptor is some extra info that IrDA USB devices will
+ * offer to us, describing their IrDA characteristics. We will use that in
+ * irda_usb_init_qos()
+ *
+ * Based on the same function in drivers/net/irda/irda-usb.c
+ */
+static struct irda_class_desc *irda_usb_find_class_desc(struct usb_device *dev, unsigned int ifnum)
+{
+ struct irda_class_desc *desc;
+ int ret;
+
+ desc = kmalloc(sizeof (struct irda_class_desc), GFP_KERNEL);
+ if (desc == NULL)
+ return NULL;
+ memset(desc, 0, sizeof(struct irda_class_desc));
+
+ 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), 1000);
+
+ 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;
+ }
+
+ irda_usb_dump_class_desc(desc);
+ return desc;
+error:
+ kfree(desc);
+ 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;
+
+ irda_desc = irda_usb_find_class_desc (serial->dev, 0);
+ if (irda_desc == NULL) {
+ dev_err (&serial->dev->dev, "IRDA class descriptor not found, device not bound\n");
+ 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);
+
+ return 0;
+}
+
+static int ir_open (struct usb_serial_port *port, struct file *filp)
+{
+ char *buffer;
+ int result = 0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (buffer_size) {
+ /* override the default buffer sizes */
+ buffer = kmalloc (buffer_size, GFP_KERNEL);
+ if (!buffer) {
+ dev_err (&port->dev, "%s - out of memory.\n", __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) {
+ dev_err (&port->dev, "%s - out of memory.\n", __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,
+ port->serial->dev,
+ usb_rcvbulkpipe(port->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, GFP_KERNEL);
+ if (result)
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+
+ return result;
+}
+
+static void ir_close (struct usb_serial_port *port, struct file * filp)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /* shutdown our bulk read */
+ usb_kill_urb(port->read_urb);
+}
+
+static int ir_write (struct usb_serial_port *port, 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) {
+ dev_err (&port->dev, "%s - no tty???\n", __FUNCTION__);
+ return 0;
+ }
+
+ if (count == 0)
+ 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;
+
+ 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 = URB_ZERO_PACKET;
+
+ result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ else
+ result = transfer_size;
+
+ return result;
+}
+
+static void ir_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+
+ 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 (
+ debug,
+ &port->dev,
+ __FUNCTION__,
+ urb->actual_length,
+ urb->transfer_buffer);
+
+ schedule_work(&port->work);
+}
+
+static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ 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 (
+ debug,
+ &port->dev,
+ __FUNCTION__,
+ urb->actual_length,
+ data);
+
+ /*
+ * Bypass flip-buffers, and feed the ldisc directly
+ * due to our potentially large buffer size. Since we
+ * used to set low_latency, this is exactly what the
+ * tty layer did anyway :)
+ */
+ tty = port->tty;
+
+ /*
+ * FIXME: must not do this in IRQ context,
+ * must honour TTY_DONT_FLIP
+ */
+ 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,
+ port->serial->dev,
+ usb_rcvbulkpipe(port->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, GFP_ATOMIC);
+ if (result)
+ dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
+ __FUNCTION__, result);
+
+ break ;
+
+ default:
+ dbg("%s - nonzero read bulk status received: %d",
+ __FUNCTION__,
+ urb->status);
+ break ;
+
+ }
+
+ return;
+}
+
+static void ir_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+{
+ 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;
+ }
+
+ 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;
+ }
+ }
+
+ /* 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 function.
+ */
+ 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;
+#ifdef B4000000
+ case B4000000: ir_baud = SPEED_4000000; break;
+#endif
+ }
+
+ 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 = URB_ZERO_PACKET;
+
+ result = usb_submit_urb (port->write_urb, GFP_KERNEL);
+ if (result)
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ }
+ return;
+}
+
+
+static int __init ir_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&ir_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&ir_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&ir_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+
+static void __exit ir_exit (void)
+{
+ usb_deregister (&ir_driver);
+ usb_serial_deregister (&ir_device);
+}
+
+
+module_init(ir_init);
+module_exit(ir_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+module_param(xbof, int, 0);
+MODULE_PARM_DESC(xbof, "Force specific number of XBOFs");
+module_param(buffer_size, int, 0);
+MODULE_PARM_DESC(buffer_size, "Size of the transfer buffers");
+
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
new file mode 100644
index 000000000000..fb0926292228
--- /dev/null
+++ b/drivers/usb/serial/keyspan.c
@@ -0,0 +1,2354 @@
+/*
+ Keyspan USB to Serial Converter driver
+
+ (C) Copyright (C) 2000-2001 Hugh Blemings <hugh@blemings.org>
+ (C) Copyright (C) 2002 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ See http://misc.nu/hugh/keyspan.html for more information.
+
+ Code in this driver inspired by and in a number of places taken
+ from Brian Warner's original Keyspan-PDA driver.
+
+ This driver has been put together with the support of Innosys, Inc.
+ and Keyspan, Inc the manufacturers of the Keyspan USB-serial products.
+ Thanks Guys :)
+
+ Thanks to Paulus for miscellaneous tidy ups, some largish chunks
+ of much nicer and/or completely new code and (perhaps most uniquely)
+ having the patience to sit down and explain why and where he'd changed
+ stuff.
+
+ Tip 'o the hat to IBM (and previously Linuxcare :) for supporting
+ staff in their work on open source projects.
+
+ Change History
+
+ 2003sep04 LPM (Keyspan) add support for new single port product USA19HS.
+ Improve setup message handling for all devices.
+
+ Wed Feb 19 22:00:00 PST 2003 (Jeffrey S. Laing <keyspan@jsl.com>)
+ Merged the current (1/31/03) Keyspan code with the current (2.4.21-pre4)
+ Linux source tree. The Linux tree lacked support for the 49WLC and
+ others. The Keyspan patches didn't work with the current kernel.
+
+ 2003jan30 LPM add support for the 49WLC and MPR
+
+ 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)
+
+ 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.
+
+ Sat Oct 6 12:31:21 EST 2001 hugh
+ Added support for USA-28XA and -28XB, misc cleanups, break support
+ for usa26 based models thanks to David Gibson.
+
+ Thu May 31 11:56:42 PDT 2001 gkh
+ switched from using spinlock to a semaphore
+
+ (04/08/2001) gb
+ Identify version on module load.
+
+ (11/01/2000) Adam J. Richter
+ usb_device_id table support.
+
+ Tue Oct 10 23:15:33 EST 2000 Hugh
+ Merged Paul's changes with my USA-49W mods. Work in progress
+ still...
+
+ Wed Jul 19 14:00:42 EST 2000 gkh
+ Added module_init and module_exit functions to handle the fact that
+ this driver is a loadable module now.
+
+ Tue Jul 18 16:14:52 EST 2000 Hugh
+ Basic character input/output for USA-19 now mostly works,
+ fixed at 9600 baud for the moment.
+
+ Sat Jul 8 11:11:48 EST 2000 Hugh
+ First public release - nothing works except the firmware upload.
+ Tested on PPC and x86 architectures, seems to behave...
+*/
+
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/jiffies.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+#include "keyspan.h"
+
+static int debug;
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.1.4"
+#define DRIVER_AUTHOR "Hugh Blemings <hugh@misc.nu"
+#define DRIVER_DESC "Keyspan USB to Serial Converter Driver"
+
+#define INSTAT_BUFLEN 32
+#define GLOCONT_BUFLEN 64
+
+ /* Per device and per port private data */
+struct keyspan_serial_private {
+ const struct keyspan_device_details *device_details;
+
+ struct urb *instat_urb;
+ char instat_buf[INSTAT_BUFLEN];
+
+ /* XXX this one probably will need a lock */
+ struct urb *glocont_urb;
+ char glocont_buf[GLOCONT_BUFLEN];
+};
+
+struct keyspan_port_private {
+ /* Keep track of which input & output endpoints to use */
+ int in_flip;
+ int out_flip;
+
+ /* Keep duplicate of device details in each port
+ structure as well - simplifies some of the
+ callback functions etc. */
+ const struct keyspan_device_details *device_details;
+
+ /* Input endpoints and buffer for this port */
+ struct urb *in_urbs[2];
+ char in_buffer[2][64];
+ /* Output endpoints and buffer for this port */
+ struct urb *out_urbs[2];
+ char out_buffer[2][64];
+
+ /* Input ack endpoint */
+ struct urb *inack_urb;
+ char inack_buffer[1];
+
+ /* Output control endpoint */
+ struct urb *outcont_urb;
+ char outcont_buffer[64];
+
+ /* Settings for the port */
+ int baud;
+ int old_baud;
+ unsigned int cflag;
+ unsigned int old_cflag;
+ enum {flow_none, flow_cts, flow_xon} flow_control;
+ int rts_state; /* Handshaking pins (outputs) */
+ int dtr_state;
+ int cts_state; /* Handshaking pins (inputs) */
+ int dsr_state;
+ int dcd_state;
+ int ri_state;
+ int break_on;
+
+ unsigned long tx_start_time[2];
+ int resend_cont; /* need to resend control packet */
+};
+
+
+/* Include Keyspan message headers. All current Keyspan Adapters
+ make use of one of four message formats which are referred
+ to as USA-26, USA-28 and USA-49, USA-90 by Keyspan and within this driver. */
+#include "keyspan_usa26msg.h"
+#include "keyspan_usa28msg.h"
+#include "keyspan_usa49msg.h"
+#include "keyspan_usa90msg.h"
+
+
+/* Functions used by new usb-serial code. */
+static int __init keyspan_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&keyspan_pre_device);
+ if (retval)
+ goto failed_pre_device_register;
+ retval = usb_serial_register(&keyspan_1port_device);
+ if (retval)
+ goto failed_1port_device_register;
+ retval = usb_serial_register(&keyspan_2port_device);
+ if (retval)
+ goto failed_2port_device_register;
+ retval = usb_serial_register(&keyspan_4port_device);
+ if (retval)
+ goto failed_4port_device_register;
+ retval = usb_register(&keyspan_driver);
+ if (retval)
+ goto failed_usb_register;
+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&keyspan_4port_device);
+failed_4port_device_register:
+ usb_serial_deregister(&keyspan_2port_device);
+failed_2port_device_register:
+ usb_serial_deregister(&keyspan_1port_device);
+failed_1port_device_register:
+ usb_serial_deregister(&keyspan_pre_device);
+failed_pre_device_register:
+ return retval;
+}
+
+static void __exit keyspan_exit (void)
+{
+ usb_deregister (&keyspan_driver);
+ usb_serial_deregister (&keyspan_pre_device);
+ usb_serial_deregister (&keyspan_1port_device);
+ usb_serial_deregister (&keyspan_2port_device);
+ usb_serial_deregister (&keyspan_4port_device);
+}
+
+module_init(keyspan_init);
+module_exit(keyspan_exit);
+
+static void keyspan_rx_throttle (struct usb_serial_port *port)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+}
+
+
+static void keyspan_rx_unthrottle (struct usb_serial_port *port)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+}
+
+
+static void keyspan_break_ctl (struct usb_serial_port *port, int break_state)
+{
+ struct keyspan_port_private *p_priv;
+
+ dbg("%s", __FUNCTION__);
+
+ p_priv = usb_get_serial_port_data(port);
+
+ if (break_state == -1)
+ p_priv->break_on = 1;
+ else
+ p_priv->break_on = 0;
+
+ keyspan_send_setup(port, 0);
+}
+
+
+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 = usb_get_serial_port_data(port);
+ 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. */
+ baud_rate = tty_get_baud_rate(port->tty);
+ /* 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;
+ }
+
+ /* set CTS/RTS handshake etc. */
+ p_priv->cflag = cflag;
+ p_priv->flow_control = (cflag & CRTSCTS)? flow_cts: flow_none;
+
+ keyspan_send_setup(port, 0);
+}
+
+static int keyspan_tiocmget(struct usb_serial_port *port, struct file *file)
+{
+ unsigned int value;
+ struct keyspan_port_private *p_priv;
+
+ p_priv = usb_get_serial_port_data(port);
+
+ value = ((p_priv->rts_state) ? TIOCM_RTS : 0) |
+ ((p_priv->dtr_state) ? TIOCM_DTR : 0) |
+ ((p_priv->cts_state) ? TIOCM_CTS : 0) |
+ ((p_priv->dsr_state) ? TIOCM_DSR : 0) |
+ ((p_priv->dcd_state) ? TIOCM_CAR : 0) |
+ ((p_priv->ri_state) ? TIOCM_RNG : 0);
+
+ return value;
+}
+
+static int keyspan_tiocmset(struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct keyspan_port_private *p_priv;
+
+ p_priv = usb_get_serial_port_data(port);
+
+ if (set & TIOCM_RTS)
+ p_priv->rts_state = 1;
+ if (set & TIOCM_DTR)
+ p_priv->dtr_state = 1;
+
+ if (clear & TIOCM_RTS)
+ p_priv->rts_state = 0;
+ if (clear & TIOCM_DTR)
+ p_priv->dtr_state = 0;
+ keyspan_send_setup(port, 0);
+ return 0;
+}
+
+static int keyspan_ioctl(struct usb_serial_port *port, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return -ENOIOCTLCMD;
+}
+
+ /* Write function is similar for the four protocols used
+ with only a minor change for usa90 (usa19hs) required */
+static int keyspan_write(struct usb_serial_port *port,
+ 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, maxDataLen, dataOffset;
+
+ p_priv = usb_get_serial_port_data(port);
+ d_details = p_priv->device_details;
+
+ if (d_details->msg_format == msg_usa90) {
+ maxDataLen = 64;
+ dataOffset = 0;
+ } else {
+ maxDataLen = 63;
+ dataOffset = 1;
+ }
+
+ dbg("%s - for port %d (%d chars), flip=%d",
+ __FUNCTION__, port->number, count, p_priv->out_flip);
+
+ for (left = count; left > 0; left -= todo) {
+ todo = left;
+ if (todo > maxDataLen)
+ todo = maxDataLen;
+
+ flip = p_priv->out_flip;
+
+ /* Check we have a valid urb/endpoint before we use it... */
+ if ((this_urb = p_priv->out_urbs[flip]) == NULL) {
+ /* 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 & URB_ASYNC_UNLINK)
+ break;
+ if (time_before(jiffies, p_priv->tx_start_time[flip] + 10 * HZ))
+ break;
+ this_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ usb_unlink_urb(this_urb);
+ break;
+ }
+
+ /* First byte in buffer is "last flag" (except for usa19hx) - unused so
+ for now so set to zero */
+ ((char *)this_urb->transfer_buffer)[0] = 0;
+
+ memcpy (this_urb->transfer_buffer + dataOffset, buf, todo);
+ buf += todo;
+
+ /* send the data out the bulk port */
+ this_urb->transfer_buffer_length = todo + dataOffset;
+
+ this_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
+ this_urb->dev = port->serial->dev;
+ if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
+ dbg("usb_submit_urb(write bulk) failed (%d)", err);
+ }
+ p_priv->tx_start_time[flip] = jiffies;
+
+ /* Flip for next time if usa26 or usa28 interface
+ (not used on usa49) */
+ p_priv->out_flip = (flip + 1) & d_details->outdat_endp_flip;
+ }
+
+ return count - left;
+}
+
+static void usa26_indat_callback(struct urb *urb, struct pt_regs *regs)
+{
+ int i, err;
+ int endpoint;
+ struct usb_serial_port *port;
+ 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 errors on individual bytes, only possible overrun err*/
+ if (data[0] & RXERROR_OVERRUN)
+ err = TTY_OVERRUN;
+ else err = 0;
+ for (i = 1; i < urb->actual_length ; ++i) {
+ tty_insert_flip_char(tty, data[i], err);
+ }
+ } 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)
+ flag |= TTY_OVERRUN;
+ if (stat & RXERROR_FRAMING)
+ flag |= TTY_FRAME;
+ if (stat & RXERROR_PARITY)
+ flag |= TTY_PARITY;
+ /* XXX should handle break (0x10) */
+ tty_insert_flip_char(tty, data[i+1], flag);
+ }
+ }
+ tty_flip_buffer_push(tty);
+ }
+
+ /* Resubmit urb so we continue receiving */
+ urb->dev = port->serial->dev;
+ if (port->open_count)
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
+ dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+ }
+ return;
+}
+
+ /* Outdat handling is common for all devices */
+static void usa2x_outdat_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port;
+ struct keyspan_port_private *p_priv;
+
+ port = (struct usb_serial_port *) urb->context;
+ p_priv = usb_get_serial_port_data(port);
+ dbg ("%s - urb %d", __FUNCTION__, urb == p_priv->out_urbs[1]);
+
+ if (port->open_count)
+ schedule_work(&port->work);
+}
+
+static void usa26_inack_callback(struct urb *urb, struct pt_regs *regs)
+{
+ dbg ("%s", __FUNCTION__);
+
+}
+
+static void usa26_outcont_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port;
+ struct keyspan_port_private *p_priv;
+
+ port = (struct usb_serial_port *) urb->context;
+ p_priv = usb_get_serial_port_data(port);
+
+ 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, struct pt_regs *regs)
+{
+ 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;
+ int old_dcd_state, err;
+
+ 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
+
+ /* Now do something useful with the 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];
+ p_priv = usb_get_serial_port_data(port);
+
+ /* Update handshaking pin state information */
+ old_dcd_state = p_priv->dcd_state;
+ p_priv->cts_state = ((msg->hskia_cts) ? 1 : 0);
+ p_priv->dsr_state = ((msg->dsr) ? 1 : 0);
+ p_priv->dcd_state = ((msg->gpia_dcd) ? 1 : 0);
+ p_priv->ri_state = ((msg->ri) ? 1 : 0);
+
+ if (port->tty && !C_CLOCAL(port->tty)
+ && old_dcd_state != p_priv->dcd_state) {
+ if (old_dcd_state)
+ tty_hangup(port->tty);
+ /* else */
+ /* wake_up_interruptible(&p_priv->open_wait); */
+ }
+
+ /* Resubmit urb so we continue receiving */
+ urb->dev = serial->dev;
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
+ dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+ }
+exit: ;
+}
+
+static void usa26_glocont_callback(struct urb *urb, struct pt_regs *regs)
+{
+ dbg ("%s", __FUNCTION__);
+
+}
+
+
+static void usa28_indat_callback(struct urb *urb, struct pt_regs *regs)
+{
+ int i, err;
+ struct usb_serial_port *port;
+ struct tty_struct *tty;
+ unsigned char *data;
+ struct keyspan_port_private *p_priv;
+
+ dbg ("%s", __FUNCTION__);
+
+ port = (struct usb_serial_port *) urb->context;
+ p_priv = usb_get_serial_port_data(port);
+ data = urb->transfer_buffer;
+
+ if (urb != p_priv->in_urbs[p_priv->in_flip])
+ return;
+
+ do {
+ if (urb->status) {
+ dbg("%s - nonzero status: %x on endpoint %d.",
+ __FUNCTION__, urb->status, usb_pipeendpoint(urb->pipe));
+ return;
+ }
+
+ port = (struct usb_serial_port *) urb->context;
+ p_priv = usb_get_serial_port_data(port);
+ data = urb->transfer_buffer;
+
+ tty = port->tty;
+ if (urb->actual_length) {
+ for (i = 0; i < urb->actual_length ; ++i) {
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+
+ /* Resubmit urb so we continue receiving */
+ urb->dev = port->serial->dev;
+ if (port->open_count)
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
+ dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+ }
+ p_priv->in_flip ^= 1;
+
+ urb = p_priv->in_urbs[p_priv->in_flip];
+ } while (urb->status != -EINPROGRESS);
+}
+
+static void usa28_inack_callback(struct urb *urb, struct pt_regs *regs)
+{
+ dbg ("%s", __FUNCTION__);
+}
+
+static void usa28_outcont_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port;
+ struct keyspan_port_private *p_priv;
+
+ port = (struct usb_serial_port *) urb->context;
+ p_priv = usb_get_serial_port_data(port);
+
+ if (p_priv->resend_cont) {
+ dbg ("%s - sending setup", __FUNCTION__);
+ keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1);
+ }
+}
+
+static void usa28_instat_callback(struct urb *urb, struct pt_regs *regs)
+{
+ 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;
+ int old_dcd_state;
+
+ 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];
+ p_priv = usb_get_serial_port_data(port);
+
+ /* Update handshaking pin state information */
+ old_dcd_state = p_priv->dcd_state;
+ p_priv->cts_state = ((msg->cts) ? 1 : 0);
+ p_priv->dsr_state = ((msg->dsr) ? 1 : 0);
+ p_priv->dcd_state = ((msg->dcd) ? 1 : 0);
+ p_priv->ri_state = ((msg->ri) ? 1 : 0);
+
+ if (port->tty && !C_CLOCAL(port->tty)
+ && old_dcd_state != p_priv->dcd_state) {
+ if (old_dcd_state)
+ tty_hangup(port->tty);
+ /* else */
+ /* wake_up_interruptible(&p_priv->open_wait); */
+ }
+
+ /* Resubmit urb so we continue receiving */
+ urb->dev = serial->dev;
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
+ dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+ }
+exit: ;
+}
+
+static void usa28_glocont_callback(struct urb *urb, struct pt_regs *regs)
+{
+ dbg ("%s", __FUNCTION__);
+}
+
+
+static void usa49_glocont_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial *serial;
+ struct usb_serial_port *port;
+ 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) {
+ port = serial->port[i];
+ p_priv = usb_get_serial_port_data(port);
+
+ if (p_priv->resend_cont) {
+ dbg ("%s - sending setup", __FUNCTION__);
+ keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1);
+ break;
+ }
+ }
+}
+
+ /* This is actually called glostat in the Keyspan
+ doco */
+static void usa49_instat_callback(struct urb *urb, struct pt_regs *regs)
+{
+ 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];
+ p_priv = usb_get_serial_port_data(port);
+
+ /* Update handshaking pin state information */
+ old_dcd_state = p_priv->dcd_state;
+ p_priv->cts_state = ((msg->cts) ? 1 : 0);
+ p_priv->dsr_state = ((msg->dsr) ? 1 : 0);
+ p_priv->dcd_state = ((msg->dcd) ? 1 : 0);
+ p_priv->ri_state = ((msg->ri) ? 1 : 0);
+
+ if (port->tty && !C_CLOCAL(port->tty)
+ && old_dcd_state != p_priv->dcd_state) {
+ if (old_dcd_state)
+ tty_hangup(port->tty);
+ /* else */
+ /* wake_up_interruptible(&p_priv->open_wait); */
+ }
+
+ /* Resubmit urb so we continue receiving */
+ urb->dev = serial->dev;
+
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
+ dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+ }
+exit: ;
+}
+
+static void usa49_inack_callback(struct urb *urb, struct pt_regs *regs)
+{
+ dbg ("%s", __FUNCTION__);
+}
+
+static void usa49_indat_callback(struct urb *urb, struct pt_regs *regs)
+{
+ int i, err;
+ int endpoint;
+ struct usb_serial_port *port;
+ 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 */
+ for (i = 0; i + 1 < urb->actual_length; i += 2) {
+ int stat = data[i], flag = 0;
+ if (stat & RXERROR_OVERRUN)
+ flag |= TTY_OVERRUN;
+ if (stat & RXERROR_FRAMING)
+ flag |= TTY_FRAME;
+ if (stat & RXERROR_PARITY)
+ flag |= TTY_PARITY;
+ /* XXX should handle break (0x10) */
+ tty_insert_flip_char(tty, data[i+1], flag);
+ }
+ }
+ tty_flip_buffer_push(tty);
+ }
+
+ /* Resubmit urb so we continue receiving */
+ urb->dev = port->serial->dev;
+ if (port->open_count)
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 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, struct pt_regs *regs)
+{
+ dbg ("%s", __FUNCTION__);
+}
+
+static void usa90_indat_callback(struct urb *urb, struct pt_regs *regs)
+{
+ int i, err;
+ int endpoint;
+ struct usb_serial_port *port;
+ struct keyspan_port_private *p_priv;
+ 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;
+ p_priv = usb_get_serial_port_data(port);
+
+ tty = port->tty;
+ if (urb->actual_length) {
+
+ /* if current mode is DMA, looks like usa28 format
+ otherwise looks like usa26 data format */
+
+ if (p_priv->baud > 57600) {
+ for (i = 0; i < urb->actual_length ; ++i)
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ else {
+
+ /* 0x80 bit is error flag */
+ if ((data[0] & 0x80) == 0) {
+ /* no errors on individual bytes, only possible overrun err*/
+ if (data[0] & RXERROR_OVERRUN)
+ err = TTY_OVERRUN;
+ else err = 0;
+ for (i = 1; i < urb->actual_length ; ++i)
+ tty_insert_flip_char(tty, data[i], err);
+
+ }
+ 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)
+ flag |= TTY_OVERRUN;
+ if (stat & RXERROR_FRAMING)
+ flag |= TTY_FRAME;
+ if (stat & RXERROR_PARITY)
+ flag |= TTY_PARITY;
+ /* XXX should handle break (0x10) */
+ tty_insert_flip_char(tty, data[i+1], flag);
+ }
+ }
+ }
+ tty_flip_buffer_push(tty);
+ }
+
+ /* Resubmit urb so we continue receiving */
+ urb->dev = port->serial->dev;
+ if (port->open_count)
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
+ dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+ }
+ return;
+}
+
+
+static void usa90_instat_callback(struct urb *urb, struct pt_regs *regs)
+{
+ unsigned char *data = urb->transfer_buffer;
+ struct keyspan_usa90_portStatusMessage *msg;
+ struct usb_serial *serial;
+ struct usb_serial_port *port;
+ struct keyspan_port_private *p_priv;
+ int old_dcd_state, err;
+
+ serial = (struct usb_serial *) urb->context;
+
+ if (urb->status) {
+ dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
+ return;
+ }
+ if (urb->actual_length < 14) {
+ dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length);
+ goto exit;
+ }
+
+ msg = (struct keyspan_usa90_portStatusMessage *)data;
+
+ /* Now do something useful with the data */
+
+ port = serial->port[0];
+ p_priv = usb_get_serial_port_data(port);
+
+ /* Update handshaking pin state information */
+ old_dcd_state = p_priv->dcd_state;
+ p_priv->cts_state = ((msg->cts) ? 1 : 0);
+ p_priv->dsr_state = ((msg->dsr) ? 1 : 0);
+ p_priv->dcd_state = ((msg->dcd) ? 1 : 0);
+ p_priv->ri_state = ((msg->ri) ? 1 : 0);
+
+ if (port->tty && !C_CLOCAL(port->tty)
+ && old_dcd_state != p_priv->dcd_state) {
+ if (old_dcd_state)
+ tty_hangup(port->tty);
+ /* else */
+ /* wake_up_interruptible(&p_priv->open_wait); */
+ }
+
+ /* Resubmit urb so we continue receiving */
+ urb->dev = serial->dev;
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
+ dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+ }
+exit:
+ ;
+}
+
+static void usa90_outcont_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port;
+ struct keyspan_port_private *p_priv;
+
+ port = (struct usb_serial_port *) urb->context;
+ p_priv = usb_get_serial_port_data(port);
+
+ if (p_priv->resend_cont) {
+ dbg ("%s - sending setup", __FUNCTION__);
+ keyspan_usa90_send_setup(port->serial, port, p_priv->resend_cont - 1);
+ }
+}
+
+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;
+ int data_len;
+ struct urb *this_urb;
+
+ dbg("%s", __FUNCTION__);
+ p_priv = usb_get_serial_port_data(port);
+ d_details = p_priv->device_details;
+
+ if (d_details->msg_format == msg_usa90)
+ data_len = 64;
+ else
+ data_len = 63;
+
+ flip = p_priv->out_flip;
+
+ /* Check both endpoints to see if any are available. */
+ if ((this_urb = p_priv->out_urbs[flip]) != NULL) {
+ if (this_urb->status != -EINPROGRESS)
+ return (data_len);
+ flip = (flip + 1) & d_details->outdat_endp_flip;
+ if ((this_urb = p_priv->out_urbs[flip]) != NULL)
+ if (this_urb->status != -EINPROGRESS)
+ return (data_len);
+ }
+ return (0);
+}
+
+
+static int keyspan_chars_in_buffer (struct usb_serial_port *port)
+{
+ return (0);
+}
+
+
+static int keyspan_open (struct usb_serial_port *port, struct file *filp)
+{
+ 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;
+ int baud_rate, device_port;
+ struct urb *urb;
+ unsigned int cflag;
+
+ s_priv = usb_get_serial_data(serial);
+ p_priv = usb_get_serial_port_data(port);
+ d_details = p_priv->device_details;
+
+ dbg("%s - port%d.", __FUNCTION__, port->number);
+
+ /* Set some sane defaults */
+ p_priv->rts_state = 1;
+ p_priv->dtr_state = 1;
+ p_priv->baud = 9600;
+
+ /* force baud and lcr to be set on open */
+ p_priv->old_baud = 0;
+ p_priv->old_cflag = 0;
+
+ 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;
+
+ /* make sure endpoint data toggle is synchronized with the device */
+
+ usb_clear_halt(urb->dev, urb->pipe);
+
+ if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 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); */
+ }
+
+ /* get the terminal config for the setup message now so we don't
+ * need to send 2 of them */
+
+ 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. */
+ baud_rate = tty_get_baud_rate(port->tty);
+ /* If no match or invalid, leave as default */
+ if (baud_rate >= 0
+ && d_details->calculate_baud_rate(baud_rate, d_details->baudclk,
+ NULL, NULL, NULL, device_port) == KEYSPAN_BAUD_RATE_OK) {
+ p_priv->baud = baud_rate;
+ }
+
+ /* set CTS/RTS handshake etc. */
+ p_priv->cflag = cflag;
+ p_priv->flow_control = (cflag & CRTSCTS)? flow_cts: flow_none;
+
+ 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 &= ~URB_ASYNC_UNLINK;
+ usb_kill_urb(urb);
+ }
+}
+
+static void keyspan_close(struct usb_serial_port *port, struct file *filp)
+{
+ int i;
+ struct usb_serial *serial = port->serial;
+ struct keyspan_serial_private *s_priv;
+ struct keyspan_port_private *p_priv;
+
+ dbg("%s", __FUNCTION__);
+ s_priv = usb_get_serial_data(serial);
+ p_priv = usb_get_serial_port_data(port);
+
+ 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 = NULL;
+}
+
+
+ /* download the firmware to a pre-renumeration device */
+static int keyspan_fake_startup (struct usb_serial *serial)
+{
+ int response;
+ const struct ezusb_hex_record *record;
+ char *fw_name;
+
+ dbg("Keyspan startup version %04x product %04x",
+ le16_to_cpu(serial->dev->descriptor.bcdDevice),
+ le16_to_cpu(serial->dev->descriptor.idProduct));
+
+ if ((le16_to_cpu(serial->dev->descriptor.bcdDevice) & 0x8000) != 0x8000) {
+ dbg("Firmware already loaded. Quitting.");
+ return(1);
+ }
+
+ /* Select firmware image on the basis of idProduct */
+ switch (le16_to_cpu(serial->dev->descriptor.idProduct)) {
+ case keyspan_usa28_pre_product_id:
+ record = &keyspan_usa28_firmware[0];
+ fw_name = "USA28";
+ break;
+
+ case keyspan_usa28x_pre_product_id:
+ record = &keyspan_usa28x_firmware[0];
+ fw_name = "USA28X";
+ break;
+
+ case keyspan_usa28xa_pre_product_id:
+ record = &keyspan_usa28xa_firmware[0];
+ fw_name = "USA28XA";
+ break;
+
+ case keyspan_usa28xb_pre_product_id:
+ record = &keyspan_usa28xb_firmware[0];
+ fw_name = "USA28XB";
+ break;
+
+ case keyspan_usa19_pre_product_id:
+ record = &keyspan_usa19_firmware[0];
+ fw_name = "USA19";
+ break;
+
+ case keyspan_usa19qi_pre_product_id:
+ record = &keyspan_usa19qi_firmware[0];
+ fw_name = "USA19QI";
+ break;
+
+ case keyspan_mpr_pre_product_id:
+ record = &keyspan_mpr_firmware[0];
+ fw_name = "MPR";
+ 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";
+ break;
+
+ case keyspan_usa19w_pre_product_id:
+ record = &keyspan_usa19w_firmware[0];
+ fw_name = "USA19W";
+ break;
+
+ case keyspan_usa49w_pre_product_id:
+ record = &keyspan_usa49w_firmware[0];
+ fw_name = "USA49W";
+ break;
+
+ case keyspan_usa49wlc_pre_product_id:
+ record = &keyspan_usa49wlc_firmware[0];
+ fw_name = "USA49WLC";
+ break;
+
+ default:
+ record = NULL;
+ fw_name = "Unknown";
+ break;
+ }
+
+ if (record == NULL) {
+ dev_err(&serial->dev->dev, "Required keyspan firmware image (%s) unavailable.\n", fw_name);
+ return(1);
+ }
+
+ dbg("Uploading Keyspan %s firmware.", fw_name);
+
+ /* download the firmware image */
+ response = ezusb_set_reset(serial, 1);
+
+ while(record->address != 0xffff) {
+ response = ezusb_writememory(serial, record->address,
+ (unsigned char *)record->data,
+ record->data_size, 0xa0);
+ if (response < 0) {
+ dev_err(&serial->dev->dev, "ezusb_writememory failed for Keyspan"
+ "firmware (%d %04X %p %d)\n",
+ response,
+ record->address, record->data, record->data_size);
+ break;
+ }
+ record++;
+ }
+ /* bring device out of reset. Renumeration will occur in a
+ moment and the new device will bind to the real driver */
+ response = ezusb_set_reset(serial, 0);
+
+ /* we don't want this device to have a driver assigned to it. */
+ return (1);
+}
+
+/* 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 pt_regs *regs))
+{
+ struct urb *urb;
+
+ if (endpoint == -1)
+ return NULL; /* endpoint not needed */
+
+ dbg ("%s - alloc for endpoint %d.", __FUNCTION__, endpoint);
+ urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
+ if (urb == NULL) {
+ dbg ("%s - alloc for endpoint %d failed.", __FUNCTION__, endpoint);
+ return NULL;
+ }
+
+ /* Fill URB using supplied data. */
+ usb_fill_bulk_urb(urb, serial->dev,
+ usb_sndbulkpipe(serial->dev, endpoint) | dir,
+ buf, len, callback, ctx);
+
+ return urb;
+}
+
+static struct callbacks {
+ void (*instat_callback)(struct urb *, struct pt_regs *regs);
+ void (*glocont_callback)(struct urb *, struct pt_regs *regs);
+ void (*indat_callback)(struct urb *, struct pt_regs *regs);
+ void (*outdat_callback)(struct urb *, struct pt_regs *regs);
+ void (*inack_callback)(struct urb *, struct pt_regs *regs);
+ void (*outcont_callback)(struct urb *, struct pt_regs *regs);
+} 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,
+ }, {
+ /* msg_usa90 callbacks */
+ .instat_callback = usa90_instat_callback,
+ .glocont_callback = usa28_glocont_callback,
+ .indat_callback = usa90_indat_callback,
+ .outdat_callback = usa2x_outdat_callback,
+ .inack_callback = usa28_inack_callback,
+ .outcont_callback = usa90_outcont_callback,
+ }
+};
+
+ /* Generic setup urbs function that uses
+ data in device_details */
+static void keyspan_setup_urbs(struct usb_serial *serial)
+{
+ 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 = usb_get_serial_data(serial);
+ d_details = s_priv->device_details;
+
+ /* Setup values for the various callback routines */
+ cback = &keyspan_callbacks[d_details->msg_format];
+
+ /* Allocate and set up urbs for each one that is in use,
+ starting with instat endpoints */
+ s_priv->instat_urb = keyspan_setup_urb
+ (serial, d_details->instat_endpoint, USB_DIR_IN,
+ serial, s_priv->instat_buf, INSTAT_BUFLEN,
+ cback->instat_callback);
+
+ s_priv->glocont_urb = keyspan_setup_urb
+ (serial, d_details->glocont_endpoint, USB_DIR_OUT,
+ serial, s_priv->glocont_buf, GLOCONT_BUFLEN,
+ cback->glocont_callback);
+
+ /* Setup endpoints for each port specific thing */
+ for (i = 0; i < d_details->num_ports; i ++) {
+ port = serial->port[i];
+ p_priv = usb_get_serial_port_data(port);
+
+ /* Do indat endpoints first, once for each flip */
+ endp = d_details->indat_endpoints[i];
+ for (j = 0; j <= d_details->indat_endp_flip; ++j, ++endp) {
+ p_priv->in_urbs[j] = keyspan_setup_urb
+ (serial, endp, USB_DIR_IN, port,
+ p_priv->in_buffer[j], 64,
+ cback->indat_callback);
+ }
+ for (; j < 2; ++j)
+ p_priv->in_urbs[j] = NULL;
+
+ /* outdat endpoints also have flip */
+ endp = d_details->outdat_endpoints[i];
+ for (j = 0; j <= d_details->outdat_endp_flip; ++j, ++endp) {
+ p_priv->out_urbs[j] = keyspan_setup_urb
+ (serial, endp, USB_DIR_OUT, port,
+ p_priv->out_buffer[j], 64,
+ cback->outdat_callback);
+ }
+ for (; j < 2; ++j)
+ p_priv->out_urbs[j] = NULL;
+
+ /* inack endpoint */
+ p_priv->inack_urb = keyspan_setup_urb
+ (serial, d_details->inack_endpoints[i], USB_DIR_IN,
+ port, p_priv->inack_buffer, 1, cback->inack_callback);
+
+ /* outcont endpoint */
+ p_priv->outcont_urb = keyspan_setup_urb
+ (serial, d_details->outcont_endpoints[i], USB_DIR_OUT,
+ port, p_priv->outcont_buffer, 64,
+ cback->outcont_callback);
+ }
+
+}
+
+/* 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) {
+ return (KEYSPAN_INVALID_BAUD_RATE);
+ }
+
+ /* Any "standard" rate over 57k6 is marginal on the USA-19
+ as we run out of divisor resolution. */
+ if (baud_rate > 57600) {
+ return (KEYSPAN_INVALID_BAUD_RATE);
+ }
+
+ /* calculate the divisor and the counter (its inverse) */
+ if( (div = (baudclk / b16)) == 0) {
+ return (KEYSPAN_INVALID_BAUD_RATE);
+ }
+ else {
+ cnt = 0 - div;
+ }
+
+ if(div > 0xffff) {
+ return (KEYSPAN_INVALID_BAUD_RATE);
+ }
+
+ /* return the counter values if non-null */
+ if (rate_low) {
+ *rate_low = (u8) (cnt & 0xff);
+ }
+ if (rate_hi) {
+ *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);
+}
+
+/* usa19hs function doesn't require prescaler */
+static int keyspan_usa19hs_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 */
+
+ dbg ("%s - %d.", __FUNCTION__, baud_rate);
+
+ /* prevent divide by zero... */
+ if( (b16 = (baud_rate * 16L)) == 0)
+ return (KEYSPAN_INVALID_BAUD_RATE);
+
+
+
+ /* calculate the divisor */
+ if( (div = (baudclk / b16)) == 0)
+ return (KEYSPAN_INVALID_BAUD_RATE);
+
+ if(div > 0xffff)
+ return (KEYSPAN_INVALID_BAUD_RATE);
+
+ /* return the counter values if non-null */
+ if (rate_low)
+ *rate_low = (u8) (div & 0xff);
+
+ if (rate_hi)
+ *rate_hi = (u8) ((div >> 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 */
+ div, /* divisor using 13/8 prescaler */
+ res, /* resulting baud rate using 13/8 prescaler */
+ diff, /* error using 13/8 prescaler */
+ smallest_diff;
+ u8 best_prescaler;
+ int i;
+
+ dbg ("%s - %d.", __FUNCTION__, baud_rate);
+
+ /* prevent divide by zero */
+ if( (b16 = baud_rate * 16L) == 0) {
+ return (KEYSPAN_INVALID_BAUD_RATE);
+ }
+
+ /* Calculate prescaler by trying them all and looking
+ for best fit */
+
+ /* start with largest possible difference */
+ smallest_diff = 0xffffffff;
+
+ /* 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) {
+ continue;
+ }
+
+ res = clk / div;
+ diff= (res > b16) ? (res-b16) : (b16-res);
+
+ if(diff < smallest_diff) {
+ best_prescaler = i;
+ smallest_diff = diff;
+ }
+ }
+
+ if(best_prescaler == 0) {
+ return (KEYSPAN_INVALID_BAUD_RATE);
+ }
+
+ clk = (baudclk * 8) / (u32) best_prescaler;
+ div = clk / b16;
+
+ /* return the divisor and prescaler if non-null */
+ if (rate_low) {
+ *rate_low = (u8) (div & 0xff);
+ }
+ if (rate_hi) {
+ *rate_hi = (u8) ((div >> 8) & 0xff);
+ }
+ 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);
+}
+
+static int keyspan_usa26_send_setup(struct usb_serial *serial,
+ struct usb_serial_port *port,
+ int reset_port)
+{
+ 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 = usb_get_serial_data(serial);
+ p_priv = usb_get_serial_port_data(port);
+ 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__); */
+ mdelay(5);
+ return(-1);
+ }
+
+ memset(&msg, 0, sizeof (struct keyspan_usa26_portControlMessage));
+
+ /* Only set baud rate if it's changed */
+ if (p_priv->old_baud != p_priv->baud) {
+ p_priv->old_baud = p_priv->baud;
+ 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 */
+ msg.prescaler = 10;
+ }
+ msg.setPrescaler = 0xff;
+ }
+
+ msg.lcr = (p_priv->cflag & CSTOPB)? STOPBITS_678_2: STOPBITS_5678_1;
+ switch (p_priv->cflag & CSIZE) {
+ case CS5:
+ msg.lcr |= USA_DATABITS_5;
+ break;
+ case CS6:
+ msg.lcr |= USA_DATABITS_6;
+ break;
+ case CS7:
+ msg.lcr |= USA_DATABITS_7;
+ break;
+ case CS8:
+ msg.lcr |= USA_DATABITS_8;
+ break;
+ }
+ if (p_priv->cflag & PARENB) {
+ /* note USA_PARITY_NONE == 0 */
+ msg.lcr |= (p_priv->cflag & PARODD)?
+ USA_PARITY_ODD: USA_PARITY_EVEN;
+ }
+ msg.setLcr = 0xff;
+
+ 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;
+ 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.txBreak = (p_priv->break_on);
+ msg.rxOn = 0;
+ msg.rxOff = 0;
+ msg.rxFlush = 0;
+ msg.rxForward = 0;
+ msg.returnStatus = 0;
+ msg.resetDataToggle = 0x0;
+ }
+
+ /* Do handshaking outputs */
+ msg.setTxTriState_setRts = 0xff;
+ msg.txTriState_rts = p_priv->rts_state;
+
+ msg.setHskoa_setDtr = 0xff;
+ msg.hskoa_dtr = p_priv->dtr_state;
+
+ p_priv->resend_cont = 0;
+ memcpy (this_urb->transfer_buffer, &msg, sizeof(msg));
+
+ /* send the data out the device on control endpoint */
+ this_urb->transfer_buffer_length = sizeof(msg);
+
+ this_urb->dev = serial->dev;
+ if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 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));
+ }
+#endif
+
+ return (0);
+}
+
+static int keyspan_usa28_send_setup(struct usb_serial *serial,
+ struct usb_serial_port *port,
+ int reset_port)
+{
+ 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 = usb_get_serial_data(serial);
+ p_priv = usb_get_serial_port_data(port);
+ 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__);
+ mdelay(5);
+ 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 */
+ }
+
+ /* If parity is enabled, we must calculate it ourselves. */
+ msg.parity = 0; /* XXX for now */
+
+ msg.ctsFlowControl = (p_priv->flow_control == flow_cts);
+ msg.xonFlowControl = 0;
+
+ /* Do handshaking outputs, DTR is inverted relative to RTS */
+ 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));
+
+ /* send the data out the device on control endpoint */
+ this_urb->transfer_buffer_length = sizeof(msg);
+
+ this_urb->dev = serial->dev;
+ if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 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
+
+ return (0);
+}
+
+static int keyspan_usa49_send_setup(struct usb_serial *serial,
+ struct usb_serial_port *port,
+ int reset_port)
+{
+ 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 = usb_get_serial_data(serial);
+ p_priv = usb_get_serial_port_data(port);
+ d_details = s_priv->device_details;
+
+ glocont_urb = d_details->glocont_endpoint;
+ this_urb = s_priv->glocont_urb;
+
+ /* 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__); */
+ mdelay(5);
+ return(-1);
+ }
+
+ memset(&msg, 0, sizeof (struct keyspan_usa49_portControlMessage));
+
+ /*msg.portNumber = port->number;*/
+ msg.portNumber = device_port;
+
+ /* Only set baud rate if it's changed */
+ if (p_priv->old_baud != p_priv->baud) {
+ p_priv->old_baud = p_priv->baud;
+ 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 */
+ msg.prescaler = 10;
+ }
+ //msg.setPrescaler = 0xff;
+ }
+
+ msg.lcr = (p_priv->cflag & CSTOPB)? STOPBITS_678_2: STOPBITS_5678_1;
+ switch (p_priv->cflag & CSIZE) {
+ case CS5:
+ msg.lcr |= USA_DATABITS_5;
+ break;
+ case CS6:
+ msg.lcr |= USA_DATABITS_6;
+ break;
+ case CS7:
+ msg.lcr |= USA_DATABITS_7;
+ break;
+ case CS8:
+ msg.lcr |= USA_DATABITS_8;
+ break;
+ }
+ if (p_priv->cflag & PARENB) {
+ /* note USA_PARITY_NONE == 0 */
+ msg.lcr |= (p_priv->cflag & PARODD)?
+ USA_PARITY_ODD: USA_PARITY_EVEN;
+ }
+ msg.setLcr = 0xff;
+
+ 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;
+ 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;
+ msg.rts = p_priv->rts_state;
+
+ msg.setDtr = 0xff;
+ msg.dtr = p_priv->dtr_state;
+
+ p_priv->resend_cont = 0;
+ memcpy (this_urb->transfer_buffer, &msg, sizeof(msg));
+
+ /* send the data out the device on control endpoint */
+ this_urb->transfer_buffer_length = sizeof(msg);
+
+ this_urb->dev = serial->dev;
+ if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 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));
+ }
+#endif
+
+ return (0);
+}
+
+static int keyspan_usa90_send_setup(struct usb_serial *serial,
+ struct usb_serial_port *port,
+ int reset_port)
+{
+ struct keyspan_usa90_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 err;
+ u8 prescaler;
+
+ dbg ("%s", __FUNCTION__);
+
+ s_priv = usb_get_serial_data(serial);
+ p_priv = usb_get_serial_port_data(port);
+ 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("%s - oops no urb.", __FUNCTION__);
+ return -1;
+ }
+
+ /* Save reset port val for resend.
+ Don't overwrite resend for open/close condition. */
+ if ((reset_port + 1) > p_priv->resend_cont)
+ p_priv->resend_cont = reset_port + 1;
+ if (this_urb->status == -EINPROGRESS) {
+ dbg ("%s already writing", __FUNCTION__);
+ mdelay(5);
+ return(-1);
+ }
+
+ memset(&msg, 0, sizeof (struct keyspan_usa90_portControlMessage));
+
+ /* Only set baud rate if it's changed */
+ if (p_priv->old_baud != p_priv->baud) {
+ p_priv->old_baud = p_priv->baud;
+ msg.setClocking = 0x01;
+ if (d_details->calculate_baud_rate
+ (p_priv->baud, d_details->baudclk, &msg.baudHi,
+ &msg.baudLo, &prescaler, 0) == KEYSPAN_INVALID_BAUD_RATE ) {
+ dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
+ p_priv->baud);
+ p_priv->baud = 9600;
+ d_details->calculate_baud_rate (p_priv->baud, d_details->baudclk,
+ &msg.baudHi, &msg.baudLo, &prescaler, 0);
+ }
+ msg.setRxMode = 1;
+ msg.setTxMode = 1;
+ }
+
+ /* modes must always be correctly specified */
+ if (p_priv->baud > 57600)
+ {
+ msg.rxMode = RXMODE_DMA;
+ msg.txMode = TXMODE_DMA;
+ }
+ else
+ {
+ msg.rxMode = RXMODE_BYHAND;
+ msg.txMode = TXMODE_BYHAND;
+ }
+
+ msg.lcr = (p_priv->cflag & CSTOPB)? STOPBITS_678_2: STOPBITS_5678_1;
+ switch (p_priv->cflag & CSIZE) {
+ case CS5:
+ msg.lcr |= USA_DATABITS_5;
+ break;
+ case CS6:
+ msg.lcr |= USA_DATABITS_6;
+ break;
+ case CS7:
+ msg.lcr |= USA_DATABITS_7;
+ break;
+ case CS8:
+ msg.lcr |= USA_DATABITS_8;
+ break;
+ }
+ if (p_priv->cflag & PARENB) {
+ /* note USA_PARITY_NONE == 0 */
+ msg.lcr |= (p_priv->cflag & PARODD)?
+ USA_PARITY_ODD: USA_PARITY_EVEN;
+ }
+ if (p_priv->old_cflag != p_priv->cflag) {
+ p_priv->old_cflag = p_priv->cflag;
+ msg.setLcr = 0x01;
+ }
+
+ if (p_priv->flow_control == flow_cts)
+ msg.txFlowControl = TXFLOW_CTS;
+ msg.setTxFlowControl = 0x01;
+ msg.setRxFlowControl = 0x01;
+
+ msg.rxForwardingLength = 16;
+ msg.rxForwardingTimeout = 16;
+ msg.txAckSetting = 0;
+ msg.xonChar = 17;
+ msg.xoffChar = 19;
+
+ /* Opening port */
+ if (reset_port == 1) {
+ msg.portEnabled = 1;
+ msg.rxFlush = 1;
+ msg.txBreak = (p_priv->break_on);
+ }
+ /* Closing port */
+ else if (reset_port == 2) {
+ msg.portEnabled = 0;
+ }
+ /* Sending intermediate configs */
+ else {
+ if (port->open_count)
+ msg.portEnabled = 1;
+ msg.txBreak = (p_priv->break_on);
+ }
+
+ /* Do handshaking outputs */
+ msg.setRts = 0x01;
+ msg.rts = p_priv->rts_state;
+
+ msg.setDtr = 0x01;
+ msg.dtr = p_priv->dtr_state;
+
+ p_priv->resend_cont = 0;
+ memcpy (this_urb->transfer_buffer, &msg, sizeof(msg));
+
+ /* send the data out the device on control endpoint */
+ this_urb->transfer_buffer_length = sizeof(msg);
+
+ this_urb->dev = serial->dev;
+ if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
+ dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
+ }
+ return (0);
+}
+
+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 = usb_get_serial_data(serial);
+ d_details = s_priv->device_details;
+
+ switch (d_details->msg_format) {
+ case msg_usa26:
+ keyspan_usa26_send_setup(serial, port, reset_port);
+ break;
+ case msg_usa28:
+ keyspan_usa28_send_setup(serial, port, reset_port);
+ break;
+ case msg_usa49:
+ keyspan_usa49_send_setup(serial, port, reset_port);
+ break;
+ case msg_usa90:
+ keyspan_usa90_send_setup(serial, port, reset_port);
+ break;
+ }
+}
+
+
+/* Gets called by the "real" driver (ie once firmware is loaded
+ and renumeration has taken place. */
+static int keyspan_startup (struct usb_serial *serial)
+{
+ int i, err;
+ 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 == le16_to_cpu(serial->dev->descriptor.idProduct))
+ break;
+ if (d_details == NULL) {
+ dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, le16_to_cpu(serial->dev->descriptor.idProduct));
+ return 1;
+ }
+
+ /* Setup private data for serial driver */
+ s_priv = kmalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL);
+ if (!s_priv) {
+ dbg("%s - kmalloc for keyspan_serial_private failed.", __FUNCTION__);
+ return -ENOMEM;
+ }
+ memset(s_priv, 0, sizeof(struct keyspan_serial_private));
+
+ s_priv->device_details = d_details;
+ usb_set_serial_data(serial, s_priv);
+
+ /* Now setup per port private data */
+ for (i = 0; i < serial->num_ports; i++) {
+ port = serial->port[i];
+ p_priv = kmalloc(sizeof(struct keyspan_port_private), GFP_KERNEL);
+ if (!p_priv) {
+ dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i);
+ return (1);
+ }
+ memset(p_priv, 0, sizeof(struct keyspan_port_private));
+ p_priv->device_details = d_details;
+ usb_set_serial_port_data(port, p_priv);
+ }
+
+ keyspan_setup_urbs(serial);
+
+ s_priv->instat_urb->dev = serial->dev;
+ if ((err = usb_submit_urb(s_priv->instat_urb, GFP_KERNEL)) != 0) {
+ dbg("%s - submit instat urb failed %d", __FUNCTION__, err);
+ }
+
+ return (0);
+}
+
+static void keyspan_shutdown (struct usb_serial *serial)
+{
+ int i, j;
+ struct usb_serial_port *port;
+ struct keyspan_serial_private *s_priv;
+ struct keyspan_port_private *p_priv;
+
+ dbg("%s", __FUNCTION__);
+
+ s_priv = usb_get_serial_data(serial);
+
+ /* Stop reading/writing urbs */
+ stop_urb(s_priv->instat_urb);
+ stop_urb(s_priv->glocont_urb);
+ for (i = 0; i < serial->num_ports; ++i) {
+ port = serial->port[i];
+ p_priv = usb_get_serial_port_data(port);
+ stop_urb(p_priv->inack_urb);
+ stop_urb(p_priv->outcont_urb);
+ for (j = 0; j < 2; j++) {
+ stop_urb(p_priv->in_urbs[j]);
+ stop_urb(p_priv->out_urbs[j]);
+ }
+ }
+
+ /* Now free them */
+ if (s_priv->instat_urb)
+ usb_free_urb(s_priv->instat_urb);
+ if (s_priv->glocont_urb)
+ usb_free_urb(s_priv->glocont_urb);
+ for (i = 0; i < serial->num_ports; ++i) {
+ port = serial->port[i];
+ p_priv = usb_get_serial_port_data(port);
+ if (p_priv->inack_urb)
+ usb_free_urb(p_priv->inack_urb);
+ if (p_priv->outcont_urb)
+ usb_free_urb(p_priv->outcont_urb);
+ for (j = 0; j < 2; j++) {
+ if (p_priv->in_urbs[j])
+ usb_free_urb(p_priv->in_urbs[j]);
+ if (p_priv->out_urbs[j])
+ usb_free_urb(p_priv->out_urbs[j]);
+ }
+ }
+
+ /* dbg("Freeing serial->private."); */
+ kfree(s_priv);
+
+ /* dbg("Freeing port->private."); */
+ /* Now free per port private data */
+ for (i = 0; i < serial->num_ports; i++) {
+ port = serial->port[i];
+ kfree(usb_get_serial_port_data(port));
+ }
+}
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
diff --git a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h
new file mode 100644
index 000000000000..e9b45b768aca
--- /dev/null
+++ b/drivers/usb/serial/keyspan.h
@@ -0,0 +1,660 @@
+/*
+ Keyspan USB to Serial Converter driver
+
+ (C) Copyright (C) 2000-2001
+ Hugh Blemings <hugh@blemings.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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ See http://misc.nu/hugh/keyspan.html for more information.
+
+ Code in this driver inspired by and in a number of places taken
+ from Brian Warner's original Keyspan-PDA driver.
+
+ This driver has been put together with the support of Innosys, Inc.
+ and Keyspan, Inc the manufacturers of the Keyspan USB-serial products.
+ Thanks Guys :)
+
+ Thanks to Paulus for miscellaneous tidy ups, some largish chunks
+ of much nicer and/or completely new code and (perhaps most uniquely)
+ having the patience to sit down and explain why and where he'd changed
+ stuff.
+
+ Tip 'o the hat to IBM (and previously Linuxcare :) for supporting
+ staff in their work on open source projects.
+
+ See keyspan.c for update history.
+
+*/
+
+#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,
+ struct file *filp);
+static int keyspan_startup (struct usb_serial *serial);
+static void keyspan_shutdown (struct usb_serial *serial);
+static void keyspan_rx_throttle (struct usb_serial_port *port);
+static void keyspan_rx_unthrottle (struct usb_serial_port *port);
+static int keyspan_write_room (struct usb_serial_port *port);
+
+static int keyspan_write (struct usb_serial_port *port,
+ const unsigned char *buf,
+ int count);
+
+static void keyspan_send_setup (struct usb_serial_port *port,
+ int reset_port);
+
+
+static int keyspan_chars_in_buffer (struct usb_serial_port *port);
+static int keyspan_ioctl (struct usb_serial_port *port,
+ struct file *file,
+ unsigned int cmd,
+ unsigned long arg);
+static void keyspan_set_termios (struct usb_serial_port *port,
+ struct termios *old);
+static void keyspan_break_ctl (struct usb_serial_port *port,
+ int break_state);
+static int keyspan_tiocmget (struct usb_serial_port *port,
+ struct file *file);
+static int keyspan_tiocmset (struct usb_serial_port *port,
+ struct file *file, unsigned int set,
+ unsigned int clear);
+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_usa19hs_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,
+ int reset_port);
+static int keyspan_usa26_send_setup (struct usb_serial *serial,
+ struct usb_serial_port *port,
+ int reset_port);
+static int keyspan_usa49_send_setup (struct usb_serial *serial,
+ struct usb_serial_port *port,
+ int reset_port);
+
+static int keyspan_usa90_send_setup (struct usb_serial *serial,
+ 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_MPR
+ #include "keyspan_mpr_fw.h"
+#else
+ static const struct ezusb_hex_record *keyspan_mpr_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
+
+#ifdef CONFIG_USB_SERIAL_KEYSPAN_USA49WLC
+ #include "keyspan_usa49wlc_fw.h"
+#else
+ static const struct ezusb_hex_record *keyspan_usa49wlc_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_USA19HS_BAUDCLK (14769231L)
+#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_mpr_pre_product_id 0x011b
+#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
+#define keyspan_usa28xa_pre_product_id 0x0114
+#define keyspan_usa28xb_pre_product_id 0x0113
+#define keyspan_usa49w_pre_product_id 0x0109
+#define keyspan_usa49wlc_pre_product_id 0x011a
+
+/* 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_usa19hs_product_id 0x0121
+#define keyspan_mpr_product_id 0x011c
+#define keyspan_usa19qw_product_id 0x0119
+#define keyspan_usa19w_product_id 0x0108
+#define keyspan_usa28_product_id 0x010f
+#define keyspan_usa28x_product_id 0x0110
+#define keyspan_usa28xa_product_id 0x0115
+#define keyspan_usa28xb_product_id 0x0110
+#define keyspan_usa49w_product_id 0x010a
+#define keyspan_usa49wlc_product_id 0x012a
+
+
+struct keyspan_device_details {
+ /* product ID value */
+ int product_id;
+
+ enum {msg_usa26, msg_usa28, msg_usa49, msg_usa90} msg_format;
+
+ /* Number of physical ports */
+ int num_ports;
+
+ /* 1 if endpoint flipping used on input, 0 if not */
+ int indat_endp_flip;
+
+ /* 1 if endpoint flipping used on output, 0 if not */
+ int outdat_endp_flip;
+
+ /* Table mapping input data endpoint IDs to physical
+ port number and flip if used */
+ int indat_endpoints[KEYSPAN_MAX_NUM_PORTS];
+
+ /* Same for output endpoints */
+ int outdat_endpoints[KEYSPAN_MAX_NUM_PORTS];
+
+ /* 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 mpr_device_details = {
+ .product_id = keyspan_mpr_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 usa19hs_device_details = {
+ .product_id = keyspan_usa19hs_product_id,
+ .msg_format = msg_usa90,
+ .num_ports = 1,
+ .indat_endp_flip = 0,
+ .outdat_endp_flip = 0,
+ .indat_endpoints = {0x81},
+ .outdat_endpoints = {0x01},
+ .inack_endpoints = {-1},
+ .outcont_endpoints = {0x02},
+ .instat_endpoint = 0x82,
+ .glocont_endpoint = -1,
+ .calculate_baud_rate = keyspan_usa19hs_calc_baud,
+ .baudclk = KEYSPAN_USA19HS_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 usa49wlc_device_details = {
+ .product_id = keyspan_usa49wlc_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_USA19W_BAUDCLK,
+};
+
+static const struct keyspan_device_details *keyspan_devices[] = {
+ &usa18x_device_details,
+ &usa19_device_details,
+ &usa19qi_device_details,
+ &mpr_device_details,
+ &usa19qw_device_details,
+ &usa19w_device_details,
+ &usa19hs_device_details,
+ &usa28_device_details,
+ &usa28x_device_details,
+ &usa28xa_device_details,
+ /* 28xb not required as it renumerates as a 28x */
+ &usa49w_device_details,
+ &usa49wlc_device_details,
+ NULL,
+};
+
+static 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_mpr_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) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49wlc_pre_product_id) },
+ { 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_usa19hs_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_mpr_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) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id)},
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49wlc_product_id)},
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
+
+static struct usb_driver keyspan_driver = {
+ .owner = THIS_MODULE,
+ .name = "keyspan",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = 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_mpr_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) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49wlc_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) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19hs_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_mpr_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) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_product_id) },
+ { } /* Terminating entry */
+};
+
+static struct usb_device_id keyspan_4port_ids[] = {
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49wlc_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)",
+ .short_name = "keyspan_no_firm",
+ .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,
+ .attach = keyspan_fake_startup,
+};
+
+static struct usb_serial_device_type keyspan_1port_device = {
+ .owner = THIS_MODULE,
+ .name = "Keyspan 1 port adapter",
+ .short_name = "keyspan_1",
+ .id_table = keyspan_1port_ids,
+ .num_interrupt_in = NUM_DONT_CARE,
+ .num_bulk_in = NUM_DONT_CARE,
+ .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .open = keyspan_open,
+ .close = keyspan_close,
+ .write = keyspan_write,
+ .write_room = keyspan_write_room,
+ .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,
+ .tiocmget = keyspan_tiocmget,
+ .tiocmset = keyspan_tiocmset,
+ .attach = keyspan_startup,
+ .shutdown = keyspan_shutdown,
+};
+
+static struct usb_serial_device_type keyspan_2port_device = {
+ .owner = THIS_MODULE,
+ .name = "Keyspan 2 port adapter",
+ .short_name = "keyspan_2",
+ .id_table = keyspan_2port_ids,
+ .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,
+ .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,
+ .tiocmget = keyspan_tiocmget,
+ .tiocmset = keyspan_tiocmset,
+ .attach = keyspan_startup,
+ .shutdown = keyspan_shutdown,
+};
+
+static struct usb_serial_device_type keyspan_4port_device = {
+ .owner = THIS_MODULE,
+ .name = "Keyspan 4 port adapter",
+ .short_name = "keyspan_4",
+ .id_table = keyspan_4port_ids,
+ .num_interrupt_in = NUM_DONT_CARE,
+ .num_bulk_in = 5,
+ .num_bulk_out = 5,
+ .num_ports = 4,
+ .open = keyspan_open,
+ .close = keyspan_close,
+ .write = keyspan_write,
+ .write_room = keyspan_write_room,
+ .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,
+ .tiocmget = keyspan_tiocmget,
+ .tiocmset = keyspan_tiocmset,
+ .attach = keyspan_startup,
+ .shutdown = keyspan_shutdown,
+};
+
+#endif
diff --git a/drivers/usb/serial/keyspan_mpr_fw.h b/drivers/usb/serial/keyspan_mpr_fw.h
new file mode 100644
index 000000000000..238805e91fb2
--- /dev/null
+++ b/drivers/usb/serial/keyspan_mpr_fw.h
@@ -0,0 +1,286 @@
+/* keyspan_mpr_fw.h
+
+ The firmware contained herein as keyspan_mpr_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 char theFirmwareDate53[] =
+ "04/26/2002 02:47p 11,570 USA53";
+*/
+
+static const struct ezusb_hex_record keyspan_mpr_firmware[] = {
+ {0x0033, 3, { 0x02, 0x00, 0x1a}},
+ {0x001a, 4, { 0x53, 0xd8, 0xef, 0x32}},
+ {0x0003, 16, { 0x8e, 0x56, 0x8f, 0x57, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x60}},
+ {0x0013, 7, { 0x05, 0x12, 0x0f, 0xa2, 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, 0x0b, 0x07, 0xa2, 0x0e, 0x92, 0x9b, 0x85, 0x36, 0x99, 0xc2, 0x99, 0xd2}},
+ {0x0066, 16, { 0x12, 0x20, 0x12, 0x03, 0x02, 0x02, 0xf9, 0xc2, 0x12, 0x30, 0x03, 0x19, 0x7e, 0x7e, 0x7f, 0x40}},
+ {0x0076, 16, { 0x75, 0x1a, 0x7e, 0x75, 0x1b, 0x40, 0x75, 0x17, 0x00, 0x7e, 0x7d, 0x7f, 0xc0, 0x75, 0x18, 0x7d}},
+ {0x0086, 16, { 0x75, 0x19, 0xc0, 0x80, 0x17, 0x7e, 0x7d, 0x7f, 0xc0, 0x75, 0x1a, 0x7d, 0x75, 0x1b, 0xc0, 0x75}},
+ {0x0096, 16, { 0x17, 0x01, 0x7e, 0x7e, 0x7f, 0x40, 0x75, 0x18, 0x7e, 0x75, 0x19, 0x40, 0x20, 0x0b, 0x03, 0x02}},
+ {0x00a6, 16, { 0x01, 0x84, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x3c, 0x20, 0x0c, 0x34, 0x20, 0x09, 0x31, 0x90}},
+ {0x00b6, 16, { 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x29, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0xe5, 0x1b}},
+ {0x00c6, 16, { 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x1a, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a}},
+ {0x00d6, 16, { 0xe5, 0x1b, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x1a, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0x02, 0x02, 0xf7}},
+ {0x00e6, 16, { 0xc2, 0x0b, 0x02, 0x02, 0xf7, 0x30, 0x03, 0x11, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xa3, 0xe0, 0x54}},
+ {0x00f6, 16, { 0x02, 0xf5, 0x1d, 0xa3, 0xe0, 0xf5, 0x1c, 0x80, 0x11, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0x90, 0x7f}},
+ {0x0043, 3, { 0x02, 0x0f, 0x00}},
+ {0x0000, 3, { 0x02, 0x00, 0x26}},
+ {0x0026, 12, { 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x5a, 0x02, 0x0a, 0x33}},
+ {0x0106, 64, { 0xc6, 0xe0, 0x54, 0x02, 0xf5, 0x1d, 0xa3, 0xe0, 0xf5, 0x1c, 0xe5, 0x17, 0x24, 0xff, 0x92, 0x03, 0x30,
+ 0x0d, 0x0d, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xc2, 0x0b, 0x02, 0x02, 0xf7, 0xe5,
+ 0x1d, 0x60, 0x05, 0xc2, 0x0b, 0x02, 0x02, 0xf7, 0x85, 0x1c, 0x53, 0x85, 0x19, 0x82, 0x85, 0x18,
+ 0x83, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x12, 0xff, 0x20, 0x0c, 0x3a, 0x20, 0x09, 0x37, 0x90}},
+ {0x0146, 64, { 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x2f, 0x30, 0x10, 0x1c, 0x85, 0x19, 0x82, 0x85, 0x18, 0x83, 0xa3,
+ 0xe0, 0x13, 0x92, 0x0e, 0x85, 0x19, 0x82, 0x85, 0x18, 0x83, 0xa3, 0xa3, 0xe0, 0xf5, 0x36, 0x75,
+ 0x3a, 0x03, 0x02, 0x02, 0xf7, 0x75, 0x3a, 0x02, 0x85, 0x19, 0x82, 0x85, 0x18, 0x83, 0xa3, 0xe0,
+ 0xf5, 0x36, 0x02, 0x02, 0xf7, 0x75, 0x3a, 0x01, 0xc2, 0x0b, 0x02, 0x02, 0xf7, 0x30, 0x03}},
+ {0x0186, 64, { 0x0e, 0x90, 0x7f, 0xc6, 0xe0, 0x54, 0x02, 0xf5, 0x1d, 0xa3, 0xe0, 0xf5, 0x1c, 0x80, 0x0c, 0x90, 0x7f,
+ 0xc8, 0xe0, 0x54, 0x02, 0xf5, 0x1d, 0xa3, 0xe0, 0xf5, 0x1c, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50,
+ 0x03, 0x02, 0x02, 0x68, 0xe5, 0x1d, 0x60, 0x07, 0xc2, 0x14, 0xc2, 0x05, 0x02, 0x02, 0xf7, 0x85,
+ 0x1c, 0x53, 0x85, 0x1b, 0x82, 0x85, 0x1a, 0x83, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x12, 0xff}},
+ {0x01c6, 64, { 0x30, 0x0c, 0x03, 0x02, 0x02, 0x60, 0x30, 0x09, 0x03, 0x02, 0x02, 0x60, 0x90, 0x7f, 0x9b, 0xe0, 0x55,
+ 0x38, 0x60, 0x03, 0x02, 0x02, 0x60, 0x30, 0x10, 0x1b, 0x85, 0x1b, 0x82, 0x85, 0x1a, 0x83, 0xa3,
+ 0xe0, 0x13, 0x92, 0x9b, 0x85, 0x1b, 0x82, 0x85, 0x1a, 0x83, 0xa3, 0xa3, 0xe0, 0xf5, 0x99, 0x75,
+ 0x3a, 0x03, 0x80, 0x0d, 0x85, 0x1b, 0x82, 0x85, 0x1a, 0x83, 0xa3, 0xe0, 0xf5, 0x99, 0x75}},
+ {0x0206, 64, { 0x3a, 0x02, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40, 0x26, 0x30, 0x03, 0x07, 0x90, 0x7f, 0xc7, 0xe4, 0xf0,
+ 0x80, 0x05, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xe5, 0x17, 0x24, 0xff, 0x92, 0x03, 0x20, 0x0d, 0x03,
+ 0x02, 0x02, 0xf7, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0x02, 0x02, 0xf7, 0x30, 0x10,
+ 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0xe5, 0x1b, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x1a, 0xf5, 0x83}},
+ {0x0246, 64, { 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a, 0xe5, 0x1b, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x1a, 0xf5,
+ 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b, 0x02, 0x02, 0xf7, 0x75, 0x3a, 0x01, 0xc2, 0x14, 0x02, 0x02,
+ 0xf7, 0x30, 0x0c, 0x03, 0x02, 0x02, 0xf5, 0x30, 0x09, 0x03, 0x02, 0x02, 0xf5, 0x90, 0x7f, 0x9b,
+ 0xe0, 0x55, 0x38, 0x70, 0x79, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0xe5, 0x1b, 0x2f}},
+ {0x0286, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x1a, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x9b, 0xaf, 0x3a, 0x05, 0x3a, 0xe5, 0x1b,
+ 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x1a, 0xf5, 0x83, 0xe0, 0xf5, 0x99, 0xe5, 0x3a, 0xc3, 0x95, 0x53,
+ 0x40, 0x22, 0x30, 0x03, 0x07, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xc9, 0xe4,
+ 0xf0, 0xe5, 0x17, 0x24, 0xff, 0x92, 0x03, 0x30, 0x0d, 0x36, 0xc2, 0x0d, 0x90, 0x7f, 0xbb}},
+ {0x02c6, 64, { 0x74, 0x01, 0xf0, 0x80, 0x2c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0xe5, 0x1b, 0x2f, 0xf5, 0x82,
+ 0xe4, 0x35, 0x1a, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a, 0xe5, 0x1b, 0x2f,
+ 0xf5, 0x82, 0xe4, 0x35, 0x1a, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b, 0x80, 0x02, 0xc2, 0x14,
+ 0xd2, 0x01, 0x20, 0x98, 0x03, 0x02, 0x04, 0x35, 0xc2, 0x98, 0x20, 0x02, 0x03, 0x02, 0x03}},
+ {0x0306, 64, { 0xa2, 0x20, 0x15, 0x27, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
+ 0x83, 0xe5, 0x99, 0xf0, 0x30, 0x10, 0x4d, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82,
+ 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x3a, 0x85, 0x99, 0x55, 0xe5, 0x55, 0xb5,
+ 0x47, 0x04, 0xd2, 0x09, 0x80, 0x2e, 0xe5, 0x55, 0xb5, 0x46, 0x04, 0xc2, 0x09, 0x80, 0x25}},
+ {0x0346, 64, { 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x55, 0xf0,
+ 0x30, 0x10, 0x11, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
+ 0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x0f, 0xe5, 0x39, 0xc3, 0x95, 0x43, 0x50, 0x03, 0x02, 0x04, 0x33,
+ 0x90, 0x7f, 0xb8, 0xe0, 0x30, 0xe1, 0x16, 0xe5, 0x39, 0xc3, 0x94, 0x40, 0x50, 0x03, 0x02}},
+ {0x0386, 64, { 0x04, 0x33, 0x15, 0x39, 0x15, 0x39, 0x05, 0x2b, 0x43, 0x34, 0x01, 0x02, 0x04, 0x33, 0x90, 0x7f, 0xb7,
+ 0xe5, 0x39, 0xf0, 0x75, 0x39, 0x00, 0xc2, 0x02, 0x02, 0x04, 0x33, 0x20, 0x15, 0x27, 0xaf, 0x39,
+ 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x99, 0xf0, 0x30,
+ 0x10, 0x4d, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5}},
+ {0x03c6, 64, { 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x3a, 0x85, 0x99, 0x55, 0xe5, 0x55, 0xb5, 0x47, 0x04, 0xd2, 0x09, 0x80,
+ 0x2e, 0xe5, 0x55, 0xb5, 0x46, 0x04, 0xc2, 0x09, 0x80, 0x25, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00,
+ 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x55, 0xf0, 0x30, 0x10, 0x11, 0xaf, 0x39,
+ 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0}},
+ {0x0406, 64, { 0xd2, 0x0f, 0xe5, 0x39, 0xc3, 0x95, 0x43, 0x40, 0x24, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x12, 0xe5,
+ 0x39, 0xc3, 0x94, 0x40, 0x40, 0x16, 0x15, 0x39, 0x15, 0x39, 0x05, 0x2b, 0x43, 0x34, 0x01, 0x80,
+ 0x0b, 0x90, 0x7f, 0xb9, 0xe5, 0x39, 0xf0, 0x75, 0x39, 0x00, 0xd2, 0x02, 0xd2, 0x01, 0x30, 0x01,
+ 0x05, 0xc2, 0x01, 0x02, 0x00, 0x56, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x82, 0xd0, 0x83, 0xd0}},
+ {0x0446, 64, { 0xe0, 0x32, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x54, 0xe5, 0x34, 0x60, 0x50, 0xe5, 0x31, 0x70, 0x4c,
+ 0xe5, 0x34, 0x30, 0xe1, 0x0b, 0xe4, 0xf5, 0x2f, 0x75, 0x34, 0x01, 0x75, 0x31, 0x02, 0x80, 0x0e,
+ 0xa2, 0x08, 0xe4, 0x33, 0xf5, 0x2f, 0xc2, 0x08, 0xe4, 0xf5, 0x34, 0x75, 0x31, 0x10, 0xe4, 0xf5,
+ 0x56, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x56, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
+ {0x0486, 64, { 0x0c, 0x79, 0xff, 0x74, 0x00, 0x25, 0x56, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xef, 0xf0, 0x05,
+ 0x56, 0xe5, 0x56, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd, 0x74, 0x0c, 0xf0, 0x90, 0x7f, 0xca, 0xe0,
+ 0x30, 0xe1, 0x03, 0x02, 0x05, 0xd1, 0xe4, 0xf5, 0x56, 0x74, 0x40, 0x25, 0x56, 0xf5, 0x82, 0xe4,
+ 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x56, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x3b, 0xf9}},
+ {0x04c6, 64, { 0xec, 0x34, 0x00, 0xfa, 0xef, 0x12, 0x0c, 0x92, 0x05, 0x56, 0xe5, 0x56, 0xb4, 0x18, 0xdb, 0xe5, 0x3b,
+ 0x60, 0x11, 0x75, 0xc9, 0x20, 0x75, 0xc8, 0x36, 0x85, 0x3c, 0xca, 0x85, 0x3d, 0xcb, 0xe4, 0x90,
+ 0x7f, 0x9f, 0xf0, 0xe5, 0x3e, 0x13, 0x92, 0x10, 0x92, 0x9f, 0x85, 0x3f, 0x38, 0xe5, 0x40, 0x13,
+ 0x92, 0x15, 0xe5, 0x41, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x07}},
+ {0x0506, 64, { 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x04, 0xf0, 0xe5, 0x42, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0x7f,
+ 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x48, 0x60, 0x0b, 0xc2, 0x0c,
+ 0xc2, 0x09, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x49, 0x60, 0x0c, 0xd2, 0x09, 0x43,
+ 0x34, 0x01, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x4a, 0x60, 0x0d, 0xc2, 0xaf}},
+ {0x0546, 64, { 0xc2, 0x0b, 0xd2, 0x00, 0xe4, 0xf5, 0x53, 0xf5, 0x3a, 0xd2, 0xaf, 0xe5, 0x4b, 0x60, 0x05, 0x30, 0x15,
+ 0x02, 0xd2, 0x09, 0xe5, 0x4c, 0x60, 0x15, 0x90, 0x7f, 0x95, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f,
+ 0x9e, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x4d, 0x60, 0x0a,
+ 0xd2, 0x9c, 0xc2, 0x98, 0x75, 0x2c, 0x01, 0x75, 0x31, 0x1e, 0xe5, 0x4e, 0x60, 0x07, 0xc2}},
+ {0x0586, 64, { 0x9c, 0xe4, 0xf5, 0x39, 0xf5, 0x2c, 0xe5, 0x4f, 0x60, 0x03, 0xe4, 0xf5, 0x39, 0xe5, 0x50, 0x60, 0x02,
+ 0xd2, 0x07, 0xe5, 0x51, 0x60, 0x0a, 0xe5, 0x4d, 0x70, 0x02, 0xf5, 0x31, 0xe5, 0x51, 0x42, 0x34,
+ 0xe5, 0x52, 0x60, 0x1f, 0x90, 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}},
+ {0x05c6, 64, { 0xd2, 0x03, 0xd2, 0x02, 0xd2, 0x08, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xa2, 0x0c, 0xe4, 0x33, 0xff, 0x65,
+ 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43, 0x34, 0x01, 0xa2, 0x09, 0xe4, 0x33, 0xff, 0x65, 0x2a, 0x60,
+ 0x05, 0x8f, 0x2a, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0xff, 0x54, 0x08, 0x64, 0x08, 0xf5,
+ 0x57, 0x65, 0x25, 0x60, 0x06, 0x85, 0x57, 0x25, 0x43, 0x34, 0x01, 0xef, 0x54, 0x10, 0x64}},
+ {0x0606, 64, { 0x10, 0xf5, 0x57, 0x65, 0x26, 0x60, 0x06, 0x85, 0x57, 0x26, 0x43, 0x34, 0x01, 0xef, 0x54, 0x40, 0x64,
+ 0x40, 0xf5, 0x57, 0x65, 0x27, 0x60, 0x06, 0x85, 0x57, 0x27, 0x43, 0x34, 0x01, 0xef, 0x54, 0x20,
+ 0x64, 0x20, 0xf5, 0x57, 0x65, 0x28, 0x60, 0x06, 0x85, 0x57, 0x28, 0x43, 0x34, 0x01, 0x90, 0x7f,
+ 0x9a, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5, 0x57, 0x65, 0x2e, 0x60, 0x06, 0x85, 0x57, 0x2e}},
+ {0x0646, 64, { 0x43, 0x34, 0x01, 0x30, 0x07, 0x35, 0xc2, 0xaf, 0x30, 0x02, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1,
+ 0x27, 0xe5, 0x39, 0x60, 0x09, 0x90, 0x7f, 0xb7, 0xf0, 0xe4, 0xf5, 0x39, 0xc2, 0x02, 0xc2, 0x07,
+ 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x39, 0x60, 0x09, 0x90, 0x7f, 0xb9,
+ 0xf0, 0xe4, 0xf5, 0x39, 0xd2, 0x02, 0xc2, 0x07, 0xd2, 0xaf, 0x20, 0x05, 0x3d, 0x30, 0x03}},
+ {0x0686, 64, { 0x1e, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x33, 0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x3a,
+ 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0xd2, 0x05, 0x75, 0x12, 0xff, 0x80, 0x1c, 0x90, 0x7f,
+ 0xc8, 0xe0, 0x20, 0xe1, 0x15, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x3a, 0x01, 0x90,
+ 0x7f, 0xc9, 0xe0, 0xf5, 0x53, 0xd2, 0x05, 0x75, 0x12, 0xff, 0x20, 0x14, 0x33, 0x20, 0x00}},
+ {0x06c6, 64, { 0x06, 0xe5, 0x3a, 0x65, 0x53, 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,
+ 0x53, 0xf5, 0x3a, 0x30, 0x0d, 0x0a, 0xc2, 0x0d, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0,
+ 0x30, 0x14, 0x03, 0x02, 0x07, 0xbf, 0x20, 0x05, 0x03, 0x02, 0x07, 0xbf, 0x30, 0x0c, 0x03}},
+ {0x0706, 64, { 0x02, 0x07, 0xbf, 0x30, 0x09, 0x03, 0x02, 0x07, 0xbf, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x60, 0x03,
+ 0x02, 0x07, 0xbf, 0x30, 0x03, 0x0c, 0x7e, 0x7e, 0x7f, 0x40, 0x75, 0x58, 0x7e, 0x75, 0x59, 0x40,
+ 0x80, 0x0a, 0x7e, 0x7d, 0x7f, 0xc0, 0x75, 0x58, 0x7d, 0x75, 0x59, 0xc0, 0x30, 0x10, 0x12, 0xaf,
+ 0x3a, 0x05, 0x3a, 0xe5, 0x59, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x58, 0xf5, 0x83, 0xe0, 0x13}},
+ {0x0746, 64, { 0x92, 0x1a, 0xaf, 0x3a, 0x05, 0x3a, 0xe5, 0x59, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x58, 0xf5, 0x83, 0xe0,
+ 0xf5, 0x57, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x2a, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a,
+ 0xe5, 0x59, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x58, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a,
+ 0x05, 0x3a, 0xe5, 0x59, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x58, 0xf5, 0x83, 0xe0, 0xf5, 0x36}},
+ {0x0786, 64, { 0xd2, 0x0b, 0x80, 0x15, 0xc2, 0x0b, 0x30, 0x03, 0x09, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80,
+ 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x10, 0x04, 0xa2, 0x1a, 0x92, 0x9b, 0xd2,
+ 0x14, 0xc2, 0xaf, 0x85, 0x57, 0x99, 0x20, 0x0b, 0x0d, 0x30, 0x0d, 0x0a, 0xc2, 0x0d, 0xc2, 0x00,
+ 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0c}},
+ {0x07c6, 64, { 0xa4, 0x09, 0x1c, 0x00, 0x09, 0x89, 0x01, 0x09, 0xe6, 0x03, 0x07, 0xe3, 0x06, 0x09, 0x0d, 0x08, 0x09,
+ 0x01, 0x09, 0x08, 0xe9, 0x0a, 0x08, 0xf8, 0x0b, 0x00, 0x00, 0x0a, 0x24, 0x90, 0x7f, 0xeb, 0xe0,
+ 0x24, 0xfe, 0x60, 0x1c, 0x14, 0x70, 0x03, 0x02, 0x08, 0x79, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0a,
+ 0x24, 0x74, 0x0d, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x87, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0a}},
+ {0x0806, 64, { 0x2b, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0xd8,
+ 0x75, 0x83, 0x0d, 0xef, 0xf0, 0x75, 0x82, 0xd1, 0x75, 0x83, 0x0d, 0xf0, 0x75, 0x82, 0xca, 0x75,
+ 0x83, 0x0d, 0xf0, 0x75, 0x82, 0xc3, 0x75, 0x83, 0x0d, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75,
+ 0x82, 0x9e, 0x75, 0x83, 0x0d, 0xf0, 0x90, 0x7f, 0xef, 0xe0, 0xfe, 0x90, 0x7f, 0xee, 0xe0}},
+ {0x0846, 64, { 0x7c, 0x00, 0x24, 0x00, 0xf5, 0x5a, 0xec, 0x3e, 0xf5, 0x59, 0x75, 0x15, 0x0d, 0x75, 0x16, 0x99, 0x75,
+ 0x82, 0x9b, 0x75, 0x83, 0x0d, 0xe0, 0x75, 0x13, 0x00, 0xf5, 0x14, 0xd3, 0xe5, 0x14, 0x95, 0x5a,
+ 0xe5, 0x13, 0x95, 0x59, 0x40, 0x06, 0x85, 0x59, 0x13, 0x85, 0x5a, 0x14, 0x12, 0x0b, 0xba, 0x02,
+ 0x0a, 0x2b, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x0b, 0x75, 0x56, 0xff, 0x75, 0x57, 0x0d, 0x75}},
+ {0x0886, 64, { 0x58, 0xdc, 0x80, 0x2d, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x0b, 0x75, 0x56, 0xff, 0x75, 0x57, 0x0d,
+ 0x75, 0x58, 0xe0, 0x80, 0x1b, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x02, 0x0b, 0x75, 0x56, 0xff, 0x75,
+ 0x57, 0x0d, 0x75, 0x58, 0xf0, 0x80, 0x09, 0x75, 0x56, 0xff, 0x75, 0x57, 0x0e, 0x75, 0x58, 0x1e,
+ 0x90, 0x7f, 0xee, 0xe0, 0x75, 0x59, 0x00, 0xf5, 0x5a, 0xae, 0x57, 0xaf, 0x58, 0x8e, 0x15}},
+ {0x08c6, 64, { 0x8f, 0x16, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x13, 0xf5, 0x14, 0xd3, 0x95, 0x5a,
+ 0xe5, 0x13, 0x95, 0x59, 0x40, 0x06, 0x85, 0x59, 0x13, 0x85, 0x5a, 0x14, 0x12, 0x0b, 0xba, 0x02,
+ 0x0a, 0x2b, 0x90, 0x7f, 0x00, 0xe5, 0x11, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0a,
+ 0x2b, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x11, 0x02, 0x0a, 0x2b, 0x12, 0x0c, 0x24, 0x90, 0x7f}},
+ {0x0906, 64, { 0xea, 0xe0, 0xf5, 0x10, 0x02, 0x0a, 0x2b, 0x90, 0x7f, 0x00, 0xe5, 0x10, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
+ 0x01, 0xf0, 0x02, 0x0a, 0x2b, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x27, 0x14, 0x60, 0x34,
+ 0x24, 0x02, 0x60, 0x03, 0x02, 0x0a, 0x24, 0xa2, 0x16, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2,
+ 0x18, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74}},
+ {0x0946, 64, { 0x02, 0xf0, 0x02, 0x0a, 0x2b, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02,
+ 0xf0, 0x02, 0x0a, 0x2b, 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}},
+ {0x0986, 64, { 0x02, 0x0a, 0x2b, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x17, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0a,
+ 0x2b, 0x90, 0x7f, 0xea, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0a, 0x24, 0xc2, 0x16, 0x02, 0x0a,
+ 0x2b, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x76, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
+ 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34}},
+ {0x09c6, 64, { 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, 0x45, 0x90,
+ 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x10, 0x24, 0x02, 0x70, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0x64,
+ 0x01, 0x70, 0x2a, 0xd2, 0x16, 0x80, 0x2d, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f}},
+ {0x0a06, 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, 0x74, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4,
+ 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xc2, 0x10, 0xe4, 0xf5,
+ 0x10, 0xf5, 0x34, 0xc2, 0x09, 0xc2, 0x0c, 0xc2, 0x0b, 0xc2, 0x14, 0xc2, 0x0d, 0xc2, 0x15}},
+ {0x0a46, 64, { 0xc2, 0x11, 0xc2, 0x07, 0xc2, 0x12, 0xc2, 0x0f, 0xc2, 0x08, 0xf5, 0x35, 0xf5, 0x39, 0xf5, 0x53, 0xf5,
+ 0x3a, 0xf5, 0x33, 0xf5, 0x30, 0xf5, 0x2f, 0xf5, 0x2e, 0xf5, 0x2d, 0xf5, 0x2c, 0xf5, 0x2b, 0xf5,
+ 0x2a, 0xf5, 0x29, 0xf5, 0x28, 0xf5, 0x27, 0xf5, 0x26, 0xf5, 0x25, 0xf5, 0x24, 0xc2, 0x05, 0xc2,
+ 0x17, 0xc2, 0x19, 0xc2, 0x16, 0xc2, 0x18, 0xc2, 0x04, 0xd2, 0x13, 0xc2, 0x06, 0xc2, 0x01}},
+ {0x0a86, 64, { 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 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, 0x0f, 0xf0, 0x90, 0x7f, 0xac, 0x74, 0x0e, 0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2}},
+ {0x0ac6, 64, { 0x1a, 0x12, 0x0f, 0x7d, 0xc2, 0x17, 0x30, 0x04, 0x03, 0x12, 0x04, 0x48, 0x30, 0x04, 0x2a, 0x30, 0x06,
+ 0x27, 0xc2, 0x06, 0xe5, 0x12, 0x60, 0x16, 0x15, 0x12, 0x90, 0x7f, 0xd8, 0xe0, 0x30, 0xe6, 0x04,
+ 0x7f, 0x00, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x96,
+ 0x74, 0x20, 0xf0, 0x12, 0x0b, 0x14, 0x80, 0xcd, 0x30, 0x17, 0x07, 0xc2, 0x17, 0x12, 0x07}},
+ {0x0b06, 64, { 0xc0, 0x80, 0xc3, 0x30, 0x19, 0xc0, 0xc2, 0x19, 0x12, 0x0e, 0xdc, 0x80, 0xb9, 0x22, 0xe5, 0x31, 0x60,
+ 0x02, 0x15, 0x31, 0xe5, 0x39, 0x60, 0x55, 0x65, 0x35, 0x70, 0x4b, 0xe5, 0x33, 0xf4, 0x60, 0x02,
+ 0x05, 0x33, 0xe5, 0x33, 0xc3, 0x95, 0x44, 0x40, 0x43, 0xc2, 0xaf, 0x30, 0x02, 0x1b, 0x90, 0x7f,
+ 0xb8, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7f, 0xb7, 0xe5, 0x39, 0xf0, 0xc2, 0x02, 0xe4, 0xf5}},
+ {0x0b46, 64, { 0x39, 0xf5, 0x33, 0xf5, 0x35, 0x75, 0x12, 0xff, 0x80, 0x19, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x12,
+ 0x90, 0x7f, 0xb9, 0xe5, 0x39, 0xf0, 0xd2, 0x02, 0xe4, 0xf5, 0x39, 0xf5, 0x33, 0xf5, 0x35, 0x75,
+ 0x12, 0xff, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x39, 0x35, 0xe4, 0xf5, 0x33, 0xe5, 0x2c, 0x60, 0x30,
+ 0x20, 0x0f, 0x07, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0, 0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4}},
+ {0x0b86, 64, { 0xf5, 0x2d, 0x43, 0x34, 0x01, 0xe4, 0xf5, 0x30, 0x80, 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x45, 0x50, 0x0d,
+ 0xe5, 0x30, 0xb5, 0x45, 0x06, 0x75, 0x2d, 0x01, 0x43, 0x34, 0x01, 0x05, 0x30, 0xc2, 0x0f, 0x22,
+ 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2, 0x04, 0x7f, 0x00, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96,
+ 0xef, 0xf0, 0x22, 0xe5, 0x14, 0x45, 0x13, 0x60, 0x57, 0xae, 0x13, 0xaf, 0x14, 0xd3, 0xef}},
+ {0x0bc6, 64, { 0x94, 0x40, 0xee, 0x94, 0x00, 0x40, 0x04, 0x7e, 0x00, 0x7f, 0x40, 0xc3, 0xe5, 0x14, 0x9f, 0xf5, 0x14,
+ 0xe5, 0x13, 0x9e, 0xf5, 0x13, 0xe4, 0xfd, 0xed, 0xc3, 0x9f, 0xe4, 0x9e, 0x50, 0x1f, 0x85, 0x16,
+ 0x82, 0x85, 0x15, 0x83, 0xe0, 0xfc, 0x74, 0x00, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
+ 0xec, 0xf0, 0x0d, 0x05, 0x16, 0xe5, 0x16, 0x70, 0x02, 0x05, 0x15, 0x80, 0xda, 0x90, 0x7f}},
+ {0x0c06, 64, { 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, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74, 0x20, 0xf0, 0x90, 0x7f,
+ 0x94, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0x97, 0x74, 0x86}},
+ {0x0c46, 64, { 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0x90, 0x7f, 0x98, 0xf0,
+ 0xe4, 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,
+ 0x04, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22}},
+ {0x0c86, 64, { 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 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}},
+ {0x0cc6, 64, { 0xa3, 0xa3, 0x80, 0xdf, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x93, 0xf0,
+ 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x42, 0xf0, 0x90, 0x7f,
+ 0x9c, 0x74, 0x10, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xbe, 0xf0, 0x30,
+ 0x16, 0x04, 0x7f, 0x80, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x7f, 0x97, 0xef, 0xf0, 0xe4, 0x90}},
+ {0x0d06, 64, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0xf0, 0x90, 0x7f, 0x98, 0xf0, 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, 0x0b, 0xba, 0xd0, 0xd0, 0xd0,
+ 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0xc0}},
+ {0x0d46, 64, { 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, 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, 0x12, 0x01, 0x10, 0x01, 0xff, 0xff, 0xff, 0x40, 0xcd, 0x06, 0x1c, 0x01, 0x01, 0x00, 0x01, 0x02,
+ 0x00, 0x02, 0x09, 0x02, 0x43, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x07,
+ 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, 0x81, 0x02, 0x40, 0x00}},
+ {0x0dc6, 64, { 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05,
+ 0x84, 0x02, 0x40, 0x00, 0x01, 0x04, 0x03, 0x09, 0x04, 0x10, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79,
+ 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x2e, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79,
+ 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x50, 0x00}},
+ {0x0e06, 64, { 0x53, 0x00, 0x48, 0x00, 0x31, 0x00, 0x31, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72,
+ 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x22, 0x03, 0x55, 0x00, 0x53, 0x00, 0x41, 0x00, 0x2d,
+ 0x00, 0x35, 0x00, 0x33, 0x00, 0x20, 0x00, 0x32, 0x00, 0x30, 0x00, 0x30, 0x00, 0x32, 0x00, 0x61,
+ 0x00, 0x70, 0x00, 0x72, 0x00, 0x32, 0x00, 0x36, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xc0, 0x83}},
+ {0x0e46, 64, { 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
+ 0x74, 0x02, 0xf0, 0xd2, 0x06, 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, 0x17, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0}},
+ {0x0e86, 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, 0x19, 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}},
+ {0x0ec6, 64, { 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x02, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82,
+ 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x12, 0x0c, 0xca, 0x12, 0x0f, 0xb3, 0x90, 0x7f, 0xd6, 0xe0, 0x30,
+ 0xe7, 0x12, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e, 0x00, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6,
+ 0xe0, 0x54, 0xfe, 0xf0, 0x12, 0x0c, 0x24, 0x22, 0x00, 0x02, 0x0e, 0x69, 0x00, 0x02, 0x0e}},
+ {0x0f06, 64, { 0x42, 0x00, 0x02, 0x0d, 0x45, 0x00, 0x02, 0x0e, 0x90, 0x00, 0x02, 0x0f, 0x10, 0x00, 0x02, 0x0f, 0x14,
+ 0x00, 0x02, 0x0d, 0x12, 0x00, 0x02, 0x0f, 0x1c, 0x00, 0x02, 0x0e, 0xb7, 0x00, 0x02, 0x0f, 0x24,
+ 0x00, 0x02, 0x0f, 0x33, 0x00, 0x02, 0x0f, 0x2c, 0x00, 0x02, 0x0f, 0x58, 0xc0, 0xe0, 0xc0, 0x83,
+ 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90}},
+ {0x0f46, 64, { 0x7f, 0xa9, 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,
+ 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0,
+ 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44}},
+ {0x0f86, 61, { 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x03, 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}},
+ {0xffff, 0, {0x00}}
+};
+
diff --git a/drivers/usb/serial/keyspan_pda.S b/drivers/usb/serial/keyspan_pda.S
new file mode 100644
index 000000000000..418fe69aa5e0
--- /dev/null
+++ b/drivers/usb/serial/keyspan_pda.S
@@ -0,0 +1,1124 @@
+/* $Id: loop.s,v 1.23 2000/03/20 09:49:06 warner Exp $
+ *
+ * Firmware for the Keyspan PDA Serial Adapter, a USB serial port based on
+ * the EzUSB microcontroller.
+ *
+ * (C) Copyright 2000 Brian Warner <warner@lothar.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.
+ *
+ * "Keyspan PDA Serial Adapter" is probably a copyright of Keyspan, the
+ * company.
+ *
+ * This serial adapter is basically an EzUSB chip and an RS-232 line driver
+ * in a little widget that has a DB-9 on one end and a USB plug on the other.
+ * It uses the EzUSB's internal UART0 (using the pins from Port C) and timer2
+ * as a baud-rate generator. The wiring is:
+ * PC0/RxD0 <- rxd (DB9 pin 2) PC4 <- dsr pin 6
+ * PC1/TxD0 -> txd pin 3 PC5 <- ri pin 9
+ * PC2 -> rts pin 7 PC6 <- dcd pin 1
+ * PC3 <- cts pin 8 PC7 -> dtr pin 4
+ * PB1 -> line driver standby
+ *
+ * The EzUSB register constants below come from their excellent documentation
+ * and sample code (which used to be available at www.anchorchips.com, but
+ * that has now been absorbed into Cypress' site and the CD-ROM contents
+ * don't appear to be available online anymore). If we get multiple
+ * EzUSB-based drivers into the kernel, it might be useful to pull them out
+ * into a separate .h file.
+ *
+ * THEORY OF OPERATION:
+ *
+ * There are two 256-byte ring buffers, one for tx, one for rx.
+ *
+ * EP2out is pure tx data. When it appears, the data is copied into the tx
+ * ring and serial transmission is started if it wasn't already running. The
+ * "tx buffer empty" interrupt may kick off another character if the ring
+ * still has data. If the host is tx-blocked because the ring filled up,
+ * it will request a "tx unthrottle" interrupt. If sending a serial character
+ * empties the ring below the desired threshold, we set a bit that will send
+ * up the tx unthrottle message as soon as the rx buffer becomes free.
+ *
+ * EP2in (interrupt) is used to send both rx chars and rx status messages
+ * (only "tx unthrottle" at this time) back up to the host. The first byte
+ * of the rx message indicates data (0) or status msg (1). Status messages
+ * are sent before any data.
+ *
+ * Incoming serial characters are put into the rx ring by the serial
+ * interrupt, and the EP2in buffer sent if it wasn't already in transit.
+ * When the EP2in buffer returns, the interrupt prompts us to send more
+ * rx chars (or status messages) if they are pending.
+ *
+ * Device control happens through "vendor specific" control messages on EP0.
+ * All messages are destined for the "Interface" (with the index always 0,
+ * so that if their two-port device might someday use similar firmware, we
+ * can use index=1 to refer to the second port). The messages defined are:
+ *
+ * bRequest = 0 : set baud/bits/parity
+ * 1 : unused
+ * 2 : reserved for setting HW flow control (CTSRTS)
+ * 3 : get/set "modem info" (pin states: DTR, RTS, DCD, RI, etc)
+ * 4 : set break (on/off)
+ * 5 : reserved for requesting interrupts on pin state change
+ * 6 : query buffer room or chars in tx buffer
+ * 7 : request tx unthrottle interrupt
+ *
+ * The host-side driver is set to recognize the device ID values stashed in
+ * serial EEPROM (0x06cd, 0x0103), program this firmware into place, then
+ * start it running. This firmware will use EzUSB's "renumeration" trick by
+ * simulating a bus disconnect, then reconnect with a different device ID
+ * (encoded in the desc_device descriptor below). The host driver then
+ * recognizes the new device ID and glues it to the real serial driver code.
+ *
+ * USEFUL DOCS:
+ * EzUSB Technical Reference Manual: <http://www.anchorchips.com>
+ * 8051 manuals: everywhere, but try www.dalsemi.com because the EzUSB is
+ * basically the Dallas enhanced 8051 code. Remember that the EzUSB IO ports
+ * use totally different registers!
+ * USB 1.1 spec: www.usb.org
+ *
+ * HOW TO BUILD:
+ * gcc -x assembler-with-cpp -P -E -o keyspan_pda.asm keyspan_pda.s
+ * as31 -l keyspan_pda.asm
+ * mv keyspan_pda.obj keyspan_pda.hex
+ * perl ezusb_convert.pl keyspan_pda < keyspan_pda.hex > keyspan_pda_fw.h
+ * Get as31 from <http://www.pjrc.com/tech/8051/index.html>, and hack on it
+ * a bit to make it build.
+ *
+ * THANKS:
+ * Greg Kroah-Hartman, for coordinating the whole usb-serial thing.
+ * AnchorChips, for making such an incredibly useful little microcontroller.
+ * KeySpan, for making a handy, cheap ($40) widget that was so easy to take
+ * apart and trace with an ohmmeter.
+ *
+ * TODO:
+ * lots. grep for TODO. Interrupt safety needs stress-testing. Better flow
+ * control. Interrupting host upon change in DCD, etc, counting transitions.
+ * Need to find a safe device id to use (the one used by the Keyspan firmware
+ * under Windows would be ideal.. can anyone figure out what it is?). Parity.
+ * More baud rates. Oh, and the string-descriptor-length silicon bug
+ * workaround should be implemented, but I'm lazy, and the consequence is
+ * that the device name strings that show up in your kernel log will have
+ * lots of trailing binary garbage in them (appears as ????). Device strings
+ * should be made more accurate.
+ *
+ * Questions, bugs, patches to Brian.
+ *
+ * -Brian Warner <warner@lothar.com>
+ *
+ */
+
+#define HIGH(x) (((x) & 0xff00) / 256)
+#define LOW(x) ((x) & 0xff)
+
+#define dpl1 0x84
+#define dph1 0x85
+#define dps 0x86
+
+;;; our bit assignments
+#define TX_RUNNING 0
+#define DO_TX_UNTHROTTLE 1
+
+ ;; stack from 0x60 to 0x7f: should really set SP to 0x60-1, not 0x60
+#define STACK #0x60-1
+
+#define EXIF 0x91
+#define EIE 0xe8
+ .flag EUSB, EIE.0
+ .flag ES0, IE.4
+
+#define EP0CS #0x7fb4
+#define EP0STALLbit #0x01
+#define IN0BUF #0x7f00
+#define IN0BC #0x7fb5
+#define OUT0BUF #0x7ec0
+#define OUT0BC #0x7fc5
+#define IN2BUF #0x7e00
+#define IN2BC #0x7fb9
+#define IN2CS #0x7fb8
+#define OUT2BC #0x7fc9
+#define OUT2CS #0x7fc8
+#define OUT2BUF #0x7dc0
+#define IN4BUF #0x7d00
+#define IN4BC #0x7fbd
+#define IN4CS #0x7fbc
+#define OEB #0x7f9d
+#define OUTB #0x7f97
+#define OEC #0x7f9e
+#define OUTC #0x7f98
+#define PINSC #0x7f9b
+#define PORTCCFG #0x7f95
+#define IN07IRQ #0x7fa9
+#define OUT07IRQ #0x7faa
+#define IN07IEN #0x7fac
+#define OUT07IEN #0x7fad
+#define USBIRQ #0x7fab
+#define USBIEN #0x7fae
+#define USBBAV #0x7faf
+#define USBCS #0x7fd6
+#define SUDPTRH #0x7fd4
+#define SUDPTRL #0x7fd5
+#define SETUPDAT #0x7fe8
+
+ ;; usb interrupt : enable is EIE.0 (0xe8), flag is EXIF.4 (0x91)
+
+ .org 0
+ ljmp start
+ ;; interrupt vectors
+ .org 23H
+ ljmp serial_int
+ .byte 0
+
+ .org 43H
+ ljmp USB_Jump_Table
+ .byte 0 ; filled in by the USB core
+
+;;; local variables. These are not initialized properly: do it by hand.
+ .org 30H
+rx_ring_in: .byte 0
+rx_ring_out: .byte 0
+tx_ring_in: .byte 0
+tx_ring_out: .byte 0
+tx_unthrottle_threshold: .byte 0
+
+ .org 0x100H ; wants to be on a page boundary
+USB_Jump_Table:
+ ljmp ISR_Sudav ; Setup Data Available
+ .byte 0
+ ljmp 0 ; Start of Frame
+ .byte 0
+ ljmp 0 ; Setup Data Loading
+ .byte 0
+ ljmp 0 ; Global Suspend
+ .byte 0
+ ljmp 0 ; USB Reset
+ .byte 0
+ ljmp 0 ; Reserved
+ .byte 0
+ ljmp 0 ; End Point 0 In
+ .byte 0
+ ljmp 0 ; End Point 0 Out
+ .byte 0
+ ljmp 0 ; End Point 1 In
+ .byte 0
+ ljmp 0 ; End Point 1 Out
+ .byte 0
+ ljmp ISR_Ep2in
+ .byte 0
+ ljmp ISR_Ep2out
+ .byte 0
+
+
+ .org 0x200
+
+start: mov SP,STACK-1 ; set stack
+ ;; clear local variables
+ clr a
+ mov tx_ring_in, a
+ mov tx_ring_out, a
+ mov rx_ring_in, a
+ mov rx_ring_out, a
+ mov tx_unthrottle_threshold, a
+ clr TX_RUNNING
+ clr DO_TX_UNTHROTTLE
+
+ ;; clear fifo with "fe"
+ mov r1, 0
+ mov a, #0xfe
+ mov dptr, #tx_ring
+clear_tx_ring_loop:
+ movx @dptr, a
+ inc dptr
+ djnz r1, clear_tx_ring_loop
+
+ mov a, #0xfd
+ mov dptr, #rx_ring
+clear_rx_ring_loop:
+ movx @dptr, a
+ inc dptr
+ djnz r1, clear_rx_ring_loop
+
+;;; turn on the RS-232 driver chip (bring the STANDBY pin low)
+ ;; set OEB.1
+ mov a, #02H
+ mov dptr,OEB
+ movx @dptr,a
+ ;; clear PB1
+ mov a, #00H
+ mov dptr,OUTB
+ movx @dptr,a
+ ;; set OEC.[127]
+ mov a, #0x86
+ mov dptr,OEC
+ movx @dptr,a
+ ;; set PORTCCFG.[01] to route TxD0,RxD0 to serial port
+ mov dptr, PORTCCFG
+ mov a, #0x03
+ movx @dptr, a
+
+ ;; set up interrupts, autovectoring
+ mov dptr, USBBAV
+ movx a,@dptr
+ setb acc.0 ; AVEN bit to 0
+ movx @dptr, a
+
+ mov a,#0x01 ; enable SUDAV: setup data available (for ep0)
+ mov dptr, USBIRQ
+ movx @dptr, a ; clear SUDAVI
+ mov dptr, USBIEN
+ movx @dptr, a
+
+ mov dptr, IN07IEN
+ mov a,#0x04 ; enable IN2 int
+ movx @dptr, a
+
+ mov dptr, OUT07IEN
+ mov a,#0x04 ; enable OUT2 int
+ movx @dptr, a
+ mov dptr, OUT2BC
+ movx @dptr, a ; arm OUT2
+
+ mov a, #0x84 ; turn on RTS, DTR
+ mov dptr,OUTC
+ movx @dptr, a
+ ;; setup the serial port. 9600 8N1.
+ mov a,#01010011 ; mode 1, enable rx, clear int
+ mov SCON, a
+ ;; using timer2, in 16-bit baud-rate-generator mode
+ ;; (xtal 12MHz, internal fosc 24MHz)
+ ;; RCAP2H,RCAP2L = 65536 - fosc/(32*baud)
+ ;; 57600: 0xFFF2.F, say 0xFFF3
+ ;; 9600: 0xFFB1.E, say 0xFFB2
+ ;; 300: 0xF63C
+#define BAUD 9600
+#define BAUD_TIMEOUT(rate) (65536 - (24 * 1000 * 1000) / (32 * rate))
+#define BAUD_HIGH(rate) HIGH(BAUD_TIMEOUT(rate))
+#define BAUD_LOW(rate) LOW(BAUD_TIMEOUT(rate))
+
+ mov T2CON, #030h ; rclk=1,tclk=1,cp=0,tr2=0(enable later)
+ mov r3, #5
+ acall set_baud
+ setb TR2
+ mov SCON, #050h
+
+#if 0
+ mov r1, #0x40
+ mov a, #0x41
+send:
+ mov SBUF, a
+ inc a
+ anl a, #0x3F
+ orl a, #0x40
+; xrl a, #0x02
+wait1:
+ jnb TI, wait1
+ clr TI
+ djnz r1, send
+;done: sjmp done
+
+#endif
+
+ setb EUSB
+ setb EA
+ setb ES0
+ ;acall dump_stat
+
+ ;; hey, what say we RENUMERATE! (TRM p.62)
+ mov a, #0
+ mov dps, a
+ mov dptr, USBCS
+ mov a, #0x02 ; DISCON=0, DISCOE=0, RENUM=1
+ movx @dptr, a
+ ;; now presence pin is floating, simulating disconnect. wait 0.5s
+ mov r1, #46
+renum_wait1:
+ mov r2, #0
+renum_wait2:
+ mov r3, #0
+renum_wait3:
+ djnz r3, renum_wait3
+ djnz r2, renum_wait2
+ djnz r1, renum_wait1 ; wait about n*(256^2) 6MHz clocks
+ mov a, #0x06 ; DISCON=0, DISCOE=1, RENUM=1
+ movx @dptr, a
+ ;; we are back online. the host device will now re-query us
+
+
+main: sjmp main
+
+
+
+ISR_Sudav:
+ push dps
+ push dpl
+ push dph
+ push dpl1
+ push dph1
+ push acc
+ mov a,EXIF
+ clr acc.4
+ mov EXIF,a ; clear INT2 first
+ mov dptr, USBIRQ ; clear USB int
+ mov a,#01h
+ movx @dptr,a
+
+ ;; get request type
+ mov dptr, SETUPDAT
+ movx a, @dptr
+ mov r1, a ; r1 = bmRequestType
+ inc dptr
+ movx a, @dptr
+ mov r2, a ; r2 = bRequest
+ inc dptr
+ movx a, @dptr
+ mov r3, a ; r3 = wValueL
+ inc dptr
+ movx a, @dptr
+ mov r4, a ; r4 = wValueH
+
+ ;; main switch on bmRequest.type: standard or vendor
+ mov a, r1
+ anl a, #0x60
+ cjne a, #0x00, setup_bmreq_type_not_standard
+ ;; standard request: now main switch is on bRequest
+ ljmp setup_bmreq_is_standard
+
+setup_bmreq_type_not_standard:
+ ;; a still has bmreq&0x60
+ cjne a, #0x40, setup_bmreq_type_not_vendor
+ ;; Anchor reserves bRequest 0xa0-0xaf, we use small ones
+ ;; switch on bRequest. bmRequest will always be 0x41 or 0xc1
+ cjne r2, #0x00, setup_ctrl_not_00
+ ;; 00 is set baud, wValue[0] has baud rate index
+ lcall set_baud ; index in r3, carry set if error
+ jc setup_bmreq_type_not_standard__do_stall
+ ljmp setup_done_ack
+setup_bmreq_type_not_standard__do_stall:
+ ljmp setup_stall
+setup_ctrl_not_00:
+ cjne r2, #0x01, setup_ctrl_not_01
+ ;; 01 is reserved for set bits (parity). TODO
+ ljmp setup_stall
+setup_ctrl_not_01:
+ cjne r2, #0x02, setup_ctrl_not_02
+ ;; 02 is set HW flow control. TODO
+ ljmp setup_stall
+setup_ctrl_not_02:
+ cjne r2, #0x03, setup_ctrl_not_03
+ ;; 03 is control pins (RTS, DTR).
+ ljmp control_pins ; will jump to setup_done_ack,
+ ; or setup_return_one_byte
+setup_ctrl_not_03:
+ cjne r2, #0x04, setup_ctrl_not_04
+ ;; 04 is send break (really "turn break on/off"). TODO
+ cjne r3, #0x00, setup_ctrl_do_break_on
+ ;; do break off: restore PORTCCFG.1 to reconnect TxD0 to serial port
+ mov dptr, PORTCCFG
+ movx a, @dptr
+ orl a, #0x02
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_ctrl_do_break_on:
+ ;; do break on: clear PORTCCFG.0, set TxD high(?) (b1 low)
+ mov dptr, OUTC
+ movx a, @dptr
+ anl a, #0xfd ; ~0x02
+ movx @dptr, a
+ mov dptr, PORTCCFG
+ movx a, @dptr
+ anl a, #0xfd ; ~0x02
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_ctrl_not_04:
+ cjne r2, #0x05, setup_ctrl_not_05
+ ;; 05 is set desired interrupt bitmap. TODO
+ ljmp setup_stall
+setup_ctrl_not_05:
+ cjne r2, #0x06, setup_ctrl_not_06
+ ;; 06 is query room
+ cjne r3, #0x00, setup_ctrl_06_not_00
+ ;; 06, wValue[0]=0 is query write_room
+ mov a, tx_ring_out
+ setb c
+ subb a, tx_ring_in ; out-1-in = 255 - (in-out)
+ ljmp setup_return_one_byte
+setup_ctrl_06_not_00:
+ cjne r3, #0x01, setup_ctrl_06_not_01
+ ;; 06, wValue[0]=1 is query chars_in_buffer
+ mov a, tx_ring_in
+ clr c
+ subb a, tx_ring_out ; in-out
+ ljmp setup_return_one_byte
+setup_ctrl_06_not_01:
+ ljmp setup_stall
+setup_ctrl_not_06:
+ cjne r2, #0x07, setup_ctrl_not_07
+ ;; 07 is request tx unthrottle interrupt
+ mov tx_unthrottle_threshold, r3; wValue[0] is threshold value
+ ljmp setup_done_ack
+setup_ctrl_not_07:
+ ljmp setup_stall
+
+setup_bmreq_type_not_vendor:
+ ljmp setup_stall
+
+
+setup_bmreq_is_standard:
+ cjne r2, #0x00, setup_breq_not_00
+ ;; 00: Get_Status (sub-switch on bmRequestType: device, ep, int)
+ cjne r1, #0x80, setup_Get_Status_not_device
+ ;; Get_Status(device)
+ ;; are we self-powered? no. can we do remote wakeup? no
+ ;; so return two zero bytes. This is reusable
+setup_return_two_zero_bytes:
+ mov dptr, IN0BUF
+ clr a
+ movx @dptr, a
+ inc dptr
+ movx @dptr, a
+ mov dptr, IN0BC
+ mov a, #2
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_Get_Status_not_device:
+ cjne r1, #0x82, setup_Get_Status_not_endpoint
+ ;; Get_Status(endpoint)
+ ;; must get stall bit for ep[wIndexL], return two bytes, bit in lsb 0
+ ;; for now: cheat. TODO
+ sjmp setup_return_two_zero_bytes
+setup_Get_Status_not_endpoint:
+ cjne r1, #0x81, setup_Get_Status_not_interface
+ ;; Get_Status(interface): return two zeros
+ sjmp setup_return_two_zero_bytes
+setup_Get_Status_not_interface:
+ ljmp setup_stall
+
+setup_breq_not_00:
+ cjne r2, #0x01, setup_breq_not_01
+ ;; 01: Clear_Feature (sub-switch on wValueL: stall, remote wakeup)
+ cjne r3, #0x00, setup_Clear_Feature_not_stall
+ ;; Clear_Feature(stall). should clear a stall bit. TODO
+ ljmp setup_stall
+setup_Clear_Feature_not_stall:
+ cjne r3, #0x01, setup_Clear_Feature_not_rwake
+ ;; Clear_Feature(remote wakeup). ignored.
+ ljmp setup_done_ack
+setup_Clear_Feature_not_rwake:
+ ljmp setup_stall
+
+setup_breq_not_01:
+ cjne r2, #0x03, setup_breq_not_03
+ ;; 03: Set_Feature (sub-switch on wValueL: stall, remote wakeup)
+ cjne r3, #0x00, setup_Set_Feature_not_stall
+ ;; Set_Feature(stall). Should set a stall bit. TODO
+ ljmp setup_stall
+setup_Set_Feature_not_stall:
+ cjne r3, #0x01, setup_Set_Feature_not_rwake
+ ;; Set_Feature(remote wakeup). ignored.
+ ljmp setup_done_ack
+setup_Set_Feature_not_rwake:
+ ljmp setup_stall
+
+setup_breq_not_03:
+ cjne r2, #0x06, setup_breq_not_06
+ ;; 06: Get_Descriptor (s-switch on wValueH: dev, config[n], string[n])
+ cjne r4, #0x01, setup_Get_Descriptor_not_device
+ ;; Get_Descriptor(device)
+ mov dptr, SUDPTRH
+ mov a, #HIGH(desc_device)
+ movx @dptr, a
+ mov dptr, SUDPTRL
+ mov a, #LOW(desc_device)
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_Get_Descriptor_not_device:
+ cjne r4, #0x02, setup_Get_Descriptor_not_config
+ ;; Get_Descriptor(config[n])
+ cjne r3, #0x00, setup_stall; only handle n==0
+ ;; Get_Descriptor(config[0])
+ mov dptr, SUDPTRH
+ mov a, #HIGH(desc_config1)
+ movx @dptr, a
+ mov dptr, SUDPTRL
+ mov a, #LOW(desc_config1)
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_Get_Descriptor_not_config:
+ cjne r4, #0x03, setup_Get_Descriptor_not_string
+ ;; Get_Descriptor(string[wValueL])
+ ;; if (wValueL >= maxstrings) stall
+ mov a, #((desc_strings_end-desc_strings)/2)
+ clr c
+ subb a,r3 ; a=4, r3 = 0..3 . if a<=0 then stall
+ jc setup_stall
+ jz setup_stall
+ mov a, r3
+ add a, r3 ; a = 2*wValueL
+ mov dptr, #desc_strings
+ add a, dpl
+ mov dpl, a
+ mov a, #0
+ addc a, dph
+ mov dph, a ; dph = desc_strings[a]. big endian! (handy)
+ ;; it looks like my adapter uses a revision of the EZUSB that
+ ;; contains "rev D errata number 8", as hinted in the EzUSB example
+ ;; code. I cannot find an actual errata description on the Cypress
+ ;; web site, but from the example code it looks like this bug causes
+ ;; the length of string descriptors to be read incorrectly, possibly
+ ;; sending back more characters than the descriptor has. The workaround
+ ;; is to manually send out all of the data. The consequence of not
+ ;; using the workaround is that the strings gathered by the kernel
+ ;; driver are too long and are filled with trailing garbage (including
+ ;; leftover strings). Writing this out by hand is a nuisance, so for
+ ;; now I will just live with the bug.
+ movx a, @dptr
+ mov r1, a
+ inc dptr
+ movx a, @dptr
+ mov r2, a
+ mov dptr, SUDPTRH
+ mov a, r1
+ movx @dptr, a
+ mov dptr, SUDPTRL
+ mov a, r2
+ movx @dptr, a
+ ;; done
+ ljmp setup_done_ack
+
+setup_Get_Descriptor_not_string:
+ ljmp setup_stall
+
+setup_breq_not_06:
+ cjne r2, #0x08, setup_breq_not_08
+ ;; Get_Configuration. always 1. return one byte.
+ ;; this is reusable
+ mov a, #1
+setup_return_one_byte:
+ mov dptr, IN0BUF
+ movx @dptr, a
+ mov a, #1
+ mov dptr, IN0BC
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_breq_not_08:
+ cjne r2, #0x09, setup_breq_not_09
+ ;; 09: Set_Configuration. ignored.
+ ljmp setup_done_ack
+setup_breq_not_09:
+ cjne r2, #0x0a, setup_breq_not_0a
+ ;; 0a: Get_Interface. get the current altsetting for int[wIndexL]
+ ;; since we only have one interface, ignore wIndexL, return a 0
+ mov a, #0
+ ljmp setup_return_one_byte
+setup_breq_not_0a:
+ cjne r2, #0x0b, setup_breq_not_0b
+ ;; 0b: Set_Interface. set altsetting for interface[wIndexL]. ignored
+ ljmp setup_done_ack
+setup_breq_not_0b:
+ ljmp setup_stall
+
+
+setup_done_ack:
+ ;; now clear HSNAK
+ mov dptr, EP0CS
+ mov a, #0x02
+ movx @dptr, a
+ sjmp setup_done
+setup_stall:
+ ;; unhandled. STALL
+ ;EP0CS |= bmEPSTALL
+ mov dptr, EP0CS
+ movx a, @dptr
+ orl a, EP0STALLbit
+ movx @dptr, a
+ sjmp setup_done
+
+setup_done:
+ pop acc
+ pop dph1
+ pop dpl1
+ pop dph
+ pop dpl
+ pop dps
+ reti
+
+;;; ==============================================================
+
+set_baud: ; baud index in r3
+ ;; verify a < 10
+ mov a, r3
+ jb ACC.7, set_baud__badbaud
+ clr c
+ subb a, #10
+ jnc set_baud__badbaud
+ mov a, r3
+ rl a ; a = index*2
+ add a, #LOW(baud_table)
+ mov dpl, a
+ mov a, #HIGH(baud_table)
+ addc a, #0
+ mov dph, a
+ ;; TODO: shut down xmit/receive
+ ;; TODO: wait for current xmit char to leave
+ ;; TODO: shut down timer to avoid partial-char glitch
+ movx a,@dptr ; BAUD_HIGH
+ mov RCAP2H, a
+ mov TH2, a
+ inc dptr
+ movx a,@dptr ; BAUD_LOW
+ mov RCAP2L, a
+ mov TL2, a
+ ;; TODO: restart xmit/receive
+ ;; TODO: reenable interrupts, resume tx if pending
+ clr c ; c=0: success
+ ret
+set_baud__badbaud:
+ setb c ; c=1: failure
+ ret
+
+;;; ==================================================
+control_pins:
+ cjne r1, #0x41, control_pins_in
+control_pins_out:
+ mov a, r3 ; wValue[0] holds new bits: b7 is new DTR, b2 is new RTS
+ xrl a, #0xff ; 1 means active, 0V, +12V ?
+ anl a, #0x84
+ mov r3, a
+ mov dptr, OUTC
+ movx a, @dptr ; only change bits 7 and 2
+ anl a, #0x7b ; ~0x84
+ orl a, r3
+ movx @dptr, a ; other pins are inputs, bits ignored
+ ljmp setup_done_ack
+control_pins_in:
+ mov dptr, PINSC
+ movx a, @dptr
+ xrl a, #0xff
+ ljmp setup_return_one_byte
+
+;;; ========================================
+
+ISR_Ep2in:
+ push dps
+ push dpl
+ push dph
+ push dpl1
+ push dph1
+ push acc
+ mov a,EXIF
+ clr acc.4
+ mov EXIF,a ; clear INT2 first
+ mov dptr, IN07IRQ ; clear USB int
+ mov a,#04h
+ movx @dptr,a
+
+ ;; do stuff
+ lcall start_in
+
+ pop acc
+ pop dph1
+ pop dpl1
+ pop dph
+ pop dpl
+ pop dps
+ reti
+
+ISR_Ep2out:
+ push dps
+ push dpl
+ push dph
+ push dpl1
+ push dph1
+ push acc
+ mov a,EXIF
+ clr acc.4
+ mov EXIF,a ; clear INT2 first
+ mov dptr, OUT07IRQ ; clear USB int
+ mov a,#04h
+ movx @dptr,a
+
+ ;; do stuff
+
+ ;; copy data into buffer. for now, assume we will have enough space
+ mov dptr, OUT2BC ; get byte count
+ movx a,@dptr
+ mov r1, a
+ clr a
+ mov dps, a
+ mov dptr, OUT2BUF ; load DPTR0 with source
+ mov dph1, #HIGH(tx_ring) ; load DPTR1 with target
+ mov dpl1, tx_ring_in
+OUT_loop:
+ movx a,@dptr ; read
+ inc dps ; switch to DPTR1: target
+ inc dpl1 ; target = tx_ring_in+1
+ movx @dptr,a ; store
+ mov a,dpl1
+ cjne a, tx_ring_out, OUT_no_overflow
+ sjmp OUT_overflow
+OUT_no_overflow:
+ inc tx_ring_in ; tx_ring_in++
+ inc dps ; switch to DPTR0: source
+ inc dptr
+ djnz r1, OUT_loop
+ sjmp OUT_done
+OUT_overflow:
+ ;; signal overflow
+ ;; fall through
+OUT_done:
+ ;; ack
+ mov dptr,OUT2BC
+ movx @dptr,a
+
+ ;; start tx
+ acall maybe_start_tx
+ ;acall dump_stat
+
+ pop acc
+ pop dph1
+ pop dpl1
+ pop dph
+ pop dpl
+ pop dps
+ reti
+
+dump_stat:
+ ;; fill in EP4in with a debugging message:
+ ;; tx_ring_in, tx_ring_out, rx_ring_in, rx_ring_out
+ ;; tx_active
+ ;; tx_ring[0..15]
+ ;; 0xfc
+ ;; rx_ring[0..15]
+ clr a
+ mov dps, a
+
+ mov dptr, IN4CS
+ movx a, @dptr
+ jb acc.1, dump_stat__done; busy: cannot dump, old one still pending
+ mov dptr, IN4BUF
+
+ mov a, tx_ring_in
+ movx @dptr, a
+ inc dptr
+ mov a, tx_ring_out
+ movx @dptr, a
+ inc dptr
+
+ mov a, rx_ring_in
+ movx @dptr, a
+ inc dptr
+ mov a, rx_ring_out
+ movx @dptr, a
+ inc dptr
+
+ clr a
+ jnb TX_RUNNING, dump_stat__no_tx_running
+ inc a
+dump_stat__no_tx_running:
+ movx @dptr, a
+ inc dptr
+ ;; tx_ring[0..15]
+ inc dps
+ mov dptr, #tx_ring ; DPTR1: source
+ mov r1, #16
+dump_stat__tx_ring_loop:
+ movx a, @dptr
+ inc dptr
+ inc dps
+ movx @dptr, a
+ inc dptr
+ inc dps
+ djnz r1, dump_stat__tx_ring_loop
+ inc dps
+
+ mov a, #0xfc
+ movx @dptr, a
+ inc dptr
+
+ ;; rx_ring[0..15]
+ inc dps
+ mov dptr, #rx_ring ; DPTR1: source
+ mov r1, #16
+dump_stat__rx_ring_loop:
+ movx a, @dptr
+ inc dptr
+ inc dps
+ movx @dptr, a
+ inc dptr
+ inc dps
+ djnz r1, dump_stat__rx_ring_loop
+
+ ;; now send it
+ clr a
+ mov dps, a
+ mov dptr, IN4BC
+ mov a, #38
+ movx @dptr, a
+dump_stat__done:
+ ret
+
+;;; ============================================================
+
+maybe_start_tx:
+ ;; make sure the tx process is running.
+ jb TX_RUNNING, start_tx_done
+start_tx:
+ ;; is there work to be done?
+ mov a, tx_ring_in
+ cjne a,tx_ring_out, start_tx__work
+ ret ; no work
+start_tx__work:
+ ;; tx was not running. send the first character, setup the TI int
+ inc tx_ring_out ; [++tx_ring_out]
+ mov dph, #HIGH(tx_ring)
+ mov dpl, tx_ring_out
+ movx a, @dptr
+ mov sbuf, a
+ setb TX_RUNNING
+start_tx_done:
+ ;; can we unthrottle the host tx process?
+ ;; step 1: do we care?
+ mov a, #0
+ cjne a, tx_unthrottle_threshold, start_tx__maybe_unthrottle_tx
+ ;; nope
+start_tx_really_done:
+ ret
+start_tx__maybe_unthrottle_tx:
+ ;; step 2: is there now room?
+ mov a, tx_ring_out
+ setb c
+ subb a, tx_ring_in
+ ;; a is now write_room. If thresh >= a, we can unthrottle
+ clr c
+ subb a, tx_unthrottle_threshold
+ jc start_tx_really_done ; nope
+ ;; yes, we can unthrottle. remove the threshold and mark a request
+ mov tx_unthrottle_threshold, #0
+ setb DO_TX_UNTHROTTLE
+ ;; prod rx, which will actually send the message when in2 becomes free
+ ljmp start_in
+
+
+serial_int:
+ push dps
+ push dpl
+ push dph
+ push dpl1
+ push dph1
+ push acc
+ jnb TI, serial_int__not_tx
+ ;; tx finished. send another character if we have one
+ clr TI ; clear int
+ clr TX_RUNNING
+ lcall start_tx
+serial_int__not_tx:
+ jnb RI, serial_int__not_rx
+ lcall get_rx_char
+ clr RI ; clear int
+serial_int__not_rx:
+ ;; return
+ pop acc
+ pop dph1
+ pop dpl1
+ pop dph
+ pop dpl
+ pop dps
+ reti
+
+get_rx_char:
+ mov dph, #HIGH(rx_ring)
+ mov dpl, rx_ring_in
+ inc dpl ; target = rx_ring_in+1
+ mov a, sbuf
+ movx @dptr, a
+ ;; check for overflow before incrementing rx_ring_in
+ mov a, dpl
+ cjne a, rx_ring_out, get_rx_char__no_overflow
+ ;; signal overflow
+ ret
+get_rx_char__no_overflow:
+ inc rx_ring_in
+ ;; kick off USB INpipe
+ acall start_in
+ ret
+
+start_in:
+ ;; check if the inpipe is already running.
+ mov dptr, IN2CS
+ movx a, @dptr
+ jb acc.1, start_in__done; int will handle it
+ jb DO_TX_UNTHROTTLE, start_in__do_tx_unthrottle
+ ;; see if there is any work to do. a serial interrupt might occur
+ ;; during this sequence?
+ mov a, rx_ring_in
+ cjne a, rx_ring_out, start_in__have_work
+ ret ; nope
+start_in__have_work:
+ ;; now copy as much data as possible into the pipe. 63 bytes max.
+ clr a
+ mov dps, a
+ mov dph, #HIGH(rx_ring) ; load DPTR0 with source
+ inc dps
+ mov dptr, IN2BUF ; load DPTR1 with target
+ movx @dptr, a ; in[0] signals that rest of IN is rx data
+ inc dptr
+ inc dps
+ ;; loop until we run out of data, or we have copied 64 bytes
+ mov r1, #1 ; INbuf size counter
+start_in__loop:
+ mov a, rx_ring_in
+ cjne a, rx_ring_out, start_inlocal_irq_enablell_copying
+ sjmp start_in__kick
+start_inlocal_irq_enablell_copying:
+ inc rx_ring_out
+ mov dpl, rx_ring_out
+ movx a, @dptr
+ inc dps
+ movx @dptr, a ; write into IN buffer
+ inc dptr
+ inc dps
+ inc r1
+ cjne r1, #64, start_in__loop; loop
+start_in__kick:
+ ;; either we ran out of data, or we copied 64 bytes. r1 has byte count
+ ;; kick off IN
+ mov dptr, IN2BC
+ mov a, r1
+ jz start_in__done
+ movx @dptr, a
+ ;; done
+start_in__done:
+ ;acall dump_stat
+ ret
+start_in__do_tx_unthrottle:
+ ;; special sequence: send a tx unthrottle message
+ clr DO_TX_UNTHROTTLE
+ clr a
+ mov dps, a
+ mov dptr, IN2BUF
+ mov a, #1
+ movx @dptr, a
+ inc dptr
+ mov a, #2
+ movx @dptr, a
+ mov dptr, IN2BC
+ movx @dptr, a
+ ret
+
+putchar:
+ clr TI
+ mov SBUF, a
+putchar_wait:
+ jnb TI, putchar_wait
+ clr TI
+ ret
+
+
+baud_table: ; baud_high, then baud_low
+ ;; baud[0]: 110
+ .byte BAUD_HIGH(110)
+ .byte BAUD_LOW(110)
+ ;; baud[1]: 300
+ .byte BAUD_HIGH(300)
+ .byte BAUD_LOW(300)
+ ;; baud[2]: 1200
+ .byte BAUD_HIGH(1200)
+ .byte BAUD_LOW(1200)
+ ;; baud[3]: 2400
+ .byte BAUD_HIGH(2400)
+ .byte BAUD_LOW(2400)
+ ;; baud[4]: 4800
+ .byte BAUD_HIGH(4800)
+ .byte BAUD_LOW(4800)
+ ;; baud[5]: 9600
+ .byte BAUD_HIGH(9600)
+ .byte BAUD_LOW(9600)
+ ;; baud[6]: 19200
+ .byte BAUD_HIGH(19200)
+ .byte BAUD_LOW(19200)
+ ;; baud[7]: 38400
+ .byte BAUD_HIGH(38400)
+ .byte BAUD_LOW(38400)
+ ;; baud[8]: 57600
+ .byte BAUD_HIGH(57600)
+ .byte BAUD_LOW(57600)
+ ;; baud[9]: 115200
+ .byte BAUD_HIGH(115200)
+ .byte BAUD_LOW(115200)
+
+desc_device:
+ .byte 0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40
+ .byte 0xcd, 0x06, 0x04, 0x01, 0x89, 0xab, 1, 2, 3, 0x01
+;;; The "real" device id, which must match the host driver, is that
+;;; "0xcd 0x06 0x04 0x01" sequence, which is 0x06cd, 0x0104
+
+desc_config1:
+ .byte 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32
+ .byte 0x09, 0x04, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 0x00
+ .byte 0x07, 0x05, 0x82, 0x03, 0x40, 0x00, 0x01
+ .byte 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00
+
+desc_strings:
+ .word string_langids, string_mfg, string_product, string_serial
+desc_strings_end:
+
+string_langids: .byte string_langids_end-string_langids
+ .byte 3
+ .word 0
+string_langids_end:
+
+ ;; sigh. These strings are Unicode, meaning UTF16? 2 bytes each. Now
+ ;; *that* is a pain in the ass to encode. And they are little-endian
+ ;; too. Use this perl snippet to get the bytecodes:
+ /* while (<>) {
+ @c = split(//);
+ foreach $c (@c) {
+ printf("0x%02x, 0x00, ", ord($c));
+ }
+ }
+ */
+
+string_mfg: .byte string_mfg_end-string_mfg
+ .byte 3
+; .byte "ACME usb widgets"
+ .byte 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x75, 0x00, 0x73, 0x00, 0x62, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00, 0x73, 0x00
+string_mfg_end:
+
+string_product: .byte string_product_end-string_product
+ .byte 3
+; .byte "ACME USB serial widget"
+ .byte 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53, 0x00, 0x42, 0x00, 0x20, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00
+string_product_end:
+
+string_serial: .byte string_serial_end-string_serial
+ .byte 3
+; .byte "47"
+ .byte 0x34, 0x00, 0x37, 0x00
+string_serial_end:
+
+;;; ring buffer memory
+ ;; tx_ring_in+1 is where the next input byte will go
+ ;; [tx_ring_out] has been sent
+ ;; if tx_ring_in == tx_ring_out, theres no work to do
+ ;; there are (tx_ring_in - tx_ring_out) chars to be written
+ ;; dont let _in lap _out
+ ;; cannot inc if tx_ring_in+1 == tx_ring_out
+ ;; write [tx_ring_in+1] then tx_ring_in++
+ ;; if (tx_ring_in+1 == tx_ring_out), overflow
+ ;; else tx_ring_in++
+ ;; read/send [tx_ring_out+1], then tx_ring_out++
+
+ ;; rx_ring_in works the same way
+
+ .org 0x1000
+tx_ring:
+ .skip 0x100 ; 256 bytes
+rx_ring:
+ .skip 0x100 ; 256 bytes
+
+
+ .END
+
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
new file mode 100644
index 000000000000..7fd0aa9eccf6
--- /dev/null
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -0,0 +1,894 @@
+/*
+ * USB Keyspan PDA / Xircom / Entregra Converter driver
+ *
+ * Copyright (C) 1999 - 2001 Greg Kroah-Hartman <greg@kroah.com>
+ * Copyright (C) 1999, 2000 Brian Warner <warner@lothar.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.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * (09/07/2001) gkh
+ * cleaned up the Xircom support. Added ids for Entregra device which is
+ * the same as the Xircom device. Enabled the code to be compiled for
+ * either Xircom or Keyspan devices.
+ *
+ * (08/11/2001) Cristian M. Craciunescu
+ * support for Xircom PGSDB9
+ *
+ * (05/31/2001) gkh
+ * switched from using spinlock to a semaphore, which fixes lots of problems.
+ *
+ * (04/08/2001) gb
+ * Identify version on module load.
+ *
+ * (11/01/2000) Adam J. Richter
+ * usb_device_id table support
+ *
+ * (10/05/2000) gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.
+ *
+ * (08/28/2000) gkh
+ * Added locks for SMP safeness.
+ * Fixed MOD_INC and MOD_DEC logic and the ability to open a port more
+ * than once.
+ *
+ * (07/20/2000) borchers
+ * - keyspan_pda_write no longer sleeps if it is called on interrupt time;
+ * PPP and the line discipline with stty echo on can call write on
+ * interrupt time and this would cause an oops if write slept
+ * - if keyspan_pda_write is in an interrupt, it will not call
+ * usb_control_msg (which sleeps) to query the room in the device
+ * buffer, it simply uses the current room value it has
+ * - if the urb is busy or if it is throttled keyspan_pda_write just
+ * returns 0, rather than sleeping to wait for this to change; the
+ * write_chan code in n_tty.c will sleep if needed before calling
+ * keyspan_pda_write again
+ * - if the device needs to be unthrottled, write now queues up the
+ * call to usb_control_msg (which sleeps) to unthrottle the device
+ * - the wakeups from keyspan_pda_write_bulk_callback are queued rather
+ * than done directly from the callback to avoid the race in write_chan
+ * - keyspan_pda_chars_in_buffer also indicates its buffer is full if the
+ * urb status is -EINPROGRESS, meaning it cannot write at the moment
+ *
+ * (07/19/2000) gkh
+ * Added module_init and module_exit functions to handle the fact that this
+ * driver is a loadable module now.
+ *
+ * (03/26/2000) gkh
+ * Split driver up into device specific pieces.
+ *
+ */
+
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/workqueue.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+
+static int debug;
+
+struct ezusb_hex_record {
+ __u16 address;
+ __u8 data_size;
+ __u8 data[16];
+};
+
+/* make a simple define to handle if we are compiling keyspan_pda or xircom support */
+#if defined(CONFIG_USB_SERIAL_KEYSPAN_PDA) || defined(CONFIG_USB_SERIAL_KEYSPAN_PDA_MODULE)
+ #define KEYSPAN
+#else
+ #undef KEYSPAN
+#endif
+#if defined(CONFIG_USB_SERIAL_XIRCOM) || defined(CONFIG_USB_SERIAL_XIRCOM_MODULE)
+ #define XIRCOM
+#else
+ #undef XIRCOM
+#endif
+
+#ifdef KEYSPAN
+#include "keyspan_pda_fw.h"
+#endif
+
+#ifdef XIRCOM
+#include "xircom_pgs_fw.h"
+#endif
+
+#include "usb-serial.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.1"
+#define DRIVER_AUTHOR "Brian Warner <warner@lothar.com>"
+#define DRIVER_DESC "USB Keyspan PDA Converter driver"
+
+struct keyspan_pda_private {
+ int tx_room;
+ int tx_throttled;
+ struct work_struct wakeup_work;
+ struct work_struct unthrottle_work;
+};
+
+
+#define KEYSPAN_VENDOR_ID 0x06cd
+#define KEYSPAN_PDA_FAKE_ID 0x0103
+#define KEYSPAN_PDA_ID 0x0104 /* no clue */
+
+/* For Xircom PGSDB9 and older Entregra version of the same device */
+#define XIRCOM_VENDOR_ID 0x085a
+#define XIRCOM_FAKE_ID 0x8027
+#define ENTREGRA_VENDOR_ID 0x1645
+#define ENTREGRA_FAKE_ID 0x8093
+
+static struct usb_device_id id_table_combined [] = {
+#ifdef KEYSPAN
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
+#endif
+#ifdef XIRCOM
+ { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) },
+ { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) },
+#endif
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
+static struct usb_driver keyspan_pda_driver = {
+ .owner = THIS_MODULE,
+ .name = "keyspan_pda",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = 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) },
+ { }
+};
+#endif
+
+static void keyspan_pda_wakeup_write( struct usb_serial_port *port )
+{
+
+ struct tty_struct *tty = port->tty;
+
+ /* wake up port processes */
+ wake_up_interruptible( &port->write_wait );
+
+ /* wake up line discipline */
+ tty_wakeup(tty);
+}
+
+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,
+ 2000);
+ if (result < 0)
+ dbg("%s - error %d from usb_control_msg",
+ __FUNCTION__, result);
+}
+
+
+static void keyspan_pda_rx_interrupt (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct tty_struct *tty = port->tty;
+ unsigned char *data = urb->transfer_buffer;
+ int i;
+ int status;
+ struct keyspan_pda_private *priv;
+ priv = usb_get_serial_port_data(port);
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ /* see if the message is data or a status interrupt */
+ switch (data[0]) {
+ case 0:
+ /* rest of message is rx data */
+ if (urb->actual_length) {
+ for (i = 1; i < urb->actual_length ; ++i) {
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+ break;
+ case 1:
+ /* status interrupt */
+ dbg(" rx int, d1=%d, d2=%d", data[1], data[2]);
+ switch (data[1]) {
+ case 1: /* modemline change */
+ break;
+ case 2: /* tx unthrottle interrupt */
+ priv->tx_throttled = 0;
+ /* queue up a wakeup at scheduler time */
+ schedule_work(&priv->wakeup_work);
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+exit:
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, status);
+}
+
+
+static void keyspan_pda_rx_throttle (struct usb_serial_port *port)
+{
+ /* stop receiving characters. We just turn off the URB request, and
+ let chars pile up in the device. If we're doing hardware
+ flowcontrol, the device will signal the other end when its buffer
+ fills up. If we're doing XON/XOFF, this would be a good time to
+ send an XOFF, although it might make sense to foist that off
+ upon the device too. */
+
+ dbg("keyspan_pda_rx_throttle port %d", port->number);
+ usb_kill_urb(port->interrupt_in_urb);
+}
+
+
+static void keyspan_pda_rx_unthrottle (struct usb_serial_port *port)
+{
+ /* just restart the receive interrupt URB */
+ dbg("keyspan_pda_rx_unthrottle port %d", port->number);
+ port->interrupt_in_urb->dev = port->serial->dev;
+ if (usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC))
+ dbg(" usb_submit_urb(read urb) failed");
+ return;
+}
+
+
+static int keyspan_pda_setbaud (struct usb_serial *serial, int baud)
+{
+ int rc;
+ int bindex;
+
+ switch(baud) {
+ case 110: bindex = 0; break;
+ case 300: bindex = 1; break;
+ case 1200: bindex = 2; break;
+ case 2400: bindex = 3; break;
+ case 4800: bindex = 4; break;
+ case 9600: bindex = 5; break;
+ case 19200: bindex = 6; break;
+ case 38400: bindex = 7; break;
+ case 57600: bindex = 8; break;
+ case 115200: bindex = 9; break;
+ default: return -EINVAL;
+ }
+
+ /* rather than figure out how to sleep while waiting for this
+ to complete, I just use the "legacy" API. */
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ 0, /* set baud */
+ USB_TYPE_VENDOR
+ | USB_RECIP_INTERFACE
+ | USB_DIR_OUT, /* type */
+ bindex, /* value */
+ 0, /* index */
+ NULL, /* &data */
+ 0, /* size */
+ 2000); /* timeout */
+ return(rc);
+}
+
+
+static void keyspan_pda_break_ctl (struct usb_serial_port *port, int break_state)
+{
+ 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, 2000);
+ 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
+ is on /dev/ttyS0 */
+}
+
+
+static void keyspan_pda_set_termios (struct usb_serial_port *port,
+ struct termios *old_termios)
+{
+ struct usb_serial *serial = port->serial;
+ unsigned int cflag = port->tty->termios->c_cflag;
+
+ /* cflag specifies lots of stuff: number of stop bits, parity, number
+ of data bits, baud. What can the device actually handle?:
+ CSTOPB (1 stop bit or 2)
+ PARENB (parity)
+ CSIZE (5bit .. 8bit)
+ There is minimal hw support for parity (a PSW bit seems to hold the
+ parity of whatever is in the accumulator). The UART either deals
+ with 10 bits (start, 8 data, stop) or 11 bits (start, 8 data,
+ 1 special, stop). So, with firmware changes, we could do:
+ 8N1: 10 bit
+ 8N2: 11 bit, extra bit always (mark?)
+ 8[EOMS]1: 11 bit, extra bit is parity
+ 7[EOMS]1: 10 bit, b0/b7 is parity
+ 7[EOMS]2: 11 bit, b0/b7 is parity, extra bit always (mark?)
+
+ HW flow control is dictated by the tty->termios->c_cflags & CRTSCTS
+ bit.
+
+ For now, just do baud. */
+
+ switch (cflag & CBAUD) {
+ /* we could support more values here, just need to calculate
+ the necessary divisors in the firmware. <asm/termbits.h>
+ has the Bnnn constants. */
+ case B110: keyspan_pda_setbaud(serial, 110); break;
+ case B300: keyspan_pda_setbaud(serial, 300); break;
+ case B1200: keyspan_pda_setbaud(serial, 1200); break;
+ case B2400: keyspan_pda_setbaud(serial, 2400); break;
+ case B4800: keyspan_pda_setbaud(serial, 4800); break;
+ case B9600: keyspan_pda_setbaud(serial, 9600); break;
+ case B19200: keyspan_pda_setbaud(serial, 19200); break;
+ case B38400: keyspan_pda_setbaud(serial, 38400); break;
+ case B57600: keyspan_pda_setbaud(serial, 57600); break;
+ case B115200: keyspan_pda_setbaud(serial, 115200); break;
+ default: dbg("can't handle requested baud rate"); break;
+ }
+}
+
+
+/* modem control pins: DTR and RTS are outputs and can be controlled.
+ DCD, RI, DSR, CTS are inputs and can be read. All outputs can also be
+ read. The byte passed is: DTR(b7) DCD RI DSR CTS RTS(b2) unused unused */
+
+static int keyspan_pda_get_modem_info(struct usb_serial *serial,
+ unsigned char *value)
+{
+ int rc;
+ unsigned char data;
+ rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
+ 3, /* get pins */
+ USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_IN,
+ 0, 0, &data, 1, 2000);
+ if (rc > 0)
+ *value = data;
+ return rc;
+}
+
+
+static int keyspan_pda_set_modem_info(struct usb_serial *serial,
+ unsigned char value)
+{
+ int rc;
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ 3, /* set pins */
+ USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_OUT,
+ value, 0, NULL, 0, 2000);
+ return rc;
+}
+
+static int keyspan_pda_tiocmget(struct usb_serial_port *port, struct file *file)
+{
+ struct usb_serial *serial = port->serial;
+ int rc;
+ unsigned char status;
+ int value;
+
+ rc = keyspan_pda_get_modem_info(serial, &status);
+ if (rc < 0)
+ return rc;
+ value =
+ ((status & (1<<7)) ? TIOCM_DTR : 0) |
+ ((status & (1<<6)) ? TIOCM_CAR : 0) |
+ ((status & (1<<5)) ? TIOCM_RNG : 0) |
+ ((status & (1<<4)) ? TIOCM_DSR : 0) |
+ ((status & (1<<3)) ? TIOCM_CTS : 0) |
+ ((status & (1<<2)) ? TIOCM_RTS : 0);
+ return value;
+}
+
+static int keyspan_pda_tiocmset(struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct usb_serial *serial = port->serial;
+ int rc;
+ unsigned char status;
+
+ rc = keyspan_pda_get_modem_info(serial, &status);
+ if (rc < 0)
+ return rc;
+
+ if (set & TIOCM_RTS)
+ status |= (1<<2);
+ if (set & TIOCM_DTR)
+ status |= (1<<7);
+
+ if (clear & TIOCM_RTS)
+ status &= ~(1<<2);
+ if (clear & TIOCM_DTR)
+ status &= ~(1<<7);
+ rc = keyspan_pda_set_modem_info(serial, status);
+ return rc;
+}
+
+static int keyspan_pda_ioctl(struct usb_serial_port *port, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ switch (cmd) {
+ case TIOCMIWAIT:
+ /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
+ /* TODO */
+ case TIOCGICOUNT:
+ /* return count of modemline transitions */
+ return 0; /* TODO */
+ }
+
+ return -ENOIOCTLCMD;
+}
+
+static int keyspan_pda_write(struct usb_serial_port *port,
+ const unsigned char *buf, int count)
+{
+ struct usb_serial *serial = port->serial;
+ int request_unthrottle = 0;
+ int rc = 0;
+ struct keyspan_pda_private *priv;
+
+ priv = usb_get_serial_port_data(port);
+ /* guess how much room is left in the device's ring buffer, and if we
+ want to send more than that, check first, updating our notion of
+ what is left. If our write will result in no room left, ask the
+ device to give us an interrupt when the room available rises above
+ a threshold, and hold off all writers (eventually, those using
+ select() or poll() too) until we receive that unthrottle interrupt.
+ Block if we can't write anything at all, otherwise write as much as
+ we can. */
+ dbg("keyspan_pda_write(%d)",count);
+ if (count == 0) {
+ dbg(" write request of 0 bytes");
+ return (0);
+ }
+
+ /* we might block because of:
+ the TX urb is in-flight (wait until it completes)
+ the device is full (wait until it says there is room)
+ */
+ if (port->write_urb->status == -EINPROGRESS || priv->tx_throttled ) {
+ return( 0 );
+ }
+
+ /* At this point the URB is in our control, nobody else can submit it
+ again (the only sudden transition was the one from EINPROGRESS to
+ finished). Also, the tx process is not throttled. So we are
+ ready to write. */
+
+ count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
+
+ /* Check if we might overrun the Tx buffer. If so, ask the
+ device how much room it really has. This is done only on
+ scheduler time, since usb_control_msg() sleeps. */
+ if (count > priv->tx_room && !in_interrupt()) {
+ unsigned char room;
+ 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 means "remaining room" */
+ 0, /* index */
+ &room,
+ 1,
+ 2000);
+ if (rc < 0) {
+ dbg(" roomquery failed");
+ goto exit;
+ }
+ if (rc == 0) {
+ dbg(" roomquery returned 0 bytes");
+ rc = -EIO; /* device didn't return any data */
+ goto exit;
+ }
+ dbg(" roomquery says %d", room);
+ priv->tx_room = room;
+ }
+ if (count > priv->tx_room) {
+ /* we're about to completely fill the Tx buffer, so
+ we'll be throttled afterwards. */
+ count = priv->tx_room;
+ request_unthrottle = 1;
+ }
+
+ if (count) {
+ /* now transfer data */
+ memcpy (port->write_urb->transfer_buffer, buf, count);
+ /* send the data out the bulk port */
+ port->write_urb->transfer_buffer_length = count;
+
+ priv->tx_room -= count;
+
+ port->write_urb->dev = port->serial->dev;
+ rc = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+ if (rc) {
+ dbg(" usb_submit_urb(write bulk) failed");
+ goto exit;
+ }
+ }
+ else {
+ /* There wasn't any room left, so we are throttled until
+ the buffer empties a bit */
+ request_unthrottle = 1;
+ }
+
+ if (request_unthrottle) {
+ priv->tx_throttled = 1; /* block writers */
+ schedule_work(&priv->unthrottle_work);
+ }
+
+ rc = count;
+exit:
+ return rc;
+}
+
+
+static void keyspan_pda_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct keyspan_pda_private *priv;
+
+ priv = usb_get_serial_port_data(port);
+
+ /* queue up a wakeup at scheduler time */
+ schedule_work(&priv->wakeup_work);
+}
+
+
+static int keyspan_pda_write_room (struct usb_serial_port *port)
+{
+ struct keyspan_pda_private *priv;
+
+ priv = usb_get_serial_port_data(port);
+
+ /* used by n_tty.c for processing of tabs and such. Giving it our
+ conservative guess is probably good enough, but needs testing by
+ running a console through the device. */
+
+ return (priv->tx_room);
+}
+
+
+static int keyspan_pda_chars_in_buffer (struct usb_serial_port *port)
+{
+ struct keyspan_pda_private *priv;
+
+ priv = usb_get_serial_port_data(port);
+
+ /* when throttled, return at least WAKEUP_CHARS to tell select() (via
+ n_tty.c:normal_poll() ) that we're not writeable. */
+ if( port->write_urb->status == -EINPROGRESS || priv->tx_throttled )
+ return 256;
+ return 0;
+}
+
+
+static int keyspan_pda_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct usb_serial *serial = port->serial;
+ unsigned char room;
+ 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,
+ 2000);
+ 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 = usb_get_serial_port_data(port);
+ 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, GFP_KERNEL);
+ if (rc) {
+ dbg("%s - usb_submit_urb(read int) failed", __FUNCTION__);
+ goto error;
+ }
+
+error:
+ return rc;
+}
+
+
+static void keyspan_pda_close(struct usb_serial_port *port, struct file *filp)
+{
+ 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_kill_urb(port->write_urb);
+ usb_kill_urb(port->interrupt_in_urb);
+ }
+}
+
+
+/* download the firmware to a "fake" device (pre-renumeration) */
+static int keyspan_pda_fake_startup (struct usb_serial *serial)
+{
+ int response;
+ const struct ezusb_hex_record *record = NULL;
+
+ /* download the firmware here ... */
+ response = ezusb_set_reset(serial, 1);
+
+#ifdef KEYSPAN
+ if (le16_to_cpu(serial->dev->descriptor.idVendor) == KEYSPAN_VENDOR_ID)
+ record = &keyspan_pda_firmware[0];
+#endif
+#ifdef XIRCOM
+ if ((le16_to_cpu(serial->dev->descriptor.idVendor) == XIRCOM_VENDOR_ID) ||
+ (le16_to_cpu(serial->dev->descriptor.idVendor) == ENTREGRA_VENDOR_ID))
+ record = &xircom_pgs_firmware[0];
+#endif
+ if (record == NULL) {
+ err("%s: unknown vendor, aborting.", __FUNCTION__);
+ return -ENODEV;
+ }
+
+ while(record->address != 0xffff) {
+ response = ezusb_writememory(serial, record->address,
+ (unsigned char *)record->data,
+ record->data_size, 0xa0);
+ if (response < 0) {
+ err("ezusb_writememory failed for Keyspan PDA "
+ "firmware (%d %04X %p %d)",
+ response,
+ record->address, record->data, record->data_size);
+ break;
+ }
+ record++;
+ }
+ /* bring device out of reset. Renumeration will occur in a moment
+ and the new device will bind to the real driver */
+ response = ezusb_set_reset(serial, 0);
+
+ /* we want this device to fail to have a driver assigned to it. */
+ return (1);
+}
+
+static int keyspan_pda_startup (struct usb_serial *serial)
+{
+
+ struct keyspan_pda_private *priv;
+
+ /* allocate the private data structures for all ports. Well, for all
+ one ports. */
+
+ priv = kmalloc(sizeof(struct keyspan_pda_private), GFP_KERNEL);
+ if (!priv)
+ return (1); /* error */
+ usb_set_serial_port_data(serial->port[0], priv);
+ init_waitqueue_head(&serial->port[0]->write_wait);
+ INIT_WORK(&priv->wakeup_work, (void *)keyspan_pda_wakeup_write,
+ (void *)(serial->port[0]));
+ INIT_WORK(&priv->unthrottle_work,
+ (void *)keyspan_pda_request_unthrottle,
+ (void *)(serial));
+ return (0);
+}
+
+static void keyspan_pda_shutdown (struct usb_serial *serial)
+{
+ dbg("%s", __FUNCTION__);
+
+ kfree(usb_get_serial_port_data(serial->port[0]));
+}
+
+#ifdef KEYSPAN
+static struct usb_serial_device_type keyspan_pda_fake_device = {
+ .owner = THIS_MODULE,
+ .name = "Keyspan PDA - (prerenumeration)",
+ .short_name = "keyspan_pda_pre",
+ .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,
+ .attach = 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)",
+ .short_name = "xircom_no_firm",
+ .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,
+ .attach = keyspan_pda_fake_startup,
+};
+#endif
+
+static struct usb_serial_device_type keyspan_pda_device = {
+ .owner = THIS_MODULE,
+ .name = "Keyspan PDA",
+ .short_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,
+ .tiocmget = keyspan_pda_tiocmget,
+ .tiocmset = keyspan_pda_tiocmset,
+ .attach = keyspan_pda_startup,
+ .shutdown = keyspan_pda_shutdown,
+};
+
+
+static int __init keyspan_pda_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&keyspan_pda_device);
+ if (retval)
+ goto failed_pda_register;
+#ifdef KEYSPAN
+ retval = usb_serial_register(&keyspan_pda_fake_device);
+ if (retval)
+ goto failed_pda_fake_register;
+#endif
+#ifdef XIRCOM
+ retval = usb_serial_register(&xircom_pgs_fake_device);
+ if (retval)
+ goto failed_xircom_register;
+#endif
+ retval = usb_register(&keyspan_pda_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+failed_usb_register:
+#ifdef XIRCOM
+ usb_serial_deregister(&xircom_pgs_fake_device);
+failed_xircom_register:
+#endif /* XIRCOM */
+#ifdef KEYSPAN
+ usb_serial_deregister(&keyspan_pda_fake_device);
+#endif
+#ifdef KEYSPAN
+failed_pda_fake_register:
+#endif
+ usb_serial_deregister(&keyspan_pda_device);
+failed_pda_register:
+ return retval;
+}
+
+
+static void __exit keyspan_pda_exit (void)
+{
+ usb_deregister (&keyspan_pda_driver);
+ usb_serial_deregister (&keyspan_pda_device);
+#ifdef KEYSPAN
+ usb_serial_deregister (&keyspan_pda_fake_device);
+#endif
+#ifdef XIRCOM
+ usb_serial_deregister (&xircom_pgs_fake_device);
+#endif
+}
+
+
+module_init(keyspan_pda_init);
+module_exit(keyspan_pda_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
diff --git a/drivers/usb/serial/keyspan_pda_fw.h b/drivers/usb/serial/keyspan_pda_fw.h
new file mode 100644
index 000000000000..f253accd231c
--- /dev/null
+++ b/drivers/usb/serial/keyspan_pda_fw.h
@@ -0,0 +1,99 @@
+/*
+ * USB Keyspan PDA Firmware
+ *
+ * Copyright (C) 1999, 2000 Brian Warner <warner@lothar.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.
+ *
+ * Generated from keyspan_pda.s by ezusb_convert.pl
+ *
+ */
+
+static const struct ezusb_hex_record keyspan_pda_firmware[] = {
+{ 0x0000, 3, {0x02, 0x02, 0x00} },
+{ 0x0023, 4, {0x02, 0x05, 0x5f, 0x00} },
+{ 0x0043, 4, {0x02, 0x01, 0x00, 0x00} },
+{ 0x0030, 5, {0x00, 0x00, 0x00, 0x00, 0x00} },
+{ 0x0100, 16, {0x02, 0x02, 0x96, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00} },
+{ 0x0110, 16, {0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00} },
+{ 0x0120, 16, {0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x04, 0x61, 0x00, 0x02, 0x04, 0x89, 0x00} },
+{ 0x0200, 16, {0x75, 0x81, 0x5e, 0xe4, 0xf5, 0x32, 0xf5, 0x33, 0xf5, 0x30, 0xf5, 0x31, 0xf5, 0x34, 0xc2, 0x00} },
+{ 0x0210, 16, {0xc2, 0x01, 0xa9, 0x00, 0x74, 0xfe, 0x90, 0x10, 0x00, 0xf0, 0xa3, 0xd9, 0xfc, 0x74, 0xfd, 0x90} },
+{ 0x0220, 16, {0x11, 0x00, 0xf0, 0xa3, 0xd9, 0xfc, 0x74, 0x02, 0x90, 0x7f, 0x9d, 0xf0, 0x74, 0x00, 0x90, 0x7f} },
+{ 0x0230, 16, {0x97, 0xf0, 0x74, 0x86, 0x90, 0x7f, 0x9e, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f} },
+{ 0x0240, 16, {0xaf, 0xe0, 0xd2, 0xe0, 0xf0, 0x74, 0x01, 0x90, 0x7f, 0xab, 0xf0, 0x90, 0x7f, 0xae, 0xf0, 0x90} },
+{ 0x0250, 16, {0x7f, 0xac, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xad, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x74} },
+{ 0x0260, 16, {0x84, 0x90, 0x7f, 0x98, 0xf0, 0x74, 0x00, 0xf5, 0x98, 0x75, 0xc8, 0x30, 0x7b, 0x05, 0x91, 0x20} },
+{ 0x0270, 16, {0xd2, 0xca, 0x75, 0x98, 0x50, 0xd2, 0xe8, 0xd2, 0xaf, 0xd2, 0xac, 0x74, 0x00, 0xf5, 0x86, 0x90} },
+{ 0x0280, 16, {0x7f, 0xd6, 0x74, 0x02, 0xf0, 0x79, 0x2e, 0x7a, 0x00, 0x7b, 0x00, 0xdb, 0xfe, 0xda, 0xfa, 0xd9} },
+{ 0x0290, 16, {0xf6, 0x74, 0x06, 0xf0, 0x80, 0xfe, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85} },
+{ 0x02a0, 16, {0xc0, 0xe0, 0xe5, 0x91, 0xc2, 0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0x90, 0x7f} },
+{ 0x02b0, 16, {0xe8, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb, 0xa3, 0xe0, 0xfc, 0xe9, 0x54, 0x60, 0xb4} },
+{ 0x02c0, 16, {0x00, 0x03, 0x02, 0x03, 0x39, 0xb4, 0x40, 0x6e, 0xba, 0x00, 0x0b, 0x12, 0x04, 0x20, 0x40, 0x03} },
+{ 0x02d0, 16, {0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0xba, 0x01, 0x03, 0x02, 0x04, 0x0a, 0xba, 0x02, 0x03, 0x02} },
+{ 0x02e0, 16, {0x04, 0x0a, 0xba, 0x03, 0x03, 0x02, 0x04, 0x44, 0xba, 0x04, 0x1e, 0xbb, 0x00, 0x0a, 0x90, 0x7f} },
+{ 0x02f0, 16, {0x95, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x04, 0x02, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0x90} },
+{ 0x0300, 16, {0x7f, 0x95, 0xe0, 0x54, 0xfd, 0xf0, 0x02, 0x04, 0x02, 0xba, 0x05, 0x03, 0x02, 0x04, 0x0a, 0xba} },
+{ 0x0310, 16, {0x06, 0x19, 0xbb, 0x00, 0x08, 0xe5, 0x33, 0xd3, 0x95, 0x32, 0x02, 0x03, 0xde, 0xbb, 0x01, 0x08} },
+{ 0x0320, 16, {0xe5, 0x32, 0xc3, 0x95, 0x33, 0x02, 0x03, 0xde, 0x02, 0x04, 0x0a, 0xba, 0x07, 0x05, 0x8b, 0x34} },
+{ 0x0330, 16, {0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0x02, 0x04, 0x0a, 0xba, 0x00, 0x20, 0xb9, 0x80, 0x10, 0x90} },
+{ 0x0340, 16, {0x7f, 0x00, 0xe4, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x04, 0x02, 0xb9} },
+{ 0x0350, 16, {0x82, 0x02, 0x80, 0xeb, 0xb9, 0x81, 0x02, 0x80, 0xe6, 0x02, 0x04, 0x0a, 0xba, 0x01, 0x0f, 0xbb} },
+{ 0x0360, 16, {0x00, 0x03, 0x02, 0x04, 0x0a, 0xbb, 0x01, 0x03, 0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0xba, 0x03} },
+{ 0x0370, 16, {0x0f, 0xbb, 0x00, 0x03, 0x02, 0x04, 0x0a, 0xbb, 0x01, 0x03, 0x02, 0x04, 0x02, 0x02, 0x04, 0x0a} },
+{ 0x0380, 16, {0xba, 0x06, 0x56, 0xbc, 0x01, 0x0f, 0x90, 0x7f, 0xd4, 0x74, 0x06, 0xf0, 0x90, 0x7f, 0xd5, 0x74} },
+{ 0x0390, 16, {0x12, 0xf0, 0x02, 0x04, 0x02, 0xbc, 0x02, 0x12, 0xbb, 0x00, 0x6f, 0x90, 0x7f, 0xd4, 0x74, 0x06} },
+{ 0x03a0, 16, {0xf0, 0x90, 0x7f, 0xd5, 0x74, 0x24, 0xf0, 0x02, 0x04, 0x02, 0xbc, 0x03, 0x29, 0x74, 0x04, 0xc3} },
+{ 0x03b0, 16, {0x9b, 0x40, 0x57, 0x60, 0x55, 0xeb, 0x2b, 0x90, 0x06, 0x44, 0x25, 0x82, 0xf5, 0x82, 0x74, 0x00} },
+{ 0x03c0, 16, {0x35, 0x83, 0xf5, 0x83, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0x90, 0x7f, 0xd4, 0xe9, 0xf0, 0x90, 0x7f} },
+{ 0x03d0, 16, {0xd5, 0xea, 0xf0, 0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0xba, 0x08, 0x0f, 0x74, 0x01, 0x90, 0x7f} },
+{ 0x03e0, 16, {0x00, 0xf0, 0x74, 0x01, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x04, 0x02, 0xba, 0x09, 0x03, 0x02, 0x04} },
+{ 0x03f0, 16, {0x02, 0xba, 0x0a, 0x05, 0x74, 0x00, 0x02, 0x03, 0xde, 0xba, 0x0b, 0x03, 0x02, 0x04, 0x02, 0x02} },
+{ 0x0400, 16, {0x04, 0x0a, 0x90, 0x7f, 0xb4, 0x74, 0x02, 0xf0, 0x80, 0x09, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01} },
+{ 0x0410, 16, {0xf0, 0x80, 0x00, 0xd0, 0xe0, 0xd0, 0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32} },
+{ 0x0420, 16, {0xeb, 0x20, 0xe7, 0x1e, 0xc3, 0x94, 0x0a, 0x50, 0x19, 0xeb, 0x23, 0x24, 0xfe, 0xf5, 0x82, 0x74} },
+{ 0x0430, 16, {0x05, 0x34, 0x00, 0xf5, 0x83, 0xe0, 0xf5, 0xcb, 0xf5, 0xcd, 0xa3, 0xe0, 0xf5, 0xca, 0xf5, 0xcc} },
+{ 0x0440, 16, {0xc3, 0x22, 0xd3, 0x22, 0xb9, 0x41, 0x11, 0xeb, 0x64, 0xff, 0x54, 0x84, 0xfb, 0x90, 0x7f, 0x98} },
+{ 0x0450, 16, {0xe0, 0x54, 0x7b, 0x4b, 0xf0, 0x02, 0x04, 0x02, 0x90, 0x7f, 0x9b, 0xe0, 0x64, 0xff, 0x02, 0x03} },
+{ 0x0460, 16, {0xde, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85, 0xc0, 0xe0, 0xe5, 0x91, 0xc2} },
+{ 0x0470, 16, {0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xa9, 0x74, 0x04, 0xf0, 0x12, 0x05, 0xa0, 0xd0, 0xe0, 0xd0, 0x85} },
+{ 0x0480, 16, {0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0} },
+{ 0x0490, 16, {0x84, 0xc0, 0x85, 0xc0, 0xe0, 0xe5, 0x91, 0xc2, 0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xaa, 0x74, 0x04} },
+{ 0x04a0, 16, {0xf0, 0x90, 0x7f, 0xc9, 0xe0, 0xf9, 0xe4, 0xf5, 0x86, 0x90, 0x7d, 0xc0, 0x75, 0x85, 0x10, 0x85} },
+{ 0x04b0, 16, {0x32, 0x84, 0xe0, 0x05, 0x86, 0x05, 0x84, 0xf0, 0xe5, 0x84, 0xb5, 0x33, 0x02, 0x80, 0x09, 0x05} },
+{ 0x04c0, 16, {0x32, 0x05, 0x86, 0xa3, 0xd9, 0xec, 0x80, 0x00, 0x90, 0x7f, 0xc9, 0xf0, 0xb1, 0x31, 0xd0, 0xe0} },
+{ 0x04d0, 16, {0xd0, 0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0xe4, 0xf5, 0x86, 0x90, 0x7f} },
+{ 0x04e0, 16, {0xbc, 0xe0, 0x20, 0xe1, 0x4b, 0x90, 0x7d, 0x00, 0xe5, 0x32, 0xf0, 0xa3, 0xe5, 0x33, 0xf0, 0xa3} },
+{ 0x04f0, 16, {0xe5, 0x30, 0xf0, 0xa3, 0xe5, 0x31, 0xf0, 0xa3, 0xe4, 0x30, 0x00, 0x01, 0x04, 0xf0, 0xa3, 0x05} },
+{ 0x0500, 16, {0x86, 0x90, 0x10, 0x00, 0x79, 0x10, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xd9, 0xf6} },
+{ 0x0510, 16, {0x05, 0x86, 0x74, 0xfc, 0xf0, 0xa3, 0x05, 0x86, 0x90, 0x11, 0x00, 0x79, 0x10, 0xe0, 0xa3, 0x05} },
+{ 0x0520, 16, {0x86, 0xf0, 0xa3, 0x05, 0x86, 0xd9, 0xf6, 0xe4, 0xf5, 0x86, 0x90, 0x7f, 0xbd, 0x74, 0x26, 0xf0} },
+{ 0x0530, 16, {0x22, 0x20, 0x00, 0x13, 0xe5, 0x32, 0xb5, 0x33, 0x01, 0x22, 0x05, 0x33, 0x75, 0x83, 0x10, 0x85} },
+{ 0x0540, 16, {0x33, 0x82, 0xe0, 0xf5, 0x99, 0xd2, 0x00, 0x74, 0x00, 0xb5, 0x34, 0x01, 0x22, 0xe5, 0x33, 0xd3} },
+{ 0x0550, 16, {0x95, 0x32, 0xc3, 0x95, 0x34, 0x40, 0xf5, 0x75, 0x34, 0x00, 0xd2, 0x01, 0x02, 0x05, 0xa0, 0xc0} },
+{ 0x0560, 16, {0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85, 0xc0, 0xe0, 0x30, 0x99, 0x07, 0xc2, 0x99} },
+{ 0x0570, 16, {0xc2, 0x00, 0x12, 0x05, 0x34, 0x30, 0x98, 0x05, 0x12, 0x05, 0x8a, 0xc2, 0x98, 0xd0, 0xe0, 0xd0} },
+{ 0x0580, 16, {0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0x75, 0x83, 0x11, 0x85, 0x30, 0x82} },
+{ 0x0590, 16, {0x05, 0x82, 0xe5, 0x99, 0xf0, 0xe5, 0x82, 0xb5, 0x31, 0x01, 0x22, 0x05, 0x30, 0xb1, 0xa0, 0x22} },
+{ 0x05a0, 16, {0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x38, 0x20, 0x01, 0x36, 0xe5, 0x30, 0xb5, 0x31, 0x01, 0x22} },
+{ 0x05b0, 16, {0xe4, 0xf5, 0x86, 0x75, 0x83, 0x11, 0x05, 0x86, 0x90, 0x7e, 0x00, 0xf0, 0xa3, 0x05, 0x86, 0x79} },
+{ 0x05c0, 16, {0x01, 0xe5, 0x30, 0xb5, 0x31, 0x02, 0x80, 0x10, 0x05, 0x31, 0x85, 0x31, 0x82, 0xe0, 0x05, 0x86} },
+{ 0x05d0, 16, {0xf0, 0xa3, 0x05, 0x86, 0x09, 0xb9, 0x40, 0xe9, 0x90, 0x7f, 0xb9, 0xe9, 0x60, 0x01, 0xf0, 0x22} },
+{ 0x05e0, 16, {0xc2, 0x01, 0xe4, 0xf5, 0x86, 0x90, 0x7e, 0x00, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x02, 0xf0, 0x90} },
+{ 0x05f0, 16, {0x7f, 0xb9, 0xf0, 0x22, 0xc2, 0x99, 0xf5, 0x99, 0x30, 0x99, 0xfd, 0xc2, 0x99, 0x22, 0xe5, 0x5e} },
+{ 0x0600, 16, {0xf6, 0x3c, 0xfd, 0x8f, 0xfe, 0xc8, 0xff, 0x64, 0xff, 0xb2, 0xff, 0xd9, 0xff, 0xed, 0xff, 0xf3} },
+{ 0x0610, 16, {0xff, 0xfa, 0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40, 0xcd, 0x06, 0x04, 0x01, 0x89, 0xab} },
+{ 0x0620, 16, {0x01, 0x02, 0x03, 0x01, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00} },
+{ 0x0630, 16, {0x00, 0x02, 0xff, 0xff, 0xff, 0x00, 0x07, 0x05, 0x82, 0x03, 0x40, 0x00, 0x01, 0x07, 0x05, 0x02} },
+{ 0x0640, 16, {0x02, 0x40, 0x00, 0x00, 0x06, 0x4c, 0x06, 0x50, 0x06, 0x72, 0x06, 0xa0, 0x04, 0x03, 0x00, 0x00} },
+{ 0x0650, 16, {0x22, 0x03, 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x75, 0x00, 0x73, 0x00} },
+{ 0x0660, 16, {0x62, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00} },
+{ 0x0670, 16, {0x73, 0x00, 0x2e, 0x03, 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x55, 0x00} },
+{ 0x0680, 16, {0x53, 0x00, 0x42, 0x00, 0x20, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00} },
+{ 0x0690, 16, {0x6c, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00} },
+{ 0x06a0, 6, {0x06, 0x03, 0x34, 0x00, 0x37, 0x00} },
+{ 0xffff, 0, {0x00} }
+};
diff --git a/drivers/usb/serial/keyspan_usa18x_fw.h b/drivers/usb/serial/keyspan_usa18x_fw.h
new file mode 100644
index 000000000000..e7b3bc00ce54
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa18x_fw.h
@@ -0,0 +1,447 @@
+/* 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,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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}},
+ {0x1446, 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}},
+ {0x1486, 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}},
+ {0x14c6, 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}},
+ {0x1506, 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}},
+ {0x1546, 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}},
+ {0x1586, 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}},
+ {0x15c6, 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}},
+ {0x1606, 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}},
+ {0x1646, 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}},
+ {0x1686, 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}},
+ {0x16c6, 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}},
+ {0x1706, 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}},
+ {0x1746, 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}},
+ {0x1786, 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}},
+ {0x17c6, 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}},
+ {0x1806, 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}},
+ {0x1846, 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}},
+ {0x1886, 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}},
+ {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,
+ 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,
+ 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
+ {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x4b, 0x00, 0x65,
+ 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
+ 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, 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 --git a/drivers/usb/serial/keyspan_usa19_fw.h b/drivers/usb/serial/keyspan_usa19_fw.h
new file mode 100644
index 000000000000..b023c523e12a
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa19_fw.h
@@ -0,0 +1,285 @@
+/* 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}},
+ {0x0066, 16, { 0x0f, 0x20, 0x0f, 0x03, 0x02, 0x04, 0x31, 0xc2, 0x0f, 0x20, 0x02, 0x03, 0x02, 0x02, 0x56, 0x20}},
+ {0x0076, 16, { 0x08, 0x03, 0x02, 0x01, 0x27, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x3e, 0x20, 0x09, 0x36, 0x20}},
+ {0x0086, 16, { 0x06, 0x33, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x29, 0x30, 0x0d, 0x12, 0xaf}},
+ {0x0096, 16, { 0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92}},
+ {0x00a6, 16, { 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0}},
+ {0x00b6, 16, { 0xf5, 0x35, 0x02, 0x04, 0x2f, 0xc2, 0x08, 0x02, 0x04, 0x2f, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2}},
+ {0x00c6, 16, { 0x02, 0x30, 0x0a, 0x0c, 0xc2, 0x0a, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0xc2, 0x08, 0x02, 0x04, 0x2f}},
+ {0x00d6, 16, { 0x90, 0x7f, 0xc8, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x08, 0x02, 0x04, 0x2f, 0x90, 0x7f, 0xc9, 0xe0}},
+ {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,
+ 0x07, 0xc2, 0x10, 0xc2, 0x03, 0x02, 0x04, 0x2f, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x50, 0x90}},
+ {0x0146, 64, { 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x30, 0x09, 0x03, 0x02, 0x01, 0xc7, 0x20, 0x06, 0x72, 0x20, 0x00,
+ 0x6f, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x65, 0x30, 0x0d, 0x10, 0x90, 0x7e,
+ 0x41, 0xe0, 0x13, 0x92, 0x9b, 0xa3, 0xe0, 0xf5, 0x99, 0x75, 0x37, 0x03, 0x80, 0x09, 0x90, 0x7e,
+ 0x41, 0xe0, 0xf5, 0x99, 0x75, 0x37, 0x02, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x40, 0x17, 0x90}},
+ {0x0186, 64, { 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x02, 0x20, 0x0a, 0x03, 0x02, 0x04, 0x2f, 0xc2, 0x0a, 0x90, 0x7f, 0xbb,
+ 0x04, 0xf0, 0x02, 0x04, 0x2f, 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, 0x02, 0x04}},
+ {0x01c6, 64, { 0x2f, 0x75, 0x37, 0x01, 0xc2, 0x10, 0x02, 0x04, 0x2f, 0x30, 0x09, 0x03, 0x02, 0x02, 0x51, 0x20, 0x06,
+ 0x79, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x6f, 0x30, 0x0d, 0x12, 0xaf, 0x37,
+ 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x9b,
+ 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0}},
+ {0x0206, 64, { 0xf5, 0x99, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x40, 0x17, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x02, 0x20,
+ 0x0a, 0x03, 0x02, 0x04, 0x2f, 0xc2, 0x0a, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x2f, 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}},
+ {0x0246, 64, { 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2, 0x08, 0x02, 0x04, 0x2f, 0xc2, 0x10, 0x02, 0x04, 0x2f, 0x20,
+ 0x08, 0x03, 0x02, 0x03, 0x08, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x3e, 0x20, 0x09, 0x36, 0x20,
+ 0x06, 0x33, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x29, 0x30, 0x0d, 0x12, 0xaf,
+ 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13}},
+ {0x0286, 64, { 0x92, 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0,
+ 0xf5, 0x35, 0x02, 0x04, 0x2f, 0xc2, 0x08, 0x02, 0x04, 0x2f, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2,
+ 0x02, 0x30, 0x0a, 0x0c, 0xc2, 0x0a, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0xc2, 0x08, 0x02, 0x04, 0x2f,
+ 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x08, 0x02, 0x04, 0x2f, 0x90, 0x7f, 0xc7}},
+ {0x02c6, 64, { 0xe0, 0xf5, 0x50, 0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x20, 0x09, 0x2d, 0x20, 0x06, 0x2a, 0x90,
+ 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x20, 0x30, 0x0d, 0x11, 0x90, 0x7e, 0x41, 0xe0,
+ 0x13, 0x92, 0x0b, 0xa3, 0xe0, 0xf5, 0x35, 0x75, 0x37, 0x03, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x02,
+ 0x90, 0x7e, 0x41, 0xe0, 0xf5, 0x35, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x01, 0xc2, 0x08, 0x02}},
+ {0x0306, 64, { 0x04, 0x2f, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x03, 0x02, 0x03, 0xb0, 0x90, 0x7f, 0xc8, 0xe0, 0x30,
+ 0xe1, 0x07, 0xc2, 0x10, 0xc2, 0x03, 0x02, 0x04, 0x2f, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x50, 0x90,
+ 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x30, 0x09, 0x03, 0x02, 0x03, 0xa8, 0x20, 0x06, 0x72, 0x20,
+ 0x00, 0x6f, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x65, 0x30, 0x0d, 0x10}},
+ {0x0346, 64, { 0x90, 0x7d, 0xc1, 0xe0, 0x13, 0x92, 0x9b, 0xa3, 0xe0, 0xf5, 0x99, 0x75, 0x37, 0x03, 0x80, 0x09, 0x90,
+ 0x7d, 0xc1, 0xe0, 0xf5, 0x99, 0x75, 0x37, 0x02, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x40, 0x17, 0x90,
+ 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x02, 0x20, 0x0a, 0x03, 0x02, 0x04, 0x2f, 0xc2, 0x0a, 0x90, 0x7f,
+ 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x2f, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0}},
+ {0x0386, 64, { 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74,
+ 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2, 0x08, 0x02, 0x04,
+ 0x2f, 0x75, 0x37, 0x01, 0xc2, 0x10, 0x02, 0x04, 0x2f, 0x30, 0x09, 0x03, 0x02, 0x04, 0x2d, 0x20,
+ 0x06, 0x74, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x6a, 0x30, 0x0d, 0x12}},
+ {0x03c6, 64, { 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92,
+ 0x9b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0,
+ 0xf5, 0x99, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x40, 0x13, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x02,
+ 0x30, 0x0a, 0x35, 0xc2, 0x0a, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x80, 0x2c, 0x30, 0x0d, 0x12}},
+ {0x0406, 64, { 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92,
+ 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0,
+ 0xf5, 0x35, 0xd2, 0x08, 0x80, 0x02, 0xc2, 0x10, 0xd2, 0x12, 0x20, 0x98, 0x03, 0x02, 0x05, 0x6d,
+ 0xc2, 0x98, 0x20, 0x01, 0x03, 0x02, 0x04, 0xda, 0x20, 0x11, 0x27, 0xaf, 0x36, 0x05, 0x36}},
+ {0x0446, 64, { 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x99, 0xf0, 0x30, 0x0d, 0x4d, 0xaf,
+ 0x36, 0x05, 0x36, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0,
+ 0x80, 0x3a, 0x85, 0x99, 0x10, 0xe5, 0x10, 0xb5, 0x44, 0x04, 0xd2, 0x06, 0x80, 0x2e, 0xe5, 0x10,
+ 0xb5, 0x43, 0x04, 0xc2, 0x06, 0x80, 0x25, 0xaf, 0x36, 0x05, 0x36, 0x74, 0x80, 0x2f, 0xf5}},
+ {0x0486, 64, { 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x10, 0xf0, 0x30, 0x0d, 0x11, 0xaf, 0x36, 0x05, 0x36, 0x74,
+ 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x0c, 0xe5, 0x36,
+ 0xc3, 0x95, 0x40, 0x50, 0x03, 0x02, 0x05, 0x6b, 0x90, 0x7f, 0xb8, 0xe0, 0x30, 0xe1, 0x16, 0xe5,
+ 0x36, 0xc3, 0x94, 0x40, 0x50, 0x03, 0x02, 0x05, 0x6b, 0x15, 0x36, 0x15, 0x36, 0x05, 0x2b}},
+ {0x04c6, 64, { 0x43, 0x33, 0x01, 0x02, 0x05, 0x6b, 0x90, 0x7f, 0xb7, 0xe5, 0x36, 0xf0, 0x75, 0x36, 0x00, 0xc2, 0x01,
+ 0x02, 0x05, 0x6b, 0x20, 0x11, 0x27, 0xaf, 0x36, 0x05, 0x36, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4,
+ 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x99, 0xf0, 0x30, 0x0d, 0x4d, 0xaf, 0x36, 0x05, 0x36, 0x74, 0x00,
+ 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x3a, 0x85, 0x99}},
+ {0x0506, 64, { 0x10, 0xe5, 0x10, 0xb5, 0x44, 0x04, 0xd2, 0x06, 0x80, 0x2e, 0xe5, 0x10, 0xb5, 0x43, 0x04, 0xc2, 0x06,
+ 0x80, 0x25, 0xaf, 0x36, 0x05, 0x36, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83,
+ 0xe5, 0x10, 0xf0, 0x30, 0x0d, 0x11, 0xaf, 0x36, 0x05, 0x36, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4,
+ 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x0c, 0xe5, 0x36, 0xc3, 0x95, 0x40, 0x40}},
+ {0x0546, 64, { 0x24, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x12, 0xe5, 0x36, 0xc3, 0x94, 0x40, 0x40, 0x16, 0x15, 0x36,
+ 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,
+ 0xe5, 0x3f, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0x7f, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98,
+ 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x45, 0x60, 0x0b, 0xc2, 0x09, 0xc2, 0x06, 0x90, 0x7f, 0x95}},
+ {0x0606, 64, { 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x46, 0x60, 0x0c, 0xd2, 0x06, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x95, 0xe0,
+ 0x44, 0x02, 0xf0, 0xe5, 0x47, 0x60, 0x0d, 0xc2, 0xaf, 0xc2, 0x08, 0xd2, 0x00, 0xe4, 0xf5, 0x50,
+ 0xf5, 0x37, 0xd2, 0xaf, 0xe5, 0x48, 0x60, 0x05, 0x30, 0x11, 0x02, 0xd2, 0x06, 0xe5, 0x49, 0x60,
+ 0x15, 0x90, 0x7f, 0x95, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x9e, 0xe0, 0x44, 0x02, 0xf0}},
+ {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,
+ 0x05, 0x03, 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, 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} }
+};
diff --git a/drivers/usb/serial/keyspan_usa19qi_fw.h b/drivers/usb/serial/keyspan_usa19qi_fw.h
new file mode 100644
index 000000000000..1a2647226091
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa19qi_fw.h
@@ -0,0 +1,284 @@
+/* keyspan_usa19qi_fw.h
+
+ The firmware contained herein as keyspn_usa19qi_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_usa19qi_firmware[] = {
+ {0x0033, 3, { 0x02, 0x00, 0x1a}},
+ {0x001a, 4, { 0x53, 0xd8, 0xef, 0x32}},
+ {0x0003, 16, { 0x8e, 0x11, 0x8f, 0x12, 0xe5, 0x12, 0x15, 0x12, 0xae, 0x11, 0x70, 0x02, 0x15, 0x11, 0x4e, 0x60}},
+ {0x0013, 7, { 0x05, 0x12, 0x0f, 0x84, 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, 0x0b, 0x07, 0xa2, 0x0e, 0x92, 0x9b, 0x85, 0x36, 0x99, 0xc2, 0x99, 0xd2}},
+ {0x0066, 16, { 0x12, 0x20, 0x12, 0x03, 0x02, 0x04, 0x1e, 0xc2, 0x12, 0x20, 0x03, 0x03, 0x02, 0x02, 0x4e, 0x20}},
+ {0x0076, 16, { 0x0b, 0x03, 0x02, 0x01, 0x26, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x3c, 0x20, 0x0c, 0x34, 0x20}},
+ {0x0086, 16, { 0x09, 0x31, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x29, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05}},
+ {0x0096, 16, { 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf}},
+ {0x00a6, 16, { 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x36}},
+ {0x00b6, 16, { 0x02, 0x04, 0x1c, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03, 0x30}},
+ {0x00c6, 16, { 0x0d, 0x0c, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f}},
+ {0x00d6, 16, { 0xc8, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x53}},
+ {0x00e6, 16, { 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x16, 0xff, 0x20, 0x0c, 0x2b, 0x20, 0x09, 0x28}},
+ {0x00f6, 16, { 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x20, 0x30, 0x10, 0x11, 0x90, 0x7d, 0xc1, 0xe0, 0x13}},
+ {0x0043, 3, { 0x02, 0x0e, 0x00}},
+ {0x0000, 3, { 0x02, 0x00, 0x26}},
+ {0x0026, 12, { 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x54, 0x02, 0x0b, 0x28}},
+ {0x0106, 64, { 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x36, 0x75, 0x3a, 0x03, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x02, 0x90, 0x7d,
+ 0xc1, 0xe0, 0xf5, 0x36, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x01, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0xe5,
+ 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x03, 0x02, 0x01, 0xc9, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1, 0x07,
+ 0xc2, 0x14, 0xc2, 0x05, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0x90, 0x7e}},
+ {0x0146, 64, { 0x40, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x16, 0xff, 0x20, 0x0c, 0x70, 0x20, 0x09, 0x6d, 0x90, 0x7f, 0x9b,
+ 0xe0, 0x55, 0x38, 0x70, 0x65, 0x30, 0x10, 0x10, 0x90, 0x7e, 0x41, 0xe0, 0x13, 0x92, 0x9b, 0xa3,
+ 0xe0, 0xf5, 0x99, 0x75, 0x3a, 0x03, 0x80, 0x09, 0x90, 0x7e, 0x41, 0xe0, 0xf5, 0x99, 0x75, 0x3a,
+ 0x02, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40, 0x17, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03}},
+ {0x0186, 64, { 0x20, 0x0d, 0x03, 0x02, 0x04, 0x1c, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x1c, 0x30,
+ 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83,
+ 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e,
+ 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x01, 0xc2, 0x14}},
+ {0x01c6, 64, { 0x02, 0x04, 0x1c, 0x30, 0x0c, 0x03, 0x02, 0x02, 0x49, 0x20, 0x09, 0x77, 0x90, 0x7f, 0x9b, 0xe0, 0x55,
+ 0x38, 0x70, 0x6f, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4,
+ 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x9b, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5,
+ 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x99, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40}},
+ {0x0206, 64, { 0x17, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03, 0x20, 0x0d, 0x03, 0x02, 0x04, 0x1c, 0xc2, 0x0d, 0x90,
+ 0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x1c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40,
+ 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a,
+ 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b}},
+ {0x0246, 64, { 0x02, 0x04, 0x1c, 0xc2, 0x14, 0x02, 0x04, 0x1c, 0x20, 0x0b, 0x03, 0x02, 0x02, 0xff, 0xe5, 0x3a, 0xc3,
+ 0x95, 0x53, 0x50, 0x3c, 0x20, 0x0c, 0x34, 0x20, 0x09, 0x31, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38,
+ 0x70, 0x29, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34,
+ 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5}},
+ {0x0286, 64, { 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0x02, 0x04, 0x1c, 0xc2, 0x0b, 0x02, 0x04, 0x1c,
+ 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x30, 0x0d, 0x0c, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04,
+ 0xf0, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x0b, 0x02,
+ 0x04, 0x1c, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0d}},
+ {0x02c6, 64, { 0x75, 0x16, 0xff, 0x20, 0x0c, 0x2b, 0x20, 0x09, 0x28, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x20,
+ 0x30, 0x10, 0x11, 0x90, 0x7e, 0x41, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x36, 0x75, 0x3a,
+ 0x03, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x02, 0x90, 0x7e, 0x41, 0xe0, 0xf5, 0x36, 0x02, 0x04, 0x1c,
+ 0x75, 0x3a, 0x01, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x03}},
+ {0x0306, 64, { 0x02, 0x03, 0xa2, 0x90, 0x7f, 0xc8, 0xe0, 0x30, 0xe1, 0x07, 0xc2, 0x14, 0xc2, 0x05, 0x02, 0x04, 0x1c,
+ 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x53, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x16, 0xff,
+ 0x20, 0x0c, 0x70, 0x20, 0x09, 0x6d, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x65, 0x30, 0x10,
+ 0x10, 0x90, 0x7d, 0xc1, 0xe0, 0x13, 0x92, 0x9b, 0xa3, 0xe0, 0xf5, 0x99, 0x75, 0x3a, 0x03}},
+ {0x0346, 64, { 0x80, 0x09, 0x90, 0x7d, 0xc1, 0xe0, 0xf5, 0x99, 0x75, 0x3a, 0x02, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40,
+ 0x17, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x20, 0x0d, 0x03, 0x02, 0x04, 0x1c, 0xc2, 0x0d,
+ 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x1c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74,
+ 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a}},
+ {0x0386, 64, { 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b,
+ 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x01, 0xc2, 0x14, 0x02, 0x04, 0x1c, 0x20, 0x0c, 0x75, 0x20, 0x09,
+ 0x72, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x6a, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a,
+ 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x9b, 0xaf}},
+ {0x03c6, 64, { 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x99, 0xe5,
+ 0x3a, 0xc3, 0x95, 0x53, 0x40, 0x13, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x30, 0x0d, 0x35,
+ 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x80, 0x2c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a,
+ 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf}},
+ {0x0406, 64, { 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2,
+ 0x0b, 0x80, 0x02, 0xc2, 0x14, 0xd2, 0x01, 0x20, 0x98, 0x03, 0x02, 0x05, 0x5a, 0xc2, 0x98, 0x20,
+ 0x02, 0x03, 0x02, 0x04, 0xc7, 0x20, 0x16, 0x27, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5,
+ 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x99, 0xf0, 0x30, 0x10, 0x4d, 0xaf, 0x39, 0x05}},
+ {0x0446, 64, { 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x3a, 0x85,
+ 0x99, 0x10, 0xe5, 0x10, 0xb5, 0x47, 0x04, 0xd2, 0x09, 0x80, 0x2e, 0xe5, 0x10, 0xb5, 0x46, 0x04,
+ 0xc2, 0x09, 0x80, 0x25, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e,
+ 0xf5, 0x83, 0xe5, 0x10, 0xf0, 0x30, 0x10, 0x11, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f}},
+ {0x0486, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x0f, 0xe5, 0x39, 0xc3, 0x95, 0x43,
+ 0x50, 0x03, 0x02, 0x05, 0x58, 0x90, 0x7f, 0xb8, 0xe0, 0x30, 0xe1, 0x16, 0xe5, 0x39, 0xc3, 0x94,
+ 0x40, 0x50, 0x03, 0x02, 0x05, 0x58, 0x15, 0x39, 0x15, 0x39, 0x05, 0x2b, 0x43, 0x34, 0x01, 0x02,
+ 0x05, 0x58, 0x90, 0x7f, 0xb7, 0xe5, 0x39, 0xf0, 0x75, 0x39, 0x00, 0xc2, 0x02, 0x02, 0x05}},
+ {0x04c6, 64, { 0x58, 0x20, 0x16, 0x27, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
+ 0x83, 0xe5, 0x99, 0xf0, 0x30, 0x10, 0x4d, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82,
+ 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x3a, 0x85, 0x99, 0x10, 0xe5, 0x10, 0xb5,
+ 0x47, 0x04, 0xd2, 0x09, 0x80, 0x2e, 0xe5, 0x10, 0xb5, 0x46, 0x04, 0xc2, 0x09, 0x80, 0x25}},
+ {0x0506, 64, { 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x10, 0xf0,
+ 0x30, 0x10, 0x11, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
+ 0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x0f, 0xe5, 0x39, 0xc3, 0x95, 0x43, 0x40, 0x24, 0x90, 0x7f, 0xb6,
+ 0xe0, 0x30, 0xe1, 0x12, 0xe5, 0x39, 0xc3, 0x94, 0x40, 0x40, 0x16, 0x15, 0x39, 0x15, 0x39}},
+ {0x0546, 64, { 0x05, 0x2b, 0x43, 0x34, 0x01, 0x80, 0x0b, 0x90, 0x7f, 0xb9, 0xe5, 0x39, 0xf0, 0x75, 0x39, 0x00, 0xd2,
+ 0x02, 0xd2, 0x01, 0x30, 0x01, 0x05, 0xc2, 0x01, 0x02, 0x00, 0x56, 0xd0, 0xd0, 0xd0, 0x86, 0xd0,
+ 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x51, 0xe5, 0x34, 0x60,
+ 0x4d, 0xe5, 0x31, 0x70, 0x49, 0xe5, 0x34, 0x30, 0xe1, 0x08, 0xe4, 0xf5, 0x2f, 0x75, 0x34}},
+ {0x0586, 64, { 0x01, 0x80, 0x0b, 0xa2, 0x08, 0xe4, 0x33, 0xf5, 0x2f, 0xc2, 0x08, 0xe4, 0xf5, 0x34, 0xe4, 0xf5, 0x11,
+ 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x11, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0d, 0x06,
+ 0xff, 0x74, 0x00, 0x25, 0x11, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x11,
+ 0xe5, 0x11, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd, 0x74, 0x0c, 0xf0, 0x75, 0x31, 0x10, 0x90}},
+ {0x05c6, 64, { 0x7f, 0xca, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x06, 0xf3, 0xe4, 0xf5, 0x11, 0x74, 0x40, 0x25, 0x11, 0xf5,
+ 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x11, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x3b,
+ 0xf9, 0xec, 0x34, 0x00, 0xfa, 0xef, 0x12, 0x0d, 0x1f, 0x05, 0x11, 0xe5, 0x11, 0xb4, 0x18, 0xdb,
+ 0xe5, 0x3b, 0x60, 0x11, 0x75, 0xc9, 0x20, 0x75, 0xc8, 0x36, 0x85, 0x3c, 0xca, 0x85, 0x3d}},
+ {0x0606, 64, { 0xcb, 0xe4, 0x90, 0x7f, 0x9f, 0xf0, 0xe5, 0x3e, 0x13, 0x92, 0x10, 0x92, 0x9f, 0x85, 0x3f, 0x38, 0xe5,
+ 0x40, 0x13, 0x92, 0x16, 0xe5, 0x41, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x80,
+ 0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x04, 0xf0, 0xe5, 0x42, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0,
+ 0x54, 0x7f, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x48, 0x60}},
+ {0x0646, 64, { 0x0b, 0xc2, 0x0c, 0xc2, 0x09, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x49, 0x60, 0x0c, 0xd2,
+ 0x09, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x4a, 0x60, 0x0d, 0xc2,
+ 0xaf, 0xc2, 0x0b, 0xd2, 0x00, 0xe4, 0xf5, 0x53, 0xf5, 0x3a, 0xd2, 0xaf, 0xe5, 0x4b, 0x60, 0x05,
+ 0x30, 0x16, 0x02, 0xd2, 0x09, 0xe5, 0x4c, 0x60, 0x15, 0x90, 0x7f, 0x95, 0xe0, 0x54, 0xfd}},
+ {0x0686, 64, { 0xf0, 0x90, 0x7f, 0x9e, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x4d,
+ 0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98, 0x75, 0x2c, 0x01, 0x75, 0x31, 0x1e, 0xe5, 0x4e, 0x60, 0x07,
+ 0xc2, 0x9c, 0xe4, 0xf5, 0x39, 0xf5, 0x2c, 0xe5, 0x4f, 0x60, 0x03, 0xe4, 0xf5, 0x39, 0xe5, 0x50,
+ 0x60, 0x02, 0xd2, 0x07, 0xe5, 0x51, 0x60, 0x0a, 0xe5, 0x4d, 0x70, 0x02, 0xf5, 0x31, 0xe5}},
+ {0x06c6, 64, { 0x51, 0x42, 0x34, 0xe5, 0x52, 0x60, 0x1f, 0x90, 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, 0x03, 0xd2, 0x02, 0xd2, 0x08, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xa2, 0x0c, 0xe4, 0x33,
+ 0xff, 0x65, 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43, 0x34, 0x01, 0xa2, 0x09, 0xe4, 0x33, 0xff}},
+ {0x0706, 64, { 0x65, 0x2a, 0x60, 0x05, 0x8f, 0x2a, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0xff, 0x54, 0x08, 0x64,
+ 0x08, 0xfe, 0x65, 0x25, 0x60, 0x05, 0x8e, 0x25, 0x43, 0x34, 0x01, 0xef, 0x54, 0x10, 0x64, 0x10,
+ 0xfe, 0x65, 0x26, 0x60, 0x05, 0x8e, 0x26, 0x43, 0x34, 0x01, 0xef, 0x54, 0x40, 0x64, 0x40, 0xfe,
+ 0x65, 0x27, 0x60, 0x05, 0x8e, 0x27, 0x43, 0x34, 0x01, 0xef, 0x54, 0x20, 0x64, 0x20, 0xfe}},
+ {0x0746, 64, { 0x65, 0x28, 0x60, 0x05, 0x8e, 0x28, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x40, 0x64, 0x40,
+ 0xfe, 0x65, 0x2e, 0x60, 0x05, 0x8e, 0x2e, 0x43, 0x34, 0x01, 0x30, 0x07, 0x35, 0xc2, 0xaf, 0x30,
+ 0x02, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x39, 0x60, 0x09, 0x90, 0x7f, 0xb7,
+ 0xf0, 0xe4, 0xf5, 0x39, 0xc2, 0x02, 0xc2, 0x07, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20}},
+ {0x0786, 64, { 0xe1, 0x0f, 0xe5, 0x39, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x39, 0xd2, 0x02, 0xc2, 0x07,
+ 0xd2, 0xaf, 0x20, 0x05, 0x3d, 0x30, 0x03, 0x1e, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x33, 0x90,
+ 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x3a, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0xd2,
+ 0x05, 0x75, 0x16, 0xff, 0x80, 0x1c, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x15, 0x90, 0x7d}},
+ {0x07c6, 64, { 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x3a, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x53, 0xd2, 0x05, 0x75,
+ 0x16, 0xff, 0x20, 0x14, 0x33, 0x20, 0x00, 0x06, 0xe5, 0x3a, 0x65, 0x53, 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, 0x53, 0xf5, 0x3a, 0x30, 0x0d, 0x0a, 0xc2}},
+ {0x0806, 64, { 0x0d, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0x30, 0x14, 0x03, 0x02, 0x09, 0x14, 0x20, 0x05,
+ 0x03, 0x02, 0x09, 0x14, 0x30, 0x0c, 0x03, 0x02, 0x09, 0x14, 0x30, 0x09, 0x03, 0x02, 0x09, 0x14,
+ 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x60, 0x03, 0x02, 0x09, 0x14, 0x30, 0x03, 0x61, 0x30, 0x10,
+ 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83}},
+ {0x0846, 64, { 0xe0, 0x13, 0x92, 0x1b, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
+ 0x83, 0xe0, 0xfe, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x2a, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05,
+ 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf,
+ 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5}},
+ {0x0886, 64, { 0x36, 0xd2, 0x0b, 0x80, 0x6a, 0xc2, 0x0b, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x5f, 0x30,
+ 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83,
+ 0xe0, 0x13, 0x92, 0x1b, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d,
+ 0xf5, 0x83, 0xe0, 0xfe, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x2a, 0x30, 0x10, 0x12, 0xaf}},
+ {0x08c6, 64, { 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e,
+ 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5,
+ 0x36, 0xd2, 0x0b, 0x80, 0x09, 0xc2, 0x0b, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x10,
+ 0x04, 0xa2, 0x1b, 0x92, 0x9b, 0xd2, 0x14, 0xc2, 0xaf, 0x8e, 0x99, 0x20, 0x0b, 0x0d, 0x30}},
+ {0x0906, 64, { 0x0d, 0x0a, 0xc2, 0x0d, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x22, 0x90, 0x7f,
+ 0xe9, 0xe0, 0x12, 0x0d, 0x31, 0x0a, 0x11, 0x00, 0x0a, 0x7e, 0x01, 0x0a, 0xdb, 0x03, 0x09, 0x38,
+ 0x06, 0x0a, 0x02, 0x08, 0x09, 0xf6, 0x09, 0x09, 0xde, 0x0a, 0x09, 0xed, 0x0b, 0x00, 0x00, 0x0b,
+ 0x19, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x5a, 0x24, 0x02, 0x60}},
+ {0x0946, 64, { 0x03, 0x02, 0x0b, 0x19, 0x74, 0x0d, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x87, 0x90, 0x7f, 0xd5, 0xf0, 0x02,
+ 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82,
+ 0xd8, 0x75, 0x83, 0x0d, 0xef, 0xf0, 0x75, 0x82, 0xd1, 0x75, 0x83, 0x0d, 0xf0, 0x75, 0x82, 0xca,
+ 0x75, 0x83, 0x0d, 0xf0, 0x75, 0x82, 0xc3, 0x75, 0x83, 0x0d, 0xf0, 0x90, 0x7f, 0xea, 0xe0}},
+ {0x0986, 64, { 0x04, 0x75, 0x82, 0x9e, 0x75, 0x83, 0x0d, 0xf0, 0x74, 0x0d, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x99, 0x90,
+ 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x0b, 0x75, 0x11, 0xff, 0x75,
+ 0x12, 0x0d, 0x75, 0x13, 0xdc, 0x80, 0x1b, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x0b, 0x75, 0x11,
+ 0xff, 0x75, 0x12, 0x0d, 0x75, 0x13, 0xe0, 0x80, 0x09, 0x75, 0x11, 0xff, 0x75, 0x12, 0x0d}},
+ {0x09c6, 64, { 0x75, 0x13, 0xf0, 0xaa, 0x12, 0xa9, 0x13, 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef,
+ 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0x00, 0xe5, 0x15, 0xf0, 0x90, 0x7f, 0xb5,
+ 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x15, 0x02, 0x0b, 0x20, 0x12,
+ 0x0c, 0xb1, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x14, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0x00, 0xe5}},
+ {0x0a06, 64, { 0x14, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f,
+ 0x60, 0x27, 0x14, 0x60, 0x34, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x19, 0xa2, 0x17, 0xe4, 0x33,
+ 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x19, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
+ 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x20, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3}},
+ {0x0a46, 64, { 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 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, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f,
+ 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x17}},
+ {0x0a86, 64, { 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0b,
+ 0x19, 0xc2, 0x17, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x76, 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}},
+ {0x0ac6, 64, { 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44,
+ 0x20, 0xf0, 0x80, 0x45, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x10, 0x24, 0x02, 0x70, 0x39,
+ 0x90, 0x7f, 0xea, 0xe0, 0x64, 0x01, 0x70, 0x2a, 0xd2, 0x17, 0x80, 0x2d, 0x90, 0x7f, 0xea, 0xe0,
+ 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0}},
+ {0x0b06, 64, { 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
+ 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0,
+ 0x22, 0xc2, 0x10, 0xe4, 0xf5, 0x14, 0xf5, 0x34, 0xc2, 0x09, 0xc2, 0x0c, 0xc2, 0x0b, 0xc2, 0x14,
+ 0xc2, 0x0d, 0xc2, 0x16, 0xc2, 0x11, 0xc2, 0x07, 0xc2, 0x12, 0xc2, 0x0f, 0xc2, 0x08, 0xf5}},
+ {0x0b46, 64, { 0x35, 0xf5, 0x39, 0xf5, 0x53, 0xf5, 0x3a, 0xf5, 0x33, 0xf5, 0x30, 0xf5, 0x2f, 0xf5, 0x2e, 0xf5, 0x2d,
+ 0xf5, 0x2c, 0xf5, 0x2b, 0xf5, 0x2a, 0xf5, 0x29, 0xf5, 0x28, 0xf5, 0x27, 0xf5, 0x26, 0xf5, 0x25,
+ 0xf5, 0x24, 0xc2, 0x05, 0xc2, 0x18, 0xc2, 0x1a, 0xc2, 0x17, 0xc2, 0x19, 0xc2, 0x15, 0xc2, 0x04,
+ 0xd2, 0x13, 0xc2, 0x06, 0xc2, 0x01, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0xd2, 0xe8}},
+ {0x0b86, 64, { 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, 0x0f, 0xf0, 0x90, 0x7f, 0xac, 0x74, 0x0e,
+ 0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0x1b, 0x12, 0x0f, 0x5f, 0xc2, 0x18, 0x30, 0x04, 0x03}},
+ {0x0bc6, 64, { 0x12, 0x05, 0x6d, 0x30, 0x04, 0x2a, 0x30, 0x06, 0x27, 0xc2, 0x06, 0xe5, 0x16, 0x60, 0x16, 0x15, 0x16,
+ 0x90, 0x7f, 0xd8, 0xe0, 0x30, 0xe6, 0x04, 0x7f, 0x00, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96,
+ 0xef, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x96, 0x74, 0x20, 0xf0, 0x12, 0x0c, 0x0b, 0x80, 0xcd, 0x30,
+ 0x18, 0x07, 0xc2, 0x18, 0x12, 0x09, 0x15, 0x80, 0xc3, 0x30, 0x1a, 0xc0, 0xc2, 0x1a, 0x12}},
+ {0x0c06, 64, { 0x0f, 0xbb, 0x80, 0xb9, 0x22, 0xe5, 0x31, 0x60, 0x02, 0x15, 0x31, 0xe5, 0x39, 0x60, 0x55, 0x65, 0x35,
+ 0x70, 0x4b, 0xe5, 0x33, 0xf4, 0x60, 0x02, 0x05, 0x33, 0xe5, 0x33, 0xc3, 0x95, 0x44, 0x40, 0x43,
+ 0xc2, 0xaf, 0x30, 0x02, 0x1b, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7f, 0xb7, 0xe5,
+ 0x39, 0xf0, 0xc2, 0x02, 0xe4, 0xf5, 0x39, 0xf5, 0x33, 0xf5, 0x35, 0x75, 0x16, 0xff, 0x80}},
+ {0x0c46, 64, { 0x19, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7f, 0xb9, 0xe5, 0x39, 0xf0, 0xd2, 0x02, 0xe4,
+ 0xf5, 0x39, 0xf5, 0x33, 0xf5, 0x35, 0x75, 0x16, 0xff, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x39, 0x35,
+ 0xe4, 0xf5, 0x33, 0xe5, 0x2c, 0x60, 0x30, 0x20, 0x0f, 0x07, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0,
+ 0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4, 0xf5, 0x2d, 0x43, 0x34, 0x01, 0xe4, 0xf5, 0x30, 0x80}},
+ {0x0c86, 64, { 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x45, 0x50, 0x0d, 0xe5, 0x30, 0xb5, 0x45, 0x06, 0x75, 0x2d, 0x01, 0x43,
+ 0x34, 0x01, 0x05, 0x30, 0xc2, 0x0f, 0x22, 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2, 0x04, 0x7f, 0x00,
+ 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90,
+ 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x94, 0x74}},
+ {0x0cc6, 64, { 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x97, 0x74, 0x86, 0xf0, 0x90, 0x7f, 0x95,
+ 0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0x90, 0x7f, 0x98, 0xf0, 0xe4, 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, 0x04, 0x22}},
+ {0x0d06, 64, { 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, 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}},
+ {0x0d46, 64, { 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf,
+ 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, 0x00, 0x00, 0x00, 0x00, 0x00}},
+ {0x0d86, 64, { 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00, 0x00, 0x40, 0xcd, 0x06, 0x0c, 0x01, 0x01, 0x00, 0x01, 0x02,
+ 0x00, 0x02, 0x09, 0x02, 0x43, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x07,
+ 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, 0x81, 0x02, 0x40, 0x00}},
+ {0x0dc6, 64, { 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05,
+ 0x84, 0x02, 0x40, 0x00, 0x01, 0x04, 0x03, 0x09, 0x04, 0x10, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79,
+ 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x0e, 0x03, 0x53, 0x00, 0x65, 0x00, 0x72,
+ 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x02, 0x0e, 0xa2, 0x00, 0x02, 0x0e}},
+ {0x0e06, 64, { 0x7b, 0x00, 0x02, 0x0d, 0x57, 0x00, 0x02, 0x0e, 0xc9, 0x00, 0x02, 0x0e, 0x10, 0x00, 0x02, 0x0e, 0x14,
+ 0x00, 0x02, 0x0e, 0x18, 0x00, 0x02, 0x0e, 0x1c, 0x00, 0x02, 0x0e, 0xf0, 0x00, 0x02, 0x0e, 0x24,
+ 0x00, 0x02, 0x0f, 0x15, 0x00, 0x02, 0x0e, 0x2c, 0x00, 0x02, 0x0f, 0x3a, 0xe4, 0x90, 0x7f, 0x95,
+ 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02}},
+ {0x0e46, 64, { 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x10, 0xf0, 0xe4, 0x90, 0x7f,
+ 0x96, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xfe, 0xf0, 0x30, 0x17, 0x04, 0x7f, 0x80, 0x80, 0x02, 0x7f,
+ 0x00, 0x90, 0x7f, 0x97, 0xef, 0xf0, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0xf0, 0x90,
+ 0x7f, 0x98, 0xf0, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0}},
+ {0x0e86, 64, { 0x86, 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0xd2, 0x06, 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, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83}},
+ {0x0ec6, 64, { 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86,
+ 0x00, 0xd2, 0x1a, 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, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74}},
+ {0x0f06, 64, { 0x02, 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, 0x53, 0x91, 0xef,
+ 0x90, 0x7f, 0xa9, 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}},
+ {0x0f46, 64, { 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x08, 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, 0x1b, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00,
+ 0x03, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x74, 0x00}},
+ {0x0f86, 64, { 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, 0x90, 0x7f,
+ 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e, 0x00, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0,
+ 0x54, 0xfe, 0xf0, 0x22, 0x12, 0x0e, 0x33, 0x12, 0x0f, 0x95, 0x90, 0x7f, 0xd6, 0xe0, 0x30}},
+ {0x0fc6, 9, { 0xe7, 0x03, 0x12, 0x0f, 0xa5, 0x12, 0x0c, 0xb1, 0x22}},
+ {0xffff, 0, {0x00}}
+};
diff --git a/drivers/usb/serial/keyspan_usa19qw_fw.h b/drivers/usb/serial/keyspan_usa19qw_fw.h
new file mode 100644
index 000000000000..0803f8b0bc34
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa19qw_fw.h
@@ -0,0 +1,448 @@
+/* keyspan_usa19qw_fw.h
+
+ The firmware contained herein as keyspan_usa19wq_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_usa19qw_firmware[] = {
+ {0x0033, 3, { 0x02, 0x00, 0x2d}},
+ {0x002d, 4, { 0x53, 0xd8, 0xef, 0x32}},
+ {0x0046, 16, { 0x30, 0x10, 0x19, 0x12, 0x0e, 0x0f, 0xef, 0xc3, 0x95, 0x14, 0x40, 0x03, 0x02, 0x00, 0xdf, 0x90}},
+ {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x10, 0xc2, 0x0b, 0x02, 0x00, 0xdf, 0x30, 0x0d, 0x3e, 0x90}},
+ {0x0066, 16, { 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x73, 0x12, 0x0e, 0x0f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x6a, 0x90}},
+ {0x0076, 16, { 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x10, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x36, 0x20, 0x0b, 0x11}},
+ {0x0086, 16, { 0x60, 0x0f, 0xf5, 0x24, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x29, 0x7e, 0x75, 0x2a, 0x41, 0x12, 0x09}},
+ {0x0096, 16, { 0x10, 0xc2, 0x0d, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x75, 0x26, 0xff, 0x80, 0x3c, 0x90, 0x7f, 0xc8}},
+ {0x00a6, 16, { 0xe0, 0x20, 0xe1, 0x35, 0x12, 0x0e, 0x0f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x2c, 0x90, 0x7d, 0xc0}},
+ {0x00b6, 16, { 0xe0, 0x13, 0x92, 0x10, 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x36, 0x20, 0x0b, 0x11, 0x60, 0x0f}},
+ {0x00c6, 16, { 0xf5, 0x24, 0x7e, 0x7d, 0x7f, 0xc1, 0x75, 0x29, 0x7d, 0x75, 0x2a, 0xc1, 0x12, 0x09, 0x10, 0xd2}},
+ {0x00d6, 16, { 0x0d, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0x75, 0x26, 0xff, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03}},
+ {0x00e6, 16, { 0x02, 0x01, 0x68, 0x12, 0x0c, 0xff, 0x8f, 0x36, 0x12, 0x0e, 0x1b, 0x8f, 0x11, 0xe5, 0x36, 0xc3}},
+ {0x00f6, 16, { 0x95, 0x13, 0x50, 0x0f, 0x12, 0x0d, 0xde, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x11, 0x20, 0xe7, 0x03}},
+ {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
+ {0x0043, 3, { 0x02, 0x0e, 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, 0x09, 0xc5}},
+ {0x0106, 64, { 0x30, 0x13, 0x5f, 0xc2, 0x13, 0xe5, 0x36, 0x60, 0x59, 0xb4, 0x80, 0x03, 0x43, 0x11, 0x02, 0xe5, 0x11,
+ 0x30, 0xe7, 0x24, 0xe5, 0x36, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x36, 0x20, 0x85, 0x36, 0x24,
+ 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x29, 0x7e, 0x75, 0x2a, 0x80, 0x12, 0x0b, 0x9a, 0xe5, 0x36, 0x25,
+ 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x2a, 0xe5, 0x36, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75}},
+ {0x0146, 64, { 0x36, 0x3f, 0x85, 0x36, 0x24, 0x90, 0x7e, 0x80, 0xe5, 0x11, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x29,
+ 0x7e, 0x75, 0x2a, 0x81, 0x12, 0x09, 0x35, 0xe5, 0x36, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x75, 0x26,
+ 0xff, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x0e, 0x03, 0x02, 0x03, 0xc4, 0xe4, 0xf5,
+ 0x35, 0x74, 0x40, 0x25, 0x35, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
+ {0x0186, 64, { 0x35, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
+ 0x12, 0x0a, 0x97, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x6e,
+ 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x0c, 0xda, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
+ 0x0c, 0x1c, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x0c, 0x42, 0xd2, 0x11, 0xd2, 0x12, 0x75}},
+ {0x01c6, 64, { 0x36, 0x04, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x05, 0xc2, 0x12, 0x43, 0x36, 0xc0, 0x90, 0x7e, 0x04, 0xe0,
+ 0xb4, 0x01, 0x07, 0xc2, 0x12, 0x43, 0x36, 0x0b, 0x80, 0x10, 0x90, 0x7e, 0x04, 0xe0, 0x60, 0x07,
+ 0xc2, 0x11, 0x43, 0x36, 0x09, 0x80, 0x03, 0x43, 0x36, 0x02, 0x7f, 0x03, 0xad, 0x36, 0x12, 0x0c,
+ 0xda, 0x43, 0x1a, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a}},
+ {0x0206, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x17, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
+ 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x19, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
+ 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x42, 0x90, 0x7e, 0x13, 0xe0,
+ 0x60, 0x05, 0x43, 0x16, 0x04, 0x80, 0x03, 0x53, 0x16, 0xfb, 0xe4, 0xff, 0xad, 0x16, 0x12}},
+ {0x0246, 64, { 0x0c, 0xda, 0x90, 0x7e, 0x08, 0xe0, 0x60, 0x05, 0x43, 0x18, 0x80, 0x80, 0x03, 0x53, 0x18, 0x7f, 0x53,
+ 0x18, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x18, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x0c,
+ 0x8e, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x0c, 0xb4, 0xaf, 0x18, 0x12, 0x0c, 0x68, 0x90, 0x7e,
+ 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x1a, 0x01, 0x80, 0x03, 0x53, 0x1a}},
+ {0x0286, 64, { 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a, 0xf0, 0x90, 0x7e, 0x0c, 0xe0,
+ 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x1a, 0x02, 0x80, 0x03, 0x53, 0x1a, 0xfd, 0x90, 0x7f,
+ 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x13,
+ 0xa3, 0xe0, 0x13, 0x92, 0x14, 0xa3, 0xe0, 0xf5, 0x14, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x1a}},
+ {0x02c6, 64, { 0x10, 0x80, 0x03, 0x53, 0x1a, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a,
+ 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x19, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
+ 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x0d,
+ 0xd2, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x16, 0xfd, 0xe4, 0xff, 0xad, 0x16}},
+ {0x0306, 64, { 0x12, 0x0c, 0xda, 0xe4, 0xf5, 0x0e, 0xf5, 0x0d, 0xd2, 0x0f, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43,
+ 0x16, 0x02, 0xe4, 0xff, 0xad, 0x16, 0x12, 0x0c, 0xda, 0x75, 0x0d, 0x01, 0xd2, 0x0f, 0x90, 0x7e,
+ 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x17, 0x44, 0x04, 0x90, 0xc0,
+ 0x00, 0xf0, 0xd2, 0x0b, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x19, 0x40, 0x90, 0x7f}},
+ {0x0346, 64, { 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60,
+ 0x0f, 0x53, 0x16, 0xfe, 0xe4, 0xff, 0xad, 0x16, 0x12, 0x0c, 0xda, 0x75, 0x0f, 0x01, 0xd2, 0x0f,
+ 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x16, 0x01, 0xe4, 0xff, 0xad, 0x16, 0x12, 0x0c, 0xda,
+ 0xe4, 0xf5, 0x0f, 0xd2, 0x0f, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74}},
+ {0x0386, 64, { 0x12, 0xf0, 0xe5, 0x17, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2,
+ 0x13, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x10, 0x01, 0xe4, 0xf5, 0x12, 0xd2, 0x0f, 0x90,
+ 0x7e, 0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15,
+ 0xf0, 0x74, 0x35, 0xf0, 0xd2, 0x0d, 0xc2, 0x0e, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x16}},
+ {0x03c6, 64, { 0x71, 0xe5, 0x12, 0x60, 0x02, 0x15, 0x12, 0xe5, 0x30, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x30, 0x80,
+ 0x60, 0x75, 0x30, 0x0a, 0x12, 0x0d, 0xd2, 0xef, 0x54, 0x01, 0xf5, 0x36, 0x65, 0x0e, 0x60, 0x07,
+ 0x85, 0x36, 0x0e, 0xd2, 0x0f, 0x80, 0x11, 0x12, 0x0e, 0x27, 0xef, 0x54, 0x10, 0xf5, 0x36, 0x65,
+ 0x09, 0x60, 0x05, 0x85, 0x36, 0x09, 0xd2, 0x0f, 0x12, 0x0e, 0x27, 0xef, 0x54, 0x80, 0xf5}},
+ {0x0406, 64, { 0x36, 0x65, 0x0a, 0x60, 0x05, 0x85, 0x36, 0x0a, 0xd2, 0x0f, 0x12, 0x0e, 0x27, 0xef, 0x54, 0x20, 0xf5,
+ 0x36, 0x65, 0x0b, 0x60, 0x08, 0x85, 0x36, 0x0b, 0x30, 0x11, 0x02, 0xd2, 0x0f, 0x12, 0x0e, 0x27,
+ 0xef, 0x54, 0x40, 0xf5, 0x36, 0x65, 0x0c, 0x60, 0x08, 0x85, 0x36, 0x0c, 0x30, 0x12, 0x02, 0xd2,
+ 0x0f, 0x30, 0x16, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0}},
+ {0x0446, 64, { 0x60, 0x09, 0xe0, 0xf5, 0x32, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x33, 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, 0x29, 0xe5, 0x27, 0x70, 0x40, 0x30, 0x0f, 0x39, 0xe5,
+ 0x12, 0x70, 0x35, 0xc2, 0x0f, 0xf5, 0x35, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x08, 0x25, 0x35}},
+ {0x0486, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0a, 0x51, 0xff, 0x74, 0x80, 0x25, 0x35, 0xf5, 0x82, 0xe4, 0x34,
+ 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
+ 0x09, 0xf0, 0x75, 0x12, 0x10, 0xe4, 0xf5, 0x10, 0x75, 0x27, 0x02, 0x22, 0xe5, 0x27, 0x64, 0x02,
+ 0x70, 0x36, 0x30, 0x05, 0x2f, 0xc2, 0x05, 0xf5, 0x35, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2b}},
+ {0x04c6, 64, { 0x25, 0x35, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0a, 0x51, 0xff, 0x74, 0x80, 0x25, 0x35, 0xf5, 0x82,
+ 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x05, 0xdb, 0x90, 0x7f,
+ 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x27, 0x03, 0x22, 0xe5, 0x32, 0x60, 0x33, 0x75, 0x31, 0x03, 0x15,
+ 0x32, 0xe4, 0xf5, 0x35, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x31, 0x25, 0x35, 0xf9, 0xee, 0x34}},
+ {0x0506, 64, { 0x00, 0xfa, 0x12, 0x0a, 0x51, 0xff, 0x74, 0x80, 0x25, 0x35, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83,
+ 0xef, 0xf0, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4,
+ 0xf5, 0x27, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0a, 0xa9, 0x06, 0x08, 0x00, 0x06, 0x7c, 0x01,
+ 0x06, 0xe9, 0x03, 0x05, 0x4d, 0x06, 0x05, 0xf9, 0x08, 0x05, 0xed, 0x09, 0x05, 0xd5, 0x0a}},
+ {0x0546, 64, { 0x05, 0xe4, 0x0b, 0x00, 0x00, 0x07, 0x39, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60,
+ 0x50, 0x24, 0x02, 0x70, 0x6f, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5,
+ 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03,
+ 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0}},
+ {0x0586, 64, { 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, 0x07,
+ 0x40, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0b, 0x1c, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f,
+ 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
+ {0x05c6, 64, { 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f,
+ 0x00, 0xe5, 0x25, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea,
+ 0xe0, 0xf5, 0x25, 0x02, 0x07, 0x40, 0x12, 0x07, 0x48, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x23, 0x02,
+ 0x07, 0x40, 0x90, 0x7f, 0x00, 0xe5, 0x23, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02}},
+ {0x0606, 64, { 0x07, 0x40, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
+ 0xa2, 0x01, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x07, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
+ 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x40, 0xe4, 0x90, 0x7f,
+ 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f}},
+ {0x0646, 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, 0x07, 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
+ 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1e, 0x24, 0x02}},
+ {0x0686, 64, { 0x60, 0x03, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x06, 0x12, 0x0d, 0xf9, 0x02, 0x07,
+ 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x40, 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}},
+ {0x06c6, 64, { 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, 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, 0xf6, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
+ {0x0706, 64, { 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, 0x44, 0x02}},
+ {0x0746, 64, { 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74,
+ 0x20, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f,
+ 0x98, 0x74, 0x10, 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}},
+ {0x0786, 64, { 0xfa, 0xe4, 0x12, 0x0a, 0x97, 0x0f, 0xbf, 0x09, 0xee, 0x75, 0x13, 0x01, 0xe4, 0xf5, 0x12, 0xf5, 0x30,
+ 0xf5, 0x11, 0xc2, 0x0f, 0xc2, 0x13, 0xc2, 0x0e, 0xc2, 0x0b, 0xc2, 0x10, 0xc2, 0x04, 0x90, 0x7f,
+ 0x98, 0x74, 0x13, 0xf0, 0x75, 0x19, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4,
+ 0xfd, 0x12, 0x0c, 0xda, 0x7f, 0x10, 0x8f, 0x18, 0x12, 0x0c, 0x68, 0x90, 0x7f, 0x98, 0x74}},
+ {0x07c6, 64, { 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x17, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
+ 0x0c, 0xda, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x16, 0x12, 0x0c, 0xda, 0x90, 0x7f, 0x98,
+ 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x0c, 0xda, 0x7f,
+ 0x01, 0x12, 0x0d, 0x6a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x0c, 0xda, 0xe4, 0xff, 0xe5, 0x16}},
+ {0x0806, 64, { 0x54, 0x7f, 0xfd, 0x12, 0x0c, 0xda, 0x12, 0x0e, 0x0f, 0x8f, 0x15, 0xe4, 0xff, 0xe5, 0x16, 0x44, 0x80,
+ 0xfd, 0x12, 0x0c, 0xda, 0xe5, 0x15, 0x30, 0xe7, 0x04, 0xc2, 0x08, 0x80, 0x02, 0xd2, 0x08, 0x90,
+ 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x75, 0x1a, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0x03,
+ 0x22, 0xd2, 0x15, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x0d, 0xf9, 0xd2, 0xe8}},
+ {0x0846, 64, { 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, 0x16, 0x12, 0x0d,
+ 0x24, 0xc2, 0x02, 0xe4, 0xf5, 0x28, 0xf5, 0x30, 0xc2, 0x09, 0xf5, 0x23, 0xc2, 0x03, 0x90}},
+ {0x0886, 64, { 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x34, 0x60, 0x48, 0x30, 0x03, 0x05, 0xd2, 0x16,
+ 0x12, 0x00, 0x46, 0xe5, 0x0f, 0x60, 0x22, 0xe5, 0x26, 0x60, 0x16, 0x15, 0x26, 0x90, 0x7f, 0xd8,
+ 0xe0, 0x30, 0xe6, 0x04, 0x7f, 0x20, 0x80, 0x02, 0x7f, 0x30, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x80,
+ 0x1a, 0x90, 0x7f, 0x96, 0x74, 0x30, 0xf0, 0x80, 0x12, 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2}},
+ {0x08c6, 64, { 0x04, 0x7f, 0x30, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0xf5,
+ 0x34, 0x80, 0x20, 0x30, 0x03, 0x07, 0xc2, 0x16, 0x12, 0x00, 0x46, 0x80, 0x16, 0xe5, 0x0f, 0x70,
+ 0x12, 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2, 0x04, 0x7f, 0x30, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f,
+ 0x96, 0xef, 0xf0, 0x30, 0x02, 0x07, 0xc2, 0x02, 0x12, 0x05, 0x2a, 0x80, 0x86, 0x30, 0x0a}},
+ {0x0906, 64, { 0x83, 0xc2, 0x0a, 0x12, 0x0b, 0x5d, 0x02, 0x08, 0x8a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf,
+ 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5, 0x29, 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, 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5, 0x29, 0xf5, 0x83, 0xc2}},
+ {0x0946, 64, { 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, 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5,
+ 0x29, 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}},
+ {0x0986, 64, { 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5, 0x29, 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, 0x78}},
+ {0x09c6, 64, { 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x39, 0x02, 0x0a, 0x0c, 0x02, 0x08, 0x38, 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}},
+ {0x0a06, 64, { 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0d, 0x8b, 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}},
+ {0x0a46, 64, { 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, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25}},
+ {0x0a86, 64, { 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, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02}},
+ {0x0ac6, 64, { 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c,
+ 0x74, 0x20, 0xf0, 0x30, 0x01, 0x03, 0xff, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x7f, 0x96, 0xef, 0xf0,
+ 0xe4, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0,
+ 0x30, 0x08, 0x11, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0x90, 0x7f}},
+ {0x0b06, 64, { 0x98, 0x74, 0x20, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xdf, 0xf0, 0xe4,
+ 0x90, 0x7f, 0x98, 0xf0, 0x22, 0x8f, 0x35, 0xe4, 0xf5, 0x36, 0x75, 0x37, 0xff, 0x75, 0x38, 0x19,
+ 0x75, 0x39, 0x86, 0xab, 0x37, 0xaa, 0x38, 0xa9, 0x39, 0x90, 0x00, 0x01, 0x12, 0x0a, 0x6a, 0xb4,
+ 0x03, 0x1d, 0xaf, 0x36, 0x05, 0x36, 0xef, 0xb5, 0x35, 0x01, 0x22, 0x12, 0x0a, 0x51, 0x7e}},
+ {0x0b46, 64, { 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x37, 0xff, 0xf5, 0x38, 0x89, 0x39, 0x80, 0xd4, 0x7b,
+ 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x35, 0x12, 0x0a, 0xcf, 0x20,
+ 0x08, 0x07, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0,
+ 0x12, 0x09, 0xb5, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0e, 0x30, 0x01, 0x05, 0x12, 0x0d}},
+ {0x0b86, 64, { 0xbc, 0x80, 0x06, 0x12, 0x0d, 0x49, 0xef, 0x60, 0xe1, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12,
+ 0x07, 0x48, 0x22, 0x05, 0x2a, 0xe5, 0x2a, 0xae, 0x29, 0x70, 0x02, 0x05, 0x29, 0x14, 0xf5, 0x82,
+ 0x8e, 0x83, 0xe5, 0x11, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x2a, 0xe5, 0x2a, 0xac, 0x29, 0x70, 0x02,
+ 0x05, 0x29, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x24, 0xe5, 0x24, 0x60, 0x07}},
+ {0x0bc6, 64, { 0x12, 0x0e, 0x1b, 0x8f, 0x11, 0x80, 0xcd, 0x22, 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, 0xd2, 0x0a}},
+ {0x0c06, 64, { 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, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74}},
+ {0x0c46, 64, { 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, 0x19, 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}},
+ {0x0c86, 64, { 0x19, 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, 0x19, 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}},
+ {0x0cc6, 64, { 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0,
+ 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 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, 0xea, 0x8f, 0x37, 0x12, 0x0d}},
+ {0x0d06, 64, { 0xea, 0x8f, 0x38, 0xe5, 0x37, 0x65, 0x38, 0x60, 0x12, 0x12, 0x0d, 0xea, 0x8f, 0x37, 0xe5, 0x37, 0x65,
+ 0x38, 0x60, 0x07, 0x12, 0x0d, 0xea, 0x8f, 0x38, 0x80, 0xe8, 0xaf, 0x37, 0x22, 0x90, 0x7f, 0xd6,
+ 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x16, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f,
+ 0xf4, 0x7e, 0x01, 0x12, 0x0d, 0xa5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44}},
+ {0x0d46, 64, { 0x04, 0xf0, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x36, 0x12, 0x07, 0x48, 0x12, 0x0e, 0x27, 0xef, 0x30,
+ 0xe6, 0x0b, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x36, 0x60, 0xf1, 0x7f, 0x01, 0x22, 0x12, 0x0a, 0xcf,
+ 0x7f, 0x00, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x16, 0x54, 0x7f, 0xfd, 0x12, 0x0c, 0xda, 0x90,
+ 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x16, 0x44, 0x80}},
+ {0x0d86, 64, { 0xfd, 0x12, 0x0c, 0xda, 0x22, 0x05, 0x2b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x31, 0x03, 0x00, 0x00,
+ 0xc1, 0x86, 0xc1, 0x02, 0xc1, 0x0a, 0xc1, 0x01, 0xc1, 0x07, 0x01, 0x27, 0x00, 0x00, 0x8e, 0x36,
+ 0x8f, 0x37, 0xe5, 0x37, 0x15, 0x37, 0xae, 0x36, 0x70, 0x02, 0x15, 0x36, 0x4e, 0x60, 0x05, 0x12,
+ 0x09, 0xa4, 0x80, 0xee, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e}},
+ {0x0dc6, 64, { 0x00, 0x12, 0x0d, 0xa5, 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, 0xd2,
+ 0x01, 0x22, 0xc2, 0x01, 0x22, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0xce, 0x00, 0x02, 0x0e}},
+ {0x0e06, 64, { 0x04, 0x00, 0x02, 0x00, 0x03, 0x00, 0x02, 0x0b, 0xf5, 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, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
+ {0x0e46, 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}},
+ {0x0e86, 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}},
+ {0x0ec6, 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}},
+ {0x0f06, 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}},
+ {0x0f46, 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}},
+ {0x0f86, 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}},
+ {0x0fc6, 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}},
+ {0x1006, 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}},
+ {0x1046, 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}},
+ {0x1086, 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}},
+ {0x10c6, 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}},
+ {0x1106, 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}},
+ {0x1146, 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}},
+ {0x1186, 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}},
+ {0x11c6, 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}},
+ {0x1206, 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}},
+ {0x1246, 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}},
+ {0x1286, 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}},
+ {0x12c6, 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}},
+ {0x1306, 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}},
+ {0x1346, 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}},
+ {0x1386, 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}},
+ {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}},
+ {0x1446, 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}},
+ {0x1486, 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}},
+ {0x14c6, 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}},
+ {0x1506, 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}},
+ {0x1546, 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}},
+ {0x1586, 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}},
+ {0x15c6, 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}},
+ {0x1606, 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}},
+ {0x1646, 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}},
+ {0x1686, 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}},
+ {0x16c6, 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}},
+ {0x1706, 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}},
+ {0x1746, 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}},
+ {0x1786, 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}},
+ {0x17c6, 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}},
+ {0x1806, 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}},
+ {0x1846, 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}},
+ {0x1886, 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}},
+ {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, 0x19, 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,
+ 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
+ {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x4b, 0x00, 0x65,
+ 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
+ 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 --git a/drivers/usb/serial/keyspan_usa19w_fw.h b/drivers/usb/serial/keyspan_usa19w_fw.h
new file mode 100644
index 000000000000..75d6191245c6
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa19w_fw.h
@@ -0,0 +1,446 @@
+/* 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,
+ 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04,
+ 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,
+ 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x24, 0x02, 0x07, 0x2e, 0x12, 0x07, 0x36, 0x02,
+ 0x07, 0x2e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x07, 0x2e, 0x90,
+ 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2}},
+ {0x0606, 64, { 0x01, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x07, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
+ 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x2e, 0xe4, 0x90, 0x7f, 0x00, 0xf0,
+ 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xec, 0xe0, 0xf4,
+ 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4}},
+ {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,
+ 0x90, 0x7f, 0xb4, 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}},
+ {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,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
+ {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}},
+ {0x0e46, 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}},
+ {0x0e86, 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}},
+ {0x0ec6, 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}},
+ {0x0f06, 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}},
+ {0x0f46, 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}},
+ {0x0f86, 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}},
+ {0x0fc6, 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}},
+ {0x1006, 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}},
+ {0x1046, 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}},
+ {0x1086, 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}},
+ {0x10c6, 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}},
+ {0x1106, 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}},
+ {0x1146, 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}},
+ {0x1186, 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}},
+ {0x11c6, 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}},
+ {0x1206, 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}},
+ {0x1246, 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}},
+ {0x1286, 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}},
+ {0x12c6, 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}},
+ {0x1306, 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}},
+ {0x1346, 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}},
+ {0x1386, 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}},
+ {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}},
+ {0x1446, 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}},
+ {0x1486, 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}},
+ {0x14c6, 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}},
+ {0x1506, 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}},
+ {0x1546, 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}},
+ {0x1586, 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}},
+ {0x15c6, 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}},
+ {0x1606, 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}},
+ {0x1646, 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}},
+ {0x1686, 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}},
+ {0x16c6, 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}},
+ {0x1706, 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}},
+ {0x1746, 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}},
+ {0x1786, 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}},
+ {0x17c6, 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}},
+ {0x1806, 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}},
+ {0x1846, 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}},
+ {0x1886, 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}},
+ {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,
+ 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
+ {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x4b, 0x00, 0x65,
+ 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
+ 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 --git a/drivers/usb/serial/keyspan_usa26msg.h b/drivers/usb/serial/keyspan_usa26msg.h
new file mode 100644
index 000000000000..3808727db65a
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa26msg.h
@@ -0,0 +1,260 @@
+/*
+ usa26msg.h
+
+ Copyright (C) 1998-2000 InnoSys Incorporated. All Rights Reserved
+ This file is available under a BSD-style copyright
+
+ Keyspan USB Async Message Formats for the USA28X
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain this licence text
+ without modification, this list of conditions, and the following
+ disclaimer. The following copyright notice must appear immediately at
+ the beginning of all source files:
+
+ Copyright (C) 1998-2000 InnoSys Incorporated. All Rights Reserved
+
+ This file is available under a BSD-style copyright
+
+ 2. The name of InnoSys Incorporated may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY INNOSYS CORP. ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ 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 -> 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:
+
+ RQSTACK DAT DAT DAT ...
+
+ 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:
+
+ 1999feb10 add reportHskiaChanges to allow us to ignore them
+ 1999feb10 add txAckThreshold for fast+loose throughput enhancement
+ 1999mar30 beef up support for RX error reporting
+ 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:
+
+ In the case of fields which have been merged between the USA17
+ and USA26 definitions, the USA26 definition is the first part
+ of the name and the USA17 definition is the second part of the
+ name; both meanings are described below.
+*/
+
+#ifndef __USA26MSG__
+#define __USA26MSG__
+
+
+struct keyspan_usa26_portControlMessage
+{
+ /*
+ there are three types of "commands" sent in the control message:
+
+ 1. configuration changes which must be requested by setting
+ the corresponding "set" flag (and should only be requested
+ when necessary, to reduce overhead on the USA26):
+ */
+ u8 setClocking, // BOTH: host requests baud rate be set
+ baudLo, // BOTH: host does baud divisor calculation
+ baudHi, // BOTH: baudHi is only used for first port (gives lower rates)
+ externalClock_txClocking,
+ // USA26: 0=internal, other=external
+ // USA17: 0=internal, other=external/RI
+ rxClocking, // USA17: 0=internal, 1=external/RI, other=external/DSR
+
+
+ setLcr, // BOTH: host requests lcr be set
+ lcr, // BOTH: use PARITY, STOPBITS, DATABITS below
+
+ setFlowControl, // BOTH: host requests flow control be set
+ ctsFlowControl, // BOTH: 1=use CTS flow control, 0=don't
+ xonFlowControl, // BOTH: 1=use XON/XOFF flow control, 0=don't
+ xonChar, // BOTH: specified in current character format
+ xoffChar, // BOTH: specified in current character format
+
+ setTxTriState_setRts,
+ // USA26: host requests TX tri-state be set
+ // USA17: host requests RTS output be set
+ txTriState_rts, // BOTH: 1=active (normal), 0=tristate (off)
+
+ setHskoa_setDtr,
+ // USA26: host requests HSKOA output be set
+ // USA17: host requests DTR output be set
+ hskoa_dtr, // BOTH: 1=on, 0=off
+
+ setPrescaler, // USA26: host requests prescalar be set (default: 13)
+ prescaler; // BOTH: specified as N/8; values 8-ff are valid
+ // must be set any time internal baud rate is set;
+ // must not be set when external clocking is used
+ // note: in USA17, prescaler is applied whenever
+ // setClocking is requested
+
+ /*
+ 3. configuration data which is simply used as is (no overhead,
+ but must be specified correctly in every host message).
+ */
+ u8 forwardingLength, // BOTH: forward when this number of chars available
+ reportHskiaChanges_dsrFlowControl,
+ // USA26: 1=normal; 0=ignore external clock
+ // USA17: 1=use DSR flow control, 0=don't
+ txAckThreshold, // BOTH: 0=not allowed, 1=normal, 2-255 deliver ACK faster
+ loopbackMode; // BOTH: 0=no loopback, 1=loopback enabled
+
+ /*
+ 4. commands which are flags only; these are processed in order
+ (so that, e.g., if both _txOn and _txOff flags are set, the
+ port ends in a TX_OFF state); any non-zero value is respected
+ */
+ u8 _txOn, // BOTH: enable transmitting (and continue if there's data)
+ _txOff, // BOTH: stop transmitting
+ txFlush, // BOTH: toss outbound data
+ txBreak, // BOTH: turn on break (cleared by _txOn)
+ rxOn, // BOTH: turn on receiver
+ rxOff, // BOTH: turn off receiver
+ rxFlush, // BOTH: toss inbound data
+ rxForward, // BOTH: forward all inbound data, NOW (as if fwdLen==1)
+ 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
+#define USA_DATABITS_6 0x01
+#define USA_DATABITS_7 0x02
+#define USA_DATABITS_8 0x03
+#define STOPBITS_5678_1 0x00 // 1 stop bit for all byte sizes
+#define STOPBITS_5_1p5 0x04 // 1.5 stop bits for 5-bit byte
+#define STOPBITS_678_2 0x04 // 2 stop bits for 6/7/8-bit byte
+#define USA_PARITY_NONE 0x00
+#define USA_PARITY_ODD 0x08
+#define USA_PARITY_EVEN 0x18
+#define PARITY_1 0x28
+#define PARITY_0 0x38
+
+// 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
+ // USA17: reports CTS pin
+ gpia_dcd, // USA26: reports GPIA pin
+ // USA17: reports DCD pin
+ dsr, // USA17: reports DSR pin
+ ri, // USA17: reports RI pin
+ _txOff, // port has been disabled (by host)
+ _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
+#define RXERROR_PARITY 0x04
+#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
+
+// update status approx. 60 times a second (16.6666 ms)
+#define STATUS_UPDATE_INTERVAL 16
+
+// status rationing tuning value (each port gets checked each n ms)
+#define STATUS_RATION 10
+
+#endif
+
+
diff --git a/drivers/usb/serial/keyspan_usa28_fw.h b/drivers/usb/serial/keyspan_usa28_fw.h
new file mode 100644
index 000000000000..848b0a21f9ee
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa28_fw.h
@@ -0,0 +1,466 @@
+/* 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}},
+ {0x0066, 16, { 0x1f, 0x30, 0xc1, 0x0e, 0x30, 0x12, 0x07, 0xa2, 0x18, 0x92, 0xc3, 0x85, 0x47, 0xc1, 0xc2, 0xc1}},
+ {0x0076, 16, { 0xd2, 0x20, 0x20, 0x1f, 0x03, 0x02, 0x04, 0x42, 0xc2, 0x1f, 0x20, 0x03, 0x03, 0x02, 0x02, 0x67}},
+ {0x0086, 16, { 0x20, 0x11, 0x03, 0x02, 0x01, 0x38, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x3e, 0x20, 0x13, 0x36}},
+ {0x0096, 16, { 0x20, 0x0b, 0x33, 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x20, 0x1c, 0x29, 0x30, 0x1b, 0x12}},
+ {0x00a6, 16, { 0xae, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13}},
+ {0x00b6, 16, { 0x92, 0x17, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83}},
+ {0x00c6, 16, { 0xe0, 0xf5, 0x46, 0x02, 0x04, 0x40, 0xc2, 0x11, 0x02, 0x04, 0x40, 0x90, 0x7f, 0xc7, 0xe4, 0xf0}},
+ {0x00d6, 16, { 0xc2, 0x03, 0x30, 0x15, 0x0c, 0xc2, 0x15, 0x90, 0x7f, 0xbf, 0x04, 0xf0, 0xc2, 0x11, 0x02, 0x04}},
+ {0x00e6, 16, { 0x40, 0x90, 0x7f, 0xc8, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x11, 0x02, 0x04, 0x40, 0x90, 0x7f, 0xc9}},
+ {0x00f6, 16, { 0xe0, 0xf5, 0x7c, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x15, 0x20, 0x13, 0x2d, 0x20, 0x0b, 0x2a}},
+ {0x0043, 3, { 0x02, 0x1b, 0x00}},
+ {0x0023, 3, { 0x02, 0x00, 0x46}},
+ {0x003b, 3, { 0x02, 0x00, 0x46}},
+ {0x0000, 3, { 0x02, 0x16, 0x3d}},
+ {0x0106, 64, { 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x20, 0x1c, 0x20, 0x30, 0x1b, 0x11, 0x90, 0x7d, 0xc1, 0xe0,
+ 0x13, 0x92, 0x17, 0xa3, 0xe0, 0xf5, 0x46, 0x75, 0x4a, 0x03, 0x02, 0x04, 0x40, 0x75, 0x4a, 0x02,
+ 0x90, 0x7d, 0xc1, 0xe0, 0xf5, 0x46, 0x02, 0x04, 0x40, 0x75, 0x4a, 0x01, 0xc2, 0x11, 0x02, 0x04,
+ 0x40, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x03, 0x02, 0x01, 0xe0, 0x90, 0x7f, 0xc6, 0xe0}},
+ {0x0146, 64, { 0x30, 0xe1, 0x07, 0xc2, 0x21, 0xc2, 0x05, 0x02, 0x04, 0x40, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x7c, 0x90,
+ 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x15, 0x30, 0x13, 0x03, 0x02, 0x01, 0xd8, 0x20, 0x0b, 0x72, 0x20,
+ 0x00, 0x6f, 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x20, 0x1c, 0x65, 0x30, 0x1b, 0x10, 0x90,
+ 0x7e, 0x41, 0xe0, 0x13, 0x92, 0x9b, 0xa3, 0xe0, 0xf5, 0x99, 0x75, 0x4a, 0x03, 0x80, 0x09}},
+ {0x0186, 64, { 0x90, 0x7e, 0x41, 0xe0, 0xf5, 0x99, 0x75, 0x4a, 0x02, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x40, 0x17, 0x90,
+ 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03, 0x20, 0x15, 0x03, 0x02, 0x04, 0x40, 0xc2, 0x15, 0x90, 0x7f,
+ 0xbf, 0x04, 0xf0, 0x02, 0x04, 0x40, 0x30, 0x1b, 0x12, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2e,
+ 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xae, 0x4a, 0x05, 0x4a}},
+ {0x01c6, 64, { 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x02, 0x04,
+ 0x40, 0x75, 0x4a, 0x01, 0xc2, 0x21, 0x02, 0x04, 0x40, 0x30, 0x13, 0x03, 0x02, 0x02, 0x62, 0x20,
+ 0x0b, 0x79, 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x20, 0x1c, 0x6f, 0x30, 0x1b, 0x12, 0xae,
+ 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13}},
+ {0x0206, 64, { 0x92, 0x9b, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0,
+ 0xf5, 0x99, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x40, 0x17, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03,
+ 0x20, 0x15, 0x03, 0x02, 0x04, 0x40, 0xc2, 0x15, 0x90, 0x7f, 0xbf, 0x04, 0xf0, 0x02, 0x04, 0x40,
+ 0x30, 0x1b, 0x12, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e}},
+ {0x0246, 64, { 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34,
+ 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x02, 0x04, 0x40, 0xc2, 0x21, 0x02, 0x04, 0x40,
+ 0x20, 0x11, 0x03, 0x02, 0x03, 0x19, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x3e, 0x20, 0x13, 0x36,
+ 0x20, 0x0b, 0x33, 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x20, 0x1c, 0x29, 0x30, 0x1b}},
+ {0x0286, 64, { 0x12, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13,
+ 0x92, 0x17, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83,
+ 0xe0, 0xf5, 0x46, 0x02, 0x04, 0x40, 0xc2, 0x11, 0x02, 0x04, 0x40, 0x90, 0x7f, 0xc9, 0xe4, 0xf0,
+ 0xd2, 0x03, 0x30, 0x15, 0x0c, 0xc2, 0x15, 0x90, 0x7f, 0xbf, 0x04, 0xf0, 0xc2, 0x11, 0x02}},
+ {0x02c6, 64, { 0x04, 0x40, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x11, 0x02, 0x04, 0x40, 0x90, 0x7f, 0xc7,
+ 0xe0, 0xf5, 0x7c, 0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x15, 0x20, 0x13, 0x2d, 0x20, 0x0b, 0x2a,
+ 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x20, 0x1c, 0x20, 0x30, 0x1b, 0x11, 0x90, 0x7e, 0x41,
+ 0xe0, 0x13, 0x92, 0x17, 0xa3, 0xe0, 0xf5, 0x46, 0x75, 0x4a, 0x03, 0x02, 0x04, 0x40, 0x75}},
+ {0x0306, 64, { 0x4a, 0x02, 0x90, 0x7e, 0x41, 0xe0, 0xf5, 0x46, 0x02, 0x04, 0x40, 0x75, 0x4a, 0x01, 0xc2, 0x11, 0x02,
+ 0x04, 0x40, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x03, 0x02, 0x03, 0xc1, 0x90, 0x7f, 0xc8, 0xe0,
+ 0x30, 0xe1, 0x07, 0xc2, 0x21, 0xc2, 0x05, 0x02, 0x04, 0x40, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x7c,
+ 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x15, 0x30, 0x13, 0x03, 0x02, 0x03, 0xb9, 0x20, 0x0b}},
+ {0x0346, 64, { 0x72, 0x20, 0x00, 0x6f, 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x20, 0x1c, 0x65, 0x30, 0x1b, 0x10,
+ 0x90, 0x7d, 0xc1, 0xe0, 0x13, 0x92, 0x9b, 0xa3, 0xe0, 0xf5, 0x99, 0x75, 0x4a, 0x03, 0x80, 0x09,
+ 0x90, 0x7d, 0xc1, 0xe0, 0xf5, 0x99, 0x75, 0x4a, 0x02, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x40, 0x17,
+ 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x20, 0x15, 0x03, 0x02, 0x04, 0x40, 0xc2, 0x15}},
+ {0x0386, 64, { 0x90, 0x7f, 0xbf, 0x04, 0xf0, 0x02, 0x04, 0x40, 0x30, 0x1b, 0x12, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0xc0,
+ 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xae, 0x4a, 0x05, 0x4a,
+ 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x02,
+ 0x04, 0x40, 0x75, 0x4a, 0x01, 0xc2, 0x21, 0x02, 0x04, 0x40, 0x30, 0x13, 0x03, 0x02, 0x04}},
+ {0x03c6, 64, { 0x3e, 0x20, 0x0b, 0x74, 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x20, 0x1c, 0x6a, 0x30, 0x1b, 0x12,
+ 0xae, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13,
+ 0x92, 0x9b, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83,
+ 0xe0, 0xf5, 0x99, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x40, 0x13, 0x90, 0x7f, 0xc9, 0xe4, 0xf0}},
+ {0x0406, 64, { 0xd2, 0x03, 0x30, 0x15, 0x35, 0xc2, 0x15, 0x90, 0x7f, 0xbf, 0x04, 0xf0, 0x80, 0x2c, 0x30, 0x1b, 0x12,
+ 0xae, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13,
+ 0x92, 0x17, 0xae, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83,
+ 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x80, 0x02, 0xc2, 0x21, 0xd2, 0x25, 0x20, 0x20, 0x03, 0x02}},
+ {0x0446, 64, { 0x08, 0x0c, 0xc2, 0x20, 0x20, 0x04, 0x03, 0x02, 0x06, 0x31, 0x20, 0x12, 0x03, 0x02, 0x05, 0x02, 0xe5,
+ 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x3e, 0x20, 0x14, 0x36, 0x20, 0x0d, 0x33, 0x90, 0x7f, 0x9a, 0xe0,
+ 0x20, 0xe5, 0x03, 0x20, 0x1e, 0x29, 0x30, 0x1d, 0x12, 0xae, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2e,
+ 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xae, 0x4b, 0x05, 0x4b}},
+ {0x0486, 64, { 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0x02, 0x08, 0x0a, 0xc2,
+ 0x12, 0x02, 0x08, 0x0a, 0x90, 0x7f, 0xcb, 0xe4, 0xf0, 0xc2, 0x04, 0x30, 0x16, 0x0c, 0xc2, 0x16,
+ 0x90, 0x7f, 0xc1, 0x04, 0xf0, 0xc2, 0x12, 0x02, 0x08, 0x0a, 0x90, 0x7f, 0xcc, 0xe0, 0x30, 0xe1,
+ 0x05, 0xc2, 0x12, 0x02, 0x08, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0xf5, 0x7d, 0x90, 0x7c, 0xc0}},
+ {0x04c6, 64, { 0xe0, 0x13, 0x92, 0x16, 0x20, 0x14, 0x2d, 0x20, 0x0d, 0x2a, 0x90, 0x7f, 0x9a, 0xe0, 0x20, 0xe5, 0x03,
+ 0x20, 0x1e, 0x20, 0x30, 0x1d, 0x11, 0x90, 0x7c, 0xc1, 0xe0, 0x13, 0x92, 0x18, 0xa3, 0xe0, 0xf5,
+ 0x47, 0x75, 0x4b, 0x03, 0x02, 0x08, 0x0a, 0x75, 0x4b, 0x02, 0x90, 0x7c, 0xc1, 0xe0, 0xf5, 0x47,
+ 0x02, 0x08, 0x0a, 0x75, 0x4b, 0x01, 0xc2, 0x12, 0x02, 0x08, 0x0a, 0xe5, 0x4b, 0xc3, 0x95}},
+ {0x0506, 64, { 0x7d, 0x50, 0x03, 0x02, 0x05, 0xaa, 0x90, 0x7f, 0xca, 0xe0, 0x30, 0xe1, 0x07, 0xc2, 0x22, 0xc2, 0x06,
+ 0x02, 0x08, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0xf5, 0x7d, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x16,
+ 0x30, 0x14, 0x03, 0x02, 0x05, 0xa2, 0x20, 0x0d, 0x72, 0x20, 0x00, 0x6f, 0x90, 0x7f, 0x9a, 0xe0,
+ 0x20, 0xe5, 0x03, 0x20, 0x1e, 0x65, 0x30, 0x1d, 0x10, 0x90, 0x7d, 0x41, 0xe0, 0x13, 0x92}},
+ {0x0546, 64, { 0xc3, 0xa3, 0xe0, 0xf5, 0xc1, 0x75, 0x4b, 0x03, 0x80, 0x09, 0x90, 0x7d, 0x41, 0xe0, 0xf5, 0xc1, 0x75,
+ 0x4b, 0x02, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x40, 0x17, 0x90, 0x7f, 0xcb, 0xe4, 0xf0, 0xc2, 0x04,
+ 0x20, 0x16, 0x03, 0x02, 0x08, 0x0a, 0xc2, 0x16, 0x90, 0x7f, 0xc1, 0x04, 0xf0, 0x02, 0x08, 0x0a,
+ 0x30, 0x1d, 0x12, 0xae, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d}},
+ {0x0586, 64, { 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xae, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34,
+ 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12, 0x02, 0x08, 0x0a, 0x75, 0x4b, 0x01, 0xc2, 0x22,
+ 0x02, 0x08, 0x0a, 0x30, 0x14, 0x03, 0x02, 0x06, 0x2c, 0x20, 0x0d, 0x79, 0x90, 0x7f, 0x9a, 0xe0,
+ 0x20, 0xe5, 0x03, 0x20, 0x1e, 0x6f, 0x30, 0x1d, 0x12, 0xae, 0x4b, 0x05, 0x4b, 0x74, 0x40}},
+ {0x05c6, 64, { 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0xc3, 0xae, 0x4b, 0x05, 0x4b, 0x74,
+ 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0xc1, 0xe5, 0x4b, 0xc3, 0x95,
+ 0x7d, 0x40, 0x17, 0x90, 0x7f, 0xcb, 0xe4, 0xf0, 0xc2, 0x04, 0x20, 0x16, 0x03, 0x02, 0x08, 0x0a,
+ 0xc2, 0x16, 0x90, 0x7f, 0xc1, 0x04, 0xf0, 0x02, 0x08, 0x0a, 0x30, 0x1d, 0x12, 0xae, 0x4b}},
+ {0x0606, 64, { 0x05, 0x4b, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xae,
+ 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x47,
+ 0xd2, 0x12, 0x02, 0x08, 0x0a, 0xc2, 0x22, 0x02, 0x08, 0x0a, 0x20, 0x12, 0x03, 0x02, 0x06, 0xe3,
+ 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x3e, 0x20, 0x14, 0x36, 0x20, 0x0d, 0x33, 0x90, 0x7f}},
+ {0x0646, 64, { 0x9a, 0xe0, 0x20, 0xe5, 0x03, 0x20, 0x1e, 0x29, 0x30, 0x1d, 0x12, 0xae, 0x4b, 0x05, 0x4b, 0x74, 0xc0,
+ 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xae, 0x4b, 0x05, 0x4b,
+ 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0x02, 0x08, 0x0a,
+ 0xc2, 0x12, 0x02, 0x08, 0x0a, 0x90, 0x7f, 0xcd, 0xe4, 0xf0, 0xd2, 0x04, 0x30, 0x16, 0x0c}},
+ {0x0686, 64, { 0xc2, 0x16, 0x90, 0x7f, 0xc1, 0x04, 0xf0, 0xc2, 0x12, 0x02, 0x08, 0x0a, 0x90, 0x7f, 0xca, 0xe0, 0x30,
+ 0xe1, 0x05, 0xc2, 0x12, 0x02, 0x08, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0xf5, 0x7d, 0x90, 0x7d, 0x40,
+ 0xe0, 0x13, 0x92, 0x16, 0x20, 0x14, 0x2d, 0x20, 0x0d, 0x2a, 0x90, 0x7f, 0x9a, 0xe0, 0x20, 0xe5,
+ 0x03, 0x20, 0x1e, 0x20, 0x30, 0x1d, 0x11, 0x90, 0x7d, 0x41, 0xe0, 0x13, 0x92, 0x18, 0xa3}},
+ {0x06c6, 64, { 0xe0, 0xf5, 0x47, 0x75, 0x4b, 0x03, 0x02, 0x08, 0x0a, 0x75, 0x4b, 0x02, 0x90, 0x7d, 0x41, 0xe0, 0xf5,
+ 0x47, 0x02, 0x08, 0x0a, 0x75, 0x4b, 0x01, 0xc2, 0x12, 0x02, 0x08, 0x0a, 0xe5, 0x4b, 0xc3, 0x95,
+ 0x7d, 0x50, 0x03, 0x02, 0x07, 0x8b, 0x90, 0x7f, 0xcc, 0xe0, 0x30, 0xe1, 0x07, 0xc2, 0x22, 0xc2,
+ 0x06, 0x02, 0x08, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0xf5, 0x7d, 0x90, 0x7c, 0xc0, 0xe0, 0x13}},
+ {0x0706, 64, { 0x92, 0x16, 0x30, 0x14, 0x03, 0x02, 0x07, 0x83, 0x20, 0x0d, 0x72, 0x20, 0x00, 0x6f, 0x90, 0x7f, 0x9a,
+ 0xe0, 0x20, 0xe5, 0x03, 0x20, 0x1e, 0x65, 0x30, 0x1d, 0x10, 0x90, 0x7c, 0xc1, 0xe0, 0x13, 0x92,
+ 0xc3, 0xa3, 0xe0, 0xf5, 0xc1, 0x75, 0x4b, 0x03, 0x80, 0x09, 0x90, 0x7c, 0xc1, 0xe0, 0xf5, 0xc1,
+ 0x75, 0x4b, 0x02, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x40, 0x17, 0x90, 0x7f, 0xcd, 0xe4, 0xf0}},
+ {0x0746, 64, { 0xd2, 0x04, 0x20, 0x16, 0x03, 0x02, 0x08, 0x0a, 0xc2, 0x16, 0x90, 0x7f, 0xc1, 0x04, 0xf0, 0x02, 0x08,
+ 0x0a, 0x30, 0x1d, 0x12, 0xae, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7c,
+ 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xae, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4,
+ 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12, 0x02, 0x08, 0x0a, 0x75, 0x4b, 0x01}},
+ {0x0786, 64, { 0xc2, 0x22, 0x02, 0x08, 0x0a, 0x30, 0x14, 0x03, 0x02, 0x08, 0x08, 0x20, 0x0d, 0x74, 0x90, 0x7f, 0x9a,
+ 0xe0, 0x20, 0xe5, 0x03, 0x20, 0x1e, 0x6a, 0x30, 0x1d, 0x12, 0xae, 0x4b, 0x05, 0x4b, 0x74, 0xc0,
+ 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0xc3, 0xae, 0x4b, 0x05, 0x4b,
+ 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0xc1, 0xe5, 0x4b}},
+ {0x07c6, 64, { 0xc3, 0x95, 0x7d, 0x40, 0x13, 0x90, 0x7f, 0xcd, 0xe4, 0xf0, 0xd2, 0x04, 0x30, 0x16, 0x35, 0xc2, 0x16,
+ 0x90, 0x7f, 0xc1, 0x04, 0xf0, 0x80, 0x2c, 0x30, 0x1d, 0x12, 0xae, 0x4b, 0x05, 0x4b, 0x74, 0xc0,
+ 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xae, 0x4b, 0x05, 0x4b,
+ 0x74, 0xc0, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12}},
+ {0x0806, 64, { 0x80, 0x02, 0xc2, 0x22, 0xd2, 0x25, 0x20, 0x98, 0x03, 0x02, 0x09, 0x3e, 0xc2, 0x98, 0x20, 0x01, 0x03,
+ 0x02, 0x08, 0xb0, 0x20, 0x23, 0x27, 0xae, 0x48, 0x05, 0x48, 0x74, 0x80, 0x2e, 0xf5, 0x82, 0xe4,
+ 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x99, 0xf0, 0x30, 0x1b, 0x49, 0xae, 0x48, 0x05, 0x48, 0x74, 0x80,
+ 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x36, 0xaf, 0x99}},
+ {0x0846, 64, { 0xef, 0xb5, 0x58, 0x04, 0xd2, 0x0b, 0x80, 0x2c, 0xef, 0xb5, 0x57, 0x04, 0xc2, 0x0b, 0x80, 0x24, 0xae,
+ 0x48, 0x05, 0x48, 0x74, 0x80, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xef, 0xf0, 0x30,
+ 0x1b, 0x11, 0xae, 0x48, 0x05, 0x48, 0x74, 0x80, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83,
+ 0xe5, 0x98, 0xf0, 0xd2, 0x19, 0xe5, 0x48, 0xc3, 0x95, 0x54, 0x50, 0x03, 0x02, 0x09, 0x3c}},
+ {0x0886, 64, { 0x90, 0x7f, 0xb8, 0xe0, 0x30, 0xe1, 0x15, 0xe5, 0x48, 0xc3, 0x94, 0x40, 0x50, 0x03, 0x02, 0x09, 0x3c,
+ 0x15, 0x48, 0x15, 0x48, 0x05, 0x2d, 0xd2, 0x0c, 0x02, 0x09, 0x3c, 0x90, 0x7f, 0xb7, 0xe5, 0x48,
+ 0xf0, 0x75, 0x48, 0x00, 0xc2, 0x01, 0x02, 0x09, 0x3c, 0x20, 0x23, 0x27, 0xae, 0x48, 0x05, 0x48,
+ 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x99, 0xf0, 0x30, 0x1b}},
+ {0x08c6, 64, { 0x49, 0xae, 0x48, 0x05, 0x48, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98,
+ 0xf0, 0x80, 0x36, 0xaf, 0x99, 0xef, 0xb5, 0x58, 0x04, 0xd2, 0x0b, 0x80, 0x2c, 0xef, 0xb5, 0x57,
+ 0x04, 0xc2, 0x0b, 0x80, 0x24, 0xae, 0x48, 0x05, 0x48, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34,
+ 0x7e, 0xf5, 0x83, 0xef, 0xf0, 0x30, 0x1b, 0x11, 0xae, 0x48, 0x05, 0x48, 0x74, 0x00, 0x2e}},
+ {0x0906, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x19, 0xe5, 0x48, 0xc3, 0x95, 0x54,
+ 0x40, 0x23, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x11, 0xe5, 0x48, 0xc3, 0x94, 0x40, 0x40, 0x15,
+ 0x15, 0x48, 0x15, 0x48, 0x05, 0x2d, 0xd2, 0x0c, 0x80, 0x0b, 0x90, 0x7f, 0xb9, 0xe5, 0x48, 0xf0,
+ 0x75, 0x48, 0x00, 0xd2, 0x01, 0xd2, 0x25, 0x20, 0xc0, 0x03, 0x02, 0x0a, 0x70, 0xc2, 0xc0}},
+ {0x0946, 64, { 0x20, 0x02, 0x03, 0x02, 0x09, 0xe2, 0x20, 0x24, 0x27, 0xae, 0x49, 0x05, 0x49, 0x74, 0x80, 0x2e, 0xf5,
+ 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe5, 0xc1, 0xf0, 0x30, 0x1d, 0x49, 0xae, 0x49, 0x05, 0x49,
+ 0x74, 0x80, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe5, 0xc0, 0xf0, 0x80, 0x36, 0xaf,
+ 0xc1, 0xef, 0xb5, 0x70, 0x04, 0xd2, 0x0d, 0x80, 0x2c, 0xef, 0xb5, 0x6f, 0x04, 0xc2, 0x0d}},
+ {0x0986, 64, { 0x80, 0x24, 0xae, 0x49, 0x05, 0x49, 0x74, 0x80, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xef,
+ 0xf0, 0x30, 0x1d, 0x11, 0xae, 0x49, 0x05, 0x49, 0x74, 0x80, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d,
+ 0xf5, 0x83, 0xe5, 0xc0, 0xf0, 0xd2, 0x1a, 0xe5, 0x49, 0xc3, 0x95, 0x6c, 0x50, 0x03, 0x02, 0x0a,
+ 0x6e, 0x90, 0x7f, 0xbc, 0xe0, 0x30, 0xe1, 0x15, 0xe5, 0x49, 0xc3, 0x94, 0x40, 0x50, 0x03}},
+ {0x09c6, 64, { 0x02, 0x0a, 0x6e, 0x15, 0x49, 0x15, 0x49, 0x05, 0x39, 0xd2, 0x0e, 0x02, 0x0a, 0x6e, 0x90, 0x7f, 0xbb,
+ 0xe5, 0x49, 0xf0, 0x75, 0x49, 0x00, 0xc2, 0x02, 0x02, 0x0a, 0x6e, 0x20, 0x24, 0x27, 0xae, 0x49,
+ 0x05, 0x49, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe5, 0xc1, 0xf0, 0x30,
+ 0x1d, 0x49, 0xae, 0x49, 0x05, 0x49, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5}},
+ {0x0a06, 64, { 0x83, 0xe5, 0xc0, 0xf0, 0x80, 0x36, 0xaf, 0xc1, 0xef, 0xb5, 0x70, 0x04, 0xd2, 0x0d, 0x80, 0x2c, 0xef,
+ 0xb5, 0x6f, 0x04, 0xc2, 0x0d, 0x80, 0x24, 0xae, 0x49, 0x05, 0x49, 0x74, 0x00, 0x2e, 0xf5, 0x82,
+ 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xef, 0xf0, 0x30, 0x1d, 0x11, 0xae, 0x49, 0x05, 0x49, 0x74, 0x00,
+ 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe5, 0xc0, 0xf0, 0xd2, 0x1a, 0xe5, 0x49}},
+ {0x0a46, 64, { 0xc3, 0x95, 0x6c, 0x40, 0x23, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x11, 0xe5, 0x49, 0xc3, 0x94, 0x40,
+ 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}},
+ {0x0ac6, 64, { 0x4f, 0x13, 0x92, 0x1b, 0x92, 0x9f, 0xe5, 0x50, 0x13, 0x92, 0x1c, 0xe5, 0x51, 0x13, 0x92, 0x23, 0xe5,
+ 0x52, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98, 0xe0,
+ 0x44, 0x04, 0xf0, 0xe5, 0x53, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0x7f, 0xf0, 0x80, 0x07,
+ 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x59, 0x60, 0x0b, 0xc2, 0x13, 0xc2, 0x0b}},
+ {0x0b06, 64, { 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x5a, 0x60, 0x0b, 0xd2, 0x0b, 0xd2, 0x0c, 0x90, 0x7f,
+ 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x5b, 0x60, 0x0d, 0xc2, 0xaf, 0xc2, 0x11, 0xd2, 0x00, 0xe4,
+ 0xf5, 0x7c, 0xf5, 0x4a, 0xd2, 0xaf, 0xe5, 0x5c, 0x60, 0x05, 0x30, 0x23, 0x02, 0xd2, 0x0b, 0xe5,
+ 0x5d, 0x60, 0x15, 0x90, 0x7f, 0x95, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x9e, 0xe0, 0x44}},
+ {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,
+ 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}},
+ {0x15c6, 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, 0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82,
+ 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0, 0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82,
+ 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe, 0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5}},
+ {0x1606, 64, { 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83, 0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 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, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x7d}},
+ {0x1646, 64, { 0x02, 0x16, 0x84, 0x02, 0x16, 0xc9, 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, 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}},
+ {0x16c6, 64, { 0xe7, 0x80, 0xbe, 0x75, 0x11, 0x01, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xae, 0xe0,
+ 0xff, 0xd3, 0x92, 0x26, 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}},
+ {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,
+ 0xf5, 0x16, 0x62, 0x15, 0xe5, 0x15, 0x62, 0x16, 0xe5, 0x16, 0x62, 0x15, 0x29, 0xfd, 0xe5}},
+ {0x1786, 64, { 0x15, 0x3a, 0xa9, 0x05, 0x75, 0x17, 0xff, 0xf5, 0x18, 0x89, 0x19, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00,
+ 0x79, 0x00, 0x22, 0x8f, 0x15, 0xe4, 0xf5, 0x16, 0x75, 0x17, 0xff, 0x75, 0x18, 0x19, 0x75, 0x19,
+ 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,
+ 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
+ {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x4b, 0x00, 0x65,
+ 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
+ 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, 64, { 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
+ {0x1a46, 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}},
+ {0x1a86, 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}},
+ {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}}
+};
diff --git a/drivers/usb/serial/keyspan_usa28msg.h b/drivers/usb/serial/keyspan_usa28msg.h
new file mode 100644
index 000000000000..dee454c4609a
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa28msg.h
@@ -0,0 +1,201 @@
+/*
+ usa28msg.h
+
+ Copyright (C) 1998-2000 InnoSys Incorporated. All Rights Reserved
+ This file is available under a BSD-style copyright
+
+ Keyspan USB Async Message Formats for the USA26X
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain this licence text
+ without modification, this list of conditions, and the following
+ disclaimer. The following copyright notice must appear immediately at
+ the beginning of all source files:
+
+ Copyright (C) 1998-2000 InnoSys Incorporated. All Rights Reserved
+
+ This file is available under a BSD-style copyright
+
+ 2. The name of InnoSys Incorporated may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY INNOSYS CORP. ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ Note: these message formats are common to USA18, USA19, and USA28;
+ (for USA28X, see usa26msg.h)
+
+ Buffer formats for RX/TX data messages are not defined by
+ a structure, but are described here:
+
+ USB OUT (host -> USA28, transmit) messages contain a
+ REQUEST_ACK indicator (set to 0xff to request an ACK at the
+ completion of transmit; 0x00 otherwise), followed by data.
+ If the port is configured for parity, the data will be an
+ alternating string of parity and data bytes, so the message
+ format will be:
+
+ RQSTACK PAR DAT PAR DAT ...
+
+ so the maximum length is 63 bytes (1 + 62, or 31 data bytes);
+ always an odd number for the total message length.
+
+ If there is no parity, the format is simply:
+
+ RQSTACK DAT DAT DAT ...
+
+ with a total data length of 63.
+
+ USB IN (USA28 -> host, receive) messages contain data and parity
+ if parity is configred, thusly:
+
+ DAT PAR DAT PAR DAT PAR ...
+
+ for a total of 32 data bytes;
+
+ If parity is not configured, the format is:
+
+ DAT DAT DAT ...
+
+ for a total of 64 data bytes.
+
+ In the TX messages (USB OUT), the 0x01 bit of the PARity byte is
+ the parity bit. In the RX messages (USB IN), the PARity byte is
+ the content of the 8051's status register; the parity bit
+ (RX_PARITY_BIT) is the 0x04 bit.
+
+ revision history:
+
+ 1999may06 add resetDataToggle to control message
+ 2000mar21 add rs232invalid to status response message
+ 2000apr04 add 230.4Kb definition to setBaudRate
+ 2000apr13 add/remove loopbackMode switch
+ 2000apr13 change definition of setBaudRate to cover 115.2Kb, too
+ 2000jun01 add extended BSD-style copyright text
+*/
+
+#ifndef __USA28MSG__
+#define __USA28MSG__
+
+
+struct keyspan_usa28_portControlMessage
+{
+ /*
+ there are four types of "commands" sent in the control message:
+
+ 1. configuration changes which must be requested by setting
+ the corresponding "set" flag (and should only be requested
+ when necessary, to reduce overhead on the USA28):
+ */
+ u8 setBaudRate, // 0=don't set, 1=baudLo/Hi, 2=115.2K, 3=230.4K
+ baudLo, // host does baud divisor calculation
+ baudHi; // baudHi is only used for first port (gives lower rates)
+
+ /*
+ 2. configuration changes which are done every time (because it's
+ hardly more trouble to do them than to check whether to do them):
+ */
+ u8 parity, // 1=use parity, 0=don't
+ ctsFlowControl, // all except 19Q: 1=use CTS flow control, 0=don't
+ // 19Q: 0x08:CTSflowControl 0x10:DSRflowControl
+ xonFlowControl, // 1=use XON/XOFF flow control, 0=don't
+ rts, // 1=on, 0=off
+ dtr; // 1=on, 0=off
+
+ /*
+ 3. configuration data which is simply used as is (no overhead,
+ but must be correct in every host message).
+ */
+ u8 forwardingLength, // forward when this number of chars available
+ forwardMs, // forward this many ms after last rx data
+ breakThreshold, // specified in ms, 1-255 (see note below)
+ xonChar, // specified in current character format
+ xoffChar; // specified in current character format
+
+ /*
+ 4. commands which are flags only; these are processed in order
+ (so that, e.g., if both _txOn and _txOff flags are set, the
+ port ends in a TX_OFF state); any non-zero value is respected
+ */
+ u8 _txOn, // enable transmitting (and continue if there's data)
+ _txOff, // stop transmitting
+ txFlush, // toss outbound data
+ txForceXoff, // pretend we've received XOFF
+ txBreak, // turn on break (leave on until txOn clears it)
+ rxOn, // turn on receiver
+ rxOff, // turn off receiver
+ rxFlush, // toss inbound data
+ rxForward, // forward all inbound data, NOW
+ 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,
+ dsr, // (not used in all products)
+ dcd,
+
+ ri, // (not used in all products)
+ _txOff, // port has been disabled (by host)
+ _txXoff, // port is in XOFF state (either host or RX XOFF)
+ dataLost, // count of lost chars; wraps; not guaranteed exact
+
+ rxEnabled, // as configured by rxOn/rxOff 1=on, 0=off
+ 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
+
+// the parity bytes have only one significant bit
+#define RX_PARITY_BIT 0x04
+#define TX_PARITY_BIT 0x01
+
+// update status approx. 60 times a second (16.6666 ms)
+#define STATUS_UPDATE_INTERVAL 16
+
+#endif
+
diff --git a/drivers/usb/serial/keyspan_usa28x_fw.h b/drivers/usb/serial/keyspan_usa28x_fw.h
new file mode 100644
index 000000000000..3387ed9de4db
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa28x_fw.h
@@ -0,0 +1,447 @@
+/* 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,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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}},
+ {0x1446, 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}},
+ {0x1486, 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}},
+ {0x14c6, 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}},
+ {0x1506, 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}},
+ {0x1546, 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}},
+ {0x1586, 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}},
+ {0x15c6, 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}},
+ {0x1606, 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}},
+ {0x1646, 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}},
+ {0x1686, 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}},
+ {0x16c6, 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}},
+ {0x1706, 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}},
+ {0x1746, 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}},
+ {0x1786, 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}},
+ {0x17c6, 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}},
+ {0x1806, 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}},
+ {0x1846, 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}},
+ {0x1886, 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}},
+ {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,
+ 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,
+ 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,
+ 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
+ {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x4b, 0x00, 0x65,
+ 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
+ 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 --git a/drivers/usb/serial/keyspan_usa28xa_fw.h b/drivers/usb/serial/keyspan_usa28xa_fw.h
new file mode 100644
index 000000000000..7b566781e2d2
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa28xa_fw.h
@@ -0,0 +1,449 @@
+/* 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}},
+ {0x1446, 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}},
+ {0x1486, 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}},
+ {0x14c6, 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}},
+ {0x1506, 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}},
+ {0x1546, 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}},
+ {0x1586, 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}},
+ {0x15c6, 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}},
+ {0x1606, 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}},
+ {0x1646, 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}},
+ {0x1686, 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}},
+ {0x16c6, 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}},
+ {0x1706, 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}},
+ {0x1746, 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}},
+ {0x1786, 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}},
+ {0x17c6, 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}},
+ {0x1806, 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}},
+ {0x1846, 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}},
+ {0x1886, 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}},
+ {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,
+ 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,
+ 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
+ {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x4b, 0x00, 0x65,
+ 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
+ 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 --git a/drivers/usb/serial/keyspan_usa28xb_fw.h b/drivers/usb/serial/keyspan_usa28xb_fw.h
new file mode 100644
index 000000000000..f5fcad44da3a
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa28xb_fw.h
@@ -0,0 +1,448 @@
+/* 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}},
+ {0x1446, 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}},
+ {0x1486, 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}},
+ {0x14c6, 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}},
+ {0x1506, 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}},
+ {0x1546, 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}},
+ {0x1586, 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}},
+ {0x15c6, 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}},
+ {0x1606, 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}},
+ {0x1646, 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}},
+ {0x1686, 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}},
+ {0x16c6, 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}},
+ {0x1706, 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}},
+ {0x1746, 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}},
+ {0x1786, 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}},
+ {0x17c6, 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}},
+ {0x1806, 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}},
+ {0x1846, 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}},
+ {0x1886, 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}},
+ {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,
+ 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,
+ 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,
+ 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
+ {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x4b, 0x00, 0x65,
+ 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
+ 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 --git a/drivers/usb/serial/keyspan_usa49msg.h b/drivers/usb/serial/keyspan_usa49msg.h
new file mode 100644
index 000000000000..163b2dea2ec5
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa49msg.h
@@ -0,0 +1,282 @@
+/*
+ usa49msg.h
+
+ Copyright (C) 1998-2000 InnoSys Incorporated. All Rights Reserved
+ This file is available under a BSD-style copyright
+
+ Keyspan USB Async Message Formats for the USA49W
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain this licence text
+ without modification, this list of conditions, and the following
+ disclaimer. The following copyright notice must appear immediately at
+ the beginning of all source files:
+
+ Copyright (C) 1998-2000 InnoSys Incorporated. All Rights Reserved
+
+ This file is available under a BSD-style copyright
+
+ 2. The name of InnoSys Incorporated may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY INNOSYS CORP. ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ 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:
+
+ RQSTACK DAT DAT DAT ...
+
+ 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.
+ (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
+
+ revision history:
+
+ 1999feb10 add reportHskiaChanges to allow us to ignore them
+ 1999feb10 add txAckThreshold for fast+loose throughput enhancement
+ 1999mar30 beef up support for RX error reporting
+ 1999apr14 add resetDataToggle to control message
+ 2000jan04 merge with usa17msg.h
+ 2000mar08 clone from usa26msg.h -> usa49msg.h
+ 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__
+#define __USA49MSG__
+
+
+/*
+ Host->device messages sent on the global control endpoint:
+
+ portNumber message
+ ---------- --------------------
+ 0,1,2,3 portControlMessage
+ 0x80 globalControlMessage
+*/
+
+struct keyspan_usa49_portControlMessage
+{
+ /*
+ 0. 0/1/2/3 port control message follows
+ 0x80 set non-port control message follows
+ */
+ u8 portNumber,
+
+ /*
+ there are three types of "commands" sent in the control message:
+
+ 1. configuration changes which must be requested by setting
+ the corresponding "set" flag (and should only be requested
+ when necessary, to reduce overhead on the USA26):
+ */
+ setClocking, // host requests baud rate be set
+ baudLo, // host does baud divisor calculation
+ baudHi, // baudHi is only used for first port (gives lower rates)
+ prescaler, // specified as N/8; values 8-ff are valid
+ // must be set any time internal baud rate is set;
+ txClocking, // 0=internal, 1=external/DSR
+ rxClocking, // 0=internal, 1=external/DSR
+
+ setLcr, // host requests lcr be set
+ lcr, // use PARITY, STOPBITS, DATABITS below
+
+ setFlowControl, // host requests flow control be set
+ ctsFlowControl, // 1=use CTS flow control, 0=don't
+ xonFlowControl, // 1=use XON/XOFF flow control, 0=don't
+ xonChar, // specified in current character format
+ xoffChar, // specified in current character format
+
+ setRts, // host requests RTS output be set
+ rts, // 1=active, 0=inactive
+
+ setDtr, // host requests DTR output be set
+ dtr; // 1=on, 0=off
+
+
+ /*
+ 3. configuration data which is simply used as is (no overhead,
+ but must be specified correctly in every host message).
+ */
+ u8 forwardingLength, // forward when this number of chars available
+ dsrFlowControl, // 1=use DSR flow control, 0=don't
+ txAckThreshold, // 0=not allowed, 1=normal, 2-255 deliver ACK faster
+ loopbackMode; // 0=no loopback, 1=loopback enabled
+
+ /*
+ 4. commands which are flags only; these are processed in order
+ (so that, e.g., if both _txOn and _txOff flags are set, the
+ port ends in a TX_OFF state); any non-zero value is respected
+ */
+ u8 _txOn, // enable transmitting (and continue if there's data)
+ _txOff, // stop transmitting
+ txFlush, // toss outbound data
+ txBreak, // turn on break (cleared by _txOn)
+ rxOn, // turn on receiver
+ rxOff, // turn off receiver
+ rxFlush, // toss inbound data
+ rxForward, // forward all inbound data, NOW (as if fwdLen==1)
+ returnStatus, // return current status (even if it hasn't changed)
+ resetDataToggle,// reset data toggle state to DATA0
+ 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
+#define USA_DATABITS_6 0x01
+#define USA_DATABITS_7 0x02
+#define USA_DATABITS_8 0x03
+#define STOPBITS_5678_1 0x00 // 1 stop bit for all byte sizes
+#define STOPBITS_5_1p5 0x04 // 1.5 stop bits for 5-bit byte
+#define STOPBITS_678_2 0x04 // 2 stop bits for 6/7/8-bit byte
+#define USA_PARITY_NONE 0x00
+#define USA_PARITY_ODD 0x08
+#define USA_PARITY_EVEN 0x18
+#define PARITY_1 0x28
+#define PARITY_0 0x38
+
+/*
+ during normal operation, status messages are returned
+ to the host whenever the board detects changes. In some
+ circumstances (e.g. Windows), status messages from the
+ device cause problems; to shut them off, the host issues
+ a control message with the disableStatusMessages flags
+ set (to any non-zero value). The device will respond to
+ this message, and then suppress further status messages;
+ it will resume sending status messages any time the host
+ sends any control message (either global or port-specific).
+*/
+
+struct keyspan_usa49_globalControlMessage
+{
+ u8 portNumber, // 0x80
+ sendGlobalStatus, // 1/2=number of status responses requested
+ resetStatusToggle, // 1=reset global status toggle
+ 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
+
+ portNumber message
+ ---------- --------------------
+ 0x00,0x01,0x02,0x03 portStatusMessage
+ 0x80 globalStatusMessage
+ 0x81 globalDebugMessage
+*/
+
+struct keyspan_usa49_portStatusMessage // one for each port
+{
+ u8 portNumber, // 0,1,2,3
+ cts, // reports CTS pin
+ dcd, // reports DCD pin
+ dsr, // reports DSR pin
+ ri, // reports RI pin
+ _txOff, // transmit has been disabled (by host)
+ _txXoff, // transmit 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
+ txAck, // ACK (data TX complete)
+ rs232valid; // RS-232 signal valid
+};
+
+// bits in RX data message when STAT byte is included
+#define RXERROR_OVERRUN 0x02
+#define RXERROR_PARITY 0x04
+#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
+
+// update status approx. 60 times a second (16.6666 ms)
+#define STATUS_UPDATE_INTERVAL 16
+
+// status rationing tuning value (each port gets checked each n ms)
+#define STATUS_RATION 10
+
+#endif
diff --git a/drivers/usb/serial/keyspan_usa49w_fw.h b/drivers/usb/serial/keyspan_usa49w_fw.h
new file mode 100644
index 000000000000..dc24dace1222
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa49w_fw.h
@@ -0,0 +1,464 @@
+/* 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,
+ 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x32, 0xe5, 0x15, 0x24, 0x0c}},
+ {0x0146, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x3f, 0xff, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82,
+ 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24,
+ 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24,
+ 0x0d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02, 0x02, 0x4f, 0xe5}},
+ {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}},
+ {0x0286, 64, { 0x83, 0xe0, 0x54, 0xfe, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82,
+ 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x12, 0xf5, 0x82,
+ 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x44, 0xe5, 0x15, 0x24, 0x13, 0xf5, 0x82, 0xe4, 0x35,
+ 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14}},
+ {0x02c6, 64, { 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14,
+ 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39,
+ 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x16,
+ 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82}},
+ {0x0306, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x15, 0x24, 0x17, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
+ 0x83, 0xe0, 0x30, 0xe0, 0x11, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
+ 0xe0, 0x44, 0x40, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
+ 0x83, 0xe0, 0x54, 0xbf, 0xf0, 0xe5, 0x15, 0x24, 0x18, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
+ {0x0346, 64, { 0x83, 0xe0, 0xff, 0xe5, 0x15, 0x24, 0x3b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0xe5,
+ 0x15, 0x24, 0x19, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24,
+ 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x0f, 0xe5, 0x15,
+ 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xef, 0xf0, 0x90, 0x78}},
+ {0x0386, 64, { 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x90,
+ 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x1a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
+ 0x6b, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xbf, 0xf0,
+ 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,
+ 0x74, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
+ {0x0486, 64, { 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xef, 0x60, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35,
+ 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x1d, 0xf5, 0x82, 0xe4, 0x35, 0x14,
+ 0xf5, 0x83, 0xe0, 0x60, 0x27, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
+ 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,
+ 0xf5, 0x83, 0xe0, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x21, 0xf5, 0x82}},
+ {0x0586, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14,
+ 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x22, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
+ 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,
+ 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82,
+ 0x17, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x30, 0xe0, 0x04, 0x7f, 0x03, 0x80}},
+ {0x0686, 64, { 0x02, 0x7f, 0x02, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x6d, 0x75, 0x83, 0x19,
+ 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x5f, 0x75, 0x83, 0x19, 0xf0, 0x75,
+ 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x30, 0xe1, 0x04, 0x7f, 0x64, 0x80,
+ 0x02, 0x7f, 0x32, 0x75, 0x82, 0x1a, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x90, 0x7f, 0xef, 0xe0}},
+ {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,
+ 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x08, 0xb9, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90,
+ 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80}},
+ {0x07c6, 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, 0x08, 0xb9, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9,
+ 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x08, 0xb9}},
+ {0x0806, 64, { 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
+ 0x01, 0xf0, 0x02, 0x08, 0xb9, 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}},
+ {0x0846, 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,
+ 0x00, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea}},
+ {0x0886, 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, 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,
+ 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,
+ 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
+ {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x55, 0x00, 0x53,
+ 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}},
+ {0x1a46, 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}},
+ {0x1a86, 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}},
+ {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}}
+};
diff --git a/drivers/usb/serial/keyspan_usa49wlc_fw.h b/drivers/usb/serial/keyspan_usa49wlc_fw.h
new file mode 100644
index 000000000000..bef06a3350ce
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa49wlc_fw.h
@@ -0,0 +1,476 @@
+/* keyspan_usa49w_fw.h
+
+ The firmware contained herein as keyspan_usa49w_fw.h is
+
+ Copyright (C) 1999-2003
+ 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 char theFirmwareDate49[] =
+ "02/14/2002 02:37p 19,347 USA49";
+
+
+
+static char theFirmwareDate65[] =
+ "01/31/2003 09:34a 19,331 USA65";
+
+
+*/
+
+static const struct ezusb_hex_record keyspan_usa49wlc_firmware[] = {
+ {0x7f92, 1, { 0x01}},
+ {0x0033, 3, { 0x02, 0x18, 0xfb}},
+ {0x0036, 13, { 0xe5, 0x11, 0x04, 0x90, 0x78, 0x41, 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, 0xec, 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, 0x6b, 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, 0x00, 0x03}},
+ {0x00c6, 16, { 0xe5, 0x15, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xab}},
+ {0x00d6, 16, { 0x7f, 0x01, 0xe5, 0x15, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12}},
+ {0x00e6, 16, { 0x16, 0x6b, 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, 0xf3, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74}},
+ {0x0013, 16, { 0xf0, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf3, 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, 0x90}},
+ {0x0106, 64, { 0x90, 0x78, 0x41, 0x74, 0xf4, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
+ 0xe0, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf2, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5,
+ 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24,
+ 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x32, 0xe5, 0x15, 0x24, 0x0c}},
+ {0x0146, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x3f, 0xff, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82,
+ 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf3, 0xf0, 0xe5, 0x15, 0x24,
+ 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24,
+ 0x0d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02, 0x02, 0x4f, 0xe5}},
+ {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, 0x6b, 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, 0x16, 0x0b, 0xe5, 0x15, 0x24, 0x11, 0xf5, 0x82, 0xe4, 0x35,
+ 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x3b, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4}},
+ {0x0246, 64, { 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xdb, 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}},
+ {0x0286, 64, { 0x83, 0xe0, 0x54, 0xfe, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf4, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82,
+ 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x12, 0xf5, 0x82,
+ 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x44, 0xe5, 0x15, 0x24, 0x13, 0xf5, 0x82, 0xe4, 0x35,
+ 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14}},
+ {0x02c6, 64, { 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14,
+ 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf4, 0xf0, 0xe5, 0x15, 0x24, 0x39,
+ 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x16,
+ 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82}},
+ {0x0306, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x15, 0x24, 0x17, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
+ 0x83, 0xe0, 0x30, 0xe0, 0x11, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
+ 0xe0, 0x44, 0x40, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
+ 0x83, 0xe0, 0x54, 0xbf, 0xf0, 0xe5, 0x15, 0x24, 0x18, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
+ {0x0346, 64, { 0x83, 0xe0, 0xff, 0xe5, 0x15, 0x24, 0x3b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0xe5,
+ 0x15, 0x24, 0x19, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24,
+ 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x0f, 0xe5, 0x15,
+ 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xef, 0xf0, 0x90, 0x78}},
+ {0x0386, 64, { 0x41, 0x74, 0xf4, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x90,
+ 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x1a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
+ 0x6b, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xbf, 0xf0,
+ 0x90, 0x78, 0x41, 0x74, 0xf3, 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, 0xf1, 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, 0x6b, 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, 0x6b, 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,
+ 0x74, 0xf2, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
+ {0x0486, 64, { 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xef, 0x60, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35,
+ 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x1d, 0xf5, 0x82, 0xe4, 0x35, 0x14,
+ 0xf5, 0x83, 0xe0, 0x60, 0x27, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
+ 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf3, 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, 0x6b,
+ 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, 0x6b, 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, 0xf2, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14,
+ 0xf5, 0x83, 0xe0, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x21, 0xf5, 0x82}},
+ {0x0586, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14,
+ 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x22, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
+ 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, 0x7a, 0xe5, 0x15, 0x24, 0x24, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
+ 0x60, 0x23, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x08,
+ 0xf0, 0xe5, 0x16, 0xc4, 0x54, 0xf0, 0xff, 0x42, 0x11, 0x90, 0x7f, 0x96, 0xe0, 0x4f, 0xf0}},
+ {0x0606, 64, { 0x90, 0x78, 0x41, 0xe0, 0x4f, 0xf0, 0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
+ 0xe0, 0x60, 0x24, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54,
+ 0xf7, 0xf0, 0xe5, 0x16, 0xc4, 0x54, 0xf0, 0xf4, 0xff, 0x52, 0x11, 0x90, 0x7f, 0x96, 0xe0, 0x5f,
+ 0xf0, 0x90, 0x78, 0x41, 0xe0, 0x5f, 0xf0, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x11, 0xfe}},
+ {0x0646, 64, { 0x07, 0x99, 0x00, 0x08, 0x0d, 0x01, 0x08, 0x79, 0x03, 0x06, 0x62, 0x06, 0x07, 0x8a, 0x08, 0x07, 0x7e,
+ 0x09, 0x07, 0x66, 0x0a, 0x07, 0x75, 0x0b, 0x00, 0x00, 0x08, 0xc8, 0x90, 0x7f, 0xeb, 0xe0, 0x24,
+ 0xfe, 0x60, 0x1c, 0x14, 0x70, 0x03, 0x02, 0x07, 0x14, 0x24, 0x02, 0x60, 0x03, 0x02, 0x07, 0x5c,
+ 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x08, 0xcf}},
+ {0x0686, 64, { 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x30,
+ 0xe0, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0,
+ 0x75, 0x82, 0x6d, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82,
+ 0x5f, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea}},
+ {0x06c6, 64, { 0xe0, 0x30, 0xe1, 0x04, 0x7f, 0x64, 0x80, 0x02, 0x7f, 0x32, 0x75, 0x82, 0x1a, 0x75, 0x83, 0x19, 0xef,
+ 0xf0, 0x90, 0x7f, 0xef, 0xe0, 0xfe, 0x90, 0x7f, 0xee, 0xe0, 0x7c, 0x00, 0x24, 0x00, 0xf5, 0x18,
+ 0xec, 0x3e, 0xf5, 0x17, 0x75, 0x33, 0x19, 0x75, 0x34, 0x12, 0x75, 0x82, 0x14, 0x75, 0x83, 0x19,
+ 0xe0, 0x75, 0x27, 0x00, 0xf5, 0x28, 0xd3, 0xe5, 0x28, 0x95, 0x18, 0xe5, 0x27, 0x95, 0x17}},
+ {0x0706, 64, { 0x40, 0x06, 0x85, 0x17, 0x27, 0x85, 0x18, 0x28, 0x12, 0x13, 0x0d, 0x02, 0x08, 0xcf, 0x90, 0x7f, 0xea,
+ 0xe0, 0xff, 0x12, 0x14, 0x5f, 0xea, 0x49, 0x60, 0x32, 0x90, 0x7f, 0xee, 0xe0, 0x75, 0x17, 0x00,
+ 0xf5, 0x18, 0xae, 0x02, 0xaf, 0x01, 0x8e, 0x33, 0x8f, 0x34, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfe,
+ 0xa3, 0xe0, 0x8e, 0x27, 0xf5, 0x28, 0xd3, 0x95, 0x18, 0xe5, 0x27, 0x95, 0x17, 0x40, 0x06}},
+ {0x0746, 64, { 0x85, 0x17, 0x27, 0x85, 0x18, 0x28, 0x12, 0x13, 0x0d, 0x02, 0x08, 0xcf, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
+ 0x01, 0xf0, 0x02, 0x08, 0xcf, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xcf, 0x90,
+ 0x7f, 0x00, 0xe5, 0x25, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x08, 0xcf, 0x90, 0x7f,
+ 0xea, 0xe0, 0xf5, 0x25, 0x02, 0x08, 0xcf, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x22, 0x12, 0x0a}},
+ {0x0786, 64, { 0xce, 0x02, 0x08, 0xcf, 0x90, 0x7f, 0x00, 0xe5, 0x22, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02,
+ 0x08, 0xcf, 0x90, 0x7f, 0xe8, 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, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x08, 0xcf, 0xe4}},
+ {0x07c6, 64, { 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x08, 0xcf, 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, 0x08, 0xcf, 0x90, 0x7f, 0xb4}},
+ {0x0806, 64, { 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xcf, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02,
+ 0x60, 0x03, 0x02, 0x08, 0xcf, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02, 0x08,
+ 0xcf, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xcf, 0x90, 0x7f, 0xea, 0xe0, 0x70,
+ 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54}},
+ {0x0846, 64, { 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, 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}},
+ {0x0886, 64, { 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x00, 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}},
+ {0x08c6, 64, { 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22,
+ 0xe5, 0x12, 0x54, 0x0f, 0x70, 0x03, 0x02, 0x09, 0xc8, 0x12, 0x16, 0x9a, 0xef, 0x20, 0xe1, 0x75,
+ 0x12, 0x16, 0xf8, 0xef, 0x14, 0xf5, 0x18, 0x12, 0x18, 0xc5, 0xef, 0x25, 0x18, 0xff, 0xe4, 0x33,
+ 0xfe, 0xc3, 0xef, 0x94, 0x80, 0xee, 0x64, 0x80, 0x94, 0x80, 0x50, 0x59, 0x85, 0x15, 0x82}},
+ {0x0906, 64, { 0x85, 0x14, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0x30, 0xe0, 0x11, 0xe5,
+ 0x15, 0x24, 0x31, 0xf5, 0x82, 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}},
+ {0x0946, 64, { 0x18, 0x60, 0x0e, 0xf5, 0x23, 0xef, 0x24, 0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0xa0,
+ 0xe4, 0xff, 0x12, 0x14, 0xd7, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
+ 0xe0, 0x30, 0xe7, 0x5d, 0x12, 0x18, 0xc5, 0xe5, 0x15, 0x24, 0x3b, 0xf5, 0x82, 0xe4, 0x35, 0x14,
+ 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0xc3, 0x9e, 0x50, 0x48, 0xe5, 0x15, 0x24, 0x2f, 0xf5, 0x82}},
+ {0x0986, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14,
+ 0xf5, 0x83, 0xe0, 0x54, 0x7b, 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}},
+ {0x09c6, 64, { 0x12, 0x9c, 0x12, 0x16, 0xc9, 0xef, 0x30, 0xe1, 0x03, 0x02, 0x0a, 0xcd, 0x12, 0x17, 0xc7, 0x8f, 0x18,
+ 0x12, 0x18, 0xd3, 0xe5, 0x15, 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, 0x18, 0xc3,
+ 0x9f, 0x50, 0x28, 0x12, 0x18, 0xa9, 0xef, 0x30, 0xe0, 0x21, 0xe5, 0x15, 0x24, 0x38, 0xf5}},
+ {0x0a06, 64, { 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, 0xcd, 0xe5, 0x15, 0x24, 0x31, 0xf5,
+ 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x18, 0x70, 0x03, 0x02, 0x0a,
+ 0xcd, 0xb4, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
+ {0x0a46, 64, { 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff,
+ 0x30, 0xe7, 0x29, 0xe5, 0x18, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x18, 0x20, 0x85, 0x18, 0x23,
+ 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0x8c, 0x2c, 0xf5, 0x2d,
+ 0x12, 0x13, 0xcf, 0xe5, 0x18, 0x25, 0xe0, 0xff, 0x12, 0x15, 0x0d, 0x22, 0xe5, 0x18, 0xd3}},
+ {0x0a86, 64, { 0x94, 0x3f, 0x40, 0x03, 0x75, 0x18, 0x3f, 0x85, 0x18, 0x23, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4,
+ 0x35, 0x14, 0xf5, 0x83, 0xe0, 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, 0x1d}},
+ {0x0ac6, 64, { 0xe5, 0x18, 0x04, 0xff, 0x12, 0x15, 0x0d, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
+ 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 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, 0x2f, 0xf0, 0x90, 0x78, 0x43, 0x74, 0xf7, 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0}},
+ {0x0b06, 64, { 0x90, 0x7f, 0xdf, 0x74, 0x9f, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0,
+ 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x98, 0x74, 0x2e, 0xf0,
+ 0x75, 0x16, 0x01, 0x12, 0x0f, 0x28, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0,
+ 0x90, 0x7f, 0x98, 0x74, 0x2e, 0xf0, 0x75, 0x16, 0x01, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82}},
+ {0x0b46, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x7e, 0x7e, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
+ 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, 0x98, 0x74, 0x2d, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x0f}},
+ {0x0b86, 64, { 0x28, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x98, 0x74, 0x2d, 0xf0,
+ 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}},
+ {0x0bc6, 64, { 0x7e, 0xf0, 0xa3, 0x74, 0x00, 0xf0, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90,
+ 0x7f, 0x98, 0x74, 0x2b, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x0f, 0x28, 0x7e, 0x7c, 0x7f, 0x40, 0x75,
+ 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x2b, 0xf0, 0x75, 0x16, 0x04, 0xe5, 0x15,
+ 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x02, 0xf0, 0x7e, 0x7d, 0x7f}},
+ {0x0c06, 64, { 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7d, 0x7f,
+ 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, 0x98, 0x74, 0x27, 0xf0,
+ 0x75, 0x16, 0x08, 0x12, 0x0f, 0x28, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15}},
+ {0x0c46, 64, { 0x80, 0x90, 0x7f, 0x98, 0x74, 0x27, 0xf0, 0x75, 0x16, 0x08, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4,
+ 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}},
+ {0x0c86, 64, { 0xe4, 0xf5, 0x11, 0xd2, 0x02, 0x22, 0xe5, 0x10, 0x04, 0x54, 0x03, 0xf5, 0x10, 0x14, 0x60, 0x1f, 0x14,
+ 0x60, 0x31, 0x14, 0x60, 0x43, 0x24, 0x03, 0x70, 0x52, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b,
+ 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x98, 0x74, 0x2e, 0xf0, 0x75, 0x16, 0x01, 0x80, 0x3d, 0x7e, 0x7c,
+ 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x98, 0x74, 0x2d, 0xf0, 0x75}},
+ {0x0cc6, 64, { 0x16, 0x02, 0x80, 0x28, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x98,
+ 0x74, 0x2b, 0xf0, 0x75, 0x16, 0x04, 0x80, 0x13, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75,
+ 0x15, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x27, 0xf0, 0x75, 0x16, 0x08, 0xe5, 0x32, 0x55, 0x16, 0x70,
+ 0x03, 0x02, 0x0e, 0x27, 0xe5, 0x16, 0xf4, 0x52, 0x32, 0xe5, 0x26, 0x54, 0x7f, 0xff, 0x70}},
+ {0x0d06, 64, { 0x17, 0xe5, 0x2a, 0x55, 0x16, 0x60, 0x34, 0x90, 0x7f, 0x96, 0xe0, 0xfe, 0xe5, 0x16, 0xc4, 0x54, 0xf0,
+ 0xf4, 0xfd, 0xee, 0x5d, 0xf0, 0x80, 0x23, 0xbf, 0x20, 0x20, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82,
+ 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe3, 0x11, 0xe4, 0xf5, 0x2a, 0x90, 0x7f, 0x96, 0xe0,
+ 0xff, 0xe5, 0x16, 0xc4, 0x54, 0xf0, 0xfe, 0xef, 0x4e, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5}},
+ {0x0d46, 64, { 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, 0x27, 0x74, 0x0a, 0xf0, 0x12, 0x00, 0x36, 0xef, 0x54, 0x01, 0xff, 0xf5, 0x18, 0xe5, 0x15,
+ 0x24, 0x2c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x18}},
+ {0x0d86, 64, { 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x12, 0x18, 0xe1, 0x8f, 0x18, 0xe5, 0x15, 0x24, 0x27, 0xf5, 0x82, 0xe4,
+ 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x54, 0x10, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0,
+ 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x28, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
+ 0xff, 0xe5, 0x18, 0x54, 0x80, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13}},
+ {0x0dc6, 64, { 0xe5, 0x15, 0x24, 0x29, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 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, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x2a, 0xf5, 0x82, 0xe4,
+ 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x54, 0x40, 0xfe, 0x6f, 0x60, 0x15, 0xee}},
+ {0x0e06, 64, { 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe5, 0x04, 0xe5,
+ 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x30, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0,
+ 0x22, 0x30, 0x09, 0x03, 0x02, 0x0f, 0x27, 0xe5, 0x24, 0x14, 0x60, 0x2a, 0x14, 0x60, 0x41, 0x14,
+ 0x60, 0x58, 0x14, 0x60, 0x6f, 0x24, 0x04, 0x60, 0x03, 0x02, 0x0e, 0xe5, 0x7e, 0x7b, 0x7f}},
+ {0x0e46, 64, { 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x98, 0x74, 0x2e, 0xf0, 0x75, 0x16, 0x01, 0x12,
+ 0x12, 0x9c, 0x75, 0x24, 0x01, 0x22, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00,
+ 0x90, 0x7f, 0x98, 0x74, 0x2d, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x12, 0x9c, 0x75, 0x24, 0x02, 0x22,
+ 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x2b}},
+ {0x0e86, 64, { 0xf0, 0x75, 0x16, 0x04, 0x12, 0x12, 0x9c, 0x75, 0x24, 0x03, 0x22, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14,
+ 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x27, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x12, 0x9c,
+ 0x75, 0x24, 0x04, 0x22, 0x30, 0x04, 0x33, 0xc2, 0x04, 0x53, 0x13, 0xdf, 0xe4, 0xf5, 0x18, 0x7e,
+ 0x00, 0x7b, 0x00, 0x74, 0x2e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xa6}},
+ {0x0ec6, 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, 0x75, 0x24, 0x05, 0x22, 0xe5, 0x36,
+ 0x60, 0x3b, 0xd5, 0x36, 0x0a, 0x53, 0x13, 0xef, 0x30, 0x0a, 0x04, 0xd2, 0x09, 0xc2, 0x0a, 0xe4,
+ 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x35, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa}},
+ {0x0f06, 64, { 0x12, 0x11, 0xa6, 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, 0x24,
+ 0x22, 0xe4, 0xf5, 0x19, 0x7e, 0x00, 0x7b, 0x01, 0xe5, 0x15, 0x25, 0x19, 0xf9, 0xee, 0x35, 0x14,
+ 0xfa, 0xe4, 0x12, 0x11, 0xec, 0x05, 0x19, 0xe5, 0x19, 0xb4, 0x3c, 0xe8, 0xe5, 0x15, 0x24}},
+ {0x0f46, 64, { 0x35, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf3, 0xf0,
+ 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x90, 0xc0,
+ 0x00, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x16, 0x6b, 0x7f, 0x10, 0xe5, 0x15, 0x24, 0x33, 0xf5,
+ 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0x12, 0x15, 0xdb, 0x90, 0x78, 0x41, 0x74}},
+ {0x0f86, 64, { 0xf2, 0xf0, 0x7f, 0x01, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0,
+ 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf4, 0xf0, 0xe5, 0x15, 0x24, 0x39,
+ 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x80, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4,
+ 0xfd, 0x12, 0x16, 0x6b, 0xe4, 0xff, 0x7e, 0xa3, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4}},
+ {0x0fc6, 64, { 0x35, 0x14, 0xf5, 0x83, 0xee, 0xf0, 0xfd, 0x12, 0x16, 0x6b, 0x90, 0x78, 0x41, 0x74, 0xf1, 0xf0, 0x90,
+ 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x16, 0x6b, 0x7f, 0x01, 0x12, 0x15, 0x43,
+ 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x16, 0x6b, 0x22, 0x53, 0x13, 0x3f, 0x90, 0x7b, 0xf1, 0xe0, 0x30,
+ 0xe3, 0x16, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x98}},
+ {0x1006, 64, { 0x74, 0x2e, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x08, 0xd7, 0x90, 0x7c, 0x31, 0xe0, 0x30, 0xe3, 0x16, 0x7e,
+ 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x98, 0x74, 0x2d, 0xf0, 0x75,
+ 0x16, 0x02, 0x12, 0x08, 0xd7, 0x90, 0x7c, 0x71, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x40,
+ 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x2b, 0xf0, 0x75, 0x16, 0x04}},
+ {0x1046, 64, { 0x12, 0x08, 0xd7, 0x90, 0x7c, 0xb1, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c,
+ 0x75, 0x15, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x27, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x08, 0xd7, 0x05,
+ 0x12, 0xe5, 0x12, 0x54, 0x0f, 0xf5, 0x17, 0x70, 0x04, 0x12, 0x11, 0x1c, 0x22, 0xe5, 0x17, 0xb4,
+ 0x01, 0x04, 0x12, 0x0c, 0x8c, 0x22, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x08, 0xe5, 0x13}},
+ {0x1086, 64, { 0x60, 0x04, 0x12, 0x0e, 0x28, 0x22, 0x12, 0x0c, 0x8c, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75,
+ 0x81, 0x37, 0x02, 0x10, 0xd7, 0x02, 0x12, 0x24, 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}},
+ {0x10c6, 64, { 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
+ 0x90, 0x18, 0x45, 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}},
+ {0x1106, 64, { 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, 0xa5, 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, 0x75, 0x14, 0x7b, 0x75, 0x15}},
+ {0x1146, 64, { 0xc0, 0x90, 0x7f, 0x98, 0x74, 0x2e, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x00, 0x46, 0x80, 0x4b, 0x7e, 0x7c,
+ 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x98, 0x74, 0x2d, 0xf0, 0x75, 0x16,
+ 0x02, 0x12, 0x00, 0x46, 0x80, 0x33, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40,
+ 0x90, 0x7f, 0x98, 0x74, 0x2b, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x00, 0x46, 0x80, 0x1b, 0x7e}},
+ {0x1186, 64, { 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x27, 0xf0, 0x75, 0x16,
+ 0x08, 0x12, 0x00, 0x46, 0x80, 0x03, 0x12, 0x17, 0x51, 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, 0x0c, 0xe5, 0x82, 0x29, 0xf5}},
+ {0x11c6, 64, { 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, 0xe4, 0x93, 0x70}},
+ {0x1206, 64, { 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, 0x90, 0x7f, 0xab, 0x74, 0xff}},
+ {0x1246, 64, { 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, 0x09, 0xc2, 0x01,
+ 0xe4, 0xf5, 0x2b, 0xf5, 0x31, 0xc2, 0x07, 0xc2, 0x02, 0x75, 0x29, 0x0f, 0x90, 0x7f, 0xd8, 0xe0,
+ 0x65, 0x26, 0x60, 0x06, 0x75, 0x32, 0x0f, 0xe0, 0xf5, 0x26, 0x30, 0x02, 0x03, 0x12, 0x0f}},
+ {0x1286, 64, { 0xef, 0x30, 0x01, 0x07, 0xc2, 0x01, 0x12, 0x06, 0x3f, 0x80, 0xe2, 0x30, 0x08, 0xdf, 0xc2, 0x08, 0x12,
+ 0x18, 0x2a, 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, 0xef, 0xaa, 0x06, 0x70, 0x01}},
+ {0x12c6, 64, { 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, 0x24, 0x2f, 0xf5, 0x82, 0xe4}},
+ {0x1306, 64, { 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, 0x00, 0x2d, 0xf5, 0x82, 0xe4}},
+ {0x1346, 64, { 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,
+ 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0xe4, 0x90, 0x78, 0x4a, 0xf0, 0x90, 0x7f, 0x94, 0xf0}},
+ {0x1386, 64, { 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x7f,
+ 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xff, 0xf0, 0x30, 0x00, 0x07, 0xe5, 0x29, 0x54, 0x0f, 0xff,
+ 0x80, 0x02, 0x7f, 0x00, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x1f, 0xf0, 0xe4,
+ 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0xdf}},
+ {0x13c6, 64, { 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x8f, 0x19, 0x05, 0x2d, 0xe5, 0x2d, 0xae, 0x2c,
+ 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x19, 0xf0, 0x12, 0x18, 0xef, 0x05,
+ 0x2d, 0xe5, 0x2d, 0xac, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0,
+ 0x15, 0x23, 0xe5, 0x23, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14}},
+ {0x1406, 64, { 0xf5, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xd3, 0x8f, 0x19, 0xee, 0x4f, 0xd0, 0x82,
+ 0xd0, 0x83, 0xf0, 0x80, 0xb5, 0x22, 0x90, 0x78, 0x41, 0xe5, 0x11, 0xf0, 0x90, 0x78, 0x4f, 0x74,
+ 0xc0, 0xf0, 0xe4, 0x90, 0x78, 0x50, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x51, 0xf0, 0xae, 0x2c, 0xe5,
+ 0x2d, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78, 0x57, 0x74}},
+ {0x1446, 64, { 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, 0x8f, 0x19, 0xe4, 0xf5, 0x1a, 0x75, 0x1b, 0xff,
+ 0x75, 0x1c, 0x19, 0x75, 0x1d, 0x86, 0xab, 0x1b, 0xaa, 0x1c, 0xa9, 0x1d, 0x90, 0x00, 0x01, 0x12,
+ 0x11, 0xbf, 0xb4, 0x03, 0x1d, 0xaf, 0x1a, 0x05, 0x1a, 0xef, 0xb5, 0x19, 0x01, 0x22, 0x12}},
+ {0x1486, 64, { 0x11, 0xa6, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1b, 0xff, 0xf5, 0x1c, 0x89, 0x1d,
+ 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0x90, 0x78, 0x41, 0xe5, 0x11, 0xf0, 0xe5,
+ 0x2c, 0x90, 0x78, 0x4f, 0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x50, 0xf0, 0x90, 0x78, 0x51,
+ 0x74, 0xc0, 0xf0, 0xe4, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90}},
+ {0x14c6, 64, { 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, 0x80, 0x0c, 0x90, 0x7f, 0xcb, 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xcd}},
+ {0x1506, 64, { 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, 0x7f, 0xbd, 0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xae, 0x07, 0xe4}},
+ {0x1546, 64, { 0xff, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xfd, 0x12,
+ 0x16, 0x6b, 0x90, 0x78, 0x41, 0x74, 0xf1, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15,
+ 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xfd, 0x12, 0x16, 0x6b,
+ 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86}},
+ {0x1586, 64, { 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0,
+ 0x12, 0x13, 0x0d, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0,
+ 0xf0, 0xd0, 0xe0, 0x32, 0x90, 0x78, 0x41, 0x74, 0xf3, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
+ 0x90, 0x78, 0x41, 0x74, 0xf1, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74}},
+ {0x15c6, 64, { 0xf3, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90,
+ 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0xf3, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
+ 0x90, 0x78, 0x41, 0x74, 0xf2, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf3,
+ 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f}},
+ {0x1606, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0xf3, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
+ 0x90, 0x78, 0x41, 0x74, 0xf4, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf3,
+ 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90,
+ 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0xf3, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf}},
+ {0x1646, 64, { 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf6, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf3,
+ 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90,
+ 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0xf3, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82,
+ 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41}},
+ {0x1686, 64, { 0x74, 0xf7, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0xf5, 0xf0, 0x90, 0xc0, 0x00,
+ 0xed, 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, 0xff, 0x22, 0x90, 0x7f, 0xca, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcc}},
+ {0x16c6, 64, { 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, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60}},
+ {0x1706, 64, { 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, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86}},
+ {0x1746, 64, { 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, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75}},
+ {0x1786, 64, { 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, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0}},
+ {0x17c6, 64, { 0x32, 0x12, 0x18, 0xb7, 0xae, 0x07, 0x12, 0x18, 0xb7, 0xad, 0x07, 0xee, 0x6d, 0x60, 0x10, 0x12, 0x18,
+ 0xb7, 0xae, 0x07, 0xee, 0x6d, 0x60, 0x07, 0x12, 0x18, 0xb7, 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, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00}},
+ {0x1806, 64, { 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, 0x60, 0x90, 0x7f, 0xd6, 0xe0, 0x54,
+ 0xf7, 0xf0, 0x22, 0x12, 0x13, 0x77, 0x12, 0x17, 0xf9, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0a,
+ 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x18, 0x60, 0x12, 0x18, 0x93, 0x12, 0x0a, 0xce, 0x22, 0x03}},
+ {0x1846, 64, { 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, 0x17, 0x8f, 0x18, 0xe5, 0x18, 0x15,
+ 0x18, 0xae, 0x17, 0x70, 0x02, 0x15, 0x17, 0x4e, 0x60, 0x08, 0x12, 0x17, 0xe8, 0x12, 0x17, 0xe8,
+ 0x80, 0xeb, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
+ {0x1886, 64, { 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, 0x60, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe,
+ 0xf0, 0x22, 0xe5, 0x11, 0x24, 0x02, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
+ 0xe5, 0x11, 0x24, 0x03, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0xe5}},
+ {0x18c6, 64, { 0x11, 0x24, 0x04, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0xe5, 0x11, 0x24, 0x05,
+ 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0xe5, 0x11, 0x24, 0x06, 0x90, 0x78,
+ 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0xe5, 0x11, 0xf0, 0x90, 0xc0,
+ 0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0xff}},
+ {0x1906, 64, { 0xff, 0x40, 0xcd, 0x06, 0x2a, 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,
+ 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,
+ 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
+ {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x24, 0x03, 0x4b, 0x00, 0x65,
+ 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
+ 0x00, 0x41, 0x00, 0x2d, 0x00, 0x34, 0x00, 0x39, 0x00, 0x57, 0x00, 0x4c, 0x00, 0x43, 0x00, 0x22,
+ 0x03, 0x55, 0x00, 0x53, 0x00, 0x41, 0x00, 0x2d, 0x00, 0x36, 0x00, 0x35, 0x00, 0x20, 0x00}},
+ {0x1a06, 64, { 0x32, 0x00, 0x30, 0x00, 0x30, 0x00, 0x33, 0x00, 0x6a, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x33, 0x00, 0x31,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
+ {0x1a46, 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}},
+ {0x1a86, 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}},
+ {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, 0x79, 0x00, 0x02, 0x1b}},
+ {0x1b06, 21, { 0x04, 0x00, 0x02, 0x17, 0x27, 0x00, 0x02, 0x17, 0xa0, 0x00, 0x02, 0x1b, 0x10, 0x00, 0x02, 0x1b, 0x14,
+ 0x00, 0x02, 0x15, 0x78}},
+ {0xffff, 0, { 0x00}},
+};
+
+
diff --git a/drivers/usb/serial/keyspan_usa90msg.h b/drivers/usb/serial/keyspan_usa90msg.h
new file mode 100644
index 000000000000..dd935b62c1a8
--- /dev/null
+++ b/drivers/usb/serial/keyspan_usa90msg.h
@@ -0,0 +1,198 @@
+/*
+ usa90msg.h
+
+ Copyright (c) 1998-2003 InnoSys Incorporated. All Rights Reserved
+ This file is available under a BSD-style copyright
+
+ Keyspan USB Async Message Formats for the USA19HS
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain this licence text
+ without modification, this list of conditions, and the following
+ disclaimer. The following copyright notice must appear immediately at
+ the beginning of all source files:
+
+ Copyright (c) 1998-2003 InnoSys Incorporated. All Rights Reserved
+
+ This file is available under a BSD-style copyright
+
+ 2. The name of InnoSys Incorprated may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY INNOSYS CORP. ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ Revisions:
+
+ 2003feb14 add setTxMode/txMode and cancelRxXoff to portControl
+ 2003mar21 change name of PARITY_0/1 to add MARK/SPACE
+*/
+
+#ifndef __USA90MSG__
+#define __USA90MSG__
+
+struct keyspan_usa90_portControlMessage
+{
+ /*
+ there are three types of "commands" sent in the control message:
+
+ 1. configuration changes which must be requested by setting
+ the corresponding "set" flag (and should only be requested
+ when necessary, to reduce overhead on the device):
+ */
+
+ u8 setClocking, // host requests baud rate be set
+ baudLo, // host does baud divisor calculation
+ baudHi, // host does baud divisor calculation
+
+ setLcr, // host requests lcr be set
+ lcr, // use PARITY, STOPBITS, DATABITS below
+
+ setRxMode, // set receive mode
+ rxMode, // RXMODE_DMA or RXMODE_BYHAND
+
+ setTxMode, // set transmit mode
+ txMode, // TXMODE_DMA or TXMODE_BYHAND
+
+ setTxFlowControl, // host requests tx flow control be set
+ txFlowControl , // use TX_FLOW... bits below
+ setRxFlowControl, // host requests rx flow control be set
+ rxFlowControl, // use RX_FLOW... bits below
+ sendXoff, // host requests XOFF transmitted immediately
+ sendXon, // host requests XON char transmitted
+ xonChar, // specified in current character format
+ xoffChar, // specified in current character format
+
+ sendChar, // host requests char transmitted immediately
+ txChar, // character to send
+
+ setRts, // host requests RTS output be set
+ rts, // 1=on, 0=off
+ setDtr, // host requests DTR output be set
+ dtr; // 1=on, 0=off
+
+
+ /*
+ 2. configuration data which is simply used as is
+ and must be specified correctly in every host message.
+ */
+
+ u8 rxForwardingLength, // forward when this number of chars available
+ rxForwardingTimeout, // (1-31 in ms)
+ txAckSetting; // 0=don't ack, 1=normal, 2-255 TBD...
+ /*
+ 3. Firmware states which cause actions if they change
+ and must be specified correctly in every host message.
+ */
+
+ u8 portEnabled, // 0=disabled, 1=enabled
+ txFlush, // 0=normal, 1=toss outbound data
+ txBreak, // 0=break off, 1=break on
+ loopbackMode; // 0=no loopback, 1=loopback enabled
+
+ /*
+ 4. commands which are flags only; these are processed in order
+ (so that, e.g., if rxFlush and rxForward flags are set, the
+ port will have no data to forward); any non-zero value
+ is respected
+ */
+
+ u8 rxFlush, // toss inbound data
+ rxForward, // forward all inbound data, NOW (as if fwdLen==1)
+ cancelRxXoff, // cancel any receive XOFF state (_txXoff)
+ returnStatus; // return current status NOW
+};
+
+// defines for bits in lcr
+#define USA_DATABITS_5 0x00
+#define USA_DATABITS_6 0x01
+#define USA_DATABITS_7 0x02
+#define USA_DATABITS_8 0x03
+#define STOPBITS_5678_1 0x00 // 1 stop bit for all byte sizes
+#define STOPBITS_5_1p5 0x04 // 1.5 stop bits for 5-bit byte
+#define STOPBITS_678_2 0x04 // 2 stop bits for 6-8 bit byte
+#define USA_PARITY_NONE 0x00
+#define USA_PARITY_ODD 0x08
+#define USA_PARITY_EVEN 0x18
+#define PARITY_MARK_1 0x28 // force parity MARK
+#define PARITY_SPACE_0 0x38 // force parity SPACE
+
+#define TXFLOW_CTS 0x04
+#define TXFLOW_DSR 0x08
+#define TXFLOW_XOFF 0x01
+#define TXFLOW_XOFF_ANY 0x02
+#define TXFLOW_XOFF_BITS (TXFLOW_XOFF | TXFLOW_XOFF_ANY)
+
+#define RXFLOW_XOFF 0x10
+#define RXFLOW_RTS 0x20
+#define RXFLOW_DTR 0x40
+#define RXFLOW_DSR_SENSITIVITY 0x80
+
+#define RXMODE_BYHAND 0x00
+#define RXMODE_DMA 0x02
+
+#define TXMODE_BYHAND 0x00
+#define TXMODE_DMA 0x02
+
+
+// all things called "StatusMessage" are sent on the status endpoint
+
+struct keyspan_usa90_portStatusMessage
+{
+ u8 msr, // reports the actual MSR register
+ cts, // reports CTS pin
+ dcd, // reports DCD pin
+ dsr, // reports DSR pin
+ ri, // reports RI pin
+ _txXoff, // port is in XOFF state (we received XOFF)
+ rxBreak, // reports break state
+ rxOverrun, // count of overrun errors (since last reported)
+ rxParity, // count of parity errors (since last reported)
+ rxFrame, // count of frame errors (since last reported)
+ portState, // PORTSTATE_xxx bits (useful for debugging)
+ messageAck, // message acknowledgement
+ charAck, // character acknowledgement
+ controlResponse; // (value = returnStatus) a control message has been processed
+};
+
+// bits in RX data message when STAT byte is included
+
+#define RXERROR_OVERRUN 0x02
+#define RXERROR_PARITY 0x04
+#define RXERROR_FRAMING 0x08
+#define RXERROR_BREAK 0x10
+
+#define PORTSTATE_ENABLED 0x80
+#define PORTSTATE_TXFLUSH 0x01
+#define PORTSTATE_TXBREAK 0x02
+#define PORTSTATE_LOOPBACK 0x04
+
+// MSR bits
+
+#define USA_MSR_dCTS 0x01 // CTS has changed since last report
+#define USA_MSR_dDSR 0x02
+#define USA_MSR_dRI 0x04
+#define USA_MSR_dDCD 0x08
+
+#define USA_MSR_CTS 0x10 // current state of CTS
+#define USA_MSR_DSR 0x20
+#define USA_USA_MSR_RI 0x40
+#define MSR_DCD 0x80
+
+// ie: the maximum length of an endpoint buffer
+#define MAX_DATA_LEN 64
+
+#endif
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
new file mode 100644
index 000000000000..49c602a0b4df
--- /dev/null
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -0,0 +1,1034 @@
+/*
+ * KLSI KL5KUSB105 chip RS232 converter driver
+ *
+ * Copyright (C) 2001 Utz-Uwe Haus <haus@uuhaus.de>
+ *
+ * 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.
+ *
+ * All information about the device was acquired using SniffUSB ans snoopUSB
+ * on Windows98.
+ * It was written out of frustration with the PalmConnect USB Serial adapter
+ * sold by Palm Inc.
+ * Neither Palm, nor their contractor (MCCI) or their supplier (KLSI) provided
+ * information that was not already available.
+ *
+ * It seems that KLSI bought some silicon-design information from ScanLogic,
+ * whose SL11R processor is at the core of the KL5KUSB chipset from KLSI.
+ * KLSI has firmware available for their devices; it is probable that the
+ * firmware differs from that used by KLSI in their products. If you have an
+ * original KLSI device and can provide some information on it, I would be
+ * most interested in adding support for it here. If you have any information
+ * on the protocol used (or find errors in my reverse-engineered stuff), please
+ * let me know.
+ *
+ * The code was only tested with a PalmConnect USB adapter; if you
+ * are adventurous, try it with any KLSI-based device and let me know how it
+ * breaks so that I can fix it!
+ */
+
+/* TODO:
+ * check modem line signals
+ * implement handshaking or decide that we do not support it
+ */
+
+/* History:
+ * 0.3a - implemented pools of write URBs
+ * 0.3 - alpha version for public testing
+ * 0.2 - TIOCMGET works, so autopilot(1) can be used!
+ * 0.1 - can be used to to pilot-xfer -p /dev/ttyUSB0 -l
+ *
+ * The driver skeleton is mainly based on mct_u232.c and various other
+ * pieces of code shamelessly copied from the drivers/usb/serial/ directory.
+ */
+
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+#include "kl5kusb105.h"
+
+static int debug;
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.3a"
+#define DRIVER_AUTHOR "Utz-Uwe Haus <haus@uuhaus.de>"
+#define DRIVER_DESC "KLSI KL5KUSB105 chipset USB->Serial Converter driver"
+
+
+/*
+ * Function prototypes
+ */
+static int klsi_105_startup (struct usb_serial *serial);
+static void klsi_105_shutdown (struct usb_serial *serial);
+static int klsi_105_open (struct usb_serial_port *port,
+ struct file *filp);
+static void klsi_105_close (struct usb_serial_port *port,
+ struct file *filp);
+static int klsi_105_write (struct usb_serial_port *port,
+ const unsigned char *buf,
+ int count);
+static void klsi_105_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static int klsi_105_chars_in_buffer (struct usb_serial_port *port);
+static int klsi_105_write_room (struct usb_serial_port *port);
+
+static void klsi_105_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void klsi_105_set_termios (struct usb_serial_port *port,
+ struct termios * old);
+static int klsi_105_ioctl (struct usb_serial_port *port,
+ struct file * file,
+ unsigned int cmd,
+ unsigned long arg);
+static void klsi_105_throttle (struct usb_serial_port *port);
+static void klsi_105_unthrottle (struct usb_serial_port *port);
+/*
+static void klsi_105_break_ctl (struct usb_serial_port *port,
+ int break_state );
+ */
+static int klsi_105_tiocmget (struct usb_serial_port *port,
+ struct file *file);
+static int klsi_105_tiocmset (struct usb_serial_port *port,
+ struct file *file, unsigned int set,
+ unsigned int clear);
+
+/*
+ * All of the device info needed for the KLSI converters.
+ */
+static struct usb_device_id id_table [] = {
+ { USB_DEVICE(PALMCONNECT_VID, PALMCONNECT_PID) },
+ { USB_DEVICE(KLSI_VID, KLSI_KL5KUSB105D_PID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver kl5kusb105d_driver = {
+ .owner = THIS_MODULE,
+ .name = "kl5kusb105d",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table,
+};
+
+static struct usb_serial_device_type kl5kusb105d_device = {
+ .owner = THIS_MODULE,
+ .name = "KL5KUSB105D / PalmConnect",
+ .short_name = "kl5kusb105d",
+ .id_table = id_table,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = klsi_105_open,
+ .close = klsi_105_close,
+ .write = klsi_105_write,
+ .write_bulk_callback = klsi_105_write_bulk_callback,
+ .chars_in_buffer = klsi_105_chars_in_buffer,
+ .write_room = klsi_105_write_room,
+ .read_bulk_callback =klsi_105_read_bulk_callback,
+ .ioctl = klsi_105_ioctl,
+ .set_termios = klsi_105_set_termios,
+ /*.break_ctl = klsi_105_break_ctl,*/
+ .tiocmget = klsi_105_tiocmget,
+ .tiocmset = klsi_105_tiocmset,
+ .attach = klsi_105_startup,
+ .shutdown = klsi_105_shutdown,
+ .throttle = klsi_105_throttle,
+ .unthrottle = klsi_105_unthrottle,
+};
+
+struct klsi_105_port_settings {
+ __u8 pktlen; /* always 5, it seems */
+ __u8 baudrate;
+ __u8 databits;
+ __u8 unknown1;
+ __u8 unknown2;
+} __attribute__ ((packed));
+
+/* we implement a pool of NUM_URBS urbs per usb_serial */
+#define NUM_URBS 1
+#define URB_TRANSFER_BUFFER_SIZE 64
+struct klsi_105_private {
+ struct klsi_105_port_settings cfg;
+ struct termios termios;
+ unsigned long line_state; /* modem line settings */
+ /* write pool */
+ struct urb * write_urb_pool[NUM_URBS];
+ spinlock_t lock;
+ unsigned long bytes_in;
+ unsigned long bytes_out;
+};
+
+
+/*
+ * Handle vendor specific USB requests
+ */
+
+
+#define KLSI_TIMEOUT 5000 /* default urb timeout */
+
+static int klsi_105_chg_port_settings(struct usb_serial_port *port,
+ struct klsi_105_port_settings *settings)
+{
+ int rc;
+
+ rc = usb_control_msg(port->serial->dev,
+ usb_sndctrlpipe(port->serial->dev, 0),
+ KL5KUSB105A_SIO_SET_DATA,
+ USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_INTERFACE,
+ 0, /* value */
+ 0, /* index */
+ settings,
+ sizeof(struct klsi_105_port_settings),
+ KLSI_TIMEOUT);
+ if (rc < 0)
+ err("Change port settings failed (error = %d)", rc);
+ info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
+ __FUNCTION__,
+ settings->pktlen,
+ settings->baudrate, settings->databits,
+ settings->unknown1, settings->unknown2);
+ return rc;
+} /* klsi_105_chg_port_settings */
+
+/* translate a 16-bit status value from the device to linux's TIO bits */
+static unsigned long klsi_105_status2linestate(const __u16 status)
+{
+ unsigned long res = 0;
+
+ res = ((status & KL5KUSB105A_DSR) ? TIOCM_DSR : 0)
+ | ((status & KL5KUSB105A_CTS) ? TIOCM_CTS : 0)
+ ;
+
+ return res;
+}
+/*
+ * Read line control via vendor command and return result through
+ * *line_state_p
+ */
+/* It seems that the status buffer has always only 2 bytes length */
+#define KLSI_STATUSBUF_LEN 2
+static int klsi_105_get_line_state(struct usb_serial_port *port,
+ unsigned long *line_state_p)
+{
+ int rc;
+ __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1};
+ __u16 status;
+
+ info("%s - sending SIO Poll request", __FUNCTION__);
+ rc = usb_control_msg(port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0),
+ KL5KUSB105A_SIO_POLL,
+ USB_TYPE_VENDOR | USB_DIR_IN,
+ 0, /* value */
+ 0, /* index */
+ status_buf, KLSI_STATUSBUF_LEN,
+ 10000
+ );
+ if (rc < 0)
+ err("Reading line status failed (error = %d)", rc);
+ else {
+ status = status_buf[0] + (status_buf[1]<<8);
+
+ info("%s - read status %x %x", __FUNCTION__,
+ status_buf[0], status_buf[1]);
+
+ *line_state_p = klsi_105_status2linestate(status);
+ }
+
+ return rc;
+}
+
+
+/*
+ * Driver's tty interface functions
+ */
+
+static int klsi_105_startup (struct usb_serial *serial)
+{
+ struct klsi_105_private *priv;
+ int i;
+
+ /* check if we support the product id (see keyspan.c)
+ * FIXME
+ */
+
+ /* allocate the private data structure */
+ for (i=0; i<serial->num_ports; i++) {
+ int j;
+ priv = kmalloc(sizeof(struct klsi_105_private),
+ GFP_KERNEL);
+ if (!priv) {
+ dbg("%skmalloc for klsi_105_private failed.", __FUNCTION__);
+ return -ENOMEM;
+ }
+ /* set initial values for control structures */
+ priv->cfg.pktlen = 5;
+ priv->cfg.baudrate = kl5kusb105a_sio_b9600;
+ priv->cfg.databits = kl5kusb105a_dtb_8;
+ priv->cfg.unknown1 = 0;
+ priv->cfg.unknown2 = 1;
+
+ priv->line_state = 0;
+
+ priv->bytes_in = 0;
+ priv->bytes_out = 0;
+ usb_set_serial_port_data(serial->port[i], priv);
+
+ spin_lock_init (&priv->lock);
+ for (j=0; j<NUM_URBS; j++) {
+ struct urb* urb = usb_alloc_urb(0, GFP_KERNEL);
+
+ priv->write_urb_pool[j] = urb;
+ if (urb == NULL) {
+ err("No more urbs???");
+ continue;
+ }
+
+ 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;
+ }
+ }
+
+ /* priv->termios is left uninitalized until port opening */
+ init_waitqueue_head(&serial->port[i]->write_wait);
+ }
+
+ return (0);
+} /* klsi_105_startup */
+
+
+static void klsi_105_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) {
+ struct klsi_105_private *priv = usb_get_serial_port_data(serial->port[i]);
+ unsigned long flags;
+
+ if (priv) {
+ /* kill our write urb pool */
+ int j;
+ struct urb **write_urbs = priv->write_urb_pool;
+ spin_lock_irqsave(&priv->lock,flags);
+
+ for (j = 0; j < NUM_URBS; j++) {
+ if (write_urbs[j]) {
+ /* FIXME - uncomment the following
+ * usb_kill_urb call when the host
+ * controllers get fixed to set
+ * urb->dev = NULL after the urb is
+ * finished. Otherwise this call
+ * oopses. */
+ /* usb_kill_urb(write_urbs[j]); */
+ if (write_urbs[j]->transfer_buffer)
+ kfree(write_urbs[j]->transfer_buffer);
+ usb_free_urb (write_urbs[j]);
+ }
+ }
+
+ spin_unlock_irqrestore (&priv->lock, flags);
+
+ kfree(priv);
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+ }
+} /* klsi_105_shutdown */
+
+static int klsi_105_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+ int retval = 0;
+ int rc;
+ int i;
+ unsigned long line_state;
+ struct klsi_105_port_settings cfg;
+ unsigned long flags;
+
+ dbg("%s port %d", __FUNCTION__, port->number);
+
+ /* force low_latency on so that our tty_push actually forces
+ * the data through
+ * port->tty->low_latency = 1; */
+
+ /* Do a defined restart:
+ * Set up sane default baud rate and send the 'READ_ON'
+ * vendor command.
+ * FIXME: set modem line control (how?)
+ * Then read the modem line control and store values in
+ * priv->line_state.
+ */
+ cfg.pktlen = 5;
+ cfg.baudrate = kl5kusb105a_sio_b9600;
+ cfg.databits = kl5kusb105a_dtb_8;
+ cfg.unknown1 = 0;
+ cfg.unknown2 = 1;
+ klsi_105_chg_port_settings(port, &cfg);
+
+ /* set up termios structure */
+ spin_lock_irqsave (&priv->lock, flags);
+ priv->termios.c_iflag = port->tty->termios->c_iflag;
+ priv->termios.c_oflag = port->tty->termios->c_oflag;
+ priv->termios.c_cflag = port->tty->termios->c_cflag;
+ priv->termios.c_lflag = port->tty->termios->c_lflag;
+ for (i=0; i<NCCS; i++)
+ priv->termios.c_cc[i] = port->tty->termios->c_cc[i];
+ priv->cfg.pktlen = cfg.pktlen;
+ priv->cfg.baudrate = cfg.baudrate;
+ priv->cfg.databits = cfg.databits;
+ priv->cfg.unknown1 = cfg.unknown1;
+ priv->cfg.unknown2 = cfg.unknown2;
+ spin_unlock_irqrestore (&priv->lock, flags);
+
+ /* READ_ON and urb submission */
+ usb_fill_bulk_urb(port->read_urb, port->serial->dev,
+ usb_rcvbulkpipe(port->serial->dev,
+ port->bulk_in_endpointAddress),
+ port->read_urb->transfer_buffer,
+ port->read_urb->transfer_buffer_length,
+ klsi_105_read_bulk_callback,
+ port);
+
+ rc = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ if (rc) {
+ err("%s - failed submitting read urb, error %d", __FUNCTION__, rc);
+ retval = rc;
+ goto exit;
+ }
+
+ rc = usb_control_msg(port->serial->dev,
+ usb_sndctrlpipe(port->serial->dev,0),
+ KL5KUSB105A_SIO_CONFIGURE,
+ USB_TYPE_VENDOR|USB_DIR_OUT|USB_RECIP_INTERFACE,
+ KL5KUSB105A_SIO_CONFIGURE_READ_ON,
+ 0, /* index */
+ NULL,
+ 0,
+ KLSI_TIMEOUT);
+ if (rc < 0) {
+ err("Enabling read failed (error = %d)", rc);
+ retval = rc;
+ } else
+ dbg("%s - enabled reading", __FUNCTION__);
+
+ rc = klsi_105_get_line_state(port, &line_state);
+ if (rc >= 0) {
+ spin_lock_irqsave (&priv->lock, flags);
+ priv->line_state = line_state;
+ spin_unlock_irqrestore (&priv->lock, flags);
+ dbg("%s - read line state 0x%lx", __FUNCTION__, line_state);
+ retval = 0;
+ } else
+ retval = rc;
+
+exit:
+ return retval;
+} /* klsi_105_open */
+
+
+static void klsi_105_close (struct usb_serial_port *port, struct file *filp)
+{
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+ int rc;
+
+ dbg("%s port %d", __FUNCTION__, port->number);
+
+ /* send READ_OFF */
+ rc = usb_control_msg (port->serial->dev,
+ usb_sndctrlpipe(port->serial->dev, 0),
+ KL5KUSB105A_SIO_CONFIGURE,
+ USB_TYPE_VENDOR | USB_DIR_OUT,
+ KL5KUSB105A_SIO_CONFIGURE_READ_OFF,
+ 0, /* index */
+ NULL, 0,
+ KLSI_TIMEOUT);
+ if (rc < 0)
+ err("Disabling read failed (error = %d)", rc);
+
+ /* shutdown our bulk reads and writes */
+ usb_kill_urb(port->write_urb);
+ usb_kill_urb(port->read_urb);
+ /* unlink our write pool */
+ /* FIXME */
+ /* wgg - do I need this? I think so. */
+ usb_kill_urb(port->interrupt_in_urb);
+ info("kl5kusb105 port stats: %ld bytes in, %ld bytes out", priv->bytes_in, priv->bytes_out);
+} /* klsi_105_close */
+
+
+/* We need to write a complete 64-byte data block and encode the
+ * number actually sent in the first double-byte, LSB-order. That
+ * leaves at most 62 bytes of payload.
+ */
+#define KLSI_105_DATA_OFFSET 2 /* in the bulk urb data block */
+
+
+static int klsi_105_write (struct usb_serial_port *port,
+ const unsigned char *buf, int count)
+{
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+ int result, size;
+ int bytes_sent=0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ while (count > 0) {
+ /* try to find a free urb (write 0 bytes if none) */
+ struct urb *urb = NULL;
+ unsigned long flags;
+ int i;
+ /* since the pool is per-port we might not need the spin lock !? */
+ spin_lock_irqsave (&priv->lock, flags);
+ for (i=0; i<NUM_URBS; i++) {
+ if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
+ urb = priv->write_urb_pool[i];
+ dbg("%s - using pool URB %d", __FUNCTION__, i);
+ break;
+ }
+ }
+ spin_unlock_irqrestore (&priv->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;
+ }
+ }
+
+ size = min (count, port->bulk_out_size - KLSI_105_DATA_OFFSET);
+ size = min (size, URB_TRANSFER_BUFFER_SIZE - KLSI_105_DATA_OFFSET);
+
+ memcpy (urb->transfer_buffer + KLSI_105_DATA_OFFSET, buf, size);
+
+ /* write payload size into transfer buffer */
+ ((__u8 *)urb->transfer_buffer)[0] = (__u8) (size & 0xFF);
+ ((__u8 *)urb->transfer_buffer)[1] = (__u8) ((size & 0xFF00)>>8);
+
+ /* set up our urb */
+ usb_fill_bulk_urb(urb, port->serial->dev,
+ usb_sndbulkpipe(port->serial->dev,
+ port->bulk_out_endpointAddress),
+ urb->transfer_buffer,
+ URB_TRANSFER_BUFFER_SIZE,
+ klsi_105_write_bulk_callback,
+ port);
+
+ /* send the data out the bulk port */
+ result = usb_submit_urb(urb, GFP_ATOMIC);
+ if (result) {
+ err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+ goto exit;
+ }
+ buf += size;
+ bytes_sent += size;
+ count -= size;
+ }
+exit:
+ /* lockless, but it's for debug info only... */
+ priv->bytes_out+=bytes_sent;
+
+ return bytes_sent; /* that's how much we wrote */
+} /* klsi_105_write */
+
+static void klsi_105_write_bulk_callback ( struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__,
+ urb->status);
+ return;
+ }
+
+ /* from generic_write_bulk_callback */
+ schedule_work(&port->work);
+} /* klsi_105_write_bulk_completion_callback */
+
+
+/* return number of characters currently in the writing process */
+static int klsi_105_chars_in_buffer (struct usb_serial_port *port)
+{
+ int chars = 0;
+ int i;
+ unsigned long flags;
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+
+ spin_lock_irqsave (&priv->lock, flags);
+
+ for (i = 0; i < NUM_URBS; ++i) {
+ if (priv->write_urb_pool[i]->status == -EINPROGRESS) {
+ chars += URB_TRANSFER_BUFFER_SIZE;
+ }
+ }
+
+ spin_unlock_irqrestore (&priv->lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, chars);
+ return (chars);
+}
+
+static int klsi_105_write_room (struct usb_serial_port *port)
+{
+ unsigned long flags;
+ int i;
+ int room = 0;
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+
+ spin_lock_irqsave (&priv->lock, flags);
+ for (i = 0; i < NUM_URBS; ++i) {
+ if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
+ room += URB_TRANSFER_BUFFER_SIZE;
+ }
+ }
+
+ spin_unlock_irqrestore (&priv->lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, room);
+ return (room);
+}
+
+
+
+static void klsi_105_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+ int rc;
+
+ 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;
+ }
+
+ /* The data received is again preceded by a length double-byte in LSB-
+ * first order (see klsi_105_write() )
+ */
+ if (urb->actual_length == 0) {
+ /* empty urbs seem to happen, we ignore them */
+ /* dbg("%s - emtpy URB", __FUNCTION__); */
+ ;
+ } else if (urb->actual_length <= 2) {
+ dbg("%s - size %d URB not understood", __FUNCTION__,
+ urb->actual_length);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+ urb->actual_length, data);
+ } else {
+ int i;
+ int bytes_sent = ((__u8 *) data)[0] +
+ ((unsigned int) ((__u8 *) data)[1] << 8);
+ tty = port->tty;
+ /* we should immediately resubmit the URB, before attempting
+ * to pass the data on to the tty layer. But that needs locking
+ * against re-entry an then mixed-up data because of
+ * intermixed tty_flip_buffer_push()s
+ * FIXME
+ */
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+ urb->actual_length, data);
+
+ if (bytes_sent + 2 > urb->actual_length) {
+ dbg("%s - trying to read more data than available"
+ " (%d vs. %d)", __FUNCTION__,
+ bytes_sent+2, urb->actual_length);
+ /* cap at implied limit */
+ bytes_sent = urb->actual_length - 2;
+ }
+
+ for (i = 2; i < 2+bytes_sent; i++) {
+ /* if we insert more than TTY_FLIPBUF_SIZE characters,
+ * we drop them. */
+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ /* this doesn't actually push the data through unless
+ * tty->low_latency is set */
+ tty_insert_flip_char(tty, ((__u8*) data)[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+
+ /* again lockless, but debug info only */
+ priv->bytes_in += bytes_sent;
+ }
+ /* Continue trying to always read */
+ usb_fill_bulk_urb(port->read_urb, port->serial->dev,
+ usb_rcvbulkpipe(port->serial->dev,
+ port->bulk_in_endpointAddress),
+ port->read_urb->transfer_buffer,
+ port->read_urb->transfer_buffer_length,
+ klsi_105_read_bulk_callback,
+ port);
+ rc = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+ if (rc)
+ err("%s - failed resubmitting read urb, error %d", __FUNCTION__, rc);
+} /* klsi_105_read_bulk_callback */
+
+
+static void klsi_105_set_termios (struct usb_serial_port *port,
+ struct termios *old_termios)
+{
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+ unsigned int iflag = port->tty->termios->c_iflag;
+ unsigned int old_iflag = old_termios->c_iflag;
+ unsigned int cflag = port->tty->termios->c_cflag;
+ unsigned int old_cflag = old_termios->c_cflag;
+ struct klsi_105_port_settings cfg;
+ unsigned long flags;
+
+ /* lock while we are modifying the settings */
+ spin_lock_irqsave (&priv->lock, flags);
+
+ /*
+ * Update baud rate
+ */
+ 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__);
+#if 0
+ priv->control_state |= TIOCM_DTR;
+ /* don't set RTS if using hardware flow control */
+ if (!(old_cflag & CRTSCTS)) {
+ priv->control_state |= TIOCM_RTS;
+ }
+ mct_u232_set_modem_ctrl(serial, priv->control_state);
+#endif
+ }
+
+ switch(cflag & CBAUD) {
+ case B0: /* handled below */
+ break;
+ case B1200: priv->cfg.baudrate = kl5kusb105a_sio_b1200;
+ break;
+ case B2400: priv->cfg.baudrate = kl5kusb105a_sio_b2400;
+ break;
+ case B4800: priv->cfg.baudrate = kl5kusb105a_sio_b4800;
+ break;
+ case B9600: priv->cfg.baudrate = kl5kusb105a_sio_b9600;
+ break;
+ case B19200: priv->cfg.baudrate = kl5kusb105a_sio_b19200;
+ break;
+ case B38400: priv->cfg.baudrate = kl5kusb105a_sio_b38400;
+ break;
+ case B57600: priv->cfg.baudrate = kl5kusb105a_sio_b57600;
+ break;
+ case B115200: priv->cfg.baudrate = kl5kusb105a_sio_b115200;
+ break;
+ default:
+ err("KLSI USB->Serial converter:"
+ " unsupported baudrate request, using default"
+ " of 9600");
+ priv->cfg.baudrate = kl5kusb105a_sio_b9600;
+ break;
+ }
+ if ((cflag & CBAUD) == B0 ) {
+ dbg("%s: baud is B0", __FUNCTION__);
+ /* Drop RTS and DTR */
+ /* maybe this should be simulated by sending read
+ * disable and read enable messages?
+ */
+ ;
+#if 0
+ priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS);
+ mct_u232_set_modem_ctrl(serial, priv->control_state);
+#endif
+ }
+ }
+
+ if ((cflag & CSIZE) != (old_cflag & CSIZE)) {
+ /* set the number of data bits */
+ switch (cflag & CSIZE) {
+ case CS5:
+ dbg("%s - 5 bits/byte not supported", __FUNCTION__);
+ spin_unlock_irqrestore (&priv->lock, flags);
+ return ;
+ case CS6:
+ dbg("%s - 6 bits/byte not supported", __FUNCTION__);
+ spin_unlock_irqrestore (&priv->lock, flags);
+ return ;
+ case CS7:
+ priv->cfg.databits = kl5kusb105a_dtb_7;
+ break;
+ case CS8:
+ priv->cfg.databits = kl5kusb105a_dtb_8;
+ break;
+ default:
+ err("CSIZE was not CS5-CS8, using default of 8");
+ priv->cfg.databits = kl5kusb105a_dtb_8;
+ break;
+ }
+ }
+
+ /*
+ * Update line control register (LCR)
+ */
+ if ((cflag & (PARENB|PARODD)) != (old_cflag & (PARENB|PARODD))
+ || (cflag & CSTOPB) != (old_cflag & CSTOPB) ) {
+
+#if 0
+ priv->last_lcr = 0;
+
+ /* set the parity */
+ if (cflag & PARENB)
+ priv->last_lcr |= (cflag & PARODD) ?
+ MCT_U232_PARITY_ODD : MCT_U232_PARITY_EVEN;
+ else
+ priv->last_lcr |= MCT_U232_PARITY_NONE;
+
+ /* set the number of stop bits */
+ priv->last_lcr |= (cflag & CSTOPB) ?
+ MCT_U232_STOP_BITS_2 : MCT_U232_STOP_BITS_1;
+
+ mct_u232_set_line_ctrl(serial, priv->last_lcr);
+#endif
+ ;
+ }
+
+ /*
+ * Set flow control: well, I do not really now how to handle DTR/RTS.
+ * Just do what we have seen with SniffUSB on Win98.
+ */
+ if( (iflag & IXOFF) != (old_iflag & IXOFF)
+ || (iflag & IXON) != (old_iflag & IXON)
+ || (cflag & CRTSCTS) != (old_cflag & CRTSCTS) ) {
+
+ /* Drop DTR/RTS if no flow control otherwise assert */
+#if 0
+ if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS) )
+ priv->control_state |= TIOCM_DTR | TIOCM_RTS;
+ else
+ priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS);
+ mct_u232_set_modem_ctrl(serial, priv->control_state);
+#endif
+ ;
+ }
+ memcpy (&cfg, &priv->cfg, sizeof(cfg));
+ spin_unlock_irqrestore (&priv->lock, flags);
+
+ /* now commit changes to device */
+ klsi_105_chg_port_settings(port, &cfg);
+} /* klsi_105_set_termios */
+
+
+#if 0
+static void mct_u232_break_ctl( struct usb_serial_port *port, int break_state )
+{
+ struct usb_serial *serial = port->serial;
+ 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;
+
+ mct_u232_set_line_ctrl(serial, lcr);
+} /* mct_u232_break_ctl */
+#endif
+
+static int klsi_105_tiocmget (struct usb_serial_port *port, struct file *file)
+{
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ int rc;
+ unsigned long line_state;
+ dbg("%s - request, just guessing", __FUNCTION__);
+
+ rc = klsi_105_get_line_state(port, &line_state);
+ if (rc < 0) {
+ err("Reading line control failed (error = %d)", rc);
+ /* better return value? EAGAIN? */
+ return rc;
+ }
+
+ spin_lock_irqsave (&priv->lock, flags);
+ priv->line_state = line_state;
+ spin_unlock_irqrestore (&priv->lock, flags);
+ dbg("%s - read line state 0x%lx", __FUNCTION__, line_state);
+ return (int)line_state;
+}
+
+static int klsi_105_tiocmset (struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ int retval = -EINVAL;
+
+ dbg("%s", __FUNCTION__);
+
+/* if this ever gets implemented, it should be done something like this:
+ struct usb_serial *serial = port->serial;
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ int control;
+
+ spin_lock_irqsave (&priv->lock, flags);
+ if (set & TIOCM_RTS)
+ priv->control_state |= TIOCM_RTS;
+ if (set & TIOCM_DTR)
+ priv->control_state |= TIOCM_DTR;
+ if (clear & TIOCM_RTS)
+ priv->control_state &= ~TIOCM_RTS;
+ if (clear & TIOCM_DTR)
+ priv->control_state &= ~TIOCM_DTR;
+ control = priv->control_state;
+ spin_unlock_irqrestore (&priv->lock, flags);
+ retval = mct_u232_set_modem_ctrl(serial, control);
+*/
+ return retval;
+}
+
+static int klsi_105_ioctl (struct usb_serial_port *port, struct file * file,
+ unsigned int cmd, unsigned long arg)
+{
+ struct klsi_105_private *priv = usb_get_serial_port_data(port);
+ void __user *user_arg = (void __user *)arg;
+
+ dbg("%scmd=0x%x", __FUNCTION__, cmd);
+
+ /* Based on code from acm.c and others */
+ switch (cmd) {
+ case TIOCMIWAIT:
+ /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
+ /* TODO */
+ dbg("%s - TIOCMIWAIT not handled", __FUNCTION__);
+ return -ENOIOCTLCMD;
+ case TIOCGICOUNT:
+ /* return count of modemline transitions */
+ /* TODO */
+ dbg("%s - TIOCGICOUNT not handled", __FUNCTION__);
+ return -ENOIOCTLCMD;
+ case TCGETS:
+ /* return current info to caller */
+ dbg("%s - TCGETS data faked/incomplete", __FUNCTION__);
+
+ if (!access_ok(VERIFY_WRITE, user_arg, sizeof(struct termios)))
+ return -EFAULT;
+
+ if (kernel_termios_to_user_termios((struct termios __user *)arg,
+ &priv->termios))
+ return -EFAULT;
+ return 0;
+ case TCSETS:
+ /* set port termios to the one given by the user */
+ dbg("%s - TCSETS not handled", __FUNCTION__);
+
+ if (!access_ok(VERIFY_READ, user_arg, sizeof(struct termios)))
+ return -EFAULT;
+
+ if (user_termios_to_kernel_termios(&priv->termios,
+ (struct termios __user *)arg))
+ return -EFAULT;
+ klsi_105_set_termios(port, &priv->termios);
+ return 0;
+ case TCSETSW: {
+ /* set port termios and try to wait for completion of last
+ * write operation */
+ /* We guess here. If there are not too many write urbs
+ * outstanding, we lie. */
+ /* what is the right way to wait here? schedule() ? */
+ /*
+ while (klsi_105_chars_in_buffer(port) > (NUM_URBS / 4 ) * URB_TRANSFER_BUFFER_SIZE)
+ schedule();
+ */
+ return -ENOIOCTLCMD;
+ }
+ default:
+ dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd);
+ return(-ENOIOCTLCMD);
+ break;
+ }
+ return 0;
+} /* klsi_105_ioctl */
+
+static void klsi_105_throttle (struct usb_serial_port *port)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ usb_kill_urb(port->read_urb);
+}
+
+static void klsi_105_unthrottle (struct usb_serial_port *port)
+{
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ port->read_urb->dev = port->serial->dev;
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+ if (result)
+ err("%s - failed submitting read urb, error %d", __FUNCTION__,
+ result);
+}
+
+
+
+static int __init klsi_105_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&kl5kusb105d_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&kl5kusb105d_driver);
+ if (retval)
+ goto failed_usb_register;
+
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&kl5kusb105d_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+
+static void __exit klsi_105_exit (void)
+{
+ usb_deregister (&kl5kusb105d_driver);
+ usb_serial_deregister (&kl5kusb105d_device);
+}
+
+
+module_init (klsi_105_init);
+module_exit (klsi_105_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "enable extensive debugging messages");
+
+/* vim: set sts=8 ts=8 sw=8: */
diff --git a/drivers/usb/serial/kl5kusb105.h b/drivers/usb/serial/kl5kusb105.h
new file mode 100644
index 000000000000..1231d9e78398
--- /dev/null
+++ b/drivers/usb/serial/kl5kusb105.h
@@ -0,0 +1,69 @@
+/*
+ * Definitions for the KLSI KL5KUSB105 serial port adapter
+ */
+
+/* vendor/product pairs that are known to contain this chipset */
+#define PALMCONNECT_VID 0x0830
+#define PALMCONNECT_PID 0x0080
+
+#define KLSI_VID 0x05e9
+#define KLSI_KL5KUSB105D_PID 0x00c0
+
+/* Vendor commands: */
+
+
+/* port table -- the chip supports up to 4 channels */
+
+/* baud rates */
+
+enum {
+ kl5kusb105a_sio_b115200 = 0,
+ kl5kusb105a_sio_b57600 = 1,
+ kl5kusb105a_sio_b38400 = 2,
+ kl5kusb105a_sio_b19200 = 4,
+ kl5kusb105a_sio_b14400 = 5,
+ kl5kusb105a_sio_b9600 = 6,
+ kl5kusb105a_sio_b4800 = 8, /* unchecked */
+ kl5kusb105a_sio_b2400 = 9, /* unchecked */
+ kl5kusb105a_sio_b1200 = 0xa, /* unchecked */
+ kl5kusb105a_sio_b600 = 0xb /* unchecked */
+};
+
+/* data bits */
+#define kl5kusb105a_dtb_7 7
+#define kl5kusb105a_dtb_8 8
+
+
+
+/* requests: */
+#define KL5KUSB105A_SIO_SET_DATA 1
+#define KL5KUSB105A_SIO_POLL 2
+#define KL5KUSB105A_SIO_CONFIGURE 3
+/* values used for request KL5KUSB105A_SIO_CONFIGURE */
+#define KL5KUSB105A_SIO_CONFIGURE_READ_ON 3
+#define KL5KUSB105A_SIO_CONFIGURE_READ_OFF 2
+
+/* Interpretation of modem status lines */
+/* These need sorting out by individually connecting pins and checking
+ * results. FIXME!
+ * When data is being sent we see 0x30 in the lower byte; this must
+ * contain DSR and CTS ...
+ */
+#define KL5KUSB105A_DSR ((1<<4) | (1<<5))
+#define KL5KUSB105A_CTS ((1<<5) | (1<<4))
+
+#define KL5KUSB105A_WANTS_TO_SEND 0x30
+//#define KL5KUSB105A_DTR /* Data Terminal Ready */
+//#define KL5KUSB105A_CTS /* Clear To Send */
+//#define KL5KUSB105A_CD /* Carrier Detect */
+//#define KL5KUSB105A_DSR /* Data Set Ready */
+//#define KL5KUSB105A_RxD /* Receive pin */
+
+//#define KL5KUSB105A_LE
+//#define KL5KUSB105A_RTS
+//#define KL5KUSB105A_ST
+//#define KL5KUSB105A_SR
+//#define KL5KUSB105A_RI /* Ring Indicator */
+
+/* vim: set ts=8 sts=8: */
+
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
new file mode 100644
index 000000000000..fe4c98a75171
--- /dev/null
+++ b/drivers/usb/serial/kobil_sct.c
@@ -0,0 +1,774 @@
+/*
+ * KOBIL USB Smart Card Terminal Driver
+ *
+ * Copyright (C) 2002 KOBIL Systems GmbH
+ * Author: Thomas Wahrenbruch
+ *
+ * Contact: linuxusb@kobil.de
+ *
+ * This program is largely derived from work by the linux-usb group
+ * and associated source files. Please see the usb/serial files for
+ * individual credits and copyrights.
+ *
+ * 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.
+ *
+ * Thanks to Greg Kroah-Hartman (greg@kroah.com) for his help and
+ * patience.
+ *
+ * Supported readers: USB TWIN, KAAN Standard Plus and SecOVID Reader Plus
+ * (Adapter K), B1 Professional and KAAN Professional (Adapter B)
+ *
+ * (21/05/2004) tw
+ * Fix bug with P'n'P readers
+ *
+ * (28/05/2003) tw
+ * Add support for KAAN SIM
+ *
+ * (12/09/2002) tw
+ * Adapted to 2.5.
+ *
+ * (11/08/2002) tw
+ * Initial version.
+ */
+
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include <linux/ioctl.h>
+#include "usb-serial.h"
+#include "kobil_sct.h"
+
+static int debug;
+
+/* Version Information */
+#define DRIVER_VERSION "21/05/2004"
+#define DRIVER_AUTHOR "KOBIL Systems GmbH - http://www.kobil.com"
+#define DRIVER_DESC "KOBIL USB Smart Card Terminal Driver (experimental)"
+
+#define KOBIL_VENDOR_ID 0x0D46
+#define KOBIL_ADAPTER_B_PRODUCT_ID 0x2011
+#define KOBIL_ADAPTER_K_PRODUCT_ID 0x2012
+#define KOBIL_USBTWIN_PRODUCT_ID 0x0078
+#define KOBIL_KAAN_SIM_PRODUCT_ID 0x0081
+
+#define KOBIL_TIMEOUT 500
+#define KOBIL_BUF_LENGTH 300
+
+
+/* Function prototypes */
+static int kobil_startup (struct usb_serial *serial);
+static void kobil_shutdown (struct usb_serial *serial);
+static int kobil_open (struct usb_serial_port *port, struct file *filp);
+static void kobil_close (struct usb_serial_port *port, struct file *filp);
+static int kobil_write (struct usb_serial_port *port,
+ const unsigned char *buf, int count);
+static int kobil_write_room(struct usb_serial_port *port);
+static int kobil_ioctl(struct usb_serial_port *port, struct file *file,
+ unsigned int cmd, unsigned long arg);
+static int kobil_tiocmget(struct usb_serial_port *port, struct file *file);
+static int kobil_tiocmset(struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear);
+static void kobil_read_int_callback( struct urb *urb, struct pt_regs *regs );
+static void kobil_write_callback( struct urb *purb, struct pt_regs *regs );
+
+
+static struct usb_device_id id_table [] = {
+ { USB_DEVICE(KOBIL_VENDOR_ID, KOBIL_ADAPTER_B_PRODUCT_ID) },
+ { USB_DEVICE(KOBIL_VENDOR_ID, KOBIL_ADAPTER_K_PRODUCT_ID) },
+ { USB_DEVICE(KOBIL_VENDOR_ID, KOBIL_USBTWIN_PRODUCT_ID) },
+ { USB_DEVICE(KOBIL_VENDOR_ID, KOBIL_KAAN_SIM_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver kobil_driver = {
+ .owner = THIS_MODULE,
+ .name = "kobil",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table,
+};
+
+
+static struct usb_serial_device_type kobil_device = {
+ .owner = THIS_MODULE,
+ .name = "KOBIL USB smart card terminal",
+ .id_table = id_table,
+ .num_interrupt_in = NUM_DONT_CARE,
+ .num_bulk_in = 0,
+ .num_bulk_out = 0,
+ .num_ports = 1,
+ .attach = kobil_startup,
+ .shutdown = kobil_shutdown,
+ .ioctl = kobil_ioctl,
+ .tiocmget = kobil_tiocmget,
+ .tiocmset = kobil_tiocmset,
+ .open = kobil_open,
+ .close = kobil_close,
+ .write = kobil_write,
+ .write_room = kobil_write_room,
+ .read_int_callback = kobil_read_int_callback,
+};
+
+
+struct kobil_private {
+ int write_int_endpoint_address;
+ int read_int_endpoint_address;
+ unsigned char buf[KOBIL_BUF_LENGTH]; // buffer for the APDU to send
+ int filled; // index of the last char in buf
+ int cur_pos; // index of the next char to send in buf
+ __u16 device_type;
+ int line_state;
+ struct termios internal_termios;
+};
+
+
+static int kobil_startup (struct usb_serial *serial)
+{
+ int i;
+ struct kobil_private *priv;
+ struct usb_device *pdev;
+ struct usb_host_config *actconfig;
+ struct usb_interface *interface;
+ struct usb_host_interface *altsetting;
+ struct usb_host_endpoint *endpoint;
+
+ priv = kmalloc(sizeof(struct kobil_private), GFP_KERNEL);
+ if (!priv){
+ return -ENOMEM;
+ }
+
+ priv->filled = 0;
+ priv->cur_pos = 0;
+ priv->device_type = le16_to_cpu(serial->dev->descriptor.idProduct);
+ priv->line_state = 0;
+
+ switch (priv->device_type){
+ case KOBIL_ADAPTER_B_PRODUCT_ID:
+ printk(KERN_DEBUG "KOBIL B1 PRO / KAAN PRO detected\n");
+ break;
+ case KOBIL_ADAPTER_K_PRODUCT_ID:
+ printk(KERN_DEBUG "KOBIL KAAN Standard Plus / SecOVID Reader Plus detected\n");
+ break;
+ case KOBIL_USBTWIN_PRODUCT_ID:
+ printk(KERN_DEBUG "KOBIL USBTWIN detected\n");
+ break;
+ case KOBIL_KAAN_SIM_PRODUCT_ID:
+ printk(KERN_DEBUG "KOBIL KAAN SIM detected\n");
+ break;
+ }
+ usb_set_serial_port_data(serial->port[0], priv);
+
+ // search for the necessary endpoints
+ pdev = serial->dev;
+ actconfig = pdev->actconfig;
+ interface = actconfig->interface[0];
+ altsetting = interface->cur_altsetting;
+ endpoint = altsetting->endpoint;
+
+ for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
+ endpoint = &altsetting->endpoint[i];
+ if (((endpoint->desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) &&
+ ((endpoint->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
+ dbg("%s Found interrupt out endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
+ priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress;
+ }
+ if (((endpoint->desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) &&
+ ((endpoint->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
+ dbg("%s Found interrupt in endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
+ priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress;
+ }
+ }
+ return 0;
+}
+
+
+static void kobil_shutdown (struct usb_serial *serial)
+{
+ int i;
+ dbg("%s - port %d", __FUNCTION__, serial->port[0]->number);
+
+ for (i=0; i < serial->num_ports; ++i) {
+ while (serial->port[i]->open_count > 0) {
+ kobil_close (serial->port[i], NULL);
+ }
+ kfree(usb_get_serial_port_data(serial->port[i]));
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+}
+
+
+static int kobil_open (struct usb_serial_port *port, struct file *filp)
+{
+ int i, result = 0;
+ struct kobil_private *priv;
+ unsigned char *transfer_buffer;
+ int transfer_buffer_length = 8;
+ int write_urb_transfer_buffer_length = 8;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ priv = usb_get_serial_port_data(port);
+ priv->line_state = 0;
+
+ // someone sets the dev to 0 if the close method has been called
+ port->interrupt_in_urb->dev = port->serial->dev;
+
+
+ /* 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;
+
+ // without this, every push_tty_char is echoed :-(
+ port->tty->termios->c_lflag = 0;
+ port->tty->termios->c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE);
+ port->tty->termios->c_iflag = IGNBRK | IGNPAR | IXOFF;
+ port->tty->termios->c_oflag &= ~ONLCR; // do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D)
+
+ // set up internal termios structure
+ priv->internal_termios.c_iflag = port->tty->termios->c_iflag;
+ priv->internal_termios.c_oflag = port->tty->termios->c_oflag;
+ priv->internal_termios.c_cflag = port->tty->termios->c_cflag;
+ priv->internal_termios.c_lflag = port->tty->termios->c_lflag;
+
+ for (i=0; i<NCCS; i++) {
+ priv->internal_termios.c_cc[i] = port->tty->termios->c_cc[i];
+ }
+
+ // allocate memory for transfer buffer
+ transfer_buffer = (unsigned char *) kmalloc(transfer_buffer_length, GFP_KERNEL);
+ if (! transfer_buffer) {
+ return -ENOMEM;
+ } else {
+ memset(transfer_buffer, 0, transfer_buffer_length);
+ }
+
+ // allocate write_urb
+ if (!port->write_urb) {
+ dbg("%s - port %d Allocating port->write_urb", __FUNCTION__, port->number);
+ port->write_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!port->write_urb) {
+ dbg("%s - port %d usb_alloc_urb failed", __FUNCTION__, port->number);
+ kfree(transfer_buffer);
+ return -ENOMEM;
+ }
+ }
+
+ // allocate memory for write_urb transfer buffer
+ port->write_urb->transfer_buffer = (unsigned char *) kmalloc(write_urb_transfer_buffer_length, GFP_KERNEL);
+ if (! port->write_urb->transfer_buffer) {
+ kfree(transfer_buffer);
+ usb_free_urb(port->write_urb);
+ port->write_urb = NULL;
+ return -ENOMEM;
+ }
+
+ // get hardware version
+ result = usb_control_msg( port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0 ),
+ SUSBCRequest_GetMisc,
+ USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_IN,
+ SUSBCR_MSC_GetHWVersion,
+ 0,
+ transfer_buffer,
+ transfer_buffer_length,
+ KOBIL_TIMEOUT
+ );
+ dbg("%s - port %d Send get_HW_version URB returns: %i", __FUNCTION__, port->number, result);
+ dbg("Harware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
+
+ // get firmware version
+ result = usb_control_msg( port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0 ),
+ SUSBCRequest_GetMisc,
+ USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_IN,
+ SUSBCR_MSC_GetFWVersion,
+ 0,
+ transfer_buffer,
+ transfer_buffer_length,
+ KOBIL_TIMEOUT
+ );
+ dbg("%s - port %d Send get_FW_version URB returns: %i", __FUNCTION__, port->number, result);
+ dbg("Firmware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
+
+ if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) {
+ // Setting Baudrate, Parity and Stopbits
+ result = usb_control_msg( port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0 ),
+ SUSBCRequest_SetBaudRateParityAndStopBits,
+ USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_OUT,
+ SUSBCR_SBR_9600 | SUSBCR_SPASB_EvenParity | SUSBCR_SPASB_1StopBit,
+ 0,
+ transfer_buffer,
+ 0,
+ KOBIL_TIMEOUT
+ );
+ dbg("%s - port %d Send set_baudrate URB returns: %i", __FUNCTION__, port->number, result);
+
+ // reset all queues
+ result = usb_control_msg( port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0 ),
+ SUSBCRequest_Misc,
+ USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_OUT,
+ SUSBCR_MSC_ResetAllQueues,
+ 0,
+ transfer_buffer,
+ 0,
+ KOBIL_TIMEOUT
+ );
+ dbg("%s - port %d Send reset_all_queues URB returns: %i", __FUNCTION__, port->number, result);
+ }
+ if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID ||
+ priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) {
+ // start reading (Adapter B 'cause PNP string)
+ result = usb_submit_urb( port->interrupt_in_urb, GFP_ATOMIC );
+ dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result);
+ }
+
+ kfree(transfer_buffer);
+ return 0;
+}
+
+
+static void kobil_close (struct usb_serial_port *port, struct file *filp)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (port->write_urb) {
+ usb_kill_urb(port->write_urb);
+ usb_free_urb( port->write_urb );
+ port->write_urb = NULL;
+ }
+ if (port->interrupt_in_urb)
+ usb_kill_urb(port->interrupt_in_urb);
+}
+
+
+static void kobil_read_int_callback( struct urb *purb, struct pt_regs *regs)
+{
+ int i;
+ int result;
+ struct usb_serial_port *port = (struct usb_serial_port *) purb->context;
+ struct tty_struct *tty;
+ unsigned char *data = purb->transfer_buffer;
+// char *dbg_data;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (purb->status) {
+ dbg("%s - port %d Read int status not zero: %d", __FUNCTION__, port->number, purb->status);
+ return;
+ }
+
+ tty = port->tty;
+ if (purb->actual_length) {
+
+ // BEGIN DEBUG
+ /*
+ dbg_data = (unsigned char *) kmalloc((3 * purb->actual_length + 10) * sizeof(char), GFP_KERNEL);
+ if (! dbg_data) {
+ return;
+ }
+ memset(dbg_data, 0, (3 * purb->actual_length + 10));
+ for (i = 0; i < purb->actual_length; i++) {
+ sprintf(dbg_data +3*i, "%02X ", data[i]);
+ }
+ dbg(" <-- %s", dbg_data );
+ kfree(dbg_data);
+ */
+ // END DEBUG
+
+ for (i = 0; i < purb->actual_length; ++i) {
+ // if we insert more than TTY_FLIPBUF_SIZE characters, we drop them.
+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ // this doesn't actually push the data through unless tty->low_latency is set
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+
+ // someone sets the dev to 0 if the close method has been called
+ port->interrupt_in_urb->dev = port->serial->dev;
+
+ result = usb_submit_urb( port->interrupt_in_urb, GFP_ATOMIC );
+ dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result);
+}
+
+
+static void kobil_write_callback( struct urb *purb, struct pt_regs *regs )
+{
+}
+
+
+static int kobil_write (struct usb_serial_port *port,
+ const unsigned char *buf, int count)
+{
+ int length = 0;
+ int result = 0;
+ int todo = 0;
+ struct kobil_private * priv;
+
+ if (count == 0) {
+ dbg("%s - port %d write request of 0 bytes", __FUNCTION__, port->number);
+ return 0;
+ }
+
+ priv = usb_get_serial_port_data(port);
+
+ if (count > (KOBIL_BUF_LENGTH - priv->filled)) {
+ dbg("%s - port %d Error: write request bigger than buffer size", __FUNCTION__, port->number);
+ return -ENOMEM;
+ }
+
+ // Copy data to buffer
+ memcpy (priv->buf + priv->filled, buf, count);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, priv->buf + priv->filled);
+
+ priv->filled = priv->filled + count;
+
+
+ // only send complete block. TWIN, KAAN SIM and adapter K use the same protocol.
+ if ( ((priv->device_type != KOBIL_ADAPTER_B_PRODUCT_ID) && (priv->filled > 2) && (priv->filled >= (priv->buf[1] + 3))) ||
+ ((priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID) && (priv->filled > 3) && (priv->filled >= (priv->buf[2] + 4))) ) {
+
+ // stop reading (except TWIN and KAAN SIM)
+ if ( (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID) || (priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) )
+ usb_kill_urb(port->interrupt_in_urb);
+
+ todo = priv->filled - priv->cur_pos;
+
+ while(todo > 0) {
+ // max 8 byte in one urb (endpoint size)
+ length = (todo < 8) ? todo : 8;
+ // copy data to transfer buffer
+ memcpy(port->write_urb->transfer_buffer, priv->buf + priv->cur_pos, length );
+ usb_fill_int_urb( port->write_urb,
+ port->serial->dev,
+ usb_sndintpipe(port->serial->dev, priv->write_int_endpoint_address),
+ port->write_urb->transfer_buffer,
+ length,
+ kobil_write_callback,
+ port,
+ 8
+ );
+
+ priv->cur_pos = priv->cur_pos + length;
+ result = usb_submit_urb( port->write_urb, GFP_NOIO );
+ dbg("%s - port %d Send write URB returns: %i", __FUNCTION__, port->number, result);
+ todo = priv->filled - priv->cur_pos;
+
+ if (todo > 0) {
+ msleep(24);
+ }
+
+ } // end while
+
+ priv->filled = 0;
+ priv->cur_pos = 0;
+
+ // someone sets the dev to 0 if the close method has been called
+ port->interrupt_in_urb->dev = port->serial->dev;
+
+ // start reading (except TWIN and KAAN SIM)
+ if ( (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID) || (priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) ) {
+ // someone sets the dev to 0 if the close method has been called
+ port->interrupt_in_urb->dev = port->serial->dev;
+
+ result = usb_submit_urb( port->interrupt_in_urb, GFP_NOIO );
+ dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result);
+ }
+ }
+ return count;
+}
+
+
+static int kobil_write_room (struct usb_serial_port *port)
+{
+ //dbg("%s - port %d", __FUNCTION__, port->number);
+ return 8;
+}
+
+
+static int kobil_tiocmget(struct usb_serial_port *port, struct file *file)
+{
+ struct kobil_private * priv;
+ int result;
+ unsigned char *transfer_buffer;
+ int transfer_buffer_length = 8;
+
+ priv = usb_get_serial_port_data(port);
+ if ((priv->device_type == KOBIL_USBTWIN_PRODUCT_ID) || (priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID)) {
+ // This device doesn't support ioctl calls
+ return -EINVAL;
+ }
+
+ // allocate memory for transfer buffer
+ transfer_buffer = (unsigned char *) kmalloc(transfer_buffer_length, GFP_KERNEL);
+ if (!transfer_buffer) {
+ return -ENOMEM;
+ }
+ memset(transfer_buffer, 0, transfer_buffer_length);
+
+ result = usb_control_msg( port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0 ),
+ SUSBCRequest_GetStatusLineState,
+ USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_IN,
+ 0,
+ 0,
+ transfer_buffer,
+ transfer_buffer_length,
+ KOBIL_TIMEOUT);
+
+ dbg("%s - port %d Send get_status_line_state URB returns: %i. Statusline: %02x",
+ __FUNCTION__, port->number, result, transfer_buffer[0]);
+
+ if ((transfer_buffer[0] & SUSBCR_GSL_DSR) != 0) {
+ priv->line_state |= TIOCM_DSR;
+ } else {
+ priv->line_state &= ~TIOCM_DSR;
+ }
+
+ kfree(transfer_buffer);
+ return priv->line_state;
+}
+
+static int kobil_tiocmset(struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct kobil_private * priv;
+ int result;
+ int dtr = 0;
+ int rts = 0;
+ unsigned char *transfer_buffer;
+ int transfer_buffer_length = 8;
+
+ priv = usb_get_serial_port_data(port);
+ if ((priv->device_type == KOBIL_USBTWIN_PRODUCT_ID) || (priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID)) {
+ // This device doesn't support ioctl calls
+ return -EINVAL;
+ }
+
+ // allocate memory for transfer buffer
+ transfer_buffer = (unsigned char *) kmalloc(transfer_buffer_length, GFP_KERNEL);
+ if (! transfer_buffer) {
+ return -ENOMEM;
+ }
+ memset(transfer_buffer, 0, transfer_buffer_length);
+
+ if (set & TIOCM_RTS)
+ rts = 1;
+ if (set & TIOCM_DTR)
+ dtr = 1;
+ if (clear & TIOCM_RTS)
+ rts = 0;
+ if (clear & TIOCM_DTR)
+ dtr = 0;
+
+ if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID) {
+ if (dtr != 0)
+ dbg("%s - port %d Setting DTR", __FUNCTION__, port->number);
+ else
+ dbg("%s - port %d Clearing DTR", __FUNCTION__, port->number);
+ result = usb_control_msg( port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0 ),
+ SUSBCRequest_SetStatusLinesOrQueues,
+ USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_OUT,
+ ((dtr != 0) ? SUSBCR_SSL_SETDTR : SUSBCR_SSL_CLRDTR),
+ 0,
+ transfer_buffer,
+ 0,
+ KOBIL_TIMEOUT);
+ } else {
+ if (rts != 0)
+ dbg("%s - port %d Setting RTS", __FUNCTION__, port->number);
+ else
+ dbg("%s - port %d Clearing RTS", __FUNCTION__, port->number);
+ result = usb_control_msg( port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0 ),
+ SUSBCRequest_SetStatusLinesOrQueues,
+ USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_OUT,
+ ((rts != 0) ? SUSBCR_SSL_SETRTS : SUSBCR_SSL_CLRRTS),
+ 0,
+ transfer_buffer,
+ 0,
+ KOBIL_TIMEOUT);
+ }
+ dbg("%s - port %d Send set_status_line URB returns: %i", __FUNCTION__, port->number, result);
+ kfree(transfer_buffer);
+ return (result < 0) ? result : 0;
+}
+
+
+static int kobil_ioctl(struct usb_serial_port *port, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ struct kobil_private * priv;
+ int result;
+ unsigned short urb_val = 0;
+ unsigned char *transfer_buffer;
+ int transfer_buffer_length = 8;
+ char *settings;
+ void __user *user_arg = (void __user *)arg;
+
+ priv = usb_get_serial_port_data(port);
+ if ((priv->device_type == KOBIL_USBTWIN_PRODUCT_ID) || (priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID)) {
+ // This device doesn't support ioctl calls
+ return 0;
+ }
+
+ switch (cmd) {
+ case TCGETS: // 0x5401
+ if (!access_ok(VERIFY_WRITE, user_arg, sizeof(struct termios))) {
+ dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number);
+ return -EFAULT;
+ }
+ if (kernel_termios_to_user_termios((struct termios __user *)arg,
+ &priv->internal_termios))
+ return -EFAULT;
+ return 0;
+
+ case TCSETS: // 0x5402
+ if (!(port->tty->termios)) {
+ dbg("%s - port %d Error: port->tty->termios is NULL", __FUNCTION__, port->number);
+ return -ENOTTY;
+ }
+ if (!access_ok(VERIFY_READ, user_arg, sizeof(struct termios))) {
+ dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number);
+ return -EFAULT;
+ }
+ if (user_termios_to_kernel_termios(&priv->internal_termios,
+ (struct termios __user *)arg))
+ return -EFAULT;
+
+ settings = (unsigned char *) kmalloc(50, GFP_KERNEL);
+ if (! settings) {
+ return -ENOBUFS;
+ }
+ memset(settings, 0, 50);
+
+ switch (priv->internal_termios.c_cflag & CBAUD) {
+ case B1200:
+ urb_val = SUSBCR_SBR_1200;
+ strcat(settings, "1200 ");
+ break;
+ case B9600:
+ default:
+ urb_val = SUSBCR_SBR_9600;
+ strcat(settings, "9600 ");
+ break;
+ }
+
+ urb_val |= (priv->internal_termios.c_cflag & CSTOPB) ? SUSBCR_SPASB_2StopBits : SUSBCR_SPASB_1StopBit;
+ strcat(settings, (priv->internal_termios.c_cflag & CSTOPB) ? "2 StopBits " : "1 StopBit ");
+
+ if (priv->internal_termios.c_cflag & PARENB) {
+ if (priv->internal_termios.c_cflag & PARODD) {
+ urb_val |= SUSBCR_SPASB_OddParity;
+ strcat(settings, "Odd Parity");
+ } else {
+ urb_val |= SUSBCR_SPASB_EvenParity;
+ strcat(settings, "Even Parity");
+ }
+ } else {
+ urb_val |= SUSBCR_SPASB_NoParity;
+ strcat(settings, "No Parity");
+ }
+ dbg("%s - port %d setting port to: %s", __FUNCTION__, port->number, settings );
+
+ result = usb_control_msg( port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0 ),
+ SUSBCRequest_SetBaudRateParityAndStopBits,
+ USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_OUT,
+ urb_val,
+ 0,
+ settings,
+ 0,
+ KOBIL_TIMEOUT
+ );
+
+ dbg("%s - port %d Send set_baudrate URB returns: %i", __FUNCTION__, port->number, result);
+ kfree(settings);
+ return 0;
+
+ case TCFLSH: // 0x540B
+ transfer_buffer = (unsigned char *) kmalloc(transfer_buffer_length, GFP_KERNEL);
+ if (! transfer_buffer) {
+ return -ENOBUFS;
+ }
+
+ result = usb_control_msg( port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0 ),
+ SUSBCRequest_Misc,
+ USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_OUT,
+ SUSBCR_MSC_ResetAllQueues,
+ 0,
+ NULL,//transfer_buffer,
+ 0,
+ KOBIL_TIMEOUT
+ );
+
+ dbg("%s - port %d Send reset_all_queues (FLUSH) URB returns: %i", __FUNCTION__, port->number, result);
+
+ kfree(transfer_buffer);
+ return ((result < 0) ? -EFAULT : 0);
+
+ }
+ return -ENOIOCTLCMD;
+}
+
+
+static int __init kobil_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&kobil_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&kobil_driver);
+ if (retval)
+ goto failed_usb_register;
+
+ info(DRIVER_VERSION " " DRIVER_AUTHOR);
+ info(DRIVER_DESC);
+
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&kobil_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+
+static void __exit kobil_exit (void)
+{
+ usb_deregister (&kobil_driver);
+ usb_serial_deregister (&kobil_device);
+}
+
+module_init(kobil_init);
+module_exit(kobil_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE( "GPL" );
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/kobil_sct.h b/drivers/usb/serial/kobil_sct.h
new file mode 100644
index 000000000000..a51fbb5ae45c
--- /dev/null
+++ b/drivers/usb/serial/kobil_sct.h
@@ -0,0 +1,60 @@
+#define SUSBCRequest_SetBaudRateParityAndStopBits 1
+#define SUSBCR_SBR_MASK 0xFF00
+#define SUSBCR_SBR_1200 0x0100
+#define SUSBCR_SBR_9600 0x0200
+#define SUSBCR_SBR_19200 0x0400
+#define SUSBCR_SBR_28800 0x0800
+#define SUSBCR_SBR_38400 0x1000
+#define SUSBCR_SBR_57600 0x2000
+#define SUSBCR_SBR_115200 0x4000
+
+#define SUSBCR_SPASB_MASK 0x0070
+#define SUSBCR_SPASB_NoParity 0x0010
+#define SUSBCR_SPASB_OddParity 0x0020
+#define SUSBCR_SPASB_EvenParity 0x0040
+
+#define SUSBCR_SPASB_STPMASK 0x0003
+#define SUSBCR_SPASB_1StopBit 0x0001
+#define SUSBCR_SPASB_2StopBits 0x0002
+
+#define SUSBCRequest_SetStatusLinesOrQueues 2
+#define SUSBCR_SSL_SETRTS 0x0001
+#define SUSBCR_SSL_CLRRTS 0x0002
+#define SUSBCR_SSL_SETDTR 0x0004
+#define SUSBCR_SSL_CLRDTR 0x0010
+
+#define SUSBCR_SSL_PURGE_TXABORT 0x0100 // Kill the pending/current writes to the comm port.
+#define SUSBCR_SSL_PURGE_RXABORT 0x0200 // Kill the pending/current reads to the comm port.
+#define SUSBCR_SSL_PURGE_TXCLEAR 0x0400 // Kill the transmit queue if there.
+#define SUSBCR_SSL_PURGE_RXCLEAR 0x0800 // Kill the typeahead buffer if there.
+
+#define SUSBCRequest_GetStatusLineState 4
+#define SUSBCR_GSL_RXCHAR 0x0001 // Any Character received
+#define SUSBCR_GSL_TXEMPTY 0x0004 // Transmitt Queue Empty
+#define SUSBCR_GSL_CTS 0x0008 // CTS changed state
+#define SUSBCR_GSL_DSR 0x0010 // DSR changed state
+#define SUSBCR_GSL_RLSD 0x0020 // RLSD changed state
+#define SUSBCR_GSL_BREAK 0x0040 // BREAK received
+#define SUSBCR_GSL_ERR 0x0080 // Line status error occurred
+#define SUSBCR_GSL_RING 0x0100 // Ring signal detected
+
+#define SUSBCRequest_Misc 8
+#define SUSBCR_MSC_ResetReader 0x0001 // use a predefined reset sequence
+#define SUSBCR_MSC_ResetAllQueues 0x0002 // use a predefined sequence to reset the internal queues
+
+#define SUSBCRequest_GetMisc 0x10
+#define SUSBCR_MSC_GetFWVersion 0x0001 /* get the firmware version from device,
+ coded like this 0xHHLLBBPP
+ with HH = Firmware Version High Byte
+ LL = Firmware Version Low Byte
+ BB = Build Number
+ PP = Further Attributes
+ */
+
+#define SUSBCR_MSC_GetHWVersion 0x0002 /* get the hardware version from device
+ coded like this 0xHHLLPPRR
+ with HH = Software Version High Byte
+ LL = Software Version Low Byte
+ PP = Further Attributes
+ RR = Reserved for the hardware ID
+ */
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
new file mode 100644
index 000000000000..50b6369647d2
--- /dev/null
+++ b/drivers/usb/serial/mct_u232.c
@@ -0,0 +1,781 @@
+/*
+ * MCT (Magic Control Technology Corp.) USB RS232 Converter Driver
+ *
+ * Copyright (C) 2000 Wolfgang Grandegger (wolfgang@ces.ch)
+ *
+ * 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 largely derived from the Belkin USB Serial Adapter Driver
+ * (see belkin_sa.[ch]). All of the information about the device was acquired
+ * by using SniffUSB on Windows98. For technical details see mct_u232.h.
+ *
+ * William G. Greathouse and Greg Kroah-Hartman provided great help on how to
+ * do the reverse engineering and how to write a USB serial device driver.
+ *
+ * TO BE DONE, TO BE CHECKED:
+ * DTR/RTS signal handling may be incomplete or incorrect. I have mainly
+ * implemented what I have seen with SniffUSB or found in belkin_sa.c.
+ * For further TODOs check also belkin_sa.c.
+ *
+ * TEST STATUS:
+ * Basic tests have been performed with minicom/zmodem transfers and
+ * modem dialing under Linux 2.4.0-test10 (for me it works fine).
+ *
+ * 04-Nov-2003 Bill Marr <marr at flex dot com>
+ * - Mimic Windows driver by sending 2 USB 'device request' messages
+ * following normal 'baud rate change' message. This allows data to be
+ * transmitted to RS-232 devices which don't assert the 'CTS' signal.
+ *
+ * 10-Nov-2001 Wolfgang Grandegger
+ * - Fixed an endianess problem with the baudrate selection for PowerPC.
+ *
+ * 06-Dec-2001 Martin Hamilton <martinh@gnu.org>
+ * Added support for the Belkin F5U109 DB9 adaptor
+ *
+ * 30-May-2001 Greg Kroah-Hartman
+ * switched from using spinlock to a semaphore, which fixes lots of problems.
+ *
+ * 04-May-2001 Stelian Pop
+ * - Set the maximum bulk output size for Sitecom U232-P25 model to 16 bytes
+ * instead of the device reported 32 (using 32 bytes causes many data
+ * loss, Windows driver uses 16 too).
+ *
+ * 02-May-2001 Stelian Pop
+ * - Fixed the baud calculation for Sitecom U232-P25 model
+ *
+ * 08-Apr-2001 gb
+ * - Identify version on module load.
+ *
+ * 06-Jan-2001 Cornel Ciocirlan
+ * - Added support for Sitecom U232-P25 model (Product Id 0x0230)
+ * - Added support for D-Link DU-H3SP USB BAY (Product Id 0x0200)
+ *
+ * 29-Nov-2000 Greg Kroah-Hartman
+ * - Added device id table to fit with 2.4.0-test11 structure.
+ * - took out DEAL_WITH_TWO_INT_IN_ENDPOINTS #define as it's not needed
+ * (lots of things will change if/when the usb-serial core changes to
+ * handle these issues.
+ *
+ * 27-Nov-2000 Wolfgang Grandegger
+ * A version for kernel 2.4.0-test10 released to the Linux community
+ * (via linux-usb-devel).
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+#include "mct_u232.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "z2.0" /* Linux in-kernel version */
+#define DRIVER_AUTHOR "Wolfgang Grandegger <wolfgang@ces.ch>"
+#define DRIVER_DESC "Magic Control Technology USB-RS232 converter driver"
+
+static int debug;
+
+/*
+ * Function prototypes
+ */
+static int mct_u232_startup (struct usb_serial *serial);
+static void mct_u232_shutdown (struct usb_serial *serial);
+static int mct_u232_open (struct usb_serial_port *port,
+ struct file *filp);
+static void mct_u232_close (struct usb_serial_port *port,
+ struct file *filp);
+static void mct_u232_read_int_callback (struct urb *urb, struct pt_regs *regs);
+static void mct_u232_set_termios (struct usb_serial_port *port,
+ struct termios * old);
+static int mct_u232_ioctl (struct usb_serial_port *port,
+ struct file * file,
+ unsigned int cmd,
+ unsigned long arg);
+static void mct_u232_break_ctl (struct usb_serial_port *port,
+ int break_state );
+static int mct_u232_tiocmget (struct usb_serial_port *port,
+ struct file *file);
+static int mct_u232_tiocmset (struct usb_serial_port *port,
+ struct file *file, unsigned int set,
+ unsigned int clear);
+/*
+ * 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) },
+ { USB_DEVICE(MCT_U232_BELKIN_F5U109_VID, MCT_U232_BELKIN_F5U109_PID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
+static struct usb_driver mct_u232_driver = {
+ .owner = THIS_MODULE,
+ .name = "mct_u232",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table_combined,
+};
+
+static struct usb_serial_device_type mct_u232_device = {
+ .owner = THIS_MODULE,
+ .name = "MCT U232",
+ .short_name = "mct_u232",
+ .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,
+ .read_int_callback = mct_u232_read_int_callback,
+ .ioctl = mct_u232_ioctl,
+ .set_termios = mct_u232_set_termios,
+ .break_ctl = mct_u232_break_ctl,
+ .tiocmget = mct_u232_tiocmget,
+ .tiocmset = mct_u232_tiocmset,
+ .attach = mct_u232_startup,
+ .shutdown = mct_u232_shutdown,
+};
+
+
+struct mct_u232_private {
+ spinlock_t lock;
+ unsigned int control_state; /* Modem Line Setting (TIOCM) */
+ unsigned char last_lcr; /* Line Control Register */
+ unsigned char last_lsr; /* Line Status Register */
+ unsigned char last_msr; /* Modem Status Register */
+};
+
+/*
+ * Handle vendor specific USB requests
+ */
+
+#define WDR_TIMEOUT 5000 /* default urb timeout */
+
+/*
+ * Later day 2.6.0-test kernels have new baud rates like B230400 which
+ * we do not know how to support. We ignore them for the moment.
+ * XXX Rate-limit the error message, it's user triggerable.
+ */
+static int mct_u232_calculate_baud_rate(struct usb_serial *serial, int value)
+{
+ if (le16_to_cpu(serial->dev->descriptor.idProduct) == MCT_U232_SITECOM_PID
+ || le16_to_cpu(serial->dev->descriptor.idProduct) == MCT_U232_BELKIN_F5U109_PID) {
+ switch (value) {
+ case B300: return 0x01;
+ case B600: return 0x02; /* this one not tested */
+ case B1200: return 0x03;
+ case B2400: return 0x04;
+ case B4800: return 0x06;
+ case B9600: return 0x08;
+ case B19200: return 0x09;
+ case B38400: return 0x0a;
+ case B57600: return 0x0b;
+ case B115200: return 0x0c;
+ default:
+ err("MCT USB-RS232: unsupported baudrate request 0x%x,"
+ " using default of B9600", value);
+ return 0x08;
+ }
+ } else {
+ switch (value) {
+ case B300: value = 300; break;
+ case B600: value = 600; break;
+ case B1200: value = 1200; break;
+ case B2400: value = 2400; break;
+ case B4800: value = 4800; break;
+ case B9600: value = 9600; break;
+ case B19200: value = 19200; break;
+ case B38400: value = 38400; break;
+ case B57600: value = 57600; break;
+ case B115200: value = 115200; break;
+ default:
+ err("MCT USB-RS232: unsupported baudrate request 0x%x,"
+ " using default of B9600", value);
+ value = 9600;
+ }
+ return 115200/value;
+ }
+}
+
+static int mct_u232_set_baud_rate(struct usb_serial *serial, int value)
+{
+ __le32 divisor;
+ int rc;
+ unsigned char zero_byte = 0;
+
+ divisor = cpu_to_le32(mct_u232_calculate_baud_rate(serial, value));
+
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ MCT_U232_SET_BAUD_RATE_REQUEST,
+ MCT_U232_SET_REQUEST_TYPE,
+ 0, 0, &divisor, MCT_U232_SET_BAUD_RATE_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0)
+ err("Set BAUD RATE %d failed (error = %d)", value, rc);
+ dbg("set_baud_rate: value: 0x%x, divisor: 0x%x", value, divisor);
+
+ /* Mimic the MCT-supplied Windows driver (version 1.21P.0104), which
+ always sends two extra USB 'device request' messages after the
+ 'baud rate change' message. The actual functionality of the
+ request codes in these messages is not fully understood but these
+ particular codes are never seen in any operation besides a baud
+ rate change. Both of these messages send a single byte of data
+ whose value is always zero. The second of these two extra messages
+ is required in order for data to be properly written to an RS-232
+ device which does not assert the 'CTS' signal. */
+
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ MCT_U232_SET_UNKNOWN1_REQUEST,
+ MCT_U232_SET_REQUEST_TYPE,
+ 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN1_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0)
+ err("Sending USB device request code %d failed (error = %d)",
+ MCT_U232_SET_UNKNOWN1_REQUEST, rc);
+
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ MCT_U232_SET_UNKNOWN2_REQUEST,
+ MCT_U232_SET_REQUEST_TYPE,
+ 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN2_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0)
+ err("Sending USB device request code %d failed (error = %d)",
+ MCT_U232_SET_UNKNOWN2_REQUEST, rc);
+
+ return rc;
+} /* mct_u232_set_baud_rate */
+
+static int mct_u232_set_line_ctrl(struct usb_serial *serial, unsigned char lcr)
+{
+ int rc;
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ MCT_U232_SET_LINE_CTRL_REQUEST,
+ MCT_U232_SET_REQUEST_TYPE,
+ 0, 0, &lcr, MCT_U232_SET_LINE_CTRL_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0)
+ err("Set LINE CTRL 0x%x failed (error = %d)", lcr, rc);
+ dbg("set_line_ctrl: 0x%x", lcr);
+ return rc;
+} /* mct_u232_set_line_ctrl */
+
+static int mct_u232_set_modem_ctrl(struct usb_serial *serial,
+ unsigned int control_state)
+{
+ int rc;
+ unsigned char mcr = MCT_U232_MCR_NONE;
+
+ if (control_state & TIOCM_DTR)
+ mcr |= MCT_U232_MCR_DTR;
+ if (control_state & TIOCM_RTS)
+ mcr |= MCT_U232_MCR_RTS;
+
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ MCT_U232_SET_MODEM_CTRL_REQUEST,
+ MCT_U232_SET_REQUEST_TYPE,
+ 0, 0, &mcr, MCT_U232_SET_MODEM_CTRL_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0)
+ err("Set MODEM CTRL 0x%x failed (error = %d)", mcr, rc);
+ dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr);
+
+ return rc;
+} /* mct_u232_set_modem_ctrl */
+
+static int mct_u232_get_modem_stat(struct usb_serial *serial, unsigned char *msr)
+{
+ int rc;
+ rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
+ MCT_U232_GET_MODEM_STAT_REQUEST,
+ MCT_U232_GET_REQUEST_TYPE,
+ 0, 0, msr, MCT_U232_GET_MODEM_STAT_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0) {
+ err("Get MODEM STATus failed (error = %d)", rc);
+ *msr = 0;
+ }
+ dbg("get_modem_stat: 0x%x", *msr);
+ return rc;
+} /* mct_u232_get_modem_stat */
+
+static void mct_u232_msr_to_state(unsigned int *control_state, unsigned char msr)
+{
+ /* Translate Control Line states */
+ if (msr & MCT_U232_MSR_DSR)
+ *control_state |= TIOCM_DSR;
+ else
+ *control_state &= ~TIOCM_DSR;
+ if (msr & MCT_U232_MSR_CTS)
+ *control_state |= TIOCM_CTS;
+ else
+ *control_state &= ~TIOCM_CTS;
+ if (msr & MCT_U232_MSR_RI)
+ *control_state |= TIOCM_RI;
+ else
+ *control_state &= ~TIOCM_RI;
+ if (msr & MCT_U232_MSR_CD)
+ *control_state |= TIOCM_CD;
+ else
+ *control_state &= ~TIOCM_CD;
+ dbg("msr_to_state: msr=0x%x ==> state=0x%x", msr, *control_state);
+} /* mct_u232_msr_to_state */
+
+/*
+ * Driver's tty interface functions
+ */
+
+static int mct_u232_startup (struct usb_serial *serial)
+{
+ struct mct_u232_private *priv;
+ struct usb_serial_port *port, *rport;
+
+ priv = kmalloc(sizeof(struct mct_u232_private), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+ memset(priv, 0, sizeof(struct mct_u232_private));
+ spin_lock_init(&priv->lock);
+ usb_set_serial_port_data(serial->port[0], priv);
+
+ init_waitqueue_head(&serial->port[0]->write_wait);
+
+ /* Puh, that's dirty */
+ port = serial->port[0];
+ rport = serial->port[1];
+ if (port->read_urb) {
+ /* No unlinking, it wasn't submitted yet. */
+ usb_free_urb(port->read_urb);
+ }
+ port->read_urb = rport->interrupt_in_urb;
+ rport->interrupt_in_urb = NULL;
+ port->read_urb->context = port;
+
+ return (0);
+} /* mct_u232_startup */
+
+
+static void mct_u232_shutdown (struct usb_serial *serial)
+{
+ struct mct_u232_private *priv;
+ int i;
+
+ dbg("%s", __FUNCTION__);
+
+ for (i=0; i < serial->num_ports; ++i) {
+ /* My special items, the standard routines free my urbs */
+ priv = usb_get_serial_port_data(serial->port[i]);
+ if (priv) {
+ usb_set_serial_port_data(serial->port[i], NULL);
+ kfree(priv);
+ }
+ }
+} /* mct_u232_shutdown */
+
+static int mct_u232_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct usb_serial *serial = port->serial;
+ struct mct_u232_private *priv = usb_get_serial_port_data(port);
+ int retval = 0;
+ unsigned int control_state;
+ unsigned long flags;
+ unsigned char last_lcr;
+ unsigned char last_msr;
+
+ 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 (le16_to_cpu(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.
+ */
+ spin_lock_irqsave(&priv->lock, flags);
+ if (port->tty->termios->c_cflag & CBAUD)
+ priv->control_state = TIOCM_DTR | TIOCM_RTS;
+ else
+ priv->control_state = 0;
+
+ priv->last_lcr = (MCT_U232_DATA_BITS_8 |
+ MCT_U232_PARITY_NONE |
+ MCT_U232_STOP_BITS_1);
+ control_state = priv->control_state;
+ last_lcr = priv->last_lcr;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ mct_u232_set_modem_ctrl(serial, control_state);
+ mct_u232_set_line_ctrl(serial, last_lcr);
+
+ /* Read modem status and update control state */
+ mct_u232_get_modem_stat(serial, &last_msr);
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->last_msr = last_msr;
+ mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ port->read_urb->dev = port->serial->dev;
+ retval = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ if (retval) {
+ err("usb_submit_urb(read bulk) failed pipe 0x%x err %d",
+ port->read_urb->pipe, retval);
+ goto exit;
+ }
+
+ port->interrupt_in_urb->dev = port->serial->dev;
+ retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
+ if (retval)
+ err(" usb_submit_urb(read int) failed pipe 0x%x err %d",
+ port->interrupt_in_urb->pipe, retval);
+
+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_kill_urb(port->write_urb);
+ usb_kill_urb(port->read_urb);
+ usb_kill_urb(port->interrupt_in_urb);
+ }
+} /* mct_u232_close */
+
+
+static void mct_u232_read_int_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct mct_u232_private *priv = usb_get_serial_port_data(port);
+ struct usb_serial *serial = port->serial;
+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+ int status;
+ unsigned long flags;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ if (!serial) {
+ dbg("%s - bad serial pointer, exiting", __FUNCTION__);
+ return;
+ }
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+
+ /*
+ * Work-a-round: handle the 'usual' bulk-in pipe here
+ */
+ if (urb->transfer_buffer_length > 2) {
+ int i;
+ tty = port->tty;
+ if (urb->actual_length) {
+ for (i = 0; i < urb->actual_length ; ++i) {
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+ goto exit;
+ }
+
+ /*
+ * The interrupt-in pipe signals exceptional conditions (modem line
+ * signal changes and errors). data[0] holds MSR, data[1] holds LSR.
+ */
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->last_msr = data[MCT_U232_MSR_INDEX];
+
+ /* Record Control Line states */
+ mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
+
+#if 0
+ /* Not yet handled. See belin_sa.c for further information */
+ /* Now to report any errors */
+ priv->last_lsr = data[MCT_U232_LSR_INDEX];
+ /*
+ * fill in the flip buffer here, but I do not know the relation
+ * to the current/next receive buffer or characters. I need
+ * to look in to this before committing any code.
+ */
+ if (priv->last_lsr & MCT_U232_LSR_ERR) {
+ tty = port->tty;
+ /* Overrun Error */
+ if (priv->last_lsr & MCT_U232_LSR_OE) {
+ }
+ /* Parity Error */
+ if (priv->last_lsr & MCT_U232_LSR_PE) {
+ }
+ /* Framing Error */
+ if (priv->last_lsr & MCT_U232_LSR_FE) {
+ }
+ /* Break Indicator */
+ if (priv->last_lsr & MCT_U232_LSR_BI) {
+ }
+ }
+#endif
+ spin_unlock_irqrestore(&priv->lock, flags);
+exit:
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status)
+ err ("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, status);
+} /* mct_u232_read_int_callback */
+
+static void mct_u232_set_termios (struct usb_serial_port *port,
+ struct termios *old_termios)
+{
+ struct usb_serial *serial = port->serial;
+ struct mct_u232_private *priv = usb_get_serial_port_data(port);
+ unsigned int iflag = port->tty->termios->c_iflag;
+ unsigned int cflag = port->tty->termios->c_cflag;
+ unsigned int old_cflag = old_termios->c_cflag;
+ unsigned long flags;
+ unsigned int control_state, new_state;
+ unsigned char last_lcr;
+
+ /* get a local copy of the current port settings */
+ spin_lock_irqsave(&priv->lock, flags);
+ control_state = priv->control_state;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ last_lcr = 0;
+
+ /*
+ * Update baud rate.
+ * Do not attempt to cache old rates and skip settings,
+ * disconnects screw such tricks up completely.
+ * Premature optimization is the root of all evil.
+ */
+
+ /* reassert DTR and (maybe) RTS on transition from B0 */
+ if ((old_cflag & CBAUD) == B0) {
+ dbg("%s: baud was B0", __FUNCTION__);
+ control_state |= TIOCM_DTR;
+ /* don't set RTS if using hardware flow control */
+ if (!(old_cflag & CRTSCTS)) {
+ control_state |= TIOCM_RTS;
+ }
+ mct_u232_set_modem_ctrl(serial, control_state);
+ }
+
+ mct_u232_set_baud_rate(serial, cflag & CBAUD);
+
+ if ((cflag & CBAUD) == B0 ) {
+ dbg("%s: baud is B0", __FUNCTION__);
+ /* Drop RTS and DTR */
+ control_state &= ~(TIOCM_DTR | TIOCM_RTS);
+ mct_u232_set_modem_ctrl(serial, control_state);
+ }
+
+ /*
+ * Update line control register (LCR)
+ */
+
+ /* set the parity */
+ if (cflag & PARENB)
+ last_lcr |= (cflag & PARODD) ?
+ MCT_U232_PARITY_ODD : MCT_U232_PARITY_EVEN;
+ else
+ last_lcr |= MCT_U232_PARITY_NONE;
+
+ /* set the number of data bits */
+ switch (cflag & CSIZE) {
+ case CS5:
+ last_lcr |= MCT_U232_DATA_BITS_5; break;
+ case CS6:
+ last_lcr |= MCT_U232_DATA_BITS_6; break;
+ case CS7:
+ last_lcr |= MCT_U232_DATA_BITS_7; break;
+ case CS8:
+ last_lcr |= MCT_U232_DATA_BITS_8; break;
+ default:
+ err("CSIZE was not CS5-CS8, using default of 8");
+ last_lcr |= MCT_U232_DATA_BITS_8;
+ break;
+ }
+
+ /* set the number of stop bits */
+ last_lcr |= (cflag & CSTOPB) ?
+ MCT_U232_STOP_BITS_2 : MCT_U232_STOP_BITS_1;
+
+ mct_u232_set_line_ctrl(serial, last_lcr);
+
+ /*
+ * Set flow control: well, I do not really now how to handle DTR/RTS.
+ * Just do what we have seen with SniffUSB on Win98.
+ */
+ /* Drop DTR/RTS if no flow control otherwise assert */
+ new_state = control_state;
+ if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS))
+ new_state |= TIOCM_DTR | TIOCM_RTS;
+ else
+ new_state &= ~(TIOCM_DTR | TIOCM_RTS);
+ if (new_state != control_state) {
+ mct_u232_set_modem_ctrl(serial, new_state);
+ control_state = new_state;
+ }
+
+ /* save off the modified port settings */
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->control_state = control_state;
+ priv->last_lcr = last_lcr;
+ spin_unlock_irqrestore(&priv->lock, flags);
+} /* mct_u232_set_termios */
+
+static void mct_u232_break_ctl( struct usb_serial_port *port, int break_state )
+{
+ struct usb_serial *serial = port->serial;
+ struct mct_u232_private *priv = usb_get_serial_port_data(port);
+ unsigned char lcr;
+ unsigned long flags;
+
+ dbg("%sstate=%d", __FUNCTION__, break_state);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ lcr = priv->last_lcr;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ if (break_state)
+ lcr |= MCT_U232_SET_BREAK;
+
+ mct_u232_set_line_ctrl(serial, lcr);
+} /* mct_u232_break_ctl */
+
+
+static int mct_u232_tiocmget (struct usb_serial_port *port, struct file *file)
+{
+ struct mct_u232_private *priv = usb_get_serial_port_data(port);
+ unsigned int control_state;
+ unsigned long flags;
+
+ dbg("%s", __FUNCTION__);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ control_state = priv->control_state;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ return control_state;
+}
+
+static int mct_u232_tiocmset (struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct usb_serial *serial = port->serial;
+ struct mct_u232_private *priv = usb_get_serial_port_data(port);
+ unsigned int control_state;
+ unsigned long flags;
+
+ dbg("%s", __FUNCTION__);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ control_state = priv->control_state;
+
+ if (set & TIOCM_RTS)
+ control_state |= TIOCM_RTS;
+ if (set & TIOCM_DTR)
+ control_state |= TIOCM_DTR;
+ if (clear & TIOCM_RTS)
+ control_state &= ~TIOCM_RTS;
+ if (clear & TIOCM_DTR)
+ control_state &= ~TIOCM_DTR;
+
+ priv->control_state = control_state;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ return mct_u232_set_modem_ctrl(serial, control_state);
+}
+
+static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
+ unsigned int cmd, unsigned long arg)
+{
+ dbg("%scmd=0x%x", __FUNCTION__, cmd);
+
+ /* Based on code from acm.c and others */
+ switch (cmd) {
+ case TIOCMIWAIT:
+ /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
+ /* TODO */
+ return( 0 );
+
+ case TIOCGICOUNT:
+ /* return count of modemline transitions */
+ /* TODO */
+ return 0;
+
+ default:
+ dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd);
+ return(-ENOIOCTLCMD);
+ break;
+ }
+ return 0;
+} /* mct_u232_ioctl */
+
+
+static int __init mct_u232_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&mct_u232_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&mct_u232_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&mct_u232_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+
+static void __exit mct_u232_exit (void)
+{
+ usb_deregister (&mct_u232_driver);
+ usb_serial_deregister (&mct_u232_device);
+}
+
+
+module_init (mct_u232_init);
+module_exit(mct_u232_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/mct_u232.h b/drivers/usb/serial/mct_u232.h
new file mode 100644
index 000000000000..73dd0d984cd3
--- /dev/null
+++ b/drivers/usb/serial/mct_u232.h
@@ -0,0 +1,453 @@
+/*
+ * Definitions for MCT (Magic Control Technology) USB-RS232 Converter Driver
+ *
+ * Copyright (C) 2000 Wolfgang Grandegger (wolfgang@ces.ch)
+ *
+ * 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 is for the device MCT USB-RS232 Converter (25 pin, Model No.
+ * U232-P25) from Magic Control Technology Corp. (there is also a 9 pin
+ * Model No. U232-P9). See http://www.mct.com.tw/p_u232.html for further
+ * information. The properties of this device are listed at the end of this
+ * file. This device is available from various distributors. I know Hana,
+ * http://www.hana.de and D-Link, http://www.dlink.com/products/usb/dsbs25.
+ *
+ * All of the information about the device was acquired by using SniffUSB
+ * on Windows98. The technical details of the reverse engineering are
+ * summarized at the end of this file.
+ */
+
+#ifndef __LINUX_USB_SERIAL_MCT_U232_H
+#define __LINUX_USB_SERIAL_MCT_U232_H
+
+#define MCT_U232_VID 0x0711 /* Vendor Id */
+#define MCT_U232_PID 0x0210 /* Original MCT Product Id */
+
+/* U232-P25, Sitecom */
+#define MCT_U232_SITECOM_PID 0x0230 /* Sitecom Product Id */
+
+/* DU-H3SP USB BAY hub */
+#define MCT_U232_DU_H3SP_PID 0x0200 /* D-Link DU-H3SP USB BAY */
+
+/* Belkin badge the MCT U232-P9 as the F5U109 */
+#define MCT_U232_BELKIN_F5U109_VID 0x050d /* Vendor Id */
+#define MCT_U232_BELKIN_F5U109_PID 0x0109 /* Product Id */
+
+/*
+ * Vendor Request Interface
+ */
+#define MCT_U232_SET_REQUEST_TYPE 0x40
+#define MCT_U232_GET_REQUEST_TYPE 0xc0
+
+#define MCT_U232_GET_MODEM_STAT_REQUEST 2 /* Get Modem Status Register (MSR) */
+#define MCT_U232_GET_MODEM_STAT_SIZE 1
+
+#define MCT_U232_GET_LINE_CTRL_REQUEST 6 /* Get Line Control Register (LCR) */
+#define MCT_U232_GET_LINE_CTRL_SIZE 1 /* ... not used by this driver */
+
+#define MCT_U232_SET_BAUD_RATE_REQUEST 5 /* Set Baud Rate Divisor */
+#define MCT_U232_SET_BAUD_RATE_SIZE 4
+
+#define MCT_U232_SET_LINE_CTRL_REQUEST 7 /* Set Line Control Register (LCR) */
+#define MCT_U232_SET_LINE_CTRL_SIZE 1
+
+#define MCT_U232_SET_MODEM_CTRL_REQUEST 10 /* Set Modem Control Register (MCR) */
+#define MCT_U232_SET_MODEM_CTRL_SIZE 1
+
+/* This USB device request code is not well understood. It is transmitted by
+ the MCT-supplied Windows driver whenever the baud rate changes.
+*/
+#define MCT_U232_SET_UNKNOWN1_REQUEST 11 /* Unknown functionality */
+#define MCT_U232_SET_UNKNOWN1_SIZE 1
+
+/* This USB device request code is not well understood. It is transmitted by
+ the MCT-supplied Windows driver whenever the baud rate changes.
+
+ Without this USB device request, the USB/RS-232 adapter will not write to
+ RS-232 devices which do not assert the 'CTS' signal.
+*/
+#define MCT_U232_SET_UNKNOWN2_REQUEST 12 /* Unknown functionality */
+#define MCT_U232_SET_UNKNOWN2_SIZE 1
+
+/*
+ * Baud rate (divisor)
+ * Actually, there are two of them, MCT website calls them "Philips solution"
+ * and "Intel solution". They are the regular MCT and "Sitecom" for us.
+ * This is pointless to document in the header, see the code for the bits.
+ */
+static int mct_u232_calculate_baud_rate(struct usb_serial *serial, int value);
+
+/*
+ * Line Control Register (LCR)
+ */
+#define MCT_U232_SET_BREAK 0x40
+
+#define MCT_U232_PARITY_SPACE 0x38
+#define MCT_U232_PARITY_MARK 0x28
+#define MCT_U232_PARITY_EVEN 0x18
+#define MCT_U232_PARITY_ODD 0x08
+#define MCT_U232_PARITY_NONE 0x00
+
+#define MCT_U232_DATA_BITS_5 0x00
+#define MCT_U232_DATA_BITS_6 0x01
+#define MCT_U232_DATA_BITS_7 0x02
+#define MCT_U232_DATA_BITS_8 0x03
+
+#define MCT_U232_STOP_BITS_2 0x04
+#define MCT_U232_STOP_BITS_1 0x00
+
+/*
+ * Modem Control Register (MCR)
+ */
+#define MCT_U232_MCR_NONE 0x8 /* Deactivate DTR and RTS */
+#define MCT_U232_MCR_RTS 0xa /* Activate RTS */
+#define MCT_U232_MCR_DTR 0x9 /* Activate DTR */
+
+/*
+ * Modem Status Register (MSR)
+ */
+#define MCT_U232_MSR_INDEX 0x0 /* data[index] */
+#define MCT_U232_MSR_CD 0x80 /* Current CD */
+#define MCT_U232_MSR_RI 0x40 /* Current RI */
+#define MCT_U232_MSR_DSR 0x20 /* Current DSR */
+#define MCT_U232_MSR_CTS 0x10 /* Current CTS */
+#define MCT_U232_MSR_DCD 0x08 /* Delta CD */
+#define MCT_U232_MSR_DRI 0x04 /* Delta RI */
+#define MCT_U232_MSR_DDSR 0x02 /* Delta DSR */
+#define MCT_U232_MSR_DCTS 0x01 /* Delta CTS */
+
+/*
+ * Line Status Register (LSR)
+ */
+#define MCT_U232_LSR_INDEX 1 /* data[index] */
+#define MCT_U232_LSR_ERR 0x80 /* OE | PE | FE | BI */
+#define MCT_U232_LSR_TEMT 0x40 /* transmit register empty */
+#define MCT_U232_LSR_THRE 0x20 /* transmit holding register empty */
+#define MCT_U232_LSR_BI 0x10 /* break indicator */
+#define MCT_U232_LSR_FE 0x08 /* framing error */
+#define MCT_U232_LSR_OE 0x02 /* overrun error */
+#define MCT_U232_LSR_PE 0x04 /* parity error */
+#define MCT_U232_LSR_OE 0x02 /* overrun error */
+#define MCT_U232_LSR_DR 0x01 /* receive data ready */
+
+
+/* -----------------------------------------------------------------------------
+ * Technical Specification reverse engineered with SniffUSB on Windows98
+ * =====================================================================
+ *
+ * The technical details of the device have been acquired be using "SniffUSB"
+ * and the vendor-supplied device driver (version 2.3A) under Windows98. To
+ * identify the USB vendor-specific requests and to assign them to terminal
+ * settings (flow control, baud rate, etc.) the program "SerialSettings" from
+ * William G. Greathouse has been proven to be very useful. I also used the
+ * Win98 "HyperTerminal" and "usb-robot" on Linux for testing. The results and
+ * observations are summarized below:
+ *
+ * The USB requests seem to be directly mapped to the registers of a 8250,
+ * 16450 or 16550 UART. The FreeBSD handbook (appendix F.4 "Input/Output
+ * devices") contains a comprehensive description of UARTs and its registers.
+ * The bit descriptions are actually taken from there.
+ *
+ *
+ * Baud rate (divisor)
+ * -------------------
+ *
+ * BmRequestType: 0x40 (0100 0000B)
+ * bRequest: 0x05
+ * wValue: 0x0000
+ * wIndex: 0x0000
+ * wLength: 0x0004
+ * Data: divisor = 115200 / baud_rate
+ *
+ * SniffUSB observations (Nov 2003): Contrary to the 'wLength' value of 4
+ * shown above, observations with a Belkin F5U109 adapter, using the
+ * MCT-supplied Windows98 driver (U2SPORT.VXD, "File version: 1.21P.0104 for
+ * Win98/Me"), show this request has a length of 1 byte, presumably because
+ * of the fact that the Belkin adapter and the 'Sitecom U232-P25' adapter
+ * use a baud-rate code instead of a conventional RS-232 baud rate divisor.
+ * The current source code for this driver does not reflect this fact, but
+ * the driver works fine with this adapter/driver combination nonetheless.
+ *
+ *
+ * Line Control Register (LCR)
+ * ---------------------------
+ *
+ * BmRequestType: 0x40 (0100 0000B) 0xc0 (1100 0000B)
+ * bRequest: 0x07 0x06
+ * wValue: 0x0000
+ * wIndex: 0x0000
+ * wLength: 0x0001
+ * Data: LCR (see below)
+ *
+ * Bit 7: Divisor Latch Access Bit (DLAB). When set, access to the data
+ * transmit/receive register (THR/RBR) and the Interrupt Enable Register
+ * (IER) is disabled. Any access to these ports is now redirected to the
+ * Divisor Latch Registers. Setting this bit, loading the Divisor
+ * Registers, and clearing DLAB should be done with interrupts disabled.
+ * Bit 6: Set Break. When set to "1", the transmitter begins to transmit
+ * continuous Spacing until this bit is set to "0". This overrides any
+ * bits of characters that are being transmitted.
+ * Bit 5: Stick Parity. When parity is enabled, setting this bit causes parity
+ * to always be "1" or "0", based on the value of Bit 4.
+ * Bit 4: Even Parity Select (EPS). When parity is enabled and Bit 5 is "0",
+ * setting this bit causes even parity to be transmitted and expected.
+ * Otherwise, odd parity is used.
+ * Bit 3: Parity Enable (PEN). When set to "1", a parity bit is inserted
+ * between the last bit of the data and the Stop Bit. The UART will also
+ * expect parity to be present in the received data.
+ * Bit 2: Number of Stop Bits (STB). If set to "1" and using 5-bit data words,
+ * 1.5 Stop Bits are transmitted and expected in each data word. For
+ * 6, 7 and 8-bit data words, 2 Stop Bits are transmitted and expected.
+ * When this bit is set to "0", one Stop Bit is used on each data word.
+ * Bit 1: Word Length Select Bit #1 (WLSB1)
+ * Bit 0: Word Length Select Bit #0 (WLSB0)
+ * Together these bits specify the number of bits in each data word.
+ * 1 0 Word Length
+ * 0 0 5 Data Bits
+ * 0 1 6 Data Bits
+ * 1 0 7 Data Bits
+ * 1 1 8 Data Bits
+ *
+ * SniffUSB observations: Bit 7 seems not to be used. There seem to be two bugs
+ * in the Win98 driver: the break does not work (bit 6 is not asserted) and the
+ * stick parity bit is not cleared when set once. The LCR can also be read
+ * back with USB request 6 but this has never been observed with SniffUSB.
+ *
+ *
+ * Modem Control Register (MCR)
+ * ----------------------------
+ *
+ * BmRequestType: 0x40 (0100 0000B)
+ * bRequest: 0x0a
+ * wValue: 0x0000
+ * wIndex: 0x0000
+ * wLength: 0x0001
+ * Data: MCR (Bit 4..7, see below)
+ *
+ * Bit 7: Reserved, always 0.
+ * Bit 6: Reserved, always 0.
+ * Bit 5: Reserved, always 0.
+ * Bit 4: Loop-Back Enable. When set to "1", the UART transmitter and receiver
+ * are internally connected together to allow diagnostic operations. In
+ * addition, the UART modem control outputs are connected to the UART
+ * modem control inputs. CTS is connected to RTS, DTR is connected to
+ * DSR, OUT1 is connected to RI, and OUT 2 is connected to DCD.
+ * Bit 3: OUT 2. An auxiliary output that the host processor may set high or
+ * low. In the IBM PC serial adapter (and most clones), OUT 2 is used
+ * to tri-state (disable) the interrupt signal from the
+ * 8250/16450/16550 UART.
+ * Bit 2: OUT 1. An auxiliary output that the host processor may set high or
+ * low. This output is not used on the IBM PC serial adapter.
+ * Bit 1: Request to Send (RTS). When set to "1", the output of the UART -RTS
+ * line is Low (Active).
+ * Bit 0: Data Terminal Ready (DTR). When set to "1", the output of the UART
+ * -DTR line is Low (Active).
+ *
+ * SniffUSB observations: Bit 2 and 4 seem not to be used but bit 3 has been
+ * seen _always_ set.
+ *
+ *
+ * Modem Status Register (MSR)
+ * ---------------------------
+ *
+ * BmRequestType: 0xc0 (1100 0000B)
+ * bRequest: 0x02
+ * wValue: 0x0000
+ * wIndex: 0x0000
+ * wLength: 0x0001
+ * Data: MSR (see below)
+ *
+ * Bit 7: Data Carrier Detect (CD). Reflects the state of the DCD line on the
+ * UART.
+ * Bit 6: Ring Indicator (RI). Reflects the state of the RI line on the UART.
+ * Bit 5: Data Set Ready (DSR). Reflects the state of the DSR line on the UART.
+ * Bit 4: Clear To Send (CTS). Reflects the state of the CTS line on the UART.
+ * Bit 3: Delta Data Carrier Detect (DDCD). Set to "1" if the -DCD line has
+ * changed state one more more times since the last time the MSR was
+ * read by the host.
+ * Bit 2: Trailing Edge Ring Indicator (TERI). Set to "1" if the -RI line has
+ * had a low to high transition since the last time the MSR was read by
+ * the host.
+ * Bit 1: Delta Data Set Ready (DDSR). Set to "1" if the -DSR line has changed
+ * state one more more times since the last time the MSR was read by the
+ * host.
+ * Bit 0: Delta Clear To Send (DCTS). Set to "1" if the -CTS line has changed
+ * state one more times since the last time the MSR was read by the
+ * host.
+ *
+ * SniffUSB observations: the MSR is also returned as first byte on the
+ * interrupt-in endpoint 0x83 to signal changes of modem status lines. The USB
+ * request to read MSR cannot be applied during normal device operation.
+ *
+ *
+ * Line Status Register (LSR)
+ * --------------------------
+ *
+ * Bit 7 Error in Receiver FIFO. On the 8250/16450 UART, this bit is zero.
+ * This bit is set to "1" when any of the bytes in the FIFO have one or
+ * more of the following error conditions: PE, FE, or BI.
+ * Bit 6 Transmitter Empty (TEMT). When set to "1", there are no words
+ * remaining in the transmit FIFO or the transmit shift register. The
+ * transmitter is completely idle.
+ * Bit 5 Transmitter Holding Register Empty (THRE). When set to "1", the FIFO
+ * (or holding register) now has room for at least one additional word
+ * to transmit. The transmitter may still be transmitting when this bit
+ * is set to "1".
+ * Bit 4 Break Interrupt (BI). The receiver has detected a Break signal.
+ * Bit 3 Framing Error (FE). A Start Bit was detected but the Stop Bit did not
+ * appear at the expected time. The received word is probably garbled.
+ * Bit 2 Parity Error (PE). The parity bit was incorrect for the word received.
+ * Bit 1 Overrun Error (OE). A new word was received and there was no room in
+ * the receive buffer. The newly-arrived word in the shift register is
+ * discarded. On 8250/16450 UARTs, the word in the holding register is
+ * discarded and the newly- arrived word is put in the holding register.
+ * Bit 0 Data Ready (DR). One or more words are in the receive FIFO that the
+ * host may read. A word must be completely received and moved from the
+ * shift register into the FIFO (or holding register for 8250/16450
+ * designs) before this bit is set.
+ *
+ * SniffUSB observations: the LSR is returned as second byte on the interrupt-in
+ * endpoint 0x83 to signal error conditions. Such errors have been seen with
+ * minicom/zmodem transfers (CRC errors).
+ *
+ *
+ * Unknown #1
+ * -------------------
+ *
+ * BmRequestType: 0x40 (0100 0000B)
+ * bRequest: 0x0b
+ * wValue: 0x0000
+ * wIndex: 0x0000
+ * wLength: 0x0001
+ * Data: 0x00
+ *
+ * SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
+ * (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
+ * occurs immediately after a "Baud rate (divisor)" message. It was not
+ * observed at any other time. It is unclear what purpose this message
+ * serves.
+ *
+ *
+ * Unknown #2
+ * -------------------
+ *
+ * BmRequestType: 0x40 (0100 0000B)
+ * bRequest: 0x0c
+ * wValue: 0x0000
+ * wIndex: 0x0000
+ * wLength: 0x0001
+ * Data: 0x00
+ *
+ * SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
+ * (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
+ * occurs immediately after the 'Unknown #1' message (see above). It was
+ * not observed at any other time. It is unclear what other purpose (if
+ * any) this message might serve, but without it, the USB/RS-232 adapter
+ * will not write to RS-232 devices which do not assert the 'CTS' signal.
+ *
+ *
+ * Flow control
+ * ------------
+ *
+ * SniffUSB observations: no flow control specific requests have been realized
+ * apart from DTR/RTS settings. Both signals are dropped for no flow control
+ * but asserted for hardware or software flow control.
+ *
+ *
+ * Endpoint usage
+ * --------------
+ *
+ * SniffUSB observations: the bulk-out endpoint 0x1 and interrupt-in endpoint
+ * 0x81 is used to transmit and receive characters. The second interrupt-in
+ * endpoint 0x83 signals exceptional conditions like modem line changes and
+ * errors. The first byte returned is the MSR and the second byte the LSR.
+ *
+ *
+ * Other observations
+ * ------------------
+ *
+ * Queued bulk transfers like used in visor.c did not work.
+ *
+ *
+ * Properties of the USB device used (as found in /var/log/messages)
+ * -----------------------------------------------------------------
+ *
+ * Manufacturer: MCT Corporation.
+ * Product: USB-232 Interfact Controller
+ * SerialNumber: U2S22050
+ *
+ * Length = 18
+ * DescriptorType = 01
+ * USB version = 1.00
+ * Vendor:Product = 0711:0210
+ * MaxPacketSize0 = 8
+ * NumConfigurations = 1
+ * Device version = 1.02
+ * Device Class:SubClass:Protocol = 00:00:00
+ * Per-interface classes
+ * Configuration:
+ * bLength = 9
+ * bDescriptorType = 02
+ * wTotalLength = 0027
+ * bNumInterfaces = 01
+ * bConfigurationValue = 01
+ * iConfiguration = 00
+ * bmAttributes = c0
+ * MaxPower = 100mA
+ *
+ * Interface: 0
+ * Alternate Setting: 0
+ * bLength = 9
+ * bDescriptorType = 04
+ * bInterfaceNumber = 00
+ * bAlternateSetting = 00
+ * bNumEndpoints = 03
+ * bInterface Class:SubClass:Protocol = 00:00:00
+ * iInterface = 00
+ * Endpoint:
+ * bLength = 7
+ * bDescriptorType = 05
+ * bEndpointAddress = 81 (in)
+ * bmAttributes = 03 (Interrupt)
+ * wMaxPacketSize = 0040
+ * bInterval = 02
+ * Endpoint:
+ * bLength = 7
+ * bDescriptorType = 05
+ * bEndpointAddress = 01 (out)
+ * bmAttributes = 02 (Bulk)
+ * wMaxPacketSize = 0040
+ * bInterval = 00
+ * Endpoint:
+ * bLength = 7
+ * bDescriptorType = 05
+ * bEndpointAddress = 83 (in)
+ * bmAttributes = 03 (Interrupt)
+ * wMaxPacketSize = 0002
+ * bInterval = 02
+ *
+ *
+ * Hardware details (added by Martin Hamilton, 2001/12/06)
+ * -----------------------------------------------------------------
+ *
+ * This info was gleaned from opening a Belkin F5U109 DB9 USB serial
+ * adaptor, which turns out to simply be a re-badged U232-P9. We
+ * know this because there is a sticky label on the circuit board
+ * which says "U232-P9" ;-)
+ *
+ * The circuit board inside the adaptor contains a Philips PDIUSBD12
+ * USB endpoint chip and a Phillips P87C52UBAA microcontroller with
+ * embedded UART. Exhaustive documentation for these is available at:
+ *
+ * http://www.semiconductors.philips.com/pip/p87c52ubaa
+ * http://www.semiconductors.philips.com/pip/pdiusbd12
+ *
+ * Thanks to Julian Highfield for the pointer to the Philips database.
+ *
+ */
+
+#endif /* __LINUX_USB_SERIAL_MCT_U232_H */
+
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
new file mode 100644
index 000000000000..a1cba4b5fa23
--- /dev/null
+++ b/drivers/usb/serial/omninet.c
@@ -0,0 +1,362 @@
+/*
+ * USB ZyXEL omni.net LCD PLUS driver
+ *
+ * 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.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * Please report both successes and troubles to the author at omninet@kroah.com
+ *
+ * (05/30/2001) gkh
+ * switched from using spinlock to a semaphore, which fixes lots of problems.
+ *
+ * (04/08/2001) gb
+ * Identify version on module load.
+ *
+ * (11/01/2000) Adam J. Richter
+ * usb_device_id table support
+ *
+ * (10/05/2000) gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.
+ *
+ * (08/28/2000) gkh
+ * Added locks for SMP safeness.
+ * Fixed MOD_INC and MOD_DEC logic and the ability to open a port more
+ * than once.
+ * Fixed potential race in omninet_write_bulk_callback
+ *
+ * (07/19/2000) gkh
+ * Added module_init and module_exit functions to handle the fact that this
+ * driver is a loadable module now.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+
+static int debug;
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.1"
+#define DRIVER_AUTHOR "Alessandro Zummo"
+#define DRIVER_DESC "USB ZyXEL omni.net LCD PLUS Driver"
+
+#define ZYXEL_VENDOR_ID 0x0586
+#define ZYXEL_OMNINET_ID 0x1000
+#define BT_IGNITIONPRO_ID 0x2000 /* This one seems to be a re-branded ZyXEL device */
+
+/* function prototypes */
+static int omninet_open (struct usb_serial_port *port, struct file *filp);
+static void omninet_close (struct usb_serial_port *port, struct file *filp);
+static void omninet_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void omninet_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static int omninet_write (struct usb_serial_port *port, const unsigned char *buf, int count);
+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) },
+ { USB_DEVICE(ZYXEL_VENDOR_ID, BT_IGNITIONPRO_ID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver omninet_driver = {
+ .owner = THIS_MODULE,
+ .name = "omninet",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table,
+};
+
+
+static struct usb_serial_device_type zyxel_omninet_device = {
+ .owner = THIS_MODULE,
+ .name = "ZyXEL - omni.net lcd plus usb",
+ .short_name = "omninet",
+ .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,
+};
+
+
+/* The protocol.
+ *
+ * The omni.net always exchange 64 bytes of data with the host. The first
+ * four bytes are the control header, you can see it in the above structure.
+ *
+ * oh_seq is a sequence number. Don't know if/how it's used.
+ * oh_len is the length of the data bytes in the packet.
+ * oh_xxx Bit-mapped, related to handshaking and status info.
+ * I normally set it to 0x03 in trasmitted frames.
+ * 7: Active when the TA is in a CONNECTed state.
+ * 6: unknown
+ * 5: handshaking, unknown
+ * 4: handshaking, unknown
+ * 3: unknown, usually 0
+ * 2: unknown, usually 0
+ * 1: handshaking, unknown, usually set to 1 in trasmitted frames
+ * 0: handshaking, unknown, usually set to 1 in trasmitted frames
+ * oh_pad Probably a pad byte.
+ *
+ * After the header you will find data bytes if oh_len was greater than zero.
+ *
+ */
+
+struct omninet_header
+{
+ __u8 oh_seq;
+ __u8 oh_len;
+ __u8 oh_xxx;
+ __u8 oh_pad;
+};
+
+struct omninet_data
+{
+ __u8 od_outseq; // Sequence number for bulk_out URBs
+};
+
+static int omninet_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct usb_serial *serial = port->serial;
+ struct usb_serial_port *wport;
+ struct omninet_data *od;
+ int result = 0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
+ if( !od ) {
+ err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct omninet_data));
+ return -ENOMEM;
+ }
+
+ usb_set_serial_port_data(port, od);
+ wport = serial->port[1];
+ wport->tty = port->tty;
+
+ /* 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,
+ omninet_read_bulk_callback, port);
+ result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ if (result)
+ err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
+
+ return result;
+}
+
+static void omninet_close (struct usb_serial_port *port, struct file * filp)
+{
+ struct usb_serial *serial = port->serial;
+ struct usb_serial_port *wport;
+ struct omninet_data *od;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ wport = serial->port[1];
+ usb_kill_urb(wport->write_urb);
+ usb_kill_urb(port->read_urb);
+
+ od = usb_get_serial_port_data(port);
+ if (od)
+ kfree(od);
+}
+
+
+#define OMNINET_DATAOFFSET 0x04
+#define OMNINET_HEADERLEN sizeof(struct omninet_header)
+#define OMNINET_BULKOUTSIZE (64 - OMNINET_HEADERLEN)
+
+static void omninet_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ unsigned char *data = urb->transfer_buffer;
+ struct omninet_header *header = (struct omninet_header *) &data[0];
+
+ int i;
+ int result;
+
+// dbg("omninet_read_bulk_callback");
+
+ if (urb->status) {
+ dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ if ((debug) && (header->oh_xxx != 0x30)) {
+ if (urb->actual_length) {
+ printk (KERN_DEBUG __FILE__ ": omninet_read %d: ", header->oh_len);
+ for (i = 0; i < (header->oh_len + OMNINET_HEADERLEN); i++) {
+ printk ("%.2x ", data[i]);
+ }
+ printk ("\n");
+ }
+ }
+
+ if (urb->actual_length && header->oh_len) {
+ for (i = 0; i < header->oh_len; i++) {
+ tty_insert_flip_char(port->tty, data[OMNINET_DATAOFFSET + i], 0);
+ }
+ tty_flip_buffer_push(port->tty);
+ }
+
+ /* Continue trying to always read */
+ usb_fill_bulk_urb(urb, port->serial->dev,
+ usb_rcvbulkpipe(port->serial->dev, port->bulk_in_endpointAddress),
+ urb->transfer_buffer, urb->transfer_buffer_length,
+ omninet_read_bulk_callback, port);
+ result = usb_submit_urb(urb, GFP_ATOMIC);
+ if (result)
+ err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+
+ return;
+}
+
+static int omninet_write (struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ struct usb_serial *serial = port->serial;
+ struct usb_serial_port *wport = serial->port[1];
+
+ struct omninet_data *od = usb_get_serial_port_data(port);
+ struct omninet_header *header = (struct omninet_header *) wport->write_urb->transfer_buffer;
+
+ int result;
+
+// 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);
+ }
+
+ count = (count > OMNINET_BULKOUTSIZE) ? OMNINET_BULKOUTSIZE : count;
+
+ memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, wport->write_urb->transfer_buffer);
+
+ header->oh_seq = od->od_outseq++;
+ header->oh_len = count;
+ header->oh_xxx = 0x03;
+ header->oh_pad = 0x00;
+
+ /* send the data out the bulk port, always 64 bytes */
+ wport->write_urb->transfer_buffer_length = 64;
+
+ wport->write_urb->dev = serial->dev;
+ result = usb_submit_urb(wport->write_urb, GFP_ATOMIC);
+ if (result)
+ err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+ else
+ result = count;
+
+ return result;
+}
+
+
+static int omninet_write_room (struct usb_serial_port *port)
+{
+ struct usb_serial *serial = port->serial;
+ struct usb_serial_port *wport = serial->port[1];
+
+ int room = 0; // Default: no room
+
+ if (wport->write_urb->status != -EINPROGRESS)
+ room = wport->bulk_out_size - OMNINET_HEADERLEN;
+
+// dbg("omninet_write_room returns %d", room);
+
+ return (room);
+}
+
+static void omninet_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+/* struct omninet_header *header = (struct omninet_header *) urb->transfer_buffer; */
+ struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
+
+// dbg("omninet_write_bulk_callback, port %0x\n", port);
+
+ if (urb->status) {
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ schedule_work(&port->work);
+
+// dbg("omninet_write_bulk_callback, tty %0x\n", tty);
+}
+
+
+static void omninet_shutdown (struct usb_serial *serial)
+{
+ dbg ("%s", __FUNCTION__);
+}
+
+
+static int __init omninet_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&zyxel_omninet_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&omninet_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&zyxel_omninet_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+
+static void __exit omninet_exit (void)
+{
+ usb_deregister (&omninet_driver);
+ usb_serial_deregister (&zyxel_omninet_device);
+}
+
+
+module_init(omninet_init);
+module_exit(omninet_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
new file mode 100644
index 000000000000..3368d2b0412d
--- /dev/null
+++ b/drivers/usb/serial/pl2303.c
@@ -0,0 +1,1200 @@
+/*
+ * Prolific PL2303 USB to serial adaptor driver
+ *
+ * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com)
+ * Copyright (C) 2003 IBM Corp.
+ *
+ * Original driver for 2.2.x by anonymous
+ *
+ * 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.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * 2002_Mar_26 gkh
+ * allowed driver to work properly if there is no tty assigned to a port
+ * (this happens for serial console devices.)
+ *
+ * 2001_Oct_06 gkh
+ * Added RTS and DTR line control. Thanks to joe@bndlg.de for parts of it.
+ *
+ * 2001_Sep_19 gkh
+ * Added break support.
+ *
+ * 2001_Aug_30 gkh
+ * fixed oops in write_bulk_callback.
+ *
+ * 2001_Aug_28 gkh
+ * reworked buffer logic to be like other usb-serial drivers. Hopefully
+ * removing some reported problems.
+ *
+ * 2001_Jun_06 gkh
+ * finished porting to 2.4 format.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/serial.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+#include "pl2303.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.12"
+#define DRIVER_DESC "Prolific PL2303 USB to serial adaptor driver"
+
+static int debug;
+
+#define PL2303_CLOSING_WAIT (30*HZ)
+
+#define PL2303_BUF_SIZE 1024
+#define PL2303_TMP_BUF_SIZE 1024
+
+static DECLARE_MUTEX(pl2303_tmp_buf_sem);
+
+struct pl2303_buf {
+ unsigned int buf_size;
+ char *buf_buf;
+ char *buf_get;
+ char *buf_put;
+};
+
+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(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) },
+ { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) },
+ { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
+ { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
+ { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) },
+ { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
+ { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID_UCSGT) },
+ { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID) },
+ { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) },
+ { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) },
+ { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) },
+ { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) },
+ { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) },
+ { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) },
+ { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) },
+ { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) },
+ { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver pl2303_driver = {
+ .owner = THIS_MODULE,
+ .name = "pl2303",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table,
+};
+
+#define SET_LINE_REQUEST_TYPE 0x21
+#define SET_LINE_REQUEST 0x20
+
+#define SET_CONTROL_REQUEST_TYPE 0x21
+#define SET_CONTROL_REQUEST 0x22
+#define CONTROL_DTR 0x01
+#define CONTROL_RTS 0x02
+
+#define BREAK_REQUEST_TYPE 0x21
+#define BREAK_REQUEST 0x23
+#define BREAK_ON 0xffff
+#define BREAK_OFF 0x0000
+
+#define GET_LINE_REQUEST_TYPE 0xa1
+#define GET_LINE_REQUEST 0x21
+
+#define VENDOR_WRITE_REQUEST_TYPE 0x40
+#define VENDOR_WRITE_REQUEST 0x01
+
+#define VENDOR_READ_REQUEST_TYPE 0xc0
+#define VENDOR_READ_REQUEST 0x01
+
+#define UART_STATE 0x08
+#define UART_STATE_TRANSIENT_MASK 0x74
+#define UART_DCD 0x01
+#define UART_DSR 0x02
+#define UART_BREAK_ERROR 0x04
+#define UART_RING 0x08
+#define UART_FRAME_ERROR 0x10
+#define UART_PARITY_ERROR 0x20
+#define UART_OVERRUN_ERROR 0x40
+#define UART_CTS 0x80
+
+/* function prototypes for a PL2303 serial converter */
+static int pl2303_open (struct usb_serial_port *port, struct file *filp);
+static void pl2303_close (struct usb_serial_port *port, struct file *filp);
+static void pl2303_set_termios (struct usb_serial_port *port,
+ struct termios *old);
+static int pl2303_ioctl (struct usb_serial_port *port, struct file *file,
+ unsigned int cmd, unsigned long arg);
+static void pl2303_read_int_callback (struct urb *urb, struct pt_regs *regs);
+static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void pl2303_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static int pl2303_write (struct usb_serial_port *port,
+ const unsigned char *buf, int count);
+static void pl2303_send (struct usb_serial_port *port);
+static int pl2303_write_room(struct usb_serial_port *port);
+static int pl2303_chars_in_buffer(struct usb_serial_port *port);
+static void pl2303_break_ctl(struct usb_serial_port *port,int break_state);
+static int pl2303_tiocmget (struct usb_serial_port *port, struct file *file);
+static int pl2303_tiocmset (struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear);
+static int pl2303_startup (struct usb_serial *serial);
+static void pl2303_shutdown (struct usb_serial *serial);
+static struct pl2303_buf *pl2303_buf_alloc(unsigned int size);
+static void pl2303_buf_free(struct pl2303_buf *pb);
+static void pl2303_buf_clear(struct pl2303_buf *pb);
+static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb);
+static unsigned int pl2303_buf_space_avail(struct pl2303_buf *pb);
+static unsigned int pl2303_buf_put(struct pl2303_buf *pb, const char *buf,
+ unsigned int count);
+static unsigned int pl2303_buf_get(struct pl2303_buf *pb, char *buf,
+ unsigned int count);
+
+
+/* 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,
+ .tiocmget = pl2303_tiocmget,
+ .tiocmset = pl2303_tiocmset,
+ .read_bulk_callback = pl2303_read_bulk_callback,
+ .read_int_callback = pl2303_read_int_callback,
+ .write_bulk_callback = pl2303_write_bulk_callback,
+ .write_room = pl2303_write_room,
+ .chars_in_buffer = pl2303_chars_in_buffer,
+ .attach = pl2303_startup,
+ .shutdown = pl2303_shutdown,
+};
+
+enum pl2303_type {
+ type_0, /* don't know the difference between type 0 and */
+ type_1, /* type 1, until someone from prolific tells us... */
+ HX, /* HX version of the pl2303 chip */
+};
+
+struct pl2303_private {
+ spinlock_t lock;
+ struct pl2303_buf *buf;
+ int write_urb_in_use;
+ wait_queue_head_t delta_msr_wait;
+ u8 line_control;
+ u8 line_status;
+ u8 termios_initialized;
+ enum pl2303_type type;
+};
+
+
+static int pl2303_startup (struct usb_serial *serial)
+{
+ struct pl2303_private *priv;
+ enum pl2303_type type = type_0;
+ int i;
+
+ if (serial->dev->descriptor.bDeviceClass == 0x02)
+ type = type_0;
+ else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40)
+ type = HX;
+ else if (serial->dev->descriptor.bDeviceClass == 0x00)
+ type = type_1;
+ else if (serial->dev->descriptor.bDeviceClass == 0xFF)
+ type = type_1;
+ dbg("device type: %d", type);
+
+ for (i = 0; i < serial->num_ports; ++i) {
+ priv = kmalloc (sizeof (struct pl2303_private), GFP_KERNEL);
+ if (!priv)
+ goto cleanup;
+ memset (priv, 0x00, sizeof (struct pl2303_private));
+ spin_lock_init(&priv->lock);
+ priv->buf = pl2303_buf_alloc(PL2303_BUF_SIZE);
+ if (priv->buf == NULL) {
+ kfree(priv);
+ goto cleanup;
+ }
+ init_waitqueue_head(&priv->delta_msr_wait);
+ priv->type = type;
+ usb_set_serial_port_data(serial->port[i], priv);
+ }
+ return 0;
+
+cleanup:
+ for (--i; i>=0; --i) {
+ priv = usb_get_serial_port_data(serial->port[i]);
+ pl2303_buf_free(priv->buf);
+ kfree(priv);
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+ return -ENOMEM;
+}
+
+static int set_control_lines (struct usb_device *dev, u8 value)
+{
+ int retval;
+
+ 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;
+}
+
+static int pl2303_write (struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count);
+
+ if (!count)
+ return count;
+
+ spin_lock_irqsave(&priv->lock, flags);
+ count = pl2303_buf_put(priv->buf, buf, count);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ pl2303_send(port);
+
+ return count;
+}
+
+static void pl2303_send(struct usb_serial_port *port)
+{
+ int count, result;
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+
+ if (priv->write_urb_in_use) {
+ spin_unlock_irqrestore(&priv->lock, flags);
+ return;
+ }
+
+ count = pl2303_buf_get(priv->buf, port->write_urb->transfer_buffer,
+ port->bulk_out_size);
+
+ if (count == 0) {
+ spin_unlock_irqrestore(&priv->lock, flags);
+ return;
+ }
+
+ priv->write_urb_in_use = 1;
+
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer);
+
+ port->write_urb->transfer_buffer_length = count;
+ port->write_urb->dev = port->serial->dev;
+ result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
+ if (result) {
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ priv->write_urb_in_use = 0;
+ // TODO: reschedule pl2303_send
+ }
+
+ schedule_work(&port->work);
+}
+
+static int pl2303_write_room(struct usb_serial_port *port)
+{
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ int room = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ room = pl2303_buf_space_avail(priv->buf);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, room);
+ return room;
+}
+
+static int pl2303_chars_in_buffer(struct usb_serial_port *port)
+{
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ int chars = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ chars = pl2303_buf_data_avail(priv->buf);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, chars);
+ return chars;
+}
+
+static void pl2303_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+{
+ struct usb_serial *serial = port->serial;
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ unsigned int cflag;
+ unsigned char *buf;
+ int baud;
+ int i;
+ u8 control;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if ((!port->tty) || (!port->tty->termios)) {
+ dbg("%s - no tty structures", __FUNCTION__);
+ return;
+ }
+
+ spin_lock_irqsave(&priv->lock, flags);
+ if (!priv->termios_initialized) {
+ *(port->tty->termios) = tty_std_termios;
+ port->tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+ priv->termios_initialized = 1;
+ }
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ 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) {
+ dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__);
+ return;
+ }
+ memset (buf, 0x00, 0x07);
+
+ i = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0),
+ GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE,
+ 0, 0, buf, 7, 100);
+ dbg ("0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x", i,
+ buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
+
+
+ if (cflag & CSIZE) {
+ switch (cflag & CSIZE) {
+ case CS5: buf[6] = 5; break;
+ case CS6: buf[6] = 6; break;
+ case CS7: buf[6] = 7; break;
+ default:
+ case CS8: buf[6] = 8; break;
+ }
+ dbg("%s - data bits = %d", __FUNCTION__, buf[6]);
+ }
+
+ baud = 0;
+ switch (cflag & CBAUD) {
+ case B0: baud = 0; break;
+ case B75: baud = 75; break;
+ case B150: baud = 150; break;
+ case B300: baud = 300; break;
+ case B600: baud = 600; break;
+ case B1200: baud = 1200; break;
+ case B1800: baud = 1800; break;
+ case B2400: baud = 2400; break;
+ case B4800: baud = 4800; break;
+ case B9600: baud = 9600; break;
+ case B19200: baud = 19200; break;
+ case B38400: baud = 38400; break;
+ case B57600: baud = 57600; break;
+ case B115200: baud = 115200; break;
+ case B230400: baud = 230400; break;
+ case B460800: baud = 460800; break;
+ default:
+ dev_err(&port->dev, "pl2303 driver does not support the baudrate requested (fix it)\n");
+ break;
+ }
+ dbg("%s - baud = %d", __FUNCTION__, baud);
+ if (baud) {
+ buf[0] = baud & 0xff;
+ buf[1] = (baud >> 8) & 0xff;
+ buf[2] = (baud >> 16) & 0xff;
+ buf[3] = (baud >> 24) & 0xff;
+ }
+
+ /* For reference buf[4]=0 is 1 stop bits */
+ /* For reference buf[4]=1 is 1.5 stop bits */
+ /* 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) {
+ /* For reference buf[5]=0 is none parity */
+ /* For reference buf[5]=1 is odd parity */
+ /* For reference buf[5]=2 is even parity */
+ /* For reference buf[5]=3 is mark parity */
+ /* 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),
+ SET_LINE_REQUEST, SET_LINE_REQUEST_TYPE,
+ 0, 0, buf, 7, 100);
+ dbg ("0x21:0x20:0:0 %d", i);
+
+ /* change control lines if we are switching to or from B0 */
+ spin_lock_irqsave(&priv->lock, flags);
+ control = priv->line_control;
+ if ((cflag & CBAUD) == B0)
+ priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
+ else
+ priv->line_control |= (CONTROL_DTR | CONTROL_RTS);
+ if (control != priv->line_control) {
+ control = priv->line_control;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ set_control_lines(serial->dev, control);
+ } else {
+ spin_unlock_irqrestore(&priv->lock, flags);
+ }
+
+ buf[0] = buf[1] = buf[2] = buf[3] = buf[4] = buf[5] = buf[6] = 0;
+
+ i = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0),
+ GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE,
+ 0, 0, buf, 7, 100);
+ dbg ("0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x", i,
+ buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
+
+ if (cflag & CRTSCTS) {
+ __u16 index;
+ if (priv->type == HX)
+ index = 0x61;
+ else
+ index = 0x41;
+ i = usb_control_msg(serial->dev,
+ usb_sndctrlpipe(serial->dev, 0),
+ VENDOR_WRITE_REQUEST,
+ VENDOR_WRITE_REQUEST_TYPE,
+ 0x0, index, NULL, 0, 100);
+ dbg ("0x40:0x1:0x0:0x%x %d", index, i);
+ }
+
+ kfree (buf);
+}
+
+static int pl2303_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct termios tmp_termios;
+ struct usb_serial *serial = port->serial;
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ unsigned char *buf;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ usb_clear_halt(serial->dev, port->write_urb->pipe);
+ usb_clear_halt(serial->dev, port->read_urb->pipe);
+
+ buf = kmalloc(10, GFP_KERNEL);
+ if (buf==NULL)
+ return -ENOMEM;
+
+#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, 0);
+
+ if (priv->type == HX) {
+ /* HX chip */
+ SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 0x44);
+ /* reset upstream data pipes */
+ SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 8, 0);
+ SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 9, 0);
+ } else {
+ SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 0x24);
+ }
+
+ kfree(buf);
+
+ /* 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, GFP_KERNEL);
+ if (result) {
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __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, GFP_KERNEL);
+ if (result) {
+ dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n", __FUNCTION__, result);
+ pl2303_close (port, NULL);
+ return -EPROTO;
+ }
+ return 0;
+}
+
+
+static void pl2303_close (struct usb_serial_port *port, struct file *filp)
+{
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ unsigned int c_cflag;
+ int bps;
+ long timeout;
+ wait_queue_t wait; \
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /* wait for data to drain from the buffer */
+ spin_lock_irqsave(&priv->lock, flags);
+ timeout = PL2303_CLOSING_WAIT;
+ init_waitqueue_entry(&wait, current);
+ add_wait_queue(&port->tty->write_wait, &wait);
+ for (;;) {
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (pl2303_buf_data_avail(priv->buf) == 0
+ || timeout == 0 || signal_pending(current)
+ || !usb_get_intfdata(port->serial->interface)) /* disconnect */
+ break;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ timeout = schedule_timeout(timeout);
+ spin_lock_irqsave(&priv->lock, flags);
+ }
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&port->tty->write_wait, &wait);
+ /* clear out any remaining data in the buffer */
+ pl2303_buf_clear(priv->buf);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /* wait for characters to drain from the device */
+ /* (this is long enough for the entire 256 byte */
+ /* pl2303 hardware buffer to drain with no flow */
+ /* control for data rates of 1200 bps or more, */
+ /* for lower rates we should really know how much */
+ /* data is in the buffer to compute a delay */
+ /* that is not unnecessarily long) */
+ bps = tty_get_baud_rate(port->tty);
+ if (bps > 1200)
+ timeout = max((HZ*2560)/bps,HZ/10);
+ else
+ timeout = 2*HZ;
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(timeout);
+
+ /* shutdown our urbs */
+ dbg("%s - shutting down urbs", __FUNCTION__);
+ usb_kill_urb(port->write_urb);
+ usb_kill_urb(port->read_urb);
+ usb_kill_urb(port->interrupt_in_urb);
+
+ if (port->tty) {
+ c_cflag = port->tty->termios->c_cflag;
+ if (c_cflag & HUPCL) {
+ /* drop DTR and RTS */
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->line_control = 0;
+ spin_unlock_irqrestore (&priv->lock, flags);
+ set_control_lines (port->serial->dev, 0);
+ }
+ }
+}
+
+static int pl2303_tiocmset (struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ u8 control;
+
+ spin_lock_irqsave (&priv->lock, flags);
+ if (set & TIOCM_RTS)
+ priv->line_control |= CONTROL_RTS;
+ if (set & TIOCM_DTR)
+ priv->line_control |= CONTROL_DTR;
+ if (clear & TIOCM_RTS)
+ priv->line_control &= ~CONTROL_RTS;
+ if (clear & TIOCM_DTR)
+ priv->line_control &= ~CONTROL_DTR;
+ control = priv->line_control;
+ spin_unlock_irqrestore (&priv->lock, flags);
+
+ return set_control_lines (port->serial->dev, control);
+}
+
+static int pl2303_tiocmget (struct usb_serial_port *port, struct file *file)
+{
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ unsigned int mcr;
+ unsigned int status;
+ unsigned int result;
+
+ dbg("%s (%d)", __FUNCTION__, port->number);
+
+ spin_lock_irqsave (&priv->lock, flags);
+ mcr = priv->line_control;
+ status = priv->line_status;
+ spin_unlock_irqrestore (&priv->lock, flags);
+
+ result = ((mcr & CONTROL_DTR) ? TIOCM_DTR : 0)
+ | ((mcr & CONTROL_RTS) ? TIOCM_RTS : 0)
+ | ((status & UART_CTS) ? TIOCM_CTS : 0)
+ | ((status & UART_DSR) ? TIOCM_DSR : 0)
+ | ((status & UART_RING) ? TIOCM_RI : 0)
+ | ((status & UART_DCD) ? TIOCM_CD : 0);
+
+ dbg("%s - result = %x", __FUNCTION__, result);
+
+ return result;
+}
+
+static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)
+{
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ unsigned int prevstatus;
+ unsigned int status;
+ unsigned int changed;
+
+ spin_lock_irqsave (&priv->lock, flags);
+ prevstatus = priv->line_status;
+ spin_unlock_irqrestore (&priv->lock, flags);
+
+ while (1) {
+ interruptible_sleep_on(&priv->delta_msr_wait);
+ /* see if a signal did it */
+ if (signal_pending(current))
+ return -ERESTARTSYS;
+
+ spin_lock_irqsave (&priv->lock, flags);
+ status = priv->line_status;
+ spin_unlock_irqrestore (&priv->lock, flags);
+
+ changed=prevstatus^status;
+
+ if (((arg & TIOCM_RNG) && (changed & UART_RING)) ||
+ ((arg & TIOCM_DSR) && (changed & UART_DSR)) ||
+ ((arg & TIOCM_CD) && (changed & UART_DCD)) ||
+ ((arg & TIOCM_CTS) && (changed & UART_CTS)) ) {
+ return 0;
+ }
+ prevstatus = status;
+ }
+ /* NOTREACHED */
+ return 0;
+}
+
+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 TIOCMIWAIT:
+ dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number);
+ return wait_modem_info(port, arg);
+
+ default:
+ dbg("%s not supported = 0x%04x", __FUNCTION__, cmd);
+ break;
+ }
+
+ return -ENOIOCTLCMD;
+}
+
+static void pl2303_break_ctl (struct usb_serial_port *port, int break_state)
+{
+ struct usb_serial *serial = port->serial;
+ 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", __FUNCTION__, state==BREAK_OFF ? "off" : "on");
+
+ result = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
+ BREAK_REQUEST, BREAK_REQUEST_TYPE, state,
+ 0, NULL, 0, 100);
+ if (result)
+ dbg("%s - error sending break = %d", __FUNCTION__, result);
+}
+
+
+static void pl2303_shutdown (struct usb_serial *serial)
+{
+ int i;
+ struct pl2303_private *priv;
+
+ dbg("%s", __FUNCTION__);
+
+ for (i = 0; i < serial->num_ports; ++i) {
+ priv = usb_get_serial_port_data(serial->port[i]);
+ if (priv) {
+ pl2303_buf_free(priv->buf);
+ kfree(priv);
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+ }
+}
+
+
+static void pl2303_read_int_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ unsigned char *data = urb->transfer_buffer;
+ unsigned long flags;
+ int status;
+ u8 uart_state;
+
+ dbg("%s (%d)", __FUNCTION__, port->number);
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
+
+ if (urb->actual_length < UART_STATE)
+ goto exit;
+
+ /* Save off the uart status for others to look at */
+ uart_state = data[UART_STATE];
+ spin_lock_irqsave(&priv->lock, flags);
+ uart_state |= (priv->line_status & UART_STATE_TRANSIENT_MASK);
+ priv->line_status = uart_state;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+exit:
+ status = usb_submit_urb (urb, GFP_ATOMIC);
+ if (status)
+ dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
+ __FUNCTION__, status);
+}
+
+
+static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+ unsigned long flags;
+ int i;
+ int result;
+ u8 status;
+ char tty_flag;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ 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 = port->serial->dev;
+ result = usb_submit_urb(urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ return;
+ }
+ dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
+ return;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+
+ /* get tty_flag from status */
+ tty_flag = TTY_NORMAL;
+
+ spin_lock_irqsave(&priv->lock, flags);
+ status = priv->line_status;
+ priv->line_status &= ~UART_STATE_TRANSIENT_MASK;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ wake_up_interruptible (&priv->delta_msr_wait);
+
+ /* break takes precedence over parity, */
+ /* which takes precedence over framing errors */
+ if (status & UART_BREAK_ERROR )
+ tty_flag = TTY_BREAK;
+ else if (status & UART_PARITY_ERROR)
+ tty_flag = TTY_PARITY;
+ else if (status & UART_FRAME_ERROR)
+ tty_flag = TTY_FRAME;
+ dbg("%s - tty_flag = %d", __FUNCTION__, tty_flag);
+
+ tty = port->tty;
+ if (tty && urb->actual_length) {
+ /* overrun is special, not associated with a char */
+ if (status & UART_OVERRUN_ERROR)
+ tty_insert_flip_char(tty, 0, TTY_OVERRUN);
+
+ for (i = 0; i < urb->actual_length; ++i) {
+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ tty_insert_flip_char (tty, data[i], tty_flag);
+ }
+ tty_flip_buffer_push (tty);
+ }
+
+ /* Schedule the next read _if_ we are still open */
+ if (port->open_count) {
+ urb->dev = port->serial->dev;
+ result = usb_submit_urb(urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ }
+
+ return;
+}
+
+
+
+static void pl2303_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+ priv->write_urb_in_use = 0;
+ return;
+ default:
+ /* error in the urb, so we have to resubmit it */
+ 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, GFP_ATOMIC);
+ if (result)
+ dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", __FUNCTION__, result);
+ else
+ return;
+ }
+
+ priv->write_urb_in_use = 0;
+
+ /* send any buffered data */
+ pl2303_send(port);
+}
+
+
+/*
+ * pl2303_buf_alloc
+ *
+ * Allocate a circular buffer and all associated memory.
+ */
+
+static struct pl2303_buf *pl2303_buf_alloc(unsigned int size)
+{
+
+ struct pl2303_buf *pb;
+
+
+ if (size == 0)
+ return NULL;
+
+ pb = (struct pl2303_buf *)kmalloc(sizeof(struct pl2303_buf), GFP_KERNEL);
+ if (pb == NULL)
+ return NULL;
+
+ pb->buf_buf = kmalloc(size, GFP_KERNEL);
+ if (pb->buf_buf == NULL) {
+ kfree(pb);
+ return NULL;
+ }
+
+ pb->buf_size = size;
+ pb->buf_get = pb->buf_put = pb->buf_buf;
+
+ return pb;
+
+}
+
+
+/*
+ * pl2303_buf_free
+ *
+ * Free the buffer and all associated memory.
+ */
+
+static void pl2303_buf_free(struct pl2303_buf *pb)
+{
+ if (pb != NULL) {
+ if (pb->buf_buf != NULL)
+ kfree(pb->buf_buf);
+ kfree(pb);
+ }
+}
+
+
+/*
+ * pl2303_buf_clear
+ *
+ * Clear out all data in the circular buffer.
+ */
+
+static void pl2303_buf_clear(struct pl2303_buf *pb)
+{
+ if (pb != NULL)
+ pb->buf_get = pb->buf_put;
+ /* equivalent to a get of all data available */
+}
+
+
+/*
+ * pl2303_buf_data_avail
+ *
+ * Return the number of bytes of data available in the circular
+ * buffer.
+ */
+
+static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb)
+{
+ if (pb != NULL)
+ return ((pb->buf_size + pb->buf_put - pb->buf_get) % pb->buf_size);
+ else
+ return 0;
+}
+
+
+/*
+ * pl2303_buf_space_avail
+ *
+ * Return the number of bytes of space available in the circular
+ * buffer.
+ */
+
+static unsigned int pl2303_buf_space_avail(struct pl2303_buf *pb)
+{
+ if (pb != NULL)
+ return ((pb->buf_size + pb->buf_get - pb->buf_put - 1) % pb->buf_size);
+ else
+ return 0;
+}
+
+
+/*
+ * pl2303_buf_put
+ *
+ * Copy data data from a user buffer and put it into the circular buffer.
+ * Restrict to the amount of space available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static unsigned int pl2303_buf_put(struct pl2303_buf *pb, const char *buf,
+ unsigned int count)
+{
+
+ unsigned int len;
+
+
+ if (pb == NULL)
+ return 0;
+
+ len = pl2303_buf_space_avail(pb);
+ if (count > len)
+ count = len;
+
+ if (count == 0)
+ return 0;
+
+ len = pb->buf_buf + pb->buf_size - pb->buf_put;
+ if (count > len) {
+ memcpy(pb->buf_put, buf, len);
+ memcpy(pb->buf_buf, buf+len, count - len);
+ pb->buf_put = pb->buf_buf + count - len;
+ } else {
+ memcpy(pb->buf_put, buf, count);
+ if (count < len)
+ pb->buf_put += count;
+ else /* count == len */
+ pb->buf_put = pb->buf_buf;
+ }
+
+ return count;
+
+}
+
+
+/*
+ * pl2303_buf_get
+ *
+ * Get data from the circular buffer and copy to the given buffer.
+ * Restrict to the amount of data available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static unsigned int pl2303_buf_get(struct pl2303_buf *pb, char *buf,
+ unsigned int count)
+{
+
+ unsigned int len;
+
+
+ if (pb == NULL)
+ return 0;
+
+ len = pl2303_buf_data_avail(pb);
+ if (count > len)
+ count = len;
+
+ if (count == 0)
+ return 0;
+
+ len = pb->buf_buf + pb->buf_size - pb->buf_get;
+ if (count > len) {
+ memcpy(buf, pb->buf_get, len);
+ memcpy(buf+len, pb->buf_buf, count - len);
+ pb->buf_get = pb->buf_buf + count - len;
+ } else {
+ memcpy(buf, pb->buf_get, count);
+ if (count < len)
+ pb->buf_get += count;
+ else /* count == len */
+ pb->buf_get = pb->buf_buf;
+ }
+
+ return count;
+
+}
+
+static int __init pl2303_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&pl2303_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&pl2303_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&pl2303_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+
+static void __exit pl2303_exit (void)
+{
+ usb_deregister (&pl2303_driver);
+ usb_serial_deregister (&pl2303_device);
+}
+
+
+module_init(pl2303_init);
+module_exit(pl2303_exit);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_VERSION(DRIVER_VERSION);
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
new file mode 100644
index 000000000000..6c1b4712dc2f
--- /dev/null
+++ b/drivers/usb/serial/pl2303.h
@@ -0,0 +1,57 @@
+/*
+ * Prolific PL2303 USB to serial adaptor driver header file
+ *
+ * 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.
+ *
+ */
+#define PL2303_VENDOR_ID 0x067b
+#define PL2303_PRODUCT_ID 0x2303
+#define PL2303_PRODUCT_ID_RSAQ2 0x04bb
+#define PL2303_PRODUCT_ID_PHAROS 0xaaa0
+#define PL2303_PRODUCT_ID_RSAQ3 0xaaa2
+
+#define ATEN_VENDOR_ID 0x0557
+#define ATEN_VENDOR_ID2 0x0547
+#define ATEN_PRODUCT_ID 0x2008
+
+#define IODATA_VENDOR_ID 0x04bb
+#define IODATA_PRODUCT_ID 0x0a03
+
+#define ELCOM_VENDOR_ID 0x056e
+#define ELCOM_PRODUCT_ID 0x5003
+#define ELCOM_PRODUCT_ID_UCSGT 0x5004
+
+#define ITEGNO_VENDOR_ID 0x0eba
+#define ITEGNO_PRODUCT_ID 0x1080
+
+#define MA620_VENDOR_ID 0x0df7
+#define MA620_PRODUCT_ID 0x0620
+
+#define RATOC_VENDOR_ID 0x0584
+#define RATOC_PRODUCT_ID 0xb000
+
+#define TRIPP_VENDOR_ID 0x2478
+#define TRIPP_PRODUCT_ID 0x2008
+
+#define RADIOSHACK_VENDOR_ID 0x1453
+#define RADIOSHACK_PRODUCT_ID 0x4026
+
+#define DCU10_VENDOR_ID 0x0731
+#define DCU10_PRODUCT_ID 0x0528
+
+#define SITECOM_VENDOR_ID 0x6189
+#define SITECOM_PRODUCT_ID 0x2068
+
+/* Alcatel OT535/735 USB cable */
+#define ALCATEL_VENDOR_ID 0x11f7
+#define ALCATEL_PRODUCT_ID 0x02df
+
+/* Samsung I330 phone cradle */
+#define SAMSUNG_VENDOR_ID 0x04e8
+#define SAMSUNG_PRODUCT_ID 0x8001
+
+#define SIEMENS_VENDOR_ID 0x11f5
+#define SIEMENS_PRODUCT_ID_X65 0x0003
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
new file mode 100644
index 000000000000..0e85ed6c6c19
--- /dev/null
+++ b/drivers/usb/serial/safe_serial.c
@@ -0,0 +1,451 @@
+/*
+ * Safe Encapsulated USB Serial Driver
+ *
+ * Copyright (C) 2001 Lineo
+ * Copyright (C) 2001 Hewlett-Packard
+ *
+ * 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.
+ *
+ * By:
+ * Stuart Lynne <sl@lineo.com>, Tom Rushworth <tbr@lineo.com>
+ */
+
+/*
+ * The encapsultaion is designed to overcome difficulties with some USB hardware.
+ *
+ * While the USB protocol has a CRC over the data while in transit, i.e. while
+ * being carried over the bus, there is no end to end protection. If the hardware
+ * has any problems getting the data into or out of the USB transmit and receive
+ * FIFO's then data can be lost.
+ *
+ * This protocol adds a two byte trailer to each USB packet to specify the number
+ * of bytes of valid data and a 10 bit CRC that will allow the receiver to verify
+ * that the entire USB packet was received without error.
+ *
+ * Because in this case the sender and receiver are the class and function drivers
+ * there is now end to end protection.
+ *
+ * There is an additional option that can be used to force all transmitted packets
+ * to be padded to the maximum packet size. This provides a work around for some
+ * devices which have problems with small USB packets.
+ *
+ * Assuming a packetsize of N:
+ *
+ * 0..N-2 data and optional padding
+ *
+ * N-2 bits 7-2 - number of bytes of valid data
+ * bits 1-0 top two bits of 10 bit CRC
+ * N-1 bottom 8 bits of 10 bit CRC
+ *
+ *
+ * | Data Length | 10 bit CRC |
+ * + 7 . 6 . 5 . 4 . 3 . 2 . 1 . 0 | 7 . 6 . 5 . 4 . 3 . 2 . 1 . 0 +
+ *
+ * The 10 bit CRC is computed across the sent data, followed by the trailer with
+ * the length set and the CRC set to zero. The CRC is then OR'd into the trailer.
+ *
+ * When received a 10 bit CRC is computed over the entire frame including the trailer
+ * and should be equal to zero.
+ *
+ * Two module parameters are used to control the encapsulation, if both are
+ * turned of the module works as a simple serial device with NO
+ * encapsulation.
+ *
+ * See linux/drivers/usbd/serial_fd for a device function driver
+ * implementation of this.
+ *
+ */
+
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+
+
+#ifndef CONFIG_USB_SAFE_PADDED
+#define CONFIG_USB_SAFE_PADDED 0
+#endif
+
+static int debug;
+static int safe = 1;
+static int padded = CONFIG_USB_SAFE_PADDED;
+
+#define DRIVER_VERSION "v0.0b"
+#define DRIVER_AUTHOR "sl@lineo.com, tbr@lineo.com"
+#define DRIVER_DESC "USB Safe Encapsulated Serial"
+
+MODULE_AUTHOR (DRIVER_AUTHOR);
+MODULE_DESCRIPTION (DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
+#if defined(CONFIG_USBD_SAFE_SERIAL_VENDOR) && !defined(CONFIG_USBD_SAFE_SERIAL_PRODUCT)
+#abort "SAFE_SERIAL_VENDOR defined without SAFE_SERIAL_PRODUCT"
+#endif
+
+#if ! defined(CONFIG_USBD_SAFE_SERIAL_VENDOR)
+static __u16 vendor; // no default
+static __u16 product; // no default
+module_param(vendor, ushort, 0);
+MODULE_PARM_DESC(vendor, "User specified USB idVendor (required)");
+module_param(product, ushort, 0);
+MODULE_PARM_DESC(product, "User specified USB idProduct (required)");
+#endif
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
+module_param(safe, bool, 0);
+MODULE_PARM_DESC(safe, "Turn Safe Encapsulation On/Off");
+
+module_param(padded, bool, 0);
+MODULE_PARM_DESC(padded, "Pad to full wMaxPacketSize On/Off");
+
+#define CDC_DEVICE_CLASS 0x02
+
+#define CDC_INTERFACE_CLASS 0x02
+#define CDC_INTERFACE_SUBCLASS 0x06
+
+#define LINEO_INTERFACE_CLASS 0xff
+
+#define LINEO_INTERFACE_SUBCLASS_SAFENET 0x01
+#define LINEO_SAFENET_CRC 0x01
+#define LINEO_SAFENET_CRC_PADDED 0x02
+
+#define LINEO_INTERFACE_SUBCLASS_SAFESERIAL 0x02
+#define LINEO_SAFESERIAL_CRC 0x01
+#define LINEO_SAFESERIAL_CRC_PADDED 0x02
+
+
+#define MY_USB_DEVICE(vend,prod,dc,ic,isc) \
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_CLASS | \
+ USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
+ .idVendor = (vend), \
+ .idProduct = (prod),\
+ .bDeviceClass = (dc),\
+ .bInterfaceClass = (ic), \
+ .bInterfaceSubClass = (isc),
+
+static struct usb_device_id id_table[] = {
+ {MY_USB_DEVICE (0x49f, 0xffff, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Itsy
+ {MY_USB_DEVICE (0x3f0, 0x2101, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Calypso
+ {MY_USB_DEVICE (0x4dd, 0x8001, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Iris
+ {MY_USB_DEVICE (0x4dd, 0x8002, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Collie
+ {MY_USB_DEVICE (0x4dd, 0x8003, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Collie
+ {MY_USB_DEVICE (0x4dd, 0x8004, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Collie
+ {MY_USB_DEVICE (0x5f9, 0xffff, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Sharp tmp
+#if defined(CONFIG_USB_SAFE_SERIAL_VENDOR)
+ {MY_USB_DEVICE
+ (CONFIG_USB_SAFE_SERIAL_VENDOR, CONFIG_USB_SAFE_SERIAL_PRODUCT, CDC_DEVICE_CLASS,
+ LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)},
+#endif
+ // extra null entry for module
+ // vendor/produc parameters
+ {MY_USB_DEVICE (0, 0, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)},
+ {} // terminating entry
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver safe_driver = {
+ .owner = THIS_MODULE,
+ .name = "safe_serial",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table,
+};
+
+static __u16 crc10_table[256] = {
+ 0x000, 0x233, 0x255, 0x066, 0x299, 0x0aa, 0x0cc, 0x2ff, 0x301, 0x132, 0x154, 0x367, 0x198, 0x3ab, 0x3cd, 0x1fe,
+ 0x031, 0x202, 0x264, 0x057, 0x2a8, 0x09b, 0x0fd, 0x2ce, 0x330, 0x103, 0x165, 0x356, 0x1a9, 0x39a, 0x3fc, 0x1cf,
+ 0x062, 0x251, 0x237, 0x004, 0x2fb, 0x0c8, 0x0ae, 0x29d, 0x363, 0x150, 0x136, 0x305, 0x1fa, 0x3c9, 0x3af, 0x19c,
+ 0x053, 0x260, 0x206, 0x035, 0x2ca, 0x0f9, 0x09f, 0x2ac, 0x352, 0x161, 0x107, 0x334, 0x1cb, 0x3f8, 0x39e, 0x1ad,
+ 0x0c4, 0x2f7, 0x291, 0x0a2, 0x25d, 0x06e, 0x008, 0x23b, 0x3c5, 0x1f6, 0x190, 0x3a3, 0x15c, 0x36f, 0x309, 0x13a,
+ 0x0f5, 0x2c6, 0x2a0, 0x093, 0x26c, 0x05f, 0x039, 0x20a, 0x3f4, 0x1c7, 0x1a1, 0x392, 0x16d, 0x35e, 0x338, 0x10b,
+ 0x0a6, 0x295, 0x2f3, 0x0c0, 0x23f, 0x00c, 0x06a, 0x259, 0x3a7, 0x194, 0x1f2, 0x3c1, 0x13e, 0x30d, 0x36b, 0x158,
+ 0x097, 0x2a4, 0x2c2, 0x0f1, 0x20e, 0x03d, 0x05b, 0x268, 0x396, 0x1a5, 0x1c3, 0x3f0, 0x10f, 0x33c, 0x35a, 0x169,
+ 0x188, 0x3bb, 0x3dd, 0x1ee, 0x311, 0x122, 0x144, 0x377, 0x289, 0x0ba, 0x0dc, 0x2ef, 0x010, 0x223, 0x245, 0x076,
+ 0x1b9, 0x38a, 0x3ec, 0x1df, 0x320, 0x113, 0x175, 0x346, 0x2b8, 0x08b, 0x0ed, 0x2de, 0x021, 0x212, 0x274, 0x047,
+ 0x1ea, 0x3d9, 0x3bf, 0x18c, 0x373, 0x140, 0x126, 0x315, 0x2eb, 0x0d8, 0x0be, 0x28d, 0x072, 0x241, 0x227, 0x014,
+ 0x1db, 0x3e8, 0x38e, 0x1bd, 0x342, 0x171, 0x117, 0x324, 0x2da, 0x0e9, 0x08f, 0x2bc, 0x043, 0x270, 0x216, 0x025,
+ 0x14c, 0x37f, 0x319, 0x12a, 0x3d5, 0x1e6, 0x180, 0x3b3, 0x24d, 0x07e, 0x018, 0x22b, 0x0d4, 0x2e7, 0x281, 0x0b2,
+ 0x17d, 0x34e, 0x328, 0x11b, 0x3e4, 0x1d7, 0x1b1, 0x382, 0x27c, 0x04f, 0x029, 0x21a, 0x0e5, 0x2d6, 0x2b0, 0x083,
+ 0x12e, 0x31d, 0x37b, 0x148, 0x3b7, 0x184, 0x1e2, 0x3d1, 0x22f, 0x01c, 0x07a, 0x249, 0x0b6, 0x285, 0x2e3, 0x0d0,
+ 0x11f, 0x32c, 0x34a, 0x179, 0x386, 0x1b5, 0x1d3, 0x3e0, 0x21e, 0x02d, 0x04b, 0x278, 0x087, 0x2b4, 0x2d2, 0x0e1,
+};
+
+#define CRC10_INITFCS 0x000 // Initial FCS value
+#define CRC10_GOODFCS 0x000 // Good final FCS value
+#define CRC10_FCS(fcs, c) ( (((fcs) << 8) & 0x3ff) ^ crc10_table[((fcs) >> 2) & 0xff] ^ (c))
+
+/**
+ * fcs_compute10 - memcpy and calculate 10 bit CRC across buffer
+ * @sp: pointer to buffer
+ * @len: number of bytes
+ * @fcs: starting FCS
+ *
+ * Perform a memcpy and calculate fcs using ppp 10bit CRC algorithm. Return
+ * new 10 bit FCS.
+ */
+static __u16 __inline__ fcs_compute10 (unsigned char *sp, int len, __u16 fcs)
+{
+ for (; len-- > 0; fcs = CRC10_FCS (fcs, *sp++));
+ return fcs;
+}
+
+static void safe_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
+ unsigned char *data = urb->transfer_buffer;
+ unsigned char length = urb->actual_length;
+ int i;
+ int result;
+
+ dbg ("%s", __FUNCTION__);
+
+ if (urb->status) {
+ dbg ("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ dbg ("safe_read_bulk_callback length: %d", port->read_urb->actual_length);
+#ifdef ECHO_RCV
+ {
+ int i;
+ unsigned char *cp = port->read_urb->transfer_buffer;
+ for (i = 0; i < port->read_urb->actual_length; i++) {
+ if ((i % 32) == 0) {
+ printk ("\nru[%02x] ", i);
+ }
+ printk ("%02x ", *cp++);
+ }
+ printk ("\n");
+ }
+#endif
+ if (safe) {
+ __u16 fcs;
+ if (!(fcs = fcs_compute10 (data, length, CRC10_INITFCS))) {
+
+ int actual_length = data[length - 2] >> 2;
+
+ if (actual_length <= (length - 2)) {
+
+ info ("%s - actual: %d", __FUNCTION__, actual_length);
+
+ for (i = 0; i < actual_length; i++) {
+ tty_insert_flip_char (port->tty, data[i], 0);
+ }
+ tty_flip_buffer_push (port->tty);
+ } else {
+ err ("%s - inconsistent lengths %d:%d", __FUNCTION__,
+ actual_length, length);
+ }
+ } else {
+ err ("%s - bad CRC %x", __FUNCTION__, fcs);
+ }
+ } else {
+ for (i = 0; i < length; i++) {
+ tty_insert_flip_char (port->tty, data[i], 0);
+ }
+ tty_flip_buffer_push (port->tty);
+ }
+
+ /* Continue trying to always read */
+ usb_fill_bulk_urb (urb, port->serial->dev,
+ usb_rcvbulkpipe (port->serial->dev, port->bulk_in_endpointAddress),
+ urb->transfer_buffer, urb->transfer_buffer_length,
+ safe_read_bulk_callback, port);
+
+ if ((result = usb_submit_urb (urb, GFP_ATOMIC))) {
+ err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+ }
+}
+
+static int safe_write (struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ unsigned char *data;
+ int result;
+ int i;
+ int packet_length;
+
+ dbg ("safe_write port: %p %d urb: %p count: %d", port, port->number, port->write_urb,
+ count);
+
+ if (!port->write_urb) {
+ dbg ("%s - write urb NULL", __FUNCTION__);
+ return (0);
+ }
+
+ dbg ("safe_write write_urb: %d transfer_buffer_length",
+ port->write_urb->transfer_buffer_length);
+
+ if (!port->write_urb->transfer_buffer_length) {
+ dbg ("%s - write urb transfer_buffer_length zero", __FUNCTION__);
+ return (0);
+ }
+ 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);
+ }
+
+ packet_length = port->bulk_out_size; // get max packetsize
+
+ i = packet_length - (safe ? 2 : 0); // get bytes to send
+ count = (count > i) ? i : count;
+
+
+ // get the data into the transfer buffer
+ data = port->write_urb->transfer_buffer;
+ memset (data, '0', packet_length);
+
+ memcpy (data, buf, count);
+
+ if (safe) {
+ __u16 fcs;
+
+ // pad if necessary
+ if (!padded) {
+ packet_length = count + 2;
+ }
+ // set count
+ data[packet_length - 2] = count << 2;
+ data[packet_length - 1] = 0;
+
+ // compute fcs and insert into trailer
+ fcs = fcs_compute10 (data, packet_length, CRC10_INITFCS);
+ data[packet_length - 2] |= fcs >> 8;
+ data[packet_length - 1] |= fcs & 0xff;
+
+ // set length to send
+ port->write_urb->transfer_buffer_length = packet_length;
+ } else {
+ port->write_urb->transfer_buffer_length = count;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer);
+#ifdef ECHO_TX
+ {
+ int i;
+ unsigned char *cp = port->write_urb->transfer_buffer;
+ for (i = 0; i < port->write_urb->transfer_buffer_length; i++) {
+ if ((i % 32) == 0) {
+ printk ("\nsu[%02x] ", i);
+ }
+ printk ("%02x ", *cp++);
+ }
+ printk ("\n");
+ }
+#endif
+ port->write_urb->dev = port->serial->dev;
+ if ((result = usb_submit_urb (port->write_urb, GFP_KERNEL))) {
+ err ("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+ return 0;
+ }
+ dbg ("%s urb: %p submitted", __FUNCTION__, port->write_urb);
+
+ return (count);
+}
+
+static int safe_write_room (struct usb_serial_port *port)
+{
+ int room = 0; // Default: no room
+
+ dbg ("%s", __FUNCTION__);
+
+ if (port->write_urb->status != -EINPROGRESS)
+ room = port->bulk_out_size - (safe ? 2 : 0);
+
+ if (room) {
+ dbg ("safe_write_room returns %d", room);
+ }
+
+ return (room);
+}
+
+static int safe_startup (struct usb_serial *serial)
+{
+ switch (serial->interface->cur_altsetting->desc.bInterfaceProtocol) {
+ case LINEO_SAFESERIAL_CRC:
+ break;
+ case LINEO_SAFESERIAL_CRC_PADDED:
+ padded = 1;
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static struct usb_serial_device_type safe_device = {
+ .owner = THIS_MODULE,
+ .name = "Safe",
+ .id_table = id_table,
+ .num_interrupt_in = NUM_DONT_CARE,
+ .num_bulk_in = NUM_DONT_CARE,
+ .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .write = safe_write,
+ .write_room = safe_write_room,
+ .read_bulk_callback = safe_read_bulk_callback,
+ .attach = safe_startup,
+};
+
+static int __init safe_init (void)
+{
+ int i, retval;
+
+ info (DRIVER_VERSION " " DRIVER_AUTHOR);
+ info (DRIVER_DESC);
+ info ("vendor: %x product: %x safe: %d padded: %d\n", vendor, product, safe, padded);
+
+ // if we have vendor / product parameters patch them into id list
+ if (vendor || product) {
+ info ("vendor: %x product: %x\n", vendor, product);
+
+ for (i = 0; i < (sizeof (id_table) / sizeof (struct usb_device_id)); i++) {
+ if (!id_table[i].idVendor && !id_table[i].idProduct) {
+ id_table[i].idVendor = vendor;
+ id_table[i].idProduct = product;
+ break;
+ }
+ }
+ }
+
+ retval = usb_serial_register(&safe_device);
+ if (retval)
+ goto failed_usb_serial_register;
+ retval = usb_register(&safe_driver);
+ if (retval)
+ goto failed_usb_register;
+
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&safe_device);
+failed_usb_serial_register:
+ return retval;
+}
+
+static void __exit safe_exit (void)
+{
+ usb_deregister (&safe_driver);
+ usb_serial_deregister (&safe_device);
+}
+
+module_init (safe_init);
+module_exit (safe_exit);
diff --git a/drivers/usb/serial/ti_fw_3410.h b/drivers/usb/serial/ti_fw_3410.h
new file mode 100644
index 000000000000..71e88579dfe0
--- /dev/null
+++ b/drivers/usb/serial/ti_fw_3410.h
@@ -0,0 +1,885 @@
+/* vi: ts=8 sw=8
+ *
+ * TI 3410 USB Serial Driver Firmware Header
+ *
+ * Copyright (C) 2004 Texas Instruments
+ *
+ * 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.
+ */
+
+#ifndef _TI_FW_3410_H_
+#define _TI_FW_3410_H_
+
+/* firmware 9/10/04 FW3410_Special_StartWdogOnStartPort */
+
+static unsigned char ti_fw_3410[] = {
+0xC2, 0x35, /* firmware image length excluding header, little endian */
+0x00, /* placeholder for checksum */
+
+0x02,0x00,0x1e,0x02,0x1a,0xdb,0xff,0xff,0xff,0xff,0xff,0x02,0x32,0xcb,0xff,0xff,
+0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x02,0x33,0x76,0x75,0x81,
+0xce,0x90,0xfd,0xe8,0x85,0x83,0xa0,0x12,0x34,0xea,0xec,0x4d,0x60,0x6a,0x78,0xab,
+0x80,0x03,0x76,0x00,0x18,0xb8,0x9c,0xfa,0x78,0x7f,0x80,0x03,0x76,0x00,0x18,0xb8,
+0x65,0xfa,0x78,0x20,0x80,0x03,0x76,0x00,0x18,0xb8,0x20,0xfa,0x90,0xfd,0xdd,0xae,
+0x83,0xaf,0x82,0x90,0xfb,0xf8,0x12,0x00,0xa1,0x60,0x05,0xe4,0xf0,0xa3,0x80,0xf6,
+0x90,0xfd,0xe8,0xa8,0x82,0x90,0xfd,0xe8,0xa9,0x82,0xe8,0xc3,0x99,0x50,0x05,0x76,
+0x00,0x08,0x80,0xf6,0x90,0x00,0xff,0x12,0x00,0xaa,0x90,0x01,0x03,0x12,0x00,0xaa,
+0x90,0x01,0x07,0x12,0x00,0xaa,0x90,0x01,0x0b,0x12,0x00,0xc8,0x90,0x01,0x11,0x12,
+0x00,0xc8,0x90,0x01,0x17,0x12,0x00,0xc8,0x75,0xd0,0x00,0x12,0x33,0xc8,0x02,0x01,
+0x1d,0xef,0x65,0x82,0x70,0x03,0xee,0x65,0x83,0x22,0xe4,0x93,0xf8,0x74,0x01,0x93,
+0xf9,0x74,0x02,0x93,0xfe,0x74,0x03,0x93,0xf5,0x82,0x8e,0x83,0xe8,0x69,0x70,0x01,
+0x22,0xe4,0x93,0xf6,0xa3,0x08,0x80,0xf4,0xe4,0x93,0xfc,0x74,0x01,0x93,0xfd,0x74,
+0x02,0x93,0xfe,0x74,0x03,0x93,0xff,0x74,0x04,0x93,0xf8,0x74,0x05,0x93,0xf5,0x82,
+0x88,0x83,0x12,0x00,0xa1,0x70,0x01,0x22,0xe4,0x93,0xa3,0xa8,0x83,0xa9,0x82,0x8c,
+0x83,0x8d,0x82,0xf0,0xa3,0xac,0x83,0xad,0x82,0x88,0x83,0x89,0x82,0x80,0xe3,0x21,
+0x21,0x04,0x92,0x80,0x80,0x04,0x92,0xac,0xae,0x04,0x92,0xfd,0xe8,0x04,0x94,0x04,
+0x94,0xfb,0xf3,0x04,0x99,0x04,0x94,0xfb,0xf3,0x04,0xf9,0x04,0xf9,0x80,0xfe,0xd0,
+0xf0,0x30,0xf0,0x09,0x20,0xf3,0x03,0xf6,0x80,0x10,0xf7,0x80,0x0d,0x30,0xf1,0x09,
+0x20,0xf3,0x03,0xf2,0x80,0x04,0xf3,0x80,0x01,0xf0,0x20,0xf4,0x04,0xfc,0xd0,0xe0,
+0xcc,0x22,0xcc,0xc0,0xe0,0x12,0x01,0x5a,0x02,0x01,0x4b,0xbc,0x00,0x05,0xd0,0xf0,
+0xac,0xf0,0x22,0xc3,0x13,0xdc,0xfc,0x02,0x01,0x21,0xbf,0x00,0x09,0xed,0x25,0x82,
+0x75,0xf0,0x01,0xf8,0xe6,0x22,0xbf,0x01,0x0f,0xed,0x25,0x82,0xf5,0x82,0xee,0x35,
+0x83,0xf5,0x83,0x75,0xf0,0x04,0xe0,0x22,0xed,0x25,0x82,0x75,0xf0,0x02,0xf8,0xe2,
+0x22,0xd0,0x83,0xd0,0x82,0xf5,0xf0,0xc3,0xe4,0x93,0xa3,0xc5,0xf0,0x95,0xf0,0xc0,
+0xe0,0xc3,0xd0,0xf0,0xe4,0x93,0xa3,0x95,0xf0,0x40,0x12,0xa3,0xa3,0xc3,0xe5,0xf0,
+0x33,0x50,0x02,0x05,0x83,0x25,0x82,0xf5,0x82,0x50,0x02,0x05,0x83,0x74,0x01,0x93,
+0xc0,0xe0,0xe4,0x93,0xc0,0xe0,0x22,0xd0,0x83,0xd0,0x82,0xf5,0xf0,0xe4,0x93,0x70,
+0x09,0x74,0x01,0x93,0x70,0x04,0xa3,0xa3,0x80,0x0c,0x74,0x02,0x93,0x65,0xf0,0x60,
+0x05,0xa3,0xa3,0xa3,0x80,0xe7,0x74,0x01,0x93,0xc0,0xe0,0xe4,0x93,0xc0,0xe0,0x22,
+0x12,0x02,0x5b,0x02,0x01,0xf2,0x12,0x02,0xaf,0x02,0x01,0xf2,0x12,0x02,0xd3,0x02,
+0x01,0xf2,0x30,0xe0,0x07,0x20,0xe3,0x02,0xe6,0x22,0xe7,0x22,0x30,0xe1,0x07,0x20,
+0xe3,0x02,0xe2,0x22,0xe3,0x22,0x30,0xe2,0x02,0xe0,0x22,0xe4,0x93,0x22,0x12,0x02,
+0xd3,0x02,0x02,0x1a,0x12,0x02,0xaf,0x02,0x02,0x1a,0xab,0xf0,0x12,0x02,0x24,0xcb,
+0xc5,0xf0,0xcb,0x22,0x30,0xe0,0x10,0x20,0xe3,0x06,0xe6,0xf5,0xf0,0x08,0xe6,0x22,
+0xe7,0xf5,0xf0,0x09,0xe7,0x19,0x22,0x30,0xe1,0x10,0x20,0xe3,0x06,0xe2,0xf5,0xf0,
+0x08,0xe2,0x22,0xe3,0xf5,0xf0,0x09,0xe3,0x19,0x22,0x30,0xe2,0x06,0xe0,0xf5,0xf0,
+0xa3,0xe0,0x22,0xe4,0x93,0xf5,0xf0,0x74,0x01,0x93,0x22,0xbb,0x00,0x03,0x74,0x09,
+0x22,0xbb,0x01,0x07,0x89,0x82,0x8a,0x83,0x74,0x04,0x22,0xbb,0x02,0x07,0x89,0x82,
+0x8a,0x83,0x74,0x10,0x22,0x74,0x0a,0x22,0x02,0x02,0x7b,0xbb,0x00,0x07,0xe9,0x25,
+0x82,0xf8,0x74,0x01,0x22,0xbb,0x01,0x0d,0xe9,0x25,0x82,0xf5,0x82,0xea,0x35,0x83,
+0xf5,0x83,0x74,0x04,0x22,0xbb,0x02,0x0d,0xe9,0x25,0x82,0xf5,0x82,0xea,0x35,0x83,
+0xf5,0x83,0x74,0x10,0x22,0xe9,0x25,0x82,0xf8,0x74,0x02,0x22,0x02,0x02,0xaf,0xbf,
+0x00,0x05,0xed,0xf8,0x74,0x01,0x22,0xbf,0x01,0x07,0x8d,0x82,0x8e,0x83,0x74,0x04,
+0x22,0xbf,0x02,0x07,0x8d,0x82,0x8e,0x83,0x74,0x10,0x22,0xed,0xf8,0x74,0x02,0x22,
+0x02,0x02,0xd3,0xbf,0x00,0x07,0xed,0x25,0x82,0xf8,0x74,0x01,0x22,0xbf,0x01,0x0d,
+0xed,0x25,0x82,0xf5,0x82,0xee,0x35,0x83,0xf5,0x83,0x74,0x04,0x22,0xbf,0x02,0x0d,
+0xed,0x25,0x82,0xf5,0x82,0xee,0x35,0x83,0xf5,0x83,0x74,0x10,0x22,0xed,0x25,0x82,
+0xf8,0x74,0x02,0x22,0x02,0x03,0x07,0xc0,0xe0,0x12,0x02,0x5b,0x02,0x03,0x1f,0xc0,
+0xe0,0x12,0x02,0xaf,0x02,0x03,0x1f,0xc0,0xe0,0x12,0x02,0xd3,0x02,0x03,0x1f,0x30,
+0xe0,0x0b,0x20,0xe3,0x04,0xd0,0xe0,0xf6,0x22,0xd0,0xe0,0xf7,0x22,0x30,0xe1,0x0b,
+0x20,0xe3,0x04,0xd0,0xe0,0xf2,0x22,0xd0,0xe0,0xf3,0x22,0xd0,0xe0,0xf0,0x22,0xc9,
+0xcd,0xc9,0xca,0xce,0xca,0xcb,0xcf,0xcb,0x12,0x03,0x52,0xed,0xf9,0xee,0xfa,0xef,
+0xfb,0x22,0xbb,0x00,0x2f,0xbf,0x00,0x0a,0xfa,0xed,0xf8,0xe7,0xf6,0x08,0x09,0xda,
+0xfa,0x22,0xbf,0x01,0x12,0x8d,0x82,0x8e,0x83,0xf8,0x02,0x03,0x6f,0x09,0xa3,0xe7,
+0xf0,0xd8,0xfa,0x22,0x02,0x03,0x7a,0xfa,0xed,0xf8,0xe7,0xf2,0x08,0x09,0xda,0xfa,
+0x22,0x02,0x03,0x84,0xbb,0x01,0x4d,0xbf,0x00,0x14,0x89,0x82,0x8a,0x83,0xf9,0xed,
+0xf8,0x02,0x03,0x96,0x08,0xa3,0xe0,0xf6,0xd9,0xfa,0x22,0x02,0x03,0xa7,0xbf,0x01,
+0x22,0x8d,0x82,0x8e,0x83,0xfb,0x08,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xe0,
+0xa3,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xf0,0xa3,0xdb,0xea,0xd8,0xe8,0x22,
+0x02,0x03,0xca,0x8d,0x82,0x8e,0x83,0xf9,0xed,0xf8,0xe0,0xf2,0x08,0xa3,0xd9,0xfa,
+0x22,0x02,0x03,0xd4,0xbb,0x02,0x4d,0xbf,0x00,0x12,0x89,0x82,0x8a,0x83,0xf9,0xed,
+0xf8,0x02,0x03,0xe6,0x08,0xa3,0xe4,0x93,0xf6,0xd9,0xf9,0x22,0xbf,0x01,0x23,0x8d,
+0x82,0x8e,0x83,0xfb,0x08,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xe4,0x93,0xa3,
+0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xf0,0xa3,0xdb,0xe9,0xd8,0xe7,0x22,0x02,
+0x04,0x19,0x89,0x82,0x8a,0x83,0xf9,0xed,0xf8,0xe4,0x93,0xf2,0x08,0xa3,0xd9,0xf9,
+0x22,0x02,0x04,0x2a,0xbf,0x00,0x0d,0xfa,0xed,0xf8,0xe3,0xf6,0x08,0x09,0xda,0xfa,
+0x22,0x02,0x04,0x34,0xbf,0x01,0x12,0x8d,0x82,0x8e,0x83,0xf8,0x02,0x04,0x41,0x09,
+0xa3,0xe3,0xf0,0xd8,0xfa,0x22,0x02,0x04,0x4c,0xfa,0xed,0xf8,0xe3,0xf2,0x08,0x09,
+0xda,0xfa,0x22,0x02,0x04,0x56,0xe6,0xfb,0x08,0xe6,0xfa,0x08,0xe6,0xf9,0x04,0xf6,
+0x18,0x70,0x01,0x06,0x22,0xe6,0xff,0x08,0xe6,0xfe,0x08,0xe6,0xfd,0x22,0xef,0xf0,
+0xa3,0xee,0xf0,0xa3,0xed,0xf0,0x22,0xeb,0xf0,0xa3,0xea,0xf0,0xa3,0xe9,0xf0,0x22,
+0xe0,0xff,0xa3,0xe0,0xfe,0xa3,0xe0,0xfd,0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,
+0xf9,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xf9,0x00,0x61,0x05,0x68,0x00,
+0x26,0x05,0x8f,0x00,0x33,0x0a,0x00,0x00,0x61,0x0a,0x6c,0x00,0x66,0x15,0x1d,0x00,
+0x61,0x0c,0xf0,0x00,0x61,0x09,0xa0,0x00,0x61,0x09,0xd7,0x00,0x61,0x0d,0xb7,0x00,
+0x61,0x0b,0xe8,0x00,0x61,0x0a,0x13,0x00,0x61,0x0a,0x48,0x00,0x61,0x17,0x15,0x00,
+0x33,0x17,0x28,0x00,0x34,0x1d,0xf6,0x00,0x43,0x1e,0xa1,0x00,0x44,0x20,0x0e,0x00,
+0x44,0x1f,0xfc,0x00,0x47,0x1e,0xc8,0x00,0x47,0x1f,0x6d,0x00,0x4d,0x1f,0xbe,0x00,
+0x4f,0x1e,0xea,0x00,0x58,0x32,0x56,0x00,0x61,0x7c,0xcc,0x7d,0xff,0x12,0x1c,0xa7,
+0x22,0x90,0xff,0xfc,0xe0,0x20,0xe7,0x2d,0xc2,0xaf,0xae,0x59,0xaf,0x58,0x75,0x5a,
+0x20,0xe5,0x5a,0x14,0xc5,0x5a,0x60,0x19,0xe4,0xfe,0x7f,0x05,0xee,0x4f,0xce,0x24,
+0xff,0xce,0xcf,0x34,0xff,0xcf,0x60,0x07,0xe4,0x90,0xff,0x92,0xf0,0x80,0xed,0x80,
+0xe0,0x8e,0x59,0x8f,0x58,0x22,0x12,0x05,0x01,0x7d,0x07,0x7c,0xb7,0x12,0x32,0x72,
+0x7d,0x0f,0x7c,0x6e,0x12,0x32,0x8c,0x78,0x9d,0x7a,0x06,0xe4,0xf6,0x08,0xda,0xfc,
+0x7a,0x06,0x12,0x05,0xc4,0x7c,0x03,0x12,0x0e,0x4c,0x12,0x21,0x4a,0xe4,0xfe,0xff,
+0x7c,0x0f,0x12,0x31,0xfb,0xd2,0xa8,0x22,0x12,0x30,0xe6,0xe4,0x90,0xfc,0x38,0xf0,
+0x90,0xff,0xf0,0xe0,0x30,0xe4,0x08,0x74,0x01,0x90,0xfc,0x39,0xf0,0x80,0x05,0xe4,
+0x90,0xfc,0x39,0xf0,0x7d,0x0a,0x7c,0x00,0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,
+0x30,0xe6,0x90,0xfc,0x39,0xe0,0x14,0x70,0x0e,0x90,0xff,0xf0,0xe0,0x44,0x10,0xf0,
+0x7c,0x00,0x12,0x25,0xbf,0x80,0x19,0x90,0xfc,0x39,0xe0,0x70,0x0e,0x90,0xff,0xf0,
+0xe0,0x54,0xef,0xf0,0x7c,0x00,0x12,0x25,0xbf,0x80,0x05,0x7c,0x17,0x12,0x25,0xbf,
+0x12,0x31,0x69,0x22,0x90,0xff,0xf0,0xe0,0x54,0xab,0xf0,0x90,0xff,0xf0,0xe0,0x44,
+0x20,0xf0,0x22,0x8c,0x37,0x8d,0x36,0x78,0x82,0xed,0xf6,0x08,0xec,0xf6,0xed,0xfe,
+0xec,0xfd,0x7f,0x01,0x90,0x00,0x05,0x12,0x01,0xec,0x78,0x80,0xf6,0x78,0x82,0xe6,
+0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x04,0x12,0x01,0xec,
+0x54,0x0f,0xfc,0x7d,0x80,0x12,0x17,0x46,0x78,0x80,0xe6,0x70,0x0d,0xad,0x3a,0xae,
+0x39,0xaf,0x38,0xe4,0x12,0x03,0x0f,0x7c,0x08,0x22,0x90,0xff,0xf0,0xe0,0x54,0xfe,
+0xf0,0x90,0xff,0xf0,0xe0,0x54,0xfd,0xf0,0x80,0x1e,0x78,0x82,0xe6,0xfd,0x08,0xe6,
+0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x25,0xe0,0x44,
+0x01,0x90,0xff,0xf3,0xf0,0x02,0x06,0xd0,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,
+0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x06,0x12,0x02,0x0e,0x54,0xfe,0x90,0xff,0xf3,
+0xf0,0x80,0x2b,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,
+0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xeb,0x90,0xff,0xf1,0xf0,0x12,0x08,0xbf,0x40,
+0x0d,0xad,0x3a,0xae,0x39,0xaf,0x38,0xe4,0x12,0x03,0x0f,0x7c,0x18,0x22,0x78,0x82,
+0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,
+0x0e,0x90,0xff,0xf1,0xf0,0x12,0x08,0xbf,0x40,0x0d,0xad,0x3a,0xae,0x39,0xaf,0x38,
+0xe4,0x12,0x03,0x0f,0x7c,0x18,0x22,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,
+0xec,0xfd,0x7f,0x01,0x90,0x00,0x06,0x12,0x02,0x0e,0x44,0x01,0x90,0xff,0xf3,0xf0,
+0x78,0x83,0xe6,0x24,0x03,0xf6,0x18,0xe6,0x34,0x00,0xf6,0x78,0x80,0xe6,0x24,0xfe,
+0x50,0x09,0x90,0xff,0xf0,0xe0,0x54,0xfd,0xf0,0x80,0x07,0x90,0xff,0xf0,0xe0,0x44,
+0x02,0xf0,0xe4,0x90,0xff,0xf1,0xf0,0x78,0x81,0x76,0x00,0x78,0x80,0xe6,0x24,0xff,
+0xfc,0xe4,0x34,0xff,0xfd,0x78,0x81,0xe6,0x7f,0x00,0xfe,0xec,0xd3,0x9e,0xef,0x64,
+0x80,0xcd,0x64,0x80,0x9d,0x40,0x2f,0x12,0x08,0xa4,0x40,0x0f,0x78,0x81,0xe6,0xad,
+0x3a,0xae,0x39,0xaf,0x38,0x12,0x03,0x0f,0x7c,0x18,0x22,0x90,0xff,0xf2,0xe0,0xfc,
+0x78,0x82,0x86,0x83,0x08,0x86,0x82,0xec,0xf0,0x78,0x81,0x06,0xa3,0x78,0x82,0xa6,
+0x83,0x08,0xa6,0x82,0x80,0xb5,0x12,0x08,0xa4,0x40,0x0f,0x78,0x81,0xe6,0xad,0x3a,
+0xae,0x39,0xaf,0x38,0x12,0x03,0x0f,0x7c,0x18,0x22,0x90,0xff,0xf2,0xe0,0xfc,0x78,
+0x82,0x86,0x83,0x08,0x86,0x82,0xec,0xf0,0x78,0x80,0xe6,0xad,0x3a,0xae,0x39,0xaf,
+0x38,0x12,0x03,0x0f,0x7c,0x00,0x22,0x8c,0x37,0x8d,0x36,0x78,0x82,0xed,0xf6,0x08,
+0xec,0xf6,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x05,0x12,0x01,0xec,0x78,0x81,
+0xf6,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,
+0x04,0x12,0x01,0xec,0x54,0x0f,0xfc,0x7d,0x81,0x12,0x17,0x46,0x78,0x81,0xe6,0x70,
+0x03,0x7c,0x08,0x22,0x90,0xff,0xf0,0xe0,0x54,0xfe,0xf0,0x90,0xff,0xf0,0xe0,0x54,
+0xfd,0xf0,0x80,0x1b,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,
+0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x25,0xe0,0x90,0xff,0xf3,0xf0,0x80,0x5b,0x78,
+0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x06,0x12,
+0x02,0x0e,0x54,0xfe,0x90,0xff,0xf3,0xf0,0x80,0x21,0x78,0x82,0xe6,0xfd,0x08,0xe6,
+0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xeb,0x90,
+0xff,0xf1,0xf0,0x12,0x08,0xbf,0x40,0x03,0x7c,0x18,0x22,0x78,0x82,0xe6,0xfd,0x08,
+0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x90,0xff,
+0xf1,0xf0,0x12,0x08,0xbf,0x40,0x03,0x7c,0x18,0x22,0x78,0x83,0xe6,0x24,0x0a,0xf6,
+0x18,0xe6,0x34,0x00,0xf6,0x78,0x80,0x76,0x00,0x78,0x81,0xe6,0x24,0xff,0xfc,0xe4,
+0x34,0xff,0xfd,0x78,0x80,0xe6,0x7f,0x00,0xfe,0xec,0xd3,0x9e,0xef,0x64,0x80,0xcd,
+0x64,0x80,0x9d,0x40,0x21,0x78,0x82,0x86,0x83,0x08,0x86,0x82,0xe0,0x90,0xff,0xf1,
+0xf0,0x12,0x08,0xbf,0x40,0x03,0x7c,0x18,0x22,0x78,0x80,0x06,0x78,0x83,0x06,0xe6,
+0x18,0x70,0x01,0x06,0x80,0xc3,0x90,0xff,0xf0,0xe0,0x44,0x01,0xf0,0x78,0x82,0x86,
+0x83,0x08,0x86,0x82,0xe0,0x90,0xff,0xf1,0xf0,0x12,0x08,0xbf,0x40,0x03,0x7c,0x18,
+0x22,0x7c,0x00,0x22,0x90,0xff,0xf0,0xe0,0x20,0xe7,0x12,0x90,0xff,0xf0,0xe0,0x30,
+0xe5,0x09,0x90,0xff,0xf0,0xe0,0x44,0x20,0xf0,0xc3,0x22,0x80,0xe7,0xd3,0x22,0x90,
+0xff,0xf0,0xe0,0x20,0xe3,0x12,0x90,0xff,0xf0,0xe0,0x30,0xe5,0x09,0x90,0xff,0xf0,
+0xe0,0x44,0x20,0xf0,0xc3,0x22,0x80,0xe7,0xd3,0x22,0x8c,0x42,0x8d,0x41,0x7c,0x00,
+0xed,0x54,0xf0,0xfd,0xec,0x70,0x03,0xed,0x64,0x30,0x70,0x05,0x75,0x3e,0x03,0x80,
+0x03,0x75,0x3e,0x04,0xac,0x3e,0x12,0x0f,0x69,0x75,0x83,0x00,0x85,0x83,0x40,0xe5,
+0x41,0x54,0x0f,0xf5,0x3f,0xe5,0x40,0x70,0x04,0xe5,0x3f,0x64,0x03,0x70,0x35,0xe5,
+0x3e,0x24,0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x02,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,
+0xe0,0x30,0xe6,0x05,0x12,0x10,0x4b,0x80,0x19,0xe5,0x3e,0x24,0x9d,0xf8,0xc6,0x54,
+0xfb,0xf6,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,
+0x0f,0xf0,0x80,0x59,0xe5,0x40,0x70,0x04,0xe5,0x3f,0x64,0x04,0x70,0x48,0xe5,0x3e,
+0x24,0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x02,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,
+0x30,0xe5,0x07,0xac,0x42,0xad,0x41,0x12,0x1c,0x3c,0xe5,0x42,0x30,0xe2,0x15,0x78,
+0xad,0xe6,0x30,0xe0,0x0f,0x78,0xad,0xe6,0x30,0xe1,0x09,0xe4,0xff,0x04,0xfe,0x7c,
+0x04,0x12,0x31,0xfb,0x78,0xa9,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0x74,0x0f,0xf0,0x80,0x07,0xe4,0xfc,0x7d,0xee,0x12,0x1c,0x3c,0xc2,0x03,0x22,
+0x12,0x30,0xe6,0x12,0x0f,0x69,0x78,0xa9,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x90,0xfc,0x38,0xf0,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,0xfc,0x39,0xf0,0xc2,0x03,0x7d,0x02,0x7c,0x00,
+0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0xec,0x24,
+0x9d,0xf8,0xe6,0x30,0xe1,0x07,0x7c,0x13,0x12,0x25,0xbf,0x80,0x0f,0x90,0xfc,0x39,
+0xe0,0xfd,0x78,0x95,0xe6,0xfc,0x12,0x13,0xc8,0x12,0x25,0xbf,0x12,0x31,0x69,0x22,
+0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0x7d,0x00,0x12,0x0f,0x09,0x12,0x25,0xbf,0x12,
+0x31,0x69,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0xec,0x24,0x9d,0xf8,0xe6,0x30,
+0xe2,0x07,0x7c,0x13,0x12,0x25,0xbf,0x80,0x1b,0x78,0x95,0xe6,0x24,0x9d,0xf8,0xe6,
+0x20,0xe1,0x07,0x7c,0x12,0x12,0x25,0xbf,0x80,0x0a,0x78,0x95,0xe6,0xfc,0x12,0x13,
+0xec,0x12,0x25,0xbf,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0xec,
+0x24,0x9d,0xf8,0xe6,0x20,0xe2,0x07,0x7c,0x11,0x12,0x25,0xbf,0x80,0x0a,0x78,0x95,
+0xe6,0xfc,0x12,0x14,0xed,0x12,0x25,0xbf,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x78,
+0x95,0xec,0xf6,0x12,0x0f,0x69,0x78,0xa9,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x90,0xfc,0x3f,0xf0,0x78,0xa9,0xe6,0x24,0x0a,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,0xfc,0x40,0xf0,0x78,0xa9,0xe6,0x24,0x03,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,0x62,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,0x63,0x8c,0x61,0xe4,0xec,0x33,0x33,0x54,
+0x01,0x78,0x95,0xf6,0x60,0x08,0xe5,0x62,0x30,0xe1,0x03,0x78,0x95,0x06,0x78,0x95,
+0xe6,0x90,0xfc,0x41,0xf0,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0xfd,0xa3,0xe0,0x54,0x0c,0xfc,0xed,0x54,0xe6,0x8c,0x65,0xf5,0x64,
+0xe5,0x61,0x30,0xe5,0x03,0x43,0x65,0x01,0xe5,0x62,0x20,0xe5,0x0e,0xe5,0x61,0x54,
+0x7f,0x70,0x08,0xe5,0x61,0x20,0xe7,0x03,0x43,0x65,0x02,0xe5,0x61,0x30,0xe3,0x03,
+0x43,0x65,0x10,0xe5,0x61,0x30,0xe2,0x03,0x43,0x65,0x20,0xe5,0x61,0x54,0x03,0x60,
+0x03,0x43,0x65,0x40,0xe5,0x61,0x30,0xe1,0x03,0x43,0x65,0x80,0xe5,0x61,0x30,0xe4,
+0x03,0x43,0x64,0x01,0xe5,0x61,0x30,0xe6,0x03,0x43,0x64,0x08,0xe5,0x62,0x20,0xe4,
+0x0e,0xe5,0x61,0x54,0x7f,0x70,0x08,0xe5,0x61,0x20,0xe7,0x03,0x43,0x64,0x10,0x53,
+0x65,0xfb,0x53,0x64,0x79,0xad,0x64,0xe5,0x65,0x90,0xfc,0x3a,0xcd,0xf0,0xa3,0xcd,
+0xf0,0xe5,0x63,0x30,0xe3,0x0d,0xe5,0x63,0x54,0x30,0xc4,0x54,0x0f,0x90,0xfc,0x3d,
+0xf0,0x80,0x05,0xe4,0x90,0xfc,0x3d,0xf0,0xe5,0x63,0x54,0x03,0x90,0xfc,0x3c,0xf0,
+0xe5,0x63,0x54,0x04,0xc3,0x13,0x90,0xfc,0x3e,0xf0,0x90,0xfc,0x3c,0xe0,0x70,0x0e,
+0x7d,0x35,0x7e,0xfc,0x7f,0x01,0x74,0x01,0x90,0x00,0x09,0x12,0x01,0x42,0x78,0xa9,
+0xe6,0x24,0x08,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x7c,0x00,0xfd,0x78,
+0xa9,0xe6,0x24,0x07,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x7f,0x00,0x4c,
+0xfe,0xef,0x4d,0x90,0xfc,0x38,0xf0,0xa3,0xce,0xf0,0xce,0xc2,0x03,0x7d,0x0a,0x7c,
+0x00,0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0x78,
+0x9a,0x76,0x01,0x08,0x76,0xfc,0x08,0x76,0x38,0x78,0x97,0x76,0x0c,0x78,0x9a,0x12,
+0x04,0x65,0x12,0x02,0x14,0x78,0x98,0xcb,0xf6,0xcb,0x08,0xf6,0x7f,0x00,0xef,0x24,
+0xea,0x40,0x1f,0xe4,0xef,0x25,0xe0,0x90,0x35,0x2c,0xfd,0x93,0xcd,0x04,0x93,0x78,
+0x99,0x66,0x70,0x03,0xed,0x18,0x66,0x70,0x06,0x78,0x97,0x76,0x00,0x80,0x03,0x0f,
+0x80,0xdc,0x78,0x96,0xef,0xf6,0x78,0x9a,0x12,0x04,0x65,0x90,0x00,0x02,0x12,0x02,
+0x0e,0x78,0x98,0xcb,0xf6,0xcb,0x08,0xf6,0x54,0x04,0xcb,0x54,0x86,0x4b,0x60,0x04,
+0x78,0x97,0x76,0x0b,0x78,0x99,0xe6,0x30,0xe3,0x13,0x78,0x9a,0x12,0x04,0x65,0x90,
+0x00,0x05,0x12,0x01,0xec,0x24,0xfb,0x50,0x04,0x78,0x97,0x76,0x0d,0x78,0x99,0xe6,
+0x54,0xc0,0x7d,0x00,0x64,0xc0,0x4d,0x70,0x04,0x78,0x97,0x76,0x0b,0x78,0x9a,0x12,
+0x04,0x65,0x90,0x00,0x04,0x12,0x01,0xec,0x24,0xfc,0x50,0x04,0x78,0x97,0x76,0x0f,
+0x78,0x9a,0x12,0x04,0x65,0x90,0x00,0x06,0x12,0x01,0xec,0x24,0xfd,0x50,0x04,0x78,
+0x97,0x76,0x0e,0x78,0x9a,0x12,0x04,0x65,0x90,0x00,0x09,0x12,0x01,0xec,0x24,0xfd,
+0x50,0x04,0x78,0x97,0x76,0x0a,0x78,0x97,0xe6,0x70,0x2a,0x78,0x95,0xe6,0xfc,0x12,
+0x0f,0x69,0x78,0x9a,0x12,0x04,0x65,0x78,0xa7,0xe6,0xf9,0x78,0xa6,0xe6,0xfa,0x7b,
+0x01,0x74,0x0a,0x78,0x00,0x12,0x03,0x3f,0xc2,0x03,0x78,0x95,0xe6,0xfc,0x12,0x11,
+0x07,0x78,0x97,0xec,0xf6,0x78,0x97,0xe6,0xfc,0x12,0x25,0xbf,0x12,0x31,0x69,0x22,
+0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0x12,0x0f,0x69,0x78,0x95,0xe6,0x24,0xfd,0x75,
+0xf0,0x0a,0xa4,0x24,0x14,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xac,0x82,0xad,0x83,
+0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0xec,0xf9,0xed,0xfa,0x7b,0x0a,0x78,0x01,0x12,
+0x03,0xa7,0xc2,0x03,0x78,0x95,0xe6,0xfc,0x12,0x11,0x07,0x12,0x31,0x69,0x22,0x8d,
+0x2b,0x8c,0x2a,0xed,0x60,0x40,0x75,0x27,0x01,0x75,0x29,0x48,0x75,0x28,0xff,0xe5,
+0x2a,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,0xec,0x7c,0x03,0x25,0xe0,0xcd,0x33,0xcd,
+0xdc,0xf9,0xfc,0xe5,0x29,0x2c,0xf5,0x29,0xe5,0x28,0x3d,0xf5,0x28,0xad,0x29,0xae,
+0x28,0xaf,0x27,0x74,0x80,0x90,0x00,0x06,0x12,0x03,0x17,0x74,0x80,0x90,0x00,0x02,
+0x12,0x03,0x17,0x12,0x0f,0xb7,0xe5,0x2b,0x14,0x60,0x3b,0x75,0x27,0x01,0x75,0x29,
+0x08,0x75,0x28,0xff,0xe5,0x2a,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,0xec,0x7c,0x03,
+0x25,0xe0,0xcd,0x33,0xcd,0xdc,0xf9,0xfc,0xe5,0x29,0x2c,0xf5,0x29,0xe5,0x28,0x3d,
+0xf5,0x28,0xad,0x29,0xae,0x28,0xaf,0x27,0xe4,0x90,0x00,0x06,0x12,0x03,0x17,0xe4,
+0x90,0x00,0x02,0x12,0x03,0x17,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0xec,0x24,
+0x9d,0xf8,0xe6,0x30,0xe2,0x09,0x78,0x95,0xe6,0xfc,0x12,0x14,0xed,0xd2,0x00,0x78,
+0x95,0xe6,0xfc,0x12,0x0f,0x69,0x78,0x96,0x76,0x00,0x90,0xfc,0x39,0xe0,0x30,0xe7,
+0x04,0x78,0x96,0x76,0x01,0x78,0x96,0xe6,0xfd,0x78,0x95,0xe6,0xfc,0x12,0x0d,0x2f,
+0xc2,0x03,0x30,0x00,0x07,0x78,0x95,0xe6,0xfc,0x12,0x13,0xec,0x7c,0x00,0x12,0x25,
+0xbf,0x12,0x31,0x69,0x22,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x01,0xf0,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x30,0xe0,0x02,0x80,0xed,0x78,0xa9,0xe6,0x24,0x0b,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xf8,0xf0,0x78,0xa9,0xe6,0x24,0x02,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x80,0xf0,0x22,0xc2,0x03,0x8c,0x58,
+0x12,0x0f,0x69,0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0x79,0x5d,0x7a,0x35,0x7b,0x0a,
+0x78,0x01,0x12,0x03,0xf5,0x12,0x0e,0x05,0xac,0x58,0x7d,0x02,0x12,0x0d,0x2f,0xc2,
+0x03,0xac,0x58,0x12,0x11,0x07,0x22,0x8d,0x53,0x8e,0x52,0x8f,0x51,0x8c,0x50,0x12,
+0x0f,0x69,0x75,0x4f,0x00,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x20,0xe4,0x1f,0xe5,0x4f,0x24,0xf6,0x40,0x19,0x05,0x4f,0xc2,0x03,
+0x7c,0x18,0x12,0x32,0xa9,0x90,0xff,0x93,0xe0,0x44,0x01,0xf0,0xb2,0xb3,0xac,0x50,
+0x12,0x0f,0x69,0x80,0xd0,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x20,0xe4,0x05,0xc2,0x03,0x7c,0x02,0x22,0x78,0xa9,0xe6,0x24,0x05,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x0f,0x60,0x16,0x78,0xa9,0xe6,
+0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x0f,0xf0,0xc2,0x03,
+0x7c,0x01,0x22,0x78,0xa8,0x86,0x83,0x08,0x86,0x82,0xe0,0xad,0x53,0xae,0x52,0xaf,
+0x51,0x12,0x03,0x0f,0xc2,0x03,0x7c,0x00,0x22,0x8d,0x31,0x8c,0x30,0x12,0x14,0xed,
+0xe5,0x31,0x60,0x0f,0xe5,0x30,0xb4,0x03,0x0a,0x7c,0x01,0x12,0x24,0xee,0x7c,0x81,
+0x12,0x24,0xee,0xac,0x30,0x12,0x0f,0x69,0xe5,0x31,0x60,0x1a,0x78,0xaa,0x86,0x83,
+0x08,0x86,0x82,0xe0,0x54,0xe7,0xf0,0xa3,0xa3,0xa3,0xa3,0xe0,0x54,0xe7,0xf0,0xac,
+0x30,0x7d,0x02,0x12,0x0d,0x2f,0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0x79,0x67,0x7a,
+0x35,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,0xc2,0x03,0xe5,0x30,0x24,0x9d,0xf8,0xc6,
+0x54,0xfd,0xf6,0xac,0x30,0x12,0x11,0x07,0x22,0x8c,0x26,0x30,0x03,0x05,0x12,0x32,
+0x48,0x80,0xf8,0x7c,0x0a,0x12,0x31,0x5b,0xd2,0x03,0xe5,0x26,0x24,0xfd,0x78,0xa3,
+0xf6,0x70,0x07,0x78,0xaa,0x76,0xff,0x08,0x76,0xe0,0x78,0xa3,0xe6,0x75,0xf0,0x10,
+0xa4,0xad,0xf0,0xfc,0x24,0xa0,0x78,0xa9,0xf6,0xed,0x34,0xff,0x18,0xf6,0x78,0xa3,
+0xe6,0x75,0xf0,0x0a,0xa4,0x24,0x00,0xfc,0xe4,0x34,0xfc,0xfd,0x78,0xa6,0xed,0xf6,
+0x08,0xec,0xf6,0x12,0x31,0xf4,0x22,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x30,0xe7,0x22,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x7f,0xf0,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x80,0xf0,0x22,0x78,0xaa,0x86,0x83,0x08,
+0x86,0x82,0xe0,0x54,0x7f,0xf0,0xad,0x83,0xe5,0x82,0x24,0x04,0xfc,0xe4,0x3d,0x8c,
+0x82,0xf5,0x83,0xe0,0x54,0x7f,0xf0,0x78,0xa9,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x54,0xf8,0xf0,0x78,0xab,0xe6,0x24,0x01,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x03,0xf0,0x78,0xab,0xe6,0x24,0x05,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x03,0xf0,0x78,0xa9,0xe6,0x24,0x05,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,0x0f,0xf0,0x22,0x78,0xaa,0x86,0x83,0x08,
+0x86,0x82,0xe0,0x54,0x3f,0xf0,0xad,0x83,0xe5,0x82,0x24,0x04,0xfc,0xe4,0x3d,0x8c,
+0x82,0xf5,0x83,0xe0,0x54,0x3f,0xf0,0x78,0xa3,0xe6,0x24,0xa4,0xf8,0xe6,0xfc,0x78,
+0xab,0xe6,0x24,0x01,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa3,
+0xe6,0x24,0xa4,0xf8,0xe6,0xfc,0x78,0xab,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xec,0xf0,0x78,0xa9,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x54,0xfb,0x44,0x02,0xf5,0x26,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe5,0x03,0x43,0x26,0x01,0x78,0xa9,0xe6,
+0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe0,0x03,0x12,0x0f,
+0xb7,0xe5,0x26,0xfc,0x78,0xa9,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xec,0xf0,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0x74,0x0f,0xf0,0x78,0xaa,0x86,0x83,0x08,0x86,0x82,0xe0,0x44,0x80,0xf0,0xa3,0xa3,
+0xa3,0xa3,0xe0,0x44,0x80,0xf0,0x22,0x8c,0x2a,0x12,0x0f,0x69,0x78,0xa7,0xe6,0x24,
+0x08,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa9,0xe6,0x24,0x0a,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa7,0xe6,0x24,0x07,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa9,0xe6,0x24,0x09,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0xe0,
+0xfd,0xa3,0xe0,0xfc,0xed,0xfe,0x78,0xa9,0xe6,0x24,0x08,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xee,0xf0,0xec,0xfe,0x78,0xa9,0xe6,0x24,0x07,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xee,0xf0,0x8c,0x29,0x8d,0x28,0xc3,0xec,0x94,0x05,0xed,0x94,
+0x0c,0x40,0x05,0x75,0x27,0x7c,0x80,0x33,0xd3,0xe5,0x29,0x94,0x01,0xe5,0x28,0x94,
+0x03,0x40,0x05,0x75,0x27,0x3c,0x80,0x23,0xd3,0xe5,0x29,0x94,0x81,0xe5,0x28,0x94,
+0x01,0x40,0x05,0x75,0x27,0x18,0x80,0x13,0xd3,0xe5,0x29,0x94,0x60,0xe5,0x28,0x94,
+0x00,0x40,0x05,0x75,0x27,0x0c,0x80,0x03,0x75,0x27,0x08,0xaf,0x27,0xe4,0xef,0x54,
+0x7c,0x44,0x83,0xff,0x8f,0x27,0xe5,0x27,0xfc,0x78,0xab,0xe6,0x24,0x01,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x27,0xfc,0x78,0xab,0xe6,0x24,0x05,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x27,0xfc,0x78,0xa3,0xe6,
+0x24,0xa4,0xf8,0xec,0xf6,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0xf5,0x27,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xa3,0xe0,0x30,0xe3,0x17,0x53,0x27,0xc7,0x78,0xa7,0xe6,0x24,0x05,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,0x35,0x58,0x93,0x42,0x27,0x53,0x27,
+0xfb,0x78,0xa7,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x60,
+0x03,0x43,0x27,0x04,0x53,0x27,0xfc,0x78,0xa7,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x42,0x27,0x43,0x27,0x80,0xe5,0x27,0xfc,0x78,0xa9,0xe6,
+0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa9,0xe6,0x24,
+0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,0x27,0x78,0xa7,0xe6,0x24,
+0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe1,0x05,0x53,0x27,
+0xdf,0x80,0x03,0x43,0x27,0x20,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x30,0xe4,0x05,0x53,0x27,0xef,0x80,0x03,0x43,0x27,0x10,0x78,
+0xa7,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xb4,0x02,0x03,
+0x43,0x27,0x02,0xe5,0x27,0xfc,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xec,0xf0,0x78,0xa9,0xe6,0x24,0x03,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0xf5,0x27,0x78,0xa7,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x70,0x05,0x53,0x27,0x7f,0x80,0x03,0x43,0x27,0x80,0x78,0xa7,0xe6,
+0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe0,0x05,0x43,
+0x27,0x20,0x80,0x03,0x53,0x27,0xdf,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x30,0xe3,0x05,0x43,0x27,0x40,0x80,0x03,0x53,0x27,0xbf,
+0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe0,
+0x05,0x43,0x27,0x10,0x80,0x03,0x53,0x27,0xef,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe4,0x05,0x43,0x27,0x08,0x80,0x03,
+0x53,0x27,0xf7,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xa3,0xe0,0x30,0xe5,0x05,0x43,0x27,0x04,0x80,0x03,0x53,0x27,0xfb,0x78,0xa7,0xe6,
+0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe6,0x05,0x43,
+0x27,0x01,0x80,0x03,0x53,0x27,0xfe,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe7,0x05,0x43,0x27,0x02,0x80,0x03,0x53,0x27,
+0xfd,0xe5,0x27,0xfc,0x78,0xa9,0xe6,0x24,0x03,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xec,0xf0,0xc2,0x03,0x7c,0x00,0x22,0x8d,0x27,0x8c,0x26,0xed,0x54,0x03,0x14,
+0x60,0x03,0x7c,0x10,0x22,0xe5,0x27,0x54,0x7c,0x24,0xfc,0x40,0x03,0x7c,0x0b,0x22,
+0xe5,0x26,0x24,0x9d,0xf8,0xc6,0x44,0x02,0xf6,0x7c,0x00,0x22,0x8c,0x30,0x12,0x0f,
+0x69,0xe5,0x30,0x24,0x9d,0xf8,0xe6,0x20,0xe2,0x4f,0xac,0x30,0x7d,0x02,0x12,0x0d,
+0x2f,0xe5,0x30,0x24,0xfe,0x44,0x28,0xfc,0x78,0xaa,0x86,0x83,0x08,0x86,0x82,0xec,
+0xf0,0xaf,0x83,0xe5,0x82,0x24,0x04,0xfe,0xe4,0x3f,0xff,0xec,0x8e,0x82,0x8f,0x83,
+0xf0,0x7c,0x03,0x8c,0x2c,0xe5,0x2c,0xfc,0x78,0xab,0xe6,0x24,0x01,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x2c,0xfc,0x78,0xab,0xe6,0x24,0x05,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x75,0x2d,0x01,0x75,0x2f,0x48,0x75,
+0x2e,0xff,0xe5,0x30,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,0xec,0x7c,0x03,0x25,0xe0,
+0xcd,0x33,0xcd,0xdc,0xf9,0xfc,0xe5,0x2f,0x2c,0xf5,0x2f,0xe5,0x2e,0x3d,0xf5,0x2e,
+0x78,0xab,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xe7,
+0xf5,0x2c,0xad,0x2f,0xae,0x2e,0xaf,0x2d,0xe4,0x90,0x00,0x02,0x12,0x03,0x17,0xe4,
+0x90,0x00,0x06,0x12,0x03,0x17,0x12,0x01,0xe6,0x30,0xe5,0x03,0x43,0x2c,0x10,0xe5,
+0x2c,0xfc,0x78,0xab,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,
+0xf0,0x12,0x10,0x4b,0x78,0xa9,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0xc2,0x03,0xfc,0xe5,0x30,0x24,0x9d,0xf8,0xc6,0x44,0x04,0xf6,0x8c,0x2c,
+0xe5,0x30,0x54,0x0f,0xc4,0x54,0xf0,0x7e,0x00,0xff,0xee,0xef,0x44,0x04,0x7d,0x00,
+0xff,0xec,0x4e,0xfc,0xed,0x4f,0xfd,0x12,0x1c,0xa7,0x7c,0x00,0x22,0x8c,0x2f,0x12,
+0x0f,0x69,0x12,0x0f,0xeb,0x78,0xaa,0x86,0x83,0x08,0x86,0x82,0xe0,0x54,0x08,0xf0,
+0xa3,0xa3,0xa3,0xa3,0xe0,0x54,0x08,0xf0,0xac,0x2f,0x7d,0x02,0x12,0x0d,0x2f,0xc2,
+0x03,0xe5,0x2f,0x24,0x9d,0xf8,0xc6,0x54,0xfb,0xf6,0x7c,0x00,0x22,0x12,0x30,0xe6,
+0x78,0x96,0xec,0xf6,0xec,0x24,0x9d,0xf8,0xe6,0x30,0xe1,0x0a,0x7d,0x00,0x7c,0x13,
+0x12,0x25,0x26,0x12,0x31,0x69,0x78,0x96,0xe6,0x24,0x9d,0xf8,0xc6,0x44,0x01,0xf6,
+0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,0x78,0x96,0xe6,0x24,0xfd,0x75,0xf0,0x0a,0xa4,
+0x24,0x14,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0x78,0xa6,0xe6,0xfa,0x08,0xe6,0xf9,
+0x7b,0x0a,0x78,0x01,0x12,0x03,0xa7,0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0x79,0x67,
+0x7a,0x35,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,0x12,0x0f,0xb7,0xc2,0x03,0x78,0x96,
+0xe6,0xfc,0x12,0x11,0x07,0x78,0x95,0xec,0xf6,0xec,0x60,0x0a,0x7d,0x00,0x7c,0x08,
+0x12,0x25,0x26,0x12,0x31,0x69,0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,0x78,0xa9,0xe6,
+0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x10,0x54,0xdf,0xfc,
+0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,
+0x95,0xec,0xf6,0xc2,0x03,0x7c,0xc8,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,0x0f,
+0x69,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,
+0xef,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,
+0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x10,
+0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,0x78,
+0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x20,0xf0,
+0xc2,0x03,0x7c,0xf0,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,0x78,0xa9,
+0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe4,0x15,0xc2,
+0x03,0x78,0x96,0xe6,0x44,0x10,0x7f,0x00,0xfe,0x7c,0x07,0x12,0x31,0xfb,0x12,0x31,
+0x69,0x02,0x17,0x14,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x54,0xcf,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,
+0x12,0x0f,0x69,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x44,0x30,0xf0,0xc2,0x03,0x7c,0xf0,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,
+0x0f,0x69,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,
+0x30,0xe4,0x14,0xc2,0x03,0x78,0x96,0xe6,0x44,0x10,0x7f,0x00,0xfe,0x7c,0x07,0x12,
+0x31,0xfb,0x12,0x31,0x69,0x80,0x5d,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x54,0xef,0xf0,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xdf,0xf0,0x78,0x96,0xe6,0x24,0xfd,0x75,0xf0,
+0x0a,0xa4,0x24,0x14,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xac,0x82,0xad,0x83,0x78,
+0xa6,0x86,0x83,0x08,0x86,0x82,0xec,0xf9,0xed,0xfa,0x7b,0x0a,0x78,0x01,0x12,0x03,
+0xa7,0xc2,0x03,0x78,0x96,0xe6,0xfc,0x12,0x11,0x07,0x7d,0x00,0x7c,0x0b,0x12,0x25,
+0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0xe4,0x90,0xfc,0x39,0xf0,0x7d,0x02,0x7c,
+0x00,0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x7c,0x00,0x12,0x25,0xbf,
+0x12,0x31,0x69,0x22,0x74,0x3c,0x90,0xfb,0xe0,0xf0,0x74,0x3e,0x90,0xfb,0xe0,0xf0,
+0xe4,0x90,0xfc,0x28,0xf0,0x22,0x8d,0x35,0x8c,0x34,0xec,0xb4,0x01,0x02,0x80,0x03,
+0xd3,0x40,0x02,0x80,0x28,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x08,0xa8,0x35,0xc6,
+0x25,0xe0,0xf6,0x80,0x18,0xb4,0x04,0x02,0x80,0x03,0xd3,0x40,0x0a,0xa8,0x35,0xc6,
+0x25,0xe0,0x25,0xe0,0xf6,0x80,0x06,0xa8,0x35,0x76,0x00,0x80,0x00,0x22,0x8c,0x3c,
+0x8d,0x3b,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x75,0x66,0x06,0x75,0x67,0x00,0x90,0xfc,
+0x29,0x12,0x04,0x6e,0x12,0x01,0xe6,0xb4,0x80,0x02,0x80,0x06,0xd3,0x50,0x03,0x02,
+0x18,0x47,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x03,0x12,0x01,0xec,0x54,0xf0,
+0xb4,0x30,0x02,0x80,0x03,0xd3,0x40,0x5f,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,0x00,
+0x08,0x12,0x02,0x0e,0xfa,0xfd,0xeb,0xfe,0x7f,0x01,0x90,0xfc,0x2c,0x12,0x04,0x6e,
+0xee,0xcd,0x90,0x35,0x71,0xfc,0xe4,0x93,0xff,0x74,0x01,0x93,0xfe,0xf9,0xef,0xfa,
+0x7b,0x01,0xea,0xff,0xe9,0xfe,0xec,0xc3,0x9e,0xed,0x9f,0x40,0x25,0x90,0x35,0x73,
+0xe4,0x93,0xfd,0x74,0x01,0x93,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0xee,0xcd,0xfc,
+0x90,0xfc,0x2e,0xe0,0xd3,0x9c,0x90,0xfc,0x2d,0xe0,0x9d,0x50,0x05,0x75,0x66,0x80,
+0x80,0x33,0x12,0x19,0x65,0x80,0x2e,0xb4,0x60,0x02,0x80,0x03,0xd3,0x40,0x0b,0xac,
+0x3c,0xad,0x3b,0x12,0x07,0x77,0x8c,0x66,0x80,0x1b,0xb4,0x10,0x03,0xb3,0x40,0x10,
+0xc3,0xb4,0x20,0x03,0xb3,0x40,0x09,0xc3,0xb4,0x40,0x02,0x80,0x03,0xd3,0x40,0x00,
+0x75,0x66,0x81,0x80,0x00,0x80,0x75,0xb4,0x81,0x02,0x80,0x03,0xd3,0x40,0x6b,0x90,
+0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x03,0x12,0x01,0xec,0x54,0xf0,0xb4,0x30,0x02,
+0x80,0x03,0xd3,0x40,0x1d,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x08,0x12,0x02,
+0x0e,0xfa,0xfd,0xeb,0xfe,0x7f,0x01,0x90,0xfc,0x2f,0x12,0x04,0x6e,0x12,0x18,0xcf,
+0x80,0x36,0xb4,0x60,0x02,0x80,0x03,0xd3,0x40,0x13,0x75,0x3a,0x67,0xe4,0xf5,0x39,
+0xf5,0x38,0xac,0x3c,0xad,0x3b,0x12,0x05,0xd3,0x8c,0x66,0x80,0x1b,0xb4,0x10,0x03,
+0xb3,0x40,0x10,0xc3,0xb4,0x20,0x03,0xb3,0x40,0x09,0xc3,0xb4,0x40,0x02,0x80,0x03,
+0xd3,0x40,0x00,0x75,0x66,0x81,0x80,0x00,0x80,0x02,0x80,0x00,0xe5,0x66,0xfc,0x90,
+0xfc,0x29,0x12,0x04,0x80,0xec,0x90,0x00,0x02,0x12,0x03,0x17,0xac,0x67,0x22,0x90,
+0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x04,0x12,0x01,0xec,0x60,0x04,0x74,0x01,0x80,
+0x01,0xe4,0xa2,0xe0,0x92,0x01,0x90,0xfc,0x29,0x12,0x04,0x80,0xed,0x24,0x03,0xfd,
+0x50,0x01,0x0e,0x90,0xfc,0x2c,0x12,0x04,0x6e,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,
+0x00,0x05,0x12,0x01,0xec,0xf5,0x67,0x90,0x00,0x04,0x12,0x01,0xec,0x54,0x0f,0xfc,
+0x7d,0x67,0x12,0x17,0x46,0xe5,0x67,0x70,0x04,0x75,0x66,0x08,0x22,0x75,0x66,0x00,
+0x78,0x84,0x76,0x00,0x78,0x84,0xe6,0xc3,0x95,0x67,0x50,0x38,0x90,0xfc,0x2f,0x12,
+0x04,0x80,0x12,0x01,0xe6,0xfc,0x90,0xfc,0x2c,0x12,0x04,0x80,0xec,0x12,0x03,0x0f,
+0x30,0x01,0x0e,0x90,0xfc,0x31,0xe0,0x04,0xf0,0x90,0xfc,0x30,0x70,0x03,0xe0,0x04,
+0xf0,0x78,0x84,0x06,0x90,0xfc,0x2e,0xe0,0x04,0xf0,0x90,0xfc,0x2d,0x70,0x03,0xe0,
+0x04,0xf0,0x80,0xc0,0x22,0x90,0xfc,0x2a,0xe0,0xfd,0xa3,0xe0,0xfc,0xed,0xfe,0xec,
+0xfd,0x7f,0x01,0xed,0x24,0x0a,0xfd,0x50,0x01,0x0e,0x90,0xfc,0x32,0x12,0x04,0x6e,
+0x90,0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x04,0x12,0x01,0xec,0x54,0x0f,0xb4,0x01,
+0x02,0x80,0x03,0xd3,0x40,0x17,0x90,0xfc,0x32,0x12,0x04,0x80,0x0d,0xed,0x70,0x01,
+0x0e,0x90,0xfc,0x2f,0x12,0x04,0x6e,0x78,0x88,0x76,0x01,0x80,0x4e,0xb4,0x02,0x02,
+0x80,0x03,0xd3,0x40,0x19,0x90,0xfc,0x32,0x12,0x04,0x80,0xed,0x24,0x02,0xfd,0x50,
+0x01,0x0e,0x90,0xfc,0x2f,0x12,0x04,0x6e,0x78,0x88,0x76,0x02,0x80,0x2d,0xb4,0x04,
+0x02,0x80,0x03,0xd3,0x40,0x19,0x90,0xfc,0x32,0x12,0x04,0x80,0xed,0x24,0x04,0xfd,
+0x50,0x01,0x0e,0x90,0xfc,0x2f,0x12,0x04,0x6e,0x78,0x88,0x76,0x04,0x80,0x0c,0xb4,
+0x00,0x02,0x80,0x03,0xd3,0x40,0x00,0x75,0x66,0x08,0x22,0x90,0xfc,0x29,0x12,0x04,
+0x80,0x90,0x00,0x05,0x12,0x01,0xec,0xf5,0x67,0x78,0x85,0x76,0x00,0x78,0x85,0xe6,
+0xc3,0x95,0x67,0x40,0x03,0x02,0x1a,0xcd,0x78,0x86,0x76,0x00,0x78,0x86,0xe6,0xc3,
+0x78,0x88,0x96,0x50,0x76,0x90,0xfc,0x2c,0x12,0x04,0x80,0x12,0x01,0xe6,0xfc,0x90,
+0xfc,0x32,0x12,0x04,0x89,0x12,0x01,0xe0,0xf4,0x5c,0xfc,0x12,0x01,0xe0,0xf8,0x90,
+0xfc,0x2f,0x12,0x04,0x80,0xe8,0xc0,0xe0,0x12,0x01,0xe6,0xc8,0xd0,0xe0,0xc8,0x58,
+0x4c,0xfc,0x90,0xfc,0x2c,0x12,0x04,0x80,0xec,0x12,0x03,0x0f,0x78,0x87,0xec,0xf6,
+0x90,0xfc,0x31,0xe0,0x04,0xf0,0x90,0xfc,0x30,0x70,0x03,0xe0,0x04,0xf0,0x09,0xe9,
+0x70,0x01,0x0a,0x90,0xfc,0x32,0x12,0x04,0x77,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,
+0x00,0x04,0x12,0x01,0xec,0x30,0xe4,0x0e,0x90,0xfc,0x2e,0xe0,0x04,0xf0,0x90,0xfc,
+0x2d,0x70,0x03,0xe0,0x04,0xf0,0x78,0x86,0x06,0x80,0x81,0x78,0x88,0xe6,0xfd,0xe4,
+0xfe,0xff,0xee,0xcd,0xfc,0x90,0xfc,0x31,0xe0,0x2c,0xf0,0x90,0xfc,0x30,0xe0,0x3d,
+0xf0,0x78,0x88,0xe6,0xfd,0xe4,0xfe,0xff,0xee,0xcd,0xfc,0x90,0xfc,0x34,0xe0,0x2c,
+0xf0,0x90,0xfc,0x33,0xe0,0x3d,0xf0,0x78,0x85,0x06,0x02,0x1a,0x0d,0x75,0x66,0x00,
+0x22,0xe5,0x3d,0x05,0x3d,0x04,0x70,0x02,0xb2,0xb0,0x22,0xc0,0xe0,0xc0,0xf0,0xc0,
+0x82,0xc0,0x83,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,0xc0,0xe0,0xea,0xc0,0xe0,0xeb,0xc0,
+0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,0xe0,0xef,0xc0,0xe0,0x90,0xff,0x92,
+0xe0,0x12,0x01,0xb7,0x1b,0x29,0x30,0x1b,0x29,0x32,0x1b,0x38,0x38,0x1b,0x4a,0x3a,
+0x1b,0x5c,0x3e,0x1b,0x74,0x44,0x1b,0x68,0x46,0x1b,0x80,0x50,0x1b,0xc2,0x52,0x1b,
+0xa1,0x54,0x1b,0xe3,0x56,0x00,0x00,0x1c,0x04,0x90,0xff,0x92,0xe0,0x7f,0x00,0xfe,
+0x7c,0x01,0x12,0x31,0xfb,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,0x7c,0x03,0x12,0x31,
+0xfb,0x74,0x20,0x90,0xff,0xfe,0xf0,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,0x7c,0x02,
+0x12,0x31,0xfb,0x74,0x40,0x90,0xff,0xfe,0xf0,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,
+0x7c,0x04,0x12,0x31,0xfb,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,0x7c,0x05,0x12,0x31,
+0xfb,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,0x7c,0x06,0x12,0x31,0xfb,0x02,0x1c,0x14,
+0x90,0xff,0xa5,0xe0,0x7d,0x00,0x90,0xfb,0xf8,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfb,
+0xf9,0xe0,0xfc,0xf5,0x83,0x90,0xfb,0xf8,0xe0,0x44,0x33,0xfd,0x12,0x1c,0xa7,0x80,
+0x73,0x90,0xff,0xb5,0xe0,0x7d,0x00,0x90,0xfb,0xfa,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,
+0xfb,0xfb,0xe0,0xfc,0xf5,0x83,0x90,0xfb,0xfa,0xe0,0x44,0x43,0xfd,0x12,0x1c,0xa7,
+0x80,0x52,0x90,0xff,0xa6,0xe0,0x7d,0x00,0x90,0xfb,0xfc,0xcd,0xf0,0xa3,0xcd,0xf0,
+0x90,0xfb,0xfd,0xe0,0xfc,0xf5,0x83,0x90,0xfb,0xfc,0xe0,0x44,0x34,0xfd,0x12,0x1c,
+0xa7,0x80,0x31,0x90,0xff,0xb6,0xe0,0x7d,0x00,0x90,0xfb,0xfe,0xcd,0xf0,0xa3,0xcd,
+0xf0,0x90,0xfb,0xff,0xe0,0xfc,0xf5,0x83,0x90,0xfb,0xfe,0xe0,0x44,0x44,0xfd,0x12,
+0x1c,0xa7,0x80,0x10,0x90,0xff,0x92,0xe0,0x7d,0x00,0xfc,0xed,0x44,0xaa,0xfd,0x12,
+0x1c,0xa7,0x80,0x00,0xe4,0x90,0xff,0x92,0xf0,0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,
+0xe0,0xfd,0xd0,0xe0,0xfc,0xd0,0xe0,0xfb,0xd0,0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,
+0xf8,0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32,0x05,0x81,0x05,0x81,
+0x05,0x81,0x05,0x81,0xa8,0x81,0x18,0x18,0x18,0xed,0xf6,0x08,0xec,0xf6,0x90,0xff,
+0x5a,0xe0,0x20,0xe7,0x02,0x80,0xf7,0x90,0xff,0x59,0xe0,0x7d,0x00,0xa8,0x81,0x18,
+0xcd,0xf6,0xcd,0x08,0xf6,0x7d,0x03,0xa8,0x81,0xe6,0x18,0xfc,0xe6,0xcc,0x25,0xe0,
+0xcc,0x33,0xcc,0xdd,0xf9,0xcc,0xf6,0xcc,0x08,0xf6,0xa8,0x81,0x18,0xe6,0x44,0xf8,
+0xf6,0xa8,0x81,0x18,0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0xa8,0x81,0x18,0x86,0x83,
+0x08,0x86,0x82,0xed,0xf0,0xa3,0xec,0xf0,0x74,0x02,0x90,0xff,0x5a,0xf0,0x15,0x81,
+0x15,0x81,0x15,0x81,0x15,0x81,0x22,0xe5,0x81,0x24,0x05,0xf5,0x81,0xe4,0xa8,0x81,
+0x18,0xf6,0xa8,0x81,0x18,0x18,0x18,0x18,0xed,0xf6,0x08,0xec,0xf6,0x90,0xfb,0xf5,
+0xe0,0x24,0xf8,0x50,0x03,0x02,0x1d,0xc8,0xe4,0xa8,0x81,0x18,0x18,0xf6,0xa8,0x81,
+0x18,0xe6,0xfe,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0x7f,0x00,
+0xef,0x24,0xf8,0x40,0x4d,0xe4,0xef,0x25,0xe0,0x24,0x7d,0xf5,0x82,0xe4,0x34,0xfc,
+0xf5,0x83,0xe0,0xfb,0xa3,0xe0,0x6c,0x70,0x03,0xfa,0xeb,0x6d,0x70,0x09,0x74,0x01,
+0xa8,0x81,0x18,0x18,0xf6,0x80,0x2b,0xe4,0xef,0x25,0xe0,0x24,0x7d,0xf5,0x82,0xe4,
+0x34,0xfc,0xf5,0x83,0x7a,0x00,0xe0,0x54,0xf0,0xcc,0xf8,0xcc,0xcd,0xf9,0xcd,0xfb,
+0x78,0x00,0xe9,0x54,0xf0,0xf9,0xea,0x68,0x70,0x02,0xeb,0x69,0x70,0x01,0x0e,0x0f,
+0x80,0xae,0xa8,0x81,0x18,0xee,0xf6,0xa8,0x81,0x18,0x18,0x18,0x18,0xed,0xf6,0x08,
+0xec,0xf6,0xa8,0x81,0xef,0xf6,0xa8,0x81,0x18,0x18,0xe6,0x70,0x79,0xa8,0x81,0x18,
+0xe6,0x24,0xf7,0x40,0x71,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0x54,0x0f,0xa8,0x81,
+0xf6,0x64,0x04,0x60,0x17,0xa8,0x81,0xe6,0x64,0x03,0x60,0x10,0xa8,0x81,0x18,0x18,
+0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0x12,0x1c,0x3c,0x80,0x4a,0x7c,0x0a,0x12,0x31,
+0x5b,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0x90,0xfb,0xf4,0xe0,
+0x25,0xe0,0x24,0x7d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xed,0xf0,0xa3,0xec,0xf0,
+0x90,0xfb,0xf4,0xe0,0xff,0xe4,0xef,0x04,0x54,0x07,0xff,0x90,0xfb,0xf4,0xf0,0x90,
+0xfb,0xf5,0xe0,0x04,0xf0,0x12,0x31,0xf4,0x90,0xfb,0xf6,0xe0,0x70,0x08,0xe4,0xfe,
+0xff,0x7c,0x0f,0x12,0x31,0xfb,0x80,0x27,0x90,0xfb,0xf7,0xe0,0x04,0xf0,0x54,0x3f,
+0x70,0x1d,0x90,0xfb,0xf7,0xe0,0x44,0xfe,0x7d,0x00,0xfc,0x90,0xfb,0xf4,0xe0,0x25,
+0xe0,0x24,0x7d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xed,0xf0,0xa3,0xec,0xf0,0xe5,
+0x81,0x24,0xfb,0xf5,0x81,0x22,0x78,0x8b,0x76,0x00,0x78,0x8c,0x76,0x00,0x74,0x01,
+0x90,0xfb,0xf6,0xf0,0x12,0x30,0xe6,0x90,0xfb,0xf5,0xe0,0x60,0x57,0x7c,0x0a,0x12,
+0x31,0x5b,0x90,0xfb,0xf3,0xe0,0x25,0xe0,0x24,0x7d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,
+0x83,0xe0,0xfd,0xa3,0xe0,0xfc,0x90,0xfb,0xf3,0xe0,0x25,0xe0,0x24,0x7d,0xf5,0x82,
+0xe4,0x34,0xfc,0xf5,0x83,0xe4,0xf0,0xa3,0xf0,0x90,0xfb,0xf3,0xe0,0xff,0xe4,0xef,
+0x04,0x54,0x07,0xff,0x90,0xfb,0xf3,0xf0,0x90,0xfb,0xf5,0xe0,0x14,0xf0,0x78,0x89,
+0xed,0xf6,0x08,0xec,0xf6,0x12,0x31,0xf4,0x78,0x89,0xe6,0xfd,0x08,0xe6,0xfc,0x12,
+0x08,0xda,0x80,0xa3,0x12,0x32,0x48,0x90,0xff,0x93,0xe0,0x44,0x01,0xf0,0xb2,0xb3,
+0x78,0x8b,0x06,0xb6,0x00,0x11,0x78,0x8b,0x76,0x00,0x78,0x8c,0xe6,0xf4,0x04,0x04,
+0xa2,0xe0,0x92,0xb4,0x78,0x8c,0xf6,0x02,0x1e,0x07,0xe4,0x90,0xfb,0xf6,0xf0,0x90,
+0xfb,0xf5,0xe0,0x7d,0x00,0xfc,0xed,0x44,0xcf,0xfd,0x12,0x1c,0x3c,0x12,0x31,0x69,
+0x22,0x12,0x30,0xe6,0xe5,0x70,0x64,0x49,0x45,0x6f,0x60,0x15,0x90,0xff,0x83,0xe0,
+0x54,0x0f,0x7d,0x00,0xd3,0x95,0x70,0xed,0x95,0x6f,0x50,0x05,0x12,0x2f,0x2f,0x80,
+0x03,0x12,0x2f,0xff,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0xe5,0x70,0x64,0x49,0x45,
+0x6f,0x60,0x05,0x12,0x30,0x39,0x80,0x0e,0x90,0xff,0x80,0xe0,0x44,0x08,0xf0,0x90,
+0xff,0x83,0xe0,0x54,0x7f,0xf0,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x8c,0x54,0xec,
+0x54,0xf0,0xb4,0x10,0x15,0x75,0x6a,0x35,0x75,0x69,0xfc,0x75,0x68,0x01,0xe5,0x6a,
+0x24,0x03,0xf5,0x6a,0xe5,0x69,0x34,0x00,0xf5,0x69,0xe4,0xf5,0x57,0xf5,0x56,0xe5,
+0x56,0xc3,0x94,0x01,0x50,0x27,0xe5,0x54,0x54,0x0f,0xfc,0xad,0x6a,0xae,0x69,0xaf,
+0x68,0x12,0x0e,0x77,0x8c,0x55,0xec,0x60,0x02,0x80,0x12,0x05,0x6a,0xe5,0x6a,0x70,
+0x02,0x05,0x69,0x05,0x57,0xe5,0x57,0x70,0x02,0x05,0x56,0x80,0xd2,0xe5,0x54,0x54,
+0x0f,0x24,0x9d,0xf8,0xc6,0x54,0xfe,0xf6,0xe5,0x54,0x54,0x0f,0x7f,0x00,0xfe,0x7c,
+0x12,0x12,0x31,0xfb,0xe5,0x55,0x14,0x70,0x09,0x7d,0x00,0x7c,0x09,0x12,0x25,0x26,
+0x80,0x07,0xad,0x57,0x7c,0x00,0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,
+0x90,0xff,0xfc,0xe0,0x44,0x02,0xf0,0x90,0xff,0x00,0xe0,0x30,0xe7,0x13,0x90,0xff,
+0x83,0xe0,0x44,0x80,0xf0,0x43,0x6d,0x80,0x90,0xff,0xfc,0xe0,0x44,0x01,0xf0,0x80,
+0x11,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x53,0x6d,0x7f,0x90,0xff,0xfc,0xe0,0x54,
+0xfe,0xf0,0x90,0xff,0x81,0xe0,0x44,0x80,0xf0,0x12,0x25,0xd9,0x90,0xff,0xfe,0xe0,
+0x44,0x05,0xf0,0x90,0xff,0xfc,0xe0,0x54,0xfd,0xf0,0x12,0x31,0x69,0x22,0x12,0x30,
+0xe6,0x7c,0x01,0x12,0x32,0xa9,0x78,0xad,0xe6,0x44,0x02,0xf6,0x74,0xfe,0xfc,0x04,
+0xfd,0x12,0x1c,0xa7,0x90,0xff,0x5a,0xe0,0x30,0xe7,0x02,0x80,0xf7,0xe4,0xf5,0x4e,
+0x75,0x4d,0x10,0xac,0x4e,0xad,0x4d,0xe5,0x4e,0x15,0x4e,0x70,0x02,0x15,0x4d,0xec,
+0x4d,0x60,0x02,0x80,0xee,0x43,0x87,0x01,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x7c,
+0x02,0x12,0x31,0x75,0x78,0xad,0xe6,0x54,0xfd,0xf6,0x12,0x31,0x69,0x22,0x12,0x30,
+0xe6,0x78,0xad,0xe6,0x30,0xe0,0x2c,0x78,0xad,0xe6,0x30,0xe1,0x26,0x78,0xad,0xe6,
+0xfc,0xf5,0x83,0x18,0xe6,0x44,0xf0,0xfd,0x12,0x1c,0x3c,0x90,0xff,0xfc,0xe0,0x44,
+0x20,0xf0,0x7c,0x02,0x12,0x32,0xa9,0x78,0xad,0xe6,0x54,0xfd,0xf6,0x74,0x1a,0x90,
+0xff,0xfe,0xf0,0x78,0xad,0xe6,0xfc,0xf5,0x83,0x18,0xe6,0x44,0xf1,0xfd,0x12,0x1c,
+0x3c,0x12,0x31,0x69,0x22,0x75,0x6d,0x00,0x90,0xff,0xff,0xe0,0x60,0x03,0x43,0x6d,
+0x01,0x75,0x6e,0x00,0xe4,0xf5,0x6c,0xf5,0x6b,0xe4,0xf5,0x6f,0x75,0x70,0x49,0x74,
+0x84,0x90,0xff,0x82,0xf0,0x74,0x84,0x90,0xff,0x80,0xf0,0x74,0x80,0x90,0xff,0x58,
+0xf0,0x74,0x80,0x90,0xff,0x5a,0xf0,0xad,0x46,0xaf,0x45,0x7e,0x00,0xee,0x24,0xfe,
+0x50,0x03,0x02,0x21,0x24,0xe4,0xee,0x75,0xf0,0x07,0xa4,0x24,0x7f,0xf5,0x82,0xe4,
+0x34,0xf8,0xf5,0x83,0xe0,0xff,0xe4,0xef,0x54,0x80,0xfd,0xe4,0xef,0x54,0x0f,0x14,
+0xff,0xed,0x60,0x38,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0x74,0x90,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4e,
+0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,0x80,0x34,0xe4,0xef,0x75,0xf0,
+0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x90,0xf0,0xe4,0xef,
+0x75,0xf0,0x08,0xa4,0x24,0x0a,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0xe4,
+0xef,0x75,0xf0,0x08,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,
+0x0e,0x02,0x20,0x8d,0x8d,0x46,0x8e,0x44,0x8f,0x45,0x74,0x7f,0x90,0xff,0xfd,0xf0,
+0x74,0x90,0x90,0xff,0xfc,0xf0,0x22,0x8c,0x58,0xec,0x24,0xf6,0x50,0x06,0xe5,0x58,
+0x24,0x37,0xfc,0x22,0xe5,0x58,0x24,0x30,0xfc,0x22,0x12,0x25,0x23,0xec,0x70,0x03,
+0x02,0x22,0x5e,0x75,0x5c,0x03,0xae,0x5b,0x7f,0x00,0xe5,0x5c,0x15,0x5c,0x64,0x80,
+0x24,0x7f,0x50,0x35,0xef,0x24,0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0xfe,
+0x24,0xfe,0x50,0x1e,0xef,0x7d,0x00,0xfc,0xe4,0xfb,0x74,0x74,0xc3,0x9c,0xfa,0xeb,
+0x9d,0xfb,0xee,0x7d,0x00,0xfc,0xea,0xc3,0x9c,0xed,0x64,0x80,0xcb,0x64,0x80,0x9b,
+0x50,0x02,0x80,0x05,0xef,0x2e,0xff,0x80,0xc1,0x8e,0x5b,0x8f,0x5a,0xe5,0x5c,0x64,
+0x80,0x24,0x7f,0x50,0x03,0x02,0x22,0x5e,0xe5,0x5a,0x24,0x8e,0x50,0x03,0x02,0x22,
+0x5e,0x85,0x5a,0x5d,0x75,0x5b,0x00,0xae,0x5a,0xaf,0x5b,0x90,0x35,0x9c,0xe4,0x93,
+0xf5,0x5c,0xe5,0x5c,0x15,0x5c,0x64,0x80,0x24,0x7f,0x50,0x18,0xee,0x24,0x00,0xf5,
+0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0xfc,0xef,0x90,0x35,0x9c,0x93,0x6c,0x70,0x04,
+0x0e,0x0f,0x80,0xde,0x8e,0x5a,0x8f,0x5b,0xe5,0x5c,0x64,0x80,0x24,0x7f,0x40,0x6e,
+0x75,0x5e,0x01,0x75,0x60,0xe8,0x75,0x5f,0xff,0xe5,0x5d,0x24,0x02,0xf5,0x5a,0x75,
+0x5c,0x07,0xe5,0x5c,0x33,0x40,0x57,0xad,0x60,0xae,0x5f,0xaf,0x5e,0xe5,0x5c,0xf5,
+0x82,0x33,0x95,0xe0,0xf5,0x83,0x12,0x01,0xec,0xc4,0x54,0x0f,0xfc,0x12,0x21,0x37,
+0xe5,0x5a,0x24,0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xec,0xf0,0x05,0x5a,0x05,
+0x5a,0xad,0x60,0xae,0x5f,0xaf,0x5e,0xe5,0x5c,0xf5,0x82,0x33,0x95,0xe0,0xf5,0x83,
+0x12,0x01,0xec,0x54,0x0f,0xfc,0x12,0x21,0x37,0xe5,0x5a,0x24,0x00,0xf5,0x82,0xe4,
+0x34,0xfb,0xf5,0x83,0xec,0xf0,0x05,0x5a,0x05,0x5a,0x15,0x5c,0x80,0xa4,0x74,0x02,
+0x90,0xf8,0x51,0xf0,0x90,0xf8,0x6b,0x79,0x75,0x7a,0x35,0x7b,0x27,0x78,0x01,0x12,
+0x03,0xf5,0x75,0x6a,0x35,0x75,0x69,0xfc,0x75,0x68,0x01,0xe4,0x90,0xff,0x83,0xf0,
+0x74,0x80,0x90,0xff,0x81,0xf0,0x75,0x59,0x02,0xe5,0x59,0x75,0xf0,0x07,0xa4,0x24,
+0x7f,0xf5,0x82,0xe4,0x34,0xf8,0xf5,0x83,0xe0,0x78,0x8f,0xf6,0xfc,0x54,0x0f,0x14,
+0xfc,0x78,0x8f,0xec,0xf6,0xe5,0x59,0x75,0xf0,0x07,0xa4,0x24,0x81,0xf5,0x82,0xe4,
+0x34,0xf8,0xf5,0x83,0xe0,0x78,0x92,0x76,0xfd,0x08,0x76,0xe8,0xfc,0x78,0x8f,0xe6,
+0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,
+0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xec,
+0xf0,0x78,0x92,0xe6,0xff,0x08,0xe6,0x7e,0x03,0xcf,0xc3,0x13,0xcf,0x13,0xde,0xf9,
+0xfe,0x78,0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x49,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0xee,0xf0,0x78,0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0x74,0x80,0xf0,0x78,0x90,0xec,0xf6,0x7d,0x00,0x78,0x93,0xe6,0x2c,
+0xf6,0x18,0xe6,0x3d,0xf6,0x78,0x92,0xe6,0xfd,0x08,0xe6,0x7c,0x03,0xcd,0xc3,0x13,
+0xcd,0x13,0xdc,0xf9,0xfc,0x78,0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4d,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xec,0xf0,0x78,0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4e,
+0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x92,0xe6,0xfd,0x08,0xe6,0xfc,
+0x78,0x8f,0xe6,0xff,0x7e,0x00,0xee,0x24,0xfe,0x50,0x03,0x02,0x24,0xdd,0xe4,0xee,
+0x75,0xf0,0x07,0xa4,0x24,0x7f,0xf5,0x82,0xe4,0x34,0xf8,0xf5,0x83,0xe0,0xff,0xe4,
+0xef,0x54,0x80,0xfa,0xe4,0xef,0x54,0x0f,0x14,0xff,0xe4,0xee,0x75,0xf0,0x07,0xa4,
+0x24,0x81,0xf5,0x82,0xe4,0x34,0xf8,0xf5,0x83,0xe0,0x78,0x90,0xf6,0xe4,0xee,0x13,
+0x13,0x54,0x80,0x24,0xf0,0xf8,0xe4,0x34,0xfd,0xf9,0xe8,0xfc,0xe9,0xfd,0x8a,0x5a,
+0xea,0x70,0x03,0x02,0x24,0x4a,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x90,0xe6,0xfa,0xe4,0xef,0x75,0xf0,0x08,
+0xa4,0x24,0x4f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0xed,0xfb,0xec,0x7a,
+0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,
+0x49,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0x78,0x90,0xe6,0x7b,0x00,0xfa,
+0xec,0x2a,0xfc,0xed,0x3b,0xfd,0xfb,0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,
+0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4d,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0xea,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,0xff,
+0xf5,0x83,0x74,0x80,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4e,0xf5,0x82,0xe4,
+0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,0x02,0x24,0xd9,0xe4,0xef,0x75,0xf0,0x08,0xa4,
+0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x90,0xe6,0xfa,0xe4,
+0xef,0x75,0xf0,0x08,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,
+0xed,0xfb,0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,
+0xf0,0x08,0xa4,0x24,0x09,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0x78,0x90,
+0xe6,0x7b,0x00,0xfa,0xec,0x2a,0xfc,0xed,0x3b,0xfd,0xfb,0xec,0x7a,0x03,0xcb,0xc3,
+0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0d,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0a,0xf5,
+0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0e,
+0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x0e,0x02,0x23,0x66,0x8e,0x59,0x78,
+0x92,0xed,0xf6,0x08,0xec,0xf6,0x78,0x8f,0xef,0xf6,0x12,0x20,0x55,0x22,0x8c,0x26,
+0xec,0x30,0xe7,0x18,0xe5,0x26,0x54,0x0f,0x14,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,
+0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0xdf,0xf0,0x80,0x16,0xe5,0x26,0x54,0x0f,
+0x14,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,
+0xdf,0xf0,0x22,0x7c,0x00,0x22,0xec,0x90,0xfc,0x37,0xf0,0x8c,0x24,0xed,0x24,0x03,
+0xf5,0x25,0x7d,0x00,0xd3,0x95,0x72,0xed,0x95,0x71,0x40,0x03,0x85,0x72,0x25,0xe5,
+0x25,0x24,0xb7,0x50,0x09,0x75,0x25,0x03,0x74,0x02,0x90,0xfc,0x37,0xf0,0xac,0x25,
+0x12,0x30,0x24,0x22,0xe4,0xf5,0x6c,0xf5,0x6b,0x12,0x25,0x5d,0x22,0x90,0xfc,0x35,
+0xe0,0x65,0x73,0x60,0x0e,0x74,0x04,0x90,0xfc,0x37,0xf0,0xe4,0xf5,0x6b,0x75,0x6c,
+0x03,0x80,0x46,0x7d,0x73,0xe4,0xfe,0xff,0x79,0x35,0x7a,0xfc,0x7b,0x01,0x74,0x05,
+0x78,0x00,0x12,0x03,0x3f,0xe5,0x6c,0x24,0x03,0xf5,0x6c,0xe5,0x6b,0x34,0x00,0xf5,
+0x6b,0xe5,0x6c,0xd3,0x95,0x72,0xe5,0x6b,0x95,0x71,0x40,0x06,0x85,0x72,0x6c,0x85,
+0x71,0x6b,0xd3,0xe5,0x6c,0x94,0x48,0xe5,0x6b,0x94,0x00,0x40,0x0c,0x74,0x02,0x90,
+0xfc,0x37,0xf0,0xe4,0xf5,0x6b,0x75,0x6c,0x03,0xac,0x6c,0x12,0x30,0x24,0x22,0xec,
+0x90,0xfc,0x37,0xf0,0xe4,0xf5,0x6c,0xf5,0x6b,0x8c,0x32,0xec,0x60,0x05,0x12,0x30,
+0x15,0x80,0x05,0x7c,0x00,0x12,0x30,0x24,0x22,0x90,0xff,0x93,0xe0,0x44,0x01,0xf0,
+0xb2,0xb3,0x90,0xff,0x04,0xe0,0xf5,0x4a,0x90,0xff,0x06,0xe0,0xfd,0xa3,0xe0,0xed,
+0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,0xff,0x06,0xe0,0xff,0xa3,0xe0,0x7e,0x00,0xff,
+0xe4,0xfe,0xec,0x4e,0xfc,0xed,0x4f,0xfd,0xc3,0xec,0x94,0x48,0xed,0x94,0x00,0x50,
+0x22,0x90,0xff,0x06,0xe0,0xfd,0xa3,0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,
+0xff,0x06,0xe0,0xff,0xa3,0xe0,0x7e,0x00,0xff,0xe4,0xfe,0xec,0x4e,0xfc,0xed,0x4f,
+0xfd,0x80,0x04,0xe4,0xfd,0x7c,0x48,0x8c,0x72,0x8d,0x71,0x90,0xff,0x02,0xe0,0xfd,
+0xa3,0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,0xff,0x02,0xe0,0xff,0xa3,0xe0,
+0x7e,0x00,0xff,0xe4,0xfe,0xec,0x4e,0xf5,0x4c,0xed,0x4f,0xf5,0x4b,0x75,0x6a,0x35,
+0x75,0x69,0xfc,0x75,0x68,0x01,0x7d,0x35,0x7e,0xfc,0x7f,0x01,0x79,0x73,0xe4,0xfa,
+0xfb,0x74,0x05,0x78,0x00,0x12,0x03,0x3f,0x75,0x49,0x00,0xe5,0x49,0x24,0xfe,0x40,
+0x19,0xad,0x6a,0xae,0x69,0xaf,0x68,0xe4,0x12,0x03,0x0f,0x05,0x49,0x0d,0xed,0x70,
+0x01,0x0e,0x8d,0x6a,0x8e,0x69,0x8f,0x68,0x80,0xe1,0x75,0x6a,0x35,0x75,0x69,0xfc,
+0x75,0x68,0x01,0x90,0xff,0x00,0xe0,0x54,0x60,0xb4,0x00,0x02,0x80,0x06,0xd3,0x50,
+0x03,0x02,0x2c,0x6d,0xe5,0x4a,0x54,0x0f,0xf5,0x49,0xe5,0x4a,0x54,0x80,0xa2,0xe0,
+0x92,0x02,0x90,0xff,0x01,0xe0,0x12,0x01,0x81,0x00,0x0b,0x2c,0x68,0x26,0xe5,0x28,
+0x03,0x2c,0x68,0x29,0x0f,0x2c,0x68,0x29,0xf2,0x2a,0x26,0x2b,0x8d,0x2b,0x90,0x2b,
+0xd0,0x2c,0x11,0x2c,0x3f,0xe5,0x6d,0x30,0xe7,0x0e,0xe5,0x4c,0x45,0x4b,0x70,0x08,
+0xe5,0x72,0x64,0x02,0x45,0x71,0x60,0x03,0x02,0x2c,0x6a,0x90,0xff,0x00,0xe0,0x54,
+0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x29,0xe5,0x4a,0x60,0x03,0x02,0x28,0x00,
+0xad,0x6a,0xae,0x69,0xaf,0x68,0x74,0x01,0x12,0x03,0x0f,0x78,0xad,0xe6,0x30,0xe0,
+0x0b,0xad,0x6a,0xae,0x69,0xaf,0x68,0x74,0x02,0x12,0x03,0x0f,0x7c,0x02,0x12,0x30,
+0x24,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x1b,0xe5,0x6d,0x20,0xe1,0x07,0xe5,
+0x4a,0x60,0x03,0x02,0x28,0x00,0xe5,0x4a,0x24,0xfe,0x50,0x03,0x02,0x28,0x00,0x7c,
+0x02,0x12,0x30,0x24,0x22,0xb4,0x02,0x02,0x80,0x06,0xd3,0x50,0x03,0x02,0x27,0xfe,
+0xe5,0x6d,0x20,0xe1,0x0d,0xe5,0x4a,0x60,0x09,0xe5,0x4a,0x64,0x80,0x60,0x03,0x02,
+0x28,0x00,0xac,0x4a,0x12,0x30,0xab,0x40,0x03,0x02,0x28,0x00,0xe5,0x49,0x70,0x25,
+0x30,0x02,0x11,0x90,0xff,0x80,0xe0,0x54,0x08,0xad,0x6a,0xae,0x69,0xaf,0x68,0x12,
+0x03,0x0f,0x80,0x0f,0x90,0xff,0x82,0xe0,0x54,0x08,0xad,0x6a,0xae,0x69,0xaf,0x68,
+0x12,0x03,0x0f,0x80,0x3d,0x15,0x49,0x30,0x02,0x1d,0xe5,0x49,0x75,0xf0,0x08,0xa4,
+0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0x08,0xad,0x6a,0xae,0x69,
+0xaf,0x68,0x12,0x03,0x0f,0x80,0x1b,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,
+0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0x08,0xad,0x6a,0xae,0x69,0xaf,0x68,0x12,
+0x03,0x0f,0xad,0x6a,0xae,0x69,0xaf,0x68,0x12,0x01,0xe6,0x60,0x0b,0xad,0x6a,0xae,
+0x69,0xaf,0x68,0x74,0x01,0x12,0x03,0x0f,0x7c,0x02,0x12,0x30,0x24,0x22,0x80,0x00,
+0x02,0x2c,0x6a,0xe5,0x6d,0x20,0xe7,0x06,0xe5,0x72,0x45,0x71,0x60,0x03,0x02,0x2c,
+0x6a,0x90,0xff,0x00,0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x1a,0xe5,
+0x4c,0x14,0x45,0x4b,0x70,0x04,0xe5,0x4a,0x60,0x03,0x02,0x29,0x0c,0x78,0xad,0xe6,
+0x54,0xfe,0xf6,0x7c,0x00,0x12,0x30,0x24,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,
+0x2a,0xe5,0x6d,0x20,0xe1,0x08,0xe5,0x6d,0x20,0xe0,0x03,0x02,0x29,0x0c,0xe5,0x6d,
+0x30,0xe0,0x04,0xe5,0x4a,0x70,0x0b,0xe5,0x6d,0x30,0xe1,0x09,0xe5,0x4a,0x24,0xfe,
+0x50,0x03,0x02,0x29,0x0c,0x7c,0x00,0x12,0x30,0x24,0x22,0xb4,0x02,0x02,0x80,0x06,
+0xd3,0x50,0x03,0x02,0x29,0x0a,0xe5,0x4c,0x45,0x4b,0x60,0x03,0x02,0x29,0x0c,0xac,
+0x4a,0x12,0x30,0xab,0x40,0x03,0x02,0x29,0x0c,0xe5,0x6d,0x20,0xe1,0x07,0xe5,0x6d,
+0x20,0xe0,0x02,0x80,0x77,0xe5,0x6d,0x30,0xe0,0x06,0xe5,0x49,0x60,0x02,0x80,0x6c,
+0xe5,0x49,0x70,0x0f,0x90,0xff,0x82,0xe0,0x54,0xf7,0xf0,0x90,0xff,0x80,0xe0,0x54,
+0xf7,0xf0,0x22,0xe5,0x49,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x09,0x7d,0x01,0x7c,
+0x03,0x12,0x0f,0x09,0x80,0x11,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x09,0x7d,0x01,
+0x7c,0x04,0x12,0x0f,0x09,0x80,0x00,0x15,0x49,0x30,0x02,0x15,0xe5,0x49,0x75,0xf0,
+0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0xf7,0xf0,0x80,
+0x13,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,
+0xe0,0x54,0xf7,0xf0,0x7c,0x00,0x12,0x30,0x24,0x22,0x80,0x00,0x02,0x2c,0x6a,0xe5,
+0x6d,0x20,0xe7,0x06,0xe5,0x72,0x45,0x71,0x60,0x03,0x02,0x2c,0x6a,0x90,0xff,0x00,
+0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x1a,0xe5,0x4c,0x14,0x45,0x4b,
+0x70,0x04,0xe5,0x4a,0x60,0x03,0x02,0x29,0xef,0x78,0xad,0xe6,0x44,0x01,0xf6,0x7c,
+0x00,0x12,0x30,0x24,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x29,0xe5,0x6d,0x20,
+0xe1,0x08,0xe5,0x6d,0x20,0xe0,0x03,0x02,0x29,0xef,0xe5,0x6d,0x30,0xe0,0x04,0xe5,
+0x49,0x70,0x0b,0xe5,0x6d,0x30,0xe1,0x08,0xe5,0x49,0x24,0xfe,0x50,0x02,0x80,0x7f,
+0x7c,0x00,0x12,0x30,0x24,0x22,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x6f,0xe5,0x4c,
+0x45,0x4b,0x60,0x02,0x80,0x69,0xac,0x4a,0x12,0x30,0xab,0x40,0x02,0x80,0x60,0xe5,
+0x6d,0x20,0xe1,0x07,0xe5,0x6d,0x20,0xe0,0x02,0x80,0x54,0xe5,0x49,0x70,0x14,0x30,
+0x02,0x09,0x90,0xff,0x80,0xe0,0x44,0x08,0xf0,0x80,0x07,0x90,0xff,0x82,0xe0,0x44,
+0x08,0xf0,0x22,0xe5,0x6d,0x30,0xe1,0x33,0x15,0x49,0x30,0x02,0x15,0xe5,0x49,0x75,
+0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x44,0x08,0xf0,
+0x80,0x13,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0xe0,0x44,0x08,0xf0,0x7c,0x00,0x12,0x30,0x24,0x22,0x80,0x02,0x80,0x00,0x02,
+0x2c,0x6a,0xe5,0x6d,0x20,0xe7,0x12,0xe5,0x72,0x45,0x71,0x70,0x0c,0xe5,0x4a,0x70,
+0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x6a,0xe5,0x4c,0x90,0xff,
+0xff,0xf0,0x90,0xff,0xff,0xe0,0x60,0x05,0x43,0x6d,0x01,0x80,0x03,0x53,0x6d,0xfe,
+0x7c,0x00,0x12,0x30,0x24,0x22,0xe5,0x6d,0x30,0xe7,0x0e,0xe5,0x72,0x45,0x71,0x60,
+0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x6a,0xad,0x4b,0xe5,0x4c,
+0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0xbd,0x00,0x02,0x80,0x03,0x02,0x2b,0x88,0xb4,
+0x01,0x02,0x80,0x03,0xd3,0x40,0x32,0xe5,0x4a,0x70,0x05,0xe5,0x4c,0xfc,0x60,0x03,
+0x02,0x2b,0x8a,0x75,0x6a,0x40,0x75,0x69,0xf8,0x75,0x68,0x01,0xd3,0xe5,0x72,0x94,
+0x12,0xe5,0x71,0x94,0x00,0x40,0x06,0xe4,0xfd,0x7c,0x12,0x80,0x04,0xac,0x72,0xad,
+0x71,0x8c,0x70,0x8d,0x6f,0x12,0x30,0x39,0x22,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,
+0x59,0xe5,0x4a,0x60,0x03,0x02,0x2b,0x8a,0xe5,0x4c,0xfc,0x70,0x27,0x75,0x6a,0x52,
+0x75,0x69,0xf8,0x75,0x68,0x01,0xd3,0xe5,0x72,0x94,0x19,0xe5,0x71,0x94,0x00,0x40,
+0x06,0xe4,0xfd,0x7c,0x19,0x80,0x04,0xac,0x72,0xad,0x71,0x8c,0x70,0x8d,0x6f,0x12,
+0x30,0x39,0x80,0x25,0x75,0x6a,0x6b,0x75,0x69,0xf8,0x75,0x68,0x01,0xd3,0xe5,0x72,
+0x94,0x27,0xe5,0x71,0x94,0x00,0x40,0x06,0xe4,0xfd,0x7c,0x27,0x80,0x04,0xac,0x72,
+0xad,0x71,0x8c,0x70,0x8d,0x6f,0x12,0x30,0x39,0x22,0xb4,0x03,0x02,0x80,0x06,0xd3,
+0x50,0x03,0x02,0x2b,0x88,0xe5,0x4c,0xf5,0x49,0x70,0x0f,0x90,0xff,0x04,0xe0,0xfd,
+0xa3,0xe0,0x4d,0x60,0x03,0x02,0x2b,0x8a,0x80,0x18,0x90,0xfb,0x02,0xe0,0xfd,0xa3,
+0xe0,0xfc,0x90,0xff,0x05,0xe0,0x6c,0x70,0x07,0x90,0xff,0x04,0xe0,0x6d,0x60,0x02,
+0x80,0x68,0xe4,0xf5,0x70,0xf5,0x6f,0x7f,0x00,0xe5,0x49,0x14,0xc5,0x49,0x60,0x0f,
+0xef,0x24,0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0x2f,0xff,0x80,0xea,0x8f,
+0x4a,0xe5,0x4a,0x24,0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0x7d,0x00,0xd3,
+0x95,0x72,0xed,0x95,0x71,0x40,0x06,0xac,0x72,0xad,0x71,0x80,0x0f,0xe5,0x4a,0x24,
+0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0x7d,0x00,0xfc,0x8c,0x70,0x8d,0x6f,
+0xe5,0x4a,0x24,0x00,0xfc,0xe4,0x34,0xfb,0xfd,0xfe,0xec,0xfd,0x7f,0x01,0x8d,0x6a,
+0x8e,0x69,0x8f,0x68,0x12,0x30,0x39,0x22,0x80,0x00,0x02,0x2c,0x6a,0x02,0x2c,0x6a,
+0xe5,0x6d,0x30,0xe7,0x19,0xe5,0x72,0x14,0x45,0x71,0x70,0x12,0xe5,0x4a,0x70,0x0e,
+0xe5,0x4c,0x45,0x4b,0x70,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,
+0x6a,0xe5,0x6d,0x20,0xe0,0x08,0xe5,0x6d,0x20,0xe1,0x03,0x02,0x2c,0x6a,0x75,0x6a,
+0x6e,0xe4,0xf5,0x69,0xf5,0x68,0xe4,0xf5,0x6f,0x04,0xf5,0x70,0x12,0x30,0x39,0x22,
+0xe5,0x6d,0x20,0xe7,0x12,0xe5,0x72,0x45,0x71,0x70,0x0c,0xe5,0x4a,0x70,0x08,0x90,
+0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x6a,0xe5,0x6d,0x20,0xe0,0x07,0xe5,
+0x6d,0x20,0xe1,0x02,0x80,0x74,0x85,0x4c,0x6e,0xe5,0x6e,0x70,0x08,0x43,0x6d,0x01,
+0x53,0x6d,0xfd,0x80,0x06,0x53,0x6d,0xfe,0x43,0x6d,0x02,0x7c,0x00,0x12,0x30,0x24,
+0x22,0xe5,0x6d,0x30,0xe7,0x1a,0xe5,0x72,0x14,0x45,0x71,0x70,0x13,0xe5,0x4a,0x70,
+0x0f,0xe5,0x4c,0x45,0x4b,0x70,0x09,0x90,0xff,0x00,0xe0,0x54,0x1f,0x14,0x60,0x02,
+0x80,0x38,0xe5,0x6d,0x20,0xe1,0x02,0x80,0x31,0x7c,0x01,0x12,0x30,0x24,0x22,0xe5,
+0x6d,0x20,0xe7,0x15,0xe5,0x72,0x45,0x71,0x70,0x0f,0xe5,0x4c,0x45,0x4b,0x70,0x09,
+0x90,0xff,0x00,0xe0,0x54,0x1f,0x14,0x60,0x02,0x80,0x0f,0xe5,0x6d,0x20,0xe1,0x02,
+0x80,0x08,0x7c,0x00,0x12,0x30,0x24,0x22,0x80,0x00,0x02,0x2f,0x2b,0xb4,0x40,0x02,
+0x80,0x06,0xd3,0x50,0x03,0x02,0x2f,0x21,0x90,0xff,0x01,0xe0,0x90,0xfc,0x35,0xf0,
+0xe5,0x4a,0x90,0xfc,0x36,0xf0,0xe4,0x90,0xfc,0x37,0xf0,0xe5,0x6a,0x24,0x03,0xf5,
+0x6a,0xe5,0x69,0x34,0x00,0xf5,0x69,0xad,0x4b,0xe5,0x4c,0x85,0x6a,0x82,0x85,0x69,
+0x83,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xff,0x01,0xe0,0x12,0x01,0xb7,0x2c,0xd8,0x01,
+0x2c,0xfe,0x02,0x2d,0x28,0x03,0x2d,0x52,0x04,0x2d,0xa0,0x05,0x2d,0xdd,0x06,0x2e,
+0x03,0x07,0x2e,0x29,0x08,0x2e,0x55,0x09,0x2e,0x7b,0x0b,0x2e,0xa1,0x0c,0x2e,0xb0,
+0x80,0x2e,0xb0,0x81,0x00,0x00,0x2f,0x0e,0xe5,0x6d,0x20,0xe7,0x06,0x7c,0x05,0x12,
+0x25,0xbf,0x22,0x7d,0x24,0x7e,0x35,0x7f,0x02,0x79,0x38,0x7a,0xfc,0x7b,0x01,0x74,
+0x08,0x78,0x00,0x12,0x03,0x3f,0x7d,0x08,0x7c,0x00,0x12,0x25,0x26,0x22,0xe5,0x6d,
+0x20,0xe7,0x06,0x7c,0x05,0x12,0x25,0xbf,0x22,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,
+0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x10,0x12,0x31,0xfb,0x22,
+0x7d,0x00,0x7c,0x07,0x12,0x25,0x26,0x22,0xe5,0x6d,0x20,0xe7,0x06,0x7c,0x05,0x12,
+0x25,0xbf,0x22,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,
+0x4a,0x7f,0x00,0xfe,0x7c,0x11,0x12,0x31,0xfb,0x22,0x7d,0x00,0x7c,0x07,0x12,0x25,
+0x26,0x22,0xe5,0x6d,0x20,0xe7,0x06,0x7c,0x05,0x12,0x25,0xbf,0x22,0xe5,0x4a,0xb4,
+0x05,0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x0a,0x12,0x31,0xfb,
+0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x08,0x12,
+0x31,0xfb,0x22,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,
+0x00,0xfe,0x7c,0x13,0x12,0x31,0xfb,0x22,0x7d,0x00,0x7c,0x07,0x12,0x25,0x26,0x22,
+0xe5,0x6d,0x20,0xe7,0x34,0xd3,0xe5,0x72,0x94,0x48,0xe5,0x71,0x94,0x00,0x50,0x06,
+0xe5,0x72,0x45,0x71,0x70,0x06,0x7c,0x02,0x12,0x25,0xbf,0x22,0xe5,0x4a,0xb4,0x01,
+0x03,0xb3,0x40,0x0b,0xc3,0xb4,0x03,0x00,0x40,0x09,0xb4,0x06,0x00,0x50,0x04,0x12,
+0x30,0xd1,0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,0x22,0xe5,0x6d,0x20,
+0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,
+0x7f,0x00,0xfe,0x7c,0x16,0x12,0x31,0xfb,0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,
+0x25,0x5d,0x22,0xe5,0x6d,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,
+0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x19,0x12,0x31,0xfb,0x22,0x7c,
+0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,0x22,0xe5,0x6d,0x20,0xe7,0x23,0x74,0x81,
+0x90,0xff,0x93,0xf0,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,
+0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x17,0x12,0x31,0xfb,0x22,0x7c,0x07,0x12,0x25,0xbf,
+0x22,0x12,0x25,0x5d,0x22,0xe5,0x6d,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,
+0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x18,0x12,0x31,0xfb,
+0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,0x22,0xe5,0x6d,0x20,0xe7,0x1d,
+0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,
+0xfe,0x7c,0x15,0x12,0x31,0xfb,0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,
+0x22,0xe5,0x6d,0x20,0xe7,0x06,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,0x22,
+0xe5,0x6d,0x30,0xe7,0x20,0x90,0xff,0x00,0xe0,0x54,0x1f,0x70,0x10,0x90,0xff,0x01,
+0xe0,0xb4,0x80,0x05,0x12,0x25,0x54,0x80,0x03,0x12,0x25,0x5d,0x22,0x7d,0x00,0x7c,
+0x05,0x12,0x25,0x26,0x22,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x06,0x7c,0x05,0x12,
+0x25,0xbf,0x22,0xd3,0xe5,0x72,0x94,0x48,0xe5,0x71,0x94,0x00,0x50,0x0b,0xc3,0xe5,
+0x72,0x94,0x07,0xe5,0x71,0x94,0x00,0x50,0x06,0x7c,0x03,0x12,0x25,0xbf,0x22,0xe5,
+0x4a,0xb4,0x05,0x04,0x12,0x30,0xd1,0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0xe5,0x6d,
+0x30,0xe7,0x08,0x7d,0x00,0x7c,0x05,0x12,0x25,0x26,0x22,0x7c,0x05,0x12,0x25,0xbf,
+0x22,0xb4,0x20,0x02,0x80,0x03,0xd3,0x40,0x00,0x80,0x00,0x12,0x2f,0xff,0x22,0x75,
+0x43,0x00,0x90,0xff,0x83,0xe0,0x54,0x0f,0xd3,0x95,0x43,0x40,0x24,0xe5,0x43,0x24,
+0xf0,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xe0,0xad,0x6a,0xae,0x69,0xaf,0x68,0x12,
+0x03,0x0f,0x05,0x43,0x0d,0xed,0x70,0x01,0x0e,0x8d,0x6a,0x8e,0x69,0x8f,0x68,0x80,
+0xd1,0xe5,0x43,0x7d,0x00,0xfc,0xc3,0xe5,0x70,0x9c,0xf5,0x70,0xe5,0x6f,0x9d,0xf5,
+0x6f,0xe5,0x70,0x45,0x6f,0x60,0x06,0xe4,0x90,0xff,0x83,0xf0,0x22,0x90,0xff,0x82,
+0xe0,0x44,0x08,0xf0,0xe4,0xf5,0x6f,0x75,0x70,0x49,0x90,0xfc,0x35,0xe0,0xb4,0x05,
+0x02,0x80,0x03,0xd3,0x40,0x40,0x90,0xfc,0x36,0xe0,0xf5,0x43,0xb4,0x05,0x02,0x80,
+0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x0b,0x12,0x31,0xfb,0x22,0xb4,0x01,
+0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x09,0x12,0x31,0xfb,0x22,
+0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x43,0x7f,0x00,0xfe,0x7c,
+0x14,0x12,0x31,0xfb,0x22,0x22,0xb4,0x80,0x00,0x40,0x23,0xb4,0x82,0x00,0x50,0x1e,
+0x7c,0x35,0x7d,0xfc,0x12,0x17,0x7e,0x7d,0x00,0x8c,0x6c,0x8d,0x6b,0x90,0xfc,0x37,
+0xe0,0x60,0x05,0x12,0x2f,0xff,0x80,0x05,0x7c,0x00,0x12,0x30,0x24,0x22,0x22,0x90,
+0xff,0x83,0xe0,0x54,0x7f,0xf0,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x90,0xff,0x80,
+0xe0,0x44,0x08,0xf0,0x22,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x90,0xff,0x80,0xe0,
+0x44,0x08,0xf0,0x22,0x8c,0x23,0x7d,0x00,0x8c,0x70,0x8d,0x6f,0x75,0x6a,0x35,0x75,
+0x69,0xfc,0x75,0x68,0x01,0x12,0x30,0x39,0x22,0x90,0xff,0x83,0xe0,0x54,0x7f,0xf0,
+0xe5,0x70,0x64,0x49,0x45,0x6f,0x70,0x01,0x22,0xc3,0xe5,0x70,0x94,0x08,0xe5,0x6f,
+0x94,0x00,0x40,0x15,0x75,0x21,0x08,0xe5,0x21,0x7d,0x00,0xfc,0xc3,0xe5,0x70,0x9c,
+0xf5,0x70,0xe5,0x6f,0x9d,0xf5,0x6f,0x80,0x09,0x85,0x70,0x21,0xe4,0xf5,0x6f,0x75,
+0x70,0x49,0x75,0x22,0x00,0xe5,0x22,0xc3,0x95,0x21,0x50,0x26,0xad,0x6a,0xae,0x69,
+0xaf,0x68,0x12,0x01,0xe6,0xfc,0xe5,0x22,0x24,0xf8,0xf5,0x82,0xe4,0x34,0xfe,0xf5,
+0x83,0xec,0xf0,0x05,0x22,0x0d,0xed,0x70,0x01,0x0e,0x8d,0x6a,0x8e,0x69,0x8f,0x68,
+0x80,0xd3,0xe5,0x21,0x54,0x7f,0x90,0xff,0x81,0xf0,0x22,0x8c,0x48,0x7f,0x00,0xef,
+0x24,0xfd,0x40,0x19,0xe4,0xef,0x75,0xf0,0x07,0xa4,0x24,0x7f,0xf5,0x82,0xe4,0x34,
+0xf8,0xf5,0x83,0xe0,0x65,0x48,0x70,0x02,0xd3,0x22,0x0f,0x80,0xe2,0x8f,0x47,0xc3,
+0x22,0x85,0x72,0x70,0x85,0x71,0x6f,0x90,0xff,0x82,0xe0,0x54,0xf7,0xf0,0x90,0xff,
+0x83,0xe0,0x54,0x7f,0xf0,0x22,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,0x06,0xc0,0x07,
+0xe5,0x78,0x24,0x08,0xf8,0x86,0x06,0x53,0x06,0x7f,0x7c,0xff,0x12,0x31,0x5b,0x7c,
+0x00,0x7d,0x00,0xe5,0x7b,0x60,0x46,0xff,0x90,0xfd,0x95,0xe0,0x54,0x7f,0x6e,0x70,
+0x0f,0xc0,0x83,0xc0,0x82,0xa3,0xe0,0xfd,0xa3,0xe0,0xfc,0xa3,0x15,0x7b,0x80,0x07,
+0xa3,0xa3,0xa3,0xdf,0xe6,0x80,0x26,0xdf,0x06,0xd0,0x82,0xd0,0x83,0x80,0x1e,0xe0,
+0xf8,0xa3,0xe0,0xf9,0xa3,0xe0,0xfa,0xd0,0x82,0xd0,0x83,0xe8,0xf0,0xa3,0xe9,0xf0,
+0xa3,0xea,0xf0,0xa3,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x80,0xda,0x12,0x31,0xf4,
+0xd0,0x07,0xd0,0x06,0xd0,0x02,0xd0,0x01,0xd0,0x00,0x22,0x85,0xa8,0x7a,0x75,0xa8,
+0x88,0xec,0x70,0x02,0x7c,0x3f,0x8c,0x79,0x22,0xe5,0x78,0x24,0x08,0xf8,0x76,0x00,
+0x12,0x32,0x48,0x80,0xfb,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,0x06,0xc0,0x07,0xae,
+0x04,0x7c,0xff,0x12,0x31,0x5b,0xe5,0x7b,0x60,0x42,0xff,0x90,0xfd,0x95,0xe0,0x54,
+0x7f,0x6e,0x70,0x0b,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x15,0x7b,0x80,0x07,0xa3,
+0xa3,0xa3,0xdf,0xea,0x80,0x26,0xdf,0x06,0xd0,0x82,0xd0,0x83,0x80,0xd8,0xe0,0xf8,
+0xa3,0xe0,0xf9,0xa3,0xe0,0xfa,0xd0,0x82,0xd0,0x83,0xe8,0xf0,0xa3,0xe9,0xf0,0xa3,
+0xea,0xf0,0xa3,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x80,0xda,0x78,0x08,0x08,0x79,
+0x18,0x09,0x7c,0x01,0xe6,0x54,0x7f,0x6e,0x70,0x06,0x76,0x00,0x77,0x00,0x80,0x06,
+0x08,0x09,0x0c,0xbc,0x08,0xee,0x12,0x31,0xf4,0xd0,0x07,0xd0,0x06,0xd0,0x02,0xd0,
+0x01,0xd0,0x00,0x22,0x75,0x79,0x00,0x85,0x7a,0xa8,0x22,0xc0,0xf0,0xc0,0x82,0xc0,
+0x83,0xc3,0xe5,0x7b,0x24,0xe8,0x50,0x05,0x12,0x32,0x48,0x80,0xf4,0xec,0x60,0x31,
+0x90,0x35,0x23,0xe4,0x93,0xc3,0x9c,0x40,0x28,0xc0,0x04,0x7c,0xff,0x12,0x31,0x5b,
+0xd0,0x04,0x43,0x04,0x80,0xe5,0x7b,0x75,0xf0,0x03,0xa4,0x24,0x95,0xf5,0x82,0xe4,
+0x34,0xfd,0xf5,0x83,0xec,0xf0,0xef,0xa3,0xf0,0xee,0xa3,0xf0,0x05,0x7b,0x12,0x31,
+0xf4,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0x22,0xc0,0x04,0x7c,0x20,0xd2,0x8c,0xd2,0x8d,
+0xd5,0x04,0xfd,0xd0,0x04,0x22,0x75,0xa8,0x00,0x75,0x88,0x00,0x75,0xb8,0x00,0x75,
+0xf0,0x00,0x75,0xd0,0x00,0xe4,0xf8,0x90,0x00,0x00,0xf6,0x08,0xb8,0x00,0xfb,0x02,
+0x00,0x00,0xc3,0xed,0x94,0x02,0x50,0x04,0x7d,0x03,0x7c,0xe8,0xec,0xf4,0xfc,0xed,
+0xf4,0xfd,0x0c,0xbc,0x00,0x01,0x0d,0x8c,0x7f,0x8d,0x7e,0x22,0xc3,0xec,0x94,0xbc,
+0xed,0x94,0x02,0x50,0x04,0x7d,0x07,0x7c,0xd0,0xec,0xf4,0xfc,0xed,0xf4,0xfd,0x0c,
+0xbc,0x00,0x01,0x0d,0x8c,0x7d,0x8d,0x7c,0x22,0xec,0x70,0x01,0x22,0xc0,0x00,0xe5,
+0x78,0x24,0x18,0xf8,0xa6,0x04,0xe5,0x78,0x24,0x08,0xf8,0xc6,0x54,0x7f,0xf6,0xe6,
+0x30,0xe7,0x03,0xd0,0x00,0x22,0x12,0x32,0x48,0x80,0xf4,0xc2,0x8c,0x85,0x7c,0x8c,
+0x85,0x7d,0x8a,0xd2,0x8c,0xc0,0xe0,0xc0,0xd0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,
+0x00,0xc0,0x01,0xc0,0x02,0xc0,0x03,0xc0,0x04,0xc0,0x05,0xc0,0x06,0xc0,0x07,0x12,
+0x1a,0xd1,0xe5,0x78,0x24,0x08,0xf8,0xe6,0x60,0x24,0xe5,0x78,0x24,0x10,0xf8,0xa6,
+0x81,0xe5,0x78,0x75,0xf0,0x21,0xa4,0x24,0x8d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,
+0x78,0xae,0xe5,0x81,0x04,0xc3,0x98,0xf9,0xe6,0xf0,0x08,0xa3,0xd9,0xfa,0x74,0x08,
+0x25,0x78,0xf8,0x05,0x78,0x08,0xe6,0x54,0x80,0x70,0x0c,0xe5,0x78,0xb4,0x07,0xf3,
+0x78,0x08,0x75,0x78,0x00,0x80,0xef,0xe5,0x78,0x24,0x10,0xf8,0x86,0x81,0xe5,0x78,
+0x75,0xf0,0x21,0xa4,0x24,0x8d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0x78,0xae,0xe5,
+0x81,0x04,0xc3,0x98,0xf9,0xe0,0xf6,0x08,0xa3,0xd9,0xfa,0xd0,0x07,0xd0,0x06,0xd0,
+0x05,0xd0,0x04,0xd0,0x03,0xd0,0x02,0xd0,0x01,0xd0,0x00,0xd0,0x83,0xd0,0x82,0xd0,
+0xf0,0xd0,0xd0,0xd0,0xe0,0x32,0xc0,0xe0,0xc0,0xd0,0xc0,0x00,0xc0,0x01,0xc0,0x02,
+0xc2,0x8e,0x85,0x7e,0x8d,0x85,0x7f,0x8b,0xd2,0x8e,0x78,0x19,0x79,0x09,0x7a,0x07,
+0xe7,0x70,0x04,0xa6,0x00,0x80,0x0b,0xe6,0x60,0x08,0x16,0xe6,0x70,0x04,0xe7,0x44,
+0x80,0xf7,0x08,0x09,0xda,0xea,0xe5,0x79,0x60,0x13,0x14,0xf5,0x79,0x70,0x0e,0xe5,
+0x78,0x24,0x08,0xf8,0x76,0x00,0x12,0x31,0xf4,0xd2,0x8c,0xd2,0x8d,0xd0,0x02,0xd0,
+0x01,0xd0,0x00,0xd0,0xd0,0xd0,0xe0,0x32,0x75,0x81,0xad,0x74,0x2a,0x90,0xff,0x93,
+0xf0,0x75,0x7f,0x30,0x75,0x7e,0xf8,0x75,0x7d,0x60,0x75,0x7c,0xf0,0x12,0x05,0x36,
+0x12,0x34,0x7c,0x12,0x17,0x34,0x90,0xff,0x93,0xe0,0x44,0x01,0xf0,0xb2,0xb3,0x12,
+0x34,0xa6,0x12,0x32,0x56,0x80,0xda,0x22,0xc0,0x00,0x7c,0x01,0xec,0x24,0x08,0xf8,
+0xe6,0x60,0x09,0x0c,0xbc,0x08,0xf5,0x12,0x32,0x48,0x80,0xee,0xd0,0x00,0x22,0xc0,
+0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x00,0xc0,0x06,0xc0,0x07,0xed,0x24,0x10,0xf8,0x76,
+0xbc,0xed,0x75,0xf0,0x21,0xa4,0x24,0x8d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xc0,
+0x82,0xc0,0x83,0xa3,0xa3,0xe4,0x78,0x0d,0xf0,0xa3,0xd8,0xfc,0xec,0x54,0x7f,0x75,
+0xf0,0x02,0xa4,0x24,0xef,0xf5,0x82,0xe5,0xf0,0x34,0x34,0xf5,0x83,0xe4,0x93,0xfe,
+0x74,0x01,0x93,0xf5,0x82,0x8e,0x83,0xe4,0x93,0xfe,0x74,0x01,0x93,0xff,0xd0,0x83,
+0xd0,0x82,0xef,0xf0,0xa3,0xee,0xf0,0xed,0x24,0x08,0xf8,0xec,0x44,0x80,0xf6,0xd0,
+0x07,0xd0,0x06,0xd0,0x00,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0x22,0x75,0x78,0x00,0x75,
+0x7b,0x00,0x7a,0x08,0x79,0x18,0x78,0x08,0x76,0x00,0x77,0x00,0x08,0x09,0xda,0xf8,
+0xe4,0x78,0x08,0x74,0x80,0x44,0x7f,0xf6,0x74,0x01,0x44,0x10,0xf5,0x89,0x75,0xb8,
+0x08,0xd2,0xab,0xd2,0xa9,0x22,0x75,0x81,0xad,0xd2,0x8e,0xd2,0x8c,0xd2,0xaf,0xe5,
+0x7b,0x60,0x32,0xff,0x90,0xfd,0x95,0xe0,0x54,0x80,0x60,0x24,0x78,0x08,0x79,0x08,
+0xe0,0x54,0x7f,0xfa,0x7b,0x00,0xe6,0x54,0x7f,0xb5,0x02,0x02,0x7b,0xff,0x08,0xd9,
+0xf5,0xeb,0x70,0x0c,0xea,0xf0,0x12,0x33,0xf8,0xad,0x04,0xac,0x02,0x12,0x34,0x0f,
+0xa3,0xa3,0xa3,0xdf,0xd2,0x12,0x32,0x48,0x80,0xc5,0x7c,0x01,0x7d,0x00,0x22,0x04,
+0xf5,0x04,0xe9,0x04,0xed,0x04,0xe1,0x04,0xdd,0x04,0xd9,0x04,0xe5,0x04,0xf1,0x04,
+0x9d,0x04,0xa1,0x04,0xcd,0x04,0xd1,0x04,0x99,0x04,0x99,0x04,0x99,0x04,0xd5,0x04,
+0xb5,0x04,0xad,0x04,0xb1,0x04,0xa9,0x04,0xc1,0x04,0xbd,0x04,0xb9,0x04,0xc5,0x04,
+0xc9,0x04,0xa5,0x19,0x01,0x03,0x00,0x22,0x00,0x48,0x02,0x00,0x48,0x0e,0x30,0x14,
+0x20,0xc8,0x1a,0xd0,0x18,0x0a,0x0c,0x05,0x06,0x02,0x03,0x01,0x02,0x00,0x01,0xce,
+0x01,0x81,0x01,0x00,0x00,0xc0,0x00,0x80,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x10,
+0x00,0x08,0x00,0x04,0x00,0x02,0x00,0x01,0x00,0x08,0x18,0x38,0x28,0x0c,0x05,0x10,
+0x0a,0x02,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x10,0x0a,0x02,0x00,0x00,0x00,0x00,
+0x00,0xfb,0xe0,0xfb,0xf2,0x09,0x02,0x27,0x00,0x01,0x02,0x00,0xa0,0x32,0x09,0x04,
+0x00,0x00,0x03,0xff,0x00,0x00,0x00,0x07,0x05,0x81,0x02,0x40,0x00,0x00,0x07,0x05,
+0x01,0x02,0x40,0x00,0x00,0x07,0x05,0x83,0x03,0x02,0x00,0x01,0x22,0x03,0x54,0x00,
+0x55,0x00,0x53,0x00,0x42,0x00,0x33,0x00,0x34,0x00,0x31,0x00,0x30,0x00,0x20,0x00,
+0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x00,0x00,
+0x00,0x00,
+};
+
+#endif /* ifndef _TI_FW_3410_H_ */
diff --git a/drivers/usb/serial/ti_fw_5052.h b/drivers/usb/serial/ti_fw_5052.h
new file mode 100644
index 000000000000..6ccf40a09798
--- /dev/null
+++ b/drivers/usb/serial/ti_fw_5052.h
@@ -0,0 +1,885 @@
+/* vi: ts=8 sw=8
+ *
+ * TI 5052 USB Serial Driver Firmware Header
+ *
+ * Copyright (C) 2004 Texas Instruments
+ *
+ * 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.
+ */
+
+#ifndef _TI_FW_5052_H_
+#define _TI_FW_5052_H_
+
+/* firmware 9/18/04 */
+
+static unsigned char ti_fw_5052[] = {
+0xC1, 0x35, /* firmware image length excluding header, little endian */
+0x00, /* placeholder for checksum */
+
+0x02,0x00,0x1e,0x02,0x1b,0x32,0xff,0xff,0xff,0xff,0xff,0x02,0x32,0x6a,0xff,0xff,
+0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x02,0x33,0x15,0x75,0x81,
+0xc8,0x90,0xfe,0xf0,0x85,0x83,0xa0,0x12,0x34,0x7d,0xec,0x4d,0x60,0x6a,0x78,0xa5,
+0x80,0x03,0x76,0x00,0x18,0xb8,0x96,0xfa,0x78,0x79,0x80,0x03,0x76,0x00,0x18,0xb8,
+0x5f,0xfa,0x78,0x20,0x80,0x03,0x76,0x00,0x18,0xb8,0x20,0xfa,0x90,0xfe,0xe5,0xae,
+0x83,0xaf,0x82,0x90,0xfd,0x00,0x12,0x00,0xa1,0x60,0x05,0xe4,0xf0,0xa3,0x80,0xf6,
+0x90,0xfe,0xf0,0xa8,0x82,0x90,0xfe,0xf0,0xa9,0x82,0xe8,0xc3,0x99,0x50,0x05,0x76,
+0x00,0x08,0x80,0xf6,0x90,0x00,0xff,0x12,0x00,0xaa,0x90,0x01,0x03,0x12,0x00,0xaa,
+0x90,0x01,0x07,0x12,0x00,0xaa,0x90,0x01,0x0b,0x12,0x00,0xc8,0x90,0x01,0x11,0x12,
+0x00,0xc8,0x90,0x01,0x17,0x12,0x00,0xc8,0x75,0xd0,0x00,0x12,0x33,0x67,0x02,0x01,
+0x1d,0xef,0x65,0x82,0x70,0x03,0xee,0x65,0x83,0x22,0xe4,0x93,0xf8,0x74,0x01,0x93,
+0xf9,0x74,0x02,0x93,0xfe,0x74,0x03,0x93,0xf5,0x82,0x8e,0x83,0xe8,0x69,0x70,0x01,
+0x22,0xe4,0x93,0xf6,0xa3,0x08,0x80,0xf4,0xe4,0x93,0xfc,0x74,0x01,0x93,0xfd,0x74,
+0x02,0x93,0xfe,0x74,0x03,0x93,0xff,0x74,0x04,0x93,0xf8,0x74,0x05,0x93,0xf5,0x82,
+0x88,0x83,0x12,0x00,0xa1,0x70,0x01,0x22,0xe4,0x93,0xa3,0xa8,0x83,0xa9,0x82,0x8c,
+0x83,0x8d,0x82,0xf0,0xa3,0xac,0x83,0xad,0x82,0x88,0x83,0x89,0x82,0x80,0xe3,0x21,
+0x21,0x04,0x92,0x7a,0x7a,0x04,0x92,0xa6,0xa8,0x04,0x92,0xfe,0xf0,0x04,0x94,0x04,
+0x94,0xfb,0xfb,0x04,0x99,0x04,0x94,0xfb,0xfb,0x04,0xf9,0x04,0xf9,0x80,0xfe,0xd0,
+0xf0,0x30,0xf0,0x09,0x20,0xf3,0x03,0xf6,0x80,0x10,0xf7,0x80,0x0d,0x30,0xf1,0x09,
+0x20,0xf3,0x03,0xf2,0x80,0x04,0xf3,0x80,0x01,0xf0,0x20,0xf4,0x04,0xfc,0xd0,0xe0,
+0xcc,0x22,0xcc,0xc0,0xe0,0x12,0x01,0x5a,0x02,0x01,0x4b,0xbc,0x00,0x05,0xd0,0xf0,
+0xac,0xf0,0x22,0xc3,0x13,0xdc,0xfc,0x02,0x01,0x21,0xbf,0x00,0x09,0xed,0x25,0x82,
+0x75,0xf0,0x01,0xf8,0xe6,0x22,0xbf,0x01,0x0f,0xed,0x25,0x82,0xf5,0x82,0xee,0x35,
+0x83,0xf5,0x83,0x75,0xf0,0x04,0xe0,0x22,0xed,0x25,0x82,0x75,0xf0,0x02,0xf8,0xe2,
+0x22,0xd0,0x83,0xd0,0x82,0xf5,0xf0,0xc3,0xe4,0x93,0xa3,0xc5,0xf0,0x95,0xf0,0xc0,
+0xe0,0xc3,0xd0,0xf0,0xe4,0x93,0xa3,0x95,0xf0,0x40,0x12,0xa3,0xa3,0xc3,0xe5,0xf0,
+0x33,0x50,0x02,0x05,0x83,0x25,0x82,0xf5,0x82,0x50,0x02,0x05,0x83,0x74,0x01,0x93,
+0xc0,0xe0,0xe4,0x93,0xc0,0xe0,0x22,0xd0,0x83,0xd0,0x82,0xf5,0xf0,0xe4,0x93,0x70,
+0x09,0x74,0x01,0x93,0x70,0x04,0xa3,0xa3,0x80,0x0c,0x74,0x02,0x93,0x65,0xf0,0x60,
+0x05,0xa3,0xa3,0xa3,0x80,0xe7,0x74,0x01,0x93,0xc0,0xe0,0xe4,0x93,0xc0,0xe0,0x22,
+0x12,0x02,0x5b,0x02,0x01,0xf2,0x12,0x02,0xaf,0x02,0x01,0xf2,0x12,0x02,0xd3,0x02,
+0x01,0xf2,0x30,0xe0,0x07,0x20,0xe3,0x02,0xe6,0x22,0xe7,0x22,0x30,0xe1,0x07,0x20,
+0xe3,0x02,0xe2,0x22,0xe3,0x22,0x30,0xe2,0x02,0xe0,0x22,0xe4,0x93,0x22,0x12,0x02,
+0xd3,0x02,0x02,0x1a,0x12,0x02,0xaf,0x02,0x02,0x1a,0xab,0xf0,0x12,0x02,0x24,0xcb,
+0xc5,0xf0,0xcb,0x22,0x30,0xe0,0x10,0x20,0xe3,0x06,0xe6,0xf5,0xf0,0x08,0xe6,0x22,
+0xe7,0xf5,0xf0,0x09,0xe7,0x19,0x22,0x30,0xe1,0x10,0x20,0xe3,0x06,0xe2,0xf5,0xf0,
+0x08,0xe2,0x22,0xe3,0xf5,0xf0,0x09,0xe3,0x19,0x22,0x30,0xe2,0x06,0xe0,0xf5,0xf0,
+0xa3,0xe0,0x22,0xe4,0x93,0xf5,0xf0,0x74,0x01,0x93,0x22,0xbb,0x00,0x03,0x74,0x09,
+0x22,0xbb,0x01,0x07,0x89,0x82,0x8a,0x83,0x74,0x04,0x22,0xbb,0x02,0x07,0x89,0x82,
+0x8a,0x83,0x74,0x10,0x22,0x74,0x0a,0x22,0x02,0x02,0x7b,0xbb,0x00,0x07,0xe9,0x25,
+0x82,0xf8,0x74,0x01,0x22,0xbb,0x01,0x0d,0xe9,0x25,0x82,0xf5,0x82,0xea,0x35,0x83,
+0xf5,0x83,0x74,0x04,0x22,0xbb,0x02,0x0d,0xe9,0x25,0x82,0xf5,0x82,0xea,0x35,0x83,
+0xf5,0x83,0x74,0x10,0x22,0xe9,0x25,0x82,0xf8,0x74,0x02,0x22,0x02,0x02,0xaf,0xbf,
+0x00,0x05,0xed,0xf8,0x74,0x01,0x22,0xbf,0x01,0x07,0x8d,0x82,0x8e,0x83,0x74,0x04,
+0x22,0xbf,0x02,0x07,0x8d,0x82,0x8e,0x83,0x74,0x10,0x22,0xed,0xf8,0x74,0x02,0x22,
+0x02,0x02,0xd3,0xbf,0x00,0x07,0xed,0x25,0x82,0xf8,0x74,0x01,0x22,0xbf,0x01,0x0d,
+0xed,0x25,0x82,0xf5,0x82,0xee,0x35,0x83,0xf5,0x83,0x74,0x04,0x22,0xbf,0x02,0x0d,
+0xed,0x25,0x82,0xf5,0x82,0xee,0x35,0x83,0xf5,0x83,0x74,0x10,0x22,0xed,0x25,0x82,
+0xf8,0x74,0x02,0x22,0x02,0x03,0x07,0xc0,0xe0,0x12,0x02,0x5b,0x02,0x03,0x1f,0xc0,
+0xe0,0x12,0x02,0xaf,0x02,0x03,0x1f,0xc0,0xe0,0x12,0x02,0xd3,0x02,0x03,0x1f,0x30,
+0xe0,0x0b,0x20,0xe3,0x04,0xd0,0xe0,0xf6,0x22,0xd0,0xe0,0xf7,0x22,0x30,0xe1,0x0b,
+0x20,0xe3,0x04,0xd0,0xe0,0xf2,0x22,0xd0,0xe0,0xf3,0x22,0xd0,0xe0,0xf0,0x22,0xc9,
+0xcd,0xc9,0xca,0xce,0xca,0xcb,0xcf,0xcb,0x12,0x03,0x52,0xed,0xf9,0xee,0xfa,0xef,
+0xfb,0x22,0xbb,0x00,0x2f,0xbf,0x00,0x0a,0xfa,0xed,0xf8,0xe7,0xf6,0x08,0x09,0xda,
+0xfa,0x22,0xbf,0x01,0x12,0x8d,0x82,0x8e,0x83,0xf8,0x02,0x03,0x6f,0x09,0xa3,0xe7,
+0xf0,0xd8,0xfa,0x22,0x02,0x03,0x7a,0xfa,0xed,0xf8,0xe7,0xf2,0x08,0x09,0xda,0xfa,
+0x22,0x02,0x03,0x84,0xbb,0x01,0x4d,0xbf,0x00,0x14,0x89,0x82,0x8a,0x83,0xf9,0xed,
+0xf8,0x02,0x03,0x96,0x08,0xa3,0xe0,0xf6,0xd9,0xfa,0x22,0x02,0x03,0xa7,0xbf,0x01,
+0x22,0x8d,0x82,0x8e,0x83,0xfb,0x08,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xe0,
+0xa3,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xf0,0xa3,0xdb,0xea,0xd8,0xe8,0x22,
+0x02,0x03,0xca,0x8d,0x82,0x8e,0x83,0xf9,0xed,0xf8,0xe0,0xf2,0x08,0xa3,0xd9,0xfa,
+0x22,0x02,0x03,0xd4,0xbb,0x02,0x4d,0xbf,0x00,0x12,0x89,0x82,0x8a,0x83,0xf9,0xed,
+0xf8,0x02,0x03,0xe6,0x08,0xa3,0xe4,0x93,0xf6,0xd9,0xf9,0x22,0xbf,0x01,0x23,0x8d,
+0x82,0x8e,0x83,0xfb,0x08,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xe4,0x93,0xa3,
+0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xf0,0xa3,0xdb,0xe9,0xd8,0xe7,0x22,0x02,
+0x04,0x19,0x89,0x82,0x8a,0x83,0xf9,0xed,0xf8,0xe4,0x93,0xf2,0x08,0xa3,0xd9,0xf9,
+0x22,0x02,0x04,0x2a,0xbf,0x00,0x0d,0xfa,0xed,0xf8,0xe3,0xf6,0x08,0x09,0xda,0xfa,
+0x22,0x02,0x04,0x34,0xbf,0x01,0x12,0x8d,0x82,0x8e,0x83,0xf8,0x02,0x04,0x41,0x09,
+0xa3,0xe3,0xf0,0xd8,0xfa,0x22,0x02,0x04,0x4c,0xfa,0xed,0xf8,0xe3,0xf2,0x08,0x09,
+0xda,0xfa,0x22,0x02,0x04,0x56,0xe6,0xfb,0x08,0xe6,0xfa,0x08,0xe6,0xf9,0x04,0xf6,
+0x18,0x70,0x01,0x06,0x22,0xe6,0xff,0x08,0xe6,0xfe,0x08,0xe6,0xfd,0x22,0xef,0xf0,
+0xa3,0xee,0xf0,0xa3,0xed,0xf0,0x22,0xeb,0xf0,0xa3,0xea,0xf0,0xa3,0xe9,0xf0,0x22,
+0xe0,0xff,0xa3,0xe0,0xfe,0xa3,0xe0,0xfd,0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,
+0xf9,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xf9,0x00,0x5b,0x05,0x73,0x00,
+0x26,0x05,0x9a,0x00,0x33,0x0a,0x0b,0x00,0x5b,0x0a,0x77,0x00,0x60,0x15,0x52,0x00,
+0x5b,0x0c,0xfb,0x00,0x5b,0x09,0xab,0x00,0x5b,0x09,0xe2,0x00,0x5b,0x0d,0xc2,0x00,
+0x5b,0x0b,0xf3,0x00,0x5b,0x0a,0x1e,0x00,0x5b,0x0a,0x53,0x00,0x5b,0x17,0x4a,0x00,
+0x33,0x17,0x60,0x00,0x34,0x1e,0x4d,0x00,0x43,0x1e,0xf0,0x00,0x44,0x20,0x5d,0x00,
+0x44,0x20,0x4b,0x00,0x47,0x1f,0x17,0x00,0x47,0x1f,0xbc,0x00,0x4d,0x20,0x0d,0x00,
+0x4f,0x1f,0x39,0x00,0x58,0x31,0xf5,0x00,0x5b,0x7c,0xcc,0x7d,0xff,0x12,0x1c,0xfe,
+0x22,0x74,0x90,0x90,0xff,0x91,0xf0,0x90,0xff,0xfc,0xe0,0x20,0xe7,0x2d,0xc2,0xaf,
+0xae,0x59,0xaf,0x58,0x75,0x5a,0x20,0xe5,0x5a,0x14,0xc5,0x5a,0x60,0x19,0xe4,0xfe,
+0x7f,0x05,0xee,0x4f,0xce,0x24,0xff,0xce,0xcf,0x34,0xff,0xcf,0x60,0x07,0xe4,0x90,
+0xff,0x92,0xf0,0x80,0xed,0x80,0xe0,0x8e,0x59,0x8f,0x58,0x22,0x12,0x05,0x01,0x7d,
+0x07,0x7c,0xb7,0x12,0x32,0x11,0x7d,0x0f,0x7c,0x6e,0x12,0x32,0x2b,0x78,0x97,0x7a,
+0x06,0xe4,0xf6,0x08,0xda,0xfc,0x7a,0x06,0x12,0x05,0xcf,0x7c,0x03,0x12,0x0e,0x57,
+0x7c,0x04,0x12,0x0e,0x57,0x12,0x21,0x8b,0xe4,0xfe,0xff,0x7c,0x0f,0x12,0x31,0x9a,
+0xd2,0xa8,0x22,0x12,0x30,0x85,0xe4,0x90,0xfd,0x40,0xf0,0x90,0xff,0xf0,0xe0,0x30,
+0xe4,0x08,0x74,0x01,0x90,0xfd,0x41,0xf0,0x80,0x05,0xe4,0x90,0xfd,0x41,0xf0,0x7d,
+0x0a,0x7c,0x00,0x12,0x24,0xb1,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x90,0xfd,0x41,
+0xe0,0x14,0x70,0x0e,0x90,0xff,0xf0,0xe0,0x44,0x10,0xf0,0x7c,0x00,0x12,0x25,0x4a,
+0x80,0x19,0x90,0xfd,0x41,0xe0,0x70,0x0e,0x90,0xff,0xf0,0xe0,0x54,0xef,0xf0,0x7c,
+0x00,0x12,0x25,0x4a,0x80,0x05,0x7c,0x17,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x90,
+0xff,0xf0,0xe0,0x54,0xab,0xf0,0x90,0xff,0xf0,0xe0,0x44,0x20,0xf0,0x22,0x8c,0x37,
+0x8d,0x36,0x78,0x7c,0xed,0xf6,0x08,0xec,0xf6,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,
+0x00,0x05,0x12,0x01,0xec,0x78,0x7a,0xf6,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,
+0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x04,0x12,0x01,0xec,0x54,0x0f,0xfc,0x7d,0x7a,
+0x12,0x17,0x9d,0x78,0x7a,0xe6,0x70,0x0d,0xad,0x3a,0xae,0x39,0xaf,0x38,0xe4,0x12,
+0x03,0x0f,0x7c,0x08,0x22,0x90,0xff,0xf0,0xe0,0x54,0xfe,0xf0,0x90,0xff,0xf0,0xe0,
+0x54,0xfd,0xf0,0x80,0x1e,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,
+0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x25,0xe0,0x44,0x01,0x90,0xff,0xf3,0xf0,
+0x02,0x06,0xdb,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,
+0x90,0x00,0x06,0x12,0x02,0x0e,0x54,0xfe,0x90,0xff,0xf3,0xf0,0x80,0x2b,0x78,0x7c,
+0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,
+0x0e,0xfa,0xeb,0x90,0xff,0xf1,0xf0,0x12,0x08,0xca,0x40,0x0d,0xad,0x3a,0xae,0x39,
+0xaf,0x38,0xe4,0x12,0x03,0x0f,0x7c,0x18,0x22,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,
+0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x90,0xff,0xf1,0xf0,
+0x12,0x08,0xca,0x40,0x0d,0xad,0x3a,0xae,0x39,0xaf,0x38,0xe4,0x12,0x03,0x0f,0x7c,
+0x18,0x22,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,
+0x00,0x06,0x12,0x02,0x0e,0x44,0x01,0x90,0xff,0xf3,0xf0,0x78,0x7d,0xe6,0x24,0x03,
+0xf6,0x18,0xe6,0x34,0x00,0xf6,0x78,0x7a,0xe6,0x24,0xfe,0x50,0x09,0x90,0xff,0xf0,
+0xe0,0x54,0xfd,0xf0,0x80,0x07,0x90,0xff,0xf0,0xe0,0x44,0x02,0xf0,0xe4,0x90,0xff,
+0xf1,0xf0,0x78,0x7b,0x76,0x00,0x78,0x7a,0xe6,0x24,0xff,0xfc,0xe4,0x34,0xff,0xfd,
+0x78,0x7b,0xe6,0x7f,0x00,0xfe,0xec,0xd3,0x9e,0xef,0x64,0x80,0xcd,0x64,0x80,0x9d,
+0x40,0x2f,0x12,0x08,0xaf,0x40,0x0f,0x78,0x7b,0xe6,0xad,0x3a,0xae,0x39,0xaf,0x38,
+0x12,0x03,0x0f,0x7c,0x18,0x22,0x90,0xff,0xf2,0xe0,0xfc,0x78,0x7c,0x86,0x83,0x08,
+0x86,0x82,0xec,0xf0,0x78,0x7b,0x06,0xa3,0x78,0x7c,0xa6,0x83,0x08,0xa6,0x82,0x80,
+0xb5,0x12,0x08,0xaf,0x40,0x0f,0x78,0x7b,0xe6,0xad,0x3a,0xae,0x39,0xaf,0x38,0x12,
+0x03,0x0f,0x7c,0x18,0x22,0x90,0xff,0xf2,0xe0,0xfc,0x78,0x7c,0x86,0x83,0x08,0x86,
+0x82,0xec,0xf0,0x78,0x7a,0xe6,0xad,0x3a,0xae,0x39,0xaf,0x38,0x12,0x03,0x0f,0x7c,
+0x00,0x22,0x8c,0x37,0x8d,0x36,0x78,0x7c,0xed,0xf6,0x08,0xec,0xf6,0xed,0xfe,0xec,
+0xfd,0x7f,0x01,0x90,0x00,0x05,0x12,0x01,0xec,0x78,0x7b,0xf6,0x78,0x7c,0xe6,0xfd,
+0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x04,0x12,0x01,0xec,0x54,
+0x0f,0xfc,0x7d,0x7b,0x12,0x17,0x9d,0x78,0x7b,0xe6,0x70,0x03,0x7c,0x08,0x22,0x90,
+0xff,0xf0,0xe0,0x54,0xfe,0xf0,0x90,0xff,0xf0,0xe0,0x54,0xfd,0xf0,0x80,0x1b,0x78,
+0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,
+0x02,0x0e,0x25,0xe0,0x90,0xff,0xf3,0xf0,0x80,0x5b,0x78,0x7c,0xe6,0xfd,0x08,0xe6,
+0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x06,0x12,0x02,0x0e,0x54,0xfe,0x90,
+0xff,0xf3,0xf0,0x80,0x21,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,
+0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xeb,0x90,0xff,0xf1,0xf0,0x12,0x08,
+0xca,0x40,0x03,0x7c,0x18,0x22,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,
+0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x90,0xff,0xf1,0xf0,0x12,0x08,0xca,
+0x40,0x03,0x7c,0x18,0x22,0x78,0x7d,0xe6,0x24,0x0a,0xf6,0x18,0xe6,0x34,0x00,0xf6,
+0x78,0x7a,0x76,0x00,0x78,0x7b,0xe6,0x24,0xff,0xfc,0xe4,0x34,0xff,0xfd,0x78,0x7a,
+0xe6,0x7f,0x00,0xfe,0xec,0xd3,0x9e,0xef,0x64,0x80,0xcd,0x64,0x80,0x9d,0x40,0x21,
+0x78,0x7c,0x86,0x83,0x08,0x86,0x82,0xe0,0x90,0xff,0xf1,0xf0,0x12,0x08,0xca,0x40,
+0x03,0x7c,0x18,0x22,0x78,0x7a,0x06,0x78,0x7d,0x06,0xe6,0x18,0x70,0x01,0x06,0x80,
+0xc3,0x90,0xff,0xf0,0xe0,0x44,0x01,0xf0,0x78,0x7c,0x86,0x83,0x08,0x86,0x82,0xe0,
+0x90,0xff,0xf1,0xf0,0x12,0x08,0xca,0x40,0x03,0x7c,0x18,0x22,0x7c,0x00,0x22,0x90,
+0xff,0xf0,0xe0,0x20,0xe7,0x12,0x90,0xff,0xf0,0xe0,0x30,0xe5,0x09,0x90,0xff,0xf0,
+0xe0,0x44,0x20,0xf0,0xc3,0x22,0x80,0xe7,0xd3,0x22,0x90,0xff,0xf0,0xe0,0x20,0xe3,
+0x12,0x90,0xff,0xf0,0xe0,0x30,0xe5,0x09,0x90,0xff,0xf0,0xe0,0x44,0x20,0xf0,0xc3,
+0x22,0x80,0xe7,0xd3,0x22,0x8c,0x42,0x8d,0x41,0x7c,0x00,0xed,0x54,0xf0,0xfd,0xec,
+0x70,0x03,0xed,0x64,0x30,0x70,0x05,0x75,0x3e,0x03,0x80,0x03,0x75,0x3e,0x04,0xac,
+0x3e,0x12,0x0f,0x7c,0x75,0x83,0x00,0x85,0x83,0x40,0xe5,0x41,0x54,0x0f,0xf5,0x3f,
+0xe5,0x40,0x70,0x04,0xe5,0x3f,0x64,0x03,0x70,0x35,0xe5,0x3e,0x24,0xfd,0x75,0xf0,
+0x0a,0xa4,0x24,0x0a,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe0,0x30,0xe6,0x05,0x12,
+0x10,0x67,0x80,0x19,0xe5,0x3e,0x24,0x97,0xf8,0xc6,0x54,0xfb,0xf6,0x78,0xa3,0xe6,
+0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,0x0f,0xf0,0x80,0x59,0xe5,
+0x40,0x70,0x04,0xe5,0x3f,0x64,0x04,0x70,0x48,0xe5,0x3e,0x24,0xfd,0x75,0xf0,0x0a,
+0xa4,0x24,0x0a,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe0,0x30,0xe5,0x07,0xac,0x42,
+0xad,0x41,0x12,0x1c,0x93,0xe5,0x42,0x30,0xe2,0x15,0x78,0xa7,0xe6,0x30,0xe0,0x0f,
+0x78,0xa7,0xe6,0x30,0xe1,0x09,0xe4,0xff,0x04,0xfe,0x7c,0x04,0x12,0x31,0x9a,0x78,
+0xa3,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,0x0f,0xf0,0x80,
+0x07,0xe4,0xfc,0x7d,0xee,0x12,0x1c,0x93,0xc2,0x03,0x22,0x12,0x30,0x85,0x12,0x0f,
+0x7c,0x78,0xa3,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,
+0xfd,0x40,0xf0,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x90,0xfd,0x41,0xf0,0xc2,0x03,0x7d,0x02,0x7c,0x00,0x12,0x24,0xb1,0x12,0x31,
+0x08,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x30,0xe1,
+0x07,0x7c,0x13,0x12,0x25,0x4a,0x80,0x0f,0x90,0xfd,0x41,0xe0,0xfd,0x78,0x8f,0xe6,
+0xfc,0x12,0x13,0xfd,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,
+0xec,0xf6,0x7d,0x00,0x12,0x0f,0x0b,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x12,0x30,
+0x85,0x78,0x8f,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x30,0xe2,0x07,0x7c,0x13,0x12,
+0x25,0x4a,0x80,0x1b,0x78,0x8f,0xe6,0x24,0x97,0xf8,0xe6,0x20,0xe1,0x07,0x7c,0x12,
+0x12,0x25,0x4a,0x80,0x0a,0x78,0x8f,0xe6,0xfc,0x12,0x14,0x21,0x12,0x25,0x4a,0x12,
+0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x20,
+0xe2,0x07,0x7c,0x11,0x12,0x25,0x4a,0x80,0x0a,0x78,0x8f,0xe6,0xfc,0x12,0x15,0x22,
+0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0x12,0x0f,
+0x7c,0x78,0xa3,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,
+0xfd,0x47,0xf0,0x78,0xa3,0xe6,0x24,0x0a,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x90,0xfd,0x48,0xf0,0x78,0xa3,0xe6,0x24,0x03,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0xfc,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0xf5,0x5c,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0xf5,0x5d,0x8c,0x5b,0xe4,0xec,0x33,0x33,0x54,0x01,0x78,0x8f,0xf6,0x60,
+0x08,0xe5,0x5c,0x30,0xe1,0x03,0x78,0x8f,0x06,0x78,0x8f,0xe6,0x90,0xfd,0x49,0xf0,
+0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfd,0xa3,
+0xe0,0x54,0x0c,0xfc,0xed,0x54,0xe6,0x8c,0x5f,0xf5,0x5e,0xe5,0x5b,0x30,0xe5,0x03,
+0x43,0x5f,0x01,0xe5,0x5c,0x20,0xe5,0x0e,0xe5,0x5b,0x54,0x7f,0x70,0x08,0xe5,0x5b,
+0x20,0xe7,0x03,0x43,0x5f,0x02,0xe5,0x5b,0x30,0xe3,0x03,0x43,0x5f,0x10,0xe5,0x5b,
+0x30,0xe2,0x03,0x43,0x5f,0x20,0xe5,0x5b,0x54,0x03,0x60,0x03,0x43,0x5f,0x40,0xe5,
+0x5b,0x30,0xe1,0x03,0x43,0x5f,0x80,0xe5,0x5b,0x30,0xe4,0x03,0x43,0x5e,0x01,0xe5,
+0x5b,0x30,0xe6,0x03,0x43,0x5e,0x08,0xe5,0x5c,0x20,0xe4,0x0e,0xe5,0x5b,0x54,0x7f,
+0x70,0x08,0xe5,0x5b,0x20,0xe7,0x03,0x43,0x5e,0x10,0x53,0x5f,0xfb,0x53,0x5e,0xf9,
+0xad,0x5e,0xe5,0x5f,0x90,0xfd,0x42,0xcd,0xf0,0xa3,0xcd,0xf0,0xe5,0x5d,0x30,0xe3,
+0x0d,0xe5,0x5d,0x54,0x30,0xc4,0x54,0x0f,0x90,0xfd,0x45,0xf0,0x80,0x05,0xe4,0x90,
+0xfd,0x45,0xf0,0xe5,0x5d,0x54,0x03,0x90,0xfd,0x44,0xf0,0xe5,0x5d,0x54,0x04,0xc3,
+0x13,0x90,0xfd,0x46,0xf0,0x90,0xfd,0x44,0xe0,0x70,0x0e,0x7d,0x3d,0x7e,0xfd,0x7f,
+0x01,0x74,0x01,0x90,0x00,0x09,0x12,0x01,0x42,0x78,0xa3,0xe6,0x24,0x08,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x7c,0x00,0xfd,0x78,0xa3,0xe6,0x24,0x07,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x7f,0x00,0x4c,0xfe,0xef,0x4d,0x90,0xfd,
+0x40,0xf0,0xa3,0xce,0xf0,0xce,0xc2,0x03,0x7d,0x0a,0x7c,0x00,0x12,0x24,0xb1,0x12,
+0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0x78,0x94,0x76,0x01,0x08,0x76,
+0xfd,0x08,0x76,0x40,0x78,0x91,0x76,0x0c,0x78,0x94,0x12,0x04,0x65,0x12,0x02,0x14,
+0x78,0x92,0xcb,0xf6,0xcb,0x08,0xf6,0x7f,0x00,0xef,0x24,0xeb,0x40,0x1f,0xe4,0xef,
+0x25,0xe0,0x90,0x34,0xbf,0xfd,0x93,0xcd,0x04,0x93,0x78,0x93,0x66,0x70,0x03,0xed,
+0x18,0x66,0x70,0x06,0x78,0x91,0x76,0x00,0x80,0x03,0x0f,0x80,0xdc,0x78,0x90,0xef,
+0xf6,0x78,0x94,0x12,0x04,0x65,0x90,0x00,0x02,0x12,0x02,0x0e,0x78,0x92,0xcb,0xf6,
+0xcb,0x08,0xf6,0x54,0x04,0xcb,0x54,0x06,0x4b,0x60,0x04,0x78,0x91,0x76,0x0b,0x78,
+0x93,0xe6,0x30,0xe3,0x13,0x78,0x94,0x12,0x04,0x65,0x90,0x00,0x05,0x12,0x01,0xec,
+0x24,0xfb,0x50,0x04,0x78,0x91,0x76,0x0d,0x78,0x93,0xe6,0x54,0xc0,0x7d,0x00,0x64,
+0xc0,0x4d,0x70,0x04,0x78,0x91,0x76,0x0b,0x78,0x94,0x12,0x04,0x65,0x90,0x00,0x04,
+0x12,0x01,0xec,0x24,0xfc,0x50,0x04,0x78,0x91,0x76,0x0f,0x78,0x94,0x12,0x04,0x65,
+0x90,0x00,0x06,0x12,0x01,0xec,0x24,0xfd,0x50,0x04,0x78,0x91,0x76,0x0e,0x78,0x94,
+0x12,0x04,0x65,0x90,0x00,0x09,0x12,0x01,0xec,0x24,0xfd,0x50,0x04,0x78,0x91,0x76,
+0x0a,0x78,0x91,0xe6,0x70,0x2a,0x78,0x8f,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0x94,0x12,
+0x04,0x65,0x78,0xa1,0xe6,0xf9,0x78,0xa0,0xe6,0xfa,0x7b,0x01,0x74,0x0a,0x78,0x00,
+0x12,0x03,0x3f,0xc2,0x03,0x78,0x8f,0xe6,0xfc,0x12,0x11,0x23,0x78,0x91,0xec,0xf6,
+0x78,0x91,0xe6,0xfc,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,
+0xec,0xf6,0x12,0x0f,0x7c,0x78,0x8f,0xe6,0x24,0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x1c,
+0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xac,0x82,0xad,0x83,0x78,0xa0,0x86,0x83,0x08,
+0x86,0x82,0xec,0xf9,0xed,0xfa,0x7b,0x0a,0x78,0x01,0x12,0x03,0xa7,0xc2,0x03,0x78,
+0x8f,0xe6,0xfc,0x12,0x11,0x23,0x12,0x31,0x08,0x22,0x8d,0x2b,0x8c,0x2a,0xed,0x60,
+0x40,0x75,0x27,0x01,0x75,0x29,0x48,0x75,0x28,0xff,0xe5,0x2a,0x24,0xfd,0xfc,0xe4,
+0x34,0xff,0xfd,0xec,0x7c,0x03,0x25,0xe0,0xcd,0x33,0xcd,0xdc,0xf9,0xfc,0xe5,0x29,
+0x2c,0xf5,0x29,0xe5,0x28,0x3d,0xf5,0x28,0xad,0x29,0xae,0x28,0xaf,0x27,0x74,0x80,
+0x90,0x00,0x06,0x12,0x03,0x17,0x74,0x80,0x90,0x00,0x02,0x12,0x03,0x17,0x12,0x0f,
+0xd3,0xe5,0x2b,0x14,0x60,0x3b,0x75,0x27,0x01,0x75,0x29,0x08,0x75,0x28,0xff,0xe5,
+0x2a,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,0xec,0x7c,0x03,0x25,0xe0,0xcd,0x33,0xcd,
+0xdc,0xf9,0xfc,0xe5,0x29,0x2c,0xf5,0x29,0xe5,0x28,0x3d,0xf5,0x28,0xad,0x29,0xae,
+0x28,0xaf,0x27,0xe4,0x90,0x00,0x06,0x12,0x03,0x17,0xe4,0x90,0x00,0x02,0x12,0x03,
+0x17,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x30,0xe2,
+0x09,0x78,0x8f,0xe6,0xfc,0x12,0x15,0x22,0xd2,0x00,0x78,0x8f,0xe6,0xfc,0x12,0x0f,
+0x7c,0x78,0x90,0x76,0x00,0x90,0xfd,0x41,0xe0,0x30,0xe7,0x04,0x78,0x90,0x76,0x01,
+0x78,0x90,0xe6,0xfd,0x78,0x8f,0xe6,0xfc,0x12,0x0d,0x3a,0xc2,0x03,0x30,0x00,0x07,
+0x78,0x8f,0xe6,0xfc,0x12,0x14,0x21,0x7c,0x00,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,
+0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x01,
+0xf0,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,
+0xe0,0x02,0x80,0xed,0x78,0xa3,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x54,0xf8,0xf0,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x80,0xf0,0x22,0xc2,0x03,0x8c,0x58,0x12,0x0f,0x7c,0x78,0xa0,
+0x86,0x83,0x08,0x86,0x82,0x79,0xee,0x7a,0x34,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,
+0x12,0x0e,0x10,0xac,0x58,0x7d,0x02,0x12,0x0d,0x3a,0xc2,0x03,0xac,0x58,0x12,0x11,
+0x23,0x22,0x8d,0x53,0x8e,0x52,0x8f,0x51,0x8c,0x50,0x12,0x0f,0x7c,0x75,0x4f,0x00,
+0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x20,0xe4,
+0x16,0xe5,0x4f,0x24,0xf6,0x40,0x10,0x05,0x4f,0xc2,0x03,0x7c,0x18,0x12,0x32,0x48,
+0xac,0x50,0x12,0x0f,0x7c,0x80,0xd9,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x20,0xe4,0x05,0xc2,0x03,0x7c,0x02,0x22,0x78,0xa3,0xe6,
+0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x0f,0x60,0x16,0x78,
+0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x0f,0xf0,
+0xc2,0x03,0x7c,0x01,0x22,0x78,0xa2,0x86,0x83,0x08,0x86,0x82,0xe0,0xad,0x53,0xae,
+0x52,0xaf,0x51,0x12,0x03,0x0f,0xc2,0x03,0x7c,0x00,0x22,0x8d,0x31,0x8c,0x30,0x12,
+0x15,0x22,0xe5,0x31,0x60,0x20,0xe5,0x30,0xb4,0x03,0x0c,0x7c,0x01,0x12,0x24,0x7c,
+0x7c,0x81,0x12,0x24,0x7c,0x80,0x0f,0xe5,0x30,0xb4,0x04,0x0a,0x7c,0x02,0x12,0x24,
+0x7c,0x7c,0x82,0x12,0x24,0x7c,0xac,0x30,0x12,0x0f,0x7c,0xe5,0x31,0x60,0x1a,0x78,
+0xa4,0x86,0x83,0x08,0x86,0x82,0xe0,0x54,0xe7,0xf0,0xa3,0xa3,0xa3,0xa3,0xe0,0x54,
+0xe7,0xf0,0xac,0x30,0x7d,0x02,0x12,0x0d,0x3a,0x78,0xa0,0x86,0x83,0x08,0x86,0x82,
+0x79,0xf8,0x7a,0x34,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,0xc2,0x03,0xe5,0x30,0x24,
+0x97,0xf8,0xc6,0x54,0xfd,0xf6,0xac,0x30,0x12,0x11,0x23,0x22,0x8c,0x26,0x30,0x03,
+0x05,0x12,0x31,0xe7,0x80,0xf8,0x7c,0x0a,0x12,0x30,0xfa,0xd2,0x03,0xe5,0x26,0x24,
+0xfd,0x78,0x9d,0xf6,0x70,0x09,0x78,0xa4,0x76,0xff,0x08,0x76,0xe0,0x80,0x07,0x78,
+0xa4,0x76,0xff,0x08,0x76,0xe2,0x78,0x9d,0xe6,0x75,0xf0,0x10,0xa4,0xad,0xf0,0xfc,
+0x24,0xa0,0x78,0xa3,0xf6,0xed,0x34,0xff,0x18,0xf6,0x78,0x9d,0xe6,0x75,0xf0,0x0a,
+0xa4,0x24,0x08,0xfc,0xe4,0x34,0xfd,0xfd,0x78,0xa0,0xed,0xf6,0x08,0xec,0xf6,0x12,
+0x31,0x93,0x22,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x30,0xe7,0x22,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x54,0x7f,0xf0,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x80,0xf0,0x22,0x78,0xa4,0x86,0x83,0x08,0x86,0x82,0xe0,0x54,
+0x7f,0xf0,0xad,0x83,0xe5,0x82,0x24,0x04,0xfc,0xe4,0x3d,0x8c,0x82,0xf5,0x83,0xe0,
+0x54,0x7f,0xf0,0x78,0xa3,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x54,0xf8,0xf0,0x78,0xa5,0xe6,0x24,0x01,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x44,0x03,0xf0,0x78,0xa5,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x03,0xf0,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0x74,0x0f,0xf0,0x22,0x78,0xa4,0x86,0x83,0x08,0x86,0x82,0xe0,0x54,
+0x3f,0xf0,0xad,0x83,0xe5,0x82,0x24,0x04,0xfc,0xe4,0x3d,0x8c,0x82,0xf5,0x83,0xe0,
+0x54,0x3f,0xf0,0x78,0x9d,0xe6,0x24,0x9e,0xf8,0xe6,0xfc,0x78,0xa5,0xe6,0x24,0x01,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0x9d,0xe6,0x24,0x9e,0xf8,
+0xe6,0xfc,0x78,0xa5,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,
+0xf0,0x78,0xa3,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,
+0xfb,0x44,0x02,0xf5,0x26,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x30,0xe5,0x03,0x43,0x26,0x01,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe0,0x03,0x12,0x0f,0xd3,0xe5,0x26,0xfc,
+0x78,0xa3,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,
+0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,0x0f,0xf0,0x78,
+0xa4,0x86,0x83,0x08,0x86,0x82,0xe0,0x44,0x80,0xf0,0xa3,0xa3,0xa3,0xa3,0xe0,0x44,
+0x80,0xf0,0x22,0x8c,0x2a,0x12,0x0f,0x7c,0x78,0xa1,0xe6,0x24,0x08,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa3,0xe6,0x24,0x0a,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa1,0xe6,0x24,0x07,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa3,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xec,0xf0,0x78,0xa0,0x86,0x83,0x08,0x86,0x82,0xe0,0xfd,0xa3,0xe0,0xfc,
+0xed,0xfe,0x78,0xa3,0xe6,0x24,0x08,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xee,
+0xf0,0xec,0xfe,0x78,0xa3,0xe6,0x24,0x07,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xee,0xf0,0x8c,0x29,0x8d,0x28,0xc3,0xec,0x94,0x02,0xed,0x94,0x06,0x40,0x05,0x75,
+0x27,0x7c,0x80,0x33,0xd3,0xe5,0x29,0x94,0x81,0xe5,0x28,0x94,0x01,0x40,0x05,0x75,
+0x27,0x3c,0x80,0x23,0xd3,0xe5,0x29,0x94,0xc0,0xe5,0x28,0x94,0x00,0x40,0x05,0x75,
+0x27,0x18,0x80,0x13,0xd3,0xe5,0x29,0x94,0x30,0xe5,0x28,0x94,0x00,0x40,0x05,0x75,
+0x27,0x0c,0x80,0x03,0x75,0x27,0x08,0xaf,0x27,0xe4,0xef,0x54,0x7c,0x44,0x83,0xff,
+0x8f,0x27,0xe5,0x27,0xfc,0x78,0xa5,0xe6,0x24,0x01,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xec,0xf0,0xe5,0x27,0xfc,0x78,0xa5,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x27,0xfc,0x78,0x9d,0xe6,0x24,0x9e,0xf8,0xec,
+0xf6,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,
+0x27,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,
+0x30,0xe3,0x17,0x53,0x27,0xc7,0x78,0xa1,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x90,0x34,0xe9,0x93,0x42,0x27,0x78,0xa1,0xe6,0x24,0x02,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe7,0x05,0x43,0x27,0x40,0x80,0x03,
+0x53,0x27,0xbf,0x53,0x27,0xfb,0x78,0xa1,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x60,0x03,0x43,0x27,0x04,0x53,0x27,0xfc,0x78,0xa1,0xe6,0x24,
+0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x42,0x27,0x43,0x27,0x80,0xe5,
+0x27,0xfc,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,
+0xf0,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,
+0x27,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,
+0x30,0xe1,0x05,0x53,0x27,0xdf,0x80,0x03,0x43,0x27,0x20,0x78,0xa1,0xe6,0x24,0x02,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe4,0x05,0x53,0x27,0xef,0x80,
+0x03,0x43,0x27,0x10,0x78,0xa1,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0xb4,0x02,0x03,0x43,0x27,0x02,0xe5,0x27,0xfc,0x78,0xa3,0xe6,0x24,0x04,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa3,0xe6,0x24,0x03,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,0x27,0x78,0xa1,0xe6,0x24,0x09,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x70,0x05,0x53,0x27,0x7f,0x80,0x03,0x43,
+0x27,0x80,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,
+0xe0,0x30,0xe0,0x05,0x43,0x27,0x20,0x80,0x03,0x53,0x27,0xdf,0x78,0xa1,0xe6,0x24,
+0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe3,0x05,0x43,0x27,0x40,
+0x80,0x03,0x53,0x27,0xbf,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x30,0xe0,0x05,0x43,0x27,0x10,0x80,0x03,0x53,0x27,0xef,0x78,0xa1,
+0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe4,0x05,
+0x43,0x27,0x08,0x80,0x03,0x53,0x27,0xf7,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe5,0x05,0x43,0x27,0x04,0x80,0x03,0x53,
+0x27,0xfb,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,
+0xe0,0x30,0xe6,0x05,0x43,0x27,0x01,0x80,0x03,0x53,0x27,0xfe,0x78,0xa1,0xe6,0x24,
+0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe7,0x05,0x43,0x27,
+0x02,0x80,0x03,0x53,0x27,0xfd,0xe5,0x27,0xfc,0x78,0xa3,0xe6,0x24,0x03,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xc2,0x03,0x7c,0x00,0x22,0x8d,0x27,0x8c,
+0x26,0xed,0x54,0x03,0x14,0x60,0x03,0x7c,0x10,0x22,0xe5,0x27,0x54,0x7c,0x24,0xfc,
+0x40,0x03,0x7c,0x0b,0x22,0xe5,0x26,0x24,0x97,0xf8,0xc6,0x44,0x02,0xf6,0x7c,0x00,
+0x22,0x8c,0x30,0x12,0x0f,0x7c,0xe5,0x30,0x24,0x97,0xf8,0xe6,0x20,0xe2,0x4f,0xac,
+0x30,0x7d,0x02,0x12,0x0d,0x3a,0xe5,0x30,0x24,0xfe,0x44,0x28,0xfc,0x78,0xa4,0x86,
+0x83,0x08,0x86,0x82,0xec,0xf0,0xaf,0x83,0xe5,0x82,0x24,0x04,0xfe,0xe4,0x3f,0xff,
+0xec,0x8e,0x82,0x8f,0x83,0xf0,0x7c,0x03,0x8c,0x2c,0xe5,0x2c,0xfc,0x78,0xa5,0xe6,
+0x24,0x01,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x2c,0xfc,0x78,
+0xa5,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x75,0x2d,
+0x01,0x75,0x2f,0x48,0x75,0x2e,0xff,0xe5,0x30,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,
+0xec,0x7c,0x03,0x25,0xe0,0xcd,0x33,0xcd,0xdc,0xf9,0xfc,0xe5,0x2f,0x2c,0xf5,0x2f,
+0xe5,0x2e,0x3d,0xf5,0x2e,0x78,0xa5,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x54,0xe7,0xf5,0x2c,0xad,0x2f,0xae,0x2e,0xaf,0x2d,0xe4,0x90,0x00,
+0x02,0x12,0x03,0x17,0xe4,0x90,0x00,0x06,0x12,0x03,0x17,0x12,0x01,0xe6,0x30,0xe5,
+0x03,0x43,0x2c,0x10,0xe5,0x2c,0xfc,0x78,0xa5,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xec,0xf0,0x12,0x10,0x67,0x78,0xa3,0xe6,0x24,0x06,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xc2,0x03,0xfc,0xe5,0x30,0x24,0x97,0xf8,0xc6,
+0x44,0x04,0xf6,0x8c,0x2c,0xe5,0x30,0x54,0x0f,0xc4,0x54,0xf0,0x7e,0x00,0xff,0xee,
+0xef,0x44,0x04,0x7d,0x00,0xff,0xec,0x4e,0xfc,0xed,0x4f,0xfd,0x12,0x1c,0xfe,0x7c,
+0x00,0x22,0x8c,0x2f,0x12,0x0f,0x7c,0x12,0x10,0x07,0x78,0xa4,0x86,0x83,0x08,0x86,
+0x82,0xe0,0x54,0x08,0xf0,0xa3,0xa3,0xa3,0xa3,0xe0,0x54,0x08,0xf0,0xac,0x2f,0x7d,
+0x02,0x12,0x0d,0x3a,0xc2,0x03,0xe5,0x2f,0x24,0x97,0xf8,0xc6,0x54,0xfb,0xf6,0x7c,
+0x00,0x22,0x12,0x30,0x85,0x78,0x90,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x30,0xe1,
+0x0a,0x7d,0x00,0x7c,0x13,0x12,0x24,0xb1,0x12,0x31,0x08,0x78,0x90,0xe6,0x24,0x97,
+0xf8,0xc6,0x44,0x01,0xf6,0x78,0x90,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0x90,0xe6,0x24,
+0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x1c,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0x78,0xa0,
+0xe6,0xfa,0x08,0xe6,0xf9,0x7b,0x0a,0x78,0x01,0x12,0x03,0xa7,0x78,0xa0,0x86,0x83,
+0x08,0x86,0x82,0x79,0xf8,0x7a,0x34,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,0x12,0x0f,
+0xd3,0xc2,0x03,0x78,0x90,0xe6,0xfc,0x12,0x11,0x23,0x78,0x8f,0xec,0xf6,0xec,0x60,
+0x0a,0x7d,0x00,0x7c,0x08,0x12,0x24,0xb1,0x12,0x31,0x08,0x78,0x90,0xe6,0xfc,0x12,
+0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,
+0x44,0x10,0x54,0xdf,0xfc,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xec,0xf0,0x78,0x8f,0xec,0xf6,0xc2,0x03,0x7c,0xc8,0x12,0x32,0x48,0x78,
+0x90,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x54,0xef,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0x48,0x78,0x90,
+0xe6,0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x10,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0x48,0x78,0x90,0xe6,
+0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x44,0x20,0xf0,0xc2,0x03,0x7c,0xf0,0x12,0x32,0x48,0x78,0x90,0xe6,0xfc,
+0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x30,0xe4,0x15,0xc2,0x03,0x78,0x90,0xe6,0x44,0x10,0x7f,0x00,0xfe,0x7c,0x07,
+0x12,0x31,0x9a,0x12,0x31,0x08,0x02,0x17,0x49,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xcf,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,
+0x48,0x78,0x90,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x30,0xf0,0xc2,0x03,0x7c,0xf0,0x12,0x32,0x48,
+0x78,0x90,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x30,0xe4,0x14,0xc2,0x03,0x78,0x90,0xe6,0x44,0x10,0x7f,
+0x00,0xfe,0x7c,0x07,0x12,0x31,0x9a,0x12,0x31,0x08,0x80,0x5d,0x78,0xa3,0xe6,0x24,
+0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xef,0xf0,0x78,0xa3,0xe6,
+0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xdf,0xf0,0x78,0x90,
+0xe6,0x24,0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x1c,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,
+0xac,0x82,0xad,0x83,0x78,0xa0,0x86,0x83,0x08,0x86,0x82,0xec,0xf9,0xed,0xfa,0x7b,
+0x0a,0x78,0x01,0x12,0x03,0xa7,0xc2,0x03,0x78,0x90,0xe6,0xfc,0x12,0x11,0x23,0x7d,
+0x00,0x7c,0x0b,0x12,0x24,0xb1,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x90,0xff,0x91,
+0xe0,0x90,0xfd,0x41,0xf0,0x7d,0x02,0x7c,0x00,0x12,0x24,0xb1,0x12,0x31,0x08,0x22,
+0x12,0x30,0x85,0x90,0xfd,0x40,0xe0,0xf4,0xfc,0x90,0xff,0x91,0xe0,0x5c,0xf5,0x33,
+0x90,0xfd,0x41,0xe0,0xfc,0x90,0xfd,0x40,0xe0,0x5c,0x42,0x33,0xe5,0x33,0x90,0xff,
+0x91,0xf0,0x7c,0x00,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x74,0x3c,0x90,0xfb,0xe8,
+0xf0,0x74,0x3e,0x90,0xfb,0xe8,0xf0,0xe4,0x90,0xfd,0x30,0xf0,0x22,0x8d,0x35,0x8c,
+0x34,0xec,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x02,0x80,0x28,0xb4,0x02,0x02,0x80,
+0x03,0xd3,0x40,0x08,0xa8,0x35,0xc6,0x25,0xe0,0xf6,0x80,0x18,0xb4,0x04,0x02,0x80,
+0x03,0xd3,0x40,0x0a,0xa8,0x35,0xc6,0x25,0xe0,0x25,0xe0,0xf6,0x80,0x06,0xa8,0x35,
+0x76,0x00,0x80,0x00,0x22,0x8c,0x3c,0x8d,0x3b,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x75,
+0x60,0x06,0x75,0x61,0x00,0x90,0xfd,0x31,0x12,0x04,0x6e,0x12,0x01,0xe6,0xb4,0x80,
+0x02,0x80,0x06,0xd3,0x50,0x03,0x02,0x18,0x9e,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,
+0x00,0x03,0x12,0x01,0xec,0x54,0xf0,0xb4,0x30,0x02,0x80,0x03,0xd3,0x40,0x5f,0x90,
+0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xfd,0xeb,0xfe,0x7f,
+0x01,0x90,0xfd,0x34,0x12,0x04,0x6e,0xee,0xcd,0x90,0x35,0x02,0xfc,0xe4,0x93,0xff,
+0x74,0x01,0x93,0xfe,0xf9,0xef,0xfa,0x7b,0x01,0xea,0xff,0xe9,0xfe,0xec,0xc3,0x9e,
+0xed,0x9f,0x40,0x25,0x90,0x35,0x04,0xe4,0x93,0xfd,0x74,0x01,0x93,0xfc,0xed,0xfe,
+0xec,0xfd,0x7f,0x01,0xee,0xcd,0xfc,0x90,0xfd,0x36,0xe0,0xd3,0x9c,0x90,0xfd,0x35,
+0xe0,0x9d,0x50,0x05,0x75,0x60,0x80,0x80,0x33,0x12,0x19,0xbc,0x80,0x2e,0xb4,0x60,
+0x02,0x80,0x03,0xd3,0x40,0x0b,0xac,0x3c,0xad,0x3b,0x12,0x07,0x82,0x8c,0x60,0x80,
+0x1b,0xb4,0x10,0x03,0xb3,0x40,0x10,0xc3,0xb4,0x20,0x03,0xb3,0x40,0x09,0xc3,0xb4,
+0x40,0x02,0x80,0x03,0xd3,0x40,0x00,0x75,0x60,0x81,0x80,0x00,0x80,0x75,0xb4,0x81,
+0x02,0x80,0x03,0xd3,0x40,0x6b,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x03,0x12,
+0x01,0xec,0x54,0xf0,0xb4,0x30,0x02,0x80,0x03,0xd3,0x40,0x1d,0x90,0xfd,0x31,0x12,
+0x04,0x80,0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xfd,0xeb,0xfe,0x7f,0x01,0x90,0xfd,
+0x37,0x12,0x04,0x6e,0x12,0x19,0x26,0x80,0x36,0xb4,0x60,0x02,0x80,0x03,0xd3,0x40,
+0x13,0x75,0x3a,0x61,0xe4,0xf5,0x39,0xf5,0x38,0xac,0x3c,0xad,0x3b,0x12,0x05,0xde,
+0x8c,0x60,0x80,0x1b,0xb4,0x10,0x03,0xb3,0x40,0x10,0xc3,0xb4,0x20,0x03,0xb3,0x40,
+0x09,0xc3,0xb4,0x40,0x02,0x80,0x03,0xd3,0x40,0x00,0x75,0x60,0x81,0x80,0x00,0x80,
+0x02,0x80,0x00,0xe5,0x60,0xfc,0x90,0xfd,0x31,0x12,0x04,0x80,0xec,0x90,0x00,0x02,
+0x12,0x03,0x17,0xac,0x61,0x22,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x04,0x12,
+0x01,0xec,0x60,0x04,0x74,0x01,0x80,0x01,0xe4,0xa2,0xe0,0x92,0x01,0x90,0xfd,0x31,
+0x12,0x04,0x80,0xed,0x24,0x03,0xfd,0x50,0x01,0x0e,0x90,0xfd,0x34,0x12,0x04,0x6e,
+0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x05,0x12,0x01,0xec,0xf5,0x61,0x90,0x00,
+0x04,0x12,0x01,0xec,0x54,0x0f,0xfc,0x7d,0x61,0x12,0x17,0x9d,0xe5,0x61,0x70,0x04,
+0x75,0x60,0x08,0x22,0x75,0x60,0x00,0x78,0x7e,0x76,0x00,0x78,0x7e,0xe6,0xc3,0x95,
+0x61,0x50,0x38,0x90,0xfd,0x37,0x12,0x04,0x80,0x12,0x01,0xe6,0xfc,0x90,0xfd,0x34,
+0x12,0x04,0x80,0xec,0x12,0x03,0x0f,0x30,0x01,0x0e,0x90,0xfd,0x39,0xe0,0x04,0xf0,
+0x90,0xfd,0x38,0x70,0x03,0xe0,0x04,0xf0,0x78,0x7e,0x06,0x90,0xfd,0x36,0xe0,0x04,
+0xf0,0x90,0xfd,0x35,0x70,0x03,0xe0,0x04,0xf0,0x80,0xc0,0x22,0x90,0xfd,0x32,0xe0,
+0xfd,0xa3,0xe0,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0xed,0x24,0x0a,0xfd,0x50,0x01,
+0x0e,0x90,0xfd,0x3a,0x12,0x04,0x6e,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x04,
+0x12,0x01,0xec,0x54,0x0f,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x17,0x90,0xfd,0x3a,
+0x12,0x04,0x80,0x0d,0xed,0x70,0x01,0x0e,0x90,0xfd,0x37,0x12,0x04,0x6e,0x78,0x82,
+0x76,0x01,0x80,0x4e,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x19,0x90,0xfd,0x3a,0x12,
+0x04,0x80,0xed,0x24,0x02,0xfd,0x50,0x01,0x0e,0x90,0xfd,0x37,0x12,0x04,0x6e,0x78,
+0x82,0x76,0x02,0x80,0x2d,0xb4,0x04,0x02,0x80,0x03,0xd3,0x40,0x19,0x90,0xfd,0x3a,
+0x12,0x04,0x80,0xed,0x24,0x04,0xfd,0x50,0x01,0x0e,0x90,0xfd,0x37,0x12,0x04,0x6e,
+0x78,0x82,0x76,0x04,0x80,0x0c,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x00,0x75,0x60,
+0x08,0x22,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x05,0x12,0x01,0xec,0xf5,0x61,
+0x78,0x7f,0x76,0x00,0x78,0x7f,0xe6,0xc3,0x95,0x61,0x40,0x03,0x02,0x1b,0x24,0x78,
+0x80,0x76,0x00,0x78,0x80,0xe6,0xc3,0x78,0x82,0x96,0x50,0x76,0x90,0xfd,0x34,0x12,
+0x04,0x80,0x12,0x01,0xe6,0xfc,0x90,0xfd,0x3a,0x12,0x04,0x89,0x12,0x01,0xe0,0xf4,
+0x5c,0xfc,0x12,0x01,0xe0,0xf8,0x90,0xfd,0x37,0x12,0x04,0x80,0xe8,0xc0,0xe0,0x12,
+0x01,0xe6,0xc8,0xd0,0xe0,0xc8,0x58,0x4c,0xfc,0x90,0xfd,0x34,0x12,0x04,0x80,0xec,
+0x12,0x03,0x0f,0x78,0x81,0xec,0xf6,0x90,0xfd,0x39,0xe0,0x04,0xf0,0x90,0xfd,0x38,
+0x70,0x03,0xe0,0x04,0xf0,0x09,0xe9,0x70,0x01,0x0a,0x90,0xfd,0x3a,0x12,0x04,0x77,
+0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x04,0x12,0x01,0xec,0x30,0xe4,0x0e,0x90,
+0xfd,0x36,0xe0,0x04,0xf0,0x90,0xfd,0x35,0x70,0x03,0xe0,0x04,0xf0,0x78,0x80,0x06,
+0x80,0x81,0x78,0x82,0xe6,0xfd,0xe4,0xfe,0xff,0xee,0xcd,0xfc,0x90,0xfd,0x39,0xe0,
+0x2c,0xf0,0x90,0xfd,0x38,0xe0,0x3d,0xf0,0x78,0x82,0xe6,0xfd,0xe4,0xfe,0xff,0xee,
+0xcd,0xfc,0x90,0xfd,0x3c,0xe0,0x2c,0xf0,0x90,0xfd,0x3b,0xe0,0x3d,0xf0,0x78,0x7f,
+0x06,0x02,0x1a,0x64,0x75,0x60,0x00,0x22,0xe5,0x3d,0x05,0x3d,0x04,0x70,0x02,0xb2,
+0xb0,0x22,0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,
+0xc0,0xe0,0xea,0xc0,0xe0,0xeb,0xc0,0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,
+0xe0,0xef,0xc0,0xe0,0x90,0xff,0x92,0xe0,0x12,0x01,0xb7,0x1b,0x80,0x30,0x1b,0x80,
+0x32,0x1b,0x8f,0x38,0x1b,0xa1,0x3a,0x1b,0xb3,0x3e,0x1b,0xcb,0x44,0x1b,0xbf,0x46,
+0x1b,0xd7,0x50,0x1c,0x19,0x52,0x1b,0xf8,0x54,0x1c,0x3a,0x56,0x00,0x00,0x1c,0x5b,
+0x90,0xff,0x92,0xe0,0x7f,0x00,0xfe,0x7c,0x01,0x12,0x31,0x9a,0x02,0x1c,0x6b,0xe4,
+0xff,0x04,0xfe,0x7c,0x03,0x12,0x31,0x9a,0x74,0x20,0x90,0xff,0xfe,0xf0,0x02,0x1c,
+0x6b,0xe4,0xff,0x04,0xfe,0x7c,0x02,0x12,0x31,0x9a,0x74,0x40,0x90,0xff,0xfe,0xf0,
+0x02,0x1c,0x6b,0xe4,0xff,0x04,0xfe,0x7c,0x04,0x12,0x31,0x9a,0x02,0x1c,0x6b,0xe4,
+0xff,0x04,0xfe,0x7c,0x05,0x12,0x31,0x9a,0x02,0x1c,0x6b,0xe4,0xff,0x04,0xfe,0x7c,
+0x06,0x12,0x31,0x9a,0x02,0x1c,0x6b,0x90,0xff,0xa5,0xe0,0x7d,0x00,0x90,0xfd,0x00,
+0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfd,0x01,0xe0,0xfc,0xf5,0x83,0x90,0xfd,0x00,0xe0,
+0x44,0x33,0xfd,0x12,0x1c,0xfe,0x80,0x73,0x90,0xff,0xb5,0xe0,0x7d,0x00,0x90,0xfd,
+0x02,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfd,0x03,0xe0,0xfc,0xf5,0x83,0x90,0xfd,0x02,
+0xe0,0x44,0x43,0xfd,0x12,0x1c,0xfe,0x80,0x52,0x90,0xff,0xa6,0xe0,0x7d,0x00,0x90,
+0xfd,0x04,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfd,0x05,0xe0,0xfc,0xf5,0x83,0x90,0xfd,
+0x04,0xe0,0x44,0x34,0xfd,0x12,0x1c,0xfe,0x80,0x31,0x90,0xff,0xb6,0xe0,0x7d,0x00,
+0x90,0xfd,0x06,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfd,0x07,0xe0,0xfc,0xf5,0x83,0x90,
+0xfd,0x06,0xe0,0x44,0x44,0xfd,0x12,0x1c,0xfe,0x80,0x10,0x90,0xff,0x92,0xe0,0x7d,
+0x00,0xfc,0xed,0x44,0xaa,0xfd,0x12,0x1c,0xfe,0x80,0x00,0xe4,0x90,0xff,0x92,0xf0,
+0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,0xe0,0xfd,0xd0,0xe0,0xfc,0xd0,0xe0,0xfb,0xd0,
+0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,0xf8,0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,
+0xd0,0xe0,0x32,0x05,0x81,0x05,0x81,0x05,0x81,0x05,0x81,0xa8,0x81,0x18,0x18,0x18,
+0xed,0xf6,0x08,0xec,0xf6,0x90,0xff,0x6a,0xe0,0x20,0xe7,0x02,0x80,0xf7,0x90,0xff,
+0x69,0xe0,0x7d,0x00,0xa8,0x81,0x18,0xcd,0xf6,0xcd,0x08,0xf6,0x7d,0x03,0xa8,0x81,
+0xe6,0x18,0xfc,0xe6,0xcc,0x25,0xe0,0xcc,0x33,0xcc,0xdd,0xf9,0xcc,0xf6,0xcc,0x08,
+0xf6,0xa8,0x81,0x18,0xe6,0x44,0xf8,0xf6,0xa8,0x81,0x18,0x18,0x18,0xe6,0xfd,0x08,
+0xe6,0xfc,0xa8,0x81,0x18,0x86,0x83,0x08,0x86,0x82,0xed,0xf0,0xa3,0xec,0xf0,0x74,
+0x02,0x90,0xff,0x6a,0xf0,0x15,0x81,0x15,0x81,0x15,0x81,0x15,0x81,0x22,0xe5,0x81,
+0x24,0x05,0xf5,0x81,0xe4,0xa8,0x81,0x18,0xf6,0xa8,0x81,0x18,0x18,0x18,0x18,0xed,
+0xf6,0x08,0xec,0xf6,0x90,0xfb,0xfd,0xe0,0x24,0xf8,0x50,0x03,0x02,0x1e,0x1f,0xe4,
+0xa8,0x81,0x18,0x18,0xf6,0xa8,0x81,0x18,0xe6,0xfe,0xa8,0x81,0x18,0x18,0x18,0x18,
+0xe6,0xfd,0x08,0xe6,0xfc,0x7f,0x00,0xef,0x24,0xf8,0x40,0x4d,0xe4,0xef,0x25,0xe0,
+0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe0,0xfb,0xa3,0xe0,0x6c,0x70,0x03,
+0xfa,0xeb,0x6d,0x70,0x09,0x74,0x01,0xa8,0x81,0x18,0x18,0xf6,0x80,0x2b,0xe4,0xef,
+0x25,0xe0,0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0x7a,0x00,0xe0,0x54,0xf0,
+0xcc,0xf8,0xcc,0xcd,0xf9,0xcd,0xfb,0x78,0x00,0xe9,0x54,0xf0,0xf9,0xea,0x68,0x70,
+0x02,0xeb,0x69,0x70,0x01,0x0e,0x0f,0x80,0xae,0xa8,0x81,0x18,0xee,0xf6,0xa8,0x81,
+0x18,0x18,0x18,0x18,0xed,0xf6,0x08,0xec,0xf6,0xa8,0x81,0xef,0xf6,0xa8,0x81,0x18,
+0x18,0xe6,0x70,0x79,0xa8,0x81,0x18,0xe6,0x24,0xf7,0x40,0x71,0xa8,0x81,0x18,0x18,
+0x18,0x18,0xe6,0x54,0x0f,0xa8,0x81,0xf6,0x64,0x04,0x60,0x17,0xa8,0x81,0xe6,0x64,
+0x03,0x60,0x10,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0x12,0x1c,
+0x93,0x80,0x4a,0x7c,0x0a,0x12,0x30,0xfa,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0xfd,
+0x08,0xe6,0xfc,0x90,0xfb,0xfc,0xe0,0x25,0xe0,0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,
+0xf5,0x83,0xed,0xf0,0xa3,0xec,0xf0,0x90,0xfb,0xfc,0xe0,0xff,0xe4,0xef,0x04,0x54,
+0x07,0xff,0x90,0xfb,0xfc,0xf0,0x90,0xfb,0xfd,0xe0,0x04,0xf0,0x12,0x31,0x93,0x90,
+0xfb,0xfe,0xe0,0x70,0x08,0xe4,0xfe,0xff,0x7c,0x0f,0x12,0x31,0x9a,0x80,0x27,0x90,
+0xfb,0xff,0xe0,0x04,0xf0,0x54,0x3f,0x70,0x1d,0x90,0xfb,0xff,0xe0,0x44,0xfe,0x7d,
+0x00,0xfc,0x90,0xfb,0xfc,0xe0,0x25,0xe0,0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,
+0x83,0xed,0xf0,0xa3,0xec,0xf0,0xe5,0x81,0x24,0xfb,0xf5,0x81,0x22,0x78,0x85,0x76,
+0x00,0x78,0x86,0x76,0x00,0x74,0x01,0x90,0xfb,0xfe,0xf0,0x12,0x30,0x85,0x90,0xfb,
+0xfd,0xe0,0x60,0x59,0x7c,0x0a,0x12,0x30,0xfa,0x90,0xfb,0xfb,0xe0,0x25,0xe0,0x24,
+0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe0,0xfd,0xa3,0xe0,0xfc,0x90,0xfb,0xfb,
+0xe0,0x25,0xe0,0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe4,0xf0,0xa3,0xf0,
+0x90,0xfb,0xfb,0xe0,0xff,0xe4,0xef,0x04,0x54,0x07,0xff,0x90,0xfb,0xfb,0xf0,0x90,
+0xfb,0xfd,0xe0,0x14,0xf0,0x78,0x83,0xed,0xf6,0x08,0xec,0xf6,0x12,0x31,0x93,0xb2,
+0xb3,0x78,0x83,0xe6,0xfd,0x08,0xe6,0xfc,0x12,0x08,0xe5,0x80,0xa1,0x12,0x31,0xe7,
+0x78,0x85,0x06,0xb6,0x00,0x11,0x78,0x85,0x76,0x00,0x78,0x86,0xe6,0xf4,0x04,0x04,
+0xa2,0xe0,0x92,0xb4,0x78,0x86,0xf6,0x80,0x85,0xe4,0x90,0xfb,0xfe,0xf0,0x90,0xfb,
+0xfd,0xe0,0x7d,0x00,0xfc,0xed,0x44,0xcf,0xfd,0x12,0x1c,0x93,0x12,0x31,0x08,0x22,
+0x12,0x30,0x85,0xe5,0x6a,0x64,0x49,0x45,0x69,0x60,0x15,0x90,0xff,0x83,0xe0,0x54,
+0x0f,0x7d,0x00,0xd3,0x95,0x6a,0xed,0x95,0x69,0x50,0x05,0x12,0x2e,0xce,0x80,0x03,
+0x12,0x2f,0x9e,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0xe5,0x6a,0x64,0x49,0x45,0x69,
+0x60,0x05,0x12,0x2f,0xd8,0x80,0x0e,0x90,0xff,0x80,0xe0,0x44,0x08,0xf0,0x90,0xff,
+0x83,0xe0,0x54,0x7f,0xf0,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x8c,0x54,0xec,0x54,
+0xf0,0xb4,0x10,0x15,0x75,0x64,0x3d,0x75,0x63,0xfd,0x75,0x62,0x01,0xe5,0x64,0x24,
+0x03,0xf5,0x64,0xe5,0x63,0x34,0x00,0xf5,0x63,0xe4,0xf5,0x57,0xf5,0x56,0xe5,0x56,
+0xc3,0x94,0x01,0x50,0x27,0xe5,0x54,0x54,0x0f,0xfc,0xad,0x64,0xae,0x63,0xaf,0x62,
+0x12,0x0e,0x82,0x8c,0x55,0xec,0x60,0x02,0x80,0x12,0x05,0x64,0xe5,0x64,0x70,0x02,
+0x05,0x63,0x05,0x57,0xe5,0x57,0x70,0x02,0x05,0x56,0x80,0xd2,0xe5,0x54,0x54,0x0f,
+0x24,0x97,0xf8,0xc6,0x54,0xfe,0xf6,0xe5,0x54,0x54,0x0f,0x7f,0x00,0xfe,0x7c,0x12,
+0x12,0x31,0x9a,0xe5,0x55,0x14,0x70,0x09,0x7d,0x00,0x7c,0x09,0x12,0x24,0xb1,0x80,
+0x07,0xad,0x57,0x7c,0x00,0x12,0x24,0xb1,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x90,
+0xff,0xfc,0xe0,0x44,0x02,0xf0,0x90,0xff,0x00,0xe0,0x30,0xe7,0x13,0x90,0xff,0x83,
+0xe0,0x44,0x80,0xf0,0x43,0x67,0x80,0x90,0xff,0xfc,0xe0,0x44,0x01,0xf0,0x80,0x11,
+0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x53,0x67,0x7f,0x90,0xff,0xfc,0xe0,0x54,0xfe,
+0xf0,0x90,0xff,0x81,0xe0,0x44,0x80,0xf0,0x12,0x25,0x64,0x90,0xff,0xfe,0xe0,0x44,
+0x05,0xf0,0x90,0xff,0xfc,0xe0,0x54,0xfd,0xf0,0x12,0x31,0x08,0x22,0x12,0x30,0x85,
+0x7c,0x01,0x12,0x32,0x48,0x78,0xa7,0xe6,0x44,0x02,0xf6,0x74,0xfe,0xfc,0x04,0xfd,
+0x12,0x1c,0xfe,0x90,0xff,0x6a,0xe0,0x30,0xe7,0x02,0x80,0xf7,0xe4,0xf5,0x4e,0x75,
+0x4d,0x10,0xac,0x4e,0xad,0x4d,0xe5,0x4e,0x15,0x4e,0x70,0x02,0x15,0x4d,0xec,0x4d,
+0x60,0x02,0x80,0xee,0x43,0x87,0x01,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x7c,0x02,
+0x12,0x31,0x14,0x78,0xa7,0xe6,0x54,0xfd,0xf6,0x12,0x31,0x08,0x22,0x12,0x30,0x85,
+0x78,0xa7,0xe6,0x30,0xe0,0x2c,0x78,0xa7,0xe6,0x30,0xe1,0x26,0x78,0xa7,0xe6,0xfc,
+0xf5,0x83,0x18,0xe6,0x44,0xf0,0xfd,0x12,0x1c,0x93,0x90,0xff,0xfc,0xe0,0x44,0x20,
+0xf0,0x7c,0x02,0x12,0x32,0x48,0x78,0xa7,0xe6,0x54,0xfd,0xf6,0x74,0x1a,0x90,0xff,
+0xfe,0xf0,0x78,0xa7,0xe6,0xfc,0xf5,0x83,0x18,0xe6,0x44,0xf1,0xfd,0x12,0x1c,0x93,
+0x12,0x31,0x08,0x22,0x75,0x67,0x00,0x75,0x68,0x00,0xe4,0xf5,0x66,0xf5,0x65,0xe4,
+0xf5,0x69,0x75,0x6a,0x49,0x74,0x84,0x90,0xff,0x82,0xf0,0x74,0x84,0x90,0xff,0x80,
+0xf0,0x74,0x80,0x90,0xff,0x68,0xf0,0x74,0x80,0x90,0xff,0x6a,0xf0,0xad,0x46,0xaf,
+0x45,0x7e,0x00,0xee,0x24,0xfc,0x50,0x03,0x02,0x21,0x6a,0xe4,0xee,0x75,0xf0,0x07,
+0xa4,0x24,0x3f,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0xff,0xe4,0xef,0x54,0x80,
+0xfd,0xe4,0xef,0x54,0x0f,0x14,0xff,0xed,0x60,0x38,0xe4,0xef,0x75,0xf0,0x08,0xa4,
+0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x90,0xf0,0xe4,0xef,0x75,0xf0,
+0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,0xe4,0xef,
+0x75,0xf0,0x08,0xa4,0x24,0x4e,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,
+0x80,0x34,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0x74,0x90,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0a,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xe4,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0e,0xf5,0x82,0xe4,
+0x34,0xff,0xf5,0x83,0xe4,0xf0,0x0e,0x02,0x20,0xd3,0x8d,0x46,0x8e,0x44,0x8f,0x45,
+0x74,0x7f,0x90,0xff,0xfd,0xf0,0x74,0x90,0x90,0xff,0xfc,0xf0,0x90,0xfc,0x19,0xe0,
+0x30,0xe6,0x07,0x90,0xff,0xfc,0xe0,0x44,0x04,0xf0,0x22,0x90,0xfc,0x0d,0xe0,0x14,
+0x70,0x04,0x90,0xfc,0x0c,0xe0,0x70,0x39,0x90,0xfc,0x00,0x79,0x06,0x7a,0x35,0x7b,
+0x12,0x78,0x01,0x12,0x03,0xf5,0x7f,0x00,0xef,0x33,0x40,0x15,0xef,0x90,0x35,0x4d,
+0x93,0xfc,0xef,0x24,0x80,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xec,0xf0,0x0f,0x80,
+0xe7,0x8f,0x59,0x90,0xfc,0x2b,0x79,0x18,0x7a,0x35,0x7b,0x35,0x78,0x01,0x12,0x03,
+0xf5,0xe4,0x90,0xff,0xff,0xf0,0x74,0x51,0x90,0xff,0xfa,0xf0,0x74,0x04,0x90,0xff,
+0xfb,0xf0,0x74,0x53,0x90,0xff,0xf8,0xf0,0x74,0x51,0x90,0xff,0xf9,0xf0,0x74,0x55,
+0x90,0xff,0xf7,0xf0,0x74,0x93,0x90,0xff,0xf6,0xf0,0x74,0x32,0x90,0xff,0xf5,0xf0,
+0x75,0x64,0x3d,0x75,0x63,0xfd,0x75,0x62,0x01,0xe4,0x90,0xff,0x83,0xf0,0x74,0x80,
+0x90,0xff,0x81,0xf0,0x75,0x58,0x04,0xe5,0x58,0x75,0xf0,0x07,0xa4,0x24,0x3f,0xf5,
+0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x78,0x89,0xf6,0xfc,0x54,0x0f,0x14,0xfc,0x78,
+0x89,0xec,0xf6,0xe5,0x58,0x75,0xf0,0x07,0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0xfc,
+0xf5,0x83,0xe0,0x78,0x8c,0x76,0xf8,0x08,0x76,0x00,0xfc,0x78,0x89,0xe6,0x75,0xf0,
+0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x89,0xe6,
+0x75,0xf0,0x08,0xa4,0x24,0x4f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xec,0xf0,0x78,
+0x8c,0xe6,0xff,0x08,0xe6,0x7e,0x03,0xcf,0xc3,0x13,0xcf,0x13,0xde,0xf9,0xfe,0x78,
+0x89,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x49,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xee,
+0xf0,0x78,0x89,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0x74,0x80,0xf0,0x78,0x8a,0xec,0xf6,0x7d,0x00,0x78,0x8d,0xe6,0x2c,0xf6,0x18,
+0xe6,0x3d,0xf6,0x78,0x8c,0xe6,0xfd,0x08,0xe6,0x7c,0x03,0xcd,0xc3,0x13,0xcd,0x13,
+0xdc,0xf9,0xfc,0x78,0x89,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4d,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xec,0xf0,0x78,0x89,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4e,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x8c,0xe6,0xfd,0x08,0xe6,0xfc,0x78,0x89,
+0xe6,0xff,0x7e,0x00,0xee,0x24,0xfc,0x50,0x03,0x02,0x24,0x6b,0xe4,0xee,0x75,0xf0,
+0x07,0xa4,0x24,0x3f,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0xff,0xe4,0xef,0x54,
+0x80,0xfa,0xe4,0xef,0x54,0x0f,0x14,0xff,0xe4,0xee,0x75,0xf0,0x07,0xa4,0x24,0x41,
+0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x78,0x8a,0xf6,0xee,0x75,0xf0,0x80,0xa4,
+0x24,0x08,0xf8,0xe5,0xf0,0x34,0xf8,0xf9,0xe8,0xfc,0xe9,0xfd,0x8a,0x59,0xea,0x70,
+0x03,0x02,0x23,0xd8,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xe4,0xf0,0x78,0x8a,0xe6,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,
+0x4f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0xed,0xfb,0xec,0x7a,0x03,0xcb,
+0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x49,0xf5,
+0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0x78,0x8a,0xe6,0x7b,0x00,0xfa,0xec,0x2a,
+0xfc,0xed,0x3b,0xfd,0xfb,0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,
+0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4d,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,
+0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,
+0x74,0x80,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4e,0xf5,0x82,0xe4,0x34,0xff,
+0xf5,0x83,0x74,0x80,0xf0,0x02,0x24,0x67,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x08,
+0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x8a,0xe6,0xfa,0xe4,0xef,0x75,
+0xf0,0x08,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0xed,0xfb,
+0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,
+0xa4,0x24,0x09,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0x78,0x8a,0xe6,0x7b,
+0x00,0xfa,0xec,0x2a,0xfc,0xed,0x3b,0xfd,0xfb,0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,
+0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0d,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xea,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0a,0xf5,0x82,0xe4,
+0x34,0xff,0xf5,0x83,0xe4,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0e,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x0e,0x02,0x22,0xf4,0x8e,0x58,0x78,0x8c,0xed,
+0xf6,0x08,0xec,0xf6,0x78,0x89,0xef,0xf6,0x12,0x20,0xa4,0x22,0x8c,0x26,0xec,0x30,
+0xe7,0x18,0xe5,0x26,0x54,0x0f,0x14,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,
+0x34,0xff,0xf5,0x83,0xe0,0x54,0xdf,0xf0,0x80,0x16,0xe5,0x26,0x54,0x0f,0x14,0x75,
+0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0xdf,0xf0,
+0x22,0xec,0x90,0xfd,0x3f,0xf0,0x8c,0x24,0xed,0x24,0x03,0xf5,0x25,0x7d,0x00,0xd3,
+0x95,0x6c,0xed,0x95,0x6b,0x40,0x03,0x85,0x6c,0x25,0xe5,0x25,0x24,0xb7,0x50,0x09,
+0x75,0x25,0x03,0x74,0x02,0x90,0xfd,0x3f,0xf0,0xac,0x25,0x12,0x2f,0xc3,0x22,0xe4,
+0xf5,0x66,0xf5,0x65,0x12,0x24,0xe8,0x22,0x90,0xfd,0x3d,0xe0,0x65,0x6d,0x60,0x0e,
+0x74,0x04,0x90,0xfd,0x3f,0xf0,0xe4,0xf5,0x65,0x75,0x66,0x03,0x80,0x46,0x7d,0x6d,
+0xe4,0xfe,0xff,0x79,0x3d,0x7a,0xfd,0x7b,0x01,0x74,0x05,0x78,0x00,0x12,0x03,0x3f,
+0xe5,0x66,0x24,0x03,0xf5,0x66,0xe5,0x65,0x34,0x00,0xf5,0x65,0xe5,0x66,0xd3,0x95,
+0x6c,0xe5,0x65,0x95,0x6b,0x40,0x06,0x85,0x6c,0x66,0x85,0x6b,0x65,0xd3,0xe5,0x66,
+0x94,0x48,0xe5,0x65,0x94,0x00,0x40,0x0c,0x74,0x02,0x90,0xfd,0x3f,0xf0,0xe4,0xf5,
+0x65,0x75,0x66,0x03,0xac,0x66,0x12,0x2f,0xc3,0x22,0xec,0x90,0xfd,0x3f,0xf0,0xe4,
+0xf5,0x66,0xf5,0x65,0x8c,0x32,0xec,0x60,0x05,0x12,0x2f,0xb4,0x80,0x05,0x7c,0x00,
+0x12,0x2f,0xc3,0x22,0x90,0xff,0x04,0xe0,0xf5,0x4a,0x90,0xff,0x06,0xe0,0xfd,0xa3,
+0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,0xff,0x06,0xe0,0xff,0xa3,0xe0,0x7e,
+0x00,0xff,0xe4,0xfe,0xec,0x4e,0xfc,0xed,0x4f,0xfd,0xc3,0xec,0x94,0x48,0xed,0x94,
+0x00,0x50,0x22,0x90,0xff,0x06,0xe0,0xfd,0xa3,0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,
+0xfc,0x90,0xff,0x06,0xe0,0xff,0xa3,0xe0,0x7e,0x00,0xff,0xe4,0xfe,0xec,0x4e,0xfc,
+0xed,0x4f,0xfd,0x80,0x04,0xe4,0xfd,0x7c,0x48,0x8c,0x6c,0x8d,0x6b,0x90,0xff,0x02,
+0xe0,0xfd,0xa3,0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,0xff,0x02,0xe0,0xff,
+0xa3,0xe0,0x7e,0x00,0xff,0xe4,0xfe,0xec,0x4e,0xf5,0x4c,0xed,0x4f,0xf5,0x4b,0x75,
+0x64,0x3d,0x75,0x63,0xfd,0x75,0x62,0x01,0x7d,0x3d,0x7e,0xfd,0x7f,0x01,0x79,0x6d,
+0xe4,0xfa,0xfb,0x74,0x05,0x78,0x00,0x12,0x03,0x3f,0x75,0x49,0x00,0xe5,0x49,0x24,
+0xfe,0x40,0x19,0xad,0x64,0xae,0x63,0xaf,0x62,0xe4,0x12,0x03,0x0f,0x05,0x49,0x0d,
+0xed,0x70,0x01,0x0e,0x8d,0x64,0x8e,0x63,0x8f,0x62,0x80,0xe1,0x75,0x64,0x3d,0x75,
+0x63,0xfd,0x75,0x62,0x01,0x90,0xff,0x00,0xe0,0x54,0x60,0xb4,0x00,0x02,0x80,0x06,
+0xd3,0x50,0x03,0x02,0x2c,0x12,0xe5,0x4a,0x54,0x0f,0xf5,0x49,0xe5,0x4a,0x54,0x80,
+0xa2,0xe0,0x92,0x02,0x90,0xff,0x01,0xe0,0x12,0x01,0x81,0x00,0x0b,0x2c,0x0d,0x26,
+0x67,0x27,0x85,0x2c,0x0d,0x28,0x91,0x2c,0x0d,0x29,0x74,0x29,0xa8,0x2b,0x0f,0x2b,
+0x12,0x2b,0x52,0x2b,0xb6,0x2b,0xe4,0xe5,0x67,0x30,0xe7,0x0e,0xe5,0x4c,0x45,0x4b,
+0x70,0x08,0xe5,0x6c,0x64,0x02,0x45,0x6b,0x60,0x03,0x02,0x2c,0x0f,0x90,0xff,0x00,
+0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x29,0xe5,0x4a,0x60,0x03,0x02,
+0x27,0x82,0xad,0x64,0xae,0x63,0xaf,0x62,0x74,0x01,0x12,0x03,0x0f,0x78,0xa7,0xe6,
+0x30,0xe0,0x0b,0xad,0x64,0xae,0x63,0xaf,0x62,0x74,0x02,0x12,0x03,0x0f,0x7c,0x02,
+0x12,0x2f,0xc3,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x1b,0xe5,0x67,0x20,0xe1,
+0x07,0xe5,0x4a,0x60,0x03,0x02,0x27,0x82,0xe5,0x4a,0x24,0xfe,0x50,0x03,0x02,0x27,
+0x82,0x7c,0x02,0x12,0x2f,0xc3,0x22,0xb4,0x02,0x02,0x80,0x06,0xd3,0x50,0x03,0x02,
+0x27,0x80,0xe5,0x67,0x20,0xe1,0x0d,0xe5,0x4a,0x60,0x09,0xe5,0x4a,0x64,0x80,0x60,
+0x03,0x02,0x27,0x82,0xac,0x4a,0x12,0x30,0x4a,0x40,0x03,0x02,0x27,0x82,0xe5,0x49,
+0x70,0x25,0x30,0x02,0x11,0x90,0xff,0x80,0xe0,0x54,0x08,0xad,0x64,0xae,0x63,0xaf,
+0x62,0x12,0x03,0x0f,0x80,0x0f,0x90,0xff,0x82,0xe0,0x54,0x08,0xad,0x64,0xae,0x63,
+0xaf,0x62,0x12,0x03,0x0f,0x80,0x3d,0x15,0x49,0x30,0x02,0x1d,0xe5,0x49,0x75,0xf0,
+0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0x08,0xad,0x64,
+0xae,0x63,0xaf,0x62,0x12,0x03,0x0f,0x80,0x1b,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,
+0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0x08,0xad,0x64,0xae,0x63,0xaf,
+0x62,0x12,0x03,0x0f,0xad,0x64,0xae,0x63,0xaf,0x62,0x12,0x01,0xe6,0x60,0x0b,0xad,
+0x64,0xae,0x63,0xaf,0x62,0x74,0x01,0x12,0x03,0x0f,0x7c,0x02,0x12,0x2f,0xc3,0x22,
+0x80,0x00,0x02,0x2c,0x0f,0xe5,0x67,0x20,0xe7,0x06,0xe5,0x6c,0x45,0x6b,0x60,0x03,
+0x02,0x2c,0x0f,0x90,0xff,0x00,0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,
+0x1a,0xe5,0x4c,0x14,0x45,0x4b,0x70,0x04,0xe5,0x4a,0x60,0x03,0x02,0x28,0x8e,0x78,
+0xa7,0xe6,0x54,0xfe,0xf6,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xb4,0x01,0x02,0x80,0x03,
+0xd3,0x40,0x2a,0xe5,0x67,0x20,0xe1,0x08,0xe5,0x67,0x20,0xe0,0x03,0x02,0x28,0x8e,
+0xe5,0x67,0x30,0xe0,0x04,0xe5,0x4a,0x70,0x0b,0xe5,0x67,0x30,0xe1,0x09,0xe5,0x4a,
+0x24,0xfe,0x50,0x03,0x02,0x28,0x8e,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xb4,0x02,0x02,
+0x80,0x06,0xd3,0x50,0x03,0x02,0x28,0x8c,0xe5,0x4c,0x45,0x4b,0x60,0x03,0x02,0x28,
+0x8e,0xac,0x4a,0x12,0x30,0x4a,0x40,0x03,0x02,0x28,0x8e,0xe5,0x67,0x20,0xe1,0x07,
+0xe5,0x67,0x20,0xe0,0x02,0x80,0x77,0xe5,0x67,0x30,0xe0,0x06,0xe5,0x49,0x60,0x02,
+0x80,0x6c,0xe5,0x49,0x70,0x0f,0x90,0xff,0x82,0xe0,0x54,0xf7,0xf0,0x90,0xff,0x80,
+0xe0,0x54,0xf7,0xf0,0x22,0xe5,0x49,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x09,0x7d,
+0x01,0x7c,0x03,0x12,0x0f,0x0b,0x80,0x11,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x09,
+0x7d,0x01,0x7c,0x04,0x12,0x0f,0x0b,0x80,0x00,0x15,0x49,0x30,0x02,0x15,0xe5,0x49,
+0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0xf7,
+0xf0,0x80,0x13,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,
+0xf5,0x83,0xe0,0x54,0xf7,0xf0,0x7c,0x00,0x12,0x2f,0xc3,0x22,0x80,0x00,0x02,0x2c,
+0x0f,0xe5,0x67,0x20,0xe7,0x06,0xe5,0x6c,0x45,0x6b,0x60,0x03,0x02,0x2c,0x0f,0x90,
+0xff,0x00,0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x1a,0xe5,0x4c,0x14,
+0x45,0x4b,0x70,0x04,0xe5,0x4a,0x60,0x03,0x02,0x29,0x71,0x78,0xa7,0xe6,0x44,0x01,
+0xf6,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x29,0xe5,
+0x67,0x20,0xe1,0x08,0xe5,0x67,0x20,0xe0,0x03,0x02,0x29,0x71,0xe5,0x67,0x30,0xe0,
+0x04,0xe5,0x49,0x70,0x0b,0xe5,0x67,0x30,0xe1,0x08,0xe5,0x49,0x24,0xfe,0x50,0x02,
+0x80,0x7f,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x6f,
+0xe5,0x4c,0x45,0x4b,0x60,0x02,0x80,0x69,0xac,0x4a,0x12,0x30,0x4a,0x40,0x02,0x80,
+0x60,0xe5,0x67,0x20,0xe1,0x07,0xe5,0x67,0x20,0xe0,0x02,0x80,0x54,0xe5,0x49,0x70,
+0x14,0x30,0x02,0x09,0x90,0xff,0x80,0xe0,0x44,0x08,0xf0,0x80,0x07,0x90,0xff,0x82,
+0xe0,0x44,0x08,0xf0,0x22,0xe5,0x67,0x30,0xe1,0x33,0x15,0x49,0x30,0x02,0x15,0xe5,
+0x49,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x44,
+0x08,0xf0,0x80,0x13,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xe0,0x44,0x08,0xf0,0x7c,0x00,0x12,0x2f,0xc3,0x22,0x80,0x02,0x80,
+0x00,0x02,0x2c,0x0f,0xe5,0x67,0x20,0xe7,0x12,0xe5,0x6c,0x45,0x6b,0x70,0x0c,0xe5,
+0x4a,0x70,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x0f,0xe5,0x4c,
+0x90,0xff,0xff,0xf0,0x90,0xff,0xff,0xe0,0x60,0x05,0x43,0x67,0x01,0x80,0x03,0x53,
+0x67,0xfe,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xe5,0x67,0x30,0xe7,0x0e,0xe5,0x6c,0x45,
+0x6b,0x60,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x0f,0xad,0x4b,
+0xe5,0x4c,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0xbd,0x00,0x02,0x80,0x03,0x02,0x2b,
+0x0a,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x32,0xe5,0x4a,0x70,0x05,0xe5,0x4c,0xfc,
+0x60,0x03,0x02,0x2b,0x0c,0x75,0x64,0x00,0x75,0x63,0xfc,0x75,0x62,0x01,0xd3,0xe5,
+0x6c,0x94,0x12,0xe5,0x6b,0x94,0x00,0x40,0x06,0xe4,0xfd,0x7c,0x12,0x80,0x04,0xac,
+0x6c,0xad,0x6b,0x8c,0x6a,0x8d,0x69,0x12,0x2f,0xd8,0x22,0xb4,0x02,0x02,0x80,0x03,
+0xd3,0x40,0x59,0xe5,0x4a,0x60,0x03,0x02,0x2b,0x0c,0xe5,0x4c,0xfc,0x70,0x27,0x75,
+0x64,0x12,0x75,0x63,0xfc,0x75,0x62,0x01,0xd3,0xe5,0x6c,0x94,0x19,0xe5,0x6b,0x94,
+0x00,0x40,0x06,0xe4,0xfd,0x7c,0x19,0x80,0x04,0xac,0x6c,0xad,0x6b,0x8c,0x6a,0x8d,
+0x69,0x12,0x2f,0xd8,0x80,0x25,0x75,0x64,0x2b,0x75,0x63,0xfc,0x75,0x62,0x01,0xd3,
+0xe5,0x6c,0x94,0x35,0xe5,0x6b,0x94,0x00,0x40,0x06,0xe4,0xfd,0x7c,0x35,0x80,0x04,
+0xac,0x6c,0xad,0x6b,0x8c,0x6a,0x8d,0x69,0x12,0x2f,0xd8,0x22,0xb4,0x03,0x02,0x80,
+0x06,0xd3,0x50,0x03,0x02,0x2b,0x0a,0xe5,0x4c,0xf5,0x49,0x70,0x0f,0x90,0xff,0x04,
+0xe0,0xfd,0xa3,0xe0,0x4d,0x60,0x03,0x02,0x2b,0x0c,0x80,0x18,0x90,0xfc,0x82,0xe0,
+0xfd,0xa3,0xe0,0xfc,0x90,0xff,0x05,0xe0,0x6c,0x70,0x07,0x90,0xff,0x04,0xe0,0x6d,
+0x60,0x02,0x80,0x68,0xe4,0xf5,0x6a,0xf5,0x69,0x7f,0x00,0xe5,0x49,0x14,0xc5,0x49,
+0x60,0x0f,0xef,0x24,0x80,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x2f,0xff,0x80,
+0xea,0x8f,0x4a,0xe5,0x4a,0x24,0x80,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x7d,
+0x00,0xd3,0x95,0x6c,0xed,0x95,0x6b,0x40,0x06,0xac,0x6c,0xad,0x6b,0x80,0x0f,0xe5,
+0x4a,0x24,0x80,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x7d,0x00,0xfc,0x8c,0x6a,
+0x8d,0x69,0xe5,0x4a,0x24,0x80,0xfc,0xe4,0x34,0xfc,0xfd,0xfe,0xec,0xfd,0x7f,0x01,
+0x8d,0x64,0x8e,0x63,0x8f,0x62,0x12,0x2f,0xd8,0x22,0x80,0x00,0x02,0x2c,0x0f,0x02,
+0x2c,0x0f,0xe5,0x67,0x30,0xe7,0x19,0xe5,0x6c,0x14,0x45,0x6b,0x70,0x12,0xe5,0x4a,
+0x70,0x0e,0xe5,0x4c,0x45,0x4b,0x70,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,
+0x02,0x2c,0x0f,0xe5,0x67,0x20,0xe0,0x08,0xe5,0x67,0x20,0xe1,0x03,0x02,0x2c,0x0f,
+0x75,0x64,0x68,0xe4,0xf5,0x63,0xf5,0x62,0xe4,0xf5,0x69,0x04,0xf5,0x6a,0x12,0x2f,
+0xd8,0x22,0xe5,0x67,0x20,0xe7,0x27,0xe5,0x6c,0x45,0x6b,0x70,0x21,0xe5,0x4a,0x70,
+0x1d,0xe5,0x4c,0x64,0x02,0x45,0x4b,0x60,0x0d,0xe5,0x4c,0x14,0x45,0x4b,0x60,0x06,
+0xe5,0x4c,0x45,0x4b,0x70,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,
+0x0f,0xe5,0x67,0x20,0xe0,0x08,0xe5,0x67,0x20,0xe1,0x03,0x02,0x2c,0x0f,0x85,0x4c,
+0x68,0xe5,0x68,0x70,0x08,0x43,0x67,0x01,0x53,0x67,0xfd,0x80,0x13,0xe5,0x68,0x64,
+0x02,0x60,0x07,0xe5,0x68,0x14,0x60,0x02,0x80,0x65,0x53,0x67,0xfe,0x43,0x67,0x02,
+0x7c,0x00,0x12,0x2f,0xc3,0x22,0xe5,0x67,0x30,0xe7,0x1a,0xe5,0x6c,0x14,0x45,0x6b,
+0x70,0x13,0xe5,0x4a,0x70,0x0f,0xe5,0x4c,0x45,0x4b,0x70,0x09,0x90,0xff,0x00,0xe0,
+0x54,0x1f,0x14,0x60,0x02,0x80,0x38,0xe5,0x67,0x20,0xe1,0x02,0x80,0x31,0x7c,0x01,
+0x12,0x2f,0xc3,0x22,0xe5,0x67,0x20,0xe7,0x15,0xe5,0x6c,0x45,0x6b,0x70,0x0f,0xe5,
+0x4c,0x45,0x4b,0x70,0x09,0x90,0xff,0x00,0xe0,0x54,0x1f,0x14,0x60,0x02,0x80,0x0f,
+0xe5,0x67,0x20,0xe1,0x02,0x80,0x08,0x7c,0x00,0x12,0x2f,0xc3,0x22,0x80,0x00,0x02,
+0x2e,0xca,0xb4,0x40,0x02,0x80,0x06,0xd3,0x50,0x03,0x02,0x2e,0xc0,0x90,0xff,0x01,
+0xe0,0x90,0xfd,0x3d,0xf0,0xe5,0x4a,0x90,0xfd,0x3e,0xf0,0xe4,0x90,0xfd,0x3f,0xf0,
+0xe5,0x64,0x24,0x03,0xf5,0x64,0xe5,0x63,0x34,0x00,0xf5,0x63,0xad,0x4b,0xe5,0x4c,
+0x85,0x64,0x82,0x85,0x63,0x83,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xff,0x01,0xe0,0x12,
+0x01,0xb7,0x2c,0x7d,0x01,0x2c,0xa3,0x02,0x2c,0xcd,0x03,0x2c,0xf7,0x04,0x2d,0x45,
+0x05,0x2d,0x82,0x06,0x2d,0xa8,0x07,0x2d,0xce,0x08,0x2d,0xf4,0x09,0x2e,0x1a,0x0b,
+0x2e,0x40,0x0c,0x2e,0x4f,0x80,0x2e,0x4f,0x81,0x00,0x00,0x2e,0xad,0xe5,0x67,0x20,
+0xe7,0x06,0x7c,0x05,0x12,0x25,0x4a,0x22,0x7d,0xb7,0x7e,0x34,0x7f,0x02,0x79,0x40,
+0x7a,0xfd,0x7b,0x01,0x74,0x08,0x78,0x00,0x12,0x03,0x3f,0x7d,0x08,0x7c,0x00,0x12,
+0x24,0xb1,0x22,0xe5,0x67,0x20,0xe7,0x06,0x7c,0x05,0x12,0x25,0x4a,0x22,0xe5,0x4a,
+0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,
+0x10,0x12,0x31,0x9a,0x22,0x7d,0x00,0x7c,0x07,0x12,0x24,0xb1,0x22,0xe5,0x67,0x20,
+0xe7,0x06,0x7c,0x05,0x12,0x25,0x4a,0x22,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,
+0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x11,0x12,0x31,0x9a,0x22,0x7d,
+0x00,0x7c,0x07,0x12,0x24,0xb1,0x22,0xe5,0x67,0x20,0xe7,0x06,0x7c,0x05,0x12,0x25,
+0x4a,0x22,0xe5,0x4a,0xb4,0x05,0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,
+0x7c,0x0a,0x12,0x31,0x9a,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,
+0x04,0xfe,0x7c,0x08,0x12,0x31,0x9a,0x22,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,
+0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x13,0x12,0x31,0x9a,0x22,0x7d,0x00,0x7c,
+0x07,0x12,0x24,0xb1,0x22,0xe5,0x67,0x20,0xe7,0x34,0xd3,0xe5,0x6c,0x94,0x48,0xe5,
+0x6b,0x94,0x00,0x50,0x06,0xe5,0x6c,0x45,0x6b,0x70,0x06,0x7c,0x02,0x12,0x25,0x4a,
+0x22,0xe5,0x4a,0xb4,0x01,0x03,0xb3,0x40,0x0b,0xc3,0xb4,0x03,0x00,0x40,0x09,0xb4,
+0x06,0x00,0x50,0x04,0x12,0x30,0x70,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,
+0xe8,0x22,0xe5,0x67,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,
+0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x16,0x12,0x31,0x9a,0x22,0x7c,0x07,
+0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,0xe5,0x67,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,
+0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x19,
+0x12,0x31,0x9a,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,0xe5,0x67,
+0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,
+0x4a,0x7f,0x00,0xfe,0x7c,0x17,0x12,0x31,0x9a,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,
+0x12,0x24,0xe8,0x22,0xe5,0x67,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,
+0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x18,0x12,0x31,0x9a,0x22,
+0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,0xe5,0x67,0x20,0xe7,0x1d,0xe5,
+0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,
+0x7c,0x15,0x12,0x31,0x9a,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,
+0xe5,0x67,0x20,0xe7,0x06,0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,0xe5,
+0x67,0x30,0xe7,0x20,0x90,0xff,0x00,0xe0,0x54,0x1f,0x70,0x10,0x90,0xff,0x01,0xe0,
+0xb4,0x80,0x05,0x12,0x24,0xdf,0x80,0x03,0x12,0x24,0xe8,0x22,0x7d,0x00,0x7c,0x05,
+0x12,0x24,0xb1,0x22,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x06,0x7c,0x05,0x12,0x25,
+0x4a,0x22,0xd3,0xe5,0x6c,0x94,0x48,0xe5,0x6b,0x94,0x00,0x50,0x0b,0xc3,0xe5,0x6c,
+0x94,0x07,0xe5,0x6b,0x94,0x00,0x50,0x06,0x7c,0x03,0x12,0x25,0x4a,0x22,0xe5,0x4a,
+0xb4,0x05,0x04,0x12,0x30,0x70,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,0xe5,0x67,0x30,
+0xe7,0x08,0x7d,0x00,0x7c,0x05,0x12,0x24,0xb1,0x22,0x7c,0x05,0x12,0x25,0x4a,0x22,
+0xb4,0x20,0x02,0x80,0x03,0xd3,0x40,0x00,0x80,0x00,0x12,0x2f,0x9e,0x22,0x75,0x43,
+0x00,0x90,0xff,0x83,0xe0,0x54,0x0f,0xd3,0x95,0x43,0x40,0x24,0xe5,0x43,0x24,0xf0,
+0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xe0,0xad,0x64,0xae,0x63,0xaf,0x62,0x12,0x03,
+0x0f,0x05,0x43,0x0d,0xed,0x70,0x01,0x0e,0x8d,0x64,0x8e,0x63,0x8f,0x62,0x80,0xd1,
+0xe5,0x43,0x7d,0x00,0xfc,0xc3,0xe5,0x6a,0x9c,0xf5,0x6a,0xe5,0x69,0x9d,0xf5,0x69,
+0xe5,0x6a,0x45,0x69,0x60,0x06,0xe4,0x90,0xff,0x83,0xf0,0x22,0x90,0xff,0x82,0xe0,
+0x44,0x08,0xf0,0xe4,0xf5,0x69,0x75,0x6a,0x49,0x90,0xfd,0x3d,0xe0,0xb4,0x05,0x02,
+0x80,0x03,0xd3,0x40,0x40,0x90,0xfd,0x3e,0xe0,0xf5,0x43,0xb4,0x05,0x02,0x80,0x03,
+0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x0b,0x12,0x31,0x9a,0x22,0xb4,0x01,0x02,
+0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x09,0x12,0x31,0x9a,0x22,0xb4,
+0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x43,0x7f,0x00,0xfe,0x7c,0x14,
+0x12,0x31,0x9a,0x22,0x22,0xb4,0x80,0x00,0x40,0x23,0xb4,0x82,0x00,0x50,0x1e,0x7c,
+0x3d,0x7d,0xfd,0x12,0x17,0xd5,0x7d,0x00,0x8c,0x66,0x8d,0x65,0x90,0xfd,0x3f,0xe0,
+0x60,0x05,0x12,0x2f,0x9e,0x80,0x05,0x7c,0x00,0x12,0x2f,0xc3,0x22,0x22,0x90,0xff,
+0x83,0xe0,0x54,0x7f,0xf0,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x90,0xff,0x80,0xe0,
+0x44,0x08,0xf0,0x22,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x90,0xff,0x80,0xe0,0x44,
+0x08,0xf0,0x22,0x8c,0x23,0x7d,0x00,0x8c,0x6a,0x8d,0x69,0x75,0x64,0x3d,0x75,0x63,
+0xfd,0x75,0x62,0x01,0x12,0x2f,0xd8,0x22,0x90,0xff,0x83,0xe0,0x54,0x7f,0xf0,0xe5,
+0x6a,0x64,0x49,0x45,0x69,0x70,0x01,0x22,0xc3,0xe5,0x6a,0x94,0x08,0xe5,0x69,0x94,
+0x00,0x40,0x15,0x75,0x21,0x08,0xe5,0x21,0x7d,0x00,0xfc,0xc3,0xe5,0x6a,0x9c,0xf5,
+0x6a,0xe5,0x69,0x9d,0xf5,0x69,0x80,0x09,0x85,0x6a,0x21,0xe4,0xf5,0x69,0x75,0x6a,
+0x49,0x75,0x22,0x00,0xe5,0x22,0xc3,0x95,0x21,0x50,0x26,0xad,0x64,0xae,0x63,0xaf,
+0x62,0x12,0x01,0xe6,0xfc,0xe5,0x22,0x24,0xf8,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,
+0xec,0xf0,0x05,0x22,0x0d,0xed,0x70,0x01,0x0e,0x8d,0x64,0x8e,0x63,0x8f,0x62,0x80,
+0xd3,0xe5,0x21,0x54,0x7f,0x90,0xff,0x81,0xf0,0x22,0x8c,0x48,0x7f,0x00,0xef,0x24,
+0xfb,0x40,0x19,0xe4,0xef,0x75,0xf0,0x07,0xa4,0x24,0x3f,0xf5,0x82,0xe4,0x34,0xfc,
+0xf5,0x83,0xe0,0x65,0x48,0x70,0x02,0xd3,0x22,0x0f,0x80,0xe2,0x8f,0x47,0xc3,0x22,
+0x85,0x6c,0x6a,0x85,0x6b,0x69,0x90,0xff,0x82,0xe0,0x54,0xf7,0xf0,0x90,0xff,0x83,
+0xe0,0x54,0x7f,0xf0,0x22,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,0x06,0xc0,0x07,0xe5,
+0x72,0x24,0x08,0xf8,0x86,0x06,0x53,0x06,0x7f,0x7c,0xff,0x12,0x30,0xfa,0x7c,0x00,
+0x7d,0x00,0xe5,0x75,0x60,0x46,0xff,0x90,0xfe,0x9d,0xe0,0x54,0x7f,0x6e,0x70,0x0f,
+0xc0,0x83,0xc0,0x82,0xa3,0xe0,0xfd,0xa3,0xe0,0xfc,0xa3,0x15,0x75,0x80,0x07,0xa3,
+0xa3,0xa3,0xdf,0xe6,0x80,0x26,0xdf,0x06,0xd0,0x82,0xd0,0x83,0x80,0x1e,0xe0,0xf8,
+0xa3,0xe0,0xf9,0xa3,0xe0,0xfa,0xd0,0x82,0xd0,0x83,0xe8,0xf0,0xa3,0xe9,0xf0,0xa3,
+0xea,0xf0,0xa3,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x80,0xda,0x12,0x31,0x93,0xd0,
+0x07,0xd0,0x06,0xd0,0x02,0xd0,0x01,0xd0,0x00,0x22,0x85,0xa8,0x74,0x75,0xa8,0x88,
+0xec,0x70,0x02,0x7c,0x3f,0x8c,0x73,0x22,0xe5,0x72,0x24,0x08,0xf8,0x76,0x00,0x12,
+0x31,0xe7,0x80,0xfb,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,0x06,0xc0,0x07,0xae,0x04,
+0x7c,0xff,0x12,0x30,0xfa,0xe5,0x75,0x60,0x42,0xff,0x90,0xfe,0x9d,0xe0,0x54,0x7f,
+0x6e,0x70,0x0b,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x15,0x75,0x80,0x07,0xa3,0xa3,
+0xa3,0xdf,0xea,0x80,0x26,0xdf,0x06,0xd0,0x82,0xd0,0x83,0x80,0xd8,0xe0,0xf8,0xa3,
+0xe0,0xf9,0xa3,0xe0,0xfa,0xd0,0x82,0xd0,0x83,0xe8,0xf0,0xa3,0xe9,0xf0,0xa3,0xea,
+0xf0,0xa3,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x80,0xda,0x78,0x08,0x08,0x79,0x18,
+0x09,0x7c,0x01,0xe6,0x54,0x7f,0x6e,0x70,0x06,0x76,0x00,0x77,0x00,0x80,0x06,0x08,
+0x09,0x0c,0xbc,0x08,0xee,0x12,0x31,0x93,0xd0,0x07,0xd0,0x06,0xd0,0x02,0xd0,0x01,
+0xd0,0x00,0x22,0x75,0x73,0x00,0x85,0x74,0xa8,0x22,0xc0,0xf0,0xc0,0x82,0xc0,0x83,
+0xc3,0xe5,0x75,0x24,0xe8,0x50,0x05,0x12,0x31,0xe7,0x80,0xf4,0xec,0x60,0x31,0x90,
+0x34,0xb6,0xe4,0x93,0xc3,0x9c,0x40,0x28,0xc0,0x04,0x7c,0xff,0x12,0x30,0xfa,0xd0,
+0x04,0x43,0x04,0x80,0xe5,0x75,0x75,0xf0,0x03,0xa4,0x24,0x9d,0xf5,0x82,0xe4,0x34,
+0xfe,0xf5,0x83,0xec,0xf0,0xef,0xa3,0xf0,0xee,0xa3,0xf0,0x05,0x75,0x12,0x31,0x93,
+0xd0,0x83,0xd0,0x82,0xd0,0xf0,0x22,0xc0,0x04,0x7c,0x20,0xd2,0x8c,0xd2,0x8d,0xd5,
+0x04,0xfd,0xd0,0x04,0x22,0x75,0xa8,0x00,0x75,0x88,0x00,0x75,0xb8,0x00,0x75,0xf0,
+0x00,0x75,0xd0,0x00,0xe4,0xf8,0x90,0x00,0x00,0xf6,0x08,0xb8,0x00,0xfb,0x02,0x00,
+0x00,0xc3,0xed,0x94,0x02,0x50,0x04,0x7d,0x03,0x7c,0xe8,0xec,0xf4,0xfc,0xed,0xf4,
+0xfd,0x0c,0xbc,0x00,0x01,0x0d,0x8c,0x79,0x8d,0x78,0x22,0xc3,0xec,0x94,0xbc,0xed,
+0x94,0x02,0x50,0x04,0x7d,0x07,0x7c,0xd0,0xec,0xf4,0xfc,0xed,0xf4,0xfd,0x0c,0xbc,
+0x00,0x01,0x0d,0x8c,0x77,0x8d,0x76,0x22,0xec,0x70,0x01,0x22,0xc0,0x00,0xe5,0x72,
+0x24,0x18,0xf8,0xa6,0x04,0xe5,0x72,0x24,0x08,0xf8,0xc6,0x54,0x7f,0xf6,0xe6,0x30,
+0xe7,0x03,0xd0,0x00,0x22,0x12,0x31,0xe7,0x80,0xf4,0xc2,0x8c,0x85,0x76,0x8c,0x85,
+0x77,0x8a,0xd2,0x8c,0xc0,0xe0,0xc0,0xd0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x00,
+0xc0,0x01,0xc0,0x02,0xc0,0x03,0xc0,0x04,0xc0,0x05,0xc0,0x06,0xc0,0x07,0x12,0x1b,
+0x28,0xe5,0x72,0x24,0x08,0xf8,0xe6,0x60,0x24,0xe5,0x72,0x24,0x10,0xf8,0xa6,0x81,
+0xe5,0x72,0x75,0xf0,0x21,0xa4,0x24,0x95,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0x78,
+0xa8,0xe5,0x81,0x04,0xc3,0x98,0xf9,0xe6,0xf0,0x08,0xa3,0xd9,0xfa,0x74,0x08,0x25,
+0x72,0xf8,0x05,0x72,0x08,0xe6,0x54,0x80,0x70,0x0c,0xe5,0x72,0xb4,0x07,0xf3,0x78,
+0x08,0x75,0x72,0x00,0x80,0xef,0xe5,0x72,0x24,0x10,0xf8,0x86,0x81,0xe5,0x72,0x75,
+0xf0,0x21,0xa4,0x24,0x95,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0x78,0xa8,0xe5,0x81,
+0x04,0xc3,0x98,0xf9,0xe0,0xf6,0x08,0xa3,0xd9,0xfa,0xd0,0x07,0xd0,0x06,0xd0,0x05,
+0xd0,0x04,0xd0,0x03,0xd0,0x02,0xd0,0x01,0xd0,0x00,0xd0,0x83,0xd0,0x82,0xd0,0xf0,
+0xd0,0xd0,0xd0,0xe0,0x32,0xc0,0xe0,0xc0,0xd0,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc2,
+0x8e,0x85,0x78,0x8d,0x85,0x79,0x8b,0xd2,0x8e,0x78,0x19,0x79,0x09,0x7a,0x07,0xe7,
+0x70,0x04,0xa6,0x00,0x80,0x0b,0xe6,0x60,0x08,0x16,0xe6,0x70,0x04,0xe7,0x44,0x80,
+0xf7,0x08,0x09,0xda,0xea,0xe5,0x73,0x60,0x13,0x14,0xf5,0x73,0x70,0x0e,0xe5,0x72,
+0x24,0x08,0xf8,0x76,0x00,0x12,0x31,0x93,0xd2,0x8c,0xd2,0x8d,0xd0,0x02,0xd0,0x01,
+0xd0,0x00,0xd0,0xd0,0xd0,0xe0,0x32,0x75,0x81,0xa7,0x75,0x90,0x00,0x75,0x79,0x30,
+0x75,0x78,0xf8,0x75,0x77,0x60,0x75,0x76,0xf0,0x12,0x05,0x3c,0x12,0x34,0x0f,0x12,
+0x17,0x8b,0x12,0x34,0x39,0x12,0x31,0xf5,0x80,0xe3,0x22,0xc0,0x00,0x7c,0x01,0xec,
+0x24,0x08,0xf8,0xe6,0x60,0x09,0x0c,0xbc,0x08,0xf5,0x12,0x31,0xe7,0x80,0xee,0xd0,
+0x00,0x22,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x00,0xc0,0x06,0xc0,0x07,0xed,0x24,
+0x10,0xf8,0x76,0xb6,0xed,0x75,0xf0,0x21,0xa4,0x24,0x95,0xf5,0x82,0xe4,0x34,0xfd,
+0xf5,0x83,0xc0,0x82,0xc0,0x83,0xa3,0xa3,0xe4,0x78,0x0d,0xf0,0xa3,0xd8,0xfc,0xec,
+0x54,0x7f,0x75,0xf0,0x02,0xa4,0x24,0x82,0xf5,0x82,0xe5,0xf0,0x34,0x34,0xf5,0x83,
+0xe4,0x93,0xfe,0x74,0x01,0x93,0xf5,0x82,0x8e,0x83,0xe4,0x93,0xfe,0x74,0x01,0x93,
+0xff,0xd0,0x83,0xd0,0x82,0xef,0xf0,0xa3,0xee,0xf0,0xed,0x24,0x08,0xf8,0xec,0x44,
+0x80,0xf6,0xd0,0x07,0xd0,0x06,0xd0,0x00,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0x22,0x75,
+0x72,0x00,0x75,0x75,0x00,0x7a,0x08,0x79,0x18,0x78,0x08,0x76,0x00,0x77,0x00,0x08,
+0x09,0xda,0xf8,0xe4,0x78,0x08,0x74,0x80,0x44,0x7f,0xf6,0x74,0x01,0x44,0x10,0xf5,
+0x89,0x75,0xb8,0x08,0xd2,0xab,0xd2,0xa9,0x22,0x75,0x81,0xa7,0xd2,0x8e,0xd2,0x8c,
+0xd2,0xaf,0xe5,0x75,0x60,0x32,0xff,0x90,0xfe,0x9d,0xe0,0x54,0x80,0x60,0x24,0x78,
+0x08,0x79,0x08,0xe0,0x54,0x7f,0xfa,0x7b,0x00,0xe6,0x54,0x7f,0xb5,0x02,0x02,0x7b,
+0xff,0x08,0xd9,0xf5,0xeb,0x70,0x0c,0xea,0xf0,0x12,0x33,0x8b,0xad,0x04,0xac,0x02,
+0x12,0x33,0xa2,0xa3,0xa3,0xa3,0xdf,0xd2,0x12,0x31,0xe7,0x80,0xc5,0x7c,0x01,0x7d,
+0x00,0x22,0x04,0xf5,0x04,0xe9,0x04,0xed,0x04,0xe1,0x04,0xdd,0x04,0xd9,0x04,0xe5,
+0x04,0xf1,0x04,0x9d,0x04,0xa1,0x04,0xcd,0x04,0xd1,0x04,0x99,0x04,0x99,0x04,0x99,
+0x04,0xd5,0x04,0xb5,0x04,0xad,0x04,0xb1,0x04,0xa9,0x04,0xc1,0x04,0xbd,0x04,0xb9,
+0x04,0xc5,0x04,0xc9,0x04,0xa5,0x19,0x01,0x03,0x00,0x22,0x00,0x48,0x02,0x00,0x24,
+0x0f,0x18,0x0a,0x10,0x64,0x0d,0x68,0x0c,0x05,0x06,0x02,0x03,0x01,0x01,0x81,0x01,
+0x00,0x00,0xe7,0x00,0xc0,0x00,0x80,0x00,0x60,0x00,0x40,0x00,0x30,0x00,0x18,0x00,
+0x0c,0x00,0x08,0x00,0x04,0x00,0x02,0x00,0x01,0x00,0x08,0x18,0x38,0x28,0x06,0x02,
+0x10,0x0a,0x02,0x00,0x00,0x00,0x00,0x00,0x01,0x81,0x10,0x0a,0x02,0x00,0x00,0x00,
+0x00,0x00,0xfb,0xe8,0xfb,0xfa,0x12,0x01,0x10,0x01,0xff,0x00,0x00,0x08,0x51,0x04,
+0x5f,0x50,0x16,0x01,0x01,0x02,0x00,0x02,0x09,0x02,0x35,0x00,0x01,0x02,0x00,0xe0,
+0x00,0x09,0x04,0x00,0x00,0x05,0xff,0x00,0x00,0x00,0x07,0x05,0x81,0x02,0x40,0x00,
+0x00,0x07,0x05,0x01,0x02,0x40,0x00,0x00,0x07,0x05,0x82,0x02,0x40,0x00,0x00,0x07,
+0x05,0x02,0x02,0x40,0x00,0x00,0x07,0x05,0x85,0x03,0x02,0x00,0x01,0x04,0x03,0x09,
+0x04,0x24,0x03,0x54,0x00,0x65,0x00,0x78,0x00,0x61,0x00,0x73,0x00,0x20,0x00,0x49,
+0x00,0x6e,0x00,0x73,0x00,0x74,0x00,0x72,0x00,0x75,0x00,0x6d,0x00,0x65,0x00,0x6e,
+0x00,0x74,0x00,0x73,0x00,0x2a,0x03,0x54,0x00,0x55,0x00,0x53,0x00,0x42,0x00,0x35,
+0x00,0x30,0x00,0x35,0x00,0x32,0x00,0x20,0x00,0x53,0x00,0x65,0x00,0x72,0x00,0x69,
+0x00,0x61,0x00,0x6c,0x00,0x20,0x00,0x50,0x00,0x6f,0x00,0x72,0x00,0x74,0x00,0x22,
+0x03,0x54,0x00,0x55,0x00,0x53,0x00,0x42,0x00,0x35,0x00,0x30,0x00,0x35,0x00,0x32,
+0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,
+0x00,
+};
+
+#endif /* ifndef _TI_FW_5052_H_ */
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
new file mode 100644
index 000000000000..98054876cca2
--- /dev/null
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -0,0 +1,1842 @@
+/* vi: ts=8 sw=8
+ *
+ * TI 3410/5052 USB Serial Driver
+ *
+ * Copyright (C) 2004 Texas Instruments
+ *
+ * This driver is based on the Linux io_ti driver, which is
+ * Copyright (C) 2000-2002 Inside Out Networks
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * For questions or problems with this driver, contact Texas Instruments
+ * technical support, or Al Borchers <alborchers@steinerpoint.com>, or
+ * Peter Berger <pberger@brimson.com>.
+ *
+ * This driver needs this hotplug script in /etc/hotplug/usb/ti_usb_3410_5052
+ * or in /etc/hotplug.d/usb/ti_usb_3410_5052.hotplug to set the device
+ * configuration.
+ *
+ * #!/bin/bash
+ *
+ * BOOT_CONFIG=1
+ * ACTIVE_CONFIG=2
+ *
+ * if [[ "$ACTION" != "add" ]]
+ * then
+ * exit
+ * fi
+ *
+ * CONFIG_PATH=/sys${DEVPATH%/?*}/bConfigurationValue
+ *
+ * if [[ 0`cat $CONFIG_PATH` -ne $BOOT_CONFIG ]]
+ * then
+ * exit
+ * fi
+ *
+ * PRODUCT=${PRODUCT%/?*} # delete version
+ * VENDOR_ID=`printf "%d" 0x${PRODUCT%/?*}`
+ * PRODUCT_ID=`printf "%d" 0x${PRODUCT#*?/}`
+ *
+ * PARAM_PATH=/sys/module/ti_usb_3410_5052/parameters
+ *
+ * function scan() {
+ * s=$1
+ * shift
+ * for i
+ * do
+ * if [[ $s -eq $i ]]
+ * then
+ * return 0
+ * fi
+ * done
+ * return 1
+ * }
+ *
+ * IFS=$IFS,
+ *
+ * if (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_3410` &&
+ * scan $PRODUCT_ID 13328 `cat $PARAM_PATH/product_3410`) ||
+ * (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_5052` &&
+ * scan $PRODUCT_ID 20562 20818 20570 20575 `cat $PARAM_PATH/product_5052`)
+ * then
+ * echo $ACTIVE_CONFIG > $CONFIG_PATH
+ * fi
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/ioctl.h>
+#include <linux/serial.h>
+#include <linux/circ_buf.h>
+#include <asm/uaccess.h>
+#include <asm/semaphore.h>
+#include <linux/usb.h>
+
+#include "usb-serial.h"
+#include "ti_usb_3410_5052.h"
+#include "ti_fw_3410.h" /* firmware image for 3410 */
+#include "ti_fw_5052.h" /* firmware image for 5052 */
+
+
+/* Defines */
+
+#define TI_DRIVER_VERSION "v0.9"
+#define TI_DRIVER_AUTHOR "Al Borchers <alborchers@steinerpoint.com>"
+#define TI_DRIVER_DESC "TI USB 3410/5052 Serial Driver"
+
+#define TI_FIRMWARE_BUF_SIZE 16284
+
+#define TI_WRITE_BUF_SIZE 1024
+
+#define TI_TRANSFER_TIMEOUT 2
+
+#define TI_DEFAULT_LOW_LATENCY 0
+#define TI_DEFAULT_CLOSING_WAIT 4000 /* in .01 secs */
+
+/* supported setserial flags */
+#define TI_SET_SERIAL_FLAGS (ASYNC_LOW_LATENCY)
+
+/* read urb states */
+#define TI_READ_URB_RUNNING 0
+#define TI_READ_URB_STOPPING 1
+#define TI_READ_URB_STOPPED 2
+
+#define TI_EXTRA_VID_PID_COUNT 5
+
+
+/* Structures */
+
+struct ti_port {
+ int tp_is_open;
+ __u8 tp_msr;
+ __u8 tp_lsr;
+ __u8 tp_shadow_mcr;
+ __u8 tp_uart_mode; /* 232 or 485 modes */
+ unsigned int tp_uart_base_addr;
+ int tp_flags;
+ int tp_closing_wait;/* in .01 secs */
+ struct async_icount tp_icount;
+ wait_queue_head_t tp_msr_wait; /* wait for msr change */
+ wait_queue_head_t tp_write_wait;
+ struct ti_device *tp_tdev;
+ struct usb_serial_port *tp_port;
+ spinlock_t tp_lock;
+ int tp_read_urb_state;
+ int tp_write_urb_in_use;
+ struct circ_buf *tp_write_buf;
+};
+
+struct ti_device {
+ struct semaphore td_open_close_sem;
+ int td_open_port_count;
+ struct usb_serial *td_serial;
+ int td_is_3410;
+ int td_urb_error;
+};
+
+
+/* Function Declarations */
+
+static int ti_startup(struct usb_serial *serial);
+static void ti_shutdown(struct usb_serial *serial);
+static int ti_open(struct usb_serial_port *port, struct file *file);
+static void ti_close(struct usb_serial_port *port, struct file *file);
+static int ti_write(struct usb_serial_port *port, const unsigned char *data,
+ int count);
+static int ti_write_room(struct usb_serial_port *port);
+static int ti_chars_in_buffer(struct usb_serial_port *port);
+static void ti_throttle(struct usb_serial_port *port);
+static void ti_unthrottle(struct usb_serial_port *port);
+static int ti_ioctl(struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg);
+static void ti_set_termios(struct usb_serial_port *port,
+ struct termios *old_termios);
+static int ti_tiocmget(struct usb_serial_port *port, struct file *file);
+static int ti_tiocmset(struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear);
+static void ti_break(struct usb_serial_port *port, int break_state);
+static void ti_interrupt_callback(struct urb *urb, struct pt_regs *regs);
+static void ti_bulk_in_callback(struct urb *urb, struct pt_regs *regs);
+static void ti_bulk_out_callback(struct urb *urb, struct pt_regs *regs);
+
+static void ti_recv(struct device *dev, struct tty_struct *tty,
+ unsigned char *data, int length);
+static void ti_send(struct ti_port *tport);
+static int ti_set_mcr(struct ti_port *tport, unsigned int mcr);
+static int ti_get_lsr(struct ti_port *tport);
+static int ti_get_serial_info(struct ti_port *tport,
+ struct serial_struct __user *ret_arg);
+static int ti_set_serial_info(struct ti_port *tport,
+ struct serial_struct __user *new_arg);
+static void ti_handle_new_msr(struct ti_port *tport, __u8 msr);
+
+static void ti_drain(struct ti_port *tport, unsigned long timeout, int flush);
+
+static void ti_stop_read(struct ti_port *tport, struct tty_struct *tty);
+static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty);
+
+static int ti_command_out_sync(struct ti_device *tdev, __u8 command,
+ __u16 moduleid, __u16 value, __u8 *data, int size);
+static int ti_command_in_sync(struct ti_device *tdev, __u8 command,
+ __u16 moduleid, __u16 value, __u8 *data, int size);
+
+static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
+ __u8 mask, __u8 byte);
+
+static int ti_download_firmware(struct ti_device *tdev,
+ unsigned char *firmware, unsigned int firmware_size);
+
+/* circular buffer */
+static struct circ_buf *ti_buf_alloc(void);
+static void ti_buf_free(struct circ_buf *cb);
+static void ti_buf_clear(struct circ_buf *cb);
+static int ti_buf_data_avail(struct circ_buf *cb);
+static int ti_buf_space_avail(struct circ_buf *cb);
+static int ti_buf_put(struct circ_buf *cb, const char *buf, int count);
+static int ti_buf_get(struct circ_buf *cb, char *buf, int count);
+
+
+/* Data */
+
+/* module parameters */
+static int debug;
+static int low_latency = TI_DEFAULT_LOW_LATENCY;
+static int closing_wait = TI_DEFAULT_CLOSING_WAIT;
+static ushort vendor_3410[TI_EXTRA_VID_PID_COUNT];
+static int vendor_3410_count;
+static ushort product_3410[TI_EXTRA_VID_PID_COUNT];
+static int product_3410_count;
+static ushort vendor_5052[TI_EXTRA_VID_PID_COUNT];
+static int vendor_5052_count;
+static ushort product_5052[TI_EXTRA_VID_PID_COUNT];
+static int product_5052_count;
+
+/* supported devices */
+/* the array dimension is the number of default entries plus */
+/* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */
+/* null entry */
+static struct usb_device_id ti_id_table_3410[1+TI_EXTRA_VID_PID_COUNT+1] = {
+ { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
+};
+
+static struct usb_device_id ti_id_table_5052[4+TI_EXTRA_VID_PID_COUNT+1] = {
+ { USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },
+ { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },
+ { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
+ { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) },
+};
+
+static struct usb_device_id ti_id_table_combined[] = {
+ { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
+ { USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },
+ { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },
+ { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
+ { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) },
+ { }
+};
+
+static struct usb_driver ti_usb_driver = {
+ .owner = THIS_MODULE,
+ .name = "ti_usb_3410_5052",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = ti_id_table_combined,
+};
+
+static struct usb_serial_device_type ti_1port_device = {
+ .owner = THIS_MODULE,
+ .name = "TI USB 3410 1 port adapter",
+ .id_table = ti_id_table_3410,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
+ .num_ports = 1,
+ .attach = ti_startup,
+ .shutdown = ti_shutdown,
+ .open = ti_open,
+ .close = ti_close,
+ .write = ti_write,
+ .write_room = ti_write_room,
+ .chars_in_buffer = ti_chars_in_buffer,
+ .throttle = ti_throttle,
+ .unthrottle = ti_unthrottle,
+ .ioctl = ti_ioctl,
+ .set_termios = ti_set_termios,
+ .tiocmget = ti_tiocmget,
+ .tiocmset = ti_tiocmset,
+ .break_ctl = ti_break,
+ .read_int_callback = ti_interrupt_callback,
+ .read_bulk_callback = ti_bulk_in_callback,
+ .write_bulk_callback = ti_bulk_out_callback,
+};
+
+static struct usb_serial_device_type ti_2port_device = {
+ .owner = THIS_MODULE,
+ .name = "TI USB 5052 2 port adapter",
+ .id_table = ti_id_table_5052,
+ .num_interrupt_in = 1,
+ .num_bulk_in = 2,
+ .num_bulk_out = 2,
+ .num_ports = 2,
+ .attach = ti_startup,
+ .shutdown = ti_shutdown,
+ .open = ti_open,
+ .close = ti_close,
+ .write = ti_write,
+ .write_room = ti_write_room,
+ .chars_in_buffer = ti_chars_in_buffer,
+ .throttle = ti_throttle,
+ .unthrottle = ti_unthrottle,
+ .ioctl = ti_ioctl,
+ .set_termios = ti_set_termios,
+ .tiocmget = ti_tiocmget,
+ .tiocmset = ti_tiocmset,
+ .break_ctl = ti_break,
+ .read_int_callback = ti_interrupt_callback,
+ .read_bulk_callback = ti_bulk_in_callback,
+ .write_bulk_callback = ti_bulk_out_callback,
+};
+
+
+/* Module */
+
+MODULE_AUTHOR(TI_DRIVER_AUTHOR);
+MODULE_DESCRIPTION(TI_DRIVER_DESC);
+MODULE_VERSION(TI_DRIVER_VERSION);
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Enable debugging, 0=no, 1=yes");
+
+module_param(low_latency, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(low_latency, "TTY low_latency flag, 0=off, 1=on, default is off");
+
+module_param(closing_wait, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(closing_wait, "Maximum wait for data to drain in close, in .01 secs, default is 4000");
+
+module_param_array(vendor_3410, ushort, &vendor_3410_count, S_IRUGO);
+MODULE_PARM_DESC(vendor_3410, "Vendor ids for 3410 based devices, 1-5 short integers");
+module_param_array(product_3410, ushort, &product_3410_count, S_IRUGO);
+MODULE_PARM_DESC(product_3410, "Product ids for 3410 based devices, 1-5 short integers");
+module_param_array(vendor_5052, ushort, &vendor_5052_count, S_IRUGO);
+MODULE_PARM_DESC(vendor_5052, "Vendor ids for 5052 based devices, 1-5 short integers");
+module_param_array(product_5052, ushort, &product_5052_count, S_IRUGO);
+MODULE_PARM_DESC(product_5052, "Product ids for 5052 based devices, 1-5 short integers");
+
+MODULE_DEVICE_TABLE(usb, ti_id_table_combined);
+
+
+/* Functions */
+
+static int __init ti_init(void)
+{
+ int i,j;
+ int ret;
+
+
+ /* insert extra vendor and product ids */
+ j = sizeof(ti_id_table_3410)/sizeof(struct usb_device_id)
+ - TI_EXTRA_VID_PID_COUNT - 1;
+ for (i=0; i<min(vendor_3410_count,product_3410_count); i++,j++) {
+ ti_id_table_3410[j].idVendor = vendor_3410[i];
+ ti_id_table_3410[j].idProduct = product_3410[i];
+ ti_id_table_3410[j].match_flags = USB_DEVICE_ID_MATCH_DEVICE;
+ }
+ j = sizeof(ti_id_table_5052)/sizeof(struct usb_device_id)
+ - TI_EXTRA_VID_PID_COUNT - 1;
+ for (i=0; i<min(vendor_5052_count,product_5052_count); i++,j++) {
+ ti_id_table_5052[j].idVendor = vendor_5052[i];
+ ti_id_table_5052[j].idProduct = product_5052[i];
+ ti_id_table_5052[j].match_flags = USB_DEVICE_ID_MATCH_DEVICE;
+ }
+
+ ret = usb_serial_register(&ti_1port_device);
+ if (ret)
+ goto failed_1port;
+ ret = usb_serial_register(&ti_2port_device);
+ if (ret)
+ goto failed_2port;
+
+ ret = usb_register(&ti_usb_driver);
+ if (ret)
+ goto failed_usb;
+
+ info(TI_DRIVER_DESC " " TI_DRIVER_VERSION);
+
+ return 0;
+
+failed_usb:
+ usb_serial_deregister(&ti_2port_device);
+failed_2port:
+ usb_serial_deregister(&ti_1port_device);
+failed_1port:
+ return ret;
+}
+
+
+static void __exit ti_exit(void)
+{
+ usb_serial_deregister(&ti_1port_device);
+ usb_serial_deregister(&ti_2port_device);
+ usb_deregister(&ti_usb_driver);
+}
+
+
+module_init(ti_init);
+module_exit(ti_exit);
+
+
+static int ti_startup(struct usb_serial *serial)
+{
+ struct ti_device *tdev;
+ struct ti_port *tport;
+ struct usb_device *dev = serial->dev;
+ int status;
+ int i;
+
+
+ dbg("%s - product 0x%4X, num configurations %d, configuration value %d",
+ __FUNCTION__, le16_to_cpu(dev->descriptor.idProduct),
+ dev->descriptor.bNumConfigurations,
+ dev->actconfig->desc.bConfigurationValue);
+
+ /* create device structure */
+ tdev = kmalloc(sizeof(struct ti_device), GFP_KERNEL);
+ if (tdev == NULL) {
+ dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+ memset(tdev, 0, sizeof(struct ti_device));
+ sema_init(&tdev->td_open_close_sem, 1);
+ tdev->td_serial = serial;
+ usb_set_serial_data(serial, tdev);
+
+ /* determine device type */
+ if (usb_match_id(serial->interface, ti_id_table_3410))
+ tdev->td_is_3410 = 1;
+ dbg("%s - device type is %s", __FUNCTION__, tdev->td_is_3410 ? "3410" : "5052");
+
+ /* if we have only 1 configuration, download firmware */
+ if (dev->descriptor.bNumConfigurations == 1) {
+
+ if (tdev->td_is_3410)
+ status = ti_download_firmware(tdev, ti_fw_3410,
+ sizeof(ti_fw_3410));
+ else
+ status = ti_download_firmware(tdev, ti_fw_5052,
+ sizeof(ti_fw_5052));
+ if (status)
+ goto free_tdev;
+
+ /* 3410 must be reset, 5052 resets itself */
+ if (tdev->td_is_3410) {
+ msleep_interruptible(100);
+ usb_reset_device(dev);
+ }
+
+ status = -ENODEV;
+ goto free_tdev;
+ }
+
+ /* the second configuration must be set (in sysfs by hotplug script) */
+ if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) {
+ status = -ENODEV;
+ goto free_tdev;
+ }
+
+ /* set up port structures */
+ for (i = 0; i < serial->num_ports; ++i) {
+ tport = kmalloc(sizeof(struct ti_port), GFP_KERNEL);
+ if (tport == NULL) {
+ dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+ status = -ENOMEM;
+ goto free_tports;
+ }
+ memset(tport, 0, sizeof(struct ti_port));
+ spin_lock_init(&tport->tp_lock);
+ tport->tp_uart_base_addr = (i == 0 ? TI_UART1_BASE_ADDR : TI_UART2_BASE_ADDR);
+ tport->tp_flags = low_latency ? ASYNC_LOW_LATENCY : 0;
+ tport->tp_closing_wait = closing_wait;
+ init_waitqueue_head(&tport->tp_msr_wait);
+ init_waitqueue_head(&tport->tp_write_wait);
+ tport->tp_write_buf = ti_buf_alloc();
+ if (tport->tp_write_buf == NULL) {
+ dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+ kfree(tport);
+ status = -ENOMEM;
+ goto free_tports;
+ }
+ tport->tp_port = serial->port[i];
+ tport->tp_tdev = tdev;
+ usb_set_serial_port_data(serial->port[i], tport);
+ tport->tp_uart_mode = 0; /* default is RS232 */
+ }
+
+ return 0;
+
+free_tports:
+ for (--i; i>=0; --i) {
+ tport = usb_get_serial_port_data(serial->port[i]);
+ ti_buf_free(tport->tp_write_buf);
+ kfree(tport);
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+free_tdev:
+ kfree(tdev);
+ usb_set_serial_data(serial, NULL);
+ return status;
+}
+
+
+static void ti_shutdown(struct usb_serial *serial)
+{
+ int i;
+ struct ti_device *tdev = usb_get_serial_data(serial);
+ struct ti_port *tport;
+
+ dbg("%s", __FUNCTION__);
+
+ for (i=0; i < serial->num_ports; ++i) {
+ tport = usb_get_serial_port_data(serial->port[i]);
+ if (tport) {
+ ti_buf_free(tport->tp_write_buf);
+ kfree(tport);
+ usb_set_serial_port_data(serial->port[i], NULL);
+ }
+ }
+
+ if (tdev)
+ kfree(tdev);
+ usb_set_serial_data(serial, NULL);
+}
+
+
+static int ti_open(struct usb_serial_port *port, struct file *file)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ struct ti_device *tdev;
+ struct usb_device *dev;
+ struct urb *urb;
+ int port_number;
+ int status;
+ __u16 open_settings = (__u8)(TI_PIPE_MODE_CONTINOUS |
+ TI_PIPE_TIMEOUT_ENABLE |
+ (TI_TRANSFER_TIMEOUT << 2));
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (tport == NULL)
+ return -ENODEV;
+
+ dev = port->serial->dev;
+ tdev = tport->tp_tdev;
+
+ /* only one open on any port on a device at a time */
+ if (down_interruptible(&tdev->td_open_close_sem))
+ return -ERESTARTSYS;
+
+ if (port->tty)
+ port->tty->low_latency =
+ (tport->tp_flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+
+ port_number = port->number - port->serial->minor;
+
+ memset(&(tport->tp_icount), 0x00, sizeof(tport->tp_icount));
+
+ tport->tp_msr = 0;
+ tport->tp_shadow_mcr |= (TI_MCR_RTS | TI_MCR_DTR);
+
+ /* start interrupt urb the first time a port is opened on this device */
+ if (tdev->td_open_port_count == 0) {
+ dbg("%s - start interrupt in urb", __FUNCTION__);
+ urb = tdev->td_serial->port[0]->interrupt_in_urb;
+ if (!urb) {
+ dev_err(&port->dev, "%s - no interrupt urb\n", __FUNCTION__);
+ status = -EINVAL;
+ goto up_sem;
+ }
+ urb->complete = ti_interrupt_callback;
+ urb->context = tdev;
+ urb->dev = dev;
+ status = usb_submit_urb(urb, GFP_KERNEL);
+ if (status) {
+ dev_err(&port->dev, "%s - submit interrupt urb failed, %d\n", __FUNCTION__, status);
+ goto up_sem;
+ }
+ }
+
+ ti_set_termios(port, NULL);
+
+ dbg("%s - sending TI_OPEN_PORT", __FUNCTION__);
+ status = ti_command_out_sync(tdev, TI_OPEN_PORT,
+ (__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
+ if (status) {
+ dev_err(&port->dev, "%s - cannot send open command, %d\n", __FUNCTION__, status);
+ goto unlink_int_urb;
+ }
+
+ dbg("%s - sending TI_START_PORT", __FUNCTION__);
+ status = ti_command_out_sync(tdev, TI_START_PORT,
+ (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
+ if (status) {
+ dev_err(&port->dev, "%s - cannot send start command, %d\n", __FUNCTION__, status);
+ goto unlink_int_urb;
+ }
+
+ dbg("%s - sending TI_PURGE_PORT", __FUNCTION__);
+ status = ti_command_out_sync(tdev, TI_PURGE_PORT,
+ (__u8)(TI_UART1_PORT + port_number), TI_PURGE_INPUT, NULL, 0);
+ if (status) {
+ dev_err(&port->dev, "%s - cannot clear input buffers, %d\n", __FUNCTION__, status);
+ goto unlink_int_urb;
+ }
+ status = ti_command_out_sync(tdev, TI_PURGE_PORT,
+ (__u8)(TI_UART1_PORT + port_number), TI_PURGE_OUTPUT, NULL, 0);
+ if (status) {
+ dev_err(&port->dev, "%s - cannot clear output buffers, %d\n", __FUNCTION__, status);
+ goto unlink_int_urb;
+ }
+
+ /* reset the data toggle on the bulk endpoints to work around bug in
+ * host controllers where things get out of sync some times */
+ usb_clear_halt(dev, port->write_urb->pipe);
+ usb_clear_halt(dev, port->read_urb->pipe);
+
+ ti_set_termios(port, NULL);
+
+ dbg("%s - sending TI_OPEN_PORT (2)", __FUNCTION__);
+ status = ti_command_out_sync(tdev, TI_OPEN_PORT,
+ (__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
+ if (status) {
+ dev_err(&port->dev, "%s - cannot send open command (2), %d\n", __FUNCTION__, status);
+ goto unlink_int_urb;
+ }
+
+ dbg("%s - sending TI_START_PORT (2)", __FUNCTION__);
+ status = ti_command_out_sync(tdev, TI_START_PORT,
+ (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
+ if (status) {
+ dev_err(&port->dev, "%s - cannot send start command (2), %d\n", __FUNCTION__, status);
+ goto unlink_int_urb;
+ }
+
+ /* start read urb */
+ dbg("%s - start read urb", __FUNCTION__);
+ urb = port->read_urb;
+ if (!urb) {
+ dev_err(&port->dev, "%s - no read urb\n", __FUNCTION__);
+ status = -EINVAL;
+ goto unlink_int_urb;
+ }
+ tport->tp_read_urb_state = TI_READ_URB_RUNNING;
+ urb->complete = ti_bulk_in_callback;
+ urb->context = tport;
+ urb->dev = dev;
+ status = usb_submit_urb(urb, GFP_KERNEL);
+ if (status) {
+ dev_err(&port->dev, "%s - submit read urb failed, %d\n", __FUNCTION__, status);
+ goto unlink_int_urb;
+ }
+
+ tport->tp_is_open = 1;
+ ++tdev->td_open_port_count;
+
+ goto up_sem;
+
+unlink_int_urb:
+ if (tdev->td_open_port_count == 0)
+ usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
+up_sem:
+ up(&tdev->td_open_close_sem);
+ dbg("%s - exit %d", __FUNCTION__, status);
+ return status;
+}
+
+
+static void ti_close(struct usb_serial_port *port, struct file *file)
+{
+ struct ti_device *tdev;
+ struct ti_port *tport;
+ int port_number;
+ int status;
+ int do_up;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ tdev = usb_get_serial_data(port->serial);
+ tport = usb_get_serial_port_data(port);
+ if (tdev == NULL || tport == NULL)
+ return;
+
+ tport->tp_is_open = 0;
+
+ ti_drain(tport, (tport->tp_closing_wait*HZ)/100, 1);
+
+ usb_kill_urb(port->read_urb);
+ usb_kill_urb(port->write_urb);
+ tport->tp_write_urb_in_use = 0;
+
+ port_number = port->number - port->serial->minor;
+
+ dbg("%s - sending TI_CLOSE_PORT", __FUNCTION__);
+ status = ti_command_out_sync(tdev, TI_CLOSE_PORT,
+ (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
+ if (status)
+ dev_err(&port->dev, "%s - cannot send close port command, %d\n" , __FUNCTION__, status);
+
+ /* if down is interrupted, continue anyway */
+ do_up = !down_interruptible(&tdev->td_open_close_sem);
+ --tport->tp_tdev->td_open_port_count;
+ if (tport->tp_tdev->td_open_port_count <= 0) {
+ /* last port is closed, shut down interrupt urb */
+ usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
+ tport->tp_tdev->td_open_port_count = 0;
+ }
+ if (do_up)
+ up(&tdev->td_open_close_sem);
+
+ dbg("%s - exit", __FUNCTION__);
+}
+
+
+static int ti_write(struct usb_serial_port *port, const unsigned char *data,
+ int count)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (count == 0) {
+ dbg("%s - write request of 0 bytes", __FUNCTION__);
+ return 0;
+ }
+
+ if (tport == NULL || !tport->tp_is_open)
+ return -ENODEV;
+
+ spin_lock_irqsave(&tport->tp_lock, flags);
+ count = ti_buf_put(tport->tp_write_buf, data, count);
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+ ti_send(tport);
+
+ return count;
+}
+
+
+static int ti_write_room(struct usb_serial_port *port)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ int room = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (tport == NULL)
+ return -ENODEV;
+
+ spin_lock_irqsave(&tport->tp_lock, flags);
+ room = ti_buf_space_avail(tport->tp_write_buf);
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, room);
+ return room;
+}
+
+
+static int ti_chars_in_buffer(struct usb_serial_port *port)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ int chars = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (tport == NULL)
+ return -ENODEV;
+
+ spin_lock_irqsave(&tport->tp_lock, flags);
+ chars = ti_buf_data_avail(tport->tp_write_buf);
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+ dbg("%s - returns %d", __FUNCTION__, chars);
+ return chars;
+}
+
+
+static void ti_throttle(struct usb_serial_port *port)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ struct tty_struct *tty;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (tport == NULL)
+ return;
+
+ tty = port->tty;
+ if (!tty) {
+ dbg("%s - no tty", __FUNCTION__);
+ return;
+ }
+
+ if (I_IXOFF(tty) || C_CRTSCTS(tty))
+ ti_stop_read(tport, tty);
+
+}
+
+
+static void ti_unthrottle(struct usb_serial_port *port)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ struct tty_struct *tty;
+ int status;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (tport == NULL)
+ return;
+
+ tty = port->tty;
+ if (!tty) {
+ dbg("%s - no tty", __FUNCTION__);
+ return;
+ }
+
+ if (I_IXOFF(tty) || C_CRTSCTS(tty)) {
+ status = ti_restart_read(tport, tty);
+ if (status)
+ dev_err(&port->dev, "%s - cannot restart read, %d\n", __FUNCTION__, status);
+ }
+}
+
+
+static int ti_ioctl(struct usb_serial_port *port, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ struct async_icount cnow;
+ struct async_icount cprev;
+
+ dbg("%s - port %d, cmd = 0x%04X", __FUNCTION__, port->number, cmd);
+
+ if (tport == NULL)
+ return -ENODEV;
+
+ switch (cmd) {
+ case TIOCGSERIAL:
+ dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number);
+ return ti_get_serial_info(tport, (struct serial_struct __user *)arg);
+ break;
+
+ case TIOCSSERIAL:
+ dbg("%s - (%d) TIOCSSERIAL", __FUNCTION__, port->number);
+ return ti_set_serial_info(tport, (struct serial_struct __user *)arg);
+ break;
+
+ case TIOCMIWAIT:
+ dbg("%s - (%d) TIOCMIWAIT", __FUNCTION__, port->number);
+ cprev = tport->tp_icount;
+ while (1) {
+ interruptible_sleep_on(&tport->tp_msr_wait);
+ if (signal_pending(current))
+ return -ERESTARTSYS;
+ cnow = tport->tp_icount;
+ if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
+ cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
+ return -EIO; /* no change => error */
+ if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+ ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+ ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
+ ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) {
+ return 0;
+ }
+ cprev = cnow;
+ }
+ break;
+
+ case TIOCGICOUNT:
+ dbg("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, port->number, tport->tp_icount.rx, tport->tp_icount.tx);
+ if (copy_to_user((void __user *)arg, &tport->tp_icount, sizeof(tport->tp_icount)))
+ return -EFAULT;
+ return 0;
+ }
+
+ return -ENOIOCTLCMD;
+}
+
+
+static void ti_set_termios(struct usb_serial_port *port,
+ struct termios *old_termios)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ struct tty_struct *tty = port->tty;
+ struct ti_uart_config *config;
+ tcflag_t cflag,iflag;
+ int baud;
+ int status;
+ int port_number = port->number - port->serial->minor;
+ unsigned int mcr;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (!tty || !tty->termios) {
+ dbg("%s - no tty or termios", __FUNCTION__);
+ return;
+ }
+
+ cflag = tty->termios->c_cflag;
+ iflag = tty->termios->c_iflag;
+
+ if (old_termios && cflag == old_termios->c_cflag
+ && iflag == old_termios->c_iflag) {
+ dbg("%s - nothing to change", __FUNCTION__);
+ return;
+ }
+
+ dbg("%s - clfag %08x, iflag %08x", __FUNCTION__, cflag, iflag);
+
+ if (old_termios)
+ dbg("%s - old clfag %08x, old iflag %08x", __FUNCTION__, old_termios->c_cflag, old_termios->c_iflag);
+
+ if (tport == NULL)
+ return;
+
+ config = kmalloc(sizeof(*config), GFP_KERNEL);
+ if (!config) {
+ dev_err(&port->dev, "%s - out of memory\n", __FUNCTION__);
+ return;
+ }
+
+ config->wFlags = 0;
+
+ /* these flags must be set */
+ config->wFlags |= TI_UART_ENABLE_MS_INTS;
+ config->wFlags |= TI_UART_ENABLE_AUTO_START_DMA;
+ config->bUartMode = (__u8)(tport->tp_uart_mode);
+
+ switch (cflag & CSIZE) {
+ case CS5:
+ config->bDataBits = TI_UART_5_DATA_BITS;
+ break;
+ case CS6:
+ config->bDataBits = TI_UART_6_DATA_BITS;
+ break;
+ case CS7:
+ config->bDataBits = TI_UART_7_DATA_BITS;
+ break;
+ default:
+ case CS8:
+ config->bDataBits = TI_UART_8_DATA_BITS;
+ break;
+ }
+
+ if (cflag & PARENB) {
+ if (cflag & PARODD) {
+ config->wFlags |= TI_UART_ENABLE_PARITY_CHECKING;
+ config->bParity = TI_UART_ODD_PARITY;
+ } else {
+ config->wFlags |= TI_UART_ENABLE_PARITY_CHECKING;
+ config->bParity = TI_UART_EVEN_PARITY;
+ }
+ } else {
+ config->wFlags &= ~TI_UART_ENABLE_PARITY_CHECKING;
+ config->bParity = TI_UART_NO_PARITY;
+ }
+
+ if (cflag & CSTOPB)
+ config->bStopBits = TI_UART_2_STOP_BITS;
+ else
+ config->bStopBits = TI_UART_1_STOP_BITS;
+
+ if (cflag & CRTSCTS) {
+ /* RTS flow control must be off to drop RTS for baud rate B0 */
+ if ((cflag & CBAUD) != B0)
+ config->wFlags |= TI_UART_ENABLE_RTS_IN;
+ config->wFlags |= TI_UART_ENABLE_CTS_OUT;
+ } else {
+ tty->hw_stopped = 0;
+ ti_restart_read(tport, tty);
+ }
+
+ if (I_IXOFF(tty) || I_IXON(tty)) {
+ config->cXon = START_CHAR(tty);
+ config->cXoff = STOP_CHAR(tty);
+
+ if (I_IXOFF(tty))
+ config->wFlags |= TI_UART_ENABLE_X_IN;
+ else
+ ti_restart_read(tport, tty);
+
+ if (I_IXON(tty))
+ config->wFlags |= TI_UART_ENABLE_X_OUT;
+ }
+
+ baud = tty_get_baud_rate(tty);
+ if (!baud) baud = 9600;
+ if (tport->tp_tdev->td_is_3410)
+ config->wBaudRate = (__u16)((923077 + baud/2) / baud);
+ else
+ config->wBaudRate = (__u16)((461538 + baud/2) / baud);
+
+ dbg("%s - BaudRate=%d, wBaudRate=%d, wFlags=0x%04X, bDataBits=%d, bParity=%d, bStopBits=%d, cXon=%d, cXoff=%d, bUartMode=%d",
+ __FUNCTION__, baud, config->wBaudRate, config->wFlags, config->bDataBits, config->bParity, config->bStopBits, config->cXon, config->cXoff, config->bUartMode);
+
+ cpu_to_be16s(&config->wBaudRate);
+ cpu_to_be16s(&config->wFlags);
+
+ status = ti_command_out_sync(tport->tp_tdev, TI_SET_CONFIG,
+ (__u8)(TI_UART1_PORT + port_number), 0, (__u8 *)config,
+ sizeof(*config));
+ if (status)
+ dev_err(&port->dev, "%s - cannot set config on port %d, %d\n", __FUNCTION__, port_number, status);
+
+ /* SET_CONFIG asserts RTS and DTR, reset them correctly */
+ mcr = tport->tp_shadow_mcr;
+ /* if baud rate is B0, clear RTS and DTR */
+ if ((cflag & CBAUD) == B0)
+ mcr &= ~(TI_MCR_DTR | TI_MCR_RTS);
+ status = ti_set_mcr(tport, mcr);
+ if (status)
+ dev_err(&port->dev, "%s - cannot set modem control on port %d, %d\n", __FUNCTION__, port_number, status);
+
+ kfree(config);
+}
+
+
+static int ti_tiocmget(struct usb_serial_port *port, struct file *file)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ unsigned int result;
+ unsigned int msr;
+ unsigned int mcr;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (tport == NULL)
+ return -ENODEV;
+
+ msr = tport->tp_msr;
+ mcr = tport->tp_shadow_mcr;
+
+ result = ((mcr & TI_MCR_DTR) ? TIOCM_DTR : 0)
+ | ((mcr & TI_MCR_RTS) ? TIOCM_RTS : 0)
+ | ((mcr & TI_MCR_LOOP) ? TIOCM_LOOP : 0)
+ | ((msr & TI_MSR_CTS) ? TIOCM_CTS : 0)
+ | ((msr & TI_MSR_CD) ? TIOCM_CAR : 0)
+ | ((msr & TI_MSR_RI) ? TIOCM_RI : 0)
+ | ((msr & TI_MSR_DSR) ? TIOCM_DSR : 0);
+
+ dbg("%s - 0x%04X", __FUNCTION__, result);
+
+ return result;
+}
+
+
+static int ti_tiocmset(struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ unsigned int mcr;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (tport == NULL)
+ return -ENODEV;
+
+ mcr = tport->tp_shadow_mcr;
+
+ if (set & TIOCM_RTS)
+ mcr |= TI_MCR_RTS;
+ if (set & TIOCM_DTR)
+ mcr |= TI_MCR_DTR;
+ if (set & TIOCM_LOOP)
+ mcr |= TI_MCR_LOOP;
+
+ if (clear & TIOCM_RTS)
+ mcr &= ~TI_MCR_RTS;
+ if (clear & TIOCM_DTR)
+ mcr &= ~TI_MCR_DTR;
+ if (clear & TIOCM_LOOP)
+ mcr &= ~TI_MCR_LOOP;
+
+ return ti_set_mcr(tport, mcr);
+}
+
+
+static void ti_break(struct usb_serial_port *port, int break_state)
+{
+ struct ti_port *tport = usb_get_serial_port_data(port);
+ int status;
+
+ dbg("%s - state = %d", __FUNCTION__, break_state);
+
+ if (tport == NULL)
+ return;
+
+ ti_drain(tport, (tport->tp_closing_wait*HZ)/100, 0);
+
+ status = ti_write_byte(tport->tp_tdev,
+ tport->tp_uart_base_addr + TI_UART_OFFSET_LCR,
+ TI_LCR_BREAK, break_state == -1 ? TI_LCR_BREAK : 0);
+
+ if (status)
+ dbg("%s - error setting break, %d", __FUNCTION__, status);
+}
+
+
+static void ti_interrupt_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct ti_device *tdev = (struct ti_device *)urb->context;
+ struct usb_serial_port *port;
+ struct usb_serial *serial = tdev->td_serial;
+ struct ti_port *tport;
+ struct device *dev = &urb->dev->dev;
+ unsigned char *data = urb->transfer_buffer;
+ int length = urb->actual_length;
+ int port_number;
+ int function;
+ int status;
+ __u8 msr;
+
+ dbg("%s", __FUNCTION__);
+
+ switch (urb->status) {
+ case 0:
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ dbg("%s - urb shutting down, %d", __FUNCTION__, urb->status);
+ tdev->td_urb_error = 1;
+ return;
+ default:
+ dev_err(dev, "%s - nonzero urb status, %d\n", __FUNCTION__, urb->status);
+ tdev->td_urb_error = 1;
+ goto exit;
+ }
+
+ if (length != 2) {
+ dbg("%s - bad packet size, %d", __FUNCTION__, length);
+ goto exit;
+ }
+
+ if (data[0] == TI_CODE_HARDWARE_ERROR) {
+ dev_err(dev, "%s - hardware error, %d\n", __FUNCTION__, data[1]);
+ goto exit;
+ }
+
+ port_number = TI_GET_PORT_FROM_CODE(data[0]);
+ function = TI_GET_FUNC_FROM_CODE(data[0]);
+
+ dbg("%s - port_number %d, function %d, data 0x%02X", __FUNCTION__, port_number, function, data[1]);
+
+ if (port_number >= serial->num_ports) {
+ dev_err(dev, "%s - bad port number, %d\n", __FUNCTION__, port_number);
+ goto exit;
+ }
+
+ port = serial->port[port_number];
+
+ tport = usb_get_serial_port_data(port);
+ if (!tport)
+ goto exit;
+
+ switch (function) {
+ case TI_CODE_DATA_ERROR:
+ dev_err(dev, "%s - DATA ERROR, port %d, data 0x%02X\n", __FUNCTION__, port_number, data[1]);
+ break;
+
+ case TI_CODE_MODEM_STATUS:
+ msr = data[1];
+ dbg("%s - port %d, msr 0x%02X", __FUNCTION__, port_number, msr);
+ ti_handle_new_msr(tport, msr);
+ break;
+
+ default:
+ dev_err(dev, "%s - unknown interrupt code, 0x%02X\n", __FUNCTION__, data[1]);
+ break;
+ }
+
+exit:
+ status = usb_submit_urb(urb, GFP_ATOMIC);
+ if (status)
+ dev_err(dev, "%s - resubmit interrupt urb failed, %d\n", __FUNCTION__, status);
+}
+
+
+static void ti_bulk_in_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct ti_port *tport = (struct ti_port *)urb->context;
+ struct usb_serial_port *port = tport->tp_port;
+ struct device *dev = &urb->dev->dev;
+ int status = 0;
+
+ dbg("%s", __FUNCTION__);
+
+ switch (urb->status) {
+ case 0:
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ dbg("%s - urb shutting down, %d", __FUNCTION__, urb->status);
+ tport->tp_tdev->td_urb_error = 1;
+ wake_up_interruptible(&tport->tp_write_wait);
+ return;
+ default:
+ dev_err(dev, "%s - nonzero urb status, %d\n", __FUNCTION__, urb->status );
+ tport->tp_tdev->td_urb_error = 1;
+ wake_up_interruptible(&tport->tp_write_wait);
+ }
+
+ if (urb->status == -EPIPE)
+ goto exit;
+
+ if (urb->status) {
+ dev_err(dev, "%s - stopping read!\n", __FUNCTION__);
+ return;
+ }
+
+ if (port->tty && urb->actual_length) {
+ usb_serial_debug_data(debug, dev, __FUNCTION__,
+ urb->actual_length, urb->transfer_buffer);
+
+ if (!tport->tp_is_open)
+ dbg("%s - port closed, dropping data", __FUNCTION__);
+ else
+ ti_recv(&urb->dev->dev, port->tty, urb->transfer_buffer,
+ urb->actual_length);
+
+ spin_lock(&tport->tp_lock);
+ tport->tp_icount.rx += urb->actual_length;
+ spin_unlock(&tport->tp_lock);
+ }
+
+exit:
+ /* continue to read unless stopping */
+ spin_lock(&tport->tp_lock);
+ if (tport->tp_read_urb_state == TI_READ_URB_RUNNING) {
+ urb->dev = port->serial->dev;
+ status = usb_submit_urb(urb, GFP_ATOMIC);
+ } else if (tport->tp_read_urb_state == TI_READ_URB_STOPPING) {
+ tport->tp_read_urb_state = TI_READ_URB_STOPPED;
+ }
+ spin_unlock(&tport->tp_lock);
+ if (status)
+ dev_err(dev, "%s - resubmit read urb failed, %d\n", __FUNCTION__, status);
+}
+
+
+static void ti_bulk_out_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct ti_port *tport = (struct ti_port *)urb->context;
+ struct usb_serial_port *port = tport->tp_port;
+ struct device *dev = &urb->dev->dev;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ tport->tp_write_urb_in_use = 0;
+
+ switch (urb->status) {
+ case 0:
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ dbg("%s - urb shutting down, %d", __FUNCTION__, urb->status);
+ tport->tp_tdev->td_urb_error = 1;
+ wake_up_interruptible(&tport->tp_write_wait);
+ return;
+ default:
+ dev_err(dev, "%s - nonzero urb status, %d\n", __FUNCTION__, urb->status);
+ tport->tp_tdev->td_urb_error = 1;
+ wake_up_interruptible(&tport->tp_write_wait);
+ }
+
+ /* send any buffered data */
+ ti_send(tport);
+}
+
+
+static void ti_recv(struct device *dev, struct tty_struct *tty,
+ unsigned char *data, int length)
+{
+ int cnt;
+
+ do {
+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ dev_err(dev, "%s - dropping data, %d bytes lost\n", __FUNCTION__, length);
+ return;
+ }
+ }
+ cnt = min(length, TTY_FLIPBUF_SIZE - tty->flip.count);
+ memcpy(tty->flip.char_buf_ptr, data, cnt);
+ memset(tty->flip.flag_buf_ptr, 0, cnt);
+ tty->flip.char_buf_ptr += cnt;
+ tty->flip.flag_buf_ptr += cnt;
+ tty->flip.count += cnt;
+ data += cnt;
+ length -= cnt;
+ } while (length > 0);
+
+ tty_flip_buffer_push(tty);
+}
+
+
+static void ti_send(struct ti_port *tport)
+{
+ int count, result;
+ struct usb_serial_port *port = tport->tp_port;
+ struct tty_struct *tty = port->tty;
+ unsigned long flags;
+
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&tport->tp_lock, flags);
+
+ if (tport->tp_write_urb_in_use) {
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+ return;
+ }
+
+ count = ti_buf_get(tport->tp_write_buf,
+ port->write_urb->transfer_buffer,
+ port->bulk_out_size);
+
+ if (count == 0) {
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+ return;
+ }
+
+ tport->tp_write_urb_in_use = 1;
+
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer);
+
+ usb_fill_bulk_urb(port->write_urb, port->serial->dev,
+ usb_sndbulkpipe(port->serial->dev,
+ port->bulk_out_endpointAddress),
+ port->write_urb->transfer_buffer, count,
+ ti_bulk_out_callback, tport);
+
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+ if (result) {
+ dev_err(&port->dev, "%s - submit write urb failed, %d\n", __FUNCTION__, result);
+ tport->tp_write_urb_in_use = 0;
+ /* TODO: reschedule ti_send */
+ } else {
+ spin_lock_irqsave(&tport->tp_lock, flags);
+ tport->tp_icount.tx += count;
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+ }
+
+ /* more room in the buffer for new writes, wakeup */
+ if (tty)
+ tty_wakeup(tty);
+ wake_up_interruptible(&tport->tp_write_wait);
+}
+
+
+static int ti_set_mcr(struct ti_port *tport, unsigned int mcr)
+{
+ int status;
+
+ status = ti_write_byte(tport->tp_tdev,
+ tport->tp_uart_base_addr + TI_UART_OFFSET_MCR,
+ TI_MCR_RTS | TI_MCR_DTR | TI_MCR_LOOP, mcr);
+
+ if (!status)
+ tport->tp_shadow_mcr = mcr;
+
+ return status;
+}
+
+
+static int ti_get_lsr(struct ti_port *tport)
+{
+ int size,status;
+ struct ti_device *tdev = tport->tp_tdev;
+ struct usb_serial_port *port = tport->tp_port;
+ int port_number = port->number - port->serial->minor;
+ struct ti_port_status *data;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ size = sizeof(struct ti_port_status);
+ data = kmalloc(size, GFP_KERNEL);
+ if (!data) {
+ dev_err(&port->dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS,
+ (__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size);
+ if (status) {
+ dev_err(&port->dev, "%s - get port status command failed, %d\n", __FUNCTION__, status);
+ goto free_data;
+ }
+
+ dbg("%s - lsr 0x%02X", __FUNCTION__, data->bLSR);
+
+ tport->tp_lsr = data->bLSR;
+
+free_data:
+ kfree(data);
+ return status;
+}
+
+
+static int ti_get_serial_info(struct ti_port *tport,
+ struct serial_struct __user *ret_arg)
+{
+ struct usb_serial_port *port = tport->tp_port;
+ struct serial_struct ret_serial;
+
+ if (!ret_arg)
+ return -EFAULT;
+
+ memset(&ret_serial, 0, sizeof(ret_serial));
+
+ ret_serial.type = PORT_16550A;
+ ret_serial.line = port->serial->minor;
+ ret_serial.port = port->number - port->serial->minor;
+ ret_serial.flags = tport->tp_flags;
+ ret_serial.xmit_fifo_size = TI_WRITE_BUF_SIZE;
+ ret_serial.baud_base = tport->tp_tdev->td_is_3410 ? 921600 : 460800;
+ ret_serial.closing_wait = tport->tp_closing_wait;
+
+ if (copy_to_user(ret_arg, &ret_serial, sizeof(*ret_arg)))
+ return -EFAULT;
+
+ return 0;
+}
+
+
+static int ti_set_serial_info(struct ti_port *tport,
+ struct serial_struct __user *new_arg)
+{
+ struct usb_serial_port *port = tport->tp_port;
+ struct serial_struct new_serial;
+
+ if (copy_from_user(&new_serial, new_arg, sizeof(new_serial)))
+ return -EFAULT;
+
+ tport->tp_flags = new_serial.flags & TI_SET_SERIAL_FLAGS;
+ if (port->tty)
+ port->tty->low_latency =
+ (tport->tp_flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+ tport->tp_closing_wait = new_serial.closing_wait;
+
+ return 0;
+}
+
+
+static void ti_handle_new_msr(struct ti_port *tport, __u8 msr)
+{
+ struct async_icount *icount;
+ struct tty_struct *tty;
+ unsigned long flags;
+
+ dbg("%s - msr 0x%02X", __FUNCTION__, msr);
+
+ if (msr & TI_MSR_DELTA_MASK) {
+ spin_lock_irqsave(&tport->tp_lock, flags);
+ icount = &tport->tp_icount;
+ if (msr & TI_MSR_DELTA_CTS)
+ icount->cts++;
+ if (msr & TI_MSR_DELTA_DSR)
+ icount->dsr++;
+ if (msr & TI_MSR_DELTA_CD)
+ icount->dcd++;
+ if (msr & TI_MSR_DELTA_RI)
+ icount->rng++;
+ wake_up_interruptible(&tport->tp_msr_wait);
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+ }
+
+ tport->tp_msr = msr & TI_MSR_MASK;
+
+ /* handle CTS flow control */
+ tty = tport->tp_port->tty;
+ if (tty && C_CRTSCTS(tty)) {
+ if (msr & TI_MSR_CTS) {
+ tty->hw_stopped = 0;
+ tty_wakeup(tty);
+ } else {
+ tty->hw_stopped = 1;
+ }
+ }
+}
+
+
+static void ti_drain(struct ti_port *tport, unsigned long timeout, int flush)
+{
+ struct ti_device *tdev = tport->tp_tdev;
+ struct usb_serial_port *port = tport->tp_port;
+ wait_queue_t wait;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&tport->tp_lock, flags);
+
+ /* wait for data to drain from the buffer */
+ tdev->td_urb_error = 0;
+ init_waitqueue_entry(&wait, current);
+ add_wait_queue(&tport->tp_write_wait, &wait);
+ for (;;) {
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (ti_buf_data_avail(tport->tp_write_buf) == 0
+ || timeout == 0 || signal_pending(current)
+ || tdev->td_urb_error
+ || !usb_get_intfdata(port->serial->interface)) /* disconnect */
+ break;
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+ timeout = schedule_timeout(timeout);
+ spin_lock_irqsave(&tport->tp_lock, flags);
+ }
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&tport->tp_write_wait, &wait);
+
+ /* flush any remaining data in the buffer */
+ if (flush)
+ ti_buf_clear(tport->tp_write_buf);
+
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+ /* wait for data to drain from the device */
+ /* wait for empty tx register, plus 20 ms */
+ timeout += jiffies;
+ tport->tp_lsr &= ~TI_LSR_TX_EMPTY;
+ while ((long)(jiffies - timeout) < 0 && !signal_pending(current)
+ && !(tport->tp_lsr&TI_LSR_TX_EMPTY) && !tdev->td_urb_error
+ && usb_get_intfdata(port->serial->interface)) { /* not disconnected */
+ if (ti_get_lsr(tport))
+ break;
+ msleep_interruptible(20);
+ }
+}
+
+
+static void ti_stop_read(struct ti_port *tport, struct tty_struct *tty)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&tport->tp_lock, flags);
+
+ if (tport->tp_read_urb_state == TI_READ_URB_RUNNING)
+ tport->tp_read_urb_state = TI_READ_URB_STOPPING;
+
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+}
+
+
+static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty)
+{
+ struct urb *urb;
+ int status = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tport->tp_lock, flags);
+
+ if (tport->tp_read_urb_state == TI_READ_URB_STOPPED) {
+ urb = tport->tp_port->read_urb;
+ urb->complete = ti_bulk_in_callback;
+ urb->context = tport;
+ urb->dev = tport->tp_port->serial->dev;
+ status = usb_submit_urb(urb, GFP_KERNEL);
+ }
+ tport->tp_read_urb_state = TI_READ_URB_RUNNING;
+
+ spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+ return status;
+}
+
+
+static int ti_command_out_sync(struct ti_device *tdev, __u8 command,
+ __u16 moduleid, __u16 value, __u8 *data, int size)
+{
+ int status;
+
+ status = usb_control_msg(tdev->td_serial->dev,
+ usb_sndctrlpipe(tdev->td_serial->dev, 0), command,
+ (USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT),
+ value, moduleid, data, size, 1000);
+
+ if (status == size)
+ status = 0;
+
+ if (status > 0)
+ status = -ECOMM;
+
+ return status;
+}
+
+
+static int ti_command_in_sync(struct ti_device *tdev, __u8 command,
+ __u16 moduleid, __u16 value, __u8 *data, int size)
+{
+ int status;
+
+ status = usb_control_msg(tdev->td_serial->dev,
+ usb_rcvctrlpipe(tdev->td_serial->dev, 0), command,
+ (USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN),
+ value, moduleid, data, size, 1000);
+
+ if (status == size)
+ status = 0;
+
+ if (status > 0)
+ status = -ECOMM;
+
+ return status;
+}
+
+
+static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
+ __u8 mask, __u8 byte)
+{
+ int status;
+ unsigned int size;
+ struct ti_write_data_bytes *data;
+ struct device *dev = &tdev->td_serial->dev->dev;
+
+ dbg("%s - addr 0x%08lX, mask 0x%02X, byte 0x%02X", __FUNCTION__, addr, mask, byte);
+
+ size = sizeof(struct ti_write_data_bytes) + 2;
+ data = kmalloc(size, GFP_KERNEL);
+ if (!data) {
+ dev_err(dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ data->bAddrType = TI_RW_DATA_ADDR_XDATA;
+ data->bDataType = TI_RW_DATA_BYTE;
+ data->bDataCounter = 1;
+ data->wBaseAddrHi = cpu_to_be16(addr>>16);
+ data->wBaseAddrLo = cpu_to_be16(addr);
+ data->bData[0] = mask;
+ data->bData[1] = byte;
+
+ status = ti_command_out_sync(tdev, TI_WRITE_DATA, TI_RAM_PORT, 0,
+ (__u8 *)data, size);
+
+ if (status < 0)
+ dev_err(dev, "%s - failed, %d\n", __FUNCTION__, status);
+
+ kfree(data);
+
+ return status;
+}
+
+
+static int ti_download_firmware(struct ti_device *tdev,
+ unsigned char *firmware, unsigned int firmware_size)
+{
+ int status = 0;
+ int buffer_size;
+ int pos;
+ int len;
+ int done;
+ __u8 cs = 0;
+ __u8 *buffer;
+ struct usb_device *dev = tdev->td_serial->dev;
+ struct ti_firmware_header *header;
+ unsigned int pipe = usb_sndbulkpipe(dev,
+ tdev->td_serial->port[0]->bulk_out_endpointAddress);
+
+
+ buffer_size = TI_FIRMWARE_BUF_SIZE + sizeof(struct ti_firmware_header);
+ buffer = kmalloc(buffer_size, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ memcpy(buffer, firmware, firmware_size);
+ memset(buffer+firmware_size, 0xff, buffer_size-firmware_size);
+
+ for(pos = sizeof(struct ti_firmware_header); pos < buffer_size; pos++)
+ cs = (__u8)(cs + buffer[pos]);
+
+ header = (struct ti_firmware_header *)buffer;
+ header->wLength = cpu_to_le16((__u16)(buffer_size - sizeof(struct ti_firmware_header)));
+ header->bCheckSum = cs;
+
+ dbg("%s - downloading firmware", __FUNCTION__);
+ for (pos = 0; pos < buffer_size; pos += done) {
+ len = min(buffer_size - pos, TI_DOWNLOAD_MAX_PACKET_SIZE);
+ status = usb_bulk_msg(dev, pipe, buffer+pos, len, &done, 1000);
+ if (status)
+ break;
+ }
+
+ kfree(buffer);
+
+ if (status) {
+ dev_err(&dev->dev, "%s - error downloading firmware, %d\n", __FUNCTION__, status);
+ return status;
+ }
+
+ dbg("%s - download successful", __FUNCTION__);
+
+ return 0;
+}
+
+
+/* Circular Buffer Functions */
+
+/*
+ * ti_buf_alloc
+ *
+ * Allocate a circular buffer and all associated memory.
+ */
+
+static struct circ_buf *ti_buf_alloc(void)
+{
+ struct circ_buf *cb;
+
+ cb = (struct circ_buf *)kmalloc(sizeof(struct circ_buf), GFP_KERNEL);
+ if (cb == NULL)
+ return NULL;
+
+ cb->buf = kmalloc(TI_WRITE_BUF_SIZE, GFP_KERNEL);
+ if (cb->buf == NULL) {
+ kfree(cb);
+ return NULL;
+ }
+
+ ti_buf_clear(cb);
+
+ return cb;
+}
+
+
+/*
+ * ti_buf_free
+ *
+ * Free the buffer and all associated memory.
+ */
+
+static void ti_buf_free(struct circ_buf *cb)
+{
+ kfree(cb->buf);
+ kfree(cb);
+}
+
+
+/*
+ * ti_buf_clear
+ *
+ * Clear out all data in the circular buffer.
+ */
+
+static void ti_buf_clear(struct circ_buf *cb)
+{
+ cb->head = cb->tail = 0;
+}
+
+
+/*
+ * ti_buf_data_avail
+ *
+ * Return the number of bytes of data available in the circular
+ * buffer.
+ */
+
+static int ti_buf_data_avail(struct circ_buf *cb)
+{
+ return CIRC_CNT(cb->head,cb->tail,TI_WRITE_BUF_SIZE);
+}
+
+
+/*
+ * ti_buf_space_avail
+ *
+ * Return the number of bytes of space available in the circular
+ * buffer.
+ */
+
+static int ti_buf_space_avail(struct circ_buf *cb)
+{
+ return CIRC_SPACE(cb->head,cb->tail,TI_WRITE_BUF_SIZE);
+}
+
+
+/*
+ * ti_buf_put
+ *
+ * Copy data data from a user buffer and put it into the circular buffer.
+ * Restrict to the amount of space available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static int ti_buf_put(struct circ_buf *cb, const char *buf, int count)
+{
+ int c, ret = 0;
+
+ while (1) {
+ c = CIRC_SPACE_TO_END(cb->head, cb->tail, TI_WRITE_BUF_SIZE);
+ if (count < c)
+ c = count;
+ if (c <= 0)
+ break;
+ memcpy(cb->buf + cb->head, buf, c);
+ cb->head = (cb->head + c) & (TI_WRITE_BUF_SIZE-1);
+ buf += c;
+ count -= c;
+ ret += c;
+ }
+
+ return ret;
+}
+
+
+/*
+ * ti_buf_get
+ *
+ * Get data from the circular buffer and copy to the given buffer.
+ * Restrict to the amount of data available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static int ti_buf_get(struct circ_buf *cb, char *buf, int count)
+{
+ int c, ret = 0;
+
+ while (1) {
+ c = CIRC_CNT_TO_END(cb->head, cb->tail, TI_WRITE_BUF_SIZE);
+ if (count < c)
+ c = count;
+ if (c <= 0)
+ break;
+ memcpy(buf, cb->buf + cb->tail, c);
+ cb->tail = (cb->tail + c) & (TI_WRITE_BUF_SIZE-1);
+ buf += c;
+ count -= c;
+ ret += c;
+ }
+
+ return ret;
+}
diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h
new file mode 100644
index 000000000000..02c1aeb9e1b8
--- /dev/null
+++ b/drivers/usb/serial/ti_usb_3410_5052.h
@@ -0,0 +1,224 @@
+/* vi: ts=8 sw=8
+ *
+ * TI 3410/5052 USB Serial Driver Header
+ *
+ * Copyright (C) 2004 Texas Instruments
+ *
+ * This driver is based on the Linux io_ti driver, which is
+ * Copyright (C) 2000-2002 Inside Out Networks
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * For questions or problems with this driver, contact Texas Instruments
+ * technical support, or Al Borchers <alborchers@steinerpoint.com>, or
+ * Peter Berger <pberger@brimson.com>.
+ */
+
+#ifndef _TI_3410_5052_H_
+#define _TI_3410_5052_H_
+
+/* Configuration ids */
+#define TI_BOOT_CONFIG 1
+#define TI_ACTIVE_CONFIG 2
+
+/* Vendor and product ids */
+#define TI_VENDOR_ID 0x0451
+#define TI_3410_PRODUCT_ID 0x3410
+#define TI_5052_BOOT_PRODUCT_ID 0x5052 /* no EEPROM, no firmware */
+#define TI_5152_BOOT_PRODUCT_ID 0x5152 /* no EEPROM, no firmware */
+#define TI_5052_EEPROM_PRODUCT_ID 0x505A /* EEPROM, no firmware */
+#define TI_5052_FIRMWARE_PRODUCT_ID 0x505F /* firmware is running */
+
+/* Commands */
+#define TI_GET_VERSION 0x01
+#define TI_GET_PORT_STATUS 0x02
+#define TI_GET_PORT_DEV_INFO 0x03
+#define TI_GET_CONFIG 0x04
+#define TI_SET_CONFIG 0x05
+#define TI_OPEN_PORT 0x06
+#define TI_CLOSE_PORT 0x07
+#define TI_START_PORT 0x08
+#define TI_STOP_PORT 0x09
+#define TI_TEST_PORT 0x0A
+#define TI_PURGE_PORT 0x0B
+#define TI_RESET_EXT_DEVICE 0x0C
+#define TI_WRITE_DATA 0x80
+#define TI_READ_DATA 0x81
+#define TI_REQ_TYPE_CLASS 0x82
+
+/* Module identifiers */
+#define TI_I2C_PORT 0x01
+#define TI_IEEE1284_PORT 0x02
+#define TI_UART1_PORT 0x03
+#define TI_UART2_PORT 0x04
+#define TI_RAM_PORT 0x05
+
+/* Modem status */
+#define TI_MSR_DELTA_CTS 0x01
+#define TI_MSR_DELTA_DSR 0x02
+#define TI_MSR_DELTA_RI 0x04
+#define TI_MSR_DELTA_CD 0x08
+#define TI_MSR_CTS 0x10
+#define TI_MSR_DSR 0x20
+#define TI_MSR_RI 0x40
+#define TI_MSR_CD 0x80
+#define TI_MSR_DELTA_MASK 0x0F
+#define TI_MSR_MASK 0xF0
+
+/* Line status */
+#define TI_LSR_OVERRUN_ERROR 0x01
+#define TI_LSR_PARITY_ERROR 0x02
+#define TI_LSR_FRAMING_ERROR 0x04
+#define TI_LSR_BREAK 0x08
+#define TI_LSR_ERROR 0x0F
+#define TI_LSR_RX_FULL 0x10
+#define TI_LSR_TX_EMPTY 0x20
+
+/* Line control */
+#define TI_LCR_BREAK 0x40
+
+/* Modem control */
+#define TI_MCR_LOOP 0x04
+#define TI_MCR_DTR 0x10
+#define TI_MCR_RTS 0x20
+
+/* Mask settings */
+#define TI_UART_ENABLE_RTS_IN 0x0001
+#define TI_UART_DISABLE_RTS 0x0002
+#define TI_UART_ENABLE_PARITY_CHECKING 0x0008
+#define TI_UART_ENABLE_DSR_OUT 0x0010
+#define TI_UART_ENABLE_CTS_OUT 0x0020
+#define TI_UART_ENABLE_X_OUT 0x0040
+#define TI_UART_ENABLE_XA_OUT 0x0080
+#define TI_UART_ENABLE_X_IN 0x0100
+#define TI_UART_ENABLE_DTR_IN 0x0800
+#define TI_UART_DISABLE_DTR 0x1000
+#define TI_UART_ENABLE_MS_INTS 0x2000
+#define TI_UART_ENABLE_AUTO_START_DMA 0x4000
+
+/* Parity */
+#define TI_UART_NO_PARITY 0x00
+#define TI_UART_ODD_PARITY 0x01
+#define TI_UART_EVEN_PARITY 0x02
+#define TI_UART_MARK_PARITY 0x03
+#define TI_UART_SPACE_PARITY 0x04
+
+/* Stop bits */
+#define TI_UART_1_STOP_BITS 0x00
+#define TI_UART_1_5_STOP_BITS 0x01
+#define TI_UART_2_STOP_BITS 0x02
+
+/* Bits per character */
+#define TI_UART_5_DATA_BITS 0x00
+#define TI_UART_6_DATA_BITS 0x01
+#define TI_UART_7_DATA_BITS 0x02
+#define TI_UART_8_DATA_BITS 0x03
+
+/* 232/485 modes */
+#define TI_UART_232 0x00
+#define TI_UART_485_RECEIVER_DISABLED 0x01
+#define TI_UART_485_RECEIVER_ENABLED 0x02
+
+/* Pipe transfer mode and timeout */
+#define TI_PIPE_MODE_CONTINOUS 0x01
+#define TI_PIPE_MODE_MASK 0x03
+#define TI_PIPE_TIMEOUT_MASK 0x7C
+#define TI_PIPE_TIMEOUT_ENABLE 0x80
+
+/* Config struct */
+struct ti_uart_config {
+ __u16 wBaudRate;
+ __u16 wFlags;
+ __u8 bDataBits;
+ __u8 bParity;
+ __u8 bStopBits;
+ char cXon;
+ char cXoff;
+ __u8 bUartMode;
+} __attribute__((packed));
+
+/* Get port status */
+struct ti_port_status {
+ __u8 bCmdCode;
+ __u8 bModuleId;
+ __u8 bErrorCode;
+ __u8 bMSR;
+ __u8 bLSR;
+} __attribute__((packed));
+
+/* Purge modes */
+#define TI_PURGE_OUTPUT 0x00
+#define TI_PURGE_INPUT 0x80
+
+/* Read/Write data */
+#define TI_RW_DATA_ADDR_SFR 0x10
+#define TI_RW_DATA_ADDR_IDATA 0x20
+#define TI_RW_DATA_ADDR_XDATA 0x30
+#define TI_RW_DATA_ADDR_CODE 0x40
+#define TI_RW_DATA_ADDR_GPIO 0x50
+#define TI_RW_DATA_ADDR_I2C 0x60
+#define TI_RW_DATA_ADDR_FLASH 0x70
+#define TI_RW_DATA_ADDR_DSP 0x80
+
+#define TI_RW_DATA_UNSPECIFIED 0x00
+#define TI_RW_DATA_BYTE 0x01
+#define TI_RW_DATA_WORD 0x02
+#define TI_RW_DATA_DOUBLE_WORD 0x04
+
+struct ti_write_data_bytes {
+ __u8 bAddrType;
+ __u8 bDataType;
+ __u8 bDataCounter;
+ __be16 wBaseAddrHi;
+ __be16 wBaseAddrLo;
+ __u8 bData[0];
+} __attribute__((packed));
+
+struct ti_read_data_request {
+ __u8 bAddrType;
+ __u8 bDataType;
+ __u8 bDataCounter;
+ __be16 wBaseAddrHi;
+ __be16 wBaseAddrLo;
+} __attribute__((packed));
+
+struct ti_read_data_bytes {
+ __u8 bCmdCode;
+ __u8 bModuleId;
+ __u8 bErrorCode;
+ __u8 bData[0];
+} __attribute__((packed));
+
+/* Interrupt struct */
+struct ti_interrupt {
+ __u8 bICode;
+ __u8 bIInfo;
+} __attribute__((packed));
+
+/* Interrupt codes */
+#define TI_GET_PORT_FROM_CODE(c) (((c) >> 4) - 3)
+#define TI_GET_FUNC_FROM_CODE(c) ((c) & 0x0f)
+#define TI_CODE_HARDWARE_ERROR 0xFF
+#define TI_CODE_DATA_ERROR 0x03
+#define TI_CODE_MODEM_STATUS 0x04
+
+/* Download firmware max packet size */
+#define TI_DOWNLOAD_MAX_PACKET_SIZE 64
+
+/* Firmware image header */
+struct ti_firmware_header {
+ __le16 wLength;
+ __u8 bCheckSum;
+} __attribute__((packed));
+
+/* UART addresses */
+#define TI_UART1_BASE_ADDR 0xFFA0 /* UART 1 base address */
+#define TI_UART2_BASE_ADDR 0xFFB0 /* UART 2 base address */
+#define TI_UART_OFFSET_LCR 0x0002 /* UART MCR register offset */
+#define TI_UART_OFFSET_MCR 0x0004 /* UART MCR register offset */
+
+#endif /* _TI_3410_5052_H_ */
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
new file mode 100644
index 000000000000..4536f63faaea
--- /dev/null
+++ b/drivers/usb/serial/usb-serial.c
@@ -0,0 +1,1435 @@
+/*
+ * USB Serial Converter driver
+ *
+ * Copyright (C) 1999 - 2004 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)
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * (12/10/2002) gkh
+ * Split the ports off into their own struct device, and added a
+ * usb-serial bus driver.
+ *
+ * (11/19/2002) gkh
+ * removed a few #ifdefs for the generic code and cleaned up the failure
+ * logic in initialization.
+ *
+ * (10/02/2002) gkh
+ * moved the console code to console.c and out of this file.
+ *
+ * (06/05/2002) gkh
+ * moved location of startup() call in serial_probe() until after all
+ * of the port information and endpoints are initialized. This makes
+ * things easier for some drivers.
+ *
+ * (04/10/2002) gkh
+ * added serial_read_proc function which creates a
+ * /proc/tty/driver/usb-serial file.
+ *
+ * (03/27/2002) gkh
+ * Got USB serial console code working properly and merged into the main
+ * version of the tree. Thanks to Randy Dunlap for the initial version
+ * of this code, and for pushing me to finish it up.
+ * The USB serial console works with any usb serial driver device.
+ *
+ * (03/21/2002) gkh
+ * Moved all manipulation of port->open_count into the core. Now the
+ * individual driver's open and close functions are called only when the
+ * first open() and last close() is called. Making the drivers a bit
+ * smaller and simpler.
+ * Fixed a bug if a driver didn't have the owner field set.
+ *
+ * (02/26/2002) gkh
+ * Moved all locking into the main serial_* functions, instead of having
+ * the individual drivers have to grab the port semaphore. This should
+ * reduce races.
+ * Reworked the MOD_INC logic a bit to always increment and decrement, even
+ * if the generic driver is being used.
+ *
+ * (10/10/2001) gkh
+ * usb_serial_disconnect() now sets the serial->dev pointer is to NULL to
+ * help prevent child drivers from accessing the device since it is now
+ * gone.
+ *
+ * (09/13/2001) gkh
+ * Moved generic driver initialize after we have registered with the USB
+ * core. Thanks to Randy Dunlap for pointing this problem out.
+ *
+ * (07/03/2001) gkh
+ * Fixed module paramater size. Thanks to John Brockmeyer for the pointer.
+ * Fixed vendor and product getting defined through the MODULE_PARM macro
+ * if the Generic driver wasn't compiled in.
+ * Fixed problem with generic_shutdown() not being called for drivers that
+ * don't have a shutdown() function.
+ *
+ * (06/06/2001) gkh
+ * added evil hack that is needed for the prolific pl2303 device due to the
+ * crazy way its endpoints are set up.
+ *
+ * (05/30/2001) gkh
+ * switched from using spinlock to a semaphore, which fixes lots of problems.
+ *
+ * (04/08/2001) gb
+ * Identify version on module load.
+ *
+ * 2001_02_05 gkh
+ * Fixed buffer overflows bug with the generic serial driver. Thanks to
+ * Todd Squires <squirest@ct0.com> for fixing this.
+ *
+ * (01/10/2001) gkh
+ * Fixed bug where the generic serial adaptor grabbed _any_ device that was
+ * offered to it.
+ *
+ * (12/12/2000) gkh
+ * Removed MOD_INC and MOD_DEC from poll and disconnect functions, and
+ * moved them to the serial_open and serial_close functions.
+ * Also fixed bug with there not being a MOD_DEC for the generic driver
+ * (thanks to Gary Brubaker for finding this.)
+ *
+ * (11/29/2000) gkh
+ * Small NULL pointer initialization cleanup which saves a bit of disk image
+ *
+ * (11/01/2000) Adam J. Richter
+ * instead of using idVendor/idProduct pairs, usb serial drivers
+ * now identify their hardware interest with usb_device_id tables,
+ * which they usually have anyhow for use with MODULE_DEVICE_TABLE.
+ *
+ * (10/05/2000) gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.
+ *
+ * (09/11/2000) gkh
+ * Removed DEBUG #ifdefs with call to usb_serial_debug_data
+ *
+ * (08/28/2000) gkh
+ * Added port_lock to port structure.
+ * Added locks for SMP safeness to generic driver
+ * Fixed the ability to open a generic device's port more than once.
+ *
+ * (07/23/2000) gkh
+ * Added bulk_out_endpointAddress to port structure.
+ *
+ * (07/19/2000) gkh, pberger, and borchers
+ * Modifications to allow usb-serial drivers to be modules.
+ *
+ * (07/03/2000) gkh
+ * Added more debugging to serial_ioctl call
+ *
+ * (06/25/2000) gkh
+ * Changed generic_write_bulk_callback to not call wake_up_interruptible
+ * directly, but to have port_softint do it at a safer time.
+ *
+ * (06/23/2000) gkh
+ * Cleaned up debugging statements in a quest to find UHCI timeout bug.
+ *
+ * (05/22/2000) gkh
+ * Changed the makefile, enabling the big CONFIG_USB_SERIAL_SOMTHING to be
+ * removed from the individual device source files.
+ *
+ * (05/03/2000) gkh
+ * Added the Digi Acceleport driver from Al Borchers and Peter Berger.
+ *
+ * (05/02/2000) gkh
+ * Changed devfs and tty register code to work properly now. This was based on
+ * the ACM driver changes by Vojtech Pavlik.
+ *
+ * (04/27/2000) Ryan VanderBijl
+ * Put calls to *_paranoia_checks into one function.
+ *
+ * (04/23/2000) gkh
+ * Fixed bug that Randy Dunlap found for Generic devices with no bulk out ports.
+ * Moved when the startup code printed out the devices that are supported.
+ *
+ * (04/19/2000) gkh
+ * Added driver for ZyXEL omni.net lcd plus ISDN TA
+ * Made startup info message specify which drivers were compiled in.
+ *
+ * (04/03/2000) gkh
+ * Changed the probe process to remove the module unload races.
+ * Changed where the tty layer gets initialized to have devfs work nicer.
+ * Added initial devfs support.
+ *
+ * (03/26/2000) gkh
+ * Split driver up into device specific pieces.
+ *
+ * (03/19/2000) gkh
+ * Fixed oops that could happen when device was removed while a program
+ * was talking to the device.
+ * Removed the static urbs and now all urbs are created and destroyed
+ * dynamically.
+ * Reworked the internal interface. Now everything is based on the
+ * usb_serial_port structure instead of the larger usb_serial structure.
+ * This fixes the bug that a multiport device could not have more than
+ * one port open at one time.
+ *
+ * (03/17/2000) gkh
+ * Added config option for debugging messages.
+ * Added patch for keyspan pda from Brian Warner.
+ *
+ * (03/06/2000) gkh
+ * Added the keyspan pda code from Brian Warner <warner@lothar.com>
+ * Moved a bunch of the port specific stuff into its own structure. This
+ * is in anticipation of the true multiport devices (there's a bug if you
+ * try to access more than one port of any multiport device right now)
+ *
+ * (02/21/2000) gkh
+ * Made it so that any serial devices only have to specify which functions
+ * they want to overload from the generic function calls (great,
+ * inheritance in C, in a driver, just what I wanted...)
+ * Added support for set_termios and ioctl function calls. No drivers take
+ * advantage of this yet.
+ * Removed the #ifdef MODULE, now there is no module specific code.
+ * Cleaned up a few comments in usb-serial.h that were wrong (thanks again
+ * to Miles Lott).
+ * Small fix to get_free_serial.
+ *
+ * (02/14/2000) gkh
+ * Removed the Belkin and Peracom functionality from the driver due to
+ * the lack of support from the vendor, and me not wanting people to
+ * accidenatly buy the device, expecting it to work with Linux.
+ * Added read_bulk_callback and write_bulk_callback to the type structure
+ * for the needs of the FTDI and WhiteHEAT driver.
+ * Changed all reverences to FTDI to FTDI_SIO at the request of Bill
+ * Ryder.
+ * Changed the output urb size back to the max endpoint size to make
+ * the ftdi_sio driver have it easier, and due to the fact that it didn't
+ * really increase the speed any.
+ *
+ * (02/11/2000) gkh
+ * Added VISOR_FUNCTION_CONSOLE to the visor startup function. This was a
+ * patch from Miles Lott (milos@insync.net).
+ * Fixed bug with not restoring the minor range that a device grabs, if
+ * the startup function fails (thanks Miles for finding this).
+ *
+ * (02/05/2000) gkh
+ * Added initial framework for the Keyspan PDA serial converter so that
+ * Brian Warner has a place to put his code.
+ * Made the ezusb specific functions generic enough that different
+ * devices can use them (whiteheat and keyspan_pda both need them).
+ * Split out a whole bunch of structure and other stuff to a separate
+ * usb-serial.h file.
+ * Made the Visor connection messages a little more understandable, now
+ * that Miles Lott (milos@insync.net) has gotten the Generic channel to
+ * work. Also made them always show up in the log file.
+ *
+ * (01/25/2000) gkh
+ * Added initial framework for FTDI serial converter so that Bill Ryder
+ * has a place to put his code.
+ * Added the vendor specific info from Handspring. Now we can print out
+ * informational debug messages as well as understand what is happening.
+ *
+ * (01/23/2000) gkh
+ * Fixed problem of crash when trying to open a port that didn't have a
+ * device assigned to it. Made the minor node finding a little smarter,
+ * now it looks to find a continuous space for the new device.
+ *
+ * (01/21/2000) gkh
+ * Fixed bug in visor_startup with patch from Miles Lott (milos@insync.net)
+ * Fixed get_serial_by_minor which was all messed up for multi port
+ * devices. Fixed multi port problem for generic devices. Now the number
+ * of ports is determined by the number of bulk out endpoints for the
+ * generic device.
+ *
+ * (01/19/2000) gkh
+ * Removed lots of cruft that was around from the old (pre urb) driver
+ * interface.
+ * Made the serial_table dynamic. This should save lots of memory when
+ * the number of minor nodes goes up to 256.
+ * Added initial support for devices that have more than one port.
+ * Added more debugging comments for the Visor, and added a needed
+ * set_configuration call.
+ *
+ * (01/17/2000) gkh
+ * Fixed the WhiteHEAT firmware (my processing tool had a bug)
+ * and added new debug loader firmware for it.
+ * Removed the put_char function as it isn't really needed.
+ * Added visor startup commands as found by the Win98 dump.
+ *
+ * (01/13/2000) gkh
+ * Fixed the vendor id for the generic driver to the one I meant it to be.
+ *
+ * (01/12/2000) gkh
+ * Forget the version numbering...that's pretty useless...
+ * Made the driver able to be compiled so that the user can select which
+ * converter they want to use. This allows people who only want the Visor
+ * support to not pay the memory size price of the WhiteHEAT.
+ * Fixed bug where the generic driver (idVendor=0000 and idProduct=0000)
+ * grabbed the root hub. Not good.
+ *
+ * version 0.4.0 (01/10/2000) gkh
+ * Added whiteheat.h containing the firmware for the ConnectTech WhiteHEAT
+ * device. Added startup function to allow firmware to be downloaded to
+ * a device if it needs to be.
+ * Added firmware download logic to the WhiteHEAT device.
+ * Started to add #defines to split up the different drivers for potential
+ * configuration option.
+ *
+ * version 0.3.1 (12/30/99) gkh
+ * Fixed problems with urb for bulk out.
+ * Added initial support for multiple sets of endpoints. This enables
+ * the Handspring Visor to be attached successfully. Only the first
+ * bulk in / bulk out endpoint pair is being used right now.
+ *
+ * version 0.3.0 (12/27/99) gkh
+ * Added initial support for the Handspring Visor based on a patch from
+ * Miles Lott (milos@sneety.insync.net)
+ * Cleaned up the code a bunch and converted over to using urbs only.
+ *
+ * version 0.2.3 (12/21/99) gkh
+ * Added initial support for the Connect Tech WhiteHEAT converter.
+ * Incremented the number of ports in expectation of getting the
+ * WhiteHEAT to work properly (4 ports per connection).
+ * Added notification on insertion and removal of what port the
+ * device is/was connected to (and what kind of device it was).
+ *
+ * version 0.2.2 (12/16/99) gkh
+ * Changed major number to the new allocated number. We're legal now!
+ *
+ * version 0.2.1 (12/14/99) gkh
+ * Fixed bug that happens when device node is opened when there isn't a
+ * device attached to it. Thanks to marek@webdesign.no for noticing this.
+ *
+ * version 0.2.0 (11/10/99) gkh
+ * Split up internals to make it easier to add different types of serial
+ * converters to the code.
+ * Added a "generic" driver that gets it's vendor and product id
+ * from when the module is loaded. Thanks to David E. Nelson (dnelson@jump.net)
+ * for the idea and sample code (from the usb scanner driver.)
+ * Cleared up any licensing questions by releasing it under the GNU GPL.
+ *
+ * version 0.1.2 (10/25/99) gkh
+ * Fixed bug in detecting device.
+ *
+ * version 0.1.1 (10/05/99) gkh
+ * Changed the major number to not conflict with anything else.
+ *
+ * version 0.1 (09/28/99) gkh
+ * Can recognize the two different devices and start up a read from
+ * device when asked to. Writes also work. No control signals yet, this
+ * all is vendor specific data (i.e. no spec), also no control for
+ * different baud rates or other bit settings.
+ * Currently we are using the same devid as the acm driver. This needs
+ * to change.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/spinlock.h>
+#include <linux/list.h>
+#include <linux/smp_lock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+#include "pl2303.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v2.0"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/"
+#define DRIVER_DESC "USB Serial Driver core"
+
+/* Driver structure we register with the USB core */
+static struct usb_driver usb_serial_driver = {
+ .owner = THIS_MODULE,
+ .name = "usbserial",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+};
+
+/* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead
+ the MODULE_DEVICE_TABLE declarations in each serial driver
+ cause the "hotplug" program to pull in whatever module is necessary
+ via modprobe, and modprobe will load usbserial because the serial
+ drivers depend on it.
+*/
+
+static int debug;
+static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; /* initially all NULL */
+static LIST_HEAD(usb_serial_driver_list);
+
+struct usb_serial *usb_serial_get_by_index(unsigned index)
+{
+ struct usb_serial *serial = serial_table[index];
+
+ if (serial)
+ kref_get(&serial->kref);
+ return serial;
+}
+
+static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_ports, unsigned int *minor)
+{
+ unsigned int i, j;
+ int good_spot;
+
+ dbg("%s %d", __FUNCTION__, num_ports);
+
+ *minor = 0;
+ for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
+ if (serial_table[i])
+ continue;
+
+ good_spot = 1;
+ for (j = 1; j <= num_ports-1; ++j)
+ if ((i+j >= SERIAL_TTY_MINORS) || (serial_table[i+j])) {
+ good_spot = 0;
+ i += j;
+ break;
+ }
+ if (good_spot == 0)
+ continue;
+
+ *minor = i;
+ dbg("%s - minor base = %d", __FUNCTION__, *minor);
+ for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i)
+ serial_table[i] = serial;
+ return serial;
+ }
+ return NULL;
+}
+
+static void return_serial(struct usb_serial *serial)
+{
+ int i;
+
+ dbg("%s", __FUNCTION__);
+
+ if (serial == NULL)
+ return;
+
+ for (i = 0; i < serial->num_ports; ++i) {
+ serial_table[serial->minor + i] = NULL;
+ }
+}
+
+static void destroy_serial(struct kref *kref)
+{
+ struct usb_serial *serial;
+ struct usb_serial_port *port;
+ int i;
+
+ serial = to_usb_serial(kref);
+
+ dbg ("%s - %s", __FUNCTION__, serial->type->name);
+
+ serial->type->shutdown(serial);
+
+ /* return the minor range that this device had */
+ return_serial(serial);
+
+ for (i = 0; i < serial->num_ports; ++i)
+ serial->port[i]->open_count = 0;
+
+ /* the ports are cleaned up and released in port_release() */
+ for (i = 0; i < serial->num_ports; ++i)
+ if (serial->port[i]->dev.parent != NULL) {
+ device_unregister(&serial->port[i]->dev);
+ serial->port[i] = NULL;
+ }
+
+ /* If this is a "fake" port, we have to clean it up here, as it will
+ * not get cleaned up in port_release() as it was never registered with
+ * the driver core */
+ if (serial->num_ports < serial->num_port_pointers) {
+ for (i = serial->num_ports; i < serial->num_port_pointers; ++i) {
+ port = serial->port[i];
+ if (!port)
+ continue;
+ usb_kill_urb(port->read_urb);
+ usb_free_urb(port->read_urb);
+ usb_kill_urb(port->write_urb);
+ usb_free_urb(port->write_urb);
+ usb_kill_urb(port->interrupt_in_urb);
+ usb_free_urb(port->interrupt_in_urb);
+ usb_kill_urb(port->interrupt_out_urb);
+ usb_free_urb(port->interrupt_out_urb);
+ kfree(port->bulk_in_buffer);
+ kfree(port->bulk_out_buffer);
+ kfree(port->interrupt_in_buffer);
+ kfree(port->interrupt_out_buffer);
+ }
+ }
+
+ usb_put_dev(serial->dev);
+
+ /* free up any memory that we allocated */
+ kfree (serial);
+}
+
+/*****************************************************************************
+ * Driver tty interface functions
+ *****************************************************************************/
+static int serial_open (struct tty_struct *tty, struct file * filp)
+{
+ struct usb_serial *serial;
+ struct usb_serial_port *port;
+ unsigned int portNumber;
+ int retval;
+
+ dbg("%s", __FUNCTION__);
+
+ /* get the serial object associated with this tty pointer */
+ serial = usb_serial_get_by_index(tty->index);
+ if (!serial) {
+ tty->driver_data = NULL;
+ return -ENODEV;
+ }
+
+ portNumber = tty->index - serial->minor;
+ port = serial->port[portNumber];
+
+ ++port->open_count;
+
+ if (port->open_count == 1) {
+
+ /* set up our port structure making the tty driver
+ * remember our port object, and us it */
+ tty->driver_data = port;
+ port->tty = tty;
+
+ /* lock this module before we call it
+ * this may fail, which means we must bail out,
+ * safe because we are called with BKL held */
+ if (!try_module_get(serial->type->owner)) {
+ retval = -ENODEV;
+ goto bailout_kref_put;
+ }
+
+ /* only call the device specific open if this
+ * is the first time the port is opened */
+ retval = serial->type->open(port, filp);
+ if (retval)
+ goto bailout_module_put;
+ }
+
+ return 0;
+
+bailout_module_put:
+ module_put(serial->type->owner);
+bailout_kref_put:
+ kref_put(&serial->kref, destroy_serial);
+ port->open_count = 0;
+ return retval;
+}
+
+static void serial_close(struct tty_struct *tty, struct file * filp)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+
+ if (!port)
+ return;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (port->open_count == 0)
+ 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 */
+ port->serial->type->close(port, filp);
+
+ if (port->tty) {
+ if (port->tty->driver_data)
+ port->tty->driver_data = NULL;
+ port->tty = NULL;
+ }
+
+ module_put(port->serial->type->owner);
+ }
+
+ kref_put(&port->serial->kref, destroy_serial);
+}
+
+static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+ int retval = -EINVAL;
+
+ 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 */
+ retval = port->serial->type->write(port, buf, count);
+
+exit:
+ return retval;
+}
+
+static int serial_write_room (struct tty_struct *tty)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+ int retval = -EINVAL;
+
+ 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 */
+ retval = port->serial->type->write_room(port);
+
+exit:
+ return retval;
+}
+
+static int serial_chars_in_buffer (struct tty_struct *tty)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+ int retval = -EINVAL;
+
+ 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 */
+ retval = port->serial->type->chars_in_buffer(port);
+
+exit:
+ return retval;
+}
+
+static void serial_throttle (struct tty_struct * tty)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (!port->open_count) {
+ dbg ("%s - port not open", __FUNCTION__);
+ return;
+ }
+
+ /* pass on to the driver specific version of this function */
+ if (port->serial->type->throttle)
+ port->serial->type->throttle(port);
+}
+
+static void serial_unthrottle (struct tty_struct * tty)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (!port->open_count) {
+ dbg("%s - port not open", __FUNCTION__);
+ return;
+ }
+
+ /* pass on to the driver specific version of this function */
+ if (port->serial->type->unthrottle)
+ port->serial->type->unthrottle(port);
+}
+
+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;
+ int retval = -ENODEV;
+
+ 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 (port->serial->type->ioctl)
+ retval = port->serial->type->ioctl(port, file, cmd, arg);
+ else
+ retval = -ENOIOCTLCMD;
+
+exit:
+ 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;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (!port->open_count) {
+ dbg("%s - port not open", __FUNCTION__);
+ return;
+ }
+
+ /* pass on to the driver specific version of this function if it is available */
+ if (port->serial->type->set_termios)
+ port->serial->type->set_termios(port, old);
+}
+
+static void serial_break (struct tty_struct *tty, int break_state)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (!port->open_count) {
+ dbg("%s - port not open", __FUNCTION__);
+ return;
+ }
+
+ /* pass on to the driver specific version of this function if it is available */
+ if (port->serial->type->break_ctl)
+ port->serial->type->break_ctl(port, break_state);
+}
+
+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 = usb_serial_get_by_index(i);
+ if (serial == NULL)
+ continue;
+
+ length += sprintf (page+length, "%d:", i);
+ if (serial->type->owner)
+ length += sprintf (page+length, " module:%s", module_name(serial->type->owner));
+ length += sprintf (page+length, " name:\"%s\"", serial->type->name);
+ length += sprintf (page+length, " vendor:%04x product:%04x",
+ le16_to_cpu(serial->dev->descriptor.idVendor),
+ le16_to_cpu(serial->dev->descriptor.idProduct));
+ 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;
+ }
+ kref_put(&serial->kref, destroy_serial);
+ }
+ *eof = 1;
+done:
+ if (off >= (length + begin))
+ return 0;
+ *start = page + (off-begin);
+ return ((count < begin+length-off) ? count : begin+length-off);
+}
+
+static int serial_tiocmget (struct tty_struct *tty, struct file *file)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (!port->open_count) {
+ dbg("%s - port not open", __FUNCTION__);
+ goto exit;
+ }
+
+ if (port->serial->type->tiocmget)
+ return port->serial->type->tiocmget(port, file);
+
+exit:
+ return -EINVAL;
+}
+
+static int serial_tiocmset (struct tty_struct *tty, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (!port->open_count) {
+ dbg("%s - port not open", __FUNCTION__);
+ goto exit;
+ }
+
+ if (port->serial->type->tiocmset)
+ return port->serial->type->tiocmset(port, file, set, clear);
+
+exit:
+ return -EINVAL;
+}
+
+void usb_serial_port_softint(void *private)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)private;
+ struct tty_struct *tty;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (!port)
+ return;
+
+ tty = port->tty;
+ if (!tty)
+ return;
+
+ tty_wakeup(tty);
+}
+
+static void port_release(struct device *dev)
+{
+ struct usb_serial_port *port = to_usb_serial_port(dev);
+
+ dbg ("%s - %s", __FUNCTION__, dev->bus_id);
+ usb_kill_urb(port->read_urb);
+ usb_free_urb(port->read_urb);
+ usb_kill_urb(port->write_urb);
+ usb_free_urb(port->write_urb);
+ usb_kill_urb(port->interrupt_in_urb);
+ usb_free_urb(port->interrupt_in_urb);
+ usb_kill_urb(port->interrupt_out_urb);
+ usb_free_urb(port->interrupt_out_urb);
+ kfree(port->bulk_in_buffer);
+ kfree(port->bulk_out_buffer);
+ kfree(port->interrupt_in_buffer);
+ kfree(port->interrupt_out_buffer);
+ kfree(port);
+}
+
+static struct usb_serial * create_serial (struct usb_device *dev,
+ struct usb_interface *interface,
+ struct usb_serial_device_type *type)
+{
+ struct usb_serial *serial;
+
+ serial = kmalloc (sizeof (*serial), GFP_KERNEL);
+ if (!serial) {
+ dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+ return NULL;
+ }
+ memset (serial, 0, sizeof(*serial));
+ serial->dev = usb_get_dev(dev);
+ serial->type = type;
+ serial->interface = interface;
+ kref_init(&serial->kref);
+
+ return serial;
+}
+
+static struct usb_serial_device_type *search_serial_device(struct usb_interface *iface)
+{
+ struct list_head *p;
+ const struct usb_device_id *id;
+ struct usb_serial_device_type *t;
+
+ /* List trough know devices and see if the usb id matches */
+ list_for_each(p, &usb_serial_driver_list) {
+ t = list_entry(p, struct usb_serial_device_type, driver_list);
+ id = usb_match_id(iface, t->id_table);
+ if (id != NULL) {
+ dbg("descriptor matches");
+ return t;
+ }
+ }
+
+ return NULL;
+}
+
+int usb_serial_probe(struct usb_interface *interface,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev (interface);
+ struct usb_serial *serial = NULL;
+ struct usb_serial_port *port;
+ struct usb_host_interface *iface_desc;
+ struct usb_endpoint_descriptor *endpoint;
+ struct usb_endpoint_descriptor *interrupt_in_endpoint[MAX_NUM_PORTS];
+ struct usb_endpoint_descriptor *interrupt_out_endpoint[MAX_NUM_PORTS];
+ struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS];
+ struct usb_endpoint_descriptor *bulk_out_endpoint[MAX_NUM_PORTS];
+ struct usb_serial_device_type *type = NULL;
+ int retval;
+ int minor;
+ int buffer_size;
+ int i;
+ int num_interrupt_in = 0;
+ int num_interrupt_out = 0;
+ int num_bulk_in = 0;
+ int num_bulk_out = 0;
+ int num_ports = 0;
+ int max_endpoints;
+
+ type = search_serial_device(interface);
+ if (!type) {
+ dbg("none matched");
+ return -ENODEV;
+ }
+
+ serial = create_serial (dev, interface, type);
+ if (!serial) {
+ dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
+ return -ENOMEM;
+ }
+
+ /* if this device type has a probe function, call it */
+ if (type->probe) {
+ const struct usb_device_id *id;
+
+ if (!try_module_get(type->owner)) {
+ dev_err(&interface->dev, "module get failed, exiting\n");
+ kfree (serial);
+ return -EIO;
+ }
+
+ id = usb_match_id(interface, type->id_table);
+ retval = type->probe(serial, id);
+ module_put(type->owner);
+
+ if (retval) {
+ dbg ("sub driver rejected device");
+ kfree (serial);
+ return retval;
+ }
+ }
+
+ /* descriptor matches, let's find the endpoints needed */
+ /* check out the endpoints */
+ iface_desc = interface->cur_altsetting;
+ for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
+ endpoint = &iface_desc->endpoint[i].desc;
+
+ if ((endpoint->bEndpointAddress & 0x80) &&
+ ((endpoint->bmAttributes & 3) == 0x02)) {
+ /* we found a bulk in endpoint */
+ dbg("found bulk in on endpoint %d", i);
+ bulk_in_endpoint[num_bulk_in] = endpoint;
+ ++num_bulk_in;
+ }
+
+ if (((endpoint->bEndpointAddress & 0x80) == 0x00) &&
+ ((endpoint->bmAttributes & 3) == 0x02)) {
+ /* we found a bulk out endpoint */
+ dbg("found bulk out on endpoint %d", i);
+ bulk_out_endpoint[num_bulk_out] = endpoint;
+ ++num_bulk_out;
+ }
+
+ if ((endpoint->bEndpointAddress & 0x80) &&
+ ((endpoint->bmAttributes & 3) == 0x03)) {
+ /* we found a interrupt in endpoint */
+ dbg("found interrupt in on endpoint %d", i);
+ interrupt_in_endpoint[num_interrupt_in] = endpoint;
+ ++num_interrupt_in;
+ }
+
+ if (((endpoint->bEndpointAddress & 0x80) == 0x00) &&
+ ((endpoint->bmAttributes & 3) == 0x03)) {
+ /* we found an interrupt out endpoint */
+ dbg("found interrupt out on endpoint %d", i);
+ interrupt_out_endpoint[num_interrupt_out] = endpoint;
+ ++num_interrupt_out;
+ }
+ }
+
+#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 (((le16_to_cpu(dev->descriptor.idVendor) == PL2303_VENDOR_ID) &&
+ (le16_to_cpu(dev->descriptor.idProduct) == PL2303_PRODUCT_ID)) ||
+ ((le16_to_cpu(dev->descriptor.idVendor) == ATEN_VENDOR_ID) &&
+ (le16_to_cpu(dev->descriptor.idProduct) == ATEN_PRODUCT_ID))) {
+ if (interface != dev->actconfig->interface[0]) {
+ /* check out the endpoints of the other interface*/
+ iface_desc = dev->actconfig->interface[0]->cur_altsetting;
+ for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
+ endpoint = &iface_desc->endpoint[i].desc;
+ if ((endpoint->bEndpointAddress & 0x80) &&
+ ((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) {
+ dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n");
+ kfree (serial);
+ return -ENODEV;
+ }
+ }
+ /* END HORRIBLE HACK FOR PL2303 */
+#endif
+
+ /* found all that we need */
+ dev_info(&interface->dev, "%s converter detected\n", type->name);
+
+#ifdef CONFIG_USB_SERIAL_GENERIC
+ if (type == &usb_serial_generic_device) {
+ num_ports = num_bulk_out;
+ if (num_ports == 0) {
+ dev_err(&interface->dev, "Generic device with no bulk out, not allowed.\n");
+ kfree (serial);
+ return -EIO;
+ }
+ }
+#endif
+ if (!num_ports) {
+ /* if this device type has a calc_num_ports function, call it */
+ if (type->calc_num_ports) {
+ if (!try_module_get(type->owner)) {
+ dev_err(&interface->dev, "module get failed, exiting\n");
+ kfree (serial);
+ return -EIO;
+ }
+ num_ports = type->calc_num_ports (serial);
+ module_put(type->owner);
+ }
+ if (!num_ports)
+ num_ports = type->num_ports;
+ }
+
+ if (get_free_serial (serial, num_ports, &minor) == NULL) {
+ dev_err(&interface->dev, "No more free serial devices\n");
+ kfree (serial);
+ return -ENOMEM;
+ }
+
+ serial->minor = minor;
+ serial->num_ports = num_ports;
+ serial->num_bulk_in = num_bulk_in;
+ serial->num_bulk_out = num_bulk_out;
+ serial->num_interrupt_in = num_interrupt_in;
+ serial->num_interrupt_out = num_interrupt_out;
+
+ /* create our ports, we need as many as the max endpoints */
+ /* we don't use num_ports here cauz some devices have more endpoint pairs than ports */
+ max_endpoints = max(num_bulk_in, num_bulk_out);
+ max_endpoints = max(max_endpoints, num_interrupt_in);
+ max_endpoints = max(max_endpoints, num_interrupt_out);
+ max_endpoints = max(max_endpoints, (int)serial->num_ports);
+ serial->num_port_pointers = max_endpoints;
+ dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints);
+ for (i = 0; i < max_endpoints; ++i) {
+ port = kmalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
+ if (!port)
+ goto probe_error;
+ memset(port, 0x00, sizeof(struct usb_serial_port));
+ port->number = i + serial->minor;
+ port->serial = serial;
+ INIT_WORK(&port->work, usb_serial_port_softint, port);
+ serial->port[i] = port;
+ }
+
+ /* set up the endpoint information */
+ for (i = 0; i < num_bulk_in; ++i) {
+ endpoint = bulk_in_endpoint[i];
+ port = serial->port[i];
+ port->read_urb = usb_alloc_urb (0, GFP_KERNEL);
+ if (!port->read_urb) {
+ dev_err(&interface->dev, "No free urbs available\n");
+ goto probe_error;
+ }
+ buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ port->bulk_in_size = buffer_size;
+ port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
+ port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
+ if (!port->bulk_in_buffer) {
+ dev_err(&interface->dev, "Couldn't allocate bulk_in_buffer\n");
+ 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,
+ port);
+ }
+
+ for (i = 0; i < num_bulk_out; ++i) {
+ endpoint = bulk_out_endpoint[i];
+ port = serial->port[i];
+ port->write_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!port->write_urb) {
+ dev_err(&interface->dev, "No free urbs available\n");
+ goto probe_error;
+ }
+ buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ port->bulk_out_size = buffer_size;
+ port->bulk_out_endpointAddress = endpoint->bEndpointAddress;
+ port->bulk_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
+ if (!port->bulk_out_buffer) {
+ dev_err(&interface->dev, "Couldn't allocate bulk_out_buffer\n");
+ 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,
+ port);
+ }
+
+ if (serial->type->read_int_callback) {
+ for (i = 0; i < num_interrupt_in; ++i) {
+ endpoint = interrupt_in_endpoint[i];
+ port = serial->port[i];
+ port->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!port->interrupt_in_urb) {
+ dev_err(&interface->dev, "No free urbs available\n");
+ goto probe_error;
+ }
+ buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ port->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
+ port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
+ if (!port->interrupt_in_buffer) {
+ dev_err(&interface->dev, "Couldn't allocate interrupt_in_buffer\n");
+ 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);
+ }
+ } else if (num_interrupt_in) {
+ dbg("the device claims to support interrupt in transfers, but read_int_callback is not defined");
+ }
+
+ if (serial->type->write_int_callback) {
+ for (i = 0; i < num_interrupt_out; ++i) {
+ endpoint = interrupt_out_endpoint[i];
+ port = serial->port[i];
+ port->interrupt_out_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!port->interrupt_out_urb) {
+ dev_err(&interface->dev, "No free urbs available\n");
+ goto probe_error;
+ }
+ buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ port->interrupt_out_size = buffer_size;
+ port->interrupt_out_endpointAddress = endpoint->bEndpointAddress;
+ port->interrupt_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
+ if (!port->interrupt_out_buffer) {
+ dev_err(&interface->dev, "Couldn't allocate interrupt_out_buffer\n");
+ goto probe_error;
+ }
+ usb_fill_int_urb (port->interrupt_out_urb, dev,
+ usb_sndintpipe (dev,
+ endpoint->bEndpointAddress),
+ port->interrupt_out_buffer, buffer_size,
+ serial->type->write_int_callback, port,
+ endpoint->bInterval);
+ }
+ } else if (num_interrupt_out) {
+ dbg("the device claims to support interrupt out transfers, but write_int_callback is not defined");
+ }
+
+ /* if this device type has an attach function, call it */
+ if (type->attach) {
+ if (!try_module_get(type->owner)) {
+ dev_err(&interface->dev, "module get failed, exiting\n");
+ goto probe_error;
+ }
+ retval = type->attach (serial);
+ module_put(type->owner);
+ if (retval < 0)
+ goto probe_error;
+ if (retval > 0) {
+ /* quietly accept this device, but don't bind to a serial port
+ * as it's about to disappear */
+ goto exit;
+ }
+ }
+
+ /* register all of the individual ports with the driver core */
+ for (i = 0; i < num_ports; ++i) {
+ port = serial->port[i];
+ port->dev.parent = &interface->dev;
+ port->dev.driver = NULL;
+ port->dev.bus = &usb_serial_bus_type;
+ port->dev.release = &port_release;
+
+ snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number);
+ dbg ("%s - registering %s", __FUNCTION__, port->dev.bus_id);
+ device_register (&port->dev);
+ }
+
+ usb_serial_console_init (debug, minor);
+
+exit:
+ /* success */
+ usb_set_intfdata (interface, serial);
+ return 0;
+
+probe_error:
+ for (i = 0; i < num_bulk_in; ++i) {
+ port = serial->port[i];
+ if (!port)
+ continue;
+ if (port->read_urb)
+ usb_free_urb (port->read_urb);
+ kfree(port->bulk_in_buffer);
+ }
+ for (i = 0; i < num_bulk_out; ++i) {
+ port = serial->port[i];
+ if (!port)
+ continue;
+ if (port->write_urb)
+ usb_free_urb (port->write_urb);
+ kfree(port->bulk_out_buffer);
+ }
+ for (i = 0; i < num_interrupt_in; ++i) {
+ port = serial->port[i];
+ if (!port)
+ continue;
+ if (port->interrupt_in_urb)
+ usb_free_urb (port->interrupt_in_urb);
+ kfree(port->interrupt_in_buffer);
+ }
+ for (i = 0; i < num_interrupt_out; ++i) {
+ port = serial->port[i];
+ if (!port)
+ continue;
+ if (port->interrupt_out_urb)
+ usb_free_urb (port->interrupt_out_urb);
+ kfree(port->interrupt_out_buffer);
+ }
+
+ /* return the minor range that this device had */
+ return_serial (serial);
+
+ /* free up any memory that we allocated */
+ for (i = 0; i < serial->num_port_pointers; ++i)
+ kfree(serial->port[i]);
+ kfree (serial);
+ return -EIO;
+}
+
+void usb_serial_disconnect(struct usb_interface *interface)
+{
+ int i;
+ struct usb_serial *serial = usb_get_intfdata (interface);
+ struct device *dev = &interface->dev;
+ struct usb_serial_port *port;
+
+ dbg ("%s", __FUNCTION__);
+
+ usb_set_intfdata (interface, NULL);
+ if (serial) {
+ for (i = 0; i < serial->num_ports; ++i) {
+ port = serial->port[i];
+ if (port && port->tty)
+ tty_hangup(port->tty);
+ }
+ /* let the last holder of this object
+ * cause it to be cleaned up */
+ kref_put(&serial->kref, destroy_serial);
+ }
+ dev_info(dev, "device disconnected\n");
+}
+
+static struct tty_operations serial_ops = {
+ .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,
+ .tiocmget = serial_tiocmget,
+ .tiocmset = serial_tiocmset,
+};
+
+struct tty_driver *usb_serial_tty_driver;
+
+static int __init usb_serial_init(void)
+{
+ int i;
+ int result;
+
+ usb_serial_tty_driver = alloc_tty_driver(SERIAL_TTY_MINORS);
+ if (!usb_serial_tty_driver)
+ return -ENOMEM;
+
+ /* Initialize our global data */
+ for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
+ serial_table[i] = NULL;
+ }
+
+ result = bus_register(&usb_serial_bus_type);
+ if (result) {
+ err("%s - registering bus driver failed", __FUNCTION__);
+ goto exit_bus;
+ }
+
+ /* register the generic driver, if we should */
+ result = usb_serial_generic_register(debug);
+ if (result < 0) {
+ err("%s - registering generic driver failed", __FUNCTION__);
+ goto exit_generic;
+ }
+
+ usb_serial_tty_driver->owner = THIS_MODULE;
+ usb_serial_tty_driver->driver_name = "usbserial";
+ usb_serial_tty_driver->devfs_name = "usb/tts/";
+ usb_serial_tty_driver->name = "ttyUSB";
+ usb_serial_tty_driver->major = SERIAL_TTY_MAJOR;
+ usb_serial_tty_driver->minor_start = 0;
+ usb_serial_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
+ usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL;
+ usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+ usb_serial_tty_driver->init_termios = tty_std_termios;
+ usb_serial_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+ tty_set_operations(usb_serial_tty_driver, &serial_ops);
+ result = tty_register_driver(usb_serial_tty_driver);
+ if (result) {
+ err("%s - tty_register_driver failed", __FUNCTION__);
+ goto exit_reg_driver;
+ }
+
+ /* register the USB driver */
+ result = usb_register(&usb_serial_driver);
+ if (result < 0) {
+ err("%s - usb_register failed", __FUNCTION__);
+ goto exit_tty;
+ }
+
+ info(DRIVER_DESC " " DRIVER_VERSION);
+
+ return result;
+
+exit_tty:
+ tty_unregister_driver(usb_serial_tty_driver);
+
+exit_reg_driver:
+ usb_serial_generic_deregister();
+
+exit_generic:
+ bus_unregister(&usb_serial_bus_type);
+
+exit_bus:
+ err ("%s - returning with error %d", __FUNCTION__, result);
+ put_tty_driver(usb_serial_tty_driver);
+ return result;
+}
+
+
+static void __exit usb_serial_exit(void)
+{
+ usb_serial_console_exit();
+
+ usb_serial_generic_deregister();
+
+ usb_deregister(&usb_serial_driver);
+ tty_unregister_driver(usb_serial_tty_driver);
+ put_tty_driver(usb_serial_tty_driver);
+ bus_unregister(&usb_serial_bus_type);
+}
+
+
+module_init(usb_serial_init);
+module_exit(usb_serial_exit);
+
+#define set_to_generic_if_null(type, function) \
+ do { \
+ if (!type->function) { \
+ type->function = usb_serial_generic_##function; \
+ dbg("Had to override the " #function \
+ " usb serial operation with the generic one.");\
+ } \
+ } while (0)
+
+static void fixup_generic(struct usb_serial_device_type *device)
+{
+ set_to_generic_if_null(device, open);
+ set_to_generic_if_null(device, write);
+ set_to_generic_if_null(device, close);
+ set_to_generic_if_null(device, write_room);
+ set_to_generic_if_null(device, chars_in_buffer);
+ set_to_generic_if_null(device, read_bulk_callback);
+ set_to_generic_if_null(device, write_bulk_callback);
+ set_to_generic_if_null(device, shutdown);
+}
+
+int usb_serial_register(struct usb_serial_device_type *new_device)
+{
+ int retval;
+
+ fixup_generic(new_device);
+
+ /* Add this device to our list of devices */
+ list_add(&new_device->driver_list, &usb_serial_driver_list);
+
+ retval = usb_serial_bus_register(new_device);
+ if (retval) {
+ err("problem %d when registering driver %s", retval, new_device->name);
+ list_del(&new_device->driver_list);
+ }
+ else
+ info("USB Serial support registered for %s", new_device->name);
+
+ return retval;
+}
+
+
+void usb_serial_deregister(struct usb_serial_device_type *device)
+{
+ info("USB Serial deregistering driver %s", device->name);
+ list_del(&device->driver_list);
+ usb_serial_bus_deregister(device);
+}
+
+
+
+/* If the usb-serial core is built into the core, the usb-serial drivers
+ need these symbols to load properly as modules. */
+EXPORT_SYMBOL_GPL(usb_serial_register);
+EXPORT_SYMBOL_GPL(usb_serial_deregister);
+EXPORT_SYMBOL_GPL(usb_serial_probe);
+EXPORT_SYMBOL_GPL(usb_serial_disconnect);
+EXPORT_SYMBOL_GPL(usb_serial_port_softint);
+
+
+/* Module information */
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_VERSION( DRIVER_VERSION );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
new file mode 100644
index 000000000000..d1f0c4057fa6
--- /dev/null
+++ b/drivers/usb/serial/usb-serial.h
@@ -0,0 +1,332 @@
+/*
+ * USB Serial Converter driver
+ *
+ * Copyright (C) 1999 - 2004
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * (03/26/2002) gkh
+ * removed the port->tty check from port_paranoia_check() due to serial
+ * consoles not having a tty device assigned to them.
+ *
+ * (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.
+ *
+ * (05/30/2001) gkh
+ * added sem to port structure and removed port_lock
+ *
+ * (10/05/2000) gkh
+ * Added interrupt_in_endpointAddress and bulk_in_endpointAddress to help
+ * fix bug with urb->dev not being set properly, now that the usb core
+ * needs it.
+ *
+ * (09/11/2000) gkh
+ * Added usb_serial_debug_data function to help get rid of #DEBUG in the
+ * drivers.
+ *
+ * (08/28/2000) gkh
+ * Added port_lock to port structure.
+ *
+ * (08/08/2000) gkh
+ * Added open_count to port structure.
+ *
+ * (07/23/2000) gkh
+ * Added bulk_out_endpointAddress to port structure.
+ *
+ * (07/19/2000) gkh, pberger, and borchers
+ * Modifications to allow usb-serial drivers to be modules.
+ *
+ *
+ */
+
+
+#ifndef __LINUX_USB_SERIAL_H
+#define __LINUX_USB_SERIAL_H
+
+#include <linux/config.h>
+#include <linux/kref.h>
+
+#define SERIAL_TTY_MAJOR 188 /* Nice legal number now */
+#define SERIAL_TTY_MINORS 255 /* loads of devices :) */
+
+#define MAX_NUM_PORTS 8 /* The maximum number of ports one device can grab at once */
+
+/* parity check flag */
+#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
+
+/**
+ * usb_serial_port: structure for the specific ports of a device.
+ * @serial: pointer back to the struct usb_serial owner of this port.
+ * @tty: pointer to the corresponding 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.
+ * @interrupt_out_buffer: pointer to the interrupt out buffer for this port.
+ * @interrupt_out_size: the size of the interrupt_out_buffer, in bytes.
+ * @interrupt_out_urb: pointer to the interrupt out struct urb for this port.
+ * @interrupt_out_endpointAddress: endpoint address for the interrupt out 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.
+ * @work: work queue entry for the line discipline waking up.
+ * @open_count: number of times this port has been opened.
+ *
+ * This structure is used by the usb-serial core and drivers for the specific
+ * ports of a device.
+ */
+struct usb_serial_port {
+ struct usb_serial * serial;
+ struct tty_struct * tty;
+ unsigned char number;
+
+ unsigned char * interrupt_in_buffer;
+ struct urb * interrupt_in_urb;
+ __u8 interrupt_in_endpointAddress;
+
+ unsigned char * interrupt_out_buffer;
+ int interrupt_out_size;
+ struct urb * interrupt_out_urb;
+ __u8 interrupt_out_endpointAddress;
+
+ unsigned char * bulk_in_buffer;
+ int bulk_in_size;
+ struct urb * read_urb;
+ __u8 bulk_in_endpointAddress;
+
+ unsigned char * bulk_out_buffer;
+ int bulk_out_size;
+ struct urb * write_urb;
+ __u8 bulk_out_endpointAddress;
+
+ wait_queue_head_t write_wait;
+ struct work_struct work;
+ int open_count;
+ struct device dev;
+};
+#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
+
+/* get and set the port private data pointer helper functions */
+static inline void *usb_get_serial_port_data (struct usb_serial_port *port)
+{
+ return dev_get_drvdata(&port->dev);
+}
+
+static inline void usb_set_serial_port_data (struct usb_serial_port *port, void *data)
+{
+ dev_set_drvdata(&port->dev, data);
+}
+
+/**
+ * usb_serial - structure used by the usb-serial core for a device
+ * @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_interrupt_out: number of interrupt out endpoints we have
+ * @num_bulk_in: number of bulk in endpoints we have
+ * @num_bulk_out: number of bulk out endpoints we have
+ * @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. Use usb_get_serial_data() and
+ * usb_set_serial_data() to access this.
+ */
+struct usb_serial {
+ struct usb_device * dev;
+ struct usb_serial_device_type * type;
+ struct usb_interface * interface;
+ unsigned char minor;
+ unsigned char num_ports;
+ unsigned char num_port_pointers;
+ char num_interrupt_in;
+ char num_interrupt_out;
+ char num_bulk_in;
+ char num_bulk_out;
+ struct usb_serial_port * port[MAX_NUM_PORTS];
+ struct kref kref;
+ void * private;
+};
+#define to_usb_serial(d) container_of(d, struct usb_serial, kref)
+
+#define NUM_DONT_CARE (-1)
+
+/* get and set the serial private data pointer helper functions */
+static inline void *usb_get_serial_data (struct usb_serial *serial)
+{
+ return serial->private;
+}
+
+static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
+{
+ serial->private = data;
+}
+
+/**
+ * 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.
+ * @short_name: a pointer to a string that describes this device in
+ * KOBJ_NAME_LEN characters or less. This is used for the sysfs interface
+ * to describe the driver.
+ * @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_interrupt_out: the number of interrupt out 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()
+ * @probe: pointer to the driver's probe 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.
+ * @attach: pointer to the driver's attach function.
+ * This will be called when the struct usb_serial structure is fully set
+ * set up. Do any local initialization of the device, or any private
+ * memory structure allocation at this point in time.
+ * @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;
+ char *short_name;
+ const struct usb_device_id *id_table;
+ char num_interrupt_in;
+ char num_interrupt_out;
+ char num_bulk_in;
+ char num_bulk_out;
+ char num_ports;
+
+ struct list_head driver_list;
+ struct device_driver driver;
+
+ int (*probe) (struct usb_serial *serial, const struct usb_device_id *id);
+ int (*attach) (struct usb_serial *serial);
+ int (*calc_num_ports) (struct usb_serial *serial);
+
+ void (*shutdown) (struct usb_serial *serial);
+
+ int (*port_probe) (struct usb_serial_port *port);
+ int (*port_remove) (struct usb_serial_port *port);
+
+ /* serial function calls */
+ int (*open) (struct usb_serial_port *port, struct file * filp);
+ void (*close) (struct usb_serial_port *port, struct file * filp);
+ int (*write) (struct usb_serial_port *port, const unsigned char *buf, int count);
+ int (*write_room) (struct usb_serial_port *port);
+ int (*ioctl) (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
+ void (*set_termios) (struct usb_serial_port *port, struct termios * old);
+ void (*break_ctl) (struct usb_serial_port *port, int break_state);
+ int (*chars_in_buffer) (struct usb_serial_port *port);
+ void (*throttle) (struct usb_serial_port *port);
+ void (*unthrottle) (struct usb_serial_port *port);
+ int (*tiocmget) (struct usb_serial_port *port, struct file *file);
+ int (*tiocmset) (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
+
+ void (*read_int_callback)(struct urb *urb, struct pt_regs *regs);
+ void (*write_int_callback)(struct urb *urb, struct pt_regs *regs);
+ void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs);
+ void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs);
+};
+#define to_usb_serial_driver(d) container_of(d, struct usb_serial_device_type, driver)
+
+extern int usb_serial_register(struct usb_serial_device_type *new_device);
+extern void usb_serial_deregister(struct usb_serial_device_type *device);
+extern void usb_serial_port_softint(void *private);
+
+extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id);
+extern void usb_serial_disconnect(struct usb_interface *iface);
+
+extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest);
+extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit);
+
+/* USB Serial console functions */
+#ifdef CONFIG_USB_SERIAL_CONSOLE
+extern void usb_serial_console_init (int debug, int minor);
+extern void usb_serial_console_exit (void);
+#else
+static inline void usb_serial_console_init (int debug, int minor) { }
+static inline void usb_serial_console_exit (void) { }
+#endif
+
+/* Functions needed by other parts of the usbserial core */
+extern struct usb_serial *usb_serial_get_by_index (unsigned int minor);
+extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp);
+extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count);
+extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp);
+extern int usb_serial_generic_write_room (struct usb_serial_port *port);
+extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port);
+extern void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+extern void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+extern void usb_serial_generic_shutdown (struct usb_serial *serial);
+extern int usb_serial_generic_register (int debug);
+extern void usb_serial_generic_deregister (void);
+
+extern int usb_serial_bus_register (struct usb_serial_device_type *device);
+extern void usb_serial_bus_deregister (struct usb_serial_device_type *device);
+
+extern struct usb_serial_device_type usb_serial_generic_device;
+extern struct bus_type usb_serial_bus_type;
+extern struct tty_driver *usb_serial_tty_driver;
+
+static inline void usb_serial_debug_data(int debug,
+ struct device *dev,
+ const char *function, int size,
+ const unsigned char *data)
+{
+ int i;
+
+ if (debug) {
+ dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ", function, size);
+ for (i = 0; i < size; ++i)
+ printk ("%.2x ", data[i]);
+ printk ("\n");
+ }
+}
+
+/* Use our own dbg macro */
+#undef dbg
+#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg); } while (0)
+
+
+
+#endif /* ifdef __LINUX_USB_SERIAL_H */
+
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
new file mode 100644
index 000000000000..69d313e98fad
--- /dev/null
+++ b/drivers/usb/serial/visor.c
@@ -0,0 +1,1161 @@
+/*
+ * USB HandSpring Visor, Palm m50x, and Sony Clie driver
+ * (supports all of the Palm OS USB devices)
+ *
+ * Copyright (C) 1999 - 2004
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * (06/03/2003) Judd Montgomery <judd at jpilot.org>
+ * Added support for module parameter options for untested/unknown
+ * devices.
+ *
+ * (03/09/2003) gkh
+ * Added support for the Sony Clie NZ90V device. Thanks to Martin Brachtl
+ * <brachtl@redgrep.cz> for the information.
+ *
+ * (03/05/2003) gkh
+ * Think Treo support is now working.
+ *
+ * (04/03/2002) gkh
+ * Added support for the Sony OS 4.1 devices. Thanks to Hiroyuki ARAKI
+ * <hiro@zob.ne.jp> for the information.
+ *
+ * (03/27/2002) gkh
+ * Removed assumptions that port->tty was always valid (is not true
+ * for usb serial console devices.)
+ *
+ * (03/23/2002) gkh
+ * Added support for the Palm i705 device, thanks to Thomas Riemer
+ * <tom@netmech.com> for the information.
+ *
+ * (03/21/2002) gkh
+ * Added support for the Palm m130 device, thanks to Udo Eisenbarth
+ * <udo.eisenbarth@web.de> for the information.
+ *
+ * (02/27/2002) gkh
+ * Reworked the urb handling logic. We have no more pool, but dynamically
+ * allocate the urb and the transfer buffer on the fly. In testing this
+ * does not incure any measurable overhead. This also relies on the fact
+ * that we have proper reference counting logic for urbs.
+ *
+ * (02/21/2002) SilaS
+ * Added initial support for the Palm m515 devices.
+ *
+ * (02/14/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é devices that lie about the number of ports they have.
+ *
+ * (08/30/2001) gkh
+ * Added support for the Clie devices, both the 3.5 and 4.0 os versions.
+ * Many thanks to Daniel Burke, and Bryan Payne for helping with this.
+ *
+ * (08/23/2001) gkh
+ * fixed a few potential bugs pointed out by Oliver Neukum.
+ *
+ * (05/30/2001) gkh
+ * switched from using spinlock to a semaphore, which fixes lots of problems.
+ *
+ * (05/28/2000) gkh
+ * Added initial support for the Palm m500 and Palm m505 devices.
+ *
+ * (04/08/2001) gb
+ * Identify version on module load.
+ *
+ * (01/21/2000) gkh
+ * Added write_room and chars_in_buffer, as they were previously using the
+ * generic driver versions which is all wrong now that we are using an urb
+ * pool. Thanks to Wolfgang Grandegger for pointing this out to me.
+ * Removed count assignment in the write function, which was not needed anymore
+ * either. Thanks to Al Borchers for pointing this out.
+ *
+ * (12/12/2000) gkh
+ * Moved MOD_DEC to end of visor_close to be nicer, as the final write
+ * message can sleep.
+ *
+ * (11/12/2000) gkh
+ * Fixed bug with data being dropped on the floor by forcing tty->low_latency
+ * to be on. Hopefully this fixes the OHCI issue!
+ *
+ * (11/01/2000) Adam J. Richter
+ * usb_device_id table support
+ *
+ * (10/05/2000) gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.
+ *
+ * (09/11/2000) gkh
+ * Got rid of always calling kmalloc for every urb we wrote out to the
+ * device.
+ * Added visor_read_callback so we can keep track of bytes in and out for
+ * those people who like to know the speed of their device.
+ * Removed DEBUG #ifdefs with call to usb_serial_debug_data
+ *
+ * (09/06/2000) gkh
+ * Fixed oops in visor_exit. Need to uncomment usb_unlink_urb call _after_
+ * the host controller drivers set urb->dev = NULL when the urb is finished.
+ *
+ * (08/28/2000) gkh
+ * Added locks for SMP safeness.
+ *
+ * (08/08/2000) gkh
+ * Fixed endian problem in visor_startup.
+ * Fixed MOD_INC and MOD_DEC logic and the ability to open a port more
+ * than once.
+ *
+ * (07/23/2000) gkh
+ * Added pool of write urbs to speed up transfers to the visor.
+ *
+ * (07/19/2000) gkh
+ * Added module_init and module_exit functions to handle the fact that this
+ * driver is a loadable module now.
+ *
+ * (07/03/2000) gkh
+ * Added visor_set_ioctl and visor_set_termios functions (they don't do much
+ * of anything, but are good for debugging.)
+ *
+ * (06/25/2000) gkh
+ * Fixed bug in visor_unthrottle that should help with the disconnect in PPP
+ * bug that people have been reporting.
+ *
+ * (06/23/2000) gkh
+ * Cleaned up debugging statements in a quest to find UHCI timeout bug.
+ *
+ * (04/27/2000) Ryan VanderBijl
+ * Fixed memory leak in visor_close
+ *
+ * (03/26/2000) gkh
+ * Split driver up into device specific pieces.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+#include "usb-serial.h"
+#include "visor.h"
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v2.1"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>"
+#define DRIVER_DESC "USB HandSpring Visor / Palm OS driver"
+
+/* function prototypes for a handspring visor */
+static int visor_open (struct usb_serial_port *port, struct file *filp);
+static void visor_close (struct usb_serial_port *port, struct file *filp);
+static int visor_write (struct usb_serial_port *port, const unsigned char *buf, int count);
+static int visor_write_room (struct usb_serial_port *port);
+static int visor_chars_in_buffer (struct usb_serial_port *port);
+static void visor_throttle (struct usb_serial_port *port);
+static void visor_unthrottle (struct usb_serial_port *port);
+static int visor_probe (struct usb_serial *serial, const struct usb_device_id *id);
+static int visor_calc_num_ports(struct usb_serial *serial);
+static void visor_shutdown (struct usb_serial *serial);
+static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
+static void visor_set_termios (struct usb_serial_port *port, struct termios *old_termios);
+static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+static void visor_read_int_callback (struct urb *urb, struct pt_regs *regs);
+static int clie_3_5_startup (struct usb_serial *serial);
+static int treo_attach (struct usb_serial *serial);
+static int clie_5_attach (struct usb_serial *serial);
+static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_id *id);
+static int palm_os_4_probe (struct usb_serial *serial, const struct usb_device_id *id);
+
+/* Parameters that may be passed into the module. */
+static int debug;
+static __u16 vendor;
+static __u16 product;
+
+static struct usb_device_id id_table [] = {
+ { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_3_probe },
+ { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO600_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_M100_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_TUNGSTEN_T_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_TUNGSTEN_Z_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_ZIRE31_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_ZIRE_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NX60_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NZ90V_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_TJ25_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(GARMIN_VENDOR_ID, GARMIN_IQUE_3600_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { }, /* optional parameter entry */
+ { } /* Terminating entry */
+};
+
+static struct usb_device_id clie_id_5_table [] = {
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_UX50_ID),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe },
+ { }, /* optional parameter entry */
+ { } /* 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 struct usb_device_id id_table_combined [] = {
+ { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
+ { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO_ID) },
+ { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO600_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_M100_ID) },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID) },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_TUNGSTEN_T_ID) },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_TUNGSTEN_Z_ID) },
+ { USB_DEVICE(PALM_VENDOR_ID, PALM_ZIRE31_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) },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NX60_ID) },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NZ90V_ID) },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_UX50_ID) },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_TJ25_ID) },
+ { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID) },
+ { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID) },
+ { USB_DEVICE(GARMIN_VENDOR_ID, GARMIN_IQUE_3600_ID) },
+ { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID) },
+ { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID) },
+ { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID) },
+ { }, /* optional parameter entry */
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
+static struct usb_driver visor_driver = {
+ .owner = THIS_MODULE,
+ .name = "visor",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = 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 OS",
+ .short_name = "visor",
+ .id_table = id_table,
+ .num_interrupt_in = NUM_DONT_CARE,
+ .num_bulk_in = 2,
+ .num_bulk_out = 2,
+ .num_ports = 2,
+ .open = visor_open,
+ .close = visor_close,
+ .throttle = visor_throttle,
+ .unthrottle = visor_unthrottle,
+ .attach = treo_attach,
+ .probe = visor_probe,
+ .calc_num_ports = visor_calc_num_ports,
+ .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,
+ .read_int_callback = visor_read_int_callback,
+};
+
+/* All of the device info needed for the Clie UX50, TH55 Palm 5.0 devices */
+static struct usb_serial_device_type clie_5_device = {
+ .owner = THIS_MODULE,
+ .name = "Sony Clie 5.0",
+ .short_name = "clie_5",
+ .id_table = clie_id_5_table,
+ .num_interrupt_in = NUM_DONT_CARE,
+ .num_bulk_in = 2,
+ .num_bulk_out = 2,
+ .num_ports = 2,
+ .open = visor_open,
+ .close = visor_close,
+ .throttle = visor_throttle,
+ .unthrottle = visor_unthrottle,
+ .attach = clie_5_attach,
+ .probe = visor_probe,
+ .calc_num_ports = visor_calc_num_ports,
+ .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,
+ .read_int_callback = visor_read_int_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 Clie 3.5",
+ .short_name = "clie_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,
+ .attach = 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,
+};
+
+struct visor_private {
+ spinlock_t lock;
+ int bytes_in;
+ int bytes_out;
+ int outstanding_urbs;
+ int throttled;
+};
+
+/* number of outstanding urbs to prevent userspace DoS from happening */
+#define URB_UPPER_LIMIT 42
+
+static int stats;
+
+/******************************************************************************
+ * Handspring Visor specific driver functions
+ ******************************************************************************/
+static int visor_open (struct usb_serial_port *port, struct file *filp)
+{
+ struct usb_serial *serial = port->serial;
+ struct visor_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ int result = 0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (!port->read_urb) {
+ /* this is needed for some brain dead Sony devices */
+ dev_err(&port->dev, "Device lied about number of ports, please use a lower one.\n");
+ return -ENODEV;
+ }
+
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->bytes_in = 0;
+ priv->bytes_out = 0;
+ priv->outstanding_urbs = 0;
+ priv->throttled = 0;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /*
+ * 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, GFP_KERNEL);
+ if (result) {
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n",
+ __FUNCTION__, result);
+ goto exit;
+ }
+
+ if (port->interrupt_in_urb) {
+ dbg("%s - adding interrupt input for treo", __FUNCTION__);
+ result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
+ if (result)
+ dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n",
+ __FUNCTION__, result);
+ }
+exit:
+ return result;
+}
+
+
+static void visor_close (struct usb_serial_port *port, struct file * filp)
+{
+ struct visor_private *priv = usb_get_serial_port_data(port);
+ unsigned char *transfer_buffer;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /* shutdown our urbs */
+ usb_kill_urb(port->read_urb);
+ if (port->interrupt_in_urb)
+ usb_kill_urb(port->interrupt_in_urb);
+
+ /* Try to send shutdown message, if the device is gone, this will just fail. */
+ transfer_buffer = kmalloc (0x12, GFP_KERNEL);
+ if (transfer_buffer) {
+ usb_control_msg (port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0),
+ VISOR_CLOSE_NOTIFICATION, 0xc2,
+ 0x0000, 0x0000,
+ transfer_buffer, 0x12, 300);
+ kfree (transfer_buffer);
+ }
+
+ if (stats)
+ dev_info(&port->dev, "Bytes In = %d Bytes Out = %d\n",
+ priv->bytes_in, priv->bytes_out);
+}
+
+
+static int visor_write (struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ struct visor_private *priv = usb_get_serial_port_data(port);
+ struct usb_serial *serial = port->serial;
+ struct urb *urb;
+ unsigned char *buffer;
+ unsigned long flags;
+ int status;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ if (priv->outstanding_urbs > URB_UPPER_LIMIT) {
+ spin_unlock_irqrestore(&priv->lock, flags);
+ dbg("%s - write limit hit\n", __FUNCTION__);
+ return 0;
+ }
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ buffer = kmalloc (count, GFP_ATOMIC);
+ if (!buffer) {
+ dev_err(&port->dev, "out of memory\n");
+ return -ENOMEM;
+ }
+
+ urb = usb_alloc_urb(0, GFP_ATOMIC);
+ if (!urb) {
+ dev_err(&port->dev, "no more free urbs\n");
+ kfree (buffer);
+ return -ENOMEM;
+ }
+
+ memcpy (buffer, buf, count);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer);
+
+ usb_fill_bulk_urb (urb, serial->dev,
+ usb_sndbulkpipe (serial->dev,
+ port->bulk_out_endpointAddress),
+ buffer, count,
+ visor_write_bulk_callback, port);
+
+ /* send it down the pipe */
+ status = usb_submit_urb(urb, GFP_ATOMIC);
+ if (status) {
+ dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
+ __FUNCTION__, status);
+ count = status;
+ kfree (buffer);
+ } else {
+ spin_lock_irqsave(&priv->lock, flags);
+ ++priv->outstanding_urbs;
+ priv->bytes_out += count;
+ spin_unlock_irqrestore(&priv->lock, flags);
+ }
+
+ /* we are done with this urb, so let the host driver
+ * really free it when it is finished with it */
+ usb_free_urb (urb);
+
+ return count;
+}
+
+
+static int visor_write_room (struct usb_serial_port *port)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /*
+ * We really can take anything the user throws at us
+ * but let's pick a nice big number to tell the tty
+ * layer that we have lots of free space
+ */
+ return 2048;
+}
+
+
+static int visor_chars_in_buffer (struct usb_serial_port *port)
+{
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /*
+ * We can't really account for how much data we
+ * have sent out, but hasn't made it through to the
+ * device, so just tell the tty layer that everything
+ * is flushed.
+ */
+ return 0;
+}
+
+
+static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct visor_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ /* free up the transfer buffer, as usb_free_urb() does not do this */
+ kfree (urb->transfer_buffer);
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status)
+ dbg("%s - nonzero write bulk status received: %d",
+ __FUNCTION__, urb->status);
+
+ spin_lock_irqsave(&priv->lock, flags);
+ --priv->outstanding_urbs;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ schedule_work(&port->work);
+}
+
+
+static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct visor_private *priv = usb_get_serial_port_data(port);
+ unsigned char *data = urb->transfer_buffer;
+ struct tty_struct *tty;
+ unsigned long flags;
+ int i;
+ int throttled;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (urb->status) {
+ dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __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) {
+ tty_flip_buffer_push(tty);
+ }
+ /* this doesn't actually push the data through unless tty->low_latency is set */
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->bytes_in += urb->actual_length;
+ throttled = priv->throttled;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ /* Continue trying to always read if we should */
+ if (!throttled) {
+ usb_fill_bulk_urb (port->read_urb, port->serial->dev,
+ usb_rcvbulkpipe(port->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, GFP_ATOMIC);
+ if (result)
+ dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ }
+ return;
+}
+
+static void visor_read_int_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ int result;
+
+ switch (urb->status) {
+ case 0:
+ /* success */
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbg("%s - urb shutting down with status: %d",
+ __FUNCTION__, urb->status);
+ return;
+ default:
+ dbg("%s - nonzero urb status received: %d",
+ __FUNCTION__, urb->status);
+ goto exit;
+ }
+
+ /*
+ * This information is still unknown what it can be used for.
+ * If anyone has an idea, please let the author know...
+ *
+ * Rumor has it this endpoint is used to notify when data
+ * is ready to be read from the bulk ones.
+ */
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+ urb->actual_length, urb->transfer_buffer);
+
+exit:
+ result = usb_submit_urb (urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
+ __FUNCTION__, result);
+}
+
+static void visor_throttle (struct usb_serial_port *port)
+{
+ struct visor_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->throttled = 1;
+ spin_unlock_irqrestore(&priv->lock, flags);
+}
+
+
+static void visor_unthrottle (struct usb_serial_port *port)
+{
+ struct visor_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+ int result;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+ spin_lock_irqsave(&priv->lock, flags);
+ priv->throttled = 0;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ port->read_urb->dev = port->serial->dev;
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+ if (result)
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+}
+
+static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_id *id)
+{
+ struct device *dev = &serial->dev->dev;
+ struct visor_connection_info *connection_info;
+ unsigned char *transfer_buffer;
+ char *string;
+ int retval = 0;
+ int i;
+ int num_ports = 0;
+
+ dbg("%s", __FUNCTION__);
+
+ transfer_buffer = kmalloc (sizeof (*connection_info), GFP_KERNEL);
+ if (!transfer_buffer) {
+ dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __FUNCTION__,
+ sizeof(*connection_info));
+ return -ENOMEM;
+ }
+
+ /* send a get connection info request */
+ retval = usb_control_msg (serial->dev,
+ usb_rcvctrlpipe(serial->dev, 0),
+ VISOR_GET_CONNECTION_INFORMATION,
+ 0xc2, 0x0000, 0x0000, transfer_buffer,
+ sizeof(*connection_info), 300);
+ if (retval < 0) {
+ dev_err(dev, "%s - error %d getting connection information\n",
+ __FUNCTION__, retval);
+ goto exit;
+ }
+
+ if (retval == sizeof(*connection_info)) {
+ connection_info = (struct visor_connection_info *)transfer_buffer;
+
+ num_ports = le16_to_cpu(connection_info->num_ports);
+ for (i = 0; i < num_ports; ++i) {
+ switch (connection_info->connections[i].port_function_id) {
+ case VISOR_FUNCTION_GENERIC:
+ string = "Generic";
+ break;
+ case VISOR_FUNCTION_DEBUGGER:
+ string = "Debugger";
+ break;
+ case VISOR_FUNCTION_HOTSYNC:
+ string = "HotSync";
+ break;
+ case VISOR_FUNCTION_CONSOLE:
+ string = "Console";
+ break;
+ case VISOR_FUNCTION_REMOTE_FILE_SYS:
+ string = "Remote File System";
+ break;
+ default:
+ string = "unknown";
+ break;
+ }
+ dev_info(dev, "%s: port %d, is for %s use\n",
+ serial->type->name,
+ connection_info->connections[i].port, string);
+ }
+ }
+ /*
+ * Handle devices that report invalid stuff here.
+ */
+ if (num_ports == 0 || num_ports > 2) {
+ dev_warn (dev, "%s: No valid connect info available\n",
+ serial->type->name);
+ num_ports = 2;
+ }
+
+ dev_info(dev, "%s: Number of ports: %d\n", serial->type->name,
+ num_ports);
+
+ /*
+ * save off our num_ports info so that we can use it in the
+ * calc_num_ports callback
+ */
+ usb_set_serial_data(serial, (void *)(long)num_ports);
+
+ /* ask for the number of bytes available, but ignore the response as it is broken */
+ retval = usb_control_msg (serial->dev,
+ usb_rcvctrlpipe(serial->dev, 0),
+ VISOR_REQUEST_BYTES_AVAILABLE,
+ 0xc2, 0x0000, 0x0005, transfer_buffer,
+ 0x02, 300);
+ if (retval < 0)
+ dev_err(dev, "%s - error %d getting bytes available request\n",
+ __FUNCTION__, retval);
+ retval = 0;
+
+exit:
+ kfree (transfer_buffer);
+
+ return retval;
+}
+
+static int palm_os_4_probe (struct usb_serial *serial, const struct usb_device_id *id)
+{
+ struct device *dev = &serial->dev->dev;
+ struct palm_ext_connection_info *connection_info;
+ unsigned char *transfer_buffer;
+ int retval;
+
+ dbg("%s", __FUNCTION__);
+
+ transfer_buffer = kmalloc (sizeof (*connection_info), GFP_KERNEL);
+ if (!transfer_buffer) {
+ dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __FUNCTION__,
+ sizeof(*connection_info));
+ return -ENOMEM;
+ }
+
+ retval = usb_control_msg (serial->dev,
+ usb_rcvctrlpipe(serial->dev, 0),
+ PALM_GET_EXT_CONNECTION_INFORMATION,
+ 0xc2, 0x0000, 0x0000, transfer_buffer,
+ sizeof (*connection_info), 300);
+ if (retval < 0)
+ dev_err(dev, "%s - error %d getting connection info\n",
+ __FUNCTION__, retval);
+ else
+ usb_serial_debug_data(debug, &serial->dev->dev, __FUNCTION__,
+ retval, transfer_buffer);
+
+ kfree (transfer_buffer);
+ return 0;
+}
+
+
+static int visor_probe (struct usb_serial *serial, const struct usb_device_id *id)
+{
+ int retval = 0;
+ int (*startup) (struct usb_serial *serial, const struct usb_device_id *id);
+
+ dbg("%s", __FUNCTION__);
+
+ if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
+ err("active config #%d != 1 ??",
+ serial->dev->actconfig->desc.bConfigurationValue);
+ return -ENODEV;
+ }
+
+ if (id->driver_info) {
+ startup = (void *)id->driver_info;
+ retval = startup(serial, id);
+ }
+
+ return retval;
+}
+
+static int visor_calc_num_ports (struct usb_serial *serial)
+{
+ int num_ports = (int)(long)(usb_get_serial_data(serial));
+
+ if (num_ports)
+ usb_set_serial_data(serial, NULL);
+
+ return num_ports;
+}
+
+static int generic_startup(struct usb_serial *serial)
+{
+ struct visor_private *priv;
+ int i;
+
+ for (i = 0; i < serial->num_ports; ++i) {
+ priv = kmalloc (sizeof(*priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+ memset (priv, 0x00, sizeof(*priv));
+ spin_lock_init(&priv->lock);
+ usb_set_serial_port_data(serial->port[i], priv);
+ }
+ return 0;
+}
+
+static int clie_3_5_startup (struct usb_serial *serial)
+{
+ struct device *dev = &serial->dev->dev;
+ 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, 3000);
+ if (result < 0) {
+ dev_err(dev, "%s: get config number failed: %d\n", __FUNCTION__, result);
+ return result;
+ }
+ if (result != 1) {
+ dev_err(dev, "%s: get config number bad return length: %d\n", __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_RECIP_INTERFACE,
+ 0, 0, &data, 1, 3000);
+ if (result < 0) {
+ dev_err(dev, "%s: get interface number failed: %d\n", __FUNCTION__, result);
+ return result;
+ }
+ if (result != 1) {
+ dev_err(dev, "%s: get interface number bad return length: %d\n", __FUNCTION__, result);
+ return -EIO;
+ }
+
+ return generic_startup(serial);
+}
+
+static int treo_attach (struct usb_serial *serial)
+{
+ struct usb_serial_port *swap_port;
+
+ /* Only do this endpoint hack for the Handspring devices with
+ * interrupt in endpoints, which for now are the Treo devices. */
+ if (!((le16_to_cpu(serial->dev->descriptor.idVendor) == HANDSPRING_VENDOR_ID) ||
+ (le16_to_cpu(serial->dev->descriptor.idVendor) == KYOCERA_VENDOR_ID)) ||
+ (serial->num_interrupt_in == 0))
+ goto generic_startup;
+
+ dbg("%s", __FUNCTION__);
+
+ /*
+ * It appears that Treos and Kyoceras want to use the
+ * 1st bulk in endpoint to communicate with the 2nd bulk out endpoint,
+ * so let's swap the 1st and 2nd bulk in and interrupt endpoints.
+ * Note that swapping the bulk out endpoints would break lots of
+ * apps that want to communicate on the second port.
+ */
+#define COPY_PORT(dest, src) \
+ dest->read_urb = src->read_urb; \
+ dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress; \
+ dest->bulk_in_buffer = src->bulk_in_buffer; \
+ dest->interrupt_in_urb = src->interrupt_in_urb; \
+ dest->interrupt_in_endpointAddress = src->interrupt_in_endpointAddress; \
+ dest->interrupt_in_buffer = src->interrupt_in_buffer;
+
+ swap_port = kmalloc(sizeof(*swap_port), GFP_KERNEL);
+ if (!swap_port)
+ return -ENOMEM;
+ COPY_PORT(swap_port, serial->port[0]);
+ COPY_PORT(serial->port[0], serial->port[1]);
+ COPY_PORT(serial->port[1], swap_port);
+ kfree(swap_port);
+
+generic_startup:
+ return generic_startup(serial);
+}
+
+static int clie_5_attach (struct usb_serial *serial)
+{
+ dbg("%s", __FUNCTION__);
+
+ /* TH55 registers 2 ports.
+ Communication in from the UX50/TH55 uses bulk_in_endpointAddress from port 0
+ Communication out to the UX50/TH55 uses bulk_out_endpointAddress from port 1
+
+ Lets do a quick and dirty mapping
+ */
+
+ /* some sanity check */
+ if (serial->num_ports < 2)
+ return -1;
+
+ /* port 0 now uses the modified endpoint Address */
+ serial->port[0]->bulk_out_endpointAddress = serial->port[1]->bulk_out_endpointAddress;
+
+ return generic_startup(serial);
+}
+
+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;
+}
+
+
+/* This function is all nice and good, but we don't change anything based on it :) */
+static void visor_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+{
+ unsigned int cflag;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if ((!port->tty) || (!port->tty->termios)) {
+ dbg("%s - no tty structures", __FUNCTION__);
+ 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("%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;
+}
+
+
+static int __init visor_init (void)
+{
+ int i, retval;
+ /* Only if parameters were passed to us */
+ if ((vendor>0) && (product>0)) {
+ struct usb_device_id usb_dev_temp[]=
+ {{USB_DEVICE(vendor, product),
+ .driver_info = (kernel_ulong_t)&palm_os_4_probe }};
+
+ /* Find the last entry in id_table */
+ for (i=0; ; i++) {
+ if (id_table[i].idVendor==0) {
+ id_table[i] = usb_dev_temp[0];
+ break;
+ }
+ }
+ /* Find the last entry in id_table_combined */
+ for (i=0; ; i++) {
+ if (id_table_combined[i].idVendor==0) {
+ id_table_combined[i] = usb_dev_temp[0];
+ break;
+ }
+ }
+ info("Untested USB device specified at time of module insertion");
+ info("Warning: This is not guaranteed to work");
+ info("Using a newer kernel is preferred to this method");
+ info("Adding Palm OS protocol 4.x support for unknown device: 0x%x/0x%x",
+ vendor, product);
+ }
+ retval = usb_serial_register(&handspring_device);
+ if (retval)
+ goto failed_handspring_register;
+ retval = usb_serial_register(&clie_3_5_device);
+ if (retval)
+ goto failed_clie_3_5_register;
+ retval = usb_serial_register(&clie_5_device);
+ if (retval)
+ goto failed_clie_5_register;
+ retval = usb_register(&visor_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&clie_5_device);
+failed_clie_5_register:
+ usb_serial_deregister(&clie_3_5_device);
+failed_clie_3_5_register:
+ usb_serial_deregister(&handspring_device);
+failed_handspring_register:
+ return retval;
+}
+
+
+static void __exit visor_exit (void)
+{
+ usb_deregister (&visor_driver);
+ usb_serial_deregister (&handspring_device);
+ usb_serial_deregister (&clie_3_5_device);
+ usb_serial_deregister (&clie_5_device);
+}
+
+
+module_init(visor_init);
+module_exit(visor_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+module_param(stats, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(stats, "Enables statistics or not");
+
+module_param(vendor, ushort, 0);
+MODULE_PARM_DESC(vendor, "User specified vendor ID");
+module_param(product, ushort, 0);
+MODULE_PARM_DESC(product, "User specified product ID");
+
diff --git a/drivers/usb/serial/visor.h b/drivers/usb/serial/visor.h
new file mode 100644
index 000000000000..a2fa2c61a009
--- /dev/null
+++ b/drivers/usb/serial/visor.h
@@ -0,0 +1,151 @@
+/*
+ * USB HandSpring Visor driver
+ *
+ * Copyright (C) 1999 - 2003
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ */
+
+#ifndef __LINUX_USB_SERIAL_VISOR_H
+#define __LINUX_USB_SERIAL_VISOR_H
+
+
+#define HANDSPRING_VENDOR_ID 0x082d
+#define HANDSPRING_VISOR_ID 0x0100
+#define HANDSPRING_TREO_ID 0x0200
+#define HANDSPRING_TREO600_ID 0x0300
+
+#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_TUNGSTEN_T_ID 0x0060
+#define PALM_TUNGSTEN_Z_ID 0x0031
+#define PALM_ZIRE31_ID 0x0061
+#define PALM_ZIRE_ID 0x0070
+#define PALM_M100_ID 0x0080
+
+#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
+#define SONY_CLIE_NX60_ID 0x00DA
+#define SONY_CLIE_NZ90V_ID 0x00E9
+#define SONY_CLIE_UX50_ID 0x0144
+#define SONY_CLIE_TJ25_ID 0x0169
+
+#define SAMSUNG_VENDOR_ID 0x04E8
+#define SAMSUNG_SCH_I330_ID 0x8001
+#define SAMSUNG_SPH_I500_ID 0x6601
+
+#define GARMIN_VENDOR_ID 0x091E
+#define GARMIN_IQUE_3600_ID 0x0004
+
+#define ACEECA_VENDOR_ID 0x4766
+#define ACEECA_MEZ1000_ID 0x0001
+
+#define KYOCERA_VENDOR_ID 0x0C88
+#define KYOCERA_7135_ID 0x0021
+
+#define FOSSIL_VENDOR_ID 0x0E67
+#define FOSSIL_ABACUS_ID 0x0002
+
+/****************************************************************************
+ * Handspring Visor Vendor specific request codes (bRequest values)
+ * A big thank you to Handspring for providing the following information.
+ * If anyone wants the original file where these values and structures came
+ * from, send email to <greg@kroah.com>.
+ ****************************************************************************/
+
+/****************************************************************************
+ * VISOR_REQUEST_BYTES_AVAILABLE asks the visor for the number of bytes that
+ * are available to be transferred to the host for the specified endpoint.
+ * Currently this is not used, and always returns 0x0001
+ ****************************************************************************/
+#define VISOR_REQUEST_BYTES_AVAILABLE 0x01
+
+/****************************************************************************
+ * VISOR_CLOSE_NOTIFICATION is set to the device to notify it that the host
+ * is now closing the pipe. An empty packet is sent in response.
+ ****************************************************************************/
+#define VISOR_CLOSE_NOTIFICATION 0x02
+
+/****************************************************************************
+ * VISOR_GET_CONNECTION_INFORMATION is sent by the host during enumeration to
+ * get the endpoints used by the connection.
+ ****************************************************************************/
+#define VISOR_GET_CONNECTION_INFORMATION 0x03
+
+
+/****************************************************************************
+ * VISOR_GET_CONNECTION_INFORMATION returns data in the following format
+ ****************************************************************************/
+struct visor_connection_info {
+ __le16 num_ports;
+ struct {
+ __u8 port_function_id;
+ __u8 port;
+ } connections[2];
+};
+
+
+/* struct visor_connection_info.connection[x].port defines: */
+#define VISOR_ENDPOINT_1 0x01
+#define VISOR_ENDPOINT_2 0x02
+
+/* struct visor_connection_info.connection[x].port_function_id defines: */
+#define VISOR_FUNCTION_GENERIC 0x00
+#define VISOR_FUNCTION_DEBUGGER 0x01
+#define VISOR_FUNCTION_HOTSYNC 0x02
+#define VISOR_FUNCTION_CONSOLE 0x03
+#define VISOR_FUNCTION_REMOTE_FILE_SYS 0x04
+
+
+/****************************************************************************
+ * PALM_GET_SOME_UNKNOWN_INFORMATION is sent by the host during enumeration to
+ * get some information from the M series devices, that is currently unknown.
+ ****************************************************************************/
+#define PALM_GET_EXT_CONNECTION_INFORMATION 0x04
+
+/**
+ * struct palm_ext_connection_info - return data from a PALM_GET_EXT_CONNECTION_INFORMATION request
+ * @num_ports: maximum number of functions/connections in use
+ * @endpoint_numbers_different: will be 1 if in and out endpoints numbers are
+ * different, otherwise it is 0. If value is 1, then
+ * connections.end_point_info is non-zero. If value is 0, then
+ * connections.port contains the endpoint number, which is the same for in
+ * and out.
+ * @port_function_id: contains the creator id of the applicaton that opened
+ * this connection.
+ * @port: contains the in/out endpoint number. Is 0 if in and out endpoint
+ * numbers are different.
+ * @end_point_info: high nubbe is in endpoint and low nibble will indicate out
+ * endpoint. Is 0 if in and out endpoints are the same.
+ *
+ * The maximum number of connections currently supported is 2
+ */
+struct palm_ext_connection_info {
+ __u8 num_ports;
+ __u8 endpoint_numbers_different;
+ __le16 reserved1;
+ struct {
+ __u32 port_function_id;
+ __u8 port;
+ __u8 end_point_info;
+ __le16 reserved;
+ } connections[2];
+};
+
+#endif
+
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
new file mode 100644
index 000000000000..cf3bc30675a1
--- /dev/null
+++ b/drivers/usb/serial/whiteheat.c
@@ -0,0 +1,1512 @@
+/*
+ * USB ConnectTech WhiteHEAT driver
+ *
+ * Copyright (C) 2002
+ * Connect Tech Inc.
+ *
+ * Copyright (C) 1999 - 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ * (10/09/2002) Stuart MacDonald (stuartm@connecttech.com)
+ * Upgrade to full working driver
+ *
+ * (05/30/2001) gkh
+ * switched from using spinlock to a semaphore, which fixes lots of problems.
+ *
+ * (04/08/2001) gb
+ * Identify version on module load.
+ *
+ * 2001_Mar_19 gkh
+ * Fixed MOD_INC and MOD_DEC logic, the ability to open a port more
+ * than once, and the got the proper usb_device_id table entries so
+ * the driver works again.
+ *
+ * (11/01/2000) Adam J. Richter
+ * usb_device_id table support
+ *
+ * (10/05/2000) gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.
+ *
+ * (10/03/2000) smd
+ * firmware is improved to guard against crap sent to device
+ * firmware now replies CMD_FAILURE on bad things
+ * read_callback fix you provided for private info struct
+ * command_finished now indicates success or fail
+ * setup_port struct now packed to avoid gcc padding
+ * firmware uses 1 based port numbering, driver now handles that
+ *
+ * (09/11/2000) gkh
+ * Removed DEBUG #ifdefs with call to usb_serial_debug_data
+ *
+ * (07/19/2000) gkh
+ * Added module_init and module_exit functions to handle the fact that this
+ * driver is a loadable module now.
+ * Fixed bug with port->minor that was found by Al Borchers
+ *
+ * (07/04/2000) gkh
+ * Added support for port settings. Baud rate can now be changed. Line signals
+ * are not transferred to and from the tty layer yet, but things seem to be
+ * working well now.
+ *
+ * (05/04/2000) gkh
+ * First cut at open and close commands. Data can flow through the ports at
+ * default speeds now.
+ *
+ * (03/26/2000) gkh
+ * Split driver up into device specific pieces.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <asm/termbits.h>
+#include <linux/usb.h>
+#include <linux/serial_reg.h>
+#include <linux/serial.h>
+#include "usb-serial.h"
+#include "whiteheat_fw.h" /* firmware for the ConnectTech WhiteHEAT device */
+#include "whiteheat.h" /* WhiteHEAT specific commands */
+
+static int debug;
+
+#ifndef CMSPAR
+#define CMSPAR 0
+#endif
+
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v2.0"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Stuart MacDonald <stuartm@connecttech.com>"
+#define DRIVER_DESC "USB ConnectTech WhiteHEAT driver"
+
+#define CONNECT_TECH_VENDOR_ID 0x0710
+#define CONNECT_TECH_FAKE_WHITE_HEAT_ID 0x0001
+#define CONNECT_TECH_WHITE_HEAT_ID 0x8001
+
+/*
+ ID tables for whiteheat are unusual, because we want to different
+ things for different versions of the device. Eventually, this
+ will be doable from a single table. But, for now, we define two
+ 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 */
+};
+
+static struct usb_device_id id_table_combined [] = {
+ { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
+ { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
+static struct usb_driver whiteheat_driver = {
+ .owner = THIS_MODULE,
+ .name = "whiteheat",
+ .probe = usb_serial_probe,
+ .disconnect = usb_serial_disconnect,
+ .id_table = id_table_combined,
+};
+
+/* function prototypes for the Connect Tech WhiteHEAT prerenumeration device */
+static int whiteheat_firmware_download (struct usb_serial *serial, const struct usb_device_id *id);
+static int whiteheat_firmware_attach (struct usb_serial *serial);
+
+/* function prototypes for the Connect Tech WhiteHEAT serial converter */
+static int whiteheat_attach (struct usb_serial *serial);
+static void whiteheat_shutdown (struct usb_serial *serial);
+static int whiteheat_open (struct usb_serial_port *port, struct file *filp);
+static void whiteheat_close (struct usb_serial_port *port, struct file *filp);
+static int whiteheat_write (struct usb_serial_port *port, const unsigned char *buf, int count);
+static int whiteheat_write_room (struct usb_serial_port *port);
+static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
+static void whiteheat_set_termios (struct usb_serial_port *port, struct termios * old);
+static int whiteheat_tiocmget (struct usb_serial_port *port, struct file *file);
+static int whiteheat_tiocmset (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
+static void whiteheat_break_ctl (struct usb_serial_port *port, int break_state);
+static int whiteheat_chars_in_buffer (struct usb_serial_port *port);
+static void whiteheat_throttle (struct usb_serial_port *port);
+static void whiteheat_unthrottle (struct usb_serial_port *port);
+static void whiteheat_read_callback (struct urb *urb, struct pt_regs *regs);
+static void whiteheat_write_callback (struct urb *urb, struct pt_regs *regs);
+
+static struct usb_serial_device_type whiteheat_fake_device = {
+ .owner = THIS_MODULE,
+ .name = "Connect Tech - WhiteHEAT - (prerenumeration)",
+ .short_name = "whiteheatnofirm",
+ .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,
+ .probe = whiteheat_firmware_download,
+ .attach = whiteheat_firmware_attach,
+};
+
+static struct usb_serial_device_type whiteheat_device = {
+ .owner = THIS_MODULE,
+ .name = "Connect Tech - WhiteHEAT",
+ .short_name = "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,
+ .attach = whiteheat_attach,
+ .shutdown = whiteheat_shutdown,
+ .open = whiteheat_open,
+ .close = whiteheat_close,
+ .write = whiteheat_write,
+ .write_room = whiteheat_write_room,
+ .ioctl = whiteheat_ioctl,
+ .set_termios = whiteheat_set_termios,
+ .break_ctl = whiteheat_break_ctl,
+ .tiocmget = whiteheat_tiocmget,
+ .tiocmset = whiteheat_tiocmset,
+ .chars_in_buffer = whiteheat_chars_in_buffer,
+ .throttle = whiteheat_throttle,
+ .unthrottle = whiteheat_unthrottle,
+ .read_bulk_callback = whiteheat_read_callback,
+ .write_bulk_callback = whiteheat_write_callback,
+};
+
+
+struct whiteheat_command_private {
+ spinlock_t lock;
+ __u8 port_running;
+ __u8 command_finished;
+ wait_queue_head_t wait_command; /* for handling sleeping while waiting for a command to finish */
+ __u8 result_buffer[64];
+};
+
+
+#define THROTTLED 0x01
+#define ACTUALLY_THROTTLED 0x02
+
+static int urb_pool_size = 8;
+
+struct whiteheat_urb_wrap {
+ struct list_head list;
+ struct urb *urb;
+};
+
+struct whiteheat_private {
+ spinlock_t lock;
+ __u8 flags;
+ __u8 mcr;
+ struct list_head rx_urbs_free;
+ struct list_head rx_urbs_submitted;
+ struct list_head rx_urb_q;
+ struct work_struct rx_work;
+ struct list_head tx_urbs_free;
+ struct list_head tx_urbs_submitted;
+};
+
+
+/* local function prototypes */
+static int start_command_port(struct usb_serial *serial);
+static void stop_command_port(struct usb_serial *serial);
+static void command_port_write_callback(struct urb *urb, struct pt_regs *regs);
+static void command_port_read_callback(struct urb *urb, struct pt_regs *regs);
+
+static int start_port_read(struct usb_serial_port *port);
+static struct whiteheat_urb_wrap *urb_to_wrap(struct urb *urb, struct list_head *head);
+static struct list_head *list_first(struct list_head *head);
+static void rx_data_softint(void *private);
+
+static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *data, __u8 datasize);
+static int firm_open(struct usb_serial_port *port);
+static int firm_close(struct usb_serial_port *port);
+static int firm_setup_port(struct usb_serial_port *port);
+static int firm_set_rts(struct usb_serial_port *port, __u8 onoff);
+static int firm_set_dtr(struct usb_serial_port *port, __u8 onoff);
+static int firm_set_break(struct usb_serial_port *port, __u8 onoff);
+static int firm_purge(struct usb_serial_port *port, __u8 rxtx);
+static int firm_get_dtr_rts(struct usb_serial_port *port);
+static int firm_report_tx_done(struct usb_serial_port *port);
+
+
+#define COMMAND_PORT 4
+#define COMMAND_TIMEOUT (2*HZ) /* 2 second timeout for a command */
+#define COMMAND_TIMEOUT_MS 2000
+#define CLOSING_DELAY (30 * HZ)
+
+
+/*****************************************************************************
+ * Connect Tech's White Heat prerenumeration driver functions
+ *****************************************************************************/
+
+/* steps to download the firmware to the WhiteHEAT device:
+ - hold the reset (by writing to the reset bit of the CPUCS register)
+ - download the VEND_AX.HEX file to the chip using VENDOR_REQUEST-ANCHOR_LOAD
+ - release the reset (by writing to the CPUCS register)
+ - download the WH.HEX file for all addresses greater than 0x1b3f using
+ VENDOR_REQUEST-ANCHOR_EXTERNAL_RAM_LOAD
+ - hold the reset
+ - download the WH.HEX file for all addresses less than 0x1b40 using
+ VENDOR_REQUEST_ANCHOR_LOAD
+ - release the reset
+ - device renumerated itself and comes up as new device id with all
+ firmware download completed.
+*/
+static int whiteheat_firmware_download (struct usb_serial *serial, const struct usb_device_id *id)
+{
+ int response;
+ const struct whiteheat_hex_record *record;
+
+ dbg("%s", __FUNCTION__);
+
+ response = ezusb_set_reset (serial, 1);
+
+ record = &whiteheat_loader[0];
+ while (record->address != 0xffff) {
+ 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;
+ }
+
+ response = ezusb_set_reset (serial, 0);
+
+ record = &whiteheat_firmware[0];
+ while (record->address < 0x1b40) {
+ ++record;
+ }
+ while (record->address != 0xffff) {
+ 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;
+ }
+
+ response = ezusb_set_reset (serial, 1);
+
+ record = &whiteheat_firmware[0];
+ while (record->address < 0x1b40) {
+ 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;
+ }
+
+ response = ezusb_set_reset (serial, 0);
+
+ return 0;
+}
+
+
+static int whiteheat_firmware_attach (struct usb_serial *serial)
+{
+ /* We want this device to fail to have a driver assigned to it */
+ return 1;
+}
+
+
+/*****************************************************************************
+ * Connect Tech's White Heat serial driver functions
+ *****************************************************************************/
+static int whiteheat_attach (struct usb_serial *serial)
+{
+ struct usb_serial_port *command_port;
+ struct whiteheat_command_private *command_info;
+ struct usb_serial_port *port;
+ struct whiteheat_private *info;
+ struct whiteheat_hw_info *hw_info;
+ int pipe;
+ int ret;
+ int alen;
+ __u8 *command;
+ __u8 *result;
+ int i;
+ int j;
+ struct urb *urb;
+ int buf_size;
+ struct whiteheat_urb_wrap *wrap;
+ struct list_head *tmp;
+
+ command_port = serial->port[COMMAND_PORT];
+
+ pipe = usb_sndbulkpipe (serial->dev, command_port->bulk_out_endpointAddress);
+ command = kmalloc(2, GFP_KERNEL);
+ if (!command)
+ goto no_command_buffer;
+ command[0] = WHITEHEAT_GET_HW_INFO;
+ command[1] = 0;
+
+ result = kmalloc(sizeof(*hw_info) + 1, GFP_KERNEL);
+ if (!result)
+ goto no_result_buffer;
+ /*
+ * When the module is reloaded the firmware is still there and
+ * the endpoints are still in the usb core unchanged. This is the
+ * unlinking bug in disguise. Same for the call below.
+ */
+ usb_clear_halt(serial->dev, pipe);
+ ret = usb_bulk_msg (serial->dev, pipe, command, 2, &alen, COMMAND_TIMEOUT_MS);
+ if (ret) {
+ err("%s: Couldn't send command [%d]", serial->type->name, ret);
+ goto no_firmware;
+ } else if (alen != sizeof(command)) {
+ err("%s: Send command incomplete [%d]", serial->type->name, alen);
+ goto no_firmware;
+ }
+
+ pipe = usb_rcvbulkpipe (serial->dev, command_port->bulk_in_endpointAddress);
+ /* See the comment on the usb_clear_halt() above */
+ usb_clear_halt(serial->dev, pipe);
+ ret = usb_bulk_msg (serial->dev, pipe, result, sizeof(*hw_info) + 1, &alen, COMMAND_TIMEOUT_MS);
+ if (ret) {
+ err("%s: Couldn't get results [%d]", serial->type->name, ret);
+ goto no_firmware;
+ } else if (alen != sizeof(result)) {
+ err("%s: Get results incomplete [%d]", serial->type->name, alen);
+ goto no_firmware;
+ } else if (result[0] != command[0]) {
+ err("%s: Command failed [%d]", serial->type->name, result[0]);
+ goto no_firmware;
+ }
+
+ 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);
+
+ for (i = 0; i < serial->num_ports; i++) {
+ port = serial->port[i];
+
+ info = (struct whiteheat_private *)kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL);
+ if (info == NULL) {
+ err("%s: Out of memory for port structures\n", serial->type->name);
+ goto no_private;
+ }
+
+ spin_lock_init(&info->lock);
+ info->flags = 0;
+ info->mcr = 0;
+ INIT_WORK(&info->rx_work, rx_data_softint, port);
+
+ INIT_LIST_HEAD(&info->rx_urbs_free);
+ INIT_LIST_HEAD(&info->rx_urbs_submitted);
+ INIT_LIST_HEAD(&info->rx_urb_q);
+ INIT_LIST_HEAD(&info->tx_urbs_free);
+ INIT_LIST_HEAD(&info->tx_urbs_submitted);
+
+ for (j = 0; j < urb_pool_size; j++) {
+ urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!urb) {
+ err("No free urbs available");
+ goto no_rx_urb;
+ }
+ buf_size = port->read_urb->transfer_buffer_length;
+ urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL);
+ if (!urb->transfer_buffer) {
+ err("Couldn't allocate urb buffer");
+ goto no_rx_buf;
+ }
+ wrap = kmalloc(sizeof(*wrap), GFP_KERNEL);
+ if (!wrap) {
+ err("Couldn't allocate urb wrapper");
+ goto no_rx_wrap;
+ }
+ usb_fill_bulk_urb(urb, serial->dev,
+ usb_rcvbulkpipe(serial->dev,
+ port->bulk_in_endpointAddress),
+ urb->transfer_buffer, buf_size,
+ whiteheat_read_callback, port);
+ wrap->urb = urb;
+ list_add(&wrap->list, &info->rx_urbs_free);
+
+ urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!urb) {
+ err("No free urbs available");
+ goto no_tx_urb;
+ }
+ buf_size = port->write_urb->transfer_buffer_length;
+ urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL);
+ if (!urb->transfer_buffer) {
+ err("Couldn't allocate urb buffer");
+ goto no_tx_buf;
+ }
+ wrap = kmalloc(sizeof(*wrap), GFP_KERNEL);
+ if (!wrap) {
+ err("Couldn't allocate urb wrapper");
+ goto no_tx_wrap;
+ }
+ usb_fill_bulk_urb(urb, serial->dev,
+ usb_sndbulkpipe(serial->dev,
+ port->bulk_out_endpointAddress),
+ urb->transfer_buffer, buf_size,
+ whiteheat_write_callback, port);
+ wrap->urb = urb;
+ list_add(&wrap->list, &info->tx_urbs_free);
+ }
+
+ usb_set_serial_port_data(port, info);
+ }
+
+ command_info = (struct whiteheat_command_private *)kmalloc(sizeof(struct whiteheat_command_private), GFP_KERNEL);
+ if (command_info == NULL) {
+ err("%s: Out of memory for port structures\n", serial->type->name);
+ goto no_command_private;
+ }
+
+ spin_lock_init(&command_info->lock);
+ command_info->port_running = 0;
+ init_waitqueue_head(&command_info->wait_command);
+ usb_set_serial_port_data(command_port, command_info);
+ command_port->write_urb->complete = command_port_write_callback;
+ command_port->read_urb->complete = command_port_read_callback;
+ kfree(result);
+ kfree(command);
+
+ return 0;
+
+no_firmware:
+ /* Firmware likely not running */
+ err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->name);
+ err("%s: If the firmware is not running (status led not blinking)\n", serial->type->name);
+ err("%s: please contact support@connecttech.com\n", serial->type->name);
+ return -ENODEV;
+
+no_command_private:
+ for (i = serial->num_ports - 1; i >= 0; i--) {
+ port = serial->port[i];
+ info = usb_get_serial_port_data(port);
+ for (j = urb_pool_size - 1; j >= 0; j--) {
+ tmp = list_first(&info->tx_urbs_free);
+ list_del(tmp);
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+ kfree(wrap);
+no_tx_wrap:
+ kfree(urb->transfer_buffer);
+no_tx_buf:
+ usb_free_urb(urb);
+no_tx_urb:
+ tmp = list_first(&info->rx_urbs_free);
+ list_del(tmp);
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+ kfree(wrap);
+no_rx_wrap:
+ kfree(urb->transfer_buffer);
+no_rx_buf:
+ usb_free_urb(urb);
+no_rx_urb:
+ ;
+ }
+ kfree(info);
+no_private:
+ ;
+ }
+ kfree(result);
+no_result_buffer:
+ kfree(command);
+no_command_buffer:
+ return -ENOMEM;
+}
+
+
+static void whiteheat_shutdown (struct usb_serial *serial)
+{
+ struct usb_serial_port *command_port;
+ struct usb_serial_port *port;
+ struct whiteheat_private *info;
+ struct whiteheat_urb_wrap *wrap;
+ struct urb *urb;
+ struct list_head *tmp;
+ struct list_head *tmp2;
+ int i;
+
+ dbg("%s", __FUNCTION__);
+
+ /* free up our private data for our command port */
+ command_port = serial->port[COMMAND_PORT];
+ kfree (usb_get_serial_port_data(command_port));
+
+ for (i = 0; i < serial->num_ports; i++) {
+ port = serial->port[i];
+ info = usb_get_serial_port_data(port);
+ list_for_each_safe(tmp, tmp2, &info->rx_urbs_free) {
+ list_del(tmp);
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+ kfree(wrap);
+ kfree(urb->transfer_buffer);
+ usb_free_urb(urb);
+ }
+ list_for_each_safe(tmp, tmp2, &info->tx_urbs_free) {
+ list_del(tmp);
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+ kfree(wrap);
+ kfree(urb->transfer_buffer);
+ usb_free_urb(urb);
+ }
+ kfree(info);
+ }
+
+ return;
+}
+
+
+static int whiteheat_open (struct usb_serial_port *port, struct file *filp)
+{
+ int retval = 0;
+ struct termios old_term;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ retval = start_command_port(port->serial);
+ if (retval)
+ goto exit;
+
+ if (port->tty)
+ port->tty->low_latency = 1;
+
+ /* send an open port command */
+ retval = firm_open(port);
+ if (retval) {
+ stop_command_port(port->serial);
+ goto exit;
+ }
+
+ retval = firm_purge(port, WHITEHEAT_PURGE_RX | WHITEHEAT_PURGE_TX);
+ if (retval) {
+ firm_close(port);
+ stop_command_port(port->serial);
+ goto exit;
+ }
+
+ old_term.c_cflag = ~port->tty->termios->c_cflag;
+ old_term.c_iflag = ~port->tty->termios->c_iflag;
+ whiteheat_set_termios(port, &old_term);
+
+ /* Work around HCD bugs */
+ usb_clear_halt(port->serial->dev, port->read_urb->pipe);
+ usb_clear_halt(port->serial->dev, port->write_urb->pipe);
+
+ /* Start reading from the device */
+ retval = start_port_read(port);
+ if (retval) {
+ err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
+ firm_close(port);
+ stop_command_port(port->serial);
+ goto exit;
+ }
+
+exit:
+ dbg("%s - exit, retval = %d", __FUNCTION__, retval);
+ return retval;
+}
+
+
+static void whiteheat_close(struct usb_serial_port *port, struct file * filp)
+{
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ struct whiteheat_urb_wrap *wrap;
+ struct urb *urb;
+ struct list_head *tmp;
+ struct list_head *tmp2;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ /* filp is NULL when called from usb_serial_disconnect */
+ if (filp && (tty_hung_up_p(filp))) {
+ return;
+ }
+
+ port->tty->closing = 1;
+
+/*
+ * Not currently in use; tty_wait_until_sent() calls
+ * serial_chars_in_buffer() which deadlocks on the second semaphore
+ * acquisition. This should be fixed at some point. Greg's been
+ * notified.
+ if ((filp->f_flags & (O_NDELAY | O_NONBLOCK)) == 0) {
+ tty_wait_until_sent(port->tty, CLOSING_DELAY);
+ }
+*/
+
+ if (port->tty->driver->flush_buffer)
+ port->tty->driver->flush_buffer(port->tty);
+ tty_ldisc_flush(port->tty);
+
+ firm_report_tx_done(port);
+
+ firm_close(port);
+
+ /* shutdown our bulk reads and writes */
+ spin_lock_irqsave(&info->lock, flags);
+ list_for_each_safe(tmp, tmp2, &info->rx_urbs_submitted) {
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+ usb_kill_urb(urb);
+ list_del(tmp);
+ list_add(tmp, &info->rx_urbs_free);
+ }
+ list_for_each_safe(tmp, tmp2, &info->rx_urb_q) {
+ list_del(tmp);
+ list_add(tmp, &info->rx_urbs_free);
+ }
+ list_for_each_safe(tmp, tmp2, &info->tx_urbs_submitted) {
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+ usb_kill_urb(urb);
+ list_del(tmp);
+ list_add(tmp, &info->tx_urbs_free);
+ }
+ spin_unlock_irqrestore(&info->lock, flags);
+
+ stop_command_port(port->serial);
+
+ port->tty->closing = 0;
+}
+
+
+static int whiteheat_write(struct usb_serial_port *port, const unsigned char *buf, int count)
+{
+ struct usb_serial *serial = port->serial;
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ struct whiteheat_urb_wrap *wrap;
+ struct urb *urb;
+ int result;
+ int bytes;
+ int sent = 0;
+ unsigned long flags;
+ struct list_head *tmp;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (count == 0) {
+ dbg("%s - write request of 0 bytes", __FUNCTION__);
+ return (0);
+ }
+
+ while (count) {
+ spin_lock_irqsave(&info->lock, flags);
+ if (list_empty(&info->tx_urbs_free)) {
+ spin_unlock_irqrestore(&info->lock, flags);
+ break;
+ }
+ tmp = list_first(&info->tx_urbs_free);
+ list_del(tmp);
+ spin_unlock_irqrestore(&info->lock, flags);
+
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+ bytes = (count > port->bulk_out_size) ? port->bulk_out_size : count;
+ memcpy (urb->transfer_buffer, buf + sent, bytes);
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, bytes, urb->transfer_buffer);
+
+ urb->dev = serial->dev;
+ urb->transfer_buffer_length = bytes;
+ result = usb_submit_urb(urb, GFP_ATOMIC);
+ if (result) {
+ err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+ sent = result;
+ spin_lock_irqsave(&info->lock, flags);
+ list_add(tmp, &info->tx_urbs_free);
+ spin_unlock_irqrestore(&info->lock, flags);
+ break;
+ } else {
+ sent += bytes;
+ count -= bytes;
+ spin_lock_irqsave(&info->lock, flags);
+ list_add(tmp, &info->tx_urbs_submitted);
+ spin_unlock_irqrestore(&info->lock, flags);
+ }
+ }
+
+ return sent;
+}
+
+
+static int whiteheat_write_room(struct usb_serial_port *port)
+{
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ struct list_head *tmp;
+ int room = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&info->lock, flags);
+ list_for_each(tmp, &info->tx_urbs_free)
+ room++;
+ spin_unlock_irqrestore(&info->lock, flags);
+ room *= port->bulk_out_size;
+
+ dbg("%s - returns %d", __FUNCTION__, room);
+ return (room);
+}
+
+
+static int whiteheat_tiocmget (struct usb_serial_port *port, struct file *file)
+{
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ unsigned int modem_signals = 0;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ firm_get_dtr_rts(port);
+ if (info->mcr & UART_MCR_DTR)
+ modem_signals |= TIOCM_DTR;
+ if (info->mcr & UART_MCR_RTS)
+ modem_signals |= TIOCM_RTS;
+
+ return modem_signals;
+}
+
+
+static int whiteheat_tiocmset (struct usb_serial_port *port, struct file *file,
+ unsigned int set, unsigned int clear)
+{
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ if (set & TIOCM_RTS)
+ info->mcr |= UART_MCR_RTS;
+ if (set & TIOCM_DTR)
+ info->mcr |= UART_MCR_DTR;
+
+ if (clear & TIOCM_RTS)
+ info->mcr &= ~UART_MCR_RTS;
+ if (clear & TIOCM_DTR)
+ info->mcr &= ~UART_MCR_DTR;
+
+ firm_set_dtr(port, info->mcr & UART_MCR_DTR);
+ firm_set_rts(port, info->mcr & UART_MCR_RTS);
+ return 0;
+}
+
+
+static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
+{
+ struct serial_struct serstruct;
+ void __user *user_arg = (void __user *)arg;
+
+ dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
+
+ switch (cmd) {
+ case TIOCGSERIAL:
+ memset(&serstruct, 0, sizeof(serstruct));
+ serstruct.type = PORT_16654;
+ serstruct.line = port->serial->minor;
+ serstruct.port = port->number;
+ serstruct.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
+ serstruct.xmit_fifo_size = port->bulk_out_size;
+ serstruct.custom_divisor = 0;
+ serstruct.baud_base = 460800;
+ serstruct.close_delay = CLOSING_DELAY;
+ serstruct.closing_wait = CLOSING_DELAY;
+
+ if (copy_to_user(user_arg, &serstruct, sizeof(serstruct)))
+ return -EFAULT;
+
+ break;
+
+ case TIOCSSERIAL:
+ if (copy_from_user(&serstruct, user_arg, sizeof(serstruct)))
+ return -EFAULT;
+
+ /*
+ * For now this is ignored. dip sets the ASYNC_[V]HI flags
+ * but this isn't used by us at all. Maybe someone somewhere
+ * will need the custom_divisor setting.
+ */
+
+ break;
+
+ default:
+ break;
+ }
+
+ return -ENOIOCTLCMD;
+}
+
+
+static void whiteheat_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__);
+ goto exit;
+ }
+
+ /* check that they really want us to change something */
+ if (old_termios) {
+ if ((port->tty->termios->c_cflag == old_termios->c_cflag) &&
+ (port->tty->termios->c_iflag == old_termios->c_iflag)) {
+ dbg("%s - nothing to change...", __FUNCTION__);
+ goto exit;
+ }
+ }
+
+ firm_setup_port(port);
+
+exit:
+ return;
+}
+
+
+static void whiteheat_break_ctl(struct usb_serial_port *port, int break_state) {
+ firm_set_break(port, break_state);
+}
+
+
+static int whiteheat_chars_in_buffer(struct usb_serial_port *port)
+{
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ struct list_head *tmp;
+ struct whiteheat_urb_wrap *wrap;
+ int chars = 0;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&info->lock, flags);
+ list_for_each(tmp, &info->tx_urbs_submitted) {
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ chars += wrap->urb->transfer_buffer_length;
+ }
+ spin_unlock_irqrestore(&info->lock, flags);
+
+ dbg ("%s - returns %d", __FUNCTION__, chars);
+ return (chars);
+}
+
+
+static void whiteheat_throttle (struct usb_serial_port *port)
+{
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&info->lock, flags);
+ info->flags |= THROTTLED;
+ spin_unlock_irqrestore(&info->lock, flags);
+
+ return;
+}
+
+
+static void whiteheat_unthrottle (struct usb_serial_port *port)
+{
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ int actually_throttled;
+ unsigned long flags;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock_irqsave(&info->lock, flags);
+ actually_throttled = info->flags & ACTUALLY_THROTTLED;
+ info->flags &= ~(THROTTLED | ACTUALLY_THROTTLED);
+ spin_unlock_irqrestore(&info->lock, flags);
+
+ if (actually_throttled)
+ rx_data_softint(port);
+
+ return;
+}
+
+
+/*****************************************************************************
+ * Connect Tech's White Heat callback routines
+ *****************************************************************************/
+static void command_port_write_callback (struct urb *urb, struct pt_regs *regs)
+{
+ dbg("%s", __FUNCTION__);
+
+ if (urb->status) {
+ dbg ("nonzero urb status: %d", urb->status);
+ return;
+ }
+}
+
+
+static void command_port_read_callback (struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *command_port = (struct usb_serial_port *)urb->context;
+ struct whiteheat_command_private *command_info;
+ unsigned char *data = urb->transfer_buffer;
+ int result;
+ unsigned long flags;
+
+ dbg("%s", __FUNCTION__);
+
+ if (urb->status) {
+ dbg("%s - nonzero urb status: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ usb_serial_debug_data(debug, &command_port->dev, __FUNCTION__, urb->actual_length, data);
+
+ command_info = usb_get_serial_port_data(command_port);
+ if (!command_info) {
+ dbg ("%s - command_info is NULL, exiting.", __FUNCTION__);
+ return;
+ }
+ spin_lock_irqsave(&command_info->lock, flags);
+
+ if (data[0] == WHITEHEAT_CMD_COMPLETE) {
+ command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
+ wake_up_interruptible(&command_info->wait_command);
+ } else if (data[0] == WHITEHEAT_CMD_FAILURE) {
+ command_info->command_finished = WHITEHEAT_CMD_FAILURE;
+ wake_up_interruptible(&command_info->wait_command);
+ } else if (data[0] == WHITEHEAT_EVENT) {
+ /* These are unsolicited reports from the firmware, hence no waiting command to wakeup */
+ dbg("%s - event received", __FUNCTION__);
+ } else if (data[0] == WHITEHEAT_GET_DTR_RTS) {
+ memcpy(command_info->result_buffer, &data[1], urb->actual_length - 1);
+ command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
+ wake_up_interruptible(&command_info->wait_command);
+ } else {
+ dbg("%s - bad reply from firmware", __FUNCTION__);
+ }
+
+ /* Continue trying to always read */
+ command_port->read_urb->dev = command_port->serial->dev;
+ result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC);
+ spin_unlock_irqrestore(&command_info->lock, flags);
+ if (result)
+ dbg("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+}
+
+
+static void whiteheat_read_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct whiteheat_urb_wrap *wrap;
+ unsigned char *data = urb->transfer_buffer;
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock(&info->lock);
+ wrap = urb_to_wrap(urb, &info->rx_urbs_submitted);
+ if (!wrap) {
+ spin_unlock(&info->lock);
+ err("%s - Not my urb!", __FUNCTION__);
+ return;
+ }
+ list_del(&wrap->list);
+ spin_unlock(&info->lock);
+
+ if (urb->status) {
+ dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
+ spin_lock(&info->lock);
+ list_add(&wrap->list, &info->rx_urbs_free);
+ spin_unlock(&info->lock);
+ return;
+ }
+
+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+
+ spin_lock(&info->lock);
+ list_add_tail(&wrap->list, &info->rx_urb_q);
+ if (info->flags & THROTTLED) {
+ info->flags |= ACTUALLY_THROTTLED;
+ spin_unlock(&info->lock);
+ return;
+ }
+ spin_unlock(&info->lock);
+
+ schedule_work(&info->rx_work);
+}
+
+
+static void whiteheat_write_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ struct whiteheat_urb_wrap *wrap;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
+ spin_lock(&info->lock);
+ wrap = urb_to_wrap(urb, &info->tx_urbs_submitted);
+ if (!wrap) {
+ spin_unlock(&info->lock);
+ err("%s - Not my urb!", __FUNCTION__);
+ return;
+ }
+ list_del(&wrap->list);
+ list_add(&wrap->list, &info->tx_urbs_free);
+ spin_unlock(&info->lock);
+
+ if (urb->status) {
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+ return;
+ }
+
+ usb_serial_port_softint((void *)port);
+
+ schedule_work(&port->work);
+}
+
+
+/*****************************************************************************
+ * Connect Tech's White Heat firmware interface
+ *****************************************************************************/
+static int firm_send_command (struct usb_serial_port *port, __u8 command, __u8 *data, __u8 datasize)
+{
+ struct usb_serial_port *command_port;
+ struct whiteheat_command_private *command_info;
+ struct whiteheat_private *info;
+ __u8 *transfer_buffer;
+ int retval = 0;
+ unsigned long flags;
+
+ dbg("%s - command %d", __FUNCTION__, command);
+
+ command_port = port->serial->port[COMMAND_PORT];
+ command_info = usb_get_serial_port_data(command_port);
+ spin_lock_irqsave(&command_info->lock, flags);
+ command_info->command_finished = FALSE;
+
+ transfer_buffer = (__u8 *)command_port->write_urb->transfer_buffer;
+ transfer_buffer[0] = command;
+ memcpy (&transfer_buffer[1], data, datasize);
+ command_port->write_urb->transfer_buffer_length = datasize + 1;
+ command_port->write_urb->dev = port->serial->dev;
+ retval = usb_submit_urb (command_port->write_urb, GFP_KERNEL);
+ if (retval) {
+ dbg("%s - submit urb failed", __FUNCTION__);
+ goto exit;
+ }
+ spin_unlock_irqrestore(&command_info->lock, flags);
+
+ /* wait for the command to complete */
+ wait_event_interruptible_timeout(command_info->wait_command,
+ (command_info->command_finished != FALSE), COMMAND_TIMEOUT);
+
+ spin_lock_irqsave(&command_info->lock, flags);
+
+ if (command_info->command_finished == FALSE) {
+ dbg("%s - command timed out.", __FUNCTION__);
+ retval = -ETIMEDOUT;
+ goto exit;
+ }
+
+ if (command_info->command_finished == WHITEHEAT_CMD_FAILURE) {
+ dbg("%s - command failed.", __FUNCTION__);
+ retval = -EIO;
+ goto exit;
+ }
+
+ if (command_info->command_finished == WHITEHEAT_CMD_COMPLETE) {
+ dbg("%s - command completed.", __FUNCTION__);
+ switch (command) {
+ case WHITEHEAT_GET_DTR_RTS:
+ info = usb_get_serial_port_data(port);
+ memcpy(&info->mcr, command_info->result_buffer, sizeof(struct whiteheat_dr_info));
+ break;
+ }
+ }
+
+exit:
+ spin_unlock_irqrestore(&command_info->lock, flags);
+ return retval;
+}
+
+
+static int firm_open(struct usb_serial_port *port) {
+ struct whiteheat_simple open_command;
+
+ open_command.port = port->number - port->serial->minor + 1;
+ return firm_send_command(port, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command));
+}
+
+
+static int firm_close(struct usb_serial_port *port) {
+ struct whiteheat_simple close_command;
+
+ close_command.port = port->number - port->serial->minor + 1;
+ return firm_send_command(port, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command));
+}
+
+
+static int firm_setup_port(struct usb_serial_port *port) {
+ struct whiteheat_port_settings port_settings;
+ unsigned int cflag = port->tty->termios->c_cflag;
+
+ port_settings.port = port->number + 1;
+
+ /* get the byte size */
+ switch (cflag & CSIZE) {
+ case CS5: port_settings.bits = 5; break;
+ case CS6: port_settings.bits = 6; break;
+ case CS7: port_settings.bits = 7; break;
+ default:
+ case CS8: port_settings.bits = 8; break;
+ }
+ dbg("%s - data bits = %d", __FUNCTION__, port_settings.bits);
+
+ /* determine the parity */
+ if (cflag & PARENB)
+ if (cflag & CMSPAR)
+ if (cflag & PARODD)
+ port_settings.parity = WHITEHEAT_PAR_MARK;
+ else
+ port_settings.parity = WHITEHEAT_PAR_SPACE;
+ else
+ if (cflag & PARODD)
+ port_settings.parity = WHITEHEAT_PAR_ODD;
+ else
+ port_settings.parity = WHITEHEAT_PAR_EVEN;
+ else
+ port_settings.parity = WHITEHEAT_PAR_NONE;
+ 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 */
+ if (cflag & CRTSCTS)
+ port_settings.hflow = (WHITEHEAT_HFLOW_CTS | WHITEHEAT_HFLOW_RTS);
+ else
+ port_settings.hflow = WHITEHEAT_HFLOW_NONE;
+ dbg("%s - hardware flow control = %s %s %s %s", __FUNCTION__,
+ (port_settings.hflow & WHITEHEAT_HFLOW_CTS) ? "CTS" : "",
+ (port_settings.hflow & WHITEHEAT_HFLOW_RTS) ? "RTS" : "",
+ (port_settings.hflow & WHITEHEAT_HFLOW_DSR) ? "DSR" : "",
+ (port_settings.hflow & WHITEHEAT_HFLOW_DTR) ? "DTR" : "");
+
+ /* determine software flow control */
+ if (I_IXOFF(port->tty))
+ port_settings.sflow = WHITEHEAT_SFLOW_RXTX;
+ else
+ port_settings.sflow = WHITEHEAT_SFLOW_NONE;
+ 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;
+
+ /* now send the message to the device */
+ return firm_send_command(port, WHITEHEAT_SETUP_PORT, (__u8 *)&port_settings, sizeof(port_settings));
+}
+
+
+static int firm_set_rts(struct usb_serial_port *port, __u8 onoff) {
+ struct whiteheat_set_rdb rts_command;
+
+ rts_command.port = port->number - port->serial->minor + 1;
+ rts_command.state = onoff;
+ return firm_send_command(port, WHITEHEAT_SET_RTS, (__u8 *)&rts_command, sizeof(rts_command));
+}
+
+
+static int firm_set_dtr(struct usb_serial_port *port, __u8 onoff) {
+ struct whiteheat_set_rdb dtr_command;
+
+ dtr_command.port = port->number - port->serial->minor + 1;
+ dtr_command.state = onoff;
+ return firm_send_command(port, WHITEHEAT_SET_RTS, (__u8 *)&dtr_command, sizeof(dtr_command));
+}
+
+
+static int firm_set_break(struct usb_serial_port *port, __u8 onoff) {
+ struct whiteheat_set_rdb break_command;
+
+ break_command.port = port->number - port->serial->minor + 1;
+ break_command.state = onoff;
+ return firm_send_command(port, WHITEHEAT_SET_RTS, (__u8 *)&break_command, sizeof(break_command));
+}
+
+
+static int firm_purge(struct usb_serial_port *port, __u8 rxtx) {
+ struct whiteheat_purge purge_command;
+
+ purge_command.port = port->number - port->serial->minor + 1;
+ purge_command.what = rxtx;
+ return firm_send_command(port, WHITEHEAT_PURGE, (__u8 *)&purge_command, sizeof(purge_command));
+}
+
+
+static int firm_get_dtr_rts(struct usb_serial_port *port) {
+ struct whiteheat_simple get_dr_command;
+
+ get_dr_command.port = port->number - port->serial->minor + 1;
+ return firm_send_command(port, WHITEHEAT_GET_DTR_RTS, (__u8 *)&get_dr_command, sizeof(get_dr_command));
+}
+
+
+static int firm_report_tx_done(struct usb_serial_port *port) {
+ struct whiteheat_simple close_command;
+
+ close_command.port = port->number - port->serial->minor + 1;
+ return firm_send_command(port, WHITEHEAT_REPORT_TX_DONE, (__u8 *)&close_command, sizeof(close_command));
+}
+
+
+/*****************************************************************************
+ * Connect Tech's White Heat utility functions
+ *****************************************************************************/
+static int start_command_port(struct usb_serial *serial)
+{
+ struct usb_serial_port *command_port;
+ struct whiteheat_command_private *command_info;
+ unsigned long flags;
+ int retval = 0;
+
+ command_port = serial->port[COMMAND_PORT];
+ command_info = usb_get_serial_port_data(command_port);
+ spin_lock_irqsave(&command_info->lock, flags);
+ if (!command_info->port_running) {
+ /* Work around HCD bugs */
+ usb_clear_halt(serial->dev, command_port->read_urb->pipe);
+
+ command_port->read_urb->dev = serial->dev;
+ retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL);
+ if (retval) {
+ err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
+ goto exit;
+ }
+ }
+ command_info->port_running++;
+
+exit:
+ spin_unlock_irqrestore(&command_info->lock, flags);
+ return retval;
+}
+
+
+static void stop_command_port(struct usb_serial *serial)
+{
+ struct usb_serial_port *command_port;
+ struct whiteheat_command_private *command_info;
+ unsigned long flags;
+
+ command_port = serial->port[COMMAND_PORT];
+ command_info = usb_get_serial_port_data(command_port);
+ spin_lock_irqsave(&command_info->lock, flags);
+ command_info->port_running--;
+ if (!command_info->port_running)
+ usb_kill_urb(command_port->read_urb);
+ spin_unlock_irqrestore(&command_info->lock, flags);
+}
+
+
+static int start_port_read(struct usb_serial_port *port)
+{
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ struct whiteheat_urb_wrap *wrap;
+ struct urb *urb;
+ int retval = 0;
+ unsigned long flags;
+ struct list_head *tmp;
+ struct list_head *tmp2;
+
+ spin_lock_irqsave(&info->lock, flags);
+
+ list_for_each_safe(tmp, tmp2, &info->rx_urbs_free) {
+ list_del(tmp);
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+ urb->dev = port->serial->dev;
+ retval = usb_submit_urb(urb, GFP_KERNEL);
+ if (retval) {
+ list_add(tmp, &info->rx_urbs_free);
+ list_for_each_safe(tmp, tmp2, &info->rx_urbs_submitted) {
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+ usb_kill_urb(urb);
+ list_del(tmp);
+ list_add(tmp, &info->rx_urbs_free);
+ }
+ break;
+ }
+ list_add(tmp, &info->rx_urbs_submitted);
+ }
+
+ spin_unlock_irqrestore(&info->lock, flags);
+
+ return retval;
+}
+
+
+static struct whiteheat_urb_wrap *urb_to_wrap(struct urb* urb, struct list_head *head)
+{
+ struct whiteheat_urb_wrap *wrap;
+ struct list_head *tmp;
+
+ list_for_each(tmp, head) {
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ if (wrap->urb == urb)
+ return wrap;
+ }
+
+ return NULL;
+}
+
+
+static struct list_head *list_first(struct list_head *head)
+{
+ return head->next;
+}
+
+
+static void rx_data_softint(void *private)
+{
+ struct usb_serial_port *port = (struct usb_serial_port *)private;
+ struct whiteheat_private *info = usb_get_serial_port_data(port);
+ struct tty_struct *tty = port->tty;
+ struct whiteheat_urb_wrap *wrap;
+ struct urb *urb;
+ unsigned long flags;
+ struct list_head *tmp;
+ struct list_head *tmp2;
+ int result;
+ int sent = 0;
+
+ spin_lock_irqsave(&info->lock, flags);
+ if (info->flags & THROTTLED) {
+ spin_unlock_irqrestore(&info->lock, flags);
+ return;
+ }
+
+ list_for_each_safe(tmp, tmp2, &info->rx_urb_q) {
+ list_del(tmp);
+ spin_unlock_irqrestore(&info->lock, flags);
+
+ wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
+ urb = wrap->urb;
+
+ if (tty && urb->actual_length) {
+ if (urb->actual_length > TTY_FLIPBUF_SIZE - tty->flip.count) {
+ spin_lock_irqsave(&info->lock, flags);
+ list_add(tmp, &info->rx_urb_q);
+ spin_unlock_irqrestore(&info->lock, flags);
+ tty_flip_buffer_push(tty);
+ schedule_work(&info->rx_work);
+ return;
+ }
+
+ memcpy(tty->flip.char_buf_ptr, urb->transfer_buffer, urb->actual_length);
+ tty->flip.char_buf_ptr += urb->actual_length;
+ tty->flip.count += urb->actual_length;
+ sent += urb->actual_length;
+ }
+
+ urb->dev = port->serial->dev;
+ result = usb_submit_urb(urb, GFP_ATOMIC);
+ if (result) {
+ err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+ spin_lock_irqsave(&info->lock, flags);
+ list_add(tmp, &info->rx_urbs_free);
+ continue;
+ }
+
+ spin_lock_irqsave(&info->lock, flags);
+ list_add(tmp, &info->rx_urbs_submitted);
+ }
+ spin_unlock_irqrestore(&info->lock, flags);
+
+ if (sent)
+ tty_flip_buffer_push(tty);
+}
+
+
+/*****************************************************************************
+ * Connect Tech's White Heat module functions
+ *****************************************************************************/
+static int __init whiteheat_init (void)
+{
+ int retval;
+ retval = usb_serial_register(&whiteheat_fake_device);
+ if (retval)
+ goto failed_fake_register;
+ retval = usb_serial_register(&whiteheat_device);
+ if (retval)
+ goto failed_device_register;
+ retval = usb_register(&whiteheat_driver);
+ if (retval)
+ goto failed_usb_register;
+ info(DRIVER_DESC " " DRIVER_VERSION);
+ return 0;
+failed_usb_register:
+ usb_serial_deregister(&whiteheat_device);
+failed_device_register:
+ usb_serial_deregister(&whiteheat_fake_device);
+failed_fake_register:
+ return retval;
+}
+
+
+static void __exit whiteheat_exit (void)
+{
+ usb_deregister (&whiteheat_driver);
+ usb_serial_deregister (&whiteheat_fake_device);
+ usb_serial_deregister (&whiteheat_device);
+}
+
+
+module_init(whiteheat_init);
+module_exit(whiteheat_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(urb_pool_size, int, 0);
+MODULE_PARM_DESC(urb_pool_size, "Number of urbs to use for buffering");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/usb/serial/whiteheat.h b/drivers/usb/serial/whiteheat.h
new file mode 100644
index 000000000000..d714eff58dc0
--- /dev/null
+++ b/drivers/usb/serial/whiteheat.h
@@ -0,0 +1,282 @@
+/*
+ * USB ConnectTech WhiteHEAT driver
+ *
+ * Copyright (C) 2002
+ * Connect Tech Inc.
+ *
+ * Copyright (C) 1999, 2000
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ *
+ */
+
+#ifndef __LINUX_USB_SERIAL_WHITEHEAT_H
+#define __LINUX_USB_SERIAL_WHITEHEAT_H
+
+
+#define FALSE 0
+#define TRUE 1
+
+
+/* WhiteHEAT commands */
+#define WHITEHEAT_OPEN 1 /* open the port */
+#define WHITEHEAT_CLOSE 2 /* close the port */
+#define WHITEHEAT_SETUP_PORT 3 /* change port settings */
+#define WHITEHEAT_SET_RTS 4 /* turn RTS on or off */
+#define WHITEHEAT_SET_DTR 5 /* turn DTR on or off */
+#define WHITEHEAT_SET_BREAK 6 /* turn BREAK on or off */
+#define WHITEHEAT_DUMP 7 /* dump memory */
+#define WHITEHEAT_STATUS 8 /* get status */
+#define WHITEHEAT_PURGE 9 /* clear the UART fifos */
+#define WHITEHEAT_GET_DTR_RTS 10 /* get the state of DTR and RTS for a port */
+#define WHITEHEAT_GET_HW_INFO 11 /* get EEPROM info and hardware ID */
+#define WHITEHEAT_REPORT_TX_DONE 12 /* get the next TX done */
+#define WHITEHEAT_EVENT 13 /* unsolicited status events */
+#define WHITEHEAT_ECHO 14 /* send data to the indicated IN endpoint */
+#define WHITEHEAT_DO_TEST 15 /* perform the specified test */
+#define WHITEHEAT_CMD_COMPLETE 16 /* reply for certain commands */
+#define WHITEHEAT_CMD_FAILURE 17 /* reply for failed commands */
+
+
+/*
+ * Commands to the firmware
+ */
+
+
+/*
+ * WHITEHEAT_OPEN
+ * WHITEHEAT_CLOSE
+ * WHITEHEAT_STATUS
+ * WHITEHEAT_GET_DTR_RTS
+ * WHITEHEAT_REPORT_TX_DONE
+*/
+struct whiteheat_simple {
+ __u8 port; /* port number (1 to N) */
+};
+
+
+/*
+ * WHITEHEAT_SETUP_PORT
+ */
+#define WHITEHEAT_PAR_NONE 'n' /* no parity */
+#define WHITEHEAT_PAR_EVEN 'e' /* even parity */
+#define WHITEHEAT_PAR_ODD 'o' /* odd parity */
+#define WHITEHEAT_PAR_SPACE '0' /* space (force 0) parity */
+#define WHITEHEAT_PAR_MARK '1' /* mark (force 1) parity */
+
+#define WHITEHEAT_SFLOW_NONE 'n' /* no software flow control */
+#define WHITEHEAT_SFLOW_RX 'r' /* XOFF/ON is sent when RX fills/empties */
+#define WHITEHEAT_SFLOW_TX 't' /* when received XOFF/ON will stop/start TX */
+#define WHITEHEAT_SFLOW_RXTX 'b' /* both SFLOW_RX and SFLOW_TX */
+
+#define WHITEHEAT_HFLOW_NONE 0x00 /* no hardware flow control */
+#define WHITEHEAT_HFLOW_RTS_TOGGLE 0x01 /* RTS is on during transmit, off otherwise */
+#define WHITEHEAT_HFLOW_DTR 0x02 /* DTR is off/on when RX fills/empties */
+#define WHITEHEAT_HFLOW_CTS 0x08 /* when received CTS off/on will stop/start TX */
+#define WHITEHEAT_HFLOW_DSR 0x10 /* when received DSR off/on will stop/start TX */
+#define WHITEHEAT_HFLOW_RTS 0x80 /* RTS is off/on when RX fills/empties */
+
+struct whiteheat_port_settings {
+ __u8 port; /* port number (1 to N) */
+ __u32 baud; /* any value 7 - 460800, firmware calculates best fit; arrives little endian */
+ __u8 bits; /* 5, 6, 7, or 8 */
+ __u8 stop; /* 1 or 2, default 1 (2 = 1.5 if bits = 5) */
+ __u8 parity; /* see WHITEHEAT_PAR_* above */
+ __u8 sflow; /* see WHITEHEAT_SFLOW_* above */
+ __u8 xoff; /* XOFF byte value */
+ __u8 xon; /* XON byte value */
+ __u8 hflow; /* see WHITEHEAT_HFLOW_* above */
+ __u8 lloop; /* 0/1 turns local loopback mode off/on */
+} __attribute__ ((packed));
+
+
+/*
+ * WHITEHEAT_SET_RTS
+ * WHITEHEAT_SET_DTR
+ * WHITEHEAT_SET_BREAK
+ */
+#define WHITEHEAT_RTS_OFF 0x00
+#define WHITEHEAT_RTS_ON 0x01
+#define WHITEHEAT_DTR_OFF 0x00
+#define WHITEHEAT_DTR_ON 0x01
+#define WHITEHEAT_BREAK_OFF 0x00
+#define WHITEHEAT_BREAK_ON 0x01
+
+struct whiteheat_set_rdb {
+ __u8 port; /* port number (1 to N) */
+ __u8 state; /* 0/1 turns signal off/on */
+};
+
+
+/*
+ * WHITEHEAT_DUMP
+ */
+#define WHITEHEAT_DUMP_MEM_DATA 'd' /* data */
+#define WHITEHEAT_DUMP_MEM_IDATA 'i' /* idata */
+#define WHITEHEAT_DUMP_MEM_BDATA 'b' /* bdata */
+#define WHITEHEAT_DUMP_MEM_XDATA 'x' /* xdata */
+
+/*
+ * Allowable address ranges (firmware checks address):
+ * Type DATA: 0x00 - 0xff
+ * Type IDATA: 0x80 - 0xff
+ * Type BDATA: 0x20 - 0x2f
+ * Type XDATA: 0x0000 - 0xffff
+ *
+ * B/I/DATA all read the local memory space
+ * XDATA reads the external memory space
+ * BDATA returns bits as bytes
+ *
+ * NOTE: 0x80 - 0xff (local space) are the Special Function Registers
+ * of the 8051, and some have on-read side-effects.
+ */
+
+struct whiteheat_dump {
+ __u8 mem_type; /* see WHITEHEAT_DUMP_* above */
+ __u16 addr; /* address, see restrictions above */
+ __u16 length; /* number of bytes to dump, max 63 bytes */
+};
+
+
+/*
+ * WHITEHEAT_PURGE
+ */
+#define WHITEHEAT_PURGE_RX 0x01 /* purge rx fifos */
+#define WHITEHEAT_PURGE_TX 0x02 /* purge tx fifos */
+
+struct whiteheat_purge {
+ __u8 port; /* port number (1 to N) */
+ __u8 what; /* bit pattern of what to purge */
+};
+
+
+/*
+ * WHITEHEAT_ECHO
+ */
+struct whiteheat_echo {
+ __u8 port; /* port number (1 to N) */
+ __u8 length; /* length of message to echo, max 61 bytes */
+ __u8 echo_data[61]; /* data to echo */
+};
+
+
+/*
+ * WHITEHEAT_DO_TEST
+ */
+#define WHITEHEAT_TEST_UART_RW 0x01 /* read/write uart registers */
+#define WHITEHEAT_TEST_UART_INTR 0x02 /* uart interrupt */
+#define WHITEHEAT_TEST_SETUP_CONT 0x03 /* setup for PORT_CONT/PORT_DISCONT */
+#define WHITEHEAT_TEST_PORT_CONT 0x04 /* port connect */
+#define WHITEHEAT_TEST_PORT_DISCONT 0x05 /* port disconnect */
+#define WHITEHEAT_TEST_UART_CLK_START 0x06 /* uart clock test start */
+#define WHITEHEAT_TEST_UART_CLK_STOP 0x07 /* uart clock test stop */
+#define WHITEHEAT_TEST_MODEM_FT 0x08 /* modem signals, requires a loopback cable/connector */
+#define WHITEHEAT_TEST_ERASE_EEPROM 0x09 /* erase eeprom */
+#define WHITEHEAT_TEST_READ_EEPROM 0x0a /* read eeprom */
+#define WHITEHEAT_TEST_PROGRAM_EEPROM 0x0b /* program eeprom */
+
+struct whiteheat_test {
+ __u8 port; /* port number (1 to n) */
+ __u8 test; /* see WHITEHEAT_TEST_* above*/
+ __u8 info[32]; /* additional info */
+};
+
+
+/*
+ * Replies from the firmware
+ */
+
+
+/*
+ * WHITEHEAT_STATUS
+ */
+#define WHITEHEAT_EVENT_MODEM 0x01 /* modem field is valid */
+#define WHITEHEAT_EVENT_ERROR 0x02 /* error field is valid */
+#define WHITEHEAT_EVENT_FLOW 0x04 /* flow field is valid */
+#define WHITEHEAT_EVENT_CONNECT 0x08 /* connect field is valid */
+
+#define WHITEHEAT_FLOW_NONE 0x00 /* no flow control active */
+#define WHITEHEAT_FLOW_HARD_OUT 0x01 /* TX is stopped by CTS (waiting for CTS to go on) */
+#define WHITEHEAT_FLOW_HARD_IN 0x02 /* remote TX is stopped by RTS */
+#define WHITEHEAT_FLOW_SOFT_OUT 0x04 /* TX is stopped by XOFF received (waiting for XON) */
+#define WHITEHEAT_FLOW_SOFT_IN 0x08 /* remote TX is stopped by XOFF transmitted */
+#define WHITEHEAT_FLOW_TX_DONE 0x80 /* TX has completed */
+
+struct whiteheat_status_info {
+ __u8 port; /* port number (1 to N) */
+ __u8 event; /* indicates what the current event is, see WHITEHEAT_EVENT_* above */
+ __u8 modem; /* modem signal status (copy of uart's MSR register) */
+ __u8 error; /* line status (copy of uart's LSR register) */
+ __u8 flow; /* flow control state, see WHITEHEAT_FLOW_* above */
+ __u8 connect; /* 0 means not connected, non-zero means connected */
+};
+
+
+/*
+ * WHITEHEAT_GET_DTR_RTS
+ */
+struct whiteheat_dr_info {
+ __u8 mcr; /* copy of uart's MCR register */
+};
+
+
+/*
+ * WHITEHEAT_GET_HW_INFO
+ */
+struct whiteheat_hw_info {
+ __u8 hw_id; /* hardware id number, WhiteHEAT = 0 */
+ __u8 sw_major_rev; /* major version number */
+ __u8 sw_minor_rev; /* minor version number */
+ struct whiteheat_hw_eeprom_info {
+ __u8 b0; /* B0 */
+ __u8 vendor_id_low; /* vendor id (low byte) */
+ __u8 vendor_id_high; /* vendor id (high byte) */
+ __u8 product_id_low; /* product id (low byte) */
+ __u8 product_id_high; /* product id (high byte) */
+ __u8 device_id_low; /* device id (low byte) */
+ __u8 device_id_high; /* device id (high byte) */
+ __u8 not_used_1;
+ __u8 serial_number_0; /* serial number (low byte) */
+ __u8 serial_number_1; /* serial number */
+ __u8 serial_number_2; /* serial number */
+ __u8 serial_number_3; /* serial number (high byte) */
+ __u8 not_used_2;
+ __u8 not_used_3;
+ __u8 checksum_low; /* checksum (low byte) */
+ __u8 checksum_high; /* checksum (high byte */
+ } hw_eeprom_info; /* EEPROM contents */
+};
+
+
+/*
+ * WHITEHEAT_EVENT
+ */
+struct whiteheat_event_info {
+ __u8 port; /* port number (1 to N) */
+ __u8 event; /* see whiteheat_status_info.event */
+ __u8 info; /* see whiteheat_status_info.modem, .error, .flow, .connect */
+};
+
+
+/*
+ * WHITEHEAT_DO_TEST
+ */
+#define WHITEHEAT_TEST_FAIL 0x00 /* test failed */
+#define WHITEHEAT_TEST_UNKNOWN 0x01 /* unknown test requested */
+#define WHITEHEAT_TEST_PASS 0xff /* test passed */
+
+struct whiteheat_test_info {
+ __u8 port; /* port number (1 to N) */
+ __u8 test; /* indicates which test this is a response for, see WHITEHEAT_DO_TEST above */
+ __u8 status; /* see WHITEHEAT_TEST_* above */
+ __u8 results[32]; /* test-dependent results */
+};
+
+
+#endif
diff --git a/drivers/usb/serial/whiteheat_fw.h b/drivers/usb/serial/whiteheat_fw.h
new file mode 100644
index 000000000000..8e0bdc746f9f
--- /dev/null
+++ b/drivers/usb/serial/whiteheat_fw.h
@@ -0,0 +1,1669 @@
+/*****************************************************************************
+ *
+ * whiteheat.h -- ConnectTech WhiteHEAT Firmware.
+ *
+ * Copyright (C) 2000-2002 ConnectTech Inc (http://www.connecttech.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * (10/09/2002) Stuart MacDonald
+ * Firmware 4.06
+ *
+ * (04/09/2000) gkh
+ * Updated the firmware with the latest provided by ConnectTech.
+ *
+ * (01/16/2000) gkh
+ * Fixed my intel hex processing tool, so now the firmware actually
+ * matches the original file (this was causing a few problems...)
+ *
+ * (01/15/2000) gkh
+ * Added debug loader firmware if DEBUG is #defined:
+ * Port 1 LED flashes when the vend_ax program is running
+ * Port 2 LED flashes when any SETUP command arrives
+ * Port 3 LED flashes when any valid VENDOR request occurs
+ * Port 4 LED flashes when the EXTERNAL RAM DOWNLOAD request occurs
+ *
+ * version 1.0 (01/09/2000) gkh
+ * Original firmware from ConnectTech massaged a little to be program
+ * readable.
+ *
+ *****************************************************************************/
+
+#define whiteheat_DATE "20000106"
+
+struct whiteheat_hex_record {
+ __u16 address;
+ __u8 data_size;
+ __u8 data[16];
+};
+
+static const struct whiteheat_hex_record whiteheat_firmware[] = {
+{ 0x0000, 3, {0x02, 0x97, 0xe3} },
+{ 0x0003, 3, {0x02, 0x13, 0x12} },
+{ 0x000b, 3, {0x02, 0x0b, 0xb5} },
+{ 0x0033, 3, {0x02, 0x08, 0x1c} },
+{ 0x0043, 3, {0x02, 0x0a, 0x00} },
+{ 0x005b, 3, {0x02, 0x83, 0x3b} },
+{ 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, 0xa2, 0x3b, 0xf5, 0x4e, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x4e, 0xd3} },
+{ 0x0400, 16, {0x9f, 0x40, 0x03, 0xe0, 0xf5, 0x4e, 0xe5, 0x4e, 0xd3, 0x94, 0x40, 0x40, 0x03, 0x75, 0x4e, 0x40} },
+{ 0x0410, 16, {0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x4e, 0x12, 0x91, 0x37, 0x90, 0x7f, 0xb5} },
+{ 0x0420, 16, {0xe5, 0x4e, 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, 0x35, 0xd2, 0x02, 0x43, 0x88, 0x10, 0xd2, 0xeb, 0xd2} },
+{ 0x0460, 16, {0xa8, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x35, 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} },
+{ 0x04a0, 16, {0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0x90} },
+{ 0x04b0, 16, {0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25} },
+{ 0x04c0, 16, {0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0x01, 0x90, 0x7f, 0x00} },
+{ 0x04d0, 16, {0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4} },
+{ 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, 0x4e, 0xef, 0x30, 0xe7, 0x03} },
+{ 0x0520, 16, {0x43, 0x4e, 0x10, 0x90, 0x7f, 0xd7, 0xe5, 0x4e, 0xf0, 0xe5, 0x4e, 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} },
+{ 0x0560, 16, {0x01, 0x04, 0xd2, 0x00, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90} },
+{ 0x0570, 16, {0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f} },
+{ 0x0580, 16, {0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
+{ 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, 0x4a, 0xff, 0x75, 0x49, 0xff, 0x75, 0x48, 0x0f, 0x75, 0x47, 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, 0xbd, 0xf0, 0x90, 0x01, 0x00, 0xf0, 0xa3} },
+{ 0x05ed, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3} },
+{ 0x05fd, 16, {0x74, 0x08, 0xf0, 0x7e, 0x01, 0x7f, 0x00, 0x12, 0x19, 0xc1, 0x75, 0x4c, 0x12, 0x75, 0x4d, 0x0a} },
+{ 0x060d, 16, {0x90, 0x01, 0x0b, 0xe0, 0xff, 0x05, 0x4d, 0xe5, 0x4d, 0xac, 0x4c, 0x70, 0x02, 0x05, 0x4c, 0x14} },
+{ 0x061d, 16, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x80, 0xff, 0x05, 0x4d, 0xe5} },
+{ 0x062d, 16, {0x4d, 0xac, 0x4c, 0x70, 0x02, 0x05, 0x4c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01} },
+{ 0x063d, 16, {0x0d, 0xe0, 0xff, 0x05, 0x4d, 0xe5, 0x4d, 0xac, 0x4c, 0x70, 0x02, 0x05, 0x4c, 0x14, 0xf5, 0x82} },
+{ 0x064d, 16, {0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4d, 0xe5, 0x4d, 0xac, 0x4c, 0x70} },
+{ 0x065d, 16, {0x02, 0x05, 0x4c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x12, 0x0a, 0xe4, 0x93, 0xff} },
+{ 0x066d, 16, {0x74, 0x01, 0x93, 0x90, 0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff} },
+{ 0x067d, 16, {0xa3, 0xe0, 0xfe, 0xef, 0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90} },
+{ 0x068d, 16, {0x01, 0x1c, 0xe0, 0x6f, 0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x52, 0x10} },
+{ 0x069d, 16, {0x75, 0x53, 0x02, 0x75, 0x54, 0x12, 0x75, 0x55, 0xac, 0x12, 0x94, 0x26, 0x75, 0x4c, 0x12, 0x75} },
+{ 0x06ad, 16, {0x4d, 0xb2, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05, 0x4d, 0xe5, 0x4d, 0xac, 0x4c, 0x70, 0x02, 0x05} },
+{ 0x06bd, 16, {0x4c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4d, 0xe5} },
+{ 0x06cd, 16, {0x4d, 0xac, 0x4c, 0x70, 0x02, 0x05, 0x4c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f} },
+{ 0x06dd, 16, {0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x24, 0x41, 0xff, 0x05, 0x4d, 0xe5, 0x4d, 0xac, 0x4c, 0x70} },
+{ 0x06ed, 16, {0x02, 0x05, 0x4c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x4d, 0xe5, 0x4d, 0xae, 0x4c} },
+{ 0x06fd, 16, {0x70, 0x02, 0x05, 0x4c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83} },
+{ 0x070d, 16, {0x01, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12} },
+{ 0x071d, 16, {0xa3, 0xee, 0x7e, 0x01, 0x7f, 0x18, 0x12, 0x86, 0xbe, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x072d, 16, {0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x75, 0x52, 0x0a, 0x75, 0x53, 0x06, 0x75, 0x54, 0x12} },
+{ 0x073d, 16, {0x75, 0x55, 0xb8, 0x12, 0x94, 0x26, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff} },
+{ 0x074d, 16, {0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44} },
+{ 0x075d, 16, {0x1f, 0xf0, 0xd2, 0xaf, 0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09} },
+{ 0x076d, 16, {0xc5, 0x75, 0x46, 0x50, 0x75, 0x45, 0x6d, 0x75, 0x44, 0x33, 0x75, 0x43, 0x00, 0x20, 0x01, 0xe4} },
+{ 0x077d, 16, {0x7f, 0xff, 0x7e, 0xff, 0x7d, 0xff, 0x7c, 0xff, 0x78, 0x43, 0x12, 0xa3, 0xd7, 0xec, 0x4d, 0x4e} },
+{ 0x078d, 16, {0x4f, 0x60, 0xd1, 0x80, 0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x70, 0xc2, 0x01, 0x30, 0x06, 0x0a} },
+{ 0x079d, 16, {0x12, 0x09, 0xfb, 0x50, 0x03, 0x12, 0x0a, 0xe8, 0xc2, 0x06, 0x12, 0x96, 0x5e, 0x90, 0x01, 0xbd} },
+{ 0x07ad, 16, {0xe0, 0x60, 0x0c, 0x12, 0x92, 0x01, 0xe4, 0x90, 0x01, 0xbd, 0xf0, 0x90, 0x7f, 0xd3, 0xf0, 0x90} },
+{ 0x07bd, 16, {0x02, 0xaf, 0xe0, 0xb4, 0x0f, 0x03, 0x12, 0x99, 0xb9, 0x12, 0xa0, 0x95, 0xe4, 0xff, 0x74, 0x01} },
+{ 0x07cd, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0xbc, 0xe0, 0x5e, 0x60} },
+{ 0x07dd, 16, {0x14, 0x74, 0x28, 0x2f, 0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e} },
+{ 0x07ed, 16, {0x00, 0x8e, 0x4b, 0x80, 0x03, 0x75, 0x4b, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x20} },
+{ 0x07fd, 16, {0xf5, 0x83, 0xe5, 0x4b, 0xf0, 0x0f, 0xbf, 0x04, 0xc5, 0xe5, 0x2c, 0xd3, 0x94, 0x0a, 0x40, 0x04} },
+{ 0x080d, 14, {0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x20, 0x6c, 0xef, 0xf0, 0x02, 0x07, 0x92} },
+{ 0x081b, 1, {0x22} },
+{ 0x081c, 4, {0x53, 0xd8, 0xef, 0x32} },
+{ 0x0820, 16, {0xe5, 0x33, 0xc3, 0x94, 0x01, 0x40, 0x0e, 0x90, 0x7f, 0x93, 0xe0, 0x44, 0x30, 0xf0, 0x90, 0x7f} },
+{ 0x0830, 16, {0x95, 0xe0, 0x44, 0xc0, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x09, 0xae, 0x90, 0x7f, 0x96, 0xe0} },
+{ 0x0840, 16, {0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x08} },
+{ 0x0850, 16, {0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfb, 0xf0, 0x7f} },
+{ 0x0860, 16, {0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0xe5, 0x33, 0xc3, 0x94, 0x01, 0x50, 0x0e, 0x7f, 0x02, 0x7d} },
+{ 0x0870, 16, {0xff, 0x12, 0x82, 0xea, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0x96, 0xe0, 0x44} },
+{ 0x0880, 16, {0x02, 0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0x96} },
+{ 0x0890, 16, {0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0x96, 0xe0, 0x54} },
+{ 0x08a0, 16, {0xbf, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0} },
+{ 0x08b0, 8, {0x7f, 0x32, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x22} },
+{ 0x08b8, 16, {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x80, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12} },
+{ 0x08c8, 16, {0x09, 0xae, 0xe5, 0x33, 0xc3, 0x94, 0x01, 0x50, 0x0e, 0x7f, 0x02, 0xe4, 0xfd, 0x12, 0x82, 0xea} },
+{ 0x08d8, 16, {0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x05} },
+{ 0x08e8, 16, {0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x05, 0x7e, 0x00} },
+{ 0x08f8, 16, {0x12, 0x09, 0xae, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xf7, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09} },
+{ 0x0908, 16, {0xae, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0xe5} },
+{ 0x0918, 16, {0x33, 0xc3, 0x94, 0x01, 0x40, 0x0e, 0x90, 0x7f, 0x93, 0xe0, 0x54, 0xcf, 0xf0, 0x90, 0x7f, 0x95} },
+{ 0x0928, 8, {0xe0, 0x54, 0x3f, 0xf0, 0x12, 0x0b, 0x00, 0x22} },
+{ 0x0930, 16, {0x90, 0x0a, 0xf4, 0xe4, 0x93, 0x70, 0x76, 0x90, 0x7f, 0x93, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x94} },
+{ 0x0940, 16, {0x74, 0x3c, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc6, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0xae} },
+{ 0x0950, 16, {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x90, 0x7f, 0x96, 0x74, 0x08, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf} },
+{ 0x0960, 16, {0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x20, 0x70, 0xe0, 0xff, 0xc4, 0x54, 0x0f} },
+{ 0x0970, 16, {0xf5, 0x33, 0xc3, 0x94, 0x01, 0x50, 0x07, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x80, 0xf0, 0xe4, 0x90} },
+{ 0x0980, 16, {0x7f, 0x97, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0x02, 0xf0, 0xe5, 0x33, 0xc3, 0x94, 0x01, 0x40, 0x0b} },
+{ 0x0990, 16, {0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0xe2, 0x74, 0x12} },
+{ 0x09a0, 14, {0xf0, 0x12, 0x08, 0x20, 0x75, 0x82, 0xf4, 0x75, 0x83, 0x0a, 0x74, 0xff, 0xf0, 0x22} },
+{ 0x09ae, 16, {0x8e, 0x5d, 0x8f, 0x5e, 0xe5, 0x5e, 0x15, 0x5e, 0xae, 0x5d, 0x70, 0x02, 0x15, 0x5d, 0x4e, 0x60} },
+{ 0x09be, 7, {0x05, 0x12, 0x09, 0xea, 0x80, 0xee, 0x22} },
+{ 0x09c5, 16, {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x07, 0x04, 0xe0, 0x44} },
+{ 0x09d5, 16, {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x09, 0xae, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
+{ 0x09e5, 5, {0xe0, 0x44, 0x04, 0xf0, 0x22} },
+{ 0x09ea, 16, {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
+{ 0x09fa, 1, {0x22} },
+{ 0x09fb, 5, {0x12, 0x08, 0xb8, 0xd3, 0x22} },
+{ 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, 0x0a, 0xed, 0x00, 0x02, 0x0a, 0xee, 0x00, 0x02, 0x0a, 0xef, 0x00} },
+{ 0x0a20, 16, {0x02, 0x0c, 0xdb, 0x00, 0x02, 0x0d, 0xcb, 0x00, 0x02, 0x0d, 0x17, 0x00, 0x02, 0x0e, 0x2b, 0x00} },
+{ 0x0a30, 16, {0x02, 0x0d, 0x53, 0x00, 0x02, 0x0e, 0x8b, 0x00, 0x02, 0x0d, 0x8f, 0x00, 0x02, 0x0e, 0xeb, 0x00} },
+{ 0x0a40, 16, {0x02, 0x0a, 0xf0, 0x00, 0x02, 0x0a, 0xf2, 0x00, 0x02, 0x0a, 0xf1, 0x00, 0x02, 0x0a, 0xf3, 0x00} },
+{ 0x0a50, 8, {0x02, 0x0f, 0x4b, 0x00, 0x02, 0x0f, 0x61, 0x00} },
+{ 0x0a58, 2, {0x8f, 0x4f} },
+{ 0x0a5a, 16, {0xe4, 0xf5, 0x50, 0x75, 0x51, 0xff, 0x75, 0x52, 0x12, 0x75, 0x53, 0x6a, 0xab, 0x51, 0xaa, 0x52} },
+{ 0x0a6a, 16, {0xa9, 0x53, 0x90, 0x00, 0x01, 0x12, 0xa2, 0x54, 0xb4, 0x03, 0x1d, 0xaf, 0x50, 0x05, 0x50, 0xef} },
+{ 0x0a7a, 16, {0xb5, 0x4f, 0x01, 0x22, 0x12, 0xa2, 0x3b, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
+{ 0x0a8a, 14, {0x51, 0xff, 0xf5, 0x52, 0x89, 0x53, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x0a98, 1, {0x22} },
+{ 0x0a99, 16, {0xe4, 0xfe, 0x75, 0x51, 0xff, 0x75, 0x52, 0x12, 0x75, 0x53, 0x12, 0xab, 0x51, 0xaa, 0x52, 0xa9} },
+{ 0x0aa9, 16, {0x53, 0x90, 0x00, 0x01, 0x12, 0xa2, 0x54, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
+{ 0x0ab9, 16, {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0xa2, 0xad, 0x85, 0xf0, 0x4f, 0xf5, 0x50, 0x62, 0x4f} },
+{ 0x0ac9, 16, {0xe5, 0x4f, 0x62, 0x50, 0xe5, 0x50, 0x62, 0x4f, 0x29, 0xfd, 0xe5, 0x4f, 0x3a, 0xa9, 0x05, 0x75} },
+{ 0x0ad9, 14, {0x51, 0xff, 0xf5, 0x52, 0x89, 0x53, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x0ae7, 1, {0x22} },
+{ 0x0ae8, 5, {0x12, 0x08, 0x20, 0xd3, 0x22} },
+{ 0x0aed, 1, {0x32} },
+{ 0x0aee, 1, {0x32} },
+{ 0x0aef, 1, {0x32} },
+{ 0x0af0, 1, {0x32} },
+{ 0x0af1, 1, {0x32} },
+{ 0x0af2, 1, {0x32} },
+{ 0x0af3, 1, {0x32} },
+{ 0x0af4, 3, {0x00, 0x04, 0x07} },
+{ 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, 0x28, 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, 0x28, 0xef, 0xd3} },
+{ 0x0be6, 16, {0x94, 0x2c, 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, 0x30, 0xe5, 0x33, 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, 0x7d, 0x12, 0x94, 0xf7, 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, 0x2c, 0x70, 0x03, 0x75} },
+{ 0x0ca1, 9, {0x2c, 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, 0x34, 0x30, 0xe0, 0x13, 0xe5, 0x32, 0x30, 0xe0, 0x07, 0x90, 0x20} },
+{ 0x0cfb, 16, {0x04, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2c, 0x70, 0x03} },
+{ 0x0d0b, 12, {0x75, 0x2c, 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, 0x34, 0x30, 0xe1, 0x13, 0xe5, 0x32, 0x30, 0xe1, 0x07, 0x90, 0x20} },
+{ 0x0d37, 16, {0x0c, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2c, 0x70, 0x03} },
+{ 0x0d47, 12, {0x75, 0x2c, 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, 0x34, 0x30, 0xe2, 0x13, 0xe5, 0x32, 0x30, 0xe2, 0x07, 0x90, 0x20} },
+{ 0x0d73, 16, {0x14, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2c, 0x70, 0x03} },
+{ 0x0d83, 12, {0x75, 0x2c, 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, 0x34, 0x30, 0xe3, 0x13, 0xe5, 0x32, 0x30, 0xe3, 0x07, 0x90, 0x20} },
+{ 0x0daf, 16, {0x1c, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2c, 0x70, 0x03} },
+{ 0x0dbf, 12, {0x75, 0x2c, 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, 0x34, 0x20} },
+{ 0x0deb, 16, {0xe0, 0x06, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x22, 0xe5, 0x31, 0x30, 0xe0, 0x0a, 0x90, 0x7f, 0xc7} },
+{ 0x0dfb, 16, {0xe0, 0x90, 0x02, 0xf8, 0xf0, 0x80, 0x13, 0xe5, 0x22, 0x30, 0xe0, 0x07, 0x90, 0x20, 0x04, 0xe0} },
+{ 0x0e0b, 16, {0x44, 0x02, 0xf0, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2c, 0x70, 0x03, 0x75, 0x2c} },
+{ 0x0e1b, 16, {0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0e2b, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x0e3b, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0xe5, 0x34, 0x20} },
+{ 0x0e4b, 16, {0xe1, 0x06, 0x90, 0x7f, 0xc9, 0xf0, 0x80, 0x22, 0xe5, 0x31, 0x30, 0xe1, 0x0a, 0x90, 0x7f, 0xc9} },
+{ 0x0e5b, 16, {0xe0, 0x90, 0x02, 0xf9, 0xf0, 0x80, 0x13, 0xe5, 0x22, 0x30, 0xe1, 0x07, 0x90, 0x20, 0x0c, 0xe0} },
+{ 0x0e6b, 16, {0x44, 0x02, 0xf0, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2c, 0x70, 0x03, 0x75, 0x2c} },
+{ 0x0e7b, 16, {0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0e8b, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x0e9b, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x08, 0xf0, 0xe5, 0x34, 0x20} },
+{ 0x0eab, 16, {0xe2, 0x06, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x22, 0xe5, 0x31, 0x30, 0xe2, 0x0a, 0x90, 0x7f, 0xcb} },
+{ 0x0ebb, 16, {0xe0, 0x90, 0x02, 0xfa, 0xf0, 0x80, 0x13, 0xe5, 0x22, 0x30, 0xe2, 0x07, 0x90, 0x20, 0x14, 0xe0} },
+{ 0x0ecb, 16, {0x44, 0x02, 0xf0, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2c, 0x70, 0x03, 0x75, 0x2c} },
+{ 0x0edb, 16, {0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0eeb, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x0efb, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x10, 0xf0, 0xe5, 0x34, 0x20} },
+{ 0x0f0b, 16, {0xe3, 0x06, 0x90, 0x7f, 0xcd, 0xf0, 0x80, 0x22, 0xe5, 0x31, 0x30, 0xe3, 0x0a, 0x90, 0x7f, 0xcd} },
+{ 0x0f1b, 16, {0xe0, 0x90, 0x02, 0xfb, 0xf0, 0x80, 0x13, 0xe5, 0x22, 0x30, 0xe3, 0x07, 0x90, 0x20, 0x1c, 0xe0} },
+{ 0x0f2b, 16, {0x44, 0x02, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2c, 0x70, 0x03, 0x75, 0x2c} },
+{ 0x0f3b, 16, {0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0f4b, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x80, 0xf0, 0xd0} },
+{ 0x0f5b, 6, {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0f61, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x90} },
+{ 0x0f71, 12, {0x01, 0xbd, 0x74, 0xff, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0f7d, 16, {0x90, 0x01, 0x20, 0x12, 0xa3, 0xfa, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} },
+{ 0x0f8d, 16, {0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x13, 0xf0, 0xa3, 0x74} },
+{ 0x0f9d, 16, {0x11, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
+{ 0x0fad, 16, {0x04, 0xa3, 0xf0, 0xef, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0, 0xa8} },
+{ 0x0fbd, 16, {0x01, 0xfc, 0x7d, 0x01, 0x7b, 0x01, 0x7a, 0x01, 0x79, 0x1f, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0xa2} },
+{ 0x0fcd, 16, {0x12, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x87, 0xa6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xc3} },
+{ 0x0fdd, 16, {0x94, 0x04, 0x40, 0xc7, 0xe4, 0xf5, 0x27, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
+{ 0x0fed, 16, {0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4} },
+{ 0x0ffd, 16, {0xf0, 0x74, 0x23, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xdc, 0xe4} },
+{ 0x100d, 16, {0xf5, 0x34, 0xe5, 0xc0, 0x60, 0x2f, 0x90, 0x01, 0x1e, 0x74, 0x01, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
+{ 0x101d, 16, {0xff, 0xd3, 0x94, 0x04, 0x50, 0x1f, 0xef, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} },
+{ 0x102d, 16, {0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x34, 0x7e, 0x01, 0x7f, 0x1e, 0x12, 0x84, 0x41, 0x90, 0x01, 0x1e} },
+{ 0x103d, 16, {0xe0, 0x04, 0xf0, 0x80, 0xd7, 0xe4, 0xf5, 0x3e, 0xf5, 0x22, 0xf5, 0x31, 0xf5, 0x32, 0x90, 0x01} },
+{ 0x104d, 16, {0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4} },
+{ 0x105d, 16, {0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54, 0xf0, 0xfe, 0x74, 0xc5, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x01} },
+{ 0x106d, 16, {0xf5, 0x83, 0xee, 0xf0, 0x74, 0x3a, 0x2f, 0xf8, 0xa6, 0x06, 0x74, 0x36, 0x2f, 0xf8, 0xe4, 0xf6} },
+{ 0x107d, 16, {0x74, 0x2d, 0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0xfc, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
+{ 0x108d, 16, {0xe4, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xb4, 0x04, 0xb6, 0x90, 0x20, 0x60, 0xe0} },
+{ 0x109d, 4, {0x54, 0x0f, 0xf5, 0x4e} },
+{ 0x10a1, 16, {0x70, 0x03, 0x02, 0x11, 0x26, 0xe4, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3} },
+{ 0x10b1, 16, {0x94, 0x04, 0x50, 0xe4, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x55} },
+{ 0x10c1, 16, {0x4e, 0x60, 0x5a, 0x90, 0x01, 0x1e, 0xe0, 0xfe, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82} },
+{ 0x10d1, 16, {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xff, 0xee, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82} },
+{ 0x10e1, 16, {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xee, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4} },
+{ 0x10f1, 16, {0x34, 0x20, 0xf5, 0x83, 0xe0, 0xff, 0xaf, 0x06, 0xee, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5} },
+{ 0x1101, 16, {0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0} },
+{ 0x1111, 16, {0xf5, 0x66, 0x8e, 0x65, 0x8d, 0x64, 0x8c, 0x63, 0x7d, 0x06, 0x12, 0x83, 0xdf, 0x90, 0x01, 0x1e} },
+{ 0x1121, 6, {0xe0, 0x04, 0xf0, 0x80, 0x85, 0x22} },
+{ 0x1127, 2, {0xac, 0x07} },
+{ 0x1129, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xec, 0x25, 0xe0, 0x44, 0x41, 0x90, 0x7f, 0xa6, 0xf0} },
+{ 0x1139, 16, {0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
+{ 0x1149, 16, {0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0xd4, 0x80, 0xf8, 0x90, 0x7f} },
+{ 0x1159, 16, {0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xdc, 0x20, 0xe1, 0x09, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
+{ 0x1169, 16, {0xf9, 0x22, 0xed, 0x30, 0xe2, 0x0c, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
+{ 0x1179, 16, {0xfa, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7b, 0x1e} },
+{ 0x1189, 16, {0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6} },
+{ 0x1199, 16, {0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0x86, 0x80, 0xf8, 0x90, 0x7f, 0xa5, 0xe0} },
+{ 0x11a9, 16, {0xfd, 0x20, 0xe0, 0xdc, 0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x19, 0x90, 0x7f, 0xa5, 0xe0} },
+{ 0x11b9, 16, {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03} },
+{ 0x11c9, 16, {0x02, 0x11, 0x29, 0x80, 0xf5, 0x90, 0x7f, 0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xd9, 0x30, 0xe2, 0x09} },
+{ 0x11d9, 16, {0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f, 0xfa, 0x22, 0xc2, 0xaf, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x11e9, 12, {0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0xd2, 0xaf, 0xff, 0x7e, 0x00} },
+{ 0x11f5, 1, {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} },
+{ 0x1230, 16, {0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00} },
+{ 0x1240, 16, {0x07, 0x05, 0x83, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05} },
+{ 0x1250, 16, {0x84, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x87, 0x02} },
+{ 0x1260, 16, {0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x24, 0x03} },
+{ 0x1270, 16, {0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x20, 0x00} },
+{ 0x1280, 16, {0x54, 0x00, 0x65, 0x00, 0x63, 0x00, 0x68, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00} },
+{ 0x1290, 16, {0x2e, 0x00, 0x18, 0x03, 0x57, 0x00, 0x68, 0x00, 0x69, 0x00, 0x74, 0x00, 0x65, 0x00, 0x48, 0x00} },
+{ 0x12a0, 16, {0x45, 0x00, 0x41, 0x00, 0x54, 0x00, 0x2d, 0x00, 0x34, 0x00, 0x1a, 0x03, 0x58, 0x00, 0x58, 0x00} },
+{ 0x12b0, 16, {0x2d, 0x00, 0x58, 0x00, 0x58, 0x00, 0x2d, 0x00, 0x58, 0x00, 0x58, 0x00, 0x58, 0x00, 0x58, 0x00} },
+{ 0x12c0, 16, {0x58, 0x00, 0x58, 0x00, 0x2a, 0x03, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00} },
+{ 0x12d0, 16, {0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00} },
+{ 0x12e0, 16, {0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x22, 0x03} },
+{ 0x12f0, 16, {0x49, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x61, 0x00, 0x63, 0x00} },
+{ 0x1300, 16, {0x65, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00} },
+{ 0x1310, 2, {0x00, 0x00} },
+{ 0x1312, 16, {0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0xc0, 0xd0} },
+{ 0x1322, 16, {0x75, 0x86, 0x00, 0x75, 0xd0, 0x18, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xf5, 0xf0, 0x70, 0x11} },
+{ 0x1332, 16, {0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0} },
+{ 0x1342, 16, {0x32, 0x75, 0x86, 0x00, 0x10, 0xf0, 0x0b, 0x10, 0xf1, 0x12, 0x10, 0xf2, 0x19, 0x10, 0xf3, 0x20} },
+{ 0x1352, 16, {0x80, 0xd4, 0xe5, 0x28, 0x70, 0x03, 0x75, 0x28, 0x14, 0x02, 0x13, 0x7c, 0xe5, 0x29, 0x70, 0x03} },
+{ 0x1362, 16, {0x75, 0x29, 0x14, 0x02, 0x15, 0x0d, 0xe5, 0x2a, 0x70, 0x03, 0x75, 0x2a, 0x14, 0x02, 0x16, 0x9e} },
+{ 0x1372, 16, {0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 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, 0x3a, 0x02, 0x13, 0x43} },
+{ 0x13a2, 16, {0x43, 0x82, 0x04, 0xe0, 0x43, 0x2d, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x05} },
+{ 0x13b2, 16, {0xe0, 0x42, 0x36, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1, 0x02} },
+{ 0x13c2, 16, {0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x32, 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, 0x3f, 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} },
+{ 0x1442, 16, {0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xef, 0x05} },
+{ 0x1452, 16, {0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xb7, 0xf0, 0x05, 0x86, 0xa3, 0xe0, 0x54, 0xfe, 0xf0} },
+{ 0x1462, 16, {0x02, 0x13, 0x43, 0x53, 0x2d, 0xfa, 0xe5, 0x23, 0x60, 0x08, 0x75, 0x23, 0x00, 0xd2, 0xe7, 0xfe} },
+{ 0x1472, 16, {0x80, 0x0a, 0x90, 0x7f, 0xc7, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x14, 0xff, 0x90, 0x20, 0x50, 0x74} },
+{ 0x1482, 16, {0x00, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
+{ 0x1492, 16, {0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7e, 0x40, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0} },
+{ 0x14a2, 16, {0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86, 0xe0, 0x24, 0x38, 0xf0, 0x05} },
+{ 0x14b2, 16, {0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78, 0x60, 0x30, 0x03, 0x03, 0x03} },
+{ 0x14c2, 16, {0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0} },
+{ 0x14d2, 16, {0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70, 0x11, 0x8b, 0x23, 0x90, 0x7f} },
+{ 0x14e2, 16, {0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x80, 0x1b, 0xe0, 0xde, 0xfd} },
+{ 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, 0x3b, 0x02, 0x13} },
+{ 0x1532, 16, {0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2e, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82} },
+{ 0x1542, 16, {0x05, 0xe0, 0x42, 0x37, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1} },
+{ 0x1552, 16, {0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x32, 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, 0x40, 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} },
+{ 0x15d2, 16, {0x84, 0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xef} },
+{ 0x15e2, 16, {0x05, 0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xb9, 0xf0, 0x05, 0x86, 0xa3, 0xe0, 0x54, 0xfe} },
+{ 0x15f2, 16, {0xf0, 0x02, 0x13, 0x43, 0x53, 0x2e, 0xfa, 0xe5, 0x24, 0x60, 0x08, 0x75, 0x24, 0x00, 0xd2, 0xe7} },
+{ 0x1602, 16, {0xfe, 0x80, 0x0a, 0x90, 0x7f, 0xc9, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x16, 0x90, 0x90, 0x20, 0x50} },
+{ 0x1612, 16, {0x74, 0x01, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0} },
+{ 0x1622, 16, {0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0xc0, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84} },
+{ 0x1632, 16, {0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86, 0xe0, 0x24, 0x38, 0xf0} },
+{ 0x1642, 16, {0x05, 0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78, 0x60, 0x30, 0x03, 0x03} },
+{ 0x1652, 16, {0x03, 0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0} },
+{ 0x1662, 16, {0xe0, 0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70, 0x11, 0x8b, 0x24, 0x90} },
+{ 0x1672, 16, {0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x80, 0x1b, 0xe0, 0xde} },
+{ 0x1682, 14, {0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
+{ 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, {0x3c, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2f, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82} },
+{ 0x16d0, 16, {0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x38, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13} },
+{ 0x16e0, 16, {0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x32, 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, 0x41, 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} },
+{ 0x1760, 16, {0x05, 0xfd, 0x8d, 0x84, 0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05} },
+{ 0x1770, 16, {0x86, 0xdf, 0xef, 0x05, 0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xbb, 0xf0, 0x05, 0x86, 0xa3} },
+{ 0x1780, 16, {0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x53, 0x2f, 0xfa, 0xe5, 0x25, 0x60, 0x08, 0x75, 0x25} },
+{ 0x1790, 16, {0x00, 0xd2, 0xe7, 0xfe, 0x80, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x18, 0x21} },
+{ 0x17a0, 16, {0x90, 0x20, 0x50, 0x74, 0x02, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0} },
+{ 0x17b0, 16, {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x40, 0x05, 0x86, 0xe5, 0x85, 0xf0} },
+{ 0x17c0, 16, {0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86, 0xe0} },
+{ 0x17d0, 16, {0x24, 0x38, 0xf0, 0x05, 0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78, 0x60} },
+{ 0x17e0, 16, {0x30, 0x03, 0x03, 0x03, 0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0, 0xe0} },
+{ 0x17f0, 16, {0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70, 0x11} },
+{ 0x1800, 16, {0x8b, 0x25, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x80} },
+{ 0x1810, 16, {0x1b, 0xe0, 0xde, 0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00} },
+{ 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, 0x3d, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x30, 0x01, 0x02, 0x13, 0x43, 0x53} },
+{ 0x1860, 16, {0x82, 0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x39, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02} },
+{ 0x1870, 16, {0x13, 0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x32, 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, 0x42, 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} },
+{ 0x18f0, 16, {0x24, 0x05, 0xfd, 0x8d, 0x84, 0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3} },
+{ 0x1900, 16, {0x05, 0x86, 0xdf, 0xef, 0x05, 0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xbd, 0xf0, 0x05, 0x86} },
+{ 0x1910, 16, {0xa3, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x53, 0x30, 0xfa, 0xe5, 0x26, 0x60, 0x08, 0x75} },
+{ 0x1920, 16, {0x26, 0x00, 0xd2, 0xe7, 0xfe, 0x80, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x19} },
+{ 0x1930, 16, {0xb2, 0x90, 0x20, 0x50, 0x74, 0x03, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2} },
+{ 0x1940, 16, {0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7c, 0xc0, 0x05, 0x86, 0xe5, 0x85} },
+{ 0x1950, 16, {0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86} },
+{ 0x1960, 16, {0xe0, 0x24, 0x38, 0xf0, 0x05, 0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78} },
+{ 0x1970, 16, {0x60, 0x30, 0x03, 0x03, 0x03, 0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0} },
+{ 0x1980, 16, {0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70} },
+{ 0x1990, 16, {0x11, 0x8b, 0x26, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
+{ 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, 0x59, 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, 0xa2, 0x97, 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, {0xa2, 0x81, 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, 0x59, 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, 0x59, 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, 0x33, 0xc3, 0x94, 0x01, 0x50, 0x1c, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x7f, 0x02} },
+{ 0x1b1c, 16, {0x7d, 0xff, 0x12, 0x82, 0xea, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x7f, 0x03, 0x7d, 0xff} },
+{ 0x1b2c, 4, {0x12, 0x82, 0xea, 0x22} },
+{ 0x8000, 16, {0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0xa2, 0x54, 0xfd, 0x8b, 0x50, 0x75} },
+{ 0x8010, 16, {0x51, 0x12, 0x75, 0x52, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x4e} },
+{ 0x8020, 16, {0xf5, 0x4f, 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, 0x50, 0xaa, 0x51, 0xa9, 0x52} },
+{ 0x8060, 16, {0x90, 0x00, 0x01, 0x12, 0xa2, 0x54, 0x64, 0x05, 0x60, 0x03, 0x02, 0x81, 0xb5, 0x90, 0x00, 0x03} },
+{ 0x8070, 16, {0x12, 0xa2, 0x54, 0x64, 0x01, 0x60, 0x03, 0x02, 0x81, 0x3c, 0x90, 0x00, 0x02, 0x12, 0xa2, 0x54} },
+{ 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, 0x4f, 0xae, 0x4e, 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, 0x4f, 0xae, 0x4e, 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, 0xa2, 0x54, 0x25} },
+{ 0x8120, 16, {0x4f, 0xf5, 0x4f, 0xe4, 0x35, 0x4e, 0xf5, 0x4e, 0x90, 0x00, 0x05, 0x12, 0xa2, 0x54, 0xfe, 0xe4} },
+{ 0x8130, 16, {0x25, 0x4f, 0xf5, 0x4f, 0xee, 0x35, 0x4e, 0xf5, 0x4e, 0x02, 0x81, 0xb8, 0xab, 0x50, 0xaa, 0x51} },
+{ 0x8140, 16, {0xa9, 0x52, 0x90, 0x00, 0x03, 0x12, 0xa2, 0x54, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} },
+{ 0x8150, 16, {0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0xa2, 0x54, 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, 0x52, 0xf5, 0x52, 0xe4, 0x35} },
+{ 0x81c0, 16, {0x51, 0xf5, 0x51, 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, 4, {0x8e, 0x59, 0x8f, 0x5a} },
+{ 0x81dd, 16, {0x75, 0x5b, 0x03, 0xe5, 0x5a, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x59, 0xf5, 0x83, 0xe0, 0xfe} },
+{ 0x81ed, 16, {0xa3, 0xe0, 0x4e, 0x70, 0x03, 0x02, 0x82, 0xe7, 0xe5, 0x5b, 0x60, 0x4e, 0x14, 0x60, 0x38, 0x14} },
+{ 0x81fd, 16, {0x60, 0x20, 0x14, 0x60, 0x03, 0x02, 0x82, 0x8b, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
+{ 0x820d, 16, {0x5a, 0x82, 0x85, 0x59, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6, 0xf0} },
+{ 0x821d, 16, {0x80, 0x6c, 0x85, 0x5a, 0x82, 0x85, 0x59, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} },
+{ 0x822d, 16, {0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x5b, 0x85, 0x5a, 0x82, 0x85, 0x59, 0x83, 0xa3} },
+{ 0x823d, 16, {0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x5a, 0x24, 0x06, 0xf5, 0x82} },
+{ 0x824d, 16, {0xe4, 0x35, 0x59, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5} },
+{ 0x825d, 16, {0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x5a, 0x24} },
+{ 0x826d, 16, {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x59, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0xa2, 0x81, 0x85} },
+{ 0x827d, 16, {0x5a, 0x82, 0x85, 0x59, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x81, 0x90, 0x7f} },
+{ 0x828d, 16, {0xa5, 0xe0, 0xf5, 0x5c, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} },
+{ 0x829d, 16, {0x22, 0xe5, 0x5c, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} },
+{ 0x82ad, 16, {0xe5, 0x5b, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x82bd, 16, {0x80, 0xf0, 0x85, 0x5a, 0x82, 0x85, 0x59, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90} },
+{ 0x82cd, 16, {0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x5c, 0x30, 0xe0, 0xf7, 0x30, 0xe1, 0xd5, 0x75} },
+{ 0x82dd, 12, {0x5b, 0x03, 0x02, 0x81, 0xe0, 0x15, 0x5b, 0x02, 0x81, 0xe0, 0x7f, 0x08} },
+{ 0x82e9, 1, {0x22} },
+{ 0x82ea, 2, {0xae, 0x07} },
+{ 0x82ec, 16, {0x7c, 0x02, 0xec, 0x14, 0x60, 0x15, 0x14, 0x70, 0x1e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0} },
+{ 0x82fc, 16, {0xee, 0x25, 0xe0, 0x44, 0x40, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xa6, 0xed, 0xf0} },
+{ 0x830c, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xfb, 0x30, 0xe0, 0xf8, 0xbc} },
+{ 0x831c, 16, {0x02, 0x0a, 0x20, 0xe1, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22, 0xeb, 0x30, 0xe2, 0x0a} },
+{ 0x832c, 14, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xdc, 0xb6, 0x7f, 0x08} },
+{ 0x833a, 1, {0x22} },
+{ 0x833b, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc2, 0xa9, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xd2, 0xa9} },
+{ 0x834b, 15, {0x53, 0x91, 0x7f, 0x90, 0x01, 0xc4, 0xe4, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x835a, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xf5} },
+{ 0x836a, 16, {0x83, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x61, 0x74, 0xbf} },
+{ 0x837a, 16, {0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x44, 0x10, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
+{ 0x838a, 16, {0xa3, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xf0, 0xf9, 0xed, 0x60, 0x1d, 0x74, 0x01} },
+{ 0x839a, 16, {0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4} },
+{ 0x83aa, 16, {0xef, 0x55, 0x31, 0x60, 0x04, 0x79, 0x09, 0x80, 0x02, 0x79, 0x0d, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
+{ 0x83ba, 16, {0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x54, 0xef, 0xf0, 0x8b} },
+{ 0x83ca, 16, {0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x61, 0xf0, 0xae, 0x02, 0xaf, 0x03, 0x8f, 0x82, 0x8e} },
+{ 0x83da, 4, {0x83, 0xa3, 0xe9, 0xf0} },
+{ 0x83de, 1, {0x22} },
+{ 0x83df, 4, {0x8f, 0x61, 0x8d, 0x62} },
+{ 0x83e3, 16, {0xe4, 0xf5, 0x67, 0x74, 0x3f, 0x2f, 0xf8, 0x76, 0x08, 0x7f, 0x80, 0x7e, 0x25, 0x7d, 0x00, 0x7c} },
+{ 0x83f3, 16, {0x00, 0xab, 0x66, 0xaa, 0x65, 0xa9, 0x64, 0xa8, 0x63, 0xd3, 0x12, 0xa3, 0xb3, 0x40, 0x26, 0x7f} },
+{ 0x8403, 16, {0x00, 0x7e, 0x96, 0x7d, 0x00, 0x7c, 0x00, 0xa8, 0x63, 0xd3, 0x12, 0xa3, 0xb3, 0x50, 0x0c, 0x75} },
+{ 0x8413, 16, {0x67, 0x40, 0x74, 0x3f, 0x25, 0x61, 0xf8, 0x76, 0x10, 0x80, 0x0a, 0x75, 0x67, 0x80, 0x74, 0x3f} },
+{ 0x8423, 16, {0x25, 0x61, 0xf8, 0x76, 0x38, 0xe5, 0x67, 0x45, 0x62, 0x44, 0x01, 0xff, 0xe5, 0x61, 0x75, 0xf0} },
+{ 0x8433, 13, {0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xef, 0xf0} },
+{ 0x8440, 1, {0x22} },
+{ 0x8441, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x57, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
+{ 0x8451, 16, {0xe5, 0x57, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} },
+{ 0x8461, 16, {0x58, 0x8f, 0x59, 0xe5, 0x57, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
+{ 0x8471, 16, {0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x57, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
+{ 0x8481, 16, {0x83, 0xe4, 0xf0, 0x74, 0x23, 0x25, 0x57, 0xf8, 0xe4, 0xf6, 0xe5, 0x59, 0x24, 0x04, 0xf5, 0x82} },
+{ 0x8491, 16, {0xe4, 0x35, 0x58, 0xf5, 0x83, 0xe0, 0x44, 0x03, 0xf0, 0xe5, 0x57, 0x75, 0xf0, 0x0d, 0xa4, 0x24} },
+{ 0x84a1, 16, {0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
+{ 0x84b1, 16, {0xa3, 0xe0, 0xf5, 0x66, 0x8e, 0x65, 0x8d, 0x64, 0x8c, 0x63, 0x7d, 0x06, 0xaf, 0x57, 0x12, 0x83} },
+{ 0x84c1, 16, {0xdf, 0xaf, 0x57, 0x7d, 0x01, 0x12, 0x83, 0x5a, 0x85, 0x59, 0x82, 0x85, 0x58, 0x83, 0xa3, 0xa3} },
+{ 0x84d1, 16, {0xe0, 0x20, 0xe0, 0x43, 0xe0, 0xff, 0xe5, 0x59, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x58, 0xf5} },
+{ 0x84e1, 16, {0x83, 0xe0, 0xe5, 0x59, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x58, 0xf5, 0x83, 0xe0, 0xff, 0xe5} },
+{ 0x84f1, 16, {0x57, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc} },
+{ 0x8501, 16, {0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xf5, 0x66, 0x8e, 0x65, 0x8d, 0x64, 0x8c, 0x63} },
+{ 0x8511, 16, {0x7d, 0x06, 0xaf, 0x57, 0x12, 0x83, 0xdf, 0x74, 0xf8, 0x25, 0x57, 0xf5, 0x82, 0xe4, 0x34, 0x02} },
+{ 0x8521, 16, {0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x57, 0x25, 0xe0, 0xff, 0xc3, 0x74, 0x0c, 0x9f, 0x75, 0xf0, 0x40} },
+{ 0x8531, 16, {0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82, 0xfe, 0xe5, 0x57, 0x25, 0xe0} },
+{ 0x8541, 16, {0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0xaf, 0x57} },
+{ 0x8551, 15, {0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x34, 0x7f, 0x00} },
+{ 0x8560, 1, {0x22} },
+{ 0x8561, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x57, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
+{ 0x8571, 16, {0xaf, 0x57, 0xe4, 0xfd, 0x12, 0x83, 0x5a, 0x74, 0xf8, 0x25, 0x57, 0xf5, 0x82, 0xe4, 0x34, 0x02} },
+{ 0x8581, 16, {0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x57, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x8591, 16, {0x20, 0xaf, 0x82, 0xf5, 0x59, 0x8f, 0x5a, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4} },
+{ 0x85a1, 16, {0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x57, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x0c} },
+{ 0x85b1, 16, {0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x57, 0x75, 0xf0, 0x0d, 0xa4, 0x24} },
+{ 0x85c1, 16, {0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
+{ 0x85d1, 16, {0xa3, 0xe0, 0xf5, 0x66, 0x8e, 0x65, 0x8d, 0x64, 0x8c, 0x63, 0x7d, 0x06, 0xaf, 0x57, 0x12, 0x83} },
+{ 0x85e1, 16, {0xdf, 0xe5, 0x5a, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x59, 0xf5, 0x83, 0xe0, 0x30, 0xe0, 0x09} },
+{ 0x85f1, 16, {0x85, 0x5a, 0x82, 0x85, 0x59, 0x83, 0xe0, 0xf5, 0x58, 0xaf, 0x57, 0x74, 0x01, 0xa8, 0x07, 0x08} },
+{ 0x8601, 16, {0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x34, 0xe5, 0x57, 0x25, 0xe0, 0x24, 0xc6, 0xf5} },
+{ 0x8611, 16, {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x57, 0x25, 0xe0, 0x24, 0xc7} },
+{ 0x8621, 11, {0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x7f, 0x00} },
+{ 0x862c, 1, {0x22} },
+{ 0x862d, 4, {0x8e, 0x57, 0x8f, 0x58} },
+{ 0x8631, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x59, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
+{ 0x8641, 16, {0xe5, 0x59, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0} },
+{ 0x8651, 16, {0x54, 0x03, 0x70, 0x66, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0x30, 0xe0, 0x28, 0xe5} },
+{ 0x8661, 16, {0x59, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc} },
+{ 0x8671, 16, {0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xf5, 0x66, 0x8e, 0x65, 0x8d, 0x64, 0x8c, 0x63} },
+{ 0x8681, 16, {0x7d, 0x02, 0xaf, 0x59, 0x12, 0x83, 0xdf, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0x30} },
+{ 0x8691, 16, {0xe1, 0x28, 0xe5, 0x59, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5} },
+{ 0x86a1, 16, {0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xf5, 0x66, 0x8e, 0x65, 0x8d} },
+{ 0x86b1, 12, {0x64, 0x8c, 0x63, 0x7d, 0x04, 0xaf, 0x59, 0x12, 0x83, 0xdf, 0x7f, 0x00} },
+{ 0x86bd, 1, {0x22} },
+{ 0x86be, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0xa3, 0xa3, 0xa3, 0xe0, 0xfc, 0xed} },
+{ 0x86ce, 16, {0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xc0, 0x83, 0xc0} },
+{ 0x86de, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0} },
+{ 0x86ee, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0xe0, 0xfd, 0xec, 0x6d, 0xd0} },
+{ 0x86fe, 16, {0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f} },
+{ 0x870e, 16, {0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82} },
+{ 0x871e, 16, {0x8e, 0x83, 0xa3, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0} },
+{ 0x872e, 16, {0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0} },
+{ 0x873e, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xff, 0xed, 0x6f, 0xd0, 0x82, 0xd0} },
+{ 0x874e, 3, {0x83, 0xf0, 0x22} },
+{ 0x8751, 4, {0xad, 0x07, 0xac, 0x06} },
+{ 0x8755, 16, {0x79, 0x0d, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff} },
+{ 0x8765, 16, {0x22, 0x8c, 0x57, 0x8d, 0x58, 0xee, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x8775, 16, {0x03, 0xaf, 0x82, 0xfe, 0xad, 0x01, 0x19, 0xed, 0x60, 0x24, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01} },
+{ 0x8785, 16, {0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05, 0x58, 0xe5, 0x58, 0xaa, 0x57, 0x70, 0x02} },
+{ 0x8795, 16, {0x05, 0x57, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0x6d, 0x60, 0xd9, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x87a5, 1, {0x22} },
+{ 0x87a6, 4, {0x8e, 0x57, 0x8f, 0x58} },
+{ 0x87aa, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x5e, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
+{ 0x87ba, 16, {0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} },
+{ 0x87ca, 16, {0x5f, 0x8f, 0x60, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
+{ 0x87da, 16, {0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x08, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xd3, 0x12, 0xa3} },
+{ 0x87ea, 16, {0xb3, 0x40, 0x10, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0x12, 0xa3, 0xfa, 0x00, 0x00, 0x00} },
+{ 0x87fa, 16, {0x08, 0x80, 0x2e, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
+{ 0x880a, 16, {0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x08, 0x79, 0x07, 0x78, 0x00, 0xc3, 0x12, 0xa3} },
+{ 0x881a, 16, {0xb3, 0x50, 0x0e, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0x12, 0xa3, 0xfa, 0x00, 0x07, 0x08} },
+{ 0x882a, 16, {0x00, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa} },
+{ 0x883a, 16, {0xa3, 0xe0, 0xfb, 0x7f, 0x00, 0x7e, 0x50, 0x7d, 0x46, 0x7c, 0x00, 0x12, 0xa3, 0x21, 0x8f, 0x5c} },
+{ 0x884a, 16, {0x8e, 0x5b, 0x8d, 0x5a, 0x8c, 0x59, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa3} },
+{ 0x885a, 16, {0x21, 0xaf, 0x03, 0x8f, 0x5d, 0xaf, 0x5c, 0xae, 0x5b, 0xad, 0x5a, 0xac, 0x59, 0x7b, 0x0a, 0x7a} },
+{ 0x886a, 16, {0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa3, 0x21, 0x8f, 0x5c, 0x8e, 0x5b, 0x8d, 0x5a, 0x8c, 0x59} },
+{ 0x887a, 16, {0xe5, 0x5d, 0xc3, 0x94, 0x05, 0x40, 0x15, 0xe5, 0x5c, 0x24, 0x01, 0xf5, 0x5c, 0xe4, 0x35, 0x5b} },
+{ 0x888a, 16, {0xf5, 0x5b, 0xe4, 0x35, 0x5a, 0xf5, 0x5a, 0xe4, 0x35, 0x59, 0xf5, 0x59, 0x85, 0x60, 0x82, 0x85} },
+{ 0x889a, 16, {0x5f, 0x83, 0xa3, 0xe4, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44} },
+{ 0x88aa, 16, {0x80, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xe5, 0x5c, 0xf0, 0xaf, 0x5c, 0xae, 0x5b, 0xad} },
+{ 0x88ba, 16, {0x5a, 0xac, 0x59, 0x78, 0x08, 0x12, 0xa3, 0xc4, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xef} },
+{ 0x88ca, 16, {0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5} },
+{ 0x88da, 16, {0x5d, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe0} },
+{ 0x88ea, 16, {0x23, 0x54, 0x01, 0xf0, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0} },
+{ 0x88fa, 16, {0x54, 0xfd, 0xf0, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc} },
+{ 0x890a, 16, {0x42, 0x22, 0x80, 0x36, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x5e, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce} },
+{ 0x891a, 16, {0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x22, 0x60, 0x1f, 0xe5, 0x60, 0x24, 0x04, 0xf5} },
+{ 0x892a, 16, {0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07} },
+{ 0x893a, 16, {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x22, 0xe5, 0x58, 0x24, 0x08, 0xf5, 0x82} },
+{ 0x894a, 16, {0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62, 0x05, 0x43, 0x5d, 0x0a, 0x80, 0x1a, 0xef} },
+{ 0x895a, 16, {0xb4, 0x72, 0x05, 0x43, 0x5d, 0x08, 0x80, 0x11, 0xef, 0xb4, 0x74, 0x05, 0x43, 0x5d, 0x02, 0x80} },
+{ 0x896a, 16, {0x08, 0xef, 0x64, 0x6e, 0x60, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82, 0xe4} },
+{ 0x897a, 16, {0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe3, 0x03, 0x43, 0x5d, 0x80, 0xef, 0x30, 0xe7, 0x12} },
+{ 0x898a, 16, {0x43, 0x5d, 0x40, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x44} },
+{ 0x899a, 16, {0x02, 0xf0, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0x30, 0xe1} },
+{ 0x89aa, 16, {0x20, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x32} },
+{ 0x89ba, 16, {0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0x80} },
+{ 0x89ca, 16, {0x10, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52} },
+{ 0x89da, 16, {0x32, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe4} },
+{ 0x89ea, 16, {0x11, 0xae, 0x5e, 0x74, 0x01, 0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x31} },
+{ 0x89fa, 16, {0x80, 0x10, 0xae, 0x5e, 0x74, 0x01, 0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4} },
+{ 0x8a0a, 16, {0x52, 0x31, 0xef, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x03, 0xe4, 0xf5, 0x5d, 0x85, 0x60, 0x82, 0x85} },
+{ 0x8a1a, 16, {0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3} },
+{ 0x8a2a, 16, {0xe4, 0xf0, 0xe5, 0x5d, 0xf0, 0xe5, 0x58, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83} },
+{ 0x8a3a, 16, {0xe0, 0xff, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xef, 0xf0, 0xe5} },
+{ 0x8a4a, 16, {0x58, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x60, 0x24, 0x05} },
+{ 0x8a5a, 16, {0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x58, 0x24, 0x09, 0xf5, 0x82, 0xe4} },
+{ 0x8a6a, 16, {0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x60, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5} },
+{ 0x8a7a, 16, {0x83, 0xef, 0xf0, 0xe5, 0x58, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff} },
+{ 0x8a8a, 16, {0xe5, 0x60, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xef, 0xf0, 0x85, 0x60, 0x82} },
+{ 0x8a9a, 16, {0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3} },
+{ 0x8aaa, 16, {0xf0, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
+{ 0x8aba, 16, {0xa3, 0xe0, 0xf5, 0x66, 0x8e, 0x65, 0x8d, 0x64, 0x8c, 0x63, 0x7d, 0x06, 0xaf, 0x5e, 0x12, 0x83} },
+{ 0x8aca, 16, {0xdf, 0x75, 0x5d, 0x08, 0xe5, 0x58, 0x24, 0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0} },
+{ 0x8ada, 16, {0x60, 0x03, 0x43, 0x5d, 0x10, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83} },
+{ 0x8aea, 16, {0xe0, 0x54, 0x03, 0x45, 0x5d, 0xf0, 0xe5, 0x58, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5} },
+{ 0x8afa, 16, {0x83, 0xe0, 0xfe, 0xc3, 0x94, 0x05, 0x40, 0x06, 0xee, 0xd3, 0x94, 0x08, 0x40, 0x03, 0x7f, 0xff} },
+{ 0x8b0a, 16, {0x22, 0xe5, 0x58, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xfd, 0xc3, 0x94} },
+{ 0x8b1a, 16, {0x01, 0x40, 0x06, 0xed, 0xd3, 0x94, 0x02, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xed, 0x14, 0xff, 0x25} },
+{ 0x8b2a, 16, {0xe0, 0x25, 0xe0, 0xff, 0xee, 0x24, 0xfb, 0x4f, 0xf5, 0x5d, 0xe5, 0x58, 0x24, 0x07, 0xf5, 0x82} },
+{ 0x8b3a, 16, {0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0x24, 0xd0, 0x60, 0x18, 0x14, 0x60, 0x1a, 0x24, 0xc3, 0x60} },
+{ 0x8b4a, 16, {0x1e, 0x14, 0x60, 0x09, 0x24, 0x0a, 0x70, 0x14, 0x43, 0x5d, 0x18, 0x80, 0x12, 0x43, 0x5d, 0x08} },
+{ 0x8b5a, 16, {0x80, 0x0d, 0x43, 0x5d, 0x38, 0x80, 0x08, 0x43, 0x5d, 0x28, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x85} },
+{ 0x8b6a, 16, {0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5d, 0xf0, 0x74, 0x01, 0x7e, 0x00, 0xa8} },
+{ 0x8b7a, 16, {0x5e, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x34} },
+{ 0x8b8a, 16, {0x60, 0x07, 0xaf, 0x5e, 0x7d, 0x01, 0x12, 0x83, 0x5a, 0xaa, 0x57, 0xa9, 0x58, 0x7b, 0x01, 0xc0} },
+{ 0x8b9a, 16, {0x03, 0xc0, 0x01, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0} },
+{ 0x8baa, 16, {0xa8, 0x01, 0xfc, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0xa2, 0x12} },
+{ 0x8bba, 2, {0x7f, 0x00} },
+{ 0x8bbc, 1, {0x22} },
+{ 0x8bbd, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8bcd, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x90, 0x01} },
+{ 0x8bdd, 16, {0x2c, 0x74, 0x08, 0xf0, 0xee, 0x04, 0xa3, 0xf0, 0xe4, 0xa3, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5} },
+{ 0x8bed, 16, {0x82, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x2f, 0xf0, 0x8d} },
+{ 0x8bfd, 16, {0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54} },
+{ 0x8c0d, 16, {0x1e, 0x90, 0x01, 0x30, 0xf0, 0x74, 0x2d, 0x2e, 0xf8, 0xe6, 0xa3, 0xf0, 0xaf, 0x06, 0x74, 0x01} },
+{ 0x8c1d, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x57, 0xe5, 0x33, 0xc3, 0x94, 0x01} },
+{ 0x8c2d, 16, {0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x58, 0x00, 0xf5, 0x59, 0x80, 0x09, 0x7f} },
+{ 0x8c3d, 16, {0x02, 0x12, 0x11, 0x27, 0x8e, 0x58, 0x8f, 0x59, 0xc3, 0xe5, 0x58, 0x64, 0x80, 0x94, 0x80, 0x40} },
+{ 0x8c4d, 16, {0xda, 0xe5, 0x57, 0x55, 0x59, 0x90, 0x01, 0x32, 0xf0, 0x7e, 0x01, 0x7f, 0x2c, 0x7d, 0x07, 0x12} },
+{ 0x8c5d, 4, {0x91, 0x6a, 0x7f, 0x00} },
+{ 0x8c61, 1, {0x22} },
+{ 0x8c62, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8c72, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x90, 0x01} },
+{ 0x8c82, 16, {0x33, 0x74, 0x0a, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} },
+{ 0x8c92, 16, {0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x34, 0xf0, 0x7e, 0x01, 0x7f, 0x33, 0x7d, 0x02, 0x12, 0x91} },
+{ 0x8ca2, 3, {0x6a, 0x7f, 0x00} },
+{ 0x8ca5, 1, {0x22} },
+{ 0x8ca6, 4, {0x8e, 0x57, 0x8f, 0x58} },
+{ 0x8caa, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8cba, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x85, 0x58} },
+{ 0x8cca, 16, {0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5} },
+{ 0x8cda, 16, {0x83, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x43, 0xee, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x0c, 0xf5, 0x82} },
+{ 0x8cea, 16, {0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0x30, 0xe0, 0x20, 0xee, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82} },
+{ 0x8cfa, 16, {0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x30, 0xe1, 0xf0, 0x7f, 0x60, 0xed, 0x24, 0x05, 0xf5, 0x82} },
+{ 0x8d0a, 16, {0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0x5f, 0xb5, 0x07, 0xf2, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04} },
+{ 0x8d1a, 12, {0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0x7f, 0x00} },
+{ 0x8d26, 1, {0x22} },
+{ 0x8d27, 4, {0xad, 0x07, 0xac, 0x06} },
+{ 0x8d2b, 16, {0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8d3b, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
+{ 0x8d4b, 16, {0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} },
+{ 0x8d5b, 16, {0x44, 0x01, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} },
+{ 0x8d6b, 4, {0xfe, 0xf0, 0x7f, 0x00} },
+{ 0x8d6f, 1, {0x22} },
+{ 0x8d70, 4, {0xad, 0x07, 0xac, 0x06} },
+{ 0x8d74, 16, {0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8d84, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
+{ 0x8d94, 16, {0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0d, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x40} },
+{ 0x8da4, 16, {0xf0, 0x80, 0x0b, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} },
+{ 0x8db4, 1, {0x22} },
+{ 0x8db5, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xaf} },
+{ 0x8dc5, 16, {0x06, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3e, 0x7f, 0x00} },
+{ 0x8dd5, 1, {0x22} },
+{ 0x8dd6, 4, {0x8e, 0x57, 0x8f, 0x58} },
+{ 0x8dda, 16, {0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x5c, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x59, 0xd3} },
+{ 0x8dea, 16, {0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x59, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x1f} },
+{ 0x8dfa, 16, {0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x5a, 0x7e, 0x75, 0x5b} },
+{ 0x8e0a, 16, {0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x5a, 0x7e, 0x75, 0x5b, 0x00, 0x80, 0x16, 0x7e} },
+{ 0x8e1a, 16, {0x7d, 0x7f, 0x80, 0x75, 0x5a, 0x7d, 0x75, 0x5b, 0x80, 0x80, 0x0a, 0x7e, 0x7d, 0x7f, 0x00, 0x75} },
+{ 0x8e2a, 16, {0x5a, 0x7d, 0x75, 0x5b, 0x00, 0xe5, 0x5c, 0x70, 0x1b, 0x85, 0x5b, 0x82, 0x85, 0x5a, 0x83, 0x74} },
+{ 0x8e3a, 16, {0xff, 0xf0, 0xe5, 0x59, 0x25, 0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74} },
+{ 0x8e4a, 16, {0x01, 0xf0, 0x80, 0x48, 0xe5, 0x58, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x57, 0xfe, 0xe5, 0x5c, 0x60} },
+{ 0x8e5a, 16, {0x23, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05} },
+{ 0x8e6a, 16, {0x5b, 0xe5, 0x5b, 0xaa, 0x5a, 0x70, 0x02, 0x05, 0x5a, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0} },
+{ 0x8e7a, 16, {0x15, 0x5c, 0x80, 0xd9, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xff, 0xe5, 0x59, 0x25} },
+{ 0x8e8a, 14, {0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} },
+{ 0x8e98, 1, {0x22} },
+{ 0x8e99, 16, {0xef, 0x24, 0x05, 0xf5, 0x58, 0xe4, 0x3e, 0xf5, 0x57, 0x90, 0x01, 0x35, 0x74, 0x07, 0xf0, 0x90} },
+{ 0x8ea9, 16, {0x01, 0x7a, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x36, 0xf0, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3} },
+{ 0x8eb9, 16, {0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x59, 0xf5, 0x5a, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
+{ 0x8ec9, 16, {0xe0, 0x24, 0x9e, 0x60, 0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8f, 0x7a} },
+{ 0x8ed9, 16, {0x24, 0x14, 0x60, 0x03, 0x02, 0x8f, 0xc8, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe} },
+{ 0x8ee9, 16, {0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x5c, 0x74, 0x01, 0x9e, 0xf5, 0x5b, 0xd3, 0xe5, 0x5c} },
+{ 0x8ef9, 16, {0x94, 0x3f, 0xe5, 0x5b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x5b, 0x00, 0x75, 0x5c, 0x3f, 0xd3, 0xe5} },
+{ 0x8f09, 16, {0x5a, 0x95, 0x5c, 0xe5, 0x59, 0x95, 0x5b, 0x50, 0x03, 0x02, 0x8f, 0xcb, 0xae, 0x5b, 0xaf, 0x5c} },
+{ 0x8f19, 16, {0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e} },
+{ 0x8f29, 16, {0x59, 0xf5, 0x5a, 0x02, 0x8f, 0xcb, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3} },
+{ 0x8f39, 16, {0xe0, 0xff, 0xc3, 0x74, 0x30, 0x9f, 0xf5, 0x5c, 0xe4, 0x9e, 0xf5, 0x5b, 0xd3, 0xe5, 0x5c, 0x94} },
+{ 0x8f49, 16, {0x10, 0xe5, 0x5b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x5b, 0x00, 0x75, 0x5c, 0x10, 0xd3, 0xe5, 0x5a} },
+{ 0x8f59, 16, {0x95, 0x5c, 0xe5, 0x59, 0x95, 0x5b, 0x40, 0x6a, 0xae, 0x5b, 0xaf, 0x5c, 0x85, 0x58, 0x82, 0x85} },
+{ 0x8f69, 16, {0x57, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x59, 0xf5, 0x5a, 0x80} },
+{ 0x8f79, 16, {0x51, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f} },
+{ 0x8f89, 16, {0xf5, 0x5c, 0xe4, 0x9e, 0xf5, 0x5b, 0x45, 0x5c, 0x60, 0x0b, 0xd3, 0xe5, 0x5c, 0x94, 0x3f, 0xe5} },
+{ 0x8f99, 16, {0x5b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x5b, 0x00, 0x75, 0x5c, 0x3f, 0xd3, 0xe5, 0x5a, 0x95, 0x5c} },
+{ 0x8fa9, 16, {0xe5, 0x59, 0x95, 0x5b, 0x40, 0x1c, 0xae, 0x5b, 0xaf, 0x5c, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
+{ 0x8fb9, 16, {0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x59, 0xf5, 0x5a, 0x80, 0x03, 0x7f} },
+{ 0x8fc9, 16, {0x01, 0x22, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x90, 0x8b} },
+{ 0x8fd9, 16, {0x24, 0xf9, 0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x90, 0xdb, 0x24, 0x14, 0x60, 0x03, 0x02} },
+{ 0x8fe9, 16, {0x91, 0x1f, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94} },
+{ 0x8ff9, 16, {0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x91, 0x1f, 0x90, 0x01, 0x75, 0xef, 0xf0, 0xe5, 0x5a} },
+{ 0x9009, 16, {0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15, 0x59, 0x4e, 0x70, 0x03, 0x02, 0x91, 0x1f, 0x90, 0x01} },
+{ 0x9019, 16, {0x75, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01} },
+{ 0x9029, 16, {0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x58, 0x82, 0x85} },
+{ 0x9039, 16, {0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03} },
+{ 0x9049, 16, {0x02, 0x91, 0x1f, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x91, 0x1f, 0x90} },
+{ 0x9059, 16, {0x01, 0x76, 0xef, 0xf0, 0xe5, 0x5a, 0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15, 0x59, 0x4e, 0x70} },
+{ 0x9069, 16, {0x03, 0x02, 0x91, 0x1f, 0x90, 0x01, 0x76, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90} },
+{ 0x9079, 16, {0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0} },
+{ 0x9089, 16, {0x80, 0xd2, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94} },
+{ 0x9099, 16, {0x20, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x91, 0x1f, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00} },
+{ 0x90a9, 16, {0x50, 0x74, 0x90, 0x01, 0x77, 0xef, 0xf0, 0xe5, 0x5a, 0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15} },
+{ 0x90b9, 16, {0x59, 0x4e, 0x60, 0x62, 0x90, 0x01, 0x77, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90} },
+{ 0x90c9, 16, {0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0} },
+{ 0x90d9, 16, {0x80, 0xd5, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x78} },
+{ 0x90e9, 16, {0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0xe5, 0x5a, 0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15, 0x59, 0x4e} },
+{ 0x90f9, 16, {0x60, 0x24, 0x90, 0x01, 0x78, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5} },
+{ 0x9109, 16, {0x83, 0xe0, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82} },
+{ 0x9119, 16, {0xf5, 0x83, 0xef, 0xf0, 0x80, 0xcf, 0x7e, 0x01, 0x7f, 0x35, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
+{ 0x9129, 13, {0xa3, 0xa3, 0xa3, 0xe0, 0xa3, 0xe0, 0x04, 0xfd, 0x12, 0x91, 0x6a, 0x7f, 0x00} },
+{ 0x9136, 1, {0x22} },
+{ 0x9137, 16, {0x8e, 0x62, 0x8f, 0x63, 0x8c, 0x64, 0x8d, 0x65, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x63} },
+{ 0x9147, 16, {0xe5, 0x63, 0xae, 0x62, 0x70, 0x02, 0x05, 0x62, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} },
+{ 0x9157, 16, {0x65, 0xe5, 0x65, 0xac, 0x64, 0x70, 0x02, 0x05, 0x64, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
+{ 0x9167, 3, {0x80, 0xd6, 0x22} },
+{ 0x916a, 6, {0x8d, 0x5d, 0xab, 0x07, 0xaa, 0x06} },
+{ 0x9170, 16, {0x75, 0x61, 0x40, 0x75, 0x60, 0x0d, 0x75, 0x5f, 0x03, 0x75, 0x5e, 0x00, 0x90, 0x7f, 0xc2, 0xe0} },
+{ 0x9180, 16, {0x20, 0xe1, 0xf9, 0xaf, 0x61, 0xae, 0x60, 0xad, 0x5f, 0xac, 0x5e, 0xec, 0x4d, 0x4e, 0x4f, 0x70} },
+{ 0x9190, 16, {0x08, 0x90, 0x7f, 0xc2, 0x74, 0x02, 0xf0, 0x80, 0xd7, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x16} },
+{ 0x91a0, 16, {0xaf, 0x03, 0xae, 0x02, 0x7c, 0x7b, 0x7d, 0x80, 0xab, 0x5d, 0x12, 0x91, 0x37, 0x90, 0x7f, 0xc3} },
+{ 0x91b0, 8, {0xe5, 0x5d, 0xf0, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x91b8, 1, {0x22} },
+{ 0x91b9, 16, {0x90, 0x01, 0x84, 0x74, 0x0b, 0xf0, 0xa3, 0xe5, 0x33, 0xf0, 0x90, 0x0a, 0xf5, 0xe4, 0x93, 0x90} },
+{ 0x91c9, 16, {0x01, 0x86, 0xf0, 0x90, 0x0a, 0xf6, 0xe4, 0x93, 0x90, 0x01, 0x87, 0xf0, 0xe4, 0x90, 0x01, 0x7c} },
+{ 0x91d9, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01} },
+{ 0x91e9, 16, {0xf0, 0xa3, 0x74, 0x88, 0xf0, 0x7e, 0x01, 0x7f, 0x7c, 0x12, 0x19, 0xc1, 0x7e, 0x01, 0x7f, 0x84} },
+{ 0x91f9, 7, {0x7d, 0x14, 0x12, 0x91, 0x6a, 0x7f, 0x00} },
+{ 0x9200, 1, {0x22} },
+{ 0x9201, 16, {0x7e, 0x7b, 0x7f, 0x40, 0x75, 0x4e, 0x7b, 0x75, 0x4f, 0x40, 0x90, 0x7f, 0xd3, 0xe0, 0xff, 0x85} },
+{ 0x9211, 16, {0x4e, 0x51, 0x85, 0x4f, 0x52, 0xe5, 0x52, 0x24, 0x01, 0xf5, 0x56, 0xe4, 0x35, 0x51, 0xf5, 0x55} },
+{ 0x9221, 16, {0xe4, 0xf5, 0x50, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0xfe, 0x14, 0xb4, 0x0c, 0x00, 0x50} },
+{ 0x9231, 16, {0x5b, 0x90, 0x92, 0x39, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x92, 0x5d, 0x02, 0x92, 0x5d, 0x02, 0x92} },
+{ 0x9241, 16, {0x67, 0x02, 0x92, 0x71, 0x02, 0x92, 0x71, 0x02, 0x92, 0x71, 0x02, 0x92, 0x85, 0x02, 0x92, 0x5d} },
+{ 0x9251, 16, {0x02, 0x92, 0x7b, 0x02, 0x92, 0x5d, 0x02, 0x92, 0x8d, 0x02, 0x92, 0x5d, 0xef, 0x64, 0x02, 0x60} },
+{ 0x9261, 16, {0x2b, 0x75, 0x50, 0xff, 0x80, 0x26, 0xef, 0x64, 0x0e, 0x60, 0x21, 0x75, 0x50, 0xff, 0x80, 0x1c} },
+{ 0x9271, 16, {0xef, 0x64, 0x03, 0x60, 0x17, 0x75, 0x50, 0xff, 0x80, 0x12, 0xef, 0x64, 0x03, 0x60, 0x0d, 0x75} },
+{ 0x9281, 16, {0x50, 0xff, 0x80, 0x08, 0xef, 0x64, 0x06, 0x60, 0x03, 0x75, 0x50, 0xff, 0xe5, 0x50, 0x60, 0x15} },
+{ 0x9291, 16, {0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0xa3, 0xee, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12} },
+{ 0x92a1, 16, {0x91, 0x6a, 0xaf, 0x50, 0x22, 0xe4, 0xf5, 0x50, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0x14} },
+{ 0x92b1, 16, {0xb4, 0x0f, 0x00, 0x40, 0x03, 0x02, 0x93, 0xcf, 0x90, 0x92, 0xc0, 0xf8, 0x28, 0x28, 0x73, 0x02} },
+{ 0x92c1, 16, {0x92, 0xed, 0x02, 0x92, 0xf9, 0x02, 0x93, 0x05, 0x02, 0x93, 0x53, 0x02, 0x93, 0x5e, 0x02, 0x93} },
+{ 0x92d1, 16, {0x69, 0x02, 0x93, 0x74, 0x02, 0x93, 0x7f, 0x02, 0x93, 0x8a, 0x02, 0x93, 0x95, 0x02, 0x93, 0xa0} },
+{ 0x92e1, 16, {0x02, 0x93, 0xa7, 0x02, 0x93, 0xcf, 0x02, 0x93, 0xb2, 0x02, 0x93, 0xbd, 0xaf, 0x56, 0xae, 0x55} },
+{ 0x92f1, 16, {0x12, 0x84, 0x41, 0x8f, 0x50, 0x02, 0x93, 0xd2, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x85, 0x61, 0x8f} },
+{ 0x9301, 16, {0x50, 0x02, 0x93, 0xd2, 0x85, 0x55, 0x53, 0x85, 0x56, 0x54, 0xe5, 0x54, 0x24, 0x01, 0xff, 0xe4} },
+{ 0x9311, 16, {0x35, 0x53, 0xfe, 0x12, 0x86, 0xbe, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x87, 0x51, 0x8f, 0x50, 0xef} },
+{ 0x9321, 16, {0x64, 0x01, 0x60, 0x03, 0x02, 0x93, 0xd2, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x87, 0xa6, 0x8f, 0x50} },
+{ 0x9331, 16, {0xe5, 0x50, 0x70, 0x03, 0x02, 0x93, 0xd2, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xe0, 0x75, 0xf0} },
+{ 0x9341, 16, {0x0d, 0xa4, 0x24, 0xf4, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xaf, 0x82, 0xfe, 0x12, 0x87, 0xa6, 0x02} },
+{ 0x9351, 16, {0x93, 0xd2, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8c, 0xa6, 0x8f, 0x50, 0x80, 0x74, 0xaf, 0x56, 0xae} },
+{ 0x9361, 16, {0x55, 0x12, 0x8d, 0x27, 0x8f, 0x50, 0x80, 0x69, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8d, 0x70, 0x8f} },
+{ 0x9371, 16, {0x50, 0x80, 0x5e, 0xaf, 0x4f, 0xae, 0x4e, 0x12, 0x8e, 0x99, 0x8f, 0x50, 0x80, 0x53, 0xaf, 0x56} },
+{ 0x9381, 16, {0xae, 0x55, 0x12, 0x8b, 0xbd, 0x8f, 0x50, 0x80, 0x48, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x86, 0x2d} },
+{ 0x9391, 16, {0x8f, 0x50, 0x80, 0x3d, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8c, 0x62, 0x8f, 0x50, 0x80, 0x32, 0x12} },
+{ 0x93a1, 16, {0x91, 0xb9, 0x8f, 0x50, 0x80, 0x2b, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8d, 0xb5, 0x8f, 0x50, 0x80} },
+{ 0x93b1, 16, {0x20, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8d, 0xd6, 0x8f, 0x50, 0x80, 0x15, 0xaf, 0x4f, 0xae, 0x4e} },
+{ 0x93c1, 16, {0x7c, 0x02, 0x7d, 0xaf, 0x7b, 0x40, 0x12, 0x91, 0x37, 0xe4, 0xf5, 0x50, 0x80, 0x03, 0x75, 0x50} },
+{ 0x93d1, 16, {0xff, 0xe5, 0x50, 0x60, 0x1d, 0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0x85, 0x52, 0x82, 0x85, 0x51} },
+{ 0x93e1, 16, {0x83, 0xe0, 0x90, 0x01, 0x99, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12, 0x91, 0x6a, 0xaf} },
+{ 0x93f1, 16, {0x50, 0x22, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0xff, 0x14, 0x24, 0xfa, 0x50, 0x04, 0x24} },
+{ 0x9401, 16, {0xfe, 0x70, 0x1f, 0x90, 0x01, 0x98, 0x74, 0x10, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x56, 0x82, 0x85} },
+{ 0x9411, 16, {0x55, 0x83, 0xe0, 0x90, 0x01, 0x9a, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x03, 0x12, 0x91, 0x6a} },
+{ 0x9421, 4, {0x8f, 0x50, 0xaf, 0x50} },
+{ 0x9425, 1, {0x22} },
+{ 0x9426, 8, {0x8f, 0x51, 0x8e, 0x50, 0x8d, 0x4f, 0x8c, 0x4e} },
+{ 0x942e, 16, {0x75, 0x58, 0x01, 0x75, 0x59, 0x9c, 0xe4, 0xf5, 0x57, 0xaf, 0x53, 0x15, 0x53, 0xef, 0x70, 0x03} },
+{ 0x943e, 16, {0x02, 0x94, 0xc4, 0xaf, 0x52, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x51} },
+{ 0x944e, 16, {0xae, 0x50, 0xad, 0x4f, 0xac, 0x4e, 0x12, 0xa3, 0x21, 0xaf, 0x03, 0x8f, 0x56, 0xaf, 0x51, 0xae} },
+{ 0x945e, 16, {0x50, 0xad, 0x4f, 0xac, 0x4e, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x52, 0xe4} },
+{ 0x946e, 16, {0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} },
+{ 0x947e, 16, {0x12, 0xa3, 0x21, 0x8f, 0x51, 0x8e, 0x50, 0x8d, 0x4f, 0x8c, 0x4e, 0xe5, 0x56, 0x24, 0x30, 0xf5} },
+{ 0x948e, 16, {0x56, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x56, 0xf5, 0x56, 0x05, 0x59, 0xe5, 0x59} },
+{ 0x949e, 16, {0xae, 0x58, 0x70, 0x02, 0x05, 0x58, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x59, 0xe5} },
+{ 0x94ae, 16, {0x59, 0xae, 0x58, 0x70, 0x02, 0x05, 0x58, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x56, 0xf0, 0x05} },
+{ 0x94be, 16, {0x57, 0x05, 0x57, 0x02, 0x94, 0x37, 0xe5, 0x59, 0x15, 0x59, 0x70, 0x02, 0x15, 0x58, 0xaf, 0x57} },
+{ 0x94ce, 16, {0x15, 0x57, 0xef, 0x60, 0x23, 0xe5, 0x59, 0x15, 0x59, 0xae, 0x58, 0x70, 0x02, 0x15, 0x58, 0xf5} },
+{ 0x94de, 16, {0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x55, 0xe5, 0x55, 0xac, 0x54, 0x70, 0x02, 0x05, 0x54, 0x14} },
+{ 0x94ee, 8, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} },
+{ 0x94f6, 1, {0x22} },
+{ 0x94f7, 16, {0xe4, 0x90, 0x01, 0xc9, 0xf0, 0x7e, 0x01, 0x7f, 0xca, 0x90, 0x01, 0xbe, 0xee, 0xf0, 0xa3, 0xef} },
+{ 0x9507, 10, {0xf0, 0x90, 0x01, 0xc2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
+{ 0x9511, 16, {0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0xc9, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} },
+{ 0x9521, 16, {0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} },
+{ 0x9531, 16, {0xe4, 0xef, 0x55, 0x34, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0xc2, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x9541, 16, {0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
+{ 0x9551, 16, {0xeb, 0xf0, 0x90, 0x01, 0xc2, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0xa2, 0x81, 0xfc, 0xd3, 0xe5, 0xf0} },
+{ 0x9561, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xc2, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
+{ 0x9571, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x9581, 1, {0x22} },
+{ 0x9582, 16, {0x90, 0x01, 0xc9, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0xbe, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x9592, 16, {0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} },
+{ 0x95a2, 16, {0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} },
+{ 0x95b2, 16, {0xa2, 0x12, 0x90, 0x01, 0xbe, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0xa2, 0x81, 0xfc, 0xd3, 0xe5, 0xf0} },
+{ 0x95c2, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xbe, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
+{ 0x95d2, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x95e2, 1, {0x22} },
+{ 0x95e3, 16, {0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x73, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x53, 0x7b, 0x75, 0x54} },
+{ 0x95f3, 16, {0x80, 0xe5, 0x54, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x53, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x55, 0xf5} },
+{ 0x9603, 16, {0x56, 0x89, 0x57, 0xfe, 0x12, 0x95, 0x82, 0xef, 0x60, 0x50, 0xab, 0x55, 0xaa, 0x56, 0xa9, 0x57} },
+{ 0x9613, 16, {0x12, 0xa2, 0x3b, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0xa2, 0x54, 0xb4, 0x02, 0x16, 0xc2, 0xaf} },
+{ 0x9623, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} },
+{ 0x9633, 16, {0x04, 0xf0, 0xd2, 0xaf, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce} },
+{ 0x9643, 16, {0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x34, 0x60, 0x0f, 0x85, 0x54, 0x82, 0x85, 0x53} },
+{ 0x9653, 10, {0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3, 0x74, 0x04, 0xf0} },
+{ 0x965d, 1, {0x22} },
+{ 0x965e, 16, {0x12, 0x95, 0xe3, 0xe4, 0xf5, 0x4e, 0x74, 0x3a, 0x25, 0x4e, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x4f} },
+{ 0x966e, 16, {0x74, 0xc5, 0x25, 0x4e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x4f, 0xff, 0xc4} },
+{ 0x967e, 16, {0x54, 0x0f, 0xf5, 0x50, 0x60, 0x22, 0x74, 0xc5, 0x25, 0x4e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} },
+{ 0x968e, 16, {0x83, 0xe5, 0x4f, 0xf0, 0xaf, 0x4e, 0x7d, 0x01, 0xe5, 0x4f, 0x45, 0x50, 0xfb, 0x12, 0x95, 0x11} },
+{ 0x969e, 16, {0xef, 0x70, 0x05, 0x12, 0x95, 0xe3, 0x80, 0xec, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04, 0x40} },
+{ 0x96ae, 16, {0xb5, 0x12, 0x95, 0xe3, 0xe5, 0x3e, 0x60, 0x48, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e, 0x74, 0x01, 0xa8} },
+{ 0x96be, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4f, 0x55, 0x3e, 0x60, 0x29, 0xe5, 0x4e} },
+{ 0x96ce, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
+{ 0x96de, 16, {0x16, 0xaf, 0x4e, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x95, 0x11, 0xef, 0x70, 0x05, 0x12, 0x95, 0xe3} },
+{ 0x96ee, 16, {0x80, 0xef, 0xe5, 0x4f, 0xf4, 0x52, 0x3e, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04, 0x40, 0xbb} },
+{ 0x96fe, 16, {0x90, 0x03, 0x00, 0xe0, 0x60, 0x03, 0x02, 0x97, 0xdf, 0x74, 0x19, 0xf0, 0xe5, 0x33, 0xc3, 0x94} },
+{ 0x970e, 16, {0x01, 0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x51, 0x00, 0xf5, 0x52, 0x80, 0x09} },
+{ 0x971e, 16, {0x7f, 0x02, 0x12, 0x11, 0x27, 0x8e, 0x51, 0x8f, 0x52, 0xc3, 0xe5, 0x51, 0x64, 0x80, 0x94, 0x80} },
+{ 0x972e, 16, {0x40, 0xda, 0x90, 0x01, 0xbc, 0xe0, 0x65, 0x52, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e} },
+{ 0x973e, 16, {0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4f, 0x90, 0x01, 0xbc} },
+{ 0x974e, 16, {0xe0, 0x55, 0x4f, 0x60, 0x14, 0xaf, 0x4e, 0x7d, 0x08, 0xe5, 0x4f, 0x55, 0x52, 0xfb, 0x12, 0x95} },
+{ 0x975e, 16, {0x11, 0xef, 0x70, 0x05, 0x12, 0x95, 0xe3, 0x80, 0xec, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04} },
+{ 0x976e, 16, {0x40, 0xcc, 0x90, 0x01, 0xbc, 0xe5, 0x52, 0xf0, 0xe4, 0xf5, 0x4e, 0xc2, 0xaf, 0x74, 0x36, 0x25} },
+{ 0x977e, 16, {0x4e, 0xf8, 0xe6, 0xf5, 0x4f, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x4f, 0x1e, 0xe5, 0x4f, 0x60, 0x11} },
+{ 0x978e, 16, {0xaf, 0x4e, 0x7d, 0x02, 0xab, 0x4f, 0x12, 0x95, 0x11, 0xef, 0x70, 0x05, 0x12, 0x95, 0xe3, 0x80} },
+{ 0x979e, 16, {0xef, 0x74, 0x2d, 0x25, 0x4e, 0xf8, 0xe6, 0xf5, 0x4f, 0x74, 0xfc, 0x25, 0x4e, 0xf5, 0x82, 0xe4} },
+{ 0x97ae, 16, {0x34, 0x02, 0xf5, 0x83, 0xe0, 0x65, 0x4f, 0x60, 0x11, 0xaf, 0x4e, 0x7d, 0x04, 0xab, 0x4f, 0x12} },
+{ 0x97be, 16, {0x95, 0x11, 0xef, 0x70, 0x05, 0x12, 0x95, 0xe3, 0x80, 0xef, 0x74, 0xfc, 0x25, 0x4e, 0xf5, 0x82} },
+{ 0x97ce, 16, {0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe5, 0x4f, 0xf0, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04, 0x40} },
+{ 0x97de, 4, {0x9a, 0x12, 0x95, 0xe3} },
+{ 0x97e2, 1, {0x22} },
+{ 0x97e3, 12, {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x67, 0x02, 0x98, 0x2a} },
+{ 0x97ef, 16, {0x02, 0x05, 0xad, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
+{ 0x97ff, 16, {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
+{ 0x980f, 16, {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
+{ 0x981f, 16, {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x98, 0x6f, 0xe4, 0x7e} },
+{ 0x982f, 16, {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
+{ 0x983f, 16, {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
+{ 0x984f, 16, {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
+{ 0x985f, 16, {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
+{ 0x986f, 16, {0x60, 0x24, 0x02, 0x8a, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} },
+{ 0x987f, 16, {0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} },
+{ 0x988f, 8, {0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} },
+{ 0x9897, 1, {0x00} },
+{ 0x9898, 8, {0x8b, 0x59, 0x8a, 0x5a, 0x89, 0x5b, 0x8d, 0x5c} },
+{ 0x98a0, 16, {0xe4, 0xf5, 0x5d, 0xf5, 0x5e, 0xaf, 0x5c, 0x15, 0x5c, 0xef, 0x60, 0x36, 0xab, 0x59, 0x05, 0x5b} },
+{ 0x98b0, 16, {0xe5, 0x5b, 0xaa, 0x5a, 0x70, 0x02, 0x05, 0x5a, 0x14, 0xf9, 0x12, 0xa2, 0x3b, 0xff, 0xe5, 0x5d} },
+{ 0x98c0, 16, {0xe5, 0x5e, 0x6f, 0x25, 0xe0, 0xff, 0xe4, 0x33, 0xfe, 0x74, 0x95, 0x2f, 0xf5, 0x82, 0xee, 0x34} },
+{ 0x98d0, 16, {0x9e, 0xf5, 0x83, 0xe5, 0x5d, 0xff, 0xe4, 0x93, 0xf5, 0x5d, 0x74, 0x01, 0x93, 0x6f, 0xf5, 0x5e} },
+{ 0x98e0, 6, {0x80, 0xc3, 0xae, 0x5d, 0xaf, 0x5e} },
+{ 0x98e6, 1, {0x22} },
+{ 0x98e7, 11, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} },
+{ 0x98f2, 16, {0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} },
+{ 0x9902, 16, {0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} },
+{ 0x9912, 16, {0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x1e} },
+{ 0x9922, 10, {0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0xc4, 0xee, 0xf0} },
+{ 0x992c, 9, {0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x9935, 2, {0xa9, 0x03} },
+{ 0x9937, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} },
+{ 0x9947, 16, {0x5c, 0x45, 0x5d, 0xf5, 0x5e, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} },
+{ 0x9957, 16, {0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} },
+{ 0x9967, 16, {0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x5e, 0xeb} },
+{ 0x9977, 16, {0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x5e, 0xfc, 0xb5, 0x06, 0x03, 0xaf} },
+{ 0x9987, 16, {0x05, 0x22, 0xe5, 0x5c, 0x5c, 0xfe, 0xe5, 0x5d, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} },
+{ 0x9997, 16, {0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
+{ 0x99a7, 16, {0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x5c, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x5d, 0x22, 0x7f} },
+{ 0x99b7, 1, {0x00} },
+{ 0x99b8, 1, {0x22} },
+{ 0x99b9, 16, {0x75, 0x55, 0x02, 0x75, 0x56, 0xb0, 0x90, 0x03, 0x35, 0x74, 0x0f, 0xf0, 0x85, 0x56, 0x82, 0x85} },
+{ 0x99c9, 16, {0x55, 0x83, 0xa3, 0xe0, 0xff, 0x90, 0x03, 0x37, 0xf0, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xe0} },
+{ 0x99d9, 16, {0x90, 0x03, 0x36, 0xf0, 0x90, 0x03, 0x38, 0x74, 0xff, 0xf0, 0x75, 0x57, 0x03, 0x75, 0x58, 0x39} },
+{ 0x99e9, 16, {0xef, 0x14, 0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x9e, 0x5d, 0x90, 0x99, 0xfa, 0xf8, 0x28, 0x28} },
+{ 0x99f9, 16, {0x73, 0x02, 0x9a, 0x1b, 0x02, 0x9a, 0xba, 0x02, 0x9b, 0xbf, 0x02, 0x9b, 0xde, 0x02, 0x9b, 0xde} },
+{ 0x9a09, 16, {0x02, 0x9c, 0x94, 0x02, 0x9c, 0xcf, 0x02, 0x9c, 0xf4, 0x02, 0x9d, 0xb2, 0x02, 0x9d, 0xe2, 0x02} },
+{ 0x9a19, 16, {0x9e, 0x0e, 0xe4, 0xf5, 0x4e, 0xe5, 0x4e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4} },
+{ 0x9a29, 16, {0x34, 0x20, 0xaf, 0x82, 0xf5, 0x53, 0x8f, 0x54, 0xe4, 0xff, 0xe4, 0xfe, 0xef, 0x60, 0x10, 0x74} },
+{ 0x9a39, 16, {0x8a, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5, 0x4f, 0x80, 0x0d, 0x74} },
+{ 0x9a49, 16, {0x8a, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x4f, 0xe5, 0x54, 0x24, 0x07} },
+{ 0x9a59, 16, {0xf5, 0x82, 0xe4, 0x35, 0x53, 0xf5, 0x83, 0xe5, 0x4f, 0xf0, 0xe0, 0xf5, 0x50, 0x65, 0x4f, 0x60} },
+{ 0x9a69, 16, {0x38, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xfd, 0x05, 0x58, 0xe5, 0x58, 0xaa, 0x57} },
+{ 0x9a79, 16, {0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x05, 0x58, 0xe5, 0x58, 0xac} },
+{ 0x9a89, 16, {0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe5, 0x4f, 0xf0, 0x85, 0x58, 0x82} },
+{ 0x9a99, 16, {0x85, 0x57, 0x83, 0xe5, 0x50, 0xf0, 0x02, 0x9e, 0x63, 0x0e, 0xbe, 0x24, 0x8f, 0x0f, 0xef, 0x64} },
+{ 0x9aa9, 16, {0x02, 0x70, 0x87, 0x05, 0x4e, 0xe5, 0x4e, 0x64, 0x04, 0x60, 0x03, 0x02, 0x9a, 0x1e, 0x02, 0x9e} },
+{ 0x9ab9, 16, {0x63, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e, 0xe4, 0xfd, 0x12, 0x83, 0x5a, 0x05, 0x4e, 0xe5, 0x4e, 0xd3} },
+{ 0x9ac9, 16, {0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x98, 0xf0, 0xa3, 0x74, 0xe7, 0xf0, 0xe4, 0xf5} },
+{ 0x9ad9, 16, {0x50, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x53, 0x20, 0x75, 0x54, 0x00, 0xf5, 0x4e, 0xaf, 0x4e, 0x74} },
+{ 0x9ae9, 16, {0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4f, 0x90, 0x01, 0xc4, 0xf0} },
+{ 0x9af9, 16, {0x90, 0x01, 0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xa3} },
+{ 0x9b09, 16, {0x74, 0x02, 0xf0, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x4f, 0x34, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02} },
+{ 0x9b19, 16, {0xa3, 0xe0, 0x70, 0xef, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xff, 0x05, 0x58, 0xe5, 0x58} },
+{ 0x9b29, 16, {0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x58, 0x82} },
+{ 0x9b39, 16, {0x85, 0x57, 0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x01, 0xc4, 0xf0, 0x75, 0x50, 0xff, 0x90, 0x01} },
+{ 0x9b49, 16, {0xc4, 0xe0, 0xff, 0x60, 0x37, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xfe, 0x05, 0x58} },
+{ 0x9b59, 16, {0xe5, 0x58, 0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05} },
+{ 0x9b69, 16, {0x58, 0xe5, 0x58, 0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
+{ 0x9b79, 16, {0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xe5, 0x4f, 0xf0, 0x75, 0x50, 0xff, 0xe5, 0x50, 0x70, 0x16} },
+{ 0x9b89, 16, {0x74, 0x08, 0x25, 0x54, 0xf5, 0x54, 0xe4, 0x35, 0x53, 0xf5, 0x53, 0x05, 0x4e, 0xe5, 0x4e, 0x64} },
+{ 0x9b99, 16, {0x04, 0x60, 0x03, 0x02, 0x9a, 0xe6, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e, 0x7d, 0x01, 0x12, 0x83, 0x5a} },
+{ 0x9ba9, 16, {0x05, 0x4e, 0xe5, 0x4e, 0xd3, 0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x13, 0xf0, 0xa3} },
+{ 0x9bb9, 16, {0x74, 0x12, 0xf0, 0x02, 0x9e, 0x63, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xe0, 0x14, 0xff, 0x74} },
+{ 0x9bc9, 16, {0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90, 0x02, 0xf7, 0xf0, 0x90, 0x01} },
+{ 0x9bd9, 16, {0xc4, 0xf0, 0x02, 0x9e, 0x63, 0x90, 0x01, 0xc0, 0x74, 0x03, 0xf0, 0xa3, 0x74, 0xe8, 0xf0, 0xe4} },
+{ 0x9be9, 16, {0xf5, 0x50, 0x90, 0x02, 0xf7, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x07, 0x19, 0x90, 0x01} },
+{ 0x9bf9, 16, {0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x90, 0x03, 0x38, 0xf0, 0x85, 0x58, 0x82, 0x85} },
+{ 0x9c09, 16, {0x57, 0x83, 0x74, 0xff, 0xf0, 0xf5, 0x50, 0xe5, 0x50, 0x60, 0x03, 0x02, 0x9e, 0x63, 0x90, 0x01} },
+{ 0x9c19, 16, {0xc0, 0xf0, 0xa3, 0x74, 0x96, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6} },
+{ 0x9c29, 16, {0xe5, 0x33, 0xc3, 0x94, 0x01, 0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x51, 0x00} },
+{ 0x9c39, 16, {0xf5, 0x52, 0x80, 0x09, 0x7f, 0x02, 0x12, 0x11, 0x27, 0x8e, 0x51, 0x8f, 0x52, 0xc3, 0xe5, 0x51} },
+{ 0x9c49, 16, {0x64, 0x80, 0x94, 0x80, 0x40, 0xda, 0xe5, 0x52, 0x54, 0x0f, 0xf5, 0x50, 0x90, 0x02, 0xf7, 0xe0} },
+{ 0x9c59, 16, {0x55, 0x50, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x4f, 0x85, 0x56, 0x82, 0x85} },
+{ 0x9c69, 16, {0x55, 0x83, 0xa3, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x4f, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
+{ 0x9c79, 16, {0x00, 0x8f, 0x4f, 0xe5, 0x4f, 0x70, 0x03, 0x02, 0x9e, 0x63, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x85} },
+{ 0x9c89, 16, {0x58, 0x82, 0x85, 0x57, 0x83, 0xe5, 0x50, 0xf0, 0x02, 0x9e, 0x63, 0xe4, 0xff, 0xfd, 0x12, 0x83} },
+{ 0x9c99, 16, {0x5a, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x53, 0x20, 0x75, 0x54, 0x00, 0x85, 0x54, 0x82, 0x85, 0x53} },
+{ 0x9ca9, 16, {0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0x74, 0x01} },
+{ 0x9cb9, 16, {0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f} },
+{ 0x9cc9, 16, {0xf0, 0xd2, 0x04, 0x02, 0x9e, 0x63, 0xc2, 0x04, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x53, 0x20, 0x75} },
+{ 0x9cd9, 16, {0x54, 0x00, 0xe5, 0x54, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x53, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
+{ 0x9ce9, 16, {0xf1, 0xe4, 0xff, 0x7d, 0x01, 0x12, 0x83, 0x5a, 0x02, 0x9e, 0x63, 0xe4, 0xf5, 0x50, 0xf5, 0x4e} },
+{ 0x9cf9, 16, {0xaf, 0x4e, 0xe4, 0xfd, 0x12, 0x83, 0x5a, 0xe5, 0x4e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5} },
+{ 0x9d09, 16, {0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x53, 0x8f, 0x54, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04} },
+{ 0x9d19, 16, {0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x4e, 0x7d, 0x01, 0x7b} },
+{ 0x9d29, 16, {0x01, 0x75, 0x5c, 0x80, 0x75, 0x5d, 0x40, 0x12, 0x99, 0x35, 0x8f, 0x50, 0xe5, 0x50, 0x70, 0x11} },
+{ 0x9d39, 16, {0xaf, 0x4e, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x5c, 0x10, 0x75, 0x5d, 0x20, 0x12, 0x99, 0x35, 0x8f} },
+{ 0x9d49, 16, {0x50, 0xe5, 0x50, 0x70, 0x10, 0xaf, 0x4e, 0x7d, 0x01, 0xfb, 0x75, 0x5c, 0x80, 0x75, 0x5d, 0x40} },
+{ 0x9d59, 16, {0x12, 0x99, 0x35, 0x8f, 0x50, 0xe5, 0x50, 0x70, 0x10, 0xaf, 0x4e, 0x7d, 0x02, 0xfb, 0x75, 0x5c} },
+{ 0x9d69, 16, {0x10, 0x75, 0x5d, 0x20, 0x12, 0x99, 0x35, 0x8f, 0x50, 0xaf, 0x4e, 0x7d, 0x01, 0x12, 0x83, 0x5a} },
+{ 0x9d79, 16, {0xe5, 0x50, 0x60, 0x26, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xff, 0x05, 0x58, 0xe5} },
+{ 0x9d89, 16, {0x58, 0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x58} },
+{ 0x9d99, 16, {0x82, 0x85, 0x57, 0x83, 0xe5, 0x50, 0xf0, 0x02, 0x9e, 0x63, 0x05, 0x4e, 0xe5, 0x4e, 0xd3, 0x94} },
+{ 0x9da9, 16, {0x03, 0x50, 0x03, 0x02, 0x9c, 0xf9, 0x02, 0x9e, 0x63, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} },
+{ 0x9db9, 16, {0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x9e, 0xf0, 0xa3, 0x74} },
+{ 0x9dc9, 16, {0x85, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x81, 0xd9, 0xef, 0x64, 0x08, 0x70, 0x03, 0x02, 0x9e} },
+{ 0x9dd9, 16, {0x63, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x02, 0x9e, 0x63, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} },
+{ 0x9de9, 16, {0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5, 0x57, 0xf0, 0xa3, 0xe5} },
+{ 0x9df9, 16, {0x58, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x5c, 0xe4, 0x90} },
+{ 0x9e09, 16, {0x03, 0x38, 0xf0, 0x80, 0x55, 0xe5, 0x56, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x55, 0xfa, 0xa9, 0x07} },
+{ 0x9e19, 16, {0x7b, 0x01, 0x7d, 0x10, 0x12, 0x98, 0x98, 0xef, 0x4e, 0x70, 0x32, 0x90, 0x03, 0x59, 0xf0, 0xa3} },
+{ 0x9e29, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5, 0x56, 0x24, 0x02, 0x90} },
+{ 0x9e39, 16, {0x03, 0x60, 0xf0, 0xe4, 0x35, 0x55, 0x90, 0x03, 0x5f, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x81} },
+{ 0x9e49, 16, {0xd9, 0xef, 0x64, 0x08, 0x60, 0x14, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x0d, 0xe4, 0x90, 0x03} },
+{ 0x9e59, 16, {0x38, 0xf0, 0x80, 0x06, 0x90, 0x03, 0x38, 0x74, 0x01, 0xf0, 0x90, 0x01, 0xc0, 0xe4, 0xf0, 0xa3} },
+{ 0x9e69, 16, {0x74, 0x0a, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7e, 0x03, 0x7f} },
+{ 0x9e79, 11, {0x35, 0x7d, 0x24, 0x12, 0x91, 0x6a, 0xe4, 0x90, 0x02, 0xaf, 0xf0} },
+{ 0x9e84, 1, {0x22} },
+{ 0x9e85, 16, {0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f} },
+{ 0x9e95, 16, {0x00, 0x00, 0xc0, 0xc1, 0xc1, 0x81, 0x01, 0x40, 0xc3, 0x01, 0x03, 0xc0, 0x02, 0x80, 0xc2, 0x41} },
+{ 0x9ea5, 16, {0xc6, 0x01, 0x06, 0xc0, 0x07, 0x80, 0xc7, 0x41, 0x05, 0x00, 0xc5, 0xc1, 0xc4, 0x81, 0x04, 0x40} },
+{ 0x9eb5, 16, {0xcc, 0x01, 0x0c, 0xc0, 0x0d, 0x80, 0xcd, 0x41, 0x0f, 0x00, 0xcf, 0xc1, 0xce, 0x81, 0x0e, 0x40} },
+{ 0x9ec5, 16, {0x0a, 0x00, 0xca, 0xc1, 0xcb, 0x81, 0x0b, 0x40, 0xc9, 0x01, 0x09, 0xc0, 0x08, 0x80, 0xc8, 0x41} },
+{ 0x9ed5, 16, {0xd8, 0x01, 0x18, 0xc0, 0x19, 0x80, 0xd9, 0x41, 0x1b, 0x00, 0xdb, 0xc1, 0xda, 0x81, 0x1a, 0x40} },
+{ 0x9ee5, 16, {0x1e, 0x00, 0xde, 0xc1, 0xdf, 0x81, 0x1f, 0x40, 0xdd, 0x01, 0x1d, 0xc0, 0x1c, 0x80, 0xdc, 0x41} },
+{ 0x9ef5, 16, {0x14, 0x00, 0xd4, 0xc1, 0xd5, 0x81, 0x15, 0x40, 0xd7, 0x01, 0x17, 0xc0, 0x16, 0x80, 0xd6, 0x41} },
+{ 0x9f05, 16, {0xd2, 0x01, 0x12, 0xc0, 0x13, 0x80, 0xd3, 0x41, 0x11, 0x00, 0xd1, 0xc1, 0xd0, 0x81, 0x10, 0x40} },
+{ 0x9f15, 16, {0xf0, 0x01, 0x30, 0xc0, 0x31, 0x80, 0xf1, 0x41, 0x33, 0x00, 0xf3, 0xc1, 0xf2, 0x81, 0x32, 0x40} },
+{ 0x9f25, 16, {0x36, 0x00, 0xf6, 0xc1, 0xf7, 0x81, 0x37, 0x40, 0xf5, 0x01, 0x35, 0xc0, 0x34, 0x80, 0xf4, 0x41} },
+{ 0x9f35, 16, {0x3c, 0x00, 0xfc, 0xc1, 0xfd, 0x81, 0x3d, 0x40, 0xff, 0x01, 0x3f, 0xc0, 0x3e, 0x80, 0xfe, 0x41} },
+{ 0x9f45, 16, {0xfa, 0x01, 0x3a, 0xc0, 0x3b, 0x80, 0xfb, 0x41, 0x39, 0x00, 0xf9, 0xc1, 0xf8, 0x81, 0x38, 0x40} },
+{ 0x9f55, 16, {0x28, 0x00, 0xe8, 0xc1, 0xe9, 0x81, 0x29, 0x40, 0xeb, 0x01, 0x2b, 0xc0, 0x2a, 0x80, 0xea, 0x41} },
+{ 0x9f65, 16, {0xee, 0x01, 0x2e, 0xc0, 0x2f, 0x80, 0xef, 0x41, 0x2d, 0x00, 0xed, 0xc1, 0xec, 0x81, 0x2c, 0x40} },
+{ 0x9f75, 16, {0xe4, 0x01, 0x24, 0xc0, 0x25, 0x80, 0xe5, 0x41, 0x27, 0x00, 0xe7, 0xc1, 0xe6, 0x81, 0x26, 0x40} },
+{ 0x9f85, 16, {0x22, 0x00, 0xe2, 0xc1, 0xe3, 0x81, 0x23, 0x40, 0xe1, 0x01, 0x21, 0xc0, 0x20, 0x80, 0xe0, 0x41} },
+{ 0x9f95, 16, {0xa0, 0x01, 0x60, 0xc0, 0x61, 0x80, 0xa1, 0x41, 0x63, 0x00, 0xa3, 0xc1, 0xa2, 0x81, 0x62, 0x40} },
+{ 0x9fa5, 16, {0x66, 0x00, 0xa6, 0xc1, 0xa7, 0x81, 0x67, 0x40, 0xa5, 0x01, 0x65, 0xc0, 0x64, 0x80, 0xa4, 0x41} },
+{ 0x9fb5, 16, {0x6c, 0x00, 0xac, 0xc1, 0xad, 0x81, 0x6d, 0x40, 0xaf, 0x01, 0x6f, 0xc0, 0x6e, 0x80, 0xae, 0x41} },
+{ 0x9fc5, 16, {0xaa, 0x01, 0x6a, 0xc0, 0x6b, 0x80, 0xab, 0x41, 0x69, 0x00, 0xa9, 0xc1, 0xa8, 0x81, 0x68, 0x40} },
+{ 0x9fd5, 16, {0x78, 0x00, 0xb8, 0xc1, 0xb9, 0x81, 0x79, 0x40, 0xbb, 0x01, 0x7b, 0xc0, 0x7a, 0x80, 0xba, 0x41} },
+{ 0x9fe5, 16, {0xbe, 0x01, 0x7e, 0xc0, 0x7f, 0x80, 0xbf, 0x41, 0x7d, 0x00, 0xbd, 0xc1, 0xbc, 0x81, 0x7c, 0x40} },
+{ 0x9ff5, 16, {0xb4, 0x01, 0x74, 0xc0, 0x75, 0x80, 0xb5, 0x41, 0x77, 0x00, 0xb7, 0xc1, 0xb6, 0x81, 0x76, 0x40} },
+{ 0xa005, 16, {0x72, 0x00, 0xb2, 0xc1, 0xb3, 0x81, 0x73, 0x40, 0xb1, 0x01, 0x71, 0xc0, 0x70, 0x80, 0xb0, 0x41} },
+{ 0xa015, 16, {0x50, 0x00, 0x90, 0xc1, 0x91, 0x81, 0x51, 0x40, 0x93, 0x01, 0x53, 0xc0, 0x52, 0x80, 0x92, 0x41} },
+{ 0xa025, 16, {0x96, 0x01, 0x56, 0xc0, 0x57, 0x80, 0x97, 0x41, 0x55, 0x00, 0x95, 0xc1, 0x94, 0x81, 0x54, 0x40} },
+{ 0xa035, 16, {0x9c, 0x01, 0x5c, 0xc0, 0x5d, 0x80, 0x9d, 0x41, 0x5f, 0x00, 0x9f, 0xc1, 0x9e, 0x81, 0x5e, 0x40} },
+{ 0xa045, 16, {0x5a, 0x00, 0x9a, 0xc1, 0x9b, 0x81, 0x5b, 0x40, 0x99, 0x01, 0x59, 0xc0, 0x58, 0x80, 0x98, 0x41} },
+{ 0xa055, 16, {0x88, 0x01, 0x48, 0xc0, 0x49, 0x80, 0x89, 0x41, 0x4b, 0x00, 0x8b, 0xc1, 0x8a, 0x81, 0x4a, 0x40} },
+{ 0xa065, 16, {0x4e, 0x00, 0x8e, 0xc1, 0x8f, 0x81, 0x4f, 0x40, 0x8d, 0x01, 0x4d, 0xc0, 0x4c, 0x80, 0x8c, 0x41} },
+{ 0xa075, 16, {0x44, 0x00, 0x84, 0xc1, 0x85, 0x81, 0x45, 0x40, 0x87, 0x01, 0x47, 0xc0, 0x46, 0x80, 0x86, 0x41} },
+{ 0xa085, 16, {0x82, 0x01, 0x42, 0xc0, 0x43, 0x80, 0x83, 0x41, 0x41, 0x00, 0x81, 0xc1, 0x80, 0x81, 0x40, 0x40} },
+{ 0xa095, 16, {0xe4, 0xff, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02} },
+{ 0xa0a5, 16, {0xa1, 0x38, 0x74, 0x3a, 0x2f, 0xf8, 0xe6, 0x20, 0xe5, 0x03, 0x02, 0xa1, 0x38, 0xef, 0x75, 0xf0} },
+{ 0xa0b5, 16, {0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0xf5, 0x83, 0xe5, 0x82} },
+{ 0xa0c5, 16, {0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x70, 0x63} },
+{ 0xa0d5, 16, {0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01} },
+{ 0xa0e5, 16, {0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x74, 0xf8} },
+{ 0xa0f5, 16, {0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0, 0x70, 0x36, 0xef, 0x25, 0xe0} },
+{ 0xa105, 16, {0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xef, 0x25, 0xe0, 0xfe, 0xc3} },
+{ 0xa115, 16, {0x74, 0x0c, 0x9e, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xad} },
+{ 0xa125, 16, {0x82, 0xfc, 0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xec, 0xf0} },
+{ 0xa135, 12, {0xa3, 0xed, 0xf0, 0x0f, 0xef, 0x64, 0x04, 0x60, 0x03, 0x02, 0xa0, 0x97} },
+{ 0xa141, 1, {0x22} },
+{ 0xa142, 16, {0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} },
+{ 0xa152, 16, {0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} },
+{ 0xa162, 16, {0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} },
+{ 0xa172, 16, {0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} },
+{ 0xa182, 16, {0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} },
+{ 0xa192, 16, {0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} },
+{ 0xa1a2, 16, {0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} },
+{ 0xa1b2, 16, {0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} },
+{ 0xa1c2, 16, {0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} },
+{ 0xa1d2, 16, {0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} },
+{ 0xa1e2, 16, {0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} },
+{ 0xa1f2, 16, {0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} },
+{ 0xa202, 16, {0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} },
+{ 0xa212, 16, {0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} },
+{ 0xa222, 16, {0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} },
+{ 0xa232, 9, {0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0xa1, 0x92, 0x73} },
+{ 0xa23b, 16, {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
+{ 0xa24b, 9, {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
+{ 0xa254, 16, {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
+{ 0xa264, 16, {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
+{ 0xa274, 13, {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
+{ 0xa281, 16, {0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} },
+{ 0xa291, 6, {0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} },
+{ 0xa297, 16, {0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} },
+{ 0xa2a7, 6, {0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} },
+{ 0xa2ad, 16, {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
+{ 0xa2bd, 16, {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
+{ 0xa2cd, 16, {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
+{ 0xa2dd, 8, {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
+{ 0xa2e5, 16, {0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} },
+{ 0xa2f5, 16, {0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} },
+{ 0xa305, 16, {0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} },
+{ 0xa315, 16, {0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} },
+{ 0xa325, 16, {0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} },
+{ 0xa335, 16, {0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} },
+{ 0xa345, 16, {0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} },
+{ 0xa355, 16, {0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} },
+{ 0xa365, 16, {0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} },
+{ 0xa375, 16, {0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} },
+{ 0xa385, 16, {0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} },
+{ 0xa395, 16, {0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} },
+{ 0xa3a5, 14, {0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} },
+{ 0xa3b3, 16, {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
+{ 0xa3c3, 1, {0x22} },
+{ 0xa3c4, 16, {0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} },
+{ 0xa3d4, 3, {0xd8, 0xf1, 0x22} },
+{ 0xa3d7, 16, {0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} },
+{ 0xa3e7, 7, {0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} },
+{ 0xa3ee, 12, {0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
+{ 0xa3fa, 16, {0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0xa4, 0x11, 0x12, 0xa4, 0x11, 0x12} },
+{ 0xa40a, 16, {0xa4, 0x11, 0x12, 0xa4, 0x11, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} },
+{ 0xa41a, 16, {0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} },
+{ 0xa42a, 1, {0x22} },
+{ 0xffff, 0, {0x00} }
+};
+
+#ifdef DEBUG
+static const struct whiteheat_hex_record whiteheat_loader[] = {
+{ 0x0000, 3, {0x02, 0x09, 0x8d} },
+{ 0x0033, 3, {0x02, 0x0e, 0x70} },
+{ 0x0043, 3, {0x02, 0x0b, 0x00} },
+{ 0x004b, 3, {0x02, 0x05, 0xb3} },
+{ 0x0100, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x54, 0x10, 0xff, 0xc4, 0x54, 0x0f, 0x44, 0x50, 0xf5, 0x0f, 0x13, 0xe4} },
+{ 0x0110, 16, {0x33, 0xf5, 0x11, 0x90, 0x7f, 0xe9, 0xe0, 0x24, 0x5e, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x03} },
+{ 0x0120, 16, {0x7c, 0x90, 0x01, 0x28, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x01, 0xbc, 0x02, 0x01, 0xbc, 0x02, 0x01} },
+{ 0x0130, 16, {0x91, 0x02, 0x01, 0x3d, 0x02, 0x01, 0x53, 0x02, 0x01, 0x6f, 0x02, 0x01, 0x9a, 0x90, 0x7f, 0x00} },
+{ 0x0140, 16, {0xe5, 0x11, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
+{ 0x0150, 16, {0x02, 0x03, 0x7c, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x90, 0x7f, 0x00, 0xf0, 0x90} },
+{ 0x0160, 16, {0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03, 0x7c, 0x12} },
+{ 0x0170, 16, {0x0a, 0x89, 0x50, 0x07, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x00, 0x74, 0x0f} },
+{ 0x0180, 16, {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03} },
+{ 0x0190, 16, {0x7c, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0f, 0x02, 0x03, 0x7c, 0x90, 0x7f, 0x00, 0x74, 0x07, 0xf0} },
+{ 0x01a0, 16, {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xe8, 0x7e} },
+{ 0x01b0, 16, {0x03, 0x12, 0x0d, 0xd5, 0xd2, 0x06, 0x12, 0x0d, 0x0d, 0x02, 0x03, 0x7c, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x01c0, 16, {0x75, 0x29, 0x00, 0xf5, 0x2a, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x29, 0x90, 0x7f, 0xee, 0xe0} },
+{ 0x01d0, 16, {0x75, 0x2b, 0x00, 0xf5, 0x2c, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x2b, 0x90, 0x7f, 0xe8, 0xe0} },
+{ 0x01e0, 16, {0x64, 0xc0, 0x60, 0x03, 0x02, 0x02, 0xc9, 0xe5, 0x2c, 0x45, 0x2b, 0x70, 0x03, 0x02, 0x03, 0x7c} },
+{ 0x01f0, 16, {0xc3, 0xe5, 0x2c, 0x94, 0x40, 0xe5, 0x2b, 0x94, 0x00, 0x50, 0x08, 0x85, 0x2b, 0x2d, 0x85, 0x2c} },
+{ 0x0200, 16, {0x2e, 0x80, 0x06, 0x75, 0x2d, 0x00, 0x75, 0x2e, 0x40, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70} },
+{ 0x0210, 16, {0x34, 0xf5, 0x31, 0xf5, 0x32, 0xc3, 0xe5, 0x32, 0x95, 0x2e, 0xe5, 0x31, 0x95, 0x2d, 0x50, 0x5c} },
+{ 0x0220, 16, {0xe5, 0x2a, 0x25, 0x32, 0xf5, 0x82, 0xe5, 0x31, 0x35, 0x29, 0xf5, 0x83, 0xe0, 0xff, 0x74, 0x00} },
+{ 0x0230, 16, {0x25, 0x32, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x32, 0xe5, 0x32, 0x70} },
+{ 0x0240, 16, {0x02, 0x05, 0x31, 0x80, 0xd0, 0xe4, 0xf5, 0x31, 0xf5, 0x32, 0xc3, 0xe5, 0x32, 0x95, 0x2e, 0xe5} },
+{ 0x0250, 16, {0x31, 0x95, 0x2d, 0x50, 0x18, 0x74, 0x00, 0x25, 0x32, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
+{ 0x0260, 16, {0x74, 0xcd, 0xf0, 0x05, 0x32, 0xe5, 0x32, 0x70, 0x02, 0x05, 0x31, 0x80, 0xdd, 0xaf, 0x2a, 0xae} },
+{ 0x0270, 16, {0x29, 0xad, 0x2e, 0x7a, 0x7f, 0x79, 0x00, 0x7b, 0x00, 0x12, 0x0b, 0xf4, 0x90, 0x7f, 0xb5, 0xe5} },
+{ 0x0280, 16, {0x2e, 0xf0, 0xe5, 0x2e, 0x25, 0x2a, 0xf5, 0x2a, 0xe5, 0x2d, 0x35, 0x29, 0xf5, 0x29, 0xc3, 0xe5} },
+{ 0x0290, 16, {0x2c, 0x95, 0x2e, 0xf5, 0x2c, 0xe5, 0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0x90, 0x7f, 0x92, 0xe0, 0xff} },
+{ 0x02a0, 16, {0xc4, 0x54, 0x0f, 0x75, 0x2f, 0x00, 0xf5, 0x30, 0xd3, 0x94, 0x00, 0xe5, 0x2f, 0x94, 0x00, 0x50} },
+{ 0x02b0, 16, {0x0c, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe1, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xb4} },
+{ 0x02c0, 16, {0xe0, 0x20, 0xe2, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xe8, 0xe0, 0x64, 0x40, 0x60} },
+{ 0x02d0, 16, {0x03, 0x02, 0x03, 0x7c, 0xe5, 0x2c, 0x45, 0x2b, 0x70, 0x03, 0x02, 0x03, 0x7c, 0xe4, 0x90, 0x7f} },
+{ 0x02e0, 16, {0xc5, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x75, 0x2f, 0x00, 0xf5, 0x30, 0xd3} },
+{ 0x02f0, 16, {0x94, 0x00, 0xe5, 0x2f, 0x94, 0x00, 0x50, 0x09, 0x90, 0x7f, 0xc4, 0xe0, 0x30, 0xe1, 0x09, 0x80} },
+{ 0x0300, 16, {0xf7, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe3, 0xf9, 0x90, 0x7f, 0xc5, 0xe0, 0x75, 0x2d, 0x00, 0xf5} },
+{ 0x0310, 16, {0x2e, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70, 0x38, 0x90, 0x20, 0x6b, 0xf0, 0xf5, 0x31, 0xf5} },
+{ 0x0320, 16, {0x32, 0xc3, 0xe5, 0x32, 0x95, 0x2e, 0xe5, 0x31, 0x95, 0x2d, 0x50, 0x34, 0x74, 0xc0, 0x25, 0x32} },
+{ 0x0330, 16, {0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x2a, 0x25, 0x32, 0xf5, 0x82, 0xe5} },
+{ 0x0340, 16, {0x31, 0x35, 0x29, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x32, 0xe5, 0x32, 0x70, 0x02, 0x05, 0x31, 0x80} },
+{ 0x0350, 16, {0xd0, 0xaf, 0x2a, 0xae, 0x29, 0xad, 0x2e, 0x7a, 0x7e, 0x79, 0xc0, 0x7b, 0xc0, 0x12, 0x0c, 0x80} },
+{ 0x0360, 16, {0xe5, 0x2e, 0x25, 0x2a, 0xf5, 0x2a, 0xe5, 0x2d, 0x35, 0x29, 0xf5, 0x29, 0xc3, 0xe5, 0x2c, 0x95} },
+{ 0x0370, 13, {0x2e, 0xf5, 0x2c, 0xe5, 0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0x02, 0x02, 0xd4, 0xc3} },
+{ 0x037d, 1, {0x22} },
+{ 0x037e, 16, {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x56, 0x14, 0x70, 0x03, 0x02, 0x04, 0xd2, 0x24} },
+{ 0x038e, 16, {0xfe, 0x70, 0x03, 0x02, 0x05, 0x46, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x50, 0x14, 0x70, 0x03} },
+{ 0x039e, 16, {0x02, 0x04, 0x4a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3e, 0x14, 0x70, 0x03, 0x02, 0x04, 0x44, 0x24} },
+{ 0x03ae, 16, {0x05, 0x60, 0x03, 0x02, 0x05, 0x9a, 0x12, 0x0e, 0x7b, 0x40, 0x03, 0x02, 0x05, 0xab, 0x90, 0x7f} },
+{ 0x03be, 16, {0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x11, 0x90} },
+{ 0x03ce, 16, {0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x03de, 16, {0xff, 0x12, 0x0b, 0x58, 0x8b, 0x26, 0x8a, 0x27, 0x89, 0x28, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02} },
+{ 0x03ee, 16, {0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xab, 0x90} },
+{ 0x03fe, 16, {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0c} },
+{ 0x040e, 16, {0x3f, 0x8b, 0x26, 0x8a, 0x27, 0x89, 0x28, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f} },
+{ 0x041e, 16, {0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0} },
+{ 0x042e, 16, {0x44, 0x01, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xab} },
+{ 0x043e, 16, {0x12, 0x0e, 0x52, 0x02, 0x05, 0xab, 0x12, 0x0e, 0x60, 0x02, 0x05, 0xab, 0x12, 0x0a, 0xf7, 0x02} },
+{ 0x044e, 16, {0x05, 0xab, 0x12, 0x08, 0xf1, 0x02, 0x05, 0xab, 0x12, 0x0e, 0x7d, 0x40, 0x03, 0x02, 0x05, 0xab} },
+{ 0x045e, 16, {0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2} },
+{ 0x046e, 16, {0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x02, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0} },
+{ 0x047e, 16, {0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xab, 0xe4, 0x90, 0x7f, 0x00} },
+{ 0x048e, 16, {0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xec, 0xe0} },
+{ 0x049e, 16, {0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4} },
+{ 0x04ae, 16, {0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3} },
+{ 0x04be, 16, {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01} },
+{ 0x04ce, 16, {0xf0, 0x02, 0x05, 0xab, 0x12, 0x0e, 0x7f, 0x40, 0x03, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xe8, 0xe0} },
+{ 0x04de, 16, {0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xea, 0xe0, 0xb4} },
+{ 0x04ee, 16, {0x01, 0x05, 0xc2, 0x00, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05} },
+{ 0x04fe, 16, {0xab, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4} },
+{ 0x050e, 16, {0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} },
+{ 0x051e, 16, {0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f} },
+{ 0x052e, 16, {0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x6e, 0x90} },
+{ 0x053e, 16, {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x65, 0x12, 0x0e, 0x81, 0x50, 0x60, 0x90, 0x7f, 0xe8} },
+{ 0x054e, 16, {0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x54, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04} },
+{ 0x055e, 16, {0xd2, 0x00, 0x80, 0x49, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x40, 0x90, 0x7f, 0xea} },
+{ 0x056e, 16, {0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0} },
+{ 0x057e, 16, {0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01} },
+{ 0x058e, 16, {0xf0, 0x80, 0x1a, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x11, 0xe4, 0x90, 0x20, 0x6a} },
+{ 0x059e, 16, {0xf0, 0x12, 0x01, 0x00, 0x50, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4} },
+{ 0x05ae, 4, {0xe0, 0x44, 0x02, 0xf0} },
+{ 0x05b2, 1, {0x22} },
+{ 0x05b3, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x05c3, 16, {0xd0, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x06, 0xc0, 0x07, 0x90, 0x7f, 0xa5} },
+{ 0x05d3, 16, {0xe0, 0x30, 0xe2, 0x06, 0x75, 0x0d, 0x06, 0x02, 0x06, 0x7f, 0x90, 0x7f, 0xa5, 0xe0, 0x20, 0xe1} },
+{ 0x05e3, 16, {0x0c, 0xe5, 0x0d, 0x64, 0x02, 0x60, 0x06, 0x75, 0x0d, 0x07, 0x02, 0x06, 0x7f, 0xaf, 0x0d, 0xef} },
+{ 0x05f3, 16, {0x24, 0xfe, 0x60, 0x48, 0x14, 0x60, 0x2c, 0x24, 0xfe, 0x60, 0x77, 0x24, 0x04, 0x60, 0x03, 0x02} },
+{ 0x0603, 16, {0x06, 0x7f, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xaf, 0x0c, 0x05, 0x0c, 0x8f, 0x82, 0x75, 0x83} },
+{ 0x0613, 16, {0x00, 0x12, 0x07, 0x85, 0x90, 0x7f, 0xa6, 0xf0, 0xe5, 0x0c, 0x65, 0x08, 0x70, 0x5e, 0x75, 0x0d} },
+{ 0x0623, 16, {0x05, 0x80, 0x59, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e} },
+{ 0x0633, 16, {0x82, 0x75, 0x83, 0x00, 0x12, 0x07, 0xb2, 0x75, 0x0d, 0x02, 0x80, 0x40, 0xe5, 0x08, 0x24, 0xfe} },
+{ 0x0643, 16, {0xb5, 0x0c, 0x07, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0xe5, 0x08, 0x14, 0xb5, 0x0c, 0x0a} },
+{ 0x0653, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09} },
+{ 0x0663, 16, {0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e, 0x82, 0x75, 0x83, 0x00, 0x12, 0x07, 0xb2, 0x05, 0x0c} },
+{ 0x0673, 16, {0x80, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x53, 0x91, 0xdf, 0xd0} },
+{ 0x0683, 16, {0x07, 0xd0, 0x06, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x86, 0xd0} },
+{ 0x0693, 10, {0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x069d, 16, {0xc2, 0x04, 0xd2, 0x05, 0xe4, 0xf5, 0x25, 0xc2, 0x03, 0xc2, 0x00, 0xc2, 0x02, 0xc2, 0x01, 0x12} },
+{ 0x06ad, 16, {0x0e, 0x74, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9} },
+{ 0x06bd, 16, {0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0x90} },
+{ 0x06cd, 16, {0x7f, 0x93, 0x74, 0x30, 0xf0, 0x12, 0x0a, 0x19, 0x75, 0x24, 0x48, 0x75, 0x23, 0x92, 0x75, 0x22} },
+{ 0x06dd, 16, {0x00, 0x75, 0x21, 0x00, 0xe4, 0xff, 0xfe, 0x7e, 0x05, 0x90, 0x20, 0x68, 0x74, 0x01, 0xf0, 0xa3} },
+{ 0x06ed, 16, {0xde, 0xfc, 0x7e, 0x00, 0x7f, 0x05, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae} },
+{ 0x06fd, 16, {0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0x12, 0x0e, 0x68, 0x30, 0x01, 0x0a, 0xe4, 0x90, 0x20, 0x69} },
+{ 0x070d, 16, {0xf0, 0x12, 0x03, 0x7e, 0xc2, 0x01, 0x30, 0x04, 0x1a, 0x12, 0x0e, 0x77, 0x50, 0x13, 0x12, 0x09} },
+{ 0x071d, 16, {0x00, 0x30, 0x00, 0x07, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0xf3, 0x12, 0x0d, 0x8b, 0x12, 0x0e} },
+{ 0x072d, 16, {0x79, 0xc2, 0x03, 0x7f, 0xff, 0x7e, 0xff, 0x7d, 0xff, 0x7c, 0xff, 0x78, 0x21, 0x12, 0x08, 0x1d} },
+{ 0x073d, 16, {0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0x08, 0x0c, 0x70, 0x1b, 0x75, 0x24} },
+{ 0x074d, 16, {0x48, 0x75, 0x23, 0x92, 0xf5, 0x22, 0xf5, 0x21, 0x63, 0x25, 0xff, 0x90, 0x20, 0x68, 0xe5, 0x25} },
+{ 0x075d, 14, {0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0x12, 0x08, 0xff, 0x80, 0x9b} },
+{ 0x076b, 1, {0x22} },
+{ 0x076c, 16, {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
+{ 0x077c, 9, {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x0785, 16, {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
+{ 0x0795, 16, {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
+{ 0x07a5, 13, {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x07b2, 16, {0xf8, 0xbb, 0x01, 0x0d, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0} },
+{ 0x07c2, 16, {0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8} },
+{ 0x07d2, 2, {0xf2, 0x22} },
+{ 0x07d4, 16, {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
+{ 0x07e4, 16, {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
+{ 0x07f4, 16, {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
+{ 0x0804, 8, {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
+{ 0x080c, 16, {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
+{ 0x081c, 1, {0x22} },
+{ 0x081d, 16, {0x08, 0x08, 0x08, 0xe6, 0x2f, 0xff, 0xf6, 0x18, 0xe6, 0x3e, 0xfe, 0xf6, 0x18, 0xe6, 0x3d, 0xfd} },
+{ 0x082d, 7, {0xf6, 0x18, 0xe6, 0x3c, 0xfc, 0xf6, 0x22} },
+{ 0x0834, 4, {0x8c, 0x34, 0x8d, 0x35} },
+{ 0x0838, 16, {0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0xe4, 0xf5, 0x36, 0xf5, 0x37, 0xc3, 0xe5, 0x37, 0x95} },
+{ 0x0848, 16, {0x35, 0xe5, 0x36, 0x95, 0x34, 0x50, 0x69, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5} },
+{ 0x0858, 16, {0x83, 0x74, 0xff, 0xf0, 0xf4, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36} },
+{ 0x0868, 16, {0x3e, 0xf5, 0x83, 0xe4, 0xf0, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36} },
+{ 0x0878, 16, {0x3e, 0xf5, 0x83, 0x74, 0xaa, 0xf0, 0x64, 0xaa, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x37, 0xf5} },
+{ 0x0888, 16, {0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0x74, 0x55, 0xf0, 0x64, 0x55, 0x60, 0x02, 0xc3, 0x22, 0xad} },
+{ 0x0898, 16, {0x37, 0xe5, 0x37, 0x2f, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0xed, 0xf0, 0xfc, 0xac, 0x05} },
+{ 0x08a8, 16, {0xed, 0x6c, 0x60, 0x02, 0xc3, 0x22, 0x05, 0x37, 0xe5, 0x37, 0x70, 0x02, 0x05, 0x36, 0x80, 0x8c} },
+{ 0x08b8, 16, {0xe4, 0xf5, 0x36, 0xf5, 0x37, 0xc3, 0xe5, 0x37, 0x95, 0x35, 0xe5, 0x36, 0x95, 0x34, 0x50, 0x27} },
+{ 0x08c8, 16, {0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0xe0, 0x65, 0x37, 0x60, 0x02, 0xc3} },
+{ 0x08d8, 16, {0x22, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 0x37, 0xe5} },
+{ 0x08e8, 8, {0x37, 0x70, 0x02, 0x05, 0x36, 0x80, 0xce, 0xd3} },
+{ 0x08f0, 1, {0x22} },
+{ 0x08f1, 14, {0x90, 0x7f, 0x00, 0xe5, 0x10, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
+{ 0x08ff, 1, {0x22} },
+{ 0x0900, 9, {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
+{ 0x097d, 16, {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
+{ 0x098d, 12, {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x3a, 0x02, 0x09, 0xd4} },
+{ 0x0999, 16, {0x02, 0x06, 0x9d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
+{ 0x09a9, 16, {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
+{ 0x09b9, 16, {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
+{ 0x09c9, 16, {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0e, 0x2d, 0xe4, 0x7e} },
+{ 0x09d9, 16, {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
+{ 0x09e9, 16, {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
+{ 0x09f9, 16, {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
+{ 0x0a09, 16, {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
+{ 0x0a19, 16, {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0x74, 0x89} },
+{ 0x0a29, 16, {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0d, 0xd5, 0x90, 0x7f} },
+{ 0x0a39, 16, {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x0d, 0xd5, 0x7f, 0x05, 0x7e, 0x00} },
+{ 0x0a49, 16, {0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02, 0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05} },
+{ 0x0a59, 16, {0x7e, 0x00, 0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00} },
+{ 0x0a69, 16, {0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d} },
+{ 0x0a79, 16, {0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d, 0xd5, 0x22} },
+{ 0x0a89, 16, {0x75, 0x33, 0x01, 0xe5, 0x33, 0x60, 0x1b, 0x7f, 0x01, 0x12, 0x0e, 0x18, 0x7f, 0x00, 0x7e, 0x0e} },
+{ 0x0a99, 16, {0x7d, 0x00, 0x7c, 0x01, 0x12, 0x08, 0x34, 0xe4, 0x33, 0xf5, 0x33, 0x70, 0x05, 0x7f, 0x0f, 0x12} },
+{ 0x0aa9, 16, {0x0e, 0x18, 0xe5, 0x33, 0x60, 0x1b, 0x7f, 0x02, 0x12, 0x0e, 0x18, 0x7f, 0x00, 0x7e, 0x80, 0x7d} },
+{ 0x0ab9, 16, {0x00, 0x7c, 0x80, 0x12, 0x08, 0x34, 0xe4, 0x33, 0xf5, 0x33, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0e} },
+{ 0x0ac9, 16, {0x18, 0xe5, 0x33, 0x60, 0x1b, 0x7f, 0x03, 0x12, 0x0e, 0x18, 0x7f, 0x00, 0x7e, 0x20, 0x7d, 0x40} },
+{ 0x0ad9, 16, {0x7c, 0x5b, 0x12, 0x08, 0x34, 0xe4, 0x33, 0xf5, 0x33, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0e, 0x18} },
+{ 0x0ae9, 13, {0xe5, 0x33, 0x60, 0x05, 0xe4, 0xff, 0x12, 0x0e, 0x18, 0xe5, 0x33, 0x24, 0xff} },
+{ 0x0af6, 1, {0x22} },
+{ 0x0af7, 8, {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x10, 0xd3, 0x22} },
+{ 0x0aff, 1, {0x32} },
+{ 0x0b00, 16, {0x02, 0x0d, 0xa5, 0x00, 0x02, 0x0d, 0xec, 0x00, 0x02, 0x0d, 0x70, 0x00, 0x02, 0x0d, 0xbd, 0x00} },
+{ 0x0b10, 16, {0x02, 0x0e, 0x02, 0x00, 0x02, 0x0a, 0xff, 0x00, 0x02, 0x0e, 0x83, 0x00, 0x02, 0x0e, 0x84, 0x00} },
+{ 0x0b20, 16, {0x02, 0x0e, 0x85, 0x00, 0x02, 0x0e, 0x86, 0x00, 0x02, 0x0e, 0x87, 0x00, 0x02, 0x0e, 0x88, 0x00} },
+{ 0x0b30, 16, {0x02, 0x0e, 0x89, 0x00, 0x02, 0x0e, 0x8a, 0x00, 0x02, 0x0e, 0x8b, 0x00, 0x02, 0x0e, 0x8c, 0x00} },
+{ 0x0b40, 16, {0x02, 0x0e, 0x8d, 0x00, 0x02, 0x0e, 0x8e, 0x00, 0x02, 0x0e, 0x8f, 0x00, 0x02, 0x0e, 0x90, 0x00} },
+{ 0x0b50, 8, {0x02, 0x0e, 0x91, 0x00, 0x02, 0x0e, 0x92, 0x00} },
+{ 0x0b58, 16, {0xe4, 0xfe, 0x75, 0x2b, 0xff, 0x75, 0x2c, 0x11, 0x75, 0x2d, 0x12, 0xab, 0x2b, 0xaa, 0x2c, 0xa9} },
+{ 0x0b68, 16, {0x2d, 0x90, 0x00, 0x01, 0x12, 0x07, 0x85, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
+{ 0x0b78, 16, {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x07, 0xd4, 0x85, 0xf0, 0x29, 0xf5, 0x2a, 0x62, 0x29} },
+{ 0x0b88, 16, {0xe5, 0x29, 0x62, 0x2a, 0xe5, 0x2a, 0x62, 0x29, 0x29, 0xfd, 0xe5, 0x29, 0x3a, 0xa9, 0x05, 0x75} },
+{ 0x0b98, 14, {0x2b, 0xff, 0xf5, 0x2c, 0x89, 0x2d, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x0ba6, 1, {0x22} },
+{ 0x0ba7, 6, {0xab, 0x07, 0xaa, 0x06, 0xac, 0x05} },
+{ 0x0bad, 16, {0xe4, 0xfd, 0xe5, 0x11, 0x60, 0x11, 0xea, 0xff, 0xae, 0x05, 0x0d, 0xee, 0x24, 0x10, 0xf5, 0x82} },
+{ 0x0bbd, 16, {0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xef, 0xf0, 0xeb, 0xae, 0x05, 0x0d, 0x74, 0x10, 0x2e, 0xf5, 0x82} },
+{ 0x0bcd, 16, {0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xeb, 0xf0, 0xaf, 0x05, 0x0d, 0x74, 0x10, 0x2f, 0xf5, 0x82, 0xe4} },
+{ 0x0bdd, 16, {0x34, 0x0f, 0xf5, 0x83, 0xec, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f, 0x7b, 0x10, 0x12, 0x0d, 0x51, 0x7f} },
+{ 0x0bed, 6, {0x0a, 0x7e, 0x00, 0x12, 0x0d, 0xd5} },
+{ 0x0bf3, 1, {0x22} },
+{ 0x0bf4, 10, {0x8e, 0x33, 0x8f, 0x34, 0x8d, 0x35, 0x8a, 0x36, 0x8b, 0x37} },
+{ 0x0bfe, 16, {0xe4, 0xfd, 0xf5, 0x38, 0xe5, 0x11, 0x60, 0x12, 0xe5, 0x33, 0xff, 0xae, 0x05, 0x0d, 0xee, 0x24} },
+{ 0x0c0e, 16, {0x13, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x34, 0xae, 0x05, 0x0d, 0x74} },
+{ 0x0c1e, 16, {0x13, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xe5, 0x34, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f} },
+{ 0x0c2e, 16, {0x7b, 0x13, 0x12, 0x0d, 0x51, 0xaf, 0x0f, 0xad, 0x35, 0xab, 0x37, 0xaa, 0x36, 0x12, 0x0d, 0x32} },
+{ 0x0c3e, 1, {0x22} },
+{ 0x0c3f, 2, {0x8f, 0x29} },
+{ 0x0c41, 16, {0xe4, 0xf5, 0x2a, 0x75, 0x2b, 0xff, 0x75, 0x2c, 0x11, 0x75, 0x2d, 0x32, 0xab, 0x2b, 0xaa, 0x2c} },
+{ 0x0c51, 16, {0xa9, 0x2d, 0x90, 0x00, 0x01, 0x12, 0x07, 0x85, 0xb4, 0x03, 0x1d, 0xaf, 0x2a, 0x05, 0x2a, 0xef} },
+{ 0x0c61, 16, {0xb5, 0x29, 0x01, 0x22, 0x12, 0x07, 0x6c, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
+{ 0x0c71, 14, {0x2b, 0xff, 0xf5, 0x2c, 0x89, 0x2d, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x0c7f, 1, {0x22} },
+{ 0x0c80, 10, {0x8e, 0x33, 0x8f, 0x34, 0x8d, 0x35, 0x8a, 0x36, 0x8b, 0x37} },
+{ 0x0c8a, 16, {0xe4, 0xf5, 0x38, 0xe5, 0x38, 0xc3, 0x95, 0x35, 0x50, 0x20, 0x05, 0x34, 0xe5, 0x34, 0xae, 0x33} },
+{ 0x0c9a, 16, {0x70, 0x02, 0x05, 0x33, 0x14, 0xff, 0xe5, 0x37, 0x25, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x36, 0xf5} },
+{ 0x0caa, 10, {0x83, 0xe0, 0xfd, 0x12, 0x0b, 0xa7, 0x05, 0x38, 0x80, 0xd9} },
+{ 0x0cb4, 1, {0x22} },
+{ 0x0cb5, 16, {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x25, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
+{ 0x0cc5, 16, {0x44, 0x01, 0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a} },
+{ 0x0cd5, 13, {0x0a, 0x89, 0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x03, 0xd3, 0x22, 0xc3, 0x22} },
+{ 0x0ce2, 16, {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x23, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
+{ 0x0cf2, 16, {0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a, 0x0a, 0x89} },
+{ 0x0d02, 11, {0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x01, 0xd3, 0x22, 0xc3, 0x22} },
+{ 0x0d0d, 16, {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x06, 0x04, 0xe0, 0x44} },
+{ 0x0d1d, 16, {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x0d, 0xd5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
+{ 0x0d2d, 5, {0xe0, 0x44, 0x04, 0xf0, 0x22} },
+{ 0x0d32, 16, {0x12, 0x0c, 0xb5, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
+{ 0x0d42, 15, {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
+{ 0x0d51, 16, {0x12, 0x0c, 0xe2, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
+{ 0x0d61, 15, {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
+{ 0x0d70, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
+{ 0x0d80, 11, {0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d8b, 16, {0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x12, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x14, 0x7e, 0x00, 0x12} },
+{ 0x0d9b, 10, {0x0d, 0xd5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22} },
+{ 0x0da5, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
+{ 0x0db5, 8, {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dbd, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x03, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08} },
+{ 0x0dcd, 8, {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dd5, 16, {0x8e, 0x39, 0x8f, 0x3a, 0xe5, 0x3a, 0x15, 0x3a, 0xae, 0x39, 0x70, 0x02, 0x15, 0x39, 0x4e, 0x60} },
+{ 0x0de5, 7, {0x05, 0x12, 0x0e, 0x41, 0x80, 0xee, 0x22} },
+{ 0x0dec, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0xd0} },
+{ 0x0dfc, 6, {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0e02, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
+{ 0x0e12, 6, {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0e18, 16, {0xae, 0x07, 0x7f, 0x21, 0x7d, 0x01, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xab, 0x82} },
+{ 0x0e28, 5, {0xfa, 0x12, 0x0d, 0x51, 0x22} },
+{ 0x0e2d, 16, {0x50, 0x0f, 0x00, 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x98, 0x88, 0x83, 0xc6} },
+{ 0x0e3d, 3, {0xa1, 0x86, 0x8e} },
+{ 0x0e40, 1, {0x00} },
+{ 0x0e41, 16, {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
+{ 0x0e51, 1, {0x22} },
+{ 0x0e52, 14, {0x90, 0x7f, 0x00, 0xe5, 0x0e, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
+{ 0x0e60, 8, {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0e, 0xd3, 0x22} },
+{ 0x0e68, 8, {0xe4, 0xf5, 0x0d, 0xd2, 0xe9, 0xd2, 0xaf, 0x22} },
+{ 0x0e70, 4, {0x53, 0xd8, 0xef, 0x32} },
+{ 0x0e74, 3, {0xd2, 0x00, 0x22} },
+{ 0x0e77, 2, {0xd3, 0x22} },
+{ 0x0e79, 2, {0xd3, 0x22} },
+{ 0x0e7b, 2, {0xd3, 0x22} },
+{ 0x0e7d, 2, {0xd3, 0x22} },
+{ 0x0e7f, 2, {0xd3, 0x22} },
+{ 0x0e81, 2, {0xd3, 0x22} },
+{ 0x0e83, 1, {0x32} },
+{ 0x0e84, 1, {0x32} },
+{ 0x0e85, 1, {0x32} },
+{ 0x0e86, 1, {0x32} },
+{ 0x0e87, 1, {0x32} },
+{ 0x0e88, 1, {0x32} },
+{ 0x0e89, 1, {0x32} },
+{ 0x0e8a, 1, {0x32} },
+{ 0x0e8b, 1, {0x32} },
+{ 0x0e8c, 1, {0x32} },
+{ 0x0e8d, 1, {0x32} },
+{ 0x0e8e, 1, {0x32} },
+{ 0x0e8f, 1, {0x32} },
+{ 0x0e90, 1, {0x32} },
+{ 0x0e91, 1, {0x32} },
+{ 0x0e92, 1, {0x32} },
+{ 0x1100, 16, {0x12, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40, 0x47, 0x05, 0x10, 0x27, 0x01, 0x00, 0x01, 0x02} },
+{ 0x1110, 16, {0x00, 0x01, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x03, 0xa0, 0x00, 0x09, 0x04, 0x00, 0x00, 0x02} },
+{ 0x1120, 16, {0xff, 0x00, 0x00, 0x04, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40} },
+{ 0x1130, 16, {0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x26, 0x03, 0x41, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x68, 0x00} },
+{ 0x1140, 16, {0x6f, 0x00, 0x72, 0x00, 0x20, 0x00, 0x43, 0x00, 0x68, 0x00, 0x69, 0x00, 0x70, 0x00, 0x73, 0x00} },
+{ 0x1150, 16, {0x2c, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x28, 0x03, 0x46, 0x00} },
+{ 0x1160, 16, {0x69, 0x00, 0x72, 0x00, 0x6d, 0x00, 0x77, 0x00, 0x61, 0x00, 0x72, 0x00, 0x65, 0x00, 0x20, 0x00} },
+{ 0x1170, 16, {0x46, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x57, 0x00, 0x6f, 0x00, 0x72, 0x00} },
+{ 0x1180, 16, {0x6b, 0x00, 0x73, 0x00, 0x2a, 0x03, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00} },
+{ 0x1190, 16, {0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00} },
+{ 0x11a0, 16, {0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x22, 0x03} },
+{ 0x11b0, 16, {0x49, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x61, 0x00, 0x63, 0x00} },
+{ 0x11c0, 16, {0x65, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00} },
+{ 0x11d0, 2, {0x00, 0x00} },
+{ 0xffff, 0, {0x00} }
+};
+
+#else
+
+static const struct whiteheat_hex_record whiteheat_loader[] = {
+{ 0x0000, 3, {0x02, 0x09, 0x8d} },
+{ 0x0033, 3, {0x02, 0x08, 0xfb} },
+{ 0x0043, 3, {0x02, 0x0b, 0x00} },
+{ 0x004b, 3, {0x02, 0x05, 0xaa} },
+{ 0x0100, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x54, 0x10, 0xff, 0xc4, 0x54, 0x0f, 0x44, 0x50, 0xf5, 0x0f, 0x13, 0xe4} },
+{ 0x0110, 16, {0x33, 0xf5, 0x11, 0x90, 0x7f, 0xe9, 0xe0, 0x24, 0x5e, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x03} },
+{ 0x0120, 16, {0x78, 0x90, 0x01, 0x28, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x01, 0xbc, 0x02, 0x01, 0xbc, 0x02, 0x01} },
+{ 0x0130, 16, {0x91, 0x02, 0x01, 0x3d, 0x02, 0x01, 0x53, 0x02, 0x01, 0x6f, 0x02, 0x01, 0x9a, 0x90, 0x7f, 0x00} },
+{ 0x0140, 16, {0xe5, 0x11, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
+{ 0x0150, 16, {0x02, 0x03, 0x78, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x90, 0x7f, 0x00, 0xf0, 0x90} },
+{ 0x0160, 16, {0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03, 0x78, 0x12} },
+{ 0x0170, 16, {0x0a, 0x89, 0x50, 0x07, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x00, 0x74, 0x0f} },
+{ 0x0180, 16, {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03} },
+{ 0x0190, 16, {0x78, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0f, 0x02, 0x03, 0x78, 0x90, 0x7f, 0x00, 0x74, 0x07, 0xf0} },
+{ 0x01a0, 16, {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xe8, 0x7e} },
+{ 0x01b0, 16, {0x03, 0x12, 0x0d, 0x94, 0xd2, 0x06, 0x12, 0x0c, 0xcc, 0x02, 0x03, 0x78, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x01c0, 16, {0x75, 0x28, 0x00, 0xf5, 0x29, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x28, 0x90, 0x7f, 0xee, 0xe0} },
+{ 0x01d0, 16, {0x75, 0x2a, 0x00, 0xf5, 0x2b, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x2a, 0x90, 0x7f, 0xe8, 0xe0} },
+{ 0x01e0, 16, {0x64, 0xc0, 0x60, 0x03, 0x02, 0x02, 0xc9, 0xe5, 0x2b, 0x45, 0x2a, 0x70, 0x03, 0x02, 0x03, 0x78} },
+{ 0x01f0, 16, {0xc3, 0xe5, 0x2b, 0x94, 0x40, 0xe5, 0x2a, 0x94, 0x00, 0x50, 0x08, 0x85, 0x2a, 0x2c, 0x85, 0x2b} },
+{ 0x0200, 16, {0x2d, 0x80, 0x06, 0x75, 0x2c, 0x00, 0x75, 0x2d, 0x40, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70} },
+{ 0x0210, 16, {0x34, 0xf5, 0x30, 0xf5, 0x31, 0xc3, 0xe5, 0x31, 0x95, 0x2d, 0xe5, 0x30, 0x95, 0x2c, 0x50, 0x5c} },
+{ 0x0220, 16, {0xe5, 0x29, 0x25, 0x31, 0xf5, 0x82, 0xe5, 0x30, 0x35, 0x28, 0xf5, 0x83, 0xe0, 0xff, 0x74, 0x00} },
+{ 0x0230, 16, {0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x31, 0xe5, 0x31, 0x70} },
+{ 0x0240, 16, {0x02, 0x05, 0x30, 0x80, 0xd0, 0xe4, 0xf5, 0x30, 0xf5, 0x31, 0xc3, 0xe5, 0x31, 0x95, 0x2d, 0xe5} },
+{ 0x0250, 16, {0x30, 0x95, 0x2c, 0x50, 0x18, 0x74, 0x00, 0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
+{ 0x0260, 16, {0x74, 0xcd, 0xf0, 0x05, 0x31, 0xe5, 0x31, 0x70, 0x02, 0x05, 0x30, 0x80, 0xdd, 0xaf, 0x29, 0xae} },
+{ 0x0270, 16, {0x28, 0xad, 0x2d, 0x7a, 0x7f, 0x79, 0x00, 0x7b, 0x00, 0x12, 0x0b, 0xf4, 0x90, 0x7f, 0xb5, 0xe5} },
+{ 0x0280, 16, {0x2d, 0xf0, 0xe5, 0x2d, 0x25, 0x29, 0xf5, 0x29, 0xe5, 0x2c, 0x35, 0x28, 0xf5, 0x28, 0xc3, 0xe5} },
+{ 0x0290, 16, {0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0xe5, 0x2a, 0x95, 0x2c, 0xf5, 0x2a, 0x90, 0x7f, 0x92, 0xe0, 0xff} },
+{ 0x02a0, 16, {0xc4, 0x54, 0x0f, 0x75, 0x2e, 0x00, 0xf5, 0x2f, 0xd3, 0x94, 0x00, 0xe5, 0x2e, 0x94, 0x00, 0x50} },
+{ 0x02b0, 16, {0x0c, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe1, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xb4} },
+{ 0x02c0, 16, {0xe0, 0x20, 0xe2, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xe8, 0xe0, 0x64, 0x40, 0x60} },
+{ 0x02d0, 16, {0x03, 0x02, 0x03, 0x78, 0xe5, 0x2b, 0x45, 0x2a, 0x70, 0x03, 0x02, 0x03, 0x78, 0xe4, 0x90, 0x7f} },
+{ 0x02e0, 16, {0xc5, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x75, 0x2e, 0x00, 0xf5, 0x2f, 0xd3} },
+{ 0x02f0, 16, {0x94, 0x00, 0xe5, 0x2e, 0x94, 0x00, 0x50, 0x09, 0x90, 0x7f, 0xc4, 0xe0, 0x30, 0xe1, 0x09, 0x80} },
+{ 0x0300, 16, {0xf7, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe3, 0xf9, 0x90, 0x7f, 0xc5, 0xe0, 0x75, 0x2c, 0x00, 0xf5} },
+{ 0x0310, 16, {0x2d, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70, 0x34, 0xf5, 0x30, 0xf5, 0x31, 0xc3, 0xe5, 0x31} },
+{ 0x0320, 16, {0x95, 0x2d, 0xe5, 0x30, 0x95, 0x2c, 0x50, 0x34, 0x74, 0xc0, 0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x0330, 1, {0x7e} },
+{ 0x0331, 16, {0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x29, 0x25, 0x31, 0xf5, 0x82, 0xe5, 0x30, 0x35, 0x28, 0xf5, 0x83} },
+{ 0x0341, 16, {0xef, 0xf0, 0x05, 0x31, 0xe5, 0x31, 0x70, 0x02, 0x05, 0x30, 0x80, 0xd0, 0xaf, 0x29, 0xae, 0x28} },
+{ 0x0351, 16, {0xad, 0x2d, 0x7a, 0x7e, 0x79, 0xc0, 0x7b, 0xc0, 0x12, 0x0c, 0x3f, 0xe5, 0x2d, 0x25, 0x29, 0xf5} },
+{ 0x0361, 16, {0x29, 0xe5, 0x2c, 0x35, 0x28, 0xf5, 0x28, 0xc3, 0xe5, 0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0xe5, 0x2a} },
+{ 0x0371, 9, {0x95, 0x2c, 0xf5, 0x2a, 0x02, 0x02, 0xd4, 0xc3, 0x22} },
+{ 0x037a, 16, {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x52, 0x14, 0x70, 0x03, 0x02, 0x04, 0xce, 0x24} },
+{ 0x038a, 16, {0xfe, 0x70, 0x03, 0x02, 0x05, 0x42, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x4c, 0x14, 0x70, 0x03} },
+{ 0x039a, 16, {0x02, 0x04, 0x46, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x40, 0x24} },
+{ 0x03aa, 16, {0x05, 0x60, 0x03, 0x02, 0x05, 0x96, 0x12, 0x0e, 0x44, 0x40, 0x03, 0x02, 0x05, 0xa2, 0x90, 0x7f} },
+{ 0x03ba, 16, {0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x11, 0x90} },
+{ 0x03ca, 16, {0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x03da, 16, {0xff, 0x12, 0x0b, 0x58, 0x8b, 0x25, 0x8a, 0x26, 0x89, 0x27, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02} },
+{ 0x03ea, 16, {0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa2, 0x90} },
+{ 0x03fa, 16, {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x08} },
+{ 0x040a, 16, {0xba, 0x8b, 0x25, 0x8a, 0x26, 0x89, 0x27, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f} },
+{ 0x041a, 16, {0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0} },
+{ 0x042a, 16, {0x44, 0x01, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa2} },
+{ 0x043a, 16, {0x12, 0x0e, 0x1f, 0x02, 0x05, 0xa2, 0x12, 0x0e, 0x2d, 0x02, 0x05, 0xa2, 0x12, 0x0a, 0xf7, 0x02} },
+{ 0x044a, 16, {0x05, 0xa2, 0x12, 0x0e, 0x11, 0x02, 0x05, 0xa2, 0x12, 0x0e, 0x46, 0x40, 0x03, 0x02, 0x05, 0xa2} },
+{ 0x045a, 16, {0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2} },
+{ 0x046a, 16, {0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x02, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0} },
+{ 0x047a, 16, {0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa2, 0xe4, 0x90, 0x7f, 0x00} },
+{ 0x048a, 16, {0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xec, 0xe0} },
+{ 0x049a, 16, {0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4} },
+{ 0x04aa, 16, {0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3} },
+{ 0x04ba, 16, {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01} },
+{ 0x04ca, 16, {0xf0, 0x02, 0x05, 0xa2, 0x12, 0x0e, 0x48, 0x40, 0x03, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xe8, 0xe0} },
+{ 0x04da, 16, {0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xea, 0xe0, 0xb4} },
+{ 0x04ea, 16, {0x01, 0x05, 0xc2, 0x00, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05} },
+{ 0x04fa, 16, {0xa2, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4} },
+{ 0x050a, 16, {0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} },
+{ 0x051a, 16, {0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f} },
+{ 0x052a, 16, {0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x69, 0x90} },
+{ 0x053a, 16, {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x60, 0x12, 0x0e, 0x4a, 0x50, 0x5b, 0x90, 0x7f, 0xe8} },
+{ 0x054a, 16, {0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4f, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04} },
+{ 0x055a, 16, {0xd2, 0x00, 0x80, 0x44, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x3b, 0x90, 0x7f, 0xea} },
+{ 0x056a, 16, {0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0} },
+{ 0x057a, 16, {0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01} },
+{ 0x058a, 16, {0xf0, 0x80, 0x15, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x0c, 0x12, 0x01, 0x00, 0x50} },
+{ 0x059a, 16, {0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22} },
+{ 0x05aa, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x05ba, 16, {0xd0, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x06, 0xc0, 0x07, 0x90, 0x7f, 0xa5} },
+{ 0x05ca, 16, {0xe0, 0x30, 0xe2, 0x06, 0x75, 0x0d, 0x06, 0x02, 0x06, 0x76, 0x90, 0x7f, 0xa5, 0xe0, 0x20, 0xe1} },
+{ 0x05da, 16, {0x0c, 0xe5, 0x0d, 0x64, 0x02, 0x60, 0x06, 0x75, 0x0d, 0x07, 0x02, 0x06, 0x76, 0xaf, 0x0d, 0xef} },
+{ 0x05ea, 16, {0x24, 0xfe, 0x60, 0x48, 0x14, 0x60, 0x2c, 0x24, 0xfe, 0x60, 0x77, 0x24, 0x04, 0x60, 0x03, 0x02} },
+{ 0x05fa, 16, {0x06, 0x76, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xaf, 0x0c, 0x05, 0x0c, 0x8f, 0x82, 0x75, 0x83} },
+{ 0x060a, 16, {0x00, 0x12, 0x08, 0x22, 0x90, 0x7f, 0xa6, 0xf0, 0xe5, 0x0c, 0x65, 0x08, 0x70, 0x5e, 0x75, 0x0d} },
+{ 0x061a, 16, {0x05, 0x80, 0x59, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e} },
+{ 0x062a, 16, {0x82, 0x75, 0x83, 0x00, 0x12, 0x08, 0x4f, 0x75, 0x0d, 0x02, 0x80, 0x40, 0xe5, 0x08, 0x24, 0xfe} },
+{ 0x063a, 16, {0xb5, 0x0c, 0x07, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0xe5, 0x08, 0x14, 0xb5, 0x0c, 0x0a} },
+{ 0x064a, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09} },
+{ 0x065a, 16, {0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e, 0x82, 0x75, 0x83, 0x00, 0x12, 0x08, 0x4f, 0x05, 0x0c} },
+{ 0x066a, 16, {0x80, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x53, 0x91, 0xdf, 0xd0} },
+{ 0x067a, 16, {0x07, 0xd0, 0x06, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x86, 0xd0} },
+{ 0x068a, 10, {0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0694, 16, {0x8c, 0x33, 0x8d, 0x34, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0xe4, 0xf5, 0x35, 0xf5, 0x36} },
+{ 0x06a4, 16, {0xc3, 0xe5, 0x36, 0x95, 0x34, 0xe5, 0x35, 0x95, 0x33, 0x50, 0x69, 0xef, 0x25, 0x36, 0xf5, 0x82} },
+{ 0x06b4, 16, {0xe5, 0x35, 0x3e, 0xf5, 0x83, 0x74, 0xff, 0xf0, 0xf4, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x36} },
+{ 0x06c4, 16, {0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xe4, 0xf0, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x36} },
+{ 0x06d4, 16, {0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0x74, 0xaa, 0xf0, 0x64, 0xaa, 0x60, 0x02, 0xc3, 0x22} },
+{ 0x06e4, 16, {0xef, 0x25, 0x36, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0x74, 0x55, 0xf0, 0x64, 0x55, 0x60} },
+{ 0x06f4, 16, {0x02, 0xc3, 0x22, 0xad, 0x36, 0xe5, 0x36, 0x2f, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xed} },
+{ 0x0704, 16, {0xf0, 0xfc, 0xac, 0x05, 0xed, 0x6c, 0x60, 0x02, 0xc3, 0x22, 0x05, 0x36, 0xe5, 0x36, 0x70, 0x02} },
+{ 0x0714, 16, {0x05, 0x35, 0x80, 0x8c, 0xe4, 0xf5, 0x35, 0xf5, 0x36, 0xc3, 0xe5, 0x36, 0x95, 0x34, 0xe5, 0x35} },
+{ 0x0724, 16, {0x95, 0x33, 0x50, 0x27, 0xef, 0x25, 0x36, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xe0, 0x65} },
+{ 0x0734, 16, {0x36, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x36, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xe4} },
+{ 0x0744, 13, {0xf0, 0x05, 0x36, 0xe5, 0x36, 0x70, 0x02, 0x05, 0x35, 0x80, 0xce, 0xd3, 0x22} },
+{ 0x0751, 16, {0xc2, 0x04, 0xd2, 0x05, 0xc2, 0x03, 0xc2, 0x00, 0xc2, 0x02, 0xc2, 0x01, 0x12, 0x0e, 0x3d, 0xd2} },
+{ 0x0761, 16, {0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f} },
+{ 0x0771, 16, {0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0x90, 0x7f, 0x93, 0x74} },
+{ 0x0781, 16, {0x30, 0xf0, 0x12, 0x0a, 0x19, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0} },
+{ 0x0791, 16, {0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0x12, 0x0e, 0x35, 0x20, 0x01, 0x42, 0x75, 0x24, 0x00, 0x75, 0x23} },
+{ 0x07a1, 16, {0x00, 0x75, 0x22, 0x00, 0x75, 0x21, 0x00, 0x7f, 0x48, 0x7e, 0x92, 0x7d, 0x00, 0x7c, 0x00, 0xab} },
+{ 0x07b1, 16, {0x24, 0xaa, 0x23, 0xa9, 0x22, 0xa8, 0x21, 0xc3, 0x12, 0x08, 0xa9, 0x50, 0xdb, 0x20, 0x01, 0xd8} },
+{ 0x07c1, 16, {0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xe5, 0x24, 0x24, 0x01, 0xf5, 0x24, 0xea, 0x35, 0x23, 0xf5} },
+{ 0x07d1, 16, {0x23, 0xe9, 0x35, 0x22, 0xf5, 0x22, 0xe8, 0x35, 0x21, 0xf5, 0x21, 0x80, 0xca, 0x30, 0x01, 0x05} },
+{ 0x07e1, 16, {0x12, 0x03, 0x7a, 0xc2, 0x01, 0x30, 0x04, 0x1a, 0x12, 0x0e, 0x40, 0x50, 0x13, 0x12, 0x09, 0x00} },
+{ 0x07f1, 16, {0x30, 0x00, 0x07, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0xf3, 0x12, 0x0d, 0x4a, 0x12, 0x0e, 0x42} },
+{ 0x0801, 8, {0xc2, 0x03, 0x12, 0x08, 0xff, 0x80, 0xd6, 0x22} },
+{ 0x0809, 16, {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
+{ 0x0819, 9, {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x0822, 16, {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
+{ 0x0832, 16, {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
+{ 0x0842, 13, {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x084f, 16, {0xf8, 0xbb, 0x01, 0x0d, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0} },
+{ 0x085f, 16, {0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8} },
+{ 0x086f, 2, {0xf2, 0x22} },
+{ 0x0871, 16, {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
+{ 0x0881, 16, {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
+{ 0x0891, 16, {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
+{ 0x08a1, 8, {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
+{ 0x08a9, 16, {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
+{ 0x08b9, 1, {0x22} },
+{ 0x08ba, 2, {0x8f, 0x28} },
+{ 0x08bc, 16, {0xe4, 0xf5, 0x29, 0x75, 0x2a, 0xff, 0x75, 0x2b, 0x11, 0x75, 0x2c, 0x32, 0xab, 0x2a, 0xaa, 0x2b} },
+{ 0x08cc, 16, {0xa9, 0x2c, 0x90, 0x00, 0x01, 0x12, 0x08, 0x22, 0xb4, 0x03, 0x1d, 0xaf, 0x29, 0x05, 0x29, 0xef} },
+{ 0x08dc, 16, {0xb5, 0x28, 0x01, 0x22, 0x12, 0x08, 0x09, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
+{ 0x08ec, 14, {0x2a, 0xff, 0xf5, 0x2b, 0x89, 0x2c, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x08fa, 1, {0x22} },
+{ 0x08fb, 4, {0x53, 0xd8, 0xef, 0x32} },
+{ 0x08ff, 1, {0x22} },
+{ 0x0900, 9, {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
+{ 0x097d, 16, {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
+{ 0x098d, 12, {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x39, 0x02, 0x09, 0xd4} },
+{ 0x0999, 16, {0x02, 0x07, 0x51, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
+{ 0x09a9, 16, {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
+{ 0x09b9, 16, {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
+{ 0x09c9, 16, {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0d, 0xec, 0xe4, 0x7e} },
+{ 0x09d9, 16, {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
+{ 0x09e9, 16, {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
+{ 0x09f9, 16, {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
+{ 0x0a09, 16, {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
+{ 0x0a19, 16, {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0x74, 0x89} },
+{ 0x0a29, 16, {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0d, 0x94, 0x90, 0x7f} },
+{ 0x0a39, 16, {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x0d, 0x94, 0x7f, 0x05, 0x7e, 0x00} },
+{ 0x0a49, 16, {0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02, 0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05} },
+{ 0x0a59, 16, {0x7e, 0x00, 0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00} },
+{ 0x0a69, 16, {0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d} },
+{ 0x0a79, 16, {0x94, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d, 0x94, 0x22} },
+{ 0x0a89, 16, {0x75, 0x32, 0x01, 0xe5, 0x32, 0x60, 0x1b, 0x7f, 0x01, 0x12, 0x0d, 0xd7, 0x7f, 0x00, 0x7e, 0x0e} },
+{ 0x0a99, 16, {0x7d, 0x00, 0x7c, 0x01, 0x12, 0x06, 0x94, 0xe4, 0x33, 0xf5, 0x32, 0x70, 0x05, 0x7f, 0x0f, 0x12} },
+{ 0x0aa9, 16, {0x0d, 0xd7, 0xe5, 0x32, 0x60, 0x1b, 0x7f, 0x02, 0x12, 0x0d, 0xd7, 0x7f, 0x00, 0x7e, 0x80, 0x7d} },
+{ 0x0ab9, 16, {0x00, 0x7c, 0x80, 0x12, 0x06, 0x94, 0xe4, 0x33, 0xf5, 0x32, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0d} },
+{ 0x0ac9, 16, {0xd7, 0xe5, 0x32, 0x60, 0x1b, 0x7f, 0x03, 0x12, 0x0d, 0xd7, 0x7f, 0x00, 0x7e, 0x20, 0x7d, 0x40} },
+{ 0x0ad9, 16, {0x7c, 0x5b, 0x12, 0x06, 0x94, 0xe4, 0x33, 0xf5, 0x32, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0d, 0xd7} },
+{ 0x0ae9, 14, {0xe5, 0x32, 0x60, 0x05, 0xe4, 0xff, 0x12, 0x0d, 0xd7, 0xe5, 0x32, 0x24, 0xff, 0x22} },
+{ 0x0af7, 8, {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x10, 0xd3, 0x22} },
+{ 0x0aff, 1, {0x32} },
+{ 0x0b00, 16, {0x02, 0x0d, 0x64, 0x00, 0x02, 0x0d, 0xab, 0x00, 0x02, 0x0d, 0x2f, 0x00, 0x02, 0x0d, 0x7c, 0x00} },
+{ 0x0b10, 16, {0x02, 0x0d, 0xc1, 0x00, 0x02, 0x0a, 0xff, 0x00, 0x02, 0x0e, 0x4c, 0x00, 0x02, 0x0e, 0x4d, 0x00} },
+{ 0x0b20, 16, {0x02, 0x0e, 0x4e, 0x00, 0x02, 0x0e, 0x4f, 0x00, 0x02, 0x0e, 0x50, 0x00, 0x02, 0x0e, 0x51, 0x00} },
+{ 0x0b30, 16, {0x02, 0x0e, 0x52, 0x00, 0x02, 0x0e, 0x53, 0x00, 0x02, 0x0e, 0x54, 0x00, 0x02, 0x0e, 0x55, 0x00} },
+{ 0x0b40, 16, {0x02, 0x0e, 0x56, 0x00, 0x02, 0x0e, 0x57, 0x00, 0x02, 0x0e, 0x58, 0x00, 0x02, 0x0e, 0x59, 0x00} },
+{ 0x0b50, 8, {0x02, 0x0e, 0x5a, 0x00, 0x02, 0x0e, 0x5b, 0x00} },
+{ 0x0b58, 16, {0xe4, 0xfe, 0x75, 0x2a, 0xff, 0x75, 0x2b, 0x11, 0x75, 0x2c, 0x12, 0xab, 0x2a, 0xaa, 0x2b, 0xa9} },
+{ 0x0b68, 16, {0x2c, 0x90, 0x00, 0x01, 0x12, 0x08, 0x22, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
+{ 0x0b78, 16, {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x08, 0x71, 0x85, 0xf0, 0x28, 0xf5, 0x29, 0x62, 0x28} },
+{ 0x0b88, 16, {0xe5, 0x28, 0x62, 0x29, 0xe5, 0x29, 0x62, 0x28, 0x29, 0xfd, 0xe5, 0x28, 0x3a, 0xa9, 0x05, 0x75} },
+{ 0x0b98, 14, {0x2a, 0xff, 0xf5, 0x2b, 0x89, 0x2c, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x0ba6, 1, {0x22} },
+{ 0x0ba7, 16, {0xab, 0x07, 0xaa, 0x06, 0xac, 0x05, 0xe4, 0xfd, 0xe5, 0x11, 0x60, 0x11, 0xea, 0xff, 0xae, 0x05} },
+{ 0x0bb7, 16, {0x0d, 0xee, 0x24, 0x10, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xef, 0xf0, 0xeb, 0xae, 0x05} },
+{ 0x0bc7, 16, {0x0d, 0x74, 0x10, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xeb, 0xf0, 0xaf, 0x05, 0x0d} },
+{ 0x0bd7, 16, {0x74, 0x10, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xec, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f} },
+{ 0x0be7, 13, {0x7b, 0x10, 0x12, 0x0d, 0x10, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x0d, 0x94, 0x22} },
+{ 0x0bf4, 16, {0x8e, 0x32, 0x8f, 0x33, 0x8d, 0x34, 0x8a, 0x35, 0x8b, 0x36, 0xe4, 0xfd, 0xf5, 0x37, 0xe5, 0x11} },
+{ 0x0c04, 16, {0x60, 0x12, 0xe5, 0x32, 0xff, 0xae, 0x05, 0x0d, 0xee, 0x24, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x0f} },
+{ 0x0c14, 16, {0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x33, 0xae, 0x05, 0x0d, 0x74, 0x13, 0x2e, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x0c24, 16, {0x0f, 0xf5, 0x83, 0xe5, 0x33, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f, 0x7b, 0x13, 0x12, 0x0d, 0x10, 0xaf} },
+{ 0x0c34, 11, {0x0f, 0xad, 0x34, 0xab, 0x36, 0xaa, 0x35, 0x12, 0x0c, 0xf1, 0x22} },
+{ 0x0c3f, 16, {0x8e, 0x32, 0x8f, 0x33, 0x8d, 0x34, 0x8a, 0x35, 0x8b, 0x36, 0xe4, 0xf5, 0x37, 0xe5, 0x37, 0xc3} },
+{ 0x0c4f, 16, {0x95, 0x34, 0x50, 0x20, 0x05, 0x33, 0xe5, 0x33, 0xae, 0x32, 0x70, 0x02, 0x05, 0x32, 0x14, 0xff} },
+{ 0x0c5f, 16, {0xe5, 0x36, 0x25, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x35, 0xf5, 0x83, 0xe0, 0xfd, 0x12, 0x0b, 0xa7} },
+{ 0x0c6f, 5, {0x05, 0x37, 0x80, 0xd9, 0x22} },
+{ 0x0c74, 16, {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x25, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
+{ 0x0c84, 16, {0x44, 0x01, 0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a} },
+{ 0x0c94, 13, {0x0a, 0x89, 0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x03, 0xd3, 0x22, 0xc3, 0x22} },
+{ 0x0ca1, 16, {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x23, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
+{ 0x0cb1, 16, {0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a, 0x0a, 0x89} },
+{ 0x0cc1, 11, {0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x01, 0xd3, 0x22, 0xc3, 0x22} },
+{ 0x0ccc, 16, {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x06, 0x04, 0xe0, 0x44} },
+{ 0x0cdc, 16, {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x0d, 0x94, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
+{ 0x0cec, 5, {0xe0, 0x44, 0x04, 0xf0, 0x22} },
+{ 0x0cf1, 16, {0x12, 0x0c, 0x74, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
+{ 0x0d01, 15, {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
+{ 0x0d10, 16, {0x12, 0x0c, 0xa1, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
+{ 0x0d20, 15, {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
+{ 0x0d2f, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
+{ 0x0d3f, 11, {0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d4a, 16, {0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x12, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x14, 0x7e, 0x00, 0x12} },
+{ 0x0d5a, 10, {0x0d, 0x94, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22} },
+{ 0x0d64, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
+{ 0x0d74, 8, {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d7c, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x03, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08} },
+{ 0x0d8c, 8, {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d94, 16, {0x8e, 0x38, 0x8f, 0x39, 0xe5, 0x39, 0x15, 0x39, 0xae, 0x38, 0x70, 0x02, 0x15, 0x38, 0x4e, 0x60} },
+{ 0x0da4, 7, {0x05, 0x12, 0x0e, 0x00, 0x80, 0xee, 0x22} },
+{ 0x0dab, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0xd0} },
+{ 0x0dbb, 6, {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dc1, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
+{ 0x0dd1, 6, {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dd7, 16, {0xae, 0x07, 0x7f, 0x21, 0x7d, 0x01, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xab, 0x82} },
+{ 0x0de7, 5, {0xfa, 0x12, 0x0d, 0x10, 0x22} },
+{ 0x0dec, 16, {0x50, 0x0f, 0x00, 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x98, 0x88, 0x83, 0xc6} },
+{ 0x0dfc, 3, {0xa1, 0x86, 0x8e} },
+{ 0x0dff, 1, {0x00} },
+{ 0x0e00, 16, {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
+{ 0x0e10, 1, {0x22} },
+{ 0x0e11, 14, {0x90, 0x7f, 0x00, 0xe5, 0x10, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
+{ 0x0e1f, 14, {0x90, 0x7f, 0x00, 0xe5, 0x0e, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
+{ 0x0e2d, 8, {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0e, 0xd3, 0x22} },
+{ 0x0e35, 8, {0xe4, 0xf5, 0x0d, 0xd2, 0xe9, 0xd2, 0xaf, 0x22} },
+{ 0x0e3d, 3, {0xd2, 0x00, 0x22} },
+{ 0x0e40, 2, {0xd3, 0x22} },
+{ 0x0e42, 2, {0xd3, 0x22} },
+{ 0x0e44, 2, {0xd3, 0x22} },
+{ 0x0e46, 2, {0xd3, 0x22} },
+{ 0x0e48, 2, {0xd3, 0x22} },
+{ 0x0e4a, 2, {0xd3, 0x22} },
+{ 0x0e4c, 1, {0x32} },
+{ 0x0e4d, 1, {0x32} },
+{ 0x0e4e, 1, {0x32} },
+{ 0x0e4f, 1, {0x32} },
+{ 0x0e50, 1, {0x32} },
+{ 0x0e51, 1, {0x32} },
+{ 0x0e52, 1, {0x32} },
+{ 0x0e53, 1, {0x32} },
+{ 0x0e54, 1, {0x32} },
+{ 0x0e55, 1, {0x32} },
+{ 0x0e56, 1, {0x32} },
+{ 0x0e57, 1, {0x32} },
+{ 0x0e58, 1, {0x32} },
+{ 0x0e59, 1, {0x32} },
+{ 0x0e5a, 1, {0x32} },
+{ 0x0e5b, 1, {0x32} },
+{ 0x1100, 16, {0x12, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40, 0x47, 0x05, 0x10, 0x27, 0x01, 0x00, 0x01, 0x02} },
+{ 0x1110, 16, {0x00, 0x01, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x03, 0xa0, 0x00, 0x09, 0x04, 0x00, 0x00, 0x02} },
+{ 0x1120, 16, {0xff, 0x00, 0x00, 0x04, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40} },
+{ 0x1130, 16, {0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x26, 0x03, 0x41, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x68, 0x00} },
+{ 0x1140, 16, {0x6f, 0x00, 0x72, 0x00, 0x20, 0x00, 0x43, 0x00, 0x68, 0x00, 0x69, 0x00, 0x70, 0x00, 0x73, 0x00} },
+{ 0x1150, 16, {0x2c, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x28, 0x03, 0x46, 0x00} },
+{ 0x1160, 16, {0x69, 0x00, 0x72, 0x00, 0x6d, 0x00, 0x77, 0x00, 0x61, 0x00, 0x72, 0x00, 0x65, 0x00, 0x20, 0x00} },
+{ 0x1170, 16, {0x46, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x57, 0x00, 0x6f, 0x00, 0x72, 0x00} },
+{ 0x1180, 16, {0x6b, 0x00, 0x73, 0x00, 0x2a, 0x03, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00} },
+{ 0x1190, 16, {0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00} },
+{ 0x11a0, 16, {0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x22, 0x03} },
+{ 0x11b0, 16, {0x49, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x61, 0x00, 0x63, 0x00} },
+{ 0x11c0, 16, {0x65, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00} },
+{ 0x11d0, 2, {0x00, 0x00} },
+{ 0xffff, 0, {0x00} }
+};
+#endif
diff --git a/drivers/usb/serial/xircom_pgs.S b/drivers/usb/serial/xircom_pgs.S
new file mode 100644
index 000000000000..05d99dd63776
--- /dev/null
+++ b/drivers/usb/serial/xircom_pgs.S
@@ -0,0 +1,1192 @@
+/* $Id: loop.s,v 1.23 2000/03/20 09:49:06 warner Exp $
+ *
+ * Firmware for the Keyspan PDA Serial Adapter, a USB serial port based on
+ * the EzUSB microcontroller.
+ *
+ * (C) Copyright 2000 Brian Warner <warner@lothar.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.
+ *
+ * "Keyspan PDA Serial Adapter" is probably a copyright of Keyspan, the
+ * company.
+ *
+ * This serial adapter is basically an EzUSB chip and an RS-232 line driver
+ * in a little widget that has a DB-9 on one end and a USB plug on the other.
+ * It uses the EzUSB's internal UART0 (using the pins from Port C) and timer2
+ * as a baud-rate generator. The wiring is:
+ * PC0/RxD0 <- rxd (DB9 pin 2) PC4 <- dsr pin 6
+ * PC1/TxD0 -> txd pin 3 PC5 <- ri pin 9
+ * PC2 -> rts pin 7 PC6 <- dcd pin 1
+ * PC3 <- cts pin 8 PC7 -> dtr pin 4
+ * PB1 -> line driver standby
+ *
+ * The EzUSB register constants below come from their excellent documentation
+ * and sample code (which used to be available at www.anchorchips.com, but
+ * that has now been absorbed into Cypress' site and the CD-ROM contents
+ * don't appear to be available online anymore). If we get multiple
+ * EzUSB-based drivers into the kernel, it might be useful to pull them out
+ * into a separate .h file.
+ *
+ * THEORY OF OPERATION:
+ *
+ * There are two 256-byte ring buffers, one for tx, one for rx.
+ *
+ * EP2out is pure tx data. When it appears, the data is copied into the tx
+ * ring and serial transmission is started if it wasn't already running. The
+ * "tx buffer empty" interrupt may kick off another character if the ring
+ * still has data. If the host is tx-blocked because the ring filled up,
+ * it will request a "tx unthrottle" interrupt. If sending a serial character
+ * empties the ring below the desired threshold, we set a bit that will send
+ * up the tx unthrottle message as soon as the rx buffer becomes free.
+ *
+ * EP2in (interrupt) is used to send both rx chars and rx status messages
+ * (only "tx unthrottle" at this time) back up to the host. The first byte
+ * of the rx message indicates data (0) or status msg (1). Status messages
+ * are sent before any data.
+ *
+ * Incoming serial characters are put into the rx ring by the serial
+ * interrupt, and the EP2in buffer sent if it wasn't already in transit.
+ * When the EP2in buffer returns, the interrupt prompts us to send more
+ * rx chars (or status messages) if they are pending.
+ *
+ * Device control happens through "vendor specific" control messages on EP0.
+ * All messages are destined for the "Interface" (with the index always 0,
+ * so that if their two-port device might someday use similar firmware, we
+ * can use index=1 to refer to the second port). The messages defined are:
+ *
+ * bRequest = 0 : set baud/bits/parity
+ * 1 : unused
+ * 2 : reserved for setting HW flow control (CTSRTS)
+ * 3 : get/set "modem info" (pin states: DTR, RTS, DCD, RI, etc)
+ * 4 : set break (on/off)
+ * 5 : reserved for requesting interrupts on pin state change
+ * 6 : query buffer room or chars in tx buffer
+ * 7 : request tx unthrottle interrupt
+ *
+ * The host-side driver is set to recognize the device ID values stashed in
+ * serial EEPROM (0x06cd, 0x0103), program this firmware into place, then
+ * start it running. This firmware will use EzUSB's "renumeration" trick by
+ * simulating a bus disconnect, then reconnect with a different device ID
+ * (encoded in the desc_device descriptor below). The host driver then
+ * recognizes the new device ID and glues it to the real serial driver code.
+ *
+ * USEFUL DOCS:
+ * EzUSB Technical Reference Manual: <http://www.anchorchips.com>
+ * 8051 manuals: everywhere, but try www.dalsemi.com because the EzUSB is
+ * basically the Dallas enhanced 8051 code. Remember that the EzUSB IO ports
+ * use totally different registers!
+ * USB 1.1 spec: www.usb.org
+ *
+ * HOW TO BUILD:
+ * gcc -x assembler-with-cpp -P -E -o keyspan_pda.asm keyspan_pda.s
+ * as31 -l keyspan_pda.asm
+ * mv keyspan_pda.obj keyspan_pda.hex
+ * perl ezusb_convert.pl keyspan_pda < keyspan_pda.hex > keyspan_pda_fw.h
+ * Get as31 from <http://www.pjrc.com/tech/8051/index.html>, and hack on it
+ * a bit to make it build.
+ *
+ * THANKS:
+ * Greg Kroah-Hartman, for coordinating the whole usb-serial thing.
+ * AnchorChips, for making such an incredibly useful little microcontroller.
+ * KeySpan, for making a handy, cheap ($40) widget that was so easy to take
+ * apart and trace with an ohmmeter.
+ *
+ * TODO:
+ * lots. grep for TODO. Interrupt safety needs stress-testing. Better flow
+ * control. Interrupting host upon change in DCD, etc, counting transitions.
+ * Need to find a safe device id to use (the one used by the Keyspan firmware
+ * under Windows would be ideal.. can anyone figure out what it is?). Parity.
+ * More baud rates. Oh, and the string-descriptor-length silicon bug
+ * workaround should be implemented, but I'm lazy, and the consequence is
+ * that the device name strings that show up in your kernel log will have
+ * lots of trailing binary garbage in them (appears as ????). Device strings
+ * should be made more accurate.
+ *
+ * Questions, bugs, patches to Brian.
+ *
+ * -Brian Warner <warner@lothar.com>
+ *
+ */
+
+#define HIGH(x) (((x) & 0xff00) / 256)
+#define LOW(x) ((x) & 0xff)
+
+#define dpl1 0x84
+#define dph1 0x85
+#define dps 0x86
+
+;;; our bit assignments
+#define TX_RUNNING 0
+#define DO_TX_UNTHROTTLE 1
+
+ ;; stack from 0x60 to 0x7f: should really set SP to 0x60-1, not 0x60
+#define STACK #0x60-1
+
+#define EXIF 0x91
+#define EIE 0xe8
+ .flag EUSB, EIE.0
+ .flag ES0, IE.4
+
+#define EP0CS #0x7fb4
+#define EP0STALLbit #0x01
+#define IN0BUF #0x7f00
+#define IN0BC #0x7fb5
+#define OUT0BUF #0x7ec0
+#define OUT0BC #0x7fc5
+#define IN2BUF #0x7e00
+#define IN2BC #0x7fb9
+#define IN2CS #0x7fb8
+#define OUT2BC #0x7fc9
+#define OUT2CS #0x7fc8
+#define OUT2BUF #0x7dc0
+#define IN4BUF #0x7d00
+#define IN4BC #0x7fbd
+#define IN4CS #0x7fbc
+#define OEB #0x7f9d
+#define OUTB #0x7f97
+#define OEC #0x7f9e
+#define OUTC #0x7f98
+#define PINSC #0x7f9b
+#define PORTBCFG #0x7f94
+#define PORTCCFG #0x7f95
+#define OEA #0x7f9c
+#define IN07IRQ #0x7fa9
+#define OUT07IRQ #0x7faa
+#define IN07IEN #0x7fac
+#define OUT07IEN #0x7fad
+#define USBIRQ #0x7fab
+#define USBIEN #0x7fae
+#define USBBAV #0x7faf
+#define USBCS #0x7fd6
+#define SUDPTRH #0x7fd4
+#define SUDPTRL #0x7fd5
+#define SETUPDAT #0x7fe8
+
+ ;; usb interrupt : enable is EIE.0 (0xe8), flag is EXIF.4 (0x91)
+
+ .org 0
+ ljmp start
+ ;; interrupt vectors
+ .org 23H
+ ljmp serial_int
+ .byte 0
+
+ .org 43H
+ ljmp USB_Jump_Table
+ .byte 0 ; filled in by the USB core
+
+;;; local variables. These are not initialized properly: do it by hand.
+ .org 30H
+rx_ring_in: .byte 0
+rx_ring_out: .byte 0
+tx_ring_in: .byte 0
+tx_ring_out: .byte 0
+tx_unthrottle_threshold: .byte 0
+
+ .org 0x100H ; wants to be on a page boundary
+USB_Jump_Table:
+ ljmp ISR_Sudav ; Setup Data Available
+ .byte 0
+ ljmp 0 ; Start of Frame
+ .byte 0
+ ljmp 0 ; Setup Data Loading
+ .byte 0
+ ljmp 0 ; Global Suspend
+ .byte 0
+ ljmp 0 ; USB Reset
+ .byte 0
+ ljmp 0 ; Reserved
+ .byte 0
+ ljmp 0 ; End Point 0 In
+ .byte 0
+ ljmp 0 ; End Point 0 Out
+ .byte 0
+ ljmp 0 ; End Point 1 In
+ .byte 0
+ ljmp 0 ; End Point 1 Out
+ .byte 0
+ ljmp ISR_Ep2in
+ .byte 0
+ ljmp ISR_Ep2out
+ .byte 0
+
+
+ .org 0x200
+
+start: mov SP,STACK-1 ; set stack
+ ;; clear local variables
+ clr a
+ mov tx_ring_in, a
+ mov tx_ring_out, a
+ mov rx_ring_in, a
+ mov rx_ring_out, a
+ mov tx_unthrottle_threshold, a
+ clr TX_RUNNING
+ clr DO_TX_UNTHROTTLE
+
+ ;; clear fifo with "fe"
+ mov r1, 0
+ mov a, #0xfe
+ mov dptr, #tx_ring
+clear_tx_ring_loop:
+ movx @dptr, a
+ inc dptr
+ djnz r1, clear_tx_ring_loop
+
+ mov a, #0xfd
+ mov dptr, #rx_ring
+clear_rx_ring_loop:
+ movx @dptr, a
+ inc dptr
+ djnz r1, clear_rx_ring_loop
+
+;;; turn on the RS-232 driver chip (bring the STANDBY pin low)
+;;; on Xircom the STANDBY is wired to PB6 and PC4
+ mov dptr, PORTBCFG
+ mov a, #0xBf
+ movx @dptr, a
+ mov dptr, PORTCCFG
+ mov a, #0xef
+ movx @dptr, a
+
+ ;; set OEC.4
+ mov a, #0x10
+ mov dptr,OEC
+ movx @dptr,a
+
+ ;; clear PC4
+ mov a, #0x00
+ mov dptr,OUTC
+ movx @dptr,a
+
+ ;; set OEB.6
+ mov a, #0x40
+ mov dptr,OEB
+ movx @dptr,a
+
+ ;; clear PB6
+ mov a, #0x00
+ mov dptr,OUTB
+ movx @dptr,a
+
+ ;; set OEC.[17]
+ mov a, #0x82
+ mov dptr,OEC
+ movx @dptr,a
+
+
+ ;; set PORTCCFG.[01] to route TxD0,RxD0 to serial port
+ mov dptr, PORTCCFG
+ mov a, #0x03
+ movx @dptr, a
+
+ ;; set up interrupts, autovectoring
+ ;; set BKPT
+ mov dptr, USBBAV
+ movx a,@dptr
+ setb acc.0 ; AVEN bit to 0
+ movx @dptr, a
+
+ mov a,#0x01 ; enable SUDAV: setup data available (for ep0)
+ mov dptr, USBIRQ
+ movx @dptr, a ; clear SUDAVI
+ mov dptr, USBIEN
+ movx @dptr, a
+
+ mov dptr, IN07IEN
+ mov a,#0x04 ; enable IN2 int
+ movx @dptr, a
+
+ mov dptr, OUT07IEN
+ mov a,#0x04 ; enable OUT2 int
+ movx @dptr, a
+ mov dptr, OUT2BC
+ movx @dptr, a ; arm OUT2
+
+;; mov a, #0x84 ; turn on RTS, DTR
+;; mov dptr,OUTC
+;; movx @dptr, a
+
+ mov a, #0x7 ; turn on DTR
+ mov dptr,USBBAV
+ movx @dptr, a
+
+ mov a, #0x20 ; turn on the RED led
+ mov dptr,OEA
+ movx @dptr, a
+
+ mov a, #0x80 ; turn on RTS
+ mov dptr,OUTC
+ movx @dptr, a
+
+ ;; setup the serial port. 9600 8N1.
+ mov a,#0x53 ; mode 1, enable rx, clear int
+ mov SCON, a
+ ;; using timer2, in 16-bit baud-rate-generator mode
+ ;; (xtal 12MHz, internal fosc 24MHz)
+ ;; RCAP2H,RCAP2L = 65536 - fosc/(32*baud)
+ ;; 57600: 0xFFF2.F, say 0xFFF3
+ ;; 9600: 0xFFB1.E, say 0xFFB2
+ ;; 300: 0xF63C
+#define BAUD 9600
+#define BAUD_TIMEOUT(rate) (65536 - (24 * 1000 * 1000) / (32 * rate))
+#define BAUD_HIGH(rate) HIGH(BAUD_TIMEOUT(rate))
+#define BAUD_LOW(rate) LOW(BAUD_TIMEOUT(rate))
+
+ mov T2CON, #030h ; rclk=1,tclk=1,cp=0,tr2=0(enable later)
+ mov r3, #5
+ acall set_baud
+ setb TR2
+ mov SCON, #050h
+
+#if 0
+ mov r1, #0x40
+ mov a, #0x41
+send:
+ mov SBUF, a
+ inc a
+ anl a, #0x3F
+ orl a, #0x40
+; xrl a, #0x02
+wait1:
+ jnb TI, wait1
+ clr TI
+ djnz r1, send
+;done: sjmp done
+
+#endif
+
+ setb EUSB
+ setb EA
+ setb ES0
+ ;acall dump_stat
+
+ ;; hey, what say we RENUMERATE! (TRM p.62)
+ mov a, #0
+ mov dps, a
+ mov dptr, USBCS
+ mov a, #0x02 ; DISCON=0, DISCOE=0, RENUM=1
+ movx @dptr, a
+ ;; now presence pin is floating, simulating disconnect. wait 0.5s
+ mov r1, #46
+renum_wait1:
+ mov r2, #0
+renum_wait2:
+ mov r3, #0
+renum_wait3:
+ djnz r3, renum_wait3
+ djnz r2, renum_wait2
+ djnz r1, renum_wait1 ; wait about n*(256^2) 6MHz clocks
+ mov a, #0x06 ; DISCON=0, DISCOE=1, RENUM=1
+ movx @dptr, a
+ ;; we are back online. the host device will now re-query us
+
+
+main: sjmp main
+
+
+
+ISR_Sudav:
+ push dps
+ push dpl
+ push dph
+ push dpl1
+ push dph1
+ push acc
+ mov a,EXIF
+ clr acc.4
+ mov EXIF,a ; clear INT2 first
+ mov dptr, USBIRQ ; clear USB int
+ mov a,#01h
+ movx @dptr,a
+
+ ;; get request type
+ mov dptr, SETUPDAT
+ movx a, @dptr
+ mov r1, a ; r1 = bmRequestType
+ inc dptr
+ movx a, @dptr
+ mov r2, a ; r2 = bRequest
+ inc dptr
+ movx a, @dptr
+ mov r3, a ; r3 = wValueL
+ inc dptr
+ movx a, @dptr
+ mov r4, a ; r4 = wValueH
+
+ ;; main switch on bmRequest.type: standard or vendor
+ mov a, r1
+ anl a, #0x60
+ cjne a, #0x00, setup_bmreq_type_not_standard
+ ;; standard request: now main switch is on bRequest
+ ljmp setup_bmreq_is_standard
+
+setup_bmreq_type_not_standard:
+ ;; a still has bmreq&0x60
+ cjne a, #0x40, setup_bmreq_type_not_vendor
+ ;; Anchor reserves bRequest 0xa0-0xaf, we use small ones
+ ;; switch on bRequest. bmRequest will always be 0x41 or 0xc1
+ cjne r2, #0x00, setup_ctrl_not_00
+ ;; 00 is set baud, wValue[0] has baud rate index
+ lcall set_baud ; index in r3, carry set if error
+ jc setup_bmreq_type_not_standard__do_stall
+ ljmp setup_done_ack
+setup_bmreq_type_not_standard__do_stall:
+ ljmp setup_stall
+setup_ctrl_not_00:
+ cjne r2, #0x01, setup_ctrl_not_01
+ ;; 01 is reserved for set bits (parity). TODO
+ ljmp setup_stall
+setup_ctrl_not_01:
+ cjne r2, #0x02, setup_ctrl_not_02
+ ;; 02 is set HW flow control. TODO
+ ljmp setup_stall
+setup_ctrl_not_02:
+ cjne r2, #0x03, setup_ctrl_not_03
+ ;; 03 is control pins (RTS, DTR).
+ ljmp control_pins ; will jump to setup_done_ack,
+ ; or setup_return_one_byte
+setup_ctrl_not_03:
+ cjne r2, #0x04, setup_ctrl_not_04
+ ;; 04 is send break (really "turn break on/off"). TODO
+ cjne r3, #0x00, setup_ctrl_do_break_on
+ ;; do break off: restore PORTCCFG.1 to reconnect TxD0 to serial port
+ mov dptr, PORTCCFG
+ movx a, @dptr
+ orl a, #0x02
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_ctrl_do_break_on:
+ ;; do break on: clear PORTCCFG.0, set TxD high(?) (b1 low)
+ mov dptr, OUTC
+ movx a, @dptr
+ anl a, #0xfd ; ~0x02
+ movx @dptr, a
+ mov dptr, PORTCCFG
+ movx a, @dptr
+ anl a, #0xfd ; ~0x02
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_ctrl_not_04:
+ cjne r2, #0x05, setup_ctrl_not_05
+ ;; 05 is set desired interrupt bitmap. TODO
+ ljmp setup_stall
+setup_ctrl_not_05:
+ cjne r2, #0x06, setup_ctrl_not_06
+ ;; 06 is query room
+ cjne r3, #0x00, setup_ctrl_06_not_00
+ ;; 06, wValue[0]=0 is query write_room
+ mov a, tx_ring_out
+ setb c
+ subb a, tx_ring_in ; out-1-in = 255 - (in-out)
+ ljmp setup_return_one_byte
+setup_ctrl_06_not_00:
+ cjne r3, #0x01, setup_ctrl_06_not_01
+ ;; 06, wValue[0]=1 is query chars_in_buffer
+ mov a, tx_ring_in
+ clr c
+ subb a, tx_ring_out ; in-out
+ ljmp setup_return_one_byte
+setup_ctrl_06_not_01:
+ ljmp setup_stall
+setup_ctrl_not_06:
+ cjne r2, #0x07, setup_ctrl_not_07
+ ;; 07 is request tx unthrottle interrupt
+ mov tx_unthrottle_threshold, r3; wValue[0] is threshold value
+ ljmp setup_done_ack
+setup_ctrl_not_07:
+ ljmp setup_stall
+
+setup_bmreq_type_not_vendor:
+ ljmp setup_stall
+
+
+setup_bmreq_is_standard:
+ cjne r2, #0x00, setup_breq_not_00
+ ;; 00: Get_Status (sub-switch on bmRequestType: device, ep, int)
+ cjne r1, #0x80, setup_Get_Status_not_device
+ ;; Get_Status(device)
+ ;; are we self-powered? no. can we do remote wakeup? no
+ ;; so return two zero bytes. This is reusable
+setup_return_two_zero_bytes:
+ mov dptr, IN0BUF
+ clr a
+ movx @dptr, a
+ inc dptr
+ movx @dptr, a
+ mov dptr, IN0BC
+ mov a, #2
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_Get_Status_not_device:
+ cjne r1, #0x82, setup_Get_Status_not_endpoint
+ ;; Get_Status(endpoint)
+ ;; must get stall bit for ep[wIndexL], return two bytes, bit in lsb 0
+ ;; for now: cheat. TODO
+ sjmp setup_return_two_zero_bytes
+setup_Get_Status_not_endpoint:
+ cjne r1, #0x81, setup_Get_Status_not_interface
+ ;; Get_Status(interface): return two zeros
+ sjmp setup_return_two_zero_bytes
+setup_Get_Status_not_interface:
+ ljmp setup_stall
+
+setup_breq_not_00:
+ cjne r2, #0x01, setup_breq_not_01
+ ;; 01: Clear_Feature (sub-switch on wValueL: stall, remote wakeup)
+ cjne r3, #0x00, setup_Clear_Feature_not_stall
+ ;; Clear_Feature(stall). should clear a stall bit. TODO
+ ljmp setup_stall
+setup_Clear_Feature_not_stall:
+ cjne r3, #0x01, setup_Clear_Feature_not_rwake
+ ;; Clear_Feature(remote wakeup). ignored.
+ ljmp setup_done_ack
+setup_Clear_Feature_not_rwake:
+ ljmp setup_stall
+
+setup_breq_not_01:
+ cjne r2, #0x03, setup_breq_not_03
+ ;; 03: Set_Feature (sub-switch on wValueL: stall, remote wakeup)
+ cjne r3, #0x00, setup_Set_Feature_not_stall
+ ;; Set_Feature(stall). Should set a stall bit. TODO
+ ljmp setup_stall
+setup_Set_Feature_not_stall:
+ cjne r3, #0x01, setup_Set_Feature_not_rwake
+ ;; Set_Feature(remote wakeup). ignored.
+ ljmp setup_done_ack
+setup_Set_Feature_not_rwake:
+ ljmp setup_stall
+
+setup_breq_not_03:
+ cjne r2, #0x06, setup_breq_not_06
+ ;; 06: Get_Descriptor (s-switch on wValueH: dev, config[n], string[n])
+ cjne r4, #0x01, setup_Get_Descriptor_not_device
+ ;; Get_Descriptor(device)
+ mov dptr, SUDPTRH
+ mov a, #HIGH(desc_device)
+ movx @dptr, a
+ mov dptr, SUDPTRL
+ mov a, #LOW(desc_device)
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_Get_Descriptor_not_device:
+ cjne r4, #0x02, setup_Get_Descriptor_not_config
+ ;; Get_Descriptor(config[n])
+ cjne r3, #0x00, setup_stall; only handle n==0
+ ;; Get_Descriptor(config[0])
+ mov dptr, SUDPTRH
+ mov a, #HIGH(desc_config1)
+ movx @dptr, a
+ mov dptr, SUDPTRL
+ mov a, #LOW(desc_config1)
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_Get_Descriptor_not_config:
+ cjne r4, #0x03, setup_Get_Descriptor_not_string
+ ;; Get_Descriptor(string[wValueL])
+ ;; if (wValueL >= maxstrings) stall
+ mov a, #((desc_strings_end-desc_strings)/2)
+ clr c
+ subb a,r3 ; a=4, r3 = 0..3 . if a<=0 then stall
+ jc setup_stall
+ jz setup_stall
+ mov a, r3
+ add a, r3 ; a = 2*wValueL
+ mov dptr, #desc_strings
+ add a, dpl
+ mov dpl, a
+ mov a, #0
+ addc a, dph
+ mov dph, a ; dph = desc_strings[a]. big endian! (handy)
+ ;; it looks like my adapter uses a revision of the EZUSB that
+ ;; contains "rev D errata number 8", as hinted in the EzUSB example
+ ;; code. I cannot find an actual errata description on the Cypress
+ ;; web site, but from the example code it looks like this bug causes
+ ;; the length of string descriptors to be read incorrectly, possibly
+ ;; sending back more characters than the descriptor has. The workaround
+ ;; is to manually send out all of the data. The consequence of not
+ ;; using the workaround is that the strings gathered by the kernel
+ ;; driver are too long and are filled with trailing garbage (including
+ ;; leftover strings). Writing this out by hand is a nuisance, so for
+ ;; now I will just live with the bug.
+ movx a, @dptr
+ mov r1, a
+ inc dptr
+ movx a, @dptr
+ mov r2, a
+ mov dptr, SUDPTRH
+ mov a, r1
+ movx @dptr, a
+ mov dptr, SUDPTRL
+ mov a, r2
+ movx @dptr, a
+ ;; done
+ ljmp setup_done_ack
+
+setup_Get_Descriptor_not_string:
+ ljmp setup_stall
+
+setup_breq_not_06:
+ cjne r2, #0x08, setup_breq_not_08
+ ;; Get_Configuration. always 1. return one byte.
+ ;; this is reusable
+ mov a, #1
+setup_return_one_byte:
+ mov dptr, IN0BUF
+ movx @dptr, a
+ mov a, #1
+ mov dptr, IN0BC
+ movx @dptr, a
+ ljmp setup_done_ack
+setup_breq_not_08:
+ cjne r2, #0x09, setup_breq_not_09
+ ;; 09: Set_Configuration. ignored.
+ ljmp setup_done_ack
+setup_breq_not_09:
+ cjne r2, #0x0a, setup_breq_not_0a
+ ;; 0a: Get_Interface. get the current altsetting for int[wIndexL]
+ ;; since we only have one interface, ignore wIndexL, return a 0
+ mov a, #0
+ ljmp setup_return_one_byte
+setup_breq_not_0a:
+ cjne r2, #0x0b, setup_breq_not_0b
+ ;; 0b: Set_Interface. set altsetting for interface[wIndexL]. ignored
+ ljmp setup_done_ack
+setup_breq_not_0b:
+ ljmp setup_stall
+
+
+setup_done_ack:
+ ;; now clear HSNAK
+ mov dptr, EP0CS
+ mov a, #0x02
+ movx @dptr, a
+ sjmp setup_done
+setup_stall:
+ ;; unhandled. STALL
+ ;EP0CS |= bmEPSTALL
+ mov dptr, EP0CS
+ movx a, @dptr
+ orl a, EP0STALLbit
+ movx @dptr, a
+ sjmp setup_done
+
+setup_done:
+ pop acc
+ pop dph1
+ pop dpl1
+ pop dph
+ pop dpl
+ pop dps
+ reti
+
+;;; ==============================================================
+
+set_baud: ; baud index in r3
+ ;; verify a < 10
+ mov a, r3
+ jb ACC.7, set_baud__badbaud
+ clr c
+ subb a, #10
+ jnc set_baud__badbaud
+ mov a, r3
+ rl a ; a = index*2
+ add a, #LOW(baud_table)
+ mov dpl, a
+ mov a, #HIGH(baud_table)
+ addc a, #0
+ mov dph, a
+ ;; TODO: shut down xmit/receive
+ ;; TODO: wait for current xmit char to leave
+ ;; TODO: shut down timer to avoid partial-char glitch
+ movx a,@dptr ; BAUD_HIGH
+ mov RCAP2H, a
+ mov TH2, a
+ inc dptr
+ movx a,@dptr ; BAUD_LOW
+ mov RCAP2L, a
+ mov TL2, a
+ ;; TODO: restart xmit/receive
+ ;; TODO: reenable interrupts, resume tx if pending
+ clr c ; c=0: success
+ ret
+set_baud__badbaud:
+ setb c ; c=1: failure
+ ret
+
+;;; ==================================================
+control_pins:
+ cjne r1, #0x41, control_pins_in
+control_pins_out:
+ ;TODO BKPT is DTR
+ mov a, r3 ; wValue[0] holds new bits: b7 is new RTS
+ xrl a, #0xff ; 1 means active, 0V, +12V ?
+ anl a, #0x80
+ mov r3, a
+ mov dptr, OUTC
+ movx a, @dptr ; only change bit 7
+ anl a, #0x7F ; ~0x84
+ orl a, r3
+ movx @dptr, a ; other pins are inputs, bits ignored
+ ljmp setup_done_ack
+control_pins_in:
+ mov dptr, PINSC
+ movx a, @dptr
+ xrl a, #0xff
+ ljmp setup_return_one_byte
+
+;;; ========================================
+
+ISR_Ep2in:
+ push dps
+ push dpl
+ push dph
+ push dpl1
+ push dph1
+ push acc
+ mov a,EXIF
+ clr acc.4
+ mov EXIF,a ; clear INT2 first
+ mov dptr, IN07IRQ ; clear USB int
+ mov a,#04h
+ movx @dptr,a
+
+ mov a, #0x20 ; Turn off the green LED
+ mov dptr,OEA
+ movx @dptr, a
+
+
+ ;; do stuff
+ lcall start_in
+
+ mov a, #0x20 ; Turn off the green LED
+ mov dptr,OEA
+ movx @dptr, a
+
+
+
+ pop acc
+ pop dph1
+ pop dpl1
+ pop dph
+ pop dpl
+ pop dps
+ reti
+
+ISR_Ep2out:
+ push dps
+ push dpl
+ push dph
+ push dpl1
+ push dph1
+ push acc
+
+ mov a, #0x10 ; Turn the green LED
+ mov dptr,OEA
+ movx @dptr, a
+
+
+
+ mov a,EXIF
+ clr acc.4
+ mov EXIF,a ; clear INT2 first
+ mov dptr, OUT07IRQ ; clear USB int
+ mov a,#04h
+ movx @dptr,a
+
+ ;; do stuff
+
+ ;; copy data into buffer. for now, assume we will have enough space
+ mov dptr, OUT2BC ; get byte count
+ movx a,@dptr
+ mov r1, a
+ clr a
+ mov dps, a
+ mov dptr, OUT2BUF ; load DPTR0 with source
+ mov dph1, #HIGH(tx_ring) ; load DPTR1 with target
+ mov dpl1, tx_ring_in
+OUT_loop:
+ movx a,@dptr ; read
+ inc dps ; switch to DPTR1: target
+ inc dpl1 ; target = tx_ring_in+1
+ movx @dptr,a ; store
+ mov a,dpl1
+ cjne a, tx_ring_out, OUT_no_overflow
+ sjmp OUT_overflow
+OUT_no_overflow:
+ inc tx_ring_in ; tx_ring_in++
+ inc dps ; switch to DPTR0: source
+ inc dptr
+ djnz r1, OUT_loop
+ sjmp OUT_done
+OUT_overflow:
+ ;; signal overflow
+ ;; fall through
+OUT_done:
+ ;; ack
+ mov dptr,OUT2BC
+ movx @dptr,a
+
+ ;; start tx
+ acall maybe_start_tx
+ ;acall dump_stat
+
+ mov a, #0x20 ; Turn off the green LED
+ mov dptr,OEA
+ movx @dptr, a
+
+ pop acc
+ pop dph1
+ pop dpl1
+ pop dph
+ pop dpl
+ pop dps
+ reti
+
+dump_stat:
+ ;; fill in EP4in with a debugging message:
+ ;; tx_ring_in, tx_ring_out, rx_ring_in, rx_ring_out
+ ;; tx_active
+ ;; tx_ring[0..15]
+ ;; 0xfc
+ ;; rx_ring[0..15]
+ clr a
+ mov dps, a
+
+ mov dptr, IN4CS
+ movx a, @dptr
+ jb acc.1, dump_stat__done; busy: cannot dump, old one still pending
+ mov dptr, IN4BUF
+
+ mov a, tx_ring_in
+ movx @dptr, a
+ inc dptr
+ mov a, tx_ring_out
+ movx @dptr, a
+ inc dptr
+
+ mov a, rx_ring_in
+ movx @dptr, a
+ inc dptr
+ mov a, rx_ring_out
+ movx @dptr, a
+ inc dptr
+
+ clr a
+ jnb TX_RUNNING, dump_stat__no_tx_running
+ inc a
+dump_stat__no_tx_running:
+ movx @dptr, a
+ inc dptr
+ ;; tx_ring[0..15]
+ inc dps
+ mov dptr, #tx_ring ; DPTR1: source
+ mov r1, #16
+dump_stat__tx_ring_loop:
+ movx a, @dptr
+ inc dptr
+ inc dps
+ movx @dptr, a
+ inc dptr
+ inc dps
+ djnz r1, dump_stat__tx_ring_loop
+ inc dps
+
+ mov a, #0xfc
+ movx @dptr, a
+ inc dptr
+
+ ;; rx_ring[0..15]
+ inc dps
+ mov dptr, #rx_ring ; DPTR1: source
+ mov r1, #16
+dump_stat__rx_ring_loop:
+ movx a, @dptr
+ inc dptr
+ inc dps
+ movx @dptr, a
+ inc dptr
+ inc dps
+ djnz r1, dump_stat__rx_ring_loop
+
+ ;; now send it
+ clr a
+ mov dps, a
+ mov dptr, IN4BC
+ mov a, #38
+ movx @dptr, a
+dump_stat__done:
+ ret
+
+;;; ============================================================
+
+maybe_start_tx:
+ ;; make sure the tx process is running.
+ jb TX_RUNNING, start_tx_done
+start_tx:
+ ;; is there work to be done?
+ mov a, tx_ring_in
+ cjne a,tx_ring_out, start_tx__work
+ ret ; no work
+start_tx__work:
+ ;; tx was not running. send the first character, setup the TI int
+ inc tx_ring_out ; [++tx_ring_out]
+ mov dph, #HIGH(tx_ring)
+ mov dpl, tx_ring_out
+ movx a, @dptr
+ mov sbuf, a
+ setb TX_RUNNING
+start_tx_done:
+ ;; can we unthrottle the host tx process?
+ ;; step 1: do we care?
+ mov a, #0
+ cjne a, tx_unthrottle_threshold, start_tx__maybe_unthrottle_tx
+ ;; nope
+start_tx_really_done:
+ ret
+start_tx__maybe_unthrottle_tx:
+ ;; step 2: is there now room?
+ mov a, tx_ring_out
+ setb c
+ subb a, tx_ring_in
+ ;; a is now write_room. If thresh >= a, we can unthrottle
+ clr c
+ subb a, tx_unthrottle_threshold
+ jc start_tx_really_done ; nope
+ ;; yes, we can unthrottle. remove the threshold and mark a request
+ mov tx_unthrottle_threshold, #0
+ setb DO_TX_UNTHROTTLE
+ ;; prod rx, which will actually send the message when in2 becomes free
+ ljmp start_in
+
+
+serial_int:
+ push dps
+ push dpl
+ push dph
+ push dpl1
+ push dph1
+ push acc
+ jnb TI, serial_int__not_tx
+ ;; tx finished. send another character if we have one
+ clr TI ; clear int
+ clr TX_RUNNING
+ lcall start_tx
+serial_int__not_tx:
+ jnb RI, serial_int__not_rx
+ lcall get_rx_char
+ clr RI ; clear int
+serial_int__not_rx:
+ ;; return
+ pop acc
+ pop dph1
+ pop dpl1
+ pop dph
+ pop dpl
+ pop dps
+ reti
+
+get_rx_char:
+ mov dph, #HIGH(rx_ring)
+ mov dpl, rx_ring_in
+ inc dpl ; target = rx_ring_in+1
+ mov a, sbuf
+ movx @dptr, a
+ ;; check for overflow before incrementing rx_ring_in
+ mov a, dpl
+ cjne a, rx_ring_out, get_rx_char__no_overflow
+ ;; signal overflow
+ ret
+get_rx_char__no_overflow:
+ inc rx_ring_in
+ ;; kick off USB INpipe
+ acall start_in
+ ret
+
+start_in:
+ ;; check if the inpipe is already running.
+ mov a,#0x10
+ mov dptr, OEA
+ movx @dptr,a
+
+ mov dptr, IN2CS
+ movx a, @dptr
+ jb acc.1, start_in__done; int will handle it
+ jb DO_TX_UNTHROTTLE, start_in__do_tx_unthrottle
+ ;; see if there is any work to do. a serial interrupt might occur
+ ;; during this sequence?
+ mov a, rx_ring_in
+ cjne a, rx_ring_out, start_in__have_work
+ ret ; nope
+start_in__have_work:
+ ;; now copy as much data as possible into the pipe. 63 bytes max.
+ clr a
+ mov dps, a
+ mov dph, #HIGH(rx_ring) ; load DPTR0 with source
+ inc dps
+ mov dptr, IN2BUF ; load DPTR1 with target
+ movx @dptr, a ; in[0] signals that rest of IN is rx data
+ inc dptr
+ inc dps
+ ;; loop until we run out of data, or we have copied 64 bytes
+ mov r1, #1 ; INbuf size counter
+start_in__loop:
+ mov a, rx_ring_in
+ cjne a, rx_ring_out, start_inlocal_irq_enablell_copying
+ sjmp start_in__kick
+start_inlocal_irq_enablell_copying:
+ inc rx_ring_out
+ mov dpl, rx_ring_out
+ movx a, @dptr
+ inc dps
+ movx @dptr, a ; write into IN buffer
+ inc dptr
+ inc dps
+ inc r1
+ cjne r1, #64, start_in__loop; loop
+start_in__kick:
+ ;; either we ran out of data, or we copied 64 bytes. r1 has byte count
+ ;; kick off IN
+ mov a, #0x10 ; Turn the green LED
+ mov dptr,OEA
+ movx @dptr, a
+ mov dptr, IN2BC
+ mov a, r1
+ jz start_in__done
+ movx @dptr, a
+ ;; done
+start_in__done:
+ ;acall dump_stat
+ ret
+start_in__do_tx_unthrottle:
+ ;; special sequence: send a tx unthrottle message
+ clr DO_TX_UNTHROTTLE
+ clr a
+ mov dps, a
+ mov dptr, IN2BUF
+ mov a, #1
+ movx @dptr, a
+ inc dptr
+ mov a, #2
+ movx @dptr, a
+ mov dptr, IN2BC
+ movx @dptr, a
+ ret
+
+putchar:
+ clr TI
+ mov SBUF, a
+putchar_wait:
+ jnb TI, putchar_wait
+ clr TI
+ ret
+
+
+baud_table: ; baud_high, then baud_low
+ ;; baud[0]: 110
+ .byte BAUD_HIGH(110)
+ .byte BAUD_LOW(110)
+ ;; baud[1]: 300
+ .byte BAUD_HIGH(300)
+ .byte BAUD_LOW(300)
+ ;; baud[2]: 1200
+ .byte BAUD_HIGH(1200)
+ .byte BAUD_LOW(1200)
+ ;; baud[3]: 2400
+ .byte BAUD_HIGH(2400)
+ .byte BAUD_LOW(2400)
+ ;; baud[4]: 4800
+ .byte BAUD_HIGH(4800)
+ .byte BAUD_LOW(4800)
+ ;; baud[5]: 9600
+ .byte BAUD_HIGH(9600)
+ .byte BAUD_LOW(9600)
+ ;; baud[6]: 19200
+ .byte BAUD_HIGH(19200)
+ .byte BAUD_LOW(19200)
+ ;; baud[7]: 38400
+ .byte BAUD_HIGH(38400)
+ .byte BAUD_LOW(38400)
+ ;; baud[8]: 57600
+ .byte BAUD_HIGH(57600)
+ .byte BAUD_LOW(57600)
+ ;; baud[9]: 115200
+ .byte BAUD_HIGH(115200)
+ .byte BAUD_LOW(115200)
+
+desc_device:
+ .byte 0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40
+ .byte 0xcd, 0x06, 0x04, 0x01, 0x89, 0xab, 1, 2, 3, 0x01
+;;; The "real" device id, which must match the host driver, is that
+;;; "0xcd 0x06 0x04 0x01" sequence, which is 0x06cd, 0x0104
+
+desc_config1:
+ .byte 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32
+ .byte 0x09, 0x04, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 0x00
+ .byte 0x07, 0x05, 0x82, 0x03, 0x40, 0x00, 0x01
+ .byte 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00
+
+desc_strings:
+ .word string_langids, string_mfg, string_product, string_serial
+desc_strings_end:
+
+string_langids: .byte string_langids_end-string_langids
+ .byte 3
+ .word 0
+string_langids_end:
+
+ ;; sigh. These strings are Unicode, meaning UTF16? 2 bytes each. Now
+ ;; *that* is a pain in the ass to encode. And they are little-endian
+ ;; too. Use this perl snippet to get the bytecodes:
+ /* while (<>) {
+ @c = split(//);
+ foreach $c (@c) {
+ printf("0x%02x, 0x00, ", ord($c));
+ }
+ }
+ */
+
+string_mfg: .byte string_mfg_end-string_mfg
+ .byte 3
+; .byte "ACME usb widgets"
+ .byte 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x75, 0x00, 0x73, 0x00, 0x62, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00, 0x73, 0x00
+string_mfg_end:
+
+string_product: .byte string_product_end-string_product
+ .byte 3
+; .byte "ACME USB serial widget"
+ .byte 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53, 0x00, 0x42, 0x00, 0x20, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00
+string_product_end:
+
+string_serial: .byte string_serial_end-string_serial
+ .byte 3
+; .byte "47"
+ .byte 0x34, 0x00, 0x37, 0x00
+string_serial_end:
+
+;;; ring buffer memory
+ ;; tx_ring_in+1 is where the next input byte will go
+ ;; [tx_ring_out] has been sent
+ ;; if tx_ring_in == tx_ring_out, theres no work to do
+ ;; there are (tx_ring_in - tx_ring_out) chars to be written
+ ;; dont let _in lap _out
+ ;; cannot inc if tx_ring_in+1 == tx_ring_out
+ ;; write [tx_ring_in+1] then tx_ring_in++
+ ;; if (tx_ring_in+1 == tx_ring_out), overflow
+ ;; else tx_ring_in++
+ ;; read/send [tx_ring_out+1], then tx_ring_out++
+
+ ;; rx_ring_in works the same way
+
+ .org 0x1000
+tx_ring:
+ .skip 0x100 ; 256 bytes
+rx_ring:
+ .skip 0x100 ; 256 bytes
+
+
+ .END
+
diff --git a/drivers/usb/serial/xircom_pgs_fw.h b/drivers/usb/serial/xircom_pgs_fw.h
new file mode 100644
index 000000000000..3ff74a6d71a9
--- /dev/null
+++ b/drivers/usb/serial/xircom_pgs_fw.h
@@ -0,0 +1,103 @@
+/*
+ * USB Xircom PGS Firmware
+ *
+ * Copyright (C) 1999, 2000 Brian Warner <warner@lothar.com>
+ * Copyright (C) 2001 Cristian M. Craciunescu <cristi@dnt.ro>
+ *
+ * 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.
+ *
+ * Generated from xircom_pgs.S by ezusb_convert_x.pl
+ */
+
+static const struct ezusb_hex_record xircom_pgs_firmware[] = {
+{ 0x0000, 3, {0x02, 0x02, 0x00} },
+{ 0x0023, 4, {0x02, 0x05, 0x9b, 0x00} },
+{ 0x0030, 5, {0x00, 0x00, 0x00, 0x00, 0x00} },
+{ 0x0043, 4, {0x02, 0x01, 0x00, 0x00} },
+{ 0x0100, 16, {0x02, 0x02, 0xba, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00} },
+{ 0x0110, 16, {0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00} },
+{ 0x0120, 16, {0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x04, 0x85, 0x00, 0x02, 0x04, 0xb9, 0x00} },
+{ 0x0200, 16, {0x75, 0x81, 0x5e, 0xe4, 0xf5, 0x32, 0xf5, 0x33, 0xf5, 0x30, 0xf5, 0x31, 0xf5, 0x34, 0xc2, 0x00} },
+{ 0x0210, 16, {0xc2, 0x01, 0xa9, 0x00, 0x74, 0xfe, 0x90, 0x10, 0x00, 0xf0, 0xa3, 0xd9, 0xfc, 0x74, 0xfd, 0x90} },
+{ 0x0220, 16, {0x11, 0x00, 0xf0, 0xa3, 0xd9, 0xfc, 0x90, 0x7f, 0x94, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x95, 0x74} },
+{ 0x0230, 16, {0xef, 0xf0, 0x74, 0x10, 0x90, 0x7f, 0x9e, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0x98, 0xf0, 0x74, 0x40} },
+{ 0x0240, 16, {0x90, 0x7f, 0x9d, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0x97, 0xf0, 0x74, 0x82, 0x90, 0x7f, 0x9e, 0xf0} },
+{ 0x0250, 16, {0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f, 0xaf, 0xe0, 0xd2, 0xe0, 0xf0, 0x74, 0x01, 0x90} },
+{ 0x0260, 16, {0x7f, 0xab, 0xf0, 0x90, 0x7f, 0xae, 0xf0, 0x90, 0x7f, 0xac, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xad} },
+{ 0x0270, 16, {0x74, 0x04, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x74, 0x07, 0x90, 0x7f, 0xaf, 0xf0, 0x74, 0x20, 0x90} },
+{ 0x0280, 16, {0x7f, 0x9c, 0xf0, 0x74, 0x80, 0x90, 0x7f, 0x98, 0xf0, 0x74, 0x53, 0xf5, 0x98, 0x75, 0xc8, 0x30} },
+{ 0x0290, 16, {0x7b, 0x05, 0x91, 0x44, 0xd2, 0xca, 0x75, 0x98, 0x50, 0xd2, 0xe8, 0xd2, 0xaf, 0xd2, 0xac, 0x74} },
+{ 0x02a0, 16, {0x00, 0xf5, 0x86, 0x90, 0x7f, 0xd6, 0x74, 0x02, 0xf0, 0x79, 0x2e, 0x7a, 0x00, 0x7b, 0x00, 0xdb} },
+{ 0x02b0, 16, {0xfe, 0xda, 0xfa, 0xd9, 0xf6, 0x74, 0x06, 0xf0, 0x80, 0xfe, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83} },
+{ 0x02c0, 16, {0xc0, 0x84, 0xc0, 0x85, 0xc0, 0xe0, 0xe5, 0x91, 0xc2, 0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xab, 0x74} },
+{ 0x02d0, 16, {0x01, 0xf0, 0x90, 0x7f, 0xe8, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb, 0xa3, 0xe0, 0xfc} },
+{ 0x02e0, 16, {0xe9, 0x54, 0x60, 0xb4, 0x00, 0x03, 0x02, 0x03, 0x5d, 0xb4, 0x40, 0x6e, 0xba, 0x00, 0x0b, 0x12} },
+{ 0x02f0, 16, {0x04, 0x44, 0x40, 0x03, 0x02, 0x04, 0x26, 0x02, 0x04, 0x2e, 0xba, 0x01, 0x03, 0x02, 0x04, 0x2e} },
+{ 0x0300, 16, {0xba, 0x02, 0x03, 0x02, 0x04, 0x2e, 0xba, 0x03, 0x03, 0x02, 0x04, 0x68, 0xba, 0x04, 0x1e, 0xbb} },
+{ 0x0310, 16, {0x00, 0x0a, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x04, 0x26, 0x90, 0x7f, 0x98, 0xe0} },
+{ 0x0320, 16, {0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x95, 0xe0, 0x54, 0xfd, 0xf0, 0x02, 0x04, 0x26, 0xba, 0x05, 0x03} },
+{ 0x0330, 16, {0x02, 0x04, 0x2e, 0xba, 0x06, 0x19, 0xbb, 0x00, 0x08, 0xe5, 0x33, 0xd3, 0x95, 0x32, 0x02, 0x04} },
+{ 0x0340, 16, {0x02, 0xbb, 0x01, 0x08, 0xe5, 0x32, 0xc3, 0x95, 0x33, 0x02, 0x04, 0x02, 0x02, 0x04, 0x2e, 0xba} },
+{ 0x0350, 16, {0x07, 0x05, 0x8b, 0x34, 0x02, 0x04, 0x26, 0x02, 0x04, 0x2e, 0x02, 0x04, 0x2e, 0xba, 0x00, 0x20} },
+{ 0x0360, 16, {0xb9, 0x80, 0x10, 0x90, 0x7f, 0x00, 0xe4, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0} },
+{ 0x0370, 16, {0x02, 0x04, 0x26, 0xb9, 0x82, 0x02, 0x80, 0xeb, 0xb9, 0x81, 0x02, 0x80, 0xe6, 0x02, 0x04, 0x2e} },
+{ 0x0380, 16, {0xba, 0x01, 0x0f, 0xbb, 0x00, 0x03, 0x02, 0x04, 0x2e, 0xbb, 0x01, 0x03, 0x02, 0x04, 0x26, 0x02} },
+{ 0x0390, 16, {0x04, 0x2e, 0xba, 0x03, 0x0f, 0xbb, 0x00, 0x03, 0x02, 0x04, 0x2e, 0xbb, 0x01, 0x03, 0x02, 0x04} },
+{ 0x03a0, 16, {0x26, 0x02, 0x04, 0x2e, 0xba, 0x06, 0x56, 0xbc, 0x01, 0x0f, 0x90, 0x7f, 0xd4, 0x74, 0x06, 0xf0} },
+{ 0x03b0, 16, {0x90, 0x7f, 0xd5, 0x74, 0x5a, 0xf0, 0x02, 0x04, 0x26, 0xbc, 0x02, 0x12, 0xbb, 0x00, 0x6f, 0x90} },
+{ 0x03c0, 16, {0x7f, 0xd4, 0x74, 0x06, 0xf0, 0x90, 0x7f, 0xd5, 0x74, 0x6c, 0xf0, 0x02, 0x04, 0x26, 0xbc, 0x03} },
+{ 0x03d0, 16, {0x29, 0x74, 0x04, 0xc3, 0x9b, 0x40, 0x57, 0x60, 0x55, 0xeb, 0x2b, 0x90, 0x06, 0x8c, 0x25, 0x82} },
+{ 0x03e0, 16, {0xf5, 0x82, 0x74, 0x00, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0x90, 0x7f, 0xd4} },
+{ 0x03f0, 16, {0xe9, 0xf0, 0x90, 0x7f, 0xd5, 0xea, 0xf0, 0x02, 0x04, 0x26, 0x02, 0x04, 0x2e, 0xba, 0x08, 0x0f} },
+{ 0x0400, 16, {0x74, 0x01, 0x90, 0x7f, 0x00, 0xf0, 0x74, 0x01, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x04, 0x26, 0xba} },
+{ 0x0410, 16, {0x09, 0x03, 0x02, 0x04, 0x26, 0xba, 0x0a, 0x05, 0x74, 0x00, 0x02, 0x04, 0x02, 0xba, 0x0b, 0x03} },
+{ 0x0420, 16, {0x02, 0x04, 0x26, 0x02, 0x04, 0x2e, 0x90, 0x7f, 0xb4, 0x74, 0x02, 0xf0, 0x80, 0x09, 0x90, 0x7f} },
+{ 0x0430, 16, {0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x00, 0xd0, 0xe0, 0xd0, 0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0} },
+{ 0x0440, 16, {0x82, 0xd0, 0x86, 0x32, 0xeb, 0x20, 0xe7, 0x1e, 0xc3, 0x94, 0x0a, 0x50, 0x19, 0xeb, 0x23, 0x24} },
+{ 0x0450, 16, {0x46, 0xf5, 0x82, 0x74, 0x06, 0x34, 0x00, 0xf5, 0x83, 0xe0, 0xf5, 0xcb, 0xf5, 0xcd, 0xa3, 0xe0} },
+{ 0x0460, 16, {0xf5, 0xca, 0xf5, 0xcc, 0xc3, 0x22, 0xd3, 0x22, 0xb9, 0x41, 0x11, 0xeb, 0x64, 0xff, 0x54, 0x80} },
+{ 0x0470, 16, {0xfb, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0x7f, 0x4b, 0xf0, 0x02, 0x04, 0x26, 0x90, 0x7f, 0x9b, 0xe0} },
+{ 0x0480, 16, {0x64, 0xff, 0x02, 0x04, 0x02, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85, 0xc0} },
+{ 0x0490, 16, {0xe0, 0xe5, 0x91, 0xc2, 0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xa9, 0x74, 0x04, 0xf0, 0x74, 0x20, 0x90} },
+{ 0x04a0, 16, {0x7f, 0x9c, 0xf0, 0x12, 0x05, 0xdc, 0x74, 0x20, 0x90, 0x7f, 0x9c, 0xf0, 0xd0, 0xe0, 0xd0, 0x85} },
+{ 0x04b0, 16, {0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0} },
+{ 0x04c0, 16, {0x84, 0xc0, 0x85, 0xc0, 0xe0, 0x74, 0x10, 0x90, 0x7f, 0x9c, 0xf0, 0xe5, 0x91, 0xc2, 0xe4, 0xf5} },
+{ 0x04d0, 16, {0x91, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xc9, 0xe0, 0xf9, 0xe4, 0xf5, 0x86, 0x90} },
+{ 0x04e0, 16, {0x7d, 0xc0, 0x75, 0x85, 0x10, 0x85, 0x32, 0x84, 0xe0, 0x05, 0x86, 0x05, 0x84, 0xf0, 0xe5, 0x84} },
+{ 0x04f0, 16, {0xb5, 0x33, 0x02, 0x80, 0x09, 0x05, 0x32, 0x05, 0x86, 0xa3, 0xd9, 0xec, 0x80, 0x00, 0x90, 0x7f} },
+{ 0x0500, 16, {0xc9, 0xf0, 0xb1, 0x6d, 0x74, 0x20, 0x90, 0x7f, 0x9c, 0xf0, 0xd0, 0xe0, 0xd0, 0x85, 0xd0, 0x84} },
+{ 0x0510, 16, {0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0xe4, 0xf5, 0x86, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1} },
+{ 0x0520, 16, {0x4b, 0x90, 0x7d, 0x00, 0xe5, 0x32, 0xf0, 0xa3, 0xe5, 0x33, 0xf0, 0xa3, 0xe5, 0x30, 0xf0, 0xa3} },
+{ 0x0530, 16, {0xe5, 0x31, 0xf0, 0xa3, 0xe4, 0x30, 0x00, 0x01, 0x04, 0xf0, 0xa3, 0x05, 0x86, 0x90, 0x10, 0x00} },
+{ 0x0540, 16, {0x79, 0x10, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xd9, 0xf6, 0x05, 0x86, 0x74, 0xfc} },
+{ 0x0550, 16, {0xf0, 0xa3, 0x05, 0x86, 0x90, 0x11, 0x00, 0x79, 0x10, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0xa3, 0x05} },
+{ 0x0560, 16, {0x86, 0xd9, 0xf6, 0xe4, 0xf5, 0x86, 0x90, 0x7f, 0xbd, 0x74, 0x26, 0xf0, 0x22, 0x20, 0x00, 0x13} },
+{ 0x0570, 16, {0xe5, 0x32, 0xb5, 0x33, 0x01, 0x22, 0x05, 0x33, 0x75, 0x83, 0x10, 0x85, 0x33, 0x82, 0xe0, 0xf5} },
+{ 0x0580, 16, {0x99, 0xd2, 0x00, 0x74, 0x00, 0xb5, 0x34, 0x01, 0x22, 0xe5, 0x33, 0xd3, 0x95, 0x32, 0xc3, 0x95} },
+{ 0x0590, 16, {0x34, 0x40, 0xf5, 0x75, 0x34, 0x00, 0xd2, 0x01, 0x02, 0x05, 0xdc, 0xc0, 0x86, 0xc0, 0x82, 0xc0} },
+{ 0x05a0, 16, {0x83, 0xc0, 0x84, 0xc0, 0x85, 0xc0, 0xe0, 0x30, 0x99, 0x07, 0xc2, 0x99, 0xc2, 0x00, 0x12, 0x05} },
+{ 0x05b0, 16, {0x70, 0x30, 0x98, 0x05, 0x12, 0x05, 0xc6, 0xc2, 0x98, 0xd0, 0xe0, 0xd0, 0x85, 0xd0, 0x84, 0xd0} },
+{ 0x05c0, 16, {0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0x75, 0x83, 0x11, 0x85, 0x30, 0x82, 0x05, 0x82, 0xe5, 0x99} },
+{ 0x05d0, 16, {0xf0, 0xe5, 0x82, 0xb5, 0x31, 0x01, 0x22, 0x05, 0x30, 0xb1, 0xdc, 0x22, 0x74, 0x10, 0x90, 0x7f} },
+{ 0x05e0, 16, {0x9c, 0xf0, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x3e, 0x20, 0x01, 0x3c, 0xe5, 0x30, 0xb5, 0x31} },
+{ 0x05f0, 16, {0x01, 0x22, 0xe4, 0xf5, 0x86, 0x75, 0x83, 0x11, 0x05, 0x86, 0x90, 0x7e, 0x00, 0xf0, 0xa3, 0x05} },
+{ 0x0600, 16, {0x86, 0x79, 0x01, 0xe5, 0x30, 0xb5, 0x31, 0x02, 0x80, 0x10, 0x05, 0x31, 0x85, 0x31, 0x82, 0xe0} },
+{ 0x0610, 16, {0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0x09, 0xb9, 0x40, 0xe9, 0x74, 0x10, 0x90, 0x7f, 0x9c, 0xf0} },
+{ 0x0620, 16, {0x90, 0x7f, 0xb9, 0xe9, 0x60, 0x01, 0xf0, 0x22, 0xc2, 0x01, 0xe4, 0xf5, 0x86, 0x90, 0x7e, 0x00} },
+{ 0x0630, 16, {0x74, 0x01, 0xf0, 0xa3, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0xb9, 0xf0, 0x22, 0xc2, 0x99, 0xf5, 0x99} },
+{ 0x0640, 16, {0x30, 0x99, 0xfd, 0xc2, 0x99, 0x22, 0xe5, 0x5e, 0xf6, 0x3c, 0xfd, 0x8f, 0xfe, 0xc8, 0xff, 0x64} },
+{ 0x0650, 16, {0xff, 0xb2, 0xff, 0xd9, 0xff, 0xed, 0xff, 0xf3, 0xff, 0xfa, 0x12, 0x01, 0x00, 0x01, 0xff, 0xff} },
+{ 0x0660, 16, {0xff, 0x40, 0xcd, 0x06, 0x04, 0x01, 0x89, 0xab, 0x01, 0x02, 0x03, 0x01, 0x09, 0x02, 0x20, 0x00} },
+{ 0x0670, 16, {0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 0x00, 0x07, 0x05} },
+{ 0x0680, 16, {0x82, 0x03, 0x40, 0x00, 0x01, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x06, 0x94, 0x06, 0x98} },
+{ 0x0690, 16, {0x06, 0xba, 0x06, 0xe8, 0x04, 0x03, 0x00, 0x00, 0x22, 0x03, 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00} },
+{ 0x06a0, 16, {0x45, 0x00, 0x20, 0x00, 0x75, 0x00, 0x73, 0x00, 0x62, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00} },
+{ 0x06b0, 16, {0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00, 0x73, 0x00, 0x2e, 0x03, 0x41, 0x00, 0x43, 0x00} },
+{ 0x06c0, 16, {0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53, 0x00, 0x42, 0x00, 0x20, 0x00, 0x73, 0x00} },
+{ 0x06d0, 16, {0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00} },
+{ 0x06e0, 14, {0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00, 0x06, 0x03, 0x34, 0x00, 0x37, 0x00} },
+{ 0xffff, 0, {0x00} }
+};
diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig
new file mode 100644
index 000000000000..f1f1c0608c22
--- /dev/null
+++ b/drivers/usb/storage/Kconfig
@@ -0,0 +1,113 @@
+#
+# USB Storage driver configuration
+#
+
+comment "NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information"
+ depends on USB
+
+config USB_STORAGE
+ tristate "USB Mass Storage support"
+ depends on USB
+ select SCSI
+ ---help---
+ Say Y here if you want to connect USB mass storage devices to your
+ computer's USB port. This is the driver you need for USB
+ floppy drives, USB hard disks, USB tape drives, USB CD-ROMs,
+ USB flash devices, and memory sticks, along with
+ similar devices. This driver may also be used for some cameras
+ and card readers.
+
+ This option 'selects' (turns on, enables) 'SCSI', but you
+ probably also need 'SCSI device support: SCSI disk support'
+ (BLK_DEV_SD) for most USB storage devices.
+
+ To compile this driver as a module, choose M here: the
+ module will be called usb-storage.
+
+config USB_STORAGE_DEBUG
+ bool "USB Mass Storage verbose debug"
+ depends on USB_STORAGE
+ help
+ Say Y here in order to have the USB Mass Storage code generate
+ verbose debugging messages.
+
+config USB_STORAGE_DATAFAB
+ bool "Datafab Compact Flash Reader support (EXPERIMENTAL)"
+ depends on USB_STORAGE && EXPERIMENTAL
+ help
+ Support for certain Datafab CompactFlash readers.
+ Datafab has a web page at <http://www.datafabusa.com/>.
+
+config USB_STORAGE_FREECOM
+ bool "Freecom USB/ATAPI Bridge support"
+ depends on USB_STORAGE
+ help
+ Support for the Freecom USB to IDE/ATAPI adaptor.
+ Freecom has a web page at <http://www.freecom.de/>.
+
+config USB_STORAGE_ISD200
+ bool "ISD-200 USB/ATA Bridge support"
+ depends on USB_STORAGE && BLK_DEV_IDE
+ ---help---
+ Say Y here if you want to use USB Mass Store devices based
+ on the In-Systems Design ISD-200 USB/ATA bridge.
+
+ Some of the products that use this chip are:
+
+ - Archos Jukebox 6000
+ - ISD SmartCable for Storage
+ - Taiwan Skymaster CD530U/DEL-0241 IDE bridge
+ - Sony CRX10U CD-R/RW drive
+ - CyQ've CQ8060A CDRW drive
+ - Planex eXtreme Drive RX-25HU USB-IDE cable (not model RX-25U)
+
+config USB_STORAGE_DPCM
+ bool "Microtech/ZiO! CompactFlash/SmartMedia support"
+ depends on USB_STORAGE
+ help
+ Say Y here to support the Microtech/ZiO! CompactFlash reader.
+ There is a web page at <http://www.ziocorp.com/products/>.
+
+config USB_STORAGE_USBAT
+ bool "USBAT/USBAT02-based storage support (EXPERIMENTAL)"
+ depends on USB_STORAGE && EXPERIMENTAL
+ help
+ Say Y here to include additional code to support storage devices
+ based on the SCM/Shuttle USBAT/USBAT02 processors.
+
+ Devices reported to work with this driver include:
+ - CompactFlash reader included with Kodak DC3800 camera
+ - Dane-Elec Zmate CompactFlash reader
+ - Delkin Efilm reader2
+ - HP 8200e/8210e/8230e CD-Writer Plus drives
+ - I-JAM JS-50U
+ - Jessops CompactFlash JESDCFRU BLACK
+ - Kingston Technology PCREAD-USB/CF
+ - Maxell UA4 CompactFlash reader
+ - Memorex UCF-100
+ - Microtech ZiO! ICS-45 CF2
+ - RCA LYRA MP3 portable
+ - Sandisk ImageMate SDDR-05b
+
+config USB_STORAGE_SDDR09
+ bool "SanDisk SDDR-09 (and other SmartMedia) support (EXPERIMENTAL)"
+ depends on USB_STORAGE && EXPERIMENTAL
+ help
+ Say Y here to include additional code to support the Sandisk SDDR-09
+ SmartMedia reader in the USB Mass Storage driver.
+ Also works for the Microtech Zio! SmartMedia reader.
+
+config USB_STORAGE_SDDR55
+ bool "SanDisk SDDR-55 SmartMedia support (EXPERIMENTAL)"
+ depends on USB_STORAGE && EXPERIMENTAL
+ help
+ Say Y here to include additional code to support the Sandisk SDDR-55
+ SmartMedia reader in the USB Mass Storage driver.
+
+config USB_STORAGE_JUMPSHOT
+ bool "Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL)"
+ depends on USB_STORAGE && EXPERIMENTAL
+ help
+ Say Y here to include additional code to support the Lexar Jumpshot
+ USB CompactFlash reader.
+
diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile
new file mode 100644
index 000000000000..56652ccc2881
--- /dev/null
+++ b/drivers/usb/storage/Makefile
@@ -0,0 +1,23 @@
+#
+# Makefile for the USB Mass Storage device drivers.
+#
+# 15 Aug 2000, Christoph Hellwig <hch@infradead.org>
+# Rewritten to use lists instead of if-statements.
+#
+
+EXTRA_CFLAGS := -Idrivers/scsi
+
+obj-$(CONFIG_USB_STORAGE) += usb-storage.o
+
+usb-storage-obj-$(CONFIG_USB_STORAGE_DEBUG) += debug.o
+usb-storage-obj-$(CONFIG_USB_STORAGE_USBAT) += 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
+usb-storage-obj-$(CONFIG_USB_STORAGE_JUMPSHOT) += jumpshot.o
+
+usb-storage-objs := scsiglue.o protocol.o transport.o usb.o \
+ initializers.o $(usb-storage-obj-y)
diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c
new file mode 100644
index 000000000000..54e3e6c7ecd8
--- /dev/null
+++ b/drivers/usb/storage/datafab.c
@@ -0,0 +1,669 @@
+/* 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 <stern@rowland.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 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, 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.
+ */
+
+/*
+ * This driver attempts to support USB CompactFlash reader/writer devices
+ * based on Datafab USB-to-ATA chips. It was specifically developed for the
+ * Datafab MDCFE-B USB CompactFlash reader but has since been found to work
+ * with a variety of Datafab-based devices from a number of manufacturers.
+ * I've received a report of this driver working with a Datafab-based
+ * SmartMedia device though please be aware that I'm personally unable to
+ * test SmartMedia support.
+ *
+ * This driver supports reading and writing. If you're truly paranoid,
+ * however, you can force the driver into a write-protected state by setting
+ * the WP enable bits in datafab_handle_mode_sense(). See the comments
+ * in that routine.
+ */
+
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+
+#include "usb.h"
+#include "transport.h"
+#include "protocol.h"
+#include "debug.h"
+#include "datafab.h"
+
+static int datafab_determine_lun(struct us_data *us,
+ struct datafab_info *info);
+
+
+static inline int
+datafab_bulk_read(struct us_data *us, unsigned char *data, unsigned int len) {
+ if (len == 0)
+ return USB_STOR_XFER_GOOD;
+
+ US_DEBUGP("datafab_bulk_read: len = %d\n", len);
+ return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
+ data, len, NULL);
+}
+
+
+static inline int
+datafab_bulk_write(struct us_data *us, unsigned char *data, unsigned int len) {
+ if (len == 0)
+ return USB_STOR_XFER_GOOD;
+
+ US_DEBUGP("datafab_bulk_write: len = %d\n", len);
+ return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
+ data, len, NULL);
+}
+
+
+static int datafab_read_data(struct us_data *us,
+ struct datafab_info *info,
+ u32 sector,
+ u32 sectors)
+{
+ unsigned char *command = us->iobuf;
+ unsigned char *buffer;
+ unsigned char thistime;
+ unsigned int totallen, alloclen;
+ int len, result;
+ unsigned int sg_idx = 0, sg_offset = 0;
+
+ // we're working in LBA mode. according to the ATA spec,
+ // we can support up to 28-bit addressing. I don't know if Datafab
+ // supports beyond 24-bit addressing. It's kind of hard to test
+ // since it requires > 8GB CF card.
+ //
+ if (sectors > 0x0FFFFFFF)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (info->lun == -1) {
+ result = datafab_determine_lun(us, info);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
+ }
+
+ totallen = sectors * info->ssize;
+
+ // Since we don't read more than 64 KB at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ alloclen = min(totallen, 65536u);
+ buffer = kmalloc(alloclen, GFP_NOIO);
+ if (buffer == NULL)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ do {
+ // loop, never allocate or transfer more than 64k at once
+ // (min(128k, 255*info->ssize) is the real limit)
+
+ len = min(totallen, alloclen);
+ thistime = (len / info->ssize) & 0xff;
+
+ command[0] = 0;
+ command[1] = thistime;
+ command[2] = sector & 0xFF;
+ command[3] = (sector >> 8) & 0xFF;
+ command[4] = (sector >> 16) & 0xFF;
+
+ command[5] = 0xE0 + (info->lun << 4);
+ command[5] |= (sector >> 24) & 0x0F;
+ command[6] = 0x20;
+ command[7] = 0x01;
+
+ // send the read command
+ result = datafab_bulk_write(us, command, 8);
+ if (result != USB_STOR_XFER_GOOD)
+ goto leave;
+
+ // read the result
+ result = datafab_bulk_read(us, buffer, len);
+ if (result != USB_STOR_XFER_GOOD)
+ goto leave;
+
+ // Store the data in the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &sg_idx, &sg_offset, TO_XFER_BUF);
+
+ sector += thistime;
+ totallen -= len;
+ } while (totallen > 0);
+
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_GOOD;
+
+ leave:
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_ERROR;
+}
+
+
+static int datafab_write_data(struct us_data *us,
+ struct datafab_info *info,
+ u32 sector,
+ u32 sectors)
+{
+ unsigned char *command = us->iobuf;
+ unsigned char *reply = us->iobuf;
+ unsigned char *buffer;
+ unsigned char thistime;
+ unsigned int totallen, alloclen;
+ int len, result;
+ unsigned int sg_idx = 0, sg_offset = 0;
+
+ // we're working in LBA mode. according to the ATA spec,
+ // we can support up to 28-bit addressing. I don't know if Datafab
+ // supports beyond 24-bit addressing. It's kind of hard to test
+ // since it requires > 8GB CF card.
+ //
+ if (sectors > 0x0FFFFFFF)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (info->lun == -1) {
+ result = datafab_determine_lun(us, info);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
+ }
+
+ totallen = sectors * info->ssize;
+
+ // Since we don't write more than 64 KB at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ alloclen = min(totallen, 65536u);
+ buffer = kmalloc(alloclen, GFP_NOIO);
+ if (buffer == NULL)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ do {
+ // loop, never allocate or transfer more than 64k at once
+ // (min(128k, 255*info->ssize) is the real limit)
+
+ len = min(totallen, alloclen);
+ thistime = (len / info->ssize) & 0xff;
+
+ // Get the data from the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &sg_idx, &sg_offset, FROM_XFER_BUF);
+
+ command[0] = 0;
+ command[1] = thistime;
+ command[2] = sector & 0xFF;
+ command[3] = (sector >> 8) & 0xFF;
+ command[4] = (sector >> 16) & 0xFF;
+
+ command[5] = 0xE0 + (info->lun << 4);
+ command[5] |= (sector >> 24) & 0x0F;
+ command[6] = 0x30;
+ command[7] = 0x02;
+
+ // send the command
+ result = datafab_bulk_write(us, command, 8);
+ if (result != USB_STOR_XFER_GOOD)
+ goto leave;
+
+ // send the data
+ result = datafab_bulk_write(us, buffer, len);
+ if (result != USB_STOR_XFER_GOOD)
+ goto leave;
+
+ // read the result
+ result = datafab_bulk_read(us, reply, 2);
+ if (result != USB_STOR_XFER_GOOD)
+ goto leave;
+
+ if (reply[0] != 0x50 && reply[1] != 0) {
+ US_DEBUGP("datafab_write_data: Gah! "
+ "write return code: %02x %02x\n",
+ reply[0], reply[1]);
+ result = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ sector += thistime;
+ totallen -= len;
+ } while (totallen > 0);
+
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_GOOD;
+
+ leave:
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_ERROR;
+}
+
+
+static int datafab_determine_lun(struct us_data *us,
+ struct datafab_info *info)
+{
+ // Dual-slot readers can be thought of as dual-LUN devices.
+ // We need to determine which card slot is being used.
+ // We'll send an IDENTIFY DEVICE command and see which LUN responds...
+ //
+ // There might be a better way of doing this?
+
+ static unsigned char scommand[8] = { 0, 1, 0, 0, 0, 0xa0, 0xec, 1 };
+ unsigned char *command = us->iobuf;
+ unsigned char *buf;
+ int count = 0, rc;
+
+ if (!us || !info)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ memcpy(command, scommand, 8);
+ buf = kmalloc(512, GFP_NOIO);
+ if (!buf)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("datafab_determine_lun: locating...\n");
+
+ // we'll try 3 times before giving up...
+ //
+ while (count++ < 3) {
+ command[5] = 0xa0;
+
+ rc = datafab_bulk_write(us, command, 8);
+ if (rc != USB_STOR_XFER_GOOD) {
+ rc = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ rc = datafab_bulk_read(us, buf, 512);
+ if (rc == USB_STOR_XFER_GOOD) {
+ info->lun = 0;
+ rc = USB_STOR_TRANSPORT_GOOD;
+ goto leave;
+ }
+
+ command[5] = 0xb0;
+
+ rc = datafab_bulk_write(us, command, 8);
+ if (rc != USB_STOR_XFER_GOOD) {
+ rc = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ rc = datafab_bulk_read(us, buf, 512);
+ if (rc == USB_STOR_XFER_GOOD) {
+ info->lun = 1;
+ rc = USB_STOR_TRANSPORT_GOOD;
+ goto leave;
+ }
+
+ msleep(20);
+ }
+
+ rc = USB_STOR_TRANSPORT_ERROR;
+
+ leave:
+ kfree(buf);
+ return rc;
+}
+
+static int datafab_id_device(struct us_data *us,
+ struct datafab_info *info)
+{
+ // this is a variation of the ATA "IDENTIFY DEVICE" command...according
+ // to the ATA spec, 'Sector Count' isn't used but the Windows driver
+ // sets this bit so we do too...
+ //
+ static unsigned char scommand[8] = { 0, 1, 0, 0, 0, 0xa0, 0xec, 1 };
+ unsigned char *command = us->iobuf;
+ unsigned char *reply;
+ int rc;
+
+ if (!us || !info)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (info->lun == -1) {
+ rc = datafab_determine_lun(us, info);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+ }
+
+ memcpy(command, scommand, 8);
+ reply = kmalloc(512, GFP_NOIO);
+ if (!reply)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ command[5] += (info->lun << 4);
+
+ rc = datafab_bulk_write(us, command, 8);
+ if (rc != USB_STOR_XFER_GOOD) {
+ rc = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ // we'll go ahead and extract the media capacity while we're here...
+ //
+ rc = datafab_bulk_read(us, reply, 512);
+ if (rc == USB_STOR_XFER_GOOD) {
+ // capacity is at word offset 57-58
+ //
+ info->sectors = ((u32)(reply[117]) << 24) |
+ ((u32)(reply[116]) << 16) |
+ ((u32)(reply[115]) << 8) |
+ ((u32)(reply[114]) );
+ rc = USB_STOR_TRANSPORT_GOOD;
+ goto leave;
+ }
+
+ rc = USB_STOR_TRANSPORT_ERROR;
+
+ leave:
+ kfree(reply);
+ return rc;
+}
+
+
+static int datafab_handle_mode_sense(struct us_data *us,
+ struct scsi_cmnd * srb,
+ int sense_6)
+{
+ static unsigned char rw_err_page[12] = {
+ 0x1, 0xA, 0x21, 1, 0, 0, 0, 0, 1, 0, 0, 0
+ };
+ static unsigned char cache_page[12] = {
+ 0x8, 0xA, 0x1, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ static unsigned char rbac_page[12] = {
+ 0x1B, 0xA, 0, 0x81, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ static unsigned char timer_page[8] = {
+ 0x1C, 0x6, 0, 0, 0, 0
+ };
+ unsigned char pc, page_code;
+ unsigned int i = 0;
+ struct datafab_info *info = (struct datafab_info *) (us->extra);
+ unsigned char *ptr = us->iobuf;
+
+ // most of this stuff is just a hack to get things working. the
+ // datafab reader doesn't present a SCSI interface so we
+ // fudge the SCSI commands...
+ //
+
+ pc = srb->cmnd[2] >> 6;
+ page_code = srb->cmnd[2] & 0x3F;
+
+ switch (pc) {
+ case 0x0:
+ US_DEBUGP("datafab_handle_mode_sense: Current values\n");
+ break;
+ case 0x1:
+ US_DEBUGP("datafab_handle_mode_sense: Changeable values\n");
+ break;
+ case 0x2:
+ US_DEBUGP("datafab_handle_mode_sense: Default values\n");
+ break;
+ case 0x3:
+ US_DEBUGP("datafab_handle_mode_sense: Saves values\n");
+ break;
+ }
+
+ memset(ptr, 0, 8);
+ if (sense_6) {
+ ptr[2] = 0x00; // WP enable: 0x80
+ i = 4;
+ } else {
+ ptr[3] = 0x00; // WP enable: 0x80
+ i = 8;
+ }
+
+ switch (page_code) {
+ default:
+ // vendor-specific mode
+ info->sense_key = 0x05;
+ info->sense_asc = 0x24;
+ info->sense_ascq = 0x00;
+ return USB_STOR_TRANSPORT_FAILED;
+
+ case 0x1:
+ memcpy(ptr + i, rw_err_page, sizeof(rw_err_page));
+ i += sizeof(rw_err_page);
+ break;
+
+ case 0x8:
+ memcpy(ptr + i, cache_page, sizeof(cache_page));
+ i += sizeof(cache_page);
+ break;
+
+ case 0x1B:
+ memcpy(ptr + i, rbac_page, sizeof(rbac_page));
+ i += sizeof(rbac_page);
+ break;
+
+ case 0x1C:
+ memcpy(ptr + i, timer_page, sizeof(timer_page));
+ i += sizeof(timer_page);
+ break;
+
+ case 0x3F: // retrieve all pages
+ memcpy(ptr + i, timer_page, sizeof(timer_page));
+ i += sizeof(timer_page);
+ memcpy(ptr + i, rbac_page, sizeof(rbac_page));
+ i += sizeof(rbac_page);
+ memcpy(ptr + i, cache_page, sizeof(cache_page));
+ i += sizeof(cache_page);
+ memcpy(ptr + i, rw_err_page, sizeof(rw_err_page));
+ i += sizeof(rw_err_page);
+ break;
+ }
+
+ if (sense_6)
+ ptr[0] = i - 1;
+ else
+ ((__be16 *) ptr)[0] = cpu_to_be16(i - 2);
+ usb_stor_set_xfer_buf(ptr, i, srb);
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+static void datafab_info_destructor(void *extra)
+{
+ // this routine is a placeholder...
+ // currently, we don't allocate any extra memory so we're okay
+}
+
+
+// Transport for the Datafab MDCFE-B
+//
+int datafab_transport(struct scsi_cmnd * srb, struct us_data *us)
+{
+ struct datafab_info *info;
+ int rc;
+ unsigned long block, blocks;
+ unsigned char *ptr = us->iobuf;
+ static unsigned char inquiry_reply[8] = {
+ 0x00, 0x80, 0x00, 0x01, 0x1F, 0x00, 0x00, 0x00
+ };
+
+ 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;
+ }
+ memset(us->extra, 0, sizeof(struct datafab_info));
+ us->extra_destructor = datafab_info_destructor;
+ ((struct datafab_info *)us->extra)->lun = -1;
+ }
+
+ info = (struct datafab_info *) (us->extra);
+
+ if (srb->cmnd[0] == INQUIRY) {
+ US_DEBUGP("datafab_transport: INQUIRY. Returning bogus response");
+ memcpy(ptr, inquiry_reply, sizeof(inquiry_reply));
+ fill_inquiry_response(us, ptr, 36);
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == READ_CAPACITY) {
+ info->ssize = 0x200; // hard coded 512 byte sectors as per ATA spec
+ rc = datafab_id_device(us, info);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ US_DEBUGP("datafab_transport: READ_CAPACITY: %ld sectors, %ld bytes per sector\n",
+ info->sectors, info->ssize);
+
+ // build the reply
+ // we need the last sector, not the number of sectors
+ ((__be32 *) ptr)[0] = cpu_to_be32(info->sectors - 1);
+ ((__be32 *) ptr)[1] = cpu_to_be32(info->ssize);
+ usb_stor_set_xfer_buf(ptr, 8, srb);
+
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == MODE_SELECT_10) {
+ US_DEBUGP("datafab_transport: Gah! MODE_SELECT_10.\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ // don't bother implementing READ_6 or WRITE_6.
+ //
+ if (srb->cmnd[0] == READ_10) {
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8]));
+
+ US_DEBUGP("datafab_transport: READ_10: read block 0x%04lx count %ld\n", block, blocks);
+ return datafab_read_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == READ_12) {
+ // we'll probably never see a READ_12 but we'll do it anyway...
+ //
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) |
+ ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9]));
+
+ US_DEBUGP("datafab_transport: READ_12: read block 0x%04lx count %ld\n", block, blocks);
+ return datafab_read_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == WRITE_10) {
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8]));
+
+ US_DEBUGP("datafab_transport: WRITE_10: write block 0x%04lx count %ld\n", block, blocks);
+ return datafab_write_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == WRITE_12) {
+ // we'll probably never see a WRITE_12 but we'll do it anyway...
+ //
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) |
+ ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9]));
+
+ US_DEBUGP("datafab_transport: WRITE_12: write block 0x%04lx count %ld\n", block, blocks);
+ return datafab_write_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == TEST_UNIT_READY) {
+ US_DEBUGP("datafab_transport: TEST_UNIT_READY.\n");
+ return datafab_id_device(us, info);
+ }
+
+ if (srb->cmnd[0] == REQUEST_SENSE) {
+ US_DEBUGP("datafab_transport: REQUEST_SENSE. Returning faked response\n");
+
+ // this response is pretty bogus right now. eventually if necessary
+ // we can set the correct sense data. so far though it hasn't been
+ // necessary
+ //
+ memset(ptr, 0, 18);
+ ptr[0] = 0xF0;
+ ptr[2] = info->sense_key;
+ ptr[7] = 11;
+ ptr[12] = info->sense_asc;
+ ptr[13] = info->sense_ascq;
+ usb_stor_set_xfer_buf(ptr, 18, srb);
+
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == MODE_SENSE) {
+ US_DEBUGP("datafab_transport: MODE_SENSE_6 detected\n");
+ return datafab_handle_mode_sense(us, srb, 1);
+ }
+
+ if (srb->cmnd[0] == MODE_SENSE_10) {
+ US_DEBUGP("datafab_transport: MODE_SENSE_10 detected\n");
+ return datafab_handle_mode_sense(us, srb, 0);
+ }
+
+ if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {
+ // sure. whatever. not like we can stop the user from
+ // popping the media out of the device (no locking doors, etc)
+ //
+ 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 = SAM_STAT_CHECK_CONDITION;
+ }
+ return rc;
+ }
+
+ US_DEBUGP("datafab_transport: Gah! Unknown command: %d (0x%x)\n",
+ srb->cmnd[0], srb->cmnd[0]);
+ info->sense_key = 0x05;
+ info->sense_asc = 0x20;
+ info->sense_ascq = 0x00;
+ return USB_STOR_TRANSPORT_FAILED;
+}
diff --git a/drivers/usb/storage/datafab.h b/drivers/usb/storage/datafab.h
new file mode 100644
index 000000000000..32e3f271e582
--- /dev/null
+++ b/drivers/usb/storage/datafab.h
@@ -0,0 +1,40 @@
+/* Driver for Datafab MDCFE-B USB Compact Flash reader
+ * Header File
+ *
+ * Current development and maintenance by:
+ * (c) 2000 Jimmie Mayfield (mayfield+datafab@sackheads.org)
+ *
+ * See datafab.c for more explanation
+ *
+ * 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, 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.
+ */
+
+#ifndef _USB_DATAFAB_MDCFE_B_H
+#define _USB_DATAFAB_MDCFE_B_H
+
+extern int datafab_transport(struct scsi_cmnd *srb, struct us_data *us);
+
+struct datafab_info {
+ unsigned long sectors; // total sector count
+ unsigned long ssize; // sector size in bytes
+ signed char lun; // used for dual-slot readers
+
+ // the following aren't used yet
+ unsigned char sense_key;
+ unsigned long sense_asc; // additional sense code
+ unsigned long sense_ascq; // additional sense code qualifier
+};
+
+#endif
diff --git a/drivers/usb/storage/debug.c b/drivers/usb/storage/debug.c
new file mode 100644
index 000000000000..d76483706bc9
--- /dev/null
+++ b/drivers/usb/storage/debug.c
@@ -0,0 +1,177 @@
+/* Driver for USB Mass Storage compliant devices
+ * Debugging Functions Source Code File
+ *
+ * $Id: debug.c,v 1.9 2002/04/22 03:39:43 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 <stern@rowland.org>
+ *
+ * Initial work by:
+ * (c) 1999 Michael Gee (michael@linuxspecific.com)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/cdrom.h>
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+
+#include "debug.h"
+#include "scsi.h"
+
+
+void usb_stor_show_command(struct scsi_cmnd *srb)
+{
+ char *what = NULL;
+ int i;
+
+ switch (srb->cmnd[0]) {
+ case TEST_UNIT_READY: what = "TEST_UNIT_READY"; break;
+ case REZERO_UNIT: what = "REZERO_UNIT"; break;
+ case REQUEST_SENSE: what = "REQUEST_SENSE"; break;
+ case FORMAT_UNIT: what = "FORMAT_UNIT"; break;
+ case READ_BLOCK_LIMITS: what = "READ_BLOCK_LIMITS"; break;
+ case REASSIGN_BLOCKS: what = "REASSIGN_BLOCKS"; break;
+ case READ_6: what = "READ_6"; break;
+ case WRITE_6: what = "WRITE_6"; break;
+ case SEEK_6: what = "SEEK_6"; break;
+ case READ_REVERSE: what = "READ_REVERSE"; break;
+ case WRITE_FILEMARKS: what = "WRITE_FILEMARKS"; break;
+ case SPACE: what = "SPACE"; break;
+ case INQUIRY: what = "INQUIRY"; break;
+ case RECOVER_BUFFERED_DATA: what = "RECOVER_BUFFERED_DATA"; break;
+ case MODE_SELECT: what = "MODE_SELECT"; break;
+ case RESERVE: what = "RESERVE"; break;
+ case RELEASE: what = "RELEASE"; break;
+ case COPY: what = "COPY"; break;
+ case ERASE: what = "ERASE"; break;
+ case MODE_SENSE: what = "MODE_SENSE"; break;
+ case START_STOP: what = "START_STOP"; break;
+ case RECEIVE_DIAGNOSTIC: what = "RECEIVE_DIAGNOSTIC"; break;
+ case SEND_DIAGNOSTIC: what = "SEND_DIAGNOSTIC"; break;
+ case ALLOW_MEDIUM_REMOVAL: what = "ALLOW_MEDIUM_REMOVAL"; break;
+ case SET_WINDOW: what = "SET_WINDOW"; break;
+ case READ_CAPACITY: what = "READ_CAPACITY"; break;
+ case READ_10: what = "READ_10"; break;
+ case WRITE_10: what = "WRITE_10"; break;
+ case SEEK_10: what = "SEEK_10"; break;
+ case WRITE_VERIFY: what = "WRITE_VERIFY"; break;
+ case VERIFY: what = "VERIFY"; break;
+ case SEARCH_HIGH: what = "SEARCH_HIGH"; break;
+ case SEARCH_EQUAL: what = "SEARCH_EQUAL"; break;
+ case SEARCH_LOW: what = "SEARCH_LOW"; break;
+ case SET_LIMITS: what = "SET_LIMITS"; break;
+ case READ_POSITION: what = "READ_POSITION"; break;
+ case SYNCHRONIZE_CACHE: what = "SYNCHRONIZE_CACHE"; break;
+ case LOCK_UNLOCK_CACHE: what = "LOCK_UNLOCK_CACHE"; break;
+ case READ_DEFECT_DATA: what = "READ_DEFECT_DATA"; break;
+ case MEDIUM_SCAN: what = "MEDIUM_SCAN"; break;
+ case COMPARE: what = "COMPARE"; break;
+ case COPY_VERIFY: what = "COPY_VERIFY"; break;
+ case WRITE_BUFFER: what = "WRITE_BUFFER"; break;
+ case READ_BUFFER: what = "READ_BUFFER"; break;
+ case UPDATE_BLOCK: what = "UPDATE_BLOCK"; break;
+ case READ_LONG: what = "READ_LONG"; break;
+ case WRITE_LONG: what = "WRITE_LONG"; break;
+ case CHANGE_DEFINITION: what = "CHANGE_DEFINITION"; break;
+ case WRITE_SAME: what = "WRITE_SAME"; break;
+ case GPCMD_READ_SUBCHANNEL: what = "READ SUBCHANNEL"; break;
+ case READ_TOC: what = "READ_TOC"; break;
+ case GPCMD_READ_HEADER: what = "READ HEADER"; break;
+ case GPCMD_PLAY_AUDIO_10: what = "PLAY AUDIO (10)"; break;
+ case GPCMD_PLAY_AUDIO_MSF: what = "PLAY AUDIO MSF"; break;
+ case GPCMD_GET_EVENT_STATUS_NOTIFICATION:
+ what = "GET EVENT/STATUS NOTIFICATION"; break;
+ case GPCMD_PAUSE_RESUME: what = "PAUSE/RESUME"; break;
+ case LOG_SELECT: what = "LOG_SELECT"; break;
+ case LOG_SENSE: what = "LOG_SENSE"; break;
+ case GPCMD_STOP_PLAY_SCAN: what = "STOP PLAY/SCAN"; break;
+ case GPCMD_READ_DISC_INFO: what = "READ DISC INFORMATION"; break;
+ case GPCMD_READ_TRACK_RZONE_INFO:
+ what = "READ TRACK INFORMATION"; break;
+ case GPCMD_RESERVE_RZONE_TRACK: what = "RESERVE TRACK"; break;
+ case GPCMD_SEND_OPC: what = "SEND OPC"; break;
+ case MODE_SELECT_10: what = "MODE_SELECT_10"; break;
+ case GPCMD_REPAIR_RZONE_TRACK: what = "REPAIR TRACK"; break;
+ case 0x59: what = "READ MASTER CUE"; break;
+ case MODE_SENSE_10: what = "MODE_SENSE_10"; break;
+ case GPCMD_CLOSE_TRACK: what = "CLOSE TRACK/SESSION"; break;
+ case 0x5C: what = "READ BUFFER CAPACITY"; break;
+ case 0x5D: what = "SEND CUE SHEET"; break;
+ case GPCMD_BLANK: what = "BLANK"; break;
+ case MOVE_MEDIUM: what = "MOVE_MEDIUM or PLAY AUDIO (12)"; break;
+ case READ_12: what = "READ_12"; break;
+ case WRITE_12: what = "WRITE_12"; break;
+ case WRITE_VERIFY_12: what = "WRITE_VERIFY_12"; break;
+ case SEARCH_HIGH_12: what = "SEARCH_HIGH_12"; break;
+ case SEARCH_EQUAL_12: what = "SEARCH_EQUAL_12"; break;
+ case SEARCH_LOW_12: what = "SEARCH_LOW_12"; break;
+ case SEND_VOLUME_TAG: what = "SEND_VOLUME_TAG"; break;
+ case READ_ELEMENT_STATUS: what = "READ_ELEMENT_STATUS"; break;
+ case GPCMD_READ_CD_MSF: what = "READ CD MSF"; break;
+ case GPCMD_SCAN: what = "SCAN"; break;
+ case GPCMD_SET_SPEED: what = "SET CD SPEED"; break;
+ case GPCMD_MECHANISM_STATUS: what = "MECHANISM STATUS"; break;
+ case GPCMD_READ_CD: what = "READ CD"; break;
+ case 0xE1: what = "WRITE CONTINUE"; break;
+ case WRITE_LONG_2: what = "WRITE_LONG_2"; break;
+ default: what = "(unknown command)"; break;
+ }
+ US_DEBUGP("Command %s (%d bytes)\n", what, srb->cmd_len);
+ US_DEBUGP("");
+ for (i = 0; i < srb->cmd_len && i < 16; i++)
+ US_DEBUGPX(" %02x", srb->cmnd[i]);
+ US_DEBUGPX("\n");
+}
+
+void usb_stor_show_sense(
+ unsigned char key,
+ unsigned char asc,
+ unsigned char ascq) {
+
+ const char *what, *keystr;
+
+ keystr = scsi_sense_key_string(key);
+ what = scsi_extd_sense_format(asc, ascq);
+
+ if (keystr == NULL)
+ keystr = "(Unknown Key)";
+ if (what == NULL)
+ what = "(unknown ASC/ASCQ)";
+
+ US_DEBUGP("%s: ", keystr);
+ US_DEBUGPX(what, ascq);
+ US_DEBUGPX("\n");
+}
diff --git a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h
new file mode 100644
index 000000000000..cd2096acc723
--- /dev/null
+++ b/drivers/usb/storage/debug.h
@@ -0,0 +1,65 @@
+/* Driver for USB Mass Storage compliant devices
+ * Debugging Functions Header File
+ *
+ * $Id: debug.h,v 1.6 2001/01/12 23:51:04 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
+ *
+ * Initial work by:
+ * (c) 1999 Michael Gee (michael@linuxspecific.com)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, 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.
+ */
+
+#ifndef _DEBUG_H_
+#define _DEBUG_H_
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+
+#define USB_STORAGE "usb-storage: "
+
+#ifdef CONFIG_USB_STORAGE_DEBUG
+void usb_stor_show_command(struct scsi_cmnd *srb);
+void usb_stor_show_sense( unsigned char key,
+ unsigned char asc, unsigned char ascq );
+#define US_DEBUGP(x...) printk( KERN_DEBUG USB_STORAGE x )
+#define US_DEBUGPX(x...) printk( x )
+#define US_DEBUG(x) x
+#else
+#define US_DEBUGP(x...)
+#define US_DEBUGPX(x...)
+#define US_DEBUG(x)
+#endif
+
+#endif
diff --git a/drivers/usb/storage/dpcm.c b/drivers/usb/storage/dpcm.c
new file mode 100644
index 000000000000..92b69e4c8047
--- /dev/null
+++ b/drivers/usb/storage/dpcm.c
@@ -0,0 +1,89 @@
+/* Driver for Microtech DPCM-USB CompactFlash/SmartMedia reader
+ *
+ * $Id: dpcm.c,v 1.4 2001/06/11 02:54:25 mdharm Exp $
+ *
+ * DPCM driver v0.1:
+ *
+ * First release
+ *
+ * Current development and maintenance by:
+ * (c) 2000 Brian Webb (webbb@earthlink.net)
+ *
+ * This device contains both a CompactFlash card reader, which
+ * uses the Control/Bulk w/o Interrupt protocol and
+ * a SmartMedia card reader that uses the same protocol
+ * as the SDDR09.
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/config.h>
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+
+#include "usb.h"
+#include "transport.h"
+#include "protocol.h"
+#include "debug.h"
+#include "dpcm.h"
+#include "sddr09.h"
+
+/*
+ * Transport for the Microtech DPCM-USB
+ *
+ */
+int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us)
+{
+ int ret;
+
+ if(srb == NULL)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("dpcm_transport: LUN=%d\n", srb->device->lun);
+
+ switch(srb->device->lun) {
+ case 0:
+
+ /*
+ * LUN 0 corresponds to the CompactFlash card reader.
+ */
+ ret = usb_stor_CB_transport(srb, us);
+ break;
+
+#ifdef CONFIG_USB_STORAGE_SDDR09
+ case 1:
+
+ /*
+ * LUN 1 corresponds to the SmartMedia card reader.
+ */
+
+ /*
+ * Set the LUN to 0 (just in case).
+ */
+ srb->device->lun = 0; us->srb->device->lun = 0;
+ ret = sddr09_transport(srb, us);
+ srb->device->lun = 1; us->srb->device->lun = 1;
+ break;
+
+#endif
+
+ default:
+ US_DEBUGP("dpcm_transport: Invalid LUN %d\n", srb->device->lun);
+ ret = USB_STOR_TRANSPORT_ERROR;
+ break;
+ }
+ return ret;
+}
diff --git a/drivers/usb/storage/dpcm.h b/drivers/usb/storage/dpcm.h
new file mode 100644
index 000000000000..81b464cfcc1e
--- /dev/null
+++ b/drivers/usb/storage/dpcm.h
@@ -0,0 +1,34 @@
+/* Driver for Microtech DPCM-USB CompactFlash/SmartMedia reader
+ *
+ * $Id: dpcm.h,v 1.2 2000/08/25 00:13:51 mdharm Exp $
+ *
+ * DPCM driver v0.1:
+ *
+ * First release
+ *
+ * Current development and maintenance by:
+ * (c) 2000 Brian Webb (webbb@earthlink.net)
+ *
+ * See dpcm.c for more explanation
+ *
+ * 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, 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.
+ */
+
+#ifndef _MICROTECH_DPCM_USB_H
+#define _MICROTECH_DPCM_USB_H
+
+extern int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us);
+
+#endif
diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
new file mode 100644
index 000000000000..30e96050fe0c
--- /dev/null
+++ b/drivers/usb/storage/freecom.c
@@ -0,0 +1,488 @@
+/* Driver for Freecom USB/IDE adaptor
+ *
+ * $Id: freecom.c,v 1.22 2002/04/22 03:39:43 mdharm Exp $
+ *
+ * Freecom v0.1:
+ *
+ * First release
+ *
+ * Current development and maintenance by:
+ * (C) 2000 David Brown <usb-storage@davidb.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 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, 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.
+ *
+ * This driver was developed with information provided in FREECOM's USB
+ * Programmers Reference Guide. For further information contact Freecom
+ * (http://www.freecom.de/)
+ */
+
+#include <linux/config.h>
+#include <linux/hdreg.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+
+#include "usb.h"
+#include "transport.h"
+#include "protocol.h"
+#include "debug.h"
+#include "freecom.h"
+
+#ifdef CONFIG_USB_STORAGE_DEBUG
+static void pdump (void *, int);
+#endif
+
+/* Bits of HD_STATUS */
+#define ERR_STAT 0x01
+#define DRQ_STAT 0x08
+
+/* All of the outgoing packets are 64 bytes long. */
+struct freecom_cb_wrap {
+ u8 Type; /* Command type. */
+ u8 Timeout; /* Timeout in seconds. */
+ u8 Atapi[12]; /* An ATAPI packet. */
+ u8 Filler[50]; /* Padding Data. */
+};
+
+struct freecom_xfer_wrap {
+ u8 Type; /* Command type. */
+ u8 Timeout; /* Timeout in seconds. */
+ __le32 Count; /* Number of bytes to transfer. */
+ u8 Pad[58];
+} __attribute__ ((packed));
+
+struct freecom_ide_out {
+ u8 Type; /* Type + IDE register. */
+ u8 Pad;
+ __le16 Value; /* Value to write. */
+ u8 Pad2[60];
+};
+
+struct freecom_ide_in {
+ u8 Type; /* Type | IDE register. */
+ u8 Pad[63];
+};
+
+struct freecom_status {
+ u8 Status;
+ u8 Reason;
+ __le16 Count;
+ u8 Pad[60];
+};
+
+/* Freecom stuffs the interrupt status in the INDEX_STAT bit of the ide
+ * register. */
+#define FCM_INT_STATUS 0x02 /* INDEX_STAT */
+#define FCM_STATUS_BUSY 0x80
+
+/* These are the packet types. The low bit indicates that this command
+ * should wait for an interrupt. */
+#define FCM_PACKET_ATAPI 0x21
+#define FCM_PACKET_STATUS 0x20
+
+/* Receive data from the IDE interface. The ATAPI packet has already
+ * waited, so the data should be immediately available. */
+#define FCM_PACKET_INPUT 0x81
+
+/* Send data to the IDE interface. */
+#define FCM_PACKET_OUTPUT 0x01
+
+/* Write a value to an ide register. Or the ide register to write after
+ * munging the address a bit. */
+#define FCM_PACKET_IDE_WRITE 0x40
+#define FCM_PACKET_IDE_READ 0xC0
+
+/* All packets (except for status) are 64 bytes long. */
+#define FCM_PACKET_LENGTH 64
+#define FCM_STATUS_PACKET_LENGTH 4
+
+static int
+freecom_readdata (struct scsi_cmnd *srb, struct us_data *us,
+ unsigned int ipipe, unsigned int opipe, int count)
+{
+ struct freecom_xfer_wrap *fxfr =
+ (struct freecom_xfer_wrap *) us->iobuf;
+ int result;
+
+ fxfr->Type = FCM_PACKET_INPUT | 0x00;
+ fxfr->Timeout = 0; /* Short timeout for debugging. */
+ fxfr->Count = cpu_to_le32 (count);
+ memset (fxfr->Pad, 0, sizeof (fxfr->Pad));
+
+ US_DEBUGP("Read data Freecom! (c=%d)\n", count);
+
+ /* Issue the transfer command. */
+ result = usb_stor_bulk_transfer_buf (us, opipe, fxfr,
+ FCM_PACKET_LENGTH, NULL);
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP ("Freecom readdata transport error\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* Now transfer all of our blocks. */
+ US_DEBUGP("Start of read\n");
+ result = usb_stor_bulk_transfer_sg(us, ipipe, srb->request_buffer,
+ count, srb->use_sg, &srb->resid);
+ US_DEBUGP("freecom_readdata done!\n");
+
+ if (result > USB_STOR_XFER_SHORT)
+ return USB_STOR_TRANSPORT_ERROR;
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+static int
+freecom_writedata (struct scsi_cmnd *srb, struct us_data *us,
+ int unsigned ipipe, unsigned int opipe, int count)
+{
+ struct freecom_xfer_wrap *fxfr =
+ (struct freecom_xfer_wrap *) us->iobuf;
+ int result;
+
+ fxfr->Type = FCM_PACKET_OUTPUT | 0x00;
+ fxfr->Timeout = 0; /* Short timeout for debugging. */
+ fxfr->Count = cpu_to_le32 (count);
+ memset (fxfr->Pad, 0, sizeof (fxfr->Pad));
+
+ US_DEBUGP("Write data Freecom! (c=%d)\n", count);
+
+ /* Issue the transfer command. */
+ result = usb_stor_bulk_transfer_buf (us, opipe, fxfr,
+ FCM_PACKET_LENGTH, NULL);
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP ("Freecom writedata transport error\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* Now transfer all of our blocks. */
+ US_DEBUGP("Start of write\n");
+ result = usb_stor_bulk_transfer_sg(us, opipe, srb->request_buffer,
+ count, srb->use_sg, &srb->resid);
+
+ US_DEBUGP("freecom_writedata done!\n");
+ if (result > USB_STOR_XFER_SHORT)
+ return USB_STOR_TRANSPORT_ERROR;
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Transport for the Freecom USB/IDE adaptor.
+ *
+ */
+int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
+{
+ struct freecom_cb_wrap *fcb;
+ struct freecom_status *fst;
+ unsigned int ipipe, opipe; /* We need both pipes. */
+ int result;
+ unsigned int partial;
+ int length;
+
+ fcb = (struct freecom_cb_wrap *) us->iobuf;
+ fst = (struct freecom_status *) us->iobuf;
+
+ US_DEBUGP("Freecom TRANSPORT STARTED\n");
+
+ /* Get handles for both transports. */
+ opipe = us->send_bulk_pipe;
+ ipipe = us->recv_bulk_pipe;
+
+ /* The ATAPI Command always goes out first. */
+ fcb->Type = FCM_PACKET_ATAPI | 0x00;
+ fcb->Timeout = 0;
+ memcpy (fcb->Atapi, srb->cmnd, 12);
+ memset (fcb->Filler, 0, sizeof (fcb->Filler));
+
+ US_DEBUG(pdump (srb->cmnd, 12));
+
+ /* Send it out. */
+ result = usb_stor_bulk_transfer_buf (us, opipe, fcb,
+ FCM_PACKET_LENGTH, NULL);
+
+ /* The Freecom device will only fail if there is something wrong in
+ * USB land. It returns the status in its own registers, which
+ * come back in the bulk pipe. */
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP ("freecom transport error\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* There are times we can optimize out this status read, but it
+ * doesn't hurt us to always do it now. */
+ result = usb_stor_bulk_transfer_buf (us, ipipe, fst,
+ FCM_STATUS_PACKET_LENGTH, &partial);
+ US_DEBUGP("foo Status result %d %u\n", result, partial);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUG(pdump ((void *) fst, partial));
+
+ /* The firmware will time-out commands after 20 seconds. Some commands
+ * can legitimately take longer than this, so we use a different
+ * command that only waits for the interrupt and then sends status,
+ * without having to send a new ATAPI command to the device.
+ *
+ * NOTE: There is some indication that a data transfer after a timeout
+ * may not work, but that is a condition that should never happen.
+ */
+ while (fst->Status & FCM_STATUS_BUSY) {
+ US_DEBUGP("20 second USB/ATAPI bridge TIMEOUT occurred!\n");
+ US_DEBUGP("fst->Status is %x\n", fst->Status);
+
+ /* 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. */
+ result = usb_stor_bulk_transfer_buf (us, opipe, fcb,
+ FCM_PACKET_LENGTH, NULL);
+
+ /* The Freecom device will only fail if there is something
+ * wrong in USB land. It returns the status in its own
+ * registers, which come back in the bulk pipe.
+ */
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP ("freecom transport error\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* get the data */
+ result = usb_stor_bulk_transfer_buf (us, ipipe, fst,
+ FCM_STATUS_PACKET_LENGTH, &partial);
+
+ US_DEBUGP("bar Status result %d %u\n", result, partial);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUG(pdump ((void *) fst, partial));
+ }
+
+ if (partial != 4)
+ return USB_STOR_TRANSPORT_ERROR;
+ if ((fst->Status & 1) != 0) {
+ US_DEBUGP("operation failed\n");
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ /* The device might not have as much data available as we
+ * requested. If you ask for more than the device has, this reads
+ * 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", srb->request_bufflen);
+
+ /* 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 = le16_to_cpu(fst->Count);
+ break;
+ default:
+ length = srb->request_bufflen;
+ }
+
+ /* verify that this amount is legal */
+ if (length > srb->request_bufflen) {
+ length = srb->request_bufflen;
+ US_DEBUGP("Truncating request to match buffer length: %d\n", length);
+ }
+
+ /* What we do now depends on what direction the data is supposed to
+ * move in. */
+
+ switch (us->srb->sc_data_direction) {
+ case DMA_FROM_DEVICE:
+ /* catch bogus "read 0 length" case */
+ if (!length)
+ break;
+ /* Make sure that the status indicates that the device
+ * wants data as well. */
+ if ((fst->Status & DRQ_STAT) == 0 || (fst->Reason & 3) != 2) {
+ US_DEBUGP("SCSI wants data, drive doesn't have any\n");
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+ result = freecom_readdata (srb, us, ipipe, opipe, length);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
+
+ US_DEBUGP("FCM: Waiting for status\n");
+ result = usb_stor_bulk_transfer_buf (us, ipipe, fst,
+ FCM_PACKET_LENGTH, &partial);
+ US_DEBUG(pdump ((void *) fst, partial));
+
+ if (partial != 4 || result > USB_STOR_XFER_SHORT)
+ return USB_STOR_TRANSPORT_ERROR;
+ if ((fst->Status & ERR_STAT) != 0) {
+ US_DEBUGP("operation failed\n");
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+ if ((fst->Reason & 3) != 3) {
+ US_DEBUGP("Drive seems still hungry\n");
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+ US_DEBUGP("Transfer happy\n");
+ break;
+
+ case DMA_TO_DEVICE:
+ /* catch bogus "write 0 length" case */
+ if (!length)
+ break;
+ /* Make sure the status indicates that the device wants to
+ * send us data. */
+ /* !!IMPLEMENT!! */
+ result = freecom_writedata (srb, us, ipipe, opipe, length);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
+
+ US_DEBUGP("FCM: Waiting for status\n");
+ result = usb_stor_bulk_transfer_buf (us, ipipe, fst,
+ FCM_PACKET_LENGTH, &partial);
+
+ if (partial != 4 || result > USB_STOR_XFER_SHORT)
+ return USB_STOR_TRANSPORT_ERROR;
+ if ((fst->Status & ERR_STAT) != 0) {
+ US_DEBUGP("operation failed\n");
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+ if ((fst->Reason & 3) != 3) {
+ US_DEBUGP("Drive seems still hungry\n");
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ US_DEBUGP("Transfer happy\n");
+ break;
+
+
+ case DMA_NONE:
+ /* Easy, do nothing. */
+ break;
+
+ default:
+ /* should never hit here -- filtered in usb.c */
+ US_DEBUGP ("freecom unimplemented direction: %d\n",
+ us->srb->sc_data_direction);
+ // Return fail, SCSI seems to handle this better.
+ return USB_STOR_TRANSPORT_FAILED;
+ break;
+ }
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+int
+freecom_init (struct us_data *us)
+{
+ int result;
+ char *buffer = us->iobuf;
+
+ /* The DMA-mapped I/O buffer is 64 bytes long, just right for
+ * all our packets. No need to allocate any extra buffer space.
+ */
+
+ result = usb_stor_control_msg(us, us->recv_ctrl_pipe,
+ 0x4c, 0xc0, 0x4346, 0x0, buffer, 0x20, 3*HZ);
+ buffer[32] = '\0';
+ US_DEBUGP("String returned from FC init is: %s\n", buffer);
+
+ /* Special thanks to the people at Freecom for providing me with
+ * this "magic sequence", which they use in their Windows and MacOS
+ * drivers to make sure that all the attached perhiperals are
+ * properly reset.
+ */
+
+ /* send reset */
+ result = usb_stor_control_msg(us, us->send_ctrl_pipe,
+ 0x4d, 0x40, 0x24d8, 0x0, NULL, 0x0, 3*HZ);
+ US_DEBUGP("result from activate reset is %d\n", result);
+
+ /* wait 250ms */
+ mdelay(250);
+
+ /* clear reset */
+ result = usb_stor_control_msg(us, us->send_ctrl_pipe,
+ 0x4d, 0x40, 0x24f8, 0x0, NULL, 0x0, 3*HZ);
+ US_DEBUGP("result from clear reset is %d\n", result);
+
+ /* wait 3 seconds */
+ mdelay(3 * 1000);
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+int usb_stor_freecom_reset(struct us_data *us)
+{
+ printk (KERN_CRIT "freecom reset called\n");
+
+ /* We don't really have this feature. */
+ return FAILED;
+}
+
+#ifdef CONFIG_USB_STORAGE_DEBUG
+static void pdump (void *ibuffer, int length)
+{
+ static char line[80];
+ int offset = 0;
+ unsigned char *buffer = (unsigned char *) ibuffer;
+ int i, j;
+ int from, base;
+
+ offset = 0;
+ for (i = 0; i < length; i++) {
+ if ((i & 15) == 0) {
+ if (i > 0) {
+ offset += sprintf (line+offset, " - ");
+ for (j = i - 16; j < i; j++) {
+ if (buffer[j] >= 32 && buffer[j] <= 126)
+ line[offset++] = buffer[j];
+ else
+ line[offset++] = '.';
+ }
+ line[offset] = 0;
+ US_DEBUGP("%s\n", line);
+ offset = 0;
+ }
+ offset += sprintf (line+offset, "%08x:", i);
+ }
+ else if ((i & 7) == 0) {
+ offset += sprintf (line+offset, " -");
+ }
+ offset += sprintf (line+offset, " %02x", buffer[i] & 0xff);
+ }
+
+ /* Add the last "chunk" of data. */
+ from = (length - 1) % 16;
+ base = ((length - 1) / 16) * 16;
+
+ for (i = from + 1; i < 16; i++)
+ offset += sprintf (line+offset, " ");
+ if (from < 8)
+ offset += sprintf (line+offset, " ");
+ offset += sprintf (line+offset, " - ");
+
+ for (i = 0; i <= from; i++) {
+ if (buffer[base+i] >= 32 && buffer[base+i] <= 126)
+ line[offset++] = buffer[base+i];
+ else
+ line[offset++] = '.';
+ }
+ line[offset] = 0;
+ US_DEBUGP("%s\n", line);
+ offset = 0;
+}
+#endif
+
diff --git a/drivers/usb/storage/freecom.h b/drivers/usb/storage/freecom.h
new file mode 100644
index 000000000000..1b012d62d0a8
--- /dev/null
+++ b/drivers/usb/storage/freecom.h
@@ -0,0 +1,36 @@
+/* Driver for Freecom USB/IDE adaptor
+ *
+ * $Id: freecom.h,v 1.4 2000/08/29 14:49:15 dlbrown Exp $
+ *
+ * Freecom v0.1:
+ *
+ * First release
+ *
+ * Current development and maintenance by:
+ * (c) 2000 David Brown <usb-storage@davidb.org>
+ *
+ * See freecom.c for more explanation
+ *
+ * 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, 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.
+ */
+
+#ifndef _FREECOM_USB_H
+#define _FREECOM_USB_H
+
+extern int freecom_transport(struct scsi_cmnd *srb, struct us_data *us);
+extern int usb_stor_freecom_reset(struct us_data *us);
+extern int freecom_init (struct us_data *us);
+
+#endif
diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c
new file mode 100644
index 000000000000..5b06f9240d05
--- /dev/null
+++ b/drivers/usb/storage/initializers.c
@@ -0,0 +1,93 @@
+/* Special Initializers for certain USB Mass Storage devices
+ *
+ * $Id: initializers.c,v 1.2 2000/09/06 22:35:57 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/sched.h>
+#include <linux/errno.h>
+
+#include "usb.h"
+#include "initializers.h"
+#include "debug.h"
+#include "transport.h"
+
+/* This places the Shuttle/SCM USB<->SCSI bridge devices in multi-target
+ * mode */
+int usb_stor_euscsi_init(struct us_data *us)
+{
+ int result;
+
+ US_DEBUGP("Attempting to init eUSCSI bridge...\n");
+ us->iobuf[0] = 0x1;
+ result = usb_stor_control_msg(us, us->send_ctrl_pipe,
+ 0x0C, USB_RECIP_INTERFACE | USB_TYPE_VENDOR,
+ 0x01, 0x0, us->iobuf, 0x1, 5*HZ);
+ US_DEBUGP("-- result is %d\n", result);
+
+ return 0;
+}
+
+/* This function is required to activate all four slots on the UCR-61S2B
+ * flash reader */
+int usb_stor_ucr61s2b_init(struct us_data *us)
+{
+ struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap*) us->iobuf;
+ struct bulk_cs_wrap *bcs = (struct bulk_cs_wrap*) us->iobuf;
+ int res, partial;
+ static char init_string[] = "\xec\x0a\x06\x00$PCCHIPS";
+
+ US_DEBUGP("Sending UCR-61S2B initialization packet...\n");
+
+ bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
+ bcb->Tag = 0;
+ bcb->DataTransferLength = cpu_to_le32(0);
+ bcb->Flags = bcb->Lun = 0;
+ bcb->Length = sizeof(init_string) - 1;
+ memset(bcb->CDB, 0, sizeof(bcb->CDB));
+ memcpy(bcb->CDB, init_string, sizeof(init_string) - 1);
+
+ res = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcb,
+ US_BULK_CB_WRAP_LEN, &partial);
+ if(res)
+ return res;
+
+ US_DEBUGP("Getting status packet...\n");
+ res = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, bcs,
+ US_BULK_CS_WRAP_LEN, &partial);
+
+ return (res ? -1 : 0);
+}
diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h
new file mode 100644
index 000000000000..7372386f33d5
--- /dev/null
+++ b/drivers/usb/storage/initializers.h
@@ -0,0 +1,54 @@
+/* Header file for Special Initializers for certain USB Mass Storage devices
+ *
+ * $Id: initializers.h,v 1.1 2000/08/29 23:07:02 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/config.h>
+#include "usb.h"
+#include "transport.h"
+
+/* This places the Shuttle/SCM USB<->SCSI bridge devices in multi-target
+ * mode */
+int usb_stor_euscsi_init(struct us_data *us);
+
+#ifdef CONFIG_USB_STORAGE_SDDR09
+int sddr09_init(struct us_data *us);
+#endif
+
+/* This function is required to activate all four slots on the UCR-61S2B
+ * flash reader */
+int usb_stor_ucr61s2b_init(struct us_data *us);
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
new file mode 100644
index 000000000000..ecb328aa9ea1
--- /dev/null
+++ b/drivers/usb/storage/isd200.c
@@ -0,0 +1,1442 @@
+/* Transport & Protocol Driver for In-System Design, Inc. ISD200 ASIC
+ *
+ * $Id: isd200.c,v 1.16 2002/04/22 03:39:43 mdharm Exp $
+ *
+ * Current development and maintenance:
+ * (C) 2001-2002 Björn Stenberg (bjorn@haxx.se)
+ *
+ * Developed with the assistance of:
+ * (C) 2002 Alan Stern <stern@rowland.org>
+ *
+ * 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
+ * a means of passing ATA commands and ATA register accesses to a device.
+ *
+ * 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, 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.
+ *
+ * History:
+ *
+ * 2002-10-19: Removed the specialized transfer routines.
+ * (Alan Stern <stern@rowland.harvard.edu>)
+ * 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 <luc@saillard.org>)
+ * 2002-01-17: All bitfields removed.
+ * (bjorn@haxx.se)
+ */
+
+
+/* Include files */
+
+#include <linux/jiffies.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+
+#include "usb.h"
+#include "transport.h"
+#include "protocol.h"
+#include "debug.h"
+#include "scsiglue.h"
+#include "isd200.h"
+
+
+/* Timeout defines (in Seconds) */
+
+#define ISD200_ENUM_BSY_TIMEOUT 35
+#define ISD200_ENUM_DETECT_TIMEOUT 30
+#define ISD200_DEFAULT_TIMEOUT 30
+
+/* device flags */
+#define DF_ATA_DEVICE 0x0001
+#define DF_MEDIA_STATUS_ENABLED 0x0002
+#define DF_REMOVABLE_MEDIA 0x0004
+
+/* capability bit definitions */
+#define CAPABILITY_DMA 0x01
+#define CAPABILITY_LBA 0x02
+
+/* command_setX bit definitions */
+#define COMMANDSET_REMOVABLE 0x02
+#define COMMANDSET_MEDIA_STATUS 0x10
+
+/* ATA Vendor Specific defines */
+#define ATA_ADDRESS_DEVHEAD_STD 0xa0
+#define ATA_ADDRESS_DEVHEAD_LBA_MODE 0x40
+#define ATA_ADDRESS_DEVHEAD_SLAVE 0x10
+
+/* Action Select bits */
+#define ACTION_SELECT_0 0x01
+#define ACTION_SELECT_1 0x02
+#define ACTION_SELECT_2 0x04
+#define ACTION_SELECT_3 0x08
+#define ACTION_SELECT_4 0x10
+#define ACTION_SELECT_5 0x20
+#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 <linux/hdreg.h> */
+#define ATA_ERROR_MEDIA_CHANGE 0x20
+
+/* ATA command definitions not in <linux/hdreg.h> */
+#define ATA_COMMAND_GET_MEDIA_STATUS 0xDA
+#define ATA_COMMAND_MEDIA_EJECT 0xED
+
+/* ATA drive control definitions */
+#define ATA_DC_DISABLE_INTERRUPTS 0x02
+#define ATA_DC_RESET_CONTROLLER 0x04
+#define ATA_DC_REENABLE_CONTROLLER 0x00
+
+/*
+ * General purpose return codes
+ */
+
+#define ISD200_ERROR -1
+#define ISD200_GOOD 0
+
+/*
+ * Transport return codes
+ */
+
+#define ISD200_TRANSPORT_GOOD 0 /* Transport good, command good */
+#define ISD200_TRANSPORT_FAILED 1 /* Transport good, command failed */
+#define ISD200_TRANSPORT_ERROR 2 /* Transport bad (i.e. device dead) */
+
+/* driver action codes */
+#define ACTION_READ_STATUS 0
+#define ACTION_RESET 1
+#define ACTION_REENABLE 2
+#define ACTION_SOFT_RESET 3
+#define ACTION_ENUM 4
+#define ACTION_IDENTIFY 5
+
+
+/*
+ * ata_cdb struct
+ */
+
+
+union ata_cdb {
+ struct {
+ unsigned char SignatureByte0;
+ unsigned char SignatureByte1;
+ unsigned char ActionSelect;
+ unsigned char RegisterSelect;
+ unsigned char TransferBlockSize;
+ unsigned char WriteData3F6;
+ unsigned char WriteData1F1;
+ unsigned char WriteData1F2;
+ unsigned char WriteData1F3;
+ unsigned char WriteData1F4;
+ unsigned char WriteData1F5;
+ unsigned char WriteData1F6;
+ unsigned char WriteData1F7;
+ unsigned char Reserved[3];
+ } generic;
+
+ struct {
+ unsigned char SignatureByte0;
+ unsigned char SignatureByte1;
+ unsigned char ActionSelect;
+ unsigned char RegisterSelect;
+ unsigned char TransferBlockSize;
+ unsigned char AlternateStatusByte;
+ unsigned char ErrorByte;
+ unsigned char SectorCountByte;
+ unsigned char SectorNumberByte;
+ unsigned char CylinderLowByte;
+ unsigned char CylinderHighByte;
+ unsigned char DeviceHeadByte;
+ unsigned char StatusByte;
+ unsigned char Reserved[3];
+ } read;
+
+ struct {
+ unsigned char SignatureByte0;
+ unsigned char SignatureByte1;
+ unsigned char ActionSelect;
+ unsigned char RegisterSelect;
+ unsigned char TransferBlockSize;
+ unsigned char DeviceControlByte;
+ unsigned char FeaturesByte;
+ unsigned char SectorCountByte;
+ unsigned char SectorNumberByte;
+ unsigned char CylinderLowByte;
+ unsigned char CylinderHighByte;
+ unsigned char DeviceHeadByte;
+ unsigned char CommandByte;
+ unsigned char Reserved[3];
+ } write;
+};
+
+
+/*
+ * Inquiry data structure. This is the data returned from the target
+ * after it receives an inquiry.
+ *
+ * This structure may be extended by the number of bytes specified
+ * in the field AdditionalLength. The defined size constant only
+ * 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];
+ unsigned char VendorSpecific[20];
+ unsigned char Reserved3[40];
+} __attribute__ ((packed));
+
+/*
+ * INQUIRY data buffer size
+ */
+
+#define INQUIRYDATABUFFERSIZE 36
+
+
+/*
+ * 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));
+
+
+/*
+ * ISD200 driver information struct
+ */
+
+struct isd200_info {
+ struct inquiry_data InquiryData;
+ struct hd_driveid *id;
+ struct isd200_config ConfigData;
+ unsigned char *RegsBuf;
+ unsigned char ATARegs[8];
+ unsigned char DeviceHead;
+ unsigned char DeviceFlags;
+
+ /* maximum number of LUNs supported */
+ unsigned char MaxLUNs;
+ struct scsi_cmnd srb;
+};
+
+
+/*
+ * Read Capacity Data - returned in Big Endian format
+ */
+
+struct read_capacity_data {
+ __be32 LogicalBlockAddress;
+ __be32 BytesPerBlock;
+};
+
+/*
+ * Read Block Limits Data - returned in Big Endian format
+ * This structure returns the maximum and minimum block
+ * size for a TAPE device.
+ */
+
+struct read_block_limits {
+ unsigned char Reserved;
+ unsigned char BlockMaximumSize[3];
+ unsigned char BlockMinimumSize[2];
+};
+
+
+/*
+ * 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];
+ unsigned char AdditionalSenseCode;
+ unsigned char AdditionalSenseCodeQualifier;
+ unsigned char FieldReplaceableUnitCode;
+ unsigned char SenseKeySpecific[3];
+} __attribute__ ((packed));
+
+/*
+ * Default request sense buffer size
+ */
+
+#define SENSE_BUFFER_SIZE 18
+
+/***********************************************************************
+ * Helper routines
+ ***********************************************************************/
+
+/**************************************************************************
+ * isd200_build_sense
+ *
+ * Builds an artificial sense buffer to report the results of a
+ * failed command.
+ *
+ * RETURNS:
+ * void
+ */
+static void isd200_build_sense(struct us_data *us, struct scsi_cmnd *srb)
+{
+ struct isd200_info *info = (struct isd200_info *)us->extra;
+ struct sense_data *buf = (struct sense_data *) &srb->sense_buffer[0];
+ 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;
+ }
+}
+
+
+/***********************************************************************
+ * Transport routines
+ ***********************************************************************/
+
+
+/**************************************************************************
+ * isd200_action
+ *
+ * Routine for sending commands to the isd200
+ *
+ * RETURNS:
+ * ISD status code
+ */
+static int isd200_action( struct us_data *us, int action,
+ void* pointer, int value )
+{
+ union ata_cdb ata;
+ struct scsi_device srb_dev;
+ struct isd200_info *info = (struct isd200_info *)us->extra;
+ struct scsi_cmnd *srb = &info->srb;
+ int status;
+
+ memset(&ata, 0, sizeof(ata));
+ memset(&srb_dev, 0, sizeof(srb_dev));
+ srb->device = &srb_dev;
+ ++srb->serial_number;
+
+ ata.generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
+ ata.generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
+ ata.generic.TransferBlockSize = 1;
+
+ switch ( action ) {
+ 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 = DMA_FROM_DEVICE;
+ srb->request_buffer = pointer;
+ srb->request_bufflen = value;
+ break;
+
+ case ACTION_ENUM:
+ US_DEBUGP(" isd200_action(ENUM,0x%02x)\n",value);
+ 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 = DMA_NONE;
+ break;
+
+ case ACTION_RESET:
+ 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 = DMA_NONE;
+ break;
+
+ case ACTION_REENABLE:
+ 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 = DMA_NONE;
+ break;
+
+ 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 = DMA_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 = DMA_FROM_DEVICE;
+ srb->request_buffer = (void *) info->id;
+ srb->request_bufflen = sizeof(struct hd_driveid);
+ break;
+
+ default:
+ US_DEBUGP("Error: Undefined action %d\n",action);
+ break;
+ }
+
+ memcpy(srb->cmnd, &ata, sizeof(ata.generic));
+ srb->cmd_len = sizeof(ata.generic);
+ status = usb_stor_Bulk_transport(srb, us);
+ if (status == USB_STOR_TRANSPORT_GOOD)
+ status = ISD200_GOOD;
+ else {
+ US_DEBUGP(" isd200_action(0x%02x) error: %d\n",action,status);
+ status = ISD200_ERROR;
+ /* need to reset device here */
+ }
+
+ return status;
+}
+
+/**************************************************************************
+ * isd200_read_regs
+ *
+ * Read ATA Registers
+ *
+ * RETURNS:
+ * ISD status code
+ */
+static int isd200_read_regs( struct us_data *us )
+{
+ struct isd200_info *info = (struct isd200_info *)us->extra;
+ int retStatus = ISD200_GOOD;
+ int transferStatus;
+
+ US_DEBUGP("Entering isd200_IssueATAReadRegs\n");
+
+ transferStatus = isd200_action( us, ACTION_READ_STATUS,
+ info->RegsBuf, sizeof(info->ATARegs) );
+ if (transferStatus != ISD200_TRANSPORT_GOOD) {
+ US_DEBUGP(" Error reading ATA registers\n");
+ retStatus = ISD200_ERROR;
+ } else {
+ memcpy(info->ATARegs, info->RegsBuf, sizeof(info->ATARegs));
+ US_DEBUGP(" Got ATA Register[IDE_ERROR_OFFSET] = 0x%x\n",
+ info->ATARegs[IDE_ERROR_OFFSET]);
+ }
+
+ return retStatus;
+}
+
+
+/**************************************************************************
+ * 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.
+ */
+static void isd200_invoke_transport( struct us_data *us,
+ struct scsi_cmnd *srb,
+ union ata_cdb *ataCdb )
+{
+ int need_auto_sense = 0;
+ int transferStatus;
+ int result;
+
+ /* send the command to the transport layer */
+ memcpy(srb->cmnd, ataCdb, sizeof(ataCdb->generic));
+ srb->cmd_len = sizeof(ataCdb->generic);
+ transferStatus = usb_stor_Bulk_transport(srb, us);
+
+ /* if the command gets aborted by the higher layers, we need to
+ * short-circuit all other processing
+ */
+ if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) {
+ US_DEBUGP("-- command was aborted\n");
+ goto Handle_Abort;
+ }
+
+ switch (transferStatus) {
+
+ case USB_STOR_TRANSPORT_GOOD:
+ /* Indicate a good result */
+ srb->result = SAM_STAT_GOOD;
+ break;
+
+ case USB_STOR_TRANSPORT_NO_SENSE:
+ US_DEBUGP("-- transport indicates protocol failure\n");
+ srb->result = SAM_STAT_CHECK_CONDITION;
+ return;
+
+ case USB_STOR_TRANSPORT_FAILED:
+ US_DEBUGP("-- transport indicates command failure\n");
+ need_auto_sense = 1;
+ break;
+
+ case USB_STOR_TRANSPORT_ERROR:
+ US_DEBUGP("-- transport indicates transport error\n");
+ srb->result = DID_ERROR << 16;
+ /* Need reset here */
+ return;
+
+ default:
+ US_DEBUGP("-- transport indicates unknown error\n");
+ srb->result = DID_ERROR << 16;
+ /* Need reset here */
+ return;
+ }
+
+ if ((srb->resid > 0) &&
+ !((srb->cmnd[0] == REQUEST_SENSE) ||
+ (srb->cmnd[0] == INQUIRY) ||
+ (srb->cmnd[0] == MODE_SENSE) ||
+ (srb->cmnd[0] == LOG_SENSE) ||
+ (srb->cmnd[0] == MODE_SENSE_10))) {
+ US_DEBUGP("-- unexpectedly short transfer\n");
+ need_auto_sense = 1;
+ }
+
+ if (need_auto_sense) {
+ result = isd200_read_regs(us);
+ if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) {
+ US_DEBUGP("-- auto-sense aborted\n");
+ goto Handle_Abort;
+ }
+ if (result == ISD200_GOOD) {
+ isd200_build_sense(us, srb);
+ srb->result = SAM_STAT_CHECK_CONDITION;
+
+ /* If things are really okay, then let's show that */
+ if ((srb->sense_buffer[2] & 0xf) == 0x0)
+ srb->result = SAM_STAT_GOOD;
+ } else {
+ srb->result = DID_ERROR << 16;
+ /* Need reset here */
+ }
+ }
+
+ /* Regardless of auto-sense, if we _know_ we have an error
+ * condition, show that in the result code
+ */
+ if (transferStatus == USB_STOR_TRANSPORT_FAILED)
+ srb->result = SAM_STAT_CHECK_CONDITION;
+ return;
+
+ /* abort processing: the bulk-only transport requires a reset
+ * following an abort */
+ Handle_Abort:
+ srb->result = DID_ABORT << 16;
+
+ /* permit the reset transfer to take place */
+ clear_bit(US_FLIDX_ABORTING, &us->flags);
+ /* Need reset here */
+}
+
+#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
+ *
+ * Write the ISD200 Configuration data
+ *
+ * RETURNS:
+ * ISD status code
+ */
+static int isd200_write_config( struct us_data *us )
+{
+ struct isd200_info *info = (struct isd200_info *)us->extra;
+ 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_ctrl_transfer(
+ us,
+ us->send_ctrl_pipe,
+ 0x01,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
+ 0x0000,
+ 0x0002,
+ (void *) &info->ConfigData,
+ sizeof(info->ConfigData));
+
+ if (result >= 0) {
+ US_DEBUGP(" ISD200 Config Data was written successfully\n");
+ } else {
+ US_DEBUGP(" Request to write ISD200 Config Data failed!\n");
+ retStatus = ISD200_ERROR;
+ }
+
+ US_DEBUGP("Leaving isd200_write_config %08X\n", retStatus);
+ return retStatus;
+}
+
+
+/**************************************************************************
+ * isd200_read_config
+ *
+ * Reads the ISD200 Configuration data
+ *
+ * RETURNS:
+ * ISD status code
+ */
+static int isd200_read_config( struct us_data *us )
+{
+ struct isd200_info *info = (struct isd200_info *)us->extra;
+ int retStatus = ISD200_GOOD;
+ int result;
+
+ US_DEBUGP("Entering isd200_read_config\n");
+
+ /* read the configuration information from ISD200. Use this to */
+ /* determine what the special ATA CDB bytes are. */
+
+ result = usb_stor_ctrl_transfer(
+ us,
+ us->recv_ctrl_pipe,
+ 0x02,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
+ 0x0000,
+ 0x0002,
+ (void *) &info->ConfigData,
+ sizeof(info->ConfigData));
+
+
+ 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");
+ retStatus = ISD200_ERROR;
+ }
+
+ US_DEBUGP("Leaving isd200_read_config %08X\n", retStatus);
+ return retStatus;
+}
+
+
+/**************************************************************************
+ * isd200_atapi_soft_reset
+ *
+ * Perform an Atapi Soft Reset on the device
+ *
+ * RETURNS:
+ * NT status code
+ */
+static int isd200_atapi_soft_reset( struct us_data *us )
+{
+ int retStatus = ISD200_GOOD;
+ int transferStatus;
+
+ US_DEBUGP("Entering isd200_atapi_soft_reset\n");
+
+ transferStatus = isd200_action( us, ACTION_SOFT_RESET, NULL, 0 );
+ if (transferStatus != ISD200_TRANSPORT_GOOD) {
+ US_DEBUGP(" Error issuing Atapi Soft Reset\n");
+ retStatus = ISD200_ERROR;
+ }
+
+ US_DEBUGP("Leaving isd200_atapi_soft_reset %08X\n", retStatus);
+ return retStatus;
+}
+
+
+/**************************************************************************
+ * isd200_srst
+ *
+ * Perform an SRST on the device
+ *
+ * RETURNS:
+ * ISD status code
+ */
+static int isd200_srst( struct us_data *us )
+{
+ int retStatus = ISD200_GOOD;
+ int transferStatus;
+
+ US_DEBUGP("Entering isd200_SRST\n");
+
+ transferStatus = isd200_action( us, ACTION_RESET, NULL, 0 );
+
+ /* check to see if this request failed */
+ if (transferStatus != ISD200_TRANSPORT_GOOD) {
+ US_DEBUGP(" Error issuing SRST\n");
+ retStatus = ISD200_ERROR;
+ } else {
+ /* delay 10ms to give the drive a chance to see it */
+ msleep(10);
+
+ transferStatus = isd200_action( us, ACTION_REENABLE, NULL, 0 );
+ if (transferStatus != ISD200_TRANSPORT_GOOD) {
+ US_DEBUGP(" Error taking drive out of reset\n");
+ retStatus = ISD200_ERROR;
+ } else {
+ /* delay 50ms to give the drive a chance to recover after SRST */
+ msleep(50);
+ }
+ }
+
+ US_DEBUGP("Leaving isd200_srst %08X\n", retStatus);
+ return retStatus;
+}
+
+
+/**************************************************************************
+ * isd200_try_enum
+ *
+ * Helper function for isd200_manual_enum(). Does ENUM and READ_STATUS
+ * and tries to analyze the status registers
+ *
+ * RETURNS:
+ * ISD status code
+ */
+static int isd200_try_enum(struct us_data *us, unsigned char master_slave,
+ int detect )
+{
+ int status = ISD200_GOOD;
+ unsigned long endTime;
+ struct isd200_info *info = (struct isd200_info *)us->extra;
+ unsigned char *regs = info->RegsBuf;
+ int recheckAsMaster = 0;
+
+ if ( detect )
+ endTime = jiffies + ISD200_ENUM_DETECT_TIMEOUT * HZ;
+ else
+ endTime = jiffies + ISD200_ENUM_BSY_TIMEOUT * HZ;
+
+ /* loop until we detect !BSY or timeout */
+ while(1) {
+#ifdef CONFIG_USB_STORAGE_DEBUG
+ char* mstr = master_slave == ATA_ADDRESS_DEVHEAD_STD ?
+ "Master" : "Slave";
+#endif
+
+ status = isd200_action( us, ACTION_ENUM, NULL, master_slave );
+ if ( status != ISD200_GOOD )
+ break;
+
+ status = isd200_action( us, ACTION_READ_STATUS,
+ regs, 8 );
+ if ( status != ISD200_GOOD )
+ break;
+
+ if (!detect) {
+ if (regs[IDE_STATUS_OFFSET] & BUSY_STAT ) {
+ US_DEBUGP(" %s status is still BSY, try again...\n",mstr);
+ } else {
+ US_DEBUGP(" %s status !BSY, continue with next operation\n",mstr);
+ break;
+ }
+ }
+ /* check for BUSY_STAT and */
+ /* WRERR_STAT (workaround ATA Zip drive) and */
+ /* ERR_STAT (workaround for Archos CD-ROM) */
+ else if (regs[IDE_STATUS_OFFSET] &
+ (BUSY_STAT | WRERR_STAT | ERR_STAT )) {
+ US_DEBUGP(" Status indicates it is not ready, try again...\n");
+ }
+ /* check for DRDY, ATA devices set DRDY after SRST */
+ else if (regs[IDE_STATUS_OFFSET] & READY_STAT) {
+ US_DEBUGP(" Identified ATA device\n");
+ info->DeviceFlags |= DF_ATA_DEVICE;
+ info->DeviceHead = master_slave;
+ break;
+ }
+ /* check Cylinder High/Low to
+ determine if it is an ATAPI device
+ */
+ else if ((regs[IDE_HCYL_OFFSET] == 0xEB) &&
+ (regs[IDE_LCYL_OFFSET] == 0x14)) {
+ /* It seems that the RICOH
+ MP6200A CD/RW drive will
+ report itself okay as a
+ slave when it is really a
+ master. So this check again
+ as a master device just to
+ make sure it doesn't report
+ itself okay as a master also
+ */
+ if ((master_slave & ATA_ADDRESS_DEVHEAD_SLAVE) &&
+ !recheckAsMaster) {
+ US_DEBUGP(" Identified ATAPI device as slave. Rechecking again as master\n");
+ recheckAsMaster = 1;
+ master_slave = ATA_ADDRESS_DEVHEAD_STD;
+ } else {
+ US_DEBUGP(" Identified ATAPI device\n");
+ info->DeviceHead = master_slave;
+
+ status = isd200_atapi_soft_reset(us);
+ 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
+ US_DEBUGP(" Device detect timeout!\n");
+ break;
+ }
+ }
+
+ return status;
+}
+
+/**************************************************************************
+ * isd200_manual_enum
+ *
+ * Determines if the drive attached is an ATA or ATAPI and if it is a
+ * master or slave.
+ *
+ * RETURNS:
+ * ISD status code
+ */
+static int isd200_manual_enum(struct us_data *us)
+{
+ struct isd200_info *info = (struct isd200_info *)us->extra;
+ int retStatus = ISD200_GOOD;
+
+ US_DEBUGP("Entering isd200_manual_enum\n");
+
+ retStatus = isd200_read_config(us);
+ if (retStatus == ISD200_GOOD) {
+ int isslave;
+ /* master or slave? */
+ retStatus = isd200_try_enum( us, ATA_ADDRESS_DEVHEAD_STD, 0);
+ if (retStatus == ISD200_GOOD)
+ retStatus = isd200_try_enum( us, ATA_ADDRESS_DEVHEAD_SLAVE, 0);
+
+ if (retStatus == ISD200_GOOD) {
+ retStatus = isd200_srst(us);
+ if (retStatus == ISD200_GOOD)
+ /* ata or atapi? */
+ retStatus = isd200_try_enum( us, ATA_ADDRESS_DEVHEAD_STD, 1);
+ }
+
+ 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);
+ }
+ }
+
+ US_DEBUGP("Leaving isd200_manual_enum %08X\n", retStatus);
+ return(retStatus);
+}
+
+
+/**************************************************************************
+ * isd200_get_inquiry_data
+ *
+ * Get inquiry data
+ *
+ * RETURNS:
+ * ISD status code
+ */
+static int isd200_get_inquiry_data( struct us_data *us )
+{
+ struct isd200_info *info = (struct isd200_info *)us->extra;
+ int retStatus = ISD200_GOOD;
+ struct hd_driveid *id = info->id;
+
+ US_DEBUGP("Entering isd200_get_inquiry_data\n");
+
+ /* set default to Master */
+ info->DeviceHead = ATA_ADDRESS_DEVHEAD_STD;
+
+ /* attempt to manually enumerate this device */
+ retStatus = isd200_manual_enum(us);
+ if (retStatus == ISD200_GOOD) {
+ int transferStatus;
+
+ /* check for an ATA device */
+ if (info->DeviceFlags & DF_ATA_DEVICE) {
+ /* this must be an ATA device */
+ /* perform an ATA Command Identify */
+ transferStatus = isd200_action( us, ACTION_IDENTIFY,
+ id,
+ sizeof(struct hd_driveid) );
+ if (transferStatus != ISD200_TRANSPORT_GOOD) {
+ /* Error issuing ATA Command Identify */
+ US_DEBUGP(" Error issuing ATA Command Identify\n");
+ retStatus = ISD200_ERROR;
+ } else {
+ /* ATA Command Identify successful */
+ int i;
+ __be16 *src;
+ __u16 *dest;
+ ide_fix_driveid(id);
+
+ US_DEBUGP(" Identify Data Structure:\n");
+ US_DEBUGP(" config = 0x%x\n", id->config);
+ US_DEBUGP(" cyls = 0x%x\n", id->cyls);
+ US_DEBUGP(" heads = 0x%x\n", id->heads);
+ US_DEBUGP(" track_bytes = 0x%x\n", id->track_bytes);
+ US_DEBUGP(" sector_bytes = 0x%x\n", id->sector_bytes);
+ US_DEBUGP(" sectors = 0x%x\n", id->sectors);
+ US_DEBUGP(" serial_no[0] = 0x%x\n", id->serial_no[0]);
+ US_DEBUGP(" buf_type = 0x%x\n", id->buf_type);
+ US_DEBUGP(" buf_size = 0x%x\n", id->buf_size);
+ US_DEBUGP(" ecc_bytes = 0x%x\n", id->ecc_bytes);
+ US_DEBUGP(" fw_rev[0] = 0x%x\n", id->fw_rev[0]);
+ US_DEBUGP(" model[0] = 0x%x\n", id->model[0]);
+ US_DEBUGP(" max_multsect = 0x%x\n", id->max_multsect);
+ US_DEBUGP(" dword_io = 0x%x\n", id->dword_io);
+ US_DEBUGP(" capability = 0x%x\n", id->capability);
+ US_DEBUGP(" tPIO = 0x%x\n", id->tPIO);
+ US_DEBUGP(" tDMA = 0x%x\n", id->tDMA);
+ US_DEBUGP(" field_valid = 0x%x\n", id->field_valid);
+ US_DEBUGP(" cur_cyls = 0x%x\n", id->cur_cyls);
+ US_DEBUGP(" cur_heads = 0x%x\n", id->cur_heads);
+ US_DEBUGP(" cur_sectors = 0x%x\n", id->cur_sectors);
+ US_DEBUGP(" cur_capacity = 0x%x\n", (id->cur_capacity1 << 16) + id->cur_capacity0 );
+ US_DEBUGP(" multsect = 0x%x\n", id->multsect);
+ US_DEBUGP(" lba_capacity = 0x%x\n", id->lba_capacity);
+ US_DEBUGP(" command_set_1 = 0x%x\n", id->command_set_1);
+ US_DEBUGP(" command_set_2 = 0x%x\n", id->command_set_2);
+
+ memset(&info->InquiryData, 0, sizeof(info->InquiryData));
+
+ /* Standard IDE interface only supports disks */
+ info->InquiryData.DeviceType = DIRECT_ACCESS_DEVICE;
+
+ /* The length must be at least 36 (5 + 31) */
+ info->InquiryData.AdditionalLength = 0x1F;
+
+ if (id->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 = (__be16*)id->model;
+ dest = (__u16*)info->InquiryData.VendorId;
+ for (i=0;i<4;i++)
+ dest[i] = be16_to_cpu(src[i]);
+
+ src = (__be16*)(id->model+8);
+ dest = (__u16*)info->InquiryData.ProductId;
+ for (i=0;i<8;i++)
+ dest[i] = be16_to_cpu(src[i]);
+
+ src = (__be16*)id->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 (id->command_set_2 & COMMANDSET_MEDIA_STATUS) {
+ US_DEBUGP(" Device supports Media Status Notification\n");
+
+ /* Indicate that it is enabled, even though it is not
+ * This allows the lock/unlock of the media to work
+ * correctly.
+ */
+ info->DeviceFlags |= DF_MEDIA_STATUS_ENABLED;
+ }
+ else
+ info->DeviceFlags &= ~DF_MEDIA_STATUS_ENABLED;
+
+ }
+ } else {
+ /*
+ * this must be an ATAPI device
+ * use an ATAPI protocol (Transparent SCSI)
+ */
+ us->protocol_name = "Transparent SCSI";
+ us->proto_handler = usb_stor_transparent_scsi_command;
+
+ US_DEBUGP("Protocol changed to: %s\n", us->protocol_name);
+
+ /* Free driver structure */
+ us->extra_destructor(info);
+ us->extra = NULL;
+ us->extra_destructor = NULL;
+ }
+ }
+
+ US_DEBUGP("Leaving isd200_get_inquiry_data %08X\n", retStatus);
+
+ return(retStatus);
+}
+
+
+/**************************************************************************
+ * isd200_scsi_to_ata
+ *
+ * Translate SCSI commands to ATA commands.
+ *
+ * RETURNS:
+ * 1 if the command needs to be sent to the transport layer
+ * 0 otherwise
+ */
+static int isd200_scsi_to_ata(struct scsi_cmnd *srb, struct us_data *us,
+ union ata_cdb * ataCdb)
+{
+ struct isd200_info *info = (struct isd200_info *)us->extra;
+ struct hd_driveid *id = info->id;
+ int sendToTransport = 1;
+ unsigned char sectnum, head;
+ unsigned short cylinder;
+ unsigned long lba;
+ unsigned long blockCount;
+ unsigned char senseData[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ memset(ataCdb, 0, sizeof(union ata_cdb));
+
+ /* SCSI Command */
+ switch (srb->cmnd[0]) {
+ case INQUIRY:
+ US_DEBUGP(" ATA OUT - INQUIRY\n");
+
+ /* copy InquiryData */
+ usb_stor_set_xfer_buf((unsigned char *) &info->InquiryData,
+ sizeof(info->InquiryData), srb);
+ srb->result = SAM_STAT_GOOD;
+ sendToTransport = 0;
+ break;
+
+ case MODE_SENSE:
+ US_DEBUGP(" ATA OUT - SCSIOP_MODE_SENSE\n");
+
+ /* Initialize the return buffer */
+ usb_stor_set_xfer_buf(senseData, sizeof(senseData), srb);
+
+ if (info->DeviceFlags & DF_MEDIA_STATUS_ENABLED)
+ {
+ 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 {
+ US_DEBUGP(" Media Status not supported, just report okay\n");
+ srb->result = SAM_STAT_GOOD;
+ sendToTransport = 0;
+ }
+ break;
+
+ case TEST_UNIT_READY:
+ US_DEBUGP(" ATA OUT - SCSIOP_TEST_UNIT_READY\n");
+
+ if (info->DeviceFlags & DF_MEDIA_STATUS_ENABLED)
+ {
+ 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 {
+ US_DEBUGP(" Media Status not supported, just report okay\n");
+ srb->result = SAM_STAT_GOOD;
+ sendToTransport = 0;
+ }
+ break;
+
+ case READ_CAPACITY:
+ {
+ unsigned long capacity;
+ struct read_capacity_data readCapacityData;
+
+ US_DEBUGP(" ATA OUT - SCSIOP_READ_CAPACITY\n");
+
+ if (id->capability & CAPABILITY_LBA ) {
+ capacity = id->lba_capacity - 1;
+ } else {
+ capacity = (id->heads *
+ id->cyls *
+ id->sectors) - 1;
+ }
+ readCapacityData.LogicalBlockAddress = cpu_to_be32(capacity);
+ readCapacityData.BytesPerBlock = cpu_to_be32(0x200);
+
+ usb_stor_set_xfer_buf((unsigned char *) &readCapacityData,
+ sizeof(readCapacityData), srb);
+ srb->result = SAM_STAT_GOOD;
+ sendToTransport = 0;
+ }
+ break;
+
+ case READ_10:
+ US_DEBUGP(" ATA OUT - SCSIOP_READ\n");
+
+ lba = be32_to_cpu(*(__be32 *)&srb->cmnd[2]);
+ blockCount = (unsigned long)srb->cmnd[7]<<8 | (unsigned long)srb->cmnd[8];
+
+ if (id->capability & CAPABILITY_LBA) {
+ sectnum = (unsigned char)(lba);
+ cylinder = (unsigned short)(lba>>8);
+ head = ATA_ADDRESS_DEVHEAD_LBA_MODE | (unsigned char)(lba>>24 & 0x0F);
+ } else {
+ sectnum = (unsigned char)((lba % id->sectors) + 1);
+ cylinder = (unsigned short)(lba / (id->sectors *
+ id->heads));
+ head = (unsigned char)((lba / id->sectors) %
+ id->heads);
+ }
+ 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;
+
+ case WRITE_10:
+ US_DEBUGP(" ATA OUT - SCSIOP_WRITE\n");
+
+ lba = be32_to_cpu(*(__be32 *)&srb->cmnd[2]);
+ blockCount = (unsigned long)srb->cmnd[7]<<8 | (unsigned long)srb->cmnd[8];
+
+ if (id->capability & CAPABILITY_LBA) {
+ sectnum = (unsigned char)(lba);
+ cylinder = (unsigned short)(lba>>8);
+ head = ATA_ADDRESS_DEVHEAD_LBA_MODE | (unsigned char)(lba>>24 & 0x0F);
+ } else {
+ sectnum = (unsigned char)((lba % id->sectors) + 1);
+ cylinder = (unsigned short)(lba / (id->sectors * id->heads));
+ head = (unsigned char)((lba / id->sectors) % id->heads);
+ }
+ 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;
+
+ case ALLOW_MEDIUM_REMOVAL:
+ US_DEBUGP(" ATA OUT - SCSIOP_MEDIUM_REMOVAL\n");
+
+ if (info->DeviceFlags & DF_REMOVABLE_MEDIA) {
+ US_DEBUGP(" srb->cmnd[4] = 0x%X\n", srb->cmnd[4]);
+
+ 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;
+ } else {
+ US_DEBUGP(" Not removeable media, just report okay\n");
+ srb->result = SAM_STAT_GOOD;
+ sendToTransport = 0;
+ }
+ break;
+
+ case START_STOP:
+ US_DEBUGP(" ATA OUT - SCSIOP_START_STOP_UNIT\n");
+ US_DEBUGP(" srb->cmnd[4] = 0x%X\n", srb->cmnd[4]);
+
+ if ((srb->cmnd[4] & 0x3) == 0x2) {
+ US_DEBUGP(" Media Eject\n");
+ 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 {
+ US_DEBUGP(" Nothing to do, just report okay\n");
+ srb->result = SAM_STAT_GOOD;
+ sendToTransport = 0;
+ }
+ break;
+
+ default:
+ US_DEBUGP("Unsupported SCSI command - 0x%X\n", srb->cmnd[0]);
+ srb->result = DID_ERROR << 16;
+ sendToTransport = 0;
+ break;
+ }
+
+ return(sendToTransport);
+}
+
+
+/**************************************************************************
+ * isd200_free_info
+ *
+ * Frees the driver structure.
+ */
+static void isd200_free_info_ptrs(void *info_)
+{
+ struct isd200_info *info = (struct isd200_info *) info_;
+
+ if (info) {
+ kfree(info->id);
+ kfree(info->RegsBuf);
+ }
+}
+
+/**************************************************************************
+ * isd200_init_info
+ *
+ * Allocates (if necessary) and initializes the driver structure.
+ *
+ * RETURNS:
+ * ISD status code
+ */
+static int isd200_init_info(struct us_data *us)
+{
+ int retStatus = ISD200_GOOD;
+ struct isd200_info *info;
+
+ info = (struct isd200_info *)
+ kmalloc(sizeof(struct isd200_info), GFP_KERNEL);
+ if (!info)
+ retStatus = ISD200_ERROR;
+ else {
+ memset(info, 0, sizeof(struct isd200_info));
+ info->id = (struct hd_driveid *)
+ kmalloc(sizeof(struct hd_driveid), GFP_KERNEL);
+ info->RegsBuf = (unsigned char *)
+ kmalloc(sizeof(info->ATARegs), GFP_KERNEL);
+ if (!info->id || !info->RegsBuf) {
+ isd200_free_info_ptrs(info);
+ kfree(info);
+ retStatus = ISD200_ERROR;
+ } else
+ memset(info->id, 0, sizeof(struct hd_driveid));
+ }
+
+ if (retStatus == ISD200_GOOD) {
+ us->extra = info;
+ us->extra_destructor = isd200_free_info_ptrs;
+ } else
+ US_DEBUGP("ERROR - kmalloc failure\n");
+
+ return(retStatus);
+}
+
+/**************************************************************************
+ * Initialization for the ISD200
+ */
+
+int isd200_Initialization(struct us_data *us)
+{
+ US_DEBUGP("ISD200 Initialization...\n");
+
+ /* Initialize ISD200 info struct */
+
+ if (isd200_init_info(us) == ISD200_ERROR) {
+ US_DEBUGP("ERROR Initializing ISD200 Info struct\n");
+ } else {
+ /* Get device specific data */
+
+ if (isd200_get_inquiry_data(us) != ISD200_GOOD)
+ US_DEBUGP("ISD200 Initialization Failure\n");
+ else
+ US_DEBUGP("ISD200 Initialization complete\n");
+ }
+
+ return 0;
+}
+
+
+/**************************************************************************
+ * Protocol and Transport for the ISD200 ASIC
+ *
+ * This protocol and transport are for ATA devices connected to an ISD200
+ * ASIC. An ATAPI device that is conected as a slave device will be
+ * detected in the driver initialization function and the protocol will
+ * be changed to an ATAPI protocol (Transparent SCSI).
+ *
+ */
+
+void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us)
+{
+ int sendToTransport = 1;
+ union ata_cdb ataCdb;
+
+ /* Make sure driver was initialized */
+
+ if (us->extra == NULL)
+ US_DEBUGP("ERROR Driver not initialized\n");
+
+ /* Convert command */
+ srb->resid = 0;
+ sendToTransport = isd200_scsi_to_ata(srb, us, &ataCdb);
+
+ /* send the command to the transport layer */
+ if (sendToTransport)
+ isd200_invoke_transport(us, srb, &ataCdb);
+}
diff --git a/drivers/usb/storage/isd200.h b/drivers/usb/storage/isd200.h
new file mode 100644
index 000000000000..0a35f4fa78f8
--- /dev/null
+++ b/drivers/usb/storage/isd200.h
@@ -0,0 +1,31 @@
+/* Header File for In-System Design, Inc. ISD200 ASIC
+ *
+ * First release
+ *
+ * Current development and maintenance by:
+ * (c) 2000 In-System Design, Inc. (support@in-system.com)
+ *
+ * See isd200.c for more information.
+ *
+ * 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, 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.
+ */
+
+#ifndef _USB_ISD200_H
+#define _USB_ISD200_H
+
+extern void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us);
+extern int isd200_Initialization(struct us_data *us);
+
+#endif
diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c
new file mode 100644
index 000000000000..aff9d51c327c
--- /dev/null
+++ b/drivers/usb/storage/jumpshot.c
@@ -0,0 +1,596 @@
+/* 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 <stern@rowland.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 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, 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.
+ */
+
+ /*
+ * This driver attempts to support the Lexar Jumpshot USB CompactFlash
+ * reader. Like many other USB CompactFlash readers, the Jumpshot contains
+ * a USB-to-ATA chip.
+ *
+ * This driver supports reading and writing. If you're truly paranoid,
+ * however, you can force the driver into a write-protected state by setting
+ * the WP enable bits in jumpshot_handle_mode_sense. See the comments
+ * in that routine.
+ */
+
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+
+#include "usb.h"
+#include "transport.h"
+#include "protocol.h"
+#include "debug.h"
+#include "jumpshot.h"
+
+
+static inline int jumpshot_bulk_read(struct us_data *us,
+ unsigned char *data,
+ unsigned int len)
+{
+ if (len == 0)
+ return USB_STOR_XFER_GOOD;
+
+ US_DEBUGP("jumpshot_bulk_read: len = %d\n", len);
+ return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
+ data, len, NULL);
+}
+
+
+static inline int jumpshot_bulk_write(struct us_data *us,
+ unsigned char *data,
+ unsigned int len)
+{
+ if (len == 0)
+ return USB_STOR_XFER_GOOD;
+
+ US_DEBUGP("jumpshot_bulk_write: len = %d\n", len);
+ return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
+ data, len, NULL);
+}
+
+
+static int jumpshot_get_status(struct us_data *us)
+{
+ int rc;
+
+ if (!us)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ // send the setup
+ rc = usb_stor_ctrl_transfer(us, us->recv_ctrl_pipe,
+ 0, 0xA0, 0, 7, us->iobuf, 1);
+
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (us->iobuf[0] != 0x50) {
+ US_DEBUGP("jumpshot_get_status: 0x%2x\n",
+ us->iobuf[0]);
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+static int jumpshot_read_data(struct us_data *us,
+ struct jumpshot_info *info,
+ u32 sector,
+ u32 sectors)
+{
+ unsigned char *command = us->iobuf;
+ unsigned char *buffer;
+ unsigned char thistime;
+ unsigned int totallen, alloclen;
+ int len, result;
+ unsigned int sg_idx = 0, sg_offset = 0;
+
+ // we're working in LBA mode. according to the ATA spec,
+ // we can support up to 28-bit addressing. I don't know if Jumpshot
+ // supports beyond 24-bit addressing. It's kind of hard to test
+ // since it requires > 8GB CF card.
+
+ if (sector > 0x0FFFFFFF)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ totallen = sectors * info->ssize;
+
+ // Since we don't read more than 64 KB at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ alloclen = min(totallen, 65536u);
+ buffer = kmalloc(alloclen, GFP_NOIO);
+ if (buffer == NULL)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ do {
+ // loop, never allocate or transfer more than 64k at once
+ // (min(128k, 255*info->ssize) is the real limit)
+ len = min(totallen, alloclen);
+ thistime = (len / info->ssize) & 0xff;
+
+ command[0] = 0;
+ command[1] = thistime;
+ command[2] = sector & 0xFF;
+ command[3] = (sector >> 8) & 0xFF;
+ command[4] = (sector >> 16) & 0xFF;
+
+ command[5] = 0xE0 | ((sector >> 24) & 0x0F);
+ command[6] = 0x20;
+
+ // send the setup + command
+ result = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe,
+ 0, 0x20, 0, 1, command, 7);
+ if (result != USB_STOR_XFER_GOOD)
+ goto leave;
+
+ // read the result
+ result = jumpshot_bulk_read(us, buffer, len);
+ if (result != USB_STOR_XFER_GOOD)
+ goto leave;
+
+ US_DEBUGP("jumpshot_read_data: %d bytes\n", len);
+
+ // Store the data in the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &sg_idx, &sg_offset, TO_XFER_BUF);
+
+ sector += thistime;
+ totallen -= len;
+ } while (totallen > 0);
+
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_GOOD;
+
+ leave:
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_ERROR;
+}
+
+
+static int jumpshot_write_data(struct us_data *us,
+ struct jumpshot_info *info,
+ u32 sector,
+ u32 sectors)
+{
+ unsigned char *command = us->iobuf;
+ unsigned char *buffer;
+ unsigned char thistime;
+ unsigned int totallen, alloclen;
+ int len, result, waitcount;
+ unsigned int sg_idx = 0, sg_offset = 0;
+
+ // we're working in LBA mode. according to the ATA spec,
+ // we can support up to 28-bit addressing. I don't know if Jumpshot
+ // supports beyond 24-bit addressing. It's kind of hard to test
+ // since it requires > 8GB CF card.
+ //
+ if (sector > 0x0FFFFFFF)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ totallen = sectors * info->ssize;
+
+ // Since we don't write more than 64 KB at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ alloclen = min(totallen, 65536u);
+ buffer = kmalloc(alloclen, GFP_NOIO);
+ if (buffer == NULL)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ do {
+ // loop, never allocate or transfer more than 64k at once
+ // (min(128k, 255*info->ssize) is the real limit)
+
+ len = min(totallen, alloclen);
+ thistime = (len / info->ssize) & 0xff;
+
+ // Get the data from the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &sg_idx, &sg_offset, FROM_XFER_BUF);
+
+ command[0] = 0;
+ command[1] = thistime;
+ command[2] = sector & 0xFF;
+ command[3] = (sector >> 8) & 0xFF;
+ command[4] = (sector >> 16) & 0xFF;
+
+ command[5] = 0xE0 | ((sector >> 24) & 0x0F);
+ command[6] = 0x30;
+
+ // send the setup + command
+ result = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe,
+ 0, 0x20, 0, 1, command, 7);
+ if (result != USB_STOR_XFER_GOOD)
+ goto leave;
+
+ // send the data
+ result = jumpshot_bulk_write(us, buffer, len);
+ if (result != USB_STOR_XFER_GOOD)
+ goto leave;
+
+ // read the result. apparently the bulk write can complete
+ // before the jumpshot drive is finished writing. so we loop
+ // here until we get a good return code
+ waitcount = 0;
+ do {
+ result = jumpshot_get_status(us);
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ // I have not experimented to find the smallest value.
+ //
+ msleep(50);
+ }
+ } while ((result != USB_STOR_TRANSPORT_GOOD) && (waitcount < 10));
+
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ US_DEBUGP("jumpshot_write_data: Gah! Waitcount = 10. Bad write!?\n");
+
+ sector += thistime;
+ totallen -= len;
+ } while (totallen > 0);
+
+ kfree(buffer);
+ return result;
+
+ leave:
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_ERROR;
+}
+
+static int jumpshot_id_device(struct us_data *us,
+ struct jumpshot_info *info)
+{
+ unsigned char *command = us->iobuf;
+ unsigned char *reply;
+ int rc;
+
+ if (!us || !info)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ command[0] = 0xE0;
+ command[1] = 0xEC;
+ reply = kmalloc(512, GFP_NOIO);
+ if (!reply)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ // send the setup
+ rc = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe,
+ 0, 0x20, 0, 6, command, 2);
+
+ if (rc != USB_STOR_XFER_GOOD) {
+ US_DEBUGP("jumpshot_id_device: Gah! "
+ "send_control for read_capacity failed\n");
+ rc = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ // read the reply
+ rc = jumpshot_bulk_read(us, reply, 512);
+ if (rc != USB_STOR_XFER_GOOD) {
+ rc = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ info->sectors = ((u32)(reply[117]) << 24) |
+ ((u32)(reply[116]) << 16) |
+ ((u32)(reply[115]) << 8) |
+ ((u32)(reply[114]) );
+
+ rc = USB_STOR_TRANSPORT_GOOD;
+
+ leave:
+ kfree(reply);
+ return rc;
+}
+
+static int jumpshot_handle_mode_sense(struct us_data *us,
+ struct scsi_cmnd * srb,
+ int sense_6)
+{
+ static unsigned char rw_err_page[12] = {
+ 0x1, 0xA, 0x21, 1, 0, 0, 0, 0, 1, 0, 0, 0
+ };
+ static unsigned char cache_page[12] = {
+ 0x8, 0xA, 0x1, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ static unsigned char rbac_page[12] = {
+ 0x1B, 0xA, 0, 0x81, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ static unsigned char timer_page[8] = {
+ 0x1C, 0x6, 0, 0, 0, 0
+ };
+ unsigned char pc, page_code;
+ unsigned int i = 0;
+ struct jumpshot_info *info = (struct jumpshot_info *) (us->extra);
+ unsigned char *ptr = us->iobuf;
+
+ pc = srb->cmnd[2] >> 6;
+ page_code = srb->cmnd[2] & 0x3F;
+
+ switch (pc) {
+ case 0x0:
+ US_DEBUGP("jumpshot_handle_mode_sense: Current values\n");
+ break;
+ case 0x1:
+ US_DEBUGP("jumpshot_handle_mode_sense: Changeable values\n");
+ break;
+ case 0x2:
+ US_DEBUGP("jumpshot_handle_mode_sense: Default values\n");
+ break;
+ case 0x3:
+ US_DEBUGP("jumpshot_handle_mode_sense: Saves values\n");
+ break;
+ }
+
+ memset(ptr, 0, 8);
+ if (sense_6) {
+ ptr[2] = 0x00; // WP enable: 0x80
+ i = 4;
+ } else {
+ ptr[3] = 0x00; // WP enable: 0x80
+ i = 8;
+ }
+
+ switch (page_code) {
+ case 0x0:
+ // vendor-specific mode
+ info->sense_key = 0x05;
+ info->sense_asc = 0x24;
+ info->sense_ascq = 0x00;
+ return USB_STOR_TRANSPORT_FAILED;
+
+ case 0x1:
+ memcpy(ptr + i, rw_err_page, sizeof(rw_err_page));
+ i += sizeof(rw_err_page);
+ break;
+
+ case 0x8:
+ memcpy(ptr + i, cache_page, sizeof(cache_page));
+ i += sizeof(cache_page);
+ break;
+
+ case 0x1B:
+ memcpy(ptr + i, rbac_page, sizeof(rbac_page));
+ i += sizeof(rbac_page);
+ break;
+
+ case 0x1C:
+ memcpy(ptr + i, timer_page, sizeof(timer_page));
+ i += sizeof(timer_page);
+ break;
+
+ case 0x3F:
+ memcpy(ptr + i, timer_page, sizeof(timer_page));
+ i += sizeof(timer_page);
+ memcpy(ptr + i, rbac_page, sizeof(rbac_page));
+ i += sizeof(rbac_page);
+ memcpy(ptr + i, cache_page, sizeof(cache_page));
+ i += sizeof(cache_page);
+ memcpy(ptr + i, rw_err_page, sizeof(rw_err_page));
+ i += sizeof(rw_err_page);
+ break;
+ }
+
+ if (sense_6)
+ ptr[0] = i - 1;
+ else
+ ((__be16 *) ptr)[0] = cpu_to_be16(i - 2);
+ usb_stor_set_xfer_buf(ptr, i, srb);
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+
+static void jumpshot_info_destructor(void *extra)
+{
+ // this routine is a placeholder...
+ // currently, we don't allocate any extra blocks so we're okay
+}
+
+
+
+// Transport for the Lexar 'Jumpshot'
+//
+int jumpshot_transport(struct scsi_cmnd * srb, struct us_data *us)
+{
+ struct jumpshot_info *info;
+ int rc;
+ unsigned long block, blocks;
+ unsigned char *ptr = us->iobuf;
+ static unsigned char inquiry_response[8] = {
+ 0x00, 0x80, 0x00, 0x01, 0x1F, 0x00, 0x00, 0x00
+ };
+
+ 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;
+ }
+ memset(us->extra, 0, sizeof(struct jumpshot_info));
+ us->extra_destructor = jumpshot_info_destructor;
+ }
+
+ info = (struct jumpshot_info *) (us->extra);
+
+ if (srb->cmnd[0] == INQUIRY) {
+ US_DEBUGP("jumpshot_transport: INQUIRY. Returning bogus response.\n");
+ memcpy(ptr, inquiry_response, sizeof(inquiry_response));
+ fill_inquiry_response(us, ptr, 36);
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == READ_CAPACITY) {
+ info->ssize = 0x200; // hard coded 512 byte sectors as per ATA spec
+
+ rc = jumpshot_get_status(us);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ rc = jumpshot_id_device(us, info);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ US_DEBUGP("jumpshot_transport: READ_CAPACITY: %ld sectors, %ld bytes per sector\n",
+ info->sectors, info->ssize);
+
+ // build the reply
+ //
+ ((__be32 *) ptr)[0] = cpu_to_be32(info->sectors - 1);
+ ((__be32 *) ptr)[1] = cpu_to_be32(info->ssize);
+ usb_stor_set_xfer_buf(ptr, 8, srb);
+
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == MODE_SELECT_10) {
+ US_DEBUGP("jumpshot_transport: Gah! MODE_SELECT_10.\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ if (srb->cmnd[0] == READ_10) {
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8]));
+
+ US_DEBUGP("jumpshot_transport: READ_10: read block 0x%04lx count %ld\n", block, blocks);
+ return jumpshot_read_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == READ_12) {
+ // I don't think we'll ever see a READ_12 but support it anyway...
+ //
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) |
+ ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9]));
+
+ US_DEBUGP("jumpshot_transport: READ_12: read block 0x%04lx count %ld\n", block, blocks);
+ return jumpshot_read_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == WRITE_10) {
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8]));
+
+ US_DEBUGP("jumpshot_transport: WRITE_10: write block 0x%04lx count %ld\n", block, blocks);
+ return jumpshot_write_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == WRITE_12) {
+ // I don't think we'll ever see a WRITE_12 but support it anyway...
+ //
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) |
+ ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9]));
+
+ US_DEBUGP("jumpshot_transport: WRITE_12: write block 0x%04lx count %ld\n", block, blocks);
+ return jumpshot_write_data(us, info, block, blocks);
+ }
+
+
+ if (srb->cmnd[0] == TEST_UNIT_READY) {
+ US_DEBUGP("jumpshot_transport: TEST_UNIT_READY.\n");
+ return jumpshot_get_status(us);
+ }
+
+ if (srb->cmnd[0] == REQUEST_SENSE) {
+ US_DEBUGP("jumpshot_transport: REQUEST_SENSE.\n");
+
+ memset(ptr, 0, 18);
+ ptr[0] = 0xF0;
+ ptr[2] = info->sense_key;
+ ptr[7] = 11;
+ ptr[12] = info->sense_asc;
+ ptr[13] = info->sense_ascq;
+ usb_stor_set_xfer_buf(ptr, 18, srb);
+
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == MODE_SENSE) {
+ US_DEBUGP("jumpshot_transport: MODE_SENSE_6 detected\n");
+ return jumpshot_handle_mode_sense(us, srb, 1);
+ }
+
+ if (srb->cmnd[0] == MODE_SENSE_10) {
+ US_DEBUGP("jumpshot_transport: MODE_SENSE_10 detected\n");
+ return jumpshot_handle_mode_sense(us, srb, 0);
+ }
+
+ if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {
+ // sure. whatever. not like we can stop the user from popping
+ // the media out of the device (no locking doors, etc)
+ //
+ 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 = SAM_STAT_CHECK_CONDITION;
+ }
+ return rc;
+ }
+
+ US_DEBUGP("jumpshot_transport: Gah! Unknown command: %d (0x%x)\n",
+ srb->cmnd[0], srb->cmnd[0]);
+ info->sense_key = 0x05;
+ info->sense_asc = 0x20;
+ info->sense_ascq = 0x00;
+ return USB_STOR_TRANSPORT_FAILED;
+}
diff --git a/drivers/usb/storage/jumpshot.h b/drivers/usb/storage/jumpshot.h
new file mode 100644
index 000000000000..19bac9d1558f
--- /dev/null
+++ b/drivers/usb/storage/jumpshot.h
@@ -0,0 +1,39 @@
+/* Driver for Lexar "Jumpshot" USB Compact Flash reader
+ * Header File
+ *
+ * Current development and maintenance by:
+ * (c) 2000 Jimmie Mayfield (mayfield+usb@sackheads.org)
+ *
+ * See jumpshot.c for more explanation
+ *
+ * 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, 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.
+ */
+
+#ifndef _USB_JUMPSHOT_H
+#define _USB_JUMPSHOT_H
+
+extern int jumpshot_transport(struct scsi_cmnd *srb, struct us_data *us);
+
+struct jumpshot_info {
+ unsigned long sectors; // total sector count
+ unsigned long ssize; // sector size in bytes
+
+ // the following aren't used yet
+ unsigned char sense_key;
+ unsigned long sense_asc; // additional sense code
+ unsigned long sense_ascq; // additional sense code qualifier
+};
+
+#endif
diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c
new file mode 100644
index 000000000000..9ad30428d2dd
--- /dev/null
+++ b/drivers/usb/storage/protocol.c
@@ -0,0 +1,254 @@
+/* Driver for USB Mass Storage compliant devices
+ *
+ * $Id: protocol.c,v 1.14 2002/04/22 03:39:43 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)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/highmem.h>
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+
+#include "usb.h"
+#include "protocol.h"
+#include "debug.h"
+#include "scsiglue.h"
+#include "transport.h"
+
+/***********************************************************************
+ * Protocol routines
+ ***********************************************************************/
+
+void usb_stor_qic157_command(struct scsi_cmnd *srb, struct us_data *us)
+{
+ /* Pad the ATAPI command with zeros
+ *
+ * NOTE: This only works because a scsi_cmnd struct field contains
+ * a unsigned char cmnd[16], so we know we have storage available
+ */
+ for (; srb->cmd_len<12; srb->cmd_len++)
+ srb->cmnd[srb->cmd_len] = 0;
+
+ /* set command length to 12 bytes */
+ srb->cmd_len = 12;
+
+ /* send the command to the transport layer */
+ usb_stor_invoke_transport(srb, us);
+}
+
+void usb_stor_ATAPI_command(struct scsi_cmnd *srb, struct us_data *us)
+{
+ /* Pad the ATAPI command with zeros
+ *
+ * NOTE: This only works because a scsi_cmnd struct field contains
+ * a unsigned char cmnd[16], so we know we have storage available
+ */
+
+ /* Pad the ATAPI command with zeros */
+ for (; srb->cmd_len<12; srb->cmd_len++)
+ srb->cmnd[srb->cmd_len] = 0;
+
+ /* set command length to 12 bytes */
+ srb->cmd_len = 12;
+
+ /* send the command to the transport layer */
+ usb_stor_invoke_transport(srb, us);
+}
+
+
+void usb_stor_ufi_command(struct scsi_cmnd *srb, struct us_data *us)
+{
+ /* fix some commands -- this is a form of mode translation
+ * UFI devices only accept 12 byte long commands
+ *
+ * NOTE: This only works because a scsi_cmnd struct field contains
+ * a unsigned char cmnd[16], so we know we have storage available
+ */
+
+ /* Pad the ATAPI command with zeros */
+ for (; srb->cmd_len<12; srb->cmd_len++)
+ srb->cmnd[srb->cmd_len] = 0;
+
+ /* set command length to 12 bytes (this affects the transport layer) */
+ srb->cmd_len = 12;
+
+ /* XXX We should be constantly re-evaluating the need for these */
+
+ /* determine the correct data length for these commands */
+ switch (srb->cmnd[0]) {
+
+ /* for INQUIRY, UFI devices only ever return 36 bytes */
+ case INQUIRY:
+ srb->cmnd[4] = 36;
+ break;
+
+ /* again, for MODE_SENSE_10, we get the minimum (8) */
+ case MODE_SENSE_10:
+ srb->cmnd[7] = 0;
+ srb->cmnd[8] = 8;
+ break;
+
+ /* for REQUEST_SENSE, UFI devices only ever return 18 bytes */
+ case REQUEST_SENSE:
+ srb->cmnd[4] = 18;
+ break;
+ } /* end switch on cmnd[0] */
+
+ /* send the command to the transport layer */
+ usb_stor_invoke_transport(srb, us);
+}
+
+void usb_stor_transparent_scsi_command(struct scsi_cmnd *srb,
+ struct us_data *us)
+{
+ /* send the command to the transport layer */
+ usb_stor_invoke_transport(srb, us);
+}
+
+/***********************************************************************
+ * Scatter-gather transfer buffer access routines
+ ***********************************************************************/
+
+/* Copy a buffer of length buflen to/from the srb's transfer buffer.
+ * (Note: for scatter-gather transfers (srb->use_sg > 0), srb->request_buffer
+ * points to a list of s-g entries and we ignore srb->request_bufflen.
+ * For non-scatter-gather transfers, srb->request_buffer points to the
+ * transfer buffer itself and srb->request_bufflen is the buffer's length.)
+ * Update the *index and *offset variables so that the next copy will
+ * pick up from where this one left off. */
+
+unsigned int usb_stor_access_xfer_buf(unsigned char *buffer,
+ unsigned int buflen, struct scsi_cmnd *srb, unsigned int *index,
+ unsigned int *offset, enum xfer_buf_dir dir)
+{
+ unsigned int cnt;
+
+ /* If not using scatter-gather, just transfer the data directly.
+ * Make certain it will fit in the available buffer space. */
+ if (srb->use_sg == 0) {
+ if (*offset >= srb->request_bufflen)
+ return 0;
+ cnt = min(buflen, srb->request_bufflen - *offset);
+ if (dir == TO_XFER_BUF)
+ memcpy((unsigned char *) srb->request_buffer + *offset,
+ buffer, cnt);
+ else
+ memcpy(buffer, (unsigned char *) srb->request_buffer +
+ *offset, cnt);
+ *offset += cnt;
+
+ /* Using scatter-gather. We have to go through the list one entry
+ * at a time. Each s-g entry contains some number of pages, and
+ * each page has to be kmap()'ed separately. If the page is already
+ * in kernel-addressable memory then kmap() will return its address.
+ * If the page is not directly accessible -- such as a user buffer
+ * located in high memory -- then kmap() will map it to a temporary
+ * position in the kernel's virtual address space. */
+ } else {
+ struct scatterlist *sg =
+ (struct scatterlist *) srb->request_buffer
+ + *index;
+
+ /* This loop handles a single s-g list entry, which may
+ * include multiple pages. Find the initial page structure
+ * and the starting offset within the page, and update
+ * the *offset and *index values for the next loop. */
+ cnt = 0;
+ while (cnt < buflen && *index < srb->use_sg) {
+ struct page *page = sg->page +
+ ((sg->offset + *offset) >> PAGE_SHIFT);
+ unsigned int poff =
+ (sg->offset + *offset) & (PAGE_SIZE-1);
+ unsigned int sglen = sg->length - *offset;
+
+ if (sglen > buflen - cnt) {
+
+ /* Transfer ends within this s-g entry */
+ sglen = buflen - cnt;
+ *offset += sglen;
+ } else {
+
+ /* Transfer continues to next s-g entry */
+ *offset = 0;
+ ++*index;
+ ++sg;
+ }
+
+ /* Transfer the data for all the pages in this
+ * s-g entry. For each page: call kmap(), do the
+ * transfer, and call kunmap() immediately after. */
+ while (sglen > 0) {
+ unsigned int plen = min(sglen, (unsigned int)
+ PAGE_SIZE - poff);
+ unsigned char *ptr = kmap(page);
+
+ if (dir == TO_XFER_BUF)
+ memcpy(ptr + poff, buffer + cnt, plen);
+ else
+ memcpy(buffer + cnt, ptr + poff, plen);
+ kunmap(page);
+
+ /* Start at the beginning of the next page */
+ poff = 0;
+ ++page;
+ cnt += plen;
+ sglen -= plen;
+ }
+ }
+ }
+
+ /* Return the amount actually transferred */
+ return cnt;
+}
+
+/* Store the contents of buffer into srb's transfer buffer and set the
+ * SCSI residue. */
+void usb_stor_set_xfer_buf(unsigned char *buffer,
+ unsigned int buflen, struct scsi_cmnd *srb)
+{
+ unsigned int index = 0, offset = 0;
+
+ usb_stor_access_xfer_buf(buffer, buflen, srb, &index, &offset,
+ TO_XFER_BUF);
+ if (buflen < srb->request_bufflen)
+ srb->resid = srb->request_bufflen - buflen;
+}
diff --git a/drivers/usb/storage/protocol.h b/drivers/usb/storage/protocol.h
new file mode 100644
index 000000000000..02bff01ab09c
--- /dev/null
+++ b/drivers/usb/storage/protocol.h
@@ -0,0 +1,74 @@
+/* Driver for USB Mass Storage compliant devices
+ * Protocol Functions Header File
+ *
+ * $Id: protocol.h,v 1.4 2001/02/13 07:10:03 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, 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.
+ */
+
+#ifndef _PROTOCOL_H_
+#define _PROTOCOL_H_
+
+/* Sub Classes */
+
+#define US_SC_RBC 0x01 /* Typically, flash devices */
+#define US_SC_8020 0x02 /* CD-ROM */
+#define US_SC_QIC 0x03 /* QIC-157 Tapes */
+#define US_SC_UFI 0x04 /* Floppy */
+#define US_SC_8070 0x05 /* Removable media */
+#define US_SC_SCSI 0x06 /* Transparent */
+#define US_SC_ISD200 0x07 /* ISD200 ATA */
+#define US_SC_MIN US_SC_RBC
+#define US_SC_MAX US_SC_ISD200
+
+#define US_SC_DEVICE 0xff /* Use device's value */
+
+/* Protocol handling routines */
+extern void usb_stor_ATAPI_command(struct scsi_cmnd*, struct us_data*);
+extern void usb_stor_qic157_command(struct scsi_cmnd*, struct us_data*);
+extern void usb_stor_ufi_command(struct scsi_cmnd*, struct us_data*);
+extern void usb_stor_transparent_scsi_command(struct scsi_cmnd*,
+ struct us_data*);
+
+/* struct scsi_cmnd transfer buffer access utilities */
+enum xfer_buf_dir {TO_XFER_BUF, FROM_XFER_BUF};
+
+extern unsigned int usb_stor_access_xfer_buf(unsigned char *buffer,
+ unsigned int buflen, struct scsi_cmnd *srb, unsigned int *index,
+ unsigned int *offset, enum xfer_buf_dir dir);
+
+extern void usb_stor_set_xfer_buf(unsigned char *buffer,
+ unsigned int buflen, struct scsi_cmnd *srb);
+#endif
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
new file mode 100644
index 000000000000..22e48a2b0bd1
--- /dev/null
+++ b/drivers/usb/storage/scsiglue.c
@@ -0,0 +1,500 @@
+/* Driver for USB Mass Storage compliant devices
+ * SCSI layer glue code
+ *
+ * $Id: scsiglue.c,v 1.26 2002/04/22 03:39:43 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)
+ *
+ * Initial work by:
+ * (c) 1999 Michael Gee (michael@linuxspecific.com)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/slab.h>
+#include <linux/module.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_devinfo.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_eh.h>
+
+#include "usb.h"
+#include "scsiglue.h"
+#include "debug.h"
+#include "transport.h"
+#include "protocol.h"
+
+/***********************************************************************
+ * Host functions
+ ***********************************************************************/
+
+static const char* host_info(struct Scsi_Host *host)
+{
+ return "SCSI emulation for USB Mass Storage devices";
+}
+
+static int slave_alloc (struct scsi_device *sdev)
+{
+ /*
+ * Set the INQUIRY transfer length to 36. We don't use any of
+ * the extra data and many devices choke if asked for more or
+ * less than 36 bytes.
+ */
+ sdev->inquiry_len = 36;
+ return 0;
+}
+
+static int slave_configure(struct scsi_device *sdev)
+{
+ struct us_data *us = host_to_us(sdev->host);
+
+ /* Scatter-gather buffers (all but the last) must have a length
+ * divisible by the bulk maxpacket size. Otherwise a data packet
+ * would end up being short, causing a premature end to the data
+ * transfer. Since high-speed bulk pipes have a maxpacket size
+ * of 512, we'll use that as the scsi device queue's DMA alignment
+ * mask. Guaranteeing proper alignment of the first buffer will
+ * have the desired effect because, except at the beginning and
+ * the end, scatter-gather buffers follow page boundaries. */
+ blk_queue_dma_alignment(sdev->request_queue, (512 - 1));
+
+ /* Set the SCSI level to at least 2. We'll leave it at 3 if that's
+ * what is originally reported. We need this to avoid confusing
+ * the SCSI layer with devices that report 0 or 1, but need 10-byte
+ * commands (ala ATAPI devices behind certain bridges, or devices
+ * which simply have broken INQUIRY data).
+ *
+ * NOTE: This means /dev/sg programs (ala cdrecord) will get the
+ * actual information. This seems to be the preference for
+ * programs like that.
+ *
+ * NOTE: This also means that /proc/scsi/scsi and sysfs may report
+ * the actual value or the modified one, depending on where the
+ * data comes from.
+ */
+ if (sdev->scsi_level < SCSI_2)
+ sdev->scsi_level = SCSI_2;
+
+ /* According to the technical support people at Genesys Logic,
+ * devices using their chips have problems transferring more than
+ * 32 KB at a time. In practice people have found that 64 KB
+ * works okay and that's what Windows does. But we'll be
+ * conservative; people can always use the sysfs interface to
+ * increase max_sectors. */
+ if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == USB_VENDOR_ID_GENESYS &&
+ sdev->request_queue->max_sectors > 64)
+ blk_queue_max_sectors(sdev->request_queue, 64);
+
+ /* We can't put these settings in slave_alloc() because that gets
+ * called before the device type is known. Consequently these
+ * settings can't be overridden via the scsi devinfo mechanism. */
+ if (sdev->type == TYPE_DISK) {
+
+ /* Disk-type devices use MODE SENSE(6) if the protocol
+ * (SubClass) is Transparent SCSI, otherwise they use
+ * MODE SENSE(10). */
+ if (us->subclass != US_SC_SCSI)
+ sdev->use_10_for_ms = 1;
+
+ /* Many disks only accept MODE SENSE transfer lengths of
+ * 192 bytes (that's what Windows uses). */
+ sdev->use_192_bytes_for_3f = 1;
+
+ /* Some devices don't like MODE SENSE with page=0x3f,
+ * which is the command used for checking if a device
+ * is write-protected. Now that we tell the sd driver
+ * to do a 192-byte transfer with this command the
+ * majority of devices work fine, but a few still can't
+ * handle it. The sd driver will simply assume those
+ * devices are write-enabled. */
+ if (us->flags & US_FL_NO_WP_DETECT)
+ sdev->skip_ms_page_3f = 1;
+
+ /* A number of devices have problems with MODE SENSE for
+ * page x08, so we will skip it. */
+ sdev->skip_ms_page_8 = 1;
+
+ /* Some disks return the total number of blocks in response
+ * to READ CAPACITY rather than the highest block number.
+ * If this device makes that mistake, tell the sd driver. */
+ if (us->flags & US_FL_FIX_CAPACITY)
+ sdev->fix_capacity = 1;
+ } else {
+
+ /* Non-disk-type devices don't need to blacklist any pages
+ * or to force 192-byte transfer lengths for MODE SENSE.
+ * But they do need to use MODE SENSE(10). */
+ sdev->use_10_for_ms = 1;
+ }
+
+ /* Some devices choke when they receive a PREVENT-ALLOW MEDIUM
+ * REMOVAL command, so suppress those commands. */
+ if (us->flags & US_FL_NOT_LOCKABLE)
+ sdev->lockable = 0;
+
+ /* this is to satisfy the compiler, tho I don't think the
+ * return code is ever checked anywhere. */
+ return 0;
+}
+
+/* queue a command */
+/* This is always called with scsi_lock(host) held */
+static int queuecommand(struct scsi_cmnd *srb,
+ void (*done)(struct scsi_cmnd *))
+{
+ struct us_data *us = host_to_us(srb->device->host);
+
+ US_DEBUGP("%s called\n", __FUNCTION__);
+
+ /* check for state-transition errors */
+ if (us->srb != NULL) {
+ printk(KERN_ERR USB_STORAGE "Error in %s: us->srb = %p\n",
+ __FUNCTION__, us->srb);
+ return SCSI_MLQUEUE_HOST_BUSY;
+ }
+
+ /* fail the command if we are disconnecting */
+ if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
+ US_DEBUGP("Fail command during disconnect\n");
+ srb->result = DID_NO_CONNECT << 16;
+ done(srb);
+ return 0;
+ }
+
+ /* enqueue the command and wake up the control thread */
+ srb->scsi_done = done;
+ us->srb = srb;
+ up(&(us->sema));
+
+ return 0;
+}
+
+/***********************************************************************
+ * Error handling functions
+ ***********************************************************************/
+
+/* Command timeout and abort */
+/* This is always called with scsi_lock(host) held */
+static int command_abort(struct scsi_cmnd *srb)
+{
+ struct us_data *us = host_to_us(srb->device->host);
+
+ US_DEBUGP("%s called\n", __FUNCTION__);
+
+ /* Is this command still active? */
+ if (us->srb != srb) {
+ US_DEBUGP ("-- nothing to abort\n");
+ return FAILED;
+ }
+
+ /* Set the TIMED_OUT bit. Also set the ABORTING bit, but only if
+ * a device reset isn't already in progress (to avoid interfering
+ * with the reset). To prevent races with auto-reset, we must
+ * stop any ongoing USB transfers while still holding the host
+ * lock. */
+ set_bit(US_FLIDX_TIMED_OUT, &us->flags);
+ if (!test_bit(US_FLIDX_RESETTING, &us->flags)) {
+ set_bit(US_FLIDX_ABORTING, &us->flags);
+ usb_stor_stop_transport(us);
+ }
+ scsi_unlock(us_to_host(us));
+
+ /* Wait for the aborted command to finish */
+ wait_for_completion(&us->notify);
+
+ /* Reacquire the lock and allow USB transfers to resume */
+ scsi_lock(us_to_host(us));
+ clear_bit(US_FLIDX_ABORTING, &us->flags);
+ clear_bit(US_FLIDX_TIMED_OUT, &us->flags);
+ return SUCCESS;
+}
+
+/* This invokes the transport reset mechanism to reset the state of the
+ * device */
+/* This is always called with scsi_lock(host) held */
+static int device_reset(struct scsi_cmnd *srb)
+{
+ struct us_data *us = host_to_us(srb->device->host);
+ int result;
+
+ US_DEBUGP("%s called\n", __FUNCTION__);
+
+ scsi_unlock(us_to_host(us));
+
+ /* lock the device pointers and do the reset */
+ down(&(us->dev_semaphore));
+ if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
+ result = FAILED;
+ US_DEBUGP("No reset during disconnect\n");
+ } else
+ result = us->transport_reset(us);
+ up(&(us->dev_semaphore));
+
+ /* lock the host for the return */
+ scsi_lock(us_to_host(us));
+ return result;
+}
+
+/* This resets the device's USB port. */
+/* It refuses to work if there's more than one interface in
+ * the device, so that other users are not affected. */
+/* This is always called with scsi_lock(host) held */
+static int bus_reset(struct scsi_cmnd *srb)
+{
+ struct us_data *us = host_to_us(srb->device->host);
+ int result, rc;
+
+ US_DEBUGP("%s called\n", __FUNCTION__);
+
+ scsi_unlock(us_to_host(us));
+
+ /* The USB subsystem doesn't handle synchronisation between
+ * a device's several drivers. Therefore we reset only devices
+ * with just one interface, which we of course own. */
+
+ down(&(us->dev_semaphore));
+ if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
+ result = -EIO;
+ US_DEBUGP("No reset during disconnect\n");
+ } else if (us->pusb_dev->actconfig->desc.bNumInterfaces != 1) {
+ result = -EBUSY;
+ US_DEBUGP("Refusing to reset a multi-interface device\n");
+ } else {
+ rc = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf);
+ if (rc < 0) {
+ US_DEBUGP("unable to lock device for reset: %d\n", rc);
+ result = rc;
+ } else {
+ result = usb_reset_device(us->pusb_dev);
+ if (rc)
+ usb_unlock_device(us->pusb_dev);
+ US_DEBUGP("usb_reset_device returns %d\n", result);
+ }
+ }
+ up(&(us->dev_semaphore));
+
+ /* lock the host for the return */
+ scsi_lock(us_to_host(us));
+ return result < 0 ? FAILED : SUCCESS;
+}
+
+/* Report a driver-initiated device reset to the SCSI layer.
+ * Calling this for a SCSI-initiated reset is unnecessary but harmless.
+ * The caller must own the SCSI host lock. */
+void usb_stor_report_device_reset(struct us_data *us)
+{
+ int i;
+ struct Scsi_Host *host = us_to_host(us);
+
+ scsi_report_device_reset(host, 0, 0);
+ if (us->flags & US_FL_SCM_MULT_TARG) {
+ for (i = 1; i < host->max_id; ++i)
+ scsi_report_device_reset(host, 0, i);
+ }
+}
+
+/***********************************************************************
+ * /proc/scsi/ functions
+ ***********************************************************************/
+
+/* we use this macro to help us write into the buffer */
+#undef SPRINTF
+#define SPRINTF(args...) \
+ do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0)
+
+static int proc_info (struct Scsi_Host *host, char *buffer,
+ char **start, off_t offset, int length, int inout)
+{
+ struct us_data *us = host_to_us(host);
+ char *pos = buffer;
+ const char *string;
+
+ /* if someone is sending us data, just throw it away */
+ if (inout)
+ return length;
+
+ /* print the controller name */
+ SPRINTF(" Host scsi%d: usb-storage\n", host->host_no);
+
+ /* print product, vendor, and serial number strings */
+ if (us->pusb_dev->manufacturer)
+ string = us->pusb_dev->manufacturer;
+ else if (us->unusual_dev->vendorName)
+ string = us->unusual_dev->vendorName;
+ else
+ string = "Unknown";
+ SPRINTF(" Vendor: %s\n", string);
+ if (us->pusb_dev->product)
+ string = us->pusb_dev->product;
+ else if (us->unusual_dev->productName)
+ string = us->unusual_dev->productName;
+ else
+ string = "Unknown";
+ SPRINTF(" Product: %s\n", string);
+ if (us->pusb_dev->serial)
+ string = us->pusb_dev->serial;
+ else
+ string = "None";
+ SPRINTF("Serial Number: %s\n", string);
+
+ /* show the protocol and transport */
+ SPRINTF(" Protocol: %s\n", us->protocol_name);
+ SPRINTF(" Transport: %s\n", us->transport_name);
+
+ /* show the device flags */
+ if (pos < buffer + length) {
+ pos += sprintf(pos, " Quirks:");
+
+#define US_FLAG(name, value) \
+ if (us->flags & value) pos += sprintf(pos, " " #name);
+US_DO_ALL_FLAGS
+#undef US_FLAG
+
+ *(pos++) = '\n';
+ }
+
+ /*
+ * Calculate start of next buffer, and return value.
+ */
+ *start = buffer + offset;
+
+ if ((pos - buffer) < offset)
+ return (0);
+ else if ((pos - buffer - offset) < length)
+ return (pos - buffer - offset);
+ else
+ return (length);
+}
+
+/***********************************************************************
+ * Sysfs interface
+ ***********************************************************************/
+
+/* Output routine for the sysfs max_sectors file */
+static ssize_t show_max_sectors(struct device *dev, char *buf)
+{
+ struct scsi_device *sdev = to_scsi_device(dev);
+
+ return sprintf(buf, "%u\n", sdev->request_queue->max_sectors);
+}
+
+/* Input routine for the sysfs max_sectors file */
+static ssize_t store_max_sectors(struct device *dev, const char *buf,
+ size_t count)
+{
+ struct scsi_device *sdev = to_scsi_device(dev);
+ unsigned short ms;
+
+ if (sscanf(buf, "%hu", &ms) > 0 && ms <= SCSI_DEFAULT_MAX_SECTORS) {
+ blk_queue_max_sectors(sdev->request_queue, ms);
+ return strlen(buf);
+ }
+ return -EINVAL;
+}
+
+static DEVICE_ATTR(max_sectors, S_IRUGO | S_IWUSR, show_max_sectors,
+ store_max_sectors);
+
+static struct device_attribute *sysfs_device_attr_list[] = {
+ &dev_attr_max_sectors,
+ NULL,
+ };
+
+/*
+ * this defines our host template, with which we'll allocate hosts
+ */
+
+struct scsi_host_template usb_stor_host_template = {
+ /* basic userland interface stuff */
+ .name = "usb-storage",
+ .proc_name = "usb-storage",
+ .proc_info = proc_info,
+ .info = host_info,
+
+ /* command interface -- queued only */
+ .queuecommand = queuecommand,
+
+ /* error and abort handlers */
+ .eh_abort_handler = command_abort,
+ .eh_device_reset_handler = device_reset,
+ .eh_bus_reset_handler = bus_reset,
+
+ /* queue commands only, only one command per LUN */
+ .can_queue = 1,
+ .cmd_per_lun = 1,
+
+ /* unknown initiator id */
+ .this_id = -1,
+
+ .slave_alloc = slave_alloc,
+ .slave_configure = slave_configure,
+
+ /* lots of sg segments can be handled */
+ .sg_tablesize = SG_ALL,
+
+ /* limit the total size of a transfer to 120 KB */
+ .max_sectors = 240,
+
+ /* merge commands... this seems to help performance, but
+ * periodically someone should test to see which setting is more
+ * optimal.
+ */
+ .use_clustering = 1,
+
+ /* emulated HBA */
+ .emulated = 1,
+
+ /* we do our own delay after a device or bus reset */
+ .skip_settle_delay = 1,
+
+ /* sysfs device attributes */
+ .sdev_attrs = sysfs_device_attr_list,
+
+ /* module management */
+ .module = THIS_MODULE
+};
+
+/* To Report "Illegal Request: Invalid Field in CDB */
+unsigned char usb_stor_sense_invalidCDB[18] = {
+ [0] = 0x70, /* current error */
+ [2] = ILLEGAL_REQUEST, /* Illegal Request = 0x05 */
+ [7] = 0x0a, /* additional length */
+ [12] = 0x24 /* Invalid Field in CDB */
+};
+
diff --git a/drivers/usb/storage/scsiglue.h b/drivers/usb/storage/scsiglue.h
new file mode 100644
index 000000000000..d0a49af026c4
--- /dev/null
+++ b/drivers/usb/storage/scsiglue.h
@@ -0,0 +1,49 @@
+/* Driver for USB Mass Storage compliant devices
+ * SCSI Connecting Glue Header File
+ *
+ * $Id: scsiglue.h,v 1.4 2000/08/25 00:13:51 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, 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.
+ */
+
+#ifndef _SCSIGLUE_H_
+#define _SCSIGLUE_H_
+
+extern void usb_stor_report_device_reset(struct us_data *us);
+
+extern unsigned char usb_stor_sense_invalidCDB[18];
+extern struct scsi_host_template usb_stor_host_template;
+
+#endif
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
new file mode 100644
index 000000000000..0ea2f5ab66ba
--- /dev/null
+++ b/drivers/usb/storage/sddr09.c
@@ -0,0 +1,1608 @@
+/* Driver for SanDisk SDDR-09 SmartMedia reader
+ *
+ * $Id: sddr09.c,v 1.24 2002/04/22 03:39:43 mdharm Exp $
+ * (c) 2000, 2001 Robert Baruch (autophile@starband.net)
+ * (c) 2002 Andries Brouwer (aeb@cwi.nl)
+ * Developed with the assistance of:
+ * (c) 2002 Alan Stern <stern@rowland.org>
+ *
+ * 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 driver translates the "real" SCSI commands to the SDDR-09 SCSI
+ * commands.
+ *
+ * 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, 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.
+ */
+
+/*
+ * Known vendor commands: 12 bytes, first byte is opcode
+ *
+ * E7: read scatter gather
+ * E8: read
+ * E9: write
+ * EA: erase
+ * EB: reset
+ * EC: read status
+ * ED: read ID
+ * EE: write CIS (?)
+ * EF: compute checksum (?)
+ */
+
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+
+#include "usb.h"
+#include "transport.h"
+#include "protocol.h"
+#include "debug.h"
+#include "sddr09.h"
+
+
+#define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
+#define LSB_of(s) ((s)&0xFF)
+#define MSB_of(s) ((s)>>8)
+
+/* #define US_DEBUGP printk */
+
+/*
+ * First some stuff that does not belong here:
+ * data on SmartMedia and other cards, completely
+ * unrelated to this driver.
+ * Similar stuff occurs in <linux/mtd/nand_ids.h>.
+ */
+
+struct nand_flash_dev {
+ int model_id;
+ int chipshift; /* 1<<cs bytes total capacity */
+ char pageshift; /* 1<<ps bytes in a page */
+ char blockshift; /* 1<<bs pages in an erase block */
+ char zoneshift; /* 1<<zs blocks in a zone */
+ /* # of logical blocks is 125/128 of this */
+ char pageadrlen; /* length of an address in bytes - 1 */
+};
+
+/*
+ * NAND Flash Manufacturer ID Codes
+ */
+#define NAND_MFR_AMD 0x01
+#define NAND_MFR_NATSEMI 0x8f
+#define NAND_MFR_TOSHIBA 0x98
+#define NAND_MFR_SAMSUNG 0xec
+
+static inline char *nand_flash_manufacturer(int manuf_id) {
+ switch(manuf_id) {
+ case NAND_MFR_AMD:
+ return "AMD";
+ case NAND_MFR_NATSEMI:
+ return "NATSEMI";
+ case NAND_MFR_TOSHIBA:
+ return "Toshiba";
+ case NAND_MFR_SAMSUNG:
+ return "Samsung";
+ default:
+ return "unknown";
+ }
+}
+
+/*
+ * It looks like it is unnecessary to attach manufacturer to the
+ * remaining data: SSFDC prescribes manufacturer-independent id codes.
+ *
+ * 256 MB NAND flash has a 5-byte ID with 2nd byte 0xaa, 0xba, 0xca or 0xda.
+ */
+
+static struct nand_flash_dev nand_flash_ids[] = {
+ /* NAND flash */
+ { 0x6e, 20, 8, 4, 8, 2}, /* 1 MB */
+ { 0xe8, 20, 8, 4, 8, 2}, /* 1 MB */
+ { 0xec, 20, 8, 4, 8, 2}, /* 1 MB */
+ { 0x64, 21, 8, 4, 9, 2}, /* 2 MB */
+ { 0xea, 21, 8, 4, 9, 2}, /* 2 MB */
+ { 0x6b, 22, 9, 4, 9, 2}, /* 4 MB */
+ { 0xe3, 22, 9, 4, 9, 2}, /* 4 MB */
+ { 0xe5, 22, 9, 4, 9, 2}, /* 4 MB */
+ { 0xe6, 23, 9, 4, 10, 2}, /* 8 MB */
+ { 0x73, 24, 9, 5, 10, 2}, /* 16 MB */
+ { 0x75, 25, 9, 5, 10, 2}, /* 32 MB */
+ { 0x76, 26, 9, 5, 10, 3}, /* 64 MB */
+ { 0x79, 27, 9, 5, 10, 3}, /* 128 MB */
+
+ /* MASK ROM */
+ { 0x5d, 21, 9, 4, 8, 2}, /* 2 MB */
+ { 0xd5, 22, 9, 4, 9, 2}, /* 4 MB */
+ { 0xd6, 23, 9, 4, 10, 2}, /* 8 MB */
+ { 0x57, 24, 9, 4, 11, 2}, /* 16 MB */
+ { 0x58, 25, 9, 4, 12, 2}, /* 32 MB */
+ { 0,}
+};
+
+#define SIZE(a) (sizeof(a)/sizeof((a)[0]))
+
+static struct nand_flash_dev *
+nand_find_id(unsigned char id) {
+ int i;
+
+ for (i = 0; i < SIZE(nand_flash_ids); i++)
+ if (nand_flash_ids[i].model_id == id)
+ return &(nand_flash_ids[i]);
+ return NULL;
+}
+
+/*
+ * ECC computation.
+ */
+static unsigned char parity[256];
+static unsigned char ecc2[256];
+
+static void nand_init_ecc(void) {
+ int i, j, a;
+
+ parity[0] = 0;
+ for (i = 1; i < 256; i++)
+ parity[i] = (parity[i&(i-1)] ^ 1);
+
+ for (i = 0; i < 256; i++) {
+ a = 0;
+ for (j = 0; j < 8; j++) {
+ if (i & (1<<j)) {
+ if ((j & 1) == 0)
+ a ^= 0x04;
+ if ((j & 2) == 0)
+ a ^= 0x10;
+ if ((j & 4) == 0)
+ a ^= 0x40;
+ }
+ }
+ ecc2[i] = ~(a ^ (a<<1) ^ (parity[i] ? 0xa8 : 0));
+ }
+}
+
+/* compute 3-byte ecc on 256 bytes */
+static void nand_compute_ecc(unsigned char *data, unsigned char *ecc) {
+ int i, j, a;
+ unsigned char par, bit, bits[8];
+
+ par = 0;
+ for (j = 0; j < 8; j++)
+ bits[j] = 0;
+
+ /* collect 16 checksum bits */
+ for (i = 0; i < 256; i++) {
+ par ^= data[i];
+ bit = parity[data[i]];
+ for (j = 0; j < 8; j++)
+ if ((i & (1<<j)) == 0)
+ bits[j] ^= bit;
+ }
+
+ /* put 4+4+4 = 12 bits in the ecc */
+ a = (bits[3] << 6) + (bits[2] << 4) + (bits[1] << 2) + bits[0];
+ ecc[0] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0));
+
+ a = (bits[7] << 6) + (bits[6] << 4) + (bits[5] << 2) + bits[4];
+ ecc[1] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0));
+
+ ecc[2] = ecc2[par];
+}
+
+static int nand_compare_ecc(unsigned char *data, unsigned char *ecc) {
+ return (data[0] == ecc[0] && data[1] == ecc[1] && data[2] == ecc[2]);
+}
+
+static void nand_store_ecc(unsigned char *data, unsigned char *ecc) {
+ memcpy(data, ecc, 3);
+}
+
+/*
+ * The actual driver starts here.
+ */
+
+/*
+ * On my 16MB card, control blocks have size 64 (16 real control bytes,
+ * and 48 junk bytes). In reality of course the card uses 16 control bytes,
+ * so the reader makes up the remaining 48. Don't know whether these numbers
+ * depend on the card. For now a constant.
+ */
+#define CONTROL_SHIFT 6
+
+/*
+ * On my Combo CF/SM reader, the SM reader has LUN 1.
+ * (and things fail with LUN 0).
+ * It seems LUN is irrelevant for others.
+ */
+#define LUN 1
+#define LUNBITS (LUN << 5)
+
+/*
+ * LBA and PBA are unsigned ints. Special values.
+ */
+#define UNDEF 0xffffffff
+#define SPARE 0xfffffffe
+#define UNUSABLE 0xfffffffd
+
+static int erase_bad_lba_entries = 0;
+
+/* send vendor interface command (0x41) */
+/* called for requests 0, 1, 8 */
+static int
+sddr09_send_command(struct us_data *us,
+ unsigned char request,
+ unsigned char direction,
+ unsigned char *xfer_data,
+ unsigned int xfer_len) {
+ unsigned int pipe;
+ unsigned char requesttype = (0x41 | direction);
+ int rc;
+
+ // Get the receive or send control pipe number
+
+ if (direction == USB_DIR_IN)
+ pipe = us->recv_ctrl_pipe;
+ else
+ pipe = us->send_ctrl_pipe;
+
+ rc = usb_stor_ctrl_transfer(us, pipe, request, requesttype,
+ 0, 0, xfer_data, xfer_len);
+ return (rc == USB_STOR_XFER_GOOD ? USB_STOR_TRANSPORT_GOOD :
+ USB_STOR_TRANSPORT_ERROR);
+}
+
+static int
+sddr09_send_scsi_command(struct us_data *us,
+ unsigned char *command,
+ unsigned int command_len) {
+ return sddr09_send_command(us, 0, USB_DIR_OUT, command, command_len);
+}
+
+#if 0
+/*
+ * Test Unit Ready Command: 12 bytes.
+ * byte 0: opcode: 00
+ */
+static int
+sddr09_test_unit_ready(struct us_data *us) {
+ unsigned char *command = us->iobuf;
+ int result;
+
+ memset(command, 0, 6);
+ command[1] = LUNBITS;
+
+ result = sddr09_send_scsi_command(us, command, 6);
+
+ US_DEBUGP("sddr09_test_unit_ready returns %d\n", result);
+
+ return result;
+}
+#endif
+
+/*
+ * Request Sense Command: 12 bytes.
+ * byte 0: opcode: 03
+ * byte 4: data length
+ */
+static int
+sddr09_request_sense(struct us_data *us, unsigned char *sensebuf, int buflen) {
+ unsigned char *command = us->iobuf;
+ int result;
+
+ memset(command, 0, 12);
+ command[0] = 0x03;
+ command[1] = LUNBITS;
+ command[4] = buflen;
+
+ result = sddr09_send_scsi_command(us, command, 12);
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("request sense failed\n");
+ return result;
+ }
+
+ result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
+ sensebuf, buflen, NULL);
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP("request sense bulk in failed\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ } else {
+ US_DEBUGP("request sense worked\n");
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+}
+
+/*
+ * Read Command: 12 bytes.
+ * byte 0: opcode: E8
+ * byte 1: last two bits: 00: read data, 01: read blockwise control,
+ * 10: read both, 11: read pagewise control.
+ * It turns out we need values 20, 21, 22, 23 here (LUN 1).
+ * bytes 2-5: address (interpretation depends on byte 1, see below)
+ * bytes 10-11: count (idem)
+ *
+ * A page has 512 data bytes and 64 control bytes (16 control and 48 junk).
+ * A read data command gets data in 512-byte pages.
+ * A read control command gets control in 64-byte chunks.
+ * A read both command gets data+control in 576-byte chunks.
+ *
+ * Blocks are groups of 32 pages, and read blockwise control jumps to the
+ * next block, while read pagewise control jumps to the next page after
+ * reading a group of 64 control bytes.
+ * [Here 512 = 1<<pageshift, 32 = 1<<blockshift, 64 is constant?]
+ *
+ * (1 MB and 2 MB cards are a bit different, but I have only a 16 MB card.)
+ */
+
+static int
+sddr09_readX(struct us_data *us, int x, unsigned long fromaddress,
+ int nr_of_pages, int bulklen, unsigned char *buf,
+ int use_sg) {
+
+ unsigned char *command = us->iobuf;
+ int result;
+
+ command[0] = 0xE8;
+ command[1] = LUNBITS | x;
+ command[2] = MSB_of(fromaddress>>16);
+ command[3] = LSB_of(fromaddress>>16);
+ command[4] = MSB_of(fromaddress & 0xFFFF);
+ command[5] = LSB_of(fromaddress & 0xFFFF);
+ command[6] = 0;
+ command[7] = 0;
+ command[8] = 0;
+ command[9] = 0;
+ command[10] = MSB_of(nr_of_pages);
+ command[11] = LSB_of(nr_of_pages);
+
+ result = sddr09_send_scsi_command(us, command, 12);
+
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("Result for send_control in sddr09_read2%d %d\n",
+ x, result);
+ return result;
+ }
+
+ result = usb_stor_bulk_transfer_sg(us, us->recv_bulk_pipe,
+ buf, bulklen, use_sg, NULL);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP("Result for bulk_transfer in sddr09_read2%d %d\n",
+ x, result);
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Read Data
+ *
+ * fromaddress counts data shorts:
+ * increasing it by 256 shifts the bytestream by 512 bytes;
+ * the last 8 bits are ignored.
+ *
+ * nr_of_pages counts pages of size (1 << pageshift).
+ */
+static int
+sddr09_read20(struct us_data *us, unsigned long fromaddress,
+ int nr_of_pages, int pageshift, unsigned char *buf, int use_sg) {
+ int bulklen = nr_of_pages << pageshift;
+
+ /* The last 8 bits of fromaddress are ignored. */
+ return sddr09_readX(us, 0, fromaddress, nr_of_pages, bulklen,
+ buf, use_sg);
+}
+
+/*
+ * Read Blockwise Control
+ *
+ * fromaddress gives the starting position (as in read data;
+ * the last 8 bits are ignored); increasing it by 32*256 shifts
+ * the output stream by 64 bytes.
+ *
+ * count counts control groups of size (1 << controlshift).
+ * For me, controlshift = 6. Is this constant?
+ *
+ * After getting one control group, jump to the next block
+ * (fromaddress += 8192).
+ */
+static int
+sddr09_read21(struct us_data *us, unsigned long fromaddress,
+ int count, int controlshift, unsigned char *buf, int use_sg) {
+
+ int bulklen = (count << controlshift);
+ return sddr09_readX(us, 1, fromaddress, count, bulklen,
+ buf, use_sg);
+}
+
+/*
+ * Read both Data and Control
+ *
+ * fromaddress counts data shorts, ignoring control:
+ * increasing it by 256 shifts the bytestream by 576 = 512+64 bytes;
+ * the last 8 bits are ignored.
+ *
+ * nr_of_pages counts pages of size (1 << pageshift) + (1 << controlshift).
+ */
+static int
+sddr09_read22(struct us_data *us, unsigned long fromaddress,
+ int nr_of_pages, int pageshift, unsigned char *buf, int use_sg) {
+
+ int bulklen = (nr_of_pages << pageshift) + (nr_of_pages << CONTROL_SHIFT);
+ US_DEBUGP("sddr09_read22: reading %d pages, %d bytes\n",
+ nr_of_pages, bulklen);
+ return sddr09_readX(us, 2, fromaddress, nr_of_pages, bulklen,
+ buf, use_sg);
+}
+
+#if 0
+/*
+ * Read Pagewise Control
+ *
+ * fromaddress gives the starting position (as in read data;
+ * the last 8 bits are ignored); increasing it by 256 shifts
+ * the output stream by 64 bytes.
+ *
+ * count counts control groups of size (1 << controlshift).
+ * For me, controlshift = 6. Is this constant?
+ *
+ * After getting one control group, jump to the next page
+ * (fromaddress += 256).
+ */
+static int
+sddr09_read23(struct us_data *us, unsigned long fromaddress,
+ int count, int controlshift, unsigned char *buf, int use_sg) {
+
+ int bulklen = (count << controlshift);
+ return sddr09_readX(us, 3, fromaddress, count, bulklen,
+ buf, use_sg);
+}
+#endif
+
+/*
+ * Erase Command: 12 bytes.
+ * byte 0: opcode: EA
+ * bytes 6-9: erase address (big-endian, counting shorts, sector aligned).
+ *
+ * Always precisely one block is erased; bytes 2-5 and 10-11 are ignored.
+ * The byte address being erased is 2*Eaddress.
+ * The CIS cannot be erased.
+ */
+static int
+sddr09_erase(struct us_data *us, unsigned long Eaddress) {
+ unsigned char *command = us->iobuf;
+ int result;
+
+ US_DEBUGP("sddr09_erase: erase address %lu\n", Eaddress);
+
+ memset(command, 0, 12);
+ command[0] = 0xEA;
+ command[1] = LUNBITS;
+ command[6] = MSB_of(Eaddress>>16);
+ command[7] = LSB_of(Eaddress>>16);
+ command[8] = MSB_of(Eaddress & 0xFFFF);
+ command[9] = LSB_of(Eaddress & 0xFFFF);
+
+ result = sddr09_send_scsi_command(us, command, 12);
+
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ US_DEBUGP("Result for send_control in sddr09_erase %d\n",
+ result);
+
+ return result;
+}
+
+/*
+ * Write CIS Command: 12 bytes.
+ * byte 0: opcode: EE
+ * bytes 2-5: write address in shorts
+ * bytes 10-11: sector count
+ *
+ * This writes at the indicated address. Don't know how it differs
+ * from E9. Maybe it does not erase? However, it will also write to
+ * the CIS.
+ *
+ * When two such commands on the same page follow each other directly,
+ * the second one is not done.
+ */
+
+/*
+ * Write Command: 12 bytes.
+ * byte 0: opcode: E9
+ * bytes 2-5: write address (big-endian, counting shorts, sector aligned).
+ * bytes 6-9: erase address (big-endian, counting shorts, sector aligned).
+ * bytes 10-11: sector count (big-endian, in 512-byte sectors).
+ *
+ * If write address equals erase address, the erase is done first,
+ * otherwise the write is done first. When erase address equals zero
+ * no erase is done?
+ */
+static int
+sddr09_writeX(struct us_data *us,
+ unsigned long Waddress, unsigned long Eaddress,
+ int nr_of_pages, int bulklen, unsigned char *buf, int use_sg) {
+
+ unsigned char *command = us->iobuf;
+ int result;
+
+ command[0] = 0xE9;
+ command[1] = LUNBITS;
+
+ command[2] = MSB_of(Waddress>>16);
+ command[3] = LSB_of(Waddress>>16);
+ command[4] = MSB_of(Waddress & 0xFFFF);
+ command[5] = LSB_of(Waddress & 0xFFFF);
+
+ command[6] = MSB_of(Eaddress>>16);
+ command[7] = LSB_of(Eaddress>>16);
+ command[8] = MSB_of(Eaddress & 0xFFFF);
+ command[9] = LSB_of(Eaddress & 0xFFFF);
+
+ command[10] = MSB_of(nr_of_pages);
+ command[11] = LSB_of(nr_of_pages);
+
+ result = sddr09_send_scsi_command(us, command, 12);
+
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("Result for send_control in sddr09_writeX %d\n",
+ result);
+ return result;
+ }
+
+ result = usb_stor_bulk_transfer_sg(us, us->send_bulk_pipe,
+ buf, bulklen, use_sg, NULL);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP("Result for bulk_transfer in sddr09_writeX %d\n",
+ result);
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/* erase address, write same address */
+static int
+sddr09_write_inplace(struct us_data *us, unsigned long address,
+ int nr_of_pages, int pageshift, unsigned char *buf,
+ int use_sg) {
+ int bulklen = (nr_of_pages << pageshift) + (nr_of_pages << CONTROL_SHIFT);
+ return sddr09_writeX(us, address, address, nr_of_pages, bulklen,
+ buf, use_sg);
+}
+
+#if 0
+/*
+ * Read Scatter Gather Command: 3+4n bytes.
+ * byte 0: opcode E7
+ * byte 2: n
+ * bytes 4i-1,4i,4i+1: page address
+ * byte 4i+2: page count
+ * (i=1..n)
+ *
+ * This reads several pages from the card to a single memory buffer.
+ * The last two bits of byte 1 have the same meaning as for E8.
+ */
+static int
+sddr09_read_sg_test_only(struct us_data *us) {
+ unsigned char *command = us->iobuf;
+ int result, bulklen, nsg, ct;
+ unsigned char *buf;
+ unsigned long address;
+
+ nsg = bulklen = 0;
+ command[0] = 0xE7;
+ command[1] = LUNBITS;
+ command[2] = 0;
+ address = 040000; ct = 1;
+ nsg++;
+ bulklen += (ct << 9);
+ command[4*nsg+2] = ct;
+ command[4*nsg+1] = ((address >> 9) & 0xFF);
+ command[4*nsg+0] = ((address >> 17) & 0xFF);
+ command[4*nsg-1] = ((address >> 25) & 0xFF);
+
+ address = 0340000; ct = 1;
+ nsg++;
+ bulklen += (ct << 9);
+ command[4*nsg+2] = ct;
+ command[4*nsg+1] = ((address >> 9) & 0xFF);
+ command[4*nsg+0] = ((address >> 17) & 0xFF);
+ command[4*nsg-1] = ((address >> 25) & 0xFF);
+
+ address = 01000000; ct = 2;
+ nsg++;
+ bulklen += (ct << 9);
+ command[4*nsg+2] = ct;
+ command[4*nsg+1] = ((address >> 9) & 0xFF);
+ command[4*nsg+0] = ((address >> 17) & 0xFF);
+ command[4*nsg-1] = ((address >> 25) & 0xFF);
+
+ command[2] = nsg;
+
+ result = sddr09_send_scsi_command(us, command, 4*nsg+3);
+
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("Result for send_control in sddr09_read_sg %d\n",
+ result);
+ return result;
+ }
+
+ buf = (unsigned char *) kmalloc(bulklen, GFP_NOIO);
+ if (!buf)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
+ buf, bulklen, NULL);
+ kfree(buf);
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP("Result for bulk_transfer in sddr09_read_sg %d\n",
+ result);
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+#endif
+
+/*
+ * Read Status Command: 12 bytes.
+ * byte 0: opcode: EC
+ *
+ * Returns 64 bytes, all zero except for the first.
+ * bit 0: 1: Error
+ * bit 5: 1: Suspended
+ * bit 6: 1: Ready
+ * bit 7: 1: Not write-protected
+ */
+
+static int
+sddr09_read_status(struct us_data *us, unsigned char *status) {
+
+ unsigned char *command = us->iobuf;
+ unsigned char *data = us->iobuf;
+ int result;
+
+ US_DEBUGP("Reading status...\n");
+
+ memset(command, 0, 12);
+ command[0] = 0xEC;
+ command[1] = LUNBITS;
+
+ result = sddr09_send_scsi_command(us, command, 12);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
+
+ result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
+ data, 64, NULL);
+ *status = data[0];
+ return (result == USB_STOR_XFER_GOOD ?
+ USB_STOR_TRANSPORT_GOOD : USB_STOR_TRANSPORT_ERROR);
+}
+
+static int
+sddr09_read_data(struct us_data *us,
+ unsigned long address,
+ unsigned int sectors) {
+
+ struct sddr09_card_info *info = (struct sddr09_card_info *) us->extra;
+ unsigned char *buffer;
+ unsigned int lba, maxlba, pba;
+ unsigned int page, pages;
+ unsigned int len, index, offset;
+ int result;
+
+ // Since we only read in one block at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ len = min(sectors, (unsigned int) info->blocksize) * info->pagesize;
+ buffer = kmalloc(len, GFP_NOIO);
+ if (buffer == NULL) {
+ printk("sddr09_read_data: Out of memory\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ // Figure out the initial LBA and page
+ lba = address >> info->blockshift;
+ page = (address & info->blockmask);
+ maxlba = info->capacity >> (info->pageshift + info->blockshift);
+
+ // This could be made much more efficient by checking for
+ // contiguous LBA's. Another exercise left to the student.
+
+ result = USB_STOR_TRANSPORT_GOOD;
+ index = offset = 0;
+
+ while (sectors > 0) {
+
+ /* Find number of pages we can read in this block */
+ pages = min(sectors, info->blocksize - page);
+ len = pages << info->pageshift;
+
+ /* Not overflowing capacity? */
+ if (lba >= maxlba) {
+ US_DEBUGP("Error: Requested lba %u exceeds "
+ "maximum %u\n", lba, maxlba);
+ result = USB_STOR_TRANSPORT_ERROR;
+ break;
+ }
+
+ /* Find where this lba lives on disk */
+ pba = info->lba_to_pba[lba];
+
+ if (pba == UNDEF) { /* this lba was never written */
+
+ US_DEBUGP("Read %d zero pages (LBA %d) page %d\n",
+ pages, lba, page);
+
+ /* This is not really an error. It just means
+ that the block has never been written.
+ Instead of returning USB_STOR_TRANSPORT_ERROR
+ it is better to return all zero data. */
+
+ memset(buffer, 0, len);
+
+ } else {
+ US_DEBUGP("Read %d pages, from PBA %d"
+ " (LBA %d) page %d\n",
+ pages, pba, lba, page);
+
+ address = ((pba << info->blockshift) + page) <<
+ info->pageshift;
+
+ result = sddr09_read20(us, address>>1,
+ pages, info->pageshift, buffer, 0);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ break;
+ }
+
+ // Store the data in the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &index, &offset, TO_XFER_BUF);
+
+ page = 0;
+ lba++;
+ sectors -= pages;
+ }
+
+ kfree(buffer);
+ return result;
+}
+
+static unsigned int
+sddr09_find_unused_pba(struct sddr09_card_info *info, unsigned int lba) {
+ static unsigned int lastpba = 1;
+ int zonestart, end, i;
+
+ zonestart = (lba/1000) << 10;
+ end = info->capacity >> (info->blockshift + info->pageshift);
+ end -= zonestart;
+ if (end > 1024)
+ end = 1024;
+
+ for (i = lastpba+1; i < end; i++) {
+ if (info->pba_to_lba[zonestart+i] == UNDEF) {
+ lastpba = i;
+ return zonestart+i;
+ }
+ }
+ for (i = 0; i <= lastpba; i++) {
+ if (info->pba_to_lba[zonestart+i] == UNDEF) {
+ lastpba = i;
+ return zonestart+i;
+ }
+ }
+ return 0;
+}
+
+static int
+sddr09_write_lba(struct us_data *us, unsigned int lba,
+ unsigned int page, unsigned int pages,
+ unsigned char *ptr, unsigned char *blockbuffer) {
+
+ struct sddr09_card_info *info = (struct sddr09_card_info *) us->extra;
+ unsigned long address;
+ unsigned int pba, lbap;
+ unsigned int pagelen;
+ unsigned char *bptr, *cptr, *xptr;
+ unsigned char ecc[3];
+ int i, result, isnew;
+
+ lbap = ((lba % 1000) << 1) | 0x1000;
+ if (parity[MSB_of(lbap) ^ LSB_of(lbap)])
+ lbap ^= 1;
+ pba = info->lba_to_pba[lba];
+ isnew = 0;
+
+ if (pba == UNDEF) {
+ pba = sddr09_find_unused_pba(info, lba);
+ if (!pba) {
+ printk("sddr09_write_lba: Out of unused blocks\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+ info->pba_to_lba[pba] = lba;
+ info->lba_to_pba[lba] = pba;
+ isnew = 1;
+ }
+
+ if (pba == 1) {
+ /* Maybe it is impossible to write to PBA 1.
+ Fake success, but don't do anything. */
+ printk("sddr09: avoid writing to pba 1\n");
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ pagelen = (1 << info->pageshift) + (1 << CONTROL_SHIFT);
+
+ /* read old contents */
+ address = (pba << (info->pageshift + info->blockshift));
+ result = sddr09_read22(us, address>>1, info->blocksize,
+ info->pageshift, blockbuffer, 0);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
+
+ /* check old contents and fill lba */
+ for (i = 0; i < info->blocksize; i++) {
+ bptr = blockbuffer + i*pagelen;
+ cptr = bptr + info->pagesize;
+ nand_compute_ecc(bptr, ecc);
+ if (!nand_compare_ecc(cptr+13, ecc)) {
+ US_DEBUGP("Warning: bad ecc in page %d- of pba %d\n",
+ i, pba);
+ nand_store_ecc(cptr+13, ecc);
+ }
+ nand_compute_ecc(bptr+(info->pagesize / 2), ecc);
+ if (!nand_compare_ecc(cptr+8, ecc)) {
+ US_DEBUGP("Warning: bad ecc in page %d+ of pba %d\n",
+ i, pba);
+ nand_store_ecc(cptr+8, ecc);
+ }
+ cptr[6] = cptr[11] = MSB_of(lbap);
+ cptr[7] = cptr[12] = LSB_of(lbap);
+ }
+
+ /* copy in new stuff and compute ECC */
+ xptr = ptr;
+ for (i = page; i < page+pages; i++) {
+ bptr = blockbuffer + i*pagelen;
+ cptr = bptr + info->pagesize;
+ memcpy(bptr, xptr, info->pagesize);
+ xptr += info->pagesize;
+ nand_compute_ecc(bptr, ecc);
+ nand_store_ecc(cptr+13, ecc);
+ nand_compute_ecc(bptr+(info->pagesize / 2), ecc);
+ nand_store_ecc(cptr+8, ecc);
+ }
+
+ US_DEBUGP("Rewrite PBA %d (LBA %d)\n", pba, lba);
+
+ result = sddr09_write_inplace(us, address>>1, info->blocksize,
+ info->pageshift, blockbuffer, 0);
+
+ US_DEBUGP("sddr09_write_inplace returns %d\n", result);
+
+#if 0
+ {
+ unsigned char status = 0;
+ int result2 = sddr09_read_status(us, &status);
+ if (result2 != USB_STOR_TRANSPORT_GOOD)
+ US_DEBUGP("sddr09_write_inplace: cannot read status\n");
+ else if (status != 0xc0)
+ US_DEBUGP("sddr09_write_inplace: status after write: 0x%x\n",
+ status);
+ }
+#endif
+
+#if 0
+ {
+ int result2 = sddr09_test_unit_ready(us);
+ }
+#endif
+
+ return result;
+}
+
+static int
+sddr09_write_data(struct us_data *us,
+ unsigned long address,
+ unsigned int sectors) {
+
+ struct sddr09_card_info *info = (struct sddr09_card_info *) us->extra;
+ unsigned int lba, page, pages;
+ unsigned int pagelen, blocklen;
+ unsigned char *blockbuffer;
+ unsigned char *buffer;
+ unsigned int len, index, offset;
+ int result;
+
+ // blockbuffer is used for reading in the old data, overwriting
+ // with the new data, and performing ECC calculations
+
+ /* TODO: instead of doing kmalloc/kfree for each write,
+ add a bufferpointer to the info structure */
+
+ pagelen = (1 << info->pageshift) + (1 << CONTROL_SHIFT);
+ blocklen = (pagelen << info->blockshift);
+ blockbuffer = kmalloc(blocklen, GFP_NOIO);
+ if (!blockbuffer) {
+ printk("sddr09_write_data: Out of memory\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ // Since we don't write the user data directly to the device,
+ // we have to create a bounce buffer and move the data a piece
+ // at a time between the bounce buffer and the actual transfer buffer.
+
+ len = min(sectors, (unsigned int) info->blocksize) * info->pagesize;
+ buffer = kmalloc(len, GFP_NOIO);
+ if (buffer == NULL) {
+ printk("sddr09_write_data: Out of memory\n");
+ kfree(blockbuffer);
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ // Figure out the initial LBA and page
+ lba = address >> info->blockshift;
+ page = (address & info->blockmask);
+
+ result = USB_STOR_TRANSPORT_GOOD;
+ index = offset = 0;
+
+ while (sectors > 0) {
+
+ // Write as many sectors as possible in this block
+
+ pages = min(sectors, info->blocksize - page);
+ len = (pages << info->pageshift);
+
+ // Get the data from the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &index, &offset, FROM_XFER_BUF);
+
+ result = sddr09_write_lba(us, lba, page, pages,
+ buffer, blockbuffer);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ break;
+
+ page = 0;
+ lba++;
+ sectors -= pages;
+ }
+
+ kfree(buffer);
+ kfree(blockbuffer);
+
+ return result;
+}
+
+static int
+sddr09_read_control(struct us_data *us,
+ unsigned long address,
+ unsigned int blocks,
+ unsigned char *content,
+ int use_sg) {
+
+ US_DEBUGP("Read control address %lu, blocks %d\n",
+ address, blocks);
+
+ return sddr09_read21(us, address, blocks,
+ CONTROL_SHIFT, content, use_sg);
+}
+
+/*
+ * Read Device ID Command: 12 bytes.
+ * byte 0: opcode: ED
+ *
+ * Returns 2 bytes: Manufacturer ID and Device ID.
+ * On more recent cards 3 bytes: the third byte is an option code A5
+ * signifying that the secret command to read an 128-bit ID is available.
+ * On still more recent cards 4 bytes: the fourth byte C0 means that
+ * a second read ID cmd is available.
+ */
+static int
+sddr09_read_deviceID(struct us_data *us, unsigned char *deviceID) {
+ unsigned char *command = us->iobuf;
+ unsigned char *content = us->iobuf;
+ int result, i;
+
+ memset(command, 0, 12);
+ command[0] = 0xED;
+ command[1] = LUNBITS;
+
+ result = sddr09_send_scsi_command(us, command, 12);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
+
+ result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
+ content, 64, NULL);
+
+ for (i = 0; i < 4; i++)
+ deviceID[i] = content[i];
+
+ return (result == USB_STOR_XFER_GOOD ?
+ USB_STOR_TRANSPORT_GOOD : USB_STOR_TRANSPORT_ERROR);
+}
+
+static int
+sddr09_get_wp(struct us_data *us, struct sddr09_card_info *info) {
+ int result;
+ unsigned char status;
+
+ result = sddr09_read_status(us, &status);
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("sddr09_get_wp: read_status fails\n");
+ return result;
+ }
+ US_DEBUGP("sddr09_get_wp: status 0x%02X", status);
+ if ((status & 0x80) == 0) {
+ info->flags |= SDDR09_WP; /* write protected */
+ US_DEBUGP(" WP");
+ }
+ if (status & 0x40)
+ US_DEBUGP(" Ready");
+ if (status & LUNBITS)
+ US_DEBUGP(" Suspended");
+ if (status & 0x1)
+ US_DEBUGP(" Error");
+ US_DEBUGP("\n");
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+#if 0
+/*
+ * Reset Command: 12 bytes.
+ * byte 0: opcode: EB
+ */
+static int
+sddr09_reset(struct us_data *us) {
+
+ unsigned char *command = us->iobuf;
+
+ memset(command, 0, 12);
+ command[0] = 0xEB;
+ command[1] = LUNBITS;
+
+ return sddr09_send_scsi_command(us, command, 12);
+}
+#endif
+
+static struct nand_flash_dev *
+sddr09_get_cardinfo(struct us_data *us, unsigned char flags) {
+ struct nand_flash_dev *cardinfo;
+ unsigned char deviceID[4];
+ char blurbtxt[256];
+ int result;
+
+ US_DEBUGP("Reading capacity...\n");
+
+ result = sddr09_read_deviceID(us, deviceID);
+
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("Result of read_deviceID is %d\n", result);
+ printk("sddr09: could not read card info\n");
+ return NULL;
+ }
+
+ sprintf(blurbtxt, "sddr09: Found Flash card, ID = %02X %02X %02X %02X",
+ deviceID[0], deviceID[1], deviceID[2], deviceID[3]);
+
+ /* Byte 0 is the manufacturer */
+ sprintf(blurbtxt + strlen(blurbtxt),
+ ": Manuf. %s",
+ nand_flash_manufacturer(deviceID[0]));
+
+ /* Byte 1 is the device type */
+ cardinfo = nand_find_id(deviceID[1]);
+ if (cardinfo) {
+ /* MB or MiB? It is neither. A 16 MB card has
+ 17301504 raw bytes, of which 16384000 are
+ usable for user data. */
+ sprintf(blurbtxt + strlen(blurbtxt),
+ ", %d MB", 1<<(cardinfo->chipshift - 20));
+ } else {
+ sprintf(blurbtxt + strlen(blurbtxt),
+ ", type unrecognized");
+ }
+
+ /* Byte 2 is code to signal availability of 128-bit ID */
+ if (deviceID[2] == 0xa5) {
+ sprintf(blurbtxt + strlen(blurbtxt),
+ ", 128-bit ID");
+ }
+
+ /* Byte 3 announces the availability of another read ID command */
+ if (deviceID[3] == 0xc0) {
+ sprintf(blurbtxt + strlen(blurbtxt),
+ ", extra cmd");
+ }
+
+ if (flags & SDDR09_WP)
+ sprintf(blurbtxt + strlen(blurbtxt),
+ ", WP");
+
+ printk("%s\n", blurbtxt);
+
+ return cardinfo;
+}
+
+static int
+sddr09_read_map(struct us_data *us) {
+
+ struct sddr09_card_info *info = (struct sddr09_card_info *) us->extra;
+ int numblocks, alloc_len, alloc_blocks;
+ int i, j, result;
+ unsigned char *buffer, *buffer_end, *ptr;
+ unsigned int lba, lbact;
+
+ if (!info->capacity)
+ return -1;
+
+ // size of a block is 1 << (blockshift + pageshift) bytes
+ // divide into the total capacity to get the number of blocks
+
+ numblocks = info->capacity >> (info->blockshift + info->pageshift);
+
+ // read 64 bytes for every block (actually 1 << CONTROL_SHIFT)
+ // but only use a 64 KB buffer
+ // buffer size used must be a multiple of (1 << CONTROL_SHIFT)
+#define SDDR09_READ_MAP_BUFSZ 65536
+
+ alloc_blocks = min(numblocks, SDDR09_READ_MAP_BUFSZ >> CONTROL_SHIFT);
+ alloc_len = (alloc_blocks << CONTROL_SHIFT);
+ buffer = kmalloc(alloc_len, GFP_NOIO);
+ if (buffer == NULL) {
+ printk("sddr09_read_map: out of memory\n");
+ result = -1;
+ goto done;
+ }
+ buffer_end = buffer + alloc_len;
+
+#undef SDDR09_READ_MAP_BUFSZ
+
+ kfree(info->lba_to_pba);
+ 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) {
+ printk("sddr09_read_map: out of memory\n");
+ result = -1;
+ goto done;
+ }
+
+ for (i = 0; i < numblocks; i++)
+ info->lba_to_pba[i] = info->pba_to_lba[i] = UNDEF;
+
+ /*
+ * Define lba-pba translation table
+ */
+
+ ptr = buffer_end;
+ for (i = 0; i < numblocks; i++) {
+ ptr += (1 << CONTROL_SHIFT);
+ if (ptr >= buffer_end) {
+ unsigned long address;
+
+ address = i << (info->pageshift + info->blockshift);
+ result = sddr09_read_control(
+ us, address>>1,
+ min(alloc_blocks, numblocks - i),
+ buffer, 0);
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ result = -1;
+ goto done;
+ }
+ ptr = buffer;
+ }
+
+ if (i == 0 || i == 1) {
+ info->pba_to_lba[i] = UNUSABLE;
+ continue;
+ }
+
+ /* special PBAs have control field 0^16 */
+ for (j = 0; j < 16; j++)
+ if (ptr[j] != 0)
+ goto nonz;
+ info->pba_to_lba[i] = UNUSABLE;
+ printk("sddr09: PBA %d has no logical mapping\n", i);
+ continue;
+
+ nonz:
+ /* unwritten PBAs have control field FF^16 */
+ for (j = 0; j < 16; j++)
+ if (ptr[j] != 0xff)
+ goto nonff;
+ continue;
+
+ nonff:
+ /* normal PBAs start with six FFs */
+ if (j < 6) {
+ printk("sddr09: PBA %d has no logical mapping: "
+ "reserved area = %02X%02X%02X%02X "
+ "data status %02X block status %02X\n",
+ i, ptr[0], ptr[1], ptr[2], ptr[3],
+ ptr[4], ptr[5]);
+ info->pba_to_lba[i] = UNUSABLE;
+ continue;
+ }
+
+ if ((ptr[6] >> 4) != 0x01) {
+ printk("sddr09: PBA %d has invalid address field "
+ "%02X%02X/%02X%02X\n",
+ i, ptr[6], ptr[7], ptr[11], ptr[12]);
+ info->pba_to_lba[i] = UNUSABLE;
+ continue;
+ }
+
+ /* check even parity */
+ if (parity[ptr[6] ^ ptr[7]]) {
+ printk("sddr09: Bad parity in LBA for block %d"
+ " (%02X %02X)\n", i, ptr[6], ptr[7]);
+ info->pba_to_lba[i] = UNUSABLE;
+ continue;
+ }
+
+ lba = short_pack(ptr[7], ptr[6]);
+ lba = (lba & 0x07FF) >> 1;
+
+ /*
+ * Every 1024 physical blocks ("zone"), the LBA numbers
+ * go back to zero, but are within a higher block of LBA's.
+ * Also, there is a maximum of 1000 LBA's per zone.
+ * In other words, in PBA 1024-2047 you will find LBA 0-999
+ * which are really LBA 1000-1999. This allows for 24 bad
+ * or special physical blocks per zone.
+ */
+
+ if (lba >= 1000) {
+ printk("sddr09: Bad low LBA %d for block %d\n",
+ lba, i);
+ goto possibly_erase;
+ }
+
+ lba += 1000*(i/0x400);
+
+ if (info->lba_to_pba[lba] != UNDEF) {
+ printk("sddr09: LBA %d seen for PBA %d and %d\n",
+ lba, info->lba_to_pba[lba], i);
+ goto possibly_erase;
+ }
+
+ info->pba_to_lba[i] = lba;
+ info->lba_to_pba[lba] = i;
+ continue;
+
+ possibly_erase:
+ if (erase_bad_lba_entries) {
+ unsigned long address;
+
+ address = (i << (info->pageshift + info->blockshift));
+ sddr09_erase(us, address>>1);
+ info->pba_to_lba[i] = UNDEF;
+ } else
+ info->pba_to_lba[i] = UNUSABLE;
+ }
+
+ /*
+ * Approximate capacity. This is not entirely correct yet,
+ * since a zone with less than 1000 usable pages leads to
+ * missing LBAs. Especially if it is the last zone, some
+ * LBAs can be past capacity.
+ */
+ lbact = 0;
+ for (i = 0; i < numblocks; i += 1024) {
+ int ct = 0;
+
+ for (j = 0; j < 1024 && i+j < numblocks; j++) {
+ if (info->pba_to_lba[i+j] != UNUSABLE) {
+ if (ct >= 1000)
+ info->pba_to_lba[i+j] = SPARE;
+ else
+ ct++;
+ }
+ }
+ lbact += ct;
+ }
+ info->lbact = lbact;
+ US_DEBUGP("Found %d LBA's\n", lbact);
+ result = 0;
+
+ done:
+ if (result != 0) {
+ kfree(info->lba_to_pba);
+ kfree(info->pba_to_lba);
+ info->lba_to_pba = NULL;
+ info->pba_to_lba = NULL;
+ }
+ kfree(buffer);
+ return result;
+}
+
+static void
+sddr09_card_info_destructor(void *extra) {
+ struct sddr09_card_info *info = (struct sddr09_card_info *)extra;
+
+ if (!info)
+ return;
+
+ kfree(info->lba_to_pba);
+ kfree(info->pba_to_lba);
+}
+
+static void
+sddr09_init_card_info(struct us_data *us) {
+ if (!us->extra) {
+ us->extra = kmalloc(sizeof(struct sddr09_card_info), GFP_NOIO);
+ if (us->extra) {
+ memset(us->extra, 0, sizeof(struct sddr09_card_info));
+ us->extra_destructor = sddr09_card_info_destructor;
+ }
+ }
+}
+
+/*
+ * This is needed at a very early stage. If this is not listed in the
+ * unusual devices list but called from here then LUN 0 of the combo reader
+ * is not recognized. But I do not know what precisely these calls do.
+ */
+int
+sddr09_init(struct us_data *us) {
+ int result;
+ unsigned char *data = us->iobuf;
+
+ result = sddr09_send_command(us, 0x01, USB_DIR_IN, data, 2);
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("sddr09_init: send_command fails\n");
+ return result;
+ }
+
+ US_DEBUGP("SDDR09init: %02X %02X\n", data[0], data[1]);
+ // get 07 02
+
+ result = sddr09_send_command(us, 0x08, USB_DIR_IN, data, 2);
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("sddr09_init: 2nd send_command fails\n");
+ return result;
+ }
+
+ US_DEBUGP("SDDR09init: %02X %02X\n", data[0], data[1]);
+ // get 07 00
+
+ result = sddr09_request_sense(us, data, 18);
+ if (result == USB_STOR_TRANSPORT_GOOD && data[2] != 0) {
+ int j;
+ for (j=0; j<18; j++)
+ printk(" %02X", data[j]);
+ printk("\n");
+ // get 70 00 00 00 00 00 00 * 00 00 00 00 00 00
+ // 70: current command
+ // sense key 0, sense code 0, extd sense code 0
+ // additional transfer length * = sizeof(data) - 7
+ // Or: 70 00 06 00 00 00 00 0b 00 00 00 00 28 00 00 00 00 00
+ // sense key 06, sense code 28: unit attention,
+ // not ready to ready transition
+ }
+
+ // test unit ready
+
+ return USB_STOR_TRANSPORT_GOOD; /* not result */
+}
+
+/*
+ * Transport for the Sandisk SDDR-09
+ */
+int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us)
+{
+ static unsigned char sensekey = 0, sensecode = 0;
+ static unsigned char havefakesense = 0;
+ int result, i;
+ unsigned char *ptr = us->iobuf;
+ unsigned long capacity;
+ unsigned int page, pages;
+
+ struct sddr09_card_info *info;
+
+ static unsigned char inquiry_response[8] = {
+ 0x00, 0x80, 0x00, 0x02, 0x1F, 0x00, 0x00, 0x00
+ };
+
+ /* note: no block descriptor support */
+ static unsigned char mode_page_01[19] = {
+ 0x00, 0x0F, 0x00, 0x0, 0x0, 0x0, 0x00,
+ 0x01, 0x0A,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+
+ info = (struct sddr09_card_info *)us->extra;
+ if (!info) {
+ nand_init_ecc();
+ sddr09_init_card_info(us);
+ info = (struct sddr09_card_info *)us->extra;
+ if (!info)
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ if (srb->cmnd[0] == REQUEST_SENSE && havefakesense) {
+ /* for a faked command, we have to follow with a faked sense */
+ memset(ptr, 0, 18);
+ ptr[0] = 0x70;
+ ptr[2] = sensekey;
+ ptr[7] = 11;
+ ptr[12] = sensecode;
+ usb_stor_set_xfer_buf(ptr, 18, srb);
+ sensekey = sensecode = havefakesense = 0;
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ havefakesense = 1;
+
+ /* Dummy up a response for INQUIRY since SDDR09 doesn't
+ respond to INQUIRY commands */
+
+ if (srb->cmnd[0] == INQUIRY) {
+ memcpy(ptr, inquiry_response, 8);
+ fill_inquiry_response(us, ptr, 36);
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == READ_CAPACITY) {
+ struct nand_flash_dev *cardinfo;
+
+ sddr09_get_wp(us, info); /* read WP bit */
+
+ cardinfo = sddr09_get_cardinfo(us, info->flags);
+ if (!cardinfo) {
+ /* probably no media */
+ init_error:
+ sensekey = 0x02; /* not ready */
+ sensecode = 0x3a; /* medium not present */
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ info->capacity = (1 << cardinfo->chipshift);
+ info->pageshift = cardinfo->pageshift;
+ info->pagesize = (1 << info->pageshift);
+ info->blockshift = cardinfo->blockshift;
+ info->blocksize = (1 << info->blockshift);
+ info->blockmask = info->blocksize - 1;
+
+ // map initialization, must follow get_cardinfo()
+ if (sddr09_read_map(us)) {
+ /* probably out of memory */
+ goto init_error;
+ }
+
+ // Report capacity
+
+ capacity = (info->lbact << info->blockshift) - 1;
+
+ ((__be32 *) ptr)[0] = cpu_to_be32(capacity);
+
+ // Report page size
+
+ ((__be32 *) ptr)[1] = cpu_to_be32(info->pagesize);
+ usb_stor_set_xfer_buf(ptr, 8, srb);
+
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == MODE_SENSE_10) {
+ int modepage = (srb->cmnd[2] & 0x3F);
+
+ /* They ask for the Read/Write error recovery page,
+ or for all pages. */
+ /* %% We should check DBD %% */
+ if (modepage == 0x01 || modepage == 0x3F) {
+ US_DEBUGP("SDDR09: Dummy up request for "
+ "mode page 0x%x\n", modepage);
+
+ memcpy(ptr, mode_page_01, sizeof(mode_page_01));
+ ((__be16*)ptr)[0] = cpu_to_be16(sizeof(mode_page_01) - 2);
+ ptr[3] = (info->flags & SDDR09_WP) ? 0x80 : 0;
+ usb_stor_set_xfer_buf(ptr, sizeof(mode_page_01), srb);
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ sensekey = 0x05; /* illegal request */
+ sensecode = 0x24; /* invalid field in CDB */
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL)
+ return USB_STOR_TRANSPORT_GOOD;
+
+ havefakesense = 0;
+
+ if (srb->cmnd[0] == READ_10) {
+
+ page = short_pack(srb->cmnd[3], srb->cmnd[2]);
+ page <<= 16;
+ page |= short_pack(srb->cmnd[5], srb->cmnd[4]);
+ pages = short_pack(srb->cmnd[8], srb->cmnd[7]);
+
+ US_DEBUGP("READ_10: read page %d pagect %d\n",
+ page, pages);
+
+ return sddr09_read_data(us, page, pages);
+ }
+
+ if (srb->cmnd[0] == WRITE_10) {
+
+ page = short_pack(srb->cmnd[3], srb->cmnd[2]);
+ page <<= 16;
+ page |= short_pack(srb->cmnd[5], srb->cmnd[4]);
+ pages = short_pack(srb->cmnd[8], srb->cmnd[7]);
+
+ US_DEBUGP("WRITE_10: write page %d pagect %d\n",
+ page, pages);
+
+ return sddr09_write_data(us, page, pages);
+ }
+
+ /* catch-all for all other commands, except
+ * pass TEST_UNIT_READY and REQUEST_SENSE through
+ */
+ if (srb->cmnd[0] != TEST_UNIT_READY &&
+ srb->cmnd[0] != REQUEST_SENSE) {
+ sensekey = 0x05; /* illegal request */
+ sensecode = 0x20; /* invalid command */
+ havefakesense = 1;
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ for (; srb->cmd_len<12; srb->cmd_len++)
+ srb->cmnd[srb->cmd_len] = 0;
+
+ srb->cmnd[1] = LUNBITS;
+
+ ptr[0] = 0;
+ for (i=0; i<12; i++)
+ sprintf(ptr+strlen(ptr), "%02X ", srb->cmnd[i]);
+
+ US_DEBUGP("SDDR09: Send control for command %s\n", ptr);
+
+ result = sddr09_send_scsi_command(us, srb->cmnd, 12);
+ if (result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("sddr09_transport: sddr09_send_scsi_command "
+ "returns %d\n", result);
+ return result;
+ }
+
+ if (srb->request_bufflen == 0)
+ return USB_STOR_TRANSPORT_GOOD;
+
+ if (srb->sc_data_direction == DMA_TO_DEVICE ||
+ srb->sc_data_direction == DMA_FROM_DEVICE) {
+ unsigned int pipe = (srb->sc_data_direction == DMA_TO_DEVICE)
+ ? us->send_bulk_pipe : us->recv_bulk_pipe;
+
+ US_DEBUGP("SDDR09: %s %d bytes\n",
+ (srb->sc_data_direction == DMA_TO_DEVICE) ?
+ "sending" : "receiving",
+ srb->request_bufflen);
+
+ result = usb_stor_bulk_transfer_sg(us, pipe,
+ srb->request_buffer,
+ srb->request_bufflen,
+ srb->use_sg, &srb->resid);
+
+ return (result == USB_STOR_XFER_GOOD ?
+ USB_STOR_TRANSPORT_GOOD : USB_STOR_TRANSPORT_ERROR);
+ }
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
diff --git a/drivers/usb/storage/sddr09.h b/drivers/usb/storage/sddr09.h
new file mode 100644
index 000000000000..c9d78d6188b1
--- /dev/null
+++ b/drivers/usb/storage/sddr09.h
@@ -0,0 +1,48 @@
+/* Driver for SanDisk SDDR-09 SmartMedia reader
+ * Header File
+ *
+ * $Id: sddr09.h,v 1.5 2000/08/25 00:13:51 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 2000 Robert Baruch (autophile@dol.net)
+ * (c) 2002 Andries Brouwer (aeb@cwi.nl)
+ *
+ * See sddr09.c for more explanation
+ *
+ * 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, 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.
+ */
+
+#ifndef _USB_SHUTTLE_EUSB_SDDR09_H
+#define _USB_SHUTTLE_EUSB_SDDR09_H
+
+/* Sandisk SDDR-09 stuff */
+
+extern int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us);
+
+struct sddr09_card_info {
+ unsigned long capacity; /* Size of card in bytes */
+ int pagesize; /* Size of page in bytes */
+ int pageshift; /* log2 of pagesize */
+ int blocksize; /* Size of block in pages */
+ int blockshift; /* log2 of blocksize */
+ int blockmask; /* 2^blockshift - 1 */
+ int *lba_to_pba; /* logical to physical map */
+ int *pba_to_lba; /* physical to logical map */
+ int lbact; /* number of available pages */
+ int flags;
+#define SDDR09_WP 1 /* write protected */
+};
+
+#endif
diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
new file mode 100644
index 000000000000..229ca181716b
--- /dev/null
+++ b/drivers/usb/storage/sddr55.c
@@ -0,0 +1,938 @@
+/* Driver for SanDisk SDDR-55 SmartMedia reader
+ *
+ * $Id:$
+ *
+ * SDDR55 driver v0.1:
+ *
+ * First release
+ *
+ * Current development and maintenance by:
+ * (c) 2002 Simon Munton
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/jiffies.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+
+#include "usb.h"
+#include "transport.h"
+#include "protocol.h"
+#include "debug.h"
+#include "sddr55.h"
+
+
+#define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
+#define LSB_of(s) ((s)&0xFF)
+#define MSB_of(s) ((s)>>8)
+#define PAGESIZE 512
+
+#define set_sense_info(sk, asc, ascq) \
+ do { \
+ info->sense_data[2] = sk; \
+ info->sense_data[12] = asc; \
+ info->sense_data[13] = ascq; \
+ } while (0)
+
+
+struct sddr55_card_info {
+ unsigned long capacity; /* Size of card in bytes */
+ int max_log_blks; /* maximum number of logical blocks */
+ int pageshift; /* log2 of pagesize */
+ int smallpageshift; /* 1 if pagesize == 256 */
+ int blocksize; /* Size of block in pages */
+ int blockshift; /* log2 of blocksize */
+ int blockmask; /* 2^blockshift - 1 */
+ int read_only; /* non zero if card is write protected */
+ int force_read_only; /* non zero if we find a map error*/
+ int *lba_to_pba; /* logical to physical map */
+ int *pba_to_lba; /* physical to logical map */
+ int fatal_error; /* set if we detect something nasty */
+ unsigned long last_access; /* number of jiffies since we last talked to device */
+ unsigned char sense_data[18];
+};
+
+
+#define NOT_ALLOCATED 0xffffffff
+#define BAD_BLOCK 0xffff
+#define CIS_BLOCK 0x400
+#define UNUSED_BLOCK 0x3ff
+
+static int
+sddr55_bulk_transport(struct us_data *us, int direction,
+ unsigned char *data, unsigned int len) {
+ struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
+ unsigned int pipe = (direction == DMA_FROM_DEVICE) ?
+ us->recv_bulk_pipe : us->send_bulk_pipe;
+
+ if (!len)
+ return USB_STOR_XFER_GOOD;
+ info->last_access = jiffies;
+ return usb_stor_bulk_transfer_buf(us, pipe, data, len, NULL);
+}
+
+/* check if card inserted, if there is, update read_only status
+ * return non zero if no card
+ */
+
+static int sddr55_status(struct us_data *us)
+{
+ int result;
+ unsigned char *command = us->iobuf;
+ unsigned char *status = us->iobuf;
+ struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
+
+ /* send command */
+ memset(command, 0, 8);
+ command[5] = 0xB0;
+ command[7] = 0x80;
+ result = sddr55_bulk_transport(us,
+ DMA_TO_DEVICE, command, 8);
+
+ US_DEBUGP("Result for send_command in status %d\n",
+ result);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ set_sense_info (4, 0, 0); /* hardware error */
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ result = sddr55_bulk_transport(us,
+ DMA_FROM_DEVICE, status, 4);
+
+ /* expect to get short transfer if no card fitted */
+ if (result == USB_STOR_XFER_SHORT || result == USB_STOR_XFER_STALLED) {
+ /* had a short transfer, no card inserted, free map memory */
+ if (info->lba_to_pba)
+ kfree(info->lba_to_pba);
+ if (info->pba_to_lba)
+ kfree(info->pba_to_lba);
+ info->lba_to_pba = NULL;
+ info->pba_to_lba = NULL;
+
+ info->fatal_error = 0;
+ info->force_read_only = 0;
+
+ set_sense_info (2, 0x3a, 0); /* not ready, medium not present */
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ if (result != USB_STOR_XFER_GOOD) {
+ set_sense_info (4, 0, 0); /* hardware error */
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ /* check write protect status */
+ info->read_only = (status[0] & 0x20);
+
+ /* now read status */
+ result = sddr55_bulk_transport(us,
+ DMA_FROM_DEVICE, status, 2);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ set_sense_info (4, 0, 0); /* hardware error */
+ }
+
+ return (result == USB_STOR_XFER_GOOD ?
+ USB_STOR_TRANSPORT_GOOD : USB_STOR_TRANSPORT_FAILED);
+}
+
+
+static int sddr55_read_data(struct us_data *us,
+ unsigned int lba,
+ unsigned int page,
+ unsigned short sectors) {
+
+ int result = USB_STOR_TRANSPORT_GOOD;
+ unsigned char *command = us->iobuf;
+ unsigned char *status = us->iobuf;
+ struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
+ unsigned char *buffer;
+
+ unsigned int pba;
+ unsigned long address;
+
+ unsigned short pages;
+ unsigned int len, index, offset;
+
+ // Since we only read in one block at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ len = min((unsigned int) sectors, (unsigned int) info->blocksize >>
+ info->smallpageshift) * PAGESIZE;
+ buffer = kmalloc(len, GFP_NOIO);
+ if (buffer == NULL)
+ return USB_STOR_TRANSPORT_ERROR; /* out of memory */
+ index = offset = 0;
+
+ while (sectors>0) {
+
+ /* have we got to end? */
+ if (lba >= info->max_log_blks)
+ break;
+
+ pba = info->lba_to_pba[lba];
+
+ // Read as many sectors as possible in this block
+
+ pages = min((unsigned int) sectors << info->smallpageshift,
+ info->blocksize - page);
+ len = pages << info->pageshift;
+
+ US_DEBUGP("Read %02X pages, from PBA %04X"
+ " (LBA %04X) page %02X\n",
+ pages, pba, lba, page);
+
+ if (pba == NOT_ALLOCATED) {
+ /* no pba for this lba, fill with zeroes */
+ memset (buffer, 0, len);
+ } else {
+
+ address = (pba << info->blockshift) + page;
+
+ command[0] = 0;
+ command[1] = LSB_of(address>>16);
+ command[2] = LSB_of(address>>8);
+ command[3] = LSB_of(address);
+
+ command[4] = 0;
+ command[5] = 0xB0;
+ command[6] = LSB_of(pages << (1 - info->smallpageshift));
+ command[7] = 0x85;
+
+ /* send command */
+ result = sddr55_bulk_transport(us,
+ DMA_TO_DEVICE, command, 8);
+
+ US_DEBUGP("Result for send_command in read_data %d\n",
+ result);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ result = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ /* read data */
+ result = sddr55_bulk_transport(us,
+ DMA_FROM_DEVICE, buffer, len);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ result = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ /* now read status */
+ result = sddr55_bulk_transport(us,
+ DMA_FROM_DEVICE, status, 2);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ result = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ /* check status for error */
+ if (status[0] == 0xff && status[1] == 0x4) {
+ set_sense_info (3, 0x11, 0);
+ result = USB_STOR_TRANSPORT_FAILED;
+ goto leave;
+ }
+ }
+
+ // Store the data in the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &index, &offset, TO_XFER_BUF);
+
+ page = 0;
+ lba++;
+ sectors -= pages >> info->smallpageshift;
+ }
+
+ result = USB_STOR_TRANSPORT_GOOD;
+
+leave:
+ kfree(buffer);
+
+ return result;
+}
+
+static int sddr55_write_data(struct us_data *us,
+ unsigned int lba,
+ unsigned int page,
+ unsigned short sectors) {
+
+ int result = USB_STOR_TRANSPORT_GOOD;
+ unsigned char *command = us->iobuf;
+ unsigned char *status = us->iobuf;
+ struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
+ unsigned char *buffer;
+
+ unsigned int pba;
+ unsigned int new_pba;
+ unsigned long address;
+
+ unsigned short pages;
+ int i;
+ unsigned int len, index, offset;
+
+ /* check if we are allowed to write */
+ if (info->read_only || info->force_read_only) {
+ set_sense_info (7, 0x27, 0); /* read only */
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ // Since we only write one block at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ len = min((unsigned int) sectors, (unsigned int) info->blocksize >>
+ info->smallpageshift) * PAGESIZE;
+ buffer = kmalloc(len, GFP_NOIO);
+ if (buffer == NULL)
+ return USB_STOR_TRANSPORT_ERROR;
+ index = offset = 0;
+
+ while (sectors > 0) {
+
+ /* have we got to end? */
+ if (lba >= info->max_log_blks)
+ break;
+
+ pba = info->lba_to_pba[lba];
+
+ // Write as many sectors as possible in this block
+
+ pages = min((unsigned int) sectors << info->smallpageshift,
+ info->blocksize - page);
+ len = pages << info->pageshift;
+
+ // Get the data from the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &index, &offset, FROM_XFER_BUF);
+
+ US_DEBUGP("Write %02X pages, to PBA %04X"
+ " (LBA %04X) page %02X\n",
+ pages, pba, lba, page);
+
+ command[4] = 0;
+
+ if (pba == NOT_ALLOCATED) {
+ /* no pba allocated for this lba, find a free pba to use */
+
+ int max_pba = (info->max_log_blks / 250 ) * 256;
+ int found_count = 0;
+ int found_pba = -1;
+
+ /* set pba to first block in zone lba is in */
+ pba = (lba / 1000) * 1024;
+
+ US_DEBUGP("No PBA for LBA %04X\n",lba);
+
+ if (max_pba > 1024)
+ max_pba = 1024;
+
+ /*
+ * Scan through the map looking for an unused block
+ * leave 16 unused blocks at start (or as many as
+ * possible) since the sddr55 seems to reuse a used
+ * block when it shouldn't if we don't leave space.
+ */
+ for (i = 0; i < max_pba; i++, pba++) {
+ if (info->pba_to_lba[pba] == UNUSED_BLOCK) {
+ found_pba = pba;
+ if (found_count++ > 16)
+ break;
+ }
+ }
+
+ pba = found_pba;
+
+ if (pba == -1) {
+ /* oh dear */
+ US_DEBUGP("Couldn't find unallocated block\n");
+
+ set_sense_info (3, 0x31, 0); /* medium error */
+ result = USB_STOR_TRANSPORT_FAILED;
+ goto leave;
+ }
+
+ US_DEBUGP("Allocating PBA %04X for LBA %04X\n", pba, lba);
+
+ /* set writing to unallocated block flag */
+ command[4] = 0x40;
+ }
+
+ address = (pba << info->blockshift) + page;
+
+ command[1] = LSB_of(address>>16);
+ command[2] = LSB_of(address>>8);
+ command[3] = LSB_of(address);
+
+ /* set the lba into the command, modulo 1000 */
+ command[0] = LSB_of(lba % 1000);
+ command[6] = MSB_of(lba % 1000);
+
+ command[4] |= LSB_of(pages >> info->smallpageshift);
+ command[5] = 0xB0;
+ command[7] = 0x86;
+
+ /* send command */
+ result = sddr55_bulk_transport(us,
+ DMA_TO_DEVICE, command, 8);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP("Result for send_command in write_data %d\n",
+ result);
+
+ /* set_sense_info is superfluous here? */
+ set_sense_info (3, 0x3, 0);/* peripheral write error */
+ result = USB_STOR_TRANSPORT_FAILED;
+ goto leave;
+ }
+
+ /* send the data */
+ result = sddr55_bulk_transport(us,
+ DMA_TO_DEVICE, buffer, len);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP("Result for send_data in write_data %d\n",
+ result);
+
+ /* set_sense_info is superfluous here? */
+ set_sense_info (3, 0x3, 0);/* peripheral write error */
+ result = USB_STOR_TRANSPORT_FAILED;
+ goto leave;
+ }
+
+ /* now read status */
+ result = sddr55_bulk_transport(us, DMA_FROM_DEVICE, status, 6);
+
+ if (result != USB_STOR_XFER_GOOD) {
+ US_DEBUGP("Result for get_status in write_data %d\n",
+ result);
+
+ /* set_sense_info is superfluous here? */
+ set_sense_info (3, 0x3, 0);/* peripheral write error */
+ result = USB_STOR_TRANSPORT_FAILED;
+ goto leave;
+ }
+
+ new_pba = (status[3] + (status[4] << 8) + (status[5] << 16))
+ >> info->blockshift;
+
+ /* check status for error */
+ if (status[0] == 0xff && status[1] == 0x4) {
+ info->pba_to_lba[new_pba] = BAD_BLOCK;
+
+ set_sense_info (3, 0x0c, 0);
+ result = USB_STOR_TRANSPORT_FAILED;
+ goto leave;
+ }
+
+ US_DEBUGP("Updating maps for LBA %04X: old PBA %04X, new PBA %04X\n",
+ lba, pba, new_pba);
+
+ /* update the lba<->pba maps, note new_pba might be the same as pba */
+ info->lba_to_pba[lba] = new_pba;
+ info->pba_to_lba[pba] = UNUSED_BLOCK;
+
+ /* check that new_pba wasn't already being used */
+ if (info->pba_to_lba[new_pba] != UNUSED_BLOCK) {
+ printk(KERN_ERR "sddr55 error: new PBA %04X already in use for LBA %04X\n",
+ new_pba, info->pba_to_lba[new_pba]);
+ info->fatal_error = 1;
+ set_sense_info (3, 0x31, 0);
+ result = USB_STOR_TRANSPORT_FAILED;
+ goto leave;
+ }
+
+ /* update the pba<->lba maps for new_pba */
+ info->pba_to_lba[new_pba] = lba % 1000;
+
+ page = 0;
+ lba++;
+ sectors -= pages >> info->smallpageshift;
+ }
+ result = USB_STOR_TRANSPORT_GOOD;
+
+ leave:
+ kfree(buffer);
+ return result;
+}
+
+static int sddr55_read_deviceID(struct us_data *us,
+ unsigned char *manufacturerID,
+ unsigned char *deviceID) {
+
+ int result;
+ unsigned char *command = us->iobuf;
+ unsigned char *content = us->iobuf;
+
+ memset(command, 0, 8);
+ command[5] = 0xB0;
+ command[7] = 0x84;
+ result = sddr55_bulk_transport(us, DMA_TO_DEVICE, command, 8);
+
+ US_DEBUGP("Result of send_control for device ID is %d\n",
+ result);
+
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ result = sddr55_bulk_transport(us,
+ DMA_FROM_DEVICE, content, 4);
+
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ *manufacturerID = content[0];
+ *deviceID = content[1];
+
+ if (content[0] != 0xff) {
+ result = sddr55_bulk_transport(us,
+ DMA_FROM_DEVICE, content, 2);
+ }
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+
+int sddr55_reset(struct us_data *us) {
+ return 0;
+}
+
+
+static unsigned long sddr55_get_capacity(struct us_data *us) {
+
+ unsigned char manufacturerID;
+ unsigned char deviceID;
+ int result;
+ struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
+
+ US_DEBUGP("Reading capacity...\n");
+
+ result = sddr55_read_deviceID(us,
+ &manufacturerID,
+ &deviceID);
+
+ US_DEBUGP("Result of read_deviceID is %d\n",
+ result);
+
+ if (result != USB_STOR_XFER_GOOD)
+ return 0;
+
+ US_DEBUGP("Device ID = %02X\n", deviceID);
+ US_DEBUGP("Manuf ID = %02X\n", manufacturerID);
+
+ info->pageshift = 9;
+ info->smallpageshift = 0;
+ info->blocksize = 16;
+ info->blockshift = 4;
+ info->blockmask = 15;
+
+ switch (deviceID) {
+
+ case 0x6e: // 1MB
+ case 0xe8:
+ case 0xec:
+ info->pageshift = 8;
+ info->smallpageshift = 1;
+ return 0x00100000;
+
+ case 0xea: // 2MB
+ case 0x64:
+ info->pageshift = 8;
+ info->smallpageshift = 1;
+ case 0x5d: // 5d is a ROM card with pagesize 512.
+ return 0x00200000;
+
+ case 0xe3: // 4MB
+ case 0xe5:
+ case 0x6b:
+ case 0xd5:
+ return 0x00400000;
+
+ case 0xe6: // 8MB
+ case 0xd6:
+ return 0x00800000;
+
+ case 0x73: // 16MB
+ info->blocksize = 32;
+ info->blockshift = 5;
+ info->blockmask = 31;
+ return 0x01000000;
+
+ case 0x75: // 32MB
+ info->blocksize = 32;
+ info->blockshift = 5;
+ info->blockmask = 31;
+ return 0x02000000;
+
+ case 0x76: // 64MB
+ info->blocksize = 32;
+ info->blockshift = 5;
+ info->blockmask = 31;
+ return 0x04000000;
+
+ case 0x79: // 128MB
+ info->blocksize = 32;
+ info->blockshift = 5;
+ info->blockmask = 31;
+ return 0x08000000;
+
+ default: // unknown
+ return 0;
+
+ }
+}
+
+static int sddr55_read_map(struct us_data *us) {
+
+ struct sddr55_card_info *info = (struct sddr55_card_info *)(us->extra);
+ int numblocks;
+ unsigned char *buffer;
+ unsigned char *command = us->iobuf;
+ int i;
+ unsigned short lba;
+ unsigned short max_lba;
+ int result;
+
+ if (!info->capacity)
+ return -1;
+
+ numblocks = info->capacity >> (info->blockshift + info->pageshift);
+
+ buffer = kmalloc( numblocks * 2, GFP_NOIO );
+
+ if (!buffer)
+ return -1;
+
+ memset(command, 0, 8);
+ command[5] = 0xB0;
+ command[6] = numblocks * 2 / 256;
+ command[7] = 0x8A;
+
+ result = sddr55_bulk_transport(us, DMA_TO_DEVICE, command, 8);
+
+ if ( result != USB_STOR_XFER_GOOD) {
+ kfree (buffer);
+ return -1;
+ }
+
+ result = sddr55_bulk_transport(us, DMA_FROM_DEVICE, buffer, numblocks * 2);
+
+ if ( result != USB_STOR_XFER_GOOD) {
+ kfree (buffer);
+ return -1;
+ }
+
+ result = sddr55_bulk_transport(us, DMA_FROM_DEVICE, command, 2);
+
+ if ( result != USB_STOR_XFER_GOOD) {
+ kfree (buffer);
+ return -1;
+ }
+
+ if (info->lba_to_pba)
+ kfree(info->lba_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)
+ kfree(info->lba_to_pba);
+ if (info->pba_to_lba != NULL)
+ kfree(info->pba_to_lba);
+ info->lba_to_pba = NULL;
+ info->pba_to_lba = NULL;
+ kfree(buffer);
+ return -1;
+ }
+
+ memset(info->lba_to_pba, 0xff, numblocks*sizeof(int));
+ memset(info->pba_to_lba, 0xff, numblocks*sizeof(int));
+
+ /* set maximum lba */
+ max_lba = info->max_log_blks;
+ if (max_lba > 1000)
+ max_lba = 1000;
+
+ // Each block is 64 bytes of control data, so block i is located in
+ // scatterlist block i*64/128k = i*(2^6)*(2^-17) = i*(2^-11)
+
+ for (i=0; i<numblocks; i++) {
+ int zone = i / 1024;
+
+ lba = short_pack(buffer[i * 2], buffer[i * 2 + 1]);
+
+ /* Every 1024 physical blocks ("zone"), the LBA numbers
+ * go back to zero, but are within a higher
+ * block of LBA's. Also, there is a maximum of
+ * 1000 LBA's per zone. In other words, in PBA
+ * 1024-2047 you will find LBA 0-999 which are
+ * really LBA 1000-1999. Yes, this wastes 24
+ * physical blocks per zone. Go figure.
+ * These devices can have blocks go bad, so there
+ * are 24 spare blocks to use when blocks do go bad.
+ */
+
+ /* SDDR55 returns 0xffff for a bad block, and 0x400 for the
+ * CIS block. (Is this true for cards 8MB or less??)
+ * Record these in the physical to logical map
+ */
+
+ info->pba_to_lba[i] = lba;
+
+ if (lba >= max_lba) {
+ continue;
+ }
+
+ if (info->lba_to_pba[lba + zone * 1000] != NOT_ALLOCATED &&
+ !info->force_read_only) {
+ printk("sddr55: map inconsistency at LBA %04X\n", lba + zone * 1000);
+ info->force_read_only = 1;
+ }
+
+ if (lba<0x10 || (lba>=0x3E0 && lba<0x3EF))
+ US_DEBUGP("LBA %04X <-> PBA %04X\n", lba, i);
+
+ info->lba_to_pba[lba + zone * 1000] = i;
+ }
+
+ kfree(buffer);
+ return 0;
+}
+
+
+static void sddr55_card_info_destructor(void *extra) {
+ struct sddr55_card_info *info = (struct sddr55_card_info *)extra;
+
+ if (!extra)
+ return;
+
+ if (info->lba_to_pba)
+ kfree(info->lba_to_pba);
+ if (info->pba_to_lba)
+ kfree(info->pba_to_lba);
+}
+
+
+/*
+ * Transport for the Sandisk SDDR-55
+ */
+int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us)
+{
+ int result;
+ static unsigned char inquiry_response[8] = {
+ 0x00, 0x80, 0x00, 0x02, 0x1F, 0x00, 0x00, 0x00
+ };
+ // write-protected for now, no block descriptor support
+ static unsigned char mode_page_01[20] = {
+ 0x0, 0x12, 0x00, 0x80, 0x0, 0x0, 0x0, 0x0,
+ 0x01, 0x0A,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ unsigned char *ptr = us->iobuf;
+ unsigned long capacity;
+ unsigned int lba;
+ unsigned int pba;
+ unsigned int page;
+ unsigned short pages;
+ struct sddr55_card_info *info;
+
+ if (!us->extra) {
+ us->extra = kmalloc(
+ sizeof(struct sddr55_card_info), GFP_NOIO);
+ if (!us->extra)
+ return USB_STOR_TRANSPORT_ERROR;
+ memset(us->extra, 0, sizeof(struct sddr55_card_info));
+ us->extra_destructor = sddr55_card_info_destructor;
+ }
+
+ info = (struct sddr55_card_info *)(us->extra);
+
+ if (srb->cmnd[0] == REQUEST_SENSE) {
+ US_DEBUGP("SDDR55: request sense %02x/%02x/%02x\n", info->sense_data[2], info->sense_data[12], info->sense_data[13]);
+
+ memcpy (ptr, info->sense_data, sizeof info->sense_data);
+ ptr[0] = 0x70;
+ ptr[7] = 11;
+ usb_stor_set_xfer_buf (ptr, sizeof info->sense_data, srb);
+ memset (info->sense_data, 0, sizeof info->sense_data);
+
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ memset (info->sense_data, 0, sizeof info->sense_data);
+
+ /* Dummy up a response for INQUIRY since SDDR55 doesn't
+ respond to INQUIRY commands */
+
+ if (srb->cmnd[0] == INQUIRY) {
+ memcpy(ptr, inquiry_response, 8);
+ fill_inquiry_response(us, ptr, 36);
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ /* only check card status if the map isn't allocated, ie no card seen yet
+ * or if it's been over half a second since we last accessed it
+ */
+ if (info->lba_to_pba == NULL || time_after(jiffies, info->last_access + HZ/2)) {
+
+ /* check to see if a card is fitted */
+ result = sddr55_status (us);
+ if (result) {
+ result = sddr55_status (us);
+ if (!result) {
+ set_sense_info (6, 0x28, 0); /* new media, set unit attention, not ready to ready */
+ }
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+ }
+
+ /* if we detected a problem with the map when writing,
+ don't allow any more access */
+ if (info->fatal_error) {
+
+ set_sense_info (3, 0x31, 0);
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ if (srb->cmnd[0] == READ_CAPACITY) {
+
+ capacity = sddr55_get_capacity(us);
+
+ if (!capacity) {
+ set_sense_info (3, 0x30, 0); /* incompatible medium */
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ info->capacity = capacity;
+
+ /* figure out the maximum logical block number, allowing for
+ * the fact that only 250 out of every 256 are used */
+ info->max_log_blks = ((info->capacity >> (info->pageshift + info->blockshift)) / 256) * 250;
+
+ /* Last page in the card, adjust as we only use 250 out of
+ * every 256 pages */
+ capacity = (capacity / 256) * 250;
+
+ capacity /= PAGESIZE;
+ capacity--;
+
+ ((__be32 *) ptr)[0] = cpu_to_be32(capacity);
+ ((__be32 *) ptr)[1] = cpu_to_be32(PAGESIZE);
+ usb_stor_set_xfer_buf(ptr, 8, srb);
+
+ sddr55_read_map(us);
+
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == MODE_SENSE_10) {
+
+ memcpy(ptr, mode_page_01, sizeof mode_page_01);
+ ptr[3] = (info->read_only || info->force_read_only) ? 0x80 : 0;
+ usb_stor_set_xfer_buf(ptr, sizeof(mode_page_01), srb);
+
+ if ( (srb->cmnd[2] & 0x3F) == 0x01 ) {
+ US_DEBUGP(
+ "SDDR55: Dummy up request for mode page 1\n");
+ return USB_STOR_TRANSPORT_GOOD;
+
+ } else if ( (srb->cmnd[2] & 0x3F) == 0x3F ) {
+ US_DEBUGP(
+ "SDDR55: Dummy up request for all mode pages\n");
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ set_sense_info (5, 0x24, 0); /* invalid field in command */
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {
+
+ US_DEBUGP(
+ "SDDR55: %s medium removal. Not that I can do"
+ " anything about it...\n",
+ (srb->cmnd[4]&0x03) ? "Prevent" : "Allow");
+
+ return USB_STOR_TRANSPORT_GOOD;
+
+ }
+
+ if (srb->cmnd[0] == READ_10 || srb->cmnd[0] == WRITE_10) {
+
+ page = short_pack(srb->cmnd[3], srb->cmnd[2]);
+ page <<= 16;
+ page |= short_pack(srb->cmnd[5], srb->cmnd[4]);
+ pages = short_pack(srb->cmnd[8], srb->cmnd[7]);
+
+ page <<= info->smallpageshift;
+
+ // convert page to block and page-within-block
+
+ lba = page >> info->blockshift;
+ page = page & info->blockmask;
+
+ // locate physical block corresponding to logical block
+
+ if (lba >= info->max_log_blks) {
+
+ US_DEBUGP("Error: Requested LBA %04X exceeds maximum "
+ "block %04X\n", lba, info->max_log_blks-1);
+
+ set_sense_info (5, 0x24, 0); /* invalid field in command */
+
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ pba = info->lba_to_pba[lba];
+
+ if (srb->cmnd[0] == WRITE_10) {
+ US_DEBUGP("WRITE_10: write block %04X (LBA %04X) page %01X"
+ " pages %d\n",
+ pba, lba, page, pages);
+
+ return sddr55_write_data(us, lba, page, pages);
+ } else {
+ US_DEBUGP("READ_10: read block %04X (LBA %04X) page %01X"
+ " pages %d\n",
+ pba, lba, page, pages);
+
+ return sddr55_read_data(us, lba, page, pages);
+ }
+ }
+
+
+ if (srb->cmnd[0] == TEST_UNIT_READY) {
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == START_STOP) {
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ set_sense_info (5, 0x20, 0); /* illegal command */
+
+ return USB_STOR_TRANSPORT_FAILED; // FIXME: sense buffer?
+}
+
diff --git a/drivers/usb/storage/sddr55.h b/drivers/usb/storage/sddr55.h
new file mode 100644
index 000000000000..d6bd32f6c9f3
--- /dev/null
+++ b/drivers/usb/storage/sddr55.h
@@ -0,0 +1,34 @@
+/* Driver for SanDisk SDDR-55 SmartMedia reader
+ * Header File
+ *
+ * $Id:$
+ *
+ * Current development and maintenance by:
+ * (c) 2002 Simon Munton
+ *
+ * See sddr55.c for more explanation
+ *
+ * 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, 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.
+ */
+
+#ifndef _USB_SHUTTLE_EUSB_SDDR55_H
+#define _USB_SHUTTLE_EUSB_SDDR55_H
+
+/* Sandisk SDDR-55 stuff */
+
+extern int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us);
+extern int sddr55_reset(struct us_data *us);
+
+#endif
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
new file mode 100644
index 000000000000..7eff03d9b041
--- /dev/null
+++ b/drivers/usb/storage/shuttle_usbat.c
@@ -0,0 +1,1712 @@
+/* Driver for SCM Microsystems USB-ATAPI cable
+ *
+ * $Id: shuttle_usbat.c,v 1.17 2002/04/22 03:39:43 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 2000, 2001 Robert Baruch (autophile@starband.net)
+ * (c) 2004, 2005 Daniel Drake <dsd@gentoo.org>
+ *
+ * Developed with the assistance of:
+ * (c) 2002 Alan Stern <stern@rowland.org>
+ *
+ * Flash support based on earlier work by:
+ * (c) 2002 Thomas Kreiling <usbdev@sm04.de>
+ *
+ * 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.
+ *
+ * SCM Microsystems (www.scmmicro.com) makes a device, sold to OEM's only,
+ * which does the USB-to-ATAPI conversion. By obtaining the data sheet on
+ * their device under nondisclosure agreement, I have been able to write
+ * this driver for Linux.
+ *
+ * The chip used in the device can also be used for EPP and ISA translation
+ * as well. This driver is only guaranteed to work with the ATAPI
+ * translation.
+ *
+ * See the Kconfig help text for a list of devices known to be supported by
+ * this driver.
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/cdrom.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+
+#include "usb.h"
+#include "transport.h"
+#include "protocol.h"
+#include "debug.h"
+#include "shuttle_usbat.h"
+
+#define short_pack(LSB,MSB) ( ((u16)(LSB)) | ( ((u16)(MSB))<<8 ) )
+#define LSB_of(s) ((s)&0xFF)
+#define MSB_of(s) ((s)>>8)
+
+static int transferred = 0;
+
+static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us);
+static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us);
+
+/*
+ * Convenience function to produce an ATAPI read/write sectors command
+ * Use cmd=0x20 for read, cmd=0x30 for write
+ */
+static void usbat_pack_atapi_sector_cmd(unsigned char *buf,
+ unsigned char thistime,
+ u32 sector, unsigned char cmd)
+{
+ buf[0] = 0;
+ buf[1] = thistime;
+ buf[2] = sector & 0xFF;
+ buf[3] = (sector >> 8) & 0xFF;
+ buf[4] = (sector >> 16) & 0xFF;
+ buf[5] = 0xE0 | ((sector >> 24) & 0x0F);
+ buf[6] = cmd;
+}
+
+/*
+ * Convenience function to get the device type (flash or hp8200)
+ */
+static int usbat_get_device_type(struct us_data *us)
+{
+ return ((struct usbat_info*)us->extra)->devicetype;
+}
+
+/*
+ * Read a register from the device
+ */
+static int usbat_read(struct us_data *us,
+ unsigned char access,
+ unsigned char reg,
+ unsigned char *content)
+{
+ return usb_stor_ctrl_transfer(us,
+ us->recv_ctrl_pipe,
+ access | USBAT_CMD_READ_REG,
+ 0xC0,
+ (u16)reg,
+ 0,
+ content,
+ 1);
+}
+
+/*
+ * Write to a register on the device
+ */
+static int usbat_write(struct us_data *us,
+ unsigned char access,
+ unsigned char reg,
+ unsigned char content)
+{
+ return usb_stor_ctrl_transfer(us,
+ us->send_ctrl_pipe,
+ access | USBAT_CMD_WRITE_REG,
+ 0x40,
+ short_pack(reg, content),
+ 0,
+ NULL,
+ 0);
+}
+
+/*
+ * Convenience function to perform a bulk read
+ */
+static int usbat_bulk_read(struct us_data *us,
+ unsigned char *data,
+ unsigned int len)
+{
+ if (len == 0)
+ return USB_STOR_XFER_GOOD;
+
+ US_DEBUGP("usbat_bulk_read: len = %d\n", len);
+ return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, data, len, NULL);
+}
+
+/*
+ * Convenience function to perform a bulk write
+ */
+static int usbat_bulk_write(struct us_data *us,
+ unsigned char *data,
+ unsigned int len)
+{
+ if (len == 0)
+ return USB_STOR_XFER_GOOD;
+
+ US_DEBUGP("usbat_bulk_write: len = %d\n", len);
+ return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, data, len, NULL);
+}
+
+/*
+ * Some USBAT-specific commands can only be executed over a command transport
+ * This transport allows one (len=8) or two (len=16) vendor-specific commands
+ * to be executed.
+ */
+static int usbat_execute_command(struct us_data *us,
+ unsigned char *commands,
+ unsigned int len)
+{
+ return usb_stor_ctrl_transfer(us, us->send_ctrl_pipe,
+ USBAT_CMD_EXEC_CMD, 0x40, 0, 0,
+ commands, len);
+}
+
+/*
+ * Read the status register
+ */
+static int usbat_get_status(struct us_data *us, unsigned char *status)
+{
+ int rc;
+ rc = usbat_read(us, USBAT_ATA, USBAT_ATA_STATUS, status);
+
+ US_DEBUGP("usbat_get_status: 0x%02X\n", (unsigned short) (*status));
+ return rc;
+}
+
+/*
+ * Check the device status
+ */
+static int usbat_check_status(struct us_data *us)
+{
+ unsigned char *reply = us->iobuf;
+ int rc;
+
+ if (!us)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ rc = usbat_get_status(us, reply);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_FAILED;
+
+ if (*reply & 0x01 && *reply != 0x51) // error/check condition (0x51 is ok)
+ return USB_STOR_TRANSPORT_FAILED;
+
+ if (*reply & 0x20) // device fault
+ return USB_STOR_TRANSPORT_FAILED;
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Stores critical information in internal registers in prepartion for the execution
+ * of a conditional usbat_read_blocks or usbat_write_blocks call.
+ */
+static int usbat_set_shuttle_features(struct us_data *us,
+ unsigned char external_trigger,
+ unsigned char epp_control,
+ unsigned char mask_byte,
+ unsigned char test_pattern,
+ unsigned char subcountH,
+ unsigned char subcountL)
+{
+ unsigned char *command = us->iobuf;
+
+ command[0] = 0x40;
+ command[1] = USBAT_CMD_SET_FEAT;
+
+ // The only bit relevant to ATA access is bit 6
+ // which defines 8 bit data access (set) or 16 bit (unset)
+ command[2] = epp_control;
+
+ // If FCQ is set in the qualifier (defined in R/W cmd), then bits U0, U1,
+ // ET1 and ET2 define an external event to be checked for on event of a
+ // _read_blocks or _write_blocks operation. The read/write will not take
+ // place unless the defined trigger signal is active.
+ command[3] = external_trigger;
+
+ // The resultant byte of the mask operation (see mask_byte) is compared for
+ // equivalence with this test pattern. If equal, the read/write will take
+ // place.
+ command[4] = test_pattern;
+
+ // This value is logically ANDed with the status register field specified
+ // in the read/write command.
+ command[5] = mask_byte;
+
+ // If ALQ is set in the qualifier, this field contains the address of the
+ // registers where the byte count should be read for transferring the data.
+ // If ALQ is not set, then this field contains the number of bytes to be
+ // transferred.
+ command[6] = subcountL;
+ command[7] = subcountH;
+
+ return usbat_execute_command(us, command, 8);
+}
+
+/*
+ * Block, waiting for an ATA device to become not busy or to report
+ * an error condition.
+ */
+static int usbat_wait_not_busy(struct us_data *us, int minutes)
+{
+ int i;
+ int result;
+ unsigned char *status = us->iobuf;
+
+ /* Synchronizing cache on a CDR could take a heck of a long time,
+ * but probably not more than 10 minutes or so. On the other hand,
+ * doing a full blank on a CDRW at speed 1 will take about 75
+ * minutes!
+ */
+
+ for (i=0; i<1200+minutes*60; i++) {
+
+ result = usbat_get_status(us, status);
+
+ if (result!=USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+ if (*status & 0x01) { // check condition
+ result = usbat_read(us, USBAT_ATA, 0x10, status);
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+ if (*status & 0x20) // device fault
+ return USB_STOR_TRANSPORT_FAILED;
+
+ if ((*status & 0x80)==0x00) { // not busy
+ US_DEBUGP("Waited not busy for %d steps\n", i);
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (i<500)
+ msleep(10); // 5 seconds
+ else if (i<700)
+ msleep(50); // 10 seconds
+ else if (i<1200)
+ msleep(100); // 50 seconds
+ else
+ msleep(1000); // X minutes
+ }
+
+ US_DEBUGP("Waited not busy for %d minutes, timing out.\n",
+ minutes);
+ return USB_STOR_TRANSPORT_FAILED;
+}
+
+/*
+ * Read block data from the data register
+ */
+static int usbat_read_block(struct us_data *us,
+ unsigned char *content,
+ unsigned short len)
+{
+ int result;
+ unsigned char *command = us->iobuf;
+
+ if (!len)
+ return USB_STOR_TRANSPORT_GOOD;
+
+ command[0] = 0xC0;
+ command[1] = USBAT_ATA | USBAT_CMD_READ_BLOCK;
+ command[2] = USBAT_ATA_DATA;
+ command[3] = 0;
+ command[4] = 0;
+ command[5] = 0;
+ command[6] = LSB_of(len);
+ command[7] = MSB_of(len);
+
+ result = usbat_execute_command(us, command, 8);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ result = usbat_bulk_read(us, content, len);
+ return (result == USB_STOR_XFER_GOOD ?
+ USB_STOR_TRANSPORT_GOOD : USB_STOR_TRANSPORT_ERROR);
+}
+
+/*
+ * Write block data via the data register
+ */
+static int usbat_write_block(struct us_data *us,
+ unsigned char access,
+ unsigned char *content,
+ unsigned short len,
+ int minutes)
+{
+ int result;
+ unsigned char *command = us->iobuf;
+
+ if (!len)
+ return USB_STOR_TRANSPORT_GOOD;
+
+ command[0] = 0x40;
+ command[1] = access | USBAT_CMD_WRITE_BLOCK;
+ command[2] = USBAT_ATA_DATA;
+ command[3] = 0;
+ command[4] = 0;
+ command[5] = 0;
+ command[6] = LSB_of(len);
+ command[7] = MSB_of(len);
+
+ result = usbat_execute_command(us, command, 8);
+
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ result = usbat_bulk_write(us, content, len);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ return usbat_wait_not_busy(us, minutes);
+}
+
+/*
+ * Process read and write requests
+ */
+static int usbat_hp8200e_rw_block_test(struct us_data *us,
+ unsigned char access,
+ unsigned char *registers,
+ unsigned char *data_out,
+ unsigned short num_registers,
+ unsigned char data_reg,
+ unsigned char status_reg,
+ unsigned char timeout,
+ unsigned char qualifier,
+ int direction,
+ unsigned char *content,
+ unsigned short len,
+ int use_sg,
+ int minutes)
+{
+ int result;
+ unsigned int pipe = (direction == DMA_FROM_DEVICE) ?
+ us->recv_bulk_pipe : us->send_bulk_pipe;
+
+ unsigned char *command = us->iobuf;
+ int i, j;
+ int cmdlen;
+ unsigned char *data = us->iobuf;
+ unsigned char *status = us->iobuf;
+
+ BUG_ON(num_registers > US_IOBUF_SIZE/2);
+
+ for (i=0; i<20; i++) {
+
+ /*
+ * The first time we send the full command, which consists
+ * of downloading the SCSI command followed by downloading
+ * the data via a write-and-test. Any other time we only
+ * send the command to download the data -- the SCSI command
+ * is still 'active' in some sense in the device.
+ *
+ * We're only going to try sending the data 10 times. After
+ * that, we just return a failure.
+ */
+
+ if (i==0) {
+ cmdlen = 16;
+ // Write to multiple registers
+ // Not really sure the 0x07, 0x17, 0xfc, 0xe7 is necessary here,
+ // but that's what came out of the trace every single time.
+ command[0] = 0x40;
+ command[1] = access | USBAT_CMD_WRITE_REGS;
+ command[2] = 0x07;
+ command[3] = 0x17;
+ command[4] = 0xFC;
+ command[5] = 0xE7;
+ command[6] = LSB_of(num_registers*2);
+ command[7] = MSB_of(num_registers*2);
+ } else
+ cmdlen = 8;
+
+ // Conditionally read or write blocks
+ command[cmdlen-8] = (direction==DMA_TO_DEVICE ? 0x40 : 0xC0);
+ command[cmdlen-7] = access |
+ (direction==DMA_TO_DEVICE ?
+ USBAT_CMD_COND_WRITE_BLOCK : USBAT_CMD_COND_READ_BLOCK);
+ command[cmdlen-6] = data_reg;
+ command[cmdlen-5] = status_reg;
+ command[cmdlen-4] = timeout;
+ command[cmdlen-3] = qualifier;
+ command[cmdlen-2] = LSB_of(len);
+ command[cmdlen-1] = MSB_of(len);
+
+ result = usbat_execute_command(us, command, cmdlen);
+
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (i==0) {
+
+ for (j=0; j<num_registers; j++) {
+ data[j<<1] = registers[j];
+ data[1+(j<<1)] = data_out[j];
+ }
+
+ result = usbat_bulk_write(us, data, num_registers*2);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ }
+
+
+ //US_DEBUGP("Transfer %s %d bytes, sg buffers %d\n",
+ // direction == DMA_TO_DEVICE ? "out" : "in",
+ // len, use_sg);
+
+ result = usb_stor_bulk_transfer_sg(us,
+ pipe, content, len, use_sg, NULL);
+
+ /*
+ * If we get a stall on the bulk download, we'll retry
+ * the bulk download -- but not the SCSI command because
+ * in some sense the SCSI command is still 'active' and
+ * waiting for the data. Don't ask me why this should be;
+ * I'm only following what the Windoze driver did.
+ *
+ * Note that a stall for the test-and-read/write command means
+ * that the test failed. In this case we're testing to make
+ * sure that the device is error-free
+ * (i.e. bit 0 -- CHK -- of status is 0). The most likely
+ * hypothesis is that the USBAT chip somehow knows what
+ * the device will accept, but doesn't give the device any
+ * data until all data is received. Thus, the device would
+ * still be waiting for the first byte of data if a stall
+ * occurs, even if the stall implies that some data was
+ * transferred.
+ */
+
+ if (result == USB_STOR_XFER_SHORT ||
+ result == USB_STOR_XFER_STALLED) {
+
+ /*
+ * If we're reading and we stalled, then clear
+ * the bulk output pipe only the first time.
+ */
+
+ if (direction==DMA_FROM_DEVICE && i==0) {
+ if (usb_stor_clear_halt(us,
+ us->send_bulk_pipe) < 0)
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /*
+ * Read status: is the device angry, or just busy?
+ */
+
+ result = usbat_read(us, USBAT_ATA,
+ direction==DMA_TO_DEVICE ?
+ USBAT_ATA_STATUS : USBAT_ATA_ALTSTATUS,
+ status);
+
+ if (result!=USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+ if (*status & 0x01) // check condition
+ return USB_STOR_TRANSPORT_FAILED;
+ if (*status & 0x20) // device fault
+ return USB_STOR_TRANSPORT_FAILED;
+
+ US_DEBUGP("Redoing %s\n",
+ direction==DMA_TO_DEVICE ? "write" : "read");
+
+ } else if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+ else
+ return usbat_wait_not_busy(us, minutes);
+
+ }
+
+ US_DEBUGP("Bummer! %s bulk data 20 times failed.\n",
+ direction==DMA_TO_DEVICE ? "Writing" : "Reading");
+
+ return USB_STOR_TRANSPORT_FAILED;
+}
+
+/*
+ * Write to multiple registers:
+ * Allows us to write specific data to any registers. The data to be written
+ * gets packed in this sequence: reg0, data0, reg1, data1, ..., regN, dataN
+ * which gets sent through bulk out.
+ * Not designed for large transfers of data!
+ */
+static int usbat_multiple_write(struct us_data *us,
+ unsigned char *registers,
+ unsigned char *data_out,
+ unsigned short num_registers)
+{
+ int i, result;
+ unsigned char *data = us->iobuf;
+ unsigned char *command = us->iobuf;
+
+ BUG_ON(num_registers > US_IOBUF_SIZE/2);
+
+ // Write to multiple registers, ATA access
+ command[0] = 0x40;
+ command[1] = USBAT_ATA | USBAT_CMD_WRITE_REGS;
+
+ // No relevance
+ command[2] = 0;
+ command[3] = 0;
+ command[4] = 0;
+ command[5] = 0;
+
+ // Number of bytes to be transferred (incl. addresses and data)
+ command[6] = LSB_of(num_registers*2);
+ command[7] = MSB_of(num_registers*2);
+
+ // The setup command
+ result = usbat_execute_command(us, command, 8);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ // Create the reg/data, reg/data sequence
+ for (i=0; i<num_registers; i++) {
+ data[i<<1] = registers[i];
+ data[1+(i<<1)] = data_out[i];
+ }
+
+ // Send the data
+ result = usbat_bulk_write(us, data, num_registers*2);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (usbat_get_device_type(us) == USBAT_DEV_HP8200)
+ return usbat_wait_not_busy(us, 0);
+ else
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Conditionally read blocks from device:
+ * Allows us to read blocks from a specific data register, based upon the
+ * condition that a status register can be successfully masked with a status
+ * qualifier. If this condition is not initially met, the read will wait
+ * up until a maximum amount of time has elapsed, as specified by timeout.
+ * The read will start when the condition is met, otherwise the command aborts.
+ *
+ * The qualifier defined here is not the value that is masked, it defines
+ * conditions for the write to take place. The actual masked qualifier (and
+ * other related details) are defined beforehand with _set_shuttle_features().
+ */
+static int usbat_read_blocks(struct us_data *us,
+ unsigned char *buffer,
+ int len)
+{
+ int result;
+ unsigned char *command = us->iobuf;
+
+ command[0] = 0xC0;
+ command[1] = USBAT_ATA | USBAT_CMD_COND_READ_BLOCK;
+ command[2] = USBAT_ATA_DATA;
+ command[3] = USBAT_ATA_STATUS;
+ command[4] = 0xFD; // Timeout (ms);
+ command[5] = USBAT_QUAL_FCQ;
+ command[6] = LSB_of(len);
+ command[7] = MSB_of(len);
+
+ // Multiple block read setup command
+ result = usbat_execute_command(us, command, 8);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_FAILED;
+
+ // Read the blocks we just asked for
+ result = usbat_bulk_read(us, buffer, len);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_FAILED;
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Conditionally write blocks to device:
+ * Allows us to write blocks to a specific data register, based upon the
+ * condition that a status register can be successfully masked with a status
+ * qualifier. If this condition is not initially met, the write will wait
+ * up until a maximum amount of time has elapsed, as specified by timeout.
+ * The read will start when the condition is met, otherwise the command aborts.
+ *
+ * The qualifier defined here is not the value that is masked, it defines
+ * conditions for the write to take place. The actual masked qualifier (and
+ * other related details) are defined beforehand with _set_shuttle_features().
+ */
+static int usbat_write_blocks(struct us_data *us,
+ unsigned char *buffer,
+ int len)
+{
+ int result;
+ unsigned char *command = us->iobuf;
+
+ command[0] = 0x40;
+ command[1] = USBAT_ATA | USBAT_CMD_COND_WRITE_BLOCK;
+ command[2] = USBAT_ATA_DATA;
+ command[3] = USBAT_ATA_STATUS;
+ command[4] = 0xFD; // Timeout (ms)
+ command[5] = USBAT_QUAL_FCQ;
+ command[6] = LSB_of(len);
+ command[7] = MSB_of(len);
+
+ // Multiple block write setup command
+ result = usbat_execute_command(us, command, 8);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_FAILED;
+
+ // Write the data
+ result = usbat_bulk_write(us, buffer, len);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_FAILED;
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Read the User IO register
+ */
+static int usbat_read_user_io(struct us_data *us, unsigned char *data_flags)
+{
+ int result;
+
+ result = usb_stor_ctrl_transfer(us,
+ us->recv_ctrl_pipe,
+ USBAT_CMD_UIO,
+ 0xC0,
+ 0,
+ 0,
+ data_flags,
+ USBAT_UIO_READ);
+
+ US_DEBUGP("usbat_read_user_io: UIO register reads %02X\n", (unsigned short) (*data_flags));
+
+ return result;
+}
+
+/*
+ * Write to the User IO register
+ */
+static int usbat_write_user_io(struct us_data *us,
+ unsigned char enable_flags,
+ unsigned char data_flags)
+{
+ return usb_stor_ctrl_transfer(us,
+ us->send_ctrl_pipe,
+ USBAT_CMD_UIO,
+ 0x40,
+ short_pack(enable_flags, data_flags),
+ 0,
+ NULL,
+ USBAT_UIO_WRITE);
+}
+
+/*
+ * Reset the device
+ * Often needed on media change.
+ */
+static int usbat_device_reset(struct us_data *us)
+{
+ int rc;
+
+ // Reset peripheral, enable peripheral control signals
+ // (bring reset signal up)
+ rc = usbat_write_user_io(us,
+ USBAT_UIO_DRVRST | USBAT_UIO_OE1 | USBAT_UIO_OE0,
+ USBAT_UIO_EPAD | USBAT_UIO_1);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ // Enable peripheral control signals
+ // (bring reset signal down)
+ rc = usbat_write_user_io(us,
+ USBAT_UIO_OE1 | USBAT_UIO_OE0,
+ USBAT_UIO_EPAD | USBAT_UIO_1);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Enable card detect
+ */
+static int usbat_device_enable_cdt(struct us_data *us)
+{
+ int rc;
+
+ // Enable peripheral control signals and card detect
+ rc = usbat_write_user_io(us,
+ USBAT_UIO_ACKD | USBAT_UIO_OE1 | USBAT_UIO_OE0,
+ USBAT_UIO_EPAD | USBAT_UIO_1);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Determine if media is present.
+ */
+static int usbat_flash_check_media_present(unsigned char *uio)
+{
+ if (*uio & USBAT_UIO_UI0) {
+ US_DEBUGP("usbat_flash_check_media_present: no media detected\n");
+ return USBAT_FLASH_MEDIA_NONE;
+ }
+
+ return USBAT_FLASH_MEDIA_CF;
+}
+
+/*
+ * Determine if media has changed since last operation
+ */
+static int usbat_flash_check_media_changed(unsigned char *uio)
+{
+ if (*uio & USBAT_UIO_0) {
+ US_DEBUGP("usbat_flash_check_media_changed: media change detected\n");
+ return USBAT_FLASH_MEDIA_CHANGED;
+ }
+
+ return USBAT_FLASH_MEDIA_SAME;
+}
+
+/*
+ * Check for media change / no media and handle the situation appropriately
+ */
+static int usbat_flash_check_media(struct us_data *us,
+ struct usbat_info *info)
+{
+ int rc;
+ unsigned char *uio = us->iobuf;
+
+ rc = usbat_read_user_io(us, uio);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ // Check for media existance
+ rc = usbat_flash_check_media_present(uio);
+ if (rc == USBAT_FLASH_MEDIA_NONE) {
+ info->sense_key = 0x02;
+ info->sense_asc = 0x3A;
+ info->sense_ascq = 0x00;
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ // Check for media change
+ rc = usbat_flash_check_media_changed(uio);
+ if (rc == USBAT_FLASH_MEDIA_CHANGED) {
+
+ // Reset and re-enable card detect
+ rc = usbat_device_reset(us);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+ rc = usbat_device_enable_cdt(us);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ msleep(50);
+
+ rc = usbat_read_user_io(us, uio);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ info->sense_key = UNIT_ATTENTION;
+ info->sense_asc = 0x28;
+ info->sense_ascq = 0x00;
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Determine whether we are controlling a flash-based reader/writer,
+ * or a HP8200-based CD drive.
+ * Sets transport functions as appropriate.
+ */
+static int usbat_identify_device(struct us_data *us,
+ struct usbat_info *info)
+{
+ int rc;
+ unsigned char status;
+
+ if (!us || !info)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ rc = usbat_device_reset(us);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ /*
+ * By examining the device signature after a reset, we can identify
+ * whether the device supports the ATAPI packet interface.
+ * The flash-devices do not support this, whereas the HP CDRW's obviously
+ * do.
+ *
+ * This method is not ideal, but works because no other devices have been
+ * produced based on the USBAT/USBAT02.
+ *
+ * Section 9.1 of the ATAPI-4 spec states (amongst other things) that
+ * after a device reset, a Cylinder low of 0x14 indicates that the device
+ * does support packet commands.
+ */
+ rc = usbat_read(us, USBAT_ATA, USBAT_ATA_LBA_ME, &status);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("usbat_identify_device: Cylinder low is %02X\n", status);
+
+ if (status == 0x14) {
+ // Device is HP 8200
+ US_DEBUGP("usbat_identify_device: Detected HP8200 CDRW\n");
+ info->devicetype = USBAT_DEV_HP8200;
+ } else {
+ // Device is a CompactFlash reader/writer
+ US_DEBUGP("usbat_identify_device: Detected Flash reader/writer\n");
+ info->devicetype = USBAT_DEV_FLASH;
+ }
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Set the transport function based on the device type
+ */
+static int usbat_set_transport(struct us_data *us,
+ struct usbat_info *info)
+{
+ int rc;
+
+ if (!info->devicetype) {
+ rc = usbat_identify_device(us, info);
+ if (rc != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("usbat_set_transport: Could not identify device\n");
+ return 1;
+ }
+ }
+
+ if (usbat_get_device_type(us) == USBAT_DEV_HP8200)
+ us->transport = usbat_hp8200e_transport;
+ else if (usbat_get_device_type(us) == USBAT_DEV_FLASH)
+ us->transport = usbat_flash_transport;
+
+ return 0;
+}
+
+/*
+ * Read the media capacity
+ */
+static int usbat_flash_get_sector_count(struct us_data *us,
+ struct usbat_info *info)
+{
+ unsigned char registers[3] = {
+ USBAT_ATA_SECCNT,
+ USBAT_ATA_DEVICE,
+ USBAT_ATA_CMD,
+ };
+ unsigned char command[3] = { 0x01, 0xA0, 0xEC };
+ unsigned char *reply;
+ unsigned char status;
+ int rc;
+
+ if (!us || !info)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ reply = kmalloc(512, GFP_NOIO);
+ if (!reply)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ // ATAPI command : IDENTIFY DEVICE
+ rc = usbat_multiple_write(us, registers, command, 3);
+ if (rc != USB_STOR_XFER_GOOD) {
+ US_DEBUGP("usbat_flash_get_sector_count: Gah! identify_device failed\n");
+ rc = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ // Read device status
+ if (usbat_get_status(us, &status) != USB_STOR_XFER_GOOD) {
+ rc = USB_STOR_TRANSPORT_ERROR;
+ goto leave;
+ }
+
+ msleep(100);
+
+ // Read the device identification data
+ rc = usbat_read_block(us, reply, 512);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ goto leave;
+
+ info->sectors = ((u32)(reply[117]) << 24) |
+ ((u32)(reply[116]) << 16) |
+ ((u32)(reply[115]) << 8) |
+ ((u32)(reply[114]) );
+
+ rc = USB_STOR_TRANSPORT_GOOD;
+
+ leave:
+ kfree(reply);
+ return rc;
+}
+
+/*
+ * Read data from device
+ */
+static int usbat_flash_read_data(struct us_data *us,
+ struct usbat_info *info,
+ u32 sector,
+ u32 sectors)
+{
+ unsigned char registers[7] = {
+ USBAT_ATA_FEATURES,
+ USBAT_ATA_SECCNT,
+ USBAT_ATA_SECNUM,
+ USBAT_ATA_LBA_ME,
+ USBAT_ATA_LBA_HI,
+ USBAT_ATA_DEVICE,
+ USBAT_ATA_STATUS,
+ };
+ unsigned char command[7];
+ unsigned char *buffer;
+ unsigned char thistime;
+ unsigned int totallen, alloclen;
+ int len, result;
+ unsigned int sg_idx = 0, sg_offset = 0;
+
+ result = usbat_flash_check_media(us, info);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
+
+ // we're working in LBA mode. according to the ATA spec,
+ // we can support up to 28-bit addressing. I don't know if Jumpshot
+ // supports beyond 24-bit addressing. It's kind of hard to test
+ // since it requires > 8GB CF card.
+
+ if (sector > 0x0FFFFFFF)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ totallen = sectors * info->ssize;
+
+ // Since we don't read more than 64 KB at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ alloclen = min(totallen, 65536u);
+ buffer = kmalloc(alloclen, GFP_NOIO);
+ if (buffer == NULL)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ do {
+ // loop, never allocate or transfer more than 64k at once
+ // (min(128k, 255*info->ssize) is the real limit)
+ len = min(totallen, alloclen);
+ thistime = (len / info->ssize) & 0xff;
+
+ // ATAPI command 0x20 (READ SECTORS)
+ usbat_pack_atapi_sector_cmd(command, thistime, sector, 0x20);
+
+ // Write/execute ATAPI read command
+ result = usbat_multiple_write(us, registers, command, 7);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ goto leave;
+
+ // Read the data we just requested
+ result = usbat_read_blocks(us, buffer, len);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ goto leave;
+
+ US_DEBUGP("usbat_flash_read_data: %d bytes\n", len);
+
+ // Store the data in the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &sg_idx, &sg_offset, TO_XFER_BUF);
+
+ sector += thistime;
+ totallen -= len;
+ } while (totallen > 0);
+
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_GOOD;
+
+leave:
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_ERROR;
+}
+
+/*
+ * Write data to device
+ */
+static int usbat_flash_write_data(struct us_data *us,
+ struct usbat_info *info,
+ u32 sector,
+ u32 sectors)
+{
+ unsigned char registers[7] = {
+ USBAT_ATA_FEATURES,
+ USBAT_ATA_SECCNT,
+ USBAT_ATA_SECNUM,
+ USBAT_ATA_LBA_ME,
+ USBAT_ATA_LBA_HI,
+ USBAT_ATA_DEVICE,
+ USBAT_ATA_STATUS,
+ };
+ unsigned char command[7];
+ unsigned char *buffer;
+ unsigned char thistime;
+ unsigned int totallen, alloclen;
+ int len, result;
+ unsigned int sg_idx = 0, sg_offset = 0;
+
+ result = usbat_flash_check_media(us, info);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
+
+ // we're working in LBA mode. according to the ATA spec,
+ // we can support up to 28-bit addressing. I don't know if Jumpshot
+ // supports beyond 24-bit addressing. It's kind of hard to test
+ // since it requires > 8GB CF card.
+
+ if (sector > 0x0FFFFFFF)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ totallen = sectors * info->ssize;
+
+ // Since we don't write more than 64 KB at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ alloclen = min(totallen, 65536u);
+ buffer = kmalloc(alloclen, GFP_NOIO);
+ if (buffer == NULL)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ do {
+ // loop, never allocate or transfer more than 64k at once
+ // (min(128k, 255*info->ssize) is the real limit)
+ len = min(totallen, alloclen);
+ thistime = (len / info->ssize) & 0xff;
+
+ // Get the data from the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, us->srb,
+ &sg_idx, &sg_offset, FROM_XFER_BUF);
+
+ // ATAPI command 0x30 (WRITE SECTORS)
+ usbat_pack_atapi_sector_cmd(command, thistime, sector, 0x30);
+
+ // Write/execute ATAPI write command
+ result = usbat_multiple_write(us, registers, command, 7);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ goto leave;
+
+ // Write the data
+ result = usbat_write_blocks(us, buffer, len);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ goto leave;
+
+ sector += thistime;
+ totallen -= len;
+ } while (totallen > 0);
+
+ kfree(buffer);
+ return result;
+
+leave:
+ kfree(buffer);
+ return USB_STOR_TRANSPORT_ERROR;
+}
+
+/*
+ * Squeeze a potentially huge (> 65535 byte) read10 command into
+ * a little ( <= 65535 byte) ATAPI pipe
+ */
+static int usbat_hp8200e_handle_read10(struct us_data *us,
+ unsigned char *registers,
+ unsigned char *data,
+ struct scsi_cmnd *srb)
+{
+ int result = USB_STOR_TRANSPORT_GOOD;
+ unsigned char *buffer;
+ unsigned int len;
+ unsigned int sector;
+ unsigned int sg_segment = 0;
+ unsigned int sg_offset = 0;
+
+ US_DEBUGP("handle_read10: transfersize %d\n",
+ srb->transfersize);
+
+ if (srb->request_bufflen < 0x10000) {
+
+ result = usbat_hp8200e_rw_block_test(us, USBAT_ATA,
+ registers, data, 19,
+ USBAT_ATA_DATA, USBAT_ATA_STATUS, 0xFD,
+ (USBAT_QUAL_FCQ | USBAT_QUAL_ALQ),
+ DMA_FROM_DEVICE,
+ srb->request_buffer,
+ srb->request_bufflen, srb->use_sg, 1);
+
+ return result;
+ }
+
+ /*
+ * Since we're requesting more data than we can handle in
+ * a single read command (max is 64k-1), we will perform
+ * multiple reads, but each read must be in multiples of
+ * a sector. Luckily the sector size is in srb->transfersize
+ * (see linux/drivers/scsi/sr.c).
+ */
+
+ if (data[7+0] == GPCMD_READ_CD) {
+ 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);
+ }
+
+ // Since we only read in one block at a time, we have to create
+ // a bounce buffer and move the data a piece at a time between the
+ // bounce buffer and the actual transfer buffer.
+
+ len = (65535/srb->transfersize) * srb->transfersize;
+ US_DEBUGP("Max read is %d bytes\n", len);
+ len = min(len, srb->request_bufflen);
+ buffer = kmalloc(len, GFP_NOIO);
+ if (buffer == NULL) // bloody hell!
+ return USB_STOR_TRANSPORT_FAILED;
+ sector = short_pack(data[7+3], data[7+2]);
+ sector <<= 16;
+ sector |= short_pack(data[7+5], data[7+4]);
+ transferred = 0;
+
+ sg_segment = 0; // for keeping track of where we are in
+ sg_offset = 0; // the scatter/gather list
+
+ while (transferred != srb->request_bufflen) {
+
+ if (len > srb->request_bufflen - transferred)
+ len = srb->request_bufflen - transferred;
+
+ data[3] = len&0xFF; // (cylL) = expected length (L)
+ data[4] = (len>>8)&0xFF; // (cylH) = expected length (H)
+
+ // Fix up the SCSI command sector and num sectors
+
+ data[7+2] = MSB_of(sector>>16); // SCSI command sector
+ data[7+3] = LSB_of(sector>>16);
+ data[7+4] = MSB_of(sector&0xFFFF);
+ data[7+5] = LSB_of(sector&0xFFFF);
+ if (data[7+0] == GPCMD_READ_CD)
+ data[7+6] = 0;
+ data[7+7] = MSB_of(len / srb->transfersize); // SCSI command
+ data[7+8] = LSB_of(len / srb->transfersize); // num sectors
+
+ result = usbat_hp8200e_rw_block_test(us, USBAT_ATA,
+ registers, data, 19,
+ USBAT_ATA_DATA, USBAT_ATA_STATUS, 0xFD,
+ (USBAT_QUAL_FCQ | USBAT_QUAL_ALQ),
+ DMA_FROM_DEVICE,
+ buffer,
+ len, 0, 1);
+
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ break;
+
+ // Store the data in the transfer buffer
+ usb_stor_access_xfer_buf(buffer, len, srb,
+ &sg_segment, &sg_offset, TO_XFER_BUF);
+
+ // Update the amount transferred and the sector number
+
+ transferred += len;
+ sector += len / srb->transfersize;
+
+ } // while transferred != srb->request_bufflen
+
+ kfree(buffer);
+ return result;
+}
+
+static int usbat_select_and_test_registers(struct us_data *us)
+{
+ int selector;
+ unsigned char *status = us->iobuf;
+ unsigned char max_selector = 0xB0;
+ if (usbat_get_device_type(us) == USBAT_DEV_FLASH)
+ max_selector = 0xA0;
+
+ // try device = master, then device = slave.
+
+ for (selector = 0xA0; selector <= max_selector; selector += 0x10) {
+
+ if (usbat_get_device_type(us) == USBAT_DEV_HP8200 &&
+ usbat_write(us, USBAT_ATA, USBAT_ATA_DEVICE, selector) !=
+ USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (usbat_read(us, USBAT_ATA, USBAT_ATA_STATUS, status) !=
+ USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (usbat_read(us, USBAT_ATA, USBAT_ATA_DEVICE, status) !=
+ USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (usbat_read(us, USBAT_ATA, USBAT_ATA_LBA_ME, status) !=
+ USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (usbat_read(us, USBAT_ATA, USBAT_ATA_LBA_HI, status) !=
+ USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (usbat_write(us, USBAT_ATA, USBAT_ATA_LBA_ME, 0x55) !=
+ USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (usbat_write(us, USBAT_ATA, USBAT_ATA_LBA_HI, 0xAA) !=
+ USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (usbat_read(us, USBAT_ATA, USBAT_ATA_LBA_ME, status) !=
+ USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ if (usbat_read(us, USBAT_ATA, USBAT_ATA_LBA_ME, status) !=
+ USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Initialize the USBAT processor and the storage device
+ */
+int init_usbat(struct us_data *us)
+{
+ int rc;
+ struct usbat_info *info;
+ unsigned char subcountH = USBAT_ATA_LBA_HI;
+ unsigned char subcountL = USBAT_ATA_LBA_ME;
+ unsigned char *status = us->iobuf;
+
+ us->extra = kmalloc(sizeof(struct usbat_info), GFP_NOIO);
+ if (!us->extra) {
+ US_DEBUGP("init_usbat: Gah! Can't allocate storage for usbat info struct!\n");
+ return 1;
+ }
+ memset(us->extra, 0, sizeof(struct usbat_info));
+ info = (struct usbat_info *) (us->extra);
+
+ // Enable peripheral control signals
+ rc = usbat_write_user_io(us,
+ USBAT_UIO_OE1 | USBAT_UIO_OE0,
+ USBAT_UIO_EPAD | USBAT_UIO_1);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 1\n");
+
+ msleep(2000);
+
+ rc = usbat_read_user_io(us, status);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ US_DEBUGP("INIT 2\n");
+
+ rc = usbat_read_user_io(us, status);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ rc = usbat_read_user_io(us, status);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 3\n");
+
+ // At this point, we need to detect which device we are using
+ if (usbat_set_transport(us, info))
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 4\n");
+
+ if (usbat_get_device_type(us) == USBAT_DEV_HP8200) {
+ msleep(250);
+
+ // Write 0x80 to ISA port 0x3F
+ rc = usbat_write(us, USBAT_ISA, 0x3F, 0x80);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 5\n");
+
+ // Read ISA port 0x27
+ rc = usbat_read(us, USBAT_ISA, 0x27, status);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 6\n");
+
+ rc = usbat_read_user_io(us, status);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 7\n");
+ }
+
+ rc = usbat_select_and_test_registers(us);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ US_DEBUGP("INIT 8\n");
+
+ rc = usbat_read_user_io(us, status);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 9\n");
+
+ // Enable peripheral control signals and card detect
+ rc = usbat_device_enable_cdt(us);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ US_DEBUGP("INIT 10\n");
+
+ rc = usbat_read_user_io(us, status);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 11\n");
+
+ msleep(1400);
+
+ rc = usbat_read_user_io(us, status);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 12\n");
+
+ rc = usbat_select_and_test_registers(us);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ US_DEBUGP("INIT 13\n");
+
+ if (usbat_get_device_type(us) == USBAT_DEV_FLASH) {
+ subcountH = 0x02;
+ subcountL = 0x00;
+ }
+ rc = usbat_set_shuttle_features(us, (USBAT_FEAT_ETEN | USBAT_FEAT_ET2 | USBAT_FEAT_ET1),
+ 0x00, 0x88, 0x08, subcountH, subcountL);
+ if (rc != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ US_DEBUGP("INIT 14\n");
+
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Transport for the HP 8200e
+ */
+static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us)
+{
+ int result;
+ unsigned char *status = us->iobuf;
+ unsigned char registers[32];
+ unsigned char data[32];
+ unsigned int len;
+ int i;
+ char string[64];
+
+ len = srb->request_bufflen;
+
+ /* Send A0 (ATA PACKET COMMAND).
+ Note: I guess we're never going to get any of the ATA
+ commands... just ATA Packet Commands.
+ */
+
+ registers[0] = USBAT_ATA_FEATURES;
+ registers[1] = USBAT_ATA_SECCNT;
+ registers[2] = USBAT_ATA_SECNUM;
+ registers[3] = USBAT_ATA_LBA_ME;
+ registers[4] = USBAT_ATA_LBA_HI;
+ registers[5] = USBAT_ATA_DEVICE;
+ registers[6] = USBAT_ATA_CMD;
+ data[0] = 0x00;
+ data[1] = 0x00;
+ data[2] = 0x00;
+ data[3] = len&0xFF; // (cylL) = expected length (L)
+ data[4] = (len>>8)&0xFF; // (cylH) = expected length (H)
+ data[5] = 0xB0; // (device sel) = slave
+ data[6] = 0xA0; // (command) = ATA PACKET COMMAND
+
+ for (i=7; i<19; i++) {
+ registers[i] = 0x10;
+ data[i] = (i-7 >= srb->cmd_len) ? 0 : srb->cmnd[i-7];
+ }
+
+ result = usbat_get_status(us, status);
+ US_DEBUGP("Status = %02X\n", *status);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+ if (srb->cmnd[0] == TEST_UNIT_READY)
+ transferred = 0;
+
+ if (srb->sc_data_direction == DMA_TO_DEVICE) {
+
+ result = usbat_hp8200e_rw_block_test(us, USBAT_ATA,
+ registers, data, 19,
+ USBAT_ATA_DATA, USBAT_ATA_STATUS, 0xFD,
+ (USBAT_QUAL_FCQ | USBAT_QUAL_ALQ),
+ DMA_TO_DEVICE,
+ srb->request_buffer,
+ len, srb->use_sg, 10);
+
+ if (result == USB_STOR_TRANSPORT_GOOD) {
+ transferred += len;
+ US_DEBUGP("Wrote %08X bytes\n", transferred);
+ }
+
+ return result;
+
+ } else if (srb->cmnd[0] == READ_10 ||
+ srb->cmnd[0] == GPCMD_READ_CD) {
+
+ return usbat_hp8200e_handle_read10(us, registers, data, srb);
+
+ }
+
+ if (len > 0xFFFF) {
+ US_DEBUGP("Error: len = %08X... what do I do now?\n",
+ len);
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ if ( (result = usbat_multiple_write(us,
+ registers, data, 7)) != USB_STOR_TRANSPORT_GOOD) {
+ return result;
+ }
+
+ // Write the 12-byte command header.
+
+ // If the command is BLANK then set the timer for 75 minutes.
+ // Otherwise set it for 10 minutes.
+
+ // NOTE: THE 8200 DOCUMENTATION STATES THAT BLANKING A CDRW
+ // AT SPEED 4 IS UNRELIABLE!!!
+
+ if ( (result = usbat_write_block(us,
+ USBAT_ATA, srb->cmnd, 12,
+ srb->cmnd[0]==GPCMD_BLANK ? 75 : 10)) !=
+ USB_STOR_TRANSPORT_GOOD) {
+ return result;
+ }
+
+ // If there is response data to be read in
+ // then do it here.
+
+ if (len != 0 && (srb->sc_data_direction == DMA_FROM_DEVICE)) {
+
+ // How many bytes to read in? Check cylL register
+
+ if (usbat_read(us, USBAT_ATA, USBAT_ATA_LBA_ME, status) !=
+ USB_STOR_XFER_GOOD) {
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ if (len > 0xFF) { // need to read cylH also
+ len = *status;
+ if (usbat_read(us, USBAT_ATA, USBAT_ATA_LBA_HI, status) !=
+ USB_STOR_XFER_GOOD) {
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+ len += ((unsigned int) *status)<<8;
+ }
+ else
+ len = *status;
+
+
+ result = usbat_read_block(us, srb->request_buffer, len);
+
+ /* Debug-print the first 32 bytes of the transfer */
+
+ if (!srb->use_sg) {
+ string[0] = 0;
+ for (i=0; i<len && i<32; i++) {
+ sprintf(string+strlen(string), "%02X ",
+ ((unsigned char *)srb->request_buffer)[i]);
+ if ((i%16)==15) {
+ US_DEBUGP("%s\n", string);
+ string[0] = 0;
+ }
+ }
+ if (string[0]!=0)
+ US_DEBUGP("%s\n", string);
+ }
+ }
+
+ return result;
+}
+
+/*
+ * Transport for USBAT02-based CompactFlash and similar storage devices
+ */
+static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us)
+{
+ int rc;
+ struct usbat_info *info = (struct usbat_info *) (us->extra);
+ unsigned long block, blocks;
+ unsigned char *ptr = us->iobuf;
+ static unsigned char inquiry_response[36] = {
+ 0x00, 0x80, 0x00, 0x01, 0x1F, 0x00, 0x00, 0x00
+ };
+
+ if (srb->cmnd[0] == INQUIRY) {
+ US_DEBUGP("usbat_flash_transport: INQUIRY. Returning bogus response.\n");
+ memcpy(ptr, inquiry_response, sizeof(inquiry_response));
+ fill_inquiry_response(us, ptr, 36);
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == READ_CAPACITY) {
+ rc = usbat_flash_check_media(us, info);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ rc = usbat_flash_get_sector_count(us, info);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ info->ssize = 0x200; // hard coded 512 byte sectors as per ATA spec
+ US_DEBUGP("usbat_flash_transport: READ_CAPACITY: %ld sectors, %ld bytes per sector\n",
+ info->sectors, info->ssize);
+
+ // build the reply
+ // note: must return the sector number of the last sector,
+ // *not* the total number of sectors
+ ((__be32 *) ptr)[0] = cpu_to_be32(info->sectors - 1);
+ ((__be32 *) ptr)[1] = cpu_to_be32(info->ssize);
+ usb_stor_set_xfer_buf(ptr, 8, srb);
+
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == MODE_SELECT_10) {
+ US_DEBUGP("usbat_flash_transport: Gah! MODE_SELECT_10.\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ if (srb->cmnd[0] == READ_10) {
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8]));
+
+ US_DEBUGP("usbat_flash_transport: READ_10: read block 0x%04lx count %ld\n", block, blocks);
+ return usbat_flash_read_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == READ_12) {
+ // I don't think we'll ever see a READ_12 but support it anyway...
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) |
+ ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9]));
+
+ US_DEBUGP("usbat_flash_transport: READ_12: read block 0x%04lx count %ld\n", block, blocks);
+ return usbat_flash_read_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == WRITE_10) {
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8]));
+
+ US_DEBUGP("usbat_flash_transport: WRITE_10: write block 0x%04lx count %ld\n", block, blocks);
+ return usbat_flash_write_data(us, info, block, blocks);
+ }
+
+ if (srb->cmnd[0] == WRITE_12) {
+ // I don't think we'll ever see a WRITE_12 but support it anyway...
+ block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) |
+ ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5]));
+
+ blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) |
+ ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9]));
+
+ US_DEBUGP("usbat_flash_transport: WRITE_12: write block 0x%04lx count %ld\n", block, blocks);
+ return usbat_flash_write_data(us, info, block, blocks);
+ }
+
+
+ if (srb->cmnd[0] == TEST_UNIT_READY) {
+ US_DEBUGP("usbat_flash_transport: TEST_UNIT_READY.\n");
+
+ rc = usbat_flash_check_media(us, info);
+ if (rc != USB_STOR_TRANSPORT_GOOD)
+ return rc;
+
+ return usbat_check_status(us);
+ }
+
+ if (srb->cmnd[0] == REQUEST_SENSE) {
+ US_DEBUGP("usbat_flash_transport: REQUEST_SENSE.\n");
+
+ memset(ptr, 0, 18);
+ ptr[0] = 0xF0;
+ ptr[2] = info->sense_key;
+ ptr[7] = 11;
+ ptr[12] = info->sense_asc;
+ ptr[13] = info->sense_ascq;
+ usb_stor_set_xfer_buf(ptr, 18, srb);
+
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {
+ // sure. whatever. not like we can stop the user from popping
+ // the media out of the device (no locking doors, etc)
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ US_DEBUGP("usbat_flash_transport: Gah! Unknown command: %d (0x%x)\n",
+ srb->cmnd[0], srb->cmnd[0]);
+ info->sense_key = 0x05;
+ info->sense_asc = 0x20;
+ info->sense_ascq = 0x00;
+ return USB_STOR_TRANSPORT_FAILED;
+}
+
+/*
+ * Default transport function. Attempts to detect which transport function
+ * should be called, makes it the new default, and calls it.
+ *
+ * This function should never be called. Our usbat_init() function detects the
+ * device type and changes the us->transport ptr to the transport function
+ * relevant to the device.
+ * However, we'll support this impossible(?) case anyway.
+ */
+int usbat_transport(struct scsi_cmnd *srb, struct us_data *us)
+{
+ struct usbat_info *info = (struct usbat_info*) (us->extra);
+
+ if (usbat_set_transport(us, info))
+ return USB_STOR_TRANSPORT_ERROR;
+
+ return us->transport(srb, us);
+}
+
diff --git a/drivers/usb/storage/shuttle_usbat.h b/drivers/usb/storage/shuttle_usbat.h
new file mode 100644
index 000000000000..5b8e867e2ae5
--- /dev/null
+++ b/drivers/usb/storage/shuttle_usbat.h
@@ -0,0 +1,123 @@
+/* Driver for SCM Microsystems USB-ATAPI cable
+ * Header File
+ *
+ * $Id: shuttle_usbat.h,v 1.5 2000/09/17 14:44:52 groovyjava Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 2000 Robert Baruch (autophile@dol.net)
+ * (c) 2004, 2005 Daniel Drake <dsd@gentoo.org>
+ *
+ * See shuttle_usbat.c for more explanation
+ *
+ * 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, 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.
+ */
+
+#ifndef _USB_SHUTTLE_USBAT_H
+#define _USB_SHUTTLE_USBAT_H
+
+/* Supported device types */
+#define USBAT_DEV_HP8200 0x01
+#define USBAT_DEV_FLASH 0x02
+
+#define USBAT_EPP_PORT 0x10
+#define USBAT_EPP_REGISTER 0x30
+#define USBAT_ATA 0x40
+#define USBAT_ISA 0x50
+
+/* Commands (need to be logically OR'd with an access type */
+#define USBAT_CMD_READ_REG 0x00
+#define USBAT_CMD_WRITE_REG 0x01
+#define USBAT_CMD_READ_BLOCK 0x02
+#define USBAT_CMD_WRITE_BLOCK 0x03
+#define USBAT_CMD_COND_READ_BLOCK 0x04
+#define USBAT_CMD_COND_WRITE_BLOCK 0x05
+#define USBAT_CMD_WRITE_REGS 0x07
+
+/* Commands (these don't need an access type) */
+#define USBAT_CMD_EXEC_CMD 0x80
+#define USBAT_CMD_SET_FEAT 0x81
+#define USBAT_CMD_UIO 0x82
+
+/* Methods of accessing UIO register */
+#define USBAT_UIO_READ 1
+#define USBAT_UIO_WRITE 0
+
+/* Qualifier bits */
+#define USBAT_QUAL_FCQ 0x20 // full compare
+#define USBAT_QUAL_ALQ 0x10 // auto load subcount
+
+/* USBAT Flash Media status types */
+#define USBAT_FLASH_MEDIA_NONE 0
+#define USBAT_FLASH_MEDIA_CF 1
+
+/* USBAT Flash Media change types */
+#define USBAT_FLASH_MEDIA_SAME 0
+#define USBAT_FLASH_MEDIA_CHANGED 1
+
+/* USBAT ATA registers */
+#define USBAT_ATA_DATA 0x10 // read/write data (R/W)
+#define USBAT_ATA_FEATURES 0x11 // set features (W)
+#define USBAT_ATA_ERROR 0x11 // error (R)
+#define USBAT_ATA_SECCNT 0x12 // sector count (R/W)
+#define USBAT_ATA_SECNUM 0x13 // sector number (R/W)
+#define USBAT_ATA_LBA_ME 0x14 // cylinder low (R/W)
+#define USBAT_ATA_LBA_HI 0x15 // cylinder high (R/W)
+#define USBAT_ATA_DEVICE 0x16 // head/device selection (R/W)
+#define USBAT_ATA_STATUS 0x17 // device status (R)
+#define USBAT_ATA_CMD 0x17 // device command (W)
+#define USBAT_ATA_ALTSTATUS 0x0E // status (no clear IRQ) (R)
+
+/* USBAT User I/O Data registers */
+#define USBAT_UIO_EPAD 0x80 // Enable Peripheral Control Signals
+#define USBAT_UIO_CDT 0x40 // Card Detect (Read Only)
+ // CDT = ACKD & !UI1 & !UI0
+#define USBAT_UIO_1 0x20 // I/O 1
+#define USBAT_UIO_0 0x10 // I/O 0
+#define USBAT_UIO_EPP_ATA 0x08 // 1=EPP mode, 0=ATA mode
+#define USBAT_UIO_UI1 0x04 // Input 1
+#define USBAT_UIO_UI0 0x02 // Input 0
+#define USBAT_UIO_INTR_ACK 0x01 // Interrupt (ATA & ISA)/Acknowledge (EPP)
+
+/* USBAT User I/O Enable registers */
+#define USBAT_UIO_DRVRST 0x80 // Reset Peripheral
+#define USBAT_UIO_ACKD 0x40 // Enable Card Detect
+#define USBAT_UIO_OE1 0x20 // I/O 1 set=output/clr=input
+ // If ACKD=1, set OE1 to 1 also.
+#define USBAT_UIO_OE0 0x10 // I/O 0 set=output/clr=input
+#define USBAT_UIO_ADPRST 0x01 // Reset SCM chip
+
+/* USBAT Features */
+#define USBAT_FEAT_ETEN 0x80 // External trigger enable
+#define USBAT_FEAT_U1 0x08
+#define USBAT_FEAT_U0 0x04
+#define USBAT_FEAT_ET1 0x02
+#define USBAT_FEAT_ET2 0x01
+
+extern int usbat_transport(struct scsi_cmnd *srb, struct us_data *us);
+extern int init_usbat(struct us_data *us);
+
+struct usbat_info {
+ int devicetype;
+
+ /* Used for Flash readers only */
+ unsigned long sectors; // total sector count
+ unsigned long ssize; // sector size in bytes
+
+ unsigned char sense_key;
+ unsigned long sense_asc; // additional sense code
+ unsigned long sense_ascq; // additional sense code qualifier
+};
+
+#endif
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
new file mode 100644
index 000000000000..d2c3d2fa082e
--- /dev/null
+++ b/drivers/usb/storage/transport.c
@@ -0,0 +1,1215 @@
+/* Driver for USB Mass Storage compliant devices
+ *
+ * $Id: transport.c,v 1.47 2002/04/22 03:39:43 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 <stern@rowland.org>
+ *
+ * Initial work by:
+ * (c) 1999 Michael Gee (michael@linuxspecific.com)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+
+#include "usb.h"
+#include "transport.h"
+#include "protocol.h"
+#include "scsiglue.h"
+#include "debug.h"
+
+
+/***********************************************************************
+ * Data transfer routines
+ ***********************************************************************/
+
+/*
+ * This is subtle, so pay attention:
+ * ---------------------------------
+ * We're very concerned about races with a command abort. Hanging this code
+ * is a sure fire way to hang the kernel. (Note that this discussion applies
+ * only to transactions resulting from a scsi queued-command, since only
+ * these transactions are subject to a scsi abort. Other transactions, such
+ * as those occurring during device-specific initialization, must be handled
+ * by a separate code path.)
+ *
+ * The abort function (usb_storage_command_abort() in scsiglue.c) first
+ * sets the machine state and the ABORTING bit in us->flags to prevent
+ * new URBs from being submitted. It then calls usb_stor_stop_transport()
+ * below, which atomically tests-and-clears the URB_ACTIVE bit in us->flags
+ * to see if the current_urb needs to be stopped. Likewise, the SG_ACTIVE
+ * bit is tested to see if the current_sg scatter-gather request needs to be
+ * stopped. The timeout callback routine does much the same thing.
+ *
+ * When a disconnect occurs, the DISCONNECTING bit in us->flags is set to
+ * prevent new URBs from being submitted, and usb_stor_stop_transport() is
+ * called to stop any ongoing requests.
+ *
+ * The submit function first verifies that the submitting is allowed
+ * (neither ABORTING nor DISCONNECTING bits are set) and that the submit
+ * completes without errors, and only then sets the URB_ACTIVE bit. This
+ * prevents the stop_transport() function from trying to cancel the URB
+ * while the submit call is underway. Next, the submit function must test
+ * the flags to see if an abort or disconnect occurred during the submission
+ * or before the URB_ACTIVE bit was set. If so, it's essential to cancel
+ * the URB if it hasn't been cancelled already (i.e., if the URB_ACTIVE bit
+ * is still set). Either way, the function must then wait for the URB to
+ * finish. Note that because the URB_ASYNC_UNLINK flag is set, the URB can
+ * still be in progress even after a call to usb_unlink_urb() returns.
+ *
+ * The idea is that (1) once the ABORTING or DISCONNECTING bit is set,
+ * either the stop_transport() function or the submitting function
+ * is guaranteed to call usb_unlink_urb() for an active URB,
+ * and (2) test_and_clear_bit() prevents usb_unlink_urb() from being
+ * called more than once or from being called during usb_submit_urb().
+ */
+
+/* This is the completion handler which will wake us up when an URB
+ * completes.
+ */
+static void usb_stor_blocking_completion(struct urb *urb, struct pt_regs *regs)
+{
+ struct completion *urb_done_ptr = (struct completion *)urb->context;
+
+ complete(urb_done_ptr);
+}
+
+/* This is the timeout handler which will cancel an URB when its timeout
+ * expires.
+ */
+static void timeout_handler(unsigned long us_)
+{
+ struct us_data *us = (struct us_data *) us_;
+
+ if (test_and_clear_bit(US_FLIDX_URB_ACTIVE, &us->flags)) {
+ US_DEBUGP("Timeout -- cancelling URB\n");
+ usb_unlink_urb(us->current_urb);
+ }
+}
+
+/* This is the common part of the URB message submission code
+ *
+ * All URBs from the usb-storage driver involved in handling a queued scsi
+ * command _must_ pass through this function (or something like it) for the
+ * abort mechanisms to work properly.
+ */
+static int usb_stor_msg_common(struct us_data *us, int timeout)
+{
+ struct completion urb_done;
+ struct timer_list to_timer;
+ int status;
+
+ /* don't submit URBs during abort/disconnect processing */
+ if (us->flags & ABORTING_OR_DISCONNECTING)
+ return -EIO;
+
+ /* set up data structures for the wakeup system */
+ init_completion(&urb_done);
+
+ /* fill the common fields in the URB */
+ us->current_urb->context = &urb_done;
+ us->current_urb->actual_length = 0;
+ us->current_urb->error_count = 0;
+ us->current_urb->status = 0;
+
+ /* we assume that if transfer_buffer isn't us->iobuf then it
+ * hasn't been mapped for DMA. Yes, this is clunky, but it's
+ * easier than always having the caller tell us whether the
+ * transfer buffer has already been mapped. */
+ us->current_urb->transfer_flags =
+ URB_ASYNC_UNLINK | URB_NO_SETUP_DMA_MAP;
+ if (us->current_urb->transfer_buffer == us->iobuf)
+ us->current_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+ us->current_urb->transfer_dma = us->iobuf_dma;
+ us->current_urb->setup_dma = us->cr_dma;
+
+ /* submit the URB */
+ status = usb_submit_urb(us->current_urb, GFP_NOIO);
+ if (status) {
+ /* something went wrong */
+ return status;
+ }
+
+ /* since the URB has been submitted successfully, it's now okay
+ * to cancel it */
+ set_bit(US_FLIDX_URB_ACTIVE, &us->flags);
+
+ /* did an abort/disconnect occur during the submission? */
+ if (us->flags & ABORTING_OR_DISCONNECTING) {
+
+ /* cancel the URB, if it hasn't been cancelled already */
+ if (test_and_clear_bit(US_FLIDX_URB_ACTIVE, &us->flags)) {
+ US_DEBUGP("-- cancelling URB\n");
+ usb_unlink_urb(us->current_urb);
+ }
+ }
+
+ /* submit the timeout timer, if a timeout was requested */
+ if (timeout > 0) {
+ init_timer(&to_timer);
+ to_timer.expires = jiffies + timeout;
+ to_timer.function = timeout_handler;
+ to_timer.data = (unsigned long) us;
+ add_timer(&to_timer);
+ }
+
+ /* wait for the completion of the URB */
+ wait_for_completion(&urb_done);
+ clear_bit(US_FLIDX_URB_ACTIVE, &us->flags);
+
+ /* clean up the timeout timer */
+ if (timeout > 0)
+ del_timer_sync(&to_timer);
+
+ /* return the URB status */
+ return us->current_urb->status;
+}
+
+/*
+ * Transfer one control message, with timeouts, and allowing early
+ * termination. Return codes are usual -Exxx, *not* USB_STOR_XFER_xxx.
+ */
+int usb_stor_control_msg(struct us_data *us, unsigned int pipe,
+ u8 request, u8 requesttype, u16 value, u16 index,
+ void *data, u16 size, int timeout)
+{
+ int status;
+
+ US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n",
+ __FUNCTION__, request, requesttype,
+ value, index, size);
+
+ /* fill in the devrequest structure */
+ us->cr->bRequestType = requesttype;
+ us->cr->bRequest = request;
+ us->cr->wValue = cpu_to_le16(value);
+ us->cr->wIndex = cpu_to_le16(index);
+ us->cr->wLength = cpu_to_le16(size);
+
+ /* fill and submit the URB */
+ usb_fill_control_urb(us->current_urb, us->pusb_dev, pipe,
+ (unsigned char*) us->cr, data, size,
+ usb_stor_blocking_completion, NULL);
+ status = usb_stor_msg_common(us, timeout);
+
+ /* return the actual length of the data transferred if no error */
+ if (status == 0)
+ status = us->current_urb->actual_length;
+ return status;
+}
+
+/* This is a version of usb_clear_halt() that allows early termination and
+ * 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.
+ *
+ * A definitive list of these 'bad' devices is too difficult to maintain or
+ * make complete enough to be useful. This problem was first observed on the
+ * Hagiwara FlashGate DUAL unit. However, bus traces reveal that neither
+ * MacOS nor Windows checks the status after clearing a halt.
+ *
+ * Since many vendors in this space limit their testing to interoperability
+ * with these two OSes, specification violations like this one are common.
+ */
+int usb_stor_clear_halt(struct us_data *us, unsigned int pipe)
+{
+ int result;
+ int endp = usb_pipeendpoint(pipe);
+
+ if (usb_pipein (pipe))
+ endp |= USB_DIR_IN;
+
+ result = usb_stor_control_msg(us, us->send_ctrl_pipe,
+ USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT,
+ USB_ENDPOINT_HALT, endp,
+ NULL, 0, 3*HZ);
+
+ /* reset the endpoint toggle */
+ usb_settoggle(us->pusb_dev, usb_pipeendpoint(pipe),
+ usb_pipeout(pipe), 0);
+
+ US_DEBUGP("%s: result = %d\n", __FUNCTION__, result);
+ return result;
+}
+
+
+/*
+ * Interpret the results of a URB transfer
+ *
+ * This function prints appropriate debugging messages, clears halts on
+ * non-control endpoints, and translates the status to the corresponding
+ * USB_STOR_XFER_xxx return code.
+ */
+static int interpret_urb_result(struct us_data *us, unsigned int pipe,
+ unsigned int length, int result, unsigned int partial)
+{
+ US_DEBUGP("Status code %d; transferred %u/%u\n",
+ result, partial, length);
+ switch (result) {
+
+ /* no error code; did we send all the data? */
+ case 0:
+ if (partial != length) {
+ US_DEBUGP("-- short transfer\n");
+ return USB_STOR_XFER_SHORT;
+ }
+
+ US_DEBUGP("-- transfer complete\n");
+ return USB_STOR_XFER_GOOD;
+
+ /* stalled */
+ case -EPIPE:
+ /* for control endpoints, (used by CB[I]) a stall indicates
+ * a failed command */
+ if (usb_pipecontrol(pipe)) {
+ US_DEBUGP("-- stall on control pipe\n");
+ return USB_STOR_XFER_STALLED;
+ }
+
+ /* for other sorts of endpoint, clear the stall */
+ US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
+ if (usb_stor_clear_halt(us, pipe) < 0)
+ return USB_STOR_XFER_ERROR;
+ return USB_STOR_XFER_STALLED;
+
+ /* timeout or excessively long NAK */
+ case -ETIMEDOUT:
+ US_DEBUGP("-- timeout or NAK\n");
+ return USB_STOR_XFER_ERROR;
+
+ /* babble - the device tried to send more than we wanted to read */
+ case -EOVERFLOW:
+ US_DEBUGP("-- babble\n");
+ return USB_STOR_XFER_LONG;
+
+ /* the transfer was cancelled by abort, disconnect, or timeout */
+ case -ECONNRESET:
+ US_DEBUGP("-- transfer cancelled\n");
+ return USB_STOR_XFER_ERROR;
+
+ /* short scatter-gather read transfer */
+ case -EREMOTEIO:
+ US_DEBUGP("-- short read transfer\n");
+ return USB_STOR_XFER_SHORT;
+
+ /* abort or disconnect in progress */
+ case -EIO:
+ US_DEBUGP("-- abort or disconnect in progress\n");
+ return USB_STOR_XFER_ERROR;
+
+ /* the catch-all error case */
+ default:
+ US_DEBUGP("-- unknown error\n");
+ return USB_STOR_XFER_ERROR;
+ }
+}
+
+/*
+ * Transfer one control message, without timeouts, but allowing early
+ * termination. Return codes are USB_STOR_XFER_xxx.
+ */
+int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe,
+ u8 request, u8 requesttype, u16 value, u16 index,
+ void *data, u16 size)
+{
+ int result;
+
+ US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n",
+ __FUNCTION__, request, requesttype,
+ value, index, size);
+
+ /* fill in the devrequest structure */
+ us->cr->bRequestType = requesttype;
+ us->cr->bRequest = request;
+ us->cr->wValue = cpu_to_le16(value);
+ us->cr->wIndex = cpu_to_le16(index);
+ us->cr->wLength = cpu_to_le16(size);
+
+ /* fill and submit the URB */
+ usb_fill_control_urb(us->current_urb, us->pusb_dev, pipe,
+ (unsigned char*) us->cr, data, size,
+ usb_stor_blocking_completion, NULL);
+ result = usb_stor_msg_common(us, 0);
+
+ return interpret_urb_result(us, pipe, size, result,
+ us->current_urb->actual_length);
+}
+
+/*
+ * Receive one interrupt buffer, without timeouts, but allowing early
+ * termination. Return codes are USB_STOR_XFER_xxx.
+ *
+ * This routine always uses us->recv_intr_pipe as the pipe and
+ * us->ep_bInterval as the interrupt interval.
+ */
+static int usb_stor_intr_transfer(struct us_data *us, void *buf,
+ unsigned int length)
+{
+ int result;
+ unsigned int pipe = us->recv_intr_pipe;
+ unsigned int maxp;
+
+ US_DEBUGP("%s: xfer %u bytes\n", __FUNCTION__, length);
+
+ /* calculate the max packet size */
+ maxp = usb_maxpacket(us->pusb_dev, pipe, usb_pipeout(pipe));
+ if (maxp > length)
+ maxp = length;
+
+ /* fill and submit the URB */
+ usb_fill_int_urb(us->current_urb, us->pusb_dev, pipe, buf,
+ maxp, usb_stor_blocking_completion, NULL,
+ us->ep_bInterval);
+ result = usb_stor_msg_common(us, 0);
+
+ return interpret_urb_result(us, pipe, length, result,
+ us->current_urb->actual_length);
+}
+
+/*
+ * Transfer one buffer via bulk pipe, without timeouts, but allowing early
+ * termination. Return codes are USB_STOR_XFER_xxx. If the bulk pipe
+ * stalls during the transfer, the halt is automatically cleared.
+ */
+int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,
+ void *buf, unsigned int length, unsigned int *act_len)
+{
+ int result;
+
+ US_DEBUGP("%s: xfer %u bytes\n", __FUNCTION__, length);
+
+ /* fill and submit the URB */
+ usb_fill_bulk_urb(us->current_urb, us->pusb_dev, pipe, buf, length,
+ usb_stor_blocking_completion, NULL);
+ result = usb_stor_msg_common(us, 0);
+
+ /* store the actual length of the data transferred */
+ if (act_len)
+ *act_len = us->current_urb->actual_length;
+ return interpret_urb_result(us, pipe, length, result,
+ us->current_urb->actual_length);
+}
+
+/*
+ * Transfer a scatter-gather list via bulk transfer
+ *
+ * This function does basically the same thing as usb_stor_bulk_transfer_buf()
+ * above, but it uses the usbcore scatter-gather library.
+ */
+static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
+ struct scatterlist *sg, int num_sg, unsigned int length,
+ unsigned int *act_len)
+{
+ int result;
+
+ /* don't submit s-g requests during abort/disconnect processing */
+ if (us->flags & ABORTING_OR_DISCONNECTING)
+ return USB_STOR_XFER_ERROR;
+
+ /* initialize the scatter-gather request block */
+ US_DEBUGP("%s: xfer %u bytes, %d entries\n", __FUNCTION__,
+ length, num_sg);
+ result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0,
+ sg, num_sg, length, SLAB_NOIO);
+ if (result) {
+ US_DEBUGP("usb_sg_init returned %d\n", result);
+ return USB_STOR_XFER_ERROR;
+ }
+
+ /* since the block has been initialized successfully, it's now
+ * okay to cancel it */
+ set_bit(US_FLIDX_SG_ACTIVE, &us->flags);
+
+ /* did an abort/disconnect occur during the submission? */
+ if (us->flags & ABORTING_OR_DISCONNECTING) {
+
+ /* cancel the request, if it hasn't been cancelled already */
+ if (test_and_clear_bit(US_FLIDX_SG_ACTIVE, &us->flags)) {
+ US_DEBUGP("-- cancelling sg request\n");
+ usb_sg_cancel(&us->current_sg);
+ }
+ }
+
+ /* wait for the completion of the transfer */
+ usb_sg_wait(&us->current_sg);
+ clear_bit(US_FLIDX_SG_ACTIVE, &us->flags);
+
+ result = us->current_sg.status;
+ if (act_len)
+ *act_len = us->current_sg.bytes;
+ return interpret_urb_result(us, pipe, length, result,
+ us->current_sg.bytes);
+}
+
+/*
+ * Transfer an entire SCSI command's worth of data payload over the bulk
+ * pipe.
+ *
+ * Note that this uses usb_stor_bulk_transfer_buf() and
+ * usb_stor_bulk_transfer_sglist() to achieve its goals --
+ * this function simply determines whether we're going to use
+ * scatter-gather or not, and acts appropriately.
+ */
+int usb_stor_bulk_transfer_sg(struct us_data* us, unsigned int pipe,
+ void *buf, unsigned int length_left, int use_sg, int *residual)
+{
+ int result;
+ unsigned int partial;
+
+ /* are we scatter-gathering? */
+ if (use_sg) {
+ /* use the usb core scatter-gather primitives */
+ result = usb_stor_bulk_transfer_sglist(us, pipe,
+ (struct scatterlist *) buf, use_sg,
+ length_left, &partial);
+ length_left -= partial;
+ } else {
+ /* no scatter-gather, just make the request */
+ result = usb_stor_bulk_transfer_buf(us, pipe, buf,
+ length_left, &partial);
+ length_left -= partial;
+ }
+
+ /* store the residual and return the error code */
+ if (residual)
+ *residual = length_left;
+ return result;
+}
+
+/***********************************************************************
+ * Transport routines
+ ***********************************************************************/
+
+/* 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(struct scsi_cmnd *srb, struct us_data *us)
+{
+ int need_auto_sense;
+ int result;
+
+ /* send the command to the transport layer */
+ srb->resid = 0;
+ result = us->transport(srb, us);
+
+ /* if the command gets aborted by the higher layers, we need to
+ * short-circuit all other processing
+ */
+ if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) {
+ US_DEBUGP("-- command was aborted\n");
+ goto Handle_Abort;
+ }
+
+ /* 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;
+ }
+
+ /* if the transport provided its own sense data, don't auto-sense */
+ if (result == USB_STOR_TRANSPORT_NO_SENSE) {
+ srb->result = SAM_STAT_CHECK_CONDITION;
+ return;
+ }
+
+ srb->result = SAM_STAT_GOOD;
+
+ /* Determine if we need to auto-sense
+ *
+ * I normally don't use a flag like this, but it's almost impossible
+ * to understand what's going on here if I don't.
+ */
+ need_auto_sense = 0;
+
+ /*
+ * If we're running the CB transport, which is incapable
+ * of determining status on its own, we will auto-sense
+ * unless the operation involved a data-in transfer. Devices
+ * can signal most data-in errors by stalling the bulk-in pipe.
+ */
+ if ((us->protocol == US_PR_CB || us->protocol == US_PR_DPCM_USB) &&
+ srb->sc_data_direction != DMA_FROM_DEVICE) {
+ US_DEBUGP("-- CB transport device requiring auto-sense\n");
+ need_auto_sense = 1;
+ }
+
+ /*
+ * 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.
+ */
+ if (result == USB_STOR_TRANSPORT_FAILED) {
+ US_DEBUGP("-- transport indicates command failure\n");
+ need_auto_sense = 1;
+ }
+
+ /*
+ * A short transfer on a command where we don't expect it
+ * is unusual, but it doesn't mean we need to auto-sense.
+ */
+ if ((srb->resid > 0) &&
+ !((srb->cmnd[0] == REQUEST_SENSE) ||
+ (srb->cmnd[0] == INQUIRY) ||
+ (srb->cmnd[0] == MODE_SENSE) ||
+ (srb->cmnd[0] == LOG_SENSE) ||
+ (srb->cmnd[0] == MODE_SENSE_10))) {
+ US_DEBUGP("-- unexpectedly short transfer\n");
+ }
+
+ /* Now, if we need to do the auto-sense, let's do it */
+ if (need_auto_sense) {
+ int temp_result;
+ void* old_request_buffer;
+ unsigned short old_sg;
+ unsigned old_request_bufflen;
+ unsigned char old_sc_data_direction;
+ unsigned char old_cmd_len;
+ unsigned char old_cmnd[MAX_COMMAND_SIZE];
+ unsigned long old_serial_number;
+ int old_resid;
+
+ US_DEBUGP("Issuing auto-REQUEST_SENSE\n");
+
+ /* save the old command */
+ memcpy(old_cmnd, srb->cmnd, MAX_COMMAND_SIZE);
+ old_cmd_len = srb->cmd_len;
+
+ /* set the command and the LUN */
+ memset(srb->cmnd, 0, MAX_COMMAND_SIZE);
+ srb->cmnd[0] = REQUEST_SENSE;
+ srb->cmnd[1] = old_cmnd[1] & 0xE0;
+ srb->cmnd[4] = 18;
+
+ /* FIXME: we must do the protocol translation here */
+ if (us->subclass == US_SC_RBC || us->subclass == US_SC_SCSI)
+ srb->cmd_len = 6;
+ else
+ srb->cmd_len = 12;
+
+ /* set the transfer direction */
+ old_sc_data_direction = srb->sc_data_direction;
+ srb->sc_data_direction = DMA_FROM_DEVICE;
+
+ /* use the new buffer we have */
+ old_request_buffer = srb->request_buffer;
+ srb->request_buffer = srb->sense_buffer;
+
+ /* set the buffer length for transfer */
+ old_request_bufflen = srb->request_bufflen;
+ srb->request_bufflen = 18;
+
+ /* set up for no scatter-gather use */
+ old_sg = srb->use_sg;
+ srb->use_sg = 0;
+
+ /* change the serial number -- toggle the high bit*/
+ old_serial_number = srb->serial_number;
+ srb->serial_number ^= 0x80000000;
+
+ /* issue the auto-sense command */
+ old_resid = srb->resid;
+ srb->resid = 0;
+ temp_result = us->transport(us->srb, us);
+
+ /* let's clean up right away */
+ srb->resid = old_resid;
+ srb->request_buffer = old_request_buffer;
+ srb->request_bufflen = old_request_bufflen;
+ srb->use_sg = old_sg;
+ srb->serial_number = old_serial_number;
+ srb->sc_data_direction = old_sc_data_direction;
+ srb->cmd_len = old_cmd_len;
+ memcpy(srb->cmnd, old_cmnd, MAX_COMMAND_SIZE);
+
+ if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) {
+ US_DEBUGP("-- auto-sense aborted\n");
+ goto Handle_Abort;
+ }
+ if (temp_result != USB_STOR_TRANSPORT_GOOD) {
+ US_DEBUGP("-- auto-sense failure\n");
+
+ /* we skip the reset if this happens to be a
+ * multi-target device, since failure of an
+ * auto-sense is perfectly valid
+ */
+ if (!(us->flags & US_FL_SCM_MULT_TARG))
+ us->transport_reset(us);
+ srb->result = DID_ERROR << 16;
+ return;
+ }
+
+ US_DEBUGP("-- Result from auto-sense is %d\n", temp_result);
+ US_DEBUGP("-- code: 0x%x, key: 0x%x, ASC: 0x%x, ASCQ: 0x%x\n",
+ srb->sense_buffer[0],
+ srb->sense_buffer[2] & 0xf,
+ srb->sense_buffer[12],
+ srb->sense_buffer[13]);
+#ifdef CONFIG_USB_STORAGE_DEBUG
+ usb_stor_show_sense(
+ srb->sense_buffer[2] & 0xf,
+ srb->sense_buffer[12],
+ srb->sense_buffer[13]);
+#endif
+
+ /* set the result so the higher layers expect this data */
+ srb->result = SAM_STAT_CHECK_CONDITION;
+
+ /* If things are really okay, then let's show that. Zero
+ * out the sense buffer so the higher layers won't realize
+ * we did an unsolicited auto-sense. */
+ if (result == USB_STOR_TRANSPORT_GOOD &&
+ /* Filemark 0, ignore EOM, ILI 0, no sense */
+ (srb->sense_buffer[2] & 0xaf) == 0 &&
+ /* No ASC or ASCQ */
+ srb->sense_buffer[12] == 0 &&
+ srb->sense_buffer[13] == 0) {
+ srb->result = SAM_STAT_GOOD;
+ srb->sense_buffer[0] = 0x0;
+ }
+ }
+
+ /* Did we transfer less than the minimum amount required? */
+ if (srb->result == SAM_STAT_GOOD &&
+ srb->request_bufflen - srb->resid < srb->underflow)
+ srb->result = (DID_ERROR << 16) | (SUGGEST_RETRY << 24);
+
+ return;
+
+ /* abort processing: the bulk-only transport requires a reset
+ * following an abort */
+ Handle_Abort:
+ srb->result = DID_ABORT << 16;
+ if (us->protocol == US_PR_BULK)
+ us->transport_reset(us);
+}
+
+/* Stop the current URB transfer */
+void usb_stor_stop_transport(struct us_data *us)
+{
+ US_DEBUGP("%s called\n", __FUNCTION__);
+
+ /* If the state machine is blocked waiting for an URB,
+ * let's wake it up. The test_and_clear_bit() call
+ * guarantees that if a URB has just been submitted,
+ * it won't be cancelled more than once. */
+ if (test_and_clear_bit(US_FLIDX_URB_ACTIVE, &us->flags)) {
+ US_DEBUGP("-- cancelling URB\n");
+ usb_unlink_urb(us->current_urb);
+ }
+
+ /* If we are waiting for a scatter-gather operation, cancel it. */
+ if (test_and_clear_bit(US_FLIDX_SG_ACTIVE, &us->flags)) {
+ US_DEBUGP("-- cancelling sg request\n");
+ usb_sg_cancel(&us->current_sg);
+ }
+}
+
+/*
+ * Control/Bulk/Interrupt transport
+ */
+
+int usb_stor_CBI_transport(struct scsi_cmnd *srb, struct us_data *us)
+{
+ unsigned int transfer_length = srb->request_bufflen;
+ unsigned int pipe = 0;
+ int result;
+
+ /* COMMAND STAGE */
+ /* let's send the command via the control pipe */
+ result = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe,
+ US_CBI_ADSC,
+ USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0,
+ us->ifnum, srb->cmnd, srb->cmd_len);
+
+ /* check the return code for the command */
+ US_DEBUGP("Call to usb_stor_ctrl_transfer() returned %d\n", result);
+
+ /* if we stalled the command, it means command failed */
+ if (result == USB_STOR_XFER_STALLED) {
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ /* Uh oh... serious problem here */
+ if (result != USB_STOR_XFER_GOOD) {
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* DATA STAGE */
+ /* transfer the data payload for this command, if one exists*/
+ if (transfer_length) {
+ pipe = srb->sc_data_direction == DMA_FROM_DEVICE ?
+ us->recv_bulk_pipe : us->send_bulk_pipe;
+ result = usb_stor_bulk_transfer_sg(us, pipe,
+ srb->request_buffer, transfer_length,
+ srb->use_sg, &srb->resid);
+ US_DEBUGP("CBI data stage result is 0x%x\n", result);
+
+ /* if we stalled the data transfer it means command failed */
+ if (result == USB_STOR_XFER_STALLED)
+ return USB_STOR_TRANSPORT_FAILED;
+ if (result > USB_STOR_XFER_STALLED)
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* STATUS STAGE */
+ result = usb_stor_intr_transfer(us, us->iobuf, 2);
+ US_DEBUGP("Got interrupt data (0x%x, 0x%x)\n",
+ us->iobuf[0], us->iobuf[1]);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ /* UFI gives us ASC and ASCQ, like a request sense
+ *
+ * REQUEST_SENSE and INQUIRY don't affect the sense data on UFI
+ * devices, so we ignore the information for those commands. Note
+ * that this means we could be ignoring a real error on these
+ * commands, but that can't be helped.
+ */
+ if (us->subclass == US_SC_UFI) {
+ if (srb->cmnd[0] == REQUEST_SENSE ||
+ srb->cmnd[0] == INQUIRY)
+ return USB_STOR_TRANSPORT_GOOD;
+ if (us->iobuf[0])
+ goto Failed;
+ return USB_STOR_TRANSPORT_GOOD;
+ }
+
+ /* If not UFI, we interpret the data as a result code
+ * The first byte should always be a 0x0.
+ *
+ * Some bogus devices don't follow that rule. They stuff the ASC
+ * into the first byte -- so if it's non-zero, call it a failure.
+ */
+ if (us->iobuf[0]) {
+ US_DEBUGP("CBI IRQ data showed reserved bType 0x%x\n",
+ us->iobuf[0]);
+ goto Failed;
+
+ }
+
+ /* The second byte & 0x0F should be 0x0 for good, otherwise error */
+ switch (us->iobuf[1] & 0x0F) {
+ case 0x00:
+ return USB_STOR_TRANSPORT_GOOD;
+ case 0x01:
+ goto Failed;
+ }
+ return USB_STOR_TRANSPORT_ERROR;
+
+ /* the CBI spec requires that the bulk pipe must be cleared
+ * following any data-in/out command failure (section 2.4.3.1.3)
+ */
+ Failed:
+ if (pipe)
+ usb_stor_clear_halt(us, pipe);
+ return USB_STOR_TRANSPORT_FAILED;
+}
+
+/*
+ * Control/Bulk transport
+ */
+int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us)
+{
+ unsigned int transfer_length = srb->request_bufflen;
+ int result;
+
+ /* COMMAND STAGE */
+ /* let's send the command via the control pipe */
+ result = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe,
+ US_CBI_ADSC,
+ USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0,
+ us->ifnum, srb->cmnd, srb->cmd_len);
+
+ /* check the return code for the command */
+ US_DEBUGP("Call to usb_stor_ctrl_transfer() returned %d\n", result);
+
+ /* if we stalled the command, it means command failed */
+ if (result == USB_STOR_XFER_STALLED) {
+ return USB_STOR_TRANSPORT_FAILED;
+ }
+
+ /* Uh oh... serious problem here */
+ if (result != USB_STOR_XFER_GOOD) {
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* DATA STAGE */
+ /* transfer the data payload for this command, if one exists*/
+ if (transfer_length) {
+ unsigned int pipe = srb->sc_data_direction == DMA_FROM_DEVICE ?
+ us->recv_bulk_pipe : us->send_bulk_pipe;
+ result = usb_stor_bulk_transfer_sg(us, pipe,
+ srb->request_buffer, transfer_length,
+ srb->use_sg, &srb->resid);
+ US_DEBUGP("CB data stage result is 0x%x\n", result);
+
+ /* if we stalled the data transfer it means command failed */
+ if (result == USB_STOR_XFER_STALLED)
+ return USB_STOR_TRANSPORT_FAILED;
+ if (result > USB_STOR_XFER_STALLED)
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* STATUS STAGE */
+ /* NOTE: CB does not have a status stage. Silly, I know. So
+ * we have to catch this at a higher level.
+ */
+ return USB_STOR_TRANSPORT_GOOD;
+}
+
+/*
+ * Bulk only transport
+ */
+
+/* Determine what the maximum LUN supported is */
+int usb_stor_Bulk_max_lun(struct us_data *us)
+{
+ int result;
+
+ /* issue the command */
+ result = usb_stor_control_msg(us, us->recv_ctrl_pipe,
+ US_BULK_GET_MAX_LUN,
+ USB_DIR_IN | USB_TYPE_CLASS |
+ USB_RECIP_INTERFACE,
+ 0, us->ifnum, us->iobuf, 1, HZ);
+
+ US_DEBUGP("GetMaxLUN command result is %d, data is %d\n",
+ result, us->iobuf[0]);
+
+ /* if we have a successful request, return the result */
+ if (result > 0)
+ return us->iobuf[0];
+
+ /*
+ * Some devices (i.e. Iomega Zip100) need this -- apparently
+ * the bulk pipes get STALLed when the GetMaxLUN request is
+ * processed. This is, in theory, harmless to all other devices
+ * (regardless of if they stall or not).
+ */
+ if (result == -EPIPE) {
+ usb_stor_clear_halt(us, us->recv_bulk_pipe);
+ usb_stor_clear_halt(us, us->send_bulk_pipe);
+ }
+
+ /*
+ * Some devices don't like GetMaxLUN. They may STALL the control
+ * pipe, they may return a zero-length result, they may do nothing at
+ * all and timeout, or they may fail in even more bizarrely creative
+ * ways. In these cases the best approach is to use the default
+ * value: only one LUN.
+ */
+ return 0;
+}
+
+int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us)
+{
+ struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf;
+ struct bulk_cs_wrap *bcs = (struct bulk_cs_wrap *) us->iobuf;
+ unsigned int transfer_length = srb->request_bufflen;
+ unsigned int residue;
+ int result;
+ int fake_sense = 0;
+ unsigned int cswlen;
+ unsigned int cbwlen = US_BULK_CB_WRAP_LEN;
+
+ /* Take care of BULK32 devices; set extra byte to 0 */
+ if ( unlikely(us->flags & US_FL_BULK32)) {
+ cbwlen = 32;
+ us->iobuf[31] = 0;
+ }
+
+ /* set up the command wrapper */
+ bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
+ bcb->DataTransferLength = cpu_to_le32(transfer_length);
+ bcb->Flags = srb->sc_data_direction == DMA_FROM_DEVICE ? 1 << 7 : 0;
+ bcb->Tag = srb->serial_number;
+ bcb->Lun = srb->device->lun;
+ if (us->flags & US_FL_SCM_MULT_TARG)
+ bcb->Lun |= srb->device->id << 4;
+ bcb->Length = srb->cmd_len;
+
+ /* 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 L %d F %d Trg %d LUN %d CL %d\n",
+ le32_to_cpu(bcb->Signature), bcb->Tag,
+ le32_to_cpu(bcb->DataTransferLength), bcb->Flags,
+ (bcb->Lun >> 4), (bcb->Lun & 0x0F),
+ bcb->Length);
+ result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
+ bcb, cbwlen, NULL);
+ US_DEBUGP("Bulk command transfer result=%d\n", result);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ /* DATA STAGE */
+ /* send/receive data payload, if there is any */
+
+ /* Some USB-IDE converter chips need a 100us delay between the
+ * command phase and the data phase. Some devices need a little
+ * more than that, probably because of clock rate inaccuracies. */
+ if (unlikely(us->flags & US_FL_GO_SLOW))
+ udelay(110);
+
+ if (transfer_length) {
+ unsigned int pipe = srb->sc_data_direction == DMA_FROM_DEVICE ?
+ us->recv_bulk_pipe : us->send_bulk_pipe;
+ result = usb_stor_bulk_transfer_sg(us, pipe,
+ srb->request_buffer, transfer_length,
+ srb->use_sg, &srb->resid);
+ US_DEBUGP("Bulk data transfer result 0x%x\n", result);
+ if (result == USB_STOR_XFER_ERROR)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ /* If the device tried to send back more data than the
+ * amount requested, the spec requires us to transfer
+ * the CSW anyway. Since there's no point retrying the
+ * the command, we'll return fake sense data indicating
+ * Illegal Request, Invalid Field in CDB.
+ */
+ if (result == USB_STOR_XFER_LONG)
+ fake_sense = 1;
+ }
+
+ /* See flow chart on pg 15 of the Bulk Only Transport spec for
+ * an explanation of how this code works.
+ */
+
+ /* get CSW for device status */
+ US_DEBUGP("Attempting to get CSW...\n");
+ result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
+ bcs, US_BULK_CS_WRAP_LEN, &cswlen);
+
+ /* Some broken devices add unnecessary zero-length packets to the
+ * end of their data transfers. Such packets show up as 0-length
+ * CSWs. If we encounter such a thing, try to read the CSW again.
+ */
+ if (result == USB_STOR_XFER_SHORT && cswlen == 0) {
+ US_DEBUGP("Received 0-length CSW; retrying...\n");
+ result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
+ bcs, US_BULK_CS_WRAP_LEN, &cswlen);
+ }
+
+ /* did the attempt to read the CSW fail? */
+ if (result == USB_STOR_XFER_STALLED) {
+
+ /* get the status again */
+ US_DEBUGP("Attempting to get CSW (2nd try)...\n");
+ result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
+ bcs, US_BULK_CS_WRAP_LEN, NULL);
+ }
+
+ /* if we still have a failure at this point, we're in trouble */
+ US_DEBUGP("Bulk status result = %d\n", result);
+ if (result != USB_STOR_XFER_GOOD)
+ return USB_STOR_TRANSPORT_ERROR;
+
+ /* check bulk status */
+ residue = le32_to_cpu(bcs->Residue);
+ US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n",
+ le32_to_cpu(bcs->Signature), bcs->Tag,
+ residue, bcs->Status);
+ if (bcs->Tag != srb->serial_number || bcs->Status > US_BULK_STAT_PHASE) {
+ US_DEBUGP("Bulk logical error\n");
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* Some broken devices report odd signatures, so we do not check them
+ * for validity against the spec. We store the first one we see,
+ * and check subsequent transfers for validity against this signature.
+ */
+ if (!us->bcs_signature) {
+ us->bcs_signature = bcs->Signature;
+ if (us->bcs_signature != cpu_to_le32(US_BULK_CS_SIGN))
+ US_DEBUGP("Learnt BCS signature 0x%08X\n",
+ le32_to_cpu(us->bcs_signature));
+ } else if (bcs->Signature != us->bcs_signature) {
+ US_DEBUGP("Signature mismatch: got %08X, expecting %08X\n",
+ le32_to_cpu(bcs->Signature),
+ le32_to_cpu(us->bcs_signature));
+ return USB_STOR_TRANSPORT_ERROR;
+ }
+
+ /* try to compute the actual residue, based on how much data
+ * was really transferred and what the device tells us */
+ if (residue) {
+ if (!(us->flags & US_FL_IGNORE_RESIDUE)) {
+ residue = min(residue, transfer_length);
+ srb->resid = max(srb->resid, (int) residue);
+ }
+ }
+
+ /* based on the status code, we report good or bad */
+ switch (bcs->Status) {
+ case US_BULK_STAT_OK:
+ /* device babbled -- return fake sense data */
+ if (fake_sense) {
+ memcpy(srb->sense_buffer,
+ usb_stor_sense_invalidCDB,
+ sizeof(usb_stor_sense_invalidCDB));
+ return USB_STOR_TRANSPORT_NO_SENSE;
+ }
+
+ /* 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;
+}
+
+/***********************************************************************
+ * Reset routines
+ ***********************************************************************/
+
+/* This is the common part of the device reset code.
+ *
+ * It's handy that every transport mechanism uses the control endpoint for
+ * resets.
+ *
+ * Basically, we send a reset with a 20-second timeout, so we don't get
+ * jammed attempting to do the reset.
+ */
+static int usb_stor_reset_common(struct us_data *us,
+ u8 request, u8 requesttype,
+ u16 value, u16 index, void *data, u16 size)
+{
+ int result;
+ int result2;
+ int rc = FAILED;
+
+ /* Let the SCSI layer know we are doing a reset, set the
+ * RESETTING bit, and clear the ABORTING bit so that the reset
+ * may proceed.
+ */
+ scsi_lock(us_to_host(us));
+ usb_stor_report_device_reset(us);
+ set_bit(US_FLIDX_RESETTING, &us->flags);
+ clear_bit(US_FLIDX_ABORTING, &us->flags);
+ scsi_unlock(us_to_host(us));
+
+ /* A 20-second timeout may seem rather long, but a LaCie
+ * StudioDrive USB2 device takes 16+ seconds to get going
+ * following a powerup or USB attach event.
+ */
+ result = usb_stor_control_msg(us, us->send_ctrl_pipe,
+ request, requesttype, value, index, data, size,
+ 20*HZ);
+ if (result < 0) {
+ US_DEBUGP("Soft reset failed: %d\n", result);
+ goto Done;
+ }
+
+ /* Give the device some time to recover from the reset,
+ * but don't delay disconnect processing. */
+ wait_event_interruptible_timeout(us->delay_wait,
+ test_bit(US_FLIDX_DISCONNECTING, &us->flags),
+ HZ*6);
+ if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
+ US_DEBUGP("Reset interrupted by disconnect\n");
+ goto Done;
+ }
+
+ US_DEBUGP("Soft reset: clearing bulk-in endpoint halt\n");
+ result = usb_stor_clear_halt(us, us->recv_bulk_pipe);
+
+ US_DEBUGP("Soft reset: clearing bulk-out endpoint halt\n");
+ result2 = usb_stor_clear_halt(us, us->send_bulk_pipe);
+
+ /* return a result code based on the result of the control message */
+ if (result < 0 || result2 < 0) {
+ US_DEBUGP("Soft reset failed\n");
+ goto Done;
+ }
+ US_DEBUGP("Soft reset done\n");
+ rc = SUCCESS;
+
+ Done:
+ clear_bit(US_FLIDX_RESETTING, &us->flags);
+ return rc;
+}
+
+/* This issues a CB[I] Reset to the device in question
+ */
+#define CB_RESET_CMD_SIZE 12
+
+int usb_stor_CB_reset(struct us_data *us)
+{
+ US_DEBUGP("%s called\n", __FUNCTION__);
+
+ memset(us->iobuf, 0xFF, CB_RESET_CMD_SIZE);
+ us->iobuf[0] = SEND_DIAGNOSTIC;
+ us->iobuf[1] = 4;
+ return usb_stor_reset_common(us, US_CBI_ADSC,
+ USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ 0, us->ifnum, us->iobuf, CB_RESET_CMD_SIZE);
+}
+
+/* This issues a Bulk-only Reset to the device in question, including
+ * clearing the subsequent endpoint halts that may occur.
+ */
+int usb_stor_Bulk_reset(struct us_data *us)
+{
+ US_DEBUGP("%s called\n", __FUNCTION__);
+
+ return usb_stor_reset_common(us, US_BULK_RESET_REQUEST,
+ USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ 0, us->ifnum, NULL, 0);
+}
diff --git a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h
new file mode 100644
index 000000000000..e25f8d8fc741
--- /dev/null
+++ b/drivers/usb/storage/transport.h
@@ -0,0 +1,174 @@
+/* Driver for USB Mass Storage compliant devices
+ * Transport Functions Header File
+ *
+ * $Id: transport.h,v 1.18 2002/04/21 02:57:59 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, 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.
+ */
+
+#ifndef _TRANSPORT_H_
+#define _TRANSPORT_H_
+
+#include <linux/config.h>
+#include <linux/blkdev.h>
+
+/* Protocols */
+
+#define US_PR_CBI 0x00 /* Control/Bulk/Interrupt */
+#define US_PR_CB 0x01 /* Control/Bulk w/o interrupt */
+#define US_PR_BULK 0x50 /* bulk only */
+#ifdef CONFIG_USB_STORAGE_USBAT
+#define US_PR_SCM_ATAPI 0x80 /* SCM-ATAPI bridge */
+#endif
+#ifdef CONFIG_USB_STORAGE_SDDR09
+#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
+#define US_PR_FREECOM 0xf1 /* Freecom */
+#endif
+
+#ifdef CONFIG_USB_STORAGE_DATAFAB
+#define US_PR_DATAFAB 0xf2 /* Datafab chipsets */
+#endif
+
+#ifdef CONFIG_USB_STORAGE_JUMPSHOT
+#define US_PR_JUMPSHOT 0xf3 /* Lexar Jumpshot */
+#endif
+
+#define US_PR_DEVICE 0xff /* Use device's value */
+
+/*
+ * Bulk only data structures
+ */
+
+/* command block wrapper */
+struct bulk_cb_wrap {
+ __le32 Signature; /* contains 'USBC' */
+ __u32 Tag; /* unique per command id */
+ __le32 DataTransferLength; /* size of data */
+ __u8 Flags; /* direction in bit 0 */
+ __u8 Lun; /* LUN normally 0 */
+ __u8 Length; /* of of the CDB */
+ __u8 CDB[16]; /* max command */
+};
+
+#define US_BULK_CB_WRAP_LEN 31
+#define US_BULK_CB_SIGN 0x43425355 /*spells out USBC */
+#define US_BULK_FLAG_IN 1
+#define US_BULK_FLAG_OUT 0
+
+/* command status wrapper */
+struct bulk_cs_wrap {
+ __le32 Signature; /* should = 'USBS' */
+ __u32 Tag; /* same as original command */
+ __le32 Residue; /* amount not transferred */
+ __u8 Status; /* see below */
+ __u8 Filler[18];
+};
+
+#define US_BULK_CS_WRAP_LEN 13
+#define US_BULK_CS_SIGN 0x53425355 /* spells out 'USBS' */
+#define US_BULK_STAT_OK 0
+#define US_BULK_STAT_FAIL 1
+#define US_BULK_STAT_PHASE 2
+
+/* bulk-only class specific requests */
+#define US_BULK_RESET_REQUEST 0xff
+#define US_BULK_GET_MAX_LUN 0xfe
+
+/*
+ * usb_stor_bulk_transfer_xxx() return codes, in order of severity
+ */
+
+#define USB_STOR_XFER_GOOD 0 /* good transfer */
+#define USB_STOR_XFER_SHORT 1 /* transferred less than expected */
+#define USB_STOR_XFER_STALLED 2 /* endpoint stalled */
+#define USB_STOR_XFER_LONG 3 /* device tried to send too much */
+#define USB_STOR_XFER_ERROR 4 /* transfer died in the middle */
+
+/*
+ * Transport return codes
+ */
+
+#define USB_STOR_TRANSPORT_GOOD 0 /* Transport good, command good */
+#define USB_STOR_TRANSPORT_FAILED 1 /* Transport good, command failed */
+#define USB_STOR_TRANSPORT_NO_SENSE 2 /* Command failed, no auto-sense */
+#define USB_STOR_TRANSPORT_ERROR 3 /* Transport bad (i.e. device dead) */
+
+/*
+ * We used to have USB_STOR_XFER_ABORTED and USB_STOR_TRANSPORT_ABORTED
+ * return codes. But now the transport and low-level transfer routines
+ * treat an abort as just another error (-ENOENT for a cancelled URB).
+ * It is up to the invoke_transport() function to test for aborts and
+ * distinguish them from genuine communication errors.
+ */
+
+/*
+ * CBI accept device specific command
+ */
+
+#define US_CBI_ADSC 0
+
+extern int usb_stor_CBI_transport(struct scsi_cmnd *, struct us_data*);
+
+extern int usb_stor_CB_transport(struct scsi_cmnd *, struct us_data*);
+extern int usb_stor_CB_reset(struct us_data*);
+
+extern int usb_stor_Bulk_transport(struct scsi_cmnd *, struct us_data*);
+extern int usb_stor_Bulk_max_lun(struct us_data*);
+extern int usb_stor_Bulk_reset(struct us_data*);
+
+extern void usb_stor_invoke_transport(struct scsi_cmnd *, struct us_data*);
+extern void usb_stor_stop_transport(struct us_data*);
+
+extern int usb_stor_control_msg(struct us_data *us, unsigned int pipe,
+ u8 request, u8 requesttype, u16 value, u16 index,
+ void *data, u16 size, int timeout);
+extern int usb_stor_clear_halt(struct us_data *us, unsigned int pipe);
+
+extern int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe,
+ u8 request, u8 requesttype, u16 value, u16 index,
+ void *data, u16 size);
+extern int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,
+ void *buf, unsigned int length, unsigned int *act_len);
+extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe,
+ void *buf, unsigned int length, int use_sg, int *residual);
+
+#endif
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
new file mode 100644
index 000000000000..d53f777c4f50
--- /dev/null
+++ b/drivers/usb/storage/unusual_devs.h
@@ -0,0 +1,986 @@
+/* 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.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, 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.
+ */
+
+/* IMPORTANT NOTE: This file must be included in another file which does
+ * the following thing for it to work:
+ * The macro UNUSUAL_DEV() must be defined before this file is included
+ */
+#include <linux/config.h>
+
+/* If you edit this file, please try to keep it sorted first by VendorID,
+ * then by ProductID.
+ *
+ * If you want to add an entry for this file, be sure to include the
+ * following information:
+ * - a patch that adds the entry for your device, including your
+ * email address right above the entry (plus maybe a brief
+ * explanation of the reason for the entry),
+ * - a copy of /proc/bus/usb/devices with your device plugged in
+ * running with this patch.
+ * Send your submission to either Phil Dibowitz <phil@ipom.com> or
+ * Alan Stern <stern@rowland.harvard.edu>, and don't forget to CC: the
+ * USB development list <linux-usb-devel@lists.sourceforge.net>.
+ */
+
+UNUSUAL_DEV( 0x03ee, 0x6901, 0x0000, 0x0100,
+ "Mitsumi",
+ "USB FDD",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN ),
+
+UNUSUAL_DEV( 0x03f0, 0x0107, 0x0200, 0x0200,
+ "HP",
+ "CD-Writer+",
+ US_SC_8070, US_PR_CB, NULL, 0),
+
+#ifdef CONFIG_USB_STORAGE_USBAT
+UNUSUAL_DEV( 0x03f0, 0x0207, 0x0001, 0x0001,
+ "HP",
+ "CD-Writer+ 8200e",
+ US_SC_8070, US_PR_SCM_ATAPI, init_usbat, 0),
+
+UNUSUAL_DEV( 0x03f0, 0x0307, 0x0001, 0x0001,
+ "HP",
+ "CD-Writer+ CD-4e",
+ US_SC_8070, US_PR_SCM_ATAPI, init_usbat, 0),
+#endif
+
+/* Deduced by Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
+ * Entry needed for flags: US_FL_FIX_INQUIRY because initial inquiry message
+ * always fails and confuses drive.
+ */
+UNUSUAL_DEV( 0x0411, 0x001c, 0x0113, 0x0113,
+ "Buffalo",
+ "DUB-P40G HDD",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+#ifdef CONFIG_USB_STORAGE_DPCM
+UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100,
+ "Microtech",
+ "CameraMate (DPCM_USB)",
+ US_SC_SCSI, US_PR_DPCM_USB, NULL, 0 ),
+#endif
+
+/* Patch submitted by Philipp Friedrich <philipp@void.at> */
+UNUSUAL_DEV( 0x0482, 0x0100, 0x0100, 0x0100,
+ "Kyocera",
+ "Finecam S3x",
+ US_SC_8070, US_PR_CB, NULL, US_FL_FIX_INQUIRY),
+
+/* Patch submitted by Philipp Friedrich <philipp@void.at> */
+UNUSUAL_DEV( 0x0482, 0x0101, 0x0100, 0x0100,
+ "Kyocera",
+ "Finecam S4",
+ US_SC_8070, US_PR_CB, NULL, US_FL_FIX_INQUIRY),
+
+/* Patch submitted by Stephane Galles <stephane.galles@free.fr> */
+UNUSUAL_DEV( 0x0482, 0x0103, 0x0100, 0x0100,
+ "Kyocera",
+ "Finecam S5",
+ US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY),
+
+/* Patch for Kyocera Finecam L3
+ * Submitted by Michael Krauth <michael.krauth@web.de>
+ * and Alessandro Fracchetti <al.fracchetti@tin.it>
+ */
+UNUSUAL_DEV( 0x0482, 0x0105, 0x0100, 0x0100,
+ "Kyocera",
+ "Finecam L3",
+ US_SC_SCSI, US_PR_BULK, NULL,
+ US_FL_FIX_INQUIRY),
+
+/* Reported by Paul Stewart <stewart@wetlogic.net>
+ * This entry is needed because the device reports Sub=ff */
+UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001,
+ "Hitachi",
+ "DVD-CAM DZ-MV100A Camcorder",
+ US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN),
+
+/* Reported by Andreas Bockhold <andreas@bockionline.de> */
+UNUSUAL_DEV( 0x04b0, 0x0405, 0x0100, 0x0100,
+ "NIKON",
+ "NIKON DSC D70",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY),
+
+/* BENQ DC5330
+ * Reported by Manuel Fombuena <mfombuena@ya.com> and
+ * Frank Copeland <fjc@thingy.apana.org.au> */
+UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100,
+ "Tekom Technologies, Inc",
+ "300_CAMERA",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Reported by Simon Levitt <simon@whattf.com>
+ * This entry needs Sub and Proto fields */
+UNUSUAL_DEV( 0x04b8, 0x0601, 0x0100, 0x0100,
+ "Epson",
+ "875DC Storage",
+ US_SC_SCSI, US_PR_CB, NULL, US_FL_FIX_INQUIRY),
+
+/* Reported by Khalid Aziz <khalid@gonehiking.org>
+ * This entry is needed because the device reports Sub=ff */
+UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110,
+ "Epson",
+ "785EPX Storage",
+ US_SC_SCSI, US_PR_BULK, NULL, US_FL_SINGLE_LUN),
+
+/* Not sure who reported this originally but
+ * Pavel Machek <pavel@ucw.cz> reported that the extra US_FL_SINGLE_LUN
+ * flag be added */
+UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210,
+ "Fujifilm",
+ "FinePix 1400Zoom",
+ US_SC_UFI, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN),
+
+/* Reported by Peter Wächtler <pwaechtler@loewe-komp.de>
+ * The device needs the flags only.
+ */
+UNUSUAL_DEV( 0x04ce, 0x0002, 0x0074, 0x0074,
+ "ScanLogic",
+ "SL11R-IDE",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY),
+
+/* Reported by Kriston Fincher <kriston@airmail.net>
+ * Patch submitted by Sean Millichamp <sean@bruenor.org>
+ * 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_DEVICE, NULL, 0),
+
+/* From Yukihiro Nakai, via zaitcev@yahoo.com.
+ * This is needed for CB instead of CBI */
+UNUSUAL_DEV( 0x04da, 0x0d05, 0x0000, 0x0000,
+ "Sharp CE-CW05",
+ "CD-R/RW Drive",
+ US_SC_8070, US_PR_CB, NULL, 0),
+
+/* Reported by Adriaan Penning <a.penning@luon.net> */
+UNUSUAL_DEV( 0x04da, 0x2372, 0x0000, 0x9999,
+ "Panasonic",
+ "DMC-LCx Camera",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ),
+
+/* Most of the following entries were developed with the help of
+ * Shuttle/SCM directly.
+ */
+UNUSUAL_DEV( 0x04e6, 0x0001, 0x0200, 0x0200,
+ "Matshita",
+ "LS-120",
+ US_SC_8020, US_PR_CB, NULL, 0),
+
+UNUSUAL_DEV( 0x04e6, 0x0002, 0x0100, 0x0100,
+ "Shuttle",
+ "eUSCSI Bridge",
+ US_SC_DEVICE, US_PR_DEVICE, usb_stor_euscsi_init,
+ US_FL_SCM_MULT_TARG ),
+
+#ifdef CONFIG_USB_STORAGE_SDDR09
+UNUSUAL_DEV( 0x04e6, 0x0003, 0x0000, 0x9999,
+ "Sandisk",
+ "ImageMate SDDR09",
+ US_SC_SCSI, US_PR_EUSB_SDDR09, NULL,
+ US_FL_SINGLE_LUN ),
+
+/* This entry is from Andries.Brouwer@cwi.nl */
+UNUSUAL_DEV( 0x04e6, 0x0005, 0x0100, 0x0208,
+ "SCM Microsystems",
+ "eUSB SmartMedia / CompactFlash Adapter",
+ US_SC_SCSI, US_PR_DPCM_USB, sddr09_init,
+ 0),
+#endif
+
+/* Reported by Markus Demleitner <msdemlei@cl.uni-heidelberg.de> */
+UNUSUAL_DEV( 0x04e6, 0x0006, 0x0100, 0x0100,
+ "SCM Microsystems Inc.",
+ "eUSB MMC Adapter",
+ US_SC_SCSI, US_PR_CB, NULL,
+ US_FL_SINGLE_LUN),
+
+/* Reported by Daniel Nouri <dpunktnpunkt@web.de> */
+UNUSUAL_DEV( 0x04e6, 0x0006, 0x0205, 0x0205,
+ "Shuttle",
+ "eUSB MMC Adapter",
+ US_SC_SCSI, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN),
+
+UNUSUAL_DEV( 0x04e6, 0x0007, 0x0100, 0x0200,
+ "Sony",
+ "Hifd",
+ US_SC_SCSI, US_PR_CB, NULL,
+ US_FL_SINGLE_LUN),
+
+UNUSUAL_DEV( 0x04e6, 0x0009, 0x0200, 0x0200,
+ "Shuttle",
+ "eUSB ATA/ATAPI Adapter",
+ US_SC_8020, US_PR_CB, NULL, 0),
+
+UNUSUAL_DEV( 0x04e6, 0x000a, 0x0200, 0x0200,
+ "Shuttle",
+ "eUSB CompactFlash Adapter",
+ US_SC_8020, US_PR_CB, NULL, 0),
+
+UNUSUAL_DEV( 0x04e6, 0x000B, 0x0100, 0x0100,
+ "Shuttle",
+ "eUSCSI Bridge",
+ US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
+ US_FL_SCM_MULT_TARG ),
+
+UNUSUAL_DEV( 0x04e6, 0x000C, 0x0100, 0x0100,
+ "Shuttle",
+ "eUSCSI Bridge",
+ US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
+ US_FL_SCM_MULT_TARG ),
+
+UNUSUAL_DEV( 0x04e6, 0x0101, 0x0200, 0x0200,
+ "Shuttle",
+ "CD-RW Device",
+ US_SC_8020, US_PR_CB, NULL, 0),
+
+/* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
+ * Device uses standards-violating 32-byte Bulk Command Block Wrappers and
+ * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011.
+ */
+
+UNUSUAL_DEV( 0x04fc, 0x80c2, 0x0100, 0x0100,
+ "Kobian Mercury",
+ "Binocam DCB-132",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_BULK32),
+
+#ifdef CONFIG_USB_STORAGE_USBAT
+UNUSUAL_DEV( 0x04e6, 0x1010, 0x0000, 0x9999,
+ "SCM",
+ "SCM USBAT-02",
+ US_SC_SCSI, US_PR_SCM_ATAPI, init_usbat,
+ US_FL_SINGLE_LUN),
+#endif
+
+/* Reported by Bob Sass <rls@vectordb.com> -- only rev 1.33 tested */
+UNUSUAL_DEV( 0x050d, 0x0115, 0x0133, 0x0133,
+ "Belkin",
+ "USB SCSI Adaptor",
+ US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
+ US_FL_SCM_MULT_TARG ),
+
+/* Iomega Clik! Drive
+ * Reported by David Chatenay <dchatenay@hotmail.com>
+ * 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 ),
+
+/* Yakumo Mega Image 37
+ * Submitted by Stephan Fuhrmann <atomenergie@t-online.de> */
+UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100,
+ "Tekom Technologies, Inc",
+ "300_CAMERA",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Another Yakumo camera.
+ * Reported by Michele Alzetta <michele.alzetta@aliceposta.it> */
+UNUSUAL_DEV( 0x052b, 0x1804, 0x0100, 0x0100,
+ "Tekom Technologies, Inc",
+ "300_CAMERA",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Reported by Iacopo Spalletti <avvisi@spalletti.it> */
+UNUSUAL_DEV( 0x052b, 0x1807, 0x0100, 0x0100,
+ "Tekom Technologies, Inc",
+ "300_CAMERA",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Yakumo Mega Image 47
+ * Reported by Bjoern Paetzel <kolrabi@kolrabi.de> */
+UNUSUAL_DEV( 0x052b, 0x1905, 0x0100, 0x0100,
+ "Tekom Technologies, Inc",
+ "400_CAMERA",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Reported by Paul Ortyl <ortylp@3miasto.net>
+ * Note that it's similar to the device above, only different prodID */
+UNUSUAL_DEV( 0x052b, 0x1911, 0x0100, 0x0100,
+ "Tekom Technologies, Inc",
+ "400_CAMERA",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x0450,
+ "Sony",
+ "DSC-S30/S70/S75/505V/F505/F707/F717/P8",
+ US_SC_SCSI, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | US_FL_NO_WP_DETECT ),
+
+/* This entry is needed because the device reports Sub=ff */
+UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0500,
+ "Sony",
+ "DSC-T1",
+ US_SC_8070, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN ),
+
+
+/* Reported by wim@geeks.nl */
+UNUSUAL_DEV( 0x054c, 0x0025, 0x0100, 0x0100,
+ "Sony",
+ "Memorystick NW-MS7",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN ),
+
+#ifdef CONFIG_USB_STORAGE_ISD200
+UNUSUAL_DEV( 0x054c, 0x002b, 0x0100, 0x0110,
+ "Sony",
+ "Portable USB Harddrive V2",
+ US_SC_ISD200, US_PR_BULK, isd200_Initialization,
+ 0 ),
+#endif
+
+/* Submitted by Olaf Hering, <olh@suse.de> SuSE Bugzilla #49049 */
+UNUSUAL_DEV( 0x054c, 0x002c, 0x0501, 0x0501,
+ "Sony",
+ "USB Floppy Drive",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN ),
+
+UNUSUAL_DEV( 0x054c, 0x002d, 0x0100, 0x0100,
+ "Sony",
+ "Memorystick MSAC-US1",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN ),
+
+/* Submitted by Klaus Mueller <k.mueller@intershop.de> */
+UNUSUAL_DEV( 0x054c, 0x002e, 0x0106, 0x0310,
+ "Sony",
+ "Handycam",
+ US_SC_SCSI, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN ),
+
+/* Submitted by Rajesh Kumble Nayak <nayak@obs-nice.fr> */
+UNUSUAL_DEV( 0x054c, 0x002e, 0x0500, 0x0500,
+ "Sony",
+ "Handycam HC-85",
+ US_SC_UFI, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN ),
+
+UNUSUAL_DEV( 0x054c, 0x0032, 0x0000, 0x9999,
+ "Sony",
+ "Memorystick MSC-U01N",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN ),
+
+/* Submitted by Michal Mlotek <mlotek@foobar.pl> */
+UNUSUAL_DEV( 0x054c, 0x0058, 0x0000, 0x9999,
+ "Sony",
+ "PEG N760c Memorystick",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+UNUSUAL_DEV( 0x054c, 0x0069, 0x0000, 0x9999,
+ "Sony",
+ "Memorystick MSC-U03",
+ US_SC_UFI, US_PR_CB, NULL,
+ US_FL_SINGLE_LUN ),
+
+/* Submitted by Nathan Babb <nathan@lexi.com> */
+UNUSUAL_DEV( 0x054c, 0x006d, 0x0000, 0x9999,
+ "Sony",
+ "PEG Mass Storage",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+/* Submitted by Mike Alborn <malborn@deandra.homeip.net> */
+UNUSUAL_DEV( 0x054c, 0x016a, 0x0000, 0x9999,
+ "Sony",
+ "PEG Mass Storage",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+/* Submitted by Frank Engel <frankie@cse.unsw.edu.au> */
+UNUSUAL_DEV( 0x054c, 0x0099, 0x0000, 0x9999,
+ "Sony",
+ "PEG Mass Storage",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+
+UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299,
+ "Y-E Data",
+ "Flashbuster-U",
+ US_SC_DEVICE, US_PR_CB, NULL,
+ US_FL_SINGLE_LUN),
+
+UNUSUAL_DEV( 0x057b, 0x0000, 0x0300, 0x9999,
+ "Y-E Data",
+ "Flashbuster-U",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN),
+
+/* Reported by Johann Cardon <johann.cardon@free.fr>
+ * This entry is needed only because the device reports
+ * bInterfaceClass = 0xff (vendor-specific)
+ */
+UNUSUAL_DEV( 0x057b, 0x0022, 0x0000, 0x9999,
+ "Y-E Data",
+ "Silicon Media R/W",
+ US_SC_DEVICE, US_PR_DEVICE, NULL, 0),
+
+/* Fabrizio Fellini <fello@libero.it> */
+UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210,
+ "Fujifilm",
+ "Digital Camera EX-20 DSC",
+ US_SC_8070, US_PR_DEVICE, NULL, 0 ),
+
+/* The entry was here before I took over, and had US_SC_RBC. It turns
+ * out that isn't needed. Additionally, Torsten Eriksson
+ * <Torsten.Eriksson@bergianska.se> is able to use his device fine
+ * without this entry at all - but I don't suspect that will be true
+ * for all users (the protocol is likely needed), so is staying at
+ * this time. - Phil Dibowitz <phil@ipom.com>
+ */
+UNUSUAL_DEV( 0x059f, 0xa601, 0x0200, 0x0200,
+ "LaCie",
+ "USB Hard Disk",
+ US_SC_DEVICE, US_PR_CB, NULL, 0 ),
+
+/* Submitted by Joel Bourquard <numlock@freesurf.ch>
+ * Some versions of this device need the SubClass and Protocol overrides
+ * while others don't.
+ */
+UNUSUAL_DEV( 0x05ab, 0x0060, 0x1104, 0x1110,
+ "In-System",
+ "PyroGate External CD-ROM Enclosure (FCD-523)",
+ US_SC_SCSI, US_PR_BULK, NULL,
+ US_FL_NEED_OVERRIDE ),
+
+#ifdef CONFIG_USB_STORAGE_ISD200
+UNUSUAL_DEV( 0x05ab, 0x0031, 0x0100, 0x0110,
+ "In-System",
+ "USB/IDE Bridge (ATA/ATAPI)",
+ US_SC_ISD200, US_PR_BULK, isd200_Initialization,
+ 0 ),
+
+UNUSUAL_DEV( 0x05ab, 0x0301, 0x0100, 0x0110,
+ "In-System",
+ "Portable USB Harddrive V2",
+ US_SC_ISD200, US_PR_BULK, isd200_Initialization,
+ 0 ),
+
+UNUSUAL_DEV( 0x05ab, 0x0351, 0x0100, 0x0110,
+ "In-System",
+ "Portable USB Harddrive V2",
+ US_SC_ISD200, US_PR_BULK, isd200_Initialization,
+ 0 ),
+
+UNUSUAL_DEV( 0x05ab, 0x5701, 0x0100, 0x0110,
+ "In-System",
+ "USB Storage Adapter V2",
+ US_SC_ISD200, US_PR_BULK, isd200_Initialization,
+ 0 ),
+#endif
+
+/* Reported by Avi Kivity <avi@argo.co.il> */
+UNUSUAL_DEV( 0x05ac, 0x1203, 0x0001, 0x0001,
+ "Apple",
+ "iPod",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY ),
+
+UNUSUAL_DEV( 0x05ac, 0x1205, 0x0001, 0x0001,
+ "Apple",
+ "iPod",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY ),
+
+#ifdef CONFIG_USB_STORAGE_JUMPSHOT
+UNUSUAL_DEV( 0x05dc, 0x0001, 0x0000, 0x0001,
+ "Lexar",
+ "Jumpshot USB CF Reader",
+ US_SC_SCSI, US_PR_JUMPSHOT, NULL,
+ US_FL_NEED_OVERRIDE ),
+#endif
+
+/* Reported by Blake Matheny <bmatheny@purdue.edu> */
+UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x0113,
+ "Lexar",
+ "USB CF Reader",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+/* The following two entries are for a Genesys USB to IDE
+ * converter chip, but it changes its ProductId depending
+ * on whether or not a disk or an optical device is enclosed
+ * They were originally reported by Alexander Oltu
+ * <alexander@all-2.com> and Peter Marks <peter.marks@turner.com>
+ * respectively.
+ */
+UNUSUAL_DEV( 0x05e3, 0x0701, 0x0000, 0xffff,
+ "Genesys Logic",
+ "USB to IDE Optical",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_GO_SLOW ),
+
+UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0xffff,
+ "Genesys Logic",
+ "USB to IDE Disk",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_GO_SLOW ),
+
+/* Reported by Hanno Boeck <hanno@gmx.de>
+ * Taken from the Lycoris Kernel */
+UNUSUAL_DEV( 0x0636, 0x0003, 0x0000, 0x9999,
+ "Vivitar",
+ "Vivicam 35Xx",
+ US_SC_SCSI, US_PR_BULK, NULL,
+ US_FL_FIX_INQUIRY ),
+
+UNUSUAL_DEV( 0x0644, 0x0000, 0x0100, 0x0100,
+ "TEAC",
+ "Floppy Drive",
+ US_SC_UFI, US_PR_CB, NULL, 0 ),
+
+#ifdef CONFIG_USB_STORAGE_SDDR09
+UNUSUAL_DEV( 0x066b, 0x0105, 0x0100, 0x0100,
+ "Olympus",
+ "Camedia MAUSB-2",
+ US_SC_SCSI, US_PR_EUSB_SDDR09, NULL,
+ US_FL_SINGLE_LUN ),
+#endif
+
+/* Reported by Darsen Lu <darsen@micro.ee.nthu.edu.tw> */
+UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001,
+ "SigmaTel",
+ "USBMSC Audio Player",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY ),
+
+/* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */
+UNUSUAL_DEV( 0x067b, 0x2507, 0x0100, 0x0100,
+ "Prolific Technology Inc.",
+ "Mass Storage Device",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY | US_FL_GO_SLOW ),
+
+/* Reported by Alex Butcher <alex.butcher@assursys.co.uk> */
+UNUSUAL_DEV( 0x067b, 0x3507, 0x0001, 0x0001,
+ "Prolific Technology Inc.",
+ "ATAPI-6 Bridge Controller",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY | US_FL_GO_SLOW ),
+
+/* Submitted by Benny Sjostrand <benny@hostmobility.com> */
+UNUSUAL_DEV( 0x0686, 0x4011, 0x0001, 0x0001,
+ "Minolta",
+ "Dimage F300",
+ US_SC_SCSI, US_PR_BULK, NULL, 0 ),
+
+/* Reported by Miguel A. Fosas <amn3s1a@ono.com> */
+UNUSUAL_DEV( 0x0686, 0x4017, 0x0001, 0x0001,
+ "Minolta",
+ "DIMAGE E223",
+ US_SC_SCSI, US_PR_DEVICE, NULL, 0 ),
+
+UNUSUAL_DEV( 0x0693, 0x0002, 0x0100, 0x0100,
+ "Hagiwara",
+ "FlashGate SmartMedia",
+ US_SC_SCSI, US_PR_BULK, NULL, 0 ),
+
+UNUSUAL_DEV( 0x0693, 0x0005, 0x0100, 0x0100,
+ "Hagiwara",
+ "Flashgate",
+ US_SC_SCSI, US_PR_BULK, NULL, 0 ),
+
+UNUSUAL_DEV( 0x0781, 0x0001, 0x0200, 0x0200,
+ "Sandisk",
+ "ImageMate SDDR-05a",
+ US_SC_SCSI, US_PR_CB, NULL,
+ US_FL_SINGLE_LUN ),
+
+UNUSUAL_DEV( 0x0781, 0x0100, 0x0100, 0x0100,
+ "Sandisk",
+ "ImageMate SDDR-12",
+ US_SC_SCSI, US_PR_CB, NULL,
+ US_FL_SINGLE_LUN ),
+
+#ifdef CONFIG_USB_STORAGE_SDDR09
+UNUSUAL_DEV( 0x0781, 0x0200, 0x0000, 0x9999,
+ "Sandisk",
+ "ImageMate SDDR-09",
+ US_SC_SCSI, US_PR_EUSB_SDDR09, NULL,
+ US_FL_SINGLE_LUN ),
+#endif
+
+#ifdef CONFIG_USB_STORAGE_FREECOM
+UNUSUAL_DEV( 0x07ab, 0xfc01, 0x0000, 0x9999,
+ "Freecom",
+ "USB-IDE",
+ US_SC_QIC, US_PR_FREECOM, freecom_init, 0),
+#endif
+
+/* Reported by Eero Volotinen <eero@ping-viini.org> */
+UNUSUAL_DEV( 0x07ab, 0xfccd, 0x0406, 0x0406,
+ "Freecom Technologies",
+ "FHD-Classic",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY),
+
+UNUSUAL_DEV( 0x07af, 0x0004, 0x0100, 0x0133,
+ "Microtech",
+ "USB-SCSI-DB25",
+ US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
+ US_FL_SCM_MULT_TARG ),
+
+UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x0100,
+ "Microtech",
+ "USB-SCSI-HD50",
+ US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
+ US_FL_SCM_MULT_TARG ),
+
+#ifdef CONFIG_USB_STORAGE_DPCM
+UNUSUAL_DEV( 0x07af, 0x0006, 0x0100, 0x0100,
+ "Microtech",
+ "CameraMate (DPCM_USB)",
+ US_SC_SCSI, US_PR_DPCM_USB, NULL, 0 ),
+#endif
+
+#ifdef CONFIG_USB_STORAGE_DATAFAB
+UNUSUAL_DEV( 0x07c4, 0xa000, 0x0000, 0x0015,
+ "Datafab",
+ "MDCFE-B USB CF Reader",
+ US_SC_SCSI, US_PR_DATAFAB, NULL,
+ 0 ),
+
+/*
+ * The following Datafab-based devices may or may not work
+ * using the current driver...the 0xffff is arbitrary since I
+ * don't know what device versions exist for these guys.
+ *
+ * The 0xa003 and 0xa004 devices in particular I'm curious about.
+ * I'm told they exist but so far nobody has come forward to say that
+ * they work with this driver. Given the success we've had getting
+ * other Datafab-based cards operational with this driver, I've decided
+ * to leave these two devices in the list.
+ */
+UNUSUAL_DEV( 0x07c4, 0xa001, 0x0000, 0xffff,
+ "SIIG/Datafab",
+ "SIIG/Datafab Memory Stick+CF Reader/Writer",
+ US_SC_SCSI, US_PR_DATAFAB, NULL,
+ 0 ),
+
+/* Reported by Josef Reisinger <josef.reisinger@netcologne.de> */
+UNUSUAL_DEV( 0x07c4, 0xa002, 0x0000, 0xffff,
+ "Datafab/Unknown",
+ "MD2/MD3 Disk enclosure",
+ US_SC_SCSI, US_PR_DATAFAB, NULL,
+ US_FL_SINGLE_LUN ),
+
+UNUSUAL_DEV( 0x07c4, 0xa003, 0x0000, 0xffff,
+ "Datafab/Unknown",
+ "Datafab-based Reader",
+ US_SC_SCSI, US_PR_DATAFAB, NULL,
+ 0 ),
+
+UNUSUAL_DEV( 0x07c4, 0xa004, 0x0000, 0xffff,
+ "Datafab/Unknown",
+ "Datafab-based Reader",
+ US_SC_SCSI, US_PR_DATAFAB, NULL,
+ 0 ),
+
+UNUSUAL_DEV( 0x07c4, 0xa005, 0x0000, 0xffff,
+ "PNY/Datafab",
+ "PNY/Datafab CF+SM Reader",
+ US_SC_SCSI, US_PR_DATAFAB, NULL,
+ 0 ),
+
+UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xffff,
+ "Simple Tech/Datafab",
+ "Simple Tech/Datafab CF+SM Reader",
+ US_SC_SCSI, US_PR_DATAFAB, NULL,
+ 0 ),
+#endif
+
+#ifdef CONFIG_USB_STORAGE_SDDR55
+/* Contributed by Peter Waechtler */
+UNUSUAL_DEV( 0x07c4, 0xa103, 0x0000, 0x9999,
+ "Datafab",
+ "MDSM-B reader",
+ US_SC_SCSI, US_PR_SDDR55, NULL,
+ US_FL_FIX_INQUIRY ),
+#endif
+
+#ifdef CONFIG_USB_STORAGE_DATAFAB
+/* Submitted by Olaf Hering <olh@suse.de> */
+UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
+ "Datafab Systems, Inc.",
+ "USB to CF + SM Combo (LC1)",
+ US_SC_SCSI, US_PR_DATAFAB, NULL,
+ 0 ),
+#endif
+#ifdef CONFIG_USB_STORAGE_SDDR55
+/* SM part - aeb <Andries.Brouwer@cwi.nl> */
+UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
+ "Datafab Systems, Inc.",
+ "USB to CF + SM Combo (LC1)",
+ US_SC_SCSI, US_PR_SDDR55, NULL,
+ US_FL_SINGLE_LUN ),
+#endif
+
+/* Datafab KECF-USB / Sagatek DCS-CF / Simpletech Flashlink UCF-100
+ * Only revision 1.13 tested (same for all of the above devices,
+ * based on the Datafab DF-UG-07 chip). Needed for US_FL_FIX_INQUIRY.
+ * Submitted by Marek Michalkiewicz <marekm@amelek.gda.pl>.
+ * See also http://martin.wilck.bei.t-online.de/#kecf .
+ */
+UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff,
+ "Datafab",
+ "KECF-USB",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+/* 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.
+ * - Some cameras with idProduct=0x1001 and bcdDevice=0x1000 have
+ * bInterfaceProtocol=0x00 (US_PR_CBI) while others have 0x01 (US_PR_CB).
+ * So don't remove the US_PR_CB override!
+ * - Cameras with bcdDevice=0x9009 require the US_SC_8070 override.
+ */
+UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9999,
+ "Casio",
+ "QV DigitalCamera",
+ US_SC_8070, US_PR_CB, NULL,
+ US_FL_NEED_OVERRIDE | US_FL_FIX_INQUIRY ),
+
+/* Submitted by Hartmut Wahl <hwahl@hwahl.de>*/
+UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0001,
+ "Samsung",
+ "Digimax 410",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY),
+
+/* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
+ * Flag will support Bulk devices which use a standards-violating 32-byte
+ * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with
+ * Grandtech GT892x chip, which request "Proprietary SCSI Bulk" support.
+ */
+
+UNUSUAL_DEV( 0x084d, 0x0011, 0x0110, 0x0110,
+ "Grandtech",
+ "DC2MEGA",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_BULK32),
+
+
+/* Entry needed for flags. Moreover, all devices with this ID use
+ * bulk-only transport, but _some_ falsely report Control/Bulk instead.
+ * One example is "Trumpion Digital Research MYMP3".
+ * Submitted by Bjoern Brill <brill(at)fs.math.uni-frankfurt.de>
+ */
+UNUSUAL_DEV( 0x090a, 0x1001, 0x0100, 0x0100,
+ "Trumpion",
+ "t33520 USB Flash Card Controller",
+ US_SC_DEVICE, US_PR_BULK, NULL,
+ US_FL_NEED_OVERRIDE ),
+
+/* Trumpion Microelectronics MP3 player (felipe_alfaro@linuxmail.org) */
+UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9999,
+ "Trumpion",
+ "MP3 player",
+ US_SC_RBC, US_PR_BULK, NULL,
+ 0 ),
+
+/* aeb */
+UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff,
+ "Feiya",
+ "5-in-1 Card Reader",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY ),
+
+/* This Pentax still camera is not conformant
+ * to the USB storage specification: -
+ * - It does not like the INQUIRY command. So we must handle this command
+ * of the SCSI layer ourselves.
+ * Tested on Rev. 10.00 (0x1000)
+ * Submitted by James Courtier-Dutton <James@superbug.demon.co.uk>
+ */
+UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000,
+ "Pentax",
+ "Optio 2/3/400",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+
+/* Submitted by Per Winkvist <per.winkvist@uk.com> */
+UNUSUAL_DEV( 0x0a17, 0x006, 0x0000, 0xffff,
+ "Pentax",
+ "Optio S/S4",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+#ifdef CONFIG_USB_STORAGE_ISD200
+UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110,
+ "ATI",
+ "USB Cable 205",
+ US_SC_ISD200, US_PR_BULK, isd200_Initialization,
+ 0 ),
+#endif
+
+#ifdef CONFIG_USB_STORAGE_DATAFAB
+UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xffff,
+ "Acomdata",
+ "CF",
+ US_SC_SCSI, US_PR_DATAFAB, NULL,
+ US_FL_SINGLE_LUN ),
+#endif
+#ifdef CONFIG_USB_STORAGE_SDDR55
+UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xffff,
+ "Acomdata",
+ "SM",
+ US_SC_SCSI, US_PR_SDDR55, NULL,
+ US_FL_SINGLE_LUN ),
+#endif
+
+/* Submitted by Joris Struyve <joris@struyve.be> */
+UNUSUAL_DEV( 0x0d96, 0x410a, 0x0001, 0xffff,
+ "Medion",
+ "MD 7425",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY),
+
+/*
+ * Entry for Jenoptik JD 5200z3
+ *
+ * email: car.busse@gmx.de
+ */
+UNUSUAL_DEV( 0x0d96, 0x5200, 0x0001, 0x0200,
+ "Jenoptik",
+ "JD 5200 z3",
+ US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY),
+
+/* Reported by Lubomir Blaha <tritol@trilogic.cz>
+ * I _REALLY_ don't know what 3rd, 4th number and all defines mean, but this
+ * works for me. Can anybody correct these values? (I able to test corrected
+ * version.)
+ */
+UNUSUAL_DEV( 0x0dd8, 0x1060, 0x0000, 0xffff,
+ "Netac",
+ "USB-CF-Card",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+/* Patch by Stephan Walter <stephan.walter@epfl.ch>
+ * I don't know why, but it works... */
+UNUSUAL_DEV( 0x0dda, 0x0001, 0x0012, 0x0012,
+ "WINWARD",
+ "Music Disk",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Reported by Ian McConnell <ian at emit.demon.co.uk> */
+UNUSUAL_DEV( 0x0dda, 0x0301, 0x0012, 0x0012,
+ "PNP_MP3",
+ "PNP_MP3 PLAYER",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Submitted by Antoine Mairesse <antoine.mairesse@free.fr> */
+UNUSUAL_DEV( 0x0ed1, 0x6660, 0x0100, 0x0300,
+ "USB",
+ "Solid state disk",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+/* Submitted by Daniel Drake <dsd@gentoo.org>
+ * Reported by dayul on the Gentoo Forums */
+UNUSUAL_DEV( 0x0ea0, 0x2168, 0x0110, 0x0110,
+ "Ours Technology",
+ "Flash Disk",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Reported by Rastislav Stanik <rs_kernel@yahoo.com> */
+UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x0110,
+ "USB",
+ "Flash Disk",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Reported by Michael Stattmann <michael@stattmann.com> */
+UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000,
+ "Sony Ericsson",
+ "V800-Vodafone 802",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_NO_WP_DETECT ),
+
+/* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu>
+ * Tested on hardware version 1.10.
+ * Entry is needed only for the initializer function override.
+ */
+UNUSUAL_DEV( 0x1019, 0x0c55, 0x0000, 0x9999,
+ "Desknote",
+ "UCR-61S2B",
+ US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init,
+ 0 ),
+
+/* Reported by Kotrla Vitezslav <kotrla@ceb.cz> */
+UNUSUAL_DEV( 0x1370, 0x6828, 0x0110, 0x0110,
+ "SWISSBIT",
+ "Black Silver",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
+/* Reported by Radovan Garabik <garabik@kassiopeia.juls.savba.sk> */
+UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999,
+ "MPIO",
+ "HS200",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_GO_SLOW ),
+
+#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
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
new file mode 100644
index 000000000000..35c1ca6b5a8e
--- /dev/null
+++ b/drivers/usb/storage/usb.c
@@ -0,0 +1,1051 @@
+/* Driver for USB Mass Storage compliant devices
+ *
+ * $Id: usb.c,v 1.75 2002/04/22 03:39:43 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 1999-2003 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
+ *
+ * Developed with the assistance of:
+ * (c) 2000 David L. Brown, Jr. (usb-storage@davidb.org)
+ * (c) 2003 Alan Stern (stern@rowland.harvard.edu)
+ *
+ * Initial work by:
+ * (c) 1999 Michael Gee (michael@linuxspecific.com)
+ *
+ * usb_device_id support by Adam J. Richter (adam@yggdrasil.com):
+ * (c) 2000 Yggdrasil Computing, Inc.
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/suspend.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+
+#include "usb.h"
+#include "scsiglue.h"
+#include "transport.h"
+#include "protocol.h"
+#include "debug.h"
+#include "initializers.h"
+
+#ifdef CONFIG_USB_STORAGE_USBAT
+#include "shuttle_usbat.h"
+#endif
+#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
+#ifdef CONFIG_USB_STORAGE_FREECOM
+#include "freecom.h"
+#endif
+#ifdef CONFIG_USB_STORAGE_ISD200
+#include "isd200.h"
+#endif
+#ifdef CONFIG_USB_STORAGE_DATAFAB
+#include "datafab.h"
+#endif
+#ifdef CONFIG_USB_STORAGE_JUMPSHOT
+#include "jumpshot.h"
+#endif
+
+
+/* Some informational data */
+MODULE_AUTHOR("Matthew Dharm <mdharm-usb@one-eyed-alien.net>");
+MODULE_DESCRIPTION("USB Mass Storage driver for Linux");
+MODULE_LICENSE("GPL");
+
+static unsigned int delay_use = 5;
+module_param(delay_use, uint, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(delay_use, "seconds to delay before using a new device");
+
+
+/* These are used to make sure the module doesn't unload before all the
+ * threads have exited.
+ */
+static atomic_t total_threads = ATOMIC_INIT(0);
+static DECLARE_COMPLETION(threads_gone);
+
+
+static int storage_probe(struct usb_interface *iface,
+ const struct usb_device_id *id);
+
+static void storage_disconnect(struct usb_interface *iface);
+
+/* The entries in this table, except for final ones here
+ * (USB_MASS_STORAGE_CLASS and the empty entry), correspond,
+ * line for line with the entries of us_unsuaul_dev_list[].
+ */
+
+#define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
+ vendorName, productName,useProtocol, useTransport, \
+ initFunction, flags) \
+{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin,bcdDeviceMax) }
+
+static struct usb_device_id storage_usb_ids [] = {
+
+# include "unusual_devs.h"
+#undef UNUSUAL_DEV
+ /* Control/Bulk transport for all SubClass values */
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_RBC, US_PR_CB) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8020, US_PR_CB) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_QIC, US_PR_CB) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_UFI, US_PR_CB) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8070, US_PR_CB) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_CB) },
+
+ /* Control/Bulk/Interrupt transport for all SubClass values */
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_RBC, US_PR_CBI) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8020, US_PR_CBI) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_QIC, US_PR_CBI) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_UFI, US_PR_CBI) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8070, US_PR_CBI) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_CBI) },
+
+ /* Bulk-only transport for all SubClass values */
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_RBC, US_PR_BULK) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8020, US_PR_BULK) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_QIC, US_PR_BULK) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_UFI, US_PR_BULK) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8070, US_PR_BULK) },
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_BULK) },
+
+ /* Terminating entry */
+ { }
+};
+
+MODULE_DEVICE_TABLE (usb, storage_usb_ids);
+
+/* This is the list of devices we recognize, along with their flag data */
+
+/* The vendor name should be kept at eight characters or less, and
+ * the product name should be kept at 16 characters or less. If a device
+ * has the US_FL_FIX_INQUIRY flag, then the vendor and product names
+ * normally generated by a device thorugh the INQUIRY response will be
+ * taken from this list, and this is the reason for the above size
+ * restriction. However, if the flag is not present, then you
+ * are free to use as many characters as you like.
+ */
+
+#undef UNUSUAL_DEV
+#define UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, \
+ vendor_name, product_name, use_protocol, use_transport, \
+ init_function, Flags) \
+{ \
+ .vendorName = vendor_name, \
+ .productName = product_name, \
+ .useProtocol = use_protocol, \
+ .useTransport = use_transport, \
+ .initFunction = init_function, \
+ .flags = Flags, \
+}
+
+static struct us_unusual_dev us_unusual_dev_list[] = {
+# include "unusual_devs.h"
+# undef UNUSUAL_DEV
+ /* Control/Bulk transport for all SubClass values */
+ { .useProtocol = US_SC_RBC,
+ .useTransport = US_PR_CB},
+ { .useProtocol = US_SC_8020,
+ .useTransport = US_PR_CB},
+ { .useProtocol = US_SC_QIC,
+ .useTransport = US_PR_CB},
+ { .useProtocol = US_SC_UFI,
+ .useTransport = US_PR_CB},
+ { .useProtocol = US_SC_8070,
+ .useTransport = US_PR_CB},
+ { .useProtocol = US_SC_SCSI,
+ .useTransport = US_PR_CB},
+
+ /* Control/Bulk/Interrupt transport for all SubClass values */
+ { .useProtocol = US_SC_RBC,
+ .useTransport = US_PR_CBI},
+ { .useProtocol = US_SC_8020,
+ .useTransport = US_PR_CBI},
+ { .useProtocol = US_SC_QIC,
+ .useTransport = US_PR_CBI},
+ { .useProtocol = US_SC_UFI,
+ .useTransport = US_PR_CBI},
+ { .useProtocol = US_SC_8070,
+ .useTransport = US_PR_CBI},
+ { .useProtocol = US_SC_SCSI,
+ .useTransport = US_PR_CBI},
+
+ /* Bulk-only transport for all SubClass values */
+ { .useProtocol = US_SC_RBC,
+ .useTransport = US_PR_BULK},
+ { .useProtocol = US_SC_8020,
+ .useTransport = US_PR_BULK},
+ { .useProtocol = US_SC_QIC,
+ .useTransport = US_PR_BULK},
+ { .useProtocol = US_SC_UFI,
+ .useTransport = US_PR_BULK},
+ { .useProtocol = US_SC_8070,
+ .useTransport = US_PR_BULK},
+ { .useProtocol = US_SC_SCSI,
+ .useTransport = US_PR_BULK},
+
+ /* Terminating entry */
+ { NULL }
+};
+
+static struct usb_driver usb_storage_driver = {
+ .owner = THIS_MODULE,
+ .name = "usb-storage",
+ .probe = storage_probe,
+ .disconnect = storage_disconnect,
+ .id_table = storage_usb_ids,
+};
+
+/*
+ * fill_inquiry_response takes an unsigned char array (which must
+ * be at least 36 characters) and populates the vendor name,
+ * product name, and revision fields. Then the array is copied
+ * into the SCSI command's response buffer (oddly enough
+ * called request_buffer). data_len contains the length of the
+ * data array, which again must be at least 36.
+ */
+
+void fill_inquiry_response(struct us_data *us, unsigned char *data,
+ unsigned int data_len)
+{
+ if (data_len<36) // You lose.
+ return;
+
+ if(data[0]&0x20) { /* USB device currently not connected. Return
+ peripheral qualifier 001b ("...however, the
+ physical device is not currently connected
+ to this logical unit") and leave vendor and
+ product identification empty. ("If the target
+ does store some of the INQUIRY data on the
+ device, it may return zeros or ASCII spaces
+ (20h) in those fields until the data is
+ available from the device."). */
+ memset(data+8,0,28);
+ } else {
+ u16 bcdDevice = le16_to_cpu(us->pusb_dev->descriptor.bcdDevice);
+ memcpy(data+8, us->unusual_dev->vendorName,
+ strlen(us->unusual_dev->vendorName) > 8 ? 8 :
+ strlen(us->unusual_dev->vendorName));
+ memcpy(data+16, us->unusual_dev->productName,
+ strlen(us->unusual_dev->productName) > 16 ? 16 :
+ strlen(us->unusual_dev->productName));
+ data[32] = 0x30 + ((bcdDevice>>12) & 0x0F);
+ data[33] = 0x30 + ((bcdDevice>>8) & 0x0F);
+ data[34] = 0x30 + ((bcdDevice>>4) & 0x0F);
+ data[35] = 0x30 + ((bcdDevice) & 0x0F);
+ }
+
+ usb_stor_set_xfer_buf(data, data_len, us->srb);
+}
+
+static int usb_stor_control_thread(void * __us)
+{
+ struct us_data *us = (struct us_data *)__us;
+ struct Scsi_Host *host = us_to_host(us);
+
+ lock_kernel();
+
+ /*
+ * This thread doesn't need any user-level access,
+ * so get rid of all our resources.
+ */
+ daemonize("usb-storage");
+ current->flags |= PF_NOFREEZE;
+ unlock_kernel();
+
+ /* acquire a reference to the host, so it won't be deallocated
+ * until we're ready to exit */
+ scsi_host_get(host);
+
+ /* signal that we've started the thread */
+ complete(&(us->notify));
+
+ for(;;) {
+ US_DEBUGP("*** thread sleeping.\n");
+ if(down_interruptible(&us->sema))
+ break;
+
+ US_DEBUGP("*** thread awakened.\n");
+
+ /* lock the device pointers */
+ down(&(us->dev_semaphore));
+
+ /* if the device has disconnected, we are free to exit */
+ if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
+ US_DEBUGP("-- exiting\n");
+ up(&(us->dev_semaphore));
+ break;
+ }
+
+ /* lock access to the state */
+ scsi_lock(host);
+
+ /* has the command timed out *already* ? */
+ if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) {
+ us->srb->result = DID_ABORT << 16;
+ goto SkipForAbort;
+ }
+
+ scsi_unlock(host);
+
+ /* reject the command if the direction indicator
+ * is UNKNOWN
+ */
+ if (us->srb->sc_data_direction == DMA_BIDIRECTIONAL) {
+ US_DEBUGP("UNKNOWN data direction\n");
+ us->srb->result = DID_ERROR << 16;
+ }
+
+ /* reject if target != 0 or if LUN is higher than
+ * the maximum known LUN
+ */
+ else if (us->srb->device->id &&
+ !(us->flags & US_FL_SCM_MULT_TARG)) {
+ US_DEBUGP("Bad target number (%d:%d)\n",
+ us->srb->device->id, us->srb->device->lun);
+ us->srb->result = DID_BAD_TARGET << 16;
+ }
+
+ else if (us->srb->device->lun > us->max_lun) {
+ US_DEBUGP("Bad LUN (%d:%d)\n",
+ us->srb->device->id, us->srb->device->lun);
+ us->srb->result = DID_BAD_TARGET << 16;
+ }
+
+ /* Handle those devices which need us to fake
+ * their inquiry data */
+ else if ((us->srb->cmnd[0] == INQUIRY) &&
+ (us->flags & US_FL_FIX_INQUIRY)) {
+ unsigned char data_ptr[36] = {
+ 0x00, 0x80, 0x02, 0x02,
+ 0x1F, 0x00, 0x00, 0x00};
+
+ US_DEBUGP("Faking INQUIRY command\n");
+ fill_inquiry_response(us, data_ptr, 36);
+ us->srb->result = SAM_STAT_GOOD;
+ }
+
+ /* we've got a command, let's do it! */
+ else {
+ US_DEBUG(usb_stor_show_command(us->srb));
+ us->proto_handler(us->srb, us);
+ }
+
+ /* lock access to the state */
+ scsi_lock(host);
+
+ /* indicate that the command is done */
+ if (us->srb->result != DID_ABORT << 16) {
+ US_DEBUGP("scsi cmd done, result=0x%x\n",
+ us->srb->result);
+ us->srb->scsi_done(us->srb);
+ } else {
+SkipForAbort:
+ US_DEBUGP("scsi command aborted\n");
+ }
+
+ /* If an abort request was received we need to signal that
+ * the abort has finished. The proper test for this is
+ * the TIMED_OUT flag, not srb->result == DID_ABORT, because
+ * a timeout/abort request might be received after all the
+ * USB processing was complete. */
+ if (test_bit(US_FLIDX_TIMED_OUT, &us->flags))
+ complete(&(us->notify));
+
+ /* finished working on this command */
+ us->srb = NULL;
+ scsi_unlock(host);
+
+ /* unlock the device pointers */
+ up(&(us->dev_semaphore));
+ } /* for (;;) */
+
+ scsi_host_put(host);
+
+ /* notify the exit routine that we're actually exiting now
+ *
+ * complete()/wait_for_completion() is similar to up()/down(),
+ * except that complete() is safe in the case where the structure
+ * is getting deleted in a parallel mode of execution (i.e. just
+ * after the down() -- that's necessary for the thread-shutdown
+ * case.
+ *
+ * complete_and_exit() goes even further than this -- it is safe in
+ * the case that the thread of the caller is going away (not just
+ * the structure) -- this is necessary for the module-remove case.
+ * This is important in preemption kernels, which transfer the flow
+ * of execution immediately upon a complete().
+ */
+ complete_and_exit(&threads_gone, 0);
+}
+
+/***********************************************************************
+ * Device probing and disconnecting
+ ***********************************************************************/
+
+/* Associate our private data with the USB device */
+static int associate_dev(struct us_data *us, struct usb_interface *intf)
+{
+ US_DEBUGP("-- %s\n", __FUNCTION__);
+
+ /* Fill in the device-related fields */
+ us->pusb_dev = interface_to_usbdev(intf);
+ us->pusb_intf = intf;
+ us->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
+ US_DEBUGP("Vendor: 0x%04x, Product: 0x%04x, Revision: 0x%04x\n",
+ le16_to_cpu(us->pusb_dev->descriptor.idVendor),
+ le16_to_cpu(us->pusb_dev->descriptor.idProduct),
+ le16_to_cpu(us->pusb_dev->descriptor.bcdDevice));
+ US_DEBUGP("Interface Subclass: 0x%02x, Protocol: 0x%02x\n",
+ intf->cur_altsetting->desc.bInterfaceSubClass,
+ intf->cur_altsetting->desc.bInterfaceProtocol);
+
+ /* Store our private data in the interface */
+ usb_set_intfdata(intf, us);
+
+ /* Allocate the device-related DMA-mapped buffers */
+ us->cr = usb_buffer_alloc(us->pusb_dev, sizeof(*us->cr),
+ GFP_KERNEL, &us->cr_dma);
+ if (!us->cr) {
+ US_DEBUGP("usb_ctrlrequest allocation failed\n");
+ return -ENOMEM;
+ }
+
+ us->iobuf = usb_buffer_alloc(us->pusb_dev, US_IOBUF_SIZE,
+ GFP_KERNEL, &us->iobuf_dma);
+ if (!us->iobuf) {
+ US_DEBUGP("I/O buffer allocation failed\n");
+ return -ENOMEM;
+ }
+ return 0;
+}
+
+/* Get the unusual_devs entries and the string descriptors */
+static void get_device_info(struct us_data *us, int id_index)
+{
+ struct usb_device *dev = us->pusb_dev;
+ struct usb_interface_descriptor *idesc =
+ &us->pusb_intf->cur_altsetting->desc;
+ struct us_unusual_dev *unusual_dev = &us_unusual_dev_list[id_index];
+ struct usb_device_id *id = &storage_usb_ids[id_index];
+
+ /* Store the entries */
+ us->unusual_dev = unusual_dev;
+ us->subclass = (unusual_dev->useProtocol == US_SC_DEVICE) ?
+ idesc->bInterfaceSubClass :
+ unusual_dev->useProtocol;
+ us->protocol = (unusual_dev->useTransport == US_PR_DEVICE) ?
+ idesc->bInterfaceProtocol :
+ unusual_dev->useTransport;
+ us->flags = unusual_dev->flags;
+
+ /*
+ * This flag is only needed when we're in high-speed, so let's
+ * disable it if we're in full-speed
+ */
+ if (dev->speed != USB_SPEED_HIGH)
+ us->flags &= ~US_FL_GO_SLOW;
+
+ /* Log a message if a non-generic unusual_dev entry contains an
+ * unnecessary subclass or protocol override. This may stimulate
+ * reports from users that will help us remove unneeded entries
+ * from the unusual_devs.h table.
+ */
+ if (id->idVendor || id->idProduct) {
+ static char *msgs[3] = {
+ "an unneeded SubClass entry",
+ "an unneeded Protocol entry",
+ "unneeded SubClass and Protocol entries"};
+ struct usb_device_descriptor *ddesc = &dev->descriptor;
+ int msg = -1;
+
+ if (unusual_dev->useProtocol != US_SC_DEVICE &&
+ us->subclass == idesc->bInterfaceSubClass)
+ msg += 1;
+ if (unusual_dev->useTransport != US_PR_DEVICE &&
+ us->protocol == idesc->bInterfaceProtocol)
+ msg += 2;
+ if (msg >= 0 && !(unusual_dev->flags & US_FL_NEED_OVERRIDE))
+ printk(KERN_NOTICE USB_STORAGE "This device "
+ "(%04x,%04x,%04x S %02x P %02x)"
+ " has %s in unusual_devs.h\n"
+ " Please send a copy of this message to "
+ "<linux-usb-devel@lists.sourceforge.net>\n",
+ le16_to_cpu(ddesc->idVendor),
+ le16_to_cpu(ddesc->idProduct),
+ le16_to_cpu(ddesc->bcdDevice),
+ idesc->bInterfaceSubClass,
+ idesc->bInterfaceProtocol,
+ msgs[msg]);
+ }
+}
+
+/* Get the transport settings */
+static int get_transport(struct us_data *us)
+{
+ switch (us->protocol) {
+ case US_PR_CB:
+ us->transport_name = "Control/Bulk";
+ us->transport = usb_stor_CB_transport;
+ us->transport_reset = usb_stor_CB_reset;
+ us->max_lun = 7;
+ break;
+
+ case US_PR_CBI:
+ us->transport_name = "Control/Bulk/Interrupt";
+ us->transport = usb_stor_CBI_transport;
+ us->transport_reset = usb_stor_CB_reset;
+ us->max_lun = 7;
+ break;
+
+ case US_PR_BULK:
+ us->transport_name = "Bulk";
+ us->transport = usb_stor_Bulk_transport;
+ us->transport_reset = usb_stor_Bulk_reset;
+ break;
+
+#ifdef CONFIG_USB_STORAGE_USBAT
+ case US_PR_SCM_ATAPI:
+ us->transport_name = "SCM/ATAPI";
+ us->transport = usbat_transport;
+ us->transport_reset = usb_stor_CB_reset;
+ us->max_lun = 1;
+ break;
+#endif
+
+#ifdef CONFIG_USB_STORAGE_SDDR09
+ case US_PR_EUSB_SDDR09:
+ us->transport_name = "EUSB/SDDR09";
+ us->transport = sddr09_transport;
+ us->transport_reset = usb_stor_CB_reset;
+ us->max_lun = 0;
+ break;
+#endif
+
+#ifdef CONFIG_USB_STORAGE_SDDR55
+ case US_PR_SDDR55:
+ us->transport_name = "SDDR55";
+ us->transport = sddr55_transport;
+ us->transport_reset = sddr55_reset;
+ us->max_lun = 0;
+ break;
+#endif
+
+#ifdef CONFIG_USB_STORAGE_DPCM
+ case US_PR_DPCM_USB:
+ us->transport_name = "Control/Bulk-EUSB/SDDR09";
+ us->transport = dpcm_transport;
+ us->transport_reset = usb_stor_CB_reset;
+ us->max_lun = 1;
+ break;
+#endif
+
+#ifdef CONFIG_USB_STORAGE_FREECOM
+ case US_PR_FREECOM:
+ us->transport_name = "Freecom";
+ us->transport = freecom_transport;
+ us->transport_reset = usb_stor_freecom_reset;
+ us->max_lun = 0;
+ break;
+#endif
+
+#ifdef CONFIG_USB_STORAGE_DATAFAB
+ case US_PR_DATAFAB:
+ us->transport_name = "Datafab Bulk-Only";
+ us->transport = datafab_transport;
+ us->transport_reset = usb_stor_Bulk_reset;
+ us->max_lun = 1;
+ break;
+#endif
+
+#ifdef CONFIG_USB_STORAGE_JUMPSHOT
+ case US_PR_JUMPSHOT:
+ us->transport_name = "Lexar Jumpshot Control/Bulk";
+ us->transport = jumpshot_transport;
+ us->transport_reset = usb_stor_Bulk_reset;
+ us->max_lun = 1;
+ break;
+#endif
+
+ default:
+ return -EIO;
+ }
+ US_DEBUGP("Transport: %s\n", us->transport_name);
+
+ /* fix for single-lun devices */
+ if (us->flags & US_FL_SINGLE_LUN)
+ us->max_lun = 0;
+ return 0;
+}
+
+/* Get the protocol settings */
+static int get_protocol(struct us_data *us)
+{
+ switch (us->subclass) {
+ case US_SC_RBC:
+ us->protocol_name = "Reduced Block Commands (RBC)";
+ us->proto_handler = usb_stor_transparent_scsi_command;
+ break;
+
+ case US_SC_8020:
+ us->protocol_name = "8020i";
+ us->proto_handler = usb_stor_ATAPI_command;
+ us->max_lun = 0;
+ break;
+
+ case US_SC_QIC:
+ us->protocol_name = "QIC-157";
+ us->proto_handler = usb_stor_qic157_command;
+ us->max_lun = 0;
+ break;
+
+ case US_SC_8070:
+ us->protocol_name = "8070i";
+ us->proto_handler = usb_stor_ATAPI_command;
+ us->max_lun = 0;
+ break;
+
+ case US_SC_SCSI:
+ us->protocol_name = "Transparent SCSI";
+ us->proto_handler = usb_stor_transparent_scsi_command;
+ break;
+
+ case US_SC_UFI:
+ us->protocol_name = "Uniform Floppy Interface (UFI)";
+ us->proto_handler = usb_stor_ufi_command;
+ break;
+
+#ifdef CONFIG_USB_STORAGE_ISD200
+ case US_SC_ISD200:
+ us->protocol_name = "ISD200 ATA/ATAPI";
+ us->proto_handler = isd200_ata_command;
+ break;
+#endif
+
+ default:
+ return -EIO;
+ }
+ US_DEBUGP("Protocol: %s\n", us->protocol_name);
+ return 0;
+}
+
+/* Get the pipe settings */
+static int get_pipes(struct us_data *us)
+{
+ struct usb_host_interface *altsetting =
+ us->pusb_intf->cur_altsetting;
+ int i;
+ struct usb_endpoint_descriptor *ep;
+ struct usb_endpoint_descriptor *ep_in = NULL;
+ struct usb_endpoint_descriptor *ep_out = NULL;
+ struct usb_endpoint_descriptor *ep_int = NULL;
+
+ /*
+ * Find the endpoints we need.
+ * We are expecting a minimum of 2 endpoints - in and out (bulk).
+ * An optional interrupt is OK (necessary for CBI protocol).
+ * We will ignore any others.
+ */
+ for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
+ ep = &altsetting->endpoint[i].desc;
+
+ /* Is it a BULK endpoint? */
+ if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ == USB_ENDPOINT_XFER_BULK) {
+ /* BULK in or out? */
+ if (ep->bEndpointAddress & USB_DIR_IN)
+ ep_in = ep;
+ else
+ ep_out = ep;
+ }
+
+ /* Is it an interrupt endpoint? */
+ else if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ == USB_ENDPOINT_XFER_INT) {
+ ep_int = ep;
+ }
+ }
+
+ if (!ep_in || !ep_out || (us->protocol == US_PR_CBI && !ep_int)) {
+ US_DEBUGP("Endpoint sanity check failed! Rejecting dev.\n");
+ return -EIO;
+ }
+
+ /* Calculate and store the pipe values */
+ us->send_ctrl_pipe = usb_sndctrlpipe(us->pusb_dev, 0);
+ us->recv_ctrl_pipe = usb_rcvctrlpipe(us->pusb_dev, 0);
+ us->send_bulk_pipe = usb_sndbulkpipe(us->pusb_dev,
+ ep_out->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ us->recv_bulk_pipe = usb_rcvbulkpipe(us->pusb_dev,
+ ep_in->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ if (ep_int) {
+ us->recv_intr_pipe = usb_rcvintpipe(us->pusb_dev,
+ ep_int->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ us->ep_bInterval = ep_int->bInterval;
+ }
+ return 0;
+}
+
+/* Initialize all the dynamic resources we need */
+static int usb_stor_acquire_resources(struct us_data *us)
+{
+ int p;
+
+ us->current_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!us->current_urb) {
+ US_DEBUGP("URB allocation failed\n");
+ return -ENOMEM;
+ }
+
+ /* Lock the device while we carry out the next two operations */
+ down(&us->dev_semaphore);
+
+ /* For bulk-only devices, determine the max LUN value */
+ if (us->protocol == US_PR_BULK) {
+ p = usb_stor_Bulk_max_lun(us);
+ if (p < 0) {
+ up(&us->dev_semaphore);
+ return p;
+ }
+ us->max_lun = p;
+ }
+
+ /* Just before we start our control thread, initialize
+ * the device if it needs initialization */
+ if (us->unusual_dev->initFunction)
+ us->unusual_dev->initFunction(us);
+
+ up(&us->dev_semaphore);
+
+ /* Start up our control thread */
+ p = kernel_thread(usb_stor_control_thread, us, CLONE_VM);
+ if (p < 0) {
+ printk(KERN_WARNING USB_STORAGE
+ "Unable to start control thread\n");
+ return p;
+ }
+ us->pid = p;
+ atomic_inc(&total_threads);
+
+ /* Wait for the thread to start */
+ wait_for_completion(&(us->notify));
+
+ return 0;
+}
+
+/* Release all our dynamic resources */
+static void usb_stor_release_resources(struct us_data *us)
+{
+ US_DEBUGP("-- %s\n", __FUNCTION__);
+
+ /* Tell the control thread to exit. The SCSI host must
+ * already have been removed so it won't try to queue
+ * any more commands.
+ */
+ US_DEBUGP("-- sending exit command to thread\n");
+ up(&us->sema);
+
+ /* Call the destructor routine, if it exists */
+ if (us->extra_destructor) {
+ US_DEBUGP("-- calling extra_destructor()\n");
+ us->extra_destructor(us->extra);
+ }
+
+ /* Free the extra data and the URB */
+ kfree(us->extra);
+ usb_free_urb(us->current_urb);
+}
+
+/* Dissociate from the USB device */
+static void dissociate_dev(struct us_data *us)
+{
+ US_DEBUGP("-- %s\n", __FUNCTION__);
+
+ /* Free the device-related DMA-mapped buffers */
+ if (us->cr)
+ usb_buffer_free(us->pusb_dev, sizeof(*us->cr), us->cr,
+ us->cr_dma);
+ if (us->iobuf)
+ usb_buffer_free(us->pusb_dev, US_IOBUF_SIZE, us->iobuf,
+ us->iobuf_dma);
+
+ /* Remove our private data from the interface */
+ usb_set_intfdata(us->pusb_intf, NULL);
+}
+
+/* Thread to carry out delayed SCSI-device scanning */
+static int usb_stor_scan_thread(void * __us)
+{
+ struct us_data *us = (struct us_data *)__us;
+
+ /*
+ * This thread doesn't need any user-level access,
+ * so get rid of all our resources.
+ */
+ lock_kernel();
+ daemonize("usb-stor-scan");
+ unlock_kernel();
+
+ /* Acquire a reference to the host, so it won't be deallocated
+ * until we're ready to exit */
+ scsi_host_get(us_to_host(us));
+
+ /* Signal that we've started the thread */
+ complete(&(us->notify));
+
+ printk(KERN_DEBUG
+ "usb-storage: device found at %d\n", us->pusb_dev->devnum);
+
+ /* Wait for the timeout to expire or for a disconnect */
+ if (delay_use > 0) {
+ printk(KERN_DEBUG "usb-storage: waiting for device "
+ "to settle before scanning\n");
+retry:
+ wait_event_interruptible_timeout(us->delay_wait,
+ test_bit(US_FLIDX_DISCONNECTING, &us->flags),
+ delay_use * HZ);
+ if (current->flags & PF_FREEZE) {
+ refrigerator(PF_FREEZE);
+ goto retry;
+ }
+ }
+
+ /* If the device is still connected, perform the scanning */
+ if (!test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
+ scsi_scan_host(us_to_host(us));
+ printk(KERN_DEBUG "usb-storage: device scan complete\n");
+
+ /* Should we unbind if no devices were detected? */
+ }
+
+ scsi_host_put(us_to_host(us));
+ complete_and_exit(&threads_gone, 0);
+}
+
+
+/* Probe to see if we can drive a newly-connected USB device */
+static int storage_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct Scsi_Host *host;
+ struct us_data *us;
+ const int id_index = id - storage_usb_ids;
+ int result;
+
+ US_DEBUGP("USB Mass Storage device detected\n");
+
+ /*
+ * Ask the SCSI layer to allocate a host structure, with extra
+ * space at the end for our private us_data structure.
+ */
+ host = scsi_host_alloc(&usb_stor_host_template, sizeof(*us));
+ if (!host) {
+ printk(KERN_WARNING USB_STORAGE
+ "Unable to allocate the scsi host\n");
+ return -ENOMEM;
+ }
+
+ us = host_to_us(host);
+ memset(us, 0, sizeof(struct us_data));
+ init_MUTEX(&(us->dev_semaphore));
+ init_MUTEX_LOCKED(&(us->sema));
+ init_completion(&(us->notify));
+ init_waitqueue_head(&us->delay_wait);
+
+ /* Associate the us_data structure with the USB device */
+ result = associate_dev(us, intf);
+ if (result)
+ goto BadDevice;
+
+ /*
+ * Get the unusual_devs entries and the descriptors
+ *
+ * id_index is calculated in the declaration to be the index number
+ * of the match from the usb_device_id table, so we can find the
+ * corresponding entry in the private table.
+ */
+ get_device_info(us, id_index);
+
+#ifdef CONFIG_USB_STORAGE_SDDR09
+ if (us->protocol == US_PR_EUSB_SDDR09 ||
+ us->protocol == US_PR_DPCM_USB) {
+ /* set the configuration -- STALL is an acceptable response here */
+ if (us->pusb_dev->actconfig->desc.bConfigurationValue != 1) {
+ US_DEBUGP("active config #%d != 1 ??\n", us->pusb_dev
+ ->actconfig->desc.bConfigurationValue);
+ goto BadDevice;
+ }
+ result = usb_reset_configuration(us->pusb_dev);
+
+ US_DEBUGP("Result of usb_reset_configuration is %d\n", result);
+ if (result == -EPIPE) {
+ US_DEBUGP("-- stall on control interface\n");
+ } else if (result != 0) {
+ /* it's not a stall, but another error -- time to bail */
+ US_DEBUGP("-- Unknown error. Rejecting device\n");
+ goto BadDevice;
+ }
+ }
+#endif
+
+ /* Get the transport, protocol, and pipe settings */
+ result = get_transport(us);
+ if (result)
+ goto BadDevice;
+ result = get_protocol(us);
+ if (result)
+ goto BadDevice;
+ result = get_pipes(us);
+ if (result)
+ goto BadDevice;
+
+ /* Acquire all the other resources and add the host */
+ result = usb_stor_acquire_resources(us);
+ if (result)
+ goto BadDevice;
+ result = scsi_add_host(host, &intf->dev);
+ if (result) {
+ printk(KERN_WARNING USB_STORAGE
+ "Unable to add the scsi host\n");
+ goto BadDevice;
+ }
+
+ /* Start up the thread for delayed SCSI-device scanning */
+ result = kernel_thread(usb_stor_scan_thread, us, CLONE_VM);
+ if (result < 0) {
+ printk(KERN_WARNING USB_STORAGE
+ "Unable to start the device-scanning thread\n");
+ scsi_remove_host(host);
+ goto BadDevice;
+ }
+ atomic_inc(&total_threads);
+
+ /* Wait for the thread to start */
+ wait_for_completion(&(us->notify));
+
+ return 0;
+
+ /* We come here if there are any problems */
+BadDevice:
+ US_DEBUGP("storage_probe() failed\n");
+ set_bit(US_FLIDX_DISCONNECTING, &us->flags);
+ usb_stor_release_resources(us);
+ dissociate_dev(us);
+ scsi_host_put(host);
+ return result;
+}
+
+/* Handle a disconnect event from the USB core */
+static void storage_disconnect(struct usb_interface *intf)
+{
+ struct us_data *us = usb_get_intfdata(intf);
+
+ US_DEBUGP("storage_disconnect() called\n");
+
+ /* Prevent new USB transfers, stop the current command, and
+ * interrupt a SCSI-scan or device-reset delay */
+ set_bit(US_FLIDX_DISCONNECTING, &us->flags);
+ usb_stor_stop_transport(us);
+ wake_up(&us->delay_wait);
+
+ /* It doesn't matter if the SCSI-scanning thread is still running.
+ * The thread will exit when it sees the DISCONNECTING flag. */
+
+ /* Wait for the current command to finish, then remove the host */
+ down(&us->dev_semaphore);
+ up(&us->dev_semaphore);
+ scsi_remove_host(us_to_host(us));
+
+ /* Wait for everything to become idle and release all our resources */
+ usb_stor_release_resources(us);
+ dissociate_dev(us);
+
+ /* Drop our reference to the host; the SCSI core will free it
+ * (and "us" along with it) when the refcount becomes 0. */
+ scsi_host_put(us_to_host(us));
+}
+
+/***********************************************************************
+ * Initialization and registration
+ ***********************************************************************/
+
+static int __init usb_stor_init(void)
+{
+ int retval;
+ printk(KERN_INFO "Initializing USB Mass Storage driver...\n");
+
+ /* register the driver, return usb_register return code if error */
+ retval = usb_register(&usb_storage_driver);
+ if (retval == 0)
+ printk(KERN_INFO "USB Mass Storage support registered.\n");
+
+ return retval;
+}
+
+static void __exit usb_stor_exit(void)
+{
+ US_DEBUGP("usb_stor_exit() called\n");
+
+ /* Deregister the driver
+ * This will cause disconnect() to be called for each
+ * attached unit
+ */
+ US_DEBUGP("-- calling usb_deregister()\n");
+ usb_deregister(&usb_storage_driver) ;
+
+ /* Don't return until all of our control and scanning threads
+ * have exited. Since each thread signals threads_gone as its
+ * last act, we have to call wait_for_completion the right number
+ * of times.
+ */
+ while (atomic_read(&total_threads) > 0) {
+ wait_for_completion(&threads_gone);
+ atomic_dec(&total_threads);
+ }
+}
+
+module_init(usb_stor_init);
+module_exit(usb_stor_exit);
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
new file mode 100644
index 000000000000..625b7aa98074
--- /dev/null
+++ b/drivers/usb/storage/usb.h
@@ -0,0 +1,204 @@
+/* Driver for USB Mass Storage compliant devices
+ * Main Header File
+ *
+ * $Id: usb.h,v 1.21 2002/04/21 02:57:59 mdharm Exp $
+ *
+ * Current development and maintenance by:
+ * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
+ *
+ * Initial work by:
+ * (c) 1999 Michael Gee (michael@linuxspecific.com)
+ *
+ * This driver is based on the 'USB Mass Storage Class' document. This
+ * describes in detail the protocol used to communicate with such
+ * devices. Clearly, the designers had SCSI and ATAPI commands in
+ * mind when they created this document. The commands are all very
+ * similar to commands in the SCSI-II and ATAPI specifications.
+ *
+ * It is important to note that in a number of cases this class
+ * exhibits class-specific exemptions from the USB specification.
+ * Notably the usage of NAK, STALL and ACK differs from the norm, in
+ * that they are used to communicate wait, failed and OK on commands.
+ *
+ * Also, for certain devices, the interrupt endpoint is used to convey
+ * status of a command.
+ *
+ * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
+ * information about this driver.
+ *
+ * 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, 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.
+ */
+
+#ifndef _USB_H_
+#define _USB_H_
+
+#include <linux/usb.h>
+#include <linux/blkdev.h>
+#include <linux/smp_lock.h>
+#include <linux/completion.h>
+#include <scsi/scsi_host.h>
+
+struct us_data;
+struct scsi_cmnd;
+
+/*
+ * Unusual device list definitions
+ */
+
+struct us_unusual_dev {
+ const char* vendorName;
+ const char* productName;
+ __u8 useProtocol;
+ __u8 useTransport;
+ int (*initFunction)(struct us_data *);
+ unsigned int flags;
+};
+
+/*
+ * Static flag definitions. We use this roundabout technique so that the
+ * proc_info() routine can automatically display a message for each flag.
+ */
+#define US_DO_ALL_FLAGS \
+ US_FLAG(SINGLE_LUN, 0x00000001) \
+ /* allow access to only LUN 0 */ \
+ US_FLAG(NEED_OVERRIDE, 0x00000002) \
+ /* unusual_devs entry is necessary */ \
+ US_FLAG(SCM_MULT_TARG, 0x00000004) \
+ /* supports multiple targets */ \
+ US_FLAG(FIX_INQUIRY, 0x00000008) \
+ /* INQUIRY response needs faking */ \
+ US_FLAG(FIX_CAPACITY, 0x00000010) \
+ /* READ CAPACITY response too big */ \
+ US_FLAG(IGNORE_RESIDUE, 0x00000020) \
+ /* reported residue is wrong */ \
+ US_FLAG(BULK32, 0x00000040) \
+ /* Uses 32-byte CBW length */ \
+ US_FLAG(NOT_LOCKABLE, 0x00000080) \
+ /* PREVENT/ALLOW not supported */ \
+ US_FLAG(GO_SLOW, 0x00000100) \
+ /* Need delay after Command phase */ \
+ US_FLAG(NO_WP_DETECT, 0x00000200) \
+ /* Don't check for write-protect */ \
+
+#define US_FLAG(name, value) US_FL_##name = value ,
+enum { US_DO_ALL_FLAGS };
+#undef US_FLAG
+
+/* Dynamic flag definitions: used in set_bit() etc. */
+#define US_FLIDX_URB_ACTIVE 18 /* 0x00040000 current_urb is in use */
+#define US_FLIDX_SG_ACTIVE 19 /* 0x00080000 current_sg is in use */
+#define US_FLIDX_ABORTING 20 /* 0x00100000 abort is in progress */
+#define US_FLIDX_DISCONNECTING 21 /* 0x00200000 disconnect in progress */
+#define ABORTING_OR_DISCONNECTING ((1UL << US_FLIDX_ABORTING) | \
+ (1UL << US_FLIDX_DISCONNECTING))
+#define US_FLIDX_RESETTING 22 /* 0x00400000 device reset in progress */
+#define US_FLIDX_TIMED_OUT 23 /* 0x00800000 SCSI midlayer timed out */
+
+
+#define USB_STOR_STRING_LEN 32
+
+/*
+ * We provide a DMA-mapped I/O buffer for use with small USB transfers.
+ * It turns out that CB[I] needs a 12-byte buffer and Bulk-only needs a
+ * 31-byte buffer. But Freecom needs a 64-byte buffer, so that's the
+ * size we'll allocate.
+ */
+
+#define US_IOBUF_SIZE 64 /* Size of the DMA-mapped I/O buffer */
+
+typedef int (*trans_cmnd)(struct scsi_cmnd *, struct us_data*);
+typedef int (*trans_reset)(struct us_data*);
+typedef void (*proto_cmnd)(struct scsi_cmnd*, struct us_data*);
+typedef void (*extra_data_destructor)(void *); /* extra data destructor */
+
+/* we allocate one of these for every device that we remember */
+struct us_data {
+ /* The device we're working with
+ * It's important to note:
+ * (o) you must hold dev_semaphore to change pusb_dev
+ */
+ struct semaphore dev_semaphore; /* protect pusb_dev */
+ struct usb_device *pusb_dev; /* this usb_device */
+ struct usb_interface *pusb_intf; /* this interface */
+ struct us_unusual_dev *unusual_dev; /* device-filter entry */
+ unsigned long flags; /* from filter initially */
+ unsigned int send_bulk_pipe; /* cached pipe values */
+ unsigned int recv_bulk_pipe;
+ unsigned int send_ctrl_pipe;
+ unsigned int recv_ctrl_pipe;
+ unsigned int recv_intr_pipe;
+
+ /* information about the device */
+ char *transport_name;
+ char *protocol_name;
+ __le32 bcs_signature;
+ u8 subclass;
+ u8 protocol;
+ u8 max_lun;
+
+ u8 ifnum; /* interface number */
+ u8 ep_bInterval; /* interrupt interval */
+
+ /* function pointers for this device */
+ trans_cmnd transport; /* transport function */
+ trans_reset transport_reset; /* transport device reset */
+ proto_cmnd proto_handler; /* protocol handler */
+
+ /* SCSI interfaces */
+ struct scsi_cmnd *srb; /* current srb */
+
+ /* thread information */
+ int pid; /* control thread */
+
+ /* control and bulk communications data */
+ struct urb *current_urb; /* USB requests */
+ struct usb_ctrlrequest *cr; /* control requests */
+ struct usb_sg_request current_sg; /* scatter-gather req. */
+ unsigned char *iobuf; /* I/O buffer */
+ dma_addr_t cr_dma; /* buffer DMA addresses */
+ dma_addr_t iobuf_dma;
+
+ /* mutual exclusion and synchronization structures */
+ struct semaphore sema; /* to sleep thread on */
+ struct completion notify; /* thread begin/end */
+ wait_queue_head_t delay_wait; /* wait during scan, reset */
+
+ /* subdriver information */
+ void *extra; /* Any extra data */
+ extra_data_destructor extra_destructor;/* extra data destructor */
+};
+
+/* Convert between us_data and the corresponding Scsi_Host */
+static struct Scsi_Host inline *us_to_host(struct us_data *us) {
+ return container_of((void *) us, struct Scsi_Host, hostdata);
+}
+static struct us_data inline *host_to_us(struct Scsi_Host *host) {
+ return (struct us_data *) host->hostdata;
+}
+
+/* Function to fill an inquiry response. See usb.c for details */
+extern void fill_inquiry_response(struct us_data *us,
+ unsigned char *data, unsigned int data_len);
+
+/* The scsi_lock() and scsi_unlock() macros protect the sm_state and the
+ * single queue element srb for write access */
+#define scsi_unlock(host) spin_unlock_irq(host->host_lock)
+#define scsi_lock(host) spin_lock_irq(host->host_lock)
+
+
+/* Vendor ID list for devices that require special handling */
+#define USB_VENDOR_ID_GENESYS 0x05e3 /* Genesys Logic */
+
+#endif
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
new file mode 100644
index 000000000000..6051a646fe69
--- /dev/null
+++ b/drivers/usb/usb-skeleton.c
@@ -0,0 +1,360 @@
+/*
+ * USB Skeleton driver - 2.0
+ *
+ * Copyright (C) 2001-2004 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 the Free Software Foundation, version 2.
+ *
+ * This driver is based on the 2.6.3 version of drivers/usb/usb-skeleton.c
+ * but has been rewritten to be easy to read and use, as no locks are now
+ * needed anymore.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/kref.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+
+
+/* Define these values to match your devices */
+#define USB_SKEL_VENDOR_ID 0xfff0
+#define USB_SKEL_PRODUCT_ID 0xfff0
+
+/* table of devices that work with this driver */
+static struct usb_device_id skel_table [] = {
+ { USB_DEVICE(USB_SKEL_VENDOR_ID, USB_SKEL_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+MODULE_DEVICE_TABLE (usb, skel_table);
+
+
+/* Get a minor range for your devices from the usb maintainer */
+#define USB_SKEL_MINOR_BASE 192
+
+/* Structure to hold all of our device specific stuff */
+struct usb_skel {
+ struct usb_device * udev; /* the usb device for this device */
+ struct usb_interface * interface; /* the interface for this device */
+ unsigned char * bulk_in_buffer; /* the buffer to receive data */
+ size_t bulk_in_size; /* the size of the receive buffer */
+ __u8 bulk_in_endpointAddr; /* the address of the bulk in endpoint */
+ __u8 bulk_out_endpointAddr; /* the address of the bulk out endpoint */
+ struct kref kref;
+};
+#define to_skel_dev(d) container_of(d, struct usb_skel, kref)
+
+static struct usb_driver skel_driver;
+
+static void skel_delete(struct kref *kref)
+{
+ struct usb_skel *dev = to_skel_dev(kref);
+
+ usb_put_dev(dev->udev);
+ kfree (dev->bulk_in_buffer);
+ kfree (dev);
+}
+
+static int skel_open(struct inode *inode, struct file *file)
+{
+ struct usb_skel *dev;
+ struct usb_interface *interface;
+ int subminor;
+ int retval = 0;
+
+ subminor = iminor(inode);
+
+ interface = usb_find_interface(&skel_driver, subminor);
+ if (!interface) {
+ err ("%s - error, can't find device for minor %d",
+ __FUNCTION__, subminor);
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ dev = usb_get_intfdata(interface);
+ if (!dev) {
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ /* increment our usage count for the device */
+ kref_get(&dev->kref);
+
+ /* save our object in the file's private structure */
+ file->private_data = dev;
+
+exit:
+ return retval;
+}
+
+static int skel_release(struct inode *inode, struct file *file)
+{
+ struct usb_skel *dev;
+
+ dev = (struct usb_skel *)file->private_data;
+ if (dev == NULL)
+ return -ENODEV;
+
+ /* decrement the count on our device */
+ kref_put(&dev->kref, skel_delete);
+ return 0;
+}
+
+static ssize_t skel_read(struct file *file, char *buffer, size_t count, loff_t *ppos)
+{
+ struct usb_skel *dev;
+ int retval = 0;
+ int bytes_read;
+
+ dev = (struct usb_skel *)file->private_data;
+
+ /* do a blocking bulk read to get data from the device */
+ retval = usb_bulk_msg(dev->udev,
+ usb_rcvbulkpipe(dev->udev, dev->bulk_in_endpointAddr),
+ dev->bulk_in_buffer,
+ min(dev->bulk_in_size, count),
+ &bytes_read, 10000);
+
+ /* if the read was successful, copy the data to userspace */
+ if (!retval) {
+ if (copy_to_user(buffer, dev->bulk_in_buffer, bytes_read))
+ retval = -EFAULT;
+ else
+ retval = bytes_read;
+ }
+
+ return retval;
+}
+
+static void skel_write_bulk_callback(struct urb *urb, struct pt_regs *regs)
+{
+ struct usb_skel *dev;
+
+ dev = (struct usb_skel *)urb->context;
+
+ /* sync/async unlink faults aren't errors */
+ if (urb->status &&
+ !(urb->status == -ENOENT ||
+ urb->status == -ECONNRESET ||
+ urb->status == -ESHUTDOWN)) {
+ dbg("%s - nonzero write bulk status received: %d",
+ __FUNCTION__, urb->status);
+ }
+
+ /* free up our allocated buffer */
+ usb_buffer_free(urb->dev, urb->transfer_buffer_length,
+ urb->transfer_buffer, urb->transfer_dma);
+}
+
+static ssize_t skel_write(struct file *file, const char *user_buffer, size_t count, loff_t *ppos)
+{
+ struct usb_skel *dev;
+ int retval = 0;
+ struct urb *urb = NULL;
+ char *buf = NULL;
+
+ dev = (struct usb_skel *)file->private_data;
+
+ /* verify that we actually have some data to write */
+ if (count == 0)
+ goto exit;
+
+ /* create a urb, and a buffer for it, and copy the data to the urb */
+ urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!urb) {
+ retval = -ENOMEM;
+ goto error;
+ }
+
+ buf = usb_buffer_alloc(dev->udev, count, GFP_KERNEL, &urb->transfer_dma);
+ if (!buf) {
+ retval = -ENOMEM;
+ goto error;
+ }
+
+ if (copy_from_user(buf, user_buffer, count)) {
+ retval = -EFAULT;
+ goto error;
+ }
+
+ /* initialize the urb properly */
+ usb_fill_bulk_urb(urb, dev->udev,
+ usb_sndbulkpipe(dev->udev, dev->bulk_out_endpointAddr),
+ buf, count, skel_write_bulk_callback, dev);
+ urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ /* send the data out the bulk port */
+ retval = usb_submit_urb(urb, GFP_KERNEL);
+ if (retval) {
+ err("%s - failed submitting write urb, error %d", __FUNCTION__, retval);
+ goto error;
+ }
+
+ /* release our reference to this urb, the USB core will eventually free it entirely */
+ usb_free_urb(urb);
+
+exit:
+ return count;
+
+error:
+ usb_buffer_free(dev->udev, count, buf, urb->transfer_dma);
+ usb_free_urb(urb);
+ return retval;
+}
+
+static struct file_operations skel_fops = {
+ .owner = THIS_MODULE,
+ .read = skel_read,
+ .write = skel_write,
+ .open = skel_open,
+ .release = skel_release,
+};
+
+/*
+ * usb class driver info in order to get a minor number from the usb core,
+ * and to have the device registered with devfs and the driver core
+ */
+static struct usb_class_driver skel_class = {
+ .name = "usb/skel%d",
+ .fops = &skel_fops,
+ .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH,
+ .minor_base = USB_SKEL_MINOR_BASE,
+};
+
+static int skel_probe(struct usb_interface *interface, const struct usb_device_id *id)
+{
+ struct usb_skel *dev = NULL;
+ struct usb_host_interface *iface_desc;
+ struct usb_endpoint_descriptor *endpoint;
+ size_t buffer_size;
+ int i;
+ int retval = -ENOMEM;
+
+ /* allocate memory for our device state and initialize it */
+ dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+ if (dev == NULL) {
+ err("Out of memory");
+ goto error;
+ }
+ memset(dev, 0x00, sizeof(*dev));
+ kref_init(&dev->kref);
+
+ dev->udev = usb_get_dev(interface_to_usbdev(interface));
+ dev->interface = interface;
+
+ /* set up the endpoint information */
+ /* use only the first bulk-in and bulk-out endpoints */
+ iface_desc = interface->cur_altsetting;
+ for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
+ endpoint = &iface_desc->endpoint[i].desc;
+
+ if (!dev->bulk_in_endpointAddr &&
+ (endpoint->bEndpointAddress & USB_DIR_IN) &&
+ ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ == USB_ENDPOINT_XFER_BULK)) {
+ /* we found a bulk in endpoint */
+ buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ dev->bulk_in_size = buffer_size;
+ dev->bulk_in_endpointAddr = endpoint->bEndpointAddress;
+ dev->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
+ if (!dev->bulk_in_buffer) {
+ err("Could not allocate bulk_in_buffer");
+ goto error;
+ }
+ }
+
+ if (!dev->bulk_out_endpointAddr &&
+ !(endpoint->bEndpointAddress & USB_DIR_OUT) &&
+ ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ == USB_ENDPOINT_XFER_BULK)) {
+ /* we found a bulk out endpoint */
+ dev->bulk_out_endpointAddr = endpoint->bEndpointAddress;
+ }
+ }
+ if (!(dev->bulk_in_endpointAddr && dev->bulk_out_endpointAddr)) {
+ err("Could not find both bulk-in and bulk-out endpoints");
+ goto error;
+ }
+
+ /* save our data pointer in this interface device */
+ usb_set_intfdata(interface, dev);
+
+ /* we can register the device now, as it is ready */
+ retval = usb_register_dev(interface, &skel_class);
+ if (retval) {
+ /* something prevented us from registering this driver */
+ err("Not able to get a minor for this device.");
+ usb_set_intfdata(interface, NULL);
+ goto error;
+ }
+
+ /* let the user know what node this device is now attached to */
+ info("USB Skeleton device now attached to USBSkel-%d", interface->minor);
+ return 0;
+
+error:
+ if (dev)
+ kref_put(&dev->kref, skel_delete);
+ return retval;
+}
+
+static void skel_disconnect(struct usb_interface *interface)
+{
+ struct usb_skel *dev;
+ int minor = interface->minor;
+
+ /* prevent skel_open() from racing skel_disconnect() */
+ lock_kernel();
+
+ dev = usb_get_intfdata(interface);
+ usb_set_intfdata(interface, NULL);
+
+ /* give back our minor */
+ usb_deregister_dev(interface, &skel_class);
+
+ unlock_kernel();
+
+ /* decrement our usage count */
+ kref_put(&dev->kref, skel_delete);
+
+ info("USB Skeleton #%d now disconnected", minor);
+}
+
+static struct usb_driver skel_driver = {
+ .owner = THIS_MODULE,
+ .name = "skeleton",
+ .probe = skel_probe,
+ .disconnect = skel_disconnect,
+ .id_table = skel_table,
+};
+
+static int __init usb_skel_init(void)
+{
+ int result;
+
+ /* register this driver with the USB subsystem */
+ result = usb_register(&skel_driver);
+ if (result)
+ err("usb_register failed. Error number %d", result);
+
+ return result;
+}
+
+static void __exit usb_skel_exit(void)
+{
+ /* deregister this driver with the USB subsystem */
+ usb_deregister(&skel_driver);
+}
+
+module_init (usb_skel_init);
+module_exit (usb_skel_exit);
+
+MODULE_LICENSE("GPL");